@oomol-lab/open-flow 0.1.0-beta.29 → 0.1.0-beta.30
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/browser/{createResourceDialog-C_8I3Fua.js → createResourceDialog-_y2xHaUA.js} +1 -1
- package/dist/browser/flow-authoring.js +60 -60
- package/dist/browser/flow-change-schema.d.ts +1 -0
- package/dist/browser/flow-change.d.ts +3 -2
- package/dist/browser/flow-change.js +943 -943
- package/dist/browser/{flowChanges-BBtkyUGd.js → flowChanges-AdN0Iqma.js} +1 -1
- package/dist/browser/{flowWorkspace-DNmBb3ZW.js → flowWorkspace-BrtzLKWB.js} +4 -4
- package/dist/browser/{inputValues-BbSVOWQP.js → inputValues-DJfFraxG.js} +1 -1
- package/dist/browser/workbench.js +4 -4
- package/dist/browser/{workbenchSelect-CQOvpteT.js → workbenchSelect-BDPIQxYK.js} +104 -104
- package/dist/common/control-api-conformance.js +73 -73
- package/dist/common/control-api.js +148 -148
- package/dist/common/control-requests.js +94 -94
- package/dist/common/flow-encoding.d.ts +2 -0
- package/dist/common/flow-encoding.js +1103 -947
- package/dist/common/flow-semantics.js +817 -757
- package/dist/common/mcp.js +257 -257
- package/dist/common/provider-triggers.js +1283 -1283
- package/dist/common/scheduler.js +566 -558
- package/package.json +1 -1
|
@@ -88,7 +88,7 @@ function te(e) {
|
|
|
88
88
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
89
89
|
}
|
|
90
90
|
var ne = /* @__PURE__*/ a(() => {
|
|
91
|
-
if (
|
|
91
|
+
if (E.jitless || typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
|
|
92
92
|
try {
|
|
93
93
|
return Function(""), !0;
|
|
94
94
|
} catch {
|
|
@@ -254,48 +254,48 @@ function me(e, t, n) {
|
|
|
254
254
|
return d(this, "shape", i), i;
|
|
255
255
|
} }));
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function y(e, t = 0) {
|
|
258
258
|
if (e.aborted === !0) return !0;
|
|
259
259
|
for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue !== !0) return !0;
|
|
260
260
|
return !1;
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function he(e, t = 0) {
|
|
263
263
|
if (e.aborted === !0) return !0;
|
|
264
264
|
for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue === !1) return !0;
|
|
265
265
|
return !1;
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function b(e, t) {
|
|
268
268
|
return t.map((t) => {
|
|
269
269
|
var n;
|
|
270
270
|
return (n = t).path ?? (n.path = []), t.path.unshift(e), t;
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function ge(e) {
|
|
274
274
|
return typeof e == "string" ? e : e?.message;
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function _e(e, t, n) {
|
|
277
277
|
var r;
|
|
278
278
|
for (let i = t; i < e.length; i++) (r = e[i]).schema ?? (r.schema = n);
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function x(e, t, n) {
|
|
281
281
|
var r;
|
|
282
282
|
let i = e.inst?._zod?.traits;
|
|
283
283
|
i?.has("$ZodType") && (i.has("$ZodCheck") ? (r = e).schema ?? (r.schema = e.inst) : e.schema = e.inst);
|
|
284
|
-
let a = e.schema === e.inst ? void 0 : e.schema?._zod.def?.error, o = e.message ? e.message :
|
|
284
|
+
let a = e.schema === e.inst ? void 0 : e.schema?._zod.def?.error, o = e.message ? e.message : ge(e.inst?._zod.def?.error?.(e)) ?? ge(a?.(e)) ?? ge(t?.error?.(e)) ?? ge(n.customError?.(e)) ?? ge(n.localeError?.(e)) ?? "Invalid input", { inst: s, schema: c, continue: l, input: u, ...d } = e;
|
|
285
285
|
return d.path ??= [], d.message = o, t?.reportInput && (d.input = u), d;
|
|
286
286
|
}
|
|
287
|
-
var
|
|
288
|
-
function
|
|
287
|
+
var ve = /[\uD800-\uDBFF]/;
|
|
288
|
+
function ye(e) {
|
|
289
289
|
let t = e.length;
|
|
290
|
-
if (!
|
|
290
|
+
if (!ve.test(e)) return t;
|
|
291
291
|
let n = t;
|
|
292
292
|
for (let r = 0; r < t - 1; r++) (e.charCodeAt(r) & 64512) == 55296 && (e.charCodeAt(r + 1) & 64512) == 56320 && (n--, r++);
|
|
293
293
|
return n;
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function be(e) {
|
|
296
296
|
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function xe(e) {
|
|
299
299
|
let t = typeof e;
|
|
300
300
|
switch (t) {
|
|
301
301
|
case "number": return Number.isNaN(e) ? "nan" : "number";
|
|
@@ -308,7 +308,7 @@ function Se(e) {
|
|
|
308
308
|
}
|
|
309
309
|
return t;
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function Se(...e) {
|
|
312
312
|
let [t, n, r] = e;
|
|
313
313
|
return typeof t == "string" ? {
|
|
314
314
|
message: t,
|
|
@@ -317,16 +317,16 @@ function Ce(...e) {
|
|
|
317
317
|
inst: r
|
|
318
318
|
} : { ...t };
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function Ce(e, t) {
|
|
321
321
|
for (let n in t) {
|
|
322
322
|
let r = Object.getOwnPropertyDescriptor(t, n);
|
|
323
323
|
r.get ? Object.defineProperty(e, n, {
|
|
324
324
|
...r,
|
|
325
325
|
enumerable: !1
|
|
326
|
-
}) :
|
|
326
|
+
}) : Te(e, n, r.value);
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function S(e, t, n, r = !0) {
|
|
330
330
|
return Object.defineProperty(e, t, {
|
|
331
331
|
configurable: !0,
|
|
332
332
|
writable: !0,
|
|
@@ -334,51 +334,51 @@ function x(e, t, n, r = !0) {
|
|
|
334
334
|
value: n
|
|
335
335
|
}), n;
|
|
336
336
|
}
|
|
337
|
-
function
|
|
338
|
-
return
|
|
337
|
+
function we(e, t, n) {
|
|
338
|
+
return S(e, t, n, !1);
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function Te(e, t, n) {
|
|
341
341
|
Object.defineProperty(e, t, {
|
|
342
342
|
configurable: !0,
|
|
343
343
|
get() {
|
|
344
|
-
return this == null ? n :
|
|
344
|
+
return this == null ? n : S(this, t, n.bind(this));
|
|
345
345
|
},
|
|
346
346
|
set(e) {
|
|
347
|
-
|
|
347
|
+
S(this, t, e);
|
|
348
348
|
}
|
|
349
349
|
});
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function Ee(e, t) {
|
|
352
352
|
let n = Object.getPrototypeOf(e);
|
|
353
353
|
return t in n ? void 0 : n;
|
|
354
354
|
}
|
|
355
|
-
var
|
|
355
|
+
var De, Oe = !1, ke = {
|
|
356
356
|
configurable: !0,
|
|
357
357
|
get() {
|
|
358
|
-
|
|
358
|
+
Oe = !0;
|
|
359
359
|
}
|
|
360
360
|
};
|
|
361
361
|
function C(e, t, n) {
|
|
362
362
|
let r = Object.getPrototypeOf(e._zod);
|
|
363
|
-
if (t in r &&
|
|
364
|
-
|
|
363
|
+
if (t in r && De !== e._zod) {
|
|
364
|
+
De = void 0;
|
|
365
365
|
return;
|
|
366
366
|
}
|
|
367
|
-
|
|
367
|
+
De = e._zod, Object.defineProperty(r, t, {
|
|
368
368
|
configurable: !0,
|
|
369
369
|
get() {
|
|
370
370
|
Object.defineProperty(this, t, ke);
|
|
371
|
-
let e =
|
|
372
|
-
|
|
371
|
+
let e = Oe;
|
|
372
|
+
Oe = !1;
|
|
373
373
|
try {
|
|
374
374
|
let r = n(this);
|
|
375
|
-
return
|
|
375
|
+
return Oe ? delete this[t] : Object.defineProperty(this, t, {
|
|
376
376
|
configurable: !0,
|
|
377
377
|
writable: !0,
|
|
378
378
|
value: r
|
|
379
|
-
}),
|
|
379
|
+
}), Oe ||= e, r;
|
|
380
380
|
} catch (n) {
|
|
381
|
-
throw delete this[t],
|
|
381
|
+
throw delete this[t], Oe ||= e, n;
|
|
382
382
|
}
|
|
383
383
|
},
|
|
384
384
|
set(e) {
|
|
@@ -391,7 +391,7 @@ function C(e, t, n) {
|
|
|
391
391
|
});
|
|
392
392
|
}
|
|
393
393
|
function Ae(e, t, n, r) {
|
|
394
|
-
let i =
|
|
394
|
+
let i = Ee(e, t);
|
|
395
395
|
i && Object.defineProperty(i, t, {
|
|
396
396
|
configurable: !0,
|
|
397
397
|
get() {
|
|
@@ -464,7 +464,7 @@ function w(e, t, n, r) {
|
|
|
464
464
|
let e = Object.getPrototypeOf(n), t = n._zod.constr.prototype, r = e;
|
|
465
465
|
for (; r && r !== t;) r = Object.getPrototypeOf(r);
|
|
466
466
|
let i = r ?? e;
|
|
467
|
-
s.has(i) || (s.add(i),
|
|
467
|
+
s.has(i) || (s.add(i), Ce(i, o));
|
|
468
468
|
}
|
|
469
469
|
let i = d.prototype;
|
|
470
470
|
for (let e in i) Object.prototype.hasOwnProperty.call(i, e) && (e in n || (n[e] = i[e].bind(n)));
|
|
@@ -485,44 +485,44 @@ function w(e, t, n, r) {
|
|
|
485
485
|
}
|
|
486
486
|
return Object.defineProperty(d, "init", { value: c }), Object.defineProperty(d, Symbol.hasInstance, { value: (t) => r?.Parent && t instanceof r.Parent ? !0 : t?._zod?.traits?.has(e) }), Object.defineProperty(d, "name", { value: e }), d;
|
|
487
487
|
}
|
|
488
|
-
var
|
|
488
|
+
var T = class extends Error {
|
|
489
489
|
constructor() {
|
|
490
490
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
491
491
|
}
|
|
492
|
-
},
|
|
492
|
+
}, Le = class extends Error {
|
|
493
493
|
constructor(e) {
|
|
494
494
|
super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
|
|
495
495
|
}
|
|
496
496
|
};
|
|
497
497
|
(Ne = globalThis).__zod_globalConfig ?? (Ne.__zod_globalConfig = {});
|
|
498
|
-
var
|
|
499
|
-
function
|
|
500
|
-
return e && Object.assign(
|
|
498
|
+
var E = globalThis.__zod_globalConfig;
|
|
499
|
+
function D(e) {
|
|
500
|
+
return e && Object.assign(E, e), E;
|
|
501
501
|
}
|
|
502
502
|
//#endregion
|
|
503
503
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/errors.js
|
|
504
|
-
function
|
|
504
|
+
function Re() {
|
|
505
505
|
let e = this._zod;
|
|
506
506
|
return e.message ??= JSON.stringify(e.def, i, 2), e.message;
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function ze(e) {
|
|
509
509
|
this._zod.message = e;
|
|
510
510
|
}
|
|
511
|
-
var
|
|
512
|
-
get:
|
|
513
|
-
set:
|
|
511
|
+
var Be = {
|
|
512
|
+
get: Re,
|
|
513
|
+
set: ze,
|
|
514
514
|
enumerable: !0,
|
|
515
515
|
configurable: !0
|
|
516
|
-
},
|
|
516
|
+
}, Ve = {
|
|
517
517
|
value: void 0,
|
|
518
518
|
enumerable: !1
|
|
519
|
-
},
|
|
519
|
+
}, He = {
|
|
520
520
|
value: void 0,
|
|
521
521
|
enumerable: !1
|
|
522
|
-
},
|
|
523
|
-
e.name = "$ZodError",
|
|
522
|
+
}, Ue = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]), We = (e, t) => {
|
|
523
|
+
e.name = "$ZodError", Ve.value = e._zod, Object.defineProperty(e, "_zod", Ve), He.value = t, Object.defineProperty(e, "issues", He), Ve.value = void 0, He.value = void 0, Object.defineProperty(e, "message", Be);
|
|
524
524
|
let n = Object.getPrototypeOf(e);
|
|
525
|
-
|
|
525
|
+
Ue.has(n) || (Ue.add(n), Object.defineProperty(n, "toString", {
|
|
526
526
|
configurable: !0,
|
|
527
527
|
enumerable: !1,
|
|
528
528
|
get() {
|
|
@@ -541,8 +541,8 @@ var Ve = {
|
|
|
541
541
|
});
|
|
542
542
|
}
|
|
543
543
|
}));
|
|
544
|
-
},
|
|
545
|
-
function
|
|
544
|
+
}, Ge = w("$ZodError", We), Ke = w("$ZodError", We, void 0, { Parent: Error });
|
|
545
|
+
function qe(e, t, n) {
|
|
546
546
|
return Object.prototype.hasOwnProperty.call(e, t) || (t === "__proto__" ? Object.defineProperty(e, t, {
|
|
547
547
|
value: n(),
|
|
548
548
|
writable: !0,
|
|
@@ -550,15 +550,15 @@ function Je(e, t, n) {
|
|
|
550
550
|
configurable: !0
|
|
551
551
|
}) : e[t] = n()), e[t];
|
|
552
552
|
}
|
|
553
|
-
function
|
|
553
|
+
function Je(e, t = (e) => e.message) {
|
|
554
554
|
let n = {}, r = [];
|
|
555
|
-
for (let i of e.issues) i.path.length > 0 ?
|
|
555
|
+
for (let i of e.issues) i.path.length > 0 ? qe(n, i.path[0], () => []).push(t(i)) : r.push(t(i));
|
|
556
556
|
return {
|
|
557
557
|
formErrors: r,
|
|
558
558
|
fieldErrors: n
|
|
559
559
|
};
|
|
560
560
|
}
|
|
561
|
-
function
|
|
561
|
+
function Ye(e, t = (e) => e.message) {
|
|
562
562
|
let n = { _errors: [] }, r = (e, i = []) => {
|
|
563
563
|
for (let a of e.issues) if (a.code === "invalid_union" && a.errors.length) a.errors.map((e) => r({ issues: e }, [...i, ...a.path]));
|
|
564
564
|
else if (a.code === "invalid_key") r({ issues: a.issues }, [...i, ...a.path]);
|
|
@@ -590,13 +590,13 @@ function Xe(e, t = (e) => e.message) {
|
|
|
590
590
|
}
|
|
591
591
|
//#endregion
|
|
592
592
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/parse.js
|
|
593
|
-
function
|
|
593
|
+
function Xe(e, t) {
|
|
594
594
|
return {
|
|
595
595
|
callee: t?.callee ?? e,
|
|
596
596
|
Err: t?.Err
|
|
597
597
|
};
|
|
598
598
|
}
|
|
599
|
-
var
|
|
599
|
+
var Ze = (e) => {
|
|
600
600
|
let t = (n, r, i, a) => {
|
|
601
601
|
let o = i ? {
|
|
602
602
|
...i,
|
|
@@ -605,15 +605,15 @@ var Qe = (e) => {
|
|
|
605
605
|
value: r,
|
|
606
606
|
issues: []
|
|
607
607
|
}, o);
|
|
608
|
-
if (s instanceof Promise) throw new
|
|
608
|
+
if (s instanceof Promise) throw new T();
|
|
609
609
|
if (s.issues.length) {
|
|
610
|
-
let n = new ((a?.Err) ?? e)(s.issues.map((e) =>
|
|
610
|
+
let n = new ((a?.Err) ?? e)(s.issues.map((e) => x(e, o, D())));
|
|
611
611
|
throw ee(n, a?.callee ?? t), n;
|
|
612
612
|
}
|
|
613
613
|
return s.value;
|
|
614
614
|
};
|
|
615
615
|
return t;
|
|
616
|
-
},
|
|
616
|
+
}, Qe = (e) => {
|
|
617
617
|
let t = async (n, r, i, a) => {
|
|
618
618
|
let o = i ? {
|
|
619
619
|
...i,
|
|
@@ -623,13 +623,13 @@ var Qe = (e) => {
|
|
|
623
623
|
issues: []
|
|
624
624
|
}, o);
|
|
625
625
|
if (s instanceof Promise && (s = await s), s.issues.length) {
|
|
626
|
-
let n = new ((a?.Err) ?? e)(s.issues.map((e) =>
|
|
626
|
+
let n = new ((a?.Err) ?? e)(s.issues.map((e) => x(e, o, D())));
|
|
627
627
|
throw ee(n, a?.callee ?? t), n;
|
|
628
628
|
}
|
|
629
629
|
return s.value;
|
|
630
630
|
};
|
|
631
631
|
return t;
|
|
632
|
-
},
|
|
632
|
+
}, $e = (e) => (t, n, r) => {
|
|
633
633
|
let i = r ? {
|
|
634
634
|
...r,
|
|
635
635
|
async: !1
|
|
@@ -637,15 +637,15 @@ var Qe = (e) => {
|
|
|
637
637
|
value: n,
|
|
638
638
|
issues: []
|
|
639
639
|
}, i);
|
|
640
|
-
if (a instanceof Promise) throw new
|
|
640
|
+
if (a instanceof Promise) throw new T();
|
|
641
641
|
return a.issues.length ? {
|
|
642
642
|
success: !1,
|
|
643
|
-
error: new (e ??
|
|
643
|
+
error: new (e ?? Ge)(a.issues.map((e) => x(e, i, D())))
|
|
644
644
|
} : {
|
|
645
645
|
success: !0,
|
|
646
646
|
data: a.value
|
|
647
647
|
};
|
|
648
|
-
},
|
|
648
|
+
}, et = /* @__PURE__*/ $e(Ke), tt = (e) => async (t, n, r) => {
|
|
649
649
|
let i = r ? {
|
|
650
650
|
...r,
|
|
651
651
|
async: !0
|
|
@@ -655,98 +655,98 @@ var Qe = (e) => {
|
|
|
655
655
|
}, i);
|
|
656
656
|
return a instanceof Promise && (a = await a), a.issues.length ? {
|
|
657
657
|
success: !1,
|
|
658
|
-
error: new e(a.issues.map((e) =>
|
|
658
|
+
error: new e(a.issues.map((e) => x(e, i, D())))
|
|
659
659
|
} : {
|
|
660
660
|
success: !0,
|
|
661
661
|
data: a.value
|
|
662
662
|
};
|
|
663
|
-
},
|
|
664
|
-
let t =
|
|
663
|
+
}, nt = /* @__PURE__*/ tt(Ke), rt = (e) => {
|
|
664
|
+
let t = Ze(e), n = (e, r, i, a) => {
|
|
665
665
|
let o = i ? {
|
|
666
666
|
...i,
|
|
667
667
|
direction: "backward"
|
|
668
668
|
} : { direction: "backward" };
|
|
669
|
-
return t(e, r, o,
|
|
669
|
+
return t(e, r, o, Xe(n, a));
|
|
670
670
|
};
|
|
671
671
|
return n;
|
|
672
|
-
},
|
|
673
|
-
let t =
|
|
672
|
+
}, it = (e) => {
|
|
673
|
+
let t = Ze(e), n = (e, r, i, a) => t(e, r, i, Xe(n, a));
|
|
674
674
|
return n;
|
|
675
|
-
},
|
|
676
|
-
let t =
|
|
675
|
+
}, at = (e) => {
|
|
676
|
+
let t = Qe(e), n = async (e, r, i, a) => {
|
|
677
677
|
let o = i ? {
|
|
678
678
|
...i,
|
|
679
679
|
direction: "backward"
|
|
680
680
|
} : { direction: "backward" };
|
|
681
|
-
return await t(e, r, o,
|
|
681
|
+
return await t(e, r, o, Xe(n, a));
|
|
682
682
|
};
|
|
683
683
|
return n;
|
|
684
|
-
},
|
|
685
|
-
let t =
|
|
684
|
+
}, ot = (e) => {
|
|
685
|
+
let t = Qe(e), n = async (e, r, i, a) => await t(e, r, i, Xe(n, a));
|
|
686
686
|
return n;
|
|
687
|
-
},
|
|
687
|
+
}, st = (e) => (t, n, r) => {
|
|
688
688
|
let i = r ? {
|
|
689
689
|
...r,
|
|
690
690
|
direction: "backward"
|
|
691
691
|
} : { direction: "backward" };
|
|
692
|
-
return
|
|
693
|
-
},
|
|
692
|
+
return $e(e)(t, n, i);
|
|
693
|
+
}, ct = (e) => (t, n, r) => $e(e)(t, n, r), lt = (e) => async (t, n, r) => {
|
|
694
694
|
let i = r ? {
|
|
695
695
|
...r,
|
|
696
696
|
direction: "backward"
|
|
697
697
|
} : { direction: "backward" };
|
|
698
|
-
return
|
|
699
|
-
},
|
|
700
|
-
function
|
|
698
|
+
return tt(e)(t, n, i);
|
|
699
|
+
}, ut = (e) => async (t, n, r) => tt(e)(t, n, r), dt = /^[cC][0-9a-z]{6,}$/, ft = /^[0-9a-z]+$/, pt = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/, mt = /^[0-9a-vA-V]{20}$/, ht = /^[A-Za-z0-9]{27}$/, gt = /^[a-zA-Z0-9_-]{21}$/;
|
|
700
|
+
function _t(e) {
|
|
701
701
|
return RegExp(`^[a-zA-Z0-9_-]{${e}}$`);
|
|
702
702
|
}
|
|
703
|
-
var
|
|
704
|
-
function
|
|
705
|
-
return new RegExp(
|
|
703
|
+
var vt = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, yt = /^([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})$/, bt = (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)$/, xt = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, St = "^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";
|
|
704
|
+
function Ct() {
|
|
705
|
+
return new RegExp(St, "u");
|
|
706
706
|
}
|
|
707
|
-
var
|
|
708
|
-
function
|
|
707
|
+
var wt = /^(?:(?: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])$/, Tt = /^(([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}|:))$/, Et = /^((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])$/, 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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Ot = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, kt = /^[A-Za-z0-9_-]*$/, At = /^https?$/, jt = /^\+[1-9]\d{6,14}$/, Mt = "(?:(?:\\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])))";
|
|
708
|
+
function Nt(e) {
|
|
709
709
|
return RegExp(`^${e}$`);
|
|
710
710
|
}
|
|
711
|
-
var
|
|
712
|
-
function
|
|
711
|
+
var Pt = /*@__PURE__*/ Nt(Mt);
|
|
712
|
+
function Ft(e) {
|
|
713
713
|
let t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
714
714
|
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : e.seconds ? `${t}:[0-5]\\d(?:\\.\\d+)?` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
715
715
|
}
|
|
716
|
-
function
|
|
717
|
-
return RegExp(`^${
|
|
716
|
+
function It(e) {
|
|
717
|
+
return RegExp(`^${Ft(e)}$`);
|
|
718
718
|
}
|
|
719
|
-
function
|
|
719
|
+
function Lt(e) {
|
|
720
720
|
let t = ["Z"];
|
|
721
721
|
e.offset && t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
722
|
-
let n = `${
|
|
722
|
+
let n = `${Ft({
|
|
723
723
|
precision: e.precision,
|
|
724
724
|
seconds: !0
|
|
725
|
-
})}(?:${t.join("|")})`, r = e.local ? `${n}|${
|
|
726
|
-
return RegExp(`^${
|
|
725
|
+
})}(?:${t.join("|")})`, r = e.local ? `${n}|${Ft({ precision: e.precision })}` : n;
|
|
726
|
+
return RegExp(`^${Mt}T(?:${r})$`);
|
|
727
727
|
}
|
|
728
|
-
var
|
|
728
|
+
var Rt = (e) => {
|
|
729
729
|
let t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
730
730
|
return RegExp(`^${t}$`);
|
|
731
|
-
},
|
|
731
|
+
}, zt = /^-?\d+$/, Bt = /^-?\d+(?:\.\d+)?$/, Vt = /^(?:true|false)$/i, Ht = /^null$/i, Ut = /^[^A-Z]*$/, Wt = /^[^a-z]*$/, O = /*@__PURE__*/ w("$ZodCheck", (e, t) => {
|
|
732
732
|
var n;
|
|
733
733
|
e._zod ??= {}, e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
734
|
-
}),
|
|
734
|
+
}), Gt = (e) => {
|
|
735
735
|
let t = e.value;
|
|
736
736
|
return !o(t) && t.length !== void 0;
|
|
737
|
-
},
|
|
737
|
+
}, Kt = {
|
|
738
738
|
number: "number",
|
|
739
739
|
bigint: "bigint",
|
|
740
740
|
object: "date"
|
|
741
|
-
},
|
|
742
|
-
|
|
743
|
-
let n =
|
|
741
|
+
}, qt = /*@__PURE__*/ w("$ZodCheckLessThan", (e, t) => {
|
|
742
|
+
O.init(e, t);
|
|
743
|
+
let n = Kt[typeof t.value];
|
|
744
744
|
e._zod.onattach.push((e) => {
|
|
745
745
|
let n = e._zod.bag, r = (t.inclusive ? n.maximum : n.exclusiveMaximum) ?? Infinity;
|
|
746
746
|
t.value < r && (t.inclusive ? n.maximum = t.value : n.exclusiveMaximum = t.value);
|
|
747
747
|
}), e._zod.check = (r) => {
|
|
748
748
|
(t.inclusive ? r.value <= t.value : r.value < t.value) || r.issues.push({
|
|
749
|
-
origin:
|
|
749
|
+
origin: Kt[typeof r.value] ?? n,
|
|
750
750
|
code: "too_big",
|
|
751
751
|
maximum: typeof t.value == "object" ? t.value.getTime() : t.value,
|
|
752
752
|
input: r.value,
|
|
@@ -755,15 +755,15 @@ var zt = (e) => {
|
|
|
755
755
|
continue: !t.abort
|
|
756
756
|
});
|
|
757
757
|
};
|
|
758
|
-
}),
|
|
759
|
-
|
|
760
|
-
let n =
|
|
758
|
+
}), Jt = /*@__PURE__*/ w("$ZodCheckGreaterThan", (e, t) => {
|
|
759
|
+
O.init(e, t);
|
|
760
|
+
let n = Kt[typeof t.value];
|
|
761
761
|
e._zod.onattach.push((e) => {
|
|
762
762
|
let n = e._zod.bag, r = (t.inclusive ? n.minimum : n.exclusiveMinimum) ?? -Infinity;
|
|
763
763
|
t.value > r && (t.inclusive ? n.minimum = t.value : n.exclusiveMinimum = t.value);
|
|
764
764
|
}), e._zod.check = (r) => {
|
|
765
765
|
(t.inclusive ? r.value >= t.value : r.value > t.value) || r.issues.push({
|
|
766
|
-
origin:
|
|
766
|
+
origin: Kt[typeof r.value] ?? n,
|
|
767
767
|
code: "too_small",
|
|
768
768
|
minimum: typeof t.value == "object" ? t.value.getTime() : t.value,
|
|
769
769
|
input: r.value,
|
|
@@ -772,8 +772,8 @@ var zt = (e) => {
|
|
|
772
772
|
continue: !t.abort
|
|
773
773
|
});
|
|
774
774
|
};
|
|
775
|
-
}),
|
|
776
|
-
|
|
775
|
+
}), Yt = /*@__PURE__*/ w("$ZodCheckMultipleOf", (e, t) => {
|
|
776
|
+
O.init(e, t), e._zod.onattach.push((e) => {
|
|
777
777
|
var n;
|
|
778
778
|
(n = e._zod.bag).multipleOf ?? (n.multipleOf = t.value);
|
|
779
779
|
}), e._zod.check = (n) => {
|
|
@@ -787,12 +787,12 @@ var zt = (e) => {
|
|
|
787
787
|
continue: !t.abort
|
|
788
788
|
});
|
|
789
789
|
};
|
|
790
|
-
}),
|
|
791
|
-
|
|
790
|
+
}), Xt = /*@__PURE__*/ w("$ZodCheckNumberFormat", (e, t) => {
|
|
791
|
+
O.init(e, t), t.format = t.format || "float64";
|
|
792
792
|
let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] = se[t.format];
|
|
793
793
|
e._zod.onattach.push((e) => {
|
|
794
794
|
let r = e._zod.bag;
|
|
795
|
-
r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern =
|
|
795
|
+
r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern = zt);
|
|
796
796
|
}), e._zod.check = (o) => {
|
|
797
797
|
let s = o.value;
|
|
798
798
|
if (n) {
|
|
@@ -848,15 +848,15 @@ var zt = (e) => {
|
|
|
848
848
|
continue: !t.abort
|
|
849
849
|
});
|
|
850
850
|
};
|
|
851
|
-
}),
|
|
851
|
+
}), Zt = /*@__PURE__*/ w("$ZodCheckMaxLength", (e, t) => {
|
|
852
852
|
var n;
|
|
853
|
-
|
|
853
|
+
O.init(e, t), (n = e._zod.def).when ?? (n.when = Gt), e._zod.onattach.push((e) => {
|
|
854
854
|
let n = e._zod.bag.maximum ?? Infinity;
|
|
855
855
|
t.maximum < n && (e._zod.bag.maximum = t.maximum);
|
|
856
856
|
}), e._zod.check = (n) => {
|
|
857
857
|
let r = n.value, i = r.length;
|
|
858
|
-
if ((typeof r == "string" && i > t.maximum ?
|
|
859
|
-
let a =
|
|
858
|
+
if ((typeof r == "string" && i > t.maximum ? ye(r) : i) <= t.maximum) return;
|
|
859
|
+
let a = be(r);
|
|
860
860
|
n.issues.push({
|
|
861
861
|
origin: a,
|
|
862
862
|
code: "too_big",
|
|
@@ -867,15 +867,15 @@ var zt = (e) => {
|
|
|
867
867
|
continue: !t.abort
|
|
868
868
|
});
|
|
869
869
|
};
|
|
870
|
-
}),
|
|
870
|
+
}), Qt = /*@__PURE__*/ w("$ZodCheckMinLength", (e, t) => {
|
|
871
871
|
var n;
|
|
872
|
-
|
|
872
|
+
O.init(e, t), (n = e._zod.def).when ?? (n.when = Gt), e._zod.onattach.push((e) => {
|
|
873
873
|
let n = e._zod.bag.minimum ?? -Infinity;
|
|
874
874
|
t.minimum > n && (e._zod.bag.minimum = t.minimum);
|
|
875
875
|
}), e._zod.check = (n) => {
|
|
876
876
|
let r = n.value, i = r.length;
|
|
877
|
-
if ((typeof r == "string" && i >= t.minimum && i < t.minimum * 2 ?
|
|
878
|
-
let a =
|
|
877
|
+
if ((typeof r == "string" && i >= t.minimum && i < t.minimum * 2 ? ye(r) : i) >= t.minimum) return;
|
|
878
|
+
let a = be(r);
|
|
879
879
|
n.issues.push({
|
|
880
880
|
origin: a,
|
|
881
881
|
code: "too_small",
|
|
@@ -886,15 +886,15 @@ var zt = (e) => {
|
|
|
886
886
|
continue: !t.abort
|
|
887
887
|
});
|
|
888
888
|
};
|
|
889
|
-
}),
|
|
889
|
+
}), $t = /*@__PURE__*/ w("$ZodCheckLengthEquals", (e, t) => {
|
|
890
890
|
var n;
|
|
891
|
-
|
|
891
|
+
O.init(e, t), (n = e._zod.def).when ?? (n.when = Gt), e._zod.onattach.push((e) => {
|
|
892
892
|
let n = e._zod.bag;
|
|
893
893
|
n.minimum = t.length, n.maximum = t.length, n.length = t.length;
|
|
894
894
|
}), e._zod.check = (n) => {
|
|
895
|
-
let r = n.value, i = r.length, a = typeof r == "string" && i >= t.length && i <= t.length * 2 ?
|
|
895
|
+
let r = n.value, i = r.length, a = typeof r == "string" && i >= t.length && i <= t.length * 2 ? ye(r) : i;
|
|
896
896
|
if (a === t.length) return;
|
|
897
|
-
let o =
|
|
897
|
+
let o = be(r), s = a > t.length;
|
|
898
898
|
n.issues.push({
|
|
899
899
|
origin: o,
|
|
900
900
|
...s ? {
|
|
@@ -911,9 +911,9 @@ var zt = (e) => {
|
|
|
911
911
|
continue: !t.abort
|
|
912
912
|
});
|
|
913
913
|
};
|
|
914
|
-
}),
|
|
914
|
+
}), en = /*@__PURE__*/ w("$ZodCheckStringFormat", (e, t) => {
|
|
915
915
|
var n, r;
|
|
916
|
-
|
|
916
|
+
O.init(e, t), e._zod.onattach.push((e) => {
|
|
917
917
|
let n = e._zod.bag;
|
|
918
918
|
n.format = t.format, t.pattern && (n.patterns ??= /* @__PURE__ */ new Set(), n.patterns.add(t.pattern));
|
|
919
919
|
}), t.pattern ? (n = e._zod).check ?? (n.check = (n) => {
|
|
@@ -927,8 +927,8 @@ var zt = (e) => {
|
|
|
927
927
|
continue: !t.abort
|
|
928
928
|
});
|
|
929
929
|
}) : (r = e._zod).check ?? (r.check = () => {});
|
|
930
|
-
}),
|
|
931
|
-
|
|
930
|
+
}), tn = /*@__PURE__*/ w("$ZodCheckRegex", (e, t) => {
|
|
931
|
+
en.init(e, t), e._zod.check = (n) => {
|
|
932
932
|
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
933
933
|
origin: "string",
|
|
934
934
|
code: "invalid_format",
|
|
@@ -939,12 +939,12 @@ var zt = (e) => {
|
|
|
939
939
|
continue: !t.abort
|
|
940
940
|
});
|
|
941
941
|
};
|
|
942
|
-
}),
|
|
943
|
-
t.pattern ??=
|
|
944
|
-
}),
|
|
945
|
-
t.pattern ??=
|
|
946
|
-
}),
|
|
947
|
-
|
|
942
|
+
}), nn = /*@__PURE__*/ w("$ZodCheckLowerCase", (e, t) => {
|
|
943
|
+
t.pattern ??= Ut, en.init(e, t);
|
|
944
|
+
}), rn = /*@__PURE__*/ w("$ZodCheckUpperCase", (e, t) => {
|
|
945
|
+
t.pattern ??= Wt, en.init(e, t);
|
|
946
|
+
}), an = /*@__PURE__*/ w("$ZodCheckIncludes", (e, t) => {
|
|
947
|
+
O.init(e, t);
|
|
948
948
|
let n = g(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position},}${n}` : n);
|
|
949
949
|
t.pattern = r, e._zod.onattach.push((e) => {
|
|
950
950
|
let t = e._zod.bag;
|
|
@@ -960,8 +960,8 @@ var zt = (e) => {
|
|
|
960
960
|
continue: !t.abort
|
|
961
961
|
});
|
|
962
962
|
};
|
|
963
|
-
}),
|
|
964
|
-
|
|
963
|
+
}), on = /*@__PURE__*/ w("$ZodCheckStartsWith", (e, t) => {
|
|
964
|
+
O.init(e, t);
|
|
965
965
|
let n = RegExp(`^${g(t.prefix)}.*`);
|
|
966
966
|
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
967
967
|
let t = e._zod.bag;
|
|
@@ -977,8 +977,8 @@ var zt = (e) => {
|
|
|
977
977
|
continue: !t.abort
|
|
978
978
|
});
|
|
979
979
|
};
|
|
980
|
-
}),
|
|
981
|
-
|
|
980
|
+
}), sn = /*@__PURE__*/ w("$ZodCheckEndsWith", (e, t) => {
|
|
981
|
+
O.init(e, t);
|
|
982
982
|
let n = RegExp(`.*${g(t.suffix)}$`);
|
|
983
983
|
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
984
984
|
let t = e._zod.bag;
|
|
@@ -994,11 +994,11 @@ var zt = (e) => {
|
|
|
994
994
|
continue: !t.abort
|
|
995
995
|
});
|
|
996
996
|
};
|
|
997
|
-
}),
|
|
998
|
-
|
|
997
|
+
}), cn = /*@__PURE__*/ w("$ZodCheckOverwrite", (e, t) => {
|
|
998
|
+
O.init(e, t), e._zod.check = (e) => {
|
|
999
999
|
e.value = t.tx(e.value);
|
|
1000
1000
|
};
|
|
1001
|
-
}),
|
|
1001
|
+
}), ln = class {
|
|
1002
1002
|
constructor(e = [], t = {}) {
|
|
1003
1003
|
this.content = [], this.indent = 0, this.args = e, this.closed = t;
|
|
1004
1004
|
}
|
|
@@ -1017,13 +1017,13 @@ var zt = (e) => {
|
|
|
1017
1017
|
let e = Function, t = this?.content ?? [""];
|
|
1018
1018
|
return new e(...Object.keys(this.closed), `return function (${this.args.join(", ")}) {\n${t.join("\n")}\n};`)(...Object.values(this.closed));
|
|
1019
1019
|
}
|
|
1020
|
-
},
|
|
1020
|
+
}, un = {
|
|
1021
1021
|
major: 4,
|
|
1022
1022
|
minor: 5,
|
|
1023
1023
|
patch: 4
|
|
1024
|
-
},
|
|
1024
|
+
}, k = /*@__PURE__*/ w("$ZodType", (e, t) => {
|
|
1025
1025
|
var n;
|
|
1026
|
-
e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version =
|
|
1026
|
+
e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = un;
|
|
1027
1027
|
let r = e._zod.def.checks, i = e._zod.traits.has("$ZodCheck") ? [e, ...r ?? []] : r?.length ? [...r] : [];
|
|
1028
1028
|
for (let t of i) for (let n of t._zod.onattach) n(e);
|
|
1029
1029
|
if (i.length === 0) (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
|
|
@@ -1032,27 +1032,27 @@ var zt = (e) => {
|
|
|
1032
1032
|
else {
|
|
1033
1033
|
let t = (t, n, r) => {
|
|
1034
1034
|
if (t.memo) return t;
|
|
1035
|
-
let i =
|
|
1035
|
+
let i = y(t), a;
|
|
1036
1036
|
for (let o of n) {
|
|
1037
1037
|
if (o._zod.def.when) {
|
|
1038
|
-
if (
|
|
1038
|
+
if (he(t) || !o._zod.def.when(t)) continue;
|
|
1039
1039
|
} else if (i) continue;
|
|
1040
1040
|
let n = t.issues.length, s = o._zod.check(t);
|
|
1041
|
-
if (s instanceof Promise && r?.async === !1) throw new
|
|
1041
|
+
if (s instanceof Promise && r?.async === !1) throw new T();
|
|
1042
1042
|
if (a || s instanceof Promise) a = (a ?? Promise.resolve()).then(async () => {
|
|
1043
|
-
await s, t.issues.length !== n && (
|
|
1043
|
+
await s, t.issues.length !== n && (_e(t.issues, n, e), i ||= y(t, n));
|
|
1044
1044
|
});
|
|
1045
1045
|
else {
|
|
1046
1046
|
if (t.issues.length === n) continue;
|
|
1047
|
-
|
|
1047
|
+
_e(t.issues, n, e), i ||= y(t, n);
|
|
1048
1048
|
}
|
|
1049
1049
|
}
|
|
1050
1050
|
return a ? a.then(() => t) : t;
|
|
1051
1051
|
}, n = (n, r, a) => {
|
|
1052
|
-
if (
|
|
1052
|
+
if (y(n)) return n.aborted = !0, n;
|
|
1053
1053
|
let o = t(r, i, a);
|
|
1054
1054
|
if (o instanceof Promise) {
|
|
1055
|
-
if (a.async === !1) throw new
|
|
1055
|
+
if (a.async === !1) throw new T();
|
|
1056
1056
|
return o.then((t) => e._zod.parse(t, a));
|
|
1057
1057
|
}
|
|
1058
1058
|
return e._zod.parse(o, a);
|
|
@@ -1071,7 +1071,7 @@ var zt = (e) => {
|
|
|
1071
1071
|
}
|
|
1072
1072
|
let o = e._zod.parse(r, a);
|
|
1073
1073
|
if (o instanceof Promise) {
|
|
1074
|
-
if (a.async === !1) throw new
|
|
1074
|
+
if (a.async === !1) throw new T();
|
|
1075
1075
|
return o.then((e) => t(e, i, a));
|
|
1076
1076
|
}
|
|
1077
1077
|
return t(o, i, a);
|
|
@@ -1079,27 +1079,27 @@ var zt = (e) => {
|
|
|
1079
1079
|
}
|
|
1080
1080
|
}, {
|
|
1081
1081
|
get "~standard"() {
|
|
1082
|
-
return
|
|
1082
|
+
return we(this, "~standard", fn(this));
|
|
1083
1083
|
},
|
|
1084
1084
|
set "~standard"(e) {
|
|
1085
|
-
|
|
1085
|
+
S(this, "~standard", e);
|
|
1086
1086
|
}
|
|
1087
|
-
}),
|
|
1088
|
-
function
|
|
1087
|
+
}), dn = (e) => e.success ? { value: e.data } : { issues: e.error?.issues };
|
|
1088
|
+
function fn(e) {
|
|
1089
1089
|
return {
|
|
1090
1090
|
validate: (t) => {
|
|
1091
1091
|
try {
|
|
1092
|
-
return
|
|
1092
|
+
return dn(et(e, t));
|
|
1093
1093
|
} catch {
|
|
1094
|
-
return
|
|
1094
|
+
return nt(e, t).then(dn);
|
|
1095
1095
|
}
|
|
1096
1096
|
},
|
|
1097
1097
|
vendor: "zod",
|
|
1098
1098
|
version: 1
|
|
1099
1099
|
};
|
|
1100
1100
|
}
|
|
1101
|
-
var
|
|
1102
|
-
|
|
1101
|
+
var pn = /*@__PURE__*/ w("$ZodString", (e, t) => {
|
|
1102
|
+
k.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Rt(e._zod.bag), e._zod.parse = (n, r) => {
|
|
1103
1103
|
if (t.coerce) try {
|
|
1104
1104
|
n.value = String(n.value);
|
|
1105
1105
|
} catch {}
|
|
@@ -1110,11 +1110,11 @@ var mn = /*@__PURE__*/ w("$ZodString", (e, t) => {
|
|
|
1110
1110
|
inst: e
|
|
1111
1111
|
}), n;
|
|
1112
1112
|
};
|
|
1113
|
-
}),
|
|
1114
|
-
|
|
1115
|
-
}),
|
|
1116
|
-
t.pattern ??=
|
|
1117
|
-
}),
|
|
1113
|
+
}), A = /*@__PURE__*/ w("$ZodStringFormat", (e, t) => {
|
|
1114
|
+
en.init(e, t), pn.init(e, t);
|
|
1115
|
+
}), mn = /*@__PURE__*/ w("$ZodGUID", (e, t) => {
|
|
1116
|
+
t.pattern ??= yt, A.init(e, t);
|
|
1117
|
+
}), hn = /*@__PURE__*/ w("$ZodUUID", (e, t) => {
|
|
1118
1118
|
if (t.version) {
|
|
1119
1119
|
let e = {
|
|
1120
1120
|
v1: 1,
|
|
@@ -1127,34 +1127,34 @@ var mn = /*@__PURE__*/ w("$ZodString", (e, t) => {
|
|
|
1127
1127
|
v8: 8
|
|
1128
1128
|
}[t.version];
|
|
1129
1129
|
if (e === void 0) throw Error(`Invalid UUID version: "${t.version}"`);
|
|
1130
|
-
t.pattern ??=
|
|
1131
|
-
} else t.pattern ??=
|
|
1132
|
-
|
|
1133
|
-
}),
|
|
1134
|
-
t.pattern ??=
|
|
1130
|
+
t.pattern ??= bt(e);
|
|
1131
|
+
} else t.pattern ??= bt();
|
|
1132
|
+
A.init(e, t);
|
|
1133
|
+
}), gn = /*@__PURE__*/ w("$ZodEmail", (e, t) => {
|
|
1134
|
+
t.pattern ??= xt, A.init(e, t);
|
|
1135
1135
|
});
|
|
1136
|
-
function
|
|
1137
|
-
if (!t.normalize && t.protocol?.source ===
|
|
1136
|
+
function _n(e, t) {
|
|
1137
|
+
if (!t.normalize && t.protocol?.source === At.source && !/^https?:\/\//i.test(e)) return 1;
|
|
1138
1138
|
try {
|
|
1139
1139
|
return new URL(e);
|
|
1140
1140
|
} catch {
|
|
1141
1141
|
return 2;
|
|
1142
1142
|
}
|
|
1143
1143
|
}
|
|
1144
|
-
var
|
|
1145
|
-
function
|
|
1146
|
-
return e.replace(
|
|
1144
|
+
var vn = /[\t\n\r]/g;
|
|
1145
|
+
function yn(e) {
|
|
1146
|
+
return e.replace(vn, "");
|
|
1147
1147
|
}
|
|
1148
|
-
function
|
|
1148
|
+
function bn(e, t) {
|
|
1149
1149
|
return t.lastIndex = 0, t.test(e.hostname);
|
|
1150
1150
|
}
|
|
1151
|
-
function
|
|
1151
|
+
function xn(e, t) {
|
|
1152
1152
|
return t.lastIndex = 0, t.test(e.protocol.endsWith(":") ? e.protocol.slice(0, -1) : e.protocol);
|
|
1153
1153
|
}
|
|
1154
|
-
var
|
|
1155
|
-
|
|
1154
|
+
var Sn = /*@__PURE__*/ w("$ZodURL", (e, t) => {
|
|
1155
|
+
A.init(e, t), e._zod.check = (n) => {
|
|
1156
1156
|
try {
|
|
1157
|
-
let r = n.value.trim(), i =
|
|
1157
|
+
let r = n.value.trim(), i = _n(r, t);
|
|
1158
1158
|
if (i === 1) {
|
|
1159
1159
|
n.issues.push({
|
|
1160
1160
|
code: "invalid_format",
|
|
@@ -1176,7 +1176,7 @@ var Cn = /*@__PURE__*/ w("$ZodURL", (e, t) => {
|
|
|
1176
1176
|
});
|
|
1177
1177
|
return;
|
|
1178
1178
|
}
|
|
1179
|
-
t.hostname && !
|
|
1179
|
+
t.hostname && !bn(i, t.hostname) && n.issues.push({
|
|
1180
1180
|
code: "invalid_format",
|
|
1181
1181
|
format: "url",
|
|
1182
1182
|
note: "Invalid hostname",
|
|
@@ -1184,7 +1184,7 @@ var Cn = /*@__PURE__*/ w("$ZodURL", (e, t) => {
|
|
|
1184
1184
|
input: n.value,
|
|
1185
1185
|
inst: e,
|
|
1186
1186
|
continue: !t.abort
|
|
1187
|
-
}), t.protocol && !
|
|
1187
|
+
}), t.protocol && !xn(i, t.protocol) && n.issues.push({
|
|
1188
1188
|
code: "invalid_format",
|
|
1189
1189
|
format: "url",
|
|
1190
1190
|
note: "Invalid protocol",
|
|
@@ -1192,7 +1192,7 @@ var Cn = /*@__PURE__*/ w("$ZodURL", (e, t) => {
|
|
|
1192
1192
|
input: n.value,
|
|
1193
1193
|
inst: e,
|
|
1194
1194
|
continue: !t.abort
|
|
1195
|
-
}), n.value = t.normalize ? i.href :
|
|
1195
|
+
}), n.value = t.normalize ? i.href : yn(r);
|
|
1196
1196
|
return;
|
|
1197
1197
|
} catch {
|
|
1198
1198
|
n.issues.push({
|
|
@@ -1204,45 +1204,45 @@ var Cn = /*@__PURE__*/ w("$ZodURL", (e, t) => {
|
|
|
1204
1204
|
});
|
|
1205
1205
|
}
|
|
1206
1206
|
};
|
|
1207
|
-
}),
|
|
1208
|
-
t.pattern ??=
|
|
1209
|
-
}),
|
|
1207
|
+
}), Cn = /*@__PURE__*/ w("$ZodEmoji", (e, t) => {
|
|
1208
|
+
t.pattern ??= Ct(), A.init(e, t);
|
|
1209
|
+
}), wn = /*@__PURE__*/ w("$ZodNanoID", (e, t) => {
|
|
1210
1210
|
if (t.length !== void 0 && (!Number.isInteger(t.length) || t.length < 1)) throw Error(`Invalid nanoid length: ${t.length}`);
|
|
1211
|
-
t.pattern ??= t.length === void 0 ?
|
|
1212
|
-
}),
|
|
1213
|
-
t.pattern ??=
|
|
1214
|
-
}),
|
|
1215
|
-
t.pattern ??=
|
|
1216
|
-
}),
|
|
1217
|
-
t.pattern ??=
|
|
1218
|
-
}),
|
|
1219
|
-
t.pattern ??=
|
|
1220
|
-
}),
|
|
1221
|
-
t.pattern ??=
|
|
1222
|
-
}),
|
|
1223
|
-
t.pattern ??=
|
|
1211
|
+
t.pattern ??= t.length === void 0 ? gt : _t(t.length), A.init(e, t);
|
|
1212
|
+
}), Tn = /*@__PURE__*/ w("$ZodCUID", (e, t) => {
|
|
1213
|
+
t.pattern ??= dt, A.init(e, t);
|
|
1214
|
+
}), En = /*@__PURE__*/ w("$ZodCUID2", (e, t) => {
|
|
1215
|
+
t.pattern ??= ft, A.init(e, t);
|
|
1216
|
+
}), Dn = /*@__PURE__*/ w("$ZodULID", (e, t) => {
|
|
1217
|
+
t.pattern ??= pt, A.init(e, t);
|
|
1218
|
+
}), On = /*@__PURE__*/ w("$ZodXID", (e, t) => {
|
|
1219
|
+
t.pattern ??= mt, A.init(e, t);
|
|
1220
|
+
}), kn = /*@__PURE__*/ w("$ZodKSUID", (e, t) => {
|
|
1221
|
+
t.pattern ??= ht, A.init(e, t);
|
|
1222
|
+
}), An = /*@__PURE__*/ w("$ZodISODateTime", (e, t) => {
|
|
1223
|
+
t.pattern ??= Lt(t), A.init(e, t), (t.local || t.precision === -1) && (e._zod.bag.laxFormat = !0, e._zod.onattach.push((e) => {
|
|
1224
1224
|
e._zod.bag.laxFormat = !0;
|
|
1225
1225
|
}));
|
|
1226
|
-
}),
|
|
1227
|
-
t.pattern ??=
|
|
1228
|
-
}),
|
|
1229
|
-
t.pattern ??=
|
|
1230
|
-
}),
|
|
1231
|
-
t.pattern ??=
|
|
1232
|
-
}),
|
|
1233
|
-
t.pattern ??=
|
|
1234
|
-
}),
|
|
1235
|
-
function
|
|
1236
|
-
if (!
|
|
1226
|
+
}), jn = /*@__PURE__*/ w("$ZodISODate", (e, t) => {
|
|
1227
|
+
t.pattern ??= Pt, A.init(e, t);
|
|
1228
|
+
}), Mn = /*@__PURE__*/ w("$ZodISOTime", (e, t) => {
|
|
1229
|
+
t.pattern ??= It(t), A.init(e, t);
|
|
1230
|
+
}), Nn = /*@__PURE__*/ w("$ZodISODuration", (e, t) => {
|
|
1231
|
+
t.pattern ??= vt, A.init(e, t);
|
|
1232
|
+
}), Pn = /*@__PURE__*/ w("$ZodIPv4", (e, t) => {
|
|
1233
|
+
t.pattern ??= wt, A.init(e, t), e._zod.bag.format = "ipv4";
|
|
1234
|
+
}), Fn = /^[0-9a-fA-F:.]+$/;
|
|
1235
|
+
function In(e) {
|
|
1236
|
+
if (!Fn.test(e)) return !1;
|
|
1237
1237
|
try {
|
|
1238
1238
|
return new URL(`http://[${e}]`), !0;
|
|
1239
1239
|
} catch {
|
|
1240
1240
|
return !1;
|
|
1241
1241
|
}
|
|
1242
1242
|
}
|
|
1243
|
-
var
|
|
1244
|
-
t.pattern ??=
|
|
1245
|
-
|
|
1243
|
+
var Ln = /*@__PURE__*/ w("$ZodIPv6", (e, t) => {
|
|
1244
|
+
t.pattern ??= Tt, A.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
|
|
1245
|
+
In(n.value) || n.issues.push({
|
|
1246
1246
|
code: "invalid_format",
|
|
1247
1247
|
format: "ipv6",
|
|
1248
1248
|
input: n.value,
|
|
@@ -1250,20 +1250,20 @@ var Rn = /*@__PURE__*/ w("$ZodIPv6", (e, t) => {
|
|
|
1250
1250
|
continue: !t.abort
|
|
1251
1251
|
});
|
|
1252
1252
|
};
|
|
1253
|
-
}),
|
|
1254
|
-
t.pattern ??=
|
|
1253
|
+
}), Rn = /*@__PURE__*/ w("$ZodCIDRv4", (e, t) => {
|
|
1254
|
+
t.pattern ??= Et, A.init(e, t);
|
|
1255
1255
|
});
|
|
1256
|
-
function
|
|
1256
|
+
function zn(e) {
|
|
1257
1257
|
let t = e.split("/");
|
|
1258
1258
|
if (t.length !== 2) return !1;
|
|
1259
1259
|
let [n, r] = t;
|
|
1260
1260
|
if (!r) return !1;
|
|
1261
1261
|
let i = Number(r);
|
|
1262
|
-
return `${i}` !== r || i < 0 || i > 128 ? !1 :
|
|
1262
|
+
return `${i}` !== r || i < 0 || i > 128 ? !1 : In(n);
|
|
1263
1263
|
}
|
|
1264
|
-
var
|
|
1265
|
-
t.pattern ??=
|
|
1266
|
-
|
|
1264
|
+
var Bn = /*@__PURE__*/ w("$ZodCIDRv6", (e, t) => {
|
|
1265
|
+
t.pattern ??= Dt, A.init(e, t), e._zod.check = (n) => {
|
|
1266
|
+
zn(n.value) || n.issues.push({
|
|
1267
1267
|
code: "invalid_format",
|
|
1268
1268
|
format: "cidrv6",
|
|
1269
1269
|
input: n.value,
|
|
@@ -1272,7 +1272,7 @@ var Vn = /*@__PURE__*/ w("$ZodCIDRv6", (e, t) => {
|
|
|
1272
1272
|
});
|
|
1273
1273
|
};
|
|
1274
1274
|
});
|
|
1275
|
-
function
|
|
1275
|
+
function Vn(e) {
|
|
1276
1276
|
if (e === "") return !0;
|
|
1277
1277
|
if (/\s/.test(e) || e.length % 4 != 0) return !1;
|
|
1278
1278
|
try {
|
|
@@ -1281,9 +1281,9 @@ function Hn(e) {
|
|
|
1281
1281
|
return !1;
|
|
1282
1282
|
}
|
|
1283
1283
|
}
|
|
1284
|
-
var
|
|
1285
|
-
t.pattern ??=
|
|
1286
|
-
|
|
1284
|
+
var Hn = /*@__PURE__*/ w("$ZodBase64", (e, t) => {
|
|
1285
|
+
t.pattern ??= Ot, A.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
|
|
1286
|
+
Vn(n.value) || n.issues.push({
|
|
1287
1287
|
code: "invalid_format",
|
|
1288
1288
|
format: "base64",
|
|
1289
1289
|
input: n.value,
|
|
@@ -1292,14 +1292,14 @@ var Un = /*@__PURE__*/ w("$ZodBase64", (e, t) => {
|
|
|
1292
1292
|
});
|
|
1293
1293
|
};
|
|
1294
1294
|
});
|
|
1295
|
-
function
|
|
1296
|
-
if (!
|
|
1295
|
+
function Un(e) {
|
|
1296
|
+
if (!kt.test(e)) return !1;
|
|
1297
1297
|
let t = e.replace(/[-_]/g, (e) => e === "-" ? "+" : "/");
|
|
1298
|
-
return
|
|
1298
|
+
return Vn(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
|
|
1299
1299
|
}
|
|
1300
|
-
var
|
|
1301
|
-
t.pattern ??=
|
|
1302
|
-
|
|
1300
|
+
var Wn = /*@__PURE__*/ w("$ZodBase64URL", (e, t) => {
|
|
1301
|
+
t.pattern ??= kt, A.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
|
|
1302
|
+
Un(n.value) || n.issues.push({
|
|
1303
1303
|
code: "invalid_format",
|
|
1304
1304
|
format: "base64url",
|
|
1305
1305
|
input: n.value,
|
|
@@ -1307,10 +1307,10 @@ var Gn = /*@__PURE__*/ w("$ZodBase64URL", (e, t) => {
|
|
|
1307
1307
|
continue: !t.abort
|
|
1308
1308
|
});
|
|
1309
1309
|
};
|
|
1310
|
-
}),
|
|
1311
|
-
t.pattern ??=
|
|
1310
|
+
}), Gn = /*@__PURE__*/ w("$ZodE164", (e, t) => {
|
|
1311
|
+
t.pattern ??= jt, A.init(e, t);
|
|
1312
1312
|
});
|
|
1313
|
-
function
|
|
1313
|
+
function Kn(e, t = null) {
|
|
1314
1314
|
try {
|
|
1315
1315
|
let n = e.split(".");
|
|
1316
1316
|
if (n.length !== 3) return !1;
|
|
@@ -1322,9 +1322,9 @@ function qn(e, t = null) {
|
|
|
1322
1322
|
return !1;
|
|
1323
1323
|
}
|
|
1324
1324
|
}
|
|
1325
|
-
var
|
|
1326
|
-
|
|
1327
|
-
|
|
1325
|
+
var qn = /*@__PURE__*/ w("$ZodJWT", (e, t) => {
|
|
1326
|
+
A.init(e, t), e._zod.check = (n) => {
|
|
1327
|
+
Kn(n.value, t.alg) || n.issues.push({
|
|
1328
1328
|
code: "invalid_format",
|
|
1329
1329
|
format: "jwt",
|
|
1330
1330
|
input: n.value,
|
|
@@ -1332,8 +1332,8 @@ var Jn = /*@__PURE__*/ w("$ZodJWT", (e, t) => {
|
|
|
1332
1332
|
continue: !t.abort
|
|
1333
1333
|
});
|
|
1334
1334
|
};
|
|
1335
|
-
}),
|
|
1336
|
-
|
|
1335
|
+
}), Jn = /*@__PURE__*/ w("$ZodNumber", (e, t) => {
|
|
1336
|
+
k.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Bt, e._zod.parse = (n, r) => {
|
|
1337
1337
|
if (t.coerce) try {
|
|
1338
1338
|
n.value = Number(n.value);
|
|
1339
1339
|
} catch {}
|
|
@@ -1348,10 +1348,10 @@ var Jn = /*@__PURE__*/ w("$ZodJWT", (e, t) => {
|
|
|
1348
1348
|
...a ? { received: a } : {}
|
|
1349
1349
|
}), n;
|
|
1350
1350
|
};
|
|
1351
|
-
}),
|
|
1352
|
-
|
|
1353
|
-
}),
|
|
1354
|
-
|
|
1351
|
+
}), Yn = /*@__PURE__*/ w("$ZodNumberFormat", (e, t) => {
|
|
1352
|
+
Xt.init(e, t), Jn.init(e, t);
|
|
1353
|
+
}), Xn = /*@__PURE__*/ w("$ZodBoolean", (e, t) => {
|
|
1354
|
+
k.init(e, t), e._zod.pattern = Vt, e._zod.parse = (n, r) => {
|
|
1355
1355
|
if (t.coerce) try {
|
|
1356
1356
|
n.value = !!n.value;
|
|
1357
1357
|
} catch {}
|
|
@@ -1363,8 +1363,8 @@ var Jn = /*@__PURE__*/ w("$ZodJWT", (e, t) => {
|
|
|
1363
1363
|
inst: e
|
|
1364
1364
|
}), n;
|
|
1365
1365
|
};
|
|
1366
|
-
}),
|
|
1367
|
-
|
|
1366
|
+
}), Zn = /*@__PURE__*/ w("$ZodNull", (e, t) => {
|
|
1367
|
+
k.init(e, t), e._zod.pattern = Ht, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (t, n) => {
|
|
1368
1368
|
let r = t.value;
|
|
1369
1369
|
return r === null || t.issues.push({
|
|
1370
1370
|
expected: "null",
|
|
@@ -1373,22 +1373,22 @@ var Jn = /*@__PURE__*/ w("$ZodJWT", (e, t) => {
|
|
|
1373
1373
|
inst: e
|
|
1374
1374
|
}), t;
|
|
1375
1375
|
};
|
|
1376
|
-
}),
|
|
1377
|
-
|
|
1378
|
-
}),
|
|
1379
|
-
|
|
1376
|
+
}), Qn = /*@__PURE__*/ w("$ZodUnknown", (e, t) => {
|
|
1377
|
+
k.init(e, t), e._zod.parse = (e) => e;
|
|
1378
|
+
}), $n = /*@__PURE__*/ w("$ZodNever", (e, t) => {
|
|
1379
|
+
k.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
|
|
1380
1380
|
expected: "never",
|
|
1381
1381
|
code: "invalid_type",
|
|
1382
1382
|
input: t.value,
|
|
1383
1383
|
inst: e
|
|
1384
1384
|
}), t);
|
|
1385
1385
|
});
|
|
1386
|
-
function
|
|
1387
|
-
e.issues.length && t.issues.push(...
|
|
1386
|
+
function er(e, t, n) {
|
|
1387
|
+
e.issues.length && t.issues.push(...b(n, e.issues)), t.value[n] = e.value;
|
|
1388
1388
|
}
|
|
1389
|
-
var
|
|
1390
|
-
|
|
1391
|
-
let n =
|
|
1389
|
+
var tr = /*@__PURE__*/ w("$ZodArray", (e, t) => {
|
|
1390
|
+
k.init(e, t);
|
|
1391
|
+
let n = E.memoizer;
|
|
1392
1392
|
n?.attach(e), e._zod.parse = (r, i) => {
|
|
1393
1393
|
let a = r.value;
|
|
1394
1394
|
if (!Array.isArray(a)) return r.issues.push({
|
|
@@ -1404,17 +1404,17 @@ var nr = /*@__PURE__*/ w("$ZodArray", (e, t) => {
|
|
|
1404
1404
|
value: n,
|
|
1405
1405
|
issues: []
|
|
1406
1406
|
}, i);
|
|
1407
|
-
s instanceof Promise ? o.push(s.then((t) =>
|
|
1407
|
+
s instanceof Promise ? o.push(s.then((t) => er(t, r, e))) : er(s, r, e);
|
|
1408
1408
|
}
|
|
1409
1409
|
return o.length ? Promise.all(o).then(() => r) : r;
|
|
1410
1410
|
};
|
|
1411
1411
|
});
|
|
1412
|
-
function
|
|
1412
|
+
function nr(e, t, n, r, i, a) {
|
|
1413
1413
|
let o = n in r, s = a === "optional";
|
|
1414
1414
|
if (!(!o && s && i === "optional")) {
|
|
1415
1415
|
if (e.issues.length) {
|
|
1416
1416
|
if (i !== void 0 && s && !o) return;
|
|
1417
|
-
t.issues.push(...
|
|
1417
|
+
t.issues.push(...b(n, e.issues));
|
|
1418
1418
|
}
|
|
1419
1419
|
if (!o && i === void 0) {
|
|
1420
1420
|
e.issues.length || t.issues.push({
|
|
@@ -1428,9 +1428,9 @@ function rr(e, t, n, r, i, a) {
|
|
|
1428
1428
|
e.value === void 0 ? o && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
1429
1429
|
}
|
|
1430
1430
|
}
|
|
1431
|
-
var
|
|
1432
|
-
function
|
|
1433
|
-
let t = Object.keys(e.shape), n = Object.getOwnPropertySymbols(e.shape), r = n.length ? n :
|
|
1431
|
+
var rr = [];
|
|
1432
|
+
function ir(e) {
|
|
1433
|
+
let t = Object.keys(e.shape), n = Object.getOwnPropertySymbols(e.shape), r = n.length ? n : rr, i = r.length ? [...t, ...r] : t;
|
|
1434
1434
|
for (let t of i) if (!e.shape?.[t]?._zod?.traits?.has("$ZodType")) throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);
|
|
1435
1435
|
let a = oe(e.shape);
|
|
1436
1436
|
return {
|
|
@@ -1442,7 +1442,7 @@ function ar(e) {
|
|
|
1442
1442
|
optionalKeys: new Set(a)
|
|
1443
1443
|
};
|
|
1444
1444
|
}
|
|
1445
|
-
function
|
|
1445
|
+
function ar(e, t, n, r, i, a) {
|
|
1446
1446
|
let o = [], s = i.keySet, c = i.catchall._zod, l = c.def.type, u = c.optin, d = c.optout;
|
|
1447
1447
|
for (let i in t) {
|
|
1448
1448
|
if (s.has(i)) continue;
|
|
@@ -1458,7 +1458,7 @@ function or(e, t, n, r, i, a) {
|
|
|
1458
1458
|
value: t[i],
|
|
1459
1459
|
issues: []
|
|
1460
1460
|
}, r);
|
|
1461
|
-
a instanceof Promise ? e.push(a.then((e) =>
|
|
1461
|
+
a instanceof Promise ? e.push(a.then((e) => nr(e, n, i, t, u, d))) : nr(a, n, i, t, u, d);
|
|
1462
1462
|
}
|
|
1463
1463
|
return o.length && n.issues.push({
|
|
1464
1464
|
code: "unrecognized_keys",
|
|
@@ -1468,15 +1468,15 @@ function or(e, t, n, r, i, a) {
|
|
|
1468
1468
|
continue: !0
|
|
1469
1469
|
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
1470
1470
|
}
|
|
1471
|
-
var
|
|
1472
|
-
if (
|
|
1471
|
+
var or = /* @__PURE__ */ new WeakMap(), sr = /*@__PURE__*/ w("$ZodObject", (e, t) => {
|
|
1472
|
+
if (k.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
1473
1473
|
let e = t.shape;
|
|
1474
|
-
|
|
1474
|
+
or.set(t, e), Object.defineProperty(t, "shape", { get: () => {
|
|
1475
1475
|
let n = { ...e };
|
|
1476
|
-
return Object.defineProperty(t, "shape", { value: n }),
|
|
1476
|
+
return Object.defineProperty(t, "shape", { value: n }), or.set(t, n), n;
|
|
1477
1477
|
} });
|
|
1478
1478
|
}
|
|
1479
|
-
let n = a(() =>
|
|
1479
|
+
let n = a(() => ir(t));
|
|
1480
1480
|
C(e, "propValues", (e) => {
|
|
1481
1481
|
let t = e.def.shape, n = {};
|
|
1482
1482
|
for (let e in t) {
|
|
@@ -1489,7 +1489,7 @@ var sr = /* @__PURE__ */ new WeakMap(), cr = /*@__PURE__*/ w("$ZodObject", (e, t
|
|
|
1489
1489
|
}
|
|
1490
1490
|
return n;
|
|
1491
1491
|
});
|
|
1492
|
-
let r = te, i = t.catchall, o, s =
|
|
1492
|
+
let r = te, i = t.catchall, o, s = E.memoizer;
|
|
1493
1493
|
s?.attach(e), e._zod.parse = (t, a) => {
|
|
1494
1494
|
o ??= n.value;
|
|
1495
1495
|
let c = t.value;
|
|
@@ -1507,14 +1507,14 @@ var sr = /* @__PURE__ */ new WeakMap(), cr = /*@__PURE__*/ w("$ZodObject", (e, t
|
|
|
1507
1507
|
value: c[e],
|
|
1508
1508
|
issues: []
|
|
1509
1509
|
}, a);
|
|
1510
|
-
o instanceof Promise ? l.push(o.then((n) =>
|
|
1510
|
+
o instanceof Promise ? l.push(o.then((n) => nr(n, t, e, c, r, i))) : nr(o, t, e, c, r, i);
|
|
1511
1511
|
}
|
|
1512
|
-
return i ?
|
|
1512
|
+
return i ? ar(l, c, t, a, n.value, e) : l.length ? Promise.all(l).then(() => t) : t;
|
|
1513
1513
|
};
|
|
1514
|
-
}),
|
|
1515
|
-
|
|
1516
|
-
let n = e._zod.parse, r = a(() =>
|
|
1517
|
-
let n = r.value, a = n.symbolKeys, o = new
|
|
1514
|
+
}), cr = /*@__PURE__*/ w("$ZodObjectJIT", (e, t) => {
|
|
1515
|
+
sr.init(e, t);
|
|
1516
|
+
let n = e._zod.parse, r = a(() => ir(t)), i = E.memoizer, o = (t) => {
|
|
1517
|
+
let n = r.value, a = n.symbolKeys, o = new ln(["payload", "ctx"], {
|
|
1518
1518
|
shape: t,
|
|
1519
1519
|
inst: e,
|
|
1520
1520
|
memo: i,
|
|
@@ -1578,11 +1578,11 @@ var sr = /* @__PURE__ */ new WeakMap(), cr = /*@__PURE__*/ w("$ZodObject", (e, t
|
|
|
1578
1578
|
`);
|
|
1579
1579
|
}
|
|
1580
1580
|
return o.write("payload.value = newResult;"), o.write("return payload;"), o.compile();
|
|
1581
|
-
}, s, c = te, l = !
|
|
1581
|
+
}, s, c = te, l = !E.jitless, u = l && ne.value, d = t.catchall, f;
|
|
1582
1582
|
e._zod.parse = (i, a) => {
|
|
1583
1583
|
f ??= r.value;
|
|
1584
1584
|
let p = i.value;
|
|
1585
|
-
return c(p) ? l && u && a?.async === !1 && a.jitless !== !0 ? (s ||= o(t.shape), i = s(i, a), d ?
|
|
1585
|
+
return c(p) ? l && u && a?.async === !1 && a.jitless !== !0 ? (s ||= o(t.shape), i = s(i, a), d ? ar([], p, i, a, f, e) : i) : n(i, a) : (i.issues.push({
|
|
1586
1586
|
expected: "object",
|
|
1587
1587
|
code: "invalid_type",
|
|
1588
1588
|
input: p,
|
|
@@ -1590,18 +1590,18 @@ var sr = /* @__PURE__ */ new WeakMap(), cr = /*@__PURE__*/ w("$ZodObject", (e, t
|
|
|
1590
1590
|
}), i);
|
|
1591
1591
|
};
|
|
1592
1592
|
});
|
|
1593
|
-
function
|
|
1593
|
+
function lr(e, t, n, r) {
|
|
1594
1594
|
for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
|
|
1595
|
-
let i = e.filter((e) => !
|
|
1595
|
+
let i = e.filter((e) => !y(e));
|
|
1596
1596
|
return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({
|
|
1597
1597
|
code: "invalid_union",
|
|
1598
1598
|
input: t.value,
|
|
1599
1599
|
inst: n,
|
|
1600
|
-
errors: e.map((e) => e.issues.map((e) =>
|
|
1600
|
+
errors: e.map((e) => e.issues.map((e) => x(e, r, D())))
|
|
1601
1601
|
}), t);
|
|
1602
1602
|
}
|
|
1603
|
-
var
|
|
1604
|
-
|
|
1603
|
+
var ur = /*@__PURE__*/ w("$ZodUnion", (e, t) => {
|
|
1604
|
+
k.init(e, t), C(e, "optin", (e) => e.def.options.some((e) => e._zod.optin === "defaulted") ? "defaulted" : e.def.options.some((e) => e._zod.optin !== void 0) ? "optional" : void 0), C(e, "optout", (e) => e.def.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), C(e, "values", (e) => {
|
|
1605
1605
|
if (e.def.options.every((e) => e._zod.values)) return new Set(e.def.options.flatMap((e) => Array.from(e._zod.values)));
|
|
1606
1606
|
}), C(e, "pattern", (e) => {
|
|
1607
1607
|
if (e.def.options.every((e) => e._zod.pattern)) {
|
|
@@ -1624,10 +1624,10 @@ var dr = /*@__PURE__*/ w("$ZodUnion", (e, t) => {
|
|
|
1624
1624
|
o.push(t);
|
|
1625
1625
|
}
|
|
1626
1626
|
}
|
|
1627
|
-
return a ? Promise.all(o).then((t) =>
|
|
1627
|
+
return a ? Promise.all(o).then((t) => lr(t, r, e, i)) : lr(o, r, e, i);
|
|
1628
1628
|
};
|
|
1629
|
-
}),
|
|
1630
|
-
|
|
1629
|
+
}), dr = /*@__PURE__*/ w("$ZodIntersection", (e, t) => {
|
|
1630
|
+
k.init(e, t), e._zod.parse = (e, n) => {
|
|
1631
1631
|
let r = e.value, i = t.left._zod.run({
|
|
1632
1632
|
value: r,
|
|
1633
1633
|
issues: []
|
|
@@ -1635,10 +1635,10 @@ var dr = /*@__PURE__*/ w("$ZodUnion", (e, t) => {
|
|
|
1635
1635
|
value: r,
|
|
1636
1636
|
issues: []
|
|
1637
1637
|
}, n);
|
|
1638
|
-
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) =>
|
|
1638
|
+
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => pr(e, t, n)) : pr(e, i, a);
|
|
1639
1639
|
};
|
|
1640
1640
|
});
|
|
1641
|
-
function
|
|
1641
|
+
function fr(e, t) {
|
|
1642
1642
|
if (e === t || e instanceof Date && t instanceof Date && +e == +t) return {
|
|
1643
1643
|
valid: !0,
|
|
1644
1644
|
data: e
|
|
@@ -1651,7 +1651,7 @@ function pr(e, t) {
|
|
|
1651
1651
|
Object.prototype.hasOwnProperty.call(i, "__proto__") && delete i.__proto__;
|
|
1652
1652
|
for (let n of r) {
|
|
1653
1653
|
if (n === "__proto__") continue;
|
|
1654
|
-
let r =
|
|
1654
|
+
let r = fr(e[n], t[n]);
|
|
1655
1655
|
if (!r.valid) return {
|
|
1656
1656
|
valid: !1,
|
|
1657
1657
|
mergeErrorPath: [n, ...r.mergeErrorPath]
|
|
@@ -1670,7 +1670,7 @@ function pr(e, t) {
|
|
|
1670
1670
|
};
|
|
1671
1671
|
let n = [];
|
|
1672
1672
|
for (let r = 0; r < e.length; r++) {
|
|
1673
|
-
let i = e[r], a = t[r], o =
|
|
1673
|
+
let i = e[r], a = t[r], o = fr(i, a);
|
|
1674
1674
|
if (!o.valid) return {
|
|
1675
1675
|
valid: !1,
|
|
1676
1676
|
mergeErrorPath: [r, ...o.mergeErrorPath]
|
|
@@ -1687,7 +1687,7 @@ function pr(e, t) {
|
|
|
1687
1687
|
mergeErrorPath: []
|
|
1688
1688
|
};
|
|
1689
1689
|
}
|
|
1690
|
-
function
|
|
1690
|
+
function pr(e, t, n) {
|
|
1691
1691
|
let r = /* @__PURE__ */ new Map(), i, a = /* @__PURE__ */ new Map(), o = (e, t) => {
|
|
1692
1692
|
let n;
|
|
1693
1693
|
if (e.code === "unrecognized_keys" && !e.path?.length) i ??= e, n = e.keys;
|
|
@@ -1709,16 +1709,16 @@ function mr(e, t, n) {
|
|
|
1709
1709
|
});
|
|
1710
1710
|
for (let n of s) !t.includes(n) && a.has(n) && e.issues.push(a.get(n));
|
|
1711
1711
|
}
|
|
1712
|
-
let c =
|
|
1712
|
+
let c = fr(t.value, n.value);
|
|
1713
1713
|
if (!c.valid) {
|
|
1714
|
-
if (
|
|
1714
|
+
if (y(e)) return e;
|
|
1715
1715
|
throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);
|
|
1716
1716
|
}
|
|
1717
1717
|
return e.value = c.data, e;
|
|
1718
1718
|
}
|
|
1719
|
-
var
|
|
1720
|
-
|
|
1721
|
-
let n =
|
|
1719
|
+
var mr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
|
|
1720
|
+
k.init(e, t);
|
|
1721
|
+
let n = E.memoizer;
|
|
1722
1722
|
n?.attach(e), e._zod.parse = (r, i) => {
|
|
1723
1723
|
let a = r.value;
|
|
1724
1724
|
if (!h(a)) return r.issues.push({
|
|
@@ -1742,7 +1742,7 @@ var hr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
|
|
|
1742
1742
|
r.issues.push({
|
|
1743
1743
|
code: "invalid_key",
|
|
1744
1744
|
origin: "record",
|
|
1745
|
-
issues: s.issues.map((e) =>
|
|
1745
|
+
issues: s.issues.map((e) => x(e, i, D())),
|
|
1746
1746
|
input: n,
|
|
1747
1747
|
path: [n],
|
|
1748
1748
|
inst: e
|
|
@@ -1756,8 +1756,8 @@ var hr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
|
|
|
1756
1756
|
issues: []
|
|
1757
1757
|
}, i);
|
|
1758
1758
|
u instanceof Promise ? o.push(u.then((e) => {
|
|
1759
|
-
e.issues.length && r.issues.push(...
|
|
1760
|
-
})) : (u.issues.length && r.issues.push(...
|
|
1759
|
+
e.issues.length && r.issues.push(...b(n, e.issues)), r.value[l] = e.value;
|
|
1760
|
+
})) : (u.issues.length && r.issues.push(...b(n, u.issues)), r.value[l] = u.value);
|
|
1761
1761
|
}
|
|
1762
1762
|
let l;
|
|
1763
1763
|
for (let e in a) if (!c.has(e)) {
|
|
@@ -1783,7 +1783,7 @@ var hr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
|
|
|
1783
1783
|
issues: []
|
|
1784
1784
|
}, i);
|
|
1785
1785
|
if (l instanceof Promise) throw Error("Async schemas not supported in object keys currently");
|
|
1786
|
-
if (typeof n == "string" &&
|
|
1786
|
+
if (typeof n == "string" && Bt.test(n) && l.issues.length) {
|
|
1787
1787
|
let e = t.keyType._zod.run({
|
|
1788
1788
|
value: Number(n),
|
|
1789
1789
|
issues: []
|
|
@@ -1795,7 +1795,7 @@ var hr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
|
|
|
1795
1795
|
t.mode === "loose" ? r.value[n] = a[n] : s ? (c ??= [], c.push(n)) : r.issues.push({
|
|
1796
1796
|
code: "invalid_key",
|
|
1797
1797
|
origin: "record",
|
|
1798
|
-
issues: l.issues.map((e) =>
|
|
1798
|
+
issues: l.issues.map((e) => x(e, i, D())),
|
|
1799
1799
|
input: n,
|
|
1800
1800
|
path: [n],
|
|
1801
1801
|
inst: e
|
|
@@ -1809,8 +1809,8 @@ var hr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
|
|
|
1809
1809
|
issues: []
|
|
1810
1810
|
}, i);
|
|
1811
1811
|
d instanceof Promise ? o.push(d.then((e) => {
|
|
1812
|
-
e.issues.length && r.issues.push(...
|
|
1813
|
-
})) : (d.issues.length && r.issues.push(...
|
|
1812
|
+
e.issues.length && r.issues.push(...b(n, e.issues)), r.value[u] = e.value;
|
|
1813
|
+
})) : (d.issues.length && r.issues.push(...b(n, d.issues)), r.value[u] = d.value);
|
|
1814
1814
|
}
|
|
1815
1815
|
c && c.length > 0 && r.issues.push({
|
|
1816
1816
|
code: "unrecognized_keys",
|
|
@@ -1822,8 +1822,8 @@ var hr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
|
|
|
1822
1822
|
}
|
|
1823
1823
|
return o.length ? Promise.all(o).then(() => r) : r;
|
|
1824
1824
|
};
|
|
1825
|
-
}),
|
|
1826
|
-
|
|
1825
|
+
}), hr = /*@__PURE__*/ w("$ZodEnum", (e, t) => {
|
|
1826
|
+
k.init(e, t);
|
|
1827
1827
|
let r = n(t.entries), i = new Set(r);
|
|
1828
1828
|
e._zod.values = i;
|
|
1829
1829
|
let a = r.filter((e) => ie.has(typeof e));
|
|
@@ -1836,8 +1836,8 @@ var hr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
|
|
|
1836
1836
|
inst: e
|
|
1837
1837
|
}), t;
|
|
1838
1838
|
};
|
|
1839
|
-
}),
|
|
1840
|
-
|
|
1839
|
+
}), gr = /*@__PURE__*/ w("$ZodLiteral", (e, t) => {
|
|
1840
|
+
k.init(e, t);
|
|
1841
1841
|
let n = new Set(t.values);
|
|
1842
1842
|
e._zod.values = n, e._zod.pattern = RegExp(t.values.length ? `^(${t.values.map((e) => typeof e == "string" ? g(e) : e ? g(e.toString()) : String(e)).join("|")})$` : "^[^\\s\\S]$"), e._zod.parse = (r, i) => {
|
|
1843
1843
|
let a = r.value;
|
|
@@ -1848,20 +1848,20 @@ var hr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
|
|
|
1848
1848
|
inst: e
|
|
1849
1849
|
}), r;
|
|
1850
1850
|
};
|
|
1851
|
-
}),
|
|
1852
|
-
|
|
1853
|
-
if (r.direction === "backward") throw new
|
|
1851
|
+
}), _r = /*@__PURE__*/ w("$ZodTransform", (e, t) => {
|
|
1852
|
+
k.init(e, t), e._zod.optin = "optional", E.memoizer?.guard(e), e._zod.parse = (n, r) => {
|
|
1853
|
+
if (r.direction === "backward") throw new Le(e.constructor.name);
|
|
1854
1854
|
let i = t.transform(n.value, n);
|
|
1855
1855
|
if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n));
|
|
1856
|
-
if (i instanceof Promise) throw new
|
|
1856
|
+
if (i instanceof Promise) throw new T();
|
|
1857
1857
|
return n.value = i, n;
|
|
1858
1858
|
};
|
|
1859
1859
|
});
|
|
1860
|
-
function
|
|
1860
|
+
function vr(e, t) {
|
|
1861
1861
|
return e.value = t.issues.length ? void 0 : t.value, e;
|
|
1862
1862
|
}
|
|
1863
|
-
var
|
|
1864
|
-
|
|
1863
|
+
var yr = /*@__PURE__*/ w("$ZodOptional", (e, t) => {
|
|
1864
|
+
k.init(e, t), C(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), e._zod.optout = "optional", C(e, "values", (e) => {
|
|
1865
1865
|
let t = e.def.innerType._zod.values;
|
|
1866
1866
|
return t ? /* @__PURE__ */ new Set([...t, void 0]) : void 0;
|
|
1867
1867
|
}), C(e, "pattern", (e) => {
|
|
@@ -1874,40 +1874,40 @@ var br = /*@__PURE__*/ w("$ZodOptional", (e, t) => {
|
|
|
1874
1874
|
value: e.value,
|
|
1875
1875
|
issues: []
|
|
1876
1876
|
}, n);
|
|
1877
|
-
return r instanceof Promise ? r.then((t) =>
|
|
1877
|
+
return r instanceof Promise ? r.then((t) => vr(e, t)) : vr(e, r);
|
|
1878
1878
|
}
|
|
1879
1879
|
return t.innerType._zod.run(e, n);
|
|
1880
1880
|
};
|
|
1881
|
-
}),
|
|
1882
|
-
|
|
1883
|
-
}),
|
|
1884
|
-
|
|
1881
|
+
}), br = /*@__PURE__*/ w("$ZodExactOptional", (e, t) => {
|
|
1882
|
+
yr.init(e, t), C(e, "values", (e) => e.def.innerType._zod.values), C(e, "pattern", (e) => e.def.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
|
|
1883
|
+
}), xr = /*@__PURE__*/ w("$ZodNullable", (e, t) => {
|
|
1884
|
+
k.init(e, t), C(e, "optin", (e) => e.def.innerType._zod.optin), C(e, "optout", (e) => e.def.innerType._zod.optout), C(e, "pattern", (e) => {
|
|
1885
1885
|
let t = e.def.innerType._zod.pattern;
|
|
1886
1886
|
return t ? RegExp(`^(${s(t.source)}|null)$`) : void 0;
|
|
1887
1887
|
}), C(e, "values", (e) => e.def.innerType._zod.values ? /* @__PURE__ */ new Set([...e.def.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n);
|
|
1888
|
-
}),
|
|
1889
|
-
|
|
1888
|
+
}), Sr = /*@__PURE__*/ w("$ZodDefault", (e, t) => {
|
|
1889
|
+
k.init(e, t), e._zod.optin = "defaulted", C(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1890
1890
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1891
1891
|
if (e.value === void 0) return e.value = t.defaultValue, e;
|
|
1892
1892
|
let r = t.innerType._zod.run(e, n);
|
|
1893
|
-
return r instanceof Promise ? r.then((e) =>
|
|
1893
|
+
return r instanceof Promise ? r.then((e) => Cr(e, t)) : Cr(r, t);
|
|
1894
1894
|
};
|
|
1895
1895
|
});
|
|
1896
|
-
function
|
|
1896
|
+
function Cr(e, t) {
|
|
1897
1897
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
1898
1898
|
}
|
|
1899
|
-
var
|
|
1900
|
-
|
|
1901
|
-
}),
|
|
1902
|
-
|
|
1899
|
+
var wr = /*@__PURE__*/ w("$ZodPrefault", (e, t) => {
|
|
1900
|
+
k.init(e, t), e._zod.optin = "defaulted", C(e, "values", (e) => e.def.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));
|
|
1901
|
+
}), Tr = /*@__PURE__*/ w("$ZodNonOptional", (e, t) => {
|
|
1902
|
+
k.init(e, t), C(e, "values", (e) => {
|
|
1903
1903
|
let t = e.def.innerType._zod.values;
|
|
1904
1904
|
return t ? new Set([...t].filter((e) => e !== void 0)) : void 0;
|
|
1905
1905
|
}), e._zod.parse = (n, r) => {
|
|
1906
1906
|
let i = t.innerType._zod.run(n, r);
|
|
1907
|
-
return i instanceof Promise ? i.then((t) =>
|
|
1907
|
+
return i instanceof Promise ? i.then((t) => Er(t, e)) : Er(i, e);
|
|
1908
1908
|
};
|
|
1909
1909
|
});
|
|
1910
|
-
function
|
|
1910
|
+
function Er(e, t) {
|
|
1911
1911
|
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
1912
1912
|
code: "invalid_type",
|
|
1913
1913
|
expected: "nonoptional",
|
|
@@ -1915,62 +1915,62 @@ function Dr(e, t) {
|
|
|
1915
1915
|
inst: t
|
|
1916
1916
|
}), e;
|
|
1917
1917
|
}
|
|
1918
|
-
function
|
|
1918
|
+
function Dr(e, t, n, r) {
|
|
1919
1919
|
return t.issues.length ? (e.value = n.catchValue({
|
|
1920
1920
|
...t,
|
|
1921
1921
|
value: e.value,
|
|
1922
|
-
error: { issues: t.issues.map((e) =>
|
|
1922
|
+
error: { issues: t.issues.map((e) => x(e, r, D())) },
|
|
1923
1923
|
input: e.value
|
|
1924
1924
|
}), e) : (e.value = t.value, t.memo && (e.memo = !0), e);
|
|
1925
1925
|
}
|
|
1926
|
-
var
|
|
1927
|
-
|
|
1926
|
+
var Or = /*@__PURE__*/ w("$ZodCatch", (e, t) => {
|
|
1927
|
+
k.init(e, t), C(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), C(e, "optout", (e) => e.def.innerType._zod.optout), C(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1928
1928
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1929
1929
|
let r = t.innerType._zod.run({
|
|
1930
1930
|
value: e.value,
|
|
1931
1931
|
issues: []
|
|
1932
1932
|
}, n);
|
|
1933
|
-
return r instanceof Promise ? r.then((r) =>
|
|
1933
|
+
return r instanceof Promise ? r.then((r) => Dr(e, r, t, n)) : Dr(e, r, t, n);
|
|
1934
1934
|
};
|
|
1935
|
-
}),
|
|
1936
|
-
|
|
1935
|
+
}), kr = /*@__PURE__*/ w("$ZodPipe", (e, t) => {
|
|
1936
|
+
k.init(e, t), C(e, "values", (e) => e.def.in._zod.values), C(e, "optin", (e) => e.def.in._zod.optin), C(e, "optout", (e) => e.def.out._zod.optout), C(e, "propValues", (e) => e.def.in._zod.propValues), e._zod.parse = (e, n) => {
|
|
1937
1937
|
if (n.direction === "backward") {
|
|
1938
1938
|
let r = t.out._zod.run(e, n);
|
|
1939
|
-
return r instanceof Promise ? r.then((e) =>
|
|
1939
|
+
return r instanceof Promise ? r.then((e) => Ar(e, t.in, n)) : Ar(r, t.in, n);
|
|
1940
1940
|
}
|
|
1941
1941
|
let r = t.in._zod.run(e, n);
|
|
1942
|
-
return r instanceof Promise ? r.then((e) =>
|
|
1942
|
+
return r instanceof Promise ? r.then((e) => Ar(e, t.out, n)) : Ar(r, t.out, n);
|
|
1943
1943
|
};
|
|
1944
1944
|
});
|
|
1945
|
-
function
|
|
1945
|
+
function Ar(e, t, n) {
|
|
1946
1946
|
return e.issues.some((e) => e.code !== "unrecognized_keys") ? (e.aborted = !0, e) : t._zod.run({
|
|
1947
1947
|
value: e.value,
|
|
1948
1948
|
issues: e.issues
|
|
1949
1949
|
}, n);
|
|
1950
1950
|
}
|
|
1951
|
-
var
|
|
1952
|
-
|
|
1951
|
+
var jr = /*@__PURE__*/ w("$ZodReadonly", (e, t) => {
|
|
1952
|
+
k.init(e, t), C(e, "propValues", (e) => e.def.innerType._zod.propValues), C(e, "values", (e) => e.def.innerType._zod.values), C(e, "optin", (e) => e.def.innerType?._zod?.optin), C(e, "optout", (e) => e.def.innerType?._zod?.optout), e._zod.parse = (e, n) => {
|
|
1953
1953
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1954
1954
|
let r = t.innerType._zod.run(e, n);
|
|
1955
|
-
return r instanceof Promise ? r.then(
|
|
1955
|
+
return r instanceof Promise ? r.then(Mr) : Mr(r);
|
|
1956
1956
|
};
|
|
1957
1957
|
});
|
|
1958
|
-
function
|
|
1958
|
+
function Mr(e) {
|
|
1959
1959
|
return e.memo || (e.value = Object.freeze(e.value)), e;
|
|
1960
1960
|
}
|
|
1961
|
-
var
|
|
1962
|
-
|
|
1961
|
+
var Nr = /*@__PURE__*/ w("$ZodLazy", (e, t) => {
|
|
1962
|
+
k.init(e, t), u(e._zod, "innerType", () => {
|
|
1963
1963
|
let e = t;
|
|
1964
1964
|
return e._cachedInner ||= t.getter(), e._cachedInner;
|
|
1965
1965
|
}), C(e, "pattern", (e) => e.innerType?._zod?.pattern), C(e, "propValues", (e) => e.innerType?._zod?.propValues), C(e, "optin", (e) => e.innerType?._zod?.optin ?? void 0), C(e, "optout", (e) => e.innerType?._zod?.optout ?? void 0), e._zod.parse = (t, n) => e._zod.innerType._zod.run(t, n);
|
|
1966
|
-
}),
|
|
1967
|
-
|
|
1966
|
+
}), Pr = /*@__PURE__*/ w("$ZodCustom", (e, t) => {
|
|
1967
|
+
O.init(e, t), k.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
|
|
1968
1968
|
let r = n.value, i = t.fn(r);
|
|
1969
|
-
if (i instanceof Promise) return i.then((t) =>
|
|
1970
|
-
|
|
1969
|
+
if (i instanceof Promise) return i.then((t) => Fr(t, n, r, e));
|
|
1970
|
+
Fr(i, n, r, e);
|
|
1971
1971
|
};
|
|
1972
1972
|
});
|
|
1973
|
-
function
|
|
1973
|
+
function Fr(e, t, n, r) {
|
|
1974
1974
|
if (!e) {
|
|
1975
1975
|
let e = {
|
|
1976
1976
|
code: "custom",
|
|
@@ -1979,30 +1979,30 @@ function Ir(e, t, n, r) {
|
|
|
1979
1979
|
path: [...r._zod.def.path ?? []],
|
|
1980
1980
|
continue: !r._zod.def.abort
|
|
1981
1981
|
};
|
|
1982
|
-
r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(
|
|
1982
|
+
r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(Se(e));
|
|
1983
1983
|
}
|
|
1984
1984
|
}
|
|
1985
1985
|
//#endregion
|
|
1986
1986
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/memoizer.js
|
|
1987
|
-
var
|
|
1987
|
+
var Ir = class extends Error {
|
|
1988
1988
|
constructor() {
|
|
1989
1989
|
super("Cannot parse a reference cycle that closes through a transform"), this.name = "ZodCyclicError";
|
|
1990
1990
|
}
|
|
1991
|
-
},
|
|
1992
|
-
function
|
|
1991
|
+
}, Lr = "~memo", Rr = [];
|
|
1992
|
+
function zr(e) {
|
|
1993
1993
|
return e.map((e) => e.path ? {
|
|
1994
1994
|
...e,
|
|
1995
1995
|
path: e.path.slice()
|
|
1996
1996
|
} : { ...e });
|
|
1997
1997
|
}
|
|
1998
|
-
var
|
|
1999
|
-
function
|
|
2000
|
-
let n =
|
|
1998
|
+
var Br = /*@__PURE__*/ new WeakMap();
|
|
1999
|
+
function Vr(e, t) {
|
|
2000
|
+
let n = Br.get(e);
|
|
2001
2001
|
if (n !== void 0) return n;
|
|
2002
2002
|
if (t.has(e)) return !0;
|
|
2003
2003
|
t.add(e);
|
|
2004
2004
|
let r = !1, i = (e) => {
|
|
2005
|
-
!r && e?._zod &&
|
|
2005
|
+
!r && e?._zod && Vr(e, t) && (r = !0);
|
|
2006
2006
|
}, a = e._zod.def;
|
|
2007
2007
|
switch (a.type) {
|
|
2008
2008
|
case "object":
|
|
@@ -2079,28 +2079,28 @@ function Hr(e, t) {
|
|
|
2079
2079
|
}
|
|
2080
2080
|
}
|
|
2081
2081
|
}
|
|
2082
|
-
return t.delete(e),
|
|
2082
|
+
return t.delete(e), Br.set(e, r), r;
|
|
2083
2083
|
}
|
|
2084
|
-
function
|
|
2084
|
+
function Hr(e, t) {
|
|
2085
2085
|
let n = e.buckets.get(t);
|
|
2086
2086
|
return n || (n = /* @__PURE__ */ new Map(), e.buckets.set(t, n)), n;
|
|
2087
2087
|
}
|
|
2088
|
-
var
|
|
2088
|
+
var Ur, Wr = [], Gr = {
|
|
2089
2089
|
alloc(e, t, n) {
|
|
2090
|
-
let r =
|
|
2090
|
+
let r = Ur;
|
|
2091
2091
|
if (!r) return n;
|
|
2092
|
-
|
|
2092
|
+
Ur = void 0;
|
|
2093
2093
|
let i = {
|
|
2094
2094
|
value: n,
|
|
2095
2095
|
issues: null
|
|
2096
2096
|
};
|
|
2097
|
-
return r.set(t.value, i),
|
|
2097
|
+
return r.set(t.value, i), Wr.push(i), n;
|
|
2098
2098
|
},
|
|
2099
2099
|
guard(e) {
|
|
2100
2100
|
var t;
|
|
2101
2101
|
(t = e._zod).deferred ?? (t.deferred = []), e._zod.deferred.push(() => {
|
|
2102
2102
|
let t = e._zod.parse, n = (e, n) => {
|
|
2103
|
-
if (n.direction !== "backward" &&
|
|
2103
|
+
if (n.direction !== "backward" && qr(n, e.value)) throw new Ir();
|
|
2104
2104
|
return t(e, n);
|
|
2105
2105
|
};
|
|
2106
2106
|
e._zod.parse = n, e._zod.run === t && (e._zod.run = n);
|
|
@@ -2111,38 +2111,38 @@ var Wr, Gr = [], Kr = {
|
|
|
2111
2111
|
let n, r, i;
|
|
2112
2112
|
(t = e._zod).deferred ?? (t.deferred = []), e._zod.deferred.push(() => {
|
|
2113
2113
|
let t = e._zod.parse, a = (o, s) => {
|
|
2114
|
-
if (n === void 0 && (n =
|
|
2114
|
+
if (n === void 0 && (n = Vr(e, /* @__PURE__ */ new Set()), !n)) return e._zod.parse = t, e._zod.run === a && (e._zod.run = t), t(o, s);
|
|
2115
2115
|
let c = o.value;
|
|
2116
2116
|
if (typeof c != "object" || !c) return t(o, s);
|
|
2117
|
-
let l = s[
|
|
2117
|
+
let l = s[Lr];
|
|
2118
2118
|
l || (l = {
|
|
2119
2119
|
buckets: /* @__PURE__ */ new Map(),
|
|
2120
2120
|
backEdges: void 0
|
|
2121
|
-
}, s[
|
|
2121
|
+
}, s[Lr] = l);
|
|
2122
2122
|
let u;
|
|
2123
|
-
r === s ? u = i : (u =
|
|
2123
|
+
r === s ? u = i : (u = Hr(l, e), r = s, i = u);
|
|
2124
2124
|
let d = u.get(c);
|
|
2125
|
-
if (d) return o.value = d.value, d.issues ? d.issues.length && o.issues.push(...
|
|
2126
|
-
|
|
2127
|
-
let f =
|
|
2128
|
-
|
|
2129
|
-
let m =
|
|
2130
|
-
return p instanceof Promise ? p.then((e) => (m && (m.issues = e.issues.length ?
|
|
2125
|
+
if (d) return o.value = d.value, d.issues ? d.issues.length && o.issues.push(...zr(d.issues)) : (o.memo = !0, l.backEdges ?? (l.backEdges = /* @__PURE__ */ new Set()), l.backEdges.add(d.value)), o;
|
|
2126
|
+
Ur = u;
|
|
2127
|
+
let f = Wr.length, p = t(o, s);
|
|
2128
|
+
Ur = void 0;
|
|
2129
|
+
let m = Wr.length > f ? Wr.pop() : void 0;
|
|
2130
|
+
return p instanceof Promise ? p.then((e) => (m && (m.issues = e.issues.length ? zr(e.issues) : Rr), e)) : (m && (m.issues = p.issues.length ? zr(p.issues) : Rr), p);
|
|
2131
2131
|
};
|
|
2132
2132
|
e._zod.parse = a, e._zod.run === t && (e._zod.run = a);
|
|
2133
2133
|
});
|
|
2134
2134
|
}
|
|
2135
2135
|
};
|
|
2136
|
-
function
|
|
2137
|
-
return
|
|
2136
|
+
function Kr() {
|
|
2137
|
+
return Gr;
|
|
2138
2138
|
}
|
|
2139
|
-
function
|
|
2140
|
-
let n = e[
|
|
2139
|
+
function qr(e, t) {
|
|
2140
|
+
let n = e[Lr]?.backEdges;
|
|
2141
2141
|
return n !== void 0 && typeof t == "object" && !!t && n.has(t);
|
|
2142
2142
|
}
|
|
2143
2143
|
//#endregion
|
|
2144
2144
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/locales/en.js
|
|
2145
|
-
var
|
|
2145
|
+
var Jr = () => {
|
|
2146
2146
|
let e = {
|
|
2147
2147
|
string: {
|
|
2148
2148
|
unit: "characters",
|
|
@@ -2205,7 +2205,7 @@ var Yr = () => {
|
|
|
2205
2205
|
}
|
|
2206
2206
|
return (e) => {
|
|
2207
2207
|
switch (e.code) {
|
|
2208
|
-
case "invalid_type": return `Invalid input: expected ${a(e.expected)}, received ${a(
|
|
2208
|
+
case "invalid_type": return `Invalid input: expected ${a(e.expected)}, received ${a(xe(e.input), e.input)}`;
|
|
2209
2209
|
case "invalid_value": return e.values.length === 1 ? `Invalid input: expected ${ae(e.values[0])}` : `Invalid option: expected one of ${r(e.values, "|")}`;
|
|
2210
2210
|
case "too_big": {
|
|
2211
2211
|
let n = e.exact ? "exactly " : e.inclusive ? "<=" : "<", r = t(e.origin);
|
|
@@ -2228,12 +2228,12 @@ var Yr = () => {
|
|
|
2228
2228
|
}
|
|
2229
2229
|
};
|
|
2230
2230
|
};
|
|
2231
|
-
function
|
|
2232
|
-
return { localeError:
|
|
2231
|
+
function Yr() {
|
|
2232
|
+
return { localeError: Jr() };
|
|
2233
2233
|
}
|
|
2234
2234
|
//#endregion
|
|
2235
2235
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/registries.js
|
|
2236
|
-
var
|
|
2236
|
+
var Xr, Zr = class {
|
|
2237
2237
|
constructor() {
|
|
2238
2238
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
2239
2239
|
}
|
|
@@ -2265,22 +2265,22 @@ var Zr, Qr = class {
|
|
|
2265
2265
|
return this._map.has(e);
|
|
2266
2266
|
}
|
|
2267
2267
|
};
|
|
2268
|
-
function
|
|
2269
|
-
return new
|
|
2268
|
+
function Qr() {
|
|
2269
|
+
return new Zr();
|
|
2270
2270
|
}
|
|
2271
|
-
(
|
|
2272
|
-
var
|
|
2271
|
+
(Xr = globalThis).__zod_globalRegistry ?? (Xr.__zod_globalRegistry = Qr());
|
|
2272
|
+
var $r = globalThis.__zod_globalRegistry;
|
|
2273
2273
|
//#endregion
|
|
2274
2274
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/api.js
|
|
2275
2275
|
// @__NO_SIDE_EFFECTS__
|
|
2276
|
-
function
|
|
2276
|
+
function ei(e, t) {
|
|
2277
2277
|
return new e({
|
|
2278
2278
|
type: "string",
|
|
2279
2279
|
...v(t)
|
|
2280
2280
|
});
|
|
2281
2281
|
}
|
|
2282
2282
|
// @__NO_SIDE_EFFECTS__
|
|
2283
|
-
function
|
|
2283
|
+
function ti(e, t) {
|
|
2284
2284
|
return new e({
|
|
2285
2285
|
type: "string",
|
|
2286
2286
|
format: "email",
|
|
@@ -2290,7 +2290,7 @@ function ni(e, t) {
|
|
|
2290
2290
|
});
|
|
2291
2291
|
}
|
|
2292
2292
|
// @__NO_SIDE_EFFECTS__
|
|
2293
|
-
function
|
|
2293
|
+
function ni(e, t) {
|
|
2294
2294
|
return new e({
|
|
2295
2295
|
type: "string",
|
|
2296
2296
|
format: "guid",
|
|
@@ -2300,7 +2300,7 @@ function ri(e, t) {
|
|
|
2300
2300
|
});
|
|
2301
2301
|
}
|
|
2302
2302
|
// @__NO_SIDE_EFFECTS__
|
|
2303
|
-
function
|
|
2303
|
+
function ri(e, t) {
|
|
2304
2304
|
return new e({
|
|
2305
2305
|
type: "string",
|
|
2306
2306
|
format: "uuid",
|
|
@@ -2310,7 +2310,7 @@ function ii(e, t) {
|
|
|
2310
2310
|
});
|
|
2311
2311
|
}
|
|
2312
2312
|
// @__NO_SIDE_EFFECTS__
|
|
2313
|
-
function
|
|
2313
|
+
function ii(e, t) {
|
|
2314
2314
|
return new e({
|
|
2315
2315
|
type: "string",
|
|
2316
2316
|
format: "uuid",
|
|
@@ -2321,7 +2321,7 @@ function ai(e, t) {
|
|
|
2321
2321
|
});
|
|
2322
2322
|
}
|
|
2323
2323
|
// @__NO_SIDE_EFFECTS__
|
|
2324
|
-
function
|
|
2324
|
+
function ai(e, t) {
|
|
2325
2325
|
return new e({
|
|
2326
2326
|
type: "string",
|
|
2327
2327
|
format: "uuid",
|
|
@@ -2332,7 +2332,7 @@ function oi(e, t) {
|
|
|
2332
2332
|
});
|
|
2333
2333
|
}
|
|
2334
2334
|
// @__NO_SIDE_EFFECTS__
|
|
2335
|
-
function
|
|
2335
|
+
function oi(e, t) {
|
|
2336
2336
|
return new e({
|
|
2337
2337
|
type: "string",
|
|
2338
2338
|
format: "uuid",
|
|
@@ -2343,7 +2343,7 @@ function si(e, t) {
|
|
|
2343
2343
|
});
|
|
2344
2344
|
}
|
|
2345
2345
|
// @__NO_SIDE_EFFECTS__
|
|
2346
|
-
function
|
|
2346
|
+
function si(e, t) {
|
|
2347
2347
|
return new e({
|
|
2348
2348
|
type: "string",
|
|
2349
2349
|
format: "url",
|
|
@@ -2353,7 +2353,7 @@ function ci(e, t) {
|
|
|
2353
2353
|
});
|
|
2354
2354
|
}
|
|
2355
2355
|
// @__NO_SIDE_EFFECTS__
|
|
2356
|
-
function
|
|
2356
|
+
function ci(e, t) {
|
|
2357
2357
|
return new e({
|
|
2358
2358
|
type: "string",
|
|
2359
2359
|
format: "emoji",
|
|
@@ -2363,7 +2363,7 @@ function li(e, t) {
|
|
|
2363
2363
|
});
|
|
2364
2364
|
}
|
|
2365
2365
|
// @__NO_SIDE_EFFECTS__
|
|
2366
|
-
function
|
|
2366
|
+
function li(e, t) {
|
|
2367
2367
|
return new e({
|
|
2368
2368
|
type: "string",
|
|
2369
2369
|
format: "nanoid",
|
|
@@ -2373,7 +2373,7 @@ function ui(e, t) {
|
|
|
2373
2373
|
});
|
|
2374
2374
|
}
|
|
2375
2375
|
// @__NO_SIDE_EFFECTS__
|
|
2376
|
-
function
|
|
2376
|
+
function ui(e, t) {
|
|
2377
2377
|
return new e({
|
|
2378
2378
|
type: "string",
|
|
2379
2379
|
format: "cuid",
|
|
@@ -2383,7 +2383,7 @@ function di(e, t) {
|
|
|
2383
2383
|
});
|
|
2384
2384
|
}
|
|
2385
2385
|
// @__NO_SIDE_EFFECTS__
|
|
2386
|
-
function
|
|
2386
|
+
function di(e, t) {
|
|
2387
2387
|
return new e({
|
|
2388
2388
|
type: "string",
|
|
2389
2389
|
format: "cuid2",
|
|
@@ -2393,7 +2393,7 @@ function fi(e, t) {
|
|
|
2393
2393
|
});
|
|
2394
2394
|
}
|
|
2395
2395
|
// @__NO_SIDE_EFFECTS__
|
|
2396
|
-
function
|
|
2396
|
+
function fi(e, t) {
|
|
2397
2397
|
return new e({
|
|
2398
2398
|
type: "string",
|
|
2399
2399
|
format: "ulid",
|
|
@@ -2403,7 +2403,7 @@ function pi(e, t) {
|
|
|
2403
2403
|
});
|
|
2404
2404
|
}
|
|
2405
2405
|
// @__NO_SIDE_EFFECTS__
|
|
2406
|
-
function
|
|
2406
|
+
function pi(e, t) {
|
|
2407
2407
|
return new e({
|
|
2408
2408
|
type: "string",
|
|
2409
2409
|
format: "xid",
|
|
@@ -2413,7 +2413,7 @@ function mi(e, t) {
|
|
|
2413
2413
|
});
|
|
2414
2414
|
}
|
|
2415
2415
|
// @__NO_SIDE_EFFECTS__
|
|
2416
|
-
function
|
|
2416
|
+
function mi(e, t) {
|
|
2417
2417
|
return new e({
|
|
2418
2418
|
type: "string",
|
|
2419
2419
|
format: "ksuid",
|
|
@@ -2423,7 +2423,7 @@ function hi(e, t) {
|
|
|
2423
2423
|
});
|
|
2424
2424
|
}
|
|
2425
2425
|
// @__NO_SIDE_EFFECTS__
|
|
2426
|
-
function
|
|
2426
|
+
function hi(e, t) {
|
|
2427
2427
|
return new e({
|
|
2428
2428
|
type: "string",
|
|
2429
2429
|
format: "ipv4",
|
|
@@ -2433,7 +2433,7 @@ function gi(e, t) {
|
|
|
2433
2433
|
});
|
|
2434
2434
|
}
|
|
2435
2435
|
// @__NO_SIDE_EFFECTS__
|
|
2436
|
-
function
|
|
2436
|
+
function gi(e, t) {
|
|
2437
2437
|
return new e({
|
|
2438
2438
|
type: "string",
|
|
2439
2439
|
format: "ipv6",
|
|
@@ -2443,7 +2443,7 @@ function _i(e, t) {
|
|
|
2443
2443
|
});
|
|
2444
2444
|
}
|
|
2445
2445
|
// @__NO_SIDE_EFFECTS__
|
|
2446
|
-
function
|
|
2446
|
+
function _i(e, t) {
|
|
2447
2447
|
return new e({
|
|
2448
2448
|
type: "string",
|
|
2449
2449
|
format: "cidrv4",
|
|
@@ -2453,7 +2453,7 @@ function vi(e, t) {
|
|
|
2453
2453
|
});
|
|
2454
2454
|
}
|
|
2455
2455
|
// @__NO_SIDE_EFFECTS__
|
|
2456
|
-
function
|
|
2456
|
+
function vi(e, t) {
|
|
2457
2457
|
return new e({
|
|
2458
2458
|
type: "string",
|
|
2459
2459
|
format: "cidrv6",
|
|
@@ -2463,7 +2463,7 @@ function yi(e, t) {
|
|
|
2463
2463
|
});
|
|
2464
2464
|
}
|
|
2465
2465
|
// @__NO_SIDE_EFFECTS__
|
|
2466
|
-
function
|
|
2466
|
+
function yi(e, t) {
|
|
2467
2467
|
return new e({
|
|
2468
2468
|
type: "string",
|
|
2469
2469
|
format: "base64",
|
|
@@ -2473,7 +2473,7 @@ function bi(e, t) {
|
|
|
2473
2473
|
});
|
|
2474
2474
|
}
|
|
2475
2475
|
// @__NO_SIDE_EFFECTS__
|
|
2476
|
-
function
|
|
2476
|
+
function bi(e, t) {
|
|
2477
2477
|
return new e({
|
|
2478
2478
|
type: "string",
|
|
2479
2479
|
format: "base64url",
|
|
@@ -2483,7 +2483,7 @@ function xi(e, t) {
|
|
|
2483
2483
|
});
|
|
2484
2484
|
}
|
|
2485
2485
|
// @__NO_SIDE_EFFECTS__
|
|
2486
|
-
function
|
|
2486
|
+
function xi(e, t) {
|
|
2487
2487
|
return new e({
|
|
2488
2488
|
type: "string",
|
|
2489
2489
|
format: "e164",
|
|
@@ -2493,7 +2493,7 @@ function Si(e, t) {
|
|
|
2493
2493
|
});
|
|
2494
2494
|
}
|
|
2495
2495
|
// @__NO_SIDE_EFFECTS__
|
|
2496
|
-
function
|
|
2496
|
+
function Si(e, t) {
|
|
2497
2497
|
return new e({
|
|
2498
2498
|
type: "string",
|
|
2499
2499
|
format: "jwt",
|
|
@@ -2503,7 +2503,7 @@ function Ci(e, t) {
|
|
|
2503
2503
|
});
|
|
2504
2504
|
}
|
|
2505
2505
|
// @__NO_SIDE_EFFECTS__
|
|
2506
|
-
function
|
|
2506
|
+
function Ci(e, t) {
|
|
2507
2507
|
return new e({
|
|
2508
2508
|
type: "string",
|
|
2509
2509
|
format: "datetime",
|
|
@@ -2515,7 +2515,7 @@ function wi(e, t) {
|
|
|
2515
2515
|
});
|
|
2516
2516
|
}
|
|
2517
2517
|
// @__NO_SIDE_EFFECTS__
|
|
2518
|
-
function
|
|
2518
|
+
function wi(e, t) {
|
|
2519
2519
|
return new e({
|
|
2520
2520
|
type: "string",
|
|
2521
2521
|
format: "date",
|
|
@@ -2524,7 +2524,7 @@ function Ti(e, t) {
|
|
|
2524
2524
|
});
|
|
2525
2525
|
}
|
|
2526
2526
|
// @__NO_SIDE_EFFECTS__
|
|
2527
|
-
function
|
|
2527
|
+
function Ti(e, t) {
|
|
2528
2528
|
return new e({
|
|
2529
2529
|
type: "string",
|
|
2530
2530
|
format: "time",
|
|
@@ -2534,7 +2534,7 @@ function Ei(e, t) {
|
|
|
2534
2534
|
});
|
|
2535
2535
|
}
|
|
2536
2536
|
// @__NO_SIDE_EFFECTS__
|
|
2537
|
-
function
|
|
2537
|
+
function Ei(e, t) {
|
|
2538
2538
|
return new e({
|
|
2539
2539
|
type: "string",
|
|
2540
2540
|
format: "duration",
|
|
@@ -2543,7 +2543,7 @@ function Di(e, t) {
|
|
|
2543
2543
|
});
|
|
2544
2544
|
}
|
|
2545
2545
|
// @__NO_SIDE_EFFECTS__
|
|
2546
|
-
function
|
|
2546
|
+
function Di(e, t) {
|
|
2547
2547
|
return new e({
|
|
2548
2548
|
type: "number",
|
|
2549
2549
|
checks: [],
|
|
@@ -2551,7 +2551,7 @@ function Oi(e, t) {
|
|
|
2551
2551
|
});
|
|
2552
2552
|
}
|
|
2553
2553
|
// @__NO_SIDE_EFFECTS__
|
|
2554
|
-
function
|
|
2554
|
+
function Oi(e, t) {
|
|
2555
2555
|
return new e({
|
|
2556
2556
|
type: "number",
|
|
2557
2557
|
check: "number_format",
|
|
@@ -2561,33 +2561,33 @@ function ki(e, t) {
|
|
|
2561
2561
|
});
|
|
2562
2562
|
}
|
|
2563
2563
|
// @__NO_SIDE_EFFECTS__
|
|
2564
|
-
function
|
|
2564
|
+
function ki(e, t) {
|
|
2565
2565
|
return new e({
|
|
2566
2566
|
type: "boolean",
|
|
2567
2567
|
...v(t)
|
|
2568
2568
|
});
|
|
2569
2569
|
}
|
|
2570
2570
|
// @__NO_SIDE_EFFECTS__
|
|
2571
|
-
function
|
|
2571
|
+
function Ai(e, t) {
|
|
2572
2572
|
return new e({
|
|
2573
2573
|
type: "null",
|
|
2574
2574
|
...v(t)
|
|
2575
2575
|
});
|
|
2576
2576
|
}
|
|
2577
2577
|
// @__NO_SIDE_EFFECTS__
|
|
2578
|
-
function
|
|
2578
|
+
function ji(e) {
|
|
2579
2579
|
return new e({ type: "unknown" });
|
|
2580
2580
|
}
|
|
2581
2581
|
// @__NO_SIDE_EFFECTS__
|
|
2582
|
-
function
|
|
2582
|
+
function Mi(e, t) {
|
|
2583
2583
|
return new e({
|
|
2584
2584
|
type: "never",
|
|
2585
2585
|
...v(t)
|
|
2586
2586
|
});
|
|
2587
2587
|
}
|
|
2588
2588
|
// @__NO_SIDE_EFFECTS__
|
|
2589
|
-
function
|
|
2590
|
-
return new
|
|
2589
|
+
function Ni(e, t) {
|
|
2590
|
+
return new qt({
|
|
2591
2591
|
check: "less_than",
|
|
2592
2592
|
...v(t),
|
|
2593
2593
|
value: e,
|
|
@@ -2595,8 +2595,8 @@ function Pi(e, t) {
|
|
|
2595
2595
|
});
|
|
2596
2596
|
}
|
|
2597
2597
|
// @__NO_SIDE_EFFECTS__
|
|
2598
|
-
function
|
|
2599
|
-
return new
|
|
2598
|
+
function Pi(e, t) {
|
|
2599
|
+
return new qt({
|
|
2600
2600
|
check: "less_than",
|
|
2601
2601
|
...v(t),
|
|
2602
2602
|
value: e,
|
|
@@ -2604,8 +2604,8 @@ function Fi(e, t) {
|
|
|
2604
2604
|
});
|
|
2605
2605
|
}
|
|
2606
2606
|
// @__NO_SIDE_EFFECTS__
|
|
2607
|
-
function
|
|
2608
|
-
return new
|
|
2607
|
+
function Fi(e, t) {
|
|
2608
|
+
return new Jt({
|
|
2609
2609
|
check: "greater_than",
|
|
2610
2610
|
...v(t),
|
|
2611
2611
|
value: e,
|
|
@@ -2613,8 +2613,8 @@ function Ii(e, t) {
|
|
|
2613
2613
|
});
|
|
2614
2614
|
}
|
|
2615
2615
|
// @__NO_SIDE_EFFECTS__
|
|
2616
|
-
function
|
|
2617
|
-
return new
|
|
2616
|
+
function Ii(e, t) {
|
|
2617
|
+
return new Jt({
|
|
2618
2618
|
check: "greater_than",
|
|
2619
2619
|
...v(t),
|
|
2620
2620
|
value: e,
|
|
@@ -2622,40 +2622,40 @@ function Li(e, t) {
|
|
|
2622
2622
|
});
|
|
2623
2623
|
}
|
|
2624
2624
|
// @__NO_SIDE_EFFECTS__
|
|
2625
|
-
function
|
|
2626
|
-
return new
|
|
2625
|
+
function Li(e, t) {
|
|
2626
|
+
return new Yt({
|
|
2627
2627
|
check: "multiple_of",
|
|
2628
2628
|
...v(t),
|
|
2629
2629
|
value: e
|
|
2630
2630
|
});
|
|
2631
2631
|
}
|
|
2632
2632
|
// @__NO_SIDE_EFFECTS__
|
|
2633
|
-
function
|
|
2634
|
-
return new
|
|
2633
|
+
function Ri(e, t) {
|
|
2634
|
+
return new Zt({
|
|
2635
2635
|
check: "max_length",
|
|
2636
2636
|
...v(t),
|
|
2637
2637
|
maximum: e
|
|
2638
2638
|
});
|
|
2639
2639
|
}
|
|
2640
2640
|
// @__NO_SIDE_EFFECTS__
|
|
2641
|
-
function
|
|
2642
|
-
return new
|
|
2641
|
+
function zi(e, t) {
|
|
2642
|
+
return new Qt({
|
|
2643
2643
|
check: "min_length",
|
|
2644
2644
|
...v(t),
|
|
2645
2645
|
minimum: e
|
|
2646
2646
|
});
|
|
2647
2647
|
}
|
|
2648
2648
|
// @__NO_SIDE_EFFECTS__
|
|
2649
|
-
function
|
|
2650
|
-
return new
|
|
2649
|
+
function Bi(e, t) {
|
|
2650
|
+
return new $t({
|
|
2651
2651
|
check: "length_equals",
|
|
2652
2652
|
...v(t),
|
|
2653
2653
|
length: e
|
|
2654
2654
|
});
|
|
2655
2655
|
}
|
|
2656
2656
|
// @__NO_SIDE_EFFECTS__
|
|
2657
|
-
function
|
|
2658
|
-
return new
|
|
2657
|
+
function Vi(e, t) {
|
|
2658
|
+
return new tn({
|
|
2659
2659
|
check: "string_format",
|
|
2660
2660
|
format: "regex",
|
|
2661
2661
|
...v(t),
|
|
@@ -2663,24 +2663,24 @@ function Hi(e, t) {
|
|
|
2663
2663
|
});
|
|
2664
2664
|
}
|
|
2665
2665
|
// @__NO_SIDE_EFFECTS__
|
|
2666
|
-
function
|
|
2667
|
-
return new
|
|
2666
|
+
function Hi(e) {
|
|
2667
|
+
return new nn({
|
|
2668
2668
|
check: "string_format",
|
|
2669
2669
|
format: "lowercase",
|
|
2670
2670
|
...v(e)
|
|
2671
2671
|
});
|
|
2672
2672
|
}
|
|
2673
2673
|
// @__NO_SIDE_EFFECTS__
|
|
2674
|
-
function
|
|
2675
|
-
return new
|
|
2674
|
+
function Ui(e) {
|
|
2675
|
+
return new rn({
|
|
2676
2676
|
check: "string_format",
|
|
2677
2677
|
format: "uppercase",
|
|
2678
2678
|
...v(e)
|
|
2679
2679
|
});
|
|
2680
2680
|
}
|
|
2681
2681
|
// @__NO_SIDE_EFFECTS__
|
|
2682
|
-
function
|
|
2683
|
-
return new
|
|
2682
|
+
function Wi(e, t) {
|
|
2683
|
+
return new an({
|
|
2684
2684
|
check: "string_format",
|
|
2685
2685
|
format: "includes",
|
|
2686
2686
|
...v(t),
|
|
@@ -2688,8 +2688,8 @@ function Gi(e, t) {
|
|
|
2688
2688
|
});
|
|
2689
2689
|
}
|
|
2690
2690
|
// @__NO_SIDE_EFFECTS__
|
|
2691
|
-
function
|
|
2692
|
-
return new
|
|
2691
|
+
function Gi(e, t) {
|
|
2692
|
+
return new on({
|
|
2693
2693
|
check: "string_format",
|
|
2694
2694
|
format: "starts_with",
|
|
2695
2695
|
...v(t),
|
|
@@ -2697,8 +2697,8 @@ function Ki(e, t) {
|
|
|
2697
2697
|
});
|
|
2698
2698
|
}
|
|
2699
2699
|
// @__NO_SIDE_EFFECTS__
|
|
2700
|
-
function
|
|
2701
|
-
return new
|
|
2700
|
+
function Ki(e, t) {
|
|
2701
|
+
return new sn({
|
|
2702
2702
|
check: "string_format",
|
|
2703
2703
|
format: "ends_with",
|
|
2704
2704
|
...v(t),
|
|
@@ -2706,34 +2706,34 @@ function qi(e, t) {
|
|
|
2706
2706
|
});
|
|
2707
2707
|
}
|
|
2708
2708
|
// @__NO_SIDE_EFFECTS__
|
|
2709
|
-
function
|
|
2710
|
-
return new
|
|
2709
|
+
function qi(e) {
|
|
2710
|
+
return new cn({
|
|
2711
2711
|
check: "overwrite",
|
|
2712
2712
|
tx: e
|
|
2713
2713
|
});
|
|
2714
2714
|
}
|
|
2715
2715
|
// @__NO_SIDE_EFFECTS__
|
|
2716
|
-
function
|
|
2717
|
-
return /* @__PURE__ */
|
|
2716
|
+
function Ji(e) {
|
|
2717
|
+
return /* @__PURE__ */ qi((t) => t.normalize(e));
|
|
2718
|
+
}
|
|
2719
|
+
// @__NO_SIDE_EFFECTS__
|
|
2720
|
+
function Yi() {
|
|
2721
|
+
return /* @__PURE__ */ qi((e) => e.trim());
|
|
2718
2722
|
}
|
|
2719
2723
|
// @__NO_SIDE_EFFECTS__
|
|
2720
2724
|
function Xi() {
|
|
2721
|
-
return /* @__PURE__ */
|
|
2725
|
+
return /* @__PURE__ */ qi((e) => e.toLowerCase());
|
|
2722
2726
|
}
|
|
2723
2727
|
// @__NO_SIDE_EFFECTS__
|
|
2724
2728
|
function Zi() {
|
|
2725
|
-
return /* @__PURE__ */
|
|
2729
|
+
return /* @__PURE__ */ qi((e) => e.toUpperCase());
|
|
2726
2730
|
}
|
|
2727
2731
|
// @__NO_SIDE_EFFECTS__
|
|
2728
2732
|
function Qi() {
|
|
2729
|
-
return /* @__PURE__ */
|
|
2730
|
-
}
|
|
2731
|
-
// @__NO_SIDE_EFFECTS__
|
|
2732
|
-
function $i() {
|
|
2733
|
-
return /* @__PURE__ */ Ji((e) => m(e));
|
|
2733
|
+
return /* @__PURE__ */ qi((e) => m(e));
|
|
2734
2734
|
}
|
|
2735
2735
|
// @__NO_SIDE_EFFECTS__
|
|
2736
|
-
function
|
|
2736
|
+
function $i(e, t, n) {
|
|
2737
2737
|
return new e({
|
|
2738
2738
|
type: "array",
|
|
2739
2739
|
element: t,
|
|
@@ -2741,7 +2741,7 @@ function ea(e, t, n) {
|
|
|
2741
2741
|
});
|
|
2742
2742
|
}
|
|
2743
2743
|
// @__NO_SIDE_EFFECTS__
|
|
2744
|
-
function
|
|
2744
|
+
function ea(e, t, n) {
|
|
2745
2745
|
return new e({
|
|
2746
2746
|
type: "custom",
|
|
2747
2747
|
check: "custom",
|
|
@@ -2750,19 +2750,19 @@ function ta(e, t, n) {
|
|
|
2750
2750
|
});
|
|
2751
2751
|
}
|
|
2752
2752
|
// @__NO_SIDE_EFFECTS__
|
|
2753
|
-
function
|
|
2754
|
-
let n = /* @__PURE__ */
|
|
2755
|
-
if (typeof e == "string") t.issues.push(
|
|
2753
|
+
function ta(e, t) {
|
|
2754
|
+
let n = /* @__PURE__ */ na((t) => (t.addIssue = (e) => {
|
|
2755
|
+
if (typeof e == "string") t.issues.push(Se(e, t.value, n._zod.def));
|
|
2756
2756
|
else {
|
|
2757
2757
|
let r = e;
|
|
2758
|
-
r.fatal && (r.continue = !1), r.code ??= "custom", "input" in r || (r.input = t.value), r.inst ??= n, r.continue ??= !n._zod.def.abort, t.issues.push(
|
|
2758
|
+
r.fatal && (r.continue = !1), r.code ??= "custom", "input" in r || (r.input = t.value), r.inst ??= n, r.continue ??= !n._zod.def.abort, t.issues.push(Se(r));
|
|
2759
2759
|
}
|
|
2760
2760
|
}, e(t.value, t)), t);
|
|
2761
2761
|
return n;
|
|
2762
2762
|
}
|
|
2763
2763
|
// @__NO_SIDE_EFFECTS__
|
|
2764
|
-
function
|
|
2765
|
-
let n = new
|
|
2764
|
+
function na(e, t) {
|
|
2765
|
+
let n = new O({
|
|
2766
2766
|
check: "custom",
|
|
2767
2767
|
...v(t)
|
|
2768
2768
|
});
|
|
@@ -2770,15 +2770,15 @@ function ra(e, t) {
|
|
|
2770
2770
|
}
|
|
2771
2771
|
//#endregion
|
|
2772
2772
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/to-json-schema.js
|
|
2773
|
-
function
|
|
2773
|
+
function ra(e, ...t) {
|
|
2774
2774
|
for (let n of t) for (let t of Reflect.ownKeys(n)) Object.prototype.propertyIsEnumerable.call(n, t) && d(e, t, n[t]);
|
|
2775
2775
|
return e;
|
|
2776
2776
|
}
|
|
2777
|
-
function
|
|
2777
|
+
function ia(e) {
|
|
2778
2778
|
let t = e?.target ?? "draft-2020-12";
|
|
2779
2779
|
return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
|
|
2780
2780
|
processors: e.processors ?? {},
|
|
2781
|
-
metadataRegistry: e?.metadata ??
|
|
2781
|
+
metadataRegistry: e?.metadata ?? $r,
|
|
2782
2782
|
target: t,
|
|
2783
2783
|
unrepresentable: e?.unrepresentable ?? "throw",
|
|
2784
2784
|
override: e?.override ?? (() => {}),
|
|
@@ -2794,7 +2794,7 @@ function aa(e) {
|
|
|
2794
2794
|
external: e?.external ?? void 0
|
|
2795
2795
|
};
|
|
2796
2796
|
}
|
|
2797
|
-
function
|
|
2797
|
+
function j(e, t, n, r, i) {
|
|
2798
2798
|
let a = typeof t.unrepresentable == "function" ? t.unrepresentable({
|
|
2799
2799
|
zodSchema: e,
|
|
2800
2800
|
path: r.path,
|
|
@@ -2804,7 +2804,7 @@ function A(e, t, n, r, i) {
|
|
|
2804
2804
|
if (a === void 0 || a === "throw") throw Error(i);
|
|
2805
2805
|
return Object.assign(n, a), !0;
|
|
2806
2806
|
}
|
|
2807
|
-
function
|
|
2807
|
+
function M(e, t, n = {
|
|
2808
2808
|
path: [],
|
|
2809
2809
|
schemaPath: []
|
|
2810
2810
|
}) {
|
|
@@ -2833,15 +2833,15 @@ function j(e, t, n = {
|
|
|
2833
2833
|
a(e, t, n, r);
|
|
2834
2834
|
}
|
|
2835
2835
|
let a = e._zod.parent;
|
|
2836
|
-
a && (o.ref ||= a,
|
|
2836
|
+
a && (o.ref ||= a, M(a, t, r), t.seen.get(a).isParent = !0);
|
|
2837
2837
|
}
|
|
2838
2838
|
let c = t.metadataRegistry.get(e);
|
|
2839
|
-
return c &&
|
|
2839
|
+
return c && ra(o.schema, c), t.io === "input" && N(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;
|
|
2840
2840
|
}
|
|
2841
|
-
function
|
|
2841
|
+
function aa(e) {
|
|
2842
2842
|
return e.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
2843
2843
|
}
|
|
2844
|
-
function
|
|
2844
|
+
function oa(e, t) {
|
|
2845
2845
|
let n = e.seen.get(t);
|
|
2846
2846
|
if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
|
|
2847
2847
|
if (e.external && e.sharedDefsExtractedFor === e.external) return;
|
|
@@ -2862,7 +2862,7 @@ function sa(e, t) {
|
|
|
2862
2862
|
let a = t[1].defId ?? t[1].schema.id ?? `schema${e.counter++}`;
|
|
2863
2863
|
return t[1].defId = a, {
|
|
2864
2864
|
defId: a,
|
|
2865
|
-
ref: `${i("__shared")}#/${r}/${
|
|
2865
|
+
ref: `${i("__shared")}#/${r}/${aa(a)}`
|
|
2866
2866
|
};
|
|
2867
2867
|
}
|
|
2868
2868
|
let i = `#/${r}/`;
|
|
@@ -2870,7 +2870,7 @@ function sa(e, t) {
|
|
|
2870
2870
|
let a = t[1].schema.id ?? `__schema${e.counter++}`;
|
|
2871
2871
|
return {
|
|
2872
2872
|
defId: a,
|
|
2873
|
-
ref: i +
|
|
2873
|
+
ref: i + aa(a)
|
|
2874
2874
|
};
|
|
2875
2875
|
}, a = (e) => {
|
|
2876
2876
|
if (e[1].schema.$ref) return;
|
|
@@ -2914,13 +2914,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
2914
2914
|
}
|
|
2915
2915
|
e.external && (e.sharedDefsExtractedFor = e.external);
|
|
2916
2916
|
}
|
|
2917
|
-
function
|
|
2917
|
+
function sa(e) {
|
|
2918
2918
|
let t = e.anyOf;
|
|
2919
2919
|
if (!Array.isArray(t) || t.length === 0 || e.type !== void 0) return;
|
|
2920
2920
|
let n = [];
|
|
2921
2921
|
for (let e of t) {
|
|
2922
2922
|
if (!e || typeof e != "object") return;
|
|
2923
|
-
|
|
2923
|
+
sa(e);
|
|
2924
2924
|
let t = Object.keys(e);
|
|
2925
2925
|
if (t.length !== 1 || t[0] !== "type") return;
|
|
2926
2926
|
let r = e.type;
|
|
@@ -2931,21 +2931,21 @@ function ca(e) {
|
|
|
2931
2931
|
}
|
|
2932
2932
|
delete e.anyOf, e.type = n.length === 1 ? n[0] : n;
|
|
2933
2933
|
}
|
|
2934
|
-
var
|
|
2934
|
+
var ca = /* @__PURE__ */ new Set([
|
|
2935
2935
|
"type",
|
|
2936
2936
|
"properties",
|
|
2937
2937
|
"required",
|
|
2938
2938
|
"additionalProperties"
|
|
2939
|
-
]),
|
|
2940
|
-
function
|
|
2939
|
+
]), la = ["oneOf", "anyOf"];
|
|
2940
|
+
function ua(e) {
|
|
2941
2941
|
let t = e.additionalProperties;
|
|
2942
2942
|
return t === void 0 || t === !1 || typeof t != "object" || !t ? null : Object.keys(t).length ? t : null;
|
|
2943
2943
|
}
|
|
2944
|
-
function
|
|
2944
|
+
function da(e) {
|
|
2945
2945
|
let t = [];
|
|
2946
2946
|
for (let n of e) {
|
|
2947
2947
|
if (typeof n != "object" || n.type !== "object") return null;
|
|
2948
|
-
for (let e in n) if (!
|
|
2948
|
+
for (let e in n) if (!ca.has(e)) return null;
|
|
2949
2949
|
t.push(n);
|
|
2950
2950
|
}
|
|
2951
2951
|
let n = {}, r = /* @__PURE__ */ new Set();
|
|
@@ -2954,10 +2954,10 @@ function fa(e) {
|
|
|
2954
2954
|
if (Object.prototype.hasOwnProperty.call(n, r)) continue;
|
|
2955
2955
|
let e = [];
|
|
2956
2956
|
for (let n of t) {
|
|
2957
|
-
let t = n.properties?.[r] ??
|
|
2957
|
+
let t = n.properties?.[r] ?? ua(n);
|
|
2958
2958
|
t != null && (e.some((e) => JSON.stringify(e) === JSON.stringify(t)) || e.push(t));
|
|
2959
2959
|
}
|
|
2960
|
-
d(n, r, e.length === 1 ? e[0] :
|
|
2960
|
+
d(n, r, e.length === 1 ? e[0] : da(e) ?? { allOf: e });
|
|
2961
2961
|
}
|
|
2962
2962
|
for (let t of e.required ?? []) r.add(t);
|
|
2963
2963
|
}
|
|
@@ -2969,29 +2969,29 @@ function fa(e) {
|
|
|
2969
2969
|
else {
|
|
2970
2970
|
let e = [];
|
|
2971
2971
|
for (let n of t) {
|
|
2972
|
-
let t =
|
|
2972
|
+
let t = ua(n);
|
|
2973
2973
|
t && !e.some((e) => JSON.stringify(e) === JSON.stringify(t)) && e.push(t);
|
|
2974
2974
|
}
|
|
2975
2975
|
e.length === 1 ? i.additionalProperties = e[0] : e.length > 1 && (i.additionalProperties = { allOf: e });
|
|
2976
2976
|
}
|
|
2977
2977
|
return i;
|
|
2978
2978
|
}
|
|
2979
|
-
function
|
|
2979
|
+
function fa(e) {
|
|
2980
2980
|
let t = e.allOf;
|
|
2981
2981
|
if (!Array.isArray(t) || t.length < 2) return;
|
|
2982
|
-
for (let t of
|
|
2983
|
-
let n = t.filter((e) =>
|
|
2984
|
-
if (!n.length) r =
|
|
2982
|
+
for (let t of ca) if (t in e) return;
|
|
2983
|
+
let n = t.filter((e) => la.some((t) => Array.isArray(e[t]))), r = null;
|
|
2984
|
+
if (!n.length) r = da(t);
|
|
2985
2985
|
else {
|
|
2986
|
-
let e = n[0], i =
|
|
2986
|
+
let e = n[0], i = la.find((t) => Array.isArray(e[t]));
|
|
2987
2987
|
if (Object.keys(e).length !== 1) return;
|
|
2988
|
-
let a = t.filter((t) => t !== e), o = e[i].map((e) =>
|
|
2988
|
+
let a = t.filter((t) => t !== e), o = e[i].map((e) => da([...a, e]));
|
|
2989
2989
|
if (o.some((e) => !e)) return;
|
|
2990
2990
|
r = { [i]: o };
|
|
2991
2991
|
}
|
|
2992
|
-
r && (delete e.allOf,
|
|
2992
|
+
r && (delete e.allOf, ra(e, r));
|
|
2993
2993
|
}
|
|
2994
|
-
function
|
|
2994
|
+
function pa(e, t) {
|
|
2995
2995
|
let n = e.seen.get(t);
|
|
2996
2996
|
if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
|
|
2997
2997
|
let r = (t) => {
|
|
@@ -3001,7 +3001,7 @@ function ma(e, t) {
|
|
|
3001
3001
|
if (n.ref = null, o) {
|
|
3002
3002
|
r(o);
|
|
3003
3003
|
let n = e.seen.get(o), s = n.schema;
|
|
3004
|
-
if (s.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) :
|
|
3004
|
+
if (s.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) : ra(i, s), ra(i, a), t._zod.parent === o) for (let e in i) e !== "$ref" && e !== "allOf" && (e in a || delete i[e]);
|
|
3005
3005
|
if (s.$ref && n.def) for (let e in i) e !== "$ref" && e !== "allOf" && e in n.def && JSON.stringify(i[e]) === JSON.stringify(n.def[e]) && delete i[e];
|
|
3006
3006
|
}
|
|
3007
3007
|
let s = t._zod.parent;
|
|
@@ -3018,7 +3018,7 @@ function ma(e, t) {
|
|
|
3018
3018
|
};
|
|
3019
3019
|
if (!e.external || e.sharedEmitDoneFor !== e.external) {
|
|
3020
3020
|
for (let t of [...e.seen.entries()].reverse()) r(t[0]);
|
|
3021
|
-
if (e.target !== "openapi-3.0") for (let t of e.seen.entries())
|
|
3021
|
+
if (e.target !== "openapi-3.0") for (let t of e.seen.entries()) sa(t[1].def ?? t[1].schema);
|
|
3022
3022
|
for (let t of e.deferred) t();
|
|
3023
3023
|
if (e.intersections.length) {
|
|
3024
3024
|
let t = /* @__PURE__ */ new Map();
|
|
@@ -3028,7 +3028,7 @@ function ma(e, t) {
|
|
|
3028
3028
|
let r = t.get(n);
|
|
3029
3029
|
r ? r.push(e) : t.set(n, [e]);
|
|
3030
3030
|
}
|
|
3031
|
-
for (let n of e.intersections) for (let e of t.get(n) ?? [])
|
|
3031
|
+
for (let n of e.intersections) for (let e of t.get(n) ?? []) fa(e);
|
|
3032
3032
|
}
|
|
3033
3033
|
}
|
|
3034
3034
|
let i = {};
|
|
@@ -3037,7 +3037,7 @@ function ma(e, t) {
|
|
|
3037
3037
|
if (!n) throw Error("Schema is missing an `id` property");
|
|
3038
3038
|
i.$id = e.external.uri(n);
|
|
3039
3039
|
}
|
|
3040
|
-
|
|
3040
|
+
ra(i, n.defId ? n.schema : n.def ?? n.schema);
|
|
3041
3041
|
let a = e.metadataRegistry.get(t)?.id;
|
|
3042
3042
|
a !== void 0 && i.id === a && delete i.id;
|
|
3043
3043
|
let o = e.external?.defs ?? {};
|
|
@@ -3052,8 +3052,8 @@ function ma(e, t) {
|
|
|
3052
3052
|
value: {
|
|
3053
3053
|
...t["~standard"],
|
|
3054
3054
|
jsonSchema: {
|
|
3055
|
-
input:
|
|
3056
|
-
output:
|
|
3055
|
+
input: ha(t, "input", e.processors),
|
|
3056
|
+
output: ha(t, "output", e.processors)
|
|
3057
3057
|
}
|
|
3058
3058
|
},
|
|
3059
3059
|
enumerable: !1,
|
|
@@ -3063,93 +3063,93 @@ function ma(e, t) {
|
|
|
3063
3063
|
throw Error("Error converting schema to JSON.");
|
|
3064
3064
|
}
|
|
3065
3065
|
}
|
|
3066
|
-
function
|
|
3066
|
+
function N(e, t) {
|
|
3067
3067
|
let n = t ?? { seen: /* @__PURE__ */ new Set() };
|
|
3068
3068
|
if (n.seen.has(e)) return !1;
|
|
3069
3069
|
n.seen.add(e);
|
|
3070
3070
|
let r = e._zod.def;
|
|
3071
3071
|
if (r.type === "transform") return !0;
|
|
3072
|
-
if (r.type === "array") return
|
|
3073
|
-
if (r.type === "set") return
|
|
3074
|
-
if (r.type === "lazy") return
|
|
3075
|
-
if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault" || r.type === "catch") return
|
|
3076
|
-
if (r.type === "intersection") return
|
|
3077
|
-
if (r.type === "record" || r.type === "map") return
|
|
3078
|
-
if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 :
|
|
3072
|
+
if (r.type === "array") return N(r.element, n);
|
|
3073
|
+
if (r.type === "set") return N(r.valueType, n);
|
|
3074
|
+
if (r.type === "lazy") return N(r.getter(), n);
|
|
3075
|
+
if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault" || r.type === "catch") return N(r.innerType, n);
|
|
3076
|
+
if (r.type === "intersection") return N(r.left, n) || N(r.right, n);
|
|
3077
|
+
if (r.type === "record" || r.type === "map") return N(r.keyType, n) || N(r.valueType, n);
|
|
3078
|
+
if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 : N(r.in, n) || N(r.out, n);
|
|
3079
3079
|
if (r.type === "object") {
|
|
3080
|
-
for (let e in r.shape) if (
|
|
3080
|
+
for (let e in r.shape) if (N(r.shape[e], n)) return !0;
|
|
3081
3081
|
return !1;
|
|
3082
3082
|
}
|
|
3083
3083
|
if (r.type === "union") {
|
|
3084
|
-
for (let e of r.options) if (
|
|
3084
|
+
for (let e of r.options) if (N(e, n)) return !0;
|
|
3085
3085
|
return !1;
|
|
3086
3086
|
}
|
|
3087
3087
|
if (r.type === "tuple") {
|
|
3088
|
-
for (let e of r.items) if (
|
|
3089
|
-
return !!(r.rest &&
|
|
3088
|
+
for (let e of r.items) if (N(e, n)) return !0;
|
|
3089
|
+
return !!(r.rest && N(r.rest, n));
|
|
3090
3090
|
}
|
|
3091
3091
|
return !1;
|
|
3092
3092
|
}
|
|
3093
|
-
var
|
|
3094
|
-
let r =
|
|
3093
|
+
var ma = (e, t = {}) => (n) => {
|
|
3094
|
+
let r = ia({
|
|
3095
3095
|
...n,
|
|
3096
3096
|
processors: t
|
|
3097
3097
|
});
|
|
3098
|
-
return
|
|
3099
|
-
},
|
|
3100
|
-
let { libraryOptions: i, target: a } = r ?? {}, o =
|
|
3098
|
+
return M(e, r), oa(r, e), pa(r, e);
|
|
3099
|
+
}, ha = (e, t, n = {}) => (r) => {
|
|
3100
|
+
let { libraryOptions: i, target: a } = r ?? {}, o = ia({
|
|
3101
3101
|
...i ?? {},
|
|
3102
3102
|
target: a,
|
|
3103
3103
|
io: t,
|
|
3104
3104
|
processors: n
|
|
3105
3105
|
});
|
|
3106
|
-
return
|
|
3107
|
-
},
|
|
3106
|
+
return M(e, o), oa(o, e), pa(o, e);
|
|
3107
|
+
}, ga = {
|
|
3108
3108
|
guid: "uuid",
|
|
3109
3109
|
url: "uri",
|
|
3110
3110
|
datetime: "date-time",
|
|
3111
3111
|
json_string: "json-string",
|
|
3112
3112
|
regex: ""
|
|
3113
|
-
},
|
|
3113
|
+
}, _a = (e, t, n, r) => {
|
|
3114
3114
|
let i = n;
|
|
3115
3115
|
i.type = "string";
|
|
3116
3116
|
let { minimum: a, maximum: o, format: s, patterns: c, contentEncoding: l, laxFormat: u } = e._zod.bag;
|
|
3117
|
-
if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format =
|
|
3117
|
+
if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format = ga[s] ?? s, i.format === "" && delete i.format, (s === "time" || u) && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) {
|
|
3118
3118
|
let e = [...c];
|
|
3119
3119
|
e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({
|
|
3120
3120
|
...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
|
|
3121
3121
|
pattern: e.source
|
|
3122
3122
|
}))]);
|
|
3123
3123
|
}
|
|
3124
|
-
},
|
|
3124
|
+
}, va = (e, t, n, r) => {
|
|
3125
3125
|
let i = n, { minimum: a, maximum: o, format: s, multipleOf: c, exclusiveMaximum: l, exclusiveMinimum: u } = e._zod.bag;
|
|
3126
3126
|
i.type = typeof s == "string" && s.includes("int") ? "integer" : "number";
|
|
3127
3127
|
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";
|
|
3128
|
-
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" && (Number.isFinite(c) && c !== 0 ? i.multipleOf = Math.abs(c) :
|
|
3129
|
-
},
|
|
3128
|
+
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" && (Number.isFinite(c) && c !== 0 ? i.multipleOf = Math.abs(c) : j(e, t, i, r, `A multipleOf divisor of ${c} cannot be represented in JSON Schema`));
|
|
3129
|
+
}, ya = (e, t, n, r) => {
|
|
3130
3130
|
n.type = "boolean";
|
|
3131
|
+
}, ba = (e, t, n, r) => {
|
|
3132
|
+
j(e, t, n, r, "BigInt cannot be represented in JSON Schema");
|
|
3131
3133
|
}, xa = (e, t, n, r) => {
|
|
3132
|
-
|
|
3134
|
+
j(e, t, n, r, "Symbols cannot be represented in JSON Schema");
|
|
3133
3135
|
}, Sa = (e, t, n, r) => {
|
|
3134
|
-
A(e, t, n, r, "Symbols cannot be represented in JSON Schema");
|
|
3135
|
-
}, Ca = (e, t, n, r) => {
|
|
3136
3136
|
t.target === "openapi-3.0" ? (n.type = "string", n.nullable = !0, n.enum = [null]) : n.type = "null";
|
|
3137
|
+
}, Ca = (e, t, n, r) => {
|
|
3138
|
+
j(e, t, n, r, "Undefined cannot be represented in JSON Schema");
|
|
3137
3139
|
}, wa = (e, t, n, r) => {
|
|
3138
|
-
|
|
3140
|
+
j(e, t, n, r, "Void cannot be represented in JSON Schema");
|
|
3139
3141
|
}, Ta = (e, t, n, r) => {
|
|
3140
|
-
A(e, t, n, r, "Void cannot be represented in JSON Schema");
|
|
3141
|
-
}, Ea = (e, t, n, r) => {
|
|
3142
3142
|
n.not = {};
|
|
3143
|
-
},
|
|
3144
|
-
|
|
3145
|
-
},
|
|
3143
|
+
}, Ea = (e, t, n, r) => {}, Da = (e, t, n, r) => {}, Oa = (e, t, n, r) => {
|
|
3144
|
+
j(e, t, n, r, "Date cannot be represented in JSON Schema");
|
|
3145
|
+
}, ka = (e, t, r, i) => {
|
|
3146
3146
|
let a = e._zod.def, o = n(a.entries);
|
|
3147
3147
|
if (o.length === 0) {
|
|
3148
3148
|
r.not = {};
|
|
3149
3149
|
return;
|
|
3150
3150
|
}
|
|
3151
3151
|
o.every((e) => typeof e == "number") && (r.type = "number"), o.every((e) => typeof e == "string") && (r.type = "string"), r.enum = o;
|
|
3152
|
-
},
|
|
3152
|
+
}, Aa = (e, t, n, r) => {
|
|
3153
3153
|
let i = e._zod.def;
|
|
3154
3154
|
if (i.values.length === 0) {
|
|
3155
3155
|
n.not = {};
|
|
@@ -3157,9 +3157,9 @@ var ha = (e, t = {}) => (n) => {
|
|
|
3157
3157
|
}
|
|
3158
3158
|
let a = [];
|
|
3159
3159
|
for (let o of i.values) if (o === void 0) {
|
|
3160
|
-
if (
|
|
3160
|
+
if (j(e, t, n, r, "Literal `undefined` cannot be represented in JSON Schema")) return;
|
|
3161
3161
|
} else if (typeof o == "bigint") {
|
|
3162
|
-
if (
|
|
3162
|
+
if (j(e, t, n, r, "BigInt literals cannot be represented in JSON Schema")) return;
|
|
3163
3163
|
a.push(Number(o));
|
|
3164
3164
|
} else a.push(o);
|
|
3165
3165
|
if (a.length !== 0) {
|
|
@@ -3168,47 +3168,47 @@ var ha = (e, t = {}) => (n) => {
|
|
|
3168
3168
|
n.type = e === null ? "null" : typeof e, t.target === "draft-04" || t.target === "openapi-3.0" ? n.enum = [e] : n.const = e;
|
|
3169
3169
|
} else a.every((e) => typeof e == "number") && (n.type = "number"), a.every((e) => typeof e == "string") && (n.type = "string"), a.every((e) => typeof e == "boolean") && (n.type = "boolean"), a.every((e) => e === null) && (n.type = "null"), n.enum = a;
|
|
3170
3170
|
}
|
|
3171
|
+
}, ja = (e, t, n, r) => {
|
|
3172
|
+
j(e, t, n, r, "NaN cannot be represented in JSON Schema");
|
|
3171
3173
|
}, Ma = (e, t, n, r) => {
|
|
3172
|
-
A(e, t, n, r, "NaN cannot be represented in JSON Schema");
|
|
3173
|
-
}, Na = (e, t, n, r) => {
|
|
3174
3174
|
let i = n, a = e._zod.pattern;
|
|
3175
3175
|
if (!a) throw Error("Pattern not found in template literal");
|
|
3176
3176
|
i.type = "string", i.pattern = a.source;
|
|
3177
|
-
},
|
|
3177
|
+
}, Na = (e, t, n, r) => {
|
|
3178
3178
|
let i = n, a = {
|
|
3179
3179
|
type: "string",
|
|
3180
3180
|
format: "binary",
|
|
3181
3181
|
contentEncoding: "binary"
|
|
3182
3182
|
}, { minimum: o, maximum: s, mime: c } = e._zod.bag;
|
|
3183
3183
|
o !== void 0 && (a.minLength = o), s !== void 0 && (a.maxLength = s), c ? c.length === 1 ? (a.contentMediaType = c[0], Object.assign(i, a)) : (Object.assign(i, a), i.anyOf = c.map((e) => ({ contentMediaType: e }))) : Object.assign(i, a);
|
|
3184
|
-
},
|
|
3184
|
+
}, Pa = (e, t, n, r) => {
|
|
3185
3185
|
n.type = "boolean";
|
|
3186
|
+
}, Fa = (e, t, n, r) => {
|
|
3187
|
+
j(e, t, n, r, "Custom types cannot be represented in JSON Schema");
|
|
3186
3188
|
}, Ia = (e, t, n, r) => {
|
|
3187
|
-
|
|
3189
|
+
j(e, t, n, r, "Function types cannot be represented in JSON Schema");
|
|
3188
3190
|
}, La = (e, t, n, r) => {
|
|
3189
|
-
|
|
3191
|
+
j(e, t, n, r, "Transforms cannot be represented in JSON Schema");
|
|
3190
3192
|
}, Ra = (e, t, n, r) => {
|
|
3191
|
-
|
|
3193
|
+
j(e, t, n, r, "Map cannot be represented in JSON Schema");
|
|
3192
3194
|
}, za = (e, t, n, r) => {
|
|
3193
|
-
|
|
3195
|
+
j(e, t, n, r, "Set cannot be represented in JSON Schema");
|
|
3194
3196
|
}, Ba = (e, t, n, r) => {
|
|
3195
|
-
A(e, t, n, r, "Set cannot be represented in JSON Schema");
|
|
3196
|
-
}, Va = (e, t, n, r) => {
|
|
3197
3197
|
let i = n, a = e._zod.def, { minimum: o, maximum: s } = e._zod.bag;
|
|
3198
|
-
typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items =
|
|
3198
|
+
typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = M(a.element, t, {
|
|
3199
3199
|
...r,
|
|
3200
3200
|
path: [...r.path, "items"]
|
|
3201
3201
|
});
|
|
3202
3202
|
};
|
|
3203
|
-
function
|
|
3203
|
+
function Va(e) {
|
|
3204
3204
|
let t = e._zod.def;
|
|
3205
|
-
return t.type === "pipe" && t.in._zod.traits.has("$ZodTransform") ?
|
|
3205
|
+
return t.type === "pipe" && t.in._zod.traits.has("$ZodTransform") ? Va(t.out) : t.type === "catch" ? Va(t.innerType) : e._zod.optin;
|
|
3206
3206
|
}
|
|
3207
|
-
var
|
|
3207
|
+
var Ha = (e, t, n, r) => {
|
|
3208
3208
|
let i = n, a = e._zod.def, o = a.shape;
|
|
3209
|
-
if (Object.getOwnPropertySymbols(o).length &&
|
|
3209
|
+
if (Object.getOwnPropertySymbols(o).length && j(e, t, i, r, "Symbol keys cannot be represented in JSON Schema")) return;
|
|
3210
3210
|
i.type = "object", i.properties = {};
|
|
3211
|
-
for (let e in o) d(i.properties, e,
|
|
3211
|
+
for (let e in o) d(i.properties, e, M(o[e], t, {
|
|
3212
3212
|
...r,
|
|
3213
3213
|
path: [
|
|
3214
3214
|
...r.path,
|
|
@@ -3218,14 +3218,14 @@ var Ua = (e, t, n, r) => {
|
|
|
3218
3218
|
}));
|
|
3219
3219
|
let s = new Set(Object.keys(o)), c = new Set([...s].filter((e) => {
|
|
3220
3220
|
let n = a.shape[e];
|
|
3221
|
-
return t.io === "input" ?
|
|
3221
|
+
return t.io === "input" ? Va(n) === void 0 : n._zod.optout === void 0;
|
|
3222
3222
|
}));
|
|
3223
|
-
c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties =
|
|
3223
|
+
c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties = M(a.catchall, t, {
|
|
3224
3224
|
...r,
|
|
3225
3225
|
path: [...r.path, "additionalProperties"]
|
|
3226
3226
|
})) : t.io === "output" && (i.additionalProperties = !1);
|
|
3227
|
-
},
|
|
3228
|
-
let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) =>
|
|
3227
|
+
}, Ua = (e, t, n, r) => {
|
|
3228
|
+
let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => M(e, t, {
|
|
3229
3229
|
...r,
|
|
3230
3230
|
path: [
|
|
3231
3231
|
...r.path,
|
|
@@ -3234,15 +3234,15 @@ var Ua = (e, t, n, r) => {
|
|
|
3234
3234
|
]
|
|
3235
3235
|
}));
|
|
3236
3236
|
a ? n.oneOf = o : n.anyOf = o;
|
|
3237
|
-
},
|
|
3238
|
-
let i = e._zod.def, a =
|
|
3237
|
+
}, Wa = (e, t, n, r) => {
|
|
3238
|
+
let i = e._zod.def, a = M(i.left, t, {
|
|
3239
3239
|
...r,
|
|
3240
3240
|
path: [
|
|
3241
3241
|
...r.path,
|
|
3242
3242
|
"allOf",
|
|
3243
3243
|
0
|
|
3244
3244
|
]
|
|
3245
|
-
}), o =
|
|
3245
|
+
}), o = M(i.right, t, {
|
|
3246
3246
|
...r,
|
|
3247
3247
|
path: [
|
|
3248
3248
|
...r.path,
|
|
@@ -3251,17 +3251,17 @@ var Ua = (e, t, n, r) => {
|
|
|
3251
3251
|
]
|
|
3252
3252
|
}), s = (e) => "allOf" in e && Object.keys(e).length === 1, c = [...s(a) ? a.allOf : [a], ...s(o) ? o.allOf : [o]];
|
|
3253
3253
|
n.allOf = c, t.intersections.push(c);
|
|
3254
|
-
},
|
|
3254
|
+
}, Ga = (e, t, n, r) => {
|
|
3255
3255
|
let i = n, a = e._zod.def;
|
|
3256
3256
|
i.type = "array";
|
|
3257
|
-
let o = t.target === "draft-2020-12" ? "prefixItems" : "items", s = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = a.items.map((e, n) =>
|
|
3257
|
+
let o = t.target === "draft-2020-12" ? "prefixItems" : "items", s = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = a.items.map((e, n) => M(e, t, {
|
|
3258
3258
|
...r,
|
|
3259
3259
|
path: [
|
|
3260
3260
|
...r.path,
|
|
3261
3261
|
o,
|
|
3262
3262
|
n
|
|
3263
3263
|
]
|
|
3264
|
-
})), l = a.rest ?
|
|
3264
|
+
})), l = a.rest ? M(a.rest, t, {
|
|
3265
3265
|
...r,
|
|
3266
3266
|
path: [
|
|
3267
3267
|
...r.path,
|
|
@@ -3271,7 +3271,7 @@ var Ua = (e, t, n, r) => {
|
|
|
3271
3271
|
}) : null, u = a.items.length;
|
|
3272
3272
|
for (; u > 0;) {
|
|
3273
3273
|
let e = a.items[u - 1];
|
|
3274
|
-
if (!(t.io === "input" ?
|
|
3274
|
+
if (!(t.io === "input" ? Va(e) !== void 0 : e._zod.optout === "optional")) break;
|
|
3275
3275
|
u--;
|
|
3276
3276
|
}
|
|
3277
3277
|
let d = a.items.length, f = !a.rest;
|
|
@@ -3279,19 +3279,19 @@ var Ua = (e, t, n, r) => {
|
|
|
3279
3279
|
let { minimum: p, maximum: m } = e._zod.bag;
|
|
3280
3280
|
typeof p == "number" && (i.minItems = p), typeof m == "number" && (i.maxItems = m);
|
|
3281
3281
|
};
|
|
3282
|
-
function
|
|
3282
|
+
function Ka(e, t, n) {
|
|
3283
3283
|
if (t.$ref) {
|
|
3284
3284
|
if (n.has(t)) return t;
|
|
3285
3285
|
n.add(t);
|
|
3286
3286
|
let r = e.get(t)?.def;
|
|
3287
3287
|
if (!r) return t;
|
|
3288
|
-
let i =
|
|
3288
|
+
let i = Ka(e, r, n);
|
|
3289
3289
|
return i === r ? t : i;
|
|
3290
3290
|
}
|
|
3291
3291
|
for (let r of ["anyOf", "oneOf"]) {
|
|
3292
3292
|
let i = t[r];
|
|
3293
3293
|
if (!Array.isArray(i)) continue;
|
|
3294
|
-
let a = i.map((t) =>
|
|
3294
|
+
let a = i.map((t) => Ka(e, t, n));
|
|
3295
3295
|
a.some((e, t) => e !== i[t]) && (t = {
|
|
3296
3296
|
...t,
|
|
3297
3297
|
[r]: a
|
|
@@ -3300,17 +3300,17 @@ function qa(e, t, n) {
|
|
|
3300
3300
|
let r = Array.isArray(t.type) ? t.type : [t.type], i = !r.includes("string") && r.some((e) => e === "number" || e === "integer"), a = t.enum ?? (t.const === void 0 ? void 0 : [t.const]);
|
|
3301
3301
|
if (!i && !a?.some((e) => typeof e == "number")) return t;
|
|
3302
3302
|
let { minimum: o, maximum: s, exclusiveMinimum: c, exclusiveMaximum: l, multipleOf: u, format: d, id: f, ...p } = t;
|
|
3303
|
-
return p.enum ? p.enum = p.enum.map((e) => typeof e == "number" ? String(e) : e) : typeof p.const == "number" && (p.const = String(p.const)), i ? (p.type = "string", a || (p.pattern = (r.includes("number") ?
|
|
3303
|
+
return p.enum ? p.enum = p.enum.map((e) => typeof e == "number" ? String(e) : e) : typeof p.const == "number" && (p.const = String(p.const)), i ? (p.type = "string", a || (p.pattern = (r.includes("number") ? Bt : zt).source), p) : p;
|
|
3304
3304
|
}
|
|
3305
|
-
var
|
|
3306
|
-
function
|
|
3305
|
+
var qa = /* @__PURE__ */ new WeakMap();
|
|
3306
|
+
function Ja(e) {
|
|
3307
3307
|
let t = /* @__PURE__ */ new Map();
|
|
3308
3308
|
for (let n of e.seen.values()) n.def && !t.has(n.schema) && t.set(n.schema, n);
|
|
3309
3309
|
let n = /* @__PURE__ */ new Map();
|
|
3310
|
-
for (let r of
|
|
3310
|
+
for (let r of qa.get(e) ?? []) {
|
|
3311
3311
|
let i = e.seen.get(r), a = (i?.def ?? i?.schema)?.propertyNames;
|
|
3312
3312
|
if (!a || a === !0 || n.has(a)) continue;
|
|
3313
|
-
let o =
|
|
3313
|
+
let o = Ka(t, a, /* @__PURE__ */ new Set());
|
|
3314
3314
|
o !== a && n.set(a, o);
|
|
3315
3315
|
}
|
|
3316
3316
|
if (n.size) for (let t of e.seen.values()) for (let e of [t.schema, t.def]) {
|
|
@@ -3318,12 +3318,12 @@ function Ya(e) {
|
|
|
3318
3318
|
t && (e.propertyNames = t);
|
|
3319
3319
|
}
|
|
3320
3320
|
}
|
|
3321
|
-
var
|
|
3321
|
+
var Ya = (e, t, n, r) => {
|
|
3322
3322
|
let i = n, a = e._zod.def;
|
|
3323
3323
|
i.type = "object";
|
|
3324
3324
|
let o = a.keyType, s = o._zod.bag?.patterns;
|
|
3325
3325
|
if (a.mode === "loose" && s && s.size > 0) {
|
|
3326
|
-
let e =
|
|
3326
|
+
let e = M(a.valueType, t, {
|
|
3327
3327
|
...r,
|
|
3328
3328
|
path: [
|
|
3329
3329
|
...r.path,
|
|
@@ -3335,138 +3335,138 @@ var Xa = (e, t, n, r) => {
|
|
|
3335
3335
|
for (let t of s) d(i.patternProperties, t.source, e);
|
|
3336
3336
|
} else {
|
|
3337
3337
|
if (t.target === "draft-07" || t.target === "draft-2020-12") {
|
|
3338
|
-
i.propertyNames =
|
|
3338
|
+
i.propertyNames = M(a.keyType, t, {
|
|
3339
3339
|
...r,
|
|
3340
3340
|
path: [...r.path, "propertyNames"]
|
|
3341
3341
|
});
|
|
3342
|
-
let n =
|
|
3343
|
-
n || (n = [],
|
|
3342
|
+
let n = qa.get(t);
|
|
3343
|
+
n || (n = [], qa.set(t, n), t.deferred.push(() => Ja(t))), n.push(e);
|
|
3344
3344
|
}
|
|
3345
|
-
i.additionalProperties =
|
|
3345
|
+
i.additionalProperties = M(a.valueType, t, {
|
|
3346
3346
|
...r,
|
|
3347
3347
|
path: [...r.path, "additionalProperties"]
|
|
3348
3348
|
});
|
|
3349
3349
|
}
|
|
3350
|
-
let c = o._zod.values, l = t.io === "input" &&
|
|
3350
|
+
let c = o._zod.values, l = t.io === "input" && Va(a.valueType) !== void 0;
|
|
3351
3351
|
if (c && !a.partial && !l) {
|
|
3352
3352
|
let e = [...c].filter((e) => typeof e == "string" || typeof e == "number");
|
|
3353
3353
|
e.length > 0 && (i.required = e.map(String));
|
|
3354
3354
|
}
|
|
3355
|
-
},
|
|
3356
|
-
let i = e._zod.def, a =
|
|
3355
|
+
}, Xa = (e, t, n, r) => {
|
|
3356
|
+
let i = e._zod.def, a = M(i.innerType, t, r), o = t.seen.get(e);
|
|
3357
3357
|
t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
|
|
3358
|
-
},
|
|
3358
|
+
}, Za = (e, t, n, r) => {
|
|
3359
3359
|
let i = e._zod.def;
|
|
3360
|
-
|
|
3360
|
+
M(i.innerType, t, r);
|
|
3361
3361
|
let a = t.seen.get(e);
|
|
3362
3362
|
a.ref = i.innerType;
|
|
3363
|
-
},
|
|
3364
|
-
function
|
|
3363
|
+
}, Qa = Symbol();
|
|
3364
|
+
function $a(e, t, n, r, i) {
|
|
3365
3365
|
let a = !1, o = JSON.stringify(e, (e, t) => typeof t == "bigint" ? (a = !0, null) : t);
|
|
3366
|
-
return a ? (
|
|
3366
|
+
return a ? (j(t, n, r, i, "BigInt defaults cannot be represented in JSON Schema"), Qa) : JSON.parse(o);
|
|
3367
3367
|
}
|
|
3368
|
-
var
|
|
3368
|
+
var eo = (e, t, n, r) => {
|
|
3369
3369
|
let i = e._zod.def;
|
|
3370
|
-
|
|
3370
|
+
M(i.innerType, t, r);
|
|
3371
3371
|
let a = t.seen.get(e);
|
|
3372
3372
|
a.ref = i.innerType;
|
|
3373
|
-
let o =
|
|
3374
|
-
o !==
|
|
3375
|
-
},
|
|
3373
|
+
let o = $a(i.defaultValue, e, t, n, r);
|
|
3374
|
+
o !== Qa && (n.default = o);
|
|
3375
|
+
}, to = (e, t, n, r) => {
|
|
3376
3376
|
let i = e._zod.def;
|
|
3377
|
-
|
|
3377
|
+
M(i.innerType, t, r);
|
|
3378
3378
|
let a = t.seen.get(e);
|
|
3379
3379
|
if (a.ref = i.innerType, t.io !== "input") return;
|
|
3380
|
-
let o =
|
|
3381
|
-
o !==
|
|
3382
|
-
},
|
|
3380
|
+
let o = $a(i.defaultValue, e, t, n, r);
|
|
3381
|
+
o !== Qa && (n._prefault = o);
|
|
3382
|
+
}, no = (e, t, n, r) => {
|
|
3383
3383
|
let i = e._zod.def;
|
|
3384
|
-
|
|
3384
|
+
M(i.innerType, t, r);
|
|
3385
3385
|
let a = t.seen.get(e);
|
|
3386
3386
|
a.ref = i.innerType;
|
|
3387
3387
|
let o;
|
|
3388
3388
|
try {
|
|
3389
3389
|
o = i.catchValue(void 0);
|
|
3390
3390
|
} catch {
|
|
3391
|
-
|
|
3391
|
+
j(e, t, n, r, "Dynamic catch values are not supported in JSON Schema");
|
|
3392
3392
|
return;
|
|
3393
3393
|
}
|
|
3394
3394
|
n.default = o;
|
|
3395
|
-
},
|
|
3395
|
+
}, ro = (e, t, n, r) => {
|
|
3396
3396
|
let i = e._zod.def, a = i.in._zod.traits.has("$ZodTransform"), o = t.io === "input" ? a ? i.out : i.in : i.out;
|
|
3397
|
-
|
|
3397
|
+
M(o, t, r);
|
|
3398
3398
|
let s = t.seen.get(e);
|
|
3399
3399
|
s.ref = o;
|
|
3400
|
-
},
|
|
3400
|
+
}, io = (e, t, n, r) => {
|
|
3401
3401
|
let i = e._zod.def;
|
|
3402
|
-
|
|
3402
|
+
M(i.innerType, t, r);
|
|
3403
3403
|
let a = t.seen.get(e);
|
|
3404
3404
|
a.ref = i.innerType, n.readOnly = !0;
|
|
3405
|
-
},
|
|
3405
|
+
}, ao = (e, t, n, r) => {
|
|
3406
3406
|
let i = e._zod.def;
|
|
3407
|
-
|
|
3407
|
+
M(i.innerType, t, r);
|
|
3408
3408
|
let a = t.seen.get(e);
|
|
3409
3409
|
a.ref = i.innerType;
|
|
3410
|
-
},
|
|
3410
|
+
}, oo = (e, t, n, r) => {
|
|
3411
3411
|
let i = e._zod.def;
|
|
3412
|
-
|
|
3412
|
+
M(i.innerType, t, r);
|
|
3413
3413
|
let a = t.seen.get(e);
|
|
3414
3414
|
a.ref = i.innerType;
|
|
3415
|
-
},
|
|
3415
|
+
}, so = (e, t, n, r) => {
|
|
3416
3416
|
let i = e._zod.innerType;
|
|
3417
|
-
|
|
3417
|
+
M(i, t, r);
|
|
3418
3418
|
let a = t.seen.get(e);
|
|
3419
3419
|
a.ref = i;
|
|
3420
|
-
},
|
|
3421
|
-
string:
|
|
3422
|
-
number:
|
|
3423
|
-
boolean:
|
|
3424
|
-
bigint:
|
|
3425
|
-
symbol:
|
|
3426
|
-
null:
|
|
3427
|
-
undefined:
|
|
3428
|
-
void:
|
|
3429
|
-
never:
|
|
3430
|
-
any:
|
|
3431
|
-
unknown:
|
|
3432
|
-
date:
|
|
3433
|
-
enum:
|
|
3434
|
-
literal:
|
|
3435
|
-
nan:
|
|
3436
|
-
template_literal:
|
|
3437
|
-
file:
|
|
3438
|
-
success:
|
|
3439
|
-
custom:
|
|
3440
|
-
function:
|
|
3441
|
-
transform:
|
|
3442
|
-
map:
|
|
3443
|
-
set:
|
|
3444
|
-
array:
|
|
3445
|
-
object:
|
|
3446
|
-
union:
|
|
3447
|
-
intersection:
|
|
3448
|
-
tuple:
|
|
3449
|
-
record:
|
|
3450
|
-
nullable:
|
|
3451
|
-
nonoptional:
|
|
3452
|
-
default:
|
|
3453
|
-
prefault:
|
|
3454
|
-
catch:
|
|
3455
|
-
pipe:
|
|
3456
|
-
readonly:
|
|
3457
|
-
promise:
|
|
3458
|
-
optional:
|
|
3459
|
-
lazy:
|
|
3420
|
+
}, co = {
|
|
3421
|
+
string: _a,
|
|
3422
|
+
number: va,
|
|
3423
|
+
boolean: ya,
|
|
3424
|
+
bigint: ba,
|
|
3425
|
+
symbol: xa,
|
|
3426
|
+
null: Sa,
|
|
3427
|
+
undefined: Ca,
|
|
3428
|
+
void: wa,
|
|
3429
|
+
never: Ta,
|
|
3430
|
+
any: Ea,
|
|
3431
|
+
unknown: Da,
|
|
3432
|
+
date: Oa,
|
|
3433
|
+
enum: ka,
|
|
3434
|
+
literal: Aa,
|
|
3435
|
+
nan: ja,
|
|
3436
|
+
template_literal: Ma,
|
|
3437
|
+
file: Na,
|
|
3438
|
+
success: Pa,
|
|
3439
|
+
custom: Fa,
|
|
3440
|
+
function: Ia,
|
|
3441
|
+
transform: La,
|
|
3442
|
+
map: Ra,
|
|
3443
|
+
set: za,
|
|
3444
|
+
array: Ba,
|
|
3445
|
+
object: Ha,
|
|
3446
|
+
union: Ua,
|
|
3447
|
+
intersection: Wa,
|
|
3448
|
+
tuple: Ga,
|
|
3449
|
+
record: Ya,
|
|
3450
|
+
nullable: Xa,
|
|
3451
|
+
nonoptional: Za,
|
|
3452
|
+
default: eo,
|
|
3453
|
+
prefault: to,
|
|
3454
|
+
catch: no,
|
|
3455
|
+
pipe: ro,
|
|
3456
|
+
readonly: io,
|
|
3457
|
+
promise: ao,
|
|
3458
|
+
optional: oo,
|
|
3459
|
+
lazy: so
|
|
3460
3460
|
};
|
|
3461
|
-
function
|
|
3461
|
+
function lo(e, t) {
|
|
3462
3462
|
if ("_idmap" in e) {
|
|
3463
|
-
let n = e, r =
|
|
3463
|
+
let n = e, r = ia({
|
|
3464
3464
|
...t,
|
|
3465
|
-
processors:
|
|
3465
|
+
processors: co
|
|
3466
3466
|
}), i = {};
|
|
3467
3467
|
for (let e of n._idmap.entries()) {
|
|
3468
3468
|
let [t, n] = e;
|
|
3469
|
-
|
|
3469
|
+
M(n, r);
|
|
3470
3470
|
}
|
|
3471
3471
|
let a = {};
|
|
3472
3472
|
r.external = {
|
|
@@ -3476,20 +3476,20 @@ function uo(e, t) {
|
|
|
3476
3476
|
};
|
|
3477
3477
|
for (let e of n._idmap.entries()) {
|
|
3478
3478
|
let [t, n] = e;
|
|
3479
|
-
|
|
3479
|
+
oa(r, n), d(a, t, pa(r, n));
|
|
3480
3480
|
}
|
|
3481
3481
|
return Object.keys(i).length > 0 && (a.__shared = { [r.target === "draft-2020-12" ? "$defs" : "definitions"]: i }), { schemas: a };
|
|
3482
3482
|
}
|
|
3483
|
-
let n =
|
|
3483
|
+
let n = ia({
|
|
3484
3484
|
...t,
|
|
3485
|
-
processors:
|
|
3485
|
+
processors: co
|
|
3486
3486
|
});
|
|
3487
|
-
return
|
|
3487
|
+
return M(e, n), oa(n, e), pa(n, e);
|
|
3488
3488
|
}
|
|
3489
3489
|
//#endregion
|
|
3490
3490
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/errors.js
|
|
3491
|
-
var
|
|
3492
|
-
function
|
|
3491
|
+
var uo = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
|
|
3492
|
+
function fo(e, t, n) {
|
|
3493
3493
|
Object.defineProperty(e, t, {
|
|
3494
3494
|
configurable: !0,
|
|
3495
3495
|
enumerable: !1,
|
|
@@ -3510,12 +3510,12 @@ function po(e, t, n) {
|
|
|
3510
3510
|
}
|
|
3511
3511
|
});
|
|
3512
3512
|
}
|
|
3513
|
-
var
|
|
3514
|
-
|
|
3513
|
+
var po = (e, t) => {
|
|
3514
|
+
Ge.init(e, t), e.name = "ZodError";
|
|
3515
3515
|
let n = Object.getPrototypeOf(e);
|
|
3516
|
-
|
|
3516
|
+
uo.has(n) || (uo.add(n), fo(n, "format", (e) => (t) => Ye(e, t)), fo(n, "flatten", (e) => (t) => Je(e, t)), fo(n, "addIssue", (e) => (t) => {
|
|
3517
3517
|
e.issues.push(t), e.message = JSON.stringify(e.issues, i, 2);
|
|
3518
|
-
}),
|
|
3518
|
+
}), fo(n, "addIssues", (e) => (t) => {
|
|
3519
3519
|
e.issues.push(...t), e.message = JSON.stringify(e.issues, i, 2);
|
|
3520
3520
|
}), Object.defineProperty(n, "isEmpty", {
|
|
3521
3521
|
configurable: !0,
|
|
@@ -3524,16 +3524,16 @@ var mo = (e, t) => {
|
|
|
3524
3524
|
return this.issues.length === 0;
|
|
3525
3525
|
}
|
|
3526
3526
|
}));
|
|
3527
|
-
},
|
|
3527
|
+
}, mo = /*@__PURE__*/ w("ZodError", po), P = /*@__PURE__*/ w("ZodError", po, void 0, { Parent: Error }), ho = /* @__PURE__ */ Ze(P), go = /* @__PURE__ */ Qe(P), _o = /* @__PURE__ */ $e(P), vo = /* @__PURE__ */ tt(P), yo = /* @__PURE__ */ rt(P), bo = /* @__PURE__ */ it(P), xo = /* @__PURE__ */ at(P), So = /* @__PURE__ */ ot(P), Co = /* @__PURE__ */ st(P), wo = /* @__PURE__ */ ct(P), To = /* @__PURE__ */ lt(P), Eo = /* @__PURE__ */ ut(P);
|
|
3528
3528
|
//#endregion
|
|
3529
3529
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/schemas.js
|
|
3530
|
-
function
|
|
3531
|
-
|
|
3530
|
+
function Do() {
|
|
3531
|
+
E.localeError || D(Yr());
|
|
3532
3532
|
}
|
|
3533
|
-
function
|
|
3534
|
-
|
|
3533
|
+
function Oo() {
|
|
3534
|
+
E.memoizer || D({ memoizer: Kr() });
|
|
3535
3535
|
}
|
|
3536
|
-
var
|
|
3536
|
+
var F = /*@__PURE__*/ w("ZodType", (e, t) => (Do(), k.init(e, t), e.def = t, e.type = t.type, e), {
|
|
3537
3537
|
check(...e) {
|
|
3538
3538
|
let t = this.def;
|
|
3539
3539
|
return this.clone(f(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
|
|
@@ -3561,7 +3561,7 @@ var P = /*@__PURE__*/ w("ZodType", (e, t) => (Oo(), O.init(e, t), e.def = t, e.t
|
|
|
3561
3561
|
return this.check(Ws(e, t));
|
|
3562
3562
|
},
|
|
3563
3563
|
overwrite(e) {
|
|
3564
|
-
return this.check(/* @__PURE__ */
|
|
3564
|
+
return this.check(/* @__PURE__ */ qi(e));
|
|
3565
3565
|
},
|
|
3566
3566
|
optional() {
|
|
3567
3567
|
return Cs(this);
|
|
@@ -3607,12 +3607,12 @@ var P = /*@__PURE__*/ w("ZodType", (e, t) => (Oo(), O.init(e, t), e.def = t, e.t
|
|
|
3607
3607
|
},
|
|
3608
3608
|
describe(e) {
|
|
3609
3609
|
let t = this.clone();
|
|
3610
|
-
return
|
|
3610
|
+
return $r.add(t, { description: e }), t;
|
|
3611
3611
|
},
|
|
3612
3612
|
meta(...e) {
|
|
3613
|
-
if (e.length === 0) return
|
|
3613
|
+
if (e.length === 0) return $r.get(this);
|
|
3614
3614
|
let t = this.clone();
|
|
3615
|
-
return
|
|
3615
|
+
return $r.add(t, e[0]), t;
|
|
3616
3616
|
},
|
|
3617
3617
|
isOptional() {
|
|
3618
3618
|
return this.safeParse(void 0).success;
|
|
@@ -3624,273 +3624,273 @@ var P = /*@__PURE__*/ w("ZodType", (e, t) => (Oo(), O.init(e, t), e.def = t, e.t
|
|
|
3624
3624
|
return t.length === 0 ? e(this) : e(this, ...t);
|
|
3625
3625
|
},
|
|
3626
3626
|
get "~standard"() {
|
|
3627
|
-
return
|
|
3628
|
-
...
|
|
3627
|
+
return we(this, "~standard", {
|
|
3628
|
+
...fn(this),
|
|
3629
3629
|
jsonSchema: {
|
|
3630
|
-
input:
|
|
3631
|
-
output:
|
|
3630
|
+
input: ha(this, "input"),
|
|
3631
|
+
output: ha(this, "output")
|
|
3632
3632
|
}
|
|
3633
3633
|
});
|
|
3634
3634
|
},
|
|
3635
3635
|
set "~standard"(e) {
|
|
3636
|
-
|
|
3636
|
+
S(this, "~standard", e);
|
|
3637
3637
|
},
|
|
3638
3638
|
parse: function e(t, n) {
|
|
3639
|
-
return
|
|
3639
|
+
return ho(this, t, n, { callee: e });
|
|
3640
3640
|
},
|
|
3641
3641
|
parseAsync: async function e(t, n) {
|
|
3642
|
-
return await
|
|
3642
|
+
return await go(this, t, n, { callee: e });
|
|
3643
3643
|
},
|
|
3644
3644
|
safeParse(e, t) {
|
|
3645
|
-
return
|
|
3645
|
+
return _o(this, e, t);
|
|
3646
3646
|
},
|
|
3647
3647
|
async safeParseAsync(e, t) {
|
|
3648
|
-
return
|
|
3648
|
+
return vo(this, e, t);
|
|
3649
3649
|
},
|
|
3650
3650
|
get spa() {
|
|
3651
3651
|
return this?.safeParseAsync;
|
|
3652
3652
|
},
|
|
3653
3653
|
set spa(e) {
|
|
3654
|
-
|
|
3654
|
+
S(this, "spa", e);
|
|
3655
3655
|
},
|
|
3656
3656
|
encode: function e(t, n) {
|
|
3657
|
-
return
|
|
3657
|
+
return yo(this, t, n, { callee: e });
|
|
3658
3658
|
},
|
|
3659
3659
|
decode: function e(t, n) {
|
|
3660
|
-
return
|
|
3660
|
+
return bo(this, t, n, { callee: e });
|
|
3661
3661
|
},
|
|
3662
3662
|
encodeAsync: async function e(t, n) {
|
|
3663
|
-
return await
|
|
3663
|
+
return await xo(this, t, n, { callee: e });
|
|
3664
3664
|
},
|
|
3665
3665
|
decodeAsync: async function e(t, n) {
|
|
3666
|
-
return await
|
|
3666
|
+
return await So(this, t, n, { callee: e });
|
|
3667
3667
|
},
|
|
3668
3668
|
safeEncode(e, t) {
|
|
3669
|
-
return
|
|
3669
|
+
return Co(this, e, t);
|
|
3670
3670
|
},
|
|
3671
3671
|
safeDecode(e, t) {
|
|
3672
|
-
return
|
|
3672
|
+
return wo(this, e, t);
|
|
3673
3673
|
},
|
|
3674
3674
|
async safeEncodeAsync(e, t) {
|
|
3675
|
-
return
|
|
3675
|
+
return To(this, e, t);
|
|
3676
3676
|
},
|
|
3677
3677
|
async safeDecodeAsync(e, t) {
|
|
3678
|
-
return
|
|
3678
|
+
return Eo(this, e, t);
|
|
3679
3679
|
},
|
|
3680
3680
|
toJSONSchema(e) {
|
|
3681
|
-
return
|
|
3681
|
+
return ma(this, {})(e);
|
|
3682
3682
|
},
|
|
3683
3683
|
get description() {
|
|
3684
|
-
return
|
|
3684
|
+
return $r.get(this)?.description;
|
|
3685
3685
|
},
|
|
3686
3686
|
get _def() {
|
|
3687
3687
|
return this._zod.def;
|
|
3688
3688
|
}
|
|
3689
|
-
}),
|
|
3690
|
-
|
|
3689
|
+
}), ko = /*@__PURE__*/ w("_ZodString", (e, t) => {
|
|
3690
|
+
pn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => _a(e, t, n, r);
|
|
3691
3691
|
let n = e._zod.bag;
|
|
3692
3692
|
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null;
|
|
3693
3693
|
}, {
|
|
3694
3694
|
regex(...e) {
|
|
3695
|
-
return this.check(/* @__PURE__ */
|
|
3695
|
+
return this.check(/* @__PURE__ */ Vi(...e));
|
|
3696
3696
|
},
|
|
3697
3697
|
includes(...e) {
|
|
3698
|
-
return this.check(/* @__PURE__ */
|
|
3698
|
+
return this.check(/* @__PURE__ */ Wi(...e));
|
|
3699
3699
|
},
|
|
3700
3700
|
startsWith(...e) {
|
|
3701
|
-
return this.check(/* @__PURE__ */
|
|
3701
|
+
return this.check(/* @__PURE__ */ Gi(...e));
|
|
3702
3702
|
},
|
|
3703
3703
|
endsWith(...e) {
|
|
3704
|
-
return this.check(/* @__PURE__ */
|
|
3704
|
+
return this.check(/* @__PURE__ */ Ki(...e));
|
|
3705
3705
|
},
|
|
3706
3706
|
min(...e) {
|
|
3707
|
-
return this.check(/* @__PURE__ */
|
|
3707
|
+
return this.check(/* @__PURE__ */ zi(...e));
|
|
3708
3708
|
},
|
|
3709
3709
|
max(...e) {
|
|
3710
|
-
return this.check(/* @__PURE__ */
|
|
3710
|
+
return this.check(/* @__PURE__ */ Ri(...e));
|
|
3711
3711
|
},
|
|
3712
3712
|
length(...e) {
|
|
3713
|
-
return this.check(/* @__PURE__ */
|
|
3713
|
+
return this.check(/* @__PURE__ */ Bi(...e));
|
|
3714
3714
|
},
|
|
3715
3715
|
nonempty(...e) {
|
|
3716
|
-
return this.check(/* @__PURE__ */
|
|
3716
|
+
return this.check(/* @__PURE__ */ zi(1, ...e));
|
|
3717
3717
|
},
|
|
3718
3718
|
lowercase(e) {
|
|
3719
|
-
return this.check(/* @__PURE__ */
|
|
3719
|
+
return this.check(/* @__PURE__ */ Hi(e));
|
|
3720
3720
|
},
|
|
3721
3721
|
uppercase(e) {
|
|
3722
|
-
return this.check(/* @__PURE__ */
|
|
3722
|
+
return this.check(/* @__PURE__ */ Ui(e));
|
|
3723
3723
|
},
|
|
3724
3724
|
trim() {
|
|
3725
|
-
return this.check(/* @__PURE__ */
|
|
3725
|
+
return this.check(/* @__PURE__ */ Yi());
|
|
3726
3726
|
},
|
|
3727
3727
|
normalize(...e) {
|
|
3728
|
-
return this.check(/* @__PURE__ */
|
|
3728
|
+
return this.check(/* @__PURE__ */ Ji(...e));
|
|
3729
3729
|
},
|
|
3730
3730
|
toLowerCase() {
|
|
3731
|
-
return this.check(/* @__PURE__ */
|
|
3731
|
+
return this.check(/* @__PURE__ */ Xi());
|
|
3732
3732
|
},
|
|
3733
3733
|
toUpperCase() {
|
|
3734
|
-
return this.check(/* @__PURE__ */
|
|
3734
|
+
return this.check(/* @__PURE__ */ Zi());
|
|
3735
3735
|
},
|
|
3736
3736
|
slugify() {
|
|
3737
|
-
return this.check(/* @__PURE__ */
|
|
3737
|
+
return this.check(/* @__PURE__ */ Qi());
|
|
3738
3738
|
}
|
|
3739
|
-
}),
|
|
3740
|
-
|
|
3739
|
+
}), Ao = /*@__PURE__*/ w("ZodString", (e, t) => {
|
|
3740
|
+
pn.init(e, t), ko.init(e, t);
|
|
3741
3741
|
}, {
|
|
3742
3742
|
email(e) {
|
|
3743
|
-
return this.check(/* @__PURE__ */
|
|
3743
|
+
return this.check(/* @__PURE__ */ ti(Io, e));
|
|
3744
3744
|
},
|
|
3745
3745
|
url(e) {
|
|
3746
|
-
return this.check(/* @__PURE__ */
|
|
3746
|
+
return this.check(/* @__PURE__ */ si(zo, e));
|
|
3747
3747
|
},
|
|
3748
3748
|
jwt(e) {
|
|
3749
|
-
return this.check(/* @__PURE__ */
|
|
3749
|
+
return this.check(/* @__PURE__ */ Si(es, e));
|
|
3750
3750
|
},
|
|
3751
3751
|
emoji(e) {
|
|
3752
|
-
return this.check(/* @__PURE__ */
|
|
3752
|
+
return this.check(/* @__PURE__ */ ci(Bo, e));
|
|
3753
3753
|
},
|
|
3754
3754
|
guid(e) {
|
|
3755
|
-
return this.check(/* @__PURE__ */
|
|
3755
|
+
return this.check(/* @__PURE__ */ ni(Lo, e));
|
|
3756
3756
|
},
|
|
3757
3757
|
uuid(e) {
|
|
3758
|
-
return this.check(/* @__PURE__ */
|
|
3758
|
+
return this.check(/* @__PURE__ */ ri(Ro, e));
|
|
3759
3759
|
},
|
|
3760
3760
|
uuidv4(e) {
|
|
3761
|
-
return this.check(/* @__PURE__ */
|
|
3761
|
+
return this.check(/* @__PURE__ */ ii(Ro, e));
|
|
3762
3762
|
},
|
|
3763
3763
|
uuidv6(e) {
|
|
3764
|
-
return this.check(/* @__PURE__ */
|
|
3764
|
+
return this.check(/* @__PURE__ */ ai(Ro, e));
|
|
3765
3765
|
},
|
|
3766
3766
|
uuidv7(e) {
|
|
3767
|
-
return this.check(/* @__PURE__ */
|
|
3767
|
+
return this.check(/* @__PURE__ */ oi(Ro, e));
|
|
3768
3768
|
},
|
|
3769
3769
|
nanoid(e) {
|
|
3770
|
-
return this.check(/* @__PURE__ */
|
|
3770
|
+
return this.check(/* @__PURE__ */ li(Vo, e));
|
|
3771
3771
|
},
|
|
3772
3772
|
cuid(e) {
|
|
3773
|
-
return this.check(/* @__PURE__ */
|
|
3773
|
+
return this.check(/* @__PURE__ */ ui(Ho, e));
|
|
3774
3774
|
},
|
|
3775
3775
|
cuid2(e) {
|
|
3776
|
-
return this.check(/* @__PURE__ */
|
|
3776
|
+
return this.check(/* @__PURE__ */ di(Uo, e));
|
|
3777
3777
|
},
|
|
3778
3778
|
ulid(e) {
|
|
3779
|
-
return this.check(/* @__PURE__ */
|
|
3779
|
+
return this.check(/* @__PURE__ */ fi(Wo, e));
|
|
3780
3780
|
},
|
|
3781
3781
|
base64(e) {
|
|
3782
|
-
return this.check(/* @__PURE__ */
|
|
3782
|
+
return this.check(/* @__PURE__ */ yi(Zo, e));
|
|
3783
3783
|
},
|
|
3784
3784
|
base64url(e) {
|
|
3785
|
-
return this.check(/* @__PURE__ */
|
|
3785
|
+
return this.check(/* @__PURE__ */ bi(Qo, e));
|
|
3786
3786
|
},
|
|
3787
3787
|
xid(e) {
|
|
3788
|
-
return this.check(/* @__PURE__ */
|
|
3788
|
+
return this.check(/* @__PURE__ */ pi(Go, e));
|
|
3789
3789
|
},
|
|
3790
3790
|
ksuid(e) {
|
|
3791
|
-
return this.check(/* @__PURE__ */
|
|
3791
|
+
return this.check(/* @__PURE__ */ mi(Ko, e));
|
|
3792
3792
|
},
|
|
3793
3793
|
ipv4(e) {
|
|
3794
|
-
return this.check(/* @__PURE__ */
|
|
3794
|
+
return this.check(/* @__PURE__ */ hi(qo, e));
|
|
3795
3795
|
},
|
|
3796
3796
|
ipv6(e) {
|
|
3797
|
-
return this.check(/* @__PURE__ */
|
|
3797
|
+
return this.check(/* @__PURE__ */ gi(Jo, e));
|
|
3798
3798
|
},
|
|
3799
3799
|
cidrv4(e) {
|
|
3800
|
-
return this.check(/* @__PURE__ */
|
|
3800
|
+
return this.check(/* @__PURE__ */ _i(Yo, e));
|
|
3801
3801
|
},
|
|
3802
3802
|
cidrv6(e) {
|
|
3803
|
-
return this.check(/* @__PURE__ */
|
|
3803
|
+
return this.check(/* @__PURE__ */ vi(Xo, e));
|
|
3804
3804
|
},
|
|
3805
3805
|
e164(e) {
|
|
3806
|
-
return this.check(/* @__PURE__ */
|
|
3806
|
+
return this.check(/* @__PURE__ */ xi($o, e));
|
|
3807
3807
|
},
|
|
3808
3808
|
datetime(e) {
|
|
3809
|
-
return this.check(/* @__PURE__ */
|
|
3809
|
+
return this.check(/* @__PURE__ */ Ci(Mo, e));
|
|
3810
3810
|
},
|
|
3811
3811
|
date(e) {
|
|
3812
|
-
return this.check(/* @__PURE__ */
|
|
3812
|
+
return this.check(/* @__PURE__ */ wi(No, e));
|
|
3813
3813
|
},
|
|
3814
3814
|
time(e) {
|
|
3815
|
-
return this.check(/* @__PURE__ */
|
|
3815
|
+
return this.check(/* @__PURE__ */ Ti(Po, e));
|
|
3816
3816
|
},
|
|
3817
3817
|
duration(e) {
|
|
3818
|
-
return this.check(/* @__PURE__ */
|
|
3818
|
+
return this.check(/* @__PURE__ */ Ei(Fo, e));
|
|
3819
3819
|
}
|
|
3820
3820
|
});
|
|
3821
|
-
function
|
|
3822
|
-
return /* @__PURE__ */
|
|
3821
|
+
function jo(e) {
|
|
3822
|
+
return /* @__PURE__ */ ei(Ao, e);
|
|
3823
3823
|
}
|
|
3824
3824
|
var I = /*@__PURE__*/ w("ZodStringFormat", (e, t) => {
|
|
3825
|
-
|
|
3825
|
+
A.init(e, t), ko.init(e, t);
|
|
3826
3826
|
}), Mo = /*@__PURE__*/ w("ZodISODateTime", (e, t) => {
|
|
3827
|
-
|
|
3827
|
+
An.init(e, t), I.init(e, t);
|
|
3828
3828
|
}), No = /*@__PURE__*/ w("ZodISODate", (e, t) => {
|
|
3829
|
-
|
|
3829
|
+
jn.init(e, t), I.init(e, t);
|
|
3830
3830
|
}), Po = /*@__PURE__*/ w("ZodISOTime", (e, t) => {
|
|
3831
|
-
|
|
3831
|
+
Mn.init(e, t), I.init(e, t);
|
|
3832
3832
|
}), Fo = /*@__PURE__*/ w("ZodISODuration", (e, t) => {
|
|
3833
|
-
|
|
3833
|
+
Nn.init(e, t), I.init(e, t);
|
|
3834
3834
|
}), Io = /*@__PURE__*/ w("ZodEmail", (e, t) => {
|
|
3835
|
-
|
|
3835
|
+
gn.init(e, t), I.init(e, t);
|
|
3836
3836
|
}), Lo = /*@__PURE__*/ w("ZodGUID", (e, t) => {
|
|
3837
|
-
|
|
3837
|
+
mn.init(e, t), I.init(e, t);
|
|
3838
3838
|
}), Ro = /*@__PURE__*/ w("ZodUUID", (e, t) => {
|
|
3839
|
-
|
|
3839
|
+
hn.init(e, t), I.init(e, t);
|
|
3840
3840
|
}), zo = /*@__PURE__*/ w("ZodURL", (e, t) => {
|
|
3841
|
-
|
|
3841
|
+
Sn.init(e, t), I.init(e, t);
|
|
3842
3842
|
}), Bo = /*@__PURE__*/ w("ZodEmoji", (e, t) => {
|
|
3843
|
-
|
|
3843
|
+
Cn.init(e, t), I.init(e, t);
|
|
3844
3844
|
}), Vo = /*@__PURE__*/ w("ZodNanoID", (e, t) => {
|
|
3845
|
-
|
|
3845
|
+
wn.init(e, t), I.init(e, t);
|
|
3846
3846
|
}), Ho = /*@__PURE__*/ w("ZodCUID", (e, t) => {
|
|
3847
|
-
|
|
3847
|
+
Tn.init(e, t), I.init(e, t);
|
|
3848
3848
|
}), Uo = /*@__PURE__*/ w("ZodCUID2", (e, t) => {
|
|
3849
|
-
|
|
3849
|
+
En.init(e, t), I.init(e, t);
|
|
3850
3850
|
}), Wo = /*@__PURE__*/ w("ZodULID", (e, t) => {
|
|
3851
|
-
|
|
3851
|
+
Dn.init(e, t), I.init(e, t);
|
|
3852
3852
|
}), Go = /*@__PURE__*/ w("ZodXID", (e, t) => {
|
|
3853
|
-
|
|
3853
|
+
On.init(e, t), I.init(e, t);
|
|
3854
3854
|
}), Ko = /*@__PURE__*/ w("ZodKSUID", (e, t) => {
|
|
3855
|
-
|
|
3855
|
+
kn.init(e, t), I.init(e, t);
|
|
3856
3856
|
}), qo = /*@__PURE__*/ w("ZodIPv4", (e, t) => {
|
|
3857
|
-
|
|
3857
|
+
Pn.init(e, t), I.init(e, t);
|
|
3858
3858
|
}), Jo = /*@__PURE__*/ w("ZodIPv6", (e, t) => {
|
|
3859
|
-
|
|
3859
|
+
Ln.init(e, t), I.init(e, t);
|
|
3860
3860
|
}), Yo = /*@__PURE__*/ w("ZodCIDRv4", (e, t) => {
|
|
3861
|
-
|
|
3861
|
+
Rn.init(e, t), I.init(e, t);
|
|
3862
3862
|
}), Xo = /*@__PURE__*/ w("ZodCIDRv6", (e, t) => {
|
|
3863
|
-
|
|
3863
|
+
Bn.init(e, t), I.init(e, t);
|
|
3864
3864
|
}), Zo = /*@__PURE__*/ w("ZodBase64", (e, t) => {
|
|
3865
|
-
|
|
3865
|
+
Hn.init(e, t), I.init(e, t);
|
|
3866
3866
|
}), Qo = /*@__PURE__*/ w("ZodBase64URL", (e, t) => {
|
|
3867
|
-
|
|
3867
|
+
Wn.init(e, t), I.init(e, t);
|
|
3868
3868
|
}), $o = /*@__PURE__*/ w("ZodE164", (e, t) => {
|
|
3869
|
-
|
|
3869
|
+
Gn.init(e, t), I.init(e, t);
|
|
3870
3870
|
}), es = /*@__PURE__*/ w("ZodJWT", (e, t) => {
|
|
3871
|
-
|
|
3871
|
+
qn.init(e, t), I.init(e, t);
|
|
3872
3872
|
}), ts = /*@__PURE__*/ w("ZodNumber", (e, t) => {
|
|
3873
|
-
|
|
3873
|
+
Jn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => va(e, t, n, r);
|
|
3874
3874
|
let n = e._zod.bag;
|
|
3875
3875
|
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;
|
|
3876
3876
|
}, {
|
|
3877
3877
|
gt(e, t) {
|
|
3878
|
-
return this.check(/* @__PURE__ */
|
|
3878
|
+
return this.check(/* @__PURE__ */ Fi(e, t));
|
|
3879
3879
|
},
|
|
3880
3880
|
gte(e, t) {
|
|
3881
|
-
return this.check(/* @__PURE__ */
|
|
3881
|
+
return this.check(/* @__PURE__ */ Ii(e, t));
|
|
3882
3882
|
},
|
|
3883
3883
|
min(e, t) {
|
|
3884
|
-
return this.check(/* @__PURE__ */
|
|
3884
|
+
return this.check(/* @__PURE__ */ Ii(e, t));
|
|
3885
3885
|
},
|
|
3886
3886
|
lt(e, t) {
|
|
3887
|
-
return this.check(/* @__PURE__ */
|
|
3887
|
+
return this.check(/* @__PURE__ */ Ni(e, t));
|
|
3888
3888
|
},
|
|
3889
3889
|
lte(e, t) {
|
|
3890
|
-
return this.check(/* @__PURE__ */
|
|
3890
|
+
return this.check(/* @__PURE__ */ Pi(e, t));
|
|
3891
3891
|
},
|
|
3892
3892
|
max(e, t) {
|
|
3893
|
-
return this.check(/* @__PURE__ */
|
|
3893
|
+
return this.check(/* @__PURE__ */ Pi(e, t));
|
|
3894
3894
|
},
|
|
3895
3895
|
int(e) {
|
|
3896
3896
|
return this.check(rs(e));
|
|
@@ -3899,84 +3899,84 @@ var I = /*@__PURE__*/ w("ZodStringFormat", (e, t) => {
|
|
|
3899
3899
|
return this.check(rs(e));
|
|
3900
3900
|
},
|
|
3901
3901
|
positive(e) {
|
|
3902
|
-
return this.check(/* @__PURE__ */
|
|
3902
|
+
return this.check(/* @__PURE__ */ Fi(0, e));
|
|
3903
3903
|
},
|
|
3904
3904
|
nonnegative(e) {
|
|
3905
|
-
return this.check(/* @__PURE__ */
|
|
3905
|
+
return this.check(/* @__PURE__ */ Ii(0, e));
|
|
3906
3906
|
},
|
|
3907
3907
|
negative(e) {
|
|
3908
|
-
return this.check(/* @__PURE__ */
|
|
3908
|
+
return this.check(/* @__PURE__ */ Ni(0, e));
|
|
3909
3909
|
},
|
|
3910
3910
|
nonpositive(e) {
|
|
3911
|
-
return this.check(/* @__PURE__ */
|
|
3911
|
+
return this.check(/* @__PURE__ */ Pi(0, e));
|
|
3912
3912
|
},
|
|
3913
3913
|
multipleOf(e, t) {
|
|
3914
|
-
return this.check(/* @__PURE__ */
|
|
3914
|
+
return this.check(/* @__PURE__ */ Li(e, t));
|
|
3915
3915
|
},
|
|
3916
3916
|
step(e, t) {
|
|
3917
|
-
return this.check(/* @__PURE__ */
|
|
3917
|
+
return this.check(/* @__PURE__ */ Li(e, t));
|
|
3918
3918
|
},
|
|
3919
3919
|
finite() {
|
|
3920
3920
|
return this;
|
|
3921
3921
|
}
|
|
3922
3922
|
});
|
|
3923
3923
|
function L(e) {
|
|
3924
|
-
return /* @__PURE__ */
|
|
3924
|
+
return /* @__PURE__ */ Di(ts, e);
|
|
3925
3925
|
}
|
|
3926
3926
|
var ns = /*@__PURE__*/ w("ZodNumberFormat", (e, t) => {
|
|
3927
|
-
|
|
3927
|
+
Yn.init(e, t), ts.init(e, t);
|
|
3928
3928
|
});
|
|
3929
3929
|
function rs(e) {
|
|
3930
|
-
return /* @__PURE__ */
|
|
3930
|
+
return /* @__PURE__ */ Oi(ns, e);
|
|
3931
3931
|
}
|
|
3932
3932
|
var is = /*@__PURE__*/ w("ZodBoolean", (e, t) => {
|
|
3933
|
-
|
|
3933
|
+
Xn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => ya(e, t, n, r);
|
|
3934
3934
|
});
|
|
3935
3935
|
function R(e) {
|
|
3936
|
-
return /* @__PURE__ */
|
|
3936
|
+
return /* @__PURE__ */ ki(is, e);
|
|
3937
3937
|
}
|
|
3938
3938
|
var as = /*@__PURE__*/ w("ZodNull", (e, t) => {
|
|
3939
|
-
|
|
3939
|
+
Zn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Sa(e, t, n, r);
|
|
3940
3940
|
});
|
|
3941
3941
|
function os(e) {
|
|
3942
|
-
return /* @__PURE__ */
|
|
3942
|
+
return /* @__PURE__ */ Ai(as, e);
|
|
3943
3943
|
}
|
|
3944
3944
|
var ss = /*@__PURE__*/ w("ZodUnknown", (e, t) => {
|
|
3945
|
-
|
|
3945
|
+
Qn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
|
|
3946
3946
|
});
|
|
3947
3947
|
function cs() {
|
|
3948
|
-
return /* @__PURE__ */
|
|
3948
|
+
return /* @__PURE__ */ ji(ss);
|
|
3949
3949
|
}
|
|
3950
3950
|
var ls = /*@__PURE__*/ w("ZodNever", (e, t) => {
|
|
3951
|
-
|
|
3951
|
+
$n.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ta(e, t, n, r);
|
|
3952
3952
|
});
|
|
3953
3953
|
function us(e) {
|
|
3954
|
-
return /* @__PURE__ */
|
|
3954
|
+
return /* @__PURE__ */ Mi(ls, e);
|
|
3955
3955
|
}
|
|
3956
3956
|
var ds = /*@__PURE__*/ w("ZodArray", (e, t) => {
|
|
3957
|
-
|
|
3957
|
+
Oo(), tr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ba(e, t, n, r), e.element = t.element;
|
|
3958
3958
|
}, {
|
|
3959
3959
|
min(e, t) {
|
|
3960
|
-
return this.check(/* @__PURE__ */
|
|
3960
|
+
return this.check(/* @__PURE__ */ zi(e, t));
|
|
3961
3961
|
},
|
|
3962
3962
|
nonempty(e) {
|
|
3963
|
-
return this.check(/* @__PURE__ */
|
|
3963
|
+
return this.check(/* @__PURE__ */ zi(1, e));
|
|
3964
3964
|
},
|
|
3965
3965
|
max(e, t) {
|
|
3966
|
-
return this.check(/* @__PURE__ */
|
|
3966
|
+
return this.check(/* @__PURE__ */ Ri(e, t));
|
|
3967
3967
|
},
|
|
3968
3968
|
length(e, t) {
|
|
3969
|
-
return this.check(/* @__PURE__ */
|
|
3969
|
+
return this.check(/* @__PURE__ */ Bi(e, t));
|
|
3970
3970
|
},
|
|
3971
3971
|
unwrap() {
|
|
3972
3972
|
return this.element;
|
|
3973
3973
|
}
|
|
3974
3974
|
});
|
|
3975
3975
|
function z(e, t) {
|
|
3976
|
-
return /* @__PURE__ */
|
|
3976
|
+
return /* @__PURE__ */ $i(ds, e, t);
|
|
3977
3977
|
}
|
|
3978
3978
|
var fs = /*@__PURE__*/ w("ZodObject", (e, t) => {
|
|
3979
|
-
|
|
3979
|
+
Oo(), cr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ha(e, t, n, r), Ae(e, "shape", (e) => e._zod.def.shape, !1);
|
|
3980
3980
|
}, {
|
|
3981
3981
|
keyof() {
|
|
3982
3982
|
return U(Object.keys(this._zod.def.shape));
|
|
@@ -4052,7 +4052,7 @@ function ps(e, t) {
|
|
|
4052
4052
|
});
|
|
4053
4053
|
}
|
|
4054
4054
|
var ms = /*@__PURE__*/ w("ZodUnion", (e, t) => {
|
|
4055
|
-
|
|
4055
|
+
ur.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ua(e, t, n, r), e.options = t.options;
|
|
4056
4056
|
});
|
|
4057
4057
|
function V(e, t) {
|
|
4058
4058
|
return new ms({
|
|
@@ -4062,7 +4062,7 @@ function V(e, t) {
|
|
|
4062
4062
|
});
|
|
4063
4063
|
}
|
|
4064
4064
|
var hs = /*@__PURE__*/ w("ZodIntersection", (e, t) => {
|
|
4065
|
-
|
|
4065
|
+
dr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wa(e, t, n, r);
|
|
4066
4066
|
});
|
|
4067
4067
|
function gs(e, t) {
|
|
4068
4068
|
return new hs({
|
|
@@ -4072,12 +4072,12 @@ function gs(e, t) {
|
|
|
4072
4072
|
});
|
|
4073
4073
|
}
|
|
4074
4074
|
var _s = /*@__PURE__*/ w("ZodRecord", (e, t) => {
|
|
4075
|
-
|
|
4075
|
+
Oo(), mr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ya(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
4076
4076
|
});
|
|
4077
4077
|
function H(e, t, n) {
|
|
4078
4078
|
return !t || !t._zod ? new _s({
|
|
4079
4079
|
type: "record",
|
|
4080
|
-
keyType:
|
|
4080
|
+
keyType: jo(),
|
|
4081
4081
|
valueType: e,
|
|
4082
4082
|
...v(t)
|
|
4083
4083
|
}) : new _s({
|
|
@@ -4088,7 +4088,7 @@ function H(e, t, n) {
|
|
|
4088
4088
|
});
|
|
4089
4089
|
}
|
|
4090
4090
|
var vs = /*@__PURE__*/ w("ZodEnum", (e, t) => {
|
|
4091
|
-
|
|
4091
|
+
hr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => ka(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
4092
4092
|
let n = new Set(Object.keys(t.entries));
|
|
4093
4093
|
e.extract = (e, r) => {
|
|
4094
4094
|
let i = {};
|
|
@@ -4120,7 +4120,7 @@ function U(e, t) {
|
|
|
4120
4120
|
});
|
|
4121
4121
|
}
|
|
4122
4122
|
var ys = /*@__PURE__*/ w("ZodLiteral", (e, t) => {
|
|
4123
|
-
|
|
4123
|
+
gr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Aa(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
|
|
4124
4124
|
if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
4125
4125
|
return t.values[0];
|
|
4126
4126
|
} });
|
|
@@ -4133,13 +4133,13 @@ function W(e, t) {
|
|
|
4133
4133
|
});
|
|
4134
4134
|
}
|
|
4135
4135
|
var bs = /*@__PURE__*/ w("ZodTransform", (e, t) => {
|
|
4136
|
-
|
|
4137
|
-
if (r.direction === "backward") throw new
|
|
4136
|
+
Oo(), _r.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => La(e, t, n, r), e._zod.parse = (n, r) => {
|
|
4137
|
+
if (r.direction === "backward") throw new Le(e.constructor.name);
|
|
4138
4138
|
n.addIssue = (r) => {
|
|
4139
|
-
if (typeof r == "string") n.issues.push(
|
|
4139
|
+
if (typeof r == "string") n.issues.push(Se(r, n.value, t));
|
|
4140
4140
|
else {
|
|
4141
4141
|
let t = r;
|
|
4142
|
-
t.fatal && (t.continue = !1), t.code ??= "custom", "input" in t || (t.input = n.value), t.inst ??= e, n.issues.push(
|
|
4142
|
+
t.fatal && (t.continue = !1), t.code ??= "custom", "input" in t || (t.input = n.value), t.inst ??= e, n.issues.push(Se(t));
|
|
4143
4143
|
}
|
|
4144
4144
|
};
|
|
4145
4145
|
let i = t.transform(n.value, n);
|
|
@@ -4153,7 +4153,7 @@ function xs(e) {
|
|
|
4153
4153
|
});
|
|
4154
4154
|
}
|
|
4155
4155
|
var Ss = /*@__PURE__*/ w("ZodOptional", (e, t) => {
|
|
4156
|
-
|
|
4156
|
+
yr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => oo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4157
4157
|
});
|
|
4158
4158
|
function Cs(e) {
|
|
4159
4159
|
return new Ss({
|
|
@@ -4162,7 +4162,7 @@ function Cs(e) {
|
|
|
4162
4162
|
});
|
|
4163
4163
|
}
|
|
4164
4164
|
var ws = /*@__PURE__*/ w("ZodExactOptional", (e, t) => {
|
|
4165
|
-
|
|
4165
|
+
br.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => oo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4166
4166
|
});
|
|
4167
4167
|
function Ts(e) {
|
|
4168
4168
|
return new ws({
|
|
@@ -4171,7 +4171,7 @@ function Ts(e) {
|
|
|
4171
4171
|
});
|
|
4172
4172
|
}
|
|
4173
4173
|
var Es = /*@__PURE__*/ w("ZodNullable", (e, t) => {
|
|
4174
|
-
|
|
4174
|
+
xr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Xa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4175
4175
|
});
|
|
4176
4176
|
function Ds(e) {
|
|
4177
4177
|
return new Es({
|
|
@@ -4180,7 +4180,7 @@ function Ds(e) {
|
|
|
4180
4180
|
});
|
|
4181
4181
|
}
|
|
4182
4182
|
var Os = /*@__PURE__*/ w("ZodDefault", (e, t) => {
|
|
4183
|
-
|
|
4183
|
+
Sr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => eo(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
4184
4184
|
});
|
|
4185
4185
|
function ks(e, t) {
|
|
4186
4186
|
return new Os({
|
|
@@ -4192,7 +4192,7 @@ function ks(e, t) {
|
|
|
4192
4192
|
});
|
|
4193
4193
|
}
|
|
4194
4194
|
var As = /*@__PURE__*/ w("ZodPrefault", (e, t) => {
|
|
4195
|
-
|
|
4195
|
+
wr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => to(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4196
4196
|
});
|
|
4197
4197
|
function js(e, t) {
|
|
4198
4198
|
return new As({
|
|
@@ -4204,7 +4204,7 @@ function js(e, t) {
|
|
|
4204
4204
|
});
|
|
4205
4205
|
}
|
|
4206
4206
|
var Ms = /*@__PURE__*/ w("ZodNonOptional", (e, t) => {
|
|
4207
|
-
|
|
4207
|
+
Tr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Za(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4208
4208
|
});
|
|
4209
4209
|
function Ns(e, t) {
|
|
4210
4210
|
return new Ms({
|
|
@@ -4214,7 +4214,7 @@ function Ns(e, t) {
|
|
|
4214
4214
|
});
|
|
4215
4215
|
}
|
|
4216
4216
|
var Ps = /*@__PURE__*/ w("ZodCatch", (e, t) => {
|
|
4217
|
-
|
|
4217
|
+
Or.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => no(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
4218
4218
|
});
|
|
4219
4219
|
function Fs(e, t) {
|
|
4220
4220
|
return new Ps({
|
|
@@ -4224,7 +4224,7 @@ function Fs(e, t) {
|
|
|
4224
4224
|
});
|
|
4225
4225
|
}
|
|
4226
4226
|
var Is = /*@__PURE__*/ w("ZodPipe", (e, t) => {
|
|
4227
|
-
|
|
4227
|
+
kr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => ro(e, t, n, r), e.in = t.in, e.out = t.out;
|
|
4228
4228
|
});
|
|
4229
4229
|
function Ls(e, t) {
|
|
4230
4230
|
return new Is({
|
|
@@ -4234,7 +4234,7 @@ function Ls(e, t) {
|
|
|
4234
4234
|
});
|
|
4235
4235
|
}
|
|
4236
4236
|
var Rs = /*@__PURE__*/ w("ZodReadonly", (e, t) => {
|
|
4237
|
-
|
|
4237
|
+
jr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => io(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4238
4238
|
});
|
|
4239
4239
|
function zs(e) {
|
|
4240
4240
|
return new Rs({
|
|
@@ -4243,7 +4243,7 @@ function zs(e) {
|
|
|
4243
4243
|
});
|
|
4244
4244
|
}
|
|
4245
4245
|
var Bs = /*@__PURE__*/ w("ZodLazy", (e, t) => {
|
|
4246
|
-
|
|
4246
|
+
Nr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => so(e, t, n, r), e.unwrap = () => e._zod.def.getter();
|
|
4247
4247
|
});
|
|
4248
4248
|
function Vs(e) {
|
|
4249
4249
|
return new Bs({
|
|
@@ -4252,22 +4252,22 @@ function Vs(e) {
|
|
|
4252
4252
|
});
|
|
4253
4253
|
}
|
|
4254
4254
|
var Hs = /*@__PURE__*/ w("ZodCustom", (e, t) => {
|
|
4255
|
-
|
|
4255
|
+
Pr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Fa(e, t, n, r);
|
|
4256
4256
|
});
|
|
4257
4257
|
function Us(e, t = {}) {
|
|
4258
|
-
return /* @__PURE__ */
|
|
4258
|
+
return /* @__PURE__ */ ea(Hs, e, t);
|
|
4259
4259
|
}
|
|
4260
4260
|
function Ws(e, t) {
|
|
4261
|
-
return /* @__PURE__ */
|
|
4261
|
+
return /* @__PURE__ */ ta(e, t);
|
|
4262
4262
|
}
|
|
4263
4263
|
function Gs(e) {
|
|
4264
4264
|
let t = Vs(() => V([
|
|
4265
|
-
|
|
4265
|
+
jo(e),
|
|
4266
4266
|
L(),
|
|
4267
4267
|
R(),
|
|
4268
4268
|
os(),
|
|
4269
4269
|
z(t),
|
|
4270
|
-
H(
|
|
4270
|
+
H(jo(), t)
|
|
4271
4271
|
]));
|
|
4272
4272
|
return t;
|
|
4273
4273
|
}
|
|
@@ -4279,8 +4279,8 @@ function Ks(e, t = 0) {
|
|
|
4279
4279
|
//#region src/flow/common/triggerScheduleSchema.ts
|
|
4280
4280
|
var qs = z(V([B({
|
|
4281
4281
|
type: W("cron"),
|
|
4282
|
-
expression:
|
|
4283
|
-
timezone:
|
|
4282
|
+
expression: jo(),
|
|
4283
|
+
timezone: jo()
|
|
4284
4284
|
}), B({
|
|
4285
4285
|
type: W("every"),
|
|
4286
4286
|
unit: U([
|
|
@@ -4291,38 +4291,38 @@ var qs = z(V([B({
|
|
|
4291
4291
|
"week"
|
|
4292
4292
|
]),
|
|
4293
4293
|
value: L()
|
|
4294
|
-
})])), G =
|
|
4294
|
+
})])), Js = 3, G = jo(), K = Gs(), Ys = z(G), Xs = B({
|
|
4295
4295
|
description: G.optional(),
|
|
4296
4296
|
jsonSchema: K,
|
|
4297
4297
|
nullable: R(),
|
|
4298
4298
|
handle: G
|
|
4299
|
-
}), q =
|
|
4299
|
+
}), q = Xs.extend({ value: K.optional() }), Zs = B({
|
|
4300
4300
|
collapsed: R().optional(),
|
|
4301
4301
|
group: G
|
|
4302
|
-
}),
|
|
4302
|
+
}), Qs = B({
|
|
4303
4303
|
kind: W("node"),
|
|
4304
4304
|
nodeId: G,
|
|
4305
4305
|
output: G
|
|
4306
|
-
}),
|
|
4306
|
+
}), $s = B({
|
|
4307
4307
|
kind: W("flow"),
|
|
4308
4308
|
input: G
|
|
4309
|
-
}),
|
|
4310
|
-
Zs,
|
|
4309
|
+
}), ec = V([
|
|
4311
4310
|
Qs,
|
|
4311
|
+
$s,
|
|
4312
4312
|
B({
|
|
4313
4313
|
kind: W("binding"),
|
|
4314
4314
|
bindingId: G
|
|
4315
4315
|
})
|
|
4316
|
-
]),
|
|
4316
|
+
]), tc = V([B({
|
|
4317
4317
|
kind: W("value"),
|
|
4318
4318
|
value: K
|
|
4319
4319
|
}), B({
|
|
4320
4320
|
kind: W("sources"),
|
|
4321
|
-
sources: z(
|
|
4322
|
-
})]),
|
|
4323
|
-
inputs: z(V([q,
|
|
4324
|
-
outputs: z(V([
|
|
4325
|
-
},
|
|
4321
|
+
sources: z(ec)
|
|
4322
|
+
})]), nc = H(G, tc), rc = {
|
|
4323
|
+
inputs: z(V([q, Zs])),
|
|
4324
|
+
outputs: z(V([Xs, Zs]))
|
|
4325
|
+
}, ic = B({
|
|
4326
4326
|
kind: W("connector"),
|
|
4327
4327
|
action: G,
|
|
4328
4328
|
connectionId: G.optional(),
|
|
@@ -4330,19 +4330,19 @@ var qs = z(V([B({
|
|
|
4330
4330
|
connectionId: G,
|
|
4331
4331
|
alias: G.optional()
|
|
4332
4332
|
}))
|
|
4333
|
-
}),
|
|
4334
|
-
...
|
|
4333
|
+
}), ac = B({
|
|
4334
|
+
...rc,
|
|
4335
4335
|
name: G,
|
|
4336
4336
|
moduleId: G,
|
|
4337
|
-
capabilities: z(
|
|
4338
|
-
}),
|
|
4337
|
+
capabilities: z(ic).optional()
|
|
4338
|
+
}), oc = V([B({
|
|
4339
4339
|
kind: W("value"),
|
|
4340
4340
|
value: K
|
|
4341
4341
|
}), B({
|
|
4342
4342
|
kind: W("input"),
|
|
4343
4343
|
input: G
|
|
4344
|
-
})]),
|
|
4345
|
-
...
|
|
4344
|
+
})]), sc = V([oc, B({ kind: W("model") })]), cc = B({
|
|
4345
|
+
...rc,
|
|
4346
4346
|
name: G,
|
|
4347
4347
|
executor: V([
|
|
4348
4348
|
B({
|
|
@@ -4358,7 +4358,7 @@ var qs = z(V([B({
|
|
|
4358
4358
|
kind: W("agent"),
|
|
4359
4359
|
code: R().optional(),
|
|
4360
4360
|
model: G,
|
|
4361
|
-
prompt:
|
|
4361
|
+
prompt: oc,
|
|
4362
4362
|
system: G,
|
|
4363
4363
|
maxRounds: L(),
|
|
4364
4364
|
tools: z(B({
|
|
@@ -4368,16 +4368,16 @@ var qs = z(V([B({
|
|
|
4368
4368
|
action: G,
|
|
4369
4369
|
connectionId: G.optional(),
|
|
4370
4370
|
approval: R(),
|
|
4371
|
-
inputs: z(q.extend({ source:
|
|
4371
|
+
inputs: z(q.extend({ source: sc }))
|
|
4372
4372
|
})),
|
|
4373
4373
|
notification: B({
|
|
4374
4374
|
taskId: G,
|
|
4375
4375
|
messageHandle: G,
|
|
4376
|
-
inputs: H(G,
|
|
4376
|
+
inputs: H(G, oc)
|
|
4377
4377
|
}).optional()
|
|
4378
4378
|
})
|
|
4379
4379
|
])
|
|
4380
|
-
}),
|
|
4380
|
+
}), lc = {
|
|
4381
4381
|
input: q,
|
|
4382
4382
|
cases: z(B({
|
|
4383
4383
|
output: G,
|
|
@@ -4410,26 +4410,26 @@ var qs = z(V([B({
|
|
|
4410
4410
|
}))
|
|
4411
4411
|
})),
|
|
4412
4412
|
defaultOutput: G.optional()
|
|
4413
|
-
},
|
|
4413
|
+
}, uc = { prompt: G }, dc = {
|
|
4414
4414
|
bodyFields: z(q),
|
|
4415
4415
|
options: B({
|
|
4416
|
-
allowedMethods:
|
|
4417
|
-
allowedOrigins:
|
|
4416
|
+
allowedMethods: Ys.optional(),
|
|
4417
|
+
allowedOrigins: Ys.optional(),
|
|
4418
4418
|
noResponseBody: R().optional(),
|
|
4419
4419
|
responseData: G.optional(),
|
|
4420
4420
|
responseHeaders: H(G, G).optional(),
|
|
4421
4421
|
responseStatusCode: L().optional()
|
|
4422
4422
|
}).optional()
|
|
4423
|
-
},
|
|
4423
|
+
}, fc = {
|
|
4424
4424
|
configSchema: K,
|
|
4425
4425
|
definitionVersion: W(2),
|
|
4426
4426
|
description: G,
|
|
4427
4427
|
displayName: G,
|
|
4428
4428
|
key: G,
|
|
4429
4429
|
name: G,
|
|
4430
|
-
outputs: z(
|
|
4430
|
+
outputs: z(Xs).refine((e) => new Set(e.map((e) => e.handle)).size === e.length, "Duplicate Trigger output handle."),
|
|
4431
4431
|
provider: G
|
|
4432
|
-
},
|
|
4432
|
+
}, pc = B({
|
|
4433
4433
|
body: B({
|
|
4434
4434
|
allowArray: R(),
|
|
4435
4435
|
allowEmpty: R(),
|
|
@@ -4449,22 +4449,22 @@ var qs = z(V([B({
|
|
|
4449
4449
|
"PUT"
|
|
4450
4450
|
])),
|
|
4451
4451
|
successStatus: L()
|
|
4452
|
-
}),
|
|
4452
|
+
}), mc = {
|
|
4453
4453
|
name: G,
|
|
4454
4454
|
description: G.optional(),
|
|
4455
4455
|
icon: G.optional()
|
|
4456
4456
|
}, J = {
|
|
4457
4457
|
maxExecutions: L().int().positive().max(2 ** 53 - 1).optional(),
|
|
4458
|
-
inputs:
|
|
4458
|
+
inputs: nc,
|
|
4459
4459
|
name: G.optional(),
|
|
4460
4460
|
description: G.optional(),
|
|
4461
4461
|
icon: G.optional(),
|
|
4462
4462
|
timeoutMs: L().optional()
|
|
4463
|
-
},
|
|
4463
|
+
}, hc = V([
|
|
4464
4464
|
B({
|
|
4465
4465
|
...J,
|
|
4466
4466
|
kind: W("condition"),
|
|
4467
|
-
...
|
|
4467
|
+
...lc
|
|
4468
4468
|
}),
|
|
4469
4469
|
B({
|
|
4470
4470
|
...J,
|
|
@@ -4480,7 +4480,7 @@ var qs = z(V([B({
|
|
|
4480
4480
|
B({
|
|
4481
4481
|
...J,
|
|
4482
4482
|
kind: W("task"),
|
|
4483
|
-
task:
|
|
4483
|
+
task: ac,
|
|
4484
4484
|
additionalInputs: z(q).optional()
|
|
4485
4485
|
}),
|
|
4486
4486
|
B({
|
|
@@ -4493,92 +4493,92 @@ var qs = z(V([B({
|
|
|
4493
4493
|
...J,
|
|
4494
4494
|
kind: W("approval"),
|
|
4495
4495
|
input: q,
|
|
4496
|
-
...
|
|
4496
|
+
...uc
|
|
4497
4497
|
}).omit({ timeoutMs: !0 }),
|
|
4498
4498
|
ps({
|
|
4499
4499
|
...J,
|
|
4500
4500
|
kind: W("wait"),
|
|
4501
4501
|
input: q,
|
|
4502
|
-
...
|
|
4502
|
+
...uc
|
|
4503
4503
|
}).omit({ timeoutMs: !0 }),
|
|
4504
4504
|
B({
|
|
4505
|
-
...
|
|
4505
|
+
...mc,
|
|
4506
4506
|
kind: W("manual")
|
|
4507
4507
|
}),
|
|
4508
4508
|
B({
|
|
4509
|
-
...
|
|
4509
|
+
...mc,
|
|
4510
4510
|
kind: W("webhook"),
|
|
4511
|
-
...
|
|
4511
|
+
...dc
|
|
4512
4512
|
}),
|
|
4513
4513
|
B({
|
|
4514
|
-
...
|
|
4514
|
+
...mc,
|
|
4515
4515
|
kind: W("cron"),
|
|
4516
4516
|
cronTimes: qs
|
|
4517
4517
|
}),
|
|
4518
4518
|
B({
|
|
4519
|
-
...
|
|
4519
|
+
...mc,
|
|
4520
4520
|
kind: W("poll"),
|
|
4521
4521
|
bindingId: G,
|
|
4522
4522
|
config: H(G, K),
|
|
4523
4523
|
definition: B({
|
|
4524
|
-
...
|
|
4524
|
+
...fc,
|
|
4525
4525
|
type: W("poll")
|
|
4526
4526
|
}),
|
|
4527
4527
|
pollTimes: qs
|
|
4528
4528
|
}),
|
|
4529
4529
|
B({
|
|
4530
|
-
...
|
|
4530
|
+
...mc,
|
|
4531
4531
|
kind: W("integration"),
|
|
4532
4532
|
bindingId: G,
|
|
4533
4533
|
config: H(G, K),
|
|
4534
4534
|
definition: B({
|
|
4535
|
-
...
|
|
4535
|
+
...fc,
|
|
4536
4536
|
type: W("integration"),
|
|
4537
|
-
endpoint:
|
|
4537
|
+
endpoint: pc
|
|
4538
4538
|
})
|
|
4539
4539
|
})
|
|
4540
|
-
]),
|
|
4540
|
+
]), gc = V([B({ kind: W("flow") }), B({
|
|
4541
4541
|
kind: W("subflow"),
|
|
4542
4542
|
id: G
|
|
4543
|
-
})]),
|
|
4543
|
+
})]), _c = B({
|
|
4544
4544
|
source: G,
|
|
4545
4545
|
target: G,
|
|
4546
4546
|
sourceHandle: G.optional()
|
|
4547
4547
|
}), Y = {
|
|
4548
4548
|
nodeId: G,
|
|
4549
|
-
target:
|
|
4550
|
-
},
|
|
4549
|
+
target: gc
|
|
4550
|
+
}, vc = B({
|
|
4551
4551
|
name: G,
|
|
4552
4552
|
inputs: z(q),
|
|
4553
|
-
outputs: z(
|
|
4554
|
-
}), vc = B({
|
|
4555
|
-
nodes: H(G, mc),
|
|
4556
|
-
edges: z(gc).default([])
|
|
4553
|
+
outputs: z(Xs.extend({ sources: z(V([Qs, $s])) }))
|
|
4557
4554
|
}), yc = B({
|
|
4555
|
+
nodes: H(G, hc),
|
|
4556
|
+
edges: z(_c).default([])
|
|
4557
|
+
}), bc = B({
|
|
4558
4558
|
kind: U(["connection", "variable"]),
|
|
4559
4559
|
target: G
|
|
4560
|
-
}),
|
|
4560
|
+
}), xc = B({
|
|
4561
4561
|
name: G,
|
|
4562
|
-
imports:
|
|
4562
|
+
imports: Ys,
|
|
4563
4563
|
source: G
|
|
4564
|
-
}),
|
|
4565
|
-
bindings: H(G,
|
|
4566
|
-
graph:
|
|
4567
|
-
subflows: H(G,
|
|
4568
|
-
tasks: H(G,
|
|
4564
|
+
}), Sc = B({
|
|
4565
|
+
bindings: H(G, bc),
|
|
4566
|
+
graph: yc,
|
|
4567
|
+
subflows: H(G, vc.extend({ graph: yc })),
|
|
4568
|
+
tasks: H(G, cc)
|
|
4569
|
+
}), Cc = B({
|
|
4570
|
+
modelVersion: V([W(2), W(3)]),
|
|
4571
|
+
document: Sc,
|
|
4572
|
+
modules: H(G, xc)
|
|
4569
4573
|
});
|
|
4570
|
-
|
|
4571
|
-
modelVersion: W(2),
|
|
4572
|
-
document: xc,
|
|
4573
|
-
modules: H(G, bc)
|
|
4574
|
-
}).extend({
|
|
4574
|
+
Cc.extend({ modelVersion: W(3) }), Cc.extend({
|
|
4575
4575
|
kind: W("open-flow-flow-revision"),
|
|
4576
4576
|
version: W(1)
|
|
4577
4577
|
});
|
|
4578
|
-
var
|
|
4578
|
+
var wc = {
|
|
4579
4579
|
"binding.create": {
|
|
4580
4580
|
bindingId: G,
|
|
4581
|
-
binding:
|
|
4581
|
+
binding: bc
|
|
4582
4582
|
},
|
|
4583
4583
|
"binding.delete": { bindingId: G },
|
|
4584
4584
|
"binding.target.set": {
|
|
@@ -4587,16 +4587,16 @@ var Sc = {
|
|
|
4587
4587
|
value: G
|
|
4588
4588
|
},
|
|
4589
4589
|
"graph.edge.connect": {
|
|
4590
|
-
target:
|
|
4591
|
-
edge:
|
|
4590
|
+
target: gc,
|
|
4591
|
+
edge: _c
|
|
4592
4592
|
},
|
|
4593
4593
|
"graph.edge.disconnect": {
|
|
4594
|
-
target:
|
|
4595
|
-
edge:
|
|
4594
|
+
target: gc,
|
|
4595
|
+
edge: _c
|
|
4596
4596
|
},
|
|
4597
4597
|
"graph.node.create": {
|
|
4598
4598
|
...Y,
|
|
4599
|
-
node:
|
|
4599
|
+
node: hc
|
|
4600
4600
|
},
|
|
4601
4601
|
"graph.node.delete": Y,
|
|
4602
4602
|
"graph.node.field.set": V([
|
|
@@ -4629,8 +4629,8 @@ var Sc = {
|
|
|
4629
4629
|
"graph.node.input.set": {
|
|
4630
4630
|
...Y,
|
|
4631
4631
|
handle: G,
|
|
4632
|
-
before:
|
|
4633
|
-
value:
|
|
4632
|
+
before: tc.optional(),
|
|
4633
|
+
value: tc.optional()
|
|
4634
4634
|
},
|
|
4635
4635
|
"graph.node.additional-inputs.set": {
|
|
4636
4636
|
...Y,
|
|
@@ -4639,8 +4639,8 @@ var Sc = {
|
|
|
4639
4639
|
},
|
|
4640
4640
|
"graph.node.condition.set": {
|
|
4641
4641
|
...Y,
|
|
4642
|
-
before: B(
|
|
4643
|
-
value: B(
|
|
4642
|
+
before: B(lc),
|
|
4643
|
+
value: B(lc)
|
|
4644
4644
|
},
|
|
4645
4645
|
"graph.node.values.set": {
|
|
4646
4646
|
...Y,
|
|
@@ -4650,19 +4650,19 @@ var Sc = {
|
|
|
4650
4650
|
"graph.node.resolution.set": {
|
|
4651
4651
|
...Y,
|
|
4652
4652
|
target: B({ kind: W("flow") }),
|
|
4653
|
-
before: B(
|
|
4654
|
-
value: B(
|
|
4653
|
+
before: B(uc),
|
|
4654
|
+
value: B(uc)
|
|
4655
4655
|
},
|
|
4656
4656
|
"graph.node.webhook.set": {
|
|
4657
4657
|
...Y,
|
|
4658
4658
|
target: B({ kind: W("flow") }),
|
|
4659
|
-
before: B(
|
|
4660
|
-
value: B(
|
|
4659
|
+
before: B(dc),
|
|
4660
|
+
value: B(dc)
|
|
4661
4661
|
},
|
|
4662
4662
|
"graph.node.task.ports.set": {
|
|
4663
4663
|
...Y,
|
|
4664
|
-
before: B(
|
|
4665
|
-
value: B(
|
|
4664
|
+
before: B(rc),
|
|
4665
|
+
value: B(rc)
|
|
4666
4666
|
},
|
|
4667
4667
|
"graph.node.task.name.set": {
|
|
4668
4668
|
...Y,
|
|
@@ -4671,8 +4671,8 @@ var Sc = {
|
|
|
4671
4671
|
},
|
|
4672
4672
|
"graph.node.task.capabilities.set": {
|
|
4673
4673
|
...Y,
|
|
4674
|
-
before: z(
|
|
4675
|
-
value: z(
|
|
4674
|
+
before: z(ic).optional(),
|
|
4675
|
+
value: z(ic).optional()
|
|
4676
4676
|
},
|
|
4677
4677
|
"graph.trigger.config.set": {
|
|
4678
4678
|
nodeId: G,
|
|
@@ -4687,7 +4687,7 @@ var Sc = {
|
|
|
4687
4687
|
},
|
|
4688
4688
|
"module.create": {
|
|
4689
4689
|
moduleId: G,
|
|
4690
|
-
module:
|
|
4690
|
+
module: xc
|
|
4691
4691
|
},
|
|
4692
4692
|
"module.delete": { moduleId: G },
|
|
4693
4693
|
"module.rename": {
|
|
@@ -4697,24 +4697,24 @@ var Sc = {
|
|
|
4697
4697
|
},
|
|
4698
4698
|
"module.source.replace": {
|
|
4699
4699
|
moduleId: G,
|
|
4700
|
-
beforeImports:
|
|
4700
|
+
beforeImports: Ys,
|
|
4701
4701
|
beforeSource: G,
|
|
4702
|
-
imports:
|
|
4702
|
+
imports: Ys,
|
|
4703
4703
|
source: G
|
|
4704
4704
|
},
|
|
4705
4705
|
"subflow.create": {
|
|
4706
4706
|
subflowId: G,
|
|
4707
|
-
subflow:
|
|
4707
|
+
subflow: vc.extend({ graph: yc })
|
|
4708
4708
|
},
|
|
4709
4709
|
"subflow.definition.set": {
|
|
4710
4710
|
subflowId: G,
|
|
4711
|
-
before:
|
|
4712
|
-
definition:
|
|
4711
|
+
before: vc,
|
|
4712
|
+
definition: vc
|
|
4713
4713
|
},
|
|
4714
4714
|
"subflow.delete": { subflowId: G },
|
|
4715
4715
|
"task.create": {
|
|
4716
4716
|
taskId: G,
|
|
4717
|
-
task:
|
|
4717
|
+
task: cc
|
|
4718
4718
|
},
|
|
4719
4719
|
"task.delete": { taskId: G },
|
|
4720
4720
|
"task.connector.connection.set": {
|
|
@@ -4724,8 +4724,8 @@ var Sc = {
|
|
|
4724
4724
|
},
|
|
4725
4725
|
"task.agent.set": {
|
|
4726
4726
|
taskId: G,
|
|
4727
|
-
before:
|
|
4728
|
-
value:
|
|
4727
|
+
before: cc,
|
|
4728
|
+
value: cc
|
|
4729
4729
|
},
|
|
4730
4730
|
"task.llm.mode.set": {
|
|
4731
4731
|
taskId: G,
|
|
@@ -4737,33 +4737,33 @@ var Sc = {
|
|
|
4737
4737
|
before: G,
|
|
4738
4738
|
value: G
|
|
4739
4739
|
}
|
|
4740
|
-
},
|
|
4740
|
+
}, Tc = new Map(Object.entries(wc).map(([e, t]) => [e, t instanceof F ? t : B({
|
|
4741
4741
|
kind: W(e),
|
|
4742
4742
|
...t
|
|
4743
|
-
})])),
|
|
4744
|
-
function
|
|
4743
|
+
})])), Ec = z(V([...Tc.values()])).min(1);
|
|
4744
|
+
function Dc(e, t, n) {
|
|
4745
4745
|
try {
|
|
4746
4746
|
return n(e);
|
|
4747
4747
|
} catch (e) {
|
|
4748
|
-
throw e instanceof
|
|
4748
|
+
throw e instanceof mo ? TypeError(`operations[${t}]: ${e.issues.map((e) => `${e.path.join(".")}: ${e.message}`).join("; ")}`, { cause: e }) : e;
|
|
4749
4749
|
}
|
|
4750
4750
|
}
|
|
4751
|
-
function
|
|
4752
|
-
let { kind: n } =
|
|
4751
|
+
function Oc(e, t) {
|
|
4752
|
+
let { kind: n } = Dc(e, t, B({ kind: G }).parse), r = Tc.get(n);
|
|
4753
4753
|
if (r == null) throw TypeError(`operations[${t}]: Unknown operation ${JSON.stringify(n)}.`);
|
|
4754
|
-
return
|
|
4754
|
+
return Dc(e, t, r.parse);
|
|
4755
4755
|
}
|
|
4756
|
-
function
|
|
4757
|
-
return Ks(e), z(cs()).min(1).parse(e).map(
|
|
4756
|
+
function kc(e) {
|
|
4757
|
+
return Ks(e), z(cs()).min(1).parse(e).map(Oc);
|
|
4758
4758
|
}
|
|
4759
|
-
function
|
|
4760
|
-
let t = e == null ?
|
|
4759
|
+
function Ac(e) {
|
|
4760
|
+
let t = e == null ? Ec : Tc.get(e);
|
|
4761
4761
|
if (t == null) throw TypeError(`Unknown operation ${JSON.stringify(e)}.`);
|
|
4762
|
-
return
|
|
4762
|
+
return lo(t, { io: "input" });
|
|
4763
4763
|
}
|
|
4764
4764
|
//#endregion
|
|
4765
4765
|
//#region src/flow/common/change.ts
|
|
4766
|
-
var
|
|
4766
|
+
var jc = /* @__PURE__ */ new Set([
|
|
4767
4767
|
"const",
|
|
4768
4768
|
"enum",
|
|
4769
4769
|
"exclusiveMaximum",
|
|
@@ -4781,11 +4781,11 @@ var kc = /* @__PURE__ */ new Set([
|
|
|
4781
4781
|
"required",
|
|
4782
4782
|
"type"
|
|
4783
4783
|
]);
|
|
4784
|
-
function Ac(e) {
|
|
4785
|
-
return kc.has(e);
|
|
4786
|
-
}
|
|
4787
|
-
var jc = 80;
|
|
4788
4784
|
function Mc(e) {
|
|
4785
|
+
return jc.has(e);
|
|
4786
|
+
}
|
|
4787
|
+
var Nc = 80;
|
|
4788
|
+
function Pc(e) {
|
|
4789
4789
|
let t = e.trim();
|
|
4790
4790
|
if (t.length == 0) return "empty";
|
|
4791
4791
|
if (t.length > 80) return "tooLong";
|
|
@@ -4795,13 +4795,13 @@ function Mc(e) {
|
|
|
4795
4795
|
}
|
|
4796
4796
|
if (!/^[\p{L}\p{N}](?:[\p{L}\p{N} _-]*[\p{L}\p{N}])?$/u.test(t)) return "specialCharacter";
|
|
4797
4797
|
}
|
|
4798
|
-
function
|
|
4798
|
+
function Fc(e) {
|
|
4799
4799
|
return e.length <= 256 && /^[A-Za-z_][A-Za-z0-9_]*$/.test(e) && e.slice(0, 3).toUpperCase() != "OO_";
|
|
4800
4800
|
}
|
|
4801
|
-
function
|
|
4801
|
+
function Ic(e) {
|
|
4802
4802
|
return Object.fromEntries(e.flatMap((e) => "handle" in e ? [[e.handle, e]] : []));
|
|
4803
4803
|
}
|
|
4804
|
-
function
|
|
4804
|
+
function Lc(e) {
|
|
4805
4805
|
if (!Array.isArray(e)) throw TypeError("Connector capabilities must be an array.");
|
|
4806
4806
|
let t = /* @__PURE__ */ new Set();
|
|
4807
4807
|
return e.map((e) => {
|
|
@@ -4840,24 +4840,24 @@ function Fc(e) {
|
|
|
4840
4840
|
function X(e) {
|
|
4841
4841
|
return e.trim().normalize("NFC");
|
|
4842
4842
|
}
|
|
4843
|
-
function
|
|
4843
|
+
function Rc(e, t) {
|
|
4844
4844
|
let n = X(e), r = new Set([...t].map(X));
|
|
4845
4845
|
if (!r.has(n)) return n;
|
|
4846
4846
|
let i = /^(.*) \((\d+)\)$/.exec(n), a = i?.[2], o = a != null && Number(a) >= 2 ? Number(a) : void 0, s = o == null ? n : i?.[1] ?? n, c = o == null ? 2 : o + 1;
|
|
4847
4847
|
for (; r.has(`${s} (${c})`);) c += 1;
|
|
4848
4848
|
return `${s} (${c})`;
|
|
4849
4849
|
}
|
|
4850
|
-
function
|
|
4850
|
+
function zc(e, t, n) {
|
|
4851
4851
|
let r = X(n);
|
|
4852
4852
|
return r.length == 0 ? "empty" : Object.entries(e.nodes).some(([e, n]) => e != t && n.name != null && X(n.name) == r) ? "duplicate" : void 0;
|
|
4853
4853
|
}
|
|
4854
|
-
var
|
|
4854
|
+
var Bc = class extends Error {
|
|
4855
4855
|
constructor(e) {
|
|
4856
4856
|
super(e), this.name = "FlowChangeError";
|
|
4857
4857
|
}
|
|
4858
4858
|
};
|
|
4859
4859
|
function Z(e) {
|
|
4860
|
-
throw new
|
|
4860
|
+
throw new Bc(e);
|
|
4861
4861
|
}
|
|
4862
4862
|
function Q(e, t) {
|
|
4863
4863
|
if (t.kind == "flow") return e.graph;
|
|
@@ -4881,7 +4881,7 @@ function $(e, t, n) {
|
|
|
4881
4881
|
}
|
|
4882
4882
|
};
|
|
4883
4883
|
}
|
|
4884
|
-
function
|
|
4884
|
+
function Vc(e, n) {
|
|
4885
4885
|
let r = { ...e.document }, i = { ...e.modules };
|
|
4886
4886
|
for (let e of n) switch (e.kind) {
|
|
4887
4887
|
case "binding.create":
|
|
@@ -4962,8 +4962,8 @@ function zc(e, n) {
|
|
|
4962
4962
|
}
|
|
4963
4963
|
case "graph.node.create": {
|
|
4964
4964
|
let t = Q(r, e.target);
|
|
4965
|
-
t.nodes[e.nodeId] != null && Z("A Node with this ID already exists in the target graph."), e.target.kind == "subflow" && !("inputs" in e.node) && Z("Trigger Nodes cannot be created inside a Subflow."), e.node.kind == "manual" && Object.values(t.nodes).some((e) => e.kind == "manual") && Z("A graph can contain only one manual Trigger."), e.node.kind == "task" && e.node.task?.capabilities !== void 0 &&
|
|
4966
|
-
let n = X(e.node.name), i =
|
|
4965
|
+
t.nodes[e.nodeId] != null && Z("A Node with this ID already exists in the target graph."), e.target.kind == "subflow" && !("inputs" in e.node) && Z("Trigger Nodes cannot be created inside a Subflow."), e.node.kind == "manual" && Object.values(t.nodes).some((e) => e.kind == "manual") && Z("A graph can contain only one manual Trigger."), e.node.kind == "task" && e.node.task?.capabilities !== void 0 && Lc(e.node.task.capabilities), e.node.name ?? Z("A Node name cannot be empty.");
|
|
4966
|
+
let n = X(e.node.name), i = zc(t, e.nodeId, n);
|
|
4967
4967
|
i == "empty" && Z("A Node name cannot be empty."), i == "duplicate" && Z("A Node with this name already exists in the target graph.");
|
|
4968
4968
|
let a = n == e.node.name ? e.node : {
|
|
4969
4969
|
...e.node,
|
|
@@ -4995,7 +4995,7 @@ function zc(e, n) {
|
|
|
4995
4995
|
let a = { ...i };
|
|
4996
4996
|
if (e.field == "name") {
|
|
4997
4997
|
typeof e.value != "string" && Z("A Node name cannot be empty.");
|
|
4998
|
-
let t = X(e.value), r =
|
|
4998
|
+
let t = X(e.value), r = zc(n, e.nodeId, t);
|
|
4999
4999
|
r == "empty" && Z("A Node name cannot be empty."), r == "duplicate" && Z("A Node with this name already exists in the target graph."), Object.assign(a, { name: t });
|
|
5000
5000
|
} else e.value == null ? Reflect.deleteProperty(a, e.field) : Object.assign(a, { [e.field]: e.value });
|
|
5001
5001
|
Object.assign(r, $(r, e.target, {
|
|
@@ -5027,7 +5027,7 @@ function zc(e, n) {
|
|
|
5027
5027
|
let n = Q(r, e.target), i = n.nodes[e.nodeId];
|
|
5028
5028
|
(i?.kind != "task" || i.task == null) && Z("The inline Task Node does not exist."), t(i.task.capabilities, e.before) || Z("The inline Task capabilities changed before this operation was applied.");
|
|
5029
5029
|
let a = { ...i.task };
|
|
5030
|
-
e.value === void 0 ? delete a.capabilities : a.capabilities =
|
|
5030
|
+
e.value === void 0 ? delete a.capabilities : a.capabilities = Lc(e.value), Object.assign(r, $(r, e.target, {
|
|
5031
5031
|
...n,
|
|
5032
5032
|
nodes: {
|
|
5033
5033
|
...n.nodes,
|
|
@@ -5190,7 +5190,7 @@ function zc(e, n) {
|
|
|
5190
5190
|
}
|
|
5191
5191
|
case "subflow.create":
|
|
5192
5192
|
r.subflows[e.subflowId] != null && Z("A Subflow with this ID already exists.");
|
|
5193
|
-
for (let t of Object.values(e.subflow.graph.nodes)) t.kind == "task" && t.task?.capabilities !== void 0 &&
|
|
5193
|
+
for (let t of Object.values(e.subflow.graph.nodes)) t.kind == "task" && t.task?.capabilities !== void 0 && Lc(t.task.capabilities);
|
|
5194
5194
|
r.subflows = {
|
|
5195
5195
|
...r.subflows,
|
|
5196
5196
|
[e.subflowId]: e.subflow
|
|
@@ -5281,9 +5281,9 @@ function zc(e, n) {
|
|
|
5281
5281
|
}
|
|
5282
5282
|
return {
|
|
5283
5283
|
document: r,
|
|
5284
|
-
modelVersion:
|
|
5284
|
+
modelVersion: 3,
|
|
5285
5285
|
modules: i
|
|
5286
5286
|
};
|
|
5287
5287
|
}
|
|
5288
5288
|
//#endregion
|
|
5289
|
-
export {
|
|
5289
|
+
export { Bc as FlowChangeError, Vc as applyFlowChanges, Ac as changeOperationsSchema, Js as currentFlowModelVersion, kc as decodeChangeOperations, Lc as decodeConnectorCapabilities, Mc as isSchemaKeyword, Rc as nextNodeName, zc as nodeNameIssue, X as normalizeNodeName, Ic as portsByHandle, Pc as resourceNameIssue, Nc as resourceNameMaxLength, Fc as validVariableName };
|