@golemui/gui-lit 1.4.0 → 1.5.0-rc.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.
package/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import "@golemui/gui-shared";
2
- import { safeDefine as en } from "@golemui/lit/internals";
3
- import { resolveFormInput as nn } from "@golemui/gui-shared/internals";
4
- import { filterTap as tn, standardValidate as Se, isStandardValidateSuccess as Te } from "@golemui/core";
5
- import { createFormComponent as rn } from "@golemui/lit";
2
+ import { safeDefine as on } from "@golemui/lit/internals";
3
+ import { resolveFormInput as sn } from "@golemui/gui-shared/internals";
4
+ import { standardValidate as Oe, isStandardValidateSuccess as Pe, filterTap as an } from "@golemui/core";
5
+ import { createFormComponent as cn } from "@golemui/lit";
6
6
  function u(e, n, t) {
7
7
  function r(a, c) {
8
8
  if (a._zod || Object.defineProperty(a, "_zod", {
@@ -16,9 +16,9 @@ function u(e, n, t) {
16
16
  return;
17
17
  a._zod.traits.add(e), n(a, c);
18
18
  const f = i.prototype, m = Object.keys(f);
19
- for (let p = 0; p < m.length; p++) {
20
- const h = m[p];
21
- h in a || (a[h] = f[h].bind(a));
19
+ for (let h = 0; h < m.length; h++) {
20
+ const g = m[h];
21
+ g in a || (a[g] = f[g].bind(a));
22
22
  }
23
23
  }
24
24
  const o = t?.Parent ?? Object;
@@ -37,37 +37,37 @@ function u(e, n, t) {
37
37
  value: (a) => t?.Parent && a instanceof t.Parent ? !0 : a?._zod?.traits?.has(e)
38
38
  }), Object.defineProperty(i, "name", { value: e }), i;
39
39
  }
40
- class I extends Error {
40
+ class A extends Error {
41
41
  constructor() {
42
42
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
43
43
  }
44
44
  }
45
- class Oe extends Error {
45
+ class Ie extends Error {
46
46
  constructor(n) {
47
47
  super(`Encountered unidirectional transform during encode: ${n}`), this.name = "ZodEncodeError";
48
48
  }
49
49
  }
50
- const on = {};
50
+ const un = {};
51
51
  function S(e) {
52
- return on;
52
+ return un;
53
53
  }
54
- function Y(e, n) {
54
+ function X(e, n) {
55
55
  return typeof n == "bigint" ? n.toString() : n;
56
56
  }
57
- function ne(e) {
57
+ function re(e) {
58
58
  return e == null;
59
59
  }
60
- function te(e) {
60
+ function oe(e) {
61
61
  const n = e.startsWith("^") ? 1 : 0, t = e.endsWith("$") ? e.length - 1 : e.length;
62
62
  return e.slice(n, t);
63
63
  }
64
- const ae = /* @__PURE__ */ Symbol("evaluating");
65
- function d(e, n, t) {
64
+ const fe = /* @__PURE__ */ Symbol("evaluating");
65
+ function p(e, n, t) {
66
66
  let r;
67
67
  Object.defineProperty(e, n, {
68
68
  get() {
69
- if (r !== ae)
70
- return r === void 0 && (r = ae, r = t()), r;
69
+ if (r !== fe)
70
+ return r === void 0 && (r = fe, r = t()), r;
71
71
  },
72
72
  set(o) {
73
73
  Object.defineProperty(e, n, {
@@ -78,7 +78,7 @@ function d(e, n, t) {
78
78
  configurable: !0
79
79
  });
80
80
  }
81
- function sn(...e) {
81
+ function fn(...e) {
82
82
  const n = {};
83
83
  for (const t of e) {
84
84
  const r = Object.getOwnPropertyDescriptors(t);
@@ -86,30 +86,30 @@ function sn(...e) {
86
86
  }
87
87
  return Object.defineProperties({}, n);
88
88
  }
89
- function an(e) {
89
+ function mn(e) {
90
90
  return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
91
91
  }
92
- const Pe = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
92
+ const Ae = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
93
93
  };
94
- function ce(e) {
94
+ function me(e) {
95
95
  return typeof e == "object" && e !== null && !Array.isArray(e);
96
96
  }
97
- function X(e) {
98
- if (ce(e) === !1)
97
+ function H(e) {
98
+ if (me(e) === !1)
99
99
  return !1;
100
100
  const n = e.constructor;
101
101
  if (n === void 0 || typeof n != "function")
102
102
  return !0;
103
103
  const t = n.prototype;
104
- return !(ce(t) === !1 || Object.prototype.hasOwnProperty.call(t, "isPrototypeOf") === !1);
104
+ return !(me(t) === !1 || Object.prototype.hasOwnProperty.call(t, "isPrototypeOf") === !1);
105
105
  }
106
- function Ie(e) {
107
- return X(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
106
+ function Ne(e) {
107
+ return H(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
108
108
  }
109
- function re(e) {
109
+ function ie(e) {
110
110
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
111
111
  }
112
- function Ae(e, n, t) {
112
+ function Me(e, n, t) {
113
113
  const r = new e._zod.constr(n ?? e._zod.def);
114
114
  return (!n || t?.parent) && (r._zod.parent = e), r;
115
115
  }
@@ -126,14 +126,14 @@ function l(e) {
126
126
  }
127
127
  return delete n.message, typeof n.error == "string" ? { ...n, error: () => n.error } : n;
128
128
  }
129
- const cn = {
129
+ const ln = {
130
130
  safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
131
131
  int32: [-2147483648, 2147483647],
132
132
  uint32: [0, 4294967295],
133
133
  float32: [-34028234663852886e22, 34028234663852886e22],
134
134
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
135
135
  };
136
- function P(e, n = 0) {
136
+ function I(e, n = 0) {
137
137
  if (e.aborted === !0)
138
138
  return !0;
139
139
  for (let t = n; t < e.issues.length; t++)
@@ -141,27 +141,27 @@ function P(e, n = 0) {
141
141
  return !0;
142
142
  return !1;
143
143
  }
144
- function un(e, n) {
144
+ function dn(e, n) {
145
145
  return n.map((t) => {
146
146
  var r;
147
147
  return (r = t).path ?? (r.path = []), t.path.unshift(e), t;
148
148
  });
149
149
  }
150
- function D(e) {
150
+ function U(e) {
151
151
  return typeof e == "string" ? e : e?.message;
152
152
  }
153
153
  function T(e, n, t) {
154
154
  const r = { ...e, path: e.path ?? [] };
155
155
  if (!e.message) {
156
- const o = D(e.inst?._zod.def?.error?.(e)) ?? D(n?.error?.(e)) ?? D(t.customError?.(e)) ?? D(t.localeError?.(e)) ?? "Invalid input";
156
+ const o = U(e.inst?._zod.def?.error?.(e)) ?? U(n?.error?.(e)) ?? U(t.customError?.(e)) ?? U(t.localeError?.(e)) ?? "Invalid input";
157
157
  r.message = o;
158
158
  }
159
159
  return delete r.inst, delete r.continue, n?.reportInput || delete r.input, r;
160
160
  }
161
- function oe(e) {
161
+ function se(e) {
162
162
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
163
163
  }
164
- function j(...e) {
164
+ function F(...e) {
165
165
  const [n, t, r] = e;
166
166
  return typeof n == "string" ? {
167
167
  message: n,
@@ -170,25 +170,25 @@ function j(...e) {
170
170
  inst: r
171
171
  } : { ...n };
172
172
  }
173
- const Ne = (e, n) => {
173
+ const Re = (e, n) => {
174
174
  e.name = "$ZodError", Object.defineProperty(e, "_zod", {
175
175
  value: e._zod,
176
176
  enumerable: !1
177
177
  }), Object.defineProperty(e, "issues", {
178
178
  value: n,
179
179
  enumerable: !1
180
- }), e.message = JSON.stringify(n, Y, 2), Object.defineProperty(e, "toString", {
180
+ }), e.message = JSON.stringify(n, X, 2), Object.defineProperty(e, "toString", {
181
181
  value: () => e.message,
182
182
  enumerable: !1
183
183
  });
184
- }, Me = u("$ZodError", Ne), J = u("$ZodError", Ne, { Parent: Error });
185
- function fn(e, n = (t) => t.message) {
184
+ }, Ce = u("$ZodError", Re), V = u("$ZodError", Re, { Parent: Error });
185
+ function pn(e, n = (t) => t.message) {
186
186
  const t = {}, r = [];
187
187
  for (const o of e.issues)
188
188
  o.path.length > 0 ? (t[o.path[0]] = t[o.path[0]] || [], t[o.path[0]].push(n(o))) : r.push(n(o));
189
189
  return { formErrors: r, fieldErrors: t };
190
190
  }
191
- function mn(e, n = (t) => t.message) {
191
+ function hn(e, n = (t) => t.message) {
192
192
  const t = { _errors: [] }, r = (o) => {
193
193
  for (const s of o.issues)
194
194
  if (s.code === "invalid_union" && s.errors.length)
@@ -209,77 +209,77 @@ function mn(e, n = (t) => t.message) {
209
209
  };
210
210
  return r(e), t;
211
211
  }
212
- const U = (e) => (n, t, r, o) => {
212
+ const q = (e) => (n, t, r, o) => {
213
213
  const s = r ? Object.assign(r, { async: !1 }) : { async: !1 }, i = n._zod.run({ value: t, issues: [] }, s);
214
214
  if (i instanceof Promise)
215
- throw new I();
215
+ throw new A();
216
216
  if (i.issues.length) {
217
217
  const a = new (o?.Err ?? e)(i.issues.map((c) => T(c, s, S())));
218
- throw Pe(a, o?.callee), a;
218
+ throw Ae(a, o?.callee), a;
219
219
  }
220
220
  return i.value;
221
- }, ln = /* @__PURE__ */ U(J), V = (e) => async (n, t, r, o) => {
221
+ }, gn = /* @__PURE__ */ q(V), W = (e) => async (n, t, r, o) => {
222
222
  const s = r ? Object.assign(r, { async: !0 }) : { async: !0 };
223
223
  let i = n._zod.run({ value: t, issues: [] }, s);
224
224
  if (i instanceof Promise && (i = await i), i.issues.length) {
225
225
  const a = new (o?.Err ?? e)(i.issues.map((c) => T(c, s, S())));
226
- throw Pe(a, o?.callee), a;
226
+ throw Ae(a, o?.callee), a;
227
227
  }
228
228
  return i.value;
229
- }, dn = /* @__PURE__ */ V(J), W = (e) => (n, t, r) => {
229
+ }, _n = /* @__PURE__ */ W(V), G = (e) => (n, t, r) => {
230
230
  const o = r ? { ...r, async: !1 } : { async: !1 }, s = n._zod.run({ value: t, issues: [] }, o);
231
231
  if (s instanceof Promise)
232
- throw new I();
232
+ throw new A();
233
233
  return s.issues.length ? {
234
234
  success: !1,
235
- error: new (e ?? Me)(s.issues.map((i) => T(i, o, S())))
235
+ error: new (e ?? Ce)(s.issues.map((i) => T(i, o, S())))
236
236
  } : { success: !0, data: s.value };
237
- }, Ce = /* @__PURE__ */ W(J), q = (e) => async (n, t, r) => {
237
+ }, je = /* @__PURE__ */ G(V), B = (e) => async (n, t, r) => {
238
238
  const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
239
239
  let s = n._zod.run({ value: t, issues: [] }, o);
240
240
  return s instanceof Promise && (s = await s), s.issues.length ? {
241
241
  success: !1,
242
242
  error: new e(s.issues.map((i) => T(i, o, S())))
243
243
  } : { success: !0, data: s.value };
244
- }, Re = /* @__PURE__ */ q(J), pn = (e) => (n, t, r) => {
244
+ }, Fe = /* @__PURE__ */ B(V), yn = (e) => (n, t, r) => {
245
245
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
246
- return U(e)(n, t, o);
247
- }, hn = (e) => (n, t, r) => U(e)(n, t, r), gn = (e) => async (n, t, r) => {
248
- const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
249
- return V(e)(n, t, o);
250
- }, _n = (e) => async (n, t, r) => V(e)(n, t, r), yn = (e) => (n, t, r) => {
246
+ return q(e)(n, t, o);
247
+ }, wn = (e) => (n, t, r) => q(e)(n, t, r), vn = (e) => async (n, t, r) => {
251
248
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
252
249
  return W(e)(n, t, o);
253
- }, vn = (e) => (n, t, r) => W(e)(n, t, r), wn = (e) => async (n, t, r) => {
250
+ }, bn = (e) => async (n, t, r) => W(e)(n, t, r), zn = (e) => (n, t, r) => {
254
251
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
255
- return q(e)(n, t, o);
256
- }, zn = (e) => async (n, t, r) => q(e)(n, t, r), bn = /^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,}$/, $n = /^(?:(?: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])$/, Zn = /^(([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}|:))$/, En = /^(?=.{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])?)*\.?$/, je = "(?:(?:\\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])))", Sn = /* @__PURE__ */ new RegExp(`^${je}$`);
257
- function Fe(e) {
252
+ return G(e)(n, t, o);
253
+ }, kn = (e) => (n, t, r) => G(e)(n, t, r), $n = (e) => async (n, t, r) => {
254
+ const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
255
+ return B(e)(n, t, o);
256
+ }, Zn = (e) => async (n, t, r) => B(e)(n, t, r), En = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, le = (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)$/, Sn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Tn = /^(?:(?: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])$/, On = /^(([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}|:))$/, Pn = /^(?=.{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])?)*\.?$/, De = "(?:(?:\\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])))", In = /* @__PURE__ */ new RegExp(`^${De}$`);
257
+ function xe(e) {
258
258
  const n = "(?:[01]\\d|2[0-3]):[0-5]\\d";
259
259
  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+)?)?`;
260
260
  }
261
- function Tn(e) {
262
- return new RegExp(`^${Fe(e)}$`);
261
+ function An(e) {
262
+ return new RegExp(`^${xe(e)}$`);
263
263
  }
264
- function On(e) {
265
- const n = Fe({ precision: e.precision }), t = ["Z"];
264
+ function Nn(e) {
265
+ const n = xe({ precision: e.precision }), t = ["Z"];
266
266
  e.local && t.push(""), e.offset && t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
267
267
  const r = `${n}(?:${t.join("|")})`;
268
- return new RegExp(`^${je}T(?:${r})$`);
268
+ return new RegExp(`^${De}T(?:${r})$`);
269
269
  }
270
- const Pn = (e) => {
270
+ const Mn = (e) => {
271
271
  const n = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
272
272
  return new RegExp(`^${n}$`);
273
- }, In = /^-?\d+$/, An = /^-?\d+(?:\.\d+)?$/, Nn = /^(?:true|false)$/i, Mn = /^[^A-Z]*$/, Cn = /^[^a-z]*$/, k = /* @__PURE__ */ u("$ZodCheck", (e, n) => {
273
+ }, Rn = /^-?\d+$/, Cn = /^-?\d+(?:\.\d+)?$/, jn = /^(?:true|false)$/i, Fn = /^[^A-Z]*$/, Dn = /^[^a-z]*$/, k = /* @__PURE__ */ u("$ZodCheck", (e, n) => {
274
274
  var t;
275
275
  e._zod ?? (e._zod = {}), e._zod.def = n, (t = e._zod).onattach ?? (t.onattach = []);
276
- }), De = {
276
+ }), Ue = {
277
277
  number: "number",
278
278
  bigint: "bigint",
279
279
  object: "date"
280
- }, Rn = /* @__PURE__ */ u("$ZodCheckLessThan", (e, n) => {
280
+ }, xn = /* @__PURE__ */ u("$ZodCheckLessThan", (e, n) => {
281
281
  k.init(e, n);
282
- const t = De[typeof n.value];
282
+ const t = Ue[typeof n.value];
283
283
  e._zod.onattach.push((r) => {
284
284
  const o = r._zod.bag, s = (n.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
285
285
  n.value < s && (n.inclusive ? o.maximum = n.value : o.exclusiveMaximum = n.value);
@@ -294,9 +294,9 @@ const Pn = (e) => {
294
294
  continue: !n.abort
295
295
  });
296
296
  };
297
- }), jn = /* @__PURE__ */ u("$ZodCheckGreaterThan", (e, n) => {
297
+ }), Un = /* @__PURE__ */ u("$ZodCheckGreaterThan", (e, n) => {
298
298
  k.init(e, n);
299
- const t = De[typeof n.value];
299
+ const t = Ue[typeof n.value];
300
300
  e._zod.onattach.push((r) => {
301
301
  const o = r._zod.bag, s = (n.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
302
302
  n.value > s && (n.inclusive ? o.minimum = n.value : o.exclusiveMinimum = n.value);
@@ -311,12 +311,12 @@ const Pn = (e) => {
311
311
  continue: !n.abort
312
312
  });
313
313
  };
314
- }), Fn = /* @__PURE__ */ u("$ZodCheckNumberFormat", (e, n) => {
314
+ }), Ln = /* @__PURE__ */ u("$ZodCheckNumberFormat", (e, n) => {
315
315
  k.init(e, n), n.format = n.format || "float64";
316
- const t = n.format?.includes("int"), r = t ? "int" : "number", [o, s] = cn[n.format];
316
+ const t = n.format?.includes("int"), r = t ? "int" : "number", [o, s] = ln[n.format];
317
317
  e._zod.onattach.push((i) => {
318
318
  const a = i._zod.bag;
319
- a.format = n.format, a.minimum = o, a.maximum = s, t && (a.pattern = In);
319
+ a.format = n.format, a.minimum = o, a.maximum = s, t && (a.pattern = Rn);
320
320
  }), e._zod.check = (i) => {
321
321
  const a = i.value;
322
322
  if (t) {
@@ -372,11 +372,11 @@ const Pn = (e) => {
372
372
  continue: !n.abort
373
373
  });
374
374
  };
375
- }), Dn = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, n) => {
375
+ }), Jn = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, n) => {
376
376
  var t;
377
377
  k.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
378
378
  const o = r.value;
379
- return !ne(o) && o.length !== void 0;
379
+ return !re(o) && o.length !== void 0;
380
380
  }), e._zod.onattach.push((r) => {
381
381
  const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
382
382
  n.maximum < o && (r._zod.bag.maximum = n.maximum);
@@ -384,7 +384,7 @@ const Pn = (e) => {
384
384
  const o = r.value;
385
385
  if (o.length <= n.maximum)
386
386
  return;
387
- const i = oe(o);
387
+ const i = se(o);
388
388
  r.issues.push({
389
389
  origin: i,
390
390
  code: "too_big",
@@ -395,11 +395,11 @@ const Pn = (e) => {
395
395
  continue: !n.abort
396
396
  });
397
397
  };
398
- }), xn = /* @__PURE__ */ u("$ZodCheckMinLength", (e, n) => {
398
+ }), Vn = /* @__PURE__ */ u("$ZodCheckMinLength", (e, n) => {
399
399
  var t;
400
400
  k.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
401
401
  const o = r.value;
402
- return !ne(o) && o.length !== void 0;
402
+ return !re(o) && o.length !== void 0;
403
403
  }), e._zod.onattach.push((r) => {
404
404
  const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
405
405
  n.minimum > o && (r._zod.bag.minimum = n.minimum);
@@ -407,7 +407,7 @@ const Pn = (e) => {
407
407
  const o = r.value;
408
408
  if (o.length >= n.minimum)
409
409
  return;
410
- const i = oe(o);
410
+ const i = se(o);
411
411
  r.issues.push({
412
412
  origin: i,
413
413
  code: "too_small",
@@ -418,11 +418,11 @@ const Pn = (e) => {
418
418
  continue: !n.abort
419
419
  });
420
420
  };
421
- }), Ln = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, n) => {
421
+ }), qn = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, n) => {
422
422
  var t;
423
423
  k.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
424
424
  const o = r.value;
425
- return !ne(o) && o.length !== void 0;
425
+ return !re(o) && o.length !== void 0;
426
426
  }), e._zod.onattach.push((r) => {
427
427
  const o = r._zod.bag;
428
428
  o.minimum = n.length, o.maximum = n.length, o.length = n.length;
@@ -430,7 +430,7 @@ const Pn = (e) => {
430
430
  const o = r.value, s = o.length;
431
431
  if (s === n.length)
432
432
  return;
433
- const i = oe(o), a = s > n.length;
433
+ const i = se(o), a = s > n.length;
434
434
  r.issues.push({
435
435
  origin: i,
436
436
  ...a ? { code: "too_big", maximum: n.length } : { code: "too_small", minimum: n.length },
@@ -441,7 +441,7 @@ const Pn = (e) => {
441
441
  continue: !n.abort
442
442
  });
443
443
  };
444
- }), B = /* @__PURE__ */ u("$ZodCheckStringFormat", (e, n) => {
444
+ }), K = /* @__PURE__ */ u("$ZodCheckStringFormat", (e, n) => {
445
445
  var t, r;
446
446
  k.init(e, n), e._zod.onattach.push((o) => {
447
447
  const s = o._zod.bag;
@@ -458,8 +458,8 @@ const Pn = (e) => {
458
458
  });
459
459
  }) : (r = e._zod).check ?? (r.check = () => {
460
460
  });
461
- }), Jn = /* @__PURE__ */ u("$ZodCheckRegex", (e, n) => {
462
- B.init(e, n), e._zod.check = (t) => {
461
+ }), Wn = /* @__PURE__ */ u("$ZodCheckRegex", (e, n) => {
462
+ K.init(e, n), e._zod.check = (t) => {
463
463
  n.pattern.lastIndex = 0, !n.pattern.test(t.value) && t.issues.push({
464
464
  origin: "string",
465
465
  code: "invalid_format",
@@ -470,13 +470,13 @@ const Pn = (e) => {
470
470
  continue: !n.abort
471
471
  });
472
472
  };
473
- }), Un = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, n) => {
474
- n.pattern ?? (n.pattern = Mn), B.init(e, n);
475
- }), Vn = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, n) => {
476
- n.pattern ?? (n.pattern = Cn), B.init(e, n);
477
- }), Wn = /* @__PURE__ */ u("$ZodCheckIncludes", (e, n) => {
473
+ }), Gn = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, n) => {
474
+ n.pattern ?? (n.pattern = Fn), K.init(e, n);
475
+ }), Bn = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, n) => {
476
+ n.pattern ?? (n.pattern = Dn), K.init(e, n);
477
+ }), Kn = /* @__PURE__ */ u("$ZodCheckIncludes", (e, n) => {
478
478
  k.init(e, n);
479
- const t = re(n.includes), r = new RegExp(typeof n.position == "number" ? `^.{${n.position}}${t}` : t);
479
+ const t = ie(n.includes), r = new RegExp(typeof n.position == "number" ? `^.{${n.position}}${t}` : t);
480
480
  n.pattern = r, e._zod.onattach.push((o) => {
481
481
  const s = o._zod.bag;
482
482
  s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(r);
@@ -491,9 +491,9 @@ const Pn = (e) => {
491
491
  continue: !n.abort
492
492
  });
493
493
  };
494
- }), qn = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, n) => {
494
+ }), Yn = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, n) => {
495
495
  k.init(e, n);
496
- const t = new RegExp(`^${re(n.prefix)}.*`);
496
+ const t = new RegExp(`^${ie(n.prefix)}.*`);
497
497
  n.pattern ?? (n.pattern = t), e._zod.onattach.push((r) => {
498
498
  const o = r._zod.bag;
499
499
  o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(t);
@@ -508,9 +508,9 @@ const Pn = (e) => {
508
508
  continue: !n.abort
509
509
  });
510
510
  };
511
- }), Bn = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, n) => {
511
+ }), Xn = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, n) => {
512
512
  k.init(e, n);
513
- const t = new RegExp(`.*${re(n.suffix)}$`);
513
+ const t = new RegExp(`.*${ie(n.suffix)}$`);
514
514
  n.pattern ?? (n.pattern = t), e._zod.onattach.push((r) => {
515
515
  const o = r._zod.bag;
516
516
  o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(t);
@@ -525,17 +525,17 @@ const Pn = (e) => {
525
525
  continue: !n.abort
526
526
  });
527
527
  };
528
- }), Gn = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, n) => {
528
+ }), Hn = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, n) => {
529
529
  k.init(e, n), e._zod.check = (t) => {
530
530
  t.value = n.tx(t.value);
531
531
  };
532
- }), Kn = {
532
+ }), Qn = {
533
533
  major: 4,
534
534
  minor: 3,
535
535
  patch: 6
536
- }, y = /* @__PURE__ */ u("$ZodType", (e, n) => {
536
+ }, w = /* @__PURE__ */ u("$ZodType", (e, n) => {
537
537
  var t;
538
- e ?? (e = {}), e._zod.def = n, e._zod.bag = e._zod.bag || {}, e._zod.version = Kn;
538
+ e ?? (e = {}), e._zod.def = n, e._zod.bag = e._zod.bag || {}, e._zod.version = Qn;
539
539
  const r = [...e._zod.def.checks ?? []];
540
540
  e._zod.traits.has("$ZodCheck") && r.unshift(e);
541
541
  for (const o of r)
@@ -547,34 +547,34 @@ const Pn = (e) => {
547
547
  });
548
548
  else {
549
549
  const o = (i, a, c) => {
550
- let f = P(i), m;
551
- for (const p of a) {
552
- if (p._zod.def.when) {
553
- if (!p._zod.def.when(i))
550
+ let f = I(i), m;
551
+ for (const h of a) {
552
+ if (h._zod.def.when) {
553
+ if (!h._zod.def.when(i))
554
554
  continue;
555
555
  } else if (f)
556
556
  continue;
557
- const h = i.issues.length, g = p._zod.check(i);
558
- if (g instanceof Promise && c?.async === !1)
559
- throw new I();
560
- if (m || g instanceof Promise)
557
+ const g = i.issues.length, _ = h._zod.check(i);
558
+ if (_ instanceof Promise && c?.async === !1)
559
+ throw new A();
560
+ if (m || _ instanceof Promise)
561
561
  m = (m ?? Promise.resolve()).then(async () => {
562
- await g, i.issues.length !== h && (f || (f = P(i, h)));
562
+ await _, i.issues.length !== g && (f || (f = I(i, g)));
563
563
  });
564
564
  else {
565
- if (i.issues.length === h)
565
+ if (i.issues.length === g)
566
566
  continue;
567
- f || (f = P(i, h));
567
+ f || (f = I(i, g));
568
568
  }
569
569
  }
570
570
  return m ? m.then(() => i) : i;
571
571
  }, s = (i, a, c) => {
572
- if (P(i))
572
+ if (I(i))
573
573
  return i.aborted = !0, i;
574
574
  const f = o(a, r, c);
575
575
  if (f instanceof Promise) {
576
576
  if (c.async === !1)
577
- throw new I();
577
+ throw new A();
578
578
  return f.then((m) => e._zod.parse(m, c));
579
579
  }
580
580
  return e._zod.parse(f, c);
@@ -589,26 +589,26 @@ const Pn = (e) => {
589
589
  const c = e._zod.parse(i, a);
590
590
  if (c instanceof Promise) {
591
591
  if (a.async === !1)
592
- throw new I();
592
+ throw new A();
593
593
  return c.then((f) => o(f, r, a));
594
594
  }
595
595
  return o(c, r, a);
596
596
  };
597
597
  }
598
- d(e, "~standard", () => ({
598
+ p(e, "~standard", () => ({
599
599
  validate: (o) => {
600
600
  try {
601
- const s = Ce(e, o);
601
+ const s = je(e, o);
602
602
  return s.success ? { value: s.data } : { issues: s.error?.issues };
603
603
  } catch {
604
- return Re(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
604
+ return Fe(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
605
605
  }
606
606
  },
607
607
  vendor: "zod",
608
608
  version: 1
609
609
  }));
610
- }), ie = /* @__PURE__ */ u("$ZodString", (e, n) => {
611
- y.init(e, n), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Pn(e._zod.bag), e._zod.parse = (t, r) => {
610
+ }), ae = /* @__PURE__ */ u("$ZodString", (e, n) => {
611
+ w.init(e, n), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Mn(e._zod.bag), e._zod.parse = (t, r) => {
612
612
  if (n.coerce)
613
613
  try {
614
614
  t.value = String(t.value);
@@ -622,8 +622,8 @@ const Pn = (e) => {
622
622
  }), t;
623
623
  };
624
624
  }), $ = /* @__PURE__ */ u("$ZodStringFormat", (e, n) => {
625
- B.init(e, n), ie.init(e, n);
626
- }), Yn = /* @__PURE__ */ u("$ZodUUID", (e, n) => {
625
+ K.init(e, n), ae.init(e, n);
626
+ }), et = /* @__PURE__ */ u("$ZodUUID", (e, n) => {
627
627
  if (n.version) {
628
628
  const r = {
629
629
  v1: 1,
@@ -637,13 +637,13 @@ const Pn = (e) => {
637
637
  }[n.version];
638
638
  if (r === void 0)
639
639
  throw new Error(`Invalid UUID version: "${n.version}"`);
640
- n.pattern ?? (n.pattern = ue(r));
640
+ n.pattern ?? (n.pattern = le(r));
641
641
  } else
642
- n.pattern ?? (n.pattern = ue());
642
+ n.pattern ?? (n.pattern = le());
643
643
  $.init(e, n);
644
- }), Xn = /* @__PURE__ */ u("$ZodEmail", (e, n) => {
645
- n.pattern ?? (n.pattern = kn), $.init(e, n);
646
- }), Hn = /* @__PURE__ */ u("$ZodURL", (e, n) => {
644
+ }), nt = /* @__PURE__ */ u("$ZodEmail", (e, n) => {
645
+ n.pattern ?? (n.pattern = Sn), $.init(e, n);
646
+ }), tt = /* @__PURE__ */ u("$ZodURL", (e, n) => {
647
647
  $.init(e, n), e._zod.check = (t) => {
648
648
  try {
649
649
  const r = t.value.trim(), o = new URL(r);
@@ -675,18 +675,18 @@ const Pn = (e) => {
675
675
  });
676
676
  }
677
677
  };
678
- }), Qn = /* @__PURE__ */ u("$ZodISODateTime", (e, n) => {
679
- n.pattern ?? (n.pattern = On(n)), $.init(e, n);
680
- }), et = /* @__PURE__ */ u("$ZodISODate", (e, n) => {
681
- n.pattern ?? (n.pattern = Sn), $.init(e, n);
682
- }), nt = /* @__PURE__ */ u("$ZodISOTime", (e, n) => {
683
- n.pattern ?? (n.pattern = Tn(n)), $.init(e, n);
684
- }), tt = /* @__PURE__ */ u("$ZodISODuration", (e, n) => {
685
- n.pattern ?? (n.pattern = bn), $.init(e, n);
686
- }), rt = /* @__PURE__ */ u("$ZodIPv4", (e, n) => {
687
- n.pattern ?? (n.pattern = $n), $.init(e, n), e._zod.bag.format = "ipv4";
688
- }), ot = /* @__PURE__ */ u("$ZodIPv6", (e, n) => {
689
- n.pattern ?? (n.pattern = Zn), $.init(e, n), e._zod.bag.format = "ipv6", e._zod.check = (t) => {
678
+ }), rt = /* @__PURE__ */ u("$ZodISODateTime", (e, n) => {
679
+ n.pattern ?? (n.pattern = Nn(n)), $.init(e, n);
680
+ }), ot = /* @__PURE__ */ u("$ZodISODate", (e, n) => {
681
+ n.pattern ?? (n.pattern = In), $.init(e, n);
682
+ }), it = /* @__PURE__ */ u("$ZodISOTime", (e, n) => {
683
+ n.pattern ?? (n.pattern = An(n)), $.init(e, n);
684
+ }), st = /* @__PURE__ */ u("$ZodISODuration", (e, n) => {
685
+ n.pattern ?? (n.pattern = En), $.init(e, n);
686
+ }), at = /* @__PURE__ */ u("$ZodIPv4", (e, n) => {
687
+ n.pattern ?? (n.pattern = Tn), $.init(e, n), e._zod.bag.format = "ipv4";
688
+ }), ct = /* @__PURE__ */ u("$ZodIPv6", (e, n) => {
689
+ n.pattern ?? (n.pattern = On), $.init(e, n), e._zod.bag.format = "ipv6", e._zod.check = (t) => {
690
690
  try {
691
691
  new URL(`http://[${t.value}]`);
692
692
  } catch {
@@ -699,7 +699,7 @@ const Pn = (e) => {
699
699
  });
700
700
  }
701
701
  };
702
- }), it = /* @__PURE__ */ u("$ZodCustomStringFormat", (e, n) => {
702
+ }), ut = /* @__PURE__ */ u("$ZodCustomStringFormat", (e, n) => {
703
703
  $.init(e, n), e._zod.check = (t) => {
704
704
  n.fn(t.value) || t.issues.push({
705
705
  code: "invalid_format",
@@ -709,8 +709,8 @@ const Pn = (e) => {
709
709
  continue: !n.abort
710
710
  });
711
711
  };
712
- }), xe = /* @__PURE__ */ u("$ZodNumber", (e, n) => {
713
- y.init(e, n), e._zod.pattern = e._zod.bag.pattern ?? An, e._zod.parse = (t, r) => {
712
+ }), Le = /* @__PURE__ */ u("$ZodNumber", (e, n) => {
713
+ w.init(e, n), e._zod.pattern = e._zod.bag.pattern ?? Cn, e._zod.parse = (t, r) => {
714
714
  if (n.coerce)
715
715
  try {
716
716
  t.value = Number(t.value);
@@ -728,10 +728,10 @@ const Pn = (e) => {
728
728
  ...s ? { received: s } : {}
729
729
  }), t;
730
730
  };
731
- }), st = /* @__PURE__ */ u("$ZodNumberFormat", (e, n) => {
732
- Fn.init(e, n), xe.init(e, n);
733
- }), at = /* @__PURE__ */ u("$ZodBoolean", (e, n) => {
734
- y.init(e, n), e._zod.pattern = Nn, e._zod.parse = (t, r) => {
731
+ }), ft = /* @__PURE__ */ u("$ZodNumberFormat", (e, n) => {
732
+ Ln.init(e, n), Le.init(e, n);
733
+ }), mt = /* @__PURE__ */ u("$ZodBoolean", (e, n) => {
734
+ w.init(e, n), e._zod.pattern = jn, e._zod.parse = (t, r) => {
735
735
  if (n.coerce)
736
736
  try {
737
737
  t.value = !!t.value;
@@ -745,14 +745,14 @@ const Pn = (e) => {
745
745
  inst: e
746
746
  }), t;
747
747
  };
748
- }), ct = /* @__PURE__ */ u("$ZodAny", (e, n) => {
749
- y.init(e, n), e._zod.parse = (t) => t;
748
+ }), lt = /* @__PURE__ */ u("$ZodAny", (e, n) => {
749
+ w.init(e, n), e._zod.parse = (t) => t;
750
750
  });
751
- function fe(e, n, t) {
752
- e.issues.length && n.issues.push(...un(t, e.issues)), n.value[t] = e.value;
751
+ function de(e, n, t) {
752
+ e.issues.length && n.issues.push(...dn(t, e.issues)), n.value[t] = e.value;
753
753
  }
754
- const Le = /* @__PURE__ */ u("$ZodArray", (e, n) => {
755
- y.init(e, n), e._zod.parse = (t, r) => {
754
+ const Je = /* @__PURE__ */ u("$ZodArray", (e, n) => {
755
+ w.init(e, n), e._zod.parse = (t, r) => {
756
756
  const o = t.value;
757
757
  if (!Array.isArray(o))
758
758
  return t.issues.push({
@@ -768,16 +768,16 @@ const Le = /* @__PURE__ */ u("$ZodArray", (e, n) => {
768
768
  value: a,
769
769
  issues: []
770
770
  }, r);
771
- c instanceof Promise ? s.push(c.then((f) => fe(f, t, i))) : fe(c, t, i);
771
+ c instanceof Promise ? s.push(c.then((f) => de(f, t, i))) : de(c, t, i);
772
772
  }
773
773
  return s.length ? Promise.all(s).then(() => t) : t;
774
774
  };
775
775
  });
776
- function me(e, n, t, r) {
776
+ function pe(e, n, t, r) {
777
777
  for (const s of e)
778
778
  if (s.issues.length === 0)
779
779
  return n.value = s.value, n;
780
- const o = e.filter((s) => !P(s));
780
+ const o = e.filter((s) => !I(s));
781
781
  return o.length === 1 ? (n.value = o[0].value, o[0]) : (n.issues.push({
782
782
  code: "invalid_union",
783
783
  input: n.value,
@@ -785,14 +785,14 @@ function me(e, n, t, r) {
785
785
  errors: e.map((s) => s.issues.map((i) => T(i, r, S())))
786
786
  }), n);
787
787
  }
788
- const ut = /* @__PURE__ */ u("$ZodUnion", (e, n) => {
789
- y.init(e, n), d(e._zod, "optin", () => n.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), d(e._zod, "optout", () => n.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), d(e._zod, "values", () => {
788
+ const dt = /* @__PURE__ */ u("$ZodUnion", (e, n) => {
789
+ w.init(e, n), p(e._zod, "optin", () => n.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), p(e._zod, "optout", () => n.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), p(e._zod, "values", () => {
790
790
  if (n.options.every((o) => o._zod.values))
791
791
  return new Set(n.options.flatMap((o) => Array.from(o._zod.values)));
792
- }), d(e._zod, "pattern", () => {
792
+ }), p(e._zod, "pattern", () => {
793
793
  if (n.options.every((o) => o._zod.pattern)) {
794
794
  const o = n.options.map((s) => s._zod.pattern);
795
- return new RegExp(`^(${o.map((s) => te(s.source)).join("|")})$`);
795
+ return new RegExp(`^(${o.map((s) => oe(s.source)).join("|")})$`);
796
796
  }
797
797
  });
798
798
  const t = n.options.length === 1, r = n.options[0]._zod.run;
@@ -814,23 +814,23 @@ const ut = /* @__PURE__ */ u("$ZodUnion", (e, n) => {
814
814
  a.push(f);
815
815
  }
816
816
  }
817
- return i ? Promise.all(a).then((c) => me(c, o, e, s)) : me(a, o, e, s);
817
+ return i ? Promise.all(a).then((c) => pe(c, o, e, s)) : pe(a, o, e, s);
818
818
  };
819
- }), ft = /* @__PURE__ */ u("$ZodIntersection", (e, n) => {
820
- y.init(e, n), e._zod.parse = (t, r) => {
819
+ }), pt = /* @__PURE__ */ u("$ZodIntersection", (e, n) => {
820
+ w.init(e, n), e._zod.parse = (t, r) => {
821
821
  const o = t.value, s = n.left._zod.run({ value: o, issues: [] }, r), i = n.right._zod.run({ value: o, issues: [] }, r);
822
- return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([c, f]) => le(t, c, f)) : le(t, s, i);
822
+ return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([c, f]) => he(t, c, f)) : he(t, s, i);
823
823
  };
824
824
  });
825
- function H(e, n) {
825
+ function Q(e, n) {
826
826
  if (e === n)
827
827
  return { valid: !0, data: e };
828
828
  if (e instanceof Date && n instanceof Date && +e == +n)
829
829
  return { valid: !0, data: e };
830
- if (X(e) && X(n)) {
830
+ if (H(e) && H(n)) {
831
831
  const t = Object.keys(n), r = Object.keys(e).filter((s) => t.indexOf(s) !== -1), o = { ...e, ...n };
832
832
  for (const s of r) {
833
- const i = H(e[s], n[s]);
833
+ const i = Q(e[s], n[s]);
834
834
  if (!i.valid)
835
835
  return {
836
836
  valid: !1,
@@ -845,7 +845,7 @@ function H(e, n) {
845
845
  return { valid: !1, mergeErrorPath: [] };
846
846
  const t = [];
847
847
  for (let r = 0; r < e.length; r++) {
848
- const o = e[r], s = n[r], i = H(o, s);
848
+ const o = e[r], s = n[r], i = Q(o, s);
849
849
  if (!i.valid)
850
850
  return {
851
851
  valid: !1,
@@ -857,7 +857,7 @@ function H(e, n) {
857
857
  }
858
858
  return { valid: !1, mergeErrorPath: [] };
859
859
  }
860
- function le(e, n, t) {
860
+ function he(e, n, t) {
861
861
  const r = /* @__PURE__ */ new Map();
862
862
  let o;
863
863
  for (const a of n.issues)
@@ -874,71 +874,71 @@ function le(e, n, t) {
874
874
  else
875
875
  e.issues.push(a);
876
876
  const s = [...r].filter(([, a]) => a.l && a.r).map(([a]) => a);
877
- if (s.length && o && e.issues.push({ ...o, keys: s }), P(e))
877
+ if (s.length && o && e.issues.push({ ...o, keys: s }), I(e))
878
878
  return e;
879
- const i = H(n.value, t.value);
879
+ const i = Q(n.value, t.value);
880
880
  if (!i.valid)
881
881
  throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);
882
882
  return e.value = i.data, e;
883
883
  }
884
- const mt = /* @__PURE__ */ u("$ZodTransform", (e, n) => {
885
- y.init(e, n), e._zod.parse = (t, r) => {
884
+ const ht = /* @__PURE__ */ u("$ZodTransform", (e, n) => {
885
+ w.init(e, n), e._zod.parse = (t, r) => {
886
886
  if (r.direction === "backward")
887
- throw new Oe(e.constructor.name);
887
+ throw new Ie(e.constructor.name);
888
888
  const o = n.transform(t.value, t);
889
889
  if (r.async)
890
890
  return (o instanceof Promise ? o : Promise.resolve(o)).then((i) => (t.value = i, t));
891
891
  if (o instanceof Promise)
892
- throw new I();
892
+ throw new A();
893
893
  return t.value = o, t;
894
894
  };
895
895
  });
896
- function de(e, n) {
896
+ function ge(e, n) {
897
897
  return e.issues.length && n === void 0 ? { issues: [], value: void 0 } : e;
898
898
  }
899
- const se = /* @__PURE__ */ u("$ZodOptional", (e, n) => {
900
- y.init(e, n), e._zod.optin = "optional", e._zod.optout = "optional", d(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, void 0]) : void 0), d(e._zod, "pattern", () => {
899
+ const ce = /* @__PURE__ */ u("$ZodOptional", (e, n) => {
900
+ w.init(e, n), e._zod.optin = "optional", e._zod.optout = "optional", p(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, void 0]) : void 0), p(e._zod, "pattern", () => {
901
901
  const t = n.innerType._zod.pattern;
902
- return t ? new RegExp(`^(${te(t.source)})?$`) : void 0;
902
+ return t ? new RegExp(`^(${oe(t.source)})?$`) : void 0;
903
903
  }), e._zod.parse = (t, r) => {
904
904
  if (n.innerType._zod.optin === "optional") {
905
905
  const o = n.innerType._zod.run(t, r);
906
- return o instanceof Promise ? o.then((s) => de(s, t.value)) : de(o, t.value);
906
+ return o instanceof Promise ? o.then((s) => ge(s, t.value)) : ge(o, t.value);
907
907
  }
908
908
  return t.value === void 0 ? t : n.innerType._zod.run(t, r);
909
909
  };
910
- }), lt = /* @__PURE__ */ u("$ZodExactOptional", (e, n) => {
911
- se.init(e, n), d(e._zod, "values", () => n.innerType._zod.values), d(e._zod, "pattern", () => n.innerType._zod.pattern), e._zod.parse = (t, r) => n.innerType._zod.run(t, r);
912
- }), dt = /* @__PURE__ */ u("$ZodNullable", (e, n) => {
913
- y.init(e, n), d(e._zod, "optin", () => n.innerType._zod.optin), d(e._zod, "optout", () => n.innerType._zod.optout), d(e._zod, "pattern", () => {
910
+ }), gt = /* @__PURE__ */ u("$ZodExactOptional", (e, n) => {
911
+ ce.init(e, n), p(e._zod, "values", () => n.innerType._zod.values), p(e._zod, "pattern", () => n.innerType._zod.pattern), e._zod.parse = (t, r) => n.innerType._zod.run(t, r);
912
+ }), _t = /* @__PURE__ */ u("$ZodNullable", (e, n) => {
913
+ w.init(e, n), p(e._zod, "optin", () => n.innerType._zod.optin), p(e._zod, "optout", () => n.innerType._zod.optout), p(e._zod, "pattern", () => {
914
914
  const t = n.innerType._zod.pattern;
915
- return t ? new RegExp(`^(${te(t.source)}|null)$`) : void 0;
916
- }), d(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);
917
- }), pt = /* @__PURE__ */ u("$ZodDefault", (e, n) => {
918
- y.init(e, n), e._zod.optin = "optional", d(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => {
915
+ return t ? new RegExp(`^(${oe(t.source)}|null)$`) : void 0;
916
+ }), p(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);
917
+ }), yt = /* @__PURE__ */ u("$ZodDefault", (e, n) => {
918
+ w.init(e, n), e._zod.optin = "optional", p(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => {
919
919
  if (r.direction === "backward")
920
920
  return n.innerType._zod.run(t, r);
921
921
  if (t.value === void 0)
922
922
  return t.value = n.defaultValue, t;
923
923
  const o = n.innerType._zod.run(t, r);
924
- return o instanceof Promise ? o.then((s) => pe(s, n)) : pe(o, n);
924
+ return o instanceof Promise ? o.then((s) => _e(s, n)) : _e(o, n);
925
925
  };
926
926
  });
927
- function pe(e, n) {
927
+ function _e(e, n) {
928
928
  return e.value === void 0 && (e.value = n.defaultValue), e;
929
929
  }
930
- const ht = /* @__PURE__ */ u("$ZodPrefault", (e, n) => {
931
- y.init(e, n), e._zod.optin = "optional", d(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));
932
- }), gt = /* @__PURE__ */ u("$ZodNonOptional", (e, n) => {
933
- y.init(e, n), d(e._zod, "values", () => {
930
+ const wt = /* @__PURE__ */ u("$ZodPrefault", (e, n) => {
931
+ w.init(e, n), e._zod.optin = "optional", p(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));
932
+ }), vt = /* @__PURE__ */ u("$ZodNonOptional", (e, n) => {
933
+ w.init(e, n), p(e._zod, "values", () => {
934
934
  const t = n.innerType._zod.values;
935
935
  return t ? new Set([...t].filter((r) => r !== void 0)) : void 0;
936
936
  }), e._zod.parse = (t, r) => {
937
937
  const o = n.innerType._zod.run(t, r);
938
- return o instanceof Promise ? o.then((s) => he(s, e)) : he(o, e);
938
+ return o instanceof Promise ? o.then((s) => ye(s, e)) : ye(o, e);
939
939
  };
940
940
  });
941
- function he(e, n) {
941
+ function ye(e, n) {
942
942
  return !e.issues.length && e.value === void 0 && e.issues.push({
943
943
  code: "invalid_type",
944
944
  expected: "nonoptional",
@@ -946,8 +946,8 @@ function he(e, n) {
946
946
  inst: n
947
947
  }), e;
948
948
  }
949
- const _t = /* @__PURE__ */ u("$ZodCatch", (e, n) => {
950
- y.init(e, n), d(e._zod, "optin", () => n.innerType._zod.optin), d(e._zod, "optout", () => n.innerType._zod.optout), d(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => {
949
+ const bt = /* @__PURE__ */ u("$ZodCatch", (e, n) => {
950
+ w.init(e, n), p(e._zod, "optin", () => n.innerType._zod.optin), p(e._zod, "optout", () => n.innerType._zod.optout), p(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => {
951
951
  if (r.direction === "backward")
952
952
  return n.innerType._zod.run(t, r);
953
953
  const o = n.innerType._zod.run(t, r);
@@ -965,39 +965,39 @@ const _t = /* @__PURE__ */ u("$ZodCatch", (e, n) => {
965
965
  input: t.value
966
966
  }), t.issues = []), t);
967
967
  };
968
- }), yt = /* @__PURE__ */ u("$ZodPipe", (e, n) => {
969
- y.init(e, n), d(e._zod, "values", () => n.in._zod.values), d(e._zod, "optin", () => n.in._zod.optin), d(e._zod, "optout", () => n.out._zod.optout), d(e._zod, "propValues", () => n.in._zod.propValues), e._zod.parse = (t, r) => {
968
+ }), zt = /* @__PURE__ */ u("$ZodPipe", (e, n) => {
969
+ w.init(e, n), p(e._zod, "values", () => n.in._zod.values), p(e._zod, "optin", () => n.in._zod.optin), p(e._zod, "optout", () => n.out._zod.optout), p(e._zod, "propValues", () => n.in._zod.propValues), e._zod.parse = (t, r) => {
970
970
  if (r.direction === "backward") {
971
971
  const s = n.out._zod.run(t, r);
972
- return s instanceof Promise ? s.then((i) => x(i, n.in, r)) : x(s, n.in, r);
972
+ return s instanceof Promise ? s.then((i) => L(i, n.in, r)) : L(s, n.in, r);
973
973
  }
974
974
  const o = n.in._zod.run(t, r);
975
- return o instanceof Promise ? o.then((s) => x(s, n.out, r)) : x(o, n.out, r);
975
+ return o instanceof Promise ? o.then((s) => L(s, n.out, r)) : L(o, n.out, r);
976
976
  };
977
977
  });
978
- function x(e, n, t) {
978
+ function L(e, n, t) {
979
979
  return e.issues.length ? (e.aborted = !0, e) : n._zod.run({ value: e.value, issues: e.issues }, t);
980
980
  }
981
- const vt = /* @__PURE__ */ u("$ZodReadonly", (e, n) => {
982
- y.init(e, n), d(e._zod, "propValues", () => n.innerType._zod.propValues), d(e._zod, "values", () => n.innerType._zod.values), d(e._zod, "optin", () => n.innerType?._zod?.optin), d(e._zod, "optout", () => n.innerType?._zod?.optout), e._zod.parse = (t, r) => {
981
+ const kt = /* @__PURE__ */ u("$ZodReadonly", (e, n) => {
982
+ w.init(e, n), p(e._zod, "propValues", () => n.innerType._zod.propValues), p(e._zod, "values", () => n.innerType._zod.values), p(e._zod, "optin", () => n.innerType?._zod?.optin), p(e._zod, "optout", () => n.innerType?._zod?.optout), e._zod.parse = (t, r) => {
983
983
  if (r.direction === "backward")
984
984
  return n.innerType._zod.run(t, r);
985
985
  const o = n.innerType._zod.run(t, r);
986
- return o instanceof Promise ? o.then(ge) : ge(o);
986
+ return o instanceof Promise ? o.then(we) : we(o);
987
987
  };
988
988
  });
989
- function ge(e) {
989
+ function we(e) {
990
990
  return e.value = Object.freeze(e.value), e;
991
991
  }
992
- const Je = /* @__PURE__ */ u("$ZodCustom", (e, n) => {
993
- k.init(e, n), y.init(e, n), e._zod.parse = (t, r) => t, e._zod.check = (t) => {
992
+ const Ve = /* @__PURE__ */ u("$ZodCustom", (e, n) => {
993
+ k.init(e, n), w.init(e, n), e._zod.parse = (t, r) => t, e._zod.check = (t) => {
994
994
  const r = t.value, o = n.fn(r);
995
995
  if (o instanceof Promise)
996
- return o.then((s) => _e(s, t, r, e));
997
- _e(o, t, r, e);
996
+ return o.then((s) => ve(s, t, r, e));
997
+ ve(o, t, r, e);
998
998
  };
999
999
  });
1000
- function _e(e, n, t, r) {
1000
+ function ve(e, n, t, r) {
1001
1001
  if (!e) {
1002
1002
  const o = {
1003
1003
  code: "custom",
@@ -1009,11 +1009,11 @@ function _e(e, n, t, r) {
1009
1009
  continue: !r._zod.def.abort
1010
1010
  // params: inst._zod.def.params,
1011
1011
  };
1012
- r._zod.def.params && (o.params = r._zod.def.params), n.issues.push(j(o));
1012
+ r._zod.def.params && (o.params = r._zod.def.params), n.issues.push(F(o));
1013
1013
  }
1014
1014
  }
1015
- var ye;
1016
- class wt {
1015
+ var be;
1016
+ class $t {
1017
1017
  constructor() {
1018
1018
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
1019
1019
  }
@@ -1042,20 +1042,20 @@ class wt {
1042
1042
  return this._map.has(n);
1043
1043
  }
1044
1044
  }
1045
- function zt() {
1046
- return new wt();
1045
+ function Zt() {
1046
+ return new $t();
1047
1047
  }
1048
- (ye = globalThis).__zod_globalRegistry ?? (ye.__zod_globalRegistry = zt());
1049
- const R = globalThis.__zod_globalRegistry;
1048
+ (be = globalThis).__zod_globalRegistry ?? (be.__zod_globalRegistry = Zt());
1049
+ const j = globalThis.__zod_globalRegistry;
1050
1050
  // @__NO_SIDE_EFFECTS__
1051
- function bt(e, n) {
1051
+ function Et(e, n) {
1052
1052
  return new e({
1053
1053
  type: "string",
1054
1054
  ...l(n)
1055
1055
  });
1056
1056
  }
1057
1057
  // @__NO_SIDE_EFFECTS__
1058
- function kt(e, n) {
1058
+ function St(e, n) {
1059
1059
  return new e({
1060
1060
  type: "string",
1061
1061
  format: "email",
@@ -1065,7 +1065,7 @@ function kt(e, n) {
1065
1065
  });
1066
1066
  }
1067
1067
  // @__NO_SIDE_EFFECTS__
1068
- function $t(e, n) {
1068
+ function Tt(e, n) {
1069
1069
  return new e({
1070
1070
  type: "string",
1071
1071
  format: "uuid",
@@ -1075,7 +1075,7 @@ function $t(e, n) {
1075
1075
  });
1076
1076
  }
1077
1077
  // @__NO_SIDE_EFFECTS__
1078
- function Zt(e, n) {
1078
+ function Ot(e, n) {
1079
1079
  return new e({
1080
1080
  type: "string",
1081
1081
  format: "url",
@@ -1085,7 +1085,7 @@ function Zt(e, n) {
1085
1085
  });
1086
1086
  }
1087
1087
  // @__NO_SIDE_EFFECTS__
1088
- function Et(e, n) {
1088
+ function Pt(e, n) {
1089
1089
  return new e({
1090
1090
  type: "string",
1091
1091
  format: "ipv4",
@@ -1095,7 +1095,7 @@ function Et(e, n) {
1095
1095
  });
1096
1096
  }
1097
1097
  // @__NO_SIDE_EFFECTS__
1098
- function St(e, n) {
1098
+ function It(e, n) {
1099
1099
  return new e({
1100
1100
  type: "string",
1101
1101
  format: "ipv6",
@@ -1105,7 +1105,7 @@ function St(e, n) {
1105
1105
  });
1106
1106
  }
1107
1107
  // @__NO_SIDE_EFFECTS__
1108
- function Tt(e, n) {
1108
+ function At(e, n) {
1109
1109
  return new e({
1110
1110
  type: "string",
1111
1111
  format: "datetime",
@@ -1117,7 +1117,7 @@ function Tt(e, n) {
1117
1117
  });
1118
1118
  }
1119
1119
  // @__NO_SIDE_EFFECTS__
1120
- function Ot(e, n) {
1120
+ function Nt(e, n) {
1121
1121
  return new e({
1122
1122
  type: "string",
1123
1123
  format: "date",
@@ -1126,7 +1126,7 @@ function Ot(e, n) {
1126
1126
  });
1127
1127
  }
1128
1128
  // @__NO_SIDE_EFFECTS__
1129
- function Pt(e, n) {
1129
+ function Mt(e, n) {
1130
1130
  return new e({
1131
1131
  type: "string",
1132
1132
  format: "time",
@@ -1136,7 +1136,7 @@ function Pt(e, n) {
1136
1136
  });
1137
1137
  }
1138
1138
  // @__NO_SIDE_EFFECTS__
1139
- function It(e, n) {
1139
+ function Rt(e, n) {
1140
1140
  return new e({
1141
1141
  type: "string",
1142
1142
  format: "duration",
@@ -1145,7 +1145,7 @@ function It(e, n) {
1145
1145
  });
1146
1146
  }
1147
1147
  // @__NO_SIDE_EFFECTS__
1148
- function At(e, n) {
1148
+ function Ct(e, n) {
1149
1149
  return new e({
1150
1150
  type: "number",
1151
1151
  checks: [],
@@ -1153,7 +1153,7 @@ function At(e, n) {
1153
1153
  });
1154
1154
  }
1155
1155
  // @__NO_SIDE_EFFECTS__
1156
- function Nt(e, n) {
1156
+ function jt(e, n) {
1157
1157
  return new e({
1158
1158
  type: "number",
1159
1159
  check: "number_format",
@@ -1163,21 +1163,21 @@ function Nt(e, n) {
1163
1163
  });
1164
1164
  }
1165
1165
  // @__NO_SIDE_EFFECTS__
1166
- function Mt(e, n) {
1166
+ function Ft(e, n) {
1167
1167
  return new e({
1168
1168
  type: "boolean",
1169
1169
  ...l(n)
1170
1170
  });
1171
1171
  }
1172
1172
  // @__NO_SIDE_EFFECTS__
1173
- function Ct(e) {
1173
+ function Dt(e) {
1174
1174
  return new e({
1175
1175
  type: "any"
1176
1176
  });
1177
1177
  }
1178
1178
  // @__NO_SIDE_EFFECTS__
1179
- function Rt(e, n) {
1180
- return new Rn({
1179
+ function xt(e, n) {
1180
+ return new xn({
1181
1181
  check: "less_than",
1182
1182
  ...l(n),
1183
1183
  value: e,
@@ -1185,8 +1185,8 @@ function Rt(e, n) {
1185
1185
  });
1186
1186
  }
1187
1187
  // @__NO_SIDE_EFFECTS__
1188
- function jt(e, n) {
1189
- return new jn({
1188
+ function Ut(e, n) {
1189
+ return new Un({
1190
1190
  check: "greater_than",
1191
1191
  ...l(n),
1192
1192
  value: e,
@@ -1194,32 +1194,32 @@ function jt(e, n) {
1194
1194
  });
1195
1195
  }
1196
1196
  // @__NO_SIDE_EFFECTS__
1197
- function G(e, n) {
1198
- return new Dn({
1197
+ function x(e, n) {
1198
+ return new Jn({
1199
1199
  check: "max_length",
1200
1200
  ...l(n),
1201
1201
  maximum: e
1202
1202
  });
1203
1203
  }
1204
1204
  // @__NO_SIDE_EFFECTS__
1205
- function A(e, n) {
1206
- return new xn({
1205
+ function O(e, n) {
1206
+ return new Vn({
1207
1207
  check: "min_length",
1208
1208
  ...l(n),
1209
1209
  minimum: e
1210
1210
  });
1211
1211
  }
1212
1212
  // @__NO_SIDE_EFFECTS__
1213
- function Ue(e, n) {
1214
- return new Ln({
1213
+ function qe(e, n) {
1214
+ return new qn({
1215
1215
  check: "length_equals",
1216
1216
  ...l(n),
1217
1217
  length: e
1218
1218
  });
1219
1219
  }
1220
1220
  // @__NO_SIDE_EFFECTS__
1221
- function Ve(e, n) {
1222
- return new Jn({
1221
+ function We(e, n) {
1222
+ return new Wn({
1223
1223
  check: "string_format",
1224
1224
  format: "regex",
1225
1225
  ...l(n),
@@ -1227,24 +1227,24 @@ function Ve(e, n) {
1227
1227
  });
1228
1228
  }
1229
1229
  // @__NO_SIDE_EFFECTS__
1230
- function Ft(e) {
1231
- return new Un({
1230
+ function Lt(e) {
1231
+ return new Gn({
1232
1232
  check: "string_format",
1233
1233
  format: "lowercase",
1234
1234
  ...l(e)
1235
1235
  });
1236
1236
  }
1237
1237
  // @__NO_SIDE_EFFECTS__
1238
- function Dt(e) {
1239
- return new Vn({
1238
+ function Jt(e) {
1239
+ return new Bn({
1240
1240
  check: "string_format",
1241
1241
  format: "uppercase",
1242
1242
  ...l(e)
1243
1243
  });
1244
1244
  }
1245
1245
  // @__NO_SIDE_EFFECTS__
1246
- function xt(e, n) {
1247
- return new Wn({
1246
+ function Vt(e, n) {
1247
+ return new Kn({
1248
1248
  check: "string_format",
1249
1249
  format: "includes",
1250
1250
  ...l(n),
@@ -1252,8 +1252,8 @@ function xt(e, n) {
1252
1252
  });
1253
1253
  }
1254
1254
  // @__NO_SIDE_EFFECTS__
1255
- function Lt(e, n) {
1256
- return new qn({
1255
+ function qt(e, n) {
1256
+ return new Yn({
1257
1257
  check: "string_format",
1258
1258
  format: "starts_with",
1259
1259
  ...l(n),
@@ -1261,8 +1261,8 @@ function Lt(e, n) {
1261
1261
  });
1262
1262
  }
1263
1263
  // @__NO_SIDE_EFFECTS__
1264
- function Jt(e, n) {
1265
- return new Bn({
1264
+ function Wt(e, n) {
1265
+ return new Xn({
1266
1266
  check: "string_format",
1267
1267
  format: "ends_with",
1268
1268
  ...l(n),
@@ -1271,33 +1271,33 @@ function Jt(e, n) {
1271
1271
  }
1272
1272
  // @__NO_SIDE_EFFECTS__
1273
1273
  function N(e) {
1274
- return new Gn({
1274
+ return new Hn({
1275
1275
  check: "overwrite",
1276
1276
  tx: e
1277
1277
  });
1278
1278
  }
1279
1279
  // @__NO_SIDE_EFFECTS__
1280
- function Ut(e) {
1280
+ function Gt(e) {
1281
1281
  return /* @__PURE__ */ N((n) => n.normalize(e));
1282
1282
  }
1283
1283
  // @__NO_SIDE_EFFECTS__
1284
- function Vt() {
1284
+ function Bt() {
1285
1285
  return /* @__PURE__ */ N((e) => e.trim());
1286
1286
  }
1287
1287
  // @__NO_SIDE_EFFECTS__
1288
- function Wt() {
1288
+ function Kt() {
1289
1289
  return /* @__PURE__ */ N((e) => e.toLowerCase());
1290
1290
  }
1291
1291
  // @__NO_SIDE_EFFECTS__
1292
- function qt() {
1292
+ function Yt() {
1293
1293
  return /* @__PURE__ */ N((e) => e.toUpperCase());
1294
1294
  }
1295
1295
  // @__NO_SIDE_EFFECTS__
1296
- function Bt() {
1297
- return /* @__PURE__ */ N((e) => an(e));
1296
+ function Xt() {
1297
+ return /* @__PURE__ */ N((e) => mn(e));
1298
1298
  }
1299
1299
  // @__NO_SIDE_EFFECTS__
1300
- function Gt(e, n, t) {
1300
+ function Ht(e, n, t) {
1301
1301
  return new e({
1302
1302
  type: "array",
1303
1303
  element: n,
@@ -1308,7 +1308,7 @@ function Gt(e, n, t) {
1308
1308
  });
1309
1309
  }
1310
1310
  // @__NO_SIDE_EFFECTS__
1311
- function We(e, n, t) {
1311
+ function Ge(e, n, t) {
1312
1312
  return new e({
1313
1313
  type: "custom",
1314
1314
  check: "custom",
@@ -1317,19 +1317,19 @@ function We(e, n, t) {
1317
1317
  });
1318
1318
  }
1319
1319
  // @__NO_SIDE_EFFECTS__
1320
- function qe(e) {
1321
- const n = /* @__PURE__ */ Kt((t) => (t.addIssue = (r) => {
1320
+ function Be(e) {
1321
+ const n = /* @__PURE__ */ Qt((t) => (t.addIssue = (r) => {
1322
1322
  if (typeof r == "string")
1323
- t.issues.push(j(r, t.value, n._zod.def));
1323
+ t.issues.push(F(r, t.value, n._zod.def));
1324
1324
  else {
1325
1325
  const o = r;
1326
- 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));
1326
+ 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(F(o));
1327
1327
  }
1328
1328
  }, e(t.value, t)));
1329
1329
  return n;
1330
1330
  }
1331
1331
  // @__NO_SIDE_EFFECTS__
1332
- function Kt(e, n) {
1332
+ function Qt(e, n) {
1333
1333
  const t = new k({
1334
1334
  check: "custom",
1335
1335
  ...l(n)
@@ -1337,7 +1337,7 @@ function Kt(e, n) {
1337
1337
  return t._zod.check = e, t;
1338
1338
  }
1339
1339
  // @__NO_SIDE_EFFECTS__
1340
- function Yt(e, n, t, r = {}) {
1340
+ function er(e, n, t, r = {}) {
1341
1341
  const o = l(r), s = {
1342
1342
  ...l(r),
1343
1343
  check: "string_format",
@@ -1348,11 +1348,11 @@ function Yt(e, n, t, r = {}) {
1348
1348
  };
1349
1349
  return t instanceof RegExp && (s.pattern = t), new e(s);
1350
1350
  }
1351
- function Be(e) {
1351
+ function Ke(e) {
1352
1352
  let n = e?.target ?? "draft-2020-12";
1353
1353
  return n === "draft-4" && (n = "draft-04"), n === "draft-7" && (n = "draft-07"), {
1354
1354
  processors: e.processors ?? {},
1355
- metadataRegistry: e?.metadata ?? R,
1355
+ metadataRegistry: e?.metadata ?? j,
1356
1356
  target: n,
1357
1357
  unrepresentable: e?.unrepresentable ?? "throw",
1358
1358
  override: e?.override ?? (() => {
@@ -1365,7 +1365,7 @@ function Be(e) {
1365
1365
  external: e?.external ?? void 0
1366
1366
  };
1367
1367
  }
1368
- function z(e, n, t = { path: [], schemaPath: [] }) {
1368
+ function b(e, n, t = { path: [], schemaPath: [] }) {
1369
1369
  var r;
1370
1370
  const o = e._zod.def, s = n.seen.get(e);
1371
1371
  if (s)
@@ -1384,18 +1384,18 @@ function z(e, n, t = { path: [], schemaPath: [] }) {
1384
1384
  if (e._zod.processJSONSchema)
1385
1385
  e._zod.processJSONSchema(n, i.schema, m);
1386
1386
  else {
1387
- const h = i.schema, g = n.processors[o.type];
1388
- if (!g)
1387
+ const g = i.schema, _ = n.processors[o.type];
1388
+ if (!_)
1389
1389
  throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);
1390
- g(e, n, h, m);
1390
+ _(e, n, g, m);
1391
1391
  }
1392
- const p = e._zod.parent;
1393
- p && (i.ref || (i.ref = p), z(p, n, m), n.seen.get(p).isParent = !0);
1392
+ const h = e._zod.parent;
1393
+ h && (i.ref || (i.ref = h), b(h, n, m), n.seen.get(h).isParent = !0);
1394
1394
  }
1395
1395
  const c = n.metadataRegistry.get(e);
1396
- return c && Object.assign(i.schema, c), n.io === "input" && w(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;
1396
+ return c && Object.assign(i.schema, c), 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;
1397
1397
  }
1398
- function Ge(e, n) {
1398
+ function Ye(e, n) {
1399
1399
  const t = e.seen.get(n);
1400
1400
  if (!t)
1401
1401
  throw new Error("Unprocessed schema. This is a bug in Zod.");
@@ -1412,11 +1412,11 @@ function Ge(e, n) {
1412
1412
  const o = (i) => {
1413
1413
  const a = e.target === "draft-2020-12" ? "$defs" : "definitions";
1414
1414
  if (e.external) {
1415
- const p = e.external.registry.get(i[0])?.id, h = e.external.uri ?? ((C) => C);
1416
- if (p)
1417
- return { ref: h(p) };
1418
- const g = i[1].defId ?? i[1].schema.id ?? `schema${e.counter++}`;
1419
- return i[1].defId = g, { defId: g, ref: `${h("__shared")}#/${a}/${g}` };
1415
+ const h = e.external.registry.get(i[0])?.id, g = e.external.uri ?? ((C) => C);
1416
+ if (h)
1417
+ return { ref: g(h) };
1418
+ const _ = i[1].defId ?? i[1].schema.id ?? `schema${e.counter++}`;
1419
+ return i[1].defId = _, { defId: _, ref: `${g("__shared")}#/${a}/${_}` };
1420
1420
  }
1421
1421
  if (i[1] === t)
1422
1422
  return { ref: "#" };
@@ -1428,8 +1428,8 @@ function Ge(e, n) {
1428
1428
  const a = i[1], { ref: c, defId: f } = o(i);
1429
1429
  a.def = { ...a.schema }, f && (a.defId = f);
1430
1430
  const m = a.schema;
1431
- for (const p in m)
1432
- delete m[p];
1431
+ for (const h in m)
1432
+ delete m[h];
1433
1433
  m.$ref = c;
1434
1434
  };
1435
1435
  if (e.cycles === "throw")
@@ -1467,7 +1467,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1467
1467
  }
1468
1468
  }
1469
1469
  }
1470
- function Ke(e, n) {
1470
+ function Xe(e, n) {
1471
1471
  const t = e.seen.get(n);
1472
1472
  if (!t)
1473
1473
  throw new Error("Unprocessed schema. This is a bug in Zod.");
@@ -1478,21 +1478,21 @@ function Ke(e, n) {
1478
1478
  const c = a.def ?? a.schema, f = { ...c }, m = a.ref;
1479
1479
  if (a.ref = null, m) {
1480
1480
  r(m);
1481
- const h = e.seen.get(m), g = h.schema;
1482
- if (g.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (c.allOf = c.allOf ?? [], c.allOf.push(g)) : Object.assign(c, g), Object.assign(c, f), i._zod.parent === m)
1481
+ const g = e.seen.get(m), _ = g.schema;
1482
+ if (_.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (c.allOf = c.allOf ?? [], c.allOf.push(_)) : Object.assign(c, _), Object.assign(c, f), i._zod.parent === m)
1483
1483
  for (const E in c)
1484
1484
  E === "$ref" || E === "allOf" || E in f || delete c[E];
1485
- if (g.$ref && h.def)
1485
+ if (_.$ref && g.def)
1486
1486
  for (const E in c)
1487
- E === "$ref" || E === "allOf" || E in h.def && JSON.stringify(c[E]) === JSON.stringify(h.def[E]) && delete c[E];
1487
+ E === "$ref" || E === "allOf" || E in g.def && JSON.stringify(c[E]) === JSON.stringify(g.def[E]) && delete c[E];
1488
1488
  }
1489
- const p = i._zod.parent;
1490
- if (p && p !== m) {
1491
- r(p);
1492
- const h = e.seen.get(p);
1493
- if (h?.schema.$ref && (c.$ref = h.schema.$ref, h.def))
1494
- for (const g in c)
1495
- g === "$ref" || g === "allOf" || g in h.def && JSON.stringify(c[g]) === JSON.stringify(h.def[g]) && delete c[g];
1489
+ const h = i._zod.parent;
1490
+ if (h && h !== m) {
1491
+ r(h);
1492
+ const g = e.seen.get(h);
1493
+ if (g?.schema.$ref && (c.$ref = g.schema.$ref, g.def))
1494
+ for (const _ in c)
1495
+ _ === "$ref" || _ === "allOf" || _ in g.def && JSON.stringify(c[_]) === JSON.stringify(g.def[_]) && delete c[_];
1496
1496
  }
1497
1497
  e.override({
1498
1498
  zodSchema: i,
@@ -1522,8 +1522,8 @@ function Ke(e, n) {
1522
1522
  value: {
1523
1523
  ...n["~standard"],
1524
1524
  jsonSchema: {
1525
- input: L(n, "input", e.processors),
1526
- output: L(n, "output", e.processors)
1525
+ input: J(n, "input", e.processors),
1526
+ output: J(n, "output", e.processors)
1527
1527
  }
1528
1528
  },
1529
1529
  enumerable: !1,
@@ -1533,7 +1533,7 @@ function Ke(e, n) {
1533
1533
  throw new Error("Error converting schema to JSON.");
1534
1534
  }
1535
1535
  }
1536
- function w(e, n) {
1536
+ function v(e, n) {
1537
1537
  const t = n ?? { seen: /* @__PURE__ */ new Set() };
1538
1538
  if (t.seen.has(e))
1539
1539
  return !1;
@@ -1542,85 +1542,85 @@ function w(e, n) {
1542
1542
  if (r.type === "transform")
1543
1543
  return !0;
1544
1544
  if (r.type === "array")
1545
- return w(r.element, t);
1545
+ return v(r.element, t);
1546
1546
  if (r.type === "set")
1547
- return w(r.valueType, t);
1547
+ return v(r.valueType, t);
1548
1548
  if (r.type === "lazy")
1549
- return w(r.getter(), t);
1549
+ return v(r.getter(), t);
1550
1550
  if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault")
1551
- return w(r.innerType, t);
1551
+ return v(r.innerType, t);
1552
1552
  if (r.type === "intersection")
1553
- return w(r.left, t) || w(r.right, t);
1553
+ return v(r.left, t) || v(r.right, t);
1554
1554
  if (r.type === "record" || r.type === "map")
1555
- return w(r.keyType, t) || w(r.valueType, t);
1555
+ return v(r.keyType, t) || v(r.valueType, t);
1556
1556
  if (r.type === "pipe")
1557
- return w(r.in, t) || w(r.out, t);
1557
+ return v(r.in, t) || v(r.out, t);
1558
1558
  if (r.type === "object") {
1559
1559
  for (const o in r.shape)
1560
- if (w(r.shape[o], t))
1560
+ if (v(r.shape[o], t))
1561
1561
  return !0;
1562
1562
  return !1;
1563
1563
  }
1564
1564
  if (r.type === "union") {
1565
1565
  for (const o of r.options)
1566
- if (w(o, t))
1566
+ if (v(o, t))
1567
1567
  return !0;
1568
1568
  return !1;
1569
1569
  }
1570
1570
  if (r.type === "tuple") {
1571
1571
  for (const o of r.items)
1572
- if (w(o, t))
1572
+ if (v(o, t))
1573
1573
  return !0;
1574
- return !!(r.rest && w(r.rest, t));
1574
+ return !!(r.rest && v(r.rest, t));
1575
1575
  }
1576
1576
  return !1;
1577
1577
  }
1578
- const Xt = (e, n = {}) => (t) => {
1579
- const r = Be({ ...t, processors: n });
1580
- return z(e, r), Ge(r, e), Ke(r, e);
1581
- }, L = (e, n, t = {}) => (r) => {
1582
- const { libraryOptions: o, target: s } = r ?? {}, i = Be({ ...o ?? {}, target: s, io: n, processors: t });
1583
- return z(e, i), Ge(i, e), Ke(i, e);
1584
- }, Ht = {
1578
+ const nr = (e, n = {}) => (t) => {
1579
+ const r = Ke({ ...t, processors: n });
1580
+ return b(e, r), Ye(r, e), Xe(r, e);
1581
+ }, J = (e, n, t = {}) => (r) => {
1582
+ const { libraryOptions: o, target: s } = r ?? {}, i = Ke({ ...o ?? {}, target: s, io: n, processors: t });
1583
+ return b(e, i), Ye(i, e), Xe(i, e);
1584
+ }, tr = {
1585
1585
  guid: "uuid",
1586
1586
  url: "uri",
1587
1587
  datetime: "date-time",
1588
1588
  json_string: "json-string",
1589
1589
  regex: ""
1590
1590
  // do not set
1591
- }, Qt = (e, n, t, r) => {
1591
+ }, rr = (e, n, t, r) => {
1592
1592
  const o = t;
1593
1593
  o.type = "string";
1594
1594
  const { minimum: s, maximum: i, format: a, patterns: c, contentEncoding: f } = e._zod.bag;
1595
- if (typeof s == "number" && (o.minLength = s), typeof i == "number" && (o.maxLength = i), a && (o.format = Ht[a] ?? a, o.format === "" && delete o.format, a === "time" && delete o.format), f && (o.contentEncoding = f), c && c.size > 0) {
1595
+ if (typeof s == "number" && (o.minLength = s), typeof i == "number" && (o.maxLength = i), a && (o.format = tr[a] ?? a, o.format === "" && delete o.format, a === "time" && delete o.format), f && (o.contentEncoding = f), c && c.size > 0) {
1596
1596
  const m = [...c];
1597
1597
  m.length === 1 ? o.pattern = m[0].source : m.length > 1 && (o.allOf = [
1598
- ...m.map((p) => ({
1598
+ ...m.map((h) => ({
1599
1599
  ...n.target === "draft-07" || n.target === "draft-04" || n.target === "openapi-3.0" ? { type: "string" } : {},
1600
- pattern: p.source
1600
+ pattern: h.source
1601
1601
  }))
1602
1602
  ]);
1603
1603
  }
1604
- }, er = (e, n, t, r) => {
1604
+ }, or = (e, n, t, r) => {
1605
1605
  if (n.unrepresentable === "throw")
1606
1606
  throw new Error("Custom types cannot be represented in JSON Schema");
1607
- }, nr = (e, n, t, r) => {
1607
+ }, ir = (e, n, t, r) => {
1608
1608
  if (n.unrepresentable === "throw")
1609
1609
  throw new Error("Transforms cannot be represented in JSON Schema");
1610
- }, tr = (e, n, t, r) => {
1610
+ }, sr = (e, n, t, r) => {
1611
1611
  const o = t, s = e._zod.def, { minimum: i, maximum: a } = e._zod.bag;
1612
- typeof i == "number" && (o.minItems = i), typeof a == "number" && (o.maxItems = a), o.type = "array", o.items = z(s.element, n, { ...r, path: [...r.path, "items"] });
1613
- }, rr = (e, n, t, r) => {
1614
- const o = e._zod.def, s = o.inclusive === !1, i = o.options.map((a, c) => z(a, n, {
1612
+ typeof i == "number" && (o.minItems = i), typeof a == "number" && (o.maxItems = a), o.type = "array", o.items = b(s.element, n, { ...r, path: [...r.path, "items"] });
1613
+ }, ar = (e, n, t, r) => {
1614
+ const o = e._zod.def, s = o.inclusive === !1, i = o.options.map((a, c) => b(a, n, {
1615
1615
  ...r,
1616
1616
  path: [...r.path, s ? "oneOf" : "anyOf", c]
1617
1617
  }));
1618
1618
  s ? t.oneOf = i : t.anyOf = i;
1619
- }, or = (e, n, t, r) => {
1620
- const o = e._zod.def, s = z(o.left, n, {
1619
+ }, cr = (e, n, t, r) => {
1620
+ const o = e._zod.def, s = b(o.left, n, {
1621
1621
  ...r,
1622
1622
  path: [...r.path, "allOf", 0]
1623
- }), i = z(o.right, n, {
1623
+ }), i = b(o.right, n, {
1624
1624
  ...r,
1625
1625
  path: [...r.path, "allOf", 1]
1626
1626
  }), a = (f) => "allOf" in f && Object.keys(f).length === 1, c = [
@@ -1628,27 +1628,27 @@ const Xt = (e, n = {}) => (t) => {
1628
1628
  ...a(i) ? i.allOf : [i]
1629
1629
  ];
1630
1630
  t.allOf = c;
1631
- }, ir = (e, n, t, r) => {
1632
- const o = e._zod.def, s = z(o.innerType, n, r), i = n.seen.get(e);
1631
+ }, ur = (e, n, t, r) => {
1632
+ const o = e._zod.def, s = b(o.innerType, n, r), i = n.seen.get(e);
1633
1633
  n.target === "openapi-3.0" ? (i.ref = o.innerType, t.nullable = !0) : t.anyOf = [s, { type: "null" }];
1634
- }, sr = (e, n, t, r) => {
1634
+ }, fr = (e, n, t, r) => {
1635
1635
  const o = e._zod.def;
1636
- z(o.innerType, n, r);
1636
+ b(o.innerType, n, r);
1637
1637
  const s = n.seen.get(e);
1638
1638
  s.ref = o.innerType;
1639
- }, ar = (e, n, t, r) => {
1639
+ }, mr = (e, n, t, r) => {
1640
1640
  const o = e._zod.def;
1641
- z(o.innerType, n, r);
1641
+ b(o.innerType, n, r);
1642
1642
  const s = n.seen.get(e);
1643
1643
  s.ref = o.innerType, t.default = JSON.parse(JSON.stringify(o.defaultValue));
1644
- }, cr = (e, n, t, r) => {
1644
+ }, lr = (e, n, t, r) => {
1645
1645
  const o = e._zod.def;
1646
- z(o.innerType, n, r);
1646
+ b(o.innerType, n, r);
1647
1647
  const s = n.seen.get(e);
1648
1648
  s.ref = o.innerType, n.io === "input" && (t._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
1649
- }, ur = (e, n, t, r) => {
1649
+ }, dr = (e, n, t, r) => {
1650
1650
  const o = e._zod.def;
1651
- z(o.innerType, n, r);
1651
+ b(o.innerType, n, r);
1652
1652
  const s = n.seen.get(e);
1653
1653
  s.ref = o.innerType;
1654
1654
  let i;
@@ -1658,64 +1658,64 @@ const Xt = (e, n = {}) => (t) => {
1658
1658
  throw new Error("Dynamic catch values are not supported in JSON Schema");
1659
1659
  }
1660
1660
  t.default = i;
1661
- }, fr = (e, n, t, r) => {
1661
+ }, pr = (e, n, t, r) => {
1662
1662
  const o = e._zod.def, s = n.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
1663
- z(s, n, r);
1663
+ b(s, n, r);
1664
1664
  const i = n.seen.get(e);
1665
1665
  i.ref = s;
1666
- }, mr = (e, n, t, r) => {
1666
+ }, hr = (e, n, t, r) => {
1667
1667
  const o = e._zod.def;
1668
- z(o.innerType, n, r);
1668
+ b(o.innerType, n, r);
1669
1669
  const s = n.seen.get(e);
1670
1670
  s.ref = o.innerType, t.readOnly = !0;
1671
- }, Ye = (e, n, t, r) => {
1671
+ }, He = (e, n, t, r) => {
1672
1672
  const o = e._zod.def;
1673
- z(o.innerType, n, r);
1673
+ b(o.innerType, n, r);
1674
1674
  const s = n.seen.get(e);
1675
1675
  s.ref = o.innerType;
1676
- }, lr = /* @__PURE__ */ u("ZodISODateTime", (e, n) => {
1677
- Qn.init(e, n), K.init(e, n);
1676
+ }, gr = /* @__PURE__ */ u("ZodISODateTime", (e, n) => {
1677
+ rt.init(e, n), Y.init(e, n);
1678
1678
  });
1679
- function dr(e) {
1680
- return /* @__PURE__ */ Tt(lr, e);
1679
+ function _r(e) {
1680
+ return /* @__PURE__ */ At(gr, e);
1681
1681
  }
1682
- const pr = /* @__PURE__ */ u("ZodISODate", (e, n) => {
1683
- et.init(e, n), K.init(e, n);
1682
+ const yr = /* @__PURE__ */ u("ZodISODate", (e, n) => {
1683
+ ot.init(e, n), Y.init(e, n);
1684
1684
  });
1685
- function hr(e) {
1686
- return /* @__PURE__ */ Ot(pr, e);
1685
+ function wr(e) {
1686
+ return /* @__PURE__ */ Nt(yr, e);
1687
1687
  }
1688
- const gr = /* @__PURE__ */ u("ZodISOTime", (e, n) => {
1689
- nt.init(e, n), K.init(e, n);
1688
+ const vr = /* @__PURE__ */ u("ZodISOTime", (e, n) => {
1689
+ it.init(e, n), Y.init(e, n);
1690
1690
  });
1691
- function _r(e) {
1692
- return /* @__PURE__ */ Pt(gr, e);
1691
+ function br(e) {
1692
+ return /* @__PURE__ */ Mt(vr, e);
1693
1693
  }
1694
- const yr = /* @__PURE__ */ u("ZodISODuration", (e, n) => {
1695
- tt.init(e, n), K.init(e, n);
1694
+ const zr = /* @__PURE__ */ u("ZodISODuration", (e, n) => {
1695
+ st.init(e, n), Y.init(e, n);
1696
1696
  });
1697
- function vr(e) {
1698
- return /* @__PURE__ */ It(yr, e);
1697
+ function kr(e) {
1698
+ return /* @__PURE__ */ Rt(zr, e);
1699
1699
  }
1700
- const wr = (e, n) => {
1701
- Me.init(e, n), e.name = "ZodError", Object.defineProperties(e, {
1700
+ const $r = (e, n) => {
1701
+ Ce.init(e, n), e.name = "ZodError", Object.defineProperties(e, {
1702
1702
  format: {
1703
- value: (t) => mn(e, t)
1703
+ value: (t) => hn(e, t)
1704
1704
  // enumerable: false,
1705
1705
  },
1706
1706
  flatten: {
1707
- value: (t) => fn(e, t)
1707
+ value: (t) => pn(e, t)
1708
1708
  // enumerable: false,
1709
1709
  },
1710
1710
  addIssue: {
1711
1711
  value: (t) => {
1712
- e.issues.push(t), e.message = JSON.stringify(e.issues, Y, 2);
1712
+ e.issues.push(t), e.message = JSON.stringify(e.issues, X, 2);
1713
1713
  }
1714
1714
  // enumerable: false,
1715
1715
  },
1716
1716
  addIssues: {
1717
1717
  value: (t) => {
1718
- e.issues.push(...t), e.message = JSON.stringify(e.issues, Y, 2);
1718
+ e.issues.push(...t), e.message = JSON.stringify(e.issues, X, 2);
1719
1719
  }
1720
1720
  // enumerable: false,
1721
1721
  },
@@ -1726,483 +1726,544 @@ const wr = (e, n) => {
1726
1726
  // enumerable: false,
1727
1727
  }
1728
1728
  });
1729
- }, Z = u("ZodError", wr, {
1729
+ }, Z = u("ZodError", $r, {
1730
1730
  Parent: Error
1731
- }), zr = /* @__PURE__ */ U(Z), br = /* @__PURE__ */ V(Z), kr = /* @__PURE__ */ W(Z), $r = /* @__PURE__ */ q(Z), Zr = /* @__PURE__ */ pn(Z), Er = /* @__PURE__ */ hn(Z), Sr = /* @__PURE__ */ gn(Z), Tr = /* @__PURE__ */ _n(Z), Or = /* @__PURE__ */ yn(Z), Pr = /* @__PURE__ */ vn(Z), Ir = /* @__PURE__ */ wn(Z), Ar = /* @__PURE__ */ zn(Z), b = /* @__PURE__ */ u("ZodType", (e, n) => (y.init(e, n), Object.assign(e["~standard"], {
1731
+ }), Zr = /* @__PURE__ */ q(Z), Er = /* @__PURE__ */ W(Z), Sr = /* @__PURE__ */ G(Z), Tr = /* @__PURE__ */ B(Z), Or = /* @__PURE__ */ yn(Z), Pr = /* @__PURE__ */ wn(Z), Ir = /* @__PURE__ */ vn(Z), Ar = /* @__PURE__ */ bn(Z), Nr = /* @__PURE__ */ zn(Z), Mr = /* @__PURE__ */ kn(Z), Rr = /* @__PURE__ */ $n(Z), Cr = /* @__PURE__ */ Zn(Z), z = /* @__PURE__ */ u("ZodType", (e, n) => (w.init(e, n), Object.assign(e["~standard"], {
1732
1732
  jsonSchema: {
1733
- input: L(e, "input"),
1734
- output: L(e, "output")
1733
+ input: J(e, "input"),
1734
+ output: J(e, "output")
1735
1735
  }
1736
- }), e.toJSONSchema = Xt(e, {}), e.def = n, e.type = n.type, Object.defineProperty(e, "_def", { value: n }), e.check = (...t) => e.clone(sn(n, {
1736
+ }), e.toJSONSchema = nr(e, {}), e.def = n, e.type = n.type, Object.defineProperty(e, "_def", { value: n }), e.check = (...t) => e.clone(fn(n, {
1737
1737
  checks: [
1738
1738
  ...n.checks ?? [],
1739
1739
  ...t.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
1740
1740
  ]
1741
1741
  }), {
1742
1742
  parent: !0
1743
- }), 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) => zr(e, t, r, { callee: e.parse }), e.safeParse = (t, r) => kr(e, t, r), e.parseAsync = async (t, r) => br(e, t, r, { callee: e.parseAsync }), e.safeParseAsync = async (t, r) => $r(e, t, r), e.spa = e.safeParseAsync, e.encode = (t, r) => Zr(e, t, r), e.decode = (t, r) => Er(e, t, r), e.encodeAsync = async (t, r) => Sr(e, t, r), e.decodeAsync = async (t, r) => Tr(e, t, r), e.safeEncode = (t, r) => Or(e, t, r), e.safeDecode = (t, r) => Pr(e, t, r), e.safeEncodeAsync = async (t, r) => Ir(e, t, r), e.safeDecodeAsync = async (t, r) => Ar(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__ */ N(t)), e.optional = () => ve(e), e.exactOptional = () => Vr(e), e.nullable = () => we(e), e.nullish = () => ve(we(e)), e.nonoptional = (t) => Xr(e, t), e.array = () => Cr(e), e.or = (t) => jr([e, t]), e.and = (t) => Dr(e, t), e.transform = (t) => ze(e, Lr(t)), e.default = (t) => Br(e, t), e.prefault = (t) => Kr(e, t), e.catch = (t) => Qr(e, t), e.pipe = (t) => ze(e, t), e.readonly = () => to(e), e.describe = (t) => {
1743
+ }), e.with = e.check, e.clone = (t, r) => Me(e, t, r), e.brand = () => e, e.register = ((t, r) => (t.add(e, r), e)), e.parse = (t, r) => Zr(e, t, r, { callee: e.parse }), e.safeParse = (t, r) => Sr(e, t, r), e.parseAsync = async (t, r) => Er(e, t, r, { callee: e.parseAsync }), e.safeParseAsync = async (t, r) => Tr(e, t, r), e.spa = e.safeParseAsync, e.encode = (t, r) => Or(e, t, r), e.decode = (t, r) => Pr(e, t, r), e.encodeAsync = async (t, r) => Ir(e, t, r), e.decodeAsync = async (t, r) => Ar(e, t, r), e.safeEncode = (t, r) => Nr(e, t, r), e.safeDecode = (t, r) => Mr(e, t, r), e.safeEncodeAsync = async (t, r) => Rr(e, t, r), e.safeDecodeAsync = async (t, r) => Cr(e, t, r), e.refine = (t, r) => e.check(co(t, r)), e.superRefine = (t) => e.check(uo(t)), e.overwrite = (t) => e.check(/* @__PURE__ */ N(t)), e.optional = () => ze(e), e.exactOptional = () => Br(e), e.nullable = () => ke(e), e.nullish = () => ze(ke(e)), e.nonoptional = (t) => no(e, t), e.array = () => Dr(e), e.or = (t) => Ur([e, t]), e.and = (t) => Jr(e, t), e.transform = (t) => $e(e, qr(t)), e.default = (t) => Xr(e, t), e.prefault = (t) => Qr(e, t), e.catch = (t) => ro(e, t), e.pipe = (t) => $e(e, t), e.readonly = () => so(e), e.describe = (t) => {
1744
1744
  const r = e.clone();
1745
- return R.add(r, { description: t }), r;
1745
+ return j.add(r, { description: t }), r;
1746
1746
  }, Object.defineProperty(e, "description", {
1747
1747
  get() {
1748
- return R.get(e)?.description;
1748
+ return j.get(e)?.description;
1749
1749
  },
1750
1750
  configurable: !0
1751
1751
  }), e.meta = (...t) => {
1752
1752
  if (t.length === 0)
1753
- return R.get(e);
1753
+ return j.get(e);
1754
1754
  const r = e.clone();
1755
- return R.add(r, t[0]), r;
1756
- }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (t) => t(e), e)), Nr = /* @__PURE__ */ u("_ZodString", (e, n) => {
1757
- ie.init(e, n), b.init(e, n), e._zod.processJSONSchema = (r, o, s) => Qt(e, r, o);
1755
+ return j.add(r, t[0]), r;
1756
+ }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (t) => t(e), e)), jr = /* @__PURE__ */ u("_ZodString", (e, n) => {
1757
+ ae.init(e, n), z.init(e, n), e._zod.processJSONSchema = (r, o, s) => rr(e, r, o);
1758
1758
  const t = e._zod.bag;
1759
- e.format = t.format ?? null, e.minLength = t.minimum ?? null, e.maxLength = t.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ Ve(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ xt(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ Lt(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ Jt(...r)), e.min = (...r) => e.check(/* @__PURE__ */ A(...r)), e.max = (...r) => e.check(/* @__PURE__ */ G(...r)), e.length = (...r) => e.check(/* @__PURE__ */ Ue(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ A(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__ */ qt()), e.slugify = () => e.check(/* @__PURE__ */ Bt());
1760
- }), K = /* @__PURE__ */ u("ZodStringFormat", (e, n) => {
1761
- $.init(e, n), Nr.init(e, n);
1762
- }), Mr = /* @__PURE__ */ u("ZodArray", (e, n) => {
1763
- Le.init(e, n), b.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__ */ A(t, r)), e.nonempty = (t) => e.check(/* @__PURE__ */ A(1, t)), e.max = (t, r) => e.check(/* @__PURE__ */ G(t, r)), e.length = (t, r) => e.check(/* @__PURE__ */ Ue(t, r)), e.unwrap = () => e.element;
1759
+ e.format = t.format ?? null, e.minLength = t.minimum ?? null, e.maxLength = t.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ We(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ Vt(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ qt(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ Wt(...r)), e.min = (...r) => e.check(/* @__PURE__ */ O(...r)), e.max = (...r) => e.check(/* @__PURE__ */ x(...r)), e.length = (...r) => e.check(/* @__PURE__ */ qe(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ O(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ Lt(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ Jt(r)), e.trim = () => e.check(/* @__PURE__ */ Bt()), e.normalize = (...r) => e.check(/* @__PURE__ */ Gt(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ Kt()), e.toUpperCase = () => e.check(/* @__PURE__ */ Yt()), e.slugify = () => e.check(/* @__PURE__ */ Xt());
1760
+ }), Y = /* @__PURE__ */ u("ZodStringFormat", (e, n) => {
1761
+ $.init(e, n), jr.init(e, n);
1762
+ }), Fr = /* @__PURE__ */ u("ZodArray", (e, n) => {
1763
+ Je.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => sr(e, t, r, o), e.element = n.element, e.min = (t, r) => e.check(/* @__PURE__ */ O(t, r)), e.nonempty = (t) => e.check(/* @__PURE__ */ O(1, t)), e.max = (t, r) => e.check(/* @__PURE__ */ x(t, r)), e.length = (t, r) => e.check(/* @__PURE__ */ qe(t, r)), e.unwrap = () => e.element;
1764
1764
  });
1765
- function Cr(e, n) {
1766
- return /* @__PURE__ */ Gt(Mr, e, n);
1765
+ function Dr(e, n) {
1766
+ return /* @__PURE__ */ Ht(Fr, e, n);
1767
1767
  }
1768
- const Rr = /* @__PURE__ */ u("ZodUnion", (e, n) => {
1769
- ut.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => rr(e, t, r, o), e.options = n.options;
1768
+ const xr = /* @__PURE__ */ u("ZodUnion", (e, n) => {
1769
+ dt.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => ar(e, t, r, o), e.options = n.options;
1770
1770
  });
1771
- function jr(e, n) {
1772
- return new Rr({
1771
+ function Ur(e, n) {
1772
+ return new xr({
1773
1773
  type: "union",
1774
1774
  options: e,
1775
1775
  ...l(n)
1776
1776
  });
1777
1777
  }
1778
- const Fr = /* @__PURE__ */ u("ZodIntersection", (e, n) => {
1779
- ft.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => or(e, t, r, o);
1778
+ const Lr = /* @__PURE__ */ u("ZodIntersection", (e, n) => {
1779
+ pt.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => cr(e, t, r, o);
1780
1780
  });
1781
- function Dr(e, n) {
1782
- return new Fr({
1781
+ function Jr(e, n) {
1782
+ return new Lr({
1783
1783
  type: "intersection",
1784
1784
  left: e,
1785
1785
  right: n
1786
1786
  });
1787
1787
  }
1788
- const xr = /* @__PURE__ */ u("ZodTransform", (e, n) => {
1789
- mt.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => nr(e, t), e._zod.parse = (t, r) => {
1788
+ const Vr = /* @__PURE__ */ u("ZodTransform", (e, n) => {
1789
+ ht.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => ir(e, t), e._zod.parse = (t, r) => {
1790
1790
  if (r.direction === "backward")
1791
- throw new Oe(e.constructor.name);
1791
+ throw new Ie(e.constructor.name);
1792
1792
  t.addIssue = (s) => {
1793
1793
  if (typeof s == "string")
1794
- t.issues.push(j(s, t.value, n));
1794
+ t.issues.push(F(s, t.value, n));
1795
1795
  else {
1796
1796
  const i = s;
1797
- 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));
1797
+ i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = t.value), i.inst ?? (i.inst = e), t.issues.push(F(i));
1798
1798
  }
1799
1799
  };
1800
1800
  const o = n.transform(t.value, t);
1801
1801
  return o instanceof Promise ? o.then((s) => (t.value = s, t)) : (t.value = o, t);
1802
1802
  };
1803
1803
  });
1804
- function Lr(e) {
1805
- return new xr({
1804
+ function qr(e) {
1805
+ return new Vr({
1806
1806
  type: "transform",
1807
1807
  transform: e
1808
1808
  });
1809
1809
  }
1810
- const Jr = /* @__PURE__ */ u("ZodOptional", (e, n) => {
1811
- se.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => Ye(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1810
+ const Wr = /* @__PURE__ */ u("ZodOptional", (e, n) => {
1811
+ ce.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => He(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1812
1812
  });
1813
- function ve(e) {
1814
- return new Jr({
1813
+ function ze(e) {
1814
+ return new Wr({
1815
1815
  type: "optional",
1816
1816
  innerType: e
1817
1817
  });
1818
1818
  }
1819
- const Ur = /* @__PURE__ */ u("ZodExactOptional", (e, n) => {
1820
- lt.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => Ye(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1819
+ const Gr = /* @__PURE__ */ u("ZodExactOptional", (e, n) => {
1820
+ gt.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => He(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1821
1821
  });
1822
- function Vr(e) {
1823
- return new Ur({
1822
+ function Br(e) {
1823
+ return new Gr({
1824
1824
  type: "optional",
1825
1825
  innerType: e
1826
1826
  });
1827
1827
  }
1828
- const Wr = /* @__PURE__ */ u("ZodNullable", (e, n) => {
1829
- dt.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => ir(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1828
+ const Kr = /* @__PURE__ */ u("ZodNullable", (e, n) => {
1829
+ _t.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => ur(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1830
1830
  });
1831
- function we(e) {
1832
- return new Wr({
1831
+ function ke(e) {
1832
+ return new Kr({
1833
1833
  type: "nullable",
1834
1834
  innerType: e
1835
1835
  });
1836
1836
  }
1837
- const qr = /* @__PURE__ */ u("ZodDefault", (e, n) => {
1838
- pt.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => ar(e, t, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
1837
+ const Yr = /* @__PURE__ */ u("ZodDefault", (e, n) => {
1838
+ yt.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => mr(e, t, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
1839
1839
  });
1840
- function Br(e, n) {
1841
- return new qr({
1840
+ function Xr(e, n) {
1841
+ return new Yr({
1842
1842
  type: "default",
1843
1843
  innerType: e,
1844
1844
  get defaultValue() {
1845
- return typeof n == "function" ? n() : Ie(n);
1845
+ return typeof n == "function" ? n() : Ne(n);
1846
1846
  }
1847
1847
  });
1848
1848
  }
1849
- const Gr = /* @__PURE__ */ u("ZodPrefault", (e, n) => {
1850
- ht.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => cr(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1849
+ const Hr = /* @__PURE__ */ u("ZodPrefault", (e, n) => {
1850
+ wt.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => lr(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1851
1851
  });
1852
- function Kr(e, n) {
1853
- return new Gr({
1852
+ function Qr(e, n) {
1853
+ return new Hr({
1854
1854
  type: "prefault",
1855
1855
  innerType: e,
1856
1856
  get defaultValue() {
1857
- return typeof n == "function" ? n() : Ie(n);
1857
+ return typeof n == "function" ? n() : Ne(n);
1858
1858
  }
1859
1859
  });
1860
1860
  }
1861
- const Yr = /* @__PURE__ */ u("ZodNonOptional", (e, n) => {
1862
- gt.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => sr(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1861
+ const eo = /* @__PURE__ */ u("ZodNonOptional", (e, n) => {
1862
+ vt.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => fr(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1863
1863
  });
1864
- function Xr(e, n) {
1865
- return new Yr({
1864
+ function no(e, n) {
1865
+ return new eo({
1866
1866
  type: "nonoptional",
1867
1867
  innerType: e,
1868
1868
  ...l(n)
1869
1869
  });
1870
1870
  }
1871
- const Hr = /* @__PURE__ */ u("ZodCatch", (e, n) => {
1872
- _t.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => ur(e, t, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
1871
+ const to = /* @__PURE__ */ u("ZodCatch", (e, n) => {
1872
+ bt.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => dr(e, t, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
1873
1873
  });
1874
- function Qr(e, n) {
1875
- return new Hr({
1874
+ function ro(e, n) {
1875
+ return new to({
1876
1876
  type: "catch",
1877
1877
  innerType: e,
1878
1878
  catchValue: typeof n == "function" ? n : () => n
1879
1879
  });
1880
1880
  }
1881
- const eo = /* @__PURE__ */ u("ZodPipe", (e, n) => {
1882
- yt.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => fr(e, t, r, o), e.in = n.in, e.out = n.out;
1881
+ const oo = /* @__PURE__ */ u("ZodPipe", (e, n) => {
1882
+ zt.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => pr(e, t, r, o), e.in = n.in, e.out = n.out;
1883
1883
  });
1884
- function ze(e, n) {
1885
- return new eo({
1884
+ function $e(e, n) {
1885
+ return new oo({
1886
1886
  type: "pipe",
1887
1887
  in: e,
1888
1888
  out: n
1889
1889
  // ...util.normalizeParams(params),
1890
1890
  });
1891
1891
  }
1892
- const no = /* @__PURE__ */ u("ZodReadonly", (e, n) => {
1893
- vt.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => mr(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1892
+ const io = /* @__PURE__ */ u("ZodReadonly", (e, n) => {
1893
+ kt.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => hr(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1894
1894
  });
1895
- function to(e) {
1896
- return new no({
1895
+ function so(e) {
1896
+ return new io({
1897
1897
  type: "readonly",
1898
1898
  innerType: e
1899
1899
  });
1900
1900
  }
1901
- const ro = /* @__PURE__ */ u("ZodCustom", (e, n) => {
1902
- Je.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => er(e, t);
1901
+ const ao = /* @__PURE__ */ u("ZodCustom", (e, n) => {
1902
+ Ve.init(e, n), z.init(e, n), e._zod.processJSONSchema = (t, r, o) => or(e, t);
1903
1903
  });
1904
- function oo(e, n = {}) {
1905
- return /* @__PURE__ */ We(ro, e, n);
1904
+ function co(e, n = {}) {
1905
+ return /* @__PURE__ */ Ge(ao, e, n);
1906
1906
  }
1907
- function io(e) {
1908
- return /* @__PURE__ */ qe(e);
1907
+ function uo(e) {
1908
+ return /* @__PURE__ */ Be(e);
1909
1909
  }
1910
- const O = /* @__PURE__ */ u("ZodMiniType", (e, n) => {
1910
+ const P = /* @__PURE__ */ u("ZodMiniType", (e, n) => {
1911
1911
  if (!e._zod)
1912
1912
  throw new Error("Uninitialized schema in ZodMiniType.");
1913
- y.init(e, n), e.def = n, e.type = n.type, e.parse = (t, r) => ln(e, t, r, { callee: e.parse }), e.safeParse = (t, r) => Ce(e, t, r), e.parseAsync = async (t, r) => dn(e, t, r, { callee: e.parseAsync }), e.safeParseAsync = async (t, r) => Re(e, t, r), e.check = (...t) => e.clone({
1913
+ w.init(e, n), e.def = n, e.type = n.type, e.parse = (t, r) => gn(e, t, r, { callee: e.parse }), e.safeParse = (t, r) => je(e, t, r), e.parseAsync = async (t, r) => _n(e, t, r, { callee: e.parseAsync }), e.safeParseAsync = async (t, r) => Fe(e, t, r), e.check = (...t) => e.clone({
1914
1914
  ...n,
1915
1915
  checks: [
1916
1916
  ...n.checks ?? [],
1917
1917
  ...t.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
1918
1918
  ]
1919
- }, { 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);
1920
- }), Xe = /* @__PURE__ */ u("ZodMiniString", (e, n) => {
1921
- ie.init(e, n), O.init(e, n);
1919
+ }, { parent: !0 }), e.with = e.check, e.clone = (t, r) => Me(e, t, r), e.brand = () => e, e.register = ((t, r) => (t.add(e, r), e)), e.apply = (t) => t(e);
1920
+ }), Qe = /* @__PURE__ */ u("ZodMiniString", (e, n) => {
1921
+ ae.init(e, n), P.init(e, n);
1922
1922
  });
1923
1923
  // @__NO_SIDE_EFFECTS__
1924
- function be(e) {
1925
- return /* @__PURE__ */ bt(Xe, e);
1924
+ function Ze(e) {
1925
+ return /* @__PURE__ */ Et(Qe, e);
1926
1926
  }
1927
1927
  const M = /* @__PURE__ */ u("ZodMiniStringFormat", (e, n) => {
1928
- $.init(e, n), Xe.init(e, n);
1929
- }), so = /* @__PURE__ */ u("ZodMiniEmail", (e, n) => {
1930
- Xn.init(e, n), M.init(e, n);
1928
+ $.init(e, n), Qe.init(e, n);
1929
+ }), fo = /* @__PURE__ */ u("ZodMiniEmail", (e, n) => {
1930
+ nt.init(e, n), M.init(e, n);
1931
1931
  });
1932
1932
  // @__NO_SIDE_EFFECTS__
1933
- function ao(e) {
1934
- return /* @__PURE__ */ kt(so, e);
1933
+ function mo(e) {
1934
+ return /* @__PURE__ */ St(fo, e);
1935
1935
  }
1936
- const co = /* @__PURE__ */ u("ZodMiniUUID", (e, n) => {
1937
- Yn.init(e, n), M.init(e, n);
1936
+ const lo = /* @__PURE__ */ u("ZodMiniUUID", (e, n) => {
1937
+ et.init(e, n), M.init(e, n);
1938
1938
  });
1939
1939
  // @__NO_SIDE_EFFECTS__
1940
- function uo(e) {
1941
- return /* @__PURE__ */ $t(co, e);
1940
+ function po(e) {
1941
+ return /* @__PURE__ */ Tt(lo, e);
1942
1942
  }
1943
- const fo = /* @__PURE__ */ u("ZodMiniURL", (e, n) => {
1944
- Hn.init(e, n), M.init(e, n);
1943
+ const ho = /* @__PURE__ */ u("ZodMiniURL", (e, n) => {
1944
+ tt.init(e, n), M.init(e, n);
1945
1945
  });
1946
1946
  // @__NO_SIDE_EFFECTS__
1947
- function mo(e) {
1948
- return /* @__PURE__ */ Zt(fo, e);
1947
+ function go(e) {
1948
+ return /* @__PURE__ */ Ot(ho, e);
1949
1949
  }
1950
- const lo = /* @__PURE__ */ u("ZodMiniIPv4", (e, n) => {
1951
- rt.init(e, n), M.init(e, n);
1950
+ const _o = /* @__PURE__ */ u("ZodMiniIPv4", (e, n) => {
1951
+ at.init(e, n), M.init(e, n);
1952
1952
  });
1953
1953
  // @__NO_SIDE_EFFECTS__
1954
- function po(e) {
1955
- return /* @__PURE__ */ Et(lo, e);
1954
+ function yo(e) {
1955
+ return /* @__PURE__ */ Pt(_o, e);
1956
1956
  }
1957
- const ho = /* @__PURE__ */ u("ZodMiniIPv6", (e, n) => {
1958
- ot.init(e, n), M.init(e, n);
1957
+ const wo = /* @__PURE__ */ u("ZodMiniIPv6", (e, n) => {
1958
+ ct.init(e, n), M.init(e, n);
1959
1959
  });
1960
1960
  // @__NO_SIDE_EFFECTS__
1961
- function go(e) {
1962
- return /* @__PURE__ */ St(ho, e);
1961
+ function vo(e) {
1962
+ return /* @__PURE__ */ It(wo, e);
1963
1963
  }
1964
- const _o = /* @__PURE__ */ u("ZodMiniCustomStringFormat", (e, n) => {
1965
- it.init(e, n), M.init(e, n);
1964
+ const bo = /* @__PURE__ */ u("ZodMiniCustomStringFormat", (e, n) => {
1965
+ ut.init(e, n), M.init(e, n);
1966
1966
  });
1967
1967
  // @__NO_SIDE_EFFECTS__
1968
- function yo(e) {
1969
- return /* @__PURE__ */ Yt(_o, "hostname", En, e);
1968
+ function zo(e) {
1969
+ return /* @__PURE__ */ er(bo, "hostname", Pn, e);
1970
1970
  }
1971
- const He = /* @__PURE__ */ u("ZodMiniNumber", (e, n) => {
1972
- xe.init(e, n), O.init(e, n);
1971
+ const en = /* @__PURE__ */ u("ZodMiniNumber", (e, n) => {
1972
+ Le.init(e, n), P.init(e, n);
1973
1973
  });
1974
1974
  // @__NO_SIDE_EFFECTS__
1975
- function ke(e) {
1976
- return /* @__PURE__ */ At(He, e);
1975
+ function Ee(e) {
1976
+ return /* @__PURE__ */ Ct(en, e);
1977
1977
  }
1978
- const vo = /* @__PURE__ */ u("ZodMiniNumberFormat", (e, n) => {
1979
- st.init(e, n), He.init(e, n);
1978
+ const ko = /* @__PURE__ */ u("ZodMiniNumberFormat", (e, n) => {
1979
+ ft.init(e, n), en.init(e, n);
1980
1980
  });
1981
1981
  // @__NO_SIDE_EFFECTS__
1982
- function wo(e) {
1983
- return /* @__PURE__ */ Nt(vo, e);
1982
+ function $o(e) {
1983
+ return /* @__PURE__ */ jt(ko, e);
1984
1984
  }
1985
- const zo = /* @__PURE__ */ u("ZodMiniBoolean", (e, n) => {
1986
- at.init(e, n), O.init(e, n);
1985
+ const Zo = /* @__PURE__ */ u("ZodMiniBoolean", (e, n) => {
1986
+ mt.init(e, n), P.init(e, n);
1987
1987
  });
1988
1988
  // @__NO_SIDE_EFFECTS__
1989
- function $e(e) {
1990
- return /* @__PURE__ */ Mt(zo, e);
1989
+ function Se(e) {
1990
+ return /* @__PURE__ */ Ft(Zo, e);
1991
1991
  }
1992
- const bo = /* @__PURE__ */ u("ZodMiniAny", (e, n) => {
1993
- ct.init(e, n), O.init(e, n);
1992
+ const Eo = /* @__PURE__ */ u("ZodMiniAny", (e, n) => {
1993
+ lt.init(e, n), P.init(e, n);
1994
1994
  });
1995
1995
  // @__NO_SIDE_EFFECTS__
1996
- function Q() {
1997
- return /* @__PURE__ */ Ct(bo);
1996
+ function D() {
1997
+ return /* @__PURE__ */ Dt(Eo);
1998
1998
  }
1999
- const ko = /* @__PURE__ */ u("ZodMiniArray", (e, n) => {
2000
- Le.init(e, n), O.init(e, n);
1999
+ const So = /* @__PURE__ */ u("ZodMiniArray", (e, n) => {
2000
+ Je.init(e, n), P.init(e, n);
2001
2001
  });
2002
2002
  // @__NO_SIDE_EFFECTS__
2003
- function Ze(e, n) {
2004
- return new ko({
2003
+ function ee(e, n) {
2004
+ return new So({
2005
2005
  type: "array",
2006
2006
  element: e,
2007
2007
  ...l(n)
2008
2008
  });
2009
2009
  }
2010
- const $o = /* @__PURE__ */ u("ZodMiniOptional", (e, n) => {
2011
- se.init(e, n), O.init(e, n);
2010
+ const To = /* @__PURE__ */ u("ZodMiniOptional", (e, n) => {
2011
+ ce.init(e, n), P.init(e, n);
2012
2012
  });
2013
2013
  // @__NO_SIDE_EFFECTS__
2014
- function Zo(e) {
2015
- return new $o({
2014
+ function Oo(e) {
2015
+ return new To({
2016
2016
  type: "optional",
2017
2017
  innerType: e
2018
2018
  });
2019
2019
  }
2020
- const Eo = /* @__PURE__ */ u("ZodMiniCustom", (e, n) => {
2021
- Je.init(e, n), O.init(e, n);
2020
+ const Po = /* @__PURE__ */ u("ZodMiniCustom", (e, n) => {
2021
+ Ve.init(e, n), P.init(e, n);
2022
2022
  });
2023
2023
  // @__NO_SIDE_EFFECTS__
2024
- function v(e, n = {}) {
2025
- return /* @__PURE__ */ We(Eo, e, n);
2024
+ function y(e, n = {}) {
2025
+ return /* @__PURE__ */ Ge(Po, e, n);
2026
2026
  }
2027
2027
  // @__NO_SIDE_EFFECTS__
2028
- function Qe(e) {
2029
- return /* @__PURE__ */ qe(e);
2030
- }
2031
- const ee = {
2032
- email: { schema: /* @__PURE__ */ ao() },
2033
- hostname: { schema: /* @__PURE__ */ yo() },
2034
- ipv4: { schema: /* @__PURE__ */ po() },
2035
- ipv6: { schema: /* @__PURE__ */ go() },
2036
- url: { schema: /* @__PURE__ */ mo() },
2037
- uuid: { schema: /* @__PURE__ */ uo() },
2038
- date: { schema: hr() },
2039
- time: { schema: _r() },
2040
- "date-time": { schema: dr({ local: !0, offset: !0 }) },
2041
- duration: { schema: vr() }
2042
- }, Ee = Object.keys(ee), So = (e) => (n, t) => {
2028
+ function ue(e) {
2029
+ return /* @__PURE__ */ Be(e);
2030
+ }
2031
+ const ne = {
2032
+ email: { schema: /* @__PURE__ */ mo() },
2033
+ hostname: { schema: /* @__PURE__ */ zo() },
2034
+ ipv4: { schema: /* @__PURE__ */ yo() },
2035
+ ipv6: { schema: /* @__PURE__ */ vo() },
2036
+ url: { schema: /* @__PURE__ */ go() },
2037
+ uuid: { schema: /* @__PURE__ */ po() },
2038
+ date: { schema: wr() },
2039
+ time: { schema: br() },
2040
+ "date-time": { schema: _r({ local: !0, offset: !0 }) },
2041
+ duration: { schema: kr() }
2042
+ }, Te = Object.keys(ne), Io = ["uploading", "uploaded", "error"], Ao = (e) => (n, t) => {
2043
2043
  switch (n.type) {
2044
2044
  case "string":
2045
- return To(n, t);
2045
+ return No(n, t);
2046
2046
  case "integer":
2047
2047
  case "number":
2048
- return Po(n, t);
2048
+ return Ro(n, t);
2049
2049
  case "boolean":
2050
- return Io(n, t);
2050
+ return Co(n, t);
2051
2051
  case "array":
2052
- return Ao(n, t);
2052
+ return jo(n, t);
2053
+ case "file":
2054
+ return Fo(n, t);
2055
+ case "files":
2056
+ return Do(n, t);
2053
2057
  case "custom": {
2054
2058
  if (!e)
2055
2059
  throw new Error(
2056
2060
  'Validator type "custom" requires a customValidators object, but it was not supplied.'
2057
2061
  );
2058
- return No(n, e);
2062
+ return xo(n, e);
2059
2063
  }
2060
2064
  default: {
2061
2065
  const r = n;
2062
2066
  throw new Error(
2063
- `Unknown validator config: ${JSON.stringify(r)}. The "type" property must be one of: "string", "number", "integer", "boolean", "array", "custom".`
2067
+ `Unknown validator config: ${JSON.stringify(r)}. The "type" property must be one of: "string", "number", "integer", "boolean", "array", "file", "files", "custom".`
2064
2068
  );
2065
2069
  }
2066
2070
  }
2067
2071
  };
2068
- function _(e, n) {
2072
+ function d(e, n) {
2069
2073
  if (e !== void 0)
2070
2074
  return typeof e == "string" ? e : n?.translate(e.key, e.params, e.default) ?? e.default;
2071
2075
  }
2072
- function To(e, n) {
2073
- return F(e, (t) => {
2074
- const r = _(t.messages?.invalid, n);
2075
- let o = r ? /* @__PURE__ */ be(r) : /* @__PURE__ */ be();
2076
+ function No(e, n) {
2077
+ return R(e, (t) => {
2078
+ const r = d(t.messages?.invalid, n);
2079
+ let o = r ? /* @__PURE__ */ Ze(r) : /* @__PURE__ */ Ze();
2076
2080
  if (t.required === !0) {
2077
- const s = _(t.messages?.required, n) ?? "This field is required";
2078
- o = o.check(/* @__PURE__ */ v((i) => i.length > 0, { error: s }));
2081
+ const s = d(t.messages?.required, n) ?? "This field is required";
2082
+ o = o.check(/* @__PURE__ */ y((i) => i.length > 0, { error: s }));
2079
2083
  }
2080
2084
  if (typeof t.minLength == "number") {
2081
- const s = _(t.messages?.minLength, n), i = t.minLength;
2085
+ const s = d(t.messages?.minLength, n), i = t.minLength;
2082
2086
  o = o.check(
2083
- s ? /* @__PURE__ */ v((a) => a.length >= i, { error: s }) : /* @__PURE__ */ A(i)
2087
+ s ? /* @__PURE__ */ y((a) => a.length >= i, { error: s }) : /* @__PURE__ */ O(i)
2084
2088
  );
2085
2089
  }
2086
2090
  if (typeof t.maxLength == "number") {
2087
- const s = _(t.messages?.maxLength, n), i = t.maxLength;
2091
+ const s = d(t.messages?.maxLength, n), i = t.maxLength;
2088
2092
  o = o.check(
2089
- s ? /* @__PURE__ */ v((a) => a.length <= i, { error: s }) : /* @__PURE__ */ G(i)
2093
+ s ? /* @__PURE__ */ y((a) => a.length <= i, { error: s }) : /* @__PURE__ */ x(i)
2090
2094
  );
2091
2095
  }
2092
2096
  if (typeof t.pattern == "string") {
2093
- const s = _(t.messages?.pattern, n), i = new RegExp(t.pattern);
2097
+ const s = d(t.messages?.pattern, n), i = new RegExp(t.pattern);
2094
2098
  o = o.check(
2095
- s ? /* @__PURE__ */ v((a) => i.test(a), { error: s }) : /* @__PURE__ */ Ve(i)
2099
+ s ? /* @__PURE__ */ y((a) => i.test(a), { error: s }) : /* @__PURE__ */ We(i)
2096
2100
  );
2097
2101
  }
2098
2102
  if (t.enum) {
2099
- const s = t.enum, i = _(t.messages?.enum, n);
2100
- o = o.check(/* @__PURE__ */ v((a) => s.includes(a), i ? { error: i } : void 0));
2103
+ const s = t.enum, i = d(t.messages?.enum, n);
2104
+ o = o.check(/* @__PURE__ */ y((a) => s.includes(a), i ? { error: i } : void 0));
2101
2105
  }
2102
2106
  if (t.const !== void 0) {
2103
- const s = _(t.messages?.const, n);
2104
- o = o.check(/* @__PURE__ */ v((i) => i === t.const, s ? { error: s } : void 0));
2107
+ const s = d(t.messages?.const, n);
2108
+ o = o.check(/* @__PURE__ */ y((i) => i === t.const, s ? { error: s } : void 0));
2105
2109
  }
2106
2110
  if (t.format !== void 0)
2107
- if (Ee.includes(t.format)) {
2108
- const s = _(t.messages?.format, n);
2111
+ if (Te.includes(t.format)) {
2112
+ const s = d(t.messages?.format, n);
2109
2113
  o = o.check(
2110
- s ? /* @__PURE__ */ Qe((i, a) => {
2111
- const c = Se(
2112
- ee[t.format].schema,
2114
+ s ? /* @__PURE__ */ ue((i, a) => {
2115
+ const c = Oe(
2116
+ ne[t.format].schema,
2113
2117
  i
2114
2118
  );
2115
- Te(c) || a.addIssue({ code: "custom", path: [], message: s });
2116
- }) : ee[t.format].schema
2119
+ Pe(c) || a.addIssue({ code: "custom", path: [], message: s });
2120
+ }) : ne[t.format].schema
2117
2121
  );
2118
2122
  } else
2119
2123
  throw new Error(
2120
- `Unknown string validation format: ${JSON.stringify(t.format)}. The "format" property must be one of: ${Ee.map((s) => `"${s}"`).join(", ")}.`
2124
+ `Unknown string validation format: ${JSON.stringify(t.format)}. The "format" property must be one of: ${Te.map((s) => `"${s}"`).join(", ")}.`
2121
2125
  );
2122
2126
  return o;
2123
2127
  });
2124
2128
  }
2125
- const Oo = (e, n) => {
2129
+ const Mo = (e, n) => {
2126
2130
  if (n === 0)
2127
2131
  return !1;
2128
2132
  const t = e / n;
2129
2133
  return Math.abs(t - Math.round(t)) < 1e-10;
2130
2134
  };
2131
- function Po(e, n) {
2132
- return F(e, (t) => {
2133
- const r = _(t.messages?.invalid, n);
2134
- let o = r ? /* @__PURE__ */ ke(r) : /* @__PURE__ */ ke();
2135
- if (t.type === "integer" && (o = o.check(/* @__PURE__ */ wo())), t.minimum !== void 0) {
2136
- const s = _(t.messages?.minimum, n), i = t.minimum;
2137
- o = o.check(s ? /* @__PURE__ */ v((a) => a >= i, { error: s }) : /* @__PURE__ */ jt(i));
2135
+ function Ro(e, n) {
2136
+ return R(e, (t) => {
2137
+ const r = d(t.messages?.invalid, n);
2138
+ let o = r ? /* @__PURE__ */ Ee(r) : /* @__PURE__ */ Ee();
2139
+ if (t.type === "integer" && (o = o.check(/* @__PURE__ */ $o())), t.minimum !== void 0) {
2140
+ const s = d(t.messages?.minimum, n), i = t.minimum;
2141
+ o = o.check(s ? /* @__PURE__ */ y((a) => a >= i, { error: s }) : /* @__PURE__ */ Ut(i));
2138
2142
  }
2139
2143
  if (t.maximum !== void 0) {
2140
- const s = _(t.messages?.maximum, n), i = t.maximum;
2141
- o = o.check(s ? /* @__PURE__ */ v((a) => a <= i, { error: s }) : /* @__PURE__ */ Rt(i));
2144
+ const s = d(t.messages?.maximum, n), i = t.maximum;
2145
+ o = o.check(s ? /* @__PURE__ */ y((a) => a <= i, { error: s }) : /* @__PURE__ */ xt(i));
2142
2146
  }
2143
2147
  if (t.exclusiveMinimum !== void 0) {
2144
- const s = _(t.messages?.exclusiveMinimum, n), i = t.exclusiveMinimum;
2145
- o = o.check(/* @__PURE__ */ v((a) => a > i, s ? { error: s } : void 0));
2148
+ const s = d(t.messages?.exclusiveMinimum, n), i = t.exclusiveMinimum;
2149
+ o = o.check(/* @__PURE__ */ y((a) => a > i, s ? { error: s } : void 0));
2146
2150
  }
2147
2151
  if (t.exclusiveMaximum !== void 0) {
2148
- const s = _(t.messages?.exclusiveMaximum, n), i = t.exclusiveMaximum;
2149
- o = o.check(/* @__PURE__ */ v((a) => a < i, s ? { error: s } : void 0));
2152
+ const s = d(t.messages?.exclusiveMaximum, n), i = t.exclusiveMaximum;
2153
+ o = o.check(/* @__PURE__ */ y((a) => a < i, s ? { error: s } : void 0));
2150
2154
  }
2151
2155
  if (t.multipleOf !== void 0) {
2152
- const s = _(t.messages?.multipleOf, n), i = t.multipleOf;
2156
+ const s = d(t.messages?.multipleOf, n), i = t.multipleOf;
2153
2157
  o = o.check(
2154
- /* @__PURE__ */ v((a) => Oo(a, i), s ? { error: s } : void 0)
2158
+ /* @__PURE__ */ y((a) => Mo(a, i), s ? { error: s } : void 0)
2155
2159
  );
2156
2160
  }
2157
2161
  if (t.enum) {
2158
- const s = t.enum, i = _(t.messages?.enum, n);
2159
- o = o.check(/* @__PURE__ */ v((a) => s.includes(a), i ? { error: i } : void 0));
2162
+ const s = t.enum, i = d(t.messages?.enum, n);
2163
+ o = o.check(/* @__PURE__ */ y((a) => s.includes(a), i ? { error: i } : void 0));
2160
2164
  }
2161
2165
  if (t.const !== void 0) {
2162
- const s = _(t.messages?.const, n);
2163
- o = o.check(/* @__PURE__ */ v((i) => i === t.const, s ? { error: s } : void 0));
2166
+ const s = d(t.messages?.const, n);
2167
+ o = o.check(/* @__PURE__ */ y((i) => i === t.const, s ? { error: s } : void 0));
2164
2168
  }
2165
2169
  return o;
2166
2170
  });
2167
2171
  }
2168
- function Io(e, n) {
2169
- return F(e, (t) => {
2170
- const r = _(t.messages?.invalid, n);
2171
- let o = r ? /* @__PURE__ */ $e(r) : /* @__PURE__ */ $e();
2172
+ function Co(e, n) {
2173
+ return R(e, (t) => {
2174
+ const r = d(t.messages?.invalid, n);
2175
+ let o = r ? /* @__PURE__ */ Se(r) : /* @__PURE__ */ Se();
2172
2176
  if (t.const !== void 0) {
2173
- const s = _(t.messages?.const, n);
2174
- o = o.check(/* @__PURE__ */ v((i) => i === t.const, s ? { error: s } : void 0));
2177
+ const s = d(t.messages?.const, n);
2178
+ o = o.check(/* @__PURE__ */ y((i) => i === t.const, s ? { error: s } : void 0));
2175
2179
  }
2176
2180
  return o;
2177
2181
  });
2178
2182
  }
2179
- function Ao(e, n) {
2180
- return F(e, (t) => {
2181
- const r = _(t.messages?.invalid, n);
2182
- let o = r ? /* @__PURE__ */ Ze(/* @__PURE__ */ Q(), r) : /* @__PURE__ */ Ze(/* @__PURE__ */ Q());
2183
+ function jo(e, n) {
2184
+ return R(e, (t) => {
2185
+ const r = d(t.messages?.invalid, n);
2186
+ let o = r ? /* @__PURE__ */ ee(/* @__PURE__ */ D(), r) : /* @__PURE__ */ ee(/* @__PURE__ */ D());
2183
2187
  if (t.required === !0) {
2184
- const s = _(t.messages?.required, n) ?? "This field is required";
2185
- o = o.check(/* @__PURE__ */ v((i) => i.length > 0, { error: s }));
2188
+ const s = d(t.messages?.required, n) ?? "This field is required";
2189
+ o = o.check(/* @__PURE__ */ y((i) => i.length > 0, { error: s }));
2186
2190
  }
2187
2191
  if (typeof t.minItems == "number") {
2188
- const s = _(t.messages?.minItems, n), i = t.minItems;
2192
+ const s = d(t.messages?.minItems, n), i = t.minItems;
2189
2193
  o = o.check(
2190
- s ? /* @__PURE__ */ v((a) => a.length >= i, { error: s }) : /* @__PURE__ */ A(i)
2194
+ s ? /* @__PURE__ */ y((a) => a.length >= i, { error: s }) : /* @__PURE__ */ O(i)
2191
2195
  );
2192
2196
  }
2193
2197
  if (typeof t.maxItems == "number") {
2194
- const s = _(t.messages?.maxItems, n), i = t.maxItems;
2198
+ const s = d(t.messages?.maxItems, n), i = t.maxItems;
2195
2199
  o = o.check(
2196
- s ? /* @__PURE__ */ v((a) => a.length <= i, { error: s }) : /* @__PURE__ */ G(i)
2200
+ s ? /* @__PURE__ */ y((a) => a.length <= i, { error: s }) : /* @__PURE__ */ x(i)
2197
2201
  );
2198
2202
  }
2199
2203
  return o;
2200
2204
  });
2201
2205
  }
2202
- function No(e, n) {
2203
- return F(e, (t) => {
2204
- let r = /* @__PURE__ */ Q();
2205
- return tn(
2206
+ const nn = "This field is required", tn = "Invalid file", rn = "Wait for the upload to finish";
2207
+ function te(e) {
2208
+ if (e === null || typeof e != "object")
2209
+ return !1;
2210
+ const n = e;
2211
+ return typeof n.id == "string" && typeof n.name == "string" && typeof n.size == "number" && typeof n.type == "string" && typeof n.status == "string" && Io.includes(n.status);
2212
+ }
2213
+ function Fo(e, n) {
2214
+ const t = d(e.messages?.invalid, n) ?? tn, r = d(e.messages?.required, n) ?? nn, o = d(e.messages?.pendingUploads, n) ?? rn, s = e.blockPendingUploads !== !1;
2215
+ return (/* @__PURE__ */ D()).check(
2216
+ /* @__PURE__ */ ue((i, a) => {
2217
+ if (i == null) {
2218
+ e.required === !0 && a.addIssue({ code: "custom", message: r });
2219
+ return;
2220
+ }
2221
+ if (!te(i)) {
2222
+ a.addIssue({ code: "custom", message: t });
2223
+ return;
2224
+ }
2225
+ s && i.status !== "uploaded" && a.addIssue({ code: "custom", message: o });
2226
+ })
2227
+ );
2228
+ }
2229
+ function Do(e, n) {
2230
+ return R(e, (t) => {
2231
+ const r = d(t.messages?.invalid, n) ?? tn;
2232
+ let o = (/* @__PURE__ */ ee(/* @__PURE__ */ D(), r)).check(
2233
+ /* @__PURE__ */ y((s) => s.every(te), { error: r })
2234
+ );
2235
+ if (t.required === !0) {
2236
+ const s = d(t.messages?.required, n) ?? nn;
2237
+ o = o.check(/* @__PURE__ */ y((i) => i.length > 0, { error: s }));
2238
+ }
2239
+ if (typeof t.minItems == "number") {
2240
+ const s = d(t.messages?.minItems, n), i = t.minItems;
2241
+ o = o.check(
2242
+ s ? /* @__PURE__ */ y((a) => a.length >= i, { error: s }) : /* @__PURE__ */ O(i)
2243
+ );
2244
+ }
2245
+ if (typeof t.maxItems == "number") {
2246
+ const s = d(t.messages?.maxItems, n), i = t.maxItems;
2247
+ o = o.check(
2248
+ s ? /* @__PURE__ */ y((a) => a.length <= i, { error: s }) : /* @__PURE__ */ x(i)
2249
+ );
2250
+ }
2251
+ if (t.blockPendingUploads !== !1) {
2252
+ const s = d(t.messages?.pendingUploads, n) ?? rn;
2253
+ o = o.check(
2254
+ /* @__PURE__ */ y(
2255
+ (i) => i.every((a) => !te(a) || a.status === "uploaded"),
2256
+ { error: s }
2257
+ )
2258
+ );
2259
+ }
2260
+ return o;
2261
+ });
2262
+ }
2263
+ function xo(e, n) {
2264
+ return R(e, (t) => {
2265
+ let r = /* @__PURE__ */ D();
2266
+ return an(
2206
2267
  Object.keys(t),
2207
2268
  // filter non-custom validator keys
2208
2269
  (o) => o !== "type" && o !== "required",
@@ -2216,17 +2277,17 @@ function No(e, n) {
2216
2277
  }
2217
2278
  const a = i(s);
2218
2279
  r = r.check(
2219
- /* @__PURE__ */ Qe((c, f) => {
2220
- const m = Se(
2280
+ /* @__PURE__ */ ue((c, f) => {
2281
+ const m = Oe(
2221
2282
  a,
2222
2283
  c
2223
2284
  );
2224
- if (!Te(m)) {
2225
- const p = m.issues[0];
2285
+ if (!Pe(m)) {
2286
+ const h = m.issues[0];
2226
2287
  f.addIssue({
2227
2288
  code: "custom",
2228
2289
  path: [],
2229
- message: p?.message || `Validation failed for ${o}`
2290
+ message: h?.message || `Validation failed for ${o}`
2230
2291
  });
2231
2292
  }
2232
2293
  })
@@ -2235,11 +2296,11 @@ function No(e, n) {
2235
2296
  ), r;
2236
2297
  });
2237
2298
  }
2238
- function F(e, n) {
2299
+ function R(e, n) {
2239
2300
  const t = n(e);
2240
- return e.required ? t : /* @__PURE__ */ Zo(t);
2301
+ return e.required ? t : /* @__PURE__ */ Oo(t);
2241
2302
  }
2242
- const Mo = {
2303
+ const Uo = {
2243
2304
  // ACTION
2244
2305
  button: async () => (await import("./button.element-CKYv0Glr.js")).ButtonElement,
2245
2306
  // INPUTS
@@ -2257,10 +2318,12 @@ const Mo = {
2257
2318
  dateInput: async () => (await import("./date.element-ChpTi2AQ.js")).DateElement,
2258
2319
  datePicker: async () => (await import("./date-picker.element-DpQmremq.js")).DatePickerElement,
2259
2320
  dateTimePicker: async () => (await import("./date-time-picker.element-Bt0GYSpS.js")).DateTimePickerElement,
2260
- dropdown: async () => (await import("./dropdown.element-D9wMyqWQ.js")).DropdownElement,
2321
+ dropdown: async () => (await import("./dropdown.element-COwjfvGf.js")).DropdownElement,
2322
+ fileUpload: async () => (await import("./file-upload.element-BYsufDWc.js")).FileUploadElement,
2261
2323
  list: async () => (await import("./list.element-DD5IL4QB.js")).ListElement,
2262
2324
  markdown: async () => (await import("./markdown.element-DUHHoi2Y.js")).MarkdownElement,
2263
- multiDropdown: async () => (await import("./multi-dropdown.element-iEOlPvux.js")).MultiDropdownElement,
2325
+ multiDropdown: async () => (await import("./multi-dropdown.element-BpLDJIil.js")).MultiDropdownElement,
2326
+ multiFileUpload: async () => (await import("./multi-file-upload.element-BLHDoyzh.js")).MultiFileUploadElement,
2264
2327
  multiList: async () => (await import("./multi-list.element-CCX3i3k6.js")).MultiListElement,
2265
2328
  password: async () => (await import("./password.element-xw5gugEg.js")).PasswordElement,
2266
2329
  textinput: async () => (await import("./textinput.element-0q5F5ol3.js")).TextinputElement,
@@ -2286,14 +2349,14 @@ const Mo = {
2286
2349
  markdownText: async () => (await import("./markdown-text.element-DflCQwAo.js")).MarkdownTextElement,
2287
2350
  renderer: async () => (await import("./renderer.element-BVwerbtL.js")).RendererElement
2288
2351
  };
2289
- class Co extends rn({
2290
- widgetLoaders: Mo,
2291
- validators: So,
2292
- resolveFormInput: nn
2352
+ class Lo extends cn({
2353
+ widgetLoaders: Uo,
2354
+ validators: Ao,
2355
+ resolveFormInput: sn
2293
2356
  }) {
2294
2357
  }
2295
- en("gui-form", Co);
2358
+ on("gui-form", Lo);
2296
2359
  export {
2297
- Co as FormElement,
2298
- Mo as widgetLoaders
2360
+ Lo as FormElement,
2361
+ Uo as widgetLoaders
2299
2362
  };