@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/cli/init.cjs
CHANGED
|
@@ -84,10 +84,10 @@ function $constructor(name, initializer3, params) {
|
|
|
84
84
|
}
|
|
85
85
|
Object.defineProperty(Definition, "name", { value: name });
|
|
86
86
|
function _(def) {
|
|
87
|
-
var
|
|
87
|
+
var _a3;
|
|
88
88
|
const inst = params?.Parent ? new Definition() : this;
|
|
89
89
|
init(inst, def);
|
|
90
|
-
(
|
|
90
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
91
91
|
for (const fn of inst._zod.deferred) {
|
|
92
92
|
fn();
|
|
93
93
|
}
|
|
@@ -109,11 +109,11 @@ function config(newConfig) {
|
|
|
109
109
|
Object.assign(globalConfig, newConfig);
|
|
110
110
|
return globalConfig;
|
|
111
111
|
}
|
|
112
|
-
var NEVER, $brand, $ZodAsyncError, $ZodEncodeError, globalConfig;
|
|
112
|
+
var _a, NEVER, $brand, $ZodAsyncError, $ZodEncodeError, globalConfig;
|
|
113
113
|
var init_core = __esm({
|
|
114
114
|
"../../node_modules/zod/v4/core/core.js"() {
|
|
115
115
|
"use strict";
|
|
116
|
-
NEVER = Object.freeze({
|
|
116
|
+
NEVER = /* @__PURE__ */ Object.freeze({
|
|
117
117
|
status: "aborted"
|
|
118
118
|
});
|
|
119
119
|
$brand = /* @__PURE__ */ Symbol("zod_brand");
|
|
@@ -128,7 +128,8 @@ var init_core = __esm({
|
|
|
128
128
|
this.name = "ZodEncodeError";
|
|
129
129
|
}
|
|
130
130
|
};
|
|
131
|
-
|
|
131
|
+
(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
|
|
132
|
+
globalConfig = globalThis.__zod_globalConfig;
|
|
132
133
|
}
|
|
133
134
|
});
|
|
134
135
|
|
|
@@ -158,6 +159,7 @@ __export(util_exports, {
|
|
|
158
159
|
defineLazy: () => defineLazy,
|
|
159
160
|
esc: () => esc,
|
|
160
161
|
escapeRegex: () => escapeRegex,
|
|
162
|
+
explicitlyAborted: () => explicitlyAborted,
|
|
161
163
|
extend: () => extend,
|
|
162
164
|
finalizeIssue: () => finalizeIssue,
|
|
163
165
|
floatSafeRemainder: () => floatSafeRemainder,
|
|
@@ -246,19 +248,12 @@ function cleanRegex(source) {
|
|
|
246
248
|
return source.slice(start, end);
|
|
247
249
|
}
|
|
248
250
|
function floatSafeRemainder(val, step) {
|
|
249
|
-
const
|
|
250
|
-
const
|
|
251
|
-
|
|
252
|
-
if (
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
stepDecCount = Number.parseInt(match[1]);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
259
|
-
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
|
|
260
|
-
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
|
261
|
-
return valInt % stepInt / 10 ** decCount;
|
|
251
|
+
const ratio = val / step;
|
|
252
|
+
const roundedRatio = Math.round(ratio);
|
|
253
|
+
const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
|
|
254
|
+
if (Math.abs(ratio - roundedRatio) < tolerance)
|
|
255
|
+
return 0;
|
|
256
|
+
return ratio - roundedRatio;
|
|
262
257
|
}
|
|
263
258
|
function defineLazy(object2, key, getter) {
|
|
264
259
|
let value = void 0;
|
|
@@ -358,6 +353,10 @@ function shallowClone(o) {
|
|
|
358
353
|
return { ...o };
|
|
359
354
|
if (Array.isArray(o))
|
|
360
355
|
return [...o];
|
|
356
|
+
if (o instanceof Map)
|
|
357
|
+
return new Map(o);
|
|
358
|
+
if (o instanceof Set)
|
|
359
|
+
return new Set(o);
|
|
361
360
|
return o;
|
|
362
361
|
}
|
|
363
362
|
function numKeys(data) {
|
|
@@ -526,6 +525,9 @@ function safeExtend(schema, shape) {
|
|
|
526
525
|
return clone(schema, def);
|
|
527
526
|
}
|
|
528
527
|
function merge(a, b) {
|
|
528
|
+
if (a._zod.def.checks?.length) {
|
|
529
|
+
throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
530
|
+
}
|
|
529
531
|
const def = mergeDefs(a._zod.def, {
|
|
530
532
|
get shape() {
|
|
531
533
|
const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
|
|
@@ -535,8 +537,7 @@ function merge(a, b) {
|
|
|
535
537
|
get catchall() {
|
|
536
538
|
return b._zod.def.catchall;
|
|
537
539
|
},
|
|
538
|
-
checks: []
|
|
539
|
-
// delete existing checks
|
|
540
|
+
checks: b._zod.def.checks ?? []
|
|
540
541
|
});
|
|
541
542
|
return clone(a, def);
|
|
542
543
|
}
|
|
@@ -619,10 +620,20 @@ function aborted(x, startIndex = 0) {
|
|
|
619
620
|
}
|
|
620
621
|
return false;
|
|
621
622
|
}
|
|
623
|
+
function explicitlyAborted(x, startIndex = 0) {
|
|
624
|
+
if (x.aborted === true)
|
|
625
|
+
return true;
|
|
626
|
+
for (let i = startIndex; i < x.issues.length; i++) {
|
|
627
|
+
if (x.issues[i]?.continue === false) {
|
|
628
|
+
return true;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
return false;
|
|
632
|
+
}
|
|
622
633
|
function prefixIssues(path10, issues) {
|
|
623
634
|
return issues.map((iss) => {
|
|
624
|
-
var
|
|
625
|
-
(
|
|
635
|
+
var _a3;
|
|
636
|
+
(_a3 = iss).path ?? (_a3.path = []);
|
|
626
637
|
iss.path.unshift(path10);
|
|
627
638
|
return iss;
|
|
628
639
|
});
|
|
@@ -631,17 +642,14 @@ function unwrapMessage(message) {
|
|
|
631
642
|
return typeof message === "string" ? message : message?.message;
|
|
632
643
|
}
|
|
633
644
|
function finalizeIssue(iss, ctx, config2) {
|
|
634
|
-
const
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
645
|
+
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";
|
|
646
|
+
const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
|
|
647
|
+
rest.path ?? (rest.path = []);
|
|
648
|
+
rest.message = message;
|
|
649
|
+
if (ctx?.reportInput) {
|
|
650
|
+
rest.input = _input;
|
|
638
651
|
}
|
|
639
|
-
|
|
640
|
-
delete full.continue;
|
|
641
|
-
if (!ctx?.reportInput) {
|
|
642
|
-
delete full.input;
|
|
643
|
-
}
|
|
644
|
-
return full;
|
|
652
|
+
return rest;
|
|
645
653
|
}
|
|
646
654
|
function getSizableOrigin(input) {
|
|
647
655
|
if (input instanceof Set)
|
|
@@ -738,10 +746,14 @@ var EVALUATING, captureStackTrace, allowsEval, getParsedType, propertyKeyTypes,
|
|
|
738
746
|
var init_util = __esm({
|
|
739
747
|
"../../node_modules/zod/v4/core/util.js"() {
|
|
740
748
|
"use strict";
|
|
749
|
+
init_core();
|
|
741
750
|
EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
742
751
|
captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
|
|
743
752
|
};
|
|
744
|
-
allowsEval = cached(() => {
|
|
753
|
+
allowsEval = /* @__PURE__ */ cached(() => {
|
|
754
|
+
if (globalConfig.jitless) {
|
|
755
|
+
return false;
|
|
756
|
+
}
|
|
745
757
|
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
|
|
746
758
|
return false;
|
|
747
759
|
}
|
|
@@ -798,7 +810,14 @@ var init_util = __esm({
|
|
|
798
810
|
}
|
|
799
811
|
};
|
|
800
812
|
propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
801
|
-
primitiveTypes = /* @__PURE__ */ new Set([
|
|
813
|
+
primitiveTypes = /* @__PURE__ */ new Set([
|
|
814
|
+
"string",
|
|
815
|
+
"number",
|
|
816
|
+
"bigint",
|
|
817
|
+
"boolean",
|
|
818
|
+
"symbol",
|
|
819
|
+
"undefined"
|
|
820
|
+
]);
|
|
802
821
|
NUMBER_FORMAT_RANGES = {
|
|
803
822
|
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
804
823
|
int32: [-2147483648, 2147483647],
|
|
@@ -818,10 +837,10 @@ var init_util = __esm({
|
|
|
818
837
|
});
|
|
819
838
|
|
|
820
839
|
// ../../node_modules/zod/v4/core/errors.js
|
|
821
|
-
function flattenError(
|
|
840
|
+
function flattenError(error51, mapper = (issue2) => issue2.message) {
|
|
822
841
|
const fieldErrors = {};
|
|
823
842
|
const formErrors = [];
|
|
824
|
-
for (const sub of
|
|
843
|
+
for (const sub of error51.issues) {
|
|
825
844
|
if (sub.path.length > 0) {
|
|
826
845
|
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
827
846
|
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
@@ -831,50 +850,53 @@ function flattenError(error48, mapper = (issue2) => issue2.message) {
|
|
|
831
850
|
}
|
|
832
851
|
return { formErrors, fieldErrors };
|
|
833
852
|
}
|
|
834
|
-
function formatError(
|
|
853
|
+
function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
835
854
|
const fieldErrors = { _errors: [] };
|
|
836
|
-
const processError = (
|
|
837
|
-
for (const issue2 of
|
|
855
|
+
const processError = (error52, path10 = []) => {
|
|
856
|
+
for (const issue2 of error52.issues) {
|
|
838
857
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
839
|
-
issue2.errors.map((issues) => processError({ issues }));
|
|
858
|
+
issue2.errors.map((issues) => processError({ issues }, [...path10, ...issue2.path]));
|
|
840
859
|
} else if (issue2.code === "invalid_key") {
|
|
841
|
-
processError({ issues: issue2.issues });
|
|
860
|
+
processError({ issues: issue2.issues }, [...path10, ...issue2.path]);
|
|
842
861
|
} else if (issue2.code === "invalid_element") {
|
|
843
|
-
processError({ issues: issue2.issues });
|
|
844
|
-
} else if (issue2.path.length === 0) {
|
|
845
|
-
fieldErrors._errors.push(mapper(issue2));
|
|
862
|
+
processError({ issues: issue2.issues }, [...path10, ...issue2.path]);
|
|
846
863
|
} else {
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
864
|
+
const fullpath = [...path10, ...issue2.path];
|
|
865
|
+
if (fullpath.length === 0) {
|
|
866
|
+
fieldErrors._errors.push(mapper(issue2));
|
|
867
|
+
} else {
|
|
868
|
+
let curr = fieldErrors;
|
|
869
|
+
let i = 0;
|
|
870
|
+
while (i < fullpath.length) {
|
|
871
|
+
const el = fullpath[i];
|
|
872
|
+
const terminal = i === fullpath.length - 1;
|
|
873
|
+
if (!terminal) {
|
|
874
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
875
|
+
} else {
|
|
876
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
877
|
+
curr[el]._errors.push(mapper(issue2));
|
|
878
|
+
}
|
|
879
|
+
curr = curr[el];
|
|
880
|
+
i++;
|
|
857
881
|
}
|
|
858
|
-
curr = curr[el];
|
|
859
|
-
i++;
|
|
860
882
|
}
|
|
861
883
|
}
|
|
862
884
|
}
|
|
863
885
|
};
|
|
864
|
-
processError(
|
|
886
|
+
processError(error51);
|
|
865
887
|
return fieldErrors;
|
|
866
888
|
}
|
|
867
|
-
function treeifyError(
|
|
889
|
+
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
868
890
|
const result = { errors: [] };
|
|
869
|
-
const processError = (
|
|
870
|
-
var
|
|
871
|
-
for (const issue2 of
|
|
891
|
+
const processError = (error52, path10 = []) => {
|
|
892
|
+
var _a3, _b;
|
|
893
|
+
for (const issue2 of error52.issues) {
|
|
872
894
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
873
|
-
issue2.errors.map((issues) => processError({ issues }, issue2.path));
|
|
895
|
+
issue2.errors.map((issues) => processError({ issues }, [...path10, ...issue2.path]));
|
|
874
896
|
} else if (issue2.code === "invalid_key") {
|
|
875
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
897
|
+
processError({ issues: issue2.issues }, [...path10, ...issue2.path]);
|
|
876
898
|
} else if (issue2.code === "invalid_element") {
|
|
877
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
899
|
+
processError({ issues: issue2.issues }, [...path10, ...issue2.path]);
|
|
878
900
|
} else {
|
|
879
901
|
const fullpath = [...path10, ...issue2.path];
|
|
880
902
|
if (fullpath.length === 0) {
|
|
@@ -888,7 +910,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
888
910
|
const terminal = i === fullpath.length - 1;
|
|
889
911
|
if (typeof el === "string") {
|
|
890
912
|
curr.properties ?? (curr.properties = {});
|
|
891
|
-
(
|
|
913
|
+
(_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
|
|
892
914
|
curr = curr.properties[el];
|
|
893
915
|
} else {
|
|
894
916
|
curr.items ?? (curr.items = []);
|
|
@@ -903,7 +925,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
903
925
|
}
|
|
904
926
|
}
|
|
905
927
|
};
|
|
906
|
-
processError(
|
|
928
|
+
processError(error51);
|
|
907
929
|
return result;
|
|
908
930
|
}
|
|
909
931
|
function toDotPath(_path) {
|
|
@@ -924,9 +946,9 @@ function toDotPath(_path) {
|
|
|
924
946
|
}
|
|
925
947
|
return segs.join("");
|
|
926
948
|
}
|
|
927
|
-
function prettifyError(
|
|
949
|
+
function prettifyError(error51) {
|
|
928
950
|
const lines = [];
|
|
929
|
-
const issues = [...
|
|
951
|
+
const issues = [...error51.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
|
|
930
952
|
for (const issue2 of issues) {
|
|
931
953
|
lines.push(`\u2716 ${issue2.message}`);
|
|
932
954
|
if (issue2.path?.length)
|
|
@@ -970,7 +992,7 @@ var init_parse = __esm({
|
|
|
970
992
|
init_errors();
|
|
971
993
|
init_util();
|
|
972
994
|
_parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
973
|
-
const ctx = _ctx ?
|
|
995
|
+
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
974
996
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
975
997
|
if (result instanceof Promise) {
|
|
976
998
|
throw new $ZodAsyncError();
|
|
@@ -984,7 +1006,7 @@ var init_parse = __esm({
|
|
|
984
1006
|
};
|
|
985
1007
|
parse = /* @__PURE__ */ _parse($ZodRealError);
|
|
986
1008
|
_parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
987
|
-
const ctx = _ctx ?
|
|
1009
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
988
1010
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
989
1011
|
if (result instanceof Promise)
|
|
990
1012
|
result = await result;
|
|
@@ -1009,7 +1031,7 @@ var init_parse = __esm({
|
|
|
1009
1031
|
};
|
|
1010
1032
|
safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
|
|
1011
1033
|
_safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1012
|
-
const ctx = _ctx ?
|
|
1034
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
1013
1035
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
1014
1036
|
if (result instanceof Promise)
|
|
1015
1037
|
result = await result;
|
|
@@ -1020,7 +1042,7 @@ var init_parse = __esm({
|
|
|
1020
1042
|
};
|
|
1021
1043
|
safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
1022
1044
|
_encode = (_Err) => (schema, value, _ctx) => {
|
|
1023
|
-
const ctx = _ctx ?
|
|
1045
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
1024
1046
|
return _parse(_Err)(schema, value, ctx);
|
|
1025
1047
|
};
|
|
1026
1048
|
encode = /* @__PURE__ */ _encode($ZodRealError);
|
|
@@ -1029,7 +1051,7 @@ var init_parse = __esm({
|
|
|
1029
1051
|
};
|
|
1030
1052
|
decode = /* @__PURE__ */ _decode($ZodRealError);
|
|
1031
1053
|
_encodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1032
|
-
const ctx = _ctx ?
|
|
1054
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
1033
1055
|
return _parseAsync(_Err)(schema, value, ctx);
|
|
1034
1056
|
};
|
|
1035
1057
|
encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
|
|
@@ -1038,7 +1060,7 @@ var init_parse = __esm({
|
|
|
1038
1060
|
};
|
|
1039
1061
|
decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
|
|
1040
1062
|
_safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
1041
|
-
const ctx = _ctx ?
|
|
1063
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
1042
1064
|
return _safeParse(_Err)(schema, value, ctx);
|
|
1043
1065
|
};
|
|
1044
1066
|
safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
|
|
@@ -1047,7 +1069,7 @@ var init_parse = __esm({
|
|
|
1047
1069
|
};
|
|
1048
1070
|
safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
|
|
1049
1071
|
_safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1050
|
-
const ctx = _ctx ?
|
|
1072
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
1051
1073
|
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
1052
1074
|
};
|
|
1053
1075
|
safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
|
|
@@ -1082,6 +1104,7 @@ __export(regexes_exports, {
|
|
|
1082
1104
|
hex: () => hex,
|
|
1083
1105
|
hostname: () => hostname,
|
|
1084
1106
|
html5Email: () => html5Email,
|
|
1107
|
+
httpProtocol: () => httpProtocol,
|
|
1085
1108
|
idnEmail: () => idnEmail,
|
|
1086
1109
|
integer: () => integer,
|
|
1087
1110
|
ipv4: () => ipv4,
|
|
@@ -1147,12 +1170,12 @@ function fixedBase64(bodyLength, padding) {
|
|
|
1147
1170
|
function fixedBase64url(length) {
|
|
1148
1171
|
return new RegExp(`^[A-Za-z0-9_-]{${length}}$`);
|
|
1149
1172
|
}
|
|
1150
|
-
var cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uuid, uuid4, uuid6, uuid7, email, html5Email, rfc5322Email, unicodeEmail, idnEmail, browserEmail, _emoji, ipv4, ipv6, mac, cidrv4, cidrv6, base64, base64url, hostname, domain, e164, dateSource, date, string, bigint, integer, number, boolean, _null, _undefined, lowercase, uppercase, hex, md5_hex, md5_base64, md5_base64url, sha1_hex, sha1_base64, sha1_base64url, sha256_hex, sha256_base64, sha256_base64url, sha384_hex, sha384_base64, sha384_base64url, sha512_hex, sha512_base64, sha512_base64url;
|
|
1173
|
+
var cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uuid, uuid4, uuid6, uuid7, email, html5Email, rfc5322Email, unicodeEmail, idnEmail, browserEmail, _emoji, ipv4, ipv6, mac, cidrv4, cidrv6, base64, base64url, hostname, domain, httpProtocol, e164, dateSource, date, string, bigint, integer, number, boolean, _null, _undefined, lowercase, uppercase, hex, md5_hex, md5_base64, md5_base64url, sha1_hex, sha1_base64, sha1_base64url, sha256_hex, sha256_base64, sha256_base64url, sha384_hex, sha384_base64, sha384_base64url, sha512_hex, sha512_base64, sha512_base64url;
|
|
1151
1174
|
var init_regexes = __esm({
|
|
1152
1175
|
"../../node_modules/zod/v4/core/regexes.js"() {
|
|
1153
1176
|
"use strict";
|
|
1154
1177
|
init_util();
|
|
1155
|
-
cuid = /^[cC][
|
|
1178
|
+
cuid = /^[cC][0-9a-z]{6,}$/;
|
|
1156
1179
|
cuid2 = /^[0-9a-z]+$/;
|
|
1157
1180
|
ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
1158
1181
|
xid = /^[0-9a-vA-V]{20}$/;
|
|
@@ -1188,6 +1211,7 @@ var init_regexes = __esm({
|
|
|
1188
1211
|
base64url = /^[A-Za-z0-9_-]*$/;
|
|
1189
1212
|
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])?)*\.?$/;
|
|
1190
1213
|
domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
|
|
1214
|
+
httpProtocol = /^https?$/;
|
|
1191
1215
|
e164 = /^\+[1-9]\d{6,14}$/;
|
|
1192
1216
|
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])))`;
|
|
1193
1217
|
date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
@@ -1236,10 +1260,10 @@ var init_checks = __esm({
|
|
|
1236
1260
|
init_regexes();
|
|
1237
1261
|
init_util();
|
|
1238
1262
|
$ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
1239
|
-
var
|
|
1263
|
+
var _a3;
|
|
1240
1264
|
inst._zod ?? (inst._zod = {});
|
|
1241
1265
|
inst._zod.def = def;
|
|
1242
|
-
(
|
|
1266
|
+
(_a3 = inst._zod).onattach ?? (_a3.onattach = []);
|
|
1243
1267
|
});
|
|
1244
1268
|
numericOriginMap = {
|
|
1245
1269
|
number: "number",
|
|
@@ -1305,8 +1329,8 @@ var init_checks = __esm({
|
|
|
1305
1329
|
$ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
1306
1330
|
$ZodCheck.init(inst, def);
|
|
1307
1331
|
inst._zod.onattach.push((inst2) => {
|
|
1308
|
-
var
|
|
1309
|
-
(
|
|
1332
|
+
var _a3;
|
|
1333
|
+
(_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
|
|
1310
1334
|
});
|
|
1311
1335
|
inst._zod.check = (payload) => {
|
|
1312
1336
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -1439,9 +1463,9 @@ var init_checks = __esm({
|
|
|
1439
1463
|
};
|
|
1440
1464
|
});
|
|
1441
1465
|
$ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
1442
|
-
var
|
|
1466
|
+
var _a3;
|
|
1443
1467
|
$ZodCheck.init(inst, def);
|
|
1444
|
-
(
|
|
1468
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1445
1469
|
const val = payload.value;
|
|
1446
1470
|
return !nullish(val) && val.size !== void 0;
|
|
1447
1471
|
});
|
|
@@ -1467,9 +1491,9 @@ var init_checks = __esm({
|
|
|
1467
1491
|
};
|
|
1468
1492
|
});
|
|
1469
1493
|
$ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
1470
|
-
var
|
|
1494
|
+
var _a3;
|
|
1471
1495
|
$ZodCheck.init(inst, def);
|
|
1472
|
-
(
|
|
1496
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1473
1497
|
const val = payload.value;
|
|
1474
1498
|
return !nullish(val) && val.size !== void 0;
|
|
1475
1499
|
});
|
|
@@ -1495,9 +1519,9 @@ var init_checks = __esm({
|
|
|
1495
1519
|
};
|
|
1496
1520
|
});
|
|
1497
1521
|
$ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
1498
|
-
var
|
|
1522
|
+
var _a3;
|
|
1499
1523
|
$ZodCheck.init(inst, def);
|
|
1500
|
-
(
|
|
1524
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1501
1525
|
const val = payload.value;
|
|
1502
1526
|
return !nullish(val) && val.size !== void 0;
|
|
1503
1527
|
});
|
|
@@ -1525,9 +1549,9 @@ var init_checks = __esm({
|
|
|
1525
1549
|
};
|
|
1526
1550
|
});
|
|
1527
1551
|
$ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
1528
|
-
var
|
|
1552
|
+
var _a3;
|
|
1529
1553
|
$ZodCheck.init(inst, def);
|
|
1530
|
-
(
|
|
1554
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1531
1555
|
const val = payload.value;
|
|
1532
1556
|
return !nullish(val) && val.length !== void 0;
|
|
1533
1557
|
});
|
|
@@ -1554,9 +1578,9 @@ var init_checks = __esm({
|
|
|
1554
1578
|
};
|
|
1555
1579
|
});
|
|
1556
1580
|
$ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
1557
|
-
var
|
|
1581
|
+
var _a3;
|
|
1558
1582
|
$ZodCheck.init(inst, def);
|
|
1559
|
-
(
|
|
1583
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1560
1584
|
const val = payload.value;
|
|
1561
1585
|
return !nullish(val) && val.length !== void 0;
|
|
1562
1586
|
});
|
|
@@ -1583,9 +1607,9 @@ var init_checks = __esm({
|
|
|
1583
1607
|
};
|
|
1584
1608
|
});
|
|
1585
1609
|
$ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
1586
|
-
var
|
|
1610
|
+
var _a3;
|
|
1587
1611
|
$ZodCheck.init(inst, def);
|
|
1588
|
-
(
|
|
1612
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1589
1613
|
const val = payload.value;
|
|
1590
1614
|
return !nullish(val) && val.length !== void 0;
|
|
1591
1615
|
});
|
|
@@ -1614,7 +1638,7 @@ var init_checks = __esm({
|
|
|
1614
1638
|
};
|
|
1615
1639
|
});
|
|
1616
1640
|
$ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
1617
|
-
var
|
|
1641
|
+
var _a3, _b;
|
|
1618
1642
|
$ZodCheck.init(inst, def);
|
|
1619
1643
|
inst._zod.onattach.push((inst2) => {
|
|
1620
1644
|
const bag = inst2._zod.bag;
|
|
@@ -1625,7 +1649,7 @@ var init_checks = __esm({
|
|
|
1625
1649
|
}
|
|
1626
1650
|
});
|
|
1627
1651
|
if (def.pattern)
|
|
1628
|
-
(
|
|
1652
|
+
(_a3 = inst._zod).check ?? (_a3.check = (payload) => {
|
|
1629
1653
|
def.pattern.lastIndex = 0;
|
|
1630
1654
|
if (def.pattern.test(payload.value))
|
|
1631
1655
|
return;
|
|
@@ -1828,8 +1852,8 @@ var init_versions = __esm({
|
|
|
1828
1852
|
"use strict";
|
|
1829
1853
|
version = {
|
|
1830
1854
|
major: 4,
|
|
1831
|
-
minor:
|
|
1832
|
-
patch:
|
|
1855
|
+
minor: 4,
|
|
1856
|
+
patch: 3
|
|
1833
1857
|
};
|
|
1834
1858
|
}
|
|
1835
1859
|
});
|
|
@@ -1838,6 +1862,8 @@ var init_versions = __esm({
|
|
|
1838
1862
|
function isValidBase64(data) {
|
|
1839
1863
|
if (data === "")
|
|
1840
1864
|
return true;
|
|
1865
|
+
if (/\s/.test(data))
|
|
1866
|
+
return false;
|
|
1841
1867
|
if (data.length % 4 !== 0)
|
|
1842
1868
|
return false;
|
|
1843
1869
|
try {
|
|
@@ -1880,15 +1906,27 @@ function handleArrayResult(result, final, index) {
|
|
|
1880
1906
|
}
|
|
1881
1907
|
final.value[index] = result.value;
|
|
1882
1908
|
}
|
|
1883
|
-
function handlePropertyResult(result, final, key, input, isOptionalOut) {
|
|
1909
|
+
function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
|
|
1910
|
+
const isPresent = key in input;
|
|
1884
1911
|
if (result.issues.length) {
|
|
1885
|
-
if (isOptionalOut && !
|
|
1912
|
+
if (isOptionalIn && isOptionalOut && !isPresent) {
|
|
1886
1913
|
return;
|
|
1887
1914
|
}
|
|
1888
1915
|
final.issues.push(...prefixIssues(key, result.issues));
|
|
1889
1916
|
}
|
|
1917
|
+
if (!isPresent && !isOptionalIn) {
|
|
1918
|
+
if (!result.issues.length) {
|
|
1919
|
+
final.issues.push({
|
|
1920
|
+
code: "invalid_type",
|
|
1921
|
+
expected: "nonoptional",
|
|
1922
|
+
input: void 0,
|
|
1923
|
+
path: [key]
|
|
1924
|
+
});
|
|
1925
|
+
}
|
|
1926
|
+
return;
|
|
1927
|
+
}
|
|
1890
1928
|
if (result.value === void 0) {
|
|
1891
|
-
if (
|
|
1929
|
+
if (isPresent) {
|
|
1892
1930
|
final.value[key] = void 0;
|
|
1893
1931
|
}
|
|
1894
1932
|
} else {
|
|
@@ -1916,8 +1954,11 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
1916
1954
|
const keySet = def.keySet;
|
|
1917
1955
|
const _catchall = def.catchall._zod;
|
|
1918
1956
|
const t = _catchall.def.type;
|
|
1957
|
+
const isOptionalIn = _catchall.optin === "optional";
|
|
1919
1958
|
const isOptionalOut = _catchall.optout === "optional";
|
|
1920
1959
|
for (const key in input) {
|
|
1960
|
+
if (key === "__proto__")
|
|
1961
|
+
continue;
|
|
1921
1962
|
if (keySet.has(key))
|
|
1922
1963
|
continue;
|
|
1923
1964
|
if (t === "never") {
|
|
@@ -1926,9 +1967,9 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
1926
1967
|
}
|
|
1927
1968
|
const r = _catchall.run({ value: input[key], issues: [] }, ctx);
|
|
1928
1969
|
if (r instanceof Promise) {
|
|
1929
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
1970
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
1930
1971
|
} else {
|
|
1931
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
1972
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
1932
1973
|
}
|
|
1933
1974
|
}
|
|
1934
1975
|
if (unrecognized.length) {
|
|
@@ -2072,12 +2113,41 @@ function handleIntersectionResults(result, left, right) {
|
|
|
2072
2113
|
result.value = merged.data;
|
|
2073
2114
|
return result;
|
|
2074
2115
|
}
|
|
2116
|
+
function getTupleOptStart(items, key) {
|
|
2117
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
2118
|
+
if (items[i]._zod[key] !== "optional")
|
|
2119
|
+
return i + 1;
|
|
2120
|
+
}
|
|
2121
|
+
return 0;
|
|
2122
|
+
}
|
|
2075
2123
|
function handleTupleResult(result, final, index) {
|
|
2076
2124
|
if (result.issues.length) {
|
|
2077
2125
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
2078
2126
|
}
|
|
2079
2127
|
final.value[index] = result.value;
|
|
2080
2128
|
}
|
|
2129
|
+
function handleTupleResults(itemResults, final, items, input, optoutStart) {
|
|
2130
|
+
for (let i = 0; i < items.length; i++) {
|
|
2131
|
+
const r = itemResults[i];
|
|
2132
|
+
const isPresent = i < input.length;
|
|
2133
|
+
if (r.issues.length) {
|
|
2134
|
+
if (!isPresent && i >= optoutStart) {
|
|
2135
|
+
final.value.length = i;
|
|
2136
|
+
break;
|
|
2137
|
+
}
|
|
2138
|
+
final.issues.push(...prefixIssues(i, r.issues));
|
|
2139
|
+
}
|
|
2140
|
+
final.value[i] = r.value;
|
|
2141
|
+
}
|
|
2142
|
+
for (let i = final.value.length - 1; i >= input.length; i--) {
|
|
2143
|
+
if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
|
|
2144
|
+
final.value.length = i;
|
|
2145
|
+
} else {
|
|
2146
|
+
break;
|
|
2147
|
+
}
|
|
2148
|
+
}
|
|
2149
|
+
return final;
|
|
2150
|
+
}
|
|
2081
2151
|
function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
|
|
2082
2152
|
if (keyResult.issues.length) {
|
|
2083
2153
|
if (propertyKeyTypes.has(typeof key)) {
|
|
@@ -2115,7 +2185,7 @@ function handleSetResult(result, final) {
|
|
|
2115
2185
|
final.value.add(result.value);
|
|
2116
2186
|
}
|
|
2117
2187
|
function handleOptionalResult(result, input) {
|
|
2118
|
-
if (result.issues.length
|
|
2188
|
+
if (input === void 0 && (result.issues.length || result.fallback)) {
|
|
2119
2189
|
return { issues: [], value: void 0 };
|
|
2120
2190
|
}
|
|
2121
2191
|
return result;
|
|
@@ -2142,7 +2212,7 @@ function handlePipeResult(left, next, ctx) {
|
|
|
2142
2212
|
left.aborted = true;
|
|
2143
2213
|
return left;
|
|
2144
2214
|
}
|
|
2145
|
-
return next._zod.run({ value: left.value, issues: left.issues }, ctx);
|
|
2215
|
+
return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
|
|
2146
2216
|
}
|
|
2147
2217
|
function handleCodecAResult(result, def, ctx) {
|
|
2148
2218
|
if (result.issues.length) {
|
|
@@ -2192,7 +2262,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
2192
2262
|
payload.issues.push(issue(_iss));
|
|
2193
2263
|
}
|
|
2194
2264
|
}
|
|
2195
|
-
var $ZodType, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, $ZodIPv6, $ZodMAC, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodCustomStringFormat, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodBigIntFormat, $ZodSymbol, $ZodUndefined, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodVoid, $ZodDate, $ZodArray, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodXor, $ZodDiscriminatedUnion, $ZodIntersection, $ZodTuple, $ZodRecord, $ZodMap, $ZodSet, $ZodEnum, $ZodLiteral, $ZodFile, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodSuccess, $ZodCatch, $ZodNaN, $ZodPipe, $ZodCodec, $ZodReadonly, $ZodTemplateLiteral, $ZodFunction, $ZodPromise, $ZodLazy, $ZodCustom;
|
|
2265
|
+
var $ZodType, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, $ZodIPv6, $ZodMAC, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodCustomStringFormat, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodBigIntFormat, $ZodSymbol, $ZodUndefined, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodVoid, $ZodDate, $ZodArray, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodXor, $ZodDiscriminatedUnion, $ZodIntersection, $ZodTuple, $ZodRecord, $ZodMap, $ZodSet, $ZodEnum, $ZodLiteral, $ZodFile, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodSuccess, $ZodCatch, $ZodNaN, $ZodPipe, $ZodCodec, $ZodPreprocess, $ZodReadonly, $ZodTemplateLiteral, $ZodFunction, $ZodPromise, $ZodLazy, $ZodCustom;
|
|
2196
2266
|
var init_schemas = __esm({
|
|
2197
2267
|
"../../node_modules/zod/v4/core/schemas.js"() {
|
|
2198
2268
|
"use strict";
|
|
@@ -2205,7 +2275,7 @@ var init_schemas = __esm({
|
|
|
2205
2275
|
init_versions();
|
|
2206
2276
|
init_util();
|
|
2207
2277
|
$ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
2208
|
-
var
|
|
2278
|
+
var _a3;
|
|
2209
2279
|
inst ?? (inst = {});
|
|
2210
2280
|
inst._zod.def = def;
|
|
2211
2281
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -2220,7 +2290,7 @@ var init_schemas = __esm({
|
|
|
2220
2290
|
}
|
|
2221
2291
|
}
|
|
2222
2292
|
if (checks.length === 0) {
|
|
2223
|
-
(
|
|
2293
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
2224
2294
|
inst._zod.deferred?.push(() => {
|
|
2225
2295
|
inst._zod.run = inst._zod.parse;
|
|
2226
2296
|
});
|
|
@@ -2230,6 +2300,8 @@ var init_schemas = __esm({
|
|
|
2230
2300
|
let asyncResult;
|
|
2231
2301
|
for (const ch of checks2) {
|
|
2232
2302
|
if (ch._zod.def.when) {
|
|
2303
|
+
if (explicitlyAborted(payload))
|
|
2304
|
+
continue;
|
|
2233
2305
|
const shouldRun = ch._zod.def.when(payload);
|
|
2234
2306
|
if (!shouldRun)
|
|
2235
2307
|
continue;
|
|
@@ -2370,6 +2442,19 @@ var init_schemas = __esm({
|
|
|
2370
2442
|
inst._zod.check = (payload) => {
|
|
2371
2443
|
try {
|
|
2372
2444
|
const trimmed = payload.value.trim();
|
|
2445
|
+
if (!def.normalize && def.protocol?.source === httpProtocol.source) {
|
|
2446
|
+
if (!/^https?:\/\//i.test(trimmed)) {
|
|
2447
|
+
payload.issues.push({
|
|
2448
|
+
code: "invalid_format",
|
|
2449
|
+
format: "url",
|
|
2450
|
+
note: "Invalid URL format",
|
|
2451
|
+
input: payload.value,
|
|
2452
|
+
inst,
|
|
2453
|
+
continue: !def.abort
|
|
2454
|
+
});
|
|
2455
|
+
return;
|
|
2456
|
+
}
|
|
2457
|
+
}
|
|
2373
2458
|
const url2 = new URL(trimmed);
|
|
2374
2459
|
if (def.hostname) {
|
|
2375
2460
|
def.hostname.lastIndex = 0;
|
|
@@ -2676,8 +2761,6 @@ var init_schemas = __esm({
|
|
|
2676
2761
|
$ZodType.init(inst, def);
|
|
2677
2762
|
inst._zod.pattern = _undefined;
|
|
2678
2763
|
inst._zod.values = /* @__PURE__ */ new Set([void 0]);
|
|
2679
|
-
inst._zod.optin = "optional";
|
|
2680
|
-
inst._zod.optout = "optional";
|
|
2681
2764
|
inst._zod.parse = (payload, _ctx) => {
|
|
2682
2765
|
const input = payload.value;
|
|
2683
2766
|
if (typeof input === "undefined")
|
|
@@ -2849,12 +2932,13 @@ var init_schemas = __esm({
|
|
|
2849
2932
|
const shape = value.shape;
|
|
2850
2933
|
for (const key of value.keys) {
|
|
2851
2934
|
const el = shape[key];
|
|
2935
|
+
const isOptionalIn = el._zod.optin === "optional";
|
|
2852
2936
|
const isOptionalOut = el._zod.optout === "optional";
|
|
2853
2937
|
const r = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
2854
2938
|
if (r instanceof Promise) {
|
|
2855
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
2939
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
2856
2940
|
} else {
|
|
2857
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
2941
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
2858
2942
|
}
|
|
2859
2943
|
}
|
|
2860
2944
|
if (!catchall) {
|
|
@@ -2885,9 +2969,10 @@ var init_schemas = __esm({
|
|
|
2885
2969
|
const id = ids[key];
|
|
2886
2970
|
const k = esc(key);
|
|
2887
2971
|
const schema = shape[key];
|
|
2972
|
+
const isOptionalIn = schema?._zod?.optin === "optional";
|
|
2888
2973
|
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
2889
2974
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
2890
|
-
if (isOptionalOut) {
|
|
2975
|
+
if (isOptionalIn && isOptionalOut) {
|
|
2891
2976
|
doc.write(`
|
|
2892
2977
|
if (${id}.issues.length) {
|
|
2893
2978
|
if (${k} in input) {
|
|
@@ -2906,6 +2991,33 @@ var init_schemas = __esm({
|
|
|
2906
2991
|
newResult[${k}] = ${id}.value;
|
|
2907
2992
|
}
|
|
2908
2993
|
|
|
2994
|
+
`);
|
|
2995
|
+
} else if (!isOptionalIn) {
|
|
2996
|
+
doc.write(`
|
|
2997
|
+
const ${id}_present = ${k} in input;
|
|
2998
|
+
if (${id}.issues.length) {
|
|
2999
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
3000
|
+
...iss,
|
|
3001
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
3002
|
+
})));
|
|
3003
|
+
}
|
|
3004
|
+
if (!${id}_present && !${id}.issues.length) {
|
|
3005
|
+
payload.issues.push({
|
|
3006
|
+
code: "invalid_type",
|
|
3007
|
+
expected: "nonoptional",
|
|
3008
|
+
input: undefined,
|
|
3009
|
+
path: [${k}]
|
|
3010
|
+
});
|
|
3011
|
+
}
|
|
3012
|
+
|
|
3013
|
+
if (${id}_present) {
|
|
3014
|
+
if (${id}.value === undefined) {
|
|
3015
|
+
newResult[${k}] = undefined;
|
|
3016
|
+
} else {
|
|
3017
|
+
newResult[${k}] = ${id}.value;
|
|
3018
|
+
}
|
|
3019
|
+
}
|
|
3020
|
+
|
|
2909
3021
|
`);
|
|
2910
3022
|
} else {
|
|
2911
3023
|
doc.write(`
|
|
@@ -2979,10 +3091,9 @@ var init_schemas = __esm({
|
|
|
2979
3091
|
}
|
|
2980
3092
|
return void 0;
|
|
2981
3093
|
});
|
|
2982
|
-
const
|
|
2983
|
-
const first = def.options[0]._zod.run;
|
|
3094
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
2984
3095
|
inst._zod.parse = (payload, ctx) => {
|
|
2985
|
-
if (
|
|
3096
|
+
if (first) {
|
|
2986
3097
|
return first(payload, ctx);
|
|
2987
3098
|
}
|
|
2988
3099
|
let async = false;
|
|
@@ -3011,10 +3122,9 @@ var init_schemas = __esm({
|
|
|
3011
3122
|
$ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
|
|
3012
3123
|
$ZodUnion.init(inst, def);
|
|
3013
3124
|
def.inclusive = false;
|
|
3014
|
-
const
|
|
3015
|
-
const first = def.options[0]._zod.run;
|
|
3125
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
3016
3126
|
inst._zod.parse = (payload, ctx) => {
|
|
3017
|
-
if (
|
|
3127
|
+
if (first) {
|
|
3018
3128
|
return first(payload, ctx);
|
|
3019
3129
|
}
|
|
3020
3130
|
let async = false;
|
|
@@ -3089,7 +3199,7 @@ var init_schemas = __esm({
|
|
|
3089
3199
|
if (opt) {
|
|
3090
3200
|
return opt._zod.run(payload, ctx);
|
|
3091
3201
|
}
|
|
3092
|
-
if (def.unionFallback) {
|
|
3202
|
+
if (def.unionFallback || ctx.direction === "backward") {
|
|
3093
3203
|
return _super(payload, ctx);
|
|
3094
3204
|
}
|
|
3095
3205
|
payload.issues.push({
|
|
@@ -3097,6 +3207,7 @@ var init_schemas = __esm({
|
|
|
3097
3207
|
errors: [],
|
|
3098
3208
|
note: "No matching discriminator",
|
|
3099
3209
|
discriminator: def.discriminator,
|
|
3210
|
+
options: Array.from(disc.value.keys()),
|
|
3100
3211
|
input,
|
|
3101
3212
|
path: [def.discriminator],
|
|
3102
3213
|
inst
|
|
@@ -3135,56 +3246,59 @@ var init_schemas = __esm({
|
|
|
3135
3246
|
}
|
|
3136
3247
|
payload.value = [];
|
|
3137
3248
|
const proms = [];
|
|
3138
|
-
const
|
|
3139
|
-
const
|
|
3249
|
+
const optinStart = getTupleOptStart(items, "optin");
|
|
3250
|
+
const optoutStart = getTupleOptStart(items, "optout");
|
|
3140
3251
|
if (!def.rest) {
|
|
3141
|
-
|
|
3142
|
-
const tooSmall = input.length < optStart - 1;
|
|
3143
|
-
if (tooBig || tooSmall) {
|
|
3252
|
+
if (input.length < optinStart) {
|
|
3144
3253
|
payload.issues.push({
|
|
3145
|
-
|
|
3254
|
+
code: "too_small",
|
|
3255
|
+
minimum: optinStart,
|
|
3256
|
+
inclusive: true,
|
|
3146
3257
|
input,
|
|
3147
3258
|
inst,
|
|
3148
3259
|
origin: "array"
|
|
3149
3260
|
});
|
|
3150
3261
|
return payload;
|
|
3151
3262
|
}
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3263
|
+
if (input.length > items.length) {
|
|
3264
|
+
payload.issues.push({
|
|
3265
|
+
code: "too_big",
|
|
3266
|
+
maximum: items.length,
|
|
3267
|
+
inclusive: true,
|
|
3268
|
+
input,
|
|
3269
|
+
inst,
|
|
3270
|
+
origin: "array"
|
|
3271
|
+
});
|
|
3159
3272
|
}
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
}, ctx);
|
|
3164
|
-
if (
|
|
3165
|
-
proms.push(
|
|
3273
|
+
}
|
|
3274
|
+
const itemResults = new Array(items.length);
|
|
3275
|
+
for (let i = 0; i < items.length; i++) {
|
|
3276
|
+
const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
|
|
3277
|
+
if (r instanceof Promise) {
|
|
3278
|
+
proms.push(r.then((rr) => {
|
|
3279
|
+
itemResults[i] = rr;
|
|
3280
|
+
}));
|
|
3166
3281
|
} else {
|
|
3167
|
-
|
|
3282
|
+
itemResults[i] = r;
|
|
3168
3283
|
}
|
|
3169
3284
|
}
|
|
3170
3285
|
if (def.rest) {
|
|
3286
|
+
let i = items.length - 1;
|
|
3171
3287
|
const rest = input.slice(items.length);
|
|
3172
3288
|
for (const el of rest) {
|
|
3173
3289
|
i++;
|
|
3174
|
-
const result = def.rest._zod.run({
|
|
3175
|
-
value: el,
|
|
3176
|
-
issues: []
|
|
3177
|
-
}, ctx);
|
|
3290
|
+
const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
|
|
3178
3291
|
if (result instanceof Promise) {
|
|
3179
|
-
proms.push(result.then((
|
|
3292
|
+
proms.push(result.then((r) => handleTupleResult(r, payload, i)));
|
|
3180
3293
|
} else {
|
|
3181
3294
|
handleTupleResult(result, payload, i);
|
|
3182
3295
|
}
|
|
3183
3296
|
}
|
|
3184
3297
|
}
|
|
3185
|
-
if (proms.length)
|
|
3186
|
-
return Promise.all(proms).then(() => payload);
|
|
3187
|
-
|
|
3298
|
+
if (proms.length) {
|
|
3299
|
+
return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
|
|
3300
|
+
}
|
|
3301
|
+
return handleTupleResults(itemResults, payload, items, input, optoutStart);
|
|
3188
3302
|
};
|
|
3189
3303
|
});
|
|
3190
3304
|
$ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
@@ -3208,19 +3322,35 @@ var init_schemas = __esm({
|
|
|
3208
3322
|
for (const key of values) {
|
|
3209
3323
|
if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
3210
3324
|
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
3325
|
+
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
3326
|
+
if (keyResult instanceof Promise) {
|
|
3327
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
3328
|
+
}
|
|
3329
|
+
if (keyResult.issues.length) {
|
|
3330
|
+
payload.issues.push({
|
|
3331
|
+
code: "invalid_key",
|
|
3332
|
+
origin: "record",
|
|
3333
|
+
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
3334
|
+
input: key,
|
|
3335
|
+
path: [key],
|
|
3336
|
+
inst
|
|
3337
|
+
});
|
|
3338
|
+
continue;
|
|
3339
|
+
}
|
|
3340
|
+
const outKey = keyResult.value;
|
|
3211
3341
|
const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
|
|
3212
3342
|
if (result instanceof Promise) {
|
|
3213
3343
|
proms.push(result.then((result2) => {
|
|
3214
3344
|
if (result2.issues.length) {
|
|
3215
3345
|
payload.issues.push(...prefixIssues(key, result2.issues));
|
|
3216
3346
|
}
|
|
3217
|
-
payload.value[
|
|
3347
|
+
payload.value[outKey] = result2.value;
|
|
3218
3348
|
}));
|
|
3219
3349
|
} else {
|
|
3220
3350
|
if (result.issues.length) {
|
|
3221
3351
|
payload.issues.push(...prefixIssues(key, result.issues));
|
|
3222
3352
|
}
|
|
3223
|
-
payload.value[
|
|
3353
|
+
payload.value[outKey] = result.value;
|
|
3224
3354
|
}
|
|
3225
3355
|
}
|
|
3226
3356
|
}
|
|
@@ -3244,6 +3374,8 @@ var init_schemas = __esm({
|
|
|
3244
3374
|
for (const key of Reflect.ownKeys(input)) {
|
|
3245
3375
|
if (key === "__proto__")
|
|
3246
3376
|
continue;
|
|
3377
|
+
if (!Object.prototype.propertyIsEnumerable.call(input, key))
|
|
3378
|
+
continue;
|
|
3247
3379
|
let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
3248
3380
|
if (keyResult instanceof Promise) {
|
|
3249
3381
|
throw new Error("Async schemas not supported in object keys currently");
|
|
@@ -3412,6 +3544,7 @@ var init_schemas = __esm({
|
|
|
3412
3544
|
});
|
|
3413
3545
|
$ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
|
|
3414
3546
|
$ZodType.init(inst, def);
|
|
3547
|
+
inst._zod.optin = "optional";
|
|
3415
3548
|
inst._zod.parse = (payload, ctx) => {
|
|
3416
3549
|
if (ctx.direction === "backward") {
|
|
3417
3550
|
throw new $ZodEncodeError(inst.constructor.name);
|
|
@@ -3421,6 +3554,7 @@ var init_schemas = __esm({
|
|
|
3421
3554
|
const output = _out instanceof Promise ? _out : Promise.resolve(_out);
|
|
3422
3555
|
return output.then((output2) => {
|
|
3423
3556
|
payload.value = output2;
|
|
3557
|
+
payload.fallback = true;
|
|
3424
3558
|
return payload;
|
|
3425
3559
|
});
|
|
3426
3560
|
}
|
|
@@ -3428,6 +3562,7 @@ var init_schemas = __esm({
|
|
|
3428
3562
|
throw new $ZodAsyncError();
|
|
3429
3563
|
}
|
|
3430
3564
|
payload.value = _out;
|
|
3565
|
+
payload.fallback = true;
|
|
3431
3566
|
return payload;
|
|
3432
3567
|
};
|
|
3433
3568
|
});
|
|
@@ -3444,10 +3579,11 @@ var init_schemas = __esm({
|
|
|
3444
3579
|
});
|
|
3445
3580
|
inst._zod.parse = (payload, ctx) => {
|
|
3446
3581
|
if (def.innerType._zod.optin === "optional") {
|
|
3582
|
+
const input = payload.value;
|
|
3447
3583
|
const result = def.innerType._zod.run(payload, ctx);
|
|
3448
3584
|
if (result instanceof Promise)
|
|
3449
|
-
return result.then((r) => handleOptionalResult(r,
|
|
3450
|
-
return handleOptionalResult(result,
|
|
3585
|
+
return result.then((r) => handleOptionalResult(r, input));
|
|
3586
|
+
return handleOptionalResult(result, input);
|
|
3451
3587
|
}
|
|
3452
3588
|
if (payload.value === void 0) {
|
|
3453
3589
|
return payload;
|
|
@@ -3546,7 +3682,7 @@ var init_schemas = __esm({
|
|
|
3546
3682
|
});
|
|
3547
3683
|
$ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
3548
3684
|
$ZodType.init(inst, def);
|
|
3549
|
-
|
|
3685
|
+
inst._zod.optin = "optional";
|
|
3550
3686
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
3551
3687
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
3552
3688
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -3566,6 +3702,7 @@ var init_schemas = __esm({
|
|
|
3566
3702
|
input: payload.value
|
|
3567
3703
|
});
|
|
3568
3704
|
payload.issues = [];
|
|
3705
|
+
payload.fallback = true;
|
|
3569
3706
|
}
|
|
3570
3707
|
return payload;
|
|
3571
3708
|
});
|
|
@@ -3580,6 +3717,7 @@ var init_schemas = __esm({
|
|
|
3580
3717
|
input: payload.value
|
|
3581
3718
|
});
|
|
3582
3719
|
payload.issues = [];
|
|
3720
|
+
payload.fallback = true;
|
|
3583
3721
|
}
|
|
3584
3722
|
return payload;
|
|
3585
3723
|
};
|
|
@@ -3643,6 +3781,9 @@ var init_schemas = __esm({
|
|
|
3643
3781
|
}
|
|
3644
3782
|
};
|
|
3645
3783
|
});
|
|
3784
|
+
$ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
|
|
3785
|
+
$ZodPipe.init(inst, def);
|
|
3786
|
+
});
|
|
3646
3787
|
$ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
3647
3788
|
$ZodType.init(inst, def);
|
|
3648
3789
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
@@ -3790,7 +3931,12 @@ var init_schemas = __esm({
|
|
|
3790
3931
|
});
|
|
3791
3932
|
$ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
3792
3933
|
$ZodType.init(inst, def);
|
|
3793
|
-
defineLazy(inst._zod, "innerType", () =>
|
|
3934
|
+
defineLazy(inst._zod, "innerType", () => {
|
|
3935
|
+
const d = def;
|
|
3936
|
+
if (!d._cachedInner)
|
|
3937
|
+
d._cachedInner = def.getter();
|
|
3938
|
+
return d._cachedInner;
|
|
3939
|
+
});
|
|
3794
3940
|
defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
|
|
3795
3941
|
defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
|
|
3796
3942
|
defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
|
|
@@ -4812,18 +4958,135 @@ var init_de = __esm({
|
|
|
4812
4958
|
}
|
|
4813
4959
|
});
|
|
4814
4960
|
|
|
4815
|
-
// ../../node_modules/zod/v4/locales/
|
|
4816
|
-
function
|
|
4961
|
+
// ../../node_modules/zod/v4/locales/el.js
|
|
4962
|
+
function el_default() {
|
|
4817
4963
|
return {
|
|
4818
4964
|
localeError: error9()
|
|
4819
4965
|
};
|
|
4820
4966
|
}
|
|
4821
4967
|
var error9;
|
|
4968
|
+
var init_el = __esm({
|
|
4969
|
+
"../../node_modules/zod/v4/locales/el.js"() {
|
|
4970
|
+
"use strict";
|
|
4971
|
+
init_util();
|
|
4972
|
+
error9 = () => {
|
|
4973
|
+
const Sizable = {
|
|
4974
|
+
string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
4975
|
+
file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
4976
|
+
array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
4977
|
+
set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
4978
|
+
map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
|
|
4979
|
+
};
|
|
4980
|
+
function getSizing(origin) {
|
|
4981
|
+
return Sizable[origin] ?? null;
|
|
4982
|
+
}
|
|
4983
|
+
const FormatDictionary = {
|
|
4984
|
+
regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
|
|
4985
|
+
email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
|
|
4986
|
+
url: "URL",
|
|
4987
|
+
emoji: "emoji",
|
|
4988
|
+
uuid: "UUID",
|
|
4989
|
+
uuidv4: "UUIDv4",
|
|
4990
|
+
uuidv6: "UUIDv6",
|
|
4991
|
+
nanoid: "nanoid",
|
|
4992
|
+
guid: "GUID",
|
|
4993
|
+
cuid: "cuid",
|
|
4994
|
+
cuid2: "cuid2",
|
|
4995
|
+
ulid: "ULID",
|
|
4996
|
+
xid: "XID",
|
|
4997
|
+
ksuid: "KSUID",
|
|
4998
|
+
datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
|
|
4999
|
+
date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
|
|
5000
|
+
time: "ISO \u03CE\u03C1\u03B1",
|
|
5001
|
+
duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
|
|
5002
|
+
ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
|
|
5003
|
+
ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
|
|
5004
|
+
mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
|
|
5005
|
+
cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
|
|
5006
|
+
cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
|
|
5007
|
+
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",
|
|
5008
|
+
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",
|
|
5009
|
+
json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
|
|
5010
|
+
e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
|
|
5011
|
+
jwt: "JWT",
|
|
5012
|
+
template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
|
|
5013
|
+
};
|
|
5014
|
+
const TypeDictionary = {
|
|
5015
|
+
nan: "NaN"
|
|
5016
|
+
};
|
|
5017
|
+
return (issue2) => {
|
|
5018
|
+
switch (issue2.code) {
|
|
5019
|
+
case "invalid_type": {
|
|
5020
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
5021
|
+
const receivedType = parsedType(issue2.input);
|
|
5022
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
5023
|
+
if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
|
|
5024
|
+
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}`;
|
|
5025
|
+
}
|
|
5026
|
+
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}`;
|
|
5027
|
+
}
|
|
5028
|
+
case "invalid_value":
|
|
5029
|
+
if (issue2.values.length === 1)
|
|
5030
|
+
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])}`;
|
|
5031
|
+
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, "|")}`;
|
|
5032
|
+
case "too_big": {
|
|
5033
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
5034
|
+
const sizing = getSizing(issue2.origin);
|
|
5035
|
+
if (sizing)
|
|
5036
|
+
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"}`;
|
|
5037
|
+
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()}`;
|
|
5038
|
+
}
|
|
5039
|
+
case "too_small": {
|
|
5040
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
5041
|
+
const sizing = getSizing(issue2.origin);
|
|
5042
|
+
if (sizing) {
|
|
5043
|
+
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}`;
|
|
5044
|
+
}
|
|
5045
|
+
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()}`;
|
|
5046
|
+
}
|
|
5047
|
+
case "invalid_format": {
|
|
5048
|
+
const _issue = issue2;
|
|
5049
|
+
if (_issue.format === "starts_with") {
|
|
5050
|
+
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}"`;
|
|
5051
|
+
}
|
|
5052
|
+
if (_issue.format === "ends_with")
|
|
5053
|
+
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}"`;
|
|
5054
|
+
if (_issue.format === "includes")
|
|
5055
|
+
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}"`;
|
|
5056
|
+
if (_issue.format === "regex")
|
|
5057
|
+
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}`;
|
|
5058
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
5059
|
+
}
|
|
5060
|
+
case "not_multiple_of":
|
|
5061
|
+
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}`;
|
|
5062
|
+
case "unrecognized_keys":
|
|
5063
|
+
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, ", ")}`;
|
|
5064
|
+
case "invalid_key":
|
|
5065
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
5066
|
+
case "invalid_union":
|
|
5067
|
+
return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
|
|
5068
|
+
case "invalid_element":
|
|
5069
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
5070
|
+
default:
|
|
5071
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
|
|
5072
|
+
}
|
|
5073
|
+
};
|
|
5074
|
+
};
|
|
5075
|
+
}
|
|
5076
|
+
});
|
|
5077
|
+
|
|
5078
|
+
// ../../node_modules/zod/v4/locales/en.js
|
|
5079
|
+
function en_default() {
|
|
5080
|
+
return {
|
|
5081
|
+
localeError: error10()
|
|
5082
|
+
};
|
|
5083
|
+
}
|
|
5084
|
+
var error10;
|
|
4822
5085
|
var init_en = __esm({
|
|
4823
5086
|
"../../node_modules/zod/v4/locales/en.js"() {
|
|
4824
5087
|
"use strict";
|
|
4825
5088
|
init_util();
|
|
4826
|
-
|
|
5089
|
+
error10 = () => {
|
|
4827
5090
|
const Sizable = {
|
|
4828
5091
|
string: { unit: "characters", verb: "to have" },
|
|
4829
5092
|
file: { unit: "bytes", verb: "to have" },
|
|
@@ -4917,6 +5180,10 @@ var init_en = __esm({
|
|
|
4917
5180
|
case "invalid_key":
|
|
4918
5181
|
return `Invalid key in ${issue2.origin}`;
|
|
4919
5182
|
case "invalid_union":
|
|
5183
|
+
if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
|
|
5184
|
+
const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
|
|
5185
|
+
return `Invalid discriminator value. Expected ${opts}`;
|
|
5186
|
+
}
|
|
4920
5187
|
return "Invalid input";
|
|
4921
5188
|
case "invalid_element":
|
|
4922
5189
|
return `Invalid value in ${issue2.origin}`;
|
|
@@ -4931,15 +5198,15 @@ var init_en = __esm({
|
|
|
4931
5198
|
// ../../node_modules/zod/v4/locales/eo.js
|
|
4932
5199
|
function eo_default() {
|
|
4933
5200
|
return {
|
|
4934
|
-
localeError:
|
|
5201
|
+
localeError: error11()
|
|
4935
5202
|
};
|
|
4936
5203
|
}
|
|
4937
|
-
var
|
|
5204
|
+
var error11;
|
|
4938
5205
|
var init_eo = __esm({
|
|
4939
5206
|
"../../node_modules/zod/v4/locales/eo.js"() {
|
|
4940
5207
|
"use strict";
|
|
4941
5208
|
init_util();
|
|
4942
|
-
|
|
5209
|
+
error11 = () => {
|
|
4943
5210
|
const Sizable = {
|
|
4944
5211
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
4945
5212
|
file: { unit: "bajtojn", verb: "havi" },
|
|
@@ -5048,15 +5315,15 @@ var init_eo = __esm({
|
|
|
5048
5315
|
// ../../node_modules/zod/v4/locales/es.js
|
|
5049
5316
|
function es_default() {
|
|
5050
5317
|
return {
|
|
5051
|
-
localeError:
|
|
5318
|
+
localeError: error12()
|
|
5052
5319
|
};
|
|
5053
5320
|
}
|
|
5054
|
-
var
|
|
5321
|
+
var error12;
|
|
5055
5322
|
var init_es = __esm({
|
|
5056
5323
|
"../../node_modules/zod/v4/locales/es.js"() {
|
|
5057
5324
|
"use strict";
|
|
5058
5325
|
init_util();
|
|
5059
|
-
|
|
5326
|
+
error12 = () => {
|
|
5060
5327
|
const Sizable = {
|
|
5061
5328
|
string: { unit: "caracteres", verb: "tener" },
|
|
5062
5329
|
file: { unit: "bytes", verb: "tener" },
|
|
@@ -5188,15 +5455,15 @@ var init_es = __esm({
|
|
|
5188
5455
|
// ../../node_modules/zod/v4/locales/fa.js
|
|
5189
5456
|
function fa_default() {
|
|
5190
5457
|
return {
|
|
5191
|
-
localeError:
|
|
5458
|
+
localeError: error13()
|
|
5192
5459
|
};
|
|
5193
5460
|
}
|
|
5194
|
-
var
|
|
5461
|
+
var error13;
|
|
5195
5462
|
var init_fa = __esm({
|
|
5196
5463
|
"../../node_modules/zod/v4/locales/fa.js"() {
|
|
5197
5464
|
"use strict";
|
|
5198
5465
|
init_util();
|
|
5199
|
-
|
|
5466
|
+
error13 = () => {
|
|
5200
5467
|
const Sizable = {
|
|
5201
5468
|
string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
5202
5469
|
file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
@@ -5310,15 +5577,15 @@ var init_fa = __esm({
|
|
|
5310
5577
|
// ../../node_modules/zod/v4/locales/fi.js
|
|
5311
5578
|
function fi_default() {
|
|
5312
5579
|
return {
|
|
5313
|
-
localeError:
|
|
5580
|
+
localeError: error14()
|
|
5314
5581
|
};
|
|
5315
5582
|
}
|
|
5316
|
-
var
|
|
5583
|
+
var error14;
|
|
5317
5584
|
var init_fi = __esm({
|
|
5318
5585
|
"../../node_modules/zod/v4/locales/fi.js"() {
|
|
5319
5586
|
"use strict";
|
|
5320
5587
|
init_util();
|
|
5321
|
-
|
|
5588
|
+
error14 = () => {
|
|
5322
5589
|
const Sizable = {
|
|
5323
5590
|
string: { unit: "merkki\xE4", subject: "merkkijonon" },
|
|
5324
5591
|
file: { unit: "tavua", subject: "tiedoston" },
|
|
@@ -5430,15 +5697,15 @@ var init_fi = __esm({
|
|
|
5430
5697
|
// ../../node_modules/zod/v4/locales/fr.js
|
|
5431
5698
|
function fr_default() {
|
|
5432
5699
|
return {
|
|
5433
|
-
localeError:
|
|
5700
|
+
localeError: error15()
|
|
5434
5701
|
};
|
|
5435
5702
|
}
|
|
5436
|
-
var
|
|
5703
|
+
var error15;
|
|
5437
5704
|
var init_fr = __esm({
|
|
5438
5705
|
"../../node_modules/zod/v4/locales/fr.js"() {
|
|
5439
5706
|
"use strict";
|
|
5440
5707
|
init_util();
|
|
5441
|
-
|
|
5708
|
+
error15 = () => {
|
|
5442
5709
|
const Sizable = {
|
|
5443
5710
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
5444
5711
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -5479,9 +5746,27 @@ var init_fr = __esm({
|
|
|
5479
5746
|
template_literal: "entr\xE9e"
|
|
5480
5747
|
};
|
|
5481
5748
|
const TypeDictionary = {
|
|
5482
|
-
|
|
5749
|
+
string: "cha\xEEne",
|
|
5483
5750
|
number: "nombre",
|
|
5484
|
-
|
|
5751
|
+
int: "entier",
|
|
5752
|
+
boolean: "bool\xE9en",
|
|
5753
|
+
bigint: "grand entier",
|
|
5754
|
+
symbol: "symbole",
|
|
5755
|
+
undefined: "ind\xE9fini",
|
|
5756
|
+
null: "null",
|
|
5757
|
+
never: "jamais",
|
|
5758
|
+
void: "vide",
|
|
5759
|
+
date: "date",
|
|
5760
|
+
array: "tableau",
|
|
5761
|
+
object: "objet",
|
|
5762
|
+
tuple: "tuple",
|
|
5763
|
+
record: "enregistrement",
|
|
5764
|
+
map: "carte",
|
|
5765
|
+
set: "ensemble",
|
|
5766
|
+
file: "fichier",
|
|
5767
|
+
nonoptional: "non-optionnel",
|
|
5768
|
+
nan: "NaN",
|
|
5769
|
+
function: "fonction"
|
|
5485
5770
|
};
|
|
5486
5771
|
return (issue2) => {
|
|
5487
5772
|
switch (issue2.code) {
|
|
@@ -5502,16 +5787,15 @@ var init_fr = __esm({
|
|
|
5502
5787
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
5503
5788
|
const sizing = getSizing(issue2.origin);
|
|
5504
5789
|
if (sizing)
|
|
5505
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
5506
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
5790
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
5791
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
5507
5792
|
}
|
|
5508
5793
|
case "too_small": {
|
|
5509
5794
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
5510
5795
|
const sizing = getSizing(issue2.origin);
|
|
5511
|
-
if (sizing)
|
|
5512
|
-
return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
5513
|
-
}
|
|
5514
|
-
return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
5796
|
+
if (sizing)
|
|
5797
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
5798
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
5515
5799
|
}
|
|
5516
5800
|
case "invalid_format": {
|
|
5517
5801
|
const _issue = issue2;
|
|
@@ -5546,15 +5830,15 @@ var init_fr = __esm({
|
|
|
5546
5830
|
// ../../node_modules/zod/v4/locales/fr-CA.js
|
|
5547
5831
|
function fr_CA_default() {
|
|
5548
5832
|
return {
|
|
5549
|
-
localeError:
|
|
5833
|
+
localeError: error16()
|
|
5550
5834
|
};
|
|
5551
5835
|
}
|
|
5552
|
-
var
|
|
5836
|
+
var error16;
|
|
5553
5837
|
var init_fr_CA = __esm({
|
|
5554
5838
|
"../../node_modules/zod/v4/locales/fr-CA.js"() {
|
|
5555
5839
|
"use strict";
|
|
5556
5840
|
init_util();
|
|
5557
|
-
|
|
5841
|
+
error16 = () => {
|
|
5558
5842
|
const Sizable = {
|
|
5559
5843
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
5560
5844
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -5661,15 +5945,15 @@ var init_fr_CA = __esm({
|
|
|
5661
5945
|
// ../../node_modules/zod/v4/locales/he.js
|
|
5662
5946
|
function he_default() {
|
|
5663
5947
|
return {
|
|
5664
|
-
localeError:
|
|
5948
|
+
localeError: error17()
|
|
5665
5949
|
};
|
|
5666
5950
|
}
|
|
5667
|
-
var
|
|
5951
|
+
var error17;
|
|
5668
5952
|
var init_he = __esm({
|
|
5669
5953
|
"../../node_modules/zod/v4/locales/he.js"() {
|
|
5670
5954
|
"use strict";
|
|
5671
5955
|
init_util();
|
|
5672
|
-
|
|
5956
|
+
error17 = () => {
|
|
5673
5957
|
const TypeNames = {
|
|
5674
5958
|
string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
|
|
5675
5959
|
number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
|
|
@@ -5860,23 +6144,153 @@ var init_he = __esm({
|
|
|
5860
6144
|
}
|
|
5861
6145
|
});
|
|
5862
6146
|
|
|
5863
|
-
// ../../node_modules/zod/v4/locales/
|
|
5864
|
-
function
|
|
6147
|
+
// ../../node_modules/zod/v4/locales/hr.js
|
|
6148
|
+
function hr_default() {
|
|
5865
6149
|
return {
|
|
5866
|
-
localeError:
|
|
6150
|
+
localeError: error18()
|
|
5867
6151
|
};
|
|
5868
6152
|
}
|
|
5869
|
-
var
|
|
5870
|
-
var
|
|
5871
|
-
"../../node_modules/zod/v4/locales/
|
|
6153
|
+
var error18;
|
|
6154
|
+
var init_hr = __esm({
|
|
6155
|
+
"../../node_modules/zod/v4/locales/hr.js"() {
|
|
5872
6156
|
"use strict";
|
|
5873
6157
|
init_util();
|
|
5874
|
-
|
|
6158
|
+
error18 = () => {
|
|
5875
6159
|
const Sizable = {
|
|
5876
|
-
string: { unit: "
|
|
5877
|
-
file: { unit: "
|
|
5878
|
-
array: { unit: "
|
|
5879
|
-
set: { unit: "
|
|
6160
|
+
string: { unit: "znakova", verb: "imati" },
|
|
6161
|
+
file: { unit: "bajtova", verb: "imati" },
|
|
6162
|
+
array: { unit: "stavki", verb: "imati" },
|
|
6163
|
+
set: { unit: "stavki", verb: "imati" }
|
|
6164
|
+
};
|
|
6165
|
+
function getSizing(origin) {
|
|
6166
|
+
return Sizable[origin] ?? null;
|
|
6167
|
+
}
|
|
6168
|
+
const FormatDictionary = {
|
|
6169
|
+
regex: "unos",
|
|
6170
|
+
email: "email adresa",
|
|
6171
|
+
url: "URL",
|
|
6172
|
+
emoji: "emoji",
|
|
6173
|
+
uuid: "UUID",
|
|
6174
|
+
uuidv4: "UUIDv4",
|
|
6175
|
+
uuidv6: "UUIDv6",
|
|
6176
|
+
nanoid: "nanoid",
|
|
6177
|
+
guid: "GUID",
|
|
6178
|
+
cuid: "cuid",
|
|
6179
|
+
cuid2: "cuid2",
|
|
6180
|
+
ulid: "ULID",
|
|
6181
|
+
xid: "XID",
|
|
6182
|
+
ksuid: "KSUID",
|
|
6183
|
+
datetime: "ISO datum i vrijeme",
|
|
6184
|
+
date: "ISO datum",
|
|
6185
|
+
time: "ISO vrijeme",
|
|
6186
|
+
duration: "ISO trajanje",
|
|
6187
|
+
ipv4: "IPv4 adresa",
|
|
6188
|
+
ipv6: "IPv6 adresa",
|
|
6189
|
+
cidrv4: "IPv4 raspon",
|
|
6190
|
+
cidrv6: "IPv6 raspon",
|
|
6191
|
+
base64: "base64 kodirani tekst",
|
|
6192
|
+
base64url: "base64url kodirani tekst",
|
|
6193
|
+
json_string: "JSON tekst",
|
|
6194
|
+
e164: "E.164 broj",
|
|
6195
|
+
jwt: "JWT",
|
|
6196
|
+
template_literal: "unos"
|
|
6197
|
+
};
|
|
6198
|
+
const TypeDictionary = {
|
|
6199
|
+
nan: "NaN",
|
|
6200
|
+
string: "tekst",
|
|
6201
|
+
number: "broj",
|
|
6202
|
+
boolean: "boolean",
|
|
6203
|
+
array: "niz",
|
|
6204
|
+
object: "objekt",
|
|
6205
|
+
set: "skup",
|
|
6206
|
+
file: "datoteka",
|
|
6207
|
+
date: "datum",
|
|
6208
|
+
bigint: "bigint",
|
|
6209
|
+
symbol: "simbol",
|
|
6210
|
+
undefined: "undefined",
|
|
6211
|
+
null: "null",
|
|
6212
|
+
function: "funkcija",
|
|
6213
|
+
map: "mapa"
|
|
6214
|
+
};
|
|
6215
|
+
return (issue2) => {
|
|
6216
|
+
switch (issue2.code) {
|
|
6217
|
+
case "invalid_type": {
|
|
6218
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
6219
|
+
const receivedType = parsedType(issue2.input);
|
|
6220
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
6221
|
+
if (/^[A-Z]/.test(issue2.expected)) {
|
|
6222
|
+
return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
|
|
6223
|
+
}
|
|
6224
|
+
return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
|
|
6225
|
+
}
|
|
6226
|
+
case "invalid_value":
|
|
6227
|
+
if (issue2.values.length === 1)
|
|
6228
|
+
return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
|
|
6229
|
+
return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
|
|
6230
|
+
case "too_big": {
|
|
6231
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
6232
|
+
const sizing = getSizing(issue2.origin);
|
|
6233
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
6234
|
+
if (sizing)
|
|
6235
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
|
|
6236
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
|
|
6237
|
+
}
|
|
6238
|
+
case "too_small": {
|
|
6239
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
6240
|
+
const sizing = getSizing(issue2.origin);
|
|
6241
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
6242
|
+
if (sizing) {
|
|
6243
|
+
return `Premalo: o\u010Dekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
6244
|
+
}
|
|
6245
|
+
return `Premalo: o\u010Dekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
|
|
6246
|
+
}
|
|
6247
|
+
case "invalid_format": {
|
|
6248
|
+
const _issue = issue2;
|
|
6249
|
+
if (_issue.format === "starts_with")
|
|
6250
|
+
return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
|
|
6251
|
+
if (_issue.format === "ends_with")
|
|
6252
|
+
return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
|
|
6253
|
+
if (_issue.format === "includes")
|
|
6254
|
+
return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
|
|
6255
|
+
if (_issue.format === "regex")
|
|
6256
|
+
return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
|
|
6257
|
+
return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
6258
|
+
}
|
|
6259
|
+
case "not_multiple_of":
|
|
6260
|
+
return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
|
|
6261
|
+
case "unrecognized_keys":
|
|
6262
|
+
return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
|
|
6263
|
+
case "invalid_key":
|
|
6264
|
+
return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
6265
|
+
case "invalid_union":
|
|
6266
|
+
return "Neispravan unos";
|
|
6267
|
+
case "invalid_element":
|
|
6268
|
+
return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
6269
|
+
default:
|
|
6270
|
+
return `Neispravan unos`;
|
|
6271
|
+
}
|
|
6272
|
+
};
|
|
6273
|
+
};
|
|
6274
|
+
}
|
|
6275
|
+
});
|
|
6276
|
+
|
|
6277
|
+
// ../../node_modules/zod/v4/locales/hu.js
|
|
6278
|
+
function hu_default() {
|
|
6279
|
+
return {
|
|
6280
|
+
localeError: error19()
|
|
6281
|
+
};
|
|
6282
|
+
}
|
|
6283
|
+
var error19;
|
|
6284
|
+
var init_hu = __esm({
|
|
6285
|
+
"../../node_modules/zod/v4/locales/hu.js"() {
|
|
6286
|
+
"use strict";
|
|
6287
|
+
init_util();
|
|
6288
|
+
error19 = () => {
|
|
6289
|
+
const Sizable = {
|
|
6290
|
+
string: { unit: "karakter", verb: "legyen" },
|
|
6291
|
+
file: { unit: "byte", verb: "legyen" },
|
|
6292
|
+
array: { unit: "elem", verb: "legyen" },
|
|
6293
|
+
set: { unit: "elem", verb: "legyen" }
|
|
5880
6294
|
};
|
|
5881
6295
|
function getSizing(origin) {
|
|
5882
6296
|
return Sizable[origin] ?? null;
|
|
@@ -5989,15 +6403,15 @@ function withDefiniteArticle(word) {
|
|
|
5989
6403
|
}
|
|
5990
6404
|
function hy_default() {
|
|
5991
6405
|
return {
|
|
5992
|
-
localeError:
|
|
6406
|
+
localeError: error20()
|
|
5993
6407
|
};
|
|
5994
6408
|
}
|
|
5995
|
-
var
|
|
6409
|
+
var error20;
|
|
5996
6410
|
var init_hy = __esm({
|
|
5997
6411
|
"../../node_modules/zod/v4/locales/hy.js"() {
|
|
5998
6412
|
"use strict";
|
|
5999
6413
|
init_util();
|
|
6000
|
-
|
|
6414
|
+
error20 = () => {
|
|
6001
6415
|
const Sizable = {
|
|
6002
6416
|
string: {
|
|
6003
6417
|
unit: {
|
|
@@ -6134,15 +6548,15 @@ var init_hy = __esm({
|
|
|
6134
6548
|
// ../../node_modules/zod/v4/locales/id.js
|
|
6135
6549
|
function id_default() {
|
|
6136
6550
|
return {
|
|
6137
|
-
localeError:
|
|
6551
|
+
localeError: error21()
|
|
6138
6552
|
};
|
|
6139
6553
|
}
|
|
6140
|
-
var
|
|
6554
|
+
var error21;
|
|
6141
6555
|
var init_id = __esm({
|
|
6142
6556
|
"../../node_modules/zod/v4/locales/id.js"() {
|
|
6143
6557
|
"use strict";
|
|
6144
6558
|
init_util();
|
|
6145
|
-
|
|
6559
|
+
error21 = () => {
|
|
6146
6560
|
const Sizable = {
|
|
6147
6561
|
string: { unit: "karakter", verb: "memiliki" },
|
|
6148
6562
|
file: { unit: "byte", verb: "memiliki" },
|
|
@@ -6248,15 +6662,15 @@ var init_id = __esm({
|
|
|
6248
6662
|
// ../../node_modules/zod/v4/locales/is.js
|
|
6249
6663
|
function is_default() {
|
|
6250
6664
|
return {
|
|
6251
|
-
localeError:
|
|
6665
|
+
localeError: error22()
|
|
6252
6666
|
};
|
|
6253
6667
|
}
|
|
6254
|
-
var
|
|
6668
|
+
var error22;
|
|
6255
6669
|
var init_is = __esm({
|
|
6256
6670
|
"../../node_modules/zod/v4/locales/is.js"() {
|
|
6257
6671
|
"use strict";
|
|
6258
6672
|
init_util();
|
|
6259
|
-
|
|
6673
|
+
error22 = () => {
|
|
6260
6674
|
const Sizable = {
|
|
6261
6675
|
string: { unit: "stafi", verb: "a\xF0 hafa" },
|
|
6262
6676
|
file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
|
|
@@ -6365,15 +6779,15 @@ var init_is = __esm({
|
|
|
6365
6779
|
// ../../node_modules/zod/v4/locales/it.js
|
|
6366
6780
|
function it_default() {
|
|
6367
6781
|
return {
|
|
6368
|
-
localeError:
|
|
6782
|
+
localeError: error23()
|
|
6369
6783
|
};
|
|
6370
6784
|
}
|
|
6371
|
-
var
|
|
6785
|
+
var error23;
|
|
6372
6786
|
var init_it = __esm({
|
|
6373
6787
|
"../../node_modules/zod/v4/locales/it.js"() {
|
|
6374
6788
|
"use strict";
|
|
6375
6789
|
init_util();
|
|
6376
|
-
|
|
6790
|
+
error23 = () => {
|
|
6377
6791
|
const Sizable = {
|
|
6378
6792
|
string: { unit: "caratteri", verb: "avere" },
|
|
6379
6793
|
file: { unit: "byte", verb: "avere" },
|
|
@@ -6458,7 +6872,7 @@ var init_it = __esm({
|
|
|
6458
6872
|
return `Stringa non valida: deve includere "${_issue.includes}"`;
|
|
6459
6873
|
if (_issue.format === "regex")
|
|
6460
6874
|
return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
|
|
6461
|
-
return `
|
|
6875
|
+
return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
6462
6876
|
}
|
|
6463
6877
|
case "not_multiple_of":
|
|
6464
6878
|
return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
|
|
@@ -6481,15 +6895,15 @@ var init_it = __esm({
|
|
|
6481
6895
|
// ../../node_modules/zod/v4/locales/ja.js
|
|
6482
6896
|
function ja_default() {
|
|
6483
6897
|
return {
|
|
6484
|
-
localeError:
|
|
6898
|
+
localeError: error24()
|
|
6485
6899
|
};
|
|
6486
6900
|
}
|
|
6487
|
-
var
|
|
6901
|
+
var error24;
|
|
6488
6902
|
var init_ja = __esm({
|
|
6489
6903
|
"../../node_modules/zod/v4/locales/ja.js"() {
|
|
6490
6904
|
"use strict";
|
|
6491
6905
|
init_util();
|
|
6492
|
-
|
|
6906
|
+
error24 = () => {
|
|
6493
6907
|
const Sizable = {
|
|
6494
6908
|
string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
|
|
6495
6909
|
file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
|
|
@@ -6596,15 +7010,15 @@ var init_ja = __esm({
|
|
|
6596
7010
|
// ../../node_modules/zod/v4/locales/ka.js
|
|
6597
7011
|
function ka_default() {
|
|
6598
7012
|
return {
|
|
6599
|
-
localeError:
|
|
7013
|
+
localeError: error25()
|
|
6600
7014
|
};
|
|
6601
7015
|
}
|
|
6602
|
-
var
|
|
7016
|
+
var error25;
|
|
6603
7017
|
var init_ka = __esm({
|
|
6604
7018
|
"../../node_modules/zod/v4/locales/ka.js"() {
|
|
6605
7019
|
"use strict";
|
|
6606
7020
|
init_util();
|
|
6607
|
-
|
|
7021
|
+
error25 = () => {
|
|
6608
7022
|
const Sizable = {
|
|
6609
7023
|
string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
6610
7024
|
file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
@@ -6637,9 +7051,9 @@ var init_ka = __esm({
|
|
|
6637
7051
|
ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
|
|
6638
7052
|
cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
6639
7053
|
cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
6640
|
-
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
6641
|
-
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
6642
|
-
json_string: "JSON \
|
|
7054
|
+
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
7055
|
+
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
7056
|
+
json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
|
|
6643
7057
|
e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
|
|
6644
7058
|
jwt: "JWT",
|
|
6645
7059
|
template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
|
|
@@ -6647,7 +7061,7 @@ var init_ka = __esm({
|
|
|
6647
7061
|
const TypeDictionary = {
|
|
6648
7062
|
nan: "NaN",
|
|
6649
7063
|
number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
|
|
6650
|
-
string: "\
|
|
7064
|
+
string: "\u10D5\u10D4\u10DA\u10D8",
|
|
6651
7065
|
boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
|
|
6652
7066
|
function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
|
|
6653
7067
|
array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
|
|
@@ -6685,14 +7099,14 @@ var init_ka = __esm({
|
|
|
6685
7099
|
case "invalid_format": {
|
|
6686
7100
|
const _issue = issue2;
|
|
6687
7101
|
if (_issue.format === "starts_with") {
|
|
6688
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7102
|
+
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`;
|
|
6689
7103
|
}
|
|
6690
7104
|
if (_issue.format === "ends_with")
|
|
6691
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7105
|
+
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`;
|
|
6692
7106
|
if (_issue.format === "includes")
|
|
6693
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7107
|
+
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`;
|
|
6694
7108
|
if (_issue.format === "regex")
|
|
6695
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7109
|
+
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}`;
|
|
6696
7110
|
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
6697
7111
|
}
|
|
6698
7112
|
case "not_multiple_of":
|
|
@@ -6716,15 +7130,15 @@ var init_ka = __esm({
|
|
|
6716
7130
|
// ../../node_modules/zod/v4/locales/km.js
|
|
6717
7131
|
function km_default() {
|
|
6718
7132
|
return {
|
|
6719
|
-
localeError:
|
|
7133
|
+
localeError: error26()
|
|
6720
7134
|
};
|
|
6721
7135
|
}
|
|
6722
|
-
var
|
|
7136
|
+
var error26;
|
|
6723
7137
|
var init_km = __esm({
|
|
6724
7138
|
"../../node_modules/zod/v4/locales/km.js"() {
|
|
6725
7139
|
"use strict";
|
|
6726
7140
|
init_util();
|
|
6727
|
-
|
|
7141
|
+
error26 = () => {
|
|
6728
7142
|
const Sizable = {
|
|
6729
7143
|
string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
6730
7144
|
file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
@@ -6845,15 +7259,15 @@ var init_kh = __esm({
|
|
|
6845
7259
|
// ../../node_modules/zod/v4/locales/ko.js
|
|
6846
7260
|
function ko_default() {
|
|
6847
7261
|
return {
|
|
6848
|
-
localeError:
|
|
7262
|
+
localeError: error27()
|
|
6849
7263
|
};
|
|
6850
7264
|
}
|
|
6851
|
-
var
|
|
7265
|
+
var error27;
|
|
6852
7266
|
var init_ko = __esm({
|
|
6853
7267
|
"../../node_modules/zod/v4/locales/ko.js"() {
|
|
6854
7268
|
"use strict";
|
|
6855
7269
|
init_util();
|
|
6856
|
-
|
|
7270
|
+
error27 = () => {
|
|
6857
7271
|
const Sizable = {
|
|
6858
7272
|
string: { unit: "\uBB38\uC790", verb: "to have" },
|
|
6859
7273
|
file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
|
|
@@ -6974,10 +7388,10 @@ function getUnitTypeFromNumber(number4) {
|
|
|
6974
7388
|
}
|
|
6975
7389
|
function lt_default() {
|
|
6976
7390
|
return {
|
|
6977
|
-
localeError:
|
|
7391
|
+
localeError: error28()
|
|
6978
7392
|
};
|
|
6979
7393
|
}
|
|
6980
|
-
var capitalizeFirstCharacter,
|
|
7394
|
+
var capitalizeFirstCharacter, error28;
|
|
6981
7395
|
var init_lt = __esm({
|
|
6982
7396
|
"../../node_modules/zod/v4/locales/lt.js"() {
|
|
6983
7397
|
"use strict";
|
|
@@ -6985,7 +7399,7 @@ var init_lt = __esm({
|
|
|
6985
7399
|
capitalizeFirstCharacter = (text) => {
|
|
6986
7400
|
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
6987
7401
|
};
|
|
6988
|
-
|
|
7402
|
+
error28 = () => {
|
|
6989
7403
|
const Sizable = {
|
|
6990
7404
|
string: {
|
|
6991
7405
|
unit: {
|
|
@@ -7175,15 +7589,15 @@ var init_lt = __esm({
|
|
|
7175
7589
|
// ../../node_modules/zod/v4/locales/mk.js
|
|
7176
7590
|
function mk_default() {
|
|
7177
7591
|
return {
|
|
7178
|
-
localeError:
|
|
7592
|
+
localeError: error29()
|
|
7179
7593
|
};
|
|
7180
7594
|
}
|
|
7181
|
-
var
|
|
7595
|
+
var error29;
|
|
7182
7596
|
var init_mk = __esm({
|
|
7183
7597
|
"../../node_modules/zod/v4/locales/mk.js"() {
|
|
7184
7598
|
"use strict";
|
|
7185
7599
|
init_util();
|
|
7186
|
-
|
|
7600
|
+
error29 = () => {
|
|
7187
7601
|
const Sizable = {
|
|
7188
7602
|
string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
7189
7603
|
file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
@@ -7292,15 +7706,15 @@ var init_mk = __esm({
|
|
|
7292
7706
|
// ../../node_modules/zod/v4/locales/ms.js
|
|
7293
7707
|
function ms_default() {
|
|
7294
7708
|
return {
|
|
7295
|
-
localeError:
|
|
7709
|
+
localeError: error30()
|
|
7296
7710
|
};
|
|
7297
7711
|
}
|
|
7298
|
-
var
|
|
7712
|
+
var error30;
|
|
7299
7713
|
var init_ms = __esm({
|
|
7300
7714
|
"../../node_modules/zod/v4/locales/ms.js"() {
|
|
7301
7715
|
"use strict";
|
|
7302
7716
|
init_util();
|
|
7303
|
-
|
|
7717
|
+
error30 = () => {
|
|
7304
7718
|
const Sizable = {
|
|
7305
7719
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
7306
7720
|
file: { unit: "bait", verb: "mempunyai" },
|
|
@@ -7407,15 +7821,15 @@ var init_ms = __esm({
|
|
|
7407
7821
|
// ../../node_modules/zod/v4/locales/nl.js
|
|
7408
7822
|
function nl_default() {
|
|
7409
7823
|
return {
|
|
7410
|
-
localeError:
|
|
7824
|
+
localeError: error31()
|
|
7411
7825
|
};
|
|
7412
7826
|
}
|
|
7413
|
-
var
|
|
7827
|
+
var error31;
|
|
7414
7828
|
var init_nl = __esm({
|
|
7415
7829
|
"../../node_modules/zod/v4/locales/nl.js"() {
|
|
7416
7830
|
"use strict";
|
|
7417
7831
|
init_util();
|
|
7418
|
-
|
|
7832
|
+
error31 = () => {
|
|
7419
7833
|
const Sizable = {
|
|
7420
7834
|
string: { unit: "tekens", verb: "heeft" },
|
|
7421
7835
|
file: { unit: "bytes", verb: "heeft" },
|
|
@@ -7525,15 +7939,15 @@ var init_nl = __esm({
|
|
|
7525
7939
|
// ../../node_modules/zod/v4/locales/no.js
|
|
7526
7940
|
function no_default() {
|
|
7527
7941
|
return {
|
|
7528
|
-
localeError:
|
|
7942
|
+
localeError: error32()
|
|
7529
7943
|
};
|
|
7530
7944
|
}
|
|
7531
|
-
var
|
|
7945
|
+
var error32;
|
|
7532
7946
|
var init_no = __esm({
|
|
7533
7947
|
"../../node_modules/zod/v4/locales/no.js"() {
|
|
7534
7948
|
"use strict";
|
|
7535
7949
|
init_util();
|
|
7536
|
-
|
|
7950
|
+
error32 = () => {
|
|
7537
7951
|
const Sizable = {
|
|
7538
7952
|
string: { unit: "tegn", verb: "\xE5 ha" },
|
|
7539
7953
|
file: { unit: "bytes", verb: "\xE5 ha" },
|
|
@@ -7641,15 +8055,15 @@ var init_no = __esm({
|
|
|
7641
8055
|
// ../../node_modules/zod/v4/locales/ota.js
|
|
7642
8056
|
function ota_default() {
|
|
7643
8057
|
return {
|
|
7644
|
-
localeError:
|
|
8058
|
+
localeError: error33()
|
|
7645
8059
|
};
|
|
7646
8060
|
}
|
|
7647
|
-
var
|
|
8061
|
+
var error33;
|
|
7648
8062
|
var init_ota = __esm({
|
|
7649
8063
|
"../../node_modules/zod/v4/locales/ota.js"() {
|
|
7650
8064
|
"use strict";
|
|
7651
8065
|
init_util();
|
|
7652
|
-
|
|
8066
|
+
error33 = () => {
|
|
7653
8067
|
const Sizable = {
|
|
7654
8068
|
string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
|
|
7655
8069
|
file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
|
|
@@ -7758,15 +8172,15 @@ var init_ota = __esm({
|
|
|
7758
8172
|
// ../../node_modules/zod/v4/locales/ps.js
|
|
7759
8173
|
function ps_default() {
|
|
7760
8174
|
return {
|
|
7761
|
-
localeError:
|
|
8175
|
+
localeError: error34()
|
|
7762
8176
|
};
|
|
7763
8177
|
}
|
|
7764
|
-
var
|
|
8178
|
+
var error34;
|
|
7765
8179
|
var init_ps = __esm({
|
|
7766
8180
|
"../../node_modules/zod/v4/locales/ps.js"() {
|
|
7767
8181
|
"use strict";
|
|
7768
8182
|
init_util();
|
|
7769
|
-
|
|
8183
|
+
error34 = () => {
|
|
7770
8184
|
const Sizable = {
|
|
7771
8185
|
string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
|
|
7772
8186
|
file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
|
|
@@ -7880,15 +8294,15 @@ var init_ps = __esm({
|
|
|
7880
8294
|
// ../../node_modules/zod/v4/locales/pl.js
|
|
7881
8295
|
function pl_default() {
|
|
7882
8296
|
return {
|
|
7883
|
-
localeError:
|
|
8297
|
+
localeError: error35()
|
|
7884
8298
|
};
|
|
7885
8299
|
}
|
|
7886
|
-
var
|
|
8300
|
+
var error35;
|
|
7887
8301
|
var init_pl = __esm({
|
|
7888
8302
|
"../../node_modules/zod/v4/locales/pl.js"() {
|
|
7889
8303
|
"use strict";
|
|
7890
8304
|
init_util();
|
|
7891
|
-
|
|
8305
|
+
error35 = () => {
|
|
7892
8306
|
const Sizable = {
|
|
7893
8307
|
string: { unit: "znak\xF3w", verb: "mie\u0107" },
|
|
7894
8308
|
file: { unit: "bajt\xF3w", verb: "mie\u0107" },
|
|
@@ -7997,27 +8411,144 @@ var init_pl = __esm({
|
|
|
7997
8411
|
// ../../node_modules/zod/v4/locales/pt.js
|
|
7998
8412
|
function pt_default() {
|
|
7999
8413
|
return {
|
|
8000
|
-
localeError:
|
|
8414
|
+
localeError: error36()
|
|
8001
8415
|
};
|
|
8002
8416
|
}
|
|
8003
|
-
var
|
|
8417
|
+
var error36;
|
|
8004
8418
|
var init_pt = __esm({
|
|
8005
8419
|
"../../node_modules/zod/v4/locales/pt.js"() {
|
|
8006
8420
|
"use strict";
|
|
8007
8421
|
init_util();
|
|
8008
|
-
|
|
8422
|
+
error36 = () => {
|
|
8423
|
+
const Sizable = {
|
|
8424
|
+
string: { unit: "caracteres", verb: "ter" },
|
|
8425
|
+
file: { unit: "bytes", verb: "ter" },
|
|
8426
|
+
array: { unit: "itens", verb: "ter" },
|
|
8427
|
+
set: { unit: "itens", verb: "ter" }
|
|
8428
|
+
};
|
|
8429
|
+
function getSizing(origin) {
|
|
8430
|
+
return Sizable[origin] ?? null;
|
|
8431
|
+
}
|
|
8432
|
+
const FormatDictionary = {
|
|
8433
|
+
regex: "padr\xE3o",
|
|
8434
|
+
email: "endere\xE7o de e-mail",
|
|
8435
|
+
url: "URL",
|
|
8436
|
+
emoji: "emoji",
|
|
8437
|
+
uuid: "UUID",
|
|
8438
|
+
uuidv4: "UUIDv4",
|
|
8439
|
+
uuidv6: "UUIDv6",
|
|
8440
|
+
nanoid: "nanoid",
|
|
8441
|
+
guid: "GUID",
|
|
8442
|
+
cuid: "cuid",
|
|
8443
|
+
cuid2: "cuid2",
|
|
8444
|
+
ulid: "ULID",
|
|
8445
|
+
xid: "XID",
|
|
8446
|
+
ksuid: "KSUID",
|
|
8447
|
+
datetime: "data e hora ISO",
|
|
8448
|
+
date: "data ISO",
|
|
8449
|
+
time: "hora ISO",
|
|
8450
|
+
duration: "dura\xE7\xE3o ISO",
|
|
8451
|
+
ipv4: "endere\xE7o IPv4",
|
|
8452
|
+
ipv6: "endere\xE7o IPv6",
|
|
8453
|
+
cidrv4: "faixa de IPv4",
|
|
8454
|
+
cidrv6: "faixa de IPv6",
|
|
8455
|
+
base64: "texto codificado em base64",
|
|
8456
|
+
base64url: "URL codificada em base64",
|
|
8457
|
+
json_string: "texto JSON",
|
|
8458
|
+
e164: "n\xFAmero E.164",
|
|
8459
|
+
jwt: "JWT",
|
|
8460
|
+
template_literal: "entrada"
|
|
8461
|
+
};
|
|
8462
|
+
const TypeDictionary = {
|
|
8463
|
+
nan: "NaN",
|
|
8464
|
+
number: "n\xFAmero",
|
|
8465
|
+
null: "nulo"
|
|
8466
|
+
};
|
|
8467
|
+
return (issue2) => {
|
|
8468
|
+
switch (issue2.code) {
|
|
8469
|
+
case "invalid_type": {
|
|
8470
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
8471
|
+
const receivedType = parsedType(issue2.input);
|
|
8472
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
8473
|
+
if (/^[A-Z]/.test(issue2.expected)) {
|
|
8474
|
+
return `Tipo inv\xE1lido: esperado instanceof ${issue2.expected}, recebido ${received}`;
|
|
8475
|
+
}
|
|
8476
|
+
return `Tipo inv\xE1lido: esperado ${expected}, recebido ${received}`;
|
|
8477
|
+
}
|
|
8478
|
+
case "invalid_value":
|
|
8479
|
+
if (issue2.values.length === 1)
|
|
8480
|
+
return `Entrada inv\xE1lida: esperado ${stringifyPrimitive(issue2.values[0])}`;
|
|
8481
|
+
return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues(issue2.values, "|")}`;
|
|
8482
|
+
case "too_big": {
|
|
8483
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
8484
|
+
const sizing = getSizing(issue2.origin);
|
|
8485
|
+
if (sizing)
|
|
8486
|
+
return `Muito grande: esperado que ${issue2.origin ?? "valor"} tivesse ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`;
|
|
8487
|
+
return `Muito grande: esperado que ${issue2.origin ?? "valor"} fosse ${adj}${issue2.maximum.toString()}`;
|
|
8488
|
+
}
|
|
8489
|
+
case "too_small": {
|
|
8490
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
8491
|
+
const sizing = getSizing(issue2.origin);
|
|
8492
|
+
if (sizing) {
|
|
8493
|
+
return `Muito pequeno: esperado que ${issue2.origin} tivesse ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
8494
|
+
}
|
|
8495
|
+
return `Muito pequeno: esperado que ${issue2.origin} fosse ${adj}${issue2.minimum.toString()}`;
|
|
8496
|
+
}
|
|
8497
|
+
case "invalid_format": {
|
|
8498
|
+
const _issue = issue2;
|
|
8499
|
+
if (_issue.format === "starts_with")
|
|
8500
|
+
return `Texto inv\xE1lido: deve come\xE7ar com "${_issue.prefix}"`;
|
|
8501
|
+
if (_issue.format === "ends_with")
|
|
8502
|
+
return `Texto inv\xE1lido: deve terminar com "${_issue.suffix}"`;
|
|
8503
|
+
if (_issue.format === "includes")
|
|
8504
|
+
return `Texto inv\xE1lido: deve incluir "${_issue.includes}"`;
|
|
8505
|
+
if (_issue.format === "regex")
|
|
8506
|
+
return `Texto inv\xE1lido: deve corresponder ao padr\xE3o ${_issue.pattern}`;
|
|
8507
|
+
return `${FormatDictionary[_issue.format] ?? issue2.format} inv\xE1lido`;
|
|
8508
|
+
}
|
|
8509
|
+
case "not_multiple_of":
|
|
8510
|
+
return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue2.divisor}`;
|
|
8511
|
+
case "unrecognized_keys":
|
|
8512
|
+
return `Chave${issue2.keys.length > 1 ? "s" : ""} desconhecida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
|
|
8513
|
+
case "invalid_key":
|
|
8514
|
+
return `Chave inv\xE1lida em ${issue2.origin}`;
|
|
8515
|
+
case "invalid_union":
|
|
8516
|
+
return "Entrada inv\xE1lida";
|
|
8517
|
+
case "invalid_element":
|
|
8518
|
+
return `Valor inv\xE1lido em ${issue2.origin}`;
|
|
8519
|
+
default:
|
|
8520
|
+
return `Campo inv\xE1lido`;
|
|
8521
|
+
}
|
|
8522
|
+
};
|
|
8523
|
+
};
|
|
8524
|
+
}
|
|
8525
|
+
});
|
|
8526
|
+
|
|
8527
|
+
// ../../node_modules/zod/v4/locales/ro.js
|
|
8528
|
+
function ro_default() {
|
|
8529
|
+
return {
|
|
8530
|
+
localeError: error37()
|
|
8531
|
+
};
|
|
8532
|
+
}
|
|
8533
|
+
var error37;
|
|
8534
|
+
var init_ro = __esm({
|
|
8535
|
+
"../../node_modules/zod/v4/locales/ro.js"() {
|
|
8536
|
+
"use strict";
|
|
8537
|
+
init_util();
|
|
8538
|
+
error37 = () => {
|
|
8009
8539
|
const Sizable = {
|
|
8010
|
-
string: { unit: "
|
|
8011
|
-
file: { unit: "
|
|
8012
|
-
array: { unit: "
|
|
8013
|
-
set: { unit: "
|
|
8540
|
+
string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
|
|
8541
|
+
file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
|
|
8542
|
+
array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
8543
|
+
set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
8544
|
+
map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
|
|
8014
8545
|
};
|
|
8015
8546
|
function getSizing(origin) {
|
|
8016
8547
|
return Sizable[origin] ?? null;
|
|
8017
8548
|
}
|
|
8018
8549
|
const FormatDictionary = {
|
|
8019
|
-
regex: "
|
|
8020
|
-
email: "
|
|
8550
|
+
regex: "intrare",
|
|
8551
|
+
email: "adres\u0103 de email",
|
|
8021
8552
|
url: "URL",
|
|
8022
8553
|
emoji: "emoji",
|
|
8023
8554
|
uuid: "UUID",
|
|
@@ -8030,25 +8561,37 @@ var init_pt = __esm({
|
|
|
8030
8561
|
ulid: "ULID",
|
|
8031
8562
|
xid: "XID",
|
|
8032
8563
|
ksuid: "KSUID",
|
|
8033
|
-
datetime: "
|
|
8034
|
-
date: "
|
|
8035
|
-
time: "
|
|
8036
|
-
duration: "
|
|
8037
|
-
ipv4: "
|
|
8038
|
-
ipv6: "
|
|
8039
|
-
|
|
8040
|
-
|
|
8041
|
-
|
|
8042
|
-
|
|
8043
|
-
|
|
8044
|
-
|
|
8564
|
+
datetime: "dat\u0103 \u0219i or\u0103 ISO",
|
|
8565
|
+
date: "dat\u0103 ISO",
|
|
8566
|
+
time: "or\u0103 ISO",
|
|
8567
|
+
duration: "durat\u0103 ISO",
|
|
8568
|
+
ipv4: "adres\u0103 IPv4",
|
|
8569
|
+
ipv6: "adres\u0103 IPv6",
|
|
8570
|
+
mac: "adres\u0103 MAC",
|
|
8571
|
+
cidrv4: "interval IPv4",
|
|
8572
|
+
cidrv6: "interval IPv6",
|
|
8573
|
+
base64: "\u0219ir codat base64",
|
|
8574
|
+
base64url: "\u0219ir codat base64url",
|
|
8575
|
+
json_string: "\u0219ir JSON",
|
|
8576
|
+
e164: "num\u0103r E.164",
|
|
8045
8577
|
jwt: "JWT",
|
|
8046
|
-
template_literal: "
|
|
8578
|
+
template_literal: "intrare"
|
|
8047
8579
|
};
|
|
8048
8580
|
const TypeDictionary = {
|
|
8049
8581
|
nan: "NaN",
|
|
8050
|
-
|
|
8051
|
-
|
|
8582
|
+
string: "\u0219ir",
|
|
8583
|
+
number: "num\u0103r",
|
|
8584
|
+
boolean: "boolean",
|
|
8585
|
+
function: "func\u021Bie",
|
|
8586
|
+
array: "matrice",
|
|
8587
|
+
object: "obiect",
|
|
8588
|
+
undefined: "nedefinit",
|
|
8589
|
+
symbol: "simbol",
|
|
8590
|
+
bigint: "num\u0103r mare",
|
|
8591
|
+
void: "void",
|
|
8592
|
+
never: "never",
|
|
8593
|
+
map: "hart\u0103",
|
|
8594
|
+
set: "set"
|
|
8052
8595
|
};
|
|
8053
8596
|
return (issue2) => {
|
|
8054
8597
|
switch (issue2.code) {
|
|
@@ -8056,54 +8599,52 @@ var init_pt = __esm({
|
|
|
8056
8599
|
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
8057
8600
|
const receivedType = parsedType(issue2.input);
|
|
8058
8601
|
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
8059
|
-
|
|
8060
|
-
return `Tipo inv\xE1lido: esperado instanceof ${issue2.expected}, recebido ${received}`;
|
|
8061
|
-
}
|
|
8062
|
-
return `Tipo inv\xE1lido: esperado ${expected}, recebido ${received}`;
|
|
8602
|
+
return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
|
|
8063
8603
|
}
|
|
8064
8604
|
case "invalid_value":
|
|
8065
8605
|
if (issue2.values.length === 1)
|
|
8066
|
-
return `
|
|
8067
|
-
return `Op\
|
|
8606
|
+
return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
|
|
8607
|
+
return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
|
|
8068
8608
|
case "too_big": {
|
|
8069
8609
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
8070
8610
|
const sizing = getSizing(issue2.origin);
|
|
8071
8611
|
if (sizing)
|
|
8072
|
-
return `
|
|
8073
|
-
return `
|
|
8612
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
|
|
8613
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
|
|
8074
8614
|
}
|
|
8075
8615
|
case "too_small": {
|
|
8076
8616
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
8077
8617
|
const sizing = getSizing(issue2.origin);
|
|
8078
8618
|
if (sizing) {
|
|
8079
|
-
return `
|
|
8619
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
8080
8620
|
}
|
|
8081
|
-
return `
|
|
8621
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
|
|
8082
8622
|
}
|
|
8083
8623
|
case "invalid_format": {
|
|
8084
8624
|
const _issue = issue2;
|
|
8085
|
-
if (_issue.format === "starts_with")
|
|
8086
|
-
return
|
|
8625
|
+
if (_issue.format === "starts_with") {
|
|
8626
|
+
return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
|
|
8627
|
+
}
|
|
8087
8628
|
if (_issue.format === "ends_with")
|
|
8088
|
-
return
|
|
8629
|
+
return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
|
|
8089
8630
|
if (_issue.format === "includes")
|
|
8090
|
-
return
|
|
8631
|
+
return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
|
|
8091
8632
|
if (_issue.format === "regex")
|
|
8092
|
-
return
|
|
8093
|
-
return
|
|
8633
|
+
return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
|
|
8634
|
+
return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
8094
8635
|
}
|
|
8095
8636
|
case "not_multiple_of":
|
|
8096
|
-
return `
|
|
8637
|
+
return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
|
|
8097
8638
|
case "unrecognized_keys":
|
|
8098
|
-
return `
|
|
8639
|
+
return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
|
|
8099
8640
|
case "invalid_key":
|
|
8100
|
-
return `
|
|
8641
|
+
return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
|
|
8101
8642
|
case "invalid_union":
|
|
8102
|
-
return "
|
|
8643
|
+
return "Intrare invalid\u0103";
|
|
8103
8644
|
case "invalid_element":
|
|
8104
|
-
return `
|
|
8645
|
+
return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
|
|
8105
8646
|
default:
|
|
8106
|
-
return `
|
|
8647
|
+
return `Intrare invalid\u0103`;
|
|
8107
8648
|
}
|
|
8108
8649
|
};
|
|
8109
8650
|
};
|
|
@@ -8128,15 +8669,15 @@ function getRussianPlural(count, one, few, many) {
|
|
|
8128
8669
|
}
|
|
8129
8670
|
function ru_default() {
|
|
8130
8671
|
return {
|
|
8131
|
-
localeError:
|
|
8672
|
+
localeError: error38()
|
|
8132
8673
|
};
|
|
8133
8674
|
}
|
|
8134
|
-
var
|
|
8675
|
+
var error38;
|
|
8135
8676
|
var init_ru = __esm({
|
|
8136
8677
|
"../../node_modules/zod/v4/locales/ru.js"() {
|
|
8137
8678
|
"use strict";
|
|
8138
8679
|
init_util();
|
|
8139
|
-
|
|
8680
|
+
error38 = () => {
|
|
8140
8681
|
const Sizable = {
|
|
8141
8682
|
string: {
|
|
8142
8683
|
unit: {
|
|
@@ -8277,15 +8818,15 @@ var init_ru = __esm({
|
|
|
8277
8818
|
// ../../node_modules/zod/v4/locales/sl.js
|
|
8278
8819
|
function sl_default() {
|
|
8279
8820
|
return {
|
|
8280
|
-
localeError:
|
|
8821
|
+
localeError: error39()
|
|
8281
8822
|
};
|
|
8282
8823
|
}
|
|
8283
|
-
var
|
|
8824
|
+
var error39;
|
|
8284
8825
|
var init_sl = __esm({
|
|
8285
8826
|
"../../node_modules/zod/v4/locales/sl.js"() {
|
|
8286
8827
|
"use strict";
|
|
8287
8828
|
init_util();
|
|
8288
|
-
|
|
8829
|
+
error39 = () => {
|
|
8289
8830
|
const Sizable = {
|
|
8290
8831
|
string: { unit: "znakov", verb: "imeti" },
|
|
8291
8832
|
file: { unit: "bajtov", verb: "imeti" },
|
|
@@ -8394,15 +8935,15 @@ var init_sl = __esm({
|
|
|
8394
8935
|
// ../../node_modules/zod/v4/locales/sv.js
|
|
8395
8936
|
function sv_default() {
|
|
8396
8937
|
return {
|
|
8397
|
-
localeError:
|
|
8938
|
+
localeError: error40()
|
|
8398
8939
|
};
|
|
8399
8940
|
}
|
|
8400
|
-
var
|
|
8941
|
+
var error40;
|
|
8401
8942
|
var init_sv = __esm({
|
|
8402
8943
|
"../../node_modules/zod/v4/locales/sv.js"() {
|
|
8403
8944
|
"use strict";
|
|
8404
8945
|
init_util();
|
|
8405
|
-
|
|
8946
|
+
error40 = () => {
|
|
8406
8947
|
const Sizable = {
|
|
8407
8948
|
string: { unit: "tecken", verb: "att ha" },
|
|
8408
8949
|
file: { unit: "bytes", verb: "att ha" },
|
|
@@ -8512,15 +9053,15 @@ var init_sv = __esm({
|
|
|
8512
9053
|
// ../../node_modules/zod/v4/locales/ta.js
|
|
8513
9054
|
function ta_default() {
|
|
8514
9055
|
return {
|
|
8515
|
-
localeError:
|
|
9056
|
+
localeError: error41()
|
|
8516
9057
|
};
|
|
8517
9058
|
}
|
|
8518
|
-
var
|
|
9059
|
+
var error41;
|
|
8519
9060
|
var init_ta = __esm({
|
|
8520
9061
|
"../../node_modules/zod/v4/locales/ta.js"() {
|
|
8521
9062
|
"use strict";
|
|
8522
9063
|
init_util();
|
|
8523
|
-
|
|
9064
|
+
error41 = () => {
|
|
8524
9065
|
const Sizable = {
|
|
8525
9066
|
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" },
|
|
8526
9067
|
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" },
|
|
@@ -8630,15 +9171,15 @@ var init_ta = __esm({
|
|
|
8630
9171
|
// ../../node_modules/zod/v4/locales/th.js
|
|
8631
9172
|
function th_default() {
|
|
8632
9173
|
return {
|
|
8633
|
-
localeError:
|
|
9174
|
+
localeError: error42()
|
|
8634
9175
|
};
|
|
8635
9176
|
}
|
|
8636
|
-
var
|
|
9177
|
+
var error42;
|
|
8637
9178
|
var init_th = __esm({
|
|
8638
9179
|
"../../node_modules/zod/v4/locales/th.js"() {
|
|
8639
9180
|
"use strict";
|
|
8640
9181
|
init_util();
|
|
8641
|
-
|
|
9182
|
+
error42 = () => {
|
|
8642
9183
|
const Sizable = {
|
|
8643
9184
|
string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
8644
9185
|
file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
@@ -8748,15 +9289,15 @@ var init_th = __esm({
|
|
|
8748
9289
|
// ../../node_modules/zod/v4/locales/tr.js
|
|
8749
9290
|
function tr_default() {
|
|
8750
9291
|
return {
|
|
8751
|
-
localeError:
|
|
9292
|
+
localeError: error43()
|
|
8752
9293
|
};
|
|
8753
9294
|
}
|
|
8754
|
-
var
|
|
9295
|
+
var error43;
|
|
8755
9296
|
var init_tr = __esm({
|
|
8756
9297
|
"../../node_modules/zod/v4/locales/tr.js"() {
|
|
8757
9298
|
"use strict";
|
|
8758
9299
|
init_util();
|
|
8759
|
-
|
|
9300
|
+
error43 = () => {
|
|
8760
9301
|
const Sizable = {
|
|
8761
9302
|
string: { unit: "karakter", verb: "olmal\u0131" },
|
|
8762
9303
|
file: { unit: "bayt", verb: "olmal\u0131" },
|
|
@@ -8861,15 +9402,15 @@ var init_tr = __esm({
|
|
|
8861
9402
|
// ../../node_modules/zod/v4/locales/uk.js
|
|
8862
9403
|
function uk_default() {
|
|
8863
9404
|
return {
|
|
8864
|
-
localeError:
|
|
9405
|
+
localeError: error44()
|
|
8865
9406
|
};
|
|
8866
9407
|
}
|
|
8867
|
-
var
|
|
9408
|
+
var error44;
|
|
8868
9409
|
var init_uk = __esm({
|
|
8869
9410
|
"../../node_modules/zod/v4/locales/uk.js"() {
|
|
8870
9411
|
"use strict";
|
|
8871
9412
|
init_util();
|
|
8872
|
-
|
|
9413
|
+
error44 = () => {
|
|
8873
9414
|
const Sizable = {
|
|
8874
9415
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
8875
9416
|
file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
@@ -8988,15 +9529,15 @@ var init_ua = __esm({
|
|
|
8988
9529
|
// ../../node_modules/zod/v4/locales/ur.js
|
|
8989
9530
|
function ur_default() {
|
|
8990
9531
|
return {
|
|
8991
|
-
localeError:
|
|
9532
|
+
localeError: error45()
|
|
8992
9533
|
};
|
|
8993
9534
|
}
|
|
8994
|
-
var
|
|
9535
|
+
var error45;
|
|
8995
9536
|
var init_ur = __esm({
|
|
8996
9537
|
"../../node_modules/zod/v4/locales/ur.js"() {
|
|
8997
9538
|
"use strict";
|
|
8998
9539
|
init_util();
|
|
8999
|
-
|
|
9540
|
+
error45 = () => {
|
|
9000
9541
|
const Sizable = {
|
|
9001
9542
|
string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
|
|
9002
9543
|
file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
|
|
@@ -9106,20 +9647,21 @@ var init_ur = __esm({
|
|
|
9106
9647
|
// ../../node_modules/zod/v4/locales/uz.js
|
|
9107
9648
|
function uz_default() {
|
|
9108
9649
|
return {
|
|
9109
|
-
localeError:
|
|
9650
|
+
localeError: error46()
|
|
9110
9651
|
};
|
|
9111
9652
|
}
|
|
9112
|
-
var
|
|
9653
|
+
var error46;
|
|
9113
9654
|
var init_uz = __esm({
|
|
9114
9655
|
"../../node_modules/zod/v4/locales/uz.js"() {
|
|
9115
9656
|
"use strict";
|
|
9116
9657
|
init_util();
|
|
9117
|
-
|
|
9658
|
+
error46 = () => {
|
|
9118
9659
|
const Sizable = {
|
|
9119
9660
|
string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
|
|
9120
9661
|
file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
|
|
9121
9662
|
array: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
9122
|
-
set: { unit: "element", verb: "bo\u2018lishi kerak" }
|
|
9663
|
+
set: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
9664
|
+
map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
|
|
9123
9665
|
};
|
|
9124
9666
|
function getSizing(origin) {
|
|
9125
9667
|
return Sizable[origin] ?? null;
|
|
@@ -9223,15 +9765,15 @@ var init_uz = __esm({
|
|
|
9223
9765
|
// ../../node_modules/zod/v4/locales/vi.js
|
|
9224
9766
|
function vi_default() {
|
|
9225
9767
|
return {
|
|
9226
|
-
localeError:
|
|
9768
|
+
localeError: error47()
|
|
9227
9769
|
};
|
|
9228
9770
|
}
|
|
9229
|
-
var
|
|
9771
|
+
var error47;
|
|
9230
9772
|
var init_vi = __esm({
|
|
9231
9773
|
"../../node_modules/zod/v4/locales/vi.js"() {
|
|
9232
9774
|
"use strict";
|
|
9233
9775
|
init_util();
|
|
9234
|
-
|
|
9776
|
+
error47 = () => {
|
|
9235
9777
|
const Sizable = {
|
|
9236
9778
|
string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
|
|
9237
9779
|
file: { unit: "byte", verb: "c\xF3" },
|
|
@@ -9339,15 +9881,15 @@ var init_vi = __esm({
|
|
|
9339
9881
|
// ../../node_modules/zod/v4/locales/zh-CN.js
|
|
9340
9882
|
function zh_CN_default() {
|
|
9341
9883
|
return {
|
|
9342
|
-
localeError:
|
|
9884
|
+
localeError: error48()
|
|
9343
9885
|
};
|
|
9344
9886
|
}
|
|
9345
|
-
var
|
|
9887
|
+
var error48;
|
|
9346
9888
|
var init_zh_CN = __esm({
|
|
9347
9889
|
"../../node_modules/zod/v4/locales/zh-CN.js"() {
|
|
9348
9890
|
"use strict";
|
|
9349
9891
|
init_util();
|
|
9350
|
-
|
|
9892
|
+
error48 = () => {
|
|
9351
9893
|
const Sizable = {
|
|
9352
9894
|
string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
|
|
9353
9895
|
file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
|
|
@@ -9456,15 +9998,15 @@ var init_zh_CN = __esm({
|
|
|
9456
9998
|
// ../../node_modules/zod/v4/locales/zh-TW.js
|
|
9457
9999
|
function zh_TW_default() {
|
|
9458
10000
|
return {
|
|
9459
|
-
localeError:
|
|
10001
|
+
localeError: error49()
|
|
9460
10002
|
};
|
|
9461
10003
|
}
|
|
9462
|
-
var
|
|
10004
|
+
var error49;
|
|
9463
10005
|
var init_zh_TW = __esm({
|
|
9464
10006
|
"../../node_modules/zod/v4/locales/zh-TW.js"() {
|
|
9465
10007
|
"use strict";
|
|
9466
10008
|
init_util();
|
|
9467
|
-
|
|
10009
|
+
error49 = () => {
|
|
9468
10010
|
const Sizable = {
|
|
9469
10011
|
string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
|
|
9470
10012
|
file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
|
|
@@ -9571,15 +10113,15 @@ var init_zh_TW = __esm({
|
|
|
9571
10113
|
// ../../node_modules/zod/v4/locales/yo.js
|
|
9572
10114
|
function yo_default() {
|
|
9573
10115
|
return {
|
|
9574
|
-
localeError:
|
|
10116
|
+
localeError: error50()
|
|
9575
10117
|
};
|
|
9576
10118
|
}
|
|
9577
|
-
var
|
|
10119
|
+
var error50;
|
|
9578
10120
|
var init_yo = __esm({
|
|
9579
10121
|
"../../node_modules/zod/v4/locales/yo.js"() {
|
|
9580
10122
|
"use strict";
|
|
9581
10123
|
init_util();
|
|
9582
|
-
|
|
10124
|
+
error50 = () => {
|
|
9583
10125
|
const Sizable = {
|
|
9584
10126
|
string: { unit: "\xE0mi", verb: "n\xED" },
|
|
9585
10127
|
file: { unit: "bytes", verb: "n\xED" },
|
|
@@ -9694,6 +10236,7 @@ __export(locales_exports, {
|
|
|
9694
10236
|
cs: () => cs_default,
|
|
9695
10237
|
da: () => da_default,
|
|
9696
10238
|
de: () => de_default,
|
|
10239
|
+
el: () => el_default,
|
|
9697
10240
|
en: () => en_default,
|
|
9698
10241
|
eo: () => eo_default,
|
|
9699
10242
|
es: () => es_default,
|
|
@@ -9702,6 +10245,7 @@ __export(locales_exports, {
|
|
|
9702
10245
|
fr: () => fr_default,
|
|
9703
10246
|
frCA: () => fr_CA_default,
|
|
9704
10247
|
he: () => he_default,
|
|
10248
|
+
hr: () => hr_default,
|
|
9705
10249
|
hu: () => hu_default,
|
|
9706
10250
|
hy: () => hy_default,
|
|
9707
10251
|
id: () => id_default,
|
|
@@ -9721,6 +10265,7 @@ __export(locales_exports, {
|
|
|
9721
10265
|
pl: () => pl_default,
|
|
9722
10266
|
ps: () => ps_default,
|
|
9723
10267
|
pt: () => pt_default,
|
|
10268
|
+
ro: () => ro_default,
|
|
9724
10269
|
ru: () => ru_default,
|
|
9725
10270
|
sl: () => sl_default,
|
|
9726
10271
|
sv: () => sv_default,
|
|
@@ -9747,6 +10292,7 @@ var init_locales = __esm({
|
|
|
9747
10292
|
init_cs();
|
|
9748
10293
|
init_da();
|
|
9749
10294
|
init_de();
|
|
10295
|
+
init_el();
|
|
9750
10296
|
init_en();
|
|
9751
10297
|
init_eo();
|
|
9752
10298
|
init_es();
|
|
@@ -9755,6 +10301,7 @@ var init_locales = __esm({
|
|
|
9755
10301
|
init_fr();
|
|
9756
10302
|
init_fr_CA();
|
|
9757
10303
|
init_he();
|
|
10304
|
+
init_hr();
|
|
9758
10305
|
init_hu();
|
|
9759
10306
|
init_hy();
|
|
9760
10307
|
init_id();
|
|
@@ -9774,6 +10321,7 @@ var init_locales = __esm({
|
|
|
9774
10321
|
init_ps();
|
|
9775
10322
|
init_pl();
|
|
9776
10323
|
init_pt();
|
|
10324
|
+
init_ro();
|
|
9777
10325
|
init_ru();
|
|
9778
10326
|
init_sl();
|
|
9779
10327
|
init_sv();
|
|
@@ -9795,7 +10343,7 @@ var init_locales = __esm({
|
|
|
9795
10343
|
function registry() {
|
|
9796
10344
|
return new $ZodRegistry();
|
|
9797
10345
|
}
|
|
9798
|
-
var
|
|
10346
|
+
var _a2, $output, $input, $ZodRegistry, globalRegistry;
|
|
9799
10347
|
var init_registries = __esm({
|
|
9800
10348
|
"../../node_modules/zod/v4/core/registries.js"() {
|
|
9801
10349
|
"use strict";
|
|
@@ -9841,7 +10389,7 @@ var init_registries = __esm({
|
|
|
9841
10389
|
return this._map.has(schema);
|
|
9842
10390
|
}
|
|
9843
10391
|
};
|
|
9844
|
-
(
|
|
10392
|
+
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
9845
10393
|
globalRegistry = globalThis.__zod_globalRegistry;
|
|
9846
10394
|
}
|
|
9847
10395
|
});
|
|
@@ -10754,7 +11302,7 @@ function _refine(Class2, fn, _params) {
|
|
|
10754
11302
|
return schema;
|
|
10755
11303
|
}
|
|
10756
11304
|
// @__NO_SIDE_EFFECTS__
|
|
10757
|
-
function _superRefine(fn) {
|
|
11305
|
+
function _superRefine(fn, params) {
|
|
10758
11306
|
const ch = /* @__PURE__ */ _check((payload) => {
|
|
10759
11307
|
payload.addIssue = (issue2) => {
|
|
10760
11308
|
if (typeof issue2 === "string") {
|
|
@@ -10771,7 +11319,7 @@ function _superRefine(fn) {
|
|
|
10771
11319
|
}
|
|
10772
11320
|
};
|
|
10773
11321
|
return fn(payload.value, payload);
|
|
10774
|
-
});
|
|
11322
|
+
}, params);
|
|
10775
11323
|
return ch;
|
|
10776
11324
|
}
|
|
10777
11325
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -10918,7 +11466,7 @@ function initializeContext(params) {
|
|
|
10918
11466
|
};
|
|
10919
11467
|
}
|
|
10920
11468
|
function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
10921
|
-
var
|
|
11469
|
+
var _a3;
|
|
10922
11470
|
const def = schema._zod.def;
|
|
10923
11471
|
const seen = ctx.seen.get(schema);
|
|
10924
11472
|
if (seen) {
|
|
@@ -10965,8 +11513,8 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
|
10965
11513
|
delete result.schema.examples;
|
|
10966
11514
|
delete result.schema.default;
|
|
10967
11515
|
}
|
|
10968
|
-
if (ctx.io === "input" && result.schema
|
|
10969
|
-
(
|
|
11516
|
+
if (ctx.io === "input" && "_prefault" in result.schema)
|
|
11517
|
+
(_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
|
|
10970
11518
|
delete result.schema._prefault;
|
|
10971
11519
|
const _result = ctx.seen.get(schema);
|
|
10972
11520
|
return _result.schema;
|
|
@@ -11147,10 +11695,15 @@ function finalize(ctx, schema) {
|
|
|
11147
11695
|
result.$id = ctx.external.uri(id);
|
|
11148
11696
|
}
|
|
11149
11697
|
Object.assign(result, root.def ?? root.schema);
|
|
11698
|
+
const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
|
|
11699
|
+
if (rootMetaId !== void 0 && result.id === rootMetaId)
|
|
11700
|
+
delete result.id;
|
|
11150
11701
|
const defs = ctx.external?.defs ?? {};
|
|
11151
11702
|
for (const entry of ctx.seen.entries()) {
|
|
11152
11703
|
const seen = entry[1];
|
|
11153
11704
|
if (seen.def && seen.defId) {
|
|
11705
|
+
if (seen.def.id === seen.defId)
|
|
11706
|
+
delete seen.def.id;
|
|
11154
11707
|
defs[seen.defId] = seen.def;
|
|
11155
11708
|
}
|
|
11156
11709
|
}
|
|
@@ -11206,6 +11759,8 @@ function isTransforming(_schema, _ctx) {
|
|
|
11206
11759
|
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
|
|
11207
11760
|
}
|
|
11208
11761
|
if (def.type === "pipe") {
|
|
11762
|
+
if (_schema._zod.traits.has("$ZodCodec"))
|
|
11763
|
+
return true;
|
|
11209
11764
|
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
11210
11765
|
}
|
|
11211
11766
|
if (def.type === "object") {
|
|
@@ -11342,39 +11897,28 @@ var init_json_schema_processors = __esm({
|
|
|
11342
11897
|
json2.type = "integer";
|
|
11343
11898
|
else
|
|
11344
11899
|
json2.type = "number";
|
|
11345
|
-
|
|
11346
|
-
|
|
11900
|
+
const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
|
|
11901
|
+
const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
|
|
11902
|
+
const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
|
|
11903
|
+
if (exMin) {
|
|
11904
|
+
if (legacy) {
|
|
11347
11905
|
json2.minimum = exclusiveMinimum;
|
|
11348
11906
|
json2.exclusiveMinimum = true;
|
|
11349
11907
|
} else {
|
|
11350
11908
|
json2.exclusiveMinimum = exclusiveMinimum;
|
|
11351
11909
|
}
|
|
11352
|
-
}
|
|
11353
|
-
if (typeof minimum === "number") {
|
|
11910
|
+
} else if (typeof minimum === "number") {
|
|
11354
11911
|
json2.minimum = minimum;
|
|
11355
|
-
if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
|
|
11356
|
-
if (exclusiveMinimum >= minimum)
|
|
11357
|
-
delete json2.minimum;
|
|
11358
|
-
else
|
|
11359
|
-
delete json2.exclusiveMinimum;
|
|
11360
|
-
}
|
|
11361
11912
|
}
|
|
11362
|
-
if (
|
|
11363
|
-
if (
|
|
11913
|
+
if (exMax) {
|
|
11914
|
+
if (legacy) {
|
|
11364
11915
|
json2.maximum = exclusiveMaximum;
|
|
11365
11916
|
json2.exclusiveMaximum = true;
|
|
11366
11917
|
} else {
|
|
11367
11918
|
json2.exclusiveMaximum = exclusiveMaximum;
|
|
11368
11919
|
}
|
|
11369
|
-
}
|
|
11370
|
-
if (typeof maximum === "number") {
|
|
11920
|
+
} else if (typeof maximum === "number") {
|
|
11371
11921
|
json2.maximum = maximum;
|
|
11372
|
-
if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
|
|
11373
|
-
if (exclusiveMaximum <= maximum)
|
|
11374
|
-
delete json2.maximum;
|
|
11375
|
-
else
|
|
11376
|
-
delete json2.exclusiveMaximum;
|
|
11377
|
-
}
|
|
11378
11922
|
}
|
|
11379
11923
|
if (typeof multipleOf === "number")
|
|
11380
11924
|
json2.multipleOf = multipleOf;
|
|
@@ -11546,7 +12090,10 @@ var init_json_schema_processors = __esm({
|
|
|
11546
12090
|
if (typeof maximum === "number")
|
|
11547
12091
|
json2.maxItems = maximum;
|
|
11548
12092
|
json2.type = "array";
|
|
11549
|
-
json2.items = process2(def.element, ctx, {
|
|
12093
|
+
json2.items = process2(def.element, ctx, {
|
|
12094
|
+
...params,
|
|
12095
|
+
path: [...params.path, "items"]
|
|
12096
|
+
});
|
|
11550
12097
|
};
|
|
11551
12098
|
objectProcessor = (schema, ctx, _json, params) => {
|
|
11552
12099
|
const json2 = _json;
|
|
@@ -11739,7 +12286,8 @@ var init_json_schema_processors = __esm({
|
|
|
11739
12286
|
};
|
|
11740
12287
|
pipeProcessor = (schema, ctx, _json, params) => {
|
|
11741
12288
|
const def = schema._zod.def;
|
|
11742
|
-
const
|
|
12289
|
+
const inIsTransform = def.in._zod.traits.has("$ZodTransform");
|
|
12290
|
+
const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
|
|
11743
12291
|
process2(innerType, ctx, params);
|
|
11744
12292
|
const seen = ctx.seen.get(schema);
|
|
11745
12293
|
seen.ref = innerType;
|
|
@@ -11984,6 +12532,7 @@ __export(core_exports2, {
|
|
|
11984
12532
|
$ZodOptional: () => $ZodOptional,
|
|
11985
12533
|
$ZodPipe: () => $ZodPipe,
|
|
11986
12534
|
$ZodPrefault: () => $ZodPrefault,
|
|
12535
|
+
$ZodPreprocess: () => $ZodPreprocess,
|
|
11987
12536
|
$ZodPromise: () => $ZodPromise,
|
|
11988
12537
|
$ZodReadonly: () => $ZodReadonly,
|
|
11989
12538
|
$ZodRealError: () => $ZodRealError,
|
|
@@ -12334,8 +12883,8 @@ var init_errors2 = __esm({
|
|
|
12334
12883
|
}
|
|
12335
12884
|
});
|
|
12336
12885
|
};
|
|
12337
|
-
ZodError = $constructor("ZodError", initializer2);
|
|
12338
|
-
ZodRealError = $constructor("ZodError", initializer2, {
|
|
12886
|
+
ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
|
|
12887
|
+
ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
|
|
12339
12888
|
Parent: Error
|
|
12340
12889
|
});
|
|
12341
12890
|
}
|
|
@@ -12413,6 +12962,7 @@ __export(schemas_exports2, {
|
|
|
12413
12962
|
ZodOptional: () => ZodOptional,
|
|
12414
12963
|
ZodPipe: () => ZodPipe,
|
|
12415
12964
|
ZodPrefault: () => ZodPrefault,
|
|
12965
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
12416
12966
|
ZodPromise: () => ZodPromise,
|
|
12417
12967
|
ZodReadonly: () => ZodReadonly,
|
|
12418
12968
|
ZodRecord: () => ZodRecord,
|
|
@@ -12473,6 +13023,7 @@ __export(schemas_exports2, {
|
|
|
12473
13023
|
int32: () => int32,
|
|
12474
13024
|
int64: () => int64,
|
|
12475
13025
|
intersection: () => intersection,
|
|
13026
|
+
invertCodec: () => invertCodec,
|
|
12476
13027
|
ipv4: () => ipv42,
|
|
12477
13028
|
ipv6: () => ipv62,
|
|
12478
13029
|
json: () => json,
|
|
@@ -12531,6 +13082,42 @@ __export(schemas_exports2, {
|
|
|
12531
13082
|
xid: () => xid2,
|
|
12532
13083
|
xor: () => xor
|
|
12533
13084
|
});
|
|
13085
|
+
function _installLazyMethods(inst, group, methods) {
|
|
13086
|
+
const proto = Object.getPrototypeOf(inst);
|
|
13087
|
+
let installed = _installedGroups.get(proto);
|
|
13088
|
+
if (!installed) {
|
|
13089
|
+
installed = /* @__PURE__ */ new Set();
|
|
13090
|
+
_installedGroups.set(proto, installed);
|
|
13091
|
+
}
|
|
13092
|
+
if (installed.has(group))
|
|
13093
|
+
return;
|
|
13094
|
+
installed.add(group);
|
|
13095
|
+
for (const key in methods) {
|
|
13096
|
+
const fn = methods[key];
|
|
13097
|
+
Object.defineProperty(proto, key, {
|
|
13098
|
+
configurable: true,
|
|
13099
|
+
enumerable: false,
|
|
13100
|
+
get() {
|
|
13101
|
+
const bound = fn.bind(this);
|
|
13102
|
+
Object.defineProperty(this, key, {
|
|
13103
|
+
configurable: true,
|
|
13104
|
+
writable: true,
|
|
13105
|
+
enumerable: true,
|
|
13106
|
+
value: bound
|
|
13107
|
+
});
|
|
13108
|
+
return bound;
|
|
13109
|
+
},
|
|
13110
|
+
set(v) {
|
|
13111
|
+
Object.defineProperty(this, key, {
|
|
13112
|
+
configurable: true,
|
|
13113
|
+
writable: true,
|
|
13114
|
+
enumerable: true,
|
|
13115
|
+
value: v
|
|
13116
|
+
});
|
|
13117
|
+
}
|
|
13118
|
+
});
|
|
13119
|
+
}
|
|
13120
|
+
}
|
|
12534
13121
|
function string2(params) {
|
|
12535
13122
|
return _string(ZodString, params);
|
|
12536
13123
|
}
|
|
@@ -12557,7 +13144,7 @@ function url(params) {
|
|
|
12557
13144
|
}
|
|
12558
13145
|
function httpUrl(params) {
|
|
12559
13146
|
return _url(ZodURL, {
|
|
12560
|
-
protocol:
|
|
13147
|
+
protocol: regexes_exports.httpProtocol,
|
|
12561
13148
|
hostname: regexes_exports.domain,
|
|
12562
13149
|
...util_exports.normalizeParams(params)
|
|
12563
13150
|
});
|
|
@@ -12754,6 +13341,14 @@ function tuple(items, _paramsOrRest, _params) {
|
|
|
12754
13341
|
});
|
|
12755
13342
|
}
|
|
12756
13343
|
function record(keyType, valueType, params) {
|
|
13344
|
+
if (!valueType || !valueType._zod) {
|
|
13345
|
+
return new ZodRecord({
|
|
13346
|
+
type: "record",
|
|
13347
|
+
keyType: string2(),
|
|
13348
|
+
valueType: keyType,
|
|
13349
|
+
...util_exports.normalizeParams(valueType)
|
|
13350
|
+
});
|
|
13351
|
+
}
|
|
12757
13352
|
return new ZodRecord({
|
|
12758
13353
|
type: "record",
|
|
12759
13354
|
keyType,
|
|
@@ -12905,6 +13500,16 @@ function codec(in_, out, params) {
|
|
|
12905
13500
|
reverseTransform: params.encode
|
|
12906
13501
|
});
|
|
12907
13502
|
}
|
|
13503
|
+
function invertCodec(codec2) {
|
|
13504
|
+
const def = codec2._zod.def;
|
|
13505
|
+
return new ZodCodec({
|
|
13506
|
+
type: "pipe",
|
|
13507
|
+
in: def.out,
|
|
13508
|
+
out: def.in,
|
|
13509
|
+
transform: def.reverseTransform,
|
|
13510
|
+
reverseTransform: def.transform
|
|
13511
|
+
});
|
|
13512
|
+
}
|
|
12908
13513
|
function readonly(innerType) {
|
|
12909
13514
|
return new ZodReadonly({
|
|
12910
13515
|
type: "readonly",
|
|
@@ -12951,8 +13556,8 @@ function custom(fn, _params) {
|
|
|
12951
13556
|
function refine(fn, _params = {}) {
|
|
12952
13557
|
return _refine(ZodCustom, fn, _params);
|
|
12953
13558
|
}
|
|
12954
|
-
function superRefine(fn) {
|
|
12955
|
-
return _superRefine(fn);
|
|
13559
|
+
function superRefine(fn, params) {
|
|
13560
|
+
return _superRefine(fn, params);
|
|
12956
13561
|
}
|
|
12957
13562
|
function _instanceof(cls, params = {}) {
|
|
12958
13563
|
const inst = new ZodCustom({
|
|
@@ -12983,9 +13588,13 @@ function json(params) {
|
|
|
12983
13588
|
return jsonSchema;
|
|
12984
13589
|
}
|
|
12985
13590
|
function preprocess(fn, schema) {
|
|
12986
|
-
return
|
|
13591
|
+
return new ZodPreprocess({
|
|
13592
|
+
type: "pipe",
|
|
13593
|
+
in: transform(fn),
|
|
13594
|
+
out: schema
|
|
13595
|
+
});
|
|
12987
13596
|
}
|
|
12988
|
-
var ZodType, _ZodString, ZodString, ZodStringFormat, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodMAC, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodCustomStringFormat, ZodNumber, ZodNumberFormat, ZodBoolean, ZodBigInt, ZodBigIntFormat, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodDate, ZodArray, ZodObject, ZodUnion, ZodXor, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodEnum, ZodLiteral, ZodFile, ZodTransform, ZodOptional, ZodExactOptional, ZodNullable, ZodDefault, ZodPrefault, ZodNonOptional, ZodSuccess, ZodCatch, ZodNaN, ZodPipe, ZodCodec, ZodReadonly, ZodTemplateLiteral, ZodLazy, ZodPromise, ZodFunction, ZodCustom, describe2, meta2, stringbool;
|
|
13597
|
+
var _installedGroups, ZodType, _ZodString, ZodString, ZodStringFormat, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodMAC, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodCustomStringFormat, ZodNumber, ZodNumberFormat, ZodBoolean, ZodBigInt, ZodBigIntFormat, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodDate, ZodArray, ZodObject, ZodUnion, ZodXor, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodEnum, ZodLiteral, ZodFile, ZodTransform, ZodOptional, ZodExactOptional, ZodNullable, ZodDefault, ZodPrefault, ZodNonOptional, ZodSuccess, ZodCatch, ZodNaN, ZodPipe, ZodCodec, ZodPreprocess, ZodReadonly, ZodTemplateLiteral, ZodLazy, ZodPromise, ZodFunction, ZodCustom, describe2, meta2, stringbool;
|
|
12989
13598
|
var init_schemas2 = __esm({
|
|
12990
13599
|
"../../node_modules/zod/v4/classic/schemas.js"() {
|
|
12991
13600
|
"use strict";
|
|
@@ -12996,6 +13605,7 @@ var init_schemas2 = __esm({
|
|
|
12996
13605
|
init_checks2();
|
|
12997
13606
|
init_iso();
|
|
12998
13607
|
init_parse2();
|
|
13608
|
+
_installedGroups = /* @__PURE__ */ new WeakMap();
|
|
12999
13609
|
ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
13000
13610
|
$ZodType.init(inst, def);
|
|
13001
13611
|
Object.assign(inst["~standard"], {
|
|
@@ -13008,23 +13618,6 @@ var init_schemas2 = __esm({
|
|
|
13008
13618
|
inst.def = def;
|
|
13009
13619
|
inst.type = def.type;
|
|
13010
13620
|
Object.defineProperty(inst, "_def", { value: def });
|
|
13011
|
-
inst.check = (...checks) => {
|
|
13012
|
-
return inst.clone(util_exports.mergeDefs(def, {
|
|
13013
|
-
checks: [
|
|
13014
|
-
...def.checks ?? [],
|
|
13015
|
-
...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
13016
|
-
]
|
|
13017
|
-
}), {
|
|
13018
|
-
parent: true
|
|
13019
|
-
});
|
|
13020
|
-
};
|
|
13021
|
-
inst.with = inst.check;
|
|
13022
|
-
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
13023
|
-
inst.brand = () => inst;
|
|
13024
|
-
inst.register = ((reg, meta3) => {
|
|
13025
|
-
reg.add(inst, meta3);
|
|
13026
|
-
return inst;
|
|
13027
|
-
});
|
|
13028
13621
|
inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
|
|
13029
13622
|
inst.safeParse = (data, params) => safeParse2(inst, data, params);
|
|
13030
13623
|
inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
|
|
@@ -13038,45 +13631,108 @@ var init_schemas2 = __esm({
|
|
|
13038
13631
|
inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
|
|
13039
13632
|
inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
|
|
13040
13633
|
inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
|
|
13041
|
-
inst
|
|
13042
|
-
|
|
13043
|
-
|
|
13044
|
-
|
|
13045
|
-
|
|
13046
|
-
|
|
13047
|
-
|
|
13048
|
-
|
|
13049
|
-
|
|
13050
|
-
|
|
13051
|
-
|
|
13052
|
-
|
|
13053
|
-
|
|
13054
|
-
|
|
13055
|
-
|
|
13056
|
-
|
|
13057
|
-
|
|
13058
|
-
|
|
13059
|
-
|
|
13060
|
-
|
|
13061
|
-
|
|
13062
|
-
|
|
13634
|
+
_installLazyMethods(inst, "ZodType", {
|
|
13635
|
+
check(...chks) {
|
|
13636
|
+
const def2 = this.def;
|
|
13637
|
+
return this.clone(util_exports.mergeDefs(def2, {
|
|
13638
|
+
checks: [
|
|
13639
|
+
...def2.checks ?? [],
|
|
13640
|
+
...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
13641
|
+
]
|
|
13642
|
+
}), { parent: true });
|
|
13643
|
+
},
|
|
13644
|
+
with(...chks) {
|
|
13645
|
+
return this.check(...chks);
|
|
13646
|
+
},
|
|
13647
|
+
clone(def2, params) {
|
|
13648
|
+
return clone(this, def2, params);
|
|
13649
|
+
},
|
|
13650
|
+
brand() {
|
|
13651
|
+
return this;
|
|
13652
|
+
},
|
|
13653
|
+
register(reg, meta3) {
|
|
13654
|
+
reg.add(this, meta3);
|
|
13655
|
+
return this;
|
|
13656
|
+
},
|
|
13657
|
+
refine(check2, params) {
|
|
13658
|
+
return this.check(refine(check2, params));
|
|
13659
|
+
},
|
|
13660
|
+
superRefine(refinement, params) {
|
|
13661
|
+
return this.check(superRefine(refinement, params));
|
|
13662
|
+
},
|
|
13663
|
+
overwrite(fn) {
|
|
13664
|
+
return this.check(_overwrite(fn));
|
|
13665
|
+
},
|
|
13666
|
+
optional() {
|
|
13667
|
+
return optional(this);
|
|
13668
|
+
},
|
|
13669
|
+
exactOptional() {
|
|
13670
|
+
return exactOptional(this);
|
|
13671
|
+
},
|
|
13672
|
+
nullable() {
|
|
13673
|
+
return nullable(this);
|
|
13674
|
+
},
|
|
13675
|
+
nullish() {
|
|
13676
|
+
return optional(nullable(this));
|
|
13677
|
+
},
|
|
13678
|
+
nonoptional(params) {
|
|
13679
|
+
return nonoptional(this, params);
|
|
13680
|
+
},
|
|
13681
|
+
array() {
|
|
13682
|
+
return array(this);
|
|
13683
|
+
},
|
|
13684
|
+
or(arg) {
|
|
13685
|
+
return union([this, arg]);
|
|
13686
|
+
},
|
|
13687
|
+
and(arg) {
|
|
13688
|
+
return intersection(this, arg);
|
|
13689
|
+
},
|
|
13690
|
+
transform(tx) {
|
|
13691
|
+
return pipe(this, transform(tx));
|
|
13692
|
+
},
|
|
13693
|
+
default(d) {
|
|
13694
|
+
return _default2(this, d);
|
|
13695
|
+
},
|
|
13696
|
+
prefault(d) {
|
|
13697
|
+
return prefault(this, d);
|
|
13698
|
+
},
|
|
13699
|
+
catch(params) {
|
|
13700
|
+
return _catch2(this, params);
|
|
13701
|
+
},
|
|
13702
|
+
pipe(target) {
|
|
13703
|
+
return pipe(this, target);
|
|
13704
|
+
},
|
|
13705
|
+
readonly() {
|
|
13706
|
+
return readonly(this);
|
|
13707
|
+
},
|
|
13708
|
+
describe(description) {
|
|
13709
|
+
const cl = this.clone();
|
|
13710
|
+
globalRegistry.add(cl, { description });
|
|
13711
|
+
return cl;
|
|
13712
|
+
},
|
|
13713
|
+
meta(...args) {
|
|
13714
|
+
if (args.length === 0)
|
|
13715
|
+
return globalRegistry.get(this);
|
|
13716
|
+
const cl = this.clone();
|
|
13717
|
+
globalRegistry.add(cl, args[0]);
|
|
13718
|
+
return cl;
|
|
13719
|
+
},
|
|
13720
|
+
isOptional() {
|
|
13721
|
+
return this.safeParse(void 0).success;
|
|
13722
|
+
},
|
|
13723
|
+
isNullable() {
|
|
13724
|
+
return this.safeParse(null).success;
|
|
13725
|
+
},
|
|
13726
|
+
apply(fn) {
|
|
13727
|
+
return fn(this);
|
|
13728
|
+
}
|
|
13729
|
+
});
|
|
13063
13730
|
Object.defineProperty(inst, "description", {
|
|
13064
13731
|
get() {
|
|
13065
13732
|
return globalRegistry.get(inst)?.description;
|
|
13066
13733
|
},
|
|
13067
13734
|
configurable: true
|
|
13068
13735
|
});
|
|
13069
|
-
inst.meta = (...args) => {
|
|
13070
|
-
if (args.length === 0) {
|
|
13071
|
-
return globalRegistry.get(inst);
|
|
13072
|
-
}
|
|
13073
|
-
const cl = inst.clone();
|
|
13074
|
-
globalRegistry.add(cl, args[0]);
|
|
13075
|
-
return cl;
|
|
13076
|
-
};
|
|
13077
|
-
inst.isOptional = () => inst.safeParse(void 0).success;
|
|
13078
|
-
inst.isNullable = () => inst.safeParse(null).success;
|
|
13079
|
-
inst.apply = (fn) => fn(inst);
|
|
13080
13736
|
return inst;
|
|
13081
13737
|
});
|
|
13082
13738
|
_ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
@@ -13087,21 +13743,53 @@ var init_schemas2 = __esm({
|
|
|
13087
13743
|
inst.format = bag.format ?? null;
|
|
13088
13744
|
inst.minLength = bag.minimum ?? null;
|
|
13089
13745
|
inst.maxLength = bag.maximum ?? null;
|
|
13090
|
-
inst
|
|
13091
|
-
|
|
13092
|
-
|
|
13093
|
-
|
|
13094
|
-
|
|
13095
|
-
|
|
13096
|
-
|
|
13097
|
-
|
|
13098
|
-
|
|
13099
|
-
|
|
13100
|
-
|
|
13101
|
-
|
|
13102
|
-
|
|
13103
|
-
|
|
13104
|
-
|
|
13746
|
+
_installLazyMethods(inst, "_ZodString", {
|
|
13747
|
+
regex(...args) {
|
|
13748
|
+
return this.check(_regex(...args));
|
|
13749
|
+
},
|
|
13750
|
+
includes(...args) {
|
|
13751
|
+
return this.check(_includes(...args));
|
|
13752
|
+
},
|
|
13753
|
+
startsWith(...args) {
|
|
13754
|
+
return this.check(_startsWith(...args));
|
|
13755
|
+
},
|
|
13756
|
+
endsWith(...args) {
|
|
13757
|
+
return this.check(_endsWith(...args));
|
|
13758
|
+
},
|
|
13759
|
+
min(...args) {
|
|
13760
|
+
return this.check(_minLength(...args));
|
|
13761
|
+
},
|
|
13762
|
+
max(...args) {
|
|
13763
|
+
return this.check(_maxLength(...args));
|
|
13764
|
+
},
|
|
13765
|
+
length(...args) {
|
|
13766
|
+
return this.check(_length(...args));
|
|
13767
|
+
},
|
|
13768
|
+
nonempty(...args) {
|
|
13769
|
+
return this.check(_minLength(1, ...args));
|
|
13770
|
+
},
|
|
13771
|
+
lowercase(params) {
|
|
13772
|
+
return this.check(_lowercase(params));
|
|
13773
|
+
},
|
|
13774
|
+
uppercase(params) {
|
|
13775
|
+
return this.check(_uppercase(params));
|
|
13776
|
+
},
|
|
13777
|
+
trim() {
|
|
13778
|
+
return this.check(_trim());
|
|
13779
|
+
},
|
|
13780
|
+
normalize(...args) {
|
|
13781
|
+
return this.check(_normalize(...args));
|
|
13782
|
+
},
|
|
13783
|
+
toLowerCase() {
|
|
13784
|
+
return this.check(_toLowerCase());
|
|
13785
|
+
},
|
|
13786
|
+
toUpperCase() {
|
|
13787
|
+
return this.check(_toUpperCase());
|
|
13788
|
+
},
|
|
13789
|
+
slugify() {
|
|
13790
|
+
return this.check(_slugify());
|
|
13791
|
+
}
|
|
13792
|
+
});
|
|
13105
13793
|
});
|
|
13106
13794
|
ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
13107
13795
|
$ZodString.init(inst, def);
|
|
@@ -13226,21 +13914,53 @@ var init_schemas2 = __esm({
|
|
|
13226
13914
|
$ZodNumber.init(inst, def);
|
|
13227
13915
|
ZodType.init(inst, def);
|
|
13228
13916
|
inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
|
|
13229
|
-
inst
|
|
13230
|
-
|
|
13231
|
-
|
|
13232
|
-
|
|
13233
|
-
|
|
13234
|
-
|
|
13235
|
-
|
|
13236
|
-
|
|
13237
|
-
|
|
13238
|
-
|
|
13239
|
-
|
|
13240
|
-
|
|
13241
|
-
|
|
13242
|
-
|
|
13243
|
-
|
|
13917
|
+
_installLazyMethods(inst, "ZodNumber", {
|
|
13918
|
+
gt(value, params) {
|
|
13919
|
+
return this.check(_gt(value, params));
|
|
13920
|
+
},
|
|
13921
|
+
gte(value, params) {
|
|
13922
|
+
return this.check(_gte(value, params));
|
|
13923
|
+
},
|
|
13924
|
+
min(value, params) {
|
|
13925
|
+
return this.check(_gte(value, params));
|
|
13926
|
+
},
|
|
13927
|
+
lt(value, params) {
|
|
13928
|
+
return this.check(_lt(value, params));
|
|
13929
|
+
},
|
|
13930
|
+
lte(value, params) {
|
|
13931
|
+
return this.check(_lte(value, params));
|
|
13932
|
+
},
|
|
13933
|
+
max(value, params) {
|
|
13934
|
+
return this.check(_lte(value, params));
|
|
13935
|
+
},
|
|
13936
|
+
int(params) {
|
|
13937
|
+
return this.check(int(params));
|
|
13938
|
+
},
|
|
13939
|
+
safe(params) {
|
|
13940
|
+
return this.check(int(params));
|
|
13941
|
+
},
|
|
13942
|
+
positive(params) {
|
|
13943
|
+
return this.check(_gt(0, params));
|
|
13944
|
+
},
|
|
13945
|
+
nonnegative(params) {
|
|
13946
|
+
return this.check(_gte(0, params));
|
|
13947
|
+
},
|
|
13948
|
+
negative(params) {
|
|
13949
|
+
return this.check(_lt(0, params));
|
|
13950
|
+
},
|
|
13951
|
+
nonpositive(params) {
|
|
13952
|
+
return this.check(_lte(0, params));
|
|
13953
|
+
},
|
|
13954
|
+
multipleOf(value, params) {
|
|
13955
|
+
return this.check(_multipleOf(value, params));
|
|
13956
|
+
},
|
|
13957
|
+
step(value, params) {
|
|
13958
|
+
return this.check(_multipleOf(value, params));
|
|
13959
|
+
},
|
|
13960
|
+
finite() {
|
|
13961
|
+
return this;
|
|
13962
|
+
}
|
|
13963
|
+
});
|
|
13244
13964
|
const bag = inst._zod.bag;
|
|
13245
13965
|
inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
13246
13966
|
inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
|
|
@@ -13333,11 +14053,23 @@ var init_schemas2 = __esm({
|
|
|
13333
14053
|
ZodType.init(inst, def);
|
|
13334
14054
|
inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
|
|
13335
14055
|
inst.element = def.element;
|
|
13336
|
-
inst
|
|
13337
|
-
|
|
13338
|
-
|
|
13339
|
-
|
|
13340
|
-
|
|
14056
|
+
_installLazyMethods(inst, "ZodArray", {
|
|
14057
|
+
min(n, params) {
|
|
14058
|
+
return this.check(_minLength(n, params));
|
|
14059
|
+
},
|
|
14060
|
+
nonempty(params) {
|
|
14061
|
+
return this.check(_minLength(1, params));
|
|
14062
|
+
},
|
|
14063
|
+
max(n, params) {
|
|
14064
|
+
return this.check(_maxLength(n, params));
|
|
14065
|
+
},
|
|
14066
|
+
length(n, params) {
|
|
14067
|
+
return this.check(_length(n, params));
|
|
14068
|
+
},
|
|
14069
|
+
unwrap() {
|
|
14070
|
+
return this.element;
|
|
14071
|
+
}
|
|
14072
|
+
});
|
|
13341
14073
|
});
|
|
13342
14074
|
ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
13343
14075
|
$ZodObjectJIT.init(inst, def);
|
|
@@ -13346,23 +14078,47 @@ var init_schemas2 = __esm({
|
|
|
13346
14078
|
util_exports.defineLazy(inst, "shape", () => {
|
|
13347
14079
|
return def.shape;
|
|
13348
14080
|
});
|
|
13349
|
-
inst
|
|
13350
|
-
|
|
13351
|
-
|
|
13352
|
-
|
|
13353
|
-
|
|
13354
|
-
|
|
13355
|
-
|
|
13356
|
-
|
|
13357
|
-
|
|
13358
|
-
|
|
13359
|
-
|
|
13360
|
-
|
|
13361
|
-
|
|
13362
|
-
|
|
13363
|
-
|
|
13364
|
-
|
|
13365
|
-
|
|
14081
|
+
_installLazyMethods(inst, "ZodObject", {
|
|
14082
|
+
keyof() {
|
|
14083
|
+
return _enum2(Object.keys(this._zod.def.shape));
|
|
14084
|
+
},
|
|
14085
|
+
catchall(catchall) {
|
|
14086
|
+
return this.clone({ ...this._zod.def, catchall });
|
|
14087
|
+
},
|
|
14088
|
+
passthrough() {
|
|
14089
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
14090
|
+
},
|
|
14091
|
+
loose() {
|
|
14092
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
14093
|
+
},
|
|
14094
|
+
strict() {
|
|
14095
|
+
return this.clone({ ...this._zod.def, catchall: never() });
|
|
14096
|
+
},
|
|
14097
|
+
strip() {
|
|
14098
|
+
return this.clone({ ...this._zod.def, catchall: void 0 });
|
|
14099
|
+
},
|
|
14100
|
+
extend(incoming) {
|
|
14101
|
+
return util_exports.extend(this, incoming);
|
|
14102
|
+
},
|
|
14103
|
+
safeExtend(incoming) {
|
|
14104
|
+
return util_exports.safeExtend(this, incoming);
|
|
14105
|
+
},
|
|
14106
|
+
merge(other) {
|
|
14107
|
+
return util_exports.merge(this, other);
|
|
14108
|
+
},
|
|
14109
|
+
pick(mask) {
|
|
14110
|
+
return util_exports.pick(this, mask);
|
|
14111
|
+
},
|
|
14112
|
+
omit(mask) {
|
|
14113
|
+
return util_exports.omit(this, mask);
|
|
14114
|
+
},
|
|
14115
|
+
partial(...args) {
|
|
14116
|
+
return util_exports.partial(ZodOptional, this, args[0]);
|
|
14117
|
+
},
|
|
14118
|
+
required(...args) {
|
|
14119
|
+
return util_exports.required(ZodNonOptional, this, args[0]);
|
|
14120
|
+
}
|
|
14121
|
+
});
|
|
13366
14122
|
});
|
|
13367
14123
|
ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
|
|
13368
14124
|
$ZodUnion.init(inst, def);
|
|
@@ -13506,10 +14262,12 @@ var init_schemas2 = __esm({
|
|
|
13506
14262
|
if (output instanceof Promise) {
|
|
13507
14263
|
return output.then((output2) => {
|
|
13508
14264
|
payload.value = output2;
|
|
14265
|
+
payload.fallback = true;
|
|
13509
14266
|
return payload;
|
|
13510
14267
|
});
|
|
13511
14268
|
}
|
|
13512
14269
|
payload.value = output;
|
|
14270
|
+
payload.fallback = true;
|
|
13513
14271
|
return payload;
|
|
13514
14272
|
};
|
|
13515
14273
|
});
|
|
@@ -13579,6 +14337,10 @@ var init_schemas2 = __esm({
|
|
|
13579
14337
|
ZodPipe.init(inst, def);
|
|
13580
14338
|
$ZodCodec.init(inst, def);
|
|
13581
14339
|
});
|
|
14340
|
+
ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
|
|
14341
|
+
ZodPipe.init(inst, def);
|
|
14342
|
+
$ZodPreprocess.init(inst, def);
|
|
14343
|
+
});
|
|
13582
14344
|
ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
13583
14345
|
$ZodReadonly.init(inst, def);
|
|
13584
14346
|
ZodType.init(inst, def);
|
|
@@ -13636,7 +14398,6 @@ var init_compat = __esm({
|
|
|
13636
14398
|
"../../node_modules/zod/v4/classic/compat.js"() {
|
|
13637
14399
|
"use strict";
|
|
13638
14400
|
init_core2();
|
|
13639
|
-
init_core2();
|
|
13640
14401
|
ZodIssueCode = {
|
|
13641
14402
|
invalid_type: "invalid_type",
|
|
13642
14403
|
too_big: "too_big",
|
|
@@ -13971,12 +14732,6 @@ function convertBaseSchema(schema, ctx) {
|
|
|
13971
14732
|
default:
|
|
13972
14733
|
throw new Error(`Unsupported type: ${type}`);
|
|
13973
14734
|
}
|
|
13974
|
-
if (schema.description) {
|
|
13975
|
-
zodSchema = zodSchema.describe(schema.description);
|
|
13976
|
-
}
|
|
13977
|
-
if (schema.default !== void 0) {
|
|
13978
|
-
zodSchema = zodSchema.default(schema.default);
|
|
13979
|
-
}
|
|
13980
14735
|
return zodSchema;
|
|
13981
14736
|
}
|
|
13982
14737
|
function convertSchema(schema, ctx) {
|
|
@@ -14013,6 +14768,9 @@ function convertSchema(schema, ctx) {
|
|
|
14013
14768
|
if (schema.readOnly === true) {
|
|
14014
14769
|
baseSchema = z.readonly(baseSchema);
|
|
14015
14770
|
}
|
|
14771
|
+
if (schema.default !== void 0) {
|
|
14772
|
+
baseSchema = baseSchema.default(schema.default);
|
|
14773
|
+
}
|
|
14016
14774
|
const extraMeta = {};
|
|
14017
14775
|
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
14018
14776
|
for (const key of coreMetadataKeys) {
|
|
@@ -14034,23 +14792,32 @@ function convertSchema(schema, ctx) {
|
|
|
14034
14792
|
if (Object.keys(extraMeta).length > 0) {
|
|
14035
14793
|
ctx.registry.add(baseSchema, extraMeta);
|
|
14036
14794
|
}
|
|
14795
|
+
if (schema.description) {
|
|
14796
|
+
baseSchema = baseSchema.describe(schema.description);
|
|
14797
|
+
}
|
|
14037
14798
|
return baseSchema;
|
|
14038
14799
|
}
|
|
14039
14800
|
function fromJSONSchema(schema, params) {
|
|
14040
14801
|
if (typeof schema === "boolean") {
|
|
14041
14802
|
return schema ? z.any() : z.never();
|
|
14042
14803
|
}
|
|
14043
|
-
|
|
14044
|
-
|
|
14804
|
+
let normalized;
|
|
14805
|
+
try {
|
|
14806
|
+
normalized = JSON.parse(JSON.stringify(schema));
|
|
14807
|
+
} catch {
|
|
14808
|
+
throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
|
|
14809
|
+
}
|
|
14810
|
+
const version2 = detectVersion(normalized, params?.defaultTarget);
|
|
14811
|
+
const defs = normalized.$defs || normalized.definitions || {};
|
|
14045
14812
|
const ctx = {
|
|
14046
14813
|
version: version2,
|
|
14047
14814
|
defs,
|
|
14048
14815
|
refs: /* @__PURE__ */ new Map(),
|
|
14049
14816
|
processing: /* @__PURE__ */ new Set(),
|
|
14050
|
-
rootSchema:
|
|
14817
|
+
rootSchema: normalized,
|
|
14051
14818
|
registry: params?.registry ?? globalRegistry
|
|
14052
14819
|
};
|
|
14053
|
-
return convertSchema(
|
|
14820
|
+
return convertSchema(normalized, ctx);
|
|
14054
14821
|
}
|
|
14055
14822
|
var z, RECOGNIZED_KEYS;
|
|
14056
14823
|
var init_from_json_schema = __esm({
|
|
@@ -14233,6 +15000,7 @@ __export(external_exports, {
|
|
|
14233
15000
|
ZodOptional: () => ZodOptional,
|
|
14234
15001
|
ZodPipe: () => ZodPipe,
|
|
14235
15002
|
ZodPrefault: () => ZodPrefault,
|
|
15003
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
14236
15004
|
ZodPromise: () => ZodPromise,
|
|
14237
15005
|
ZodReadonly: () => ZodReadonly,
|
|
14238
15006
|
ZodRealError: () => ZodRealError,
|
|
@@ -14311,6 +15079,7 @@ __export(external_exports, {
|
|
|
14311
15079
|
int32: () => int32,
|
|
14312
15080
|
int64: () => int64,
|
|
14313
15081
|
intersection: () => intersection,
|
|
15082
|
+
invertCodec: () => invertCodec,
|
|
14314
15083
|
ipv4: () => ipv42,
|
|
14315
15084
|
ipv6: () => ipv62,
|
|
14316
15085
|
iso: () => iso_exports,
|
|
@@ -15169,8 +15938,8 @@ async function findGitRoot(startDir) {
|
|
|
15169
15938
|
function isCliAvailable(binary) {
|
|
15170
15939
|
return new Promise((resolve2) => {
|
|
15171
15940
|
const command = process.platform === "win32" ? "where" : "which";
|
|
15172
|
-
(0, import_node_child_process.execFile)(command, [binary], (
|
|
15173
|
-
resolve2(
|
|
15941
|
+
(0, import_node_child_process.execFile)(command, [binary], (error51) => {
|
|
15942
|
+
resolve2(error51 === null);
|
|
15174
15943
|
});
|
|
15175
15944
|
});
|
|
15176
15945
|
}
|
|
@@ -17323,7 +18092,7 @@ async function mcpAdd(options) {
|
|
|
17323
18092
|
);
|
|
17324
18093
|
const dispatchSetMcpAdd = detectedNonGenericMcpAdd.length === 0 ? agentsWithMcpReady : nonGenericReadyMcpAdd;
|
|
17325
18094
|
if (dispatchSetMcpAdd.length > 0) {
|
|
17326
|
-
const sdkVersion = true ? "1.
|
|
18095
|
+
const sdkVersion = true ? "1.13.0" : "0.0.0-dev";
|
|
17327
18096
|
try {
|
|
17328
18097
|
await injectAllTargets(
|
|
17329
18098
|
dispatchSetMcpAdd,
|
|
@@ -17580,7 +18349,7 @@ async function runUpgradeInstructions(options) {
|
|
|
17580
18349
|
);
|
|
17581
18350
|
return { exitCode: 1, refreshed, skipped, warnings, errors };
|
|
17582
18351
|
}
|
|
17583
|
-
const sdkVersion = true ? "1.
|
|
18352
|
+
const sdkVersion = true ? "1.13.0" : "0.0.0-dev";
|
|
17584
18353
|
const optedInAgents = [];
|
|
17585
18354
|
for (const agent of agents) {
|
|
17586
18355
|
if (agent.infoFilePath === null) {
|
|
@@ -18706,9 +19475,9 @@ async function sendInitRequest(config2, anonKey, sdkVersion, importGraph, health
|
|
|
18706
19475
|
});
|
|
18707
19476
|
} catch (err) {
|
|
18708
19477
|
if (err instanceof HttpsStatusError) {
|
|
18709
|
-
const
|
|
18710
|
-
|
|
18711
|
-
throw
|
|
19478
|
+
const error51 = new Error(`Init request failed with status ${err.status}`);
|
|
19479
|
+
error51.status = err.status;
|
|
19480
|
+
throw error51;
|
|
18712
19481
|
}
|
|
18713
19482
|
if (err instanceof HttpsBodyParseError) {
|
|
18714
19483
|
const cause = err.cause;
|
|
@@ -19265,7 +20034,7 @@ Then add this as the first statement in your register() function:
|
|
|
19265
20034
|
);
|
|
19266
20035
|
const dispatchSet = detectedNonGeneric.length === 0 ? agentsWithMcpReady : nonGenericReady;
|
|
19267
20036
|
if (dispatchSet.length > 0) {
|
|
19268
|
-
const sdkVersionForInject = true ? "1.
|
|
20037
|
+
const sdkVersionForInject = true ? "1.13.0" : "0.0.0-dev";
|
|
19269
20038
|
try {
|
|
19270
20039
|
await injectAllTargets(
|
|
19271
20040
|
dispatchSet,
|
|
@@ -19367,7 +20136,7 @@ async function verifyAnonKeyRegistration(projectRoot) {
|
|
|
19367
20136
|
}
|
|
19368
20137
|
const baseConfig = resolveConfig({ apiKey: devKey });
|
|
19369
20138
|
const config2 = { ...baseConfig, apiKey: devKey };
|
|
19370
|
-
const sdkVersion = true ? "1.
|
|
20139
|
+
const sdkVersion = true ? "1.13.0" : "0.0.0-dev";
|
|
19371
20140
|
const result = await verifyInitReachable(config2, anonKey, sdkVersion);
|
|
19372
20141
|
if (result.ok) {
|
|
19373
20142
|
return { outcome: "verified" };
|