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

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.
@@ -9,9 +9,7 @@ var __export = (target, all) => {
9
9
 
10
10
  //#endregion
11
11
 
12
- //#region ../../node_modules/zod/v4/core/core.js
13
- /** A special constant with type `never` */
14
- const NEVER = Object.freeze({ status: "aborted" });
12
+ //#region ../../node_modules/zod/dist/esm/v4/core/core.js
15
13
  function $constructor(name, initializer$2, params) {
16
14
  function init(inst, def) {
17
15
  var _a;
@@ -62,7 +60,7 @@ function config(newConfig) {
62
60
  }
63
61
 
64
62
  //#endregion
65
- //#region ../../node_modules/zod/v4/core/util.js
63
+ //#region ../../node_modules/zod/dist/esm/v4/core/util.js
66
64
  var util_exports = {};
67
65
  __export(util_exports, {
68
66
  BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
@@ -77,7 +75,6 @@ __export(util_exports, {
77
75
  assertNotEqual: () => assertNotEqual,
78
76
  assignProp: () => assignProp,
79
77
  cached: () => cached,
80
- captureStackTrace: () => captureStackTrace,
81
78
  cleanEnum: () => cleanEnum,
82
79
  cleanRegex: () => cleanRegex,
83
80
  clone: () => clone,
@@ -216,14 +213,10 @@ function randomString(length = 10) {
216
213
  function esc(str) {
217
214
  return JSON.stringify(str);
218
215
  }
219
- const captureStackTrace = Error.captureStackTrace ? Error.captureStackTrace : (..._args) => {};
220
216
  function isObject(data) {
221
217
  return typeof data === "object" && data !== null && !Array.isArray(data);
222
218
  }
223
219
  const allowsEval = cached(() => {
224
- if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
225
- return false;
226
- }
227
220
  try {
228
221
  const F = Function;
229
222
  new F("");
@@ -232,6 +225,9 @@ const allowsEval = cached(() => {
232
225
  return false;
233
226
  }
234
227
  });
228
+ function _isObject(o) {
229
+ return Object.prototype.toString.call(o) === "[object Object]";
230
+ }
235
231
  function isPlainObject(o) {
236
232
  if (isObject(o) === false) return false;
237
233
  const ctor = o.constructor;
@@ -411,9 +407,6 @@ function omit(schema, mask) {
411
407
  });
412
408
  }
413
409
  function extend(schema, shape) {
414
- if (!isPlainObject(shape)) {
415
- throw new Error("Invalid input to extend: expected a plain object");
416
- }
417
410
  const def = {
418
411
  ...schema._zod.def,
419
412
  get shape() {
@@ -501,7 +494,7 @@ function required(Class$1, schema, mask) {
501
494
  }
502
495
  function aborted(x, startIndex = 0) {
503
496
  for (let i = startIndex; i < x.issues.length; i++) {
504
- if (x.issues[i]?.continue !== true) return true;
497
+ if (x.issues[i].continue !== true) return true;
505
498
  }
506
499
  return false;
507
500
  }
@@ -565,7 +558,7 @@ var Class = class {
565
558
  };
566
559
 
567
560
  //#endregion
568
- //#region ../../node_modules/zod/v4/core/errors.js
561
+ //#region ../../node_modules/zod/dist/esm/v4/core/errors.js
569
562
  const initializer$1 = (inst, def) => {
570
563
  inst.name = "$ZodError";
571
564
  Object.defineProperty(inst, "_zod", {
@@ -582,17 +575,13 @@ const initializer$1 = (inst, def) => {
582
575
  },
583
576
  enumerable: true
584
577
  });
585
- Object.defineProperty(inst, "toString", {
586
- value: () => inst.message,
587
- enumerable: false
588
- });
589
578
  };
590
579
  const $ZodError = $constructor("$ZodError", initializer$1);
591
580
  const $ZodRealError = $constructor("$ZodError", initializer$1, { Parent: Error });
592
- function flattenError(error$39, mapper = (issue$1) => issue$1.message) {
581
+ function flattenError(error$37, mapper = (issue$1) => issue$1.message) {
593
582
  const fieldErrors = {};
594
583
  const formErrors = [];
595
- for (const sub of error$39.issues) {
584
+ for (const sub of error$37.issues) {
596
585
  if (sub.path.length > 0) {
597
586
  fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
598
587
  fieldErrors[sub.path[0]].push(mapper(sub));
@@ -605,13 +594,13 @@ function flattenError(error$39, mapper = (issue$1) => issue$1.message) {
605
594
  fieldErrors
606
595
  };
607
596
  }
608
- function formatError(error$39, _mapper) {
597
+ function formatError(error$37, _mapper) {
609
598
  const mapper = _mapper || function(issue$1) {
610
599
  return issue$1.message;
611
600
  };
612
601
  const fieldErrors = { _errors: [] };
613
- const processError = (error$40) => {
614
- for (const issue$1 of error$40.issues) {
602
+ const processError = (error$38) => {
603
+ for (const issue$1 of error$38.issues) {
615
604
  if (issue$1.code === "invalid_union" && issue$1.errors.length) {
616
605
  issue$1.errors.map((issues) => processError({ issues }));
617
606
  } else if (issue$1.code === "invalid_key") {
@@ -638,17 +627,17 @@ function formatError(error$39, _mapper) {
638
627
  }
639
628
  }
640
629
  };
641
- processError(error$39);
630
+ processError(error$37);
642
631
  return fieldErrors;
643
632
  }
644
- function treeifyError(error$39, _mapper) {
633
+ function treeifyError(error$37, _mapper) {
645
634
  const mapper = _mapper || function(issue$1) {
646
635
  return issue$1.message;
647
636
  };
648
637
  const result = { errors: [] };
649
- const processError = (error$40, path = []) => {
638
+ const processError = (error$38, path = []) => {
650
639
  var _a, _b;
651
- for (const issue$1 of error$40.issues) {
640
+ for (const issue$1 of error$38.issues) {
652
641
  if (issue$1.code === "invalid_union" && issue$1.errors.length) {
653
642
  issue$1.errors.map((issues) => processError({ issues }, issue$1.path));
654
643
  } else if (issue$1.code === "invalid_key") {
@@ -683,7 +672,7 @@ function treeifyError(error$39, _mapper) {
683
672
  }
684
673
  }
685
674
  };
686
- processError(error$39);
675
+ processError(error$37);
687
676
  return result;
688
677
  }
689
678
  /** Format a ZodError as a human-readable string in the following form.
@@ -731,9 +720,9 @@ function toDotPath(path) {
731
720
  }
732
721
  return segs.join("");
733
722
  }
734
- function prettifyError(error$39) {
723
+ function prettifyError(error$37) {
735
724
  const lines = [];
736
- const issues = [...error$39.issues].sort((a, b) => a.path.length - b.path.length);
725
+ const issues = [...error$37.issues].sort((a, b) => a.path.length - b.path.length);
737
726
  for (const issue$1 of issues) {
738
727
  lines.push(`✖ ${issue$1.message}`);
739
728
  if (issue$1.path?.length) lines.push(` → at ${toDotPath(issue$1.path)}`);
@@ -742,7 +731,7 @@ function prettifyError(error$39) {
742
731
  }
743
732
 
744
733
  //#endregion
745
- //#region ../../node_modules/zod/v4/core/parse.js
734
+ //#region ../../node_modules/zod/dist/esm/v4/core/parse.js
746
735
  const _parse = (_Err) => (schema, value, _ctx, _params) => {
747
736
  const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
748
737
  const result = schema._zod.run({
@@ -754,7 +743,7 @@ const _parse = (_Err) => (schema, value, _ctx, _params) => {
754
743
  }
755
744
  if (result.issues.length) {
756
745
  const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
757
- captureStackTrace(e, _params?.callee);
746
+ Error.captureStackTrace(e, _params?.callee);
758
747
  throw e;
759
748
  }
760
749
  return result.value;
@@ -769,7 +758,7 @@ const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
769
758
  if (result instanceof Promise) result = await result;
770
759
  if (result.issues.length) {
771
760
  const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
772
- captureStackTrace(e, params?.callee);
761
+ Error.captureStackTrace(e, params?.callee);
773
762
  throw e;
774
763
  }
775
764
  return result.value;
@@ -814,9 +803,10 @@ const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
814
803
  const safeParseAsync$1 = /* @__PURE__ */ _safeParseAsync($ZodRealError);
815
804
 
816
805
  //#endregion
817
- //#region ../../node_modules/zod/v4/core/regexes.js
806
+ //#region ../../node_modules/zod/dist/esm/v4/core/regexes.js
818
807
  var regexes_exports = {};
819
808
  __export(regexes_exports, {
809
+ _emoji: () => _emoji$1,
820
810
  base64: () => base64$1,
821
811
  base64url: () => base64url$1,
822
812
  bigint: () => bigint$2,
@@ -902,23 +892,27 @@ const base64url$1 = /^[A-Za-z0-9_-]*$/;
902
892
  const hostname = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;
903
893
  const domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
904
894
  const e164$1 = /^\+(?:[0-9]){6,14}[0-9]$/;
905
- 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])))`;
895
+ 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])))`;
906
896
  const date$3 = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
907
897
  function timeSource(args) {
908
- const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
909
- 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+)?)?`;
898
+ let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
899
+ if (args.precision) {
900
+ regex = `${regex}\\.\\d{${args.precision}}`;
901
+ } else if (args.precision == null) {
902
+ regex = `${regex}(\\.\\d+)?`;
903
+ }
910
904
  return regex;
911
905
  }
912
906
  function time$1(args) {
913
907
  return new RegExp(`^${timeSource(args)}$`);
914
908
  }
915
909
  function datetime$1(args) {
916
- const time$2 = timeSource({ precision: args.precision });
917
- const opts = ["Z"];
918
- if (args.local) opts.push("");
919
- if (args.offset) opts.push(`([+-]\\d{2}:\\d{2})`);
920
- const timeRegex = `${time$2}(?:${opts.join("|")})`;
921
- return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
910
+ let regex = `${dateSource}T${timeSource(args)}`;
911
+ const opts = [];
912
+ opts.push(args.local ? `Z?` : `Z`);
913
+ if (args.offset) opts.push(`([+-]\\d{2}:?\\d{2})`);
914
+ regex = `${regex}(${opts.join("|")})`;
915
+ return new RegExp(`^${regex}$`);
922
916
  }
923
917
  const string$2 = (params) => {
924
918
  const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
@@ -934,7 +928,7 @@ const lowercase = /^[^A-Z]*$/;
934
928
  const uppercase = /^[^a-z]*$/;
935
929
 
936
930
  //#endregion
937
- //#region ../../node_modules/zod/v4/core/checks.js
931
+ //#region ../../node_modules/zod/dist/esm/v4/core/checks.js
938
932
  const $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
939
933
  var _a;
940
934
  inst._zod ?? (inst._zod = {});
@@ -1125,12 +1119,11 @@ const $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntForma
1125
1119
  };
1126
1120
  });
1127
1121
  const $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
1128
- var _a;
1129
1122
  $ZodCheck.init(inst, def);
1130
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1123
+ inst._zod.when = (payload) => {
1131
1124
  const val = payload.value;
1132
1125
  return !nullish$1(val) && val.size !== undefined;
1133
- });
1126
+ };
1134
1127
  inst._zod.onattach.push((inst$1) => {
1135
1128
  const curr = inst$1._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1136
1129
  if (def.maximum < curr) inst$1._zod.bag.maximum = def.maximum;
@@ -1150,12 +1143,11 @@ const $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst,
1150
1143
  };
1151
1144
  });
1152
1145
  const $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
1153
- var _a;
1154
1146
  $ZodCheck.init(inst, def);
1155
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1147
+ inst._zod.when = (payload) => {
1156
1148
  const val = payload.value;
1157
1149
  return !nullish$1(val) && val.size !== undefined;
1158
- });
1150
+ };
1159
1151
  inst._zod.onattach.push((inst$1) => {
1160
1152
  const curr = inst$1._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1161
1153
  if (def.minimum > curr) inst$1._zod.bag.minimum = def.minimum;
@@ -1175,12 +1167,11 @@ const $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst,
1175
1167
  };
1176
1168
  });
1177
1169
  const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
1178
- var _a;
1179
1170
  $ZodCheck.init(inst, def);
1180
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1171
+ inst._zod.when = (payload) => {
1181
1172
  const val = payload.value;
1182
1173
  return !nullish$1(val) && val.size !== undefined;
1183
- });
1174
+ };
1184
1175
  inst._zod.onattach.push((inst$1) => {
1185
1176
  const bag = inst$1._zod.bag;
1186
1177
  bag.minimum = def.size;
@@ -1201,8 +1192,6 @@ const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals",
1201
1192
  code: "too_small",
1202
1193
  minimum: def.size
1203
1194
  },
1204
- inclusive: true,
1205
- exact: true,
1206
1195
  input: payload.value,
1207
1196
  inst,
1208
1197
  continue: !def.abort
@@ -1210,12 +1199,11 @@ const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals",
1210
1199
  };
1211
1200
  });
1212
1201
  const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
1213
- var _a;
1214
1202
  $ZodCheck.init(inst, def);
1215
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1203
+ inst._zod.when = (payload) => {
1216
1204
  const val = payload.value;
1217
1205
  return !nullish$1(val) && val.length !== undefined;
1218
- });
1206
+ };
1219
1207
  inst._zod.onattach.push((inst$1) => {
1220
1208
  const curr = inst$1._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1221
1209
  if (def.maximum < curr) inst$1._zod.bag.maximum = def.maximum;
@@ -1237,12 +1225,11 @@ const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (i
1237
1225
  };
1238
1226
  });
1239
1227
  const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
1240
- var _a;
1241
1228
  $ZodCheck.init(inst, def);
1242
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1229
+ inst._zod.when = (payload) => {
1243
1230
  const val = payload.value;
1244
1231
  return !nullish$1(val) && val.length !== undefined;
1245
- });
1232
+ };
1246
1233
  inst._zod.onattach.push((inst$1) => {
1247
1234
  const curr = inst$1._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1248
1235
  if (def.minimum > curr) inst$1._zod.bag.minimum = def.minimum;
@@ -1264,12 +1251,11 @@ const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (i
1264
1251
  };
1265
1252
  });
1266
1253
  const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
1267
- var _a;
1268
1254
  $ZodCheck.init(inst, def);
1269
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1255
+ inst._zod.when = (payload) => {
1270
1256
  const val = payload.value;
1271
1257
  return !nullish$1(val) && val.length !== undefined;
1272
- });
1258
+ };
1273
1259
  inst._zod.onattach.push((inst$1) => {
1274
1260
  const bag = inst$1._zod.bag;
1275
1261
  bag.minimum = def.length;
@@ -1291,8 +1277,6 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
1291
1277
  code: "too_small",
1292
1278
  minimum: def.length
1293
1279
  },
1294
- inclusive: true,
1295
- exact: true,
1296
1280
  input: payload.value,
1297
1281
  inst,
1298
1282
  continue: !def.abort
@@ -1300,7 +1284,7 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
1300
1284
  };
1301
1285
  });
1302
1286
  const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
1303
- var _a, _b;
1287
+ var _a;
1304
1288
  $ZodCheck.init(inst, def);
1305
1289
  inst._zod.onattach.push((inst$1) => {
1306
1290
  const bag = inst$1._zod.bag;
@@ -1310,7 +1294,8 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
1310
1294
  bag.patterns.add(def.pattern);
1311
1295
  }
1312
1296
  });
1313
- if (def.pattern) (_a = inst._zod).check ?? (_a.check = (payload) => {
1297
+ (_a = inst._zod).check ?? (_a.check = (payload) => {
1298
+ if (!def.pattern) throw new Error("Not implemented.");
1314
1299
  def.pattern.lastIndex = 0;
1315
1300
  if (def.pattern.test(payload.value)) return;
1316
1301
  payload.issues.push({
@@ -1323,7 +1308,6 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
1323
1308
  continue: !def.abort
1324
1309
  });
1325
1310
  });
1326
- else (_b = inst._zod).check ?? (_b.check = () => {});
1327
1311
  });
1328
1312
  const $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => {
1329
1313
  $ZodCheckStringFormat.init(inst, def);
@@ -1447,6 +1431,7 @@ const $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (ins
1447
1431
  code: "invalid_value",
1448
1432
  values: def.mime,
1449
1433
  input: payload.value.type,
1434
+ path: ["type"],
1450
1435
  inst
1451
1436
  });
1452
1437
  };
@@ -1459,7 +1444,7 @@ const $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (i
1459
1444
  });
1460
1445
 
1461
1446
  //#endregion
1462
- //#region ../../node_modules/zod/v4/core/doc.js
1447
+ //#region ../../node_modules/zod/dist/esm/v4/core/doc.js
1463
1448
  var Doc = class {
1464
1449
  constructor(args = []) {
1465
1450
  this.content = [];
@@ -1495,18 +1480,19 @@ var Doc = class {
1495
1480
  };
1496
1481
 
1497
1482
  //#endregion
1498
- //#region ../../node_modules/zod/v4/core/versions.js
1483
+ //#region ../../node_modules/zod/dist/esm/v4/core/versions.js
1499
1484
  const version = {
1500
1485
  major: 4,
1501
1486
  minor: 0,
1502
- patch: 2
1487
+ patch: 0
1503
1488
  };
1504
1489
 
1505
1490
  //#endregion
1506
- //#region ../../node_modules/zod/v4/core/schemas.js
1491
+ //#region ../../node_modules/zod/dist/esm/v4/core/schemas.js
1507
1492
  const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1508
1493
  var _a;
1509
1494
  inst ?? (inst = {});
1495
+ inst._zod.id = def.type + "_" + randomString(10);
1510
1496
  inst._zod.def = def;
1511
1497
  inst._zod.bag = inst._zod.bag || {};
1512
1498
  inst._zod.version = version;
@@ -1529,11 +1515,13 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1529
1515
  let isAborted = aborted(payload);
1530
1516
  let asyncResult;
1531
1517
  for (const ch of checks$1) {
1532
- if (ch._zod.def.when) {
1533
- const shouldRun = ch._zod.def.when(payload);
1518
+ if (ch._zod.when) {
1519
+ const shouldRun = ch._zod.when(payload);
1534
1520
  if (!shouldRun) continue;
1535
- } else if (isAborted) {
1536
- continue;
1521
+ } else {
1522
+ if (isAborted) {
1523
+ continue;
1524
+ }
1537
1525
  }
1538
1526
  const currLen = payload.issues.length;
1539
1527
  const _ = ch._zod.check(payload);
@@ -1633,9 +1621,7 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1633
1621
  $ZodStringFormat.init(inst, def);
1634
1622
  inst._zod.check = (payload) => {
1635
1623
  try {
1636
- const orig = payload.value;
1637
- const url$1 = new URL(orig);
1638
- const href = url$1.href;
1624
+ const url$1 = new URL(payload.value);
1639
1625
  if (def.hostname) {
1640
1626
  def.hostname.lastIndex = 0;
1641
1627
  if (!def.hostname.test(url$1.hostname)) {
@@ -1664,11 +1650,6 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1664
1650
  });
1665
1651
  }
1666
1652
  }
1667
- if (!orig.endsWith("/") && href.endsWith("/")) {
1668
- payload.value = href.slice(0, -1);
1669
- } else {
1670
- payload.value = href;
1671
- }
1672
1653
  return;
1673
1654
  } catch (_) {
1674
1655
  payload.issues.push({
@@ -1839,7 +1820,6 @@ function isValidJWT(token, algorithm = null) {
1839
1820
  const tokensParts = token.split(".");
1840
1821
  if (tokensParts.length !== 3) return false;
1841
1822
  const [header] = tokensParts;
1842
- if (!header) return false;
1843
1823
  const parsedHeader = JSON.parse(atob(header));
1844
1824
  if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") return false;
1845
1825
  if (!parsedHeader.alg) return false;
@@ -1862,19 +1842,6 @@ const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
1862
1842
  });
1863
1843
  };
1864
1844
  });
1865
- const $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringFormat", (inst, def) => {
1866
- $ZodStringFormat.init(inst, def);
1867
- inst._zod.check = (payload) => {
1868
- if (def.fn(payload.value)) return;
1869
- payload.issues.push({
1870
- code: "invalid_format",
1871
- format: def.format,
1872
- input: payload.value,
1873
- inst,
1874
- continue: !def.abort
1875
- });
1876
- };
1877
- });
1878
1845
  const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
1879
1846
  $ZodType.init(inst, def);
1880
1847
  inst._zod.pattern = inst._zod.bag.pattern ?? number$2;
@@ -1926,11 +1893,12 @@ const $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
1926
1893
  if (def.coerce) try {
1927
1894
  payload.value = BigInt(payload.value);
1928
1895
  } catch (_) {}
1929
- if (typeof payload.value === "bigint") return payload;
1896
+ const { value: input } = payload;
1897
+ if (typeof input === "bigint") return payload;
1930
1898
  payload.issues.push({
1931
1899
  expected: "bigint",
1932
1900
  code: "invalid_type",
1933
- input: payload.value,
1901
+ input,
1934
1902
  inst
1935
1903
  });
1936
1904
  return payload;
@@ -1943,7 +1911,7 @@ const $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def)
1943
1911
  const $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => {
1944
1912
  $ZodType.init(inst, def);
1945
1913
  inst._zod.parse = (payload, _ctx) => {
1946
- const input = payload.value;
1914
+ const { value: input } = payload;
1947
1915
  if (typeof input === "symbol") return payload;
1948
1916
  payload.issues.push({
1949
1917
  expected: "symbol",
@@ -1958,10 +1926,8 @@ const $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def)
1958
1926
  $ZodType.init(inst, def);
1959
1927
  inst._zod.pattern = _undefined$2;
1960
1928
  inst._zod.values = new Set([undefined]);
1961
- inst._zod.optin = "optional";
1962
- inst._zod.optout = "optional";
1963
1929
  inst._zod.parse = (payload, _ctx) => {
1964
- const input = payload.value;
1930
+ const { value: input } = payload;
1965
1931
  if (typeof input === "undefined") return payload;
1966
1932
  payload.issues.push({
1967
1933
  expected: "undefined",
@@ -1977,7 +1943,7 @@ const $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
1977
1943
  inst._zod.pattern = _null$2;
1978
1944
  inst._zod.values = new Set([null]);
1979
1945
  inst._zod.parse = (payload, _ctx) => {
1980
- const input = payload.value;
1946
+ const { value: input } = payload;
1981
1947
  if (input === null) return payload;
1982
1948
  payload.issues.push({
1983
1949
  expected: "null",
@@ -2011,7 +1977,7 @@ const $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
2011
1977
  const $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => {
2012
1978
  $ZodType.init(inst, def);
2013
1979
  inst._zod.parse = (payload, _ctx) => {
2014
- const input = payload.value;
1980
+ const { value: input } = payload;
2015
1981
  if (typeof input === "undefined") return payload;
2016
1982
  payload.issues.push({
2017
1983
  expected: "void",
@@ -2142,20 +2108,19 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2142
2108
  "payload",
2143
2109
  "ctx"
2144
2110
  ]);
2145
- const normalized = _normalized.value;
2111
+ const { keys, optionalKeys: optionalKeys$1 } = _normalized.value;
2146
2112
  const parseStr = (key) => {
2147
2113
  const k = esc(key);
2148
2114
  return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
2149
2115
  };
2150
2116
  doc.write(`const input = payload.value;`);
2151
2117
  const ids = Object.create(null);
2152
- let counter = 0;
2153
- for (const key of normalized.keys) {
2154
- ids[key] = `key_${counter++}`;
2118
+ for (const key of keys) {
2119
+ ids[key] = randomString(15);
2155
2120
  }
2156
2121
  doc.write(`const newResult = {}`);
2157
- for (const key of normalized.keys) {
2158
- if (normalized.optionalKeys.has(key)) {
2122
+ for (const key of keys) {
2123
+ if (optionalKeys$1.has(key)) {
2159
2124
  const id = ids[key];
2160
2125
  doc.write(`const ${id} = ${parseStr(key)};`);
2161
2126
  const k = esc(key);
@@ -2200,7 +2165,7 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2200
2165
  const jit = !globalConfig.jitless;
2201
2166
  const allowsEval$1 = allowsEval;
2202
2167
  const fastEnabled = jit && allowsEval$1.value;
2203
- const catchall = def.catchall;
2168
+ const { catchall } = def;
2204
2169
  let value;
2205
2170
  inst._zod.parse = (payload, ctx) => {
2206
2171
  value ?? (value = _normalized.value);
@@ -2230,10 +2195,12 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2230
2195
  const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
2231
2196
  if (r instanceof Promise) {
2232
2197
  proms.push(r.then((r$1) => isOptional ? handleOptionalObjectResult(r$1, payload, key, input) : handleObjectResult(r$1, payload, key)));
2233
- } else if (isOptional) {
2234
- handleOptionalObjectResult(r, payload, key, input);
2235
2198
  } else {
2236
- handleObjectResult(r, payload, key);
2199
+ if (isOptional) {
2200
+ handleOptionalObjectResult(r, payload, key, input);
2201
+ } else {
2202
+ handleObjectResult(r, payload, key);
2203
+ }
2237
2204
  }
2238
2205
  }
2239
2206
  }
@@ -2291,8 +2258,6 @@ function handleUnionResults(results, final, inst, ctx) {
2291
2258
  }
2292
2259
  const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
2293
2260
  $ZodType.init(inst, def);
2294
- defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : undefined);
2295
- defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined);
2296
2261
  defineLazy(inst._zod, "values", () => {
2297
2262
  if (def.options.every((o) => o._zod.values)) {
2298
2263
  return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
@@ -2392,7 +2357,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
2392
2357
  const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
2393
2358
  $ZodType.init(inst, def);
2394
2359
  inst._zod.parse = (payload, ctx) => {
2395
- const input = payload.value;
2360
+ const { value: input } = payload;
2396
2361
  const left = def.left._zod.run({
2397
2362
  value: input,
2398
2363
  issues: []
@@ -2849,9 +2814,6 @@ const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) =>
2849
2814
  return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : undefined;
2850
2815
  });
2851
2816
  inst._zod.parse = (payload, ctx) => {
2852
- if (def.innerType._zod.optin === "optional") {
2853
- return def.innerType._zod.run(payload, ctx);
2854
- }
2855
2817
  if (payload.value === undefined) {
2856
2818
  return payload;
2857
2819
  }
@@ -2951,7 +2913,7 @@ const $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
2951
2913
  });
2952
2914
  const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
2953
2915
  $ZodType.init(inst, def);
2954
- inst._zod.optin = "optional";
2916
+ defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
2955
2917
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
2956
2918
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
2957
2919
  inst._zod.parse = (payload, ctx) => {
@@ -3022,7 +2984,6 @@ function handlePipeResult(left, def, ctx) {
3022
2984
  const $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
3023
2985
  $ZodType.init(inst, def);
3024
2986
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
3025
- defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3026
2987
  defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
3027
2988
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
3028
2989
  inst._zod.parse = (payload, ctx) => {
@@ -3073,7 +3034,7 @@ const $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral",
3073
3034
  input: payload.value,
3074
3035
  inst,
3075
3036
  code: "invalid_format",
3076
- format: def.format ?? "template_literal",
3037
+ format: "template_literal",
3077
3038
  pattern: inst._zod.pattern.source
3078
3039
  });
3079
3040
  return payload;
@@ -3133,8 +3094,8 @@ function handleRefineResult(result, payload, input, inst) {
3133
3094
  }
3134
3095
 
3135
3096
  //#endregion
3136
- //#region ../../node_modules/zod/v4/locales/ar.js
3137
- const error$38 = () => {
3097
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ar.js
3098
+ const error$36 = () => {
3138
3099
  const Sizable = {
3139
3100
  string: {
3140
3101
  unit: "حرف",
@@ -3156,7 +3117,7 @@ const error$38 = () => {
3156
3117
  function getSizing(origin) {
3157
3118
  return Sizable[origin] ?? null;
3158
3119
  }
3159
- const parsedType$3 = (data) => {
3120
+ const parsedType$2 = (data) => {
3160
3121
  const t = typeof data;
3161
3122
  switch (t) {
3162
3123
  case "number": {
@@ -3208,7 +3169,7 @@ const error$38 = () => {
3208
3169
  };
3209
3170
  return (issue$1) => {
3210
3171
  switch (issue$1.code) {
3211
- case "invalid_type": return `مدخلات غير مقبولة: يفترض إدخال ${issue$1.expected}، ولكن تم إدخال ${parsedType$3(issue$1.input)}`;
3172
+ case "invalid_type": return `مدخلات غير مقبولة: يفترض إدخال ${issue$1.expected}، ولكن تم إدخال ${parsedType$2(issue$1.input)}`;
3212
3173
  case "invalid_value":
3213
3174
  if (issue$1.values.length === 1) return `مدخلات غير مقبولة: يفترض إدخال ${stringifyPrimitive(issue$1.values[0])}`;
3214
3175
  return `اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${joinValues(issue$1.values, "|")}`;
@@ -3244,12 +3205,12 @@ const error$38 = () => {
3244
3205
  };
3245
3206
  };
3246
3207
  function ar_default() {
3247
- return { localeError: error$38() };
3208
+ return { localeError: error$36() };
3248
3209
  }
3249
3210
 
3250
3211
  //#endregion
3251
- //#region ../../node_modules/zod/v4/locales/az.js
3252
- const error$37 = () => {
3212
+ //#region ../../node_modules/zod/dist/esm/v4/locales/az.js
3213
+ const error$35 = () => {
3253
3214
  const Sizable = {
3254
3215
  string: {
3255
3216
  unit: "simvol",
@@ -3271,7 +3232,7 @@ const error$37 = () => {
3271
3232
  function getSizing(origin) {
3272
3233
  return Sizable[origin] ?? null;
3273
3234
  }
3274
- const parsedType$3 = (data) => {
3235
+ const parsedType$2 = (data) => {
3275
3236
  const t = typeof data;
3276
3237
  switch (t) {
3277
3238
  case "number": {
@@ -3323,7 +3284,7 @@ const error$37 = () => {
3323
3284
  };
3324
3285
  return (issue$1) => {
3325
3286
  switch (issue$1.code) {
3326
- case "invalid_type": return `Yanlış dəyər: gözlənilən ${issue$1.expected}, daxil olan ${parsedType$3(issue$1.input)}`;
3287
+ case "invalid_type": return `Yanlış dəyər: gözlənilən ${issue$1.expected}, daxil olan ${parsedType$2(issue$1.input)}`;
3327
3288
  case "invalid_value":
3328
3289
  if (issue$1.values.length === 1) return `Yanlış dəyər: gözlənilən ${stringifyPrimitive(issue$1.values[0])}`;
3329
3290
  return `Yanlış seçim: aşağıdakılardan biri olmalıdır: ${joinValues(issue$1.values, "|")}`;
@@ -3357,11 +3318,11 @@ const error$37 = () => {
3357
3318
  };
3358
3319
  };
3359
3320
  function az_default() {
3360
- return { localeError: error$37() };
3321
+ return { localeError: error$35() };
3361
3322
  }
3362
3323
 
3363
3324
  //#endregion
3364
- //#region ../../node_modules/zod/v4/locales/be.js
3325
+ //#region ../../node_modules/zod/dist/esm/v4/locales/be.js
3365
3326
  function getBelarusianPlural(count, one, few, many) {
3366
3327
  const absCount = Math.abs(count);
3367
3328
  const lastDigit = absCount % 10;
@@ -3377,7 +3338,7 @@ function getBelarusianPlural(count, one, few, many) {
3377
3338
  }
3378
3339
  return many;
3379
3340
  }
3380
- const error$36 = () => {
3341
+ const error$34 = () => {
3381
3342
  const Sizable = {
3382
3343
  string: {
3383
3344
  unit: {
@@ -3415,7 +3376,7 @@ const error$36 = () => {
3415
3376
  function getSizing(origin) {
3416
3377
  return Sizable[origin] ?? null;
3417
3378
  }
3418
- const parsedType$3 = (data) => {
3379
+ const parsedType$2 = (data) => {
3419
3380
  const t = typeof data;
3420
3381
  switch (t) {
3421
3382
  case "number": {
@@ -3467,7 +3428,7 @@ const error$36 = () => {
3467
3428
  };
3468
3429
  return (issue$1) => {
3469
3430
  switch (issue$1.code) {
3470
- case "invalid_type": return `Няправільны ўвод: чакаўся ${issue$1.expected}, атрымана ${parsedType$3(issue$1.input)}`;
3431
+ case "invalid_type": return `Няправільны ўвод: чакаўся ${issue$1.expected}, атрымана ${parsedType$2(issue$1.input)}`;
3471
3432
  case "invalid_value":
3472
3433
  if (issue$1.values.length === 1) return `Няправільны ўвод: чакалася ${stringifyPrimitive(issue$1.values[0])}`;
3473
3434
  return `Няправільны варыянт: чакаўся адзін з ${joinValues(issue$1.values, "|")}`;
@@ -3509,12 +3470,12 @@ const error$36 = () => {
3509
3470
  };
3510
3471
  };
3511
3472
  function be_default() {
3512
- return { localeError: error$36() };
3473
+ return { localeError: error$34() };
3513
3474
  }
3514
3475
 
3515
3476
  //#endregion
3516
- //#region ../../node_modules/zod/v4/locales/ca.js
3517
- const error$35 = () => {
3477
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ca.js
3478
+ const error$33 = () => {
3518
3479
  const Sizable = {
3519
3480
  string: {
3520
3481
  unit: "caràcters",
@@ -3536,7 +3497,7 @@ const error$35 = () => {
3536
3497
  function getSizing(origin) {
3537
3498
  return Sizable[origin] ?? null;
3538
3499
  }
3539
- const parsedType$3 = (data) => {
3500
+ const parsedType$2 = (data) => {
3540
3501
  const t = typeof data;
3541
3502
  switch (t) {
3542
3503
  case "number": {
@@ -3588,7 +3549,7 @@ const error$35 = () => {
3588
3549
  };
3589
3550
  return (issue$1) => {
3590
3551
  switch (issue$1.code) {
3591
- case "invalid_type": return `Tipus invàlid: s'esperava ${issue$1.expected}, s'ha rebut ${parsedType$3(issue$1.input)}`;
3552
+ case "invalid_type": return `Tipus invàlid: s'esperava ${issue$1.expected}, s'ha rebut ${parsedType$2(issue$1.input)}`;
3592
3553
  case "invalid_value":
3593
3554
  if (issue$1.values.length === 1) return `Valor invàlid: s'esperava ${stringifyPrimitive(issue$1.values[0])}`;
3594
3555
  return `Opció invàlida: s'esperava una de ${joinValues(issue$1.values, " o ")}`;
@@ -3626,12 +3587,12 @@ const error$35 = () => {
3626
3587
  };
3627
3588
  };
3628
3589
  function ca_default() {
3629
- return { localeError: error$35() };
3590
+ return { localeError: error$33() };
3630
3591
  }
3631
3592
 
3632
3593
  //#endregion
3633
- //#region ../../node_modules/zod/v4/locales/cs.js
3634
- const error$34 = () => {
3594
+ //#region ../../node_modules/zod/dist/esm/v4/locales/cs.js
3595
+ const error$32 = () => {
3635
3596
  const Sizable = {
3636
3597
  string: {
3637
3598
  unit: "znaků",
@@ -3653,7 +3614,7 @@ const error$34 = () => {
3653
3614
  function getSizing(origin) {
3654
3615
  return Sizable[origin] ?? null;
3655
3616
  }
3656
- const parsedType$3 = (data) => {
3617
+ const parsedType$2 = (data) => {
3657
3618
  const t = typeof data;
3658
3619
  switch (t) {
3659
3620
  case "number": {
@@ -3723,7 +3684,7 @@ const error$34 = () => {
3723
3684
  };
3724
3685
  return (issue$1) => {
3725
3686
  switch (issue$1.code) {
3726
- case "invalid_type": return `Neplatný vstup: očekáváno ${issue$1.expected}, obdrženo ${parsedType$3(issue$1.input)}`;
3687
+ case "invalid_type": return `Neplatný vstup: očekáváno ${issue$1.expected}, obdrženo ${parsedType$2(issue$1.input)}`;
3727
3688
  case "invalid_value":
3728
3689
  if (issue$1.values.length === 1) return `Neplatný vstup: očekáváno ${stringifyPrimitive(issue$1.values[0])}`;
3729
3690
  return `Neplatná možnost: očekávána jedna z hodnot ${joinValues(issue$1.values, "|")}`;
@@ -3761,12 +3722,12 @@ const error$34 = () => {
3761
3722
  };
3762
3723
  };
3763
3724
  function cs_default() {
3764
- return { localeError: error$34() };
3725
+ return { localeError: error$32() };
3765
3726
  }
3766
3727
 
3767
3728
  //#endregion
3768
- //#region ../../node_modules/zod/v4/locales/de.js
3769
- const error$33 = () => {
3729
+ //#region ../../node_modules/zod/dist/esm/v4/locales/de.js
3730
+ const error$31 = () => {
3770
3731
  const Sizable = {
3771
3732
  string: {
3772
3733
  unit: "Zeichen",
@@ -3788,7 +3749,7 @@ const error$33 = () => {
3788
3749
  function getSizing(origin) {
3789
3750
  return Sizable[origin] ?? null;
3790
3751
  }
3791
- const parsedType$3 = (data) => {
3752
+ const parsedType$2 = (data) => {
3792
3753
  const t = typeof data;
3793
3754
  switch (t) {
3794
3755
  case "number": {
@@ -3840,7 +3801,7 @@ const error$33 = () => {
3840
3801
  };
3841
3802
  return (issue$1) => {
3842
3803
  switch (issue$1.code) {
3843
- case "invalid_type": return `Ungültige Eingabe: erwartet ${issue$1.expected}, erhalten ${parsedType$3(issue$1.input)}`;
3804
+ case "invalid_type": return `Ungültige Eingabe: erwartet ${issue$1.expected}, erhalten ${parsedType$2(issue$1.input)}`;
3844
3805
  case "invalid_value":
3845
3806
  if (issue$1.values.length === 1) return `Ungültige Eingabe: erwartet ${stringifyPrimitive(issue$1.values[0])}`;
3846
3807
  return `Ungültige Option: erwartet eine von ${joinValues(issue$1.values, "|")}`;
@@ -3876,12 +3837,12 @@ const error$33 = () => {
3876
3837
  };
3877
3838
  };
3878
3839
  function de_default() {
3879
- return { localeError: error$33() };
3840
+ return { localeError: error$31() };
3880
3841
  }
3881
3842
 
3882
3843
  //#endregion
3883
- //#region ../../node_modules/zod/v4/locales/en.js
3884
- const parsedType$2 = (data) => {
3844
+ //#region ../../node_modules/zod/dist/esm/v4/locales/en.js
3845
+ const parsedType$1 = (data) => {
3885
3846
  const t = typeof data;
3886
3847
  switch (t) {
3887
3848
  case "number": {
@@ -3901,7 +3862,7 @@ const parsedType$2 = (data) => {
3901
3862
  }
3902
3863
  return t;
3903
3864
  };
3904
- const error$32 = () => {
3865
+ const error$30 = () => {
3905
3866
  const Sizable = {
3906
3867
  string: {
3907
3868
  unit: "characters",
@@ -3955,7 +3916,7 @@ const error$32 = () => {
3955
3916
  };
3956
3917
  return (issue$1) => {
3957
3918
  switch (issue$1.code) {
3958
- case "invalid_type": return `Invalid input: expected ${issue$1.expected}, received ${parsedType$2(issue$1.input)}`;
3919
+ case "invalid_type": return `Invalid input: expected ${issue$1.expected}, received ${parsedType$1(issue$1.input)}`;
3959
3920
  case "invalid_value":
3960
3921
  if (issue$1.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue$1.values[0])}`;
3961
3922
  return `Invalid option: expected one of ${joinValues(issue$1.values, "|")}`;
@@ -3993,127 +3954,12 @@ const error$32 = () => {
3993
3954
  };
3994
3955
  };
3995
3956
  function en_default() {
3996
- return { localeError: error$32() };
3997
- }
3998
-
3999
- //#endregion
4000
- //#region ../../node_modules/zod/v4/locales/eo.js
4001
- const parsedType$1 = (data) => {
4002
- const t = typeof data;
4003
- switch (t) {
4004
- case "number": {
4005
- return Number.isNaN(data) ? "NaN" : "nombro";
4006
- }
4007
- case "object": {
4008
- if (Array.isArray(data)) {
4009
- return "tabelo";
4010
- }
4011
- if (data === null) {
4012
- return "senvalora";
4013
- }
4014
- if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
4015
- return data.constructor.name;
4016
- }
4017
- }
4018
- }
4019
- return t;
4020
- };
4021
- const error$31 = () => {
4022
- const Sizable = {
4023
- string: {
4024
- unit: "karaktrojn",
4025
- verb: "havi"
4026
- },
4027
- file: {
4028
- unit: "bajtojn",
4029
- verb: "havi"
4030
- },
4031
- array: {
4032
- unit: "elementojn",
4033
- verb: "havi"
4034
- },
4035
- set: {
4036
- unit: "elementojn",
4037
- verb: "havi"
4038
- }
4039
- };
4040
- function getSizing(origin) {
4041
- return Sizable[origin] ?? null;
4042
- }
4043
- const Nouns = {
4044
- regex: "enigo",
4045
- email: "retadreso",
4046
- url: "URL",
4047
- emoji: "emoĝio",
4048
- uuid: "UUID",
4049
- uuidv4: "UUIDv4",
4050
- uuidv6: "UUIDv6",
4051
- nanoid: "nanoid",
4052
- guid: "GUID",
4053
- cuid: "cuid",
4054
- cuid2: "cuid2",
4055
- ulid: "ULID",
4056
- xid: "XID",
4057
- ksuid: "KSUID",
4058
- datetime: "ISO-datotempo",
4059
- date: "ISO-dato",
4060
- time: "ISO-tempo",
4061
- duration: "ISO-daŭro",
4062
- ipv4: "IPv4-adreso",
4063
- ipv6: "IPv6-adreso",
4064
- cidrv4: "IPv4-rango",
4065
- cidrv6: "IPv6-rango",
4066
- base64: "64-ume kodita karaktraro",
4067
- base64url: "URL-64-ume kodita karaktraro",
4068
- json_string: "JSON-karaktraro",
4069
- e164: "E.164-nombro",
4070
- jwt: "JWT",
4071
- template_literal: "enigo"
4072
- };
4073
- return (issue$1) => {
4074
- switch (issue$1.code) {
4075
- case "invalid_type": return `Nevalida enigo: atendiĝis ${issue$1.expected}, riceviĝis ${parsedType$1(issue$1.input)}`;
4076
- case "invalid_value":
4077
- if (issue$1.values.length === 1) return `Nevalida enigo: atendiĝis ${stringifyPrimitive(issue$1.values[0])}`;
4078
- return `Nevalida opcio: atendiĝis unu el ${joinValues(issue$1.values, "|")}`;
4079
- case "too_big": {
4080
- const adj = issue$1.inclusive ? "<=" : "<";
4081
- const sizing = getSizing(issue$1.origin);
4082
- if (sizing) return `Tro granda: atendiĝis ke ${issue$1.origin ?? "valoro"} havu ${adj}${issue$1.maximum.toString()} ${sizing.unit ?? "elementojn"}`;
4083
- return `Tro granda: atendiĝis ke ${issue$1.origin ?? "valoro"} havu ${adj}${issue$1.maximum.toString()}`;
4084
- }
4085
- case "too_small": {
4086
- const adj = issue$1.inclusive ? ">=" : ">";
4087
- const sizing = getSizing(issue$1.origin);
4088
- if (sizing) {
4089
- return `Tro malgranda: atendiĝis ke ${issue$1.origin} havu ${adj}${issue$1.minimum.toString()} ${sizing.unit}`;
4090
- }
4091
- return `Tro malgranda: atendiĝis ke ${issue$1.origin} estu ${adj}${issue$1.minimum.toString()}`;
4092
- }
4093
- case "invalid_format": {
4094
- const _issue = issue$1;
4095
- if (_issue.format === "starts_with") return `Nevalida karaktraro: devas komenciĝi per "${_issue.prefix}"`;
4096
- if (_issue.format === "ends_with") return `Nevalida karaktraro: devas finiĝi per "${_issue.suffix}"`;
4097
- if (_issue.format === "includes") return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`;
4098
- if (_issue.format === "regex") return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;
4099
- return `Nevalida ${Nouns[_issue.format] ?? issue$1.format}`;
4100
- }
4101
- case "not_multiple_of": return `Nevalida nombro: devas esti oblo de ${issue$1.divisor}`;
4102
- case "unrecognized_keys": return `Nekonata${issue$1.keys.length > 1 ? "j" : ""} ŝlosilo${issue$1.keys.length > 1 ? "j" : ""}: ${joinValues(issue$1.keys, ", ")}`;
4103
- case "invalid_key": return `Nevalida ŝlosilo en ${issue$1.origin}`;
4104
- case "invalid_union": return "Nevalida enigo";
4105
- case "invalid_element": return `Nevalida valoro en ${issue$1.origin}`;
4106
- default: return `Nevalida enigo`;
4107
- }
4108
- };
4109
- };
4110
- function eo_default() {
4111
- return { localeError: error$31() };
3957
+ return { localeError: error$30() };
4112
3958
  }
4113
3959
 
4114
3960
  //#endregion
4115
- //#region ../../node_modules/zod/v4/locales/es.js
4116
- const error$30 = () => {
3961
+ //#region ../../node_modules/zod/dist/esm/v4/locales/es.js
3962
+ const error$29 = () => {
4117
3963
  const Sizable = {
4118
3964
  string: {
4119
3965
  unit: "caracteres",
@@ -4135,7 +3981,7 @@ const error$30 = () => {
4135
3981
  function getSizing(origin) {
4136
3982
  return Sizable[origin] ?? null;
4137
3983
  }
4138
- const parsedType$3 = (data) => {
3984
+ const parsedType$2 = (data) => {
4139
3985
  const t = typeof data;
4140
3986
  switch (t) {
4141
3987
  case "number": {
@@ -4187,7 +4033,7 @@ const error$30 = () => {
4187
4033
  };
4188
4034
  return (issue$1) => {
4189
4035
  switch (issue$1.code) {
4190
- case "invalid_type": return `Entrada inválida: se esperaba ${issue$1.expected}, recibido ${parsedType$3(issue$1.input)}`;
4036
+ case "invalid_type": return `Entrada inválida: se esperaba ${issue$1.expected}, recibido ${parsedType$2(issue$1.input)}`;
4191
4037
  case "invalid_value":
4192
4038
  if (issue$1.values.length === 1) return `Entrada inválida: se esperaba ${stringifyPrimitive(issue$1.values[0])}`;
4193
4039
  return `Opción inválida: se esperaba una de ${joinValues(issue$1.values, "|")}`;
@@ -4223,12 +4069,12 @@ const error$30 = () => {
4223
4069
  };
4224
4070
  };
4225
4071
  function es_default() {
4226
- return { localeError: error$30() };
4072
+ return { localeError: error$29() };
4227
4073
  }
4228
4074
 
4229
4075
  //#endregion
4230
- //#region ../../node_modules/zod/v4/locales/fa.js
4231
- const error$29 = () => {
4076
+ //#region ../../node_modules/zod/dist/esm/v4/locales/fa.js
4077
+ const error$28 = () => {
4232
4078
  const Sizable = {
4233
4079
  string: {
4234
4080
  unit: "کاراکتر",
@@ -4250,7 +4096,7 @@ const error$29 = () => {
4250
4096
  function getSizing(origin) {
4251
4097
  return Sizable[origin] ?? null;
4252
4098
  }
4253
- const parsedType$3 = (data) => {
4099
+ const parsedType$2 = (data) => {
4254
4100
  const t = typeof data;
4255
4101
  switch (t) {
4256
4102
  case "number": {
@@ -4302,7 +4148,7 @@ const error$29 = () => {
4302
4148
  };
4303
4149
  return (issue$1) => {
4304
4150
  switch (issue$1.code) {
4305
- case "invalid_type": return `ورودی نامعتبر: می‌بایست ${issue$1.expected} می‌بود، ${parsedType$3(issue$1.input)} دریافت شد`;
4151
+ case "invalid_type": return `ورودی نامعتبر: می‌بایست ${issue$1.expected} می‌بود، ${parsedType$2(issue$1.input)} دریافت شد`;
4306
4152
  case "invalid_value":
4307
4153
  if (issue$1.values.length === 1) {
4308
4154
  return `ورودی نامعتبر: می‌بایست ${stringifyPrimitive(issue$1.values[0])} می‌بود`;
@@ -4350,12 +4196,12 @@ const error$29 = () => {
4350
4196
  };
4351
4197
  };
4352
4198
  function fa_default() {
4353
- return { localeError: error$29() };
4199
+ return { localeError: error$28() };
4354
4200
  }
4355
4201
 
4356
4202
  //#endregion
4357
- //#region ../../node_modules/zod/v4/locales/fi.js
4358
- const error$28 = () => {
4203
+ //#region ../../node_modules/zod/dist/esm/v4/locales/fi.js
4204
+ const error$27 = () => {
4359
4205
  const Sizable = {
4360
4206
  string: {
4361
4207
  unit: "merkkiä",
@@ -4393,7 +4239,7 @@ const error$28 = () => {
4393
4239
  function getSizing(origin) {
4394
4240
  return Sizable[origin] ?? null;
4395
4241
  }
4396
- const parsedType$3 = (data) => {
4242
+ const parsedType$2 = (data) => {
4397
4243
  const t = typeof data;
4398
4244
  switch (t) {
4399
4245
  case "number": {
@@ -4445,7 +4291,7 @@ const error$28 = () => {
4445
4291
  };
4446
4292
  return (issue$1) => {
4447
4293
  switch (issue$1.code) {
4448
- case "invalid_type": return `Virheellinen tyyppi: odotettiin ${issue$1.expected}, oli ${parsedType$3(issue$1.input)}`;
4294
+ case "invalid_type": return `Virheellinen tyyppi: odotettiin ${issue$1.expected}, oli ${parsedType$2(issue$1.input)}`;
4449
4295
  case "invalid_value":
4450
4296
  if (issue$1.values.length === 1) return `Virheellinen syöte: täytyy olla ${stringifyPrimitive(issue$1.values[0])}`;
4451
4297
  return `Virheellinen valinta: täytyy olla yksi seuraavista: ${joinValues(issue$1.values, "|")}`;
@@ -4485,12 +4331,12 @@ const error$28 = () => {
4485
4331
  };
4486
4332
  };
4487
4333
  function fi_default() {
4488
- return { localeError: error$28() };
4334
+ return { localeError: error$27() };
4489
4335
  }
4490
4336
 
4491
4337
  //#endregion
4492
- //#region ../../node_modules/zod/v4/locales/fr.js
4493
- const error$27 = () => {
4338
+ //#region ../../node_modules/zod/dist/esm/v4/locales/fr.js
4339
+ const error$26 = () => {
4494
4340
  const Sizable = {
4495
4341
  string: {
4496
4342
  unit: "caractères",
@@ -4512,7 +4358,7 @@ const error$27 = () => {
4512
4358
  function getSizing(origin) {
4513
4359
  return Sizable[origin] ?? null;
4514
4360
  }
4515
- const parsedType$3 = (data) => {
4361
+ const parsedType$2 = (data) => {
4516
4362
  const t = typeof data;
4517
4363
  switch (t) {
4518
4364
  case "number": {
@@ -4564,7 +4410,7 @@ const error$27 = () => {
4564
4410
  };
4565
4411
  return (issue$1) => {
4566
4412
  switch (issue$1.code) {
4567
- case "invalid_type": return `Entrée invalide : ${issue$1.expected} attendu, ${parsedType$3(issue$1.input)} reçu`;
4413
+ case "invalid_type": return `Entrée invalide : ${issue$1.expected} attendu, ${parsedType$2(issue$1.input)} reçu`;
4568
4414
  case "invalid_value":
4569
4415
  if (issue$1.values.length === 1) return `Entrée invalide : ${stringifyPrimitive(issue$1.values[0])} attendu`;
4570
4416
  return `Option invalide : une valeur parmi ${joinValues(issue$1.values, "|")} attendue`;
@@ -4600,12 +4446,12 @@ const error$27 = () => {
4600
4446
  };
4601
4447
  };
4602
4448
  function fr_default() {
4603
- return { localeError: error$27() };
4449
+ return { localeError: error$26() };
4604
4450
  }
4605
4451
 
4606
4452
  //#endregion
4607
- //#region ../../node_modules/zod/v4/locales/fr-CA.js
4608
- const error$26 = () => {
4453
+ //#region ../../node_modules/zod/dist/esm/v4/locales/fr-CA.js
4454
+ const error$25 = () => {
4609
4455
  const Sizable = {
4610
4456
  string: {
4611
4457
  unit: "caractères",
@@ -4627,7 +4473,7 @@ const error$26 = () => {
4627
4473
  function getSizing(origin) {
4628
4474
  return Sizable[origin] ?? null;
4629
4475
  }
4630
- const parsedType$3 = (data) => {
4476
+ const parsedType$2 = (data) => {
4631
4477
  const t = typeof data;
4632
4478
  switch (t) {
4633
4479
  case "number": {
@@ -4679,7 +4525,7 @@ const error$26 = () => {
4679
4525
  };
4680
4526
  return (issue$1) => {
4681
4527
  switch (issue$1.code) {
4682
- case "invalid_type": return `Entrée invalide : attendu ${issue$1.expected}, reçu ${parsedType$3(issue$1.input)}`;
4528
+ case "invalid_type": return `Entrée invalide : attendu ${issue$1.expected}, reçu ${parsedType$2(issue$1.input)}`;
4683
4529
  case "invalid_value":
4684
4530
  if (issue$1.values.length === 1) return `Entrée invalide : attendu ${stringifyPrimitive(issue$1.values[0])}`;
4685
4531
  return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue$1.values, "|")}`;
@@ -4717,12 +4563,12 @@ const error$26 = () => {
4717
4563
  };
4718
4564
  };
4719
4565
  function fr_CA_default() {
4720
- return { localeError: error$26() };
4566
+ return { localeError: error$25() };
4721
4567
  }
4722
4568
 
4723
4569
  //#endregion
4724
- //#region ../../node_modules/zod/v4/locales/he.js
4725
- const error$25 = () => {
4570
+ //#region ../../node_modules/zod/dist/esm/v4/locales/he.js
4571
+ const error$24 = () => {
4726
4572
  const Sizable = {
4727
4573
  string: {
4728
4574
  unit: "אותיות",
@@ -4744,7 +4590,7 @@ const error$25 = () => {
4744
4590
  function getSizing(origin) {
4745
4591
  return Sizable[origin] ?? null;
4746
4592
  }
4747
- const parsedType$3 = (data) => {
4593
+ const parsedType$2 = (data) => {
4748
4594
  const t = typeof data;
4749
4595
  switch (t) {
4750
4596
  case "number": {
@@ -4796,7 +4642,7 @@ const error$25 = () => {
4796
4642
  };
4797
4643
  return (issue$1) => {
4798
4644
  switch (issue$1.code) {
4799
- case "invalid_type": return `קלט לא תקין: צריך ${issue$1.expected}, התקבל ${parsedType$3(issue$1.input)}`;
4645
+ case "invalid_type": return `קלט לא תקין: צריך ${issue$1.expected}, התקבל ${parsedType$2(issue$1.input)}`;
4800
4646
  case "invalid_value":
4801
4647
  if (issue$1.values.length === 1) return `קלט לא תקין: צריך ${stringifyPrimitive(issue$1.values[0])}`;
4802
4648
  return `קלט לא תקין: צריך אחת מהאפשרויות ${joinValues(issue$1.values, "|")}`;
@@ -4832,12 +4678,12 @@ const error$25 = () => {
4832
4678
  };
4833
4679
  };
4834
4680
  function he_default() {
4835
- return { localeError: error$25() };
4681
+ return { localeError: error$24() };
4836
4682
  }
4837
4683
 
4838
4684
  //#endregion
4839
- //#region ../../node_modules/zod/v4/locales/hu.js
4840
- const error$24 = () => {
4685
+ //#region ../../node_modules/zod/dist/esm/v4/locales/hu.js
4686
+ const error$23 = () => {
4841
4687
  const Sizable = {
4842
4688
  string: {
4843
4689
  unit: "karakter",
@@ -4859,7 +4705,7 @@ const error$24 = () => {
4859
4705
  function getSizing(origin) {
4860
4706
  return Sizable[origin] ?? null;
4861
4707
  }
4862
- const parsedType$3 = (data) => {
4708
+ const parsedType$2 = (data) => {
4863
4709
  const t = typeof data;
4864
4710
  switch (t) {
4865
4711
  case "number": {
@@ -4911,7 +4757,7 @@ const error$24 = () => {
4911
4757
  };
4912
4758
  return (issue$1) => {
4913
4759
  switch (issue$1.code) {
4914
- case "invalid_type": return `Érvénytelen bemenet: a várt érték ${issue$1.expected}, a kapott érték ${parsedType$3(issue$1.input)}`;
4760
+ case "invalid_type": return `Érvénytelen bemenet: a várt érték ${issue$1.expected}, a kapott érték ${parsedType$2(issue$1.input)}`;
4915
4761
  case "invalid_value":
4916
4762
  if (issue$1.values.length === 1) return `Érvénytelen bemenet: a várt érték ${stringifyPrimitive(issue$1.values[0])}`;
4917
4763
  return `Érvénytelen opció: valamelyik érték várt ${joinValues(issue$1.values, "|")}`;
@@ -4947,12 +4793,12 @@ const error$24 = () => {
4947
4793
  };
4948
4794
  };
4949
4795
  function hu_default() {
4950
- return { localeError: error$24() };
4796
+ return { localeError: error$23() };
4951
4797
  }
4952
4798
 
4953
4799
  //#endregion
4954
- //#region ../../node_modules/zod/v4/locales/id.js
4955
- const error$23 = () => {
4800
+ //#region ../../node_modules/zod/dist/esm/v4/locales/id.js
4801
+ const error$22 = () => {
4956
4802
  const Sizable = {
4957
4803
  string: {
4958
4804
  unit: "karakter",
@@ -4974,7 +4820,7 @@ const error$23 = () => {
4974
4820
  function getSizing(origin) {
4975
4821
  return Sizable[origin] ?? null;
4976
4822
  }
4977
- const parsedType$3 = (data) => {
4823
+ const parsedType$2 = (data) => {
4978
4824
  const t = typeof data;
4979
4825
  switch (t) {
4980
4826
  case "number": {
@@ -5026,7 +4872,7 @@ const error$23 = () => {
5026
4872
  };
5027
4873
  return (issue$1) => {
5028
4874
  switch (issue$1.code) {
5029
- case "invalid_type": return `Input tidak valid: diharapkan ${issue$1.expected}, diterima ${parsedType$3(issue$1.input)}`;
4875
+ case "invalid_type": return `Input tidak valid: diharapkan ${issue$1.expected}, diterima ${parsedType$2(issue$1.input)}`;
5030
4876
  case "invalid_value":
5031
4877
  if (issue$1.values.length === 1) return `Input tidak valid: diharapkan ${stringifyPrimitive(issue$1.values[0])}`;
5032
4878
  return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue$1.values, "|")}`;
@@ -5062,12 +4908,12 @@ const error$23 = () => {
5062
4908
  };
5063
4909
  };
5064
4910
  function id_default() {
5065
- return { localeError: error$23() };
4911
+ return { localeError: error$22() };
5066
4912
  }
5067
4913
 
5068
4914
  //#endregion
5069
- //#region ../../node_modules/zod/v4/locales/it.js
5070
- const error$22 = () => {
4915
+ //#region ../../node_modules/zod/dist/esm/v4/locales/it.js
4916
+ const error$21 = () => {
5071
4917
  const Sizable = {
5072
4918
  string: {
5073
4919
  unit: "caratteri",
@@ -5089,7 +4935,7 @@ const error$22 = () => {
5089
4935
  function getSizing(origin) {
5090
4936
  return Sizable[origin] ?? null;
5091
4937
  }
5092
- const parsedType$3 = (data) => {
4938
+ const parsedType$2 = (data) => {
5093
4939
  const t = typeof data;
5094
4940
  switch (t) {
5095
4941
  case "number": {
@@ -5141,7 +4987,7 @@ const error$22 = () => {
5141
4987
  };
5142
4988
  return (issue$1) => {
5143
4989
  switch (issue$1.code) {
5144
- case "invalid_type": return `Input non valido: atteso ${issue$1.expected}, ricevuto ${parsedType$3(issue$1.input)}`;
4990
+ case "invalid_type": return `Input non valido: atteso ${issue$1.expected}, ricevuto ${parsedType$2(issue$1.input)}`;
5145
4991
  case "invalid_value":
5146
4992
  if (issue$1.values.length === 1) return `Input non valido: atteso ${stringifyPrimitive(issue$1.values[0])}`;
5147
4993
  return `Opzione non valida: atteso uno tra ${joinValues(issue$1.values, "|")}`;
@@ -5177,12 +5023,12 @@ const error$22 = () => {
5177
5023
  };
5178
5024
  };
5179
5025
  function it_default() {
5180
- return { localeError: error$22() };
5026
+ return { localeError: error$21() };
5181
5027
  }
5182
5028
 
5183
5029
  //#endregion
5184
- //#region ../../node_modules/zod/v4/locales/ja.js
5185
- const error$21 = () => {
5030
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ja.js
5031
+ const error$20 = () => {
5186
5032
  const Sizable = {
5187
5033
  string: {
5188
5034
  unit: "文字",
@@ -5204,7 +5050,7 @@ const error$21 = () => {
5204
5050
  function getSizing(origin) {
5205
5051
  return Sizable[origin] ?? null;
5206
5052
  }
5207
- const parsedType$3 = (data) => {
5053
+ const parsedType$2 = (data) => {
5208
5054
  const t = typeof data;
5209
5055
  switch (t) {
5210
5056
  case "number": {
@@ -5256,21 +5102,21 @@ const error$21 = () => {
5256
5102
  };
5257
5103
  return (issue$1) => {
5258
5104
  switch (issue$1.code) {
5259
- case "invalid_type": return `無効な入力: ${issue$1.expected}が期待されましたが、${parsedType$3(issue$1.input)}が入力されました`;
5105
+ case "invalid_type": return `無効な入力: ${issue$1.expected}が期待されましたが、${parsedType$2(issue$1.input)}が入力されました`;
5260
5106
  case "invalid_value":
5261
5107
  if (issue$1.values.length === 1) return `無効な入力: ${stringifyPrimitive(issue$1.values[0])}が期待されました`;
5262
5108
  return `無効な選択: ${joinValues(issue$1.values, "、")}のいずれかである必要があります`;
5263
5109
  case "too_big": {
5264
- const adj = issue$1.inclusive ? "以下である" : "より小さい";
5110
+ const adj = issue$1.inclusive ? "<=" : "<";
5265
5111
  const sizing = getSizing(issue$1.origin);
5266
- if (sizing) return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${sizing.unit ?? "要素"}${adj}必要があります`;
5267
- return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${adj}必要があります`;
5112
+ if (sizing) return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${sizing.unit ?? "要素"}${adj}である必要があります`;
5113
+ return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${adj}である必要があります`;
5268
5114
  }
5269
5115
  case "too_small": {
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.minimum.toString()}${sizing.unit}${adj}必要があります`;
5273
- return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${adj}必要があります`;
5118
+ if (sizing) return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${sizing.unit}${adj}である必要があります`;
5119
+ return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${adj}である必要があります`;
5274
5120
  }
5275
5121
  case "invalid_format": {
5276
5122
  const _issue = issue$1;
@@ -5290,12 +5136,12 @@ const error$21 = () => {
5290
5136
  };
5291
5137
  };
5292
5138
  function ja_default() {
5293
- return { localeError: error$21() };
5139
+ return { localeError: error$20() };
5294
5140
  }
5295
5141
 
5296
5142
  //#endregion
5297
- //#region ../../node_modules/zod/v4/locales/kh.js
5298
- const error$20 = () => {
5143
+ //#region ../../node_modules/zod/dist/esm/v4/locales/kh.js
5144
+ const error$19 = () => {
5299
5145
  const Sizable = {
5300
5146
  string: {
5301
5147
  unit: "តួអក្សរ",
@@ -5317,7 +5163,7 @@ const error$20 = () => {
5317
5163
  function getSizing(origin) {
5318
5164
  return Sizable[origin] ?? null;
5319
5165
  }
5320
- const parsedType$3 = (data) => {
5166
+ const parsedType$2 = (data) => {
5321
5167
  const t = typeof data;
5322
5168
  switch (t) {
5323
5169
  case "number": {
@@ -5369,7 +5215,7 @@ const error$20 = () => {
5369
5215
  };
5370
5216
  return (issue$1) => {
5371
5217
  switch (issue$1.code) {
5372
- case "invalid_type": return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue$1.expected} ប៉ុន្តែទទួលបាន ${parsedType$3(issue$1.input)}`;
5218
+ case "invalid_type": return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue$1.expected} ប៉ុន្តែទទួលបាន ${parsedType$2(issue$1.input)}`;
5373
5219
  case "invalid_value":
5374
5220
  if (issue$1.values.length === 1) return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${stringifyPrimitive(issue$1.values[0])}`;
5375
5221
  return `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${joinValues(issue$1.values, "|")}`;
@@ -5407,12 +5253,12 @@ const error$20 = () => {
5407
5253
  };
5408
5254
  };
5409
5255
  function kh_default() {
5410
- return { localeError: error$20() };
5256
+ return { localeError: error$19() };
5411
5257
  }
5412
5258
 
5413
5259
  //#endregion
5414
- //#region ../../node_modules/zod/v4/locales/ko.js
5415
- const error$19 = () => {
5260
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ko.js
5261
+ const error$18 = () => {
5416
5262
  const Sizable = {
5417
5263
  string: {
5418
5264
  unit: "문자",
@@ -5434,7 +5280,7 @@ const error$19 = () => {
5434
5280
  function getSizing(origin) {
5435
5281
  return Sizable[origin] ?? null;
5436
5282
  }
5437
- const parsedType$3 = (data) => {
5283
+ const parsedType$2 = (data) => {
5438
5284
  const t = typeof data;
5439
5285
  switch (t) {
5440
5286
  case "number": {
@@ -5486,7 +5332,7 @@ const error$19 = () => {
5486
5332
  };
5487
5333
  return (issue$1) => {
5488
5334
  switch (issue$1.code) {
5489
- case "invalid_type": return `잘못된 입력: 예상 타입은 ${issue$1.expected}, 받은 타입은 ${parsedType$3(issue$1.input)}입니다`;
5335
+ case "invalid_type": return `잘못된 입력: 예상 타입은 ${issue$1.expected}, 받은 타입은 ${parsedType$2(issue$1.input)}입니다`;
5490
5336
  case "invalid_value":
5491
5337
  if (issue$1.values.length === 1) return `잘못된 입력: 값은 ${stringifyPrimitive(issue$1.values[0])} 이어야 합니다`;
5492
5338
  return `잘못된 옵션: ${joinValues(issue$1.values, "또는 ")} 중 하나여야 합니다`;
@@ -5528,12 +5374,12 @@ const error$19 = () => {
5528
5374
  };
5529
5375
  };
5530
5376
  function ko_default() {
5531
- return { localeError: error$19() };
5377
+ return { localeError: error$18() };
5532
5378
  }
5533
5379
 
5534
5380
  //#endregion
5535
- //#region ../../node_modules/zod/v4/locales/mk.js
5536
- const error$18 = () => {
5381
+ //#region ../../node_modules/zod/dist/esm/v4/locales/mk.js
5382
+ const error$17 = () => {
5537
5383
  const Sizable = {
5538
5384
  string: {
5539
5385
  unit: "знаци",
@@ -5555,7 +5401,7 @@ const error$18 = () => {
5555
5401
  function getSizing(origin) {
5556
5402
  return Sizable[origin] ?? null;
5557
5403
  }
5558
- const parsedType$3 = (data) => {
5404
+ const parsedType$2 = (data) => {
5559
5405
  const t = typeof data;
5560
5406
  switch (t) {
5561
5407
  case "number": {
@@ -5607,7 +5453,7 @@ const error$18 = () => {
5607
5453
  };
5608
5454
  return (issue$1) => {
5609
5455
  switch (issue$1.code) {
5610
- case "invalid_type": return `Грешен внес: се очекува ${issue$1.expected}, примено ${parsedType$3(issue$1.input)}`;
5456
+ case "invalid_type": return `Грешен внес: се очекува ${issue$1.expected}, примено ${parsedType$2(issue$1.input)}`;
5611
5457
  case "invalid_value":
5612
5458
  if (issue$1.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue$1.values[0])}`;
5613
5459
  return `Грешана опција: се очекува една ${joinValues(issue$1.values, "|")}`;
@@ -5645,12 +5491,12 @@ const error$18 = () => {
5645
5491
  };
5646
5492
  };
5647
5493
  function mk_default() {
5648
- return { localeError: error$18() };
5494
+ return { localeError: error$17() };
5649
5495
  }
5650
5496
 
5651
5497
  //#endregion
5652
- //#region ../../node_modules/zod/v4/locales/ms.js
5653
- const error$17 = () => {
5498
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ms.js
5499
+ const error$16 = () => {
5654
5500
  const Sizable = {
5655
5501
  string: {
5656
5502
  unit: "aksara",
@@ -5672,7 +5518,7 @@ const error$17 = () => {
5672
5518
  function getSizing(origin) {
5673
5519
  return Sizable[origin] ?? null;
5674
5520
  }
5675
- const parsedType$3 = (data) => {
5521
+ const parsedType$2 = (data) => {
5676
5522
  const t = typeof data;
5677
5523
  switch (t) {
5678
5524
  case "number": {
@@ -5724,7 +5570,7 @@ const error$17 = () => {
5724
5570
  };
5725
5571
  return (issue$1) => {
5726
5572
  switch (issue$1.code) {
5727
- case "invalid_type": return `Input tidak sah: dijangka ${issue$1.expected}, diterima ${parsedType$3(issue$1.input)}`;
5573
+ case "invalid_type": return `Input tidak sah: dijangka ${issue$1.expected}, diterima ${parsedType$2(issue$1.input)}`;
5728
5574
  case "invalid_value":
5729
5575
  if (issue$1.values.length === 1) return `Input tidak sah: dijangka ${stringifyPrimitive(issue$1.values[0])}`;
5730
5576
  return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue$1.values, "|")}`;
@@ -5760,12 +5606,12 @@ const error$17 = () => {
5760
5606
  };
5761
5607
  };
5762
5608
  function ms_default() {
5763
- return { localeError: error$17() };
5609
+ return { localeError: error$16() };
5764
5610
  }
5765
5611
 
5766
5612
  //#endregion
5767
- //#region ../../node_modules/zod/v4/locales/nl.js
5768
- const error$16 = () => {
5613
+ //#region ../../node_modules/zod/dist/esm/v4/locales/nl.js
5614
+ const error$15 = () => {
5769
5615
  const Sizable = {
5770
5616
  string: { unit: "tekens" },
5771
5617
  file: { unit: "bytes" },
@@ -5775,7 +5621,7 @@ const error$16 = () => {
5775
5621
  function getSizing(origin) {
5776
5622
  return Sizable[origin] ?? null;
5777
5623
  }
5778
- const parsedType$3 = (data) => {
5624
+ const parsedType$2 = (data) => {
5779
5625
  const t = typeof data;
5780
5626
  switch (t) {
5781
5627
  case "number": {
@@ -5827,7 +5673,7 @@ const error$16 = () => {
5827
5673
  };
5828
5674
  return (issue$1) => {
5829
5675
  switch (issue$1.code) {
5830
- case "invalid_type": return `Ongeldige invoer: verwacht ${issue$1.expected}, ontving ${parsedType$3(issue$1.input)}`;
5676
+ case "invalid_type": return `Ongeldige invoer: verwacht ${issue$1.expected}, ontving ${parsedType$2(issue$1.input)}`;
5831
5677
  case "invalid_value":
5832
5678
  if (issue$1.values.length === 1) return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue$1.values[0])}`;
5833
5679
  return `Ongeldige optie: verwacht één van ${joinValues(issue$1.values, "|")}`;
@@ -5865,12 +5711,12 @@ const error$16 = () => {
5865
5711
  };
5866
5712
  };
5867
5713
  function nl_default() {
5868
- return { localeError: error$16() };
5714
+ return { localeError: error$15() };
5869
5715
  }
5870
5716
 
5871
5717
  //#endregion
5872
- //#region ../../node_modules/zod/v4/locales/no.js
5873
- const error$15 = () => {
5718
+ //#region ../../node_modules/zod/dist/esm/v4/locales/no.js
5719
+ const error$14 = () => {
5874
5720
  const Sizable = {
5875
5721
  string: {
5876
5722
  unit: "tegn",
@@ -5892,7 +5738,7 @@ const error$15 = () => {
5892
5738
  function getSizing(origin) {
5893
5739
  return Sizable[origin] ?? null;
5894
5740
  }
5895
- const parsedType$3 = (data) => {
5741
+ const parsedType$2 = (data) => {
5896
5742
  const t = typeof data;
5897
5743
  switch (t) {
5898
5744
  case "number": {
@@ -5944,7 +5790,7 @@ const error$15 = () => {
5944
5790
  };
5945
5791
  return (issue$1) => {
5946
5792
  switch (issue$1.code) {
5947
- case "invalid_type": return `Ugyldig input: forventet ${issue$1.expected}, fikk ${parsedType$3(issue$1.input)}`;
5793
+ case "invalid_type": return `Ugyldig input: forventet ${issue$1.expected}, fikk ${parsedType$2(issue$1.input)}`;
5948
5794
  case "invalid_value":
5949
5795
  if (issue$1.values.length === 1) return `Ugyldig verdi: forventet ${stringifyPrimitive(issue$1.values[0])}`;
5950
5796
  return `Ugyldig valg: forventet en av ${joinValues(issue$1.values, "|")}`;
@@ -5980,12 +5826,12 @@ const error$15 = () => {
5980
5826
  };
5981
5827
  };
5982
5828
  function no_default() {
5983
- return { localeError: error$15() };
5829
+ return { localeError: error$14() };
5984
5830
  }
5985
5831
 
5986
5832
  //#endregion
5987
- //#region ../../node_modules/zod/v4/locales/ota.js
5988
- const error$14 = () => {
5833
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ota.js
5834
+ const error$13 = () => {
5989
5835
  const Sizable = {
5990
5836
  string: {
5991
5837
  unit: "harf",
@@ -6007,7 +5853,7 @@ const error$14 = () => {
6007
5853
  function getSizing(origin) {
6008
5854
  return Sizable[origin] ?? null;
6009
5855
  }
6010
- const parsedType$3 = (data) => {
5856
+ const parsedType$2 = (data) => {
6011
5857
  const t = typeof data;
6012
5858
  switch (t) {
6013
5859
  case "number": {
@@ -6059,7 +5905,7 @@ const error$14 = () => {
6059
5905
  };
6060
5906
  return (issue$1) => {
6061
5907
  switch (issue$1.code) {
6062
- case "invalid_type": return `Fâsit giren: umulan ${issue$1.expected}, alınan ${parsedType$3(issue$1.input)}`;
5908
+ case "invalid_type": return `Fâsit giren: umulan ${issue$1.expected}, alınan ${parsedType$2(issue$1.input)}`;
6063
5909
  case "invalid_value":
6064
5910
  if (issue$1.values.length === 1) return `Fâsit giren: umulan ${stringifyPrimitive(issue$1.values[0])}`;
6065
5911
  return `Fâsit tercih: mûteberler ${joinValues(issue$1.values, "|")}`;
@@ -6095,138 +5941,11 @@ const error$14 = () => {
6095
5941
  };
6096
5942
  };
6097
5943
  function ota_default() {
6098
- return { localeError: error$14() };
6099
- }
6100
-
6101
- //#endregion
6102
- //#region ../../node_modules/zod/v4/locales/ps.js
6103
- const error$13 = () => {
6104
- const Sizable = {
6105
- string: {
6106
- unit: "توکي",
6107
- verb: "ولري"
6108
- },
6109
- file: {
6110
- unit: "بایټس",
6111
- verb: "ولري"
6112
- },
6113
- array: {
6114
- unit: "توکي",
6115
- verb: "ولري"
6116
- },
6117
- set: {
6118
- unit: "توکي",
6119
- verb: "ولري"
6120
- }
6121
- };
6122
- function getSizing(origin) {
6123
- return Sizable[origin] ?? null;
6124
- }
6125
- const parsedType$3 = (data) => {
6126
- const t = typeof data;
6127
- switch (t) {
6128
- case "number": {
6129
- return Number.isNaN(data) ? "NaN" : "عدد";
6130
- }
6131
- case "object": {
6132
- if (Array.isArray(data)) {
6133
- return "ارې";
6134
- }
6135
- if (data === null) {
6136
- return "null";
6137
- }
6138
- if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
6139
- return data.constructor.name;
6140
- }
6141
- }
6142
- }
6143
- return t;
6144
- };
6145
- const Nouns = {
6146
- regex: "ورودي",
6147
- email: "بریښنالیک",
6148
- url: "یو آر ال",
6149
- emoji: "ایموجي",
6150
- uuid: "UUID",
6151
- uuidv4: "UUIDv4",
6152
- uuidv6: "UUIDv6",
6153
- nanoid: "nanoid",
6154
- guid: "GUID",
6155
- cuid: "cuid",
6156
- cuid2: "cuid2",
6157
- ulid: "ULID",
6158
- xid: "XID",
6159
- ksuid: "KSUID",
6160
- datetime: "نیټه او وخت",
6161
- date: "نېټه",
6162
- time: "وخت",
6163
- duration: "موده",
6164
- ipv4: "د IPv4 پته",
6165
- ipv6: "د IPv6 پته",
6166
- cidrv4: "د IPv4 ساحه",
6167
- cidrv6: "د IPv6 ساحه",
6168
- base64: "base64-encoded متن",
6169
- base64url: "base64url-encoded متن",
6170
- json_string: "JSON متن",
6171
- e164: "د E.164 شمېره",
6172
- jwt: "JWT",
6173
- template_literal: "ورودي"
6174
- };
6175
- return (issue$1) => {
6176
- switch (issue$1.code) {
6177
- case "invalid_type": return `ناسم ورودي: باید ${issue$1.expected} وای, مګر ${parsedType$3(issue$1.input)} ترلاسه شو`;
6178
- case "invalid_value":
6179
- if (issue$1.values.length === 1) {
6180
- return `ناسم ورودي: باید ${stringifyPrimitive(issue$1.values[0])} وای`;
6181
- }
6182
- return `ناسم انتخاب: باید یو له ${joinValues(issue$1.values, "|")} څخه وای`;
6183
- case "too_big": {
6184
- const adj = issue$1.inclusive ? "<=" : "<";
6185
- const sizing = getSizing(issue$1.origin);
6186
- if (sizing) {
6187
- return `ډیر لوی: ${issue$1.origin ?? "ارزښت"} باید ${adj}${issue$1.maximum.toString()} ${sizing.unit ?? "عنصرونه"} ولري`;
6188
- }
6189
- return `ډیر لوی: ${issue$1.origin ?? "ارزښت"} باید ${adj}${issue$1.maximum.toString()} وي`;
6190
- }
6191
- case "too_small": {
6192
- const adj = issue$1.inclusive ? ">=" : ">";
6193
- const sizing = getSizing(issue$1.origin);
6194
- if (sizing) {
6195
- return `ډیر کوچنی: ${issue$1.origin} باید ${adj}${issue$1.minimum.toString()} ${sizing.unit} ولري`;
6196
- }
6197
- return `ډیر کوچنی: ${issue$1.origin} باید ${adj}${issue$1.minimum.toString()} وي`;
6198
- }
6199
- case "invalid_format": {
6200
- const _issue = issue$1;
6201
- if (_issue.format === "starts_with") {
6202
- return `ناسم متن: باید د "${_issue.prefix}" سره پیل شي`;
6203
- }
6204
- if (_issue.format === "ends_with") {
6205
- return `ناسم متن: باید د "${_issue.suffix}" سره پای ته ورسيږي`;
6206
- }
6207
- if (_issue.format === "includes") {
6208
- return `ناسم متن: باید "${_issue.includes}" ولري`;
6209
- }
6210
- if (_issue.format === "regex") {
6211
- return `ناسم متن: باید د ${_issue.pattern} سره مطابقت ولري`;
6212
- }
6213
- return `${Nouns[_issue.format] ?? issue$1.format} ناسم دی`;
6214
- }
6215
- case "not_multiple_of": return `ناسم عدد: باید د ${issue$1.divisor} مضرب وي`;
6216
- case "unrecognized_keys": return `ناسم ${issue$1.keys.length > 1 ? "کلیډونه" : "کلیډ"}: ${joinValues(issue$1.keys, ", ")}`;
6217
- case "invalid_key": return `ناسم کلیډ په ${issue$1.origin} کې`;
6218
- case "invalid_union": return `ناسمه ورودي`;
6219
- case "invalid_element": return `ناسم عنصر په ${issue$1.origin} کې`;
6220
- default: return `ناسمه ورودي`;
6221
- }
6222
- };
6223
- };
6224
- function ps_default() {
6225
5944
  return { localeError: error$13() };
6226
5945
  }
6227
5946
 
6228
5947
  //#endregion
6229
- //#region ../../node_modules/zod/v4/locales/pl.js
5948
+ //#region ../../node_modules/zod/dist/esm/v4/locales/pl.js
6230
5949
  const error$12 = () => {
6231
5950
  const Sizable = {
6232
5951
  string: {
@@ -6249,7 +5968,7 @@ const error$12 = () => {
6249
5968
  function getSizing(origin) {
6250
5969
  return Sizable[origin] ?? null;
6251
5970
  }
6252
- const parsedType$3 = (data) => {
5971
+ const parsedType$2 = (data) => {
6253
5972
  const t = typeof data;
6254
5973
  switch (t) {
6255
5974
  case "number": {
@@ -6301,7 +6020,7 @@ const error$12 = () => {
6301
6020
  };
6302
6021
  return (issue$1) => {
6303
6022
  switch (issue$1.code) {
6304
- case "invalid_type": return `Nieprawidłowe dane wejściowe: oczekiwano ${issue$1.expected}, otrzymano ${parsedType$3(issue$1.input)}`;
6023
+ case "invalid_type": return `Nieprawidłowe dane wejściowe: oczekiwano ${issue$1.expected}, otrzymano ${parsedType$2(issue$1.input)}`;
6305
6024
  case "invalid_value":
6306
6025
  if (issue$1.values.length === 1) return `Nieprawidłowe dane wejściowe: oczekiwano ${stringifyPrimitive(issue$1.values[0])}`;
6307
6026
  return `Nieprawidłowa opcja: oczekiwano jednej z wartości ${joinValues(issue$1.values, "|")}`;
@@ -6343,7 +6062,7 @@ function pl_default() {
6343
6062
  }
6344
6063
 
6345
6064
  //#endregion
6346
- //#region ../../node_modules/zod/v4/locales/pt.js
6065
+ //#region ../../node_modules/zod/dist/esm/v4/locales/pt.js
6347
6066
  const error$11 = () => {
6348
6067
  const Sizable = {
6349
6068
  string: {
@@ -6366,7 +6085,7 @@ const error$11 = () => {
6366
6085
  function getSizing(origin) {
6367
6086
  return Sizable[origin] ?? null;
6368
6087
  }
6369
- const parsedType$3 = (data) => {
6088
+ const parsedType$2 = (data) => {
6370
6089
  const t = typeof data;
6371
6090
  switch (t) {
6372
6091
  case "number": {
@@ -6418,7 +6137,7 @@ const error$11 = () => {
6418
6137
  };
6419
6138
  return (issue$1) => {
6420
6139
  switch (issue$1.code) {
6421
- case "invalid_type": return `Tipo inválido: esperado ${issue$1.expected}, recebido ${parsedType$3(issue$1.input)}`;
6140
+ case "invalid_type": return `Tipo inválido: esperado ${issue$1.expected}, recebido ${parsedType$2(issue$1.input)}`;
6422
6141
  case "invalid_value":
6423
6142
  if (issue$1.values.length === 1) return `Entrada inválida: esperado ${stringifyPrimitive(issue$1.values[0])}`;
6424
6143
  return `Opção inválida: esperada uma das ${joinValues(issue$1.values, "|")}`;
@@ -6458,7 +6177,7 @@ function pt_default() {
6458
6177
  }
6459
6178
 
6460
6179
  //#endregion
6461
- //#region ../../node_modules/zod/v4/locales/ru.js
6180
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ru.js
6462
6181
  function getRussianPlural(count, one, few, many) {
6463
6182
  const absCount = Math.abs(count);
6464
6183
  const lastDigit = absCount % 10;
@@ -6512,7 +6231,7 @@ const error$10 = () => {
6512
6231
  function getSizing(origin) {
6513
6232
  return Sizable[origin] ?? null;
6514
6233
  }
6515
- const parsedType$3 = (data) => {
6234
+ const parsedType$2 = (data) => {
6516
6235
  const t = typeof data;
6517
6236
  switch (t) {
6518
6237
  case "number": {
@@ -6564,7 +6283,7 @@ const error$10 = () => {
6564
6283
  };
6565
6284
  return (issue$1) => {
6566
6285
  switch (issue$1.code) {
6567
- case "invalid_type": return `Неверный ввод: ожидалось ${issue$1.expected}, получено ${parsedType$3(issue$1.input)}`;
6286
+ case "invalid_type": return `Неверный ввод: ожидалось ${issue$1.expected}, получено ${parsedType$2(issue$1.input)}`;
6568
6287
  case "invalid_value":
6569
6288
  if (issue$1.values.length === 1) return `Неверный ввод: ожидалось ${stringifyPrimitive(issue$1.values[0])}`;
6570
6289
  return `Неверный вариант: ожидалось одно из ${joinValues(issue$1.values, "|")}`;
@@ -6610,7 +6329,7 @@ function ru_default() {
6610
6329
  }
6611
6330
 
6612
6331
  //#endregion
6613
- //#region ../../node_modules/zod/v4/locales/sl.js
6332
+ //#region ../../node_modules/zod/dist/esm/v4/locales/sl.js
6614
6333
  const error$9 = () => {
6615
6334
  const Sizable = {
6616
6335
  string: {
@@ -6633,7 +6352,7 @@ const error$9 = () => {
6633
6352
  function getSizing(origin) {
6634
6353
  return Sizable[origin] ?? null;
6635
6354
  }
6636
- const parsedType$3 = (data) => {
6355
+ const parsedType$2 = (data) => {
6637
6356
  const t = typeof data;
6638
6357
  switch (t) {
6639
6358
  case "number": {
@@ -6685,7 +6404,7 @@ const error$9 = () => {
6685
6404
  };
6686
6405
  return (issue$1) => {
6687
6406
  switch (issue$1.code) {
6688
- case "invalid_type": return `Neveljaven vnos: pričakovano ${issue$1.expected}, prejeto ${parsedType$3(issue$1.input)}`;
6407
+ case "invalid_type": return `Neveljaven vnos: pričakovano ${issue$1.expected}, prejeto ${parsedType$2(issue$1.input)}`;
6689
6408
  case "invalid_value":
6690
6409
  if (issue$1.values.length === 1) return `Neveljaven vnos: pričakovano ${stringifyPrimitive(issue$1.values[0])}`;
6691
6410
  return `Neveljavna možnost: pričakovano eno izmed ${joinValues(issue$1.values, "|")}`;
@@ -6727,7 +6446,7 @@ function sl_default() {
6727
6446
  }
6728
6447
 
6729
6448
  //#endregion
6730
- //#region ../../node_modules/zod/v4/locales/sv.js
6449
+ //#region ../../node_modules/zod/dist/esm/v4/locales/sv.js
6731
6450
  const error$8 = () => {
6732
6451
  const Sizable = {
6733
6452
  string: {
@@ -6750,7 +6469,7 @@ const error$8 = () => {
6750
6469
  function getSizing(origin) {
6751
6470
  return Sizable[origin] ?? null;
6752
6471
  }
6753
- const parsedType$3 = (data) => {
6472
+ const parsedType$2 = (data) => {
6754
6473
  const t = typeof data;
6755
6474
  switch (t) {
6756
6475
  case "number": {
@@ -6802,7 +6521,7 @@ const error$8 = () => {
6802
6521
  };
6803
6522
  return (issue$1) => {
6804
6523
  switch (issue$1.code) {
6805
- case "invalid_type": return `Ogiltig inmatning: förväntat ${issue$1.expected}, fick ${parsedType$3(issue$1.input)}`;
6524
+ case "invalid_type": return `Ogiltig inmatning: förväntat ${issue$1.expected}, fick ${parsedType$2(issue$1.input)}`;
6806
6525
  case "invalid_value":
6807
6526
  if (issue$1.values.length === 1) return `Ogiltig inmatning: förväntat ${stringifyPrimitive(issue$1.values[0])}`;
6808
6527
  return `Ogiltigt val: förväntade en av ${joinValues(issue$1.values, "|")}`;
@@ -6846,7 +6565,7 @@ function sv_default() {
6846
6565
  }
6847
6566
 
6848
6567
  //#endregion
6849
- //#region ../../node_modules/zod/v4/locales/ta.js
6568
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ta.js
6850
6569
  const error$7 = () => {
6851
6570
  const Sizable = {
6852
6571
  string: {
@@ -6869,7 +6588,7 @@ const error$7 = () => {
6869
6588
  function getSizing(origin) {
6870
6589
  return Sizable[origin] ?? null;
6871
6590
  }
6872
- const parsedType$3 = (data) => {
6591
+ const parsedType$2 = (data) => {
6873
6592
  const t = typeof data;
6874
6593
  switch (t) {
6875
6594
  case "number": {
@@ -6921,7 +6640,7 @@ const error$7 = () => {
6921
6640
  };
6922
6641
  return (issue$1) => {
6923
6642
  switch (issue$1.code) {
6924
- case "invalid_type": return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue$1.expected}, பெறப்பட்டது ${parsedType$3(issue$1.input)}`;
6643
+ case "invalid_type": return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue$1.expected}, பெறப்பட்டது ${parsedType$2(issue$1.input)}`;
6925
6644
  case "invalid_value":
6926
6645
  if (issue$1.values.length === 1) return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${stringifyPrimitive(issue$1.values[0])}`;
6927
6646
  return `தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${joinValues(issue$1.values, "|")} இல் ஒன்று`;
@@ -6963,7 +6682,7 @@ function ta_default() {
6963
6682
  }
6964
6683
 
6965
6684
  //#endregion
6966
- //#region ../../node_modules/zod/v4/locales/th.js
6685
+ //#region ../../node_modules/zod/dist/esm/v4/locales/th.js
6967
6686
  const error$6 = () => {
6968
6687
  const Sizable = {
6969
6688
  string: {
@@ -6986,7 +6705,7 @@ const error$6 = () => {
6986
6705
  function getSizing(origin) {
6987
6706
  return Sizable[origin] ?? null;
6988
6707
  }
6989
- const parsedType$3 = (data) => {
6708
+ const parsedType$2 = (data) => {
6990
6709
  const t = typeof data;
6991
6710
  switch (t) {
6992
6711
  case "number": {
@@ -7038,7 +6757,7 @@ const error$6 = () => {
7038
6757
  };
7039
6758
  return (issue$1) => {
7040
6759
  switch (issue$1.code) {
7041
- case "invalid_type": return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue$1.expected} แต่ได้รับ ${parsedType$3(issue$1.input)}`;
6760
+ case "invalid_type": return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue$1.expected} แต่ได้รับ ${parsedType$2(issue$1.input)}`;
7042
6761
  case "invalid_value":
7043
6762
  if (issue$1.values.length === 1) return `ค่าไม่ถูกต้อง: ควรเป็น ${stringifyPrimitive(issue$1.values[0])}`;
7044
6763
  return `ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${joinValues(issue$1.values, "|")}`;
@@ -7080,7 +6799,7 @@ function th_default() {
7080
6799
  }
7081
6800
 
7082
6801
  //#endregion
7083
- //#region ../../node_modules/zod/v4/locales/tr.js
6802
+ //#region ../../node_modules/zod/dist/esm/v4/locales/tr.js
7084
6803
  const parsedType = (data) => {
7085
6804
  const t = typeof data;
7086
6805
  switch (t) {
@@ -7193,7 +6912,7 @@ function tr_default() {
7193
6912
  }
7194
6913
 
7195
6914
  //#endregion
7196
- //#region ../../node_modules/zod/v4/locales/ua.js
6915
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ua.js
7197
6916
  const error$4 = () => {
7198
6917
  const Sizable = {
7199
6918
  string: {
@@ -7216,7 +6935,7 @@ const error$4 = () => {
7216
6935
  function getSizing(origin) {
7217
6936
  return Sizable[origin] ?? null;
7218
6937
  }
7219
- const parsedType$3 = (data) => {
6938
+ const parsedType$2 = (data) => {
7220
6939
  const t = typeof data;
7221
6940
  switch (t) {
7222
6941
  case "number": {
@@ -7268,7 +6987,7 @@ const error$4 = () => {
7268
6987
  };
7269
6988
  return (issue$1) => {
7270
6989
  switch (issue$1.code) {
7271
- case "invalid_type": return `Неправильні вхідні дані: очікується ${issue$1.expected}, отримано ${parsedType$3(issue$1.input)}`;
6990
+ case "invalid_type": return `Неправильні вхідні дані: очікується ${issue$1.expected}, отримано ${parsedType$2(issue$1.input)}`;
7272
6991
  case "invalid_value":
7273
6992
  if (issue$1.values.length === 1) return `Неправильні вхідні дані: очікується ${stringifyPrimitive(issue$1.values[0])}`;
7274
6993
  return `Неправильна опція: очікується одне з ${joinValues(issue$1.values, "|")}`;
@@ -7308,7 +7027,7 @@ function ua_default() {
7308
7027
  }
7309
7028
 
7310
7029
  //#endregion
7311
- //#region ../../node_modules/zod/v4/locales/ur.js
7030
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ur.js
7312
7031
  const error$3 = () => {
7313
7032
  const Sizable = {
7314
7033
  string: {
@@ -7331,7 +7050,7 @@ const error$3 = () => {
7331
7050
  function getSizing(origin) {
7332
7051
  return Sizable[origin] ?? null;
7333
7052
  }
7334
- const parsedType$3 = (data) => {
7053
+ const parsedType$2 = (data) => {
7335
7054
  const t = typeof data;
7336
7055
  switch (t) {
7337
7056
  case "number": {
@@ -7383,7 +7102,7 @@ const error$3 = () => {
7383
7102
  };
7384
7103
  return (issue$1) => {
7385
7104
  switch (issue$1.code) {
7386
- case "invalid_type": return `غلط ان پٹ: ${issue$1.expected} متوقع تھا، ${parsedType$3(issue$1.input)} موصول ہوا`;
7105
+ case "invalid_type": return `غلط ان پٹ: ${issue$1.expected} متوقع تھا، ${parsedType$2(issue$1.input)} موصول ہوا`;
7387
7106
  case "invalid_value":
7388
7107
  if (issue$1.values.length === 1) return `غلط ان پٹ: ${stringifyPrimitive(issue$1.values[0])} متوقع تھا`;
7389
7108
  return `غلط آپشن: ${joinValues(issue$1.values, "|")} میں سے ایک متوقع تھا`;
@@ -7425,7 +7144,7 @@ function ur_default() {
7425
7144
  }
7426
7145
 
7427
7146
  //#endregion
7428
- //#region ../../node_modules/zod/v4/locales/vi.js
7147
+ //#region ../../node_modules/zod/dist/esm/v4/locales/vi.js
7429
7148
  const error$2 = () => {
7430
7149
  const Sizable = {
7431
7150
  string: {
@@ -7448,7 +7167,7 @@ const error$2 = () => {
7448
7167
  function getSizing(origin) {
7449
7168
  return Sizable[origin] ?? null;
7450
7169
  }
7451
- const parsedType$3 = (data) => {
7170
+ const parsedType$2 = (data) => {
7452
7171
  const t = typeof data;
7453
7172
  switch (t) {
7454
7173
  case "number": {
@@ -7500,7 +7219,7 @@ const error$2 = () => {
7500
7219
  };
7501
7220
  return (issue$1) => {
7502
7221
  switch (issue$1.code) {
7503
- 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)}`;
7222
+ 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)}`;
7504
7223
  case "invalid_value":
7505
7224
  if (issue$1.values.length === 1) return `Đầu vào không hợp lệ: mong đợi ${stringifyPrimitive(issue$1.values[0])}`;
7506
7225
  return `Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${joinValues(issue$1.values, "|")}`;
@@ -7540,7 +7259,7 @@ function vi_default() {
7540
7259
  }
7541
7260
 
7542
7261
  //#endregion
7543
- //#region ../../node_modules/zod/v4/locales/zh-CN.js
7262
+ //#region ../../node_modules/zod/dist/esm/v4/locales/zh-CN.js
7544
7263
  const error$1 = () => {
7545
7264
  const Sizable = {
7546
7265
  string: {
@@ -7563,7 +7282,7 @@ const error$1 = () => {
7563
7282
  function getSizing(origin) {
7564
7283
  return Sizable[origin] ?? null;
7565
7284
  }
7566
- const parsedType$3 = (data) => {
7285
+ const parsedType$2 = (data) => {
7567
7286
  const t = typeof data;
7568
7287
  switch (t) {
7569
7288
  case "number": {
@@ -7615,7 +7334,7 @@ const error$1 = () => {
7615
7334
  };
7616
7335
  return (issue$1) => {
7617
7336
  switch (issue$1.code) {
7618
- case "invalid_type": return `无效输入:期望 ${issue$1.expected},实际接收 ${parsedType$3(issue$1.input)}`;
7337
+ case "invalid_type": return `无效输入:期望 ${issue$1.expected},实际接收 ${parsedType$2(issue$1.input)}`;
7619
7338
  case "invalid_value":
7620
7339
  if (issue$1.values.length === 1) return `无效输入:期望 ${stringifyPrimitive(issue$1.values[0])}`;
7621
7340
  return `无效选项:期望以下之一 ${joinValues(issue$1.values, "|")}`;
@@ -7655,7 +7374,7 @@ function zh_CN_default() {
7655
7374
  }
7656
7375
 
7657
7376
  //#endregion
7658
- //#region ../../node_modules/zod/v4/locales/zh-TW.js
7377
+ //#region ../../node_modules/zod/dist/esm/v4/locales/zh-TW.js
7659
7378
  const error = () => {
7660
7379
  const Sizable = {
7661
7380
  string: {
@@ -7678,7 +7397,7 @@ const error = () => {
7678
7397
  function getSizing(origin) {
7679
7398
  return Sizable[origin] ?? null;
7680
7399
  }
7681
- const parsedType$3 = (data) => {
7400
+ const parsedType$2 = (data) => {
7682
7401
  const t = typeof data;
7683
7402
  switch (t) {
7684
7403
  case "number": {
@@ -7730,7 +7449,7 @@ const error = () => {
7730
7449
  };
7731
7450
  return (issue$1) => {
7732
7451
  switch (issue$1.code) {
7733
- case "invalid_type": return `無效的輸入值:預期為 ${issue$1.expected},但收到 ${parsedType$3(issue$1.input)}`;
7452
+ case "invalid_type": return `無效的輸入值:預期為 ${issue$1.expected},但收到 ${parsedType$2(issue$1.input)}`;
7734
7453
  case "invalid_value":
7735
7454
  if (issue$1.values.length === 1) return `無效的輸入值:預期為 ${stringifyPrimitive(issue$1.values[0])}`;
7736
7455
  return `無效的選項:預期為以下其中之一 ${joinValues(issue$1.values, "|")}`;
@@ -7772,7 +7491,7 @@ function zh_TW_default() {
7772
7491
  }
7773
7492
 
7774
7493
  //#endregion
7775
- //#region ../../node_modules/zod/v4/locales/index.js
7494
+ //#region ../../node_modules/zod/dist/esm/v4/locales/index.js
7776
7495
  var locales_exports = {};
7777
7496
  __export(locales_exports, {
7778
7497
  ar: () => ar_default,
@@ -7782,7 +7501,6 @@ __export(locales_exports, {
7782
7501
  cs: () => cs_default,
7783
7502
  de: () => de_default,
7784
7503
  en: () => en_default,
7785
- eo: () => eo_default,
7786
7504
  es: () => es_default,
7787
7505
  fa: () => fa_default,
7788
7506
  fi: () => fi_default,
@@ -7801,7 +7519,6 @@ __export(locales_exports, {
7801
7519
  no: () => no_default,
7802
7520
  ota: () => ota_default,
7803
7521
  pl: () => pl_default,
7804
- ps: () => ps_default,
7805
7522
  pt: () => pt_default,
7806
7523
  ru: () => ru_default,
7807
7524
  sl: () => sl_default,
@@ -7817,12 +7534,12 @@ __export(locales_exports, {
7817
7534
  });
7818
7535
 
7819
7536
  //#endregion
7820
- //#region ../../node_modules/zod/v4/core/registries.js
7537
+ //#region ../../node_modules/zod/dist/esm/v4/core/registries.js
7821
7538
  const $output = Symbol("ZodOutput");
7822
7539
  const $input = Symbol("ZodInput");
7823
7540
  var $ZodRegistry = class {
7824
7541
  constructor() {
7825
- this._map = new Map();
7542
+ this._map = new WeakMap();
7826
7543
  this._idmap = new Map();
7827
7544
  }
7828
7545
  add(schema, ..._meta) {
@@ -7836,16 +7553,7 @@ var $ZodRegistry = class {
7836
7553
  }
7837
7554
  return this;
7838
7555
  }
7839
- clear() {
7840
- this._map = new Map();
7841
- this._idmap = new Map();
7842
- return this;
7843
- }
7844
7556
  remove(schema) {
7845
- const meta = this._map.get(schema);
7846
- if (meta && typeof meta === "object" && "id" in meta) {
7847
- this._idmap.delete(meta.id);
7848
- }
7849
7557
  this._map.delete(schema);
7850
7558
  return this;
7851
7559
  }
@@ -7871,7 +7579,7 @@ function registry() {
7871
7579
  const globalRegistry = /* @__PURE__ */ registry();
7872
7580
 
7873
7581
  //#endregion
7874
- //#region ../../node_modules/zod/v4/core/api.js
7582
+ //#region ../../node_modules/zod/dist/esm/v4/core/api.js
7875
7583
  function _string(Class$1, params) {
7876
7584
  return new Class$1({
7877
7585
  type: "string",
@@ -8086,13 +7794,6 @@ function _jwt(Class$1, params) {
8086
7794
  ...normalizeParams(params)
8087
7795
  });
8088
7796
  }
8089
- const TimePrecision = {
8090
- Any: null,
8091
- Minute: -1,
8092
- Second: 0,
8093
- Millisecond: 3,
8094
- Microsecond: 6
8095
- };
8096
7797
  function _isoDateTime(Class$1, params) {
8097
7798
  return new Class$1({
8098
7799
  type: "string",
@@ -8659,8 +8360,8 @@ function _refine(Class$1, fn, _params) {
8659
8360
  return schema;
8660
8361
  }
8661
8362
  function _stringbool(Classes, _params) {
8662
- const params = normalizeParams(_params);
8663
- let truthyArray = params.truthy ?? [
8363
+ const { case: _case, error: error$37, truthy, falsy } = normalizeParams(_params);
8364
+ let truthyArray = truthy ?? [
8664
8365
  "true",
8665
8366
  "1",
8666
8367
  "yes",
@@ -8668,7 +8369,7 @@ function _stringbool(Classes, _params) {
8668
8369
  "y",
8669
8370
  "enabled"
8670
8371
  ];
8671
- let falsyArray = params.falsy ?? [
8372
+ let falsyArray = falsy ?? [
8672
8373
  "false",
8673
8374
  "0",
8674
8375
  "no",
@@ -8676,7 +8377,7 @@ function _stringbool(Classes, _params) {
8676
8377
  "n",
8677
8378
  "disabled"
8678
8379
  ];
8679
- if (params.case !== "sensitive") {
8380
+ if (_case !== "sensitive") {
8680
8381
  truthyArray = truthyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
8681
8382
  falsyArray = falsyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
8682
8383
  }
@@ -8690,7 +8391,7 @@ function _stringbool(Classes, _params) {
8690
8391
  type: "transform",
8691
8392
  transform: (input, payload) => {
8692
8393
  let data = input;
8693
- if (params.case !== "sensitive") data = data.toLowerCase();
8394
+ if (_case !== "sensitive") data = data.toLowerCase();
8694
8395
  if (truthySet.has(data)) {
8695
8396
  return true;
8696
8397
  } else if (falsySet.has(data)) {
@@ -8706,47 +8407,31 @@ function _stringbool(Classes, _params) {
8706
8407
  return {};
8707
8408
  }
8708
8409
  },
8709
- error: params.error
8410
+ error: error$37
8710
8411
  });
8711
8412
  const innerPipe = new _Pipe({
8712
8413
  type: "pipe",
8713
8414
  in: new _String({
8714
8415
  type: "string",
8715
- error: params.error
8416
+ error: error$37
8716
8417
  }),
8717
8418
  out: tx,
8718
- error: params.error
8419
+ error: error$37
8719
8420
  });
8720
8421
  const outerPipe = new _Pipe({
8721
8422
  type: "pipe",
8722
8423
  in: innerPipe,
8723
8424
  out: new _Boolean({
8724
8425
  type: "boolean",
8725
- error: params.error
8426
+ error: error$37
8726
8427
  }),
8727
- error: params.error
8428
+ error: error$37
8728
8429
  });
8729
8430
  return outerPipe;
8730
8431
  }
8731
- function _stringFormat(Class$1, format, fnOrRegex, _params = {}) {
8732
- const params = normalizeParams(_params);
8733
- const def = {
8734
- ...normalizeParams(_params),
8735
- check: "string_format",
8736
- type: "string",
8737
- format,
8738
- fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
8739
- ...params
8740
- };
8741
- if (fnOrRegex instanceof RegExp) {
8742
- def.pattern = fnOrRegex;
8743
- }
8744
- const inst = new Class$1(def);
8745
- return inst;
8746
- }
8747
8432
 
8748
8433
  //#endregion
8749
- //#region ../../node_modules/zod/v4/core/function.js
8434
+ //#region ../../node_modules/zod/dist/esm/v4/core/function.js
8750
8435
  var $ZodFunction = class {
8751
8436
  constructor(def) {
8752
8437
  this._def = def;
@@ -8817,7 +8502,7 @@ function _function(params) {
8817
8502
  }
8818
8503
 
8819
8504
  //#endregion
8820
- //#region ../../node_modules/zod/v4/core/to-json-schema.js
8505
+ //#region ../../node_modules/zod/dist/esm/v4/core/to-json-schema.js
8821
8506
  var JSONSchemaGenerator = class {
8822
8507
  constructor(params) {
8823
8508
  this.counter = 0;
@@ -8853,435 +8538,431 @@ var JSONSchemaGenerator = class {
8853
8538
  const result = {
8854
8539
  schema: {},
8855
8540
  count: 1,
8856
- cycle: undefined,
8857
- path: _params.path
8541
+ cycle: undefined
8858
8542
  };
8859
8543
  this.seen.set(schema, result);
8860
- const overrideSchema = schema._zod.toJSONSchema?.();
8861
- if (overrideSchema) {
8862
- result.schema = overrideSchema;
8544
+ if (schema._zod.toJSONSchema) {
8545
+ result.schema = schema._zod.toJSONSchema();
8546
+ }
8547
+ const params = {
8548
+ ..._params,
8549
+ schemaPath: [..._params.schemaPath, schema],
8550
+ path: _params.path
8551
+ };
8552
+ const parent = schema._zod.parent;
8553
+ if (parent) {
8554
+ result.ref = parent;
8555
+ this.process(parent, params);
8556
+ this.seen.get(parent).isParent = true;
8863
8557
  } else {
8864
- const params = {
8865
- ..._params,
8866
- schemaPath: [..._params.schemaPath, schema],
8867
- path: _params.path
8868
- };
8869
- const parent = schema._zod.parent;
8870
- if (parent) {
8871
- result.ref = parent;
8872
- this.process(parent, params);
8873
- this.seen.get(parent).isParent = true;
8874
- } else {
8875
- const _json = result.schema;
8876
- switch (def.type) {
8877
- case "string": {
8878
- const json$1 = _json;
8879
- json$1.type = "string";
8880
- const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
8881
- if (typeof minimum === "number") json$1.minLength = minimum;
8882
- if (typeof maximum === "number") json$1.maxLength = maximum;
8883
- if (format) {
8884
- json$1.format = formatMap[format] ?? format;
8885
- if (json$1.format === "") delete json$1.format;
8886
- }
8887
- if (contentEncoding) json$1.contentEncoding = contentEncoding;
8888
- if (patterns && patterns.size > 0) {
8889
- const regexes = [...patterns];
8890
- if (regexes.length === 1) json$1.pattern = regexes[0].source;
8891
- else if (regexes.length > 1) {
8892
- result.schema.allOf = [...regexes.map((regex) => ({
8893
- ...this.target === "draft-7" ? { type: "string" } : {},
8894
- pattern: regex.source
8895
- }))];
8896
- }
8897
- }
8898
- break;
8899
- }
8900
- case "number": {
8901
- const json$1 = _json;
8902
- const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
8903
- if (typeof format === "string" && format.includes("int")) json$1.type = "integer";
8904
- else json$1.type = "number";
8905
- if (typeof exclusiveMinimum === "number") json$1.exclusiveMinimum = exclusiveMinimum;
8906
- if (typeof minimum === "number") {
8907
- json$1.minimum = minimum;
8908
- if (typeof exclusiveMinimum === "number") {
8909
- if (exclusiveMinimum >= minimum) delete json$1.minimum;
8910
- else delete json$1.exclusiveMinimum;
8911
- }
8912
- }
8913
- if (typeof exclusiveMaximum === "number") json$1.exclusiveMaximum = exclusiveMaximum;
8914
- if (typeof maximum === "number") {
8915
- json$1.maximum = maximum;
8916
- if (typeof exclusiveMaximum === "number") {
8917
- if (exclusiveMaximum <= maximum) delete json$1.maximum;
8918
- else delete json$1.exclusiveMaximum;
8919
- }
8920
- }
8921
- if (typeof multipleOf === "number") json$1.multipleOf = multipleOf;
8922
- break;
8923
- }
8924
- case "boolean": {
8925
- const json$1 = _json;
8926
- json$1.type = "boolean";
8927
- break;
8928
- }
8929
- case "bigint": {
8930
- if (this.unrepresentable === "throw") {
8931
- throw new Error("BigInt cannot be represented in JSON Schema");
8932
- }
8933
- break;
8558
+ const _json = result.schema;
8559
+ switch (def.type) {
8560
+ case "string": {
8561
+ const json$1 = _json;
8562
+ json$1.type = "string";
8563
+ const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
8564
+ if (typeof minimum === "number") json$1.minLength = minimum;
8565
+ if (typeof maximum === "number") json$1.maxLength = maximum;
8566
+ if (format) {
8567
+ json$1.format = formatMap[format] ?? format;
8568
+ if (json$1.format === "") delete json$1.format;
8934
8569
  }
8935
- case "symbol": {
8936
- if (this.unrepresentable === "throw") {
8937
- throw new Error("Symbols cannot be represented in JSON Schema");
8570
+ if (contentEncoding) json$1.contentEncoding = contentEncoding;
8571
+ if (patterns && patterns.size > 0) {
8572
+ const regexes = [...patterns];
8573
+ if (regexes.length === 1) json$1.pattern = regexes[0].source;
8574
+ else if (regexes.length > 1) {
8575
+ result.schema.allOf = [...regexes.map((regex) => ({
8576
+ ...this.target === "draft-7" ? { type: "string" } : {},
8577
+ pattern: regex.source
8578
+ }))];
8938
8579
  }
8939
- break;
8940
8580
  }
8941
- case "null": {
8942
- _json.type = "null";
8943
- break;
8944
- }
8945
- case "any": {
8946
- break;
8947
- }
8948
- case "unknown": {
8949
- break;
8950
- }
8951
- case "undefined": {
8952
- if (this.unrepresentable === "throw") {
8953
- throw new Error("Undefined cannot be represented in JSON Schema");
8581
+ break;
8582
+ }
8583
+ case "number": {
8584
+ const json$1 = _json;
8585
+ const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
8586
+ if (typeof format === "string" && format.includes("int")) json$1.type = "integer";
8587
+ else json$1.type = "number";
8588
+ if (typeof exclusiveMinimum === "number") json$1.exclusiveMinimum = exclusiveMinimum;
8589
+ if (typeof minimum === "number") {
8590
+ json$1.minimum = minimum;
8591
+ if (typeof exclusiveMinimum === "number") {
8592
+ if (exclusiveMinimum >= minimum) delete json$1.minimum;
8593
+ else delete json$1.exclusiveMinimum;
8954
8594
  }
8955
- break;
8956
8595
  }
8957
- case "void": {
8958
- if (this.unrepresentable === "throw") {
8959
- throw new Error("Void cannot be represented in JSON Schema");
8596
+ if (typeof exclusiveMaximum === "number") json$1.exclusiveMaximum = exclusiveMaximum;
8597
+ if (typeof maximum === "number") {
8598
+ json$1.maximum = maximum;
8599
+ if (typeof exclusiveMaximum === "number") {
8600
+ if (exclusiveMaximum <= maximum) delete json$1.maximum;
8601
+ else delete json$1.exclusiveMaximum;
8960
8602
  }
8961
- break;
8962
- }
8963
- case "never": {
8964
- _json.not = {};
8965
- break;
8966
8603
  }
8967
- case "date": {
8968
- if (this.unrepresentable === "throw") {
8969
- throw new Error("Date cannot be represented in JSON Schema");
8970
- }
8971
- break;
8604
+ if (typeof multipleOf === "number") json$1.multipleOf = multipleOf;
8605
+ break;
8606
+ }
8607
+ case "boolean": {
8608
+ const json$1 = _json;
8609
+ json$1.type = "boolean";
8610
+ break;
8611
+ }
8612
+ case "bigint": {
8613
+ if (this.unrepresentable === "throw") {
8614
+ throw new Error("BigInt cannot be represented in JSON Schema");
8972
8615
  }
8973
- case "array": {
8974
- const json$1 = _json;
8975
- const { minimum, maximum } = schema._zod.bag;
8976
- if (typeof minimum === "number") json$1.minItems = minimum;
8977
- if (typeof maximum === "number") json$1.maxItems = maximum;
8978
- json$1.type = "array";
8979
- json$1.items = this.process(def.element, {
8980
- ...params,
8981
- path: [...params.path, "items"]
8982
- });
8983
- break;
8616
+ break;
8617
+ }
8618
+ case "symbol": {
8619
+ if (this.unrepresentable === "throw") {
8620
+ throw new Error("Symbols cannot be represented in JSON Schema");
8984
8621
  }
8985
- case "object": {
8986
- const json$1 = _json;
8987
- json$1.type = "object";
8988
- json$1.properties = {};
8989
- const shape = def.shape;
8990
- for (const key in shape) {
8991
- json$1.properties[key] = this.process(shape[key], {
8992
- ...params,
8993
- path: [
8994
- ...params.path,
8995
- "properties",
8996
- key
8997
- ]
8998
- });
8999
- }
9000
- const allKeys = new Set(Object.keys(shape));
9001
- const requiredKeys = new Set([...allKeys].filter((key) => {
9002
- const v = def.shape[key]._zod;
9003
- if (this.io === "input") {
9004
- return v.optin === undefined;
9005
- } else {
9006
- return v.optout === undefined;
9007
- }
9008
- }));
9009
- if (requiredKeys.size > 0) {
9010
- json$1.required = Array.from(requiredKeys);
9011
- }
9012
- if (def.catchall?._zod.def.type === "never") {
9013
- json$1.additionalProperties = false;
9014
- } else if (!def.catchall) {
9015
- if (this.io === "output") json$1.additionalProperties = false;
9016
- } else if (def.catchall) {
9017
- json$1.additionalProperties = this.process(def.catchall, {
9018
- ...params,
9019
- path: [...params.path, "additionalProperties"]
9020
- });
9021
- }
9022
- break;
8622
+ break;
8623
+ }
8624
+ case "undefined": {
8625
+ const json$1 = _json;
8626
+ json$1.type = "null";
8627
+ break;
8628
+ }
8629
+ case "null": {
8630
+ _json.type = "null";
8631
+ break;
8632
+ }
8633
+ case "any": {
8634
+ break;
8635
+ }
8636
+ case "unknown": {
8637
+ break;
8638
+ }
8639
+ case "never": {
8640
+ _json.not = {};
8641
+ break;
8642
+ }
8643
+ case "void": {
8644
+ if (this.unrepresentable === "throw") {
8645
+ throw new Error("Void cannot be represented in JSON Schema");
9023
8646
  }
9024
- case "union": {
9025
- const json$1 = _json;
9026
- json$1.anyOf = def.options.map((x, i) => this.process(x, {
9027
- ...params,
9028
- path: [
9029
- ...params.path,
9030
- "anyOf",
9031
- i
9032
- ]
9033
- }));
9034
- break;
8647
+ break;
8648
+ }
8649
+ case "date": {
8650
+ if (this.unrepresentable === "throw") {
8651
+ throw new Error("Date cannot be represented in JSON Schema");
9035
8652
  }
9036
- case "intersection": {
9037
- const json$1 = _json;
9038
- const a = this.process(def.left, {
9039
- ...params,
9040
- path: [
9041
- ...params.path,
9042
- "allOf",
9043
- 0
9044
- ]
9045
- });
9046
- const b = this.process(def.right, {
8653
+ break;
8654
+ }
8655
+ case "array": {
8656
+ const json$1 = _json;
8657
+ const { minimum, maximum } = schema._zod.bag;
8658
+ if (typeof minimum === "number") json$1.minItems = minimum;
8659
+ if (typeof maximum === "number") json$1.maxItems = maximum;
8660
+ json$1.type = "array";
8661
+ json$1.items = this.process(def.element, {
8662
+ ...params,
8663
+ path: [...params.path, "items"]
8664
+ });
8665
+ break;
8666
+ }
8667
+ case "object": {
8668
+ const json$1 = _json;
8669
+ json$1.type = "object";
8670
+ json$1.properties = {};
8671
+ const shape = def.shape;
8672
+ for (const key in shape) {
8673
+ json$1.properties[key] = this.process(shape[key], {
9047
8674
  ...params,
9048
8675
  path: [
9049
8676
  ...params.path,
9050
- "allOf",
9051
- 1
8677
+ "properties",
8678
+ key
9052
8679
  ]
9053
8680
  });
9054
- const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
9055
- const allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
9056
- json$1.allOf = allOf;
9057
- break;
9058
8681
  }
9059
- case "tuple": {
9060
- const json$1 = _json;
9061
- json$1.type = "array";
9062
- const prefixItems = def.items.map((x, i) => this.process(x, {
9063
- ...params,
9064
- path: [
9065
- ...params.path,
9066
- "prefixItems",
9067
- i
9068
- ]
9069
- }));
9070
- if (this.target === "draft-2020-12") {
9071
- json$1.prefixItems = prefixItems;
8682
+ const allKeys = new Set(Object.keys(shape));
8683
+ const requiredKeys = new Set([...allKeys].filter((key) => {
8684
+ const v = def.shape[key]._zod;
8685
+ if (this.io === "input") {
8686
+ return v.optin === undefined;
9072
8687
  } else {
9073
- json$1.items = prefixItems;
8688
+ return v.optout === undefined;
9074
8689
  }
9075
- if (def.rest) {
9076
- const rest = this.process(def.rest, {
9077
- ...params,
9078
- path: [...params.path, "items"]
9079
- });
9080
- if (this.target === "draft-2020-12") {
9081
- json$1.items = rest;
9082
- } else {
9083
- json$1.additionalItems = rest;
9084
- }
9085
- }
9086
- if (def.rest) {
9087
- json$1.items = this.process(def.rest, {
9088
- ...params,
9089
- path: [...params.path, "items"]
9090
- });
9091
- }
9092
- const { minimum, maximum } = schema._zod.bag;
9093
- if (typeof minimum === "number") json$1.minItems = minimum;
9094
- if (typeof maximum === "number") json$1.maxItems = maximum;
9095
- break;
8690
+ }));
8691
+ if (requiredKeys.size > 0) {
8692
+ json$1.required = Array.from(requiredKeys);
9096
8693
  }
9097
- case "record": {
9098
- const json$1 = _json;
9099
- json$1.type = "object";
9100
- json$1.propertyNames = this.process(def.keyType, {
9101
- ...params,
9102
- path: [...params.path, "propertyNames"]
9103
- });
9104
- json$1.additionalProperties = this.process(def.valueType, {
8694
+ if (def.catchall?._zod.def.type === "never") {
8695
+ json$1.additionalProperties = false;
8696
+ } else if (!def.catchall) {
8697
+ if (this.io === "output") json$1.additionalProperties = false;
8698
+ } else if (def.catchall) {
8699
+ json$1.additionalProperties = this.process(def.catchall, {
9105
8700
  ...params,
9106
8701
  path: [...params.path, "additionalProperties"]
9107
8702
  });
9108
- break;
9109
8703
  }
9110
- case "map": {
9111
- if (this.unrepresentable === "throw") {
9112
- throw new Error("Map cannot be represented in JSON Schema");
9113
- }
9114
- break;
8704
+ break;
8705
+ }
8706
+ case "union": {
8707
+ const json$1 = _json;
8708
+ json$1.anyOf = def.options.map((x, i) => this.process(x, {
8709
+ ...params,
8710
+ path: [
8711
+ ...params.path,
8712
+ "anyOf",
8713
+ i
8714
+ ]
8715
+ }));
8716
+ break;
8717
+ }
8718
+ case "intersection": {
8719
+ const json$1 = _json;
8720
+ const a = this.process(def.left, {
8721
+ ...params,
8722
+ path: [
8723
+ ...params.path,
8724
+ "allOf",
8725
+ 0
8726
+ ]
8727
+ });
8728
+ const b = this.process(def.right, {
8729
+ ...params,
8730
+ path: [
8731
+ ...params.path,
8732
+ "allOf",
8733
+ 1
8734
+ ]
8735
+ });
8736
+ const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
8737
+ const allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
8738
+ json$1.allOf = allOf;
8739
+ break;
8740
+ }
8741
+ case "tuple": {
8742
+ const json$1 = _json;
8743
+ json$1.type = "array";
8744
+ const prefixItems = def.items.map((x, i) => this.process(x, {
8745
+ ...params,
8746
+ path: [
8747
+ ...params.path,
8748
+ "prefixItems",
8749
+ i
8750
+ ]
8751
+ }));
8752
+ if (this.target === "draft-2020-12") {
8753
+ json$1.prefixItems = prefixItems;
8754
+ } else {
8755
+ json$1.items = prefixItems;
9115
8756
  }
9116
- case "set": {
9117
- if (this.unrepresentable === "throw") {
9118
- throw new Error("Set cannot be represented in JSON Schema");
8757
+ if (def.rest) {
8758
+ const rest = this.process(def.rest, {
8759
+ ...params,
8760
+ path: [...params.path, "items"]
8761
+ });
8762
+ if (this.target === "draft-2020-12") {
8763
+ json$1.items = rest;
8764
+ } else {
8765
+ json$1.additionalItems = rest;
9119
8766
  }
9120
- break;
9121
8767
  }
9122
- case "enum": {
9123
- const json$1 = _json;
9124
- const values = getEnumValues(def.entries);
9125
- if (values.every((v) => typeof v === "number")) json$1.type = "number";
9126
- if (values.every((v) => typeof v === "string")) json$1.type = "string";
9127
- json$1.enum = values;
9128
- break;
8768
+ if (def.rest) {
8769
+ json$1.items = this.process(def.rest, {
8770
+ ...params,
8771
+ path: [...params.path, "items"]
8772
+ });
8773
+ }
8774
+ const { minimum, maximum } = schema._zod.bag;
8775
+ if (typeof minimum === "number") json$1.minItems = minimum;
8776
+ if (typeof maximum === "number") json$1.maxItems = maximum;
8777
+ break;
8778
+ }
8779
+ case "record": {
8780
+ const json$1 = _json;
8781
+ json$1.type = "object";
8782
+ json$1.propertyNames = this.process(def.keyType, {
8783
+ ...params,
8784
+ path: [...params.path, "propertyNames"]
8785
+ });
8786
+ json$1.additionalProperties = this.process(def.valueType, {
8787
+ ...params,
8788
+ path: [...params.path, "additionalProperties"]
8789
+ });
8790
+ break;
8791
+ }
8792
+ case "map": {
8793
+ if (this.unrepresentable === "throw") {
8794
+ throw new Error("Map cannot be represented in JSON Schema");
9129
8795
  }
9130
- case "literal": {
9131
- const json$1 = _json;
9132
- const vals = [];
9133
- for (const val of def.values) {
9134
- if (val === undefined) {
9135
- if (this.unrepresentable === "throw") {
9136
- throw new Error("Literal `undefined` cannot be represented in JSON Schema");
9137
- } else {}
9138
- } else if (typeof val === "bigint") {
9139
- if (this.unrepresentable === "throw") {
9140
- throw new Error("BigInt literals cannot be represented in JSON Schema");
9141
- } else {
9142
- vals.push(Number(val));
9143
- }
9144
- } else {
9145
- vals.push(val);
9146
- }
9147
- }
9148
- if (vals.length === 0) {} else if (vals.length === 1) {
9149
- const val = vals[0];
9150
- json$1.type = val === null ? "null" : typeof val;
9151
- json$1.const = val;
9152
- } else {
9153
- if (vals.every((v) => typeof v === "number")) json$1.type = "number";
9154
- if (vals.every((v) => typeof v === "string")) json$1.type = "string";
9155
- if (vals.every((v) => typeof v === "boolean")) json$1.type = "string";
9156
- if (vals.every((v) => v === null)) json$1.type = "null";
9157
- json$1.enum = vals;
9158
- }
9159
- break;
8796
+ break;
8797
+ }
8798
+ case "set": {
8799
+ if (this.unrepresentable === "throw") {
8800
+ throw new Error("Set cannot be represented in JSON Schema");
9160
8801
  }
9161
- case "file": {
9162
- const json$1 = _json;
9163
- const file$1 = {
9164
- type: "string",
9165
- format: "binary",
9166
- contentEncoding: "binary"
9167
- };
9168
- const { minimum, maximum, mime } = schema._zod.bag;
9169
- if (minimum !== undefined) file$1.minLength = minimum;
9170
- if (maximum !== undefined) file$1.maxLength = maximum;
9171
- if (mime) {
9172
- if (mime.length === 1) {
9173
- file$1.contentMediaType = mime[0];
9174
- Object.assign(json$1, file$1);
8802
+ break;
8803
+ }
8804
+ case "enum": {
8805
+ const json$1 = _json;
8806
+ const values = getEnumValues(def.entries);
8807
+ if (values.every((v) => typeof v === "number")) json$1.type = "number";
8808
+ if (values.every((v) => typeof v === "string")) json$1.type = "string";
8809
+ json$1.enum = values;
8810
+ break;
8811
+ }
8812
+ case "literal": {
8813
+ const json$1 = _json;
8814
+ const vals = [];
8815
+ for (const val of def.values) {
8816
+ if (val === undefined) {
8817
+ if (this.unrepresentable === "throw") {
8818
+ throw new Error("Literal `undefined` cannot be represented in JSON Schema");
8819
+ } else {}
8820
+ } else if (typeof val === "bigint") {
8821
+ if (this.unrepresentable === "throw") {
8822
+ throw new Error("BigInt literals cannot be represented in JSON Schema");
9175
8823
  } else {
9176
- json$1.anyOf = mime.map((m) => {
9177
- const mFile = {
9178
- ...file$1,
9179
- contentMediaType: m
9180
- };
9181
- return mFile;
9182
- });
8824
+ vals.push(Number(val));
9183
8825
  }
9184
8826
  } else {
9185
- Object.assign(json$1, file$1);
9186
- }
9187
- break;
9188
- }
9189
- case "transform": {
9190
- if (this.unrepresentable === "throw") {
9191
- throw new Error("Transforms cannot be represented in JSON Schema");
8827
+ vals.push(val);
9192
8828
  }
9193
- break;
9194
8829
  }
9195
- case "nullable": {
9196
- const inner = this.process(def.innerType, params);
9197
- _json.anyOf = [inner, { type: "null" }];
9198
- break;
9199
- }
9200
- case "nonoptional": {
9201
- this.process(def.innerType, params);
9202
- result.ref = def.innerType;
9203
- break;
9204
- }
9205
- case "success": {
9206
- const json$1 = _json;
9207
- json$1.type = "boolean";
9208
- break;
9209
- }
9210
- case "default": {
9211
- this.process(def.innerType, params);
9212
- result.ref = def.innerType;
9213
- _json.default = JSON.parse(JSON.stringify(def.defaultValue));
9214
- break;
9215
- }
9216
- case "prefault": {
9217
- this.process(def.innerType, params);
9218
- result.ref = def.innerType;
9219
- if (this.io === "input") _json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
9220
- break;
9221
- }
9222
- case "catch": {
9223
- this.process(def.innerType, params);
9224
- result.ref = def.innerType;
9225
- let catchValue;
9226
- try {
9227
- catchValue = def.catchValue(undefined);
9228
- } catch {
9229
- throw new Error("Dynamic catch values are not supported in JSON Schema");
9230
- }
9231
- _json.default = catchValue;
9232
- break;
8830
+ if (vals.length === 0) {} else if (vals.length === 1) {
8831
+ const val = vals[0];
8832
+ json$1.type = val === null ? "null" : typeof val;
8833
+ json$1.const = val;
8834
+ } else {
8835
+ if (vals.every((v) => typeof v === "number")) json$1.type = "number";
8836
+ if (vals.every((v) => typeof v === "string")) json$1.type = "string";
8837
+ if (vals.every((v) => typeof v === "boolean")) json$1.type = "string";
8838
+ if (vals.every((v) => v === null)) json$1.type = "null";
8839
+ json$1.enum = vals;
9233
8840
  }
9234
- case "nan": {
9235
- if (this.unrepresentable === "throw") {
9236
- throw new Error("NaN cannot be represented in JSON Schema");
8841
+ break;
8842
+ }
8843
+ case "file": {
8844
+ const json$1 = _json;
8845
+ const file$1 = {
8846
+ type: "string",
8847
+ format: "binary",
8848
+ contentEncoding: "binary"
8849
+ };
8850
+ const { minimum, maximum, mime } = schema._zod.bag;
8851
+ if (minimum !== undefined) file$1.minLength = minimum;
8852
+ if (maximum !== undefined) file$1.maxLength = maximum;
8853
+ if (mime) {
8854
+ if (mime.length === 1) {
8855
+ file$1.contentMediaType = mime[0];
8856
+ Object.assign(json$1, file$1);
8857
+ } else {
8858
+ json$1.anyOf = mime.map((m) => {
8859
+ const mFile = {
8860
+ ...file$1,
8861
+ contentMediaType: m
8862
+ };
8863
+ return mFile;
8864
+ });
9237
8865
  }
9238
- break;
9239
- }
9240
- case "template_literal": {
9241
- const json$1 = _json;
9242
- const pattern = schema._zod.pattern;
9243
- if (!pattern) throw new Error("Pattern not found in template literal");
9244
- json$1.type = "string";
9245
- json$1.pattern = pattern.source;
9246
- break;
9247
- }
9248
- case "pipe": {
9249
- const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
9250
- this.process(innerType, params);
9251
- result.ref = innerType;
9252
- break;
9253
- }
9254
- case "readonly": {
9255
- this.process(def.innerType, params);
9256
- result.ref = def.innerType;
9257
- _json.readOnly = true;
9258
- break;
9259
- }
9260
- case "promise": {
9261
- this.process(def.innerType, params);
9262
- result.ref = def.innerType;
9263
- break;
8866
+ } else {
8867
+ Object.assign(json$1, file$1);
9264
8868
  }
9265
- case "optional": {
9266
- this.process(def.innerType, params);
9267
- result.ref = def.innerType;
9268
- break;
8869
+ break;
8870
+ }
8871
+ case "transform": {
8872
+ if (this.unrepresentable === "throw") {
8873
+ throw new Error("Transforms cannot be represented in JSON Schema");
9269
8874
  }
9270
- case "lazy": {
9271
- const innerType = schema._zod.innerType;
9272
- this.process(innerType, params);
9273
- result.ref = innerType;
9274
- break;
8875
+ break;
8876
+ }
8877
+ case "nullable": {
8878
+ const inner = this.process(def.innerType, params);
8879
+ _json.anyOf = [inner, { type: "null" }];
8880
+ break;
8881
+ }
8882
+ case "nonoptional": {
8883
+ this.process(def.innerType, params);
8884
+ result.ref = def.innerType;
8885
+ break;
8886
+ }
8887
+ case "success": {
8888
+ const json$1 = _json;
8889
+ json$1.type = "boolean";
8890
+ break;
8891
+ }
8892
+ case "default": {
8893
+ this.process(def.innerType, params);
8894
+ result.ref = def.innerType;
8895
+ _json.default = def.defaultValue;
8896
+ break;
8897
+ }
8898
+ case "prefault": {
8899
+ this.process(def.innerType, params);
8900
+ result.ref = def.innerType;
8901
+ if (this.io === "input") _json._prefault = def.defaultValue;
8902
+ break;
8903
+ }
8904
+ case "catch": {
8905
+ this.process(def.innerType, params);
8906
+ result.ref = def.innerType;
8907
+ let catchValue;
8908
+ try {
8909
+ catchValue = def.catchValue(undefined);
8910
+ } catch {
8911
+ throw new Error("Dynamic catch values are not supported in JSON Schema");
9275
8912
  }
9276
- case "custom": {
9277
- if (this.unrepresentable === "throw") {
9278
- throw new Error("Custom types cannot be represented in JSON Schema");
9279
- }
9280
- break;
8913
+ _json.default = catchValue;
8914
+ break;
8915
+ }
8916
+ case "nan": {
8917
+ if (this.unrepresentable === "throw") {
8918
+ throw new Error("NaN cannot be represented in JSON Schema");
9281
8919
  }
9282
- default: {
9283
- def;
8920
+ break;
8921
+ }
8922
+ case "template_literal": {
8923
+ const json$1 = _json;
8924
+ const pattern = schema._zod.pattern;
8925
+ if (!pattern) throw new Error("Pattern not found in template literal");
8926
+ json$1.type = "string";
8927
+ json$1.pattern = pattern.source;
8928
+ break;
8929
+ }
8930
+ case "pipe": {
8931
+ const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
8932
+ this.process(innerType, params);
8933
+ result.ref = innerType;
8934
+ break;
8935
+ }
8936
+ case "readonly": {
8937
+ this.process(def.innerType, params);
8938
+ result.ref = def.innerType;
8939
+ _json.readOnly = true;
8940
+ break;
8941
+ }
8942
+ case "promise": {
8943
+ this.process(def.innerType, params);
8944
+ result.ref = def.innerType;
8945
+ break;
8946
+ }
8947
+ case "optional": {
8948
+ this.process(def.innerType, params);
8949
+ result.ref = def.innerType;
8950
+ break;
8951
+ }
8952
+ case "lazy": {
8953
+ const innerType = schema._zod.innerType;
8954
+ this.process(innerType, params);
8955
+ result.ref = innerType;
8956
+ break;
8957
+ }
8958
+ case "custom": {
8959
+ if (this.unrepresentable === "throw") {
8960
+ throw new Error("Custom types cannot be represented in JSON Schema");
9284
8961
  }
8962
+ break;
8963
+ }
8964
+ default: {
8965
+ def;
9285
8966
  }
9286
8967
  }
9287
8968
  }
@@ -9308,15 +8989,12 @@ var JSONSchemaGenerator = class {
9308
8989
  const defsSegment = this.target === "draft-2020-12" ? "$defs" : "definitions";
9309
8990
  if (params.external) {
9310
8991
  const externalId = params.external.registry.get(entry[0])?.id;
9311
- const uriGenerator = params.external.uri ?? ((id$1) => id$1);
9312
- if (externalId) {
9313
- return { ref: uriGenerator(externalId) };
9314
- }
8992
+ if (externalId) return { ref: params.external.uri(externalId) };
9315
8993
  const id = entry[1].defId ?? entry[1].schema.id ?? `schema${this.counter++}`;
9316
8994
  entry[1].defId = id;
9317
8995
  return {
9318
8996
  defId: id,
9319
- ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}`
8997
+ ref: `${params.external.uri("__shared")}#/${defsSegment}/${id}`
9320
8998
  };
9321
8999
  }
9322
9000
  if (entry[1] === root) {
@@ -9344,14 +9022,6 @@ var JSONSchemaGenerator = class {
9344
9022
  }
9345
9023
  schema$1.$ref = ref;
9346
9024
  };
9347
- if (params.cycles === "throw") {
9348
- for (const entry of this.seen.entries()) {
9349
- const seen = entry[1];
9350
- if (seen.cycle) {
9351
- throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + "\n\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.");
9352
- }
9353
- }
9354
- }
9355
9025
  for (const entry of this.seen.entries()) {
9356
9026
  const seen = entry[1];
9357
9027
  if (schema === entry[0]) {
@@ -9371,7 +9041,11 @@ var JSONSchemaGenerator = class {
9371
9041
  continue;
9372
9042
  }
9373
9043
  if (seen.cycle) {
9374
- extractToDef(entry);
9044
+ if (params.cycles === "throw") {
9045
+ throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + "\n\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.");
9046
+ } else if (params.cycles === "ref") {
9047
+ extractToDef(entry);
9048
+ }
9375
9049
  continue;
9376
9050
  }
9377
9051
  if (seen.count > 1) {
@@ -9403,8 +9077,7 @@ var JSONSchemaGenerator = class {
9403
9077
  }
9404
9078
  if (!seen.isParent) this.override({
9405
9079
  zodSchema,
9406
- jsonSchema: schema$1,
9407
- path: seen.path ?? []
9080
+ jsonSchema: schema$1
9408
9081
  });
9409
9082
  };
9410
9083
  for (const entry of [...this.seen.entries()].reverse()) {
@@ -9418,11 +9091,6 @@ var JSONSchemaGenerator = class {
9418
9091
  } else {
9419
9092
  console.warn(`Invalid target: ${this.target}`);
9420
9093
  }
9421
- if (params.external?.uri) {
9422
- const id = params.external.registry.get(schema)?.id;
9423
- if (!id) throw new Error("Schema is missing an `id` property");
9424
- result.$id = params.external.uri(id);
9425
- }
9426
9094
  Object.assign(result, root.def);
9427
9095
  const defs = params.external?.defs ?? {};
9428
9096
  for (const entry of this.seen.entries()) {
@@ -9431,13 +9099,11 @@ var JSONSchemaGenerator = class {
9431
9099
  defs[seen.defId] = seen.def;
9432
9100
  }
9433
9101
  }
9434
- if (params.external) {} else {
9435
- if (Object.keys(defs).length > 0) {
9436
- if (this.target === "draft-2020-12") {
9437
- result.$defs = defs;
9438
- } else {
9439
- result.definitions = defs;
9440
- }
9102
+ if (!params.external && Object.keys(defs).length > 0) {
9103
+ if (this.target === "draft-2020-12") {
9104
+ result.$defs = defs;
9105
+ } else {
9106
+ result.definitions = defs;
9441
9107
  }
9442
9108
  }
9443
9109
  try {
@@ -9458,7 +9124,7 @@ function toJSONSchema(input, _params) {
9458
9124
  const schemas = {};
9459
9125
  const external = {
9460
9126
  registry: input,
9461
- uri: _params?.uri,
9127
+ uri: _params?.uri || ((id) => id),
9462
9128
  defs
9463
9129
  };
9464
9130
  for (const entry of input._idmap.entries()) {
@@ -9569,11 +9235,11 @@ function isTransforming(_schema, _ctx) {
9569
9235
  }
9570
9236
 
9571
9237
  //#endregion
9572
- //#region ../../node_modules/zod/v4/core/json-schema.js
9238
+ //#region ../../node_modules/zod/dist/esm/v4/core/json-schema.js
9573
9239
  var json_schema_exports = {};
9574
9240
 
9575
9241
  //#endregion
9576
- //#region ../../node_modules/zod/v4/core/index.js
9242
+ //#region ../../node_modules/zod/dist/esm/v4/core/index.js
9577
9243
  var core_exports = {};
9578
9244
  __export(core_exports, {
9579
9245
  $ZodAny: () => $ZodAny,
@@ -9612,7 +9278,6 @@ __export(core_exports, {
9612
9278
  $ZodCheckStringFormat: () => $ZodCheckStringFormat,
9613
9279
  $ZodCheckUpperCase: () => $ZodCheckUpperCase,
9614
9280
  $ZodCustom: () => $ZodCustom,
9615
- $ZodCustomStringFormat: () => $ZodCustomStringFormat,
9616
9281
  $ZodDate: () => $ZodDate,
9617
9282
  $ZodDefault: () => $ZodDefault,
9618
9283
  $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion,
@@ -9677,8 +9342,6 @@ __export(core_exports, {
9677
9342
  Doc: () => Doc,
9678
9343
  JSONSchema: () => json_schema_exports,
9679
9344
  JSONSchemaGenerator: () => JSONSchemaGenerator,
9680
- NEVER: () => NEVER,
9681
- TimePrecision: () => TimePrecision,
9682
9345
  _any: () => _any,
9683
9346
  _array: () => _array,
9684
9347
  _base64: () => _base64,
@@ -9768,7 +9431,6 @@ __export(core_exports, {
9768
9431
  _size: () => _size,
9769
9432
  _startsWith: () => _startsWith,
9770
9433
  _string: () => _string,
9771
- _stringFormat: () => _stringFormat,
9772
9434
  _stringbool: () => _stringbool,
9773
9435
  _success: () => _success,
9774
9436
  _symbol: () => _symbol,
@@ -9818,7 +9480,7 @@ __export(core_exports, {
9818
9480
  });
9819
9481
 
9820
9482
  //#endregion
9821
- //#region ../../node_modules/zod/v4/classic/iso.js
9483
+ //#region ../../node_modules/zod/dist/esm/v4/classic/iso.js
9822
9484
  var iso_exports = {};
9823
9485
  __export(iso_exports, {
9824
9486
  ZodISODate: () => ZodISODate,
@@ -9860,7 +9522,7 @@ function duration(params) {
9860
9522
  }
9861
9523
 
9862
9524
  //#endregion
9863
- //#region ../../node_modules/zod/v4/classic/errors.js
9525
+ //#region ../../node_modules/zod/dist/esm/v4/classic/errors.js
9864
9526
  const initializer = (inst, issues) => {
9865
9527
  $ZodError.init(inst, issues);
9866
9528
  inst.name = "ZodError";
@@ -9878,14 +9540,14 @@ const ZodError = $constructor("ZodError", initializer);
9878
9540
  const ZodRealError = $constructor("ZodError", initializer, { Parent: Error });
9879
9541
 
9880
9542
  //#endregion
9881
- //#region ../../node_modules/zod/v4/classic/parse.js
9543
+ //#region ../../node_modules/zod/dist/esm/v4/classic/parse.js
9882
9544
  const parse = /* @__PURE__ */ _parse(ZodRealError);
9883
9545
  const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
9884
9546
  const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
9885
9547
  const safeParseAsync = /* @__PURE__ */ _safeParseAsync(ZodRealError);
9886
9548
 
9887
9549
  //#endregion
9888
- //#region ../../node_modules/zod/v4/classic/schemas.js
9550
+ //#region ../../node_modules/zod/dist/esm/v4/classic/schemas.js
9889
9551
  const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
9890
9552
  $ZodType.init(inst, def);
9891
9553
  inst.def = def;
@@ -10153,13 +9815,6 @@ const ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
10153
9815
  function jwt(params) {
10154
9816
  return _jwt(ZodJWT, params);
10155
9817
  }
10156
- const ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => {
10157
- $ZodCustomStringFormat.init(inst, def);
10158
- ZodStringFormat.init(inst, def);
10159
- });
10160
- function stringFormat(format, fnOrRegex, _params = {}) {
10161
- return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
10162
- }
10163
9818
  const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
10164
9819
  $ZodNumber.init(inst, def);
10165
9820
  ZodType.init(inst, def);
@@ -10329,7 +9984,9 @@ function keyof(schema) {
10329
9984
  const ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
10330
9985
  $ZodObject.init(inst, def);
10331
9986
  ZodType.init(inst, def);
10332
- defineLazy(inst, "shape", () => def.shape);
9987
+ defineLazy(inst, "shape", () => {
9988
+ return Object.fromEntries(Object.entries(inst._zod.def.shape));
9989
+ });
10333
9990
  inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
10334
9991
  inst.catchall = (catchall) => inst.clone({
10335
9992
  ...inst._zod.def,
@@ -10774,8 +10431,11 @@ const ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
10774
10431
  $ZodCustom.init(inst, def);
10775
10432
  ZodType.init(inst, def);
10776
10433
  });
10777
- function check(fn) {
10778
- const ch = new $ZodCheck({ check: "custom" });
10434
+ function check(fn, params) {
10435
+ const ch = new $ZodCheck({
10436
+ check: "custom",
10437
+ ...normalizeParams(params)
10438
+ });
10779
10439
  ch._zod.check = fn;
10780
10440
  return ch;
10781
10441
  }
@@ -10785,7 +10445,7 @@ function custom(fn, _params) {
10785
10445
  function refine(fn, _params = {}) {
10786
10446
  return _refine(ZodCustom, fn, _params);
10787
10447
  }
10788
- function superRefine(fn) {
10448
+ function superRefine(fn, params) {
10789
10449
  const ch = check((payload) => {
10790
10450
  payload.addIssue = (issue$1) => {
10791
10451
  if (typeof issue$1 === "string") {
@@ -10801,7 +10461,7 @@ function superRefine(fn) {
10801
10461
  }
10802
10462
  };
10803
10463
  return fn(payload.value, payload);
10804
- });
10464
+ }, params);
10805
10465
  return ch;
10806
10466
  }
10807
10467
  function _instanceof(cls, params = { error: `Input not instance of ${cls.name}` }) {
@@ -10839,7 +10499,7 @@ function preprocess(fn, schema) {
10839
10499
  }
10840
10500
 
10841
10501
  //#endregion
10842
- //#region ../../node_modules/zod/v4/classic/compat.js
10502
+ //#region ../../node_modules/zod/dist/esm/v4/classic/compat.js
10843
10503
  /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
10844
10504
  const ZodIssueCode = {
10845
10505
  invalid_type: "invalid_type",
@@ -10854,6 +10514,10 @@ const ZodIssueCode = {
10854
10514
  invalid_value: "invalid_value",
10855
10515
  custom: "custom"
10856
10516
  };
10517
+ /** @deprecated Not necessary in Zod 4. */
10518
+ const INVALID = Object.freeze({ status: "aborted" });
10519
+ /** A special constant with type `never` */
10520
+ const NEVER = INVALID;
10857
10521
  /** @deprecated Use `z.config(params)` instead. */
10858
10522
  function setErrorMap(map$1) {
10859
10523
  config({ customError: map$1 });
@@ -10864,7 +10528,7 @@ function getErrorMap() {
10864
10528
  }
10865
10529
 
10866
10530
  //#endregion
10867
- //#region ../../node_modules/zod/v4/classic/coerce.js
10531
+ //#region ../../node_modules/zod/dist/esm/v4/classic/coerce.js
10868
10532
  var coerce_exports = {};
10869
10533
  __export(coerce_exports, {
10870
10534
  bigint: () => bigint,
@@ -10890,14 +10554,13 @@ function date(params) {
10890
10554
  }
10891
10555
 
10892
10556
  //#endregion
10893
- //#region ../../node_modules/zod/v4/classic/external.js
10557
+ //#region ../../node_modules/zod/dist/esm/v4/classic/external.js
10894
10558
  var external_exports = {};
10895
10559
  __export(external_exports, {
10896
10560
  $brand: () => $brand,
10897
10561
  $input: () => $input,
10898
10562
  $output: () => $output,
10899
10563
  NEVER: () => NEVER,
10900
- TimePrecision: () => TimePrecision,
10901
10564
  ZodAny: () => ZodAny,
10902
10565
  ZodArray: () => ZodArray,
10903
10566
  ZodBase64: () => ZodBase64,
@@ -10911,7 +10574,6 @@ __export(external_exports, {
10911
10574
  ZodCUID2: () => ZodCUID2,
10912
10575
  ZodCatch: () => ZodCatch,
10913
10576
  ZodCustom: () => ZodCustom,
10914
- ZodCustomStringFormat: () => ZodCustomStringFormat,
10915
10577
  ZodDate: () => ZodDate,
10916
10578
  ZodDefault: () => ZodDefault,
10917
10579
  ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
@@ -11073,7 +10735,6 @@ __export(external_exports, {
11073
10735
  startsWith: () => _startsWith,
11074
10736
  strictObject: () => strictObject,
11075
10737
  string: () => string$1,
11076
- stringFormat: () => stringFormat,
11077
10738
  stringbool: () => stringbool,
11078
10739
  success: () => success,
11079
10740
  superRefine: () => superRefine,
@@ -11104,11 +10765,11 @@ __export(external_exports, {
11104
10765
  config(en_default());
11105
10766
 
11106
10767
  //#endregion
11107
- //#region ../../node_modules/zod/v4/classic/index.js
10768
+ //#region ../../node_modules/zod/dist/esm/v4/classic/index.js
11108
10769
  var classic_default = external_exports;
11109
10770
 
11110
10771
  //#endregion
11111
- //#region ../../node_modules/zod/v4/index.js
10772
+ //#region ../../node_modules/zod/dist/esm/v4/index.js
11112
10773
  var v4_default = classic_default;
11113
10774
 
11114
10775
  //#endregion
@@ -11129,12 +10790,12 @@ var v4_default = classic_default;
11129
10790
  function validate(schema, value) {
11130
10791
  try {
11131
10792
  return schema.parse(value);
11132
- } catch (error$39) {
11133
- if (error$39 instanceof ZodError) {
11134
- const formattedErrors = error$39.issues.map((err) => `- ${err.path.join(".")}: ${err.message}`).join("\n");
11135
- throw new Error(`Validation error${error$39.issues.length > 1 ? "s" : ""}:\n${formattedErrors}`);
10793
+ } catch (error$37) {
10794
+ if (error$37 instanceof ZodError) {
10795
+ const formattedErrors = error$37.issues.map((err) => `- ${err.path.join(".")}: ${err.message}`).join("\n");
10796
+ throw new Error(`Validation error${error$37.issues.length > 1 ? "s" : ""}:\n${formattedErrors}`);
11136
10797
  }
11137
- throw error$39;
10798
+ throw error$37;
11138
10799
  }
11139
10800
  }
11140
10801