@gengage/assistant-fe 0.4.4 → 0.4.6

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