@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.
- package/README.md +58 -6
- package/dist/async-context/index.cjs +1189 -440
- package/dist/async-context/index.cjs.map +1 -1
- package/dist/async-context/index.js +2 -2
- package/dist/{capture-error-BeuEXXJO.d.cts → capture-error-03qDnC5v.d.cts} +2 -2
- package/dist/{capture-error-D02pzB7q.d.ts → capture-error-CAfFUyIU.d.ts} +2 -2
- package/dist/{chunk-XG6WR2KS.js → chunk-6ST4QV7T.js} +3 -3
- package/dist/{chunk-6RKS3DNA.js → chunk-7LE2O4ZJ.js} +1153 -396
- package/dist/chunk-7LE2O4ZJ.js.map +1 -0
- package/dist/{chunk-RL43PU2X.js → chunk-F7A3QXCT.js} +2 -2
- package/dist/{chunk-M5GO2SSO.js → chunk-HMEHYSTS.js} +2 -2
- package/dist/{chunk-OXM2BZMF.js → chunk-LQZRGBN5.js} +2 -2
- package/dist/{chunk-QVTONMVZ.js → chunk-MP3QNDXQ.js} +2 -2
- package/dist/{chunk-D54FMQHF.js → chunk-VMK2G6QR.js} +2 -2
- package/dist/{chunk-DQFGNX3H.js → chunk-VWZMG3W2.js} +21 -20
- package/dist/chunk-VWZMG3W2.js.map +1 -0
- package/dist/{chunk-BSVWJSVX.js → chunk-XMD5OYD6.js} +2 -2
- package/dist/{chunk-FQ4SEG6Y.js → chunk-ZIYT2Y4B.js} +3 -3
- package/dist/cli/init.cjs +1266 -497
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.js +7 -7
- package/dist/cli/mcp-add.cjs +1171 -425
- package/dist/cli/mcp-add.cjs.map +1 -1
- package/dist/cli/mcp-add.js +3 -3
- package/dist/cli/uninit.js +3 -3
- package/dist/cli/upgrade-instructions.cjs +1 -1
- package/dist/cli/upgrade-instructions.js +3 -3
- package/dist/cli/validate.cjs +1168 -422
- package/dist/cli/validate.cjs.map +1 -1
- package/dist/cli/validate.js +2 -2
- package/dist/{correlation-id-NAapJ5jn.d.cts → correlation-id-CZ2bstzA.d.cts} +1 -1
- package/dist/{correlation-id-B_K8adD6.d.ts → correlation-id-YcfcqOru.d.ts} +1 -1
- package/dist/edge-entry.cjs +1197 -448
- package/dist/edge-entry.cjs.map +1 -1
- package/dist/edge-entry.d.cts +2 -2
- package/dist/edge-entry.d.ts +2 -2
- package/dist/edge-entry.js +4 -4
- package/dist/index.cjs +1352 -555
- package/dist/index.cjs.map +1 -1
- package/dist/{index.d-CkTf_boH.d.ts → index.d-BQIJ5Dvc.d.cts} +44 -9
- package/dist/{index.d-CkTf_boH.d.cts → index.d-BQIJ5Dvc.d.ts} +44 -9
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +26 -14
- package/dist/index.js.map +1 -1
- package/dist/middleware/index.cjs +1192 -443
- package/dist/middleware/index.cjs.map +1 -1
- package/dist/middleware/index.js +2 -2
- package/dist/node-entry.cjs +1323 -550
- package/dist/node-entry.cjs.map +1 -1
- package/dist/node-entry.d.cts +3 -3
- package/dist/node-entry.d.ts +3 -3
- package/dist/node-entry.js +7 -7
- package/dist/node-subpath.cjs +1168 -422
- package/dist/node-subpath.cjs.map +1 -1
- package/dist/node-subpath.d.cts +1 -1
- package/dist/node-subpath.d.ts +1 -1
- package/dist/node-subpath.js +3 -3
- package/dist/{source-map-uploader-CLYCE2TZ.js → source-map-uploader-NUONOEJG.js} +3 -3
- package/dist/trpc/index.cjs +1187 -438
- package/dist/trpc/index.cjs.map +1 -1
- package/dist/trpc/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-6RKS3DNA.js.map +0 -1
- package/dist/chunk-DQFGNX3H.js.map +0 -1
- /package/dist/{chunk-XG6WR2KS.js.map → chunk-6ST4QV7T.js.map} +0 -0
- /package/dist/{chunk-RL43PU2X.js.map → chunk-F7A3QXCT.js.map} +0 -0
- /package/dist/{chunk-M5GO2SSO.js.map → chunk-HMEHYSTS.js.map} +0 -0
- /package/dist/{chunk-OXM2BZMF.js.map → chunk-LQZRGBN5.js.map} +0 -0
- /package/dist/{chunk-QVTONMVZ.js.map → chunk-MP3QNDXQ.js.map} +0 -0
- /package/dist/{chunk-D54FMQHF.js.map → chunk-VMK2G6QR.js.map} +0 -0
- /package/dist/{chunk-BSVWJSVX.js.map → chunk-XMD5OYD6.js.map} +0 -0
- /package/dist/{chunk-FQ4SEG6Y.js.map → chunk-ZIYT2Y4B.js.map} +0 -0
- /package/dist/{source-map-uploader-CLYCE2TZ.js.map → source-map-uploader-NUONOEJG.js.map} +0 -0
package/dist/trpc/index.cjs
CHANGED
|
@@ -103,8 +103,8 @@ var init_semver = __esm({
|
|
|
103
103
|
|
|
104
104
|
// ../../node_modules/@opentelemetry/api/build/esm/internal/global-utils.js
|
|
105
105
|
function registerGlobal(type, instance, diag, allowOverride = false) {
|
|
106
|
-
var
|
|
107
|
-
const api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (
|
|
106
|
+
var _a3;
|
|
107
|
+
const api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a3 !== void 0 ? _a3 : {
|
|
108
108
|
version: VERSION
|
|
109
109
|
};
|
|
110
110
|
if (!allowOverride && api[type]) {
|
|
@@ -122,8 +122,8 @@ function registerGlobal(type, instance, diag, allowOverride = false) {
|
|
|
122
122
|
return true;
|
|
123
123
|
}
|
|
124
124
|
function getGlobal(type) {
|
|
125
|
-
var
|
|
126
|
-
const globalVersion = (
|
|
125
|
+
var _a3, _b;
|
|
126
|
+
const globalVersion = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a3 === void 0 ? void 0 : _a3.version;
|
|
127
127
|
if (!globalVersion || !isCompatible(globalVersion)) {
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
@@ -265,10 +265,10 @@ var init_diag = __esm({
|
|
|
265
265
|
}
|
|
266
266
|
const self2 = this;
|
|
267
267
|
const setLogger = (logger, optionsOrLogLevel = { logLevel: DiagLogLevel.INFO }) => {
|
|
268
|
-
var
|
|
268
|
+
var _a3, _b, _c;
|
|
269
269
|
if (logger === self2) {
|
|
270
270
|
const err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
|
|
271
|
-
self2.error((
|
|
271
|
+
self2.error((_a3 = err.stack) !== null && _a3 !== void 0 ? _a3 : err.message);
|
|
272
272
|
return false;
|
|
273
273
|
}
|
|
274
274
|
if (typeof optionsOrLogLevel === "number") {
|
|
@@ -528,8 +528,8 @@ function setSpanContext(context, spanContext) {
|
|
|
528
528
|
return setSpan(context, new NonRecordingSpan(spanContext));
|
|
529
529
|
}
|
|
530
530
|
function getSpanContext(context) {
|
|
531
|
-
var
|
|
532
|
-
return (
|
|
531
|
+
var _a3;
|
|
532
|
+
return (_a3 = getSpan(context)) === null || _a3 === void 0 ? void 0 : _a3.spanContext();
|
|
533
533
|
}
|
|
534
534
|
var SPAN_KEY;
|
|
535
535
|
var init_context_utils = __esm({
|
|
@@ -797,12 +797,12 @@ var init_ProxyTracerProvider = __esm({
|
|
|
797
797
|
* Get a {@link ProxyTracer}
|
|
798
798
|
*/
|
|
799
799
|
getTracer(name, version2, options) {
|
|
800
|
-
var
|
|
801
|
-
return (
|
|
800
|
+
var _a3;
|
|
801
|
+
return (_a3 = this.getDelegateTracer(name, version2, options)) !== null && _a3 !== void 0 ? _a3 : new ProxyTracer(this, name, version2, options);
|
|
802
802
|
}
|
|
803
803
|
getDelegate() {
|
|
804
|
-
var
|
|
805
|
-
return (
|
|
804
|
+
var _a3;
|
|
805
|
+
return (_a3 = this._delegate) !== null && _a3 !== void 0 ? _a3 : NOOP_TRACER_PROVIDER;
|
|
806
806
|
}
|
|
807
807
|
/**
|
|
808
808
|
* Set the delegate tracer provider
|
|
@@ -811,8 +811,8 @@ var init_ProxyTracerProvider = __esm({
|
|
|
811
811
|
this._delegate = delegate;
|
|
812
812
|
}
|
|
813
813
|
getDelegateTracer(name, version2, options) {
|
|
814
|
-
var
|
|
815
|
-
return (
|
|
814
|
+
var _a3;
|
|
815
|
+
return (_a3 = this._delegate) === null || _a3 === void 0 ? void 0 : _a3.getTracer(name, version2, options);
|
|
816
816
|
}
|
|
817
817
|
};
|
|
818
818
|
}
|
|
@@ -985,6 +985,7 @@ __export(external_exports, {
|
|
|
985
985
|
ZodOptional: () => ZodOptional,
|
|
986
986
|
ZodPipe: () => ZodPipe,
|
|
987
987
|
ZodPrefault: () => ZodPrefault,
|
|
988
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
988
989
|
ZodPromise: () => ZodPromise,
|
|
989
990
|
ZodReadonly: () => ZodReadonly,
|
|
990
991
|
ZodRealError: () => ZodRealError,
|
|
@@ -1063,6 +1064,7 @@ __export(external_exports, {
|
|
|
1063
1064
|
int32: () => int32,
|
|
1064
1065
|
int64: () => int64,
|
|
1065
1066
|
intersection: () => intersection,
|
|
1067
|
+
invertCodec: () => invertCodec,
|
|
1066
1068
|
ipv4: () => ipv42,
|
|
1067
1069
|
ipv6: () => ipv62,
|
|
1068
1070
|
iso: () => iso_exports,
|
|
@@ -1244,6 +1246,7 @@ __export(core_exports2, {
|
|
|
1244
1246
|
$ZodOptional: () => $ZodOptional,
|
|
1245
1247
|
$ZodPipe: () => $ZodPipe,
|
|
1246
1248
|
$ZodPrefault: () => $ZodPrefault,
|
|
1249
|
+
$ZodPreprocess: () => $ZodPreprocess,
|
|
1247
1250
|
$ZodPromise: () => $ZodPromise,
|
|
1248
1251
|
$ZodReadonly: () => $ZodReadonly,
|
|
1249
1252
|
$ZodRealError: () => $ZodRealError,
|
|
@@ -1443,7 +1446,8 @@ __export(core_exports2, {
|
|
|
1443
1446
|
});
|
|
1444
1447
|
|
|
1445
1448
|
// ../../node_modules/zod/v4/core/core.js
|
|
1446
|
-
var
|
|
1449
|
+
var _a;
|
|
1450
|
+
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
1447
1451
|
status: "aborted"
|
|
1448
1452
|
});
|
|
1449
1453
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1478,10 +1482,10 @@ function $constructor(name, initializer3, params) {
|
|
|
1478
1482
|
}
|
|
1479
1483
|
Object.defineProperty(Definition, "name", { value: name });
|
|
1480
1484
|
function _(def) {
|
|
1481
|
-
var
|
|
1485
|
+
var _a3;
|
|
1482
1486
|
const inst = params?.Parent ? new Definition() : this;
|
|
1483
1487
|
init(inst, def);
|
|
1484
|
-
(
|
|
1488
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
1485
1489
|
for (const fn of inst._zod.deferred) {
|
|
1486
1490
|
fn();
|
|
1487
1491
|
}
|
|
@@ -1510,7 +1514,8 @@ var $ZodEncodeError = class extends Error {
|
|
|
1510
1514
|
this.name = "ZodEncodeError";
|
|
1511
1515
|
}
|
|
1512
1516
|
};
|
|
1513
|
-
|
|
1517
|
+
(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
|
|
1518
|
+
var globalConfig = globalThis.__zod_globalConfig;
|
|
1514
1519
|
function config(newConfig) {
|
|
1515
1520
|
if (newConfig)
|
|
1516
1521
|
Object.assign(globalConfig, newConfig);
|
|
@@ -1543,6 +1548,7 @@ __export(util_exports, {
|
|
|
1543
1548
|
defineLazy: () => defineLazy,
|
|
1544
1549
|
esc: () => esc,
|
|
1545
1550
|
escapeRegex: () => escapeRegex,
|
|
1551
|
+
explicitlyAborted: () => explicitlyAborted,
|
|
1546
1552
|
extend: () => extend,
|
|
1547
1553
|
finalizeIssue: () => finalizeIssue,
|
|
1548
1554
|
floatSafeRemainder: () => floatSafeRemainder,
|
|
@@ -1631,19 +1637,12 @@ function cleanRegex(source) {
|
|
|
1631
1637
|
return source.slice(start, end);
|
|
1632
1638
|
}
|
|
1633
1639
|
function floatSafeRemainder(val, step) {
|
|
1634
|
-
const
|
|
1635
|
-
const
|
|
1636
|
-
|
|
1637
|
-
if (
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
stepDecCount = Number.parseInt(match[1]);
|
|
1641
|
-
}
|
|
1642
|
-
}
|
|
1643
|
-
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
1644
|
-
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
|
|
1645
|
-
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
|
1646
|
-
return valInt % stepInt / 10 ** decCount;
|
|
1640
|
+
const ratio = val / step;
|
|
1641
|
+
const roundedRatio = Math.round(ratio);
|
|
1642
|
+
const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
|
|
1643
|
+
if (Math.abs(ratio - roundedRatio) < tolerance)
|
|
1644
|
+
return 0;
|
|
1645
|
+
return ratio - roundedRatio;
|
|
1647
1646
|
}
|
|
1648
1647
|
var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
1649
1648
|
function defineLazy(object2, key, getter) {
|
|
@@ -1725,7 +1724,10 @@ var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace :
|
|
|
1725
1724
|
function isObject(data) {
|
|
1726
1725
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
1727
1726
|
}
|
|
1728
|
-
var allowsEval = cached(() => {
|
|
1727
|
+
var allowsEval = /* @__PURE__ */ cached(() => {
|
|
1728
|
+
if (globalConfig.jitless) {
|
|
1729
|
+
return false;
|
|
1730
|
+
}
|
|
1729
1731
|
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
|
|
1730
1732
|
return false;
|
|
1731
1733
|
}
|
|
@@ -1758,6 +1760,10 @@ function shallowClone(o) {
|
|
|
1758
1760
|
return { ...o };
|
|
1759
1761
|
if (Array.isArray(o))
|
|
1760
1762
|
return [...o];
|
|
1763
|
+
if (o instanceof Map)
|
|
1764
|
+
return new Map(o);
|
|
1765
|
+
if (o instanceof Set)
|
|
1766
|
+
return new Set(o);
|
|
1761
1767
|
return o;
|
|
1762
1768
|
}
|
|
1763
1769
|
function numKeys(data) {
|
|
@@ -1814,7 +1820,14 @@ var getParsedType = (data) => {
|
|
|
1814
1820
|
}
|
|
1815
1821
|
};
|
|
1816
1822
|
var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
1817
|
-
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
1823
|
+
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
1824
|
+
"string",
|
|
1825
|
+
"number",
|
|
1826
|
+
"bigint",
|
|
1827
|
+
"boolean",
|
|
1828
|
+
"symbol",
|
|
1829
|
+
"undefined"
|
|
1830
|
+
]);
|
|
1818
1831
|
function escapeRegex(str) {
|
|
1819
1832
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1820
1833
|
}
|
|
@@ -1983,6 +1996,9 @@ function safeExtend(schema, shape) {
|
|
|
1983
1996
|
return clone(schema, def);
|
|
1984
1997
|
}
|
|
1985
1998
|
function merge(a, b) {
|
|
1999
|
+
if (a._zod.def.checks?.length) {
|
|
2000
|
+
throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
2001
|
+
}
|
|
1986
2002
|
const def = mergeDefs(a._zod.def, {
|
|
1987
2003
|
get shape() {
|
|
1988
2004
|
const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
|
|
@@ -1992,8 +2008,7 @@ function merge(a, b) {
|
|
|
1992
2008
|
get catchall() {
|
|
1993
2009
|
return b._zod.def.catchall;
|
|
1994
2010
|
},
|
|
1995
|
-
checks: []
|
|
1996
|
-
// delete existing checks
|
|
2011
|
+
checks: b._zod.def.checks ?? []
|
|
1997
2012
|
});
|
|
1998
2013
|
return clone(a, def);
|
|
1999
2014
|
}
|
|
@@ -2076,10 +2091,20 @@ function aborted(x, startIndex = 0) {
|
|
|
2076
2091
|
}
|
|
2077
2092
|
return false;
|
|
2078
2093
|
}
|
|
2094
|
+
function explicitlyAborted(x, startIndex = 0) {
|
|
2095
|
+
if (x.aborted === true)
|
|
2096
|
+
return true;
|
|
2097
|
+
for (let i = startIndex; i < x.issues.length; i++) {
|
|
2098
|
+
if (x.issues[i]?.continue === false) {
|
|
2099
|
+
return true;
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
return false;
|
|
2103
|
+
}
|
|
2079
2104
|
function prefixIssues(path, issues) {
|
|
2080
2105
|
return issues.map((iss) => {
|
|
2081
|
-
var
|
|
2082
|
-
(
|
|
2106
|
+
var _a3;
|
|
2107
|
+
(_a3 = iss).path ?? (_a3.path = []);
|
|
2083
2108
|
iss.path.unshift(path);
|
|
2084
2109
|
return iss;
|
|
2085
2110
|
});
|
|
@@ -2088,17 +2113,14 @@ function unwrapMessage(message) {
|
|
|
2088
2113
|
return typeof message === "string" ? message : message?.message;
|
|
2089
2114
|
}
|
|
2090
2115
|
function finalizeIssue(iss, ctx, config2) {
|
|
2091
|
-
const
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2116
|
+
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";
|
|
2117
|
+
const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
|
|
2118
|
+
rest.path ?? (rest.path = []);
|
|
2119
|
+
rest.message = message;
|
|
2120
|
+
if (ctx?.reportInput) {
|
|
2121
|
+
rest.input = _input;
|
|
2095
2122
|
}
|
|
2096
|
-
|
|
2097
|
-
delete full.continue;
|
|
2098
|
-
if (!ctx?.reportInput) {
|
|
2099
|
-
delete full.input;
|
|
2100
|
-
}
|
|
2101
|
-
return full;
|
|
2123
|
+
return rest;
|
|
2102
2124
|
}
|
|
2103
2125
|
function getSizableOrigin(input) {
|
|
2104
2126
|
if (input instanceof Set)
|
|
@@ -2215,10 +2237,10 @@ var initializer = (inst, def) => {
|
|
|
2215
2237
|
};
|
|
2216
2238
|
var $ZodError = $constructor("$ZodError", initializer);
|
|
2217
2239
|
var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
|
|
2218
|
-
function flattenError(
|
|
2240
|
+
function flattenError(error51, mapper = (issue2) => issue2.message) {
|
|
2219
2241
|
const fieldErrors = {};
|
|
2220
2242
|
const formErrors = [];
|
|
2221
|
-
for (const sub of
|
|
2243
|
+
for (const sub of error51.issues) {
|
|
2222
2244
|
if (sub.path.length > 0) {
|
|
2223
2245
|
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
2224
2246
|
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
@@ -2228,50 +2250,53 @@ function flattenError(error48, mapper = (issue2) => issue2.message) {
|
|
|
2228
2250
|
}
|
|
2229
2251
|
return { formErrors, fieldErrors };
|
|
2230
2252
|
}
|
|
2231
|
-
function formatError(
|
|
2253
|
+
function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
2232
2254
|
const fieldErrors = { _errors: [] };
|
|
2233
|
-
const processError = (
|
|
2234
|
-
for (const issue2 of
|
|
2255
|
+
const processError = (error52, path = []) => {
|
|
2256
|
+
for (const issue2 of error52.issues) {
|
|
2235
2257
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
2236
|
-
issue2.errors.map((issues) => processError({ issues }));
|
|
2258
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
2237
2259
|
} else if (issue2.code === "invalid_key") {
|
|
2238
|
-
processError({ issues: issue2.issues });
|
|
2260
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
2239
2261
|
} else if (issue2.code === "invalid_element") {
|
|
2240
|
-
processError({ issues: issue2.issues });
|
|
2241
|
-
} else if (issue2.path.length === 0) {
|
|
2242
|
-
fieldErrors._errors.push(mapper(issue2));
|
|
2262
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
2243
2263
|
} else {
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2264
|
+
const fullpath = [...path, ...issue2.path];
|
|
2265
|
+
if (fullpath.length === 0) {
|
|
2266
|
+
fieldErrors._errors.push(mapper(issue2));
|
|
2267
|
+
} else {
|
|
2268
|
+
let curr = fieldErrors;
|
|
2269
|
+
let i = 0;
|
|
2270
|
+
while (i < fullpath.length) {
|
|
2271
|
+
const el = fullpath[i];
|
|
2272
|
+
const terminal = i === fullpath.length - 1;
|
|
2273
|
+
if (!terminal) {
|
|
2274
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
2275
|
+
} else {
|
|
2276
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
2277
|
+
curr[el]._errors.push(mapper(issue2));
|
|
2278
|
+
}
|
|
2279
|
+
curr = curr[el];
|
|
2280
|
+
i++;
|
|
2254
2281
|
}
|
|
2255
|
-
curr = curr[el];
|
|
2256
|
-
i++;
|
|
2257
2282
|
}
|
|
2258
2283
|
}
|
|
2259
2284
|
}
|
|
2260
2285
|
};
|
|
2261
|
-
processError(
|
|
2286
|
+
processError(error51);
|
|
2262
2287
|
return fieldErrors;
|
|
2263
2288
|
}
|
|
2264
|
-
function treeifyError(
|
|
2289
|
+
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
2265
2290
|
const result = { errors: [] };
|
|
2266
|
-
const processError = (
|
|
2267
|
-
var
|
|
2268
|
-
for (const issue2 of
|
|
2291
|
+
const processError = (error52, path = []) => {
|
|
2292
|
+
var _a3, _b;
|
|
2293
|
+
for (const issue2 of error52.issues) {
|
|
2269
2294
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
2270
|
-
issue2.errors.map((issues) => processError({ issues }, issue2.path));
|
|
2295
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
2271
2296
|
} else if (issue2.code === "invalid_key") {
|
|
2272
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
2297
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
2273
2298
|
} else if (issue2.code === "invalid_element") {
|
|
2274
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
2299
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
2275
2300
|
} else {
|
|
2276
2301
|
const fullpath = [...path, ...issue2.path];
|
|
2277
2302
|
if (fullpath.length === 0) {
|
|
@@ -2285,7 +2310,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
2285
2310
|
const terminal = i === fullpath.length - 1;
|
|
2286
2311
|
if (typeof el === "string") {
|
|
2287
2312
|
curr.properties ?? (curr.properties = {});
|
|
2288
|
-
(
|
|
2313
|
+
(_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
|
|
2289
2314
|
curr = curr.properties[el];
|
|
2290
2315
|
} else {
|
|
2291
2316
|
curr.items ?? (curr.items = []);
|
|
@@ -2300,7 +2325,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
2300
2325
|
}
|
|
2301
2326
|
}
|
|
2302
2327
|
};
|
|
2303
|
-
processError(
|
|
2328
|
+
processError(error51);
|
|
2304
2329
|
return result;
|
|
2305
2330
|
}
|
|
2306
2331
|
function toDotPath(_path) {
|
|
@@ -2321,9 +2346,9 @@ function toDotPath(_path) {
|
|
|
2321
2346
|
}
|
|
2322
2347
|
return segs.join("");
|
|
2323
2348
|
}
|
|
2324
|
-
function prettifyError(
|
|
2349
|
+
function prettifyError(error51) {
|
|
2325
2350
|
const lines = [];
|
|
2326
|
-
const issues = [...
|
|
2351
|
+
const issues = [...error51.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
|
|
2327
2352
|
for (const issue2 of issues) {
|
|
2328
2353
|
lines.push(`\u2716 ${issue2.message}`);
|
|
2329
2354
|
if (issue2.path?.length)
|
|
@@ -2334,7 +2359,7 @@ function prettifyError(error48) {
|
|
|
2334
2359
|
|
|
2335
2360
|
// ../../node_modules/zod/v4/core/parse.js
|
|
2336
2361
|
var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
2337
|
-
const ctx = _ctx ?
|
|
2362
|
+
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
2338
2363
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
2339
2364
|
if (result instanceof Promise) {
|
|
2340
2365
|
throw new $ZodAsyncError();
|
|
@@ -2348,7 +2373,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
2348
2373
|
};
|
|
2349
2374
|
var parse = /* @__PURE__ */ _parse($ZodRealError);
|
|
2350
2375
|
var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
2351
|
-
const ctx = _ctx ?
|
|
2376
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
2352
2377
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
2353
2378
|
if (result instanceof Promise)
|
|
2354
2379
|
result = await result;
|
|
@@ -2373,7 +2398,7 @@ var _safeParse = (_Err) => (schema, value, _ctx) => {
|
|
|
2373
2398
|
};
|
|
2374
2399
|
var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
|
|
2375
2400
|
var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
2376
|
-
const ctx = _ctx ?
|
|
2401
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
2377
2402
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
2378
2403
|
if (result instanceof Promise)
|
|
2379
2404
|
result = await result;
|
|
@@ -2384,7 +2409,7 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
2384
2409
|
};
|
|
2385
2410
|
var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
2386
2411
|
var _encode = (_Err) => (schema, value, _ctx) => {
|
|
2387
|
-
const ctx = _ctx ?
|
|
2412
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
2388
2413
|
return _parse(_Err)(schema, value, ctx);
|
|
2389
2414
|
};
|
|
2390
2415
|
var encode = /* @__PURE__ */ _encode($ZodRealError);
|
|
@@ -2393,7 +2418,7 @@ var _decode = (_Err) => (schema, value, _ctx) => {
|
|
|
2393
2418
|
};
|
|
2394
2419
|
var decode = /* @__PURE__ */ _decode($ZodRealError);
|
|
2395
2420
|
var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
2396
|
-
const ctx = _ctx ?
|
|
2421
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
2397
2422
|
return _parseAsync(_Err)(schema, value, ctx);
|
|
2398
2423
|
};
|
|
2399
2424
|
var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
|
|
@@ -2402,7 +2427,7 @@ var _decodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
2402
2427
|
};
|
|
2403
2428
|
var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
|
|
2404
2429
|
var _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
2405
|
-
const ctx = _ctx ?
|
|
2430
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
2406
2431
|
return _safeParse(_Err)(schema, value, ctx);
|
|
2407
2432
|
};
|
|
2408
2433
|
var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
|
|
@@ -2411,7 +2436,7 @@ var _safeDecode = (_Err) => (schema, value, _ctx) => {
|
|
|
2411
2436
|
};
|
|
2412
2437
|
var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
|
|
2413
2438
|
var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
2414
|
-
const ctx = _ctx ?
|
|
2439
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
2415
2440
|
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
2416
2441
|
};
|
|
2417
2442
|
var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
|
|
@@ -2444,6 +2469,7 @@ __export(regexes_exports, {
|
|
|
2444
2469
|
hex: () => hex,
|
|
2445
2470
|
hostname: () => hostname,
|
|
2446
2471
|
html5Email: () => html5Email,
|
|
2472
|
+
httpProtocol: () => httpProtocol,
|
|
2447
2473
|
idnEmail: () => idnEmail,
|
|
2448
2474
|
integer: () => integer,
|
|
2449
2475
|
ipv4: () => ipv4,
|
|
@@ -2482,7 +2508,7 @@ __export(regexes_exports, {
|
|
|
2482
2508
|
uuid7: () => uuid7,
|
|
2483
2509
|
xid: () => xid
|
|
2484
2510
|
});
|
|
2485
|
-
var cuid = /^[cC][
|
|
2511
|
+
var cuid = /^[cC][0-9a-z]{6,}$/;
|
|
2486
2512
|
var cuid2 = /^[0-9a-z]+$/;
|
|
2487
2513
|
var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
2488
2514
|
var xid = /^[0-9a-vA-V]{20}$/;
|
|
@@ -2521,6 +2547,7 @@ var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/
|
|
|
2521
2547
|
var base64url = /^[A-Za-z0-9_-]*$/;
|
|
2522
2548
|
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])?)*\.?$/;
|
|
2523
2549
|
var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
|
|
2550
|
+
var httpProtocol = /^https?$/;
|
|
2524
2551
|
var e164 = /^\+[1-9]\d{6,14}$/;
|
|
2525
2552
|
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])))`;
|
|
2526
2553
|
var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
@@ -2579,10 +2606,10 @@ var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
|
2579
2606
|
|
|
2580
2607
|
// ../../node_modules/zod/v4/core/checks.js
|
|
2581
2608
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
2582
|
-
var
|
|
2609
|
+
var _a3;
|
|
2583
2610
|
inst._zod ?? (inst._zod = {});
|
|
2584
2611
|
inst._zod.def = def;
|
|
2585
|
-
(
|
|
2612
|
+
(_a3 = inst._zod).onattach ?? (_a3.onattach = []);
|
|
2586
2613
|
});
|
|
2587
2614
|
var numericOriginMap = {
|
|
2588
2615
|
number: "number",
|
|
@@ -2648,8 +2675,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
|
|
|
2648
2675
|
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
2649
2676
|
$ZodCheck.init(inst, def);
|
|
2650
2677
|
inst._zod.onattach.push((inst2) => {
|
|
2651
|
-
var
|
|
2652
|
-
(
|
|
2678
|
+
var _a3;
|
|
2679
|
+
(_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
|
|
2653
2680
|
});
|
|
2654
2681
|
inst._zod.check = (payload) => {
|
|
2655
2682
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -2782,9 +2809,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
2782
2809
|
};
|
|
2783
2810
|
});
|
|
2784
2811
|
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
2785
|
-
var
|
|
2812
|
+
var _a3;
|
|
2786
2813
|
$ZodCheck.init(inst, def);
|
|
2787
|
-
(
|
|
2814
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2788
2815
|
const val = payload.value;
|
|
2789
2816
|
return !nullish(val) && val.size !== void 0;
|
|
2790
2817
|
});
|
|
@@ -2810,9 +2837,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
2810
2837
|
};
|
|
2811
2838
|
});
|
|
2812
2839
|
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
2813
|
-
var
|
|
2840
|
+
var _a3;
|
|
2814
2841
|
$ZodCheck.init(inst, def);
|
|
2815
|
-
(
|
|
2842
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2816
2843
|
const val = payload.value;
|
|
2817
2844
|
return !nullish(val) && val.size !== void 0;
|
|
2818
2845
|
});
|
|
@@ -2838,9 +2865,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
2838
2865
|
};
|
|
2839
2866
|
});
|
|
2840
2867
|
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
2841
|
-
var
|
|
2868
|
+
var _a3;
|
|
2842
2869
|
$ZodCheck.init(inst, def);
|
|
2843
|
-
(
|
|
2870
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2844
2871
|
const val = payload.value;
|
|
2845
2872
|
return !nullish(val) && val.size !== void 0;
|
|
2846
2873
|
});
|
|
@@ -2868,9 +2895,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
|
|
|
2868
2895
|
};
|
|
2869
2896
|
});
|
|
2870
2897
|
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
2871
|
-
var
|
|
2898
|
+
var _a3;
|
|
2872
2899
|
$ZodCheck.init(inst, def);
|
|
2873
|
-
(
|
|
2900
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2874
2901
|
const val = payload.value;
|
|
2875
2902
|
return !nullish(val) && val.length !== void 0;
|
|
2876
2903
|
});
|
|
@@ -2897,9 +2924,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
2897
2924
|
};
|
|
2898
2925
|
});
|
|
2899
2926
|
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
2900
|
-
var
|
|
2927
|
+
var _a3;
|
|
2901
2928
|
$ZodCheck.init(inst, def);
|
|
2902
|
-
(
|
|
2929
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2903
2930
|
const val = payload.value;
|
|
2904
2931
|
return !nullish(val) && val.length !== void 0;
|
|
2905
2932
|
});
|
|
@@ -2926,9 +2953,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
2926
2953
|
};
|
|
2927
2954
|
});
|
|
2928
2955
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
2929
|
-
var
|
|
2956
|
+
var _a3;
|
|
2930
2957
|
$ZodCheck.init(inst, def);
|
|
2931
|
-
(
|
|
2958
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2932
2959
|
const val = payload.value;
|
|
2933
2960
|
return !nullish(val) && val.length !== void 0;
|
|
2934
2961
|
});
|
|
@@ -2957,7 +2984,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
2957
2984
|
};
|
|
2958
2985
|
});
|
|
2959
2986
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
2960
|
-
var
|
|
2987
|
+
var _a3, _b;
|
|
2961
2988
|
$ZodCheck.init(inst, def);
|
|
2962
2989
|
inst._zod.onattach.push((inst2) => {
|
|
2963
2990
|
const bag = inst2._zod.bag;
|
|
@@ -2968,7 +2995,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
2968
2995
|
}
|
|
2969
2996
|
});
|
|
2970
2997
|
if (def.pattern)
|
|
2971
|
-
(
|
|
2998
|
+
(_a3 = inst._zod).check ?? (_a3.check = (payload) => {
|
|
2972
2999
|
def.pattern.lastIndex = 0;
|
|
2973
3000
|
if (def.pattern.test(payload.value))
|
|
2974
3001
|
return;
|
|
@@ -3164,13 +3191,13 @@ var Doc = class {
|
|
|
3164
3191
|
// ../../node_modules/zod/v4/core/versions.js
|
|
3165
3192
|
var version = {
|
|
3166
3193
|
major: 4,
|
|
3167
|
-
minor:
|
|
3168
|
-
patch:
|
|
3194
|
+
minor: 4,
|
|
3195
|
+
patch: 3
|
|
3169
3196
|
};
|
|
3170
3197
|
|
|
3171
3198
|
// ../../node_modules/zod/v4/core/schemas.js
|
|
3172
3199
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
3173
|
-
var
|
|
3200
|
+
var _a3;
|
|
3174
3201
|
inst ?? (inst = {});
|
|
3175
3202
|
inst._zod.def = def;
|
|
3176
3203
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -3185,7 +3212,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
3185
3212
|
}
|
|
3186
3213
|
}
|
|
3187
3214
|
if (checks.length === 0) {
|
|
3188
|
-
(
|
|
3215
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
3189
3216
|
inst._zod.deferred?.push(() => {
|
|
3190
3217
|
inst._zod.run = inst._zod.parse;
|
|
3191
3218
|
});
|
|
@@ -3195,6 +3222,8 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
3195
3222
|
let asyncResult;
|
|
3196
3223
|
for (const ch of checks2) {
|
|
3197
3224
|
if (ch._zod.def.when) {
|
|
3225
|
+
if (explicitlyAborted(payload))
|
|
3226
|
+
continue;
|
|
3198
3227
|
const shouldRun = ch._zod.def.when(payload);
|
|
3199
3228
|
if (!shouldRun)
|
|
3200
3229
|
continue;
|
|
@@ -3335,6 +3364,19 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
3335
3364
|
inst._zod.check = (payload) => {
|
|
3336
3365
|
try {
|
|
3337
3366
|
const trimmed = payload.value.trim();
|
|
3367
|
+
if (!def.normalize && def.protocol?.source === httpProtocol.source) {
|
|
3368
|
+
if (!/^https?:\/\//i.test(trimmed)) {
|
|
3369
|
+
payload.issues.push({
|
|
3370
|
+
code: "invalid_format",
|
|
3371
|
+
format: "url",
|
|
3372
|
+
note: "Invalid URL format",
|
|
3373
|
+
input: payload.value,
|
|
3374
|
+
inst,
|
|
3375
|
+
continue: !def.abort
|
|
3376
|
+
});
|
|
3377
|
+
return;
|
|
3378
|
+
}
|
|
3379
|
+
}
|
|
3338
3380
|
const url2 = new URL(trimmed);
|
|
3339
3381
|
if (def.hostname) {
|
|
3340
3382
|
def.hostname.lastIndex = 0;
|
|
@@ -3488,6 +3530,8 @@ var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
|
|
|
3488
3530
|
function isValidBase64(data) {
|
|
3489
3531
|
if (data === "")
|
|
3490
3532
|
return true;
|
|
3533
|
+
if (/\s/.test(data))
|
|
3534
|
+
return false;
|
|
3491
3535
|
if (data.length % 4 !== 0)
|
|
3492
3536
|
return false;
|
|
3493
3537
|
try {
|
|
@@ -3680,8 +3724,6 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
|
|
|
3680
3724
|
$ZodType.init(inst, def);
|
|
3681
3725
|
inst._zod.pattern = _undefined;
|
|
3682
3726
|
inst._zod.values = /* @__PURE__ */ new Set([void 0]);
|
|
3683
|
-
inst._zod.optin = "optional";
|
|
3684
|
-
inst._zod.optout = "optional";
|
|
3685
3727
|
inst._zod.parse = (payload, _ctx) => {
|
|
3686
3728
|
const input = payload.value;
|
|
3687
3729
|
if (typeof input === "undefined")
|
|
@@ -3810,15 +3852,27 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
3810
3852
|
return payload;
|
|
3811
3853
|
};
|
|
3812
3854
|
});
|
|
3813
|
-
function handlePropertyResult(result, final, key, input, isOptionalOut) {
|
|
3855
|
+
function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
|
|
3856
|
+
const isPresent = key in input;
|
|
3814
3857
|
if (result.issues.length) {
|
|
3815
|
-
if (isOptionalOut && !
|
|
3858
|
+
if (isOptionalIn && isOptionalOut && !isPresent) {
|
|
3816
3859
|
return;
|
|
3817
3860
|
}
|
|
3818
3861
|
final.issues.push(...prefixIssues(key, result.issues));
|
|
3819
3862
|
}
|
|
3863
|
+
if (!isPresent && !isOptionalIn) {
|
|
3864
|
+
if (!result.issues.length) {
|
|
3865
|
+
final.issues.push({
|
|
3866
|
+
code: "invalid_type",
|
|
3867
|
+
expected: "nonoptional",
|
|
3868
|
+
input: void 0,
|
|
3869
|
+
path: [key]
|
|
3870
|
+
});
|
|
3871
|
+
}
|
|
3872
|
+
return;
|
|
3873
|
+
}
|
|
3820
3874
|
if (result.value === void 0) {
|
|
3821
|
-
if (
|
|
3875
|
+
if (isPresent) {
|
|
3822
3876
|
final.value[key] = void 0;
|
|
3823
3877
|
}
|
|
3824
3878
|
} else {
|
|
@@ -3846,8 +3900,11 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
3846
3900
|
const keySet = def.keySet;
|
|
3847
3901
|
const _catchall = def.catchall._zod;
|
|
3848
3902
|
const t = _catchall.def.type;
|
|
3903
|
+
const isOptionalIn = _catchall.optin === "optional";
|
|
3849
3904
|
const isOptionalOut = _catchall.optout === "optional";
|
|
3850
3905
|
for (const key in input) {
|
|
3906
|
+
if (key === "__proto__")
|
|
3907
|
+
continue;
|
|
3851
3908
|
if (keySet.has(key))
|
|
3852
3909
|
continue;
|
|
3853
3910
|
if (t === "never") {
|
|
@@ -3856,9 +3913,9 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
3856
3913
|
}
|
|
3857
3914
|
const r = _catchall.run({ value: input[key], issues: [] }, ctx);
|
|
3858
3915
|
if (r instanceof Promise) {
|
|
3859
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
3916
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
3860
3917
|
} else {
|
|
3861
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
3918
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
3862
3919
|
}
|
|
3863
3920
|
}
|
|
3864
3921
|
if (unrecognized.length) {
|
|
@@ -3924,12 +3981,13 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
3924
3981
|
const shape = value.shape;
|
|
3925
3982
|
for (const key of value.keys) {
|
|
3926
3983
|
const el = shape[key];
|
|
3984
|
+
const isOptionalIn = el._zod.optin === "optional";
|
|
3927
3985
|
const isOptionalOut = el._zod.optout === "optional";
|
|
3928
3986
|
const r = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
3929
3987
|
if (r instanceof Promise) {
|
|
3930
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
3988
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
3931
3989
|
} else {
|
|
3932
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
3990
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
3933
3991
|
}
|
|
3934
3992
|
}
|
|
3935
3993
|
if (!catchall) {
|
|
@@ -3960,9 +4018,10 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
3960
4018
|
const id = ids[key];
|
|
3961
4019
|
const k = esc(key);
|
|
3962
4020
|
const schema = shape[key];
|
|
4021
|
+
const isOptionalIn = schema?._zod?.optin === "optional";
|
|
3963
4022
|
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
3964
4023
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
3965
|
-
if (isOptionalOut) {
|
|
4024
|
+
if (isOptionalIn && isOptionalOut) {
|
|
3966
4025
|
doc.write(`
|
|
3967
4026
|
if (${id}.issues.length) {
|
|
3968
4027
|
if (${k} in input) {
|
|
@@ -3981,6 +4040,33 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
3981
4040
|
newResult[${k}] = ${id}.value;
|
|
3982
4041
|
}
|
|
3983
4042
|
|
|
4043
|
+
`);
|
|
4044
|
+
} else if (!isOptionalIn) {
|
|
4045
|
+
doc.write(`
|
|
4046
|
+
const ${id}_present = ${k} in input;
|
|
4047
|
+
if (${id}.issues.length) {
|
|
4048
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
4049
|
+
...iss,
|
|
4050
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
4051
|
+
})));
|
|
4052
|
+
}
|
|
4053
|
+
if (!${id}_present && !${id}.issues.length) {
|
|
4054
|
+
payload.issues.push({
|
|
4055
|
+
code: "invalid_type",
|
|
4056
|
+
expected: "nonoptional",
|
|
4057
|
+
input: undefined,
|
|
4058
|
+
path: [${k}]
|
|
4059
|
+
});
|
|
4060
|
+
}
|
|
4061
|
+
|
|
4062
|
+
if (${id}_present) {
|
|
4063
|
+
if (${id}.value === undefined) {
|
|
4064
|
+
newResult[${k}] = undefined;
|
|
4065
|
+
} else {
|
|
4066
|
+
newResult[${k}] = ${id}.value;
|
|
4067
|
+
}
|
|
4068
|
+
}
|
|
4069
|
+
|
|
3984
4070
|
`);
|
|
3985
4071
|
} else {
|
|
3986
4072
|
doc.write(`
|
|
@@ -4074,10 +4160,9 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
|
4074
4160
|
}
|
|
4075
4161
|
return void 0;
|
|
4076
4162
|
});
|
|
4077
|
-
const
|
|
4078
|
-
const first = def.options[0]._zod.run;
|
|
4163
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
4079
4164
|
inst._zod.parse = (payload, ctx) => {
|
|
4080
|
-
if (
|
|
4165
|
+
if (first) {
|
|
4081
4166
|
return first(payload, ctx);
|
|
4082
4167
|
}
|
|
4083
4168
|
let async = false;
|
|
@@ -4130,10 +4215,9 @@ function handleExclusiveUnionResults(results, final, inst, ctx) {
|
|
|
4130
4215
|
var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
|
|
4131
4216
|
$ZodUnion.init(inst, def);
|
|
4132
4217
|
def.inclusive = false;
|
|
4133
|
-
const
|
|
4134
|
-
const first = def.options[0]._zod.run;
|
|
4218
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
4135
4219
|
inst._zod.parse = (payload, ctx) => {
|
|
4136
|
-
if (
|
|
4220
|
+
if (first) {
|
|
4137
4221
|
return first(payload, ctx);
|
|
4138
4222
|
}
|
|
4139
4223
|
let async = false;
|
|
@@ -4208,7 +4292,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
4208
4292
|
if (opt) {
|
|
4209
4293
|
return opt._zod.run(payload, ctx);
|
|
4210
4294
|
}
|
|
4211
|
-
if (def.unionFallback) {
|
|
4295
|
+
if (def.unionFallback || ctx.direction === "backward") {
|
|
4212
4296
|
return _super(payload, ctx);
|
|
4213
4297
|
}
|
|
4214
4298
|
payload.issues.push({
|
|
@@ -4216,6 +4300,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
4216
4300
|
errors: [],
|
|
4217
4301
|
note: "No matching discriminator",
|
|
4218
4302
|
discriminator: def.discriminator,
|
|
4303
|
+
options: Array.from(disc.value.keys()),
|
|
4219
4304
|
input,
|
|
4220
4305
|
path: [def.discriminator],
|
|
4221
4306
|
inst
|
|
@@ -4337,64 +4422,96 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
4337
4422
|
}
|
|
4338
4423
|
payload.value = [];
|
|
4339
4424
|
const proms = [];
|
|
4340
|
-
const
|
|
4341
|
-
const
|
|
4425
|
+
const optinStart = getTupleOptStart(items, "optin");
|
|
4426
|
+
const optoutStart = getTupleOptStart(items, "optout");
|
|
4342
4427
|
if (!def.rest) {
|
|
4343
|
-
|
|
4344
|
-
const tooSmall = input.length < optStart - 1;
|
|
4345
|
-
if (tooBig || tooSmall) {
|
|
4428
|
+
if (input.length < optinStart) {
|
|
4346
4429
|
payload.issues.push({
|
|
4347
|
-
|
|
4430
|
+
code: "too_small",
|
|
4431
|
+
minimum: optinStart,
|
|
4432
|
+
inclusive: true,
|
|
4348
4433
|
input,
|
|
4349
4434
|
inst,
|
|
4350
4435
|
origin: "array"
|
|
4351
4436
|
});
|
|
4352
4437
|
return payload;
|
|
4353
4438
|
}
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4439
|
+
if (input.length > items.length) {
|
|
4440
|
+
payload.issues.push({
|
|
4441
|
+
code: "too_big",
|
|
4442
|
+
maximum: items.length,
|
|
4443
|
+
inclusive: true,
|
|
4444
|
+
input,
|
|
4445
|
+
inst,
|
|
4446
|
+
origin: "array"
|
|
4447
|
+
});
|
|
4361
4448
|
}
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
}, ctx);
|
|
4366
|
-
if (
|
|
4367
|
-
proms.push(
|
|
4449
|
+
}
|
|
4450
|
+
const itemResults = new Array(items.length);
|
|
4451
|
+
for (let i = 0; i < items.length; i++) {
|
|
4452
|
+
const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
|
|
4453
|
+
if (r instanceof Promise) {
|
|
4454
|
+
proms.push(r.then((rr) => {
|
|
4455
|
+
itemResults[i] = rr;
|
|
4456
|
+
}));
|
|
4368
4457
|
} else {
|
|
4369
|
-
|
|
4458
|
+
itemResults[i] = r;
|
|
4370
4459
|
}
|
|
4371
4460
|
}
|
|
4372
4461
|
if (def.rest) {
|
|
4462
|
+
let i = items.length - 1;
|
|
4373
4463
|
const rest = input.slice(items.length);
|
|
4374
4464
|
for (const el of rest) {
|
|
4375
4465
|
i++;
|
|
4376
|
-
const result = def.rest._zod.run({
|
|
4377
|
-
value: el,
|
|
4378
|
-
issues: []
|
|
4379
|
-
}, ctx);
|
|
4466
|
+
const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
|
|
4380
4467
|
if (result instanceof Promise) {
|
|
4381
|
-
proms.push(result.then((
|
|
4468
|
+
proms.push(result.then((r) => handleTupleResult(r, payload, i)));
|
|
4382
4469
|
} else {
|
|
4383
4470
|
handleTupleResult(result, payload, i);
|
|
4384
4471
|
}
|
|
4385
4472
|
}
|
|
4386
4473
|
}
|
|
4387
|
-
if (proms.length)
|
|
4388
|
-
return Promise.all(proms).then(() => payload);
|
|
4389
|
-
|
|
4474
|
+
if (proms.length) {
|
|
4475
|
+
return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
|
|
4476
|
+
}
|
|
4477
|
+
return handleTupleResults(itemResults, payload, items, input, optoutStart);
|
|
4390
4478
|
};
|
|
4391
4479
|
});
|
|
4480
|
+
function getTupleOptStart(items, key) {
|
|
4481
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
4482
|
+
if (items[i]._zod[key] !== "optional")
|
|
4483
|
+
return i + 1;
|
|
4484
|
+
}
|
|
4485
|
+
return 0;
|
|
4486
|
+
}
|
|
4392
4487
|
function handleTupleResult(result, final, index) {
|
|
4393
4488
|
if (result.issues.length) {
|
|
4394
4489
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
4395
4490
|
}
|
|
4396
4491
|
final.value[index] = result.value;
|
|
4397
4492
|
}
|
|
4493
|
+
function handleTupleResults(itemResults, final, items, input, optoutStart) {
|
|
4494
|
+
for (let i = 0; i < items.length; i++) {
|
|
4495
|
+
const r = itemResults[i];
|
|
4496
|
+
const isPresent = i < input.length;
|
|
4497
|
+
if (r.issues.length) {
|
|
4498
|
+
if (!isPresent && i >= optoutStart) {
|
|
4499
|
+
final.value.length = i;
|
|
4500
|
+
break;
|
|
4501
|
+
}
|
|
4502
|
+
final.issues.push(...prefixIssues(i, r.issues));
|
|
4503
|
+
}
|
|
4504
|
+
final.value[i] = r.value;
|
|
4505
|
+
}
|
|
4506
|
+
for (let i = final.value.length - 1; i >= input.length; i--) {
|
|
4507
|
+
if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
|
|
4508
|
+
final.value.length = i;
|
|
4509
|
+
} else {
|
|
4510
|
+
break;
|
|
4511
|
+
}
|
|
4512
|
+
}
|
|
4513
|
+
return final;
|
|
4514
|
+
}
|
|
4398
4515
|
var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
4399
4516
|
$ZodType.init(inst, def);
|
|
4400
4517
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -4416,19 +4533,35 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
4416
4533
|
for (const key of values) {
|
|
4417
4534
|
if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
4418
4535
|
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
4536
|
+
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
4537
|
+
if (keyResult instanceof Promise) {
|
|
4538
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
4539
|
+
}
|
|
4540
|
+
if (keyResult.issues.length) {
|
|
4541
|
+
payload.issues.push({
|
|
4542
|
+
code: "invalid_key",
|
|
4543
|
+
origin: "record",
|
|
4544
|
+
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
4545
|
+
input: key,
|
|
4546
|
+
path: [key],
|
|
4547
|
+
inst
|
|
4548
|
+
});
|
|
4549
|
+
continue;
|
|
4550
|
+
}
|
|
4551
|
+
const outKey = keyResult.value;
|
|
4419
4552
|
const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
|
|
4420
4553
|
if (result instanceof Promise) {
|
|
4421
4554
|
proms.push(result.then((result2) => {
|
|
4422
4555
|
if (result2.issues.length) {
|
|
4423
4556
|
payload.issues.push(...prefixIssues(key, result2.issues));
|
|
4424
4557
|
}
|
|
4425
|
-
payload.value[
|
|
4558
|
+
payload.value[outKey] = result2.value;
|
|
4426
4559
|
}));
|
|
4427
4560
|
} else {
|
|
4428
4561
|
if (result.issues.length) {
|
|
4429
4562
|
payload.issues.push(...prefixIssues(key, result.issues));
|
|
4430
4563
|
}
|
|
4431
|
-
payload.value[
|
|
4564
|
+
payload.value[outKey] = result.value;
|
|
4432
4565
|
}
|
|
4433
4566
|
}
|
|
4434
4567
|
}
|
|
@@ -4452,6 +4585,8 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
4452
4585
|
for (const key of Reflect.ownKeys(input)) {
|
|
4453
4586
|
if (key === "__proto__")
|
|
4454
4587
|
continue;
|
|
4588
|
+
if (!Object.prototype.propertyIsEnumerable.call(input, key))
|
|
4589
|
+
continue;
|
|
4455
4590
|
let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
4456
4591
|
if (keyResult instanceof Promise) {
|
|
4457
4592
|
throw new Error("Async schemas not supported in object keys currently");
|
|
@@ -4656,6 +4791,7 @@ var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
|
|
|
4656
4791
|
});
|
|
4657
4792
|
var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
|
|
4658
4793
|
$ZodType.init(inst, def);
|
|
4794
|
+
inst._zod.optin = "optional";
|
|
4659
4795
|
inst._zod.parse = (payload, ctx) => {
|
|
4660
4796
|
if (ctx.direction === "backward") {
|
|
4661
4797
|
throw new $ZodEncodeError(inst.constructor.name);
|
|
@@ -4665,6 +4801,7 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
|
|
|
4665
4801
|
const output = _out instanceof Promise ? _out : Promise.resolve(_out);
|
|
4666
4802
|
return output.then((output2) => {
|
|
4667
4803
|
payload.value = output2;
|
|
4804
|
+
payload.fallback = true;
|
|
4668
4805
|
return payload;
|
|
4669
4806
|
});
|
|
4670
4807
|
}
|
|
@@ -4672,11 +4809,12 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
|
|
|
4672
4809
|
throw new $ZodAsyncError();
|
|
4673
4810
|
}
|
|
4674
4811
|
payload.value = _out;
|
|
4812
|
+
payload.fallback = true;
|
|
4675
4813
|
return payload;
|
|
4676
4814
|
};
|
|
4677
4815
|
});
|
|
4678
4816
|
function handleOptionalResult(result, input) {
|
|
4679
|
-
if (result.issues.length
|
|
4817
|
+
if (input === void 0 && (result.issues.length || result.fallback)) {
|
|
4680
4818
|
return { issues: [], value: void 0 };
|
|
4681
4819
|
}
|
|
4682
4820
|
return result;
|
|
@@ -4694,10 +4832,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
|
|
|
4694
4832
|
});
|
|
4695
4833
|
inst._zod.parse = (payload, ctx) => {
|
|
4696
4834
|
if (def.innerType._zod.optin === "optional") {
|
|
4835
|
+
const input = payload.value;
|
|
4697
4836
|
const result = def.innerType._zod.run(payload, ctx);
|
|
4698
4837
|
if (result instanceof Promise)
|
|
4699
|
-
return result.then((r) => handleOptionalResult(r,
|
|
4700
|
-
return handleOptionalResult(result,
|
|
4838
|
+
return result.then((r) => handleOptionalResult(r, input));
|
|
4839
|
+
return handleOptionalResult(result, input);
|
|
4701
4840
|
}
|
|
4702
4841
|
if (payload.value === void 0) {
|
|
4703
4842
|
return payload;
|
|
@@ -4813,7 +4952,7 @@ var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
|
|
|
4813
4952
|
});
|
|
4814
4953
|
var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
4815
4954
|
$ZodType.init(inst, def);
|
|
4816
|
-
|
|
4955
|
+
inst._zod.optin = "optional";
|
|
4817
4956
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
4818
4957
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
4819
4958
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -4833,6 +4972,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
|
4833
4972
|
input: payload.value
|
|
4834
4973
|
});
|
|
4835
4974
|
payload.issues = [];
|
|
4975
|
+
payload.fallback = true;
|
|
4836
4976
|
}
|
|
4837
4977
|
return payload;
|
|
4838
4978
|
});
|
|
@@ -4847,6 +4987,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
|
4847
4987
|
input: payload.value
|
|
4848
4988
|
});
|
|
4849
4989
|
payload.issues = [];
|
|
4990
|
+
payload.fallback = true;
|
|
4850
4991
|
}
|
|
4851
4992
|
return payload;
|
|
4852
4993
|
};
|
|
@@ -4892,7 +5033,7 @@ function handlePipeResult(left, next, ctx) {
|
|
|
4892
5033
|
left.aborted = true;
|
|
4893
5034
|
return left;
|
|
4894
5035
|
}
|
|
4895
|
-
return next._zod.run({ value: left.value, issues: left.issues }, ctx);
|
|
5036
|
+
return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
|
|
4896
5037
|
}
|
|
4897
5038
|
var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
|
|
4898
5039
|
$ZodType.init(inst, def);
|
|
@@ -4944,6 +5085,9 @@ function handleCodecTxResult(left, value, nextSchema, ctx) {
|
|
|
4944
5085
|
}
|
|
4945
5086
|
return nextSchema._zod.run({ value, issues: left.issues }, ctx);
|
|
4946
5087
|
}
|
|
5088
|
+
var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
|
|
5089
|
+
$ZodPipe.init(inst, def);
|
|
5090
|
+
});
|
|
4947
5091
|
var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
4948
5092
|
$ZodType.init(inst, def);
|
|
4949
5093
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
@@ -5095,7 +5239,12 @@ var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => {
|
|
|
5095
5239
|
});
|
|
5096
5240
|
var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
5097
5241
|
$ZodType.init(inst, def);
|
|
5098
|
-
defineLazy(inst._zod, "innerType", () =>
|
|
5242
|
+
defineLazy(inst._zod, "innerType", () => {
|
|
5243
|
+
const d = def;
|
|
5244
|
+
if (!d._cachedInner)
|
|
5245
|
+
d._cachedInner = def.getter();
|
|
5246
|
+
return d._cachedInner;
|
|
5247
|
+
});
|
|
5099
5248
|
defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
|
|
5100
5249
|
defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
|
|
5101
5250
|
defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
|
|
@@ -5150,6 +5299,7 @@ __export(locales_exports, {
|
|
|
5150
5299
|
cs: () => cs_default,
|
|
5151
5300
|
da: () => da_default,
|
|
5152
5301
|
de: () => de_default,
|
|
5302
|
+
el: () => el_default,
|
|
5153
5303
|
en: () => en_default,
|
|
5154
5304
|
eo: () => eo_default,
|
|
5155
5305
|
es: () => es_default,
|
|
@@ -5158,6 +5308,7 @@ __export(locales_exports, {
|
|
|
5158
5308
|
fr: () => fr_default,
|
|
5159
5309
|
frCA: () => fr_CA_default,
|
|
5160
5310
|
he: () => he_default,
|
|
5311
|
+
hr: () => hr_default,
|
|
5161
5312
|
hu: () => hu_default,
|
|
5162
5313
|
hy: () => hy_default,
|
|
5163
5314
|
id: () => id_default,
|
|
@@ -5177,6 +5328,7 @@ __export(locales_exports, {
|
|
|
5177
5328
|
pl: () => pl_default,
|
|
5178
5329
|
ps: () => ps_default,
|
|
5179
5330
|
pt: () => pt_default,
|
|
5331
|
+
ro: () => ro_default,
|
|
5180
5332
|
ru: () => ru_default,
|
|
5181
5333
|
sl: () => sl_default,
|
|
5182
5334
|
sv: () => sv_default,
|
|
@@ -6130,8 +6282,118 @@ function de_default() {
|
|
|
6130
6282
|
};
|
|
6131
6283
|
}
|
|
6132
6284
|
|
|
6133
|
-
// ../../node_modules/zod/v4/locales/
|
|
6285
|
+
// ../../node_modules/zod/v4/locales/el.js
|
|
6134
6286
|
var error9 = () => {
|
|
6287
|
+
const Sizable = {
|
|
6288
|
+
string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
6289
|
+
file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
6290
|
+
array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
6291
|
+
set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
6292
|
+
map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
|
|
6293
|
+
};
|
|
6294
|
+
function getSizing(origin) {
|
|
6295
|
+
return Sizable[origin] ?? null;
|
|
6296
|
+
}
|
|
6297
|
+
const FormatDictionary = {
|
|
6298
|
+
regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
|
|
6299
|
+
email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
|
|
6300
|
+
url: "URL",
|
|
6301
|
+
emoji: "emoji",
|
|
6302
|
+
uuid: "UUID",
|
|
6303
|
+
uuidv4: "UUIDv4",
|
|
6304
|
+
uuidv6: "UUIDv6",
|
|
6305
|
+
nanoid: "nanoid",
|
|
6306
|
+
guid: "GUID",
|
|
6307
|
+
cuid: "cuid",
|
|
6308
|
+
cuid2: "cuid2",
|
|
6309
|
+
ulid: "ULID",
|
|
6310
|
+
xid: "XID",
|
|
6311
|
+
ksuid: "KSUID",
|
|
6312
|
+
datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
|
|
6313
|
+
date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
|
|
6314
|
+
time: "ISO \u03CE\u03C1\u03B1",
|
|
6315
|
+
duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
|
|
6316
|
+
ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
|
|
6317
|
+
ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
|
|
6318
|
+
mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
|
|
6319
|
+
cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
|
|
6320
|
+
cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
|
|
6321
|
+
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",
|
|
6322
|
+
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",
|
|
6323
|
+
json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
|
|
6324
|
+
e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
|
|
6325
|
+
jwt: "JWT",
|
|
6326
|
+
template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
|
|
6327
|
+
};
|
|
6328
|
+
const TypeDictionary = {
|
|
6329
|
+
nan: "NaN"
|
|
6330
|
+
};
|
|
6331
|
+
return (issue2) => {
|
|
6332
|
+
switch (issue2.code) {
|
|
6333
|
+
case "invalid_type": {
|
|
6334
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
6335
|
+
const receivedType = parsedType(issue2.input);
|
|
6336
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
6337
|
+
if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
|
|
6338
|
+
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}`;
|
|
6339
|
+
}
|
|
6340
|
+
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}`;
|
|
6341
|
+
}
|
|
6342
|
+
case "invalid_value":
|
|
6343
|
+
if (issue2.values.length === 1)
|
|
6344
|
+
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])}`;
|
|
6345
|
+
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, "|")}`;
|
|
6346
|
+
case "too_big": {
|
|
6347
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
6348
|
+
const sizing = getSizing(issue2.origin);
|
|
6349
|
+
if (sizing)
|
|
6350
|
+
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"}`;
|
|
6351
|
+
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()}`;
|
|
6352
|
+
}
|
|
6353
|
+
case "too_small": {
|
|
6354
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
6355
|
+
const sizing = getSizing(issue2.origin);
|
|
6356
|
+
if (sizing) {
|
|
6357
|
+
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}`;
|
|
6358
|
+
}
|
|
6359
|
+
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()}`;
|
|
6360
|
+
}
|
|
6361
|
+
case "invalid_format": {
|
|
6362
|
+
const _issue = issue2;
|
|
6363
|
+
if (_issue.format === "starts_with") {
|
|
6364
|
+
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}"`;
|
|
6365
|
+
}
|
|
6366
|
+
if (_issue.format === "ends_with")
|
|
6367
|
+
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}"`;
|
|
6368
|
+
if (_issue.format === "includes")
|
|
6369
|
+
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}"`;
|
|
6370
|
+
if (_issue.format === "regex")
|
|
6371
|
+
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}`;
|
|
6372
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
6373
|
+
}
|
|
6374
|
+
case "not_multiple_of":
|
|
6375
|
+
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}`;
|
|
6376
|
+
case "unrecognized_keys":
|
|
6377
|
+
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, ", ")}`;
|
|
6378
|
+
case "invalid_key":
|
|
6379
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
6380
|
+
case "invalid_union":
|
|
6381
|
+
return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
|
|
6382
|
+
case "invalid_element":
|
|
6383
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
6384
|
+
default:
|
|
6385
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
|
|
6386
|
+
}
|
|
6387
|
+
};
|
|
6388
|
+
};
|
|
6389
|
+
function el_default() {
|
|
6390
|
+
return {
|
|
6391
|
+
localeError: error9()
|
|
6392
|
+
};
|
|
6393
|
+
}
|
|
6394
|
+
|
|
6395
|
+
// ../../node_modules/zod/v4/locales/en.js
|
|
6396
|
+
var error10 = () => {
|
|
6135
6397
|
const Sizable = {
|
|
6136
6398
|
string: { unit: "characters", verb: "to have" },
|
|
6137
6399
|
file: { unit: "bytes", verb: "to have" },
|
|
@@ -6225,6 +6487,10 @@ var error9 = () => {
|
|
|
6225
6487
|
case "invalid_key":
|
|
6226
6488
|
return `Invalid key in ${issue2.origin}`;
|
|
6227
6489
|
case "invalid_union":
|
|
6490
|
+
if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
|
|
6491
|
+
const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
|
|
6492
|
+
return `Invalid discriminator value. Expected ${opts}`;
|
|
6493
|
+
}
|
|
6228
6494
|
return "Invalid input";
|
|
6229
6495
|
case "invalid_element":
|
|
6230
6496
|
return `Invalid value in ${issue2.origin}`;
|
|
@@ -6235,12 +6501,12 @@ var error9 = () => {
|
|
|
6235
6501
|
};
|
|
6236
6502
|
function en_default() {
|
|
6237
6503
|
return {
|
|
6238
|
-
localeError:
|
|
6504
|
+
localeError: error10()
|
|
6239
6505
|
};
|
|
6240
6506
|
}
|
|
6241
6507
|
|
|
6242
6508
|
// ../../node_modules/zod/v4/locales/eo.js
|
|
6243
|
-
var
|
|
6509
|
+
var error11 = () => {
|
|
6244
6510
|
const Sizable = {
|
|
6245
6511
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
6246
6512
|
file: { unit: "bajtojn", verb: "havi" },
|
|
@@ -6345,12 +6611,12 @@ var error10 = () => {
|
|
|
6345
6611
|
};
|
|
6346
6612
|
function eo_default() {
|
|
6347
6613
|
return {
|
|
6348
|
-
localeError:
|
|
6614
|
+
localeError: error11()
|
|
6349
6615
|
};
|
|
6350
6616
|
}
|
|
6351
6617
|
|
|
6352
6618
|
// ../../node_modules/zod/v4/locales/es.js
|
|
6353
|
-
var
|
|
6619
|
+
var error12 = () => {
|
|
6354
6620
|
const Sizable = {
|
|
6355
6621
|
string: { unit: "caracteres", verb: "tener" },
|
|
6356
6622
|
file: { unit: "bytes", verb: "tener" },
|
|
@@ -6478,12 +6744,12 @@ var error11 = () => {
|
|
|
6478
6744
|
};
|
|
6479
6745
|
function es_default() {
|
|
6480
6746
|
return {
|
|
6481
|
-
localeError:
|
|
6747
|
+
localeError: error12()
|
|
6482
6748
|
};
|
|
6483
6749
|
}
|
|
6484
6750
|
|
|
6485
6751
|
// ../../node_modules/zod/v4/locales/fa.js
|
|
6486
|
-
var
|
|
6752
|
+
var error13 = () => {
|
|
6487
6753
|
const Sizable = {
|
|
6488
6754
|
string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
6489
6755
|
file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
@@ -6593,12 +6859,12 @@ var error12 = () => {
|
|
|
6593
6859
|
};
|
|
6594
6860
|
function fa_default() {
|
|
6595
6861
|
return {
|
|
6596
|
-
localeError:
|
|
6862
|
+
localeError: error13()
|
|
6597
6863
|
};
|
|
6598
6864
|
}
|
|
6599
6865
|
|
|
6600
6866
|
// ../../node_modules/zod/v4/locales/fi.js
|
|
6601
|
-
var
|
|
6867
|
+
var error14 = () => {
|
|
6602
6868
|
const Sizable = {
|
|
6603
6869
|
string: { unit: "merkki\xE4", subject: "merkkijonon" },
|
|
6604
6870
|
file: { unit: "tavua", subject: "tiedoston" },
|
|
@@ -6706,12 +6972,12 @@ var error13 = () => {
|
|
|
6706
6972
|
};
|
|
6707
6973
|
function fi_default() {
|
|
6708
6974
|
return {
|
|
6709
|
-
localeError:
|
|
6975
|
+
localeError: error14()
|
|
6710
6976
|
};
|
|
6711
6977
|
}
|
|
6712
6978
|
|
|
6713
6979
|
// ../../node_modules/zod/v4/locales/fr.js
|
|
6714
|
-
var
|
|
6980
|
+
var error15 = () => {
|
|
6715
6981
|
const Sizable = {
|
|
6716
6982
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
6717
6983
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -6752,9 +7018,27 @@ var error14 = () => {
|
|
|
6752
7018
|
template_literal: "entr\xE9e"
|
|
6753
7019
|
};
|
|
6754
7020
|
const TypeDictionary = {
|
|
6755
|
-
|
|
7021
|
+
string: "cha\xEEne",
|
|
6756
7022
|
number: "nombre",
|
|
6757
|
-
|
|
7023
|
+
int: "entier",
|
|
7024
|
+
boolean: "bool\xE9en",
|
|
7025
|
+
bigint: "grand entier",
|
|
7026
|
+
symbol: "symbole",
|
|
7027
|
+
undefined: "ind\xE9fini",
|
|
7028
|
+
null: "null",
|
|
7029
|
+
never: "jamais",
|
|
7030
|
+
void: "vide",
|
|
7031
|
+
date: "date",
|
|
7032
|
+
array: "tableau",
|
|
7033
|
+
object: "objet",
|
|
7034
|
+
tuple: "tuple",
|
|
7035
|
+
record: "enregistrement",
|
|
7036
|
+
map: "carte",
|
|
7037
|
+
set: "ensemble",
|
|
7038
|
+
file: "fichier",
|
|
7039
|
+
nonoptional: "non-optionnel",
|
|
7040
|
+
nan: "NaN",
|
|
7041
|
+
function: "fonction"
|
|
6758
7042
|
};
|
|
6759
7043
|
return (issue2) => {
|
|
6760
7044
|
switch (issue2.code) {
|
|
@@ -6775,16 +7059,15 @@ var error14 = () => {
|
|
|
6775
7059
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
6776
7060
|
const sizing = getSizing(issue2.origin);
|
|
6777
7061
|
if (sizing)
|
|
6778
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
6779
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
7062
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
7063
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
6780
7064
|
}
|
|
6781
7065
|
case "too_small": {
|
|
6782
7066
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
6783
7067
|
const sizing = getSizing(issue2.origin);
|
|
6784
|
-
if (sizing)
|
|
6785
|
-
return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
6786
|
-
}
|
|
6787
|
-
return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
7068
|
+
if (sizing)
|
|
7069
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
7070
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
6788
7071
|
}
|
|
6789
7072
|
case "invalid_format": {
|
|
6790
7073
|
const _issue = issue2;
|
|
@@ -6815,12 +7098,12 @@ var error14 = () => {
|
|
|
6815
7098
|
};
|
|
6816
7099
|
function fr_default() {
|
|
6817
7100
|
return {
|
|
6818
|
-
localeError:
|
|
7101
|
+
localeError: error15()
|
|
6819
7102
|
};
|
|
6820
7103
|
}
|
|
6821
7104
|
|
|
6822
7105
|
// ../../node_modules/zod/v4/locales/fr-CA.js
|
|
6823
|
-
var
|
|
7106
|
+
var error16 = () => {
|
|
6824
7107
|
const Sizable = {
|
|
6825
7108
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
6826
7109
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -6923,12 +7206,12 @@ var error15 = () => {
|
|
|
6923
7206
|
};
|
|
6924
7207
|
function fr_CA_default() {
|
|
6925
7208
|
return {
|
|
6926
|
-
localeError:
|
|
7209
|
+
localeError: error16()
|
|
6927
7210
|
};
|
|
6928
7211
|
}
|
|
6929
7212
|
|
|
6930
7213
|
// ../../node_modules/zod/v4/locales/he.js
|
|
6931
|
-
var
|
|
7214
|
+
var error17 = () => {
|
|
6932
7215
|
const TypeNames = {
|
|
6933
7216
|
string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
|
|
6934
7217
|
number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
|
|
@@ -7118,24 +7401,24 @@ var error16 = () => {
|
|
|
7118
7401
|
};
|
|
7119
7402
|
function he_default() {
|
|
7120
7403
|
return {
|
|
7121
|
-
localeError:
|
|
7404
|
+
localeError: error17()
|
|
7122
7405
|
};
|
|
7123
7406
|
}
|
|
7124
7407
|
|
|
7125
|
-
// ../../node_modules/zod/v4/locales/
|
|
7126
|
-
var
|
|
7408
|
+
// ../../node_modules/zod/v4/locales/hr.js
|
|
7409
|
+
var error18 = () => {
|
|
7127
7410
|
const Sizable = {
|
|
7128
|
-
string: { unit: "
|
|
7129
|
-
file: { unit: "
|
|
7130
|
-
array: { unit: "
|
|
7131
|
-
set: { unit: "
|
|
7411
|
+
string: { unit: "znakova", verb: "imati" },
|
|
7412
|
+
file: { unit: "bajtova", verb: "imati" },
|
|
7413
|
+
array: { unit: "stavki", verb: "imati" },
|
|
7414
|
+
set: { unit: "stavki", verb: "imati" }
|
|
7132
7415
|
};
|
|
7133
7416
|
function getSizing(origin) {
|
|
7134
7417
|
return Sizable[origin] ?? null;
|
|
7135
7418
|
}
|
|
7136
7419
|
const FormatDictionary = {
|
|
7137
|
-
regex: "
|
|
7138
|
-
email: "email
|
|
7420
|
+
regex: "unos",
|
|
7421
|
+
email: "email adresa",
|
|
7139
7422
|
url: "URL",
|
|
7140
7423
|
emoji: "emoji",
|
|
7141
7424
|
uuid: "UUID",
|
|
@@ -7148,25 +7431,37 @@ var error17 = () => {
|
|
|
7148
7431
|
ulid: "ULID",
|
|
7149
7432
|
xid: "XID",
|
|
7150
7433
|
ksuid: "KSUID",
|
|
7151
|
-
datetime: "ISO
|
|
7152
|
-
date: "ISO
|
|
7153
|
-
time: "ISO
|
|
7154
|
-
duration: "ISO
|
|
7155
|
-
ipv4: "IPv4
|
|
7156
|
-
ipv6: "IPv6
|
|
7157
|
-
cidrv4: "IPv4
|
|
7158
|
-
cidrv6: "IPv6
|
|
7159
|
-
base64: "base64
|
|
7160
|
-
base64url: "base64url
|
|
7161
|
-
json_string: "JSON
|
|
7162
|
-
e164: "E.164
|
|
7434
|
+
datetime: "ISO datum i vrijeme",
|
|
7435
|
+
date: "ISO datum",
|
|
7436
|
+
time: "ISO vrijeme",
|
|
7437
|
+
duration: "ISO trajanje",
|
|
7438
|
+
ipv4: "IPv4 adresa",
|
|
7439
|
+
ipv6: "IPv6 adresa",
|
|
7440
|
+
cidrv4: "IPv4 raspon",
|
|
7441
|
+
cidrv6: "IPv6 raspon",
|
|
7442
|
+
base64: "base64 kodirani tekst",
|
|
7443
|
+
base64url: "base64url kodirani tekst",
|
|
7444
|
+
json_string: "JSON tekst",
|
|
7445
|
+
e164: "E.164 broj",
|
|
7163
7446
|
jwt: "JWT",
|
|
7164
|
-
template_literal: "
|
|
7447
|
+
template_literal: "unos"
|
|
7165
7448
|
};
|
|
7166
7449
|
const TypeDictionary = {
|
|
7167
7450
|
nan: "NaN",
|
|
7168
|
-
|
|
7169
|
-
|
|
7451
|
+
string: "tekst",
|
|
7452
|
+
number: "broj",
|
|
7453
|
+
boolean: "boolean",
|
|
7454
|
+
array: "niz",
|
|
7455
|
+
object: "objekt",
|
|
7456
|
+
set: "skup",
|
|
7457
|
+
file: "datoteka",
|
|
7458
|
+
date: "datum",
|
|
7459
|
+
bigint: "bigint",
|
|
7460
|
+
symbol: "simbol",
|
|
7461
|
+
undefined: "undefined",
|
|
7462
|
+
null: "null",
|
|
7463
|
+
function: "funkcija",
|
|
7464
|
+
map: "mapa"
|
|
7170
7465
|
};
|
|
7171
7466
|
return (issue2) => {
|
|
7172
7467
|
switch (issue2.code) {
|
|
@@ -7175,20 +7470,131 @@ var error17 = () => {
|
|
|
7175
7470
|
const receivedType = parsedType(issue2.input);
|
|
7176
7471
|
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
7177
7472
|
if (/^[A-Z]/.test(issue2.expected)) {
|
|
7178
|
-
return
|
|
7473
|
+
return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
|
|
7179
7474
|
}
|
|
7180
|
-
return
|
|
7475
|
+
return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
|
|
7181
7476
|
}
|
|
7182
7477
|
case "invalid_value":
|
|
7183
7478
|
if (issue2.values.length === 1)
|
|
7184
|
-
return
|
|
7185
|
-
return
|
|
7479
|
+
return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
|
|
7480
|
+
return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
|
|
7186
7481
|
case "too_big": {
|
|
7187
7482
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
7188
7483
|
const sizing = getSizing(issue2.origin);
|
|
7484
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
7189
7485
|
if (sizing)
|
|
7190
|
-
return `
|
|
7191
|
-
return `
|
|
7486
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
|
|
7487
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
|
|
7488
|
+
}
|
|
7489
|
+
case "too_small": {
|
|
7490
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
7491
|
+
const sizing = getSizing(issue2.origin);
|
|
7492
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
7493
|
+
if (sizing) {
|
|
7494
|
+
return `Premalo: o\u010Dekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
7495
|
+
}
|
|
7496
|
+
return `Premalo: o\u010Dekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
|
|
7497
|
+
}
|
|
7498
|
+
case "invalid_format": {
|
|
7499
|
+
const _issue = issue2;
|
|
7500
|
+
if (_issue.format === "starts_with")
|
|
7501
|
+
return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
|
|
7502
|
+
if (_issue.format === "ends_with")
|
|
7503
|
+
return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
|
|
7504
|
+
if (_issue.format === "includes")
|
|
7505
|
+
return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
|
|
7506
|
+
if (_issue.format === "regex")
|
|
7507
|
+
return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
|
|
7508
|
+
return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
7509
|
+
}
|
|
7510
|
+
case "not_multiple_of":
|
|
7511
|
+
return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
|
|
7512
|
+
case "unrecognized_keys":
|
|
7513
|
+
return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
|
|
7514
|
+
case "invalid_key":
|
|
7515
|
+
return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
7516
|
+
case "invalid_union":
|
|
7517
|
+
return "Neispravan unos";
|
|
7518
|
+
case "invalid_element":
|
|
7519
|
+
return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
7520
|
+
default:
|
|
7521
|
+
return `Neispravan unos`;
|
|
7522
|
+
}
|
|
7523
|
+
};
|
|
7524
|
+
};
|
|
7525
|
+
function hr_default() {
|
|
7526
|
+
return {
|
|
7527
|
+
localeError: error18()
|
|
7528
|
+
};
|
|
7529
|
+
}
|
|
7530
|
+
|
|
7531
|
+
// ../../node_modules/zod/v4/locales/hu.js
|
|
7532
|
+
var error19 = () => {
|
|
7533
|
+
const Sizable = {
|
|
7534
|
+
string: { unit: "karakter", verb: "legyen" },
|
|
7535
|
+
file: { unit: "byte", verb: "legyen" },
|
|
7536
|
+
array: { unit: "elem", verb: "legyen" },
|
|
7537
|
+
set: { unit: "elem", verb: "legyen" }
|
|
7538
|
+
};
|
|
7539
|
+
function getSizing(origin) {
|
|
7540
|
+
return Sizable[origin] ?? null;
|
|
7541
|
+
}
|
|
7542
|
+
const FormatDictionary = {
|
|
7543
|
+
regex: "bemenet",
|
|
7544
|
+
email: "email c\xEDm",
|
|
7545
|
+
url: "URL",
|
|
7546
|
+
emoji: "emoji",
|
|
7547
|
+
uuid: "UUID",
|
|
7548
|
+
uuidv4: "UUIDv4",
|
|
7549
|
+
uuidv6: "UUIDv6",
|
|
7550
|
+
nanoid: "nanoid",
|
|
7551
|
+
guid: "GUID",
|
|
7552
|
+
cuid: "cuid",
|
|
7553
|
+
cuid2: "cuid2",
|
|
7554
|
+
ulid: "ULID",
|
|
7555
|
+
xid: "XID",
|
|
7556
|
+
ksuid: "KSUID",
|
|
7557
|
+
datetime: "ISO id\u0151b\xE9lyeg",
|
|
7558
|
+
date: "ISO d\xE1tum",
|
|
7559
|
+
time: "ISO id\u0151",
|
|
7560
|
+
duration: "ISO id\u0151intervallum",
|
|
7561
|
+
ipv4: "IPv4 c\xEDm",
|
|
7562
|
+
ipv6: "IPv6 c\xEDm",
|
|
7563
|
+
cidrv4: "IPv4 tartom\xE1ny",
|
|
7564
|
+
cidrv6: "IPv6 tartom\xE1ny",
|
|
7565
|
+
base64: "base64-k\xF3dolt string",
|
|
7566
|
+
base64url: "base64url-k\xF3dolt string",
|
|
7567
|
+
json_string: "JSON string",
|
|
7568
|
+
e164: "E.164 sz\xE1m",
|
|
7569
|
+
jwt: "JWT",
|
|
7570
|
+
template_literal: "bemenet"
|
|
7571
|
+
};
|
|
7572
|
+
const TypeDictionary = {
|
|
7573
|
+
nan: "NaN",
|
|
7574
|
+
number: "sz\xE1m",
|
|
7575
|
+
array: "t\xF6mb"
|
|
7576
|
+
};
|
|
7577
|
+
return (issue2) => {
|
|
7578
|
+
switch (issue2.code) {
|
|
7579
|
+
case "invalid_type": {
|
|
7580
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
7581
|
+
const receivedType = parsedType(issue2.input);
|
|
7582
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
7583
|
+
if (/^[A-Z]/.test(issue2.expected)) {
|
|
7584
|
+
return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue2.expected}, a kapott \xE9rt\xE9k ${received}`;
|
|
7585
|
+
}
|
|
7586
|
+
return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`;
|
|
7587
|
+
}
|
|
7588
|
+
case "invalid_value":
|
|
7589
|
+
if (issue2.values.length === 1)
|
|
7590
|
+
return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`;
|
|
7591
|
+
return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`;
|
|
7592
|
+
case "too_big": {
|
|
7593
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
7594
|
+
const sizing = getSizing(issue2.origin);
|
|
7595
|
+
if (sizing)
|
|
7596
|
+
return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`;
|
|
7597
|
+
return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`;
|
|
7192
7598
|
}
|
|
7193
7599
|
case "too_small": {
|
|
7194
7600
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
@@ -7227,7 +7633,7 @@ var error17 = () => {
|
|
|
7227
7633
|
};
|
|
7228
7634
|
function hu_default() {
|
|
7229
7635
|
return {
|
|
7230
|
-
localeError:
|
|
7636
|
+
localeError: error19()
|
|
7231
7637
|
};
|
|
7232
7638
|
}
|
|
7233
7639
|
|
|
@@ -7242,7 +7648,7 @@ function withDefiniteArticle(word) {
|
|
|
7242
7648
|
const lastChar = word[word.length - 1];
|
|
7243
7649
|
return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568");
|
|
7244
7650
|
}
|
|
7245
|
-
var
|
|
7651
|
+
var error20 = () => {
|
|
7246
7652
|
const Sizable = {
|
|
7247
7653
|
string: {
|
|
7248
7654
|
unit: {
|
|
@@ -7375,12 +7781,12 @@ var error18 = () => {
|
|
|
7375
7781
|
};
|
|
7376
7782
|
function hy_default() {
|
|
7377
7783
|
return {
|
|
7378
|
-
localeError:
|
|
7784
|
+
localeError: error20()
|
|
7379
7785
|
};
|
|
7380
7786
|
}
|
|
7381
7787
|
|
|
7382
7788
|
// ../../node_modules/zod/v4/locales/id.js
|
|
7383
|
-
var
|
|
7789
|
+
var error21 = () => {
|
|
7384
7790
|
const Sizable = {
|
|
7385
7791
|
string: { unit: "karakter", verb: "memiliki" },
|
|
7386
7792
|
file: { unit: "byte", verb: "memiliki" },
|
|
@@ -7482,12 +7888,12 @@ var error19 = () => {
|
|
|
7482
7888
|
};
|
|
7483
7889
|
function id_default() {
|
|
7484
7890
|
return {
|
|
7485
|
-
localeError:
|
|
7891
|
+
localeError: error21()
|
|
7486
7892
|
};
|
|
7487
7893
|
}
|
|
7488
7894
|
|
|
7489
7895
|
// ../../node_modules/zod/v4/locales/is.js
|
|
7490
|
-
var
|
|
7896
|
+
var error22 = () => {
|
|
7491
7897
|
const Sizable = {
|
|
7492
7898
|
string: { unit: "stafi", verb: "a\xF0 hafa" },
|
|
7493
7899
|
file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
|
|
@@ -7592,12 +7998,12 @@ var error20 = () => {
|
|
|
7592
7998
|
};
|
|
7593
7999
|
function is_default() {
|
|
7594
8000
|
return {
|
|
7595
|
-
localeError:
|
|
8001
|
+
localeError: error22()
|
|
7596
8002
|
};
|
|
7597
8003
|
}
|
|
7598
8004
|
|
|
7599
8005
|
// ../../node_modules/zod/v4/locales/it.js
|
|
7600
|
-
var
|
|
8006
|
+
var error23 = () => {
|
|
7601
8007
|
const Sizable = {
|
|
7602
8008
|
string: { unit: "caratteri", verb: "avere" },
|
|
7603
8009
|
file: { unit: "byte", verb: "avere" },
|
|
@@ -7682,7 +8088,7 @@ var error21 = () => {
|
|
|
7682
8088
|
return `Stringa non valida: deve includere "${_issue.includes}"`;
|
|
7683
8089
|
if (_issue.format === "regex")
|
|
7684
8090
|
return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
|
|
7685
|
-
return `
|
|
8091
|
+
return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
7686
8092
|
}
|
|
7687
8093
|
case "not_multiple_of":
|
|
7688
8094
|
return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
|
|
@@ -7701,12 +8107,12 @@ var error21 = () => {
|
|
|
7701
8107
|
};
|
|
7702
8108
|
function it_default() {
|
|
7703
8109
|
return {
|
|
7704
|
-
localeError:
|
|
8110
|
+
localeError: error23()
|
|
7705
8111
|
};
|
|
7706
8112
|
}
|
|
7707
8113
|
|
|
7708
8114
|
// ../../node_modules/zod/v4/locales/ja.js
|
|
7709
|
-
var
|
|
8115
|
+
var error24 = () => {
|
|
7710
8116
|
const Sizable = {
|
|
7711
8117
|
string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
|
|
7712
8118
|
file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
|
|
@@ -7809,12 +8215,12 @@ var error22 = () => {
|
|
|
7809
8215
|
};
|
|
7810
8216
|
function ja_default() {
|
|
7811
8217
|
return {
|
|
7812
|
-
localeError:
|
|
8218
|
+
localeError: error24()
|
|
7813
8219
|
};
|
|
7814
8220
|
}
|
|
7815
8221
|
|
|
7816
8222
|
// ../../node_modules/zod/v4/locales/ka.js
|
|
7817
|
-
var
|
|
8223
|
+
var error25 = () => {
|
|
7818
8224
|
const Sizable = {
|
|
7819
8225
|
string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
7820
8226
|
file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
@@ -7847,9 +8253,9 @@ var error23 = () => {
|
|
|
7847
8253
|
ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
|
|
7848
8254
|
cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
7849
8255
|
cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
7850
|
-
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
7851
|
-
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
7852
|
-
json_string: "JSON \
|
|
8256
|
+
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
8257
|
+
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
8258
|
+
json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
|
|
7853
8259
|
e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
|
|
7854
8260
|
jwt: "JWT",
|
|
7855
8261
|
template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
|
|
@@ -7857,7 +8263,7 @@ var error23 = () => {
|
|
|
7857
8263
|
const TypeDictionary = {
|
|
7858
8264
|
nan: "NaN",
|
|
7859
8265
|
number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
|
|
7860
|
-
string: "\
|
|
8266
|
+
string: "\u10D5\u10D4\u10DA\u10D8",
|
|
7861
8267
|
boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
|
|
7862
8268
|
function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
|
|
7863
8269
|
array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
|
|
@@ -7895,14 +8301,14 @@ var error23 = () => {
|
|
|
7895
8301
|
case "invalid_format": {
|
|
7896
8302
|
const _issue = issue2;
|
|
7897
8303
|
if (_issue.format === "starts_with") {
|
|
7898
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
8304
|
+
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`;
|
|
7899
8305
|
}
|
|
7900
8306
|
if (_issue.format === "ends_with")
|
|
7901
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
8307
|
+
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`;
|
|
7902
8308
|
if (_issue.format === "includes")
|
|
7903
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
8309
|
+
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`;
|
|
7904
8310
|
if (_issue.format === "regex")
|
|
7905
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
8311
|
+
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}`;
|
|
7906
8312
|
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
7907
8313
|
}
|
|
7908
8314
|
case "not_multiple_of":
|
|
@@ -7922,12 +8328,12 @@ var error23 = () => {
|
|
|
7922
8328
|
};
|
|
7923
8329
|
function ka_default() {
|
|
7924
8330
|
return {
|
|
7925
|
-
localeError:
|
|
8331
|
+
localeError: error25()
|
|
7926
8332
|
};
|
|
7927
8333
|
}
|
|
7928
8334
|
|
|
7929
8335
|
// ../../node_modules/zod/v4/locales/km.js
|
|
7930
|
-
var
|
|
8336
|
+
var error26 = () => {
|
|
7931
8337
|
const Sizable = {
|
|
7932
8338
|
string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
7933
8339
|
file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
@@ -8033,7 +8439,7 @@ var error24 = () => {
|
|
|
8033
8439
|
};
|
|
8034
8440
|
function km_default() {
|
|
8035
8441
|
return {
|
|
8036
|
-
localeError:
|
|
8442
|
+
localeError: error26()
|
|
8037
8443
|
};
|
|
8038
8444
|
}
|
|
8039
8445
|
|
|
@@ -8043,7 +8449,7 @@ function kh_default() {
|
|
|
8043
8449
|
}
|
|
8044
8450
|
|
|
8045
8451
|
// ../../node_modules/zod/v4/locales/ko.js
|
|
8046
|
-
var
|
|
8452
|
+
var error27 = () => {
|
|
8047
8453
|
const Sizable = {
|
|
8048
8454
|
string: { unit: "\uBB38\uC790", verb: "to have" },
|
|
8049
8455
|
file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
|
|
@@ -8150,7 +8556,7 @@ var error25 = () => {
|
|
|
8150
8556
|
};
|
|
8151
8557
|
function ko_default() {
|
|
8152
8558
|
return {
|
|
8153
|
-
localeError:
|
|
8559
|
+
localeError: error27()
|
|
8154
8560
|
};
|
|
8155
8561
|
}
|
|
8156
8562
|
|
|
@@ -8168,7 +8574,7 @@ function getUnitTypeFromNumber(number4) {
|
|
|
8168
8574
|
return "one";
|
|
8169
8575
|
return "few";
|
|
8170
8576
|
}
|
|
8171
|
-
var
|
|
8577
|
+
var error28 = () => {
|
|
8172
8578
|
const Sizable = {
|
|
8173
8579
|
string: {
|
|
8174
8580
|
unit: {
|
|
@@ -8354,12 +8760,12 @@ var error26 = () => {
|
|
|
8354
8760
|
};
|
|
8355
8761
|
function lt_default() {
|
|
8356
8762
|
return {
|
|
8357
|
-
localeError:
|
|
8763
|
+
localeError: error28()
|
|
8358
8764
|
};
|
|
8359
8765
|
}
|
|
8360
8766
|
|
|
8361
8767
|
// ../../node_modules/zod/v4/locales/mk.js
|
|
8362
|
-
var
|
|
8768
|
+
var error29 = () => {
|
|
8363
8769
|
const Sizable = {
|
|
8364
8770
|
string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
8365
8771
|
file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
@@ -8464,12 +8870,12 @@ var error27 = () => {
|
|
|
8464
8870
|
};
|
|
8465
8871
|
function mk_default() {
|
|
8466
8872
|
return {
|
|
8467
|
-
localeError:
|
|
8873
|
+
localeError: error29()
|
|
8468
8874
|
};
|
|
8469
8875
|
}
|
|
8470
8876
|
|
|
8471
8877
|
// ../../node_modules/zod/v4/locales/ms.js
|
|
8472
|
-
var
|
|
8878
|
+
var error30 = () => {
|
|
8473
8879
|
const Sizable = {
|
|
8474
8880
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
8475
8881
|
file: { unit: "bait", verb: "mempunyai" },
|
|
@@ -8572,12 +8978,12 @@ var error28 = () => {
|
|
|
8572
8978
|
};
|
|
8573
8979
|
function ms_default() {
|
|
8574
8980
|
return {
|
|
8575
|
-
localeError:
|
|
8981
|
+
localeError: error30()
|
|
8576
8982
|
};
|
|
8577
8983
|
}
|
|
8578
8984
|
|
|
8579
8985
|
// ../../node_modules/zod/v4/locales/nl.js
|
|
8580
|
-
var
|
|
8986
|
+
var error31 = () => {
|
|
8581
8987
|
const Sizable = {
|
|
8582
8988
|
string: { unit: "tekens", verb: "heeft" },
|
|
8583
8989
|
file: { unit: "bytes", verb: "heeft" },
|
|
@@ -8683,12 +9089,12 @@ var error29 = () => {
|
|
|
8683
9089
|
};
|
|
8684
9090
|
function nl_default() {
|
|
8685
9091
|
return {
|
|
8686
|
-
localeError:
|
|
9092
|
+
localeError: error31()
|
|
8687
9093
|
};
|
|
8688
9094
|
}
|
|
8689
9095
|
|
|
8690
9096
|
// ../../node_modules/zod/v4/locales/no.js
|
|
8691
|
-
var
|
|
9097
|
+
var error32 = () => {
|
|
8692
9098
|
const Sizable = {
|
|
8693
9099
|
string: { unit: "tegn", verb: "\xE5 ha" },
|
|
8694
9100
|
file: { unit: "bytes", verb: "\xE5 ha" },
|
|
@@ -8792,12 +9198,12 @@ var error30 = () => {
|
|
|
8792
9198
|
};
|
|
8793
9199
|
function no_default() {
|
|
8794
9200
|
return {
|
|
8795
|
-
localeError:
|
|
9201
|
+
localeError: error32()
|
|
8796
9202
|
};
|
|
8797
9203
|
}
|
|
8798
9204
|
|
|
8799
9205
|
// ../../node_modules/zod/v4/locales/ota.js
|
|
8800
|
-
var
|
|
9206
|
+
var error33 = () => {
|
|
8801
9207
|
const Sizable = {
|
|
8802
9208
|
string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
|
|
8803
9209
|
file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
|
|
@@ -8902,12 +9308,12 @@ var error31 = () => {
|
|
|
8902
9308
|
};
|
|
8903
9309
|
function ota_default() {
|
|
8904
9310
|
return {
|
|
8905
|
-
localeError:
|
|
9311
|
+
localeError: error33()
|
|
8906
9312
|
};
|
|
8907
9313
|
}
|
|
8908
9314
|
|
|
8909
9315
|
// ../../node_modules/zod/v4/locales/ps.js
|
|
8910
|
-
var
|
|
9316
|
+
var error34 = () => {
|
|
8911
9317
|
const Sizable = {
|
|
8912
9318
|
string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
|
|
8913
9319
|
file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
|
|
@@ -9017,12 +9423,12 @@ var error32 = () => {
|
|
|
9017
9423
|
};
|
|
9018
9424
|
function ps_default() {
|
|
9019
9425
|
return {
|
|
9020
|
-
localeError:
|
|
9426
|
+
localeError: error34()
|
|
9021
9427
|
};
|
|
9022
9428
|
}
|
|
9023
9429
|
|
|
9024
9430
|
// ../../node_modules/zod/v4/locales/pl.js
|
|
9025
|
-
var
|
|
9431
|
+
var error35 = () => {
|
|
9026
9432
|
const Sizable = {
|
|
9027
9433
|
string: { unit: "znak\xF3w", verb: "mie\u0107" },
|
|
9028
9434
|
file: { unit: "bajt\xF3w", verb: "mie\u0107" },
|
|
@@ -9127,12 +9533,12 @@ var error33 = () => {
|
|
|
9127
9533
|
};
|
|
9128
9534
|
function pl_default() {
|
|
9129
9535
|
return {
|
|
9130
|
-
localeError:
|
|
9536
|
+
localeError: error35()
|
|
9131
9537
|
};
|
|
9132
9538
|
}
|
|
9133
9539
|
|
|
9134
9540
|
// ../../node_modules/zod/v4/locales/pt.js
|
|
9135
|
-
var
|
|
9541
|
+
var error36 = () => {
|
|
9136
9542
|
const Sizable = {
|
|
9137
9543
|
string: { unit: "caracteres", verb: "ter" },
|
|
9138
9544
|
file: { unit: "bytes", verb: "ter" },
|
|
@@ -9236,7 +9642,127 @@ var error34 = () => {
|
|
|
9236
9642
|
};
|
|
9237
9643
|
function pt_default() {
|
|
9238
9644
|
return {
|
|
9239
|
-
localeError:
|
|
9645
|
+
localeError: error36()
|
|
9646
|
+
};
|
|
9647
|
+
}
|
|
9648
|
+
|
|
9649
|
+
// ../../node_modules/zod/v4/locales/ro.js
|
|
9650
|
+
var error37 = () => {
|
|
9651
|
+
const Sizable = {
|
|
9652
|
+
string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
|
|
9653
|
+
file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
|
|
9654
|
+
array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
9655
|
+
set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
9656
|
+
map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
|
|
9657
|
+
};
|
|
9658
|
+
function getSizing(origin) {
|
|
9659
|
+
return Sizable[origin] ?? null;
|
|
9660
|
+
}
|
|
9661
|
+
const FormatDictionary = {
|
|
9662
|
+
regex: "intrare",
|
|
9663
|
+
email: "adres\u0103 de email",
|
|
9664
|
+
url: "URL",
|
|
9665
|
+
emoji: "emoji",
|
|
9666
|
+
uuid: "UUID",
|
|
9667
|
+
uuidv4: "UUIDv4",
|
|
9668
|
+
uuidv6: "UUIDv6",
|
|
9669
|
+
nanoid: "nanoid",
|
|
9670
|
+
guid: "GUID",
|
|
9671
|
+
cuid: "cuid",
|
|
9672
|
+
cuid2: "cuid2",
|
|
9673
|
+
ulid: "ULID",
|
|
9674
|
+
xid: "XID",
|
|
9675
|
+
ksuid: "KSUID",
|
|
9676
|
+
datetime: "dat\u0103 \u0219i or\u0103 ISO",
|
|
9677
|
+
date: "dat\u0103 ISO",
|
|
9678
|
+
time: "or\u0103 ISO",
|
|
9679
|
+
duration: "durat\u0103 ISO",
|
|
9680
|
+
ipv4: "adres\u0103 IPv4",
|
|
9681
|
+
ipv6: "adres\u0103 IPv6",
|
|
9682
|
+
mac: "adres\u0103 MAC",
|
|
9683
|
+
cidrv4: "interval IPv4",
|
|
9684
|
+
cidrv6: "interval IPv6",
|
|
9685
|
+
base64: "\u0219ir codat base64",
|
|
9686
|
+
base64url: "\u0219ir codat base64url",
|
|
9687
|
+
json_string: "\u0219ir JSON",
|
|
9688
|
+
e164: "num\u0103r E.164",
|
|
9689
|
+
jwt: "JWT",
|
|
9690
|
+
template_literal: "intrare"
|
|
9691
|
+
};
|
|
9692
|
+
const TypeDictionary = {
|
|
9693
|
+
nan: "NaN",
|
|
9694
|
+
string: "\u0219ir",
|
|
9695
|
+
number: "num\u0103r",
|
|
9696
|
+
boolean: "boolean",
|
|
9697
|
+
function: "func\u021Bie",
|
|
9698
|
+
array: "matrice",
|
|
9699
|
+
object: "obiect",
|
|
9700
|
+
undefined: "nedefinit",
|
|
9701
|
+
symbol: "simbol",
|
|
9702
|
+
bigint: "num\u0103r mare",
|
|
9703
|
+
void: "void",
|
|
9704
|
+
never: "never",
|
|
9705
|
+
map: "hart\u0103",
|
|
9706
|
+
set: "set"
|
|
9707
|
+
};
|
|
9708
|
+
return (issue2) => {
|
|
9709
|
+
switch (issue2.code) {
|
|
9710
|
+
case "invalid_type": {
|
|
9711
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
9712
|
+
const receivedType = parsedType(issue2.input);
|
|
9713
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
9714
|
+
return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
|
|
9715
|
+
}
|
|
9716
|
+
case "invalid_value":
|
|
9717
|
+
if (issue2.values.length === 1)
|
|
9718
|
+
return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
|
|
9719
|
+
return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
|
|
9720
|
+
case "too_big": {
|
|
9721
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
9722
|
+
const sizing = getSizing(issue2.origin);
|
|
9723
|
+
if (sizing)
|
|
9724
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
|
|
9725
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
|
|
9726
|
+
}
|
|
9727
|
+
case "too_small": {
|
|
9728
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
9729
|
+
const sizing = getSizing(issue2.origin);
|
|
9730
|
+
if (sizing) {
|
|
9731
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
9732
|
+
}
|
|
9733
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
|
|
9734
|
+
}
|
|
9735
|
+
case "invalid_format": {
|
|
9736
|
+
const _issue = issue2;
|
|
9737
|
+
if (_issue.format === "starts_with") {
|
|
9738
|
+
return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
|
|
9739
|
+
}
|
|
9740
|
+
if (_issue.format === "ends_with")
|
|
9741
|
+
return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
|
|
9742
|
+
if (_issue.format === "includes")
|
|
9743
|
+
return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
|
|
9744
|
+
if (_issue.format === "regex")
|
|
9745
|
+
return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
|
|
9746
|
+
return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
9747
|
+
}
|
|
9748
|
+
case "not_multiple_of":
|
|
9749
|
+
return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
|
|
9750
|
+
case "unrecognized_keys":
|
|
9751
|
+
return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
|
|
9752
|
+
case "invalid_key":
|
|
9753
|
+
return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
|
|
9754
|
+
case "invalid_union":
|
|
9755
|
+
return "Intrare invalid\u0103";
|
|
9756
|
+
case "invalid_element":
|
|
9757
|
+
return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
|
|
9758
|
+
default:
|
|
9759
|
+
return `Intrare invalid\u0103`;
|
|
9760
|
+
}
|
|
9761
|
+
};
|
|
9762
|
+
};
|
|
9763
|
+
function ro_default() {
|
|
9764
|
+
return {
|
|
9765
|
+
localeError: error37()
|
|
9240
9766
|
};
|
|
9241
9767
|
}
|
|
9242
9768
|
|
|
@@ -9256,7 +9782,7 @@ function getRussianPlural(count, one, few, many) {
|
|
|
9256
9782
|
}
|
|
9257
9783
|
return many;
|
|
9258
9784
|
}
|
|
9259
|
-
var
|
|
9785
|
+
var error38 = () => {
|
|
9260
9786
|
const Sizable = {
|
|
9261
9787
|
string: {
|
|
9262
9788
|
unit: {
|
|
@@ -9393,12 +9919,12 @@ var error35 = () => {
|
|
|
9393
9919
|
};
|
|
9394
9920
|
function ru_default() {
|
|
9395
9921
|
return {
|
|
9396
|
-
localeError:
|
|
9922
|
+
localeError: error38()
|
|
9397
9923
|
};
|
|
9398
9924
|
}
|
|
9399
9925
|
|
|
9400
9926
|
// ../../node_modules/zod/v4/locales/sl.js
|
|
9401
|
-
var
|
|
9927
|
+
var error39 = () => {
|
|
9402
9928
|
const Sizable = {
|
|
9403
9929
|
string: { unit: "znakov", verb: "imeti" },
|
|
9404
9930
|
file: { unit: "bajtov", verb: "imeti" },
|
|
@@ -9503,12 +10029,12 @@ var error36 = () => {
|
|
|
9503
10029
|
};
|
|
9504
10030
|
function sl_default() {
|
|
9505
10031
|
return {
|
|
9506
|
-
localeError:
|
|
10032
|
+
localeError: error39()
|
|
9507
10033
|
};
|
|
9508
10034
|
}
|
|
9509
10035
|
|
|
9510
10036
|
// ../../node_modules/zod/v4/locales/sv.js
|
|
9511
|
-
var
|
|
10037
|
+
var error40 = () => {
|
|
9512
10038
|
const Sizable = {
|
|
9513
10039
|
string: { unit: "tecken", verb: "att ha" },
|
|
9514
10040
|
file: { unit: "bytes", verb: "att ha" },
|
|
@@ -9614,12 +10140,12 @@ var error37 = () => {
|
|
|
9614
10140
|
};
|
|
9615
10141
|
function sv_default() {
|
|
9616
10142
|
return {
|
|
9617
|
-
localeError:
|
|
10143
|
+
localeError: error40()
|
|
9618
10144
|
};
|
|
9619
10145
|
}
|
|
9620
10146
|
|
|
9621
10147
|
// ../../node_modules/zod/v4/locales/ta.js
|
|
9622
|
-
var
|
|
10148
|
+
var error41 = () => {
|
|
9623
10149
|
const Sizable = {
|
|
9624
10150
|
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" },
|
|
9625
10151
|
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" },
|
|
@@ -9725,12 +10251,12 @@ var error38 = () => {
|
|
|
9725
10251
|
};
|
|
9726
10252
|
function ta_default() {
|
|
9727
10253
|
return {
|
|
9728
|
-
localeError:
|
|
10254
|
+
localeError: error41()
|
|
9729
10255
|
};
|
|
9730
10256
|
}
|
|
9731
10257
|
|
|
9732
10258
|
// ../../node_modules/zod/v4/locales/th.js
|
|
9733
|
-
var
|
|
10259
|
+
var error42 = () => {
|
|
9734
10260
|
const Sizable = {
|
|
9735
10261
|
string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
9736
10262
|
file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
@@ -9836,12 +10362,12 @@ var error39 = () => {
|
|
|
9836
10362
|
};
|
|
9837
10363
|
function th_default() {
|
|
9838
10364
|
return {
|
|
9839
|
-
localeError:
|
|
10365
|
+
localeError: error42()
|
|
9840
10366
|
};
|
|
9841
10367
|
}
|
|
9842
10368
|
|
|
9843
10369
|
// ../../node_modules/zod/v4/locales/tr.js
|
|
9844
|
-
var
|
|
10370
|
+
var error43 = () => {
|
|
9845
10371
|
const Sizable = {
|
|
9846
10372
|
string: { unit: "karakter", verb: "olmal\u0131" },
|
|
9847
10373
|
file: { unit: "bayt", verb: "olmal\u0131" },
|
|
@@ -9942,12 +10468,12 @@ var error40 = () => {
|
|
|
9942
10468
|
};
|
|
9943
10469
|
function tr_default() {
|
|
9944
10470
|
return {
|
|
9945
|
-
localeError:
|
|
10471
|
+
localeError: error43()
|
|
9946
10472
|
};
|
|
9947
10473
|
}
|
|
9948
10474
|
|
|
9949
10475
|
// ../../node_modules/zod/v4/locales/uk.js
|
|
9950
|
-
var
|
|
10476
|
+
var error44 = () => {
|
|
9951
10477
|
const Sizable = {
|
|
9952
10478
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
9953
10479
|
file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
@@ -10051,7 +10577,7 @@ var error41 = () => {
|
|
|
10051
10577
|
};
|
|
10052
10578
|
function uk_default() {
|
|
10053
10579
|
return {
|
|
10054
|
-
localeError:
|
|
10580
|
+
localeError: error44()
|
|
10055
10581
|
};
|
|
10056
10582
|
}
|
|
10057
10583
|
|
|
@@ -10061,7 +10587,7 @@ function ua_default() {
|
|
|
10061
10587
|
}
|
|
10062
10588
|
|
|
10063
10589
|
// ../../node_modules/zod/v4/locales/ur.js
|
|
10064
|
-
var
|
|
10590
|
+
var error45 = () => {
|
|
10065
10591
|
const Sizable = {
|
|
10066
10592
|
string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
|
|
10067
10593
|
file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
|
|
@@ -10167,17 +10693,18 @@ var error42 = () => {
|
|
|
10167
10693
|
};
|
|
10168
10694
|
function ur_default() {
|
|
10169
10695
|
return {
|
|
10170
|
-
localeError:
|
|
10696
|
+
localeError: error45()
|
|
10171
10697
|
};
|
|
10172
10698
|
}
|
|
10173
10699
|
|
|
10174
10700
|
// ../../node_modules/zod/v4/locales/uz.js
|
|
10175
|
-
var
|
|
10701
|
+
var error46 = () => {
|
|
10176
10702
|
const Sizable = {
|
|
10177
10703
|
string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
|
|
10178
10704
|
file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
|
|
10179
10705
|
array: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
10180
|
-
set: { unit: "element", verb: "bo\u2018lishi kerak" }
|
|
10706
|
+
set: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
10707
|
+
map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
|
|
10181
10708
|
};
|
|
10182
10709
|
function getSizing(origin) {
|
|
10183
10710
|
return Sizable[origin] ?? null;
|
|
@@ -10277,12 +10804,12 @@ var error43 = () => {
|
|
|
10277
10804
|
};
|
|
10278
10805
|
function uz_default() {
|
|
10279
10806
|
return {
|
|
10280
|
-
localeError:
|
|
10807
|
+
localeError: error46()
|
|
10281
10808
|
};
|
|
10282
10809
|
}
|
|
10283
10810
|
|
|
10284
10811
|
// ../../node_modules/zod/v4/locales/vi.js
|
|
10285
|
-
var
|
|
10812
|
+
var error47 = () => {
|
|
10286
10813
|
const Sizable = {
|
|
10287
10814
|
string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
|
|
10288
10815
|
file: { unit: "byte", verb: "c\xF3" },
|
|
@@ -10386,12 +10913,12 @@ var error44 = () => {
|
|
|
10386
10913
|
};
|
|
10387
10914
|
function vi_default() {
|
|
10388
10915
|
return {
|
|
10389
|
-
localeError:
|
|
10916
|
+
localeError: error47()
|
|
10390
10917
|
};
|
|
10391
10918
|
}
|
|
10392
10919
|
|
|
10393
10920
|
// ../../node_modules/zod/v4/locales/zh-CN.js
|
|
10394
|
-
var
|
|
10921
|
+
var error48 = () => {
|
|
10395
10922
|
const Sizable = {
|
|
10396
10923
|
string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
|
|
10397
10924
|
file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
|
|
@@ -10496,12 +11023,12 @@ var error45 = () => {
|
|
|
10496
11023
|
};
|
|
10497
11024
|
function zh_CN_default() {
|
|
10498
11025
|
return {
|
|
10499
|
-
localeError:
|
|
11026
|
+
localeError: error48()
|
|
10500
11027
|
};
|
|
10501
11028
|
}
|
|
10502
11029
|
|
|
10503
11030
|
// ../../node_modules/zod/v4/locales/zh-TW.js
|
|
10504
|
-
var
|
|
11031
|
+
var error49 = () => {
|
|
10505
11032
|
const Sizable = {
|
|
10506
11033
|
string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
|
|
10507
11034
|
file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
|
|
@@ -10604,12 +11131,12 @@ var error46 = () => {
|
|
|
10604
11131
|
};
|
|
10605
11132
|
function zh_TW_default() {
|
|
10606
11133
|
return {
|
|
10607
|
-
localeError:
|
|
11134
|
+
localeError: error49()
|
|
10608
11135
|
};
|
|
10609
11136
|
}
|
|
10610
11137
|
|
|
10611
11138
|
// ../../node_modules/zod/v4/locales/yo.js
|
|
10612
|
-
var
|
|
11139
|
+
var error50 = () => {
|
|
10613
11140
|
const Sizable = {
|
|
10614
11141
|
string: { unit: "\xE0mi", verb: "n\xED" },
|
|
10615
11142
|
file: { unit: "bytes", verb: "n\xED" },
|
|
@@ -10712,12 +11239,12 @@ var error47 = () => {
|
|
|
10712
11239
|
};
|
|
10713
11240
|
function yo_default() {
|
|
10714
11241
|
return {
|
|
10715
|
-
localeError:
|
|
11242
|
+
localeError: error50()
|
|
10716
11243
|
};
|
|
10717
11244
|
}
|
|
10718
11245
|
|
|
10719
11246
|
// ../../node_modules/zod/v4/core/registries.js
|
|
10720
|
-
var
|
|
11247
|
+
var _a2;
|
|
10721
11248
|
var $output = /* @__PURE__ */ Symbol("ZodOutput");
|
|
10722
11249
|
var $input = /* @__PURE__ */ Symbol("ZodInput");
|
|
10723
11250
|
var $ZodRegistry = class {
|
|
@@ -10763,7 +11290,7 @@ var $ZodRegistry = class {
|
|
|
10763
11290
|
function registry() {
|
|
10764
11291
|
return new $ZodRegistry();
|
|
10765
11292
|
}
|
|
10766
|
-
(
|
|
11293
|
+
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
10767
11294
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
10768
11295
|
|
|
10769
11296
|
// ../../node_modules/zod/v4/core/api.js
|
|
@@ -11681,7 +12208,7 @@ function _refine(Class2, fn, _params) {
|
|
|
11681
12208
|
return schema;
|
|
11682
12209
|
}
|
|
11683
12210
|
// @__NO_SIDE_EFFECTS__
|
|
11684
|
-
function _superRefine(fn) {
|
|
12211
|
+
function _superRefine(fn, params) {
|
|
11685
12212
|
const ch = /* @__PURE__ */ _check((payload) => {
|
|
11686
12213
|
payload.addIssue = (issue2) => {
|
|
11687
12214
|
if (typeof issue2 === "string") {
|
|
@@ -11698,7 +12225,7 @@ function _superRefine(fn) {
|
|
|
11698
12225
|
}
|
|
11699
12226
|
};
|
|
11700
12227
|
return fn(payload.value, payload);
|
|
11701
|
-
});
|
|
12228
|
+
}, params);
|
|
11702
12229
|
return ch;
|
|
11703
12230
|
}
|
|
11704
12231
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -11828,7 +12355,7 @@ function initializeContext(params) {
|
|
|
11828
12355
|
};
|
|
11829
12356
|
}
|
|
11830
12357
|
function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
11831
|
-
var
|
|
12358
|
+
var _a3;
|
|
11832
12359
|
const def = schema._zod.def;
|
|
11833
12360
|
const seen = ctx.seen.get(schema);
|
|
11834
12361
|
if (seen) {
|
|
@@ -11875,8 +12402,8 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
|
11875
12402
|
delete result.schema.examples;
|
|
11876
12403
|
delete result.schema.default;
|
|
11877
12404
|
}
|
|
11878
|
-
if (ctx.io === "input" && result.schema
|
|
11879
|
-
(
|
|
12405
|
+
if (ctx.io === "input" && "_prefault" in result.schema)
|
|
12406
|
+
(_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
|
|
11880
12407
|
delete result.schema._prefault;
|
|
11881
12408
|
const _result = ctx.seen.get(schema);
|
|
11882
12409
|
return _result.schema;
|
|
@@ -12057,10 +12584,15 @@ function finalize(ctx, schema) {
|
|
|
12057
12584
|
result.$id = ctx.external.uri(id);
|
|
12058
12585
|
}
|
|
12059
12586
|
Object.assign(result, root.def ?? root.schema);
|
|
12587
|
+
const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
|
|
12588
|
+
if (rootMetaId !== void 0 && result.id === rootMetaId)
|
|
12589
|
+
delete result.id;
|
|
12060
12590
|
const defs = ctx.external?.defs ?? {};
|
|
12061
12591
|
for (const entry of ctx.seen.entries()) {
|
|
12062
12592
|
const seen = entry[1];
|
|
12063
12593
|
if (seen.def && seen.defId) {
|
|
12594
|
+
if (seen.def.id === seen.defId)
|
|
12595
|
+
delete seen.def.id;
|
|
12064
12596
|
defs[seen.defId] = seen.def;
|
|
12065
12597
|
}
|
|
12066
12598
|
}
|
|
@@ -12116,6 +12648,8 @@ function isTransforming(_schema, _ctx) {
|
|
|
12116
12648
|
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
|
|
12117
12649
|
}
|
|
12118
12650
|
if (def.type === "pipe") {
|
|
12651
|
+
if (_schema._zod.traits.has("$ZodCodec"))
|
|
12652
|
+
return true;
|
|
12119
12653
|
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
12120
12654
|
}
|
|
12121
12655
|
if (def.type === "object") {
|
|
@@ -12205,39 +12739,28 @@ var numberProcessor = (schema, ctx, _json, _params) => {
|
|
|
12205
12739
|
json2.type = "integer";
|
|
12206
12740
|
else
|
|
12207
12741
|
json2.type = "number";
|
|
12208
|
-
|
|
12209
|
-
|
|
12742
|
+
const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
|
|
12743
|
+
const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
|
|
12744
|
+
const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
|
|
12745
|
+
if (exMin) {
|
|
12746
|
+
if (legacy) {
|
|
12210
12747
|
json2.minimum = exclusiveMinimum;
|
|
12211
12748
|
json2.exclusiveMinimum = true;
|
|
12212
12749
|
} else {
|
|
12213
12750
|
json2.exclusiveMinimum = exclusiveMinimum;
|
|
12214
12751
|
}
|
|
12215
|
-
}
|
|
12216
|
-
if (typeof minimum === "number") {
|
|
12752
|
+
} else if (typeof minimum === "number") {
|
|
12217
12753
|
json2.minimum = minimum;
|
|
12218
|
-
if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
|
|
12219
|
-
if (exclusiveMinimum >= minimum)
|
|
12220
|
-
delete json2.minimum;
|
|
12221
|
-
else
|
|
12222
|
-
delete json2.exclusiveMinimum;
|
|
12223
|
-
}
|
|
12224
12754
|
}
|
|
12225
|
-
if (
|
|
12226
|
-
if (
|
|
12755
|
+
if (exMax) {
|
|
12756
|
+
if (legacy) {
|
|
12227
12757
|
json2.maximum = exclusiveMaximum;
|
|
12228
12758
|
json2.exclusiveMaximum = true;
|
|
12229
12759
|
} else {
|
|
12230
12760
|
json2.exclusiveMaximum = exclusiveMaximum;
|
|
12231
12761
|
}
|
|
12232
|
-
}
|
|
12233
|
-
if (typeof maximum === "number") {
|
|
12762
|
+
} else if (typeof maximum === "number") {
|
|
12234
12763
|
json2.maximum = maximum;
|
|
12235
|
-
if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
|
|
12236
|
-
if (exclusiveMaximum <= maximum)
|
|
12237
|
-
delete json2.maximum;
|
|
12238
|
-
else
|
|
12239
|
-
delete json2.exclusiveMaximum;
|
|
12240
|
-
}
|
|
12241
12764
|
}
|
|
12242
12765
|
if (typeof multipleOf === "number")
|
|
12243
12766
|
json2.multipleOf = multipleOf;
|
|
@@ -12409,7 +12932,10 @@ var arrayProcessor = (schema, ctx, _json, params) => {
|
|
|
12409
12932
|
if (typeof maximum === "number")
|
|
12410
12933
|
json2.maxItems = maximum;
|
|
12411
12934
|
json2.type = "array";
|
|
12412
|
-
json2.items = process2(def.element, ctx, {
|
|
12935
|
+
json2.items = process2(def.element, ctx, {
|
|
12936
|
+
...params,
|
|
12937
|
+
path: [...params.path, "items"]
|
|
12938
|
+
});
|
|
12413
12939
|
};
|
|
12414
12940
|
var objectProcessor = (schema, ctx, _json, params) => {
|
|
12415
12941
|
const json2 = _json;
|
|
@@ -12602,7 +13128,8 @@ var catchProcessor = (schema, ctx, json2, params) => {
|
|
|
12602
13128
|
};
|
|
12603
13129
|
var pipeProcessor = (schema, ctx, _json, params) => {
|
|
12604
13130
|
const def = schema._zod.def;
|
|
12605
|
-
const
|
|
13131
|
+
const inIsTransform = def.in._zod.traits.has("$ZodTransform");
|
|
13132
|
+
const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
|
|
12606
13133
|
process2(innerType, ctx, params);
|
|
12607
13134
|
const seen = ctx.seen.get(schema);
|
|
12608
13135
|
seen.ref = innerType;
|
|
@@ -12836,6 +13363,7 @@ __export(schemas_exports2, {
|
|
|
12836
13363
|
ZodOptional: () => ZodOptional,
|
|
12837
13364
|
ZodPipe: () => ZodPipe,
|
|
12838
13365
|
ZodPrefault: () => ZodPrefault,
|
|
13366
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
12839
13367
|
ZodPromise: () => ZodPromise,
|
|
12840
13368
|
ZodReadonly: () => ZodReadonly,
|
|
12841
13369
|
ZodRecord: () => ZodRecord,
|
|
@@ -12896,6 +13424,7 @@ __export(schemas_exports2, {
|
|
|
12896
13424
|
int32: () => int32,
|
|
12897
13425
|
int64: () => int64,
|
|
12898
13426
|
intersection: () => intersection,
|
|
13427
|
+
invertCodec: () => invertCodec,
|
|
12899
13428
|
ipv4: () => ipv42,
|
|
12900
13429
|
ipv6: () => ipv62,
|
|
12901
13430
|
json: () => json,
|
|
@@ -13065,8 +13594,8 @@ var initializer2 = (inst, issues) => {
|
|
|
13065
13594
|
}
|
|
13066
13595
|
});
|
|
13067
13596
|
};
|
|
13068
|
-
var ZodError = $constructor("ZodError", initializer2);
|
|
13069
|
-
var ZodRealError = $constructor("ZodError", initializer2, {
|
|
13597
|
+
var ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
|
|
13598
|
+
var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
|
|
13070
13599
|
Parent: Error
|
|
13071
13600
|
});
|
|
13072
13601
|
|
|
@@ -13085,6 +13614,43 @@ var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
|
13085
13614
|
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
13086
13615
|
|
|
13087
13616
|
// ../../node_modules/zod/v4/classic/schemas.js
|
|
13617
|
+
var _installedGroups = /* @__PURE__ */ new WeakMap();
|
|
13618
|
+
function _installLazyMethods(inst, group, methods) {
|
|
13619
|
+
const proto = Object.getPrototypeOf(inst);
|
|
13620
|
+
let installed = _installedGroups.get(proto);
|
|
13621
|
+
if (!installed) {
|
|
13622
|
+
installed = /* @__PURE__ */ new Set();
|
|
13623
|
+
_installedGroups.set(proto, installed);
|
|
13624
|
+
}
|
|
13625
|
+
if (installed.has(group))
|
|
13626
|
+
return;
|
|
13627
|
+
installed.add(group);
|
|
13628
|
+
for (const key in methods) {
|
|
13629
|
+
const fn = methods[key];
|
|
13630
|
+
Object.defineProperty(proto, key, {
|
|
13631
|
+
configurable: true,
|
|
13632
|
+
enumerable: false,
|
|
13633
|
+
get() {
|
|
13634
|
+
const bound = fn.bind(this);
|
|
13635
|
+
Object.defineProperty(this, key, {
|
|
13636
|
+
configurable: true,
|
|
13637
|
+
writable: true,
|
|
13638
|
+
enumerable: true,
|
|
13639
|
+
value: bound
|
|
13640
|
+
});
|
|
13641
|
+
return bound;
|
|
13642
|
+
},
|
|
13643
|
+
set(v) {
|
|
13644
|
+
Object.defineProperty(this, key, {
|
|
13645
|
+
configurable: true,
|
|
13646
|
+
writable: true,
|
|
13647
|
+
enumerable: true,
|
|
13648
|
+
value: v
|
|
13649
|
+
});
|
|
13650
|
+
}
|
|
13651
|
+
});
|
|
13652
|
+
}
|
|
13653
|
+
}
|
|
13088
13654
|
var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
13089
13655
|
$ZodType.init(inst, def);
|
|
13090
13656
|
Object.assign(inst["~standard"], {
|
|
@@ -13097,23 +13663,6 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
13097
13663
|
inst.def = def;
|
|
13098
13664
|
inst.type = def.type;
|
|
13099
13665
|
Object.defineProperty(inst, "_def", { value: def });
|
|
13100
|
-
inst.check = (...checks) => {
|
|
13101
|
-
return inst.clone(util_exports.mergeDefs(def, {
|
|
13102
|
-
checks: [
|
|
13103
|
-
...def.checks ?? [],
|
|
13104
|
-
...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
13105
|
-
]
|
|
13106
|
-
}), {
|
|
13107
|
-
parent: true
|
|
13108
|
-
});
|
|
13109
|
-
};
|
|
13110
|
-
inst.with = inst.check;
|
|
13111
|
-
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
13112
|
-
inst.brand = () => inst;
|
|
13113
|
-
inst.register = ((reg, meta3) => {
|
|
13114
|
-
reg.add(inst, meta3);
|
|
13115
|
-
return inst;
|
|
13116
|
-
});
|
|
13117
13666
|
inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
|
|
13118
13667
|
inst.safeParse = (data, params) => safeParse2(inst, data, params);
|
|
13119
13668
|
inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
|
|
@@ -13127,45 +13676,108 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
13127
13676
|
inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
|
|
13128
13677
|
inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
|
|
13129
13678
|
inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
|
|
13130
|
-
inst
|
|
13131
|
-
|
|
13132
|
-
|
|
13133
|
-
|
|
13134
|
-
|
|
13135
|
-
|
|
13136
|
-
|
|
13137
|
-
|
|
13138
|
-
|
|
13139
|
-
|
|
13140
|
-
|
|
13141
|
-
|
|
13142
|
-
|
|
13143
|
-
|
|
13144
|
-
|
|
13145
|
-
|
|
13146
|
-
|
|
13147
|
-
|
|
13148
|
-
|
|
13149
|
-
|
|
13150
|
-
|
|
13151
|
-
|
|
13679
|
+
_installLazyMethods(inst, "ZodType", {
|
|
13680
|
+
check(...chks) {
|
|
13681
|
+
const def2 = this.def;
|
|
13682
|
+
return this.clone(util_exports.mergeDefs(def2, {
|
|
13683
|
+
checks: [
|
|
13684
|
+
...def2.checks ?? [],
|
|
13685
|
+
...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
13686
|
+
]
|
|
13687
|
+
}), { parent: true });
|
|
13688
|
+
},
|
|
13689
|
+
with(...chks) {
|
|
13690
|
+
return this.check(...chks);
|
|
13691
|
+
},
|
|
13692
|
+
clone(def2, params) {
|
|
13693
|
+
return clone(this, def2, params);
|
|
13694
|
+
},
|
|
13695
|
+
brand() {
|
|
13696
|
+
return this;
|
|
13697
|
+
},
|
|
13698
|
+
register(reg, meta3) {
|
|
13699
|
+
reg.add(this, meta3);
|
|
13700
|
+
return this;
|
|
13701
|
+
},
|
|
13702
|
+
refine(check2, params) {
|
|
13703
|
+
return this.check(refine(check2, params));
|
|
13704
|
+
},
|
|
13705
|
+
superRefine(refinement, params) {
|
|
13706
|
+
return this.check(superRefine(refinement, params));
|
|
13707
|
+
},
|
|
13708
|
+
overwrite(fn) {
|
|
13709
|
+
return this.check(_overwrite(fn));
|
|
13710
|
+
},
|
|
13711
|
+
optional() {
|
|
13712
|
+
return optional(this);
|
|
13713
|
+
},
|
|
13714
|
+
exactOptional() {
|
|
13715
|
+
return exactOptional(this);
|
|
13716
|
+
},
|
|
13717
|
+
nullable() {
|
|
13718
|
+
return nullable(this);
|
|
13719
|
+
},
|
|
13720
|
+
nullish() {
|
|
13721
|
+
return optional(nullable(this));
|
|
13722
|
+
},
|
|
13723
|
+
nonoptional(params) {
|
|
13724
|
+
return nonoptional(this, params);
|
|
13725
|
+
},
|
|
13726
|
+
array() {
|
|
13727
|
+
return array(this);
|
|
13728
|
+
},
|
|
13729
|
+
or(arg) {
|
|
13730
|
+
return union([this, arg]);
|
|
13731
|
+
},
|
|
13732
|
+
and(arg) {
|
|
13733
|
+
return intersection(this, arg);
|
|
13734
|
+
},
|
|
13735
|
+
transform(tx) {
|
|
13736
|
+
return pipe(this, transform(tx));
|
|
13737
|
+
},
|
|
13738
|
+
default(d) {
|
|
13739
|
+
return _default2(this, d);
|
|
13740
|
+
},
|
|
13741
|
+
prefault(d) {
|
|
13742
|
+
return prefault(this, d);
|
|
13743
|
+
},
|
|
13744
|
+
catch(params) {
|
|
13745
|
+
return _catch2(this, params);
|
|
13746
|
+
},
|
|
13747
|
+
pipe(target) {
|
|
13748
|
+
return pipe(this, target);
|
|
13749
|
+
},
|
|
13750
|
+
readonly() {
|
|
13751
|
+
return readonly(this);
|
|
13752
|
+
},
|
|
13753
|
+
describe(description) {
|
|
13754
|
+
const cl = this.clone();
|
|
13755
|
+
globalRegistry.add(cl, { description });
|
|
13756
|
+
return cl;
|
|
13757
|
+
},
|
|
13758
|
+
meta(...args) {
|
|
13759
|
+
if (args.length === 0)
|
|
13760
|
+
return globalRegistry.get(this);
|
|
13761
|
+
const cl = this.clone();
|
|
13762
|
+
globalRegistry.add(cl, args[0]);
|
|
13763
|
+
return cl;
|
|
13764
|
+
},
|
|
13765
|
+
isOptional() {
|
|
13766
|
+
return this.safeParse(void 0).success;
|
|
13767
|
+
},
|
|
13768
|
+
isNullable() {
|
|
13769
|
+
return this.safeParse(null).success;
|
|
13770
|
+
},
|
|
13771
|
+
apply(fn) {
|
|
13772
|
+
return fn(this);
|
|
13773
|
+
}
|
|
13774
|
+
});
|
|
13152
13775
|
Object.defineProperty(inst, "description", {
|
|
13153
13776
|
get() {
|
|
13154
13777
|
return globalRegistry.get(inst)?.description;
|
|
13155
13778
|
},
|
|
13156
13779
|
configurable: true
|
|
13157
13780
|
});
|
|
13158
|
-
inst.meta = (...args) => {
|
|
13159
|
-
if (args.length === 0) {
|
|
13160
|
-
return globalRegistry.get(inst);
|
|
13161
|
-
}
|
|
13162
|
-
const cl = inst.clone();
|
|
13163
|
-
globalRegistry.add(cl, args[0]);
|
|
13164
|
-
return cl;
|
|
13165
|
-
};
|
|
13166
|
-
inst.isOptional = () => inst.safeParse(void 0).success;
|
|
13167
|
-
inst.isNullable = () => inst.safeParse(null).success;
|
|
13168
|
-
inst.apply = (fn) => fn(inst);
|
|
13169
13781
|
return inst;
|
|
13170
13782
|
});
|
|
13171
13783
|
var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
@@ -13176,21 +13788,53 @@ var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
|
13176
13788
|
inst.format = bag.format ?? null;
|
|
13177
13789
|
inst.minLength = bag.minimum ?? null;
|
|
13178
13790
|
inst.maxLength = bag.maximum ?? null;
|
|
13179
|
-
inst
|
|
13180
|
-
|
|
13181
|
-
|
|
13182
|
-
|
|
13183
|
-
|
|
13184
|
-
|
|
13185
|
-
|
|
13186
|
-
|
|
13187
|
-
|
|
13188
|
-
|
|
13189
|
-
|
|
13190
|
-
|
|
13191
|
-
|
|
13192
|
-
|
|
13193
|
-
|
|
13791
|
+
_installLazyMethods(inst, "_ZodString", {
|
|
13792
|
+
regex(...args) {
|
|
13793
|
+
return this.check(_regex(...args));
|
|
13794
|
+
},
|
|
13795
|
+
includes(...args) {
|
|
13796
|
+
return this.check(_includes(...args));
|
|
13797
|
+
},
|
|
13798
|
+
startsWith(...args) {
|
|
13799
|
+
return this.check(_startsWith(...args));
|
|
13800
|
+
},
|
|
13801
|
+
endsWith(...args) {
|
|
13802
|
+
return this.check(_endsWith(...args));
|
|
13803
|
+
},
|
|
13804
|
+
min(...args) {
|
|
13805
|
+
return this.check(_minLength(...args));
|
|
13806
|
+
},
|
|
13807
|
+
max(...args) {
|
|
13808
|
+
return this.check(_maxLength(...args));
|
|
13809
|
+
},
|
|
13810
|
+
length(...args) {
|
|
13811
|
+
return this.check(_length(...args));
|
|
13812
|
+
},
|
|
13813
|
+
nonempty(...args) {
|
|
13814
|
+
return this.check(_minLength(1, ...args));
|
|
13815
|
+
},
|
|
13816
|
+
lowercase(params) {
|
|
13817
|
+
return this.check(_lowercase(params));
|
|
13818
|
+
},
|
|
13819
|
+
uppercase(params) {
|
|
13820
|
+
return this.check(_uppercase(params));
|
|
13821
|
+
},
|
|
13822
|
+
trim() {
|
|
13823
|
+
return this.check(_trim());
|
|
13824
|
+
},
|
|
13825
|
+
normalize(...args) {
|
|
13826
|
+
return this.check(_normalize(...args));
|
|
13827
|
+
},
|
|
13828
|
+
toLowerCase() {
|
|
13829
|
+
return this.check(_toLowerCase());
|
|
13830
|
+
},
|
|
13831
|
+
toUpperCase() {
|
|
13832
|
+
return this.check(_toUpperCase());
|
|
13833
|
+
},
|
|
13834
|
+
slugify() {
|
|
13835
|
+
return this.check(_slugify());
|
|
13836
|
+
}
|
|
13837
|
+
});
|
|
13194
13838
|
});
|
|
13195
13839
|
var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
13196
13840
|
$ZodString.init(inst, def);
|
|
@@ -13269,7 +13913,7 @@ function url(params) {
|
|
|
13269
13913
|
}
|
|
13270
13914
|
function httpUrl(params) {
|
|
13271
13915
|
return _url(ZodURL, {
|
|
13272
|
-
protocol:
|
|
13916
|
+
protocol: regexes_exports.httpProtocol,
|
|
13273
13917
|
hostname: regexes_exports.domain,
|
|
13274
13918
|
...util_exports.normalizeParams(params)
|
|
13275
13919
|
});
|
|
@@ -13411,21 +14055,53 @@ var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
|
13411
14055
|
$ZodNumber.init(inst, def);
|
|
13412
14056
|
ZodType.init(inst, def);
|
|
13413
14057
|
inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
|
|
13414
|
-
inst
|
|
13415
|
-
|
|
13416
|
-
|
|
13417
|
-
|
|
13418
|
-
|
|
13419
|
-
|
|
13420
|
-
|
|
13421
|
-
|
|
13422
|
-
|
|
13423
|
-
|
|
13424
|
-
|
|
13425
|
-
|
|
13426
|
-
|
|
13427
|
-
|
|
13428
|
-
|
|
14058
|
+
_installLazyMethods(inst, "ZodNumber", {
|
|
14059
|
+
gt(value, params) {
|
|
14060
|
+
return this.check(_gt(value, params));
|
|
14061
|
+
},
|
|
14062
|
+
gte(value, params) {
|
|
14063
|
+
return this.check(_gte(value, params));
|
|
14064
|
+
},
|
|
14065
|
+
min(value, params) {
|
|
14066
|
+
return this.check(_gte(value, params));
|
|
14067
|
+
},
|
|
14068
|
+
lt(value, params) {
|
|
14069
|
+
return this.check(_lt(value, params));
|
|
14070
|
+
},
|
|
14071
|
+
lte(value, params) {
|
|
14072
|
+
return this.check(_lte(value, params));
|
|
14073
|
+
},
|
|
14074
|
+
max(value, params) {
|
|
14075
|
+
return this.check(_lte(value, params));
|
|
14076
|
+
},
|
|
14077
|
+
int(params) {
|
|
14078
|
+
return this.check(int(params));
|
|
14079
|
+
},
|
|
14080
|
+
safe(params) {
|
|
14081
|
+
return this.check(int(params));
|
|
14082
|
+
},
|
|
14083
|
+
positive(params) {
|
|
14084
|
+
return this.check(_gt(0, params));
|
|
14085
|
+
},
|
|
14086
|
+
nonnegative(params) {
|
|
14087
|
+
return this.check(_gte(0, params));
|
|
14088
|
+
},
|
|
14089
|
+
negative(params) {
|
|
14090
|
+
return this.check(_lt(0, params));
|
|
14091
|
+
},
|
|
14092
|
+
nonpositive(params) {
|
|
14093
|
+
return this.check(_lte(0, params));
|
|
14094
|
+
},
|
|
14095
|
+
multipleOf(value, params) {
|
|
14096
|
+
return this.check(_multipleOf(value, params));
|
|
14097
|
+
},
|
|
14098
|
+
step(value, params) {
|
|
14099
|
+
return this.check(_multipleOf(value, params));
|
|
14100
|
+
},
|
|
14101
|
+
finite() {
|
|
14102
|
+
return this;
|
|
14103
|
+
}
|
|
14104
|
+
});
|
|
13429
14105
|
const bag = inst._zod.bag;
|
|
13430
14106
|
inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
13431
14107
|
inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
|
|
@@ -13572,11 +14248,23 @@ var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
|
|
|
13572
14248
|
ZodType.init(inst, def);
|
|
13573
14249
|
inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
|
|
13574
14250
|
inst.element = def.element;
|
|
13575
|
-
inst
|
|
13576
|
-
|
|
13577
|
-
|
|
13578
|
-
|
|
13579
|
-
|
|
14251
|
+
_installLazyMethods(inst, "ZodArray", {
|
|
14252
|
+
min(n, params) {
|
|
14253
|
+
return this.check(_minLength(n, params));
|
|
14254
|
+
},
|
|
14255
|
+
nonempty(params) {
|
|
14256
|
+
return this.check(_minLength(1, params));
|
|
14257
|
+
},
|
|
14258
|
+
max(n, params) {
|
|
14259
|
+
return this.check(_maxLength(n, params));
|
|
14260
|
+
},
|
|
14261
|
+
length(n, params) {
|
|
14262
|
+
return this.check(_length(n, params));
|
|
14263
|
+
},
|
|
14264
|
+
unwrap() {
|
|
14265
|
+
return this.element;
|
|
14266
|
+
}
|
|
14267
|
+
});
|
|
13580
14268
|
});
|
|
13581
14269
|
function array(element, params) {
|
|
13582
14270
|
return _array(ZodArray, element, params);
|
|
@@ -13592,23 +14280,47 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
|
13592
14280
|
util_exports.defineLazy(inst, "shape", () => {
|
|
13593
14281
|
return def.shape;
|
|
13594
14282
|
});
|
|
13595
|
-
inst
|
|
13596
|
-
|
|
13597
|
-
|
|
13598
|
-
|
|
13599
|
-
|
|
13600
|
-
|
|
13601
|
-
|
|
13602
|
-
|
|
13603
|
-
|
|
13604
|
-
|
|
13605
|
-
|
|
13606
|
-
|
|
13607
|
-
|
|
13608
|
-
|
|
13609
|
-
|
|
13610
|
-
|
|
13611
|
-
|
|
14283
|
+
_installLazyMethods(inst, "ZodObject", {
|
|
14284
|
+
keyof() {
|
|
14285
|
+
return _enum2(Object.keys(this._zod.def.shape));
|
|
14286
|
+
},
|
|
14287
|
+
catchall(catchall) {
|
|
14288
|
+
return this.clone({ ...this._zod.def, catchall });
|
|
14289
|
+
},
|
|
14290
|
+
passthrough() {
|
|
14291
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
14292
|
+
},
|
|
14293
|
+
loose() {
|
|
14294
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
14295
|
+
},
|
|
14296
|
+
strict() {
|
|
14297
|
+
return this.clone({ ...this._zod.def, catchall: never() });
|
|
14298
|
+
},
|
|
14299
|
+
strip() {
|
|
14300
|
+
return this.clone({ ...this._zod.def, catchall: void 0 });
|
|
14301
|
+
},
|
|
14302
|
+
extend(incoming) {
|
|
14303
|
+
return util_exports.extend(this, incoming);
|
|
14304
|
+
},
|
|
14305
|
+
safeExtend(incoming) {
|
|
14306
|
+
return util_exports.safeExtend(this, incoming);
|
|
14307
|
+
},
|
|
14308
|
+
merge(other) {
|
|
14309
|
+
return util_exports.merge(this, other);
|
|
14310
|
+
},
|
|
14311
|
+
pick(mask) {
|
|
14312
|
+
return util_exports.pick(this, mask);
|
|
14313
|
+
},
|
|
14314
|
+
omit(mask) {
|
|
14315
|
+
return util_exports.omit(this, mask);
|
|
14316
|
+
},
|
|
14317
|
+
partial(...args) {
|
|
14318
|
+
return util_exports.partial(ZodOptional, this, args[0]);
|
|
14319
|
+
},
|
|
14320
|
+
required(...args) {
|
|
14321
|
+
return util_exports.required(ZodNonOptional, this, args[0]);
|
|
14322
|
+
}
|
|
14323
|
+
});
|
|
13612
14324
|
});
|
|
13613
14325
|
function object(shape, params) {
|
|
13614
14326
|
const def = {
|
|
@@ -13713,6 +14425,14 @@ var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
|
|
|
13713
14425
|
inst.valueType = def.valueType;
|
|
13714
14426
|
});
|
|
13715
14427
|
function record(keyType, valueType, params) {
|
|
14428
|
+
if (!valueType || !valueType._zod) {
|
|
14429
|
+
return new ZodRecord({
|
|
14430
|
+
type: "record",
|
|
14431
|
+
keyType: string2(),
|
|
14432
|
+
valueType: keyType,
|
|
14433
|
+
...util_exports.normalizeParams(valueType)
|
|
14434
|
+
});
|
|
14435
|
+
}
|
|
13716
14436
|
return new ZodRecord({
|
|
13717
14437
|
type: "record",
|
|
13718
14438
|
keyType,
|
|
@@ -13884,10 +14604,12 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
|
13884
14604
|
if (output instanceof Promise) {
|
|
13885
14605
|
return output.then((output2) => {
|
|
13886
14606
|
payload.value = output2;
|
|
14607
|
+
payload.fallback = true;
|
|
13887
14608
|
return payload;
|
|
13888
14609
|
});
|
|
13889
14610
|
}
|
|
13890
14611
|
payload.value = output;
|
|
14612
|
+
payload.fallback = true;
|
|
13891
14613
|
return payload;
|
|
13892
14614
|
};
|
|
13893
14615
|
});
|
|
@@ -14042,6 +14764,20 @@ function codec(in_, out, params) {
|
|
|
14042
14764
|
reverseTransform: params.encode
|
|
14043
14765
|
});
|
|
14044
14766
|
}
|
|
14767
|
+
function invertCodec(codec2) {
|
|
14768
|
+
const def = codec2._zod.def;
|
|
14769
|
+
return new ZodCodec({
|
|
14770
|
+
type: "pipe",
|
|
14771
|
+
in: def.out,
|
|
14772
|
+
out: def.in,
|
|
14773
|
+
transform: def.reverseTransform,
|
|
14774
|
+
reverseTransform: def.transform
|
|
14775
|
+
});
|
|
14776
|
+
}
|
|
14777
|
+
var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
|
|
14778
|
+
ZodPipe.init(inst, def);
|
|
14779
|
+
$ZodPreprocess.init(inst, def);
|
|
14780
|
+
});
|
|
14045
14781
|
var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
14046
14782
|
$ZodReadonly.init(inst, def);
|
|
14047
14783
|
ZodType.init(inst, def);
|
|
@@ -14121,8 +14857,8 @@ function custom(fn, _params) {
|
|
|
14121
14857
|
function refine(fn, _params = {}) {
|
|
14122
14858
|
return _refine(ZodCustom, fn, _params);
|
|
14123
14859
|
}
|
|
14124
|
-
function superRefine(fn) {
|
|
14125
|
-
return _superRefine(fn);
|
|
14860
|
+
function superRefine(fn, params) {
|
|
14861
|
+
return _superRefine(fn, params);
|
|
14126
14862
|
}
|
|
14127
14863
|
var describe2 = describe;
|
|
14128
14864
|
var meta2 = meta;
|
|
@@ -14160,7 +14896,11 @@ function json(params) {
|
|
|
14160
14896
|
return jsonSchema;
|
|
14161
14897
|
}
|
|
14162
14898
|
function preprocess(fn, schema) {
|
|
14163
|
-
return
|
|
14899
|
+
return new ZodPreprocess({
|
|
14900
|
+
type: "pipe",
|
|
14901
|
+
in: transform(fn),
|
|
14902
|
+
out: schema
|
|
14903
|
+
});
|
|
14164
14904
|
}
|
|
14165
14905
|
|
|
14166
14906
|
// ../../node_modules/zod/v4/classic/compat.js
|
|
@@ -14581,12 +15321,6 @@ function convertBaseSchema(schema, ctx) {
|
|
|
14581
15321
|
default:
|
|
14582
15322
|
throw new Error(`Unsupported type: ${type}`);
|
|
14583
15323
|
}
|
|
14584
|
-
if (schema.description) {
|
|
14585
|
-
zodSchema = zodSchema.describe(schema.description);
|
|
14586
|
-
}
|
|
14587
|
-
if (schema.default !== void 0) {
|
|
14588
|
-
zodSchema = zodSchema.default(schema.default);
|
|
14589
|
-
}
|
|
14590
15324
|
return zodSchema;
|
|
14591
15325
|
}
|
|
14592
15326
|
function convertSchema(schema, ctx) {
|
|
@@ -14623,6 +15357,9 @@ function convertSchema(schema, ctx) {
|
|
|
14623
15357
|
if (schema.readOnly === true) {
|
|
14624
15358
|
baseSchema = z.readonly(baseSchema);
|
|
14625
15359
|
}
|
|
15360
|
+
if (schema.default !== void 0) {
|
|
15361
|
+
baseSchema = baseSchema.default(schema.default);
|
|
15362
|
+
}
|
|
14626
15363
|
const extraMeta = {};
|
|
14627
15364
|
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
14628
15365
|
for (const key of coreMetadataKeys) {
|
|
@@ -14644,23 +15381,32 @@ function convertSchema(schema, ctx) {
|
|
|
14644
15381
|
if (Object.keys(extraMeta).length > 0) {
|
|
14645
15382
|
ctx.registry.add(baseSchema, extraMeta);
|
|
14646
15383
|
}
|
|
15384
|
+
if (schema.description) {
|
|
15385
|
+
baseSchema = baseSchema.describe(schema.description);
|
|
15386
|
+
}
|
|
14647
15387
|
return baseSchema;
|
|
14648
15388
|
}
|
|
14649
15389
|
function fromJSONSchema(schema, params) {
|
|
14650
15390
|
if (typeof schema === "boolean") {
|
|
14651
15391
|
return schema ? z.any() : z.never();
|
|
14652
15392
|
}
|
|
14653
|
-
|
|
14654
|
-
|
|
15393
|
+
let normalized;
|
|
15394
|
+
try {
|
|
15395
|
+
normalized = JSON.parse(JSON.stringify(schema));
|
|
15396
|
+
} catch {
|
|
15397
|
+
throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
|
|
15398
|
+
}
|
|
15399
|
+
const version2 = detectVersion(normalized, params?.defaultTarget);
|
|
15400
|
+
const defs = normalized.$defs || normalized.definitions || {};
|
|
14655
15401
|
const ctx = {
|
|
14656
15402
|
version: version2,
|
|
14657
15403
|
defs,
|
|
14658
15404
|
refs: /* @__PURE__ */ new Map(),
|
|
14659
15405
|
processing: /* @__PURE__ */ new Set(),
|
|
14660
|
-
rootSchema:
|
|
15406
|
+
rootSchema: normalized,
|
|
14661
15407
|
registry: params?.registry ?? globalRegistry
|
|
14662
15408
|
};
|
|
14663
|
-
return convertSchema(
|
|
15409
|
+
return convertSchema(normalized, ctx);
|
|
14664
15410
|
}
|
|
14665
15411
|
|
|
14666
15412
|
// ../../node_modules/zod/v4/classic/coerce.js
|
|
@@ -14902,6 +15648,9 @@ var GLASSTRACE_ATTRIBUTE_NAMES = {
|
|
|
14902
15648
|
SIDE_EFFECT_FIELD_TIMEZONE: "glasstrace.side_effect.field.timezone",
|
|
14903
15649
|
SIDE_EFFECT_FIELD_STATUS: "glasstrace.side_effect.field.status",
|
|
14904
15650
|
SIDE_EFFECT_FIELD_PHASE: "glasstrace.side_effect.field.phase",
|
|
15651
|
+
SIDE_EFFECT_FIELD_RECIPIENT_CLASS: "glasstrace.side_effect.field.recipientClass",
|
|
15652
|
+
SIDE_EFFECT_FIELD_PARTICIPANT_COUNT: "glasstrace.side_effect.field.participantCount",
|
|
15653
|
+
SIDE_EFFECT_FIELD_ACTIVE_PARTICIPANT_COUNT: "glasstrace.side_effect.field.activeParticipantCount",
|
|
14905
15654
|
// Omission reason attributes — one per allowlisted reason. The
|
|
14906
15655
|
// attribute value carries an integer count; the rejected value is
|
|
14907
15656
|
// never echoed.
|
|
@@ -15437,8 +16186,8 @@ function tracedMiddleware(options, middleware) {
|
|
|
15437
16186
|
span.setStatus({ code: SpanStatusCode.ERROR });
|
|
15438
16187
|
}
|
|
15439
16188
|
return result;
|
|
15440
|
-
} catch (
|
|
15441
|
-
const normalized =
|
|
16189
|
+
} catch (error51) {
|
|
16190
|
+
const normalized = error51 instanceof Error ? error51 : typeof error51 === "string" ? error51 : new Error(String(error51));
|
|
15442
16191
|
const statusMessage = normalized instanceof Error ? normalized.message : normalized;
|
|
15443
16192
|
try {
|
|
15444
16193
|
span.recordException(normalized);
|
|
@@ -15451,7 +16200,7 @@ function tracedMiddleware(options, middleware) {
|
|
|
15451
16200
|
});
|
|
15452
16201
|
} catch {
|
|
15453
16202
|
}
|
|
15454
|
-
throw
|
|
16203
|
+
throw error51;
|
|
15455
16204
|
} finally {
|
|
15456
16205
|
try {
|
|
15457
16206
|
span.end();
|