@golemui/gui-react 0.0.2 → 0.12.0

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 (58) hide show
  1. package/Accordion-Btp_b0xA.js +59 -0
  2. package/{Alert-B71lVm89.js → Alert-CBgIsMKO.js} +1 -1
  3. package/Button-DN0G-MUb.js +21 -0
  4. package/{Calendar-BtYEcLJH.js → Calendar-Dxavv2c7.js} +12 -12
  5. package/Checkbox-ViM9MktI.js +30 -0
  6. package/Currency-C4QFWO7Y.js +37 -0
  7. package/{DateInput-B4S5ssKR.js → DateInput-CdkyyAhc.js} +4 -4
  8. package/DatePicker-TkMCndrw.js +138 -0
  9. package/Dropdown-jKk4TyOa.js +201 -0
  10. package/Errors-D7gxq0y6.js +16 -0
  11. package/Flex-gD893rrB.js +19 -0
  12. package/Grid-DREMTVQI.js +30 -0
  13. package/List-BjMIo577.js +103 -0
  14. package/Markdown-Ck_88HOR.js +47 -0
  15. package/MarkdownText-kJVkmihW.js +9 -0
  16. package/Number-CnQ95aLO.js +35 -0
  17. package/Password-Bg97DYW3.js +36 -0
  18. package/README.md +17 -4
  19. package/RadioGroup-Dldom5ja.js +33 -0
  20. package/RangeCalendar-u2vxIhna.js +49 -0
  21. package/RangeDateInput-CopLdb6J.js +54 -0
  22. package/RangeDatePicker-DXpV-B_G.js +146 -0
  23. package/Renderer-B6WmwKDv.js +9 -0
  24. package/Repeater-BYgXVfbl.js +111 -0
  25. package/Select-BLUX_W91.js +55 -0
  26. package/Tabs-C2qqi8xO.js +129 -0
  27. package/TextArea-cw3Q2v97.js +35 -0
  28. package/TextInput-geLoAA0c.js +32 -0
  29. package/{Toggle-CCzdFjkq.js → Toggle-a7L71GwR.js} +5 -5
  30. package/index.js +790 -698
  31. package/index.umd.cjs +2 -2
  32. package/lib/components/Form.d.ts +7 -13
  33. package/lib/components/Grid.d.ts +2 -0
  34. package/lib/components/Markdown.d.ts +2 -0
  35. package/lib/components/MarkdownText.d.ts +2 -0
  36. package/lib/components/RangeDateInput.d.ts +2 -0
  37. package/lib/components/RangeDatePicker.d.ts +2 -0
  38. package/lib/widget.loaders.d.ts +2 -2
  39. package/package.json +11 -6
  40. package/Accordion-F768Nqhg.js +0 -58
  41. package/Button-BctTVpNg.js +0 -20
  42. package/CHANGELOG.md +0 -529
  43. package/Checkbox-CezJrTAx.js +0 -30
  44. package/Currency-Bj2yx0JY.js +0 -36
  45. package/DatePicker-C1Qiridi.js +0 -130
  46. package/Dropdown-Dd50Psea.js +0 -196
  47. package/Flex-DPIzOItG.js +0 -11
  48. package/List-CLplkkLa.js +0 -103
  49. package/Number-DsIN4V1r.js +0 -34
  50. package/Password-B_QkZ1WU.js +0 -35
  51. package/RadioGroup-BPhyHxKf.js +0 -32
  52. package/RangeCalendar-B-FeEowl.js +0 -47
  53. package/Renderer-CRWbM4oE.js +0 -9
  54. package/Repeater-D1koXq-v.js +0 -46
  55. package/Select-DvFmJB1_.js +0 -54
  56. package/Tabs-CsmJz1Vs.js +0 -115
  57. package/TextArea-z99jVJ4-.js +0 -35
  58. package/TextInput-BTkEyMEv.js +0 -31
package/index.js CHANGED
@@ -1,54 +1,42 @@
1
1
  import "@golemui/gui-components";
2
- import { jsx as Ve } from "react/jsx-runtime";
3
- import * as We from "@golemui/core";
4
- import { standardValidate as Be, isStandardValidateSuccess as Ge } from "@golemui/core";
5
- import * as qe from "@golemui/react";
6
- import { vanillaSchemaToFieldMap as Ke } from "@golemui/gui-shared";
7
- const Ye = {
2
+ import { jsx as Qe } from "react/jsx-runtime";
3
+ import { resolveFormInput as en } from "@golemui/gui-shared";
4
+ import { filterTap as nn, standardValidate as Se, isStandardValidateSuccess as Oe } from "@golemui/core";
5
+ import * as tn from "@golemui/react";
6
+ import { useMemo as rn } from "react";
7
+ const on = {
8
8
  // INTERACTIVE
9
- button: async () => (await import("./Button-BctTVpNg.js")).Button,
9
+ button: async () => (await import("./Button-DN0G-MUb.js")).Button,
10
10
  // CONTROLS
11
- calendar: async () => (await import("./Calendar-BtYEcLJH.js")).Calendar,
12
- currency: async () => (await import("./Currency-Bj2yx0JY.js")).Currency,
13
- dateInput: async () => (await import("./DateInput-B4S5ssKR.js")).DateInput,
14
- datePicker: async () => (await import("./DatePicker-C1Qiridi.js")).DatePicker,
15
- dropdown: async () => (await import("./Dropdown-Dd50Psea.js")).Dropdown,
16
- list: async () => (await import("./List-CLplkkLa.js")).List,
17
- password: async () => (await import("./Password-B_QkZ1WU.js")).Password,
18
- textinput: async () => (await import("./TextInput-BTkEyMEv.js")).TextInput,
19
- textarea: async () => (await import("./TextArea-z99jVJ4-.js")).TextArea,
20
- checkbox: async () => (await import("./Checkbox-CezJrTAx.js")).Checkbox,
21
- toggle: async () => (await import("./Toggle-CCzdFjkq.js")).Toggle,
22
- number: async () => (await import("./Number-DsIN4V1r.js")).NumberInput,
23
- select: async () => (await import("./Select-DvFmJB1_.js")).Select,
24
- radiogroup: async () => (await import("./RadioGroup-BPhyHxKf.js")).RadioGroup,
25
- rangeCalendar: async () => (await import("./RangeCalendar-B-FeEowl.js")).RangeCalendar,
11
+ calendar: async () => (await import("./Calendar-Dxavv2c7.js")).Calendar,
12
+ currency: async () => (await import("./Currency-C4QFWO7Y.js")).Currency,
13
+ dateInput: async () => (await import("./DateInput-CdkyyAhc.js")).DateInput,
14
+ datePicker: async () => (await import("./DatePicker-TkMCndrw.js")).DatePicker,
15
+ dropdown: async () => (await import("./Dropdown-jKk4TyOa.js")).Dropdown,
16
+ list: async () => (await import("./List-BjMIo577.js")).List,
17
+ password: async () => (await import("./Password-Bg97DYW3.js")).Password,
18
+ textinput: async () => (await import("./TextInput-geLoAA0c.js")).TextInput,
19
+ textarea: async () => (await import("./TextArea-cw3Q2v97.js")).TextArea,
20
+ markdown: async () => (await import("./Markdown-Ck_88HOR.js")).Markdown,
21
+ checkbox: async () => (await import("./Checkbox-ViM9MktI.js")).Checkbox,
22
+ toggle: async () => (await import("./Toggle-a7L71GwR.js")).Toggle,
23
+ number: async () => (await import("./Number-CnQ95aLO.js")).NumberInput,
24
+ select: async () => (await import("./Select-BLUX_W91.js")).Select,
25
+ radiogroup: async () => (await import("./RadioGroup-Dldom5ja.js")).RadioGroup,
26
+ rangeCalendar: async () => (await import("./RangeCalendar-u2vxIhna.js")).RangeCalendar,
27
+ rangeDateInput: async () => (await import("./RangeDateInput-CopLdb6J.js")).RangeDateInput,
28
+ rangeDatePicker: async () => (await import("./RangeDatePicker-DXpV-B_G.js")).RangeDatePicker,
26
29
  // REPEATER
27
- repeater: async () => (await import("./Repeater-D1koXq-v.js")).Repeater,
30
+ repeater: async () => (await import("./Repeater-BYgXVfbl.js")).Repeater,
28
31
  // LAYOUTS
29
- flex: async () => (await import("./Flex-DPIzOItG.js")).Flex,
30
- tabs: async () => (await import("./Tabs-CsmJz1Vs.js")).Tabs,
31
- accordion: async () => (await import("./Accordion-F768Nqhg.js")).Accordion,
32
+ flex: async () => (await import("./Flex-gD893rrB.js")).Flex,
33
+ grid: async () => (await import("./Grid-DREMTVQI.js")).Grid,
34
+ tabs: async () => (await import("./Tabs-C2qqi8xO.js")).Tabs,
35
+ accordion: async () => (await import("./Accordion-Btp_b0xA.js")).Accordion,
32
36
  // DISPLAY
33
- alert: async () => (await import("./Alert-B71lVm89.js")).Alert,
34
- renderer: async () => (await import("./Renderer-CRWbM4oE.js")).Renderer
35
- }, Xe = (e) => ({
36
- type: "string",
37
- ...e || {}
38
- }), He = (e) => ({
39
- type: "number",
40
- ...e || {}
41
- }), Qe = (e) => ({
42
- type: "integer",
43
- ...e || {}
44
- }), en = (e) => ({
45
- type: "boolean",
46
- ...e || {}
47
- }), nn = {
48
- stringValidator: Xe,
49
- booleanValidator: en,
50
- numberValidator: He,
51
- integerValidator: Qe
37
+ alert: async () => (await import("./Alert-CBgIsMKO.js")).Alert,
38
+ markdownText: async () => (await import("./MarkdownText-kJVkmihW.js")).MarkdownText,
39
+ renderer: async () => (await import("./Renderer-B6WmwKDv.js")).Renderer
52
40
  };
53
41
  function u(e, n, t) {
54
42
  function r(c, a) {
@@ -62,9 +50,9 @@ function u(e, n, t) {
62
50
  }), c._zod.traits.has(e))
63
51
  return;
64
52
  c._zod.traits.add(e), n(c, a);
65
- const f = i.prototype, l = Object.keys(f);
66
- for (let p = 0; p < l.length; p++) {
67
- const h = l[p];
53
+ const f = i.prototype, d = Object.keys(f);
54
+ for (let p = 0; p < d.length; p++) {
55
+ const h = d[p];
68
56
  h in c || (c[h] = f[h].bind(c));
69
57
  }
70
58
  }
@@ -76,45 +64,45 @@ function u(e, n, t) {
76
64
  var a;
77
65
  const f = t?.Parent ? new s() : this;
78
66
  r(f, c), (a = f._zod).deferred ?? (a.deferred = []);
79
- for (const l of f._zod.deferred)
80
- l();
67
+ for (const d of f._zod.deferred)
68
+ d();
81
69
  return f;
82
70
  }
83
71
  return Object.defineProperty(i, "init", { value: r }), Object.defineProperty(i, Symbol.hasInstance, {
84
72
  value: (c) => t?.Parent && c instanceof t.Parent ? !0 : c?._zod?.traits?.has(e)
85
73
  }), Object.defineProperty(i, "name", { value: e }), i;
86
74
  }
