@settlemint/sdk-viem 2.4.1-prb593b885 → 2.4.1-prc7777fc9

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.
@@ -15,9 +15,7 @@ var __export = (target, all) => {
15
15
  };
16
16
 
17
17
  //#endregion
18
- //#region ../../node_modules/zod/v4/core/core.js
19
- /** A special constant with type `never` */
20
- const NEVER = Object.freeze({ status: "aborted" });
18
+ //#region ../../node_modules/zod/dist/esm/v4/core/core.js
21
19
  function $constructor(name, initializer$2, params) {
22
20
  function init(inst, def) {
23
21
  var _a;
@@ -68,7 +66,7 @@ function config(newConfig) {
68
66
  }
69
67
 
70
68
  //#endregion
71
- //#region ../../node_modules/zod/v4/core/util.js
69
+ //#region ../../node_modules/zod/dist/esm/v4/core/util.js
72
70
  var util_exports = {};
73
71
  __export(util_exports, {
74
72
  BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
@@ -83,7 +81,6 @@ __export(util_exports, {
83
81
  assertNotEqual: () => assertNotEqual,
84
82
  assignProp: () => assignProp,
85
83
  cached: () => cached,
86
- captureStackTrace: () => captureStackTrace,
87
84
  cleanEnum: () => cleanEnum,
88
85
  cleanRegex: () => cleanRegex,
89
86
  clone: () => clone,
@@ -222,14 +219,10 @@ function randomString(length = 10) {
222
219
  function esc(str) {
223
220
  return JSON.stringify(str);
224
221
  }
225
- const captureStackTrace = Error.captureStackTrace ? Error.captureStackTrace : (..._args) => {};
226
222
  function isObject(data) {
227
223
  return typeof data === "object" && data !== null && !Array.isArray(data);
228
224
  }
229
225
  const allowsEval = cached(() => {
230
- if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
231
- return false;
232
- }
233
226
  try {
234
227
  const F = Function;
235
228
  new F("");
@@ -238,6 +231,9 @@ const allowsEval = cached(() => {
238
231
  return false;
239
232
  }
240
233
  });
234
+ function _isObject(o) {
235
+ return Object.prototype.toString.call(o) === "[object Object]";
236
+ }
241
237
  function isPlainObject(o) {
242
238
  if (isObject(o) === false) return false;
243
239
  const ctor = o.constructor;
@@ -417,9 +413,6 @@ function omit(schema, mask) {
417
413
  });
418
414
  }
419
415
  function extend(schema, shape) {
420
- if (!isPlainObject(shape)) {
421
- throw new Error("Invalid input to extend: expected a plain object");
422
- }
423
416
  const def = {
424
417
  ...schema._zod.def,
425
418
  get shape() {
@@ -507,7 +500,7 @@ function required(Class$1, schema, mask) {
507
500
  }
508
501
  function aborted(x, startIndex = 0) {
509
502
  for (let i = startIndex; i < x.issues.length; i++) {
510
- if (x.issues[i]?.continue !== true) return true;
503
+ if (x.issues[i].continue !== true) return true;
511
504
  }
512
505
  return false;
513
506
  }
@@ -571,7 +564,7 @@ var Class = class {
571
564
  };
572
565
 
573
566
  //#endregion
574
- //#region ../../node_modules/zod/v4/core/errors.js
567
+ //#region ../../node_modules/zod/dist/esm/v4/core/errors.js
575
568
  const initializer$1 = (inst, def) => {
576
569
  inst.name = "$ZodError";
577
570
  Object.defineProperty(inst, "_zod", {
@@ -588,17 +581,13 @@ const initializer$1 = (inst, def) => {
588
581
  },
589
582
  enumerable: true
590
583
  });
591
- Object.defineProperty(inst, "toString", {
592
- value: () => inst.message,
593
- enumerable: false
594
- });
595
584
  };
596
585
  const $ZodError = $constructor("$ZodError", initializer$1);
597
586
  const $ZodRealError = $constructor("$ZodError", initializer$1, { Parent: Error });
598
- function flattenError(error$39, mapper = (issue$1) => issue$1.message) {
587
+ function flattenError(error$37, mapper = (issue$1) => issue$1.message) {
599
588
  const fieldErrors = {};
600
589
  const formErrors = [];
601
- for (const sub of error$39.issues) {
590
+ for (const sub of error$37.issues) {
602
591
  if (sub.path.length > 0) {
603
592
  fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
604
593
  fieldErrors[sub.path[0]].push(mapper(sub));
@@ -611,13 +600,13 @@ function flattenError(error$39, mapper = (issue$1) => issue$1.message) {
611
600
  fieldErrors
612
601
  };
613
602
  }
614
- function formatError(error$39, _mapper) {
603
+ function formatError(error$37, _mapper) {
615
604
  const mapper = _mapper || function(issue$1) {
616
605
  return issue$1.message;
617
606
  };
618
607
  const fieldErrors = { _errors: [] };
619
- const processError = (error$40) => {
620
- for (const issue$1 of error$40.issues) {
608
+ const processError = (error$38) => {
609
+ for (const issue$1 of error$38.issues) {
621
610
  if (issue$1.code === "invalid_union" && issue$1.errors.length) {
622
611
  issue$1.errors.map((issues) => processError({ issues }));
623
612
  } else if (issue$1.code === "invalid_key") {
@@ -644,17 +633,17 @@ function formatError(error$39, _mapper) {
644
633
  }
645
634
  }
646
635
  };
647
- processError(error$39);
636
+ processError(error$37);
648
637
  return fieldErrors;
649
638
  }
650
- function treeifyError(error$39, _mapper) {
639
+ function treeifyError(error$37, _mapper) {
651
640
  const mapper = _mapper || function(issue$1) {
652
641
  return issue$1.message;
653
642
  };
654
643
  const result = { errors: [] };
655
- const processError = (error$40, path = []) => {
644
+ const processError = (error$38, path = []) => {
656
645
  var _a, _b;
657
- for (const issue$1 of error$40.issues) {
646
+ for (const issue$1 of error$38.issues) {
658
647
  if (issue$1.code === "invalid_union" && issue$1.errors.length) {
659
648
  issue$1.errors.map((issues) => processError({ issues }, issue$1.path));
660
649
  } else if (issue$1.code === "invalid_key") {
@@ -689,7 +678,7 @@ function treeifyError(error$39, _mapper) {
689
678
  }
690
679
  }
691
680
  };
692
- processError(error$39);
681
+ processError(error$37);
693
682
  return result;
694
683
  }
695
684
  /** Format a ZodError as a human-readable string in the following form.
@@ -737,9 +726,9 @@ function toDotPath(path) {
737
726
  }
738
727
  return segs.join("");
739
728
  }
740
- function prettifyError(error$39) {
729
+ function prettifyError(error$37) {
741
730
  const lines = [];
742
- const issues = [...error$39.issues].sort((a, b) => a.path.length - b.path.length);
731
+ const issues = [...error$37.issues].sort((a, b) => a.path.length - b.path.length);
743
732
  for (const issue$1 of issues) {
744
733
  lines.push(`✖ ${issue$1.message}`);
745
734
  if (issue$1.path?.length) lines.push(` → at ${toDotPath(issue$1.path)}`);
@@ -748,7 +737,7 @@ function prettifyError(error$39) {
748
737
  }
749
738
 
750
739
  //#endregion
751
- //#region ../../node_modules/zod/v4/core/parse.js
740
+ //#region ../../node_modules/zod/dist/esm/v4/core/parse.js
752
741
  const _parse = (_Err) => (schema, value, _ctx, _params) => {
753
742
  const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
754
743
  const result = schema._zod.run({
@@ -760,7 +749,7 @@ const _parse = (_Err) => (schema, value, _ctx, _params) => {
760
749
  }
761
750
  if (result.issues.length) {
762
751
  const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
763
- captureStackTrace(e, _params?.callee);
752
+ Error.captureStackTrace(e, _params?.callee);
764
753
  throw e;
765
754
  }
766
755
  return result.value;
@@ -775,7 +764,7 @@ const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
775
764
  if (result instanceof Promise) result = await result;
776
765
  if (result.issues.length) {
777
766
  const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
778
- captureStackTrace(e, params?.callee);
767
+ Error.captureStackTrace(e, params?.callee);
779
768
  throw e;
780
769
  }
781
770
  return result.value;
@@ -820,9 +809,10 @@ const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
820
809
  const safeParseAsync$1 = /* @__PURE__ */ _safeParseAsync($ZodRealError);
821
810
 
822
811
  //#endregion
823
- //#region ../../node_modules/zod/v4/core/regexes.js
812
+ //#region ../../node_modules/zod/dist/esm/v4/core/regexes.js
824
813
  var regexes_exports = {};
825
814
  __export(regexes_exports, {
815
+ _emoji: () => _emoji$1,
826
816
  base64: () => base64$1,
827
817
  base64url: () => base64url$1,
828
818
  bigint: () => bigint$2,
@@ -908,23 +898,27 @@ const base64url$1 = /^[A-Za-z0-9_-]*$/;
908
898
  const hostname = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;
909
899
  const domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
910
900
  const e164$1 = /^\+(?:[0-9]){6,14}[0-9]$/;
911
- 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])))`;
901
+ 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])))`;
912
902
  const date$3 = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
913
903
  function timeSource(args) {
914
- const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
915
- 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+)?)?`;
904
+ let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
905
+ if (args.precision) {
906
+ regex = `${regex}\\.\\d{${args.precision}}`;
907
+ } else if (args.precision == null) {
908
+ regex = `${regex}(\\.\\d+)?`;
909
+ }
916
910
  return regex;
917
911
  }
918
912
  function time$1(args) {
919
913
  return new RegExp(`^${timeSource(args)}$`);
920
914
  }
921
915
  function datetime$1(args) {
922
- const time$2 = timeSource({ precision: args.precision });
923
- const opts = ["Z"];
924
- if (args.local) opts.push("");
925
- if (args.offset) opts.push(`([+-]\\d{2}:\\d{2})`);
926
- const timeRegex = `${time$2}(?:${opts.join("|")})`;
927
- return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
916
+ let regex = `${dateSource}T${timeSource(args)}`;
917
+ const opts = [];
918
+ opts.push(args.local ? `Z?` : `Z`);
919
+ if (args.offset) opts.push(`([+-]\\d{2}:?\\d{2})`);
920
+ regex = `${regex}(${opts.join("|")})`;
921
+ return new RegExp(`^${regex}$`);
928
922
  }
929
923
  const string$2 = (params) => {
930
924
  const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
@@ -940,7 +934,7 @@ const lowercase = /^[^A-Z]*$/;
940
934
  const uppercase = /^[^a-z]*$/;
941
935
 
942
936
  //#endregion
943
- //#region ../../node_modules/zod/v4/core/checks.js
937
+ //#region ../../node_modules/zod/dist/esm/v4/core/checks.js
944
938
  const $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
945
939
  var _a;
946
940
  inst._zod ?? (inst._zod = {});
@@ -1131,12 +1125,11 @@ const $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntForma
1131
1125
  };
1132
1126
  });
1133
1127
  const $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
1134
- var _a;
1135
1128
  $ZodCheck.init(inst, def);
1136
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1129
+ inst._zod.when = (payload) => {
1137
1130
  const val = payload.value;
1138
1131
  return !nullish$1(val) && val.size !== undefined;
1139
- });
1132
+ };
1140
1133
  inst._zod.onattach.push((inst$1) => {
1141
1134
  const curr = inst$1._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1142
1135
  if (def.maximum < curr) inst$1._zod.bag.maximum = def.maximum;
@@ -1156,12 +1149,11 @@ const $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst,
1156
1149
  };
1157
1150
  });
1158
1151
  const $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
1159
- var _a;
1160
1152
  $ZodCheck.init(inst, def);
1161
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1153
+ inst._zod.when = (payload) => {
1162
1154
  const val = payload.value;
1163
1155
  return !nullish$1(val) && val.size !== undefined;
1164
- });
1156
+ };
1165
1157
  inst._zod.onattach.push((inst$1) => {
1166
1158
  const curr = inst$1._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1167
1159
  if (def.minimum > curr) inst$1._zod.bag.minimum = def.minimum;
@@ -1181,12 +1173,11 @@ const $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst,
1181
1173
  };
1182
1174
  });
1183
1175
  const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
1184
- var _a;
1185
1176
  $ZodCheck.init(inst, def);
1186
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1177
+ inst._zod.when = (payload) => {
1187
1178
  const val = payload.value;
1188
1179
  return !nullish$1(val) && val.size !== undefined;
1189
- });
1180
+ };
1190
1181
  inst._zod.onattach.push((inst$1) => {
1191
1182
  const bag = inst$1._zod.bag;
1192
1183
  bag.minimum = def.size;
@@ -1207,8 +1198,6 @@ const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals",
1207
1198
  code: "too_small",
1208
1199
  minimum: def.size
1209
1200
  },
1210
- inclusive: true,
1211
- exact: true,
1212
1201
  input: payload.value,
1213
1202
  inst,
1214
1203
  continue: !def.abort
@@ -1216,12 +1205,11 @@ const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals",
1216
1205
  };
1217
1206
  });
1218
1207
  const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
1219
- var _a;
1220
1208
  $ZodCheck.init(inst, def);
1221
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1209
+ inst._zod.when = (payload) => {
1222
1210
  const val = payload.value;
1223
1211
  return !nullish$1(val) && val.length !== undefined;
1224
- });
1212
+ };
1225
1213
  inst._zod.onattach.push((inst$1) => {
1226
1214
  const curr = inst$1._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1227
1215
  if (def.maximum < curr) inst$1._zod.bag.maximum = def.maximum;
@@ -1243,12 +1231,11 @@ const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (i
1243
1231
  };
1244
1232
  });
1245
1233
  const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
1246
- var _a;
1247
1234
  $ZodCheck.init(inst, def);
1248
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1235
+ inst._zod.when = (payload) => {
1249
1236
  const val = payload.value;
1250
1237
  return !nullish$1(val) && val.length !== undefined;
1251
- });
1238
+ };
1252
1239
  inst._zod.onattach.push((inst$1) => {
1253
1240
  const curr = inst$1._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1254
1241
  if (def.minimum > curr) inst$1._zod.bag.minimum = def.minimum;
@@ -1270,12 +1257,11 @@ const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (i
1270
1257
  };
1271
1258
  });
1272
1259
  const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
1273
- var _a;
1274
1260
  $ZodCheck.init(inst, def);
1275
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1261
+ inst._zod.when = (payload) => {
1276
1262
  const val = payload.value;
1277
1263
  return !nullish$1(val) && val.length !== undefined;
1278
- });
1264
+ };
1279
1265
  inst._zod.onattach.push((inst$1) => {
1280
1266
  const bag = inst$1._zod.bag;
1281
1267
  bag.minimum = def.length;
@@ -1297,8 +1283,6 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
1297
1283
  code: "too_small",
1298
1284
  minimum: def.length
1299
1285
  },
1300
- inclusive: true,
1301
- exact: true,
1302
1286
  input: payload.value,
1303
1287
  inst,
1304
1288
  continue: !def.abort
@@ -1306,7 +1290,7 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
1306
1290
  };
1307
1291
  });
1308
1292
  const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
1309
- var _a, _b;
1293
+ var _a;
1310
1294
  $ZodCheck.init(inst, def);
1311
1295
  inst._zod.onattach.push((inst$1) => {
1312
1296
  const bag = inst$1._zod.bag;
@@ -1316,7 +1300,8 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
1316
1300
  bag.patterns.add(def.pattern);
1317
1301
  }
1318
1302
  });
1319
- if (def.pattern) (_a = inst._zod).check ?? (_a.check = (payload) => {
1303
+ (_a = inst._zod).check ?? (_a.check = (payload) => {
1304
+ if (!def.pattern) throw new Error("Not implemented.");
1320
1305
  def.pattern.lastIndex = 0;
1321
1306
  if (def.pattern.test(payload.value)) return;
1322
1307
  payload.issues.push({
@@ -1329,7 +1314,6 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
1329
1314
  continue: !def.abort
1330
1315
  });
1331
1316
  });
1332
- else (_b = inst._zod).check ?? (_b.check = () => {});
1333
1317
  });
1334
1318
  const $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => {
1335
1319
  $ZodCheckStringFormat.init(inst, def);
@@ -1453,6 +1437,7 @@ const $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (ins
1453
1437
  code: "invalid_value",
1454
1438
  values: def.mime,
1455
1439
  input: payload.value.type,
1440
+ path: ["type"],
1456
1441
  inst
1457
1442
  });
1458
1443
  };
@@ -1465,7 +1450,7 @@ const $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (i
1465
1450
  });
1466
1451
 
1467
1452
  //#endregion
1468
- //#region ../../node_modules/zod/v4/core/doc.js
1453
+ //#region ../../node_modules/zod/dist/esm/v4/core/doc.js
1469
1454
  var Doc = class {
1470
1455
  constructor(args = []) {
1471
1456
  this.content = [];
@@ -1501,18 +1486,19 @@ var Doc = class {
1501
1486
  };
1502
1487
 
1503
1488
  //#endregion
1504
- //#region ../../node_modules/zod/v4/core/versions.js
1489
+ //#region ../../node_modules/zod/dist/esm/v4/core/versions.js
1505
1490
  const version = {
1506
1491
  major: 4,
1507
1492
  minor: 0,
1508
- patch: 2
1493
+ patch: 0
1509
1494
  };
1510
1495
 
1511
1496
  //#endregion
1512
- //#region ../../node_modules/zod/v4/core/schemas.js
1497
+ //#region ../../node_modules/zod/dist/esm/v4/core/schemas.js
1513
1498
  const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1514
1499
  var _a;
1515
1500
  inst ?? (inst = {});
1501
+ inst._zod.id = def.type + "_" + randomString(10);
1516
1502
  inst._zod.def = def;
1517
1503
  inst._zod.bag = inst._zod.bag || {};
1518
1504
  inst._zod.version = version;
@@ -1535,11 +1521,13 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1535
1521
  let isAborted = aborted(payload);
1536
1522
  let asyncResult;
1537
1523
  for (const ch of checks$1) {
1538
- if (ch._zod.def.when) {
1539
- const shouldRun = ch._zod.def.when(payload);
1524
+ if (ch._zod.when) {
1525
+ const shouldRun = ch._zod.when(payload);
1540
1526
  if (!shouldRun) continue;
1541
- } else if (isAborted) {
1542
- continue;
1527
+ } else {
1528
+ if (isAborted) {
1529
+ continue;
1530
+ }
1543
1531
  }
1544
1532
  const currLen = payload.issues.length;
1545
1533
  const _ = ch._zod.check(payload);
@@ -1639,9 +1627,7 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1639
1627
  $ZodStringFormat.init(inst, def);
1640
1628
  inst._zod.check = (payload) => {
1641
1629
  try {
1642
- const orig = payload.value;
1643
- const url$1 = new URL(orig);
1644
- const href = url$1.href;
1630
+ const url$1 = new URL(payload.value);
1645
1631
  if (def.hostname) {
1646
1632
  def.hostname.lastIndex = 0;
1647
1633
  if (!def.hostname.test(url$1.hostname)) {
@@ -1670,11 +1656,6 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1670
1656
  });
1671
1657
  }
1672
1658
  }
1673
- if (!orig.endsWith("/") && href.endsWith("/")) {
1674
- payload.value = href.slice(0, -1);
1675
- } else {
1676
- payload.value = href;
1677
- }
1678
1659
  return;
1679
1660
  } catch (_) {
1680
1661
  payload.issues.push({
@@ -1845,7 +1826,6 @@ function isValidJWT(token, algorithm = null) {
1845
1826
  const tokensParts = token.split(".");
1846
1827
  if (tokensParts.length !== 3) return false;
1847
1828
  const [header] = tokensParts;
1848
- if (!header) return false;
1849
1829
  const parsedHeader = JSON.parse(atob(header));
1850
1830
  if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") return false;
1851
1831
  if (!parsedHeader.alg) return false;
@@ -1868,19 +1848,6 @@ const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
1868
1848
  });
1869
1849
  };
1870
1850
  });
1871
- const $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringFormat", (inst, def) => {
1872
- $ZodStringFormat.init(inst, def);
1873
- inst._zod.check = (payload) => {
1874
- if (def.fn(payload.value)) return;
1875
- payload.issues.push({
1876
- code: "invalid_format",
1877
- format: def.format,
1878
- input: payload.value,
1879
- inst,
1880
- continue: !def.abort
1881
- });
1882
- };
1883
- });
1884
1851
  const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
1885
1852
  $ZodType.init(inst, def);
1886
1853
  inst._zod.pattern = inst._zod.bag.pattern ?? number$2;
@@ -1932,11 +1899,12 @@ const $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
1932
1899
  if (def.coerce) try {
1933
1900
  payload.value = BigInt(payload.value);
1934
1901
  } catch (_) {}
1935
- if (typeof payload.value === "bigint") return payload;
1902
+ const { value: input } = payload;
1903
+ if (typeof input === "bigint") return payload;
1936
1904
  payload.issues.push({
1937
1905
  expected: "bigint",
1938
1906
  code: "invalid_type",
1939
- input: payload.value,
1907
+ input,
1940
1908
  inst
1941
1909
  });
1942
1910
  return payload;
@@ -1949,7 +1917,7 @@ const $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def)
1949
1917
  const $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => {
1950
1918
  $ZodType.init(inst, def);
1951
1919
  inst._zod.parse = (payload, _ctx) => {
1952
- const input = payload.value;
1920
+ const { value: input } = payload;
1953
1921
  if (typeof input === "symbol") return payload;
1954
1922
  payload.issues.push({
1955
1923
  expected: "symbol",
@@ -1964,10 +1932,8 @@ const $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def)
1964
1932
  $ZodType.init(inst, def);
1965
1933
  inst._zod.pattern = _undefined$2;
1966
1934
  inst._zod.values = new Set([undefined]);
1967
- inst._zod.optin = "optional";
1968
- inst._zod.optout = "optional";
1969
1935
  inst._zod.parse = (payload, _ctx) => {
1970
- const input = payload.value;
1936
+ const { value: input } = payload;
1971
1937
  if (typeof input === "undefined") return payload;
1972
1938
  payload.issues.push({
1973
1939
  expected: "undefined",
@@ -1983,7 +1949,7 @@ const $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
1983
1949
  inst._zod.pattern = _null$2;
1984
1950
  inst._zod.values = new Set([null]);
1985
1951
  inst._zod.parse = (payload, _ctx) => {
1986
- const input = payload.value;
1952
+ const { value: input } = payload;
1987
1953
  if (input === null) return payload;
1988
1954
  payload.issues.push({
1989
1955
  expected: "null",
@@ -2017,7 +1983,7 @@ const $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
2017
1983
  const $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => {
2018
1984
  $ZodType.init(inst, def);
2019
1985
  inst._zod.parse = (payload, _ctx) => {
2020
- const input = payload.value;
1986
+ const { value: input } = payload;
2021
1987
  if (typeof input === "undefined") return payload;
2022
1988
  payload.issues.push({
2023
1989
  expected: "void",
@@ -2148,20 +2114,19 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2148
2114
  "payload",
2149
2115
  "ctx"
2150
2116
  ]);
2151
- const normalized = _normalized.value;
2117
+ const { keys, optionalKeys: optionalKeys$1 } = _normalized.value;
2152
2118
  const parseStr = (key) => {
2153
2119
  const k = esc(key);
2154
2120
  return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
2155
2121
  };
2156
2122
  doc.write(`const input = payload.value;`);
2157
2123
  const ids = Object.create(null);
2158
- let counter = 0;
2159
- for (const key of normalized.keys) {
2160
- ids[key] = `key_${counter++}`;
2124
+ for (const key of keys) {
2125
+ ids[key] = randomString(15);
2161
2126
  }
2162
2127
  doc.write(`const newResult = {}`);
2163
- for (const key of normalized.keys) {
2164
- if (normalized.optionalKeys.has(key)) {
2128
+ for (const key of keys) {
2129
+ if (optionalKeys$1.has(key)) {
2165
2130
  const id = ids[key];
2166
2131
  doc.write(`const ${id} = ${parseStr(key)};`);
2167
2132
  const k = esc(key);
@@ -2206,7 +2171,7 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2206
2171
  const jit = !globalConfig.jitless;
2207
2172
  const allowsEval$1 = allowsEval;
2208
2173
  const fastEnabled = jit && allowsEval$1.value;
2209
- const catchall = def.catchall;
2174
+ const { catchall } = def;
2210
2175
  let value;
2211
2176
  inst._zod.parse = (payload, ctx) => {
2212
2177
  value ?? (value = _normalized.value);
@@ -2236,10 +2201,12 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2236
2201
  const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
2237
2202
  if (r instanceof Promise) {
2238
2203
  proms.push(r.then((r$1) => isOptional ? handleOptionalObjectResult(r$1, payload, key, input) : handleObjectResult(r$1, payload, key)));
2239
- } else if (isOptional) {
2240
- handleOptionalObjectResult(r, payload, key, input);
2241
2204
  } else {
2242
- handleObjectResult(r, payload, key);
2205
+ if (isOptional) {
2206
+ handleOptionalObjectResult(r, payload, key, input);
2207
+ } else {
2208
+ handleObjectResult(r, payload, key);
2209
+ }
2243
2210
  }
2244
2211
  }
2245
2212
  }
@@ -2297,8 +2264,6 @@ function handleUnionResults(results, final, inst, ctx) {
2297
2264
  }
2298
2265
  const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
2299
2266
  $ZodType.init(inst, def);
2300
- defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : undefined);
2301
- defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined);
2302
2267
  defineLazy(inst._zod, "values", () => {
2303
2268
  if (def.options.every((o) => o._zod.values)) {
2304
2269
  return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
@@ -2398,7 +2363,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
2398
2363
  const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
2399
2364
  $ZodType.init(inst, def);
2400
2365
  inst._zod.parse = (payload, ctx) => {
2401
- const input = payload.value;
2366
+ const { value: input } = payload;
2402
2367
  const left = def.left._zod.run({
2403
2368
  value: input,
2404
2369
  issues: []
@@ -2855,9 +2820,6 @@ const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) =>
2855
2820
  return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : undefined;
2856
2821
  });
2857
2822
  inst._zod.parse = (payload, ctx) => {
2858
- if (def.innerType._zod.optin === "optional") {
2859
- return def.innerType._zod.run(payload, ctx);
2860
- }
2861
2823
  if (payload.value === undefined) {
2862
2824
  return payload;
2863
2825
  }
@@ -2957,7 +2919,7 @@ const $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
2957
2919
  });
2958
2920
  const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
2959
2921
  $ZodType.init(inst, def);
2960
- inst._zod.optin = "optional";
2922
+ defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
2961
2923
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
2962
2924
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
2963
2925
  inst._zod.parse = (payload, ctx) => {
@@ -3028,7 +2990,6 @@ function handlePipeResult(left, def, ctx) {
3028
2990
  const $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
3029
2991
  $ZodType.init(inst, def);
3030
2992
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
3031
- defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3032
2993
  defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
3033
2994
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
3034
2995
  inst._zod.parse = (payload, ctx) => {
@@ -3079,7 +3040,7 @@ const $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral",
3079
3040
  input: payload.value,
3080
3041
  inst,
3081
3042
  code: "invalid_format",
3082
- format: def.format ?? "template_literal",
3043
+ format: "template_literal",
3083
3044
  pattern: inst._zod.pattern.source
3084
3045
  });
3085
3046
  return payload;
@@ -3139,8 +3100,8 @@ function handleRefineResult(result, payload, input, inst) {
3139
3100
  }
3140
3101
 
3141
3102
  //#endregion
3142
- //#region ../../node_modules/zod/v4/locales/ar.js
3143
- const error$38 = () => {
3103
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ar.js
3104
+ const error$36 = () => {
3144
3105
  const Sizable = {
3145
3106
  string: {
3146
3107
  unit: "حرف",
@@ -3162,7 +3123,7 @@ const error$38 = () => {
3162
3123
  function getSizing(origin) {
3163
3124
  return Sizable[origin] ?? null;
3164
3125
  }
3165
- const parsedType$3 = (data) => {
3126
+ const parsedType$2 = (data) => {
3166
3127
  const t = typeof data;
3167
3128
  switch (t) {
3168
3129
  case "number": {
@@ -3214,7 +3175,7 @@ const error$38 = () => {
3214
3175
  };
3215
3176
  return (issue$1) => {
3216
3177
  switch (issue$1.code) {
3217
- case "invalid_type": return `مدخلات غير مقبولة: يفترض إدخال ${issue$1.expected}، ولكن تم إدخال ${parsedType$3(issue$1.input)}`;
3178
+ case "invalid_type": return `مدخلات غير مقبولة: يفترض إدخال ${issue$1.expected}، ولكن تم إدخال ${parsedType$2(issue$1.input)}`;
3218
3179
  case "invalid_value":
3219
3180
  if (issue$1.values.length === 1) return `مدخلات غير مقبولة: يفترض إدخال ${stringifyPrimitive(issue$1.values[0])}`;
3220
3181
  return `اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${joinValues(issue$1.values, "|")}`;
@@ -3250,12 +3211,12 @@ const error$38 = () => {
3250
3211
  };
3251
3212
  };
3252
3213
  function ar_default() {
3253
- return { localeError: error$38() };
3214
+ return { localeError: error$36() };
3254
3215
  }
3255
3216
 
3256
3217
  //#endregion
3257
- //#region ../../node_modules/zod/v4/locales/az.js
3258
- const error$37 = () => {
3218
+ //#region ../../node_modules/zod/dist/esm/v4/locales/az.js
3219
+ const error$35 = () => {
3259
3220
  const Sizable = {
3260
3221
  string: {
3261
3222
  unit: "simvol",
@@ -3277,7 +3238,7 @@ const error$37 = () => {
3277
3238
  function getSizing(origin) {
3278
3239
  return Sizable[origin] ?? null;
3279
3240
  }
3280
- const parsedType$3 = (data) => {
3241
+ const parsedType$2 = (data) => {
3281
3242
  const t = typeof data;
3282
3243
  switch (t) {
3283
3244
  case "number": {
@@ -3329,7 +3290,7 @@ const error$37 = () => {
3329
3290
  };
3330
3291
  return (issue$1) => {
3331
3292
  switch (issue$1.code) {
3332
- case "invalid_type": return `Yanlış dəyər: gözlənilən ${issue$1.expected}, daxil olan ${parsedType$3(issue$1.input)}`;
3293
+ case "invalid_type": return `Yanlış dəyər: gözlənilən ${issue$1.expected}, daxil olan ${parsedType$2(issue$1.input)}`;
3333
3294
  case "invalid_value":
3334
3295
  if (issue$1.values.length === 1) return `Yanlış dəyər: gözlənilən ${stringifyPrimitive(issue$1.values[0])}`;
3335
3296
  return `Yanlış seçim: aşağıdakılardan biri olmalıdır: ${joinValues(issue$1.values, "|")}`;
@@ -3363,11 +3324,11 @@ const error$37 = () => {
3363
3324
  };
3364
3325
  };
3365
3326
  function az_default() {
3366
- return { localeError: error$37() };
3327
+ return { localeError: error$35() };
3367
3328
  }
3368
3329
 
3369
3330
  //#endregion
3370
- //#region ../../node_modules/zod/v4/locales/be.js
3331
+ //#region ../../node_modules/zod/dist/esm/v4/locales/be.js
3371
3332
  function getBelarusianPlural(count, one, few, many) {
3372
3333
  const absCount = Math.abs(count);
3373
3334
  const lastDigit = absCount % 10;
@@ -3383,7 +3344,7 @@ function getBelarusianPlural(count, one, few, many) {
3383
3344
  }
3384
3345
  return many;
3385
3346
  }
3386
- const error$36 = () => {
3347
+ const error$34 = () => {
3387
3348
  const Sizable = {
3388
3349
  string: {
3389
3350
  unit: {
@@ -3421,7 +3382,7 @@ const error$36 = () => {
3421
3382
  function getSizing(origin) {
3422
3383
  return Sizable[origin] ?? null;
3423
3384
  }
3424
- const parsedType$3 = (data) => {
3385
+ const parsedType$2 = (data) => {
3425
3386
  const t = typeof data;
3426
3387
  switch (t) {
3427
3388
  case "number": {
@@ -3473,7 +3434,7 @@ const error$36 = () => {
3473
3434
  };
3474
3435
  return (issue$1) => {
3475
3436
  switch (issue$1.code) {
3476
- case "invalid_type": return `Няправільны ўвод: чакаўся ${issue$1.expected}, атрымана ${parsedType$3(issue$1.input)}`;
3437
+ case "invalid_type": return `Няправільны ўвод: чакаўся ${issue$1.expected}, атрымана ${parsedType$2(issue$1.input)}`;
3477
3438
  case "invalid_value":
3478
3439
  if (issue$1.values.length === 1) return `Няправільны ўвод: чакалася ${stringifyPrimitive(issue$1.values[0])}`;
3479
3440
  return `Няправільны варыянт: чакаўся адзін з ${joinValues(issue$1.values, "|")}`;
@@ -3515,12 +3476,12 @@ const error$36 = () => {
3515
3476
  };
3516
3477
  };
3517
3478
  function be_default() {
3518
- return { localeError: error$36() };
3479
+ return { localeError: error$34() };
3519
3480
  }
3520
3481
 
3521
3482
  //#endregion
3522
- //#region ../../node_modules/zod/v4/locales/ca.js
3523
- const error$35 = () => {
3483
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ca.js
3484
+ const error$33 = () => {
3524
3485
  const Sizable = {
3525
3486
  string: {
3526
3487
  unit: "caràcters",
@@ -3542,7 +3503,7 @@ const error$35 = () => {
3542
3503
  function getSizing(origin) {
3543
3504
  return Sizable[origin] ?? null;
3544
3505
  }
3545
- const parsedType$3 = (data) => {
3506
+ const parsedType$2 = (data) => {
3546
3507
  const t = typeof data;
3547
3508
  switch (t) {
3548
3509
  case "number": {
@@ -3594,7 +3555,7 @@ const error$35 = () => {
3594
3555
  };
3595
3556
  return (issue$1) => {
3596
3557
  switch (issue$1.code) {
3597
- case "invalid_type": return `Tipus invàlid: s'esperava ${issue$1.expected}, s'ha rebut ${parsedType$3(issue$1.input)}`;
3558
+ case "invalid_type": return `Tipus invàlid: s'esperava ${issue$1.expected}, s'ha rebut ${parsedType$2(issue$1.input)}`;
3598
3559
  case "invalid_value":
3599
3560
  if (issue$1.values.length === 1) return `Valor invàlid: s'esperava ${stringifyPrimitive(issue$1.values[0])}`;
3600
3561
  return `Opció invàlida: s'esperava una de ${joinValues(issue$1.values, " o ")}`;
@@ -3632,12 +3593,12 @@ const error$35 = () => {
3632
3593
  };
3633
3594
  };
3634
3595
  function ca_default() {
3635
- return { localeError: error$35() };
3596
+ return { localeError: error$33() };
3636
3597
  }
3637
3598
 
3638
3599
  //#endregion
3639
- //#region ../../node_modules/zod/v4/locales/cs.js
3640
- const error$34 = () => {
3600
+ //#region ../../node_modules/zod/dist/esm/v4/locales/cs.js
3601
+ const error$32 = () => {
3641
3602
  const Sizable = {
3642
3603
  string: {
3643
3604
  unit: "znaků",
@@ -3659,7 +3620,7 @@ const error$34 = () => {
3659
3620
  function getSizing(origin) {
3660
3621
  return Sizable[origin] ?? null;
3661
3622
  }
3662
- const parsedType$3 = (data) => {
3623
+ const parsedType$2 = (data) => {
3663
3624
  const t = typeof data;
3664
3625
  switch (t) {
3665
3626
  case "number": {
@@ -3729,7 +3690,7 @@ const error$34 = () => {
3729
3690
  };
3730
3691
  return (issue$1) => {
3731
3692
  switch (issue$1.code) {
3732
- case "invalid_type": return `Neplatný vstup: očekáváno ${issue$1.expected}, obdrženo ${parsedType$3(issue$1.input)}`;
3693
+ case "invalid_type": return `Neplatný vstup: očekáváno ${issue$1.expected}, obdrženo ${parsedType$2(issue$1.input)}`;
3733
3694
  case "invalid_value":
3734
3695
  if (issue$1.values.length === 1) return `Neplatný vstup: očekáváno ${stringifyPrimitive(issue$1.values[0])}`;
3735
3696
  return `Neplatná možnost: očekávána jedna z hodnot ${joinValues(issue$1.values, "|")}`;
@@ -3767,12 +3728,12 @@ const error$34 = () => {
3767
3728
  };
3768
3729
  };
3769
3730
  function cs_default() {
3770
- return { localeError: error$34() };
3731
+ return { localeError: error$32() };
3771
3732
  }
3772
3733
 
3773
3734
  //#endregion
3774
- //#region ../../node_modules/zod/v4/locales/de.js
3775
- const error$33 = () => {
3735
+ //#region ../../node_modules/zod/dist/esm/v4/locales/de.js
3736
+ const error$31 = () => {
3776
3737
  const Sizable = {
3777
3738
  string: {
3778
3739
  unit: "Zeichen",
@@ -3794,7 +3755,7 @@ const error$33 = () => {
3794
3755
  function getSizing(origin) {
3795
3756
  return Sizable[origin] ?? null;
3796
3757
  }
3797
- const parsedType$3 = (data) => {
3758
+ const parsedType$2 = (data) => {
3798
3759
  const t = typeof data;
3799
3760
  switch (t) {
3800
3761
  case "number": {
@@ -3846,7 +3807,7 @@ const error$33 = () => {
3846
3807
  };
3847
3808
  return (issue$1) => {
3848
3809
  switch (issue$1.code) {
3849
- case "invalid_type": return `Ungültige Eingabe: erwartet ${issue$1.expected}, erhalten ${parsedType$3(issue$1.input)}`;
3810
+ case "invalid_type": return `Ungültige Eingabe: erwartet ${issue$1.expected}, erhalten ${parsedType$2(issue$1.input)}`;
3850
3811
  case "invalid_value":
3851
3812
  if (issue$1.values.length === 1) return `Ungültige Eingabe: erwartet ${stringifyPrimitive(issue$1.values[0])}`;
3852
3813
  return `Ungültige Option: erwartet eine von ${joinValues(issue$1.values, "|")}`;
@@ -3882,12 +3843,12 @@ const error$33 = () => {
3882
3843
  };
3883
3844
  };
3884
3845
  function de_default() {
3885
- return { localeError: error$33() };
3846
+ return { localeError: error$31() };
3886
3847
  }
3887
3848
 
3888
3849
  //#endregion
3889
- //#region ../../node_modules/zod/v4/locales/en.js
3890
- const parsedType$2 = (data) => {
3850
+ //#region ../../node_modules/zod/dist/esm/v4/locales/en.js
3851
+ const parsedType$1 = (data) => {
3891
3852
  const t = typeof data;
3892
3853
  switch (t) {
3893
3854
  case "number": {
@@ -3907,7 +3868,7 @@ const parsedType$2 = (data) => {
3907
3868
  }
3908
3869
  return t;
3909
3870
  };
3910
- const error$32 = () => {
3871
+ const error$30 = () => {
3911
3872
  const Sizable = {
3912
3873
  string: {
3913
3874
  unit: "characters",
@@ -3961,7 +3922,7 @@ const error$32 = () => {
3961
3922
  };
3962
3923
  return (issue$1) => {
3963
3924
  switch (issue$1.code) {
3964
- case "invalid_type": return `Invalid input: expected ${issue$1.expected}, received ${parsedType$2(issue$1.input)}`;
3925
+ case "invalid_type": return `Invalid input: expected ${issue$1.expected}, received ${parsedType$1(issue$1.input)}`;
3965
3926
  case "invalid_value":
3966
3927
  if (issue$1.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue$1.values[0])}`;
3967
3928
  return `Invalid option: expected one of ${joinValues(issue$1.values, "|")}`;
@@ -3999,127 +3960,12 @@ const error$32 = () => {
3999
3960
  };
4000
3961
  };
4001
3962
  function en_default() {
4002
- return { localeError: error$32() };
4003
- }
4004
-
4005
- //#endregion
4006
- //#region ../../node_modules/zod/v4/locales/eo.js
4007
- const parsedType$1 = (data) => {
4008
- const t = typeof data;
4009
- switch (t) {
4010
- case "number": {
4011
- return Number.isNaN(data) ? "NaN" : "nombro";
4012
- }
4013
- case "object": {
4014
- if (Array.isArray(data)) {
4015
- return "tabelo";
4016
- }
4017
- if (data === null) {
4018
- return "senvalora";
4019
- }
4020
- if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
4021
- return data.constructor.name;
4022
- }
4023
- }
4024
- }
4025
- return t;
4026
- };
4027
- const error$31 = () => {
4028
- const Sizable = {
4029
- string: {
4030
- unit: "karaktrojn",
4031
- verb: "havi"
4032
- },
4033
- file: {
4034
- unit: "bajtojn",
4035
- verb: "havi"
4036
- },
4037
- array: {
4038
- unit: "elementojn",
4039
- verb: "havi"
4040
- },
4041
- set: {
4042
- unit: "elementojn",
4043
- verb: "havi"
4044
- }
4045
- };
4046
- function getSizing(origin) {
4047
- return Sizable[origin] ?? null;
4048
- }
4049
- const Nouns = {
4050
- regex: "enigo",
4051
- email: "retadreso",
4052
- url: "URL",
4053
- emoji: "emoĝio",
4054
- uuid: "UUID",
4055
- uuidv4: "UUIDv4",
4056
- uuidv6: "UUIDv6",
4057
- nanoid: "nanoid",
4058
- guid: "GUID",
4059
- cuid: "cuid",
4060
- cuid2: "cuid2",
4061
- ulid: "ULID",
4062
- xid: "XID",
4063
- ksuid: "KSUID",
4064
- datetime: "ISO-datotempo",
4065
- date: "ISO-dato",
4066
- time: "ISO-tempo",
4067
- duration: "ISO-daŭro",
4068
- ipv4: "IPv4-adreso",
4069
- ipv6: "IPv6-adreso",
4070
- cidrv4: "IPv4-rango",
4071
- cidrv6: "IPv6-rango",
4072
- base64: "64-ume kodita karaktraro",
4073
- base64url: "URL-64-ume kodita karaktraro",
4074
- json_string: "JSON-karaktraro",
4075
- e164: "E.164-nombro",
4076
- jwt: "JWT",
4077
- template_literal: "enigo"
4078
- };
4079
- return (issue$1) => {
4080
- switch (issue$1.code) {
4081
- case "invalid_type": return `Nevalida enigo: atendiĝis ${issue$1.expected}, riceviĝis ${parsedType$1(issue$1.input)}`;
4082
- case "invalid_value":
4083
- if (issue$1.values.length === 1) return `Nevalida enigo: atendiĝis ${stringifyPrimitive(issue$1.values[0])}`;
4084
- return `Nevalida opcio: atendiĝis unu el ${joinValues(issue$1.values, "|")}`;
4085
- case "too_big": {
4086
- const adj = issue$1.inclusive ? "<=" : "<";
4087
- const sizing = getSizing(issue$1.origin);
4088
- if (sizing) return `Tro granda: atendiĝis ke ${issue$1.origin ?? "valoro"} havu ${adj}${issue$1.maximum.toString()} ${sizing.unit ?? "elementojn"}`;
4089
- return `Tro granda: atendiĝis ke ${issue$1.origin ?? "valoro"} havu ${adj}${issue$1.maximum.toString()}`;
4090
- }
4091
- case "too_small": {
4092
- const adj = issue$1.inclusive ? ">=" : ">";
4093
- const sizing = getSizing(issue$1.origin);
4094
- if (sizing) {
4095
- return `Tro malgranda: atendiĝis ke ${issue$1.origin} havu ${adj}${issue$1.minimum.toString()} ${sizing.unit}`;
4096
- }
4097
- return `Tro malgranda: atendiĝis ke ${issue$1.origin} estu ${adj}${issue$1.minimum.toString()}`;
4098
- }
4099
- case "invalid_format": {
4100
- const _issue = issue$1;
4101
- if (_issue.format === "starts_with") return `Nevalida karaktraro: devas komenciĝi per "${_issue.prefix}"`;
4102
- if (_issue.format === "ends_with") return `Nevalida karaktraro: devas finiĝi per "${_issue.suffix}"`;
4103
- if (_issue.format === "includes") return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`;
4104
- if (_issue.format === "regex") return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;
4105
- return `Nevalida ${Nouns[_issue.format] ?? issue$1.format}`;
4106
- }
4107
- case "not_multiple_of": return `Nevalida nombro: devas esti oblo de ${issue$1.divisor}`;
4108
- case "unrecognized_keys": return `Nekonata${issue$1.keys.length > 1 ? "j" : ""} ŝlosilo${issue$1.keys.length > 1 ? "j" : ""}: ${joinValues(issue$1.keys, ", ")}`;
4109
- case "invalid_key": return `Nevalida ŝlosilo en ${issue$1.origin}`;
4110
- case "invalid_union": return "Nevalida enigo";
4111
- case "invalid_element": return `Nevalida valoro en ${issue$1.origin}`;
4112
- default: return `Nevalida enigo`;
4113
- }
4114
- };
4115
- };
4116
- function eo_default() {
4117
- return { localeError: error$31() };
3963
+ return { localeError: error$30() };
4118
3964
  }
4119
3965
 
4120
3966
  //#endregion
4121
- //#region ../../node_modules/zod/v4/locales/es.js
4122
- const error$30 = () => {
3967
+ //#region ../../node_modules/zod/dist/esm/v4/locales/es.js
3968
+ const error$29 = () => {
4123
3969
  const Sizable = {
4124
3970
  string: {
4125
3971
  unit: "caracteres",
@@ -4141,7 +3987,7 @@ const error$30 = () => {
4141
3987
  function getSizing(origin) {
4142
3988
  return Sizable[origin] ?? null;
4143
3989
  }
4144
- const parsedType$3 = (data) => {
3990
+ const parsedType$2 = (data) => {
4145
3991
  const t = typeof data;
4146
3992
  switch (t) {
4147
3993
  case "number": {
@@ -4193,7 +4039,7 @@ const error$30 = () => {
4193
4039
  };
4194
4040
  return (issue$1) => {
4195
4041
  switch (issue$1.code) {
4196
- case "invalid_type": return `Entrada inválida: se esperaba ${issue$1.expected}, recibido ${parsedType$3(issue$1.input)}`;
4042
+ case "invalid_type": return `Entrada inválida: se esperaba ${issue$1.expected}, recibido ${parsedType$2(issue$1.input)}`;
4197
4043
  case "invalid_value":
4198
4044
  if (issue$1.values.length === 1) return `Entrada inválida: se esperaba ${stringifyPrimitive(issue$1.values[0])}`;
4199
4045
  return `Opción inválida: se esperaba una de ${joinValues(issue$1.values, "|")}`;
@@ -4229,12 +4075,12 @@ const error$30 = () => {
4229
4075
  };
4230
4076
  };
4231
4077
  function es_default() {
4232
- return { localeError: error$30() };
4078
+ return { localeError: error$29() };
4233
4079
  }
4234
4080
 
4235
4081
  //#endregion
4236
- //#region ../../node_modules/zod/v4/locales/fa.js
4237
- const error$29 = () => {
4082
+ //#region ../../node_modules/zod/dist/esm/v4/locales/fa.js
4083
+ const error$28 = () => {
4238
4084
  const Sizable = {
4239
4085
  string: {
4240
4086
  unit: "کاراکتر",
@@ -4256,7 +4102,7 @@ const error$29 = () => {
4256
4102
  function getSizing(origin) {
4257
4103
  return Sizable[origin] ?? null;
4258
4104
  }
4259
- const parsedType$3 = (data) => {
4105
+ const parsedType$2 = (data) => {
4260
4106
  const t = typeof data;
4261
4107
  switch (t) {
4262
4108
  case "number": {
@@ -4308,7 +4154,7 @@ const error$29 = () => {
4308
4154
  };
4309
4155
  return (issue$1) => {
4310
4156
  switch (issue$1.code) {
4311
- case "invalid_type": return `ورودی نامعتبر: می‌بایست ${issue$1.expected} می‌بود، ${parsedType$3(issue$1.input)} دریافت شد`;
4157
+ case "invalid_type": return `ورودی نامعتبر: می‌بایست ${issue$1.expected} می‌بود، ${parsedType$2(issue$1.input)} دریافت شد`;
4312
4158
  case "invalid_value":
4313
4159
  if (issue$1.values.length === 1) {
4314
4160
  return `ورودی نامعتبر: می‌بایست ${stringifyPrimitive(issue$1.values[0])} می‌بود`;
@@ -4356,12 +4202,12 @@ const error$29 = () => {
4356
4202
  };
4357
4203
  };
4358
4204
  function fa_default() {
4359
- return { localeError: error$29() };
4205
+ return { localeError: error$28() };
4360
4206
  }
4361
4207
 
4362
4208
  //#endregion
4363
- //#region ../../node_modules/zod/v4/locales/fi.js
4364
- const error$28 = () => {
4209
+ //#region ../../node_modules/zod/dist/esm/v4/locales/fi.js
4210
+ const error$27 = () => {
4365
4211
  const Sizable = {
4366
4212
  string: {
4367
4213
  unit: "merkkiä",
@@ -4399,7 +4245,7 @@ const error$28 = () => {
4399
4245
  function getSizing(origin) {
4400
4246
  return Sizable[origin] ?? null;
4401
4247
  }
4402
- const parsedType$3 = (data) => {
4248
+ const parsedType$2 = (data) => {
4403
4249
  const t = typeof data;
4404
4250
  switch (t) {
4405
4251
  case "number": {
@@ -4451,7 +4297,7 @@ const error$28 = () => {
4451
4297
  };
4452
4298
  return (issue$1) => {
4453
4299
  switch (issue$1.code) {
4454
- case "invalid_type": return `Virheellinen tyyppi: odotettiin ${issue$1.expected}, oli ${parsedType$3(issue$1.input)}`;
4300
+ case "invalid_type": return `Virheellinen tyyppi: odotettiin ${issue$1.expected}, oli ${parsedType$2(issue$1.input)}`;
4455
4301
  case "invalid_value":
4456
4302
  if (issue$1.values.length === 1) return `Virheellinen syöte: täytyy olla ${stringifyPrimitive(issue$1.values[0])}`;
4457
4303
  return `Virheellinen valinta: täytyy olla yksi seuraavista: ${joinValues(issue$1.values, "|")}`;
@@ -4491,12 +4337,12 @@ const error$28 = () => {
4491
4337
  };
4492
4338
  };
4493
4339
  function fi_default() {
4494
- return { localeError: error$28() };
4340
+ return { localeError: error$27() };
4495
4341
  }
4496
4342
 
4497
4343
  //#endregion
4498
- //#region ../../node_modules/zod/v4/locales/fr.js
4499
- const error$27 = () => {
4344
+ //#region ../../node_modules/zod/dist/esm/v4/locales/fr.js
4345
+ const error$26 = () => {
4500
4346
  const Sizable = {
4501
4347
  string: {
4502
4348
  unit: "caractères",
@@ -4518,7 +4364,7 @@ const error$27 = () => {
4518
4364
  function getSizing(origin) {
4519
4365
  return Sizable[origin] ?? null;
4520
4366
  }
4521
- const parsedType$3 = (data) => {
4367
+ const parsedType$2 = (data) => {
4522
4368
  const t = typeof data;
4523
4369
  switch (t) {
4524
4370
  case "number": {
@@ -4570,7 +4416,7 @@ const error$27 = () => {
4570
4416
  };
4571
4417
  return (issue$1) => {
4572
4418
  switch (issue$1.code) {
4573
- case "invalid_type": return `Entrée invalide : ${issue$1.expected} attendu, ${parsedType$3(issue$1.input)} reçu`;
4419
+ case "invalid_type": return `Entrée invalide : ${issue$1.expected} attendu, ${parsedType$2(issue$1.input)} reçu`;
4574
4420
  case "invalid_value":
4575
4421
  if (issue$1.values.length === 1) return `Entrée invalide : ${stringifyPrimitive(issue$1.values[0])} attendu`;
4576
4422
  return `Option invalide : une valeur parmi ${joinValues(issue$1.values, "|")} attendue`;
@@ -4606,12 +4452,12 @@ const error$27 = () => {
4606
4452
  };
4607
4453
  };
4608
4454
  function fr_default() {
4609
- return { localeError: error$27() };
4455
+ return { localeError: error$26() };
4610
4456
  }
4611
4457
 
4612
4458
  //#endregion
4613
- //#region ../../node_modules/zod/v4/locales/fr-CA.js
4614
- const error$26 = () => {
4459
+ //#region ../../node_modules/zod/dist/esm/v4/locales/fr-CA.js
4460
+ const error$25 = () => {
4615
4461
  const Sizable = {
4616
4462
  string: {
4617
4463
  unit: "caractères",
@@ -4633,7 +4479,7 @@ const error$26 = () => {
4633
4479
  function getSizing(origin) {
4634
4480
  return Sizable[origin] ?? null;
4635
4481
  }
4636
- const parsedType$3 = (data) => {
4482
+ const parsedType$2 = (data) => {
4637
4483
  const t = typeof data;
4638
4484
  switch (t) {
4639
4485
  case "number": {
@@ -4685,7 +4531,7 @@ const error$26 = () => {
4685
4531
  };
4686
4532
  return (issue$1) => {
4687
4533
  switch (issue$1.code) {
4688
- case "invalid_type": return `Entrée invalide : attendu ${issue$1.expected}, reçu ${parsedType$3(issue$1.input)}`;
4534
+ case "invalid_type": return `Entrée invalide : attendu ${issue$1.expected}, reçu ${parsedType$2(issue$1.input)}`;
4689
4535
  case "invalid_value":
4690
4536
  if (issue$1.values.length === 1) return `Entrée invalide : attendu ${stringifyPrimitive(issue$1.values[0])}`;
4691
4537
  return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue$1.values, "|")}`;
@@ -4723,12 +4569,12 @@ const error$26 = () => {
4723
4569
  };
4724
4570
  };
4725
4571
  function fr_CA_default() {
4726
- return { localeError: error$26() };
4572
+ return { localeError: error$25() };
4727
4573
  }
4728
4574
 
4729
4575
  //#endregion
4730
- //#region ../../node_modules/zod/v4/locales/he.js
4731
- const error$25 = () => {
4576
+ //#region ../../node_modules/zod/dist/esm/v4/locales/he.js
4577
+ const error$24 = () => {
4732
4578
  const Sizable = {
4733
4579
  string: {
4734
4580
  unit: "אותיות",
@@ -4750,7 +4596,7 @@ const error$25 = () => {
4750
4596
  function getSizing(origin) {
4751
4597
  return Sizable[origin] ?? null;
4752
4598
  }
4753
- const parsedType$3 = (data) => {
4599
+ const parsedType$2 = (data) => {
4754
4600
  const t = typeof data;
4755
4601
  switch (t) {
4756
4602
  case "number": {
@@ -4802,7 +4648,7 @@ const error$25 = () => {
4802
4648
  };
4803
4649
  return (issue$1) => {
4804
4650
  switch (issue$1.code) {
4805
- case "invalid_type": return `קלט לא תקין: צריך ${issue$1.expected}, התקבל ${parsedType$3(issue$1.input)}`;
4651
+ case "invalid_type": return `קלט לא תקין: צריך ${issue$1.expected}, התקבל ${parsedType$2(issue$1.input)}`;
4806
4652
  case "invalid_value":
4807
4653
  if (issue$1.values.length === 1) return `קלט לא תקין: צריך ${stringifyPrimitive(issue$1.values[0])}`;
4808
4654
  return `קלט לא תקין: צריך אחת מהאפשרויות ${joinValues(issue$1.values, "|")}`;
@@ -4838,12 +4684,12 @@ const error$25 = () => {
4838
4684
  };
4839
4685
  };
4840
4686
  function he_default() {
4841
- return { localeError: error$25() };
4687
+ return { localeError: error$24() };
4842
4688
  }
4843
4689
 
4844
4690
  //#endregion
4845
- //#region ../../node_modules/zod/v4/locales/hu.js
4846
- const error$24 = () => {
4691
+ //#region ../../node_modules/zod/dist/esm/v4/locales/hu.js
4692
+ const error$23 = () => {
4847
4693
  const Sizable = {
4848
4694
  string: {
4849
4695
  unit: "karakter",
@@ -4865,7 +4711,7 @@ const error$24 = () => {
4865
4711
  function getSizing(origin) {
4866
4712
  return Sizable[origin] ?? null;
4867
4713
  }
4868
- const parsedType$3 = (data) => {
4714
+ const parsedType$2 = (data) => {
4869
4715
  const t = typeof data;
4870
4716
  switch (t) {
4871
4717
  case "number": {
@@ -4917,7 +4763,7 @@ const error$24 = () => {
4917
4763
  };
4918
4764
  return (issue$1) => {
4919
4765
  switch (issue$1.code) {
4920
- case "invalid_type": return `Érvénytelen bemenet: a várt érték ${issue$1.expected}, a kapott érték ${parsedType$3(issue$1.input)}`;
4766
+ case "invalid_type": return `Érvénytelen bemenet: a várt érték ${issue$1.expected}, a kapott érték ${parsedType$2(issue$1.input)}`;
4921
4767
  case "invalid_value":
4922
4768
  if (issue$1.values.length === 1) return `Érvénytelen bemenet: a várt érték ${stringifyPrimitive(issue$1.values[0])}`;
4923
4769
  return `Érvénytelen opció: valamelyik érték várt ${joinValues(issue$1.values, "|")}`;
@@ -4953,12 +4799,12 @@ const error$24 = () => {
4953
4799
  };
4954
4800
  };
4955
4801
  function hu_default() {
4956
- return { localeError: error$24() };
4802
+ return { localeError: error$23() };
4957
4803
  }
4958
4804
 
4959
4805
  //#endregion
4960
- //#region ../../node_modules/zod/v4/locales/id.js
4961
- const error$23 = () => {
4806
+ //#region ../../node_modules/zod/dist/esm/v4/locales/id.js
4807
+ const error$22 = () => {
4962
4808
  const Sizable = {
4963
4809
  string: {
4964
4810
  unit: "karakter",
@@ -4980,7 +4826,7 @@ const error$23 = () => {
4980
4826
  function getSizing(origin) {
4981
4827
  return Sizable[origin] ?? null;
4982
4828
  }
4983
- const parsedType$3 = (data) => {
4829
+ const parsedType$2 = (data) => {
4984
4830
  const t = typeof data;
4985
4831
  switch (t) {
4986
4832
  case "number": {
@@ -5032,7 +4878,7 @@ const error$23 = () => {
5032
4878
  };
5033
4879
  return (issue$1) => {
5034
4880
  switch (issue$1.code) {
5035
- case "invalid_type": return `Input tidak valid: diharapkan ${issue$1.expected}, diterima ${parsedType$3(issue$1.input)}`;
4881
+ case "invalid_type": return `Input tidak valid: diharapkan ${issue$1.expected}, diterima ${parsedType$2(issue$1.input)}`;
5036
4882
  case "invalid_value":
5037
4883
  if (issue$1.values.length === 1) return `Input tidak valid: diharapkan ${stringifyPrimitive(issue$1.values[0])}`;
5038
4884
  return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue$1.values, "|")}`;
@@ -5068,12 +4914,12 @@ const error$23 = () => {
5068
4914
  };
5069
4915
  };
5070
4916
  function id_default() {
5071
- return { localeError: error$23() };
4917
+ return { localeError: error$22() };
5072
4918
  }
5073
4919
 
5074
4920
  //#endregion
5075
- //#region ../../node_modules/zod/v4/locales/it.js
5076
- const error$22 = () => {
4921
+ //#region ../../node_modules/zod/dist/esm/v4/locales/it.js
4922
+ const error$21 = () => {
5077
4923
  const Sizable = {
5078
4924
  string: {
5079
4925
  unit: "caratteri",
@@ -5095,7 +4941,7 @@ const error$22 = () => {
5095
4941
  function getSizing(origin) {
5096
4942
  return Sizable[origin] ?? null;
5097
4943
  }
5098
- const parsedType$3 = (data) => {
4944
+ const parsedType$2 = (data) => {
5099
4945
  const t = typeof data;
5100
4946
  switch (t) {
5101
4947
  case "number": {
@@ -5147,7 +4993,7 @@ const error$22 = () => {
5147
4993
  };
5148
4994
  return (issue$1) => {
5149
4995
  switch (issue$1.code) {
5150
- case "invalid_type": return `Input non valido: atteso ${issue$1.expected}, ricevuto ${parsedType$3(issue$1.input)}`;
4996
+ case "invalid_type": return `Input non valido: atteso ${issue$1.expected}, ricevuto ${parsedType$2(issue$1.input)}`;
5151
4997
  case "invalid_value":
5152
4998
  if (issue$1.values.length === 1) return `Input non valido: atteso ${stringifyPrimitive(issue$1.values[0])}`;
5153
4999
  return `Opzione non valida: atteso uno tra ${joinValues(issue$1.values, "|")}`;
@@ -5183,12 +5029,12 @@ const error$22 = () => {
5183
5029
  };
5184
5030
  };
5185
5031
  function it_default() {
5186
- return { localeError: error$22() };
5032
+ return { localeError: error$21() };
5187
5033
  }
5188
5034
 
5189
5035
  //#endregion
5190
- //#region ../../node_modules/zod/v4/locales/ja.js
5191
- const error$21 = () => {
5036
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ja.js
5037
+ const error$20 = () => {
5192
5038
  const Sizable = {
5193
5039
  string: {
5194
5040
  unit: "文字",
@@ -5210,7 +5056,7 @@ const error$21 = () => {
5210
5056
  function getSizing(origin) {
5211
5057
  return Sizable[origin] ?? null;
5212
5058
  }
5213
- const parsedType$3 = (data) => {
5059
+ const parsedType$2 = (data) => {
5214
5060
  const t = typeof data;
5215
5061
  switch (t) {
5216
5062
  case "number": {
@@ -5262,21 +5108,21 @@ const error$21 = () => {
5262
5108
  };
5263
5109
  return (issue$1) => {
5264
5110
  switch (issue$1.code) {
5265
- case "invalid_type": return `無効な入力: ${issue$1.expected}が期待されましたが、${parsedType$3(issue$1.input)}が入力されました`;
5111
+ case "invalid_type": return `無効な入力: ${issue$1.expected}が期待されましたが、${parsedType$2(issue$1.input)}が入力されました`;
5266
5112
  case "invalid_value":
5267
5113
  if (issue$1.values.length === 1) return `無効な入力: ${stringifyPrimitive(issue$1.values[0])}が期待されました`;
5268
5114
  return `無効な選択: ${joinValues(issue$1.values, "、")}のいずれかである必要があります`;
5269
5115
  case "too_big": {
5270
- const adj = issue$1.inclusive ? "以下である" : "より小さい";
5116
+ const adj = issue$1.inclusive ? "<=" : "<";
5271
5117
  const sizing = getSizing(issue$1.origin);
5272
- if (sizing) return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${sizing.unit ?? "要素"}${adj}必要があります`;
5273
- return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${adj}必要があります`;
5118
+ if (sizing) return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${sizing.unit ?? "要素"}${adj}である必要があります`;
5119
+ return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${adj}である必要があります`;
5274
5120
  }
5275
5121
  case "too_small": {
5276
- const adj = issue$1.inclusive ? "以上である" : "より大きい";
5122
+ const adj = issue$1.inclusive ? ">=" : ">";
5277
5123
  const sizing = getSizing(issue$1.origin);
5278
- if (sizing) return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${sizing.unit}${adj}必要があります`;
5279
- return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${adj}必要があります`;
5124
+ if (sizing) return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${sizing.unit}${adj}である必要があります`;
5125
+ return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${adj}である必要があります`;
5280
5126
  }
5281
5127
  case "invalid_format": {
5282
5128
  const _issue = issue$1;
@@ -5296,12 +5142,12 @@ const error$21 = () => {
5296
5142
  };
5297
5143
  };
5298
5144
  function ja_default() {
5299
- return { localeError: error$21() };
5145
+ return { localeError: error$20() };
5300
5146
  }
5301
5147
 
5302
5148
  //#endregion
5303
- //#region ../../node_modules/zod/v4/locales/kh.js
5304
- const error$20 = () => {
5149
+ //#region ../../node_modules/zod/dist/esm/v4/locales/kh.js
5150
+ const error$19 = () => {
5305
5151
  const Sizable = {
5306
5152
  string: {
5307
5153
  unit: "តួអក្សរ",
@@ -5323,7 +5169,7 @@ const error$20 = () => {
5323
5169
  function getSizing(origin) {
5324
5170
  return Sizable[origin] ?? null;
5325
5171
  }
5326
- const parsedType$3 = (data) => {
5172
+ const parsedType$2 = (data) => {
5327
5173
  const t = typeof data;
5328
5174
  switch (t) {
5329
5175
  case "number": {
@@ -5375,7 +5221,7 @@ const error$20 = () => {
5375
5221
  };
5376
5222
  return (issue$1) => {
5377
5223
  switch (issue$1.code) {
5378
- case "invalid_type": return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue$1.expected} ប៉ុន្តែទទួលបាន ${parsedType$3(issue$1.input)}`;
5224
+ case "invalid_type": return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue$1.expected} ប៉ុន្តែទទួលបាន ${parsedType$2(issue$1.input)}`;
5379
5225
  case "invalid_value":
5380
5226
  if (issue$1.values.length === 1) return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${stringifyPrimitive(issue$1.values[0])}`;
5381
5227
  return `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${joinValues(issue$1.values, "|")}`;
@@ -5413,12 +5259,12 @@ const error$20 = () => {
5413
5259
  };
5414
5260
  };
5415
5261
  function kh_default() {
5416
- return { localeError: error$20() };
5262
+ return { localeError: error$19() };
5417
5263
  }
5418
5264
 
5419
5265
  //#endregion
5420
- //#region ../../node_modules/zod/v4/locales/ko.js
5421
- const error$19 = () => {
5266
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ko.js
5267
+ const error$18 = () => {
5422
5268
  const Sizable = {
5423
5269
  string: {
5424
5270
  unit: "문자",
@@ -5440,7 +5286,7 @@ const error$19 = () => {
5440
5286
  function getSizing(origin) {
5441
5287
  return Sizable[origin] ?? null;
5442
5288
  }
5443
- const parsedType$3 = (data) => {
5289
+ const parsedType$2 = (data) => {
5444
5290
  const t = typeof data;
5445
5291
  switch (t) {
5446
5292
  case "number": {
@@ -5492,7 +5338,7 @@ const error$19 = () => {
5492
5338
  };
5493
5339
  return (issue$1) => {
5494
5340
  switch (issue$1.code) {
5495
- case "invalid_type": return `잘못된 입력: 예상 타입은 ${issue$1.expected}, 받은 타입은 ${parsedType$3(issue$1.input)}입니다`;
5341
+ case "invalid_type": return `잘못된 입력: 예상 타입은 ${issue$1.expected}, 받은 타입은 ${parsedType$2(issue$1.input)}입니다`;
5496
5342
  case "invalid_value":
5497
5343
  if (issue$1.values.length === 1) return `잘못된 입력: 값은 ${stringifyPrimitive(issue$1.values[0])} 이어야 합니다`;
5498
5344
  return `잘못된 옵션: ${joinValues(issue$1.values, "또는 ")} 중 하나여야 합니다`;
@@ -5534,12 +5380,12 @@ const error$19 = () => {
5534
5380
  };
5535
5381
  };
5536
5382
  function ko_default() {
5537
- return { localeError: error$19() };
5383
+ return { localeError: error$18() };
5538
5384
  }
5539
5385
 
5540
5386
  //#endregion
5541
- //#region ../../node_modules/zod/v4/locales/mk.js
5542
- const error$18 = () => {
5387
+ //#region ../../node_modules/zod/dist/esm/v4/locales/mk.js
5388
+ const error$17 = () => {
5543
5389
  const Sizable = {
5544
5390
  string: {
5545
5391
  unit: "знаци",
@@ -5561,7 +5407,7 @@ const error$18 = () => {
5561
5407
  function getSizing(origin) {
5562
5408
  return Sizable[origin] ?? null;
5563
5409
  }
5564
- const parsedType$3 = (data) => {
5410
+ const parsedType$2 = (data) => {
5565
5411
  const t = typeof data;
5566
5412
  switch (t) {
5567
5413
  case "number": {
@@ -5613,7 +5459,7 @@ const error$18 = () => {
5613
5459
  };
5614
5460
  return (issue$1) => {
5615
5461
  switch (issue$1.code) {
5616
- case "invalid_type": return `Грешен внес: се очекува ${issue$1.expected}, примено ${parsedType$3(issue$1.input)}`;
5462
+ case "invalid_type": return `Грешен внес: се очекува ${issue$1.expected}, примено ${parsedType$2(issue$1.input)}`;
5617
5463
  case "invalid_value":
5618
5464
  if (issue$1.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue$1.values[0])}`;
5619
5465
  return `Грешана опција: се очекува една ${joinValues(issue$1.values, "|")}`;
@@ -5651,12 +5497,12 @@ const error$18 = () => {
5651
5497
  };
5652
5498
  };
5653
5499
  function mk_default() {
5654
- return { localeError: error$18() };
5500
+ return { localeError: error$17() };
5655
5501
  }
5656
5502
 
5657
5503
  //#endregion
5658
- //#region ../../node_modules/zod/v4/locales/ms.js
5659
- const error$17 = () => {
5504
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ms.js
5505
+ const error$16 = () => {
5660
5506
  const Sizable = {
5661
5507
  string: {
5662
5508
  unit: "aksara",
@@ -5678,7 +5524,7 @@ const error$17 = () => {
5678
5524
  function getSizing(origin) {
5679
5525
  return Sizable[origin] ?? null;
5680
5526
  }
5681
- const parsedType$3 = (data) => {
5527
+ const parsedType$2 = (data) => {
5682
5528
  const t = typeof data;
5683
5529
  switch (t) {
5684
5530
  case "number": {
@@ -5730,7 +5576,7 @@ const error$17 = () => {
5730
5576
  };
5731
5577
  return (issue$1) => {
5732
5578
  switch (issue$1.code) {
5733
- case "invalid_type": return `Input tidak sah: dijangka ${issue$1.expected}, diterima ${parsedType$3(issue$1.input)}`;
5579
+ case "invalid_type": return `Input tidak sah: dijangka ${issue$1.expected}, diterima ${parsedType$2(issue$1.input)}`;
5734
5580
  case "invalid_value":
5735
5581
  if (issue$1.values.length === 1) return `Input tidak sah: dijangka ${stringifyPrimitive(issue$1.values[0])}`;
5736
5582
  return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue$1.values, "|")}`;
@@ -5766,12 +5612,12 @@ const error$17 = () => {
5766
5612
  };
5767
5613
  };
5768
5614
  function ms_default() {
5769
- return { localeError: error$17() };
5615
+ return { localeError: error$16() };
5770
5616
  }
5771
5617
 
5772
5618
  //#endregion
5773
- //#region ../../node_modules/zod/v4/locales/nl.js
5774
- const error$16 = () => {
5619
+ //#region ../../node_modules/zod/dist/esm/v4/locales/nl.js
5620
+ const error$15 = () => {
5775
5621
  const Sizable = {
5776
5622
  string: { unit: "tekens" },
5777
5623
  file: { unit: "bytes" },
@@ -5781,7 +5627,7 @@ const error$16 = () => {
5781
5627
  function getSizing(origin) {
5782
5628
  return Sizable[origin] ?? null;
5783
5629
  }
5784
- const parsedType$3 = (data) => {
5630
+ const parsedType$2 = (data) => {
5785
5631
  const t = typeof data;
5786
5632
  switch (t) {
5787
5633
  case "number": {
@@ -5833,7 +5679,7 @@ const error$16 = () => {
5833
5679
  };
5834
5680
  return (issue$1) => {
5835
5681
  switch (issue$1.code) {
5836
- case "invalid_type": return `Ongeldige invoer: verwacht ${issue$1.expected}, ontving ${parsedType$3(issue$1.input)}`;
5682
+ case "invalid_type": return `Ongeldige invoer: verwacht ${issue$1.expected}, ontving ${parsedType$2(issue$1.input)}`;
5837
5683
  case "invalid_value":
5838
5684
  if (issue$1.values.length === 1) return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue$1.values[0])}`;
5839
5685
  return `Ongeldige optie: verwacht één van ${joinValues(issue$1.values, "|")}`;
@@ -5871,12 +5717,12 @@ const error$16 = () => {
5871
5717
  };
5872
5718
  };
5873
5719
  function nl_default() {
5874
- return { localeError: error$16() };
5720
+ return { localeError: error$15() };
5875
5721
  }
5876
5722
 
5877
5723
  //#endregion
5878
- //#region ../../node_modules/zod/v4/locales/no.js
5879
- const error$15 = () => {
5724
+ //#region ../../node_modules/zod/dist/esm/v4/locales/no.js
5725
+ const error$14 = () => {
5880
5726
  const Sizable = {
5881
5727
  string: {
5882
5728
  unit: "tegn",
@@ -5898,7 +5744,7 @@ const error$15 = () => {
5898
5744
  function getSizing(origin) {
5899
5745
  return Sizable[origin] ?? null;
5900
5746
  }
5901
- const parsedType$3 = (data) => {
5747
+ const parsedType$2 = (data) => {
5902
5748
  const t = typeof data;
5903
5749
  switch (t) {
5904
5750
  case "number": {
@@ -5950,7 +5796,7 @@ const error$15 = () => {
5950
5796
  };
5951
5797
  return (issue$1) => {
5952
5798
  switch (issue$1.code) {
5953
- case "invalid_type": return `Ugyldig input: forventet ${issue$1.expected}, fikk ${parsedType$3(issue$1.input)}`;
5799
+ case "invalid_type": return `Ugyldig input: forventet ${issue$1.expected}, fikk ${parsedType$2(issue$1.input)}`;
5954
5800
  case "invalid_value":
5955
5801
  if (issue$1.values.length === 1) return `Ugyldig verdi: forventet ${stringifyPrimitive(issue$1.values[0])}`;
5956
5802
  return `Ugyldig valg: forventet en av ${joinValues(issue$1.values, "|")}`;
@@ -5986,12 +5832,12 @@ const error$15 = () => {
5986
5832
  };
5987
5833
  };
5988
5834
  function no_default() {
5989
- return { localeError: error$15() };
5835
+ return { localeError: error$14() };
5990
5836
  }
5991
5837
 
5992
5838
  //#endregion
5993
- //#region ../../node_modules/zod/v4/locales/ota.js
5994
- const error$14 = () => {
5839
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ota.js
5840
+ const error$13 = () => {
5995
5841
  const Sizable = {
5996
5842
  string: {
5997
5843
  unit: "harf",
@@ -6013,7 +5859,7 @@ const error$14 = () => {
6013
5859
  function getSizing(origin) {
6014
5860
  return Sizable[origin] ?? null;
6015
5861
  }
6016
- const parsedType$3 = (data) => {
5862
+ const parsedType$2 = (data) => {
6017
5863
  const t = typeof data;
6018
5864
  switch (t) {
6019
5865
  case "number": {
@@ -6065,7 +5911,7 @@ const error$14 = () => {
6065
5911
  };
6066
5912
  return (issue$1) => {
6067
5913
  switch (issue$1.code) {
6068
- case "invalid_type": return `Fâsit giren: umulan ${issue$1.expected}, alınan ${parsedType$3(issue$1.input)}`;
5914
+ case "invalid_type": return `Fâsit giren: umulan ${issue$1.expected}, alınan ${parsedType$2(issue$1.input)}`;
6069
5915
  case "invalid_value":
6070
5916
  if (issue$1.values.length === 1) return `Fâsit giren: umulan ${stringifyPrimitive(issue$1.values[0])}`;
6071
5917
  return `Fâsit tercih: mûteberler ${joinValues(issue$1.values, "|")}`;
@@ -6101,138 +5947,11 @@ const error$14 = () => {
6101
5947
  };
6102
5948
  };
6103
5949
  function ota_default() {
6104
- return { localeError: error$14() };
6105
- }
6106
-
6107
- //#endregion
6108
- //#region ../../node_modules/zod/v4/locales/ps.js
6109
- const error$13 = () => {
6110
- const Sizable = {
6111
- string: {
6112
- unit: "توکي",
6113
- verb: "ولري"
6114
- },
6115
- file: {
6116
- unit: "بایټس",
6117
- verb: "ولري"
6118
- },
6119
- array: {
6120
- unit: "توکي",
6121
- verb: "ولري"
6122
- },
6123
- set: {
6124
- unit: "توکي",
6125
- verb: "ولري"
6126
- }
6127
- };
6128
- function getSizing(origin) {
6129
- return Sizable[origin] ?? null;
6130
- }
6131
- const parsedType$3 = (data) => {
6132
- const t = typeof data;
6133
- switch (t) {
6134
- case "number": {
6135
- return Number.isNaN(data) ? "NaN" : "عدد";
6136
- }
6137
- case "object": {
6138
- if (Array.isArray(data)) {
6139
- return "ارې";
6140
- }
6141
- if (data === null) {
6142
- return "null";
6143
- }
6144
- if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
6145
- return data.constructor.name;
6146
- }
6147
- }
6148
- }
6149
- return t;
6150
- };
6151
- const Nouns = {
6152
- regex: "ورودي",
6153
- email: "بریښنالیک",
6154
- url: "یو آر ال",
6155
- emoji: "ایموجي",
6156
- uuid: "UUID",
6157
- uuidv4: "UUIDv4",
6158
- uuidv6: "UUIDv6",
6159
- nanoid: "nanoid",
6160
- guid: "GUID",
6161
- cuid: "cuid",
6162
- cuid2: "cuid2",
6163
- ulid: "ULID",
6164
- xid: "XID",
6165
- ksuid: "KSUID",
6166
- datetime: "نیټه او وخت",
6167
- date: "نېټه",
6168
- time: "وخت",
6169
- duration: "موده",
6170
- ipv4: "د IPv4 پته",
6171
- ipv6: "د IPv6 پته",
6172
- cidrv4: "د IPv4 ساحه",
6173
- cidrv6: "د IPv6 ساحه",
6174
- base64: "base64-encoded متن",
6175
- base64url: "base64url-encoded متن",
6176
- json_string: "JSON متن",
6177
- e164: "د E.164 شمېره",
6178
- jwt: "JWT",
6179
- template_literal: "ورودي"
6180
- };
6181
- return (issue$1) => {
6182
- switch (issue$1.code) {
6183
- case "invalid_type": return `ناسم ورودي: باید ${issue$1.expected} وای, مګر ${parsedType$3(issue$1.input)} ترلاسه شو`;
6184
- case "invalid_value":
6185
- if (issue$1.values.length === 1) {
6186
- return `ناسم ورودي: باید ${stringifyPrimitive(issue$1.values[0])} وای`;
6187
- }
6188
- return `ناسم انتخاب: باید یو له ${joinValues(issue$1.values, "|")} څخه وای`;
6189
- case "too_big": {
6190
- const adj = issue$1.inclusive ? "<=" : "<";
6191
- const sizing = getSizing(issue$1.origin);
6192
- if (sizing) {
6193
- return `ډیر لوی: ${issue$1.origin ?? "ارزښت"} باید ${adj}${issue$1.maximum.toString()} ${sizing.unit ?? "عنصرونه"} ولري`;
6194
- }
6195
- return `ډیر لوی: ${issue$1.origin ?? "ارزښت"} باید ${adj}${issue$1.maximum.toString()} وي`;
6196
- }
6197
- case "too_small": {
6198
- const adj = issue$1.inclusive ? ">=" : ">";
6199
- const sizing = getSizing(issue$1.origin);
6200
- if (sizing) {
6201
- return `ډیر کوچنی: ${issue$1.origin} باید ${adj}${issue$1.minimum.toString()} ${sizing.unit} ولري`;
6202
- }
6203
- return `ډیر کوچنی: ${issue$1.origin} باید ${adj}${issue$1.minimum.toString()} وي`;
6204
- }
6205
- case "invalid_format": {
6206
- const _issue = issue$1;
6207
- if (_issue.format === "starts_with") {
6208
- return `ناسم متن: باید د "${_issue.prefix}" سره پیل شي`;
6209
- }
6210
- if (_issue.format === "ends_with") {
6211
- return `ناسم متن: باید د "${_issue.suffix}" سره پای ته ورسيږي`;
6212
- }
6213
- if (_issue.format === "includes") {
6214
- return `ناسم متن: باید "${_issue.includes}" ولري`;
6215
- }
6216
- if (_issue.format === "regex") {
6217
- return `ناسم متن: باید د ${_issue.pattern} سره مطابقت ولري`;
6218
- }
6219
- return `${Nouns[_issue.format] ?? issue$1.format} ناسم دی`;
6220
- }
6221
- case "not_multiple_of": return `ناسم عدد: باید د ${issue$1.divisor} مضرب وي`;
6222
- case "unrecognized_keys": return `ناسم ${issue$1.keys.length > 1 ? "کلیډونه" : "کلیډ"}: ${joinValues(issue$1.keys, ", ")}`;
6223
- case "invalid_key": return `ناسم کلیډ په ${issue$1.origin} کې`;
6224
- case "invalid_union": return `ناسمه ورودي`;
6225
- case "invalid_element": return `ناسم عنصر په ${issue$1.origin} کې`;
6226
- default: return `ناسمه ورودي`;
6227
- }
6228
- };
6229
- };
6230
- function ps_default() {
6231
5950
  return { localeError: error$13() };
6232
5951
  }
6233
5952
 
6234
5953
  //#endregion
6235
- //#region ../../node_modules/zod/v4/locales/pl.js
5954
+ //#region ../../node_modules/zod/dist/esm/v4/locales/pl.js
6236
5955
  const error$12 = () => {
6237
5956
  const Sizable = {
6238
5957
  string: {
@@ -6255,7 +5974,7 @@ const error$12 = () => {
6255
5974
  function getSizing(origin) {
6256
5975
  return Sizable[origin] ?? null;
6257
5976
  }
6258
- const parsedType$3 = (data) => {
5977
+ const parsedType$2 = (data) => {
6259
5978
  const t = typeof data;
6260
5979
  switch (t) {
6261
5980
  case "number": {
@@ -6307,7 +6026,7 @@ const error$12 = () => {
6307
6026
  };
6308
6027
  return (issue$1) => {
6309
6028
  switch (issue$1.code) {
6310
- case "invalid_type": return `Nieprawidłowe dane wejściowe: oczekiwano ${issue$1.expected}, otrzymano ${parsedType$3(issue$1.input)}`;
6029
+ case "invalid_type": return `Nieprawidłowe dane wejściowe: oczekiwano ${issue$1.expected}, otrzymano ${parsedType$2(issue$1.input)}`;
6311
6030
  case "invalid_value":
6312
6031
  if (issue$1.values.length === 1) return `Nieprawidłowe dane wejściowe: oczekiwano ${stringifyPrimitive(issue$1.values[0])}`;
6313
6032
  return `Nieprawidłowa opcja: oczekiwano jednej z wartości ${joinValues(issue$1.values, "|")}`;
@@ -6349,7 +6068,7 @@ function pl_default() {
6349
6068
  }
6350
6069
 
6351
6070
  //#endregion
6352
- //#region ../../node_modules/zod/v4/locales/pt.js
6071
+ //#region ../../node_modules/zod/dist/esm/v4/locales/pt.js
6353
6072
  const error$11 = () => {
6354
6073
  const Sizable = {
6355
6074
  string: {
@@ -6372,7 +6091,7 @@ const error$11 = () => {
6372
6091
  function getSizing(origin) {
6373
6092
  return Sizable[origin] ?? null;
6374
6093
  }
6375
- const parsedType$3 = (data) => {
6094
+ const parsedType$2 = (data) => {
6376
6095
  const t = typeof data;
6377
6096
  switch (t) {
6378
6097
  case "number": {
@@ -6424,7 +6143,7 @@ const error$11 = () => {
6424
6143
  };
6425
6144
  return (issue$1) => {
6426
6145
  switch (issue$1.code) {
6427
- case "invalid_type": return `Tipo inválido: esperado ${issue$1.expected}, recebido ${parsedType$3(issue$1.input)}`;
6146
+ case "invalid_type": return `Tipo inválido: esperado ${issue$1.expected}, recebido ${parsedType$2(issue$1.input)}`;
6428
6147
  case "invalid_value":
6429
6148
  if (issue$1.values.length === 1) return `Entrada inválida: esperado ${stringifyPrimitive(issue$1.values[0])}`;
6430
6149
  return `Opção inválida: esperada uma das ${joinValues(issue$1.values, "|")}`;
@@ -6464,7 +6183,7 @@ function pt_default() {
6464
6183
  }
6465
6184
 
6466
6185
  //#endregion
6467
- //#region ../../node_modules/zod/v4/locales/ru.js
6186
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ru.js
6468
6187
  function getRussianPlural(count, one, few, many) {
6469
6188
  const absCount = Math.abs(count);
6470
6189
  const lastDigit = absCount % 10;
@@ -6518,7 +6237,7 @@ const error$10 = () => {
6518
6237
  function getSizing(origin) {
6519
6238
  return Sizable[origin] ?? null;
6520
6239
  }
6521
- const parsedType$3 = (data) => {
6240
+ const parsedType$2 = (data) => {
6522
6241
  const t = typeof data;
6523
6242
  switch (t) {
6524
6243
  case "number": {
@@ -6570,7 +6289,7 @@ const error$10 = () => {
6570
6289
  };
6571
6290
  return (issue$1) => {
6572
6291
  switch (issue$1.code) {
6573
- case "invalid_type": return `Неверный ввод: ожидалось ${issue$1.expected}, получено ${parsedType$3(issue$1.input)}`;
6292
+ case "invalid_type": return `Неверный ввод: ожидалось ${issue$1.expected}, получено ${parsedType$2(issue$1.input)}`;
6574
6293
  case "invalid_value":
6575
6294
  if (issue$1.values.length === 1) return `Неверный ввод: ожидалось ${stringifyPrimitive(issue$1.values[0])}`;
6576
6295
  return `Неверный вариант: ожидалось одно из ${joinValues(issue$1.values, "|")}`;
@@ -6616,7 +6335,7 @@ function ru_default() {
6616
6335
  }
6617
6336
 
6618
6337
  //#endregion
6619
- //#region ../../node_modules/zod/v4/locales/sl.js
6338
+ //#region ../../node_modules/zod/dist/esm/v4/locales/sl.js
6620
6339
  const error$9 = () => {
6621
6340
  const Sizable = {
6622
6341
  string: {
@@ -6639,7 +6358,7 @@ const error$9 = () => {
6639
6358
  function getSizing(origin) {
6640
6359
  return Sizable[origin] ?? null;
6641
6360
  }
6642
- const parsedType$3 = (data) => {
6361
+ const parsedType$2 = (data) => {
6643
6362
  const t = typeof data;
6644
6363
  switch (t) {
6645
6364
  case "number": {
@@ -6691,7 +6410,7 @@ const error$9 = () => {
6691
6410
  };
6692
6411
  return (issue$1) => {
6693
6412
  switch (issue$1.code) {
6694
- case "invalid_type": return `Neveljaven vnos: pričakovano ${issue$1.expected}, prejeto ${parsedType$3(issue$1.input)}`;
6413
+ case "invalid_type": return `Neveljaven vnos: pričakovano ${issue$1.expected}, prejeto ${parsedType$2(issue$1.input)}`;
6695
6414
  case "invalid_value":
6696
6415
  if (issue$1.values.length === 1) return `Neveljaven vnos: pričakovano ${stringifyPrimitive(issue$1.values[0])}`;
6697
6416
  return `Neveljavna možnost: pričakovano eno izmed ${joinValues(issue$1.values, "|")}`;
@@ -6733,7 +6452,7 @@ function sl_default() {
6733
6452
  }
6734
6453
 
6735
6454
  //#endregion
6736
- //#region ../../node_modules/zod/v4/locales/sv.js
6455
+ //#region ../../node_modules/zod/dist/esm/v4/locales/sv.js
6737
6456
  const error$8 = () => {
6738
6457
  const Sizable = {
6739
6458
  string: {
@@ -6756,7 +6475,7 @@ const error$8 = () => {
6756
6475
  function getSizing(origin) {
6757
6476
  return Sizable[origin] ?? null;
6758
6477
  }
6759
- const parsedType$3 = (data) => {
6478
+ const parsedType$2 = (data) => {
6760
6479
  const t = typeof data;
6761
6480
  switch (t) {
6762
6481
  case "number": {
@@ -6808,7 +6527,7 @@ const error$8 = () => {
6808
6527
  };
6809
6528
  return (issue$1) => {
6810
6529
  switch (issue$1.code) {
6811
- case "invalid_type": return `Ogiltig inmatning: förväntat ${issue$1.expected}, fick ${parsedType$3(issue$1.input)}`;
6530
+ case "invalid_type": return `Ogiltig inmatning: förväntat ${issue$1.expected}, fick ${parsedType$2(issue$1.input)}`;
6812
6531
  case "invalid_value":
6813
6532
  if (issue$1.values.length === 1) return `Ogiltig inmatning: förväntat ${stringifyPrimitive(issue$1.values[0])}`;
6814
6533
  return `Ogiltigt val: förväntade en av ${joinValues(issue$1.values, "|")}`;
@@ -6852,7 +6571,7 @@ function sv_default() {
6852
6571
  }
6853
6572
 
6854
6573
  //#endregion
6855
- //#region ../../node_modules/zod/v4/locales/ta.js
6574
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ta.js
6856
6575
  const error$7 = () => {
6857
6576
  const Sizable = {
6858
6577
  string: {
@@ -6875,7 +6594,7 @@ const error$7 = () => {
6875
6594
  function getSizing(origin) {
6876
6595
  return Sizable[origin] ?? null;
6877
6596
  }
6878
- const parsedType$3 = (data) => {
6597
+ const parsedType$2 = (data) => {
6879
6598
  const t = typeof data;
6880
6599
  switch (t) {
6881
6600
  case "number": {
@@ -6927,7 +6646,7 @@ const error$7 = () => {
6927
6646
  };
6928
6647
  return (issue$1) => {
6929
6648
  switch (issue$1.code) {
6930
- case "invalid_type": return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue$1.expected}, பெறப்பட்டது ${parsedType$3(issue$1.input)}`;
6649
+ case "invalid_type": return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue$1.expected}, பெறப்பட்டது ${parsedType$2(issue$1.input)}`;
6931
6650
  case "invalid_value":
6932
6651
  if (issue$1.values.length === 1) return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${stringifyPrimitive(issue$1.values[0])}`;
6933
6652
  return `தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${joinValues(issue$1.values, "|")} இல் ஒன்று`;
@@ -6969,7 +6688,7 @@ function ta_default() {
6969
6688
  }
6970
6689
 
6971
6690
  //#endregion
6972
- //#region ../../node_modules/zod/v4/locales/th.js
6691
+ //#region ../../node_modules/zod/dist/esm/v4/locales/th.js
6973
6692
  const error$6 = () => {
6974
6693
  const Sizable = {
6975
6694
  string: {
@@ -6992,7 +6711,7 @@ const error$6 = () => {
6992
6711
  function getSizing(origin) {
6993
6712
  return Sizable[origin] ?? null;
6994
6713
  }
6995
- const parsedType$3 = (data) => {
6714
+ const parsedType$2 = (data) => {
6996
6715
  const t = typeof data;
6997
6716
  switch (t) {
6998
6717
  case "number": {
@@ -7044,7 +6763,7 @@ const error$6 = () => {
7044
6763
  };
7045
6764
  return (issue$1) => {
7046
6765
  switch (issue$1.code) {
7047
- case "invalid_type": return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue$1.expected} แต่ได้รับ ${parsedType$3(issue$1.input)}`;
6766
+ case "invalid_type": return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue$1.expected} แต่ได้รับ ${parsedType$2(issue$1.input)}`;
7048
6767
  case "invalid_value":
7049
6768
  if (issue$1.values.length === 1) return `ค่าไม่ถูกต้อง: ควรเป็น ${stringifyPrimitive(issue$1.values[0])}`;
7050
6769
  return `ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${joinValues(issue$1.values, "|")}`;
@@ -7086,7 +6805,7 @@ function th_default() {
7086
6805
  }
7087
6806
 
7088
6807
  //#endregion
7089
- //#region ../../node_modules/zod/v4/locales/tr.js
6808
+ //#region ../../node_modules/zod/dist/esm/v4/locales/tr.js
7090
6809
  const parsedType = (data) => {
7091
6810
  const t = typeof data;
7092
6811
  switch (t) {
@@ -7199,7 +6918,7 @@ function tr_default() {
7199
6918
  }
7200
6919
 
7201
6920
  //#endregion
7202
- //#region ../../node_modules/zod/v4/locales/ua.js
6921
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ua.js
7203
6922
  const error$4 = () => {
7204
6923
  const Sizable = {
7205
6924
  string: {
@@ -7222,7 +6941,7 @@ const error$4 = () => {
7222
6941
  function getSizing(origin) {
7223
6942
  return Sizable[origin] ?? null;
7224
6943
  }
7225
- const parsedType$3 = (data) => {
6944
+ const parsedType$2 = (data) => {
7226
6945
  const t = typeof data;
7227
6946
  switch (t) {
7228
6947
  case "number": {
@@ -7274,7 +6993,7 @@ const error$4 = () => {
7274
6993
  };
7275
6994
  return (issue$1) => {
7276
6995
  switch (issue$1.code) {
7277
- case "invalid_type": return `Неправильні вхідні дані: очікується ${issue$1.expected}, отримано ${parsedType$3(issue$1.input)}`;
6996
+ case "invalid_type": return `Неправильні вхідні дані: очікується ${issue$1.expected}, отримано ${parsedType$2(issue$1.input)}`;
7278
6997
  case "invalid_value":
7279
6998
  if (issue$1.values.length === 1) return `Неправильні вхідні дані: очікується ${stringifyPrimitive(issue$1.values[0])}`;
7280
6999
  return `Неправильна опція: очікується одне з ${joinValues(issue$1.values, "|")}`;
@@ -7314,7 +7033,7 @@ function ua_default() {
7314
7033
  }
7315
7034
 
7316
7035
  //#endregion
7317
- //#region ../../node_modules/zod/v4/locales/ur.js
7036
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ur.js
7318
7037
  const error$3 = () => {
7319
7038
  const Sizable = {
7320
7039
  string: {
@@ -7337,7 +7056,7 @@ const error$3 = () => {
7337
7056
  function getSizing(origin) {
7338
7057
  return Sizable[origin] ?? null;
7339
7058
  }
7340
- const parsedType$3 = (data) => {
7059
+ const parsedType$2 = (data) => {
7341
7060
  const t = typeof data;
7342
7061
  switch (t) {
7343
7062
  case "number": {
@@ -7389,7 +7108,7 @@ const error$3 = () => {
7389
7108
  };
7390
7109
  return (issue$1) => {
7391
7110
  switch (issue$1.code) {
7392
- case "invalid_type": return `غلط ان پٹ: ${issue$1.expected} متوقع تھا، ${parsedType$3(issue$1.input)} موصول ہوا`;
7111
+ case "invalid_type": return `غلط ان پٹ: ${issue$1.expected} متوقع تھا، ${parsedType$2(issue$1.input)} موصول ہوا`;
7393
7112
  case "invalid_value":
7394
7113
  if (issue$1.values.length === 1) return `غلط ان پٹ: ${stringifyPrimitive(issue$1.values[0])} متوقع تھا`;
7395
7114
  return `غلط آپشن: ${joinValues(issue$1.values, "|")} میں سے ایک متوقع تھا`;
@@ -7431,7 +7150,7 @@ function ur_default() {
7431
7150
  }
7432
7151
 
7433
7152
  //#endregion
7434
- //#region ../../node_modules/zod/v4/locales/vi.js
7153
+ //#region ../../node_modules/zod/dist/esm/v4/locales/vi.js
7435
7154
  const error$2 = () => {
7436
7155
  const Sizable = {
7437
7156
  string: {
@@ -7454,7 +7173,7 @@ const error$2 = () => {
7454
7173
  function getSizing(origin) {
7455
7174
  return Sizable[origin] ?? null;
7456
7175
  }
7457
- const parsedType$3 = (data) => {
7176
+ const parsedType$2 = (data) => {
7458
7177
  const t = typeof data;
7459
7178
  switch (t) {
7460
7179
  case "number": {
@@ -7506,7 +7225,7 @@ const error$2 = () => {
7506
7225
  };
7507
7226
  return (issue$1) => {
7508
7227
  switch (issue$1.code) {
7509
- 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)}`;
7228
+ 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)}`;
7510
7229
  case "invalid_value":
7511
7230
  if (issue$1.values.length === 1) return `Đầu vào không hợp lệ: mong đợi ${stringifyPrimitive(issue$1.values[0])}`;
7512
7231
  return `Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${joinValues(issue$1.values, "|")}`;
@@ -7546,7 +7265,7 @@ function vi_default() {
7546
7265
  }
7547
7266
 
7548
7267
  //#endregion
7549
- //#region ../../node_modules/zod/v4/locales/zh-CN.js
7268
+ //#region ../../node_modules/zod/dist/esm/v4/locales/zh-CN.js
7550
7269
  const error$1 = () => {
7551
7270
  const Sizable = {
7552
7271
  string: {
@@ -7569,7 +7288,7 @@ const error$1 = () => {
7569
7288
  function getSizing(origin) {
7570
7289
  return Sizable[origin] ?? null;
7571
7290
  }
7572
- const parsedType$3 = (data) => {
7291
+ const parsedType$2 = (data) => {
7573
7292
  const t = typeof data;
7574
7293
  switch (t) {
7575
7294
  case "number": {
@@ -7621,7 +7340,7 @@ const error$1 = () => {
7621
7340
  };
7622
7341
  return (issue$1) => {
7623
7342
  switch (issue$1.code) {
7624
- case "invalid_type": return `无效输入:期望 ${issue$1.expected},实际接收 ${parsedType$3(issue$1.input)}`;
7343
+ case "invalid_type": return `无效输入:期望 ${issue$1.expected},实际接收 ${parsedType$2(issue$1.input)}`;
7625
7344
  case "invalid_value":
7626
7345
  if (issue$1.values.length === 1) return `无效输入:期望 ${stringifyPrimitive(issue$1.values[0])}`;
7627
7346
  return `无效选项:期望以下之一 ${joinValues(issue$1.values, "|")}`;
@@ -7661,7 +7380,7 @@ function zh_CN_default() {
7661
7380
  }
7662
7381
 
7663
7382
  //#endregion
7664
- //#region ../../node_modules/zod/v4/locales/zh-TW.js
7383
+ //#region ../../node_modules/zod/dist/esm/v4/locales/zh-TW.js
7665
7384
  const error = () => {
7666
7385
  const Sizable = {
7667
7386
  string: {
@@ -7684,7 +7403,7 @@ const error = () => {
7684
7403
  function getSizing(origin) {
7685
7404
  return Sizable[origin] ?? null;
7686
7405
  }
7687
- const parsedType$3 = (data) => {
7406
+ const parsedType$2 = (data) => {
7688
7407
  const t = typeof data;
7689
7408
  switch (t) {
7690
7409
  case "number": {
@@ -7736,7 +7455,7 @@ const error = () => {
7736
7455
  };
7737
7456
  return (issue$1) => {
7738
7457
  switch (issue$1.code) {
7739
- case "invalid_type": return `無效的輸入值:預期為 ${issue$1.expected},但收到 ${parsedType$3(issue$1.input)}`;
7458
+ case "invalid_type": return `無效的輸入值:預期為 ${issue$1.expected},但收到 ${parsedType$2(issue$1.input)}`;
7740
7459
  case "invalid_value":
7741
7460
  if (issue$1.values.length === 1) return `無效的輸入值:預期為 ${stringifyPrimitive(issue$1.values[0])}`;
7742
7461
  return `無效的選項:預期為以下其中之一 ${joinValues(issue$1.values, "|")}`;
@@ -7778,7 +7497,7 @@ function zh_TW_default() {
7778
7497
  }
7779
7498
 
7780
7499
  //#endregion
7781
- //#region ../../node_modules/zod/v4/locales/index.js
7500
+ //#region ../../node_modules/zod/dist/esm/v4/locales/index.js
7782
7501
  var locales_exports = {};
7783
7502
  __export(locales_exports, {
7784
7503
  ar: () => ar_default,
@@ -7788,7 +7507,6 @@ __export(locales_exports, {
7788
7507
  cs: () => cs_default,
7789
7508
  de: () => de_default,
7790
7509
  en: () => en_default,
7791
- eo: () => eo_default,
7792
7510
  es: () => es_default,
7793
7511
  fa: () => fa_default,
7794
7512
  fi: () => fi_default,
@@ -7807,7 +7525,6 @@ __export(locales_exports, {
7807
7525
  no: () => no_default,
7808
7526
  ota: () => ota_default,
7809
7527
  pl: () => pl_default,
7810
- ps: () => ps_default,
7811
7528
  pt: () => pt_default,
7812
7529
  ru: () => ru_default,
7813
7530
  sl: () => sl_default,
@@ -7823,12 +7540,12 @@ __export(locales_exports, {
7823
7540
  });
7824
7541
 
7825
7542
  //#endregion
7826
- //#region ../../node_modules/zod/v4/core/registries.js
7543
+ //#region ../../node_modules/zod/dist/esm/v4/core/registries.js
7827
7544
  const $output = Symbol("ZodOutput");
7828
7545
  const $input = Symbol("ZodInput");
7829
7546
  var $ZodRegistry = class {
7830
7547
  constructor() {
7831
- this._map = new Map();
7548
+ this._map = new WeakMap();
7832
7549
  this._idmap = new Map();
7833
7550
  }
7834
7551
  add(schema, ..._meta) {
@@ -7842,16 +7559,7 @@ var $ZodRegistry = class {
7842
7559
  }
7843
7560
  return this;
7844
7561
  }
7845
- clear() {
7846
- this._map = new Map();
7847
- this._idmap = new Map();
7848
- return this;
7849
- }
7850
7562
  remove(schema) {
7851
- const meta = this._map.get(schema);
7852
- if (meta && typeof meta === "object" && "id" in meta) {
7853
- this._idmap.delete(meta.id);
7854
- }
7855
7563
  this._map.delete(schema);
7856
7564
  return this;
7857
7565
  }
@@ -7877,7 +7585,7 @@ function registry() {
7877
7585
  const globalRegistry = /* @__PURE__ */ registry();
7878
7586
 
7879
7587
  //#endregion
7880
- //#region ../../node_modules/zod/v4/core/api.js
7588
+ //#region ../../node_modules/zod/dist/esm/v4/core/api.js
7881
7589
  function _string(Class$1, params) {
7882
7590
  return new Class$1({
7883
7591
  type: "string",
@@ -8092,13 +7800,6 @@ function _jwt(Class$1, params) {
8092
7800
  ...normalizeParams(params)
8093
7801
  });
8094
7802
  }
8095
- const TimePrecision = {
8096
- Any: null,
8097
- Minute: -1,
8098
- Second: 0,
8099
- Millisecond: 3,
8100
- Microsecond: 6
8101
- };
8102
7803
  function _isoDateTime(Class$1, params) {
8103
7804
  return new Class$1({
8104
7805
  type: "string",
@@ -8665,8 +8366,8 @@ function _refine(Class$1, fn, _params) {
8665
8366
  return schema;
8666
8367
  }
8667
8368
  function _stringbool(Classes, _params) {
8668
- const params = normalizeParams(_params);
8669
- let truthyArray = params.truthy ?? [
8369
+ const { case: _case, error: error$37, truthy, falsy } = normalizeParams(_params);
8370
+ let truthyArray = truthy ?? [
8670
8371
  "true",
8671
8372
  "1",
8672
8373
  "yes",
@@ -8674,7 +8375,7 @@ function _stringbool(Classes, _params) {
8674
8375
  "y",
8675
8376
  "enabled"
8676
8377
  ];
8677
- let falsyArray = params.falsy ?? [
8378
+ let falsyArray = falsy ?? [
8678
8379
  "false",
8679
8380
  "0",
8680
8381
  "no",
@@ -8682,7 +8383,7 @@ function _stringbool(Classes, _params) {
8682
8383
  "n",
8683
8384
  "disabled"
8684
8385
  ];
8685
- if (params.case !== "sensitive") {
8386
+ if (_case !== "sensitive") {
8686
8387
  truthyArray = truthyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
8687
8388
  falsyArray = falsyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
8688
8389
  }
@@ -8696,7 +8397,7 @@ function _stringbool(Classes, _params) {
8696
8397
  type: "transform",
8697
8398
  transform: (input, payload) => {
8698
8399
  let data = input;
8699
- if (params.case !== "sensitive") data = data.toLowerCase();
8400
+ if (_case !== "sensitive") data = data.toLowerCase();
8700
8401
  if (truthySet.has(data)) {
8701
8402
  return true;
8702
8403
  } else if (falsySet.has(data)) {
@@ -8712,47 +8413,31 @@ function _stringbool(Classes, _params) {
8712
8413
  return {};
8713
8414
  }
8714
8415
  },
8715
- error: params.error
8416
+ error: error$37
8716
8417
  });
8717
8418
  const innerPipe = new _Pipe({
8718
8419
  type: "pipe",
8719
8420
  in: new _String({
8720
8421
  type: "string",
8721
- error: params.error
8422
+ error: error$37
8722
8423
  }),
8723
8424
  out: tx,
8724
- error: params.error
8425
+ error: error$37
8725
8426
  });
8726
8427
  const outerPipe = new _Pipe({
8727
8428
  type: "pipe",
8728
8429
  in: innerPipe,
8729
8430
  out: new _Boolean({
8730
8431
  type: "boolean",
8731
- error: params.error
8432
+ error: error$37
8732
8433
  }),
8733
- error: params.error
8434
+ error: error$37
8734
8435
  });
8735
8436
  return outerPipe;
8736
8437
  }
8737
- function _stringFormat(Class$1, format, fnOrRegex, _params = {}) {
8738
- const params = normalizeParams(_params);
8739
- const def = {
8740
- ...normalizeParams(_params),
8741
- check: "string_format",
8742
- type: "string",
8743
- format,
8744
- fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
8745
- ...params
8746
- };
8747
- if (fnOrRegex instanceof RegExp) {
8748
- def.pattern = fnOrRegex;
8749
- }
8750
- const inst = new Class$1(def);
8751
- return inst;
8752
- }
8753
8438
 
8754
8439
  //#endregion
8755
- //#region ../../node_modules/zod/v4/core/function.js
8440
+ //#region ../../node_modules/zod/dist/esm/v4/core/function.js
8756
8441
  var $ZodFunction = class {
8757
8442
  constructor(def) {
8758
8443
  this._def = def;
@@ -8823,7 +8508,7 @@ function _function(params) {
8823
8508
  }
8824
8509
 
8825
8510
  //#endregion
8826
- //#region ../../node_modules/zod/v4/core/to-json-schema.js
8511
+ //#region ../../node_modules/zod/dist/esm/v4/core/to-json-schema.js
8827
8512
  var JSONSchemaGenerator = class {
8828
8513
  constructor(params) {
8829
8514
  this.counter = 0;
@@ -8859,435 +8544,431 @@ var JSONSchemaGenerator = class {
8859
8544
  const result = {
8860
8545
  schema: {},
8861
8546
  count: 1,
8862
- cycle: undefined,
8863
- path: _params.path
8547
+ cycle: undefined
8864
8548
  };
8865
8549
  this.seen.set(schema, result);
8866
- const overrideSchema = schema._zod.toJSONSchema?.();
8867
- if (overrideSchema) {
8868
- result.schema = overrideSchema;
8550
+ if (schema._zod.toJSONSchema) {
8551
+ result.schema = schema._zod.toJSONSchema();
8552
+ }
8553
+ const params = {
8554
+ ..._params,
8555
+ schemaPath: [..._params.schemaPath, schema],
8556
+ path: _params.path
8557
+ };
8558
+ const parent = schema._zod.parent;
8559
+ if (parent) {
8560
+ result.ref = parent;
8561
+ this.process(parent, params);
8562
+ this.seen.get(parent).isParent = true;
8869
8563
  } else {
8870
- const params = {
8871
- ..._params,
8872
- schemaPath: [..._params.schemaPath, schema],
8873
- path: _params.path
8874
- };
8875
- const parent = schema._zod.parent;
8876
- if (parent) {
8877
- result.ref = parent;
8878
- this.process(parent, params);
8879
- this.seen.get(parent).isParent = true;
8880
- } else {
8881
- const _json = result.schema;
8882
- switch (def.type) {
8883
- case "string": {
8884
- const json$1 = _json;
8885
- json$1.type = "string";
8886
- const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
8887
- if (typeof minimum === "number") json$1.minLength = minimum;
8888
- if (typeof maximum === "number") json$1.maxLength = maximum;
8889
- if (format) {
8890
- json$1.format = formatMap[format] ?? format;
8891
- if (json$1.format === "") delete json$1.format;
8892
- }
8893
- if (contentEncoding) json$1.contentEncoding = contentEncoding;
8894
- if (patterns && patterns.size > 0) {
8895
- const regexes = [...patterns];
8896
- if (regexes.length === 1) json$1.pattern = regexes[0].source;
8897
- else if (regexes.length > 1) {
8898
- result.schema.allOf = [...regexes.map((regex) => ({
8899
- ...this.target === "draft-7" ? { type: "string" } : {},
8900
- pattern: regex.source
8901
- }))];
8902
- }
8903
- }
8904
- break;
8905
- }
8906
- case "number": {
8907
- const json$1 = _json;
8908
- const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
8909
- if (typeof format === "string" && format.includes("int")) json$1.type = "integer";
8910
- else json$1.type = "number";
8911
- if (typeof exclusiveMinimum === "number") json$1.exclusiveMinimum = exclusiveMinimum;
8912
- if (typeof minimum === "number") {
8913
- json$1.minimum = minimum;
8914
- if (typeof exclusiveMinimum === "number") {
8915
- if (exclusiveMinimum >= minimum) delete json$1.minimum;
8916
- else delete json$1.exclusiveMinimum;
8917
- }
8918
- }
8919
- if (typeof exclusiveMaximum === "number") json$1.exclusiveMaximum = exclusiveMaximum;
8920
- if (typeof maximum === "number") {
8921
- json$1.maximum = maximum;
8922
- if (typeof exclusiveMaximum === "number") {
8923
- if (exclusiveMaximum <= maximum) delete json$1.maximum;
8924
- else delete json$1.exclusiveMaximum;
8925
- }
8926
- }
8927
- if (typeof multipleOf === "number") json$1.multipleOf = multipleOf;
8928
- break;
8929
- }
8930
- case "boolean": {
8931
- const json$1 = _json;
8932
- json$1.type = "boolean";
8933
- break;
8934
- }
8935
- case "bigint": {
8936
- if (this.unrepresentable === "throw") {
8937
- throw new Error("BigInt cannot be represented in JSON Schema");
8938
- }
8939
- break;
8564
+ const _json = result.schema;
8565
+ switch (def.type) {
8566
+ case "string": {
8567
+ const json$1 = _json;
8568
+ json$1.type = "string";
8569
+ const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
8570
+ if (typeof minimum === "number") json$1.minLength = minimum;
8571
+ if (typeof maximum === "number") json$1.maxLength = maximum;
8572
+ if (format) {
8573
+ json$1.format = formatMap[format] ?? format;
8574
+ if (json$1.format === "") delete json$1.format;
8940
8575
  }
8941
- case "symbol": {
8942
- if (this.unrepresentable === "throw") {
8943
- throw new Error("Symbols cannot be represented in JSON Schema");
8576
+ if (contentEncoding) json$1.contentEncoding = contentEncoding;
8577
+ if (patterns && patterns.size > 0) {
8578
+ const regexes = [...patterns];
8579
+ if (regexes.length === 1) json$1.pattern = regexes[0].source;
8580
+ else if (regexes.length > 1) {
8581
+ result.schema.allOf = [...regexes.map((regex) => ({
8582
+ ...this.target === "draft-7" ? { type: "string" } : {},
8583
+ pattern: regex.source
8584
+ }))];
8944
8585
  }
8945
- break;
8946
8586
  }
8947
- case "null": {
8948
- _json.type = "null";
8949
- break;
8950
- }
8951
- case "any": {
8952
- break;
8953
- }
8954
- case "unknown": {
8955
- break;
8956
- }
8957
- case "undefined": {
8958
- if (this.unrepresentable === "throw") {
8959
- throw new Error("Undefined cannot be represented in JSON Schema");
8587
+ break;
8588
+ }
8589
+ case "number": {
8590
+ const json$1 = _json;
8591
+ const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
8592
+ if (typeof format === "string" && format.includes("int")) json$1.type = "integer";
8593
+ else json$1.type = "number";
8594
+ if (typeof exclusiveMinimum === "number") json$1.exclusiveMinimum = exclusiveMinimum;
8595
+ if (typeof minimum === "number") {
8596
+ json$1.minimum = minimum;
8597
+ if (typeof exclusiveMinimum === "number") {
8598
+ if (exclusiveMinimum >= minimum) delete json$1.minimum;
8599
+ else delete json$1.exclusiveMinimum;
8960
8600
  }
8961
- break;
8962
8601
  }
8963
- case "void": {
8964
- if (this.unrepresentable === "throw") {
8965
- throw new Error("Void cannot be represented in JSON Schema");
8602
+ if (typeof exclusiveMaximum === "number") json$1.exclusiveMaximum = exclusiveMaximum;
8603
+ if (typeof maximum === "number") {
8604
+ json$1.maximum = maximum;
8605
+ if (typeof exclusiveMaximum === "number") {
8606
+ if (exclusiveMaximum <= maximum) delete json$1.maximum;
8607
+ else delete json$1.exclusiveMaximum;
8966
8608
  }
8967
- break;
8968
- }
8969
- case "never": {
8970
- _json.not = {};
8971
- break;
8972
8609
  }
8973
- case "date": {
8974
- if (this.unrepresentable === "throw") {
8975
- throw new Error("Date cannot be represented in JSON Schema");
8976
- }
8977
- break;
8610
+ if (typeof multipleOf === "number") json$1.multipleOf = multipleOf;
8611
+ break;
8612
+ }
8613
+ case "boolean": {
8614
+ const json$1 = _json;
8615
+ json$1.type = "boolean";
8616
+ break;
8617
+ }
8618
+ case "bigint": {
8619
+ if (this.unrepresentable === "throw") {
8620
+ throw new Error("BigInt cannot be represented in JSON Schema");
8978
8621
  }
8979
- case "array": {
8980
- const json$1 = _json;
8981
- const { minimum, maximum } = schema._zod.bag;
8982
- if (typeof minimum === "number") json$1.minItems = minimum;
8983
- if (typeof maximum === "number") json$1.maxItems = maximum;
8984
- json$1.type = "array";
8985
- json$1.items = this.process(def.element, {
8986
- ...params,
8987
- path: [...params.path, "items"]
8988
- });
8989
- break;
8622
+ break;
8623
+ }
8624
+ case "symbol": {
8625
+ if (this.unrepresentable === "throw") {
8626
+ throw new Error("Symbols cannot be represented in JSON Schema");
8990
8627
  }
8991
- case "object": {
8992
- const json$1 = _json;
8993
- json$1.type = "object";
8994
- json$1.properties = {};
8995
- const shape = def.shape;
8996
- for (const key in shape) {
8997
- json$1.properties[key] = this.process(shape[key], {
8998
- ...params,
8999
- path: [
9000
- ...params.path,
9001
- "properties",
9002
- key
9003
- ]
9004
- });
9005
- }
9006
- const allKeys = new Set(Object.keys(shape));
9007
- const requiredKeys = new Set([...allKeys].filter((key) => {
9008
- const v = def.shape[key]._zod;
9009
- if (this.io === "input") {
9010
- return v.optin === undefined;
9011
- } else {
9012
- return v.optout === undefined;
9013
- }
9014
- }));
9015
- if (requiredKeys.size > 0) {
9016
- json$1.required = Array.from(requiredKeys);
9017
- }
9018
- if (def.catchall?._zod.def.type === "never") {
9019
- json$1.additionalProperties = false;
9020
- } else if (!def.catchall) {
9021
- if (this.io === "output") json$1.additionalProperties = false;
9022
- } else if (def.catchall) {
9023
- json$1.additionalProperties = this.process(def.catchall, {
9024
- ...params,
9025
- path: [...params.path, "additionalProperties"]
9026
- });
9027
- }
9028
- break;
8628
+ break;
8629
+ }
8630
+ case "undefined": {
8631
+ const json$1 = _json;
8632
+ json$1.type = "null";
8633
+ break;
8634
+ }
8635
+ case "null": {
8636
+ _json.type = "null";
8637
+ break;
8638
+ }
8639
+ case "any": {
8640
+ break;
8641
+ }
8642
+ case "unknown": {
8643
+ break;
8644
+ }
8645
+ case "never": {
8646
+ _json.not = {};
8647
+ break;
8648
+ }
8649
+ case "void": {
8650
+ if (this.unrepresentable === "throw") {
8651
+ throw new Error("Void cannot be represented in JSON Schema");
9029
8652
  }
9030
- case "union": {
9031
- const json$1 = _json;
9032
- json$1.anyOf = def.options.map((x, i) => this.process(x, {
9033
- ...params,
9034
- path: [
9035
- ...params.path,
9036
- "anyOf",
9037
- i
9038
- ]
9039
- }));
9040
- break;
8653
+ break;
8654
+ }
8655
+ case "date": {
8656
+ if (this.unrepresentable === "throw") {
8657
+ throw new Error("Date cannot be represented in JSON Schema");
9041
8658
  }
9042
- case "intersection": {
9043
- const json$1 = _json;
9044
- const a = this.process(def.left, {
9045
- ...params,
9046
- path: [
9047
- ...params.path,
9048
- "allOf",
9049
- 0
9050
- ]
9051
- });
9052
- const b = this.process(def.right, {
8659
+ break;
8660
+ }
8661
+ case "array": {
8662
+ const json$1 = _json;
8663
+ const { minimum, maximum } = schema._zod.bag;
8664
+ if (typeof minimum === "number") json$1.minItems = minimum;
8665
+ if (typeof maximum === "number") json$1.maxItems = maximum;
8666
+ json$1.type = "array";
8667
+ json$1.items = this.process(def.element, {
8668
+ ...params,
8669
+ path: [...params.path, "items"]
8670
+ });
8671
+ break;
8672
+ }
8673
+ case "object": {
8674
+ const json$1 = _json;
8675
+ json$1.type = "object";
8676
+ json$1.properties = {};
8677
+ const shape = def.shape;
8678
+ for (const key in shape) {
8679
+ json$1.properties[key] = this.process(shape[key], {
9053
8680
  ...params,
9054
8681
  path: [
9055
8682
  ...params.path,
9056
- "allOf",
9057
- 1
8683
+ "properties",
8684
+ key
9058
8685
  ]
9059
8686
  });
9060
- const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
9061
- const allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
9062
- json$1.allOf = allOf;
9063
- break;
9064
8687
  }
9065
- case "tuple": {
9066
- const json$1 = _json;
9067
- json$1.type = "array";
9068
- const prefixItems = def.items.map((x, i) => this.process(x, {
9069
- ...params,
9070
- path: [
9071
- ...params.path,
9072
- "prefixItems",
9073
- i
9074
- ]
9075
- }));
9076
- if (this.target === "draft-2020-12") {
9077
- json$1.prefixItems = prefixItems;
8688
+ const allKeys = new Set(Object.keys(shape));
8689
+ const requiredKeys = new Set([...allKeys].filter((key) => {
8690
+ const v = def.shape[key]._zod;
8691
+ if (this.io === "input") {
8692
+ return v.optin === undefined;
9078
8693
  } else {
9079
- json$1.items = prefixItems;
8694
+ return v.optout === undefined;
9080
8695
  }
9081
- if (def.rest) {
9082
- const rest = this.process(def.rest, {
9083
- ...params,
9084
- path: [...params.path, "items"]
9085
- });
9086
- if (this.target === "draft-2020-12") {
9087
- json$1.items = rest;
9088
- } else {
9089
- json$1.additionalItems = rest;
9090
- }
9091
- }
9092
- if (def.rest) {
9093
- json$1.items = this.process(def.rest, {
9094
- ...params,
9095
- path: [...params.path, "items"]
9096
- });
9097
- }
9098
- const { minimum, maximum } = schema._zod.bag;
9099
- if (typeof minimum === "number") json$1.minItems = minimum;
9100
- if (typeof maximum === "number") json$1.maxItems = maximum;
9101
- break;
8696
+ }));
8697
+ if (requiredKeys.size > 0) {
8698
+ json$1.required = Array.from(requiredKeys);
9102
8699
  }
9103
- case "record": {
9104
- const json$1 = _json;
9105
- json$1.type = "object";
9106
- json$1.propertyNames = this.process(def.keyType, {
9107
- ...params,
9108
- path: [...params.path, "propertyNames"]
9109
- });
9110
- json$1.additionalProperties = this.process(def.valueType, {
8700
+ if (def.catchall?._zod.def.type === "never") {
8701
+ json$1.additionalProperties = false;
8702
+ } else if (!def.catchall) {
8703
+ if (this.io === "output") json$1.additionalProperties = false;
8704
+ } else if (def.catchall) {
8705
+ json$1.additionalProperties = this.process(def.catchall, {
9111
8706
  ...params,
9112
8707
  path: [...params.path, "additionalProperties"]
9113
8708
  });
9114
- break;
9115
8709
  }
9116
- case "map": {
9117
- if (this.unrepresentable === "throw") {
9118
- throw new Error("Map cannot be represented in JSON Schema");
9119
- }
9120
- break;
8710
+ break;
8711
+ }
8712
+ case "union": {
8713
+ const json$1 = _json;
8714
+ json$1.anyOf = def.options.map((x, i) => this.process(x, {
8715
+ ...params,
8716
+ path: [
8717
+ ...params.path,
8718
+ "anyOf",
8719
+ i
8720
+ ]
8721
+ }));
8722
+ break;
8723
+ }
8724
+ case "intersection": {
8725
+ const json$1 = _json;
8726
+ const a = this.process(def.left, {
8727
+ ...params,
8728
+ path: [
8729
+ ...params.path,
8730
+ "allOf",
8731
+ 0
8732
+ ]
8733
+ });
8734
+ const b = this.process(def.right, {
8735
+ ...params,
8736
+ path: [
8737
+ ...params.path,
8738
+ "allOf",
8739
+ 1
8740
+ ]
8741
+ });
8742
+ const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
8743
+ const allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
8744
+ json$1.allOf = allOf;
8745
+ break;
8746
+ }
8747
+ case "tuple": {
8748
+ const json$1 = _json;
8749
+ json$1.type = "array";
8750
+ const prefixItems = def.items.map((x, i) => this.process(x, {
8751
+ ...params,
8752
+ path: [
8753
+ ...params.path,
8754
+ "prefixItems",
8755
+ i
8756
+ ]
8757
+ }));
8758
+ if (this.target === "draft-2020-12") {
8759
+ json$1.prefixItems = prefixItems;
8760
+ } else {
8761
+ json$1.items = prefixItems;
9121
8762
  }
9122
- case "set": {
9123
- if (this.unrepresentable === "throw") {
9124
- throw new Error("Set cannot be represented in JSON Schema");
8763
+ if (def.rest) {
8764
+ const rest = this.process(def.rest, {
8765
+ ...params,
8766
+ path: [...params.path, "items"]
8767
+ });
8768
+ if (this.target === "draft-2020-12") {
8769
+ json$1.items = rest;
8770
+ } else {
8771
+ json$1.additionalItems = rest;
9125
8772
  }
9126
- break;
9127
8773
  }
9128
- case "enum": {
9129
- const json$1 = _json;
9130
- const values = getEnumValues(def.entries);
9131
- if (values.every((v) => typeof v === "number")) json$1.type = "number";
9132
- if (values.every((v) => typeof v === "string")) json$1.type = "string";
9133
- json$1.enum = values;
9134
- break;
8774
+ if (def.rest) {
8775
+ json$1.items = this.process(def.rest, {
8776
+ ...params,
8777
+ path: [...params.path, "items"]
8778
+ });
8779
+ }
8780
+ const { minimum, maximum } = schema._zod.bag;
8781
+ if (typeof minimum === "number") json$1.minItems = minimum;
8782
+ if (typeof maximum === "number") json$1.maxItems = maximum;
8783
+ break;
8784
+ }
8785
+ case "record": {
8786
+ const json$1 = _json;
8787
+ json$1.type = "object";
8788
+ json$1.propertyNames = this.process(def.keyType, {
8789
+ ...params,
8790
+ path: [...params.path, "propertyNames"]
8791
+ });
8792
+ json$1.additionalProperties = this.process(def.valueType, {
8793
+ ...params,
8794
+ path: [...params.path, "additionalProperties"]
8795
+ });
8796
+ break;
8797
+ }
8798
+ case "map": {
8799
+ if (this.unrepresentable === "throw") {
8800
+ throw new Error("Map cannot be represented in JSON Schema");
9135
8801
  }
9136
- case "literal": {
9137
- const json$1 = _json;
9138
- const vals = [];
9139
- for (const val of def.values) {
9140
- if (val === undefined) {
9141
- if (this.unrepresentable === "throw") {
9142
- throw new Error("Literal `undefined` cannot be represented in JSON Schema");
9143
- } else {}
9144
- } else if (typeof val === "bigint") {
9145
- if (this.unrepresentable === "throw") {
9146
- throw new Error("BigInt literals cannot be represented in JSON Schema");
9147
- } else {
9148
- vals.push(Number(val));
9149
- }
9150
- } else {
9151
- vals.push(val);
9152
- }
9153
- }
9154
- if (vals.length === 0) {} else if (vals.length === 1) {
9155
- const val = vals[0];
9156
- json$1.type = val === null ? "null" : typeof val;
9157
- json$1.const = val;
9158
- } else {
9159
- if (vals.every((v) => typeof v === "number")) json$1.type = "number";
9160
- if (vals.every((v) => typeof v === "string")) json$1.type = "string";
9161
- if (vals.every((v) => typeof v === "boolean")) json$1.type = "string";
9162
- if (vals.every((v) => v === null)) json$1.type = "null";
9163
- json$1.enum = vals;
9164
- }
9165
- break;
8802
+ break;
8803
+ }
8804
+ case "set": {
8805
+ if (this.unrepresentable === "throw") {
8806
+ throw new Error("Set cannot be represented in JSON Schema");
9166
8807
  }
9167
- case "file": {
9168
- const json$1 = _json;
9169
- const file$1 = {
9170
- type: "string",
9171
- format: "binary",
9172
- contentEncoding: "binary"
9173
- };
9174
- const { minimum, maximum, mime } = schema._zod.bag;
9175
- if (minimum !== undefined) file$1.minLength = minimum;
9176
- if (maximum !== undefined) file$1.maxLength = maximum;
9177
- if (mime) {
9178
- if (mime.length === 1) {
9179
- file$1.contentMediaType = mime[0];
9180
- Object.assign(json$1, file$1);
8808
+ break;
8809
+ }
8810
+ case "enum": {
8811
+ const json$1 = _json;
8812
+ const values = getEnumValues(def.entries);
8813
+ if (values.every((v) => typeof v === "number")) json$1.type = "number";
8814
+ if (values.every((v) => typeof v === "string")) json$1.type = "string";
8815
+ json$1.enum = values;
8816
+ break;
8817
+ }
8818
+ case "literal": {
8819
+ const json$1 = _json;
8820
+ const vals = [];
8821
+ for (const val of def.values) {
8822
+ if (val === undefined) {
8823
+ if (this.unrepresentable === "throw") {
8824
+ throw new Error("Literal `undefined` cannot be represented in JSON Schema");
8825
+ } else {}
8826
+ } else if (typeof val === "bigint") {
8827
+ if (this.unrepresentable === "throw") {
8828
+ throw new Error("BigInt literals cannot be represented in JSON Schema");
9181
8829
  } else {
9182
- json$1.anyOf = mime.map((m) => {
9183
- const mFile = {
9184
- ...file$1,
9185
- contentMediaType: m
9186
- };
9187
- return mFile;
9188
- });
8830
+ vals.push(Number(val));
9189
8831
  }
9190
8832
  } else {
9191
- Object.assign(json$1, file$1);
9192
- }
9193
- break;
9194
- }
9195
- case "transform": {
9196
- if (this.unrepresentable === "throw") {
9197
- throw new Error("Transforms cannot be represented in JSON Schema");
8833
+ vals.push(val);
9198
8834
  }
9199
- break;
9200
8835
  }
9201
- case "nullable": {
9202
- const inner = this.process(def.innerType, params);
9203
- _json.anyOf = [inner, { type: "null" }];
9204
- break;
9205
- }
9206
- case "nonoptional": {
9207
- this.process(def.innerType, params);
9208
- result.ref = def.innerType;
9209
- break;
9210
- }
9211
- case "success": {
9212
- const json$1 = _json;
9213
- json$1.type = "boolean";
9214
- break;
9215
- }
9216
- case "default": {
9217
- this.process(def.innerType, params);
9218
- result.ref = def.innerType;
9219
- _json.default = JSON.parse(JSON.stringify(def.defaultValue));
9220
- break;
9221
- }
9222
- case "prefault": {
9223
- this.process(def.innerType, params);
9224
- result.ref = def.innerType;
9225
- if (this.io === "input") _json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
9226
- break;
9227
- }
9228
- case "catch": {
9229
- this.process(def.innerType, params);
9230
- result.ref = def.innerType;
9231
- let catchValue;
9232
- try {
9233
- catchValue = def.catchValue(undefined);
9234
- } catch {
9235
- throw new Error("Dynamic catch values are not supported in JSON Schema");
9236
- }
9237
- _json.default = catchValue;
9238
- break;
8836
+ if (vals.length === 0) {} else if (vals.length === 1) {
8837
+ const val = vals[0];
8838
+ json$1.type = val === null ? "null" : typeof val;
8839
+ json$1.const = val;
8840
+ } else {
8841
+ if (vals.every((v) => typeof v === "number")) json$1.type = "number";
8842
+ if (vals.every((v) => typeof v === "string")) json$1.type = "string";
8843
+ if (vals.every((v) => typeof v === "boolean")) json$1.type = "string";
8844
+ if (vals.every((v) => v === null)) json$1.type = "null";
8845
+ json$1.enum = vals;
9239
8846
  }
9240
- case "nan": {
9241
- if (this.unrepresentable === "throw") {
9242
- throw new Error("NaN cannot be represented in JSON Schema");
8847
+ break;
8848
+ }
8849
+ case "file": {
8850
+ const json$1 = _json;
8851
+ const file$1 = {
8852
+ type: "string",
8853
+ format: "binary",
8854
+ contentEncoding: "binary"
8855
+ };
8856
+ const { minimum, maximum, mime } = schema._zod.bag;
8857
+ if (minimum !== undefined) file$1.minLength = minimum;
8858
+ if (maximum !== undefined) file$1.maxLength = maximum;
8859
+ if (mime) {
8860
+ if (mime.length === 1) {
8861
+ file$1.contentMediaType = mime[0];
8862
+ Object.assign(json$1, file$1);
8863
+ } else {
8864
+ json$1.anyOf = mime.map((m) => {
8865
+ const mFile = {
8866
+ ...file$1,
8867
+ contentMediaType: m
8868
+ };
8869
+ return mFile;
8870
+ });
9243
8871
  }
9244
- break;
9245
- }
9246
- case "template_literal": {
9247
- const json$1 = _json;
9248
- const pattern = schema._zod.pattern;
9249
- if (!pattern) throw new Error("Pattern not found in template literal");
9250
- json$1.type = "string";
9251
- json$1.pattern = pattern.source;
9252
- break;
9253
- }
9254
- case "pipe": {
9255
- const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
9256
- this.process(innerType, params);
9257
- result.ref = innerType;
9258
- break;
9259
- }
9260
- case "readonly": {
9261
- this.process(def.innerType, params);
9262
- result.ref = def.innerType;
9263
- _json.readOnly = true;
9264
- break;
9265
- }
9266
- case "promise": {
9267
- this.process(def.innerType, params);
9268
- result.ref = def.innerType;
9269
- break;
8872
+ } else {
8873
+ Object.assign(json$1, file$1);
9270
8874
  }
9271
- case "optional": {
9272
- this.process(def.innerType, params);
9273
- result.ref = def.innerType;
9274
- break;
8875
+ break;
8876
+ }
8877
+ case "transform": {
8878
+ if (this.unrepresentable === "throw") {
8879
+ throw new Error("Transforms cannot be represented in JSON Schema");
9275
8880
  }
9276
- case "lazy": {
9277
- const innerType = schema._zod.innerType;
9278
- this.process(innerType, params);
9279
- result.ref = innerType;
9280
- break;
8881
+ break;
8882
+ }
8883
+ case "nullable": {
8884
+ const inner = this.process(def.innerType, params);
8885
+ _json.anyOf = [inner, { type: "null" }];
8886
+ break;
8887
+ }
8888
+ case "nonoptional": {
8889
+ this.process(def.innerType, params);
8890
+ result.ref = def.innerType;
8891
+ break;
8892
+ }
8893
+ case "success": {
8894
+ const json$1 = _json;
8895
+ json$1.type = "boolean";
8896
+ break;
8897
+ }
8898
+ case "default": {
8899
+ this.process(def.innerType, params);
8900
+ result.ref = def.innerType;
8901
+ _json.default = def.defaultValue;
8902
+ break;
8903
+ }
8904
+ case "prefault": {
8905
+ this.process(def.innerType, params);
8906
+ result.ref = def.innerType;
8907
+ if (this.io === "input") _json._prefault = def.defaultValue;
8908
+ break;
8909
+ }
8910
+ case "catch": {
8911
+ this.process(def.innerType, params);
8912
+ result.ref = def.innerType;
8913
+ let catchValue;
8914
+ try {
8915
+ catchValue = def.catchValue(undefined);
8916
+ } catch {
8917
+ throw new Error("Dynamic catch values are not supported in JSON Schema");
9281
8918
  }
9282
- case "custom": {
9283
- if (this.unrepresentable === "throw") {
9284
- throw new Error("Custom types cannot be represented in JSON Schema");
9285
- }
9286
- break;
8919
+ _json.default = catchValue;
8920
+ break;
8921
+ }
8922
+ case "nan": {
8923
+ if (this.unrepresentable === "throw") {
8924
+ throw new Error("NaN cannot be represented in JSON Schema");
9287
8925
  }
9288
- default: {
9289
- def;
8926
+ break;
8927
+ }
8928
+ case "template_literal": {
8929
+ const json$1 = _json;
8930
+ const pattern = schema._zod.pattern;
8931
+ if (!pattern) throw new Error("Pattern not found in template literal");
8932
+ json$1.type = "string";
8933
+ json$1.pattern = pattern.source;
8934
+ break;
8935
+ }
8936
+ case "pipe": {
8937
+ const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
8938
+ this.process(innerType, params);
8939
+ result.ref = innerType;
8940
+ break;
8941
+ }
8942
+ case "readonly": {
8943
+ this.process(def.innerType, params);
8944
+ result.ref = def.innerType;
8945
+ _json.readOnly = true;
8946
+ break;
8947
+ }
8948
+ case "promise": {
8949
+ this.process(def.innerType, params);
8950
+ result.ref = def.innerType;
8951
+ break;
8952
+ }
8953
+ case "optional": {
8954
+ this.process(def.innerType, params);
8955
+ result.ref = def.innerType;
8956
+ break;
8957
+ }
8958
+ case "lazy": {
8959
+ const innerType = schema._zod.innerType;
8960
+ this.process(innerType, params);
8961
+ result.ref = innerType;
8962
+ break;
8963
+ }
8964
+ case "custom": {
8965
+ if (this.unrepresentable === "throw") {
8966
+ throw new Error("Custom types cannot be represented in JSON Schema");
9290
8967
  }
8968
+ break;
8969
+ }
8970
+ default: {
8971
+ def;
9291
8972
  }
9292
8973
  }
9293
8974
  }
@@ -9314,15 +8995,12 @@ var JSONSchemaGenerator = class {
9314
8995
  const defsSegment = this.target === "draft-2020-12" ? "$defs" : "definitions";
9315
8996
  if (params.external) {
9316
8997
  const externalId = params.external.registry.get(entry[0])?.id;
9317
- const uriGenerator = params.external.uri ?? ((id$1) => id$1);
9318
- if (externalId) {
9319
- return { ref: uriGenerator(externalId) };
9320
- }
8998
+ if (externalId) return { ref: params.external.uri(externalId) };
9321
8999
  const id = entry[1].defId ?? entry[1].schema.id ?? `schema${this.counter++}`;
9322
9000
  entry[1].defId = id;
9323
9001
  return {
9324
9002
  defId: id,
9325
- ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}`
9003
+ ref: `${params.external.uri("__shared")}#/${defsSegment}/${id}`
9326
9004
  };
9327
9005
  }
9328
9006
  if (entry[1] === root) {
@@ -9350,14 +9028,6 @@ var JSONSchemaGenerator = class {
9350
9028
  }
9351
9029
  schema$1.$ref = ref;
9352
9030
  };
9353
- if (params.cycles === "throw") {
9354
- for (const entry of this.seen.entries()) {
9355
- const seen = entry[1];
9356
- if (seen.cycle) {
9357
- throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + "\n\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.");
9358
- }
9359
- }
9360
- }
9361
9031
  for (const entry of this.seen.entries()) {
9362
9032
  const seen = entry[1];
9363
9033
  if (schema === entry[0]) {
@@ -9377,7 +9047,11 @@ var JSONSchemaGenerator = class {
9377
9047
  continue;
9378
9048
  }
9379
9049
  if (seen.cycle) {
9380
- extractToDef(entry);
9050
+ if (params.cycles === "throw") {
9051
+ throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + "\n\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.");
9052
+ } else if (params.cycles === "ref") {
9053
+ extractToDef(entry);
9054
+ }
9381
9055
  continue;
9382
9056
  }
9383
9057
  if (seen.count > 1) {
@@ -9409,8 +9083,7 @@ var JSONSchemaGenerator = class {
9409
9083
  }
9410
9084
  if (!seen.isParent) this.override({
9411
9085
  zodSchema,
9412
- jsonSchema: schema$1,
9413
- path: seen.path ?? []
9086
+ jsonSchema: schema$1
9414
9087
  });
9415
9088
  };
9416
9089
  for (const entry of [...this.seen.entries()].reverse()) {
@@ -9424,11 +9097,6 @@ var JSONSchemaGenerator = class {
9424
9097
  } else {
9425
9098
  console.warn(`Invalid target: ${this.target}`);
9426
9099
  }
9427
- if (params.external?.uri) {
9428
- const id = params.external.registry.get(schema)?.id;
9429
- if (!id) throw new Error("Schema is missing an `id` property");
9430
- result.$id = params.external.uri(id);
9431
- }
9432
9100
  Object.assign(result, root.def);
9433
9101
  const defs = params.external?.defs ?? {};
9434
9102
  for (const entry of this.seen.entries()) {
@@ -9437,13 +9105,11 @@ var JSONSchemaGenerator = class {
9437
9105
  defs[seen.defId] = seen.def;
9438
9106
  }
9439
9107
  }
9440
- if (params.external) {} else {
9441
- if (Object.keys(defs).length > 0) {
9442
- if (this.target === "draft-2020-12") {
9443
- result.$defs = defs;
9444
- } else {
9445
- result.definitions = defs;
9446
- }
9108
+ if (!params.external && Object.keys(defs).length > 0) {
9109
+ if (this.target === "draft-2020-12") {
9110
+ result.$defs = defs;
9111
+ } else {
9112
+ result.definitions = defs;
9447
9113
  }
9448
9114
  }
9449
9115
  try {
@@ -9464,7 +9130,7 @@ function toJSONSchema(input, _params) {
9464
9130
  const schemas = {};
9465
9131
  const external = {
9466
9132
  registry: input,
9467
- uri: _params?.uri,
9133
+ uri: _params?.uri || ((id) => id),
9468
9134
  defs
9469
9135
  };
9470
9136
  for (const entry of input._idmap.entries()) {
@@ -9575,11 +9241,11 @@ function isTransforming(_schema, _ctx) {
9575
9241
  }
9576
9242
 
9577
9243
  //#endregion
9578
- //#region ../../node_modules/zod/v4/core/json-schema.js
9244
+ //#region ../../node_modules/zod/dist/esm/v4/core/json-schema.js
9579
9245
  var json_schema_exports = {};
9580
9246
 
9581
9247
  //#endregion
9582
- //#region ../../node_modules/zod/v4/core/index.js
9248
+ //#region ../../node_modules/zod/dist/esm/v4/core/index.js
9583
9249
  var core_exports = {};
9584
9250
  __export(core_exports, {
9585
9251
  $ZodAny: () => $ZodAny,
@@ -9618,7 +9284,6 @@ __export(core_exports, {
9618
9284
  $ZodCheckStringFormat: () => $ZodCheckStringFormat,
9619
9285
  $ZodCheckUpperCase: () => $ZodCheckUpperCase,
9620
9286
  $ZodCustom: () => $ZodCustom,
9621
- $ZodCustomStringFormat: () => $ZodCustomStringFormat,
9622
9287
  $ZodDate: () => $ZodDate,
9623
9288
  $ZodDefault: () => $ZodDefault,
9624
9289
  $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion,
@@ -9683,8 +9348,6 @@ __export(core_exports, {
9683
9348
  Doc: () => Doc,
9684
9349
  JSONSchema: () => json_schema_exports,
9685
9350
  JSONSchemaGenerator: () => JSONSchemaGenerator,
9686
- NEVER: () => NEVER,
9687
- TimePrecision: () => TimePrecision,
9688
9351
  _any: () => _any,
9689
9352
  _array: () => _array,
9690
9353
  _base64: () => _base64,
@@ -9774,7 +9437,6 @@ __export(core_exports, {
9774
9437
  _size: () => _size,
9775
9438
  _startsWith: () => _startsWith,
9776
9439
  _string: () => _string,
9777
- _stringFormat: () => _stringFormat,
9778
9440
  _stringbool: () => _stringbool,
9779
9441
  _success: () => _success,
9780
9442
  _symbol: () => _symbol,
@@ -9824,7 +9486,7 @@ __export(core_exports, {
9824
9486
  });
9825
9487
 
9826
9488
  //#endregion
9827
- //#region ../../node_modules/zod/v4/classic/iso.js
9489
+ //#region ../../node_modules/zod/dist/esm/v4/classic/iso.js
9828
9490
  var iso_exports = {};
9829
9491
  __export(iso_exports, {
9830
9492
  ZodISODate: () => ZodISODate,
@@ -9866,7 +9528,7 @@ function duration(params) {
9866
9528
  }
9867
9529
 
9868
9530
  //#endregion
9869
- //#region ../../node_modules/zod/v4/classic/errors.js
9531
+ //#region ../../node_modules/zod/dist/esm/v4/classic/errors.js
9870
9532
  const initializer = (inst, issues) => {
9871
9533
  $ZodError.init(inst, issues);
9872
9534
  inst.name = "ZodError";
@@ -9884,14 +9546,14 @@ const ZodError = $constructor("ZodError", initializer);
9884
9546
  const ZodRealError = $constructor("ZodError", initializer, { Parent: Error });
9885
9547
 
9886
9548
  //#endregion
9887
- //#region ../../node_modules/zod/v4/classic/parse.js
9549
+ //#region ../../node_modules/zod/dist/esm/v4/classic/parse.js
9888
9550
  const parse = /* @__PURE__ */ _parse(ZodRealError);
9889
9551
  const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
9890
9552
  const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
9891
9553
  const safeParseAsync = /* @__PURE__ */ _safeParseAsync(ZodRealError);
9892
9554
 
9893
9555
  //#endregion
9894
- //#region ../../node_modules/zod/v4/classic/schemas.js
9556
+ //#region ../../node_modules/zod/dist/esm/v4/classic/schemas.js
9895
9557
  const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
9896
9558
  $ZodType.init(inst, def);
9897
9559
  inst.def = def;
@@ -10159,13 +9821,6 @@ const ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
10159
9821
  function jwt(params) {
10160
9822
  return _jwt(ZodJWT, params);
10161
9823
  }
10162
- const ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => {
10163
- $ZodCustomStringFormat.init(inst, def);
10164
- ZodStringFormat.init(inst, def);
10165
- });
10166
- function stringFormat(format, fnOrRegex, _params = {}) {
10167
- return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
10168
- }
10169
9824
  const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
10170
9825
  $ZodNumber.init(inst, def);
10171
9826
  ZodType.init(inst, def);
@@ -10335,7 +9990,9 @@ function keyof(schema) {
10335
9990
  const ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
10336
9991
  $ZodObject.init(inst, def);
10337
9992
  ZodType.init(inst, def);
10338
- defineLazy(inst, "shape", () => def.shape);
9993
+ defineLazy(inst, "shape", () => {
9994
+ return Object.fromEntries(Object.entries(inst._zod.def.shape));
9995
+ });
10339
9996
  inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
10340
9997
  inst.catchall = (catchall) => inst.clone({
10341
9998
  ...inst._zod.def,
@@ -10780,8 +10437,11 @@ const ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
10780
10437
  $ZodCustom.init(inst, def);
10781
10438
  ZodType.init(inst, def);
10782
10439
  });
10783
- function check(fn) {
10784
- const ch = new $ZodCheck({ check: "custom" });
10440
+ function check(fn, params) {
10441
+ const ch = new $ZodCheck({
10442
+ check: "custom",
10443
+ ...normalizeParams(params)
10444
+ });
10785
10445
  ch._zod.check = fn;
10786
10446
  return ch;
10787
10447
  }
@@ -10791,7 +10451,7 @@ function custom(fn, _params) {
10791
10451
  function refine(fn, _params = {}) {
10792
10452
  return _refine(ZodCustom, fn, _params);
10793
10453
  }
10794
- function superRefine(fn) {
10454
+ function superRefine(fn, params) {
10795
10455
  const ch = check((payload) => {
10796
10456
  payload.addIssue = (issue$1) => {
10797
10457
  if (typeof issue$1 === "string") {
@@ -10807,7 +10467,7 @@ function superRefine(fn) {
10807
10467
  }
10808
10468
  };
10809
10469
  return fn(payload.value, payload);
10810
- });
10470
+ }, params);
10811
10471
  return ch;
10812
10472
  }
10813
10473
  function _instanceof(cls, params = { error: `Input not instance of ${cls.name}` }) {
@@ -10845,7 +10505,7 @@ function preprocess(fn, schema) {
10845
10505
  }
10846
10506
 
10847
10507
  //#endregion
10848
- //#region ../../node_modules/zod/v4/classic/compat.js
10508
+ //#region ../../node_modules/zod/dist/esm/v4/classic/compat.js
10849
10509
  /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
10850
10510
  const ZodIssueCode = {
10851
10511
  invalid_type: "invalid_type",
@@ -10860,6 +10520,10 @@ const ZodIssueCode = {
10860
10520
  invalid_value: "invalid_value",
10861
10521
  custom: "custom"
10862
10522
  };
10523
+ /** @deprecated Not necessary in Zod 4. */
10524
+ const INVALID = Object.freeze({ status: "aborted" });
10525
+ /** A special constant with type `never` */
10526
+ const NEVER = INVALID;
10863
10527
  /** @deprecated Use `z.config(params)` instead. */
10864
10528
  function setErrorMap(map$1) {
10865
10529
  config({ customError: map$1 });
@@ -10870,7 +10534,7 @@ function getErrorMap() {
10870
10534
  }
10871
10535
 
10872
10536
  //#endregion
10873
- //#region ../../node_modules/zod/v4/classic/coerce.js
10537
+ //#region ../../node_modules/zod/dist/esm/v4/classic/coerce.js
10874
10538
  var coerce_exports = {};
10875
10539
  __export(coerce_exports, {
10876
10540
  bigint: () => bigint,
@@ -10896,14 +10560,13 @@ function date(params) {
10896
10560
  }
10897
10561
 
10898
10562
  //#endregion
10899
- //#region ../../node_modules/zod/v4/classic/external.js
10563
+ //#region ../../node_modules/zod/dist/esm/v4/classic/external.js
10900
10564
  var external_exports = {};
10901
10565
  __export(external_exports, {
10902
10566
  $brand: () => $brand,
10903
10567
  $input: () => $input,
10904
10568
  $output: () => $output,
10905
10569
  NEVER: () => NEVER,
10906
- TimePrecision: () => TimePrecision,
10907
10570
  ZodAny: () => ZodAny,
10908
10571
  ZodArray: () => ZodArray,
10909
10572
  ZodBase64: () => ZodBase64,
@@ -10917,7 +10580,6 @@ __export(external_exports, {
10917
10580
  ZodCUID2: () => ZodCUID2,
10918
10581
  ZodCatch: () => ZodCatch,
10919
10582
  ZodCustom: () => ZodCustom,
10920
- ZodCustomStringFormat: () => ZodCustomStringFormat,
10921
10583
  ZodDate: () => ZodDate,
10922
10584
  ZodDefault: () => ZodDefault,
10923
10585
  ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
@@ -11079,7 +10741,6 @@ __export(external_exports, {
11079
10741
  startsWith: () => _startsWith,
11080
10742
  strictObject: () => strictObject,
11081
10743
  string: () => string$1,
11082
- stringFormat: () => stringFormat,
11083
10744
  stringbool: () => stringbool,
11084
10745
  success: () => success,
11085
10746
  superRefine: () => superRefine,
@@ -11110,11 +10771,11 @@ __export(external_exports, {
11110
10771
  config(en_default());
11111
10772
 
11112
10773
  //#endregion
11113
- //#region ../../node_modules/zod/v4/classic/index.js
10774
+ //#region ../../node_modules/zod/dist/esm/v4/classic/index.js
11114
10775
  var classic_default = external_exports;
11115
10776
 
11116
10777
  //#endregion
11117
- //#region ../../node_modules/zod/v4/index.js
10778
+ //#region ../../node_modules/zod/dist/esm/v4/index.js
11118
10779
  var v4_default = classic_default;
11119
10780
 
11120
10781
  //#endregion