gogcli-mcp-classroom 2.0.2 → 2.0.3
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/.claude-plugin/marketplace.json +40 -0
- package/.claude-plugin/plugin.json +27 -0
- package/.mcp.json +14 -0
- package/.mcpbignore +27 -0
- package/dist/index.js +1321 -579
- package/manifest.json +1 -1
- package/package.json +3 -2
- package/server.json +35 -0
package/dist/index.js
CHANGED
|
@@ -72,12 +72,12 @@ var require_code = __commonJS({
|
|
|
72
72
|
return item === "" || item === '""';
|
|
73
73
|
}
|
|
74
74
|
get str() {
|
|
75
|
-
var
|
|
76
|
-
return (
|
|
75
|
+
var _a3;
|
|
76
|
+
return (_a3 = this._str) !== null && _a3 !== void 0 ? _a3 : this._str = this._items.reduce((s, c) => `${s}${c}`, "");
|
|
77
77
|
}
|
|
78
78
|
get names() {
|
|
79
|
-
var
|
|
80
|
-
return (
|
|
79
|
+
var _a3;
|
|
80
|
+
return (_a3 = this._names) !== null && _a3 !== void 0 ? _a3 : this._names = this._items.reduce((names, c) => {
|
|
81
81
|
if (c instanceof Name)
|
|
82
82
|
names[c.str] = (names[c.str] || 0) + 1;
|
|
83
83
|
return names;
|
|
@@ -223,8 +223,8 @@ var require_scope = __commonJS({
|
|
|
223
223
|
return `${prefix}${ng.index++}`;
|
|
224
224
|
}
|
|
225
225
|
_nameGroup(prefix) {
|
|
226
|
-
var
|
|
227
|
-
if (((_b = (
|
|
226
|
+
var _a3, _b;
|
|
227
|
+
if (((_b = (_a3 = this._parent) === null || _a3 === void 0 ? void 0 : _a3._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) {
|
|
228
228
|
throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`);
|
|
229
229
|
}
|
|
230
230
|
return this._names[prefix] = { prefix, index: 0 };
|
|
@@ -257,12 +257,12 @@ var require_scope = __commonJS({
|
|
|
257
257
|
return new ValueScopeName(prefix, this._newName(prefix));
|
|
258
258
|
}
|
|
259
259
|
value(nameOrPrefix, value) {
|
|
260
|
-
var
|
|
260
|
+
var _a3;
|
|
261
261
|
if (value.ref === void 0)
|
|
262
262
|
throw new Error("CodeGen: ref must be passed in value");
|
|
263
263
|
const name = this.toName(nameOrPrefix);
|
|
264
264
|
const { prefix } = name;
|
|
265
|
-
const valueKey = (
|
|
265
|
+
const valueKey = (_a3 = value.key) !== null && _a3 !== void 0 ? _a3 : value.ref;
|
|
266
266
|
let vs = this._values[prefix];
|
|
267
267
|
if (vs) {
|
|
268
268
|
const _name = vs.get(valueKey);
|
|
@@ -469,9 +469,9 @@ var require_codegen = __commonJS({
|
|
|
469
469
|
}
|
|
470
470
|
};
|
|
471
471
|
var Throw = class extends Node {
|
|
472
|
-
constructor(
|
|
472
|
+
constructor(error51) {
|
|
473
473
|
super();
|
|
474
|
-
this.error =
|
|
474
|
+
this.error = error51;
|
|
475
475
|
}
|
|
476
476
|
render({ _n }) {
|
|
477
477
|
return `throw ${this.error};` + _n;
|
|
@@ -580,8 +580,8 @@ var require_codegen = __commonJS({
|
|
|
580
580
|
return this;
|
|
581
581
|
}
|
|
582
582
|
optimizeNames(names, constants) {
|
|
583
|
-
var
|
|
584
|
-
this.else = (
|
|
583
|
+
var _a3;
|
|
584
|
+
this.else = (_a3 = this.else) === null || _a3 === void 0 ? void 0 : _a3.optimizeNames(names, constants);
|
|
585
585
|
if (!(super.optimizeNames(names, constants) || this.else))
|
|
586
586
|
return;
|
|
587
587
|
this.condition = optimizeExpr(this.condition, names, constants);
|
|
@@ -685,16 +685,16 @@ var require_codegen = __commonJS({
|
|
|
685
685
|
return code;
|
|
686
686
|
}
|
|
687
687
|
optimizeNodes() {
|
|
688
|
-
var
|
|
688
|
+
var _a3, _b;
|
|
689
689
|
super.optimizeNodes();
|
|
690
|
-
(
|
|
690
|
+
(_a3 = this.catch) === null || _a3 === void 0 ? void 0 : _a3.optimizeNodes();
|
|
691
691
|
(_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes();
|
|
692
692
|
return this;
|
|
693
693
|
}
|
|
694
694
|
optimizeNames(names, constants) {
|
|
695
|
-
var
|
|
695
|
+
var _a3, _b;
|
|
696
696
|
super.optimizeNames(names, constants);
|
|
697
|
-
(
|
|
697
|
+
(_a3 = this.catch) === null || _a3 === void 0 ? void 0 : _a3.optimizeNames(names, constants);
|
|
698
698
|
(_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants);
|
|
699
699
|
return this;
|
|
700
700
|
}
|
|
@@ -708,9 +708,9 @@ var require_codegen = __commonJS({
|
|
|
708
708
|
}
|
|
709
709
|
};
|
|
710
710
|
var Catch = class extends BlockNode {
|
|
711
|
-
constructor(
|
|
711
|
+
constructor(error51) {
|
|
712
712
|
super();
|
|
713
|
-
this.error =
|
|
713
|
+
this.error = error51;
|
|
714
714
|
}
|
|
715
715
|
render(opts) {
|
|
716
716
|
return `catch(${this.error})` + super.render(opts);
|
|
@@ -901,9 +901,9 @@ var require_codegen = __commonJS({
|
|
|
901
901
|
this._blockNode(node);
|
|
902
902
|
this.code(tryBody);
|
|
903
903
|
if (catchCode) {
|
|
904
|
-
const
|
|
905
|
-
this._currNode = node.catch = new Catch(
|
|
906
|
-
catchCode(
|
|
904
|
+
const error51 = this.name("e");
|
|
905
|
+
this._currNode = node.catch = new Catch(error51);
|
|
906
|
+
catchCode(error51);
|
|
907
907
|
}
|
|
908
908
|
if (finallyCode) {
|
|
909
909
|
this._currNode = node.finally = new Finally();
|
|
@@ -912,8 +912,8 @@ var require_codegen = __commonJS({
|
|
|
912
912
|
return this._endBlockNode(Catch, Finally);
|
|
913
913
|
}
|
|
914
914
|
// `throw` statement
|
|
915
|
-
throw(
|
|
916
|
-
return this._leafNode(new Throw(
|
|
915
|
+
throw(error51) {
|
|
916
|
+
return this._leafNode(new Throw(error51));
|
|
917
917
|
}
|
|
918
918
|
// start self-balancing block
|
|
919
919
|
block(body, nodeCount) {
|
|
@@ -1269,10 +1269,10 @@ var require_errors = __commonJS({
|
|
|
1269
1269
|
exports.keyword$DataError = {
|
|
1270
1270
|
message: ({ keyword, schemaType }) => schemaType ? (0, codegen_1.str)`"${keyword}" keyword must be ${schemaType} ($data)` : (0, codegen_1.str)`"${keyword}" keyword is invalid ($data)`
|
|
1271
1271
|
};
|
|
1272
|
-
function reportError(cxt,
|
|
1272
|
+
function reportError(cxt, error51 = exports.keywordError, errorPaths, overrideAllErrors) {
|
|
1273
1273
|
const { it } = cxt;
|
|
1274
1274
|
const { gen, compositeRule, allErrors } = it;
|
|
1275
|
-
const errObj = errorObjectCode(cxt,
|
|
1275
|
+
const errObj = errorObjectCode(cxt, error51, errorPaths);
|
|
1276
1276
|
if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : compositeRule || allErrors) {
|
|
1277
1277
|
addError(gen, errObj);
|
|
1278
1278
|
} else {
|
|
@@ -1280,10 +1280,10 @@ var require_errors = __commonJS({
|
|
|
1280
1280
|
}
|
|
1281
1281
|
}
|
|
1282
1282
|
exports.reportError = reportError;
|
|
1283
|
-
function reportExtraError(cxt,
|
|
1283
|
+
function reportExtraError(cxt, error51 = exports.keywordError, errorPaths) {
|
|
1284
1284
|
const { it } = cxt;
|
|
1285
1285
|
const { gen, compositeRule, allErrors } = it;
|
|
1286
|
-
const errObj = errorObjectCode(cxt,
|
|
1286
|
+
const errObj = errorObjectCode(cxt, error51, errorPaths);
|
|
1287
1287
|
addError(gen, errObj);
|
|
1288
1288
|
if (!(compositeRule || allErrors)) {
|
|
1289
1289
|
returnErrors(it, names_1.default.vErrors);
|
|
@@ -1334,19 +1334,19 @@ var require_errors = __commonJS({
|
|
|
1334
1334
|
schema: new codegen_1.Name("schema"),
|
|
1335
1335
|
parentSchema: new codegen_1.Name("parentSchema")
|
|
1336
1336
|
};
|
|
1337
|
-
function errorObjectCode(cxt,
|
|
1337
|
+
function errorObjectCode(cxt, error51, errorPaths) {
|
|
1338
1338
|
const { createErrors } = cxt.it;
|
|
1339
1339
|
if (createErrors === false)
|
|
1340
1340
|
return (0, codegen_1._)`{}`;
|
|
1341
|
-
return errorObject(cxt,
|
|
1341
|
+
return errorObject(cxt, error51, errorPaths);
|
|
1342
1342
|
}
|
|
1343
|
-
function errorObject(cxt,
|
|
1343
|
+
function errorObject(cxt, error51, errorPaths = {}) {
|
|
1344
1344
|
const { gen, it } = cxt;
|
|
1345
1345
|
const keyValues = [
|
|
1346
1346
|
errorInstancePath(it, errorPaths),
|
|
1347
1347
|
errorSchemaPath(cxt, errorPaths)
|
|
1348
1348
|
];
|
|
1349
|
-
extraErrorProps(cxt,
|
|
1349
|
+
extraErrorProps(cxt, error51, keyValues);
|
|
1350
1350
|
return gen.object(...keyValues);
|
|
1351
1351
|
}
|
|
1352
1352
|
function errorInstancePath({ errorPath }, { instancePath }) {
|
|
@@ -1474,8 +1474,8 @@ var require_applicability = __commonJS({
|
|
|
1474
1474
|
}
|
|
1475
1475
|
exports.shouldUseGroup = shouldUseGroup;
|
|
1476
1476
|
function shouldUseRule(schema, rule) {
|
|
1477
|
-
var
|
|
1478
|
-
return schema[rule.keyword] !== void 0 || ((
|
|
1477
|
+
var _a3;
|
|
1478
|
+
return schema[rule.keyword] !== void 0 || ((_a3 = rule.definition.implements) === null || _a3 === void 0 ? void 0 : _a3.some((kwd) => schema[kwd] !== void 0));
|
|
1479
1479
|
}
|
|
1480
1480
|
exports.shouldUseRule = shouldUseRule;
|
|
1481
1481
|
}
|
|
@@ -1863,14 +1863,14 @@ var require_keyword = __commonJS({
|
|
|
1863
1863
|
}
|
|
1864
1864
|
exports.macroKeywordCode = macroKeywordCode;
|
|
1865
1865
|
function funcKeywordCode(cxt, def) {
|
|
1866
|
-
var
|
|
1866
|
+
var _a3;
|
|
1867
1867
|
const { gen, keyword, schema, parentSchema, $data, it } = cxt;
|
|
1868
1868
|
checkAsyncKeyword(it, def);
|
|
1869
1869
|
const validate = !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate;
|
|
1870
1870
|
const validateRef = useKeyword(gen, keyword, validate);
|
|
1871
1871
|
const valid = gen.let("valid");
|
|
1872
1872
|
cxt.block$data(valid, validateKeyword);
|
|
1873
|
-
cxt.ok((
|
|
1873
|
+
cxt.ok((_a3 = def.valid) !== null && _a3 !== void 0 ? _a3 : valid);
|
|
1874
1874
|
function validateKeyword() {
|
|
1875
1875
|
if (def.errors === false) {
|
|
1876
1876
|
assignValid();
|
|
@@ -1901,8 +1901,8 @@ var require_keyword = __commonJS({
|
|
|
1901
1901
|
gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);
|
|
1902
1902
|
}
|
|
1903
1903
|
function reportErrs(errors) {
|
|
1904
|
-
var
|
|
1905
|
-
gen.if((0, codegen_1.not)((
|
|
1904
|
+
var _a4;
|
|
1905
|
+
gen.if((0, codegen_1.not)((_a4 = def.valid) !== null && _a4 !== void 0 ? _a4 : valid), errors);
|
|
1906
1906
|
}
|
|
1907
1907
|
}
|
|
1908
1908
|
exports.funcKeywordCode = funcKeywordCode;
|
|
@@ -2870,7 +2870,7 @@ var require_compile = __commonJS({
|
|
|
2870
2870
|
var validate_1 = require_validate();
|
|
2871
2871
|
var SchemaEnv = class {
|
|
2872
2872
|
constructor(env) {
|
|
2873
|
-
var
|
|
2873
|
+
var _a3;
|
|
2874
2874
|
this.refs = {};
|
|
2875
2875
|
this.dynamicAnchors = {};
|
|
2876
2876
|
let schema;
|
|
@@ -2879,7 +2879,7 @@ var require_compile = __commonJS({
|
|
|
2879
2879
|
this.schema = env.schema;
|
|
2880
2880
|
this.schemaId = env.schemaId;
|
|
2881
2881
|
this.root = env.root || this;
|
|
2882
|
-
this.baseId = (
|
|
2882
|
+
this.baseId = (_a3 = env.baseId) !== null && _a3 !== void 0 ? _a3 : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || "$id"]);
|
|
2883
2883
|
this.schemaPath = env.schemaPath;
|
|
2884
2884
|
this.localRefs = env.localRefs;
|
|
2885
2885
|
this.meta = env.meta;
|
|
@@ -2975,14 +2975,14 @@ var require_compile = __commonJS({
|
|
|
2975
2975
|
}
|
|
2976
2976
|
exports.compileSchema = compileSchema;
|
|
2977
2977
|
function resolveRef2(root, baseId, ref) {
|
|
2978
|
-
var
|
|
2978
|
+
var _a3;
|
|
2979
2979
|
ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);
|
|
2980
2980
|
const schOrFunc = root.refs[ref];
|
|
2981
2981
|
if (schOrFunc)
|
|
2982
2982
|
return schOrFunc;
|
|
2983
2983
|
let _sch = resolve.call(this, root, ref);
|
|
2984
2984
|
if (_sch === void 0) {
|
|
2985
|
-
const schema = (
|
|
2985
|
+
const schema = (_a3 = root.localRefs) === null || _a3 === void 0 ? void 0 : _a3[ref];
|
|
2986
2986
|
const { schemaId } = this.opts;
|
|
2987
2987
|
if (schema)
|
|
2988
2988
|
_sch = new SchemaEnv({ schema, schemaId, root, baseId });
|
|
@@ -3051,8 +3051,8 @@ var require_compile = __commonJS({
|
|
|
3051
3051
|
"definitions"
|
|
3052
3052
|
]);
|
|
3053
3053
|
function getJsonPointer(parsedRef, { baseId, schema, root }) {
|
|
3054
|
-
var
|
|
3055
|
-
if (((
|
|
3054
|
+
var _a3;
|
|
3055
|
+
if (((_a3 = parsedRef.fragment) === null || _a3 === void 0 ? void 0 : _a3[0]) !== "/")
|
|
3056
3056
|
return;
|
|
3057
3057
|
for (const part of parsedRef.fragment.slice(1).split("/")) {
|
|
3058
3058
|
if (typeof schema === "boolean")
|
|
@@ -3913,9 +3913,9 @@ var require_core = __commonJS({
|
|
|
3913
3913
|
};
|
|
3914
3914
|
var MAX_EXPRESSION = 200;
|
|
3915
3915
|
function requiredOptions(o) {
|
|
3916
|
-
var
|
|
3916
|
+
var _a3, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
|
3917
3917
|
const s = o.strict;
|
|
3918
|
-
const _optz = (
|
|
3918
|
+
const _optz = (_a3 = o.code) === null || _a3 === void 0 ? void 0 : _a3.optimize;
|
|
3919
3919
|
const optimize = _optz === true || _optz === void 0 ? 1 : _optz || 0;
|
|
3920
3920
|
const regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp;
|
|
3921
3921
|
const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default;
|
|
@@ -4389,7 +4389,7 @@ var require_core = __commonJS({
|
|
|
4389
4389
|
}
|
|
4390
4390
|
}
|
|
4391
4391
|
function addRule(keyword, definition, dataType) {
|
|
4392
|
-
var
|
|
4392
|
+
var _a3;
|
|
4393
4393
|
const post = definition === null || definition === void 0 ? void 0 : definition.post;
|
|
4394
4394
|
if (dataType && post)
|
|
4395
4395
|
throw new Error('keyword with "post" flag cannot have "type"');
|
|
@@ -4415,7 +4415,7 @@ var require_core = __commonJS({
|
|
|
4415
4415
|
else
|
|
4416
4416
|
ruleGroup.rules.push(rule);
|
|
4417
4417
|
RULES.all[keyword] = rule;
|
|
4418
|
-
(
|
|
4418
|
+
(_a3 = definition.implements) === null || _a3 === void 0 ? void 0 : _a3.forEach((kwd) => this.addKeyword(kwd));
|
|
4419
4419
|
}
|
|
4420
4420
|
function addBeforeRule(ruleGroup, rule, before) {
|
|
4421
4421
|
const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before);
|
|
@@ -4549,10 +4549,10 @@ var require_ref = __commonJS({
|
|
|
4549
4549
|
gen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);
|
|
4550
4550
|
}
|
|
4551
4551
|
function addEvaluatedFrom(source) {
|
|
4552
|
-
var
|
|
4552
|
+
var _a3;
|
|
4553
4553
|
if (!it.opts.unevaluated)
|
|
4554
4554
|
return;
|
|
4555
|
-
const schEvaluated = (
|
|
4555
|
+
const schEvaluated = (_a3 = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a3 === void 0 ? void 0 : _a3.evaluated;
|
|
4556
4556
|
if (it.props !== true) {
|
|
4557
4557
|
if (schEvaluated && !schEvaluated.dynamicProps) {
|
|
4558
4558
|
if (schEvaluated.props !== void 0) {
|
|
@@ -4614,7 +4614,7 @@ var require_limitNumber = __commonJS({
|
|
|
4614
4614
|
exclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE },
|
|
4615
4615
|
exclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE }
|
|
4616
4616
|
};
|
|
4617
|
-
var
|
|
4617
|
+
var error51 = {
|
|
4618
4618
|
message: ({ keyword, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword].okStr} ${schemaCode}`,
|
|
4619
4619
|
params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`
|
|
4620
4620
|
};
|
|
@@ -4623,7 +4623,7 @@ var require_limitNumber = __commonJS({
|
|
|
4623
4623
|
type: "number",
|
|
4624
4624
|
schemaType: "number",
|
|
4625
4625
|
$data: true,
|
|
4626
|
-
error:
|
|
4626
|
+
error: error51,
|
|
4627
4627
|
code(cxt) {
|
|
4628
4628
|
const { keyword, data, schemaCode } = cxt;
|
|
4629
4629
|
cxt.fail$data((0, codegen_1._)`${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`);
|
|
@@ -4639,7 +4639,7 @@ var require_multipleOf = __commonJS({
|
|
|
4639
4639
|
"use strict";
|
|
4640
4640
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4641
4641
|
var codegen_1 = require_codegen();
|
|
4642
|
-
var
|
|
4642
|
+
var error51 = {
|
|
4643
4643
|
message: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`,
|
|
4644
4644
|
params: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}`
|
|
4645
4645
|
};
|
|
@@ -4648,7 +4648,7 @@ var require_multipleOf = __commonJS({
|
|
|
4648
4648
|
type: "number",
|
|
4649
4649
|
schemaType: "number",
|
|
4650
4650
|
$data: true,
|
|
4651
|
-
error:
|
|
4651
|
+
error: error51,
|
|
4652
4652
|
code(cxt) {
|
|
4653
4653
|
const { gen, data, schemaCode, it } = cxt;
|
|
4654
4654
|
const prec = it.opts.multipleOfPrecision;
|
|
@@ -4695,7 +4695,7 @@ var require_limitLength = __commonJS({
|
|
|
4695
4695
|
var codegen_1 = require_codegen();
|
|
4696
4696
|
var util_1 = require_util();
|
|
4697
4697
|
var ucs2length_1 = require_ucs2length();
|
|
4698
|
-
var
|
|
4698
|
+
var error51 = {
|
|
4699
4699
|
message({ keyword, schemaCode }) {
|
|
4700
4700
|
const comp = keyword === "maxLength" ? "more" : "fewer";
|
|
4701
4701
|
return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`;
|
|
@@ -4707,7 +4707,7 @@ var require_limitLength = __commonJS({
|
|
|
4707
4707
|
type: "string",
|
|
4708
4708
|
schemaType: "number",
|
|
4709
4709
|
$data: true,
|
|
4710
|
-
error:
|
|
4710
|
+
error: error51,
|
|
4711
4711
|
code(cxt) {
|
|
4712
4712
|
const { keyword, data, schemaCode, it } = cxt;
|
|
4713
4713
|
const op = keyword === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT;
|
|
@@ -4727,7 +4727,7 @@ var require_pattern = __commonJS({
|
|
|
4727
4727
|
var code_1 = require_code2();
|
|
4728
4728
|
var util_1 = require_util();
|
|
4729
4729
|
var codegen_1 = require_codegen();
|
|
4730
|
-
var
|
|
4730
|
+
var error51 = {
|
|
4731
4731
|
message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`,
|
|
4732
4732
|
params: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}`
|
|
4733
4733
|
};
|
|
@@ -4736,7 +4736,7 @@ var require_pattern = __commonJS({
|
|
|
4736
4736
|
type: "string",
|
|
4737
4737
|
schemaType: "string",
|
|
4738
4738
|
$data: true,
|
|
4739
|
-
error:
|
|
4739
|
+
error: error51,
|
|
4740
4740
|
code(cxt) {
|
|
4741
4741
|
const { gen, data, $data, schema, schemaCode, it } = cxt;
|
|
4742
4742
|
const u = it.opts.unicodeRegExp ? "u" : "";
|
|
@@ -4762,7 +4762,7 @@ var require_limitProperties = __commonJS({
|
|
|
4762
4762
|
"use strict";
|
|
4763
4763
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4764
4764
|
var codegen_1 = require_codegen();
|
|
4765
|
-
var
|
|
4765
|
+
var error51 = {
|
|
4766
4766
|
message({ keyword, schemaCode }) {
|
|
4767
4767
|
const comp = keyword === "maxProperties" ? "more" : "fewer";
|
|
4768
4768
|
return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`;
|
|
@@ -4774,7 +4774,7 @@ var require_limitProperties = __commonJS({
|
|
|
4774
4774
|
type: "object",
|
|
4775
4775
|
schemaType: "number",
|
|
4776
4776
|
$data: true,
|
|
4777
|
-
error:
|
|
4777
|
+
error: error51,
|
|
4778
4778
|
code(cxt) {
|
|
4779
4779
|
const { keyword, data, schemaCode } = cxt;
|
|
4780
4780
|
const op = keyword === "maxProperties" ? codegen_1.operators.GT : codegen_1.operators.LT;
|
|
@@ -4793,7 +4793,7 @@ var require_required = __commonJS({
|
|
|
4793
4793
|
var code_1 = require_code2();
|
|
4794
4794
|
var codegen_1 = require_codegen();
|
|
4795
4795
|
var util_1 = require_util();
|
|
4796
|
-
var
|
|
4796
|
+
var error51 = {
|
|
4797
4797
|
message: ({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`,
|
|
4798
4798
|
params: ({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}`
|
|
4799
4799
|
};
|
|
@@ -4802,7 +4802,7 @@ var require_required = __commonJS({
|
|
|
4802
4802
|
type: "object",
|
|
4803
4803
|
schemaType: "array",
|
|
4804
4804
|
$data: true,
|
|
4805
|
-
error:
|
|
4805
|
+
error: error51,
|
|
4806
4806
|
code(cxt) {
|
|
4807
4807
|
const { gen, schema, schemaCode, data, $data, it } = cxt;
|
|
4808
4808
|
const { opts } = it;
|
|
@@ -4873,7 +4873,7 @@ var require_limitItems = __commonJS({
|
|
|
4873
4873
|
"use strict";
|
|
4874
4874
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4875
4875
|
var codegen_1 = require_codegen();
|
|
4876
|
-
var
|
|
4876
|
+
var error51 = {
|
|
4877
4877
|
message({ keyword, schemaCode }) {
|
|
4878
4878
|
const comp = keyword === "maxItems" ? "more" : "fewer";
|
|
4879
4879
|
return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`;
|
|
@@ -4885,7 +4885,7 @@ var require_limitItems = __commonJS({
|
|
|
4885
4885
|
type: "array",
|
|
4886
4886
|
schemaType: "number",
|
|
4887
4887
|
$data: true,
|
|
4888
|
-
error:
|
|
4888
|
+
error: error51,
|
|
4889
4889
|
code(cxt) {
|
|
4890
4890
|
const { keyword, data, schemaCode } = cxt;
|
|
4891
4891
|
const op = keyword === "maxItems" ? codegen_1.operators.GT : codegen_1.operators.LT;
|
|
@@ -4916,7 +4916,7 @@ var require_uniqueItems = __commonJS({
|
|
|
4916
4916
|
var codegen_1 = require_codegen();
|
|
4917
4917
|
var util_1 = require_util();
|
|
4918
4918
|
var equal_1 = require_equal();
|
|
4919
|
-
var
|
|
4919
|
+
var error51 = {
|
|
4920
4920
|
message: ({ params: { i, j } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,
|
|
4921
4921
|
params: ({ params: { i, j } }) => (0, codegen_1._)`{i: ${i}, j: ${j}}`
|
|
4922
4922
|
};
|
|
@@ -4925,7 +4925,7 @@ var require_uniqueItems = __commonJS({
|
|
|
4925
4925
|
type: "array",
|
|
4926
4926
|
schemaType: "boolean",
|
|
4927
4927
|
$data: true,
|
|
4928
|
-
error:
|
|
4928
|
+
error: error51,
|
|
4929
4929
|
code(cxt) {
|
|
4930
4930
|
const { gen, data, $data, schema, parentSchema, schemaCode, it } = cxt;
|
|
4931
4931
|
if (!$data && !schema)
|
|
@@ -4982,14 +4982,14 @@ var require_const = __commonJS({
|
|
|
4982
4982
|
var codegen_1 = require_codegen();
|
|
4983
4983
|
var util_1 = require_util();
|
|
4984
4984
|
var equal_1 = require_equal();
|
|
4985
|
-
var
|
|
4985
|
+
var error51 = {
|
|
4986
4986
|
message: "must be equal to constant",
|
|
4987
4987
|
params: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}`
|
|
4988
4988
|
};
|
|
4989
4989
|
var def = {
|
|
4990
4990
|
keyword: "const",
|
|
4991
4991
|
$data: true,
|
|
4992
|
-
error:
|
|
4992
|
+
error: error51,
|
|
4993
4993
|
code(cxt) {
|
|
4994
4994
|
const { gen, data, $data, schemaCode, schema } = cxt;
|
|
4995
4995
|
if ($data || schema && typeof schema == "object") {
|
|
@@ -5011,7 +5011,7 @@ var require_enum = __commonJS({
|
|
|
5011
5011
|
var codegen_1 = require_codegen();
|
|
5012
5012
|
var util_1 = require_util();
|
|
5013
5013
|
var equal_1 = require_equal();
|
|
5014
|
-
var
|
|
5014
|
+
var error51 = {
|
|
5015
5015
|
message: "must be equal to one of the allowed values",
|
|
5016
5016
|
params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}`
|
|
5017
5017
|
};
|
|
@@ -5019,7 +5019,7 @@ var require_enum = __commonJS({
|
|
|
5019
5019
|
keyword: "enum",
|
|
5020
5020
|
schemaType: "array",
|
|
5021
5021
|
$data: true,
|
|
5022
|
-
error:
|
|
5022
|
+
error: error51,
|
|
5023
5023
|
code(cxt) {
|
|
5024
5024
|
const { gen, data, $data, schema, schemaCode, it } = cxt;
|
|
5025
5025
|
if (!$data && schema.length === 0)
|
|
@@ -5098,7 +5098,7 @@ var require_additionalItems = __commonJS({
|
|
|
5098
5098
|
exports.validateAdditionalItems = void 0;
|
|
5099
5099
|
var codegen_1 = require_codegen();
|
|
5100
5100
|
var util_1 = require_util();
|
|
5101
|
-
var
|
|
5101
|
+
var error51 = {
|
|
5102
5102
|
message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
|
|
5103
5103
|
params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
|
|
5104
5104
|
};
|
|
@@ -5107,7 +5107,7 @@ var require_additionalItems = __commonJS({
|
|
|
5107
5107
|
type: "array",
|
|
5108
5108
|
schemaType: ["boolean", "object"],
|
|
5109
5109
|
before: "uniqueItems",
|
|
5110
|
-
error:
|
|
5110
|
+
error: error51,
|
|
5111
5111
|
code(cxt) {
|
|
5112
5112
|
const { parentSchema, it } = cxt;
|
|
5113
5113
|
const { items } = parentSchema;
|
|
@@ -5226,7 +5226,7 @@ var require_items2020 = __commonJS({
|
|
|
5226
5226
|
var util_1 = require_util();
|
|
5227
5227
|
var code_1 = require_code2();
|
|
5228
5228
|
var additionalItems_1 = require_additionalItems();
|
|
5229
|
-
var
|
|
5229
|
+
var error51 = {
|
|
5230
5230
|
message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
|
|
5231
5231
|
params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
|
|
5232
5232
|
};
|
|
@@ -5235,7 +5235,7 @@ var require_items2020 = __commonJS({
|
|
|
5235
5235
|
type: "array",
|
|
5236
5236
|
schemaType: ["object", "boolean"],
|
|
5237
5237
|
before: "uniqueItems",
|
|
5238
|
-
error:
|
|
5238
|
+
error: error51,
|
|
5239
5239
|
code(cxt) {
|
|
5240
5240
|
const { schema, parentSchema, it } = cxt;
|
|
5241
5241
|
const { prefixItems } = parentSchema;
|
|
@@ -5259,7 +5259,7 @@ var require_contains = __commonJS({
|
|
|
5259
5259
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5260
5260
|
var codegen_1 = require_codegen();
|
|
5261
5261
|
var util_1 = require_util();
|
|
5262
|
-
var
|
|
5262
|
+
var error51 = {
|
|
5263
5263
|
message: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1.str)`must contain at least ${min} valid item(s)` : (0, codegen_1.str)`must contain at least ${min} and no more than ${max} valid item(s)`,
|
|
5264
5264
|
params: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1._)`{minContains: ${min}}` : (0, codegen_1._)`{minContains: ${min}, maxContains: ${max}}`
|
|
5265
5265
|
};
|
|
@@ -5269,7 +5269,7 @@ var require_contains = __commonJS({
|
|
|
5269
5269
|
schemaType: ["object", "boolean"],
|
|
5270
5270
|
before: "uniqueItems",
|
|
5271
5271
|
trackErrors: true,
|
|
5272
|
-
error:
|
|
5272
|
+
error: error51,
|
|
5273
5273
|
code(cxt) {
|
|
5274
5274
|
const { gen, schema, parentSchema, data, it } = cxt;
|
|
5275
5275
|
let min;
|
|
@@ -5447,7 +5447,7 @@ var require_propertyNames = __commonJS({
|
|
|
5447
5447
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5448
5448
|
var codegen_1 = require_codegen();
|
|
5449
5449
|
var util_1 = require_util();
|
|
5450
|
-
var
|
|
5450
|
+
var error51 = {
|
|
5451
5451
|
message: "property name must be valid",
|
|
5452
5452
|
params: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}`
|
|
5453
5453
|
};
|
|
@@ -5455,7 +5455,7 @@ var require_propertyNames = __commonJS({
|
|
|
5455
5455
|
keyword: "propertyNames",
|
|
5456
5456
|
type: "object",
|
|
5457
5457
|
schemaType: ["object", "boolean"],
|
|
5458
|
-
error:
|
|
5458
|
+
error: error51,
|
|
5459
5459
|
code(cxt) {
|
|
5460
5460
|
const { gen, schema, data, it } = cxt;
|
|
5461
5461
|
if ((0, util_1.alwaysValidSchema)(it, schema))
|
|
@@ -5492,7 +5492,7 @@ var require_additionalProperties = __commonJS({
|
|
|
5492
5492
|
var codegen_1 = require_codegen();
|
|
5493
5493
|
var names_1 = require_names();
|
|
5494
5494
|
var util_1 = require_util();
|
|
5495
|
-
var
|
|
5495
|
+
var error51 = {
|
|
5496
5496
|
message: "must NOT have additional properties",
|
|
5497
5497
|
params: ({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}`
|
|
5498
5498
|
};
|
|
@@ -5502,7 +5502,7 @@ var require_additionalProperties = __commonJS({
|
|
|
5502
5502
|
schemaType: ["boolean", "object"],
|
|
5503
5503
|
allowUndefined: true,
|
|
5504
5504
|
trackErrors: true,
|
|
5505
|
-
error:
|
|
5505
|
+
error: error51,
|
|
5506
5506
|
code(cxt) {
|
|
5507
5507
|
const { gen, schema, parentSchema, data, errsCount, it } = cxt;
|
|
5508
5508
|
if (!errsCount)
|
|
@@ -5776,7 +5776,7 @@ var require_oneOf = __commonJS({
|
|
|
5776
5776
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5777
5777
|
var codegen_1 = require_codegen();
|
|
5778
5778
|
var util_1 = require_util();
|
|
5779
|
-
var
|
|
5779
|
+
var error51 = {
|
|
5780
5780
|
message: "must match exactly one schema in oneOf",
|
|
5781
5781
|
params: ({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}`
|
|
5782
5782
|
};
|
|
@@ -5784,7 +5784,7 @@ var require_oneOf = __commonJS({
|
|
|
5784
5784
|
keyword: "oneOf",
|
|
5785
5785
|
schemaType: "array",
|
|
5786
5786
|
trackErrors: true,
|
|
5787
|
-
error:
|
|
5787
|
+
error: error51,
|
|
5788
5788
|
code(cxt) {
|
|
5789
5789
|
const { gen, schema, parentSchema, it } = cxt;
|
|
5790
5790
|
if (!Array.isArray(schema))
|
|
@@ -5861,7 +5861,7 @@ var require_if = __commonJS({
|
|
|
5861
5861
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5862
5862
|
var codegen_1 = require_codegen();
|
|
5863
5863
|
var util_1 = require_util();
|
|
5864
|
-
var
|
|
5864
|
+
var error51 = {
|
|
5865
5865
|
message: ({ params }) => (0, codegen_1.str)`must match "${params.ifClause}" schema`,
|
|
5866
5866
|
params: ({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}`
|
|
5867
5867
|
};
|
|
@@ -5869,7 +5869,7 @@ var require_if = __commonJS({
|
|
|
5869
5869
|
keyword: "if",
|
|
5870
5870
|
schemaType: ["object", "boolean"],
|
|
5871
5871
|
trackErrors: true,
|
|
5872
|
-
error:
|
|
5872
|
+
error: error51,
|
|
5873
5873
|
code(cxt) {
|
|
5874
5874
|
const { gen, parentSchema, it } = cxt;
|
|
5875
5875
|
if (parentSchema.then === void 0 && parentSchema.else === void 0) {
|
|
@@ -5995,7 +5995,7 @@ var require_format = __commonJS({
|
|
|
5995
5995
|
"use strict";
|
|
5996
5996
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5997
5997
|
var codegen_1 = require_codegen();
|
|
5998
|
-
var
|
|
5998
|
+
var error51 = {
|
|
5999
5999
|
message: ({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`,
|
|
6000
6000
|
params: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}`
|
|
6001
6001
|
};
|
|
@@ -6004,7 +6004,7 @@ var require_format = __commonJS({
|
|
|
6004
6004
|
type: ["number", "string"],
|
|
6005
6005
|
schemaType: "string",
|
|
6006
6006
|
$data: true,
|
|
6007
|
-
error:
|
|
6007
|
+
error: error51,
|
|
6008
6008
|
code(cxt, ruleType) {
|
|
6009
6009
|
const { gen, data, $data, schema, schemaCode, it } = cxt;
|
|
6010
6010
|
const { opts, errSchemaPath, schemaEnv, self } = it;
|
|
@@ -6159,7 +6159,7 @@ var require_discriminator = __commonJS({
|
|
|
6159
6159
|
var compile_1 = require_compile();
|
|
6160
6160
|
var ref_error_1 = require_ref_error();
|
|
6161
6161
|
var util_1 = require_util();
|
|
6162
|
-
var
|
|
6162
|
+
var error51 = {
|
|
6163
6163
|
message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`,
|
|
6164
6164
|
params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`
|
|
6165
6165
|
};
|
|
@@ -6167,7 +6167,7 @@ var require_discriminator = __commonJS({
|
|
|
6167
6167
|
keyword: "discriminator",
|
|
6168
6168
|
type: "object",
|
|
6169
6169
|
schemaType: "object",
|
|
6170
|
-
error:
|
|
6170
|
+
error: error51,
|
|
6171
6171
|
code(cxt) {
|
|
6172
6172
|
const { gen, data, schema, parentSchema, it } = cxt;
|
|
6173
6173
|
const { oneOf } = parentSchema;
|
|
@@ -6203,7 +6203,7 @@ var require_discriminator = __commonJS({
|
|
|
6203
6203
|
return _valid;
|
|
6204
6204
|
}
|
|
6205
6205
|
function getMapping() {
|
|
6206
|
-
var
|
|
6206
|
+
var _a3;
|
|
6207
6207
|
const oneOfMapping = {};
|
|
6208
6208
|
const topRequired = hasRequired(parentSchema);
|
|
6209
6209
|
let tagRequired = true;
|
|
@@ -6217,7 +6217,7 @@ var require_discriminator = __commonJS({
|
|
|
6217
6217
|
if (sch === void 0)
|
|
6218
6218
|
throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);
|
|
6219
6219
|
}
|
|
6220
|
-
const propSch = (
|
|
6220
|
+
const propSch = (_a3 = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a3 === void 0 ? void 0 : _a3[tagName];
|
|
6221
6221
|
if (typeof propSch != "object") {
|
|
6222
6222
|
throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`);
|
|
6223
6223
|
}
|
|
@@ -6699,7 +6699,7 @@ var require_limit = __commonJS({
|
|
|
6699
6699
|
formatExclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE },
|
|
6700
6700
|
formatExclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE }
|
|
6701
6701
|
};
|
|
6702
|
-
var
|
|
6702
|
+
var error51 = {
|
|
6703
6703
|
message: ({ keyword, schemaCode }) => (0, codegen_1.str)`should be ${KWDs[keyword].okStr} ${schemaCode}`,
|
|
6704
6704
|
params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`
|
|
6705
6705
|
};
|
|
@@ -6708,7 +6708,7 @@ var require_limit = __commonJS({
|
|
|
6708
6708
|
type: "string",
|
|
6709
6709
|
schemaType: "string",
|
|
6710
6710
|
$data: true,
|
|
6711
|
-
error:
|
|
6711
|
+
error: error51,
|
|
6712
6712
|
code(cxt) {
|
|
6713
6713
|
const { gen, data, schemaCode, keyword, it } = cxt;
|
|
6714
6714
|
const { opts, self } = it;
|
|
@@ -6786,9 +6786,9 @@ var require_dist = __commonJS({
|
|
|
6786
6786
|
return f;
|
|
6787
6787
|
};
|
|
6788
6788
|
function addFormats(ajv, list, fs, exportName) {
|
|
6789
|
-
var
|
|
6789
|
+
var _a3;
|
|
6790
6790
|
var _b;
|
|
6791
|
-
(
|
|
6791
|
+
(_a3 = (_b = ajv.opts.code).formats) !== null && _a3 !== void 0 ? _a3 : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
|
|
6792
6792
|
for (const f of list)
|
|
6793
6793
|
ajv.addFormat(f, fs[f]);
|
|
6794
6794
|
}
|
|
@@ -6863,6 +6863,7 @@ __export(external_exports, {
|
|
|
6863
6863
|
ZodOptional: () => ZodOptional,
|
|
6864
6864
|
ZodPipe: () => ZodPipe,
|
|
6865
6865
|
ZodPrefault: () => ZodPrefault,
|
|
6866
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
6866
6867
|
ZodPromise: () => ZodPromise,
|
|
6867
6868
|
ZodReadonly: () => ZodReadonly,
|
|
6868
6869
|
ZodRealError: () => ZodRealError,
|
|
@@ -6941,6 +6942,7 @@ __export(external_exports, {
|
|
|
6941
6942
|
int32: () => int32,
|
|
6942
6943
|
int64: () => int64,
|
|
6943
6944
|
intersection: () => intersection,
|
|
6945
|
+
invertCodec: () => invertCodec,
|
|
6944
6946
|
ipv4: () => ipv42,
|
|
6945
6947
|
ipv6: () => ipv62,
|
|
6946
6948
|
iso: () => iso_exports,
|
|
@@ -7122,6 +7124,7 @@ __export(core_exports2, {
|
|
|
7122
7124
|
$ZodOptional: () => $ZodOptional,
|
|
7123
7125
|
$ZodPipe: () => $ZodPipe,
|
|
7124
7126
|
$ZodPrefault: () => $ZodPrefault,
|
|
7127
|
+
$ZodPreprocess: () => $ZodPreprocess,
|
|
7125
7128
|
$ZodPromise: () => $ZodPromise,
|
|
7126
7129
|
$ZodReadonly: () => $ZodReadonly,
|
|
7127
7130
|
$ZodRealError: () => $ZodRealError,
|
|
@@ -7321,7 +7324,8 @@ __export(core_exports2, {
|
|
|
7321
7324
|
});
|
|
7322
7325
|
|
|
7323
7326
|
// ../../node_modules/zod/v4/core/core.js
|
|
7324
|
-
var
|
|
7327
|
+
var _a;
|
|
7328
|
+
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
7325
7329
|
status: "aborted"
|
|
7326
7330
|
});
|
|
7327
7331
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -7356,10 +7360,10 @@ function $constructor(name, initializer3, params) {
|
|
|
7356
7360
|
}
|
|
7357
7361
|
Object.defineProperty(Definition, "name", { value: name });
|
|
7358
7362
|
function _(def) {
|
|
7359
|
-
var
|
|
7363
|
+
var _a3;
|
|
7360
7364
|
const inst = params?.Parent ? new Definition() : this;
|
|
7361
7365
|
init(inst, def);
|
|
7362
|
-
(
|
|
7366
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
7363
7367
|
for (const fn of inst._zod.deferred) {
|
|
7364
7368
|
fn();
|
|
7365
7369
|
}
|
|
@@ -7388,7 +7392,8 @@ var $ZodEncodeError = class extends Error {
|
|
|
7388
7392
|
this.name = "ZodEncodeError";
|
|
7389
7393
|
}
|
|
7390
7394
|
};
|
|
7391
|
-
|
|
7395
|
+
(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
|
|
7396
|
+
var globalConfig = globalThis.__zod_globalConfig;
|
|
7392
7397
|
function config(newConfig) {
|
|
7393
7398
|
if (newConfig)
|
|
7394
7399
|
Object.assign(globalConfig, newConfig);
|
|
@@ -7421,6 +7426,7 @@ __export(util_exports, {
|
|
|
7421
7426
|
defineLazy: () => defineLazy,
|
|
7422
7427
|
esc: () => esc,
|
|
7423
7428
|
escapeRegex: () => escapeRegex,
|
|
7429
|
+
explicitlyAborted: () => explicitlyAborted,
|
|
7424
7430
|
extend: () => extend,
|
|
7425
7431
|
finalizeIssue: () => finalizeIssue,
|
|
7426
7432
|
floatSafeRemainder: () => floatSafeRemainder,
|
|
@@ -7509,19 +7515,12 @@ function cleanRegex(source) {
|
|
|
7509
7515
|
return source.slice(start, end);
|
|
7510
7516
|
}
|
|
7511
7517
|
function floatSafeRemainder(val, step) {
|
|
7512
|
-
const
|
|
7513
|
-
const
|
|
7514
|
-
|
|
7515
|
-
if (
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
stepDecCount = Number.parseInt(match[1]);
|
|
7519
|
-
}
|
|
7520
|
-
}
|
|
7521
|
-
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
7522
|
-
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
|
|
7523
|
-
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
|
7524
|
-
return valInt % stepInt / 10 ** decCount;
|
|
7518
|
+
const ratio = val / step;
|
|
7519
|
+
const roundedRatio = Math.round(ratio);
|
|
7520
|
+
const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
|
|
7521
|
+
if (Math.abs(ratio - roundedRatio) < tolerance)
|
|
7522
|
+
return 0;
|
|
7523
|
+
return ratio - roundedRatio;
|
|
7525
7524
|
}
|
|
7526
7525
|
var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
7527
7526
|
function defineLazy(object3, key, getter) {
|
|
@@ -7603,7 +7602,10 @@ var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace :
|
|
|
7603
7602
|
function isObject(data) {
|
|
7604
7603
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
7605
7604
|
}
|
|
7606
|
-
var allowsEval = cached(() => {
|
|
7605
|
+
var allowsEval = /* @__PURE__ */ cached(() => {
|
|
7606
|
+
if (globalConfig.jitless) {
|
|
7607
|
+
return false;
|
|
7608
|
+
}
|
|
7607
7609
|
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
|
|
7608
7610
|
return false;
|
|
7609
7611
|
}
|
|
@@ -7636,6 +7638,10 @@ function shallowClone(o) {
|
|
|
7636
7638
|
return { ...o };
|
|
7637
7639
|
if (Array.isArray(o))
|
|
7638
7640
|
return [...o];
|
|
7641
|
+
if (o instanceof Map)
|
|
7642
|
+
return new Map(o);
|
|
7643
|
+
if (o instanceof Set)
|
|
7644
|
+
return new Set(o);
|
|
7639
7645
|
return o;
|
|
7640
7646
|
}
|
|
7641
7647
|
function numKeys(data) {
|
|
@@ -7692,7 +7698,14 @@ var getParsedType = (data) => {
|
|
|
7692
7698
|
}
|
|
7693
7699
|
};
|
|
7694
7700
|
var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
7695
|
-
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
7701
|
+
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
7702
|
+
"string",
|
|
7703
|
+
"number",
|
|
7704
|
+
"bigint",
|
|
7705
|
+
"boolean",
|
|
7706
|
+
"symbol",
|
|
7707
|
+
"undefined"
|
|
7708
|
+
]);
|
|
7696
7709
|
function escapeRegex(str) {
|
|
7697
7710
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
7698
7711
|
}
|
|
@@ -7861,6 +7874,9 @@ function safeExtend(schema, shape) {
|
|
|
7861
7874
|
return clone(schema, def);
|
|
7862
7875
|
}
|
|
7863
7876
|
function merge(a, b) {
|
|
7877
|
+
if (a._zod.def.checks?.length) {
|
|
7878
|
+
throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
7879
|
+
}
|
|
7864
7880
|
const def = mergeDefs(a._zod.def, {
|
|
7865
7881
|
get shape() {
|
|
7866
7882
|
const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
|
|
@@ -7870,8 +7886,7 @@ function merge(a, b) {
|
|
|
7870
7886
|
get catchall() {
|
|
7871
7887
|
return b._zod.def.catchall;
|
|
7872
7888
|
},
|
|
7873
|
-
checks: []
|
|
7874
|
-
// delete existing checks
|
|
7889
|
+
checks: b._zod.def.checks ?? []
|
|
7875
7890
|
});
|
|
7876
7891
|
return clone(a, def);
|
|
7877
7892
|
}
|
|
@@ -7954,10 +7969,20 @@ function aborted(x, startIndex = 0) {
|
|
|
7954
7969
|
}
|
|
7955
7970
|
return false;
|
|
7956
7971
|
}
|
|
7972
|
+
function explicitlyAborted(x, startIndex = 0) {
|
|
7973
|
+
if (x.aborted === true)
|
|
7974
|
+
return true;
|
|
7975
|
+
for (let i = startIndex; i < x.issues.length; i++) {
|
|
7976
|
+
if (x.issues[i]?.continue === false) {
|
|
7977
|
+
return true;
|
|
7978
|
+
}
|
|
7979
|
+
}
|
|
7980
|
+
return false;
|
|
7981
|
+
}
|
|
7957
7982
|
function prefixIssues(path, issues) {
|
|
7958
7983
|
return issues.map((iss) => {
|
|
7959
|
-
var
|
|
7960
|
-
(
|
|
7984
|
+
var _a3;
|
|
7985
|
+
(_a3 = iss).path ?? (_a3.path = []);
|
|
7961
7986
|
iss.path.unshift(path);
|
|
7962
7987
|
return iss;
|
|
7963
7988
|
});
|
|
@@ -7966,17 +7991,14 @@ function unwrapMessage(message) {
|
|
|
7966
7991
|
return typeof message === "string" ? message : message?.message;
|
|
7967
7992
|
}
|
|
7968
7993
|
function finalizeIssue(iss, ctx, config2) {
|
|
7969
|
-
const
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
delete full.continue;
|
|
7976
|
-
if (!ctx?.reportInput) {
|
|
7977
|
-
delete full.input;
|
|
7994
|
+
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";
|
|
7995
|
+
const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
|
|
7996
|
+
rest.path ?? (rest.path = []);
|
|
7997
|
+
rest.message = message;
|
|
7998
|
+
if (ctx?.reportInput) {
|
|
7999
|
+
rest.input = _input;
|
|
7978
8000
|
}
|
|
7979
|
-
return
|
|
8001
|
+
return rest;
|
|
7980
8002
|
}
|
|
7981
8003
|
function getSizableOrigin(input) {
|
|
7982
8004
|
if (input instanceof Set)
|
|
@@ -8093,10 +8115,10 @@ var initializer = (inst, def) => {
|
|
|
8093
8115
|
};
|
|
8094
8116
|
var $ZodError = $constructor("$ZodError", initializer);
|
|
8095
8117
|
var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
|
|
8096
|
-
function flattenError(
|
|
8118
|
+
function flattenError(error51, mapper = (issue2) => issue2.message) {
|
|
8097
8119
|
const fieldErrors = {};
|
|
8098
8120
|
const formErrors = [];
|
|
8099
|
-
for (const sub of
|
|
8121
|
+
for (const sub of error51.issues) {
|
|
8100
8122
|
if (sub.path.length > 0) {
|
|
8101
8123
|
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
8102
8124
|
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
@@ -8106,50 +8128,53 @@ function flattenError(error48, mapper = (issue2) => issue2.message) {
|
|
|
8106
8128
|
}
|
|
8107
8129
|
return { formErrors, fieldErrors };
|
|
8108
8130
|
}
|
|
8109
|
-
function formatError(
|
|
8131
|
+
function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
8110
8132
|
const fieldErrors = { _errors: [] };
|
|
8111
|
-
const processError = (
|
|
8112
|
-
for (const issue2 of
|
|
8133
|
+
const processError = (error52, path = []) => {
|
|
8134
|
+
for (const issue2 of error52.issues) {
|
|
8113
8135
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
8114
|
-
issue2.errors.map((issues) => processError({ issues }));
|
|
8136
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
8115
8137
|
} else if (issue2.code === "invalid_key") {
|
|
8116
|
-
processError({ issues: issue2.issues });
|
|
8138
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
8117
8139
|
} else if (issue2.code === "invalid_element") {
|
|
8118
|
-
processError({ issues: issue2.issues });
|
|
8119
|
-
} else if (issue2.path.length === 0) {
|
|
8120
|
-
fieldErrors._errors.push(mapper(issue2));
|
|
8140
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
8121
8141
|
} else {
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
|
|
8142
|
+
const fullpath = [...path, ...issue2.path];
|
|
8143
|
+
if (fullpath.length === 0) {
|
|
8144
|
+
fieldErrors._errors.push(mapper(issue2));
|
|
8145
|
+
} else {
|
|
8146
|
+
let curr = fieldErrors;
|
|
8147
|
+
let i = 0;
|
|
8148
|
+
while (i < fullpath.length) {
|
|
8149
|
+
const el = fullpath[i];
|
|
8150
|
+
const terminal = i === fullpath.length - 1;
|
|
8151
|
+
if (!terminal) {
|
|
8152
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
8153
|
+
} else {
|
|
8154
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
8155
|
+
curr[el]._errors.push(mapper(issue2));
|
|
8156
|
+
}
|
|
8157
|
+
curr = curr[el];
|
|
8158
|
+
i++;
|
|
8132
8159
|
}
|
|
8133
|
-
curr = curr[el];
|
|
8134
|
-
i++;
|
|
8135
8160
|
}
|
|
8136
8161
|
}
|
|
8137
8162
|
}
|
|
8138
8163
|
};
|
|
8139
|
-
processError(
|
|
8164
|
+
processError(error51);
|
|
8140
8165
|
return fieldErrors;
|
|
8141
8166
|
}
|
|
8142
|
-
function treeifyError(
|
|
8167
|
+
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
8143
8168
|
const result = { errors: [] };
|
|
8144
|
-
const processError = (
|
|
8145
|
-
var
|
|
8146
|
-
for (const issue2 of
|
|
8169
|
+
const processError = (error52, path = []) => {
|
|
8170
|
+
var _a3, _b;
|
|
8171
|
+
for (const issue2 of error52.issues) {
|
|
8147
8172
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
8148
|
-
issue2.errors.map((issues) => processError({ issues }, issue2.path));
|
|
8173
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
8149
8174
|
} else if (issue2.code === "invalid_key") {
|
|
8150
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
8175
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
8151
8176
|
} else if (issue2.code === "invalid_element") {
|
|
8152
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
8177
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
8153
8178
|
} else {
|
|
8154
8179
|
const fullpath = [...path, ...issue2.path];
|
|
8155
8180
|
if (fullpath.length === 0) {
|
|
@@ -8163,7 +8188,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
8163
8188
|
const terminal = i === fullpath.length - 1;
|
|
8164
8189
|
if (typeof el === "string") {
|
|
8165
8190
|
curr.properties ?? (curr.properties = {});
|
|
8166
|
-
(
|
|
8191
|
+
(_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
|
|
8167
8192
|
curr = curr.properties[el];
|
|
8168
8193
|
} else {
|
|
8169
8194
|
curr.items ?? (curr.items = []);
|
|
@@ -8178,7 +8203,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
8178
8203
|
}
|
|
8179
8204
|
}
|
|
8180
8205
|
};
|
|
8181
|
-
processError(
|
|
8206
|
+
processError(error51);
|
|
8182
8207
|
return result;
|
|
8183
8208
|
}
|
|
8184
8209
|
function toDotPath(_path) {
|
|
@@ -8199,9 +8224,9 @@ function toDotPath(_path) {
|
|
|
8199
8224
|
}
|
|
8200
8225
|
return segs.join("");
|
|
8201
8226
|
}
|
|
8202
|
-
function prettifyError(
|
|
8227
|
+
function prettifyError(error51) {
|
|
8203
8228
|
const lines = [];
|
|
8204
|
-
const issues = [...
|
|
8229
|
+
const issues = [...error51.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
|
|
8205
8230
|
for (const issue2 of issues) {
|
|
8206
8231
|
lines.push(`\u2716 ${issue2.message}`);
|
|
8207
8232
|
if (issue2.path?.length)
|
|
@@ -8212,7 +8237,7 @@ function prettifyError(error48) {
|
|
|
8212
8237
|
|
|
8213
8238
|
// ../../node_modules/zod/v4/core/parse.js
|
|
8214
8239
|
var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
8215
|
-
const ctx = _ctx ?
|
|
8240
|
+
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
8216
8241
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
8217
8242
|
if (result instanceof Promise) {
|
|
8218
8243
|
throw new $ZodAsyncError();
|
|
@@ -8226,7 +8251,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
8226
8251
|
};
|
|
8227
8252
|
var parse = /* @__PURE__ */ _parse($ZodRealError);
|
|
8228
8253
|
var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
8229
|
-
const ctx = _ctx ?
|
|
8254
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
8230
8255
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
8231
8256
|
if (result instanceof Promise)
|
|
8232
8257
|
result = await result;
|
|
@@ -8251,7 +8276,7 @@ var _safeParse = (_Err) => (schema, value, _ctx) => {
|
|
|
8251
8276
|
};
|
|
8252
8277
|
var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
|
|
8253
8278
|
var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
8254
|
-
const ctx = _ctx ?
|
|
8279
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
8255
8280
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
8256
8281
|
if (result instanceof Promise)
|
|
8257
8282
|
result = await result;
|
|
@@ -8262,7 +8287,7 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
8262
8287
|
};
|
|
8263
8288
|
var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
8264
8289
|
var _encode = (_Err) => (schema, value, _ctx) => {
|
|
8265
|
-
const ctx = _ctx ?
|
|
8290
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
8266
8291
|
return _parse(_Err)(schema, value, ctx);
|
|
8267
8292
|
};
|
|
8268
8293
|
var encode = /* @__PURE__ */ _encode($ZodRealError);
|
|
@@ -8271,7 +8296,7 @@ var _decode = (_Err) => (schema, value, _ctx) => {
|
|
|
8271
8296
|
};
|
|
8272
8297
|
var decode = /* @__PURE__ */ _decode($ZodRealError);
|
|
8273
8298
|
var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
8274
|
-
const ctx = _ctx ?
|
|
8299
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
8275
8300
|
return _parseAsync(_Err)(schema, value, ctx);
|
|
8276
8301
|
};
|
|
8277
8302
|
var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
|
|
@@ -8280,7 +8305,7 @@ var _decodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
8280
8305
|
};
|
|
8281
8306
|
var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
|
|
8282
8307
|
var _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
8283
|
-
const ctx = _ctx ?
|
|
8308
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
8284
8309
|
return _safeParse(_Err)(schema, value, ctx);
|
|
8285
8310
|
};
|
|
8286
8311
|
var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
|
|
@@ -8289,7 +8314,7 @@ var _safeDecode = (_Err) => (schema, value, _ctx) => {
|
|
|
8289
8314
|
};
|
|
8290
8315
|
var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
|
|
8291
8316
|
var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
8292
|
-
const ctx = _ctx ?
|
|
8317
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
8293
8318
|
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
8294
8319
|
};
|
|
8295
8320
|
var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
|
|
@@ -8322,6 +8347,7 @@ __export(regexes_exports, {
|
|
|
8322
8347
|
hex: () => hex,
|
|
8323
8348
|
hostname: () => hostname,
|
|
8324
8349
|
html5Email: () => html5Email,
|
|
8350
|
+
httpProtocol: () => httpProtocol,
|
|
8325
8351
|
idnEmail: () => idnEmail,
|
|
8326
8352
|
integer: () => integer,
|
|
8327
8353
|
ipv4: () => ipv4,
|
|
@@ -8360,7 +8386,7 @@ __export(regexes_exports, {
|
|
|
8360
8386
|
uuid7: () => uuid7,
|
|
8361
8387
|
xid: () => xid
|
|
8362
8388
|
});
|
|
8363
|
-
var cuid = /^[cC][
|
|
8389
|
+
var cuid = /^[cC][0-9a-z]{6,}$/;
|
|
8364
8390
|
var cuid2 = /^[0-9a-z]+$/;
|
|
8365
8391
|
var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
8366
8392
|
var xid = /^[0-9a-vA-V]{20}$/;
|
|
@@ -8399,6 +8425,7 @@ var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/
|
|
|
8399
8425
|
var base64url = /^[A-Za-z0-9_-]*$/;
|
|
8400
8426
|
var hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/;
|
|
8401
8427
|
var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
|
|
8428
|
+
var httpProtocol = /^https?$/;
|
|
8402
8429
|
var e164 = /^\+[1-9]\d{6,14}$/;
|
|
8403
8430
|
var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
|
|
8404
8431
|
var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
@@ -8457,10 +8484,10 @@ var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
|
8457
8484
|
|
|
8458
8485
|
// ../../node_modules/zod/v4/core/checks.js
|
|
8459
8486
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
8460
|
-
var
|
|
8487
|
+
var _a3;
|
|
8461
8488
|
inst._zod ?? (inst._zod = {});
|
|
8462
8489
|
inst._zod.def = def;
|
|
8463
|
-
(
|
|
8490
|
+
(_a3 = inst._zod).onattach ?? (_a3.onattach = []);
|
|
8464
8491
|
});
|
|
8465
8492
|
var numericOriginMap = {
|
|
8466
8493
|
number: "number",
|
|
@@ -8526,8 +8553,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
|
|
|
8526
8553
|
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
8527
8554
|
$ZodCheck.init(inst, def);
|
|
8528
8555
|
inst._zod.onattach.push((inst2) => {
|
|
8529
|
-
var
|
|
8530
|
-
(
|
|
8556
|
+
var _a3;
|
|
8557
|
+
(_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
|
|
8531
8558
|
});
|
|
8532
8559
|
inst._zod.check = (payload) => {
|
|
8533
8560
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -8660,9 +8687,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
8660
8687
|
};
|
|
8661
8688
|
});
|
|
8662
8689
|
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
8663
|
-
var
|
|
8690
|
+
var _a3;
|
|
8664
8691
|
$ZodCheck.init(inst, def);
|
|
8665
|
-
(
|
|
8692
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
8666
8693
|
const val = payload.value;
|
|
8667
8694
|
return !nullish(val) && val.size !== void 0;
|
|
8668
8695
|
});
|
|
@@ -8688,9 +8715,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
8688
8715
|
};
|
|
8689
8716
|
});
|
|
8690
8717
|
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
8691
|
-
var
|
|
8718
|
+
var _a3;
|
|
8692
8719
|
$ZodCheck.init(inst, def);
|
|
8693
|
-
(
|
|
8720
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
8694
8721
|
const val = payload.value;
|
|
8695
8722
|
return !nullish(val) && val.size !== void 0;
|
|
8696
8723
|
});
|
|
@@ -8716,9 +8743,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
8716
8743
|
};
|
|
8717
8744
|
});
|
|
8718
8745
|
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
8719
|
-
var
|
|
8746
|
+
var _a3;
|
|
8720
8747
|
$ZodCheck.init(inst, def);
|
|
8721
|
-
(
|
|
8748
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
8722
8749
|
const val = payload.value;
|
|
8723
8750
|
return !nullish(val) && val.size !== void 0;
|
|
8724
8751
|
});
|
|
@@ -8746,9 +8773,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
|
|
|
8746
8773
|
};
|
|
8747
8774
|
});
|
|
8748
8775
|
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
8749
|
-
var
|
|
8776
|
+
var _a3;
|
|
8750
8777
|
$ZodCheck.init(inst, def);
|
|
8751
|
-
(
|
|
8778
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
8752
8779
|
const val = payload.value;
|
|
8753
8780
|
return !nullish(val) && val.length !== void 0;
|
|
8754
8781
|
});
|
|
@@ -8775,9 +8802,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
8775
8802
|
};
|
|
8776
8803
|
});
|
|
8777
8804
|
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
8778
|
-
var
|
|
8805
|
+
var _a3;
|
|
8779
8806
|
$ZodCheck.init(inst, def);
|
|
8780
|
-
(
|
|
8807
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
8781
8808
|
const val = payload.value;
|
|
8782
8809
|
return !nullish(val) && val.length !== void 0;
|
|
8783
8810
|
});
|
|
@@ -8804,9 +8831,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
8804
8831
|
};
|
|
8805
8832
|
});
|
|
8806
8833
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
8807
|
-
var
|
|
8834
|
+
var _a3;
|
|
8808
8835
|
$ZodCheck.init(inst, def);
|
|
8809
|
-
(
|
|
8836
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
8810
8837
|
const val = payload.value;
|
|
8811
8838
|
return !nullish(val) && val.length !== void 0;
|
|
8812
8839
|
});
|
|
@@ -8835,7 +8862,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
8835
8862
|
};
|
|
8836
8863
|
});
|
|
8837
8864
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
8838
|
-
var
|
|
8865
|
+
var _a3, _b;
|
|
8839
8866
|
$ZodCheck.init(inst, def);
|
|
8840
8867
|
inst._zod.onattach.push((inst2) => {
|
|
8841
8868
|
const bag = inst2._zod.bag;
|
|
@@ -8846,7 +8873,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
8846
8873
|
}
|
|
8847
8874
|
});
|
|
8848
8875
|
if (def.pattern)
|
|
8849
|
-
(
|
|
8876
|
+
(_a3 = inst._zod).check ?? (_a3.check = (payload) => {
|
|
8850
8877
|
def.pattern.lastIndex = 0;
|
|
8851
8878
|
if (def.pattern.test(payload.value))
|
|
8852
8879
|
return;
|
|
@@ -9042,13 +9069,13 @@ var Doc = class {
|
|
|
9042
9069
|
// ../../node_modules/zod/v4/core/versions.js
|
|
9043
9070
|
var version = {
|
|
9044
9071
|
major: 4,
|
|
9045
|
-
minor:
|
|
9046
|
-
patch:
|
|
9072
|
+
minor: 4,
|
|
9073
|
+
patch: 2
|
|
9047
9074
|
};
|
|
9048
9075
|
|
|
9049
9076
|
// ../../node_modules/zod/v4/core/schemas.js
|
|
9050
9077
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
9051
|
-
var
|
|
9078
|
+
var _a3;
|
|
9052
9079
|
inst ?? (inst = {});
|
|
9053
9080
|
inst._zod.def = def;
|
|
9054
9081
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -9063,7 +9090,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
9063
9090
|
}
|
|
9064
9091
|
}
|
|
9065
9092
|
if (checks.length === 0) {
|
|
9066
|
-
(
|
|
9093
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
9067
9094
|
inst._zod.deferred?.push(() => {
|
|
9068
9095
|
inst._zod.run = inst._zod.parse;
|
|
9069
9096
|
});
|
|
@@ -9073,6 +9100,8 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
9073
9100
|
let asyncResult;
|
|
9074
9101
|
for (const ch of checks2) {
|
|
9075
9102
|
if (ch._zod.def.when) {
|
|
9103
|
+
if (explicitlyAborted(payload))
|
|
9104
|
+
continue;
|
|
9076
9105
|
const shouldRun = ch._zod.def.when(payload);
|
|
9077
9106
|
if (!shouldRun)
|
|
9078
9107
|
continue;
|
|
@@ -9213,6 +9242,19 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
9213
9242
|
inst._zod.check = (payload) => {
|
|
9214
9243
|
try {
|
|
9215
9244
|
const trimmed = payload.value.trim();
|
|
9245
|
+
if (!def.normalize && def.protocol?.source === httpProtocol.source) {
|
|
9246
|
+
if (!/^https?:\/\//i.test(trimmed)) {
|
|
9247
|
+
payload.issues.push({
|
|
9248
|
+
code: "invalid_format",
|
|
9249
|
+
format: "url",
|
|
9250
|
+
note: "Invalid URL format",
|
|
9251
|
+
input: payload.value,
|
|
9252
|
+
inst,
|
|
9253
|
+
continue: !def.abort
|
|
9254
|
+
});
|
|
9255
|
+
return;
|
|
9256
|
+
}
|
|
9257
|
+
}
|
|
9216
9258
|
const url2 = new URL(trimmed);
|
|
9217
9259
|
if (def.hostname) {
|
|
9218
9260
|
def.hostname.lastIndex = 0;
|
|
@@ -9366,6 +9408,8 @@ var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
|
|
|
9366
9408
|
function isValidBase64(data) {
|
|
9367
9409
|
if (data === "")
|
|
9368
9410
|
return true;
|
|
9411
|
+
if (/\s/.test(data))
|
|
9412
|
+
return false;
|
|
9369
9413
|
if (data.length % 4 !== 0)
|
|
9370
9414
|
return false;
|
|
9371
9415
|
try {
|
|
@@ -9558,8 +9602,6 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
|
|
|
9558
9602
|
$ZodType.init(inst, def);
|
|
9559
9603
|
inst._zod.pattern = _undefined;
|
|
9560
9604
|
inst._zod.values = /* @__PURE__ */ new Set([void 0]);
|
|
9561
|
-
inst._zod.optin = "optional";
|
|
9562
|
-
inst._zod.optout = "optional";
|
|
9563
9605
|
inst._zod.parse = (payload, _ctx) => {
|
|
9564
9606
|
const input = payload.value;
|
|
9565
9607
|
if (typeof input === "undefined")
|
|
@@ -9688,15 +9730,27 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
9688
9730
|
return payload;
|
|
9689
9731
|
};
|
|
9690
9732
|
});
|
|
9691
|
-
function handlePropertyResult(result, final, key, input, isOptionalOut) {
|
|
9733
|
+
function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
|
|
9734
|
+
const isPresent = key in input;
|
|
9692
9735
|
if (result.issues.length) {
|
|
9693
|
-
if (isOptionalOut && !
|
|
9736
|
+
if (isOptionalIn && isOptionalOut && !isPresent) {
|
|
9694
9737
|
return;
|
|
9695
9738
|
}
|
|
9696
9739
|
final.issues.push(...prefixIssues(key, result.issues));
|
|
9697
9740
|
}
|
|
9741
|
+
if (!isPresent && !isOptionalIn) {
|
|
9742
|
+
if (!result.issues.length) {
|
|
9743
|
+
final.issues.push({
|
|
9744
|
+
code: "invalid_type",
|
|
9745
|
+
expected: "nonoptional",
|
|
9746
|
+
input: void 0,
|
|
9747
|
+
path: [key]
|
|
9748
|
+
});
|
|
9749
|
+
}
|
|
9750
|
+
return;
|
|
9751
|
+
}
|
|
9698
9752
|
if (result.value === void 0) {
|
|
9699
|
-
if (
|
|
9753
|
+
if (isPresent) {
|
|
9700
9754
|
final.value[key] = void 0;
|
|
9701
9755
|
}
|
|
9702
9756
|
} else {
|
|
@@ -9724,8 +9778,11 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
9724
9778
|
const keySet = def.keySet;
|
|
9725
9779
|
const _catchall = def.catchall._zod;
|
|
9726
9780
|
const t = _catchall.def.type;
|
|
9781
|
+
const isOptionalIn = _catchall.optin === "optional";
|
|
9727
9782
|
const isOptionalOut = _catchall.optout === "optional";
|
|
9728
9783
|
for (const key in input) {
|
|
9784
|
+
if (key === "__proto__")
|
|
9785
|
+
continue;
|
|
9729
9786
|
if (keySet.has(key))
|
|
9730
9787
|
continue;
|
|
9731
9788
|
if (t === "never") {
|
|
@@ -9734,9 +9791,9 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
9734
9791
|
}
|
|
9735
9792
|
const r = _catchall.run({ value: input[key], issues: [] }, ctx);
|
|
9736
9793
|
if (r instanceof Promise) {
|
|
9737
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
9794
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
9738
9795
|
} else {
|
|
9739
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
9796
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
9740
9797
|
}
|
|
9741
9798
|
}
|
|
9742
9799
|
if (unrecognized.length) {
|
|
@@ -9802,12 +9859,13 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
9802
9859
|
const shape = value.shape;
|
|
9803
9860
|
for (const key of value.keys) {
|
|
9804
9861
|
const el = shape[key];
|
|
9862
|
+
const isOptionalIn = el._zod.optin === "optional";
|
|
9805
9863
|
const isOptionalOut = el._zod.optout === "optional";
|
|
9806
9864
|
const r = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
9807
9865
|
if (r instanceof Promise) {
|
|
9808
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
9866
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
9809
9867
|
} else {
|
|
9810
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
9868
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
9811
9869
|
}
|
|
9812
9870
|
}
|
|
9813
9871
|
if (!catchall) {
|
|
@@ -9838,9 +9896,10 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
9838
9896
|
const id = ids[key];
|
|
9839
9897
|
const k = esc(key);
|
|
9840
9898
|
const schema = shape[key];
|
|
9899
|
+
const isOptionalIn = schema?._zod?.optin === "optional";
|
|
9841
9900
|
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
9842
9901
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
9843
|
-
if (isOptionalOut) {
|
|
9902
|
+
if (isOptionalIn && isOptionalOut) {
|
|
9844
9903
|
doc.write(`
|
|
9845
9904
|
if (${id}.issues.length) {
|
|
9846
9905
|
if (${k} in input) {
|
|
@@ -9859,6 +9918,33 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
9859
9918
|
newResult[${k}] = ${id}.value;
|
|
9860
9919
|
}
|
|
9861
9920
|
|
|
9921
|
+
`);
|
|
9922
|
+
} else if (!isOptionalIn) {
|
|
9923
|
+
doc.write(`
|
|
9924
|
+
const ${id}_present = ${k} in input;
|
|
9925
|
+
if (${id}.issues.length) {
|
|
9926
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
9927
|
+
...iss,
|
|
9928
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
9929
|
+
})));
|
|
9930
|
+
}
|
|
9931
|
+
if (!${id}_present && !${id}.issues.length) {
|
|
9932
|
+
payload.issues.push({
|
|
9933
|
+
code: "invalid_type",
|
|
9934
|
+
expected: "nonoptional",
|
|
9935
|
+
input: undefined,
|
|
9936
|
+
path: [${k}]
|
|
9937
|
+
});
|
|
9938
|
+
}
|
|
9939
|
+
|
|
9940
|
+
if (${id}_present) {
|
|
9941
|
+
if (${id}.value === undefined) {
|
|
9942
|
+
newResult[${k}] = undefined;
|
|
9943
|
+
} else {
|
|
9944
|
+
newResult[${k}] = ${id}.value;
|
|
9945
|
+
}
|
|
9946
|
+
}
|
|
9947
|
+
|
|
9862
9948
|
`);
|
|
9863
9949
|
} else {
|
|
9864
9950
|
doc.write(`
|
|
@@ -9952,10 +10038,9 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
|
9952
10038
|
}
|
|
9953
10039
|
return void 0;
|
|
9954
10040
|
});
|
|
9955
|
-
const
|
|
9956
|
-
const first = def.options[0]._zod.run;
|
|
10041
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
9957
10042
|
inst._zod.parse = (payload, ctx) => {
|
|
9958
|
-
if (
|
|
10043
|
+
if (first) {
|
|
9959
10044
|
return first(payload, ctx);
|
|
9960
10045
|
}
|
|
9961
10046
|
let async = false;
|
|
@@ -10008,10 +10093,9 @@ function handleExclusiveUnionResults(results, final, inst, ctx) {
|
|
|
10008
10093
|
var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
|
|
10009
10094
|
$ZodUnion.init(inst, def);
|
|
10010
10095
|
def.inclusive = false;
|
|
10011
|
-
const
|
|
10012
|
-
const first = def.options[0]._zod.run;
|
|
10096
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
10013
10097
|
inst._zod.parse = (payload, ctx) => {
|
|
10014
|
-
if (
|
|
10098
|
+
if (first) {
|
|
10015
10099
|
return first(payload, ctx);
|
|
10016
10100
|
}
|
|
10017
10101
|
let async = false;
|
|
@@ -10086,7 +10170,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
10086
10170
|
if (opt) {
|
|
10087
10171
|
return opt._zod.run(payload, ctx);
|
|
10088
10172
|
}
|
|
10089
|
-
if (def.unionFallback) {
|
|
10173
|
+
if (def.unionFallback || ctx.direction === "backward") {
|
|
10090
10174
|
return _super(payload, ctx);
|
|
10091
10175
|
}
|
|
10092
10176
|
payload.issues.push({
|
|
@@ -10094,6 +10178,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
10094
10178
|
errors: [],
|
|
10095
10179
|
note: "No matching discriminator",
|
|
10096
10180
|
discriminator: def.discriminator,
|
|
10181
|
+
options: Array.from(disc.value.keys()),
|
|
10097
10182
|
input,
|
|
10098
10183
|
path: [def.discriminator],
|
|
10099
10184
|
inst
|
|
@@ -10215,64 +10300,96 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
10215
10300
|
}
|
|
10216
10301
|
payload.value = [];
|
|
10217
10302
|
const proms = [];
|
|
10218
|
-
const
|
|
10219
|
-
const
|
|
10303
|
+
const optinStart = getTupleOptStart(items, "optin");
|
|
10304
|
+
const optoutStart = getTupleOptStart(items, "optout");
|
|
10220
10305
|
if (!def.rest) {
|
|
10221
|
-
|
|
10222
|
-
const tooSmall = input.length < optStart - 1;
|
|
10223
|
-
if (tooBig || tooSmall) {
|
|
10306
|
+
if (input.length < optinStart) {
|
|
10224
10307
|
payload.issues.push({
|
|
10225
|
-
|
|
10308
|
+
code: "too_small",
|
|
10309
|
+
minimum: optinStart,
|
|
10310
|
+
inclusive: true,
|
|
10226
10311
|
input,
|
|
10227
10312
|
inst,
|
|
10228
10313
|
origin: "array"
|
|
10229
10314
|
});
|
|
10230
10315
|
return payload;
|
|
10231
10316
|
}
|
|
10232
|
-
|
|
10233
|
-
|
|
10234
|
-
|
|
10235
|
-
|
|
10236
|
-
|
|
10237
|
-
|
|
10238
|
-
|
|
10317
|
+
if (input.length > items.length) {
|
|
10318
|
+
payload.issues.push({
|
|
10319
|
+
code: "too_big",
|
|
10320
|
+
maximum: items.length,
|
|
10321
|
+
inclusive: true,
|
|
10322
|
+
input,
|
|
10323
|
+
inst,
|
|
10324
|
+
origin: "array"
|
|
10325
|
+
});
|
|
10239
10326
|
}
|
|
10240
|
-
|
|
10241
|
-
|
|
10242
|
-
|
|
10243
|
-
}, ctx);
|
|
10244
|
-
if (
|
|
10245
|
-
proms.push(
|
|
10327
|
+
}
|
|
10328
|
+
const itemResults = new Array(items.length);
|
|
10329
|
+
for (let i = 0; i < items.length; i++) {
|
|
10330
|
+
const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
|
|
10331
|
+
if (r instanceof Promise) {
|
|
10332
|
+
proms.push(r.then((rr) => {
|
|
10333
|
+
itemResults[i] = rr;
|
|
10334
|
+
}));
|
|
10246
10335
|
} else {
|
|
10247
|
-
|
|
10336
|
+
itemResults[i] = r;
|
|
10248
10337
|
}
|
|
10249
10338
|
}
|
|
10250
10339
|
if (def.rest) {
|
|
10340
|
+
let i = items.length - 1;
|
|
10251
10341
|
const rest = input.slice(items.length);
|
|
10252
10342
|
for (const el of rest) {
|
|
10253
10343
|
i++;
|
|
10254
|
-
const result = def.rest._zod.run({
|
|
10255
|
-
value: el,
|
|
10256
|
-
issues: []
|
|
10257
|
-
}, ctx);
|
|
10344
|
+
const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
|
|
10258
10345
|
if (result instanceof Promise) {
|
|
10259
|
-
proms.push(result.then((
|
|
10346
|
+
proms.push(result.then((r) => handleTupleResult(r, payload, i)));
|
|
10260
10347
|
} else {
|
|
10261
10348
|
handleTupleResult(result, payload, i);
|
|
10262
10349
|
}
|
|
10263
10350
|
}
|
|
10264
10351
|
}
|
|
10265
|
-
if (proms.length)
|
|
10266
|
-
return Promise.all(proms).then(() => payload);
|
|
10267
|
-
|
|
10352
|
+
if (proms.length) {
|
|
10353
|
+
return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
|
|
10354
|
+
}
|
|
10355
|
+
return handleTupleResults(itemResults, payload, items, input, optoutStart);
|
|
10268
10356
|
};
|
|
10269
10357
|
});
|
|
10358
|
+
function getTupleOptStart(items, key) {
|
|
10359
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
10360
|
+
if (items[i]._zod[key] !== "optional")
|
|
10361
|
+
return i + 1;
|
|
10362
|
+
}
|
|
10363
|
+
return 0;
|
|
10364
|
+
}
|
|
10270
10365
|
function handleTupleResult(result, final, index) {
|
|
10271
10366
|
if (result.issues.length) {
|
|
10272
10367
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
10273
10368
|
}
|
|
10274
10369
|
final.value[index] = result.value;
|
|
10275
10370
|
}
|
|
10371
|
+
function handleTupleResults(itemResults, final, items, input, optoutStart) {
|
|
10372
|
+
for (let i = 0; i < items.length; i++) {
|
|
10373
|
+
const r = itemResults[i];
|
|
10374
|
+
const isPresent = i < input.length;
|
|
10375
|
+
if (r.issues.length) {
|
|
10376
|
+
if (!isPresent && i >= optoutStart) {
|
|
10377
|
+
final.value.length = i;
|
|
10378
|
+
break;
|
|
10379
|
+
}
|
|
10380
|
+
final.issues.push(...prefixIssues(i, r.issues));
|
|
10381
|
+
}
|
|
10382
|
+
final.value[i] = r.value;
|
|
10383
|
+
}
|
|
10384
|
+
for (let i = final.value.length - 1; i >= input.length; i--) {
|
|
10385
|
+
if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
|
|
10386
|
+
final.value.length = i;
|
|
10387
|
+
} else {
|
|
10388
|
+
break;
|
|
10389
|
+
}
|
|
10390
|
+
}
|
|
10391
|
+
return final;
|
|
10392
|
+
}
|
|
10276
10393
|
var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
10277
10394
|
$ZodType.init(inst, def);
|
|
10278
10395
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -10294,19 +10411,35 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
10294
10411
|
for (const key of values) {
|
|
10295
10412
|
if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
10296
10413
|
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
10414
|
+
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
10415
|
+
if (keyResult instanceof Promise) {
|
|
10416
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
10417
|
+
}
|
|
10418
|
+
if (keyResult.issues.length) {
|
|
10419
|
+
payload.issues.push({
|
|
10420
|
+
code: "invalid_key",
|
|
10421
|
+
origin: "record",
|
|
10422
|
+
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
10423
|
+
input: key,
|
|
10424
|
+
path: [key],
|
|
10425
|
+
inst
|
|
10426
|
+
});
|
|
10427
|
+
continue;
|
|
10428
|
+
}
|
|
10429
|
+
const outKey = keyResult.value;
|
|
10297
10430
|
const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
|
|
10298
10431
|
if (result instanceof Promise) {
|
|
10299
10432
|
proms.push(result.then((result2) => {
|
|
10300
10433
|
if (result2.issues.length) {
|
|
10301
10434
|
payload.issues.push(...prefixIssues(key, result2.issues));
|
|
10302
10435
|
}
|
|
10303
|
-
payload.value[
|
|
10436
|
+
payload.value[outKey] = result2.value;
|
|
10304
10437
|
}));
|
|
10305
10438
|
} else {
|
|
10306
10439
|
if (result.issues.length) {
|
|
10307
10440
|
payload.issues.push(...prefixIssues(key, result.issues));
|
|
10308
10441
|
}
|
|
10309
|
-
payload.value[
|
|
10442
|
+
payload.value[outKey] = result.value;
|
|
10310
10443
|
}
|
|
10311
10444
|
}
|
|
10312
10445
|
}
|
|
@@ -10330,6 +10463,8 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
10330
10463
|
for (const key of Reflect.ownKeys(input)) {
|
|
10331
10464
|
if (key === "__proto__")
|
|
10332
10465
|
continue;
|
|
10466
|
+
if (!Object.prototype.propertyIsEnumerable.call(input, key))
|
|
10467
|
+
continue;
|
|
10333
10468
|
let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
10334
10469
|
if (keyResult instanceof Promise) {
|
|
10335
10470
|
throw new Error("Async schemas not supported in object keys currently");
|
|
@@ -10822,6 +10957,11 @@ function handleCodecTxResult(left, value, nextSchema, ctx) {
|
|
|
10822
10957
|
}
|
|
10823
10958
|
return nextSchema._zod.run({ value, issues: left.issues }, ctx);
|
|
10824
10959
|
}
|
|
10960
|
+
var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
|
|
10961
|
+
$ZodPipe.init(inst, def);
|
|
10962
|
+
defineLazy(inst._zod, "optin", () => def.out._zod.optin);
|
|
10963
|
+
defineLazy(inst._zod, "optout", () => def.out._zod.optout);
|
|
10964
|
+
});
|
|
10825
10965
|
var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
10826
10966
|
$ZodType.init(inst, def);
|
|
10827
10967
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
@@ -10973,7 +11113,12 @@ var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => {
|
|
|
10973
11113
|
});
|
|
10974
11114
|
var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
10975
11115
|
$ZodType.init(inst, def);
|
|
10976
|
-
defineLazy(inst._zod, "innerType", () =>
|
|
11116
|
+
defineLazy(inst._zod, "innerType", () => {
|
|
11117
|
+
const d = def;
|
|
11118
|
+
if (!d._cachedInner)
|
|
11119
|
+
d._cachedInner = def.getter();
|
|
11120
|
+
return d._cachedInner;
|
|
11121
|
+
});
|
|
10977
11122
|
defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
|
|
10978
11123
|
defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
|
|
10979
11124
|
defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
|
|
@@ -11028,6 +11173,7 @@ __export(locales_exports, {
|
|
|
11028
11173
|
cs: () => cs_default,
|
|
11029
11174
|
da: () => da_default,
|
|
11030
11175
|
de: () => de_default,
|
|
11176
|
+
el: () => el_default,
|
|
11031
11177
|
en: () => en_default,
|
|
11032
11178
|
eo: () => eo_default,
|
|
11033
11179
|
es: () => es_default,
|
|
@@ -11036,6 +11182,7 @@ __export(locales_exports, {
|
|
|
11036
11182
|
fr: () => fr_default,
|
|
11037
11183
|
frCA: () => fr_CA_default,
|
|
11038
11184
|
he: () => he_default,
|
|
11185
|
+
hr: () => hr_default,
|
|
11039
11186
|
hu: () => hu_default,
|
|
11040
11187
|
hy: () => hy_default,
|
|
11041
11188
|
id: () => id_default,
|
|
@@ -11055,6 +11202,7 @@ __export(locales_exports, {
|
|
|
11055
11202
|
pl: () => pl_default,
|
|
11056
11203
|
ps: () => ps_default,
|
|
11057
11204
|
pt: () => pt_default,
|
|
11205
|
+
ro: () => ro_default,
|
|
11058
11206
|
ru: () => ru_default,
|
|
11059
11207
|
sl: () => sl_default,
|
|
11060
11208
|
sv: () => sv_default,
|
|
@@ -12008,8 +12156,118 @@ function de_default() {
|
|
|
12008
12156
|
};
|
|
12009
12157
|
}
|
|
12010
12158
|
|
|
12011
|
-
// ../../node_modules/zod/v4/locales/
|
|
12159
|
+
// ../../node_modules/zod/v4/locales/el.js
|
|
12012
12160
|
var error9 = () => {
|
|
12161
|
+
const Sizable = {
|
|
12162
|
+
string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
12163
|
+
file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
12164
|
+
array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
12165
|
+
set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
12166
|
+
map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
|
|
12167
|
+
};
|
|
12168
|
+
function getSizing(origin) {
|
|
12169
|
+
return Sizable[origin] ?? null;
|
|
12170
|
+
}
|
|
12171
|
+
const FormatDictionary = {
|
|
12172
|
+
regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
|
|
12173
|
+
email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
|
|
12174
|
+
url: "URL",
|
|
12175
|
+
emoji: "emoji",
|
|
12176
|
+
uuid: "UUID",
|
|
12177
|
+
uuidv4: "UUIDv4",
|
|
12178
|
+
uuidv6: "UUIDv6",
|
|
12179
|
+
nanoid: "nanoid",
|
|
12180
|
+
guid: "GUID",
|
|
12181
|
+
cuid: "cuid",
|
|
12182
|
+
cuid2: "cuid2",
|
|
12183
|
+
ulid: "ULID",
|
|
12184
|
+
xid: "XID",
|
|
12185
|
+
ksuid: "KSUID",
|
|
12186
|
+
datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
|
|
12187
|
+
date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
|
|
12188
|
+
time: "ISO \u03CE\u03C1\u03B1",
|
|
12189
|
+
duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
|
|
12190
|
+
ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
|
|
12191
|
+
ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
|
|
12192
|
+
mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
|
|
12193
|
+
cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
|
|
12194
|
+
cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
|
|
12195
|
+
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",
|
|
12196
|
+
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",
|
|
12197
|
+
json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
|
|
12198
|
+
e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
|
|
12199
|
+
jwt: "JWT",
|
|
12200
|
+
template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
|
|
12201
|
+
};
|
|
12202
|
+
const TypeDictionary = {
|
|
12203
|
+
nan: "NaN"
|
|
12204
|
+
};
|
|
12205
|
+
return (issue2) => {
|
|
12206
|
+
switch (issue2.code) {
|
|
12207
|
+
case "invalid_type": {
|
|
12208
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
12209
|
+
const receivedType = parsedType(issue2.input);
|
|
12210
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
12211
|
+
if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
|
|
12212
|
+
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}`;
|
|
12213
|
+
}
|
|
12214
|
+
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}`;
|
|
12215
|
+
}
|
|
12216
|
+
case "invalid_value":
|
|
12217
|
+
if (issue2.values.length === 1)
|
|
12218
|
+
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])}`;
|
|
12219
|
+
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, "|")}`;
|
|
12220
|
+
case "too_big": {
|
|
12221
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
12222
|
+
const sizing = getSizing(issue2.origin);
|
|
12223
|
+
if (sizing)
|
|
12224
|
+
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"}`;
|
|
12225
|
+
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()}`;
|
|
12226
|
+
}
|
|
12227
|
+
case "too_small": {
|
|
12228
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
12229
|
+
const sizing = getSizing(issue2.origin);
|
|
12230
|
+
if (sizing) {
|
|
12231
|
+
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}`;
|
|
12232
|
+
}
|
|
12233
|
+
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()}`;
|
|
12234
|
+
}
|
|
12235
|
+
case "invalid_format": {
|
|
12236
|
+
const _issue = issue2;
|
|
12237
|
+
if (_issue.format === "starts_with") {
|
|
12238
|
+
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}"`;
|
|
12239
|
+
}
|
|
12240
|
+
if (_issue.format === "ends_with")
|
|
12241
|
+
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}"`;
|
|
12242
|
+
if (_issue.format === "includes")
|
|
12243
|
+
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}"`;
|
|
12244
|
+
if (_issue.format === "regex")
|
|
12245
|
+
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}`;
|
|
12246
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
12247
|
+
}
|
|
12248
|
+
case "not_multiple_of":
|
|
12249
|
+
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}`;
|
|
12250
|
+
case "unrecognized_keys":
|
|
12251
|
+
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, ", ")}`;
|
|
12252
|
+
case "invalid_key":
|
|
12253
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
12254
|
+
case "invalid_union":
|
|
12255
|
+
return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
|
|
12256
|
+
case "invalid_element":
|
|
12257
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
12258
|
+
default:
|
|
12259
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
|
|
12260
|
+
}
|
|
12261
|
+
};
|
|
12262
|
+
};
|
|
12263
|
+
function el_default() {
|
|
12264
|
+
return {
|
|
12265
|
+
localeError: error9()
|
|
12266
|
+
};
|
|
12267
|
+
}
|
|
12268
|
+
|
|
12269
|
+
// ../../node_modules/zod/v4/locales/en.js
|
|
12270
|
+
var error10 = () => {
|
|
12013
12271
|
const Sizable = {
|
|
12014
12272
|
string: { unit: "characters", verb: "to have" },
|
|
12015
12273
|
file: { unit: "bytes", verb: "to have" },
|
|
@@ -12103,6 +12361,10 @@ var error9 = () => {
|
|
|
12103
12361
|
case "invalid_key":
|
|
12104
12362
|
return `Invalid key in ${issue2.origin}`;
|
|
12105
12363
|
case "invalid_union":
|
|
12364
|
+
if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
|
|
12365
|
+
const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
|
|
12366
|
+
return `Invalid discriminator value. Expected ${opts}`;
|
|
12367
|
+
}
|
|
12106
12368
|
return "Invalid input";
|
|
12107
12369
|
case "invalid_element":
|
|
12108
12370
|
return `Invalid value in ${issue2.origin}`;
|
|
@@ -12113,12 +12375,12 @@ var error9 = () => {
|
|
|
12113
12375
|
};
|
|
12114
12376
|
function en_default() {
|
|
12115
12377
|
return {
|
|
12116
|
-
localeError:
|
|
12378
|
+
localeError: error10()
|
|
12117
12379
|
};
|
|
12118
12380
|
}
|
|
12119
12381
|
|
|
12120
12382
|
// ../../node_modules/zod/v4/locales/eo.js
|
|
12121
|
-
var
|
|
12383
|
+
var error11 = () => {
|
|
12122
12384
|
const Sizable = {
|
|
12123
12385
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
12124
12386
|
file: { unit: "bajtojn", verb: "havi" },
|
|
@@ -12223,12 +12485,12 @@ var error10 = () => {
|
|
|
12223
12485
|
};
|
|
12224
12486
|
function eo_default() {
|
|
12225
12487
|
return {
|
|
12226
|
-
localeError:
|
|
12488
|
+
localeError: error11()
|
|
12227
12489
|
};
|
|
12228
12490
|
}
|
|
12229
12491
|
|
|
12230
12492
|
// ../../node_modules/zod/v4/locales/es.js
|
|
12231
|
-
var
|
|
12493
|
+
var error12 = () => {
|
|
12232
12494
|
const Sizable = {
|
|
12233
12495
|
string: { unit: "caracteres", verb: "tener" },
|
|
12234
12496
|
file: { unit: "bytes", verb: "tener" },
|
|
@@ -12356,12 +12618,12 @@ var error11 = () => {
|
|
|
12356
12618
|
};
|
|
12357
12619
|
function es_default() {
|
|
12358
12620
|
return {
|
|
12359
|
-
localeError:
|
|
12621
|
+
localeError: error12()
|
|
12360
12622
|
};
|
|
12361
12623
|
}
|
|
12362
12624
|
|
|
12363
12625
|
// ../../node_modules/zod/v4/locales/fa.js
|
|
12364
|
-
var
|
|
12626
|
+
var error13 = () => {
|
|
12365
12627
|
const Sizable = {
|
|
12366
12628
|
string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
12367
12629
|
file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
@@ -12471,12 +12733,12 @@ var error12 = () => {
|
|
|
12471
12733
|
};
|
|
12472
12734
|
function fa_default() {
|
|
12473
12735
|
return {
|
|
12474
|
-
localeError:
|
|
12736
|
+
localeError: error13()
|
|
12475
12737
|
};
|
|
12476
12738
|
}
|
|
12477
12739
|
|
|
12478
12740
|
// ../../node_modules/zod/v4/locales/fi.js
|
|
12479
|
-
var
|
|
12741
|
+
var error14 = () => {
|
|
12480
12742
|
const Sizable = {
|
|
12481
12743
|
string: { unit: "merkki\xE4", subject: "merkkijonon" },
|
|
12482
12744
|
file: { unit: "tavua", subject: "tiedoston" },
|
|
@@ -12584,12 +12846,12 @@ var error13 = () => {
|
|
|
12584
12846
|
};
|
|
12585
12847
|
function fi_default() {
|
|
12586
12848
|
return {
|
|
12587
|
-
localeError:
|
|
12849
|
+
localeError: error14()
|
|
12588
12850
|
};
|
|
12589
12851
|
}
|
|
12590
12852
|
|
|
12591
12853
|
// ../../node_modules/zod/v4/locales/fr.js
|
|
12592
|
-
var
|
|
12854
|
+
var error15 = () => {
|
|
12593
12855
|
const Sizable = {
|
|
12594
12856
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
12595
12857
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -12630,9 +12892,27 @@ var error14 = () => {
|
|
|
12630
12892
|
template_literal: "entr\xE9e"
|
|
12631
12893
|
};
|
|
12632
12894
|
const TypeDictionary = {
|
|
12633
|
-
|
|
12895
|
+
string: "cha\xEEne",
|
|
12634
12896
|
number: "nombre",
|
|
12635
|
-
|
|
12897
|
+
int: "entier",
|
|
12898
|
+
boolean: "bool\xE9en",
|
|
12899
|
+
bigint: "grand entier",
|
|
12900
|
+
symbol: "symbole",
|
|
12901
|
+
undefined: "ind\xE9fini",
|
|
12902
|
+
null: "null",
|
|
12903
|
+
never: "jamais",
|
|
12904
|
+
void: "vide",
|
|
12905
|
+
date: "date",
|
|
12906
|
+
array: "tableau",
|
|
12907
|
+
object: "objet",
|
|
12908
|
+
tuple: "tuple",
|
|
12909
|
+
record: "enregistrement",
|
|
12910
|
+
map: "carte",
|
|
12911
|
+
set: "ensemble",
|
|
12912
|
+
file: "fichier",
|
|
12913
|
+
nonoptional: "non-optionnel",
|
|
12914
|
+
nan: "NaN",
|
|
12915
|
+
function: "fonction"
|
|
12636
12916
|
};
|
|
12637
12917
|
return (issue2) => {
|
|
12638
12918
|
switch (issue2.code) {
|
|
@@ -12653,16 +12933,15 @@ var error14 = () => {
|
|
|
12653
12933
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
12654
12934
|
const sizing = getSizing(issue2.origin);
|
|
12655
12935
|
if (sizing)
|
|
12656
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
12657
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
12936
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
12937
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
12658
12938
|
}
|
|
12659
12939
|
case "too_small": {
|
|
12660
12940
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
12661
12941
|
const sizing = getSizing(issue2.origin);
|
|
12662
|
-
if (sizing)
|
|
12663
|
-
return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
12664
|
-
}
|
|
12665
|
-
return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
12942
|
+
if (sizing)
|
|
12943
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
12944
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
12666
12945
|
}
|
|
12667
12946
|
case "invalid_format": {
|
|
12668
12947
|
const _issue = issue2;
|
|
@@ -12693,12 +12972,12 @@ var error14 = () => {
|
|
|
12693
12972
|
};
|
|
12694
12973
|
function fr_default() {
|
|
12695
12974
|
return {
|
|
12696
|
-
localeError:
|
|
12975
|
+
localeError: error15()
|
|
12697
12976
|
};
|
|
12698
12977
|
}
|
|
12699
12978
|
|
|
12700
12979
|
// ../../node_modules/zod/v4/locales/fr-CA.js
|
|
12701
|
-
var
|
|
12980
|
+
var error16 = () => {
|
|
12702
12981
|
const Sizable = {
|
|
12703
12982
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
12704
12983
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -12801,12 +13080,12 @@ var error15 = () => {
|
|
|
12801
13080
|
};
|
|
12802
13081
|
function fr_CA_default() {
|
|
12803
13082
|
return {
|
|
12804
|
-
localeError:
|
|
13083
|
+
localeError: error16()
|
|
12805
13084
|
};
|
|
12806
13085
|
}
|
|
12807
13086
|
|
|
12808
13087
|
// ../../node_modules/zod/v4/locales/he.js
|
|
12809
|
-
var
|
|
13088
|
+
var error17 = () => {
|
|
12810
13089
|
const TypeNames = {
|
|
12811
13090
|
string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
|
|
12812
13091
|
number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
|
|
@@ -12996,24 +13275,24 @@ var error16 = () => {
|
|
|
12996
13275
|
};
|
|
12997
13276
|
function he_default() {
|
|
12998
13277
|
return {
|
|
12999
|
-
localeError:
|
|
13278
|
+
localeError: error17()
|
|
13000
13279
|
};
|
|
13001
13280
|
}
|
|
13002
13281
|
|
|
13003
|
-
// ../../node_modules/zod/v4/locales/
|
|
13004
|
-
var
|
|
13282
|
+
// ../../node_modules/zod/v4/locales/hr.js
|
|
13283
|
+
var error18 = () => {
|
|
13005
13284
|
const Sizable = {
|
|
13006
|
-
string: { unit: "
|
|
13007
|
-
file: { unit: "
|
|
13008
|
-
array: { unit: "
|
|
13009
|
-
set: { unit: "
|
|
13285
|
+
string: { unit: "znakova", verb: "imati" },
|
|
13286
|
+
file: { unit: "bajtova", verb: "imati" },
|
|
13287
|
+
array: { unit: "stavki", verb: "imati" },
|
|
13288
|
+
set: { unit: "stavki", verb: "imati" }
|
|
13010
13289
|
};
|
|
13011
13290
|
function getSizing(origin) {
|
|
13012
13291
|
return Sizable[origin] ?? null;
|
|
13013
13292
|
}
|
|
13014
13293
|
const FormatDictionary = {
|
|
13015
|
-
regex: "
|
|
13016
|
-
email: "email
|
|
13294
|
+
regex: "unos",
|
|
13295
|
+
email: "email adresa",
|
|
13017
13296
|
url: "URL",
|
|
13018
13297
|
emoji: "emoji",
|
|
13019
13298
|
uuid: "UUID",
|
|
@@ -13026,7 +13305,130 @@ var error17 = () => {
|
|
|
13026
13305
|
ulid: "ULID",
|
|
13027
13306
|
xid: "XID",
|
|
13028
13307
|
ksuid: "KSUID",
|
|
13029
|
-
datetime: "ISO
|
|
13308
|
+
datetime: "ISO datum i vrijeme",
|
|
13309
|
+
date: "ISO datum",
|
|
13310
|
+
time: "ISO vrijeme",
|
|
13311
|
+
duration: "ISO trajanje",
|
|
13312
|
+
ipv4: "IPv4 adresa",
|
|
13313
|
+
ipv6: "IPv6 adresa",
|
|
13314
|
+
cidrv4: "IPv4 raspon",
|
|
13315
|
+
cidrv6: "IPv6 raspon",
|
|
13316
|
+
base64: "base64 kodirani tekst",
|
|
13317
|
+
base64url: "base64url kodirani tekst",
|
|
13318
|
+
json_string: "JSON tekst",
|
|
13319
|
+
e164: "E.164 broj",
|
|
13320
|
+
jwt: "JWT",
|
|
13321
|
+
template_literal: "unos"
|
|
13322
|
+
};
|
|
13323
|
+
const TypeDictionary = {
|
|
13324
|
+
nan: "NaN",
|
|
13325
|
+
string: "tekst",
|
|
13326
|
+
number: "broj",
|
|
13327
|
+
boolean: "boolean",
|
|
13328
|
+
array: "niz",
|
|
13329
|
+
object: "objekt",
|
|
13330
|
+
set: "skup",
|
|
13331
|
+
file: "datoteka",
|
|
13332
|
+
date: "datum",
|
|
13333
|
+
bigint: "bigint",
|
|
13334
|
+
symbol: "simbol",
|
|
13335
|
+
undefined: "undefined",
|
|
13336
|
+
null: "null",
|
|
13337
|
+
function: "funkcija",
|
|
13338
|
+
map: "mapa"
|
|
13339
|
+
};
|
|
13340
|
+
return (issue2) => {
|
|
13341
|
+
switch (issue2.code) {
|
|
13342
|
+
case "invalid_type": {
|
|
13343
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
13344
|
+
const receivedType = parsedType(issue2.input);
|
|
13345
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
13346
|
+
if (/^[A-Z]/.test(issue2.expected)) {
|
|
13347
|
+
return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
|
|
13348
|
+
}
|
|
13349
|
+
return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
|
|
13350
|
+
}
|
|
13351
|
+
case "invalid_value":
|
|
13352
|
+
if (issue2.values.length === 1)
|
|
13353
|
+
return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
|
|
13354
|
+
return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
|
|
13355
|
+
case "too_big": {
|
|
13356
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
13357
|
+
const sizing = getSizing(issue2.origin);
|
|
13358
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
13359
|
+
if (sizing)
|
|
13360
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
|
|
13361
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
|
|
13362
|
+
}
|
|
13363
|
+
case "too_small": {
|
|
13364
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
13365
|
+
const sizing = getSizing(issue2.origin);
|
|
13366
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
13367
|
+
if (sizing) {
|
|
13368
|
+
return `Premalo: o\u010Dekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
13369
|
+
}
|
|
13370
|
+
return `Premalo: o\u010Dekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
|
|
13371
|
+
}
|
|
13372
|
+
case "invalid_format": {
|
|
13373
|
+
const _issue = issue2;
|
|
13374
|
+
if (_issue.format === "starts_with")
|
|
13375
|
+
return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
|
|
13376
|
+
if (_issue.format === "ends_with")
|
|
13377
|
+
return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
|
|
13378
|
+
if (_issue.format === "includes")
|
|
13379
|
+
return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
|
|
13380
|
+
if (_issue.format === "regex")
|
|
13381
|
+
return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
|
|
13382
|
+
return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
13383
|
+
}
|
|
13384
|
+
case "not_multiple_of":
|
|
13385
|
+
return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
|
|
13386
|
+
case "unrecognized_keys":
|
|
13387
|
+
return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
|
|
13388
|
+
case "invalid_key":
|
|
13389
|
+
return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
13390
|
+
case "invalid_union":
|
|
13391
|
+
return "Neispravan unos";
|
|
13392
|
+
case "invalid_element":
|
|
13393
|
+
return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
13394
|
+
default:
|
|
13395
|
+
return `Neispravan unos`;
|
|
13396
|
+
}
|
|
13397
|
+
};
|
|
13398
|
+
};
|
|
13399
|
+
function hr_default() {
|
|
13400
|
+
return {
|
|
13401
|
+
localeError: error18()
|
|
13402
|
+
};
|
|
13403
|
+
}
|
|
13404
|
+
|
|
13405
|
+
// ../../node_modules/zod/v4/locales/hu.js
|
|
13406
|
+
var error19 = () => {
|
|
13407
|
+
const Sizable = {
|
|
13408
|
+
string: { unit: "karakter", verb: "legyen" },
|
|
13409
|
+
file: { unit: "byte", verb: "legyen" },
|
|
13410
|
+
array: { unit: "elem", verb: "legyen" },
|
|
13411
|
+
set: { unit: "elem", verb: "legyen" }
|
|
13412
|
+
};
|
|
13413
|
+
function getSizing(origin) {
|
|
13414
|
+
return Sizable[origin] ?? null;
|
|
13415
|
+
}
|
|
13416
|
+
const FormatDictionary = {
|
|
13417
|
+
regex: "bemenet",
|
|
13418
|
+
email: "email c\xEDm",
|
|
13419
|
+
url: "URL",
|
|
13420
|
+
emoji: "emoji",
|
|
13421
|
+
uuid: "UUID",
|
|
13422
|
+
uuidv4: "UUIDv4",
|
|
13423
|
+
uuidv6: "UUIDv6",
|
|
13424
|
+
nanoid: "nanoid",
|
|
13425
|
+
guid: "GUID",
|
|
13426
|
+
cuid: "cuid",
|
|
13427
|
+
cuid2: "cuid2",
|
|
13428
|
+
ulid: "ULID",
|
|
13429
|
+
xid: "XID",
|
|
13430
|
+
ksuid: "KSUID",
|
|
13431
|
+
datetime: "ISO id\u0151b\xE9lyeg",
|
|
13030
13432
|
date: "ISO d\xE1tum",
|
|
13031
13433
|
time: "ISO id\u0151",
|
|
13032
13434
|
duration: "ISO id\u0151intervallum",
|
|
@@ -13105,7 +13507,7 @@ var error17 = () => {
|
|
|
13105
13507
|
};
|
|
13106
13508
|
function hu_default() {
|
|
13107
13509
|
return {
|
|
13108
|
-
localeError:
|
|
13510
|
+
localeError: error19()
|
|
13109
13511
|
};
|
|
13110
13512
|
}
|
|
13111
13513
|
|
|
@@ -13120,7 +13522,7 @@ function withDefiniteArticle(word) {
|
|
|
13120
13522
|
const lastChar = word[word.length - 1];
|
|
13121
13523
|
return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568");
|
|
13122
13524
|
}
|
|
13123
|
-
var
|
|
13525
|
+
var error20 = () => {
|
|
13124
13526
|
const Sizable = {
|
|
13125
13527
|
string: {
|
|
13126
13528
|
unit: {
|
|
@@ -13253,12 +13655,12 @@ var error18 = () => {
|
|
|
13253
13655
|
};
|
|
13254
13656
|
function hy_default() {
|
|
13255
13657
|
return {
|
|
13256
|
-
localeError:
|
|
13658
|
+
localeError: error20()
|
|
13257
13659
|
};
|
|
13258
13660
|
}
|
|
13259
13661
|
|
|
13260
13662
|
// ../../node_modules/zod/v4/locales/id.js
|
|
13261
|
-
var
|
|
13663
|
+
var error21 = () => {
|
|
13262
13664
|
const Sizable = {
|
|
13263
13665
|
string: { unit: "karakter", verb: "memiliki" },
|
|
13264
13666
|
file: { unit: "byte", verb: "memiliki" },
|
|
@@ -13360,12 +13762,12 @@ var error19 = () => {
|
|
|
13360
13762
|
};
|
|
13361
13763
|
function id_default() {
|
|
13362
13764
|
return {
|
|
13363
|
-
localeError:
|
|
13765
|
+
localeError: error21()
|
|
13364
13766
|
};
|
|
13365
13767
|
}
|
|
13366
13768
|
|
|
13367
13769
|
// ../../node_modules/zod/v4/locales/is.js
|
|
13368
|
-
var
|
|
13770
|
+
var error22 = () => {
|
|
13369
13771
|
const Sizable = {
|
|
13370
13772
|
string: { unit: "stafi", verb: "a\xF0 hafa" },
|
|
13371
13773
|
file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
|
|
@@ -13470,12 +13872,12 @@ var error20 = () => {
|
|
|
13470
13872
|
};
|
|
13471
13873
|
function is_default() {
|
|
13472
13874
|
return {
|
|
13473
|
-
localeError:
|
|
13875
|
+
localeError: error22()
|
|
13474
13876
|
};
|
|
13475
13877
|
}
|
|
13476
13878
|
|
|
13477
13879
|
// ../../node_modules/zod/v4/locales/it.js
|
|
13478
|
-
var
|
|
13880
|
+
var error23 = () => {
|
|
13479
13881
|
const Sizable = {
|
|
13480
13882
|
string: { unit: "caratteri", verb: "avere" },
|
|
13481
13883
|
file: { unit: "byte", verb: "avere" },
|
|
@@ -13560,7 +13962,7 @@ var error21 = () => {
|
|
|
13560
13962
|
return `Stringa non valida: deve includere "${_issue.includes}"`;
|
|
13561
13963
|
if (_issue.format === "regex")
|
|
13562
13964
|
return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
|
|
13563
|
-
return `
|
|
13965
|
+
return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
13564
13966
|
}
|
|
13565
13967
|
case "not_multiple_of":
|
|
13566
13968
|
return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
|
|
@@ -13579,12 +13981,12 @@ var error21 = () => {
|
|
|
13579
13981
|
};
|
|
13580
13982
|
function it_default() {
|
|
13581
13983
|
return {
|
|
13582
|
-
localeError:
|
|
13984
|
+
localeError: error23()
|
|
13583
13985
|
};
|
|
13584
13986
|
}
|
|
13585
13987
|
|
|
13586
13988
|
// ../../node_modules/zod/v4/locales/ja.js
|
|
13587
|
-
var
|
|
13989
|
+
var error24 = () => {
|
|
13588
13990
|
const Sizable = {
|
|
13589
13991
|
string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
|
|
13590
13992
|
file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
|
|
@@ -13687,12 +14089,12 @@ var error22 = () => {
|
|
|
13687
14089
|
};
|
|
13688
14090
|
function ja_default() {
|
|
13689
14091
|
return {
|
|
13690
|
-
localeError:
|
|
14092
|
+
localeError: error24()
|
|
13691
14093
|
};
|
|
13692
14094
|
}
|
|
13693
14095
|
|
|
13694
14096
|
// ../../node_modules/zod/v4/locales/ka.js
|
|
13695
|
-
var
|
|
14097
|
+
var error25 = () => {
|
|
13696
14098
|
const Sizable = {
|
|
13697
14099
|
string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
13698
14100
|
file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
@@ -13725,9 +14127,9 @@ var error23 = () => {
|
|
|
13725
14127
|
ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
|
|
13726
14128
|
cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
13727
14129
|
cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
13728
|
-
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
13729
|
-
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
13730
|
-
json_string: "JSON \
|
|
14130
|
+
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
14131
|
+
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
14132
|
+
json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
|
|
13731
14133
|
e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
|
|
13732
14134
|
jwt: "JWT",
|
|
13733
14135
|
template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
|
|
@@ -13735,7 +14137,7 @@ var error23 = () => {
|
|
|
13735
14137
|
const TypeDictionary = {
|
|
13736
14138
|
nan: "NaN",
|
|
13737
14139
|
number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
|
|
13738
|
-
string: "\
|
|
14140
|
+
string: "\u10D5\u10D4\u10DA\u10D8",
|
|
13739
14141
|
boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
|
|
13740
14142
|
function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
|
|
13741
14143
|
array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
|
|
@@ -13773,14 +14175,14 @@ var error23 = () => {
|
|
|
13773
14175
|
case "invalid_format": {
|
|
13774
14176
|
const _issue = issue2;
|
|
13775
14177
|
if (_issue.format === "starts_with") {
|
|
13776
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
14178
|
+
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`;
|
|
13777
14179
|
}
|
|
13778
14180
|
if (_issue.format === "ends_with")
|
|
13779
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
14181
|
+
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`;
|
|
13780
14182
|
if (_issue.format === "includes")
|
|
13781
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
14183
|
+
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`;
|
|
13782
14184
|
if (_issue.format === "regex")
|
|
13783
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
14185
|
+
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}`;
|
|
13784
14186
|
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
13785
14187
|
}
|
|
13786
14188
|
case "not_multiple_of":
|
|
@@ -13800,12 +14202,12 @@ var error23 = () => {
|
|
|
13800
14202
|
};
|
|
13801
14203
|
function ka_default() {
|
|
13802
14204
|
return {
|
|
13803
|
-
localeError:
|
|
14205
|
+
localeError: error25()
|
|
13804
14206
|
};
|
|
13805
14207
|
}
|
|
13806
14208
|
|
|
13807
14209
|
// ../../node_modules/zod/v4/locales/km.js
|
|
13808
|
-
var
|
|
14210
|
+
var error26 = () => {
|
|
13809
14211
|
const Sizable = {
|
|
13810
14212
|
string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
13811
14213
|
file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
@@ -13911,7 +14313,7 @@ var error24 = () => {
|
|
|
13911
14313
|
};
|
|
13912
14314
|
function km_default() {
|
|
13913
14315
|
return {
|
|
13914
|
-
localeError:
|
|
14316
|
+
localeError: error26()
|
|
13915
14317
|
};
|
|
13916
14318
|
}
|
|
13917
14319
|
|
|
@@ -13921,7 +14323,7 @@ function kh_default() {
|
|
|
13921
14323
|
}
|
|
13922
14324
|
|
|
13923
14325
|
// ../../node_modules/zod/v4/locales/ko.js
|
|
13924
|
-
var
|
|
14326
|
+
var error27 = () => {
|
|
13925
14327
|
const Sizable = {
|
|
13926
14328
|
string: { unit: "\uBB38\uC790", verb: "to have" },
|
|
13927
14329
|
file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
|
|
@@ -14028,7 +14430,7 @@ var error25 = () => {
|
|
|
14028
14430
|
};
|
|
14029
14431
|
function ko_default() {
|
|
14030
14432
|
return {
|
|
14031
|
-
localeError:
|
|
14433
|
+
localeError: error27()
|
|
14032
14434
|
};
|
|
14033
14435
|
}
|
|
14034
14436
|
|
|
@@ -14046,7 +14448,7 @@ function getUnitTypeFromNumber(number4) {
|
|
|
14046
14448
|
return "one";
|
|
14047
14449
|
return "few";
|
|
14048
14450
|
}
|
|
14049
|
-
var
|
|
14451
|
+
var error28 = () => {
|
|
14050
14452
|
const Sizable = {
|
|
14051
14453
|
string: {
|
|
14052
14454
|
unit: {
|
|
@@ -14232,12 +14634,12 @@ var error26 = () => {
|
|
|
14232
14634
|
};
|
|
14233
14635
|
function lt_default() {
|
|
14234
14636
|
return {
|
|
14235
|
-
localeError:
|
|
14637
|
+
localeError: error28()
|
|
14236
14638
|
};
|
|
14237
14639
|
}
|
|
14238
14640
|
|
|
14239
14641
|
// ../../node_modules/zod/v4/locales/mk.js
|
|
14240
|
-
var
|
|
14642
|
+
var error29 = () => {
|
|
14241
14643
|
const Sizable = {
|
|
14242
14644
|
string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
14243
14645
|
file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
@@ -14342,12 +14744,12 @@ var error27 = () => {
|
|
|
14342
14744
|
};
|
|
14343
14745
|
function mk_default() {
|
|
14344
14746
|
return {
|
|
14345
|
-
localeError:
|
|
14747
|
+
localeError: error29()
|
|
14346
14748
|
};
|
|
14347
14749
|
}
|
|
14348
14750
|
|
|
14349
14751
|
// ../../node_modules/zod/v4/locales/ms.js
|
|
14350
|
-
var
|
|
14752
|
+
var error30 = () => {
|
|
14351
14753
|
const Sizable = {
|
|
14352
14754
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
14353
14755
|
file: { unit: "bait", verb: "mempunyai" },
|
|
@@ -14450,12 +14852,12 @@ var error28 = () => {
|
|
|
14450
14852
|
};
|
|
14451
14853
|
function ms_default() {
|
|
14452
14854
|
return {
|
|
14453
|
-
localeError:
|
|
14855
|
+
localeError: error30()
|
|
14454
14856
|
};
|
|
14455
14857
|
}
|
|
14456
14858
|
|
|
14457
14859
|
// ../../node_modules/zod/v4/locales/nl.js
|
|
14458
|
-
var
|
|
14860
|
+
var error31 = () => {
|
|
14459
14861
|
const Sizable = {
|
|
14460
14862
|
string: { unit: "tekens", verb: "heeft" },
|
|
14461
14863
|
file: { unit: "bytes", verb: "heeft" },
|
|
@@ -14561,12 +14963,12 @@ var error29 = () => {
|
|
|
14561
14963
|
};
|
|
14562
14964
|
function nl_default() {
|
|
14563
14965
|
return {
|
|
14564
|
-
localeError:
|
|
14966
|
+
localeError: error31()
|
|
14565
14967
|
};
|
|
14566
14968
|
}
|
|
14567
14969
|
|
|
14568
14970
|
// ../../node_modules/zod/v4/locales/no.js
|
|
14569
|
-
var
|
|
14971
|
+
var error32 = () => {
|
|
14570
14972
|
const Sizable = {
|
|
14571
14973
|
string: { unit: "tegn", verb: "\xE5 ha" },
|
|
14572
14974
|
file: { unit: "bytes", verb: "\xE5 ha" },
|
|
@@ -14670,12 +15072,12 @@ var error30 = () => {
|
|
|
14670
15072
|
};
|
|
14671
15073
|
function no_default() {
|
|
14672
15074
|
return {
|
|
14673
|
-
localeError:
|
|
15075
|
+
localeError: error32()
|
|
14674
15076
|
};
|
|
14675
15077
|
}
|
|
14676
15078
|
|
|
14677
15079
|
// ../../node_modules/zod/v4/locales/ota.js
|
|
14678
|
-
var
|
|
15080
|
+
var error33 = () => {
|
|
14679
15081
|
const Sizable = {
|
|
14680
15082
|
string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
|
|
14681
15083
|
file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
|
|
@@ -14780,12 +15182,12 @@ var error31 = () => {
|
|
|
14780
15182
|
};
|
|
14781
15183
|
function ota_default() {
|
|
14782
15184
|
return {
|
|
14783
|
-
localeError:
|
|
15185
|
+
localeError: error33()
|
|
14784
15186
|
};
|
|
14785
15187
|
}
|
|
14786
15188
|
|
|
14787
15189
|
// ../../node_modules/zod/v4/locales/ps.js
|
|
14788
|
-
var
|
|
15190
|
+
var error34 = () => {
|
|
14789
15191
|
const Sizable = {
|
|
14790
15192
|
string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
|
|
14791
15193
|
file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
|
|
@@ -14895,12 +15297,12 @@ var error32 = () => {
|
|
|
14895
15297
|
};
|
|
14896
15298
|
function ps_default() {
|
|
14897
15299
|
return {
|
|
14898
|
-
localeError:
|
|
15300
|
+
localeError: error34()
|
|
14899
15301
|
};
|
|
14900
15302
|
}
|
|
14901
15303
|
|
|
14902
15304
|
// ../../node_modules/zod/v4/locales/pl.js
|
|
14903
|
-
var
|
|
15305
|
+
var error35 = () => {
|
|
14904
15306
|
const Sizable = {
|
|
14905
15307
|
string: { unit: "znak\xF3w", verb: "mie\u0107" },
|
|
14906
15308
|
file: { unit: "bajt\xF3w", verb: "mie\u0107" },
|
|
@@ -15005,12 +15407,12 @@ var error33 = () => {
|
|
|
15005
15407
|
};
|
|
15006
15408
|
function pl_default() {
|
|
15007
15409
|
return {
|
|
15008
|
-
localeError:
|
|
15410
|
+
localeError: error35()
|
|
15009
15411
|
};
|
|
15010
15412
|
}
|
|
15011
15413
|
|
|
15012
15414
|
// ../../node_modules/zod/v4/locales/pt.js
|
|
15013
|
-
var
|
|
15415
|
+
var error36 = () => {
|
|
15014
15416
|
const Sizable = {
|
|
15015
15417
|
string: { unit: "caracteres", verb: "ter" },
|
|
15016
15418
|
file: { unit: "bytes", verb: "ter" },
|
|
@@ -15114,7 +15516,127 @@ var error34 = () => {
|
|
|
15114
15516
|
};
|
|
15115
15517
|
function pt_default() {
|
|
15116
15518
|
return {
|
|
15117
|
-
localeError:
|
|
15519
|
+
localeError: error36()
|
|
15520
|
+
};
|
|
15521
|
+
}
|
|
15522
|
+
|
|
15523
|
+
// ../../node_modules/zod/v4/locales/ro.js
|
|
15524
|
+
var error37 = () => {
|
|
15525
|
+
const Sizable = {
|
|
15526
|
+
string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
|
|
15527
|
+
file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
|
|
15528
|
+
array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
15529
|
+
set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
15530
|
+
map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
|
|
15531
|
+
};
|
|
15532
|
+
function getSizing(origin) {
|
|
15533
|
+
return Sizable[origin] ?? null;
|
|
15534
|
+
}
|
|
15535
|
+
const FormatDictionary = {
|
|
15536
|
+
regex: "intrare",
|
|
15537
|
+
email: "adres\u0103 de email",
|
|
15538
|
+
url: "URL",
|
|
15539
|
+
emoji: "emoji",
|
|
15540
|
+
uuid: "UUID",
|
|
15541
|
+
uuidv4: "UUIDv4",
|
|
15542
|
+
uuidv6: "UUIDv6",
|
|
15543
|
+
nanoid: "nanoid",
|
|
15544
|
+
guid: "GUID",
|
|
15545
|
+
cuid: "cuid",
|
|
15546
|
+
cuid2: "cuid2",
|
|
15547
|
+
ulid: "ULID",
|
|
15548
|
+
xid: "XID",
|
|
15549
|
+
ksuid: "KSUID",
|
|
15550
|
+
datetime: "dat\u0103 \u0219i or\u0103 ISO",
|
|
15551
|
+
date: "dat\u0103 ISO",
|
|
15552
|
+
time: "or\u0103 ISO",
|
|
15553
|
+
duration: "durat\u0103 ISO",
|
|
15554
|
+
ipv4: "adres\u0103 IPv4",
|
|
15555
|
+
ipv6: "adres\u0103 IPv6",
|
|
15556
|
+
mac: "adres\u0103 MAC",
|
|
15557
|
+
cidrv4: "interval IPv4",
|
|
15558
|
+
cidrv6: "interval IPv6",
|
|
15559
|
+
base64: "\u0219ir codat base64",
|
|
15560
|
+
base64url: "\u0219ir codat base64url",
|
|
15561
|
+
json_string: "\u0219ir JSON",
|
|
15562
|
+
e164: "num\u0103r E.164",
|
|
15563
|
+
jwt: "JWT",
|
|
15564
|
+
template_literal: "intrare"
|
|
15565
|
+
};
|
|
15566
|
+
const TypeDictionary = {
|
|
15567
|
+
nan: "NaN",
|
|
15568
|
+
string: "\u0219ir",
|
|
15569
|
+
number: "num\u0103r",
|
|
15570
|
+
boolean: "boolean",
|
|
15571
|
+
function: "func\u021Bie",
|
|
15572
|
+
array: "matrice",
|
|
15573
|
+
object: "obiect",
|
|
15574
|
+
undefined: "nedefinit",
|
|
15575
|
+
symbol: "simbol",
|
|
15576
|
+
bigint: "num\u0103r mare",
|
|
15577
|
+
void: "void",
|
|
15578
|
+
never: "never",
|
|
15579
|
+
map: "hart\u0103",
|
|
15580
|
+
set: "set"
|
|
15581
|
+
};
|
|
15582
|
+
return (issue2) => {
|
|
15583
|
+
switch (issue2.code) {
|
|
15584
|
+
case "invalid_type": {
|
|
15585
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
15586
|
+
const receivedType = parsedType(issue2.input);
|
|
15587
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
15588
|
+
return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
|
|
15589
|
+
}
|
|
15590
|
+
case "invalid_value":
|
|
15591
|
+
if (issue2.values.length === 1)
|
|
15592
|
+
return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
|
|
15593
|
+
return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
|
|
15594
|
+
case "too_big": {
|
|
15595
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
15596
|
+
const sizing = getSizing(issue2.origin);
|
|
15597
|
+
if (sizing)
|
|
15598
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
|
|
15599
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
|
|
15600
|
+
}
|
|
15601
|
+
case "too_small": {
|
|
15602
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
15603
|
+
const sizing = getSizing(issue2.origin);
|
|
15604
|
+
if (sizing) {
|
|
15605
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
15606
|
+
}
|
|
15607
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
|
|
15608
|
+
}
|
|
15609
|
+
case "invalid_format": {
|
|
15610
|
+
const _issue = issue2;
|
|
15611
|
+
if (_issue.format === "starts_with") {
|
|
15612
|
+
return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
|
|
15613
|
+
}
|
|
15614
|
+
if (_issue.format === "ends_with")
|
|
15615
|
+
return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
|
|
15616
|
+
if (_issue.format === "includes")
|
|
15617
|
+
return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
|
|
15618
|
+
if (_issue.format === "regex")
|
|
15619
|
+
return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
|
|
15620
|
+
return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
15621
|
+
}
|
|
15622
|
+
case "not_multiple_of":
|
|
15623
|
+
return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
|
|
15624
|
+
case "unrecognized_keys":
|
|
15625
|
+
return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
|
|
15626
|
+
case "invalid_key":
|
|
15627
|
+
return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
|
|
15628
|
+
case "invalid_union":
|
|
15629
|
+
return "Intrare invalid\u0103";
|
|
15630
|
+
case "invalid_element":
|
|
15631
|
+
return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
|
|
15632
|
+
default:
|
|
15633
|
+
return `Intrare invalid\u0103`;
|
|
15634
|
+
}
|
|
15635
|
+
};
|
|
15636
|
+
};
|
|
15637
|
+
function ro_default() {
|
|
15638
|
+
return {
|
|
15639
|
+
localeError: error37()
|
|
15118
15640
|
};
|
|
15119
15641
|
}
|
|
15120
15642
|
|
|
@@ -15134,7 +15656,7 @@ function getRussianPlural(count, one, few, many) {
|
|
|
15134
15656
|
}
|
|
15135
15657
|
return many;
|
|
15136
15658
|
}
|
|
15137
|
-
var
|
|
15659
|
+
var error38 = () => {
|
|
15138
15660
|
const Sizable = {
|
|
15139
15661
|
string: {
|
|
15140
15662
|
unit: {
|
|
@@ -15271,12 +15793,12 @@ var error35 = () => {
|
|
|
15271
15793
|
};
|
|
15272
15794
|
function ru_default() {
|
|
15273
15795
|
return {
|
|
15274
|
-
localeError:
|
|
15796
|
+
localeError: error38()
|
|
15275
15797
|
};
|
|
15276
15798
|
}
|
|
15277
15799
|
|
|
15278
15800
|
// ../../node_modules/zod/v4/locales/sl.js
|
|
15279
|
-
var
|
|
15801
|
+
var error39 = () => {
|
|
15280
15802
|
const Sizable = {
|
|
15281
15803
|
string: { unit: "znakov", verb: "imeti" },
|
|
15282
15804
|
file: { unit: "bajtov", verb: "imeti" },
|
|
@@ -15381,12 +15903,12 @@ var error36 = () => {
|
|
|
15381
15903
|
};
|
|
15382
15904
|
function sl_default() {
|
|
15383
15905
|
return {
|
|
15384
|
-
localeError:
|
|
15906
|
+
localeError: error39()
|
|
15385
15907
|
};
|
|
15386
15908
|
}
|
|
15387
15909
|
|
|
15388
15910
|
// ../../node_modules/zod/v4/locales/sv.js
|
|
15389
|
-
var
|
|
15911
|
+
var error40 = () => {
|
|
15390
15912
|
const Sizable = {
|
|
15391
15913
|
string: { unit: "tecken", verb: "att ha" },
|
|
15392
15914
|
file: { unit: "bytes", verb: "att ha" },
|
|
@@ -15492,12 +16014,12 @@ var error37 = () => {
|
|
|
15492
16014
|
};
|
|
15493
16015
|
function sv_default() {
|
|
15494
16016
|
return {
|
|
15495
|
-
localeError:
|
|
16017
|
+
localeError: error40()
|
|
15496
16018
|
};
|
|
15497
16019
|
}
|
|
15498
16020
|
|
|
15499
16021
|
// ../../node_modules/zod/v4/locales/ta.js
|
|
15500
|
-
var
|
|
16022
|
+
var error41 = () => {
|
|
15501
16023
|
const Sizable = {
|
|
15502
16024
|
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" },
|
|
15503
16025
|
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" },
|
|
@@ -15603,12 +16125,12 @@ var error38 = () => {
|
|
|
15603
16125
|
};
|
|
15604
16126
|
function ta_default() {
|
|
15605
16127
|
return {
|
|
15606
|
-
localeError:
|
|
16128
|
+
localeError: error41()
|
|
15607
16129
|
};
|
|
15608
16130
|
}
|
|
15609
16131
|
|
|
15610
16132
|
// ../../node_modules/zod/v4/locales/th.js
|
|
15611
|
-
var
|
|
16133
|
+
var error42 = () => {
|
|
15612
16134
|
const Sizable = {
|
|
15613
16135
|
string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
15614
16136
|
file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
@@ -15714,12 +16236,12 @@ var error39 = () => {
|
|
|
15714
16236
|
};
|
|
15715
16237
|
function th_default() {
|
|
15716
16238
|
return {
|
|
15717
|
-
localeError:
|
|
16239
|
+
localeError: error42()
|
|
15718
16240
|
};
|
|
15719
16241
|
}
|
|
15720
16242
|
|
|
15721
16243
|
// ../../node_modules/zod/v4/locales/tr.js
|
|
15722
|
-
var
|
|
16244
|
+
var error43 = () => {
|
|
15723
16245
|
const Sizable = {
|
|
15724
16246
|
string: { unit: "karakter", verb: "olmal\u0131" },
|
|
15725
16247
|
file: { unit: "bayt", verb: "olmal\u0131" },
|
|
@@ -15820,12 +16342,12 @@ var error40 = () => {
|
|
|
15820
16342
|
};
|
|
15821
16343
|
function tr_default() {
|
|
15822
16344
|
return {
|
|
15823
|
-
localeError:
|
|
16345
|
+
localeError: error43()
|
|
15824
16346
|
};
|
|
15825
16347
|
}
|
|
15826
16348
|
|
|
15827
16349
|
// ../../node_modules/zod/v4/locales/uk.js
|
|
15828
|
-
var
|
|
16350
|
+
var error44 = () => {
|
|
15829
16351
|
const Sizable = {
|
|
15830
16352
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
15831
16353
|
file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
@@ -15929,7 +16451,7 @@ var error41 = () => {
|
|
|
15929
16451
|
};
|
|
15930
16452
|
function uk_default() {
|
|
15931
16453
|
return {
|
|
15932
|
-
localeError:
|
|
16454
|
+
localeError: error44()
|
|
15933
16455
|
};
|
|
15934
16456
|
}
|
|
15935
16457
|
|
|
@@ -15939,7 +16461,7 @@ function ua_default() {
|
|
|
15939
16461
|
}
|
|
15940
16462
|
|
|
15941
16463
|
// ../../node_modules/zod/v4/locales/ur.js
|
|
15942
|
-
var
|
|
16464
|
+
var error45 = () => {
|
|
15943
16465
|
const Sizable = {
|
|
15944
16466
|
string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
|
|
15945
16467
|
file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
|
|
@@ -16045,17 +16567,18 @@ var error42 = () => {
|
|
|
16045
16567
|
};
|
|
16046
16568
|
function ur_default() {
|
|
16047
16569
|
return {
|
|
16048
|
-
localeError:
|
|
16570
|
+
localeError: error45()
|
|
16049
16571
|
};
|
|
16050
16572
|
}
|
|
16051
16573
|
|
|
16052
16574
|
// ../../node_modules/zod/v4/locales/uz.js
|
|
16053
|
-
var
|
|
16575
|
+
var error46 = () => {
|
|
16054
16576
|
const Sizable = {
|
|
16055
16577
|
string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
|
|
16056
16578
|
file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
|
|
16057
16579
|
array: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
16058
|
-
set: { unit: "element", verb: "bo\u2018lishi kerak" }
|
|
16580
|
+
set: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
16581
|
+
map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
|
|
16059
16582
|
};
|
|
16060
16583
|
function getSizing(origin) {
|
|
16061
16584
|
return Sizable[origin] ?? null;
|
|
@@ -16155,12 +16678,12 @@ var error43 = () => {
|
|
|
16155
16678
|
};
|
|
16156
16679
|
function uz_default() {
|
|
16157
16680
|
return {
|
|
16158
|
-
localeError:
|
|
16681
|
+
localeError: error46()
|
|
16159
16682
|
};
|
|
16160
16683
|
}
|
|
16161
16684
|
|
|
16162
16685
|
// ../../node_modules/zod/v4/locales/vi.js
|
|
16163
|
-
var
|
|
16686
|
+
var error47 = () => {
|
|
16164
16687
|
const Sizable = {
|
|
16165
16688
|
string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
|
|
16166
16689
|
file: { unit: "byte", verb: "c\xF3" },
|
|
@@ -16264,12 +16787,12 @@ var error44 = () => {
|
|
|
16264
16787
|
};
|
|
16265
16788
|
function vi_default() {
|
|
16266
16789
|
return {
|
|
16267
|
-
localeError:
|
|
16790
|
+
localeError: error47()
|
|
16268
16791
|
};
|
|
16269
16792
|
}
|
|
16270
16793
|
|
|
16271
16794
|
// ../../node_modules/zod/v4/locales/zh-CN.js
|
|
16272
|
-
var
|
|
16795
|
+
var error48 = () => {
|
|
16273
16796
|
const Sizable = {
|
|
16274
16797
|
string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
|
|
16275
16798
|
file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
|
|
@@ -16374,12 +16897,12 @@ var error45 = () => {
|
|
|
16374
16897
|
};
|
|
16375
16898
|
function zh_CN_default() {
|
|
16376
16899
|
return {
|
|
16377
|
-
localeError:
|
|
16900
|
+
localeError: error48()
|
|
16378
16901
|
};
|
|
16379
16902
|
}
|
|
16380
16903
|
|
|
16381
16904
|
// ../../node_modules/zod/v4/locales/zh-TW.js
|
|
16382
|
-
var
|
|
16905
|
+
var error49 = () => {
|
|
16383
16906
|
const Sizable = {
|
|
16384
16907
|
string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
|
|
16385
16908
|
file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
|
|
@@ -16482,12 +17005,12 @@ var error46 = () => {
|
|
|
16482
17005
|
};
|
|
16483
17006
|
function zh_TW_default() {
|
|
16484
17007
|
return {
|
|
16485
|
-
localeError:
|
|
17008
|
+
localeError: error49()
|
|
16486
17009
|
};
|
|
16487
17010
|
}
|
|
16488
17011
|
|
|
16489
17012
|
// ../../node_modules/zod/v4/locales/yo.js
|
|
16490
|
-
var
|
|
17013
|
+
var error50 = () => {
|
|
16491
17014
|
const Sizable = {
|
|
16492
17015
|
string: { unit: "\xE0mi", verb: "n\xED" },
|
|
16493
17016
|
file: { unit: "bytes", verb: "n\xED" },
|
|
@@ -16590,12 +17113,12 @@ var error47 = () => {
|
|
|
16590
17113
|
};
|
|
16591
17114
|
function yo_default() {
|
|
16592
17115
|
return {
|
|
16593
|
-
localeError:
|
|
17116
|
+
localeError: error50()
|
|
16594
17117
|
};
|
|
16595
17118
|
}
|
|
16596
17119
|
|
|
16597
17120
|
// ../../node_modules/zod/v4/core/registries.js
|
|
16598
|
-
var
|
|
17121
|
+
var _a2;
|
|
16599
17122
|
var $output = /* @__PURE__ */ Symbol("ZodOutput");
|
|
16600
17123
|
var $input = /* @__PURE__ */ Symbol("ZodInput");
|
|
16601
17124
|
var $ZodRegistry = class {
|
|
@@ -16641,7 +17164,7 @@ var $ZodRegistry = class {
|
|
|
16641
17164
|
function registry() {
|
|
16642
17165
|
return new $ZodRegistry();
|
|
16643
17166
|
}
|
|
16644
|
-
(
|
|
17167
|
+
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
16645
17168
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
16646
17169
|
|
|
16647
17170
|
// ../../node_modules/zod/v4/core/api.js
|
|
@@ -17559,7 +18082,7 @@ function _refine(Class2, fn, _params) {
|
|
|
17559
18082
|
return schema;
|
|
17560
18083
|
}
|
|
17561
18084
|
// @__NO_SIDE_EFFECTS__
|
|
17562
|
-
function _superRefine(fn) {
|
|
18085
|
+
function _superRefine(fn, params) {
|
|
17563
18086
|
const ch = /* @__PURE__ */ _check((payload) => {
|
|
17564
18087
|
payload.addIssue = (issue2) => {
|
|
17565
18088
|
if (typeof issue2 === "string") {
|
|
@@ -17576,7 +18099,7 @@ function _superRefine(fn) {
|
|
|
17576
18099
|
}
|
|
17577
18100
|
};
|
|
17578
18101
|
return fn(payload.value, payload);
|
|
17579
|
-
});
|
|
18102
|
+
}, params);
|
|
17580
18103
|
return ch;
|
|
17581
18104
|
}
|
|
17582
18105
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -17706,7 +18229,7 @@ function initializeContext(params) {
|
|
|
17706
18229
|
};
|
|
17707
18230
|
}
|
|
17708
18231
|
function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
17709
|
-
var
|
|
18232
|
+
var _a3;
|
|
17710
18233
|
const def = schema._zod.def;
|
|
17711
18234
|
const seen = ctx.seen.get(schema);
|
|
17712
18235
|
if (seen) {
|
|
@@ -17753,8 +18276,8 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
|
17753
18276
|
delete result.schema.examples;
|
|
17754
18277
|
delete result.schema.default;
|
|
17755
18278
|
}
|
|
17756
|
-
if (ctx.io === "input" && result.schema
|
|
17757
|
-
(
|
|
18279
|
+
if (ctx.io === "input" && "_prefault" in result.schema)
|
|
18280
|
+
(_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
|
|
17758
18281
|
delete result.schema._prefault;
|
|
17759
18282
|
const _result = ctx.seen.get(schema);
|
|
17760
18283
|
return _result.schema;
|
|
@@ -17935,10 +18458,15 @@ function finalize(ctx, schema) {
|
|
|
17935
18458
|
result.$id = ctx.external.uri(id);
|
|
17936
18459
|
}
|
|
17937
18460
|
Object.assign(result, root.def ?? root.schema);
|
|
18461
|
+
const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
|
|
18462
|
+
if (rootMetaId !== void 0 && result.id === rootMetaId)
|
|
18463
|
+
delete result.id;
|
|
17938
18464
|
const defs = ctx.external?.defs ?? {};
|
|
17939
18465
|
for (const entry of ctx.seen.entries()) {
|
|
17940
18466
|
const seen = entry[1];
|
|
17941
18467
|
if (seen.def && seen.defId) {
|
|
18468
|
+
if (seen.def.id === seen.defId)
|
|
18469
|
+
delete seen.def.id;
|
|
17942
18470
|
defs[seen.defId] = seen.def;
|
|
17943
18471
|
}
|
|
17944
18472
|
}
|
|
@@ -17994,6 +18522,8 @@ function isTransforming(_schema, _ctx) {
|
|
|
17994
18522
|
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
|
|
17995
18523
|
}
|
|
17996
18524
|
if (def.type === "pipe") {
|
|
18525
|
+
if (_schema._zod.traits.has("$ZodCodec"))
|
|
18526
|
+
return true;
|
|
17997
18527
|
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
17998
18528
|
}
|
|
17999
18529
|
if (def.type === "object") {
|
|
@@ -18083,39 +18613,28 @@ var numberProcessor = (schema, ctx, _json, _params) => {
|
|
|
18083
18613
|
json2.type = "integer";
|
|
18084
18614
|
else
|
|
18085
18615
|
json2.type = "number";
|
|
18086
|
-
|
|
18087
|
-
|
|
18616
|
+
const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
|
|
18617
|
+
const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
|
|
18618
|
+
const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
|
|
18619
|
+
if (exMin) {
|
|
18620
|
+
if (legacy) {
|
|
18088
18621
|
json2.minimum = exclusiveMinimum;
|
|
18089
18622
|
json2.exclusiveMinimum = true;
|
|
18090
18623
|
} else {
|
|
18091
18624
|
json2.exclusiveMinimum = exclusiveMinimum;
|
|
18092
18625
|
}
|
|
18093
|
-
}
|
|
18094
|
-
if (typeof minimum === "number") {
|
|
18626
|
+
} else if (typeof minimum === "number") {
|
|
18095
18627
|
json2.minimum = minimum;
|
|
18096
|
-
if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
|
|
18097
|
-
if (exclusiveMinimum >= minimum)
|
|
18098
|
-
delete json2.minimum;
|
|
18099
|
-
else
|
|
18100
|
-
delete json2.exclusiveMinimum;
|
|
18101
|
-
}
|
|
18102
18628
|
}
|
|
18103
|
-
if (
|
|
18104
|
-
if (
|
|
18629
|
+
if (exMax) {
|
|
18630
|
+
if (legacy) {
|
|
18105
18631
|
json2.maximum = exclusiveMaximum;
|
|
18106
18632
|
json2.exclusiveMaximum = true;
|
|
18107
18633
|
} else {
|
|
18108
18634
|
json2.exclusiveMaximum = exclusiveMaximum;
|
|
18109
18635
|
}
|
|
18110
|
-
}
|
|
18111
|
-
if (typeof maximum === "number") {
|
|
18636
|
+
} else if (typeof maximum === "number") {
|
|
18112
18637
|
json2.maximum = maximum;
|
|
18113
|
-
if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
|
|
18114
|
-
if (exclusiveMaximum <= maximum)
|
|
18115
|
-
delete json2.maximum;
|
|
18116
|
-
else
|
|
18117
|
-
delete json2.exclusiveMaximum;
|
|
18118
|
-
}
|
|
18119
18638
|
}
|
|
18120
18639
|
if (typeof multipleOf === "number")
|
|
18121
18640
|
json2.multipleOf = multipleOf;
|
|
@@ -18287,7 +18806,10 @@ var arrayProcessor = (schema, ctx, _json, params) => {
|
|
|
18287
18806
|
if (typeof maximum === "number")
|
|
18288
18807
|
json2.maxItems = maximum;
|
|
18289
18808
|
json2.type = "array";
|
|
18290
|
-
json2.items = process2(def.element, ctx, {
|
|
18809
|
+
json2.items = process2(def.element, ctx, {
|
|
18810
|
+
...params,
|
|
18811
|
+
path: [...params.path, "items"]
|
|
18812
|
+
});
|
|
18291
18813
|
};
|
|
18292
18814
|
var objectProcessor = (schema, ctx, _json, params) => {
|
|
18293
18815
|
const json2 = _json;
|
|
@@ -18480,7 +19002,8 @@ var catchProcessor = (schema, ctx, json2, params) => {
|
|
|
18480
19002
|
};
|
|
18481
19003
|
var pipeProcessor = (schema, ctx, _json, params) => {
|
|
18482
19004
|
const def = schema._zod.def;
|
|
18483
|
-
const
|
|
19005
|
+
const inIsTransform = def.in._zod.traits.has("$ZodTransform");
|
|
19006
|
+
const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
|
|
18484
19007
|
process2(innerType, ctx, params);
|
|
18485
19008
|
const seen = ctx.seen.get(schema);
|
|
18486
19009
|
seen.ref = innerType;
|
|
@@ -18714,6 +19237,7 @@ __export(schemas_exports2, {
|
|
|
18714
19237
|
ZodOptional: () => ZodOptional,
|
|
18715
19238
|
ZodPipe: () => ZodPipe,
|
|
18716
19239
|
ZodPrefault: () => ZodPrefault,
|
|
19240
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
18717
19241
|
ZodPromise: () => ZodPromise,
|
|
18718
19242
|
ZodReadonly: () => ZodReadonly,
|
|
18719
19243
|
ZodRecord: () => ZodRecord,
|
|
@@ -18774,6 +19298,7 @@ __export(schemas_exports2, {
|
|
|
18774
19298
|
int32: () => int32,
|
|
18775
19299
|
int64: () => int64,
|
|
18776
19300
|
intersection: () => intersection,
|
|
19301
|
+
invertCodec: () => invertCodec,
|
|
18777
19302
|
ipv4: () => ipv42,
|
|
18778
19303
|
ipv6: () => ipv62,
|
|
18779
19304
|
json: () => json,
|
|
@@ -18943,8 +19468,8 @@ var initializer2 = (inst, issues) => {
|
|
|
18943
19468
|
}
|
|
18944
19469
|
});
|
|
18945
19470
|
};
|
|
18946
|
-
var ZodError = $constructor("ZodError", initializer2);
|
|
18947
|
-
var ZodRealError = $constructor("ZodError", initializer2, {
|
|
19471
|
+
var ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
|
|
19472
|
+
var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
|
|
18948
19473
|
Parent: Error
|
|
18949
19474
|
});
|
|
18950
19475
|
|
|
@@ -18963,6 +19488,43 @@ var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
|
18963
19488
|
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
18964
19489
|
|
|
18965
19490
|
// ../../node_modules/zod/v4/classic/schemas.js
|
|
19491
|
+
var _installedGroups = /* @__PURE__ */ new WeakMap();
|
|
19492
|
+
function _installLazyMethods(inst, group, methods) {
|
|
19493
|
+
const proto = Object.getPrototypeOf(inst);
|
|
19494
|
+
let installed = _installedGroups.get(proto);
|
|
19495
|
+
if (!installed) {
|
|
19496
|
+
installed = /* @__PURE__ */ new Set();
|
|
19497
|
+
_installedGroups.set(proto, installed);
|
|
19498
|
+
}
|
|
19499
|
+
if (installed.has(group))
|
|
19500
|
+
return;
|
|
19501
|
+
installed.add(group);
|
|
19502
|
+
for (const key in methods) {
|
|
19503
|
+
const fn = methods[key];
|
|
19504
|
+
Object.defineProperty(proto, key, {
|
|
19505
|
+
configurable: true,
|
|
19506
|
+
enumerable: false,
|
|
19507
|
+
get() {
|
|
19508
|
+
const bound = fn.bind(this);
|
|
19509
|
+
Object.defineProperty(this, key, {
|
|
19510
|
+
configurable: true,
|
|
19511
|
+
writable: true,
|
|
19512
|
+
enumerable: true,
|
|
19513
|
+
value: bound
|
|
19514
|
+
});
|
|
19515
|
+
return bound;
|
|
19516
|
+
},
|
|
19517
|
+
set(v) {
|
|
19518
|
+
Object.defineProperty(this, key, {
|
|
19519
|
+
configurable: true,
|
|
19520
|
+
writable: true,
|
|
19521
|
+
enumerable: true,
|
|
19522
|
+
value: v
|
|
19523
|
+
});
|
|
19524
|
+
}
|
|
19525
|
+
});
|
|
19526
|
+
}
|
|
19527
|
+
}
|
|
18966
19528
|
var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
18967
19529
|
$ZodType.init(inst, def);
|
|
18968
19530
|
Object.assign(inst["~standard"], {
|
|
@@ -18975,23 +19537,6 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
18975
19537
|
inst.def = def;
|
|
18976
19538
|
inst.type = def.type;
|
|
18977
19539
|
Object.defineProperty(inst, "_def", { value: def });
|
|
18978
|
-
inst.check = (...checks) => {
|
|
18979
|
-
return inst.clone(util_exports.mergeDefs(def, {
|
|
18980
|
-
checks: [
|
|
18981
|
-
...def.checks ?? [],
|
|
18982
|
-
...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
18983
|
-
]
|
|
18984
|
-
}), {
|
|
18985
|
-
parent: true
|
|
18986
|
-
});
|
|
18987
|
-
};
|
|
18988
|
-
inst.with = inst.check;
|
|
18989
|
-
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
18990
|
-
inst.brand = () => inst;
|
|
18991
|
-
inst.register = ((reg, meta3) => {
|
|
18992
|
-
reg.add(inst, meta3);
|
|
18993
|
-
return inst;
|
|
18994
|
-
});
|
|
18995
19540
|
inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
|
|
18996
19541
|
inst.safeParse = (data, params) => safeParse2(inst, data, params);
|
|
18997
19542
|
inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
|
|
@@ -19005,45 +19550,108 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
19005
19550
|
inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
|
|
19006
19551
|
inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
|
|
19007
19552
|
inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
|
|
19008
|
-
inst
|
|
19009
|
-
|
|
19010
|
-
|
|
19011
|
-
|
|
19012
|
-
|
|
19013
|
-
|
|
19014
|
-
|
|
19015
|
-
|
|
19016
|
-
|
|
19017
|
-
|
|
19018
|
-
|
|
19019
|
-
|
|
19020
|
-
|
|
19021
|
-
|
|
19022
|
-
|
|
19023
|
-
|
|
19024
|
-
|
|
19025
|
-
|
|
19026
|
-
|
|
19027
|
-
|
|
19028
|
-
|
|
19029
|
-
|
|
19553
|
+
_installLazyMethods(inst, "ZodType", {
|
|
19554
|
+
check(...chks) {
|
|
19555
|
+
const def2 = this.def;
|
|
19556
|
+
return this.clone(util_exports.mergeDefs(def2, {
|
|
19557
|
+
checks: [
|
|
19558
|
+
...def2.checks ?? [],
|
|
19559
|
+
...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
19560
|
+
]
|
|
19561
|
+
}), { parent: true });
|
|
19562
|
+
},
|
|
19563
|
+
with(...chks) {
|
|
19564
|
+
return this.check(...chks);
|
|
19565
|
+
},
|
|
19566
|
+
clone(def2, params) {
|
|
19567
|
+
return clone(this, def2, params);
|
|
19568
|
+
},
|
|
19569
|
+
brand() {
|
|
19570
|
+
return this;
|
|
19571
|
+
},
|
|
19572
|
+
register(reg, meta3) {
|
|
19573
|
+
reg.add(this, meta3);
|
|
19574
|
+
return this;
|
|
19575
|
+
},
|
|
19576
|
+
refine(check2, params) {
|
|
19577
|
+
return this.check(refine(check2, params));
|
|
19578
|
+
},
|
|
19579
|
+
superRefine(refinement, params) {
|
|
19580
|
+
return this.check(superRefine(refinement, params));
|
|
19581
|
+
},
|
|
19582
|
+
overwrite(fn) {
|
|
19583
|
+
return this.check(_overwrite(fn));
|
|
19584
|
+
},
|
|
19585
|
+
optional() {
|
|
19586
|
+
return optional(this);
|
|
19587
|
+
},
|
|
19588
|
+
exactOptional() {
|
|
19589
|
+
return exactOptional(this);
|
|
19590
|
+
},
|
|
19591
|
+
nullable() {
|
|
19592
|
+
return nullable(this);
|
|
19593
|
+
},
|
|
19594
|
+
nullish() {
|
|
19595
|
+
return optional(nullable(this));
|
|
19596
|
+
},
|
|
19597
|
+
nonoptional(params) {
|
|
19598
|
+
return nonoptional(this, params);
|
|
19599
|
+
},
|
|
19600
|
+
array() {
|
|
19601
|
+
return array(this);
|
|
19602
|
+
},
|
|
19603
|
+
or(arg) {
|
|
19604
|
+
return union([this, arg]);
|
|
19605
|
+
},
|
|
19606
|
+
and(arg) {
|
|
19607
|
+
return intersection(this, arg);
|
|
19608
|
+
},
|
|
19609
|
+
transform(tx) {
|
|
19610
|
+
return pipe(this, transform(tx));
|
|
19611
|
+
},
|
|
19612
|
+
default(d) {
|
|
19613
|
+
return _default2(this, d);
|
|
19614
|
+
},
|
|
19615
|
+
prefault(d) {
|
|
19616
|
+
return prefault(this, d);
|
|
19617
|
+
},
|
|
19618
|
+
catch(params) {
|
|
19619
|
+
return _catch2(this, params);
|
|
19620
|
+
},
|
|
19621
|
+
pipe(target) {
|
|
19622
|
+
return pipe(this, target);
|
|
19623
|
+
},
|
|
19624
|
+
readonly() {
|
|
19625
|
+
return readonly(this);
|
|
19626
|
+
},
|
|
19627
|
+
describe(description) {
|
|
19628
|
+
const cl = this.clone();
|
|
19629
|
+
globalRegistry.add(cl, { description });
|
|
19630
|
+
return cl;
|
|
19631
|
+
},
|
|
19632
|
+
meta(...args) {
|
|
19633
|
+
if (args.length === 0)
|
|
19634
|
+
return globalRegistry.get(this);
|
|
19635
|
+
const cl = this.clone();
|
|
19636
|
+
globalRegistry.add(cl, args[0]);
|
|
19637
|
+
return cl;
|
|
19638
|
+
},
|
|
19639
|
+
isOptional() {
|
|
19640
|
+
return this.safeParse(void 0).success;
|
|
19641
|
+
},
|
|
19642
|
+
isNullable() {
|
|
19643
|
+
return this.safeParse(null).success;
|
|
19644
|
+
},
|
|
19645
|
+
apply(fn) {
|
|
19646
|
+
return fn(this);
|
|
19647
|
+
}
|
|
19648
|
+
});
|
|
19030
19649
|
Object.defineProperty(inst, "description", {
|
|
19031
19650
|
get() {
|
|
19032
19651
|
return globalRegistry.get(inst)?.description;
|
|
19033
19652
|
},
|
|
19034
19653
|
configurable: true
|
|
19035
19654
|
});
|
|
19036
|
-
inst.meta = (...args) => {
|
|
19037
|
-
if (args.length === 0) {
|
|
19038
|
-
return globalRegistry.get(inst);
|
|
19039
|
-
}
|
|
19040
|
-
const cl = inst.clone();
|
|
19041
|
-
globalRegistry.add(cl, args[0]);
|
|
19042
|
-
return cl;
|
|
19043
|
-
};
|
|
19044
|
-
inst.isOptional = () => inst.safeParse(void 0).success;
|
|
19045
|
-
inst.isNullable = () => inst.safeParse(null).success;
|
|
19046
|
-
inst.apply = (fn) => fn(inst);
|
|
19047
19655
|
return inst;
|
|
19048
19656
|
});
|
|
19049
19657
|
var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
@@ -19054,21 +19662,53 @@ var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
|
19054
19662
|
inst.format = bag.format ?? null;
|
|
19055
19663
|
inst.minLength = bag.minimum ?? null;
|
|
19056
19664
|
inst.maxLength = bag.maximum ?? null;
|
|
19057
|
-
inst
|
|
19058
|
-
|
|
19059
|
-
|
|
19060
|
-
|
|
19061
|
-
|
|
19062
|
-
|
|
19063
|
-
|
|
19064
|
-
|
|
19065
|
-
|
|
19066
|
-
|
|
19067
|
-
|
|
19068
|
-
|
|
19069
|
-
|
|
19070
|
-
|
|
19071
|
-
|
|
19665
|
+
_installLazyMethods(inst, "_ZodString", {
|
|
19666
|
+
regex(...args) {
|
|
19667
|
+
return this.check(_regex(...args));
|
|
19668
|
+
},
|
|
19669
|
+
includes(...args) {
|
|
19670
|
+
return this.check(_includes(...args));
|
|
19671
|
+
},
|
|
19672
|
+
startsWith(...args) {
|
|
19673
|
+
return this.check(_startsWith(...args));
|
|
19674
|
+
},
|
|
19675
|
+
endsWith(...args) {
|
|
19676
|
+
return this.check(_endsWith(...args));
|
|
19677
|
+
},
|
|
19678
|
+
min(...args) {
|
|
19679
|
+
return this.check(_minLength(...args));
|
|
19680
|
+
},
|
|
19681
|
+
max(...args) {
|
|
19682
|
+
return this.check(_maxLength(...args));
|
|
19683
|
+
},
|
|
19684
|
+
length(...args) {
|
|
19685
|
+
return this.check(_length(...args));
|
|
19686
|
+
},
|
|
19687
|
+
nonempty(...args) {
|
|
19688
|
+
return this.check(_minLength(1, ...args));
|
|
19689
|
+
},
|
|
19690
|
+
lowercase(params) {
|
|
19691
|
+
return this.check(_lowercase(params));
|
|
19692
|
+
},
|
|
19693
|
+
uppercase(params) {
|
|
19694
|
+
return this.check(_uppercase(params));
|
|
19695
|
+
},
|
|
19696
|
+
trim() {
|
|
19697
|
+
return this.check(_trim());
|
|
19698
|
+
},
|
|
19699
|
+
normalize(...args) {
|
|
19700
|
+
return this.check(_normalize(...args));
|
|
19701
|
+
},
|
|
19702
|
+
toLowerCase() {
|
|
19703
|
+
return this.check(_toLowerCase());
|
|
19704
|
+
},
|
|
19705
|
+
toUpperCase() {
|
|
19706
|
+
return this.check(_toUpperCase());
|
|
19707
|
+
},
|
|
19708
|
+
slugify() {
|
|
19709
|
+
return this.check(_slugify());
|
|
19710
|
+
}
|
|
19711
|
+
});
|
|
19072
19712
|
});
|
|
19073
19713
|
var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
19074
19714
|
$ZodString.init(inst, def);
|
|
@@ -19147,7 +19787,7 @@ function url(params) {
|
|
|
19147
19787
|
}
|
|
19148
19788
|
function httpUrl(params) {
|
|
19149
19789
|
return _url(ZodURL, {
|
|
19150
|
-
protocol:
|
|
19790
|
+
protocol: regexes_exports.httpProtocol,
|
|
19151
19791
|
hostname: regexes_exports.domain,
|
|
19152
19792
|
...util_exports.normalizeParams(params)
|
|
19153
19793
|
});
|
|
@@ -19289,21 +19929,53 @@ var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
|
19289
19929
|
$ZodNumber.init(inst, def);
|
|
19290
19930
|
ZodType.init(inst, def);
|
|
19291
19931
|
inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
|
|
19292
|
-
inst
|
|
19293
|
-
|
|
19294
|
-
|
|
19295
|
-
|
|
19296
|
-
|
|
19297
|
-
|
|
19298
|
-
|
|
19299
|
-
|
|
19300
|
-
|
|
19301
|
-
|
|
19302
|
-
|
|
19303
|
-
|
|
19304
|
-
|
|
19305
|
-
|
|
19306
|
-
|
|
19932
|
+
_installLazyMethods(inst, "ZodNumber", {
|
|
19933
|
+
gt(value, params) {
|
|
19934
|
+
return this.check(_gt(value, params));
|
|
19935
|
+
},
|
|
19936
|
+
gte(value, params) {
|
|
19937
|
+
return this.check(_gte(value, params));
|
|
19938
|
+
},
|
|
19939
|
+
min(value, params) {
|
|
19940
|
+
return this.check(_gte(value, params));
|
|
19941
|
+
},
|
|
19942
|
+
lt(value, params) {
|
|
19943
|
+
return this.check(_lt(value, params));
|
|
19944
|
+
},
|
|
19945
|
+
lte(value, params) {
|
|
19946
|
+
return this.check(_lte(value, params));
|
|
19947
|
+
},
|
|
19948
|
+
max(value, params) {
|
|
19949
|
+
return this.check(_lte(value, params));
|
|
19950
|
+
},
|
|
19951
|
+
int(params) {
|
|
19952
|
+
return this.check(int(params));
|
|
19953
|
+
},
|
|
19954
|
+
safe(params) {
|
|
19955
|
+
return this.check(int(params));
|
|
19956
|
+
},
|
|
19957
|
+
positive(params) {
|
|
19958
|
+
return this.check(_gt(0, params));
|
|
19959
|
+
},
|
|
19960
|
+
nonnegative(params) {
|
|
19961
|
+
return this.check(_gte(0, params));
|
|
19962
|
+
},
|
|
19963
|
+
negative(params) {
|
|
19964
|
+
return this.check(_lt(0, params));
|
|
19965
|
+
},
|
|
19966
|
+
nonpositive(params) {
|
|
19967
|
+
return this.check(_lte(0, params));
|
|
19968
|
+
},
|
|
19969
|
+
multipleOf(value, params) {
|
|
19970
|
+
return this.check(_multipleOf(value, params));
|
|
19971
|
+
},
|
|
19972
|
+
step(value, params) {
|
|
19973
|
+
return this.check(_multipleOf(value, params));
|
|
19974
|
+
},
|
|
19975
|
+
finite() {
|
|
19976
|
+
return this;
|
|
19977
|
+
}
|
|
19978
|
+
});
|
|
19307
19979
|
const bag = inst._zod.bag;
|
|
19308
19980
|
inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
19309
19981
|
inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
|
|
@@ -19450,11 +20122,23 @@ var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
|
|
|
19450
20122
|
ZodType.init(inst, def);
|
|
19451
20123
|
inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
|
|
19452
20124
|
inst.element = def.element;
|
|
19453
|
-
inst
|
|
19454
|
-
|
|
19455
|
-
|
|
19456
|
-
|
|
19457
|
-
|
|
20125
|
+
_installLazyMethods(inst, "ZodArray", {
|
|
20126
|
+
min(n, params) {
|
|
20127
|
+
return this.check(_minLength(n, params));
|
|
20128
|
+
},
|
|
20129
|
+
nonempty(params) {
|
|
20130
|
+
return this.check(_minLength(1, params));
|
|
20131
|
+
},
|
|
20132
|
+
max(n, params) {
|
|
20133
|
+
return this.check(_maxLength(n, params));
|
|
20134
|
+
},
|
|
20135
|
+
length(n, params) {
|
|
20136
|
+
return this.check(_length(n, params));
|
|
20137
|
+
},
|
|
20138
|
+
unwrap() {
|
|
20139
|
+
return this.element;
|
|
20140
|
+
}
|
|
20141
|
+
});
|
|
19458
20142
|
});
|
|
19459
20143
|
function array(element, params) {
|
|
19460
20144
|
return _array(ZodArray, element, params);
|
|
@@ -19470,23 +20154,47 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
|
19470
20154
|
util_exports.defineLazy(inst, "shape", () => {
|
|
19471
20155
|
return def.shape;
|
|
19472
20156
|
});
|
|
19473
|
-
inst
|
|
19474
|
-
|
|
19475
|
-
|
|
19476
|
-
|
|
19477
|
-
|
|
19478
|
-
|
|
19479
|
-
|
|
19480
|
-
|
|
19481
|
-
|
|
19482
|
-
|
|
19483
|
-
|
|
19484
|
-
|
|
19485
|
-
|
|
19486
|
-
|
|
19487
|
-
|
|
19488
|
-
|
|
19489
|
-
|
|
20157
|
+
_installLazyMethods(inst, "ZodObject", {
|
|
20158
|
+
keyof() {
|
|
20159
|
+
return _enum2(Object.keys(this._zod.def.shape));
|
|
20160
|
+
},
|
|
20161
|
+
catchall(catchall) {
|
|
20162
|
+
return this.clone({ ...this._zod.def, catchall });
|
|
20163
|
+
},
|
|
20164
|
+
passthrough() {
|
|
20165
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
20166
|
+
},
|
|
20167
|
+
loose() {
|
|
20168
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
20169
|
+
},
|
|
20170
|
+
strict() {
|
|
20171
|
+
return this.clone({ ...this._zod.def, catchall: never() });
|
|
20172
|
+
},
|
|
20173
|
+
strip() {
|
|
20174
|
+
return this.clone({ ...this._zod.def, catchall: void 0 });
|
|
20175
|
+
},
|
|
20176
|
+
extend(incoming) {
|
|
20177
|
+
return util_exports.extend(this, incoming);
|
|
20178
|
+
},
|
|
20179
|
+
safeExtend(incoming) {
|
|
20180
|
+
return util_exports.safeExtend(this, incoming);
|
|
20181
|
+
},
|
|
20182
|
+
merge(other) {
|
|
20183
|
+
return util_exports.merge(this, other);
|
|
20184
|
+
},
|
|
20185
|
+
pick(mask) {
|
|
20186
|
+
return util_exports.pick(this, mask);
|
|
20187
|
+
},
|
|
20188
|
+
omit(mask) {
|
|
20189
|
+
return util_exports.omit(this, mask);
|
|
20190
|
+
},
|
|
20191
|
+
partial(...args) {
|
|
20192
|
+
return util_exports.partial(ZodOptional, this, args[0]);
|
|
20193
|
+
},
|
|
20194
|
+
required(...args) {
|
|
20195
|
+
return util_exports.required(ZodNonOptional, this, args[0]);
|
|
20196
|
+
}
|
|
20197
|
+
});
|
|
19490
20198
|
});
|
|
19491
20199
|
function object(shape, params) {
|
|
19492
20200
|
const def = {
|
|
@@ -19591,6 +20299,14 @@ var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
|
|
|
19591
20299
|
inst.valueType = def.valueType;
|
|
19592
20300
|
});
|
|
19593
20301
|
function record(keyType, valueType, params) {
|
|
20302
|
+
if (!valueType || !valueType._zod) {
|
|
20303
|
+
return new ZodRecord({
|
|
20304
|
+
type: "record",
|
|
20305
|
+
keyType: string2(),
|
|
20306
|
+
valueType: keyType,
|
|
20307
|
+
...util_exports.normalizeParams(valueType)
|
|
20308
|
+
});
|
|
20309
|
+
}
|
|
19594
20310
|
return new ZodRecord({
|
|
19595
20311
|
type: "record",
|
|
19596
20312
|
keyType,
|
|
@@ -19920,6 +20636,20 @@ function codec(in_, out, params) {
|
|
|
19920
20636
|
reverseTransform: params.encode
|
|
19921
20637
|
});
|
|
19922
20638
|
}
|
|
20639
|
+
function invertCodec(codec2) {
|
|
20640
|
+
const def = codec2._zod.def;
|
|
20641
|
+
return new ZodCodec({
|
|
20642
|
+
type: "pipe",
|
|
20643
|
+
in: def.out,
|
|
20644
|
+
out: def.in,
|
|
20645
|
+
transform: def.reverseTransform,
|
|
20646
|
+
reverseTransform: def.transform
|
|
20647
|
+
});
|
|
20648
|
+
}
|
|
20649
|
+
var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
|
|
20650
|
+
ZodPipe.init(inst, def);
|
|
20651
|
+
$ZodPreprocess.init(inst, def);
|
|
20652
|
+
});
|
|
19923
20653
|
var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
19924
20654
|
$ZodReadonly.init(inst, def);
|
|
19925
20655
|
ZodType.init(inst, def);
|
|
@@ -19999,8 +20729,8 @@ function custom(fn, _params) {
|
|
|
19999
20729
|
function refine(fn, _params = {}) {
|
|
20000
20730
|
return _refine(ZodCustom, fn, _params);
|
|
20001
20731
|
}
|
|
20002
|
-
function superRefine(fn) {
|
|
20003
|
-
return _superRefine(fn);
|
|
20732
|
+
function superRefine(fn, params) {
|
|
20733
|
+
return _superRefine(fn, params);
|
|
20004
20734
|
}
|
|
20005
20735
|
var describe2 = describe;
|
|
20006
20736
|
var meta2 = meta;
|
|
@@ -20038,7 +20768,11 @@ function json(params) {
|
|
|
20038
20768
|
return jsonSchema;
|
|
20039
20769
|
}
|
|
20040
20770
|
function preprocess(fn, schema) {
|
|
20041
|
-
return
|
|
20771
|
+
return new ZodPreprocess({
|
|
20772
|
+
type: "pipe",
|
|
20773
|
+
in: transform(fn),
|
|
20774
|
+
out: schema
|
|
20775
|
+
});
|
|
20042
20776
|
}
|
|
20043
20777
|
|
|
20044
20778
|
// ../../node_modules/zod/v4/classic/compat.js
|
|
@@ -20459,12 +21193,6 @@ function convertBaseSchema(schema, ctx) {
|
|
|
20459
21193
|
default:
|
|
20460
21194
|
throw new Error(`Unsupported type: ${type}`);
|
|
20461
21195
|
}
|
|
20462
|
-
if (schema.description) {
|
|
20463
|
-
zodSchema = zodSchema.describe(schema.description);
|
|
20464
|
-
}
|
|
20465
|
-
if (schema.default !== void 0) {
|
|
20466
|
-
zodSchema = zodSchema.default(schema.default);
|
|
20467
|
-
}
|
|
20468
21196
|
return zodSchema;
|
|
20469
21197
|
}
|
|
20470
21198
|
function convertSchema(schema, ctx) {
|
|
@@ -20501,6 +21229,9 @@ function convertSchema(schema, ctx) {
|
|
|
20501
21229
|
if (schema.readOnly === true) {
|
|
20502
21230
|
baseSchema = z.readonly(baseSchema);
|
|
20503
21231
|
}
|
|
21232
|
+
if (schema.default !== void 0) {
|
|
21233
|
+
baseSchema = baseSchema.default(schema.default);
|
|
21234
|
+
}
|
|
20504
21235
|
const extraMeta = {};
|
|
20505
21236
|
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
20506
21237
|
for (const key of coreMetadataKeys) {
|
|
@@ -20522,23 +21253,32 @@ function convertSchema(schema, ctx) {
|
|
|
20522
21253
|
if (Object.keys(extraMeta).length > 0) {
|
|
20523
21254
|
ctx.registry.add(baseSchema, extraMeta);
|
|
20524
21255
|
}
|
|
21256
|
+
if (schema.description) {
|
|
21257
|
+
baseSchema = baseSchema.describe(schema.description);
|
|
21258
|
+
}
|
|
20525
21259
|
return baseSchema;
|
|
20526
21260
|
}
|
|
20527
21261
|
function fromJSONSchema(schema, params) {
|
|
20528
21262
|
if (typeof schema === "boolean") {
|
|
20529
21263
|
return schema ? z.any() : z.never();
|
|
20530
21264
|
}
|
|
20531
|
-
|
|
20532
|
-
|
|
21265
|
+
let normalized;
|
|
21266
|
+
try {
|
|
21267
|
+
normalized = JSON.parse(JSON.stringify(schema));
|
|
21268
|
+
} catch {
|
|
21269
|
+
throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
|
|
21270
|
+
}
|
|
21271
|
+
const version2 = detectVersion(normalized, params?.defaultTarget);
|
|
21272
|
+
const defs = normalized.$defs || normalized.definitions || {};
|
|
20533
21273
|
const ctx = {
|
|
20534
21274
|
version: version2,
|
|
20535
21275
|
defs,
|
|
20536
21276
|
refs: /* @__PURE__ */ new Map(),
|
|
20537
21277
|
processing: /* @__PURE__ */ new Set(),
|
|
20538
|
-
rootSchema:
|
|
21278
|
+
rootSchema: normalized,
|
|
20539
21279
|
registry: params?.registry ?? globalRegistry
|
|
20540
21280
|
};
|
|
20541
|
-
return convertSchema(
|
|
21281
|
+
return convertSchema(normalized, ctx);
|
|
20542
21282
|
}
|
|
20543
21283
|
|
|
20544
21284
|
// ../../node_modules/zod/v4/classic/coerce.js
|
|
@@ -22139,8 +22879,8 @@ var StdioServerTransport = class {
|
|
|
22139
22879
|
this._readBuffer.append(chunk);
|
|
22140
22880
|
this.processReadBuffer();
|
|
22141
22881
|
};
|
|
22142
|
-
this._onerror = (
|
|
22143
|
-
this.onerror?.(
|
|
22882
|
+
this._onerror = (error51) => {
|
|
22883
|
+
this.onerror?.(error51);
|
|
22144
22884
|
};
|
|
22145
22885
|
}
|
|
22146
22886
|
/**
|
|
@@ -22162,8 +22902,8 @@ var StdioServerTransport = class {
|
|
|
22162
22902
|
break;
|
|
22163
22903
|
}
|
|
22164
22904
|
this.onmessage?.(message);
|
|
22165
|
-
} catch (
|
|
22166
|
-
this.onerror?.(
|
|
22905
|
+
} catch (error51) {
|
|
22906
|
+
this.onerror?.(error51);
|
|
22167
22907
|
}
|
|
22168
22908
|
}
|
|
22169
22909
|
}
|
|
@@ -22369,8 +23109,8 @@ var ZodError2 = class _ZodError extends Error {
|
|
|
22369
23109
|
return issue2.message;
|
|
22370
23110
|
};
|
|
22371
23111
|
const fieldErrors = { _errors: [] };
|
|
22372
|
-
const processError = (
|
|
22373
|
-
for (const issue2 of
|
|
23112
|
+
const processError = (error51) => {
|
|
23113
|
+
for (const issue2 of error51.issues) {
|
|
22374
23114
|
if (issue2.code === "invalid_union") {
|
|
22375
23115
|
issue2.unionErrors.map(processError);
|
|
22376
23116
|
} else if (issue2.code === "invalid_return_type") {
|
|
@@ -22433,8 +23173,8 @@ var ZodError2 = class _ZodError extends Error {
|
|
|
22433
23173
|
}
|
|
22434
23174
|
};
|
|
22435
23175
|
ZodError2.create = (issues) => {
|
|
22436
|
-
const
|
|
22437
|
-
return
|
|
23176
|
+
const error51 = new ZodError2(issues);
|
|
23177
|
+
return error51;
|
|
22438
23178
|
};
|
|
22439
23179
|
|
|
22440
23180
|
// ../../node_modules/zod/v3/locales/en.js
|
|
@@ -22694,8 +23434,8 @@ var handleResult = (ctx, result) => {
|
|
|
22694
23434
|
get error() {
|
|
22695
23435
|
if (this._error)
|
|
22696
23436
|
return this._error;
|
|
22697
|
-
const
|
|
22698
|
-
this._error =
|
|
23437
|
+
const error51 = new ZodError2(ctx.common.issues);
|
|
23438
|
+
this._error = error51;
|
|
22699
23439
|
return this._error;
|
|
22700
23440
|
}
|
|
22701
23441
|
};
|
|
@@ -25350,25 +26090,25 @@ var ZodFunction2 = class _ZodFunction extends ZodType2 {
|
|
|
25350
26090
|
});
|
|
25351
26091
|
return INVALID;
|
|
25352
26092
|
}
|
|
25353
|
-
function makeArgsIssue(args,
|
|
26093
|
+
function makeArgsIssue(args, error51) {
|
|
25354
26094
|
return makeIssue({
|
|
25355
26095
|
data: args,
|
|
25356
26096
|
path: ctx.path,
|
|
25357
26097
|
errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap2(), en_default2].filter((x) => !!x),
|
|
25358
26098
|
issueData: {
|
|
25359
26099
|
code: ZodIssueCode2.invalid_arguments,
|
|
25360
|
-
argumentsError:
|
|
26100
|
+
argumentsError: error51
|
|
25361
26101
|
}
|
|
25362
26102
|
});
|
|
25363
26103
|
}
|
|
25364
|
-
function makeReturnsIssue(returns,
|
|
26104
|
+
function makeReturnsIssue(returns, error51) {
|
|
25365
26105
|
return makeIssue({
|
|
25366
26106
|
data: returns,
|
|
25367
26107
|
path: ctx.path,
|
|
25368
26108
|
errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap2(), en_default2].filter((x) => !!x),
|
|
25369
26109
|
issueData: {
|
|
25370
26110
|
code: ZodIssueCode2.invalid_return_type,
|
|
25371
|
-
returnTypeError:
|
|
26111
|
+
returnTypeError: error51
|
|
25372
26112
|
}
|
|
25373
26113
|
});
|
|
25374
26114
|
}
|
|
@@ -25377,15 +26117,15 @@ var ZodFunction2 = class _ZodFunction extends ZodType2 {
|
|
|
25377
26117
|
if (this._def.returns instanceof ZodPromise2) {
|
|
25378
26118
|
const me = this;
|
|
25379
26119
|
return OK(async function(...args) {
|
|
25380
|
-
const
|
|
26120
|
+
const error51 = new ZodError2([]);
|
|
25381
26121
|
const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {
|
|
25382
|
-
|
|
25383
|
-
throw
|
|
26122
|
+
error51.addIssue(makeArgsIssue(args, e));
|
|
26123
|
+
throw error51;
|
|
25384
26124
|
});
|
|
25385
26125
|
const result = await Reflect.apply(fn, this, parsedArgs);
|
|
25386
26126
|
const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => {
|
|
25387
|
-
|
|
25388
|
-
throw
|
|
26127
|
+
error51.addIssue(makeReturnsIssue(result, e));
|
|
26128
|
+
throw error51;
|
|
25389
26129
|
});
|
|
25390
26130
|
return parsedReturns;
|
|
25391
26131
|
});
|
|
@@ -26081,7 +26821,9 @@ var ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def) => {
|
|
|
26081
26821
|
...def,
|
|
26082
26822
|
checks: [
|
|
26083
26823
|
...def.checks ?? [],
|
|
26084
|
-
...checks.map((ch) => typeof ch === "function" ? {
|
|
26824
|
+
...checks.map((ch) => typeof ch === "function" ? {
|
|
26825
|
+
_zod: { check: ch, def: { check: "custom" }, onattach: [] }
|
|
26826
|
+
} : ch)
|
|
26085
26827
|
]
|
|
26086
26828
|
}, { parent: true });
|
|
26087
26829
|
};
|
|
@@ -26193,24 +26935,24 @@ function normalizeObjectSchema(schema) {
|
|
|
26193
26935
|
}
|
|
26194
26936
|
return void 0;
|
|
26195
26937
|
}
|
|
26196
|
-
function getParseErrorMessage(
|
|
26197
|
-
if (
|
|
26198
|
-
if ("message" in
|
|
26199
|
-
return
|
|
26938
|
+
function getParseErrorMessage(error51) {
|
|
26939
|
+
if (error51 && typeof error51 === "object") {
|
|
26940
|
+
if ("message" in error51 && typeof error51.message === "string") {
|
|
26941
|
+
return error51.message;
|
|
26200
26942
|
}
|
|
26201
|
-
if ("issues" in
|
|
26202
|
-
const firstIssue =
|
|
26943
|
+
if ("issues" in error51 && Array.isArray(error51.issues) && error51.issues.length > 0) {
|
|
26944
|
+
const firstIssue = error51.issues[0];
|
|
26203
26945
|
if (firstIssue && typeof firstIssue === "object" && "message" in firstIssue) {
|
|
26204
26946
|
return String(firstIssue.message);
|
|
26205
26947
|
}
|
|
26206
26948
|
}
|
|
26207
26949
|
try {
|
|
26208
|
-
return JSON.stringify(
|
|
26950
|
+
return JSON.stringify(error51);
|
|
26209
26951
|
} catch {
|
|
26210
|
-
return String(
|
|
26952
|
+
return String(error51);
|
|
26211
26953
|
}
|
|
26212
26954
|
}
|
|
26213
|
-
return String(
|
|
26955
|
+
return String(error51);
|
|
26214
26956
|
}
|
|
26215
26957
|
function getSchemaDescription(schema) {
|
|
26216
26958
|
return schema.description;
|
|
@@ -27638,8 +28380,8 @@ var Protocol = class {
|
|
|
27638
28380
|
resolver(message);
|
|
27639
28381
|
} else {
|
|
27640
28382
|
const errorMessage = message;
|
|
27641
|
-
const
|
|
27642
|
-
resolver(
|
|
28383
|
+
const error51 = new McpError(errorMessage.error.code, errorMessage.error.message, errorMessage.error.data);
|
|
28384
|
+
resolver(error51);
|
|
27643
28385
|
}
|
|
27644
28386
|
} else {
|
|
27645
28387
|
const messageType = queuedMessage.type === "response" ? "Response" : "Error";
|
|
@@ -27683,8 +28425,8 @@ var Protocol = class {
|
|
|
27683
28425
|
nextCursor,
|
|
27684
28426
|
_meta: {}
|
|
27685
28427
|
};
|
|
27686
|
-
} catch (
|
|
27687
|
-
throw new McpError(ErrorCode.InvalidParams, `Failed to list tasks: ${
|
|
28428
|
+
} catch (error51) {
|
|
28429
|
+
throw new McpError(ErrorCode.InvalidParams, `Failed to list tasks: ${error51 instanceof Error ? error51.message : String(error51)}`);
|
|
27688
28430
|
}
|
|
27689
28431
|
});
|
|
27690
28432
|
this.setRequestHandler(CancelTaskRequestSchema, async (request, extra) => {
|
|
@@ -27706,11 +28448,11 @@ var Protocol = class {
|
|
|
27706
28448
|
_meta: {},
|
|
27707
28449
|
...cancelledTask
|
|
27708
28450
|
};
|
|
27709
|
-
} catch (
|
|
27710
|
-
if (
|
|
27711
|
-
throw
|
|
28451
|
+
} catch (error51) {
|
|
28452
|
+
if (error51 instanceof McpError) {
|
|
28453
|
+
throw error51;
|
|
27712
28454
|
}
|
|
27713
|
-
throw new McpError(ErrorCode.InvalidRequest, `Failed to cancel task: ${
|
|
28455
|
+
throw new McpError(ErrorCode.InvalidRequest, `Failed to cancel task: ${error51 instanceof Error ? error51.message : String(error51)}`);
|
|
27714
28456
|
}
|
|
27715
28457
|
});
|
|
27716
28458
|
}
|
|
@@ -27771,9 +28513,9 @@ var Protocol = class {
|
|
|
27771
28513
|
this._onclose();
|
|
27772
28514
|
};
|
|
27773
28515
|
const _onerror = this.transport?.onerror;
|
|
27774
|
-
this._transport.onerror = (
|
|
27775
|
-
_onerror?.(
|
|
27776
|
-
this._onerror(
|
|
28516
|
+
this._transport.onerror = (error51) => {
|
|
28517
|
+
_onerror?.(error51);
|
|
28518
|
+
this._onerror(error51);
|
|
27777
28519
|
};
|
|
27778
28520
|
const _onmessage = this._transport?.onmessage;
|
|
27779
28521
|
this._transport.onmessage = (message, extra) => {
|
|
@@ -27804,22 +28546,22 @@ var Protocol = class {
|
|
|
27804
28546
|
controller.abort();
|
|
27805
28547
|
}
|
|
27806
28548
|
this._requestHandlerAbortControllers.clear();
|
|
27807
|
-
const
|
|
28549
|
+
const error51 = McpError.fromError(ErrorCode.ConnectionClosed, "Connection closed");
|
|
27808
28550
|
this._transport = void 0;
|
|
27809
28551
|
this.onclose?.();
|
|
27810
28552
|
for (const handler of responseHandlers.values()) {
|
|
27811
|
-
handler(
|
|
28553
|
+
handler(error51);
|
|
27812
28554
|
}
|
|
27813
28555
|
}
|
|
27814
|
-
_onerror(
|
|
27815
|
-
this.onerror?.(
|
|
28556
|
+
_onerror(error51) {
|
|
28557
|
+
this.onerror?.(error51);
|
|
27816
28558
|
}
|
|
27817
28559
|
_onnotification(notification) {
|
|
27818
28560
|
const handler = this._notificationHandlers.get(notification.method) ?? this.fallbackNotificationHandler;
|
|
27819
28561
|
if (handler === void 0) {
|
|
27820
28562
|
return;
|
|
27821
28563
|
}
|
|
27822
|
-
Promise.resolve().then(() => handler(notification)).catch((
|
|
28564
|
+
Promise.resolve().then(() => handler(notification)).catch((error51) => this._onerror(new Error(`Uncaught error in notification handler: ${error51}`)));
|
|
27823
28565
|
}
|
|
27824
28566
|
_onrequest(request, extra) {
|
|
27825
28567
|
const handler = this._requestHandlers.get(request.method) ?? this.fallbackRequestHandler;
|
|
@@ -27839,9 +28581,9 @@ var Protocol = class {
|
|
|
27839
28581
|
type: "error",
|
|
27840
28582
|
message: errorResponse,
|
|
27841
28583
|
timestamp: Date.now()
|
|
27842
|
-
}, capturedTransport?.sessionId).catch((
|
|
28584
|
+
}, capturedTransport?.sessionId).catch((error51) => this._onerror(new Error(`Failed to enqueue error response: ${error51}`)));
|
|
27843
28585
|
} else {
|
|
27844
|
-
capturedTransport?.send(errorResponse).catch((
|
|
28586
|
+
capturedTransport?.send(errorResponse).catch((error51) => this._onerror(new Error(`Failed to send an error response: ${error51}`)));
|
|
27845
28587
|
}
|
|
27846
28588
|
return;
|
|
27847
28589
|
}
|
|
@@ -27907,7 +28649,7 @@ var Protocol = class {
|
|
|
27907
28649
|
} else {
|
|
27908
28650
|
await capturedTransport?.send(response);
|
|
27909
28651
|
}
|
|
27910
|
-
}, async (
|
|
28652
|
+
}, async (error51) => {
|
|
27911
28653
|
if (abortController.signal.aborted) {
|
|
27912
28654
|
return;
|
|
27913
28655
|
}
|
|
@@ -27915,9 +28657,9 @@ var Protocol = class {
|
|
|
27915
28657
|
jsonrpc: "2.0",
|
|
27916
28658
|
id: request.id,
|
|
27917
28659
|
error: {
|
|
27918
|
-
code: Number.isSafeInteger(
|
|
27919
|
-
message:
|
|
27920
|
-
...
|
|
28660
|
+
code: Number.isSafeInteger(error51["code"]) ? error51["code"] : ErrorCode.InternalError,
|
|
28661
|
+
message: error51.message ?? "Internal error",
|
|
28662
|
+
...error51["data"] !== void 0 && { data: error51["data"] }
|
|
27921
28663
|
}
|
|
27922
28664
|
};
|
|
27923
28665
|
if (relatedTaskId && this._taskMessageQueue) {
|
|
@@ -27929,7 +28671,7 @@ var Protocol = class {
|
|
|
27929
28671
|
} else {
|
|
27930
28672
|
await capturedTransport?.send(errorResponse);
|
|
27931
28673
|
}
|
|
27932
|
-
}).catch((
|
|
28674
|
+
}).catch((error51) => this._onerror(new Error(`Failed to send response: ${error51}`))).finally(() => {
|
|
27933
28675
|
if (this._requestHandlerAbortControllers.get(request.id) === abortController) {
|
|
27934
28676
|
this._requestHandlerAbortControllers.delete(request.id);
|
|
27935
28677
|
}
|
|
@@ -27948,11 +28690,11 @@ var Protocol = class {
|
|
|
27948
28690
|
if (timeoutInfo && responseHandler && timeoutInfo.resetTimeoutOnProgress) {
|
|
27949
28691
|
try {
|
|
27950
28692
|
this._resetTimeout(messageId);
|
|
27951
|
-
} catch (
|
|
28693
|
+
} catch (error51) {
|
|
27952
28694
|
this._responseHandlers.delete(messageId);
|
|
27953
28695
|
this._progressHandlers.delete(messageId);
|
|
27954
28696
|
this._cleanupTimeout(messageId);
|
|
27955
|
-
responseHandler(
|
|
28697
|
+
responseHandler(error51);
|
|
27956
28698
|
return;
|
|
27957
28699
|
}
|
|
27958
28700
|
}
|
|
@@ -27966,8 +28708,8 @@ var Protocol = class {
|
|
|
27966
28708
|
if (isJSONRPCResultResponse(response)) {
|
|
27967
28709
|
resolver(response);
|
|
27968
28710
|
} else {
|
|
27969
|
-
const
|
|
27970
|
-
resolver(
|
|
28711
|
+
const error51 = new McpError(response.error.code, response.error.message, response.error.data);
|
|
28712
|
+
resolver(error51);
|
|
27971
28713
|
}
|
|
27972
28714
|
return;
|
|
27973
28715
|
}
|
|
@@ -27995,8 +28737,8 @@ var Protocol = class {
|
|
|
27995
28737
|
if (isJSONRPCResultResponse(response)) {
|
|
27996
28738
|
handler(response);
|
|
27997
28739
|
} else {
|
|
27998
|
-
const
|
|
27999
|
-
handler(
|
|
28740
|
+
const error51 = McpError.fromError(response.error.code, response.error.message, response.error.data);
|
|
28741
|
+
handler(error51);
|
|
28000
28742
|
}
|
|
28001
28743
|
}
|
|
28002
28744
|
get transport() {
|
|
@@ -28041,10 +28783,10 @@ var Protocol = class {
|
|
|
28041
28783
|
try {
|
|
28042
28784
|
const result = await this.request(request, resultSchema, options);
|
|
28043
28785
|
yield { type: "result", result };
|
|
28044
|
-
} catch (
|
|
28786
|
+
} catch (error51) {
|
|
28045
28787
|
yield {
|
|
28046
28788
|
type: "error",
|
|
28047
|
-
error:
|
|
28789
|
+
error: error51 instanceof McpError ? error51 : new McpError(ErrorCode.InternalError, String(error51))
|
|
28048
28790
|
};
|
|
28049
28791
|
}
|
|
28050
28792
|
return;
|
|
@@ -28087,10 +28829,10 @@ var Protocol = class {
|
|
|
28087
28829
|
await new Promise((resolve) => setTimeout(resolve, pollInterval));
|
|
28088
28830
|
options?.signal?.throwIfAborted();
|
|
28089
28831
|
}
|
|
28090
|
-
} catch (
|
|
28832
|
+
} catch (error51) {
|
|
28091
28833
|
yield {
|
|
28092
28834
|
type: "error",
|
|
28093
|
-
error:
|
|
28835
|
+
error: error51 instanceof McpError ? error51 : new McpError(ErrorCode.InternalError, String(error51))
|
|
28094
28836
|
};
|
|
28095
28837
|
}
|
|
28096
28838
|
}
|
|
@@ -28102,8 +28844,8 @@ var Protocol = class {
|
|
|
28102
28844
|
request(request, resultSchema, options) {
|
|
28103
28845
|
const { relatedRequestId, resumptionToken, onresumptiontoken, task, relatedTask } = options ?? {};
|
|
28104
28846
|
return new Promise((resolve, reject) => {
|
|
28105
|
-
const earlyReject = (
|
|
28106
|
-
reject(
|
|
28847
|
+
const earlyReject = (error51) => {
|
|
28848
|
+
reject(error51);
|
|
28107
28849
|
};
|
|
28108
28850
|
if (!this._transport) {
|
|
28109
28851
|
earlyReject(new Error("Not connected"));
|
|
@@ -28163,9 +28905,9 @@ var Protocol = class {
|
|
|
28163
28905
|
requestId: messageId,
|
|
28164
28906
|
reason: String(reason)
|
|
28165
28907
|
}
|
|
28166
|
-
}, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((
|
|
28167
|
-
const
|
|
28168
|
-
reject(
|
|
28908
|
+
}, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error52) => this._onerror(new Error(`Failed to send cancellation: ${error52}`)));
|
|
28909
|
+
const error51 = reason instanceof McpError ? reason : new McpError(ErrorCode.RequestTimeout, String(reason));
|
|
28910
|
+
reject(error51);
|
|
28169
28911
|
};
|
|
28170
28912
|
this._responseHandlers.set(messageId, (response) => {
|
|
28171
28913
|
if (options?.signal?.aborted) {
|
|
@@ -28181,8 +28923,8 @@ var Protocol = class {
|
|
|
28181
28923
|
} else {
|
|
28182
28924
|
resolve(parseResult.data);
|
|
28183
28925
|
}
|
|
28184
|
-
} catch (
|
|
28185
|
-
reject(
|
|
28926
|
+
} catch (error51) {
|
|
28927
|
+
reject(error51);
|
|
28186
28928
|
}
|
|
28187
28929
|
});
|
|
28188
28930
|
options?.signal?.addEventListener("abort", () => {
|
|
@@ -28206,14 +28948,14 @@ var Protocol = class {
|
|
|
28206
28948
|
type: "request",
|
|
28207
28949
|
message: jsonrpcRequest,
|
|
28208
28950
|
timestamp: Date.now()
|
|
28209
|
-
}).catch((
|
|
28951
|
+
}).catch((error51) => {
|
|
28210
28952
|
this._cleanupTimeout(messageId);
|
|
28211
|
-
reject(
|
|
28953
|
+
reject(error51);
|
|
28212
28954
|
});
|
|
28213
28955
|
} else {
|
|
28214
|
-
this._transport.send(jsonrpcRequest, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((
|
|
28956
|
+
this._transport.send(jsonrpcRequest, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error51) => {
|
|
28215
28957
|
this._cleanupTimeout(messageId);
|
|
28216
|
-
reject(
|
|
28958
|
+
reject(error51);
|
|
28217
28959
|
});
|
|
28218
28960
|
}
|
|
28219
28961
|
});
|
|
@@ -28306,7 +29048,7 @@ var Protocol = class {
|
|
|
28306
29048
|
}
|
|
28307
29049
|
};
|
|
28308
29050
|
}
|
|
28309
|
-
this._transport?.send(jsonrpcNotification2, options).catch((
|
|
29051
|
+
this._transport?.send(jsonrpcNotification2, options).catch((error51) => this._onerror(error51));
|
|
28310
29052
|
});
|
|
28311
29053
|
return;
|
|
28312
29054
|
}
|
|
@@ -29168,11 +29910,11 @@ var Server = class extends Protocol {
|
|
|
29168
29910
|
if (!validationResult.valid) {
|
|
29169
29911
|
throw new McpError(ErrorCode.InvalidParams, `Elicitation response content does not match requested schema: ${validationResult.errorMessage}`);
|
|
29170
29912
|
}
|
|
29171
|
-
} catch (
|
|
29172
|
-
if (
|
|
29173
|
-
throw
|
|
29913
|
+
} catch (error51) {
|
|
29914
|
+
if (error51 instanceof McpError) {
|
|
29915
|
+
throw error51;
|
|
29174
29916
|
}
|
|
29175
|
-
throw new McpError(ErrorCode.InternalError, `Error validating elicitation response: ${
|
|
29917
|
+
throw new McpError(ErrorCode.InternalError, `Error validating elicitation response: ${error51 instanceof Error ? error51.message : String(error51)}`);
|
|
29176
29918
|
}
|
|
29177
29919
|
}
|
|
29178
29920
|
return result;
|
|
@@ -29431,13 +30173,13 @@ var McpServer = class {
|
|
|
29431
30173
|
}
|
|
29432
30174
|
await this.validateToolOutput(tool, result, request.params.name);
|
|
29433
30175
|
return result;
|
|
29434
|
-
} catch (
|
|
29435
|
-
if (
|
|
29436
|
-
if (
|
|
29437
|
-
throw
|
|
30176
|
+
} catch (error51) {
|
|
30177
|
+
if (error51 instanceof McpError) {
|
|
30178
|
+
if (error51.code === ErrorCode.UrlElicitationRequired) {
|
|
30179
|
+
throw error51;
|
|
29438
30180
|
}
|
|
29439
30181
|
}
|
|
29440
|
-
return this.createToolError(
|
|
30182
|
+
return this.createToolError(error51 instanceof Error ? error51.message : String(error51));
|
|
29441
30183
|
}
|
|
29442
30184
|
});
|
|
29443
30185
|
this._toolHandlersInitialized = true;
|
|
@@ -29470,8 +30212,8 @@ var McpServer = class {
|
|
|
29470
30212
|
const schemaToParse = inputObj ?? tool.inputSchema;
|
|
29471
30213
|
const parseResult = await safeParseAsync3(schemaToParse, args);
|
|
29472
30214
|
if (!parseResult.success) {
|
|
29473
|
-
const
|
|
29474
|
-
const errorMessage = getParseErrorMessage(
|
|
30215
|
+
const error51 = "error" in parseResult ? parseResult.error : "Unknown error";
|
|
30216
|
+
const errorMessage = getParseErrorMessage(error51);
|
|
29475
30217
|
throw new McpError(ErrorCode.InvalidParams, `Input validation error: Invalid arguments for tool ${toolName}: ${errorMessage}`);
|
|
29476
30218
|
}
|
|
29477
30219
|
return parseResult.data;
|
|
@@ -29495,8 +30237,8 @@ var McpServer = class {
|
|
|
29495
30237
|
const outputObj = normalizeObjectSchema(tool.outputSchema);
|
|
29496
30238
|
const parseResult = await safeParseAsync3(outputObj, result.structuredContent);
|
|
29497
30239
|
if (!parseResult.success) {
|
|
29498
|
-
const
|
|
29499
|
-
const errorMessage = getParseErrorMessage(
|
|
30240
|
+
const error51 = "error" in parseResult ? parseResult.error : "Unknown error";
|
|
30241
|
+
const errorMessage = getParseErrorMessage(error51);
|
|
29500
30242
|
throw new McpError(ErrorCode.InvalidParams, `Output validation error: Invalid structured content for tool ${toolName}: ${errorMessage}`);
|
|
29501
30243
|
}
|
|
29502
30244
|
}
|
|
@@ -29708,8 +30450,8 @@ var McpServer = class {
|
|
|
29708
30450
|
const argsObj = normalizeObjectSchema(prompt.argsSchema);
|
|
29709
30451
|
const parseResult = await safeParseAsync3(argsObj, request.params.arguments);
|
|
29710
30452
|
if (!parseResult.success) {
|
|
29711
|
-
const
|
|
29712
|
-
const errorMessage = getParseErrorMessage(
|
|
30453
|
+
const error51 = "error" in parseResult ? parseResult.error : "Unknown error";
|
|
30454
|
+
const errorMessage = getParseErrorMessage(error51);
|
|
29713
30455
|
throw new McpError(ErrorCode.InvalidParams, `Invalid arguments for prompt ${request.params.name}: ${errorMessage}`);
|
|
29714
30456
|
}
|
|
29715
30457
|
const args = parseResult.data;
|
|
@@ -30931,7 +31673,7 @@ function registerClassroomTools(server2) {
|
|
|
30931
31673
|
}
|
|
30932
31674
|
|
|
30933
31675
|
// ../gogcli-mcp/src/server.ts
|
|
30934
|
-
var VERSION = true ? "2.0.
|
|
31676
|
+
var VERSION = true ? "2.0.3" : "0.0.0";
|
|
30935
31677
|
function createServer(options) {
|
|
30936
31678
|
return new McpServer({
|
|
30937
31679
|
name: options?.name ?? "gogcli",
|