87
- class E extends Error {
75
+ class A extends Error {
88
76
  constructor() {
89
77
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
90
78
  }
91
79
  }
92
- class X extends Error {
80
+ class Te extends Error {
93
81
  constructor(n) {
94
82
  super(`Encountered unidirectional transform during encode: ${n}`), this.name = "ZodEncodeError";
95
83
  }
96
84
  }
97
- const tn = {};
98
- function S(e) {
99
- return tn;
85
+ const sn = {};
86
+ function O(e) {
87
+ return sn;
100
88
  }
101
- function q(e, n) {
89
+ function Y(e, n) {
102
90
  return typeof n == "bigint" ? n.toString() : n;
103
91
  }
104
- function H(e) {
92
+ function ne(e) {
105
93
  return e == null;
106
94
  }
107
- function Q(e) {
95
+ function te(e) {
108
96
  const n = e.startsWith("^") ? 1 : 0, t = e.endsWith("$") ? e.length - 1 : e.length;
109
97
  return e.slice(n, t);
110
98
  }
111
- const ie = Symbol("evaluating");
99
+ const ce = Symbol("evaluating");
112
100
  function m(e, n, t) {
113
101
  let r;
114
102
  Object.defineProperty(e, n, {
115
103
  get() {
116
- if (r !== ie)
117
- return r === void 0 && (r = ie, r = t()), r;
104
+ if (r !== ce)
105
+ return r === void 0 && (r = ce, r = t()), r;
118
106
  },
119
107
  set(o) {
120
108
  Object.defineProperty(e, n, {
@@ -125,7 +113,7 @@ function m(e, n, t) {
125
113
  configurable: !0
126
114
  });
127
115
  }
128
- function rn(...e) {
116
+ function cn(...e) {
129
117
  const n = {};
130
118
  for (const t of e) {
131
119
  const r = Object.getOwnPropertyDescriptors(t);
@@ -133,34 +121,34 @@ function rn(...e) {
133
121
  }
134
122
  return Object.defineProperties({}, n);
135
123
  }
136
- function on(e) {
124
+ function an(e) {
137
125
  return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
138
126
  }
139
- const ze = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
127
+ const Pe = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
140
128
  };
141
- function se(e) {
129
+ function ae(e) {
142
130
  return typeof e == "object" && e !== null && !Array.isArray(e);
143
131
  }
144
- function K(e) {
145
- if (se(e) === !1)
132
+ function X(e) {
133
+ if (ae(e) === !1)
146
134
  return !1;
147
135
  const n = e.constructor;
148
136
  if (n === void 0 || typeof n != "function")
149
137
  return !0;
150
138
  const t = n.prototype;
151
- return !(se(t) === !1 || Object.prototype.hasOwnProperty.call(t, "isPrototypeOf") === !1);
139
+ return !(ae(t) === !1 || Object.prototype.hasOwnProperty.call(t, "isPrototypeOf") === !1);
152
140
  }
153
- function be(e) {
154
- return K(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
141
+ function Ee(e) {
142
+ return X(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
155
143
  }
156
- function ee(e) {
144
+ function re(e) {
157
145
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
158
146
  }
159
- function we(e, n, t) {
147
+ function Ae(e, n, t) {
160
148
  const r = new e._zod.constr(n ?? e._zod.def);
161
149
  return (!n || t?.parent) && (r._zod.parent = e), r;
162
150
  }
163
- function d(e) {
151
+ function l(e) {
164
152
  const n = e;
165
153
  if (!n)
166
154
  return {};
@@ -173,14 +161,14 @@ function d(e) {
173
161
  }
174
162
  return delete n.message, typeof n.error == "string" ? { ...n, error: () => n.error } : n;
175
163
  }
176
- const sn = {
164
+ const un = {
177
165
  safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
178
166
  int32: [-2147483648, 2147483647],
179
167
  uint32: [0, 4294967295],
180
168
  float32: [-34028234663852886e22, 34028234663852886e22],
181
169
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
182
170
  };
183
- function P(e, n = 0) {
171
+ function E(e, n = 0) {
184
172
  if (e.aborted === !0)
185
173
  return !0;
186
174
  for (let t = n; t < e.issues.length; t++)
@@ -188,27 +176,27 @@ function P(e, n = 0) {
188
176
  return !0;
189
177
  return !1;
190
178
  }
191
- function cn(e, n) {
179
+ function fn(e, n) {
192
180
  return n.map((t) => {
193
181
  var r;
194
182
  return (r = t).path ?? (r.path = []), t.path.unshift(e), t;
195
183
  });
196
184
  }
197
- function M(e) {
185
+ function x(e) {
198
186
  return typeof e == "string" ? e : e?.message;
199
187
  }
200
- function O(e, n, t) {
188
+ function T(e, n, t) {
201
189
  const r = { ...e, path: e.path ?? [] };
202
190
  if (!e.message) {
203
- const o = M(e.inst?._zod.def?.error?.(e)) ?? M(n?.error?.(e)) ?? M(t.customError?.(e)) ?? M(t.localeError?.(e)) ?? "Invalid input";
191
+ const o = x(e.inst?._zod.def?.error?.(e)) ?? x(n?.error?.(e)) ?? x(t.customError?.(e)) ?? x(t.localeError?.(e)) ?? "Invalid input";
204
192
  r.message = o;
205
193
  }
206
194
  return delete r.inst, delete r.continue, n?.reportInput || delete r.input, r;
207
195
  }
208
- function ne(e) {
196
+ function oe(e) {
209
197
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
210
198
  }
211
- function R(...e) {
199
+ function j(...e) {
212
200
  const [n, t, r] = e;
213
201
  return typeof n == "string" ? {
214
202
  message: n,
@@ -217,25 +205,25 @@ function R(...e) {
217
205
  inst: r
218
206
  } : { ...n };
219
207
  }
220
- const $e = (e, n) => {
208
+ const Ie = (e, n) => {
221
209
  e.name = "$ZodError", Object.defineProperty(e, "_zod", {
222
210
  value: e._zod,
223
211
  enumerable: !1
224
212
  }), Object.defineProperty(e, "issues", {
225
213
  value: n,
226
214
  enumerable: !1
227
- }), e.message = JSON.stringify(n, q, 2), Object.defineProperty(e, "toString", {
215
+ }), e.message = JSON.stringify(n, Y, 2), Object.defineProperty(e, "toString", {
228
216
  value: () => e.message,
229
217
  enumerable: !1
230
218
  });
231
- }, Ze = u("$ZodError", $e), L = u("$ZodError", $e, { Parent: Error });
232
- function un(e, n = (t) => t.message) {
219
+ }, Ne = u("$ZodError", Ie), J = u("$ZodError", Ie, { Parent: Error });
220
+ function dn(e, n = (t) => t.message) {
233
221
  const t = {}, r = [];
234
222
  for (const o of e.issues)
235
223
  o.path.length > 0 ? (t[o.path[0]] = t[o.path[0]] || [], t[o.path[0]].push(n(o))) : r.push(n(o));
236
224
  return { formErrors: r, fieldErrors: t };
237
225
  }
238
- function an(e, n = (t) => t.message) {
226
+ function ln(e, n = (t) => t.message) {
239
227
  const t = { _errors: [] }, r = (o) => {
240
228
  for (const s of o.issues)
241
229
  if (s.code === "invalid_union" && s.errors.length)
@@ -256,77 +244,77 @@ function an(e, n = (t) => t.message) {
256
244
  };
257
245
  return r(e), t;
258
246
  }
259
- const x = (e) => (n, t, r, o) => {
247
+ const U = (e) => (n, t, r, o) => {
260
248
  const s = r ? Object.assign(r, { async: !1 }) : { async: !1 }, i = n._zod.run({ value: t, issues: [] }, s);
261
249
  if (i instanceof Promise)
262
- throw new E();
250
+ throw new A();
263
251
  if (i.issues.length) {
264
- const c = new (o?.Err ?? e)(i.issues.map((a) => O(a, s, S())));
265
- throw ze(c, o?.callee), c;
252
+ const c = new (o?.Err ?? e)(i.issues.map((a) => T(a, s, O())));
253
+ throw Pe(c, o?.callee), c;
266
254
  }
267
255
  return i.value;
268
- }, fn = /* @__PURE__ */ x(L), J = (e) => async (n, t, r, o) => {
256
+ }, mn = /* @__PURE__ */ U(J), V = (e) => async (n, t, r, o) => {
269
257
  const s = r ? Object.assign(r, { async: !0 }) : { async: !0 };
270
258
  let i = n._zod.run({ value: t, issues: [] }, s);
271
259
  if (i instanceof Promise && (i = await i), i.issues.length) {
272
- const c = new (o?.Err ?? e)(i.issues.map((a) => O(a, s, S())));
273
- throw ze(c, o?.callee), c;
260
+ const c = new (o?.Err ?? e)(i.issues.map((a) => T(a, s, O())));
261
+ throw Pe(c, o?.callee), c;
274
262
  }
275
263
  return i.value;
276
- }, ln = /* @__PURE__ */ J(L), U = (e) => (n, t, r) => {
264
+ }, pn = /* @__PURE__ */ V(J), W = (e) => (n, t, r) => {
277
265
  const o = r ? { ...r, async: !1 } : { async: !1 }, s = n._zod.run({ value: t, issues: [] }, o);
278
266
  if (s instanceof Promise)
279
- throw new E();
267
+ throw new A();
280
268
  return s.issues.length ? {
281
269
  success: !1,
282
- error: new (e ?? Ze)(s.issues.map((i) => O(i, o, S())))
270
+ error: new (e ?? Ne)(s.issues.map((i) => T(i, o, O())))
283
271
  } : { success: !0, data: s.value };
284
- }, ke = /* @__PURE__ */ U(L), V = (e) => async (n, t, r) => {
272
+ }, Me = /* @__PURE__ */ W(J), G = (e) => async (n, t, r) => {
285
273
  const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
286
274
  let s = n._zod.run({ value: t, issues: [] }, o);
287
275
  return s instanceof Promise && (s = await s), s.issues.length ? {
288
276
  success: !1,
289
- error: new e(s.issues.map((i) => O(i, o, S())))
277
+ error: new e(s.issues.map((i) => T(i, o, O())))
290
278
  } : { success: !0, data: s.value };
291
- }, Se = /* @__PURE__ */ V(L), dn = (e) => (n, t, r) => {
292
- const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
293
- return x(e)(n, t, o);
294
- }, pn = (e) => (n, t, r) => x(e)(n, t, r), mn = (e) => async (n, t, r) => {
295
- const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
296
- return J(e)(n, t, o);
297
- }, hn = (e) => async (n, t, r) => J(e)(n, t, r), _n = (e) => (n, t, r) => {
279
+ }, Ce = /* @__PURE__ */ G(J), hn = (e) => (n, t, r) => {
298
280
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
299
281
  return U(e)(n, t, o);
300
- }, gn = (e) => (n, t, r) => U(e)(n, t, r), vn = (e) => async (n, t, r) => {
282
+ }, gn = (e) => (n, t, r) => U(e)(n, t, r), _n = (e) => async (n, t, r) => {
301
283
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
302
284
  return V(e)(n, t, o);
303
- }, yn = (e) => async (n, t, r) => V(e)(n, t, r), zn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, ce = (e) => e ? new 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)$/, bn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, wn = /^(?:(?: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])$/, $n = /^(([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}|:))$/, Zn = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, Oe = "(?:(?:\\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])))", kn = /* @__PURE__ */ new RegExp(`^${Oe}$`);
304
- function Te(e) {
285
+ }, yn = (e) => async (n, t, r) => V(e)(n, t, r), vn = (e) => (n, t, r) => {
286
+ const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
287
+ return W(e)(n, t, o);
288
+ }, zn = (e) => (n, t, r) => W(e)(n, t, r), bn = (e) => async (n, t, r) => {
289
+ const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
290
+ return G(e)(n, t, o);
291
+ }, wn = (e) => async (n, t, r) => G(e)(n, t, r), $n = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, ue = (e) => e ? new 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)$/, kn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Zn = /^(?:(?: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])$/, Sn = /^(([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}|:))$/, On = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, Re = "(?:(?:\\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])))", Tn = /* @__PURE__ */ new RegExp(`^${Re}$`);
292
+ function je(e) {
305
293
  const n = "(?:[01]\\d|2[0-3]):[0-5]\\d";
306
294
  return typeof e.precision == "number" ? e.precision === -1 ? `${n}` : e.precision === 0 ? `${n}:[0-5]\\d` : `${n}:[0-5]\\d\\.\\d{${e.precision}}` : `${n}(?::[0-5]\\d(?:\\.\\d+)?)?`;
307
295
  }
308
- function Sn(e) {
309
- return new RegExp(`^${Te(e)}$`);
296
+ function Pn(e) {
297
+ return new RegExp(`^${je(e)}$`);
310
298
  }
311
- function On(e) {
312
- const n = Te({ precision: e.precision }), t = ["Z"];
299
+ function En(e) {
300
+ const n = je({ precision: e.precision }), t = ["Z"];
313
301
  e.local && t.push(""), e.offset && t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
314
302
  const r = `${n}(?:${t.join("|")})`;
315
- return new RegExp(`^${Oe}T(?:${r})$`);
303
+ return new RegExp(`^${Re}T(?:${r})$`);
316
304
  }
317
- const Tn = (e) => {
305
+ const An = (e) => {
318
306
  const n = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
319
307
  return new RegExp(`^${n}$`);
320
- }, Pn = /^-?\d+$/, En = /^-?\d+(?:\.\d+)?$/, An = /^(?:true|false)$/i, Nn = /^[^A-Z]*$/, In = /^[^a-z]*$/, b = /* @__PURE__ */ u("$ZodCheck", (e, n) => {
308
+ }, In = /^-?\d+$/, Nn = /^-?\d+(?:\.\d+)?$/, Mn = /^(?:true|false)$/i, Cn = /^[^A-Z]*$/, Rn = /^[^a-z]*$/, $ = /* @__PURE__ */ u("$ZodCheck", (e, n) => {
321
309
  var t;
322
310
  e._zod ?? (e._zod = {}), e._zod.def = n, (t = e._zod).onattach ?? (t.onattach = []);
323
- }), Pe = {
311
+ }), Fe = {
324
312
  number: "number",
325
313
  bigint: "bigint",
326
314
  object: "date"
327
- }, Cn = /* @__PURE__ */ u("$ZodCheckLessThan", (e, n) => {
328
- b.init(e, n);
329
- const t = Pe[typeof n.value];
315
+ }, jn = /* @__PURE__ */ u("$ZodCheckLessThan", (e, n) => {
316
+ $.init(e, n);
317
+ const t = Fe[typeof n.value];
330
318
  e._zod.onattach.push((r) => {
331
319
  const o = r._zod.bag, s = (n.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
332
320
  n.value < s && (n.inclusive ? o.maximum = n.value : o.exclusiveMaximum = n.value);
@@ -341,9 +329,9 @@ const Tn = (e) => {
341
329
  continue: !n.abort
342
330
  });
343
331
  };
344
- }), Rn = /* @__PURE__ */ u("$ZodCheckGreaterThan", (e, n) => {
345
- b.init(e, n);
346
- const t = Pe[typeof n.value];
332
+ }), Fn = /* @__PURE__ */ u("$ZodCheckGreaterThan", (e, n) => {
333
+ $.init(e, n);
334
+ const t = Fe[typeof n.value];
347
335
  e._zod.onattach.push((r) => {
348
336
  const o = r._zod.bag, s = (n.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
349
337
  n.value > s && (n.inclusive ? o.minimum = n.value : o.exclusiveMinimum = n.value);
@@ -358,12 +346,12 @@ const Tn = (e) => {
358
346
  continue: !n.abort
359
347
  });
360
348
  };
361
- }), jn = /* @__PURE__ */ u("$ZodCheckNumberFormat", (e, n) => {
362
- b.init(e, n), n.format = n.format || "float64";
363
- const t = n.format?.includes("int"), r = t ? "int" : "number", [o, s] = sn[n.format];
349
+ }), xn = /* @__PURE__ */ u("$ZodCheckNumberFormat", (e, n) => {
350
+ $.init(e, n), n.format = n.format || "float64";
351
+ const t = n.format?.includes("int"), r = t ? "int" : "number", [o, s] = un[n.format];
364
352
  e._zod.onattach.push((i) => {
365
353
  const c = i._zod.bag;
366
- c.format = n.format, c.minimum = o, c.maximum = s, t && (c.pattern = Pn);
354
+ c.format = n.format, c.minimum = o, c.maximum = s, t && (c.pattern = In);
367
355
  }), e._zod.check = (i) => {
368
356
  const c = i.value;
369
357
  if (t) {
@@ -419,11 +407,11 @@ const Tn = (e) => {
419
407
  continue: !n.abort
420
408
  });
421
409
  };
422
- }), Mn = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, n) => {
410
+ }), Dn = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, n) => {
423
411
  var t;
424
- b.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
412
+ $.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
425
413
  const o = r.value;
426
- return !H(o) && o.length !== void 0;
414
+ return !ne(o) && o.length !== void 0;
427
415
  }), e._zod.onattach.push((r) => {
428
416
  const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
429
417
  n.maximum < o && (r._zod.bag.maximum = n.maximum);
@@ -431,7 +419,7 @@ const Tn = (e) => {
431
419
  const o = r.value;
432
420
  if (o.length <= n.maximum)
433
421
  return;
434
- const i = ne(o);
422
+ const i = oe(o);
435
423
  r.issues.push({
436
424
  origin: i,
437
425
  code: "too_big",
@@ -442,11 +430,11 @@ const Tn = (e) => {
442
430
  continue: !n.abort
443
431
  });
444
432
  };
445
- }), Fn = /* @__PURE__ */ u("$ZodCheckMinLength", (e, n) => {
433
+ }), Ln = /* @__PURE__ */ u("$ZodCheckMinLength", (e, n) => {
446
434
  var t;
447
- b.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
435
+ $.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
448
436
  const o = r.value;
449
- return !H(o) && o.length !== void 0;
437
+ return !ne(o) && o.length !== void 0;
450
438
  }), e._zod.onattach.push((r) => {
451
439
  const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
452
440
  n.minimum > o && (r._zod.bag.minimum = n.minimum);
@@ -454,7 +442,7 @@ const Tn = (e) => {
454
442
  const o = r.value;
455
443
  if (o.length >= n.minimum)
456
444
  return;
457
- const i = ne(o);
445
+ const i = oe(o);
458
446
  r.issues.push({
459
447
  origin: i,
460
448
  code: "too_small",
@@ -465,11 +453,11 @@ const Tn = (e) => {
465
453
  continue: !n.abort
466
454
  });
467
455
  };
468
- }), Dn = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, n) => {
456
+ }), Jn = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, n) => {
469
457
  var t;
470
- b.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
458
+ $.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
471
459
  const o = r.value;
472
- return !H(o) && o.length !== void 0;
460
+ return !ne(o) && o.length !== void 0;
473
461
  }), e._zod.onattach.push((r) => {
474
462
  const o = r._zod.bag;
475
463
  o.minimum = n.length, o.maximum = n.length, o.length = n.length;
@@ -477,7 +465,7 @@ const Tn = (e) => {
477
465
  const o = r.value, s = o.length;
478
466
  if (s === n.length)
479
467
  return;
480
- const i = ne(o), c = s > n.length;
468
+ const i = oe(o), c = s > n.length;
481
469
  r.issues.push({
482
470
  origin: i,
483
471
  ...c ? { code: "too_big", maximum: n.length } : { code: "too_small", minimum: n.length },
@@ -488,9 +476,9 @@ const Tn = (e) => {
488
476
  continue: !n.abort
489
477
  });
490
478
  };
491
- }), W = /* @__PURE__ */ u("$ZodCheckStringFormat", (e, n) => {
479
+ }), q = /* @__PURE__ */ u("$ZodCheckStringFormat", (e, n) => {
492
480
  var t, r;
493
- b.init(e, n), e._zod.onattach.push((o) => {
481
+ $.init(e, n), e._zod.onattach.push((o) => {
494
482
  const s = o._zod.bag;
495
483
  s.format = n.format, n.pattern && (s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(n.pattern));
496
484
  }), n.pattern ? (t = e._zod).check ?? (t.check = (o) => {
@@ -505,8 +493,8 @@ const Tn = (e) => {
505
493
  });
506
494
  }) : (r = e._zod).check ?? (r.check = () => {
507
495
  });
508
- }), Ln = /* @__PURE__ */ u("$ZodCheckRegex", (e, n) => {
509
- W.init(e, n), e._zod.check = (t) => {
496
+ }), Un = /* @__PURE__ */ u("$ZodCheckRegex", (e, n) => {
497
+ q.init(e, n), e._zod.check = (t) => {
510
498
  n.pattern.lastIndex = 0, !n.pattern.test(t.value) && t.issues.push({
511
499
  origin: "string",
512
500
  code: "invalid_format",
@@ -517,13 +505,13 @@ const Tn = (e) => {
517
505
  continue: !n.abort
518
506
  });
519
507
  };
520
- }), xn = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, n) => {
521
- n.pattern ?? (n.pattern = Nn), W.init(e, n);
522
- }), Jn = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, n) => {
523
- n.pattern ?? (n.pattern = In), W.init(e, n);
524
- }), Un = /* @__PURE__ */ u("$ZodCheckIncludes", (e, n) => {
525
- b.init(e, n);
526
- const t = ee(n.includes), r = new RegExp(typeof n.position == "number" ? `^.{${n.position}}${t}` : t);
508
+ }), Vn = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, n) => {
509
+ n.pattern ?? (n.pattern = Cn), q.init(e, n);
510
+ }), Wn = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, n) => {
511
+ n.pattern ?? (n.pattern = Rn), q.init(e, n);
512
+ }), Gn = /* @__PURE__ */ u("$ZodCheckIncludes", (e, n) => {
513
+ $.init(e, n);
514
+ const t = re(n.includes), r = new RegExp(typeof n.position == "number" ? `^.{${n.position}}${t}` : t);
527
515
  n.pattern = r, e._zod.onattach.push((o) => {
528
516
  const s = o._zod.bag;
529
517
  s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(r);
@@ -538,9 +526,9 @@ const Tn = (e) => {
538
526
  continue: !n.abort
539
527
  });
540
528
  };
541
- }), Vn = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, n) => {
542
- b.init(e, n);
543
- const t = new RegExp(`^${ee(n.prefix)}.*`);
529
+ }), qn = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, n) => {
530
+ $.init(e, n);
531
+ const t = new RegExp(`^${re(n.prefix)}.*`);
544
532
  n.pattern ?? (n.pattern = t), e._zod.onattach.push((r) => {
545
533
  const o = r._zod.bag;
546
534
  o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(t);
@@ -555,9 +543,9 @@ const Tn = (e) => {
555
543
  continue: !n.abort
556
544
  });
557
545
  };
558
- }), Wn = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, n) => {
559
- b.init(e, n);
560
- const t = new RegExp(`.*${ee(n.suffix)}$`);
546
+ }), Bn = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, n) => {
547
+ $.init(e, n);
548
+ const t = new RegExp(`.*${re(n.suffix)}$`);
561
549
  n.pattern ?? (n.pattern = t), e._zod.onattach.push((r) => {
562
550
  const o = r._zod.bag;
563
551
  o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(t);
@@ -572,17 +560,17 @@ const Tn = (e) => {
572
560
  continue: !n.abort
573
561
  });
574
562
  };
575
- }), Bn = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, n) => {
576
- b.init(e, n), e._zod.check = (t) => {
563
+ }), Kn = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, n) => {
564
+ $.init(e, n), e._zod.check = (t) => {
577
565
  t.value = n.tx(t.value);
578
566
  };
579
- }), Gn = {
567
+ }), Yn = {
580
568
  major: 4,
581
569
  minor: 3,
582
570
  patch: 6
583
- }, g = /* @__PURE__ */ u("$ZodType", (e, n) => {
571
+ }, y = /* @__PURE__ */ u("$ZodType", (e, n) => {
584
572
  var t;
585
- e ?? (e = {}), e._zod.def = n, e._zod.bag = e._zod.bag || {}, e._zod.version = Gn;
573
+ e ?? (e = {}), e._zod.def = n, e._zod.bag = e._zod.bag || {}, e._zod.version = Yn;
586
574
  const r = [...e._zod.def.checks ?? []];
587
575
  e._zod.traits.has("$ZodCheck") && r.unshift(e);
588
576
  for (const o of r)
@@ -594,35 +582,35 @@ const Tn = (e) => {
594
582
  });
595
583
  else {
596
584
  const o = (i, c, a) => {
597
- let f = P(i), l;
585
+ let f = E(i), d;
598
586
  for (const p of c) {
599
587
  if (p._zod.def.when) {
600
588
  if (!p._zod.def.when(i))
601
589
  continue;
602
590
  } else if (f)
603
591
  continue;
604
- const h = i.issues.length, _ = p._zod.check(i);
605
- if (_ instanceof Promise && a?.async === !1)
606
- throw new E();
607
- if (l || _ instanceof Promise)
608
- l = (l ?? Promise.resolve()).then(async () => {
609
- await _, i.issues.length !== h && (f || (f = P(i, h)));
592
+ const h = i.issues.length, g = p._zod.check(i);
593
+ if (g instanceof Promise && a?.async === !1)
594
+ throw new A();
595
+ if (d || g instanceof Promise)
596
+ d = (d ?? Promise.resolve()).then(async () => {
597
+ await g, i.issues.length !== h && (f || (f = E(i, h)));
610
598
  });
611
599
  else {
612
600
  if (i.issues.length === h)
613
601
  continue;
614
- f || (f = P(i, h));
602
+ f || (f = E(i, h));
615
603
  }
616
604
  }
617
- return l ? l.then(() => i) : i;
605
+ return d ? d.then(() => i) : i;
618
606
  }, s = (i, c, a) => {
619
- if (P(i))
607
+ if (E(i))
620
608
  return i.aborted = !0, i;
621
609
  const f = o(c, r, a);
622
610
  if (f instanceof Promise) {
623
611
  if (a.async === !1)
624
- throw new E();
625
- return f.then((l) => e._zod.parse(l, a));
612
+ throw new A();
613
+ return f.then((d) => e._zod.parse(d, a));
626
614
  }
627
615
  return e._zod.parse(f, a);
628
616
  };
@@ -631,12 +619,12 @@ const Tn = (e) => {
631
619
  return e._zod.parse(i, c);
632
620
  if (c.direction === "backward") {
633
621
  const f = e._zod.parse({ value: i.value, issues: [] }, { ...c, skipChecks: !0 });
634
- return f instanceof Promise ? f.then((l) => s(l, i, c)) : s(f, i, c);
622
+ return f instanceof Promise ? f.then((d) => s(d, i, c)) : s(f, i, c);
635
623
  }
636
624
  const a = e._zod.parse(i, c);
637
625
  if (a instanceof Promise) {
638
626
  if (c.async === !1)
639
- throw new E();
627
+ throw new A();
640
628
  return a.then((f) => o(f, r, c));
641
629
  }
642
630
  return o(a, r, c);
@@ -645,17 +633,17 @@ const Tn = (e) => {
645
633
  m(e, "~standard", () => ({
646
634
  validate: (o) => {
647
635
  try {
648
- const s = ke(e, o);
636
+ const s = Me(e, o);
649
637
  return s.success ? { value: s.data } : { issues: s.error?.issues };
650
638
  } catch {
651
- return Se(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
639
+ return Ce(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
652
640
  }
653
641
  },
654
642
  vendor: "zod",
655
643
  version: 1
656
644
  }));
657
- }), te = /* @__PURE__ */ u("$ZodString", (e, n) => {
658
- g.init(e, n), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Tn(e._zod.bag), e._zod.parse = (t, r) => {
645
+ }), ie = /* @__PURE__ */ u("$ZodString", (e, n) => {
646
+ y.init(e, n), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? An(e._zod.bag), e._zod.parse = (t, r) => {
659
647
  if (n.coerce)
660
648
  try {
661
649
  t.value = String(t.value);
@@ -668,9 +656,9 @@ const Tn = (e) => {
668
656
  inst: e
669
657
  }), t;
670
658
  };
671
- }), w = /* @__PURE__ */ u("$ZodStringFormat", (e, n) => {
672
- W.init(e, n), te.init(e, n);
673
- }), qn = /* @__PURE__ */ u("$ZodUUID", (e, n) => {
659
+ }), k = /* @__PURE__ */ u("$ZodStringFormat", (e, n) => {
660
+ q.init(e, n), ie.init(e, n);
661
+ }), Xn = /* @__PURE__ */ u("$ZodUUID", (e, n) => {
674
662
  if (n.version) {
675
663
  const r = {
676
664
  v1: 1,
@@ -684,14 +672,14 @@ const Tn = (e) => {
684
672
  }[n.version];
685
673
  if (r === void 0)
686
674
  throw new Error(`Invalid UUID version: "${n.version}"`);
687
- n.pattern ?? (n.pattern = ce(r));
675
+ n.pattern ?? (n.pattern = ue(r));
688
676
  } else
689
- n.pattern ?? (n.pattern = ce());
690
- w.init(e, n);
691
- }), Kn = /* @__PURE__ */ u("$ZodEmail", (e, n) => {
692
- n.pattern ?? (n.pattern = bn), w.init(e, n);
693
- }), Yn = /* @__PURE__ */ u("$ZodURL", (e, n) => {
694
- w.init(e, n), e._zod.check = (t) => {
677
+ n.pattern ?? (n.pattern = ue());
678
+ k.init(e, n);
679
+ }), Hn = /* @__PURE__ */ u("$ZodEmail", (e, n) => {
680
+ n.pattern ?? (n.pattern = kn), k.init(e, n);
681
+ }), Qn = /* @__PURE__ */ u("$ZodURL", (e, n) => {
682
+ k.init(e, n), e._zod.check = (t) => {
695
683
  try {
696
684
  const r = t.value.trim(), o = new URL(r);
697
685
  n.hostname && (n.hostname.lastIndex = 0, n.hostname.test(o.hostname) || t.issues.push({
@@ -722,18 +710,18 @@ const Tn = (e) => {
722
710
  });
723
711
  }
724
712
  };
725
- }), Xn = /* @__PURE__ */ u("$ZodISODateTime", (e, n) => {
726
- n.pattern ?? (n.pattern = On(n)), w.init(e, n);
727
- }), Hn = /* @__PURE__ */ u("$ZodISODate", (e, n) => {
728
- n.pattern ?? (n.pattern = kn), w.init(e, n);
729
- }), Qn = /* @__PURE__ */ u("$ZodISOTime", (e, n) => {
730
- n.pattern ?? (n.pattern = Sn(n)), w.init(e, n);
731
- }), et = /* @__PURE__ */ u("$ZodISODuration", (e, n) => {
732
- n.pattern ?? (n.pattern = zn), w.init(e, n);
733
- }), nt = /* @__PURE__ */ u("$ZodIPv4", (e, n) => {
734
- n.pattern ?? (n.pattern = wn), w.init(e, n), e._zod.bag.format = "ipv4";
735
- }), tt = /* @__PURE__ */ u("$ZodIPv6", (e, n) => {
736
- n.pattern ?? (n.pattern = $n), w.init(e, n), e._zod.bag.format = "ipv6", e._zod.check = (t) => {
713
+ }), et = /* @__PURE__ */ u("$ZodISODateTime", (e, n) => {
714
+ n.pattern ?? (n.pattern = En(n)), k.init(e, n);
715
+ }), nt = /* @__PURE__ */ u("$ZodISODate", (e, n) => {
716
+ n.pattern ?? (n.pattern = Tn), k.init(e, n);
717
+ }), tt = /* @__PURE__ */ u("$ZodISOTime", (e, n) => {
718
+ n.pattern ?? (n.pattern = Pn(n)), k.init(e, n);
719
+ }), rt = /* @__PURE__ */ u("$ZodISODuration", (e, n) => {
720
+ n.pattern ?? (n.pattern = $n), k.init(e, n);
721
+ }), ot = /* @__PURE__ */ u("$ZodIPv4", (e, n) => {
722
+ n.pattern ?? (n.pattern = Zn), k.init(e, n), e._zod.bag.format = "ipv4";
723
+ }), it = /* @__PURE__ */ u("$ZodIPv6", (e, n) => {
724
+ n.pattern ?? (n.pattern = Sn), k.init(e, n), e._zod.bag.format = "ipv6", e._zod.check = (t) => {
737
725
  try {
738
726
  new URL(`http://[${t.value}]`);
739
727
  } catch {
@@ -746,8 +734,8 @@ const Tn = (e) => {
746
734
  });
747
735
  }
748
736
  };
749
- }), rt = /* @__PURE__ */ u("$ZodCustomStringFormat", (e, n) => {
750
- w.init(e, n), e._zod.check = (t) => {
737
+ }), st = /* @__PURE__ */ u("$ZodCustomStringFormat", (e, n) => {
738
+ k.init(e, n), e._zod.check = (t) => {
751
739
  n.fn(t.value) || t.issues.push({
752
740
  code: "invalid_format",
753
741
  format: n.format,
@@ -756,8 +744,8 @@ const Tn = (e) => {
756
744
  continue: !n.abort
757
745
  });
758
746
  };
759
- }), Ee = /* @__PURE__ */ u("$ZodNumber", (e, n) => {
760
- g.init(e, n), e._zod.pattern = e._zod.bag.pattern ?? En, e._zod.parse = (t, r) => {
747
+ }), xe = /* @__PURE__ */ u("$ZodNumber", (e, n) => {
748
+ y.init(e, n), e._zod.pattern = e._zod.bag.pattern ?? Nn, e._zod.parse = (t, r) => {
761
749
  if (n.coerce)
762
750
  try {
763
751
  t.value = Number(t.value);
@@ -775,10 +763,10 @@ const Tn = (e) => {
775
763
  ...s ? { received: s } : {}
776
764
  }), t;
777
765
  };
778
- }), ot = /* @__PURE__ */ u("$ZodNumberFormat", (e, n) => {
779
- jn.init(e, n), Ee.init(e, n);
780
- }), it = /* @__PURE__ */ u("$ZodBoolean", (e, n) => {
781
- g.init(e, n), e._zod.pattern = An, e._zod.parse = (t, r) => {
766
+ }), ct = /* @__PURE__ */ u("$ZodNumberFormat", (e, n) => {
767
+ xn.init(e, n), xe.init(e, n);
768
+ }), at = /* @__PURE__ */ u("$ZodBoolean", (e, n) => {
769
+ y.init(e, n), e._zod.pattern = Mn, e._zod.parse = (t, r) => {
782
770
  if (n.coerce)
783
771
  try {
784
772
  t.value = !!t.value;
@@ -792,14 +780,14 @@ const Tn = (e) => {
792
780
  inst: e
793
781
  }), t;
794
782
  };
795
- }), st = /* @__PURE__ */ u("$ZodAny", (e, n) => {
796
- g.init(e, n), e._zod.parse = (t) => t;
783
+ }), ut = /* @__PURE__ */ u("$ZodAny", (e, n) => {
784
+ y.init(e, n), e._zod.parse = (t) => t;
797
785
  });
798
- function ue(e, n, t) {
799
- e.issues.length && n.issues.push(...cn(t, e.issues)), n.value[t] = e.value;
786
+ function fe(e, n, t) {
787
+ e.issues.length && n.issues.push(...fn(t, e.issues)), n.value[t] = e.value;
800
788
  }
801
- const ct = /* @__PURE__ */ u("$ZodArray", (e, n) => {
802
- g.init(e, n), e._zod.parse = (t, r) => {
789
+ const De = /* @__PURE__ */ u("$ZodArray", (e, n) => {
790
+ y.init(e, n), e._zod.parse = (t, r) => {
803
791
  const o = t.value;
804
792
  if (!Array.isArray(o))
805
793
  return t.issues.push({
@@ -815,31 +803,31 @@ const ct = /* @__PURE__ */ u("$ZodArray", (e, n) => {
815
803
  value: c,
816
804
  issues: []
817
805
  }, r);
818
- a instanceof Promise ? s.push(a.then((f) => ue(f, t, i))) : ue(a, t, i);
806
+ a instanceof Promise ? s.push(a.then((f) => fe(f, t, i))) : fe(a, t, i);
819
807
  }
820
808
  return s.length ? Promise.all(s).then(() => t) : t;
821
809
  };
822
810
  });
823
- function ae(e, n, t, r) {
811
+ function de(e, n, t, r) {
824
812
  for (const s of e)
825
813
  if (s.issues.length === 0)
826
814
  return n.value = s.value, n;
827
- const o = e.filter((s) => !P(s));
815
+ const o = e.filter((s) => !E(s));
828
816
  return o.length === 1 ? (n.value = o[0].value, o[0]) : (n.issues.push({
829
817
  code: "invalid_union",
830
818
  input: n.value,
831
819
  inst: t,
832
- errors: e.map((s) => s.issues.map((i) => O(i, r, S())))
820
+ errors: e.map((s) => s.issues.map((i) => T(i, r, O())))
833
821
  }), n);
834
822
  }
835
- const ut = /* @__PURE__ */ u("$ZodUnion", (e, n) => {
836
- g.init(e, n), m(e._zod, "optin", () => n.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), m(e._zod, "optout", () => n.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), m(e._zod, "values", () => {
823
+ const ft = /* @__PURE__ */ u("$ZodUnion", (e, n) => {
824
+ y.init(e, n), m(e._zod, "optin", () => n.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), m(e._zod, "optout", () => n.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), m(e._zod, "values", () => {
837
825
  if (n.options.every((o) => o._zod.values))
838
826
  return new Set(n.options.flatMap((o) => Array.from(o._zod.values)));
839
827
  }), m(e._zod, "pattern", () => {
840
828
  if (n.options.every((o) => o._zod.pattern)) {
841
829
  const o = n.options.map((s) => s._zod.pattern);
842
- return new RegExp(`^(${o.map((s) => Q(s.source)).join("|")})$`);
830
+ return new RegExp(`^(${o.map((s) => te(s.source)).join("|")})$`);
843
831
  }
844
832
  });
845
833
  const t = n.options.length === 1, r = n.options[0]._zod.run;
@@ -861,23 +849,23 @@ const ut = /* @__PURE__ */ u("$ZodUnion", (e, n) => {
861
849
  c.push(f);
862
850
  }
863
851
  }
864
- return i ? Promise.all(c).then((a) => ae(a, o, e, s)) : ae(c, o, e, s);
852
+ return i ? Promise.all(c).then((a) => de(a, o, e, s)) : de(c, o, e, s);
865
853
  };
866
- }), at = /* @__PURE__ */ u("$ZodIntersection", (e, n) => {
867
- g.init(e, n), e._zod.parse = (t, r) => {
854
+ }), dt = /* @__PURE__ */ u("$ZodIntersection", (e, n) => {
855
+ y.init(e, n), e._zod.parse = (t, r) => {
868
856
  const o = t.value, s = n.left._zod.run({ value: o, issues: [] }, r), i = n.right._zod.run({ value: o, issues: [] }, r);
869
- return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([a, f]) => fe(t, a, f)) : fe(t, s, i);
857
+ return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([a, f]) => le(t, a, f)) : le(t, s, i);
870
858
  };
871
859
  });
872
- function Y(e, n) {
860
+ function H(e, n) {
873
861
  if (e === n)
874
862
  return { valid: !0, data: e };
875
863
  if (e instanceof Date && n instanceof Date && +e == +n)
876
864
  return { valid: !0, data: e };
877
- if (K(e) && K(n)) {
865
+ if (X(e) && X(n)) {
878
866
  const t = Object.keys(n), r = Object.keys(e).filter((s) => t.indexOf(s) !== -1), o = { ...e, ...n };
879
867
  for (const s of r) {
880
- const i = Y(e[s], n[s]);
868
+ const i = H(e[s], n[s]);
881
869
  if (!i.valid)
882
870
  return {
883
871
  valid: !1,
@@ -892,7 +880,7 @@ function Y(e, n) {
892
880
  return { valid: !1, mergeErrorPath: [] };
893
881
  const t = [];
894
882
  for (let r = 0; r < e.length; r++) {
895
- const o = e[r], s = n[r], i = Y(o, s);
883
+ const o = e[r], s = n[r], i = H(o, s);
896
884
  if (!i.valid)
897
885
  return {
898
886
  valid: !1,
@@ -904,7 +892,7 @@ function Y(e, n) {
904
892
  }
905
893
  return { valid: !1, mergeErrorPath: [] };
906
894
  }
907
- function fe(e, n, t) {
895
+ function le(e, n, t) {
908
896
  const r = /* @__PURE__ */ new Map();
909
897
  let o;
910
898
  for (const c of n.issues)
@@ -921,71 +909,71 @@ function fe(e, n, t) {
921
909
  else
922
910
  e.issues.push(c);
923
911
  const s = [...r].filter(([, c]) => c.l && c.r).map(([c]) => c);
924
- if (s.length && o && e.issues.push({ ...o, keys: s }), P(e))
912
+ if (s.length && o && e.issues.push({ ...o, keys: s }), E(e))
925
913
  return e;
926
- const i = Y(n.value, t.value);
914
+ const i = H(n.value, t.value);
927
915
  if (!i.valid)
928
916
  throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);
929
917
  return e.value = i.data, e;
930
918
  }
931
- const ft = /* @__PURE__ */ u("$ZodTransform", (e, n) => {
932
- g.init(e, n), e._zod.parse = (t, r) => {
919
+ const lt = /* @__PURE__ */ u("$ZodTransform", (e, n) => {
920
+ y.init(e, n), e._zod.parse = (t, r) => {
933
921
  if (r.direction === "backward")
934
- throw new X(e.constructor.name);
922
+ throw new Te(e.constructor.name);
935
923
  const o = n.transform(t.value, t);
936
924
  if (r.async)
937
925
  return (o instanceof Promise ? o : Promise.resolve(o)).then((i) => (t.value = i, t));
938
926
  if (o instanceof Promise)
939
- throw new E();
927
+ throw new A();
940
928
  return t.value = o, t;
941
929
  };
942
930
  });
943
- function le(e, n) {
931
+ function me(e, n) {
944
932
  return e.issues.length && n === void 0 ? { issues: [], value: void 0 } : e;
945
933
  }
946
- const re = /* @__PURE__ */ u("$ZodOptional", (e, n) => {
947
- g.init(e, n), e._zod.optin = "optional", e._zod.optout = "optional", m(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, void 0]) : void 0), m(e._zod, "pattern", () => {
934
+ const se = /* @__PURE__ */ u("$ZodOptional", (e, n) => {
935
+ y.init(e, n), e._zod.optin = "optional", e._zod.optout = "optional", m(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, void 0]) : void 0), m(e._zod, "pattern", () => {
948
936
  const t = n.innerType._zod.pattern;
949
- return t ? new RegExp(`^(${Q(t.source)})?$`) : void 0;
937
+ return t ? new RegExp(`^(${te(t.source)})?$`) : void 0;
950
938
  }), e._zod.parse = (t, r) => {
951
939
  if (n.innerType._zod.optin === "optional") {
952
940
  const o = n.innerType._zod.run(t, r);
953
- return o instanceof Promise ? o.then((s) => le(s, t.value)) : le(o, t.value);
941
+ return o instanceof Promise ? o.then((s) => me(s, t.value)) : me(o, t.value);
954
942
  }
955
943
  return t.value === void 0 ? t : n.innerType._zod.run(t, r);
956
944
  };
957
- }), lt = /* @__PURE__ */ u("$ZodExactOptional", (e, n) => {
958
- re.init(e, n), m(e._zod, "values", () => n.innerType._zod.values), m(e._zod, "pattern", () => n.innerType._zod.pattern), e._zod.parse = (t, r) => n.innerType._zod.run(t, r);
959
- }), dt = /* @__PURE__ */ u("$ZodNullable", (e, n) => {
960
- g.init(e, n), m(e._zod, "optin", () => n.innerType._zod.optin), m(e._zod, "optout", () => n.innerType._zod.optout), m(e._zod, "pattern", () => {
945
+ }), mt = /* @__PURE__ */ u("$ZodExactOptional", (e, n) => {
946
+ se.init(e, n), m(e._zod, "values", () => n.innerType._zod.values), m(e._zod, "pattern", () => n.innerType._zod.pattern), e._zod.parse = (t, r) => n.innerType._zod.run(t, r);
947
+ }), pt = /* @__PURE__ */ u("$ZodNullable", (e, n) => {
948
+ y.init(e, n), m(e._zod, "optin", () => n.innerType._zod.optin), m(e._zod, "optout", () => n.innerType._zod.optout), m(e._zod, "pattern", () => {
961
949
  const t = n.innerType._zod.pattern;
962
- return t ? new RegExp(`^(${Q(t.source)}|null)$`) : void 0;
950
+ return t ? new RegExp(`^(${te(t.source)}|null)$`) : void 0;
963
951
  }), m(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, null]) : void 0), e._zod.parse = (t, r) => t.value === null ? t : n.innerType._zod.run(t, r);
964
- }), pt = /* @__PURE__ */ u("$ZodDefault", (e, n) => {
965
- g.init(e, n), e._zod.optin = "optional", m(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => {
952
+ }), ht = /* @__PURE__ */ u("$ZodDefault", (e, n) => {
953
+ y.init(e, n), e._zod.optin = "optional", m(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => {
966
954
  if (r.direction === "backward")
967
955
  return n.innerType._zod.run(t, r);
968
956
  if (t.value === void 0)
969
957
  return t.value = n.defaultValue, t;
970
958
  const o = n.innerType._zod.run(t, r);
971
- return o instanceof Promise ? o.then((s) => de(s, n)) : de(o, n);
959
+ return o instanceof Promise ? o.then((s) => pe(s, n)) : pe(o, n);
972
960
  };
973
961
  });
974
- function de(e, n) {
962
+ function pe(e, n) {
975
963
  return e.value === void 0 && (e.value = n.defaultValue), e;
976
964
  }
977
- const mt = /* @__PURE__ */ u("$ZodPrefault", (e, n) => {
978
- g.init(e, n), e._zod.optin = "optional", m(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => (r.direction === "backward" || t.value === void 0 && (t.value = n.defaultValue), n.innerType._zod.run(t, r));
979
- }), ht = /* @__PURE__ */ u("$ZodNonOptional", (e, n) => {
980
- g.init(e, n), m(e._zod, "values", () => {
965
+ const gt = /* @__PURE__ */ u("$ZodPrefault", (e, n) => {
966
+ y.init(e, n), e._zod.optin = "optional", m(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => (r.direction === "backward" || t.value === void 0 && (t.value = n.defaultValue), n.innerType._zod.run(t, r));
967
+ }), _t = /* @__PURE__ */ u("$ZodNonOptional", (e, n) => {
968
+ y.init(e, n), m(e._zod, "values", () => {
981
969
  const t = n.innerType._zod.values;
982
970
  return t ? new Set([...t].filter((r) => r !== void 0)) : void 0;
983
971
  }), e._zod.parse = (t, r) => {
984
972
  const o = n.innerType._zod.run(t, r);
985
- return o instanceof Promise ? o.then((s) => pe(s, e)) : pe(o, e);
973
+ return o instanceof Promise ? o.then((s) => he(s, e)) : he(o, e);
986
974
  };
987
975
  });
988
- function pe(e, n) {
976
+ function he(e, n) {
989
977
  return !e.issues.length && e.value === void 0 && e.issues.push({
990
978
  code: "invalid_type",
991
979
  expected: "nonoptional",
@@ -993,65 +981,58 @@ function pe(e, n) {
993
981
  inst: n
994
982
  }), e;
995
983
  }
996
- const _t = /* @__PURE__ */ u("$ZodSuccess", (e, n) => {
997
- g.init(e, n), e._zod.parse = (t, r) => {
998
- if (r.direction === "backward")
999
- throw new X("ZodSuccess");
1000
- const o = n.innerType._zod.run(t, r);
1001
- return o instanceof Promise ? o.then((s) => (t.value = s.issues.length === 0, t)) : (t.value = o.issues.length === 0, t);
1002
- };
1003
- }), gt = /* @__PURE__ */ u("$ZodCatch", (e, n) => {
1004
- g.init(e, n), m(e._zod, "optin", () => n.innerType._zod.optin), m(e._zod, "optout", () => n.innerType._zod.optout), m(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => {
984
+ const yt = /* @__PURE__ */ u("$ZodCatch", (e, n) => {
985
+ y.init(e, n), m(e._zod, "optin", () => n.innerType._zod.optin), m(e._zod, "optout", () => n.innerType._zod.optout), m(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => {
1005
986
  if (r.direction === "backward")
1006
987
  return n.innerType._zod.run(t, r);
1007
988
  const o = n.innerType._zod.run(t, r);
1008
989
  return o instanceof Promise ? o.then((s) => (t.value = s.value, s.issues.length && (t.value = n.catchValue({
1009
990
  ...t,
1010
991
  error: {
1011
- issues: s.issues.map((i) => O(i, r, S()))
992
+ issues: s.issues.map((i) => T(i, r, O()))
1012
993
  },
1013
994
  input: t.value
1014
995
  }), t.issues = []), t)) : (t.value = o.value, o.issues.length && (t.value = n.catchValue({
1015
996
  ...t,
1016
997
  error: {
1017
- issues: o.issues.map((s) => O(s, r, S()))
998
+ issues: o.issues.map((s) => T(s, r, O()))
1018
999
  },
1019
1000
  input: t.value
1020
1001
  }), t.issues = []), t);
1021
1002
  };
1022
1003
  }), vt = /* @__PURE__ */ u("$ZodPipe", (e, n) => {
1023
- g.init(e, n), m(e._zod, "values", () => n.in._zod.values), m(e._zod, "optin", () => n.in._zod.optin), m(e._zod, "optout", () => n.out._zod.optout), m(e._zod, "propValues", () => n.in._zod.propValues), e._zod.parse = (t, r) => {
1004
+ y.init(e, n), m(e._zod, "values", () => n.in._zod.values), m(e._zod, "optin", () => n.in._zod.optin), m(e._zod, "optout", () => n.out._zod.optout), m(e._zod, "propValues", () => n.in._zod.propValues), e._zod.parse = (t, r) => {
1024
1005
  if (r.direction === "backward") {
1025
1006
  const s = n.out._zod.run(t, r);
1026
- return s instanceof Promise ? s.then((i) => F(i, n.in, r)) : F(s, n.in, r);
1007
+ return s instanceof Promise ? s.then((i) => D(i, n.in, r)) : D(s, n.in, r);
1027
1008
  }
1028
1009
  const o = n.in._zod.run(t, r);
1029
- return o instanceof Promise ? o.then((s) => F(s, n.out, r)) : F(o, n.out, r);
1010
+ return o instanceof Promise ? o.then((s) => D(s, n.out, r)) : D(o, n.out, r);
1030
1011
  };
1031
1012
  });
1032
- function F(e, n, t) {
1013
+ function D(e, n, t) {
1033
1014
  return e.issues.length ? (e.aborted = !0, e) : n._zod.run({ value: e.value, issues: e.issues }, t);
1034
1015
  }
1035
- const yt = /* @__PURE__ */ u("$ZodReadonly", (e, n) => {
1036
- g.init(e, n), m(e._zod, "propValues", () => n.innerType._zod.propValues), m(e._zod, "values", () => n.innerType._zod.values), m(e._zod, "optin", () => n.innerType?._zod?.optin), m(e._zod, "optout", () => n.innerType?._zod?.optout), e._zod.parse = (t, r) => {
1016
+ const zt = /* @__PURE__ */ u("$ZodReadonly", (e, n) => {
1017
+ y.init(e, n), m(e._zod, "propValues", () => n.innerType._zod.propValues), m(e._zod, "values", () => n.innerType._zod.values), m(e._zod, "optin", () => n.innerType?._zod?.optin), m(e._zod, "optout", () => n.innerType?._zod?.optout), e._zod.parse = (t, r) => {
1037
1018
  if (r.direction === "backward")
1038
1019
  return n.innerType._zod.run(t, r);
1039
1020
  const o = n.innerType._zod.run(t, r);
1040
- return o instanceof Promise ? o.then(me) : me(o);
1021
+ return o instanceof Promise ? o.then(ge) : ge(o);
1041
1022
  };
1042
1023
  });
1043
- function me(e) {
1024
+ function ge(e) {
1044
1025
  return e.value = Object.freeze(e.value), e;
1045
1026
  }
1046
- const Ae = /* @__PURE__ */ u("$ZodCustom", (e, n) => {
1047
- b.init(e, n), g.init(e, n), e._zod.parse = (t, r) => t, e._zod.check = (t) => {
1027
+ const Le = /* @__PURE__ */ u("$ZodCustom", (e, n) => {
1028
+ $.init(e, n), y.init(e, n), e._zod.parse = (t, r) => t, e._zod.check = (t) => {
1048
1029
  const r = t.value, o = n.fn(r);
1049
1030
  if (o instanceof Promise)
1050
- return o.then((s) => he(s, t, r, e));
1051
- he(o, t, r, e);
1031
+ return o.then((s) => _e(s, t, r, e));
1032
+ _e(o, t, r, e);
1052
1033
  };
1053
1034
  });
1054
- function he(e, n, t, r) {
1035
+ function _e(e, n, t, r) {
1055
1036
  if (!e) {
1056
1037
  const o = {
1057
1038
  code: "custom",
@@ -1063,11 +1044,11 @@ function he(e, n, t, r) {
1063
1044
  continue: !r._zod.def.abort
1064
1045
  // params: inst._zod.def.params,
1065
1046
  };
1066
- r._zod.def.params && (o.params = r._zod.def.params), n.issues.push(R(o));
1047
+ r._zod.def.params && (o.params = r._zod.def.params), n.issues.push(j(o));
1067
1048
  }
1068
1049
  }
1069
- var _e;
1070
- class zt {
1050
+ var ye;
1051
+ class bt {
1071
1052
  constructor() {
1072
1053
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
1073
1054
  }
@@ -1096,26 +1077,26 @@ class zt {
1096
1077
  return this._map.has(n);
1097
1078
  }
1098
1079
  }
1099
- function bt() {
1100
- return new zt();
1080
+ function wt() {
1081
+ return new bt();
1101
1082
  }
1102
- (_e = globalThis).__zod_globalRegistry ?? (_e.__zod_globalRegistry = bt());
1103
- const C = globalThis.__zod_globalRegistry;
1083
+ (ye = globalThis).__zod_globalRegistry ?? (ye.__zod_globalRegistry = wt());
1084
+ const R = globalThis.__zod_globalRegistry;
1104
1085
  // @__NO_SIDE_EFFECTS__
1105
- function wt(e, n) {
1086
+ function $t(e, n) {
1106
1087
  return new e({
1107
1088
  type: "string",
1108
- ...d(n)
1089
+ ...l(n)
1109
1090
  });
1110
1091
  }
1111
1092
  // @__NO_SIDE_EFFECTS__
1112
- function $t(e, n) {
1093
+ function kt(e, n) {
1113
1094
  return new e({
1114
1095
  type: "string",
1115
1096
  format: "email",
1116
1097
  check: "string_format",
1117
1098
  abort: !1,
1118
- ...d(n)
1099
+ ...l(n)
1119
1100
  });
1120
1101
  }
1121
1102
  // @__NO_SIDE_EFFECTS__
@@ -1125,41 +1106,41 @@ function Zt(e, n) {
1125
1106
  format: "uuid",
1126
1107
  check: "string_format",
1127
1108
  abort: !1,
1128
- ...d(n)
1109
+ ...l(n)
1129
1110
  });
1130
1111
  }
1131
1112
  // @__NO_SIDE_EFFECTS__
1132
- function kt(e, n) {
1113
+ function St(e, n) {
1133
1114
  return new e({
1134
1115
  type: "string",
1135
1116
  format: "url",
1136
1117
  check: "string_format",
1137
1118
  abort: !1,
1138
- ...d(n)
1119
+ ...l(n)
1139
1120
  });
1140
1121
  }
1141
1122
  // @__NO_SIDE_EFFECTS__
1142
- function St(e, n) {
1123
+ function Ot(e, n) {
1143
1124
  return new e({
1144
1125
  type: "string",
1145
1126
  format: "ipv4",
1146
1127
  check: "string_format",
1147
1128
  abort: !1,
1148
- ...d(n)
1129
+ ...l(n)
1149
1130
  });
1150
1131
  }
1151
1132
  // @__NO_SIDE_EFFECTS__
1152
- function Ot(e, n) {
1133
+ function Tt(e, n) {
1153
1134
  return new e({
1154
1135
  type: "string",
1155
1136
  format: "ipv6",
1156
1137
  check: "string_format",
1157
1138
  abort: !1,
1158
- ...d(n)
1139
+ ...l(n)
1159
1140
  });
1160
1141
  }
1161
1142
  // @__NO_SIDE_EFFECTS__
1162
- function Tt(e, n) {
1143
+ function Pt(e, n) {
1163
1144
  return new e({
1164
1145
  type: "string",
1165
1146
  format: "datetime",
@@ -1167,35 +1148,35 @@ function Tt(e, n) {
1167
1148
  offset: !1,
1168
1149
  local: !1,
1169
1150
  precision: null,
1170
- ...d(n)
1151
+ ...l(n)
1171
1152
  });
1172
1153
  }
1173
1154
  // @__NO_SIDE_EFFECTS__
1174
- function Pt(e, n) {
1155
+ function Et(e, n) {
1175
1156
  return new e({
1176
1157
  type: "string",
1177
1158
  format: "date",
1178
1159
  check: "string_format",
1179
- ...d(n)
1160
+ ...l(n)
1180
1161
  });
1181
1162
  }
1182
1163
  // @__NO_SIDE_EFFECTS__
1183
- function Et(e, n) {
1164
+ function At(e, n) {
1184
1165
  return new e({
1185
1166
  type: "string",
1186
1167
  format: "time",
1187
1168
  check: "string_format",
1188
1169
  precision: null,
1189
- ...d(n)
1170
+ ...l(n)
1190
1171
  });
1191
1172
  }
1192
1173
  // @__NO_SIDE_EFFECTS__
1193
- function At(e, n) {
1174
+ function It(e, n) {
1194
1175
  return new e({
1195
1176
  type: "string",
1196
1177
  format: "duration",
1197
1178
  check: "string_format",
1198
- ...d(n)
1179
+ ...l(n)
1199
1180
  });
1200
1181
  }
1201
1182
  // @__NO_SIDE_EFFECTS__
@@ -1203,24 +1184,24 @@ function Nt(e, n) {
1203
1184
  return new e({
1204
1185
  type: "number",
1205
1186
  checks: [],
1206
- ...d(n)
1187
+ ...l(n)
1207
1188
  });
1208
1189
  }
1209
1190
  // @__NO_SIDE_EFFECTS__
1210
- function It(e, n) {
1191
+ function Mt(e, n) {
1211
1192
  return new e({
1212
1193
  type: "number",
1213
1194
  check: "number_format",
1214
1195
  abort: !1,
1215
1196
  format: "safeint",
1216
- ...d(n)
1197
+ ...l(n)
1217
1198
  });
1218
1199
  }
1219
1200
  // @__NO_SIDE_EFFECTS__
1220
1201
  function Ct(e, n) {
1221
1202
  return new e({
1222
1203
  type: "boolean",
1223
- ...d(n)
1204
+ ...l(n)
1224
1205
  });
1225
1206
  }
1226
1207
  // @__NO_SIDE_EFFECTS__
@@ -1231,169 +1212,169 @@ function Rt(e) {
1231
1212
  }
1232
1213
  // @__NO_SIDE_EFFECTS__
1233
1214
  function jt(e, n) {
1234
- return new Cn({
1215
+ return new jn({
1235
1216
  check: "less_than",
1236
- ...d(n),
1217
+ ...l(n),
1237
1218
  value: e,
1238
1219
  inclusive: !0
1239
1220
  });
1240
1221
  }
1241
1222
  // @__NO_SIDE_EFFECTS__
1242
- function Mt(e, n) {
1243
- return new Rn({
1223
+ function Ft(e, n) {
1224
+ return new Fn({
1244
1225
  check: "greater_than",
1245
- ...d(n),
1226
+ ...l(n),
1246
1227
  value: e,
1247
1228
  inclusive: !0
1248
1229
  });
1249
1230
  }
1250
1231
  // @__NO_SIDE_EFFECTS__
1251
- function oe(e, n) {
1252
- return new Mn({
1232
+ function B(e, n) {
1233
+ return new Dn({
1253
1234
  check: "max_length",
1254
- ...d(n),
1235
+ ...l(n),
1255
1236
  maximum: e
1256
1237
  });
1257
1238
  }
1258
1239
  // @__NO_SIDE_EFFECTS__
1259
- function j(e, n) {
1260
- return new Fn({
1240
+ function I(e, n) {
1241
+ return new Ln({
1261
1242
  check: "min_length",
1262
- ...d(n),
1243
+ ...l(n),
1263
1244
  minimum: e
1264
1245
  });
1265
1246
  }
1266
1247
  // @__NO_SIDE_EFFECTS__
1267
- function Ne(e, n) {
1268
- return new Dn({
1248
+ function Je(e, n) {
1249
+ return new Jn({
1269
1250
  check: "length_equals",
1270
- ...d(n),
1251
+ ...l(n),
1271
1252
  length: e
1272
1253
  });
1273
1254
  }
1274
1255
  // @__NO_SIDE_EFFECTS__
1275
- function Ie(e, n) {
1276
- return new Ln({
1256
+ function Ue(e, n) {
1257
+ return new Un({
1277
1258
  check: "string_format",
1278
1259
  format: "regex",
1279
- ...d(n),
1260
+ ...l(n),
1280
1261
  pattern: e
1281
1262
  });
1282
1263
  }
1283
1264
  // @__NO_SIDE_EFFECTS__
1284
- function Ft(e) {
1285
- return new xn({
1265
+ function xt(e) {
1266
+ return new Vn({
1286
1267
  check: "string_format",
1287
1268
  format: "lowercase",
1288
- ...d(e)
1269
+ ...l(e)
1289
1270
  });
1290
1271
  }
1291
1272
  // @__NO_SIDE_EFFECTS__
1292
1273
  function Dt(e) {
1293
- return new Jn({
1274
+ return new Wn({
1294
1275
  check: "string_format",
1295
1276
  format: "uppercase",
1296
- ...d(e)
1277
+ ...l(e)
1297
1278
  });
1298
1279
  }
1299
1280
  // @__NO_SIDE_EFFECTS__
1300
1281
  function Lt(e, n) {
1301
- return new Un({
1282
+ return new Gn({
1302
1283
  check: "string_format",
1303
1284
  format: "includes",
1304
- ...d(n),
1285
+ ...l(n),
1305
1286
  includes: e
1306
1287
  });
1307
1288
  }
1308
1289
  // @__NO_SIDE_EFFECTS__
1309
- function xt(e, n) {
1310
- return new Vn({
1290
+ function Jt(e, n) {
1291
+ return new qn({
1311
1292
  check: "string_format",
1312
1293
  format: "starts_with",
1313
- ...d(n),
1294
+ ...l(n),
1314
1295
  prefix: e
1315
1296
  });
1316
1297
  }
1317
1298
  // @__NO_SIDE_EFFECTS__
1318
- function Jt(e, n) {
1319
- return new Wn({
1299
+ function Ut(e, n) {
1300
+ return new Bn({
1320
1301
  check: "string_format",
1321
1302
  format: "ends_with",
1322
- ...d(n),
1303
+ ...l(n),
1323
1304
  suffix: e
1324
1305
  });
1325
1306
  }
1326
1307
  // @__NO_SIDE_EFFECTS__
1327
- function A(e) {
1328
- return new Bn({
1308
+ function N(e) {
1309
+ return new Kn({
1329
1310
  check: "overwrite",
1330
1311
  tx: e
1331
1312
  });
1332
1313
  }
1333
1314
  // @__NO_SIDE_EFFECTS__
1334
- function Ut(e) {
1335
- return /* @__PURE__ */ A((n) => n.normalize(e));
1315
+ function Vt(e) {
1316
+ return /* @__PURE__ */ N((n) => n.normalize(e));
1336
1317
  }
1337
1318
  // @__NO_SIDE_EFFECTS__
1338
- function Vt() {
1339
- return /* @__PURE__ */ A((e) => e.trim());
1319
+ function Wt() {
1320
+ return /* @__PURE__ */ N((e) => e.trim());
1340
1321
  }
1341
1322
  // @__NO_SIDE_EFFECTS__
1342
- function Wt() {
1343
- return /* @__PURE__ */ A((e) => e.toLowerCase());
1323
+ function Gt() {
1324
+ return /* @__PURE__ */ N((e) => e.toLowerCase());
1344
1325
  }
1345
1326
  // @__NO_SIDE_EFFECTS__
1346
- function Bt() {
1347
- return /* @__PURE__ */ A((e) => e.toUpperCase());
1327
+ function qt() {
1328
+ return /* @__PURE__ */ N((e) => e.toUpperCase());
1348
1329
  }
1349
1330
  // @__NO_SIDE_EFFECTS__
1350
- function Gt() {
1351
- return /* @__PURE__ */ A((e) => on(e));
1331
+ function Bt() {
1332
+ return /* @__PURE__ */ N((e) => an(e));
1352
1333
  }
1353
1334
  // @__NO_SIDE_EFFECTS__
1354
- function qt(e, n, t) {
1335
+ function Kt(e, n, t) {
1355
1336
  return new e({
1356
1337
  type: "array",
1357
1338
  element: n,
1358
1339
  // get element() {
1359
1340
  // return element;
1360
1341
  // },
1361
- ...d(t)
1342
+ ...l(t)
1362
1343
  });
1363
1344
  }
1364
1345
  // @__NO_SIDE_EFFECTS__
1365
- function Ce(e, n, t) {
1346
+ function Ve(e, n, t) {
1366
1347
  return new e({
1367
1348
  type: "custom",
1368
1349
  check: "custom",
1369
1350
  fn: n,
1370
- ...d(t)
1351
+ ...l(t)
1371
1352
  });
1372
1353
  }
1373
1354
  // @__NO_SIDE_EFFECTS__
1374
- function Re(e) {
1375
- const n = /* @__PURE__ */ Kt((t) => (t.addIssue = (r) => {
1355
+ function We(e) {
1356
+ const n = /* @__PURE__ */ Yt((t) => (t.addIssue = (r) => {
1376
1357
  if (typeof r == "string")
1377
- t.issues.push(R(r, t.value, n._zod.def));
1358
+ t.issues.push(j(r, t.value, n._zod.def));
1378
1359
  else {
1379
1360
  const o = r;
1380
- o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = t.value), o.inst ?? (o.inst = n), o.continue ?? (o.continue = !n._zod.def.abort), t.issues.push(R(o));
1361
+ o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = t.value), o.inst ?? (o.inst = n), o.continue ?? (o.continue = !n._zod.def.abort), t.issues.push(j(o));
1381
1362
  }
1382
1363
  }, e(t.value, t)));
1383
1364
  return n;
1384
1365
  }
1385
1366
  // @__NO_SIDE_EFFECTS__
1386
- function Kt(e, n) {
1387
- const t = new b({
1367
+ function Yt(e, n) {
1368
+ const t = new $({
1388
1369
  check: "custom",
1389
- ...d(n)
1370
+ ...l(n)
1390
1371
  });
1391
1372
  return t._zod.check = e, t;
1392
1373
  }
1393
1374
  // @__NO_SIDE_EFFECTS__
1394
- function Yt(e, n, t, r = {}) {
1395
- const o = d(r), s = {
1396
- ...d(r),
1375
+ function Xt(e, n, t, r = {}) {
1376
+ const o = l(r), s = {
1377
+ ...l(r),
1397
1378
  check: "string_format",
1398
1379
  type: "string",
1399
1380
  format: n,
@@ -1402,11 +1383,11 @@ function Yt(e, n, t, r = {}) {
1402
1383
  };
1403
1384
  return t instanceof RegExp && (s.pattern = t), new e(s);
1404
1385
  }
1405
- function je(e) {
1386
+ function Ge(e) {
1406
1387
  let n = e?.target ?? "draft-2020-12";
1407
1388
  return n === "draft-4" && (n = "draft-04"), n === "draft-7" && (n = "draft-07"), {
1408
1389
  processors: e.processors ?? {},
1409
- metadataRegistry: e?.metadata ?? C,
1390
+ metadataRegistry: e?.metadata ?? R,
1410
1391
  target: n,
1411
1392
  unrepresentable: e?.unrepresentable ?? "throw",
1412
1393
  override: e?.override ?? (() => {
@@ -1419,7 +1400,7 @@ function je(e) {
1419
1400
  external: e?.external ?? void 0
1420
1401
  };
1421
1402
  }
1422
- function y(e, n, t = { path: [], schemaPath: [] }) {
1403
+ function b(e, n, t = { path: [], schemaPath: [] }) {
1423
1404
  var r;
1424
1405
  const o = e._zod.def, s = n.seen.get(e);
1425
1406
  if (s)
@@ -1430,26 +1411,26 @@ function y(e, n, t = { path: [], schemaPath: [] }) {
1430
1411
  if (c)
1431
1412
  i.schema = c;
1432
1413
  else {
1433
- const l = {
1414
+ const d = {
1434
1415
  ...t,
1435
1416
  schemaPath: [...t.schemaPath, e],
1436
1417
  path: t.path
1437
1418
  };
1438
1419
  if (e._zod.processJSONSchema)
1439
- e._zod.processJSONSchema(n, i.schema, l);
1420
+ e._zod.processJSONSchema(n, i.schema, d);
1440
1421
  else {
1441
- const h = i.schema, _ = n.processors[o.type];
1442
- if (!_)
1422
+ const h = i.schema, g = n.processors[o.type];
1423
+ if (!g)
1443
1424
  throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);
1444
- _(e, n, h, l);
1425
+ g(e, n, h, d);
1445
1426
  }
1446
1427
  const p = e._zod.parent;
1447
- p && (i.ref || (i.ref = p), y(p, n, l), n.seen.get(p).isParent = !0);
1428
+ p && (i.ref || (i.ref = p), b(p, n, d), n.seen.get(p).isParent = !0);
1448
1429
  }
1449
1430
  const a = n.metadataRegistry.get(e);
1450
- return a && Object.assign(i.schema, a), n.io === "input" && v(e) && (delete i.schema.examples, delete i.schema.default), n.io === "input" && i.schema._prefault && ((r = i.schema).default ?? (r.default = i.schema._prefault)), delete i.schema._prefault, n.seen.get(e).schema;
1431
+ return a && Object.assign(i.schema, a), n.io === "input" && z(e) && (delete i.schema.examples, delete i.schema.default), n.io === "input" && i.schema._prefault && ((r = i.schema).default ?? (r.default = i.schema._prefault)), delete i.schema._prefault, n.seen.get(e).schema;
1451
1432
  }
1452
- function Me(e, n) {
1433
+ function qe(e, n) {
1453
1434
  const t = e.seen.get(n);
1454
1435
  if (!t)
1455
1436
  throw new Error("Unprocessed schema. This is a bug in Zod.");
@@ -1466,25 +1447,25 @@ function Me(e, n) {
1466
1447
  const o = (i) => {
1467
1448
  const c = e.target === "draft-2020-12" ? "$defs" : "definitions";
1468
1449
  if (e.external) {
1469
- const p = e.external.registry.get(i[0])?.id, h = e.external.uri ?? ((I) => I);
1450
+ const p = e.external.registry.get(i[0])?.id, h = e.external.uri ?? ((C) => C);
1470
1451
  if (p)
1471
1452
  return { ref: h(p) };
1472
- const _ = i[1].defId ?? i[1].schema.id ?? `schema${e.counter++}`;
1473
- return i[1].defId = _, { defId: _, ref: `${h("__shared")}#/${c}/${_}` };
1453
+ const g = i[1].defId ?? i[1].schema.id ?? `schema${e.counter++}`;
1454
+ return i[1].defId = g, { defId: g, ref: `${h("__shared")}#/${c}/${g}` };
1474
1455
  }
1475
1456
  if (i[1] === t)
1476
1457
  return { ref: "#" };
1477
- const f = `#/${c}/`, l = i[1].schema.id ?? `__schema${e.counter++}`;
1478
- return { defId: l, ref: f + l };
1458
+ const f = `#/${c}/`, d = i[1].schema.id ?? `__schema${e.counter++}`;
1459
+ return { defId: d, ref: f + d };
1479
1460
  }, s = (i) => {
1480
1461
  if (i[1].schema.$ref)
1481
1462
  return;
1482
1463
  const c = i[1], { ref: a, defId: f } = o(i);
1483
1464
  c.def = { ...c.schema }, f && (c.defId = f);
1484
- const l = c.schema;
1485
- for (const p in l)
1486
- delete l[p];
1487
- l.$ref = a;
1465
+ const d = c.schema;
1466
+ for (const p in d)
1467
+ delete d[p];
1468
+ d.$ref = a;
1488
1469
  };
1489
1470
  if (e.cycles === "throw")
1490
1471
  for (const i of e.seen.entries()) {
@@ -1521,7 +1502,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1521
1502
  }
1522
1503
  }
1523
1504
  }
1524
- function Fe(e, n) {
1505
+ function Be(e, n) {
1525
1506
  const t = e.seen.get(n);
1526
1507
  if (!t)
1527
1508
  throw new Error("Unprocessed schema. This is a bug in Zod.");
@@ -1529,24 +1510,24 @@ function Fe(e, n) {
1529
1510
  const c = e.seen.get(i);
1530
1511
  if (c.ref === null)
1531
1512
  return;
1532
- const a = c.def ?? c.schema, f = { ...a }, l = c.ref;
1533
- if (c.ref = null, l) {
1534
- r(l);
1535
- const h = e.seen.get(l), _ = h.schema;
1536
- if (_.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (a.allOf = a.allOf ?? [], a.allOf.push(_)) : Object.assign(a, _), Object.assign(a, f), i._zod.parent === l)
1537
- for (const Z in a)
1538
- Z === "$ref" || Z === "allOf" || Z in f || delete a[Z];
1539
- if (_.$ref && h.def)
1540
- for (const Z in a)
1541
- Z === "$ref" || Z === "allOf" || Z in h.def && JSON.stringify(a[Z]) === JSON.stringify(h.def[Z]) && delete a[Z];
1513
+ const a = c.def ?? c.schema, f = { ...a }, d = c.ref;
1514
+ if (c.ref = null, d) {
1515
+ r(d);
1516
+ const h = e.seen.get(d), g = h.schema;
1517
+ if (g.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (a.allOf = a.allOf ?? [], a.allOf.push(g)) : Object.assign(a, g), Object.assign(a, f), i._zod.parent === d)
1518
+ for (const S in a)
1519
+ S === "$ref" || S === "allOf" || S in f || delete a[S];
1520
+ if (g.$ref && h.def)
1521
+ for (const S in a)
1522
+ S === "$ref" || S === "allOf" || S in h.def && JSON.stringify(a[S]) === JSON.stringify(h.def[S]) && delete a[S];
1542
1523
  }
1543
1524
  const p = i._zod.parent;
1544
- if (p && p !== l) {
1525
+ if (p && p !== d) {
1545
1526
  r(p);
1546
1527
  const h = e.seen.get(p);
1547
1528
  if (h?.schema.$ref && (a.$ref = h.schema.$ref, h.def))
1548
- for (const _ in a)
1549
- _ === "$ref" || _ === "allOf" || _ in h.def && JSON.stringify(a[_]) === JSON.stringify(h.def[_]) && delete a[_];
1529
+ for (const g in a)
1530
+ g === "$ref" || g === "allOf" || g in h.def && JSON.stringify(a[g]) === JSON.stringify(h.def[g]) && delete a[g];
1550
1531
  }
1551
1532
  e.override({
1552
1533
  zodSchema: i,
@@ -1576,8 +1557,8 @@ function Fe(e, n) {
1576
1557
  value: {
1577
1558
  ...n["~standard"],
1578
1559
  jsonSchema: {
1579
- input: D(n, "input", e.processors),
1580
- output: D(n, "output", e.processors)
1560
+ input: L(n, "input", e.processors),
1561
+ output: L(n, "output", e.processors)
1581
1562
  }
1582
1563
  },
1583
1564
  enumerable: !1,
@@ -1587,7 +1568,7 @@ function Fe(e, n) {
1587
1568
  throw new Error("Error converting schema to JSON.");
1588
1569
  }
1589
1570
  }
1590
- function v(e, n) {
1571
+ function z(e, n) {
1591
1572
  const t = n ?? { seen: /* @__PURE__ */ new Set() };
1592
1573
  if (t.seen.has(e))
1593
1574
  return !1;
@@ -1596,85 +1577,85 @@ function v(e, n) {
1596
1577
  if (r.type === "transform")
1597
1578
  return !0;
1598
1579
  if (r.type === "array")
1599
- return v(r.element, t);
1580
+ return z(r.element, t);
1600
1581
  if (r.type === "set")
1601
- return v(r.valueType, t);
1582
+ return z(r.valueType, t);
1602
1583
  if (r.type === "lazy")
1603
- return v(r.getter(), t);
1584
+ return z(r.getter(), t);
1604
1585
  if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault")
1605
- return v(r.innerType, t);
1586
+ return z(r.innerType, t);
1606
1587
  if (r.type === "intersection")
1607
- return v(r.left, t) || v(r.right, t);
1588
+ return z(r.left, t) || z(r.right, t);
1608
1589
  if (r.type === "record" || r.type === "map")
1609
- return v(r.keyType, t) || v(r.valueType, t);
1590
+ return z(r.keyType, t) || z(r.valueType, t);
1610
1591
  if (r.type === "pipe")
1611
- return v(r.in, t) || v(r.out, t);
1592
+ return z(r.in, t) || z(r.out, t);
1612
1593
  if (r.type === "object") {
1613
1594
  for (const o in r.shape)
1614
- if (v(r.shape[o], t))
1595
+ if (z(r.shape[o], t))
1615
1596
  return !0;
1616
1597
  return !1;
1617
1598
  }
1618
1599
  if (r.type === "union") {
1619
1600
  for (const o of r.options)
1620
- if (v(o, t))
1601
+ if (z(o, t))
1621
1602
  return !0;
1622
1603
  return !1;
1623
1604
  }
1624
1605
  if (r.type === "tuple") {
1625
1606
  for (const o of r.items)
1626
- if (v(o, t))
1607
+ if (z(o, t))
1627
1608
  return !0;
1628
- return !!(r.rest && v(r.rest, t));
1609
+ return !!(r.rest && z(r.rest, t));
1629
1610
  }
1630
1611
  return !1;
1631
1612
  }
1632
- const Xt = (e, n = {}) => (t) => {
1633
- const r = je({ ...t, processors: n });
1634
- return y(e, r), Me(r, e), Fe(r, e);
1635
- }, D = (e, n, t = {}) => (r) => {
1636
- const { libraryOptions: o, target: s } = r ?? {}, i = je({ ...o ?? {}, target: s, io: n, processors: t });
1637
- return y(e, i), Me(i, e), Fe(i, e);
1638
- }, Ht = {
1613
+ const Ht = (e, n = {}) => (t) => {
1614
+ const r = Ge({ ...t, processors: n });
1615
+ return b(e, r), qe(r, e), Be(r, e);
1616
+ }, L = (e, n, t = {}) => (r) => {
1617
+ const { libraryOptions: o, target: s } = r ?? {}, i = Ge({ ...o ?? {}, target: s, io: n, processors: t });
1618
+ return b(e, i), qe(i, e), Be(i, e);
1619
+ }, Qt = {
1639
1620
  guid: "uuid",
1640
1621
  url: "uri",
1641
1622
  datetime: "date-time",
1642
1623
  json_string: "json-string",
1643
1624
  regex: ""
1644
1625
  // do not set
1645
- }, Qt = (e, n, t, r) => {
1626
+ }, er = (e, n, t, r) => {
1646
1627
  const o = t;
1647
1628
  o.type = "string";
1648
1629
  const { minimum: s, maximum: i, format: c, patterns: a, contentEncoding: f } = e._zod.bag;
1649
- if (typeof s == "number" && (o.minLength = s), typeof i == "number" && (o.maxLength = i), c && (o.format = Ht[c] ?? c, o.format === "" && delete o.format, c === "time" && delete o.format), f && (o.contentEncoding = f), a && a.size > 0) {
1650
- const l = [...a];
1651
- l.length === 1 ? o.pattern = l[0].source : l.length > 1 && (o.allOf = [
1652
- ...l.map((p) => ({
1630
+ if (typeof s == "number" && (o.minLength = s), typeof i == "number" && (o.maxLength = i), c && (o.format = Qt[c] ?? c, o.format === "" && delete o.format, c === "time" && delete o.format), f && (o.contentEncoding = f), a && a.size > 0) {
1631
+ const d = [...a];
1632
+ d.length === 1 ? o.pattern = d[0].source : d.length > 1 && (o.allOf = [
1633
+ ...d.map((p) => ({
1653
1634
  ...n.target === "draft-07" || n.target === "draft-04" || n.target === "openapi-3.0" ? { type: "string" } : {},
1654
1635
  pattern: p.source
1655
1636
  }))
1656
1637
  ]);
1657
1638
  }
1658
- }, er = (e, n, t, r) => {
1639
+ }, nr = (e, n, t, r) => {
1659
1640
  if (n.unrepresentable === "throw")
1660
1641
  throw new Error("Custom types cannot be represented in JSON Schema");
1661
- }, nr = (e, n, t, r) => {
1642
+ }, tr = (e, n, t, r) => {
1662
1643
  if (n.unrepresentable === "throw")
1663
1644
  throw new Error("Transforms cannot be represented in JSON Schema");
1664
- }, tr = (e, n, t, r) => {
1665
- const o = t, s = e._zod.def, { minimum: i, maximum: c } = e._zod.bag;
1666
- typeof i == "number" && (o.minItems = i), typeof c == "number" && (o.maxItems = c), o.type = "array", o.items = y(s.element, n, { ...r, path: [...r.path, "items"] });
1667
1645
  }, rr = (e, n, t, r) => {
1668
- const o = e._zod.def, s = o.inclusive === !1, i = o.options.map((c, a) => y(c, n, {
1646
+ const o = t, s = e._zod.def, { minimum: i, maximum: c } = e._zod.bag;
1647
+ typeof i == "number" && (o.minItems = i), typeof c == "number" && (o.maxItems = c), o.type = "array", o.items = b(s.element, n, { ...r, path: [...r.path, "items"] });
1648
+ }, or = (e, n, t, r) => {
1649
+ const o = e._zod.def, s = o.inclusive === !1, i = o.options.map((c, a) => b(c, n, {
1669
1650
  ...r,
1670
1651
  path: [...r.path, s ? "oneOf" : "anyOf", a]
1671
1652
  }));
1672
1653
  s ? t.oneOf = i : t.anyOf = i;
1673
- }, or = (e, n, t, r) => {
1674
- const o = e._zod.def, s = y(o.left, n, {
1654
+ }, ir = (e, n, t, r) => {
1655
+ const o = e._zod.def, s = b(o.left, n, {
1675
1656
  ...r,
1676
1657
  path: [...r.path, "allOf", 0]
1677
- }), i = y(o.right, n, {
1658
+ }), i = b(o.right, n, {
1678
1659
  ...r,
1679
1660
  path: [...r.path, "allOf", 1]
1680
1661
  }), c = (f) => "allOf" in f && Object.keys(f).length === 1, a = [
@@ -1682,27 +1663,27 @@ const Xt = (e, n = {}) => (t) => {
1682
1663
  ...c(i) ? i.allOf : [i]
1683
1664
  ];
1684
1665
  t.allOf = a;
1685
- }, ir = (e, n, t, r) => {
1686
- const o = e._zod.def, s = y(o.innerType, n, r), i = n.seen.get(e);
1687
- n.target === "openapi-3.0" ? (i.ref = o.innerType, t.nullable = !0) : t.anyOf = [s, { type: "null" }];
1688
1666
  }, sr = (e, n, t, r) => {
1667
+ const o = e._zod.def, s = b(o.innerType, n, r), i = n.seen.get(e);
1668
+ n.target === "openapi-3.0" ? (i.ref = o.innerType, t.nullable = !0) : t.anyOf = [s, { type: "null" }];
1669
+ }, cr = (e, n, t, r) => {
1689
1670
  const o = e._zod.def;
1690
- y(o.innerType, n, r);
1671
+ b(o.innerType, n, r);
1691
1672
  const s = n.seen.get(e);
1692
1673
  s.ref = o.innerType;
1693
- }, cr = (e, n, t, r) => {
1674
+ }, ar = (e, n, t, r) => {
1694
1675
  const o = e._zod.def;
1695
- y(o.innerType, n, r);
1676
+ b(o.innerType, n, r);
1696
1677
  const s = n.seen.get(e);
1697
1678
  s.ref = o.innerType, t.default = JSON.parse(JSON.stringify(o.defaultValue));
1698
1679
  }, ur = (e, n, t, r) => {
1699
1680
  const o = e._zod.def;
1700
- y(o.innerType, n, r);
1681
+ b(o.innerType, n, r);
1701
1682
  const s = n.seen.get(e);
1702
1683
  s.ref = o.innerType, n.io === "input" && (t._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
1703
- }, ar = (e, n, t, r) => {
1684
+ }, fr = (e, n, t, r) => {
1704
1685
  const o = e._zod.def;
1705
- y(o.innerType, n, r);
1686
+ b(o.innerType, n, r);
1706
1687
  const s = n.seen.get(e);
1707
1688
  s.ref = o.innerType;
1708
1689
  let i;
@@ -1712,64 +1693,64 @@ const Xt = (e, n = {}) => (t) => {
1712
1693
  throw new Error("Dynamic catch values are not supported in JSON Schema");
1713
1694
  }
1714
1695
  t.default = i;
1715
- }, fr = (e, n, t, r) => {
1696
+ }, dr = (e, n, t, r) => {
1716
1697
  const o = e._zod.def, s = n.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
1717
- y(s, n, r);
1698
+ b(s, n, r);
1718
1699
  const i = n.seen.get(e);
1719
1700
  i.ref = s;
1720
1701
  }, lr = (e, n, t, r) => {
1721
1702
  const o = e._zod.def;
1722
- y(o.innerType, n, r);
1703
+ b(o.innerType, n, r);
1723
1704
  const s = n.seen.get(e);
1724
1705
  s.ref = o.innerType, t.readOnly = !0;
1725
- }, De = (e, n, t, r) => {
1706
+ }, Ke = (e, n, t, r) => {
1726
1707
  const o = e._zod.def;
1727
- y(o.innerType, n, r);
1708
+ b(o.innerType, n, r);
1728
1709
  const s = n.seen.get(e);
1729
1710
  s.ref = o.innerType;
1730
- }, dr = /* @__PURE__ */ u("ZodISODateTime", (e, n) => {
1731
- Xn.init(e, n), B.init(e, n);
1711
+ }, mr = /* @__PURE__ */ u("ZodISODateTime", (e, n) => {
1712
+ et.init(e, n), K.init(e, n);
1732
1713
  });
1733
1714
  function pr(e) {
1734
- return /* @__PURE__ */ Tt(dr, e);
1715
+ return /* @__PURE__ */ Pt(mr, e);
1735
1716
  }
1736
- const mr = /* @__PURE__ */ u("ZodISODate", (e, n) => {
1737
- Hn.init(e, n), B.init(e, n);
1717
+ const hr = /* @__PURE__ */ u("ZodISODate", (e, n) => {
1718
+ nt.init(e, n), K.init(e, n);
1738
1719
  });
1739
- function hr(e) {
1740
- return /* @__PURE__ */ Pt(mr, e);
1720
+ function gr(e) {
1721
+ return /* @__PURE__ */ Et(hr, e);
1741
1722
  }
1742
1723
  const _r = /* @__PURE__ */ u("ZodISOTime", (e, n) => {
1743
- Qn.init(e, n), B.init(e, n);
1724
+ tt.init(e, n), K.init(e, n);
1744
1725
  });
1745
- function gr(e) {
1746
- return /* @__PURE__ */ Et(_r, e);
1726
+ function yr(e) {
1727
+ return /* @__PURE__ */ At(_r, e);
1747
1728
  }
1748
1729
  const vr = /* @__PURE__ */ u("ZodISODuration", (e, n) => {
1749
- et.init(e, n), B.init(e, n);
1730
+ rt.init(e, n), K.init(e, n);
1750
1731
  });
1751
- function yr(e) {
1752
- return /* @__PURE__ */ At(vr, e);
1732
+ function zr(e) {
1733
+ return /* @__PURE__ */ It(vr, e);
1753
1734
  }
1754
- const zr = (e, n) => {
1755
- Ze.init(e, n), e.name = "ZodError", Object.defineProperties(e, {
1735
+ const br = (e, n) => {
1736
+ Ne.init(e, n), e.name = "ZodError", Object.defineProperties(e, {
1756
1737
  format: {
1757
- value: (t) => an(e, t)
1738
+ value: (t) => ln(e, t)
1758
1739
  // enumerable: false,
1759
1740
  },
1760
1741
  flatten: {
1761
- value: (t) => un(e, t)
1742
+ value: (t) => dn(e, t)
1762
1743
  // enumerable: false,
1763
1744
  },
1764
1745
  addIssue: {
1765
1746
  value: (t) => {
1766
- e.issues.push(t), e.message = JSON.stringify(e.issues, q, 2);
1747
+ e.issues.push(t), e.message = JSON.stringify(e.issues, Y, 2);
1767
1748
  }
1768
1749
  // enumerable: false,
1769
1750
  },
1770
1751
  addIssues: {
1771
1752
  value: (t) => {
1772
- e.issues.push(...t), e.message = JSON.stringify(e.issues, q, 2);
1753
+ e.issues.push(...t), e.message = JSON.stringify(e.issues, Y, 2);
1773
1754
  }
1774
1755
  // enumerable: false,
1775
1756
  },
@@ -1780,437 +1761,548 @@ const zr = (e, n) => {
1780
1761
  // enumerable: false,
1781
1762
  }
1782
1763
  });
1783
- }, $ = u("ZodError", zr, {
1764
+ }, Z = u("ZodError", br, {
1784
1765
  Parent: Error
1785
- }), br = /* @__PURE__ */ x($), wr = /* @__PURE__ */ J($), $r = /* @__PURE__ */ U($), Zr = /* @__PURE__ */ V($), kr = /* @__PURE__ */ dn($), Sr = /* @__PURE__ */ pn($), Or = /* @__PURE__ */ mn($), Tr = /* @__PURE__ */ hn($), Pr = /* @__PURE__ */ _n($), Er = /* @__PURE__ */ gn($), Ar = /* @__PURE__ */ vn($), Nr = /* @__PURE__ */ yn($), z = /* @__PURE__ */ u("ZodType", (e, n) => (g.init(e, n), Object.assign(e["~standard"], {
1766
+ }), wr = /* @__PURE__ */ U(Z), $r = /* @__PURE__ */ V(Z), kr = /* @__PURE__ */ W(Z), Zr = /* @__PURE__ */ G(Z), Sr = /* @__PURE__ */ hn(Z), Or = /* @__PURE__ */ gn(Z), Tr = /* @__PURE__ */ _n(Z), Pr = /* @__PURE__ */ yn(Z), Er = /* @__PURE__ */ vn(Z), Ar = /* @__PURE__ */ zn(Z), Ir = /* @__PURE__ */ bn(Z), Nr = /* @__PURE__ */ wn(Z), w = /* @__PURE__ */ u("ZodType", (e, n) => (y.init(e, n), Object.assign(e["~standard"], {
1786
1767
  jsonSchema: {
1787
- input: D(e, "input"),
1788
- output: D(e, "output")
1768
+ input: L(e, "input"),
1769
+ output: L(e, "output")
1789
1770
  }
1790
- }), e.toJSONSchema = Xt(e, {}), e.def = n, e.type = n.type, Object.defineProperty(e, "_def", { value: n }), e.check = (...t) => e.clone(rn(n, {
1771
+ }), e.toJSONSchema = Ht(e, {}), e.def = n, e.type = n.type, Object.defineProperty(e, "_def", { value: n }), e.check = (...t) => e.clone(cn(n, {
1791
1772
  checks: [
1792
1773
  ...n.checks ?? [],
1793
1774
  ...t.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
1794
1775
  ]
1795
1776
  }), {
1796
1777
  parent: !0
1797
- }), e.with = e.check, e.clone = (t, r) => we(e, t, r), e.brand = () => e, e.register = ((t, r) => (t.add(e, r), e)), e.parse = (t, r) => br(e, t, r, { callee: e.parse }), e.safeParse = (t, r) => $r(e, t, r), e.parseAsync = async (t, r) => wr(e, t, r, { callee: e.parseAsync }), e.safeParseAsync = async (t, r) => Zr(e, t, r), e.spa = e.safeParseAsync, e.encode = (t, r) => kr(e, t, r), e.decode = (t, r) => Sr(e, t, r), e.encodeAsync = async (t, r) => Or(e, t, r), e.decodeAsync = async (t, r) => Tr(e, t, r), e.safeEncode = (t, r) => Pr(e, t, r), e.safeDecode = (t, r) => Er(e, t, r), e.safeEncodeAsync = async (t, r) => Ar(e, t, r), e.safeDecodeAsync = async (t, r) => Nr(e, t, r), e.refine = (t, r) => e.check(oo(t, r)), e.superRefine = (t) => e.check(io(t)), e.overwrite = (t) => e.check(/* @__PURE__ */ A(t)), e.optional = () => ge(e), e.exactOptional = () => Vr(e), e.nullable = () => ve(e), e.nullish = () => ge(ve(e)), e.nonoptional = (t) => Xr(e, t), e.array = () => Rr(e), e.or = (t) => Mr([e, t]), e.and = (t) => Dr(e, t), e.transform = (t) => ye(e, xr(t)), e.default = (t) => Gr(e, t), e.prefault = (t) => Kr(e, t), e.catch = (t) => Qr(e, t), e.pipe = (t) => ye(e, t), e.readonly = () => to(e), e.describe = (t) => {
1778
+ }), e.with = e.check, e.clone = (t, r) => Ae(e, t, r), e.brand = () => e, e.register = ((t, r) => (t.add(e, r), e)), e.parse = (t, r) => wr(e, t, r, { callee: e.parse }), e.safeParse = (t, r) => kr(e, t, r), e.parseAsync = async (t, r) => $r(e, t, r, { callee: e.parseAsync }), e.safeParseAsync = async (t, r) => Zr(e, t, r), e.spa = e.safeParseAsync, e.encode = (t, r) => Sr(e, t, r), e.decode = (t, r) => Or(e, t, r), e.encodeAsync = async (t, r) => Tr(e, t, r), e.decodeAsync = async (t, r) => Pr(e, t, r), e.safeEncode = (t, r) => Er(e, t, r), e.safeDecode = (t, r) => Ar(e, t, r), e.safeEncodeAsync = async (t, r) => Ir(e, t, r), e.safeDecodeAsync = async (t, r) => Nr(e, t, r), e.refine = (t, r) => e.check(io(t, r)), e.superRefine = (t) => e.check(so(t)), e.overwrite = (t) => e.check(/* @__PURE__ */ N(t)), e.optional = () => ve(e), e.exactOptional = () => Wr(e), e.nullable = () => ze(e), e.nullish = () => ve(ze(e)), e.nonoptional = (t) => Hr(e, t), e.array = () => Rr(e), e.or = (t) => Fr([e, t]), e.and = (t) => Dr(e, t), e.transform = (t) => be(e, Jr(t)), e.default = (t) => Br(e, t), e.prefault = (t) => Yr(e, t), e.catch = (t) => eo(e, t), e.pipe = (t) => be(e, t), e.readonly = () => ro(e), e.describe = (t) => {
1798
1779
  const r = e.clone();
1799
- return C.add(r, { description: t }), r;
1780
+ return R.add(r, { description: t }), r;
1800
1781
  }, Object.defineProperty(e, "description", {
1801
1782
  get() {
1802
- return C.get(e)?.description;
1783
+ return R.get(e)?.description;
1803
1784
  },
1804
1785
  configurable: !0
1805
1786
  }), e.meta = (...t) => {
1806
1787
  if (t.length === 0)
1807
- return C.get(e);
1788
+ return R.get(e);
1808
1789
  const r = e.clone();
1809
- return C.add(r, t[0]), r;
1810
- }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (t) => t(e), e)), Ir = /* @__PURE__ */ u("_ZodString", (e, n) => {
1811
- te.init(e, n), z.init(e, n), e._zod.processJSONSchema = (r, o, s) => Qt(e, r, o);
1790
+ return R.add(r, t[0]), r;
1791
+ }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (t) => t(e), e)), Mr = /* @__PURE__ */ u("_ZodString", (e, n) => {
1792
+ ie.init(e, n), w.init(e, n), e._zod.processJSONSchema = (r, o, s) => er(e, r, o);
1812
1793
  const t = e._zod.bag;
1813
- e.format = t.format ?? null, e.minLength = t.minimum ?? null, e.maxLength = t.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ Ie(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ Lt(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ xt(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ Jt(...r)), e.min = (...r) => e.check(/* @__PURE__ */ j(...r)), e.max = (...r) => e.check(/* @__PURE__ */ oe(...r)), e.length = (...r) => e.check(/* @__PURE__ */ Ne(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ j(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ Ft(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ Dt(r)), e.trim = () => e.check(/* @__PURE__ */ Vt()), e.normalize = (...r) => e.check(/* @__PURE__ */ Ut(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ Wt()), e.toUpperCase = () => e.check(/* @__PURE__ */ Bt()), e.slugify = () => e.check(/* @__PURE__ */ Gt());
1814
- }), B = /* @__PURE__ */ u("ZodStringFormat", (e, n) => {
1815
- w.init(e, n), Ir.init(e, n);
1794
+ e.format = t.format ?? null, e.minLength = t.minimum ?? null, e.maxLength = t.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ Ue(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ Lt(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ Jt(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ Ut(...r)), e.min = (...r) => e.check(/* @__PURE__ */ I(...r)), e.max = (...r) => e.check(/* @__PURE__ */ B(...r)), e.length = (...r) => e.check(/* @__PURE__ */ Je(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ I(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ xt(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ Dt(r)), e.trim = () => e.check(/* @__PURE__ */ Wt()), e.normalize = (...r) => e.check(/* @__PURE__ */ Vt(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ Gt()), e.toUpperCase = () => e.check(/* @__PURE__ */ qt()), e.slugify = () => e.check(/* @__PURE__ */ Bt());
1795
+ }), K = /* @__PURE__ */ u("ZodStringFormat", (e, n) => {
1796
+ k.init(e, n), Mr.init(e, n);
1816
1797
  }), Cr = /* @__PURE__ */ u("ZodArray", (e, n) => {
1817
- ct.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => tr(e, t, r, o), e.element = n.element, e.min = (t, r) => e.check(/* @__PURE__ */ j(t, r)), e.nonempty = (t) => e.check(/* @__PURE__ */ j(1, t)), e.max = (t, r) => e.check(/* @__PURE__ */ oe(t, r)), e.length = (t, r) => e.check(/* @__PURE__ */ Ne(t, r)), e.unwrap = () => e.element;
1798
+ De.init(e, n), w.init(e, n), e._zod.processJSONSchema = (t, r, o) => rr(e, t, r, o), e.element = n.element, e.min = (t, r) => e.check(/* @__PURE__ */ I(t, r)), e.nonempty = (t) => e.check(/* @__PURE__ */ I(1, t)), e.max = (t, r) => e.check(/* @__PURE__ */ B(t, r)), e.length = (t, r) => e.check(/* @__PURE__ */ Je(t, r)), e.unwrap = () => e.element;
1818
1799
  });
1819
1800
  function Rr(e, n) {
1820
- return /* @__PURE__ */ qt(Cr, e, n);
1801
+ return /* @__PURE__ */ Kt(Cr, e, n);
1821
1802
  }
1822
1803
  const jr = /* @__PURE__ */ u("ZodUnion", (e, n) => {
1823
- ut.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => rr(e, t, r, o), e.options = n.options;
1804
+ ft.init(e, n), w.init(e, n), e._zod.processJSONSchema = (t, r, o) => or(e, t, r, o), e.options = n.options;
1824
1805
  });
1825
- function Mr(e, n) {
1806
+ function Fr(e, n) {
1826
1807
  return new jr({
1827
1808
  type: "union",
1828
1809
  options: e,
1829
- ...d(n)
1810
+ ...l(n)
1830
1811
  });
1831
1812
  }
1832
- const Fr = /* @__PURE__ */ u("ZodIntersection", (e, n) => {
1833
- at.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => or(e, t, r, o);
1813
+ const xr = /* @__PURE__ */ u("ZodIntersection", (e, n) => {
1814
+ dt.init(e, n), w.init(e, n), e._zod.processJSONSchema = (t, r, o) => ir(e, t, r, o);
1834
1815
  });
1835
1816
  function Dr(e, n) {
1836
- return new Fr({
1817
+ return new xr({
1837
1818
  type: "intersection",
1838
1819
  left: e,
1839
1820
  right: n
1840
1821
  });
1841
1822
  }
1842
1823
  const Lr = /* @__PURE__ */ u("ZodTransform", (e, n) => {
1843
- ft.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => nr(e, t), e._zod.parse = (t, r) => {
1824
+ lt.init(e, n), w.init(e, n), e._zod.processJSONSchema = (t, r, o) => tr(e, t), e._zod.parse = (t, r) => {
1844
1825
  if (r.direction === "backward")
1845
- throw new X(e.constructor.name);
1826
+ throw new Te(e.constructor.name);
1846
1827
  t.addIssue = (s) => {
1847
1828
  if (typeof s == "string")
1848
- t.issues.push(R(s, t.value, n));
1829
+ t.issues.push(j(s, t.value, n));
1849
1830
  else {
1850
1831
  const i = s;
1851
- i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = t.value), i.inst ?? (i.inst = e), t.issues.push(R(i));
1832
+ i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = t.value), i.inst ?? (i.inst = e), t.issues.push(j(i));
1852
1833
  }
1853
1834
  };
1854
1835
  const o = n.transform(t.value, t);
1855
1836
  return o instanceof Promise ? o.then((s) => (t.value = s, t)) : (t.value = o, t);
1856
1837
  };
1857
1838
  });
1858
- function xr(e) {
1839
+ function Jr(e) {
1859
1840
  return new Lr({
1860
1841
  type: "transform",
1861
1842
  transform: e
1862
1843
  });
1863
1844
  }
1864
- const Jr = /* @__PURE__ */ u("ZodOptional", (e, n) => {
1865
- re.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => De(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1845
+ const Ur = /* @__PURE__ */ u("ZodOptional", (e, n) => {
1846
+ se.init(e, n), w.init(e, n), e._zod.processJSONSchema = (t, r, o) => Ke(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1866
1847
  });
1867
- function ge(e) {
1868
- return new Jr({
1848
+ function ve(e) {
1849
+ return new Ur({
1869
1850
  type: "optional",
1870
1851
  innerType: e
1871
1852
  });
1872
1853
  }
1873
- const Ur = /* @__PURE__ */ u("ZodExactOptional", (e, n) => {
1874
- lt.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => De(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1854
+ const Vr = /* @__PURE__ */ u("ZodExactOptional", (e, n) => {
1855
+ mt.init(e, n), w.init(e, n), e._zod.processJSONSchema = (t, r, o) => Ke(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1875
1856
  });
1876
- function Vr(e) {
1877
- return new Ur({
1857
+ function Wr(e) {
1858
+ return new Vr({
1878
1859
  type: "optional",
1879
1860
  innerType: e
1880
1861
  });
1881
1862
  }
1882
- const Wr = /* @__PURE__ */ u("ZodNullable", (e, n) => {
1883
- dt.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => ir(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1863
+ const Gr = /* @__PURE__ */ u("ZodNullable", (e, n) => {
1864
+ pt.init(e, n), w.init(e, n), e._zod.processJSONSchema = (t, r, o) => sr(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1884
1865
  });
1885
- function ve(e) {
1886
- return new Wr({
1866
+ function ze(e) {
1867
+ return new Gr({
1887
1868
  type: "nullable",
1888
1869
  innerType: e
1889
1870
  });
1890
1871
  }
1891
- const Br = /* @__PURE__ */ u("ZodDefault", (e, n) => {
1892
- pt.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => cr(e, t, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
1872
+ const qr = /* @__PURE__ */ u("ZodDefault", (e, n) => {
1873
+ ht.init(e, n), w.init(e, n), e._zod.processJSONSchema = (t, r, o) => ar(e, t, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
1893
1874
  });
1894
- function Gr(e, n) {
1895
- return new Br({
1875
+ function Br(e, n) {
1876
+ return new qr({
1896
1877
  type: "default",
1897
1878
  innerType: e,
1898
1879
  get defaultValue() {
1899
- return typeof n == "function" ? n() : be(n);
1880
+ return typeof n == "function" ? n() : Ee(n);
1900
1881
  }
1901
1882
  });
1902
1883
  }
1903
- const qr = /* @__PURE__ */ u("ZodPrefault", (e, n) => {
1904
- mt.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => ur(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1884
+ const Kr = /* @__PURE__ */ u("ZodPrefault", (e, n) => {
1885
+ gt.init(e, n), w.init(e, n), e._zod.processJSONSchema = (t, r, o) => ur(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1905
1886
  });
1906
- function Kr(e, n) {
1907
- return new qr({
1887
+ function Yr(e, n) {
1888
+ return new Kr({
1908
1889
  type: "prefault",
1909
1890
  innerType: e,
1910
1891
  get defaultValue() {
1911
- return typeof n == "function" ? n() : be(n);
1892
+ return typeof n == "function" ? n() : Ee(n);
1912
1893
  }
1913
1894
  });
1914
1895
  }
1915
- const Yr = /* @__PURE__ */ u("ZodNonOptional", (e, n) => {
1916
- ht.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => sr(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1896
+ const Xr = /* @__PURE__ */ u("ZodNonOptional", (e, n) => {
1897
+ _t.init(e, n), w.init(e, n), e._zod.processJSONSchema = (t, r, o) => cr(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1917
1898
  });
1918
- function Xr(e, n) {
1919
- return new Yr({
1899
+ function Hr(e, n) {
1900
+ return new Xr({
1920
1901
  type: "nonoptional",
1921
1902
  innerType: e,
1922
- ...d(n)
1903
+ ...l(n)
1923
1904
  });
1924
1905
  }
1925
- const Hr = /* @__PURE__ */ u("ZodCatch", (e, n) => {
1926
- gt.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => ar(e, t, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
1906
+ const Qr = /* @__PURE__ */ u("ZodCatch", (e, n) => {
1907
+ yt.init(e, n), w.init(e, n), e._zod.processJSONSchema = (t, r, o) => fr(e, t, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
1927
1908
  });
1928
- function Qr(e, n) {
1929
- return new Hr({
1909
+ function eo(e, n) {
1910
+ return new Qr({
1930
1911
  type: "catch",
1931
1912
  innerType: e,
1932
1913
  catchValue: typeof n == "function" ? n : () => n
1933
1914
  });
1934
1915
  }
1935
- const eo = /* @__PURE__ */ u("ZodPipe", (e, n) => {
1936
- vt.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => fr(e, t, r, o), e.in = n.in, e.out = n.out;
1916
+ const no = /* @__PURE__ */ u("ZodPipe", (e, n) => {
1917
+ vt.init(e, n), w.init(e, n), e._zod.processJSONSchema = (t, r, o) => dr(e, t, r, o), e.in = n.in, e.out = n.out;
1937
1918
  });
1938
- function ye(e, n) {
1939
- return new eo({
1919
+ function be(e, n) {
1920
+ return new no({
1940
1921
  type: "pipe",
1941
1922
  in: e,
1942
1923
  out: n
1943
1924
  // ...util.normalizeParams(params),
1944
1925
  });
1945
1926
  }
1946
- const no = /* @__PURE__ */ u("ZodReadonly", (e, n) => {
1947
- yt.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => lr(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1927
+ const to = /* @__PURE__ */ u("ZodReadonly", (e, n) => {
1928
+ zt.init(e, n), w.init(e, n), e._zod.processJSONSchema = (t, r, o) => lr(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1948
1929
  });
1949
- function to(e) {
1950
- return new no({
1930
+ function ro(e) {
1931
+ return new to({
1951
1932
  type: "readonly",
1952
1933
  innerType: e
1953
1934
  });
1954
1935
  }
1955
- const ro = /* @__PURE__ */ u("ZodCustom", (e, n) => {
1956
- Ae.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => er(e, t);
1936
+ const oo = /* @__PURE__ */ u("ZodCustom", (e, n) => {
1937
+ Le.init(e, n), w.init(e, n), e._zod.processJSONSchema = (t, r, o) => nr(e, t);
1957
1938
  });
1958
- function oo(e, n = {}) {
1959
- return /* @__PURE__ */ Ce(ro, e, n);
1939
+ function io(e, n = {}) {
1940
+ return /* @__PURE__ */ Ve(oo, e, n);
1960
1941
  }
1961
- function io(e) {
1962
- return /* @__PURE__ */ Re(e);
1942
+ function so(e) {
1943
+ return /* @__PURE__ */ We(e);
1963
1944
  }
1964
- const T = /* @__PURE__ */ u("ZodMiniType", (e, n) => {
1945
+ const P = /* @__PURE__ */ u("ZodMiniType", (e, n) => {
1965
1946
  if (!e._zod)
1966
1947
  throw new Error("Uninitialized schema in ZodMiniType.");
1967
- g.init(e, n), e.def = n, e.type = n.type, e.parse = (t, r) => fn(e, t, r, { callee: e.parse }), e.safeParse = (t, r) => ke(e, t, r), e.parseAsync = async (t, r) => ln(e, t, r, { callee: e.parseAsync }), e.safeParseAsync = async (t, r) => Se(e, t, r), e.check = (...t) => e.clone({
1948
+ y.init(e, n), e.def = n, e.type = n.type, e.parse = (t, r) => mn(e, t, r, { callee: e.parse }), e.safeParse = (t, r) => Me(e, t, r), e.parseAsync = async (t, r) => pn(e, t, r, { callee: e.parseAsync }), e.safeParseAsync = async (t, r) => Ce(e, t, r), e.check = (...t) => e.clone({
1968
1949
  ...n,
1969
1950
  checks: [
1970
1951
  ...n.checks ?? [],
1971
1952
  ...t.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
1972
1953
  ]
1973
- }, { parent: !0 }), e.with = e.check, e.clone = (t, r) => we(e, t, r), e.brand = () => e, e.register = ((t, r) => (t.add(e, r), e)), e.apply = (t) => t(e);
1974
- }), Le = /* @__PURE__ */ u("ZodMiniString", (e, n) => {
1975
- te.init(e, n), T.init(e, n);
1954
+ }, { parent: !0 }), e.with = e.check, e.clone = (t, r) => Ae(e, t, r), e.brand = () => e, e.register = ((t, r) => (t.add(e, r), e)), e.apply = (t) => t(e);
1955
+ }), Ye = /* @__PURE__ */ u("ZodMiniString", (e, n) => {
1956
+ ie.init(e, n), P.init(e, n);
1976
1957
  });
1977
1958
  // @__NO_SIDE_EFFECTS__
1978
- function so(e) {
1979
- return /* @__PURE__ */ wt(Le, e);
1959
+ function we(e) {
1960
+ return /* @__PURE__ */ $t(Ye, e);
1980
1961
  }
1981
- const N = /* @__PURE__ */ u("ZodMiniStringFormat", (e, n) => {
1982
- w.init(e, n), Le.init(e, n);
1962
+ const M = /* @__PURE__ */ u("ZodMiniStringFormat", (e, n) => {
1963
+ k.init(e, n), Ye.init(e, n);
1983
1964
  }), co = /* @__PURE__ */ u("ZodMiniEmail", (e, n) => {
1984
- Kn.init(e, n), N.init(e, n);
1965
+ Hn.init(e, n), M.init(e, n);
1985
1966
  });
1986
1967
  // @__NO_SIDE_EFFECTS__
1987
- function uo(e) {
1988
- return /* @__PURE__ */ $t(co, e);
1968
+ function ao(e) {
1969
+ return /* @__PURE__ */ kt(co, e);
1989
1970
  }
1990
- const ao = /* @__PURE__ */ u("ZodMiniUUID", (e, n) => {
1991
- qn.init(e, n), N.init(e, n);
1971
+ const uo = /* @__PURE__ */ u("ZodMiniUUID", (e, n) => {
1972
+ Xn.init(e, n), M.init(e, n);
1992
1973
  });
1993
1974
  // @__NO_SIDE_EFFECTS__
1994
1975
  function fo(e) {
1995
- return /* @__PURE__ */ Zt(ao, e);
1976
+ return /* @__PURE__ */ Zt(uo, e);
1996
1977
  }
1997
1978
  const lo = /* @__PURE__ */ u("ZodMiniURL", (e, n) => {
1998
- Yn.init(e, n), N.init(e, n);
1979
+ Qn.init(e, n), M.init(e, n);
1999
1980
  });
2000
1981
  // @__NO_SIDE_EFFECTS__
2001
- function po(e) {
2002
- return /* @__PURE__ */ kt(lo, e);
1982
+ function mo(e) {
1983
+ return /* @__PURE__ */ St(lo, e);
2003
1984
  }
2004
- const mo = /* @__PURE__ */ u("ZodMiniIPv4", (e, n) => {
2005
- nt.init(e, n), N.init(e, n);
1985
+ const po = /* @__PURE__ */ u("ZodMiniIPv4", (e, n) => {
1986
+ ot.init(e, n), M.init(e, n);
2006
1987
  });
2007
1988
  // @__NO_SIDE_EFFECTS__
2008
1989
  function ho(e) {
2009
- return /* @__PURE__ */ St(mo, e);
1990
+ return /* @__PURE__ */ Ot(po, e);
2010
1991
  }
2011
- const _o = /* @__PURE__ */ u("ZodMiniIPv6", (e, n) => {
2012
- tt.init(e, n), N.init(e, n);
1992
+ const go = /* @__PURE__ */ u("ZodMiniIPv6", (e, n) => {
1993
+ it.init(e, n), M.init(e, n);
2013
1994
  });
2014
1995
  // @__NO_SIDE_EFFECTS__
2015
- function go(e) {
2016
- return /* @__PURE__ */ Ot(_o, e);
1996
+ function _o(e) {
1997
+ return /* @__PURE__ */ Tt(go, e);
2017
1998
  }
2018
- const vo = /* @__PURE__ */ u("ZodMiniCustomStringFormat", (e, n) => {
2019
- rt.init(e, n), N.init(e, n);
1999
+ const yo = /* @__PURE__ */ u("ZodMiniCustomStringFormat", (e, n) => {
2000
+ st.init(e, n), M.init(e, n);
2020
2001
  });
2021
2002
  // @__NO_SIDE_EFFECTS__
2022
- function yo(e) {
2023
- return /* @__PURE__ */ Yt(vo, "hostname", Zn, e);
2003
+ function vo(e) {
2004
+ return /* @__PURE__ */ Xt(yo, "hostname", On, e);
2024
2005
  }
2025
- const xe = /* @__PURE__ */ u("ZodMiniNumber", (e, n) => {
2026
- Ee.init(e, n), T.init(e, n);
2006
+ const Xe = /* @__PURE__ */ u("ZodMiniNumber", (e, n) => {
2007
+ xe.init(e, n), P.init(e, n);
2027
2008
  });
2028
2009
  // @__NO_SIDE_EFFECTS__
2029
- function zo(e) {
2030
- return /* @__PURE__ */ Nt(xe, e);
2010
+ function $e(e) {
2011
+ return /* @__PURE__ */ Nt(Xe, e);
2031
2012
  }
2032
- const bo = /* @__PURE__ */ u("ZodMiniNumberFormat", (e, n) => {
2033
- ot.init(e, n), xe.init(e, n);
2013
+ const zo = /* @__PURE__ */ u("ZodMiniNumberFormat", (e, n) => {
2014
+ ct.init(e, n), Xe.init(e, n);
2034
2015
  });
2035
2016
  // @__NO_SIDE_EFFECTS__
2036
- function wo(e) {
2037
- return /* @__PURE__ */ It(bo, e);
2017
+ function bo(e) {
2018
+ return /* @__PURE__ */ Mt(zo, e);
2038
2019
  }
2039
- const $o = /* @__PURE__ */ u("ZodMiniBoolean", (e, n) => {
2040
- it.init(e, n), T.init(e, n);
2020
+ const wo = /* @__PURE__ */ u("ZodMiniBoolean", (e, n) => {
2021
+ at.init(e, n), P.init(e, n);
2041
2022
  });
2042
2023
  // @__NO_SIDE_EFFECTS__
2043
- function Zo(e) {
2044
- return /* @__PURE__ */ Ct($o, e);
2024
+ function ke(e) {
2025
+ return /* @__PURE__ */ Ct(wo, e);
2045
2026
  }
2046
- const ko = /* @__PURE__ */ u("ZodMiniAny", (e, n) => {
2047
- st.init(e, n), T.init(e, n);
2027
+ const $o = /* @__PURE__ */ u("ZodMiniAny", (e, n) => {
2028
+ ut.init(e, n), P.init(e, n);
2048
2029
  });
2049
2030
  // @__NO_SIDE_EFFECTS__
2050
- function Je() {
2051
- return /* @__PURE__ */ Rt(ko);
2031
+ function Q() {
2032
+ return /* @__PURE__ */ Rt($o);
2052
2033
  }
2053
- const So = /* @__PURE__ */ u("ZodMiniOptional", (e, n) => {
2054
- re.init(e, n), T.init(e, n);
2034
+ const ko = /* @__PURE__ */ u("ZodMiniArray", (e, n) => {
2035
+ De.init(e, n), P.init(e, n);
2055
2036
  });
2056
2037
  // @__NO_SIDE_EFFECTS__
2057
- function Oo(e) {
2058
- return new So({
2059
- type: "optional",
2060
- innerType: e
2038
+ function Ze(e, n) {
2039
+ return new ko({
2040
+ type: "array",
2041
+ element: e,
2042
+ ...l(n)
2061
2043
  });
2062
2044
  }
2063
- const To = /* @__PURE__ */ u("ZodMiniSuccess", (e, n) => {
2064
- _t.init(e, n), T.init(e, n);
2045
+ const Zo = /* @__PURE__ */ u("ZodMiniOptional", (e, n) => {
2046
+ se.init(e, n), P.init(e, n);
2065
2047
  });
2066
2048
  // @__NO_SIDE_EFFECTS__
2067
- function Po(e) {
2068
- return new To({
2069
- type: "success",
2049
+ function So(e) {
2050
+ return new Zo({
2051
+ type: "optional",
2070
2052
  innerType: e
2071
2053
  });
2072
2054
  }
2073
- const Eo = /* @__PURE__ */ u("ZodMiniCustom", (e, n) => {
2074
- Ae.init(e, n), T.init(e, n);
2055
+ const Oo = /* @__PURE__ */ u("ZodMiniCustom", (e, n) => {
2056
+ Le.init(e, n), P.init(e, n);
2075
2057
  });
2076
2058
  // @__NO_SIDE_EFFECTS__
2077
- function k(e, n = {}) {
2078
- return /* @__PURE__ */ Ce(Eo, e, n);
2059
+ function v(e, n = {}) {
2060
+ return /* @__PURE__ */ Ve(Oo, e, n);
2079
2061
  }
2080
2062
  // @__NO_SIDE_EFFECTS__
2081
- function Ao(e) {
2082
- return /* @__PURE__ */ Re(e);
2063
+ function He(e) {
2064
+ return /* @__PURE__ */ We(e);
2083
2065
  }
2084
- const Ue = {
2085
- email: { schema: /* @__PURE__ */ uo() },
2086
- hostname: { schema: /* @__PURE__ */ yo() },
2066
+ const ee = {
2067
+ email: { schema: /* @__PURE__ */ ao() },
2068
+ hostname: { schema: /* @__PURE__ */ vo() },
2087
2069
  ipv4: { schema: /* @__PURE__ */ ho() },
2088
- ipv6: { schema: /* @__PURE__ */ go() },
2089
- url: { schema: /* @__PURE__ */ po() },
2070
+ ipv6: { schema: /* @__PURE__ */ _o() },
2071
+ url: { schema: /* @__PURE__ */ mo() },
2090
2072
  uuid: { schema: /* @__PURE__ */ fo() },
2091
- date: { schema: hr() },
2092
- time: { schema: gr() },
2073
+ date: { schema: gr() },
2074
+ time: { schema: yr() },
2093
2075
  "date-time": { schema: pr() },
2094
- duration: { schema: yr() }
2095
- }, No = Object.keys(Ue), Io = (e) => (n) => {
2076
+ duration: { schema: zr() }
2077
+ }, To = Object.keys(ee), Po = (e) => (n, t) => {
2096
2078
  switch (n.type) {
2097
2079
  case "string":
2098
- return Co(n);
2080
+ return Eo(n, t);
2099
2081
  case "integer":
2100
2082
  case "number":
2101
- return Ro(n);
2083
+ return Io(n, t);
2102
2084
  case "boolean":
2103
- return jo(n);
2085
+ return No(n, t);
2104
2086
  case "array":
2105
- return console.warn("TODO: array validator not yet supported"), /* @__PURE__ */ Po(/* @__PURE__ */ Je());
2087
+ return Mo(n, t);
2106
2088
  case "custom": {
2107
2089
  if (!e)
2108
2090
  throw new Error(
2109
2091
  'Validator type "custom" requires a customValidators object, but it was not supplied.'
2110
2092
  );
2111
- return Mo(n, e);
2093
+ return Co(n, e);
2112
2094
  }
2113
2095
  }
2114
2096
  };
2115
- function Co(e) {
2116
- return G(e, (n) => {
2117
- let t = /* @__PURE__ */ so();
2118
- if (n.required === !0 && (t = t.check(/* @__PURE__ */ k((r) => r.length > 0, { error: "This field is required" }))), typeof n.minLength == "number" && (t = t.check(/* @__PURE__ */ j(n.minLength))), typeof n.maxLength == "number" && (t = t.check(/* @__PURE__ */ oe(n.maxLength))), typeof n.pattern == "string" && (t = t.check(/* @__PURE__ */ Ie(new RegExp(n.pattern)))), n.enum) {
2119
- const r = n.enum;
2120
- t = t.check(/* @__PURE__ */ k((o) => r.includes(o)));
2097
+ function _(e, n) {
2098
+ if (e !== void 0)
2099
+ return typeof e == "string" ? e : n?.translate(e.key, e.params, e.default) ?? e.default;
2100
+ }
2101
+ function Eo(e, n) {
2102
+ return F(e, (t) => {
2103
+ const r = _(t.messages?.invalid, n);
2104
+ let o = r ? /* @__PURE__ */ we(r) : /* @__PURE__ */ we();
2105
+ if (t.required === !0) {
2106
+ const s = _(t.messages?.required, n) ?? "This field is required";
2107
+ o = o.check(/* @__PURE__ */ v((i) => i.length > 0, { error: s }));
2121
2108
  }
2122
- return n.const !== void 0 && (t = t.check(/* @__PURE__ */ k((r) => r === n.const))), n.format !== void 0 && (No.includes(n.format) ? t = t.check(Ue[n.format].schema) : console.error(`The string validation format "${n.format}" is not supported`)), t;
2109
+ if (typeof t.minLength == "number") {
2110
+ const s = _(t.messages?.minLength, n), i = t.minLength;
2111
+ o = o.check(
2112
+ s ? /* @__PURE__ */ v((c) => c.length >= i, { error: s }) : /* @__PURE__ */ I(i)
2113
+ );
2114
+ }
2115
+ if (typeof t.maxLength == "number") {
2116
+ const s = _(t.messages?.maxLength, n), i = t.maxLength;
2117
+ o = o.check(
2118
+ s ? /* @__PURE__ */ v((c) => c.length <= i, { error: s }) : /* @__PURE__ */ B(i)
2119
+ );
2120
+ }
2121
+ if (typeof t.pattern == "string") {
2122
+ const s = _(t.messages?.pattern, n), i = new RegExp(t.pattern);
2123
+ o = o.check(
2124
+ s ? /* @__PURE__ */ v((c) => i.test(c), { error: s }) : /* @__PURE__ */ Ue(i)
2125
+ );
2126
+ }
2127
+ if (t.enum) {
2128
+ const s = t.enum, i = _(t.messages?.enum, n);
2129
+ o = o.check(/* @__PURE__ */ v((c) => s.includes(c), i ? { error: i } : void 0));
2130
+ }
2131
+ if (t.const !== void 0) {
2132
+ const s = _(t.messages?.const, n);
2133
+ o = o.check(/* @__PURE__ */ v((i) => i === t.const, s ? { error: s } : void 0));
2134
+ }
2135
+ if (t.format !== void 0)
2136
+ if (To.includes(t.format)) {
2137
+ const s = _(t.messages?.format, n);
2138
+ o = o.check(
2139
+ s ? /* @__PURE__ */ He((i, c) => {
2140
+ const a = Se(
2141
+ ee[t.format].schema,
2142
+ i
2143
+ );
2144
+ Oe(a) || c.addIssue({ code: "custom", path: [], message: s });
2145
+ }) : ee[t.format].schema
2146
+ );
2147
+ } else
2148
+ console.error(`The string validation format "${t.format}" is not supported`);
2149
+ return o;
2123
2150
  });
2124
2151
  }
2125
- function Ro(e) {
2126
- return G(e, (n) => {
2127
- let t = /* @__PURE__ */ zo();
2128
- if (n.type === "integer" && (t = t.check(/* @__PURE__ */ wo())), n.minimum !== void 0 && (t = t.check(/* @__PURE__ */ Mt(n.minimum))), n.maximum !== void 0 && (t = t.check(/* @__PURE__ */ jt(n.maximum))), n.exclusiveMinimum !== void 0) {
2129
- const r = n.exclusiveMinimum;
2130
- t = t.check(/* @__PURE__ */ k((o) => o > r));
2152
+ const Ao = (e, n) => {
2153
+ if (n === 0)
2154
+ return !1;
2155
+ const t = e / n;
2156
+ return Math.abs(t - Math.round(t)) < 1e-10;
2157
+ };
2158
+ function Io(e, n) {
2159
+ return F(e, (t) => {
2160
+ const r = _(t.messages?.invalid, n);
2161
+ let o = r ? /* @__PURE__ */ $e(r) : /* @__PURE__ */ $e();
2162
+ if (t.type === "integer" && (o = o.check(/* @__PURE__ */ bo())), t.minimum !== void 0) {
2163
+ const s = _(t.messages?.minimum, n), i = t.minimum;
2164
+ o = o.check(s ? /* @__PURE__ */ v((c) => c >= i, { error: s }) : /* @__PURE__ */ Ft(i));
2131
2165
  }
2132
- if (n.exclusiveMaximum !== void 0) {
2133
- const r = n.exclusiveMaximum;
2134
- t = t.check(/* @__PURE__ */ k((o) => o < r));
2166
+ if (t.maximum !== void 0) {
2167
+ const s = _(t.messages?.maximum, n), i = t.maximum;
2168
+ o = o.check(s ? /* @__PURE__ */ v((c) => c <= i, { error: s }) : /* @__PURE__ */ jt(i));
2135
2169
  }
2136
- if (n.multipleOf !== void 0) {
2137
- const r = n.multipleOf;
2138
- t = t.check(/* @__PURE__ */ k((o) => o % r === 0));
2170
+ if (t.exclusiveMinimum !== void 0) {
2171
+ const s = _(t.messages?.exclusiveMinimum, n), i = t.exclusiveMinimum;
2172
+ o = o.check(/* @__PURE__ */ v((c) => c > i, s ? { error: s } : void 0));
2139
2173
  }
2140
- if (n.enum) {
2141
- const r = n.enum;
2142
- t = t.check(/* @__PURE__ */ k((o) => r.includes(o)));
2174
+ if (t.exclusiveMaximum !== void 0) {
2175
+ const s = _(t.messages?.exclusiveMaximum, n), i = t.exclusiveMaximum;
2176
+ o = o.check(/* @__PURE__ */ v((c) => c < i, s ? { error: s } : void 0));
2177
+ }
2178
+ if (t.multipleOf !== void 0) {
2179
+ const s = _(t.messages?.multipleOf, n), i = t.multipleOf;
2180
+ o = o.check(
2181
+ /* @__PURE__ */ v((c) => Ao(c, i), s ? { error: s } : void 0)
2182
+ );
2143
2183
  }
2144
- return n.const !== void 0 && (t = t.check(/* @__PURE__ */ k((r) => r === n.const))), t;
2184
+ if (t.enum) {
2185
+ const s = t.enum, i = _(t.messages?.enum, n);
2186
+ o = o.check(/* @__PURE__ */ v((c) => s.includes(c), i ? { error: i } : void 0));
2187
+ }
2188
+ if (t.const !== void 0) {
2189
+ const s = _(t.messages?.const, n);
2190
+ o = o.check(/* @__PURE__ */ v((i) => i === t.const, s ? { error: s } : void 0));
2191
+ }
2192
+ return o;
2145
2193
  });
2146
2194
  }
2147
- function jo(e) {
2148
- return G(e, (n) => {
2149
- let t = /* @__PURE__ */ Zo();
2150
- return n.const !== void 0 && (t = t.check(/* @__PURE__ */ k((r) => r === n.const))), t;
2195
+ function No(e, n) {
2196
+ return F(e, (t) => {
2197
+ const r = _(t.messages?.invalid, n);
2198
+ let o = r ? /* @__PURE__ */ ke(r) : /* @__PURE__ */ ke();
2199
+ if (t.const !== void 0) {
2200
+ const s = _(t.messages?.const, n);
2201
+ o = o.check(/* @__PURE__ */ v((i) => i === t.const, s ? { error: s } : void 0));
2202
+ }
2203
+ return o;
2151
2204
  });
2152
2205
  }
2153
2206
  function Mo(e, n) {
2154
- return G(e, (t) => {
2155
- let r = /* @__PURE__ */ Je();
2156
- return Object.keys(t).filter((o) => o !== "type" && o !== "required").forEach((o) => {
2157
- const s = t[o], i = n[o], c = i(s);
2158
- r = r.check(
2159
- /* @__PURE__ */ Ao((a, f) => {
2160
- const l = Be(
2161
- c,
2162
- a
2163
- );
2164
- if (!Ge(l)) {
2165
- const p = l.issues[0];
2166
- f.addIssue({
2167
- code: "custom",
2168
- path: [],
2169
- message: p?.message || `Validation failed for ${o}`
2170
- });
2171
- }
2172
- })
2207
+ return F(e, (t) => {
2208
+ const r = _(t.messages?.invalid, n);
2209
+ let o = r ? /* @__PURE__ */ Ze(/* @__PURE__ */ Q(), r) : /* @__PURE__ */ Ze(/* @__PURE__ */ Q());
2210
+ if (t.required === !0) {
2211
+ const s = _(t.messages?.required, n) ?? "This field is required";
2212
+ o = o.check(/* @__PURE__ */ v((i) => i.length > 0, { error: s }));
2213
+ }
2214
+ if (typeof t.minItems == "number") {
2215
+ const s = _(t.messages?.minItems, n), i = t.minItems;
2216
+ o = o.check(
2217
+ s ? /* @__PURE__ */ v((c) => c.length >= i, { error: s }) : /* @__PURE__ */ I(i)
2173
2218
  );
2174
- }), r;
2219
+ }
2220
+ if (typeof t.maxItems == "number") {
2221
+ const s = _(t.messages?.maxItems, n), i = t.maxItems;
2222
+ o = o.check(
2223
+ s ? /* @__PURE__ */ v((c) => c.length <= i, { error: s }) : /* @__PURE__ */ B(i)
2224
+ );
2225
+ }
2226
+ return o;
2227
+ });
2228
+ }
2229
+ function Co(e, n) {
2230
+ return F(e, (t) => {
2231
+ let r = /* @__PURE__ */ Q();
2232
+ return nn(
2233
+ Object.keys(t),
2234
+ // filter non-custom validator keys
2235
+ (o) => o !== "type" && o !== "required",
2236
+ (o) => {
2237
+ const s = t[o], i = n[o], c = i(s);
2238
+ r = r.check(
2239
+ /* @__PURE__ */ He((a, f) => {
2240
+ const d = Se(
2241
+ c,
2242
+ a
2243
+ );
2244
+ if (!Oe(d)) {
2245
+ const p = d.issues[0];
2246
+ f.addIssue({
2247
+ code: "custom",
2248
+ path: [],
2249
+ message: p?.message || `Validation failed for ${o}`
2250
+ });
2251
+ }
2252
+ })
2253
+ );
2254
+ }
2255
+ ), r;
2175
2256
  });
2176
2257
  }
2177
- function G(e, n) {
2258
+ function F(e, n) {
2178
2259
  const t = n(e);
2179
- return e.required ? t : /* @__PURE__ */ Oo(t);
2180
- }
2181
- const Jo = ({
2182
- formDef: e,
2183
- data: n = void 0,
2184
- widgetLoaders: t = {},
2185
- itemRenderers: r = {},
2186
- localization: o,
2187
- validators: s = {},
2188
- middlewares: i = [],
2189
- validateOn: c = "eager",
2190
- formHealth: a = void 0,
2191
- formEvent: f = void 0
2192
- }) => {
2193
- const l = { ...Ye, ...t }, p = { ...r }, h = Io({ ...s }), _ = [
2194
- We.jsonSchemaMiddleware(Ke(nn)),
2195
- ...i
2196
- ];
2197
- return /* @__PURE__ */ Ve(
2198
- qe.FormComponent,
2260
+ return e.required ? t : /* @__PURE__ */ So(t);
2261
+ }
2262
+ function Lo({
2263
+ config: e,
2264
+ formHealth: n = void 0,
2265
+ formEvent: t = void 0,
2266
+ autocomplete: r,
2267
+ ref: o
2268
+ }) {
2269
+ const s = rn(
2270
+ () => en(e.formDef, e.formSelectors, e.formConfig),
2271
+ [e]
2272
+ ), i = {
2273
+ formDef: s.formDef,
2274
+ widgetLoaders: {
2275
+ ...on,
2276
+ ...s.widgetLoaders,
2277
+ ...e.customWidgetLoaders ?? {}
2278
+ },
2279
+ dependencies: { ...s.dependencies ?? {}, ...e.dependencies ?? {} },
2280
+ validateOn: e.validateOn ?? s.validateOn ?? "eager",
2281
+ itemRenderers: {
2282
+ ...s.itemRenderers ?? {},
2283
+ ...e.itemRenderers ?? {}
2284
+ },
2285
+ localization: e.localization,
2286
+ middlewares: e.middlewares ?? [],
2287
+ data: e.data,
2288
+ meta: e.meta,
2289
+ formName: e.formName
2290
+ }, c = Po({ ...e.customValidators ?? {} }), a = s.formEvent && t ? (f) => {
2291
+ s.formEvent?.(f), t(f);
2292
+ } : t ?? s.formEvent;
2293
+ return /* @__PURE__ */ Qe(
2294
+ tn.FormComponent,
2199
2295
  {
2200
- formDef: e,
2201
- data: n,
2202
- widgetLoaders: l,
2203
- middlewares: _,
2204
- itemRenderers: p,
2205
- localization: o,
2206
- validators: h,
2207
- validateOn: c,
2208
- formHealth: a,
2209
- formEvent: f
2296
+ ref: o,
2297
+ config: i,
2298
+ validators: c,
2299
+ autocomplete: r,
2300
+ formHealth: n,
2301
+ formEvent: a
2210
2302
  }
2211
2303
  );
2212
- };
2304
+ }
2213
2305
  export {
2214
- Jo as FormComponent,
2215
- Ye as vanillaWidgetLoaders
2306
+ Lo as GuiForm,
2307
+ on as widgetLoaders
2216
2308
  };