@getcredify/credify-insurance-widget 1.41.1 → 1.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/README.md +91 -0
  2. package/dist/address-BEVwov8q-C8G87tij.js +59 -0
  3. package/dist/api-C7f0dnt7.js +51 -0
  4. package/dist/car-B0hJrE0Z.js +26 -0
  5. package/dist/check-Dfh9u4c0.js +15 -0
  6. package/dist/copy-applicant-offer-B-BIN2o5-BX-QE7Ao.js +56 -0
  7. package/dist/copy-from-record-BNP6CFFR-Bcb9EW-a.js +189 -0
  8. package/dist/core-Po4qPIof-fZL0sXdW.js +417 -0
  9. package/dist/coverageDerivation-CV2ORogj-CAthw76f.js +76 -0
  10. package/dist/credify-insurance-widget.css +1 -1
  11. package/dist/{fixtures-ijbZ16Zg-BfdDTLYu.js → fixtures-ijbZ16Zg-Csnryzo8.js} +1 -1
  12. package/dist/household-prefill-DVLBBva1-GGgzEdDL.js +151 -0
  13. package/dist/householdPrefill-DLm3pxFH-B34UGBGP.js +111 -0
  14. package/dist/iframe/assets/address-BEVwov8q-BpbNiia-.js +1 -0
  15. package/dist/iframe/assets/car-DkfXVYz0.js +6 -0
  16. package/dist/iframe/assets/check-l6TGSrXO.js +6 -0
  17. package/dist/iframe/assets/copy-applicant-offer-B-BIN2o5-cs-SCWuH.js +1 -0
  18. package/dist/iframe/assets/copy-from-record-BNP6CFFR-BtCRUQRw.js +6 -0
  19. package/dist/iframe/assets/core-Po4qPIof-jDmdAxP7.js +16 -0
  20. package/dist/iframe/assets/coverageDerivation-CV2ORogj-DhQFAhwv.js +1 -0
  21. package/dist/iframe/assets/dob-calendar-RIJ5S6YU-DO_r0-z3.js +1 -0
  22. package/dist/iframe/assets/{fixtures-ijbZ16Zg-DbpkZfa3.js → fixtures-ijbZ16Zg-CUQxYANz.js} +1 -1
  23. package/dist/iframe/assets/household-prefill-DVLBBva1-DTK1EHT0.js +1 -0
  24. package/dist/iframe/assets/householdPrefill-DLm3pxFH-BM54Rqyd.js +6 -0
  25. package/dist/iframe/assets/iframe-BImWklE9.js +107 -0
  26. package/dist/iframe/assets/iframe-Bl0qTZgO.css +1 -0
  27. package/dist/iframe/assets/index-CNb9AhPB.js +6 -0
  28. package/dist/iframe/assets/intake-review-panel-B7rXvRvm-wNGntinn.js +1 -0
  29. package/dist/iframe/assets/{mockJump-CL8w249w-Bp9W72n5.js → mockJump-DpXrnQUq-DKyp2H5R.js} +1 -1
  30. package/dist/iframe/assets/payload-JXpCaeS6-CcfrGvLo.js +1 -0
  31. package/dist/iframe/assets/question-list-ChcBzofd-D5ZVofFR.js +317 -0
  32. package/dist/iframe/assets/rates-panel-BaIzEqX6-GSsykLkc.js +17 -0
  33. package/dist/iframe/assets/review-panel-DYCuhwdo-CyBebe6T.js +6 -0
  34. package/dist/iframe/assets/stage-Bpq1A5xB-CwZgWOhp.js +1 -0
  35. package/dist/iframe/assets/types-LUGvo5ic-CB-wcgK3.js +1 -0
  36. package/dist/iframe/assets/validation-DRqHT-u7-pY2KjHw4.js +3 -0
  37. package/dist/iframe/assets/vehicleCoverage-BPJaWQyg-DBJ_jL3e.js +1 -0
  38. package/dist/iframe/assets/visibility-hEdBjgi7-_AUGO8E2.js +1 -0
  39. package/dist/iframe/iframe.html +2 -2
  40. package/dist/index-CQXR1Un8.js +354 -0
  41. package/dist/index.d.ts +16 -0
  42. package/dist/index.es.js +4 -4
  43. package/dist/index.umd.js +105 -115
  44. package/dist/intake-review-panel-B7rXvRvm-CDyR-rVg.js +186 -0
  45. package/dist/{mockJump-CL8w249w-1jjBaNyK.js → mockJump-DpXrnQUq-BaitU9aZ.js} +1 -1
  46. package/dist/payload-JXpCaeS6-pjITtvlm.js +128 -0
  47. package/dist/question-list-ChcBzofd-fVRN9fTl.js +6505 -0
  48. package/dist/rates-panel-BaIzEqX6-BULjKxqz.js +1001 -0
  49. package/dist/review-panel-DYCuhwdo-BImR4S06.js +903 -0
  50. package/dist/stage-Bpq1A5xB-Cphc07aC.js +197 -0
  51. package/dist/types-LUGvo5ic-CiVRcsV9.js +9 -0
  52. package/dist/utils/assets.d.ts +12 -0
  53. package/dist/utils/branding.d.ts +21 -0
  54. package/dist/utils/partner.d.ts +32 -0
  55. package/dist/utils/support/bland.d.ts +5 -0
  56. package/dist/validation-DRqHT-u7-CL2m7f4k.js +2852 -0
  57. package/dist/vehicleCoverage-BPJaWQyg-g7bBFmro.js +144 -0
  58. package/dist/visibility-hEdBjgi7-WW4BVjmf.js +198 -0
  59. package/dist/widget-BUAzkBEK.js +13061 -0
  60. package/package.json +2 -2
  61. package/dist/api-Cjj6Dfhg.js +0 -51
  62. package/dist/iframe/assets/dob-calendar-RIJ5S6YU-DMJbmHdB.js +0 -1
  63. package/dist/iframe/assets/iframe-DFqQdMHv.css +0 -1
  64. package/dist/iframe/assets/iframe-iPSy7w5L.js +0 -494
  65. package/dist/widget-Umfy69_M.js +0 -27318
