@snowcone-app/canvas 0.38.0 → 0.39.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CanvasRenderer-D-E5WWLm.js → CanvasRenderer-COO5UXtZ.js} +704 -669
- package/dist/CanvasRenderer-COO5UXtZ.js.map +1 -0
- package/dist/{CanvasStateV1-C9LQt2J0.js → CanvasStateV1-CJJff7Ci.js} +315 -314
- package/dist/{CanvasStateV1-C9LQt2J0.js.map → CanvasStateV1-CJJff7Ci.js.map} +1 -1
- package/dist/{EditorCanvasImpl-BnxEbr2p.js → EditorCanvasImpl-C_72UKu3.js} +3 -3
- package/dist/{EditorCanvasImpl-BnxEbr2p.js.map → EditorCanvasImpl-C_72UKu3.js.map} +1 -1
- package/dist/FontAnalyzer-DWHS41ba.js.map +1 -1
- package/dist/{SnowconeCanvas-CWSPyqqj.js → SnowconeCanvas-C-YbGCcQ.js} +4 -4
- package/dist/{SnowconeCanvas-CWSPyqqj.js.map → SnowconeCanvas-C-YbGCcQ.js.map} +1 -1
- package/dist/advanced.mjs +358 -360
- package/dist/advanced.mjs.map +1 -1
- package/dist/components/VisualGuideOverlay.d.ts +4 -1
- package/dist/components/embed-realtime/usePieceGuideBundle.d.ts +2 -0
- package/dist/{embed-SOFUZlGB.js → embed-DtlgX9iG.js} +5 -5
- package/dist/{embed-SOFUZlGB.js.map → embed-DtlgX9iG.js.map} +1 -1
- package/dist/embed.mjs +3 -3
- package/dist/index.mjs +4 -4
- package/dist/internals.mjs +2 -2
- package/dist/rendering/PieceGuideRenderer.d.ts +4 -1
- package/dist/state/CanvasStateV1.d.ts +3 -3
- package/dist/{template-fields-CBLHgW7G.js → template-fields-Dltc4Ztb.js} +2 -2
- package/dist/{template-fields-CBLHgW7G.js.map → template-fields-Dltc4Ztb.js.map} +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/{usePieceGuideBundle-C7r06a_x.js → usePieceGuideBundle-Cab2gRnn.js} +19 -16
- package/dist/usePieceGuideBundle-Cab2gRnn.js.map +1 -0
- package/dist/utils/pieceRotation.d.ts +35 -0
- package/dist/{validation-BG-V98h0.js → validation-Dh9sVEb9.js} +1428 -1430
- package/dist/validation-Dh9sVEb9.js.map +1 -0
- package/example/package.json +1 -1
- package/package.json +3 -3
- package/dist/CanvasRenderer-D-E5WWLm.js.map +0 -1
- package/dist/usePieceGuideBundle-C7r06a_x.js.map +0 -1
- package/dist/validation-BG-V98h0.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { E as Yt, J as qt, F as Xt } from "./ExportManager-BbBfO22S.js";
|
|
2
2
|
import { A as Ht } from "./FontAnalyzer-DWHS41ba.js";
|
|
3
|
-
var
|
|
3
|
+
var Ae;
|
|
4
4
|
function u(e, t, n) {
|
|
5
5
|
function o(c, a) {
|
|
6
6
|
if (c._zod || Object.defineProperty(c, "_zod", {
|
|
@@ -43,17 +43,17 @@ class Y extends Error {
|
|
|
43
43
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
class
|
|
46
|
+
class ot extends Error {
|
|
47
47
|
constructor(t) {
|
|
48
48
|
super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
(
|
|
52
|
-
const
|
|
51
|
+
(Ae = globalThis).__zod_globalConfig ?? (Ae.__zod_globalConfig = {});
|
|
52
|
+
const we = globalThis.__zod_globalConfig;
|
|
53
53
|
function V(e) {
|
|
54
|
-
return
|
|
54
|
+
return we;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function rt(e) {
|
|
57
57
|
const t = Object.values(e).filter((o) => typeof o == "number");
|
|
58
58
|
return Object.entries(e).filter(([o, r]) => t.indexOf(+o) === -1).map(([o, r]) => r);
|
|
59
59
|
}
|
|
@@ -70,10 +70,10 @@ function fe(e) {
|
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function ke(e) {
|
|
74
74
|
return e == null;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function $e(e) {
|
|
77
77
|
const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
|
|
78
78
|
return e.slice(t, n);
|
|
79
79
|
}
|
|
@@ -81,13 +81,13 @@ function Qt(e, t) {
|
|
|
81
81
|
const n = e / t, o = Math.round(n), r = Number.EPSILON * Math.max(Math.abs(n), 1);
|
|
82
82
|
return Math.abs(n - o) < r ? 0 : n - o;
|
|
83
83
|
}
|
|
84
|
-
const
|
|
85
|
-
function
|
|
84
|
+
const Ne = /* @__PURE__ */ Symbol("evaluating");
|
|
85
|
+
function y(e, t, n) {
|
|
86
86
|
let o;
|
|
87
87
|
Object.defineProperty(e, t, {
|
|
88
88
|
get() {
|
|
89
|
-
if (o !==
|
|
90
|
-
return o === void 0 && (o =
|
|
89
|
+
if (o !== Ne)
|
|
90
|
+
return o === void 0 && (o = Ne, o = n()), o;
|
|
91
91
|
},
|
|
92
92
|
set(r) {
|
|
93
93
|
Object.defineProperty(e, t, {
|
|
@@ -114,20 +114,20 @@ function J(...e) {
|
|
|
114
114
|
}
|
|
115
115
|
return Object.defineProperties({}, t);
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function Ce(e) {
|
|
118
118
|
return JSON.stringify(e);
|
|
119
119
|
}
|
|
120
120
|
function en(e) {
|
|
121
121
|
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
122
122
|
}
|
|
123
|
-
const
|
|
123
|
+
const it = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
124
124
|
};
|
|
125
125
|
function ee(e) {
|
|
126
126
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
127
127
|
}
|
|
128
128
|
const tn = /* @__PURE__ */ fe(() => {
|
|
129
129
|
var e;
|
|
130
|
-
if (
|
|
130
|
+
if (we.jitless || typeof navigator < "u" && ((e = navigator == null ? void 0 : navigator.userAgent) != null && e.includes("Cloudflare")))
|
|
131
131
|
return !1;
|
|
132
132
|
try {
|
|
133
133
|
const t = Function;
|
|
@@ -145,7 +145,7 @@ function te(e) {
|
|
|
145
145
|
const n = t.prototype;
|
|
146
146
|
return !(ee(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function st(e) {
|
|
149
149
|
return te(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
|
|
150
150
|
}
|
|
151
151
|
const nn = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
@@ -330,7 +330,7 @@ function dn(e, t = 0) {
|
|
|
330
330
|
return !0;
|
|
331
331
|
return !1;
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function ct(e, t) {
|
|
334
334
|
return t.map((n) => {
|
|
335
335
|
var o;
|
|
336
336
|
return (o = n).path ?? (o.path = []), n.path.unshift(e), n;
|
|
@@ -344,7 +344,7 @@ function B(e, t, n) {
|
|
|
344
344
|
const o = e.message ? e.message : ie((l = (f = (a = e.inst) == null ? void 0 : a._zod.def) == null ? void 0 : f.error) == null ? void 0 : l.call(f, e)) ?? ie((d = t == null ? void 0 : t.error) == null ? void 0 : d.call(t, e)) ?? ie((g = n.customError) == null ? void 0 : g.call(n, e)) ?? ie((h = n.localeError) == null ? void 0 : h.call(n, e)) ?? "Invalid input", { inst: r, continue: i, input: s, ...c } = e;
|
|
345
345
|
return c.path ?? (c.path = []), c.message = o, t != null && t.reportInput && (c.input = s), c;
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function Se(e) {
|
|
348
348
|
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
349
349
|
}
|
|
350
350
|
function ne(...e) {
|
|
@@ -356,7 +356,7 @@ function ne(...e) {
|
|
|
356
356
|
inst: o
|
|
357
357
|
} : { ...t };
|
|
358
358
|
}
|
|
359
|
-
const
|
|
359
|
+
const at = (e, t) => {
|
|
360
360
|
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
361
361
|
value: e._zod,
|
|
362
362
|
enumerable: !1
|
|
@@ -367,7 +367,7 @@ const ut = (e, t) => {
|
|
|
367
367
|
value: () => e.message,
|
|
368
368
|
enumerable: !1
|
|
369
369
|
});
|
|
370
|
-
},
|
|
370
|
+
}, ut = u("$ZodError", at), lt = u("$ZodError", at, { Parent: Error });
|
|
371
371
|
function hn(e, t = (n) => n.message) {
|
|
372
372
|
const n = {}, o = [];
|
|
373
373
|
for (const r of e.issues)
|
|
@@ -398,21 +398,21 @@ function mn(e, t = (n) => n.message) {
|
|
|
398
398
|
};
|
|
399
399
|
return o(e), n;
|
|
400
400
|
}
|
|
401
|
-
const
|
|
401
|
+
const Ze = (e) => (t, n, o, r) => {
|
|
402
402
|
const i = o ? { ...o, async: !1 } : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, i);
|
|
403
403
|
if (s instanceof Promise)
|
|
404
404
|
throw new Y();
|
|
405
405
|
if (s.issues.length) {
|
|
406
406
|
const c = new ((r == null ? void 0 : r.Err) ?? e)(s.issues.map((a) => B(a, i, V())));
|
|
407
|
-
throw
|
|
407
|
+
throw it(c, r == null ? void 0 : r.callee), c;
|
|
408
408
|
}
|
|
409
409
|
return s.value;
|
|
410
|
-
},
|
|
410
|
+
}, Oe = (e) => async (t, n, o, r) => {
|
|
411
411
|
const i = o ? { ...o, async: !0 } : { async: !0 };
|
|
412
412
|
let s = t._zod.run({ value: n, issues: [] }, i);
|
|
413
413
|
if (s instanceof Promise && (s = await s), s.issues.length) {
|
|
414
414
|
const c = new ((r == null ? void 0 : r.Err) ?? e)(s.issues.map((a) => B(a, i, V())));
|
|
415
|
-
throw
|
|
415
|
+
throw it(c, r == null ? void 0 : r.callee), c;
|
|
416
416
|
}
|
|
417
417
|
return s.value;
|
|
418
418
|
}, pe = (e) => (t, n, o) => {
|
|
@@ -421,44 +421,44 @@ const Oe = (e) => (t, n, o, r) => {
|
|
|
421
421
|
throw new Y();
|
|
422
422
|
return i.issues.length ? {
|
|
423
423
|
success: !1,
|
|
424
|
-
error: new (e ??
|
|
424
|
+
error: new (e ?? ut)(i.issues.map((s) => B(s, r, V())))
|
|
425
425
|
} : { success: !0, data: i.value };
|
|
426
|
-
}, gn = /* @__PURE__ */ pe(
|
|
426
|
+
}, gn = /* @__PURE__ */ pe(lt), de = (e) => async (t, n, o) => {
|
|
427
427
|
const r = o ? { ...o, async: !0 } : { async: !0 };
|
|
428
428
|
let i = t._zod.run({ value: n, issues: [] }, r);
|
|
429
429
|
return i instanceof Promise && (i = await i), i.issues.length ? {
|
|
430
430
|
success: !1,
|
|
431
431
|
error: new e(i.issues.map((s) => B(s, r, V())))
|
|
432
432
|
} : { success: !0, data: i.value };
|
|
433
|
-
}, _n = /* @__PURE__ */ de(
|
|
433
|
+
}, _n = /* @__PURE__ */ de(lt), vn = (e) => (t, n, o) => {
|
|
434
434
|
const r = o ? { ...o, direction: "backward" } : { direction: "backward" };
|
|
435
|
-
return
|
|
436
|
-
}, yn = (e) => (t, n, o) =>
|
|
435
|
+
return Ze(e)(t, n, r);
|
|
436
|
+
}, yn = (e) => (t, n, o) => Ze(e)(t, n, o), bn = (e) => async (t, n, o) => {
|
|
437
437
|
const r = o ? { ...o, direction: "backward" } : { direction: "backward" };
|
|
438
|
-
return
|
|
439
|
-
}, zn = (e) => async (t, n, o) =>
|
|
438
|
+
return Oe(e)(t, n, r);
|
|
439
|
+
}, zn = (e) => async (t, n, o) => Oe(e)(t, n, o), wn = (e) => (t, n, o) => {
|
|
440
440
|
const r = o ? { ...o, direction: "backward" } : { direction: "backward" };
|
|
441
441
|
return pe(e)(t, n, r);
|
|
442
442
|
}, kn = (e) => (t, n, o) => pe(e)(t, n, o), $n = (e) => async (t, n, o) => {
|
|
443
443
|
const r = o ? { ...o, direction: "backward" } : { direction: "backward" };
|
|
444
444
|
return de(e)(t, n, r);
|
|
445
|
-
}, Sn = (e) => async (t, n, o) => de(e)(t, n, o), Zn = /^[cC][0-9a-z]{6,}$/, On = /^[0-9a-z]+$/, En = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Tn = /^[0-9a-vA-V]{20}$/, In = /^[A-Za-z0-9]{27}$/, Pn = /^[a-zA-Z0-9_-]{21}$/, An = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Nn = /^([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})$/,
|
|
445
|
+
}, Sn = (e) => async (t, n, o) => de(e)(t, n, o), Zn = /^[cC][0-9a-z]{6,}$/, On = /^[0-9a-z]+$/, En = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Tn = /^[0-9a-vA-V]{20}$/, In = /^[A-Za-z0-9]{27}$/, Pn = /^[a-zA-Z0-9_-]{21}$/, An = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Nn = /^([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})$/, je = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, Cn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, jn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
446
446
|
function xn() {
|
|
447
447
|
return new RegExp(jn, "u");
|
|
448
448
|
}
|
|
449
|
-
const Dn = /^(?:(?: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])$/, Rn = /^(([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}|:))$/, Fn = /^((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])$/, Un = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Jn = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,
|
|
450
|
-
function
|
|
449
|
+
const Dn = /^(?:(?: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])$/, Rn = /^(([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}|:))$/, Fn = /^((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])$/, Un = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Jn = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, ft = /^[A-Za-z0-9_-]*$/, Mn = /^https?$/, Ln = /^\+[1-9]\d{6,14}$/, pt = "(?:(?:\\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])))", Vn = /* @__PURE__ */ new RegExp(`^${pt}$`);
|
|
450
|
+
function dt(e) {
|
|
451
451
|
const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
452
452
|
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
453
453
|
}
|
|
454
454
|
function Bn(e) {
|
|
455
|
-
return new RegExp(`^${
|
|
455
|
+
return new RegExp(`^${dt(e)}$`);
|
|
456
456
|
}
|
|
457
457
|
function Wn(e) {
|
|
458
|
-
const t =
|
|
458
|
+
const t = dt({ precision: e.precision }), n = ["Z"];
|
|
459
459
|
e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
460
460
|
const o = `${t}(?:${n.join("|")})`;
|
|
461
|
-
return new RegExp(`^${
|
|
461
|
+
return new RegExp(`^${pt}T(?:${o})$`);
|
|
462
462
|
}
|
|
463
463
|
const Gn = (e) => {
|
|
464
464
|
const t = e ? `[\\s\\S]{${(e == null ? void 0 : e.minimum) ?? 0},${(e == null ? void 0 : e.maximum) ?? ""}}` : "[\\s\\S]*";
|
|
@@ -466,13 +466,13 @@ const Gn = (e) => {
|
|
|
466
466
|
}, Kn = /^-?\d+$/, Yn = /^-?\d+(?:\.\d+)?$/, qn = /^(?:true|false)$/i, Xn = /^[^A-Z]*$/, Hn = /^[^a-z]*$/, R = /* @__PURE__ */ u("$ZodCheck", (e, t) => {
|
|
467
467
|
var n;
|
|
468
468
|
e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
469
|
-
}),
|
|
469
|
+
}), ht = {
|
|
470
470
|
number: "number",
|
|
471
471
|
bigint: "bigint",
|
|
472
472
|
object: "date"
|
|
473
|
-
},
|
|
473
|
+
}, mt = /* @__PURE__ */ u("$ZodCheckLessThan", (e, t) => {
|
|
474
474
|
R.init(e, t);
|
|
475
|
-
const n =
|
|
475
|
+
const n = ht[typeof t.value];
|
|
476
476
|
e._zod.onattach.push((o) => {
|
|
477
477
|
const r = o._zod.bag, i = (t.inclusive ? r.maximum : r.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
478
478
|
t.value < i && (t.inclusive ? r.maximum = t.value : r.exclusiveMaximum = t.value);
|
|
@@ -487,9 +487,9 @@ const Gn = (e) => {
|
|
|
487
487
|
continue: !t.abort
|
|
488
488
|
});
|
|
489
489
|
};
|
|
490
|
-
}),
|
|
490
|
+
}), gt = /* @__PURE__ */ u("$ZodCheckGreaterThan", (e, t) => {
|
|
491
491
|
R.init(e, t);
|
|
492
|
-
const n =
|
|
492
|
+
const n = ht[typeof t.value];
|
|
493
493
|
e._zod.onattach.push((o) => {
|
|
494
494
|
const r = o._zod.bag, i = (t.inclusive ? r.minimum : r.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
495
495
|
t.value > i && (t.inclusive ? r.minimum = t.value : r.exclusiveMinimum = t.value);
|
|
@@ -586,7 +586,7 @@ const Gn = (e) => {
|
|
|
586
586
|
var n;
|
|
587
587
|
R.init(e, t), (n = e._zod.def).when ?? (n.when = (o) => {
|
|
588
588
|
const r = o.value;
|
|
589
|
-
return
|
|
589
|
+
return !ke(r) && r.length !== void 0;
|
|
590
590
|
}), e._zod.onattach.push((o) => {
|
|
591
591
|
const r = o._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
592
592
|
t.maximum < r && (o._zod.bag.maximum = t.maximum);
|
|
@@ -594,7 +594,7 @@ const Gn = (e) => {
|
|
|
594
594
|
const r = o.value;
|
|
595
595
|
if (r.length <= t.maximum)
|
|
596
596
|
return;
|
|
597
|
-
const s =
|
|
597
|
+
const s = Se(r);
|
|
598
598
|
o.issues.push({
|
|
599
599
|
origin: s,
|
|
600
600
|
code: "too_big",
|
|
@@ -609,7 +609,7 @@ const Gn = (e) => {
|
|
|
609
609
|
var n;
|
|
610
610
|
R.init(e, t), (n = e._zod.def).when ?? (n.when = (o) => {
|
|
611
611
|
const r = o.value;
|
|
612
|
-
return
|
|
612
|
+
return !ke(r) && r.length !== void 0;
|
|
613
613
|
}), e._zod.onattach.push((o) => {
|
|
614
614
|
const r = o._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
615
615
|
t.minimum > r && (o._zod.bag.minimum = t.minimum);
|
|
@@ -617,7 +617,7 @@ const Gn = (e) => {
|
|
|
617
617
|
const r = o.value;
|
|
618
618
|
if (r.length >= t.minimum)
|
|
619
619
|
return;
|
|
620
|
-
const s =
|
|
620
|
+
const s = Se(r);
|
|
621
621
|
o.issues.push({
|
|
622
622
|
origin: s,
|
|
623
623
|
code: "too_small",
|
|
@@ -632,7 +632,7 @@ const Gn = (e) => {
|
|
|
632
632
|
var n;
|
|
633
633
|
R.init(e, t), (n = e._zod.def).when ?? (n.when = (o) => {
|
|
634
634
|
const r = o.value;
|
|
635
|
-
return
|
|
635
|
+
return !ke(r) && r.length !== void 0;
|
|
636
636
|
}), e._zod.onattach.push((o) => {
|
|
637
637
|
const r = o._zod.bag;
|
|
638
638
|
r.minimum = t.length, r.maximum = t.length, r.length = t.length;
|
|
@@ -640,7 +640,7 @@ const Gn = (e) => {
|
|
|
640
640
|
const r = o.value, i = r.length;
|
|
641
641
|
if (i === t.length)
|
|
642
642
|
return;
|
|
643
|
-
const s =
|
|
643
|
+
const s = Se(r), c = i > t.length;
|
|
644
644
|
o.issues.push({
|
|
645
645
|
origin: s,
|
|
646
646
|
...c ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
|
|
@@ -830,7 +830,7 @@ const po = {
|
|
|
830
830
|
return i(f, o, a);
|
|
831
831
|
};
|
|
832
832
|
}
|
|
833
|
-
|
|
833
|
+
y(e, "~standard", () => ({
|
|
834
834
|
validate: (i) => {
|
|
835
835
|
var s;
|
|
836
836
|
try {
|
|
@@ -846,7 +846,7 @@ const po = {
|
|
|
846
846
|
vendor: "zod",
|
|
847
847
|
version: 1
|
|
848
848
|
}));
|
|
849
|
-
}),
|
|
849
|
+
}), Ee = /* @__PURE__ */ u("$ZodString", (e, t) => {
|
|
850
850
|
var n;
|
|
851
851
|
$.init(e, t), e._zod.pattern = [...((n = e == null ? void 0 : e._zod.bag) == null ? void 0 : n.patterns) ?? []].pop() ?? Gn(e._zod.bag), e._zod.parse = (o, r) => {
|
|
852
852
|
if (t.coerce)
|
|
@@ -862,7 +862,7 @@ const po = {
|
|
|
862
862
|
}), o;
|
|
863
863
|
};
|
|
864
864
|
}), k = /* @__PURE__ */ u("$ZodStringFormat", (e, t) => {
|
|
865
|
-
he.init(e, t),
|
|
865
|
+
he.init(e, t), Ee.init(e, t);
|
|
866
866
|
}), ho = /* @__PURE__ */ u("$ZodGUID", (e, t) => {
|
|
867
867
|
t.pattern ?? (t.pattern = Nn), k.init(e, t);
|
|
868
868
|
}), mo = /* @__PURE__ */ u("$ZodUUID", (e, t) => {
|
|
@@ -879,9 +879,9 @@ const po = {
|
|
|
879
879
|
}[t.version];
|
|
880
880
|
if (o === void 0)
|
|
881
881
|
throw new Error(`Invalid UUID version: "${t.version}"`);
|
|
882
|
-
t.pattern ?? (t.pattern =
|
|
882
|
+
t.pattern ?? (t.pattern = je(o));
|
|
883
883
|
} else
|
|
884
|
-
t.pattern ?? (t.pattern =
|
|
884
|
+
t.pattern ?? (t.pattern = je());
|
|
885
885
|
k.init(e, t);
|
|
886
886
|
}), go = /* @__PURE__ */ u("$ZodEmail", (e, t) => {
|
|
887
887
|
t.pattern ?? (t.pattern = Cn), k.init(e, t);
|
|
@@ -996,7 +996,7 @@ const po = {
|
|
|
996
996
|
}
|
|
997
997
|
};
|
|
998
998
|
});
|
|
999
|
-
function
|
|
999
|
+
function _t(e) {
|
|
1000
1000
|
if (e === "")
|
|
1001
1001
|
return !0;
|
|
1002
1002
|
if (/\s/.test(e) || e.length % 4 !== 0)
|
|
@@ -1009,7 +1009,7 @@ function vt(e) {
|
|
|
1009
1009
|
}
|
|
1010
1010
|
const No = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
|
|
1011
1011
|
t.pattern ?? (t.pattern = Jn), k.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
|
|
1012
|
-
|
|
1012
|
+
_t(n.value) || n.issues.push({
|
|
1013
1013
|
code: "invalid_format",
|
|
1014
1014
|
format: "base64",
|
|
1015
1015
|
input: n.value,
|
|
@@ -1019,13 +1019,13 @@ const No = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
|
|
|
1019
1019
|
};
|
|
1020
1020
|
});
|
|
1021
1021
|
function Co(e) {
|
|
1022
|
-
if (!
|
|
1022
|
+
if (!ft.test(e))
|
|
1023
1023
|
return !1;
|
|
1024
1024
|
const t = e.replace(/[-_]/g, (o) => o === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
|
|
1025
|
-
return
|
|
1025
|
+
return _t(n);
|
|
1026
1026
|
}
|
|
1027
1027
|
const jo = /* @__PURE__ */ u("$ZodBase64URL", (e, t) => {
|
|
1028
|
-
t.pattern ?? (t.pattern =
|
|
1028
|
+
t.pattern ?? (t.pattern = ft), k.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
|
|
1029
1029
|
Co(n.value) || n.issues.push({
|
|
1030
1030
|
code: "invalid_format",
|
|
1031
1031
|
format: "base64url",
|
|
@@ -1061,7 +1061,7 @@ const Ro = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
|
|
|
1061
1061
|
continue: !t.abort
|
|
1062
1062
|
});
|
|
1063
1063
|
};
|
|
1064
|
-
}),
|
|
1064
|
+
}), vt = /* @__PURE__ */ u("$ZodNumber", (e, t) => {
|
|
1065
1065
|
$.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Yn, e._zod.parse = (n, o) => {
|
|
1066
1066
|
if (t.coerce)
|
|
1067
1067
|
try {
|
|
@@ -1081,7 +1081,7 @@ const Ro = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
|
|
|
1081
1081
|
}), n;
|
|
1082
1082
|
};
|
|
1083
1083
|
}), Fo = /* @__PURE__ */ u("$ZodNumberFormat", (e, t) => {
|
|
1084
|
-
eo.init(e, t),
|
|
1084
|
+
eo.init(e, t), vt.init(e, t);
|
|
1085
1085
|
}), Uo = /* @__PURE__ */ u("$ZodBoolean", (e, t) => {
|
|
1086
1086
|
$.init(e, t), e._zod.pattern = qn, e._zod.parse = (n, o) => {
|
|
1087
1087
|
if (t.coerce)
|
|
@@ -1107,8 +1107,8 @@ const Ro = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
|
|
|
1107
1107
|
inst: e
|
|
1108
1108
|
}), n);
|
|
1109
1109
|
});
|
|
1110
|
-
function
|
|
1111
|
-
e.issues.length && t.issues.push(...
|
|
1110
|
+
function xe(e, t, n) {
|
|
1111
|
+
e.issues.length && t.issues.push(...ct(n, e.issues)), t.value[n] = e.value;
|
|
1112
1112
|
}
|
|
1113
1113
|
const Lo = /* @__PURE__ */ u("$ZodArray", (e, t) => {
|
|
1114
1114
|
$.init(e, t), e._zod.parse = (n, o) => {
|
|
@@ -1127,7 +1127,7 @@ const Lo = /* @__PURE__ */ u("$ZodArray", (e, t) => {
|
|
|
1127
1127
|
value: c,
|
|
1128
1128
|
issues: []
|
|
1129
1129
|
}, o);
|
|
1130
|
-
a instanceof Promise ? i.push(a.then((f) =>
|
|
1130
|
+
a instanceof Promise ? i.push(a.then((f) => xe(f, n, s))) : xe(a, n, s);
|
|
1131
1131
|
}
|
|
1132
1132
|
return i.length ? Promise.all(i).then(() => n) : n;
|
|
1133
1133
|
};
|
|
@@ -1137,7 +1137,7 @@ function ae(e, t, n, o, r, i) {
|
|
|
1137
1137
|
if (e.issues.length) {
|
|
1138
1138
|
if (r && i && !s)
|
|
1139
1139
|
return;
|
|
1140
|
-
t.issues.push(...
|
|
1140
|
+
t.issues.push(...ct(n, e.issues));
|
|
1141
1141
|
}
|
|
1142
1142
|
if (!s && !r) {
|
|
1143
1143
|
e.issues.length || t.issues.push({
|
|
@@ -1150,7 +1150,7 @@ function ae(e, t, n, o, r, i) {
|
|
|
1150
1150
|
}
|
|
1151
1151
|
e.value === void 0 ? s && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
1152
1152
|
}
|
|
1153
|
-
function
|
|
1153
|
+
function yt(e) {
|
|
1154
1154
|
var o, r, i, s;
|
|
1155
1155
|
const t = Object.keys(e.shape);
|
|
1156
1156
|
for (const c of t)
|
|
@@ -1165,7 +1165,7 @@ function bt(e) {
|
|
|
1165
1165
|
optionalKeys: new Set(n)
|
|
1166
1166
|
};
|
|
1167
1167
|
}
|
|
1168
|
-
function
|
|
1168
|
+
function bt(e, t, n, o, r, i) {
|
|
1169
1169
|
const s = [], c = r.keySet, a = r.catchall._zod, f = a.def.type, l = a.optin === "optional", d = a.optout === "optional";
|
|
1170
1170
|
for (const g in t) {
|
|
1171
1171
|
if (g === "__proto__" || c.has(g))
|
|
@@ -1198,8 +1198,8 @@ const Vo = /* @__PURE__ */ u("$ZodObject", (e, t) => {
|
|
|
1198
1198
|
}
|
|
1199
1199
|
});
|
|
1200
1200
|
}
|
|
1201
|
-
const o = fe(() =>
|
|
1202
|
-
|
|
1201
|
+
const o = fe(() => yt(t));
|
|
1202
|
+
y(e._zod, "propValues", () => {
|
|
1203
1203
|
const c = t.shape, a = {};
|
|
1204
1204
|
for (const f in c) {
|
|
1205
1205
|
const l = c[f]._zod;
|
|
@@ -1229,14 +1229,14 @@ const Vo = /* @__PURE__ */ u("$ZodObject", (e, t) => {
|
|
|
1229
1229
|
const h = d[g], w = h._zod.optin === "optional", E = h._zod.optout === "optional", j = h._zod.run({ value: f[g], issues: [] }, a);
|
|
1230
1230
|
j instanceof Promise ? l.push(j.then((T) => ae(T, c, g, f, w, E))) : ae(j, c, g, f, w, E);
|
|
1231
1231
|
}
|
|
1232
|
-
return i ?
|
|
1232
|
+
return i ? bt(l, f, c, a, o.value, e) : l.length ? Promise.all(l).then(() => c) : c;
|
|
1233
1233
|
};
|
|
1234
1234
|
}), Bo = /* @__PURE__ */ u("$ZodObjectJIT", (e, t) => {
|
|
1235
1235
|
Vo.init(e, t);
|
|
1236
|
-
const n = e._zod.parse, o = fe(() =>
|
|
1236
|
+
const n = e._zod.parse, o = fe(() => yt(t)), r = (g) => {
|
|
1237
1237
|
var H, x;
|
|
1238
1238
|
const h = new fo(["shape", "payload", "ctx"]), w = o.value, E = (U) => {
|
|
1239
|
-
const O =
|
|
1239
|
+
const O = Ce(U);
|
|
1240
1240
|
return `shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`;
|
|
1241
1241
|
};
|
|
1242
1242
|
h.write("const input = payload.value;");
|
|
@@ -1246,8 +1246,8 @@ const Vo = /* @__PURE__ */ u("$ZodObject", (e, t) => {
|
|
|
1246
1246
|
j[U] = `key_${T++}`;
|
|
1247
1247
|
h.write("const newResult = {};");
|
|
1248
1248
|
for (const U of w.keys) {
|
|
1249
|
-
const O = j[U], A =
|
|
1250
|
-
h.write(`const ${O} = ${E(U)};`),
|
|
1249
|
+
const O = j[U], A = Ce(U), G = g[U], Pe = ((H = G == null ? void 0 : G._zod) == null ? void 0 : H.optin) === "optional", Kt = ((x = G == null ? void 0 : G._zod) == null ? void 0 : x.optout) === "optional";
|
|
1250
|
+
h.write(`const ${O} = ${E(U)};`), Pe && Kt ? h.write(`
|
|
1251
1251
|
if (${O}.issues.length) {
|
|
1252
1252
|
if (${A} in input) {
|
|
1253
1253
|
payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
|
|
@@ -1265,7 +1265,7 @@ const Vo = /* @__PURE__ */ u("$ZodObject", (e, t) => {
|
|
|
1265
1265
|
newResult[${A}] = ${O}.value;
|
|
1266
1266
|
}
|
|
1267
1267
|
|
|
1268
|
-
`) :
|
|
1268
|
+
`) : Pe ? h.write(`
|
|
1269
1269
|
if (${O}.issues.length) {
|
|
1270
1270
|
payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
|
|
1271
1271
|
...iss,
|
|
@@ -1313,12 +1313,12 @@ const Vo = /* @__PURE__ */ u("$ZodObject", (e, t) => {
|
|
|
1313
1313
|
return (U, O) => P(g, U, O);
|
|
1314
1314
|
};
|
|
1315
1315
|
let i;
|
|
1316
|
-
const s = ee, c = !
|
|
1316
|
+
const s = ee, c = !we.jitless, f = c && tn.value, l = t.catchall;
|
|
1317
1317
|
let d;
|
|
1318
1318
|
e._zod.parse = (g, h) => {
|
|
1319
1319
|
d ?? (d = o.value);
|
|
1320
1320
|
const w = g.value;
|
|
1321
|
-
return s(w) ? c && f && (h == null ? void 0 : h.async) === !1 && h.jitless !== !0 ? (i || (i = r(t.shape)), g = i(g, h), l ?
|
|
1321
|
+
return s(w) ? c && f && (h == null ? void 0 : h.async) === !1 && h.jitless !== !0 ? (i || (i = r(t.shape)), g = i(g, h), l ? bt([], w, g, h, d, e) : g) : n(g, h) : (g.issues.push({
|
|
1322
1322
|
expected: "object",
|
|
1323
1323
|
code: "invalid_type",
|
|
1324
1324
|
input: w,
|
|
@@ -1326,7 +1326,7 @@ const Vo = /* @__PURE__ */ u("$ZodObject", (e, t) => {
|
|
|
1326
1326
|
}), g);
|
|
1327
1327
|
};
|
|
1328
1328
|
});
|
|
1329
|
-
function
|
|
1329
|
+
function De(e, t, n, o) {
|
|
1330
1330
|
for (const i of e)
|
|
1331
1331
|
if (i.issues.length === 0)
|
|
1332
1332
|
return t.value = i.value, t;
|
|
@@ -1338,14 +1338,14 @@ function Re(e, t, n, o) {
|
|
|
1338
1338
|
errors: e.map((i) => i.issues.map((s) => B(s, o, V())))
|
|
1339
1339
|
}), t);
|
|
1340
1340
|
}
|
|
1341
|
-
const
|
|
1342
|
-
$.init(e, t),
|
|
1341
|
+
const zt = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
|
|
1342
|
+
$.init(e, t), y(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), y(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), y(e._zod, "values", () => {
|
|
1343
1343
|
if (t.options.every((o) => o._zod.values))
|
|
1344
1344
|
return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
|
|
1345
|
-
}),
|
|
1345
|
+
}), y(e._zod, "pattern", () => {
|
|
1346
1346
|
if (t.options.every((o) => o._zod.pattern)) {
|
|
1347
1347
|
const o = t.options.map((r) => r._zod.pattern);
|
|
1348
|
-
return new RegExp(`^(${o.map((r) =>
|
|
1348
|
+
return new RegExp(`^(${o.map((r) => $e(r.source)).join("|")})$`);
|
|
1349
1349
|
}
|
|
1350
1350
|
});
|
|
1351
1351
|
const n = t.options.length === 1 ? t.options[0]._zod.run : null;
|
|
@@ -1367,12 +1367,12 @@ const wt = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
|
|
|
1367
1367
|
s.push(a);
|
|
1368
1368
|
}
|
|
1369
1369
|
}
|
|
1370
|
-
return i ? Promise.all(s).then((c) =>
|
|
1370
|
+
return i ? Promise.all(s).then((c) => De(c, o, e, r)) : De(s, o, e, r);
|
|
1371
1371
|
};
|
|
1372
1372
|
}), Wo = /* @__PURE__ */ u("$ZodDiscriminatedUnion", (e, t) => {
|
|
1373
|
-
t.inclusive = !1,
|
|
1373
|
+
t.inclusive = !1, zt.init(e, t);
|
|
1374
1374
|
const n = e._zod.parse;
|
|
1375
|
-
|
|
1375
|
+
y(e._zod, "propValues", () => {
|
|
1376
1376
|
const r = {};
|
|
1377
1377
|
for (const i of t.options) {
|
|
1378
1378
|
const s = i._zod.propValues;
|
|
@@ -1425,7 +1425,7 @@ const wt = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
|
|
|
1425
1425
|
}), Go = /* @__PURE__ */ u("$ZodIntersection", (e, t) => {
|
|
1426
1426
|
$.init(e, t), e._zod.parse = (n, o) => {
|
|
1427
1427
|
const r = n.value, i = t.left._zod.run({ value: r, issues: [] }, o), s = t.right._zod.run({ value: r, issues: [] }, o);
|
|
1428
|
-
return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([a, f]) =>
|
|
1428
|
+
return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([a, f]) => Re(n, a, f)) : Re(n, i, s);
|
|
1429
1429
|
};
|
|
1430
1430
|
});
|
|
1431
1431
|
function ve(e, t) {
|
|
@@ -1463,7 +1463,7 @@ function ve(e, t) {
|
|
|
1463
1463
|
}
|
|
1464
1464
|
return { valid: !1, mergeErrorPath: [] };
|
|
1465
1465
|
}
|
|
1466
|
-
function
|
|
1466
|
+
function Re(e, t, n) {
|
|
1467
1467
|
const o = /* @__PURE__ */ new Map();
|
|
1468
1468
|
let r;
|
|
1469
1469
|
for (const c of t.issues)
|
|
@@ -1489,7 +1489,7 @@ function Fe(e, t, n) {
|
|
|
1489
1489
|
}
|
|
1490
1490
|
const Ko = /* @__PURE__ */ u("$ZodEnum", (e, t) => {
|
|
1491
1491
|
$.init(e, t);
|
|
1492
|
-
const n =
|
|
1492
|
+
const n = rt(t.entries), o = new Set(n);
|
|
1493
1493
|
e._zod.values = o, e._zod.pattern = new RegExp(`^(${n.filter((r) => nn.has(typeof r)).map((r) => typeof r == "string" ? q(r) : r.toString()).join("|")})$`), e._zod.parse = (r, i) => {
|
|
1494
1494
|
const s = r.value;
|
|
1495
1495
|
return o.has(s) || r.issues.push({
|
|
@@ -1515,7 +1515,7 @@ const Ko = /* @__PURE__ */ u("$ZodEnum", (e, t) => {
|
|
|
1515
1515
|
}), qo = /* @__PURE__ */ u("$ZodTransform", (e, t) => {
|
|
1516
1516
|
$.init(e, t), e._zod.optin = "optional", e._zod.parse = (n, o) => {
|
|
1517
1517
|
if (o.direction === "backward")
|
|
1518
|
-
throw new
|
|
1518
|
+
throw new ot(e.constructor.name);
|
|
1519
1519
|
const r = t.transform(n.value, n);
|
|
1520
1520
|
if (o.async)
|
|
1521
1521
|
return (r instanceof Promise ? r : Promise.resolve(r)).then((s) => (n.value = s, n.fallback = !0, n));
|
|
@@ -1524,52 +1524,52 @@ const Ko = /* @__PURE__ */ u("$ZodEnum", (e, t) => {
|
|
|
1524
1524
|
return n.value = r, n.fallback = !0, n;
|
|
1525
1525
|
};
|
|
1526
1526
|
});
|
|
1527
|
-
function
|
|
1527
|
+
function Fe(e, t) {
|
|
1528
1528
|
return t === void 0 && (e.issues.length || e.fallback) ? { issues: [], value: void 0 } : e;
|
|
1529
1529
|
}
|
|
1530
|
-
const
|
|
1531
|
-
$.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional",
|
|
1530
|
+
const wt = /* @__PURE__ */ u("$ZodOptional", (e, t) => {
|
|
1531
|
+
$.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", y(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), y(e._zod, "pattern", () => {
|
|
1532
1532
|
const n = t.innerType._zod.pattern;
|
|
1533
|
-
return n ? new RegExp(`^(${
|
|
1533
|
+
return n ? new RegExp(`^(${$e(n.source)})?$`) : void 0;
|
|
1534
1534
|
}), e._zod.parse = (n, o) => {
|
|
1535
1535
|
if (t.innerType._zod.optin === "optional") {
|
|
1536
1536
|
const r = n.value, i = t.innerType._zod.run(n, o);
|
|
1537
|
-
return i instanceof Promise ? i.then((s) =>
|
|
1537
|
+
return i instanceof Promise ? i.then((s) => Fe(s, r)) : Fe(i, r);
|
|
1538
1538
|
}
|
|
1539
1539
|
return n.value === void 0 ? n : t.innerType._zod.run(n, o);
|
|
1540
1540
|
};
|
|
1541
1541
|
}), Xo = /* @__PURE__ */ u("$ZodExactOptional", (e, t) => {
|
|
1542
|
-
|
|
1542
|
+
wt.init(e, t), y(e._zod, "values", () => t.innerType._zod.values), y(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, o) => t.innerType._zod.run(n, o);
|
|
1543
1543
|
}), Ho = /* @__PURE__ */ u("$ZodNullable", (e, t) => {
|
|
1544
|
-
$.init(e, t),
|
|
1544
|
+
$.init(e, t), y(e._zod, "optin", () => t.innerType._zod.optin), y(e._zod, "optout", () => t.innerType._zod.optout), y(e._zod, "pattern", () => {
|
|
1545
1545
|
const n = t.innerType._zod.pattern;
|
|
1546
|
-
return n ? new RegExp(`^(${
|
|
1547
|
-
}),
|
|
1546
|
+
return n ? new RegExp(`^(${$e(n.source)}|null)$`) : void 0;
|
|
1547
|
+
}), y(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, o) => n.value === null ? n : t.innerType._zod.run(n, o);
|
|
1548
1548
|
}), Qo = /* @__PURE__ */ u("$ZodDefault", (e, t) => {
|
|
1549
|
-
$.init(e, t), e._zod.optin = "optional",
|
|
1549
|
+
$.init(e, t), e._zod.optin = "optional", y(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, o) => {
|
|
1550
1550
|
if (o.direction === "backward")
|
|
1551
1551
|
return t.innerType._zod.run(n, o);
|
|
1552
1552
|
if (n.value === void 0)
|
|
1553
1553
|
return n.value = t.defaultValue, n;
|
|
1554
1554
|
const r = t.innerType._zod.run(n, o);
|
|
1555
|
-
return r instanceof Promise ? r.then((i) =>
|
|
1555
|
+
return r instanceof Promise ? r.then((i) => Ue(i, t)) : Ue(r, t);
|
|
1556
1556
|
};
|
|
1557
1557
|
});
|
|
1558
|
-
function
|
|
1558
|
+
function Ue(e, t) {
|
|
1559
1559
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
1560
1560
|
}
|
|
1561
1561
|
const er = /* @__PURE__ */ u("$ZodPrefault", (e, t) => {
|
|
1562
|
-
$.init(e, t), e._zod.optin = "optional",
|
|
1562
|
+
$.init(e, t), e._zod.optin = "optional", y(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, o) => (o.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, o));
|
|
1563
1563
|
}), tr = /* @__PURE__ */ u("$ZodNonOptional", (e, t) => {
|
|
1564
|
-
$.init(e, t),
|
|
1564
|
+
$.init(e, t), y(e._zod, "values", () => {
|
|
1565
1565
|
const n = t.innerType._zod.values;
|
|
1566
1566
|
return n ? new Set([...n].filter((o) => o !== void 0)) : void 0;
|
|
1567
1567
|
}), e._zod.parse = (n, o) => {
|
|
1568
1568
|
const r = t.innerType._zod.run(n, o);
|
|
1569
|
-
return r instanceof Promise ? r.then((i) =>
|
|
1569
|
+
return r instanceof Promise ? r.then((i) => Je(i, e)) : Je(r, e);
|
|
1570
1570
|
};
|
|
1571
1571
|
});
|
|
1572
|
-
function
|
|
1572
|
+
function Je(e, t) {
|
|
1573
1573
|
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
1574
1574
|
code: "invalid_type",
|
|
1575
1575
|
expected: "nonoptional",
|
|
@@ -1578,7 +1578,7 @@ function Me(e, t) {
|
|
|
1578
1578
|
}), e;
|
|
1579
1579
|
}
|
|
1580
1580
|
const nr = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
|
|
1581
|
-
$.init(e, t), e._zod.optin = "optional",
|
|
1581
|
+
$.init(e, t), e._zod.optin = "optional", y(e._zod, "optout", () => t.innerType._zod.optout), y(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, o) => {
|
|
1582
1582
|
if (o.direction === "backward")
|
|
1583
1583
|
return t.innerType._zod.run(n, o);
|
|
1584
1584
|
const r = t.innerType._zod.run(n, o);
|
|
@@ -1597,7 +1597,7 @@ const nr = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
|
|
|
1597
1597
|
}), n.issues = [], n.fallback = !0), n);
|
|
1598
1598
|
};
|
|
1599
1599
|
}), or = /* @__PURE__ */ u("$ZodPipe", (e, t) => {
|
|
1600
|
-
$.init(e, t),
|
|
1600
|
+
$.init(e, t), y(e._zod, "values", () => t.in._zod.values), y(e._zod, "optin", () => t.in._zod.optin), y(e._zod, "optout", () => t.out._zod.optout), y(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, o) => {
|
|
1601
1601
|
if (o.direction === "backward") {
|
|
1602
1602
|
const i = t.out._zod.run(n, o);
|
|
1603
1603
|
return i instanceof Promise ? i.then((s) => se(s, t.in, o)) : se(i, t.in, o);
|
|
@@ -1610,36 +1610,36 @@ function se(e, t, n) {
|
|
|
1610
1610
|
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues, fallback: e.fallback }, n);
|
|
1611
1611
|
}
|
|
1612
1612
|
const rr = /* @__PURE__ */ u("$ZodReadonly", (e, t) => {
|
|
1613
|
-
$.init(e, t),
|
|
1613
|
+
$.init(e, t), y(e._zod, "propValues", () => t.innerType._zod.propValues), y(e._zod, "values", () => t.innerType._zod.values), y(e._zod, "optin", () => {
|
|
1614
1614
|
var n, o;
|
|
1615
1615
|
return (o = (n = t.innerType) == null ? void 0 : n._zod) == null ? void 0 : o.optin;
|
|
1616
|
-
}),
|
|
1616
|
+
}), y(e._zod, "optout", () => {
|
|
1617
1617
|
var n, o;
|
|
1618
1618
|
return (o = (n = t.innerType) == null ? void 0 : n._zod) == null ? void 0 : o.optout;
|
|
1619
1619
|
}), e._zod.parse = (n, o) => {
|
|
1620
1620
|
if (o.direction === "backward")
|
|
1621
1621
|
return t.innerType._zod.run(n, o);
|
|
1622
1622
|
const r = t.innerType._zod.run(n, o);
|
|
1623
|
-
return r instanceof Promise ? r.then(
|
|
1623
|
+
return r instanceof Promise ? r.then(Me) : Me(r);
|
|
1624
1624
|
};
|
|
1625
1625
|
});
|
|
1626
|
-
function
|
|
1626
|
+
function Me(e) {
|
|
1627
1627
|
return e.value = Object.freeze(e.value), e;
|
|
1628
1628
|
}
|
|
1629
1629
|
const ir = /* @__PURE__ */ u("$ZodLazy", (e, t) => {
|
|
1630
|
-
$.init(e, t),
|
|
1630
|
+
$.init(e, t), y(e._zod, "innerType", () => {
|
|
1631
1631
|
const n = t;
|
|
1632
1632
|
return n._cachedInner || (n._cachedInner = t.getter()), n._cachedInner;
|
|
1633
|
-
}),
|
|
1633
|
+
}), y(e._zod, "pattern", () => {
|
|
1634
1634
|
var n, o;
|
|
1635
1635
|
return (o = (n = e._zod.innerType) == null ? void 0 : n._zod) == null ? void 0 : o.pattern;
|
|
1636
|
-
}),
|
|
1636
|
+
}), y(e._zod, "propValues", () => {
|
|
1637
1637
|
var n, o;
|
|
1638
1638
|
return (o = (n = e._zod.innerType) == null ? void 0 : n._zod) == null ? void 0 : o.propValues;
|
|
1639
|
-
}),
|
|
1639
|
+
}), y(e._zod, "optin", () => {
|
|
1640
1640
|
var n, o;
|
|
1641
1641
|
return ((o = (n = e._zod.innerType) == null ? void 0 : n._zod) == null ? void 0 : o.optin) ?? void 0;
|
|
1642
|
-
}),
|
|
1642
|
+
}), y(e._zod, "optout", () => {
|
|
1643
1643
|
var n, o;
|
|
1644
1644
|
return ((o = (n = e._zod.innerType) == null ? void 0 : n._zod) == null ? void 0 : o.optout) ?? void 0;
|
|
1645
1645
|
}), e._zod.parse = (n, o) => e._zod.innerType._zod.run(n, o);
|
|
@@ -1647,11 +1647,11 @@ const ir = /* @__PURE__ */ u("$ZodLazy", (e, t) => {
|
|
|
1647
1647
|
R.init(e, t), $.init(e, t), e._zod.parse = (n, o) => n, e._zod.check = (n) => {
|
|
1648
1648
|
const o = n.value, r = t.fn(o);
|
|
1649
1649
|
if (r instanceof Promise)
|
|
1650
|
-
return r.then((i) =>
|
|
1651
|
-
|
|
1650
|
+
return r.then((i) => Le(i, n, o, e));
|
|
1651
|
+
Le(r, n, o, e);
|
|
1652
1652
|
};
|
|
1653
1653
|
});
|
|
1654
|
-
function
|
|
1654
|
+
function Le(e, t, n, o) {
|
|
1655
1655
|
if (!e) {
|
|
1656
1656
|
const r = {
|
|
1657
1657
|
code: "custom",
|
|
@@ -1666,7 +1666,7 @@ function Ve(e, t, n, o) {
|
|
|
1666
1666
|
o._zod.def.params && (r.params = o._zod.def.params), t.issues.push(ne(r));
|
|
1667
1667
|
}
|
|
1668
1668
|
}
|
|
1669
|
-
var
|
|
1669
|
+
var Ve;
|
|
1670
1670
|
class cr {
|
|
1671
1671
|
constructor() {
|
|
1672
1672
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
@@ -1699,7 +1699,7 @@ class cr {
|
|
|
1699
1699
|
function ar() {
|
|
1700
1700
|
return new cr();
|
|
1701
1701
|
}
|
|
1702
|
-
(
|
|
1702
|
+
(Ve = globalThis).__zod_globalRegistry ?? (Ve.__zod_globalRegistry = ar());
|
|
1703
1703
|
const Q = globalThis.__zod_globalRegistry;
|
|
1704
1704
|
// @__NO_SIDE_EFFECTS__
|
|
1705
1705
|
function ur(e, t) {
|
|
@@ -1719,7 +1719,7 @@ function lr(e, t) {
|
|
|
1719
1719
|
});
|
|
1720
1720
|
}
|
|
1721
1721
|
// @__NO_SIDE_EFFECTS__
|
|
1722
|
-
function
|
|
1722
|
+
function Be(e, t) {
|
|
1723
1723
|
return new e({
|
|
1724
1724
|
type: "string",
|
|
1725
1725
|
format: "guid",
|
|
@@ -2010,8 +2010,8 @@ function Fr(e, t) {
|
|
|
2010
2010
|
});
|
|
2011
2011
|
}
|
|
2012
2012
|
// @__NO_SIDE_EFFECTS__
|
|
2013
|
-
function
|
|
2014
|
-
return new
|
|
2013
|
+
function We(e, t) {
|
|
2014
|
+
return new mt({
|
|
2015
2015
|
check: "less_than",
|
|
2016
2016
|
..._(t),
|
|
2017
2017
|
value: e,
|
|
@@ -2020,7 +2020,7 @@ function Ge(e, t) {
|
|
|
2020
2020
|
}
|
|
2021
2021
|
// @__NO_SIDE_EFFECTS__
|
|
2022
2022
|
function me(e, t) {
|
|
2023
|
-
return new
|
|
2023
|
+
return new mt({
|
|
2024
2024
|
check: "less_than",
|
|
2025
2025
|
..._(t),
|
|
2026
2026
|
value: e,
|
|
@@ -2028,8 +2028,8 @@ function me(e, t) {
|
|
|
2028
2028
|
});
|
|
2029
2029
|
}
|
|
2030
2030
|
// @__NO_SIDE_EFFECTS__
|
|
2031
|
-
function
|
|
2032
|
-
return new
|
|
2031
|
+
function Ge(e, t) {
|
|
2032
|
+
return new gt({
|
|
2033
2033
|
check: "greater_than",
|
|
2034
2034
|
..._(t),
|
|
2035
2035
|
value: e,
|
|
@@ -2038,7 +2038,7 @@ function Ke(e, t) {
|
|
|
2038
2038
|
}
|
|
2039
2039
|
// @__NO_SIDE_EFFECTS__
|
|
2040
2040
|
function ge(e, t) {
|
|
2041
|
-
return new
|
|
2041
|
+
return new gt({
|
|
2042
2042
|
check: "greater_than",
|
|
2043
2043
|
..._(t),
|
|
2044
2044
|
value: e,
|
|
@@ -2046,7 +2046,7 @@ function ge(e, t) {
|
|
|
2046
2046
|
});
|
|
2047
2047
|
}
|
|
2048
2048
|
// @__NO_SIDE_EFFECTS__
|
|
2049
|
-
function
|
|
2049
|
+
function Ke(e, t) {
|
|
2050
2050
|
return new Qn({
|
|
2051
2051
|
check: "multiple_of",
|
|
2052
2052
|
..._(t),
|
|
@@ -2054,7 +2054,7 @@ function Ye(e, t) {
|
|
|
2054
2054
|
});
|
|
2055
2055
|
}
|
|
2056
2056
|
// @__NO_SIDE_EFFECTS__
|
|
2057
|
-
function
|
|
2057
|
+
function kt(e, t) {
|
|
2058
2058
|
return new to({
|
|
2059
2059
|
check: "max_length",
|
|
2060
2060
|
..._(t),
|
|
@@ -2070,7 +2070,7 @@ function ue(e, t) {
|
|
|
2070
2070
|
});
|
|
2071
2071
|
}
|
|
2072
2072
|
// @__NO_SIDE_EFFECTS__
|
|
2073
|
-
function
|
|
2073
|
+
function $t(e, t) {
|
|
2074
2074
|
return new oo({
|
|
2075
2075
|
check: "length_equals",
|
|
2076
2076
|
..._(t),
|
|
@@ -2196,7 +2196,7 @@ function ei(e, t) {
|
|
|
2196
2196
|
});
|
|
2197
2197
|
return n._zod.check = e, n;
|
|
2198
2198
|
}
|
|
2199
|
-
function
|
|
2199
|
+
function St(e) {
|
|
2200
2200
|
let t = (e == null ? void 0 : e.target) ?? "draft-2020-12";
|
|
2201
2201
|
return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
|
|
2202
2202
|
processors: e.processors ?? {},
|
|
@@ -2244,7 +2244,7 @@ function I(e, t, n = { path: [], schemaPath: [] }) {
|
|
|
2244
2244
|
const a = t.metadataRegistry.get(e);
|
|
2245
2245
|
return a && Object.assign(s.schema, a), t.io === "input" && N(e) && (delete s.schema.examples, delete s.schema.default), t.io === "input" && "_prefault" in s.schema && ((o = s.schema).default ?? (o.default = s.schema._prefault)), delete s.schema._prefault, t.seen.get(e).schema;
|
|
2246
2246
|
}
|
|
2247
|
-
function
|
|
2247
|
+
function Zt(e, t) {
|
|
2248
2248
|
var s, c, a, f;
|
|
2249
2249
|
const n = e.seen.get(t);
|
|
2250
2250
|
if (!n)
|
|
@@ -2318,7 +2318,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
2318
2318
|
}
|
|
2319
2319
|
}
|
|
2320
2320
|
}
|
|
2321
|
-
function
|
|
2321
|
+
function Ot(e, t) {
|
|
2322
2322
|
var c, a, f, l;
|
|
2323
2323
|
const n = e.seen.get(t);
|
|
2324
2324
|
if (!n)
|
|
@@ -2430,11 +2430,11 @@ function N(e, t) {
|
|
|
2430
2430
|
return !1;
|
|
2431
2431
|
}
|
|
2432
2432
|
const ti = (e, t = {}) => (n) => {
|
|
2433
|
-
const o =
|
|
2434
|
-
return I(e, o),
|
|
2433
|
+
const o = St({ ...n, processors: t });
|
|
2434
|
+
return I(e, o), Zt(o, e), Ot(o, e);
|
|
2435
2435
|
}, le = (e, t, n = {}) => (o) => {
|
|
2436
|
-
const { libraryOptions: r, target: i } = o ?? {}, s =
|
|
2437
|
-
return I(e, s),
|
|
2436
|
+
const { libraryOptions: r, target: i } = o ?? {}, s = St({ ...r ?? {}, target: i, io: t, processors: n });
|
|
2437
|
+
return I(e, s), Zt(s, e), Ot(s, e);
|
|
2438
2438
|
}, ni = {
|
|
2439
2439
|
guid: "uuid",
|
|
2440
2440
|
url: "uri",
|
|
@@ -2466,7 +2466,7 @@ const ti = (e, t = {}) => (n) => {
|
|
|
2466
2466
|
n.not = {};
|
|
2467
2467
|
}, ci = (e, t, n, o) => {
|
|
2468
2468
|
}, ai = (e, t, n, o) => {
|
|
2469
|
-
const r = e._zod.def, i =
|
|
2469
|
+
const r = e._zod.def, i = rt(r.entries);
|
|
2470
2470
|
i.every((s) => typeof s == "number") && (n.type = "number"), i.every((s) => typeof s == "string") && (n.type = "string"), n.enum = i;
|
|
2471
2471
|
}, ui = (e, t, n, o) => {
|
|
2472
2472
|
const r = e._zod.def, i = [];
|
|
@@ -2573,7 +2573,7 @@ const ti = (e, t = {}) => (n) => {
|
|
|
2573
2573
|
I(r.innerType, t, o);
|
|
2574
2574
|
const i = t.seen.get(e);
|
|
2575
2575
|
i.ref = r.innerType, n.readOnly = !0;
|
|
2576
|
-
},
|
|
2576
|
+
}, Et = (e, t, n, o) => {
|
|
2577
2577
|
const r = e._zod.def;
|
|
2578
2578
|
I(r.innerType, t, o);
|
|
2579
2579
|
const i = t.seen.get(e);
|
|
@@ -2608,7 +2608,7 @@ function Pi(e) {
|
|
|
2608
2608
|
return /* @__PURE__ */ Cr(Ii, e);
|
|
2609
2609
|
}
|
|
2610
2610
|
const Ai = (e, t) => {
|
|
2611
|
-
|
|
2611
|
+
ut.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
2612
2612
|
format: {
|
|
2613
2613
|
value: (n) => mn(e, n)
|
|
2614
2614
|
// enumerable: false,
|
|
@@ -2638,11 +2638,11 @@ const Ai = (e, t) => {
|
|
|
2638
2638
|
});
|
|
2639
2639
|
}, F = /* @__PURE__ */ u("ZodError", Ai, {
|
|
2640
2640
|
Parent: Error
|
|
2641
|
-
}), Ni = /* @__PURE__ */
|
|
2641
|
+
}), Ni = /* @__PURE__ */ Ze(F), Ci = /* @__PURE__ */ Oe(F), ji = /* @__PURE__ */ pe(F), xi = /* @__PURE__ */ de(F), Di = /* @__PURE__ */ vn(F), Ri = /* @__PURE__ */ yn(F), Fi = /* @__PURE__ */ bn(F), Ui = /* @__PURE__ */ zn(F), Ji = /* @__PURE__ */ wn(F), Mi = /* @__PURE__ */ kn(F), Li = /* @__PURE__ */ $n(F), Vi = /* @__PURE__ */ Sn(F), Ye = /* @__PURE__ */ new WeakMap();
|
|
2642
2642
|
function oe(e, t, n) {
|
|
2643
2643
|
const o = Object.getPrototypeOf(e);
|
|
2644
|
-
let r =
|
|
2645
|
-
if (r || (r = /* @__PURE__ */ new Set(),
|
|
2644
|
+
let r = Ye.get(o);
|
|
2645
|
+
if (r || (r = /* @__PURE__ */ new Set(), Ye.set(o, r)), !r.has(t)) {
|
|
2646
2646
|
r.add(t);
|
|
2647
2647
|
for (const i in n) {
|
|
2648
2648
|
const s = n[i];
|
|
@@ -2707,16 +2707,16 @@ const S = /* @__PURE__ */ u("ZodType", (e, t) => ($.init(e, t), Object.assign(e[
|
|
|
2707
2707
|
return this.check(/* @__PURE__ */ X(n));
|
|
2708
2708
|
},
|
|
2709
2709
|
optional() {
|
|
2710
|
-
return
|
|
2710
|
+
return Qe(this);
|
|
2711
2711
|
},
|
|
2712
2712
|
exactOptional() {
|
|
2713
2713
|
return ks(this);
|
|
2714
2714
|
},
|
|
2715
2715
|
nullable() {
|
|
2716
|
-
return
|
|
2716
|
+
return et(this);
|
|
2717
2717
|
},
|
|
2718
2718
|
nullish() {
|
|
2719
|
-
return et(
|
|
2719
|
+
return Qe(et(this));
|
|
2720
2720
|
},
|
|
2721
2721
|
nonoptional(n) {
|
|
2722
2722
|
return Ts(this, n);
|
|
@@ -2725,13 +2725,13 @@ const S = /* @__PURE__ */ u("ZodType", (e, t) => ($.init(e, t), Object.assign(e[
|
|
|
2725
2725
|
return C(this);
|
|
2726
2726
|
},
|
|
2727
2727
|
or(n) {
|
|
2728
|
-
return
|
|
2728
|
+
return At([this, n]);
|
|
2729
2729
|
},
|
|
2730
2730
|
and(n) {
|
|
2731
2731
|
return vs(this, n);
|
|
2732
2732
|
},
|
|
2733
2733
|
transform(n) {
|
|
2734
|
-
return
|
|
2734
|
+
return tt(this, zs(n));
|
|
2735
2735
|
},
|
|
2736
2736
|
default(n) {
|
|
2737
2737
|
return Zs(this, n);
|
|
@@ -2743,7 +2743,7 @@ const S = /* @__PURE__ */ u("ZodType", (e, t) => ($.init(e, t), Object.assign(e[
|
|
|
2743
2743
|
return Ps(this, n);
|
|
2744
2744
|
},
|
|
2745
2745
|
pipe(n) {
|
|
2746
|
-
return
|
|
2746
|
+
return tt(this, n);
|
|
2747
2747
|
},
|
|
2748
2748
|
readonly() {
|
|
2749
2749
|
return Cs(this);
|
|
@@ -2773,8 +2773,8 @@ const S = /* @__PURE__ */ u("ZodType", (e, t) => ($.init(e, t), Object.assign(e[
|
|
|
2773
2773
|
return (n = Q.get(e)) == null ? void 0 : n.description;
|
|
2774
2774
|
},
|
|
2775
2775
|
configurable: !0
|
|
2776
|
-
}), e)),
|
|
2777
|
-
|
|
2776
|
+
}), e)), Tt = /* @__PURE__ */ u("_ZodString", (e, t) => {
|
|
2777
|
+
Ee.init(e, t), S.init(e, t), e._zod.processJSONSchema = (o, r, i) => oi(e, o, r);
|
|
2778
2778
|
const n = e._zod.bag;
|
|
2779
2779
|
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, oe(e, "_ZodString", {
|
|
2780
2780
|
regex(...o) {
|
|
@@ -2793,10 +2793,10 @@ const S = /* @__PURE__ */ u("ZodType", (e, t) => ($.init(e, t), Object.assign(e[
|
|
|
2793
2793
|
return this.check(/* @__PURE__ */ ue(...o));
|
|
2794
2794
|
},
|
|
2795
2795
|
max(...o) {
|
|
2796
|
-
return this.check(/* @__PURE__ */
|
|
2796
|
+
return this.check(/* @__PURE__ */ kt(...o));
|
|
2797
2797
|
},
|
|
2798
2798
|
length(...o) {
|
|
2799
|
-
return this.check(/* @__PURE__ */
|
|
2799
|
+
return this.check(/* @__PURE__ */ $t(...o));
|
|
2800
2800
|
},
|
|
2801
2801
|
nonempty(...o) {
|
|
2802
2802
|
return this.check(/* @__PURE__ */ ue(1, ...o));
|
|
@@ -2824,16 +2824,16 @@ const S = /* @__PURE__ */ u("ZodType", (e, t) => ($.init(e, t), Object.assign(e[
|
|
|
2824
2824
|
}
|
|
2825
2825
|
});
|
|
2826
2826
|
}), Bi = /* @__PURE__ */ u("ZodString", (e, t) => {
|
|
2827
|
-
|
|
2827
|
+
Ee.init(e, t), Tt.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ lr(Wi, n)), e.url = (n) => e.check(/* @__PURE__ */ mr(Gi, n)), e.jwt = (n) => e.check(/* @__PURE__ */ Ir(as, n)), e.emoji = (n) => e.check(/* @__PURE__ */ gr(Ki, n)), e.guid = (n) => e.check(/* @__PURE__ */ Be(qe, n)), e.uuid = (n) => e.check(/* @__PURE__ */ fr(ce, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ pr(ce, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ dr(ce, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ hr(ce, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ _r(Yi, n)), e.guid = (n) => e.check(/* @__PURE__ */ Be(qe, n)), e.cuid = (n) => e.check(/* @__PURE__ */ vr(qi, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ yr(Xi, n)), e.ulid = (n) => e.check(/* @__PURE__ */ br(Hi, n)), e.base64 = (n) => e.check(/* @__PURE__ */ Or(is, n)), e.base64url = (n) => e.check(/* @__PURE__ */ Er(ss, n)), e.xid = (n) => e.check(/* @__PURE__ */ zr(Qi, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ wr(es, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ kr(ts, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ $r(ns, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ Sr(os, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ Zr(rs, n)), e.e164 = (n) => e.check(/* @__PURE__ */ Tr(cs, n)), e.datetime = (n) => e.check(Si(n)), e.date = (n) => e.check(Oi(n)), e.time = (n) => e.check(Ti(n)), e.duration = (n) => e.check(Pi(n));
|
|
2828
2828
|
});
|
|
2829
|
-
function
|
|
2829
|
+
function b(e) {
|
|
2830
2830
|
return /* @__PURE__ */ ur(Bi, e);
|
|
2831
2831
|
}
|
|
2832
2832
|
const Z = /* @__PURE__ */ u("ZodStringFormat", (e, t) => {
|
|
2833
|
-
k.init(e, t),
|
|
2833
|
+
k.init(e, t), Tt.init(e, t);
|
|
2834
2834
|
}), Wi = /* @__PURE__ */ u("ZodEmail", (e, t) => {
|
|
2835
2835
|
go.init(e, t), Z.init(e, t);
|
|
2836
|
-
}),
|
|
2836
|
+
}), qe = /* @__PURE__ */ u("ZodGUID", (e, t) => {
|
|
2837
2837
|
ho.init(e, t), Z.init(e, t);
|
|
2838
2838
|
}), ce = /* @__PURE__ */ u("ZodUUID", (e, t) => {
|
|
2839
2839
|
mo.init(e, t), Z.init(e, t);
|
|
@@ -2869,10 +2869,10 @@ const Z = /* @__PURE__ */ u("ZodStringFormat", (e, t) => {
|
|
|
2869
2869
|
xo.init(e, t), Z.init(e, t);
|
|
2870
2870
|
}), as = /* @__PURE__ */ u("ZodJWT", (e, t) => {
|
|
2871
2871
|
Ro.init(e, t), Z.init(e, t);
|
|
2872
|
-
}),
|
|
2873
|
-
|
|
2872
|
+
}), It = /* @__PURE__ */ u("ZodNumber", (e, t) => {
|
|
2873
|
+
vt.init(e, t), S.init(e, t), e._zod.processJSONSchema = (o, r, i) => ri(e, o, r), oe(e, "ZodNumber", {
|
|
2874
2874
|
gt(o, r) {
|
|
2875
|
-
return this.check(/* @__PURE__ */
|
|
2875
|
+
return this.check(/* @__PURE__ */ Ge(o, r));
|
|
2876
2876
|
},
|
|
2877
2877
|
gte(o, r) {
|
|
2878
2878
|
return this.check(/* @__PURE__ */ ge(o, r));
|
|
@@ -2881,7 +2881,7 @@ const Z = /* @__PURE__ */ u("ZodStringFormat", (e, t) => {
|
|
|
2881
2881
|
return this.check(/* @__PURE__ */ ge(o, r));
|
|
2882
2882
|
},
|
|
2883
2883
|
lt(o, r) {
|
|
2884
|
-
return this.check(/* @__PURE__ */
|
|
2884
|
+
return this.check(/* @__PURE__ */ We(o, r));
|
|
2885
2885
|
},
|
|
2886
2886
|
lte(o, r) {
|
|
2887
2887
|
return this.check(/* @__PURE__ */ me(o, r));
|
|
@@ -2890,28 +2890,28 @@ const Z = /* @__PURE__ */ u("ZodStringFormat", (e, t) => {
|
|
|
2890
2890
|
return this.check(/* @__PURE__ */ me(o, r));
|
|
2891
2891
|
},
|
|
2892
2892
|
int(o) {
|
|
2893
|
-
return this.check(
|
|
2893
|
+
return this.check(Xe(o));
|
|
2894
2894
|
},
|
|
2895
2895
|
safe(o) {
|
|
2896
|
-
return this.check(
|
|
2896
|
+
return this.check(Xe(o));
|
|
2897
2897
|
},
|
|
2898
2898
|
positive(o) {
|
|
2899
|
-
return this.check(/* @__PURE__ */
|
|
2899
|
+
return this.check(/* @__PURE__ */ Ge(0, o));
|
|
2900
2900
|
},
|
|
2901
2901
|
nonnegative(o) {
|
|
2902
2902
|
return this.check(/* @__PURE__ */ ge(0, o));
|
|
2903
2903
|
},
|
|
2904
2904
|
negative(o) {
|
|
2905
|
-
return this.check(/* @__PURE__ */
|
|
2905
|
+
return this.check(/* @__PURE__ */ We(0, o));
|
|
2906
2906
|
},
|
|
2907
2907
|
nonpositive(o) {
|
|
2908
2908
|
return this.check(/* @__PURE__ */ me(0, o));
|
|
2909
2909
|
},
|
|
2910
2910
|
multipleOf(o, r) {
|
|
2911
|
-
return this.check(/* @__PURE__ */
|
|
2911
|
+
return this.check(/* @__PURE__ */ Ke(o, r));
|
|
2912
2912
|
},
|
|
2913
2913
|
step(o, r) {
|
|
2914
|
-
return this.check(/* @__PURE__ */
|
|
2914
|
+
return this.check(/* @__PURE__ */ Ke(o, r));
|
|
2915
2915
|
},
|
|
2916
2916
|
finite() {
|
|
2917
2917
|
return this;
|
|
@@ -2921,12 +2921,12 @@ const Z = /* @__PURE__ */ u("ZodStringFormat", (e, t) => {
|
|
|
2921
2921
|
e.minValue = Math.max(n.minimum ?? Number.NEGATIVE_INFINITY, n.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(n.maximum ?? Number.POSITIVE_INFINITY, n.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? 0.5), e.isFinite = !0, e.format = n.format ?? null;
|
|
2922
2922
|
});
|
|
2923
2923
|
function p(e) {
|
|
2924
|
-
return /* @__PURE__ */ jr(
|
|
2924
|
+
return /* @__PURE__ */ jr(It, e);
|
|
2925
2925
|
}
|
|
2926
2926
|
const us = /* @__PURE__ */ u("ZodNumberFormat", (e, t) => {
|
|
2927
|
-
Fo.init(e, t),
|
|
2927
|
+
Fo.init(e, t), It.init(e, t);
|
|
2928
2928
|
});
|
|
2929
|
-
function
|
|
2929
|
+
function Xe(e) {
|
|
2930
2930
|
return /* @__PURE__ */ xr(us, e);
|
|
2931
2931
|
}
|
|
2932
2932
|
const ls = /* @__PURE__ */ u("ZodBoolean", (e, t) => {
|
|
@@ -2938,7 +2938,7 @@ function m(e) {
|
|
|
2938
2938
|
const fs = /* @__PURE__ */ u("ZodUnknown", (e, t) => {
|
|
2939
2939
|
Jo.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, o, r) => ci();
|
|
2940
2940
|
});
|
|
2941
|
-
function
|
|
2941
|
+
function He() {
|
|
2942
2942
|
return /* @__PURE__ */ Rr(fs);
|
|
2943
2943
|
}
|
|
2944
2944
|
const ps = /* @__PURE__ */ u("ZodNever", (e, t) => {
|
|
@@ -2956,10 +2956,10 @@ const hs = /* @__PURE__ */ u("ZodArray", (e, t) => {
|
|
|
2956
2956
|
return this.check(/* @__PURE__ */ ue(1, n));
|
|
2957
2957
|
},
|
|
2958
2958
|
max(n, o) {
|
|
2959
|
-
return this.check(/* @__PURE__ */
|
|
2959
|
+
return this.check(/* @__PURE__ */ kt(n, o));
|
|
2960
2960
|
},
|
|
2961
2961
|
length(n, o) {
|
|
2962
|
-
return this.check(/* @__PURE__ */
|
|
2962
|
+
return this.check(/* @__PURE__ */ $t(n, o));
|
|
2963
2963
|
},
|
|
2964
2964
|
unwrap() {
|
|
2965
2965
|
return this.element;
|
|
@@ -2970,7 +2970,7 @@ function C(e, t) {
|
|
|
2970
2970
|
return /* @__PURE__ */ Xr(hs, e, t);
|
|
2971
2971
|
}
|
|
2972
2972
|
const ms = /* @__PURE__ */ u("ZodObject", (e, t) => {
|
|
2973
|
-
Bo.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, o, r) => di(e, n, o, r),
|
|
2973
|
+
Bo.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, o, r) => di(e, n, o, r), y(e, "shape", () => t.shape), oe(e, "ZodObject", {
|
|
2974
2974
|
keyof() {
|
|
2975
2975
|
return D(Object.keys(this._zod.def.shape));
|
|
2976
2976
|
},
|
|
@@ -2978,10 +2978,10 @@ const ms = /* @__PURE__ */ u("ZodObject", (e, t) => {
|
|
|
2978
2978
|
return this.clone({ ...this._zod.def, catchall: n });
|
|
2979
2979
|
},
|
|
2980
2980
|
passthrough() {
|
|
2981
|
-
return this.clone({ ...this._zod.def, catchall:
|
|
2981
|
+
return this.clone({ ...this._zod.def, catchall: He() });
|
|
2982
2982
|
},
|
|
2983
2983
|
loose() {
|
|
2984
|
-
return this.clone({ ...this._zod.def, catchall:
|
|
2984
|
+
return this.clone({ ...this._zod.def, catchall: He() });
|
|
2985
2985
|
},
|
|
2986
2986
|
strict() {
|
|
2987
2987
|
return this.clone({ ...this._zod.def, catchall: ds() });
|
|
@@ -3012,7 +3012,7 @@ const ms = /* @__PURE__ */ u("ZodObject", (e, t) => {
|
|
|
3012
3012
|
}
|
|
3013
3013
|
});
|
|
3014
3014
|
});
|
|
3015
|
-
function
|
|
3015
|
+
function v(e, t) {
|
|
3016
3016
|
const n = {
|
|
3017
3017
|
type: "object",
|
|
3018
3018
|
shape: e ?? {},
|
|
@@ -3020,20 +3020,20 @@ function y(e, t) {
|
|
|
3020
3020
|
};
|
|
3021
3021
|
return new ms(n);
|
|
3022
3022
|
}
|
|
3023
|
-
const
|
|
3024
|
-
|
|
3023
|
+
const Pt = /* @__PURE__ */ u("ZodUnion", (e, t) => {
|
|
3024
|
+
zt.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, o, r) => hi(e, n, o, r), e.options = t.options;
|
|
3025
3025
|
});
|
|
3026
|
-
function
|
|
3027
|
-
return new
|
|
3026
|
+
function At(e, t) {
|
|
3027
|
+
return new Pt({
|
|
3028
3028
|
type: "union",
|
|
3029
3029
|
options: e,
|
|
3030
3030
|
..._(t)
|
|
3031
3031
|
});
|
|
3032
3032
|
}
|
|
3033
3033
|
const gs = /* @__PURE__ */ u("ZodDiscriminatedUnion", (e, t) => {
|
|
3034
|
-
|
|
3034
|
+
Pt.init(e, t), Wo.init(e, t);
|
|
3035
3035
|
});
|
|
3036
|
-
function
|
|
3036
|
+
function Te(e, t, n) {
|
|
3037
3037
|
return new gs({
|
|
3038
3038
|
type: "union",
|
|
3039
3039
|
options: t,
|
|
@@ -3051,7 +3051,7 @@ function vs(e, t) {
|
|
|
3051
3051
|
right: t
|
|
3052
3052
|
});
|
|
3053
3053
|
}
|
|
3054
|
-
const
|
|
3054
|
+
const ye = /* @__PURE__ */ u("ZodEnum", (e, t) => {
|
|
3055
3055
|
Ko.init(e, t), S.init(e, t), e._zod.processJSONSchema = (o, r, i) => ai(e, o, r), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
3056
3056
|
const n = new Set(Object.keys(t.entries));
|
|
3057
3057
|
e.extract = (o, r) => {
|
|
@@ -3061,7 +3061,7 @@ const be = /* @__PURE__ */ u("ZodEnum", (e, t) => {
|
|
|
3061
3061
|
i[s] = t.entries[s];
|
|
3062
3062
|
else
|
|
3063
3063
|
throw new Error(`Key ${s} not found in enum`);
|
|
3064
|
-
return new
|
|
3064
|
+
return new ye({
|
|
3065
3065
|
...t,
|
|
3066
3066
|
checks: [],
|
|
3067
3067
|
..._(r),
|
|
@@ -3074,7 +3074,7 @@ const be = /* @__PURE__ */ u("ZodEnum", (e, t) => {
|
|
|
3074
3074
|
delete i[s];
|
|
3075
3075
|
else
|
|
3076
3076
|
throw new Error(`Key ${s} not found in enum`);
|
|
3077
|
-
return new
|
|
3077
|
+
return new ye({
|
|
3078
3078
|
...t,
|
|
3079
3079
|
checks: [],
|
|
3080
3080
|
..._(r),
|
|
@@ -3084,7 +3084,7 @@ const be = /* @__PURE__ */ u("ZodEnum", (e, t) => {
|
|
|
3084
3084
|
});
|
|
3085
3085
|
function D(e, t) {
|
|
3086
3086
|
const n = Array.isArray(e) ? Object.fromEntries(e.map((o) => [o, o])) : e;
|
|
3087
|
-
return new
|
|
3087
|
+
return new ye({
|
|
3088
3088
|
type: "enum",
|
|
3089
3089
|
entries: n,
|
|
3090
3090
|
..._(t)
|
|
@@ -3099,7 +3099,7 @@ const ys = /* @__PURE__ */ u("ZodLiteral", (e, t) => {
|
|
|
3099
3099
|
}
|
|
3100
3100
|
});
|
|
3101
3101
|
});
|
|
3102
|
-
function
|
|
3102
|
+
function z(e, t) {
|
|
3103
3103
|
return new ys({
|
|
3104
3104
|
type: "literal",
|
|
3105
3105
|
values: Array.isArray(e) ? e : [e],
|
|
@@ -3109,7 +3109,7 @@ function v(e, t) {
|
|
|
3109
3109
|
const bs = /* @__PURE__ */ u("ZodTransform", (e, t) => {
|
|
3110
3110
|
qo.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, o, r) => fi(e, n), e._zod.parse = (n, o) => {
|
|
3111
3111
|
if (o.direction === "backward")
|
|
3112
|
-
throw new
|
|
3112
|
+
throw new ot(e.constructor.name);
|
|
3113
3113
|
n.addIssue = (i) => {
|
|
3114
3114
|
if (typeof i == "string")
|
|
3115
3115
|
n.issues.push(ne(i, n.value, t));
|
|
@@ -3129,16 +3129,16 @@ function zs(e) {
|
|
|
3129
3129
|
});
|
|
3130
3130
|
}
|
|
3131
3131
|
const Nt = /* @__PURE__ */ u("ZodOptional", (e, t) => {
|
|
3132
|
-
|
|
3132
|
+
wt.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, o, r) => Et(e, n, o, r), e.unwrap = () => e._zod.def.innerType;
|
|
3133
3133
|
});
|
|
3134
|
-
function
|
|
3134
|
+
function Qe(e) {
|
|
3135
3135
|
return new Nt({
|
|
3136
3136
|
type: "optional",
|
|
3137
3137
|
innerType: e
|
|
3138
3138
|
});
|
|
3139
3139
|
}
|
|
3140
3140
|
const ws = /* @__PURE__ */ u("ZodExactOptional", (e, t) => {
|
|
3141
|
-
Xo.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, o, r) =>
|
|
3141
|
+
Xo.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, o, r) => Et(e, n, o, r), e.unwrap = () => e._zod.def.innerType;
|
|
3142
3142
|
});
|
|
3143
3143
|
function ks(e) {
|
|
3144
3144
|
return new ws({
|
|
@@ -3149,7 +3149,7 @@ function ks(e) {
|
|
|
3149
3149
|
const $s = /* @__PURE__ */ u("ZodNullable", (e, t) => {
|
|
3150
3150
|
Ho.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, o, r) => gi(e, n, o, r), e.unwrap = () => e._zod.def.innerType;
|
|
3151
3151
|
});
|
|
3152
|
-
function
|
|
3152
|
+
function et(e) {
|
|
3153
3153
|
return new $s({
|
|
3154
3154
|
type: "nullable",
|
|
3155
3155
|
innerType: e
|
|
@@ -3163,7 +3163,7 @@ function Zs(e, t) {
|
|
|
3163
3163
|
type: "default",
|
|
3164
3164
|
innerType: e,
|
|
3165
3165
|
get defaultValue() {
|
|
3166
|
-
return typeof t == "function" ? t() :
|
|
3166
|
+
return typeof t == "function" ? t() : st(t);
|
|
3167
3167
|
}
|
|
3168
3168
|
});
|
|
3169
3169
|
}
|
|
@@ -3175,7 +3175,7 @@ function Es(e, t) {
|
|
|
3175
3175
|
type: "prefault",
|
|
3176
3176
|
innerType: e,
|
|
3177
3177
|
get defaultValue() {
|
|
3178
|
-
return typeof t == "function" ? t() :
|
|
3178
|
+
return typeof t == "function" ? t() : st(t);
|
|
3179
3179
|
}
|
|
3180
3180
|
});
|
|
3181
3181
|
}
|
|
@@ -3202,7 +3202,7 @@ function Ps(e, t) {
|
|
|
3202
3202
|
const As = /* @__PURE__ */ u("ZodPipe", (e, t) => {
|
|
3203
3203
|
or.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, o, r) => zi(e, n, o, r), e.in = t.in, e.out = t.out;
|
|
3204
3204
|
});
|
|
3205
|
-
function
|
|
3205
|
+
function tt(e, t) {
|
|
3206
3206
|
return new As({
|
|
3207
3207
|
type: "pipe",
|
|
3208
3208
|
in: e,
|
|
@@ -3237,12 +3237,12 @@ function Ds(e, t = {}) {
|
|
|
3237
3237
|
function Rs(e, t) {
|
|
3238
3238
|
return /* @__PURE__ */ Qr(e, t);
|
|
3239
3239
|
}
|
|
3240
|
-
const
|
|
3240
|
+
const be = v({
|
|
3241
3241
|
x: p(),
|
|
3242
3242
|
y: p()
|
|
3243
|
-
}), Fs =
|
|
3243
|
+
}), Fs = v({
|
|
3244
3244
|
enabled: m(),
|
|
3245
|
-
color:
|
|
3245
|
+
color: b(),
|
|
3246
3246
|
width: p(),
|
|
3247
3247
|
dashArray: C(p()).optional(),
|
|
3248
3248
|
lineCap: D(["butt", "round", "square"]).optional(),
|
|
@@ -3250,11 +3250,11 @@ const ze = y({
|
|
|
3250
3250
|
miterLimit: p().optional(),
|
|
3251
3251
|
opacity: p().optional(),
|
|
3252
3252
|
feather: p().optional()
|
|
3253
|
-
}), Us =
|
|
3253
|
+
}), Us = v({
|
|
3254
3254
|
fill: m().optional(),
|
|
3255
3255
|
stroke: m().optional(),
|
|
3256
3256
|
scope: D(["group", "artboard"]).optional()
|
|
3257
|
-
}), Js =
|
|
3257
|
+
}), Js = v({
|
|
3258
3258
|
enabled: m(),
|
|
3259
3259
|
style: D(["worn", "cracked", "grunge", "retro", "custom"]),
|
|
3260
3260
|
intensity: p(),
|
|
@@ -3262,39 +3262,39 @@ const ze = y({
|
|
|
3262
3262
|
grainAmount: p().optional(),
|
|
3263
3263
|
scratchAmount: p().optional(),
|
|
3264
3264
|
edgeWear: p().optional(),
|
|
3265
|
-
textureUrl:
|
|
3265
|
+
textureUrl: b().optional(),
|
|
3266
3266
|
textureOpacity: p().optional(),
|
|
3267
3267
|
textureBlendMode: D(["multiply", "screen", "overlay"]).optional(),
|
|
3268
3268
|
seed: p().optional()
|
|
3269
|
-
}), Ms =
|
|
3270
|
-
id:
|
|
3269
|
+
}), Ms = v({
|
|
3270
|
+
id: b(),
|
|
3271
3271
|
type: D(["clip", "alpha", "luma", "distress"]),
|
|
3272
3272
|
// maskElement is a nested element config -- use lazy to break the cycle
|
|
3273
|
-
maskElement: jt(() =>
|
|
3273
|
+
maskElement: jt(() => Ie),
|
|
3274
3274
|
inverted: m().optional(),
|
|
3275
3275
|
feather: p().optional(),
|
|
3276
3276
|
opacity: p().optional(),
|
|
3277
|
-
blendMode:
|
|
3278
|
-
}), Ls =
|
|
3279
|
-
color:
|
|
3280
|
-
fontFamily:
|
|
3277
|
+
blendMode: b().optional()
|
|
3278
|
+
}), Ls = v({
|
|
3279
|
+
color: b().optional(),
|
|
3280
|
+
fontFamily: b().optional(),
|
|
3281
3281
|
fontSize: p().optional(),
|
|
3282
3282
|
bold: m().optional(),
|
|
3283
3283
|
italic: m().optional(),
|
|
3284
3284
|
underline: m().optional(),
|
|
3285
3285
|
strikethrough: m().optional(),
|
|
3286
3286
|
letterSpacing: p().optional()
|
|
3287
|
-
}), Vs =
|
|
3288
|
-
text:
|
|
3287
|
+
}), Vs = v({
|
|
3288
|
+
text: b(),
|
|
3289
3289
|
style: Ls
|
|
3290
|
-
}), Bs =
|
|
3290
|
+
}), Bs = v({
|
|
3291
3291
|
spans: C(Vs)
|
|
3292
|
-
}), Ws =
|
|
3292
|
+
}), Ws = v({
|
|
3293
3293
|
charIndex: p(),
|
|
3294
3294
|
glyphIndex: p(),
|
|
3295
|
-
unicode:
|
|
3296
|
-
alternateName:
|
|
3297
|
-
}), Gs =
|
|
3295
|
+
unicode: b(),
|
|
3296
|
+
alternateName: b().optional()
|
|
3297
|
+
}), Gs = v({
|
|
3298
3298
|
liga: m().optional(),
|
|
3299
3299
|
dlig: m().optional(),
|
|
3300
3300
|
calt: m().optional(),
|
|
@@ -3335,35 +3335,35 @@ const ze = y({
|
|
|
3335
3335
|
kern: m().optional(),
|
|
3336
3336
|
mark: m().optional(),
|
|
3337
3337
|
mkmk: m().optional()
|
|
3338
|
-
}), xt =
|
|
3339
|
-
type:
|
|
3340
|
-
controlPoints: C(
|
|
3341
|
-
}).passthrough(), Dt =
|
|
3342
|
-
type:
|
|
3343
|
-
}).passthrough(), Rt =
|
|
3344
|
-
type:
|
|
3338
|
+
}), xt = v({
|
|
3339
|
+
type: z("custom"),
|
|
3340
|
+
controlPoints: C(be)
|
|
3341
|
+
}).passthrough(), Dt = v({
|
|
3342
|
+
type: z("distort")
|
|
3343
|
+
}).passthrough(), Rt = v({
|
|
3344
|
+
type: z("circle"),
|
|
3345
3345
|
radius: p(),
|
|
3346
3346
|
scale: p(),
|
|
3347
3347
|
reverse: m()
|
|
3348
|
-
}), Ft =
|
|
3349
|
-
type:
|
|
3348
|
+
}), Ft = v({
|
|
3349
|
+
type: z("lean"),
|
|
3350
3350
|
leanAmount: p()
|
|
3351
|
-
}).passthrough(), Ut =
|
|
3352
|
-
type:
|
|
3351
|
+
}).passthrough(), Ut = v({
|
|
3352
|
+
type: z("arch"),
|
|
3353
3353
|
archHeight: p()
|
|
3354
|
-
}).passthrough(), Jt =
|
|
3355
|
-
type:
|
|
3354
|
+
}).passthrough(), Jt = v({
|
|
3355
|
+
type: z("ascend"),
|
|
3356
3356
|
ascendAngle: p()
|
|
3357
|
-
}).passthrough(), Mt =
|
|
3358
|
-
type:
|
|
3357
|
+
}).passthrough(), Mt = v({
|
|
3358
|
+
type: z("wave"),
|
|
3359
3359
|
amplitude: p(),
|
|
3360
3360
|
frequency: p()
|
|
3361
|
-
}).passthrough(), Lt =
|
|
3362
|
-
type:
|
|
3361
|
+
}).passthrough(), Lt = v({
|
|
3362
|
+
type: z("flag"),
|
|
3363
3363
|
amplitude: p(),
|
|
3364
3364
|
frequency: p()
|
|
3365
|
-
}).passthrough(), Vt =
|
|
3366
|
-
type:
|
|
3365
|
+
}).passthrough(), Vt = v({
|
|
3366
|
+
type: z("image"),
|
|
3367
3367
|
width: p(),
|
|
3368
3368
|
height: p(),
|
|
3369
3369
|
cropX: p(),
|
|
@@ -3375,22 +3375,22 @@ const ze = y({
|
|
|
3375
3375
|
borderRadius: p(),
|
|
3376
3376
|
// Brightness/contrast/saturation (1 = neutral) — optional; the canonical
|
|
3377
3377
|
// neutral state is ABSENCE, so saved states never carry {1,1,1}.
|
|
3378
|
-
adjustments:
|
|
3378
|
+
adjustments: v({
|
|
3379
3379
|
brightness: p(),
|
|
3380
3380
|
contrast: p(),
|
|
3381
3381
|
saturation: p()
|
|
3382
3382
|
}).optional()
|
|
3383
|
-
}), Bt =
|
|
3384
|
-
type:
|
|
3385
|
-
}),
|
|
3383
|
+
}), Bt = v({
|
|
3384
|
+
type: z("group")
|
|
3385
|
+
}), nt = v({
|
|
3386
3386
|
offset: p().min(0).max(1),
|
|
3387
|
-
color:
|
|
3388
|
-
}), Ks =
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
]), Wt =
|
|
3393
|
-
type:
|
|
3387
|
+
color: b()
|
|
3388
|
+
}), Ks = Te("type", [
|
|
3389
|
+
v({ type: z("solid"), color: b() }),
|
|
3390
|
+
v({ type: z("linear"), angle: p(), stops: C(nt).min(2) }),
|
|
3391
|
+
v({ type: z("radial"), stops: C(nt).min(2) })
|
|
3392
|
+
]), Wt = v({
|
|
3393
|
+
type: z("shape"),
|
|
3394
3394
|
shapeType: D(["rectangle", "circle", "ellipse", "triangle", "polygon", "star", "line"]),
|
|
3395
3395
|
width: p(),
|
|
3396
3396
|
height: p(),
|
|
@@ -3400,29 +3400,29 @@ const ze = y({
|
|
|
3400
3400
|
sides: p().optional(),
|
|
3401
3401
|
points: p().optional(),
|
|
3402
3402
|
innerRadius: p().optional(),
|
|
3403
|
-
fillColor:
|
|
3403
|
+
fillColor: b().optional(),
|
|
3404
3404
|
fillOpacity: p().optional(),
|
|
3405
3405
|
fill: Ks.optional()
|
|
3406
|
-
}), Ys =
|
|
3407
|
-
id:
|
|
3406
|
+
}), Ys = v({
|
|
3407
|
+
id: b(),
|
|
3408
3408
|
x: p(),
|
|
3409
3409
|
y: p(),
|
|
3410
3410
|
type: D(["corner", "smooth", "bezier"]),
|
|
3411
|
-
handleIn:
|
|
3412
|
-
handleOut:
|
|
3413
|
-
}), Gt =
|
|
3414
|
-
type:
|
|
3411
|
+
handleIn: be.optional(),
|
|
3412
|
+
handleOut: be.optional()
|
|
3413
|
+
}), Gt = v({
|
|
3414
|
+
type: z("path"),
|
|
3415
3415
|
points: C(Ys),
|
|
3416
3416
|
closed: m(),
|
|
3417
3417
|
width: p(),
|
|
3418
3418
|
height: p(),
|
|
3419
3419
|
fillEnabled: m().optional(),
|
|
3420
|
-
fillColor:
|
|
3420
|
+
fillColor: b().optional(),
|
|
3421
3421
|
fillOpacity: p().optional(),
|
|
3422
3422
|
strokeEnabled: m().optional(),
|
|
3423
|
-
strokeColor:
|
|
3423
|
+
strokeColor: b().optional(),
|
|
3424
3424
|
strokeWidth: p().optional()
|
|
3425
|
-
}), _c =
|
|
3425
|
+
}), _c = Te("type", [
|
|
3426
3426
|
xt,
|
|
3427
3427
|
Dt,
|
|
3428
3428
|
Rt,
|
|
@@ -3435,14 +3435,14 @@ const ze = y({
|
|
|
3435
3435
|
Bt,
|
|
3436
3436
|
Wt,
|
|
3437
3437
|
Gt
|
|
3438
|
-
]), re =
|
|
3439
|
-
id:
|
|
3438
|
+
]), re = v({
|
|
3439
|
+
id: b(),
|
|
3440
3440
|
x: p(),
|
|
3441
3441
|
y: p(),
|
|
3442
3442
|
rotation: p(),
|
|
3443
3443
|
opacity: p(),
|
|
3444
3444
|
// Layer properties
|
|
3445
|
-
name:
|
|
3445
|
+
name: b().optional(),
|
|
3446
3446
|
visible: m().optional(),
|
|
3447
3447
|
locked: m().optional(),
|
|
3448
3448
|
isClipping: m().optional(),
|
|
@@ -3456,11 +3456,11 @@ const ze = y({
|
|
|
3456
3456
|
// Rich text
|
|
3457
3457
|
richText: Bs.optional(),
|
|
3458
3458
|
// Legacy plain text
|
|
3459
|
-
text:
|
|
3459
|
+
text: b().optional(),
|
|
3460
3460
|
// Element-level style defaults
|
|
3461
3461
|
fontSize: p().optional(),
|
|
3462
|
-
fontFamily:
|
|
3463
|
-
color:
|
|
3462
|
+
fontFamily: b().optional(),
|
|
3463
|
+
color: b().optional(),
|
|
3464
3464
|
textAlign: D(["left", "center", "right"]).optional(),
|
|
3465
3465
|
bold: m().optional(),
|
|
3466
3466
|
italic: m().optional(),
|
|
@@ -3472,45 +3472,45 @@ const ze = y({
|
|
|
3472
3472
|
glyphOverrides: C(Ws).optional(),
|
|
3473
3473
|
openTypeFeatures: Gs.optional()
|
|
3474
3474
|
}), qs = L.extend({
|
|
3475
|
-
transformType:
|
|
3475
|
+
transformType: z("custom"),
|
|
3476
3476
|
transformData: xt.optional()
|
|
3477
3477
|
}), Xs = L.extend({
|
|
3478
|
-
transformType:
|
|
3478
|
+
transformType: z("distort"),
|
|
3479
3479
|
transformData: Dt.optional()
|
|
3480
3480
|
}), Hs = L.extend({
|
|
3481
|
-
transformType:
|
|
3481
|
+
transformType: z("circle"),
|
|
3482
3482
|
transformData: Rt.optional()
|
|
3483
3483
|
}), Qs = L.extend({
|
|
3484
|
-
transformType:
|
|
3484
|
+
transformType: z("lean"),
|
|
3485
3485
|
transformData: Ft.optional()
|
|
3486
3486
|
}), ec = L.extend({
|
|
3487
|
-
transformType:
|
|
3487
|
+
transformType: z("arch"),
|
|
3488
3488
|
transformData: Ut.optional()
|
|
3489
3489
|
}), tc = L.extend({
|
|
3490
|
-
transformType:
|
|
3490
|
+
transformType: z("ascend"),
|
|
3491
3491
|
transformData: Jt.optional()
|
|
3492
3492
|
}), nc = L.extend({
|
|
3493
|
-
transformType:
|
|
3493
|
+
transformType: z("wave"),
|
|
3494
3494
|
transformData: Mt.optional()
|
|
3495
3495
|
}), oc = L.extend({
|
|
3496
|
-
transformType:
|
|
3496
|
+
transformType: z("flag"),
|
|
3497
3497
|
transformData: Lt.optional()
|
|
3498
3498
|
}), rc = re.extend({
|
|
3499
|
-
transformType:
|
|
3499
|
+
transformType: z("image"),
|
|
3500
3500
|
transformData: Vt.optional(),
|
|
3501
|
-
imageUrl:
|
|
3501
|
+
imageUrl: b().optional(),
|
|
3502
3502
|
imageAspectRatio: p().optional()
|
|
3503
3503
|
}), ic = re.extend({
|
|
3504
|
-
transformType:
|
|
3504
|
+
transformType: z("group"),
|
|
3505
3505
|
transformData: Bt.optional(),
|
|
3506
|
-
children: jt(() => C(
|
|
3506
|
+
children: jt(() => C(Ie)).optional()
|
|
3507
3507
|
}), sc = re.extend({
|
|
3508
|
-
transformType:
|
|
3508
|
+
transformType: z("shape"),
|
|
3509
3509
|
transformData: Wt.optional()
|
|
3510
3510
|
}), cc = re.extend({
|
|
3511
|
-
transformType:
|
|
3511
|
+
transformType: z("path"),
|
|
3512
3512
|
transformData: Gt.optional()
|
|
3513
|
-
}),
|
|
3513
|
+
}), Ie = Te("transformType", [
|
|
3514
3514
|
qs,
|
|
3515
3515
|
Xs,
|
|
3516
3516
|
Hs,
|
|
@@ -3523,59 +3523,60 @@ const ze = y({
|
|
|
3523
3523
|
ic,
|
|
3524
3524
|
sc,
|
|
3525
3525
|
cc
|
|
3526
|
-
]), ac =
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
type:
|
|
3526
|
+
]), ac = At([
|
|
3527
|
+
z("rectangle"),
|
|
3528
|
+
z("circle"),
|
|
3529
|
+
v({ type: z("rounded"), radius: p() }),
|
|
3530
|
+
v({ type: z("path"), d: b() }),
|
|
3531
|
+
v({
|
|
3532
|
+
type: z("composite-path"),
|
|
3533
3533
|
pieces: C(
|
|
3534
|
-
|
|
3535
|
-
d:
|
|
3534
|
+
v({
|
|
3535
|
+
d: b(),
|
|
3536
3536
|
x: p(),
|
|
3537
3537
|
y: p(),
|
|
3538
|
-
|
|
3538
|
+
// degrees clockwise, any multiple of 45 (utils/pieceRotation.ts — 45 = a bandana's folded view)
|
|
3539
|
+
rotation: p().refine((e) => Number.isFinite(e) && e % 45 === 0, { message: "rotation must be a multiple of 45 (degrees clockwise)" }).optional(),
|
|
3539
3540
|
baseWidth: p().optional(),
|
|
3540
3541
|
baseHeight: p().optional()
|
|
3541
3542
|
})
|
|
3542
3543
|
)
|
|
3543
3544
|
})
|
|
3544
|
-
]), uc =
|
|
3545
|
+
]), uc = v({
|
|
3545
3546
|
enabled: m(),
|
|
3546
|
-
textureUrl:
|
|
3547
|
+
textureUrl: b(),
|
|
3547
3548
|
intensity: p()
|
|
3548
|
-
}), lc =
|
|
3549
|
-
id:
|
|
3550
|
-
name:
|
|
3549
|
+
}), lc = v({
|
|
3550
|
+
id: b(),
|
|
3551
|
+
name: b(),
|
|
3551
3552
|
x: p(),
|
|
3552
3553
|
y: p(),
|
|
3553
3554
|
width: p(),
|
|
3554
3555
|
height: p(),
|
|
3555
|
-
backgroundColor:
|
|
3556
|
+
backgroundColor: b(),
|
|
3556
3557
|
backgroundType: D(["color", "transparent", "texture"]).optional(),
|
|
3557
|
-
backgroundTexture:
|
|
3558
|
+
backgroundTexture: b().optional(),
|
|
3558
3559
|
exportBackground: m().optional(),
|
|
3559
3560
|
clipShape: ac.optional(),
|
|
3560
|
-
previewBackgroundColor:
|
|
3561
|
+
previewBackgroundColor: b().optional(),
|
|
3561
3562
|
distressTexture: uc.optional(),
|
|
3562
3563
|
// Pacing role for multi-page templates (ADR-0086) — template metadata,
|
|
3563
3564
|
// stripped from the server render wire by serializeStateForServer
|
|
3564
3565
|
role: D(["cover", "front-matter", "repeating", "back-matter"]).optional(),
|
|
3565
|
-
elementIds: C(
|
|
3566
|
-
}), fc =
|
|
3567
|
-
family:
|
|
3568
|
-
url:
|
|
3566
|
+
elementIds: C(b())
|
|
3567
|
+
}), fc = v({
|
|
3568
|
+
family: b().min(1),
|
|
3569
|
+
url: b().min(1),
|
|
3569
3570
|
weight: p().optional(),
|
|
3570
3571
|
style: D(["normal", "italic"]).optional()
|
|
3571
|
-
}), pc =
|
|
3572
|
-
version:
|
|
3572
|
+
}), pc = v({
|
|
3573
|
+
version: z(1),
|
|
3573
3574
|
artboards: C(lc),
|
|
3574
|
-
elements: C(
|
|
3575
|
-
activeArtboardId:
|
|
3575
|
+
elements: C(Ie),
|
|
3576
|
+
activeArtboardId: b(),
|
|
3576
3577
|
customFonts: C(fc).optional()
|
|
3577
3578
|
});
|
|
3578
|
-
function
|
|
3579
|
+
function ze(e, t = /* @__PURE__ */ new Set()) {
|
|
3579
3580
|
var n;
|
|
3580
3581
|
for (const o of e) {
|
|
3581
3582
|
typeof o.fontFamily == "string" && o.fontFamily.trim() && t.add(o.fontFamily);
|
|
@@ -3583,9 +3584,9 @@ function we(e, t = /* @__PURE__ */ new Set()) {
|
|
|
3583
3584
|
if (r != null && r.spans)
|
|
3584
3585
|
for (const i of r.spans)
|
|
3585
3586
|
typeof ((n = i.style) == null ? void 0 : n.fontFamily) == "string" && i.style.fontFamily.trim() && t.add(i.style.fontFamily);
|
|
3586
|
-
if (Array.isArray(o.children) &&
|
|
3587
|
+
if (Array.isArray(o.children) && ze(o.children, t), Array.isArray(o.masks)) {
|
|
3587
3588
|
const i = o.masks.map((s) => s.maskElement).filter((s) => !!s);
|
|
3588
|
-
|
|
3589
|
+
ze(i, t);
|
|
3589
3590
|
}
|
|
3590
3591
|
}
|
|
3591
3592
|
return t;
|
|
@@ -3615,7 +3616,7 @@ function vc(e, t, n = {}) {
|
|
|
3615
3616
|
), s = t.map(
|
|
3616
3617
|
(f) => f.toJSON()
|
|
3617
3618
|
), c = n.customFonts !== void 0 ? [...n.customFonts] : Xt.forFamilies([
|
|
3618
|
-
...
|
|
3619
|
+
...ze(s)
|
|
3619
3620
|
]);
|
|
3620
3621
|
return {
|
|
3621
3622
|
version: 1,
|
|
@@ -3728,20 +3729,20 @@ function hc(e) {
|
|
|
3728
3729
|
);
|
|
3729
3730
|
}
|
|
3730
3731
|
export {
|
|
3731
|
-
|
|
3732
|
+
Ie as A,
|
|
3732
3733
|
pc as C,
|
|
3733
3734
|
lc as S,
|
|
3734
3735
|
_c as a,
|
|
3735
|
-
|
|
3736
|
-
|
|
3736
|
+
Te as b,
|
|
3737
|
+
b as c,
|
|
3737
3738
|
yc as d,
|
|
3738
3739
|
C as e,
|
|
3739
|
-
|
|
3740
|
+
z as l,
|
|
3740
3741
|
bc as m,
|
|
3741
3742
|
p as n,
|
|
3742
|
-
|
|
3743
|
+
v as o,
|
|
3743
3744
|
vc as s,
|
|
3744
|
-
|
|
3745
|
+
At as u,
|
|
3745
3746
|
dc as v
|
|
3746
3747
|
};
|
|
3747
|
-
//# sourceMappingURL=CanvasStateV1-
|
|
3748
|
+
//# sourceMappingURL=CanvasStateV1-CJJff7Ci.js.map
|