@polagram/core 0.1.2 → 0.2.0
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/README.md +22 -25
- package/dist/index.d.ts +139 -31
- package/dist/polagram-core.js +685 -598
- package/dist/polagram-core.umd.cjs +17 -17
- package/package.json +1 -1
package/dist/polagram-core.js
CHANGED
|
@@ -7,16 +7,16 @@ const We = {
|
|
|
7
7
|
"--)": { type: "async", style: { line: "dotted", head: "async" } },
|
|
8
8
|
"-x": { type: "destroy", style: { line: "solid", head: "cross" } },
|
|
9
9
|
"--x": { type: "destroy", style: { line: "dotted", head: "cross" } }
|
|
10
|
-
},
|
|
10
|
+
}, At = Object.entries(We).reduce(
|
|
11
11
|
(t, [e, n]) => {
|
|
12
12
|
const r = JSON.stringify({ type: n.type, style: n.style });
|
|
13
13
|
return t[r] = e, t;
|
|
14
14
|
},
|
|
15
15
|
{}
|
|
16
16
|
);
|
|
17
|
-
function
|
|
17
|
+
function Zt(t, e) {
|
|
18
18
|
const n = JSON.stringify({ type: t, style: e });
|
|
19
|
-
return
|
|
19
|
+
return At[n] || "->>";
|
|
20
20
|
}
|
|
21
21
|
class Ke {
|
|
22
22
|
constructor(e) {
|
|
@@ -110,7 +110,7 @@ class Ye {
|
|
|
110
110
|
e.id === e.name ? this.add(`${n} ${e.id}`) : this.add(`${n} ${e.id} as ${r}`);
|
|
111
111
|
}
|
|
112
112
|
visitMessage(e) {
|
|
113
|
-
const n = e.from ?? "[*]", r = e.to ?? "[*]", i =
|
|
113
|
+
const n = e.from ?? "[*]", r = e.to ?? "[*]", i = Zt(e.type, e.style);
|
|
114
114
|
let s = "";
|
|
115
115
|
e.lifecycle?.activateTarget && (s += "+"), e.lifecycle?.deactivateSource && (s += "-"), this.add(`${n}${i}${s}${r}: ${e.text}`);
|
|
116
116
|
}
|
|
@@ -156,7 +156,7 @@ class Ye {
|
|
|
156
156
|
this.indentLevel++, e(), this.indentLevel--;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
class
|
|
159
|
+
class qe {
|
|
160
160
|
lines = [];
|
|
161
161
|
traverser;
|
|
162
162
|
constructor() {
|
|
@@ -237,7 +237,7 @@ class Xe {
|
|
|
237
237
|
this.lines.push(e);
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
class
|
|
240
|
+
class Xe {
|
|
241
241
|
constructor(e) {
|
|
242
242
|
this.input = e, this.readChar();
|
|
243
243
|
}
|
|
@@ -307,7 +307,7 @@ class qe {
|
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
|
-
let
|
|
310
|
+
let Ct = class extends Xe {
|
|
311
311
|
nextToken() {
|
|
312
312
|
if (this.skipWhitespace(), this.ch === "%" && this.peekChar() === "%")
|
|
313
313
|
return this.skipComment(), this.nextToken();
|
|
@@ -468,7 +468,7 @@ class Qe {
|
|
|
468
468
|
return this.currToken.type;
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
|
-
let
|
|
471
|
+
let Rt = class extends Qe {
|
|
472
472
|
currentGroup = null;
|
|
473
473
|
idCounters = {
|
|
474
474
|
evt: 0,
|
|
@@ -713,13 +713,13 @@ let Ct = class extends Qe {
|
|
|
713
713
|
});
|
|
714
714
|
}
|
|
715
715
|
};
|
|
716
|
-
const
|
|
716
|
+
const Lt = {
|
|
717
717
|
parse: (t) => {
|
|
718
|
-
const e = new
|
|
719
|
-
return new
|
|
718
|
+
const e = new Ct(t);
|
|
719
|
+
return new Rt(e).parse();
|
|
720
720
|
}
|
|
721
721
|
};
|
|
722
|
-
class
|
|
722
|
+
class xt extends Xe {
|
|
723
723
|
nextToken() {
|
|
724
724
|
this.skipWhitespace();
|
|
725
725
|
const e = this.position, n = this.column;
|
|
@@ -835,7 +835,7 @@ class Lt extends qe {
|
|
|
835
835
|
return n ? n[1] : "";
|
|
836
836
|
}
|
|
837
837
|
}
|
|
838
|
-
class
|
|
838
|
+
class Dt extends Qe {
|
|
839
839
|
/**
|
|
840
840
|
* Type-safe token type checker.
|
|
841
841
|
* Helps TypeScript understand token type after advance() calls.
|
|
@@ -1083,18 +1083,18 @@ class xt extends Qe {
|
|
|
1083
1083
|
return this.lexer.getInput().slice(e, n).trim();
|
|
1084
1084
|
}
|
|
1085
1085
|
}
|
|
1086
|
-
const
|
|
1086
|
+
const Ft = {
|
|
1087
1087
|
parse: (t) => {
|
|
1088
|
-
const e = new
|
|
1089
|
-
return new
|
|
1088
|
+
const e = new xt(t);
|
|
1089
|
+
return new Dt(e).parse();
|
|
1090
1090
|
}
|
|
1091
|
-
},
|
|
1091
|
+
}, jt = {
|
|
1092
1092
|
".puml": "plantuml",
|
|
1093
1093
|
".plantuml": "plantuml",
|
|
1094
1094
|
".pu": "plantuml",
|
|
1095
1095
|
".mmd": "mermaid",
|
|
1096
1096
|
".mermaid": "mermaid"
|
|
1097
|
-
},
|
|
1097
|
+
}, Mt = [
|
|
1098
1098
|
{ pattern: /^\s*@startuml/m, format: "plantuml" },
|
|
1099
1099
|
{ pattern: /^\s*sequenceDiagram/m, format: "mermaid" }
|
|
1100
1100
|
], be = {
|
|
@@ -1125,7 +1125,7 @@ const Dt = {
|
|
|
1125
1125
|
*/
|
|
1126
1126
|
detectByExtension(t) {
|
|
1127
1127
|
const e = t.toLowerCase().match(/\.[^.]+$/)?.[0];
|
|
1128
|
-
return e &&
|
|
1128
|
+
return e && jt[e] || null;
|
|
1129
1129
|
},
|
|
1130
1130
|
/**
|
|
1131
1131
|
* Detect format based on content patterns.
|
|
@@ -1134,7 +1134,7 @@ const Dt = {
|
|
|
1134
1134
|
* @returns Detected format, or null if no pattern matches
|
|
1135
1135
|
*/
|
|
1136
1136
|
detectByContent(t) {
|
|
1137
|
-
for (const { pattern: e, format: n } of
|
|
1137
|
+
for (const { pattern: e, format: n } of Mt)
|
|
1138
1138
|
if (e.test(t))
|
|
1139
1139
|
return n;
|
|
1140
1140
|
return null;
|
|
@@ -1153,21 +1153,21 @@ const Dt = {
|
|
|
1153
1153
|
return ".mmd";
|
|
1154
1154
|
}
|
|
1155
1155
|
}
|
|
1156
|
-
},
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
const
|
|
1156
|
+
}, Q = /* @__PURE__ */ new Map();
|
|
1157
|
+
Q.set("mermaid", Lt);
|
|
1158
|
+
Q.set("plantuml", Ft);
|
|
1159
|
+
const Ut = {
|
|
1160
1160
|
register(t, e) {
|
|
1161
|
-
|
|
1161
|
+
Q.set(t, e);
|
|
1162
1162
|
},
|
|
1163
1163
|
getParser(t) {
|
|
1164
|
-
const e =
|
|
1164
|
+
const e = Q.get(t);
|
|
1165
1165
|
if (!e)
|
|
1166
1166
|
throw new Error(`Parser for language '${t}' not found.`);
|
|
1167
1167
|
return e;
|
|
1168
1168
|
}
|
|
1169
1169
|
};
|
|
1170
|
-
class
|
|
1170
|
+
class K {
|
|
1171
1171
|
transform(e) {
|
|
1172
1172
|
const n = this.mapEvents(e.events);
|
|
1173
1173
|
return {
|
|
@@ -1197,7 +1197,7 @@ class ee {
|
|
|
1197
1197
|
};
|
|
1198
1198
|
}
|
|
1199
1199
|
}
|
|
1200
|
-
class
|
|
1200
|
+
class Gt extends K {
|
|
1201
1201
|
visitFragment(e) {
|
|
1202
1202
|
const n = super.visitFragment(e);
|
|
1203
1203
|
if (n.length === 0) return [];
|
|
@@ -1210,7 +1210,7 @@ class Ut extends ee {
|
|
|
1210
1210
|
];
|
|
1211
1211
|
}
|
|
1212
1212
|
}
|
|
1213
|
-
class
|
|
1213
|
+
class Vt {
|
|
1214
1214
|
transform(e) {
|
|
1215
1215
|
const n = this.collectUsedParticipants(e.events), r = e.participants.filter(
|
|
1216
1216
|
(s) => n.has(s.id)
|
|
@@ -1254,7 +1254,7 @@ class Gt {
|
|
|
1254
1254
|
return r(e), n;
|
|
1255
1255
|
}
|
|
1256
1256
|
}
|
|
1257
|
-
class
|
|
1257
|
+
class ne {
|
|
1258
1258
|
// -- Branch / Fragment --
|
|
1259
1259
|
matchBranch(e, n, r) {
|
|
1260
1260
|
return !(n.operator && !(Array.isArray(n.operator) ? n.operator : [n.operator]).includes(r) || n.condition && (!e.condition || !this.matchText(e.condition, n.condition)));
|
|
@@ -1284,11 +1284,11 @@ class de {
|
|
|
1284
1284
|
return !1;
|
|
1285
1285
|
}
|
|
1286
1286
|
}
|
|
1287
|
-
class
|
|
1287
|
+
class Bt extends K {
|
|
1288
1288
|
constructor(e) {
|
|
1289
1289
|
super(), this.layer = e;
|
|
1290
1290
|
}
|
|
1291
|
-
matcher = new
|
|
1291
|
+
matcher = new ne();
|
|
1292
1292
|
targetParticipantIds = /* @__PURE__ */ new Set();
|
|
1293
1293
|
transform(e) {
|
|
1294
1294
|
return this.resolveTargetParticipants(e), super.transform(e);
|
|
@@ -1322,11 +1322,84 @@ class Vt extends ee {
|
|
|
1322
1322
|
return !!(e.from && this.targetParticipantIds.has(e.from) || e.to && this.targetParticipantIds.has(e.to));
|
|
1323
1323
|
}
|
|
1324
1324
|
}
|
|
1325
|
-
class
|
|
1325
|
+
class Jt extends K {
|
|
1326
|
+
constructor(e) {
|
|
1327
|
+
super(), this.layer = e, this.newParticipantId = e.newName;
|
|
1328
|
+
}
|
|
1329
|
+
matcher = new ne();
|
|
1330
|
+
mergedParticipantIds = /* @__PURE__ */ new Set();
|
|
1331
|
+
newParticipantId;
|
|
1332
|
+
transform(e) {
|
|
1333
|
+
const n = this.layer.selector;
|
|
1334
|
+
if (e.participants.forEach((i) => {
|
|
1335
|
+
this.matcher.matchParticipant(i, n) && this.mergedParticipantIds.add(i.id);
|
|
1336
|
+
}), this.mergedParticipantIds.size === 0)
|
|
1337
|
+
return e;
|
|
1338
|
+
if (!e.participants.some(
|
|
1339
|
+
(i) => i.id === this.newParticipantId
|
|
1340
|
+
)) {
|
|
1341
|
+
const i = {
|
|
1342
|
+
id: this.newParticipantId,
|
|
1343
|
+
name: this.layer.newName,
|
|
1344
|
+
type: "participant"
|
|
1345
|
+
};
|
|
1346
|
+
e.participants.push(i);
|
|
1347
|
+
}
|
|
1348
|
+
return e.participants = e.participants.filter(
|
|
1349
|
+
(i) => !this.mergedParticipantIds.has(i.id)
|
|
1350
|
+
), super.transform(e);
|
|
1351
|
+
}
|
|
1352
|
+
visitEvent(e) {
|
|
1353
|
+
if (e.kind === "message")
|
|
1354
|
+
return this.transformMessage(e);
|
|
1355
|
+
if (e.kind === "note")
|
|
1356
|
+
return this.transformNote(e);
|
|
1357
|
+
if (e.kind === "activation")
|
|
1358
|
+
return this.transformActivation(e);
|
|
1359
|
+
if (e.kind === "fragment") {
|
|
1360
|
+
const n = super.visitEvent(e);
|
|
1361
|
+
return n.length > 0 && n[0].kind === "fragment" && n[0].branches.every(
|
|
1362
|
+
(s) => s.events.length === 0
|
|
1363
|
+
) ? [] : n;
|
|
1364
|
+
}
|
|
1365
|
+
return super.visitEvent(e);
|
|
1366
|
+
}
|
|
1367
|
+
transformMessage(e) {
|
|
1368
|
+
let n = e.from, r = e.to;
|
|
1369
|
+
return n && this.mergedParticipantIds.has(n) && (n = this.newParticipantId), r && this.mergedParticipantIds.has(r) && (r = this.newParticipantId), n === this.newParticipantId && r === this.newParticipantId ? [] : [
|
|
1370
|
+
{
|
|
1371
|
+
...e,
|
|
1372
|
+
from: n,
|
|
1373
|
+
to: r
|
|
1374
|
+
}
|
|
1375
|
+
];
|
|
1376
|
+
}
|
|
1377
|
+
transformNote(e) {
|
|
1378
|
+
const n = /* @__PURE__ */ new Set();
|
|
1379
|
+
let r = !1;
|
|
1380
|
+
for (const o of e.participantIds)
|
|
1381
|
+
this.mergedParticipantIds.has(o) ? (n.add(this.newParticipantId), r = !0) : n.add(o);
|
|
1382
|
+
if (!r)
|
|
1383
|
+
return [e];
|
|
1384
|
+
const i = Array.from(n);
|
|
1385
|
+
return e.participantIds.every(
|
|
1386
|
+
(o) => this.mergedParticipantIds.has(o)
|
|
1387
|
+
) ? [] : [
|
|
1388
|
+
{
|
|
1389
|
+
...e,
|
|
1390
|
+
participantIds: i
|
|
1391
|
+
}
|
|
1392
|
+
];
|
|
1393
|
+
}
|
|
1394
|
+
transformActivation(e) {
|
|
1395
|
+
return this.mergedParticipantIds.has(e.participantId) ? [] : [e];
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
class Wt extends K {
|
|
1326
1399
|
constructor(e) {
|
|
1327
1400
|
super(), this.layer = e;
|
|
1328
1401
|
}
|
|
1329
|
-
matcher = new
|
|
1402
|
+
matcher = new ne();
|
|
1330
1403
|
removedParticipantIds = /* @__PURE__ */ new Set();
|
|
1331
1404
|
transform(e) {
|
|
1332
1405
|
const n = this.layer.selector;
|
|
@@ -1362,11 +1435,11 @@ class Bt extends ee {
|
|
|
1362
1435
|
return !!(e.from && this.removedParticipantIds.has(e.from) || e.to && this.removedParticipantIds.has(e.to));
|
|
1363
1436
|
}
|
|
1364
1437
|
}
|
|
1365
|
-
class
|
|
1438
|
+
class Kt extends K {
|
|
1366
1439
|
constructor(e) {
|
|
1367
1440
|
super(), this.layer = e;
|
|
1368
1441
|
}
|
|
1369
|
-
matcher = new
|
|
1442
|
+
matcher = new ne();
|
|
1370
1443
|
visitFragment(e) {
|
|
1371
1444
|
const n = e.branches.find(
|
|
1372
1445
|
(r) => this.matcher.matchBranch(r, this.layer.selector, e.operator)
|
|
@@ -1374,10 +1447,10 @@ class Jt extends ee {
|
|
|
1374
1447
|
return n ? this.mapEvents(n.events) : super.visitFragment(e);
|
|
1375
1448
|
}
|
|
1376
1449
|
}
|
|
1377
|
-
class
|
|
1450
|
+
class Yt {
|
|
1378
1451
|
factories = /* @__PURE__ */ new Map();
|
|
1379
1452
|
constructor() {
|
|
1380
|
-
this.registerTyped("resolve", (e) => new
|
|
1453
|
+
this.registerTyped("resolve", (e) => new Kt(e)), this.registerTyped("focus", (e) => new Bt(e)), this.registerTyped("remove", (e) => new Wt(e)), this.registerTyped("merge", (e) => new Jt(e));
|
|
1381
1454
|
}
|
|
1382
1455
|
/**
|
|
1383
1456
|
* Type-safe registration for a specific layer type.
|
|
@@ -1406,18 +1479,18 @@ class Wt {
|
|
|
1406
1479
|
return this.factories.has(e);
|
|
1407
1480
|
}
|
|
1408
1481
|
}
|
|
1409
|
-
const
|
|
1410
|
-
class
|
|
1482
|
+
const qt = new Yt();
|
|
1483
|
+
class ue {
|
|
1411
1484
|
transform(e, n) {
|
|
1412
1485
|
let r = e;
|
|
1413
1486
|
for (const i of n) {
|
|
1414
|
-
const s =
|
|
1487
|
+
const s = qt.get(i);
|
|
1415
1488
|
s ? r = s.transform(r) : console.warn(`Unknown action: ${i.action}`);
|
|
1416
1489
|
}
|
|
1417
|
-
return r = new
|
|
1490
|
+
return r = new Gt().transform(r), r = new Vt().transform(r), r;
|
|
1418
1491
|
}
|
|
1419
1492
|
}
|
|
1420
|
-
class
|
|
1493
|
+
class Uo {
|
|
1421
1494
|
constructor() {
|
|
1422
1495
|
}
|
|
1423
1496
|
/**
|
|
@@ -1426,11 +1499,11 @@ class Fo {
|
|
|
1426
1499
|
* @param format Input format ('mermaid' or 'plantuml')
|
|
1427
1500
|
*/
|
|
1428
1501
|
static init(e, n = "mermaid") {
|
|
1429
|
-
const i =
|
|
1430
|
-
return new
|
|
1502
|
+
const i = Ut.getParser(n).parse(e);
|
|
1503
|
+
return new Xt(i, n);
|
|
1431
1504
|
}
|
|
1432
1505
|
}
|
|
1433
|
-
class
|
|
1506
|
+
class Xt {
|
|
1434
1507
|
ast;
|
|
1435
1508
|
layers = [];
|
|
1436
1509
|
sourceFormat;
|
|
@@ -1504,21 +1577,21 @@ class Yt {
|
|
|
1504
1577
|
* Generate Mermaid code from the transformed AST.
|
|
1505
1578
|
*/
|
|
1506
1579
|
toMermaid() {
|
|
1507
|
-
const n = new
|
|
1580
|
+
const n = new ue().transform(this.ast, this.layers);
|
|
1508
1581
|
return new Ye().generate(n);
|
|
1509
1582
|
}
|
|
1510
1583
|
/**
|
|
1511
1584
|
* Generate PlantUML code from the transformed AST.
|
|
1512
1585
|
*/
|
|
1513
1586
|
toPlantUML() {
|
|
1514
|
-
const n = new
|
|
1515
|
-
return new
|
|
1587
|
+
const n = new ue().transform(this.ast, this.layers);
|
|
1588
|
+
return new qe().generate(n);
|
|
1516
1589
|
}
|
|
1517
1590
|
/**
|
|
1518
1591
|
* Get the transformed AST (for advanced use cases).
|
|
1519
1592
|
*/
|
|
1520
1593
|
toAST() {
|
|
1521
|
-
return new
|
|
1594
|
+
return new ue().transform(this.ast, this.layers);
|
|
1522
1595
|
}
|
|
1523
1596
|
/**
|
|
1524
1597
|
* Get the source format detected/specified during init.
|
|
@@ -1543,17 +1616,17 @@ class Yt {
|
|
|
1543
1616
|
return typeof e == "string" || e instanceof RegExp || typeof e == "object" && e !== null && "pattern" in e && !("kind" in e);
|
|
1544
1617
|
}
|
|
1545
1618
|
}
|
|
1546
|
-
const
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
const
|
|
1619
|
+
const D = /* @__PURE__ */ new Map();
|
|
1620
|
+
D.set("mermaid", () => new Ye());
|
|
1621
|
+
D.set("plantuml", () => new qe());
|
|
1622
|
+
const Go = {
|
|
1550
1623
|
/**
|
|
1551
1624
|
* Register a custom generator.
|
|
1552
1625
|
* @param language - Language identifier (e.g., 'mermaid', 'plantuml')
|
|
1553
1626
|
* @param factory - Factory function that creates a generator instance
|
|
1554
1627
|
*/
|
|
1555
1628
|
register(t, e) {
|
|
1556
|
-
|
|
1629
|
+
D.set(t, e);
|
|
1557
1630
|
},
|
|
1558
1631
|
/**
|
|
1559
1632
|
* Get a generator for the specified language.
|
|
@@ -1562,7 +1635,7 @@ const jo = {
|
|
|
1562
1635
|
* @throws Error if no generator is registered for the language
|
|
1563
1636
|
*/
|
|
1564
1637
|
getGenerator(t) {
|
|
1565
|
-
const e =
|
|
1638
|
+
const e = D.get(t);
|
|
1566
1639
|
if (!e)
|
|
1567
1640
|
throw new Error(`Generator for language '${t}' not found.`);
|
|
1568
1641
|
return e();
|
|
@@ -1571,13 +1644,13 @@ const jo = {
|
|
|
1571
1644
|
* Check if a generator is registered for the given language.
|
|
1572
1645
|
*/
|
|
1573
1646
|
hasGenerator(t) {
|
|
1574
|
-
return
|
|
1647
|
+
return D.has(t);
|
|
1575
1648
|
},
|
|
1576
1649
|
/**
|
|
1577
1650
|
* Get list of registered languages.
|
|
1578
1651
|
*/
|
|
1579
1652
|
getLanguages() {
|
|
1580
|
-
return Array.from(
|
|
1653
|
+
return Array.from(D.keys());
|
|
1581
1654
|
}
|
|
1582
1655
|
};
|
|
1583
1656
|
function u(t, e, n) {
|
|
@@ -1614,7 +1687,7 @@ function u(t, e, n) {
|
|
|
1614
1687
|
value: (a) => n?.Parent && a instanceof n.Parent ? !0 : a?._zod?.traits?.has(t)
|
|
1615
1688
|
}), Object.defineProperty(o, "name", { value: t }), o;
|
|
1616
1689
|
}
|
|
1617
|
-
class
|
|
1690
|
+
class j extends Error {
|
|
1618
1691
|
constructor() {
|
|
1619
1692
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
1620
1693
|
}
|
|
@@ -1625,17 +1698,17 @@ class He extends Error {
|
|
|
1625
1698
|
}
|
|
1626
1699
|
}
|
|
1627
1700
|
const et = {};
|
|
1628
|
-
function
|
|
1701
|
+
function C(t) {
|
|
1629
1702
|
return et;
|
|
1630
1703
|
}
|
|
1631
1704
|
function tt(t) {
|
|
1632
1705
|
const e = Object.values(t).filter((r) => typeof r == "number");
|
|
1633
1706
|
return Object.entries(t).filter(([r, i]) => e.indexOf(+r) === -1).map(([r, i]) => i);
|
|
1634
1707
|
}
|
|
1635
|
-
function
|
|
1708
|
+
function le(t, e) {
|
|
1636
1709
|
return typeof e == "bigint" ? e.toString() : e;
|
|
1637
1710
|
}
|
|
1638
|
-
function
|
|
1711
|
+
function re(t) {
|
|
1639
1712
|
return {
|
|
1640
1713
|
get value() {
|
|
1641
1714
|
{
|
|
@@ -1645,14 +1718,14 @@ function te(t) {
|
|
|
1645
1718
|
}
|
|
1646
1719
|
};
|
|
1647
1720
|
}
|
|
1648
|
-
function
|
|
1721
|
+
function me(t) {
|
|
1649
1722
|
return t == null;
|
|
1650
1723
|
}
|
|
1651
|
-
function
|
|
1724
|
+
function ge(t) {
|
|
1652
1725
|
const e = t.startsWith("^") ? 1 : 0, n = t.endsWith("$") ? t.length - 1 : t.length;
|
|
1653
1726
|
return t.slice(e, n);
|
|
1654
1727
|
}
|
|
1655
|
-
function
|
|
1728
|
+
function Qt(t, e) {
|
|
1656
1729
|
const n = (t.toString().split(".")[1] || "").length, r = e.toString();
|
|
1657
1730
|
let i = (r.split(".")[1] || "").length;
|
|
1658
1731
|
if (i === 0 && /\d?e-\d?/.test(r)) {
|
|
@@ -1679,7 +1752,7 @@ function m(t, e, n) {
|
|
|
1679
1752
|
configurable: !0
|
|
1680
1753
|
});
|
|
1681
1754
|
}
|
|
1682
|
-
function
|
|
1755
|
+
function L(t, e, n) {
|
|
1683
1756
|
Object.defineProperty(t, e, {
|
|
1684
1757
|
value: n,
|
|
1685
1758
|
writable: !0,
|
|
@@ -1687,7 +1760,7 @@ function R(t, e, n) {
|
|
|
1687
1760
|
configurable: !0
|
|
1688
1761
|
});
|
|
1689
1762
|
}
|
|
1690
|
-
function
|
|
1763
|
+
function x(...t) {
|
|
1691
1764
|
const e = {};
|
|
1692
1765
|
for (const n of t) {
|
|
1693
1766
|
const r = Object.getOwnPropertyDescriptors(n);
|
|
@@ -1695,18 +1768,18 @@ function L(...t) {
|
|
|
1695
1768
|
}
|
|
1696
1769
|
return Object.defineProperties({}, e);
|
|
1697
1770
|
}
|
|
1698
|
-
function
|
|
1771
|
+
function Ie(t) {
|
|
1699
1772
|
return JSON.stringify(t);
|
|
1700
1773
|
}
|
|
1701
|
-
function
|
|
1774
|
+
function Ht(t) {
|
|
1702
1775
|
return t.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
1703
1776
|
}
|
|
1704
1777
|
const nt = "captureStackTrace" in Error ? Error.captureStackTrace : (...t) => {
|
|
1705
1778
|
};
|
|
1706
|
-
function
|
|
1779
|
+
function B(t) {
|
|
1707
1780
|
return typeof t == "object" && t !== null && !Array.isArray(t);
|
|
1708
1781
|
}
|
|
1709
|
-
const
|
|
1782
|
+
const en = re(() => {
|
|
1710
1783
|
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
|
|
1711
1784
|
return !1;
|
|
1712
1785
|
try {
|
|
@@ -1716,23 +1789,23 @@ const Qt = te(() => {
|
|
|
1716
1789
|
return !1;
|
|
1717
1790
|
}
|
|
1718
1791
|
});
|
|
1719
|
-
function
|
|
1720
|
-
if (
|
|
1792
|
+
function J(t) {
|
|
1793
|
+
if (B(t) === !1)
|
|
1721
1794
|
return !1;
|
|
1722
1795
|
const e = t.constructor;
|
|
1723
1796
|
if (e === void 0 || typeof e != "function")
|
|
1724
1797
|
return !0;
|
|
1725
1798
|
const n = e.prototype;
|
|
1726
|
-
return !(
|
|
1799
|
+
return !(B(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
|
|
1727
1800
|
}
|
|
1728
1801
|
function rt(t) {
|
|
1729
|
-
return
|
|
1802
|
+
return J(t) ? { ...t } : Array.isArray(t) ? [...t] : t;
|
|
1730
1803
|
}
|
|
1731
|
-
const
|
|
1732
|
-
function
|
|
1804
|
+
const tn = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
1805
|
+
function M(t) {
|
|
1733
1806
|
return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1734
1807
|
}
|
|
1735
|
-
function
|
|
1808
|
+
function N(t, e, n) {
|
|
1736
1809
|
const r = new t._zod.constr(e ?? t._zod.def);
|
|
1737
1810
|
return (!e || n?.parent) && (r._zod.parent = t), r;
|
|
1738
1811
|
}
|
|
@@ -1749,18 +1822,18 @@ function l(t) {
|
|
|
1749
1822
|
}
|
|
1750
1823
|
return delete e.message, typeof e.error == "string" ? { ...e, error: () => e.error } : e;
|
|
1751
1824
|
}
|
|
1752
|
-
function
|
|
1825
|
+
function nn(t) {
|
|
1753
1826
|
return Object.keys(t).filter((e) => t[e]._zod.optin === "optional" && t[e]._zod.optout === "optional");
|
|
1754
1827
|
}
|
|
1755
|
-
const
|
|
1828
|
+
const rn = {
|
|
1756
1829
|
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
1757
1830
|
int32: [-2147483648, 2147483647],
|
|
1758
1831
|
uint32: [0, 4294967295],
|
|
1759
1832
|
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
1760
1833
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
1761
1834
|
};
|
|
1762
|
-
function
|
|
1763
|
-
const n = t._zod.def, r =
|
|
1835
|
+
function sn(t, e) {
|
|
1836
|
+
const n = t._zod.def, r = x(t._zod.def, {
|
|
1764
1837
|
get shape() {
|
|
1765
1838
|
const i = {};
|
|
1766
1839
|
for (const s in e) {
|
|
@@ -1768,14 +1841,14 @@ function nn(t, e) {
|
|
|
1768
1841
|
throw new Error(`Unrecognized key: "${s}"`);
|
|
1769
1842
|
e[s] && (i[s] = n.shape[s]);
|
|
1770
1843
|
}
|
|
1771
|
-
return
|
|
1844
|
+
return L(this, "shape", i), i;
|
|
1772
1845
|
},
|
|
1773
1846
|
checks: []
|
|
1774
1847
|
});
|
|
1775
|
-
return
|
|
1848
|
+
return N(t, r);
|
|
1776
1849
|
}
|
|
1777
|
-
function
|
|
1778
|
-
const n = t._zod.def, r =
|
|
1850
|
+
function on(t, e) {
|
|
1851
|
+
const n = t._zod.def, r = x(t._zod.def, {
|
|
1779
1852
|
get shape() {
|
|
1780
1853
|
const i = { ...t._zod.def.shape };
|
|
1781
1854
|
for (const s in e) {
|
|
@@ -1783,45 +1856,45 @@ function rn(t, e) {
|
|
|
1783
1856
|
throw new Error(`Unrecognized key: "${s}"`);
|
|
1784
1857
|
e[s] && delete i[s];
|
|
1785
1858
|
}
|
|
1786
|
-
return
|
|
1859
|
+
return L(this, "shape", i), i;
|
|
1787
1860
|
},
|
|
1788
1861
|
checks: []
|
|
1789
1862
|
});
|
|
1790
|
-
return
|
|
1863
|
+
return N(t, r);
|
|
1791
1864
|
}
|
|
1792
|
-
function
|
|
1793
|
-
if (!
|
|
1865
|
+
function an(t, e) {
|
|
1866
|
+
if (!J(e))
|
|
1794
1867
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
1795
1868
|
const n = t._zod.def.checks;
|
|
1796
1869
|
if (n && n.length > 0)
|
|
1797
1870
|
throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");
|
|
1798
|
-
const i =
|
|
1871
|
+
const i = x(t._zod.def, {
|
|
1799
1872
|
get shape() {
|
|
1800
1873
|
const s = { ...t._zod.def.shape, ...e };
|
|
1801
|
-
return
|
|
1874
|
+
return L(this, "shape", s), s;
|
|
1802
1875
|
},
|
|
1803
1876
|
checks: []
|
|
1804
1877
|
});
|
|
1805
|
-
return
|
|
1878
|
+
return N(t, i);
|
|
1806
1879
|
}
|
|
1807
|
-
function
|
|
1808
|
-
if (!
|
|
1880
|
+
function cn(t, e) {
|
|
1881
|
+
if (!J(e))
|
|
1809
1882
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
1810
1883
|
const n = {
|
|
1811
1884
|
...t._zod.def,
|
|
1812
1885
|
get shape() {
|
|
1813
1886
|
const r = { ...t._zod.def.shape, ...e };
|
|
1814
|
-
return
|
|
1887
|
+
return L(this, "shape", r), r;
|
|
1815
1888
|
},
|
|
1816
1889
|
checks: t._zod.def.checks
|
|
1817
1890
|
};
|
|
1818
|
-
return
|
|
1891
|
+
return N(t, n);
|
|
1819
1892
|
}
|
|
1820
|
-
function
|
|
1821
|
-
const n =
|
|
1893
|
+
function un(t, e) {
|
|
1894
|
+
const n = x(t._zod.def, {
|
|
1822
1895
|
get shape() {
|
|
1823
1896
|
const r = { ...t._zod.def.shape, ...e._zod.def.shape };
|
|
1824
|
-
return
|
|
1897
|
+
return L(this, "shape", r), r;
|
|
1825
1898
|
},
|
|
1826
1899
|
get catchall() {
|
|
1827
1900
|
return e._zod.def.catchall;
|
|
@@ -1829,10 +1902,10 @@ function an(t, e) {
|
|
|
1829
1902
|
checks: []
|
|
1830
1903
|
// delete existing checks
|
|
1831
1904
|
});
|
|
1832
|
-
return
|
|
1905
|
+
return N(t, n);
|
|
1833
1906
|
}
|
|
1834
|
-
function
|
|
1835
|
-
const r =
|
|
1907
|
+
function hn(t, e, n) {
|
|
1908
|
+
const r = x(e._zod.def, {
|
|
1836
1909
|
get shape() {
|
|
1837
1910
|
const i = e._zod.def.shape, s = { ...i };
|
|
1838
1911
|
if (n)
|
|
@@ -1850,14 +1923,14 @@ function cn(t, e, n) {
|
|
|
1850
1923
|
type: "optional",
|
|
1851
1924
|
innerType: i[o]
|
|
1852
1925
|
}) : i[o];
|
|
1853
|
-
return
|
|
1926
|
+
return L(this, "shape", s), s;
|
|
1854
1927
|
},
|
|
1855
1928
|
checks: []
|
|
1856
1929
|
});
|
|
1857
|
-
return
|
|
1930
|
+
return N(e, r);
|
|
1858
1931
|
}
|
|
1859
|
-
function
|
|
1860
|
-
const r =
|
|
1932
|
+
function pn(t, e, n) {
|
|
1933
|
+
const r = x(e._zod.def, {
|
|
1861
1934
|
get shape() {
|
|
1862
1935
|
const i = e._zod.def.shape, s = { ...i };
|
|
1863
1936
|
if (n)
|
|
@@ -1875,13 +1948,13 @@ function un(t, e, n) {
|
|
|
1875
1948
|
type: "nonoptional",
|
|
1876
1949
|
innerType: i[o]
|
|
1877
1950
|
});
|
|
1878
|
-
return
|
|
1951
|
+
return L(this, "shape", s), s;
|
|
1879
1952
|
},
|
|
1880
1953
|
checks: []
|
|
1881
1954
|
});
|
|
1882
|
-
return
|
|
1955
|
+
return N(e, r);
|
|
1883
1956
|
}
|
|
1884
|
-
function
|
|
1957
|
+
function F(t, e = 0) {
|
|
1885
1958
|
if (t.aborted === !0)
|
|
1886
1959
|
return !0;
|
|
1887
1960
|
for (let n = e; n < t.issues.length; n++)
|
|
@@ -1895,21 +1968,21 @@ function it(t, e) {
|
|
|
1895
1968
|
return (r = n).path ?? (r.path = []), n.path.unshift(t), n;
|
|
1896
1969
|
});
|
|
1897
1970
|
}
|
|
1898
|
-
function
|
|
1971
|
+
function Y(t) {
|
|
1899
1972
|
return typeof t == "string" ? t : t?.message;
|
|
1900
1973
|
}
|
|
1901
|
-
function
|
|
1974
|
+
function R(t, e, n) {
|
|
1902
1975
|
const r = { ...t, path: t.path ?? [] };
|
|
1903
1976
|
if (!t.message) {
|
|
1904
|
-
const i =
|
|
1977
|
+
const i = Y(t.inst?._zod.def?.error?.(t)) ?? Y(e?.error?.(t)) ?? Y(n.customError?.(t)) ?? Y(n.localeError?.(t)) ?? "Invalid input";
|
|
1905
1978
|
r.message = i;
|
|
1906
1979
|
}
|
|
1907
1980
|
return delete r.inst, delete r.continue, e?.reportInput || delete r.input, r;
|
|
1908
1981
|
}
|
|
1909
|
-
function
|
|
1982
|
+
function ve(t) {
|
|
1910
1983
|
return Array.isArray(t) ? "array" : typeof t == "string" ? "string" : "unknown";
|
|
1911
1984
|
}
|
|
1912
|
-
function
|
|
1985
|
+
function W(...t) {
|
|
1913
1986
|
const [e, n, r] = t;
|
|
1914
1987
|
return typeof e == "string" ? {
|
|
1915
1988
|
message: e,
|
|
@@ -1925,18 +1998,18 @@ const st = (t, e) => {
|
|
|
1925
1998
|
}), Object.defineProperty(t, "issues", {
|
|
1926
1999
|
value: e,
|
|
1927
2000
|
enumerable: !1
|
|
1928
|
-
}), t.message = JSON.stringify(e,
|
|
2001
|
+
}), t.message = JSON.stringify(e, le, 2), Object.defineProperty(t, "toString", {
|
|
1929
2002
|
value: () => t.message,
|
|
1930
2003
|
enumerable: !1
|
|
1931
2004
|
});
|
|
1932
2005
|
}, ot = u("$ZodError", st), at = u("$ZodError", st, { Parent: Error });
|
|
1933
|
-
function
|
|
2006
|
+
function ln(t, e = (n) => n.message) {
|
|
1934
2007
|
const n = {}, r = [];
|
|
1935
2008
|
for (const i of t.issues)
|
|
1936
2009
|
i.path.length > 0 ? (n[i.path[0]] = n[i.path[0]] || [], n[i.path[0]].push(e(i))) : r.push(e(i));
|
|
1937
2010
|
return { formErrors: r, fieldErrors: n };
|
|
1938
2011
|
}
|
|
1939
|
-
function
|
|
2012
|
+
function dn(t, e = (n) => n.message) {
|
|
1940
2013
|
const n = { _errors: [] }, r = (i) => {
|
|
1941
2014
|
for (const s of i.issues)
|
|
1942
2015
|
if (s.code === "invalid_union" && s.errors.length)
|
|
@@ -1957,72 +2030,72 @@ function pn(t, e = (n) => n.message) {
|
|
|
1957
2030
|
};
|
|
1958
2031
|
return r(t), n;
|
|
1959
2032
|
}
|
|
1960
|
-
const
|
|
2033
|
+
const _e = (t) => (e, n, r, i) => {
|
|
1961
2034
|
const s = r ? Object.assign(r, { async: !1 }) : { async: !1 }, o = e._zod.run({ value: n, issues: [] }, s);
|
|
1962
2035
|
if (o instanceof Promise)
|
|
1963
|
-
throw new
|
|
2036
|
+
throw new j();
|
|
1964
2037
|
if (o.issues.length) {
|
|
1965
|
-
const a = new (i?.Err ?? t)(o.issues.map((c) =>
|
|
2038
|
+
const a = new (i?.Err ?? t)(o.issues.map((c) => R(c, s, C())));
|
|
1966
2039
|
throw nt(a, i?.callee), a;
|
|
1967
2040
|
}
|
|
1968
2041
|
return o.value;
|
|
1969
|
-
},
|
|
2042
|
+
}, ke = (t) => async (e, n, r, i) => {
|
|
1970
2043
|
const s = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
1971
2044
|
let o = e._zod.run({ value: n, issues: [] }, s);
|
|
1972
2045
|
if (o instanceof Promise && (o = await o), o.issues.length) {
|
|
1973
|
-
const a = new (i?.Err ?? t)(o.issues.map((c) =>
|
|
2046
|
+
const a = new (i?.Err ?? t)(o.issues.map((c) => R(c, s, C())));
|
|
1974
2047
|
throw nt(a, i?.callee), a;
|
|
1975
2048
|
}
|
|
1976
2049
|
return o.value;
|
|
1977
|
-
},
|
|
2050
|
+
}, ie = (t) => (e, n, r) => {
|
|
1978
2051
|
const i = r ? { ...r, async: !1 } : { async: !1 }, s = e._zod.run({ value: n, issues: [] }, i);
|
|
1979
2052
|
if (s instanceof Promise)
|
|
1980
|
-
throw new
|
|
2053
|
+
throw new j();
|
|
1981
2054
|
return s.issues.length ? {
|
|
1982
2055
|
success: !1,
|
|
1983
|
-
error: new (t ?? ot)(s.issues.map((o) =>
|
|
2056
|
+
error: new (t ?? ot)(s.issues.map((o) => R(o, i, C())))
|
|
1984
2057
|
} : { success: !0, data: s.value };
|
|
1985
|
-
},
|
|
2058
|
+
}, fn = /* @__PURE__ */ ie(at), se = (t) => async (e, n, r) => {
|
|
1986
2059
|
const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
1987
2060
|
let s = e._zod.run({ value: n, issues: [] }, i);
|
|
1988
2061
|
return s instanceof Promise && (s = await s), s.issues.length ? {
|
|
1989
2062
|
success: !1,
|
|
1990
|
-
error: new t(s.issues.map((o) =>
|
|
2063
|
+
error: new t(s.issues.map((o) => R(o, i, C())))
|
|
1991
2064
|
} : { success: !0, data: s.value };
|
|
1992
|
-
},
|
|
1993
|
-
const i = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
1994
|
-
return ve(t)(e, n, i);
|
|
1995
|
-
}, mn = (t) => (e, n, r) => ve(t)(e, n, r), gn = (t) => async (e, n, r) => {
|
|
2065
|
+
}, mn = /* @__PURE__ */ se(at), gn = (t) => (e, n, r) => {
|
|
1996
2066
|
const i = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
1997
2067
|
return _e(t)(e, n, i);
|
|
1998
|
-
}, vn = (t) =>
|
|
2068
|
+
}, vn = (t) => (e, n, r) => _e(t)(e, n, r), _n = (t) => async (e, n, r) => {
|
|
2069
|
+
const i = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
2070
|
+
return ke(t)(e, n, i);
|
|
2071
|
+
}, kn = (t) => async (e, n, r) => ke(t)(e, n, r), yn = (t) => (e, n, r) => {
|
|
1999
2072
|
const i = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
2000
|
-
return
|
|
2001
|
-
},
|
|
2073
|
+
return ie(t)(e, n, i);
|
|
2074
|
+
}, Tn = (t) => (e, n, r) => ie(t)(e, n, r), wn = (t) => async (e, n, r) => {
|
|
2002
2075
|
const i = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
2003
|
-
return
|
|
2004
|
-
},
|
|
2005
|
-
function
|
|
2006
|
-
return new RegExp(
|
|
2076
|
+
return se(t)(e, n, i);
|
|
2077
|
+
}, bn = (t) => async (e, n, r) => se(t)(e, n, r), En = /^[cC][^\s-]{8,}$/, In = /^[0-9a-z]+$/, zn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, $n = /^[0-9a-vA-V]{20}$/, On = /^[A-Za-z0-9]{27}$/, Pn = /^[a-zA-Z0-9_-]{21}$/, Sn = /^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})$/, ze = (t) => t ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[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)$/, An = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Zn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
2078
|
+
function Cn() {
|
|
2079
|
+
return new RegExp(Zn, "u");
|
|
2007
2080
|
}
|
|
2008
|
-
const
|
|
2081
|
+
const 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])$/, Ln = /^(([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}|:))$/, xn = /^((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])$/, Dn = /^(([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])$/, Fn = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, ct = /^[A-Za-z0-9_-]*$/, jn = /^\+(?:[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])))", Mn = /* @__PURE__ */ new RegExp(`^${ut}$`);
|
|
2009
2082
|
function ht(t) {
|
|
2010
2083
|
const e = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
2011
2084
|
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+)?)?`;
|
|
2012
2085
|
}
|
|
2013
|
-
function
|
|
2086
|
+
function Un(t) {
|
|
2014
2087
|
return new RegExp(`^${ht(t)}$`);
|
|
2015
2088
|
}
|
|
2016
|
-
function
|
|
2089
|
+
function Gn(t) {
|
|
2017
2090
|
const e = ht({ precision: t.precision }), n = ["Z"];
|
|
2018
2091
|
t.local && n.push(""), t.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
2019
2092
|
const r = `${e}(?:${n.join("|")})`;
|
|
2020
2093
|
return new RegExp(`^${ut}T(?:${r})$`);
|
|
2021
2094
|
}
|
|
2022
|
-
const
|
|
2095
|
+
const Vn = (t) => {
|
|
2023
2096
|
const e = t ? `[\\s\\S]{${t?.minimum ?? 0},${t?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
2024
2097
|
return new RegExp(`^${e}$`);
|
|
2025
|
-
},
|
|
2098
|
+
}, Bn = /^-?\d+$/, Jn = /^-?\d+(?:\.\d+)?/, Wn = /^[^A-Z]*$/, Kn = /^[^a-z]*$/, b = /* @__PURE__ */ u("$ZodCheck", (t, e) => {
|
|
2026
2099
|
var n;
|
|
2027
2100
|
t._zod ?? (t._zod = {}), t._zod.def = e, (n = t._zod).onattach ?? (n.onattach = []);
|
|
2028
2101
|
}), pt = {
|
|
@@ -2063,14 +2136,14 @@ const Un = (t) => {
|
|
|
2063
2136
|
continue: !e.abort
|
|
2064
2137
|
});
|
|
2065
2138
|
};
|
|
2066
|
-
}),
|
|
2139
|
+
}), Yn = /* @__PURE__ */ u("$ZodCheckMultipleOf", (t, e) => {
|
|
2067
2140
|
b.init(t, e), t._zod.onattach.push((n) => {
|
|
2068
2141
|
var r;
|
|
2069
2142
|
(r = n._zod.bag).multipleOf ?? (r.multipleOf = e.value);
|
|
2070
2143
|
}), t._zod.check = (n) => {
|
|
2071
2144
|
if (typeof n.value != typeof e.value)
|
|
2072
2145
|
throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
2073
|
-
(typeof n.value == "bigint" ? n.value % e.value === BigInt(0) :
|
|
2146
|
+
(typeof n.value == "bigint" ? n.value % e.value === BigInt(0) : Qt(n.value, e.value) === 0) || n.issues.push({
|
|
2074
2147
|
origin: typeof n.value,
|
|
2075
2148
|
code: "not_multiple_of",
|
|
2076
2149
|
divisor: e.value,
|
|
@@ -2079,12 +2152,12 @@ const Un = (t) => {
|
|
|
2079
2152
|
continue: !e.abort
|
|
2080
2153
|
});
|
|
2081
2154
|
};
|
|
2082
|
-
}),
|
|
2155
|
+
}), qn = /* @__PURE__ */ u("$ZodCheckNumberFormat", (t, e) => {
|
|
2083
2156
|
b.init(t, e), e.format = e.format || "float64";
|
|
2084
|
-
const n = e.format?.includes("int"), r = n ? "int" : "number", [i, s] =
|
|
2157
|
+
const n = e.format?.includes("int"), r = n ? "int" : "number", [i, s] = rn[e.format];
|
|
2085
2158
|
t._zod.onattach.push((o) => {
|
|
2086
2159
|
const a = o._zod.bag;
|
|
2087
|
-
a.format = e.format, a.minimum = i, a.maximum = s, n && (a.pattern =
|
|
2160
|
+
a.format = e.format, a.minimum = i, a.maximum = s, n && (a.pattern = Bn);
|
|
2088
2161
|
}), t._zod.check = (o) => {
|
|
2089
2162
|
const a = o.value;
|
|
2090
2163
|
if (n) {
|
|
@@ -2136,11 +2209,11 @@ const Un = (t) => {
|
|
|
2136
2209
|
inst: t
|
|
2137
2210
|
});
|
|
2138
2211
|
};
|
|
2139
|
-
}),
|
|
2212
|
+
}), Xn = /* @__PURE__ */ u("$ZodCheckMaxLength", (t, e) => {
|
|
2140
2213
|
var n;
|
|
2141
2214
|
b.init(t, e), (n = t._zod.def).when ?? (n.when = (r) => {
|
|
2142
2215
|
const i = r.value;
|
|
2143
|
-
return !
|
|
2216
|
+
return !me(i) && i.length !== void 0;
|
|
2144
2217
|
}), t._zod.onattach.push((r) => {
|
|
2145
2218
|
const i = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
2146
2219
|
e.maximum < i && (r._zod.bag.maximum = e.maximum);
|
|
@@ -2148,7 +2221,7 @@ const Un = (t) => {
|
|
|
2148
2221
|
const i = r.value;
|
|
2149
2222
|
if (i.length <= e.maximum)
|
|
2150
2223
|
return;
|
|
2151
|
-
const o =
|
|
2224
|
+
const o = ve(i);
|
|
2152
2225
|
r.issues.push({
|
|
2153
2226
|
origin: o,
|
|
2154
2227
|
code: "too_big",
|
|
@@ -2159,11 +2232,11 @@ const Un = (t) => {
|
|
|
2159
2232
|
continue: !e.abort
|
|
2160
2233
|
});
|
|
2161
2234
|
};
|
|
2162
|
-
}),
|
|
2235
|
+
}), Qn = /* @__PURE__ */ u("$ZodCheckMinLength", (t, e) => {
|
|
2163
2236
|
var n;
|
|
2164
2237
|
b.init(t, e), (n = t._zod.def).when ?? (n.when = (r) => {
|
|
2165
2238
|
const i = r.value;
|
|
2166
|
-
return !
|
|
2239
|
+
return !me(i) && i.length !== void 0;
|
|
2167
2240
|
}), t._zod.onattach.push((r) => {
|
|
2168
2241
|
const i = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
2169
2242
|
e.minimum > i && (r._zod.bag.minimum = e.minimum);
|
|
@@ -2171,7 +2244,7 @@ const Un = (t) => {
|
|
|
2171
2244
|
const i = r.value;
|
|
2172
2245
|
if (i.length >= e.minimum)
|
|
2173
2246
|
return;
|
|
2174
|
-
const o =
|
|
2247
|
+
const o = ve(i);
|
|
2175
2248
|
r.issues.push({
|
|
2176
2249
|
origin: o,
|
|
2177
2250
|
code: "too_small",
|
|
@@ -2182,11 +2255,11 @@ const Un = (t) => {
|
|
|
2182
2255
|
continue: !e.abort
|
|
2183
2256
|
});
|
|
2184
2257
|
};
|
|
2185
|
-
}),
|
|
2258
|
+
}), Hn = /* @__PURE__ */ u("$ZodCheckLengthEquals", (t, e) => {
|
|
2186
2259
|
var n;
|
|
2187
2260
|
b.init(t, e), (n = t._zod.def).when ?? (n.when = (r) => {
|
|
2188
2261
|
const i = r.value;
|
|
2189
|
-
return !
|
|
2262
|
+
return !me(i) && i.length !== void 0;
|
|
2190
2263
|
}), t._zod.onattach.push((r) => {
|
|
2191
2264
|
const i = r._zod.bag;
|
|
2192
2265
|
i.minimum = e.length, i.maximum = e.length, i.length = e.length;
|
|
@@ -2194,7 +2267,7 @@ const Un = (t) => {
|
|
|
2194
2267
|
const i = r.value, s = i.length;
|
|
2195
2268
|
if (s === e.length)
|
|
2196
2269
|
return;
|
|
2197
|
-
const o =
|
|
2270
|
+
const o = ve(i), a = s > e.length;
|
|
2198
2271
|
r.issues.push({
|
|
2199
2272
|
origin: o,
|
|
2200
2273
|
...a ? { code: "too_big", maximum: e.length } : { code: "too_small", minimum: e.length },
|
|
@@ -2205,7 +2278,7 @@ const Un = (t) => {
|
|
|
2205
2278
|
continue: !e.abort
|
|
2206
2279
|
});
|
|
2207
2280
|
};
|
|
2208
|
-
}),
|
|
2281
|
+
}), oe = /* @__PURE__ */ u("$ZodCheckStringFormat", (t, e) => {
|
|
2209
2282
|
var n, r;
|
|
2210
2283
|
b.init(t, e), t._zod.onattach.push((i) => {
|
|
2211
2284
|
const s = i._zod.bag;
|
|
@@ -2222,8 +2295,8 @@ const Un = (t) => {
|
|
|
2222
2295
|
});
|
|
2223
2296
|
}) : (r = t._zod).check ?? (r.check = () => {
|
|
2224
2297
|
});
|
|
2225
|
-
}),
|
|
2226
|
-
|
|
2298
|
+
}), er = /* @__PURE__ */ u("$ZodCheckRegex", (t, e) => {
|
|
2299
|
+
oe.init(t, e), t._zod.check = (n) => {
|
|
2227
2300
|
e.pattern.lastIndex = 0, !e.pattern.test(n.value) && n.issues.push({
|
|
2228
2301
|
origin: "string",
|
|
2229
2302
|
code: "invalid_format",
|
|
@@ -2234,13 +2307,13 @@ const Un = (t) => {
|
|
|
2234
2307
|
continue: !e.abort
|
|
2235
2308
|
});
|
|
2236
2309
|
};
|
|
2237
|
-
}),
|
|
2238
|
-
e.pattern ?? (e.pattern =
|
|
2239
|
-
}),
|
|
2240
|
-
e.pattern ?? (e.pattern =
|
|
2241
|
-
}),
|
|
2310
|
+
}), tr = /* @__PURE__ */ u("$ZodCheckLowerCase", (t, e) => {
|
|
2311
|
+
e.pattern ?? (e.pattern = Wn), oe.init(t, e);
|
|
2312
|
+
}), nr = /* @__PURE__ */ u("$ZodCheckUpperCase", (t, e) => {
|
|
2313
|
+
e.pattern ?? (e.pattern = Kn), oe.init(t, e);
|
|
2314
|
+
}), rr = /* @__PURE__ */ u("$ZodCheckIncludes", (t, e) => {
|
|
2242
2315
|
b.init(t, e);
|
|
2243
|
-
const n =
|
|
2316
|
+
const n = M(e.includes), r = new RegExp(typeof e.position == "number" ? `^.{${e.position}}${n}` : n);
|
|
2244
2317
|
e.pattern = r, t._zod.onattach.push((i) => {
|
|
2245
2318
|
const s = i._zod.bag;
|
|
2246
2319
|
s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(r);
|
|
@@ -2255,9 +2328,9 @@ const Un = (t) => {
|
|
|
2255
2328
|
continue: !e.abort
|
|
2256
2329
|
});
|
|
2257
2330
|
};
|
|
2258
|
-
}),
|
|
2331
|
+
}), ir = /* @__PURE__ */ u("$ZodCheckStartsWith", (t, e) => {
|
|
2259
2332
|
b.init(t, e);
|
|
2260
|
-
const n = new RegExp(`^${
|
|
2333
|
+
const n = new RegExp(`^${M(e.prefix)}.*`);
|
|
2261
2334
|
e.pattern ?? (e.pattern = n), t._zod.onattach.push((r) => {
|
|
2262
2335
|
const i = r._zod.bag;
|
|
2263
2336
|
i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(n);
|
|
@@ -2272,9 +2345,9 @@ const Un = (t) => {
|
|
|
2272
2345
|
continue: !e.abort
|
|
2273
2346
|
});
|
|
2274
2347
|
};
|
|
2275
|
-
}),
|
|
2348
|
+
}), sr = /* @__PURE__ */ u("$ZodCheckEndsWith", (t, e) => {
|
|
2276
2349
|
b.init(t, e);
|
|
2277
|
-
const n = new RegExp(`.*${
|
|
2350
|
+
const n = new RegExp(`.*${M(e.suffix)}$`);
|
|
2278
2351
|
e.pattern ?? (e.pattern = n), t._zod.onattach.push((r) => {
|
|
2279
2352
|
const i = r._zod.bag;
|
|
2280
2353
|
i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(n);
|
|
@@ -2289,12 +2362,12 @@ const Un = (t) => {
|
|
|
2289
2362
|
continue: !e.abort
|
|
2290
2363
|
});
|
|
2291
2364
|
};
|
|
2292
|
-
}),
|
|
2365
|
+
}), or = /* @__PURE__ */ u("$ZodCheckOverwrite", (t, e) => {
|
|
2293
2366
|
b.init(t, e), t._zod.check = (n) => {
|
|
2294
2367
|
n.value = e.tx(n.value);
|
|
2295
2368
|
};
|
|
2296
2369
|
});
|
|
2297
|
-
class
|
|
2370
|
+
class ar {
|
|
2298
2371
|
constructor(e = []) {
|
|
2299
2372
|
this.content = [], this.indent = 0, this && (this.args = e);
|
|
2300
2373
|
}
|
|
@@ -2317,13 +2390,13 @@ class sr {
|
|
|
2317
2390
|
`));
|
|
2318
2391
|
}
|
|
2319
2392
|
}
|
|
2320
|
-
const
|
|
2393
|
+
const cr = {
|
|
2321
2394
|
major: 4,
|
|
2322
2395
|
minor: 2,
|
|
2323
2396
|
patch: 1
|
|
2324
2397
|
}, k = /* @__PURE__ */ u("$ZodType", (t, e) => {
|
|
2325
2398
|
var n;
|
|
2326
|
-
t ?? (t = {}), t._zod.def = e, t._zod.bag = t._zod.bag || {}, t._zod.version =
|
|
2399
|
+
t ?? (t = {}), t._zod.def = e, t._zod.bag = t._zod.bag || {}, t._zod.version = cr;
|
|
2327
2400
|
const r = [...t._zod.def.checks ?? []];
|
|
2328
2401
|
t._zod.traits.has("$ZodCheck") && r.unshift(t);
|
|
2329
2402
|
for (const i of r)
|
|
@@ -2335,7 +2408,7 @@ const or = {
|
|
|
2335
2408
|
});
|
|
2336
2409
|
else {
|
|
2337
2410
|
const i = (o, a, c) => {
|
|
2338
|
-
let h =
|
|
2411
|
+
let h = F(o), p;
|
|
2339
2412
|
for (const d of a) {
|
|
2340
2413
|
if (d._zod.def.when) {
|
|
2341
2414
|
if (!d._zod.def.when(o))
|
|
@@ -2344,25 +2417,25 @@ const or = {
|
|
|
2344
2417
|
continue;
|
|
2345
2418
|
const f = o.issues.length, v = d._zod.check(o);
|
|
2346
2419
|
if (v instanceof Promise && c?.async === !1)
|
|
2347
|
-
throw new
|
|
2420
|
+
throw new j();
|
|
2348
2421
|
if (p || v instanceof Promise)
|
|
2349
2422
|
p = (p ?? Promise.resolve()).then(async () => {
|
|
2350
|
-
await v, o.issues.length !== f && (h || (h =
|
|
2423
|
+
await v, o.issues.length !== f && (h || (h = F(o, f)));
|
|
2351
2424
|
});
|
|
2352
2425
|
else {
|
|
2353
2426
|
if (o.issues.length === f)
|
|
2354
2427
|
continue;
|
|
2355
|
-
h || (h =
|
|
2428
|
+
h || (h = F(o, f));
|
|
2356
2429
|
}
|
|
2357
2430
|
}
|
|
2358
2431
|
return p ? p.then(() => o) : o;
|
|
2359
2432
|
}, s = (o, a, c) => {
|
|
2360
|
-
if (
|
|
2433
|
+
if (F(o))
|
|
2361
2434
|
return o.aborted = !0, o;
|
|
2362
2435
|
const h = i(a, r, c);
|
|
2363
2436
|
if (h instanceof Promise) {
|
|
2364
2437
|
if (c.async === !1)
|
|
2365
|
-
throw new
|
|
2438
|
+
throw new j();
|
|
2366
2439
|
return h.then((p) => t._zod.parse(p, c));
|
|
2367
2440
|
}
|
|
2368
2441
|
return t._zod.parse(h, c);
|
|
@@ -2377,7 +2450,7 @@ const or = {
|
|
|
2377
2450
|
const c = t._zod.parse(o, a);
|
|
2378
2451
|
if (c instanceof Promise) {
|
|
2379
2452
|
if (a.async === !1)
|
|
2380
|
-
throw new
|
|
2453
|
+
throw new j();
|
|
2381
2454
|
return c.then((h) => i(h, r, a));
|
|
2382
2455
|
}
|
|
2383
2456
|
return i(c, r, a);
|
|
@@ -2386,17 +2459,17 @@ const or = {
|
|
|
2386
2459
|
t["~standard"] = {
|
|
2387
2460
|
validate: (i) => {
|
|
2388
2461
|
try {
|
|
2389
|
-
const s =
|
|
2462
|
+
const s = fn(t, i);
|
|
2390
2463
|
return s.success ? { value: s.data } : { issues: s.error?.issues };
|
|
2391
2464
|
} catch {
|
|
2392
|
-
return
|
|
2465
|
+
return mn(t, i).then((o) => o.success ? { value: o.data } : { issues: o.error?.issues });
|
|
2393
2466
|
}
|
|
2394
2467
|
},
|
|
2395
2468
|
vendor: "zod",
|
|
2396
2469
|
version: 1
|
|
2397
2470
|
};
|
|
2398
|
-
}),
|
|
2399
|
-
k.init(t, e), t._zod.pattern = [...t?._zod.bag?.patterns ?? []].pop() ??
|
|
2471
|
+
}), ye = /* @__PURE__ */ u("$ZodString", (t, e) => {
|
|
2472
|
+
k.init(t, e), t._zod.pattern = [...t?._zod.bag?.patterns ?? []].pop() ?? Vn(t._zod.bag), t._zod.parse = (n, r) => {
|
|
2400
2473
|
if (e.coerce)
|
|
2401
2474
|
try {
|
|
2402
2475
|
n.value = String(n.value);
|
|
@@ -2410,10 +2483,10 @@ const or = {
|
|
|
2410
2483
|
}), n;
|
|
2411
2484
|
};
|
|
2412
2485
|
}), g = /* @__PURE__ */ u("$ZodStringFormat", (t, e) => {
|
|
2413
|
-
|
|
2414
|
-
}),
|
|
2415
|
-
e.pattern ?? (e.pattern =
|
|
2416
|
-
}),
|
|
2486
|
+
oe.init(t, e), ye.init(t, e);
|
|
2487
|
+
}), ur = /* @__PURE__ */ u("$ZodGUID", (t, e) => {
|
|
2488
|
+
e.pattern ?? (e.pattern = Nn), g.init(t, e);
|
|
2489
|
+
}), hr = /* @__PURE__ */ u("$ZodUUID", (t, e) => {
|
|
2417
2490
|
if (e.version) {
|
|
2418
2491
|
const r = {
|
|
2419
2492
|
v1: 1,
|
|
@@ -2427,13 +2500,13 @@ const or = {
|
|
|
2427
2500
|
}[e.version];
|
|
2428
2501
|
if (r === void 0)
|
|
2429
2502
|
throw new Error(`Invalid UUID version: "${e.version}"`);
|
|
2430
|
-
e.pattern ?? (e.pattern =
|
|
2503
|
+
e.pattern ?? (e.pattern = ze(r));
|
|
2431
2504
|
} else
|
|
2432
|
-
e.pattern ?? (e.pattern =
|
|
2505
|
+
e.pattern ?? (e.pattern = ze());
|
|
2433
2506
|
g.init(t, e);
|
|
2434
|
-
}),
|
|
2435
|
-
e.pattern ?? (e.pattern =
|
|
2436
|
-
}),
|
|
2507
|
+
}), pr = /* @__PURE__ */ u("$ZodEmail", (t, e) => {
|
|
2508
|
+
e.pattern ?? (e.pattern = An), g.init(t, e);
|
|
2509
|
+
}), lr = /* @__PURE__ */ u("$ZodURL", (t, e) => {
|
|
2437
2510
|
g.init(t, e), t._zod.check = (n) => {
|
|
2438
2511
|
try {
|
|
2439
2512
|
const r = n.value.trim(), i = new URL(r);
|
|
@@ -2465,32 +2538,32 @@ const or = {
|
|
|
2465
2538
|
});
|
|
2466
2539
|
}
|
|
2467
2540
|
};
|
|
2468
|
-
}),
|
|
2469
|
-
e.pattern ?? (e.pattern =
|
|
2470
|
-
}),
|
|
2471
|
-
e.pattern ?? (e.pattern =
|
|
2472
|
-
}),
|
|
2473
|
-
e.pattern ?? (e.pattern = wn), g.init(t, e);
|
|
2474
|
-
}), fr = /* @__PURE__ */ u("$ZodCUID2", (t, e) => {
|
|
2475
|
-
e.pattern ?? (e.pattern = bn), g.init(t, e);
|
|
2476
|
-
}), mr = /* @__PURE__ */ u("$ZodULID", (t, e) => {
|
|
2541
|
+
}), dr = /* @__PURE__ */ u("$ZodEmoji", (t, e) => {
|
|
2542
|
+
e.pattern ?? (e.pattern = Cn()), g.init(t, e);
|
|
2543
|
+
}), fr = /* @__PURE__ */ u("$ZodNanoID", (t, e) => {
|
|
2544
|
+
e.pattern ?? (e.pattern = Pn), g.init(t, e);
|
|
2545
|
+
}), mr = /* @__PURE__ */ u("$ZodCUID", (t, e) => {
|
|
2477
2546
|
e.pattern ?? (e.pattern = En), g.init(t, e);
|
|
2478
|
-
}), gr = /* @__PURE__ */ u("$
|
|
2479
|
-
e.pattern ?? (e.pattern = zn), g.init(t, e);
|
|
2480
|
-
}), vr = /* @__PURE__ */ u("$ZodKSUID", (t, e) => {
|
|
2547
|
+
}), gr = /* @__PURE__ */ u("$ZodCUID2", (t, e) => {
|
|
2481
2548
|
e.pattern ?? (e.pattern = In), g.init(t, e);
|
|
2482
|
-
}),
|
|
2483
|
-
e.pattern ?? (e.pattern =
|
|
2484
|
-
}),
|
|
2485
|
-
e.pattern ?? (e.pattern =
|
|
2486
|
-
}),
|
|
2487
|
-
e.pattern ?? (e.pattern = jn(e)), g.init(t, e);
|
|
2488
|
-
}), Tr = /* @__PURE__ */ u("$ZodISODuration", (t, e) => {
|
|
2549
|
+
}), vr = /* @__PURE__ */ u("$ZodULID", (t, e) => {
|
|
2550
|
+
e.pattern ?? (e.pattern = zn), g.init(t, e);
|
|
2551
|
+
}), _r = /* @__PURE__ */ u("$ZodXID", (t, e) => {
|
|
2552
|
+
e.pattern ?? (e.pattern = $n), g.init(t, e);
|
|
2553
|
+
}), kr = /* @__PURE__ */ u("$ZodKSUID", (t, e) => {
|
|
2489
2554
|
e.pattern ?? (e.pattern = On), g.init(t, e);
|
|
2490
|
-
}),
|
|
2491
|
-
e.pattern ?? (e.pattern =
|
|
2492
|
-
}),
|
|
2493
|
-
e.pattern ?? (e.pattern =
|
|
2555
|
+
}), yr = /* @__PURE__ */ u("$ZodISODateTime", (t, e) => {
|
|
2556
|
+
e.pattern ?? (e.pattern = Gn(e)), g.init(t, e);
|
|
2557
|
+
}), Tr = /* @__PURE__ */ u("$ZodISODate", (t, e) => {
|
|
2558
|
+
e.pattern ?? (e.pattern = Mn), g.init(t, e);
|
|
2559
|
+
}), wr = /* @__PURE__ */ u("$ZodISOTime", (t, e) => {
|
|
2560
|
+
e.pattern ?? (e.pattern = Un(e)), g.init(t, e);
|
|
2561
|
+
}), br = /* @__PURE__ */ u("$ZodISODuration", (t, e) => {
|
|
2562
|
+
e.pattern ?? (e.pattern = Sn), g.init(t, e);
|
|
2563
|
+
}), Er = /* @__PURE__ */ u("$ZodIPv4", (t, e) => {
|
|
2564
|
+
e.pattern ?? (e.pattern = Rn), g.init(t, e), t._zod.bag.format = "ipv4";
|
|
2565
|
+
}), Ir = /* @__PURE__ */ u("$ZodIPv6", (t, e) => {
|
|
2566
|
+
e.pattern ?? (e.pattern = Ln), g.init(t, e), t._zod.bag.format = "ipv6", t._zod.check = (n) => {
|
|
2494
2567
|
try {
|
|
2495
2568
|
new URL(`http://[${n.value}]`);
|
|
2496
2569
|
} catch {
|
|
@@ -2503,10 +2576,10 @@ const or = {
|
|
|
2503
2576
|
});
|
|
2504
2577
|
}
|
|
2505
2578
|
};
|
|
2506
|
-
}),
|
|
2507
|
-
e.pattern ?? (e.pattern =
|
|
2508
|
-
}),
|
|
2509
|
-
e.pattern ?? (e.pattern =
|
|
2579
|
+
}), zr = /* @__PURE__ */ u("$ZodCIDRv4", (t, e) => {
|
|
2580
|
+
e.pattern ?? (e.pattern = xn), g.init(t, e);
|
|
2581
|
+
}), $r = /* @__PURE__ */ u("$ZodCIDRv6", (t, e) => {
|
|
2582
|
+
e.pattern ?? (e.pattern = Dn), g.init(t, e), t._zod.check = (n) => {
|
|
2510
2583
|
const r = n.value.split("/");
|
|
2511
2584
|
try {
|
|
2512
2585
|
if (r.length !== 2)
|
|
@@ -2542,8 +2615,8 @@ function ft(t) {
|
|
|
2542
2615
|
return !1;
|
|
2543
2616
|
}
|
|
2544
2617
|
}
|
|
2545
|
-
const
|
|
2546
|
-
e.pattern ?? (e.pattern =
|
|
2618
|
+
const Or = /* @__PURE__ */ u("$ZodBase64", (t, e) => {
|
|
2619
|
+
e.pattern ?? (e.pattern = Fn), g.init(t, e), t._zod.bag.contentEncoding = "base64", t._zod.check = (n) => {
|
|
2547
2620
|
ft(n.value) || n.issues.push({
|
|
2548
2621
|
code: "invalid_format",
|
|
2549
2622
|
format: "base64",
|
|
@@ -2553,15 +2626,15 @@ const Ir = /* @__PURE__ */ u("$ZodBase64", (t, e) => {
|
|
|
2553
2626
|
});
|
|
2554
2627
|
};
|
|
2555
2628
|
});
|
|
2556
|
-
function
|
|
2629
|
+
function Pr(t) {
|
|
2557
2630
|
if (!ct.test(t))
|
|
2558
2631
|
return !1;
|
|
2559
2632
|
const e = t.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = e.padEnd(Math.ceil(e.length / 4) * 4, "=");
|
|
2560
2633
|
return ft(n);
|
|
2561
2634
|
}
|
|
2562
|
-
const
|
|
2635
|
+
const Sr = /* @__PURE__ */ u("$ZodBase64URL", (t, e) => {
|
|
2563
2636
|
e.pattern ?? (e.pattern = ct), g.init(t, e), t._zod.bag.contentEncoding = "base64url", t._zod.check = (n) => {
|
|
2564
|
-
|
|
2637
|
+
Pr(n.value) || n.issues.push({
|
|
2565
2638
|
code: "invalid_format",
|
|
2566
2639
|
format: "base64url",
|
|
2567
2640
|
input: n.value,
|
|
@@ -2569,10 +2642,10 @@ const Or = /* @__PURE__ */ u("$ZodBase64URL", (t, e) => {
|
|
|
2569
2642
|
continue: !e.abort
|
|
2570
2643
|
});
|
|
2571
2644
|
};
|
|
2572
|
-
}),
|
|
2573
|
-
e.pattern ?? (e.pattern =
|
|
2645
|
+
}), Nr = /* @__PURE__ */ u("$ZodE164", (t, e) => {
|
|
2646
|
+
e.pattern ?? (e.pattern = jn), g.init(t, e);
|
|
2574
2647
|
});
|
|
2575
|
-
function
|
|
2648
|
+
function Ar(t, e = null) {
|
|
2576
2649
|
try {
|
|
2577
2650
|
const n = t.split(".");
|
|
2578
2651
|
if (n.length !== 3)
|
|
@@ -2586,9 +2659,9 @@ function Nr(t, e = null) {
|
|
|
2586
2659
|
return !1;
|
|
2587
2660
|
}
|
|
2588
2661
|
}
|
|
2589
|
-
const
|
|
2662
|
+
const Zr = /* @__PURE__ */ u("$ZodJWT", (t, e) => {
|
|
2590
2663
|
g.init(t, e), t._zod.check = (n) => {
|
|
2591
|
-
|
|
2664
|
+
Ar(n.value, e.alg) || n.issues.push({
|
|
2592
2665
|
code: "invalid_format",
|
|
2593
2666
|
format: "jwt",
|
|
2594
2667
|
input: n.value,
|
|
@@ -2597,7 +2670,7 @@ const Pr = /* @__PURE__ */ u("$ZodJWT", (t, e) => {
|
|
|
2597
2670
|
});
|
|
2598
2671
|
};
|
|
2599
2672
|
}), mt = /* @__PURE__ */ u("$ZodNumber", (t, e) => {
|
|
2600
|
-
k.init(t, e), t._zod.pattern = t._zod.bag.pattern ??
|
|
2673
|
+
k.init(t, e), t._zod.pattern = t._zod.bag.pattern ?? Jn, t._zod.parse = (n, r) => {
|
|
2601
2674
|
if (e.coerce)
|
|
2602
2675
|
try {
|
|
2603
2676
|
n.value = Number(n.value);
|
|
@@ -2615,11 +2688,11 @@ const Pr = /* @__PURE__ */ u("$ZodJWT", (t, e) => {
|
|
|
2615
2688
|
...s ? { received: s } : {}
|
|
2616
2689
|
}), n;
|
|
2617
2690
|
};
|
|
2618
|
-
}),
|
|
2619
|
-
|
|
2620
|
-
}),
|
|
2691
|
+
}), Cr = /* @__PURE__ */ u("$ZodNumberFormat", (t, e) => {
|
|
2692
|
+
qn.init(t, e), mt.init(t, e);
|
|
2693
|
+
}), Rr = /* @__PURE__ */ u("$ZodUnknown", (t, e) => {
|
|
2621
2694
|
k.init(t, e), t._zod.parse = (n) => n;
|
|
2622
|
-
}),
|
|
2695
|
+
}), Lr = /* @__PURE__ */ u("$ZodNever", (t, e) => {
|
|
2623
2696
|
k.init(t, e), t._zod.parse = (n, r) => (n.issues.push({
|
|
2624
2697
|
expected: "never",
|
|
2625
2698
|
code: "invalid_type",
|
|
@@ -2630,7 +2703,7 @@ const Pr = /* @__PURE__ */ u("$ZodJWT", (t, e) => {
|
|
|
2630
2703
|
function $e(t, e, n) {
|
|
2631
2704
|
t.issues.length && e.issues.push(...it(n, t.issues)), e.value[n] = t.value;
|
|
2632
2705
|
}
|
|
2633
|
-
const
|
|
2706
|
+
const xr = /* @__PURE__ */ u("$ZodArray", (t, e) => {
|
|
2634
2707
|
k.init(t, e), t._zod.parse = (n, r) => {
|
|
2635
2708
|
const i = n.value;
|
|
2636
2709
|
if (!Array.isArray(i))
|
|
@@ -2652,7 +2725,7 @@ const Rr = /* @__PURE__ */ u("$ZodArray", (t, e) => {
|
|
|
2652
2725
|
return s.length ? Promise.all(s).then(() => n) : n;
|
|
2653
2726
|
};
|
|
2654
2727
|
});
|
|
2655
|
-
function
|
|
2728
|
+
function H(t, e, n, r) {
|
|
2656
2729
|
t.issues.length && e.issues.push(...it(n, t.issues)), t.value === void 0 ? n in r && (e.value[n] = void 0) : e.value[n] = t.value;
|
|
2657
2730
|
}
|
|
2658
2731
|
function gt(t) {
|
|
@@ -2660,7 +2733,7 @@ function gt(t) {
|
|
|
2660
2733
|
for (const r of e)
|
|
2661
2734
|
if (!t.shape?.[r]?._zod?.traits?.has("$ZodType"))
|
|
2662
2735
|
throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
|
|
2663
|
-
const n =
|
|
2736
|
+
const n = nn(t.shape);
|
|
2664
2737
|
return {
|
|
2665
2738
|
...t,
|
|
2666
2739
|
keys: e,
|
|
@@ -2679,7 +2752,7 @@ function vt(t, e, n, r, i, s) {
|
|
|
2679
2752
|
continue;
|
|
2680
2753
|
}
|
|
2681
2754
|
const d = c.run({ value: e[p], issues: [] }, r);
|
|
2682
|
-
d instanceof Promise ? t.push(d.then((f) =>
|
|
2755
|
+
d instanceof Promise ? t.push(d.then((f) => H(f, n, p, e))) : H(d, n, p, e);
|
|
2683
2756
|
}
|
|
2684
2757
|
return o.length && n.issues.push({
|
|
2685
2758
|
code: "unrecognized_keys",
|
|
@@ -2688,7 +2761,7 @@ function vt(t, e, n, r, i, s) {
|
|
|
2688
2761
|
inst: s
|
|
2689
2762
|
}), t.length ? Promise.all(t).then(() => n) : n;
|
|
2690
2763
|
}
|
|
2691
|
-
const
|
|
2764
|
+
const Dr = /* @__PURE__ */ u("$ZodObject", (t, e) => {
|
|
2692
2765
|
if (k.init(t, e), !Object.getOwnPropertyDescriptor(e, "shape")?.get) {
|
|
2693
2766
|
const a = e.shape;
|
|
2694
2767
|
Object.defineProperty(e, "shape", {
|
|
@@ -2700,7 +2773,7 @@ const Lr = /* @__PURE__ */ u("$ZodObject", (t, e) => {
|
|
|
2700
2773
|
}
|
|
2701
2774
|
});
|
|
2702
2775
|
}
|
|
2703
|
-
const r =
|
|
2776
|
+
const r = re(() => gt(e));
|
|
2704
2777
|
m(t._zod, "propValues", () => {
|
|
2705
2778
|
const a = e.shape, c = {};
|
|
2706
2779
|
for (const h in a) {
|
|
@@ -2713,7 +2786,7 @@ const Lr = /* @__PURE__ */ u("$ZodObject", (t, e) => {
|
|
|
2713
2786
|
}
|
|
2714
2787
|
return c;
|
|
2715
2788
|
});
|
|
2716
|
-
const i =
|
|
2789
|
+
const i = B, s = e.catchall;
|
|
2717
2790
|
let o;
|
|
2718
2791
|
t._zod.parse = (a, c) => {
|
|
2719
2792
|
o ?? (o = r.value);
|
|
@@ -2729,50 +2802,50 @@ const Lr = /* @__PURE__ */ u("$ZodObject", (t, e) => {
|
|
|
2729
2802
|
const p = [], d = o.shape;
|
|
2730
2803
|
for (const f of o.keys) {
|
|
2731
2804
|
const E = d[f]._zod.run({ value: h[f], issues: [] }, c);
|
|
2732
|
-
E instanceof Promise ? p.push(E.then((
|
|
2805
|
+
E instanceof Promise ? p.push(E.then((ce) => H(ce, a, f, h))) : H(E, a, f, h);
|
|
2733
2806
|
}
|
|
2734
2807
|
return s ? vt(p, h, a, c, r.value, t) : p.length ? Promise.all(p).then(() => a) : a;
|
|
2735
2808
|
};
|
|
2736
|
-
}),
|
|
2737
|
-
|
|
2738
|
-
const n = t._zod.parse, r =
|
|
2739
|
-
const v = new
|
|
2740
|
-
const
|
|
2741
|
-
return `shape[${
|
|
2809
|
+
}), Fr = /* @__PURE__ */ u("$ZodObjectJIT", (t, e) => {
|
|
2810
|
+
Dr.init(t, e);
|
|
2811
|
+
const n = t._zod.parse, r = re(() => gt(e)), i = (f) => {
|
|
2812
|
+
const v = new ar(["shape", "payload", "ctx"]), E = r.value, ce = (P) => {
|
|
2813
|
+
const O = Ie(P);
|
|
2814
|
+
return `shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`;
|
|
2742
2815
|
};
|
|
2743
2816
|
v.write("const input = payload.value;");
|
|
2744
2817
|
const we = /* @__PURE__ */ Object.create(null);
|
|
2745
2818
|
let St = 0;
|
|
2746
|
-
for (const
|
|
2747
|
-
we[
|
|
2819
|
+
for (const P of E.keys)
|
|
2820
|
+
we[P] = `key_${St++}`;
|
|
2748
2821
|
v.write("const newResult = {};");
|
|
2749
|
-
for (const
|
|
2750
|
-
const
|
|
2751
|
-
v.write(`const ${
|
|
2752
|
-
if (${
|
|
2753
|
-
payload.issues = payload.issues.concat(${
|
|
2822
|
+
for (const P of E.keys) {
|
|
2823
|
+
const O = we[P], G = Ie(P);
|
|
2824
|
+
v.write(`const ${O} = ${ce(P)};`), v.write(`
|
|
2825
|
+
if (${O}.issues.length) {
|
|
2826
|
+
payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
|
|
2754
2827
|
...iss,
|
|
2755
|
-
path: iss.path ? [${
|
|
2828
|
+
path: iss.path ? [${G}, ...iss.path] : [${G}]
|
|
2756
2829
|
})));
|
|
2757
2830
|
}
|
|
2758
2831
|
|
|
2759
2832
|
|
|
2760
|
-
if (${
|
|
2761
|
-
if (${
|
|
2762
|
-
newResult[${
|
|
2833
|
+
if (${O}.value === undefined) {
|
|
2834
|
+
if (${G} in input) {
|
|
2835
|
+
newResult[${G}] = undefined;
|
|
2763
2836
|
}
|
|
2764
2837
|
} else {
|
|
2765
|
-
newResult[${
|
|
2838
|
+
newResult[${G}] = ${O}.value;
|
|
2766
2839
|
}
|
|
2767
2840
|
|
|
2768
2841
|
`);
|
|
2769
2842
|
}
|
|
2770
2843
|
v.write("payload.value = newResult;"), v.write("return payload;");
|
|
2771
2844
|
const Nt = v.compile();
|
|
2772
|
-
return (
|
|
2845
|
+
return (P, O) => Nt(f, P, O);
|
|
2773
2846
|
};
|
|
2774
2847
|
let s;
|
|
2775
|
-
const o =
|
|
2848
|
+
const o = B, a = !et.jitless, h = a && en.value, p = e.catchall;
|
|
2776
2849
|
let d;
|
|
2777
2850
|
t._zod.parse = (f, v) => {
|
|
2778
2851
|
d ?? (d = r.value);
|
|
@@ -2789,12 +2862,12 @@ function Oe(t, e, n, r) {
|
|
|
2789
2862
|
for (const s of t)
|
|
2790
2863
|
if (s.issues.length === 0)
|
|
2791
2864
|
return e.value = s.value, e;
|
|
2792
|
-
const i = t.filter((s) => !
|
|
2865
|
+
const i = t.filter((s) => !F(s));
|
|
2793
2866
|
return i.length === 1 ? (e.value = i[0].value, i[0]) : (e.issues.push({
|
|
2794
2867
|
code: "invalid_union",
|
|
2795
2868
|
input: e.value,
|
|
2796
2869
|
inst: n,
|
|
2797
|
-
errors: t.map((s) => s.issues.map((o) =>
|
|
2870
|
+
errors: t.map((s) => s.issues.map((o) => R(o, r, C())))
|
|
2798
2871
|
}), e);
|
|
2799
2872
|
}
|
|
2800
2873
|
const _t = /* @__PURE__ */ u("$ZodUnion", (t, e) => {
|
|
@@ -2804,7 +2877,7 @@ const _t = /* @__PURE__ */ u("$ZodUnion", (t, e) => {
|
|
|
2804
2877
|
}), m(t._zod, "pattern", () => {
|
|
2805
2878
|
if (e.options.every((i) => i._zod.pattern)) {
|
|
2806
2879
|
const i = e.options.map((s) => s._zod.pattern);
|
|
2807
|
-
return new RegExp(`^(${i.map((s) =>
|
|
2880
|
+
return new RegExp(`^(${i.map((s) => ge(s.source)).join("|")})$`);
|
|
2808
2881
|
}
|
|
2809
2882
|
});
|
|
2810
2883
|
const n = e.options.length === 1, r = e.options[0]._zod.run;
|
|
@@ -2828,7 +2901,7 @@ const _t = /* @__PURE__ */ u("$ZodUnion", (t, e) => {
|
|
|
2828
2901
|
}
|
|
2829
2902
|
return o ? Promise.all(a).then((c) => Oe(c, i, t, s)) : Oe(a, i, t, s);
|
|
2830
2903
|
};
|
|
2831
|
-
}),
|
|
2904
|
+
}), jr = /* @__PURE__ */ u("$ZodDiscriminatedUnion", (t, e) => {
|
|
2832
2905
|
e.inclusive = !1, _t.init(t, e);
|
|
2833
2906
|
const n = t._zod.parse;
|
|
2834
2907
|
m(t._zod, "propValues", () => {
|
|
@@ -2845,7 +2918,7 @@ const _t = /* @__PURE__ */ u("$ZodUnion", (t, e) => {
|
|
|
2845
2918
|
}
|
|
2846
2919
|
return i;
|
|
2847
2920
|
});
|
|
2848
|
-
const r =
|
|
2921
|
+
const r = re(() => {
|
|
2849
2922
|
const i = e.options, s = /* @__PURE__ */ new Map();
|
|
2850
2923
|
for (const o of i) {
|
|
2851
2924
|
const a = o._zod.propValues?.[e.discriminator];
|
|
@@ -2861,7 +2934,7 @@ const _t = /* @__PURE__ */ u("$ZodUnion", (t, e) => {
|
|
|
2861
2934
|
});
|
|
2862
2935
|
t._zod.parse = (i, s) => {
|
|
2863
2936
|
const o = i.value;
|
|
2864
|
-
if (!
|
|
2937
|
+
if (!B(o))
|
|
2865
2938
|
return i.issues.push({
|
|
2866
2939
|
code: "invalid_type",
|
|
2867
2940
|
expected: "object",
|
|
@@ -2879,21 +2952,21 @@ const _t = /* @__PURE__ */ u("$ZodUnion", (t, e) => {
|
|
|
2879
2952
|
inst: t
|
|
2880
2953
|
}), i);
|
|
2881
2954
|
};
|
|
2882
|
-
}),
|
|
2955
|
+
}), Mr = /* @__PURE__ */ u("$ZodIntersection", (t, e) => {
|
|
2883
2956
|
k.init(t, e), t._zod.parse = (n, r) => {
|
|
2884
2957
|
const i = n.value, s = e.left._zod.run({ value: i, issues: [] }, r), o = e.right._zod.run({ value: i, issues: [] }, r);
|
|
2885
|
-
return s instanceof Promise || o instanceof Promise ? Promise.all([s, o]).then(([c, h]) =>
|
|
2958
|
+
return s instanceof Promise || o instanceof Promise ? Promise.all([s, o]).then(([c, h]) => Pe(n, c, h)) : Pe(n, s, o);
|
|
2886
2959
|
};
|
|
2887
2960
|
});
|
|
2888
|
-
function
|
|
2961
|
+
function de(t, e) {
|
|
2889
2962
|
if (t === e)
|
|
2890
2963
|
return { valid: !0, data: t };
|
|
2891
2964
|
if (t instanceof Date && e instanceof Date && +t == +e)
|
|
2892
2965
|
return { valid: !0, data: t };
|
|
2893
|
-
if (
|
|
2966
|
+
if (J(t) && J(e)) {
|
|
2894
2967
|
const n = Object.keys(e), r = Object.keys(t).filter((s) => n.indexOf(s) !== -1), i = { ...t, ...e };
|
|
2895
2968
|
for (const s of r) {
|
|
2896
|
-
const o =
|
|
2969
|
+
const o = de(t[s], e[s]);
|
|
2897
2970
|
if (!o.valid)
|
|
2898
2971
|
return {
|
|
2899
2972
|
valid: !1,
|
|
@@ -2908,7 +2981,7 @@ function pe(t, e) {
|
|
|
2908
2981
|
return { valid: !1, mergeErrorPath: [] };
|
|
2909
2982
|
const n = [];
|
|
2910
2983
|
for (let r = 0; r < t.length; r++) {
|
|
2911
|
-
const i = t[r], s = e[r], o =
|
|
2984
|
+
const i = t[r], s = e[r], o = de(i, s);
|
|
2912
2985
|
if (!o.valid)
|
|
2913
2986
|
return {
|
|
2914
2987
|
valid: !1,
|
|
@@ -2920,18 +2993,18 @@ function pe(t, e) {
|
|
|
2920
2993
|
}
|
|
2921
2994
|
return { valid: !1, mergeErrorPath: [] };
|
|
2922
2995
|
}
|
|
2923
|
-
function
|
|
2924
|
-
if (e.issues.length && t.issues.push(...e.issues), n.issues.length && t.issues.push(...n.issues),
|
|
2996
|
+
function Pe(t, e, n) {
|
|
2997
|
+
if (e.issues.length && t.issues.push(...e.issues), n.issues.length && t.issues.push(...n.issues), F(t))
|
|
2925
2998
|
return t;
|
|
2926
|
-
const r =
|
|
2999
|
+
const r = de(e.value, n.value);
|
|
2927
3000
|
if (!r.valid)
|
|
2928
3001
|
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
|
|
2929
3002
|
return t.value = r.data, t;
|
|
2930
3003
|
}
|
|
2931
|
-
const
|
|
3004
|
+
const Ur = /* @__PURE__ */ u("$ZodEnum", (t, e) => {
|
|
2932
3005
|
k.init(t, e);
|
|
2933
3006
|
const n = tt(e.entries), r = new Set(n);
|
|
2934
|
-
t._zod.values = r, t._zod.pattern = new RegExp(`^(${n.filter((i) =>
|
|
3007
|
+
t._zod.values = r, t._zod.pattern = new RegExp(`^(${n.filter((i) => tn.has(typeof i)).map((i) => typeof i == "string" ? M(i) : i.toString()).join("|")})$`), t._zod.parse = (i, s) => {
|
|
2935
3008
|
const o = i.value;
|
|
2936
3009
|
return r.has(o) || i.issues.push({
|
|
2937
3010
|
code: "invalid_value",
|
|
@@ -2940,11 +3013,11 @@ const jr = /* @__PURE__ */ u("$ZodEnum", (t, e) => {
|
|
|
2940
3013
|
inst: t
|
|
2941
3014
|
}), i;
|
|
2942
3015
|
};
|
|
2943
|
-
}),
|
|
3016
|
+
}), Gr = /* @__PURE__ */ u("$ZodLiteral", (t, e) => {
|
|
2944
3017
|
if (k.init(t, e), e.values.length === 0)
|
|
2945
3018
|
throw new Error("Cannot create literal schema with no valid values");
|
|
2946
3019
|
const n = new Set(e.values);
|
|
2947
|
-
t._zod.values = n, t._zod.pattern = new RegExp(`^(${e.values.map((r) => typeof r == "string" ?
|
|
3020
|
+
t._zod.values = n, t._zod.pattern = new RegExp(`^(${e.values.map((r) => typeof r == "string" ? M(r) : r ? M(r.toString()) : String(r)).join("|")})$`), t._zod.parse = (r, i) => {
|
|
2948
3021
|
const s = r.value;
|
|
2949
3022
|
return n.has(s) || r.issues.push({
|
|
2950
3023
|
code: "invalid_value",
|
|
@@ -2953,7 +3026,7 @@ const jr = /* @__PURE__ */ u("$ZodEnum", (t, e) => {
|
|
|
2953
3026
|
inst: t
|
|
2954
3027
|
}), r;
|
|
2955
3028
|
};
|
|
2956
|
-
}),
|
|
3029
|
+
}), Vr = /* @__PURE__ */ u("$ZodTransform", (t, e) => {
|
|
2957
3030
|
k.init(t, e), t._zod.parse = (n, r) => {
|
|
2958
3031
|
if (r.direction === "backward")
|
|
2959
3032
|
throw new He(t.constructor.name);
|
|
@@ -2961,45 +3034,45 @@ const jr = /* @__PURE__ */ u("$ZodEnum", (t, e) => {
|
|
|
2961
3034
|
if (r.async)
|
|
2962
3035
|
return (i instanceof Promise ? i : Promise.resolve(i)).then((o) => (n.value = o, n));
|
|
2963
3036
|
if (i instanceof Promise)
|
|
2964
|
-
throw new
|
|
3037
|
+
throw new j();
|
|
2965
3038
|
return n.value = i, n;
|
|
2966
3039
|
};
|
|
2967
3040
|
});
|
|
2968
|
-
function
|
|
3041
|
+
function Se(t, e) {
|
|
2969
3042
|
return t.issues.length && e === void 0 ? { issues: [], value: void 0 } : t;
|
|
2970
3043
|
}
|
|
2971
|
-
const
|
|
3044
|
+
const Br = /* @__PURE__ */ u("$ZodOptional", (t, e) => {
|
|
2972
3045
|
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", () => {
|
|
2973
3046
|
const n = e.innerType._zod.pattern;
|
|
2974
|
-
return n ? new RegExp(`^(${
|
|
3047
|
+
return n ? new RegExp(`^(${ge(n.source)})?$`) : void 0;
|
|
2975
3048
|
}), t._zod.parse = (n, r) => {
|
|
2976
3049
|
if (e.innerType._zod.optin === "optional") {
|
|
2977
3050
|
const i = e.innerType._zod.run(n, r);
|
|
2978
|
-
return i instanceof Promise ? i.then((s) =>
|
|
3051
|
+
return i instanceof Promise ? i.then((s) => Se(s, n.value)) : Se(i, n.value);
|
|
2979
3052
|
}
|
|
2980
3053
|
return n.value === void 0 ? n : e.innerType._zod.run(n, r);
|
|
2981
3054
|
};
|
|
2982
|
-
}),
|
|
3055
|
+
}), Jr = /* @__PURE__ */ u("$ZodNullable", (t, e) => {
|
|
2983
3056
|
k.init(t, e), m(t._zod, "optin", () => e.innerType._zod.optin), m(t._zod, "optout", () => e.innerType._zod.optout), m(t._zod, "pattern", () => {
|
|
2984
3057
|
const n = e.innerType._zod.pattern;
|
|
2985
|
-
return n ? new RegExp(`^(${
|
|
3058
|
+
return n ? new RegExp(`^(${ge(n.source)}|null)$`) : void 0;
|
|
2986
3059
|
}), 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);
|
|
2987
|
-
}),
|
|
3060
|
+
}), Wr = /* @__PURE__ */ u("$ZodDefault", (t, e) => {
|
|
2988
3061
|
k.init(t, e), t._zod.optin = "optional", m(t._zod, "values", () => e.innerType._zod.values), t._zod.parse = (n, r) => {
|
|
2989
3062
|
if (r.direction === "backward")
|
|
2990
3063
|
return e.innerType._zod.run(n, r);
|
|
2991
3064
|
if (n.value === void 0)
|
|
2992
3065
|
return n.value = e.defaultValue, n;
|
|
2993
3066
|
const i = e.innerType._zod.run(n, r);
|
|
2994
|
-
return i instanceof Promise ? i.then((s) =>
|
|
3067
|
+
return i instanceof Promise ? i.then((s) => Ne(s, e)) : Ne(i, e);
|
|
2995
3068
|
};
|
|
2996
3069
|
});
|
|
2997
|
-
function
|
|
3070
|
+
function Ne(t, e) {
|
|
2998
3071
|
return t.value === void 0 && (t.value = e.defaultValue), t;
|
|
2999
3072
|
}
|
|
3000
|
-
const
|
|
3073
|
+
const Kr = /* @__PURE__ */ u("$ZodPrefault", (t, e) => {
|
|
3001
3074
|
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));
|
|
3002
|
-
}),
|
|
3075
|
+
}), Yr = /* @__PURE__ */ u("$ZodNonOptional", (t, e) => {
|
|
3003
3076
|
k.init(t, e), m(t._zod, "values", () => {
|
|
3004
3077
|
const n = e.innerType._zod.values;
|
|
3005
3078
|
return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
|
|
@@ -3016,7 +3089,7 @@ function Ae(t, e) {
|
|
|
3016
3089
|
inst: e
|
|
3017
3090
|
}), t;
|
|
3018
3091
|
}
|
|
3019
|
-
const
|
|
3092
|
+
const qr = /* @__PURE__ */ u("$ZodCatch", (t, e) => {
|
|
3020
3093
|
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) => {
|
|
3021
3094
|
if (r.direction === "backward")
|
|
3022
3095
|
return e.innerType._zod.run(n, r);
|
|
@@ -3024,31 +3097,31 @@ const Kr = /* @__PURE__ */ u("$ZodCatch", (t, e) => {
|
|
|
3024
3097
|
return i instanceof Promise ? i.then((s) => (n.value = s.value, s.issues.length && (n.value = e.catchValue({
|
|
3025
3098
|
...n,
|
|
3026
3099
|
error: {
|
|
3027
|
-
issues: s.issues.map((o) =>
|
|
3100
|
+
issues: s.issues.map((o) => R(o, r, C()))
|
|
3028
3101
|
},
|
|
3029
3102
|
input: n.value
|
|
3030
3103
|
}), n.issues = []), n)) : (n.value = i.value, i.issues.length && (n.value = e.catchValue({
|
|
3031
3104
|
...n,
|
|
3032
3105
|
error: {
|
|
3033
|
-
issues: i.issues.map((s) =>
|
|
3106
|
+
issues: i.issues.map((s) => R(s, r, C()))
|
|
3034
3107
|
},
|
|
3035
3108
|
input: n.value
|
|
3036
3109
|
}), n.issues = []), n);
|
|
3037
3110
|
};
|
|
3038
|
-
}),
|
|
3111
|
+
}), Xr = /* @__PURE__ */ u("$ZodPipe", (t, e) => {
|
|
3039
3112
|
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) => {
|
|
3040
3113
|
if (r.direction === "backward") {
|
|
3041
3114
|
const s = e.out._zod.run(n, r);
|
|
3042
|
-
return s instanceof Promise ? s.then((o) =>
|
|
3115
|
+
return s instanceof Promise ? s.then((o) => q(o, e.in, r)) : q(s, e.in, r);
|
|
3043
3116
|
}
|
|
3044
3117
|
const i = e.in._zod.run(n, r);
|
|
3045
|
-
return i instanceof Promise ? i.then((s) =>
|
|
3118
|
+
return i instanceof Promise ? i.then((s) => q(s, e.out, r)) : q(i, e.out, r);
|
|
3046
3119
|
};
|
|
3047
3120
|
});
|
|
3048
|
-
function
|
|
3121
|
+
function q(t, e, n) {
|
|
3049
3122
|
return t.issues.length ? (t.aborted = !0, t) : e._zod.run({ value: t.value, issues: t.issues }, n);
|
|
3050
3123
|
}
|
|
3051
|
-
const
|
|
3124
|
+
const Qr = /* @__PURE__ */ u("$ZodReadonly", (t, e) => {
|
|
3052
3125
|
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) => {
|
|
3053
3126
|
if (r.direction === "backward")
|
|
3054
3127
|
return e.innerType._zod.run(n, r);
|
|
@@ -3059,7 +3132,7 @@ const Xr = /* @__PURE__ */ u("$ZodReadonly", (t, e) => {
|
|
|
3059
3132
|
function Ze(t) {
|
|
3060
3133
|
return t.value = Object.freeze(t.value), t;
|
|
3061
3134
|
}
|
|
3062
|
-
const
|
|
3135
|
+
const Hr = /* @__PURE__ */ u("$ZodCustom", (t, e) => {
|
|
3063
3136
|
b.init(t, e), k.init(t, e), t._zod.parse = (n, r) => n, t._zod.check = (n) => {
|
|
3064
3137
|
const r = n.value, i = e.fn(r);
|
|
3065
3138
|
if (i instanceof Promise)
|
|
@@ -3079,11 +3152,11 @@ function Ce(t, e, n, r) {
|
|
|
3079
3152
|
continue: !r._zod.def.abort
|
|
3080
3153
|
// params: inst._zod.def.params,
|
|
3081
3154
|
};
|
|
3082
|
-
r._zod.def.params && (i.params = r._zod.def.params), e.issues.push(
|
|
3155
|
+
r._zod.def.params && (i.params = r._zod.def.params), e.issues.push(W(i));
|
|
3083
3156
|
}
|
|
3084
3157
|
}
|
|
3085
3158
|
var Re;
|
|
3086
|
-
class
|
|
3159
|
+
class ei {
|
|
3087
3160
|
constructor() {
|
|
3088
3161
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
3089
3162
|
}
|
|
@@ -3117,18 +3190,18 @@ class Qr {
|
|
|
3117
3190
|
return this._map.has(e);
|
|
3118
3191
|
}
|
|
3119
3192
|
}
|
|
3120
|
-
function
|
|
3121
|
-
return new
|
|
3193
|
+
function ti() {
|
|
3194
|
+
return new ei();
|
|
3122
3195
|
}
|
|
3123
|
-
(Re = globalThis).__zod_globalRegistry ?? (Re.__zod_globalRegistry =
|
|
3124
|
-
const
|
|
3125
|
-
function
|
|
3196
|
+
(Re = globalThis).__zod_globalRegistry ?? (Re.__zod_globalRegistry = ti());
|
|
3197
|
+
const V = globalThis.__zod_globalRegistry;
|
|
3198
|
+
function ni(t, e) {
|
|
3126
3199
|
return new t({
|
|
3127
3200
|
type: "string",
|
|
3128
3201
|
...l(e)
|
|
3129
3202
|
});
|
|
3130
3203
|
}
|
|
3131
|
-
function
|
|
3204
|
+
function ri(t, e) {
|
|
3132
3205
|
return new t({
|
|
3133
3206
|
type: "string",
|
|
3134
3207
|
format: "email",
|
|
@@ -3146,7 +3219,7 @@ function Le(t, e) {
|
|
|
3146
3219
|
...l(e)
|
|
3147
3220
|
});
|
|
3148
3221
|
}
|
|
3149
|
-
function
|
|
3222
|
+
function ii(t, e) {
|
|
3150
3223
|
return new t({
|
|
3151
3224
|
type: "string",
|
|
3152
3225
|
format: "uuid",
|
|
@@ -3155,7 +3228,7 @@ function ni(t, e) {
|
|
|
3155
3228
|
...l(e)
|
|
3156
3229
|
});
|
|
3157
3230
|
}
|
|
3158
|
-
function
|
|
3231
|
+
function si(t, e) {
|
|
3159
3232
|
return new t({
|
|
3160
3233
|
type: "string",
|
|
3161
3234
|
format: "uuid",
|
|
@@ -3165,7 +3238,7 @@ function ri(t, e) {
|
|
|
3165
3238
|
...l(e)
|
|
3166
3239
|
});
|
|
3167
3240
|
}
|
|
3168
|
-
function
|
|
3241
|
+
function oi(t, e) {
|
|
3169
3242
|
return new t({
|
|
3170
3243
|
type: "string",
|
|
3171
3244
|
format: "uuid",
|
|
@@ -3175,7 +3248,7 @@ function ii(t, e) {
|
|
|
3175
3248
|
...l(e)
|
|
3176
3249
|
});
|
|
3177
3250
|
}
|
|
3178
|
-
function
|
|
3251
|
+
function ai(t, e) {
|
|
3179
3252
|
return new t({
|
|
3180
3253
|
type: "string",
|
|
3181
3254
|
format: "uuid",
|
|
@@ -3185,7 +3258,7 @@ function si(t, e) {
|
|
|
3185
3258
|
...l(e)
|
|
3186
3259
|
});
|
|
3187
3260
|
}
|
|
3188
|
-
function
|
|
3261
|
+
function ci(t, e) {
|
|
3189
3262
|
return new t({
|
|
3190
3263
|
type: "string",
|
|
3191
3264
|
format: "url",
|
|
@@ -3194,7 +3267,7 @@ function oi(t, e) {
|
|
|
3194
3267
|
...l(e)
|
|
3195
3268
|
});
|
|
3196
3269
|
}
|
|
3197
|
-
function
|
|
3270
|
+
function ui(t, e) {
|
|
3198
3271
|
return new t({
|
|
3199
3272
|
type: "string",
|
|
3200
3273
|
format: "emoji",
|
|
@@ -3203,7 +3276,7 @@ function ai(t, e) {
|
|
|
3203
3276
|
...l(e)
|
|
3204
3277
|
});
|
|
3205
3278
|
}
|
|
3206
|
-
function
|
|
3279
|
+
function hi(t, e) {
|
|
3207
3280
|
return new t({
|
|
3208
3281
|
type: "string",
|
|
3209
3282
|
format: "nanoid",
|
|
@@ -3212,7 +3285,7 @@ function ci(t, e) {
|
|
|
3212
3285
|
...l(e)
|
|
3213
3286
|
});
|
|
3214
3287
|
}
|
|
3215
|
-
function
|
|
3288
|
+
function pi(t, e) {
|
|
3216
3289
|
return new t({
|
|
3217
3290
|
type: "string",
|
|
3218
3291
|
format: "cuid",
|
|
@@ -3221,7 +3294,7 @@ function ui(t, e) {
|
|
|
3221
3294
|
...l(e)
|
|
3222
3295
|
});
|
|
3223
3296
|
}
|
|
3224
|
-
function
|
|
3297
|
+
function li(t, e) {
|
|
3225
3298
|
return new t({
|
|
3226
3299
|
type: "string",
|
|
3227
3300
|
format: "cuid2",
|
|
@@ -3230,7 +3303,7 @@ function hi(t, e) {
|
|
|
3230
3303
|
...l(e)
|
|
3231
3304
|
});
|
|
3232
3305
|
}
|
|
3233
|
-
function
|
|
3306
|
+
function di(t, e) {
|
|
3234
3307
|
return new t({
|
|
3235
3308
|
type: "string",
|
|
3236
3309
|
format: "ulid",
|
|
@@ -3239,7 +3312,7 @@ function pi(t, e) {
|
|
|
3239
3312
|
...l(e)
|
|
3240
3313
|
});
|
|
3241
3314
|
}
|
|
3242
|
-
function
|
|
3315
|
+
function fi(t, e) {
|
|
3243
3316
|
return new t({
|
|
3244
3317
|
type: "string",
|
|
3245
3318
|
format: "xid",
|
|
@@ -3248,7 +3321,7 @@ function li(t, e) {
|
|
|
3248
3321
|
...l(e)
|
|
3249
3322
|
});
|
|
3250
3323
|
}
|
|
3251
|
-
function
|
|
3324
|
+
function mi(t, e) {
|
|
3252
3325
|
return new t({
|
|
3253
3326
|
type: "string",
|
|
3254
3327
|
format: "ksuid",
|
|
@@ -3257,7 +3330,7 @@ function di(t, e) {
|
|
|
3257
3330
|
...l(e)
|
|
3258
3331
|
});
|
|
3259
3332
|
}
|
|
3260
|
-
function
|
|
3333
|
+
function gi(t, e) {
|
|
3261
3334
|
return new t({
|
|
3262
3335
|
type: "string",
|
|
3263
3336
|
format: "ipv4",
|
|
@@ -3266,7 +3339,7 @@ function fi(t, e) {
|
|
|
3266
3339
|
...l(e)
|
|
3267
3340
|
});
|
|
3268
3341
|
}
|
|
3269
|
-
function
|
|
3342
|
+
function vi(t, e) {
|
|
3270
3343
|
return new t({
|
|
3271
3344
|
type: "string",
|
|
3272
3345
|
format: "ipv6",
|
|
@@ -3275,7 +3348,7 @@ function mi(t, e) {
|
|
|
3275
3348
|
...l(e)
|
|
3276
3349
|
});
|
|
3277
3350
|
}
|
|
3278
|
-
function
|
|
3351
|
+
function _i(t, e) {
|
|
3279
3352
|
return new t({
|
|
3280
3353
|
type: "string",
|
|
3281
3354
|
format: "cidrv4",
|
|
@@ -3284,7 +3357,7 @@ function gi(t, e) {
|
|
|
3284
3357
|
...l(e)
|
|
3285
3358
|
});
|
|
3286
3359
|
}
|
|
3287
|
-
function
|
|
3360
|
+
function ki(t, e) {
|
|
3288
3361
|
return new t({
|
|
3289
3362
|
type: "string",
|
|
3290
3363
|
format: "cidrv6",
|
|
@@ -3293,7 +3366,7 @@ function vi(t, e) {
|
|
|
3293
3366
|
...l(e)
|
|
3294
3367
|
});
|
|
3295
3368
|
}
|
|
3296
|
-
function
|
|
3369
|
+
function yi(t, e) {
|
|
3297
3370
|
return new t({
|
|
3298
3371
|
type: "string",
|
|
3299
3372
|
format: "base64",
|
|
@@ -3302,7 +3375,7 @@ function _i(t, e) {
|
|
|
3302
3375
|
...l(e)
|
|
3303
3376
|
});
|
|
3304
3377
|
}
|
|
3305
|
-
function
|
|
3378
|
+
function Ti(t, e) {
|
|
3306
3379
|
return new t({
|
|
3307
3380
|
type: "string",
|
|
3308
3381
|
format: "base64url",
|
|
@@ -3311,7 +3384,7 @@ function ki(t, e) {
|
|
|
3311
3384
|
...l(e)
|
|
3312
3385
|
});
|
|
3313
3386
|
}
|
|
3314
|
-
function
|
|
3387
|
+
function wi(t, e) {
|
|
3315
3388
|
return new t({
|
|
3316
3389
|
type: "string",
|
|
3317
3390
|
format: "e164",
|
|
@@ -3320,7 +3393,7 @@ function yi(t, e) {
|
|
|
3320
3393
|
...l(e)
|
|
3321
3394
|
});
|
|
3322
3395
|
}
|
|
3323
|
-
function
|
|
3396
|
+
function bi(t, e) {
|
|
3324
3397
|
return new t({
|
|
3325
3398
|
type: "string",
|
|
3326
3399
|
format: "jwt",
|
|
@@ -3329,7 +3402,7 @@ function Ti(t, e) {
|
|
|
3329
3402
|
...l(e)
|
|
3330
3403
|
});
|
|
3331
3404
|
}
|
|
3332
|
-
function
|
|
3405
|
+
function Ei(t, e) {
|
|
3333
3406
|
return new t({
|
|
3334
3407
|
type: "string",
|
|
3335
3408
|
format: "datetime",
|
|
@@ -3340,7 +3413,7 @@ function wi(t, e) {
|
|
|
3340
3413
|
...l(e)
|
|
3341
3414
|
});
|
|
3342
3415
|
}
|
|
3343
|
-
function
|
|
3416
|
+
function Ii(t, e) {
|
|
3344
3417
|
return new t({
|
|
3345
3418
|
type: "string",
|
|
3346
3419
|
format: "date",
|
|
@@ -3348,7 +3421,7 @@ function bi(t, e) {
|
|
|
3348
3421
|
...l(e)
|
|
3349
3422
|
});
|
|
3350
3423
|
}
|
|
3351
|
-
function
|
|
3424
|
+
function zi(t, e) {
|
|
3352
3425
|
return new t({
|
|
3353
3426
|
type: "string",
|
|
3354
3427
|
format: "time",
|
|
@@ -3357,7 +3430,7 @@ function Ei(t, e) {
|
|
|
3357
3430
|
...l(e)
|
|
3358
3431
|
});
|
|
3359
3432
|
}
|
|
3360
|
-
function
|
|
3433
|
+
function $i(t, e) {
|
|
3361
3434
|
return new t({
|
|
3362
3435
|
type: "string",
|
|
3363
3436
|
format: "duration",
|
|
@@ -3365,14 +3438,14 @@ function zi(t, e) {
|
|
|
3365
3438
|
...l(e)
|
|
3366
3439
|
});
|
|
3367
3440
|
}
|
|
3368
|
-
function
|
|
3441
|
+
function Oi(t, e) {
|
|
3369
3442
|
return new t({
|
|
3370
3443
|
type: "number",
|
|
3371
3444
|
checks: [],
|
|
3372
3445
|
...l(e)
|
|
3373
3446
|
});
|
|
3374
3447
|
}
|
|
3375
|
-
function
|
|
3448
|
+
function Pi(t, e) {
|
|
3376
3449
|
return new t({
|
|
3377
3450
|
type: "number",
|
|
3378
3451
|
check: "number_format",
|
|
@@ -3381,12 +3454,12 @@ function $i(t, e) {
|
|
|
3381
3454
|
...l(e)
|
|
3382
3455
|
});
|
|
3383
3456
|
}
|
|
3384
|
-
function
|
|
3457
|
+
function Si(t) {
|
|
3385
3458
|
return new t({
|
|
3386
3459
|
type: "unknown"
|
|
3387
3460
|
});
|
|
3388
3461
|
}
|
|
3389
|
-
function
|
|
3462
|
+
function Ni(t, e) {
|
|
3390
3463
|
return new t({
|
|
3391
3464
|
type: "never",
|
|
3392
3465
|
...l(e)
|
|
@@ -3400,7 +3473,7 @@ function xe(t, e) {
|
|
|
3400
3473
|
inclusive: !1
|
|
3401
3474
|
});
|
|
3402
3475
|
}
|
|
3403
|
-
function
|
|
3476
|
+
function he(t, e) {
|
|
3404
3477
|
return new lt({
|
|
3405
3478
|
check: "less_than",
|
|
3406
3479
|
...l(e),
|
|
@@ -3416,7 +3489,7 @@ function De(t, e) {
|
|
|
3416
3489
|
inclusive: !1
|
|
3417
3490
|
});
|
|
3418
3491
|
}
|
|
3419
|
-
function
|
|
3492
|
+
function pe(t, e) {
|
|
3420
3493
|
return new dt({
|
|
3421
3494
|
check: "greater_than",
|
|
3422
3495
|
...l(e),
|
|
@@ -3425,101 +3498,101 @@ function ue(t, e) {
|
|
|
3425
3498
|
});
|
|
3426
3499
|
}
|
|
3427
3500
|
function Fe(t, e) {
|
|
3428
|
-
return new
|
|
3501
|
+
return new Yn({
|
|
3429
3502
|
check: "multiple_of",
|
|
3430
3503
|
...l(e),
|
|
3431
3504
|
value: t
|
|
3432
3505
|
});
|
|
3433
3506
|
}
|
|
3434
3507
|
function kt(t, e) {
|
|
3435
|
-
return new
|
|
3508
|
+
return new Xn({
|
|
3436
3509
|
check: "max_length",
|
|
3437
3510
|
...l(e),
|
|
3438
3511
|
maximum: t
|
|
3439
3512
|
});
|
|
3440
3513
|
}
|
|
3441
|
-
function
|
|
3442
|
-
return new
|
|
3514
|
+
function ee(t, e) {
|
|
3515
|
+
return new Qn({
|
|
3443
3516
|
check: "min_length",
|
|
3444
3517
|
...l(e),
|
|
3445
3518
|
minimum: t
|
|
3446
3519
|
});
|
|
3447
3520
|
}
|
|
3448
3521
|
function yt(t, e) {
|
|
3449
|
-
return new
|
|
3522
|
+
return new Hn({
|
|
3450
3523
|
check: "length_equals",
|
|
3451
3524
|
...l(e),
|
|
3452
3525
|
length: t
|
|
3453
3526
|
});
|
|
3454
3527
|
}
|
|
3455
|
-
function
|
|
3456
|
-
return new
|
|
3528
|
+
function Ai(t, e) {
|
|
3529
|
+
return new er({
|
|
3457
3530
|
check: "string_format",
|
|
3458
3531
|
format: "regex",
|
|
3459
3532
|
...l(e),
|
|
3460
3533
|
pattern: t
|
|
3461
3534
|
});
|
|
3462
3535
|
}
|
|
3463
|
-
function
|
|
3464
|
-
return new
|
|
3536
|
+
function Zi(t) {
|
|
3537
|
+
return new tr({
|
|
3465
3538
|
check: "string_format",
|
|
3466
3539
|
format: "lowercase",
|
|
3467
3540
|
...l(t)
|
|
3468
3541
|
});
|
|
3469
3542
|
}
|
|
3470
|
-
function
|
|
3471
|
-
return new
|
|
3543
|
+
function Ci(t) {
|
|
3544
|
+
return new nr({
|
|
3472
3545
|
check: "string_format",
|
|
3473
3546
|
format: "uppercase",
|
|
3474
3547
|
...l(t)
|
|
3475
3548
|
});
|
|
3476
3549
|
}
|
|
3477
|
-
function
|
|
3478
|
-
return new
|
|
3550
|
+
function Ri(t, e) {
|
|
3551
|
+
return new rr({
|
|
3479
3552
|
check: "string_format",
|
|
3480
3553
|
format: "includes",
|
|
3481
3554
|
...l(e),
|
|
3482
3555
|
includes: t
|
|
3483
3556
|
});
|
|
3484
3557
|
}
|
|
3485
|
-
function
|
|
3486
|
-
return new
|
|
3558
|
+
function Li(t, e) {
|
|
3559
|
+
return new ir({
|
|
3487
3560
|
check: "string_format",
|
|
3488
3561
|
format: "starts_with",
|
|
3489
3562
|
...l(e),
|
|
3490
3563
|
prefix: t
|
|
3491
3564
|
});
|
|
3492
3565
|
}
|
|
3493
|
-
function
|
|
3494
|
-
return new
|
|
3566
|
+
function xi(t, e) {
|
|
3567
|
+
return new sr({
|
|
3495
3568
|
check: "string_format",
|
|
3496
3569
|
format: "ends_with",
|
|
3497
3570
|
...l(e),
|
|
3498
3571
|
suffix: t
|
|
3499
3572
|
});
|
|
3500
3573
|
}
|
|
3501
|
-
function
|
|
3502
|
-
return new
|
|
3574
|
+
function U(t) {
|
|
3575
|
+
return new or({
|
|
3503
3576
|
check: "overwrite",
|
|
3504
3577
|
tx: t
|
|
3505
3578
|
});
|
|
3506
3579
|
}
|
|
3507
|
-
function
|
|
3508
|
-
return
|
|
3509
|
-
}
|
|
3510
|
-
function xi() {
|
|
3511
|
-
return M((t) => t.trim());
|
|
3512
|
-
}
|
|
3513
|
-
function Di() {
|
|
3514
|
-
return M((t) => t.toLowerCase());
|
|
3580
|
+
function Di(t) {
|
|
3581
|
+
return U((e) => e.normalize(t));
|
|
3515
3582
|
}
|
|
3516
3583
|
function Fi() {
|
|
3517
|
-
return
|
|
3584
|
+
return U((t) => t.trim());
|
|
3518
3585
|
}
|
|
3519
3586
|
function ji() {
|
|
3520
|
-
return
|
|
3587
|
+
return U((t) => t.toLowerCase());
|
|
3588
|
+
}
|
|
3589
|
+
function Mi() {
|
|
3590
|
+
return U((t) => t.toUpperCase());
|
|
3521
3591
|
}
|
|
3522
|
-
function
|
|
3592
|
+
function Ui() {
|
|
3593
|
+
return U((t) => Ht(t));
|
|
3594
|
+
}
|
|
3595
|
+
function Gi(t, e, n) {
|
|
3523
3596
|
return new t({
|
|
3524
3597
|
type: "array",
|
|
3525
3598
|
element: e,
|
|
@@ -3529,7 +3602,7 @@ function Mi(t, e, n) {
|
|
|
3529
3602
|
...l(n)
|
|
3530
3603
|
});
|
|
3531
3604
|
}
|
|
3532
|
-
function
|
|
3605
|
+
function Vi(t, e, n) {
|
|
3533
3606
|
return new t({
|
|
3534
3607
|
type: "custom",
|
|
3535
3608
|
check: "custom",
|
|
@@ -3537,18 +3610,18 @@ function Ui(t, e, n) {
|
|
|
3537
3610
|
...l(n)
|
|
3538
3611
|
});
|
|
3539
3612
|
}
|
|
3540
|
-
function
|
|
3541
|
-
const e =
|
|
3613
|
+
function Bi(t) {
|
|
3614
|
+
const e = Ji((n) => (n.addIssue = (r) => {
|
|
3542
3615
|
if (typeof r == "string")
|
|
3543
|
-
n.issues.push(
|
|
3616
|
+
n.issues.push(W(r, n.value, e._zod.def));
|
|
3544
3617
|
else {
|
|
3545
3618
|
const i = r;
|
|
3546
|
-
i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), i.continue ?? (i.continue = !e._zod.def.abort), n.issues.push(
|
|
3619
|
+
i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), i.continue ?? (i.continue = !e._zod.def.abort), n.issues.push(W(i));
|
|
3547
3620
|
}
|
|
3548
3621
|
}, t(n.value, n)));
|
|
3549
3622
|
return e;
|
|
3550
3623
|
}
|
|
3551
|
-
function
|
|
3624
|
+
function Ji(t, e) {
|
|
3552
3625
|
const n = new b({
|
|
3553
3626
|
check: "custom",
|
|
3554
3627
|
...l(e)
|
|
@@ -3559,7 +3632,7 @@ function Tt(t) {
|
|
|
3559
3632
|
let e = t?.target ?? "draft-2020-12";
|
|
3560
3633
|
return e === "draft-4" && (e = "draft-04"), e === "draft-7" && (e = "draft-07"), {
|
|
3561
3634
|
processors: t.processors ?? {},
|
|
3562
|
-
metadataRegistry: t?.metadata ??
|
|
3635
|
+
metadataRegistry: t?.metadata ?? V,
|
|
3563
3636
|
target: e,
|
|
3564
3637
|
unrepresentable: t?.unrepresentable ?? "throw",
|
|
3565
3638
|
override: t?.override ?? (() => {
|
|
@@ -3706,8 +3779,8 @@ function bt(t, e) {
|
|
|
3706
3779
|
value: {
|
|
3707
3780
|
...e["~standard"],
|
|
3708
3781
|
jsonSchema: {
|
|
3709
|
-
input:
|
|
3710
|
-
output:
|
|
3782
|
+
input: te(e, "input"),
|
|
3783
|
+
output: te(e, "output")
|
|
3711
3784
|
}
|
|
3712
3785
|
},
|
|
3713
3786
|
enumerable: !1,
|
|
@@ -3759,24 +3832,24 @@ function w(t, e) {
|
|
|
3759
3832
|
}
|
|
3760
3833
|
return !1;
|
|
3761
3834
|
}
|
|
3762
|
-
const
|
|
3835
|
+
const Wi = (t, e = {}) => (n) => {
|
|
3763
3836
|
const r = Tt({ ...n, processors: e });
|
|
3764
3837
|
return T(t, r), wt(r, t), bt(r, t);
|
|
3765
|
-
},
|
|
3838
|
+
}, te = (t, e) => (n) => {
|
|
3766
3839
|
const { libraryOptions: r, target: i } = n ?? {}, s = Tt({ ...r ?? {}, target: i, io: e, processors: {} });
|
|
3767
3840
|
return T(t, s), wt(s, t), bt(s, t);
|
|
3768
|
-
},
|
|
3841
|
+
}, Ki = {
|
|
3769
3842
|
guid: "uuid",
|
|
3770
3843
|
url: "uri",
|
|
3771
3844
|
datetime: "date-time",
|
|
3772
3845
|
json_string: "json-string",
|
|
3773
3846
|
regex: ""
|
|
3774
3847
|
// do not set
|
|
3775
|
-
},
|
|
3848
|
+
}, Yi = (t, e, n, r) => {
|
|
3776
3849
|
const i = n;
|
|
3777
3850
|
i.type = "string";
|
|
3778
3851
|
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 =
|
|
3852
|
+
if (typeof s == "number" && (i.minLength = s), typeof o == "number" && (i.maxLength = o), a && (i.format = Ki[a] ?? a, i.format === "" && delete i.format), h && (i.contentEncoding = h), c && c.size > 0) {
|
|
3780
3853
|
const p = [...c];
|
|
3781
3854
|
p.length === 1 ? i.pattern = p[0].source : p.length > 1 && (i.allOf = [
|
|
3782
3855
|
...p.map((d) => ({
|
|
@@ -3785,16 +3858,16 @@ const Bi = (t, e = {}) => (n) => {
|
|
|
3785
3858
|
}))
|
|
3786
3859
|
]);
|
|
3787
3860
|
}
|
|
3788
|
-
},
|
|
3861
|
+
}, qi = (t, e, n, r) => {
|
|
3789
3862
|
const i = n, { minimum: s, maximum: o, format: a, multipleOf: c, exclusiveMaximum: h, exclusiveMinimum: p } = t._zod.bag;
|
|
3790
3863
|
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);
|
|
3791
|
-
}, Yi = (t, e, n, r) => {
|
|
3792
|
-
n.not = {};
|
|
3793
3864
|
}, Xi = (t, e, n, r) => {
|
|
3794
|
-
|
|
3865
|
+
n.not = {};
|
|
3866
|
+
}, Qi = (t, e, n, r) => {
|
|
3867
|
+
}, Hi = (t, e, n, r) => {
|
|
3795
3868
|
const i = t._zod.def, s = tt(i.entries);
|
|
3796
3869
|
s.every((o) => typeof o == "number") && (n.type = "number"), s.every((o) => typeof o == "string") && (n.type = "string"), n.enum = s;
|
|
3797
|
-
},
|
|
3870
|
+
}, es = (t, e, n, r) => {
|
|
3798
3871
|
const i = t._zod.def, s = [];
|
|
3799
3872
|
for (const o of i.values)
|
|
3800
3873
|
if (o === void 0) {
|
|
@@ -3811,16 +3884,16 @@ const Bi = (t, e = {}) => (n) => {
|
|
|
3811
3884
|
n.type = o === null ? "null" : typeof o, e.target === "draft-04" || e.target === "openapi-3.0" ? n.enum = [o] : n.const = o;
|
|
3812
3885
|
} else
|
|
3813
3886
|
s.every((o) => typeof o == "number") && (n.type = "number"), s.every((o) => typeof o == "string") && (n.type = "string"), s.every((o) => typeof o == "boolean") && (n.type = "boolean"), s.every((o) => o === null) && (n.type = "null"), n.enum = s;
|
|
3814
|
-
},
|
|
3887
|
+
}, ts = (t, e, n, r) => {
|
|
3815
3888
|
if (e.unrepresentable === "throw")
|
|
3816
3889
|
throw new Error("Custom types cannot be represented in JSON Schema");
|
|
3817
|
-
},
|
|
3890
|
+
}, ns = (t, e, n, r) => {
|
|
3818
3891
|
if (e.unrepresentable === "throw")
|
|
3819
3892
|
throw new Error("Transforms cannot be represented in JSON Schema");
|
|
3820
|
-
},
|
|
3893
|
+
}, rs = (t, e, n, r) => {
|
|
3821
3894
|
const i = n, s = t._zod.def, { minimum: o, maximum: a } = t._zod.bag;
|
|
3822
3895
|
typeof o == "number" && (i.minItems = o), typeof a == "number" && (i.maxItems = a), i.type = "array", i.items = T(s.element, e, { ...r, path: [...r.path, "items"] });
|
|
3823
|
-
},
|
|
3896
|
+
}, is = (t, e, n, r) => {
|
|
3824
3897
|
const i = n, s = t._zod.def;
|
|
3825
3898
|
i.type = "object", i.properties = {};
|
|
3826
3899
|
const o = s.shape;
|
|
@@ -3837,13 +3910,13 @@ const Bi = (t, e = {}) => (n) => {
|
|
|
3837
3910
|
...r,
|
|
3838
3911
|
path: [...r.path, "additionalProperties"]
|
|
3839
3912
|
})) : e.io === "output" && (i.additionalProperties = !1);
|
|
3840
|
-
},
|
|
3913
|
+
}, ss = (t, e, n, r) => {
|
|
3841
3914
|
const i = t._zod.def, s = i.inclusive === !1, o = i.options.map((a, c) => T(a, e, {
|
|
3842
3915
|
...r,
|
|
3843
3916
|
path: [...r.path, s ? "oneOf" : "anyOf", c]
|
|
3844
3917
|
}));
|
|
3845
3918
|
s ? n.oneOf = o : n.anyOf = o;
|
|
3846
|
-
},
|
|
3919
|
+
}, os = (t, e, n, r) => {
|
|
3847
3920
|
const i = t._zod.def, s = T(i.left, e, {
|
|
3848
3921
|
...r,
|
|
3849
3922
|
path: [...r.path, "allOf", 0]
|
|
@@ -3855,25 +3928,25 @@ const Bi = (t, e = {}) => (n) => {
|
|
|
3855
3928
|
...a(o) ? o.allOf : [o]
|
|
3856
3929
|
];
|
|
3857
3930
|
n.allOf = c;
|
|
3858
|
-
},
|
|
3931
|
+
}, as = (t, e, n, r) => {
|
|
3859
3932
|
const i = t._zod.def, s = T(i.innerType, e, r), o = e.seen.get(t);
|
|
3860
3933
|
e.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [s, { type: "null" }];
|
|
3861
|
-
},
|
|
3934
|
+
}, cs = (t, e, n, r) => {
|
|
3862
3935
|
const i = t._zod.def;
|
|
3863
3936
|
T(i.innerType, e, r);
|
|
3864
3937
|
const s = e.seen.get(t);
|
|
3865
3938
|
s.ref = i.innerType;
|
|
3866
|
-
},
|
|
3939
|
+
}, us = (t, e, n, r) => {
|
|
3867
3940
|
const i = t._zod.def;
|
|
3868
3941
|
T(i.innerType, e, r);
|
|
3869
3942
|
const s = e.seen.get(t);
|
|
3870
3943
|
s.ref = i.innerType, n.default = JSON.parse(JSON.stringify(i.defaultValue));
|
|
3871
|
-
},
|
|
3944
|
+
}, hs = (t, e, n, r) => {
|
|
3872
3945
|
const i = t._zod.def;
|
|
3873
3946
|
T(i.innerType, e, r);
|
|
3874
3947
|
const s = e.seen.get(t);
|
|
3875
3948
|
s.ref = i.innerType, e.io === "input" && (n._prefault = JSON.parse(JSON.stringify(i.defaultValue)));
|
|
3876
|
-
},
|
|
3949
|
+
}, ps = (t, e, n, r) => {
|
|
3877
3950
|
const i = t._zod.def;
|
|
3878
3951
|
T(i.innerType, e, r);
|
|
3879
3952
|
const s = e.seen.get(t);
|
|
@@ -3885,64 +3958,64 @@ const Bi = (t, e = {}) => (n) => {
|
|
|
3885
3958
|
throw new Error("Dynamic catch values are not supported in JSON Schema");
|
|
3886
3959
|
}
|
|
3887
3960
|
n.default = o;
|
|
3888
|
-
},
|
|
3961
|
+
}, ls = (t, e, n, r) => {
|
|
3889
3962
|
const i = t._zod.def, s = e.io === "input" ? i.in._zod.def.type === "transform" ? i.out : i.in : i.out;
|
|
3890
3963
|
T(s, e, r);
|
|
3891
3964
|
const o = e.seen.get(t);
|
|
3892
3965
|
o.ref = s;
|
|
3893
|
-
},
|
|
3966
|
+
}, ds = (t, e, n, r) => {
|
|
3894
3967
|
const i = t._zod.def;
|
|
3895
3968
|
T(i.innerType, e, r);
|
|
3896
3969
|
const s = e.seen.get(t);
|
|
3897
3970
|
s.ref = i.innerType, n.readOnly = !0;
|
|
3898
|
-
},
|
|
3971
|
+
}, fs = (t, e, n, r) => {
|
|
3899
3972
|
const i = t._zod.def;
|
|
3900
3973
|
T(i.innerType, e, r);
|
|
3901
3974
|
const s = e.seen.get(t);
|
|
3902
3975
|
s.ref = i.innerType;
|
|
3903
|
-
},
|
|
3904
|
-
|
|
3905
|
-
});
|
|
3906
|
-
function fs(t) {
|
|
3907
|
-
return wi(ds, t);
|
|
3908
|
-
}
|
|
3909
|
-
const ms = /* @__PURE__ */ u("ZodISODate", (t, e) => {
|
|
3910
|
-
kr.init(t, e), _.init(t, e);
|
|
3976
|
+
}, ms = /* @__PURE__ */ u("ZodISODateTime", (t, e) => {
|
|
3977
|
+
yr.init(t, e), _.init(t, e);
|
|
3911
3978
|
});
|
|
3912
3979
|
function gs(t) {
|
|
3913
|
-
return
|
|
3980
|
+
return Ei(ms, t);
|
|
3914
3981
|
}
|
|
3915
|
-
const vs = /* @__PURE__ */ u("
|
|
3916
|
-
|
|
3982
|
+
const vs = /* @__PURE__ */ u("ZodISODate", (t, e) => {
|
|
3983
|
+
Tr.init(t, e), _.init(t, e);
|
|
3917
3984
|
});
|
|
3918
3985
|
function _s(t) {
|
|
3919
|
-
return
|
|
3986
|
+
return Ii(vs, t);
|
|
3920
3987
|
}
|
|
3921
|
-
const ks = /* @__PURE__ */ u("
|
|
3922
|
-
|
|
3988
|
+
const ks = /* @__PURE__ */ u("ZodISOTime", (t, e) => {
|
|
3989
|
+
wr.init(t, e), _.init(t, e);
|
|
3923
3990
|
});
|
|
3924
3991
|
function ys(t) {
|
|
3925
3992
|
return zi(ks, t);
|
|
3926
3993
|
}
|
|
3927
|
-
const Ts = (t, e) => {
|
|
3994
|
+
const Ts = /* @__PURE__ */ u("ZodISODuration", (t, e) => {
|
|
3995
|
+
br.init(t, e), _.init(t, e);
|
|
3996
|
+
});
|
|
3997
|
+
function ws(t) {
|
|
3998
|
+
return $i(Ts, t);
|
|
3999
|
+
}
|
|
4000
|
+
const bs = (t, e) => {
|
|
3928
4001
|
ot.init(t, e), t.name = "ZodError", Object.defineProperties(t, {
|
|
3929
4002
|
format: {
|
|
3930
|
-
value: (n) =>
|
|
4003
|
+
value: (n) => dn(t, n)
|
|
3931
4004
|
// enumerable: false,
|
|
3932
4005
|
},
|
|
3933
4006
|
flatten: {
|
|
3934
|
-
value: (n) =>
|
|
4007
|
+
value: (n) => ln(t, n)
|
|
3935
4008
|
// enumerable: false,
|
|
3936
4009
|
},
|
|
3937
4010
|
addIssue: {
|
|
3938
4011
|
value: (n) => {
|
|
3939
|
-
t.issues.push(n), t.message = JSON.stringify(t.issues,
|
|
4012
|
+
t.issues.push(n), t.message = JSON.stringify(t.issues, le, 2);
|
|
3940
4013
|
}
|
|
3941
4014
|
// enumerable: false,
|
|
3942
4015
|
},
|
|
3943
4016
|
addIssues: {
|
|
3944
4017
|
value: (n) => {
|
|
3945
|
-
t.issues.push(...n), t.message = JSON.stringify(t.issues,
|
|
4018
|
+
t.issues.push(...n), t.message = JSON.stringify(t.issues, le, 2);
|
|
3946
4019
|
}
|
|
3947
4020
|
// enumerable: false,
|
|
3948
4021
|
},
|
|
@@ -3953,157 +4026,157 @@ const Ts = (t, e) => {
|
|
|
3953
4026
|
// enumerable: false,
|
|
3954
4027
|
}
|
|
3955
4028
|
});
|
|
3956
|
-
},
|
|
4029
|
+
}, I = u("ZodError", bs, {
|
|
3957
4030
|
Parent: Error
|
|
3958
|
-
}),
|
|
4031
|
+
}), Es = /* @__PURE__ */ _e(I), Is = /* @__PURE__ */ ke(I), zs = /* @__PURE__ */ ie(I), $s = /* @__PURE__ */ se(I), Os = /* @__PURE__ */ gn(I), Ps = /* @__PURE__ */ vn(I), Ss = /* @__PURE__ */ _n(I), Ns = /* @__PURE__ */ kn(I), As = /* @__PURE__ */ yn(I), Zs = /* @__PURE__ */ Tn(I), Cs = /* @__PURE__ */ wn(I), Rs = /* @__PURE__ */ bn(I), y = /* @__PURE__ */ u("ZodType", (t, e) => (k.init(t, e), Object.assign(t["~standard"], {
|
|
3959
4032
|
jsonSchema: {
|
|
3960
|
-
input:
|
|
3961
|
-
output:
|
|
4033
|
+
input: te(t, "input"),
|
|
4034
|
+
output: te(t, "output")
|
|
3962
4035
|
}
|
|
3963
|
-
}), t.toJSONSchema =
|
|
4036
|
+
}), t.toJSONSchema = Wi(t, {}), t.def = e, t.type = e.type, Object.defineProperty(t, "_def", { value: e }), t.check = (...n) => t.clone(x(e, {
|
|
3964
4037
|
checks: [
|
|
3965
4038
|
...e.checks ?? [],
|
|
3966
4039
|
...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
|
|
3967
4040
|
]
|
|
3968
|
-
})), t.clone = (n, r) =>
|
|
4041
|
+
})), t.clone = (n, r) => N(t, n, r), t.brand = () => t, t.register = ((n, r) => (n.add(t, r), t)), t.parse = (n, r) => Es(t, n, r, { callee: t.parse }), t.safeParse = (n, r) => zs(t, n, r), t.parseAsync = async (n, r) => Is(t, n, r, { callee: t.parseAsync }), t.safeParseAsync = async (n, r) => $s(t, n, r), t.spa = t.safeParseAsync, t.encode = (n, r) => Os(t, n, r), t.decode = (n, r) => Ps(t, n, r), t.encodeAsync = async (n, r) => Ss(t, n, r), t.decodeAsync = async (n, r) => Ns(t, n, r), t.safeEncode = (n, r) => As(t, n, r), t.safeDecode = (n, r) => Zs(t, n, r), t.safeEncodeAsync = async (n, r) => Cs(t, n, r), t.safeDecodeAsync = async (n, r) => Rs(t, n, r), t.refine = (n, r) => t.check($o(n, r)), t.superRefine = (n) => t.check(Oo(n)), t.overwrite = (n) => t.check(U(n)), t.optional = () => Ge(t), t.nullable = () => Ve(t), t.nullish = () => Ge(Ve(t)), t.nonoptional = (n) => yo(t, n), t.array = () => Z(t), t.or = (n) => ae([t, n]), t.and = (n) => ho(t, n), t.transform = (n) => Be(t, fo(n)), t.default = (n) => vo(t, n), t.prefault = (n) => ko(t, n), t.catch = (n) => wo(t, n), t.pipe = (n) => Be(t, n), t.readonly = () => Io(t), t.describe = (n) => {
|
|
3969
4042
|
const r = t.clone();
|
|
3970
|
-
return
|
|
4043
|
+
return V.add(r, { description: n }), r;
|
|
3971
4044
|
}, Object.defineProperty(t, "description", {
|
|
3972
4045
|
get() {
|
|
3973
|
-
return
|
|
4046
|
+
return V.get(t)?.description;
|
|
3974
4047
|
},
|
|
3975
4048
|
configurable: !0
|
|
3976
4049
|
}), t.meta = (...n) => {
|
|
3977
4050
|
if (n.length === 0)
|
|
3978
|
-
return
|
|
4051
|
+
return V.get(t);
|
|
3979
4052
|
const r = t.clone();
|
|
3980
|
-
return
|
|
4053
|
+
return V.add(r, n[0]), r;
|
|
3981
4054
|
}, t.isOptional = () => t.safeParse(void 0).success, t.isNullable = () => t.safeParse(null).success, t)), Et = /* @__PURE__ */ u("_ZodString", (t, e) => {
|
|
3982
|
-
|
|
4055
|
+
ye.init(t, e), y.init(t, e), t._zod.processJSONSchema = (r, i, s) => Yi(t, r, i);
|
|
3983
4056
|
const n = t._zod.bag;
|
|
3984
|
-
t.format = n.format ?? null, t.minLength = n.minimum ?? null, t.maxLength = n.maximum ?? null, t.regex = (...r) => t.check(
|
|
3985
|
-
}),
|
|
3986
|
-
|
|
4057
|
+
t.format = n.format ?? null, t.minLength = n.minimum ?? null, t.maxLength = n.maximum ?? null, t.regex = (...r) => t.check(Ai(...r)), t.includes = (...r) => t.check(Ri(...r)), t.startsWith = (...r) => t.check(Li(...r)), t.endsWith = (...r) => t.check(xi(...r)), t.min = (...r) => t.check(ee(...r)), t.max = (...r) => t.check(kt(...r)), t.length = (...r) => t.check(yt(...r)), t.nonempty = (...r) => t.check(ee(1, ...r)), t.lowercase = (r) => t.check(Zi(r)), t.uppercase = (r) => t.check(Ci(r)), t.trim = () => t.check(Fi()), t.normalize = (...r) => t.check(Di(...r)), t.toLowerCase = () => t.check(ji()), t.toUpperCase = () => t.check(Mi()), t.slugify = () => t.check(Ui());
|
|
4058
|
+
}), Ls = /* @__PURE__ */ u("ZodString", (t, e) => {
|
|
4059
|
+
ye.init(t, e), Et.init(t, e), t.email = (n) => t.check(ri(xs, n)), t.url = (n) => t.check(ci(Ds, n)), t.jwt = (n) => t.check(bi(Hs, n)), t.emoji = (n) => t.check(ui(Fs, n)), t.guid = (n) => t.check(Le(je, n)), t.uuid = (n) => t.check(ii(X, n)), t.uuidv4 = (n) => t.check(si(X, n)), t.uuidv6 = (n) => t.check(oi(X, n)), t.uuidv7 = (n) => t.check(ai(X, n)), t.nanoid = (n) => t.check(hi(js, n)), t.guid = (n) => t.check(Le(je, n)), t.cuid = (n) => t.check(pi(Ms, n)), t.cuid2 = (n) => t.check(li(Us, n)), t.ulid = (n) => t.check(di(Gs, n)), t.base64 = (n) => t.check(yi(qs, n)), t.base64url = (n) => t.check(Ti(Xs, n)), t.xid = (n) => t.check(fi(Vs, n)), t.ksuid = (n) => t.check(mi(Bs, n)), t.ipv4 = (n) => t.check(gi(Js, n)), t.ipv6 = (n) => t.check(vi(Ws, n)), t.cidrv4 = (n) => t.check(_i(Ks, n)), t.cidrv6 = (n) => t.check(ki(Ys, n)), t.e164 = (n) => t.check(wi(Qs, n)), t.datetime = (n) => t.check(gs(n)), t.date = (n) => t.check(_s(n)), t.time = (n) => t.check(ys(n)), t.duration = (n) => t.check(ws(n));
|
|
3987
4060
|
});
|
|
3988
4061
|
function $(t) {
|
|
3989
|
-
return
|
|
4062
|
+
return ni(Ls, t);
|
|
3990
4063
|
}
|
|
3991
4064
|
const _ = /* @__PURE__ */ u("ZodStringFormat", (t, e) => {
|
|
3992
4065
|
g.init(t, e), Et.init(t, e);
|
|
3993
|
-
}),
|
|
3994
|
-
|
|
4066
|
+
}), xs = /* @__PURE__ */ u("ZodEmail", (t, e) => {
|
|
4067
|
+
pr.init(t, e), _.init(t, e);
|
|
3995
4068
|
}), je = /* @__PURE__ */ u("ZodGUID", (t, e) => {
|
|
3996
|
-
|
|
3997
|
-
}),
|
|
3998
|
-
cr.init(t, e), _.init(t, e);
|
|
3999
|
-
}), Ls = /* @__PURE__ */ u("ZodURL", (t, e) => {
|
|
4069
|
+
ur.init(t, e), _.init(t, e);
|
|
4070
|
+
}), X = /* @__PURE__ */ u("ZodUUID", (t, e) => {
|
|
4000
4071
|
hr.init(t, e), _.init(t, e);
|
|
4001
|
-
}),
|
|
4002
|
-
pr.init(t, e), _.init(t, e);
|
|
4003
|
-
}), Ds = /* @__PURE__ */ u("ZodNanoID", (t, e) => {
|
|
4072
|
+
}), Ds = /* @__PURE__ */ u("ZodURL", (t, e) => {
|
|
4004
4073
|
lr.init(t, e), _.init(t, e);
|
|
4005
|
-
}), Fs = /* @__PURE__ */ u("
|
|
4074
|
+
}), Fs = /* @__PURE__ */ u("ZodEmoji", (t, e) => {
|
|
4006
4075
|
dr.init(t, e), _.init(t, e);
|
|
4007
|
-
}), js = /* @__PURE__ */ u("
|
|
4076
|
+
}), js = /* @__PURE__ */ u("ZodNanoID", (t, e) => {
|
|
4008
4077
|
fr.init(t, e), _.init(t, e);
|
|
4009
|
-
}), Ms = /* @__PURE__ */ u("
|
|
4078
|
+
}), Ms = /* @__PURE__ */ u("ZodCUID", (t, e) => {
|
|
4010
4079
|
mr.init(t, e), _.init(t, e);
|
|
4011
|
-
}), Us = /* @__PURE__ */ u("
|
|
4080
|
+
}), Us = /* @__PURE__ */ u("ZodCUID2", (t, e) => {
|
|
4012
4081
|
gr.init(t, e), _.init(t, e);
|
|
4013
|
-
}), Gs = /* @__PURE__ */ u("
|
|
4082
|
+
}), Gs = /* @__PURE__ */ u("ZodULID", (t, e) => {
|
|
4014
4083
|
vr.init(t, e), _.init(t, e);
|
|
4015
|
-
}), Vs = /* @__PURE__ */ u("
|
|
4016
|
-
|
|
4017
|
-
}), Bs = /* @__PURE__ */ u("
|
|
4018
|
-
|
|
4019
|
-
}), Js = /* @__PURE__ */ u("
|
|
4084
|
+
}), Vs = /* @__PURE__ */ u("ZodXID", (t, e) => {
|
|
4085
|
+
_r.init(t, e), _.init(t, e);
|
|
4086
|
+
}), Bs = /* @__PURE__ */ u("ZodKSUID", (t, e) => {
|
|
4087
|
+
kr.init(t, e), _.init(t, e);
|
|
4088
|
+
}), Js = /* @__PURE__ */ u("ZodIPv4", (t, e) => {
|
|
4020
4089
|
Er.init(t, e), _.init(t, e);
|
|
4021
|
-
}), Ws = /* @__PURE__ */ u("
|
|
4022
|
-
zr.init(t, e), _.init(t, e);
|
|
4023
|
-
}), Ks = /* @__PURE__ */ u("ZodBase64", (t, e) => {
|
|
4090
|
+
}), Ws = /* @__PURE__ */ u("ZodIPv6", (t, e) => {
|
|
4024
4091
|
Ir.init(t, e), _.init(t, e);
|
|
4025
|
-
}),
|
|
4092
|
+
}), Ks = /* @__PURE__ */ u("ZodCIDRv4", (t, e) => {
|
|
4093
|
+
zr.init(t, e), _.init(t, e);
|
|
4094
|
+
}), Ys = /* @__PURE__ */ u("ZodCIDRv6", (t, e) => {
|
|
4095
|
+
$r.init(t, e), _.init(t, e);
|
|
4096
|
+
}), qs = /* @__PURE__ */ u("ZodBase64", (t, e) => {
|
|
4026
4097
|
Or.init(t, e), _.init(t, e);
|
|
4027
|
-
}), Xs = /* @__PURE__ */ u("
|
|
4098
|
+
}), Xs = /* @__PURE__ */ u("ZodBase64URL", (t, e) => {
|
|
4028
4099
|
Sr.init(t, e), _.init(t, e);
|
|
4029
|
-
}),
|
|
4030
|
-
|
|
4031
|
-
}),
|
|
4032
|
-
|
|
4100
|
+
}), Qs = /* @__PURE__ */ u("ZodE164", (t, e) => {
|
|
4101
|
+
Nr.init(t, e), _.init(t, e);
|
|
4102
|
+
}), Hs = /* @__PURE__ */ u("ZodJWT", (t, e) => {
|
|
4103
|
+
Zr.init(t, e), _.init(t, e);
|
|
4104
|
+
}), It = /* @__PURE__ */ u("ZodNumber", (t, e) => {
|
|
4105
|
+
mt.init(t, e), y.init(t, e), t._zod.processJSONSchema = (r, i, s) => qi(t, r, i), t.gt = (r, i) => t.check(De(r, i)), t.gte = (r, i) => t.check(pe(r, i)), t.min = (r, i) => t.check(pe(r, i)), t.lt = (r, i) => t.check(xe(r, i)), t.lte = (r, i) => t.check(he(r, i)), t.max = (r, i) => t.check(he(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(pe(0, r)), t.negative = (r) => t.check(xe(0, r)), t.nonpositive = (r) => t.check(he(0, r)), t.multipleOf = (r, i) => t.check(Fe(r, i)), t.step = (r, i) => t.check(Fe(r, i)), t.finite = () => t;
|
|
4033
4106
|
const n = t._zod.bag;
|
|
4034
4107
|
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;
|
|
4035
4108
|
});
|
|
4036
|
-
function
|
|
4037
|
-
return
|
|
4109
|
+
function eo(t) {
|
|
4110
|
+
return Oi(It, t);
|
|
4038
4111
|
}
|
|
4039
|
-
const
|
|
4040
|
-
|
|
4112
|
+
const to = /* @__PURE__ */ u("ZodNumberFormat", (t, e) => {
|
|
4113
|
+
Cr.init(t, e), It.init(t, e);
|
|
4041
4114
|
});
|
|
4042
4115
|
function Me(t) {
|
|
4043
|
-
return
|
|
4116
|
+
return Pi(to, t);
|
|
4044
4117
|
}
|
|
4045
|
-
const
|
|
4046
|
-
|
|
4118
|
+
const no = /* @__PURE__ */ u("ZodUnknown", (t, e) => {
|
|
4119
|
+
Rr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => Qi();
|
|
4047
4120
|
});
|
|
4048
4121
|
function Ue() {
|
|
4049
|
-
return
|
|
4122
|
+
return Si(no);
|
|
4050
4123
|
}
|
|
4051
|
-
const
|
|
4052
|
-
|
|
4124
|
+
const ro = /* @__PURE__ */ u("ZodNever", (t, e) => {
|
|
4125
|
+
Lr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => Xi(t, n, r);
|
|
4053
4126
|
});
|
|
4054
|
-
function
|
|
4055
|
-
return
|
|
4127
|
+
function io(t) {
|
|
4128
|
+
return Ni(ro, t);
|
|
4056
4129
|
}
|
|
4057
|
-
const
|
|
4058
|
-
|
|
4130
|
+
const so = /* @__PURE__ */ u("ZodArray", (t, e) => {
|
|
4131
|
+
xr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => rs(t, n, r, i), t.element = e.element, t.min = (n, r) => t.check(ee(n, r)), t.nonempty = (n) => t.check(ee(1, n)), t.max = (n, r) => t.check(kt(n, r)), t.length = (n, r) => t.check(yt(n, r)), t.unwrap = () => t.element;
|
|
4059
4132
|
});
|
|
4060
|
-
function
|
|
4061
|
-
return
|
|
4133
|
+
function Z(t, e) {
|
|
4134
|
+
return Gi(so, t, e);
|
|
4062
4135
|
}
|
|
4063
|
-
const
|
|
4064
|
-
|
|
4136
|
+
const oo = /* @__PURE__ */ u("ZodObject", (t, e) => {
|
|
4137
|
+
Fr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => is(t, n, r, i), m(t, "shape", () => e.shape), t.keyof = () => $t(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: io() }), t.strip = () => t.clone({ ...t._zod.def, catchall: void 0 }), t.extend = (n) => an(t, n), t.safeExtend = (n) => cn(t, n), t.merge = (n) => un(t, n), t.pick = (n) => sn(t, n), t.omit = (n) => on(t, n), t.partial = (...n) => hn(Ot, t, n[0]), t.required = (...n) => pn(Pt, t, n[0]);
|
|
4065
4138
|
});
|
|
4066
|
-
function
|
|
4139
|
+
function z(t, e) {
|
|
4067
4140
|
const n = {
|
|
4068
4141
|
type: "object",
|
|
4069
4142
|
shape: t ?? {},
|
|
4070
4143
|
...l(e)
|
|
4071
4144
|
};
|
|
4072
|
-
return new
|
|
4145
|
+
return new oo(n);
|
|
4073
4146
|
}
|
|
4074
|
-
const
|
|
4075
|
-
_t.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) =>
|
|
4147
|
+
const zt = /* @__PURE__ */ u("ZodUnion", (t, e) => {
|
|
4148
|
+
_t.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => ss(t, n, r, i), t.options = e.options;
|
|
4076
4149
|
});
|
|
4077
|
-
function
|
|
4078
|
-
return new
|
|
4150
|
+
function ae(t, e) {
|
|
4151
|
+
return new zt({
|
|
4079
4152
|
type: "union",
|
|
4080
4153
|
options: t,
|
|
4081
4154
|
...l(e)
|
|
4082
4155
|
});
|
|
4083
4156
|
}
|
|
4084
|
-
const
|
|
4085
|
-
|
|
4157
|
+
const ao = /* @__PURE__ */ u("ZodDiscriminatedUnion", (t, e) => {
|
|
4158
|
+
zt.init(t, e), jr.init(t, e);
|
|
4086
4159
|
});
|
|
4087
|
-
function
|
|
4088
|
-
return new
|
|
4160
|
+
function co(t, e, n) {
|
|
4161
|
+
return new ao({
|
|
4089
4162
|
type: "union",
|
|
4090
4163
|
options: e,
|
|
4091
4164
|
discriminator: t,
|
|
4092
4165
|
...l(n)
|
|
4093
4166
|
});
|
|
4094
4167
|
}
|
|
4095
|
-
const
|
|
4096
|
-
|
|
4168
|
+
const uo = /* @__PURE__ */ u("ZodIntersection", (t, e) => {
|
|
4169
|
+
Mr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => os(t, n, r, i);
|
|
4097
4170
|
});
|
|
4098
|
-
function
|
|
4099
|
-
return new
|
|
4171
|
+
function ho(t, e) {
|
|
4172
|
+
return new uo({
|
|
4100
4173
|
type: "intersection",
|
|
4101
4174
|
left: t,
|
|
4102
4175
|
right: e
|
|
4103
4176
|
});
|
|
4104
4177
|
}
|
|
4105
|
-
const
|
|
4106
|
-
|
|
4178
|
+
const fe = /* @__PURE__ */ u("ZodEnum", (t, e) => {
|
|
4179
|
+
Ur.init(t, e), y.init(t, e), t._zod.processJSONSchema = (r, i, s) => Hi(t, r, i), t.enum = e.entries, t.options = Object.values(e.entries);
|
|
4107
4180
|
const n = new Set(Object.keys(e.entries));
|
|
4108
4181
|
t.extract = (r, i) => {
|
|
4109
4182
|
const s = {};
|
|
@@ -4112,7 +4185,7 @@ const le = /* @__PURE__ */ u("ZodEnum", (t, e) => {
|
|
|
4112
4185
|
s[o] = e.entries[o];
|
|
4113
4186
|
else
|
|
4114
4187
|
throw new Error(`Key ${o} not found in enum`);
|
|
4115
|
-
return new
|
|
4188
|
+
return new fe({
|
|
4116
4189
|
...e,
|
|
4117
4190
|
checks: [],
|
|
4118
4191
|
...l(i),
|
|
@@ -4125,7 +4198,7 @@ const le = /* @__PURE__ */ u("ZodEnum", (t, e) => {
|
|
|
4125
4198
|
delete s[o];
|
|
4126
4199
|
else
|
|
4127
4200
|
throw new Error(`Key ${o} not found in enum`);
|
|
4128
|
-
return new
|
|
4201
|
+
return new fe({
|
|
4129
4202
|
...e,
|
|
4130
4203
|
checks: [],
|
|
4131
4204
|
...l(i),
|
|
@@ -4133,16 +4206,16 @@ const le = /* @__PURE__ */ u("ZodEnum", (t, e) => {
|
|
|
4133
4206
|
});
|
|
4134
4207
|
};
|
|
4135
4208
|
});
|
|
4136
|
-
function
|
|
4209
|
+
function $t(t, e) {
|
|
4137
4210
|
const n = Array.isArray(t) ? Object.fromEntries(t.map((r) => [r, r])) : t;
|
|
4138
|
-
return new
|
|
4211
|
+
return new fe({
|
|
4139
4212
|
type: "enum",
|
|
4140
4213
|
entries: n,
|
|
4141
4214
|
...l(e)
|
|
4142
4215
|
});
|
|
4143
4216
|
}
|
|
4144
|
-
const
|
|
4145
|
-
|
|
4217
|
+
const po = /* @__PURE__ */ u("ZodLiteral", (t, e) => {
|
|
4218
|
+
Gr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => es(t, n, r), t.values = new Set(e.values), Object.defineProperty(t, "value", {
|
|
4146
4219
|
get() {
|
|
4147
4220
|
if (e.values.length > 1)
|
|
4148
4221
|
throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
@@ -4150,58 +4223,58 @@ const uo = /* @__PURE__ */ u("ZodLiteral", (t, e) => {
|
|
|
4150
4223
|
}
|
|
4151
4224
|
});
|
|
4152
4225
|
});
|
|
4153
|
-
function
|
|
4154
|
-
return new
|
|
4226
|
+
function A(t, e) {
|
|
4227
|
+
return new po({
|
|
4155
4228
|
type: "literal",
|
|
4156
4229
|
values: Array.isArray(t) ? t : [t],
|
|
4157
4230
|
...l(e)
|
|
4158
4231
|
});
|
|
4159
4232
|
}
|
|
4160
|
-
const
|
|
4161
|
-
|
|
4233
|
+
const lo = /* @__PURE__ */ u("ZodTransform", (t, e) => {
|
|
4234
|
+
Vr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => ns(t, n), t._zod.parse = (n, r) => {
|
|
4162
4235
|
if (r.direction === "backward")
|
|
4163
4236
|
throw new He(t.constructor.name);
|
|
4164
4237
|
n.addIssue = (s) => {
|
|
4165
4238
|
if (typeof s == "string")
|
|
4166
|
-
n.issues.push(
|
|
4239
|
+
n.issues.push(W(s, n.value, e));
|
|
4167
4240
|
else {
|
|
4168
4241
|
const o = s;
|
|
4169
|
-
o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), n.issues.push(
|
|
4242
|
+
o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), n.issues.push(W(o));
|
|
4170
4243
|
}
|
|
4171
4244
|
};
|
|
4172
4245
|
const i = e.transform(n.value, n);
|
|
4173
4246
|
return i instanceof Promise ? i.then((s) => (n.value = s, n)) : (n.value = i, n);
|
|
4174
4247
|
};
|
|
4175
4248
|
});
|
|
4176
|
-
function
|
|
4177
|
-
return new
|
|
4249
|
+
function fo(t) {
|
|
4250
|
+
return new lo({
|
|
4178
4251
|
type: "transform",
|
|
4179
4252
|
transform: t
|
|
4180
4253
|
});
|
|
4181
4254
|
}
|
|
4182
|
-
const
|
|
4183
|
-
|
|
4255
|
+
const Ot = /* @__PURE__ */ u("ZodOptional", (t, e) => {
|
|
4256
|
+
Br.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => fs(t, n, r, i), t.unwrap = () => t._zod.def.innerType;
|
|
4184
4257
|
});
|
|
4185
4258
|
function Ge(t) {
|
|
4186
|
-
return new
|
|
4259
|
+
return new Ot({
|
|
4187
4260
|
type: "optional",
|
|
4188
4261
|
innerType: t
|
|
4189
4262
|
});
|
|
4190
4263
|
}
|
|
4191
|
-
const
|
|
4192
|
-
|
|
4264
|
+
const mo = /* @__PURE__ */ u("ZodNullable", (t, e) => {
|
|
4265
|
+
Jr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => as(t, n, r, i), t.unwrap = () => t._zod.def.innerType;
|
|
4193
4266
|
});
|
|
4194
4267
|
function Ve(t) {
|
|
4195
|
-
return new
|
|
4268
|
+
return new mo({
|
|
4196
4269
|
type: "nullable",
|
|
4197
4270
|
innerType: t
|
|
4198
4271
|
});
|
|
4199
4272
|
}
|
|
4200
|
-
const
|
|
4201
|
-
|
|
4273
|
+
const go = /* @__PURE__ */ u("ZodDefault", (t, e) => {
|
|
4274
|
+
Wr.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.removeDefault = t.unwrap;
|
|
4202
4275
|
});
|
|
4203
|
-
function
|
|
4204
|
-
return new
|
|
4276
|
+
function vo(t, e) {
|
|
4277
|
+
return new go({
|
|
4205
4278
|
type: "default",
|
|
4206
4279
|
innerType: t,
|
|
4207
4280
|
get defaultValue() {
|
|
@@ -4209,11 +4282,11 @@ function mo(t, e) {
|
|
|
4209
4282
|
}
|
|
4210
4283
|
});
|
|
4211
4284
|
}
|
|
4212
|
-
const
|
|
4213
|
-
|
|
4285
|
+
const _o = /* @__PURE__ */ u("ZodPrefault", (t, e) => {
|
|
4286
|
+
Kr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => hs(t, n, r, i), t.unwrap = () => t._zod.def.innerType;
|
|
4214
4287
|
});
|
|
4215
|
-
function
|
|
4216
|
-
return new
|
|
4288
|
+
function ko(t, e) {
|
|
4289
|
+
return new _o({
|
|
4217
4290
|
type: "prefault",
|
|
4218
4291
|
innerType: t,
|
|
4219
4292
|
get defaultValue() {
|
|
@@ -4221,108 +4294,122 @@ function vo(t, e) {
|
|
|
4221
4294
|
}
|
|
4222
4295
|
});
|
|
4223
4296
|
}
|
|
4224
|
-
const
|
|
4225
|
-
|
|
4297
|
+
const Pt = /* @__PURE__ */ u("ZodNonOptional", (t, e) => {
|
|
4298
|
+
Yr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => cs(t, n, r, i), t.unwrap = () => t._zod.def.innerType;
|
|
4226
4299
|
});
|
|
4227
|
-
function
|
|
4228
|
-
return new
|
|
4300
|
+
function yo(t, e) {
|
|
4301
|
+
return new Pt({
|
|
4229
4302
|
type: "nonoptional",
|
|
4230
4303
|
innerType: t,
|
|
4231
4304
|
...l(e)
|
|
4232
4305
|
});
|
|
4233
4306
|
}
|
|
4234
|
-
const
|
|
4235
|
-
|
|
4307
|
+
const To = /* @__PURE__ */ u("ZodCatch", (t, e) => {
|
|
4308
|
+
qr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => ps(t, n, r, i), t.unwrap = () => t._zod.def.innerType, t.removeCatch = t.unwrap;
|
|
4236
4309
|
});
|
|
4237
|
-
function
|
|
4238
|
-
return new
|
|
4310
|
+
function wo(t, e) {
|
|
4311
|
+
return new To({
|
|
4239
4312
|
type: "catch",
|
|
4240
4313
|
innerType: t,
|
|
4241
4314
|
catchValue: typeof e == "function" ? e : () => e
|
|
4242
4315
|
});
|
|
4243
4316
|
}
|
|
4244
|
-
const
|
|
4245
|
-
|
|
4317
|
+
const bo = /* @__PURE__ */ u("ZodPipe", (t, e) => {
|
|
4318
|
+
Xr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => ls(t, n, r, i), t.in = e.in, t.out = e.out;
|
|
4246
4319
|
});
|
|
4247
4320
|
function Be(t, e) {
|
|
4248
|
-
return new
|
|
4321
|
+
return new bo({
|
|
4249
4322
|
type: "pipe",
|
|
4250
4323
|
in: t,
|
|
4251
4324
|
out: e
|
|
4252
4325
|
// ...util.normalizeParams(params),
|
|
4253
4326
|
});
|
|
4254
4327
|
}
|
|
4255
|
-
const
|
|
4256
|
-
|
|
4328
|
+
const Eo = /* @__PURE__ */ u("ZodReadonly", (t, e) => {
|
|
4329
|
+
Qr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => ds(t, n, r, i), t.unwrap = () => t._zod.def.innerType;
|
|
4257
4330
|
});
|
|
4258
|
-
function
|
|
4259
|
-
return new
|
|
4331
|
+
function Io(t) {
|
|
4332
|
+
return new Eo({
|
|
4260
4333
|
type: "readonly",
|
|
4261
4334
|
innerType: t
|
|
4262
4335
|
});
|
|
4263
4336
|
}
|
|
4264
|
-
const
|
|
4265
|
-
|
|
4337
|
+
const zo = /* @__PURE__ */ u("ZodCustom", (t, e) => {
|
|
4338
|
+
Hr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => ts(t, n);
|
|
4266
4339
|
});
|
|
4267
|
-
function
|
|
4268
|
-
return
|
|
4340
|
+
function $o(t, e = {}) {
|
|
4341
|
+
return Vi(zo, t, e);
|
|
4269
4342
|
}
|
|
4270
|
-
function
|
|
4271
|
-
return
|
|
4343
|
+
function Oo(t) {
|
|
4344
|
+
return Bi(t);
|
|
4272
4345
|
}
|
|
4273
|
-
const
|
|
4346
|
+
const S = ae([
|
|
4274
4347
|
$(),
|
|
4275
|
-
|
|
4348
|
+
z({
|
|
4276
4349
|
pattern: $(),
|
|
4277
4350
|
flags: $().optional()
|
|
4278
4351
|
})
|
|
4279
|
-
]),
|
|
4280
|
-
kind:
|
|
4281
|
-
condition:
|
|
4282
|
-
operator:
|
|
4352
|
+
]), Po = z({
|
|
4353
|
+
kind: A("fragment"),
|
|
4354
|
+
condition: S.optional(),
|
|
4355
|
+
operator: ae([$(), Z($())]).optional()
|
|
4283
4356
|
// Note: Operator types might need to be refined if we want strict enum validation,
|
|
4284
4357
|
// but string is flexible for now.
|
|
4285
|
-
}),
|
|
4286
|
-
kind:
|
|
4287
|
-
name:
|
|
4288
|
-
id:
|
|
4289
|
-
stereotype:
|
|
4290
|
-
}), So =
|
|
4291
|
-
kind:
|
|
4292
|
-
text:
|
|
4293
|
-
from:
|
|
4294
|
-
to:
|
|
4295
|
-
}), No =
|
|
4296
|
-
kind:
|
|
4297
|
-
name:
|
|
4298
|
-
}),
|
|
4299
|
-
|
|
4300
|
-
Oo,
|
|
4301
|
-
So,
|
|
4302
|
-
No
|
|
4303
|
-
]), Ao = Te(["focus", "remove", "resolve"]), Zo = S({
|
|
4304
|
-
action: Ao,
|
|
4358
|
+
}), Te = z({
|
|
4359
|
+
kind: A("participant"),
|
|
4360
|
+
name: S.optional(),
|
|
4361
|
+
id: S.optional(),
|
|
4362
|
+
stereotype: S.optional()
|
|
4363
|
+
}), So = z({
|
|
4364
|
+
kind: A("message"),
|
|
4365
|
+
text: S.optional(),
|
|
4366
|
+
from: S.optional(),
|
|
4367
|
+
to: S.optional()
|
|
4368
|
+
}), No = z({
|
|
4369
|
+
kind: A("group"),
|
|
4370
|
+
name: S.optional()
|
|
4371
|
+
}), Ao = z({
|
|
4372
|
+
action: A("resolve"),
|
|
4305
4373
|
selector: Po
|
|
4306
|
-
}),
|
|
4374
|
+
}), Zo = z({
|
|
4375
|
+
action: A("focus"),
|
|
4376
|
+
selector: Te
|
|
4377
|
+
}), Co = z({
|
|
4378
|
+
action: A("remove"),
|
|
4379
|
+
selector: ae([
|
|
4380
|
+
Te,
|
|
4381
|
+
So,
|
|
4382
|
+
No
|
|
4383
|
+
])
|
|
4384
|
+
}), Ro = z({
|
|
4385
|
+
action: A("merge"),
|
|
4386
|
+
newName: $(),
|
|
4387
|
+
selector: Te
|
|
4388
|
+
}), Lo = co("action", [
|
|
4389
|
+
Ao,
|
|
4390
|
+
Zo,
|
|
4391
|
+
Co,
|
|
4392
|
+
Ro
|
|
4393
|
+
]), xo = z({
|
|
4307
4394
|
name: $(),
|
|
4308
4395
|
suffix: $().optional(),
|
|
4309
4396
|
// Defaults to .name in logic
|
|
4310
|
-
layers:
|
|
4311
|
-
}), Je =
|
|
4312
|
-
input:
|
|
4397
|
+
layers: Z(Lo)
|
|
4398
|
+
}), Je = $t(["mermaid", "plantuml"]), Do = z({
|
|
4399
|
+
input: Z($()),
|
|
4313
4400
|
outputDir: $(),
|
|
4314
|
-
ignore:
|
|
4315
|
-
lenses:
|
|
4401
|
+
ignore: Z($()).optional(),
|
|
4402
|
+
lenses: Z(xo),
|
|
4316
4403
|
format: Je.optional(),
|
|
4317
4404
|
// Input format (auto-detected if omitted)
|
|
4318
4405
|
outputFormat: Je.optional()
|
|
4319
4406
|
// Output format (same as input if omitted)
|
|
4320
|
-
}),
|
|
4321
|
-
version:
|
|
4322
|
-
targets:
|
|
4407
|
+
}), Fo = z({
|
|
4408
|
+
version: eo(),
|
|
4409
|
+
targets: Z(Do)
|
|
4323
4410
|
});
|
|
4324
|
-
function
|
|
4325
|
-
const e =
|
|
4411
|
+
function Vo(t) {
|
|
4412
|
+
const e = Fo.safeParse(t);
|
|
4326
4413
|
if (!e.success) {
|
|
4327
4414
|
const n = e.error.issues.map((r) => `[${r.path.join(".")}]: ${r.message}`).join(`
|
|
4328
4415
|
`);
|
|
@@ -4333,15 +4420,15 @@ ${n}`);
|
|
|
4333
4420
|
}
|
|
4334
4421
|
export {
|
|
4335
4422
|
be as FormatDetector,
|
|
4336
|
-
|
|
4423
|
+
Go as GeneratorFactory,
|
|
4337
4424
|
Ye as MermaidGeneratorVisitor,
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4425
|
+
Ut as ParserFactory,
|
|
4426
|
+
qe as PlantUMLGeneratorVisitor,
|
|
4427
|
+
Uo as Polagram,
|
|
4428
|
+
Xt as PolagramBuilder,
|
|
4429
|
+
Fo as PolagramConfigSchema,
|
|
4430
|
+
ue as TransformationEngine,
|
|
4344
4431
|
Ke as Traverser,
|
|
4345
|
-
|
|
4346
|
-
|
|
4432
|
+
qt as transformerRegistry,
|
|
4433
|
+
Vo as validateConfig
|
|
4347
4434
|
};
|