@glasstrace/sdk 1.11.0 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +58 -6
  2. package/dist/async-context/index.cjs +1189 -440
  3. package/dist/async-context/index.cjs.map +1 -1
  4. package/dist/async-context/index.js +2 -2
  5. package/dist/{capture-error-BeuEXXJO.d.cts → capture-error-03qDnC5v.d.cts} +2 -2
  6. package/dist/{capture-error-D02pzB7q.d.ts → capture-error-CAfFUyIU.d.ts} +2 -2
  7. package/dist/{chunk-XG6WR2KS.js → chunk-6ST4QV7T.js} +3 -3
  8. package/dist/{chunk-6RKS3DNA.js → chunk-7LE2O4ZJ.js} +1153 -396
  9. package/dist/chunk-7LE2O4ZJ.js.map +1 -0
  10. package/dist/{chunk-RL43PU2X.js → chunk-F7A3QXCT.js} +2 -2
  11. package/dist/{chunk-M5GO2SSO.js → chunk-HMEHYSTS.js} +2 -2
  12. package/dist/{chunk-OXM2BZMF.js → chunk-LQZRGBN5.js} +2 -2
  13. package/dist/{chunk-QVTONMVZ.js → chunk-MP3QNDXQ.js} +2 -2
  14. package/dist/{chunk-D54FMQHF.js → chunk-VMK2G6QR.js} +2 -2
  15. package/dist/{chunk-DQFGNX3H.js → chunk-VWZMG3W2.js} +21 -20
  16. package/dist/chunk-VWZMG3W2.js.map +1 -0
  17. package/dist/{chunk-BSVWJSVX.js → chunk-XMD5OYD6.js} +2 -2
  18. package/dist/{chunk-FQ4SEG6Y.js → chunk-ZIYT2Y4B.js} +3 -3
  19. package/dist/cli/init.cjs +1266 -497
  20. package/dist/cli/init.cjs.map +1 -1
  21. package/dist/cli/init.js +7 -7
  22. package/dist/cli/mcp-add.cjs +1171 -425
  23. package/dist/cli/mcp-add.cjs.map +1 -1
  24. package/dist/cli/mcp-add.js +3 -3
  25. package/dist/cli/uninit.js +3 -3
  26. package/dist/cli/upgrade-instructions.cjs +1 -1
  27. package/dist/cli/upgrade-instructions.js +3 -3
  28. package/dist/cli/validate.cjs +1168 -422
  29. package/dist/cli/validate.cjs.map +1 -1
  30. package/dist/cli/validate.js +2 -2
  31. package/dist/{correlation-id-NAapJ5jn.d.cts → correlation-id-CZ2bstzA.d.cts} +1 -1
  32. package/dist/{correlation-id-B_K8adD6.d.ts → correlation-id-YcfcqOru.d.ts} +1 -1
  33. package/dist/edge-entry.cjs +1197 -448
  34. package/dist/edge-entry.cjs.map +1 -1
  35. package/dist/edge-entry.d.cts +2 -2
  36. package/dist/edge-entry.d.ts +2 -2
  37. package/dist/edge-entry.js +4 -4
  38. package/dist/index.cjs +1352 -555
  39. package/dist/index.cjs.map +1 -1
  40. package/dist/{index.d-CkTf_boH.d.ts → index.d-BQIJ5Dvc.d.cts} +44 -9
  41. package/dist/{index.d-CkTf_boH.d.cts → index.d-BQIJ5Dvc.d.ts} +44 -9
  42. package/dist/index.d.cts +4 -4
  43. package/dist/index.d.ts +4 -4
  44. package/dist/index.js +26 -14
  45. package/dist/index.js.map +1 -1
  46. package/dist/middleware/index.cjs +1192 -443
  47. package/dist/middleware/index.cjs.map +1 -1
  48. package/dist/middleware/index.js +2 -2
  49. package/dist/node-entry.cjs +1323 -550
  50. package/dist/node-entry.cjs.map +1 -1
  51. package/dist/node-entry.d.cts +3 -3
  52. package/dist/node-entry.d.ts +3 -3
  53. package/dist/node-entry.js +7 -7
  54. package/dist/node-subpath.cjs +1168 -422
  55. package/dist/node-subpath.cjs.map +1 -1
  56. package/dist/node-subpath.d.cts +1 -1
  57. package/dist/node-subpath.d.ts +1 -1
  58. package/dist/node-subpath.js +3 -3
  59. package/dist/{source-map-uploader-CLYCE2TZ.js → source-map-uploader-NUONOEJG.js} +3 -3
  60. package/dist/trpc/index.cjs +1187 -438
  61. package/dist/trpc/index.cjs.map +1 -1
  62. package/dist/trpc/index.js +1 -1
  63. package/package.json +2 -2
  64. package/dist/chunk-6RKS3DNA.js.map +0 -1
  65. package/dist/chunk-DQFGNX3H.js.map +0 -1
  66. /package/dist/{chunk-XG6WR2KS.js.map → chunk-6ST4QV7T.js.map} +0 -0
  67. /package/dist/{chunk-RL43PU2X.js.map → chunk-F7A3QXCT.js.map} +0 -0
  68. /package/dist/{chunk-M5GO2SSO.js.map → chunk-HMEHYSTS.js.map} +0 -0
  69. /package/dist/{chunk-OXM2BZMF.js.map → chunk-LQZRGBN5.js.map} +0 -0
  70. /package/dist/{chunk-QVTONMVZ.js.map → chunk-MP3QNDXQ.js.map} +0 -0
  71. /package/dist/{chunk-D54FMQHF.js.map → chunk-VMK2G6QR.js.map} +0 -0
  72. /package/dist/{chunk-BSVWJSVX.js.map → chunk-XMD5OYD6.js.map} +0 -0
  73. /package/dist/{chunk-FQ4SEG6Y.js.map → chunk-ZIYT2Y4B.js.map} +0 -0
  74. /package/dist/{source-map-uploader-CLYCE2TZ.js.map → source-map-uploader-NUONOEJG.js.map} +0 -0
