@kentico/management-api-mcp 31.4.1-preview → 31.4.3-preview
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/dist/index.js +1173 -452
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -79,11 +79,11 @@ var require_models = __commonJS({
|
|
|
79
79
|
};
|
|
80
80
|
exports.isJSONRPCResponses = isJSONRPCResponses;
|
|
81
81
|
var createJSONRPCError = function(code, message, data) {
|
|
82
|
-
var
|
|
82
|
+
var error51 = { code, message };
|
|
83
83
|
if (data != null) {
|
|
84
|
-
|
|
84
|
+
error51.data = data;
|
|
85
85
|
}
|
|
86
|
-
return
|
|
86
|
+
return error51;
|
|
87
87
|
};
|
|
88
88
|
var JSONRPCErrorException = (
|
|
89
89
|
/** @class */
|
|
@@ -297,9 +297,9 @@ var require_client = __commonJS({
|
|
|
297
297
|
return request().then(function(result) {
|
|
298
298
|
clearTimeout(timeoutID);
|
|
299
299
|
return result;
|
|
300
|
-
}, function(
|
|
300
|
+
}, function(error51) {
|
|
301
301
|
clearTimeout(timeoutID);
|
|
302
|
-
return Promise.reject(
|
|
302
|
+
return Promise.reject(error51);
|
|
303
303
|
});
|
|
304
304
|
};
|
|
305
305
|
var requestAdvanced = function(request, clientParams) {
|
|
@@ -328,13 +328,13 @@ var require_client = __commonJS({
|
|
|
328
328
|
JSONRPCClient3.prototype.requestWithID = function(method, params, clientParams, id) {
|
|
329
329
|
return __awaiter(this, void 0, void 0, function() {
|
|
330
330
|
var request, response;
|
|
331
|
-
return __generator(this, function(
|
|
332
|
-
switch (
|
|
331
|
+
return __generator(this, function(_a3) {
|
|
332
|
+
switch (_a3.label) {
|
|
333
333
|
case 0:
|
|
334
334
|
request = (0, models_1.createJSONRPCRequest)(id, method, params);
|
|
335
335
|
return [4, this.requestAdvanced(request, clientParams)];
|
|
336
336
|
case 1:
|
|
337
|
-
response =
|
|
337
|
+
response = _a3.sent();
|
|
338
338
|
if (response.result !== void 0 && !response.error) {
|
|
339
339
|
return [2, response.result];
|
|
340
340
|
} else if (response.result === void 0 && response.error) {
|
|
@@ -373,9 +373,9 @@ var require_client = __commonJS({
|
|
|
373
373
|
});
|
|
374
374
|
return this.send(areRequestsOriginallyArray ? requests : requests[0], clientParams).then(function() {
|
|
375
375
|
return promise2;
|
|
376
|
-
}, function(
|
|
376
|
+
}, function(error51) {
|
|
377
377
|
requestsWithID.forEach(function(request) {
|
|
378
|
-
_this.receive((0, models_1.createJSONRPCErrorResponse)(request.id, internal_1.DefaultErrorCode,
|
|
378
|
+
_this.receive((0, models_1.createJSONRPCErrorResponse)(request.id, internal_1.DefaultErrorCode, error51 && error51.message || "Failed to send a request"));
|
|
379
379
|
});
|
|
380
380
|
return promise2;
|
|
381
381
|
});
|
|
@@ -388,7 +388,7 @@ var require_client = __commonJS({
|
|
|
388
388
|
};
|
|
389
389
|
JSONRPCClient3.prototype.send = function(payload, clientParams) {
|
|
390
390
|
return __awaiter(this, void 0, void 0, function() {
|
|
391
|
-
return __generator(this, function(
|
|
391
|
+
return __generator(this, function(_a3) {
|
|
392
392
|
return [2, this._send(payload, clientParams)];
|
|
393
393
|
});
|
|
394
394
|
});
|
|
@@ -570,11 +570,11 @@ var require_server = __commonJS({
|
|
|
570
570
|
if (options === void 0) {
|
|
571
571
|
options = {};
|
|
572
572
|
}
|
|
573
|
-
var
|
|
573
|
+
var _a3;
|
|
574
574
|
this.mapErrorToJSONRPCErrorResponse = defaultMapErrorToJSONRPCErrorResponse;
|
|
575
575
|
this.nameToMethodDictionary = {};
|
|
576
576
|
this.middleware = null;
|
|
577
|
-
this.errorListener = (
|
|
577
|
+
this.errorListener = (_a3 = options.errorListener) !== null && _a3 !== void 0 ? _a3 : console.warn;
|
|
578
578
|
}
|
|
579
579
|
JSONRPCServer3.prototype.hasMethod = function(name) {
|
|
580
580
|
return !!this.nameToMethodDictionary[name];
|
|
@@ -594,8 +594,8 @@ var require_server = __commonJS({
|
|
|
594
594
|
};
|
|
595
595
|
};
|
|
596
596
|
JSONRPCServer3.prototype.addMethodAdvanced = function(name, method) {
|
|
597
|
-
var
|
|
598
|
-
this.nameToMethodDictionary = __assign(__assign({}, this.nameToMethodDictionary), (
|
|
597
|
+
var _a3;
|
|
598
|
+
this.nameToMethodDictionary = __assign(__assign({}, this.nameToMethodDictionary), (_a3 = {}, _a3[name] = method, _a3));
|
|
599
599
|
};
|
|
600
600
|
JSONRPCServer3.prototype.receiveJSON = function(json2, serverParams) {
|
|
601
601
|
var request = this.tryParseRequestJSON(json2);
|
|
@@ -608,7 +608,7 @@ var require_server = __commonJS({
|
|
|
608
608
|
JSONRPCServer3.prototype.tryParseRequestJSON = function(json2) {
|
|
609
609
|
try {
|
|
610
610
|
return JSON.parse(json2);
|
|
611
|
-
} catch (
|
|
611
|
+
} catch (_a3) {
|
|
612
612
|
return null;
|
|
613
613
|
}
|
|
614
614
|
};
|
|
@@ -623,14 +623,14 @@ var require_server = __commonJS({
|
|
|
623
623
|
return __awaiter(this, void 0, void 0, function() {
|
|
624
624
|
var responses;
|
|
625
625
|
var _this = this;
|
|
626
|
-
return __generator(this, function(
|
|
627
|
-
switch (
|
|
626
|
+
return __generator(this, function(_a3) {
|
|
627
|
+
switch (_a3.label) {
|
|
628
628
|
case 0:
|
|
629
629
|
return [4, Promise.all(requests.map(function(request) {
|
|
630
630
|
return _this.receiveSingle(request, serverParams);
|
|
631
631
|
}))];
|
|
632
632
|
case 1:
|
|
633
|
-
responses =
|
|
633
|
+
responses = _a3.sent().filter(isNonNull);
|
|
634
634
|
if (responses.length === 1) {
|
|
635
635
|
return [2, responses[0]];
|
|
636
636
|
} else if (responses.length) {
|
|
@@ -649,8 +649,8 @@ var require_server = __commonJS({
|
|
|
649
649
|
JSONRPCServer3.prototype.receiveSingle = function(request, serverParams) {
|
|
650
650
|
return __awaiter(this, void 0, void 0, function() {
|
|
651
651
|
var method, response;
|
|
652
|
-
return __generator(this, function(
|
|
653
|
-
switch (
|
|
652
|
+
return __generator(this, function(_a3) {
|
|
653
|
+
switch (_a3.label) {
|
|
654
654
|
case 0:
|
|
655
655
|
method = this.nameToMethodDictionary[request.method];
|
|
656
656
|
if (!!(0, models_1.isJSONRPCRequest)(request)) return [3, 1];
|
|
@@ -658,7 +658,7 @@ var require_server = __commonJS({
|
|
|
658
658
|
case 1:
|
|
659
659
|
return [4, this.callMethod(method, request, serverParams)];
|
|
660
660
|
case 2:
|
|
661
|
-
response =
|
|
661
|
+
response = _a3.sent();
|
|
662
662
|
return [2, mapResponse(request, response)];
|
|
663
663
|
}
|
|
664
664
|
});
|
|
@@ -702,19 +702,19 @@ var require_server = __commonJS({
|
|
|
702
702
|
return Promise.resolve(null);
|
|
703
703
|
}
|
|
704
704
|
};
|
|
705
|
-
var onError = function(
|
|
706
|
-
_this.errorListener('An unexpected error occurred while executing "'.concat(request.method, '" JSON-RPC method:'),
|
|
707
|
-
return Promise.resolve(_this.mapErrorToJSONRPCErrorResponseIfNecessary(request.id,
|
|
705
|
+
var onError = function(error51) {
|
|
706
|
+
_this.errorListener('An unexpected error occurred while executing "'.concat(request.method, '" JSON-RPC method:'), error51);
|
|
707
|
+
return Promise.resolve(_this.mapErrorToJSONRPCErrorResponseIfNecessary(request.id, error51));
|
|
708
708
|
};
|
|
709
709
|
try {
|
|
710
710
|
return (this.middleware || noopMiddleware)(callMethod, request, serverParams).then(void 0, onError);
|
|
711
|
-
} catch (
|
|
712
|
-
return onError(
|
|
711
|
+
} catch (error51) {
|
|
712
|
+
return onError(error51);
|
|
713
713
|
}
|
|
714
714
|
};
|
|
715
|
-
JSONRPCServer3.prototype.mapErrorToJSONRPCErrorResponseIfNecessary = function(id,
|
|
715
|
+
JSONRPCServer3.prototype.mapErrorToJSONRPCErrorResponseIfNecessary = function(id, error51) {
|
|
716
716
|
if (id !== void 0) {
|
|
717
|
-
return this.mapErrorToJSONRPCErrorResponse(id,
|
|
717
|
+
return this.mapErrorToJSONRPCErrorResponse(id, error51);
|
|
718
718
|
} else {
|
|
719
719
|
return null;
|
|
720
720
|
}
|
|
@@ -736,14 +736,14 @@ var require_server = __commonJS({
|
|
|
736
736
|
return null;
|
|
737
737
|
}
|
|
738
738
|
};
|
|
739
|
-
var defaultMapErrorToJSONRPCErrorResponse = function(id,
|
|
740
|
-
var
|
|
741
|
-
var message = (
|
|
739
|
+
var defaultMapErrorToJSONRPCErrorResponse = function(id, error51) {
|
|
740
|
+
var _a3;
|
|
741
|
+
var message = (_a3 = error51 === null || error51 === void 0 ? void 0 : error51.message) !== null && _a3 !== void 0 ? _a3 : "An unexpected error occurred";
|
|
742
742
|
var code = internal_1.DefaultErrorCode;
|
|
743
743
|
var data;
|
|
744
|
-
if (
|
|
745
|
-
code =
|
|
746
|
-
data =
|
|
744
|
+
if (error51 instanceof models_1.JSONRPCErrorException) {
|
|
745
|
+
code = error51.code;
|
|
746
|
+
data = error51.data;
|
|
747
747
|
}
|
|
748
748
|
return (0, models_1.createJSONRPCErrorResponse)(id, code, message, data);
|
|
749
749
|
};
|
|
@@ -869,18 +869,18 @@ var require_server_and_client = __commonJS({
|
|
|
869
869
|
if (options === void 0) {
|
|
870
870
|
options = {};
|
|
871
871
|
}
|
|
872
|
-
var
|
|
872
|
+
var _a3;
|
|
873
873
|
this.server = server;
|
|
874
874
|
this.client = client;
|
|
875
|
-
this.errorListener = (
|
|
875
|
+
this.errorListener = (_a3 = options.errorListener) !== null && _a3 !== void 0 ? _a3 : console.warn;
|
|
876
876
|
}
|
|
877
877
|
JSONRPCServerAndClient2.prototype.applyServerMiddleware = function() {
|
|
878
|
-
var
|
|
878
|
+
var _a3;
|
|
879
879
|
var middlewares = [];
|
|
880
880
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
881
881
|
middlewares[_i] = arguments[_i];
|
|
882
882
|
}
|
|
883
|
-
(
|
|
883
|
+
(_a3 = this.server).applyMiddleware.apply(_a3, middlewares);
|
|
884
884
|
};
|
|
885
885
|
JSONRPCServerAndClient2.prototype.hasMethod = function(name) {
|
|
886
886
|
return this.server.hasMethod(name);
|
|
@@ -912,8 +912,8 @@ var require_server_and_client = __commonJS({
|
|
|
912
912
|
JSONRPCServerAndClient2.prototype.receiveAndSend = function(payload, serverParams, clientParams) {
|
|
913
913
|
return __awaiter(this, void 0, void 0, function() {
|
|
914
914
|
var response, message;
|
|
915
|
-
return __generator(this, function(
|
|
916
|
-
switch (
|
|
915
|
+
return __generator(this, function(_a3) {
|
|
916
|
+
switch (_a3.label) {
|
|
917
917
|
case 0:
|
|
918
918
|
if (!((0, models_1.isJSONRPCResponse)(payload) || (0, models_1.isJSONRPCResponses)(payload))) return [3, 1];
|
|
919
919
|
this.client.receive(payload);
|
|
@@ -922,7 +922,7 @@ var require_server_and_client = __commonJS({
|
|
|
922
922
|
if (!((0, models_1.isJSONRPCRequest)(payload) || (0, models_1.isJSONRPCRequests)(payload))) return [3, 3];
|
|
923
923
|
return [4, this.server.receive(payload, serverParams)];
|
|
924
924
|
case 2:
|
|
925
|
-
response =
|
|
925
|
+
response = _a3.sent();
|
|
926
926
|
if (response) {
|
|
927
927
|
return [2, this.client.send(response, clientParams)];
|
|
928
928
|
}
|
|
@@ -1553,8 +1553,8 @@ var init_sqids = __esm({
|
|
|
1553
1553
|
};
|
|
1554
1554
|
Sqids = class {
|
|
1555
1555
|
constructor(options) {
|
|
1556
|
-
var
|
|
1557
|
-
const alphabet = (
|
|
1556
|
+
var _a3, _b, _c;
|
|
1557
|
+
const alphabet = (_a3 = options === null || options === void 0 ? void 0 : options.alphabet) !== null && _a3 !== void 0 ? _a3 : defaultOptions.alphabet;
|
|
1558
1558
|
const minLength = (_b = options === null || options === void 0 ? void 0 : options.minLength) !== null && _b !== void 0 ? _b : defaultOptions.minLength;
|
|
1559
1559
|
const blocklist = (_c = options === null || options === void 0 ? void 0 : options.blocklist) !== null && _c !== void 0 ? _c : defaultOptions.blocklist;
|
|
1560
1560
|
if (new Blob([alphabet]).size !== alphabet.length) {
|
|
@@ -2301,9 +2301,9 @@ var UriTemplateMatcher = class {
|
|
|
2301
2301
|
try {
|
|
2302
2302
|
const parsed = parse_template(template);
|
|
2303
2303
|
this.templates.push(parsed);
|
|
2304
|
-
} catch (
|
|
2304
|
+
} catch (error51) {
|
|
2305
2305
|
throw new Error(
|
|
2306
|
-
`Invalid template: ${template} - ${
|
|
2306
|
+
`Invalid template: ${template} - ${error51 instanceof Error ? error51.message : String(error51)}`
|
|
2307
2307
|
);
|
|
2308
2308
|
}
|
|
2309
2309
|
}
|
|
@@ -4376,11 +4376,11 @@ var McpServer = class {
|
|
|
4376
4376
|
if (should_version_negotiation_fail(
|
|
4377
4377
|
validated_initialize.protocolVersion
|
|
4378
4378
|
)) {
|
|
4379
|
-
const
|
|
4379
|
+
const error51 = new McpError(
|
|
4380
4380
|
-32602,
|
|
4381
4381
|
"Invalid protocol version format"
|
|
4382
4382
|
);
|
|
4383
|
-
throw
|
|
4383
|
+
throw error51;
|
|
4384
4384
|
}
|
|
4385
4385
|
const negotiated_version = negotiate_protocol_version(
|
|
4386
4386
|
validated_initialize.protocolVersion
|
|
@@ -4393,27 +4393,27 @@ var McpServer = class {
|
|
|
4393
4393
|
...options,
|
|
4394
4394
|
serverInfo: server_info
|
|
4395
4395
|
};
|
|
4396
|
-
} catch (
|
|
4397
|
-
if (
|
|
4398
|
-
throw
|
|
4396
|
+
} catch (error51) {
|
|
4397
|
+
if (error51 instanceof McpError) {
|
|
4398
|
+
throw error51;
|
|
4399
4399
|
}
|
|
4400
4400
|
if (
|
|
4401
4401
|
/** @type {Error} */
|
|
4402
|
-
|
|
4402
|
+
error51.message?.includes(
|
|
4403
4403
|
"Protocol version"
|
|
4404
4404
|
)
|
|
4405
4405
|
) {
|
|
4406
4406
|
const rpc_error2 = new McpError(
|
|
4407
4407
|
-32602,
|
|
4408
4408
|
`Protocol version validation failed: ${/** @type {Error} */
|
|
4409
|
-
|
|
4409
|
+
error51.message}. Server supports: ${get_supported_versions().join(", ")}`
|
|
4410
4410
|
);
|
|
4411
4411
|
throw rpc_error2;
|
|
4412
4412
|
}
|
|
4413
4413
|
const rpc_error = new McpError(
|
|
4414
4414
|
-32603,
|
|
4415
4415
|
`Initialization failed: ${/** @type {Error} */
|
|
4416
|
-
|
|
4416
|
+
error51.message}`
|
|
4417
4417
|
);
|
|
4418
4418
|
throw rpc_error;
|
|
4419
4419
|
}
|
|
@@ -5481,6 +5481,7 @@ __export(external_exports, {
|
|
|
5481
5481
|
int32: () => int32,
|
|
5482
5482
|
int64: () => int64,
|
|
5483
5483
|
intersection: () => intersection,
|
|
5484
|
+
invertCodec: () => invertCodec,
|
|
5484
5485
|
ipv4: () => ipv42,
|
|
5485
5486
|
ipv6: () => ipv62,
|
|
5486
5487
|
iso: () => iso_exports,
|
|
@@ -5861,7 +5862,8 @@ __export(core_exports2, {
|
|
|
5861
5862
|
});
|
|
5862
5863
|
|
|
5863
5864
|
// node_modules/zod/v4/core/core.js
|
|
5864
|
-
var
|
|
5865
|
+
var _a;
|
|
5866
|
+
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
5865
5867
|
status: "aborted"
|
|
5866
5868
|
});
|
|
5867
5869
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -5896,10 +5898,10 @@ function $constructor(name, initializer3, params) {
|
|
|
5896
5898
|
}
|
|
5897
5899
|
Object.defineProperty(Definition, "name", { value: name });
|
|
5898
5900
|
function _(def) {
|
|
5899
|
-
var
|
|
5901
|
+
var _a3;
|
|
5900
5902
|
const inst = params?.Parent ? new Definition() : this;
|
|
5901
5903
|
init(inst, def);
|
|
5902
|
-
(
|
|
5904
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
5903
5905
|
for (const fn of inst._zod.deferred) {
|
|
5904
5906
|
fn();
|
|
5905
5907
|
}
|
|
@@ -5928,7 +5930,8 @@ var $ZodEncodeError = class extends Error {
|
|
|
5928
5930
|
this.name = "ZodEncodeError";
|
|
5929
5931
|
}
|
|
5930
5932
|
};
|
|
5931
|
-
|
|
5933
|
+
(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
|
|
5934
|
+
var globalConfig = globalThis.__zod_globalConfig;
|
|
5932
5935
|
function config(newConfig) {
|
|
5933
5936
|
if (newConfig)
|
|
5934
5937
|
Object.assign(globalConfig, newConfig);
|
|
@@ -5961,6 +5964,7 @@ __export(util_exports, {
|
|
|
5961
5964
|
defineLazy: () => defineLazy,
|
|
5962
5965
|
esc: () => esc,
|
|
5963
5966
|
escapeRegex: () => escapeRegex,
|
|
5967
|
+
explicitlyAborted: () => explicitlyAborted,
|
|
5964
5968
|
extend: () => extend,
|
|
5965
5969
|
finalizeIssue: () => finalizeIssue,
|
|
5966
5970
|
floatSafeRemainder: () => floatSafeRemainder,
|
|
@@ -6049,19 +6053,12 @@ function cleanRegex(source) {
|
|
|
6049
6053
|
return source.slice(start, end);
|
|
6050
6054
|
}
|
|
6051
6055
|
function floatSafeRemainder(val, step) {
|
|
6052
|
-
const
|
|
6053
|
-
const
|
|
6054
|
-
|
|
6055
|
-
if (
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
stepDecCount = Number.parseInt(match[1]);
|
|
6059
|
-
}
|
|
6060
|
-
}
|
|
6061
|
-
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
6062
|
-
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
|
|
6063
|
-
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
|
6064
|
-
return valInt % stepInt / 10 ** decCount;
|
|
6056
|
+
const ratio = val / step;
|
|
6057
|
+
const roundedRatio = Math.round(ratio);
|
|
6058
|
+
const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
|
|
6059
|
+
if (Math.abs(ratio - roundedRatio) < tolerance)
|
|
6060
|
+
return 0;
|
|
6061
|
+
return ratio - roundedRatio;
|
|
6065
6062
|
}
|
|
6066
6063
|
var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
6067
6064
|
function defineLazy(object3, key, getter) {
|
|
@@ -6143,7 +6140,10 @@ var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace :
|
|
|
6143
6140
|
function isObject(data) {
|
|
6144
6141
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
6145
6142
|
}
|
|
6146
|
-
var allowsEval = cached(() => {
|
|
6143
|
+
var allowsEval = /* @__PURE__ */ cached(() => {
|
|
6144
|
+
if (globalConfig.jitless) {
|
|
6145
|
+
return false;
|
|
6146
|
+
}
|
|
6147
6147
|
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
|
|
6148
6148
|
return false;
|
|
6149
6149
|
}
|
|
@@ -6176,6 +6176,10 @@ function shallowClone(o) {
|
|
|
6176
6176
|
return { ...o };
|
|
6177
6177
|
if (Array.isArray(o))
|
|
6178
6178
|
return [...o];
|
|
6179
|
+
if (o instanceof Map)
|
|
6180
|
+
return new Map(o);
|
|
6181
|
+
if (o instanceof Set)
|
|
6182
|
+
return new Set(o);
|
|
6179
6183
|
return o;
|
|
6180
6184
|
}
|
|
6181
6185
|
function numKeys(data) {
|
|
@@ -6232,7 +6236,14 @@ var getParsedType = (data) => {
|
|
|
6232
6236
|
}
|
|
6233
6237
|
};
|
|
6234
6238
|
var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
6235
|
-
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
6239
|
+
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
6240
|
+
"string",
|
|
6241
|
+
"number",
|
|
6242
|
+
"bigint",
|
|
6243
|
+
"boolean",
|
|
6244
|
+
"symbol",
|
|
6245
|
+
"undefined"
|
|
6246
|
+
]);
|
|
6236
6247
|
function escapeRegex(str) {
|
|
6237
6248
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
6238
6249
|
}
|
|
@@ -6401,6 +6412,9 @@ function safeExtend(schema, shape) {
|
|
|
6401
6412
|
return clone(schema, def);
|
|
6402
6413
|
}
|
|
6403
6414
|
function merge(a, b) {
|
|
6415
|
+
if (a._zod.def.checks?.length) {
|
|
6416
|
+
throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
6417
|
+
}
|
|
6404
6418
|
const def = mergeDefs(a._zod.def, {
|
|
6405
6419
|
get shape() {
|
|
6406
6420
|
const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
|
|
@@ -6410,8 +6424,7 @@ function merge(a, b) {
|
|
|
6410
6424
|
get catchall() {
|
|
6411
6425
|
return b._zod.def.catchall;
|
|
6412
6426
|
},
|
|
6413
|
-
checks: []
|
|
6414
|
-
// delete existing checks
|
|
6427
|
+
checks: b._zod.def.checks ?? []
|
|
6415
6428
|
});
|
|
6416
6429
|
return clone(a, def);
|
|
6417
6430
|
}
|
|
@@ -6494,10 +6507,20 @@ function aborted(x, startIndex = 0) {
|
|
|
6494
6507
|
}
|
|
6495
6508
|
return false;
|
|
6496
6509
|
}
|
|
6510
|
+
function explicitlyAborted(x, startIndex = 0) {
|
|
6511
|
+
if (x.aborted === true)
|
|
6512
|
+
return true;
|
|
6513
|
+
for (let i = startIndex; i < x.issues.length; i++) {
|
|
6514
|
+
if (x.issues[i]?.continue === false) {
|
|
6515
|
+
return true;
|
|
6516
|
+
}
|
|
6517
|
+
}
|
|
6518
|
+
return false;
|
|
6519
|
+
}
|
|
6497
6520
|
function prefixIssues(path2, issues) {
|
|
6498
6521
|
return issues.map((iss) => {
|
|
6499
|
-
var
|
|
6500
|
-
(
|
|
6522
|
+
var _a3;
|
|
6523
|
+
(_a3 = iss).path ?? (_a3.path = []);
|
|
6501
6524
|
iss.path.unshift(path2);
|
|
6502
6525
|
return iss;
|
|
6503
6526
|
});
|
|
@@ -6506,17 +6529,14 @@ function unwrapMessage(message) {
|
|
|
6506
6529
|
return typeof message === "string" ? message : message?.message;
|
|
6507
6530
|
}
|
|
6508
6531
|
function finalizeIssue(iss, ctx, config2) {
|
|
6509
|
-
const
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
delete full.continue;
|
|
6516
|
-
if (!ctx?.reportInput) {
|
|
6517
|
-
delete full.input;
|
|
6532
|
+
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";
|
|
6533
|
+
const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
|
|
6534
|
+
rest.path ?? (rest.path = []);
|
|
6535
|
+
rest.message = message;
|
|
6536
|
+
if (ctx?.reportInput) {
|
|
6537
|
+
rest.input = _input;
|
|
6518
6538
|
}
|
|
6519
|
-
return
|
|
6539
|
+
return rest;
|
|
6520
6540
|
}
|
|
6521
6541
|
function getSizableOrigin(input) {
|
|
6522
6542
|
if (input instanceof Set)
|
|
@@ -6633,10 +6653,10 @@ var initializer = (inst, def) => {
|
|
|
6633
6653
|
};
|
|
6634
6654
|
var $ZodError = $constructor("$ZodError", initializer);
|
|
6635
6655
|
var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
|
|
6636
|
-
function flattenError(
|
|
6656
|
+
function flattenError(error51, mapper = (issue2) => issue2.message) {
|
|
6637
6657
|
const fieldErrors = {};
|
|
6638
6658
|
const formErrors = [];
|
|
6639
|
-
for (const sub of
|
|
6659
|
+
for (const sub of error51.issues) {
|
|
6640
6660
|
if (sub.path.length > 0) {
|
|
6641
6661
|
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
6642
6662
|
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
@@ -6646,50 +6666,53 @@ function flattenError(error48, mapper = (issue2) => issue2.message) {
|
|
|
6646
6666
|
}
|
|
6647
6667
|
return { formErrors, fieldErrors };
|
|
6648
6668
|
}
|
|
6649
|
-
function formatError(
|
|
6669
|
+
function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
6650
6670
|
const fieldErrors = { _errors: [] };
|
|
6651
|
-
const processError = (
|
|
6652
|
-
for (const issue2 of
|
|
6671
|
+
const processError = (error52, path2 = []) => {
|
|
6672
|
+
for (const issue2 of error52.issues) {
|
|
6653
6673
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
6654
|
-
issue2.errors.map((issues) => processError({ issues }));
|
|
6674
|
+
issue2.errors.map((issues) => processError({ issues }, [...path2, ...issue2.path]));
|
|
6655
6675
|
} else if (issue2.code === "invalid_key") {
|
|
6656
|
-
processError({ issues: issue2.issues });
|
|
6676
|
+
processError({ issues: issue2.issues }, [...path2, ...issue2.path]);
|
|
6657
6677
|
} else if (issue2.code === "invalid_element") {
|
|
6658
|
-
processError({ issues: issue2.issues });
|
|
6659
|
-
} else if (issue2.path.length === 0) {
|
|
6660
|
-
fieldErrors._errors.push(mapper(issue2));
|
|
6678
|
+
processError({ issues: issue2.issues }, [...path2, ...issue2.path]);
|
|
6661
6679
|
} else {
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6680
|
+
const fullpath = [...path2, ...issue2.path];
|
|
6681
|
+
if (fullpath.length === 0) {
|
|
6682
|
+
fieldErrors._errors.push(mapper(issue2));
|
|
6683
|
+
} else {
|
|
6684
|
+
let curr = fieldErrors;
|
|
6685
|
+
let i = 0;
|
|
6686
|
+
while (i < fullpath.length) {
|
|
6687
|
+
const el = fullpath[i];
|
|
6688
|
+
const terminal = i === fullpath.length - 1;
|
|
6689
|
+
if (!terminal) {
|
|
6690
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
6691
|
+
} else {
|
|
6692
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
6693
|
+
curr[el]._errors.push(mapper(issue2));
|
|
6694
|
+
}
|
|
6695
|
+
curr = curr[el];
|
|
6696
|
+
i++;
|
|
6672
6697
|
}
|
|
6673
|
-
curr = curr[el];
|
|
6674
|
-
i++;
|
|
6675
6698
|
}
|
|
6676
6699
|
}
|
|
6677
6700
|
}
|
|
6678
6701
|
};
|
|
6679
|
-
processError(
|
|
6702
|
+
processError(error51);
|
|
6680
6703
|
return fieldErrors;
|
|
6681
6704
|
}
|
|
6682
|
-
function treeifyError(
|
|
6705
|
+
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
6683
6706
|
const result = { errors: [] };
|
|
6684
|
-
const processError = (
|
|
6685
|
-
var
|
|
6686
|
-
for (const issue2 of
|
|
6707
|
+
const processError = (error52, path2 = []) => {
|
|
6708
|
+
var _a3, _b;
|
|
6709
|
+
for (const issue2 of error52.issues) {
|
|
6687
6710
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
6688
|
-
issue2.errors.map((issues) => processError({ issues }, issue2.path));
|
|
6711
|
+
issue2.errors.map((issues) => processError({ issues }, [...path2, ...issue2.path]));
|
|
6689
6712
|
} else if (issue2.code === "invalid_key") {
|
|
6690
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
6713
|
+
processError({ issues: issue2.issues }, [...path2, ...issue2.path]);
|
|
6691
6714
|
} else if (issue2.code === "invalid_element") {
|
|
6692
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
6715
|
+
processError({ issues: issue2.issues }, [...path2, ...issue2.path]);
|
|
6693
6716
|
} else {
|
|
6694
6717
|
const fullpath = [...path2, ...issue2.path];
|
|
6695
6718
|
if (fullpath.length === 0) {
|
|
@@ -6703,7 +6726,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
6703
6726
|
const terminal = i === fullpath.length - 1;
|
|
6704
6727
|
if (typeof el === "string") {
|
|
6705
6728
|
curr.properties ?? (curr.properties = {});
|
|
6706
|
-
(
|
|
6729
|
+
(_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
|
|
6707
6730
|
curr = curr.properties[el];
|
|
6708
6731
|
} else {
|
|
6709
6732
|
curr.items ?? (curr.items = []);
|
|
@@ -6718,7 +6741,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
6718
6741
|
}
|
|
6719
6742
|
}
|
|
6720
6743
|
};
|
|
6721
|
-
processError(
|
|
6744
|
+
processError(error51);
|
|
6722
6745
|
return result;
|
|
6723
6746
|
}
|
|
6724
6747
|
function toDotPath(_path) {
|
|
@@ -6739,9 +6762,9 @@ function toDotPath(_path) {
|
|
|
6739
6762
|
}
|
|
6740
6763
|
return segs.join("");
|
|
6741
6764
|
}
|
|
6742
|
-
function prettifyError(
|
|
6765
|
+
function prettifyError(error51) {
|
|
6743
6766
|
const lines = [];
|
|
6744
|
-
const issues = [...
|
|
6767
|
+
const issues = [...error51.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
|
|
6745
6768
|
for (const issue2 of issues) {
|
|
6746
6769
|
lines.push(`\u2716 ${issue2.message}`);
|
|
6747
6770
|
if (issue2.path?.length)
|
|
@@ -6752,7 +6775,7 @@ function prettifyError(error48) {
|
|
|
6752
6775
|
|
|
6753
6776
|
// node_modules/zod/v4/core/parse.js
|
|
6754
6777
|
var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
6755
|
-
const ctx = _ctx ?
|
|
6778
|
+
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
6756
6779
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
6757
6780
|
if (result instanceof Promise) {
|
|
6758
6781
|
throw new $ZodAsyncError();
|
|
@@ -6766,7 +6789,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
6766
6789
|
};
|
|
6767
6790
|
var parse2 = /* @__PURE__ */ _parse($ZodRealError);
|
|
6768
6791
|
var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
6769
|
-
const ctx = _ctx ?
|
|
6792
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
6770
6793
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
6771
6794
|
if (result instanceof Promise)
|
|
6772
6795
|
result = await result;
|
|
@@ -6791,7 +6814,7 @@ var _safeParse = (_Err) => (schema, value, _ctx) => {
|
|
|
6791
6814
|
};
|
|
6792
6815
|
var safeParse2 = /* @__PURE__ */ _safeParse($ZodRealError);
|
|
6793
6816
|
var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
6794
|
-
const ctx = _ctx ?
|
|
6817
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
6795
6818
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
6796
6819
|
if (result instanceof Promise)
|
|
6797
6820
|
result = await result;
|
|
@@ -6802,7 +6825,7 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
6802
6825
|
};
|
|
6803
6826
|
var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
6804
6827
|
var _encode = (_Err) => (schema, value, _ctx) => {
|
|
6805
|
-
const ctx = _ctx ?
|
|
6828
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
6806
6829
|
return _parse(_Err)(schema, value, ctx);
|
|
6807
6830
|
};
|
|
6808
6831
|
var encode = /* @__PURE__ */ _encode($ZodRealError);
|
|
@@ -6811,7 +6834,7 @@ var _decode = (_Err) => (schema, value, _ctx) => {
|
|
|
6811
6834
|
};
|
|
6812
6835
|
var decode = /* @__PURE__ */ _decode($ZodRealError);
|
|
6813
6836
|
var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
6814
|
-
const ctx = _ctx ?
|
|
6837
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
6815
6838
|
return _parseAsync(_Err)(schema, value, ctx);
|
|
6816
6839
|
};
|
|
6817
6840
|
var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
|
|
@@ -6820,7 +6843,7 @@ var _decodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
6820
6843
|
};
|
|
6821
6844
|
var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
|
|
6822
6845
|
var _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
6823
|
-
const ctx = _ctx ?
|
|
6846
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
6824
6847
|
return _safeParse(_Err)(schema, value, ctx);
|
|
6825
6848
|
};
|
|
6826
6849
|
var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
|
|
@@ -6829,7 +6852,7 @@ var _safeDecode = (_Err) => (schema, value, _ctx) => {
|
|
|
6829
6852
|
};
|
|
6830
6853
|
var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
|
|
6831
6854
|
var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
6832
|
-
const ctx = _ctx ?
|
|
6855
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
6833
6856
|
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
6834
6857
|
};
|
|
6835
6858
|
var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
|
|
@@ -6862,6 +6885,7 @@ __export(regexes_exports, {
|
|
|
6862
6885
|
hex: () => hex,
|
|
6863
6886
|
hostname: () => hostname,
|
|
6864
6887
|
html5Email: () => html5Email,
|
|
6888
|
+
httpProtocol: () => httpProtocol,
|
|
6865
6889
|
idnEmail: () => idnEmail,
|
|
6866
6890
|
integer: () => integer2,
|
|
6867
6891
|
ipv4: () => ipv4,
|
|
@@ -6900,7 +6924,7 @@ __export(regexes_exports, {
|
|
|
6900
6924
|
uuid7: () => uuid7,
|
|
6901
6925
|
xid: () => xid
|
|
6902
6926
|
});
|
|
6903
|
-
var cuid = /^[cC][
|
|
6927
|
+
var cuid = /^[cC][0-9a-z]{6,}$/;
|
|
6904
6928
|
var cuid2 = /^[0-9a-z]+$/;
|
|
6905
6929
|
var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
6906
6930
|
var xid = /^[0-9a-vA-V]{20}$/;
|
|
@@ -6939,6 +6963,7 @@ var base642 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+
|
|
|
6939
6963
|
var base64url = /^[A-Za-z0-9_-]*$/;
|
|
6940
6964
|
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])?)*\.?$/;
|
|
6941
6965
|
var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
|
|
6966
|
+
var httpProtocol = /^https?$/;
|
|
6942
6967
|
var e164 = /^\+[1-9]\d{6,14}$/;
|
|
6943
6968
|
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])))`;
|
|
6944
6969
|
var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
@@ -6997,10 +7022,10 @@ var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
|
6997
7022
|
|
|
6998
7023
|
// node_modules/zod/v4/core/checks.js
|
|
6999
7024
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
7000
|
-
var
|
|
7025
|
+
var _a3;
|
|
7001
7026
|
inst._zod ?? (inst._zod = {});
|
|
7002
7027
|
inst._zod.def = def;
|
|
7003
|
-
(
|
|
7028
|
+
(_a3 = inst._zod).onattach ?? (_a3.onattach = []);
|
|
7004
7029
|
});
|
|
7005
7030
|
var numericOriginMap = {
|
|
7006
7031
|
number: "number",
|
|
@@ -7066,8 +7091,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
|
|
|
7066
7091
|
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
7067
7092
|
$ZodCheck.init(inst, def);
|
|
7068
7093
|
inst._zod.onattach.push((inst2) => {
|
|
7069
|
-
var
|
|
7070
|
-
(
|
|
7094
|
+
var _a3;
|
|
7095
|
+
(_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
|
|
7071
7096
|
});
|
|
7072
7097
|
inst._zod.check = (payload) => {
|
|
7073
7098
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -7200,9 +7225,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
7200
7225
|
};
|
|
7201
7226
|
});
|
|
7202
7227
|
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
7203
|
-
var
|
|
7228
|
+
var _a3;
|
|
7204
7229
|
$ZodCheck.init(inst, def);
|
|
7205
|
-
(
|
|
7230
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
7206
7231
|
const val = payload.value;
|
|
7207
7232
|
return !nullish(val) && val.size !== void 0;
|
|
7208
7233
|
});
|
|
@@ -7228,9 +7253,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
7228
7253
|
};
|
|
7229
7254
|
});
|
|
7230
7255
|
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
7231
|
-
var
|
|
7256
|
+
var _a3;
|
|
7232
7257
|
$ZodCheck.init(inst, def);
|
|
7233
|
-
(
|
|
7258
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
7234
7259
|
const val = payload.value;
|
|
7235
7260
|
return !nullish(val) && val.size !== void 0;
|
|
7236
7261
|
});
|
|
@@ -7256,9 +7281,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
7256
7281
|
};
|
|
7257
7282
|
});
|
|
7258
7283
|
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
7259
|
-
var
|
|
7284
|
+
var _a3;
|
|
7260
7285
|
$ZodCheck.init(inst, def);
|
|
7261
|
-
(
|
|
7286
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
7262
7287
|
const val = payload.value;
|
|
7263
7288
|
return !nullish(val) && val.size !== void 0;
|
|
7264
7289
|
});
|
|
@@ -7286,9 +7311,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
|
|
|
7286
7311
|
};
|
|
7287
7312
|
});
|
|
7288
7313
|
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
7289
|
-
var
|
|
7314
|
+
var _a3;
|
|
7290
7315
|
$ZodCheck.init(inst, def);
|
|
7291
|
-
(
|
|
7316
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
7292
7317
|
const val = payload.value;
|
|
7293
7318
|
return !nullish(val) && val.length !== void 0;
|
|
7294
7319
|
});
|
|
@@ -7315,9 +7340,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
7315
7340
|
};
|
|
7316
7341
|
});
|
|
7317
7342
|
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
7318
|
-
var
|
|
7343
|
+
var _a3;
|
|
7319
7344
|
$ZodCheck.init(inst, def);
|
|
7320
|
-
(
|
|
7345
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
7321
7346
|
const val = payload.value;
|
|
7322
7347
|
return !nullish(val) && val.length !== void 0;
|
|
7323
7348
|
});
|
|
@@ -7344,9 +7369,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
7344
7369
|
};
|
|
7345
7370
|
});
|
|
7346
7371
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
7347
|
-
var
|
|
7372
|
+
var _a3;
|
|
7348
7373
|
$ZodCheck.init(inst, def);
|
|
7349
|
-
(
|
|
7374
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
7350
7375
|
const val = payload.value;
|
|
7351
7376
|
return !nullish(val) && val.length !== void 0;
|
|
7352
7377
|
});
|
|
@@ -7375,7 +7400,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
7375
7400
|
};
|
|
7376
7401
|
});
|
|
7377
7402
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
7378
|
-
var
|
|
7403
|
+
var _a3, _b;
|
|
7379
7404
|
$ZodCheck.init(inst, def);
|
|
7380
7405
|
inst._zod.onattach.push((inst2) => {
|
|
7381
7406
|
const bag = inst2._zod.bag;
|
|
@@ -7386,7 +7411,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
7386
7411
|
}
|
|
7387
7412
|
});
|
|
7388
7413
|
if (def.pattern)
|
|
7389
|
-
(
|
|
7414
|
+
(_a3 = inst._zod).check ?? (_a3.check = (payload) => {
|
|
7390
7415
|
def.pattern.lastIndex = 0;
|
|
7391
7416
|
if (def.pattern.test(payload.value))
|
|
7392
7417
|
return;
|
|
@@ -7582,13 +7607,13 @@ var Doc = class {
|
|
|
7582
7607
|
// node_modules/zod/v4/core/versions.js
|
|
7583
7608
|
var version = {
|
|
7584
7609
|
major: 4,
|
|
7585
|
-
minor:
|
|
7586
|
-
patch:
|
|
7610
|
+
minor: 4,
|
|
7611
|
+
patch: 1
|
|
7587
7612
|
};
|
|
7588
7613
|
|
|
7589
7614
|
// node_modules/zod/v4/core/schemas.js
|
|
7590
7615
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
7591
|
-
var
|
|
7616
|
+
var _a3;
|
|
7592
7617
|
inst ?? (inst = {});
|
|
7593
7618
|
inst._zod.def = def;
|
|
7594
7619
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -7603,7 +7628,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
7603
7628
|
}
|
|
7604
7629
|
}
|
|
7605
7630
|
if (checks.length === 0) {
|
|
7606
|
-
(
|
|
7631
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
7607
7632
|
inst._zod.deferred?.push(() => {
|
|
7608
7633
|
inst._zod.run = inst._zod.parse;
|
|
7609
7634
|
});
|
|
@@ -7613,6 +7638,8 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
7613
7638
|
let asyncResult;
|
|
7614
7639
|
for (const ch of checks2) {
|
|
7615
7640
|
if (ch._zod.def.when) {
|
|
7641
|
+
if (explicitlyAborted(payload))
|
|
7642
|
+
continue;
|
|
7616
7643
|
const shouldRun = ch._zod.def.when(payload);
|
|
7617
7644
|
if (!shouldRun)
|
|
7618
7645
|
continue;
|
|
@@ -7753,6 +7780,19 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
7753
7780
|
inst._zod.check = (payload) => {
|
|
7754
7781
|
try {
|
|
7755
7782
|
const trimmed = payload.value.trim();
|
|
7783
|
+
if (!def.normalize && def.protocol?.source === httpProtocol.source) {
|
|
7784
|
+
if (!/^https?:\/\//i.test(trimmed)) {
|
|
7785
|
+
payload.issues.push({
|
|
7786
|
+
code: "invalid_format",
|
|
7787
|
+
format: "url",
|
|
7788
|
+
note: "Invalid URL format",
|
|
7789
|
+
input: payload.value,
|
|
7790
|
+
inst,
|
|
7791
|
+
continue: !def.abort
|
|
7792
|
+
});
|
|
7793
|
+
return;
|
|
7794
|
+
}
|
|
7795
|
+
}
|
|
7756
7796
|
const url2 = new URL(trimmed);
|
|
7757
7797
|
if (def.hostname) {
|
|
7758
7798
|
def.hostname.lastIndex = 0;
|
|
@@ -7906,6 +7946,8 @@ var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
|
|
|
7906
7946
|
function isValidBase64(data) {
|
|
7907
7947
|
if (data === "")
|
|
7908
7948
|
return true;
|
|
7949
|
+
if (/\s/.test(data))
|
|
7950
|
+
return false;
|
|
7909
7951
|
if (data.length % 4 !== 0)
|
|
7910
7952
|
return false;
|
|
7911
7953
|
try {
|
|
@@ -8098,8 +8140,6 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
|
|
|
8098
8140
|
$ZodType.init(inst, def);
|
|
8099
8141
|
inst._zod.pattern = _undefined;
|
|
8100
8142
|
inst._zod.values = /* @__PURE__ */ new Set([void 0]);
|
|
8101
|
-
inst._zod.optin = "optional";
|
|
8102
|
-
inst._zod.optout = "optional";
|
|
8103
8143
|
inst._zod.parse = (payload, _ctx) => {
|
|
8104
8144
|
const input = payload.value;
|
|
8105
8145
|
if (typeof input === "undefined")
|
|
@@ -8228,15 +8268,27 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
8228
8268
|
return payload;
|
|
8229
8269
|
};
|
|
8230
8270
|
});
|
|
8231
|
-
function handlePropertyResult(result, final, key, input, isOptionalOut) {
|
|
8271
|
+
function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
|
|
8272
|
+
const isPresent = key in input;
|
|
8232
8273
|
if (result.issues.length) {
|
|
8233
|
-
if (isOptionalOut && !
|
|
8274
|
+
if (isOptionalIn && isOptionalOut && !isPresent) {
|
|
8234
8275
|
return;
|
|
8235
8276
|
}
|
|
8236
8277
|
final.issues.push(...prefixIssues(key, result.issues));
|
|
8237
8278
|
}
|
|
8279
|
+
if (!isPresent && !isOptionalIn) {
|
|
8280
|
+
if (!result.issues.length) {
|
|
8281
|
+
final.issues.push({
|
|
8282
|
+
code: "invalid_type",
|
|
8283
|
+
expected: "nonoptional",
|
|
8284
|
+
input: void 0,
|
|
8285
|
+
path: [key]
|
|
8286
|
+
});
|
|
8287
|
+
}
|
|
8288
|
+
return;
|
|
8289
|
+
}
|
|
8238
8290
|
if (result.value === void 0) {
|
|
8239
|
-
if (
|
|
8291
|
+
if (isPresent) {
|
|
8240
8292
|
final.value[key] = void 0;
|
|
8241
8293
|
}
|
|
8242
8294
|
} else {
|
|
@@ -8264,8 +8316,11 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
8264
8316
|
const keySet = def.keySet;
|
|
8265
8317
|
const _catchall = def.catchall._zod;
|
|
8266
8318
|
const t = _catchall.def.type;
|
|
8319
|
+
const isOptionalIn = _catchall.optin === "optional";
|
|
8267
8320
|
const isOptionalOut = _catchall.optout === "optional";
|
|
8268
8321
|
for (const key in input) {
|
|
8322
|
+
if (key === "__proto__")
|
|
8323
|
+
continue;
|
|
8269
8324
|
if (keySet.has(key))
|
|
8270
8325
|
continue;
|
|
8271
8326
|
if (t === "never") {
|
|
@@ -8274,9 +8329,9 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
8274
8329
|
}
|
|
8275
8330
|
const r = _catchall.run({ value: input[key], issues: [] }, ctx);
|
|
8276
8331
|
if (r instanceof Promise) {
|
|
8277
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
8332
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
8278
8333
|
} else {
|
|
8279
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
8334
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
8280
8335
|
}
|
|
8281
8336
|
}
|
|
8282
8337
|
if (unrecognized.length) {
|
|
@@ -8342,12 +8397,13 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
8342
8397
|
const shape = value.shape;
|
|
8343
8398
|
for (const key of value.keys) {
|
|
8344
8399
|
const el = shape[key];
|
|
8400
|
+
const isOptionalIn = el._zod.optin === "optional";
|
|
8345
8401
|
const isOptionalOut = el._zod.optout === "optional";
|
|
8346
8402
|
const r = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
8347
8403
|
if (r instanceof Promise) {
|
|
8348
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
8404
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
8349
8405
|
} else {
|
|
8350
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
8406
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
8351
8407
|
}
|
|
8352
8408
|
}
|
|
8353
8409
|
if (!catchall) {
|
|
@@ -8378,9 +8434,10 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
8378
8434
|
const id = ids[key];
|
|
8379
8435
|
const k = esc(key);
|
|
8380
8436
|
const schema = shape[key];
|
|
8437
|
+
const isOptionalIn = schema?._zod?.optin === "optional";
|
|
8381
8438
|
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
8382
8439
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
8383
|
-
if (isOptionalOut) {
|
|
8440
|
+
if (isOptionalIn && isOptionalOut) {
|
|
8384
8441
|
doc.write(`
|
|
8385
8442
|
if (${id}.issues.length) {
|
|
8386
8443
|
if (${k} in input) {
|
|
@@ -8399,6 +8456,33 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
8399
8456
|
newResult[${k}] = ${id}.value;
|
|
8400
8457
|
}
|
|
8401
8458
|
|
|
8459
|
+
`);
|
|
8460
|
+
} else if (!isOptionalIn) {
|
|
8461
|
+
doc.write(`
|
|
8462
|
+
const ${id}_present = ${k} in input;
|
|
8463
|
+
if (${id}.issues.length) {
|
|
8464
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
8465
|
+
...iss,
|
|
8466
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
8467
|
+
})));
|
|
8468
|
+
}
|
|
8469
|
+
if (!${id}_present && !${id}.issues.length) {
|
|
8470
|
+
payload.issues.push({
|
|
8471
|
+
code: "invalid_type",
|
|
8472
|
+
expected: "nonoptional",
|
|
8473
|
+
input: undefined,
|
|
8474
|
+
path: [${k}]
|
|
8475
|
+
});
|
|
8476
|
+
}
|
|
8477
|
+
|
|
8478
|
+
if (${id}_present) {
|
|
8479
|
+
if (${id}.value === undefined) {
|
|
8480
|
+
newResult[${k}] = undefined;
|
|
8481
|
+
} else {
|
|
8482
|
+
newResult[${k}] = ${id}.value;
|
|
8483
|
+
}
|
|
8484
|
+
}
|
|
8485
|
+
|
|
8402
8486
|
`);
|
|
8403
8487
|
} else {
|
|
8404
8488
|
doc.write(`
|
|
@@ -8492,10 +8576,9 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
|
8492
8576
|
}
|
|
8493
8577
|
return void 0;
|
|
8494
8578
|
});
|
|
8495
|
-
const
|
|
8496
|
-
const first = def.options[0]._zod.run;
|
|
8579
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
8497
8580
|
inst._zod.parse = (payload, ctx) => {
|
|
8498
|
-
if (
|
|
8581
|
+
if (first) {
|
|
8499
8582
|
return first(payload, ctx);
|
|
8500
8583
|
}
|
|
8501
8584
|
let async = false;
|
|
@@ -8548,10 +8631,9 @@ function handleExclusiveUnionResults(results, final, inst, ctx) {
|
|
|
8548
8631
|
var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
|
|
8549
8632
|
$ZodUnion.init(inst, def);
|
|
8550
8633
|
def.inclusive = false;
|
|
8551
|
-
const
|
|
8552
|
-
const first = def.options[0]._zod.run;
|
|
8634
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
8553
8635
|
inst._zod.parse = (payload, ctx) => {
|
|
8554
|
-
if (
|
|
8636
|
+
if (first) {
|
|
8555
8637
|
return first(payload, ctx);
|
|
8556
8638
|
}
|
|
8557
8639
|
let async = false;
|
|
@@ -8626,7 +8708,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
8626
8708
|
if (opt) {
|
|
8627
8709
|
return opt._zod.run(payload, ctx);
|
|
8628
8710
|
}
|
|
8629
|
-
if (def.unionFallback) {
|
|
8711
|
+
if (def.unionFallback || ctx.direction === "backward") {
|
|
8630
8712
|
return _super(payload, ctx);
|
|
8631
8713
|
}
|
|
8632
8714
|
payload.issues.push({
|
|
@@ -8634,6 +8716,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
8634
8716
|
errors: [],
|
|
8635
8717
|
note: "No matching discriminator",
|
|
8636
8718
|
discriminator: def.discriminator,
|
|
8719
|
+
options: Array.from(disc.value.keys()),
|
|
8637
8720
|
input,
|
|
8638
8721
|
path: [def.discriminator],
|
|
8639
8722
|
inst
|
|
@@ -8755,64 +8838,96 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
8755
8838
|
}
|
|
8756
8839
|
payload.value = [];
|
|
8757
8840
|
const proms = [];
|
|
8758
|
-
const
|
|
8759
|
-
const
|
|
8841
|
+
const optinStart = getTupleOptStart(items, "optin");
|
|
8842
|
+
const optoutStart = getTupleOptStart(items, "optout");
|
|
8760
8843
|
if (!def.rest) {
|
|
8761
|
-
|
|
8762
|
-
const tooSmall = input.length < optStart - 1;
|
|
8763
|
-
if (tooBig || tooSmall) {
|
|
8844
|
+
if (input.length < optinStart) {
|
|
8764
8845
|
payload.issues.push({
|
|
8765
|
-
|
|
8846
|
+
code: "too_small",
|
|
8847
|
+
minimum: optinStart,
|
|
8848
|
+
inclusive: true,
|
|
8766
8849
|
input,
|
|
8767
8850
|
inst,
|
|
8768
8851
|
origin: "array"
|
|
8769
8852
|
});
|
|
8770
8853
|
return payload;
|
|
8771
8854
|
}
|
|
8772
|
-
|
|
8773
|
-
|
|
8774
|
-
|
|
8775
|
-
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8855
|
+
if (input.length > items.length) {
|
|
8856
|
+
payload.issues.push({
|
|
8857
|
+
code: "too_big",
|
|
8858
|
+
maximum: items.length,
|
|
8859
|
+
inclusive: true,
|
|
8860
|
+
input,
|
|
8861
|
+
inst,
|
|
8862
|
+
origin: "array"
|
|
8863
|
+
});
|
|
8779
8864
|
}
|
|
8780
|
-
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
}, ctx);
|
|
8784
|
-
if (
|
|
8785
|
-
proms.push(
|
|
8865
|
+
}
|
|
8866
|
+
const itemResults = new Array(items.length);
|
|
8867
|
+
for (let i = 0; i < items.length; i++) {
|
|
8868
|
+
const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
|
|
8869
|
+
if (r instanceof Promise) {
|
|
8870
|
+
proms.push(r.then((rr) => {
|
|
8871
|
+
itemResults[i] = rr;
|
|
8872
|
+
}));
|
|
8786
8873
|
} else {
|
|
8787
|
-
|
|
8874
|
+
itemResults[i] = r;
|
|
8788
8875
|
}
|
|
8789
8876
|
}
|
|
8790
8877
|
if (def.rest) {
|
|
8878
|
+
let i = items.length - 1;
|
|
8791
8879
|
const rest = input.slice(items.length);
|
|
8792
8880
|
for (const el of rest) {
|
|
8793
8881
|
i++;
|
|
8794
|
-
const result = def.rest._zod.run({
|
|
8795
|
-
value: el,
|
|
8796
|
-
issues: []
|
|
8797
|
-
}, ctx);
|
|
8882
|
+
const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
|
|
8798
8883
|
if (result instanceof Promise) {
|
|
8799
|
-
proms.push(result.then((
|
|
8884
|
+
proms.push(result.then((r) => handleTupleResult(r, payload, i)));
|
|
8800
8885
|
} else {
|
|
8801
8886
|
handleTupleResult(result, payload, i);
|
|
8802
8887
|
}
|
|
8803
8888
|
}
|
|
8804
8889
|
}
|
|
8805
|
-
if (proms.length)
|
|
8806
|
-
return Promise.all(proms).then(() => payload);
|
|
8807
|
-
|
|
8890
|
+
if (proms.length) {
|
|
8891
|
+
return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
|
|
8892
|
+
}
|
|
8893
|
+
return handleTupleResults(itemResults, payload, items, input, optoutStart);
|
|
8808
8894
|
};
|
|
8809
8895
|
});
|
|
8896
|
+
function getTupleOptStart(items, key) {
|
|
8897
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
8898
|
+
if (items[i]._zod[key] !== "optional")
|
|
8899
|
+
return i + 1;
|
|
8900
|
+
}
|
|
8901
|
+
return 0;
|
|
8902
|
+
}
|
|
8810
8903
|
function handleTupleResult(result, final, index) {
|
|
8811
8904
|
if (result.issues.length) {
|
|
8812
8905
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
8813
8906
|
}
|
|
8814
8907
|
final.value[index] = result.value;
|
|
8815
8908
|
}
|
|
8909
|
+
function handleTupleResults(itemResults, final, items, input, optoutStart) {
|
|
8910
|
+
for (let i = 0; i < items.length; i++) {
|
|
8911
|
+
const r = itemResults[i];
|
|
8912
|
+
const isPresent = i < input.length;
|
|
8913
|
+
if (r.issues.length) {
|
|
8914
|
+
if (!isPresent && i >= optoutStart) {
|
|
8915
|
+
final.value.length = i;
|
|
8916
|
+
break;
|
|
8917
|
+
}
|
|
8918
|
+
final.issues.push(...prefixIssues(i, r.issues));
|
|
8919
|
+
}
|
|
8920
|
+
final.value[i] = r.value;
|
|
8921
|
+
}
|
|
8922
|
+
for (let i = final.value.length - 1; i >= input.length; i--) {
|
|
8923
|
+
if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
|
|
8924
|
+
final.value.length = i;
|
|
8925
|
+
} else {
|
|
8926
|
+
break;
|
|
8927
|
+
}
|
|
8928
|
+
}
|
|
8929
|
+
return final;
|
|
8930
|
+
}
|
|
8816
8931
|
var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
8817
8932
|
$ZodType.init(inst, def);
|
|
8818
8933
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -8834,19 +8949,35 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
8834
8949
|
for (const key of values) {
|
|
8835
8950
|
if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
8836
8951
|
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
8952
|
+
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
8953
|
+
if (keyResult instanceof Promise) {
|
|
8954
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
8955
|
+
}
|
|
8956
|
+
if (keyResult.issues.length) {
|
|
8957
|
+
payload.issues.push({
|
|
8958
|
+
code: "invalid_key",
|
|
8959
|
+
origin: "record",
|
|
8960
|
+
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
8961
|
+
input: key,
|
|
8962
|
+
path: [key],
|
|
8963
|
+
inst
|
|
8964
|
+
});
|
|
8965
|
+
continue;
|
|
8966
|
+
}
|
|
8967
|
+
const outKey = keyResult.value;
|
|
8837
8968
|
const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
|
|
8838
8969
|
if (result instanceof Promise) {
|
|
8839
8970
|
proms.push(result.then((result2) => {
|
|
8840
8971
|
if (result2.issues.length) {
|
|
8841
8972
|
payload.issues.push(...prefixIssues(key, result2.issues));
|
|
8842
8973
|
}
|
|
8843
|
-
payload.value[
|
|
8974
|
+
payload.value[outKey] = result2.value;
|
|
8844
8975
|
}));
|
|
8845
8976
|
} else {
|
|
8846
8977
|
if (result.issues.length) {
|
|
8847
8978
|
payload.issues.push(...prefixIssues(key, result.issues));
|
|
8848
8979
|
}
|
|
8849
|
-
payload.value[
|
|
8980
|
+
payload.value[outKey] = result.value;
|
|
8850
8981
|
}
|
|
8851
8982
|
}
|
|
8852
8983
|
}
|
|
@@ -8870,6 +9001,8 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
8870
9001
|
for (const key of Reflect.ownKeys(input)) {
|
|
8871
9002
|
if (key === "__proto__")
|
|
8872
9003
|
continue;
|
|
9004
|
+
if (!Object.prototype.propertyIsEnumerable.call(input, key))
|
|
9005
|
+
continue;
|
|
8873
9006
|
let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
8874
9007
|
if (keyResult instanceof Promise) {
|
|
8875
9008
|
throw new Error("Async schemas not supported in object keys currently");
|
|
@@ -9513,7 +9646,12 @@ var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => {
|
|
|
9513
9646
|
});
|
|
9514
9647
|
var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
9515
9648
|
$ZodType.init(inst, def);
|
|
9516
|
-
defineLazy(inst._zod, "innerType", () =>
|
|
9649
|
+
defineLazy(inst._zod, "innerType", () => {
|
|
9650
|
+
const d = def;
|
|
9651
|
+
if (!d._cachedInner)
|
|
9652
|
+
d._cachedInner = def.getter();
|
|
9653
|
+
return d._cachedInner;
|
|
9654
|
+
});
|
|
9517
9655
|
defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
|
|
9518
9656
|
defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
|
|
9519
9657
|
defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
|
|
@@ -9568,6 +9706,7 @@ __export(locales_exports, {
|
|
|
9568
9706
|
cs: () => cs_default,
|
|
9569
9707
|
da: () => da_default,
|
|
9570
9708
|
de: () => de_default,
|
|
9709
|
+
el: () => el_default,
|
|
9571
9710
|
en: () => en_default,
|
|
9572
9711
|
eo: () => eo_default,
|
|
9573
9712
|
es: () => es_default,
|
|
@@ -9576,6 +9715,7 @@ __export(locales_exports, {
|
|
|
9576
9715
|
fr: () => fr_default,
|
|
9577
9716
|
frCA: () => fr_CA_default,
|
|
9578
9717
|
he: () => he_default,
|
|
9718
|
+
hr: () => hr_default,
|
|
9579
9719
|
hu: () => hu_default,
|
|
9580
9720
|
hy: () => hy_default,
|
|
9581
9721
|
id: () => id_default,
|
|
@@ -9595,6 +9735,7 @@ __export(locales_exports, {
|
|
|
9595
9735
|
pl: () => pl_default,
|
|
9596
9736
|
ps: () => ps_default,
|
|
9597
9737
|
pt: () => pt_default,
|
|
9738
|
+
ro: () => ro_default,
|
|
9598
9739
|
ru: () => ru_default,
|
|
9599
9740
|
sl: () => sl_default,
|
|
9600
9741
|
sv: () => sv_default,
|
|
@@ -10548,8 +10689,118 @@ function de_default() {
|
|
|
10548
10689
|
};
|
|
10549
10690
|
}
|
|
10550
10691
|
|
|
10551
|
-
// node_modules/zod/v4/locales/
|
|
10692
|
+
// node_modules/zod/v4/locales/el.js
|
|
10552
10693
|
var error9 = () => {
|
|
10694
|
+
const Sizable = {
|
|
10695
|
+
string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
10696
|
+
file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
10697
|
+
array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
10698
|
+
set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
10699
|
+
map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
|
|
10700
|
+
};
|
|
10701
|
+
function getSizing(origin) {
|
|
10702
|
+
return Sizable[origin] ?? null;
|
|
10703
|
+
}
|
|
10704
|
+
const FormatDictionary = {
|
|
10705
|
+
regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
|
|
10706
|
+
email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
|
|
10707
|
+
url: "URL",
|
|
10708
|
+
emoji: "emoji",
|
|
10709
|
+
uuid: "UUID",
|
|
10710
|
+
uuidv4: "UUIDv4",
|
|
10711
|
+
uuidv6: "UUIDv6",
|
|
10712
|
+
nanoid: "nanoid",
|
|
10713
|
+
guid: "GUID",
|
|
10714
|
+
cuid: "cuid",
|
|
10715
|
+
cuid2: "cuid2",
|
|
10716
|
+
ulid: "ULID",
|
|
10717
|
+
xid: "XID",
|
|
10718
|
+
ksuid: "KSUID",
|
|
10719
|
+
datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
|
|
10720
|
+
date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
|
|
10721
|
+
time: "ISO \u03CE\u03C1\u03B1",
|
|
10722
|
+
duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
|
|
10723
|
+
ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
|
|
10724
|
+
ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
|
|
10725
|
+
mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
|
|
10726
|
+
cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
|
|
10727
|
+
cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
|
|
10728
|
+
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",
|
|
10729
|
+
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",
|
|
10730
|
+
json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
|
|
10731
|
+
e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
|
|
10732
|
+
jwt: "JWT",
|
|
10733
|
+
template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
|
|
10734
|
+
};
|
|
10735
|
+
const TypeDictionary = {
|
|
10736
|
+
nan: "NaN"
|
|
10737
|
+
};
|
|
10738
|
+
return (issue2) => {
|
|
10739
|
+
switch (issue2.code) {
|
|
10740
|
+
case "invalid_type": {
|
|
10741
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
10742
|
+
const receivedType = parsedType(issue2.input);
|
|
10743
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
10744
|
+
if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
|
|
10745
|
+
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}`;
|
|
10746
|
+
}
|
|
10747
|
+
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}`;
|
|
10748
|
+
}
|
|
10749
|
+
case "invalid_value":
|
|
10750
|
+
if (issue2.values.length === 1)
|
|
10751
|
+
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])}`;
|
|
10752
|
+
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, "|")}`;
|
|
10753
|
+
case "too_big": {
|
|
10754
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
10755
|
+
const sizing = getSizing(issue2.origin);
|
|
10756
|
+
if (sizing)
|
|
10757
|
+
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"}`;
|
|
10758
|
+
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()}`;
|
|
10759
|
+
}
|
|
10760
|
+
case "too_small": {
|
|
10761
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
10762
|
+
const sizing = getSizing(issue2.origin);
|
|
10763
|
+
if (sizing) {
|
|
10764
|
+
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}`;
|
|
10765
|
+
}
|
|
10766
|
+
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()}`;
|
|
10767
|
+
}
|
|
10768
|
+
case "invalid_format": {
|
|
10769
|
+
const _issue = issue2;
|
|
10770
|
+
if (_issue.format === "starts_with") {
|
|
10771
|
+
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}"`;
|
|
10772
|
+
}
|
|
10773
|
+
if (_issue.format === "ends_with")
|
|
10774
|
+
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}"`;
|
|
10775
|
+
if (_issue.format === "includes")
|
|
10776
|
+
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}"`;
|
|
10777
|
+
if (_issue.format === "regex")
|
|
10778
|
+
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}`;
|
|
10779
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
10780
|
+
}
|
|
10781
|
+
case "not_multiple_of":
|
|
10782
|
+
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}`;
|
|
10783
|
+
case "unrecognized_keys":
|
|
10784
|
+
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, ", ")}`;
|
|
10785
|
+
case "invalid_key":
|
|
10786
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
10787
|
+
case "invalid_union":
|
|
10788
|
+
return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
|
|
10789
|
+
case "invalid_element":
|
|
10790
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
10791
|
+
default:
|
|
10792
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
|
|
10793
|
+
}
|
|
10794
|
+
};
|
|
10795
|
+
};
|
|
10796
|
+
function el_default() {
|
|
10797
|
+
return {
|
|
10798
|
+
localeError: error9()
|
|
10799
|
+
};
|
|
10800
|
+
}
|
|
10801
|
+
|
|
10802
|
+
// node_modules/zod/v4/locales/en.js
|
|
10803
|
+
var error10 = () => {
|
|
10553
10804
|
const Sizable = {
|
|
10554
10805
|
string: { unit: "characters", verb: "to have" },
|
|
10555
10806
|
file: { unit: "bytes", verb: "to have" },
|
|
@@ -10643,6 +10894,10 @@ var error9 = () => {
|
|
|
10643
10894
|
case "invalid_key":
|
|
10644
10895
|
return `Invalid key in ${issue2.origin}`;
|
|
10645
10896
|
case "invalid_union":
|
|
10897
|
+
if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
|
|
10898
|
+
const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
|
|
10899
|
+
return `Invalid discriminator value. Expected ${opts}`;
|
|
10900
|
+
}
|
|
10646
10901
|
return "Invalid input";
|
|
10647
10902
|
case "invalid_element":
|
|
10648
10903
|
return `Invalid value in ${issue2.origin}`;
|
|
@@ -10653,12 +10908,12 @@ var error9 = () => {
|
|
|
10653
10908
|
};
|
|
10654
10909
|
function en_default() {
|
|
10655
10910
|
return {
|
|
10656
|
-
localeError:
|
|
10911
|
+
localeError: error10()
|
|
10657
10912
|
};
|
|
10658
10913
|
}
|
|
10659
10914
|
|
|
10660
10915
|
// node_modules/zod/v4/locales/eo.js
|
|
10661
|
-
var
|
|
10916
|
+
var error11 = () => {
|
|
10662
10917
|
const Sizable = {
|
|
10663
10918
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
10664
10919
|
file: { unit: "bajtojn", verb: "havi" },
|
|
@@ -10763,12 +11018,12 @@ var error10 = () => {
|
|
|
10763
11018
|
};
|
|
10764
11019
|
function eo_default() {
|
|
10765
11020
|
return {
|
|
10766
|
-
localeError:
|
|
11021
|
+
localeError: error11()
|
|
10767
11022
|
};
|
|
10768
11023
|
}
|
|
10769
11024
|
|
|
10770
11025
|
// node_modules/zod/v4/locales/es.js
|
|
10771
|
-
var
|
|
11026
|
+
var error12 = () => {
|
|
10772
11027
|
const Sizable = {
|
|
10773
11028
|
string: { unit: "caracteres", verb: "tener" },
|
|
10774
11029
|
file: { unit: "bytes", verb: "tener" },
|
|
@@ -10896,12 +11151,12 @@ var error11 = () => {
|
|
|
10896
11151
|
};
|
|
10897
11152
|
function es_default() {
|
|
10898
11153
|
return {
|
|
10899
|
-
localeError:
|
|
11154
|
+
localeError: error12()
|
|
10900
11155
|
};
|
|
10901
11156
|
}
|
|
10902
11157
|
|
|
10903
11158
|
// node_modules/zod/v4/locales/fa.js
|
|
10904
|
-
var
|
|
11159
|
+
var error13 = () => {
|
|
10905
11160
|
const Sizable = {
|
|
10906
11161
|
string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
10907
11162
|
file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
@@ -11011,12 +11266,12 @@ var error12 = () => {
|
|
|
11011
11266
|
};
|
|
11012
11267
|
function fa_default() {
|
|
11013
11268
|
return {
|
|
11014
|
-
localeError:
|
|
11269
|
+
localeError: error13()
|
|
11015
11270
|
};
|
|
11016
11271
|
}
|
|
11017
11272
|
|
|
11018
11273
|
// node_modules/zod/v4/locales/fi.js
|
|
11019
|
-
var
|
|
11274
|
+
var error14 = () => {
|
|
11020
11275
|
const Sizable = {
|
|
11021
11276
|
string: { unit: "merkki\xE4", subject: "merkkijonon" },
|
|
11022
11277
|
file: { unit: "tavua", subject: "tiedoston" },
|
|
@@ -11124,12 +11379,12 @@ var error13 = () => {
|
|
|
11124
11379
|
};
|
|
11125
11380
|
function fi_default() {
|
|
11126
11381
|
return {
|
|
11127
|
-
localeError:
|
|
11382
|
+
localeError: error14()
|
|
11128
11383
|
};
|
|
11129
11384
|
}
|
|
11130
11385
|
|
|
11131
11386
|
// node_modules/zod/v4/locales/fr.js
|
|
11132
|
-
var
|
|
11387
|
+
var error15 = () => {
|
|
11133
11388
|
const Sizable = {
|
|
11134
11389
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
11135
11390
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -11170,9 +11425,27 @@ var error14 = () => {
|
|
|
11170
11425
|
template_literal: "entr\xE9e"
|
|
11171
11426
|
};
|
|
11172
11427
|
const TypeDictionary = {
|
|
11173
|
-
|
|
11428
|
+
string: "cha\xEEne",
|
|
11174
11429
|
number: "nombre",
|
|
11175
|
-
|
|
11430
|
+
int: "entier",
|
|
11431
|
+
boolean: "bool\xE9en",
|
|
11432
|
+
bigint: "grand entier",
|
|
11433
|
+
symbol: "symbole",
|
|
11434
|
+
undefined: "ind\xE9fini",
|
|
11435
|
+
null: "null",
|
|
11436
|
+
never: "jamais",
|
|
11437
|
+
void: "vide",
|
|
11438
|
+
date: "date",
|
|
11439
|
+
array: "tableau",
|
|
11440
|
+
object: "objet",
|
|
11441
|
+
tuple: "tuple",
|
|
11442
|
+
record: "enregistrement",
|
|
11443
|
+
map: "carte",
|
|
11444
|
+
set: "ensemble",
|
|
11445
|
+
file: "fichier",
|
|
11446
|
+
nonoptional: "non-optionnel",
|
|
11447
|
+
nan: "NaN",
|
|
11448
|
+
function: "fonction"
|
|
11176
11449
|
};
|
|
11177
11450
|
return (issue2) => {
|
|
11178
11451
|
switch (issue2.code) {
|
|
@@ -11193,16 +11466,15 @@ var error14 = () => {
|
|
|
11193
11466
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
11194
11467
|
const sizing = getSizing(issue2.origin);
|
|
11195
11468
|
if (sizing)
|
|
11196
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
11197
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
11469
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
11470
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
11198
11471
|
}
|
|
11199
11472
|
case "too_small": {
|
|
11200
11473
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
11201
11474
|
const sizing = getSizing(issue2.origin);
|
|
11202
|
-
if (sizing)
|
|
11203
|
-
return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
11204
|
-
}
|
|
11205
|
-
return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
11475
|
+
if (sizing)
|
|
11476
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
11477
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
11206
11478
|
}
|
|
11207
11479
|
case "invalid_format": {
|
|
11208
11480
|
const _issue = issue2;
|
|
@@ -11233,12 +11505,12 @@ var error14 = () => {
|
|
|
11233
11505
|
};
|
|
11234
11506
|
function fr_default() {
|
|
11235
11507
|
return {
|
|
11236
|
-
localeError:
|
|
11508
|
+
localeError: error15()
|
|
11237
11509
|
};
|
|
11238
11510
|
}
|
|
11239
11511
|
|
|
11240
11512
|
// node_modules/zod/v4/locales/fr-CA.js
|
|
11241
|
-
var
|
|
11513
|
+
var error16 = () => {
|
|
11242
11514
|
const Sizable = {
|
|
11243
11515
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
11244
11516
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -11341,12 +11613,12 @@ var error15 = () => {
|
|
|
11341
11613
|
};
|
|
11342
11614
|
function fr_CA_default() {
|
|
11343
11615
|
return {
|
|
11344
|
-
localeError:
|
|
11616
|
+
localeError: error16()
|
|
11345
11617
|
};
|
|
11346
11618
|
}
|
|
11347
11619
|
|
|
11348
11620
|
// node_modules/zod/v4/locales/he.js
|
|
11349
|
-
var
|
|
11621
|
+
var error17 = () => {
|
|
11350
11622
|
const TypeNames = {
|
|
11351
11623
|
string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
|
|
11352
11624
|
number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
|
|
@@ -11536,12 +11808,135 @@ var error16 = () => {
|
|
|
11536
11808
|
};
|
|
11537
11809
|
function he_default() {
|
|
11538
11810
|
return {
|
|
11539
|
-
localeError:
|
|
11811
|
+
localeError: error17()
|
|
11812
|
+
};
|
|
11813
|
+
}
|
|
11814
|
+
|
|
11815
|
+
// node_modules/zod/v4/locales/hr.js
|
|
11816
|
+
var error18 = () => {
|
|
11817
|
+
const Sizable = {
|
|
11818
|
+
string: { unit: "znakova", verb: "imati" },
|
|
11819
|
+
file: { unit: "bajtova", verb: "imati" },
|
|
11820
|
+
array: { unit: "stavki", verb: "imati" },
|
|
11821
|
+
set: { unit: "stavki", verb: "imati" }
|
|
11822
|
+
};
|
|
11823
|
+
function getSizing(origin) {
|
|
11824
|
+
return Sizable[origin] ?? null;
|
|
11825
|
+
}
|
|
11826
|
+
const FormatDictionary = {
|
|
11827
|
+
regex: "unos",
|
|
11828
|
+
email: "email adresa",
|
|
11829
|
+
url: "URL",
|
|
11830
|
+
emoji: "emoji",
|
|
11831
|
+
uuid: "UUID",
|
|
11832
|
+
uuidv4: "UUIDv4",
|
|
11833
|
+
uuidv6: "UUIDv6",
|
|
11834
|
+
nanoid: "nanoid",
|
|
11835
|
+
guid: "GUID",
|
|
11836
|
+
cuid: "cuid",
|
|
11837
|
+
cuid2: "cuid2",
|
|
11838
|
+
ulid: "ULID",
|
|
11839
|
+
xid: "XID",
|
|
11840
|
+
ksuid: "KSUID",
|
|
11841
|
+
datetime: "ISO datum i vrijeme",
|
|
11842
|
+
date: "ISO datum",
|
|
11843
|
+
time: "ISO vrijeme",
|
|
11844
|
+
duration: "ISO trajanje",
|
|
11845
|
+
ipv4: "IPv4 adresa",
|
|
11846
|
+
ipv6: "IPv6 adresa",
|
|
11847
|
+
cidrv4: "IPv4 raspon",
|
|
11848
|
+
cidrv6: "IPv6 raspon",
|
|
11849
|
+
base64: "base64 kodirani tekst",
|
|
11850
|
+
base64url: "base64url kodirani tekst",
|
|
11851
|
+
json_string: "JSON tekst",
|
|
11852
|
+
e164: "E.164 broj",
|
|
11853
|
+
jwt: "JWT",
|
|
11854
|
+
template_literal: "unos"
|
|
11855
|
+
};
|
|
11856
|
+
const TypeDictionary = {
|
|
11857
|
+
nan: "NaN",
|
|
11858
|
+
string: "tekst",
|
|
11859
|
+
number: "broj",
|
|
11860
|
+
boolean: "boolean",
|
|
11861
|
+
array: "niz",
|
|
11862
|
+
object: "objekt",
|
|
11863
|
+
set: "skup",
|
|
11864
|
+
file: "datoteka",
|
|
11865
|
+
date: "datum",
|
|
11866
|
+
bigint: "bigint",
|
|
11867
|
+
symbol: "simbol",
|
|
11868
|
+
undefined: "undefined",
|
|
11869
|
+
null: "null",
|
|
11870
|
+
function: "funkcija",
|
|
11871
|
+
map: "mapa"
|
|
11872
|
+
};
|
|
11873
|
+
return (issue2) => {
|
|
11874
|
+
switch (issue2.code) {
|
|
11875
|
+
case "invalid_type": {
|
|
11876
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
11877
|
+
const receivedType = parsedType(issue2.input);
|
|
11878
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
11879
|
+
if (/^[A-Z]/.test(issue2.expected)) {
|
|
11880
|
+
return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
|
|
11881
|
+
}
|
|
11882
|
+
return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
|
|
11883
|
+
}
|
|
11884
|
+
case "invalid_value":
|
|
11885
|
+
if (issue2.values.length === 1)
|
|
11886
|
+
return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
|
|
11887
|
+
return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
|
|
11888
|
+
case "too_big": {
|
|
11889
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
11890
|
+
const sizing = getSizing(issue2.origin);
|
|
11891
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
11892
|
+
if (sizing)
|
|
11893
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
|
|
11894
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
|
|
11895
|
+
}
|
|
11896
|
+
case "too_small": {
|
|
11897
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
11898
|
+
const sizing = getSizing(issue2.origin);
|
|
11899
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
11900
|
+
if (sizing) {
|
|
11901
|
+
return `Premalo: o\u010Dekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
11902
|
+
}
|
|
11903
|
+
return `Premalo: o\u010Dekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
|
|
11904
|
+
}
|
|
11905
|
+
case "invalid_format": {
|
|
11906
|
+
const _issue = issue2;
|
|
11907
|
+
if (_issue.format === "starts_with")
|
|
11908
|
+
return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
|
|
11909
|
+
if (_issue.format === "ends_with")
|
|
11910
|
+
return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
|
|
11911
|
+
if (_issue.format === "includes")
|
|
11912
|
+
return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
|
|
11913
|
+
if (_issue.format === "regex")
|
|
11914
|
+
return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
|
|
11915
|
+
return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
11916
|
+
}
|
|
11917
|
+
case "not_multiple_of":
|
|
11918
|
+
return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
|
|
11919
|
+
case "unrecognized_keys":
|
|
11920
|
+
return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
|
|
11921
|
+
case "invalid_key":
|
|
11922
|
+
return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
11923
|
+
case "invalid_union":
|
|
11924
|
+
return "Neispravan unos";
|
|
11925
|
+
case "invalid_element":
|
|
11926
|
+
return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
11927
|
+
default:
|
|
11928
|
+
return `Neispravan unos`;
|
|
11929
|
+
}
|
|
11930
|
+
};
|
|
11931
|
+
};
|
|
11932
|
+
function hr_default() {
|
|
11933
|
+
return {
|
|
11934
|
+
localeError: error18()
|
|
11540
11935
|
};
|
|
11541
11936
|
}
|
|
11542
11937
|
|
|
11543
11938
|
// node_modules/zod/v4/locales/hu.js
|
|
11544
|
-
var
|
|
11939
|
+
var error19 = () => {
|
|
11545
11940
|
const Sizable = {
|
|
11546
11941
|
string: { unit: "karakter", verb: "legyen" },
|
|
11547
11942
|
file: { unit: "byte", verb: "legyen" },
|
|
@@ -11645,7 +12040,7 @@ var error17 = () => {
|
|
|
11645
12040
|
};
|
|
11646
12041
|
function hu_default() {
|
|
11647
12042
|
return {
|
|
11648
|
-
localeError:
|
|
12043
|
+
localeError: error19()
|
|
11649
12044
|
};
|
|
11650
12045
|
}
|
|
11651
12046
|
|
|
@@ -11660,7 +12055,7 @@ function withDefiniteArticle(word) {
|
|
|
11660
12055
|
const lastChar = word[word.length - 1];
|
|
11661
12056
|
return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568");
|
|
11662
12057
|
}
|
|
11663
|
-
var
|
|
12058
|
+
var error20 = () => {
|
|
11664
12059
|
const Sizable = {
|
|
11665
12060
|
string: {
|
|
11666
12061
|
unit: {
|
|
@@ -11793,12 +12188,12 @@ var error18 = () => {
|
|
|
11793
12188
|
};
|
|
11794
12189
|
function hy_default() {
|
|
11795
12190
|
return {
|
|
11796
|
-
localeError:
|
|
12191
|
+
localeError: error20()
|
|
11797
12192
|
};
|
|
11798
12193
|
}
|
|
11799
12194
|
|
|
11800
12195
|
// node_modules/zod/v4/locales/id.js
|
|
11801
|
-
var
|
|
12196
|
+
var error21 = () => {
|
|
11802
12197
|
const Sizable = {
|
|
11803
12198
|
string: { unit: "karakter", verb: "memiliki" },
|
|
11804
12199
|
file: { unit: "byte", verb: "memiliki" },
|
|
@@ -11900,12 +12295,12 @@ var error19 = () => {
|
|
|
11900
12295
|
};
|
|
11901
12296
|
function id_default() {
|
|
11902
12297
|
return {
|
|
11903
|
-
localeError:
|
|
12298
|
+
localeError: error21()
|
|
11904
12299
|
};
|
|
11905
12300
|
}
|
|
11906
12301
|
|
|
11907
12302
|
// node_modules/zod/v4/locales/is.js
|
|
11908
|
-
var
|
|
12303
|
+
var error22 = () => {
|
|
11909
12304
|
const Sizable = {
|
|
11910
12305
|
string: { unit: "stafi", verb: "a\xF0 hafa" },
|
|
11911
12306
|
file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
|
|
@@ -12010,12 +12405,12 @@ var error20 = () => {
|
|
|
12010
12405
|
};
|
|
12011
12406
|
function is_default() {
|
|
12012
12407
|
return {
|
|
12013
|
-
localeError:
|
|
12408
|
+
localeError: error22()
|
|
12014
12409
|
};
|
|
12015
12410
|
}
|
|
12016
12411
|
|
|
12017
12412
|
// node_modules/zod/v4/locales/it.js
|
|
12018
|
-
var
|
|
12413
|
+
var error23 = () => {
|
|
12019
12414
|
const Sizable = {
|
|
12020
12415
|
string: { unit: "caratteri", verb: "avere" },
|
|
12021
12416
|
file: { unit: "byte", verb: "avere" },
|
|
@@ -12100,7 +12495,7 @@ var error21 = () => {
|
|
|
12100
12495
|
return `Stringa non valida: deve includere "${_issue.includes}"`;
|
|
12101
12496
|
if (_issue.format === "regex")
|
|
12102
12497
|
return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
|
|
12103
|
-
return `
|
|
12498
|
+
return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
12104
12499
|
}
|
|
12105
12500
|
case "not_multiple_of":
|
|
12106
12501
|
return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
|
|
@@ -12119,12 +12514,12 @@ var error21 = () => {
|
|
|
12119
12514
|
};
|
|
12120
12515
|
function it_default() {
|
|
12121
12516
|
return {
|
|
12122
|
-
localeError:
|
|
12517
|
+
localeError: error23()
|
|
12123
12518
|
};
|
|
12124
12519
|
}
|
|
12125
12520
|
|
|
12126
12521
|
// node_modules/zod/v4/locales/ja.js
|
|
12127
|
-
var
|
|
12522
|
+
var error24 = () => {
|
|
12128
12523
|
const Sizable = {
|
|
12129
12524
|
string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
|
|
12130
12525
|
file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
|
|
@@ -12227,12 +12622,12 @@ var error22 = () => {
|
|
|
12227
12622
|
};
|
|
12228
12623
|
function ja_default() {
|
|
12229
12624
|
return {
|
|
12230
|
-
localeError:
|
|
12625
|
+
localeError: error24()
|
|
12231
12626
|
};
|
|
12232
12627
|
}
|
|
12233
12628
|
|
|
12234
12629
|
// node_modules/zod/v4/locales/ka.js
|
|
12235
|
-
var
|
|
12630
|
+
var error25 = () => {
|
|
12236
12631
|
const Sizable = {
|
|
12237
12632
|
string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
12238
12633
|
file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
@@ -12265,9 +12660,9 @@ var error23 = () => {
|
|
|
12265
12660
|
ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
|
|
12266
12661
|
cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
12267
12662
|
cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
12268
|
-
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
12269
|
-
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
12270
|
-
json_string: "JSON \
|
|
12663
|
+
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
12664
|
+
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
12665
|
+
json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
|
|
12271
12666
|
e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
|
|
12272
12667
|
jwt: "JWT",
|
|
12273
12668
|
template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
|
|
@@ -12275,7 +12670,7 @@ var error23 = () => {
|
|
|
12275
12670
|
const TypeDictionary = {
|
|
12276
12671
|
nan: "NaN",
|
|
12277
12672
|
number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
|
|
12278
|
-
string: "\
|
|
12673
|
+
string: "\u10D5\u10D4\u10DA\u10D8",
|
|
12279
12674
|
boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
|
|
12280
12675
|
function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
|
|
12281
12676
|
array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
|
|
@@ -12313,14 +12708,14 @@ var error23 = () => {
|
|
|
12313
12708
|
case "invalid_format": {
|
|
12314
12709
|
const _issue = issue2;
|
|
12315
12710
|
if (_issue.format === "starts_with") {
|
|
12316
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
12711
|
+
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`;
|
|
12317
12712
|
}
|
|
12318
12713
|
if (_issue.format === "ends_with")
|
|
12319
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
12714
|
+
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`;
|
|
12320
12715
|
if (_issue.format === "includes")
|
|
12321
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
12716
|
+
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`;
|
|
12322
12717
|
if (_issue.format === "regex")
|
|
12323
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
12718
|
+
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}`;
|
|
12324
12719
|
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
12325
12720
|
}
|
|
12326
12721
|
case "not_multiple_of":
|
|
@@ -12340,12 +12735,12 @@ var error23 = () => {
|
|
|
12340
12735
|
};
|
|
12341
12736
|
function ka_default() {
|
|
12342
12737
|
return {
|
|
12343
|
-
localeError:
|
|
12738
|
+
localeError: error25()
|
|
12344
12739
|
};
|
|
12345
12740
|
}
|
|
12346
12741
|
|
|
12347
12742
|
// node_modules/zod/v4/locales/km.js
|
|
12348
|
-
var
|
|
12743
|
+
var error26 = () => {
|
|
12349
12744
|
const Sizable = {
|
|
12350
12745
|
string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
12351
12746
|
file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
@@ -12451,7 +12846,7 @@ var error24 = () => {
|
|
|
12451
12846
|
};
|
|
12452
12847
|
function km_default() {
|
|
12453
12848
|
return {
|
|
12454
|
-
localeError:
|
|
12849
|
+
localeError: error26()
|
|
12455
12850
|
};
|
|
12456
12851
|
}
|
|
12457
12852
|
|
|
@@ -12461,7 +12856,7 @@ function kh_default() {
|
|
|
12461
12856
|
}
|
|
12462
12857
|
|
|
12463
12858
|
// node_modules/zod/v4/locales/ko.js
|
|
12464
|
-
var
|
|
12859
|
+
var error27 = () => {
|
|
12465
12860
|
const Sizable = {
|
|
12466
12861
|
string: { unit: "\uBB38\uC790", verb: "to have" },
|
|
12467
12862
|
file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
|
|
@@ -12568,7 +12963,7 @@ var error25 = () => {
|
|
|
12568
12963
|
};
|
|
12569
12964
|
function ko_default() {
|
|
12570
12965
|
return {
|
|
12571
|
-
localeError:
|
|
12966
|
+
localeError: error27()
|
|
12572
12967
|
};
|
|
12573
12968
|
}
|
|
12574
12969
|
|
|
@@ -12586,7 +12981,7 @@ function getUnitTypeFromNumber(number5) {
|
|
|
12586
12981
|
return "one";
|
|
12587
12982
|
return "few";
|
|
12588
12983
|
}
|
|
12589
|
-
var
|
|
12984
|
+
var error28 = () => {
|
|
12590
12985
|
const Sizable = {
|
|
12591
12986
|
string: {
|
|
12592
12987
|
unit: {
|
|
@@ -12772,12 +13167,12 @@ var error26 = () => {
|
|
|
12772
13167
|
};
|
|
12773
13168
|
function lt_default() {
|
|
12774
13169
|
return {
|
|
12775
|
-
localeError:
|
|
13170
|
+
localeError: error28()
|
|
12776
13171
|
};
|
|
12777
13172
|
}
|
|
12778
13173
|
|
|
12779
13174
|
// node_modules/zod/v4/locales/mk.js
|
|
12780
|
-
var
|
|
13175
|
+
var error29 = () => {
|
|
12781
13176
|
const Sizable = {
|
|
12782
13177
|
string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
12783
13178
|
file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
@@ -12882,12 +13277,12 @@ var error27 = () => {
|
|
|
12882
13277
|
};
|
|
12883
13278
|
function mk_default() {
|
|
12884
13279
|
return {
|
|
12885
|
-
localeError:
|
|
13280
|
+
localeError: error29()
|
|
12886
13281
|
};
|
|
12887
13282
|
}
|
|
12888
13283
|
|
|
12889
13284
|
// node_modules/zod/v4/locales/ms.js
|
|
12890
|
-
var
|
|
13285
|
+
var error30 = () => {
|
|
12891
13286
|
const Sizable = {
|
|
12892
13287
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
12893
13288
|
file: { unit: "bait", verb: "mempunyai" },
|
|
@@ -12990,12 +13385,12 @@ var error28 = () => {
|
|
|
12990
13385
|
};
|
|
12991
13386
|
function ms_default() {
|
|
12992
13387
|
return {
|
|
12993
|
-
localeError:
|
|
13388
|
+
localeError: error30()
|
|
12994
13389
|
};
|
|
12995
13390
|
}
|
|
12996
13391
|
|
|
12997
13392
|
// node_modules/zod/v4/locales/nl.js
|
|
12998
|
-
var
|
|
13393
|
+
var error31 = () => {
|
|
12999
13394
|
const Sizable = {
|
|
13000
13395
|
string: { unit: "tekens", verb: "heeft" },
|
|
13001
13396
|
file: { unit: "bytes", verb: "heeft" },
|
|
@@ -13101,12 +13496,12 @@ var error29 = () => {
|
|
|
13101
13496
|
};
|
|
13102
13497
|
function nl_default() {
|
|
13103
13498
|
return {
|
|
13104
|
-
localeError:
|
|
13499
|
+
localeError: error31()
|
|
13105
13500
|
};
|
|
13106
13501
|
}
|
|
13107
13502
|
|
|
13108
13503
|
// node_modules/zod/v4/locales/no.js
|
|
13109
|
-
var
|
|
13504
|
+
var error32 = () => {
|
|
13110
13505
|
const Sizable = {
|
|
13111
13506
|
string: { unit: "tegn", verb: "\xE5 ha" },
|
|
13112
13507
|
file: { unit: "bytes", verb: "\xE5 ha" },
|
|
@@ -13210,12 +13605,12 @@ var error30 = () => {
|
|
|
13210
13605
|
};
|
|
13211
13606
|
function no_default() {
|
|
13212
13607
|
return {
|
|
13213
|
-
localeError:
|
|
13608
|
+
localeError: error32()
|
|
13214
13609
|
};
|
|
13215
13610
|
}
|
|
13216
13611
|
|
|
13217
13612
|
// node_modules/zod/v4/locales/ota.js
|
|
13218
|
-
var
|
|
13613
|
+
var error33 = () => {
|
|
13219
13614
|
const Sizable = {
|
|
13220
13615
|
string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
|
|
13221
13616
|
file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
|
|
@@ -13320,12 +13715,12 @@ var error31 = () => {
|
|
|
13320
13715
|
};
|
|
13321
13716
|
function ota_default() {
|
|
13322
13717
|
return {
|
|
13323
|
-
localeError:
|
|
13718
|
+
localeError: error33()
|
|
13324
13719
|
};
|
|
13325
13720
|
}
|
|
13326
13721
|
|
|
13327
13722
|
// node_modules/zod/v4/locales/ps.js
|
|
13328
|
-
var
|
|
13723
|
+
var error34 = () => {
|
|
13329
13724
|
const Sizable = {
|
|
13330
13725
|
string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
|
|
13331
13726
|
file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
|
|
@@ -13435,12 +13830,12 @@ var error32 = () => {
|
|
|
13435
13830
|
};
|
|
13436
13831
|
function ps_default() {
|
|
13437
13832
|
return {
|
|
13438
|
-
localeError:
|
|
13833
|
+
localeError: error34()
|
|
13439
13834
|
};
|
|
13440
13835
|
}
|
|
13441
13836
|
|
|
13442
13837
|
// node_modules/zod/v4/locales/pl.js
|
|
13443
|
-
var
|
|
13838
|
+
var error35 = () => {
|
|
13444
13839
|
const Sizable = {
|
|
13445
13840
|
string: { unit: "znak\xF3w", verb: "mie\u0107" },
|
|
13446
13841
|
file: { unit: "bajt\xF3w", verb: "mie\u0107" },
|
|
@@ -13545,12 +13940,12 @@ var error33 = () => {
|
|
|
13545
13940
|
};
|
|
13546
13941
|
function pl_default() {
|
|
13547
13942
|
return {
|
|
13548
|
-
localeError:
|
|
13943
|
+
localeError: error35()
|
|
13549
13944
|
};
|
|
13550
13945
|
}
|
|
13551
13946
|
|
|
13552
13947
|
// node_modules/zod/v4/locales/pt.js
|
|
13553
|
-
var
|
|
13948
|
+
var error36 = () => {
|
|
13554
13949
|
const Sizable = {
|
|
13555
13950
|
string: { unit: "caracteres", verb: "ter" },
|
|
13556
13951
|
file: { unit: "bytes", verb: "ter" },
|
|
@@ -13654,7 +14049,127 @@ var error34 = () => {
|
|
|
13654
14049
|
};
|
|
13655
14050
|
function pt_default() {
|
|
13656
14051
|
return {
|
|
13657
|
-
localeError:
|
|
14052
|
+
localeError: error36()
|
|
14053
|
+
};
|
|
14054
|
+
}
|
|
14055
|
+
|
|
14056
|
+
// node_modules/zod/v4/locales/ro.js
|
|
14057
|
+
var error37 = () => {
|
|
14058
|
+
const Sizable = {
|
|
14059
|
+
string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
|
|
14060
|
+
file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
|
|
14061
|
+
array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
14062
|
+
set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
14063
|
+
map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
|
|
14064
|
+
};
|
|
14065
|
+
function getSizing(origin) {
|
|
14066
|
+
return Sizable[origin] ?? null;
|
|
14067
|
+
}
|
|
14068
|
+
const FormatDictionary = {
|
|
14069
|
+
regex: "intrare",
|
|
14070
|
+
email: "adres\u0103 de email",
|
|
14071
|
+
url: "URL",
|
|
14072
|
+
emoji: "emoji",
|
|
14073
|
+
uuid: "UUID",
|
|
14074
|
+
uuidv4: "UUIDv4",
|
|
14075
|
+
uuidv6: "UUIDv6",
|
|
14076
|
+
nanoid: "nanoid",
|
|
14077
|
+
guid: "GUID",
|
|
14078
|
+
cuid: "cuid",
|
|
14079
|
+
cuid2: "cuid2",
|
|
14080
|
+
ulid: "ULID",
|
|
14081
|
+
xid: "XID",
|
|
14082
|
+
ksuid: "KSUID",
|
|
14083
|
+
datetime: "dat\u0103 \u0219i or\u0103 ISO",
|
|
14084
|
+
date: "dat\u0103 ISO",
|
|
14085
|
+
time: "or\u0103 ISO",
|
|
14086
|
+
duration: "durat\u0103 ISO",
|
|
14087
|
+
ipv4: "adres\u0103 IPv4",
|
|
14088
|
+
ipv6: "adres\u0103 IPv6",
|
|
14089
|
+
mac: "adres\u0103 MAC",
|
|
14090
|
+
cidrv4: "interval IPv4",
|
|
14091
|
+
cidrv6: "interval IPv6",
|
|
14092
|
+
base64: "\u0219ir codat base64",
|
|
14093
|
+
base64url: "\u0219ir codat base64url",
|
|
14094
|
+
json_string: "\u0219ir JSON",
|
|
14095
|
+
e164: "num\u0103r E.164",
|
|
14096
|
+
jwt: "JWT",
|
|
14097
|
+
template_literal: "intrare"
|
|
14098
|
+
};
|
|
14099
|
+
const TypeDictionary = {
|
|
14100
|
+
nan: "NaN",
|
|
14101
|
+
string: "\u0219ir",
|
|
14102
|
+
number: "num\u0103r",
|
|
14103
|
+
boolean: "boolean",
|
|
14104
|
+
function: "func\u021Bie",
|
|
14105
|
+
array: "matrice",
|
|
14106
|
+
object: "obiect",
|
|
14107
|
+
undefined: "nedefinit",
|
|
14108
|
+
symbol: "simbol",
|
|
14109
|
+
bigint: "num\u0103r mare",
|
|
14110
|
+
void: "void",
|
|
14111
|
+
never: "never",
|
|
14112
|
+
map: "hart\u0103",
|
|
14113
|
+
set: "set"
|
|
14114
|
+
};
|
|
14115
|
+
return (issue2) => {
|
|
14116
|
+
switch (issue2.code) {
|
|
14117
|
+
case "invalid_type": {
|
|
14118
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
14119
|
+
const receivedType = parsedType(issue2.input);
|
|
14120
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
14121
|
+
return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
|
|
14122
|
+
}
|
|
14123
|
+
case "invalid_value":
|
|
14124
|
+
if (issue2.values.length === 1)
|
|
14125
|
+
return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
|
|
14126
|
+
return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
|
|
14127
|
+
case "too_big": {
|
|
14128
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
14129
|
+
const sizing = getSizing(issue2.origin);
|
|
14130
|
+
if (sizing)
|
|
14131
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
|
|
14132
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
|
|
14133
|
+
}
|
|
14134
|
+
case "too_small": {
|
|
14135
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
14136
|
+
const sizing = getSizing(issue2.origin);
|
|
14137
|
+
if (sizing) {
|
|
14138
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
14139
|
+
}
|
|
14140
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
|
|
14141
|
+
}
|
|
14142
|
+
case "invalid_format": {
|
|
14143
|
+
const _issue = issue2;
|
|
14144
|
+
if (_issue.format === "starts_with") {
|
|
14145
|
+
return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
|
|
14146
|
+
}
|
|
14147
|
+
if (_issue.format === "ends_with")
|
|
14148
|
+
return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
|
|
14149
|
+
if (_issue.format === "includes")
|
|
14150
|
+
return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
|
|
14151
|
+
if (_issue.format === "regex")
|
|
14152
|
+
return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
|
|
14153
|
+
return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
14154
|
+
}
|
|
14155
|
+
case "not_multiple_of":
|
|
14156
|
+
return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
|
|
14157
|
+
case "unrecognized_keys":
|
|
14158
|
+
return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
|
|
14159
|
+
case "invalid_key":
|
|
14160
|
+
return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
|
|
14161
|
+
case "invalid_union":
|
|
14162
|
+
return "Intrare invalid\u0103";
|
|
14163
|
+
case "invalid_element":
|
|
14164
|
+
return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
|
|
14165
|
+
default:
|
|
14166
|
+
return `Intrare invalid\u0103`;
|
|
14167
|
+
}
|
|
14168
|
+
};
|
|
14169
|
+
};
|
|
14170
|
+
function ro_default() {
|
|
14171
|
+
return {
|
|
14172
|
+
localeError: error37()
|
|
13658
14173
|
};
|
|
13659
14174
|
}
|
|
13660
14175
|
|
|
@@ -13674,7 +14189,7 @@ function getRussianPlural(count, one, few, many) {
|
|
|
13674
14189
|
}
|
|
13675
14190
|
return many;
|
|
13676
14191
|
}
|
|
13677
|
-
var
|
|
14192
|
+
var error38 = () => {
|
|
13678
14193
|
const Sizable = {
|
|
13679
14194
|
string: {
|
|
13680
14195
|
unit: {
|
|
@@ -13811,12 +14326,12 @@ var error35 = () => {
|
|
|
13811
14326
|
};
|
|
13812
14327
|
function ru_default() {
|
|
13813
14328
|
return {
|
|
13814
|
-
localeError:
|
|
14329
|
+
localeError: error38()
|
|
13815
14330
|
};
|
|
13816
14331
|
}
|
|
13817
14332
|
|
|
13818
14333
|
// node_modules/zod/v4/locales/sl.js
|
|
13819
|
-
var
|
|
14334
|
+
var error39 = () => {
|
|
13820
14335
|
const Sizable = {
|
|
13821
14336
|
string: { unit: "znakov", verb: "imeti" },
|
|
13822
14337
|
file: { unit: "bajtov", verb: "imeti" },
|
|
@@ -13921,12 +14436,12 @@ var error36 = () => {
|
|
|
13921
14436
|
};
|
|
13922
14437
|
function sl_default() {
|
|
13923
14438
|
return {
|
|
13924
|
-
localeError:
|
|
14439
|
+
localeError: error39()
|
|
13925
14440
|
};
|
|
13926
14441
|
}
|
|
13927
14442
|
|
|
13928
14443
|
// node_modules/zod/v4/locales/sv.js
|
|
13929
|
-
var
|
|
14444
|
+
var error40 = () => {
|
|
13930
14445
|
const Sizable = {
|
|
13931
14446
|
string: { unit: "tecken", verb: "att ha" },
|
|
13932
14447
|
file: { unit: "bytes", verb: "att ha" },
|
|
@@ -14032,12 +14547,12 @@ var error37 = () => {
|
|
|
14032
14547
|
};
|
|
14033
14548
|
function sv_default() {
|
|
14034
14549
|
return {
|
|
14035
|
-
localeError:
|
|
14550
|
+
localeError: error40()
|
|
14036
14551
|
};
|
|
14037
14552
|
}
|
|
14038
14553
|
|
|
14039
14554
|
// node_modules/zod/v4/locales/ta.js
|
|
14040
|
-
var
|
|
14555
|
+
var error41 = () => {
|
|
14041
14556
|
const Sizable = {
|
|
14042
14557
|
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" },
|
|
14043
14558
|
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" },
|
|
@@ -14143,12 +14658,12 @@ var error38 = () => {
|
|
|
14143
14658
|
};
|
|
14144
14659
|
function ta_default() {
|
|
14145
14660
|
return {
|
|
14146
|
-
localeError:
|
|
14661
|
+
localeError: error41()
|
|
14147
14662
|
};
|
|
14148
14663
|
}
|
|
14149
14664
|
|
|
14150
14665
|
// node_modules/zod/v4/locales/th.js
|
|
14151
|
-
var
|
|
14666
|
+
var error42 = () => {
|
|
14152
14667
|
const Sizable = {
|
|
14153
14668
|
string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
14154
14669
|
file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
@@ -14254,12 +14769,12 @@ var error39 = () => {
|
|
|
14254
14769
|
};
|
|
14255
14770
|
function th_default() {
|
|
14256
14771
|
return {
|
|
14257
|
-
localeError:
|
|
14772
|
+
localeError: error42()
|
|
14258
14773
|
};
|
|
14259
14774
|
}
|
|
14260
14775
|
|
|
14261
14776
|
// node_modules/zod/v4/locales/tr.js
|
|
14262
|
-
var
|
|
14777
|
+
var error43 = () => {
|
|
14263
14778
|
const Sizable = {
|
|
14264
14779
|
string: { unit: "karakter", verb: "olmal\u0131" },
|
|
14265
14780
|
file: { unit: "bayt", verb: "olmal\u0131" },
|
|
@@ -14360,12 +14875,12 @@ var error40 = () => {
|
|
|
14360
14875
|
};
|
|
14361
14876
|
function tr_default() {
|
|
14362
14877
|
return {
|
|
14363
|
-
localeError:
|
|
14878
|
+
localeError: error43()
|
|
14364
14879
|
};
|
|
14365
14880
|
}
|
|
14366
14881
|
|
|
14367
14882
|
// node_modules/zod/v4/locales/uk.js
|
|
14368
|
-
var
|
|
14883
|
+
var error44 = () => {
|
|
14369
14884
|
const Sizable = {
|
|
14370
14885
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
14371
14886
|
file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
@@ -14469,7 +14984,7 @@ var error41 = () => {
|
|
|
14469
14984
|
};
|
|
14470
14985
|
function uk_default() {
|
|
14471
14986
|
return {
|
|
14472
|
-
localeError:
|
|
14987
|
+
localeError: error44()
|
|
14473
14988
|
};
|
|
14474
14989
|
}
|
|
14475
14990
|
|
|
@@ -14479,7 +14994,7 @@ function ua_default() {
|
|
|
14479
14994
|
}
|
|
14480
14995
|
|
|
14481
14996
|
// node_modules/zod/v4/locales/ur.js
|
|
14482
|
-
var
|
|
14997
|
+
var error45 = () => {
|
|
14483
14998
|
const Sizable = {
|
|
14484
14999
|
string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
|
|
14485
15000
|
file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
|
|
@@ -14585,17 +15100,18 @@ var error42 = () => {
|
|
|
14585
15100
|
};
|
|
14586
15101
|
function ur_default() {
|
|
14587
15102
|
return {
|
|
14588
|
-
localeError:
|
|
15103
|
+
localeError: error45()
|
|
14589
15104
|
};
|
|
14590
15105
|
}
|
|
14591
15106
|
|
|
14592
15107
|
// node_modules/zod/v4/locales/uz.js
|
|
14593
|
-
var
|
|
15108
|
+
var error46 = () => {
|
|
14594
15109
|
const Sizable = {
|
|
14595
15110
|
string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
|
|
14596
15111
|
file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
|
|
14597
15112
|
array: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
14598
|
-
set: { unit: "element", verb: "bo\u2018lishi kerak" }
|
|
15113
|
+
set: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
15114
|
+
map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
|
|
14599
15115
|
};
|
|
14600
15116
|
function getSizing(origin) {
|
|
14601
15117
|
return Sizable[origin] ?? null;
|
|
@@ -14695,12 +15211,12 @@ var error43 = () => {
|
|
|
14695
15211
|
};
|
|
14696
15212
|
function uz_default() {
|
|
14697
15213
|
return {
|
|
14698
|
-
localeError:
|
|
15214
|
+
localeError: error46()
|
|
14699
15215
|
};
|
|
14700
15216
|
}
|
|
14701
15217
|
|
|
14702
15218
|
// node_modules/zod/v4/locales/vi.js
|
|
14703
|
-
var
|
|
15219
|
+
var error47 = () => {
|
|
14704
15220
|
const Sizable = {
|
|
14705
15221
|
string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
|
|
14706
15222
|
file: { unit: "byte", verb: "c\xF3" },
|
|
@@ -14804,12 +15320,12 @@ var error44 = () => {
|
|
|
14804
15320
|
};
|
|
14805
15321
|
function vi_default() {
|
|
14806
15322
|
return {
|
|
14807
|
-
localeError:
|
|
15323
|
+
localeError: error47()
|
|
14808
15324
|
};
|
|
14809
15325
|
}
|
|
14810
15326
|
|
|
14811
15327
|
// node_modules/zod/v4/locales/zh-CN.js
|
|
14812
|
-
var
|
|
15328
|
+
var error48 = () => {
|
|
14813
15329
|
const Sizable = {
|
|
14814
15330
|
string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
|
|
14815
15331
|
file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
|
|
@@ -14914,12 +15430,12 @@ var error45 = () => {
|
|
|
14914
15430
|
};
|
|
14915
15431
|
function zh_CN_default() {
|
|
14916
15432
|
return {
|
|
14917
|
-
localeError:
|
|
15433
|
+
localeError: error48()
|
|
14918
15434
|
};
|
|
14919
15435
|
}
|
|
14920
15436
|
|
|
14921
15437
|
// node_modules/zod/v4/locales/zh-TW.js
|
|
14922
|
-
var
|
|
15438
|
+
var error49 = () => {
|
|
14923
15439
|
const Sizable = {
|
|
14924
15440
|
string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
|
|
14925
15441
|
file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
|
|
@@ -15022,12 +15538,12 @@ var error46 = () => {
|
|
|
15022
15538
|
};
|
|
15023
15539
|
function zh_TW_default() {
|
|
15024
15540
|
return {
|
|
15025
|
-
localeError:
|
|
15541
|
+
localeError: error49()
|
|
15026
15542
|
};
|
|
15027
15543
|
}
|
|
15028
15544
|
|
|
15029
15545
|
// node_modules/zod/v4/locales/yo.js
|
|
15030
|
-
var
|
|
15546
|
+
var error50 = () => {
|
|
15031
15547
|
const Sizable = {
|
|
15032
15548
|
string: { unit: "\xE0mi", verb: "n\xED" },
|
|
15033
15549
|
file: { unit: "bytes", verb: "n\xED" },
|
|
@@ -15130,12 +15646,12 @@ var error47 = () => {
|
|
|
15130
15646
|
};
|
|
15131
15647
|
function yo_default() {
|
|
15132
15648
|
return {
|
|
15133
|
-
localeError:
|
|
15649
|
+
localeError: error50()
|
|
15134
15650
|
};
|
|
15135
15651
|
}
|
|
15136
15652
|
|
|
15137
15653
|
// node_modules/zod/v4/core/registries.js
|
|
15138
|
-
var
|
|
15654
|
+
var _a2;
|
|
15139
15655
|
var $output = /* @__PURE__ */ Symbol("ZodOutput");
|
|
15140
15656
|
var $input = /* @__PURE__ */ Symbol("ZodInput");
|
|
15141
15657
|
var $ZodRegistry = class {
|
|
@@ -15181,7 +15697,7 @@ var $ZodRegistry = class {
|
|
|
15181
15697
|
function registry() {
|
|
15182
15698
|
return new $ZodRegistry();
|
|
15183
15699
|
}
|
|
15184
|
-
(
|
|
15700
|
+
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
15185
15701
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
15186
15702
|
|
|
15187
15703
|
// node_modules/zod/v4/core/api.js
|
|
@@ -16099,7 +16615,7 @@ function _refine(Class2, fn, _params) {
|
|
|
16099
16615
|
return schema;
|
|
16100
16616
|
}
|
|
16101
16617
|
// @__NO_SIDE_EFFECTS__
|
|
16102
|
-
function _superRefine(fn) {
|
|
16618
|
+
function _superRefine(fn, params) {
|
|
16103
16619
|
const ch = /* @__PURE__ */ _check((payload) => {
|
|
16104
16620
|
payload.addIssue = (issue2) => {
|
|
16105
16621
|
if (typeof issue2 === "string") {
|
|
@@ -16116,7 +16632,7 @@ function _superRefine(fn) {
|
|
|
16116
16632
|
}
|
|
16117
16633
|
};
|
|
16118
16634
|
return fn(payload.value, payload);
|
|
16119
|
-
});
|
|
16635
|
+
}, params);
|
|
16120
16636
|
return ch;
|
|
16121
16637
|
}
|
|
16122
16638
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -16246,7 +16762,7 @@ function initializeContext(params) {
|
|
|
16246
16762
|
};
|
|
16247
16763
|
}
|
|
16248
16764
|
function process3(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
16249
|
-
var
|
|
16765
|
+
var _a3;
|
|
16250
16766
|
const def = schema._zod.def;
|
|
16251
16767
|
const seen = ctx.seen.get(schema);
|
|
16252
16768
|
if (seen) {
|
|
@@ -16293,8 +16809,8 @@ function process3(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
|
16293
16809
|
delete result.schema.examples;
|
|
16294
16810
|
delete result.schema.default;
|
|
16295
16811
|
}
|
|
16296
|
-
if (ctx.io === "input" && result.schema
|
|
16297
|
-
(
|
|
16812
|
+
if (ctx.io === "input" && "_prefault" in result.schema)
|
|
16813
|
+
(_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
|
|
16298
16814
|
delete result.schema._prefault;
|
|
16299
16815
|
const _result = ctx.seen.get(schema);
|
|
16300
16816
|
return _result.schema;
|
|
@@ -16475,10 +16991,15 @@ function finalize(ctx, schema) {
|
|
|
16475
16991
|
result.$id = ctx.external.uri(id);
|
|
16476
16992
|
}
|
|
16477
16993
|
Object.assign(result, root.def ?? root.schema);
|
|
16994
|
+
const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
|
|
16995
|
+
if (rootMetaId !== void 0 && result.id === rootMetaId)
|
|
16996
|
+
delete result.id;
|
|
16478
16997
|
const defs = ctx.external?.defs ?? {};
|
|
16479
16998
|
for (const entry of ctx.seen.entries()) {
|
|
16480
16999
|
const seen = entry[1];
|
|
16481
17000
|
if (seen.def && seen.defId) {
|
|
17001
|
+
if (seen.def.id === seen.defId)
|
|
17002
|
+
delete seen.def.id;
|
|
16482
17003
|
defs[seen.defId] = seen.def;
|
|
16483
17004
|
}
|
|
16484
17005
|
}
|
|
@@ -16623,39 +17144,28 @@ var numberProcessor = (schema, ctx, _json, _params) => {
|
|
|
16623
17144
|
json2.type = "integer";
|
|
16624
17145
|
else
|
|
16625
17146
|
json2.type = "number";
|
|
16626
|
-
|
|
16627
|
-
|
|
17147
|
+
const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
|
|
17148
|
+
const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
|
|
17149
|
+
const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
|
|
17150
|
+
if (exMin) {
|
|
17151
|
+
if (legacy) {
|
|
16628
17152
|
json2.minimum = exclusiveMinimum;
|
|
16629
17153
|
json2.exclusiveMinimum = true;
|
|
16630
17154
|
} else {
|
|
16631
17155
|
json2.exclusiveMinimum = exclusiveMinimum;
|
|
16632
17156
|
}
|
|
16633
|
-
}
|
|
16634
|
-
if (typeof minimum === "number") {
|
|
17157
|
+
} else if (typeof minimum === "number") {
|
|
16635
17158
|
json2.minimum = minimum;
|
|
16636
|
-
if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
|
|
16637
|
-
if (exclusiveMinimum >= minimum)
|
|
16638
|
-
delete json2.minimum;
|
|
16639
|
-
else
|
|
16640
|
-
delete json2.exclusiveMinimum;
|
|
16641
|
-
}
|
|
16642
17159
|
}
|
|
16643
|
-
if (
|
|
16644
|
-
if (
|
|
17160
|
+
if (exMax) {
|
|
17161
|
+
if (legacy) {
|
|
16645
17162
|
json2.maximum = exclusiveMaximum;
|
|
16646
17163
|
json2.exclusiveMaximum = true;
|
|
16647
17164
|
} else {
|
|
16648
17165
|
json2.exclusiveMaximum = exclusiveMaximum;
|
|
16649
17166
|
}
|
|
16650
|
-
}
|
|
16651
|
-
if (typeof maximum === "number") {
|
|
17167
|
+
} else if (typeof maximum === "number") {
|
|
16652
17168
|
json2.maximum = maximum;
|
|
16653
|
-
if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
|
|
16654
|
-
if (exclusiveMaximum <= maximum)
|
|
16655
|
-
delete json2.maximum;
|
|
16656
|
-
else
|
|
16657
|
-
delete json2.exclusiveMaximum;
|
|
16658
|
-
}
|
|
16659
17169
|
}
|
|
16660
17170
|
if (typeof multipleOf === "number")
|
|
16661
17171
|
json2.multipleOf = multipleOf;
|
|
@@ -16827,7 +17337,10 @@ var arrayProcessor = (schema, ctx, _json, params) => {
|
|
|
16827
17337
|
if (typeof maximum === "number")
|
|
16828
17338
|
json2.maxItems = maximum;
|
|
16829
17339
|
json2.type = "array";
|
|
16830
|
-
json2.items = process3(def.element, ctx, {
|
|
17340
|
+
json2.items = process3(def.element, ctx, {
|
|
17341
|
+
...params,
|
|
17342
|
+
path: [...params.path, "items"]
|
|
17343
|
+
});
|
|
16831
17344
|
};
|
|
16832
17345
|
var objectProcessor = (schema, ctx, _json, params) => {
|
|
16833
17346
|
const json2 = _json;
|
|
@@ -17314,6 +17827,7 @@ __export(schemas_exports2, {
|
|
|
17314
17827
|
int32: () => int32,
|
|
17315
17828
|
int64: () => int64,
|
|
17316
17829
|
intersection: () => intersection,
|
|
17830
|
+
invertCodec: () => invertCodec,
|
|
17317
17831
|
ipv4: () => ipv42,
|
|
17318
17832
|
ipv6: () => ipv62,
|
|
17319
17833
|
json: () => json,
|
|
@@ -17483,8 +17997,8 @@ var initializer2 = (inst, issues) => {
|
|
|
17483
17997
|
}
|
|
17484
17998
|
});
|
|
17485
17999
|
};
|
|
17486
|
-
var ZodError = $constructor("ZodError", initializer2);
|
|
17487
|
-
var ZodRealError = $constructor("ZodError", initializer2, {
|
|
18000
|
+
var ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
|
|
18001
|
+
var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
|
|
17488
18002
|
Parent: Error
|
|
17489
18003
|
});
|
|
17490
18004
|
|
|
@@ -17503,6 +18017,43 @@ var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
|
17503
18017
|
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
17504
18018
|
|
|
17505
18019
|
// node_modules/zod/v4/classic/schemas.js
|
|
18020
|
+
var _installedGroups = /* @__PURE__ */ new WeakMap();
|
|
18021
|
+
function _installLazyMethods(inst, group, methods) {
|
|
18022
|
+
const proto = Object.getPrototypeOf(inst);
|
|
18023
|
+
let installed = _installedGroups.get(proto);
|
|
18024
|
+
if (!installed) {
|
|
18025
|
+
installed = /* @__PURE__ */ new Set();
|
|
18026
|
+
_installedGroups.set(proto, installed);
|
|
18027
|
+
}
|
|
18028
|
+
if (installed.has(group))
|
|
18029
|
+
return;
|
|
18030
|
+
installed.add(group);
|
|
18031
|
+
for (const key in methods) {
|
|
18032
|
+
const fn = methods[key];
|
|
18033
|
+
Object.defineProperty(proto, key, {
|
|
18034
|
+
configurable: true,
|
|
18035
|
+
enumerable: false,
|
|
18036
|
+
get() {
|
|
18037
|
+
const bound = fn.bind(this);
|
|
18038
|
+
Object.defineProperty(this, key, {
|
|
18039
|
+
configurable: true,
|
|
18040
|
+
writable: true,
|
|
18041
|
+
enumerable: true,
|
|
18042
|
+
value: bound
|
|
18043
|
+
});
|
|
18044
|
+
return bound;
|
|
18045
|
+
},
|
|
18046
|
+
set(v) {
|
|
18047
|
+
Object.defineProperty(this, key, {
|
|
18048
|
+
configurable: true,
|
|
18049
|
+
writable: true,
|
|
18050
|
+
enumerable: true,
|
|
18051
|
+
value: v
|
|
18052
|
+
});
|
|
18053
|
+
}
|
|
18054
|
+
});
|
|
18055
|
+
}
|
|
18056
|
+
}
|
|
17506
18057
|
var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
17507
18058
|
$ZodType.init(inst, def);
|
|
17508
18059
|
Object.assign(inst["~standard"], {
|
|
@@ -17515,23 +18066,6 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
17515
18066
|
inst.def = def;
|
|
17516
18067
|
inst.type = def.type;
|
|
17517
18068
|
Object.defineProperty(inst, "_def", { value: def });
|
|
17518
|
-
inst.check = (...checks) => {
|
|
17519
|
-
return inst.clone(util_exports.mergeDefs(def, {
|
|
17520
|
-
checks: [
|
|
17521
|
-
...def.checks ?? [],
|
|
17522
|
-
...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
17523
|
-
]
|
|
17524
|
-
}), {
|
|
17525
|
-
parent: true
|
|
17526
|
-
});
|
|
17527
|
-
};
|
|
17528
|
-
inst.with = inst.check;
|
|
17529
|
-
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
17530
|
-
inst.brand = () => inst;
|
|
17531
|
-
inst.register = ((reg, meta3) => {
|
|
17532
|
-
reg.add(inst, meta3);
|
|
17533
|
-
return inst;
|
|
17534
|
-
});
|
|
17535
18069
|
inst.parse = (data, params) => parse3(inst, data, params, { callee: inst.parse });
|
|
17536
18070
|
inst.safeParse = (data, params) => safeParse3(inst, data, params);
|
|
17537
18071
|
inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
|
|
@@ -17545,45 +18079,108 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
17545
18079
|
inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
|
|
17546
18080
|
inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
|
|
17547
18081
|
inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
|
|
17548
|
-
inst
|
|
17549
|
-
|
|
17550
|
-
|
|
17551
|
-
|
|
17552
|
-
|
|
17553
|
-
|
|
17554
|
-
|
|
17555
|
-
|
|
17556
|
-
|
|
17557
|
-
|
|
17558
|
-
|
|
17559
|
-
|
|
17560
|
-
|
|
17561
|
-
|
|
17562
|
-
|
|
17563
|
-
|
|
17564
|
-
|
|
17565
|
-
|
|
17566
|
-
|
|
17567
|
-
|
|
17568
|
-
|
|
17569
|
-
|
|
18082
|
+
_installLazyMethods(inst, "ZodType", {
|
|
18083
|
+
check(...chks) {
|
|
18084
|
+
const def2 = this.def;
|
|
18085
|
+
return this.clone(util_exports.mergeDefs(def2, {
|
|
18086
|
+
checks: [
|
|
18087
|
+
...def2.checks ?? [],
|
|
18088
|
+
...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
18089
|
+
]
|
|
18090
|
+
}), { parent: true });
|
|
18091
|
+
},
|
|
18092
|
+
with(...chks) {
|
|
18093
|
+
return this.check(...chks);
|
|
18094
|
+
},
|
|
18095
|
+
clone(def2, params) {
|
|
18096
|
+
return clone(this, def2, params);
|
|
18097
|
+
},
|
|
18098
|
+
brand() {
|
|
18099
|
+
return this;
|
|
18100
|
+
},
|
|
18101
|
+
register(reg, meta3) {
|
|
18102
|
+
reg.add(this, meta3);
|
|
18103
|
+
return this;
|
|
18104
|
+
},
|
|
18105
|
+
refine(check3, params) {
|
|
18106
|
+
return this.check(refine(check3, params));
|
|
18107
|
+
},
|
|
18108
|
+
superRefine(refinement, params) {
|
|
18109
|
+
return this.check(superRefine(refinement, params));
|
|
18110
|
+
},
|
|
18111
|
+
overwrite(fn) {
|
|
18112
|
+
return this.check(_overwrite(fn));
|
|
18113
|
+
},
|
|
18114
|
+
optional() {
|
|
18115
|
+
return optional2(this);
|
|
18116
|
+
},
|
|
18117
|
+
exactOptional() {
|
|
18118
|
+
return exactOptional(this);
|
|
18119
|
+
},
|
|
18120
|
+
nullable() {
|
|
18121
|
+
return nullable(this);
|
|
18122
|
+
},
|
|
18123
|
+
nullish() {
|
|
18124
|
+
return optional2(nullable(this));
|
|
18125
|
+
},
|
|
18126
|
+
nonoptional(params) {
|
|
18127
|
+
return nonoptional(this, params);
|
|
18128
|
+
},
|
|
18129
|
+
array() {
|
|
18130
|
+
return array2(this);
|
|
18131
|
+
},
|
|
18132
|
+
or(arg) {
|
|
18133
|
+
return union2([this, arg]);
|
|
18134
|
+
},
|
|
18135
|
+
and(arg) {
|
|
18136
|
+
return intersection(this, arg);
|
|
18137
|
+
},
|
|
18138
|
+
transform(tx) {
|
|
18139
|
+
return pipe2(this, transform(tx));
|
|
18140
|
+
},
|
|
18141
|
+
default(d) {
|
|
18142
|
+
return _default2(this, d);
|
|
18143
|
+
},
|
|
18144
|
+
prefault(d) {
|
|
18145
|
+
return prefault(this, d);
|
|
18146
|
+
},
|
|
18147
|
+
catch(params) {
|
|
18148
|
+
return _catch2(this, params);
|
|
18149
|
+
},
|
|
18150
|
+
pipe(target) {
|
|
18151
|
+
return pipe2(this, target);
|
|
18152
|
+
},
|
|
18153
|
+
readonly() {
|
|
18154
|
+
return readonly(this);
|
|
18155
|
+
},
|
|
18156
|
+
describe(description) {
|
|
18157
|
+
const cl = this.clone();
|
|
18158
|
+
globalRegistry.add(cl, { description });
|
|
18159
|
+
return cl;
|
|
18160
|
+
},
|
|
18161
|
+
meta(...args) {
|
|
18162
|
+
if (args.length === 0)
|
|
18163
|
+
return globalRegistry.get(this);
|
|
18164
|
+
const cl = this.clone();
|
|
18165
|
+
globalRegistry.add(cl, args[0]);
|
|
18166
|
+
return cl;
|
|
18167
|
+
},
|
|
18168
|
+
isOptional() {
|
|
18169
|
+
return this.safeParse(void 0).success;
|
|
18170
|
+
},
|
|
18171
|
+
isNullable() {
|
|
18172
|
+
return this.safeParse(null).success;
|
|
18173
|
+
},
|
|
18174
|
+
apply(fn) {
|
|
18175
|
+
return fn(this);
|
|
18176
|
+
}
|
|
18177
|
+
});
|
|
17570
18178
|
Object.defineProperty(inst, "description", {
|
|
17571
18179
|
get() {
|
|
17572
18180
|
return globalRegistry.get(inst)?.description;
|
|
17573
18181
|
},
|
|
17574
18182
|
configurable: true
|
|
17575
18183
|
});
|
|
17576
|
-
inst.meta = (...args) => {
|
|
17577
|
-
if (args.length === 0) {
|
|
17578
|
-
return globalRegistry.get(inst);
|
|
17579
|
-
}
|
|
17580
|
-
const cl = inst.clone();
|
|
17581
|
-
globalRegistry.add(cl, args[0]);
|
|
17582
|
-
return cl;
|
|
17583
|
-
};
|
|
17584
|
-
inst.isOptional = () => inst.safeParse(void 0).success;
|
|
17585
|
-
inst.isNullable = () => inst.safeParse(null).success;
|
|
17586
|
-
inst.apply = (fn) => fn(inst);
|
|
17587
18184
|
return inst;
|
|
17588
18185
|
});
|
|
17589
18186
|
var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
@@ -17594,21 +18191,53 @@ var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
|
17594
18191
|
inst.format = bag.format ?? null;
|
|
17595
18192
|
inst.minLength = bag.minimum ?? null;
|
|
17596
18193
|
inst.maxLength = bag.maximum ?? null;
|
|
17597
|
-
inst
|
|
17598
|
-
|
|
17599
|
-
|
|
17600
|
-
|
|
17601
|
-
|
|
17602
|
-
|
|
17603
|
-
|
|
17604
|
-
|
|
17605
|
-
|
|
17606
|
-
|
|
17607
|
-
|
|
17608
|
-
|
|
17609
|
-
|
|
17610
|
-
|
|
17611
|
-
|
|
18194
|
+
_installLazyMethods(inst, "_ZodString", {
|
|
18195
|
+
regex(...args) {
|
|
18196
|
+
return this.check(_regex(...args));
|
|
18197
|
+
},
|
|
18198
|
+
includes(...args) {
|
|
18199
|
+
return this.check(_includes(...args));
|
|
18200
|
+
},
|
|
18201
|
+
startsWith(...args) {
|
|
18202
|
+
return this.check(_startsWith(...args));
|
|
18203
|
+
},
|
|
18204
|
+
endsWith(...args) {
|
|
18205
|
+
return this.check(_endsWith(...args));
|
|
18206
|
+
},
|
|
18207
|
+
min(...args) {
|
|
18208
|
+
return this.check(_minLength(...args));
|
|
18209
|
+
},
|
|
18210
|
+
max(...args) {
|
|
18211
|
+
return this.check(_maxLength(...args));
|
|
18212
|
+
},
|
|
18213
|
+
length(...args) {
|
|
18214
|
+
return this.check(_length(...args));
|
|
18215
|
+
},
|
|
18216
|
+
nonempty(...args) {
|
|
18217
|
+
return this.check(_minLength(1, ...args));
|
|
18218
|
+
},
|
|
18219
|
+
lowercase(params) {
|
|
18220
|
+
return this.check(_lowercase(params));
|
|
18221
|
+
},
|
|
18222
|
+
uppercase(params) {
|
|
18223
|
+
return this.check(_uppercase(params));
|
|
18224
|
+
},
|
|
18225
|
+
trim() {
|
|
18226
|
+
return this.check(_trim());
|
|
18227
|
+
},
|
|
18228
|
+
normalize(...args) {
|
|
18229
|
+
return this.check(_normalize(...args));
|
|
18230
|
+
},
|
|
18231
|
+
toLowerCase() {
|
|
18232
|
+
return this.check(_toLowerCase());
|
|
18233
|
+
},
|
|
18234
|
+
toUpperCase() {
|
|
18235
|
+
return this.check(_toUpperCase());
|
|
18236
|
+
},
|
|
18237
|
+
slugify() {
|
|
18238
|
+
return this.check(_slugify());
|
|
18239
|
+
}
|
|
18240
|
+
});
|
|
17612
18241
|
});
|
|
17613
18242
|
var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
17614
18243
|
$ZodString.init(inst, def);
|
|
@@ -17687,7 +18316,7 @@ function url(params) {
|
|
|
17687
18316
|
}
|
|
17688
18317
|
function httpUrl(params) {
|
|
17689
18318
|
return _url(ZodURL, {
|
|
17690
|
-
protocol:
|
|
18319
|
+
protocol: regexes_exports.httpProtocol,
|
|
17691
18320
|
hostname: regexes_exports.domain,
|
|
17692
18321
|
...util_exports.normalizeParams(params)
|
|
17693
18322
|
});
|
|
@@ -17829,21 +18458,53 @@ var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
|
17829
18458
|
$ZodNumber.init(inst, def);
|
|
17830
18459
|
ZodType.init(inst, def);
|
|
17831
18460
|
inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
|
|
17832
|
-
inst
|
|
17833
|
-
|
|
17834
|
-
|
|
17835
|
-
|
|
17836
|
-
|
|
17837
|
-
|
|
17838
|
-
|
|
17839
|
-
|
|
17840
|
-
|
|
17841
|
-
|
|
17842
|
-
|
|
17843
|
-
|
|
17844
|
-
|
|
17845
|
-
|
|
17846
|
-
|
|
18461
|
+
_installLazyMethods(inst, "ZodNumber", {
|
|
18462
|
+
gt(value, params) {
|
|
18463
|
+
return this.check(_gt(value, params));
|
|
18464
|
+
},
|
|
18465
|
+
gte(value, params) {
|
|
18466
|
+
return this.check(_gte(value, params));
|
|
18467
|
+
},
|
|
18468
|
+
min(value, params) {
|
|
18469
|
+
return this.check(_gte(value, params));
|
|
18470
|
+
},
|
|
18471
|
+
lt(value, params) {
|
|
18472
|
+
return this.check(_lt(value, params));
|
|
18473
|
+
},
|
|
18474
|
+
lte(value, params) {
|
|
18475
|
+
return this.check(_lte(value, params));
|
|
18476
|
+
},
|
|
18477
|
+
max(value, params) {
|
|
18478
|
+
return this.check(_lte(value, params));
|
|
18479
|
+
},
|
|
18480
|
+
int(params) {
|
|
18481
|
+
return this.check(int(params));
|
|
18482
|
+
},
|
|
18483
|
+
safe(params) {
|
|
18484
|
+
return this.check(int(params));
|
|
18485
|
+
},
|
|
18486
|
+
positive(params) {
|
|
18487
|
+
return this.check(_gt(0, params));
|
|
18488
|
+
},
|
|
18489
|
+
nonnegative(params) {
|
|
18490
|
+
return this.check(_gte(0, params));
|
|
18491
|
+
},
|
|
18492
|
+
negative(params) {
|
|
18493
|
+
return this.check(_lt(0, params));
|
|
18494
|
+
},
|
|
18495
|
+
nonpositive(params) {
|
|
18496
|
+
return this.check(_lte(0, params));
|
|
18497
|
+
},
|
|
18498
|
+
multipleOf(value, params) {
|
|
18499
|
+
return this.check(_multipleOf(value, params));
|
|
18500
|
+
},
|
|
18501
|
+
step(value, params) {
|
|
18502
|
+
return this.check(_multipleOf(value, params));
|
|
18503
|
+
},
|
|
18504
|
+
finite() {
|
|
18505
|
+
return this;
|
|
18506
|
+
}
|
|
18507
|
+
});
|
|
17847
18508
|
const bag = inst._zod.bag;
|
|
17848
18509
|
inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
17849
18510
|
inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
|
|
@@ -17990,11 +18651,23 @@ var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
|
|
|
17990
18651
|
ZodType.init(inst, def);
|
|
17991
18652
|
inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
|
|
17992
18653
|
inst.element = def.element;
|
|
17993
|
-
inst
|
|
17994
|
-
|
|
17995
|
-
|
|
17996
|
-
|
|
17997
|
-
|
|
18654
|
+
_installLazyMethods(inst, "ZodArray", {
|
|
18655
|
+
min(n, params) {
|
|
18656
|
+
return this.check(_minLength(n, params));
|
|
18657
|
+
},
|
|
18658
|
+
nonempty(params) {
|
|
18659
|
+
return this.check(_minLength(1, params));
|
|
18660
|
+
},
|
|
18661
|
+
max(n, params) {
|
|
18662
|
+
return this.check(_maxLength(n, params));
|
|
18663
|
+
},
|
|
18664
|
+
length(n, params) {
|
|
18665
|
+
return this.check(_length(n, params));
|
|
18666
|
+
},
|
|
18667
|
+
unwrap() {
|
|
18668
|
+
return this.element;
|
|
18669
|
+
}
|
|
18670
|
+
});
|
|
17998
18671
|
});
|
|
17999
18672
|
function array2(element, params) {
|
|
18000
18673
|
return _array(ZodArray, element, params);
|
|
@@ -18010,23 +18683,47 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
|
18010
18683
|
util_exports.defineLazy(inst, "shape", () => {
|
|
18011
18684
|
return def.shape;
|
|
18012
18685
|
});
|
|
18013
|
-
inst
|
|
18014
|
-
|
|
18015
|
-
|
|
18016
|
-
|
|
18017
|
-
|
|
18018
|
-
|
|
18019
|
-
|
|
18020
|
-
|
|
18021
|
-
|
|
18022
|
-
|
|
18023
|
-
|
|
18024
|
-
|
|
18025
|
-
|
|
18026
|
-
|
|
18027
|
-
|
|
18028
|
-
|
|
18029
|
-
|
|
18686
|
+
_installLazyMethods(inst, "ZodObject", {
|
|
18687
|
+
keyof() {
|
|
18688
|
+
return _enum2(Object.keys(this._zod.def.shape));
|
|
18689
|
+
},
|
|
18690
|
+
catchall(catchall) {
|
|
18691
|
+
return this.clone({ ...this._zod.def, catchall });
|
|
18692
|
+
},
|
|
18693
|
+
passthrough() {
|
|
18694
|
+
return this.clone({ ...this._zod.def, catchall: unknown2() });
|
|
18695
|
+
},
|
|
18696
|
+
loose() {
|
|
18697
|
+
return this.clone({ ...this._zod.def, catchall: unknown2() });
|
|
18698
|
+
},
|
|
18699
|
+
strict() {
|
|
18700
|
+
return this.clone({ ...this._zod.def, catchall: never() });
|
|
18701
|
+
},
|
|
18702
|
+
strip() {
|
|
18703
|
+
return this.clone({ ...this._zod.def, catchall: void 0 });
|
|
18704
|
+
},
|
|
18705
|
+
extend(incoming) {
|
|
18706
|
+
return util_exports.extend(this, incoming);
|
|
18707
|
+
},
|
|
18708
|
+
safeExtend(incoming) {
|
|
18709
|
+
return util_exports.safeExtend(this, incoming);
|
|
18710
|
+
},
|
|
18711
|
+
merge(other) {
|
|
18712
|
+
return util_exports.merge(this, other);
|
|
18713
|
+
},
|
|
18714
|
+
pick(mask) {
|
|
18715
|
+
return util_exports.pick(this, mask);
|
|
18716
|
+
},
|
|
18717
|
+
omit(mask) {
|
|
18718
|
+
return util_exports.omit(this, mask);
|
|
18719
|
+
},
|
|
18720
|
+
partial(...args) {
|
|
18721
|
+
return util_exports.partial(ZodOptional, this, args[0]);
|
|
18722
|
+
},
|
|
18723
|
+
required(...args) {
|
|
18724
|
+
return util_exports.required(ZodNonOptional, this, args[0]);
|
|
18725
|
+
}
|
|
18726
|
+
});
|
|
18030
18727
|
});
|
|
18031
18728
|
function object2(shape, params) {
|
|
18032
18729
|
const def = {
|
|
@@ -18131,6 +18828,14 @@ var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
|
|
|
18131
18828
|
inst.valueType = def.valueType;
|
|
18132
18829
|
});
|
|
18133
18830
|
function record2(keyType, valueType, params) {
|
|
18831
|
+
if (!valueType || !valueType._zod) {
|
|
18832
|
+
return new ZodRecord({
|
|
18833
|
+
type: "record",
|
|
18834
|
+
keyType: string3(),
|
|
18835
|
+
valueType: keyType,
|
|
18836
|
+
...util_exports.normalizeParams(valueType)
|
|
18837
|
+
});
|
|
18838
|
+
}
|
|
18134
18839
|
return new ZodRecord({
|
|
18135
18840
|
type: "record",
|
|
18136
18841
|
keyType,
|
|
@@ -18460,6 +19165,16 @@ function codec(in_, out, params) {
|
|
|
18460
19165
|
reverseTransform: params.encode
|
|
18461
19166
|
});
|
|
18462
19167
|
}
|
|
19168
|
+
function invertCodec(codec2) {
|
|
19169
|
+
const def = codec2._zod.def;
|
|
19170
|
+
return new ZodCodec({
|
|
19171
|
+
type: "pipe",
|
|
19172
|
+
in: def.out,
|
|
19173
|
+
out: def.in,
|
|
19174
|
+
transform: def.reverseTransform,
|
|
19175
|
+
reverseTransform: def.transform
|
|
19176
|
+
});
|
|
19177
|
+
}
|
|
18463
19178
|
var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
18464
19179
|
$ZodReadonly.init(inst, def);
|
|
18465
19180
|
ZodType.init(inst, def);
|
|
@@ -18539,8 +19254,8 @@ function custom(fn, _params) {
|
|
|
18539
19254
|
function refine(fn, _params = {}) {
|
|
18540
19255
|
return _refine(ZodCustom, fn, _params);
|
|
18541
19256
|
}
|
|
18542
|
-
function superRefine(fn) {
|
|
18543
|
-
return _superRefine(fn);
|
|
19257
|
+
function superRefine(fn, params) {
|
|
19258
|
+
return _superRefine(fn, params);
|
|
18544
19259
|
}
|
|
18545
19260
|
var describe2 = describe;
|
|
18546
19261
|
var meta2 = meta;
|
|
@@ -18999,12 +19714,6 @@ function convertBaseSchema(schema, ctx) {
|
|
|
18999
19714
|
default:
|
|
19000
19715
|
throw new Error(`Unsupported type: ${type}`);
|
|
19001
19716
|
}
|
|
19002
|
-
if (schema.description) {
|
|
19003
|
-
zodSchema = zodSchema.describe(schema.description);
|
|
19004
|
-
}
|
|
19005
|
-
if (schema.default !== void 0) {
|
|
19006
|
-
zodSchema = zodSchema.default(schema.default);
|
|
19007
|
-
}
|
|
19008
19717
|
return zodSchema;
|
|
19009
19718
|
}
|
|
19010
19719
|
function convertSchema(schema, ctx) {
|
|
@@ -19041,6 +19750,9 @@ function convertSchema(schema, ctx) {
|
|
|
19041
19750
|
if (schema.readOnly === true) {
|
|
19042
19751
|
baseSchema = z.readonly(baseSchema);
|
|
19043
19752
|
}
|
|
19753
|
+
if (schema.default !== void 0) {
|
|
19754
|
+
baseSchema = baseSchema.default(schema.default);
|
|
19755
|
+
}
|
|
19044
19756
|
const extraMeta = {};
|
|
19045
19757
|
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
19046
19758
|
for (const key of coreMetadataKeys) {
|
|
@@ -19062,23 +19774,32 @@ function convertSchema(schema, ctx) {
|
|
|
19062
19774
|
if (Object.keys(extraMeta).length > 0) {
|
|
19063
19775
|
ctx.registry.add(baseSchema, extraMeta);
|
|
19064
19776
|
}
|
|
19777
|
+
if (schema.description) {
|
|
19778
|
+
baseSchema = baseSchema.describe(schema.description);
|
|
19779
|
+
}
|
|
19065
19780
|
return baseSchema;
|
|
19066
19781
|
}
|
|
19067
19782
|
function fromJSONSchema(schema, params) {
|
|
19068
19783
|
if (typeof schema === "boolean") {
|
|
19069
19784
|
return schema ? z.any() : z.never();
|
|
19070
19785
|
}
|
|
19071
|
-
|
|
19072
|
-
|
|
19786
|
+
let normalized;
|
|
19787
|
+
try {
|
|
19788
|
+
normalized = JSON.parse(JSON.stringify(schema));
|
|
19789
|
+
} catch {
|
|
19790
|
+
throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
|
|
19791
|
+
}
|
|
19792
|
+
const version2 = detectVersion(normalized, params?.defaultTarget);
|
|
19793
|
+
const defs = normalized.$defs || normalized.definitions || {};
|
|
19073
19794
|
const ctx = {
|
|
19074
19795
|
version: version2,
|
|
19075
19796
|
defs,
|
|
19076
19797
|
refs: /* @__PURE__ */ new Map(),
|
|
19077
19798
|
processing: /* @__PURE__ */ new Set(),
|
|
19078
|
-
rootSchema:
|
|
19799
|
+
rootSchema: normalized,
|
|
19079
19800
|
registry: params?.registry ?? globalRegistry
|
|
19080
19801
|
};
|
|
19081
|
-
return convertSchema(
|
|
19802
|
+
return convertSchema(normalized, ctx);
|
|
19082
19803
|
}
|
|
19083
19804
|
|
|
19084
19805
|
// node_modules/zod/v4/classic/coerce.js
|
|
@@ -19372,8 +20093,8 @@ function generateMcpTools(config2) {
|
|
|
19372
20093
|
const tool = generateMcpTool({ method, path: `${defaultServerUrl}${path2}`, operation }, config2);
|
|
19373
20094
|
info(`Generated tool: ${tool.name} for ${method} ${path2}`);
|
|
19374
20095
|
tools.push(tool);
|
|
19375
|
-
} catch (
|
|
19376
|
-
err(`Failed to generate tool for ${method} ${path2}:`,
|
|
20096
|
+
} catch (error51) {
|
|
20097
|
+
err(`Failed to generate tool for ${method} ${path2}:`, error51);
|
|
19377
20098
|
}
|
|
19378
20099
|
}
|
|
19379
20100
|
}
|
|
@@ -19408,8 +20129,8 @@ function generateMcpTool(description, config2) {
|
|
|
19408
20129
|
},
|
|
19409
20130
|
body: "data" in params ? JSON.stringify(params.data, null, 2) : void 0
|
|
19410
20131
|
});
|
|
19411
|
-
} catch (
|
|
19412
|
-
err(`Failed to fetch ${url2}. Are you sure that the server is running?`,
|
|
20132
|
+
} catch (error51) {
|
|
20133
|
+
err(`Failed to fetch ${url2}. Are you sure that the server is running?`, error51);
|
|
19413
20134
|
return {
|
|
19414
20135
|
content: [
|
|
19415
20136
|
{
|
|
@@ -19439,8 +20160,8 @@ function generateMcpTool(description, config2) {
|
|
|
19439
20160
|
const text = await response.text();
|
|
19440
20161
|
return { content: [{ type: "text", text }] };
|
|
19441
20162
|
}
|
|
19442
|
-
} catch (
|
|
19443
|
-
return { content: [{ type: "text", text: String(
|
|
20163
|
+
} catch (error51) {
|
|
20164
|
+
return { content: [{ type: "text", text: String(error51) }], isError: true };
|
|
19444
20165
|
}
|
|
19445
20166
|
}
|
|
19446
20167
|
const inputSchema = {};
|
|
@@ -19520,8 +20241,8 @@ function read() {
|
|
|
19520
20241
|
try {
|
|
19521
20242
|
const data = readFileSync(STORAGE_PATH, { encoding: "utf8" });
|
|
19522
20243
|
return JSON.parse(data);
|
|
19523
|
-
} catch (
|
|
19524
|
-
err("Failed to read storage from file", STORAGE_PATH,
|
|
20244
|
+
} catch (error51) {
|
|
20245
|
+
err("Failed to read storage from file", STORAGE_PATH, error51);
|
|
19525
20246
|
return {};
|
|
19526
20247
|
}
|
|
19527
20248
|
}
|
|
@@ -19530,8 +20251,8 @@ function read() {
|
|
|
19530
20251
|
function write(newStorage) {
|
|
19531
20252
|
try {
|
|
19532
20253
|
writeFile(STORAGE_PATH, JSON.stringify(newStorage, null, 2));
|
|
19533
|
-
} catch (
|
|
19534
|
-
err(`Failed to write storage to file: ${STORAGE_PATH}`,
|
|
20254
|
+
} catch (error51) {
|
|
20255
|
+
err(`Failed to write storage to file: ${STORAGE_PATH}`, error51);
|
|
19535
20256
|
}
|
|
19536
20257
|
}
|
|
19537
20258
|
|
|
@@ -19559,8 +20280,8 @@ async function fetchOpenApiSpec(url2, secret) {
|
|
|
19559
20280
|
headers["Authorization"] = `Bearer ${secret}`;
|
|
19560
20281
|
}
|
|
19561
20282
|
response = await fetch(url2, { headers });
|
|
19562
|
-
} catch (
|
|
19563
|
-
err(`Failed to fetch OpenAPI spec from ${url2}. Are you sure that the server is running?`,
|
|
20283
|
+
} catch (error51) {
|
|
20284
|
+
err(`Failed to fetch OpenAPI spec from ${url2}. Are you sure that the server is running?`, error51);
|
|
19564
20285
|
return;
|
|
19565
20286
|
}
|
|
19566
20287
|
if (!response.ok) {
|