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