@@ -0,0 +1,2852 @@
1
+ import { _ as _t } from "./visibility-hEdBjgi7-WW4BVjmf.js";
2
+ (function() {
3
+ if (typeof e > "u")
4
+ var e = { env: {} };
5
+ })();
6
+ var he;
7
+ function u(e, t, r) {
8
+ function n(s, c) {
9
+ if (s._zod || Object.defineProperty(s, "_zod", {
10
+ value: {
11
+ def: c,
12
+ constr: i,
13
+ traits: /* @__PURE__ */ new Set()
14
+ },
15
+ enumerable: !1
16
+ }), s._zod.traits.has(e))
17
+ return;
18
+ s._zod.traits.add(e), t(s, c);
19
+ const l = i.prototype, f = Object.keys(l);
20
+ for (let m = 0; m < f.length; m++) {
21
+ const b = f[m];
22
+ b in s || (s[b] = l[b].bind(s));
23
+ }
24
+ }
25
+ const o = r?.Parent ?? Object;
26
+ class a extends o {
27
+ }
28
+ Object.defineProperty(a, "name", { value: e });
29
+ function i(s) {
30
+ var c;
31
+ const l = r?.Parent ? new a() : this;
32
+ n(l, s), (c = l._zod).deferred ?? (c.deferred = []);
33
+ for (const f of l._zod.deferred)
34
+ f();
35
+ return l;
36
+ }
37
+ return Object.defineProperty(i, "init", { value: n }), Object.defineProperty(i, Symbol.hasInstance, {
38
+ value: (s) => r?.Parent && s instanceof r.Parent ? !0 : s?._zod?.traits?.has(e)
39
+ }), Object.defineProperty(i, "name", { value: e }), i;
40
+ }
41
+ class R extends Error {
42
+ constructor() {
43
+ super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
44
+ }
45
+ }
46
+ class Fe extends Error {
47
+ constructor(t) {
48
+ super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
49
+ }
50
+ }
51
+ (he = globalThis).__zod_globalConfig ?? (he.__zod_globalConfig = {});
52
+ const gt = globalThis.__zod_globalConfig;
53
+ function P(e) {
54
+ return gt;
55
+ }
56
+ function oe(e, t) {
57
+ return typeof t == "bigint" ? t.toString() : t;
58
+ }
59
+ function ce(e) {
60
+ return e == null;
61
+ }
62
+ function le(e) {
63
+ const t = e.startsWith("^") ? 1 : 0, r = e.endsWith("$") ? e.length - 1 : e.length;
64
+ return e.slice(t, r);
65
+ }
66
+ function bt(e, t) {
67
+ const r = e / t, n = Math.round(r), o = Number.EPSILON * Math.max(Math.abs(r), 1);
68
+ return Math.abs(r - n) < o ? 0 : r - n;
69
+ }
70
+ const _e = /* @__PURE__ */ Symbol("evaluating");
71
+ function p(e, t, r) {
72
+ let n;
73
+ Object.defineProperty(e, t, {
74
+ get() {
75
+ if (n !== _e)
76
+ return n === void 0 && (n = _e, n = r()), n;
77
+ },
78
+ set(o) {
79
+ Object.defineProperty(e, t, {
80
+ value: o
81
+ // configurable: true,
82
+ });
83
+ },
84
+ configurable: !0
85
+ });
86
+ }
87
+ function vt(...e) {
88
+ const t = {};
89
+ for (const r of e) {
90
+ const n = Object.getOwnPropertyDescriptors(r);
91
+ Object.assign(t, n);
92
+ }
93
+ return Object.defineProperties({}, t);
94
+ }
95
+ function yt(e) {
96
+ return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
97
+ }
98
+ const Je = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
99
+ };
100
+ function ge(e) {
101
+ return typeof e == "object" && e !== null && !Array.isArray(e);
102
+ }
103
+ function ie(e) {
104
+ if (ge(e) === !1)
105
+ return !1;
106
+ const t = e.constructor;
107
+ if (t === void 0 || typeof t != "function")
108
+ return !0;
109
+ const r = t.prototype;
110
+ return !(ge(r) === !1 || Object.prototype.hasOwnProperty.call(r, "isPrototypeOf") === !1);
111
+ }
112
+ function Ve(e) {
113
+ return ie(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
114
+ }
115
+ function F(e) {
116
+ return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
117
+ }
118
+ function wt(e, t, r) {
119
+ const n = new e._zod.constr(t ?? e._zod.def);
120
+ return (!t || r?.parent) && (n._zod.parent = e), n;
121
+ }
122
+ function d(e) {
123
+ const t = e;
124
+ if (!t)
125
+ return {};
126
+ if (typeof t == "string")
127
+ return { error: () => t };
128
+ if (t?.message !== void 0) {
129
+ if (t?.error !== void 0)
130
+ throw new Error("Cannot specify both `message` and `error` params");
131
+ t.error = t.message;
132
+ }
133
+ return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
134
+ }
135
+ const zt = {
136
+ safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
137
+ int32: [-2147483648, 2147483647],
138
+ uint32: [0, 4294967295],
139
+ float32: [-34028234663852886e22, 34028234663852886e22],
140
+ float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
141
+ };
142
+ function U(e, t = 0) {
143
+ if (e.aborted === !0)
144
+ return !0;
145
+ for (let r = t; r < e.issues.length; r++)
146
+ if (e.issues[r]?.continue !== !0)
147
+ return !0;
148
+ return !1;
149
+ }
150
+ function $t(e, t = 0) {
151
+ if (e.aborted === !0)
152
+ return !0;
153
+ for (let r = t; r < e.issues.length; r++)
154
+ if (e.issues[r]?.continue === !1)
155
+ return !0;
156
+ return !1;
157
+ }
158
+ function kt(e, t) {
159
+ return t.map((r) => {
160
+ var n;
161
+ return (n = r).path ?? (n.path = []), r.path.unshift(e), r;
162
+ });
163
+ }
164
+ function V(e) {
165
+ return typeof e == "string" ? e : e?.message;
166
+ }
167
+ function E(e, t, r) {
168
+ const n = e.message ? e.message : V(e.inst?._zod.def?.error?.(e)) ?? V(t?.error?.(e)) ?? V(r.customError?.(e)) ?? V(r.localeError?.(e)) ?? "Invalid input", { inst: o, continue: a, input: i, ...s } = e;
169
+ return s.path ?? (s.path = []), s.message = n, t?.reportInput && (s.input = i), s;
170
+ }
171
+ function de(e) {
172
+ return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
173
+ }
174
+ function J(...e) {
175
+ const [t, r, n] = e;
176
+ return typeof t == "string" ? {
177
+ message: t,
178
+ code: "custom",
179
+ input: r,
180
+ inst: n
181
+ } : { ...t };
182
+ }
183
+ const Ye = (e, t) => {
184
+ e.name = "$ZodError", Object.defineProperty(e, "_zod", {
185
+ value: e._zod,
186
+ enumerable: !1
187
+ }), Object.defineProperty(e, "issues", {
188
+ value: t,
189
+ enumerable: !1
190
+ }), e.message = JSON.stringify(t, oe, 2), Object.defineProperty(e, "toString", {
191
+ value: () => e.message,
192
+ enumerable: !1
193
+ });
194
+ }, Ke = u("$ZodError", Ye), We = u("$ZodError", Ye, { Parent: Error });
195
+ function Zt(e, t = (r) => r.message) {
196
+ const r = {}, n = [];
197
+ for (const o of e.issues)
198
+ o.path.length > 0 ? (r[o.path[0]] = r[o.path[0]] || [], r[o.path[0]].push(t(o))) : n.push(t(o));
199
+ return { formErrors: n, fieldErrors: r };
200
+ }
201
+ function St(e, t = (r) => r.message) {
202
+ const r = { _errors: [] }, n = (o, a = []) => {
203
+ for (const i of o.issues)
204
+ if (i.code === "invalid_union" && i.errors.length)
205
+ i.errors.map((s) => n({ issues: s }, [...a, ...i.path]));
206
+ else if (i.code === "invalid_key")
207
+ n({ issues: i.issues }, [...a, ...i.path]);
208
+ else if (i.code === "invalid_element")
209
+ n({ issues: i.issues }, [...a, ...i.path]);
210
+ else {
211
+ const s = [...a, ...i.path];
212
+ if (s.length === 0)
213
+ r._errors.push(t(i));
214
+ else {
215
+ let c = r, l = 0;
216
+ for (; l < s.length; ) {
217
+ const f = s[l];
218
+ l === s.length - 1 ? (c[f] = c[f] || { _errors: [] }, c[f]._errors.push(t(i))) : c[f] = c[f] || { _errors: [] }, c = c[f], l++;
219
+ }
220
+ }
221
+ }
222
+ };
223
+ return n(e), r;
224
+ }
225
+ const fe = (e) => (t, r, n, o) => {
226
+ const a = n ? { ...n, async: !1 } : { async: !1 }, i = t._zod.run({ value: r, issues: [] }, a);
227
+ if (i instanceof Promise)
228
+ throw new R();
229
+ if (i.issues.length) {
230
+ const s = new (o?.Err ?? e)(i.issues.map((c) => E(c, a, P())));
231
+ throw Je(s, o?.callee), s;
232
+ }
233
+ return i.value;
234
+ }, me = (e) => async (t, r, n, o) => {
235
+ const a = n ? { ...n, async: !0 } : { async: !0 };
236
+ let i = t._zod.run({ value: r, issues: [] }, a);
237
+ if (i instanceof Promise && (i = await i), i.issues.length) {
238
+ const s = new (o?.Err ?? e)(i.issues.map((c) => E(c, a, P())));
239
+ throw Je(s, o?.callee), s;
240
+ }
241
+ return i.value;
242
+ }, H = (e) => (t, r, n) => {
243
+ const o = n ? { ...n, async: !1 } : { async: !1 }, a = t._zod.run({ value: r, issues: [] }, o);
244
+ if (a instanceof Promise)
245
+ throw new R();
246
+ return a.issues.length ? {
247
+ success: !1,
248
+ error: new (e ?? Ke)(a.issues.map((i) => E(i, o, P())))
249
+ } : { success: !0, data: a.value };
250
+ }, Ot = /* @__PURE__ */ H(We), Q = (e) => async (t, r, n) => {
251
+ const o = n ? { ...n, async: !0 } : { async: !0 };
252
+ let a = t._zod.run({ value: r, issues: [] }, o);
253
+ return a instanceof Promise && (a = await a), a.issues.length ? {
254
+ success: !1,
255
+ error: new e(a.issues.map((i) => E(i, o, P())))
256
+ } : { success: !0, data: a.value };
257
+ }, It = /* @__PURE__ */ Q(We), Nt = (e) => (t, r, n) => {
258
+ const o = n ? { ...n, direction: "backward" } : { direction: "backward" };
259
+ return fe(e)(t, r, o);
260
+ }, Tt = (e) => (t, r, n) => fe(e)(t, r, n), Pt = (e) => async (t, r, n) => {
261
+ const o = n ? { ...n, direction: "backward" } : { direction: "backward" };
262
+ return me(e)(t, r, o);
263
+ }, Et = (e) => async (t, r, n) => me(e)(t, r, n), At = (e) => (t, r, n) => {
264
+ const o = n ? { ...n, direction: "backward" } : { direction: "backward" };
265
+ return H(e)(t, r, o);
266
+ }, Ct = (e) => (t, r, n) => H(e)(t, r, n), Dt = (e) => async (t, r, n) => {
267
+ const o = n ? { ...n, direction: "backward" } : { direction: "backward" };
268
+ return Q(e)(t, r, o);
269
+ }, Ut = (e) => async (t, r, n) => Q(e)(t, r, n), Rt = /^[cC][0-9a-z]{6,}$/, xt = /^[0-9a-z]+$/, jt = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Mt = /^[0-9a-vA-V]{20}$/, Lt = /^[A-Za-z0-9]{27}$/, Ft = /^[a-zA-Z0-9_-]{21}$/, Jt = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Vt = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, be = (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)$/, Yt = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Kt = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
270
+ function Wt() {
271
+ return new RegExp(Kt, "u");
272
+ }
273
+ const qt = /^(?:(?: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])$/, Gt = /^(([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}|:))$/, Bt = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, Xt = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Ht = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, qe = /^[A-Za-z0-9_-]*$/, Qt = /^https?$/, er = /^\+[1-9]\d{6,14}$/, Ge = "(?:(?:\\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])))", tr = /* @__PURE__ */ new RegExp(`^${Ge}$`);
274
+ function Be(e) {
275
+ const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
276
+ return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
277
+ }
278
+ function rr(e) {
279
+ return new RegExp(`^${Be(e)}$`);
280
+ }
281
+ function nr(e) {
282
+ const t = Be({ precision: e.precision }), r = ["Z"];
283
+ e.local && r.push(""), e.offset && r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
284
+ const n = `${t}(?:${r.join("|")})`;
285
+ return new RegExp(`^${Ge}T(?:${n})$`);
286
+ }
287
+ const or = (e) => {
288
+ const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
289
+ return new RegExp(`^${t}$`);
290
+ }, ir = /^-?\d+$/, ar = /^-?\d+(?:\.\d+)?$/, sr = /^[^A-Z]*$/, ur = /^[^a-z]*$/, Z = /* @__PURE__ */ u("$ZodCheck", (e, t) => {
291
+ var r;
292
+ e._zod ?? (e._zod = {}), e._zod.def = t, (r = e._zod).onattach ?? (r.onattach = []);
293
+ }), Xe = {
294
+ number: "number",
295
+ bigint: "bigint",
296
+ object: "date"
297
+ }, He = /* @__PURE__ */ u("$ZodCheckLessThan", (e, t) => {
298
+ Z.init(e, t);
299
+ const r = Xe[typeof t.value];
300
+ e._zod.onattach.push((n) => {
301
+ const o = n._zod.bag, a = (t.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
302
+ t.value < a && (t.inclusive ? o.maximum = t.value : o.exclusiveMaximum = t.value);
303
+ }), e._zod.check = (n) => {
304
+ (t.inclusive ? n.value <= t.value : n.value < t.value) || n.issues.push({
305
+ origin: r,
306
+ code: "too_big",
307
+ maximum: typeof t.value == "object" ? t.value.getTime() : t.value,
308
+ input: n.value,
309
+ inclusive: t.inclusive,
310
+ inst: e,
311
+ continue: !t.abort
312
+ });
313
+ };
314
+ }), Qe = /* @__PURE__ */ u("$ZodCheckGreaterThan", (e, t) => {
315
+ Z.init(e, t);
316
+ const r = Xe[typeof t.value];
317
+ e._zod.onattach.push((n) => {
318
+ const o = n._zod.bag, a = (t.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
319
+ t.value > a && (t.inclusive ? o.minimum = t.value : o.exclusiveMinimum = t.value);
320
+ }), e._zod.check = (n) => {
321
+ (t.inclusive ? n.value >= t.value : n.value > t.value) || n.issues.push({
322
+ origin: r,
323
+ code: "too_small",
324
+ minimum: typeof t.value == "object" ? t.value.getTime() : t.value,
325
+ input: n.value,
326
+ inclusive: t.inclusive,
327
+ inst: e,
328
+ continue: !t.abort
329
+ });
330
+ };
331
+ }), cr = /* @__PURE__ */ u("$ZodCheckMultipleOf", (e, t) => {
332
+ Z.init(e, t), e._zod.onattach.push((r) => {
333
+ var n;
334
+ (n = r._zod.bag).multipleOf ?? (n.multipleOf = t.value);
335
+ }), e._zod.check = (r) => {
336
+ if (typeof r.value != typeof t.value)
337
+ throw new Error("Cannot mix number and bigint in multiple_of check.");
338
+ (typeof r.value == "bigint" ? r.value % t.value === BigInt(0) : bt(r.value, t.value) === 0) || r.issues.push({
339
+ origin: typeof r.value,
340
+ code: "not_multiple_of",
341
+ divisor: t.value,
342
+ input: r.value,
343
+ inst: e,
344
+ continue: !t.abort
345
+ });
346
+ };
347
+ }), lr = /* @__PURE__ */ u("$ZodCheckNumberFormat", (e, t) => {
348
+ Z.init(e, t), t.format = t.format || "float64";
349
+ const r = t.format?.includes("int"), n = r ? "int" : "number", [o, a] = zt[t.format];
350
+ e._zod.onattach.push((i) => {
351
+ const s = i._zod.bag;
352
+ s.format = t.format, s.minimum = o, s.maximum = a, r && (s.pattern = ir);
353
+ }), e._zod.check = (i) => {
354
+ const s = i.value;
355
+ if (r) {
356
+ if (!Number.isInteger(s)) {
357
+ i.issues.push({
358
+ expected: n,
359
+ format: t.format,
360
+ code: "invalid_type",
361
+ continue: !1,
362
+ input: s,
363
+ inst: e
364
+ });
365
+ return;
366
+ }
367
+ if (!Number.isSafeInteger(s)) {
368
+ s > 0 ? i.issues.push({
369
+ input: s,
370
+ code: "too_big",
371
+ maximum: Number.MAX_SAFE_INTEGER,
372
+ note: "Integers must be within the safe integer range.",
373
+ inst: e,
374
+ origin: n,
375
+ inclusive: !0,
376
+ continue: !t.abort
377
+ }) : i.issues.push({
378
+ input: s,
379
+ code: "too_small",
380
+ minimum: Number.MIN_SAFE_INTEGER,
381
+ note: "Integers must be within the safe integer range.",
382
+ inst: e,
383
+ origin: n,
384
+ inclusive: !0,
385
+ continue: !t.abort
386
+ });
387
+ return;
388
+ }
389
+ }
390
+ s < o && i.issues.push({
391
+ origin: "number",
392
+ input: s,
393
+ code: "too_small",
394
+ minimum: o,
395
+ inclusive: !0,
396
+ inst: e,
397
+ continue: !t.abort
398
+ }), s > a && i.issues.push({
399
+ origin: "number",
400
+ input: s,
401
+ code: "too_big",
402
+ maximum: a,
403
+ inclusive: !0,
404
+ inst: e,
405
+ continue: !t.abort
406
+ });
407
+ };
408
+ }), dr = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, t) => {
409
+ var r;
410
+ Z.init(e, t), (r = e._zod.def).when ?? (r.when = (n) => {
411
+ const o = n.value;
412
+ return !ce(o) && o.length !== void 0;
413
+ }), e._zod.onattach.push((n) => {
414
+ const o = n._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
415
+ t.maximum < o && (n._zod.bag.maximum = t.maximum);
416
+ }), e._zod.check = (n) => {
417
+ const o = n.value;
418
+ if (o.length <= t.maximum)
419
+ return;
420
+ const i = de(o);
421
+ n.issues.push({
422
+ origin: i,
423
+ code: "too_big",
424
+ maximum: t.maximum,
425
+ inclusive: !0,
426
+ input: o,
427
+ inst: e,
428
+ continue: !t.abort
429
+ });
430
+ };
431
+ }), fr = /* @__PURE__ */ u("$ZodCheckMinLength", (e, t) => {
432
+ var r;
433
+ Z.init(e, t), (r = e._zod.def).when ?? (r.when = (n) => {
434
+ const o = n.value;
435
+ return !ce(o) && o.length !== void 0;
436
+ }), e._zod.onattach.push((n) => {
437
+ const o = n._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
438
+ t.minimum > o && (n._zod.bag.minimum = t.minimum);
439
+ }), e._zod.check = (n) => {
440
+ const o = n.value;
441
+ if (o.length >= t.minimum)
442
+ return;
443
+ const i = de(o);
444
+ n.issues.push({
445
+ origin: i,
446
+ code: "too_small",
447
+ minimum: t.minimum,
448
+ inclusive: !0,
449
+ input: o,
450
+ inst: e,
451
+ continue: !t.abort
452
+ });
453
+ };
454
+ }), mr = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, t) => {
455
+ var r;
456
+ Z.init(e, t), (r = e._zod.def).when ?? (r.when = (n) => {
457
+ const o = n.value;
458
+ return !ce(o) && o.length !== void 0;
459
+ }), e._zod.onattach.push((n) => {
460
+ const o = n._zod.bag;
461
+ o.minimum = t.length, o.maximum = t.length, o.length = t.length;
462
+ }), e._zod.check = (n) => {
463
+ const o = n.value, a = o.length;
464
+ if (a === t.length)
465
+ return;
466
+ const i = de(o), s = a > t.length;
467
+ n.issues.push({
468
+ origin: i,
469
+ ...s ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
470
+ inclusive: !0,
471
+ exact: !0,
472
+ input: n.value,
473
+ inst: e,
474
+ continue: !t.abort
475
+ });
476
+ };
477
+ }), ee = /* @__PURE__ */ u("$ZodCheckStringFormat", (e, t) => {
478
+ var r, n;
479
+ Z.init(e, t), e._zod.onattach.push((o) => {
480
+ const a = o._zod.bag;
481
+ a.format = t.format, t.pattern && (a.patterns ?? (a.patterns = /* @__PURE__ */ new Set()), a.patterns.add(t.pattern));
482
+ }), t.pattern ? (r = e._zod).check ?? (r.check = (o) => {
483
+ t.pattern.lastIndex = 0, !t.pattern.test(o.value) && o.issues.push({
484
+ origin: "string",
485
+ code: "invalid_format",
486
+ format: t.format,
487
+ input: o.value,
488
+ ...t.pattern ? { pattern: t.pattern.toString() } : {},
489
+ inst: e,
490
+ continue: !t.abort
491
+ });
492
+ }) : (n = e._zod).check ?? (n.check = () => {
493
+ });
494
+ }), pr = /* @__PURE__ */ u("$ZodCheckRegex", (e, t) => {
495
+ ee.init(e, t), e._zod.check = (r) => {
496
+ t.pattern.lastIndex = 0, !t.pattern.test(r.value) && r.issues.push({
497
+ origin: "string",
498
+ code: "invalid_format",
499
+ format: "regex",
500
+ input: r.value,
501
+ pattern: t.pattern.toString(),
502
+ inst: e,
503
+ continue: !t.abort
504
+ });
505
+ };
506
+ }), hr = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, t) => {
507
+ t.pattern ?? (t.pattern = sr), ee.init(e, t);
508
+ }), _r = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, t) => {
509
+ t.pattern ?? (t.pattern = ur), ee.init(e, t);
510
+ }), gr = /* @__PURE__ */ u("$ZodCheckIncludes", (e, t) => {
511
+ Z.init(e, t);
512
+ const r = F(t.includes), n = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${r}` : r);
513
+ t.pattern = n, e._zod.onattach.push((o) => {
514
+ const a = o._zod.bag;
515
+ a.patterns ?? (a.patterns = /* @__PURE__ */ new Set()), a.patterns.add(n);
516
+ }), e._zod.check = (o) => {
517
+ o.value.includes(t.includes, t.position) || o.issues.push({
518
+ origin: "string",
519
+ code: "invalid_format",
520
+ format: "includes",
521
+ includes: t.includes,
522
+ input: o.value,
523
+ inst: e,
524
+ continue: !t.abort
525
+ });
526
+ };
527
+ }), br = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, t) => {
528
+ Z.init(e, t);
529
+ const r = new RegExp(`^${F(t.prefix)}.*`);
530
+ t.pattern ?? (t.pattern = r), e._zod.onattach.push((n) => {
531
+ const o = n._zod.bag;
532
+ o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(r);
533
+ }), e._zod.check = (n) => {
534
+ n.value.startsWith(t.prefix) || n.issues.push({
535
+ origin: "string",
536
+ code: "invalid_format",
537
+ format: "starts_with",
538
+ prefix: t.prefix,
539
+ input: n.value,
540
+ inst: e,
541
+ continue: !t.abort
542
+ });
543
+ };
544
+ }), vr = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, t) => {
545
+ Z.init(e, t);
546
+ const r = new RegExp(`.*${F(t.suffix)}$`);
547
+ t.pattern ?? (t.pattern = r), e._zod.onattach.push((n) => {
548
+ const o = n._zod.bag;
549
+ o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(r);
550
+ }), e._zod.check = (n) => {
551
+ n.value.endsWith(t.suffix) || n.issues.push({
552
+ origin: "string",
553
+ code: "invalid_format",
554
+ format: "ends_with",
555
+ suffix: t.suffix,
556
+ input: n.value,
557
+ inst: e,
558
+ continue: !t.abort
559
+ });
560
+ };
561
+ }), yr = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, t) => {
562
+ Z.init(e, t), e._zod.check = (r) => {
563
+ r.value = t.tx(r.value);
564
+ };
565
+ }), wr = {
566
+ major: 4,
567
+ minor: 4,
568
+ patch: 3
569
+ }, y = /* @__PURE__ */ u("$ZodType", (e, t) => {
570
+ var r;
571
+ e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = wr;
572
+ const n = [...e._zod.def.checks ?? []];
573
+ e._zod.traits.has("$ZodCheck") && n.unshift(e);
574
+ for (const o of n)
575
+ for (const a of o._zod.onattach)
576
+ a(e);
577
+ if (n.length === 0)
578
+ (r = e._zod).deferred ?? (r.deferred = []), e._zod.deferred?.push(() => {
579
+ e._zod.run = e._zod.parse;
580
+ });
581
+ else {
582
+ const o = (i, s, c) => {
583
+ let l = U(i), f;
584
+ for (const m of s) {
585
+ if (m._zod.def.when) {
586
+ if ($t(i) || !m._zod.def.when(i))
587
+ continue;
588
+ } else if (l)
589
+ continue;
590
+ const b = i.issues.length, h = m._zod.check(i);
591
+ if (h instanceof Promise && c?.async === !1)
592
+ throw new R();
593
+ if (f || h instanceof Promise)
594
+ f = (f ?? Promise.resolve()).then(async () => {
595
+ await h, i.issues.length !== b && (l || (l = U(i, b)));
596
+ });
597
+ else {
598
+ if (i.issues.length === b)
599
+ continue;
600
+ l || (l = U(i, b));
601
+ }
602
+ }
603
+ return f ? f.then(() => i) : i;
604
+ }, a = (i, s, c) => {
605
+ if (U(i))
606
+ return i.aborted = !0, i;
607
+ const l = o(s, n, c);
608
+ if (l instanceof Promise) {
609
+ if (c.async === !1)
610
+ throw new R();
611
+ return l.then((f) => e._zod.parse(f, c));
612
+ }
613
+ return e._zod.parse(l, c);
614
+ };
615
+ e._zod.run = (i, s) => {
616
+ if (s.skipChecks)
617
+ return e._zod.parse(i, s);
618
+ if (s.direction === "backward") {
619
+ const l = e._zod.parse({ value: i.value, issues: [] }, { ...s, skipChecks: !0 });
620
+ return l instanceof Promise ? l.then((f) => a(f, i, s)) : a(l, i, s);
621
+ }
622
+ const c = e._zod.parse(i, s);
623
+ if (c instanceof Promise) {
624
+ if (s.async === !1)
625
+ throw new R();
626
+ return c.then((l) => o(l, n, s));
627
+ }
628
+ return o(c, n, s);
629
+ };
630
+ }
631
+ p(e, "~standard", () => ({
632
+ validate: (o) => {
633
+ try {
634
+ const a = Ot(e, o);
635
+ return a.success ? { value: a.data } : { issues: a.error?.issues };
636
+ } catch {
637
+ return It(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
638
+ }
639
+ },
640
+ vendor: "zod",
641
+ version: 1
642
+ }));
643
+ }), pe = /* @__PURE__ */ u("$ZodString", (e, t) => {
644
+ y.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? or(e._zod.bag), e._zod.parse = (r, n) => {
645
+ if (t.coerce)
646
+ try {
647
+ r.value = String(r.value);
648
+ } catch {
649
+ }
650
+ return typeof r.value == "string" || r.issues.push({
651
+ expected: "string",
652
+ code: "invalid_type",
653
+ input: r.value,
654
+ inst: e
655
+ }), r;
656
+ };
657
+ }), _ = /* @__PURE__ */ u("$ZodStringFormat", (e, t) => {
658
+ ee.init(e, t), pe.init(e, t);
659
+ }), zr = /* @__PURE__ */ u("$ZodGUID", (e, t) => {
660
+ t.pattern ?? (t.pattern = Vt), _.init(e, t);
661
+ }), $r = /* @__PURE__ */ u("$ZodUUID", (e, t) => {
662
+ if (t.version) {
663
+ const n = {
664
+ v1: 1,
665
+ v2: 2,
666
+ v3: 3,
667
+ v4: 4,
668
+ v5: 5,
669
+ v6: 6,
670
+ v7: 7,
671
+ v8: 8
672
+ }[t.version];
673
+ if (n === void 0)
674
+ throw new Error(`Invalid UUID version: "${t.version}"`);
675
+ t.pattern ?? (t.pattern = be(n));
676
+ } else
677
+ t.pattern ?? (t.pattern = be());
678
+ _.init(e, t);
679
+ }), kr = /* @__PURE__ */ u("$ZodEmail", (e, t) => {
680
+ t.pattern ?? (t.pattern = Yt), _.init(e, t);
681
+ }), Zr = /* @__PURE__ */ u("$ZodURL", (e, t) => {
682
+ _.init(e, t), e._zod.check = (r) => {
683
+ try {
684
+ const n = r.value.trim();
685
+ if (!t.normalize && t.protocol?.source === Qt.source && !/^https?:\/\//i.test(n)) {
686
+ r.issues.push({
687
+ code: "invalid_format",
688
+ format: "url",
689
+ note: "Invalid URL format",
690
+ input: r.value,
691
+ inst: e,
692
+ continue: !t.abort
693
+ });
694
+ return;
695
+ }
696
+ const o = new URL(n);
697
+ t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(o.hostname) || r.issues.push({
698
+ code: "invalid_format",
699
+ format: "url",
700
+ note: "Invalid hostname",
701
+ pattern: t.hostname.source,
702
+ input: r.value,
703
+ inst: e,
704
+ continue: !t.abort
705
+ })), t.protocol && (t.protocol.lastIndex = 0, t.protocol.test(o.protocol.endsWith(":") ? o.protocol.slice(0, -1) : o.protocol) || r.issues.push({
706
+ code: "invalid_format",
707
+ format: "url",
708
+ note: "Invalid protocol",
709
+ pattern: t.protocol.source,
710
+ input: r.value,
711
+ inst: e,
712
+ continue: !t.abort
713
+ })), t.normalize ? r.value = o.href : r.value = n;
714
+ return;
715
+ } catch {
716
+ r.issues.push({
717
+ code: "invalid_format",
718
+ format: "url",
719
+ input: r.value,
720
+ inst: e,
721
+ continue: !t.abort
722
+ });
723
+ }
724
+ };
725
+ }), Sr = /* @__PURE__ */ u("$ZodEmoji", (e, t) => {
726
+ t.pattern ?? (t.pattern = Wt()), _.init(e, t);
727
+ }), Or = /* @__PURE__ */ u("$ZodNanoID", (e, t) => {
728
+ t.pattern ?? (t.pattern = Ft), _.init(e, t);
729
+ }), Ir = /* @__PURE__ */ u("$ZodCUID", (e, t) => {
730
+ t.pattern ?? (t.pattern = Rt), _.init(e, t);
731
+ }), Nr = /* @__PURE__ */ u("$ZodCUID2", (e, t) => {
732
+ t.pattern ?? (t.pattern = xt), _.init(e, t);
733
+ }), Tr = /* @__PURE__ */ u("$ZodULID", (e, t) => {
734
+ t.pattern ?? (t.pattern = jt), _.init(e, t);
735
+ }), Pr = /* @__PURE__ */ u("$ZodXID", (e, t) => {
736
+ t.pattern ?? (t.pattern = Mt), _.init(e, t);
737
+ }), Er = /* @__PURE__ */ u("$ZodKSUID", (e, t) => {
738
+ t.pattern ?? (t.pattern = Lt), _.init(e, t);
739
+ }), Ar = /* @__PURE__ */ u("$ZodISODateTime", (e, t) => {
740
+ t.pattern ?? (t.pattern = nr(t)), _.init(e, t);
741
+ }), Cr = /* @__PURE__ */ u("$ZodISODate", (e, t) => {
742
+ t.pattern ?? (t.pattern = tr), _.init(e, t);
743
+ }), Dr = /* @__PURE__ */ u("$ZodISOTime", (e, t) => {
744
+ t.pattern ?? (t.pattern = rr(t)), _.init(e, t);
745
+ }), Ur = /* @__PURE__ */ u("$ZodISODuration", (e, t) => {
746
+ t.pattern ?? (t.pattern = Jt), _.init(e, t);
747
+ }), Rr = /* @__PURE__ */ u("$ZodIPv4", (e, t) => {
748
+ t.pattern ?? (t.pattern = qt), _.init(e, t), e._zod.bag.format = "ipv4";
749
+ }), xr = /* @__PURE__ */ u("$ZodIPv6", (e, t) => {
750
+ t.pattern ?? (t.pattern = Gt), _.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (r) => {
751
+ try {
752
+ new URL(`http://[${r.value}]`);
753
+ } catch {
754
+ r.issues.push({
755
+ code: "invalid_format",
756
+ format: "ipv6",
757
+ input: r.value,
758
+ inst: e,
759
+ continue: !t.abort
760
+ });
761
+ }
762
+ };
763
+ }), jr = /* @__PURE__ */ u("$ZodCIDRv4", (e, t) => {
764
+ t.pattern ?? (t.pattern = Bt), _.init(e, t);
765
+ }), Mr = /* @__PURE__ */ u("$ZodCIDRv6", (e, t) => {
766
+ t.pattern ?? (t.pattern = Xt), _.init(e, t), e._zod.check = (r) => {
767
+ const n = r.value.split("/");
768
+ try {
769
+ if (n.length !== 2)
770
+ throw new Error();
771
+ const [o, a] = n;
772
+ if (!a)
773
+ throw new Error();
774
+ const i = Number(a);
775
+ if (`${i}` !== a)
776
+ throw new Error();
777
+ if (i < 0 || i > 128)
778
+ throw new Error();
779
+ new URL(`http://[${o}]`);
780
+ } catch {
781
+ r.issues.push({
782
+ code: "invalid_format",
783
+ format: "cidrv6",
784
+ input: r.value,
785
+ inst: e,
786
+ continue: !t.abort
787
+ });
788
+ }
789
+ };
790
+ });
791
+ function et(e) {
792
+ if (e === "")
793
+ return !0;
794
+ if (/\s/.test(e) || e.length % 4 !== 0)
795
+ return !1;
796
+ try {
797
+ return atob(e), !0;
798
+ } catch {
799
+ return !1;
800
+ }
801
+ }
802
+ const Lr = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
803
+ t.pattern ?? (t.pattern = Ht), _.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (r) => {
804
+ et(r.value) || r.issues.push({
805
+ code: "invalid_format",
806
+ format: "base64",
807
+ input: r.value,
808
+ inst: e,
809
+ continue: !t.abort
810
+ });
811
+ };
812
+ });
813
+ function Fr(e) {
814
+ if (!qe.test(e))
815
+ return !1;
816
+ const t = e.replace(/[-_]/g, (n) => n === "-" ? "+" : "/"), r = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
817
+ return et(r);
818
+ }
819
+ const Jr = /* @__PURE__ */ u("$ZodBase64URL", (e, t) => {
820
+ t.pattern ?? (t.pattern = qe), _.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (r) => {
821
+ Fr(r.value) || r.issues.push({
822
+ code: "invalid_format",
823
+ format: "base64url",
824
+ input: r.value,
825
+ inst: e,
826
+ continue: !t.abort
827
+ });
828
+ };
829
+ }), Vr = /* @__PURE__ */ u("$ZodE164", (e, t) => {
830
+ t.pattern ?? (t.pattern = er), _.init(e, t);
831
+ });
832
+ function Yr(e, t = null) {
833
+ try {
834
+ const r = e.split(".");
835
+ if (r.length !== 3)
836
+ return !1;
837
+ const [n] = r;
838
+ if (!n)
839
+ return !1;
840
+ const o = JSON.parse(atob(n));
841
+ return !("typ" in o && o?.typ !== "JWT" || !o.alg || t && (!("alg" in o) || o.alg !== t));
842
+ } catch {
843
+ return !1;
844
+ }
845
+ }
846
+ const Kr = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
847
+ _.init(e, t), e._zod.check = (r) => {
848
+ Yr(r.value, t.alg) || r.issues.push({
849
+ code: "invalid_format",
850
+ format: "jwt",
851
+ input: r.value,
852
+ inst: e,
853
+ continue: !t.abort
854
+ });
855
+ };
856
+ }), tt = /* @__PURE__ */ u("$ZodNumber", (e, t) => {
857
+ y.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? ar, e._zod.parse = (r, n) => {
858
+ if (t.coerce)
859
+ try {
860
+ r.value = Number(r.value);
861
+ } catch {
862
+ }
863
+ const o = r.value;
864
+ if (typeof o == "number" && !Number.isNaN(o) && Number.isFinite(o))
865
+ return r;
866
+ const a = typeof o == "number" ? Number.isNaN(o) ? "NaN" : Number.isFinite(o) ? void 0 : "Infinity" : void 0;
867
+ return r.issues.push({
868
+ expected: "number",
869
+ code: "invalid_type",
870
+ input: o,
871
+ inst: e,
872
+ ...a ? { received: a } : {}
873
+ }), r;
874
+ };
875
+ }), Wr = /* @__PURE__ */ u("$ZodNumberFormat", (e, t) => {
876
+ lr.init(e, t), tt.init(e, t);
877
+ });
878
+ function ve(e, t, r) {
879
+ e.issues.length && t.issues.push(...kt(r, e.issues)), t.value[r] = e.value;
880
+ }
881
+ const qr = /* @__PURE__ */ u("$ZodArray", (e, t) => {
882
+ y.init(e, t), e._zod.parse = (r, n) => {
883
+ const o = r.value;
884
+ if (!Array.isArray(o))
885
+ return r.issues.push({
886
+ expected: "array",
887
+ code: "invalid_type",
888
+ input: o,
889
+ inst: e
890
+ }), r;
891
+ r.value = Array(o.length);
892
+ const a = [];
893
+ for (let i = 0; i < o.length; i++) {
894
+ const s = o[i], c = t.element._zod.run({
895
+ value: s,
896
+ issues: []
897
+ }, n);
898
+ c instanceof Promise ? a.push(c.then((l) => ve(l, r, i))) : ve(c, r, i);
899
+ }
900
+ return a.length ? Promise.all(a).then(() => r) : r;
901
+ };
902
+ });
903
+ function ye(e, t, r, n) {
904
+ for (const a of e)
905
+ if (a.issues.length === 0)
906
+ return t.value = a.value, t;
907
+ const o = e.filter((a) => !U(a));
908
+ return o.length === 1 ? (t.value = o[0].value, o[0]) : (t.issues.push({
909
+ code: "invalid_union",
910
+ input: t.value,
911
+ inst: r,
912
+ errors: e.map((a) => a.issues.map((i) => E(i, n, P())))
913
+ }), t);
914
+ }
915
+ const Gr = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
916
+ y.init(e, t), p(e._zod, "optin", () => t.options.some((n) => n._zod.optin === "optional") ? "optional" : void 0), p(e._zod, "optout", () => t.options.some((n) => n._zod.optout === "optional") ? "optional" : void 0), p(e._zod, "values", () => {
917
+ if (t.options.every((n) => n._zod.values))
918
+ return new Set(t.options.flatMap((n) => Array.from(n._zod.values)));
919
+ }), p(e._zod, "pattern", () => {
920
+ if (t.options.every((n) => n._zod.pattern)) {
921
+ const n = t.options.map((o) => o._zod.pattern);
922
+ return new RegExp(`^(${n.map((o) => le(o.source)).join("|")})$`);
923
+ }
924
+ });
925
+ const r = t.options.length === 1 ? t.options[0]._zod.run : null;
926
+ e._zod.parse = (n, o) => {
927
+ if (r)
928
+ return r(n, o);
929
+ let a = !1;
930
+ const i = [];
931
+ for (const s of t.options) {
932
+ const c = s._zod.run({
933
+ value: n.value,
934
+ issues: []
935
+ }, o);
936
+ if (c instanceof Promise)
937
+ i.push(c), a = !0;
938
+ else {
939
+ if (c.issues.length === 0)
940
+ return c;
941
+ i.push(c);
942
+ }
943
+ }
944
+ return a ? Promise.all(i).then((s) => ye(s, n, e, o)) : ye(i, n, e, o);
945
+ };
946
+ }), Br = /* @__PURE__ */ u("$ZodIntersection", (e, t) => {
947
+ y.init(e, t), e._zod.parse = (r, n) => {
948
+ const o = r.value, a = t.left._zod.run({ value: o, issues: [] }, n), i = t.right._zod.run({ value: o, issues: [] }, n);
949
+ return a instanceof Promise || i instanceof Promise ? Promise.all([a, i]).then(([c, l]) => we(r, c, l)) : we(r, a, i);
950
+ };
951
+ });
952
+ function ae(e, t) {
953
+ if (e === t)
954
+ return { valid: !0, data: e };
955
+ if (e instanceof Date && t instanceof Date && +e == +t)
956
+ return { valid: !0, data: e };
957
+ if (ie(e) && ie(t)) {
958
+ const r = Object.keys(t), n = Object.keys(e).filter((a) => r.indexOf(a) !== -1), o = { ...e, ...t };
959
+ for (const a of n) {
960
+ const i = ae(e[a], t[a]);
961
+ if (!i.valid)
962
+ return {
963
+ valid: !1,
964
+ mergeErrorPath: [a, ...i.mergeErrorPath]
965
+ };
966
+ o[a] = i.data;
967
+ }
968
+ return { valid: !0, data: o };
969
+ }
970
+ if (Array.isArray(e) && Array.isArray(t)) {
971
+ if (e.length !== t.length)
972
+ return { valid: !1, mergeErrorPath: [] };
973
+ const r = [];
974
+ for (let n = 0; n < e.length; n++) {
975
+ const o = e[n], a = t[n], i = ae(o, a);
976
+ if (!i.valid)
977
+ return {
978
+ valid: !1,
979
+ mergeErrorPath: [n, ...i.mergeErrorPath]
980
+ };
981
+ r.push(i.data);
982
+ }
983
+ return { valid: !0, data: r };
984
+ }
985
+ return { valid: !1, mergeErrorPath: [] };
986
+ }
987
+ function we(e, t, r) {
988
+ const n = /* @__PURE__ */ new Map();
989
+ let o;
990
+ for (const s of t.issues)
991
+ if (s.code === "unrecognized_keys") {
992
+ o ?? (o = s);
993
+ for (const c of s.keys)
994
+ n.has(c) || n.set(c, {}), n.get(c).l = !0;
995
+ } else
996
+ e.issues.push(s);
997
+ for (const s of r.issues)
998
+ if (s.code === "unrecognized_keys")
999
+ for (const c of s.keys)
1000
+ n.has(c) || n.set(c, {}), n.get(c).r = !0;
1001
+ else
1002
+ e.issues.push(s);
1003
+ const a = [...n].filter(([, s]) => s.l && s.r).map(([s]) => s);
1004
+ if (a.length && o && e.issues.push({ ...o, keys: a }), U(e))
1005
+ return e;
1006
+ const i = ae(t.value, r.value);
1007
+ if (!i.valid)
1008
+ throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);
1009
+ return e.value = i.data, e;
1010
+ }
1011
+ const Xr = /* @__PURE__ */ u("$ZodLiteral", (e, t) => {
1012
+ if (y.init(e, t), t.values.length === 0)
1013
+ throw new Error("Cannot create literal schema with no valid values");
1014
+ const r = new Set(t.values);
1015
+ e._zod.values = r, e._zod.pattern = new RegExp(`^(${t.values.map((n) => typeof n == "string" ? F(n) : n ? F(n.toString()) : String(n)).join("|")})$`), e._zod.parse = (n, o) => {
1016
+ const a = n.value;
1017
+ return r.has(a) || n.issues.push({
1018
+ code: "invalid_value",
1019
+ values: t.values,
1020
+ input: a,
1021
+ inst: e
1022
+ }), n;
1023
+ };
1024
+ }), Hr = /* @__PURE__ */ u("$ZodTransform", (e, t) => {
1025
+ y.init(e, t), e._zod.optin = "optional", e._zod.parse = (r, n) => {
1026
+ if (n.direction === "backward")
1027
+ throw new Fe(e.constructor.name);
1028
+ const o = t.transform(r.value, r);
1029
+ if (n.async)
1030
+ return (o instanceof Promise ? o : Promise.resolve(o)).then((i) => (r.value = i, r.fallback = !0, r));
1031
+ if (o instanceof Promise)
1032
+ throw new R();
1033
+ return r.value = o, r.fallback = !0, r;
1034
+ };
1035
+ });
1036
+ function ze(e, t) {
1037
+ return t === void 0 && (e.issues.length || e.fallback) ? { issues: [], value: void 0 } : e;
1038
+ }
1039
+ const rt = /* @__PURE__ */ u("$ZodOptional", (e, t) => {
1040
+ y.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", p(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), p(e._zod, "pattern", () => {
1041
+ const r = t.innerType._zod.pattern;
1042
+ return r ? new RegExp(`^(${le(r.source)})?$`) : void 0;
1043
+ }), e._zod.parse = (r, n) => {
1044
+ if (t.innerType._zod.optin === "optional") {
1045
+ const o = r.value, a = t.innerType._zod.run(r, n);
1046
+ return a instanceof Promise ? a.then((i) => ze(i, o)) : ze(a, o);
1047
+ }
1048
+ return r.value === void 0 ? r : t.innerType._zod.run(r, n);
1049
+ };
1050
+ }), Qr = /* @__PURE__ */ u("$ZodExactOptional", (e, t) => {
1051
+ rt.init(e, t), p(e._zod, "values", () => t.innerType._zod.values), p(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (r, n) => t.innerType._zod.run(r, n);
1052
+ }), en = /* @__PURE__ */ u("$ZodNullable", (e, t) => {
1053
+ y.init(e, t), p(e._zod, "optin", () => t.innerType._zod.optin), p(e._zod, "optout", () => t.innerType._zod.optout), p(e._zod, "pattern", () => {
1054
+ const r = t.innerType._zod.pattern;
1055
+ return r ? new RegExp(`^(${le(r.source)}|null)$`) : void 0;
1056
+ }), p(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (r, n) => r.value === null ? r : t.innerType._zod.run(r, n);
1057
+ }), tn = /* @__PURE__ */ u("$ZodDefault", (e, t) => {
1058
+ y.init(e, t), e._zod.optin = "optional", p(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => {
1059
+ if (n.direction === "backward")
1060
+ return t.innerType._zod.run(r, n);
1061
+ if (r.value === void 0)
1062
+ return r.value = t.defaultValue, r;
1063
+ const o = t.innerType._zod.run(r, n);
1064
+ return o instanceof Promise ? o.then((a) => $e(a, t)) : $e(o, t);
1065
+ };
1066
+ });
1067
+ function $e(e, t) {
1068
+ return e.value === void 0 && (e.value = t.defaultValue), e;
1069
+ }
1070
+ const rn = /* @__PURE__ */ u("$ZodPrefault", (e, t) => {
1071
+ y.init(e, t), e._zod.optin = "optional", p(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => (n.direction === "backward" || r.value === void 0 && (r.value = t.defaultValue), t.innerType._zod.run(r, n));
1072
+ }), nn = /* @__PURE__ */ u("$ZodNonOptional", (e, t) => {
1073
+ y.init(e, t), p(e._zod, "values", () => {
1074
+ const r = t.innerType._zod.values;
1075
+ return r ? new Set([...r].filter((n) => n !== void 0)) : void 0;
1076
+ }), e._zod.parse = (r, n) => {
1077
+ const o = t.innerType._zod.run(r, n);
1078
+ return o instanceof Promise ? o.then((a) => ke(a, e)) : ke(o, e);
1079
+ };
1080
+ });
1081
+ function ke(e, t) {
1082
+ return !e.issues.length && e.value === void 0 && e.issues.push({
1083
+ code: "invalid_type",
1084
+ expected: "nonoptional",
1085
+ input: e.value,
1086
+ inst: t
1087
+ }), e;
1088
+ }
1089
+ const on = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
1090
+ y.init(e, t), e._zod.optin = "optional", p(e._zod, "optout", () => t.innerType._zod.optout), p(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => {
1091
+ if (n.direction === "backward")
1092
+ return t.innerType._zod.run(r, n);
1093
+ const o = t.innerType._zod.run(r, n);
1094
+ return o instanceof Promise ? o.then((a) => (r.value = a.value, a.issues.length && (r.value = t.catchValue({
1095
+ ...r,
1096
+ error: {
1097
+ issues: a.issues.map((i) => E(i, n, P()))
1098
+ },
1099
+ input: r.value
1100
+ }), r.issues = [], r.fallback = !0), r)) : (r.value = o.value, o.issues.length && (r.value = t.catchValue({
1101
+ ...r,
1102
+ error: {
1103
+ issues: o.issues.map((a) => E(a, n, P()))
1104
+ },
1105
+ input: r.value
1106
+ }), r.issues = [], r.fallback = !0), r);
1107
+ };
1108
+ }), an = /* @__PURE__ */ u("$ZodPipe", (e, t) => {
1109
+ y.init(e, t), p(e._zod, "values", () => t.in._zod.values), p(e._zod, "optin", () => t.in._zod.optin), p(e._zod, "optout", () => t.out._zod.optout), p(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (r, n) => {
1110
+ if (n.direction === "backward") {
1111
+ const a = t.out._zod.run(r, n);
1112
+ return a instanceof Promise ? a.then((i) => Y(i, t.in, n)) : Y(a, t.in, n);
1113
+ }
1114
+ const o = t.in._zod.run(r, n);
1115
+ return o instanceof Promise ? o.then((a) => Y(a, t.out, n)) : Y(o, t.out, n);
1116
+ };
1117
+ });
1118
+ function Y(e, t, r) {
1119
+ return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues, fallback: e.fallback }, r);
1120
+ }
1121
+ const sn = /* @__PURE__ */ u("$ZodReadonly", (e, t) => {
1122
+ y.init(e, t), p(e._zod, "propValues", () => t.innerType._zod.propValues), p(e._zod, "values", () => t.innerType._zod.values), p(e._zod, "optin", () => t.innerType?._zod?.optin), p(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (r, n) => {
1123
+ if (n.direction === "backward")
1124
+ return t.innerType._zod.run(r, n);
1125
+ const o = t.innerType._zod.run(r, n);
1126
+ return o instanceof Promise ? o.then(Ze) : Ze(o);
1127
+ };
1128
+ });
1129
+ function Ze(e) {
1130
+ return e.value = Object.freeze(e.value), e;
1131
+ }
1132
+ const un = /* @__PURE__ */ u("$ZodCustom", (e, t) => {
1133
+ Z.init(e, t), y.init(e, t), e._zod.parse = (r, n) => r, e._zod.check = (r) => {
1134
+ const n = r.value, o = t.fn(n);
1135
+ if (o instanceof Promise)
1136
+ return o.then((a) => Se(a, r, n, e));
1137
+ Se(o, r, n, e);
1138
+ };
1139
+ });
1140
+ function Se(e, t, r, n) {
1141
+ if (!e) {
1142
+ const o = {
1143
+ code: "custom",
1144
+ input: r,
1145
+ inst: n,
1146
+ // incorporates params.error into issue reporting
1147
+ path: [...n._zod.def.path ?? []],
1148
+ // incorporates params.error into issue reporting
1149
+ continue: !n._zod.def.abort
1150
+ // params: inst._zod.def.params,
1151
+ };
1152
+ n._zod.def.params && (o.params = n._zod.def.params), t.issues.push(J(o));
1153
+ }
1154
+ }
1155
+ var Oe;
1156
+ class cn {
1157
+ constructor() {
1158
+ this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
1159
+ }
1160
+ add(t, ...r) {
1161
+ const n = r[0];
1162
+ return this._map.set(t, n), n && typeof n == "object" && "id" in n && this._idmap.set(n.id, t), this;
1163
+ }
1164
+ clear() {
1165
+ return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
1166
+ }
1167
+ remove(t) {
1168
+ const r = this._map.get(t);
1169
+ return r && typeof r == "object" && "id" in r && this._idmap.delete(r.id), this._map.delete(t), this;
1170
+ }
1171
+ get(t) {
1172
+ const r = t._zod.parent;
1173
+ if (r) {
1174
+ const n = { ...this.get(r) ?? {} };
1175
+ delete n.id;
1176
+ const o = { ...n, ...this._map.get(t) };
1177
+ return Object.keys(o).length ? o : void 0;
1178
+ }
1179
+ return this._map.get(t);
1180
+ }
1181
+ has(t) {
1182
+ return this._map.has(t);
1183
+ }
1184
+ }
1185
+ function ln() {
1186
+ return new cn();
1187
+ }
1188
+ (Oe = globalThis).__zod_globalRegistry ?? (Oe.__zod_globalRegistry = ln());
1189
+ const L = globalThis.__zod_globalRegistry;
1190
+ // @__NO_SIDE_EFFECTS__
1191
+ function dn(e, t) {
1192
+ return new e({
1193
+ type: "string",
1194
+ ...d(t)
1195
+ });
1196
+ }
1197
+ // @__NO_SIDE_EFFECTS__
1198
+ function nt(e, t) {
1199
+ return new e({
1200
+ type: "string",
1201
+ format: "email",
1202
+ check: "string_format",
1203
+ abort: !1,
1204
+ ...d(t)
1205
+ });
1206
+ }
1207
+ // @__NO_SIDE_EFFECTS__
1208
+ function Ie(e, t) {
1209
+ return new e({
1210
+ type: "string",
1211
+ format: "guid",
1212
+ check: "string_format",
1213
+ abort: !1,
1214
+ ...d(t)
1215
+ });
1216
+ }
1217
+ // @__NO_SIDE_EFFECTS__
1218
+ function fn(e, t) {
1219
+ return new e({
1220
+ type: "string",
1221
+ format: "uuid",
1222
+ check: "string_format",
1223
+ abort: !1,
1224
+ ...d(t)
1225
+ });
1226
+ }
1227
+ // @__NO_SIDE_EFFECTS__
1228
+ function mn(e, t) {
1229
+ return new e({
1230
+ type: "string",
1231
+ format: "uuid",
1232
+ check: "string_format",
1233
+ abort: !1,
1234
+ version: "v4",
1235
+ ...d(t)
1236
+ });
1237
+ }
1238
+ // @__NO_SIDE_EFFECTS__
1239
+ function pn(e, t) {
1240
+ return new e({
1241
+ type: "string",
1242
+ format: "uuid",
1243
+ check: "string_format",
1244
+ abort: !1,
1245
+ version: "v6",
1246
+ ...d(t)
1247
+ });
1248
+ }
1249
+ // @__NO_SIDE_EFFECTS__
1250
+ function hn(e, t) {
1251
+ return new e({
1252
+ type: "string",
1253
+ format: "uuid",
1254
+ check: "string_format",
1255
+ abort: !1,
1256
+ version: "v7",
1257
+ ...d(t)
1258
+ });
1259
+ }
1260
+ // @__NO_SIDE_EFFECTS__
1261
+ function _n(e, t) {
1262
+ return new e({
1263
+ type: "string",
1264
+ format: "url",
1265
+ check: "string_format",
1266
+ abort: !1,
1267
+ ...d(t)
1268
+ });
1269
+ }
1270
+ // @__NO_SIDE_EFFECTS__
1271
+ function gn(e, t) {
1272
+ return new e({
1273
+ type: "string",
1274
+ format: "emoji",
1275
+ check: "string_format",
1276
+ abort: !1,
1277
+ ...d(t)
1278
+ });
1279
+ }
1280
+ // @__NO_SIDE_EFFECTS__
1281
+ function bn(e, t) {
1282
+ return new e({
1283
+ type: "string",
1284
+ format: "nanoid",
1285
+ check: "string_format",
1286
+ abort: !1,
1287
+ ...d(t)
1288
+ });
1289
+ }
1290
+ // @__NO_SIDE_EFFECTS__
1291
+ function vn(e, t) {
1292
+ return new e({
1293
+ type: "string",
1294
+ format: "cuid",
1295
+ check: "string_format",
1296
+ abort: !1,
1297
+ ...d(t)
1298
+ });
1299
+ }
1300
+ // @__NO_SIDE_EFFECTS__
1301
+ function yn(e, t) {
1302
+ return new e({
1303
+ type: "string",
1304
+ format: "cuid2",
1305
+ check: "string_format",
1306
+ abort: !1,
1307
+ ...d(t)
1308
+ });
1309
+ }
1310
+ // @__NO_SIDE_EFFECTS__
1311
+ function wn(e, t) {
1312
+ return new e({
1313
+ type: "string",
1314
+ format: "ulid",
1315
+ check: "string_format",
1316
+ abort: !1,
1317
+ ...d(t)
1318
+ });
1319
+ }
1320
+ // @__NO_SIDE_EFFECTS__
1321
+ function zn(e, t) {
1322
+ return new e({
1323
+ type: "string",
1324
+ format: "xid",
1325
+ check: "string_format",
1326
+ abort: !1,
1327
+ ...d(t)
1328
+ });
1329
+ }
1330
+ // @__NO_SIDE_EFFECTS__
1331
+ function $n(e, t) {
1332
+ return new e({
1333
+ type: "string",
1334
+ format: "ksuid",
1335
+ check: "string_format",
1336
+ abort: !1,
1337
+ ...d(t)
1338
+ });
1339
+ }
1340
+ // @__NO_SIDE_EFFECTS__
1341
+ function kn(e, t) {
1342
+ return new e({
1343
+ type: "string",
1344
+ format: "ipv4",
1345
+ check: "string_format",
1346
+ abort: !1,
1347
+ ...d(t)
1348
+ });
1349
+ }
1350
+ // @__NO_SIDE_EFFECTS__
1351
+ function Zn(e, t) {
1352
+ return new e({
1353
+ type: "string",
1354
+ format: "ipv6",
1355
+ check: "string_format",
1356
+ abort: !1,
1357
+ ...d(t)
1358
+ });
1359
+ }
1360
+ // @__NO_SIDE_EFFECTS__
1361
+ function Sn(e, t) {
1362
+ return new e({
1363
+ type: "string",
1364
+ format: "cidrv4",
1365
+ check: "string_format",
1366
+ abort: !1,
1367
+ ...d(t)
1368
+ });
1369
+ }
1370
+ // @__NO_SIDE_EFFECTS__
1371
+ function On(e, t) {
1372
+ return new e({
1373
+ type: "string",
1374
+ format: "cidrv6",
1375
+ check: "string_format",
1376
+ abort: !1,
1377
+ ...d(t)
1378
+ });
1379
+ }
1380
+ // @__NO_SIDE_EFFECTS__
1381
+ function In(e, t) {
1382
+ return new e({
1383
+ type: "string",
1384
+ format: "base64",
1385
+ check: "string_format",
1386
+ abort: !1,
1387
+ ...d(t)
1388
+ });
1389
+ }
1390
+ // @__NO_SIDE_EFFECTS__
1391
+ function Nn(e, t) {
1392
+ return new e({
1393
+ type: "string",
1394
+ format: "base64url",
1395
+ check: "string_format",
1396
+ abort: !1,
1397
+ ...d(t)
1398
+ });
1399
+ }
1400
+ // @__NO_SIDE_EFFECTS__
1401
+ function Tn(e, t) {
1402
+ return new e({
1403
+ type: "string",
1404
+ format: "e164",
1405
+ check: "string_format",
1406
+ abort: !1,
1407
+ ...d(t)
1408
+ });
1409
+ }
1410
+ // @__NO_SIDE_EFFECTS__
1411
+ function Pn(e, t) {
1412
+ return new e({
1413
+ type: "string",
1414
+ format: "jwt",
1415
+ check: "string_format",
1416
+ abort: !1,
1417
+ ...d(t)
1418
+ });
1419
+ }
1420
+ // @__NO_SIDE_EFFECTS__
1421
+ function En(e, t) {
1422
+ return new e({
1423
+ type: "string",
1424
+ format: "datetime",
1425
+ check: "string_format",
1426
+ offset: !1,
1427
+ local: !1,
1428
+ precision: null,
1429
+ ...d(t)
1430
+ });
1431
+ }
1432
+ // @__NO_SIDE_EFFECTS__
1433
+ function An(e, t) {
1434
+ return new e({
1435
+ type: "string",
1436
+ format: "date",
1437
+ check: "string_format",
1438
+ ...d(t)
1439
+ });
1440
+ }
1441
+ // @__NO_SIDE_EFFECTS__
1442
+ function Cn(e, t) {
1443
+ return new e({
1444
+ type: "string",
1445
+ format: "time",
1446
+ check: "string_format",
1447
+ precision: null,
1448
+ ...d(t)
1449
+ });
1450
+ }
1451
+ // @__NO_SIDE_EFFECTS__
1452
+ function Dn(e, t) {
1453
+ return new e({
1454
+ type: "string",
1455
+ format: "duration",
1456
+ check: "string_format",
1457
+ ...d(t)
1458
+ });
1459
+ }
1460
+ // @__NO_SIDE_EFFECTS__
1461
+ function Un(e, t) {
1462
+ return new e({
1463
+ type: "number",
1464
+ coerce: !0,
1465
+ checks: [],
1466
+ ...d(t)
1467
+ });
1468
+ }
1469
+ // @__NO_SIDE_EFFECTS__
1470
+ function Rn(e, t) {
1471
+ return new e({
1472
+ type: "number",
1473
+ check: "number_format",
1474
+ abort: !1,
1475
+ format: "safeint",
1476
+ ...d(t)
1477
+ });
1478
+ }
1479
+ // @__NO_SIDE_EFFECTS__
1480
+ function Ne(e, t) {
1481
+ return new He({
1482
+ check: "less_than",
1483
+ ...d(t),
1484
+ value: e,
1485
+ inclusive: !1
1486
+ });
1487
+ }
1488
+ // @__NO_SIDE_EFFECTS__
1489
+ function re(e, t) {
1490
+ return new He({
1491
+ check: "less_than",
1492
+ ...d(t),
1493
+ value: e,
1494
+ inclusive: !0
1495
+ });
1496
+ }
1497
+ // @__NO_SIDE_EFFECTS__
1498
+ function Te(e, t) {
1499
+ return new Qe({
1500
+ check: "greater_than",
1501
+ ...d(t),
1502
+ value: e,
1503
+ inclusive: !1
1504
+ });
1505
+ }
1506
+ // @__NO_SIDE_EFFECTS__
1507
+ function ne(e, t) {
1508
+ return new Qe({
1509
+ check: "greater_than",
1510
+ ...d(t),
1511
+ value: e,
1512
+ inclusive: !0
1513
+ });
1514
+ }
1515
+ // @__NO_SIDE_EFFECTS__
1516
+ function Pe(e, t) {
1517
+ return new cr({
1518
+ check: "multiple_of",
1519
+ ...d(t),
1520
+ value: e
1521
+ });
1522
+ }
1523
+ // @__NO_SIDE_EFFECTS__
1524
+ function ot(e, t) {
1525
+ return new dr({
1526
+ check: "max_length",
1527
+ ...d(t),
1528
+ maximum: e
1529
+ });
1530
+ }
1531
+ // @__NO_SIDE_EFFECTS__
1532
+ function B(e, t) {
1533
+ return new fr({
1534
+ check: "min_length",
1535
+ ...d(t),
1536
+ minimum: e
1537
+ });
1538
+ }
1539
+ // @__NO_SIDE_EFFECTS__
1540
+ function it(e, t) {
1541
+ return new mr({
1542
+ check: "length_equals",
1543
+ ...d(t),
1544
+ length: e
1545
+ });
1546
+ }
1547
+ // @__NO_SIDE_EFFECTS__
1548
+ function xn(e, t) {
1549
+ return new pr({
1550
+ check: "string_format",
1551
+ format: "regex",
1552
+ ...d(t),
1553
+ pattern: e
1554
+ });
1555
+ }
1556
+ // @__NO_SIDE_EFFECTS__
1557
+ function jn(e) {
1558
+ return new hr({
1559
+ check: "string_format",
1560
+ format: "lowercase",
1561
+ ...d(e)
1562
+ });
1563
+ }
1564
+ // @__NO_SIDE_EFFECTS__
1565
+ function Mn(e) {
1566
+ return new _r({
1567
+ check: "string_format",
1568
+ format: "uppercase",
1569
+ ...d(e)
1570
+ });
1571
+ }
1572
+ // @__NO_SIDE_EFFECTS__
1573
+ function Ln(e, t) {
1574
+ return new gr({
1575
+ check: "string_format",
1576
+ format: "includes",
1577
+ ...d(t),
1578
+ includes: e
1579
+ });
1580
+ }
1581
+ // @__NO_SIDE_EFFECTS__
1582
+ function Fn(e, t) {
1583
+ return new br({
1584
+ check: "string_format",
1585
+ format: "starts_with",
1586
+ ...d(t),
1587
+ prefix: e
1588
+ });
1589
+ }
1590
+ // @__NO_SIDE_EFFECTS__
1591
+ function Jn(e, t) {
1592
+ return new vr({
1593
+ check: "string_format",
1594
+ format: "ends_with",
1595
+ ...d(t),
1596
+ suffix: e
1597
+ });
1598
+ }
1599
+ // @__NO_SIDE_EFFECTS__
1600
+ function j(e) {
1601
+ return new yr({
1602
+ check: "overwrite",
1603
+ tx: e
1604
+ });
1605
+ }
1606
+ // @__NO_SIDE_EFFECTS__
1607
+ function Vn(e) {
1608
+ return /* @__PURE__ */ j((t) => t.normalize(e));
1609
+ }
1610
+ // @__NO_SIDE_EFFECTS__
1611
+ function Yn() {
1612
+ return /* @__PURE__ */ j((e) => e.trim());
1613
+ }
1614
+ // @__NO_SIDE_EFFECTS__
1615
+ function Kn() {
1616
+ return /* @__PURE__ */ j((e) => e.toLowerCase());
1617
+ }
1618
+ // @__NO_SIDE_EFFECTS__
1619
+ function Wn() {
1620
+ return /* @__PURE__ */ j((e) => e.toUpperCase());
1621
+ }
1622
+ // @__NO_SIDE_EFFECTS__
1623
+ function qn() {
1624
+ return /* @__PURE__ */ j((e) => yt(e));
1625
+ }
1626
+ // @__NO_SIDE_EFFECTS__
1627
+ function Gn(e, t, r) {
1628
+ return new e({
1629
+ type: "array",
1630
+ element: t,
1631
+ // get element() {
1632
+ // return element;
1633
+ // },
1634
+ ...d(r)
1635
+ });
1636
+ }
1637
+ // @__NO_SIDE_EFFECTS__
1638
+ function Bn(e, t, r) {
1639
+ return new e({
1640
+ type: "custom",
1641
+ check: "custom",
1642
+ fn: t,
1643
+ ...d(r)
1644
+ });
1645
+ }
1646
+ // @__NO_SIDE_EFFECTS__
1647
+ function Xn(e, t) {
1648
+ const r = /* @__PURE__ */ Hn((n) => (n.addIssue = (o) => {
1649
+ if (typeof o == "string")
1650
+ n.issues.push(J(o, n.value, r._zod.def));
1651
+ else {
1652
+ const a = o;
1653
+ a.fatal && (a.continue = !1), a.code ?? (a.code = "custom"), a.input ?? (a.input = n.value), a.inst ?? (a.inst = r), a.continue ?? (a.continue = !r._zod.def.abort), n.issues.push(J(a));
1654
+ }
1655
+ }, e(n.value, n)), t);
1656
+ return r;
1657
+ }
1658
+ // @__NO_SIDE_EFFECTS__
1659
+ function Hn(e, t) {
1660
+ const r = new Z({
1661
+ check: "custom",
1662
+ ...d(t)
1663
+ });
1664
+ return r._zod.check = e, r;
1665
+ }
1666
+ function at(e) {
1667
+ let t = e?.target ?? "draft-2020-12";
1668
+ return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
1669
+ processors: e.processors ?? {},
1670
+ metadataRegistry: e?.metadata ?? L,
1671
+ target: t,
1672
+ unrepresentable: e?.unrepresentable ?? "throw",
1673
+ override: e?.override ?? (() => {
1674
+ }),
1675
+ io: e?.io ?? "output",
1676
+ counter: 0,
1677
+ seen: /* @__PURE__ */ new Map(),
1678
+ cycles: e?.cycles ?? "ref",
1679
+ reused: e?.reused ?? "inline",
1680
+ external: e?.external ?? void 0
1681
+ };
1682
+ }
1683
+ function k(e, t, r = { path: [], schemaPath: [] }) {
1684
+ var n;
1685
+ const o = e._zod.def, a = t.seen.get(e);
1686
+ if (a)
1687
+ return a.count++, r.schemaPath.includes(e) && (a.cycle = r.path), a.schema;
1688
+ const i = { schema: {}, count: 1, cycle: void 0, path: r.path };
1689
+ t.seen.set(e, i);
1690
+ const s = e._zod.toJSONSchema?.();
1691
+ if (s)
1692
+ i.schema = s;
1693
+ else {
1694
+ const f = {
1695
+ ...r,
1696
+ schemaPath: [...r.schemaPath, e],
1697
+ path: r.path
1698
+ };
1699
+ if (e._zod.processJSONSchema)
1700
+ e._zod.processJSONSchema(t, i.schema, f);
1701
+ else {
1702
+ const b = i.schema, h = t.processors[o.type];
1703
+ if (!h)
1704
+ throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);
1705
+ h(e, t, b, f);
1706
+ }
1707
+ const m = e._zod.parent;
1708
+ m && (i.ref || (i.ref = m), k(m, t, f), t.seen.get(m).isParent = !0);
1709
+ }
1710
+ const c = t.metadataRegistry.get(e);
1711
+ return c && Object.assign(i.schema, c), t.io === "input" && $(e) && (delete i.schema.examples, delete i.schema.default), t.io === "input" && "_prefault" in i.schema && ((n = i.schema).default ?? (n.default = i.schema._prefault)), delete i.schema._prefault, t.seen.get(e).schema;
1712
+ }
1713
+ function st(e, t) {
1714
+ const r = e.seen.get(t);
1715
+ if (!r)
1716
+ throw new Error("Unprocessed schema. This is a bug in Zod.");
1717
+ const n = /* @__PURE__ */ new Map();
1718
+ for (const i of e.seen.entries()) {
1719
+ const s = e.metadataRegistry.get(i[0])?.id;
1720
+ if (s) {
1721
+ const c = n.get(s);
1722
+ if (c && c !== i[0])
1723
+ throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
1724
+ n.set(s, i[0]);
1725
+ }
1726
+ }
1727
+ const o = (i) => {
1728
+ const s = e.target === "draft-2020-12" ? "$defs" : "definitions";
1729
+ if (e.external) {
1730
+ const m = e.external.registry.get(i[0])?.id, b = e.external.uri ?? ((z) => z);
1731
+ if (m)
1732
+ return { ref: b(m) };
1733
+ const h = i[1].defId ?? i[1].schema.id ?? `schema${e.counter++}`;
1734
+ return i[1].defId = h, { defId: h, ref: `${b("__shared")}#/${s}/${h}` };
1735
+ }
1736
+ if (i[1] === r)
1737
+ return { ref: "#" };
1738
+ const l = `#/${s}/`, f = i[1].schema.id ?? `__schema${e.counter++}`;
1739
+ return { defId: f, ref: l + f };
1740
+ }, a = (i) => {
1741
+ if (i[1].schema.$ref)
1742
+ return;
1743
+ const s = i[1], { ref: c, defId: l } = o(i);
1744
+ s.def = { ...s.schema }, l && (s.defId = l);
1745
+ const f = s.schema;
1746
+ for (const m in f)
1747
+ delete f[m];
1748
+ f.$ref = c;
1749
+ };
1750
+ if (e.cycles === "throw")
1751
+ for (const i of e.seen.entries()) {
1752
+ const s = i[1];
1753
+ if (s.cycle)
1754
+ throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
1755
+
1756
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
1757
+ }
1758
+ for (const i of e.seen.entries()) {
1759
+ const s = i[1];
1760
+ if (t === i[0]) {
1761
+ a(i);
1762
+ continue;
1763
+ }
1764
+ if (e.external) {
1765
+ const l = e.external.registry.get(i[0])?.id;
1766
+ if (t !== i[0] && l) {
1767
+ a(i);
1768
+ continue;
1769
+ }
1770
+ }
1771
+ if (e.metadataRegistry.get(i[0])?.id) {
1772
+ a(i);
1773
+ continue;
1774
+ }
1775
+ if (s.cycle) {
1776
+ a(i);
1777
+ continue;
1778
+ }
1779
+ if (s.count > 1 && e.reused === "ref") {
1780
+ a(i);
1781
+ continue;
1782
+ }
1783
+ }
1784
+ }
1785
+ function ut(e, t) {
1786
+ const r = e.seen.get(t);
1787
+ if (!r)
1788
+ throw new Error("Unprocessed schema. This is a bug in Zod.");
1789
+ const n = (s) => {
1790
+ const c = e.seen.get(s);
1791
+ if (c.ref === null)
1792
+ return;
1793
+ const l = c.def ?? c.schema, f = { ...l }, m = c.ref;
1794
+ if (c.ref = null, m) {
1795
+ n(m);
1796
+ const h = e.seen.get(m), z = h.schema;
1797
+ if (z.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (l.allOf = l.allOf ?? [], l.allOf.push(z)) : Object.assign(l, z), Object.assign(l, f), s._zod.parent === m)
1798
+ for (const O in l)
1799
+ O === "$ref" || O === "allOf" || O in f || delete l[O];
1800
+ if (z.$ref && h.def)
1801
+ for (const O in l)
1802
+ O === "$ref" || O === "allOf" || O in h.def && JSON.stringify(l[O]) === JSON.stringify(h.def[O]) && delete l[O];
1803
+ }
1804
+ const b = s._zod.parent;
1805
+ if (b && b !== m) {
1806
+ n(b);
1807
+ const h = e.seen.get(b);
1808
+ if (h?.schema.$ref && (l.$ref = h.schema.$ref, h.def))
1809
+ for (const z in l)
1810
+ z === "$ref" || z === "allOf" || z in h.def && JSON.stringify(l[z]) === JSON.stringify(h.def[z]) && delete l[z];
1811
+ }
1812
+ e.override({
1813
+ zodSchema: s,
1814
+ jsonSchema: l,
1815
+ path: c.path ?? []
1816
+ });
1817
+ };
1818
+ for (const s of [...e.seen.entries()].reverse())
1819
+ n(s[0]);
1820
+ const o = {};
1821
+ if (e.target === "draft-2020-12" ? o.$schema = "https://json-schema.org/draft/2020-12/schema" : e.target === "draft-07" ? o.$schema = "http://json-schema.org/draft-07/schema#" : e.target === "draft-04" ? o.$schema = "http://json-schema.org/draft-04/schema#" : e.target, e.external?.uri) {
1822
+ const s = e.external.registry.get(t)?.id;
1823
+ if (!s)
1824
+ throw new Error("Schema is missing an `id` property");
1825
+ o.$id = e.external.uri(s);
1826
+ }
1827
+ Object.assign(o, r.def ?? r.schema);
1828
+ const a = e.metadataRegistry.get(t)?.id;
1829
+ a !== void 0 && o.id === a && delete o.id;
1830
+ const i = e.external?.defs ?? {};
1831
+ for (const s of e.seen.entries()) {
1832
+ const c = s[1];
1833
+ c.def && c.defId && (c.def.id === c.defId && delete c.def.id, i[c.defId] = c.def);
1834
+ }
1835
+ e.external || Object.keys(i).length > 0 && (e.target === "draft-2020-12" ? o.$defs = i : o.definitions = i);
1836
+ try {
1837
+ const s = JSON.parse(JSON.stringify(o));
1838
+ return Object.defineProperty(s, "~standard", {
1839
+ value: {
1840
+ ...t["~standard"],
1841
+ jsonSchema: {
1842
+ input: X(t, "input", e.processors),
1843
+ output: X(t, "output", e.processors)
1844
+ }
1845
+ },
1846
+ enumerable: !1,
1847
+ writable: !1
1848
+ }), s;
1849
+ } catch {
1850
+ throw new Error("Error converting schema to JSON.");
1851
+ }
1852
+ }
1853
+ function $(e, t) {
1854
+ const r = t ?? { seen: /* @__PURE__ */ new Set() };
1855
+ if (r.seen.has(e))
1856
+ return !1;
1857
+ r.seen.add(e);
1858
+ const n = e._zod.def;
1859
+ if (n.type === "transform")
1860
+ return !0;
1861
+ if (n.type === "array")
1862
+ return $(n.element, r);
1863
+ if (n.type === "set")
1864
+ return $(n.valueType, r);
1865
+ if (n.type === "lazy")
1866
+ return $(n.getter(), r);
1867
+ if (n.type === "promise" || n.type === "optional" || n.type === "nonoptional" || n.type === "nullable" || n.type === "readonly" || n.type === "default" || n.type === "prefault")
1868
+ return $(n.innerType, r);
1869
+ if (n.type === "intersection")
1870
+ return $(n.left, r) || $(n.right, r);
1871
+ if (n.type === "record" || n.type === "map")
1872
+ return $(n.keyType, r) || $(n.valueType, r);
1873
+ if (n.type === "pipe")
1874
+ return e._zod.traits.has("$ZodCodec") ? !0 : $(n.in, r) || $(n.out, r);
1875
+ if (n.type === "object") {
1876
+ for (const o in n.shape)
1877
+ if ($(n.shape[o], r))
1878
+ return !0;
1879
+ return !1;
1880
+ }
1881
+ if (n.type === "union") {
1882
+ for (const o of n.options)
1883
+ if ($(o, r))
1884
+ return !0;
1885
+ return !1;
1886
+ }
1887
+ if (n.type === "tuple") {
1888
+ for (const o of n.items)
1889
+ if ($(o, r))
1890
+ return !0;
1891
+ return !!(n.rest && $(n.rest, r));
1892
+ }
1893
+ return !1;
1894
+ }
1895
+ const Qn = (e, t = {}) => (r) => {
1896
+ const n = at({ ...r, processors: t });
1897
+ return k(e, n), st(n, e), ut(n, e);
1898
+ }, X = (e, t, r = {}) => (n) => {
1899
+ const { libraryOptions: o, target: a } = n ?? {}, i = at({ ...o ?? {}, target: a, io: t, processors: r });
1900
+ return k(e, i), st(i, e), ut(i, e);
1901
+ }, eo = {
1902
+ guid: "uuid",
1903
+ url: "uri",
1904
+ datetime: "date-time",
1905
+ json_string: "json-string",
1906
+ regex: ""
1907
+ // do not set
1908
+ }, to = (e, t, r, n) => {
1909
+ const o = r;
1910
+ o.type = "string";
1911
+ const { minimum: a, maximum: i, format: s, patterns: c, contentEncoding: l } = e._zod.bag;
1912
+ if (typeof a == "number" && (o.minLength = a), typeof i == "number" && (o.maxLength = i), s && (o.format = eo[s] ?? s, o.format === "" && delete o.format, s === "time" && delete o.format), l && (o.contentEncoding = l), c && c.size > 0) {
1913
+ const f = [...c];
1914
+ f.length === 1 ? o.pattern = f[0].source : f.length > 1 && (o.allOf = [
1915
+ ...f.map((m) => ({
1916
+ ...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
1917
+ pattern: m.source
1918
+ }))
1919
+ ]);
1920
+ }
1921
+ }, ro = (e, t, r, n) => {
1922
+ const o = r, { minimum: a, maximum: i, format: s, multipleOf: c, exclusiveMaximum: l, exclusiveMinimum: f } = e._zod.bag;
1923
+ typeof s == "string" && s.includes("int") ? o.type = "integer" : o.type = "number";
1924
+ const m = typeof f == "number" && f >= (a ?? Number.NEGATIVE_INFINITY), b = typeof l == "number" && l <= (i ?? Number.POSITIVE_INFINITY), h = t.target === "draft-04" || t.target === "openapi-3.0";
1925
+ m ? h ? (o.minimum = f, o.exclusiveMinimum = !0) : o.exclusiveMinimum = f : typeof a == "number" && (o.minimum = a), b ? h ? (o.maximum = l, o.exclusiveMaximum = !0) : o.exclusiveMaximum = l : typeof i == "number" && (o.maximum = i), typeof c == "number" && (o.multipleOf = c);
1926
+ }, no = (e, t, r, n) => {
1927
+ const o = e._zod.def, a = [];
1928
+ for (const i of o.values)
1929
+ if (i === void 0) {
1930
+ if (t.unrepresentable === "throw")
1931
+ throw new Error("Literal `undefined` cannot be represented in JSON Schema");
1932
+ } else if (typeof i == "bigint") {
1933
+ if (t.unrepresentable === "throw")
1934
+ throw new Error("BigInt literals cannot be represented in JSON Schema");
1935
+ a.push(Number(i));
1936
+ } else
1937
+ a.push(i);
1938
+ if (a.length !== 0) if (a.length === 1) {
1939
+ const i = a[0];
1940
+ r.type = i === null ? "null" : typeof i, t.target === "draft-04" || t.target === "openapi-3.0" ? r.enum = [i] : r.const = i;
1941
+ } else
1942
+ a.every((i) => typeof i == "number") && (r.type = "number"), a.every((i) => typeof i == "string") && (r.type = "string"), a.every((i) => typeof i == "boolean") && (r.type = "boolean"), a.every((i) => i === null) && (r.type = "null"), r.enum = a;
1943
+ }, oo = (e, t, r, n) => {
1944
+ if (t.unrepresentable === "throw")
1945
+ throw new Error("Custom types cannot be represented in JSON Schema");
1946
+ }, io = (e, t, r, n) => {
1947
+ if (t.unrepresentable === "throw")
1948
+ throw new Error("Transforms cannot be represented in JSON Schema");
1949
+ }, ao = (e, t, r, n) => {
1950
+ const o = r, a = e._zod.def, { minimum: i, maximum: s } = e._zod.bag;
1951
+ typeof i == "number" && (o.minItems = i), typeof s == "number" && (o.maxItems = s), o.type = "array", o.items = k(a.element, t, {
1952
+ ...n,
1953
+ path: [...n.path, "items"]
1954
+ });
1955
+ }, so = (e, t, r, n) => {
1956
+ const o = e._zod.def, a = o.inclusive === !1, i = o.options.map((s, c) => k(s, t, {
1957
+ ...n,
1958
+ path: [...n.path, a ? "oneOf" : "anyOf", c]
1959
+ }));
1960
+ a ? r.oneOf = i : r.anyOf = i;
1961
+ }, uo = (e, t, r, n) => {
1962
+ const o = e._zod.def, a = k(o.left, t, {
1963
+ ...n,
1964
+ path: [...n.path, "allOf", 0]
1965
+ }), i = k(o.right, t, {
1966
+ ...n,
1967
+ path: [...n.path, "allOf", 1]
1968
+ }), s = (l) => "allOf" in l && Object.keys(l).length === 1, c = [
1969
+ ...s(a) ? a.allOf : [a],
1970
+ ...s(i) ? i.allOf : [i]
1971
+ ];
1972
+ r.allOf = c;
1973
+ }, co = (e, t, r, n) => {
1974
+ const o = e._zod.def, a = k(o.innerType, t, n), i = t.seen.get(e);
1975
+ t.target === "openapi-3.0" ? (i.ref = o.innerType, r.nullable = !0) : r.anyOf = [a, { type: "null" }];
1976
+ }, lo = (e, t, r, n) => {
1977
+ const o = e._zod.def;
1978
+ k(o.innerType, t, n);
1979
+ const a = t.seen.get(e);
1980
+ a.ref = o.innerType;
1981
+ }, fo = (e, t, r, n) => {
1982
+ const o = e._zod.def;
1983
+ k(o.innerType, t, n);
1984
+ const a = t.seen.get(e);
1985
+ a.ref = o.innerType, r.default = JSON.parse(JSON.stringify(o.defaultValue));
1986
+ }, mo = (e, t, r, n) => {
1987
+ const o = e._zod.def;
1988
+ k(o.innerType, t, n);
1989
+ const a = t.seen.get(e);
1990
+ a.ref = o.innerType, t.io === "input" && (r._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
1991
+ }, po = (e, t, r, n) => {
1992
+ const o = e._zod.def;
1993
+ k(o.innerType, t, n);
1994
+ const a = t.seen.get(e);
1995
+ a.ref = o.innerType;
1996
+ let i;
1997
+ try {
1998
+ i = o.catchValue(void 0);
1999
+ } catch {
2000
+ throw new Error("Dynamic catch values are not supported in JSON Schema");
2001
+ }
2002
+ r.default = i;
2003
+ }, ho = (e, t, r, n) => {
2004
+ const o = e._zod.def, a = o.in._zod.traits.has("$ZodTransform"), i = t.io === "input" ? a ? o.out : o.in : o.out;
2005
+ k(i, t, n);
2006
+ const s = t.seen.get(e);
2007
+ s.ref = i;
2008
+ }, _o = (e, t, r, n) => {
2009
+ const o = e._zod.def;
2010
+ k(o.innerType, t, n);
2011
+ const a = t.seen.get(e);
2012
+ a.ref = o.innerType, r.readOnly = !0;
2013
+ }, ct = (e, t, r, n) => {
2014
+ const o = e._zod.def;
2015
+ k(o.innerType, t, n);
2016
+ const a = t.seen.get(e);
2017
+ a.ref = o.innerType;
2018
+ }, go = /* @__PURE__ */ u("ZodISODateTime", (e, t) => {
2019
+ Ar.init(e, t), g.init(e, t);
2020
+ });
2021
+ function bo(e) {
2022
+ return /* @__PURE__ */ En(go, e);
2023
+ }
2024
+ const vo = /* @__PURE__ */ u("ZodISODate", (e, t) => {
2025
+ Cr.init(e, t), g.init(e, t);
2026
+ });
2027
+ function yo(e) {
2028
+ return /* @__PURE__ */ An(vo, e);
2029
+ }
2030
+ const wo = /* @__PURE__ */ u("ZodISOTime", (e, t) => {
2031
+ Dr.init(e, t), g.init(e, t);
2032
+ });
2033
+ function zo(e) {
2034
+ return /* @__PURE__ */ Cn(wo, e);
2035
+ }
2036
+ const $o = /* @__PURE__ */ u("ZodISODuration", (e, t) => {
2037
+ Ur.init(e, t), g.init(e, t);
2038
+ });
2039
+ function ko(e) {
2040
+ return /* @__PURE__ */ Dn($o, e);
2041
+ }
2042
+ const Zo = (e, t) => {
2043
+ Ke.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2044
+ format: {
2045
+ value: (r) => St(e, r)
2046
+ // enumerable: false,
2047
+ },
2048
+ flatten: {
2049
+ value: (r) => Zt(e, r)
2050
+ // enumerable: false,
2051
+ },
2052
+ addIssue: {
2053
+ value: (r) => {
2054
+ e.issues.push(r), e.message = JSON.stringify(e.issues, oe, 2);
2055
+ }
2056
+ // enumerable: false,
2057
+ },
2058
+ addIssues: {
2059
+ value: (r) => {
2060
+ e.issues.push(...r), e.message = JSON.stringify(e.issues, oe, 2);
2061
+ }
2062
+ // enumerable: false,
2063
+ },
2064
+ isEmpty: {
2065
+ get() {
2066
+ return e.issues.length === 0;
2067
+ }
2068
+ // enumerable: false,
2069
+ }
2070
+ });
2071
+ }, S = /* @__PURE__ */ u("ZodError", Zo, {
2072
+ Parent: Error
2073
+ }), So = /* @__PURE__ */ fe(S), Oo = /* @__PURE__ */ me(S), Io = /* @__PURE__ */ H(S), No = /* @__PURE__ */ Q(S), To = /* @__PURE__ */ Nt(S), Po = /* @__PURE__ */ Tt(S), Eo = /* @__PURE__ */ Pt(S), Ao = /* @__PURE__ */ Et(S), Co = /* @__PURE__ */ At(S), Do = /* @__PURE__ */ Ct(S), Uo = /* @__PURE__ */ Dt(S), Ro = /* @__PURE__ */ Ut(S), Ee = /* @__PURE__ */ new WeakMap();
2074
+ function te(e, t, r) {
2075
+ const n = Object.getPrototypeOf(e);
2076
+ let o = Ee.get(n);
2077
+ if (o || (o = /* @__PURE__ */ new Set(), Ee.set(n, o)), !o.has(t)) {
2078
+ o.add(t);
2079
+ for (const a in r) {
2080
+ const i = r[a];
2081
+ Object.defineProperty(n, a, {
2082
+ configurable: !0,
2083
+ enumerable: !1,
2084
+ get() {
2085
+ const s = i.bind(this);
2086
+ return Object.defineProperty(this, a, {
2087
+ configurable: !0,
2088
+ writable: !0,
2089
+ enumerable: !0,
2090
+ value: s
2091
+ }), s;
2092
+ },
2093
+ set(s) {
2094
+ Object.defineProperty(this, a, {
2095
+ configurable: !0,
2096
+ writable: !0,
2097
+ enumerable: !0,
2098
+ value: s
2099
+ });
2100
+ }
2101
+ });
2102
+ }
2103
+ }
2104
+ }
2105
+ const w = /* @__PURE__ */ u("ZodType", (e, t) => (y.init(e, t), Object.assign(e["~standard"], {
2106
+ jsonSchema: {
2107
+ input: X(e, "input"),
2108
+ output: X(e, "output")
2109
+ }
2110
+ }), e.toJSONSchema = Qn(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.parse = (r, n) => So(e, r, n, { callee: e.parse }), e.safeParse = (r, n) => Io(e, r, n), e.parseAsync = async (r, n) => Oo(e, r, n, { callee: e.parseAsync }), e.safeParseAsync = async (r, n) => No(e, r, n), e.spa = e.safeParseAsync, e.encode = (r, n) => To(e, r, n), e.decode = (r, n) => Po(e, r, n), e.encodeAsync = async (r, n) => Eo(e, r, n), e.decodeAsync = async (r, n) => Ao(e, r, n), e.safeEncode = (r, n) => Co(e, r, n), e.safeDecode = (r, n) => Do(e, r, n), e.safeEncodeAsync = async (r, n) => Uo(e, r, n), e.safeDecodeAsync = async (r, n) => Ro(e, r, n), te(e, "ZodType", {
2111
+ check(...r) {
2112
+ const n = this.def;
2113
+ return this.clone(vt(n, {
2114
+ checks: [
2115
+ ...n.checks ?? [],
2116
+ ...r.map((o) => typeof o == "function" ? { _zod: { check: o, def: { check: "custom" }, onattach: [] } } : o)
2117
+ ]
2118
+ }), { parent: !0 });
2119
+ },
2120
+ with(...r) {
2121
+ return this.check(...r);
2122
+ },
2123
+ clone(r, n) {
2124
+ return wt(this, r, n);
2125
+ },
2126
+ brand() {
2127
+ return this;
2128
+ },
2129
+ register(r, n) {
2130
+ return r.add(this, n), this;
2131
+ },
2132
+ refine(r, n) {
2133
+ return this.check(Ii(r, n));
2134
+ },
2135
+ superRefine(r, n) {
2136
+ return this.check(Ni(r, n));
2137
+ },
2138
+ overwrite(r) {
2139
+ return this.check(/* @__PURE__ */ j(r));
2140
+ },
2141
+ optional() {
2142
+ return De(this);
2143
+ },
2144
+ exactOptional() {
2145
+ return pi(this);
2146
+ },
2147
+ nullable() {
2148
+ return Ue(this);
2149
+ },
2150
+ nullish() {
2151
+ return De(Ue(this));
2152
+ },
2153
+ nonoptional(r) {
2154
+ return wi(this, r);
2155
+ },
2156
+ array() {
2157
+ return oi(this);
2158
+ },
2159
+ or(r) {
2160
+ return mt([this, r]);
2161
+ },
2162
+ and(r) {
2163
+ return si(this, r);
2164
+ },
2165
+ transform(r) {
2166
+ return Re(this, di(r));
2167
+ },
2168
+ default(r) {
2169
+ return gi(this, r);
2170
+ },
2171
+ prefault(r) {
2172
+ return vi(this, r);
2173
+ },
2174
+ catch(r) {
2175
+ return $i(this, r);
2176
+ },
2177
+ pipe(r) {
2178
+ return Re(this, r);
2179
+ },
2180
+ readonly() {
2181
+ return Si(this);
2182
+ },
2183
+ describe(r) {
2184
+ const n = this.clone();
2185
+ return L.add(n, { description: r }), n;
2186
+ },
2187
+ meta(...r) {
2188
+ if (r.length === 0)
2189
+ return L.get(this);
2190
+ const n = this.clone();
2191
+ return L.add(n, r[0]), n;
2192
+ },
2193
+ isOptional() {
2194
+ return this.safeParse(void 0).success;
2195
+ },
2196
+ isNullable() {
2197
+ return this.safeParse(null).success;
2198
+ },
2199
+ apply(r) {
2200
+ return r(this);
2201
+ }
2202
+ }), Object.defineProperty(e, "description", {
2203
+ get() {
2204
+ return L.get(e)?.description;
2205
+ },
2206
+ configurable: !0
2207
+ }), e)), lt = /* @__PURE__ */ u("_ZodString", (e, t) => {
2208
+ pe.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, o, a) => to(e, n, o);
2209
+ const r = e._zod.bag;
2210
+ e.format = r.format ?? null, e.minLength = r.minimum ?? null, e.maxLength = r.maximum ?? null, te(e, "_ZodString", {
2211
+ regex(...n) {
2212
+ return this.check(/* @__PURE__ */ xn(...n));
2213
+ },
2214
+ includes(...n) {
2215
+ return this.check(/* @__PURE__ */ Ln(...n));
2216
+ },
2217
+ startsWith(...n) {
2218
+ return this.check(/* @__PURE__ */ Fn(...n));
2219
+ },
2220
+ endsWith(...n) {
2221
+ return this.check(/* @__PURE__ */ Jn(...n));
2222
+ },
2223
+ min(...n) {
2224
+ return this.check(/* @__PURE__ */ B(...n));
2225
+ },
2226
+ max(...n) {
2227
+ return this.check(/* @__PURE__ */ ot(...n));
2228
+ },
2229
+ length(...n) {
2230
+ return this.check(/* @__PURE__ */ it(...n));
2231
+ },
2232
+ nonempty(...n) {
2233
+ return this.check(/* @__PURE__ */ B(1, ...n));
2234
+ },
2235
+ lowercase(n) {
2236
+ return this.check(/* @__PURE__ */ jn(n));
2237
+ },
2238
+ uppercase(n) {
2239
+ return this.check(/* @__PURE__ */ Mn(n));
2240
+ },
2241
+ trim() {
2242
+ return this.check(/* @__PURE__ */ Yn());
2243
+ },
2244
+ normalize(...n) {
2245
+ return this.check(/* @__PURE__ */ Vn(...n));
2246
+ },
2247
+ toLowerCase() {
2248
+ return this.check(/* @__PURE__ */ Kn());
2249
+ },
2250
+ toUpperCase() {
2251
+ return this.check(/* @__PURE__ */ Wn());
2252
+ },
2253
+ slugify() {
2254
+ return this.check(/* @__PURE__ */ qn());
2255
+ }
2256
+ });
2257
+ }), xo = /* @__PURE__ */ u("ZodString", (e, t) => {
2258
+ pe.init(e, t), lt.init(e, t), e.email = (r) => e.check(/* @__PURE__ */ nt(dt, r)), e.url = (r) => e.check(/* @__PURE__ */ _n(Mo, r)), e.jwt = (r) => e.check(/* @__PURE__ */ Pn(ti, r)), e.emoji = (r) => e.check(/* @__PURE__ */ gn(Lo, r)), e.guid = (r) => e.check(/* @__PURE__ */ Ie(Ae, r)), e.uuid = (r) => e.check(/* @__PURE__ */ fn(K, r)), e.uuidv4 = (r) => e.check(/* @__PURE__ */ mn(K, r)), e.uuidv6 = (r) => e.check(/* @__PURE__ */ pn(K, r)), e.uuidv7 = (r) => e.check(/* @__PURE__ */ hn(K, r)), e.nanoid = (r) => e.check(/* @__PURE__ */ bn(Fo, r)), e.guid = (r) => e.check(/* @__PURE__ */ Ie(Ae, r)), e.cuid = (r) => e.check(/* @__PURE__ */ vn(Jo, r)), e.cuid2 = (r) => e.check(/* @__PURE__ */ yn(Vo, r)), e.ulid = (r) => e.check(/* @__PURE__ */ wn(Yo, r)), e.base64 = (r) => e.check(/* @__PURE__ */ In(Ho, r)), e.base64url = (r) => e.check(/* @__PURE__ */ Nn(Qo, r)), e.xid = (r) => e.check(/* @__PURE__ */ zn(Ko, r)), e.ksuid = (r) => e.check(/* @__PURE__ */ $n(Wo, r)), e.ipv4 = (r) => e.check(/* @__PURE__ */ kn(qo, r)), e.ipv6 = (r) => e.check(/* @__PURE__ */ Zn(Go, r)), e.cidrv4 = (r) => e.check(/* @__PURE__ */ Sn(Bo, r)), e.cidrv6 = (r) => e.check(/* @__PURE__ */ On(Xo, r)), e.e164 = (r) => e.check(/* @__PURE__ */ Tn(ei, r)), e.datetime = (r) => e.check(bo(r)), e.date = (r) => e.check(yo(r)), e.time = (r) => e.check(zo(r)), e.duration = (r) => e.check(ko(r));
2259
+ });
2260
+ function T(e) {
2261
+ return /* @__PURE__ */ dn(xo, e);
2262
+ }
2263
+ const g = /* @__PURE__ */ u("ZodStringFormat", (e, t) => {
2264
+ _.init(e, t), lt.init(e, t);
2265
+ }), dt = /* @__PURE__ */ u("ZodEmail", (e, t) => {
2266
+ kr.init(e, t), g.init(e, t);
2267
+ });
2268
+ function jo(e) {
2269
+ return /* @__PURE__ */ nt(dt, e);
2270
+ }
2271
+ const Ae = /* @__PURE__ */ u("ZodGUID", (e, t) => {
2272
+ zr.init(e, t), g.init(e, t);
2273
+ }), K = /* @__PURE__ */ u("ZodUUID", (e, t) => {
2274
+ $r.init(e, t), g.init(e, t);
2275
+ }), Mo = /* @__PURE__ */ u("ZodURL", (e, t) => {
2276
+ Zr.init(e, t), g.init(e, t);
2277
+ }), Lo = /* @__PURE__ */ u("ZodEmoji", (e, t) => {
2278
+ Sr.init(e, t), g.init(e, t);
2279
+ }), Fo = /* @__PURE__ */ u("ZodNanoID", (e, t) => {
2280
+ Or.init(e, t), g.init(e, t);
2281
+ }), Jo = /* @__PURE__ */ u("ZodCUID", (e, t) => {
2282
+ Ir.init(e, t), g.init(e, t);
2283
+ }), Vo = /* @__PURE__ */ u("ZodCUID2", (e, t) => {
2284
+ Nr.init(e, t), g.init(e, t);
2285
+ }), Yo = /* @__PURE__ */ u("ZodULID", (e, t) => {
2286
+ Tr.init(e, t), g.init(e, t);
2287
+ }), Ko = /* @__PURE__ */ u("ZodXID", (e, t) => {
2288
+ Pr.init(e, t), g.init(e, t);
2289
+ }), Wo = /* @__PURE__ */ u("ZodKSUID", (e, t) => {
2290
+ Er.init(e, t), g.init(e, t);
2291
+ }), qo = /* @__PURE__ */ u("ZodIPv4", (e, t) => {
2292
+ Rr.init(e, t), g.init(e, t);
2293
+ }), Go = /* @__PURE__ */ u("ZodIPv6", (e, t) => {
2294
+ xr.init(e, t), g.init(e, t);
2295
+ }), Bo = /* @__PURE__ */ u("ZodCIDRv4", (e, t) => {
2296
+ jr.init(e, t), g.init(e, t);
2297
+ }), Xo = /* @__PURE__ */ u("ZodCIDRv6", (e, t) => {
2298
+ Mr.init(e, t), g.init(e, t);
2299
+ }), Ho = /* @__PURE__ */ u("ZodBase64", (e, t) => {
2300
+ Lr.init(e, t), g.init(e, t);
2301
+ }), Qo = /* @__PURE__ */ u("ZodBase64URL", (e, t) => {
2302
+ Jr.init(e, t), g.init(e, t);
2303
+ }), ei = /* @__PURE__ */ u("ZodE164", (e, t) => {
2304
+ Vr.init(e, t), g.init(e, t);
2305
+ }), ti = /* @__PURE__ */ u("ZodJWT", (e, t) => {
2306
+ Kr.init(e, t), g.init(e, t);
2307
+ }), ft = /* @__PURE__ */ u("ZodNumber", (e, t) => {
2308
+ tt.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, o, a) => ro(e, n, o), te(e, "ZodNumber", {
2309
+ gt(n, o) {
2310
+ return this.check(/* @__PURE__ */ Te(n, o));
2311
+ },
2312
+ gte(n, o) {
2313
+ return this.check(/* @__PURE__ */ ne(n, o));
2314
+ },
2315
+ min(n, o) {
2316
+ return this.check(/* @__PURE__ */ ne(n, o));
2317
+ },
2318
+ lt(n, o) {
2319
+ return this.check(/* @__PURE__ */ Ne(n, o));
2320
+ },
2321
+ lte(n, o) {
2322
+ return this.check(/* @__PURE__ */ re(n, o));
2323
+ },
2324
+ max(n, o) {
2325
+ return this.check(/* @__PURE__ */ re(n, o));
2326
+ },
2327
+ int(n) {
2328
+ return this.check(Ce(n));
2329
+ },
2330
+ safe(n) {
2331
+ return this.check(Ce(n));
2332
+ },
2333
+ positive(n) {
2334
+ return this.check(/* @__PURE__ */ Te(0, n));
2335
+ },
2336
+ nonnegative(n) {
2337
+ return this.check(/* @__PURE__ */ ne(0, n));
2338
+ },
2339
+ negative(n) {
2340
+ return this.check(/* @__PURE__ */ Ne(0, n));
2341
+ },
2342
+ nonpositive(n) {
2343
+ return this.check(/* @__PURE__ */ re(0, n));
2344
+ },
2345
+ multipleOf(n, o) {
2346
+ return this.check(/* @__PURE__ */ Pe(n, o));
2347
+ },
2348
+ step(n, o) {
2349
+ return this.check(/* @__PURE__ */ Pe(n, o));
2350
+ },
2351
+ finite() {
2352
+ return this;
2353
+ }
2354
+ });
2355
+ const r = e._zod.bag;
2356
+ e.minValue = Math.max(r.minimum ?? Number.NEGATIVE_INFINITY, r.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(r.maximum ?? Number.POSITIVE_INFINITY, r.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (r.format ?? "").includes("int") || Number.isSafeInteger(r.multipleOf ?? 0.5), e.isFinite = !0, e.format = r.format ?? null;
2357
+ }), ri = /* @__PURE__ */ u("ZodNumberFormat", (e, t) => {
2358
+ Wr.init(e, t), ft.init(e, t);
2359
+ });
2360
+ function Ce(e) {
2361
+ return /* @__PURE__ */ Rn(ri, e);
2362
+ }
2363
+ const ni = /* @__PURE__ */ u("ZodArray", (e, t) => {
2364
+ qr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => ao(e, r, n, o), e.element = t.element, te(e, "ZodArray", {
2365
+ min(r, n) {
2366
+ return this.check(/* @__PURE__ */ B(r, n));
2367
+ },
2368
+ nonempty(r) {
2369
+ return this.check(/* @__PURE__ */ B(1, r));
2370
+ },
2371
+ max(r, n) {
2372
+ return this.check(/* @__PURE__ */ ot(r, n));
2373
+ },
2374
+ length(r, n) {
2375
+ return this.check(/* @__PURE__ */ it(r, n));
2376
+ },
2377
+ unwrap() {
2378
+ return this.element;
2379
+ }
2380
+ });
2381
+ });
2382
+ function oi(e, t) {
2383
+ return /* @__PURE__ */ Gn(ni, e, t);
2384
+ }
2385
+ const ii = /* @__PURE__ */ u("ZodUnion", (e, t) => {
2386
+ Gr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => so(e, r, n, o), e.options = t.options;
2387
+ });
2388
+ function mt(e, t) {
2389
+ return new ii({
2390
+ type: "union",
2391
+ options: e,
2392
+ ...d(t)
2393
+ });
2394
+ }
2395
+ const ai = /* @__PURE__ */ u("ZodIntersection", (e, t) => {
2396
+ Br.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => uo(e, r, n, o);
2397
+ });
2398
+ function si(e, t) {
2399
+ return new ai({
2400
+ type: "intersection",
2401
+ left: e,
2402
+ right: t
2403
+ });
2404
+ }
2405
+ const ui = /* @__PURE__ */ u("ZodLiteral", (e, t) => {
2406
+ Xr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => no(e, r, n), e.values = new Set(t.values), Object.defineProperty(e, "value", {
2407
+ get() {
2408
+ if (t.values.length > 1)
2409
+ throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
2410
+ return t.values[0];
2411
+ }
2412
+ });
2413
+ });
2414
+ function ci(e, t) {
2415
+ return new ui({
2416
+ type: "literal",
2417
+ values: Array.isArray(e) ? e : [e],
2418
+ ...d(t)
2419
+ });
2420
+ }
2421
+ const li = /* @__PURE__ */ u("ZodTransform", (e, t) => {
2422
+ Hr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => io(e, r), e._zod.parse = (r, n) => {
2423
+ if (n.direction === "backward")
2424
+ throw new Fe(e.constructor.name);
2425
+ r.addIssue = (a) => {
2426
+ if (typeof a == "string")
2427
+ r.issues.push(J(a, r.value, t));
2428
+ else {
2429
+ const i = a;
2430
+ i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = r.value), i.inst ?? (i.inst = e), r.issues.push(J(i));
2431
+ }
2432
+ };
2433
+ const o = t.transform(r.value, r);
2434
+ return o instanceof Promise ? o.then((a) => (r.value = a, r.fallback = !0, r)) : (r.value = o, r.fallback = !0, r);
2435
+ };
2436
+ });
2437
+ function di(e) {
2438
+ return new li({
2439
+ type: "transform",
2440
+ transform: e
2441
+ });
2442
+ }
2443
+ const fi = /* @__PURE__ */ u("ZodOptional", (e, t) => {
2444
+ rt.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => ct(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
2445
+ });
2446
+ function De(e) {
2447
+ return new fi({
2448
+ type: "optional",
2449
+ innerType: e
2450
+ });
2451
+ }
2452
+ const mi = /* @__PURE__ */ u("ZodExactOptional", (e, t) => {
2453
+ Qr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => ct(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
2454
+ });
2455
+ function pi(e) {
2456
+ return new mi({
2457
+ type: "optional",
2458
+ innerType: e
2459
+ });
2460
+ }
2461
+ const hi = /* @__PURE__ */ u("ZodNullable", (e, t) => {
2462
+ en.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => co(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
2463
+ });
2464
+ function Ue(e) {
2465
+ return new hi({
2466
+ type: "nullable",
2467
+ innerType: e
2468
+ });
2469
+ }
2470
+ const _i = /* @__PURE__ */ u("ZodDefault", (e, t) => {
2471
+ tn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => fo(e, r, n, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2472
+ });
2473
+ function gi(e, t) {
2474
+ return new _i({
2475
+ type: "default",
2476
+ innerType: e,
2477
+ get defaultValue() {
2478
+ return typeof t == "function" ? t() : Ve(t);
2479
+ }
2480
+ });
2481
+ }
2482
+ const bi = /* @__PURE__ */ u("ZodPrefault", (e, t) => {
2483
+ rn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => mo(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
2484
+ });
2485
+ function vi(e, t) {
2486
+ return new bi({
2487
+ type: "prefault",
2488
+ innerType: e,
2489
+ get defaultValue() {
2490
+ return typeof t == "function" ? t() : Ve(t);
2491
+ }
2492
+ });
2493
+ }
2494
+ const yi = /* @__PURE__ */ u("ZodNonOptional", (e, t) => {
2495
+ nn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => lo(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
2496
+ });
2497
+ function wi(e, t) {
2498
+ return new yi({
2499
+ type: "nonoptional",
2500
+ innerType: e,
2501
+ ...d(t)
2502
+ });
2503
+ }
2504
+ const zi = /* @__PURE__ */ u("ZodCatch", (e, t) => {
2505
+ on.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => po(e, r, n, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
2506
+ });
2507
+ function $i(e, t) {
2508
+ return new zi({
2509
+ type: "catch",
2510
+ innerType: e,
2511
+ catchValue: typeof t == "function" ? t : () => t
2512
+ });
2513
+ }
2514
+ const ki = /* @__PURE__ */ u("ZodPipe", (e, t) => {
2515
+ an.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => ho(e, r, n, o), e.in = t.in, e.out = t.out;
2516
+ });
2517
+ function Re(e, t) {
2518
+ return new ki({
2519
+ type: "pipe",
2520
+ in: e,
2521
+ out: t
2522
+ // ...util.normalizeParams(params),
2523
+ });
2524
+ }
2525
+ const Zi = /* @__PURE__ */ u("ZodReadonly", (e, t) => {
2526
+ sn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => _o(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
2527
+ });
2528
+ function Si(e) {
2529
+ return new Zi({
2530
+ type: "readonly",
2531
+ innerType: e
2532
+ });
2533
+ }
2534
+ const Oi = /* @__PURE__ */ u("ZodCustom", (e, t) => {
2535
+ un.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => oo(e, r);
2536
+ });
2537
+ function Ii(e, t = {}) {
2538
+ return /* @__PURE__ */ Bn(Oi, e, t);
2539
+ }
2540
+ function Ni(e, t) {
2541
+ return /* @__PURE__ */ Xn(e, t);
2542
+ }
2543
+ function v(e) {
2544
+ return /* @__PURE__ */ Un(ft, e);
2545
+ }
2546
+ var pt = (/* @__PURE__ */ new Date()).getUTCFullYear(), W = T().trim().min(1, "Required").regex(/^[A-Za-z\s]+$/, "Only alphabetic characters are allowed."), xe = mt([ci(""), T().trim().regex(/^[A-Za-z\s]*$/, "Only alphabetic characters are allowed.")]).optional(), Ti = (e, t, r) => v({ error: `${e} must be a number.` }).min(t, `${e} must be between ${t.toLocaleString("en-US")} and ${r.toLocaleString("en-US")}.`).max(r, `${e} must be between ${t.toLocaleString("en-US")} and ${r.toLocaleString("en-US")}.`).int(`${e} must be a whole number.`), A = (e, t) => v({ error: `${e} must be a number.` }).min(0, `${e} must be between 0 and ${t.toLocaleString("en-US")}.`).max(t, `${e} must be between 0 and ${t.toLocaleString("en-US")}.`).int(`${e} must be a whole number.`), q = (e, t = 1600) => v({ error: `${e} must be a valid 4-digit year.` }).int(`${e} must be a whole number.`).min(t, `${e} should be between ${t} and the current year.`).max(pt, `${e} cannot be in the future.`), G = (e) => v({ error: `${e} must be a number.` }).int(`${e} must be a whole number.`).min(0, `${e} must be between 0 and 99.`).max(99, `${e} must be between 0 and 99.`), M = (e, t, r = 0) => {
2547
+ let n = 10 ** t - 1;
2548
+ return v({ error: `${e} must be a number.` }).min(r, `${e}: Value must be between ${r.toLocaleString("en-US")} and ${n.toLocaleString("en-US")}.`).max(n, `${e}: Value must be between ${r.toLocaleString("en-US")} and ${n.toLocaleString("en-US")}.`).int(`${e} must be a whole number.`);
2549
+ }, Pi = {
2550
+ email: T().trim().min(1, "Required").pipe(jo("Please enter a valid email address.")),
2551
+ phone: T().trim().min(1, "Required").refine((e) => {
2552
+ let t = e.replace(/\D/g, "");
2553
+ return t.length === 11 && t.startsWith("1") && (t = t.slice(1)), t.length === 10;
2554
+ }, "Please enter a valid 10-digit US phone number."),
2555
+ social_security_number: T().trim().refine((e) => e === "" || /^\d{3}-\d{2}-\d{4}$/.test(e), "Social Security Number must be in the format XXX-XX-XXXX.").optional(),
2556
+ sms_code: T().trim().min(1, "Required").regex(/^\d{6}$/, "Please enter the 6-digit code."),
2557
+ first_name: W,
2558
+ last_name: W,
2559
+ middle_name: xe,
2560
+ co_applicant_first_name: W,
2561
+ co_applicant_last_name: W,
2562
+ co_applicant_middle_name: xe,
2563
+ year_built: q("Year built", 1800),
2564
+ year_roof_updated: v({ error: "Please enter a valid 4-digit year." }).int("Year must be a whole number.").min(1e3, "Please enter a valid 4-digit year.").max(9999, "Please enter a valid 4-digit year."),
2565
+ heating_update_year: q("Heating update year"),
2566
+ plumbing_update_year: q("Plumbing update year"),
2567
+ electrical_update_year: q("Electrical update year"),
2568
+ total_area_sq_ft: Ti("Square footage", 1, 999999),
2569
+ sale_price_cents: v({ error: "Purchase Price must be a number." }).min(1, "Purchase Price must be between 1 and 21,474,836.").max(21474836, "Purchase Price must be between 1 and 21,474,836.").int("Purchase Price must be a whole number."),
2570
+ home_prior_years: G("Number of years with your prior carrier"),
2571
+ home_continuous_coverage_years: G("How long you have had continuous home coverage"),
2572
+ household_size: v({ error: "Household size must be a number." }).min(1, "Occupants must be between 1 and 8.").max(8, "Occupants must be between 1 and 8.").int("Occupants must be between 1 and 8."),
2573
+ number_of_mortgagees: v({ error: "Number of mortgagees must be a number." }).int().min(0, "Number of mortgagees cannot be negative.").max(3, "Number of mortgagees must be between 0 and 3."),
2574
+ dwelling_replacement_cost: M("Replacement cost", 9, 1),
2575
+ other_structures_coverage: M("Other structures", 9),
2576
+ personal_property_coverage: M("Personal property", 9),
2577
+ loss_of_use_coverage: M("Loss of use coverage", 9),
2578
+ years_at_address: v({ error: "Years at address must be a number." }).int().min(0, "Years at address cannot be negative.").max(100, "Years at address must be 100 or less."),
2579
+ months_at_address: v({ error: "Months at address must be a number." }).int().min(0, "Months at address cannot be negative.").max(11, "Months at address must be between 0 and 11."),
2580
+ years_at_prior_address: v({ error: "Years at prior address must be a number." }).int().min(0, "Years at prior address cannot be negative.").max(100, "Years at prior address must be 100 or less."),
2581
+ number_of_units: v({ error: "Number of units must be a number." }).int().min(1, "Number of units/apartments should be greater than 0.").max(99, "Number of units/apartments must be between 1 and 99."),
2582
+ number_of_families: v({ error: "Number of families must be a number." }).int("Number of families must be a whole number.").refine((e) => e >= 1 && e <= 5, { message: "Number of families must be between 1 and 5." }),
2583
+ number_of_dogs: v({ error: "Number of dogs must be a number." }).int().min(0, "Number of dogs must be between 0 and 99.").max(99, "Number of dogs must be between 0 and 99."),
2584
+ number_of_parking_spaces: v({ error: "Number of parking spaces must be a number." }).int().min(1, "Number of covered parking spaces must be between 1 and 3.").max(3, "Number of covered parking spaces must be between 1 and 3."),
2585
+ distance_to_coast_miles: v({ error: "Distance to coast must be a number." }).int().min(0, "Distance to coast cannot be negative.").max(9999, "Distance to coast must be at most 4 digits."),
2586
+ amount_paid_cents: M("Amount paid", 7),
2587
+ license_number: T().trim().min(1, "Required").max(20, "License number must be 20 characters or fewer.").regex(/^[A-Z0-9]+$/i, "License number must contain only letters and numbers."),
2588
+ property_damage_amount_paid_cents: A("Property damage amount paid", 9999999),
2589
+ personal_injury_amount_paid_cents: A("Personal injury amount paid", 9999999),
2590
+ vin: T().superRefine((e, t) => {
2591
+ if (typeof e == "string" && e.trim() !== "") {
2592
+ if (/\s/.test(e)) {
2593
+ t.addIssue({
2594
+ code: "custom",
2595
+ message: "VIN cannot contain spaces."
2596
+ });
2597
+ return;
2598
+ }
2599
+ /^[A-HJ-NPR-Z0-9]{17}$/i.test(e.trim()) || t.addIssue({
2600
+ code: "custom",
2601
+ message: "VIN must be exactly 17 letters and numbers (excluding I, O, and Q)."
2602
+ });
2603
+ }
2604
+ }),
2605
+ annual_mileage: v({ error: "Annual mileage must be a number." }).int("Annual mileage must be a whole number.").min(1e3, "Vehicle annual use should be between 1,000 & 100,000 miles.").max(1e5, "Vehicle annual use should be between 1,000 & 100,000 miles."),
2606
+ miles_to_work: v({ error: "Miles driven to work/school must be a number." }).int("Miles driven to work/school must be a whole number.").min(1, "Please enter a value greater than 0.").max(9999, "Miles driven to work/school must be between 1 and 9,999."),
2607
+ custom_equipment_value_cents: A("Modifications value", 9999999),
2608
+ cost_new_value_cents: A("Cost new value", 9999999),
2609
+ stated_value_amount_cents: A("Stated Value Amount", 9999999),
2610
+ auto_current_annual_premium_cents: A("Current annual premium", 9999999),
2611
+ auto_prior_years: G("Years with prior auto carrier"),
2612
+ auto_prior_months: v({ error: "Months with prior carrier must be a number." }).int().min(0, "Months with prior carrier must be between 0 and 11.").max(11, "Months with prior carrier must be between 0 and 11."),
2613
+ auto_continuous_coverage_years: G("Years with continuous auto coverage")
2614
+ }, Ei = (e, t) => {
2615
+ let r = Pi[e];
2616
+ if (!r) return;
2617
+ let n = r.safeParse(t);
2618
+ return n.success ? void 0 : n.error.issues[0]?.message;
2619
+ }, ji = (e) => {
2620
+ if (/\s/.test(e)) return !1;
2621
+ let t = e.trim();
2622
+ return t.length === 17 && /^[A-HJ-NPR-Z0-9]{17}$/i.test(t);
2623
+ }, Ai = (e) => /* @__PURE__ */ new Date(`${e}T00:00:00Z`), x = () => {
2624
+ let e = /* @__PURE__ */ new Date();
2625
+ return new Date(Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate()));
2626
+ }, se = (e, t) => {
2627
+ let r = t.getUTCFullYear() - e.getUTCFullYear(), n = t.getUTCMonth() - e.getUTCMonth();
2628
+ return (n < 0 || n === 0 && t.getUTCDate() < e.getUTCDate()) && --r, r;
2629
+ }, ue = (e, t) => new Date(Date.UTC(e.getUTCFullYear() + t, e.getUTCMonth(), e.getUTCDate())), N = (e) => {
2630
+ if (!e || typeof e != "string") return null;
2631
+ let t = Ai(e);
2632
+ return Number.isNaN(t.getTime()) ? null : t;
2633
+ }, I = (e) => {
2634
+ if (e == null || e === "") return null;
2635
+ let t = Number(e);
2636
+ return Number.isNaN(t) ? null : t;
2637
+ }, C = (e, t) => ({
2638
+ targetKey: e,
2639
+ dependsOn: [e],
2640
+ validate: (r) => {
2641
+ if (!r[e] || typeof r[e] != "string") return;
2642
+ let n = N(r[e]);
2643
+ return n ? n > x() ? t : void 0 : "Invalid date.";
2644
+ }
2645
+ }), D = (e, t) => ({
2646
+ targetKey: e,
2647
+ dependsOn: [e, "date_of_birth"],
2648
+ validate: (r) => {
2649
+ let n = I(r[e]), o = N(r.date_of_birth);
2650
+ if (!(n == null || !o)) return n > se(o, x()) ? t : void 0;
2651
+ }
2652
+ }), je = (e, t) => ({
2653
+ targetKey: e,
2654
+ dependsOn: [e],
2655
+ validate: (r) => {
2656
+ if (!r[e] || typeof r[e] != "string") return;
2657
+ let n = N(r[e]);
2658
+ if (!n) return "Invalid date.";
2659
+ let o = x();
2660
+ return n < ue(o, -1) || n > ue(o, 1) ? t : void 0;
2661
+ }
2662
+ }), Me = (e) => {
2663
+ let t = /^cov(\d+)to(\d+)$/.exec(e);
2664
+ if (t) return {
2665
+ perPerson: Number(t[1]),
2666
+ perOccurrence: Number(t[2])
2667
+ };
2668
+ let r = /^cov(\d+)CSL$/.exec(e);
2669
+ return r ? {
2670
+ perPerson: Number(r[1]),
2671
+ perOccurrence: Number(r[1])
2672
+ } : null;
2673
+ }, Ci = (e) => typeof e.ssn_display == "string" && e.ssn_display.trim() !== "", ht = (e) => _t(e.state) && !Ci(e), Mi = (e, t) => e.required || e.key === "social_security_number" && ht(t), Di = [
2674
+ {
2675
+ targetKey: "social_security_number",
2676
+ dependsOn: ["social_security_number", "state"],
2677
+ validate: (e) => {
2678
+ if (!("social_security_number" in e) || !ht(e)) return;
2679
+ let t = e.social_security_number;
2680
+ return (typeof t == "string" ? t.trim() : "") === "" ? "Social Security Number is required." : void 0;
2681
+ }
2682
+ },
2683
+ {
2684
+ targetKey: "date_of_birth",
2685
+ dependsOn: ["date_of_birth"],
2686
+ validate: (e) => {
2687
+ if (!e.date_of_birth || typeof e.date_of_birth != "string") return;
2688
+ let t = N(e.date_of_birth);
2689
+ return t ? t.getUTCFullYear() < 1900 ? "Date of birth year can't be earlier than 1900." : se(t, x()) < 18 ? "Applicant can't be under the age of 18." : void 0 : "Invalid date.";
2690
+ }
2691
+ },
2692
+ {
2693
+ targetKey: "co_applicant_date_of_birth",
2694
+ dependsOn: ["co_applicant_date_of_birth"],
2695
+ validate: (e) => {
2696
+ if (!e.co_applicant_date_of_birth || typeof e.co_applicant_date_of_birth != "string") return;
2697
+ let t = N(e.co_applicant_date_of_birth);
2698
+ return t ? t.getUTCFullYear() < 1900 ? "Date of birth year can't be earlier than 1900." : se(t, x()) < 16 ? "Co-applicant can't be under the age of 16." : void 0 : "Invalid date.";
2699
+ }
2700
+ },
2701
+ {
2702
+ targetKey: "year_roof_updated",
2703
+ dependsOn: ["year_roof_updated", "year_built"],
2704
+ validate: (e) => {
2705
+ let t = I(e.year_roof_updated);
2706
+ if (t != null) return t < (I(e.year_built) ?? 1e3) || t > pt ? "Roof renovation/replacement year must be between the home's build year and the current year." : void 0;
2707
+ }
2708
+ },
2709
+ {
2710
+ targetKey: "move_in_date",
2711
+ dependsOn: ["move_in_date", "year_built"],
2712
+ validate: (e) => {
2713
+ let t = N(e.move_in_date), r = I(e.year_built);
2714
+ if (!(!t || r == null)) return t.getUTCFullYear() < r ? "Purchase date cannot be prior to the year the building was originally constructed." : void 0;
2715
+ }
2716
+ },
2717
+ C("move_in_date", "Purchase date cannot be in the future."),
2718
+ C("date_first_licensed", "Date first licensed cannot be in the future."),
2719
+ {
2720
+ targetKey: "date_first_licensed",
2721
+ dependsOn: ["date_first_licensed", "date_of_birth"],
2722
+ validate: (e) => {
2723
+ let t = N(e.date_first_licensed), r = N(e.date_of_birth);
2724
+ if (!(!t || !r)) return t < r ? "Date licensed cannot be before driver date of birth." : t < ue(r, 16) ? "Driver must be at least 16 years old at the date first licensed." : void 0;
2725
+ }
2726
+ },
2727
+ C("occurred_at", "Incident date cannot be in the future."),
2728
+ C("accident_prevention_course_date", "Course date cannot be in the future."),
2729
+ C("date_of_incident", "Loss date cannot be in the future."),
2730
+ C("purchase_date", "Vehicle purchase date cannot be in the future."),
2731
+ {
2732
+ targetKey: "effective_date",
2733
+ dependsOn: ["effective_date"],
2734
+ validate: (e) => {
2735
+ if (!e.effective_date || typeof e.effective_date != "string") return;
2736
+ let t = N(e.effective_date);
2737
+ if (!t) return "Invalid date.";
2738
+ let r = x(), n = new Date(Date.UTC(r.getUTCFullYear(), r.getUTCMonth() + 3, r.getUTCDate()));
2739
+ if (t < r) return "Insurance start date cannot be in the past.";
2740
+ if (t > n) return "Insurance must begin within 3 months from today.";
2741
+ }
2742
+ },
2743
+ D("years_at_address", "Time at address cannot be greater than the applicant age."),
2744
+ D("years_at_prior_address", "Years at prior address cannot be greater than the applicant age."),
2745
+ {
2746
+ targetKey: "home_prior_years",
2747
+ dependsOn: ["home_prior_years", "home_continuous_coverage_years"],
2748
+ validate: (e) => {
2749
+ let t = I(e.home_prior_years), r = I(e.home_continuous_coverage_years);
2750
+ if (t != null && r != null) return t > r ? "Years with prior carrier cannot be higher than years with continuous coverage." : void 0;
2751
+ }
2752
+ },
2753
+ D("home_prior_years", "Years with prior carrier cannot be greater than the Applicant's age."),
2754
+ D("home_continuous_coverage_years", "Years with continuous home coverage cannot be greater than the Applicant's age."),
2755
+ je("home_prior_expiration_date", "Policy expiration date must be between 1 year ago and 1 year from now."),
2756
+ {
2757
+ targetKey: "purchase_date",
2758
+ dependsOn: ["purchase_date", "year"],
2759
+ validate: (e) => {
2760
+ let t = N(e.purchase_date), r = I(e.year);
2761
+ if (!(!t || r == null)) return t.getUTCFullYear() < r ? "The year the vehicle was purchased is not valid with the model year." : void 0;
2762
+ }
2763
+ },
2764
+ je("auto_prior_expiration_date", "Auto policy expiration date must be between 1 year ago and 1 year from now."),
2765
+ {
2766
+ targetKey: "auto_prior_years",
2767
+ dependsOn: ["auto_prior_years", "auto_continuous_coverage_years"],
2768
+ validate: (e) => {
2769
+ let t = I(e.auto_prior_years), r = I(e.auto_continuous_coverage_years);
2770
+ if (t != null && r != null) return t > r ? "Years with prior auto carrier cannot be higher than years with continuous coverage." : void 0;
2771
+ }
2772
+ },
2773
+ D("auto_prior_years", "Years with prior auto carrier cannot be greater than the Applicant's age."),
2774
+ D("auto_continuous_coverage_years", "Years with continuous auto coverage cannot be greater than the Applicant's age."),
2775
+ {
2776
+ targetKey: "vehicle_coll_deductible",
2777
+ dependsOn: ["vehicle_coll_deductible", "vehicle_comp_deductible"],
2778
+ validate: (e) => {
2779
+ let t = e.vehicle_coll_deductible, r = e.vehicle_comp_deductible;
2780
+ if (!(typeof t != "string" || !t || typeof r != "string" || !r)) return r === "NoCoverage" && t !== "NoCoverage" ? "Collision Coverage cannot be chosen if Comprehensive is No Coverage." : void 0;
2781
+ }
2782
+ },
2783
+ {
2784
+ targetKey: "policy_um",
2785
+ dependsOn: ["policy_um", "policy_bi"],
2786
+ validate: (e) => {
2787
+ let t = e.policy_um, r = e.policy_bi;
2788
+ if (typeof t != "string" || !t || typeof r != "string" || !r || t === "Reject" || r === "Dontknow") return;
2789
+ let n = (i) => i.endsWith("CSL");
2790
+ if (n(t) && !n(r)) return "A Combined Single Limit cannot be selected for Uninsured/Underinsured Motorist unless a Combined Single Limit has also been selected for Liability.";
2791
+ let o = Me(t), a = Me(r);
2792
+ if (!(!o || !a)) return o.perPerson > a.perPerson || o.perOccurrence > a.perOccurrence ? "Uninsured/Underinsured Motorist Limit value cannot be greater than Bodily Injury Limit value." : void 0;
2793
+ }
2794
+ },
2795
+ {
2796
+ targetKey: "policy_umpd",
2797
+ dependsOn: ["policy_umpd", "policy_pd"],
2798
+ validate: (e) => {
2799
+ let t = e.policy_umpd, r = e.policy_pd;
2800
+ if (typeof t != "string" || !t || typeof r != "string" || !r || t === "NoCoverage" || r === "Dontknow") return;
2801
+ let n = (i) => {
2802
+ if (!i.startsWith("cov")) return null;
2803
+ let s = Number.parseInt(i.replace("cov", ""), 10);
2804
+ return Number.isNaN(s) ? null : s;
2805
+ }, o = n(t), a = n(r);
2806
+ return o != null && a != null && o > a ? "Uninsured Motorist Property Damage Limit value cannot be greater than Liability Property Damage Limit value." : void 0;
2807
+ }
2808
+ },
2809
+ {
2810
+ targetKey: "custom_equipment_value_cents",
2811
+ dependsOn: ["custom_equipment_value_cents", "stated_value_amount_cents"],
2812
+ validate: (e) => {
2813
+ let t = I(e.custom_equipment_value_cents), r = I(e.stated_value_amount_cents);
2814
+ if (t != null && r != null) return r > 0 && t > 0 ? "Modifications should be included in the stated value of the vehicle. If a stated value quote is not required, remove the stated value." : void 0;
2815
+ }
2816
+ }
2817
+ ], Ui = (e, t) => {
2818
+ let r = {};
2819
+ for (let n of Di) {
2820
+ if (t?.has(n.targetKey)) continue;
2821
+ let o = n.validate(e);
2822
+ o && !r[n.targetKey] && (r[n.targetKey] = o);
2823
+ }
2824
+ return r;
2825
+ }, Le = (e, t) => t === "number" ? e == null || typeof e == "string" && e.trim() === "" : t === "checkbox" ? e !== !0 : e == null || typeof e == "string" && e.trim() === "", Li = (e, t) => {
2826
+ let r = {};
2827
+ e.forEach((i) => {
2828
+ let s = i.key, c = t[s];
2829
+ if (i.required && Le(c, i.inputType)) {
2830
+ r[s] = "Required";
2831
+ return;
2832
+ }
2833
+ if (!Le(c, i.inputType)) {
2834
+ let l = Ei(s, c);
2835
+ l && (r[s] = l);
2836
+ }
2837
+ });
2838
+ let n = { ...t };
2839
+ e.forEach((i) => {
2840
+ i.key in n || (n[i.key] = "");
2841
+ });
2842
+ let o = Ui(n, new Set(Object.keys(r))), a = new Set(e.map((i) => i.key));
2843
+ for (let [i, s] of Object.entries(o)) a.has(i) && (r[i] = s);
2844
+ return r;
2845
+ };
2846
+ export {
2847
+ Ci as C,
2848
+ Le as O,
2849
+ Mi as T,
2850
+ ji as f,
2851
+ Li as k
2852
+ };