@settlemint/sdk-utils 2.4.1-prb0c72988 → 2.4.1-prb593b885

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.
@@ -349,10 +349,10 @@ var SpinnerError = class extends Error {
349
349
  * });
350
350
  */
351
351
  const spinner = async (options) => {
352
- const handleError = (error$37) => {
353
- const errorMessage = maskTokens(error$37.message);
354
- note((0, yoctocolors.redBright)(`${errorMessage}\n\n${error$37.stack}`));
355
- throw new SpinnerError(errorMessage, error$37);
352
+ const handleError = (error$39) => {
353
+ const errorMessage = maskTokens(error$39.message);
354
+ note((0, yoctocolors.redBright)(`${errorMessage}\n\n${error$39.stack}`));
355
+ throw new SpinnerError(errorMessage, error$39);
356
356
  };
357
357
  if (is_in_ci.default || !shouldPrint()) {
358
358
  try {
@@ -480,7 +480,9 @@ function table(title, data) {
480
480
  }
481
481
 
482
482
  //#endregion
483
- //#region ../../node_modules/zod/dist/esm/v4/core/core.js
483
+ //#region ../../node_modules/zod/v4/core/core.js
484
+ /** A special constant with type `never` */
485
+ const NEVER = Object.freeze({ status: "aborted" });
484
486
  function $constructor(name, initializer$2, params) {
485
487
  function init(inst, def) {
486
488
  var _a;
@@ -531,7 +533,7 @@ function config$2(newConfig) {
531
533
  }
532
534
 
533
535
  //#endregion
534
- //#region ../../node_modules/zod/dist/esm/v4/core/util.js
536
+ //#region ../../node_modules/zod/v4/core/util.js
535
537
  var util_exports = {};
536
538
  __export(util_exports, {
537
539
  BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
@@ -546,6 +548,7 @@ __export(util_exports, {
546
548
  assertNotEqual: () => assertNotEqual,
547
549
  assignProp: () => assignProp,
548
550
  cached: () => cached,
551
+ captureStackTrace: () => captureStackTrace,
549
552
  cleanEnum: () => cleanEnum,
550
553
  cleanRegex: () => cleanRegex,
551
554
  clone: () => clone,
@@ -684,10 +687,14 @@ function randomString(length = 10) {
684
687
  function esc(str) {
685
688
  return JSON.stringify(str);
686
689
  }
690
+ const captureStackTrace = Error.captureStackTrace ? Error.captureStackTrace : (..._args) => {};
687
691
  function isObject(data) {
688
692
  return typeof data === "object" && data !== null && !Array.isArray(data);
689
693
  }
690
694
  const allowsEval = cached(() => {
695
+ if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
696
+ return false;
697
+ }
691
698
  try {
692
699
  const F = Function;
693
700
  new F("");
@@ -696,9 +703,6 @@ const allowsEval = cached(() => {
696
703
  return false;
697
704
  }
698
705
  });
699
- function _isObject(o) {
700
- return Object.prototype.toString.call(o) === "[object Object]";
701
- }
702
706
  function isPlainObject(o) {
703
707
  if (isObject(o) === false) return false;
704
708
  const ctor = o.constructor;
@@ -878,6 +882,9 @@ function omit(schema, mask) {
878
882
  });
879
883
  }
880
884
  function extend(schema, shape) {
885
+ if (!isPlainObject(shape)) {
886
+ throw new Error("Invalid input to extend: expected a plain object");
887
+ }
881
888
  const def = {
882
889
  ...schema._zod.def,
883
890
  get shape() {
@@ -965,7 +972,7 @@ function required(Class$1, schema, mask) {
965
972
  }
966
973
  function aborted(x, startIndex = 0) {
967
974
  for (let i = startIndex; i < x.issues.length; i++) {
968
- if (x.issues[i].continue !== true) return true;
975
+ if (x.issues[i]?.continue !== true) return true;
969
976
  }
970
977
  return false;
971
978
  }
@@ -1029,7 +1036,7 @@ var Class = class {
1029
1036
  };
1030
1037
 
1031
1038
  //#endregion
1032
- //#region ../../node_modules/zod/dist/esm/v4/core/errors.js
1039
+ //#region ../../node_modules/zod/v4/core/errors.js
1033
1040
  const initializer$1 = (inst, def) => {
1034
1041
  inst.name = "$ZodError";
1035
1042
  Object.defineProperty(inst, "_zod", {
@@ -1046,13 +1053,17 @@ const initializer$1 = (inst, def) => {
1046
1053
  },
1047
1054
  enumerable: true
1048
1055
  });
1056
+ Object.defineProperty(inst, "toString", {
1057
+ value: () => inst.message,
1058
+ enumerable: false
1059
+ });
1049
1060
  };
1050
1061
  const $ZodError = $constructor("$ZodError", initializer$1);
1051
1062
  const $ZodRealError = $constructor("$ZodError", initializer$1, { Parent: Error });
1052
- function flattenError(error$37, mapper = (issue$1) => issue$1.message) {
1063
+ function flattenError(error$39, mapper = (issue$1) => issue$1.message) {
1053
1064
  const fieldErrors = {};
1054
1065
  const formErrors = [];
1055
- for (const sub of error$37.issues) {
1066
+ for (const sub of error$39.issues) {
1056
1067
  if (sub.path.length > 0) {
1057
1068
  fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
1058
1069
  fieldErrors[sub.path[0]].push(mapper(sub));
@@ -1065,13 +1076,13 @@ function flattenError(error$37, mapper = (issue$1) => issue$1.message) {
1065
1076
  fieldErrors
1066
1077
  };
1067
1078
  }
1068
- function formatError(error$37, _mapper) {
1079
+ function formatError(error$39, _mapper) {
1069
1080
  const mapper = _mapper || function(issue$1) {
1070
1081
  return issue$1.message;
1071
1082
  };
1072
1083
  const fieldErrors = { _errors: [] };
1073
- const processError = (error$38) => {
1074
- for (const issue$1 of error$38.issues) {
1084
+ const processError = (error$40) => {
1085
+ for (const issue$1 of error$40.issues) {
1075
1086
  if (issue$1.code === "invalid_union" && issue$1.errors.length) {
1076
1087
  issue$1.errors.map((issues) => processError({ issues }));
1077
1088
  } else if (issue$1.code === "invalid_key") {
@@ -1098,17 +1109,17 @@ function formatError(error$37, _mapper) {
1098
1109
  }
1099
1110
  }
1100
1111
  };
1101
- processError(error$37);
1112
+ processError(error$39);
1102
1113
  return fieldErrors;
1103
1114
  }
1104
- function treeifyError(error$37, _mapper) {
1115
+ function treeifyError(error$39, _mapper) {
1105
1116
  const mapper = _mapper || function(issue$1) {
1106
1117
  return issue$1.message;
1107
1118
  };
1108
1119
  const result = { errors: [] };
1109
- const processError = (error$38, path$1 = []) => {
1120
+ const processError = (error$40, path$1 = []) => {
1110
1121
  var _a, _b;
1111
- for (const issue$1 of error$38.issues) {
1122
+ for (const issue$1 of error$40.issues) {
1112
1123
  if (issue$1.code === "invalid_union" && issue$1.errors.length) {
1113
1124
  issue$1.errors.map((issues) => processError({ issues }, issue$1.path));
1114
1125
  } else if (issue$1.code === "invalid_key") {
@@ -1143,7 +1154,7 @@ function treeifyError(error$37, _mapper) {
1143
1154
  }
1144
1155
  }
1145
1156
  };
1146
- processError(error$37);
1157
+ processError(error$39);
1147
1158
  return result;
1148
1159
  }
1149
1160
  /** Format a ZodError as a human-readable string in the following form.
@@ -1191,9 +1202,9 @@ function toDotPath(path$1) {
1191
1202
  }
1192
1203
  return segs.join("");
1193
1204
  }
1194
- function prettifyError(error$37) {
1205
+ function prettifyError(error$39) {
1195
1206
  const lines = [];
1196
- const issues = [...error$37.issues].sort((a, b) => a.path.length - b.path.length);
1207
+ const issues = [...error$39.issues].sort((a, b) => a.path.length - b.path.length);
1197
1208
  for (const issue$1 of issues) {
1198
1209
  lines.push(`✖ ${issue$1.message}`);
1199
1210
  if (issue$1.path?.length) lines.push(` → at ${toDotPath(issue$1.path)}`);
@@ -1202,7 +1213,7 @@ function prettifyError(error$37) {
1202
1213
  }
1203
1214
 
1204
1215
  //#endregion
1205
- //#region ../../node_modules/zod/dist/esm/v4/core/parse.js
1216
+ //#region ../../node_modules/zod/v4/core/parse.js
1206
1217
  const _parse = (_Err) => (schema, value, _ctx, _params) => {
1207
1218
  const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
1208
1219
  const result = schema._zod.run({
@@ -1214,7 +1225,7 @@ const _parse = (_Err) => (schema, value, _ctx, _params) => {
1214
1225
  }
1215
1226
  if (result.issues.length) {
1216
1227
  const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config$2())));
1217
- Error.captureStackTrace(e, _params?.callee);
1228
+ captureStackTrace(e, _params?.callee);
1218
1229
  throw e;
1219
1230
  }
1220
1231
  return result.value;
@@ -1229,7 +1240,7 @@ const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
1229
1240
  if (result instanceof Promise) result = await result;
1230
1241
  if (result.issues.length) {
1231
1242
  const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config$2())));
1232
- Error.captureStackTrace(e, params?.callee);
1243
+ captureStackTrace(e, params?.callee);
1233
1244
  throw e;
1234
1245
  }
1235
1246
  return result.value;
@@ -1274,10 +1285,9 @@ const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
1274
1285
  const safeParseAsync$1 = /* @__PURE__ */ _safeParseAsync($ZodRealError);
1275
1286
 
1276
1287
  //#endregion
1277
- //#region ../../node_modules/zod/dist/esm/v4/core/regexes.js
1288
+ //#region ../../node_modules/zod/v4/core/regexes.js
1278
1289
  var regexes_exports = {};
1279
1290
  __export(regexes_exports, {
1280
- _emoji: () => _emoji$1,
1281
1291
  base64: () => base64$1,
1282
1292
  base64url: () => base64url$1,
1283
1293
  bigint: () => bigint$2,
@@ -1363,27 +1373,23 @@ const base64url$1 = /^[A-Za-z0-9_-]*$/;
1363
1373
  const hostname = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;
1364
1374
  const domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
1365
1375
  const e164$1 = /^\+(?:[0-9]){6,14}[0-9]$/;
1366
- 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])))`;
1376
+ 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])))`;
1367
1377
  const date$3 = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
1368
1378
  function timeSource(args) {
1369
- let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
1370
- if (args.precision) {
1371
- regex = `${regex}\\.\\d{${args.precision}}`;
1372
- } else if (args.precision == null) {
1373
- regex = `${regex}(\\.\\d+)?`;
1374
- }
1379
+ const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
1380
+ 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+)?)?`;
1375
1381
  return regex;
1376
1382
  }
1377
1383
  function time$1(args) {
1378
1384
  return new RegExp(`^${timeSource(args)}$`);
1379
1385
  }
1380
1386
  function datetime$1(args) {
1381
- let regex = `${dateSource}T${timeSource(args)}`;
1382
- const opts = [];
1383
- opts.push(args.local ? `Z?` : `Z`);
1384
- if (args.offset) opts.push(`([+-]\\d{2}:?\\d{2})`);
1385
- regex = `${regex}(${opts.join("|")})`;
1386
- return new RegExp(`^${regex}$`);
1387
+ const time$2 = timeSource({ precision: args.precision });
1388
+ const opts = ["Z"];
1389
+ if (args.local) opts.push("");
1390
+ if (args.offset) opts.push(`([+-]\\d{2}:\\d{2})`);
1391
+ const timeRegex = `${time$2}(?:${opts.join("|")})`;
1392
+ return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
1387
1393
  }
1388
1394
  const string$2 = (params) => {
1389
1395
  const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
@@ -1399,7 +1405,7 @@ const lowercase = /^[^A-Z]*$/;
1399
1405
  const uppercase = /^[^a-z]*$/;
1400
1406
 
1401
1407
  //#endregion
1402
- //#region ../../node_modules/zod/dist/esm/v4/core/checks.js
1408
+ //#region ../../node_modules/zod/v4/core/checks.js
1403
1409
  const $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
1404
1410
  var _a;
1405
1411
  inst._zod ?? (inst._zod = {});
@@ -1590,11 +1596,12 @@ const $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntForma
1590
1596
  };
1591
1597
  });
1592
1598
  const $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
1599
+ var _a;
1593
1600
  $ZodCheck.init(inst, def);
1594
- inst._zod.when = (payload) => {
1601
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1595
1602
  const val = payload.value;
1596
1603
  return !nullish$1(val) && val.size !== undefined;
1597
- };
1604
+ });
1598
1605
  inst._zod.onattach.push((inst$1) => {
1599
1606
  const curr = inst$1._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1600
1607
  if (def.maximum < curr) inst$1._zod.bag.maximum = def.maximum;
@@ -1614,11 +1621,12 @@ const $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst,
1614
1621
  };
1615
1622
  });
1616
1623
  const $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
1624
+ var _a;
1617
1625
  $ZodCheck.init(inst, def);
1618
- inst._zod.when = (payload) => {
1626
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1619
1627
  const val = payload.value;
1620
1628
  return !nullish$1(val) && val.size !== undefined;
1621
- };
1629
+ });
1622
1630
  inst._zod.onattach.push((inst$1) => {
1623
1631
  const curr = inst$1._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1624
1632
  if (def.minimum > curr) inst$1._zod.bag.minimum = def.minimum;
@@ -1638,11 +1646,12 @@ const $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst,
1638
1646
  };
1639
1647
  });
1640
1648
  const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
1649
+ var _a;
1641
1650
  $ZodCheck.init(inst, def);
1642
- inst._zod.when = (payload) => {
1651
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1643
1652
  const val = payload.value;
1644
1653
  return !nullish$1(val) && val.size !== undefined;
1645
- };
1654
+ });
1646
1655
  inst._zod.onattach.push((inst$1) => {
1647
1656
  const bag = inst$1._zod.bag;
1648
1657
  bag.minimum = def.size;
@@ -1663,6 +1672,8 @@ const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals",
1663
1672
  code: "too_small",
1664
1673
  minimum: def.size
1665
1674
  },
1675
+ inclusive: true,
1676
+ exact: true,
1666
1677
  input: payload.value,
1667
1678
  inst,
1668
1679
  continue: !def.abort
@@ -1670,11 +1681,12 @@ const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals",
1670
1681
  };
1671
1682
  });
1672
1683
  const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
1684
+ var _a;
1673
1685
  $ZodCheck.init(inst, def);
1674
- inst._zod.when = (payload) => {
1686
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1675
1687
  const val = payload.value;
1676
1688
  return !nullish$1(val) && val.length !== undefined;
1677
- };
1689
+ });
1678
1690
  inst._zod.onattach.push((inst$1) => {
1679
1691
  const curr = inst$1._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1680
1692
  if (def.maximum < curr) inst$1._zod.bag.maximum = def.maximum;
@@ -1696,11 +1708,12 @@ const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (i
1696
1708
  };
1697
1709
  });
1698
1710
  const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
1711
+ var _a;
1699
1712
  $ZodCheck.init(inst, def);
1700
- inst._zod.when = (payload) => {
1713
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1701
1714
  const val = payload.value;
1702
1715
  return !nullish$1(val) && val.length !== undefined;
1703
- };
1716
+ });
1704
1717
  inst._zod.onattach.push((inst$1) => {
1705
1718
  const curr = inst$1._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1706
1719
  if (def.minimum > curr) inst$1._zod.bag.minimum = def.minimum;
@@ -1722,11 +1735,12 @@ const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (i
1722
1735
  };
1723
1736
  });
1724
1737
  const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
1738
+ var _a;
1725
1739
  $ZodCheck.init(inst, def);
1726
- inst._zod.when = (payload) => {
1740
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1727
1741
  const val = payload.value;
1728
1742
  return !nullish$1(val) && val.length !== undefined;
1729
- };
1743
+ });
1730
1744
  inst._zod.onattach.push((inst$1) => {
1731
1745
  const bag = inst$1._zod.bag;
1732
1746
  bag.minimum = def.length;
@@ -1748,6 +1762,8 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
1748
1762
  code: "too_small",
1749
1763
  minimum: def.length
1750
1764
  },
1765
+ inclusive: true,
1766
+ exact: true,
1751
1767
  input: payload.value,
1752
1768
  inst,
1753
1769
  continue: !def.abort
@@ -1755,7 +1771,7 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
1755
1771
  };
1756
1772
  });
1757
1773
  const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
1758
- var _a;
1774
+ var _a, _b;
1759
1775
  $ZodCheck.init(inst, def);
1760
1776
  inst._zod.onattach.push((inst$1) => {
1761
1777
  const bag = inst$1._zod.bag;
@@ -1765,8 +1781,7 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
1765
1781
  bag.patterns.add(def.pattern);
1766
1782
  }
1767
1783
  });
1768
- (_a = inst._zod).check ?? (_a.check = (payload) => {
1769
- if (!def.pattern) throw new Error("Not implemented.");
1784
+ if (def.pattern) (_a = inst._zod).check ?? (_a.check = (payload) => {
1770
1785
  def.pattern.lastIndex = 0;
1771
1786
  if (def.pattern.test(payload.value)) return;
1772
1787
  payload.issues.push({
@@ -1779,6 +1794,7 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
1779
1794
  continue: !def.abort
1780
1795
  });
1781
1796
  });
1797
+ else (_b = inst._zod).check ?? (_b.check = () => {});
1782
1798
  });
1783
1799
  const $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => {
1784
1800
  $ZodCheckStringFormat.init(inst, def);
@@ -1902,7 +1918,6 @@ const $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (ins
1902
1918
  code: "invalid_value",
1903
1919
  values: def.mime,
1904
1920
  input: payload.value.type,
1905
- path: ["type"],
1906
1921
  inst
1907
1922
  });
1908
1923
  };
@@ -1915,7 +1930,7 @@ const $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (i
1915
1930
  });
1916
1931
 
1917
1932
  //#endregion
1918
- //#region ../../node_modules/zod/dist/esm/v4/core/doc.js
1933
+ //#region ../../node_modules/zod/v4/core/doc.js
1919
1934
  var Doc = class {
1920
1935
  constructor(args = []) {
1921
1936
  this.content = [];
@@ -1951,19 +1966,18 @@ var Doc = class {
1951
1966
  };
1952
1967
 
1953
1968
  //#endregion
1954
- //#region ../../node_modules/zod/dist/esm/v4/core/versions.js
1969
+ //#region ../../node_modules/zod/v4/core/versions.js
1955
1970
  const version = {
1956
1971
  major: 4,
1957
1972
  minor: 0,
1958
- patch: 0
1973
+ patch: 2
1959
1974
  };
1960
1975
 
1961
1976
  //#endregion
1962
- //#region ../../node_modules/zod/dist/esm/v4/core/schemas.js
1977
+ //#region ../../node_modules/zod/v4/core/schemas.js
1963
1978
  const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1964
1979
  var _a;
1965
1980
  inst ?? (inst = {});
1966
- inst._zod.id = def.type + "_" + randomString(10);
1967
1981
  inst._zod.def = def;
1968
1982
  inst._zod.bag = inst._zod.bag || {};
1969
1983
  inst._zod.version = version;
@@ -1986,13 +2000,11 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1986
2000
  let isAborted = aborted(payload);
1987
2001
  let asyncResult;
1988
2002
  for (const ch of checks$1) {
1989
- if (ch._zod.when) {
1990
- const shouldRun = ch._zod.when(payload);
2003
+ if (ch._zod.def.when) {
2004
+ const shouldRun = ch._zod.def.when(payload);
1991
2005
  if (!shouldRun) continue;
1992
- } else {
1993
- if (isAborted) {
1994
- continue;
1995
- }
2006
+ } else if (isAborted) {
2007
+ continue;
1996
2008
  }
1997
2009
  const currLen = payload.issues.length;
1998
2010
  const _ = ch._zod.check(payload);
@@ -2092,7 +2104,9 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
2092
2104
  $ZodStringFormat.init(inst, def);
2093
2105
  inst._zod.check = (payload) => {
2094
2106
  try {
2095
- const url$1 = new URL(payload.value);
2107
+ const orig = payload.value;
2108
+ const url$1 = new URL(orig);
2109
+ const href = url$1.href;
2096
2110
  if (def.hostname) {
2097
2111
  def.hostname.lastIndex = 0;
2098
2112
  if (!def.hostname.test(url$1.hostname)) {
@@ -2121,6 +2135,11 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
2121
2135
  });
2122
2136
  }
2123
2137
  }
2138
+ if (!orig.endsWith("/") && href.endsWith("/")) {
2139
+ payload.value = href.slice(0, -1);
2140
+ } else {
2141
+ payload.value = href;
2142
+ }
2124
2143
  return;
2125
2144
  } catch (_) {
2126
2145
  payload.issues.push({
@@ -2291,6 +2310,7 @@ function isValidJWT(token, algorithm = null) {
2291
2310
  const tokensParts = token.split(".");
2292
2311
  if (tokensParts.length !== 3) return false;
2293
2312
  const [header] = tokensParts;
2313
+ if (!header) return false;
2294
2314
  const parsedHeader = JSON.parse(atob(header));
2295
2315
  if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") return false;
2296
2316
  if (!parsedHeader.alg) return false;
@@ -2313,6 +2333,19 @@ const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
2313
2333
  });
2314
2334
  };
2315
2335
  });
2336
+ const $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringFormat", (inst, def) => {
2337
+ $ZodStringFormat.init(inst, def);
2338
+ inst._zod.check = (payload) => {
2339
+ if (def.fn(payload.value)) return;
2340
+ payload.issues.push({
2341
+ code: "invalid_format",
2342
+ format: def.format,
2343
+ input: payload.value,
2344
+ inst,
2345
+ continue: !def.abort
2346
+ });
2347
+ };
2348
+ });
2316
2349
  const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
2317
2350
  $ZodType.init(inst, def);
2318
2351
  inst._zod.pattern = inst._zod.bag.pattern ?? number$2;
@@ -2364,12 +2397,11 @@ const $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
2364
2397
  if (def.coerce) try {
2365
2398
  payload.value = BigInt(payload.value);
2366
2399
  } catch (_) {}
2367
- const { value: input } = payload;
2368
- if (typeof input === "bigint") return payload;
2400
+ if (typeof payload.value === "bigint") return payload;
2369
2401
  payload.issues.push({
2370
2402
  expected: "bigint",
2371
2403
  code: "invalid_type",
2372
- input,
2404
+ input: payload.value,
2373
2405
  inst
2374
2406
  });
2375
2407
  return payload;
@@ -2382,7 +2414,7 @@ const $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def)
2382
2414
  const $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => {
2383
2415
  $ZodType.init(inst, def);
2384
2416
  inst._zod.parse = (payload, _ctx) => {
2385
- const { value: input } = payload;
2417
+ const input = payload.value;
2386
2418
  if (typeof input === "symbol") return payload;
2387
2419
  payload.issues.push({
2388
2420
  expected: "symbol",
@@ -2397,8 +2429,10 @@ const $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def)
2397
2429
  $ZodType.init(inst, def);
2398
2430
  inst._zod.pattern = _undefined$2;
2399
2431
  inst._zod.values = new Set([undefined]);
2432
+ inst._zod.optin = "optional";
2433
+ inst._zod.optout = "optional";
2400
2434
  inst._zod.parse = (payload, _ctx) => {
2401
- const { value: input } = payload;
2435
+ const input = payload.value;
2402
2436
  if (typeof input === "undefined") return payload;
2403
2437
  payload.issues.push({
2404
2438
  expected: "undefined",
@@ -2414,7 +2448,7 @@ const $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
2414
2448
  inst._zod.pattern = _null$2;
2415
2449
  inst._zod.values = new Set([null]);
2416
2450
  inst._zod.parse = (payload, _ctx) => {
2417
- const { value: input } = payload;
2451
+ const input = payload.value;
2418
2452
  if (input === null) return payload;
2419
2453
  payload.issues.push({
2420
2454
  expected: "null",
@@ -2448,7 +2482,7 @@ const $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
2448
2482
  const $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => {
2449
2483
  $ZodType.init(inst, def);
2450
2484
  inst._zod.parse = (payload, _ctx) => {
2451
- const { value: input } = payload;
2485
+ const input = payload.value;
2452
2486
  if (typeof input === "undefined") return payload;
2453
2487
  payload.issues.push({
2454
2488
  expected: "void",
@@ -2579,19 +2613,20 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2579
2613
  "payload",
2580
2614
  "ctx"
2581
2615
  ]);
2582
- const { keys, optionalKeys: optionalKeys$1 } = _normalized.value;
2616
+ const normalized = _normalized.value;
2583
2617
  const parseStr = (key) => {
2584
2618
  const k = esc(key);
2585
2619
  return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
2586
2620
  };
2587
2621
  doc.write(`const input = payload.value;`);
2588
2622
  const ids = Object.create(null);
2589
- for (const key of keys) {
2590
- ids[key] = randomString(15);
2623
+ let counter = 0;
2624
+ for (const key of normalized.keys) {
2625
+ ids[key] = `key_${counter++}`;
2591
2626
  }
2592
2627
  doc.write(`const newResult = {}`);
2593
- for (const key of keys) {
2594
- if (optionalKeys$1.has(key)) {
2628
+ for (const key of normalized.keys) {
2629
+ if (normalized.optionalKeys.has(key)) {
2595
2630
  const id = ids[key];
2596
2631
  doc.write(`const ${id} = ${parseStr(key)};`);
2597
2632
  const k = esc(key);
@@ -2636,7 +2671,7 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2636
2671
  const jit = !globalConfig.jitless;
2637
2672
  const allowsEval$1 = allowsEval;
2638
2673
  const fastEnabled = jit && allowsEval$1.value;
2639
- const { catchall } = def;
2674
+ const catchall = def.catchall;
2640
2675
  let value;
2641
2676
  inst._zod.parse = (payload, ctx) => {
2642
2677
  value ?? (value = _normalized.value);
@@ -2666,12 +2701,10 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2666
2701
  const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
2667
2702
  if (r instanceof Promise) {
2668
2703
  proms.push(r.then((r$1) => isOptional ? handleOptionalObjectResult(r$1, payload, key, input) : handleObjectResult(r$1, payload, key)));
2704
+ } else if (isOptional) {
2705
+ handleOptionalObjectResult(r, payload, key, input);
2669
2706
  } else {
2670
- if (isOptional) {
2671
- handleOptionalObjectResult(r, payload, key, input);
2672
- } else {
2673
- handleObjectResult(r, payload, key);
2674
- }
2707
+ handleObjectResult(r, payload, key);
2675
2708
  }
2676
2709
  }
2677
2710
  }
@@ -2729,6 +2762,8 @@ function handleUnionResults(results, final, inst, ctx) {
2729
2762
  }
2730
2763
  const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
2731
2764
  $ZodType.init(inst, def);
2765
+ defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : undefined);
2766
+ defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined);
2732
2767
  defineLazy(inst._zod, "values", () => {
2733
2768
  if (def.options.every((o) => o._zod.values)) {
2734
2769
  return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
@@ -2828,7 +2863,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
2828
2863
  const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
2829
2864
  $ZodType.init(inst, def);
2830
2865
  inst._zod.parse = (payload, ctx) => {
2831
- const { value: input } = payload;
2866
+ const input = payload.value;
2832
2867
  const left = def.left._zod.run({
2833
2868
  value: input,
2834
2869
  issues: []
@@ -3285,6 +3320,9 @@ const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) =>
3285
3320
  return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : undefined;
3286
3321
  });
3287
3322
  inst._zod.parse = (payload, ctx) => {
3323
+ if (def.innerType._zod.optin === "optional") {
3324
+ return def.innerType._zod.run(payload, ctx);
3325
+ }
3288
3326
  if (payload.value === undefined) {
3289
3327
  return payload;
3290
3328
  }
@@ -3384,7 +3422,7 @@ const $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
3384
3422
  });
3385
3423
  const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
3386
3424
  $ZodType.init(inst, def);
3387
- defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
3425
+ inst._zod.optin = "optional";
3388
3426
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
3389
3427
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3390
3428
  inst._zod.parse = (payload, ctx) => {
@@ -3455,6 +3493,7 @@ function handlePipeResult(left, def, ctx) {
3455
3493
  const $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
3456
3494
  $ZodType.init(inst, def);
3457
3495
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
3496
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3458
3497
  defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
3459
3498
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
3460
3499
  inst._zod.parse = (payload, ctx) => {
@@ -3505,7 +3544,7 @@ const $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral",
3505
3544
  input: payload.value,
3506
3545
  inst,
3507
3546
  code: "invalid_format",
3508
- format: "template_literal",
3547
+ format: def.format ?? "template_literal",
3509
3548
  pattern: inst._zod.pattern.source
3510
3549
  });
3511
3550
  return payload;
@@ -3565,8 +3604,8 @@ function handleRefineResult(result, payload, input, inst) {
3565
3604
  }
3566
3605
 
3567
3606
  //#endregion
3568
- //#region ../../node_modules/zod/dist/esm/v4/locales/ar.js
3569
- const error$36 = () => {
3607
+ //#region ../../node_modules/zod/v4/locales/ar.js
3608
+ const error$38 = () => {
3570
3609
  const Sizable = {
3571
3610
  string: {
3572
3611
  unit: "حرف",
@@ -3588,7 +3627,7 @@ const error$36 = () => {
3588
3627
  function getSizing(origin) {
3589
3628
  return Sizable[origin] ?? null;
3590
3629
  }
3591
- const parsedType$2 = (data) => {
3630
+ const parsedType$3 = (data) => {
3592
3631
  const t = typeof data;
3593
3632
  switch (t) {
3594
3633
  case "number": {
@@ -3640,7 +3679,7 @@ const error$36 = () => {
3640
3679
  };
3641
3680
  return (issue$1) => {
3642
3681
  switch (issue$1.code) {
3643
- case "invalid_type": return `مدخلات غير مقبولة: يفترض إدخال ${issue$1.expected}، ولكن تم إدخال ${parsedType$2(issue$1.input)}`;
3682
+ case "invalid_type": return `مدخلات غير مقبولة: يفترض إدخال ${issue$1.expected}، ولكن تم إدخال ${parsedType$3(issue$1.input)}`;
3644
3683
  case "invalid_value":
3645
3684
  if (issue$1.values.length === 1) return `مدخلات غير مقبولة: يفترض إدخال ${stringifyPrimitive(issue$1.values[0])}`;
3646
3685
  return `اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${joinValues(issue$1.values, "|")}`;
@@ -3676,12 +3715,12 @@ const error$36 = () => {
3676
3715
  };
3677
3716
  };
3678
3717
  function ar_default() {
3679
- return { localeError: error$36() };
3718
+ return { localeError: error$38() };
3680
3719
  }
3681
3720
 
3682
3721
  //#endregion
3683
- //#region ../../node_modules/zod/dist/esm/v4/locales/az.js
3684
- const error$35 = () => {
3722
+ //#region ../../node_modules/zod/v4/locales/az.js
3723
+ const error$37 = () => {
3685
3724
  const Sizable = {
3686
3725
  string: {
3687
3726
  unit: "simvol",
@@ -3703,7 +3742,7 @@ const error$35 = () => {
3703
3742
  function getSizing(origin) {
3704
3743
  return Sizable[origin] ?? null;
3705
3744
  }
3706
- const parsedType$2 = (data) => {
3745
+ const parsedType$3 = (data) => {
3707
3746
  const t = typeof data;
3708
3747
  switch (t) {
3709
3748
  case "number": {
@@ -3755,7 +3794,7 @@ const error$35 = () => {
3755
3794
  };
3756
3795
  return (issue$1) => {
3757
3796
  switch (issue$1.code) {
3758
- case "invalid_type": return `Yanlış dəyər: gözlənilən ${issue$1.expected}, daxil olan ${parsedType$2(issue$1.input)}`;
3797
+ case "invalid_type": return `Yanlış dəyər: gözlənilən ${issue$1.expected}, daxil olan ${parsedType$3(issue$1.input)}`;
3759
3798
  case "invalid_value":
3760
3799
  if (issue$1.values.length === 1) return `Yanlış dəyər: gözlənilən ${stringifyPrimitive(issue$1.values[0])}`;
3761
3800
  return `Yanlış seçim: aşağıdakılardan biri olmalıdır: ${joinValues(issue$1.values, "|")}`;
@@ -3789,11 +3828,11 @@ const error$35 = () => {
3789
3828
  };
3790
3829
  };
3791
3830
  function az_default() {
3792
- return { localeError: error$35() };
3831
+ return { localeError: error$37() };
3793
3832
  }
3794
3833
 
3795
3834
  //#endregion
3796
- //#region ../../node_modules/zod/dist/esm/v4/locales/be.js
3835
+ //#region ../../node_modules/zod/v4/locales/be.js
3797
3836
  function getBelarusianPlural(count, one, few, many) {
3798
3837
  const absCount = Math.abs(count);
3799
3838
  const lastDigit = absCount % 10;
@@ -3809,7 +3848,7 @@ function getBelarusianPlural(count, one, few, many) {
3809
3848
  }
3810
3849
  return many;
3811
3850
  }
3812
- const error$34 = () => {
3851
+ const error$36 = () => {
3813
3852
  const Sizable = {
3814
3853
  string: {
3815
3854
  unit: {
@@ -3847,7 +3886,7 @@ const error$34 = () => {
3847
3886
  function getSizing(origin) {
3848
3887
  return Sizable[origin] ?? null;
3849
3888
  }
3850
- const parsedType$2 = (data) => {
3889
+ const parsedType$3 = (data) => {
3851
3890
  const t = typeof data;
3852
3891
  switch (t) {
3853
3892
  case "number": {
@@ -3899,7 +3938,7 @@ const error$34 = () => {
3899
3938
  };
3900
3939
  return (issue$1) => {
3901
3940
  switch (issue$1.code) {
3902
- case "invalid_type": return `Няправільны ўвод: чакаўся ${issue$1.expected}, атрымана ${parsedType$2(issue$1.input)}`;
3941
+ case "invalid_type": return `Няправільны ўвод: чакаўся ${issue$1.expected}, атрымана ${parsedType$3(issue$1.input)}`;
3903
3942
  case "invalid_value":
3904
3943
  if (issue$1.values.length === 1) return `Няправільны ўвод: чакалася ${stringifyPrimitive(issue$1.values[0])}`;
3905
3944
  return `Няправільны варыянт: чакаўся адзін з ${joinValues(issue$1.values, "|")}`;
@@ -3941,12 +3980,12 @@ const error$34 = () => {
3941
3980
  };
3942
3981
  };
3943
3982
  function be_default() {
3944
- return { localeError: error$34() };
3983
+ return { localeError: error$36() };
3945
3984
  }
3946
3985
 
3947
3986
  //#endregion
3948
- //#region ../../node_modules/zod/dist/esm/v4/locales/ca.js
3949
- const error$33 = () => {
3987
+ //#region ../../node_modules/zod/v4/locales/ca.js
3988
+ const error$35 = () => {
3950
3989
  const Sizable = {
3951
3990
  string: {
3952
3991
  unit: "caràcters",
@@ -3968,7 +4007,7 @@ const error$33 = () => {
3968
4007
  function getSizing(origin) {
3969
4008
  return Sizable[origin] ?? null;
3970
4009
  }
3971
- const parsedType$2 = (data) => {
4010
+ const parsedType$3 = (data) => {
3972
4011
  const t = typeof data;
3973
4012
  switch (t) {
3974
4013
  case "number": {
@@ -4020,7 +4059,7 @@ const error$33 = () => {
4020
4059
  };
4021
4060
  return (issue$1) => {
4022
4061
  switch (issue$1.code) {
4023
- case "invalid_type": return `Tipus invàlid: s'esperava ${issue$1.expected}, s'ha rebut ${parsedType$2(issue$1.input)}`;
4062
+ case "invalid_type": return `Tipus invàlid: s'esperava ${issue$1.expected}, s'ha rebut ${parsedType$3(issue$1.input)}`;
4024
4063
  case "invalid_value":
4025
4064
  if (issue$1.values.length === 1) return `Valor invàlid: s'esperava ${stringifyPrimitive(issue$1.values[0])}`;
4026
4065
  return `Opció invàlida: s'esperava una de ${joinValues(issue$1.values, " o ")}`;
@@ -4058,12 +4097,12 @@ const error$33 = () => {
4058
4097
  };
4059
4098
  };
4060
4099
  function ca_default() {
4061
- return { localeError: error$33() };
4100
+ return { localeError: error$35() };
4062
4101
  }
4063
4102
 
4064
4103
  //#endregion
4065
- //#region ../../node_modules/zod/dist/esm/v4/locales/cs.js
4066
- const error$32 = () => {
4104
+ //#region ../../node_modules/zod/v4/locales/cs.js
4105
+ const error$34 = () => {
4067
4106
  const Sizable = {
4068
4107
  string: {
4069
4108
  unit: "znaků",
@@ -4085,7 +4124,7 @@ const error$32 = () => {
4085
4124
  function getSizing(origin) {
4086
4125
  return Sizable[origin] ?? null;
4087
4126
  }
4088
- const parsedType$2 = (data) => {
4127
+ const parsedType$3 = (data) => {
4089
4128
  const t = typeof data;
4090
4129
  switch (t) {
4091
4130
  case "number": {
@@ -4155,7 +4194,7 @@ const error$32 = () => {
4155
4194
  };
4156
4195
  return (issue$1) => {
4157
4196
  switch (issue$1.code) {
4158
- case "invalid_type": return `Neplatný vstup: očekáváno ${issue$1.expected}, obdrženo ${parsedType$2(issue$1.input)}`;
4197
+ case "invalid_type": return `Neplatný vstup: očekáváno ${issue$1.expected}, obdrženo ${parsedType$3(issue$1.input)}`;
4159
4198
  case "invalid_value":
4160
4199
  if (issue$1.values.length === 1) return `Neplatný vstup: očekáváno ${stringifyPrimitive(issue$1.values[0])}`;
4161
4200
  return `Neplatná možnost: očekávána jedna z hodnot ${joinValues(issue$1.values, "|")}`;
@@ -4193,12 +4232,12 @@ const error$32 = () => {
4193
4232
  };
4194
4233
  };
4195
4234
  function cs_default() {
4196
- return { localeError: error$32() };
4235
+ return { localeError: error$34() };
4197
4236
  }
4198
4237
 
4199
4238
  //#endregion
4200
- //#region ../../node_modules/zod/dist/esm/v4/locales/de.js
4201
- const error$31 = () => {
4239
+ //#region ../../node_modules/zod/v4/locales/de.js
4240
+ const error$33 = () => {
4202
4241
  const Sizable = {
4203
4242
  string: {
4204
4243
  unit: "Zeichen",
@@ -4220,7 +4259,7 @@ const error$31 = () => {
4220
4259
  function getSizing(origin) {
4221
4260
  return Sizable[origin] ?? null;
4222
4261
  }
4223
- const parsedType$2 = (data) => {
4262
+ const parsedType$3 = (data) => {
4224
4263
  const t = typeof data;
4225
4264
  switch (t) {
4226
4265
  case "number": {
@@ -4272,7 +4311,7 @@ const error$31 = () => {
4272
4311
  };
4273
4312
  return (issue$1) => {
4274
4313
  switch (issue$1.code) {
4275
- case "invalid_type": return `Ungültige Eingabe: erwartet ${issue$1.expected}, erhalten ${parsedType$2(issue$1.input)}`;
4314
+ case "invalid_type": return `Ungültige Eingabe: erwartet ${issue$1.expected}, erhalten ${parsedType$3(issue$1.input)}`;
4276
4315
  case "invalid_value":
4277
4316
  if (issue$1.values.length === 1) return `Ungültige Eingabe: erwartet ${stringifyPrimitive(issue$1.values[0])}`;
4278
4317
  return `Ungültige Option: erwartet eine von ${joinValues(issue$1.values, "|")}`;
@@ -4308,12 +4347,12 @@ const error$31 = () => {
4308
4347
  };
4309
4348
  };
4310
4349
  function de_default() {
4311
- return { localeError: error$31() };
4350
+ return { localeError: error$33() };
4312
4351
  }
4313
4352
 
4314
4353
  //#endregion
4315
- //#region ../../node_modules/zod/dist/esm/v4/locales/en.js
4316
- const parsedType$1 = (data) => {
4354
+ //#region ../../node_modules/zod/v4/locales/en.js
4355
+ const parsedType$2 = (data) => {
4317
4356
  const t = typeof data;
4318
4357
  switch (t) {
4319
4358
  case "number": {
@@ -4333,7 +4372,7 @@ const parsedType$1 = (data) => {
4333
4372
  }
4334
4373
  return t;
4335
4374
  };
4336
- const error$30 = () => {
4375
+ const error$32 = () => {
4337
4376
  const Sizable = {
4338
4377
  string: {
4339
4378
  unit: "characters",
@@ -4387,7 +4426,7 @@ const error$30 = () => {
4387
4426
  };
4388
4427
  return (issue$1) => {
4389
4428
  switch (issue$1.code) {
4390
- case "invalid_type": return `Invalid input: expected ${issue$1.expected}, received ${parsedType$1(issue$1.input)}`;
4429
+ case "invalid_type": return `Invalid input: expected ${issue$1.expected}, received ${parsedType$2(issue$1.input)}`;
4391
4430
  case "invalid_value":
4392
4431
  if (issue$1.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue$1.values[0])}`;
4393
4432
  return `Invalid option: expected one of ${joinValues(issue$1.values, "|")}`;
@@ -4425,12 +4464,127 @@ const error$30 = () => {
4425
4464
  };
4426
4465
  };
4427
4466
  function en_default() {
4428
- return { localeError: error$30() };
4467
+ return { localeError: error$32() };
4429
4468
  }
4430
4469
 
4431
4470
  //#endregion
4432
- //#region ../../node_modules/zod/dist/esm/v4/locales/es.js
4433
- const error$29 = () => {
4471
+ //#region ../../node_modules/zod/v4/locales/eo.js
4472
+ const parsedType$1 = (data) => {
4473
+ const t = typeof data;
4474
+ switch (t) {
4475
+ case "number": {
4476
+ return Number.isNaN(data) ? "NaN" : "nombro";
4477
+ }
4478
+ case "object": {
4479
+ if (Array.isArray(data)) {
4480
+ return "tabelo";
4481
+ }
4482
+ if (data === null) {
4483
+ return "senvalora";
4484
+ }
4485
+ if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
4486
+ return data.constructor.name;
4487
+ }
4488
+ }
4489
+ }
4490
+ return t;
4491
+ };
4492
+ const error$31 = () => {
4493
+ const Sizable = {
4494
+ string: {
4495
+ unit: "karaktrojn",
4496
+ verb: "havi"
4497
+ },
4498
+ file: {
4499
+ unit: "bajtojn",
4500
+ verb: "havi"
4501
+ },
4502
+ array: {
4503
+ unit: "elementojn",
4504
+ verb: "havi"
4505
+ },
4506
+ set: {
4507
+ unit: "elementojn",
4508
+ verb: "havi"
4509
+ }
4510
+ };
4511
+ function getSizing(origin) {
4512
+ return Sizable[origin] ?? null;
4513
+ }
4514
+ const Nouns = {
4515
+ regex: "enigo",
4516
+ email: "retadreso",
4517
+ url: "URL",
4518
+ emoji: "emoĝio",
4519
+ uuid: "UUID",
4520
+ uuidv4: "UUIDv4",
4521
+ uuidv6: "UUIDv6",
4522
+ nanoid: "nanoid",
4523
+ guid: "GUID",
4524
+ cuid: "cuid",
4525
+ cuid2: "cuid2",
4526
+ ulid: "ULID",
4527
+ xid: "XID",
4528
+ ksuid: "KSUID",
4529
+ datetime: "ISO-datotempo",
4530
+ date: "ISO-dato",
4531
+ time: "ISO-tempo",
4532
+ duration: "ISO-daŭro",
4533
+ ipv4: "IPv4-adreso",
4534
+ ipv6: "IPv6-adreso",
4535
+ cidrv4: "IPv4-rango",
4536
+ cidrv6: "IPv6-rango",
4537
+ base64: "64-ume kodita karaktraro",
4538
+ base64url: "URL-64-ume kodita karaktraro",
4539
+ json_string: "JSON-karaktraro",
4540
+ e164: "E.164-nombro",
4541
+ jwt: "JWT",
4542
+ template_literal: "enigo"
4543
+ };
4544
+ return (issue$1) => {
4545
+ switch (issue$1.code) {
4546
+ case "invalid_type": return `Nevalida enigo: atendiĝis ${issue$1.expected}, riceviĝis ${parsedType$1(issue$1.input)}`;
4547
+ case "invalid_value":
4548
+ if (issue$1.values.length === 1) return `Nevalida enigo: atendiĝis ${stringifyPrimitive(issue$1.values[0])}`;
4549
+ return `Nevalida opcio: atendiĝis unu el ${joinValues(issue$1.values, "|")}`;
4550
+ case "too_big": {
4551
+ const adj = issue$1.inclusive ? "<=" : "<";
4552
+ const sizing = getSizing(issue$1.origin);
4553
+ if (sizing) return `Tro granda: atendiĝis ke ${issue$1.origin ?? "valoro"} havu ${adj}${issue$1.maximum.toString()} ${sizing.unit ?? "elementojn"}`;
4554
+ return `Tro granda: atendiĝis ke ${issue$1.origin ?? "valoro"} havu ${adj}${issue$1.maximum.toString()}`;
4555
+ }
4556
+ case "too_small": {
4557
+ const adj = issue$1.inclusive ? ">=" : ">";
4558
+ const sizing = getSizing(issue$1.origin);
4559
+ if (sizing) {
4560
+ return `Tro malgranda: atendiĝis ke ${issue$1.origin} havu ${adj}${issue$1.minimum.toString()} ${sizing.unit}`;
4561
+ }
4562
+ return `Tro malgranda: atendiĝis ke ${issue$1.origin} estu ${adj}${issue$1.minimum.toString()}`;
4563
+ }
4564
+ case "invalid_format": {
4565
+ const _issue = issue$1;
4566
+ if (_issue.format === "starts_with") return `Nevalida karaktraro: devas komenciĝi per "${_issue.prefix}"`;
4567
+ if (_issue.format === "ends_with") return `Nevalida karaktraro: devas finiĝi per "${_issue.suffix}"`;
4568
+ if (_issue.format === "includes") return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`;
4569
+ if (_issue.format === "regex") return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;
4570
+ return `Nevalida ${Nouns[_issue.format] ?? issue$1.format}`;
4571
+ }
4572
+ case "not_multiple_of": return `Nevalida nombro: devas esti oblo de ${issue$1.divisor}`;
4573
+ case "unrecognized_keys": return `Nekonata${issue$1.keys.length > 1 ? "j" : ""} ŝlosilo${issue$1.keys.length > 1 ? "j" : ""}: ${joinValues(issue$1.keys, ", ")}`;
4574
+ case "invalid_key": return `Nevalida ŝlosilo en ${issue$1.origin}`;
4575
+ case "invalid_union": return "Nevalida enigo";
4576
+ case "invalid_element": return `Nevalida valoro en ${issue$1.origin}`;
4577
+ default: return `Nevalida enigo`;
4578
+ }
4579
+ };
4580
+ };
4581
+ function eo_default() {
4582
+ return { localeError: error$31() };
4583
+ }
4584
+
4585
+ //#endregion
4586
+ //#region ../../node_modules/zod/v4/locales/es.js
4587
+ const error$30 = () => {
4434
4588
  const Sizable = {
4435
4589
  string: {
4436
4590
  unit: "caracteres",
@@ -4452,7 +4606,7 @@ const error$29 = () => {
4452
4606
  function getSizing(origin) {
4453
4607
  return Sizable[origin] ?? null;
4454
4608
  }
4455
- const parsedType$2 = (data) => {
4609
+ const parsedType$3 = (data) => {
4456
4610
  const t = typeof data;
4457
4611
  switch (t) {
4458
4612
  case "number": {
@@ -4504,7 +4658,7 @@ const error$29 = () => {
4504
4658
  };
4505
4659
  return (issue$1) => {
4506
4660
  switch (issue$1.code) {
4507
- case "invalid_type": return `Entrada inválida: se esperaba ${issue$1.expected}, recibido ${parsedType$2(issue$1.input)}`;
4661
+ case "invalid_type": return `Entrada inválida: se esperaba ${issue$1.expected}, recibido ${parsedType$3(issue$1.input)}`;
4508
4662
  case "invalid_value":
4509
4663
  if (issue$1.values.length === 1) return `Entrada inválida: se esperaba ${stringifyPrimitive(issue$1.values[0])}`;
4510
4664
  return `Opción inválida: se esperaba una de ${joinValues(issue$1.values, "|")}`;
@@ -4540,12 +4694,12 @@ const error$29 = () => {
4540
4694
  };
4541
4695
  };
4542
4696
  function es_default() {
4543
- return { localeError: error$29() };
4697
+ return { localeError: error$30() };
4544
4698
  }
4545
4699
 
4546
4700
  //#endregion
4547
- //#region ../../node_modules/zod/dist/esm/v4/locales/fa.js
4548
- const error$28 = () => {
4701
+ //#region ../../node_modules/zod/v4/locales/fa.js
4702
+ const error$29 = () => {
4549
4703
  const Sizable = {
4550
4704
  string: {
4551
4705
  unit: "کاراکتر",
@@ -4567,7 +4721,7 @@ const error$28 = () => {
4567
4721
  function getSizing(origin) {
4568
4722
  return Sizable[origin] ?? null;
4569
4723
  }
4570
- const parsedType$2 = (data) => {
4724
+ const parsedType$3 = (data) => {
4571
4725
  const t = typeof data;
4572
4726
  switch (t) {
4573
4727
  case "number": {
@@ -4619,7 +4773,7 @@ const error$28 = () => {
4619
4773
  };
4620
4774
  return (issue$1) => {
4621
4775
  switch (issue$1.code) {
4622
- case "invalid_type": return `ورودی نامعتبر: می‌بایست ${issue$1.expected} می‌بود، ${parsedType$2(issue$1.input)} دریافت شد`;
4776
+ case "invalid_type": return `ورودی نامعتبر: می‌بایست ${issue$1.expected} می‌بود، ${parsedType$3(issue$1.input)} دریافت شد`;
4623
4777
  case "invalid_value":
4624
4778
  if (issue$1.values.length === 1) {
4625
4779
  return `ورودی نامعتبر: می‌بایست ${stringifyPrimitive(issue$1.values[0])} می‌بود`;
@@ -4667,12 +4821,12 @@ const error$28 = () => {
4667
4821
  };
4668
4822
  };
4669
4823
  function fa_default() {
4670
- return { localeError: error$28() };
4824
+ return { localeError: error$29() };
4671
4825
  }
4672
4826
 
4673
4827
  //#endregion
4674
- //#region ../../node_modules/zod/dist/esm/v4/locales/fi.js
4675
- const error$27 = () => {
4828
+ //#region ../../node_modules/zod/v4/locales/fi.js
4829
+ const error$28 = () => {
4676
4830
  const Sizable = {
4677
4831
  string: {
4678
4832
  unit: "merkkiä",
@@ -4710,7 +4864,7 @@ const error$27 = () => {
4710
4864
  function getSizing(origin) {
4711
4865
  return Sizable[origin] ?? null;
4712
4866
  }
4713
- const parsedType$2 = (data) => {
4867
+ const parsedType$3 = (data) => {
4714
4868
  const t = typeof data;
4715
4869
  switch (t) {
4716
4870
  case "number": {
@@ -4762,7 +4916,7 @@ const error$27 = () => {
4762
4916
  };
4763
4917
  return (issue$1) => {
4764
4918
  switch (issue$1.code) {
4765
- case "invalid_type": return `Virheellinen tyyppi: odotettiin ${issue$1.expected}, oli ${parsedType$2(issue$1.input)}`;
4919
+ case "invalid_type": return `Virheellinen tyyppi: odotettiin ${issue$1.expected}, oli ${parsedType$3(issue$1.input)}`;
4766
4920
  case "invalid_value":
4767
4921
  if (issue$1.values.length === 1) return `Virheellinen syöte: täytyy olla ${stringifyPrimitive(issue$1.values[0])}`;
4768
4922
  return `Virheellinen valinta: täytyy olla yksi seuraavista: ${joinValues(issue$1.values, "|")}`;
@@ -4802,12 +4956,12 @@ const error$27 = () => {
4802
4956
  };
4803
4957
  };
4804
4958
  function fi_default() {
4805
- return { localeError: error$27() };
4959
+ return { localeError: error$28() };
4806
4960
  }
4807
4961
 
4808
4962
  //#endregion
4809
- //#region ../../node_modules/zod/dist/esm/v4/locales/fr.js
4810
- const error$26 = () => {
4963
+ //#region ../../node_modules/zod/v4/locales/fr.js
4964
+ const error$27 = () => {
4811
4965
  const Sizable = {
4812
4966
  string: {
4813
4967
  unit: "caractères",
@@ -4829,7 +4983,7 @@ const error$26 = () => {
4829
4983
  function getSizing(origin) {
4830
4984
  return Sizable[origin] ?? null;
4831
4985
  }
4832
- const parsedType$2 = (data) => {
4986
+ const parsedType$3 = (data) => {
4833
4987
  const t = typeof data;
4834
4988
  switch (t) {
4835
4989
  case "number": {
@@ -4881,7 +5035,7 @@ const error$26 = () => {
4881
5035
  };
4882
5036
  return (issue$1) => {
4883
5037
  switch (issue$1.code) {
4884
- case "invalid_type": return `Entrée invalide : ${issue$1.expected} attendu, ${parsedType$2(issue$1.input)} reçu`;
5038
+ case "invalid_type": return `Entrée invalide : ${issue$1.expected} attendu, ${parsedType$3(issue$1.input)} reçu`;
4885
5039
  case "invalid_value":
4886
5040
  if (issue$1.values.length === 1) return `Entrée invalide : ${stringifyPrimitive(issue$1.values[0])} attendu`;
4887
5041
  return `Option invalide : une valeur parmi ${joinValues(issue$1.values, "|")} attendue`;
@@ -4917,12 +5071,12 @@ const error$26 = () => {
4917
5071
  };
4918
5072
  };
4919
5073
  function fr_default() {
4920
- return { localeError: error$26() };
5074
+ return { localeError: error$27() };
4921
5075
  }
4922
5076
 
4923
5077
  //#endregion
4924
- //#region ../../node_modules/zod/dist/esm/v4/locales/fr-CA.js
4925
- const error$25 = () => {
5078
+ //#region ../../node_modules/zod/v4/locales/fr-CA.js
5079
+ const error$26 = () => {
4926
5080
  const Sizable = {
4927
5081
  string: {
4928
5082
  unit: "caractères",
@@ -4944,7 +5098,7 @@ const error$25 = () => {
4944
5098
  function getSizing(origin) {
4945
5099
  return Sizable[origin] ?? null;
4946
5100
  }
4947
- const parsedType$2 = (data) => {
5101
+ const parsedType$3 = (data) => {
4948
5102
  const t = typeof data;
4949
5103
  switch (t) {
4950
5104
  case "number": {
@@ -4996,7 +5150,7 @@ const error$25 = () => {
4996
5150
  };
4997
5151
  return (issue$1) => {
4998
5152
  switch (issue$1.code) {
4999
- case "invalid_type": return `Entrée invalide : attendu ${issue$1.expected}, reçu ${parsedType$2(issue$1.input)}`;
5153
+ case "invalid_type": return `Entrée invalide : attendu ${issue$1.expected}, reçu ${parsedType$3(issue$1.input)}`;
5000
5154
  case "invalid_value":
5001
5155
  if (issue$1.values.length === 1) return `Entrée invalide : attendu ${stringifyPrimitive(issue$1.values[0])}`;
5002
5156
  return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue$1.values, "|")}`;
@@ -5034,12 +5188,12 @@ const error$25 = () => {
5034
5188
  };
5035
5189
  };
5036
5190
  function fr_CA_default() {
5037
- return { localeError: error$25() };
5191
+ return { localeError: error$26() };
5038
5192
  }
5039
5193
 
5040
5194
  //#endregion
5041
- //#region ../../node_modules/zod/dist/esm/v4/locales/he.js
5042
- const error$24 = () => {
5195
+ //#region ../../node_modules/zod/v4/locales/he.js
5196
+ const error$25 = () => {
5043
5197
  const Sizable = {
5044
5198
  string: {
5045
5199
  unit: "אותיות",
@@ -5061,7 +5215,7 @@ const error$24 = () => {
5061
5215
  function getSizing(origin) {
5062
5216
  return Sizable[origin] ?? null;
5063
5217
  }
5064
- const parsedType$2 = (data) => {
5218
+ const parsedType$3 = (data) => {
5065
5219
  const t = typeof data;
5066
5220
  switch (t) {
5067
5221
  case "number": {
@@ -5113,7 +5267,7 @@ const error$24 = () => {
5113
5267
  };
5114
5268
  return (issue$1) => {
5115
5269
  switch (issue$1.code) {
5116
- case "invalid_type": return `קלט לא תקין: צריך ${issue$1.expected}, התקבל ${parsedType$2(issue$1.input)}`;
5270
+ case "invalid_type": return `קלט לא תקין: צריך ${issue$1.expected}, התקבל ${parsedType$3(issue$1.input)}`;
5117
5271
  case "invalid_value":
5118
5272
  if (issue$1.values.length === 1) return `קלט לא תקין: צריך ${stringifyPrimitive(issue$1.values[0])}`;
5119
5273
  return `קלט לא תקין: צריך אחת מהאפשרויות ${joinValues(issue$1.values, "|")}`;
@@ -5149,12 +5303,12 @@ const error$24 = () => {
5149
5303
  };
5150
5304
  };
5151
5305
  function he_default() {
5152
- return { localeError: error$24() };
5306
+ return { localeError: error$25() };
5153
5307
  }
5154
5308
 
5155
5309
  //#endregion
5156
- //#region ../../node_modules/zod/dist/esm/v4/locales/hu.js
5157
- const error$23 = () => {
5310
+ //#region ../../node_modules/zod/v4/locales/hu.js
5311
+ const error$24 = () => {
5158
5312
  const Sizable = {
5159
5313
  string: {
5160
5314
  unit: "karakter",
@@ -5176,7 +5330,7 @@ const error$23 = () => {
5176
5330
  function getSizing(origin) {
5177
5331
  return Sizable[origin] ?? null;
5178
5332
  }
5179
- const parsedType$2 = (data) => {
5333
+ const parsedType$3 = (data) => {
5180
5334
  const t = typeof data;
5181
5335
  switch (t) {
5182
5336
  case "number": {
@@ -5228,7 +5382,7 @@ const error$23 = () => {
5228
5382
  };
5229
5383
  return (issue$1) => {
5230
5384
  switch (issue$1.code) {
5231
- case "invalid_type": return `Érvénytelen bemenet: a várt érték ${issue$1.expected}, a kapott érték ${parsedType$2(issue$1.input)}`;
5385
+ case "invalid_type": return `Érvénytelen bemenet: a várt érték ${issue$1.expected}, a kapott érték ${parsedType$3(issue$1.input)}`;
5232
5386
  case "invalid_value":
5233
5387
  if (issue$1.values.length === 1) return `Érvénytelen bemenet: a várt érték ${stringifyPrimitive(issue$1.values[0])}`;
5234
5388
  return `Érvénytelen opció: valamelyik érték várt ${joinValues(issue$1.values, "|")}`;
@@ -5264,12 +5418,12 @@ const error$23 = () => {
5264
5418
  };
5265
5419
  };
5266
5420
  function hu_default() {
5267
- return { localeError: error$23() };
5421
+ return { localeError: error$24() };
5268
5422
  }
5269
5423
 
5270
5424
  //#endregion
5271
- //#region ../../node_modules/zod/dist/esm/v4/locales/id.js
5272
- const error$22 = () => {
5425
+ //#region ../../node_modules/zod/v4/locales/id.js
5426
+ const error$23 = () => {
5273
5427
  const Sizable = {
5274
5428
  string: {
5275
5429
  unit: "karakter",
@@ -5291,7 +5445,7 @@ const error$22 = () => {
5291
5445
  function getSizing(origin) {
5292
5446
  return Sizable[origin] ?? null;
5293
5447
  }
5294
- const parsedType$2 = (data) => {
5448
+ const parsedType$3 = (data) => {
5295
5449
  const t = typeof data;
5296
5450
  switch (t) {
5297
5451
  case "number": {
@@ -5343,7 +5497,7 @@ const error$22 = () => {
5343
5497
  };
5344
5498
  return (issue$1) => {
5345
5499
  switch (issue$1.code) {
5346
- case "invalid_type": return `Input tidak valid: diharapkan ${issue$1.expected}, diterima ${parsedType$2(issue$1.input)}`;
5500
+ case "invalid_type": return `Input tidak valid: diharapkan ${issue$1.expected}, diterima ${parsedType$3(issue$1.input)}`;
5347
5501
  case "invalid_value":
5348
5502
  if (issue$1.values.length === 1) return `Input tidak valid: diharapkan ${stringifyPrimitive(issue$1.values[0])}`;
5349
5503
  return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue$1.values, "|")}`;
@@ -5379,12 +5533,12 @@ const error$22 = () => {
5379
5533
  };
5380
5534
  };
5381
5535
  function id_default() {
5382
- return { localeError: error$22() };
5536
+ return { localeError: error$23() };
5383
5537
  }
5384
5538
 
5385
5539
  //#endregion
5386
- //#region ../../node_modules/zod/dist/esm/v4/locales/it.js
5387
- const error$21 = () => {
5540
+ //#region ../../node_modules/zod/v4/locales/it.js
5541
+ const error$22 = () => {
5388
5542
  const Sizable = {
5389
5543
  string: {
5390
5544
  unit: "caratteri",
@@ -5406,7 +5560,7 @@ const error$21 = () => {
5406
5560
  function getSizing(origin) {
5407
5561
  return Sizable[origin] ?? null;
5408
5562
  }
5409
- const parsedType$2 = (data) => {
5563
+ const parsedType$3 = (data) => {
5410
5564
  const t = typeof data;
5411
5565
  switch (t) {
5412
5566
  case "number": {
@@ -5458,7 +5612,7 @@ const error$21 = () => {
5458
5612
  };
5459
5613
  return (issue$1) => {
5460
5614
  switch (issue$1.code) {
5461
- case "invalid_type": return `Input non valido: atteso ${issue$1.expected}, ricevuto ${parsedType$2(issue$1.input)}`;
5615
+ case "invalid_type": return `Input non valido: atteso ${issue$1.expected}, ricevuto ${parsedType$3(issue$1.input)}`;
5462
5616
  case "invalid_value":
5463
5617
  if (issue$1.values.length === 1) return `Input non valido: atteso ${stringifyPrimitive(issue$1.values[0])}`;
5464
5618
  return `Opzione non valida: atteso uno tra ${joinValues(issue$1.values, "|")}`;
@@ -5494,12 +5648,12 @@ const error$21 = () => {
5494
5648
  };
5495
5649
  };
5496
5650
  function it_default() {
5497
- return { localeError: error$21() };
5651
+ return { localeError: error$22() };
5498
5652
  }
5499
5653
 
5500
5654
  //#endregion
5501
- //#region ../../node_modules/zod/dist/esm/v4/locales/ja.js
5502
- const error$20 = () => {
5655
+ //#region ../../node_modules/zod/v4/locales/ja.js
5656
+ const error$21 = () => {
5503
5657
  const Sizable = {
5504
5658
  string: {
5505
5659
  unit: "文字",
@@ -5521,7 +5675,7 @@ const error$20 = () => {
5521
5675
  function getSizing(origin) {
5522
5676
  return Sizable[origin] ?? null;
5523
5677
  }
5524
- const parsedType$2 = (data) => {
5678
+ const parsedType$3 = (data) => {
5525
5679
  const t = typeof data;
5526
5680
  switch (t) {
5527
5681
  case "number": {
@@ -5573,21 +5727,21 @@ const error$20 = () => {
5573
5727
  };
5574
5728
  return (issue$1) => {
5575
5729
  switch (issue$1.code) {
5576
- case "invalid_type": return `無効な入力: ${issue$1.expected}が期待されましたが、${parsedType$2(issue$1.input)}が入力されました`;
5730
+ case "invalid_type": return `無効な入力: ${issue$1.expected}が期待されましたが、${parsedType$3(issue$1.input)}が入力されました`;
5577
5731
  case "invalid_value":
5578
5732
  if (issue$1.values.length === 1) return `無効な入力: ${stringifyPrimitive(issue$1.values[0])}が期待されました`;
5579
5733
  return `無効な選択: ${joinValues(issue$1.values, "、")}のいずれかである必要があります`;
5580
5734
  case "too_big": {
5581
- const adj = issue$1.inclusive ? "<=" : "<";
5735
+ const adj = issue$1.inclusive ? "以下である" : "より小さい";
5582
5736
  const sizing = getSizing(issue$1.origin);
5583
- if (sizing) return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${sizing.unit ?? "要素"}${adj}である必要があります`;
5584
- return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${adj}である必要があります`;
5737
+ if (sizing) return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${sizing.unit ?? "要素"}${adj}必要があります`;
5738
+ return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${adj}必要があります`;
5585
5739
  }
5586
5740
  case "too_small": {
5587
- const adj = issue$1.inclusive ? ">=" : ">";
5741
+ const adj = issue$1.inclusive ? "以上である" : "より大きい";
5588
5742
  const sizing = getSizing(issue$1.origin);
5589
- if (sizing) return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${sizing.unit}${adj}である必要があります`;
5590
- return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${adj}である必要があります`;
5743
+ if (sizing) return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${sizing.unit}${adj}必要があります`;
5744
+ return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${adj}必要があります`;
5591
5745
  }
5592
5746
  case "invalid_format": {
5593
5747
  const _issue = issue$1;
@@ -5607,12 +5761,12 @@ const error$20 = () => {
5607
5761
  };
5608
5762
  };
5609
5763
  function ja_default() {
5610
- return { localeError: error$20() };
5764
+ return { localeError: error$21() };
5611
5765
  }
5612
5766
 
5613
5767
  //#endregion
5614
- //#region ../../node_modules/zod/dist/esm/v4/locales/kh.js
5615
- const error$19 = () => {
5768
+ //#region ../../node_modules/zod/v4/locales/kh.js
5769
+ const error$20 = () => {
5616
5770
  const Sizable = {
5617
5771
  string: {
5618
5772
  unit: "តួអក្សរ",
@@ -5634,7 +5788,7 @@ const error$19 = () => {
5634
5788
  function getSizing(origin) {
5635
5789
  return Sizable[origin] ?? null;
5636
5790
  }
5637
- const parsedType$2 = (data) => {
5791
+ const parsedType$3 = (data) => {
5638
5792
  const t = typeof data;
5639
5793
  switch (t) {
5640
5794
  case "number": {
@@ -5686,7 +5840,7 @@ const error$19 = () => {
5686
5840
  };
5687
5841
  return (issue$1) => {
5688
5842
  switch (issue$1.code) {
5689
- case "invalid_type": return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue$1.expected} ប៉ុន្តែទទួលបាន ${parsedType$2(issue$1.input)}`;
5843
+ case "invalid_type": return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue$1.expected} ប៉ុន្តែទទួលបាន ${parsedType$3(issue$1.input)}`;
5690
5844
  case "invalid_value":
5691
5845
  if (issue$1.values.length === 1) return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${stringifyPrimitive(issue$1.values[0])}`;
5692
5846
  return `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${joinValues(issue$1.values, "|")}`;
@@ -5724,12 +5878,12 @@ const error$19 = () => {
5724
5878
  };
5725
5879
  };
5726
5880
  function kh_default() {
5727
- return { localeError: error$19() };
5881
+ return { localeError: error$20() };
5728
5882
  }
5729
5883
 
5730
5884
  //#endregion
5731
- //#region ../../node_modules/zod/dist/esm/v4/locales/ko.js
5732
- const error$18 = () => {
5885
+ //#region ../../node_modules/zod/v4/locales/ko.js
5886
+ const error$19 = () => {
5733
5887
  const Sizable = {
5734
5888
  string: {
5735
5889
  unit: "문자",
@@ -5751,7 +5905,7 @@ const error$18 = () => {
5751
5905
  function getSizing(origin) {
5752
5906
  return Sizable[origin] ?? null;
5753
5907
  }
5754
- const parsedType$2 = (data) => {
5908
+ const parsedType$3 = (data) => {
5755
5909
  const t = typeof data;
5756
5910
  switch (t) {
5757
5911
  case "number": {
@@ -5803,7 +5957,7 @@ const error$18 = () => {
5803
5957
  };
5804
5958
  return (issue$1) => {
5805
5959
  switch (issue$1.code) {
5806
- case "invalid_type": return `잘못된 입력: 예상 타입은 ${issue$1.expected}, 받은 타입은 ${parsedType$2(issue$1.input)}입니다`;
5960
+ case "invalid_type": return `잘못된 입력: 예상 타입은 ${issue$1.expected}, 받은 타입은 ${parsedType$3(issue$1.input)}입니다`;
5807
5961
  case "invalid_value":
5808
5962
  if (issue$1.values.length === 1) return `잘못된 입력: 값은 ${stringifyPrimitive(issue$1.values[0])} 이어야 합니다`;
5809
5963
  return `잘못된 옵션: ${joinValues(issue$1.values, "또는 ")} 중 하나여야 합니다`;
@@ -5845,12 +5999,12 @@ const error$18 = () => {
5845
5999
  };
5846
6000
  };
5847
6001
  function ko_default() {
5848
- return { localeError: error$18() };
6002
+ return { localeError: error$19() };
5849
6003
  }
5850
6004
 
5851
6005
  //#endregion
5852
- //#region ../../node_modules/zod/dist/esm/v4/locales/mk.js
5853
- const error$17 = () => {
6006
+ //#region ../../node_modules/zod/v4/locales/mk.js
6007
+ const error$18 = () => {
5854
6008
  const Sizable = {
5855
6009
  string: {
5856
6010
  unit: "знаци",
@@ -5872,7 +6026,7 @@ const error$17 = () => {
5872
6026
  function getSizing(origin) {
5873
6027
  return Sizable[origin] ?? null;
5874
6028
  }
5875
- const parsedType$2 = (data) => {
6029
+ const parsedType$3 = (data) => {
5876
6030
  const t = typeof data;
5877
6031
  switch (t) {
5878
6032
  case "number": {
@@ -5924,7 +6078,7 @@ const error$17 = () => {
5924
6078
  };
5925
6079
  return (issue$1) => {
5926
6080
  switch (issue$1.code) {
5927
- case "invalid_type": return `Грешен внес: се очекува ${issue$1.expected}, примено ${parsedType$2(issue$1.input)}`;
6081
+ case "invalid_type": return `Грешен внес: се очекува ${issue$1.expected}, примено ${parsedType$3(issue$1.input)}`;
5928
6082
  case "invalid_value":
5929
6083
  if (issue$1.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue$1.values[0])}`;
5930
6084
  return `Грешана опција: се очекува една ${joinValues(issue$1.values, "|")}`;
@@ -5962,12 +6116,12 @@ const error$17 = () => {
5962
6116
  };
5963
6117
  };
5964
6118
  function mk_default() {
5965
- return { localeError: error$17() };
6119
+ return { localeError: error$18() };
5966
6120
  }
5967
6121
 
5968
6122
  //#endregion
5969
- //#region ../../node_modules/zod/dist/esm/v4/locales/ms.js
5970
- const error$16 = () => {
6123
+ //#region ../../node_modules/zod/v4/locales/ms.js
6124
+ const error$17 = () => {
5971
6125
  const Sizable = {
5972
6126
  string: {
5973
6127
  unit: "aksara",
@@ -5989,7 +6143,7 @@ const error$16 = () => {
5989
6143
  function getSizing(origin) {
5990
6144
  return Sizable[origin] ?? null;
5991
6145
  }
5992
- const parsedType$2 = (data) => {
6146
+ const parsedType$3 = (data) => {
5993
6147
  const t = typeof data;
5994
6148
  switch (t) {
5995
6149
  case "number": {
@@ -6041,7 +6195,7 @@ const error$16 = () => {
6041
6195
  };
6042
6196
  return (issue$1) => {
6043
6197
  switch (issue$1.code) {
6044
- case "invalid_type": return `Input tidak sah: dijangka ${issue$1.expected}, diterima ${parsedType$2(issue$1.input)}`;
6198
+ case "invalid_type": return `Input tidak sah: dijangka ${issue$1.expected}, diterima ${parsedType$3(issue$1.input)}`;
6045
6199
  case "invalid_value":
6046
6200
  if (issue$1.values.length === 1) return `Input tidak sah: dijangka ${stringifyPrimitive(issue$1.values[0])}`;
6047
6201
  return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue$1.values, "|")}`;
@@ -6077,12 +6231,12 @@ const error$16 = () => {
6077
6231
  };
6078
6232
  };
6079
6233
  function ms_default() {
6080
- return { localeError: error$16() };
6234
+ return { localeError: error$17() };
6081
6235
  }
6082
6236
 
6083
6237
  //#endregion
6084
- //#region ../../node_modules/zod/dist/esm/v4/locales/nl.js
6085
- const error$15 = () => {
6238
+ //#region ../../node_modules/zod/v4/locales/nl.js
6239
+ const error$16 = () => {
6086
6240
  const Sizable = {
6087
6241
  string: { unit: "tekens" },
6088
6242
  file: { unit: "bytes" },
@@ -6092,7 +6246,7 @@ const error$15 = () => {
6092
6246
  function getSizing(origin) {
6093
6247
  return Sizable[origin] ?? null;
6094
6248
  }
6095
- const parsedType$2 = (data) => {
6249
+ const parsedType$3 = (data) => {
6096
6250
  const t = typeof data;
6097
6251
  switch (t) {
6098
6252
  case "number": {
@@ -6144,7 +6298,7 @@ const error$15 = () => {
6144
6298
  };
6145
6299
  return (issue$1) => {
6146
6300
  switch (issue$1.code) {
6147
- case "invalid_type": return `Ongeldige invoer: verwacht ${issue$1.expected}, ontving ${parsedType$2(issue$1.input)}`;
6301
+ case "invalid_type": return `Ongeldige invoer: verwacht ${issue$1.expected}, ontving ${parsedType$3(issue$1.input)}`;
6148
6302
  case "invalid_value":
6149
6303
  if (issue$1.values.length === 1) return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue$1.values[0])}`;
6150
6304
  return `Ongeldige optie: verwacht één van ${joinValues(issue$1.values, "|")}`;
@@ -6182,12 +6336,12 @@ const error$15 = () => {
6182
6336
  };
6183
6337
  };
6184
6338
  function nl_default() {
6185
- return { localeError: error$15() };
6339
+ return { localeError: error$16() };
6186
6340
  }
6187
6341
 
6188
6342
  //#endregion
6189
- //#region ../../node_modules/zod/dist/esm/v4/locales/no.js
6190
- const error$14 = () => {
6343
+ //#region ../../node_modules/zod/v4/locales/no.js
6344
+ const error$15 = () => {
6191
6345
  const Sizable = {
6192
6346
  string: {
6193
6347
  unit: "tegn",
@@ -6209,7 +6363,7 @@ const error$14 = () => {
6209
6363
  function getSizing(origin) {
6210
6364
  return Sizable[origin] ?? null;
6211
6365
  }
6212
- const parsedType$2 = (data) => {
6366
+ const parsedType$3 = (data) => {
6213
6367
  const t = typeof data;
6214
6368
  switch (t) {
6215
6369
  case "number": {
@@ -6261,7 +6415,7 @@ const error$14 = () => {
6261
6415
  };
6262
6416
  return (issue$1) => {
6263
6417
  switch (issue$1.code) {
6264
- case "invalid_type": return `Ugyldig input: forventet ${issue$1.expected}, fikk ${parsedType$2(issue$1.input)}`;
6418
+ case "invalid_type": return `Ugyldig input: forventet ${issue$1.expected}, fikk ${parsedType$3(issue$1.input)}`;
6265
6419
  case "invalid_value":
6266
6420
  if (issue$1.values.length === 1) return `Ugyldig verdi: forventet ${stringifyPrimitive(issue$1.values[0])}`;
6267
6421
  return `Ugyldig valg: forventet en av ${joinValues(issue$1.values, "|")}`;
@@ -6297,12 +6451,12 @@ const error$14 = () => {
6297
6451
  };
6298
6452
  };
6299
6453
  function no_default() {
6300
- return { localeError: error$14() };
6454
+ return { localeError: error$15() };
6301
6455
  }
6302
6456
 
6303
6457
  //#endregion
6304
- //#region ../../node_modules/zod/dist/esm/v4/locales/ota.js
6305
- const error$13 = () => {
6458
+ //#region ../../node_modules/zod/v4/locales/ota.js
6459
+ const error$14 = () => {
6306
6460
  const Sizable = {
6307
6461
  string: {
6308
6462
  unit: "harf",
@@ -6324,7 +6478,7 @@ const error$13 = () => {
6324
6478
  function getSizing(origin) {
6325
6479
  return Sizable[origin] ?? null;
6326
6480
  }
6327
- const parsedType$2 = (data) => {
6481
+ const parsedType$3 = (data) => {
6328
6482
  const t = typeof data;
6329
6483
  switch (t) {
6330
6484
  case "number": {
@@ -6376,7 +6530,7 @@ const error$13 = () => {
6376
6530
  };
6377
6531
  return (issue$1) => {
6378
6532
  switch (issue$1.code) {
6379
- case "invalid_type": return `Fâsit giren: umulan ${issue$1.expected}, alınan ${parsedType$2(issue$1.input)}`;
6533
+ case "invalid_type": return `Fâsit giren: umulan ${issue$1.expected}, alınan ${parsedType$3(issue$1.input)}`;
6380
6534
  case "invalid_value":
6381
6535
  if (issue$1.values.length === 1) return `Fâsit giren: umulan ${stringifyPrimitive(issue$1.values[0])}`;
6382
6536
  return `Fâsit tercih: mûteberler ${joinValues(issue$1.values, "|")}`;
@@ -6412,42 +6566,42 @@ const error$13 = () => {
6412
6566
  };
6413
6567
  };
6414
6568
  function ota_default() {
6415
- return { localeError: error$13() };
6569
+ return { localeError: error$14() };
6416
6570
  }
6417
6571
 
6418
6572
  //#endregion
6419
- //#region ../../node_modules/zod/dist/esm/v4/locales/pl.js
6420
- const error$12 = () => {
6573
+ //#region ../../node_modules/zod/v4/locales/ps.js
6574
+ const error$13 = () => {
6421
6575
  const Sizable = {
6422
6576
  string: {
6423
- unit: "znaków",
6424
- verb: "mieć"
6577
+ unit: "توکي",
6578
+ verb: "ولري"
6425
6579
  },
6426
6580
  file: {
6427
- unit: "bajtów",
6428
- verb: "mieć"
6581
+ unit: "بایټس",
6582
+ verb: "ولري"
6429
6583
  },
6430
6584
  array: {
6431
- unit: "elementów",
6432
- verb: "mieć"
6585
+ unit: "توکي",
6586
+ verb: "ولري"
6433
6587
  },
6434
6588
  set: {
6435
- unit: "elementów",
6436
- verb: "mieć"
6589
+ unit: "توکي",
6590
+ verb: "ولري"
6437
6591
  }
6438
6592
  };
6439
6593
  function getSizing(origin) {
6440
6594
  return Sizable[origin] ?? null;
6441
6595
  }
6442
- const parsedType$2 = (data) => {
6596
+ const parsedType$3 = (data) => {
6443
6597
  const t = typeof data;
6444
6598
  switch (t) {
6445
6599
  case "number": {
6446
- return Number.isNaN(data) ? "NaN" : "liczba";
6600
+ return Number.isNaN(data) ? "NaN" : "عدد";
6447
6601
  }
6448
6602
  case "object": {
6449
6603
  if (Array.isArray(data)) {
6450
- return "tablica";
6604
+ return "ارې";
6451
6605
  }
6452
6606
  if (data === null) {
6453
6607
  return "null";
@@ -6460,10 +6614,10 @@ const error$12 = () => {
6460
6614
  return t;
6461
6615
  };
6462
6616
  const Nouns = {
6463
- regex: "wyrażenie",
6464
- email: "adres email",
6465
- url: "URL",
6466
- emoji: "emoji",
6617
+ regex: "ورودي",
6618
+ email: "بریښنالیک",
6619
+ url: "یو آر ال",
6620
+ emoji: "ایموجي",
6467
6621
  uuid: "UUID",
6468
6622
  uuidv4: "UUIDv4",
6469
6623
  uuidv6: "UUIDv6",
@@ -6474,26 +6628,153 @@ const error$12 = () => {
6474
6628
  ulid: "ULID",
6475
6629
  xid: "XID",
6476
6630
  ksuid: "KSUID",
6477
- datetime: "data i godzina w formacie ISO",
6478
- date: "data w formacie ISO",
6479
- time: "godzina w formacie ISO",
6480
- duration: "czas trwania ISO",
6481
- ipv4: "adres IPv4",
6482
- ipv6: "adres IPv6",
6483
- cidrv4: "zakres IPv4",
6484
- cidrv6: "zakres IPv6",
6485
- base64: "ciąg znaków zakodowany w formacie base64",
6486
- base64url: "ciąg znaków zakodowany w formacie base64url",
6487
- json_string: "ciąg znaków w formacie JSON",
6488
- e164: "liczba E.164",
6631
+ datetime: "نیټه او وخت",
6632
+ date: "نېټه",
6633
+ time: "وخت",
6634
+ duration: "موده",
6635
+ ipv4: "د IPv4 پته",
6636
+ ipv6: "د IPv6 پته",
6637
+ cidrv4: "د IPv4 ساحه",
6638
+ cidrv6: "د IPv6 ساحه",
6639
+ base64: "base64-encoded متن",
6640
+ base64url: "base64url-encoded متن",
6641
+ json_string: "JSON متن",
6642
+ e164: "د E.164 شمېره",
6489
6643
  jwt: "JWT",
6490
- template_literal: "wejście"
6644
+ template_literal: "ورودي"
6491
6645
  };
6492
6646
  return (issue$1) => {
6493
6647
  switch (issue$1.code) {
6494
- case "invalid_type": return `Nieprawidłowe dane wejściowe: oczekiwano ${issue$1.expected}, otrzymano ${parsedType$2(issue$1.input)}`;
6648
+ case "invalid_type": return `ناسم ورودي: باید ${issue$1.expected} وای, مګر ${parsedType$3(issue$1.input)} ترلاسه شو`;
6495
6649
  case "invalid_value":
6496
- if (issue$1.values.length === 1) return `Nieprawidłowe dane wejściowe: oczekiwano ${stringifyPrimitive(issue$1.values[0])}`;
6650
+ if (issue$1.values.length === 1) {
6651
+ return `ناسم ورودي: باید ${stringifyPrimitive(issue$1.values[0])} وای`;
6652
+ }
6653
+ return `ناسم انتخاب: باید یو له ${joinValues(issue$1.values, "|")} څخه وای`;
6654
+ case "too_big": {
6655
+ const adj = issue$1.inclusive ? "<=" : "<";
6656
+ const sizing = getSizing(issue$1.origin);
6657
+ if (sizing) {
6658
+ return `ډیر لوی: ${issue$1.origin ?? "ارزښت"} باید ${adj}${issue$1.maximum.toString()} ${sizing.unit ?? "عنصرونه"} ولري`;
6659
+ }
6660
+ return `ډیر لوی: ${issue$1.origin ?? "ارزښت"} باید ${adj}${issue$1.maximum.toString()} وي`;
6661
+ }
6662
+ case "too_small": {
6663
+ const adj = issue$1.inclusive ? ">=" : ">";
6664
+ const sizing = getSizing(issue$1.origin);
6665
+ if (sizing) {
6666
+ return `ډیر کوچنی: ${issue$1.origin} باید ${adj}${issue$1.minimum.toString()} ${sizing.unit} ولري`;
6667
+ }
6668
+ return `ډیر کوچنی: ${issue$1.origin} باید ${adj}${issue$1.minimum.toString()} وي`;
6669
+ }
6670
+ case "invalid_format": {
6671
+ const _issue = issue$1;
6672
+ if (_issue.format === "starts_with") {
6673
+ return `ناسم متن: باید د "${_issue.prefix}" سره پیل شي`;
6674
+ }
6675
+ if (_issue.format === "ends_with") {
6676
+ return `ناسم متن: باید د "${_issue.suffix}" سره پای ته ورسيږي`;
6677
+ }
6678
+ if (_issue.format === "includes") {
6679
+ return `ناسم متن: باید "${_issue.includes}" ولري`;
6680
+ }
6681
+ if (_issue.format === "regex") {
6682
+ return `ناسم متن: باید د ${_issue.pattern} سره مطابقت ولري`;
6683
+ }
6684
+ return `${Nouns[_issue.format] ?? issue$1.format} ناسم دی`;
6685
+ }
6686
+ case "not_multiple_of": return `ناسم عدد: باید د ${issue$1.divisor} مضرب وي`;
6687
+ case "unrecognized_keys": return `ناسم ${issue$1.keys.length > 1 ? "کلیډونه" : "کلیډ"}: ${joinValues(issue$1.keys, ", ")}`;
6688
+ case "invalid_key": return `ناسم کلیډ په ${issue$1.origin} کې`;
6689
+ case "invalid_union": return `ناسمه ورودي`;
6690
+ case "invalid_element": return `ناسم عنصر په ${issue$1.origin} کې`;
6691
+ default: return `ناسمه ورودي`;
6692
+ }
6693
+ };
6694
+ };
6695
+ function ps_default() {
6696
+ return { localeError: error$13() };
6697
+ }
6698
+
6699
+ //#endregion
6700
+ //#region ../../node_modules/zod/v4/locales/pl.js
6701
+ const error$12 = () => {
6702
+ const Sizable = {
6703
+ string: {
6704
+ unit: "znaków",
6705
+ verb: "mieć"
6706
+ },
6707
+ file: {
6708
+ unit: "bajtów",
6709
+ verb: "mieć"
6710
+ },
6711
+ array: {
6712
+ unit: "elementów",
6713
+ verb: "mieć"
6714
+ },
6715
+ set: {
6716
+ unit: "elementów",
6717
+ verb: "mieć"
6718
+ }
6719
+ };
6720
+ function getSizing(origin) {
6721
+ return Sizable[origin] ?? null;
6722
+ }
6723
+ const parsedType$3 = (data) => {
6724
+ const t = typeof data;
6725
+ switch (t) {
6726
+ case "number": {
6727
+ return Number.isNaN(data) ? "NaN" : "liczba";
6728
+ }
6729
+ case "object": {
6730
+ if (Array.isArray(data)) {
6731
+ return "tablica";
6732
+ }
6733
+ if (data === null) {
6734
+ return "null";
6735
+ }
6736
+ if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
6737
+ return data.constructor.name;
6738
+ }
6739
+ }
6740
+ }
6741
+ return t;
6742
+ };
6743
+ const Nouns = {
6744
+ regex: "wyrażenie",
6745
+ email: "adres email",
6746
+ url: "URL",
6747
+ emoji: "emoji",
6748
+ uuid: "UUID",
6749
+ uuidv4: "UUIDv4",
6750
+ uuidv6: "UUIDv6",
6751
+ nanoid: "nanoid",
6752
+ guid: "GUID",
6753
+ cuid: "cuid",
6754
+ cuid2: "cuid2",
6755
+ ulid: "ULID",
6756
+ xid: "XID",
6757
+ ksuid: "KSUID",
6758
+ datetime: "data i godzina w formacie ISO",
6759
+ date: "data w formacie ISO",
6760
+ time: "godzina w formacie ISO",
6761
+ duration: "czas trwania ISO",
6762
+ ipv4: "adres IPv4",
6763
+ ipv6: "adres IPv6",
6764
+ cidrv4: "zakres IPv4",
6765
+ cidrv6: "zakres IPv6",
6766
+ base64: "ciąg znaków zakodowany w formacie base64",
6767
+ base64url: "ciąg znaków zakodowany w formacie base64url",
6768
+ json_string: "ciąg znaków w formacie JSON",
6769
+ e164: "liczba E.164",
6770
+ jwt: "JWT",
6771
+ template_literal: "wejście"
6772
+ };
6773
+ return (issue$1) => {
6774
+ switch (issue$1.code) {
6775
+ case "invalid_type": return `Nieprawidłowe dane wejściowe: oczekiwano ${issue$1.expected}, otrzymano ${parsedType$3(issue$1.input)}`;
6776
+ case "invalid_value":
6777
+ if (issue$1.values.length === 1) return `Nieprawidłowe dane wejściowe: oczekiwano ${stringifyPrimitive(issue$1.values[0])}`;
6497
6778
  return `Nieprawidłowa opcja: oczekiwano jednej z wartości ${joinValues(issue$1.values, "|")}`;
6498
6779
  case "too_big": {
6499
6780
  const adj = issue$1.inclusive ? "<=" : "<";
@@ -6533,7 +6814,7 @@ function pl_default() {
6533
6814
  }
6534
6815
 
6535
6816
  //#endregion
6536
- //#region ../../node_modules/zod/dist/esm/v4/locales/pt.js
6817
+ //#region ../../node_modules/zod/v4/locales/pt.js
6537
6818
  const error$11 = () => {
6538
6819
  const Sizable = {
6539
6820
  string: {
@@ -6556,7 +6837,7 @@ const error$11 = () => {
6556
6837
  function getSizing(origin) {
6557
6838
  return Sizable[origin] ?? null;
6558
6839
  }
6559
- const parsedType$2 = (data) => {
6840
+ const parsedType$3 = (data) => {
6560
6841
  const t = typeof data;
6561
6842
  switch (t) {
6562
6843
  case "number": {
@@ -6608,7 +6889,7 @@ const error$11 = () => {
6608
6889
  };
6609
6890
  return (issue$1) => {
6610
6891
  switch (issue$1.code) {
6611
- case "invalid_type": return `Tipo inválido: esperado ${issue$1.expected}, recebido ${parsedType$2(issue$1.input)}`;
6892
+ case "invalid_type": return `Tipo inválido: esperado ${issue$1.expected}, recebido ${parsedType$3(issue$1.input)}`;
6612
6893
  case "invalid_value":
6613
6894
  if (issue$1.values.length === 1) return `Entrada inválida: esperado ${stringifyPrimitive(issue$1.values[0])}`;
6614
6895
  return `Opção inválida: esperada uma das ${joinValues(issue$1.values, "|")}`;
@@ -6648,7 +6929,7 @@ function pt_default() {
6648
6929
  }
6649
6930
 
6650
6931
  //#endregion
6651
- //#region ../../node_modules/zod/dist/esm/v4/locales/ru.js
6932
+ //#region ../../node_modules/zod/v4/locales/ru.js
6652
6933
  function getRussianPlural(count, one, few, many) {
6653
6934
  const absCount = Math.abs(count);
6654
6935
  const lastDigit = absCount % 10;
@@ -6702,7 +6983,7 @@ const error$10 = () => {
6702
6983
  function getSizing(origin) {
6703
6984
  return Sizable[origin] ?? null;
6704
6985
  }
6705
- const parsedType$2 = (data) => {
6986
+ const parsedType$3 = (data) => {
6706
6987
  const t = typeof data;
6707
6988
  switch (t) {
6708
6989
  case "number": {
@@ -6754,7 +7035,7 @@ const error$10 = () => {
6754
7035
  };
6755
7036
  return (issue$1) => {
6756
7037
  switch (issue$1.code) {
6757
- case "invalid_type": return `Неверный ввод: ожидалось ${issue$1.expected}, получено ${parsedType$2(issue$1.input)}`;
7038
+ case "invalid_type": return `Неверный ввод: ожидалось ${issue$1.expected}, получено ${parsedType$3(issue$1.input)}`;
6758
7039
  case "invalid_value":
6759
7040
  if (issue$1.values.length === 1) return `Неверный ввод: ожидалось ${stringifyPrimitive(issue$1.values[0])}`;
6760
7041
  return `Неверный вариант: ожидалось одно из ${joinValues(issue$1.values, "|")}`;
@@ -6800,7 +7081,7 @@ function ru_default() {
6800
7081
  }
6801
7082
 
6802
7083
  //#endregion
6803
- //#region ../../node_modules/zod/dist/esm/v4/locales/sl.js
7084
+ //#region ../../node_modules/zod/v4/locales/sl.js
6804
7085
  const error$9 = () => {
6805
7086
  const Sizable = {
6806
7087
  string: {
@@ -6823,7 +7104,7 @@ const error$9 = () => {
6823
7104
  function getSizing(origin) {
6824
7105
  return Sizable[origin] ?? null;
6825
7106
  }
6826
- const parsedType$2 = (data) => {
7107
+ const parsedType$3 = (data) => {
6827
7108
  const t = typeof data;
6828
7109
  switch (t) {
6829
7110
  case "number": {
@@ -6875,7 +7156,7 @@ const error$9 = () => {
6875
7156
  };
6876
7157
  return (issue$1) => {
6877
7158
  switch (issue$1.code) {
6878
- case "invalid_type": return `Neveljaven vnos: pričakovano ${issue$1.expected}, prejeto ${parsedType$2(issue$1.input)}`;
7159
+ case "invalid_type": return `Neveljaven vnos: pričakovano ${issue$1.expected}, prejeto ${parsedType$3(issue$1.input)}`;
6879
7160
  case "invalid_value":
6880
7161
  if (issue$1.values.length === 1) return `Neveljaven vnos: pričakovano ${stringifyPrimitive(issue$1.values[0])}`;
6881
7162
  return `Neveljavna možnost: pričakovano eno izmed ${joinValues(issue$1.values, "|")}`;
@@ -6917,7 +7198,7 @@ function sl_default() {
6917
7198
  }
6918
7199
 
6919
7200
  //#endregion
6920
- //#region ../../node_modules/zod/dist/esm/v4/locales/sv.js
7201
+ //#region ../../node_modules/zod/v4/locales/sv.js
6921
7202
  const error$8 = () => {
6922
7203
  const Sizable = {
6923
7204
  string: {
@@ -6940,7 +7221,7 @@ const error$8 = () => {
6940
7221
  function getSizing(origin) {
6941
7222
  return Sizable[origin] ?? null;
6942
7223
  }
6943
- const parsedType$2 = (data) => {
7224
+ const parsedType$3 = (data) => {
6944
7225
  const t = typeof data;
6945
7226
  switch (t) {
6946
7227
  case "number": {
@@ -6992,7 +7273,7 @@ const error$8 = () => {
6992
7273
  };
6993
7274
  return (issue$1) => {
6994
7275
  switch (issue$1.code) {
6995
- case "invalid_type": return `Ogiltig inmatning: förväntat ${issue$1.expected}, fick ${parsedType$2(issue$1.input)}`;
7276
+ case "invalid_type": return `Ogiltig inmatning: förväntat ${issue$1.expected}, fick ${parsedType$3(issue$1.input)}`;
6996
7277
  case "invalid_value":
6997
7278
  if (issue$1.values.length === 1) return `Ogiltig inmatning: förväntat ${stringifyPrimitive(issue$1.values[0])}`;
6998
7279
  return `Ogiltigt val: förväntade en av ${joinValues(issue$1.values, "|")}`;
@@ -7036,7 +7317,7 @@ function sv_default() {
7036
7317
  }
7037
7318
 
7038
7319
  //#endregion
7039
- //#region ../../node_modules/zod/dist/esm/v4/locales/ta.js
7320
+ //#region ../../node_modules/zod/v4/locales/ta.js
7040
7321
  const error$7 = () => {
7041
7322
  const Sizable = {
7042
7323
  string: {
@@ -7059,7 +7340,7 @@ const error$7 = () => {
7059
7340
  function getSizing(origin) {
7060
7341
  return Sizable[origin] ?? null;
7061
7342
  }
7062
- const parsedType$2 = (data) => {
7343
+ const parsedType$3 = (data) => {
7063
7344
  const t = typeof data;
7064
7345
  switch (t) {
7065
7346
  case "number": {
@@ -7111,7 +7392,7 @@ const error$7 = () => {
7111
7392
  };
7112
7393
  return (issue$1) => {
7113
7394
  switch (issue$1.code) {
7114
- case "invalid_type": return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue$1.expected}, பெறப்பட்டது ${parsedType$2(issue$1.input)}`;
7395
+ case "invalid_type": return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue$1.expected}, பெறப்பட்டது ${parsedType$3(issue$1.input)}`;
7115
7396
  case "invalid_value":
7116
7397
  if (issue$1.values.length === 1) return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${stringifyPrimitive(issue$1.values[0])}`;
7117
7398
  return `தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${joinValues(issue$1.values, "|")} இல் ஒன்று`;
@@ -7153,7 +7434,7 @@ function ta_default() {
7153
7434
  }
7154
7435
 
7155
7436
  //#endregion
7156
- //#region ../../node_modules/zod/dist/esm/v4/locales/th.js
7437
+ //#region ../../node_modules/zod/v4/locales/th.js
7157
7438
  const error$6 = () => {
7158
7439
  const Sizable = {
7159
7440
  string: {
@@ -7176,7 +7457,7 @@ const error$6 = () => {
7176
7457
  function getSizing(origin) {
7177
7458
  return Sizable[origin] ?? null;
7178
7459
  }
7179
- const parsedType$2 = (data) => {
7460
+ const parsedType$3 = (data) => {
7180
7461
  const t = typeof data;
7181
7462
  switch (t) {
7182
7463
  case "number": {
@@ -7228,7 +7509,7 @@ const error$6 = () => {
7228
7509
  };
7229
7510
  return (issue$1) => {
7230
7511
  switch (issue$1.code) {
7231
- case "invalid_type": return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue$1.expected} แต่ได้รับ ${parsedType$2(issue$1.input)}`;
7512
+ case "invalid_type": return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue$1.expected} แต่ได้รับ ${parsedType$3(issue$1.input)}`;
7232
7513
  case "invalid_value":
7233
7514
  if (issue$1.values.length === 1) return `ค่าไม่ถูกต้อง: ควรเป็น ${stringifyPrimitive(issue$1.values[0])}`;
7234
7515
  return `ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${joinValues(issue$1.values, "|")}`;
@@ -7270,7 +7551,7 @@ function th_default() {
7270
7551
  }
7271
7552
 
7272
7553
  //#endregion
7273
- //#region ../../node_modules/zod/dist/esm/v4/locales/tr.js
7554
+ //#region ../../node_modules/zod/v4/locales/tr.js
7274
7555
  const parsedType = (data) => {
7275
7556
  const t = typeof data;
7276
7557
  switch (t) {
@@ -7383,7 +7664,7 @@ function tr_default() {
7383
7664
  }
7384
7665
 
7385
7666
  //#endregion
7386
- //#region ../../node_modules/zod/dist/esm/v4/locales/ua.js
7667
+ //#region ../../node_modules/zod/v4/locales/ua.js
7387
7668
  const error$4 = () => {
7388
7669
  const Sizable = {
7389
7670
  string: {
@@ -7406,7 +7687,7 @@ const error$4 = () => {
7406
7687
  function getSizing(origin) {
7407
7688
  return Sizable[origin] ?? null;
7408
7689
  }
7409
- const parsedType$2 = (data) => {
7690
+ const parsedType$3 = (data) => {
7410
7691
  const t = typeof data;
7411
7692
  switch (t) {
7412
7693
  case "number": {
@@ -7458,7 +7739,7 @@ const error$4 = () => {
7458
7739
  };
7459
7740
  return (issue$1) => {
7460
7741
  switch (issue$1.code) {
7461
- case "invalid_type": return `Неправильні вхідні дані: очікується ${issue$1.expected}, отримано ${parsedType$2(issue$1.input)}`;
7742
+ case "invalid_type": return `Неправильні вхідні дані: очікується ${issue$1.expected}, отримано ${parsedType$3(issue$1.input)}`;
7462
7743
  case "invalid_value":
7463
7744
  if (issue$1.values.length === 1) return `Неправильні вхідні дані: очікується ${stringifyPrimitive(issue$1.values[0])}`;
7464
7745
  return `Неправильна опція: очікується одне з ${joinValues(issue$1.values, "|")}`;
@@ -7498,7 +7779,7 @@ function ua_default() {
7498
7779
  }
7499
7780
 
7500
7781
  //#endregion
7501
- //#region ../../node_modules/zod/dist/esm/v4/locales/ur.js
7782
+ //#region ../../node_modules/zod/v4/locales/ur.js
7502
7783
  const error$3 = () => {
7503
7784
  const Sizable = {
7504
7785
  string: {
@@ -7521,7 +7802,7 @@ const error$3 = () => {
7521
7802
  function getSizing(origin) {
7522
7803
  return Sizable[origin] ?? null;
7523
7804
  }
7524
- const parsedType$2 = (data) => {
7805
+ const parsedType$3 = (data) => {
7525
7806
  const t = typeof data;
7526
7807
  switch (t) {
7527
7808
  case "number": {
@@ -7573,7 +7854,7 @@ const error$3 = () => {
7573
7854
  };
7574
7855
  return (issue$1) => {
7575
7856
  switch (issue$1.code) {
7576
- case "invalid_type": return `غلط ان پٹ: ${issue$1.expected} متوقع تھا، ${parsedType$2(issue$1.input)} موصول ہوا`;
7857
+ case "invalid_type": return `غلط ان پٹ: ${issue$1.expected} متوقع تھا، ${parsedType$3(issue$1.input)} موصول ہوا`;
7577
7858
  case "invalid_value":
7578
7859
  if (issue$1.values.length === 1) return `غلط ان پٹ: ${stringifyPrimitive(issue$1.values[0])} متوقع تھا`;
7579
7860
  return `غلط آپشن: ${joinValues(issue$1.values, "|")} میں سے ایک متوقع تھا`;
@@ -7615,7 +7896,7 @@ function ur_default() {
7615
7896
  }
7616
7897
 
7617
7898
  //#endregion
7618
- //#region ../../node_modules/zod/dist/esm/v4/locales/vi.js
7899
+ //#region ../../node_modules/zod/v4/locales/vi.js
7619
7900
  const error$2 = () => {
7620
7901
  const Sizable = {
7621
7902
  string: {
@@ -7638,7 +7919,7 @@ const error$2 = () => {
7638
7919
  function getSizing(origin) {
7639
7920
  return Sizable[origin] ?? null;
7640
7921
  }
7641
- const parsedType$2 = (data) => {
7922
+ const parsedType$3 = (data) => {
7642
7923
  const t = typeof data;
7643
7924
  switch (t) {
7644
7925
  case "number": {
@@ -7690,7 +7971,7 @@ const error$2 = () => {
7690
7971
  };
7691
7972
  return (issue$1) => {
7692
7973
  switch (issue$1.code) {
7693
- 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)}`;
7974
+ 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)}`;
7694
7975
  case "invalid_value":
7695
7976
  if (issue$1.values.length === 1) return `Đầu vào không hợp lệ: mong đợi ${stringifyPrimitive(issue$1.values[0])}`;
7696
7977
  return `Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${joinValues(issue$1.values, "|")}`;
@@ -7730,7 +8011,7 @@ function vi_default() {
7730
8011
  }
7731
8012
 
7732
8013
  //#endregion
7733
- //#region ../../node_modules/zod/dist/esm/v4/locales/zh-CN.js
8014
+ //#region ../../node_modules/zod/v4/locales/zh-CN.js
7734
8015
  const error$1 = () => {
7735
8016
  const Sizable = {
7736
8017
  string: {
@@ -7753,7 +8034,7 @@ const error$1 = () => {
7753
8034
  function getSizing(origin) {
7754
8035
  return Sizable[origin] ?? null;
7755
8036
  }
7756
- const parsedType$2 = (data) => {
8037
+ const parsedType$3 = (data) => {
7757
8038
  const t = typeof data;
7758
8039
  switch (t) {
7759
8040
  case "number": {
@@ -7805,7 +8086,7 @@ const error$1 = () => {
7805
8086
  };
7806
8087
  return (issue$1) => {
7807
8088
  switch (issue$1.code) {
7808
- case "invalid_type": return `无效输入:期望 ${issue$1.expected},实际接收 ${parsedType$2(issue$1.input)}`;
8089
+ case "invalid_type": return `无效输入:期望 ${issue$1.expected},实际接收 ${parsedType$3(issue$1.input)}`;
7809
8090
  case "invalid_value":
7810
8091
  if (issue$1.values.length === 1) return `无效输入:期望 ${stringifyPrimitive(issue$1.values[0])}`;
7811
8092
  return `无效选项:期望以下之一 ${joinValues(issue$1.values, "|")}`;
@@ -7845,7 +8126,7 @@ function zh_CN_default() {
7845
8126
  }
7846
8127
 
7847
8128
  //#endregion
7848
- //#region ../../node_modules/zod/dist/esm/v4/locales/zh-TW.js
8129
+ //#region ../../node_modules/zod/v4/locales/zh-TW.js
7849
8130
  const error = () => {
7850
8131
  const Sizable = {
7851
8132
  string: {
@@ -7868,7 +8149,7 @@ const error = () => {
7868
8149
  function getSizing(origin) {
7869
8150
  return Sizable[origin] ?? null;
7870
8151
  }
7871
- const parsedType$2 = (data) => {
8152
+ const parsedType$3 = (data) => {
7872
8153
  const t = typeof data;
7873
8154
  switch (t) {
7874
8155
  case "number": {
@@ -7920,7 +8201,7 @@ const error = () => {
7920
8201
  };
7921
8202
  return (issue$1) => {
7922
8203
  switch (issue$1.code) {
7923
- case "invalid_type": return `無效的輸入值:預期為 ${issue$1.expected},但收到 ${parsedType$2(issue$1.input)}`;
8204
+ case "invalid_type": return `無效的輸入值:預期為 ${issue$1.expected},但收到 ${parsedType$3(issue$1.input)}`;
7924
8205
  case "invalid_value":
7925
8206
  if (issue$1.values.length === 1) return `無效的輸入值:預期為 ${stringifyPrimitive(issue$1.values[0])}`;
7926
8207
  return `無效的選項:預期為以下其中之一 ${joinValues(issue$1.values, "|")}`;
@@ -7962,7 +8243,7 @@ function zh_TW_default() {
7962
8243
  }
7963
8244
 
7964
8245
  //#endregion
7965
- //#region ../../node_modules/zod/dist/esm/v4/locales/index.js
8246
+ //#region ../../node_modules/zod/v4/locales/index.js
7966
8247
  var locales_exports = {};
7967
8248
  __export(locales_exports, {
7968
8249
  ar: () => ar_default,
@@ -7972,6 +8253,7 @@ __export(locales_exports, {
7972
8253
  cs: () => cs_default,
7973
8254
  de: () => de_default,
7974
8255
  en: () => en_default,
8256
+ eo: () => eo_default,
7975
8257
  es: () => es_default,
7976
8258
  fa: () => fa_default,
7977
8259
  fi: () => fi_default,
@@ -7990,6 +8272,7 @@ __export(locales_exports, {
7990
8272
  no: () => no_default,
7991
8273
  ota: () => ota_default,
7992
8274
  pl: () => pl_default,
8275
+ ps: () => ps_default,
7993
8276
  pt: () => pt_default,
7994
8277
  ru: () => ru_default,
7995
8278
  sl: () => sl_default,
@@ -8005,12 +8288,12 @@ __export(locales_exports, {
8005
8288
  });
8006
8289
 
8007
8290
  //#endregion
8008
- //#region ../../node_modules/zod/dist/esm/v4/core/registries.js
8291
+ //#region ../../node_modules/zod/v4/core/registries.js
8009
8292
  const $output = Symbol("ZodOutput");
8010
8293
  const $input = Symbol("ZodInput");
8011
8294
  var $ZodRegistry = class {
8012
8295
  constructor() {
8013
- this._map = new WeakMap();
8296
+ this._map = new Map();
8014
8297
  this._idmap = new Map();
8015
8298
  }
8016
8299
  add(schema, ..._meta) {
@@ -8024,7 +8307,16 @@ var $ZodRegistry = class {
8024
8307
  }
8025
8308
  return this;
8026
8309
  }
8310
+ clear() {
8311
+ this._map = new Map();
8312
+ this._idmap = new Map();
8313
+ return this;
8314
+ }
8027
8315
  remove(schema) {
8316
+ const meta = this._map.get(schema);
8317
+ if (meta && typeof meta === "object" && "id" in meta) {
8318
+ this._idmap.delete(meta.id);
8319
+ }
8028
8320
  this._map.delete(schema);
8029
8321
  return this;
8030
8322
  }
@@ -8050,7 +8342,7 @@ function registry() {
8050
8342
  const globalRegistry = /* @__PURE__ */ registry();
8051
8343
 
8052
8344
  //#endregion
8053
- //#region ../../node_modules/zod/dist/esm/v4/core/api.js
8345
+ //#region ../../node_modules/zod/v4/core/api.js
8054
8346
  function _string(Class$1, params) {
8055
8347
  return new Class$1({
8056
8348
  type: "string",
@@ -8265,6 +8557,13 @@ function _jwt(Class$1, params) {
8265
8557
  ...normalizeParams(params)
8266
8558
  });
8267
8559
  }
8560
+ const TimePrecision = {
8561
+ Any: null,
8562
+ Minute: -1,
8563
+ Second: 0,
8564
+ Millisecond: 3,
8565
+ Microsecond: 6
8566
+ };
8268
8567
  function _isoDateTime(Class$1, params) {
8269
8568
  return new Class$1({
8270
8569
  type: "string",
@@ -8831,8 +9130,8 @@ function _refine(Class$1, fn, _params) {
8831
9130
  return schema;
8832
9131
  }
8833
9132
  function _stringbool(Classes, _params) {
8834
- const { case: _case, error: error$37, truthy, falsy } = normalizeParams(_params);
8835
- let truthyArray = truthy ?? [
9133
+ const params = normalizeParams(_params);
9134
+ let truthyArray = params.truthy ?? [
8836
9135
  "true",
8837
9136
  "1",
8838
9137
  "yes",
@@ -8840,7 +9139,7 @@ function _stringbool(Classes, _params) {
8840
9139
  "y",
8841
9140
  "enabled"
8842
9141
  ];
8843
- let falsyArray = falsy ?? [
9142
+ let falsyArray = params.falsy ?? [
8844
9143
  "false",
8845
9144
  "0",
8846
9145
  "no",
@@ -8848,7 +9147,7 @@ function _stringbool(Classes, _params) {
8848
9147
  "n",
8849
9148
  "disabled"
8850
9149
  ];
8851
- if (_case !== "sensitive") {
9150
+ if (params.case !== "sensitive") {
8852
9151
  truthyArray = truthyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
8853
9152
  falsyArray = falsyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
8854
9153
  }
@@ -8862,7 +9161,7 @@ function _stringbool(Classes, _params) {
8862
9161
  type: "transform",
8863
9162
  transform: (input, payload) => {
8864
9163
  let data = input;
8865
- if (_case !== "sensitive") data = data.toLowerCase();
9164
+ if (params.case !== "sensitive") data = data.toLowerCase();
8866
9165
  if (truthySet.has(data)) {
8867
9166
  return true;
8868
9167
  } else if (falsySet.has(data)) {
@@ -8878,31 +9177,47 @@ function _stringbool(Classes, _params) {
8878
9177
  return {};
8879
9178
  }
8880
9179
  },
8881
- error: error$37
9180
+ error: params.error
8882
9181
  });
8883
9182
  const innerPipe = new _Pipe({
8884
9183
  type: "pipe",
8885
9184
  in: new _String({
8886
9185
  type: "string",
8887
- error: error$37
9186
+ error: params.error
8888
9187
  }),
8889
9188
  out: tx,
8890
- error: error$37
9189
+ error: params.error
8891
9190
  });
8892
9191
  const outerPipe = new _Pipe({
8893
9192
  type: "pipe",
8894
9193
  in: innerPipe,
8895
9194
  out: new _Boolean({
8896
9195
  type: "boolean",
8897
- error: error$37
9196
+ error: params.error
8898
9197
  }),
8899
- error: error$37
9198
+ error: params.error
8900
9199
  });
8901
9200
  return outerPipe;
8902
9201
  }
9202
+ function _stringFormat(Class$1, format, fnOrRegex, _params = {}) {
9203
+ const params = normalizeParams(_params);
9204
+ const def = {
9205
+ ...normalizeParams(_params),
9206
+ check: "string_format",
9207
+ type: "string",
9208
+ format,
9209
+ fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
9210
+ ...params
9211
+ };
9212
+ if (fnOrRegex instanceof RegExp) {
9213
+ def.pattern = fnOrRegex;
9214
+ }
9215
+ const inst = new Class$1(def);
9216
+ return inst;
9217
+ }
8903
9218
 
8904
9219
  //#endregion
8905
- //#region ../../node_modules/zod/dist/esm/v4/core/function.js
9220
+ //#region ../../node_modules/zod/v4/core/function.js
8906
9221
  var $ZodFunction = class {
8907
9222
  constructor(def) {
8908
9223
  this._def = def;
@@ -8973,7 +9288,7 @@ function _function(params) {
8973
9288
  }
8974
9289
 
8975
9290
  //#endregion
8976
- //#region ../../node_modules/zod/dist/esm/v4/core/to-json-schema.js
9291
+ //#region ../../node_modules/zod/v4/core/to-json-schema.js
8977
9292
  var JSONSchemaGenerator = class {
8978
9293
  constructor(params) {
8979
9294
  this.counter = 0;
@@ -9009,431 +9324,435 @@ var JSONSchemaGenerator = class {
9009
9324
  const result = {
9010
9325
  schema: {},
9011
9326
  count: 1,
9012
- cycle: undefined
9013
- };
9014
- this.seen.set(schema, result);
9015
- if (schema._zod.toJSONSchema) {
9016
- result.schema = schema._zod.toJSONSchema();
9017
- }
9018
- const params = {
9019
- ..._params,
9020
- schemaPath: [..._params.schemaPath, schema],
9327
+ cycle: undefined,
9021
9328
  path: _params.path
9022
9329
  };
9023
- const parent = schema._zod.parent;
9024
- if (parent) {
9025
- result.ref = parent;
9026
- this.process(parent, params);
9027
- this.seen.get(parent).isParent = true;
9330
+ this.seen.set(schema, result);
9331
+ const overrideSchema = schema._zod.toJSONSchema?.();
9332
+ if (overrideSchema) {
9333
+ result.schema = overrideSchema;
9028
9334
  } else {
9029
- const _json = result.schema;
9030
- switch (def.type) {
9031
- case "string": {
9032
- const json$1 = _json;
9033
- json$1.type = "string";
9034
- const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
9035
- if (typeof minimum === "number") json$1.minLength = minimum;
9036
- if (typeof maximum === "number") json$1.maxLength = maximum;
9037
- if (format) {
9038
- json$1.format = formatMap[format] ?? format;
9039
- if (json$1.format === "") delete json$1.format;
9335
+ const params = {
9336
+ ..._params,
9337
+ schemaPath: [..._params.schemaPath, schema],
9338
+ path: _params.path
9339
+ };
9340
+ const parent = schema._zod.parent;
9341
+ if (parent) {
9342
+ result.ref = parent;
9343
+ this.process(parent, params);
9344
+ this.seen.get(parent).isParent = true;
9345
+ } else {
9346
+ const _json = result.schema;
9347
+ switch (def.type) {
9348
+ case "string": {
9349
+ const json$1 = _json;
9350
+ json$1.type = "string";
9351
+ const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
9352
+ if (typeof minimum === "number") json$1.minLength = minimum;
9353
+ if (typeof maximum === "number") json$1.maxLength = maximum;
9354
+ if (format) {
9355
+ json$1.format = formatMap[format] ?? format;
9356
+ if (json$1.format === "") delete json$1.format;
9357
+ }
9358
+ if (contentEncoding) json$1.contentEncoding = contentEncoding;
9359
+ if (patterns && patterns.size > 0) {
9360
+ const regexes = [...patterns];
9361
+ if (regexes.length === 1) json$1.pattern = regexes[0].source;
9362
+ else if (regexes.length > 1) {
9363
+ result.schema.allOf = [...regexes.map((regex) => ({
9364
+ ...this.target === "draft-7" ? { type: "string" } : {},
9365
+ pattern: regex.source
9366
+ }))];
9367
+ }
9368
+ }
9369
+ break;
9040
9370
  }
9041
- if (contentEncoding) json$1.contentEncoding = contentEncoding;
9042
- if (patterns && patterns.size > 0) {
9043
- const regexes = [...patterns];
9044
- if (regexes.length === 1) json$1.pattern = regexes[0].source;
9045
- else if (regexes.length > 1) {
9046
- result.schema.allOf = [...regexes.map((regex) => ({
9047
- ...this.target === "draft-7" ? { type: "string" } : {},
9048
- pattern: regex.source
9049
- }))];
9371
+ case "number": {
9372
+ const json$1 = _json;
9373
+ const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
9374
+ if (typeof format === "string" && format.includes("int")) json$1.type = "integer";
9375
+ else json$1.type = "number";
9376
+ if (typeof exclusiveMinimum === "number") json$1.exclusiveMinimum = exclusiveMinimum;
9377
+ if (typeof minimum === "number") {
9378
+ json$1.minimum = minimum;
9379
+ if (typeof exclusiveMinimum === "number") {
9380
+ if (exclusiveMinimum >= minimum) delete json$1.minimum;
9381
+ else delete json$1.exclusiveMinimum;
9382
+ }
9050
9383
  }
9384
+ if (typeof exclusiveMaximum === "number") json$1.exclusiveMaximum = exclusiveMaximum;
9385
+ if (typeof maximum === "number") {
9386
+ json$1.maximum = maximum;
9387
+ if (typeof exclusiveMaximum === "number") {
9388
+ if (exclusiveMaximum <= maximum) delete json$1.maximum;
9389
+ else delete json$1.exclusiveMaximum;
9390
+ }
9391
+ }
9392
+ if (typeof multipleOf === "number") json$1.multipleOf = multipleOf;
9393
+ break;
9051
9394
  }
9052
- break;
9053
- }
9054
- case "number": {
9055
- const json$1 = _json;
9056
- const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
9057
- if (typeof format === "string" && format.includes("int")) json$1.type = "integer";
9058
- else json$1.type = "number";
9059
- if (typeof exclusiveMinimum === "number") json$1.exclusiveMinimum = exclusiveMinimum;
9060
- if (typeof minimum === "number") {
9061
- json$1.minimum = minimum;
9062
- if (typeof exclusiveMinimum === "number") {
9063
- if (exclusiveMinimum >= minimum) delete json$1.minimum;
9064
- else delete json$1.exclusiveMinimum;
9395
+ case "boolean": {
9396
+ const json$1 = _json;
9397
+ json$1.type = "boolean";
9398
+ break;
9399
+ }
9400
+ case "bigint": {
9401
+ if (this.unrepresentable === "throw") {
9402
+ throw new Error("BigInt cannot be represented in JSON Schema");
9065
9403
  }
9404
+ break;
9066
9405
  }
9067
- if (typeof exclusiveMaximum === "number") json$1.exclusiveMaximum = exclusiveMaximum;
9068
- if (typeof maximum === "number") {
9069
- json$1.maximum = maximum;
9070
- if (typeof exclusiveMaximum === "number") {
9071
- if (exclusiveMaximum <= maximum) delete json$1.maximum;
9072
- else delete json$1.exclusiveMaximum;
9406
+ case "symbol": {
9407
+ if (this.unrepresentable === "throw") {
9408
+ throw new Error("Symbols cannot be represented in JSON Schema");
9073
9409
  }
9410
+ break;
9074
9411
  }
9075
- if (typeof multipleOf === "number") json$1.multipleOf = multipleOf;
9076
- break;
9077
- }
9078
- case "boolean": {
9079
- const json$1 = _json;
9080
- json$1.type = "boolean";
9081
- break;
9082
- }
9083
- case "bigint": {
9084
- if (this.unrepresentable === "throw") {
9085
- throw new Error("BigInt cannot be represented in JSON Schema");
9412
+ case "null": {
9413
+ _json.type = "null";
9414
+ break;
9086
9415
  }
9087
- break;
9088
- }
9089
- case "symbol": {
9090
- if (this.unrepresentable === "throw") {
9091
- throw new Error("Symbols cannot be represented in JSON Schema");
9416
+ case "any": {
9417
+ break;
9092
9418
  }
9093
- break;
9094
- }
9095
- case "undefined": {
9096
- const json$1 = _json;
9097
- json$1.type = "null";
9098
- break;
9099
- }
9100
- case "null": {
9101
- _json.type = "null";
9102
- break;
9103
- }
9104
- case "any": {
9105
- break;
9106
- }
9107
- case "unknown": {
9108
- break;
9109
- }
9110
- case "never": {
9111
- _json.not = {};
9112
- break;
9113
- }
9114
- case "void": {
9115
- if (this.unrepresentable === "throw") {
9116
- throw new Error("Void cannot be represented in JSON Schema");
9419
+ case "unknown": {
9420
+ break;
9117
9421
  }
9118
- break;
9119
- }
9120
- case "date": {
9121
- if (this.unrepresentable === "throw") {
9122
- throw new Error("Date cannot be represented in JSON Schema");
9422
+ case "undefined": {
9423
+ if (this.unrepresentable === "throw") {
9424
+ throw new Error("Undefined cannot be represented in JSON Schema");
9425
+ }
9426
+ break;
9123
9427
  }
9124
- break;
9125
- }
9126
- case "array": {
9127
- const json$1 = _json;
9128
- const { minimum, maximum } = schema._zod.bag;
9129
- if (typeof minimum === "number") json$1.minItems = minimum;
9130
- if (typeof maximum === "number") json$1.maxItems = maximum;
9131
- json$1.type = "array";
9132
- json$1.items = this.process(def.element, {
9133
- ...params,
9134
- path: [...params.path, "items"]
9135
- });
9136
- break;
9137
- }
9138
- case "object": {
9139
- const json$1 = _json;
9140
- json$1.type = "object";
9141
- json$1.properties = {};
9142
- const shape = def.shape;
9143
- for (const key in shape) {
9144
- json$1.properties[key] = this.process(shape[key], {
9145
- ...params,
9146
- path: [
9147
- ...params.path,
9148
- "properties",
9149
- key
9150
- ]
9151
- });
9428
+ case "void": {
9429
+ if (this.unrepresentable === "throw") {
9430
+ throw new Error("Void cannot be represented in JSON Schema");
9431
+ }
9432
+ break;
9152
9433
  }
9153
- const allKeys = new Set(Object.keys(shape));
9154
- const requiredKeys = new Set([...allKeys].filter((key) => {
9155
- const v = def.shape[key]._zod;
9156
- if (this.io === "input") {
9157
- return v.optin === undefined;
9158
- } else {
9159
- return v.optout === undefined;
9434
+ case "never": {
9435
+ _json.not = {};
9436
+ break;
9437
+ }
9438
+ case "date": {
9439
+ if (this.unrepresentable === "throw") {
9440
+ throw new Error("Date cannot be represented in JSON Schema");
9160
9441
  }
9161
- }));
9162
- if (requiredKeys.size > 0) {
9163
- json$1.required = Array.from(requiredKeys);
9442
+ break;
9164
9443
  }
9165
- if (def.catchall?._zod.def.type === "never") {
9166
- json$1.additionalProperties = false;
9167
- } else if (!def.catchall) {
9168
- if (this.io === "output") json$1.additionalProperties = false;
9169
- } else if (def.catchall) {
9170
- json$1.additionalProperties = this.process(def.catchall, {
9444
+ case "array": {
9445
+ const json$1 = _json;
9446
+ const { minimum, maximum } = schema._zod.bag;
9447
+ if (typeof minimum === "number") json$1.minItems = minimum;
9448
+ if (typeof maximum === "number") json$1.maxItems = maximum;
9449
+ json$1.type = "array";
9450
+ json$1.items = this.process(def.element, {
9171
9451
  ...params,
9172
- path: [...params.path, "additionalProperties"]
9452
+ path: [...params.path, "items"]
9173
9453
  });
9454
+ break;
9174
9455
  }
9175
- break;
9176
- }
9177
- case "union": {
9178
- const json$1 = _json;
9179
- json$1.anyOf = def.options.map((x, i) => this.process(x, {
9180
- ...params,
9181
- path: [
9182
- ...params.path,
9183
- "anyOf",
9184
- i
9185
- ]
9186
- }));
9187
- break;
9188
- }
9189
- case "intersection": {
9190
- const json$1 = _json;
9191
- const a = this.process(def.left, {
9192
- ...params,
9193
- path: [
9194
- ...params.path,
9195
- "allOf",
9196
- 0
9197
- ]
9198
- });
9199
- const b = this.process(def.right, {
9200
- ...params,
9201
- path: [
9202
- ...params.path,
9203
- "allOf",
9204
- 1
9205
- ]
9206
- });
9207
- const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
9208
- const allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
9209
- json$1.allOf = allOf;
9210
- break;
9211
- }
9212
- case "tuple": {
9213
- const json$1 = _json;
9214
- json$1.type = "array";
9215
- const prefixItems = def.items.map((x, i) => this.process(x, {
9216
- ...params,
9217
- path: [
9218
- ...params.path,
9219
- "prefixItems",
9220
- i
9221
- ]
9222
- }));
9223
- if (this.target === "draft-2020-12") {
9224
- json$1.prefixItems = prefixItems;
9225
- } else {
9226
- json$1.items = prefixItems;
9456
+ case "object": {
9457
+ const json$1 = _json;
9458
+ json$1.type = "object";
9459
+ json$1.properties = {};
9460
+ const shape = def.shape;
9461
+ for (const key in shape) {
9462
+ json$1.properties[key] = this.process(shape[key], {
9463
+ ...params,
9464
+ path: [
9465
+ ...params.path,
9466
+ "properties",
9467
+ key
9468
+ ]
9469
+ });
9470
+ }
9471
+ const allKeys = new Set(Object.keys(shape));
9472
+ const requiredKeys = new Set([...allKeys].filter((key) => {
9473
+ const v = def.shape[key]._zod;
9474
+ if (this.io === "input") {
9475
+ return v.optin === undefined;
9476
+ } else {
9477
+ return v.optout === undefined;
9478
+ }
9479
+ }));
9480
+ if (requiredKeys.size > 0) {
9481
+ json$1.required = Array.from(requiredKeys);
9482
+ }
9483
+ if (def.catchall?._zod.def.type === "never") {
9484
+ json$1.additionalProperties = false;
9485
+ } else if (!def.catchall) {
9486
+ if (this.io === "output") json$1.additionalProperties = false;
9487
+ } else if (def.catchall) {
9488
+ json$1.additionalProperties = this.process(def.catchall, {
9489
+ ...params,
9490
+ path: [...params.path, "additionalProperties"]
9491
+ });
9492
+ }
9493
+ break;
9227
9494
  }
9228
- if (def.rest) {
9229
- const rest = this.process(def.rest, {
9495
+ case "union": {
9496
+ const json$1 = _json;
9497
+ json$1.anyOf = def.options.map((x, i) => this.process(x, {
9230
9498
  ...params,
9231
- path: [...params.path, "items"]
9499
+ path: [
9500
+ ...params.path,
9501
+ "anyOf",
9502
+ i
9503
+ ]
9504
+ }));
9505
+ break;
9506
+ }
9507
+ case "intersection": {
9508
+ const json$1 = _json;
9509
+ const a = this.process(def.left, {
9510
+ ...params,
9511
+ path: [
9512
+ ...params.path,
9513
+ "allOf",
9514
+ 0
9515
+ ]
9516
+ });
9517
+ const b = this.process(def.right, {
9518
+ ...params,
9519
+ path: [
9520
+ ...params.path,
9521
+ "allOf",
9522
+ 1
9523
+ ]
9232
9524
  });
9525
+ const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
9526
+ const allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
9527
+ json$1.allOf = allOf;
9528
+ break;
9529
+ }
9530
+ case "tuple": {
9531
+ const json$1 = _json;
9532
+ json$1.type = "array";
9533
+ const prefixItems = def.items.map((x, i) => this.process(x, {
9534
+ ...params,
9535
+ path: [
9536
+ ...params.path,
9537
+ "prefixItems",
9538
+ i
9539
+ ]
9540
+ }));
9233
9541
  if (this.target === "draft-2020-12") {
9234
- json$1.items = rest;
9542
+ json$1.prefixItems = prefixItems;
9235
9543
  } else {
9236
- json$1.additionalItems = rest;
9544
+ json$1.items = prefixItems;
9545
+ }
9546
+ if (def.rest) {
9547
+ const rest = this.process(def.rest, {
9548
+ ...params,
9549
+ path: [...params.path, "items"]
9550
+ });
9551
+ if (this.target === "draft-2020-12") {
9552
+ json$1.items = rest;
9553
+ } else {
9554
+ json$1.additionalItems = rest;
9555
+ }
9237
9556
  }
9557
+ if (def.rest) {
9558
+ json$1.items = this.process(def.rest, {
9559
+ ...params,
9560
+ path: [...params.path, "items"]
9561
+ });
9562
+ }
9563
+ const { minimum, maximum } = schema._zod.bag;
9564
+ if (typeof minimum === "number") json$1.minItems = minimum;
9565
+ if (typeof maximum === "number") json$1.maxItems = maximum;
9566
+ break;
9238
9567
  }
9239
- if (def.rest) {
9240
- json$1.items = this.process(def.rest, {
9568
+ case "record": {
9569
+ const json$1 = _json;
9570
+ json$1.type = "object";
9571
+ json$1.propertyNames = this.process(def.keyType, {
9241
9572
  ...params,
9242
- path: [...params.path, "items"]
9573
+ path: [...params.path, "propertyNames"]
9243
9574
  });
9575
+ json$1.additionalProperties = this.process(def.valueType, {
9576
+ ...params,
9577
+ path: [...params.path, "additionalProperties"]
9578
+ });
9579
+ break;
9244
9580
  }
9245
- const { minimum, maximum } = schema._zod.bag;
9246
- if (typeof minimum === "number") json$1.minItems = minimum;
9247
- if (typeof maximum === "number") json$1.maxItems = maximum;
9248
- break;
9249
- }
9250
- case "record": {
9251
- const json$1 = _json;
9252
- json$1.type = "object";
9253
- json$1.propertyNames = this.process(def.keyType, {
9254
- ...params,
9255
- path: [...params.path, "propertyNames"]
9256
- });
9257
- json$1.additionalProperties = this.process(def.valueType, {
9258
- ...params,
9259
- path: [...params.path, "additionalProperties"]
9260
- });
9261
- break;
9262
- }
9263
- case "map": {
9264
- if (this.unrepresentable === "throw") {
9265
- throw new Error("Map cannot be represented in JSON Schema");
9581
+ case "map": {
9582
+ if (this.unrepresentable === "throw") {
9583
+ throw new Error("Map cannot be represented in JSON Schema");
9584
+ }
9585
+ break;
9266
9586
  }
9267
- break;
9268
- }
9269
- case "set": {
9270
- if (this.unrepresentable === "throw") {
9271
- throw new Error("Set cannot be represented in JSON Schema");
9587
+ case "set": {
9588
+ if (this.unrepresentable === "throw") {
9589
+ throw new Error("Set cannot be represented in JSON Schema");
9590
+ }
9591
+ break;
9272
9592
  }
9273
- break;
9274
- }
9275
- case "enum": {
9276
- const json$1 = _json;
9277
- const values = getEnumValues(def.entries);
9278
- if (values.every((v) => typeof v === "number")) json$1.type = "number";
9279
- if (values.every((v) => typeof v === "string")) json$1.type = "string";
9280
- json$1.enum = values;
9281
- break;
9282
- }
9283
- case "literal": {
9284
- const json$1 = _json;
9285
- const vals = [];
9286
- for (const val of def.values) {
9287
- if (val === undefined) {
9288
- if (this.unrepresentable === "throw") {
9289
- throw new Error("Literal `undefined` cannot be represented in JSON Schema");
9290
- } else {}
9291
- } else if (typeof val === "bigint") {
9292
- if (this.unrepresentable === "throw") {
9293
- throw new Error("BigInt literals cannot be represented in JSON Schema");
9593
+ case "enum": {
9594
+ const json$1 = _json;
9595
+ const values = getEnumValues(def.entries);
9596
+ if (values.every((v) => typeof v === "number")) json$1.type = "number";
9597
+ if (values.every((v) => typeof v === "string")) json$1.type = "string";
9598
+ json$1.enum = values;
9599
+ break;
9600
+ }
9601
+ case "literal": {
9602
+ const json$1 = _json;
9603
+ const vals = [];
9604
+ for (const val of def.values) {
9605
+ if (val === undefined) {
9606
+ if (this.unrepresentable === "throw") {
9607
+ throw new Error("Literal `undefined` cannot be represented in JSON Schema");
9608
+ } else {}
9609
+ } else if (typeof val === "bigint") {
9610
+ if (this.unrepresentable === "throw") {
9611
+ throw new Error("BigInt literals cannot be represented in JSON Schema");
9612
+ } else {
9613
+ vals.push(Number(val));
9614
+ }
9294
9615
  } else {
9295
- vals.push(Number(val));
9616
+ vals.push(val);
9296
9617
  }
9618
+ }
9619
+ if (vals.length === 0) {} else if (vals.length === 1) {
9620
+ const val = vals[0];
9621
+ json$1.type = val === null ? "null" : typeof val;
9622
+ json$1.const = val;
9297
9623
  } else {
9298
- vals.push(val);
9624
+ if (vals.every((v) => typeof v === "number")) json$1.type = "number";
9625
+ if (vals.every((v) => typeof v === "string")) json$1.type = "string";
9626
+ if (vals.every((v) => typeof v === "boolean")) json$1.type = "string";
9627
+ if (vals.every((v) => v === null)) json$1.type = "null";
9628
+ json$1.enum = vals;
9299
9629
  }
9630
+ break;
9300
9631
  }
9301
- if (vals.length === 0) {} else if (vals.length === 1) {
9302
- const val = vals[0];
9303
- json$1.type = val === null ? "null" : typeof val;
9304
- json$1.const = val;
9305
- } else {
9306
- if (vals.every((v) => typeof v === "number")) json$1.type = "number";
9307
- if (vals.every((v) => typeof v === "string")) json$1.type = "string";
9308
- if (vals.every((v) => typeof v === "boolean")) json$1.type = "string";
9309
- if (vals.every((v) => v === null)) json$1.type = "null";
9310
- json$1.enum = vals;
9311
- }
9312
- break;
9313
- }
9314
- case "file": {
9315
- const json$1 = _json;
9316
- const file$1 = {
9317
- type: "string",
9318
- format: "binary",
9319
- contentEncoding: "binary"
9320
- };
9321
- const { minimum, maximum, mime } = schema._zod.bag;
9322
- if (minimum !== undefined) file$1.minLength = minimum;
9323
- if (maximum !== undefined) file$1.maxLength = maximum;
9324
- if (mime) {
9325
- if (mime.length === 1) {
9326
- file$1.contentMediaType = mime[0];
9327
- Object.assign(json$1, file$1);
9632
+ case "file": {
9633
+ const json$1 = _json;
9634
+ const file$1 = {
9635
+ type: "string",
9636
+ format: "binary",
9637
+ contentEncoding: "binary"
9638
+ };
9639
+ const { minimum, maximum, mime } = schema._zod.bag;
9640
+ if (minimum !== undefined) file$1.minLength = minimum;
9641
+ if (maximum !== undefined) file$1.maxLength = maximum;
9642
+ if (mime) {
9643
+ if (mime.length === 1) {
9644
+ file$1.contentMediaType = mime[0];
9645
+ Object.assign(json$1, file$1);
9646
+ } else {
9647
+ json$1.anyOf = mime.map((m) => {
9648
+ const mFile = {
9649
+ ...file$1,
9650
+ contentMediaType: m
9651
+ };
9652
+ return mFile;
9653
+ });
9654
+ }
9328
9655
  } else {
9329
- json$1.anyOf = mime.map((m) => {
9330
- const mFile = {
9331
- ...file$1,
9332
- contentMediaType: m
9333
- };
9334
- return mFile;
9335
- });
9656
+ Object.assign(json$1, file$1);
9336
9657
  }
9337
- } else {
9338
- Object.assign(json$1, file$1);
9658
+ break;
9339
9659
  }
9340
- break;
9341
- }
9342
- case "transform": {
9343
- if (this.unrepresentable === "throw") {
9344
- throw new Error("Transforms cannot be represented in JSON Schema");
9660
+ case "transform": {
9661
+ if (this.unrepresentable === "throw") {
9662
+ throw new Error("Transforms cannot be represented in JSON Schema");
9663
+ }
9664
+ break;
9345
9665
  }
9346
- break;
9347
- }
9348
- case "nullable": {
9349
- const inner = this.process(def.innerType, params);
9350
- _json.anyOf = [inner, { type: "null" }];
9351
- break;
9352
- }
9353
- case "nonoptional": {
9354
- this.process(def.innerType, params);
9355
- result.ref = def.innerType;
9356
- break;
9357
- }
9358
- case "success": {
9359
- const json$1 = _json;
9360
- json$1.type = "boolean";
9361
- break;
9362
- }
9363
- case "default": {
9364
- this.process(def.innerType, params);
9365
- result.ref = def.innerType;
9366
- _json.default = def.defaultValue;
9367
- break;
9368
- }
9369
- case "prefault": {
9370
- this.process(def.innerType, params);
9371
- result.ref = def.innerType;
9372
- if (this.io === "input") _json._prefault = def.defaultValue;
9373
- break;
9374
- }
9375
- case "catch": {
9376
- this.process(def.innerType, params);
9377
- result.ref = def.innerType;
9378
- let catchValue;
9379
- try {
9380
- catchValue = def.catchValue(undefined);
9381
- } catch {
9382
- throw new Error("Dynamic catch values are not supported in JSON Schema");
9666
+ case "nullable": {
9667
+ const inner = this.process(def.innerType, params);
9668
+ _json.anyOf = [inner, { type: "null" }];
9669
+ break;
9383
9670
  }
9384
- _json.default = catchValue;
9385
- break;
9386
- }
9387
- case "nan": {
9388
- if (this.unrepresentable === "throw") {
9389
- throw new Error("NaN cannot be represented in JSON Schema");
9671
+ case "nonoptional": {
9672
+ this.process(def.innerType, params);
9673
+ result.ref = def.innerType;
9674
+ break;
9390
9675
  }
9391
- break;
9392
- }
9393
- case "template_literal": {
9394
- const json$1 = _json;
9395
- const pattern = schema._zod.pattern;
9396
- if (!pattern) throw new Error("Pattern not found in template literal");
9397
- json$1.type = "string";
9398
- json$1.pattern = pattern.source;
9399
- break;
9400
- }
9401
- case "pipe": {
9402
- const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
9403
- this.process(innerType, params);
9404
- result.ref = innerType;
9405
- break;
9406
- }
9407
- case "readonly": {
9408
- this.process(def.innerType, params);
9409
- result.ref = def.innerType;
9410
- _json.readOnly = true;
9411
- break;
9412
- }
9413
- case "promise": {
9414
- this.process(def.innerType, params);
9415
- result.ref = def.innerType;
9416
- break;
9417
- }
9418
- case "optional": {
9419
- this.process(def.innerType, params);
9420
- result.ref = def.innerType;
9421
- break;
9422
- }
9423
- case "lazy": {
9424
- const innerType = schema._zod.innerType;
9425
- this.process(innerType, params);
9426
- result.ref = innerType;
9427
- break;
9428
- }
9429
- case "custom": {
9430
- if (this.unrepresentable === "throw") {
9431
- throw new Error("Custom types cannot be represented in JSON Schema");
9676
+ case "success": {
9677
+ const json$1 = _json;
9678
+ json$1.type = "boolean";
9679
+ break;
9680
+ }
9681
+ case "default": {
9682
+ this.process(def.innerType, params);
9683
+ result.ref = def.innerType;
9684
+ _json.default = JSON.parse(JSON.stringify(def.defaultValue));
9685
+ break;
9686
+ }
9687
+ case "prefault": {
9688
+ this.process(def.innerType, params);
9689
+ result.ref = def.innerType;
9690
+ if (this.io === "input") _json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
9691
+ break;
9692
+ }
9693
+ case "catch": {
9694
+ this.process(def.innerType, params);
9695
+ result.ref = def.innerType;
9696
+ let catchValue;
9697
+ try {
9698
+ catchValue = def.catchValue(undefined);
9699
+ } catch {
9700
+ throw new Error("Dynamic catch values are not supported in JSON Schema");
9701
+ }
9702
+ _json.default = catchValue;
9703
+ break;
9704
+ }
9705
+ case "nan": {
9706
+ if (this.unrepresentable === "throw") {
9707
+ throw new Error("NaN cannot be represented in JSON Schema");
9708
+ }
9709
+ break;
9710
+ }
9711
+ case "template_literal": {
9712
+ const json$1 = _json;
9713
+ const pattern = schema._zod.pattern;
9714
+ if (!pattern) throw new Error("Pattern not found in template literal");
9715
+ json$1.type = "string";
9716
+ json$1.pattern = pattern.source;
9717
+ break;
9718
+ }
9719
+ case "pipe": {
9720
+ const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
9721
+ this.process(innerType, params);
9722
+ result.ref = innerType;
9723
+ break;
9724
+ }
9725
+ case "readonly": {
9726
+ this.process(def.innerType, params);
9727
+ result.ref = def.innerType;
9728
+ _json.readOnly = true;
9729
+ break;
9730
+ }
9731
+ case "promise": {
9732
+ this.process(def.innerType, params);
9733
+ result.ref = def.innerType;
9734
+ break;
9735
+ }
9736
+ case "optional": {
9737
+ this.process(def.innerType, params);
9738
+ result.ref = def.innerType;
9739
+ break;
9740
+ }
9741
+ case "lazy": {
9742
+ const innerType = schema._zod.innerType;
9743
+ this.process(innerType, params);
9744
+ result.ref = innerType;
9745
+ break;
9746
+ }
9747
+ case "custom": {
9748
+ if (this.unrepresentable === "throw") {
9749
+ throw new Error("Custom types cannot be represented in JSON Schema");
9750
+ }
9751
+ break;
9752
+ }
9753
+ default: {
9754
+ def;
9432
9755
  }
9433
- break;
9434
- }
9435
- default: {
9436
- def;
9437
9756
  }
9438
9757
  }
9439
9758
  }
@@ -9460,12 +9779,15 @@ var JSONSchemaGenerator = class {
9460
9779
  const defsSegment = this.target === "draft-2020-12" ? "$defs" : "definitions";
9461
9780
  if (params.external) {
9462
9781
  const externalId = params.external.registry.get(entry[0])?.id;
9463
- if (externalId) return { ref: params.external.uri(externalId) };
9782
+ const uriGenerator = params.external.uri ?? ((id$1) => id$1);
9783
+ if (externalId) {
9784
+ return { ref: uriGenerator(externalId) };
9785
+ }
9464
9786
  const id = entry[1].defId ?? entry[1].schema.id ?? `schema${this.counter++}`;
9465
9787
  entry[1].defId = id;
9466
9788
  return {
9467
9789
  defId: id,
9468
- ref: `${params.external.uri("__shared")}#/${defsSegment}/${id}`
9790
+ ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}`
9469
9791
  };
9470
9792
  }
9471
9793
  if (entry[1] === root) {
@@ -9493,6 +9815,14 @@ var JSONSchemaGenerator = class {
9493
9815
  }
9494
9816
  schema$1.$ref = ref;
9495
9817
  };
9818
+ if (params.cycles === "throw") {
9819
+ for (const entry of this.seen.entries()) {
9820
+ const seen = entry[1];
9821
+ if (seen.cycle) {
9822
+ throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + "\n\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.");
9823
+ }
9824
+ }
9825
+ }
9496
9826
  for (const entry of this.seen.entries()) {
9497
9827
  const seen = entry[1];
9498
9828
  if (schema === entry[0]) {
@@ -9512,11 +9842,7 @@ var JSONSchemaGenerator = class {
9512
9842
  continue;
9513
9843
  }
9514
9844
  if (seen.cycle) {
9515
- if (params.cycles === "throw") {
9516
- throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + "\n\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.");
9517
- } else if (params.cycles === "ref") {
9518
- extractToDef(entry);
9519
- }
9845
+ extractToDef(entry);
9520
9846
  continue;
9521
9847
  }
9522
9848
  if (seen.count > 1) {
@@ -9548,7 +9874,8 @@ var JSONSchemaGenerator = class {
9548
9874
  }
9549
9875
  if (!seen.isParent) this.override({
9550
9876
  zodSchema,
9551
- jsonSchema: schema$1
9877
+ jsonSchema: schema$1,
9878
+ path: seen.path ?? []
9552
9879
  });
9553
9880
  };
9554
9881
  for (const entry of [...this.seen.entries()].reverse()) {
@@ -9562,6 +9889,11 @@ var JSONSchemaGenerator = class {
9562
9889
  } else {
9563
9890
  console.warn(`Invalid target: ${this.target}`);
9564
9891
  }
9892
+ if (params.external?.uri) {
9893
+ const id = params.external.registry.get(schema)?.id;
9894
+ if (!id) throw new Error("Schema is missing an `id` property");
9895
+ result.$id = params.external.uri(id);
9896
+ }
9565
9897
  Object.assign(result, root.def);
9566
9898
  const defs = params.external?.defs ?? {};
9567
9899
  for (const entry of this.seen.entries()) {
@@ -9570,11 +9902,13 @@ var JSONSchemaGenerator = class {
9570
9902
  defs[seen.defId] = seen.def;
9571
9903
  }
9572
9904
  }
9573
- if (!params.external && Object.keys(defs).length > 0) {
9574
- if (this.target === "draft-2020-12") {
9575
- result.$defs = defs;
9576
- } else {
9577
- result.definitions = defs;
9905
+ if (params.external) {} else {
9906
+ if (Object.keys(defs).length > 0) {
9907
+ if (this.target === "draft-2020-12") {
9908
+ result.$defs = defs;
9909
+ } else {
9910
+ result.definitions = defs;
9911
+ }
9578
9912
  }
9579
9913
  }
9580
9914
  try {
@@ -9595,7 +9929,7 @@ function toJSONSchema(input, _params) {
9595
9929
  const schemas = {};
9596
9930
  const external = {
9597
9931
  registry: input,
9598
- uri: _params?.uri || ((id) => id),
9932
+ uri: _params?.uri,
9599
9933
  defs
9600
9934
  };
9601
9935
  for (const entry of input._idmap.entries()) {
@@ -9706,11 +10040,11 @@ function isTransforming(_schema, _ctx) {
9706
10040
  }
9707
10041
 
9708
10042
  //#endregion
9709
- //#region ../../node_modules/zod/dist/esm/v4/core/json-schema.js
10043
+ //#region ../../node_modules/zod/v4/core/json-schema.js
9710
10044
  var json_schema_exports = {};
9711
10045
 
9712
10046
  //#endregion
9713
- //#region ../../node_modules/zod/dist/esm/v4/core/index.js
10047
+ //#region ../../node_modules/zod/v4/core/index.js
9714
10048
  var core_exports = {};
9715
10049
  __export(core_exports, {
9716
10050
  $ZodAny: () => $ZodAny,
@@ -9749,6 +10083,7 @@ __export(core_exports, {
9749
10083
  $ZodCheckStringFormat: () => $ZodCheckStringFormat,
9750
10084
  $ZodCheckUpperCase: () => $ZodCheckUpperCase,
9751
10085
  $ZodCustom: () => $ZodCustom,
10086
+ $ZodCustomStringFormat: () => $ZodCustomStringFormat,
9752
10087
  $ZodDate: () => $ZodDate,
9753
10088
  $ZodDefault: () => $ZodDefault,
9754
10089
  $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion,
@@ -9813,6 +10148,8 @@ __export(core_exports, {
9813
10148
  Doc: () => Doc,
9814
10149
  JSONSchema: () => json_schema_exports,
9815
10150
  JSONSchemaGenerator: () => JSONSchemaGenerator,
10151
+ NEVER: () => NEVER,
10152
+ TimePrecision: () => TimePrecision,
9816
10153
  _any: () => _any,
9817
10154
  _array: () => _array,
9818
10155
  _base64: () => _base64,
@@ -9902,6 +10239,7 @@ __export(core_exports, {
9902
10239
  _size: () => _size,
9903
10240
  _startsWith: () => _startsWith,
9904
10241
  _string: () => _string,
10242
+ _stringFormat: () => _stringFormat,
9905
10243
  _stringbool: () => _stringbool,
9906
10244
  _success: () => _success,
9907
10245
  _symbol: () => _symbol,
@@ -9951,7 +10289,7 @@ __export(core_exports, {
9951
10289
  });
9952
10290
 
9953
10291
  //#endregion
9954
- //#region ../../node_modules/zod/dist/esm/v4/classic/iso.js
10292
+ //#region ../../node_modules/zod/v4/classic/iso.js
9955
10293
  var iso_exports = {};
9956
10294
  __export(iso_exports, {
9957
10295
  ZodISODate: () => ZodISODate,
@@ -9993,7 +10331,7 @@ function duration(params) {
9993
10331
  }
9994
10332
 
9995
10333
  //#endregion
9996
- //#region ../../node_modules/zod/dist/esm/v4/classic/errors.js
10334
+ //#region ../../node_modules/zod/v4/classic/errors.js
9997
10335
  const initializer = (inst, issues) => {
9998
10336
  $ZodError.init(inst, issues);
9999
10337
  inst.name = "ZodError";
@@ -10011,14 +10349,14 @@ const ZodError = $constructor("ZodError", initializer);
10011
10349
  const ZodRealError = $constructor("ZodError", initializer, { Parent: Error });
10012
10350
 
10013
10351
  //#endregion
10014
- //#region ../../node_modules/zod/dist/esm/v4/classic/parse.js
10352
+ //#region ../../node_modules/zod/v4/classic/parse.js
10015
10353
  const parse = /* @__PURE__ */ _parse(ZodRealError);
10016
10354
  const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
10017
10355
  const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
10018
10356
  const safeParseAsync = /* @__PURE__ */ _safeParseAsync(ZodRealError);
10019
10357
 
10020
10358
  //#endregion
10021
- //#region ../../node_modules/zod/dist/esm/v4/classic/schemas.js
10359
+ //#region ../../node_modules/zod/v4/classic/schemas.js
10022
10360
  const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
10023
10361
  $ZodType.init(inst, def);
10024
10362
  inst.def = def;
@@ -10286,6 +10624,13 @@ const ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
10286
10624
  function jwt(params) {
10287
10625
  return _jwt(ZodJWT, params);
10288
10626
  }
10627
+ const ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => {
10628
+ $ZodCustomStringFormat.init(inst, def);
10629
+ ZodStringFormat.init(inst, def);
10630
+ });
10631
+ function stringFormat(format, fnOrRegex, _params = {}) {
10632
+ return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
10633
+ }
10289
10634
  const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
10290
10635
  $ZodNumber.init(inst, def);
10291
10636
  ZodType.init(inst, def);
@@ -10455,9 +10800,7 @@ function keyof(schema) {
10455
10800
  const ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
10456
10801
  $ZodObject.init(inst, def);
10457
10802
  ZodType.init(inst, def);
10458
- defineLazy(inst, "shape", () => {
10459
- return Object.fromEntries(Object.entries(inst._zod.def.shape));
10460
- });
10803
+ defineLazy(inst, "shape", () => def.shape);
10461
10804
  inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
10462
10805
  inst.catchall = (catchall) => inst.clone({
10463
10806
  ...inst._zod.def,
@@ -10902,11 +11245,8 @@ const ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
10902
11245
  $ZodCustom.init(inst, def);
10903
11246
  ZodType.init(inst, def);
10904
11247
  });
10905
- function check(fn, params) {
10906
- const ch = new $ZodCheck({
10907
- check: "custom",
10908
- ...normalizeParams(params)
10909
- });
11248
+ function check(fn) {
11249
+ const ch = new $ZodCheck({ check: "custom" });
10910
11250
  ch._zod.check = fn;
10911
11251
  return ch;
10912
11252
  }
@@ -10916,7 +11256,7 @@ function custom(fn, _params) {
10916
11256
  function refine(fn, _params = {}) {
10917
11257
  return _refine(ZodCustom, fn, _params);
10918
11258
  }
10919
- function superRefine(fn, params) {
11259
+ function superRefine(fn) {
10920
11260
  const ch = check((payload) => {
10921
11261
  payload.addIssue = (issue$1) => {
10922
11262
  if (typeof issue$1 === "string") {
@@ -10932,7 +11272,7 @@ function superRefine(fn, params) {
10932
11272
  }
10933
11273
  };
10934
11274
  return fn(payload.value, payload);
10935
- }, params);
11275
+ });
10936
11276
  return ch;
10937
11277
  }
10938
11278
  function _instanceof(cls, params = { error: `Input not instance of ${cls.name}` }) {
@@ -10970,7 +11310,7 @@ function preprocess(fn, schema) {
10970
11310
  }
10971
11311
 
10972
11312
  //#endregion
10973
- //#region ../../node_modules/zod/dist/esm/v4/classic/compat.js
11313
+ //#region ../../node_modules/zod/v4/classic/compat.js
10974
11314
  /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
10975
11315
  const ZodIssueCode = {
10976
11316
  invalid_type: "invalid_type",
@@ -10985,10 +11325,6 @@ const ZodIssueCode = {
10985
11325
  invalid_value: "invalid_value",
10986
11326
  custom: "custom"
10987
11327
  };
10988
- /** @deprecated Not necessary in Zod 4. */
10989
- const INVALID = Object.freeze({ status: "aborted" });
10990
- /** A special constant with type `never` */
10991
- const NEVER = INVALID;
10992
11328
  /** @deprecated Use `z.config(params)` instead. */
10993
11329
  function setErrorMap(map$1) {
10994
11330
  config$2({ customError: map$1 });
@@ -10999,7 +11335,7 @@ function getErrorMap() {
10999
11335
  }
11000
11336
 
11001
11337
  //#endregion
11002
- //#region ../../node_modules/zod/dist/esm/v4/classic/coerce.js
11338
+ //#region ../../node_modules/zod/v4/classic/coerce.js
11003
11339
  var coerce_exports = {};
11004
11340
  __export(coerce_exports, {
11005
11341
  bigint: () => bigint,
@@ -11025,13 +11361,14 @@ function date(params) {
11025
11361
  }
11026
11362
 
11027
11363
  //#endregion
11028
- //#region ../../node_modules/zod/dist/esm/v4/classic/external.js
11364
+ //#region ../../node_modules/zod/v4/classic/external.js
11029
11365
  var external_exports = {};
11030
11366
  __export(external_exports, {
11031
11367
  $brand: () => $brand,
11032
11368
  $input: () => $input,
11033
11369
  $output: () => $output,
11034
11370
  NEVER: () => NEVER,
11371
+ TimePrecision: () => TimePrecision,
11035
11372
  ZodAny: () => ZodAny,
11036
11373
  ZodArray: () => ZodArray,
11037
11374
  ZodBase64: () => ZodBase64,
@@ -11045,6 +11382,7 @@ __export(external_exports, {
11045
11382
  ZodCUID2: () => ZodCUID2,
11046
11383
  ZodCatch: () => ZodCatch,
11047
11384
  ZodCustom: () => ZodCustom,
11385
+ ZodCustomStringFormat: () => ZodCustomStringFormat,
11048
11386
  ZodDate: () => ZodDate,
11049
11387
  ZodDefault: () => ZodDefault,
11050
11388
  ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
@@ -11206,6 +11544,7 @@ __export(external_exports, {
11206
11544
  startsWith: () => _startsWith,
11207
11545
  strictObject: () => strictObject,
11208
11546
  string: () => string$1,
11547
+ stringFormat: () => stringFormat,
11209
11548
  stringbool: () => stringbool,
11210
11549
  success: () => success,
11211
11550
  superRefine: () => superRefine,
@@ -11236,11 +11575,11 @@ __export(external_exports, {
11236
11575
  config$2(en_default());
11237
11576
 
11238
11577
  //#endregion
11239
- //#region ../../node_modules/zod/dist/esm/v4/classic/index.js
11578
+ //#region ../../node_modules/zod/v4/classic/index.js
11240
11579
  var classic_default = external_exports;
11241
11580
 
11242
11581
  //#endregion
11243
- //#region ../../node_modules/zod/dist/esm/v4/index.js
11582
+ //#region ../../node_modules/zod/v4/index.js
11244
11583
  var v4_default = classic_default;
11245
11584
 
11246
11585
  //#endregion
@@ -11261,12 +11600,12 @@ var v4_default = classic_default;
11261
11600
  function validate(schema, value) {
11262
11601
  try {
11263
11602
  return schema.parse(value);
11264
- } catch (error$37) {
11265
- if (error$37 instanceof ZodError) {
11266
- const formattedErrors = error$37.issues.map((err) => `- ${err.path.join(".")}: ${err.message}`).join("\n");
11267
- throw new Error(`Validation error${error$37.issues.length > 1 ? "s" : ""}:\n${formattedErrors}`);
11603
+ } catch (error$39) {
11604
+ if (error$39 instanceof ZodError) {
11605
+ const formattedErrors = error$39.issues.map((err) => `- ${err.path.join(".")}: ${err.message}`).join("\n");
11606
+ throw new Error(`Validation error${error$39.issues.length > 1 ? "s" : ""}:\n${formattedErrors}`);
11268
11607
  }
11269
- throw error$37;
11608
+ throw error$39;
11270
11609
  }
11271
11610
  }
11272
11611
 
@@ -11569,8 +11908,8 @@ async function loadEnvironmentEnv(validateEnv, prod, path$1 = process.cwd()) {
11569
11908
  ...parsed,
11570
11909
  ...defaultEnv
11571
11910
  });
11572
- } catch (error$37) {
11573
- cancel(error$37.message);
11911
+ } catch (error$39) {
11912
+ cancel(error$39.message);
11574
11913
  return {};
11575
11914
  }
11576
11915
  }