@camstack/addon-export-hap 0.1.1

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