@polagram/core 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -2
- package/dist/polagram-core.js +318 -284
- package/dist/polagram-core.umd.cjs +9 -8
- package/package.json +1 -1
package/dist/polagram-core.js
CHANGED
|
@@ -69,24 +69,46 @@ class Ye {
|
|
|
69
69
|
constructor() {
|
|
70
70
|
this.traverser = new Ke(this);
|
|
71
71
|
}
|
|
72
|
+
visitParticipantGroup(e) {
|
|
73
|
+
}
|
|
72
74
|
generate(e) {
|
|
73
75
|
return this.lines = [], this.indentLevel = 0, this.traverser.traverse(e), this.lines.join(`
|
|
74
76
|
`);
|
|
75
77
|
}
|
|
76
78
|
visitRoot(e) {
|
|
77
79
|
this.lines.push("sequenceDiagram"), this.indentLevel++, e.meta?.title && this.add(`title ${e.meta.title}`);
|
|
78
|
-
|
|
79
|
-
|
|
80
|
+
const n = /* @__PURE__ */ new Map();
|
|
81
|
+
for (const i of e.participants)
|
|
82
|
+
n.set(i.id, []);
|
|
83
|
+
for (const i of e.groups)
|
|
84
|
+
for (const s of i.participantIds) {
|
|
85
|
+
const o = n.get(s);
|
|
86
|
+
o && o.push(i);
|
|
87
|
+
}
|
|
88
|
+
const r = [];
|
|
89
|
+
for (const i of e.participants) {
|
|
90
|
+
const s = n.get(i.id) || [];
|
|
91
|
+
let o = 0;
|
|
92
|
+
const a = Math.min(r.length, s.length);
|
|
93
|
+
for (let c = 0; c < a && r[c] === s[c]; c++)
|
|
94
|
+
o++;
|
|
95
|
+
for (; r.length > o; )
|
|
96
|
+
this.indentLevel--, this.add("end"), r.pop();
|
|
97
|
+
for (let c = o; c < s.length; c++) {
|
|
98
|
+
const h = s[c];
|
|
99
|
+
let p = "box";
|
|
100
|
+
h.style?.backgroundColor && (p += ` ${h.style.backgroundColor}`), h.name && (p += ` ${h.name}`), this.add(p), this.indentLevel++, r.push(h);
|
|
101
|
+
}
|
|
102
|
+
this.visitParticipant(i);
|
|
103
|
+
}
|
|
104
|
+
for (; r.length > 0; )
|
|
105
|
+
this.indentLevel--, this.add("end"), r.pop();
|
|
80
106
|
this.traverser.dispatchEvents(e.events);
|
|
81
107
|
}
|
|
82
108
|
visitParticipant(e) {
|
|
83
109
|
const n = e.type === "actor" ? "actor" : "participant", r = e.name;
|
|
84
110
|
e.id === e.name ? this.add(`${n} ${e.id}`) : this.add(`${n} ${e.id} as ${r}`);
|
|
85
111
|
}
|
|
86
|
-
visitParticipantGroup(e) {
|
|
87
|
-
let n = "box";
|
|
88
|
-
e.style?.backgroundColor && (n += ` ${e.style.backgroundColor}`), e.name && (n += ` ${e.name}`), this.add(n);
|
|
89
|
-
}
|
|
90
112
|
visitMessage(e) {
|
|
91
113
|
const n = e.from ?? "[*]", r = e.to ?? "[*]", i = At(e.type, e.style);
|
|
92
114
|
let s = "";
|
|
@@ -146,13 +168,31 @@ class Xe {
|
|
|
146
168
|
}
|
|
147
169
|
visitRoot(e) {
|
|
148
170
|
this.add("@startuml"), e.meta.title && this.add(`title ${e.meta.title}`);
|
|
149
|
-
const n =
|
|
150
|
-
for (const i of e.groups)
|
|
151
|
-
this.visitGroup(i, n), i.participantIds.forEach((s) => {
|
|
152
|
-
r.add(s);
|
|
153
|
-
});
|
|
171
|
+
const n = /* @__PURE__ */ new Map();
|
|
154
172
|
for (const i of e.participants)
|
|
155
|
-
|
|
173
|
+
n.set(i.id, []);
|
|
174
|
+
for (const i of e.groups)
|
|
175
|
+
for (const s of i.participantIds) {
|
|
176
|
+
const o = n.get(s);
|
|
177
|
+
o && o.push(i);
|
|
178
|
+
}
|
|
179
|
+
const r = [];
|
|
180
|
+
for (const i of e.participants) {
|
|
181
|
+
const s = n.get(i.id) || [];
|
|
182
|
+
let o = 0;
|
|
183
|
+
const a = Math.min(r.length, s.length);
|
|
184
|
+
for (let c = 0; c < a && r[c] === s[c]; c++)
|
|
185
|
+
o++;
|
|
186
|
+
for (; r.length > o; )
|
|
187
|
+
this.add("end box"), r.pop();
|
|
188
|
+
for (let c = o; c < s.length; c++) {
|
|
189
|
+
const h = s[c], p = h.style?.backgroundColor ? ` ${h.style.backgroundColor}` : "", d = h.name ? ` "${h.name}"` : "";
|
|
190
|
+
this.add(`box${d}${p}`), r.push(h);
|
|
191
|
+
}
|
|
192
|
+
this.visitParticipant(i);
|
|
193
|
+
}
|
|
194
|
+
for (; r.length > 0; )
|
|
195
|
+
this.add("end box"), r.pop();
|
|
156
196
|
this.traverser.dispatchEvents(e.events), this.add("@enduml");
|
|
157
197
|
}
|
|
158
198
|
visitParticipant(e) {
|
|
@@ -160,16 +200,6 @@ class Xe {
|
|
|
160
200
|
}
|
|
161
201
|
visitParticipantGroup(e) {
|
|
162
202
|
}
|
|
163
|
-
// Internal method with context for group handling
|
|
164
|
-
visitGroup(e, n) {
|
|
165
|
-
const r = e.style?.backgroundColor ? ` ${e.style.backgroundColor}` : "", i = e.name ? ` "${e.name}"` : "";
|
|
166
|
-
this.add(`box${i}${r}`);
|
|
167
|
-
for (const s of e.participantIds) {
|
|
168
|
-
const o = n.get(s);
|
|
169
|
-
o && this.visitParticipant(o);
|
|
170
|
-
}
|
|
171
|
-
this.add("end box");
|
|
172
|
-
}
|
|
173
203
|
visitMessage(e) {
|
|
174
204
|
const n = e.from || "[*]", r = e.to || "[*]";
|
|
175
205
|
let i = "->";
|
|
@@ -182,8 +212,12 @@ class Xe {
|
|
|
182
212
|
}), this.add("end");
|
|
183
213
|
}
|
|
184
214
|
visitNote(e) {
|
|
185
|
-
const n = e.position || "over", r = e.participantIds.join(", ")
|
|
186
|
-
|
|
215
|
+
const n = e.position || "over", r = e.participantIds.join(", ");
|
|
216
|
+
let i = "";
|
|
217
|
+
e.participantIds.length > 0 ? n === "over" ? i = `note over ${r}` : i = `note ${n} of ${r}` : i = `note ${n}`, this.add(i), e.text.split(`
|
|
218
|
+
`).forEach((s) => {
|
|
219
|
+
this.add(` ${s}`);
|
|
220
|
+
}), this.add("end note");
|
|
187
221
|
}
|
|
188
222
|
visitActivation(e) {
|
|
189
223
|
this.add(`${e.action} ${e.participantId}`);
|
|
@@ -538,8 +572,8 @@ let Ct = class extends Qe {
|
|
|
538
572
|
e.groups.push(o);
|
|
539
573
|
const a = this.currentGroup;
|
|
540
574
|
this.currentGroup = o;
|
|
541
|
-
const
|
|
542
|
-
return this.currentGroup = a, this.isCurrentToken("END") && this.advance(),
|
|
575
|
+
const c = this.parseBlock(e, ["END"]);
|
|
576
|
+
return this.currentGroup = a, this.isCurrentToken("END") && this.advance(), c;
|
|
543
577
|
}
|
|
544
578
|
parseFragment(e) {
|
|
545
579
|
const n = this.getCurrentTokenType();
|
|
@@ -555,28 +589,28 @@ let Ct = class extends Qe {
|
|
|
555
589
|
events: a
|
|
556
590
|
}); this.isCurrentToken("AND"); ) {
|
|
557
591
|
this.advance();
|
|
558
|
-
const
|
|
592
|
+
const c = this.readRestOfLine(), h = this.parseBlock(e, ["END", "AND"]);
|
|
559
593
|
s.push({
|
|
560
594
|
id: this.generateId("br"),
|
|
561
|
-
condition:
|
|
595
|
+
condition: c,
|
|
562
596
|
events: h
|
|
563
597
|
});
|
|
564
598
|
}
|
|
565
599
|
for (; this.isCurrentToken("OPTION"); ) {
|
|
566
600
|
this.advance();
|
|
567
|
-
const
|
|
601
|
+
const c = this.readRestOfLine(), h = this.parseBlock(e, ["END", "OPTION"]);
|
|
568
602
|
s.push({
|
|
569
603
|
id: this.generateId("br"),
|
|
570
|
-
condition:
|
|
604
|
+
condition: c,
|
|
571
605
|
events: h
|
|
572
606
|
});
|
|
573
607
|
}
|
|
574
608
|
for (; this.isCurrentToken("ELSE"); ) {
|
|
575
609
|
this.advance();
|
|
576
|
-
const
|
|
610
|
+
const c = this.readRestOfLine(), h = this.parseBlock(e, ["END", "ELSE"]);
|
|
577
611
|
s.push({
|
|
578
612
|
id: this.generateId("br"),
|
|
579
|
-
condition:
|
|
613
|
+
condition: c,
|
|
580
614
|
events: h
|
|
581
615
|
});
|
|
582
616
|
}
|
|
@@ -643,14 +677,14 @@ let Ct = class extends Qe {
|
|
|
643
677
|
this.ensureParticipant(e, o), this.advance();
|
|
644
678
|
let a = "";
|
|
645
679
|
this.isCurrentToken("COLON") && (this.advance(), a = this.readRestOfLine());
|
|
646
|
-
const { type:
|
|
680
|
+
const { type: c, style: h } = this.resolveArrow(r);
|
|
647
681
|
return {
|
|
648
682
|
kind: "message",
|
|
649
683
|
id: this.generateId("evt"),
|
|
650
684
|
from: n,
|
|
651
685
|
to: o,
|
|
652
686
|
text: a,
|
|
653
|
-
type:
|
|
687
|
+
type: c,
|
|
654
688
|
style: h,
|
|
655
689
|
lifecycle: i || s ? { activateTarget: i, deactivateSource: s } : void 0
|
|
656
690
|
};
|
|
@@ -685,7 +719,7 @@ const Rt = {
|
|
|
685
719
|
return new Ct(e).parse();
|
|
686
720
|
}
|
|
687
721
|
};
|
|
688
|
-
class
|
|
722
|
+
class Lt extends qe {
|
|
689
723
|
nextToken() {
|
|
690
724
|
this.skipWhitespace();
|
|
691
725
|
const e = this.position, n = this.column;
|
|
@@ -801,7 +835,7 @@ class xt extends qe {
|
|
|
801
835
|
return n ? n[1] : "";
|
|
802
836
|
}
|
|
803
837
|
}
|
|
804
|
-
class
|
|
838
|
+
class xt extends Qe {
|
|
805
839
|
/**
|
|
806
840
|
* Type-safe token type checker.
|
|
807
841
|
* Helps TypeScript understand token type after advance() calls.
|
|
@@ -929,8 +963,8 @@ class Lt extends Qe {
|
|
|
929
963
|
this.advance();
|
|
930
964
|
continue;
|
|
931
965
|
}
|
|
932
|
-
const
|
|
933
|
-
|
|
966
|
+
const c = this.parseStatement(e);
|
|
967
|
+
c && o.push(c);
|
|
934
968
|
}
|
|
935
969
|
return {
|
|
936
970
|
kind: n,
|
|
@@ -1051,8 +1085,8 @@ class Lt extends Qe {
|
|
|
1051
1085
|
}
|
|
1052
1086
|
const Dt = {
|
|
1053
1087
|
parse: (t) => {
|
|
1054
|
-
const e = new
|
|
1055
|
-
return new
|
|
1088
|
+
const e = new Lt(t);
|
|
1089
|
+
return new xt(e).parse();
|
|
1056
1090
|
}
|
|
1057
1091
|
}, Ft = {
|
|
1058
1092
|
".puml": "plantuml",
|
|
@@ -1122,7 +1156,7 @@ const Dt = {
|
|
|
1122
1156
|
}, X = /* @__PURE__ */ new Map();
|
|
1123
1157
|
X.set("mermaid", Rt);
|
|
1124
1158
|
X.set("plantuml", Dt);
|
|
1125
|
-
const
|
|
1159
|
+
const Mt = {
|
|
1126
1160
|
register(t, e) {
|
|
1127
1161
|
X.set(t, e);
|
|
1128
1162
|
},
|
|
@@ -1163,7 +1197,7 @@ class ee {
|
|
|
1163
1197
|
};
|
|
1164
1198
|
}
|
|
1165
1199
|
}
|
|
1166
|
-
class
|
|
1200
|
+
class Ut extends ee {
|
|
1167
1201
|
visitFragment(e) {
|
|
1168
1202
|
const n = super.visitFragment(e);
|
|
1169
1203
|
if (n.length === 0) return [];
|
|
@@ -1380,7 +1414,7 @@ class ae {
|
|
|
1380
1414
|
const s = Kt.get(i);
|
|
1381
1415
|
s ? r = s.transform(r) : console.warn(`Unknown action: ${i.action}`);
|
|
1382
1416
|
}
|
|
1383
|
-
return r = new
|
|
1417
|
+
return r = new Ut().transform(r), r = new Gt().transform(r), r;
|
|
1384
1418
|
}
|
|
1385
1419
|
}
|
|
1386
1420
|
class Fo {
|
|
@@ -1392,7 +1426,7 @@ class Fo {
|
|
|
1392
1426
|
* @param format Input format ('mermaid' or 'plantuml')
|
|
1393
1427
|
*/
|
|
1394
1428
|
static init(e, n = "mermaid") {
|
|
1395
|
-
const i =
|
|
1429
|
+
const i = Mt.getParser(n).parse(e);
|
|
1396
1430
|
return new Yt(i, n);
|
|
1397
1431
|
}
|
|
1398
1432
|
}
|
|
@@ -1509,9 +1543,9 @@ class Yt {
|
|
|
1509
1543
|
return typeof e == "string" || e instanceof RegExp || typeof e == "object" && e !== null && "pattern" in e && !("kind" in e);
|
|
1510
1544
|
}
|
|
1511
1545
|
}
|
|
1512
|
-
const
|
|
1513
|
-
|
|
1514
|
-
|
|
1546
|
+
const x = /* @__PURE__ */ new Map();
|
|
1547
|
+
x.set("mermaid", () => new Ye());
|
|
1548
|
+
x.set("plantuml", () => new Xe());
|
|
1515
1549
|
const jo = {
|
|
1516
1550
|
/**
|
|
1517
1551
|
* Register a custom generator.
|
|
@@ -1519,7 +1553,7 @@ const jo = {
|
|
|
1519
1553
|
* @param factory - Factory function that creates a generator instance
|
|
1520
1554
|
*/
|
|
1521
1555
|
register(t, e) {
|
|
1522
|
-
|
|
1556
|
+
x.set(t, e);
|
|
1523
1557
|
},
|
|
1524
1558
|
/**
|
|
1525
1559
|
* Get a generator for the specified language.
|
|
@@ -1528,7 +1562,7 @@ const jo = {
|
|
|
1528
1562
|
* @throws Error if no generator is registered for the language
|
|
1529
1563
|
*/
|
|
1530
1564
|
getGenerator(t) {
|
|
1531
|
-
const e =
|
|
1565
|
+
const e = x.get(t);
|
|
1532
1566
|
if (!e)
|
|
1533
1567
|
throw new Error(`Generator for language '${t}' not found.`);
|
|
1534
1568
|
return e();
|
|
@@ -1537,27 +1571,27 @@ const jo = {
|
|
|
1537
1571
|
* Check if a generator is registered for the given language.
|
|
1538
1572
|
*/
|
|
1539
1573
|
hasGenerator(t) {
|
|
1540
|
-
return
|
|
1574
|
+
return x.has(t);
|
|
1541
1575
|
},
|
|
1542
1576
|
/**
|
|
1543
1577
|
* Get list of registered languages.
|
|
1544
1578
|
*/
|
|
1545
1579
|
getLanguages() {
|
|
1546
|
-
return Array.from(
|
|
1580
|
+
return Array.from(x.keys());
|
|
1547
1581
|
}
|
|
1548
1582
|
};
|
|
1549
|
-
function
|
|
1550
|
-
function r(a,
|
|
1583
|
+
function u(t, e, n) {
|
|
1584
|
+
function r(a, c) {
|
|
1551
1585
|
if (a._zod || Object.defineProperty(a, "_zod", {
|
|
1552
1586
|
value: {
|
|
1553
|
-
def:
|
|
1587
|
+
def: c,
|
|
1554
1588
|
constr: o,
|
|
1555
1589
|
traits: /* @__PURE__ */ new Set()
|
|
1556
1590
|
},
|
|
1557
1591
|
enumerable: !1
|
|
1558
1592
|
}), a._zod.traits.has(t))
|
|
1559
1593
|
return;
|
|
1560
|
-
a._zod.traits.add(t), e(a,
|
|
1594
|
+
a._zod.traits.add(t), e(a, c);
|
|
1561
1595
|
const h = o.prototype, p = Object.keys(h);
|
|
1562
1596
|
for (let d = 0; d < p.length; d++) {
|
|
1563
1597
|
const f = p[d];
|
|
@@ -1569,9 +1603,9 @@ function c(t, e, n) {
|
|
|
1569
1603
|
}
|
|
1570
1604
|
Object.defineProperty(s, "name", { value: t });
|
|
1571
1605
|
function o(a) {
|
|
1572
|
-
var
|
|
1606
|
+
var c;
|
|
1573
1607
|
const h = n?.Parent ? new s() : this;
|
|
1574
|
-
r(h, a), (
|
|
1608
|
+
r(h, a), (c = h._zod).deferred ?? (c.deferred = []);
|
|
1575
1609
|
for (const p of h._zod.deferred)
|
|
1576
1610
|
p();
|
|
1577
1611
|
return h;
|
|
@@ -1622,8 +1656,8 @@ function Xt(t, e) {
|
|
|
1622
1656
|
const n = (t.toString().split(".")[1] || "").length, r = e.toString();
|
|
1623
1657
|
let i = (r.split(".")[1] || "").length;
|
|
1624
1658
|
if (i === 0 && /\d?e-\d?/.test(r)) {
|
|
1625
|
-
const
|
|
1626
|
-
|
|
1659
|
+
const c = r.match(/\d?e-(\d?)/);
|
|
1660
|
+
c?.[1] && (i = Number.parseInt(c[1]));
|
|
1627
1661
|
}
|
|
1628
1662
|
const s = n > i ? n : i, o = Number.parseInt(t.toFixed(s).replace(".", "")), a = Number.parseInt(e.toFixed(s).replace(".", ""));
|
|
1629
1663
|
return o % a / 10 ** s;
|
|
@@ -1653,7 +1687,7 @@ function R(t, e, n) {
|
|
|
1653
1687
|
configurable: !0
|
|
1654
1688
|
});
|
|
1655
1689
|
}
|
|
1656
|
-
function
|
|
1690
|
+
function L(...t) {
|
|
1657
1691
|
const e = {};
|
|
1658
1692
|
for (const n of t) {
|
|
1659
1693
|
const r = Object.getOwnPropertyDescriptors(n);
|
|
@@ -1726,7 +1760,7 @@ const tn = {
|
|
|
1726
1760
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
1727
1761
|
};
|
|
1728
1762
|
function nn(t, e) {
|
|
1729
|
-
const n = t._zod.def, r =
|
|
1763
|
+
const n = t._zod.def, r = L(t._zod.def, {
|
|
1730
1764
|
get shape() {
|
|
1731
1765
|
const i = {};
|
|
1732
1766
|
for (const s in e) {
|
|
@@ -1741,7 +1775,7 @@ function nn(t, e) {
|
|
|
1741
1775
|
return P(t, r);
|
|
1742
1776
|
}
|
|
1743
1777
|
function rn(t, e) {
|
|
1744
|
-
const n = t._zod.def, r =
|
|
1778
|
+
const n = t._zod.def, r = L(t._zod.def, {
|
|
1745
1779
|
get shape() {
|
|
1746
1780
|
const i = { ...t._zod.def.shape };
|
|
1747
1781
|
for (const s in e) {
|
|
@@ -1761,7 +1795,7 @@ function sn(t, e) {
|
|
|
1761
1795
|
const n = t._zod.def.checks;
|
|
1762
1796
|
if (n && n.length > 0)
|
|
1763
1797
|
throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");
|
|
1764
|
-
const i =
|
|
1798
|
+
const i = L(t._zod.def, {
|
|
1765
1799
|
get shape() {
|
|
1766
1800
|
const s = { ...t._zod.def.shape, ...e };
|
|
1767
1801
|
return R(this, "shape", s), s;
|
|
@@ -1784,7 +1818,7 @@ function on(t, e) {
|
|
|
1784
1818
|
return P(t, n);
|
|
1785
1819
|
}
|
|
1786
1820
|
function an(t, e) {
|
|
1787
|
-
const n =
|
|
1821
|
+
const n = L(t._zod.def, {
|
|
1788
1822
|
get shape() {
|
|
1789
1823
|
const r = { ...t._zod.def.shape, ...e._zod.def.shape };
|
|
1790
1824
|
return R(this, "shape", r), r;
|
|
@@ -1798,7 +1832,7 @@ function an(t, e) {
|
|
|
1798
1832
|
return P(t, n);
|
|
1799
1833
|
}
|
|
1800
1834
|
function cn(t, e, n) {
|
|
1801
|
-
const r =
|
|
1835
|
+
const r = L(e._zod.def, {
|
|
1802
1836
|
get shape() {
|
|
1803
1837
|
const i = e._zod.def.shape, s = { ...i };
|
|
1804
1838
|
if (n)
|
|
@@ -1823,7 +1857,7 @@ function cn(t, e, n) {
|
|
|
1823
1857
|
return P(e, r);
|
|
1824
1858
|
}
|
|
1825
1859
|
function un(t, e, n) {
|
|
1826
|
-
const r =
|
|
1860
|
+
const r = L(e._zod.def, {
|
|
1827
1861
|
get shape() {
|
|
1828
1862
|
const i = e._zod.def.shape, s = { ...i };
|
|
1829
1863
|
if (n)
|
|
@@ -1895,7 +1929,7 @@ const st = (t, e) => {
|
|
|
1895
1929
|
value: () => t.message,
|
|
1896
1930
|
enumerable: !1
|
|
1897
1931
|
});
|
|
1898
|
-
}, ot =
|
|
1932
|
+
}, ot = u("$ZodError", st), at = u("$ZodError", st, { Parent: Error });
|
|
1899
1933
|
function hn(t, e = (n) => n.message) {
|
|
1900
1934
|
const n = {}, r = [];
|
|
1901
1935
|
for (const i of t.issues)
|
|
@@ -1916,8 +1950,8 @@ function pn(t, e = (n) => n.message) {
|
|
|
1916
1950
|
else {
|
|
1917
1951
|
let o = n, a = 0;
|
|
1918
1952
|
for (; a < s.path.length; ) {
|
|
1919
|
-
const
|
|
1920
|
-
a === s.path.length - 1 ? (o[
|
|
1953
|
+
const c = s.path[a];
|
|
1954
|
+
a === s.path.length - 1 ? (o[c] = o[c] || { _errors: [] }, o[c]._errors.push(e(s))) : o[c] = o[c] || { _errors: [] }, o = o[c], a++;
|
|
1921
1955
|
}
|
|
1922
1956
|
}
|
|
1923
1957
|
};
|
|
@@ -1928,7 +1962,7 @@ const ve = (t) => (e, n, r, i) => {
|
|
|
1928
1962
|
if (o instanceof Promise)
|
|
1929
1963
|
throw new F();
|
|
1930
1964
|
if (o.issues.length) {
|
|
1931
|
-
const a = new (i?.Err ?? t)(o.issues.map((
|
|
1965
|
+
const a = new (i?.Err ?? t)(o.issues.map((c) => C(c, s, Z())));
|
|
1932
1966
|
throw nt(a, i?.callee), a;
|
|
1933
1967
|
}
|
|
1934
1968
|
return o.value;
|
|
@@ -1936,7 +1970,7 @@ const ve = (t) => (e, n, r, i) => {
|
|
|
1936
1970
|
const s = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
1937
1971
|
let o = e._zod.run({ value: n, issues: [] }, s);
|
|
1938
1972
|
if (o instanceof Promise && (o = await o), o.issues.length) {
|
|
1939
|
-
const a = new (i?.Err ?? t)(o.issues.map((
|
|
1973
|
+
const a = new (i?.Err ?? t)(o.issues.map((c) => C(c, s, Z())));
|
|
1940
1974
|
throw nt(a, i?.callee), a;
|
|
1941
1975
|
}
|
|
1942
1976
|
return o.value;
|
|
@@ -1971,7 +2005,7 @@ const ve = (t) => (e, n, r, i) => {
|
|
|
1971
2005
|
function An() {
|
|
1972
2006
|
return new RegExp(Pn, "u");
|
|
1973
2007
|
}
|
|
1974
|
-
const Zn = /^(?:(?: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])$/, Cn = /^(([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}|:))$/, Rn = /^((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])$/,
|
|
2008
|
+
const Zn = /^(?:(?: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])$/, Cn = /^(([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}|:))$/, Rn = /^((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])$/, Ln = /^(([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])$/, xn = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, ct = /^[A-Za-z0-9_-]*$/, Dn = /^\+(?:[0-9]){6,14}[0-9]$/, ut = "(?:(?:\\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])))", Fn = /* @__PURE__ */ new RegExp(`^${ut}$`);
|
|
1975
2009
|
function ht(t) {
|
|
1976
2010
|
const e = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
1977
2011
|
return typeof t.precision == "number" ? t.precision === -1 ? `${e}` : t.precision === 0 ? `${e}:[0-5]\\d` : `${e}:[0-5]\\d\\.\\d{${t.precision}}` : `${e}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
@@ -1979,23 +2013,23 @@ function ht(t) {
|
|
|
1979
2013
|
function jn(t) {
|
|
1980
2014
|
return new RegExp(`^${ht(t)}$`);
|
|
1981
2015
|
}
|
|
1982
|
-
function
|
|
2016
|
+
function Mn(t) {
|
|
1983
2017
|
const e = ht({ precision: t.precision }), n = ["Z"];
|
|
1984
2018
|
t.local && n.push(""), t.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
1985
2019
|
const r = `${e}(?:${n.join("|")})`;
|
|
1986
2020
|
return new RegExp(`^${ut}T(?:${r})$`);
|
|
1987
2021
|
}
|
|
1988
|
-
const
|
|
2022
|
+
const Un = (t) => {
|
|
1989
2023
|
const e = t ? `[\\s\\S]{${t?.minimum ?? 0},${t?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
1990
2024
|
return new RegExp(`^${e}$`);
|
|
1991
|
-
}, Gn = /^-?\d+$/, Vn = /^-?\d+(?:\.\d+)?/, Bn = /^[^A-Z]*$/, Jn = /^[^a-z]*$/, b = /* @__PURE__ */
|
|
2025
|
+
}, Gn = /^-?\d+$/, Vn = /^-?\d+(?:\.\d+)?/, Bn = /^[^A-Z]*$/, Jn = /^[^a-z]*$/, b = /* @__PURE__ */ u("$ZodCheck", (t, e) => {
|
|
1992
2026
|
var n;
|
|
1993
2027
|
t._zod ?? (t._zod = {}), t._zod.def = e, (n = t._zod).onattach ?? (n.onattach = []);
|
|
1994
2028
|
}), pt = {
|
|
1995
2029
|
number: "number",
|
|
1996
2030
|
bigint: "bigint",
|
|
1997
2031
|
object: "date"
|
|
1998
|
-
}, lt = /* @__PURE__ */
|
|
2032
|
+
}, lt = /* @__PURE__ */ u("$ZodCheckLessThan", (t, e) => {
|
|
1999
2033
|
b.init(t, e);
|
|
2000
2034
|
const n = pt[typeof e.value];
|
|
2001
2035
|
t._zod.onattach.push((r) => {
|
|
@@ -2012,7 +2046,7 @@ const Mn = (t) => {
|
|
|
2012
2046
|
continue: !e.abort
|
|
2013
2047
|
});
|
|
2014
2048
|
};
|
|
2015
|
-
}), dt = /* @__PURE__ */
|
|
2049
|
+
}), dt = /* @__PURE__ */ u("$ZodCheckGreaterThan", (t, e) => {
|
|
2016
2050
|
b.init(t, e);
|
|
2017
2051
|
const n = pt[typeof e.value];
|
|
2018
2052
|
t._zod.onattach.push((r) => {
|
|
@@ -2029,7 +2063,7 @@ const Mn = (t) => {
|
|
|
2029
2063
|
continue: !e.abort
|
|
2030
2064
|
});
|
|
2031
2065
|
};
|
|
2032
|
-
}), Wn = /* @__PURE__ */
|
|
2066
|
+
}), Wn = /* @__PURE__ */ u("$ZodCheckMultipleOf", (t, e) => {
|
|
2033
2067
|
b.init(t, e), t._zod.onattach.push((n) => {
|
|
2034
2068
|
var r;
|
|
2035
2069
|
(r = n._zod.bag).multipleOf ?? (r.multipleOf = e.value);
|
|
@@ -2045,7 +2079,7 @@ const Mn = (t) => {
|
|
|
2045
2079
|
continue: !e.abort
|
|
2046
2080
|
});
|
|
2047
2081
|
};
|
|
2048
|
-
}), Kn = /* @__PURE__ */
|
|
2082
|
+
}), Kn = /* @__PURE__ */ u("$ZodCheckNumberFormat", (t, e) => {
|
|
2049
2083
|
b.init(t, e), e.format = e.format || "float64";
|
|
2050
2084
|
const n = e.format?.includes("int"), r = n ? "int" : "number", [i, s] = tn[e.format];
|
|
2051
2085
|
t._zod.onattach.push((o) => {
|
|
@@ -2102,7 +2136,7 @@ const Mn = (t) => {
|
|
|
2102
2136
|
inst: t
|
|
2103
2137
|
});
|
|
2104
2138
|
};
|
|
2105
|
-
}), Yn = /* @__PURE__ */
|
|
2139
|
+
}), Yn = /* @__PURE__ */ u("$ZodCheckMaxLength", (t, e) => {
|
|
2106
2140
|
var n;
|
|
2107
2141
|
b.init(t, e), (n = t._zod.def).when ?? (n.when = (r) => {
|
|
2108
2142
|
const i = r.value;
|
|
@@ -2125,7 +2159,7 @@ const Mn = (t) => {
|
|
|
2125
2159
|
continue: !e.abort
|
|
2126
2160
|
});
|
|
2127
2161
|
};
|
|
2128
|
-
}), Xn = /* @__PURE__ */
|
|
2162
|
+
}), Xn = /* @__PURE__ */ u("$ZodCheckMinLength", (t, e) => {
|
|
2129
2163
|
var n;
|
|
2130
2164
|
b.init(t, e), (n = t._zod.def).when ?? (n.when = (r) => {
|
|
2131
2165
|
const i = r.value;
|
|
@@ -2148,7 +2182,7 @@ const Mn = (t) => {
|
|
|
2148
2182
|
continue: !e.abort
|
|
2149
2183
|
});
|
|
2150
2184
|
};
|
|
2151
|
-
}), qn = /* @__PURE__ */
|
|
2185
|
+
}), qn = /* @__PURE__ */ u("$ZodCheckLengthEquals", (t, e) => {
|
|
2152
2186
|
var n;
|
|
2153
2187
|
b.init(t, e), (n = t._zod.def).when ?? (n.when = (r) => {
|
|
2154
2188
|
const i = r.value;
|
|
@@ -2171,7 +2205,7 @@ const Mn = (t) => {
|
|
|
2171
2205
|
continue: !e.abort
|
|
2172
2206
|
});
|
|
2173
2207
|
};
|
|
2174
|
-
}), ie = /* @__PURE__ */
|
|
2208
|
+
}), ie = /* @__PURE__ */ u("$ZodCheckStringFormat", (t, e) => {
|
|
2175
2209
|
var n, r;
|
|
2176
2210
|
b.init(t, e), t._zod.onattach.push((i) => {
|
|
2177
2211
|
const s = i._zod.bag;
|
|
@@ -2188,7 +2222,7 @@ const Mn = (t) => {
|
|
|
2188
2222
|
});
|
|
2189
2223
|
}) : (r = t._zod).check ?? (r.check = () => {
|
|
2190
2224
|
});
|
|
2191
|
-
}), Qn = /* @__PURE__ */
|
|
2225
|
+
}), Qn = /* @__PURE__ */ u("$ZodCheckRegex", (t, e) => {
|
|
2192
2226
|
ie.init(t, e), t._zod.check = (n) => {
|
|
2193
2227
|
e.pattern.lastIndex = 0, !e.pattern.test(n.value) && n.issues.push({
|
|
2194
2228
|
origin: "string",
|
|
@@ -2200,11 +2234,11 @@ const Mn = (t) => {
|
|
|
2200
2234
|
continue: !e.abort
|
|
2201
2235
|
});
|
|
2202
2236
|
};
|
|
2203
|
-
}), Hn = /* @__PURE__ */
|
|
2237
|
+
}), Hn = /* @__PURE__ */ u("$ZodCheckLowerCase", (t, e) => {
|
|
2204
2238
|
e.pattern ?? (e.pattern = Bn), ie.init(t, e);
|
|
2205
|
-
}), er = /* @__PURE__ */
|
|
2239
|
+
}), er = /* @__PURE__ */ u("$ZodCheckUpperCase", (t, e) => {
|
|
2206
2240
|
e.pattern ?? (e.pattern = Jn), ie.init(t, e);
|
|
2207
|
-
}), tr = /* @__PURE__ */
|
|
2241
|
+
}), tr = /* @__PURE__ */ u("$ZodCheckIncludes", (t, e) => {
|
|
2208
2242
|
b.init(t, e);
|
|
2209
2243
|
const n = j(e.includes), r = new RegExp(typeof e.position == "number" ? `^.{${e.position}}${n}` : n);
|
|
2210
2244
|
e.pattern = r, t._zod.onattach.push((i) => {
|
|
@@ -2221,7 +2255,7 @@ const Mn = (t) => {
|
|
|
2221
2255
|
continue: !e.abort
|
|
2222
2256
|
});
|
|
2223
2257
|
};
|
|
2224
|
-
}), nr = /* @__PURE__ */
|
|
2258
|
+
}), nr = /* @__PURE__ */ u("$ZodCheckStartsWith", (t, e) => {
|
|
2225
2259
|
b.init(t, e);
|
|
2226
2260
|
const n = new RegExp(`^${j(e.prefix)}.*`);
|
|
2227
2261
|
e.pattern ?? (e.pattern = n), t._zod.onattach.push((r) => {
|
|
@@ -2238,7 +2272,7 @@ const Mn = (t) => {
|
|
|
2238
2272
|
continue: !e.abort
|
|
2239
2273
|
});
|
|
2240
2274
|
};
|
|
2241
|
-
}), rr = /* @__PURE__ */
|
|
2275
|
+
}), rr = /* @__PURE__ */ u("$ZodCheckEndsWith", (t, e) => {
|
|
2242
2276
|
b.init(t, e);
|
|
2243
2277
|
const n = new RegExp(`.*${j(e.suffix)}$`);
|
|
2244
2278
|
e.pattern ?? (e.pattern = n), t._zod.onattach.push((r) => {
|
|
@@ -2255,7 +2289,7 @@ const Mn = (t) => {
|
|
|
2255
2289
|
continue: !e.abort
|
|
2256
2290
|
});
|
|
2257
2291
|
};
|
|
2258
|
-
}), ir = /* @__PURE__ */
|
|
2292
|
+
}), ir = /* @__PURE__ */ u("$ZodCheckOverwrite", (t, e) => {
|
|
2259
2293
|
b.init(t, e), t._zod.check = (n) => {
|
|
2260
2294
|
n.value = e.tx(n.value);
|
|
2261
2295
|
};
|
|
@@ -2287,7 +2321,7 @@ const or = {
|
|
|
2287
2321
|
major: 4,
|
|
2288
2322
|
minor: 2,
|
|
2289
2323
|
patch: 1
|
|
2290
|
-
}, k = /* @__PURE__ */
|
|
2324
|
+
}, k = /* @__PURE__ */ u("$ZodType", (t, e) => {
|
|
2291
2325
|
var n;
|
|
2292
2326
|
t ?? (t = {}), t._zod.def = e, t._zod.bag = t._zod.bag || {}, t._zod.version = or;
|
|
2293
2327
|
const r = [...t._zod.def.checks ?? []];
|
|
@@ -2300,7 +2334,7 @@ const or = {
|
|
|
2300
2334
|
t._zod.run = t._zod.parse;
|
|
2301
2335
|
});
|
|
2302
2336
|
else {
|
|
2303
|
-
const i = (o, a,
|
|
2337
|
+
const i = (o, a, c) => {
|
|
2304
2338
|
let h = D(o), p;
|
|
2305
2339
|
for (const d of a) {
|
|
2306
2340
|
if (d._zod.def.when) {
|
|
@@ -2309,7 +2343,7 @@ const or = {
|
|
|
2309
2343
|
} else if (h)
|
|
2310
2344
|
continue;
|
|
2311
2345
|
const f = o.issues.length, v = d._zod.check(o);
|
|
2312
|
-
if (v instanceof Promise &&
|
|
2346
|
+
if (v instanceof Promise && c?.async === !1)
|
|
2313
2347
|
throw new F();
|
|
2314
2348
|
if (p || v instanceof Promise)
|
|
2315
2349
|
p = (p ?? Promise.resolve()).then(async () => {
|
|
@@ -2322,16 +2356,16 @@ const or = {
|
|
|
2322
2356
|
}
|
|
2323
2357
|
}
|
|
2324
2358
|
return p ? p.then(() => o) : o;
|
|
2325
|
-
}, s = (o, a,
|
|
2359
|
+
}, s = (o, a, c) => {
|
|
2326
2360
|
if (D(o))
|
|
2327
2361
|
return o.aborted = !0, o;
|
|
2328
|
-
const h = i(a, r,
|
|
2362
|
+
const h = i(a, r, c);
|
|
2329
2363
|
if (h instanceof Promise) {
|
|
2330
|
-
if (
|
|
2364
|
+
if (c.async === !1)
|
|
2331
2365
|
throw new F();
|
|
2332
|
-
return h.then((p) => t._zod.parse(p,
|
|
2366
|
+
return h.then((p) => t._zod.parse(p, c));
|
|
2333
2367
|
}
|
|
2334
|
-
return t._zod.parse(h,
|
|
2368
|
+
return t._zod.parse(h, c);
|
|
2335
2369
|
};
|
|
2336
2370
|
t._zod.run = (o, a) => {
|
|
2337
2371
|
if (a.skipChecks)
|
|
@@ -2340,13 +2374,13 @@ const or = {
|
|
|
2340
2374
|
const h = t._zod.parse({ value: o.value, issues: [] }, { ...a, skipChecks: !0 });
|
|
2341
2375
|
return h instanceof Promise ? h.then((p) => s(p, o, a)) : s(h, o, a);
|
|
2342
2376
|
}
|
|
2343
|
-
const
|
|
2344
|
-
if (
|
|
2377
|
+
const c = t._zod.parse(o, a);
|
|
2378
|
+
if (c instanceof Promise) {
|
|
2345
2379
|
if (a.async === !1)
|
|
2346
2380
|
throw new F();
|
|
2347
|
-
return
|
|
2381
|
+
return c.then((h) => i(h, r, a));
|
|
2348
2382
|
}
|
|
2349
|
-
return i(
|
|
2383
|
+
return i(c, r, a);
|
|
2350
2384
|
};
|
|
2351
2385
|
}
|
|
2352
2386
|
t["~standard"] = {
|
|
@@ -2361,8 +2395,8 @@ const or = {
|
|
|
2361
2395
|
vendor: "zod",
|
|
2362
2396
|
version: 1
|
|
2363
2397
|
};
|
|
2364
|
-
}), ke = /* @__PURE__ */
|
|
2365
|
-
k.init(t, e), t._zod.pattern = [...t?._zod.bag?.patterns ?? []].pop() ??
|
|
2398
|
+
}), ke = /* @__PURE__ */ u("$ZodString", (t, e) => {
|
|
2399
|
+
k.init(t, e), t._zod.pattern = [...t?._zod.bag?.patterns ?? []].pop() ?? Un(t._zod.bag), t._zod.parse = (n, r) => {
|
|
2366
2400
|
if (e.coerce)
|
|
2367
2401
|
try {
|
|
2368
2402
|
n.value = String(n.value);
|
|
@@ -2375,11 +2409,11 @@ const or = {
|
|
|
2375
2409
|
inst: t
|
|
2376
2410
|
}), n;
|
|
2377
2411
|
};
|
|
2378
|
-
}), g = /* @__PURE__ */
|
|
2412
|
+
}), g = /* @__PURE__ */ u("$ZodStringFormat", (t, e) => {
|
|
2379
2413
|
ie.init(t, e), ke.init(t, e);
|
|
2380
|
-
}), ar = /* @__PURE__ */
|
|
2414
|
+
}), ar = /* @__PURE__ */ u("$ZodGUID", (t, e) => {
|
|
2381
2415
|
e.pattern ?? (e.pattern = Sn), g.init(t, e);
|
|
2382
|
-
}), cr = /* @__PURE__ */
|
|
2416
|
+
}), cr = /* @__PURE__ */ u("$ZodUUID", (t, e) => {
|
|
2383
2417
|
if (e.version) {
|
|
2384
2418
|
const r = {
|
|
2385
2419
|
v1: 1,
|
|
@@ -2397,9 +2431,9 @@ const or = {
|
|
|
2397
2431
|
} else
|
|
2398
2432
|
e.pattern ?? (e.pattern = Ie());
|
|
2399
2433
|
g.init(t, e);
|
|
2400
|
-
}), ur = /* @__PURE__ */
|
|
2434
|
+
}), ur = /* @__PURE__ */ u("$ZodEmail", (t, e) => {
|
|
2401
2435
|
e.pattern ?? (e.pattern = Nn), g.init(t, e);
|
|
2402
|
-
}), hr = /* @__PURE__ */
|
|
2436
|
+
}), hr = /* @__PURE__ */ u("$ZodURL", (t, e) => {
|
|
2403
2437
|
g.init(t, e), t._zod.check = (n) => {
|
|
2404
2438
|
try {
|
|
2405
2439
|
const r = n.value.trim(), i = new URL(r);
|
|
@@ -2431,31 +2465,31 @@ const or = {
|
|
|
2431
2465
|
});
|
|
2432
2466
|
}
|
|
2433
2467
|
};
|
|
2434
|
-
}), pr = /* @__PURE__ */
|
|
2468
|
+
}), pr = /* @__PURE__ */ u("$ZodEmoji", (t, e) => {
|
|
2435
2469
|
e.pattern ?? (e.pattern = An()), g.init(t, e);
|
|
2436
|
-
}), lr = /* @__PURE__ */
|
|
2470
|
+
}), lr = /* @__PURE__ */ u("$ZodNanoID", (t, e) => {
|
|
2437
2471
|
e.pattern ?? (e.pattern = $n), g.init(t, e);
|
|
2438
|
-
}), dr = /* @__PURE__ */
|
|
2472
|
+
}), dr = /* @__PURE__ */ u("$ZodCUID", (t, e) => {
|
|
2439
2473
|
e.pattern ?? (e.pattern = wn), g.init(t, e);
|
|
2440
|
-
}), fr = /* @__PURE__ */
|
|
2474
|
+
}), fr = /* @__PURE__ */ u("$ZodCUID2", (t, e) => {
|
|
2441
2475
|
e.pattern ?? (e.pattern = bn), g.init(t, e);
|
|
2442
|
-
}), mr = /* @__PURE__ */
|
|
2476
|
+
}), mr = /* @__PURE__ */ u("$ZodULID", (t, e) => {
|
|
2443
2477
|
e.pattern ?? (e.pattern = En), g.init(t, e);
|
|
2444
|
-
}), gr = /* @__PURE__ */
|
|
2478
|
+
}), gr = /* @__PURE__ */ u("$ZodXID", (t, e) => {
|
|
2445
2479
|
e.pattern ?? (e.pattern = zn), g.init(t, e);
|
|
2446
|
-
}), vr = /* @__PURE__ */
|
|
2480
|
+
}), vr = /* @__PURE__ */ u("$ZodKSUID", (t, e) => {
|
|
2447
2481
|
e.pattern ?? (e.pattern = In), g.init(t, e);
|
|
2448
|
-
}), _r = /* @__PURE__ */
|
|
2449
|
-
e.pattern ?? (e.pattern =
|
|
2450
|
-
}), kr = /* @__PURE__ */
|
|
2482
|
+
}), _r = /* @__PURE__ */ u("$ZodISODateTime", (t, e) => {
|
|
2483
|
+
e.pattern ?? (e.pattern = Mn(e)), g.init(t, e);
|
|
2484
|
+
}), kr = /* @__PURE__ */ u("$ZodISODate", (t, e) => {
|
|
2451
2485
|
e.pattern ?? (e.pattern = Fn), g.init(t, e);
|
|
2452
|
-
}), yr = /* @__PURE__ */
|
|
2486
|
+
}), yr = /* @__PURE__ */ u("$ZodISOTime", (t, e) => {
|
|
2453
2487
|
e.pattern ?? (e.pattern = jn(e)), g.init(t, e);
|
|
2454
|
-
}), Tr = /* @__PURE__ */
|
|
2488
|
+
}), Tr = /* @__PURE__ */ u("$ZodISODuration", (t, e) => {
|
|
2455
2489
|
e.pattern ?? (e.pattern = On), g.init(t, e);
|
|
2456
|
-
}), wr = /* @__PURE__ */
|
|
2490
|
+
}), wr = /* @__PURE__ */ u("$ZodIPv4", (t, e) => {
|
|
2457
2491
|
e.pattern ?? (e.pattern = Zn), g.init(t, e), t._zod.bag.format = "ipv4";
|
|
2458
|
-
}), br = /* @__PURE__ */
|
|
2492
|
+
}), br = /* @__PURE__ */ u("$ZodIPv6", (t, e) => {
|
|
2459
2493
|
e.pattern ?? (e.pattern = Cn), g.init(t, e), t._zod.bag.format = "ipv6", t._zod.check = (n) => {
|
|
2460
2494
|
try {
|
|
2461
2495
|
new URL(`http://[${n.value}]`);
|
|
@@ -2469,10 +2503,10 @@ const or = {
|
|
|
2469
2503
|
});
|
|
2470
2504
|
}
|
|
2471
2505
|
};
|
|
2472
|
-
}), Er = /* @__PURE__ */
|
|
2506
|
+
}), Er = /* @__PURE__ */ u("$ZodCIDRv4", (t, e) => {
|
|
2473
2507
|
e.pattern ?? (e.pattern = Rn), g.init(t, e);
|
|
2474
|
-
}), zr = /* @__PURE__ */
|
|
2475
|
-
e.pattern ?? (e.pattern =
|
|
2508
|
+
}), zr = /* @__PURE__ */ u("$ZodCIDRv6", (t, e) => {
|
|
2509
|
+
e.pattern ?? (e.pattern = Ln), g.init(t, e), t._zod.check = (n) => {
|
|
2476
2510
|
const r = n.value.split("/");
|
|
2477
2511
|
try {
|
|
2478
2512
|
if (r.length !== 2)
|
|
@@ -2508,8 +2542,8 @@ function ft(t) {
|
|
|
2508
2542
|
return !1;
|
|
2509
2543
|
}
|
|
2510
2544
|
}
|
|
2511
|
-
const Ir = /* @__PURE__ */
|
|
2512
|
-
e.pattern ?? (e.pattern =
|
|
2545
|
+
const Ir = /* @__PURE__ */ u("$ZodBase64", (t, e) => {
|
|
2546
|
+
e.pattern ?? (e.pattern = xn), g.init(t, e), t._zod.bag.contentEncoding = "base64", t._zod.check = (n) => {
|
|
2513
2547
|
ft(n.value) || n.issues.push({
|
|
2514
2548
|
code: "invalid_format",
|
|
2515
2549
|
format: "base64",
|
|
@@ -2525,7 +2559,7 @@ function $r(t) {
|
|
|
2525
2559
|
const e = t.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = e.padEnd(Math.ceil(e.length / 4) * 4, "=");
|
|
2526
2560
|
return ft(n);
|
|
2527
2561
|
}
|
|
2528
|
-
const Or = /* @__PURE__ */
|
|
2562
|
+
const Or = /* @__PURE__ */ u("$ZodBase64URL", (t, e) => {
|
|
2529
2563
|
e.pattern ?? (e.pattern = ct), g.init(t, e), t._zod.bag.contentEncoding = "base64url", t._zod.check = (n) => {
|
|
2530
2564
|
$r(n.value) || n.issues.push({
|
|
2531
2565
|
code: "invalid_format",
|
|
@@ -2535,7 +2569,7 @@ const Or = /* @__PURE__ */ c("$ZodBase64URL", (t, e) => {
|
|
|
2535
2569
|
continue: !e.abort
|
|
2536
2570
|
});
|
|
2537
2571
|
};
|
|
2538
|
-
}), Sr = /* @__PURE__ */
|
|
2572
|
+
}), Sr = /* @__PURE__ */ u("$ZodE164", (t, e) => {
|
|
2539
2573
|
e.pattern ?? (e.pattern = Dn), g.init(t, e);
|
|
2540
2574
|
});
|
|
2541
2575
|
function Nr(t, e = null) {
|
|
@@ -2552,7 +2586,7 @@ function Nr(t, e = null) {
|
|
|
2552
2586
|
return !1;
|
|
2553
2587
|
}
|
|
2554
2588
|
}
|
|
2555
|
-
const Pr = /* @__PURE__ */
|
|
2589
|
+
const Pr = /* @__PURE__ */ u("$ZodJWT", (t, e) => {
|
|
2556
2590
|
g.init(t, e), t._zod.check = (n) => {
|
|
2557
2591
|
Nr(n.value, e.alg) || n.issues.push({
|
|
2558
2592
|
code: "invalid_format",
|
|
@@ -2562,7 +2596,7 @@ const Pr = /* @__PURE__ */ c("$ZodJWT", (t, e) => {
|
|
|
2562
2596
|
continue: !e.abort
|
|
2563
2597
|
});
|
|
2564
2598
|
};
|
|
2565
|
-
}), mt = /* @__PURE__ */
|
|
2599
|
+
}), mt = /* @__PURE__ */ u("$ZodNumber", (t, e) => {
|
|
2566
2600
|
k.init(t, e), t._zod.pattern = t._zod.bag.pattern ?? Vn, t._zod.parse = (n, r) => {
|
|
2567
2601
|
if (e.coerce)
|
|
2568
2602
|
try {
|
|
@@ -2581,11 +2615,11 @@ const Pr = /* @__PURE__ */ c("$ZodJWT", (t, e) => {
|
|
|
2581
2615
|
...s ? { received: s } : {}
|
|
2582
2616
|
}), n;
|
|
2583
2617
|
};
|
|
2584
|
-
}), Ar = /* @__PURE__ */
|
|
2618
|
+
}), Ar = /* @__PURE__ */ u("$ZodNumberFormat", (t, e) => {
|
|
2585
2619
|
Kn.init(t, e), mt.init(t, e);
|
|
2586
|
-
}), Zr = /* @__PURE__ */
|
|
2620
|
+
}), Zr = /* @__PURE__ */ u("$ZodUnknown", (t, e) => {
|
|
2587
2621
|
k.init(t, e), t._zod.parse = (n) => n;
|
|
2588
|
-
}), Cr = /* @__PURE__ */
|
|
2622
|
+
}), Cr = /* @__PURE__ */ u("$ZodNever", (t, e) => {
|
|
2589
2623
|
k.init(t, e), t._zod.parse = (n, r) => (n.issues.push({
|
|
2590
2624
|
expected: "never",
|
|
2591
2625
|
code: "invalid_type",
|
|
@@ -2596,7 +2630,7 @@ const Pr = /* @__PURE__ */ c("$ZodJWT", (t, e) => {
|
|
|
2596
2630
|
function $e(t, e, n) {
|
|
2597
2631
|
t.issues.length && e.issues.push(...it(n, t.issues)), e.value[n] = t.value;
|
|
2598
2632
|
}
|
|
2599
|
-
const Rr = /* @__PURE__ */
|
|
2633
|
+
const Rr = /* @__PURE__ */ u("$ZodArray", (t, e) => {
|
|
2600
2634
|
k.init(t, e), t._zod.parse = (n, r) => {
|
|
2601
2635
|
const i = n.value;
|
|
2602
2636
|
if (!Array.isArray(i))
|
|
@@ -2609,11 +2643,11 @@ const Rr = /* @__PURE__ */ c("$ZodArray", (t, e) => {
|
|
|
2609
2643
|
n.value = Array(i.length);
|
|
2610
2644
|
const s = [];
|
|
2611
2645
|
for (let o = 0; o < i.length; o++) {
|
|
2612
|
-
const a = i[o],
|
|
2646
|
+
const a = i[o], c = e.element._zod.run({
|
|
2613
2647
|
value: a,
|
|
2614
2648
|
issues: []
|
|
2615
2649
|
}, r);
|
|
2616
|
-
|
|
2650
|
+
c instanceof Promise ? s.push(c.then((h) => $e(h, n, o))) : $e(c, n, o);
|
|
2617
2651
|
}
|
|
2618
2652
|
return s.length ? Promise.all(s).then(() => n) : n;
|
|
2619
2653
|
};
|
|
@@ -2636,7 +2670,7 @@ function gt(t) {
|
|
|
2636
2670
|
};
|
|
2637
2671
|
}
|
|
2638
2672
|
function vt(t, e, n, r, i, s) {
|
|
2639
|
-
const o = [], a = i.keySet,
|
|
2673
|
+
const o = [], a = i.keySet, c = i.catchall._zod, h = c.def.type;
|
|
2640
2674
|
for (const p in e) {
|
|
2641
2675
|
if (a.has(p))
|
|
2642
2676
|
continue;
|
|
@@ -2644,7 +2678,7 @@ function vt(t, e, n, r, i, s) {
|
|
|
2644
2678
|
o.push(p);
|
|
2645
2679
|
continue;
|
|
2646
2680
|
}
|
|
2647
|
-
const d =
|
|
2681
|
+
const d = c.run({ value: e[p], issues: [] }, r);
|
|
2648
2682
|
d instanceof Promise ? t.push(d.then((f) => q(f, n, p, e))) : q(d, n, p, e);
|
|
2649
2683
|
}
|
|
2650
2684
|
return o.length && n.issues.push({
|
|
@@ -2654,34 +2688,34 @@ function vt(t, e, n, r, i, s) {
|
|
|
2654
2688
|
inst: s
|
|
2655
2689
|
}), t.length ? Promise.all(t).then(() => n) : n;
|
|
2656
2690
|
}
|
|
2657
|
-
const
|
|
2691
|
+
const Lr = /* @__PURE__ */ u("$ZodObject", (t, e) => {
|
|
2658
2692
|
if (k.init(t, e), !Object.getOwnPropertyDescriptor(e, "shape")?.get) {
|
|
2659
2693
|
const a = e.shape;
|
|
2660
2694
|
Object.defineProperty(e, "shape", {
|
|
2661
2695
|
get: () => {
|
|
2662
|
-
const
|
|
2696
|
+
const c = { ...a };
|
|
2663
2697
|
return Object.defineProperty(e, "shape", {
|
|
2664
|
-
value:
|
|
2665
|
-
}),
|
|
2698
|
+
value: c
|
|
2699
|
+
}), c;
|
|
2666
2700
|
}
|
|
2667
2701
|
});
|
|
2668
2702
|
}
|
|
2669
2703
|
const r = te(() => gt(e));
|
|
2670
2704
|
m(t._zod, "propValues", () => {
|
|
2671
|
-
const a = e.shape,
|
|
2705
|
+
const a = e.shape, c = {};
|
|
2672
2706
|
for (const h in a) {
|
|
2673
2707
|
const p = a[h]._zod;
|
|
2674
2708
|
if (p.values) {
|
|
2675
|
-
|
|
2709
|
+
c[h] ?? (c[h] = /* @__PURE__ */ new Set());
|
|
2676
2710
|
for (const d of p.values)
|
|
2677
|
-
|
|
2711
|
+
c[h].add(d);
|
|
2678
2712
|
}
|
|
2679
2713
|
}
|
|
2680
|
-
return
|
|
2714
|
+
return c;
|
|
2681
2715
|
});
|
|
2682
2716
|
const i = V, s = e.catchall;
|
|
2683
2717
|
let o;
|
|
2684
|
-
t._zod.parse = (a,
|
|
2718
|
+
t._zod.parse = (a, c) => {
|
|
2685
2719
|
o ?? (o = r.value);
|
|
2686
2720
|
const h = a.value;
|
|
2687
2721
|
if (!i(h))
|
|
@@ -2694,13 +2728,13 @@ const xr = /* @__PURE__ */ c("$ZodObject", (t, e) => {
|
|
|
2694
2728
|
a.value = {};
|
|
2695
2729
|
const p = [], d = o.shape;
|
|
2696
2730
|
for (const f of o.keys) {
|
|
2697
|
-
const E = d[f]._zod.run({ value: h[f], issues: [] },
|
|
2731
|
+
const E = d[f]._zod.run({ value: h[f], issues: [] }, c);
|
|
2698
2732
|
E instanceof Promise ? p.push(E.then((oe) => q(oe, a, f, h))) : q(E, a, f, h);
|
|
2699
2733
|
}
|
|
2700
|
-
return s ? vt(p, h, a,
|
|
2734
|
+
return s ? vt(p, h, a, c, r.value, t) : p.length ? Promise.all(p).then(() => a) : a;
|
|
2701
2735
|
};
|
|
2702
|
-
}),
|
|
2703
|
-
|
|
2736
|
+
}), xr = /* @__PURE__ */ u("$ZodObjectJIT", (t, e) => {
|
|
2737
|
+
Lr.init(t, e);
|
|
2704
2738
|
const n = t._zod.parse, r = te(() => gt(e)), i = (f) => {
|
|
2705
2739
|
const v = new sr(["shape", "payload", "ctx"]), E = r.value, oe = (O) => {
|
|
2706
2740
|
const I = ze(O);
|
|
@@ -2713,22 +2747,22 @@ const xr = /* @__PURE__ */ c("$ZodObject", (t, e) => {
|
|
|
2713
2747
|
we[O] = `key_${St++}`;
|
|
2714
2748
|
v.write("const newResult = {};");
|
|
2715
2749
|
for (const O of E.keys) {
|
|
2716
|
-
const I = we[O],
|
|
2750
|
+
const I = we[O], U = ze(O);
|
|
2717
2751
|
v.write(`const ${I} = ${oe(O)};`), v.write(`
|
|
2718
2752
|
if (${I}.issues.length) {
|
|
2719
2753
|
payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
|
|
2720
2754
|
...iss,
|
|
2721
|
-
path: iss.path ? [${
|
|
2755
|
+
path: iss.path ? [${U}, ...iss.path] : [${U}]
|
|
2722
2756
|
})));
|
|
2723
2757
|
}
|
|
2724
2758
|
|
|
2725
2759
|
|
|
2726
2760
|
if (${I}.value === undefined) {
|
|
2727
|
-
if (${
|
|
2728
|
-
newResult[${
|
|
2761
|
+
if (${U} in input) {
|
|
2762
|
+
newResult[${U}] = undefined;
|
|
2729
2763
|
}
|
|
2730
2764
|
} else {
|
|
2731
|
-
newResult[${
|
|
2765
|
+
newResult[${U}] = ${I}.value;
|
|
2732
2766
|
}
|
|
2733
2767
|
|
|
2734
2768
|
`);
|
|
@@ -2763,7 +2797,7 @@ function Oe(t, e, n, r) {
|
|
|
2763
2797
|
errors: t.map((s) => s.issues.map((o) => C(o, r, Z())))
|
|
2764
2798
|
}), e);
|
|
2765
2799
|
}
|
|
2766
|
-
const _t = /* @__PURE__ */
|
|
2800
|
+
const _t = /* @__PURE__ */ u("$ZodUnion", (t, e) => {
|
|
2767
2801
|
k.init(t, e), m(t._zod, "optin", () => e.options.some((i) => i._zod.optin === "optional") ? "optional" : void 0), m(t._zod, "optout", () => e.options.some((i) => i._zod.optout === "optional") ? "optional" : void 0), m(t._zod, "values", () => {
|
|
2768
2802
|
if (e.options.every((i) => i._zod.values))
|
|
2769
2803
|
return new Set(e.options.flatMap((i) => Array.from(i._zod.values)));
|
|
@@ -2779,8 +2813,8 @@ const _t = /* @__PURE__ */ c("$ZodUnion", (t, e) => {
|
|
|
2779
2813
|
return r(i, s);
|
|
2780
2814
|
let o = !1;
|
|
2781
2815
|
const a = [];
|
|
2782
|
-
for (const
|
|
2783
|
-
const h =
|
|
2816
|
+
for (const c of e.options) {
|
|
2817
|
+
const h = c._zod.run({
|
|
2784
2818
|
value: i.value,
|
|
2785
2819
|
issues: []
|
|
2786
2820
|
}, s);
|
|
@@ -2792,9 +2826,9 @@ const _t = /* @__PURE__ */ c("$ZodUnion", (t, e) => {
|
|
|
2792
2826
|
a.push(h);
|
|
2793
2827
|
}
|
|
2794
2828
|
}
|
|
2795
|
-
return o ? Promise.all(a).then((
|
|
2829
|
+
return o ? Promise.all(a).then((c) => Oe(c, i, t, s)) : Oe(a, i, t, s);
|
|
2796
2830
|
};
|
|
2797
|
-
}), Dr = /* @__PURE__ */
|
|
2831
|
+
}), Dr = /* @__PURE__ */ u("$ZodDiscriminatedUnion", (t, e) => {
|
|
2798
2832
|
e.inclusive = !1, _t.init(t, e);
|
|
2799
2833
|
const n = t._zod.parse;
|
|
2800
2834
|
m(t._zod, "propValues", () => {
|
|
@@ -2803,9 +2837,9 @@ const _t = /* @__PURE__ */ c("$ZodUnion", (t, e) => {
|
|
|
2803
2837
|
const o = s._zod.propValues;
|
|
2804
2838
|
if (!o || Object.keys(o).length === 0)
|
|
2805
2839
|
throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);
|
|
2806
|
-
for (const [a,
|
|
2840
|
+
for (const [a, c] of Object.entries(o)) {
|
|
2807
2841
|
i[a] || (i[a] = /* @__PURE__ */ new Set());
|
|
2808
|
-
for (const h of
|
|
2842
|
+
for (const h of c)
|
|
2809
2843
|
i[a].add(h);
|
|
2810
2844
|
}
|
|
2811
2845
|
}
|
|
@@ -2817,10 +2851,10 @@ const _t = /* @__PURE__ */ c("$ZodUnion", (t, e) => {
|
|
|
2817
2851
|
const a = o._zod.propValues?.[e.discriminator];
|
|
2818
2852
|
if (!a || a.size === 0)
|
|
2819
2853
|
throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);
|
|
2820
|
-
for (const
|
|
2821
|
-
if (s.has(
|
|
2822
|
-
throw new Error(`Duplicate discriminator value "${String(
|
|
2823
|
-
s.set(
|
|
2854
|
+
for (const c of a) {
|
|
2855
|
+
if (s.has(c))
|
|
2856
|
+
throw new Error(`Duplicate discriminator value "${String(c)}"`);
|
|
2857
|
+
s.set(c, o);
|
|
2824
2858
|
}
|
|
2825
2859
|
}
|
|
2826
2860
|
return s;
|
|
@@ -2845,10 +2879,10 @@ const _t = /* @__PURE__ */ c("$ZodUnion", (t, e) => {
|
|
|
2845
2879
|
inst: t
|
|
2846
2880
|
}), i);
|
|
2847
2881
|
};
|
|
2848
|
-
}), Fr = /* @__PURE__ */
|
|
2882
|
+
}), Fr = /* @__PURE__ */ u("$ZodIntersection", (t, e) => {
|
|
2849
2883
|
k.init(t, e), t._zod.parse = (n, r) => {
|
|
2850
2884
|
const i = n.value, s = e.left._zod.run({ value: i, issues: [] }, r), o = e.right._zod.run({ value: i, issues: [] }, r);
|
|
2851
|
-
return s instanceof Promise || o instanceof Promise ? Promise.all([s, o]).then(([
|
|
2885
|
+
return s instanceof Promise || o instanceof Promise ? Promise.all([s, o]).then(([c, h]) => Se(n, c, h)) : Se(n, s, o);
|
|
2852
2886
|
};
|
|
2853
2887
|
});
|
|
2854
2888
|
function pe(t, e) {
|
|
@@ -2894,7 +2928,7 @@ function Se(t, e, n) {
|
|
|
2894
2928
|
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
|
|
2895
2929
|
return t.value = r.data, t;
|
|
2896
2930
|
}
|
|
2897
|
-
const jr = /* @__PURE__ */
|
|
2931
|
+
const jr = /* @__PURE__ */ u("$ZodEnum", (t, e) => {
|
|
2898
2932
|
k.init(t, e);
|
|
2899
2933
|
const n = tt(e.entries), r = new Set(n);
|
|
2900
2934
|
t._zod.values = r, t._zod.pattern = new RegExp(`^(${n.filter((i) => Ht.has(typeof i)).map((i) => typeof i == "string" ? j(i) : i.toString()).join("|")})$`), t._zod.parse = (i, s) => {
|
|
@@ -2906,7 +2940,7 @@ const jr = /* @__PURE__ */ c("$ZodEnum", (t, e) => {
|
|
|
2906
2940
|
inst: t
|
|
2907
2941
|
}), i;
|
|
2908
2942
|
};
|
|
2909
|
-
}),
|
|
2943
|
+
}), Mr = /* @__PURE__ */ u("$ZodLiteral", (t, e) => {
|
|
2910
2944
|
if (k.init(t, e), e.values.length === 0)
|
|
2911
2945
|
throw new Error("Cannot create literal schema with no valid values");
|
|
2912
2946
|
const n = new Set(e.values);
|
|
@@ -2919,7 +2953,7 @@ const jr = /* @__PURE__ */ c("$ZodEnum", (t, e) => {
|
|
|
2919
2953
|
inst: t
|
|
2920
2954
|
}), r;
|
|
2921
2955
|
};
|
|
2922
|
-
}),
|
|
2956
|
+
}), Ur = /* @__PURE__ */ u("$ZodTransform", (t, e) => {
|
|
2923
2957
|
k.init(t, e), t._zod.parse = (n, r) => {
|
|
2924
2958
|
if (r.direction === "backward")
|
|
2925
2959
|
throw new He(t.constructor.name);
|
|
@@ -2934,7 +2968,7 @@ const jr = /* @__PURE__ */ c("$ZodEnum", (t, e) => {
|
|
|
2934
2968
|
function Ne(t, e) {
|
|
2935
2969
|
return t.issues.length && e === void 0 ? { issues: [], value: void 0 } : t;
|
|
2936
2970
|
}
|
|
2937
|
-
const Gr = /* @__PURE__ */
|
|
2971
|
+
const Gr = /* @__PURE__ */ u("$ZodOptional", (t, e) => {
|
|
2938
2972
|
k.init(t, e), t._zod.optin = "optional", t._zod.optout = "optional", m(t._zod, "values", () => e.innerType._zod.values ? /* @__PURE__ */ new Set([...e.innerType._zod.values, void 0]) : void 0), m(t._zod, "pattern", () => {
|
|
2939
2973
|
const n = e.innerType._zod.pattern;
|
|
2940
2974
|
return n ? new RegExp(`^(${me(n.source)})?$`) : void 0;
|
|
@@ -2945,12 +2979,12 @@ const Gr = /* @__PURE__ */ c("$ZodOptional", (t, e) => {
|
|
|
2945
2979
|
}
|
|
2946
2980
|
return n.value === void 0 ? n : e.innerType._zod.run(n, r);
|
|
2947
2981
|
};
|
|
2948
|
-
}), Vr = /* @__PURE__ */
|
|
2982
|
+
}), Vr = /* @__PURE__ */ u("$ZodNullable", (t, e) => {
|
|
2949
2983
|
k.init(t, e), m(t._zod, "optin", () => e.innerType._zod.optin), m(t._zod, "optout", () => e.innerType._zod.optout), m(t._zod, "pattern", () => {
|
|
2950
2984
|
const n = e.innerType._zod.pattern;
|
|
2951
2985
|
return n ? new RegExp(`^(${me(n.source)}|null)$`) : void 0;
|
|
2952
2986
|
}), m(t._zod, "values", () => e.innerType._zod.values ? /* @__PURE__ */ new Set([...e.innerType._zod.values, null]) : void 0), t._zod.parse = (n, r) => n.value === null ? n : e.innerType._zod.run(n, r);
|
|
2953
|
-
}), Br = /* @__PURE__ */
|
|
2987
|
+
}), Br = /* @__PURE__ */ u("$ZodDefault", (t, e) => {
|
|
2954
2988
|
k.init(t, e), t._zod.optin = "optional", m(t._zod, "values", () => e.innerType._zod.values), t._zod.parse = (n, r) => {
|
|
2955
2989
|
if (r.direction === "backward")
|
|
2956
2990
|
return e.innerType._zod.run(n, r);
|
|
@@ -2963,9 +2997,9 @@ const Gr = /* @__PURE__ */ c("$ZodOptional", (t, e) => {
|
|
|
2963
2997
|
function Pe(t, e) {
|
|
2964
2998
|
return t.value === void 0 && (t.value = e.defaultValue), t;
|
|
2965
2999
|
}
|
|
2966
|
-
const Jr = /* @__PURE__ */
|
|
3000
|
+
const Jr = /* @__PURE__ */ u("$ZodPrefault", (t, e) => {
|
|
2967
3001
|
k.init(t, e), t._zod.optin = "optional", m(t._zod, "values", () => e.innerType._zod.values), t._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = e.defaultValue), e.innerType._zod.run(n, r));
|
|
2968
|
-
}), Wr = /* @__PURE__ */
|
|
3002
|
+
}), Wr = /* @__PURE__ */ u("$ZodNonOptional", (t, e) => {
|
|
2969
3003
|
k.init(t, e), m(t._zod, "values", () => {
|
|
2970
3004
|
const n = e.innerType._zod.values;
|
|
2971
3005
|
return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
|
|
@@ -2982,7 +3016,7 @@ function Ae(t, e) {
|
|
|
2982
3016
|
inst: e
|
|
2983
3017
|
}), t;
|
|
2984
3018
|
}
|
|
2985
|
-
const Kr = /* @__PURE__ */
|
|
3019
|
+
const Kr = /* @__PURE__ */ u("$ZodCatch", (t, e) => {
|
|
2986
3020
|
k.init(t, e), m(t._zod, "optin", () => e.innerType._zod.optin), m(t._zod, "optout", () => e.innerType._zod.optout), m(t._zod, "values", () => e.innerType._zod.values), t._zod.parse = (n, r) => {
|
|
2987
3021
|
if (r.direction === "backward")
|
|
2988
3022
|
return e.innerType._zod.run(n, r);
|
|
@@ -3001,7 +3035,7 @@ const Kr = /* @__PURE__ */ c("$ZodCatch", (t, e) => {
|
|
|
3001
3035
|
input: n.value
|
|
3002
3036
|
}), n.issues = []), n);
|
|
3003
3037
|
};
|
|
3004
|
-
}), Yr = /* @__PURE__ */
|
|
3038
|
+
}), Yr = /* @__PURE__ */ u("$ZodPipe", (t, e) => {
|
|
3005
3039
|
k.init(t, e), m(t._zod, "values", () => e.in._zod.values), m(t._zod, "optin", () => e.in._zod.optin), m(t._zod, "optout", () => e.out._zod.optout), m(t._zod, "propValues", () => e.in._zod.propValues), t._zod.parse = (n, r) => {
|
|
3006
3040
|
if (r.direction === "backward") {
|
|
3007
3041
|
const s = e.out._zod.run(n, r);
|
|
@@ -3014,7 +3048,7 @@ const Kr = /* @__PURE__ */ c("$ZodCatch", (t, e) => {
|
|
|
3014
3048
|
function K(t, e, n) {
|
|
3015
3049
|
return t.issues.length ? (t.aborted = !0, t) : e._zod.run({ value: t.value, issues: t.issues }, n);
|
|
3016
3050
|
}
|
|
3017
|
-
const Xr = /* @__PURE__ */
|
|
3051
|
+
const Xr = /* @__PURE__ */ u("$ZodReadonly", (t, e) => {
|
|
3018
3052
|
k.init(t, e), m(t._zod, "propValues", () => e.innerType._zod.propValues), m(t._zod, "values", () => e.innerType._zod.values), m(t._zod, "optin", () => e.innerType?._zod?.optin), m(t._zod, "optout", () => e.innerType?._zod?.optout), t._zod.parse = (n, r) => {
|
|
3019
3053
|
if (r.direction === "backward")
|
|
3020
3054
|
return e.innerType._zod.run(n, r);
|
|
@@ -3025,7 +3059,7 @@ const Xr = /* @__PURE__ */ c("$ZodReadonly", (t, e) => {
|
|
|
3025
3059
|
function Ze(t) {
|
|
3026
3060
|
return t.value = Object.freeze(t.value), t;
|
|
3027
3061
|
}
|
|
3028
|
-
const qr = /* @__PURE__ */
|
|
3062
|
+
const qr = /* @__PURE__ */ u("$ZodCustom", (t, e) => {
|
|
3029
3063
|
b.init(t, e), k.init(t, e), t._zod.parse = (n, r) => n, t._zod.check = (n) => {
|
|
3030
3064
|
const r = n.value, i = e.fn(r);
|
|
3031
3065
|
if (i instanceof Promise)
|
|
@@ -3103,7 +3137,7 @@ function ti(t, e) {
|
|
|
3103
3137
|
...l(e)
|
|
3104
3138
|
});
|
|
3105
3139
|
}
|
|
3106
|
-
function
|
|
3140
|
+
function Le(t, e) {
|
|
3107
3141
|
return new t({
|
|
3108
3142
|
type: "string",
|
|
3109
3143
|
format: "guid",
|
|
@@ -3358,7 +3392,7 @@ function Si(t, e) {
|
|
|
3358
3392
|
...l(e)
|
|
3359
3393
|
});
|
|
3360
3394
|
}
|
|
3361
|
-
function
|
|
3395
|
+
function xe(t, e) {
|
|
3362
3396
|
return new lt({
|
|
3363
3397
|
check: "less_than",
|
|
3364
3398
|
...l(e),
|
|
@@ -3464,28 +3498,28 @@ function Ri(t, e) {
|
|
|
3464
3498
|
suffix: t
|
|
3465
3499
|
});
|
|
3466
3500
|
}
|
|
3467
|
-
function
|
|
3501
|
+
function M(t) {
|
|
3468
3502
|
return new ir({
|
|
3469
3503
|
check: "overwrite",
|
|
3470
3504
|
tx: t
|
|
3471
3505
|
});
|
|
3472
3506
|
}
|
|
3473
|
-
function
|
|
3474
|
-
return
|
|
3507
|
+
function Li(t) {
|
|
3508
|
+
return M((e) => e.normalize(t));
|
|
3475
3509
|
}
|
|
3476
|
-
function
|
|
3477
|
-
return
|
|
3510
|
+
function xi() {
|
|
3511
|
+
return M((t) => t.trim());
|
|
3478
3512
|
}
|
|
3479
3513
|
function Di() {
|
|
3480
|
-
return
|
|
3514
|
+
return M((t) => t.toLowerCase());
|
|
3481
3515
|
}
|
|
3482
3516
|
function Fi() {
|
|
3483
|
-
return
|
|
3517
|
+
return M((t) => t.toUpperCase());
|
|
3484
3518
|
}
|
|
3485
3519
|
function ji() {
|
|
3486
|
-
return
|
|
3520
|
+
return M((t) => qt(t));
|
|
3487
3521
|
}
|
|
3488
|
-
function
|
|
3522
|
+
function Mi(t, e, n) {
|
|
3489
3523
|
return new t({
|
|
3490
3524
|
type: "array",
|
|
3491
3525
|
element: e,
|
|
@@ -3495,7 +3529,7 @@ function Ui(t, e, n) {
|
|
|
3495
3529
|
...l(n)
|
|
3496
3530
|
});
|
|
3497
3531
|
}
|
|
3498
|
-
function
|
|
3532
|
+
function Ui(t, e, n) {
|
|
3499
3533
|
return new t({
|
|
3500
3534
|
type: "custom",
|
|
3501
3535
|
check: "custom",
|
|
@@ -3565,8 +3599,8 @@ function T(t, e, n = { path: [], schemaPath: [] }) {
|
|
|
3565
3599
|
v(t, e, f, p);
|
|
3566
3600
|
}
|
|
3567
3601
|
}
|
|
3568
|
-
const
|
|
3569
|
-
return
|
|
3602
|
+
const c = e.metadataRegistry.get(t);
|
|
3603
|
+
return c && Object.assign(o.schema, c), e.io === "input" && w(t) && (delete o.schema.examples, delete o.schema.default), e.io === "input" && o.schema._prefault && ((r = o.schema).default ?? (r.default = o.schema._prefault)), delete o.schema._prefault, e.seen.get(t).schema;
|
|
3570
3604
|
}
|
|
3571
3605
|
function wt(t, e) {
|
|
3572
3606
|
const n = t.seen.get(e);
|
|
@@ -3583,13 +3617,13 @@ function wt(t, e) {
|
|
|
3583
3617
|
}
|
|
3584
3618
|
if (s[1] === n)
|
|
3585
3619
|
return { ref: "#" };
|
|
3586
|
-
const
|
|
3587
|
-
return { defId: h, ref:
|
|
3620
|
+
const c = `#/${o}/`, h = s[1].schema.id ?? `__schema${t.counter++}`;
|
|
3621
|
+
return { defId: h, ref: c + h };
|
|
3588
3622
|
}, i = (s) => {
|
|
3589
3623
|
if (s[1].schema.$ref)
|
|
3590
3624
|
return;
|
|
3591
|
-
const o = s[1], { ref: a, defId:
|
|
3592
|
-
o.def = { ...o.schema },
|
|
3625
|
+
const o = s[1], { ref: a, defId: c } = r(s);
|
|
3626
|
+
o.def = { ...o.schema }, c && (o.defId = c);
|
|
3593
3627
|
const h = o.schema;
|
|
3594
3628
|
for (const p in h)
|
|
3595
3629
|
delete h[p];
|
|
@@ -3610,8 +3644,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
3610
3644
|
continue;
|
|
3611
3645
|
}
|
|
3612
3646
|
if (t.external) {
|
|
3613
|
-
const
|
|
3614
|
-
if (e !== s[0] &&
|
|
3647
|
+
const c = t.external.registry.get(s[0])?.id;
|
|
3648
|
+
if (e !== s[0] && c) {
|
|
3615
3649
|
i(s);
|
|
3616
3650
|
continue;
|
|
3617
3651
|
}
|
|
@@ -3635,18 +3669,18 @@ function bt(t, e) {
|
|
|
3635
3669
|
if (!n)
|
|
3636
3670
|
throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
3637
3671
|
const r = (o) => {
|
|
3638
|
-
const a = t.seen.get(o),
|
|
3672
|
+
const a = t.seen.get(o), c = a.def ?? a.schema, h = { ...c };
|
|
3639
3673
|
if (a.ref === null)
|
|
3640
3674
|
return;
|
|
3641
3675
|
const p = a.ref;
|
|
3642
3676
|
if (a.ref = null, p) {
|
|
3643
3677
|
r(p);
|
|
3644
3678
|
const d = t.seen.get(p).schema;
|
|
3645
|
-
d.$ref && (t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0") ? (
|
|
3679
|
+
d.$ref && (t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0") ? (c.allOf = c.allOf ?? [], c.allOf.push(d)) : (Object.assign(c, d), Object.assign(c, h));
|
|
3646
3680
|
}
|
|
3647
3681
|
a.isParent || t.override({
|
|
3648
3682
|
zodSchema: o,
|
|
3649
|
-
jsonSchema:
|
|
3683
|
+
jsonSchema: c,
|
|
3650
3684
|
path: a.path ?? []
|
|
3651
3685
|
});
|
|
3652
3686
|
};
|
|
@@ -3741,9 +3775,9 @@ const Bi = (t, e = {}) => (n) => {
|
|
|
3741
3775
|
}, Wi = (t, e, n, r) => {
|
|
3742
3776
|
const i = n;
|
|
3743
3777
|
i.type = "string";
|
|
3744
|
-
const { minimum: s, maximum: o, format: a, patterns:
|
|
3745
|
-
if (typeof s == "number" && (i.minLength = s), typeof o == "number" && (i.maxLength = o), a && (i.format = Ji[a] ?? a, i.format === "" && delete i.format), h && (i.contentEncoding = h),
|
|
3746
|
-
const p = [...
|
|
3778
|
+
const { minimum: s, maximum: o, format: a, patterns: c, contentEncoding: h } = t._zod.bag;
|
|
3779
|
+
if (typeof s == "number" && (i.minLength = s), typeof o == "number" && (i.maxLength = o), a && (i.format = Ji[a] ?? a, i.format === "" && delete i.format), h && (i.contentEncoding = h), c && c.size > 0) {
|
|
3780
|
+
const p = [...c];
|
|
3747
3781
|
p.length === 1 ? i.pattern = p[0].source : p.length > 1 && (i.allOf = [
|
|
3748
3782
|
...p.map((d) => ({
|
|
3749
3783
|
...e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0" ? { type: "string" } : {},
|
|
@@ -3752,8 +3786,8 @@ const Bi = (t, e = {}) => (n) => {
|
|
|
3752
3786
|
]);
|
|
3753
3787
|
}
|
|
3754
3788
|
}, Ki = (t, e, n, r) => {
|
|
3755
|
-
const i = n, { minimum: s, maximum: o, format: a, multipleOf:
|
|
3756
|
-
typeof a == "string" && a.includes("int") ? i.type = "integer" : i.type = "number", typeof p == "number" && (e.target === "draft-04" || e.target === "openapi-3.0" ? (i.minimum = p, i.exclusiveMinimum = !0) : i.exclusiveMinimum = p), typeof s == "number" && (i.minimum = s, typeof p == "number" && e.target !== "draft-04" && (p >= s ? delete i.minimum : delete i.exclusiveMinimum)), typeof h == "number" && (e.target === "draft-04" || e.target === "openapi-3.0" ? (i.maximum = h, i.exclusiveMaximum = !0) : i.exclusiveMaximum = h), typeof o == "number" && (i.maximum = o, typeof h == "number" && e.target !== "draft-04" && (h <= o ? delete i.maximum : delete i.exclusiveMaximum)), typeof
|
|
3789
|
+
const i = n, { minimum: s, maximum: o, format: a, multipleOf: c, exclusiveMaximum: h, exclusiveMinimum: p } = t._zod.bag;
|
|
3790
|
+
typeof a == "string" && a.includes("int") ? i.type = "integer" : i.type = "number", typeof p == "number" && (e.target === "draft-04" || e.target === "openapi-3.0" ? (i.minimum = p, i.exclusiveMinimum = !0) : i.exclusiveMinimum = p), typeof s == "number" && (i.minimum = s, typeof p == "number" && e.target !== "draft-04" && (p >= s ? delete i.minimum : delete i.exclusiveMinimum)), typeof h == "number" && (e.target === "draft-04" || e.target === "openapi-3.0" ? (i.maximum = h, i.exclusiveMaximum = !0) : i.exclusiveMaximum = h), typeof o == "number" && (i.maximum = o, typeof h == "number" && e.target !== "draft-04" && (h <= o ? delete i.maximum : delete i.exclusiveMaximum)), typeof c == "number" && (i.multipleOf = c);
|
|
3757
3791
|
}, Yi = (t, e, n, r) => {
|
|
3758
3792
|
n.not = {};
|
|
3759
3793
|
}, Xi = (t, e, n, r) => {
|
|
@@ -3795,18 +3829,18 @@ const Bi = (t, e = {}) => (n) => {
|
|
|
3795
3829
|
...r,
|
|
3796
3830
|
path: [...r.path, "properties", h]
|
|
3797
3831
|
});
|
|
3798
|
-
const a = new Set(Object.keys(o)),
|
|
3832
|
+
const a = new Set(Object.keys(o)), c = new Set([...a].filter((h) => {
|
|
3799
3833
|
const p = s.shape[h]._zod;
|
|
3800
3834
|
return e.io === "input" ? p.optin === void 0 : p.optout === void 0;
|
|
3801
3835
|
}));
|
|
3802
|
-
|
|
3836
|
+
c.size > 0 && (i.required = Array.from(c)), s.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : s.catchall ? s.catchall && (i.additionalProperties = T(s.catchall, e, {
|
|
3803
3837
|
...r,
|
|
3804
3838
|
path: [...r.path, "additionalProperties"]
|
|
3805
3839
|
})) : e.io === "output" && (i.additionalProperties = !1);
|
|
3806
3840
|
}, rs = (t, e, n, r) => {
|
|
3807
|
-
const i = t._zod.def, s = i.inclusive === !1, o = i.options.map((a,
|
|
3841
|
+
const i = t._zod.def, s = i.inclusive === !1, o = i.options.map((a, c) => T(a, e, {
|
|
3808
3842
|
...r,
|
|
3809
|
-
path: [...r.path, s ? "oneOf" : "anyOf",
|
|
3843
|
+
path: [...r.path, s ? "oneOf" : "anyOf", c]
|
|
3810
3844
|
}));
|
|
3811
3845
|
s ? n.oneOf = o : n.anyOf = o;
|
|
3812
3846
|
}, is = (t, e, n, r) => {
|
|
@@ -3816,11 +3850,11 @@ const Bi = (t, e = {}) => (n) => {
|
|
|
3816
3850
|
}), o = T(i.right, e, {
|
|
3817
3851
|
...r,
|
|
3818
3852
|
path: [...r.path, "allOf", 1]
|
|
3819
|
-
}), a = (h) => "allOf" in h && Object.keys(h).length === 1,
|
|
3853
|
+
}), a = (h) => "allOf" in h && Object.keys(h).length === 1, c = [
|
|
3820
3854
|
...a(s) ? s.allOf : [s],
|
|
3821
3855
|
...a(o) ? o.allOf : [o]
|
|
3822
3856
|
];
|
|
3823
|
-
n.allOf =
|
|
3857
|
+
n.allOf = c;
|
|
3824
3858
|
}, ss = (t, e, n, r) => {
|
|
3825
3859
|
const i = t._zod.def, s = T(i.innerType, e, r), o = e.seen.get(t);
|
|
3826
3860
|
e.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [s, { type: "null" }];
|
|
@@ -3866,25 +3900,25 @@ const Bi = (t, e = {}) => (n) => {
|
|
|
3866
3900
|
T(i.innerType, e, r);
|
|
3867
3901
|
const s = e.seen.get(t);
|
|
3868
3902
|
s.ref = i.innerType;
|
|
3869
|
-
}, ds = /* @__PURE__ */
|
|
3903
|
+
}, ds = /* @__PURE__ */ u("ZodISODateTime", (t, e) => {
|
|
3870
3904
|
_r.init(t, e), _.init(t, e);
|
|
3871
3905
|
});
|
|
3872
3906
|
function fs(t) {
|
|
3873
3907
|
return wi(ds, t);
|
|
3874
3908
|
}
|
|
3875
|
-
const ms = /* @__PURE__ */
|
|
3909
|
+
const ms = /* @__PURE__ */ u("ZodISODate", (t, e) => {
|
|
3876
3910
|
kr.init(t, e), _.init(t, e);
|
|
3877
3911
|
});
|
|
3878
3912
|
function gs(t) {
|
|
3879
3913
|
return bi(ms, t);
|
|
3880
3914
|
}
|
|
3881
|
-
const vs = /* @__PURE__ */
|
|
3915
|
+
const vs = /* @__PURE__ */ u("ZodISOTime", (t, e) => {
|
|
3882
3916
|
yr.init(t, e), _.init(t, e);
|
|
3883
3917
|
});
|
|
3884
3918
|
function _s(t) {
|
|
3885
3919
|
return Ei(vs, t);
|
|
3886
3920
|
}
|
|
3887
|
-
const ks = /* @__PURE__ */
|
|
3921
|
+
const ks = /* @__PURE__ */ u("ZodISODuration", (t, e) => {
|
|
3888
3922
|
Tr.init(t, e), _.init(t, e);
|
|
3889
3923
|
});
|
|
3890
3924
|
function ys(t) {
|
|
@@ -3919,19 +3953,19 @@ const Ts = (t, e) => {
|
|
|
3919
3953
|
// enumerable: false,
|
|
3920
3954
|
}
|
|
3921
3955
|
});
|
|
3922
|
-
}, z =
|
|
3956
|
+
}, z = u("ZodError", Ts, {
|
|
3923
3957
|
Parent: Error
|
|
3924
|
-
}), ws = /* @__PURE__ */ ve(z), bs = /* @__PURE__ */ _e(z), Es = /* @__PURE__ */ ne(z), zs = /* @__PURE__ */ re(z), Is = /* @__PURE__ */ fn(z), $s = /* @__PURE__ */ mn(z), Os = /* @__PURE__ */ gn(z), Ss = /* @__PURE__ */ vn(z), Ns = /* @__PURE__ */ _n(z), Ps = /* @__PURE__ */ kn(z), As = /* @__PURE__ */ yn(z), Zs = /* @__PURE__ */ Tn(z), y = /* @__PURE__ */
|
|
3958
|
+
}), ws = /* @__PURE__ */ ve(z), bs = /* @__PURE__ */ _e(z), Es = /* @__PURE__ */ ne(z), zs = /* @__PURE__ */ re(z), Is = /* @__PURE__ */ fn(z), $s = /* @__PURE__ */ mn(z), Os = /* @__PURE__ */ gn(z), Ss = /* @__PURE__ */ vn(z), Ns = /* @__PURE__ */ _n(z), Ps = /* @__PURE__ */ kn(z), As = /* @__PURE__ */ yn(z), Zs = /* @__PURE__ */ Tn(z), y = /* @__PURE__ */ u("ZodType", (t, e) => (k.init(t, e), Object.assign(t["~standard"], {
|
|
3925
3959
|
jsonSchema: {
|
|
3926
3960
|
input: H(t, "input"),
|
|
3927
3961
|
output: H(t, "output")
|
|
3928
3962
|
}
|
|
3929
|
-
}), t.toJSONSchema = Bi(t, {}), t.def = e, t.type = e.type, Object.defineProperty(t, "_def", { value: e }), t.check = (...n) => t.clone(
|
|
3963
|
+
}), t.toJSONSchema = Bi(t, {}), t.def = e, t.type = e.type, Object.defineProperty(t, "_def", { value: e }), t.check = (...n) => t.clone(L(e, {
|
|
3930
3964
|
checks: [
|
|
3931
3965
|
...e.checks ?? [],
|
|
3932
3966
|
...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
|
|
3933
3967
|
]
|
|
3934
|
-
})), t.clone = (n, r) => P(t, n, r), t.brand = () => t, t.register = ((n, r) => (n.add(t, r), t)), t.parse = (n, r) => ws(t, n, r, { callee: t.parse }), t.safeParse = (n, r) => Es(t, n, r), t.parseAsync = async (n, r) => bs(t, n, r, { callee: t.parseAsync }), t.safeParseAsync = async (n, r) => zs(t, n, r), t.spa = t.safeParseAsync, t.encode = (n, r) => Is(t, n, r), t.decode = (n, r) => $s(t, n, r), t.encodeAsync = async (n, r) => Os(t, n, r), t.decodeAsync = async (n, r) => Ss(t, n, r), t.safeEncode = (n, r) => Ns(t, n, r), t.safeDecode = (n, r) => Ps(t, n, r), t.safeEncodeAsync = async (n, r) => As(t, n, r), t.safeDecodeAsync = async (n, r) => Zs(t, n, r), t.refine = (n, r) => t.check(zo(n, r)), t.superRefine = (n) => t.check(Io(n)), t.overwrite = (n) => t.check(
|
|
3968
|
+
})), t.clone = (n, r) => P(t, n, r), t.brand = () => t, t.register = ((n, r) => (n.add(t, r), t)), t.parse = (n, r) => ws(t, n, r, { callee: t.parse }), t.safeParse = (n, r) => Es(t, n, r), t.parseAsync = async (n, r) => bs(t, n, r, { callee: t.parseAsync }), t.safeParseAsync = async (n, r) => zs(t, n, r), t.spa = t.safeParseAsync, t.encode = (n, r) => Is(t, n, r), t.decode = (n, r) => $s(t, n, r), t.encodeAsync = async (n, r) => Os(t, n, r), t.decodeAsync = async (n, r) => Ss(t, n, r), t.safeEncode = (n, r) => Ns(t, n, r), t.safeDecode = (n, r) => Ps(t, n, r), t.safeEncodeAsync = async (n, r) => As(t, n, r), t.safeDecodeAsync = async (n, r) => Zs(t, n, r), t.refine = (n, r) => t.check(zo(n, r)), t.superRefine = (n) => t.check(Io(n)), t.overwrite = (n) => t.check(M(n)), t.optional = () => Ge(t), t.nullable = () => Ve(t), t.nullish = () => Ge(Ve(t)), t.nonoptional = (n) => _o(t, n), t.array = () => A(t), t.or = (n) => ye([t, n]), t.and = (n) => co(t, n), t.transform = (n) => Be(t, po(n)), t.default = (n) => mo(t, n), t.prefault = (n) => vo(t, n), t.catch = (n) => yo(t, n), t.pipe = (n) => Be(t, n), t.readonly = () => bo(t), t.describe = (n) => {
|
|
3935
3969
|
const r = t.clone();
|
|
3936
3970
|
return G.add(r, { description: n }), r;
|
|
3937
3971
|
}, Object.defineProperty(t, "description", {
|
|
@@ -3944,90 +3978,90 @@ const Ts = (t, e) => {
|
|
|
3944
3978
|
return G.get(t);
|
|
3945
3979
|
const r = t.clone();
|
|
3946
3980
|
return G.add(r, n[0]), r;
|
|
3947
|
-
}, t.isOptional = () => t.safeParse(void 0).success, t.isNullable = () => t.safeParse(null).success, t)), Et = /* @__PURE__ */
|
|
3981
|
+
}, t.isOptional = () => t.safeParse(void 0).success, t.isNullable = () => t.safeParse(null).success, t)), Et = /* @__PURE__ */ u("_ZodString", (t, e) => {
|
|
3948
3982
|
ke.init(t, e), y.init(t, e), t._zod.processJSONSchema = (r, i, s) => Wi(t, r, i);
|
|
3949
3983
|
const n = t._zod.bag;
|
|
3950
|
-
t.format = n.format ?? null, t.minLength = n.minimum ?? null, t.maxLength = n.maximum ?? null, t.regex = (...r) => t.check(Ni(...r)), t.includes = (...r) => t.check(Zi(...r)), t.startsWith = (...r) => t.check(Ci(...r)), t.endsWith = (...r) => t.check(Ri(...r)), t.min = (...r) => t.check(Q(...r)), t.max = (...r) => t.check(kt(...r)), t.length = (...r) => t.check(yt(...r)), t.nonempty = (...r) => t.check(Q(1, ...r)), t.lowercase = (r) => t.check(Pi(r)), t.uppercase = (r) => t.check(Ai(r)), t.trim = () => t.check(
|
|
3951
|
-
}), Cs = /* @__PURE__ */
|
|
3952
|
-
ke.init(t, e), Et.init(t, e), t.email = (n) => t.check(ti(Rs, n)), t.url = (n) => t.check(oi(
|
|
3984
|
+
t.format = n.format ?? null, t.minLength = n.minimum ?? null, t.maxLength = n.maximum ?? null, t.regex = (...r) => t.check(Ni(...r)), t.includes = (...r) => t.check(Zi(...r)), t.startsWith = (...r) => t.check(Ci(...r)), t.endsWith = (...r) => t.check(Ri(...r)), t.min = (...r) => t.check(Q(...r)), t.max = (...r) => t.check(kt(...r)), t.length = (...r) => t.check(yt(...r)), t.nonempty = (...r) => t.check(Q(1, ...r)), t.lowercase = (r) => t.check(Pi(r)), t.uppercase = (r) => t.check(Ai(r)), t.trim = () => t.check(xi()), t.normalize = (...r) => t.check(Li(...r)), t.toLowerCase = () => t.check(Di()), t.toUpperCase = () => t.check(Fi()), t.slugify = () => t.check(ji());
|
|
3985
|
+
}), Cs = /* @__PURE__ */ u("ZodString", (t, e) => {
|
|
3986
|
+
ke.init(t, e), Et.init(t, e), t.email = (n) => t.check(ti(Rs, n)), t.url = (n) => t.check(oi(Ls, n)), t.jwt = (n) => t.check(Ti(qs, n)), t.emoji = (n) => t.check(ai(xs, n)), t.guid = (n) => t.check(Le(je, n)), t.uuid = (n) => t.check(ni(Y, n)), t.uuidv4 = (n) => t.check(ri(Y, n)), t.uuidv6 = (n) => t.check(ii(Y, n)), t.uuidv7 = (n) => t.check(si(Y, n)), t.nanoid = (n) => t.check(ci(Ds, n)), t.guid = (n) => t.check(Le(je, n)), t.cuid = (n) => t.check(ui(Fs, n)), t.cuid2 = (n) => t.check(hi(js, n)), t.ulid = (n) => t.check(pi(Ms, n)), t.base64 = (n) => t.check(_i(Ks, n)), t.base64url = (n) => t.check(ki(Ys, n)), t.xid = (n) => t.check(li(Us, n)), t.ksuid = (n) => t.check(di(Gs, n)), t.ipv4 = (n) => t.check(fi(Vs, n)), t.ipv6 = (n) => t.check(mi(Bs, n)), t.cidrv4 = (n) => t.check(gi(Js, n)), t.cidrv6 = (n) => t.check(vi(Ws, n)), t.e164 = (n) => t.check(yi(Xs, n)), t.datetime = (n) => t.check(fs(n)), t.date = (n) => t.check(gs(n)), t.time = (n) => t.check(_s(n)), t.duration = (n) => t.check(ys(n));
|
|
3953
3987
|
});
|
|
3954
3988
|
function $(t) {
|
|
3955
3989
|
return ei(Cs, t);
|
|
3956
3990
|
}
|
|
3957
|
-
const _ = /* @__PURE__ */
|
|
3991
|
+
const _ = /* @__PURE__ */ u("ZodStringFormat", (t, e) => {
|
|
3958
3992
|
g.init(t, e), Et.init(t, e);
|
|
3959
|
-
}), Rs = /* @__PURE__ */
|
|
3993
|
+
}), Rs = /* @__PURE__ */ u("ZodEmail", (t, e) => {
|
|
3960
3994
|
ur.init(t, e), _.init(t, e);
|
|
3961
|
-
}), je = /* @__PURE__ */
|
|
3995
|
+
}), je = /* @__PURE__ */ u("ZodGUID", (t, e) => {
|
|
3962
3996
|
ar.init(t, e), _.init(t, e);
|
|
3963
|
-
}), Y = /* @__PURE__ */
|
|
3997
|
+
}), Y = /* @__PURE__ */ u("ZodUUID", (t, e) => {
|
|
3964
3998
|
cr.init(t, e), _.init(t, e);
|
|
3965
|
-
}),
|
|
3999
|
+
}), Ls = /* @__PURE__ */ u("ZodURL", (t, e) => {
|
|
3966
4000
|
hr.init(t, e), _.init(t, e);
|
|
3967
|
-
}),
|
|
4001
|
+
}), xs = /* @__PURE__ */ u("ZodEmoji", (t, e) => {
|
|
3968
4002
|
pr.init(t, e), _.init(t, e);
|
|
3969
|
-
}), Ds = /* @__PURE__ */
|
|
4003
|
+
}), Ds = /* @__PURE__ */ u("ZodNanoID", (t, e) => {
|
|
3970
4004
|
lr.init(t, e), _.init(t, e);
|
|
3971
|
-
}), Fs = /* @__PURE__ */
|
|
4005
|
+
}), Fs = /* @__PURE__ */ u("ZodCUID", (t, e) => {
|
|
3972
4006
|
dr.init(t, e), _.init(t, e);
|
|
3973
|
-
}), js = /* @__PURE__ */
|
|
4007
|
+
}), js = /* @__PURE__ */ u("ZodCUID2", (t, e) => {
|
|
3974
4008
|
fr.init(t, e), _.init(t, e);
|
|
3975
|
-
}),
|
|
4009
|
+
}), Ms = /* @__PURE__ */ u("ZodULID", (t, e) => {
|
|
3976
4010
|
mr.init(t, e), _.init(t, e);
|
|
3977
|
-
}),
|
|
4011
|
+
}), Us = /* @__PURE__ */ u("ZodXID", (t, e) => {
|
|
3978
4012
|
gr.init(t, e), _.init(t, e);
|
|
3979
|
-
}), Gs = /* @__PURE__ */
|
|
4013
|
+
}), Gs = /* @__PURE__ */ u("ZodKSUID", (t, e) => {
|
|
3980
4014
|
vr.init(t, e), _.init(t, e);
|
|
3981
|
-
}), Vs = /* @__PURE__ */
|
|
4015
|
+
}), Vs = /* @__PURE__ */ u("ZodIPv4", (t, e) => {
|
|
3982
4016
|
wr.init(t, e), _.init(t, e);
|
|
3983
|
-
}), Bs = /* @__PURE__ */
|
|
4017
|
+
}), Bs = /* @__PURE__ */ u("ZodIPv6", (t, e) => {
|
|
3984
4018
|
br.init(t, e), _.init(t, e);
|
|
3985
|
-
}), Js = /* @__PURE__ */
|
|
4019
|
+
}), Js = /* @__PURE__ */ u("ZodCIDRv4", (t, e) => {
|
|
3986
4020
|
Er.init(t, e), _.init(t, e);
|
|
3987
|
-
}), Ws = /* @__PURE__ */
|
|
4021
|
+
}), Ws = /* @__PURE__ */ u("ZodCIDRv6", (t, e) => {
|
|
3988
4022
|
zr.init(t, e), _.init(t, e);
|
|
3989
|
-
}), Ks = /* @__PURE__ */
|
|
4023
|
+
}), Ks = /* @__PURE__ */ u("ZodBase64", (t, e) => {
|
|
3990
4024
|
Ir.init(t, e), _.init(t, e);
|
|
3991
|
-
}), Ys = /* @__PURE__ */
|
|
4025
|
+
}), Ys = /* @__PURE__ */ u("ZodBase64URL", (t, e) => {
|
|
3992
4026
|
Or.init(t, e), _.init(t, e);
|
|
3993
|
-
}), Xs = /* @__PURE__ */
|
|
4027
|
+
}), Xs = /* @__PURE__ */ u("ZodE164", (t, e) => {
|
|
3994
4028
|
Sr.init(t, e), _.init(t, e);
|
|
3995
|
-
}), qs = /* @__PURE__ */
|
|
4029
|
+
}), qs = /* @__PURE__ */ u("ZodJWT", (t, e) => {
|
|
3996
4030
|
Pr.init(t, e), _.init(t, e);
|
|
3997
|
-
}), zt = /* @__PURE__ */
|
|
3998
|
-
mt.init(t, e), y.init(t, e), t._zod.processJSONSchema = (r, i, s) => Ki(t, r, i), t.gt = (r, i) => t.check(De(r, i)), t.gte = (r, i) => t.check(ue(r, i)), t.min = (r, i) => t.check(ue(r, i)), t.lt = (r, i) => t.check(
|
|
4031
|
+
}), zt = /* @__PURE__ */ u("ZodNumber", (t, e) => {
|
|
4032
|
+
mt.init(t, e), y.init(t, e), t._zod.processJSONSchema = (r, i, s) => Ki(t, r, i), t.gt = (r, i) => t.check(De(r, i)), t.gte = (r, i) => t.check(ue(r, i)), t.min = (r, i) => t.check(ue(r, i)), t.lt = (r, i) => t.check(xe(r, i)), t.lte = (r, i) => t.check(ce(r, i)), t.max = (r, i) => t.check(ce(r, i)), t.int = (r) => t.check(Me(r)), t.safe = (r) => t.check(Me(r)), t.positive = (r) => t.check(De(0, r)), t.nonnegative = (r) => t.check(ue(0, r)), t.negative = (r) => t.check(xe(0, r)), t.nonpositive = (r) => t.check(ce(0, r)), t.multipleOf = (r, i) => t.check(Fe(r, i)), t.step = (r, i) => t.check(Fe(r, i)), t.finite = () => t;
|
|
3999
4033
|
const n = t._zod.bag;
|
|
4000
4034
|
t.minValue = Math.max(n.minimum ?? Number.NEGATIVE_INFINITY, n.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, t.maxValue = Math.min(n.maximum ?? Number.POSITIVE_INFINITY, n.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, t.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? 0.5), t.isFinite = !0, t.format = n.format ?? null;
|
|
4001
4035
|
});
|
|
4002
4036
|
function Qs(t) {
|
|
4003
4037
|
return Ii(zt, t);
|
|
4004
4038
|
}
|
|
4005
|
-
const Hs = /* @__PURE__ */
|
|
4039
|
+
const Hs = /* @__PURE__ */ u("ZodNumberFormat", (t, e) => {
|
|
4006
4040
|
Ar.init(t, e), zt.init(t, e);
|
|
4007
4041
|
});
|
|
4008
|
-
function
|
|
4042
|
+
function Me(t) {
|
|
4009
4043
|
return $i(Hs, t);
|
|
4010
4044
|
}
|
|
4011
|
-
const eo = /* @__PURE__ */
|
|
4045
|
+
const eo = /* @__PURE__ */ u("ZodUnknown", (t, e) => {
|
|
4012
4046
|
Zr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => Xi();
|
|
4013
4047
|
});
|
|
4014
|
-
function
|
|
4048
|
+
function Ue() {
|
|
4015
4049
|
return Oi(eo);
|
|
4016
4050
|
}
|
|
4017
|
-
const to = /* @__PURE__ */
|
|
4051
|
+
const to = /* @__PURE__ */ u("ZodNever", (t, e) => {
|
|
4018
4052
|
Cr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => Yi(t, n, r);
|
|
4019
4053
|
});
|
|
4020
4054
|
function no(t) {
|
|
4021
4055
|
return Si(to, t);
|
|
4022
4056
|
}
|
|
4023
|
-
const ro = /* @__PURE__ */
|
|
4057
|
+
const ro = /* @__PURE__ */ u("ZodArray", (t, e) => {
|
|
4024
4058
|
Rr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => ts(t, n, r, i), t.element = e.element, t.min = (n, r) => t.check(Q(n, r)), t.nonempty = (n) => t.check(Q(1, n)), t.max = (n, r) => t.check(kt(n, r)), t.length = (n, r) => t.check(yt(n, r)), t.unwrap = () => t.element;
|
|
4025
4059
|
});
|
|
4026
4060
|
function A(t, e) {
|
|
4027
|
-
return
|
|
4061
|
+
return Mi(ro, t, e);
|
|
4028
4062
|
}
|
|
4029
|
-
const io = /* @__PURE__ */
|
|
4030
|
-
|
|
4063
|
+
const io = /* @__PURE__ */ u("ZodObject", (t, e) => {
|
|
4064
|
+
xr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => ns(t, n, r, i), m(t, "shape", () => e.shape), t.keyof = () => Te(Object.keys(t._zod.def.shape)), t.catchall = (n) => t.clone({ ...t._zod.def, catchall: n }), t.passthrough = () => t.clone({ ...t._zod.def, catchall: Ue() }), t.loose = () => t.clone({ ...t._zod.def, catchall: Ue() }), t.strict = () => t.clone({ ...t._zod.def, catchall: no() }), t.strip = () => t.clone({ ...t._zod.def, catchall: void 0 }), t.extend = (n) => sn(t, n), t.safeExtend = (n) => on(t, n), t.merge = (n) => an(t, n), t.pick = (n) => nn(t, n), t.omit = (n) => rn(t, n), t.partial = (...n) => cn($t, t, n[0]), t.required = (...n) => un(Ot, t, n[0]);
|
|
4031
4065
|
});
|
|
4032
4066
|
function S(t, e) {
|
|
4033
4067
|
const n = {
|
|
@@ -4037,7 +4071,7 @@ function S(t, e) {
|
|
|
4037
4071
|
};
|
|
4038
4072
|
return new io(n);
|
|
4039
4073
|
}
|
|
4040
|
-
const It = /* @__PURE__ */
|
|
4074
|
+
const It = /* @__PURE__ */ u("ZodUnion", (t, e) => {
|
|
4041
4075
|
_t.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => rs(t, n, r, i), t.options = e.options;
|
|
4042
4076
|
});
|
|
4043
4077
|
function ye(t, e) {
|
|
@@ -4047,7 +4081,7 @@ function ye(t, e) {
|
|
|
4047
4081
|
...l(e)
|
|
4048
4082
|
});
|
|
4049
4083
|
}
|
|
4050
|
-
const so = /* @__PURE__ */
|
|
4084
|
+
const so = /* @__PURE__ */ u("ZodDiscriminatedUnion", (t, e) => {
|
|
4051
4085
|
It.init(t, e), Dr.init(t, e);
|
|
4052
4086
|
});
|
|
4053
4087
|
function oo(t, e, n) {
|
|
@@ -4058,7 +4092,7 @@ function oo(t, e, n) {
|
|
|
4058
4092
|
...l(n)
|
|
4059
4093
|
});
|
|
4060
4094
|
}
|
|
4061
|
-
const ao = /* @__PURE__ */
|
|
4095
|
+
const ao = /* @__PURE__ */ u("ZodIntersection", (t, e) => {
|
|
4062
4096
|
Fr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => is(t, n, r, i);
|
|
4063
4097
|
});
|
|
4064
4098
|
function co(t, e) {
|
|
@@ -4068,7 +4102,7 @@ function co(t, e) {
|
|
|
4068
4102
|
right: e
|
|
4069
4103
|
});
|
|
4070
4104
|
}
|
|
4071
|
-
const le = /* @__PURE__ */
|
|
4105
|
+
const le = /* @__PURE__ */ u("ZodEnum", (t, e) => {
|
|
4072
4106
|
jr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (r, i, s) => qi(t, r, i), t.enum = e.entries, t.options = Object.values(e.entries);
|
|
4073
4107
|
const n = new Set(Object.keys(e.entries));
|
|
4074
4108
|
t.extract = (r, i) => {
|
|
@@ -4107,8 +4141,8 @@ function Te(t, e) {
|
|
|
4107
4141
|
...l(e)
|
|
4108
4142
|
});
|
|
4109
4143
|
}
|
|
4110
|
-
const uo = /* @__PURE__ */
|
|
4111
|
-
|
|
4144
|
+
const uo = /* @__PURE__ */ u("ZodLiteral", (t, e) => {
|
|
4145
|
+
Mr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => Qi(t, n, r), t.values = new Set(e.values), Object.defineProperty(t, "value", {
|
|
4112
4146
|
get() {
|
|
4113
4147
|
if (e.values.length > 1)
|
|
4114
4148
|
throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
@@ -4123,8 +4157,8 @@ function se(t, e) {
|
|
|
4123
4157
|
...l(e)
|
|
4124
4158
|
});
|
|
4125
4159
|
}
|
|
4126
|
-
const ho = /* @__PURE__ */
|
|
4127
|
-
|
|
4160
|
+
const ho = /* @__PURE__ */ u("ZodTransform", (t, e) => {
|
|
4161
|
+
Ur.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => es(t, n), t._zod.parse = (n, r) => {
|
|
4128
4162
|
if (r.direction === "backward")
|
|
4129
4163
|
throw new He(t.constructor.name);
|
|
4130
4164
|
n.addIssue = (s) => {
|
|
@@ -4145,7 +4179,7 @@ function po(t) {
|
|
|
4145
4179
|
transform: t
|
|
4146
4180
|
});
|
|
4147
4181
|
}
|
|
4148
|
-
const $t = /* @__PURE__ */
|
|
4182
|
+
const $t = /* @__PURE__ */ u("ZodOptional", (t, e) => {
|
|
4149
4183
|
Gr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => ls(t, n, r, i), t.unwrap = () => t._zod.def.innerType;
|
|
4150
4184
|
});
|
|
4151
4185
|
function Ge(t) {
|
|
@@ -4154,7 +4188,7 @@ function Ge(t) {
|
|
|
4154
4188
|
innerType: t
|
|
4155
4189
|
});
|
|
4156
4190
|
}
|
|
4157
|
-
const lo = /* @__PURE__ */
|
|
4191
|
+
const lo = /* @__PURE__ */ u("ZodNullable", (t, e) => {
|
|
4158
4192
|
Vr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => ss(t, n, r, i), t.unwrap = () => t._zod.def.innerType;
|
|
4159
4193
|
});
|
|
4160
4194
|
function Ve(t) {
|
|
@@ -4163,7 +4197,7 @@ function Ve(t) {
|
|
|
4163
4197
|
innerType: t
|
|
4164
4198
|
});
|
|
4165
4199
|
}
|
|
4166
|
-
const fo = /* @__PURE__ */
|
|
4200
|
+
const fo = /* @__PURE__ */ u("ZodDefault", (t, e) => {
|
|
4167
4201
|
Br.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => as(t, n, r, i), t.unwrap = () => t._zod.def.innerType, t.removeDefault = t.unwrap;
|
|
4168
4202
|
});
|
|
4169
4203
|
function mo(t, e) {
|
|
@@ -4175,7 +4209,7 @@ function mo(t, e) {
|
|
|
4175
4209
|
}
|
|
4176
4210
|
});
|
|
4177
4211
|
}
|
|
4178
|
-
const go = /* @__PURE__ */
|
|
4212
|
+
const go = /* @__PURE__ */ u("ZodPrefault", (t, e) => {
|
|
4179
4213
|
Jr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => cs(t, n, r, i), t.unwrap = () => t._zod.def.innerType;
|
|
4180
4214
|
});
|
|
4181
4215
|
function vo(t, e) {
|
|
@@ -4187,7 +4221,7 @@ function vo(t, e) {
|
|
|
4187
4221
|
}
|
|
4188
4222
|
});
|
|
4189
4223
|
}
|
|
4190
|
-
const Ot = /* @__PURE__ */
|
|
4224
|
+
const Ot = /* @__PURE__ */ u("ZodNonOptional", (t, e) => {
|
|
4191
4225
|
Wr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => os(t, n, r, i), t.unwrap = () => t._zod.def.innerType;
|
|
4192
4226
|
});
|
|
4193
4227
|
function _o(t, e) {
|
|
@@ -4197,7 +4231,7 @@ function _o(t, e) {
|
|
|
4197
4231
|
...l(e)
|
|
4198
4232
|
});
|
|
4199
4233
|
}
|
|
4200
|
-
const ko = /* @__PURE__ */
|
|
4234
|
+
const ko = /* @__PURE__ */ u("ZodCatch", (t, e) => {
|
|
4201
4235
|
Kr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => us(t, n, r, i), t.unwrap = () => t._zod.def.innerType, t.removeCatch = t.unwrap;
|
|
4202
4236
|
});
|
|
4203
4237
|
function yo(t, e) {
|
|
@@ -4207,7 +4241,7 @@ function yo(t, e) {
|
|
|
4207
4241
|
catchValue: typeof e == "function" ? e : () => e
|
|
4208
4242
|
});
|
|
4209
4243
|
}
|
|
4210
|
-
const To = /* @__PURE__ */
|
|
4244
|
+
const To = /* @__PURE__ */ u("ZodPipe", (t, e) => {
|
|
4211
4245
|
Yr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => hs(t, n, r, i), t.in = e.in, t.out = e.out;
|
|
4212
4246
|
});
|
|
4213
4247
|
function Be(t, e) {
|
|
@@ -4218,7 +4252,7 @@ function Be(t, e) {
|
|
|
4218
4252
|
// ...util.normalizeParams(params),
|
|
4219
4253
|
});
|
|
4220
4254
|
}
|
|
4221
|
-
const wo = /* @__PURE__ */
|
|
4255
|
+
const wo = /* @__PURE__ */ u("ZodReadonly", (t, e) => {
|
|
4222
4256
|
Xr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => ps(t, n, r, i), t.unwrap = () => t._zod.def.innerType;
|
|
4223
4257
|
});
|
|
4224
4258
|
function bo(t) {
|
|
@@ -4227,11 +4261,11 @@ function bo(t) {
|
|
|
4227
4261
|
innerType: t
|
|
4228
4262
|
});
|
|
4229
4263
|
}
|
|
4230
|
-
const Eo = /* @__PURE__ */
|
|
4264
|
+
const Eo = /* @__PURE__ */ u("ZodCustom", (t, e) => {
|
|
4231
4265
|
qr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => Hi(t, n);
|
|
4232
4266
|
});
|
|
4233
4267
|
function zo(t, e = {}) {
|
|
4234
|
-
return
|
|
4268
|
+
return Ui(Eo, t, e);
|
|
4235
4269
|
}
|
|
4236
4270
|
function Io(t) {
|
|
4237
4271
|
return Gi(t);
|
|
@@ -4283,12 +4317,12 @@ const N = ye([
|
|
|
4283
4317
|
// Input format (auto-detected if omitted)
|
|
4284
4318
|
outputFormat: Je.optional()
|
|
4285
4319
|
// Output format (same as input if omitted)
|
|
4286
|
-
}),
|
|
4320
|
+
}), Lo = S({
|
|
4287
4321
|
version: Qs(),
|
|
4288
4322
|
targets: A(Ro)
|
|
4289
4323
|
});
|
|
4290
|
-
function
|
|
4291
|
-
const e =
|
|
4324
|
+
function Mo(t) {
|
|
4325
|
+
const e = Lo.safeParse(t);
|
|
4292
4326
|
if (!e.success) {
|
|
4293
4327
|
const n = e.error.issues.map((r) => `[${r.path.join(".")}]: ${r.message}`).join(`
|
|
4294
4328
|
`);
|
|
@@ -4301,13 +4335,13 @@ export {
|
|
|
4301
4335
|
be as FormatDetector,
|
|
4302
4336
|
jo as GeneratorFactory,
|
|
4303
4337
|
Ye as MermaidGeneratorVisitor,
|
|
4304
|
-
|
|
4338
|
+
Mt as ParserFactory,
|
|
4305
4339
|
Xe as PlantUMLGeneratorVisitor,
|
|
4306
4340
|
Fo as Polagram,
|
|
4307
4341
|
Yt as PolagramBuilder,
|
|
4308
|
-
|
|
4342
|
+
Lo as PolagramConfigSchema,
|
|
4309
4343
|
ae as TransformationEngine,
|
|
4310
4344
|
Ke as Traverser,
|
|
4311
4345
|
Kt as transformerRegistry,
|
|
4312
|
-
|
|
4346
|
+
Mo as validateConfig
|
|
4313
4347
|
};
|