@@ -122,6 +122,7 @@ __export(external_exports, {
122
122
  ZodOptional: () => ZodOptional,
123
123
  ZodPipe: () => ZodPipe,
124
124
  ZodPrefault: () => ZodPrefault,
125
+ ZodPreprocess: () => ZodPreprocess,
125
126
  ZodPromise: () => ZodPromise,
126
127
  ZodReadonly: () => ZodReadonly,
127
128
  ZodRealError: () => ZodRealError,
@@ -200,6 +201,7 @@ __export(external_exports, {
200
201
  int32: () => int32,
201
202
  int64: () => int64,
202
203
  intersection: () => intersection,
204
+ invertCodec: () => invertCodec,
203
205
  ipv4: () => ipv42,
204
206
  ipv6: () => ipv62,
205
207
  iso: () => iso_exports,
@@ -381,6 +383,7 @@ __export(core_exports2, {
381
383
  $ZodOptional: () => $ZodOptional,
382
384
  $ZodPipe: () => $ZodPipe,
383
385
  $ZodPrefault: () => $ZodPrefault,
386
+ $ZodPreprocess: () => $ZodPreprocess,
384
387
  $ZodPromise: () => $ZodPromise,
385
388
  $ZodReadonly: () => $ZodReadonly,
386
389
  $ZodRealError: () => $ZodRealError,
@@ -580,7 +583,8 @@ __export(core_exports2, {
580
583
  });
581
584
 
582
585
  // ../../node_modules/zod/v4/core/core.js
583
- var NEVER = Object.freeze({
586
+ var _a;
587
+ var NEVER = /* @__PURE__ */ Object.freeze({
584
588
  status: "aborted"
585
589
  });
586
590
  // @__NO_SIDE_EFFECTS__
@@ -615,10 +619,10 @@ function $constructor(name, initializer3, params) {
615
619
  }
616
620
  Object.defineProperty(Definition, "name", { value: name });
617
621
  function _(def) {
618
- var _a2;
622
+ var _a3;
619
623
  const inst = params?.Parent ? new Definition() : this;
620
624
  init(inst, def);
621
- (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
625
+ (_a3 = inst._zod).deferred ?? (_a3.deferred = []);
622
626
  for (const fn of inst._zod.deferred) {
623
627
  fn();
624
628
  }
@@ -647,7 +651,8 @@ var $ZodEncodeError = class extends Error {
647
651
  this.name = "ZodEncodeError";
648
652
  }
649
653
  };
650
- var globalConfig = {};
654
+ (_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
655
+ var globalConfig = globalThis.__zod_globalConfig;
651
656
  function config(newConfig) {
652
657
  if (newConfig)
653
658
  Object.assign(globalConfig, newConfig);
@@ -680,6 +685,7 @@ __export(util_exports, {
680
685
  defineLazy: () => defineLazy,
681
686
  esc: () => esc,
682
687
  escapeRegex: () => escapeRegex,
688
+ explicitlyAborted: () => explicitlyAborted,
683
689
  extend: () => extend,
684
690
  finalizeIssue: () => finalizeIssue,
685
691
  floatSafeRemainder: () => floatSafeRemainder,
@@ -768,19 +774,12 @@ function cleanRegex(source) {
768
774
  return source.slice(start, end);
769
775
  }
770
776
  function floatSafeRemainder(val, step) {
771
- const valDecCount = (val.toString().split(".")[1] || "").length;
772
- const stepString = step.toString();
773
- let stepDecCount = (stepString.split(".")[1] || "").length;
774
- if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) {
775
- const match = stepString.match(/\d?e-(\d?)/);
776
- if (match?.[1]) {
777
- stepDecCount = Number.parseInt(match[1]);
778
- }
779
- }
780
- const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
781
- const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
782
- const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
783
- return valInt % stepInt / 10 ** decCount;
777
+ const ratio = val / step;
778
+ const roundedRatio = Math.round(ratio);
779
+ const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
780
+ if (Math.abs(ratio - roundedRatio) < tolerance)
781
+ return 0;
782
+ return ratio - roundedRatio;
784
783
  }
785
784
  var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
786
785
  function defineLazy(object2, key, getter) {
@@ -862,7 +861,10 @@ var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace :
862
861
  function isObject(data) {
863
862
  return typeof data === "object" && data !== null && !Array.isArray(data);
864
863
  }
865
- var allowsEval = cached(() => {
864
+ var allowsEval = /* @__PURE__ */ cached(() => {
865
+ if (globalConfig.jitless) {
866
+ return false;
867
+ }
866
868
  if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
867
869
  return false;
868
870
  }
@@ -895,6 +897,10 @@ function shallowClone(o) {
895
897
  return { ...o };
896
898
  if (Array.isArray(o))
897
899
  return [...o];
900
+ if (o instanceof Map)
901
+ return new Map(o);
902
+ if (o instanceof Set)
903
+ return new Set(o);
898
904
  return o;
899
905
  }
900
906
  function numKeys(data) {
@@ -951,7 +957,14 @@ var getParsedType = (data) => {
951
957
  }
952
958
  };
953
959
  var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
954
- var primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
960
+ var primitiveTypes = /* @__PURE__ */ new Set([
961
+ "string",
962
+ "number",
963
+ "bigint",
964
+ "boolean",
965
+ "symbol",
966
+ "undefined"
967
+ ]);
955
968
  function escapeRegex(str) {
956
969
  return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
957
970
  }
@@ -1120,6 +1133,9 @@ function safeExtend(schema, shape) {
1120
1133
  return clone(schema, def);
1121
1134
  }
1122
1135
  function merge(a, b) {
1136
+ if (a._zod.def.checks?.length) {
1137
+ throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
1138
+ }
1123
1139
  const def = mergeDefs(a._zod.def, {
1124
1140
  get shape() {
1125
1141
  const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
@@ -1129,8 +1145,7 @@ function merge(a, b) {
1129
1145
  get catchall() {
1130
1146
  return b._zod.def.catchall;
1131
1147
  },
1132
- checks: []
1133
- // delete existing checks
1148
+ checks: b._zod.def.checks ?? []
1134
1149
  });
1135
1150
  return clone(a, def);
1136
1151
  }
@@ -1213,10 +1228,20 @@ function aborted(x, startIndex = 0) {
1213
1228
  }
1214
1229
  return false;
1215
1230
  }
1231
+ function explicitlyAborted(x, startIndex = 0) {
1232
+ if (x.aborted === true)
1233
+ return true;
1234
+ for (let i = startIndex; i < x.issues.length; i++) {
1235
+ if (x.issues[i]?.continue === false) {
1236
+ return true;
1237
+ }
1238
+ }
1239
+ return false;
1240
+ }
1216
1241
  function prefixIssues(path3, issues) {
1217
1242
  return issues.map((iss) => {
1218
- var _a2;
1219
- (_a2 = iss).path ?? (_a2.path = []);
1243
+ var _a3;
1244
+ (_a3 = iss).path ?? (_a3.path = []);
1220
1245
  iss.path.unshift(path3);
1221
1246
  return iss;
1222
1247
  });
@@ -1225,17 +1250,14 @@ function unwrapMessage(message) {
1225
1250
  return typeof message === "string" ? message : message?.message;
1226
1251
  }
1227
1252
  function finalizeIssue(iss, ctx, config2) {
1228
- const full = { ...iss, path: iss.path ?? [] };
1229
- if (!iss.message) {
1230
- const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
1231
- full.message = message;
1253
+ const message = iss.message ? iss.message : unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
1254
+ const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
1255
+ rest.path ?? (rest.path = []);
1256
+ rest.message = message;
1257
+ if (ctx?.reportInput) {
1258
+ rest.input = _input;
1232
1259
  }
1233
- delete full.inst;
1234
- delete full.continue;
1235
- if (!ctx?.reportInput) {
1236
- delete full.input;
1237
- }
1238
- return full;
1260
+ return rest;
1239
1261
  }
1240
1262
  function getSizableOrigin(input) {
1241
1263
  if (input instanceof Set)
@@ -1352,10 +1374,10 @@ var initializer = (inst, def) => {
1352
1374
  };
1353
1375
  var $ZodError = $constructor("$ZodError", initializer);
1354
1376
  var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
1355
- function flattenError(error48, mapper = (issue2) => issue2.message) {
1377
+ function flattenError(error51, mapper = (issue2) => issue2.message) {
1356
1378
  const fieldErrors = {};
1357
1379
  const formErrors = [];
1358
- for (const sub of error48.issues) {
1380
+ for (const sub of error51.issues) {
1359
1381
  if (sub.path.length > 0) {
1360
1382
  fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
1361
1383
  fieldErrors[sub.path[0]].push(mapper(sub));
@@ -1365,50 +1387,53 @@ function flattenError(error48, mapper = (issue2) => issue2.message) {
1365
1387
  }
1366
1388
  return { formErrors, fieldErrors };
1367
1389
  }
1368
- function formatError(error48, mapper = (issue2) => issue2.message) {
1390
+ function formatError(error51, mapper = (issue2) => issue2.message) {
1369
1391
  const fieldErrors = { _errors: [] };
1370
- const processError = (error49) => {
1371
- for (const issue2 of error49.issues) {
1392
+ const processError = (error52, path3 = []) => {
1393
+ for (const issue2 of error52.issues) {
1372
1394
  if (issue2.code === "invalid_union" && issue2.errors.length) {
1373
- issue2.errors.map((issues) => processError({ issues }));
1395
+ issue2.errors.map((issues) => processError({ issues }, [...path3, ...issue2.path]));
1374
1396
  } else if (issue2.code === "invalid_key") {
1375
- processError({ issues: issue2.issues });
1397
+ processError({ issues: issue2.issues }, [...path3, ...issue2.path]);
1376
1398
  } else if (issue2.code === "invalid_element") {
1377
- processError({ issues: issue2.issues });
1378
- } else if (issue2.path.length === 0) {
1379
- fieldErrors._errors.push(mapper(issue2));
1399
+ processError({ issues: issue2.issues }, [...path3, ...issue2.path]);
1380
1400
  } else {
1381
- let curr = fieldErrors;
1382
- let i = 0;
1383
- while (i < issue2.path.length) {
1384
- const el = issue2.path[i];
1385
- const terminal = i === issue2.path.length - 1;
1386
- if (!terminal) {
1387
- curr[el] = curr[el] || { _errors: [] };
1388
- } else {
1389
- curr[el] = curr[el] || { _errors: [] };
1390
- curr[el]._errors.push(mapper(issue2));
1401
+ const fullpath = [...path3, ...issue2.path];
1402
+ if (fullpath.length === 0) {
1403
+ fieldErrors._errors.push(mapper(issue2));
1404
+ } else {
1405
+ let curr = fieldErrors;
1406
+ let i = 0;
1407
+ while (i < fullpath.length) {
1408
+ const el = fullpath[i];
1409
+ const terminal = i === fullpath.length - 1;
1410
+ if (!terminal) {
1411
+ curr[el] = curr[el] || { _errors: [] };
1412
+ } else {
1413
+ curr[el] = curr[el] || { _errors: [] };
1414
+ curr[el]._errors.push(mapper(issue2));
1415
+ }
1416
+ curr = curr[el];
1417
+ i++;
1391
1418
  }
1392
- curr = curr[el];
1393
- i++;
1394
1419
  }
1395
1420
  }
1396
1421
  }
1397
1422
  };
1398
- processError(error48);
1423
+ processError(error51);
1399
1424
  return fieldErrors;
1400
1425
  }
1401
- function treeifyError(error48, mapper = (issue2) => issue2.message) {
1426
+ function treeifyError(error51, mapper = (issue2) => issue2.message) {
1402
1427
  const result = { errors: [] };
1403
- const processError = (error49, path3 = []) => {
1404
- var _a2, _b;
1405
- for (const issue2 of error49.issues) {
1428
+ const processError = (error52, path3 = []) => {
1429
+ var _a3, _b;
1430
+ for (const issue2 of error52.issues) {
1406
1431
  if (issue2.code === "invalid_union" && issue2.errors.length) {
1407
- issue2.errors.map((issues) => processError({ issues }, issue2.path));
1432
+ issue2.errors.map((issues) => processError({ issues }, [...path3, ...issue2.path]));
1408
1433
  } else if (issue2.code === "invalid_key") {
1409
- processError({ issues: issue2.issues }, issue2.path);
1434
+ processError({ issues: issue2.issues }, [...path3, ...issue2.path]);
1410
1435
  } else if (issue2.code === "invalid_element") {
1411
- processError({ issues: issue2.issues }, issue2.path);
1436
+ processError({ issues: issue2.issues }, [...path3, ...issue2.path]);
1412
1437
  } else {
1413
1438
  const fullpath = [...path3, ...issue2.path];
1414
1439
  if (fullpath.length === 0) {
@@ -1422,7 +1447,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
1422
1447
  const terminal = i === fullpath.length - 1;
1423
1448
  if (typeof el === "string") {
1424
1449
  curr.properties ?? (curr.properties = {});
1425
- (_a2 = curr.properties)[el] ?? (_a2[el] = { errors: [] });
1450
+ (_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
1426
1451
  curr = curr.properties[el];
1427
1452
  } else {
1428
1453
  curr.items ?? (curr.items = []);
@@ -1437,7 +1462,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
1437
1462
  }
1438
1463
  }
1439
1464
  };
1440
- processError(error48);
1465
+ processError(error51);
1441
1466
  return result;
1442
1467
  }
1443
1468
  function toDotPath(_path) {
@@ -1458,9 +1483,9 @@ function toDotPath(_path) {
1458
1483
  }
1459
1484
  return segs.join("");
1460
1485
  }
1461
- function prettifyError(error48) {
1486
+ function prettifyError(error51) {
1462
1487
  const lines = [];
1463
- const issues = [...error48.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
1488
+ const issues = [...error51.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
1464
1489
  for (const issue2 of issues) {
1465
1490
  lines.push(`\u2716 ${issue2.message}`);
1466
1491
  if (issue2.path?.length)
@@ -1471,7 +1496,7 @@ function prettifyError(error48) {
1471
1496
 
1472
1497
  // ../../node_modules/zod/v4/core/parse.js
1473
1498
  var _parse = (_Err) => (schema, value, _ctx, _params) => {
1474
- const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
1499
+ const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
1475
1500
  const result = schema._zod.run({ value, issues: [] }, ctx);
1476
1501
  if (result instanceof Promise) {
1477
1502
  throw new $ZodAsyncError();
@@ -1485,7 +1510,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
1485
1510
  };
1486
1511
  var parse = /* @__PURE__ */ _parse($ZodRealError);
1487
1512
  var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
1488
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
1513
+ const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
1489
1514
  let result = schema._zod.run({ value, issues: [] }, ctx);
1490
1515
  if (result instanceof Promise)
1491
1516
  result = await result;
@@ -1510,7 +1535,7 @@ var _safeParse = (_Err) => (schema, value, _ctx) => {
1510
1535
  };
1511
1536
  var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
1512
1537
  var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
1513
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
1538
+ const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
1514
1539
  let result = schema._zod.run({ value, issues: [] }, ctx);
1515
1540
  if (result instanceof Promise)
1516
1541
  result = await result;
@@ -1521,7 +1546,7 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
1521
1546
  };
1522
1547
  var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
1523
1548
  var _encode = (_Err) => (schema, value, _ctx) => {
1524
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1549
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1525
1550
  return _parse(_Err)(schema, value, ctx);
1526
1551
  };
1527
1552
  var encode = /* @__PURE__ */ _encode($ZodRealError);
@@ -1530,7 +1555,7 @@ var _decode = (_Err) => (schema, value, _ctx) => {
1530
1555
  };
1531
1556
  var decode = /* @__PURE__ */ _decode($ZodRealError);
1532
1557
  var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
1533
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1558
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1534
1559
  return _parseAsync(_Err)(schema, value, ctx);
1535
1560
  };
1536
1561
  var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
@@ -1539,7 +1564,7 @@ var _decodeAsync = (_Err) => async (schema, value, _ctx) => {
1539
1564
  };
1540
1565
  var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
1541
1566
  var _safeEncode = (_Err) => (schema, value, _ctx) => {
1542
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1567
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1543
1568
  return _safeParse(_Err)(schema, value, ctx);
1544
1569
  };
1545
1570
  var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
@@ -1548,7 +1573,7 @@ var _safeDecode = (_Err) => (schema, value, _ctx) => {
1548
1573
  };
1549
1574
  var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
1550
1575
  var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
1551
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1576
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1552
1577
  return _safeParseAsync(_Err)(schema, value, ctx);
1553
1578
  };
1554
1579
  var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
@@ -1581,6 +1606,7 @@ __export(regexes_exports, {
1581
1606
  hex: () => hex,
1582
1607
  hostname: () => hostname,
1583
1608
  html5Email: () => html5Email,
1609
+ httpProtocol: () => httpProtocol,
1584
1610
  idnEmail: () => idnEmail,
1585
1611
  integer: () => integer,
1586
1612
  ipv4: () => ipv4,
@@ -1619,7 +1645,7 @@ __export(regexes_exports, {
1619
1645
  uuid7: () => uuid7,
1620
1646
  xid: () => xid
1621
1647
  });
1622
- var cuid = /^[cC][^\s-]{8,}$/;
1648
+ var cuid = /^[cC][0-9a-z]{6,}$/;
1623
1649
  var cuid2 = /^[0-9a-z]+$/;
1624
1650
  var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
1625
1651
  var xid = /^[0-9a-vA-V]{20}$/;
@@ -1658,6 +1684,7 @@ var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/
1658
1684
  var base64url = /^[A-Za-z0-9_-]*$/;
1659
1685
  var hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/;
1660
1686
  var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
1687
+ var httpProtocol = /^https?$/;
1661
1688
  var e164 = /^\+[1-9]\d{6,14}$/;
1662
1689
  var 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])))`;
1663
1690
  var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
@@ -1716,10 +1743,10 @@ var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
1716
1743
 
1717
1744
  // ../../node_modules/zod/v4/core/checks.js
1718
1745
  var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
1719
- var _a2;
1746
+ var _a3;
1720
1747
  inst._zod ?? (inst._zod = {});
1721
1748
  inst._zod.def = def;
1722
- (_a2 = inst._zod).onattach ?? (_a2.onattach = []);
1749
+ (_a3 = inst._zod).onattach ?? (_a3.onattach = []);
1723
1750
  });
1724
1751
  var numericOriginMap = {
1725
1752
  number: "number",
@@ -1785,8 +1812,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
1785
1812
  var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
1786
1813
  $ZodCheck.init(inst, def);
1787
1814
  inst._zod.onattach.push((inst2) => {
1788
- var _a2;
1789
- (_a2 = inst2._zod.bag).multipleOf ?? (_a2.multipleOf = def.value);
1815
+ var _a3;
1816
+ (_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
1790
1817
  });
1791
1818
  inst._zod.check = (payload) => {
1792
1819
  if (typeof payload.value !== typeof def.value)
@@ -1919,9 +1946,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
1919
1946
  };
1920
1947
  });
1921
1948
  var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
1922
- var _a2;
1949
+ var _a3;
1923
1950
  $ZodCheck.init(inst, def);
1924
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
1951
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
1925
1952
  const val = payload.value;
1926
1953
  return !nullish(val) && val.size !== void 0;
1927
1954
  });
@@ -1947,9 +1974,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
1947
1974
  };
1948
1975
  });
1949
1976
  var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
1950
- var _a2;
1977
+ var _a3;
1951
1978
  $ZodCheck.init(inst, def);
1952
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
1979
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
1953
1980
  const val = payload.value;
1954
1981
  return !nullish(val) && val.size !== void 0;
1955
1982
  });
@@ -1975,9 +2002,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
1975
2002
  };
1976
2003
  });
1977
2004
  var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
1978
- var _a2;
2005
+ var _a3;
1979
2006
  $ZodCheck.init(inst, def);
1980
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2007
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
1981
2008
  const val = payload.value;
1982
2009
  return !nullish(val) && val.size !== void 0;
1983
2010
  });
@@ -2005,9 +2032,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
2005
2032
  };
2006
2033
  });
2007
2034
  var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
2008
- var _a2;
2035
+ var _a3;
2009
2036
  $ZodCheck.init(inst, def);
2010
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2037
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2011
2038
  const val = payload.value;
2012
2039
  return !nullish(val) && val.length !== void 0;
2013
2040
  });
@@ -2034,9 +2061,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
2034
2061
  };
2035
2062
  });
2036
2063
  var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
2037
- var _a2;
2064
+ var _a3;
2038
2065
  $ZodCheck.init(inst, def);
2039
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2066
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2040
2067
  const val = payload.value;
2041
2068
  return !nullish(val) && val.length !== void 0;
2042
2069
  });
@@ -2063,9 +2090,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
2063
2090
  };
2064
2091
  });
2065
2092
  var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
2066
- var _a2;
2093
+ var _a3;
2067
2094
  $ZodCheck.init(inst, def);
2068
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2095
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2069
2096
  const val = payload.value;
2070
2097
  return !nullish(val) && val.length !== void 0;
2071
2098
  });
@@ -2094,7 +2121,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
2094
2121
  };
2095
2122
  });
2096
2123
  var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
2097
- var _a2, _b;
2124
+ var _a3, _b;
2098
2125
  $ZodCheck.init(inst, def);
2099
2126
  inst._zod.onattach.push((inst2) => {
2100
2127
  const bag = inst2._zod.bag;
@@ -2105,7 +2132,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
2105
2132
  }
2106
2133
  });
2107
2134
  if (def.pattern)
2108
- (_a2 = inst._zod).check ?? (_a2.check = (payload) => {
2135
+ (_a3 = inst._zod).check ?? (_a3.check = (payload) => {
2109
2136
  def.pattern.lastIndex = 0;
2110
2137
  if (def.pattern.test(payload.value))
2111
2138
  return;
@@ -2301,13 +2328,13 @@ var Doc = class {
2301
2328
  // ../../node_modules/zod/v4/core/versions.js
2302
2329
  var version = {
2303
2330
  major: 4,
2304
- minor: 3,
2305
- patch: 6
2331
+ minor: 4,
2332
+ patch: 3
2306
2333
  };
2307
2334
 
2308
2335
  // ../../node_modules/zod/v4/core/schemas.js
2309
2336
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
2310
- var _a2;
2337
+ var _a3;
2311
2338
  inst ?? (inst = {});
2312
2339
  inst._zod.def = def;
2313
2340
  inst._zod.bag = inst._zod.bag || {};
@@ -2322,7 +2349,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
2322
2349
  }
2323
2350
  }
2324
2351
  if (checks.length === 0) {
2325
- (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
2352
+ (_a3 = inst._zod).deferred ?? (_a3.deferred = []);
2326
2353
  inst._zod.deferred?.push(() => {
2327
2354
  inst._zod.run = inst._zod.parse;
2328
2355
  });
@@ -2332,6 +2359,8 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
2332
2359
  let asyncResult;
2333
2360
  for (const ch of checks2) {
2334
2361
  if (ch._zod.def.when) {
2362
+ if (explicitlyAborted(payload))
2363
+ continue;
2335
2364
  const shouldRun = ch._zod.def.when(payload);
2336
2365
  if (!shouldRun)
2337
2366
  continue;
@@ -2472,6 +2501,19 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
2472
2501
  inst._zod.check = (payload) => {
2473
2502
  try {
2474
2503
  const trimmed = payload.value.trim();
2504
+ if (!def.normalize && def.protocol?.source === httpProtocol.source) {
2505
+ if (!/^https?:\/\//i.test(trimmed)) {
2506
+ payload.issues.push({
2507
+ code: "invalid_format",
2508
+ format: "url",
2509
+ note: "Invalid URL format",
2510
+ input: payload.value,
2511
+ inst,
2512
+ continue: !def.abort
2513
+ });
2514
+ return;
2515
+ }
2516
+ }
2475
2517
  const url2 = new URL(trimmed);
2476
2518
  if (def.hostname) {
2477
2519
  def.hostname.lastIndex = 0;
@@ -2625,6 +2667,8 @@ var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
2625
2667
  function isValidBase64(data) {
2626
2668
  if (data === "")
2627
2669
  return true;
2670
+ if (/\s/.test(data))
2671
+ return false;
2628
2672
  if (data.length % 4 !== 0)
2629
2673
  return false;
2630
2674
  try {
@@ -2817,8 +2861,6 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
2817
2861
  $ZodType.init(inst, def);
2818
2862
  inst._zod.pattern = _undefined;
2819
2863
  inst._zod.values = /* @__PURE__ */ new Set([void 0]);
2820
- inst._zod.optin = "optional";
2821
- inst._zod.optout = "optional";
2822
2864
  inst._zod.parse = (payload, _ctx) => {
2823
2865
  const input = payload.value;
2824
2866
  if (typeof input === "undefined")
@@ -2947,15 +2989,27 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
2947
2989
  return payload;
2948
2990
  };
2949
2991
  });
2950
- function handlePropertyResult(result, final, key, input, isOptionalOut) {
2992
+ function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
2993
+ const isPresent = key in input;
2951
2994
  if (result.issues.length) {
2952
- if (isOptionalOut && !(key in input)) {
2995
+ if (isOptionalIn && isOptionalOut && !isPresent) {
2953
2996
  return;
2954
2997
  }
2955
2998
  final.issues.push(...prefixIssues(key, result.issues));
2956
2999
  }
3000
+ if (!isPresent && !isOptionalIn) {
3001
+ if (!result.issues.length) {
3002
+ final.issues.push({
3003
+ code: "invalid_type",
3004
+ expected: "nonoptional",
3005
+ input: void 0,
3006
+ path: [key]
3007
+ });
3008
+ }
3009
+ return;
3010
+ }
2957
3011
  if (result.value === void 0) {
2958
- if (key in input) {
3012
+ if (isPresent) {
2959
3013
  final.value[key] = void 0;
2960
3014
  }
2961
3015
  } else {
@@ -2983,8 +3037,11 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
2983
3037
  const keySet = def.keySet;
2984
3038
  const _catchall = def.catchall._zod;
2985
3039
  const t = _catchall.def.type;
3040
+ const isOptionalIn = _catchall.optin === "optional";
2986
3041
  const isOptionalOut = _catchall.optout === "optional";
2987
3042
  for (const key in input) {
3043
+ if (key === "__proto__")
3044
+ continue;
2988
3045
  if (keySet.has(key))
2989
3046
  continue;
2990
3047
  if (t === "never") {
@@ -2993,9 +3050,9 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
2993
3050
  }
2994
3051
  const r = _catchall.run({ value: input[key], issues: [] }, ctx);
2995
3052
  if (r instanceof Promise) {
2996
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
3053
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
2997
3054
  } else {
2998
- handlePropertyResult(r, payload, key, input, isOptionalOut);
3055
+ handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
2999
3056
  }
3000
3057
  }
3001
3058
  if (unrecognized.length) {
@@ -3061,12 +3118,13 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
3061
3118
  const shape = value.shape;
3062
3119
  for (const key of value.keys) {
3063
3120
  const el = shape[key];
3121
+ const isOptionalIn = el._zod.optin === "optional";
3064
3122
  const isOptionalOut = el._zod.optout === "optional";
3065
3123
  const r = el._zod.run({ value: input[key], issues: [] }, ctx);
3066
3124
  if (r instanceof Promise) {
3067
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
3125
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
3068
3126
  } else {
3069
- handlePropertyResult(r, payload, key, input, isOptionalOut);
3127
+ handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
3070
3128
  }
3071
3129
  }
3072
3130
  if (!catchall) {
@@ -3097,9 +3155,10 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
3097
3155
  const id = ids[key];
3098
3156
  const k = esc(key);
3099
3157
  const schema = shape[key];
3158
+ const isOptionalIn = schema?._zod?.optin === "optional";
3100
3159
  const isOptionalOut = schema?._zod?.optout === "optional";
3101
3160
  doc.write(`const ${id} = ${parseStr(key)};`);
3102
- if (isOptionalOut) {
3161
+ if (isOptionalIn && isOptionalOut) {
3103
3162
  doc.write(`
3104
3163
  if (${id}.issues.length) {
3105
3164
  if (${k} in input) {
@@ -3118,6 +3177,33 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
3118
3177
  newResult[${k}] = ${id}.value;
3119
3178
  }
3120
3179
 
3180
+ `);
3181
+ } else if (!isOptionalIn) {
3182
+ doc.write(`
3183
+ const ${id}_present = ${k} in input;
3184
+ if (${id}.issues.length) {
3185
+ payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
3186
+ ...iss,
3187
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
3188
+ })));
3189
+ }
3190
+ if (!${id}_present && !${id}.issues.length) {
3191
+ payload.issues.push({
3192
+ code: "invalid_type",
3193
+ expected: "nonoptional",
3194
+ input: undefined,
3195
+ path: [${k}]
3196
+ });
3197
+ }
3198
+
3199
+ if (${id}_present) {
3200
+ if (${id}.value === undefined) {
3201
+ newResult[${k}] = undefined;
3202
+ } else {
3203
+ newResult[${k}] = ${id}.value;
3204
+ }
3205
+ }
3206
+
3121
3207
  `);
3122
3208
  } else {
3123
3209
  doc.write(`
@@ -3211,10 +3297,9 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
3211
3297
  }
3212
3298
  return void 0;
3213
3299
  });
3214
- const single = def.options.length === 1;
3215
- const first = def.options[0]._zod.run;
3300
+ const first = def.options.length === 1 ? def.options[0]._zod.run : null;
3216
3301
  inst._zod.parse = (payload, ctx) => {
3217
- if (single) {
3302
+ if (first) {
3218
3303
  return first(payload, ctx);
3219
3304
  }
3220
3305
  let async = false;
@@ -3267,10 +3352,9 @@ function handleExclusiveUnionResults(results, final, inst, ctx) {
3267
3352
  var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
3268
3353
  $ZodUnion.init(inst, def);
3269
3354
  def.inclusive = false;
3270
- const single = def.options.length === 1;
3271
- const first = def.options[0]._zod.run;
3355
+ const first = def.options.length === 1 ? def.options[0]._zod.run : null;
3272
3356
  inst._zod.parse = (payload, ctx) => {
3273
- if (single) {
3357
+ if (first) {
3274
3358
  return first(payload, ctx);
3275
3359
  }
3276
3360
  let async = false;
@@ -3345,7 +3429,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
3345
3429
  if (opt) {
3346
3430
  return opt._zod.run(payload, ctx);
3347
3431
  }
3348
- if (def.unionFallback) {
3432
+ if (def.unionFallback || ctx.direction === "backward") {
3349
3433
  return _super(payload, ctx);
3350
3434
  }
3351
3435
  payload.issues.push({
@@ -3353,6 +3437,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
3353
3437
  errors: [],
3354
3438
  note: "No matching discriminator",
3355
3439
  discriminator: def.discriminator,
3440
+ options: Array.from(disc.value.keys()),
3356
3441
  input,
3357
3442
  path: [def.discriminator],
3358
3443
  inst
@@ -3474,64 +3559,96 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
3474
3559
  }
3475
3560
  payload.value = [];
3476
3561
  const proms = [];
3477
- const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
3478
- const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;
3562
+ const optinStart = getTupleOptStart(items, "optin");
3563
+ const optoutStart = getTupleOptStart(items, "optout");
3479
3564
  if (!def.rest) {
3480
- const tooBig = input.length > items.length;
3481
- const tooSmall = input.length < optStart - 1;
3482
- if (tooBig || tooSmall) {
3565
+ if (input.length < optinStart) {
3483
3566
  payload.issues.push({
3484
- ...tooBig ? { code: "too_big", maximum: items.length, inclusive: true } : { code: "too_small", minimum: items.length },
3567
+ code: "too_small",
3568
+ minimum: optinStart,
3569
+ inclusive: true,
3485
3570
  input,
3486
3571
  inst,
3487
3572
  origin: "array"
3488
3573
  });
3489
3574
  return payload;
3490
3575
  }
3491
- }
3492
- let i = -1;
3493
- for (const item of items) {
3494
- i++;
3495
- if (i >= input.length) {
3496
- if (i >= optStart)
3497
- continue;
3576
+ if (input.length > items.length) {
3577
+ payload.issues.push({
3578
+ code: "too_big",
3579
+ maximum: items.length,
3580
+ inclusive: true,
3581
+ input,
3582
+ inst,
3583
+ origin: "array"
3584
+ });
3498
3585
  }
3499
- const result = item._zod.run({
3500
- value: input[i],
3501
- issues: []
3502
- }, ctx);
3503
- if (result instanceof Promise) {
3504
- proms.push(result.then((result2) => handleTupleResult(result2, payload, i)));
3586
+ }
3587
+ const itemResults = new Array(items.length);
3588
+ for (let i = 0; i < items.length; i++) {
3589
+ const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
3590
+ if (r instanceof Promise) {
3591
+ proms.push(r.then((rr) => {
3592
+ itemResults[i] = rr;
3593
+ }));
3505
3594
  } else {
3506
- handleTupleResult(result, payload, i);
3595
+ itemResults[i] = r;
3507
3596
  }
3508
3597
  }
3509
3598
  if (def.rest) {
3599
+ let i = items.length - 1;
3510
3600
  const rest = input.slice(items.length);
3511
3601
  for (const el of rest) {
3512
3602
  i++;
3513
- const result = def.rest._zod.run({
3514
- value: el,
3515
- issues: []
3516
- }, ctx);
3603
+ const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
3517
3604
  if (result instanceof Promise) {
3518
- proms.push(result.then((result2) => handleTupleResult(result2, payload, i)));
3605
+ proms.push(result.then((r) => handleTupleResult(r, payload, i)));
3519
3606
  } else {
3520
3607
  handleTupleResult(result, payload, i);
3521
3608
  }
3522
3609
  }
3523
3610
  }
3524
- if (proms.length)
3525
- return Promise.all(proms).then(() => payload);
3526
- return payload;
3611
+ if (proms.length) {
3612
+ return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
3613
+ }
3614
+ return handleTupleResults(itemResults, payload, items, input, optoutStart);
3527
3615
  };
3528
3616
  });
3617
+ function getTupleOptStart(items, key) {
3618
+ for (let i = items.length - 1; i >= 0; i--) {
3619
+ if (items[i]._zod[key] !== "optional")
3620
+ return i + 1;
3621
+ }
3622
+ return 0;
3623
+ }
3529
3624
  function handleTupleResult(result, final, index) {
3530
3625
  if (result.issues.length) {
3531
3626
  final.issues.push(...prefixIssues(index, result.issues));
3532
3627
  }
3533
3628
  final.value[index] = result.value;
3534
3629
  }
3630
+ function handleTupleResults(itemResults, final, items, input, optoutStart) {
3631
+ for (let i = 0; i < items.length; i++) {
3632
+ const r = itemResults[i];
3633
+ const isPresent = i < input.length;
3634
+ if (r.issues.length) {
3635
+ if (!isPresent && i >= optoutStart) {
3636
+ final.value.length = i;
3637
+ break;
3638
+ }
3639
+ final.issues.push(...prefixIssues(i, r.issues));
3640
+ }
3641
+ final.value[i] = r.value;
3642
+ }
3643
+ for (let i = final.value.length - 1; i >= input.length; i--) {
3644
+ if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
3645
+ final.value.length = i;
3646
+ } else {
3647
+ break;
3648
+ }
3649
+ }
3650
+ return final;
3651
+ }
3535
3652
  var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3536
3653
  $ZodType.init(inst, def);
3537
3654
  inst._zod.parse = (payload, ctx) => {
@@ -3553,19 +3670,35 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3553
3670
  for (const key of values) {
3554
3671
  if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
3555
3672
  recordKeys.add(typeof key === "number" ? key.toString() : key);
3673
+ const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
3674
+ if (keyResult instanceof Promise) {
3675
+ throw new Error("Async schemas not supported in object keys currently");
3676
+ }
3677
+ if (keyResult.issues.length) {
3678
+ payload.issues.push({
3679
+ code: "invalid_key",
3680
+ origin: "record",
3681
+ issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
3682
+ input: key,
3683
+ path: [key],
3684
+ inst
3685
+ });
3686
+ continue;
3687
+ }
3688
+ const outKey = keyResult.value;
3556
3689
  const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
3557
3690
  if (result instanceof Promise) {
3558
3691
  proms.push(result.then((result2) => {
3559
3692
  if (result2.issues.length) {
3560
3693
  payload.issues.push(...prefixIssues(key, result2.issues));
3561
3694
  }
3562
- payload.value[key] = result2.value;
3695
+ payload.value[outKey] = result2.value;
3563
3696
  }));
3564
3697
  } else {
3565
3698
  if (result.issues.length) {
3566
3699
  payload.issues.push(...prefixIssues(key, result.issues));
3567
3700
  }
3568
- payload.value[key] = result.value;
3701
+ payload.value[outKey] = result.value;
3569
3702
  }
3570
3703
  }
3571
3704
  }
@@ -3589,6 +3722,8 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3589
3722
  for (const key of Reflect.ownKeys(input)) {
3590
3723
  if (key === "__proto__")
3591
3724
  continue;
3725
+ if (!Object.prototype.propertyIsEnumerable.call(input, key))
3726
+ continue;
3592
3727
  let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
3593
3728
  if (keyResult instanceof Promise) {
3594
3729
  throw new Error("Async schemas not supported in object keys currently");
@@ -3793,6 +3928,7 @@ var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
3793
3928
  });
3794
3929
  var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
3795
3930
  $ZodType.init(inst, def);
3931
+ inst._zod.optin = "optional";
3796
3932
  inst._zod.parse = (payload, ctx) => {
3797
3933
  if (ctx.direction === "backward") {
3798
3934
  throw new $ZodEncodeError(inst.constructor.name);
@@ -3802,6 +3938,7 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
3802
3938
  const output = _out instanceof Promise ? _out : Promise.resolve(_out);
3803
3939
  return output.then((output2) => {
3804
3940
  payload.value = output2;
3941
+ payload.fallback = true;
3805
3942
  return payload;
3806
3943
  });
3807
3944
  }
@@ -3809,11 +3946,12 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
3809
3946
  throw new $ZodAsyncError();
3810
3947
  }
3811
3948
  payload.value = _out;
3949
+ payload.fallback = true;
3812
3950
  return payload;
3813
3951
  };
3814
3952
  });
3815
3953
  function handleOptionalResult(result, input) {
3816
- if (result.issues.length && input === void 0) {
3954
+ if (input === void 0 && (result.issues.length || result.fallback)) {
3817
3955
  return { issues: [], value: void 0 };
3818
3956
  }
3819
3957
  return result;
@@ -3831,10 +3969,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
3831
3969
  });
3832
3970
  inst._zod.parse = (payload, ctx) => {
3833
3971
  if (def.innerType._zod.optin === "optional") {
3972
+ const input = payload.value;
3834
3973
  const result = def.innerType._zod.run(payload, ctx);
3835
3974
  if (result instanceof Promise)
3836
- return result.then((r) => handleOptionalResult(r, payload.value));
3837
- return handleOptionalResult(result, payload.value);
3975
+ return result.then((r) => handleOptionalResult(r, input));
3976
+ return handleOptionalResult(result, input);
3838
3977
  }
3839
3978
  if (payload.value === void 0) {
3840
3979
  return payload;
@@ -3950,7 +4089,7 @@ var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
3950
4089
  });
3951
4090
  var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
3952
4091
  $ZodType.init(inst, def);
3953
- defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
4092
+ inst._zod.optin = "optional";
3954
4093
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
3955
4094
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3956
4095
  inst._zod.parse = (payload, ctx) => {
@@ -3970,6 +4109,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
3970
4109
  input: payload.value
3971
4110
  });
3972
4111
  payload.issues = [];
4112
+ payload.fallback = true;
3973
4113
  }
3974
4114
  return payload;
3975
4115
  });
@@ -3984,6 +4124,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
3984
4124
  input: payload.value
3985
4125
  });
3986
4126
  payload.issues = [];
4127
+ payload.fallback = true;
3987
4128
  }
3988
4129
  return payload;
3989
4130
  };
@@ -4029,7 +4170,7 @@ function handlePipeResult(left, next, ctx) {
4029
4170
  left.aborted = true;
4030
4171
  return left;
4031
4172
  }
4032
- return next._zod.run({ value: left.value, issues: left.issues }, ctx);
4173
+ return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
4033
4174
  }
4034
4175
  var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
4035
4176
  $ZodType.init(inst, def);
@@ -4081,6 +4222,9 @@ function handleCodecTxResult(left, value, nextSchema, ctx) {
4081
4222
  }
4082
4223
  return nextSchema._zod.run({ value, issues: left.issues }, ctx);
4083
4224
  }
4225
+ var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
4226
+ $ZodPipe.init(inst, def);
4227
+ });
4084
4228
  var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
4085
4229
  $ZodType.init(inst, def);
4086
4230
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
@@ -4232,7 +4376,12 @@ var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => {
4232
4376
  });
4233
4377
  var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
4234
4378
  $ZodType.init(inst, def);
4235
- defineLazy(inst._zod, "innerType", () => def.getter());
4379
+ defineLazy(inst._zod, "innerType", () => {
4380
+ const d = def;
4381
+ if (!d._cachedInner)
4382
+ d._cachedInner = def.getter();
4383
+ return d._cachedInner;
4384
+ });
4236
4385
  defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
4237
4386
  defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
4238
4387
  defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
@@ -4287,6 +4436,7 @@ __export(locales_exports, {
4287
4436
  cs: () => cs_default,
4288
4437
  da: () => da_default,
4289
4438
  de: () => de_default,
4439
+ el: () => el_default,
4290
4440
  en: () => en_default,
4291
4441
  eo: () => eo_default,
4292
4442
  es: () => es_default,
@@ -4295,6 +4445,7 @@ __export(locales_exports, {
4295
4445
  fr: () => fr_default,
4296
4446
  frCA: () => fr_CA_default,
4297
4447
  he: () => he_default,
4448
+ hr: () => hr_default,
4298
4449
  hu: () => hu_default,
4299
4450
  hy: () => hy_default,
4300
4451
  id: () => id_default,
@@ -4314,6 +4465,7 @@ __export(locales_exports, {
4314
4465
  pl: () => pl_default,
4315
4466
  ps: () => ps_default,
4316
4467
  pt: () => pt_default,
4468
+ ro: () => ro_default,
4317
4469
  ru: () => ru_default,
4318
4470
  sl: () => sl_default,
4319
4471
  sv: () => sv_default,
@@ -5267,8 +5419,118 @@ function de_default() {
5267
5419
  };
5268
5420
  }
5269
5421
 
5270
- // ../../node_modules/zod/v4/locales/en.js
5422
+ // ../../node_modules/zod/v4/locales/el.js
5271
5423
  var error9 = () => {
5424
+ const Sizable = {
5425
+ string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5426
+ file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5427
+ array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5428
+ set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5429
+ map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
5430
+ };
5431
+ function getSizing(origin) {
5432
+ return Sizable[origin] ?? null;
5433
+ }
5434
+ const FormatDictionary = {
5435
+ regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
5436
+ email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
5437
+ url: "URL",
5438
+ emoji: "emoji",
5439
+ uuid: "UUID",
5440
+ uuidv4: "UUIDv4",
5441
+ uuidv6: "UUIDv6",
5442
+ nanoid: "nanoid",
5443
+ guid: "GUID",
5444
+ cuid: "cuid",
5445
+ cuid2: "cuid2",
5446
+ ulid: "ULID",
5447
+ xid: "XID",
5448
+ ksuid: "KSUID",
5449
+ datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
5450
+ date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
5451
+ time: "ISO \u03CE\u03C1\u03B1",
5452
+ duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
5453
+ ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
5454
+ ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
5455
+ mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
5456
+ cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
5457
+ cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
5458
+ base64: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",
5459
+ base64url: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",
5460
+ json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
5461
+ e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
5462
+ jwt: "JWT",
5463
+ template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
5464
+ };
5465
+ const TypeDictionary = {
5466
+ nan: "NaN"
5467
+ };
5468
+ return (issue2) => {
5469
+ switch (issue2.code) {
5470
+ case "invalid_type": {
5471
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
5472
+ const receivedType = parsedType(issue2.input);
5473
+ const received = TypeDictionary[receivedType] ?? receivedType;
5474
+ if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
5475
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${issue2.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`;
5476
+ }
5477
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`;
5478
+ }
5479
+ case "invalid_value":
5480
+ if (issue2.values.length === 1)
5481
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${stringifyPrimitive(issue2.values[0])}`;
5482
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${joinValues(issue2.values, "|")}`;
5483
+ case "too_big": {
5484
+ const adj = issue2.inclusive ? "<=" : "<";
5485
+ const sizing = getSizing(issue2.origin);
5486
+ if (sizing)
5487
+ return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`;
5488
+ return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue2.maximum.toString()}`;
5489
+ }
5490
+ case "too_small": {
5491
+ const adj = issue2.inclusive ? ">=" : ">";
5492
+ const sizing = getSizing(issue2.origin);
5493
+ if (sizing) {
5494
+ return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
5495
+ }
5496
+ return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue2.minimum.toString()}`;
5497
+ }
5498
+ case "invalid_format": {
5499
+ const _issue = issue2;
5500
+ if (_issue.format === "starts_with") {
5501
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${_issue.prefix}"`;
5502
+ }
5503
+ if (_issue.format === "ends_with")
5504
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${_issue.suffix}"`;
5505
+ if (_issue.format === "includes")
5506
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${_issue.includes}"`;
5507
+ if (_issue.format === "regex")
5508
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${_issue.pattern}`;
5509
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
5510
+ }
5511
+ case "not_multiple_of":
5512
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${issue2.divisor}`;
5513
+ case "unrecognized_keys":
5514
+ return `\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${issue2.keys.length > 1 ? "\u03B1" : "\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${issue2.keys.length > 1 ? "\u03B9\u03AC" : "\u03AF"}: ${joinValues(issue2.keys, ", ")}`;
5515
+ case "invalid_key":
5516
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
5517
+ case "invalid_union":
5518
+ return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
5519
+ case "invalid_element":
5520
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
5521
+ default:
5522
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
5523
+ }
5524
+ };
5525
+ };
5526
+ function el_default() {
5527
+ return {
5528
+ localeError: error9()
5529
+ };
5530
+ }
5531
+
5532
+ // ../../node_modules/zod/v4/locales/en.js
5533
+ var error10 = () => {
5272
5534
  const Sizable = {
5273
5535
  string: { unit: "characters", verb: "to have" },
5274
5536
  file: { unit: "bytes", verb: "to have" },
@@ -5362,6 +5624,10 @@ var error9 = () => {
5362
5624
  case "invalid_key":
5363
5625
  return `Invalid key in ${issue2.origin}`;
5364
5626
  case "invalid_union":
5627
+ if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
5628
+ const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
5629
+ return `Invalid discriminator value. Expected ${opts}`;
5630
+ }
5365
5631
  return "Invalid input";
5366
5632
  case "invalid_element":
5367
5633
  return `Invalid value in ${issue2.origin}`;
@@ -5372,12 +5638,12 @@ var error9 = () => {
5372
5638
  };
5373
5639
  function en_default() {
5374
5640
  return {
5375
- localeError: error9()
5641
+ localeError: error10()
5376
5642
  };
5377
5643
  }
5378
5644
 
5379
5645
  // ../../node_modules/zod/v4/locales/eo.js
5380
- var error10 = () => {
5646
+ var error11 = () => {
5381
5647
  const Sizable = {
5382
5648
  string: { unit: "karaktrojn", verb: "havi" },
5383
5649
  file: { unit: "bajtojn", verb: "havi" },
@@ -5482,12 +5748,12 @@ var error10 = () => {
5482
5748
  };
5483
5749
  function eo_default() {
5484
5750
  return {
5485
- localeError: error10()
5751
+ localeError: error11()
5486
5752
  };
5487
5753
  }
5488
5754
 
5489
5755
  // ../../node_modules/zod/v4/locales/es.js
5490
- var error11 = () => {
5756
+ var error12 = () => {
5491
5757
  const Sizable = {
5492
5758
  string: { unit: "caracteres", verb: "tener" },
5493
5759
  file: { unit: "bytes", verb: "tener" },
@@ -5615,12 +5881,12 @@ var error11 = () => {
5615
5881
  };
5616
5882
  function es_default() {
5617
5883
  return {
5618
- localeError: error11()
5884
+ localeError: error12()
5619
5885
  };
5620
5886
  }
5621
5887
 
5622
5888
  // ../../node_modules/zod/v4/locales/fa.js
5623
- var error12 = () => {
5889
+ var error13 = () => {
5624
5890
  const Sizable = {
5625
5891
  string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
5626
5892
  file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
@@ -5730,12 +5996,12 @@ var error12 = () => {
5730
5996
  };
5731
5997
  function fa_default() {
5732
5998
  return {
5733
- localeError: error12()
5999
+ localeError: error13()
5734
6000
  };
5735
6001
  }
5736
6002
 
5737
6003
  // ../../node_modules/zod/v4/locales/fi.js
5738
- var error13 = () => {
6004
+ var error14 = () => {
5739
6005
  const Sizable = {
5740
6006
  string: { unit: "merkki\xE4", subject: "merkkijonon" },
5741
6007
  file: { unit: "tavua", subject: "tiedoston" },
@@ -5843,12 +6109,12 @@ var error13 = () => {
5843
6109
  };
5844
6110
  function fi_default() {
5845
6111
  return {
5846
- localeError: error13()
6112
+ localeError: error14()
5847
6113
  };
5848
6114
  }
5849
6115
 
5850
6116
  // ../../node_modules/zod/v4/locales/fr.js
5851
- var error14 = () => {
6117
+ var error15 = () => {
5852
6118
  const Sizable = {
5853
6119
  string: { unit: "caract\xE8res", verb: "avoir" },
5854
6120
  file: { unit: "octets", verb: "avoir" },
@@ -5889,9 +6155,27 @@ var error14 = () => {
5889
6155
  template_literal: "entr\xE9e"
5890
6156
  };
5891
6157
  const TypeDictionary = {
5892
- nan: "NaN",
6158
+ string: "cha\xEEne",
5893
6159
  number: "nombre",
5894
- array: "tableau"
6160
+ int: "entier",
6161
+ boolean: "bool\xE9en",
6162
+ bigint: "grand entier",
6163
+ symbol: "symbole",
6164
+ undefined: "ind\xE9fini",
6165
+ null: "null",
6166
+ never: "jamais",
6167
+ void: "vide",
6168
+ date: "date",
6169
+ array: "tableau",
6170
+ object: "objet",
6171
+ tuple: "tuple",
6172
+ record: "enregistrement",
6173
+ map: "carte",
6174
+ set: "ensemble",
6175
+ file: "fichier",
6176
+ nonoptional: "non-optionnel",
6177
+ nan: "NaN",
6178
+ function: "fonction"
5895
6179
  };
5896
6180
  return (issue2) => {
5897
6181
  switch (issue2.code) {
@@ -5912,16 +6196,15 @@ var error14 = () => {
5912
6196
  const adj = issue2.inclusive ? "<=" : "<";
5913
6197
  const sizing = getSizing(issue2.origin);
5914
6198
  if (sizing)
5915
- return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
5916
- return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
6199
+ return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
6200
+ return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
5917
6201
  }
5918
6202
  case "too_small": {
5919
6203
  const adj = issue2.inclusive ? ">=" : ">";
5920
6204
  const sizing = getSizing(issue2.origin);
5921
- if (sizing) {
5922
- return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
5923
- }
5924
- return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
6205
+ if (sizing)
6206
+ return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
6207
+ return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
5925
6208
  }
5926
6209
  case "invalid_format": {
5927
6210
  const _issue = issue2;
@@ -5952,12 +6235,12 @@ var error14 = () => {
5952
6235
  };
5953
6236
  function fr_default() {
5954
6237
  return {
5955
- localeError: error14()
6238
+ localeError: error15()
5956
6239
  };
5957
6240
  }
5958
6241
 
5959
6242
  // ../../node_modules/zod/v4/locales/fr-CA.js
5960
- var error15 = () => {
6243
+ var error16 = () => {
5961
6244
  const Sizable = {
5962
6245
  string: { unit: "caract\xE8res", verb: "avoir" },
5963
6246
  file: { unit: "octets", verb: "avoir" },
@@ -6060,12 +6343,12 @@ var error15 = () => {
6060
6343
  };
6061
6344
  function fr_CA_default() {
6062
6345
  return {
6063
- localeError: error15()
6346
+ localeError: error16()
6064
6347
  };
6065
6348
  }
6066
6349
 
6067
6350
  // ../../node_modules/zod/v4/locales/he.js
6068
- var error16 = () => {
6351
+ var error17 = () => {
6069
6352
  const TypeNames = {
6070
6353
  string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
6071
6354
  number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
@@ -6255,24 +6538,24 @@ var error16 = () => {
6255
6538
  };
6256
6539
  function he_default() {
6257
6540
  return {
6258
- localeError: error16()
6541
+ localeError: error17()
6259
6542
  };
6260
6543
  }
6261
6544
 
6262
- // ../../node_modules/zod/v4/locales/hu.js
6263
- var error17 = () => {
6545
+ // ../../node_modules/zod/v4/locales/hr.js
6546
+ var error18 = () => {
6264
6547
  const Sizable = {
6265
- string: { unit: "karakter", verb: "legyen" },
6266
- file: { unit: "byte", verb: "legyen" },
6267
- array: { unit: "elem", verb: "legyen" },
6268
- set: { unit: "elem", verb: "legyen" }
6548
+ string: { unit: "znakova", verb: "imati" },
6549
+ file: { unit: "bajtova", verb: "imati" },
6550
+ array: { unit: "stavki", verb: "imati" },
6551
+ set: { unit: "stavki", verb: "imati" }
6269
6552
  };
6270
6553
  function getSizing(origin) {
6271
6554
  return Sizable[origin] ?? null;
6272
6555
  }
6273
6556
  const FormatDictionary = {
6274
- regex: "bemenet",
6275
- email: "email c\xEDm",
6557
+ regex: "unos",
6558
+ email: "email adresa",
6276
6559
  url: "URL",
6277
6560
  emoji: "emoji",
6278
6561
  uuid: "UUID",
@@ -6285,25 +6568,37 @@ var error17 = () => {
6285
6568
  ulid: "ULID",
6286
6569
  xid: "XID",
6287
6570
  ksuid: "KSUID",
6288
- datetime: "ISO id\u0151b\xE9lyeg",
6289
- date: "ISO d\xE1tum",
6290
- time: "ISO id\u0151",
6291
- duration: "ISO id\u0151intervallum",
6292
- ipv4: "IPv4 c\xEDm",
6293
- ipv6: "IPv6 c\xEDm",
6294
- cidrv4: "IPv4 tartom\xE1ny",
6295
- cidrv6: "IPv6 tartom\xE1ny",
6296
- base64: "base64-k\xF3dolt string",
6297
- base64url: "base64url-k\xF3dolt string",
6298
- json_string: "JSON string",
6299
- e164: "E.164 sz\xE1m",
6571
+ datetime: "ISO datum i vrijeme",
6572
+ date: "ISO datum",
6573
+ time: "ISO vrijeme",
6574
+ duration: "ISO trajanje",
6575
+ ipv4: "IPv4 adresa",
6576
+ ipv6: "IPv6 adresa",
6577
+ cidrv4: "IPv4 raspon",
6578
+ cidrv6: "IPv6 raspon",
6579
+ base64: "base64 kodirani tekst",
6580
+ base64url: "base64url kodirani tekst",
6581
+ json_string: "JSON tekst",
6582
+ e164: "E.164 broj",
6300
6583
  jwt: "JWT",
6301
- template_literal: "bemenet"
6584
+ template_literal: "unos"
6302
6585
  };
6303
6586
  const TypeDictionary = {
6304
6587
  nan: "NaN",
6305
- number: "sz\xE1m",
6306
- array: "t\xF6mb"
6588
+ string: "tekst",
6589
+ number: "broj",
6590
+ boolean: "boolean",
6591
+ array: "niz",
6592
+ object: "objekt",
6593
+ set: "skup",
6594
+ file: "datoteka",
6595
+ date: "datum",
6596
+ bigint: "bigint",
6597
+ symbol: "simbol",
6598
+ undefined: "undefined",
6599
+ null: "null",
6600
+ function: "funkcija",
6601
+ map: "mapa"
6307
6602
  };
6308
6603
  return (issue2) => {
6309
6604
  switch (issue2.code) {
@@ -6312,26 +6607,137 @@ var error17 = () => {
6312
6607
  const receivedType = parsedType(issue2.input);
6313
6608
  const received = TypeDictionary[receivedType] ?? receivedType;
6314
6609
  if (/^[A-Z]/.test(issue2.expected)) {
6315
- return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue2.expected}, a kapott \xE9rt\xE9k ${received}`;
6610
+ return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
6316
6611
  }
6317
- return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`;
6612
+ return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
6318
6613
  }
6319
6614
  case "invalid_value":
6320
6615
  if (issue2.values.length === 1)
6321
- return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`;
6322
- return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`;
6616
+ return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
6617
+ return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
6323
6618
  case "too_big": {
6324
6619
  const adj = issue2.inclusive ? "<=" : "<";
6325
6620
  const sizing = getSizing(issue2.origin);
6621
+ const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
6326
6622
  if (sizing)
6327
- return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`;
6328
- return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`;
6623
+ return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
6624
+ return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
6329
6625
  }
6330
6626
  case "too_small": {
6331
6627
  const adj = issue2.inclusive ? ">=" : ">";
6332
6628
  const sizing = getSizing(issue2.origin);
6629
+ const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
6333
6630
  if (sizing) {
6334
- return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} m\xE9rete t\xFAl kicsi ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
6631
+ return `Premalo: o\u010Dekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
6632
+ }
6633
+ return `Premalo: o\u010Dekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
6634
+ }
6635
+ case "invalid_format": {
6636
+ const _issue = issue2;
6637
+ if (_issue.format === "starts_with")
6638
+ return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
6639
+ if (_issue.format === "ends_with")
6640
+ return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
6641
+ if (_issue.format === "includes")
6642
+ return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
6643
+ if (_issue.format === "regex")
6644
+ return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
6645
+ return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
6646
+ }
6647
+ case "not_multiple_of":
6648
+ return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
6649
+ case "unrecognized_keys":
6650
+ return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
6651
+ case "invalid_key":
6652
+ return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
6653
+ case "invalid_union":
6654
+ return "Neispravan unos";
6655
+ case "invalid_element":
6656
+ return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
6657
+ default:
6658
+ return `Neispravan unos`;
6659
+ }
6660
+ };
6661
+ };
6662
+ function hr_default() {
6663
+ return {
6664
+ localeError: error18()
6665
+ };
6666
+ }
6667
+
6668
+ // ../../node_modules/zod/v4/locales/hu.js
6669
+ var error19 = () => {
6670
+ const Sizable = {
6671
+ string: { unit: "karakter", verb: "legyen" },
6672
+ file: { unit: "byte", verb: "legyen" },
6673
+ array: { unit: "elem", verb: "legyen" },
6674
+ set: { unit: "elem", verb: "legyen" }
6675
+ };
6676
+ function getSizing(origin) {
6677
+ return Sizable[origin] ?? null;
6678
+ }
6679
+ const FormatDictionary = {
6680
+ regex: "bemenet",
6681
+ email: "email c\xEDm",
6682
+ url: "URL",
6683
+ emoji: "emoji",
6684
+ uuid: "UUID",
6685
+ uuidv4: "UUIDv4",
6686
+ uuidv6: "UUIDv6",
6687
+ nanoid: "nanoid",
6688
+ guid: "GUID",
6689
+ cuid: "cuid",
6690
+ cuid2: "cuid2",
6691
+ ulid: "ULID",
6692
+ xid: "XID",
6693
+ ksuid: "KSUID",
6694
+ datetime: "ISO id\u0151b\xE9lyeg",
6695
+ date: "ISO d\xE1tum",
6696
+ time: "ISO id\u0151",
6697
+ duration: "ISO id\u0151intervallum",
6698
+ ipv4: "IPv4 c\xEDm",
6699
+ ipv6: "IPv6 c\xEDm",
6700
+ cidrv4: "IPv4 tartom\xE1ny",
6701
+ cidrv6: "IPv6 tartom\xE1ny",
6702
+ base64: "base64-k\xF3dolt string",
6703
+ base64url: "base64url-k\xF3dolt string",
6704
+ json_string: "JSON string",
6705
+ e164: "E.164 sz\xE1m",
6706
+ jwt: "JWT",
6707
+ template_literal: "bemenet"
6708
+ };
6709
+ const TypeDictionary = {
6710
+ nan: "NaN",
6711
+ number: "sz\xE1m",
6712
+ array: "t\xF6mb"
6713
+ };
6714
+ return (issue2) => {
6715
+ switch (issue2.code) {
6716
+ case "invalid_type": {
6717
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
6718
+ const receivedType = parsedType(issue2.input);
6719
+ const received = TypeDictionary[receivedType] ?? receivedType;
6720
+ if (/^[A-Z]/.test(issue2.expected)) {
6721
+ return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue2.expected}, a kapott \xE9rt\xE9k ${received}`;
6722
+ }
6723
+ return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`;
6724
+ }
6725
+ case "invalid_value":
6726
+ if (issue2.values.length === 1)
6727
+ return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`;
6728
+ return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`;
6729
+ case "too_big": {
6730
+ const adj = issue2.inclusive ? "<=" : "<";
6731
+ const sizing = getSizing(issue2.origin);
6732
+ if (sizing)
6733
+ return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`;
6734
+ return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`;
6735
+ }
6736
+ case "too_small": {
6737
+ const adj = issue2.inclusive ? ">=" : ">";
6738
+ const sizing = getSizing(issue2.origin);
6739
+ if (sizing) {
6740
+ return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} m\xE9rete t\xFAl kicsi ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
6335
6741
  }
6336
6742
  return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} t\xFAl kicsi ${adj}${issue2.minimum.toString()}`;
6337
6743
  }
@@ -6364,7 +6770,7 @@ var error17 = () => {
6364
6770
  };
6365
6771
  function hu_default() {
6366
6772
  return {
6367
- localeError: error17()
6773
+ localeError: error19()
6368
6774
  };
6369
6775
  }
6370
6776
 
@@ -6379,7 +6785,7 @@ function withDefiniteArticle(word) {
6379
6785
  const lastChar = word[word.length - 1];
6380
6786
  return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568");
6381
6787
  }
6382
- var error18 = () => {
6788
+ var error20 = () => {
6383
6789
  const Sizable = {
6384
6790
  string: {
6385
6791
  unit: {
@@ -6512,12 +6918,12 @@ var error18 = () => {
6512
6918
  };
6513
6919
  function hy_default() {
6514
6920
  return {
6515
- localeError: error18()
6921
+ localeError: error20()
6516
6922
  };
6517
6923
  }
6518
6924
 
6519
6925
  // ../../node_modules/zod/v4/locales/id.js
6520
- var error19 = () => {
6926
+ var error21 = () => {
6521
6927
  const Sizable = {
6522
6928
  string: { unit: "karakter", verb: "memiliki" },
6523
6929
  file: { unit: "byte", verb: "memiliki" },
@@ -6619,12 +7025,12 @@ var error19 = () => {
6619
7025
  };
6620
7026
  function id_default() {
6621
7027
  return {
6622
- localeError: error19()
7028
+ localeError: error21()
6623
7029
  };
6624
7030
  }
6625
7031
 
6626
7032
  // ../../node_modules/zod/v4/locales/is.js
6627
- var error20 = () => {
7033
+ var error22 = () => {
6628
7034
  const Sizable = {
6629
7035
  string: { unit: "stafi", verb: "a\xF0 hafa" },
6630
7036
  file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
@@ -6729,12 +7135,12 @@ var error20 = () => {
6729
7135
  };
6730
7136
  function is_default() {
6731
7137
  return {
6732
- localeError: error20()
7138
+ localeError: error22()
6733
7139
  };
6734
7140
  }
6735
7141
 
6736
7142
  // ../../node_modules/zod/v4/locales/it.js
6737
- var error21 = () => {
7143
+ var error23 = () => {
6738
7144
  const Sizable = {
6739
7145
  string: { unit: "caratteri", verb: "avere" },
6740
7146
  file: { unit: "byte", verb: "avere" },
@@ -6819,7 +7225,7 @@ var error21 = () => {
6819
7225
  return `Stringa non valida: deve includere "${_issue.includes}"`;
6820
7226
  if (_issue.format === "regex")
6821
7227
  return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
6822
- return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`;
7228
+ return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
6823
7229
  }
6824
7230
  case "not_multiple_of":
6825
7231
  return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
@@ -6838,12 +7244,12 @@ var error21 = () => {
6838
7244
  };
6839
7245
  function it_default() {
6840
7246
  return {
6841
- localeError: error21()
7247
+ localeError: error23()
6842
7248
  };
6843
7249
  }
6844
7250
 
6845
7251
  // ../../node_modules/zod/v4/locales/ja.js
6846
- var error22 = () => {
7252
+ var error24 = () => {
6847
7253
  const Sizable = {
6848
7254
  string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
6849
7255
  file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
@@ -6946,12 +7352,12 @@ var error22 = () => {
6946
7352
  };
6947
7353
  function ja_default() {
6948
7354
  return {
6949
- localeError: error22()
7355
+ localeError: error24()
6950
7356
  };
6951
7357
  }
6952
7358
 
6953
7359
  // ../../node_modules/zod/v4/locales/ka.js
6954
- var error23 = () => {
7360
+ var error25 = () => {
6955
7361
  const Sizable = {
6956
7362
  string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
6957
7363
  file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
@@ -6984,9 +7390,9 @@ var error23 = () => {
6984
7390
  ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
6985
7391
  cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
6986
7392
  cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
6987
- base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
6988
- base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
6989
- json_string: "JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
7393
+ base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
7394
+ base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
7395
+ json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
6990
7396
  e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
6991
7397
  jwt: "JWT",
6992
7398
  template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
@@ -6994,7 +7400,7 @@ var error23 = () => {
6994
7400
  const TypeDictionary = {
6995
7401
  nan: "NaN",
6996
7402
  number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
6997
- string: "\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
7403
+ string: "\u10D5\u10D4\u10DA\u10D8",
6998
7404
  boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
6999
7405
  function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
7000
7406
  array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
@@ -7032,14 +7438,14 @@ var error23 = () => {
7032
7438
  case "invalid_format": {
7033
7439
  const _issue = issue2;
7034
7440
  if (_issue.format === "starts_with") {
7035
- return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`;
7441
+ return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`;
7036
7442
  }
7037
7443
  if (_issue.format === "ends_with")
7038
- return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`;
7444
+ return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`;
7039
7445
  if (_issue.format === "includes")
7040
- return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`;
7446
+ return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`;
7041
7447
  if (_issue.format === "regex")
7042
- return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`;
7448
+ return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`;
7043
7449
  return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
7044
7450
  }
7045
7451
  case "not_multiple_of":
@@ -7059,12 +7465,12 @@ var error23 = () => {
7059
7465
  };
7060
7466
  function ka_default() {
7061
7467
  return {
7062
- localeError: error23()
7468
+ localeError: error25()
7063
7469
  };
7064
7470
  }
7065
7471
 
7066
7472
  // ../../node_modules/zod/v4/locales/km.js
7067
- var error24 = () => {
7473
+ var error26 = () => {
7068
7474
  const Sizable = {
7069
7475
  string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
7070
7476
  file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
@@ -7170,7 +7576,7 @@ var error24 = () => {
7170
7576
  };
7171
7577
  function km_default() {
7172
7578
  return {
7173
- localeError: error24()
7579
+ localeError: error26()
7174
7580
  };
7175
7581
  }
7176
7582
 
@@ -7180,7 +7586,7 @@ function kh_default() {
7180
7586
  }
7181
7587
 
7182
7588
  // ../../node_modules/zod/v4/locales/ko.js
7183
- var error25 = () => {
7589
+ var error27 = () => {
7184
7590
  const Sizable = {
7185
7591
  string: { unit: "\uBB38\uC790", verb: "to have" },
7186
7592
  file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
@@ -7287,7 +7693,7 @@ var error25 = () => {
7287
7693
  };
7288
7694
  function ko_default() {
7289
7695
  return {
7290
- localeError: error25()
7696
+ localeError: error27()
7291
7697
  };
7292
7698
  }
7293
7699
 
@@ -7305,7 +7711,7 @@ function getUnitTypeFromNumber(number4) {
7305
7711
  return "one";
7306
7712
  return "few";
7307
7713
  }
7308
- var error26 = () => {
7714
+ var error28 = () => {
7309
7715
  const Sizable = {
7310
7716
  string: {
7311
7717
  unit: {
@@ -7491,12 +7897,12 @@ var error26 = () => {
7491
7897
  };
7492
7898
  function lt_default() {
7493
7899
  return {
7494
- localeError: error26()
7900
+ localeError: error28()
7495
7901
  };
7496
7902
  }
7497
7903
 
7498
7904
  // ../../node_modules/zod/v4/locales/mk.js
7499
- var error27 = () => {
7905
+ var error29 = () => {
7500
7906
  const Sizable = {
7501
7907
  string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
7502
7908
  file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
@@ -7601,12 +8007,12 @@ var error27 = () => {
7601
8007
  };
7602
8008
  function mk_default() {
7603
8009
  return {
7604
- localeError: error27()
8010
+ localeError: error29()
7605
8011
  };
7606
8012
  }
7607
8013
 
7608
8014
  // ../../node_modules/zod/v4/locales/ms.js
7609
- var error28 = () => {
8015
+ var error30 = () => {
7610
8016
  const Sizable = {
7611
8017
  string: { unit: "aksara", verb: "mempunyai" },
7612
8018
  file: { unit: "bait", verb: "mempunyai" },
@@ -7709,12 +8115,12 @@ var error28 = () => {
7709
8115
  };
7710
8116
  function ms_default() {
7711
8117
  return {
7712
- localeError: error28()
8118
+ localeError: error30()
7713
8119
  };
7714
8120
  }
7715
8121
 
7716
8122
  // ../../node_modules/zod/v4/locales/nl.js
7717
- var error29 = () => {
8123
+ var error31 = () => {
7718
8124
  const Sizable = {
7719
8125
  string: { unit: "tekens", verb: "heeft" },
7720
8126
  file: { unit: "bytes", verb: "heeft" },
@@ -7820,12 +8226,12 @@ var error29 = () => {
7820
8226
  };
7821
8227
  function nl_default() {
7822
8228
  return {
7823
- localeError: error29()
8229
+ localeError: error31()
7824
8230
  };
7825
8231
  }
7826
8232
 
7827
8233
  // ../../node_modules/zod/v4/locales/no.js
7828
- var error30 = () => {
8234
+ var error32 = () => {
7829
8235
  const Sizable = {
7830
8236
  string: { unit: "tegn", verb: "\xE5 ha" },
7831
8237
  file: { unit: "bytes", verb: "\xE5 ha" },
@@ -7929,12 +8335,12 @@ var error30 = () => {
7929
8335
  };
7930
8336
  function no_default() {
7931
8337
  return {
7932
- localeError: error30()
8338
+ localeError: error32()
7933
8339
  };
7934
8340
  }
7935
8341
 
7936
8342
  // ../../node_modules/zod/v4/locales/ota.js
7937
- var error31 = () => {
8343
+ var error33 = () => {
7938
8344
  const Sizable = {
7939
8345
  string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
7940
8346
  file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
@@ -8039,12 +8445,12 @@ var error31 = () => {
8039
8445
  };
8040
8446
  function ota_default() {
8041
8447
  return {
8042
- localeError: error31()
8448
+ localeError: error33()
8043
8449
  };
8044
8450
  }
8045
8451
 
8046
8452
  // ../../node_modules/zod/v4/locales/ps.js
8047
- var error32 = () => {
8453
+ var error34 = () => {
8048
8454
  const Sizable = {
8049
8455
  string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
8050
8456
  file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
@@ -8154,12 +8560,12 @@ var error32 = () => {
8154
8560
  };
8155
8561
  function ps_default() {
8156
8562
  return {
8157
- localeError: error32()
8563
+ localeError: error34()
8158
8564
  };
8159
8565
  }
8160
8566
 
8161
8567
  // ../../node_modules/zod/v4/locales/pl.js
8162
- var error33 = () => {
8568
+ var error35 = () => {
8163
8569
  const Sizable = {
8164
8570
  string: { unit: "znak\xF3w", verb: "mie\u0107" },
8165
8571
  file: { unit: "bajt\xF3w", verb: "mie\u0107" },
@@ -8264,12 +8670,12 @@ var error33 = () => {
8264
8670
  };
8265
8671
  function pl_default() {
8266
8672
  return {
8267
- localeError: error33()
8673
+ localeError: error35()
8268
8674
  };
8269
8675
  }
8270
8676
 
8271
8677
  // ../../node_modules/zod/v4/locales/pt.js
8272
- var error34 = () => {
8678
+ var error36 = () => {
8273
8679
  const Sizable = {
8274
8680
  string: { unit: "caracteres", verb: "ter" },
8275
8681
  file: { unit: "bytes", verb: "ter" },
@@ -8373,7 +8779,127 @@ var error34 = () => {
8373
8779
  };
8374
8780
  function pt_default() {
8375
8781
  return {
8376
- localeError: error34()
8782
+ localeError: error36()
8783
+ };
8784
+ }
8785
+
8786
+ // ../../node_modules/zod/v4/locales/ro.js
8787
+ var error37 = () => {
8788
+ const Sizable = {
8789
+ string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
8790
+ file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
8791
+ array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
8792
+ set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
8793
+ map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
8794
+ };
8795
+ function getSizing(origin) {
8796
+ return Sizable[origin] ?? null;
8797
+ }
8798
+ const FormatDictionary = {
8799
+ regex: "intrare",
8800
+ email: "adres\u0103 de email",
8801
+ url: "URL",
8802
+ emoji: "emoji",
8803
+ uuid: "UUID",
8804
+ uuidv4: "UUIDv4",
8805
+ uuidv6: "UUIDv6",
8806
+ nanoid: "nanoid",
8807
+ guid: "GUID",
8808
+ cuid: "cuid",
8809
+ cuid2: "cuid2",
8810
+ ulid: "ULID",
8811
+ xid: "XID",
8812
+ ksuid: "KSUID",
8813
+ datetime: "dat\u0103 \u0219i or\u0103 ISO",
8814
+ date: "dat\u0103 ISO",
8815
+ time: "or\u0103 ISO",
8816
+ duration: "durat\u0103 ISO",
8817
+ ipv4: "adres\u0103 IPv4",
8818
+ ipv6: "adres\u0103 IPv6",
8819
+ mac: "adres\u0103 MAC",
8820
+ cidrv4: "interval IPv4",
8821
+ cidrv6: "interval IPv6",
8822
+ base64: "\u0219ir codat base64",
8823
+ base64url: "\u0219ir codat base64url",
8824
+ json_string: "\u0219ir JSON",
8825
+ e164: "num\u0103r E.164",
8826
+ jwt: "JWT",
8827
+ template_literal: "intrare"
8828
+ };
8829
+ const TypeDictionary = {
8830
+ nan: "NaN",
8831
+ string: "\u0219ir",
8832
+ number: "num\u0103r",
8833
+ boolean: "boolean",
8834
+ function: "func\u021Bie",
8835
+ array: "matrice",
8836
+ object: "obiect",
8837
+ undefined: "nedefinit",
8838
+ symbol: "simbol",
8839
+ bigint: "num\u0103r mare",
8840
+ void: "void",
8841
+ never: "never",
8842
+ map: "hart\u0103",
8843
+ set: "set"
8844
+ };
8845
+ return (issue2) => {
8846
+ switch (issue2.code) {
8847
+ case "invalid_type": {
8848
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
8849
+ const receivedType = parsedType(issue2.input);
8850
+ const received = TypeDictionary[receivedType] ?? receivedType;
8851
+ return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
8852
+ }
8853
+ case "invalid_value":
8854
+ if (issue2.values.length === 1)
8855
+ return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
8856
+ return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
8857
+ case "too_big": {
8858
+ const adj = issue2.inclusive ? "<=" : "<";
8859
+ const sizing = getSizing(issue2.origin);
8860
+ if (sizing)
8861
+ return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
8862
+ return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
8863
+ }
8864
+ case "too_small": {
8865
+ const adj = issue2.inclusive ? ">=" : ">";
8866
+ const sizing = getSizing(issue2.origin);
8867
+ if (sizing) {
8868
+ return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
8869
+ }
8870
+ return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
8871
+ }
8872
+ case "invalid_format": {
8873
+ const _issue = issue2;
8874
+ if (_issue.format === "starts_with") {
8875
+ return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
8876
+ }
8877
+ if (_issue.format === "ends_with")
8878
+ return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
8879
+ if (_issue.format === "includes")
8880
+ return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
8881
+ if (_issue.format === "regex")
8882
+ return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
8883
+ return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
8884
+ }
8885
+ case "not_multiple_of":
8886
+ return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
8887
+ case "unrecognized_keys":
8888
+ return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
8889
+ case "invalid_key":
8890
+ return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
8891
+ case "invalid_union":
8892
+ return "Intrare invalid\u0103";
8893
+ case "invalid_element":
8894
+ return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
8895
+ default:
8896
+ return `Intrare invalid\u0103`;
8897
+ }
8898
+ };
8899
+ };
8900
+ function ro_default() {
8901
+ return {
8902
+ localeError: error37()
8377
8903
  };
8378
8904
  }
8379
8905
 
@@ -8393,7 +8919,7 @@ function getRussianPlural(count, one, few, many) {
8393
8919
  }
8394
8920
  return many;
8395
8921
  }
8396
- var error35 = () => {
8922
+ var error38 = () => {
8397
8923
  const Sizable = {
8398
8924
  string: {
8399
8925
  unit: {
@@ -8530,12 +9056,12 @@ var error35 = () => {
8530
9056
  };
8531
9057
  function ru_default() {
8532
9058
  return {
8533
- localeError: error35()
9059
+ localeError: error38()
8534
9060
  };
8535
9061
  }
8536
9062
 
8537
9063
  // ../../node_modules/zod/v4/locales/sl.js
8538
- var error36 = () => {
9064
+ var error39 = () => {
8539
9065
  const Sizable = {
8540
9066
  string: { unit: "znakov", verb: "imeti" },
8541
9067
  file: { unit: "bajtov", verb: "imeti" },
@@ -8640,12 +9166,12 @@ var error36 = () => {
8640
9166
  };
8641
9167
  function sl_default() {
8642
9168
  return {
8643
- localeError: error36()
9169
+ localeError: error39()
8644
9170
  };
8645
9171
  }
8646
9172
 
8647
9173
  // ../../node_modules/zod/v4/locales/sv.js
8648
- var error37 = () => {
9174
+ var error40 = () => {
8649
9175
  const Sizable = {
8650
9176
  string: { unit: "tecken", verb: "att ha" },
8651
9177
  file: { unit: "bytes", verb: "att ha" },
@@ -8751,12 +9277,12 @@ var error37 = () => {
8751
9277
  };
8752
9278
  function sv_default() {
8753
9279
  return {
8754
- localeError: error37()
9280
+ localeError: error40()
8755
9281
  };
8756
9282
  }
8757
9283
 
8758
9284
  // ../../node_modules/zod/v4/locales/ta.js
8759
- var error38 = () => {
9285
+ var error41 = () => {
8760
9286
  const Sizable = {
8761
9287
  string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
8762
9288
  file: { unit: "\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
@@ -8862,12 +9388,12 @@ var error38 = () => {
8862
9388
  };
8863
9389
  function ta_default() {
8864
9390
  return {
8865
- localeError: error38()
9391
+ localeError: error41()
8866
9392
  };
8867
9393
  }
8868
9394
 
8869
9395
  // ../../node_modules/zod/v4/locales/th.js
8870
- var error39 = () => {
9396
+ var error42 = () => {
8871
9397
  const Sizable = {
8872
9398
  string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
8873
9399
  file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
@@ -8973,12 +9499,12 @@ var error39 = () => {
8973
9499
  };
8974
9500
  function th_default() {
8975
9501
  return {
8976
- localeError: error39()
9502
+ localeError: error42()
8977
9503
  };
8978
9504
  }
8979
9505
 
8980
9506
  // ../../node_modules/zod/v4/locales/tr.js
8981
- var error40 = () => {
9507
+ var error43 = () => {
8982
9508
  const Sizable = {
8983
9509
  string: { unit: "karakter", verb: "olmal\u0131" },
8984
9510
  file: { unit: "bayt", verb: "olmal\u0131" },
@@ -9079,12 +9605,12 @@ var error40 = () => {
9079
9605
  };
9080
9606
  function tr_default() {
9081
9607
  return {
9082
- localeError: error40()
9608
+ localeError: error43()
9083
9609
  };
9084
9610
  }
9085
9611
 
9086
9612
  // ../../node_modules/zod/v4/locales/uk.js
9087
- var error41 = () => {
9613
+ var error44 = () => {
9088
9614
  const Sizable = {
9089
9615
  string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
9090
9616
  file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
@@ -9188,7 +9714,7 @@ var error41 = () => {
9188
9714
  };
9189
9715
  function uk_default() {
9190
9716
  return {
9191
- localeError: error41()
9717
+ localeError: error44()
9192
9718
  };
9193
9719
  }
9194
9720
 
@@ -9198,7 +9724,7 @@ function ua_default() {
9198
9724
  }
9199
9725
 
9200
9726
  // ../../node_modules/zod/v4/locales/ur.js
9201
- var error42 = () => {
9727
+ var error45 = () => {
9202
9728
  const Sizable = {
9203
9729
  string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
9204
9730
  file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
@@ -9304,17 +9830,18 @@ var error42 = () => {
9304
9830
  };
9305
9831
  function ur_default() {
9306
9832
  return {
9307
- localeError: error42()
9833
+ localeError: error45()
9308
9834
  };
9309
9835
  }
9310
9836
 
9311
9837
  // ../../node_modules/zod/v4/locales/uz.js
9312
- var error43 = () => {
9838
+ var error46 = () => {
9313
9839
  const Sizable = {
9314
9840
  string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
9315
9841
  file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
9316
9842
  array: { unit: "element", verb: "bo\u2018lishi kerak" },
9317
- set: { unit: "element", verb: "bo\u2018lishi kerak" }
9843
+ set: { unit: "element", verb: "bo\u2018lishi kerak" },
9844
+ map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
9318
9845
  };
9319
9846
  function getSizing(origin) {
9320
9847
  return Sizable[origin] ?? null;
@@ -9414,12 +9941,12 @@ var error43 = () => {
9414
9941
  };
9415
9942
  function uz_default() {
9416
9943
  return {
9417
- localeError: error43()
9944
+ localeError: error46()
9418
9945
  };
9419
9946
  }
9420
9947
 
9421
9948
  // ../../node_modules/zod/v4/locales/vi.js
9422
- var error44 = () => {
9949
+ var error47 = () => {
9423
9950
  const Sizable = {
9424
9951
  string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
9425
9952
  file: { unit: "byte", verb: "c\xF3" },
@@ -9523,12 +10050,12 @@ var error44 = () => {
9523
10050
  };
9524
10051
  function vi_default() {
9525
10052
  return {
9526
- localeError: error44()
10053
+ localeError: error47()
9527
10054
  };
9528
10055
  }
9529
10056
 
9530
10057
  // ../../node_modules/zod/v4/locales/zh-CN.js
9531
- var error45 = () => {
10058
+ var error48 = () => {
9532
10059
  const Sizable = {
9533
10060
  string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
9534
10061
  file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
@@ -9633,12 +10160,12 @@ var error45 = () => {
9633
10160
  };
9634
10161
  function zh_CN_default() {
9635
10162
  return {
9636
- localeError: error45()
10163
+ localeError: error48()
9637
10164
  };
9638
10165
  }
9639
10166
 
9640
10167
  // ../../node_modules/zod/v4/locales/zh-TW.js
9641
- var error46 = () => {
10168
+ var error49 = () => {
9642
10169
  const Sizable = {
9643
10170
  string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
9644
10171
  file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
@@ -9741,12 +10268,12 @@ var error46 = () => {
9741
10268
  };
9742
10269
  function zh_TW_default() {
9743
10270
  return {
9744
- localeError: error46()
10271
+ localeError: error49()
9745
10272
  };
9746
10273
  }
9747
10274
 
9748
10275
  // ../../node_modules/zod/v4/locales/yo.js
9749
- var error47 = () => {
10276
+ var error50 = () => {
9750
10277
  const Sizable = {
9751
10278
  string: { unit: "\xE0mi", verb: "n\xED" },
9752
10279
  file: { unit: "bytes", verb: "n\xED" },
@@ -9849,12 +10376,12 @@ var error47 = () => {
9849
10376
  };
9850
10377
  function yo_default() {
9851
10378
  return {
9852
- localeError: error47()
10379
+ localeError: error50()
9853
10380
  };
9854
10381
  }
9855
10382
 
9856
10383
  // ../../node_modules/zod/v4/core/registries.js
9857
- var _a;
10384
+ var _a2;
9858
10385
  var $output = /* @__PURE__ */ Symbol("ZodOutput");
9859
10386
  var $input = /* @__PURE__ */ Symbol("ZodInput");
9860
10387
  var $ZodRegistry = class {
@@ -9900,7 +10427,7 @@ var $ZodRegistry = class {
9900
10427
  function registry() {
9901
10428
  return new $ZodRegistry();
9902
10429
  }
9903
- (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
10430
+ (_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
9904
10431
  var globalRegistry = globalThis.__zod_globalRegistry;
9905
10432
 
9906
10433
  // ../../node_modules/zod/v4/core/api.js
@@ -10818,7 +11345,7 @@ function _refine(Class2, fn, _params) {
10818
11345
  return schema;
10819
11346
  }
10820
11347
  // @__NO_SIDE_EFFECTS__
10821
- function _superRefine(fn) {
11348
+ function _superRefine(fn, params) {
10822
11349
  const ch = /* @__PURE__ */ _check((payload) => {
10823
11350
  payload.addIssue = (issue2) => {
10824
11351
  if (typeof issue2 === "string") {
@@ -10835,7 +11362,7 @@ function _superRefine(fn) {
10835
11362
  }
10836
11363
  };
10837
11364
  return fn(payload.value, payload);
10838
- });
11365
+ }, params);
10839
11366
  return ch;
10840
11367
  }
10841
11368
  // @__NO_SIDE_EFFECTS__
@@ -10965,7 +11492,7 @@ function initializeContext(params) {
10965
11492
  };
10966
11493
  }
10967
11494
  function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
10968
- var _a2;
11495
+ var _a3;
10969
11496
  const def = schema._zod.def;
10970
11497
  const seen = ctx.seen.get(schema);
10971
11498
  if (seen) {
@@ -11012,8 +11539,8 @@ function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
11012
11539
  delete result.schema.examples;
11013
11540
  delete result.schema.default;
11014
11541
  }
11015
- if (ctx.io === "input" && result.schema._prefault)
11016
- (_a2 = result.schema).default ?? (_a2.default = result.schema._prefault);
11542
+ if (ctx.io === "input" && "_prefault" in result.schema)
11543
+ (_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
11017
11544
  delete result.schema._prefault;
11018
11545
  const _result = ctx.seen.get(schema);
11019
11546
  return _result.schema;
@@ -11194,10 +11721,15 @@ function finalize(ctx, schema) {
11194
11721
  result.$id = ctx.external.uri(id);
11195
11722
  }
11196
11723
  Object.assign(result, root.def ?? root.schema);
11724
+ const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
11725
+ if (rootMetaId !== void 0 && result.id === rootMetaId)
11726
+ delete result.id;
11197
11727
  const defs = ctx.external?.defs ?? {};
11198
11728
  for (const entry of ctx.seen.entries()) {
11199
11729
  const seen = entry[1];
11200
11730
  if (seen.def && seen.defId) {
11731
+ if (seen.def.id === seen.defId)
11732
+ delete seen.def.id;
11201
11733
  defs[seen.defId] = seen.def;
11202
11734
  }
11203
11735
  }
@@ -11253,6 +11785,8 @@ function isTransforming(_schema, _ctx) {
11253
11785
  return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
11254
11786
  }
11255
11787
  if (def.type === "pipe") {
11788
+ if (_schema._zod.traits.has("$ZodCodec"))
11789
+ return true;
11256
11790
  return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
11257
11791
  }
11258
11792
  if (def.type === "object") {
@@ -11342,39 +11876,28 @@ var numberProcessor = (schema, ctx, _json, _params) => {
11342
11876
  json2.type = "integer";
11343
11877
  else
11344
11878
  json2.type = "number";
11345
- if (typeof exclusiveMinimum === "number") {
11346
- if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
11879
+ const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
11880
+ const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
11881
+ const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
11882
+ if (exMin) {
11883
+ if (legacy) {
11347
11884
  json2.minimum = exclusiveMinimum;
11348
11885
  json2.exclusiveMinimum = true;
11349
11886
  } else {
11350
11887
  json2.exclusiveMinimum = exclusiveMinimum;
11351
11888
  }
11352
- }
11353
- if (typeof minimum === "number") {
11889
+ } else if (typeof minimum === "number") {
11354
11890
  json2.minimum = minimum;
11355
- if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
11356
- if (exclusiveMinimum >= minimum)
11357
- delete json2.minimum;
11358
- else
11359
- delete json2.exclusiveMinimum;
11360
- }
11361
11891
  }
11362
- if (typeof exclusiveMaximum === "number") {
11363
- if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
11892
+ if (exMax) {
11893
+ if (legacy) {
11364
11894
  json2.maximum = exclusiveMaximum;
11365
11895
  json2.exclusiveMaximum = true;
11366
11896
  } else {
11367
11897
  json2.exclusiveMaximum = exclusiveMaximum;
11368
11898
  }
11369
- }
11370
- if (typeof maximum === "number") {
11899
+ } else if (typeof maximum === "number") {
11371
11900
  json2.maximum = maximum;
11372
- if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
11373
- if (exclusiveMaximum <= maximum)
11374
- delete json2.maximum;
11375
- else
11376
- delete json2.exclusiveMaximum;
11377
- }
11378
11901
  }
11379
11902
  if (typeof multipleOf === "number")
11380
11903
  json2.multipleOf = multipleOf;
@@ -11546,7 +12069,10 @@ var arrayProcessor = (schema, ctx, _json, params) => {
11546
12069
  if (typeof maximum === "number")
11547
12070
  json2.maxItems = maximum;
11548
12071
  json2.type = "array";
11549
- json2.items = process(def.element, ctx, { ...params, path: [...params.path, "items"] });
12072
+ json2.items = process(def.element, ctx, {
12073
+ ...params,
12074
+ path: [...params.path, "items"]
12075
+ });
11550
12076
  };
11551
12077
  var objectProcessor = (schema, ctx, _json, params) => {
11552
12078
  const json2 = _json;
@@ -11739,7 +12265,8 @@ var catchProcessor = (schema, ctx, json2, params) => {
11739
12265
  };
11740
12266
  var pipeProcessor = (schema, ctx, _json, params) => {
11741
12267
  const def = schema._zod.def;
11742
- const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
12268
+ const inIsTransform = def.in._zod.traits.has("$ZodTransform");
12269
+ const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
11743
12270
  process(innerType, ctx, params);
11744
12271
  const seen = ctx.seen.get(schema);
11745
12272
  seen.ref = innerType;
@@ -11973,6 +12500,7 @@ __export(schemas_exports2, {
11973
12500
  ZodOptional: () => ZodOptional,
11974
12501
  ZodPipe: () => ZodPipe,
11975
12502
  ZodPrefault: () => ZodPrefault,
12503
+ ZodPreprocess: () => ZodPreprocess,
11976
12504
  ZodPromise: () => ZodPromise,
11977
12505
  ZodReadonly: () => ZodReadonly,
11978
12506
  ZodRecord: () => ZodRecord,
@@ -12033,6 +12561,7 @@ __export(schemas_exports2, {
12033
12561
  int32: () => int32,
12034
12562
  int64: () => int64,
12035
12563
  intersection: () => intersection,
12564
+ invertCodec: () => invertCodec,
12036
12565
  ipv4: () => ipv42,
12037
12566
  ipv6: () => ipv62,
12038
12567
  json: () => json,
@@ -12202,8 +12731,8 @@ var initializer2 = (inst, issues) => {
12202
12731
  }
12203
12732
  });
12204
12733
  };
12205
- var ZodError = $constructor("ZodError", initializer2);
12206
- var ZodRealError = $constructor("ZodError", initializer2, {
12734
+ var ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
12735
+ var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
12207
12736
  Parent: Error
12208
12737
  });
12209
12738
 
@@ -12222,6 +12751,43 @@ var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
12222
12751
  var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
12223
12752
 
12224
12753
  // ../../node_modules/zod/v4/classic/schemas.js
12754
+ var _installedGroups = /* @__PURE__ */ new WeakMap();
12755
+ function _installLazyMethods(inst, group, methods) {
12756
+ const proto = Object.getPrototypeOf(inst);
12757
+ let installed = _installedGroups.get(proto);
12758
+ if (!installed) {
12759
+ installed = /* @__PURE__ */ new Set();
12760
+ _installedGroups.set(proto, installed);
12761
+ }
12762
+ if (installed.has(group))
12763
+ return;
12764
+ installed.add(group);
12765
+ for (const key in methods) {
12766
+ const fn = methods[key];
12767
+ Object.defineProperty(proto, key, {
12768
+ configurable: true,
12769
+ enumerable: false,
12770
+ get() {
12771
+ const bound = fn.bind(this);
12772
+ Object.defineProperty(this, key, {
12773
+ configurable: true,
12774
+ writable: true,
12775
+ enumerable: true,
12776
+ value: bound
12777
+ });
12778
+ return bound;
12779
+ },
12780
+ set(v) {
12781
+ Object.defineProperty(this, key, {
12782
+ configurable: true,
12783
+ writable: true,
12784
+ enumerable: true,
12785
+ value: v
12786
+ });
12787
+ }
12788
+ });
12789
+ }
12790
+ }
12225
12791
  var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
12226
12792
  $ZodType.init(inst, def);
12227
12793
  Object.assign(inst["~standard"], {
@@ -12234,23 +12800,6 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
12234
12800
  inst.def = def;
12235
12801
  inst.type = def.type;
12236
12802
  Object.defineProperty(inst, "_def", { value: def });
12237
- inst.check = (...checks) => {
12238
- return inst.clone(util_exports.mergeDefs(def, {
12239
- checks: [
12240
- ...def.checks ?? [],
12241
- ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
12242
- ]
12243
- }), {
12244
- parent: true
12245
- });
12246
- };
12247
- inst.with = inst.check;
12248
- inst.clone = (def2, params) => clone(inst, def2, params);
12249
- inst.brand = () => inst;
12250
- inst.register = ((reg, meta3) => {
12251
- reg.add(inst, meta3);
12252
- return inst;
12253
- });
12254
12803
  inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
12255
12804
  inst.safeParse = (data, params) => safeParse2(inst, data, params);
12256
12805
  inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
@@ -12264,45 +12813,108 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
12264
12813
  inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
12265
12814
  inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
12266
12815
  inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
12267
- inst.refine = (check2, params) => inst.check(refine(check2, params));
12268
- inst.superRefine = (refinement) => inst.check(superRefine(refinement));
12269
- inst.overwrite = (fn) => inst.check(_overwrite(fn));
12270
- inst.optional = () => optional(inst);
12271
- inst.exactOptional = () => exactOptional(inst);
12272
- inst.nullable = () => nullable(inst);
12273
- inst.nullish = () => optional(nullable(inst));
12274
- inst.nonoptional = (params) => nonoptional(inst, params);
12275
- inst.array = () => array(inst);
12276
- inst.or = (arg) => union([inst, arg]);
12277
- inst.and = (arg) => intersection(inst, arg);
12278
- inst.transform = (tx) => pipe(inst, transform(tx));
12279
- inst.default = (def2) => _default2(inst, def2);
12280
- inst.prefault = (def2) => prefault(inst, def2);
12281
- inst.catch = (params) => _catch2(inst, params);
12282
- inst.pipe = (target) => pipe(inst, target);
12283
- inst.readonly = () => readonly(inst);
12284
- inst.describe = (description) => {
12285
- const cl = inst.clone();
12286
- globalRegistry.add(cl, { description });
12287
- return cl;
12288
- };
12816
+ _installLazyMethods(inst, "ZodType", {
12817
+ check(...chks) {
12818
+ const def2 = this.def;
12819
+ return this.clone(util_exports.mergeDefs(def2, {
12820
+ checks: [
12821
+ ...def2.checks ?? [],
12822
+ ...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
12823
+ ]
12824
+ }), { parent: true });
12825
+ },
12826
+ with(...chks) {
12827
+ return this.check(...chks);
12828
+ },
12829
+ clone(def2, params) {
12830
+ return clone(this, def2, params);
12831
+ },
12832
+ brand() {
12833
+ return this;
12834
+ },
12835
+ register(reg, meta3) {
12836
+ reg.add(this, meta3);
12837
+ return this;
12838
+ },
12839
+ refine(check2, params) {
12840
+ return this.check(refine(check2, params));
12841
+ },
12842
+ superRefine(refinement, params) {
12843
+ return this.check(superRefine(refinement, params));
12844
+ },
12845
+ overwrite(fn) {
12846
+ return this.check(_overwrite(fn));
12847
+ },
12848
+ optional() {
12849
+ return optional(this);
12850
+ },
12851
+ exactOptional() {
12852
+ return exactOptional(this);
12853
+ },
12854
+ nullable() {
12855
+ return nullable(this);
12856
+ },
12857
+ nullish() {
12858
+ return optional(nullable(this));
12859
+ },
12860
+ nonoptional(params) {
12861
+ return nonoptional(this, params);
12862
+ },
12863
+ array() {
12864
+ return array(this);
12865
+ },
12866
+ or(arg) {
12867
+ return union([this, arg]);
12868
+ },
12869
+ and(arg) {
12870
+ return intersection(this, arg);
12871
+ },
12872
+ transform(tx) {
12873
+ return pipe(this, transform(tx));
12874
+ },
12875
+ default(d) {
12876
+ return _default2(this, d);
12877
+ },
12878
+ prefault(d) {
12879
+ return prefault(this, d);
12880
+ },
12881
+ catch(params) {
12882
+ return _catch2(this, params);
12883
+ },
12884
+ pipe(target) {
12885
+ return pipe(this, target);
12886
+ },
12887
+ readonly() {
12888
+ return readonly(this);
12889
+ },
12890
+ describe(description) {
12891
+ const cl = this.clone();
12892
+ globalRegistry.add(cl, { description });
12893
+ return cl;
12894
+ },
12895
+ meta(...args) {
12896
+ if (args.length === 0)
12897
+ return globalRegistry.get(this);
12898
+ const cl = this.clone();
12899
+ globalRegistry.add(cl, args[0]);
12900
+ return cl;
12901
+ },
12902
+ isOptional() {
12903
+ return this.safeParse(void 0).success;
12904
+ },
12905
+ isNullable() {
12906
+ return this.safeParse(null).success;
12907
+ },
12908
+ apply(fn) {
12909
+ return fn(this);
12910
+ }
12911
+ });
12289
12912
  Object.defineProperty(inst, "description", {
12290
12913
  get() {
12291
12914
  return globalRegistry.get(inst)?.description;
12292
12915
  },
12293
12916
  configurable: true
12294
12917
  });
12295
- inst.meta = (...args) => {
12296
- if (args.length === 0) {
12297
- return globalRegistry.get(inst);
12298
- }
12299
- const cl = inst.clone();
12300
- globalRegistry.add(cl, args[0]);
12301
- return cl;
12302
- };
12303
- inst.isOptional = () => inst.safeParse(void 0).success;
12304
- inst.isNullable = () => inst.safeParse(null).success;
12305
- inst.apply = (fn) => fn(inst);
12306
12918
  return inst;
12307
12919
  });
12308
12920
  var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
@@ -12313,21 +12925,53 @@ var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
12313
12925
  inst.format = bag.format ?? null;
12314
12926
  inst.minLength = bag.minimum ?? null;
12315
12927
  inst.maxLength = bag.maximum ?? null;
12316
- inst.regex = (...args) => inst.check(_regex(...args));
12317
- inst.includes = (...args) => inst.check(_includes(...args));
12318
- inst.startsWith = (...args) => inst.check(_startsWith(...args));
12319
- inst.endsWith = (...args) => inst.check(_endsWith(...args));
12320
- inst.min = (...args) => inst.check(_minLength(...args));
12321
- inst.max = (...args) => inst.check(_maxLength(...args));
12322
- inst.length = (...args) => inst.check(_length(...args));
12323
- inst.nonempty = (...args) => inst.check(_minLength(1, ...args));
12324
- inst.lowercase = (params) => inst.check(_lowercase(params));
12325
- inst.uppercase = (params) => inst.check(_uppercase(params));
12326
- inst.trim = () => inst.check(_trim());
12327
- inst.normalize = (...args) => inst.check(_normalize(...args));
12328
- inst.toLowerCase = () => inst.check(_toLowerCase());
12329
- inst.toUpperCase = () => inst.check(_toUpperCase());
12330
- inst.slugify = () => inst.check(_slugify());
12928
+ _installLazyMethods(inst, "_ZodString", {
12929
+ regex(...args) {
12930
+ return this.check(_regex(...args));
12931
+ },
12932
+ includes(...args) {
12933
+ return this.check(_includes(...args));
12934
+ },
12935
+ startsWith(...args) {
12936
+ return this.check(_startsWith(...args));
12937
+ },
12938
+ endsWith(...args) {
12939
+ return this.check(_endsWith(...args));
12940
+ },
12941
+ min(...args) {
12942
+ return this.check(_minLength(...args));
12943
+ },
12944
+ max(...args) {
12945
+ return this.check(_maxLength(...args));
12946
+ },
12947
+ length(...args) {
12948
+ return this.check(_length(...args));
12949
+ },
12950
+ nonempty(...args) {
12951
+ return this.check(_minLength(1, ...args));
12952
+ },
12953
+ lowercase(params) {
12954
+ return this.check(_lowercase(params));
12955
+ },
12956
+ uppercase(params) {
12957
+ return this.check(_uppercase(params));
12958
+ },
12959
+ trim() {
12960
+ return this.check(_trim());
12961
+ },
12962
+ normalize(...args) {
12963
+ return this.check(_normalize(...args));
12964
+ },
12965
+ toLowerCase() {
12966
+ return this.check(_toLowerCase());
12967
+ },
12968
+ toUpperCase() {
12969
+ return this.check(_toUpperCase());
12970
+ },
12971
+ slugify() {
12972
+ return this.check(_slugify());
12973
+ }
12974
+ });
12331
12975
  });
12332
12976
  var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
12333
12977
  $ZodString.init(inst, def);
@@ -12406,7 +13050,7 @@ function url(params) {
12406
13050
  }
12407
13051
  function httpUrl(params) {
12408
13052
  return _url(ZodURL, {
12409
- protocol: /^https?$/,
13053
+ protocol: regexes_exports.httpProtocol,
12410
13054
  hostname: regexes_exports.domain,
12411
13055
  ...util_exports.normalizeParams(params)
12412
13056
  });
@@ -12548,21 +13192,53 @@ var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
12548
13192
  $ZodNumber.init(inst, def);
12549
13193
  ZodType.init(inst, def);
12550
13194
  inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
12551
- inst.gt = (value, params) => inst.check(_gt(value, params));
12552
- inst.gte = (value, params) => inst.check(_gte(value, params));
12553
- inst.min = (value, params) => inst.check(_gte(value, params));
12554
- inst.lt = (value, params) => inst.check(_lt(value, params));
12555
- inst.lte = (value, params) => inst.check(_lte(value, params));
12556
- inst.max = (value, params) => inst.check(_lte(value, params));
12557
- inst.int = (params) => inst.check(int(params));
12558
- inst.safe = (params) => inst.check(int(params));
12559
- inst.positive = (params) => inst.check(_gt(0, params));
12560
- inst.nonnegative = (params) => inst.check(_gte(0, params));
12561
- inst.negative = (params) => inst.check(_lt(0, params));
12562
- inst.nonpositive = (params) => inst.check(_lte(0, params));
12563
- inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
12564
- inst.step = (value, params) => inst.check(_multipleOf(value, params));
12565
- inst.finite = () => inst;
13195
+ _installLazyMethods(inst, "ZodNumber", {
13196
+ gt(value, params) {
13197
+ return this.check(_gt(value, params));
13198
+ },
13199
+ gte(value, params) {
13200
+ return this.check(_gte(value, params));
13201
+ },
13202
+ min(value, params) {
13203
+ return this.check(_gte(value, params));
13204
+ },
13205
+ lt(value, params) {
13206
+ return this.check(_lt(value, params));
13207
+ },
13208
+ lte(value, params) {
13209
+ return this.check(_lte(value, params));
13210
+ },
13211
+ max(value, params) {
13212
+ return this.check(_lte(value, params));
13213
+ },
13214
+ int(params) {
13215
+ return this.check(int(params));
13216
+ },
13217
+ safe(params) {
13218
+ return this.check(int(params));
13219
+ },
13220
+ positive(params) {
13221
+ return this.check(_gt(0, params));
13222
+ },
13223
+ nonnegative(params) {
13224
+ return this.check(_gte(0, params));
13225
+ },
13226
+ negative(params) {
13227
+ return this.check(_lt(0, params));
13228
+ },
13229
+ nonpositive(params) {
13230
+ return this.check(_lte(0, params));
13231
+ },
13232
+ multipleOf(value, params) {
13233
+ return this.check(_multipleOf(value, params));
13234
+ },
13235
+ step(value, params) {
13236
+ return this.check(_multipleOf(value, params));
13237
+ },
13238
+ finite() {
13239
+ return this;
13240
+ }
13241
+ });
12566
13242
  const bag = inst._zod.bag;
12567
13243
  inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
12568
13244
  inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
@@ -12709,11 +13385,23 @@ var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
12709
13385
  ZodType.init(inst, def);
12710
13386
  inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
12711
13387
  inst.element = def.element;
12712
- inst.min = (minLength, params) => inst.check(_minLength(minLength, params));
12713
- inst.nonempty = (params) => inst.check(_minLength(1, params));
12714
- inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params));
12715
- inst.length = (len, params) => inst.check(_length(len, params));
12716
- inst.unwrap = () => inst.element;
13388
+ _installLazyMethods(inst, "ZodArray", {
13389
+ min(n, params) {
13390
+ return this.check(_minLength(n, params));
13391
+ },
13392
+ nonempty(params) {
13393
+ return this.check(_minLength(1, params));
13394
+ },
13395
+ max(n, params) {
13396
+ return this.check(_maxLength(n, params));
13397
+ },
13398
+ length(n, params) {
13399
+ return this.check(_length(n, params));
13400
+ },
13401
+ unwrap() {
13402
+ return this.element;
13403
+ }
13404
+ });
12717
13405
  });
12718
13406
  function array(element, params) {
12719
13407
  return _array(ZodArray, element, params);
@@ -12729,23 +13417,47 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
12729
13417
  util_exports.defineLazy(inst, "shape", () => {
12730
13418
  return def.shape;
12731
13419
  });
12732
- inst.keyof = () => _enum2(Object.keys(inst._zod.def.shape));
12733
- inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall });
12734
- inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
12735
- inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
12736
- inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
12737
- inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 });
12738
- inst.extend = (incoming) => {
12739
- return util_exports.extend(inst, incoming);
12740
- };
12741
- inst.safeExtend = (incoming) => {
12742
- return util_exports.safeExtend(inst, incoming);
12743
- };
12744
- inst.merge = (other) => util_exports.merge(inst, other);
12745
- inst.pick = (mask) => util_exports.pick(inst, mask);
12746
- inst.omit = (mask) => util_exports.omit(inst, mask);
12747
- inst.partial = (...args) => util_exports.partial(ZodOptional, inst, args[0]);
12748
- inst.required = (...args) => util_exports.required(ZodNonOptional, inst, args[0]);
13420
+ _installLazyMethods(inst, "ZodObject", {
13421
+ keyof() {
13422
+ return _enum2(Object.keys(this._zod.def.shape));
13423
+ },
13424
+ catchall(catchall) {
13425
+ return this.clone({ ...this._zod.def, catchall });
13426
+ },
13427
+ passthrough() {
13428
+ return this.clone({ ...this._zod.def, catchall: unknown() });
13429
+ },
13430
+ loose() {
13431
+ return this.clone({ ...this._zod.def, catchall: unknown() });
13432
+ },
13433
+ strict() {
13434
+ return this.clone({ ...this._zod.def, catchall: never() });
13435
+ },
13436
+ strip() {
13437
+ return this.clone({ ...this._zod.def, catchall: void 0 });
13438
+ },
13439
+ extend(incoming) {
13440
+ return util_exports.extend(this, incoming);
13441
+ },
13442
+ safeExtend(incoming) {
13443
+ return util_exports.safeExtend(this, incoming);
13444
+ },
13445
+ merge(other) {
13446
+ return util_exports.merge(this, other);
13447
+ },
13448
+ pick(mask) {
13449
+ return util_exports.pick(this, mask);
13450
+ },
13451
+ omit(mask) {
13452
+ return util_exports.omit(this, mask);
13453
+ },
13454
+ partial(...args) {
13455
+ return util_exports.partial(ZodOptional, this, args[0]);
13456
+ },
13457
+ required(...args) {
13458
+ return util_exports.required(ZodNonOptional, this, args[0]);
13459
+ }
13460
+ });
12749
13461
  });
12750
13462
  function object(shape, params) {
12751
13463
  const def = {
@@ -12850,6 +13562,14 @@ var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
12850
13562
  inst.valueType = def.valueType;
12851
13563
  });
12852
13564
  function record(keyType, valueType, params) {
13565
+ if (!valueType || !valueType._zod) {
13566
+ return new ZodRecord({
13567
+ type: "record",
13568
+ keyType: string2(),
13569
+ valueType: keyType,
13570
+ ...util_exports.normalizeParams(valueType)
13571
+ });
13572
+ }
12853
13573
  return new ZodRecord({
12854
13574
  type: "record",
12855
13575
  keyType,
@@ -13021,10 +13741,12 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
13021
13741
  if (output instanceof Promise) {
13022
13742
  return output.then((output2) => {
13023
13743
  payload.value = output2;
13744
+ payload.fallback = true;
13024
13745
  return payload;
13025
13746
  });
13026
13747
  }
13027
13748
  payload.value = output;
13749
+ payload.fallback = true;
13028
13750
  return payload;
13029
13751
  };
13030
13752
  });
@@ -13179,6 +13901,20 @@ function codec(in_, out, params) {
13179
13901
  reverseTransform: params.encode
13180
13902
  });
13181
13903
  }
13904
+ function invertCodec(codec2) {
13905
+ const def = codec2._zod.def;
13906
+ return new ZodCodec({
13907
+ type: "pipe",
13908
+ in: def.out,
13909
+ out: def.in,
13910
+ transform: def.reverseTransform,
13911
+ reverseTransform: def.transform
13912
+ });
13913
+ }
13914
+ var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
13915
+ ZodPipe.init(inst, def);
13916
+ $ZodPreprocess.init(inst, def);
13917
+ });
13182
13918
  var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
13183
13919
  $ZodReadonly.init(inst, def);
13184
13920
  ZodType.init(inst, def);
@@ -13258,8 +13994,8 @@ function custom(fn, _params) {
13258
13994
  function refine(fn, _params = {}) {
13259
13995
  return _refine(ZodCustom, fn, _params);
13260
13996
  }
13261
- function superRefine(fn) {
13262
- return _superRefine(fn);
13997
+ function superRefine(fn, params) {
13998
+ return _superRefine(fn, params);
13263
13999
  }
13264
14000
  var describe2 = describe;
13265
14001
  var meta2 = meta;
@@ -13297,7 +14033,11 @@ function json(params) {
13297
14033
  return jsonSchema;
13298
14034
  }
13299
14035
  function preprocess(fn, schema) {
13300
- return pipe(transform(fn), schema);
14036
+ return new ZodPreprocess({
14037
+ type: "pipe",
14038
+ in: transform(fn),
14039
+ out: schema
14040
+ });
13301
14041
  }
13302
14042
 
13303
14043
  // ../../node_modules/zod/v4/classic/compat.js
@@ -13718,12 +14458,6 @@ function convertBaseSchema(schema, ctx) {
13718
14458
  default:
13719
14459
  throw new Error(`Unsupported type: ${type}`);
13720
14460
  }
13721
- if (schema.description) {
13722
- zodSchema = zodSchema.describe(schema.description);
13723
- }
13724
- if (schema.default !== void 0) {
13725
- zodSchema = zodSchema.default(schema.default);
13726
- }
13727
14461
  return zodSchema;
13728
14462
  }
13729
14463
  function convertSchema(schema, ctx) {
@@ -13760,6 +14494,9 @@ function convertSchema(schema, ctx) {
13760
14494
  if (schema.readOnly === true) {
13761
14495
  baseSchema = z.readonly(baseSchema);
13762
14496
  }
14497
+ if (schema.default !== void 0) {
14498
+ baseSchema = baseSchema.default(schema.default);
14499
+ }
13763
14500
  const extraMeta = {};
13764
14501
  const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
13765
14502
  for (const key of coreMetadataKeys) {
@@ -13781,23 +14518,32 @@ function convertSchema(schema, ctx) {
13781
14518
  if (Object.keys(extraMeta).length > 0) {
13782
14519
  ctx.registry.add(baseSchema, extraMeta);
13783
14520
  }
14521
+ if (schema.description) {
14522
+ baseSchema = baseSchema.describe(schema.description);
14523
+ }
13784
14524
  return baseSchema;
13785
14525
  }
13786
14526
  function fromJSONSchema(schema, params) {
13787
14527
  if (typeof schema === "boolean") {
13788
14528
  return schema ? z.any() : z.never();
13789
14529
  }
13790
- const version2 = detectVersion(schema, params?.defaultTarget);
13791
- const defs = schema.$defs || schema.definitions || {};
14530
+ let normalized;
14531
+ try {
14532
+ normalized = JSON.parse(JSON.stringify(schema));
14533
+ } catch {
14534
+ throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
14535
+ }
14536
+ const version2 = detectVersion(normalized, params?.defaultTarget);
14537
+ const defs = normalized.$defs || normalized.definitions || {};
13792
14538
  const ctx = {
13793
14539
  version: version2,
13794
14540
  defs,
13795
14541
  refs: /* @__PURE__ */ new Map(),
13796
14542
  processing: /* @__PURE__ */ new Set(),
13797
- rootSchema: schema,
14543
+ rootSchema: normalized,
13798
14544
  registry: params?.registry ?? globalRegistry
13799
14545
  };
13800
- return convertSchema(schema, ctx);
14546
+ return convertSchema(normalized, ctx);
13801
14547
  }
13802
14548
 
13803
14549
  // ../../node_modules/zod/v4/classic/coerce.js