@settlemint/sdk-eas 2.5.1-prd40d4da9 → 2.5.1-pre6103334

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/eas.cjs CHANGED
@@ -106,7 +106,9 @@ const EAS_FIELD_TYPES = {
106
106
  };
107
107
 
108
108
  //#endregion
109
- //#region ../../node_modules/zod/dist/esm/v4/core/core.js
109
+ //#region ../../node_modules/zod/v4/core/core.js
110
+ /** A special constant with type `never` */
111
+ const NEVER = Object.freeze({ status: "aborted" });
110
112
  function $constructor(name, initializer$2, params) {
111
113
  function init(inst, def) {
112
114
  var _a;
@@ -157,7 +159,7 @@ function config(newConfig) {
157
159
  }
158
160
 
159
161
  //#endregion
160
- //#region ../../node_modules/zod/dist/esm/v4/core/util.js
162
+ //#region ../../node_modules/zod/v4/core/util.js
161
163
  var util_exports = {};
162
164
  __export(util_exports, {
163
165
  BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
@@ -172,6 +174,7 @@ __export(util_exports, {
172
174
  assertNotEqual: () => assertNotEqual,
173
175
  assignProp: () => assignProp,
174
176
  cached: () => cached,
177
+ captureStackTrace: () => captureStackTrace,
175
178
  cleanEnum: () => cleanEnum,
176
179
  cleanRegex: () => cleanRegex,
177
180
  clone: () => clone,
@@ -310,10 +313,14 @@ function randomString(length = 10) {
310
313
  function esc(str) {
311
314
  return JSON.stringify(str);
312
315
  }
316
+ const captureStackTrace = Error.captureStackTrace ? Error.captureStackTrace : (..._args) => {};
313
317
  function isObject(data) {
314
318
  return typeof data === "object" && data !== null && !Array.isArray(data);
315
319
  }
316
320
  const allowsEval = cached(() => {
321
+ if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
322
+ return false;
323
+ }
317
324
  try {
318
325
  const F = Function;
319
326
  new F("");
@@ -322,9 +329,6 @@ const allowsEval = cached(() => {
322
329
  return false;
323
330
  }
324
331
  });
325
- function _isObject(o) {
326
- return Object.prototype.toString.call(o) === "[object Object]";
327
- }
328
332
  function isPlainObject(o) {
329
333
  if (isObject(o) === false) return false;
330
334
  const ctor = o.constructor;
@@ -504,6 +508,9 @@ function omit(schema, mask) {
504
508
  });
505
509
  }
506
510
  function extend(schema, shape) {
511
+ if (!isPlainObject(shape)) {
512
+ throw new Error("Invalid input to extend: expected a plain object");
513
+ }
507
514
  const def = {
508
515
  ...schema._zod.def,
509
516
  get shape() {
@@ -591,7 +598,7 @@ function required(Class$1, schema, mask) {
591
598
  }
592
599
  function aborted(x, startIndex = 0) {
593
600
  for (let i = startIndex; i < x.issues.length; i++) {
594
- if (x.issues[i].continue !== true) return true;
601
+ if (x.issues[i]?.continue !== true) return true;
595
602
  }
596
603
  return false;
597
604
  }
@@ -655,7 +662,7 @@ var Class = class {
655
662
  };
656
663
 
657
664
  //#endregion
658
- //#region ../../node_modules/zod/dist/esm/v4/core/errors.js
665
+ //#region ../../node_modules/zod/v4/core/errors.js
659
666
  const initializer$1 = (inst, def) => {
660
667
  inst.name = "$ZodError";
661
668
  Object.defineProperty(inst, "_zod", {
@@ -672,13 +679,17 @@ const initializer$1 = (inst, def) => {
672
679
  },
673
680
  enumerable: true
674
681
  });
682
+ Object.defineProperty(inst, "toString", {
683
+ value: () => inst.message,
684
+ enumerable: false
685
+ });
675
686
  };
676
687
  const $ZodError = $constructor("$ZodError", initializer$1);
677
688
  const $ZodRealError = $constructor("$ZodError", initializer$1, { Parent: Error });
678
- function flattenError(error$37, mapper = (issue$1) => issue$1.message) {
689
+ function flattenError(error$39, mapper = (issue$1) => issue$1.message) {
679
690
  const fieldErrors = {};
680
691
  const formErrors = [];
681
- for (const sub of error$37.issues) {
692
+ for (const sub of error$39.issues) {
682
693
  if (sub.path.length > 0) {
683
694
  fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
684
695
  fieldErrors[sub.path[0]].push(mapper(sub));
@@ -691,13 +702,13 @@ function flattenError(error$37, mapper = (issue$1) => issue$1.message) {
691
702
  fieldErrors
692
703
  };
693
704
  }
694
- function formatError(error$37, _mapper) {
705
+ function formatError(error$39, _mapper) {
695
706
  const mapper = _mapper || function(issue$1) {
696
707
  return issue$1.message;
697
708
  };
698
709
  const fieldErrors = { _errors: [] };
699
- const processError = (error$38) => {
700
- for (const issue$1 of error$38.issues) {
710
+ const processError = (error$40) => {
711
+ for (const issue$1 of error$40.issues) {
701
712
  if (issue$1.code === "invalid_union" && issue$1.errors.length) {
702
713
  issue$1.errors.map((issues) => processError({ issues }));
703
714
  } else if (issue$1.code === "invalid_key") {
@@ -724,17 +735,17 @@ function formatError(error$37, _mapper) {
724
735
  }
725
736
  }
726
737
  };
727
- processError(error$37);
738
+ processError(error$39);
728
739
  return fieldErrors;
729
740
  }
730
- function treeifyError(error$37, _mapper) {
741
+ function treeifyError(error$39, _mapper) {
731
742
  const mapper = _mapper || function(issue$1) {
732
743
  return issue$1.message;
733
744
  };
734
745
  const result = { errors: [] };
735
- const processError = (error$38, path = []) => {
746
+ const processError = (error$40, path = []) => {
736
747
  var _a, _b;
737
- for (const issue$1 of error$38.issues) {
748
+ for (const issue$1 of error$40.issues) {
738
749
  if (issue$1.code === "invalid_union" && issue$1.errors.length) {
739
750
  issue$1.errors.map((issues) => processError({ issues }, issue$1.path));
740
751
  } else if (issue$1.code === "invalid_key") {
@@ -769,7 +780,7 @@ function treeifyError(error$37, _mapper) {
769
780
  }
770
781
  }
771
782
  };
772
- processError(error$37);
783
+ processError(error$39);
773
784
  return result;
774
785
  }
775
786
  /** Format a ZodError as a human-readable string in the following form.
@@ -817,9 +828,9 @@ function toDotPath(path) {
817
828
  }
818
829
  return segs.join("");
819
830
  }
820
- function prettifyError(error$37) {
831
+ function prettifyError(error$39) {
821
832
  const lines = [];
822
- const issues = [...error$37.issues].sort((a, b) => a.path.length - b.path.length);
833
+ const issues = [...error$39.issues].sort((a, b) => a.path.length - b.path.length);
823
834
  for (const issue$1 of issues) {
824
835
  lines.push(`✖ ${issue$1.message}`);
825
836
  if (issue$1.path?.length) lines.push(` → at ${toDotPath(issue$1.path)}`);
@@ -828,7 +839,7 @@ function prettifyError(error$37) {
828
839
  }
829
840
 
830
841
  //#endregion
831
- //#region ../../node_modules/zod/dist/esm/v4/core/parse.js
842
+ //#region ../../node_modules/zod/v4/core/parse.js
832
843
  const _parse = (_Err) => (schema, value, _ctx, _params) => {
833
844
  const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
834
845
  const result = schema._zod.run({
@@ -840,7 +851,7 @@ const _parse = (_Err) => (schema, value, _ctx, _params) => {
840
851
  }
841
852
  if (result.issues.length) {
842
853
  const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
843
- Error.captureStackTrace(e, _params?.callee);
854
+ captureStackTrace(e, _params?.callee);
844
855
  throw e;
845
856
  }
846
857
  return result.value;
@@ -855,7 +866,7 @@ const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
855
866
  if (result instanceof Promise) result = await result;
856
867
  if (result.issues.length) {
857
868
  const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
858
- Error.captureStackTrace(e, params?.callee);
869
+ captureStackTrace(e, params?.callee);
859
870
  throw e;
860
871
  }
861
872
  return result.value;
@@ -900,10 +911,9 @@ const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
900
911
  const safeParseAsync$1 = /* @__PURE__ */ _safeParseAsync($ZodRealError);
901
912
 
902
913
  //#endregion
903
- //#region ../../node_modules/zod/dist/esm/v4/core/regexes.js
914
+ //#region ../../node_modules/zod/v4/core/regexes.js
904
915
  var regexes_exports = {};
905
916
  __export(regexes_exports, {
906
- _emoji: () => _emoji$1,
907
917
  base64: () => base64$1,
908
918
  base64url: () => base64url$1,
909
919
  bigint: () => bigint$2,
@@ -989,27 +999,23 @@ const base64url$1 = /^[A-Za-z0-9_-]*$/;
989
999
  const hostname = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;
990
1000
  const domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
991
1001
  const e164$1 = /^\+(?:[0-9]){6,14}[0-9]$/;
992
- const dateSource = `((\\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])))`;
1002
+ const dateSource = `(?:(?:\\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])))`;
993
1003
  const date$3 = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
994
1004
  function timeSource(args) {
995
- let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
996
- if (args.precision) {
997
- regex = `${regex}\\.\\d{${args.precision}}`;
998
- } else if (args.precision == null) {
999
- regex = `${regex}(\\.\\d+)?`;
1000
- }
1005
+ const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
1006
+ const regex = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
1001
1007
  return regex;
1002
1008
  }
1003
1009
  function time$1(args) {
1004
1010
  return new RegExp(`^${timeSource(args)}$`);
1005
1011
  }
1006
1012
  function datetime$1(args) {
1007
- let regex = `${dateSource}T${timeSource(args)}`;
1008
- const opts = [];
1009
- opts.push(args.local ? `Z?` : `Z`);
1010
- if (args.offset) opts.push(`([+-]\\d{2}:?\\d{2})`);
1011
- regex = `${regex}(${opts.join("|")})`;
1012
- return new RegExp(`^${regex}$`);
1013
+ const time$2 = timeSource({ precision: args.precision });
1014
+ const opts = ["Z"];
1015
+ if (args.local) opts.push("");
1016
+ if (args.offset) opts.push(`([+-]\\d{2}:\\d{2})`);
1017
+ const timeRegex = `${time$2}(?:${opts.join("|")})`;
1018
+ return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
1013
1019
  }
1014
1020
  const string$2 = (params) => {
1015
1021
  const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
@@ -1025,7 +1031,7 @@ const lowercase = /^[^A-Z]*$/;
1025
1031
  const uppercase = /^[^a-z]*$/;
1026
1032
 
1027
1033
  //#endregion
1028
- //#region ../../node_modules/zod/dist/esm/v4/core/checks.js
1034
+ //#region ../../node_modules/zod/v4/core/checks.js
1029
1035
  const $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
1030
1036
  var _a;
1031
1037
  inst._zod ?? (inst._zod = {});
@@ -1216,11 +1222,12 @@ const $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntForma
1216
1222
  };
1217
1223
  });
1218
1224
  const $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
1225
+ var _a;
1219
1226
  $ZodCheck.init(inst, def);
1220
- inst._zod.when = (payload) => {
1227
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1221
1228
  const val = payload.value;
1222
1229
  return !nullish$1(val) && val.size !== undefined;
1223
- };
1230
+ });
1224
1231
  inst._zod.onattach.push((inst$1) => {
1225
1232
  const curr = inst$1._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1226
1233
  if (def.maximum < curr) inst$1._zod.bag.maximum = def.maximum;
@@ -1240,11 +1247,12 @@ const $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst,
1240
1247
  };
1241
1248
  });
1242
1249
  const $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
1250
+ var _a;
1243
1251
  $ZodCheck.init(inst, def);
1244
- inst._zod.when = (payload) => {
1252
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1245
1253
  const val = payload.value;
1246
1254
  return !nullish$1(val) && val.size !== undefined;
1247
- };
1255
+ });
1248
1256
  inst._zod.onattach.push((inst$1) => {
1249
1257
  const curr = inst$1._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1250
1258
  if (def.minimum > curr) inst$1._zod.bag.minimum = def.minimum;
@@ -1264,11 +1272,12 @@ const $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst,
1264
1272
  };
1265
1273
  });
1266
1274
  const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
1275
+ var _a;
1267
1276
  $ZodCheck.init(inst, def);
1268
- inst._zod.when = (payload) => {
1277
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1269
1278
  const val = payload.value;
1270
1279
  return !nullish$1(val) && val.size !== undefined;
1271
- };
1280
+ });
1272
1281
  inst._zod.onattach.push((inst$1) => {
1273
1282
  const bag = inst$1._zod.bag;
1274
1283
  bag.minimum = def.size;
@@ -1289,6 +1298,8 @@ const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals",
1289
1298
  code: "too_small",
1290
1299
  minimum: def.size
1291
1300
  },
1301
+ inclusive: true,
1302
+ exact: true,
1292
1303
  input: payload.value,
1293
1304
  inst,
1294
1305
  continue: !def.abort
@@ -1296,11 +1307,12 @@ const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals",
1296
1307
  };
1297
1308
  });
1298
1309
  const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
1310
+ var _a;
1299
1311
  $ZodCheck.init(inst, def);
1300
- inst._zod.when = (payload) => {
1312
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1301
1313
  const val = payload.value;
1302
1314
  return !nullish$1(val) && val.length !== undefined;
1303
- };
1315
+ });
1304
1316
  inst._zod.onattach.push((inst$1) => {
1305
1317
  const curr = inst$1._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1306
1318
  if (def.maximum < curr) inst$1._zod.bag.maximum = def.maximum;
@@ -1322,11 +1334,12 @@ const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (i
1322
1334
  };
1323
1335
  });
1324
1336
  const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
1337
+ var _a;
1325
1338
  $ZodCheck.init(inst, def);
1326
- inst._zod.when = (payload) => {
1339
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1327
1340
  const val = payload.value;
1328
1341
  return !nullish$1(val) && val.length !== undefined;
1329
- };
1342
+ });
1330
1343
  inst._zod.onattach.push((inst$1) => {
1331
1344
  const curr = inst$1._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1332
1345
  if (def.minimum > curr) inst$1._zod.bag.minimum = def.minimum;
@@ -1348,11 +1361,12 @@ const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (i
1348
1361
  };
1349
1362
  });
1350
1363
  const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
1364
+ var _a;
1351
1365
  $ZodCheck.init(inst, def);
1352
- inst._zod.when = (payload) => {
1366
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1353
1367
  const val = payload.value;
1354
1368
  return !nullish$1(val) && val.length !== undefined;
1355
- };
1369
+ });
1356
1370
  inst._zod.onattach.push((inst$1) => {
1357
1371
  const bag = inst$1._zod.bag;
1358
1372
  bag.minimum = def.length;
@@ -1374,6 +1388,8 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
1374
1388
  code: "too_small",
1375
1389
  minimum: def.length
1376
1390
  },
1391
+ inclusive: true,
1392
+ exact: true,
1377
1393
  input: payload.value,
1378
1394
  inst,
1379
1395
  continue: !def.abort
@@ -1381,7 +1397,7 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
1381
1397
  };
1382
1398
  });
1383
1399
  const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
1384
- var _a;
1400
+ var _a, _b;
1385
1401
  $ZodCheck.init(inst, def);
1386
1402
  inst._zod.onattach.push((inst$1) => {
1387
1403
  const bag = inst$1._zod.bag;
@@ -1391,8 +1407,7 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
1391
1407
  bag.patterns.add(def.pattern);
1392
1408
  }
1393
1409
  });
1394
- (_a = inst._zod).check ?? (_a.check = (payload) => {
1395
- if (!def.pattern) throw new Error("Not implemented.");
1410
+ if (def.pattern) (_a = inst._zod).check ?? (_a.check = (payload) => {
1396
1411
  def.pattern.lastIndex = 0;
1397
1412
  if (def.pattern.test(payload.value)) return;
1398
1413
  payload.issues.push({
@@ -1405,6 +1420,7 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
1405
1420
  continue: !def.abort
1406
1421
  });
1407
1422
  });
1423
+ else (_b = inst._zod).check ?? (_b.check = () => {});
1408
1424
  });
1409
1425
  const $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => {
1410
1426
  $ZodCheckStringFormat.init(inst, def);
@@ -1528,7 +1544,6 @@ const $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (ins
1528
1544
  code: "invalid_value",
1529
1545
  values: def.mime,
1530
1546
  input: payload.value.type,
1531
- path: ["type"],
1532
1547
  inst
1533
1548
  });
1534
1549
  };
@@ -1541,7 +1556,7 @@ const $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (i
1541
1556
  });
1542
1557
 
1543
1558
  //#endregion
1544
- //#region ../../node_modules/zod/dist/esm/v4/core/doc.js
1559
+ //#region ../../node_modules/zod/v4/core/doc.js
1545
1560
  var Doc = class {
1546
1561
  constructor(args = []) {
1547
1562
  this.content = [];
@@ -1577,19 +1592,18 @@ var Doc = class {
1577
1592
  };
1578
1593
 
1579
1594
  //#endregion
1580
- //#region ../../node_modules/zod/dist/esm/v4/core/versions.js
1595
+ //#region ../../node_modules/zod/v4/core/versions.js
1581
1596
  const version = {
1582
1597
  major: 4,
1583
1598
  minor: 0,
1584
- patch: 0
1599
+ patch: 5
1585
1600
  };
1586
1601
 
1587
1602
  //#endregion
1588
- //#region ../../node_modules/zod/dist/esm/v4/core/schemas.js
1603
+ //#region ../../node_modules/zod/v4/core/schemas.js
1589
1604
  const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1590
1605
  var _a;
1591
1606
  inst ?? (inst = {});
1592
- inst._zod.id = def.type + "_" + randomString(10);
1593
1607
  inst._zod.def = def;
1594
1608
  inst._zod.bag = inst._zod.bag || {};
1595
1609
  inst._zod.version = version;
@@ -1612,13 +1626,11 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1612
1626
  let isAborted = aborted(payload);
1613
1627
  let asyncResult;
1614
1628
  for (const ch of checks$1) {
1615
- if (ch._zod.when) {
1616
- const shouldRun = ch._zod.when(payload);
1629
+ if (ch._zod.def.when) {
1630
+ const shouldRun = ch._zod.def.when(payload);
1617
1631
  if (!shouldRun) continue;
1618
- } else {
1619
- if (isAborted) {
1620
- continue;
1621
- }
1632
+ } else if (isAborted) {
1633
+ continue;
1622
1634
  }
1623
1635
  const currLen = payload.issues.length;
1624
1636
  const _ = ch._zod.check(payload);
@@ -1718,7 +1730,9 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1718
1730
  $ZodStringFormat.init(inst, def);
1719
1731
  inst._zod.check = (payload) => {
1720
1732
  try {
1721
- const url$1 = new URL(payload.value);
1733
+ const orig = payload.value;
1734
+ const url$1 = new URL(orig);
1735
+ const href = url$1.href;
1722
1736
  if (def.hostname) {
1723
1737
  def.hostname.lastIndex = 0;
1724
1738
  if (!def.hostname.test(url$1.hostname)) {
@@ -1747,6 +1761,11 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1747
1761
  });
1748
1762
  }
1749
1763
  }
1764
+ if (!orig.endsWith("/") && href.endsWith("/")) {
1765
+ payload.value = href.slice(0, -1);
1766
+ } else {
1767
+ payload.value = href;
1768
+ }
1750
1769
  return;
1751
1770
  } catch (_) {
1752
1771
  payload.issues.push({
@@ -1917,6 +1936,7 @@ function isValidJWT(token, algorithm = null) {
1917
1936
  const tokensParts = token.split(".");
1918
1937
  if (tokensParts.length !== 3) return false;
1919
1938
  const [header] = tokensParts;
1939
+ if (!header) return false;
1920
1940
  const parsedHeader = JSON.parse(atob(header));
1921
1941
  if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") return false;
1922
1942
  if (!parsedHeader.alg) return false;
@@ -1939,6 +1959,19 @@ const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
1939
1959
  });
1940
1960
  };
1941
1961
  });
1962
+ const $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringFormat", (inst, def) => {
1963
+ $ZodStringFormat.init(inst, def);
1964
+ inst._zod.check = (payload) => {
1965
+ if (def.fn(payload.value)) return;
1966
+ payload.issues.push({
1967
+ code: "invalid_format",
1968
+ format: def.format,
1969
+ input: payload.value,
1970
+ inst,
1971
+ continue: !def.abort
1972
+ });
1973
+ };
1974
+ });
1942
1975
  const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
1943
1976
  $ZodType.init(inst, def);
1944
1977
  inst._zod.pattern = inst._zod.bag.pattern ?? number$2;
@@ -1990,12 +2023,11 @@ const $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
1990
2023
  if (def.coerce) try {
1991
2024
  payload.value = BigInt(payload.value);
1992
2025
  } catch (_) {}
1993
- const { value: input } = payload;
1994
- if (typeof input === "bigint") return payload;
2026
+ if (typeof payload.value === "bigint") return payload;
1995
2027
  payload.issues.push({
1996
2028
  expected: "bigint",
1997
2029
  code: "invalid_type",
1998
- input,
2030
+ input: payload.value,
1999
2031
  inst
2000
2032
  });
2001
2033
  return payload;
@@ -2008,7 +2040,7 @@ const $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def)
2008
2040
  const $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => {
2009
2041
  $ZodType.init(inst, def);
2010
2042
  inst._zod.parse = (payload, _ctx) => {
2011
- const { value: input } = payload;
2043
+ const input = payload.value;
2012
2044
  if (typeof input === "symbol") return payload;
2013
2045
  payload.issues.push({
2014
2046
  expected: "symbol",
@@ -2023,8 +2055,10 @@ const $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def)
2023
2055
  $ZodType.init(inst, def);
2024
2056
  inst._zod.pattern = _undefined$2;
2025
2057
  inst._zod.values = new Set([undefined]);
2058
+ inst._zod.optin = "optional";
2059
+ inst._zod.optout = "optional";
2026
2060
  inst._zod.parse = (payload, _ctx) => {
2027
- const { value: input } = payload;
2061
+ const input = payload.value;
2028
2062
  if (typeof input === "undefined") return payload;
2029
2063
  payload.issues.push({
2030
2064
  expected: "undefined",
@@ -2040,7 +2074,7 @@ const $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
2040
2074
  inst._zod.pattern = _null$2;
2041
2075
  inst._zod.values = new Set([null]);
2042
2076
  inst._zod.parse = (payload, _ctx) => {
2043
- const { value: input } = payload;
2077
+ const input = payload.value;
2044
2078
  if (input === null) return payload;
2045
2079
  payload.issues.push({
2046
2080
  expected: "null",
@@ -2074,7 +2108,7 @@ const $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
2074
2108
  const $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => {
2075
2109
  $ZodType.init(inst, def);
2076
2110
  inst._zod.parse = (payload, _ctx) => {
2077
- const { value: input } = payload;
2111
+ const input = payload.value;
2078
2112
  if (typeof input === "undefined") return payload;
2079
2113
  payload.issues.push({
2080
2114
  expected: "void",
@@ -2205,19 +2239,20 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2205
2239
  "payload",
2206
2240
  "ctx"
2207
2241
  ]);
2208
- const { keys, optionalKeys: optionalKeys$1 } = _normalized.value;
2242
+ const normalized = _normalized.value;
2209
2243
  const parseStr = (key) => {
2210
2244
  const k = esc(key);
2211
2245
  return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
2212
2246
  };
2213
2247
  doc.write(`const input = payload.value;`);
2214
2248
  const ids = Object.create(null);
2215
- for (const key of keys) {
2216
- ids[key] = randomString(15);
2249
+ let counter = 0;
2250
+ for (const key of normalized.keys) {
2251
+ ids[key] = `key_${counter++}`;
2217
2252
  }
2218
2253
  doc.write(`const newResult = {}`);
2219
- for (const key of keys) {
2220
- if (optionalKeys$1.has(key)) {
2254
+ for (const key of normalized.keys) {
2255
+ if (normalized.optionalKeys.has(key)) {
2221
2256
  const id = ids[key];
2222
2257
  doc.write(`const ${id} = ${parseStr(key)};`);
2223
2258
  const k = esc(key);
@@ -2262,7 +2297,7 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2262
2297
  const jit = !globalConfig.jitless;
2263
2298
  const allowsEval$1 = allowsEval;
2264
2299
  const fastEnabled = jit && allowsEval$1.value;
2265
- const { catchall } = def;
2300
+ const catchall = def.catchall;
2266
2301
  let value;
2267
2302
  inst._zod.parse = (payload, ctx) => {
2268
2303
  value ?? (value = _normalized.value);
@@ -2292,12 +2327,10 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2292
2327
  const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
2293
2328
  if (r instanceof Promise) {
2294
2329
  proms.push(r.then((r$1) => isOptional ? handleOptionalObjectResult(r$1, payload, key, input) : handleObjectResult(r$1, payload, key)));
2330
+ } else if (isOptional) {
2331
+ handleOptionalObjectResult(r, payload, key, input);
2295
2332
  } else {
2296
- if (isOptional) {
2297
- handleOptionalObjectResult(r, payload, key, input);
2298
- } else {
2299
- handleObjectResult(r, payload, key);
2300
- }
2333
+ handleObjectResult(r, payload, key);
2301
2334
  }
2302
2335
  }
2303
2336
  }
@@ -2355,6 +2388,8 @@ function handleUnionResults(results, final, inst, ctx) {
2355
2388
  }
2356
2389
  const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
2357
2390
  $ZodType.init(inst, def);
2391
+ defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : undefined);
2392
+ defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined);
2358
2393
  defineLazy(inst._zod, "values", () => {
2359
2394
  if (def.options.every((o) => o._zod.values)) {
2360
2395
  return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
@@ -2411,7 +2446,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
2411
2446
  const opts = def.options;
2412
2447
  const map$1 = new Map();
2413
2448
  for (const o of opts) {
2414
- const values = o._zod.propValues[def.discriminator];
2449
+ const values = o._zod.propValues?.[def.discriminator];
2415
2450
  if (!values || values.size === 0) throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
2416
2451
  for (const v of values) {
2417
2452
  if (map$1.has(v)) {
@@ -2454,7 +2489,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
2454
2489
  const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
2455
2490
  $ZodType.init(inst, def);
2456
2491
  inst._zod.parse = (payload, ctx) => {
2457
- const { value: input } = payload;
2492
+ const input = payload.value;
2458
2493
  const left = def.left._zod.run({
2459
2494
  value: input,
2460
2495
  issues: []
@@ -2911,6 +2946,9 @@ const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) =>
2911
2946
  return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : undefined;
2912
2947
  });
2913
2948
  inst._zod.parse = (payload, ctx) => {
2949
+ if (def.innerType._zod.optin === "optional") {
2950
+ return def.innerType._zod.run(payload, ctx);
2951
+ }
2914
2952
  if (payload.value === undefined) {
2915
2953
  return payload;
2916
2954
  }
@@ -3010,7 +3048,7 @@ const $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
3010
3048
  });
3011
3049
  const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
3012
3050
  $ZodType.init(inst, def);
3013
- defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
3051
+ inst._zod.optin = "optional";
3014
3052
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
3015
3053
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3016
3054
  inst._zod.parse = (payload, ctx) => {
@@ -3061,6 +3099,7 @@ const $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => {
3061
3099
  defineLazy(inst._zod, "values", () => def.in._zod.values);
3062
3100
  defineLazy(inst._zod, "optin", () => def.in._zod.optin);
3063
3101
  defineLazy(inst._zod, "optout", () => def.out._zod.optout);
3102
+ defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
3064
3103
  inst._zod.parse = (payload, ctx) => {
3065
3104
  const left = def.in._zod.run(payload, ctx);
3066
3105
  if (left instanceof Promise) {
@@ -3081,6 +3120,7 @@ function handlePipeResult(left, def, ctx) {
3081
3120
  const $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
3082
3121
  $ZodType.init(inst, def);
3083
3122
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
3123
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3084
3124
  defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
3085
3125
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
3086
3126
  inst._zod.parse = (payload, ctx) => {
@@ -3131,7 +3171,7 @@ const $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral",
3131
3171
  input: payload.value,
3132
3172
  inst,
3133
3173
  code: "invalid_format",
3134
- format: "template_literal",
3174
+ format: def.format ?? "template_literal",
3135
3175
  pattern: inst._zod.pattern.source
3136
3176
  });
3137
3177
  return payload;
@@ -3191,8 +3231,8 @@ function handleRefineResult(result, payload, input, inst) {
3191
3231
  }
3192
3232
 
3193
3233
  //#endregion
3194
- //#region ../../node_modules/zod/dist/esm/v4/locales/ar.js
3195
- const error$36 = () => {
3234
+ //#region ../../node_modules/zod/v4/locales/ar.js
3235
+ const error$38 = () => {
3196
3236
  const Sizable = {
3197
3237
  string: {
3198
3238
  unit: "حرف",
@@ -3214,7 +3254,7 @@ const error$36 = () => {
3214
3254
  function getSizing(origin) {
3215
3255
  return Sizable[origin] ?? null;
3216
3256
  }
3217
- const parsedType$2 = (data) => {
3257
+ const parsedType$3 = (data) => {
3218
3258
  const t = typeof data;
3219
3259
  switch (t) {
3220
3260
  case "number": {
@@ -3266,7 +3306,7 @@ const error$36 = () => {
3266
3306
  };
3267
3307
  return (issue$1) => {
3268
3308
  switch (issue$1.code) {
3269
- case "invalid_type": return `مدخلات غير مقبولة: يفترض إدخال ${issue$1.expected}، ولكن تم إدخال ${parsedType$2(issue$1.input)}`;
3309
+ case "invalid_type": return `مدخلات غير مقبولة: يفترض إدخال ${issue$1.expected}، ولكن تم إدخال ${parsedType$3(issue$1.input)}`;
3270
3310
  case "invalid_value":
3271
3311
  if (issue$1.values.length === 1) return `مدخلات غير مقبولة: يفترض إدخال ${stringifyPrimitive(issue$1.values[0])}`;
3272
3312
  return `اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${joinValues(issue$1.values, "|")}`;
@@ -3302,12 +3342,12 @@ const error$36 = () => {
3302
3342
  };
3303
3343
  };
3304
3344
  function ar_default() {
3305
- return { localeError: error$36() };
3345
+ return { localeError: error$38() };
3306
3346
  }
3307
3347
 
3308
3348
  //#endregion
3309
- //#region ../../node_modules/zod/dist/esm/v4/locales/az.js
3310
- const error$35 = () => {
3349
+ //#region ../../node_modules/zod/v4/locales/az.js
3350
+ const error$37 = () => {
3311
3351
  const Sizable = {
3312
3352
  string: {
3313
3353
  unit: "simvol",
@@ -3329,7 +3369,7 @@ const error$35 = () => {
3329
3369
  function getSizing(origin) {
3330
3370
  return Sizable[origin] ?? null;
3331
3371
  }
3332
- const parsedType$2 = (data) => {
3372
+ const parsedType$3 = (data) => {
3333
3373
  const t = typeof data;
3334
3374
  switch (t) {
3335
3375
  case "number": {
@@ -3381,7 +3421,7 @@ const error$35 = () => {
3381
3421
  };
3382
3422
  return (issue$1) => {
3383
3423
  switch (issue$1.code) {
3384
- case "invalid_type": return `Yanlış dəyər: gözlənilən ${issue$1.expected}, daxil olan ${parsedType$2(issue$1.input)}`;
3424
+ case "invalid_type": return `Yanlış dəyər: gözlənilən ${issue$1.expected}, daxil olan ${parsedType$3(issue$1.input)}`;
3385
3425
  case "invalid_value":
3386
3426
  if (issue$1.values.length === 1) return `Yanlış dəyər: gözlənilən ${stringifyPrimitive(issue$1.values[0])}`;
3387
3427
  return `Yanlış seçim: aşağıdakılardan biri olmalıdır: ${joinValues(issue$1.values, "|")}`;
@@ -3415,11 +3455,11 @@ const error$35 = () => {
3415
3455
  };
3416
3456
  };
3417
3457
  function az_default() {
3418
- return { localeError: error$35() };
3458
+ return { localeError: error$37() };
3419
3459
  }
3420
3460
 
3421
3461
  //#endregion
3422
- //#region ../../node_modules/zod/dist/esm/v4/locales/be.js
3462
+ //#region ../../node_modules/zod/v4/locales/be.js
3423
3463
  function getBelarusianPlural(count, one, few, many) {
3424
3464
  const absCount = Math.abs(count);
3425
3465
  const lastDigit = absCount % 10;
@@ -3435,7 +3475,7 @@ function getBelarusianPlural(count, one, few, many) {
3435
3475
  }
3436
3476
  return many;
3437
3477
  }
3438
- const error$34 = () => {
3478
+ const error$36 = () => {
3439
3479
  const Sizable = {
3440
3480
  string: {
3441
3481
  unit: {
@@ -3473,7 +3513,7 @@ const error$34 = () => {
3473
3513
  function getSizing(origin) {
3474
3514
  return Sizable[origin] ?? null;
3475
3515
  }
3476
- const parsedType$2 = (data) => {
3516
+ const parsedType$3 = (data) => {
3477
3517
  const t = typeof data;
3478
3518
  switch (t) {
3479
3519
  case "number": {
@@ -3525,7 +3565,7 @@ const error$34 = () => {
3525
3565
  };
3526
3566
  return (issue$1) => {
3527
3567
  switch (issue$1.code) {
3528
- case "invalid_type": return `Няправільны ўвод: чакаўся ${issue$1.expected}, атрымана ${parsedType$2(issue$1.input)}`;
3568
+ case "invalid_type": return `Няправільны ўвод: чакаўся ${issue$1.expected}, атрымана ${parsedType$3(issue$1.input)}`;
3529
3569
  case "invalid_value":
3530
3570
  if (issue$1.values.length === 1) return `Няправільны ўвод: чакалася ${stringifyPrimitive(issue$1.values[0])}`;
3531
3571
  return `Няправільны варыянт: чакаўся адзін з ${joinValues(issue$1.values, "|")}`;
@@ -3567,12 +3607,12 @@ const error$34 = () => {
3567
3607
  };
3568
3608
  };
3569
3609
  function be_default() {
3570
- return { localeError: error$34() };
3610
+ return { localeError: error$36() };
3571
3611
  }
3572
3612
 
3573
3613
  //#endregion
3574
- //#region ../../node_modules/zod/dist/esm/v4/locales/ca.js
3575
- const error$33 = () => {
3614
+ //#region ../../node_modules/zod/v4/locales/ca.js
3615
+ const error$35 = () => {
3576
3616
  const Sizable = {
3577
3617
  string: {
3578
3618
  unit: "caràcters",
@@ -3594,7 +3634,7 @@ const error$33 = () => {
3594
3634
  function getSizing(origin) {
3595
3635
  return Sizable[origin] ?? null;
3596
3636
  }
3597
- const parsedType$2 = (data) => {
3637
+ const parsedType$3 = (data) => {
3598
3638
  const t = typeof data;
3599
3639
  switch (t) {
3600
3640
  case "number": {
@@ -3646,7 +3686,7 @@ const error$33 = () => {
3646
3686
  };
3647
3687
  return (issue$1) => {
3648
3688
  switch (issue$1.code) {
3649
- case "invalid_type": return `Tipus invàlid: s'esperava ${issue$1.expected}, s'ha rebut ${parsedType$2(issue$1.input)}`;
3689
+ case "invalid_type": return `Tipus invàlid: s'esperava ${issue$1.expected}, s'ha rebut ${parsedType$3(issue$1.input)}`;
3650
3690
  case "invalid_value":
3651
3691
  if (issue$1.values.length === 1) return `Valor invàlid: s'esperava ${stringifyPrimitive(issue$1.values[0])}`;
3652
3692
  return `Opció invàlida: s'esperava una de ${joinValues(issue$1.values, " o ")}`;
@@ -3684,12 +3724,12 @@ const error$33 = () => {
3684
3724
  };
3685
3725
  };
3686
3726
  function ca_default() {
3687
- return { localeError: error$33() };
3727
+ return { localeError: error$35() };
3688
3728
  }
3689
3729
 
3690
3730
  //#endregion
3691
- //#region ../../node_modules/zod/dist/esm/v4/locales/cs.js
3692
- const error$32 = () => {
3731
+ //#region ../../node_modules/zod/v4/locales/cs.js
3732
+ const error$34 = () => {
3693
3733
  const Sizable = {
3694
3734
  string: {
3695
3735
  unit: "znaků",
@@ -3711,7 +3751,7 @@ const error$32 = () => {
3711
3751
  function getSizing(origin) {
3712
3752
  return Sizable[origin] ?? null;
3713
3753
  }
3714
- const parsedType$2 = (data) => {
3754
+ const parsedType$3 = (data) => {
3715
3755
  const t = typeof data;
3716
3756
  switch (t) {
3717
3757
  case "number": {
@@ -3781,7 +3821,7 @@ const error$32 = () => {
3781
3821
  };
3782
3822
  return (issue$1) => {
3783
3823
  switch (issue$1.code) {
3784
- case "invalid_type": return `Neplatný vstup: očekáváno ${issue$1.expected}, obdrženo ${parsedType$2(issue$1.input)}`;
3824
+ case "invalid_type": return `Neplatný vstup: očekáváno ${issue$1.expected}, obdrženo ${parsedType$3(issue$1.input)}`;
3785
3825
  case "invalid_value":
3786
3826
  if (issue$1.values.length === 1) return `Neplatný vstup: očekáváno ${stringifyPrimitive(issue$1.values[0])}`;
3787
3827
  return `Neplatná možnost: očekávána jedna z hodnot ${joinValues(issue$1.values, "|")}`;
@@ -3819,12 +3859,12 @@ const error$32 = () => {
3819
3859
  };
3820
3860
  };
3821
3861
  function cs_default() {
3822
- return { localeError: error$32() };
3862
+ return { localeError: error$34() };
3823
3863
  }
3824
3864
 
3825
3865
  //#endregion
3826
- //#region ../../node_modules/zod/dist/esm/v4/locales/de.js
3827
- const error$31 = () => {
3866
+ //#region ../../node_modules/zod/v4/locales/de.js
3867
+ const error$33 = () => {
3828
3868
  const Sizable = {
3829
3869
  string: {
3830
3870
  unit: "Zeichen",
@@ -3846,7 +3886,7 @@ const error$31 = () => {
3846
3886
  function getSizing(origin) {
3847
3887
  return Sizable[origin] ?? null;
3848
3888
  }
3849
- const parsedType$2 = (data) => {
3889
+ const parsedType$3 = (data) => {
3850
3890
  const t = typeof data;
3851
3891
  switch (t) {
3852
3892
  case "number": {
@@ -3898,7 +3938,7 @@ const error$31 = () => {
3898
3938
  };
3899
3939
  return (issue$1) => {
3900
3940
  switch (issue$1.code) {
3901
- case "invalid_type": return `Ungültige Eingabe: erwartet ${issue$1.expected}, erhalten ${parsedType$2(issue$1.input)}`;
3941
+ case "invalid_type": return `Ungültige Eingabe: erwartet ${issue$1.expected}, erhalten ${parsedType$3(issue$1.input)}`;
3902
3942
  case "invalid_value":
3903
3943
  if (issue$1.values.length === 1) return `Ungültige Eingabe: erwartet ${stringifyPrimitive(issue$1.values[0])}`;
3904
3944
  return `Ungültige Option: erwartet eine von ${joinValues(issue$1.values, "|")}`;
@@ -3934,12 +3974,12 @@ const error$31 = () => {
3934
3974
  };
3935
3975
  };
3936
3976
  function de_default() {
3937
- return { localeError: error$31() };
3977
+ return { localeError: error$33() };
3938
3978
  }
3939
3979
 
3940
3980
  //#endregion
3941
- //#region ../../node_modules/zod/dist/esm/v4/locales/en.js
3942
- const parsedType$1 = (data) => {
3981
+ //#region ../../node_modules/zod/v4/locales/en.js
3982
+ const parsedType$2 = (data) => {
3943
3983
  const t = typeof data;
3944
3984
  switch (t) {
3945
3985
  case "number": {
@@ -3959,7 +3999,7 @@ const parsedType$1 = (data) => {
3959
3999
  }
3960
4000
  return t;
3961
4001
  };
3962
- const error$30 = () => {
4002
+ const error$32 = () => {
3963
4003
  const Sizable = {
3964
4004
  string: {
3965
4005
  unit: "characters",
@@ -4013,7 +4053,7 @@ const error$30 = () => {
4013
4053
  };
4014
4054
  return (issue$1) => {
4015
4055
  switch (issue$1.code) {
4016
- case "invalid_type": return `Invalid input: expected ${issue$1.expected}, received ${parsedType$1(issue$1.input)}`;
4056
+ case "invalid_type": return `Invalid input: expected ${issue$1.expected}, received ${parsedType$2(issue$1.input)}`;
4017
4057
  case "invalid_value":
4018
4058
  if (issue$1.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue$1.values[0])}`;
4019
4059
  return `Invalid option: expected one of ${joinValues(issue$1.values, "|")}`;
@@ -4051,12 +4091,127 @@ const error$30 = () => {
4051
4091
  };
4052
4092
  };
4053
4093
  function en_default() {
4054
- return { localeError: error$30() };
4094
+ return { localeError: error$32() };
4055
4095
  }
4056
4096
 
4057
4097
  //#endregion
4058
- //#region ../../node_modules/zod/dist/esm/v4/locales/es.js
4059
- const error$29 = () => {
4098
+ //#region ../../node_modules/zod/v4/locales/eo.js
4099
+ const parsedType$1 = (data) => {
4100
+ const t = typeof data;
4101
+ switch (t) {
4102
+ case "number": {
4103
+ return Number.isNaN(data) ? "NaN" : "nombro";
4104
+ }
4105
+ case "object": {
4106
+ if (Array.isArray(data)) {
4107
+ return "tabelo";
4108
+ }
4109
+ if (data === null) {
4110
+ return "senvalora";
4111
+ }
4112
+ if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
4113
+ return data.constructor.name;
4114
+ }
4115
+ }
4116
+ }
4117
+ return t;
4118
+ };
4119
+ const error$31 = () => {
4120
+ const Sizable = {
4121
+ string: {
4122
+ unit: "karaktrojn",
4123
+ verb: "havi"
4124
+ },
4125
+ file: {
4126
+ unit: "bajtojn",
4127
+ verb: "havi"
4128
+ },
4129
+ array: {
4130
+ unit: "elementojn",
4131
+ verb: "havi"
4132
+ },
4133
+ set: {
4134
+ unit: "elementojn",
4135
+ verb: "havi"
4136
+ }
4137
+ };
4138
+ function getSizing(origin) {
4139
+ return Sizable[origin] ?? null;
4140
+ }
4141
+ const Nouns = {
4142
+ regex: "enigo",
4143
+ email: "retadreso",
4144
+ url: "URL",
4145
+ emoji: "emoĝio",
4146
+ uuid: "UUID",
4147
+ uuidv4: "UUIDv4",
4148
+ uuidv6: "UUIDv6",
4149
+ nanoid: "nanoid",
4150
+ guid: "GUID",
4151
+ cuid: "cuid",
4152
+ cuid2: "cuid2",
4153
+ ulid: "ULID",
4154
+ xid: "XID",
4155
+ ksuid: "KSUID",
4156
+ datetime: "ISO-datotempo",
4157
+ date: "ISO-dato",
4158
+ time: "ISO-tempo",
4159
+ duration: "ISO-daŭro",
4160
+ ipv4: "IPv4-adreso",
4161
+ ipv6: "IPv6-adreso",
4162
+ cidrv4: "IPv4-rango",
4163
+ cidrv6: "IPv6-rango",
4164
+ base64: "64-ume kodita karaktraro",
4165
+ base64url: "URL-64-ume kodita karaktraro",
4166
+ json_string: "JSON-karaktraro",
4167
+ e164: "E.164-nombro",
4168
+ jwt: "JWT",
4169
+ template_literal: "enigo"
4170
+ };
4171
+ return (issue$1) => {
4172
+ switch (issue$1.code) {
4173
+ case "invalid_type": return `Nevalida enigo: atendiĝis ${issue$1.expected}, riceviĝis ${parsedType$1(issue$1.input)}`;
4174
+ case "invalid_value":
4175
+ if (issue$1.values.length === 1) return `Nevalida enigo: atendiĝis ${stringifyPrimitive(issue$1.values[0])}`;
4176
+ return `Nevalida opcio: atendiĝis unu el ${joinValues(issue$1.values, "|")}`;
4177
+ case "too_big": {
4178
+ const adj = issue$1.inclusive ? "<=" : "<";
4179
+ const sizing = getSizing(issue$1.origin);
4180
+ if (sizing) return `Tro granda: atendiĝis ke ${issue$1.origin ?? "valoro"} havu ${adj}${issue$1.maximum.toString()} ${sizing.unit ?? "elementojn"}`;
4181
+ return `Tro granda: atendiĝis ke ${issue$1.origin ?? "valoro"} havu ${adj}${issue$1.maximum.toString()}`;
4182
+ }
4183
+ case "too_small": {
4184
+ const adj = issue$1.inclusive ? ">=" : ">";
4185
+ const sizing = getSizing(issue$1.origin);
4186
+ if (sizing) {
4187
+ return `Tro malgranda: atendiĝis ke ${issue$1.origin} havu ${adj}${issue$1.minimum.toString()} ${sizing.unit}`;
4188
+ }
4189
+ return `Tro malgranda: atendiĝis ke ${issue$1.origin} estu ${adj}${issue$1.minimum.toString()}`;
4190
+ }
4191
+ case "invalid_format": {
4192
+ const _issue = issue$1;
4193
+ if (_issue.format === "starts_with") return `Nevalida karaktraro: devas komenciĝi per "${_issue.prefix}"`;
4194
+ if (_issue.format === "ends_with") return `Nevalida karaktraro: devas finiĝi per "${_issue.suffix}"`;
4195
+ if (_issue.format === "includes") return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`;
4196
+ if (_issue.format === "regex") return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;
4197
+ return `Nevalida ${Nouns[_issue.format] ?? issue$1.format}`;
4198
+ }
4199
+ case "not_multiple_of": return `Nevalida nombro: devas esti oblo de ${issue$1.divisor}`;
4200
+ case "unrecognized_keys": return `Nekonata${issue$1.keys.length > 1 ? "j" : ""} ŝlosilo${issue$1.keys.length > 1 ? "j" : ""}: ${joinValues(issue$1.keys, ", ")}`;
4201
+ case "invalid_key": return `Nevalida ŝlosilo en ${issue$1.origin}`;
4202
+ case "invalid_union": return "Nevalida enigo";
4203
+ case "invalid_element": return `Nevalida valoro en ${issue$1.origin}`;
4204
+ default: return `Nevalida enigo`;
4205
+ }
4206
+ };
4207
+ };
4208
+ function eo_default() {
4209
+ return { localeError: error$31() };
4210
+ }
4211
+
4212
+ //#endregion
4213
+ //#region ../../node_modules/zod/v4/locales/es.js
4214
+ const error$30 = () => {
4060
4215
  const Sizable = {
4061
4216
  string: {
4062
4217
  unit: "caracteres",
@@ -4078,7 +4233,7 @@ const error$29 = () => {
4078
4233
  function getSizing(origin) {
4079
4234
  return Sizable[origin] ?? null;
4080
4235
  }
4081
- const parsedType$2 = (data) => {
4236
+ const parsedType$3 = (data) => {
4082
4237
  const t = typeof data;
4083
4238
  switch (t) {
4084
4239
  case "number": {
@@ -4130,7 +4285,7 @@ const error$29 = () => {
4130
4285
  };
4131
4286
  return (issue$1) => {
4132
4287
  switch (issue$1.code) {
4133
- case "invalid_type": return `Entrada inválida: se esperaba ${issue$1.expected}, recibido ${parsedType$2(issue$1.input)}`;
4288
+ case "invalid_type": return `Entrada inválida: se esperaba ${issue$1.expected}, recibido ${parsedType$3(issue$1.input)}`;
4134
4289
  case "invalid_value":
4135
4290
  if (issue$1.values.length === 1) return `Entrada inválida: se esperaba ${stringifyPrimitive(issue$1.values[0])}`;
4136
4291
  return `Opción inválida: se esperaba una de ${joinValues(issue$1.values, "|")}`;
@@ -4166,12 +4321,12 @@ const error$29 = () => {
4166
4321
  };
4167
4322
  };
4168
4323
  function es_default() {
4169
- return { localeError: error$29() };
4324
+ return { localeError: error$30() };
4170
4325
  }
4171
4326
 
4172
4327
  //#endregion
4173
- //#region ../../node_modules/zod/dist/esm/v4/locales/fa.js
4174
- const error$28 = () => {
4328
+ //#region ../../node_modules/zod/v4/locales/fa.js
4329
+ const error$29 = () => {
4175
4330
  const Sizable = {
4176
4331
  string: {
4177
4332
  unit: "کاراکتر",
@@ -4193,7 +4348,7 @@ const error$28 = () => {
4193
4348
  function getSizing(origin) {
4194
4349
  return Sizable[origin] ?? null;
4195
4350
  }
4196
- const parsedType$2 = (data) => {
4351
+ const parsedType$3 = (data) => {
4197
4352
  const t = typeof data;
4198
4353
  switch (t) {
4199
4354
  case "number": {
@@ -4245,7 +4400,7 @@ const error$28 = () => {
4245
4400
  };
4246
4401
  return (issue$1) => {
4247
4402
  switch (issue$1.code) {
4248
- case "invalid_type": return `ورودی نامعتبر: می‌بایست ${issue$1.expected} می‌بود، ${parsedType$2(issue$1.input)} دریافت شد`;
4403
+ case "invalid_type": return `ورودی نامعتبر: می‌بایست ${issue$1.expected} می‌بود، ${parsedType$3(issue$1.input)} دریافت شد`;
4249
4404
  case "invalid_value":
4250
4405
  if (issue$1.values.length === 1) {
4251
4406
  return `ورودی نامعتبر: می‌بایست ${stringifyPrimitive(issue$1.values[0])} می‌بود`;
@@ -4293,12 +4448,12 @@ const error$28 = () => {
4293
4448
  };
4294
4449
  };
4295
4450
  function fa_default() {
4296
- return { localeError: error$28() };
4451
+ return { localeError: error$29() };
4297
4452
  }
4298
4453
 
4299
4454
  //#endregion
4300
- //#region ../../node_modules/zod/dist/esm/v4/locales/fi.js
4301
- const error$27 = () => {
4455
+ //#region ../../node_modules/zod/v4/locales/fi.js
4456
+ const error$28 = () => {
4302
4457
  const Sizable = {
4303
4458
  string: {
4304
4459
  unit: "merkkiä",
@@ -4336,7 +4491,7 @@ const error$27 = () => {
4336
4491
  function getSizing(origin) {
4337
4492
  return Sizable[origin] ?? null;
4338
4493
  }
4339
- const parsedType$2 = (data) => {
4494
+ const parsedType$3 = (data) => {
4340
4495
  const t = typeof data;
4341
4496
  switch (t) {
4342
4497
  case "number": {
@@ -4388,7 +4543,7 @@ const error$27 = () => {
4388
4543
  };
4389
4544
  return (issue$1) => {
4390
4545
  switch (issue$1.code) {
4391
- case "invalid_type": return `Virheellinen tyyppi: odotettiin ${issue$1.expected}, oli ${parsedType$2(issue$1.input)}`;
4546
+ case "invalid_type": return `Virheellinen tyyppi: odotettiin ${issue$1.expected}, oli ${parsedType$3(issue$1.input)}`;
4392
4547
  case "invalid_value":
4393
4548
  if (issue$1.values.length === 1) return `Virheellinen syöte: täytyy olla ${stringifyPrimitive(issue$1.values[0])}`;
4394
4549
  return `Virheellinen valinta: täytyy olla yksi seuraavista: ${joinValues(issue$1.values, "|")}`;
@@ -4428,12 +4583,12 @@ const error$27 = () => {
4428
4583
  };
4429
4584
  };
4430
4585
  function fi_default() {
4431
- return { localeError: error$27() };
4586
+ return { localeError: error$28() };
4432
4587
  }
4433
4588
 
4434
4589
  //#endregion
4435
- //#region ../../node_modules/zod/dist/esm/v4/locales/fr.js
4436
- const error$26 = () => {
4590
+ //#region ../../node_modules/zod/v4/locales/fr.js
4591
+ const error$27 = () => {
4437
4592
  const Sizable = {
4438
4593
  string: {
4439
4594
  unit: "caractères",
@@ -4455,7 +4610,7 @@ const error$26 = () => {
4455
4610
  function getSizing(origin) {
4456
4611
  return Sizable[origin] ?? null;
4457
4612
  }
4458
- const parsedType$2 = (data) => {
4613
+ const parsedType$3 = (data) => {
4459
4614
  const t = typeof data;
4460
4615
  switch (t) {
4461
4616
  case "number": {
@@ -4507,7 +4662,7 @@ const error$26 = () => {
4507
4662
  };
4508
4663
  return (issue$1) => {
4509
4664
  switch (issue$1.code) {
4510
- case "invalid_type": return `Entrée invalide : ${issue$1.expected} attendu, ${parsedType$2(issue$1.input)} reçu`;
4665
+ case "invalid_type": return `Entrée invalide : ${issue$1.expected} attendu, ${parsedType$3(issue$1.input)} reçu`;
4511
4666
  case "invalid_value":
4512
4667
  if (issue$1.values.length === 1) return `Entrée invalide : ${stringifyPrimitive(issue$1.values[0])} attendu`;
4513
4668
  return `Option invalide : une valeur parmi ${joinValues(issue$1.values, "|")} attendue`;
@@ -4543,12 +4698,12 @@ const error$26 = () => {
4543
4698
  };
4544
4699
  };
4545
4700
  function fr_default() {
4546
- return { localeError: error$26() };
4701
+ return { localeError: error$27() };
4547
4702
  }
4548
4703
 
4549
4704
  //#endregion
4550
- //#region ../../node_modules/zod/dist/esm/v4/locales/fr-CA.js
4551
- const error$25 = () => {
4705
+ //#region ../../node_modules/zod/v4/locales/fr-CA.js
4706
+ const error$26 = () => {
4552
4707
  const Sizable = {
4553
4708
  string: {
4554
4709
  unit: "caractères",
@@ -4570,7 +4725,7 @@ const error$25 = () => {
4570
4725
  function getSizing(origin) {
4571
4726
  return Sizable[origin] ?? null;
4572
4727
  }
4573
- const parsedType$2 = (data) => {
4728
+ const parsedType$3 = (data) => {
4574
4729
  const t = typeof data;
4575
4730
  switch (t) {
4576
4731
  case "number": {
@@ -4622,7 +4777,7 @@ const error$25 = () => {
4622
4777
  };
4623
4778
  return (issue$1) => {
4624
4779
  switch (issue$1.code) {
4625
- case "invalid_type": return `Entrée invalide : attendu ${issue$1.expected}, reçu ${parsedType$2(issue$1.input)}`;
4780
+ case "invalid_type": return `Entrée invalide : attendu ${issue$1.expected}, reçu ${parsedType$3(issue$1.input)}`;
4626
4781
  case "invalid_value":
4627
4782
  if (issue$1.values.length === 1) return `Entrée invalide : attendu ${stringifyPrimitive(issue$1.values[0])}`;
4628
4783
  return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue$1.values, "|")}`;
@@ -4660,12 +4815,12 @@ const error$25 = () => {
4660
4815
  };
4661
4816
  };
4662
4817
  function fr_CA_default() {
4663
- return { localeError: error$25() };
4818
+ return { localeError: error$26() };
4664
4819
  }
4665
4820
 
4666
4821
  //#endregion
4667
- //#region ../../node_modules/zod/dist/esm/v4/locales/he.js
4668
- const error$24 = () => {
4822
+ //#region ../../node_modules/zod/v4/locales/he.js
4823
+ const error$25 = () => {
4669
4824
  const Sizable = {
4670
4825
  string: {
4671
4826
  unit: "אותיות",
@@ -4687,7 +4842,7 @@ const error$24 = () => {
4687
4842
  function getSizing(origin) {
4688
4843
  return Sizable[origin] ?? null;
4689
4844
  }
4690
- const parsedType$2 = (data) => {
4845
+ const parsedType$3 = (data) => {
4691
4846
  const t = typeof data;
4692
4847
  switch (t) {
4693
4848
  case "number": {
@@ -4739,7 +4894,7 @@ const error$24 = () => {
4739
4894
  };
4740
4895
  return (issue$1) => {
4741
4896
  switch (issue$1.code) {
4742
- case "invalid_type": return `קלט לא תקין: צריך ${issue$1.expected}, התקבל ${parsedType$2(issue$1.input)}`;
4897
+ case "invalid_type": return `קלט לא תקין: צריך ${issue$1.expected}, התקבל ${parsedType$3(issue$1.input)}`;
4743
4898
  case "invalid_value":
4744
4899
  if (issue$1.values.length === 1) return `קלט לא תקין: צריך ${stringifyPrimitive(issue$1.values[0])}`;
4745
4900
  return `קלט לא תקין: צריך אחת מהאפשרויות ${joinValues(issue$1.values, "|")}`;
@@ -4775,12 +4930,12 @@ const error$24 = () => {
4775
4930
  };
4776
4931
  };
4777
4932
  function he_default() {
4778
- return { localeError: error$24() };
4933
+ return { localeError: error$25() };
4779
4934
  }
4780
4935
 
4781
4936
  //#endregion
4782
- //#region ../../node_modules/zod/dist/esm/v4/locales/hu.js
4783
- const error$23 = () => {
4937
+ //#region ../../node_modules/zod/v4/locales/hu.js
4938
+ const error$24 = () => {
4784
4939
  const Sizable = {
4785
4940
  string: {
4786
4941
  unit: "karakter",
@@ -4802,7 +4957,7 @@ const error$23 = () => {
4802
4957
  function getSizing(origin) {
4803
4958
  return Sizable[origin] ?? null;
4804
4959
  }
4805
- const parsedType$2 = (data) => {
4960
+ const parsedType$3 = (data) => {
4806
4961
  const t = typeof data;
4807
4962
  switch (t) {
4808
4963
  case "number": {
@@ -4854,7 +5009,7 @@ const error$23 = () => {
4854
5009
  };
4855
5010
  return (issue$1) => {
4856
5011
  switch (issue$1.code) {
4857
- case "invalid_type": return `Érvénytelen bemenet: a várt érték ${issue$1.expected}, a kapott érték ${parsedType$2(issue$1.input)}`;
5012
+ case "invalid_type": return `Érvénytelen bemenet: a várt érték ${issue$1.expected}, a kapott érték ${parsedType$3(issue$1.input)}`;
4858
5013
  case "invalid_value":
4859
5014
  if (issue$1.values.length === 1) return `Érvénytelen bemenet: a várt érték ${stringifyPrimitive(issue$1.values[0])}`;
4860
5015
  return `Érvénytelen opció: valamelyik érték várt ${joinValues(issue$1.values, "|")}`;
@@ -4890,12 +5045,12 @@ const error$23 = () => {
4890
5045
  };
4891
5046
  };
4892
5047
  function hu_default() {
4893
- return { localeError: error$23() };
5048
+ return { localeError: error$24() };
4894
5049
  }
4895
5050
 
4896
5051
  //#endregion
4897
- //#region ../../node_modules/zod/dist/esm/v4/locales/id.js
4898
- const error$22 = () => {
5052
+ //#region ../../node_modules/zod/v4/locales/id.js
5053
+ const error$23 = () => {
4899
5054
  const Sizable = {
4900
5055
  string: {
4901
5056
  unit: "karakter",
@@ -4917,7 +5072,7 @@ const error$22 = () => {
4917
5072
  function getSizing(origin) {
4918
5073
  return Sizable[origin] ?? null;
4919
5074
  }
4920
- const parsedType$2 = (data) => {
5075
+ const parsedType$3 = (data) => {
4921
5076
  const t = typeof data;
4922
5077
  switch (t) {
4923
5078
  case "number": {
@@ -4969,7 +5124,7 @@ const error$22 = () => {
4969
5124
  };
4970
5125
  return (issue$1) => {
4971
5126
  switch (issue$1.code) {
4972
- case "invalid_type": return `Input tidak valid: diharapkan ${issue$1.expected}, diterima ${parsedType$2(issue$1.input)}`;
5127
+ case "invalid_type": return `Input tidak valid: diharapkan ${issue$1.expected}, diterima ${parsedType$3(issue$1.input)}`;
4973
5128
  case "invalid_value":
4974
5129
  if (issue$1.values.length === 1) return `Input tidak valid: diharapkan ${stringifyPrimitive(issue$1.values[0])}`;
4975
5130
  return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue$1.values, "|")}`;
@@ -5005,12 +5160,12 @@ const error$22 = () => {
5005
5160
  };
5006
5161
  };
5007
5162
  function id_default() {
5008
- return { localeError: error$22() };
5163
+ return { localeError: error$23() };
5009
5164
  }
5010
5165
 
5011
5166
  //#endregion
5012
- //#region ../../node_modules/zod/dist/esm/v4/locales/it.js
5013
- const error$21 = () => {
5167
+ //#region ../../node_modules/zod/v4/locales/it.js
5168
+ const error$22 = () => {
5014
5169
  const Sizable = {
5015
5170
  string: {
5016
5171
  unit: "caratteri",
@@ -5032,7 +5187,7 @@ const error$21 = () => {
5032
5187
  function getSizing(origin) {
5033
5188
  return Sizable[origin] ?? null;
5034
5189
  }
5035
- const parsedType$2 = (data) => {
5190
+ const parsedType$3 = (data) => {
5036
5191
  const t = typeof data;
5037
5192
  switch (t) {
5038
5193
  case "number": {
@@ -5084,7 +5239,7 @@ const error$21 = () => {
5084
5239
  };
5085
5240
  return (issue$1) => {
5086
5241
  switch (issue$1.code) {
5087
- case "invalid_type": return `Input non valido: atteso ${issue$1.expected}, ricevuto ${parsedType$2(issue$1.input)}`;
5242
+ case "invalid_type": return `Input non valido: atteso ${issue$1.expected}, ricevuto ${parsedType$3(issue$1.input)}`;
5088
5243
  case "invalid_value":
5089
5244
  if (issue$1.values.length === 1) return `Input non valido: atteso ${stringifyPrimitive(issue$1.values[0])}`;
5090
5245
  return `Opzione non valida: atteso uno tra ${joinValues(issue$1.values, "|")}`;
@@ -5120,12 +5275,12 @@ const error$21 = () => {
5120
5275
  };
5121
5276
  };
5122
5277
  function it_default() {
5123
- return { localeError: error$21() };
5278
+ return { localeError: error$22() };
5124
5279
  }
5125
5280
 
5126
5281
  //#endregion
5127
- //#region ../../node_modules/zod/dist/esm/v4/locales/ja.js
5128
- const error$20 = () => {
5282
+ //#region ../../node_modules/zod/v4/locales/ja.js
5283
+ const error$21 = () => {
5129
5284
  const Sizable = {
5130
5285
  string: {
5131
5286
  unit: "文字",
@@ -5147,7 +5302,7 @@ const error$20 = () => {
5147
5302
  function getSizing(origin) {
5148
5303
  return Sizable[origin] ?? null;
5149
5304
  }
5150
- const parsedType$2 = (data) => {
5305
+ const parsedType$3 = (data) => {
5151
5306
  const t = typeof data;
5152
5307
  switch (t) {
5153
5308
  case "number": {
@@ -5199,21 +5354,21 @@ const error$20 = () => {
5199
5354
  };
5200
5355
  return (issue$1) => {
5201
5356
  switch (issue$1.code) {
5202
- case "invalid_type": return `無効な入力: ${issue$1.expected}が期待されましたが、${parsedType$2(issue$1.input)}が入力されました`;
5357
+ case "invalid_type": return `無効な入力: ${issue$1.expected}が期待されましたが、${parsedType$3(issue$1.input)}が入力されました`;
5203
5358
  case "invalid_value":
5204
5359
  if (issue$1.values.length === 1) return `無効な入力: ${stringifyPrimitive(issue$1.values[0])}が期待されました`;
5205
5360
  return `無効な選択: ${joinValues(issue$1.values, "、")}のいずれかである必要があります`;
5206
5361
  case "too_big": {
5207
- const adj = issue$1.inclusive ? "<=" : "<";
5362
+ const adj = issue$1.inclusive ? "以下である" : "より小さい";
5208
5363
  const sizing = getSizing(issue$1.origin);
5209
- if (sizing) return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${sizing.unit ?? "要素"}${adj}である必要があります`;
5210
- return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${adj}である必要があります`;
5364
+ if (sizing) return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${sizing.unit ?? "要素"}${adj}必要があります`;
5365
+ return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${adj}必要があります`;
5211
5366
  }
5212
5367
  case "too_small": {
5213
- const adj = issue$1.inclusive ? ">=" : ">";
5368
+ const adj = issue$1.inclusive ? "以上である" : "より大きい";
5214
5369
  const sizing = getSizing(issue$1.origin);
5215
- if (sizing) return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${sizing.unit}${adj}である必要があります`;
5216
- return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${adj}である必要があります`;
5370
+ if (sizing) return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${sizing.unit}${adj}必要があります`;
5371
+ return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${adj}必要があります`;
5217
5372
  }
5218
5373
  case "invalid_format": {
5219
5374
  const _issue = issue$1;
@@ -5233,12 +5388,12 @@ const error$20 = () => {
5233
5388
  };
5234
5389
  };
5235
5390
  function ja_default() {
5236
- return { localeError: error$20() };
5391
+ return { localeError: error$21() };
5237
5392
  }
5238
5393
 
5239
5394
  //#endregion
5240
- //#region ../../node_modules/zod/dist/esm/v4/locales/kh.js
5241
- const error$19 = () => {
5395
+ //#region ../../node_modules/zod/v4/locales/kh.js
5396
+ const error$20 = () => {
5242
5397
  const Sizable = {
5243
5398
  string: {
5244
5399
  unit: "តួអក្សរ",
@@ -5260,7 +5415,7 @@ const error$19 = () => {
5260
5415
  function getSizing(origin) {
5261
5416
  return Sizable[origin] ?? null;
5262
5417
  }
5263
- const parsedType$2 = (data) => {
5418
+ const parsedType$3 = (data) => {
5264
5419
  const t = typeof data;
5265
5420
  switch (t) {
5266
5421
  case "number": {
@@ -5312,7 +5467,7 @@ const error$19 = () => {
5312
5467
  };
5313
5468
  return (issue$1) => {
5314
5469
  switch (issue$1.code) {
5315
- case "invalid_type": return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue$1.expected} ប៉ុន្តែទទួលបាន ${parsedType$2(issue$1.input)}`;
5470
+ case "invalid_type": return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue$1.expected} ប៉ុន្តែទទួលបាន ${parsedType$3(issue$1.input)}`;
5316
5471
  case "invalid_value":
5317
5472
  if (issue$1.values.length === 1) return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${stringifyPrimitive(issue$1.values[0])}`;
5318
5473
  return `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${joinValues(issue$1.values, "|")}`;
@@ -5350,12 +5505,12 @@ const error$19 = () => {
5350
5505
  };
5351
5506
  };
5352
5507
  function kh_default() {
5353
- return { localeError: error$19() };
5508
+ return { localeError: error$20() };
5354
5509
  }
5355
5510
 
5356
5511
  //#endregion
5357
- //#region ../../node_modules/zod/dist/esm/v4/locales/ko.js
5358
- const error$18 = () => {
5512
+ //#region ../../node_modules/zod/v4/locales/ko.js
5513
+ const error$19 = () => {
5359
5514
  const Sizable = {
5360
5515
  string: {
5361
5516
  unit: "문자",
@@ -5377,7 +5532,7 @@ const error$18 = () => {
5377
5532
  function getSizing(origin) {
5378
5533
  return Sizable[origin] ?? null;
5379
5534
  }
5380
- const parsedType$2 = (data) => {
5535
+ const parsedType$3 = (data) => {
5381
5536
  const t = typeof data;
5382
5537
  switch (t) {
5383
5538
  case "number": {
@@ -5429,7 +5584,7 @@ const error$18 = () => {
5429
5584
  };
5430
5585
  return (issue$1) => {
5431
5586
  switch (issue$1.code) {
5432
- case "invalid_type": return `잘못된 입력: 예상 타입은 ${issue$1.expected}, 받은 타입은 ${parsedType$2(issue$1.input)}입니다`;
5587
+ case "invalid_type": return `잘못된 입력: 예상 타입은 ${issue$1.expected}, 받은 타입은 ${parsedType$3(issue$1.input)}입니다`;
5433
5588
  case "invalid_value":
5434
5589
  if (issue$1.values.length === 1) return `잘못된 입력: 값은 ${stringifyPrimitive(issue$1.values[0])} 이어야 합니다`;
5435
5590
  return `잘못된 옵션: ${joinValues(issue$1.values, "또는 ")} 중 하나여야 합니다`;
@@ -5471,12 +5626,12 @@ const error$18 = () => {
5471
5626
  };
5472
5627
  };
5473
5628
  function ko_default() {
5474
- return { localeError: error$18() };
5629
+ return { localeError: error$19() };
5475
5630
  }
5476
5631
 
5477
5632
  //#endregion
5478
- //#region ../../node_modules/zod/dist/esm/v4/locales/mk.js
5479
- const error$17 = () => {
5633
+ //#region ../../node_modules/zod/v4/locales/mk.js
5634
+ const error$18 = () => {
5480
5635
  const Sizable = {
5481
5636
  string: {
5482
5637
  unit: "знаци",
@@ -5498,7 +5653,7 @@ const error$17 = () => {
5498
5653
  function getSizing(origin) {
5499
5654
  return Sizable[origin] ?? null;
5500
5655
  }
5501
- const parsedType$2 = (data) => {
5656
+ const parsedType$3 = (data) => {
5502
5657
  const t = typeof data;
5503
5658
  switch (t) {
5504
5659
  case "number": {
@@ -5550,7 +5705,7 @@ const error$17 = () => {
5550
5705
  };
5551
5706
  return (issue$1) => {
5552
5707
  switch (issue$1.code) {
5553
- case "invalid_type": return `Грешен внес: се очекува ${issue$1.expected}, примено ${parsedType$2(issue$1.input)}`;
5708
+ case "invalid_type": return `Грешен внес: се очекува ${issue$1.expected}, примено ${parsedType$3(issue$1.input)}`;
5554
5709
  case "invalid_value":
5555
5710
  if (issue$1.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue$1.values[0])}`;
5556
5711
  return `Грешана опција: се очекува една ${joinValues(issue$1.values, "|")}`;
@@ -5588,12 +5743,12 @@ const error$17 = () => {
5588
5743
  };
5589
5744
  };
5590
5745
  function mk_default() {
5591
- return { localeError: error$17() };
5746
+ return { localeError: error$18() };
5592
5747
  }
5593
5748
 
5594
5749
  //#endregion
5595
- //#region ../../node_modules/zod/dist/esm/v4/locales/ms.js
5596
- const error$16 = () => {
5750
+ //#region ../../node_modules/zod/v4/locales/ms.js
5751
+ const error$17 = () => {
5597
5752
  const Sizable = {
5598
5753
  string: {
5599
5754
  unit: "aksara",
@@ -5615,7 +5770,7 @@ const error$16 = () => {
5615
5770
  function getSizing(origin) {
5616
5771
  return Sizable[origin] ?? null;
5617
5772
  }
5618
- const parsedType$2 = (data) => {
5773
+ const parsedType$3 = (data) => {
5619
5774
  const t = typeof data;
5620
5775
  switch (t) {
5621
5776
  case "number": {
@@ -5667,7 +5822,7 @@ const error$16 = () => {
5667
5822
  };
5668
5823
  return (issue$1) => {
5669
5824
  switch (issue$1.code) {
5670
- case "invalid_type": return `Input tidak sah: dijangka ${issue$1.expected}, diterima ${parsedType$2(issue$1.input)}`;
5825
+ case "invalid_type": return `Input tidak sah: dijangka ${issue$1.expected}, diterima ${parsedType$3(issue$1.input)}`;
5671
5826
  case "invalid_value":
5672
5827
  if (issue$1.values.length === 1) return `Input tidak sah: dijangka ${stringifyPrimitive(issue$1.values[0])}`;
5673
5828
  return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue$1.values, "|")}`;
@@ -5703,12 +5858,12 @@ const error$16 = () => {
5703
5858
  };
5704
5859
  };
5705
5860
  function ms_default() {
5706
- return { localeError: error$16() };
5861
+ return { localeError: error$17() };
5707
5862
  }
5708
5863
 
5709
5864
  //#endregion
5710
- //#region ../../node_modules/zod/dist/esm/v4/locales/nl.js
5711
- const error$15 = () => {
5865
+ //#region ../../node_modules/zod/v4/locales/nl.js
5866
+ const error$16 = () => {
5712
5867
  const Sizable = {
5713
5868
  string: { unit: "tekens" },
5714
5869
  file: { unit: "bytes" },
@@ -5718,7 +5873,7 @@ const error$15 = () => {
5718
5873
  function getSizing(origin) {
5719
5874
  return Sizable[origin] ?? null;
5720
5875
  }
5721
- const parsedType$2 = (data) => {
5876
+ const parsedType$3 = (data) => {
5722
5877
  const t = typeof data;
5723
5878
  switch (t) {
5724
5879
  case "number": {
@@ -5770,7 +5925,7 @@ const error$15 = () => {
5770
5925
  };
5771
5926
  return (issue$1) => {
5772
5927
  switch (issue$1.code) {
5773
- case "invalid_type": return `Ongeldige invoer: verwacht ${issue$1.expected}, ontving ${parsedType$2(issue$1.input)}`;
5928
+ case "invalid_type": return `Ongeldige invoer: verwacht ${issue$1.expected}, ontving ${parsedType$3(issue$1.input)}`;
5774
5929
  case "invalid_value":
5775
5930
  if (issue$1.values.length === 1) return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue$1.values[0])}`;
5776
5931
  return `Ongeldige optie: verwacht één van ${joinValues(issue$1.values, "|")}`;
@@ -5808,12 +5963,12 @@ const error$15 = () => {
5808
5963
  };
5809
5964
  };
5810
5965
  function nl_default() {
5811
- return { localeError: error$15() };
5966
+ return { localeError: error$16() };
5812
5967
  }
5813
5968
 
5814
5969
  //#endregion
5815
- //#region ../../node_modules/zod/dist/esm/v4/locales/no.js
5816
- const error$14 = () => {
5970
+ //#region ../../node_modules/zod/v4/locales/no.js
5971
+ const error$15 = () => {
5817
5972
  const Sizable = {
5818
5973
  string: {
5819
5974
  unit: "tegn",
@@ -5835,7 +5990,7 @@ const error$14 = () => {
5835
5990
  function getSizing(origin) {
5836
5991
  return Sizable[origin] ?? null;
5837
5992
  }
5838
- const parsedType$2 = (data) => {
5993
+ const parsedType$3 = (data) => {
5839
5994
  const t = typeof data;
5840
5995
  switch (t) {
5841
5996
  case "number": {
@@ -5887,7 +6042,7 @@ const error$14 = () => {
5887
6042
  };
5888
6043
  return (issue$1) => {
5889
6044
  switch (issue$1.code) {
5890
- case "invalid_type": return `Ugyldig input: forventet ${issue$1.expected}, fikk ${parsedType$2(issue$1.input)}`;
6045
+ case "invalid_type": return `Ugyldig input: forventet ${issue$1.expected}, fikk ${parsedType$3(issue$1.input)}`;
5891
6046
  case "invalid_value":
5892
6047
  if (issue$1.values.length === 1) return `Ugyldig verdi: forventet ${stringifyPrimitive(issue$1.values[0])}`;
5893
6048
  return `Ugyldig valg: forventet en av ${joinValues(issue$1.values, "|")}`;
@@ -5923,12 +6078,12 @@ const error$14 = () => {
5923
6078
  };
5924
6079
  };
5925
6080
  function no_default() {
5926
- return { localeError: error$14() };
6081
+ return { localeError: error$15() };
5927
6082
  }
5928
6083
 
5929
6084
  //#endregion
5930
- //#region ../../node_modules/zod/dist/esm/v4/locales/ota.js
5931
- const error$13 = () => {
6085
+ //#region ../../node_modules/zod/v4/locales/ota.js
6086
+ const error$14 = () => {
5932
6087
  const Sizable = {
5933
6088
  string: {
5934
6089
  unit: "harf",
@@ -5950,7 +6105,7 @@ const error$13 = () => {
5950
6105
  function getSizing(origin) {
5951
6106
  return Sizable[origin] ?? null;
5952
6107
  }
5953
- const parsedType$2 = (data) => {
6108
+ const parsedType$3 = (data) => {
5954
6109
  const t = typeof data;
5955
6110
  switch (t) {
5956
6111
  case "number": {
@@ -6002,7 +6157,7 @@ const error$13 = () => {
6002
6157
  };
6003
6158
  return (issue$1) => {
6004
6159
  switch (issue$1.code) {
6005
- case "invalid_type": return `Fâsit giren: umulan ${issue$1.expected}, alınan ${parsedType$2(issue$1.input)}`;
6160
+ case "invalid_type": return `Fâsit giren: umulan ${issue$1.expected}, alınan ${parsedType$3(issue$1.input)}`;
6006
6161
  case "invalid_value":
6007
6162
  if (issue$1.values.length === 1) return `Fâsit giren: umulan ${stringifyPrimitive(issue$1.values[0])}`;
6008
6163
  return `Fâsit tercih: mûteberler ${joinValues(issue$1.values, "|")}`;
@@ -6038,11 +6193,138 @@ const error$13 = () => {
6038
6193
  };
6039
6194
  };
6040
6195
  function ota_default() {
6196
+ return { localeError: error$14() };
6197
+ }
6198
+
6199
+ //#endregion
6200
+ //#region ../../node_modules/zod/v4/locales/ps.js
6201
+ const error$13 = () => {
6202
+ const Sizable = {
6203
+ string: {
6204
+ unit: "توکي",
6205
+ verb: "ولري"
6206
+ },
6207
+ file: {
6208
+ unit: "بایټس",
6209
+ verb: "ولري"
6210
+ },
6211
+ array: {
6212
+ unit: "توکي",
6213
+ verb: "ولري"
6214
+ },
6215
+ set: {
6216
+ unit: "توکي",
6217
+ verb: "ولري"
6218
+ }
6219
+ };
6220
+ function getSizing(origin) {
6221
+ return Sizable[origin] ?? null;
6222
+ }
6223
+ const parsedType$3 = (data) => {
6224
+ const t = typeof data;
6225
+ switch (t) {
6226
+ case "number": {
6227
+ return Number.isNaN(data) ? "NaN" : "عدد";
6228
+ }
6229
+ case "object": {
6230
+ if (Array.isArray(data)) {
6231
+ return "ارې";
6232
+ }
6233
+ if (data === null) {
6234
+ return "null";
6235
+ }
6236
+ if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
6237
+ return data.constructor.name;
6238
+ }
6239
+ }
6240
+ }
6241
+ return t;
6242
+ };
6243
+ const Nouns = {
6244
+ regex: "ورودي",
6245
+ email: "بریښنالیک",
6246
+ url: "یو آر ال",
6247
+ emoji: "ایموجي",
6248
+ uuid: "UUID",
6249
+ uuidv4: "UUIDv4",
6250
+ uuidv6: "UUIDv6",
6251
+ nanoid: "nanoid",
6252
+ guid: "GUID",
6253
+ cuid: "cuid",
6254
+ cuid2: "cuid2",
6255
+ ulid: "ULID",
6256
+ xid: "XID",
6257
+ ksuid: "KSUID",
6258
+ datetime: "نیټه او وخت",
6259
+ date: "نېټه",
6260
+ time: "وخت",
6261
+ duration: "موده",
6262
+ ipv4: "د IPv4 پته",
6263
+ ipv6: "د IPv6 پته",
6264
+ cidrv4: "د IPv4 ساحه",
6265
+ cidrv6: "د IPv6 ساحه",
6266
+ base64: "base64-encoded متن",
6267
+ base64url: "base64url-encoded متن",
6268
+ json_string: "JSON متن",
6269
+ e164: "د E.164 شمېره",
6270
+ jwt: "JWT",
6271
+ template_literal: "ورودي"
6272
+ };
6273
+ return (issue$1) => {
6274
+ switch (issue$1.code) {
6275
+ case "invalid_type": return `ناسم ورودي: باید ${issue$1.expected} وای, مګر ${parsedType$3(issue$1.input)} ترلاسه شو`;
6276
+ case "invalid_value":
6277
+ if (issue$1.values.length === 1) {
6278
+ return `ناسم ورودي: باید ${stringifyPrimitive(issue$1.values[0])} وای`;
6279
+ }
6280
+ return `ناسم انتخاب: باید یو له ${joinValues(issue$1.values, "|")} څخه وای`;
6281
+ case "too_big": {
6282
+ const adj = issue$1.inclusive ? "<=" : "<";
6283
+ const sizing = getSizing(issue$1.origin);
6284
+ if (sizing) {
6285
+ return `ډیر لوی: ${issue$1.origin ?? "ارزښت"} باید ${adj}${issue$1.maximum.toString()} ${sizing.unit ?? "عنصرونه"} ولري`;
6286
+ }
6287
+ return `ډیر لوی: ${issue$1.origin ?? "ارزښت"} باید ${adj}${issue$1.maximum.toString()} وي`;
6288
+ }
6289
+ case "too_small": {
6290
+ const adj = issue$1.inclusive ? ">=" : ">";
6291
+ const sizing = getSizing(issue$1.origin);
6292
+ if (sizing) {
6293
+ return `ډیر کوچنی: ${issue$1.origin} باید ${adj}${issue$1.minimum.toString()} ${sizing.unit} ولري`;
6294
+ }
6295
+ return `ډیر کوچنی: ${issue$1.origin} باید ${adj}${issue$1.minimum.toString()} وي`;
6296
+ }
6297
+ case "invalid_format": {
6298
+ const _issue = issue$1;
6299
+ if (_issue.format === "starts_with") {
6300
+ return `ناسم متن: باید د "${_issue.prefix}" سره پیل شي`;
6301
+ }
6302
+ if (_issue.format === "ends_with") {
6303
+ return `ناسم متن: باید د "${_issue.suffix}" سره پای ته ورسيږي`;
6304
+ }
6305
+ if (_issue.format === "includes") {
6306
+ return `ناسم متن: باید "${_issue.includes}" ولري`;
6307
+ }
6308
+ if (_issue.format === "regex") {
6309
+ return `ناسم متن: باید د ${_issue.pattern} سره مطابقت ولري`;
6310
+ }
6311
+ return `${Nouns[_issue.format] ?? issue$1.format} ناسم دی`;
6312
+ }
6313
+ case "not_multiple_of": return `ناسم عدد: باید د ${issue$1.divisor} مضرب وي`;
6314
+ case "unrecognized_keys": return `ناسم ${issue$1.keys.length > 1 ? "کلیډونه" : "کلیډ"}: ${joinValues(issue$1.keys, ", ")}`;
6315
+ case "invalid_key": return `ناسم کلیډ په ${issue$1.origin} کې`;
6316
+ case "invalid_union": return `ناسمه ورودي`;
6317
+ case "invalid_element": return `ناسم عنصر په ${issue$1.origin} کې`;
6318
+ default: return `ناسمه ورودي`;
6319
+ }
6320
+ };
6321
+ };
6322
+ function ps_default() {
6041
6323
  return { localeError: error$13() };
6042
6324
  }
6043
6325
 
6044
6326
  //#endregion
6045
- //#region ../../node_modules/zod/dist/esm/v4/locales/pl.js
6327
+ //#region ../../node_modules/zod/v4/locales/pl.js
6046
6328
  const error$12 = () => {
6047
6329
  const Sizable = {
6048
6330
  string: {
@@ -6065,7 +6347,7 @@ const error$12 = () => {
6065
6347
  function getSizing(origin) {
6066
6348
  return Sizable[origin] ?? null;
6067
6349
  }
6068
- const parsedType$2 = (data) => {
6350
+ const parsedType$3 = (data) => {
6069
6351
  const t = typeof data;
6070
6352
  switch (t) {
6071
6353
  case "number": {
@@ -6117,7 +6399,7 @@ const error$12 = () => {
6117
6399
  };
6118
6400
  return (issue$1) => {
6119
6401
  switch (issue$1.code) {
6120
- case "invalid_type": return `Nieprawidłowe dane wejściowe: oczekiwano ${issue$1.expected}, otrzymano ${parsedType$2(issue$1.input)}`;
6402
+ case "invalid_type": return `Nieprawidłowe dane wejściowe: oczekiwano ${issue$1.expected}, otrzymano ${parsedType$3(issue$1.input)}`;
6121
6403
  case "invalid_value":
6122
6404
  if (issue$1.values.length === 1) return `Nieprawidłowe dane wejściowe: oczekiwano ${stringifyPrimitive(issue$1.values[0])}`;
6123
6405
  return `Nieprawidłowa opcja: oczekiwano jednej z wartości ${joinValues(issue$1.values, "|")}`;
@@ -6159,7 +6441,7 @@ function pl_default() {
6159
6441
  }
6160
6442
 
6161
6443
  //#endregion
6162
- //#region ../../node_modules/zod/dist/esm/v4/locales/pt.js
6444
+ //#region ../../node_modules/zod/v4/locales/pt.js
6163
6445
  const error$11 = () => {
6164
6446
  const Sizable = {
6165
6447
  string: {
@@ -6182,7 +6464,7 @@ const error$11 = () => {
6182
6464
  function getSizing(origin) {
6183
6465
  return Sizable[origin] ?? null;
6184
6466
  }
6185
- const parsedType$2 = (data) => {
6467
+ const parsedType$3 = (data) => {
6186
6468
  const t = typeof data;
6187
6469
  switch (t) {
6188
6470
  case "number": {
@@ -6234,7 +6516,7 @@ const error$11 = () => {
6234
6516
  };
6235
6517
  return (issue$1) => {
6236
6518
  switch (issue$1.code) {
6237
- case "invalid_type": return `Tipo inválido: esperado ${issue$1.expected}, recebido ${parsedType$2(issue$1.input)}`;
6519
+ case "invalid_type": return `Tipo inválido: esperado ${issue$1.expected}, recebido ${parsedType$3(issue$1.input)}`;
6238
6520
  case "invalid_value":
6239
6521
  if (issue$1.values.length === 1) return `Entrada inválida: esperado ${stringifyPrimitive(issue$1.values[0])}`;
6240
6522
  return `Opção inválida: esperada uma das ${joinValues(issue$1.values, "|")}`;
@@ -6274,7 +6556,7 @@ function pt_default() {
6274
6556
  }
6275
6557
 
6276
6558
  //#endregion
6277
- //#region ../../node_modules/zod/dist/esm/v4/locales/ru.js
6559
+ //#region ../../node_modules/zod/v4/locales/ru.js
6278
6560
  function getRussianPlural(count, one, few, many) {
6279
6561
  const absCount = Math.abs(count);
6280
6562
  const lastDigit = absCount % 10;
@@ -6328,7 +6610,7 @@ const error$10 = () => {
6328
6610
  function getSizing(origin) {
6329
6611
  return Sizable[origin] ?? null;
6330
6612
  }
6331
- const parsedType$2 = (data) => {
6613
+ const parsedType$3 = (data) => {
6332
6614
  const t = typeof data;
6333
6615
  switch (t) {
6334
6616
  case "number": {
@@ -6380,7 +6662,7 @@ const error$10 = () => {
6380
6662
  };
6381
6663
  return (issue$1) => {
6382
6664
  switch (issue$1.code) {
6383
- case "invalid_type": return `Неверный ввод: ожидалось ${issue$1.expected}, получено ${parsedType$2(issue$1.input)}`;
6665
+ case "invalid_type": return `Неверный ввод: ожидалось ${issue$1.expected}, получено ${parsedType$3(issue$1.input)}`;
6384
6666
  case "invalid_value":
6385
6667
  if (issue$1.values.length === 1) return `Неверный ввод: ожидалось ${stringifyPrimitive(issue$1.values[0])}`;
6386
6668
  return `Неверный вариант: ожидалось одно из ${joinValues(issue$1.values, "|")}`;
@@ -6426,7 +6708,7 @@ function ru_default() {
6426
6708
  }
6427
6709
 
6428
6710
  //#endregion
6429
- //#region ../../node_modules/zod/dist/esm/v4/locales/sl.js
6711
+ //#region ../../node_modules/zod/v4/locales/sl.js
6430
6712
  const error$9 = () => {
6431
6713
  const Sizable = {
6432
6714
  string: {
@@ -6449,7 +6731,7 @@ const error$9 = () => {
6449
6731
  function getSizing(origin) {
6450
6732
  return Sizable[origin] ?? null;
6451
6733
  }
6452
- const parsedType$2 = (data) => {
6734
+ const parsedType$3 = (data) => {
6453
6735
  const t = typeof data;
6454
6736
  switch (t) {
6455
6737
  case "number": {
@@ -6501,7 +6783,7 @@ const error$9 = () => {
6501
6783
  };
6502
6784
  return (issue$1) => {
6503
6785
  switch (issue$1.code) {
6504
- case "invalid_type": return `Neveljaven vnos: pričakovano ${issue$1.expected}, prejeto ${parsedType$2(issue$1.input)}`;
6786
+ case "invalid_type": return `Neveljaven vnos: pričakovano ${issue$1.expected}, prejeto ${parsedType$3(issue$1.input)}`;
6505
6787
  case "invalid_value":
6506
6788
  if (issue$1.values.length === 1) return `Neveljaven vnos: pričakovano ${stringifyPrimitive(issue$1.values[0])}`;
6507
6789
  return `Neveljavna možnost: pričakovano eno izmed ${joinValues(issue$1.values, "|")}`;
@@ -6543,7 +6825,7 @@ function sl_default() {
6543
6825
  }
6544
6826
 
6545
6827
  //#endregion
6546
- //#region ../../node_modules/zod/dist/esm/v4/locales/sv.js
6828
+ //#region ../../node_modules/zod/v4/locales/sv.js
6547
6829
  const error$8 = () => {
6548
6830
  const Sizable = {
6549
6831
  string: {
@@ -6566,7 +6848,7 @@ const error$8 = () => {
6566
6848
  function getSizing(origin) {
6567
6849
  return Sizable[origin] ?? null;
6568
6850
  }
6569
- const parsedType$2 = (data) => {
6851
+ const parsedType$3 = (data) => {
6570
6852
  const t = typeof data;
6571
6853
  switch (t) {
6572
6854
  case "number": {
@@ -6618,7 +6900,7 @@ const error$8 = () => {
6618
6900
  };
6619
6901
  return (issue$1) => {
6620
6902
  switch (issue$1.code) {
6621
- case "invalid_type": return `Ogiltig inmatning: förväntat ${issue$1.expected}, fick ${parsedType$2(issue$1.input)}`;
6903
+ case "invalid_type": return `Ogiltig inmatning: förväntat ${issue$1.expected}, fick ${parsedType$3(issue$1.input)}`;
6622
6904
  case "invalid_value":
6623
6905
  if (issue$1.values.length === 1) return `Ogiltig inmatning: förväntat ${stringifyPrimitive(issue$1.values[0])}`;
6624
6906
  return `Ogiltigt val: förväntade en av ${joinValues(issue$1.values, "|")}`;
@@ -6662,7 +6944,7 @@ function sv_default() {
6662
6944
  }
6663
6945
 
6664
6946
  //#endregion
6665
- //#region ../../node_modules/zod/dist/esm/v4/locales/ta.js
6947
+ //#region ../../node_modules/zod/v4/locales/ta.js
6666
6948
  const error$7 = () => {
6667
6949
  const Sizable = {
6668
6950
  string: {
@@ -6685,7 +6967,7 @@ const error$7 = () => {
6685
6967
  function getSizing(origin) {
6686
6968
  return Sizable[origin] ?? null;
6687
6969
  }
6688
- const parsedType$2 = (data) => {
6970
+ const parsedType$3 = (data) => {
6689
6971
  const t = typeof data;
6690
6972
  switch (t) {
6691
6973
  case "number": {
@@ -6737,7 +7019,7 @@ const error$7 = () => {
6737
7019
  };
6738
7020
  return (issue$1) => {
6739
7021
  switch (issue$1.code) {
6740
- case "invalid_type": return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue$1.expected}, பெறப்பட்டது ${parsedType$2(issue$1.input)}`;
7022
+ case "invalid_type": return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue$1.expected}, பெறப்பட்டது ${parsedType$3(issue$1.input)}`;
6741
7023
  case "invalid_value":
6742
7024
  if (issue$1.values.length === 1) return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${stringifyPrimitive(issue$1.values[0])}`;
6743
7025
  return `தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${joinValues(issue$1.values, "|")} இல் ஒன்று`;
@@ -6779,7 +7061,7 @@ function ta_default() {
6779
7061
  }
6780
7062
 
6781
7063
  //#endregion
6782
- //#region ../../node_modules/zod/dist/esm/v4/locales/th.js
7064
+ //#region ../../node_modules/zod/v4/locales/th.js
6783
7065
  const error$6 = () => {
6784
7066
  const Sizable = {
6785
7067
  string: {
@@ -6802,7 +7084,7 @@ const error$6 = () => {
6802
7084
  function getSizing(origin) {
6803
7085
  return Sizable[origin] ?? null;
6804
7086
  }
6805
- const parsedType$2 = (data) => {
7087
+ const parsedType$3 = (data) => {
6806
7088
  const t = typeof data;
6807
7089
  switch (t) {
6808
7090
  case "number": {
@@ -6854,7 +7136,7 @@ const error$6 = () => {
6854
7136
  };
6855
7137
  return (issue$1) => {
6856
7138
  switch (issue$1.code) {
6857
- case "invalid_type": return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue$1.expected} แต่ได้รับ ${parsedType$2(issue$1.input)}`;
7139
+ case "invalid_type": return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue$1.expected} แต่ได้รับ ${parsedType$3(issue$1.input)}`;
6858
7140
  case "invalid_value":
6859
7141
  if (issue$1.values.length === 1) return `ค่าไม่ถูกต้อง: ควรเป็น ${stringifyPrimitive(issue$1.values[0])}`;
6860
7142
  return `ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${joinValues(issue$1.values, "|")}`;
@@ -6896,7 +7178,7 @@ function th_default() {
6896
7178
  }
6897
7179
 
6898
7180
  //#endregion
6899
- //#region ../../node_modules/zod/dist/esm/v4/locales/tr.js
7181
+ //#region ../../node_modules/zod/v4/locales/tr.js
6900
7182
  const parsedType = (data) => {
6901
7183
  const t = typeof data;
6902
7184
  switch (t) {
@@ -7009,7 +7291,7 @@ function tr_default() {
7009
7291
  }
7010
7292
 
7011
7293
  //#endregion
7012
- //#region ../../node_modules/zod/dist/esm/v4/locales/ua.js
7294
+ //#region ../../node_modules/zod/v4/locales/ua.js
7013
7295
  const error$4 = () => {
7014
7296
  const Sizable = {
7015
7297
  string: {
@@ -7032,7 +7314,7 @@ const error$4 = () => {
7032
7314
  function getSizing(origin) {
7033
7315
  return Sizable[origin] ?? null;
7034
7316
  }
7035
- const parsedType$2 = (data) => {
7317
+ const parsedType$3 = (data) => {
7036
7318
  const t = typeof data;
7037
7319
  switch (t) {
7038
7320
  case "number": {
@@ -7084,7 +7366,7 @@ const error$4 = () => {
7084
7366
  };
7085
7367
  return (issue$1) => {
7086
7368
  switch (issue$1.code) {
7087
- case "invalid_type": return `Неправильні вхідні дані: очікується ${issue$1.expected}, отримано ${parsedType$2(issue$1.input)}`;
7369
+ case "invalid_type": return `Неправильні вхідні дані: очікується ${issue$1.expected}, отримано ${parsedType$3(issue$1.input)}`;
7088
7370
  case "invalid_value":
7089
7371
  if (issue$1.values.length === 1) return `Неправильні вхідні дані: очікується ${stringifyPrimitive(issue$1.values[0])}`;
7090
7372
  return `Неправильна опція: очікується одне з ${joinValues(issue$1.values, "|")}`;
@@ -7124,7 +7406,7 @@ function ua_default() {
7124
7406
  }
7125
7407
 
7126
7408
  //#endregion
7127
- //#region ../../node_modules/zod/dist/esm/v4/locales/ur.js
7409
+ //#region ../../node_modules/zod/v4/locales/ur.js
7128
7410
  const error$3 = () => {
7129
7411
  const Sizable = {
7130
7412
  string: {
@@ -7147,7 +7429,7 @@ const error$3 = () => {
7147
7429
  function getSizing(origin) {
7148
7430
  return Sizable[origin] ?? null;
7149
7431
  }
7150
- const parsedType$2 = (data) => {
7432
+ const parsedType$3 = (data) => {
7151
7433
  const t = typeof data;
7152
7434
  switch (t) {
7153
7435
  case "number": {
@@ -7199,7 +7481,7 @@ const error$3 = () => {
7199
7481
  };
7200
7482
  return (issue$1) => {
7201
7483
  switch (issue$1.code) {
7202
- case "invalid_type": return `غلط ان پٹ: ${issue$1.expected} متوقع تھا، ${parsedType$2(issue$1.input)} موصول ہوا`;
7484
+ case "invalid_type": return `غلط ان پٹ: ${issue$1.expected} متوقع تھا، ${parsedType$3(issue$1.input)} موصول ہوا`;
7203
7485
  case "invalid_value":
7204
7486
  if (issue$1.values.length === 1) return `غلط ان پٹ: ${stringifyPrimitive(issue$1.values[0])} متوقع تھا`;
7205
7487
  return `غلط آپشن: ${joinValues(issue$1.values, "|")} میں سے ایک متوقع تھا`;
@@ -7241,7 +7523,7 @@ function ur_default() {
7241
7523
  }
7242
7524
 
7243
7525
  //#endregion
7244
- //#region ../../node_modules/zod/dist/esm/v4/locales/vi.js
7526
+ //#region ../../node_modules/zod/v4/locales/vi.js
7245
7527
  const error$2 = () => {
7246
7528
  const Sizable = {
7247
7529
  string: {
@@ -7264,7 +7546,7 @@ const error$2 = () => {
7264
7546
  function getSizing(origin) {
7265
7547
  return Sizable[origin] ?? null;
7266
7548
  }
7267
- const parsedType$2 = (data) => {
7549
+ const parsedType$3 = (data) => {
7268
7550
  const t = typeof data;
7269
7551
  switch (t) {
7270
7552
  case "number": {
@@ -7316,7 +7598,7 @@ const error$2 = () => {
7316
7598
  };
7317
7599
  return (issue$1) => {
7318
7600
  switch (issue$1.code) {
7319
- case "invalid_type": return `Đầu vào không hợp lệ: mong đợi ${issue$1.expected}, nhận được ${parsedType$2(issue$1.input)}`;
7601
+ case "invalid_type": return `Đầu vào không hợp lệ: mong đợi ${issue$1.expected}, nhận được ${parsedType$3(issue$1.input)}`;
7320
7602
  case "invalid_value":
7321
7603
  if (issue$1.values.length === 1) return `Đầu vào không hợp lệ: mong đợi ${stringifyPrimitive(issue$1.values[0])}`;
7322
7604
  return `Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${joinValues(issue$1.values, "|")}`;
@@ -7356,7 +7638,7 @@ function vi_default() {
7356
7638
  }
7357
7639
 
7358
7640
  //#endregion
7359
- //#region ../../node_modules/zod/dist/esm/v4/locales/zh-CN.js
7641
+ //#region ../../node_modules/zod/v4/locales/zh-CN.js
7360
7642
  const error$1 = () => {
7361
7643
  const Sizable = {
7362
7644
  string: {
@@ -7379,7 +7661,7 @@ const error$1 = () => {
7379
7661
  function getSizing(origin) {
7380
7662
  return Sizable[origin] ?? null;
7381
7663
  }
7382
- const parsedType$2 = (data) => {
7664
+ const parsedType$3 = (data) => {
7383
7665
  const t = typeof data;
7384
7666
  switch (t) {
7385
7667
  case "number": {
@@ -7431,7 +7713,7 @@ const error$1 = () => {
7431
7713
  };
7432
7714
  return (issue$1) => {
7433
7715
  switch (issue$1.code) {
7434
- case "invalid_type": return `无效输入:期望 ${issue$1.expected},实际接收 ${parsedType$2(issue$1.input)}`;
7716
+ case "invalid_type": return `无效输入:期望 ${issue$1.expected},实际接收 ${parsedType$3(issue$1.input)}`;
7435
7717
  case "invalid_value":
7436
7718
  if (issue$1.values.length === 1) return `无效输入:期望 ${stringifyPrimitive(issue$1.values[0])}`;
7437
7719
  return `无效选项:期望以下之一 ${joinValues(issue$1.values, "|")}`;
@@ -7471,7 +7753,7 @@ function zh_CN_default() {
7471
7753
  }
7472
7754
 
7473
7755
  //#endregion
7474
- //#region ../../node_modules/zod/dist/esm/v4/locales/zh-TW.js
7756
+ //#region ../../node_modules/zod/v4/locales/zh-TW.js
7475
7757
  const error = () => {
7476
7758
  const Sizable = {
7477
7759
  string: {
@@ -7494,7 +7776,7 @@ const error = () => {
7494
7776
  function getSizing(origin) {
7495
7777
  return Sizable[origin] ?? null;
7496
7778
  }
7497
- const parsedType$2 = (data) => {
7779
+ const parsedType$3 = (data) => {
7498
7780
  const t = typeof data;
7499
7781
  switch (t) {
7500
7782
  case "number": {
@@ -7546,7 +7828,7 @@ const error = () => {
7546
7828
  };
7547
7829
  return (issue$1) => {
7548
7830
  switch (issue$1.code) {
7549
- case "invalid_type": return `無效的輸入值:預期為 ${issue$1.expected},但收到 ${parsedType$2(issue$1.input)}`;
7831
+ case "invalid_type": return `無效的輸入值:預期為 ${issue$1.expected},但收到 ${parsedType$3(issue$1.input)}`;
7550
7832
  case "invalid_value":
7551
7833
  if (issue$1.values.length === 1) return `無效的輸入值:預期為 ${stringifyPrimitive(issue$1.values[0])}`;
7552
7834
  return `無效的選項:預期為以下其中之一 ${joinValues(issue$1.values, "|")}`;
@@ -7588,7 +7870,7 @@ function zh_TW_default() {
7588
7870
  }
7589
7871
 
7590
7872
  //#endregion
7591
- //#region ../../node_modules/zod/dist/esm/v4/locales/index.js
7873
+ //#region ../../node_modules/zod/v4/locales/index.js
7592
7874
  var locales_exports = {};
7593
7875
  __export(locales_exports, {
7594
7876
  ar: () => ar_default,
@@ -7598,6 +7880,7 @@ __export(locales_exports, {
7598
7880
  cs: () => cs_default,
7599
7881
  de: () => de_default,
7600
7882
  en: () => en_default,
7883
+ eo: () => eo_default,
7601
7884
  es: () => es_default,
7602
7885
  fa: () => fa_default,
7603
7886
  fi: () => fi_default,
@@ -7616,6 +7899,7 @@ __export(locales_exports, {
7616
7899
  no: () => no_default,
7617
7900
  ota: () => ota_default,
7618
7901
  pl: () => pl_default,
7902
+ ps: () => ps_default,
7619
7903
  pt: () => pt_default,
7620
7904
  ru: () => ru_default,
7621
7905
  sl: () => sl_default,
@@ -7631,12 +7915,12 @@ __export(locales_exports, {
7631
7915
  });
7632
7916
 
7633
7917
  //#endregion
7634
- //#region ../../node_modules/zod/dist/esm/v4/core/registries.js
7918
+ //#region ../../node_modules/zod/v4/core/registries.js
7635
7919
  const $output = Symbol("ZodOutput");
7636
7920
  const $input = Symbol("ZodInput");
7637
7921
  var $ZodRegistry = class {
7638
7922
  constructor() {
7639
- this._map = new WeakMap();
7923
+ this._map = new Map();
7640
7924
  this._idmap = new Map();
7641
7925
  }
7642
7926
  add(schema, ..._meta) {
@@ -7650,7 +7934,16 @@ var $ZodRegistry = class {
7650
7934
  }
7651
7935
  return this;
7652
7936
  }
7937
+ clear() {
7938
+ this._map = new Map();
7939
+ this._idmap = new Map();
7940
+ return this;
7941
+ }
7653
7942
  remove(schema) {
7943
+ const meta = this._map.get(schema);
7944
+ if (meta && typeof meta === "object" && "id" in meta) {
7945
+ this._idmap.delete(meta.id);
7946
+ }
7654
7947
  this._map.delete(schema);
7655
7948
  return this;
7656
7949
  }
@@ -7676,7 +7969,7 @@ function registry() {
7676
7969
  const globalRegistry = /* @__PURE__ */ registry();
7677
7970
 
7678
7971
  //#endregion
7679
- //#region ../../node_modules/zod/dist/esm/v4/core/api.js
7972
+ //#region ../../node_modules/zod/v4/core/api.js
7680
7973
  function _string(Class$1, params) {
7681
7974
  return new Class$1({
7682
7975
  type: "string",
@@ -7891,6 +8184,13 @@ function _jwt(Class$1, params) {
7891
8184
  ...normalizeParams(params)
7892
8185
  });
7893
8186
  }
8187
+ const TimePrecision = {
8188
+ Any: null,
8189
+ Minute: -1,
8190
+ Second: 0,
8191
+ Millisecond: 3,
8192
+ Microsecond: 6
8193
+ };
7894
8194
  function _isoDateTime(Class$1, params) {
7895
8195
  return new Class$1({
7896
8196
  type: "string",
@@ -8457,8 +8757,8 @@ function _refine(Class$1, fn, _params) {
8457
8757
  return schema;
8458
8758
  }
8459
8759
  function _stringbool(Classes, _params) {
8460
- const { case: _case, error: error$37, truthy, falsy } = normalizeParams(_params);
8461
- let truthyArray = truthy ?? [
8760
+ const params = normalizeParams(_params);
8761
+ let truthyArray = params.truthy ?? [
8462
8762
  "true",
8463
8763
  "1",
8464
8764
  "yes",
@@ -8466,7 +8766,7 @@ function _stringbool(Classes, _params) {
8466
8766
  "y",
8467
8767
  "enabled"
8468
8768
  ];
8469
- let falsyArray = falsy ?? [
8769
+ let falsyArray = params.falsy ?? [
8470
8770
  "false",
8471
8771
  "0",
8472
8772
  "no",
@@ -8474,7 +8774,7 @@ function _stringbool(Classes, _params) {
8474
8774
  "n",
8475
8775
  "disabled"
8476
8776
  ];
8477
- if (_case !== "sensitive") {
8777
+ if (params.case !== "sensitive") {
8478
8778
  truthyArray = truthyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
8479
8779
  falsyArray = falsyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
8480
8780
  }
@@ -8488,7 +8788,7 @@ function _stringbool(Classes, _params) {
8488
8788
  type: "transform",
8489
8789
  transform: (input, payload) => {
8490
8790
  let data = input;
8491
- if (_case !== "sensitive") data = data.toLowerCase();
8791
+ if (params.case !== "sensitive") data = data.toLowerCase();
8492
8792
  if (truthySet.has(data)) {
8493
8793
  return true;
8494
8794
  } else if (falsySet.has(data)) {
@@ -8504,31 +8804,47 @@ function _stringbool(Classes, _params) {
8504
8804
  return {};
8505
8805
  }
8506
8806
  },
8507
- error: error$37
8807
+ error: params.error
8508
8808
  });
8509
8809
  const innerPipe = new _Pipe({
8510
8810
  type: "pipe",
8511
8811
  in: new _String({
8512
8812
  type: "string",
8513
- error: error$37
8813
+ error: params.error
8514
8814
  }),
8515
8815
  out: tx,
8516
- error: error$37
8816
+ error: params.error
8517
8817
  });
8518
8818
  const outerPipe = new _Pipe({
8519
8819
  type: "pipe",
8520
8820
  in: innerPipe,
8521
8821
  out: new _Boolean({
8522
8822
  type: "boolean",
8523
- error: error$37
8823
+ error: params.error
8524
8824
  }),
8525
- error: error$37
8825
+ error: params.error
8526
8826
  });
8527
8827
  return outerPipe;
8528
8828
  }
8829
+ function _stringFormat(Class$1, format, fnOrRegex, _params = {}) {
8830
+ const params = normalizeParams(_params);
8831
+ const def = {
8832
+ ...normalizeParams(_params),
8833
+ check: "string_format",
8834
+ type: "string",
8835
+ format,
8836
+ fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
8837
+ ...params
8838
+ };
8839
+ if (fnOrRegex instanceof RegExp) {
8840
+ def.pattern = fnOrRegex;
8841
+ }
8842
+ const inst = new Class$1(def);
8843
+ return inst;
8844
+ }
8529
8845
 
8530
8846
  //#endregion
8531
- //#region ../../node_modules/zod/dist/esm/v4/core/function.js
8847
+ //#region ../../node_modules/zod/v4/core/function.js
8532
8848
  var $ZodFunction = class {
8533
8849
  constructor(def) {
8534
8850
  this._def = def;
@@ -8599,7 +8915,7 @@ function _function(params) {
8599
8915
  }
8600
8916
 
8601
8917
  //#endregion
8602
- //#region ../../node_modules/zod/dist/esm/v4/core/to-json-schema.js
8918
+ //#region ../../node_modules/zod/v4/core/to-json-schema.js
8603
8919
  var JSONSchemaGenerator = class {
8604
8920
  constructor(params) {
8605
8921
  this.counter = 0;
@@ -8635,431 +8951,435 @@ var JSONSchemaGenerator = class {
8635
8951
  const result = {
8636
8952
  schema: {},
8637
8953
  count: 1,
8638
- cycle: undefined
8639
- };
8640
- this.seen.set(schema, result);
8641
- if (schema._zod.toJSONSchema) {
8642
- result.schema = schema._zod.toJSONSchema();
8643
- }
8644
- const params = {
8645
- ..._params,
8646
- schemaPath: [..._params.schemaPath, schema],
8954
+ cycle: undefined,
8647
8955
  path: _params.path
8648
8956
  };
8649
- const parent = schema._zod.parent;
8650
- if (parent) {
8651
- result.ref = parent;
8652
- this.process(parent, params);
8653
- this.seen.get(parent).isParent = true;
8957
+ this.seen.set(schema, result);
8958
+ const overrideSchema = schema._zod.toJSONSchema?.();
8959
+ if (overrideSchema) {
8960
+ result.schema = overrideSchema;
8654
8961
  } else {
8655
- const _json = result.schema;
8656
- switch (def.type) {
8657
- case "string": {
8658
- const json$1 = _json;
8659
- json$1.type = "string";
8660
- const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
8661
- if (typeof minimum === "number") json$1.minLength = minimum;
8662
- if (typeof maximum === "number") json$1.maxLength = maximum;
8663
- if (format) {
8664
- json$1.format = formatMap[format] ?? format;
8665
- if (json$1.format === "") delete json$1.format;
8962
+ const params = {
8963
+ ..._params,
8964
+ schemaPath: [..._params.schemaPath, schema],
8965
+ path: _params.path
8966
+ };
8967
+ const parent = schema._zod.parent;
8968
+ if (parent) {
8969
+ result.ref = parent;
8970
+ this.process(parent, params);
8971
+ this.seen.get(parent).isParent = true;
8972
+ } else {
8973
+ const _json = result.schema;
8974
+ switch (def.type) {
8975
+ case "string": {
8976
+ const json$1 = _json;
8977
+ json$1.type = "string";
8978
+ const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
8979
+ if (typeof minimum === "number") json$1.minLength = minimum;
8980
+ if (typeof maximum === "number") json$1.maxLength = maximum;
8981
+ if (format) {
8982
+ json$1.format = formatMap[format] ?? format;
8983
+ if (json$1.format === "") delete json$1.format;
8984
+ }
8985
+ if (contentEncoding) json$1.contentEncoding = contentEncoding;
8986
+ if (patterns && patterns.size > 0) {
8987
+ const regexes = [...patterns];
8988
+ if (regexes.length === 1) json$1.pattern = regexes[0].source;
8989
+ else if (regexes.length > 1) {
8990
+ result.schema.allOf = [...regexes.map((regex) => ({
8991
+ ...this.target === "draft-7" ? { type: "string" } : {},
8992
+ pattern: regex.source
8993
+ }))];
8994
+ }
8995
+ }
8996
+ break;
8666
8997
  }
8667
- if (contentEncoding) json$1.contentEncoding = contentEncoding;
8668
- if (patterns && patterns.size > 0) {
8669
- const regexes = [...patterns];
8670
- if (regexes.length === 1) json$1.pattern = regexes[0].source;
8671
- else if (regexes.length > 1) {
8672
- result.schema.allOf = [...regexes.map((regex) => ({
8673
- ...this.target === "draft-7" ? { type: "string" } : {},
8674
- pattern: regex.source
8675
- }))];
8998
+ case "number": {
8999
+ const json$1 = _json;
9000
+ const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
9001
+ if (typeof format === "string" && format.includes("int")) json$1.type = "integer";
9002
+ else json$1.type = "number";
9003
+ if (typeof exclusiveMinimum === "number") json$1.exclusiveMinimum = exclusiveMinimum;
9004
+ if (typeof minimum === "number") {
9005
+ json$1.minimum = minimum;
9006
+ if (typeof exclusiveMinimum === "number") {
9007
+ if (exclusiveMinimum >= minimum) delete json$1.minimum;
9008
+ else delete json$1.exclusiveMinimum;
9009
+ }
8676
9010
  }
9011
+ if (typeof exclusiveMaximum === "number") json$1.exclusiveMaximum = exclusiveMaximum;
9012
+ if (typeof maximum === "number") {
9013
+ json$1.maximum = maximum;
9014
+ if (typeof exclusiveMaximum === "number") {
9015
+ if (exclusiveMaximum <= maximum) delete json$1.maximum;
9016
+ else delete json$1.exclusiveMaximum;
9017
+ }
9018
+ }
9019
+ if (typeof multipleOf === "number") json$1.multipleOf = multipleOf;
9020
+ break;
8677
9021
  }
8678
- break;
8679
- }
8680
- case "number": {
8681
- const json$1 = _json;
8682
- const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
8683
- if (typeof format === "string" && format.includes("int")) json$1.type = "integer";
8684
- else json$1.type = "number";
8685
- if (typeof exclusiveMinimum === "number") json$1.exclusiveMinimum = exclusiveMinimum;
8686
- if (typeof minimum === "number") {
8687
- json$1.minimum = minimum;
8688
- if (typeof exclusiveMinimum === "number") {
8689
- if (exclusiveMinimum >= minimum) delete json$1.minimum;
8690
- else delete json$1.exclusiveMinimum;
9022
+ case "boolean": {
9023
+ const json$1 = _json;
9024
+ json$1.type = "boolean";
9025
+ break;
9026
+ }
9027
+ case "bigint": {
9028
+ if (this.unrepresentable === "throw") {
9029
+ throw new Error("BigInt cannot be represented in JSON Schema");
8691
9030
  }
9031
+ break;
8692
9032
  }
8693
- if (typeof exclusiveMaximum === "number") json$1.exclusiveMaximum = exclusiveMaximum;
8694
- if (typeof maximum === "number") {
8695
- json$1.maximum = maximum;
8696
- if (typeof exclusiveMaximum === "number") {
8697
- if (exclusiveMaximum <= maximum) delete json$1.maximum;
8698
- else delete json$1.exclusiveMaximum;
9033
+ case "symbol": {
9034
+ if (this.unrepresentable === "throw") {
9035
+ throw new Error("Symbols cannot be represented in JSON Schema");
8699
9036
  }
9037
+ break;
8700
9038
  }
8701
- if (typeof multipleOf === "number") json$1.multipleOf = multipleOf;
8702
- break;
8703
- }
8704
- case "boolean": {
8705
- const json$1 = _json;
8706
- json$1.type = "boolean";
8707
- break;
8708
- }
8709
- case "bigint": {
8710
- if (this.unrepresentable === "throw") {
8711
- throw new Error("BigInt cannot be represented in JSON Schema");
9039
+ case "null": {
9040
+ _json.type = "null";
9041
+ break;
8712
9042
  }
8713
- break;
8714
- }
8715
- case "symbol": {
8716
- if (this.unrepresentable === "throw") {
8717
- throw new Error("Symbols cannot be represented in JSON Schema");
9043
+ case "any": {
9044
+ break;
8718
9045
  }
8719
- break;
8720
- }
8721
- case "undefined": {
8722
- const json$1 = _json;
8723
- json$1.type = "null";
8724
- break;
8725
- }
8726
- case "null": {
8727
- _json.type = "null";
8728
- break;
8729
- }
8730
- case "any": {
8731
- break;
8732
- }
8733
- case "unknown": {
8734
- break;
8735
- }
8736
- case "never": {
8737
- _json.not = {};
8738
- break;
8739
- }
8740
- case "void": {
8741
- if (this.unrepresentable === "throw") {
8742
- throw new Error("Void cannot be represented in JSON Schema");
9046
+ case "unknown": {
9047
+ break;
8743
9048
  }
8744
- break;
8745
- }
8746
- case "date": {
8747
- if (this.unrepresentable === "throw") {
8748
- throw new Error("Date cannot be represented in JSON Schema");
9049
+ case "undefined": {
9050
+ if (this.unrepresentable === "throw") {
9051
+ throw new Error("Undefined cannot be represented in JSON Schema");
9052
+ }
9053
+ break;
8749
9054
  }
8750
- break;
8751
- }
8752
- case "array": {
8753
- const json$1 = _json;
8754
- const { minimum, maximum } = schema._zod.bag;
8755
- if (typeof minimum === "number") json$1.minItems = minimum;
8756
- if (typeof maximum === "number") json$1.maxItems = maximum;
8757
- json$1.type = "array";
8758
- json$1.items = this.process(def.element, {
8759
- ...params,
8760
- path: [...params.path, "items"]
8761
- });
8762
- break;
8763
- }
8764
- case "object": {
8765
- const json$1 = _json;
8766
- json$1.type = "object";
8767
- json$1.properties = {};
8768
- const shape = def.shape;
8769
- for (const key in shape) {
8770
- json$1.properties[key] = this.process(shape[key], {
8771
- ...params,
8772
- path: [
8773
- ...params.path,
8774
- "properties",
8775
- key
8776
- ]
8777
- });
9055
+ case "void": {
9056
+ if (this.unrepresentable === "throw") {
9057
+ throw new Error("Void cannot be represented in JSON Schema");
9058
+ }
9059
+ break;
8778
9060
  }
8779
- const allKeys = new Set(Object.keys(shape));
8780
- const requiredKeys = new Set([...allKeys].filter((key) => {
8781
- const v = def.shape[key]._zod;
8782
- if (this.io === "input") {
8783
- return v.optin === undefined;
8784
- } else {
8785
- return v.optout === undefined;
9061
+ case "never": {
9062
+ _json.not = {};
9063
+ break;
9064
+ }
9065
+ case "date": {
9066
+ if (this.unrepresentable === "throw") {
9067
+ throw new Error("Date cannot be represented in JSON Schema");
8786
9068
  }
8787
- }));
8788
- if (requiredKeys.size > 0) {
8789
- json$1.required = Array.from(requiredKeys);
9069
+ break;
8790
9070
  }
8791
- if (def.catchall?._zod.def.type === "never") {
8792
- json$1.additionalProperties = false;
8793
- } else if (!def.catchall) {
8794
- if (this.io === "output") json$1.additionalProperties = false;
8795
- } else if (def.catchall) {
8796
- json$1.additionalProperties = this.process(def.catchall, {
9071
+ case "array": {
9072
+ const json$1 = _json;
9073
+ const { minimum, maximum } = schema._zod.bag;
9074
+ if (typeof minimum === "number") json$1.minItems = minimum;
9075
+ if (typeof maximum === "number") json$1.maxItems = maximum;
9076
+ json$1.type = "array";
9077
+ json$1.items = this.process(def.element, {
8797
9078
  ...params,
8798
- path: [...params.path, "additionalProperties"]
9079
+ path: [...params.path, "items"]
8799
9080
  });
9081
+ break;
8800
9082
  }
8801
- break;
8802
- }
8803
- case "union": {
8804
- const json$1 = _json;
8805
- json$1.anyOf = def.options.map((x, i) => this.process(x, {
8806
- ...params,
8807
- path: [
8808
- ...params.path,
8809
- "anyOf",
8810
- i
8811
- ]
8812
- }));
8813
- break;
8814
- }
8815
- case "intersection": {
8816
- const json$1 = _json;
8817
- const a = this.process(def.left, {
8818
- ...params,
8819
- path: [
8820
- ...params.path,
8821
- "allOf",
8822
- 0
8823
- ]
8824
- });
8825
- const b = this.process(def.right, {
8826
- ...params,
8827
- path: [
8828
- ...params.path,
8829
- "allOf",
8830
- 1
8831
- ]
8832
- });
8833
- const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
8834
- const allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
8835
- json$1.allOf = allOf;
8836
- break;
8837
- }
8838
- case "tuple": {
8839
- const json$1 = _json;
8840
- json$1.type = "array";
8841
- const prefixItems = def.items.map((x, i) => this.process(x, {
8842
- ...params,
8843
- path: [
8844
- ...params.path,
8845
- "prefixItems",
8846
- i
8847
- ]
8848
- }));
8849
- if (this.target === "draft-2020-12") {
8850
- json$1.prefixItems = prefixItems;
8851
- } else {
8852
- json$1.items = prefixItems;
9083
+ case "object": {
9084
+ const json$1 = _json;
9085
+ json$1.type = "object";
9086
+ json$1.properties = {};
9087
+ const shape = def.shape;
9088
+ for (const key in shape) {
9089
+ json$1.properties[key] = this.process(shape[key], {
9090
+ ...params,
9091
+ path: [
9092
+ ...params.path,
9093
+ "properties",
9094
+ key
9095
+ ]
9096
+ });
9097
+ }
9098
+ const allKeys = new Set(Object.keys(shape));
9099
+ const requiredKeys = new Set([...allKeys].filter((key) => {
9100
+ const v = def.shape[key]._zod;
9101
+ if (this.io === "input") {
9102
+ return v.optin === undefined;
9103
+ } else {
9104
+ return v.optout === undefined;
9105
+ }
9106
+ }));
9107
+ if (requiredKeys.size > 0) {
9108
+ json$1.required = Array.from(requiredKeys);
9109
+ }
9110
+ if (def.catchall?._zod.def.type === "never") {
9111
+ json$1.additionalProperties = false;
9112
+ } else if (!def.catchall) {
9113
+ if (this.io === "output") json$1.additionalProperties = false;
9114
+ } else if (def.catchall) {
9115
+ json$1.additionalProperties = this.process(def.catchall, {
9116
+ ...params,
9117
+ path: [...params.path, "additionalProperties"]
9118
+ });
9119
+ }
9120
+ break;
8853
9121
  }
8854
- if (def.rest) {
8855
- const rest = this.process(def.rest, {
9122
+ case "union": {
9123
+ const json$1 = _json;
9124
+ json$1.anyOf = def.options.map((x, i) => this.process(x, {
8856
9125
  ...params,
8857
- path: [...params.path, "items"]
9126
+ path: [
9127
+ ...params.path,
9128
+ "anyOf",
9129
+ i
9130
+ ]
9131
+ }));
9132
+ break;
9133
+ }
9134
+ case "intersection": {
9135
+ const json$1 = _json;
9136
+ const a = this.process(def.left, {
9137
+ ...params,
9138
+ path: [
9139
+ ...params.path,
9140
+ "allOf",
9141
+ 0
9142
+ ]
9143
+ });
9144
+ const b = this.process(def.right, {
9145
+ ...params,
9146
+ path: [
9147
+ ...params.path,
9148
+ "allOf",
9149
+ 1
9150
+ ]
8858
9151
  });
9152
+ const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
9153
+ const allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
9154
+ json$1.allOf = allOf;
9155
+ break;
9156
+ }
9157
+ case "tuple": {
9158
+ const json$1 = _json;
9159
+ json$1.type = "array";
9160
+ const prefixItems = def.items.map((x, i) => this.process(x, {
9161
+ ...params,
9162
+ path: [
9163
+ ...params.path,
9164
+ "prefixItems",
9165
+ i
9166
+ ]
9167
+ }));
8859
9168
  if (this.target === "draft-2020-12") {
8860
- json$1.items = rest;
9169
+ json$1.prefixItems = prefixItems;
8861
9170
  } else {
8862
- json$1.additionalItems = rest;
9171
+ json$1.items = prefixItems;
9172
+ }
9173
+ if (def.rest) {
9174
+ const rest = this.process(def.rest, {
9175
+ ...params,
9176
+ path: [...params.path, "items"]
9177
+ });
9178
+ if (this.target === "draft-2020-12") {
9179
+ json$1.items = rest;
9180
+ } else {
9181
+ json$1.additionalItems = rest;
9182
+ }
8863
9183
  }
9184
+ if (def.rest) {
9185
+ json$1.items = this.process(def.rest, {
9186
+ ...params,
9187
+ path: [...params.path, "items"]
9188
+ });
9189
+ }
9190
+ const { minimum, maximum } = schema._zod.bag;
9191
+ if (typeof minimum === "number") json$1.minItems = minimum;
9192
+ if (typeof maximum === "number") json$1.maxItems = maximum;
9193
+ break;
8864
9194
  }
8865
- if (def.rest) {
8866
- json$1.items = this.process(def.rest, {
9195
+ case "record": {
9196
+ const json$1 = _json;
9197
+ json$1.type = "object";
9198
+ json$1.propertyNames = this.process(def.keyType, {
8867
9199
  ...params,
8868
- path: [...params.path, "items"]
9200
+ path: [...params.path, "propertyNames"]
8869
9201
  });
9202
+ json$1.additionalProperties = this.process(def.valueType, {
9203
+ ...params,
9204
+ path: [...params.path, "additionalProperties"]
9205
+ });
9206
+ break;
8870
9207
  }
8871
- const { minimum, maximum } = schema._zod.bag;
8872
- if (typeof minimum === "number") json$1.minItems = minimum;
8873
- if (typeof maximum === "number") json$1.maxItems = maximum;
8874
- break;
8875
- }
8876
- case "record": {
8877
- const json$1 = _json;
8878
- json$1.type = "object";
8879
- json$1.propertyNames = this.process(def.keyType, {
8880
- ...params,
8881
- path: [...params.path, "propertyNames"]
8882
- });
8883
- json$1.additionalProperties = this.process(def.valueType, {
8884
- ...params,
8885
- path: [...params.path, "additionalProperties"]
8886
- });
8887
- break;
8888
- }
8889
- case "map": {
8890
- if (this.unrepresentable === "throw") {
8891
- throw new Error("Map cannot be represented in JSON Schema");
9208
+ case "map": {
9209
+ if (this.unrepresentable === "throw") {
9210
+ throw new Error("Map cannot be represented in JSON Schema");
9211
+ }
9212
+ break;
8892
9213
  }
8893
- break;
8894
- }
8895
- case "set": {
8896
- if (this.unrepresentable === "throw") {
8897
- throw new Error("Set cannot be represented in JSON Schema");
9214
+ case "set": {
9215
+ if (this.unrepresentable === "throw") {
9216
+ throw new Error("Set cannot be represented in JSON Schema");
9217
+ }
9218
+ break;
9219
+ }
9220
+ case "enum": {
9221
+ const json$1 = _json;
9222
+ const values = getEnumValues(def.entries);
9223
+ if (values.every((v) => typeof v === "number")) json$1.type = "number";
9224
+ if (values.every((v) => typeof v === "string")) json$1.type = "string";
9225
+ json$1.enum = values;
9226
+ break;
8898
9227
  }
8899
- break;
8900
- }
8901
- case "enum": {
8902
- const json$1 = _json;
8903
- const values = getEnumValues(def.entries);
8904
- if (values.every((v) => typeof v === "number")) json$1.type = "number";
8905
- if (values.every((v) => typeof v === "string")) json$1.type = "string";
8906
- json$1.enum = values;
8907
- break;
8908
- }
8909
- case "literal": {
8910
- const json$1 = _json;
8911
- const vals = [];
8912
- for (const val of def.values) {
8913
- if (val === undefined) {
8914
- if (this.unrepresentable === "throw") {
8915
- throw new Error("Literal `undefined` cannot be represented in JSON Schema");
8916
- } else {}
8917
- } else if (typeof val === "bigint") {
8918
- if (this.unrepresentable === "throw") {
8919
- throw new Error("BigInt literals cannot be represented in JSON Schema");
9228
+ case "literal": {
9229
+ const json$1 = _json;
9230
+ const vals = [];
9231
+ for (const val of def.values) {
9232
+ if (val === undefined) {
9233
+ if (this.unrepresentable === "throw") {
9234
+ throw new Error("Literal `undefined` cannot be represented in JSON Schema");
9235
+ } else {}
9236
+ } else if (typeof val === "bigint") {
9237
+ if (this.unrepresentable === "throw") {
9238
+ throw new Error("BigInt literals cannot be represented in JSON Schema");
9239
+ } else {
9240
+ vals.push(Number(val));
9241
+ }
8920
9242
  } else {
8921
- vals.push(Number(val));
9243
+ vals.push(val);
8922
9244
  }
9245
+ }
9246
+ if (vals.length === 0) {} else if (vals.length === 1) {
9247
+ const val = vals[0];
9248
+ json$1.type = val === null ? "null" : typeof val;
9249
+ json$1.const = val;
8923
9250
  } else {
8924
- vals.push(val);
9251
+ if (vals.every((v) => typeof v === "number")) json$1.type = "number";
9252
+ if (vals.every((v) => typeof v === "string")) json$1.type = "string";
9253
+ if (vals.every((v) => typeof v === "boolean")) json$1.type = "string";
9254
+ if (vals.every((v) => v === null)) json$1.type = "null";
9255
+ json$1.enum = vals;
8925
9256
  }
9257
+ break;
8926
9258
  }
8927
- if (vals.length === 0) {} else if (vals.length === 1) {
8928
- const val = vals[0];
8929
- json$1.type = val === null ? "null" : typeof val;
8930
- json$1.const = val;
8931
- } else {
8932
- if (vals.every((v) => typeof v === "number")) json$1.type = "number";
8933
- if (vals.every((v) => typeof v === "string")) json$1.type = "string";
8934
- if (vals.every((v) => typeof v === "boolean")) json$1.type = "string";
8935
- if (vals.every((v) => v === null)) json$1.type = "null";
8936
- json$1.enum = vals;
8937
- }
8938
- break;
8939
- }
8940
- case "file": {
8941
- const json$1 = _json;
8942
- const file$1 = {
8943
- type: "string",
8944
- format: "binary",
8945
- contentEncoding: "binary"
8946
- };
8947
- const { minimum, maximum, mime } = schema._zod.bag;
8948
- if (minimum !== undefined) file$1.minLength = minimum;
8949
- if (maximum !== undefined) file$1.maxLength = maximum;
8950
- if (mime) {
8951
- if (mime.length === 1) {
8952
- file$1.contentMediaType = mime[0];
8953
- Object.assign(json$1, file$1);
9259
+ case "file": {
9260
+ const json$1 = _json;
9261
+ const file$1 = {
9262
+ type: "string",
9263
+ format: "binary",
9264
+ contentEncoding: "binary"
9265
+ };
9266
+ const { minimum, maximum, mime } = schema._zod.bag;
9267
+ if (minimum !== undefined) file$1.minLength = minimum;
9268
+ if (maximum !== undefined) file$1.maxLength = maximum;
9269
+ if (mime) {
9270
+ if (mime.length === 1) {
9271
+ file$1.contentMediaType = mime[0];
9272
+ Object.assign(json$1, file$1);
9273
+ } else {
9274
+ json$1.anyOf = mime.map((m) => {
9275
+ const mFile = {
9276
+ ...file$1,
9277
+ contentMediaType: m
9278
+ };
9279
+ return mFile;
9280
+ });
9281
+ }
8954
9282
  } else {
8955
- json$1.anyOf = mime.map((m) => {
8956
- const mFile = {
8957
- ...file$1,
8958
- contentMediaType: m
8959
- };
8960
- return mFile;
8961
- });
9283
+ Object.assign(json$1, file$1);
8962
9284
  }
8963
- } else {
8964
- Object.assign(json$1, file$1);
9285
+ break;
8965
9286
  }
8966
- break;
8967
- }
8968
- case "transform": {
8969
- if (this.unrepresentable === "throw") {
8970
- throw new Error("Transforms cannot be represented in JSON Schema");
9287
+ case "transform": {
9288
+ if (this.unrepresentable === "throw") {
9289
+ throw new Error("Transforms cannot be represented in JSON Schema");
9290
+ }
9291
+ break;
8971
9292
  }
8972
- break;
8973
- }
8974
- case "nullable": {
8975
- const inner = this.process(def.innerType, params);
8976
- _json.anyOf = [inner, { type: "null" }];
8977
- break;
8978
- }
8979
- case "nonoptional": {
8980
- this.process(def.innerType, params);
8981
- result.ref = def.innerType;
8982
- break;
8983
- }
8984
- case "success": {
8985
- const json$1 = _json;
8986
- json$1.type = "boolean";
8987
- break;
8988
- }
8989
- case "default": {
8990
- this.process(def.innerType, params);
8991
- result.ref = def.innerType;
8992
- _json.default = def.defaultValue;
8993
- break;
8994
- }
8995
- case "prefault": {
8996
- this.process(def.innerType, params);
8997
- result.ref = def.innerType;
8998
- if (this.io === "input") _json._prefault = def.defaultValue;
8999
- break;
9000
- }
9001
- case "catch": {
9002
- this.process(def.innerType, params);
9003
- result.ref = def.innerType;
9004
- let catchValue;
9005
- try {
9006
- catchValue = def.catchValue(undefined);
9007
- } catch {
9008
- throw new Error("Dynamic catch values are not supported in JSON Schema");
9293
+ case "nullable": {
9294
+ const inner = this.process(def.innerType, params);
9295
+ _json.anyOf = [inner, { type: "null" }];
9296
+ break;
9009
9297
  }
9010
- _json.default = catchValue;
9011
- break;
9012
- }
9013
- case "nan": {
9014
- if (this.unrepresentable === "throw") {
9015
- throw new Error("NaN cannot be represented in JSON Schema");
9298
+ case "nonoptional": {
9299
+ this.process(def.innerType, params);
9300
+ result.ref = def.innerType;
9301
+ break;
9016
9302
  }
9017
- break;
9018
- }
9019
- case "template_literal": {
9020
- const json$1 = _json;
9021
- const pattern = schema._zod.pattern;
9022
- if (!pattern) throw new Error("Pattern not found in template literal");
9023
- json$1.type = "string";
9024
- json$1.pattern = pattern.source;
9025
- break;
9026
- }
9027
- case "pipe": {
9028
- const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
9029
- this.process(innerType, params);
9030
- result.ref = innerType;
9031
- break;
9032
- }
9033
- case "readonly": {
9034
- this.process(def.innerType, params);
9035
- result.ref = def.innerType;
9036
- _json.readOnly = true;
9037
- break;
9038
- }
9039
- case "promise": {
9040
- this.process(def.innerType, params);
9041
- result.ref = def.innerType;
9042
- break;
9043
- }
9044
- case "optional": {
9045
- this.process(def.innerType, params);
9046
- result.ref = def.innerType;
9047
- break;
9048
- }
9049
- case "lazy": {
9050
- const innerType = schema._zod.innerType;
9051
- this.process(innerType, params);
9052
- result.ref = innerType;
9053
- break;
9054
- }
9055
- case "custom": {
9056
- if (this.unrepresentable === "throw") {
9057
- throw new Error("Custom types cannot be represented in JSON Schema");
9303
+ case "success": {
9304
+ const json$1 = _json;
9305
+ json$1.type = "boolean";
9306
+ break;
9307
+ }
9308
+ case "default": {
9309
+ this.process(def.innerType, params);
9310
+ result.ref = def.innerType;
9311
+ _json.default = JSON.parse(JSON.stringify(def.defaultValue));
9312
+ break;
9313
+ }
9314
+ case "prefault": {
9315
+ this.process(def.innerType, params);
9316
+ result.ref = def.innerType;
9317
+ if (this.io === "input") _json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
9318
+ break;
9319
+ }
9320
+ case "catch": {
9321
+ this.process(def.innerType, params);
9322
+ result.ref = def.innerType;
9323
+ let catchValue;
9324
+ try {
9325
+ catchValue = def.catchValue(undefined);
9326
+ } catch {
9327
+ throw new Error("Dynamic catch values are not supported in JSON Schema");
9328
+ }
9329
+ _json.default = catchValue;
9330
+ break;
9331
+ }
9332
+ case "nan": {
9333
+ if (this.unrepresentable === "throw") {
9334
+ throw new Error("NaN cannot be represented in JSON Schema");
9335
+ }
9336
+ break;
9337
+ }
9338
+ case "template_literal": {
9339
+ const json$1 = _json;
9340
+ const pattern = schema._zod.pattern;
9341
+ if (!pattern) throw new Error("Pattern not found in template literal");
9342
+ json$1.type = "string";
9343
+ json$1.pattern = pattern.source;
9344
+ break;
9345
+ }
9346
+ case "pipe": {
9347
+ const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
9348
+ this.process(innerType, params);
9349
+ result.ref = innerType;
9350
+ break;
9351
+ }
9352
+ case "readonly": {
9353
+ this.process(def.innerType, params);
9354
+ result.ref = def.innerType;
9355
+ _json.readOnly = true;
9356
+ break;
9357
+ }
9358
+ case "promise": {
9359
+ this.process(def.innerType, params);
9360
+ result.ref = def.innerType;
9361
+ break;
9362
+ }
9363
+ case "optional": {
9364
+ this.process(def.innerType, params);
9365
+ result.ref = def.innerType;
9366
+ break;
9367
+ }
9368
+ case "lazy": {
9369
+ const innerType = schema._zod.innerType;
9370
+ this.process(innerType, params);
9371
+ result.ref = innerType;
9372
+ break;
9373
+ }
9374
+ case "custom": {
9375
+ if (this.unrepresentable === "throw") {
9376
+ throw new Error("Custom types cannot be represented in JSON Schema");
9377
+ }
9378
+ break;
9379
+ }
9380
+ default: {
9381
+ def;
9058
9382
  }
9059
- break;
9060
- }
9061
- default: {
9062
- def;
9063
9383
  }
9064
9384
  }
9065
9385
  }
@@ -9086,12 +9406,15 @@ var JSONSchemaGenerator = class {
9086
9406
  const defsSegment = this.target === "draft-2020-12" ? "$defs" : "definitions";
9087
9407
  if (params.external) {
9088
9408
  const externalId = params.external.registry.get(entry[0])?.id;
9089
- if (externalId) return { ref: params.external.uri(externalId) };
9409
+ const uriGenerator = params.external.uri ?? ((id$1) => id$1);
9410
+ if (externalId) {
9411
+ return { ref: uriGenerator(externalId) };
9412
+ }
9090
9413
  const id = entry[1].defId ?? entry[1].schema.id ?? `schema${this.counter++}`;
9091
9414
  entry[1].defId = id;
9092
9415
  return {
9093
9416
  defId: id,
9094
- ref: `${params.external.uri("__shared")}#/${defsSegment}/${id}`
9417
+ ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}`
9095
9418
  };
9096
9419
  }
9097
9420
  if (entry[1] === root) {
@@ -9119,6 +9442,14 @@ var JSONSchemaGenerator = class {
9119
9442
  }
9120
9443
  schema$1.$ref = ref;
9121
9444
  };
9445
+ if (params.cycles === "throw") {
9446
+ for (const entry of this.seen.entries()) {
9447
+ const seen = entry[1];
9448
+ if (seen.cycle) {
9449
+ throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + "\n\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.");
9450
+ }
9451
+ }
9452
+ }
9122
9453
  for (const entry of this.seen.entries()) {
9123
9454
  const seen = entry[1];
9124
9455
  if (schema === entry[0]) {
@@ -9138,11 +9469,7 @@ var JSONSchemaGenerator = class {
9138
9469
  continue;
9139
9470
  }
9140
9471
  if (seen.cycle) {
9141
- if (params.cycles === "throw") {
9142
- throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + "\n\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.");
9143
- } else if (params.cycles === "ref") {
9144
- extractToDef(entry);
9145
- }
9472
+ extractToDef(entry);
9146
9473
  continue;
9147
9474
  }
9148
9475
  if (seen.count > 1) {
@@ -9174,7 +9501,8 @@ var JSONSchemaGenerator = class {
9174
9501
  }
9175
9502
  if (!seen.isParent) this.override({
9176
9503
  zodSchema,
9177
- jsonSchema: schema$1
9504
+ jsonSchema: schema$1,
9505
+ path: seen.path ?? []
9178
9506
  });
9179
9507
  };
9180
9508
  for (const entry of [...this.seen.entries()].reverse()) {
@@ -9188,6 +9516,11 @@ var JSONSchemaGenerator = class {
9188
9516
  } else {
9189
9517
  console.warn(`Invalid target: ${this.target}`);
9190
9518
  }
9519
+ if (params.external?.uri) {
9520
+ const id = params.external.registry.get(schema)?.id;
9521
+ if (!id) throw new Error("Schema is missing an `id` property");
9522
+ result.$id = params.external.uri(id);
9523
+ }
9191
9524
  Object.assign(result, root.def);
9192
9525
  const defs = params.external?.defs ?? {};
9193
9526
  for (const entry of this.seen.entries()) {
@@ -9196,11 +9529,13 @@ var JSONSchemaGenerator = class {
9196
9529
  defs[seen.defId] = seen.def;
9197
9530
  }
9198
9531
  }
9199
- if (!params.external && Object.keys(defs).length > 0) {
9200
- if (this.target === "draft-2020-12") {
9201
- result.$defs = defs;
9202
- } else {
9203
- result.definitions = defs;
9532
+ if (params.external) {} else {
9533
+ if (Object.keys(defs).length > 0) {
9534
+ if (this.target === "draft-2020-12") {
9535
+ result.$defs = defs;
9536
+ } else {
9537
+ result.definitions = defs;
9538
+ }
9204
9539
  }
9205
9540
  }
9206
9541
  try {
@@ -9221,7 +9556,7 @@ function toJSONSchema(input, _params) {
9221
9556
  const schemas = {};
9222
9557
  const external = {
9223
9558
  registry: input,
9224
- uri: _params?.uri || ((id) => id),
9559
+ uri: _params?.uri,
9225
9560
  defs
9226
9561
  };
9227
9562
  for (const entry of input._idmap.entries()) {
@@ -9332,11 +9667,11 @@ function isTransforming(_schema, _ctx) {
9332
9667
  }
9333
9668
 
9334
9669
  //#endregion
9335
- //#region ../../node_modules/zod/dist/esm/v4/core/json-schema.js
9670
+ //#region ../../node_modules/zod/v4/core/json-schema.js
9336
9671
  var json_schema_exports = {};
9337
9672
 
9338
9673
  //#endregion
9339
- //#region ../../node_modules/zod/dist/esm/v4/core/index.js
9674
+ //#region ../../node_modules/zod/v4/core/index.js
9340
9675
  var core_exports = {};
9341
9676
  __export(core_exports, {
9342
9677
  $ZodAny: () => $ZodAny,
@@ -9375,6 +9710,7 @@ __export(core_exports, {
9375
9710
  $ZodCheckStringFormat: () => $ZodCheckStringFormat,
9376
9711
  $ZodCheckUpperCase: () => $ZodCheckUpperCase,
9377
9712
  $ZodCustom: () => $ZodCustom,
9713
+ $ZodCustomStringFormat: () => $ZodCustomStringFormat,
9378
9714
  $ZodDate: () => $ZodDate,
9379
9715
  $ZodDefault: () => $ZodDefault,
9380
9716
  $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion,
@@ -9439,6 +9775,8 @@ __export(core_exports, {
9439
9775
  Doc: () => Doc,
9440
9776
  JSONSchema: () => json_schema_exports,
9441
9777
  JSONSchemaGenerator: () => JSONSchemaGenerator,
9778
+ NEVER: () => NEVER,
9779
+ TimePrecision: () => TimePrecision,
9442
9780
  _any: () => _any,
9443
9781
  _array: () => _array,
9444
9782
  _base64: () => _base64,
@@ -9528,6 +9866,7 @@ __export(core_exports, {
9528
9866
  _size: () => _size,
9529
9867
  _startsWith: () => _startsWith,
9530
9868
  _string: () => _string,
9869
+ _stringFormat: () => _stringFormat,
9531
9870
  _stringbool: () => _stringbool,
9532
9871
  _success: () => _success,
9533
9872
  _symbol: () => _symbol,
@@ -9577,7 +9916,7 @@ __export(core_exports, {
9577
9916
  });
9578
9917
 
9579
9918
  //#endregion
9580
- //#region ../../node_modules/zod/dist/esm/v4/classic/iso.js
9919
+ //#region ../../node_modules/zod/v4/classic/iso.js
9581
9920
  var iso_exports = {};
9582
9921
  __export(iso_exports, {
9583
9922
  ZodISODate: () => ZodISODate,
@@ -9619,7 +9958,7 @@ function duration(params) {
9619
9958
  }
9620
9959
 
9621
9960
  //#endregion
9622
- //#region ../../node_modules/zod/dist/esm/v4/classic/errors.js
9961
+ //#region ../../node_modules/zod/v4/classic/errors.js
9623
9962
  const initializer = (inst, issues) => {
9624
9963
  $ZodError.init(inst, issues);
9625
9964
  inst.name = "ZodError";
@@ -9637,14 +9976,14 @@ const ZodError = $constructor("ZodError", initializer);
9637
9976
  const ZodRealError = $constructor("ZodError", initializer, { Parent: Error });
9638
9977
 
9639
9978
  //#endregion
9640
- //#region ../../node_modules/zod/dist/esm/v4/classic/parse.js
9979
+ //#region ../../node_modules/zod/v4/classic/parse.js
9641
9980
  const parse = /* @__PURE__ */ _parse(ZodRealError);
9642
9981
  const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
9643
9982
  const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
9644
9983
  const safeParseAsync = /* @__PURE__ */ _safeParseAsync(ZodRealError);
9645
9984
 
9646
9985
  //#endregion
9647
- //#region ../../node_modules/zod/dist/esm/v4/classic/schemas.js
9986
+ //#region ../../node_modules/zod/v4/classic/schemas.js
9648
9987
  const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
9649
9988
  $ZodType.init(inst, def);
9650
9989
  inst.def = def;
@@ -9912,6 +10251,13 @@ const ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
9912
10251
  function jwt(params) {
9913
10252
  return _jwt(ZodJWT, params);
9914
10253
  }
10254
+ const ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => {
10255
+ $ZodCustomStringFormat.init(inst, def);
10256
+ ZodStringFormat.init(inst, def);
10257
+ });
10258
+ function stringFormat(format, fnOrRegex, _params = {}) {
10259
+ return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
10260
+ }
9915
10261
  const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
9916
10262
  $ZodNumber.init(inst, def);
9917
10263
  ZodType.init(inst, def);
@@ -10081,9 +10427,7 @@ function keyof(schema) {
10081
10427
  const ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
10082
10428
  $ZodObject.init(inst, def);
10083
10429
  ZodType.init(inst, def);
10084
- defineLazy(inst, "shape", () => {
10085
- return Object.fromEntries(Object.entries(inst._zod.def.shape));
10086
- });
10430
+ defineLazy(inst, "shape", () => def.shape);
10087
10431
  inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
10088
10432
  inst.catchall = (catchall) => inst.clone({
10089
10433
  ...inst._zod.def,
@@ -10528,11 +10872,8 @@ const ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
10528
10872
  $ZodCustom.init(inst, def);
10529
10873
  ZodType.init(inst, def);
10530
10874
  });
10531
- function check(fn, params) {
10532
- const ch = new $ZodCheck({
10533
- check: "custom",
10534
- ...normalizeParams(params)
10535
- });
10875
+ function check(fn) {
10876
+ const ch = new $ZodCheck({ check: "custom" });
10536
10877
  ch._zod.check = fn;
10537
10878
  return ch;
10538
10879
  }
@@ -10542,7 +10883,7 @@ function custom(fn, _params) {
10542
10883
  function refine(fn, _params = {}) {
10543
10884
  return _refine(ZodCustom, fn, _params);
10544
10885
  }
10545
- function superRefine(fn, params) {
10886
+ function superRefine(fn) {
10546
10887
  const ch = check((payload) => {
10547
10888
  payload.addIssue = (issue$1) => {
10548
10889
  if (typeof issue$1 === "string") {
@@ -10558,7 +10899,7 @@ function superRefine(fn, params) {
10558
10899
  }
10559
10900
  };
10560
10901
  return fn(payload.value, payload);
10561
- }, params);
10902
+ });
10562
10903
  return ch;
10563
10904
  }
10564
10905
  function _instanceof(cls, params = { error: `Input not instance of ${cls.name}` }) {
@@ -10596,7 +10937,7 @@ function preprocess(fn, schema) {
10596
10937
  }
10597
10938
 
10598
10939
  //#endregion
10599
- //#region ../../node_modules/zod/dist/esm/v4/classic/compat.js
10940
+ //#region ../../node_modules/zod/v4/classic/compat.js
10600
10941
  /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
10601
10942
  const ZodIssueCode = {
10602
10943
  invalid_type: "invalid_type",
@@ -10611,10 +10952,6 @@ const ZodIssueCode = {
10611
10952
  invalid_value: "invalid_value",
10612
10953
  custom: "custom"
10613
10954
  };
10614
- /** @deprecated Not necessary in Zod 4. */
10615
- const INVALID = Object.freeze({ status: "aborted" });
10616
- /** A special constant with type `never` */
10617
- const NEVER = INVALID;
10618
10955
  /** @deprecated Use `z.config(params)` instead. */
10619
10956
  function setErrorMap(map$1) {
10620
10957
  config({ customError: map$1 });
@@ -10623,9 +10960,12 @@ function setErrorMap(map$1) {
10623
10960
  function getErrorMap() {
10624
10961
  return config().customError;
10625
10962
  }
10963
+ /** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
10964
+ var ZodFirstPartyTypeKind;
10965
+ (function(ZodFirstPartyTypeKind$1) {})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
10626
10966
 
10627
10967
  //#endregion
10628
- //#region ../../node_modules/zod/dist/esm/v4/classic/coerce.js
10968
+ //#region ../../node_modules/zod/v4/classic/coerce.js
10629
10969
  var coerce_exports = {};
10630
10970
  __export(coerce_exports, {
10631
10971
  bigint: () => bigint,
@@ -10651,13 +10991,14 @@ function date(params) {
10651
10991
  }
10652
10992
 
10653
10993
  //#endregion
10654
- //#region ../../node_modules/zod/dist/esm/v4/classic/external.js
10994
+ //#region ../../node_modules/zod/v4/classic/external.js
10655
10995
  var external_exports = {};
10656
10996
  __export(external_exports, {
10657
10997
  $brand: () => $brand,
10658
10998
  $input: () => $input,
10659
10999
  $output: () => $output,
10660
11000
  NEVER: () => NEVER,
11001
+ TimePrecision: () => TimePrecision,
10661
11002
  ZodAny: () => ZodAny,
10662
11003
  ZodArray: () => ZodArray,
10663
11004
  ZodBase64: () => ZodBase64,
@@ -10671,6 +11012,7 @@ __export(external_exports, {
10671
11012
  ZodCUID2: () => ZodCUID2,
10672
11013
  ZodCatch: () => ZodCatch,
10673
11014
  ZodCustom: () => ZodCustom,
11015
+ ZodCustomStringFormat: () => ZodCustomStringFormat,
10674
11016
  ZodDate: () => ZodDate,
10675
11017
  ZodDefault: () => ZodDefault,
10676
11018
  ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
@@ -10680,6 +11022,7 @@ __export(external_exports, {
10680
11022
  ZodEnum: () => ZodEnum,
10681
11023
  ZodError: () => ZodError,
10682
11024
  ZodFile: () => ZodFile,
11025
+ ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
10683
11026
  ZodGUID: () => ZodGUID,
10684
11027
  ZodIPv4: () => ZodIPv4,
10685
11028
  ZodIPv6: () => ZodIPv6,
@@ -10832,6 +11175,7 @@ __export(external_exports, {
10832
11175
  startsWith: () => _startsWith,
10833
11176
  strictObject: () => strictObject,
10834
11177
  string: () => string$1,
11178
+ stringFormat: () => stringFormat,
10835
11179
  stringbool: () => stringbool,
10836
11180
  success: () => success,
10837
11181
  superRefine: () => superRefine,
@@ -10862,11 +11206,11 @@ __export(external_exports, {
10862
11206
  config(en_default());
10863
11207
 
10864
11208
  //#endregion
10865
- //#region ../../node_modules/zod/dist/esm/v4/classic/index.js
11209
+ //#region ../../node_modules/zod/v4/classic/index.js
10866
11210
  var classic_default = external_exports;
10867
11211
 
10868
11212
  //#endregion
10869
- //#region ../../node_modules/zod/dist/esm/v4/index.js
11213
+ //#region ../../node_modules/zod/v4/index.js
10870
11214
  var v4_default = classic_default;
10871
11215
 
10872
11216
  //#endregion
@@ -11001,8 +11345,8 @@ var EASClient = class {
11001
11345
  };
11002
11346
  return this.deployedAddresses;
11003
11347
  } catch (err) {
11004
- const error$37 = err;
11005
- throw new Error(`Failed to deploy EAS contracts: ${error$37.message}`);
11348
+ const error$39 = err;
11349
+ throw new Error(`Failed to deploy EAS contracts: ${error$39.message}`);
11006
11350
  }
11007
11351
  }
11008
11352
  /**
@@ -11063,8 +11407,8 @@ var EASClient = class {
11063
11407
  success: true
11064
11408
  };
11065
11409
  } catch (err) {
11066
- const error$37 = err;
11067
- throw new Error(`Failed to register schema: ${error$37.message}`);
11410
+ const error$39 = err;
11411
+ throw new Error(`Failed to register schema: ${error$39.message}`);
11068
11412
  }
11069
11413
  }
11070
11414
  /**
@@ -11130,8 +11474,8 @@ var EASClient = class {
11130
11474
  success: true
11131
11475
  };
11132
11476
  } catch (err) {
11133
- const error$37 = err;
11134
- throw new Error(`Failed to create attestation: ${error$37.message}`);
11477
+ const error$39 = err;
11478
+ throw new Error(`Failed to create attestation: ${error$39.message}`);
11135
11479
  }
11136
11480
  }
11137
11481
  /**
@@ -11213,8 +11557,8 @@ var EASClient = class {
11213
11557
  success: true
11214
11558
  };
11215
11559
  } catch (err) {
11216
- const error$37 = err;
11217
- throw new Error(`Failed to create multiple attestations: ${error$37.message}`);
11560
+ const error$39 = err;
11561
+ throw new Error(`Failed to create multiple attestations: ${error$39.message}`);
11218
11562
  }
11219
11563
  }
11220
11564
  /**
@@ -11269,8 +11613,8 @@ var EASClient = class {
11269
11613
  success: true
11270
11614
  };
11271
11615
  } catch (err) {
11272
- const error$37 = err;
11273
- throw new Error(`Failed to revoke attestation: ${error$37.message}`);
11616
+ const error$39 = err;
11617
+ throw new Error(`Failed to revoke attestation: ${error$39.message}`);
11274
11618
  }
11275
11619
  }
11276
11620
  /**