ccstatusline-zh 2.2.16 → 2.2.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -4
- package/dist/ccstatusline.js +1456 -493
- package/package.json +1 -1
package/dist/ccstatusline.js
CHANGED
|
@@ -38336,10 +38336,10 @@ function $constructor(name, initializer, params) {
|
|
|
38336
38336
|
}
|
|
38337
38337
|
Object.defineProperty(Definition, "name", { value: name });
|
|
38338
38338
|
function _(def) {
|
|
38339
|
-
var
|
|
38339
|
+
var _a2;
|
|
38340
38340
|
const inst = params?.Parent ? new Definition : this;
|
|
38341
38341
|
init(inst, def);
|
|
38342
|
-
(
|
|
38342
|
+
(_a2 = inst._zod).deferred ?? (_a2.deferred = []);
|
|
38343
38343
|
for (const fn of inst._zod.deferred) {
|
|
38344
38344
|
fn();
|
|
38345
38345
|
}
|
|
@@ -38361,9 +38361,9 @@ function config(newConfig) {
|
|
|
38361
38361
|
Object.assign(globalConfig, newConfig);
|
|
38362
38362
|
return globalConfig;
|
|
38363
38363
|
}
|
|
38364
|
-
var NEVER, $brand, $ZodAsyncError, $ZodEncodeError, globalConfig;
|
|
38364
|
+
var _a, NEVER, $brand, $ZodAsyncError, $ZodEncodeError, globalConfig;
|
|
38365
38365
|
var init_core = __esm(() => {
|
|
38366
|
-
NEVER = Object.freeze({
|
|
38366
|
+
NEVER = /* @__PURE__ */ Object.freeze({
|
|
38367
38367
|
status: "aborted"
|
|
38368
38368
|
});
|
|
38369
38369
|
$brand = Symbol("zod_brand");
|
|
@@ -38378,7 +38378,8 @@ var init_core = __esm(() => {
|
|
|
38378
38378
|
this.name = "ZodEncodeError";
|
|
38379
38379
|
}
|
|
38380
38380
|
};
|
|
38381
|
-
|
|
38381
|
+
(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
|
|
38382
|
+
globalConfig = globalThis.__zod_globalConfig;
|
|
38382
38383
|
});
|
|
38383
38384
|
|
|
38384
38385
|
// node_modules/zod/v4/core/util.js
|
|
@@ -38423,6 +38424,7 @@ __export(exports_util, {
|
|
|
38423
38424
|
floatSafeRemainder: () => floatSafeRemainder,
|
|
38424
38425
|
finalizeIssue: () => finalizeIssue,
|
|
38425
38426
|
extend: () => extend,
|
|
38427
|
+
explicitlyAborted: () => explicitlyAborted,
|
|
38426
38428
|
escapeRegex: () => escapeRegex,
|
|
38427
38429
|
esc: () => esc,
|
|
38428
38430
|
defineLazy: () => defineLazy,
|
|
@@ -38493,19 +38495,12 @@ function cleanRegex(source) {
|
|
|
38493
38495
|
return source.slice(start, end);
|
|
38494
38496
|
}
|
|
38495
38497
|
function floatSafeRemainder(val, step) {
|
|
38496
|
-
const
|
|
38497
|
-
const
|
|
38498
|
-
|
|
38499
|
-
if (
|
|
38500
|
-
|
|
38501
|
-
|
|
38502
|
-
stepDecCount = Number.parseInt(match[1]);
|
|
38503
|
-
}
|
|
38504
|
-
}
|
|
38505
|
-
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
38506
|
-
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
|
|
38507
|
-
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
|
38508
|
-
return valInt % stepInt / 10 ** decCount;
|
|
38498
|
+
const ratio = val / step;
|
|
38499
|
+
const roundedRatio = Math.round(ratio);
|
|
38500
|
+
const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
|
|
38501
|
+
if (Math.abs(ratio - roundedRatio) < tolerance)
|
|
38502
|
+
return 0;
|
|
38503
|
+
return ratio - roundedRatio;
|
|
38509
38504
|
}
|
|
38510
38505
|
function defineLazy(object, key, getter) {
|
|
38511
38506
|
let value = undefined;
|
|
@@ -38604,6 +38599,10 @@ function shallowClone(o) {
|
|
|
38604
38599
|
return { ...o };
|
|
38605
38600
|
if (Array.isArray(o))
|
|
38606
38601
|
return [...o];
|
|
38602
|
+
if (o instanceof Map)
|
|
38603
|
+
return new Map(o);
|
|
38604
|
+
if (o instanceof Set)
|
|
38605
|
+
return new Set(o);
|
|
38607
38606
|
return o;
|
|
38608
38607
|
}
|
|
38609
38608
|
function numKeys(data) {
|
|
@@ -38772,6 +38771,9 @@ function safeExtend(schema, shape) {
|
|
|
38772
38771
|
return clone2(schema, def);
|
|
38773
38772
|
}
|
|
38774
38773
|
function merge2(a, b) {
|
|
38774
|
+
if (a._zod.def.checks?.length) {
|
|
38775
|
+
throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
38776
|
+
}
|
|
38775
38777
|
const def = mergeDefs(a._zod.def, {
|
|
38776
38778
|
get shape() {
|
|
38777
38779
|
const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
|
|
@@ -38781,7 +38783,7 @@ function merge2(a, b) {
|
|
|
38781
38783
|
get catchall() {
|
|
38782
38784
|
return b._zod.def.catchall;
|
|
38783
38785
|
},
|
|
38784
|
-
checks: []
|
|
38786
|
+
checks: b._zod.def.checks ?? []
|
|
38785
38787
|
});
|
|
38786
38788
|
return clone2(a, def);
|
|
38787
38789
|
}
|
|
@@ -38864,10 +38866,20 @@ function aborted(x, startIndex = 0) {
|
|
|
38864
38866
|
}
|
|
38865
38867
|
return false;
|
|
38866
38868
|
}
|
|
38869
|
+
function explicitlyAborted(x, startIndex = 0) {
|
|
38870
|
+
if (x.aborted === true)
|
|
38871
|
+
return true;
|
|
38872
|
+
for (let i = startIndex;i < x.issues.length; i++) {
|
|
38873
|
+
if (x.issues[i]?.continue === false) {
|
|
38874
|
+
return true;
|
|
38875
|
+
}
|
|
38876
|
+
}
|
|
38877
|
+
return false;
|
|
38878
|
+
}
|
|
38867
38879
|
function prefixIssues(path, issues) {
|
|
38868
38880
|
return issues.map((iss) => {
|
|
38869
|
-
var
|
|
38870
|
-
(
|
|
38881
|
+
var _a2;
|
|
38882
|
+
(_a2 = iss).path ?? (_a2.path = []);
|
|
38871
38883
|
iss.path.unshift(path);
|
|
38872
38884
|
return iss;
|
|
38873
38885
|
});
|
|
@@ -38876,17 +38888,14 @@ function unwrapMessage(message) {
|
|
|
38876
38888
|
return typeof message === "string" ? message : message?.message;
|
|
38877
38889
|
}
|
|
38878
38890
|
function finalizeIssue(iss, ctx, config2) {
|
|
38879
|
-
const
|
|
38880
|
-
|
|
38881
|
-
|
|
38882
|
-
|
|
38883
|
-
|
|
38884
|
-
|
|
38885
|
-
delete full.continue;
|
|
38886
|
-
if (!ctx?.reportInput) {
|
|
38887
|
-
delete full.input;
|
|
38891
|
+
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";
|
|
38892
|
+
const { inst: _inst, continue: _continue, input: _input, ...rest2 } = iss;
|
|
38893
|
+
rest2.path ?? (rest2.path = []);
|
|
38894
|
+
rest2.message = message;
|
|
38895
|
+
if (ctx?.reportInput) {
|
|
38896
|
+
rest2.input = _input;
|
|
38888
38897
|
}
|
|
38889
|
-
return
|
|
38898
|
+
return rest2;
|
|
38890
38899
|
}
|
|
38891
38900
|
function getSizableOrigin(input) {
|
|
38892
38901
|
if (input instanceof Set)
|
|
@@ -39028,9 +39037,13 @@ var EVALUATING, captureStackTrace, allowsEval, getParsedType = (data) => {
|
|
|
39028
39037
|
}
|
|
39029
39038
|
}, propertyKeyTypes, primitiveTypes, NUMBER_FORMAT_RANGES, BIGINT_FORMAT_RANGES;
|
|
39030
39039
|
var init_util = __esm(() => {
|
|
39031
|
-
|
|
39040
|
+
init_core();
|
|
39041
|
+
EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
39032
39042
|
captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {};
|
|
39033
|
-
allowsEval = cached(() => {
|
|
39043
|
+
allowsEval = /* @__PURE__ */ cached(() => {
|
|
39044
|
+
if (globalConfig.jitless) {
|
|
39045
|
+
return false;
|
|
39046
|
+
}
|
|
39034
39047
|
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
|
|
39035
39048
|
return false;
|
|
39036
39049
|
}
|
|
@@ -39042,8 +39055,15 @@ var init_util = __esm(() => {
|
|
|
39042
39055
|
return false;
|
|
39043
39056
|
}
|
|
39044
39057
|
});
|
|
39045
|
-
propertyKeyTypes = new Set(["string", "number", "symbol"]);
|
|
39046
|
-
primitiveTypes = new Set([
|
|
39058
|
+
propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
39059
|
+
primitiveTypes = /* @__PURE__ */ new Set([
|
|
39060
|
+
"string",
|
|
39061
|
+
"number",
|
|
39062
|
+
"bigint",
|
|
39063
|
+
"boolean",
|
|
39064
|
+
"symbol",
|
|
39065
|
+
"undefined"
|
|
39066
|
+
]);
|
|
39047
39067
|
NUMBER_FORMAT_RANGES = {
|
|
39048
39068
|
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
39049
39069
|
int32: [-2147483648, 2147483647],
|
|
@@ -39073,30 +39093,33 @@ function flattenError(error, mapper = (issue2) => issue2.message) {
|
|
|
39073
39093
|
}
|
|
39074
39094
|
function formatError(error, mapper = (issue2) => issue2.message) {
|
|
39075
39095
|
const fieldErrors = { _errors: [] };
|
|
39076
|
-
const processError = (error2) => {
|
|
39096
|
+
const processError = (error2, path = []) => {
|
|
39077
39097
|
for (const issue2 of error2.issues) {
|
|
39078
39098
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
39079
|
-
issue2.errors.map((issues) => processError({ issues }));
|
|
39099
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
39080
39100
|
} else if (issue2.code === "invalid_key") {
|
|
39081
|
-
processError({ issues: issue2.issues });
|
|
39101
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
39082
39102
|
} else if (issue2.code === "invalid_element") {
|
|
39083
|
-
processError({ issues: issue2.issues });
|
|
39084
|
-
} else if (issue2.path.length === 0) {
|
|
39085
|
-
fieldErrors._errors.push(mapper(issue2));
|
|
39103
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
39086
39104
|
} else {
|
|
39087
|
-
|
|
39088
|
-
|
|
39089
|
-
|
|
39090
|
-
|
|
39091
|
-
|
|
39092
|
-
|
|
39093
|
-
|
|
39094
|
-
|
|
39095
|
-
|
|
39096
|
-
|
|
39105
|
+
const fullpath = [...path, ...issue2.path];
|
|
39106
|
+
if (fullpath.length === 0) {
|
|
39107
|
+
fieldErrors._errors.push(mapper(issue2));
|
|
39108
|
+
} else {
|
|
39109
|
+
let curr = fieldErrors;
|
|
39110
|
+
let i = 0;
|
|
39111
|
+
while (i < fullpath.length) {
|
|
39112
|
+
const el = fullpath[i];
|
|
39113
|
+
const terminal = i === fullpath.length - 1;
|
|
39114
|
+
if (!terminal) {
|
|
39115
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
39116
|
+
} else {
|
|
39117
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
39118
|
+
curr[el]._errors.push(mapper(issue2));
|
|
39119
|
+
}
|
|
39120
|
+
curr = curr[el];
|
|
39121
|
+
i++;
|
|
39097
39122
|
}
|
|
39098
|
-
curr = curr[el];
|
|
39099
|
-
i++;
|
|
39100
39123
|
}
|
|
39101
39124
|
}
|
|
39102
39125
|
}
|
|
@@ -39107,14 +39130,14 @@ function formatError(error, mapper = (issue2) => issue2.message) {
|
|
|
39107
39130
|
function treeifyError(error, mapper = (issue2) => issue2.message) {
|
|
39108
39131
|
const result2 = { errors: [] };
|
|
39109
39132
|
const processError = (error2, path = []) => {
|
|
39110
|
-
var
|
|
39133
|
+
var _a2, _b;
|
|
39111
39134
|
for (const issue2 of error2.issues) {
|
|
39112
39135
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
39113
|
-
issue2.errors.map((issues) => processError({ issues }, issue2.path));
|
|
39136
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
39114
39137
|
} else if (issue2.code === "invalid_key") {
|
|
39115
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
39138
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
39116
39139
|
} else if (issue2.code === "invalid_element") {
|
|
39117
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
39140
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
39118
39141
|
} else {
|
|
39119
39142
|
const fullpath = [...path, ...issue2.path];
|
|
39120
39143
|
if (fullpath.length === 0) {
|
|
@@ -39128,7 +39151,7 @@ function treeifyError(error, mapper = (issue2) => issue2.message) {
|
|
|
39128
39151
|
const terminal = i === fullpath.length - 1;
|
|
39129
39152
|
if (typeof el === "string") {
|
|
39130
39153
|
curr.properties ?? (curr.properties = {});
|
|
39131
|
-
(
|
|
39154
|
+
(_a2 = curr.properties)[el] ?? (_a2[el] = { errors: [] });
|
|
39132
39155
|
curr = curr.properties[el];
|
|
39133
39156
|
} else {
|
|
39134
39157
|
curr.items ?? (curr.items = []);
|
|
@@ -39200,7 +39223,7 @@ var init_errors = __esm(() => {
|
|
|
39200
39223
|
|
|
39201
39224
|
// node_modules/zod/v4/core/parse.js
|
|
39202
39225
|
var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
39203
|
-
const ctx = _ctx ?
|
|
39226
|
+
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
39204
39227
|
const result2 = schema._zod.run({ value, issues: [] }, ctx);
|
|
39205
39228
|
if (result2 instanceof Promise) {
|
|
39206
39229
|
throw new $ZodAsyncError;
|
|
@@ -39212,7 +39235,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
39212
39235
|
}
|
|
39213
39236
|
return result2.value;
|
|
39214
39237
|
}, parse, _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
39215
|
-
const ctx = _ctx ?
|
|
39238
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
39216
39239
|
let result2 = schema._zod.run({ value, issues: [] }, ctx);
|
|
39217
39240
|
if (result2 instanceof Promise)
|
|
39218
39241
|
result2 = await result2;
|
|
@@ -39233,7 +39256,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
39233
39256
|
error: new (_Err ?? $ZodError)(result2.issues.map((iss) => finalizeIssue(iss, ctx, config())))
|
|
39234
39257
|
} : { success: true, data: result2.value };
|
|
39235
39258
|
}, safeParse, _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
39236
|
-
const ctx = _ctx ?
|
|
39259
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
39237
39260
|
let result2 = schema._zod.run({ value, issues: [] }, ctx);
|
|
39238
39261
|
if (result2 instanceof Promise)
|
|
39239
39262
|
result2 = await result2;
|
|
@@ -39242,22 +39265,22 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
39242
39265
|
error: new _Err(result2.issues.map((iss) => finalizeIssue(iss, ctx, config())))
|
|
39243
39266
|
} : { success: true, data: result2.value };
|
|
39244
39267
|
}, safeParseAsync, _encode = (_Err) => (schema, value, _ctx) => {
|
|
39245
|
-
const ctx = _ctx ?
|
|
39268
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
39246
39269
|
return _parse(_Err)(schema, value, ctx);
|
|
39247
39270
|
}, encode, _decode = (_Err) => (schema, value, _ctx) => {
|
|
39248
39271
|
return _parse(_Err)(schema, value, _ctx);
|
|
39249
39272
|
}, decode, _encodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
39250
|
-
const ctx = _ctx ?
|
|
39273
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
39251
39274
|
return _parseAsync(_Err)(schema, value, ctx);
|
|
39252
39275
|
}, encodeAsync, _decodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
39253
39276
|
return _parseAsync(_Err)(schema, value, _ctx);
|
|
39254
39277
|
}, decodeAsync, _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
39255
|
-
const ctx = _ctx ?
|
|
39278
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
39256
39279
|
return _safeParse(_Err)(schema, value, ctx);
|
|
39257
39280
|
}, safeEncode, _safeDecode = (_Err) => (schema, value, _ctx) => {
|
|
39258
39281
|
return _safeParse(_Err)(schema, value, _ctx);
|
|
39259
39282
|
}, safeDecode, _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
39260
|
-
const ctx = _ctx ?
|
|
39283
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
39261
39284
|
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
39262
39285
|
}, safeEncodeAsync, _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
39263
39286
|
return _safeParseAsync(_Err)(schema, value, _ctx);
|
|
@@ -39320,6 +39343,7 @@ __export(exports_regexes, {
|
|
|
39320
39343
|
ipv4: () => ipv4,
|
|
39321
39344
|
integer: () => integer,
|
|
39322
39345
|
idnEmail: () => idnEmail,
|
|
39346
|
+
httpProtocol: () => httpProtocol,
|
|
39323
39347
|
html5Email: () => html5Email,
|
|
39324
39348
|
hostname: () => hostname,
|
|
39325
39349
|
hex: () => hex,
|
|
@@ -39376,13 +39400,13 @@ var cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uui
|
|
|
39376
39400
|
}, uuid4, uuid6, uuid7, email, html5Email, rfc5322Email, unicodeEmail, idnEmail, browserEmail, _emoji = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`, ipv4, ipv6, mac = (delimiter) => {
|
|
39377
39401
|
const escapedDelim = escapeRegex(delimiter ?? ":");
|
|
39378
39402
|
return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);
|
|
39379
|
-
}, cidrv4, cidrv6, base64, base64url, hostname, domain, e164, 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])))`, date, string = (params) => {
|
|
39403
|
+
}, cidrv4, cidrv6, base64, base64url, hostname, domain, httpProtocol, e164, 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])))`, date, string = (params) => {
|
|
39380
39404
|
const regex2 = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
|
|
39381
39405
|
return new RegExp(`^${regex2}$`);
|
|
39382
39406
|
}, bigint, integer, number, boolean, _null, _undefined, lowercase, uppercase, hex, md5_hex, md5_base64, md5_base64url, sha1_hex, sha1_base64, sha1_base64url, sha256_hex, sha256_base64, sha256_base64url, sha384_hex, sha384_base64, sha384_base64url, sha512_hex, sha512_base64, sha512_base64url;
|
|
39383
39407
|
var init_regexes = __esm(() => {
|
|
39384
39408
|
init_util();
|
|
39385
|
-
cuid = /^[cC][
|
|
39409
|
+
cuid = /^[cC][0-9a-z]{6,}$/;
|
|
39386
39410
|
cuid2 = /^[0-9a-z]+$/;
|
|
39387
39411
|
ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
39388
39412
|
xid = /^[0-9a-vA-V]{20}$/;
|
|
@@ -39408,6 +39432,7 @@ var init_regexes = __esm(() => {
|
|
|
39408
39432
|
base64url = /^[A-Za-z0-9_-]*$/;
|
|
39409
39433
|
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])?)*\.?$/;
|
|
39410
39434
|
domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
|
|
39435
|
+
httpProtocol = /^https?$/;
|
|
39411
39436
|
e164 = /^\+[1-9]\d{6,14}$/;
|
|
39412
39437
|
date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
39413
39438
|
bigint = /^-?\d+n?$/;
|
|
@@ -39448,10 +39473,10 @@ var init_checks = __esm(() => {
|
|
|
39448
39473
|
init_regexes();
|
|
39449
39474
|
init_util();
|
|
39450
39475
|
$ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
39451
|
-
var
|
|
39476
|
+
var _a2;
|
|
39452
39477
|
inst._zod ?? (inst._zod = {});
|
|
39453
39478
|
inst._zod.def = def;
|
|
39454
|
-
(
|
|
39479
|
+
(_a2 = inst._zod).onattach ?? (_a2.onattach = []);
|
|
39455
39480
|
});
|
|
39456
39481
|
numericOriginMap = {
|
|
39457
39482
|
number: "number",
|
|
@@ -39517,8 +39542,8 @@ var init_checks = __esm(() => {
|
|
|
39517
39542
|
$ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
39518
39543
|
$ZodCheck.init(inst, def);
|
|
39519
39544
|
inst._zod.onattach.push((inst2) => {
|
|
39520
|
-
var
|
|
39521
|
-
(
|
|
39545
|
+
var _a2;
|
|
39546
|
+
(_a2 = inst2._zod.bag).multipleOf ?? (_a2.multipleOf = def.value);
|
|
39522
39547
|
});
|
|
39523
39548
|
inst._zod.check = (payload) => {
|
|
39524
39549
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -39651,9 +39676,9 @@ var init_checks = __esm(() => {
|
|
|
39651
39676
|
};
|
|
39652
39677
|
});
|
|
39653
39678
|
$ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
39654
|
-
var
|
|
39679
|
+
var _a2;
|
|
39655
39680
|
$ZodCheck.init(inst, def);
|
|
39656
|
-
(
|
|
39681
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
39657
39682
|
const val = payload.value;
|
|
39658
39683
|
return !nullish(val) && val.size !== undefined;
|
|
39659
39684
|
});
|
|
@@ -39679,9 +39704,9 @@ var init_checks = __esm(() => {
|
|
|
39679
39704
|
};
|
|
39680
39705
|
});
|
|
39681
39706
|
$ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
39682
|
-
var
|
|
39707
|
+
var _a2;
|
|
39683
39708
|
$ZodCheck.init(inst, def);
|
|
39684
|
-
(
|
|
39709
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
39685
39710
|
const val = payload.value;
|
|
39686
39711
|
return !nullish(val) && val.size !== undefined;
|
|
39687
39712
|
});
|
|
@@ -39707,9 +39732,9 @@ var init_checks = __esm(() => {
|
|
|
39707
39732
|
};
|
|
39708
39733
|
});
|
|
39709
39734
|
$ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
39710
|
-
var
|
|
39735
|
+
var _a2;
|
|
39711
39736
|
$ZodCheck.init(inst, def);
|
|
39712
|
-
(
|
|
39737
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
39713
39738
|
const val = payload.value;
|
|
39714
39739
|
return !nullish(val) && val.size !== undefined;
|
|
39715
39740
|
});
|
|
@@ -39737,9 +39762,9 @@ var init_checks = __esm(() => {
|
|
|
39737
39762
|
};
|
|
39738
39763
|
});
|
|
39739
39764
|
$ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
39740
|
-
var
|
|
39765
|
+
var _a2;
|
|
39741
39766
|
$ZodCheck.init(inst, def);
|
|
39742
|
-
(
|
|
39767
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
39743
39768
|
const val = payload.value;
|
|
39744
39769
|
return !nullish(val) && val.length !== undefined;
|
|
39745
39770
|
});
|
|
@@ -39766,9 +39791,9 @@ var init_checks = __esm(() => {
|
|
|
39766
39791
|
};
|
|
39767
39792
|
});
|
|
39768
39793
|
$ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
39769
|
-
var
|
|
39794
|
+
var _a2;
|
|
39770
39795
|
$ZodCheck.init(inst, def);
|
|
39771
|
-
(
|
|
39796
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
39772
39797
|
const val = payload.value;
|
|
39773
39798
|
return !nullish(val) && val.length !== undefined;
|
|
39774
39799
|
});
|
|
@@ -39795,9 +39820,9 @@ var init_checks = __esm(() => {
|
|
|
39795
39820
|
};
|
|
39796
39821
|
});
|
|
39797
39822
|
$ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
39798
|
-
var
|
|
39823
|
+
var _a2;
|
|
39799
39824
|
$ZodCheck.init(inst, def);
|
|
39800
|
-
(
|
|
39825
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
39801
39826
|
const val = payload.value;
|
|
39802
39827
|
return !nullish(val) && val.length !== undefined;
|
|
39803
39828
|
});
|
|
@@ -39826,7 +39851,7 @@ var init_checks = __esm(() => {
|
|
|
39826
39851
|
};
|
|
39827
39852
|
});
|
|
39828
39853
|
$ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
39829
|
-
var
|
|
39854
|
+
var _a2, _b;
|
|
39830
39855
|
$ZodCheck.init(inst, def);
|
|
39831
39856
|
inst._zod.onattach.push((inst2) => {
|
|
39832
39857
|
const bag = inst2._zod.bag;
|
|
@@ -39837,7 +39862,7 @@ var init_checks = __esm(() => {
|
|
|
39837
39862
|
}
|
|
39838
39863
|
});
|
|
39839
39864
|
if (def.pattern)
|
|
39840
|
-
(
|
|
39865
|
+
(_a2 = inst._zod).check ?? (_a2.check = (payload) => {
|
|
39841
39866
|
def.pattern.lastIndex = 0;
|
|
39842
39867
|
if (def.pattern.test(payload.value))
|
|
39843
39868
|
return;
|
|
@@ -40032,8 +40057,8 @@ var version;
|
|
|
40032
40057
|
var init_versions = __esm(() => {
|
|
40033
40058
|
version = {
|
|
40034
40059
|
major: 4,
|
|
40035
|
-
minor:
|
|
40036
|
-
patch:
|
|
40060
|
+
minor: 4,
|
|
40061
|
+
patch: 3
|
|
40037
40062
|
};
|
|
40038
40063
|
});
|
|
40039
40064
|
|
|
@@ -40041,6 +40066,8 @@ var init_versions = __esm(() => {
|
|
|
40041
40066
|
function isValidBase64(data) {
|
|
40042
40067
|
if (data === "")
|
|
40043
40068
|
return true;
|
|
40069
|
+
if (/\s/.test(data))
|
|
40070
|
+
return false;
|
|
40044
40071
|
if (data.length % 4 !== 0)
|
|
40045
40072
|
return false;
|
|
40046
40073
|
try {
|
|
@@ -40083,15 +40110,27 @@ function handleArrayResult(result2, final, index) {
|
|
|
40083
40110
|
}
|
|
40084
40111
|
final.value[index] = result2.value;
|
|
40085
40112
|
}
|
|
40086
|
-
function handlePropertyResult(result2, final, key, input, isOptionalOut) {
|
|
40113
|
+
function handlePropertyResult(result2, final, key, input, isOptionalIn, isOptionalOut) {
|
|
40114
|
+
const isPresent = key in input;
|
|
40087
40115
|
if (result2.issues.length) {
|
|
40088
|
-
if (isOptionalOut && !
|
|
40116
|
+
if (isOptionalIn && isOptionalOut && !isPresent) {
|
|
40089
40117
|
return;
|
|
40090
40118
|
}
|
|
40091
40119
|
final.issues.push(...prefixIssues(key, result2.issues));
|
|
40092
40120
|
}
|
|
40121
|
+
if (!isPresent && !isOptionalIn) {
|
|
40122
|
+
if (!result2.issues.length) {
|
|
40123
|
+
final.issues.push({
|
|
40124
|
+
code: "invalid_type",
|
|
40125
|
+
expected: "nonoptional",
|
|
40126
|
+
input: undefined,
|
|
40127
|
+
path: [key]
|
|
40128
|
+
});
|
|
40129
|
+
}
|
|
40130
|
+
return;
|
|
40131
|
+
}
|
|
40093
40132
|
if (result2.value === undefined) {
|
|
40094
|
-
if (
|
|
40133
|
+
if (isPresent) {
|
|
40095
40134
|
final.value[key] = undefined;
|
|
40096
40135
|
}
|
|
40097
40136
|
} else {
|
|
@@ -40119,8 +40158,11 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
40119
40158
|
const keySet = def.keySet;
|
|
40120
40159
|
const _catchall = def.catchall._zod;
|
|
40121
40160
|
const t = _catchall.def.type;
|
|
40161
|
+
const isOptionalIn = _catchall.optin === "optional";
|
|
40122
40162
|
const isOptionalOut = _catchall.optout === "optional";
|
|
40123
40163
|
for (const key in input) {
|
|
40164
|
+
if (key === "__proto__")
|
|
40165
|
+
continue;
|
|
40124
40166
|
if (keySet.has(key))
|
|
40125
40167
|
continue;
|
|
40126
40168
|
if (t === "never") {
|
|
@@ -40129,9 +40171,9 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
40129
40171
|
}
|
|
40130
40172
|
const r = _catchall.run({ value: input[key], issues: [] }, ctx);
|
|
40131
40173
|
if (r instanceof Promise) {
|
|
40132
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
40174
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
40133
40175
|
} else {
|
|
40134
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
40176
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
40135
40177
|
}
|
|
40136
40178
|
}
|
|
40137
40179
|
if (unrecognized.length) {
|
|
@@ -40275,12 +40317,41 @@ function handleIntersectionResults(result2, left, right) {
|
|
|
40275
40317
|
result2.value = merged.data;
|
|
40276
40318
|
return result2;
|
|
40277
40319
|
}
|
|
40320
|
+
function getTupleOptStart(items, key) {
|
|
40321
|
+
for (let i = items.length - 1;i >= 0; i--) {
|
|
40322
|
+
if (items[i]._zod[key] !== "optional")
|
|
40323
|
+
return i + 1;
|
|
40324
|
+
}
|
|
40325
|
+
return 0;
|
|
40326
|
+
}
|
|
40278
40327
|
function handleTupleResult(result2, final, index) {
|
|
40279
40328
|
if (result2.issues.length) {
|
|
40280
40329
|
final.issues.push(...prefixIssues(index, result2.issues));
|
|
40281
40330
|
}
|
|
40282
40331
|
final.value[index] = result2.value;
|
|
40283
40332
|
}
|
|
40333
|
+
function handleTupleResults(itemResults, final, items, input, optoutStart) {
|
|
40334
|
+
for (let i = 0;i < items.length; i++) {
|
|
40335
|
+
const r = itemResults[i];
|
|
40336
|
+
const isPresent = i < input.length;
|
|
40337
|
+
if (r.issues.length) {
|
|
40338
|
+
if (!isPresent && i >= optoutStart) {
|
|
40339
|
+
final.value.length = i;
|
|
40340
|
+
break;
|
|
40341
|
+
}
|
|
40342
|
+
final.issues.push(...prefixIssues(i, r.issues));
|
|
40343
|
+
}
|
|
40344
|
+
final.value[i] = r.value;
|
|
40345
|
+
}
|
|
40346
|
+
for (let i = final.value.length - 1;i >= input.length; i--) {
|
|
40347
|
+
if (items[i]._zod.optout === "optional" && final.value[i] === undefined) {
|
|
40348
|
+
final.value.length = i;
|
|
40349
|
+
} else {
|
|
40350
|
+
break;
|
|
40351
|
+
}
|
|
40352
|
+
}
|
|
40353
|
+
return final;
|
|
40354
|
+
}
|
|
40284
40355
|
function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
|
|
40285
40356
|
if (keyResult.issues.length) {
|
|
40286
40357
|
if (propertyKeyTypes.has(typeof key)) {
|
|
@@ -40318,7 +40389,7 @@ function handleSetResult(result2, final) {
|
|
|
40318
40389
|
final.value.add(result2.value);
|
|
40319
40390
|
}
|
|
40320
40391
|
function handleOptionalResult(result2, input) {
|
|
40321
|
-
if (result2.issues.length
|
|
40392
|
+
if (input === undefined && (result2.issues.length || result2.fallback)) {
|
|
40322
40393
|
return { issues: [], value: undefined };
|
|
40323
40394
|
}
|
|
40324
40395
|
return result2;
|
|
@@ -40345,7 +40416,7 @@ function handlePipeResult(left, next, ctx) {
|
|
|
40345
40416
|
left.aborted = true;
|
|
40346
40417
|
return left;
|
|
40347
40418
|
}
|
|
40348
|
-
return next._zod.run({ value: left.value, issues: left.issues }, ctx);
|
|
40419
|
+
return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
|
|
40349
40420
|
}
|
|
40350
40421
|
function handleCodecAResult(result2, def, ctx) {
|
|
40351
40422
|
if (result2.issues.length) {
|
|
@@ -40392,7 +40463,7 @@ function handleRefineResult(result2, payload, input, inst) {
|
|
|
40392
40463
|
payload.issues.push(issue(_iss));
|
|
40393
40464
|
}
|
|
40394
40465
|
}
|
|
40395
|
-
var $ZodType, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, $ZodIPv6, $ZodMAC, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodCustomStringFormat, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodBigIntFormat, $ZodSymbol, $ZodUndefined, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodVoid, $ZodDate, $ZodArray, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodXor, $ZodDiscriminatedUnion, $ZodIntersection, $ZodTuple, $ZodRecord, $ZodMap, $ZodSet, $ZodEnum, $ZodLiteral, $ZodFile, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodSuccess, $ZodCatch, $ZodNaN, $ZodPipe, $ZodCodec, $ZodReadonly, $ZodTemplateLiteral, $ZodFunction, $ZodPromise, $ZodLazy, $ZodCustom;
|
|
40466
|
+
var $ZodType, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, $ZodIPv6, $ZodMAC, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodCustomStringFormat, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodBigIntFormat, $ZodSymbol, $ZodUndefined, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodVoid, $ZodDate, $ZodArray, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodXor, $ZodDiscriminatedUnion, $ZodIntersection, $ZodTuple, $ZodRecord, $ZodMap, $ZodSet, $ZodEnum, $ZodLiteral, $ZodFile, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodSuccess, $ZodCatch, $ZodNaN, $ZodPipe, $ZodCodec, $ZodPreprocess, $ZodReadonly, $ZodTemplateLiteral, $ZodFunction, $ZodPromise, $ZodLazy, $ZodCustom;
|
|
40396
40467
|
var init_schemas = __esm(() => {
|
|
40397
40468
|
init_checks();
|
|
40398
40469
|
init_core();
|
|
@@ -40402,7 +40473,7 @@ var init_schemas = __esm(() => {
|
|
|
40402
40473
|
init_versions();
|
|
40403
40474
|
init_util();
|
|
40404
40475
|
$ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
40405
|
-
var
|
|
40476
|
+
var _a2;
|
|
40406
40477
|
inst ?? (inst = {});
|
|
40407
40478
|
inst._zod.def = def;
|
|
40408
40479
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -40417,7 +40488,7 @@ var init_schemas = __esm(() => {
|
|
|
40417
40488
|
}
|
|
40418
40489
|
}
|
|
40419
40490
|
if (checks.length === 0) {
|
|
40420
|
-
(
|
|
40491
|
+
(_a2 = inst._zod).deferred ?? (_a2.deferred = []);
|
|
40421
40492
|
inst._zod.deferred?.push(() => {
|
|
40422
40493
|
inst._zod.run = inst._zod.parse;
|
|
40423
40494
|
});
|
|
@@ -40427,6 +40498,8 @@ var init_schemas = __esm(() => {
|
|
|
40427
40498
|
let asyncResult;
|
|
40428
40499
|
for (const ch of checks2) {
|
|
40429
40500
|
if (ch._zod.def.when) {
|
|
40501
|
+
if (explicitlyAborted(payload))
|
|
40502
|
+
continue;
|
|
40430
40503
|
const shouldRun = ch._zod.def.when(payload);
|
|
40431
40504
|
if (!shouldRun)
|
|
40432
40505
|
continue;
|
|
@@ -40566,6 +40639,19 @@ var init_schemas = __esm(() => {
|
|
|
40566
40639
|
inst._zod.check = (payload) => {
|
|
40567
40640
|
try {
|
|
40568
40641
|
const trimmed = payload.value.trim();
|
|
40642
|
+
if (!def.normalize && def.protocol?.source === httpProtocol.source) {
|
|
40643
|
+
if (!/^https?:\/\//i.test(trimmed)) {
|
|
40644
|
+
payload.issues.push({
|
|
40645
|
+
code: "invalid_format",
|
|
40646
|
+
format: "url",
|
|
40647
|
+
note: "Invalid URL format",
|
|
40648
|
+
input: payload.value,
|
|
40649
|
+
inst,
|
|
40650
|
+
continue: !def.abort
|
|
40651
|
+
});
|
|
40652
|
+
return;
|
|
40653
|
+
}
|
|
40654
|
+
}
|
|
40569
40655
|
const url = new URL(trimmed);
|
|
40570
40656
|
if (def.hostname) {
|
|
40571
40657
|
def.hostname.lastIndex = 0;
|
|
@@ -40869,8 +40955,6 @@ var init_schemas = __esm(() => {
|
|
|
40869
40955
|
$ZodType.init(inst, def);
|
|
40870
40956
|
inst._zod.pattern = _undefined;
|
|
40871
40957
|
inst._zod.values = new Set([undefined]);
|
|
40872
|
-
inst._zod.optin = "optional";
|
|
40873
|
-
inst._zod.optout = "optional";
|
|
40874
40958
|
inst._zod.parse = (payload, _ctx) => {
|
|
40875
40959
|
const input = payload.value;
|
|
40876
40960
|
if (typeof input === "undefined")
|
|
@@ -41041,12 +41125,13 @@ var init_schemas = __esm(() => {
|
|
|
41041
41125
|
const shape = value.shape;
|
|
41042
41126
|
for (const key of value.keys) {
|
|
41043
41127
|
const el = shape[key];
|
|
41128
|
+
const isOptionalIn = el._zod.optin === "optional";
|
|
41044
41129
|
const isOptionalOut = el._zod.optout === "optional";
|
|
41045
41130
|
const r = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
41046
41131
|
if (r instanceof Promise) {
|
|
41047
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
41132
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
41048
41133
|
} else {
|
|
41049
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
41134
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
41050
41135
|
}
|
|
41051
41136
|
}
|
|
41052
41137
|
if (!catchall) {
|
|
@@ -41077,9 +41162,10 @@ var init_schemas = __esm(() => {
|
|
|
41077
41162
|
const id = ids[key];
|
|
41078
41163
|
const k = esc(key);
|
|
41079
41164
|
const schema = shape[key];
|
|
41165
|
+
const isOptionalIn = schema?._zod?.optin === "optional";
|
|
41080
41166
|
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
41081
41167
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
41082
|
-
if (isOptionalOut) {
|
|
41168
|
+
if (isOptionalIn && isOptionalOut) {
|
|
41083
41169
|
doc.write(`
|
|
41084
41170
|
if (${id}.issues.length) {
|
|
41085
41171
|
if (${k} in input) {
|
|
@@ -41098,6 +41184,33 @@ var init_schemas = __esm(() => {
|
|
|
41098
41184
|
newResult[${k}] = ${id}.value;
|
|
41099
41185
|
}
|
|
41100
41186
|
|
|
41187
|
+
`);
|
|
41188
|
+
} else if (!isOptionalIn) {
|
|
41189
|
+
doc.write(`
|
|
41190
|
+
const ${id}_present = ${k} in input;
|
|
41191
|
+
if (${id}.issues.length) {
|
|
41192
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
41193
|
+
...iss,
|
|
41194
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
41195
|
+
})));
|
|
41196
|
+
}
|
|
41197
|
+
if (!${id}_present && !${id}.issues.length) {
|
|
41198
|
+
payload.issues.push({
|
|
41199
|
+
code: "invalid_type",
|
|
41200
|
+
expected: "nonoptional",
|
|
41201
|
+
input: undefined,
|
|
41202
|
+
path: [${k}]
|
|
41203
|
+
});
|
|
41204
|
+
}
|
|
41205
|
+
|
|
41206
|
+
if (${id}_present) {
|
|
41207
|
+
if (${id}.value === undefined) {
|
|
41208
|
+
newResult[${k}] = undefined;
|
|
41209
|
+
} else {
|
|
41210
|
+
newResult[${k}] = ${id}.value;
|
|
41211
|
+
}
|
|
41212
|
+
}
|
|
41213
|
+
|
|
41101
41214
|
`);
|
|
41102
41215
|
} else {
|
|
41103
41216
|
doc.write(`
|
|
@@ -41171,10 +41284,9 @@ var init_schemas = __esm(() => {
|
|
|
41171
41284
|
}
|
|
41172
41285
|
return;
|
|
41173
41286
|
});
|
|
41174
|
-
const
|
|
41175
|
-
const first = def.options[0]._zod.run;
|
|
41287
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
41176
41288
|
inst._zod.parse = (payload, ctx) => {
|
|
41177
|
-
if (
|
|
41289
|
+
if (first) {
|
|
41178
41290
|
return first(payload, ctx);
|
|
41179
41291
|
}
|
|
41180
41292
|
let async = false;
|
|
@@ -41203,10 +41315,9 @@ var init_schemas = __esm(() => {
|
|
|
41203
41315
|
$ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
|
|
41204
41316
|
$ZodUnion.init(inst, def);
|
|
41205
41317
|
def.inclusive = false;
|
|
41206
|
-
const
|
|
41207
|
-
const first = def.options[0]._zod.run;
|
|
41318
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
41208
41319
|
inst._zod.parse = (payload, ctx) => {
|
|
41209
|
-
if (
|
|
41320
|
+
if (first) {
|
|
41210
41321
|
return first(payload, ctx);
|
|
41211
41322
|
}
|
|
41212
41323
|
let async = false;
|
|
@@ -41281,7 +41392,7 @@ var init_schemas = __esm(() => {
|
|
|
41281
41392
|
if (opt) {
|
|
41282
41393
|
return opt._zod.run(payload, ctx);
|
|
41283
41394
|
}
|
|
41284
|
-
if (def.unionFallback) {
|
|
41395
|
+
if (def.unionFallback || ctx.direction === "backward") {
|
|
41285
41396
|
return _super(payload, ctx);
|
|
41286
41397
|
}
|
|
41287
41398
|
payload.issues.push({
|
|
@@ -41289,6 +41400,7 @@ var init_schemas = __esm(() => {
|
|
|
41289
41400
|
errors: [],
|
|
41290
41401
|
note: "No matching discriminator",
|
|
41291
41402
|
discriminator: def.discriminator,
|
|
41403
|
+
options: Array.from(disc.value.keys()),
|
|
41292
41404
|
input,
|
|
41293
41405
|
path: [def.discriminator],
|
|
41294
41406
|
inst
|
|
@@ -41327,56 +41439,59 @@ var init_schemas = __esm(() => {
|
|
|
41327
41439
|
}
|
|
41328
41440
|
payload.value = [];
|
|
41329
41441
|
const proms = [];
|
|
41330
|
-
const
|
|
41331
|
-
const
|
|
41442
|
+
const optinStart = getTupleOptStart(items, "optin");
|
|
41443
|
+
const optoutStart = getTupleOptStart(items, "optout");
|
|
41332
41444
|
if (!def.rest) {
|
|
41333
|
-
|
|
41334
|
-
const tooSmall = input.length < optStart - 1;
|
|
41335
|
-
if (tooBig || tooSmall) {
|
|
41445
|
+
if (input.length < optinStart) {
|
|
41336
41446
|
payload.issues.push({
|
|
41337
|
-
|
|
41447
|
+
code: "too_small",
|
|
41448
|
+
minimum: optinStart,
|
|
41449
|
+
inclusive: true,
|
|
41338
41450
|
input,
|
|
41339
41451
|
inst,
|
|
41340
41452
|
origin: "array"
|
|
41341
41453
|
});
|
|
41342
41454
|
return payload;
|
|
41343
41455
|
}
|
|
41344
|
-
|
|
41345
|
-
|
|
41346
|
-
|
|
41347
|
-
|
|
41348
|
-
|
|
41349
|
-
|
|
41350
|
-
|
|
41456
|
+
if (input.length > items.length) {
|
|
41457
|
+
payload.issues.push({
|
|
41458
|
+
code: "too_big",
|
|
41459
|
+
maximum: items.length,
|
|
41460
|
+
inclusive: true,
|
|
41461
|
+
input,
|
|
41462
|
+
inst,
|
|
41463
|
+
origin: "array"
|
|
41464
|
+
});
|
|
41351
41465
|
}
|
|
41352
|
-
|
|
41353
|
-
|
|
41354
|
-
|
|
41355
|
-
}, ctx);
|
|
41356
|
-
if (
|
|
41357
|
-
proms.push(
|
|
41466
|
+
}
|
|
41467
|
+
const itemResults = new Array(items.length);
|
|
41468
|
+
for (let i = 0;i < items.length; i++) {
|
|
41469
|
+
const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
|
|
41470
|
+
if (r instanceof Promise) {
|
|
41471
|
+
proms.push(r.then((rr) => {
|
|
41472
|
+
itemResults[i] = rr;
|
|
41473
|
+
}));
|
|
41358
41474
|
} else {
|
|
41359
|
-
|
|
41475
|
+
itemResults[i] = r;
|
|
41360
41476
|
}
|
|
41361
41477
|
}
|
|
41362
41478
|
if (def.rest) {
|
|
41479
|
+
let i = items.length - 1;
|
|
41363
41480
|
const rest2 = input.slice(items.length);
|
|
41364
41481
|
for (const el of rest2) {
|
|
41365
41482
|
i++;
|
|
41366
|
-
const result2 = def.rest._zod.run({
|
|
41367
|
-
value: el,
|
|
41368
|
-
issues: []
|
|
41369
|
-
}, ctx);
|
|
41483
|
+
const result2 = def.rest._zod.run({ value: el, issues: [] }, ctx);
|
|
41370
41484
|
if (result2 instanceof Promise) {
|
|
41371
|
-
proms.push(result2.then((
|
|
41485
|
+
proms.push(result2.then((r) => handleTupleResult(r, payload, i)));
|
|
41372
41486
|
} else {
|
|
41373
41487
|
handleTupleResult(result2, payload, i);
|
|
41374
41488
|
}
|
|
41375
41489
|
}
|
|
41376
41490
|
}
|
|
41377
|
-
if (proms.length)
|
|
41378
|
-
return Promise.all(proms).then(() => payload);
|
|
41379
|
-
|
|
41491
|
+
if (proms.length) {
|
|
41492
|
+
return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
|
|
41493
|
+
}
|
|
41494
|
+
return handleTupleResults(itemResults, payload, items, input, optoutStart);
|
|
41380
41495
|
};
|
|
41381
41496
|
});
|
|
41382
41497
|
$ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
@@ -41400,19 +41515,35 @@ var init_schemas = __esm(() => {
|
|
|
41400
41515
|
for (const key of values2) {
|
|
41401
41516
|
if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
41402
41517
|
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
41518
|
+
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
41519
|
+
if (keyResult instanceof Promise) {
|
|
41520
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
41521
|
+
}
|
|
41522
|
+
if (keyResult.issues.length) {
|
|
41523
|
+
payload.issues.push({
|
|
41524
|
+
code: "invalid_key",
|
|
41525
|
+
origin: "record",
|
|
41526
|
+
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
41527
|
+
input: key,
|
|
41528
|
+
path: [key],
|
|
41529
|
+
inst
|
|
41530
|
+
});
|
|
41531
|
+
continue;
|
|
41532
|
+
}
|
|
41533
|
+
const outKey = keyResult.value;
|
|
41403
41534
|
const result2 = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
|
|
41404
41535
|
if (result2 instanceof Promise) {
|
|
41405
41536
|
proms.push(result2.then((result3) => {
|
|
41406
41537
|
if (result3.issues.length) {
|
|
41407
41538
|
payload.issues.push(...prefixIssues(key, result3.issues));
|
|
41408
41539
|
}
|
|
41409
|
-
payload.value[
|
|
41540
|
+
payload.value[outKey] = result3.value;
|
|
41410
41541
|
}));
|
|
41411
41542
|
} else {
|
|
41412
41543
|
if (result2.issues.length) {
|
|
41413
41544
|
payload.issues.push(...prefixIssues(key, result2.issues));
|
|
41414
41545
|
}
|
|
41415
|
-
payload.value[
|
|
41546
|
+
payload.value[outKey] = result2.value;
|
|
41416
41547
|
}
|
|
41417
41548
|
}
|
|
41418
41549
|
}
|
|
@@ -41436,6 +41567,8 @@ var init_schemas = __esm(() => {
|
|
|
41436
41567
|
for (const key of Reflect.ownKeys(input)) {
|
|
41437
41568
|
if (key === "__proto__")
|
|
41438
41569
|
continue;
|
|
41570
|
+
if (!Object.prototype.propertyIsEnumerable.call(input, key))
|
|
41571
|
+
continue;
|
|
41439
41572
|
let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
41440
41573
|
if (keyResult instanceof Promise) {
|
|
41441
41574
|
throw new Error("Async schemas not supported in object keys currently");
|
|
@@ -41604,6 +41737,7 @@ var init_schemas = __esm(() => {
|
|
|
41604
41737
|
});
|
|
41605
41738
|
$ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
|
|
41606
41739
|
$ZodType.init(inst, def);
|
|
41740
|
+
inst._zod.optin = "optional";
|
|
41607
41741
|
inst._zod.parse = (payload, ctx) => {
|
|
41608
41742
|
if (ctx.direction === "backward") {
|
|
41609
41743
|
throw new $ZodEncodeError(inst.constructor.name);
|
|
@@ -41613,6 +41747,7 @@ var init_schemas = __esm(() => {
|
|
|
41613
41747
|
const output = _out instanceof Promise ? _out : Promise.resolve(_out);
|
|
41614
41748
|
return output.then((output2) => {
|
|
41615
41749
|
payload.value = output2;
|
|
41750
|
+
payload.fallback = true;
|
|
41616
41751
|
return payload;
|
|
41617
41752
|
});
|
|
41618
41753
|
}
|
|
@@ -41620,6 +41755,7 @@ var init_schemas = __esm(() => {
|
|
|
41620
41755
|
throw new $ZodAsyncError;
|
|
41621
41756
|
}
|
|
41622
41757
|
payload.value = _out;
|
|
41758
|
+
payload.fallback = true;
|
|
41623
41759
|
return payload;
|
|
41624
41760
|
};
|
|
41625
41761
|
});
|
|
@@ -41636,10 +41772,11 @@ var init_schemas = __esm(() => {
|
|
|
41636
41772
|
});
|
|
41637
41773
|
inst._zod.parse = (payload, ctx) => {
|
|
41638
41774
|
if (def.innerType._zod.optin === "optional") {
|
|
41775
|
+
const input = payload.value;
|
|
41639
41776
|
const result2 = def.innerType._zod.run(payload, ctx);
|
|
41640
41777
|
if (result2 instanceof Promise)
|
|
41641
|
-
return result2.then((r) => handleOptionalResult(r,
|
|
41642
|
-
return handleOptionalResult(result2,
|
|
41778
|
+
return result2.then((r) => handleOptionalResult(r, input));
|
|
41779
|
+
return handleOptionalResult(result2, input);
|
|
41643
41780
|
}
|
|
41644
41781
|
if (payload.value === undefined) {
|
|
41645
41782
|
return payload;
|
|
@@ -41738,7 +41875,7 @@ var init_schemas = __esm(() => {
|
|
|
41738
41875
|
});
|
|
41739
41876
|
$ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
41740
41877
|
$ZodType.init(inst, def);
|
|
41741
|
-
|
|
41878
|
+
inst._zod.optin = "optional";
|
|
41742
41879
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
41743
41880
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
41744
41881
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -41758,6 +41895,7 @@ var init_schemas = __esm(() => {
|
|
|
41758
41895
|
input: payload.value
|
|
41759
41896
|
});
|
|
41760
41897
|
payload.issues = [];
|
|
41898
|
+
payload.fallback = true;
|
|
41761
41899
|
}
|
|
41762
41900
|
return payload;
|
|
41763
41901
|
});
|
|
@@ -41772,6 +41910,7 @@ var init_schemas = __esm(() => {
|
|
|
41772
41910
|
input: payload.value
|
|
41773
41911
|
});
|
|
41774
41912
|
payload.issues = [];
|
|
41913
|
+
payload.fallback = true;
|
|
41775
41914
|
}
|
|
41776
41915
|
return payload;
|
|
41777
41916
|
};
|
|
@@ -41835,6 +41974,9 @@ var init_schemas = __esm(() => {
|
|
|
41835
41974
|
}
|
|
41836
41975
|
};
|
|
41837
41976
|
});
|
|
41977
|
+
$ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
|
|
41978
|
+
$ZodPipe.init(inst, def);
|
|
41979
|
+
});
|
|
41838
41980
|
$ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
41839
41981
|
$ZodType.init(inst, def);
|
|
41840
41982
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
@@ -41982,7 +42124,12 @@ var init_schemas = __esm(() => {
|
|
|
41982
42124
|
});
|
|
41983
42125
|
$ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
41984
42126
|
$ZodType.init(inst, def);
|
|
41985
|
-
defineLazy(inst._zod, "innerType", () =>
|
|
42127
|
+
defineLazy(inst._zod, "innerType", () => {
|
|
42128
|
+
const d = def;
|
|
42129
|
+
if (!d._cachedInner)
|
|
42130
|
+
d._cachedInner = def.getter();
|
|
42131
|
+
return d._cachedInner;
|
|
42132
|
+
});
|
|
41986
42133
|
defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
|
|
41987
42134
|
defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
|
|
41988
42135
|
defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? undefined);
|
|
@@ -42970,13 +43117,126 @@ var init_de = __esm(() => {
|
|
|
42970
43117
|
init_util();
|
|
42971
43118
|
});
|
|
42972
43119
|
|
|
42973
|
-
// node_modules/zod/v4/locales/
|
|
42974
|
-
function
|
|
43120
|
+
// node_modules/zod/v4/locales/el.js
|
|
43121
|
+
function el_default() {
|
|
42975
43122
|
return {
|
|
42976
43123
|
localeError: error9()
|
|
42977
43124
|
};
|
|
42978
43125
|
}
|
|
42979
43126
|
var error9 = () => {
|
|
43127
|
+
const Sizable = {
|
|
43128
|
+
string: { unit: "χαρακτήρες", verb: "να έχει" },
|
|
43129
|
+
file: { unit: "bytes", verb: "να έχει" },
|
|
43130
|
+
array: { unit: "στοιχεία", verb: "να έχει" },
|
|
43131
|
+
set: { unit: "στοιχεία", verb: "να έχει" },
|
|
43132
|
+
map: { unit: "καταχωρήσεις", verb: "να έχει" }
|
|
43133
|
+
};
|
|
43134
|
+
function getSizing(origin) {
|
|
43135
|
+
return Sizable[origin] ?? null;
|
|
43136
|
+
}
|
|
43137
|
+
const FormatDictionary = {
|
|
43138
|
+
regex: "είσοδος",
|
|
43139
|
+
email: "διεύθυνση email",
|
|
43140
|
+
url: "URL",
|
|
43141
|
+
emoji: "emoji",
|
|
43142
|
+
uuid: "UUID",
|
|
43143
|
+
uuidv4: "UUIDv4",
|
|
43144
|
+
uuidv6: "UUIDv6",
|
|
43145
|
+
nanoid: "nanoid",
|
|
43146
|
+
guid: "GUID",
|
|
43147
|
+
cuid: "cuid",
|
|
43148
|
+
cuid2: "cuid2",
|
|
43149
|
+
ulid: "ULID",
|
|
43150
|
+
xid: "XID",
|
|
43151
|
+
ksuid: "KSUID",
|
|
43152
|
+
datetime: "ISO ημερομηνία και ώρα",
|
|
43153
|
+
date: "ISO ημερομηνία",
|
|
43154
|
+
time: "ISO ώρα",
|
|
43155
|
+
duration: "ISO διάρκεια",
|
|
43156
|
+
ipv4: "διεύθυνση IPv4",
|
|
43157
|
+
ipv6: "διεύθυνση IPv6",
|
|
43158
|
+
mac: "διεύθυνση MAC",
|
|
43159
|
+
cidrv4: "εύρος IPv4",
|
|
43160
|
+
cidrv6: "εύρος IPv6",
|
|
43161
|
+
base64: "συμβολοσειρά κωδικοποιημένη σε base64",
|
|
43162
|
+
base64url: "συμβολοσειρά κωδικοποιημένη σε base64url",
|
|
43163
|
+
json_string: "συμβολοσειρά JSON",
|
|
43164
|
+
e164: "αριθμός E.164",
|
|
43165
|
+
jwt: "JWT",
|
|
43166
|
+
template_literal: "είσοδος"
|
|
43167
|
+
};
|
|
43168
|
+
const TypeDictionary = {
|
|
43169
|
+
nan: "NaN"
|
|
43170
|
+
};
|
|
43171
|
+
return (issue2) => {
|
|
43172
|
+
switch (issue2.code) {
|
|
43173
|
+
case "invalid_type": {
|
|
43174
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
43175
|
+
const receivedType = parsedType(issue2.input);
|
|
43176
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
43177
|
+
if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
|
|
43178
|
+
return `Μη έγκυρη είσοδος: αναμενόταν instanceof ${issue2.expected}, λήφθηκε ${received}`;
|
|
43179
|
+
}
|
|
43180
|
+
return `Μη έγκυρη είσοδος: αναμενόταν ${expected}, λήφθηκε ${received}`;
|
|
43181
|
+
}
|
|
43182
|
+
case "invalid_value":
|
|
43183
|
+
if (issue2.values.length === 1)
|
|
43184
|
+
return `Μη έγκυρη είσοδος: αναμενόταν ${stringifyPrimitive(issue2.values[0])}`;
|
|
43185
|
+
return `Μη έγκυρη επιλογή: αναμενόταν ένα από ${joinValues(issue2.values, "|")}`;
|
|
43186
|
+
case "too_big": {
|
|
43187
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
43188
|
+
const sizing = getSizing(issue2.origin);
|
|
43189
|
+
if (sizing)
|
|
43190
|
+
return `Πολύ μεγάλο: αναμενόταν ${issue2.origin ?? "τιμή"} να έχει ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "στοιχεία"}`;
|
|
43191
|
+
return `Πολύ μεγάλο: αναμενόταν ${issue2.origin ?? "τιμή"} να είναι ${adj}${issue2.maximum.toString()}`;
|
|
43192
|
+
}
|
|
43193
|
+
case "too_small": {
|
|
43194
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
43195
|
+
const sizing = getSizing(issue2.origin);
|
|
43196
|
+
if (sizing) {
|
|
43197
|
+
return `Πολύ μικρό: αναμενόταν ${issue2.origin} να έχει ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
43198
|
+
}
|
|
43199
|
+
return `Πολύ μικρό: αναμενόταν ${issue2.origin} να είναι ${adj}${issue2.minimum.toString()}`;
|
|
43200
|
+
}
|
|
43201
|
+
case "invalid_format": {
|
|
43202
|
+
const _issue = issue2;
|
|
43203
|
+
if (_issue.format === "starts_with") {
|
|
43204
|
+
return `Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${_issue.prefix}"`;
|
|
43205
|
+
}
|
|
43206
|
+
if (_issue.format === "ends_with")
|
|
43207
|
+
return `Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${_issue.suffix}"`;
|
|
43208
|
+
if (_issue.format === "includes")
|
|
43209
|
+
return `Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${_issue.includes}"`;
|
|
43210
|
+
if (_issue.format === "regex")
|
|
43211
|
+
return `Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${_issue.pattern}`;
|
|
43212
|
+
return `Μη έγκυρο: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
43213
|
+
}
|
|
43214
|
+
case "not_multiple_of":
|
|
43215
|
+
return `Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${issue2.divisor}`;
|
|
43216
|
+
case "unrecognized_keys":
|
|
43217
|
+
return `Άγνωστ${issue2.keys.length > 1 ? "α" : "ο"} κλειδ${issue2.keys.length > 1 ? "ιά" : "ί"}: ${joinValues(issue2.keys, ", ")}`;
|
|
43218
|
+
case "invalid_key":
|
|
43219
|
+
return `Μη έγκυρο κλειδί στο ${issue2.origin}`;
|
|
43220
|
+
case "invalid_union":
|
|
43221
|
+
return "Μη έγκυρη είσοδος";
|
|
43222
|
+
case "invalid_element":
|
|
43223
|
+
return `Μη έγκυρη τιμή στο ${issue2.origin}`;
|
|
43224
|
+
default:
|
|
43225
|
+
return `Μη έγκυρη είσοδος`;
|
|
43226
|
+
}
|
|
43227
|
+
};
|
|
43228
|
+
};
|
|
43229
|
+
var init_el = __esm(() => {
|
|
43230
|
+
init_util();
|
|
43231
|
+
});
|
|
43232
|
+
|
|
43233
|
+
// node_modules/zod/v4/locales/en.js
|
|
43234
|
+
function en_default() {
|
|
43235
|
+
return {
|
|
43236
|
+
localeError: error10()
|
|
43237
|
+
};
|
|
43238
|
+
}
|
|
43239
|
+
var error10 = () => {
|
|
42980
43240
|
const Sizable = {
|
|
42981
43241
|
string: { unit: "characters", verb: "to have" },
|
|
42982
43242
|
file: { unit: "bytes", verb: "to have" },
|
|
@@ -43068,6 +43328,10 @@ var error9 = () => {
|
|
|
43068
43328
|
case "invalid_key":
|
|
43069
43329
|
return `Invalid key in ${issue2.origin}`;
|
|
43070
43330
|
case "invalid_union":
|
|
43331
|
+
if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
|
|
43332
|
+
const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
|
|
43333
|
+
return `Invalid discriminator value. Expected ${opts}`;
|
|
43334
|
+
}
|
|
43071
43335
|
return "Invalid input";
|
|
43072
43336
|
case "invalid_element":
|
|
43073
43337
|
return `Invalid value in ${issue2.origin}`;
|
|
@@ -43083,10 +43347,10 @@ var init_en = __esm(() => {
|
|
|
43083
43347
|
// node_modules/zod/v4/locales/eo.js
|
|
43084
43348
|
function eo_default() {
|
|
43085
43349
|
return {
|
|
43086
|
-
localeError:
|
|
43350
|
+
localeError: error11()
|
|
43087
43351
|
};
|
|
43088
43352
|
}
|
|
43089
|
-
var
|
|
43353
|
+
var error11 = () => {
|
|
43090
43354
|
const Sizable = {
|
|
43091
43355
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
43092
43356
|
file: { unit: "bajtojn", verb: "havi" },
|
|
@@ -43196,10 +43460,10 @@ var init_eo = __esm(() => {
|
|
|
43196
43460
|
// node_modules/zod/v4/locales/es.js
|
|
43197
43461
|
function es_default() {
|
|
43198
43462
|
return {
|
|
43199
|
-
localeError:
|
|
43463
|
+
localeError: error12()
|
|
43200
43464
|
};
|
|
43201
43465
|
}
|
|
43202
|
-
var
|
|
43466
|
+
var error12 = () => {
|
|
43203
43467
|
const Sizable = {
|
|
43204
43468
|
string: { unit: "caracteres", verb: "tener" },
|
|
43205
43469
|
file: { unit: "bytes", verb: "tener" },
|
|
@@ -43332,10 +43596,10 @@ var init_es = __esm(() => {
|
|
|
43332
43596
|
// node_modules/zod/v4/locales/fa.js
|
|
43333
43597
|
function fa_default() {
|
|
43334
43598
|
return {
|
|
43335
|
-
localeError:
|
|
43599
|
+
localeError: error13()
|
|
43336
43600
|
};
|
|
43337
43601
|
}
|
|
43338
|
-
var
|
|
43602
|
+
var error13 = () => {
|
|
43339
43603
|
const Sizable = {
|
|
43340
43604
|
string: { unit: "کاراکتر", verb: "داشته باشد" },
|
|
43341
43605
|
file: { unit: "بایت", verb: "داشته باشد" },
|
|
@@ -43450,10 +43714,10 @@ var init_fa = __esm(() => {
|
|
|
43450
43714
|
// node_modules/zod/v4/locales/fi.js
|
|
43451
43715
|
function fi_default() {
|
|
43452
43716
|
return {
|
|
43453
|
-
localeError:
|
|
43717
|
+
localeError: error14()
|
|
43454
43718
|
};
|
|
43455
43719
|
}
|
|
43456
|
-
var
|
|
43720
|
+
var error14 = () => {
|
|
43457
43721
|
const Sizable = {
|
|
43458
43722
|
string: { unit: "merkkiä", subject: "merkkijonon" },
|
|
43459
43723
|
file: { unit: "tavua", subject: "tiedoston" },
|
|
@@ -43566,10 +43830,10 @@ var init_fi = __esm(() => {
|
|
|
43566
43830
|
// node_modules/zod/v4/locales/fr.js
|
|
43567
43831
|
function fr_default() {
|
|
43568
43832
|
return {
|
|
43569
|
-
localeError:
|
|
43833
|
+
localeError: error15()
|
|
43570
43834
|
};
|
|
43571
43835
|
}
|
|
43572
|
-
var
|
|
43836
|
+
var error15 = () => {
|
|
43573
43837
|
const Sizable = {
|
|
43574
43838
|
string: { unit: "caractères", verb: "avoir" },
|
|
43575
43839
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -43610,9 +43874,27 @@ var error14 = () => {
|
|
|
43610
43874
|
template_literal: "entrée"
|
|
43611
43875
|
};
|
|
43612
43876
|
const TypeDictionary = {
|
|
43613
|
-
|
|
43877
|
+
string: "chaîne",
|
|
43614
43878
|
number: "nombre",
|
|
43615
|
-
|
|
43879
|
+
int: "entier",
|
|
43880
|
+
boolean: "booléen",
|
|
43881
|
+
bigint: "grand entier",
|
|
43882
|
+
symbol: "symbole",
|
|
43883
|
+
undefined: "indéfini",
|
|
43884
|
+
null: "null",
|
|
43885
|
+
never: "jamais",
|
|
43886
|
+
void: "vide",
|
|
43887
|
+
date: "date",
|
|
43888
|
+
array: "tableau",
|
|
43889
|
+
object: "objet",
|
|
43890
|
+
tuple: "tuple",
|
|
43891
|
+
record: "enregistrement",
|
|
43892
|
+
map: "carte",
|
|
43893
|
+
set: "ensemble",
|
|
43894
|
+
file: "fichier",
|
|
43895
|
+
nonoptional: "non-optionnel",
|
|
43896
|
+
nan: "NaN",
|
|
43897
|
+
function: "fonction"
|
|
43616
43898
|
};
|
|
43617
43899
|
return (issue2) => {
|
|
43618
43900
|
switch (issue2.code) {
|
|
@@ -43633,16 +43915,15 @@ var error14 = () => {
|
|
|
43633
43915
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
43634
43916
|
const sizing = getSizing(issue2.origin);
|
|
43635
43917
|
if (sizing)
|
|
43636
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "élément(s)"}`;
|
|
43637
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit être ${adj}${issue2.maximum.toString()}`;
|
|
43918
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "élément(s)"}`;
|
|
43919
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit être ${adj}${issue2.maximum.toString()}`;
|
|
43638
43920
|
}
|
|
43639
43921
|
case "too_small": {
|
|
43640
43922
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
43641
43923
|
const sizing = getSizing(issue2.origin);
|
|
43642
|
-
if (sizing)
|
|
43643
|
-
return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
43644
|
-
}
|
|
43645
|
-
return `Trop petit : ${issue2.origin} doit être ${adj}${issue2.minimum.toString()}`;
|
|
43924
|
+
if (sizing)
|
|
43925
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
43926
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit être ${adj}${issue2.minimum.toString()}`;
|
|
43646
43927
|
}
|
|
43647
43928
|
case "invalid_format": {
|
|
43648
43929
|
const _issue = issue2;
|
|
@@ -43678,10 +43959,10 @@ var init_fr = __esm(() => {
|
|
|
43678
43959
|
// node_modules/zod/v4/locales/fr-CA.js
|
|
43679
43960
|
function fr_CA_default() {
|
|
43680
43961
|
return {
|
|
43681
|
-
localeError:
|
|
43962
|
+
localeError: error16()
|
|
43682
43963
|
};
|
|
43683
43964
|
}
|
|
43684
|
-
var
|
|
43965
|
+
var error16 = () => {
|
|
43685
43966
|
const Sizable = {
|
|
43686
43967
|
string: { unit: "caractères", verb: "avoir" },
|
|
43687
43968
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -43789,10 +44070,10 @@ var init_fr_CA = __esm(() => {
|
|
|
43789
44070
|
// node_modules/zod/v4/locales/he.js
|
|
43790
44071
|
function he_default() {
|
|
43791
44072
|
return {
|
|
43792
|
-
localeError:
|
|
44073
|
+
localeError: error17()
|
|
43793
44074
|
};
|
|
43794
44075
|
}
|
|
43795
|
-
var
|
|
44076
|
+
var error17 = () => {
|
|
43796
44077
|
const TypeNames = {
|
|
43797
44078
|
string: { label: "מחרוזת", gender: "f" },
|
|
43798
44079
|
number: { label: "מספר", gender: "m" },
|
|
@@ -43983,13 +44264,139 @@ var init_he = __esm(() => {
|
|
|
43983
44264
|
init_util();
|
|
43984
44265
|
});
|
|
43985
44266
|
|
|
44267
|
+
// node_modules/zod/v4/locales/hr.js
|
|
44268
|
+
function hr_default() {
|
|
44269
|
+
return {
|
|
44270
|
+
localeError: error18()
|
|
44271
|
+
};
|
|
44272
|
+
}
|
|
44273
|
+
var error18 = () => {
|
|
44274
|
+
const Sizable = {
|
|
44275
|
+
string: { unit: "znakova", verb: "imati" },
|
|
44276
|
+
file: { unit: "bajtova", verb: "imati" },
|
|
44277
|
+
array: { unit: "stavki", verb: "imati" },
|
|
44278
|
+
set: { unit: "stavki", verb: "imati" }
|
|
44279
|
+
};
|
|
44280
|
+
function getSizing(origin) {
|
|
44281
|
+
return Sizable[origin] ?? null;
|
|
44282
|
+
}
|
|
44283
|
+
const FormatDictionary = {
|
|
44284
|
+
regex: "unos",
|
|
44285
|
+
email: "email adresa",
|
|
44286
|
+
url: "URL",
|
|
44287
|
+
emoji: "emoji",
|
|
44288
|
+
uuid: "UUID",
|
|
44289
|
+
uuidv4: "UUIDv4",
|
|
44290
|
+
uuidv6: "UUIDv6",
|
|
44291
|
+
nanoid: "nanoid",
|
|
44292
|
+
guid: "GUID",
|
|
44293
|
+
cuid: "cuid",
|
|
44294
|
+
cuid2: "cuid2",
|
|
44295
|
+
ulid: "ULID",
|
|
44296
|
+
xid: "XID",
|
|
44297
|
+
ksuid: "KSUID",
|
|
44298
|
+
datetime: "ISO datum i vrijeme",
|
|
44299
|
+
date: "ISO datum",
|
|
44300
|
+
time: "ISO vrijeme",
|
|
44301
|
+
duration: "ISO trajanje",
|
|
44302
|
+
ipv4: "IPv4 adresa",
|
|
44303
|
+
ipv6: "IPv6 adresa",
|
|
44304
|
+
cidrv4: "IPv4 raspon",
|
|
44305
|
+
cidrv6: "IPv6 raspon",
|
|
44306
|
+
base64: "base64 kodirani tekst",
|
|
44307
|
+
base64url: "base64url kodirani tekst",
|
|
44308
|
+
json_string: "JSON tekst",
|
|
44309
|
+
e164: "E.164 broj",
|
|
44310
|
+
jwt: "JWT",
|
|
44311
|
+
template_literal: "unos"
|
|
44312
|
+
};
|
|
44313
|
+
const TypeDictionary = {
|
|
44314
|
+
nan: "NaN",
|
|
44315
|
+
string: "tekst",
|
|
44316
|
+
number: "broj",
|
|
44317
|
+
boolean: "boolean",
|
|
44318
|
+
array: "niz",
|
|
44319
|
+
object: "objekt",
|
|
44320
|
+
set: "skup",
|
|
44321
|
+
file: "datoteka",
|
|
44322
|
+
date: "datum",
|
|
44323
|
+
bigint: "bigint",
|
|
44324
|
+
symbol: "simbol",
|
|
44325
|
+
undefined: "undefined",
|
|
44326
|
+
null: "null",
|
|
44327
|
+
function: "funkcija",
|
|
44328
|
+
map: "mapa"
|
|
44329
|
+
};
|
|
44330
|
+
return (issue2) => {
|
|
44331
|
+
switch (issue2.code) {
|
|
44332
|
+
case "invalid_type": {
|
|
44333
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
44334
|
+
const receivedType = parsedType(issue2.input);
|
|
44335
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
44336
|
+
if (/^[A-Z]/.test(issue2.expected)) {
|
|
44337
|
+
return `Neispravan unos: očekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
|
|
44338
|
+
}
|
|
44339
|
+
return `Neispravan unos: očekuje se ${expected}, a primljeno je ${received}`;
|
|
44340
|
+
}
|
|
44341
|
+
case "invalid_value":
|
|
44342
|
+
if (issue2.values.length === 1)
|
|
44343
|
+
return `Neispravna vrijednost: očekivano ${stringifyPrimitive(issue2.values[0])}`;
|
|
44344
|
+
return `Neispravna opcija: očekivano jedno od ${joinValues(issue2.values, "|")}`;
|
|
44345
|
+
case "too_big": {
|
|
44346
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
44347
|
+
const sizing = getSizing(issue2.origin);
|
|
44348
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
44349
|
+
if (sizing)
|
|
44350
|
+
return `Preveliko: očekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
|
|
44351
|
+
return `Preveliko: očekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
|
|
44352
|
+
}
|
|
44353
|
+
case "too_small": {
|
|
44354
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
44355
|
+
const sizing = getSizing(issue2.origin);
|
|
44356
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
44357
|
+
if (sizing) {
|
|
44358
|
+
return `Premalo: očekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
44359
|
+
}
|
|
44360
|
+
return `Premalo: očekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
|
|
44361
|
+
}
|
|
44362
|
+
case "invalid_format": {
|
|
44363
|
+
const _issue = issue2;
|
|
44364
|
+
if (_issue.format === "starts_with")
|
|
44365
|
+
return `Neispravan tekst: mora započinjati s "${_issue.prefix}"`;
|
|
44366
|
+
if (_issue.format === "ends_with")
|
|
44367
|
+
return `Neispravan tekst: mora završavati s "${_issue.suffix}"`;
|
|
44368
|
+
if (_issue.format === "includes")
|
|
44369
|
+
return `Neispravan tekst: mora sadržavati "${_issue.includes}"`;
|
|
44370
|
+
if (_issue.format === "regex")
|
|
44371
|
+
return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
|
|
44372
|
+
return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
44373
|
+
}
|
|
44374
|
+
case "not_multiple_of":
|
|
44375
|
+
return `Neispravan broj: mora biti višekratnik od ${issue2.divisor}`;
|
|
44376
|
+
case "unrecognized_keys":
|
|
44377
|
+
return `Neprepoznat${issue2.keys.length > 1 ? "i ključevi" : " ključ"}: ${joinValues(issue2.keys, ", ")}`;
|
|
44378
|
+
case "invalid_key":
|
|
44379
|
+
return `Neispravan ključ u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
44380
|
+
case "invalid_union":
|
|
44381
|
+
return "Neispravan unos";
|
|
44382
|
+
case "invalid_element":
|
|
44383
|
+
return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
44384
|
+
default:
|
|
44385
|
+
return `Neispravan unos`;
|
|
44386
|
+
}
|
|
44387
|
+
};
|
|
44388
|
+
};
|
|
44389
|
+
var init_hr = __esm(() => {
|
|
44390
|
+
init_util();
|
|
44391
|
+
});
|
|
44392
|
+
|
|
43986
44393
|
// node_modules/zod/v4/locales/hu.js
|
|
43987
44394
|
function hu_default() {
|
|
43988
44395
|
return {
|
|
43989
|
-
localeError:
|
|
44396
|
+
localeError: error19()
|
|
43990
44397
|
};
|
|
43991
44398
|
}
|
|
43992
|
-
var
|
|
44399
|
+
var error19 = () => {
|
|
43993
44400
|
const Sizable = {
|
|
43994
44401
|
string: { unit: "karakter", verb: "legyen" },
|
|
43995
44402
|
file: { unit: "byte", verb: "legyen" },
|
|
@@ -44108,10 +44515,10 @@ function withDefiniteArticle(word) {
|
|
|
44108
44515
|
}
|
|
44109
44516
|
function hy_default() {
|
|
44110
44517
|
return {
|
|
44111
|
-
localeError:
|
|
44518
|
+
localeError: error20()
|
|
44112
44519
|
};
|
|
44113
44520
|
}
|
|
44114
|
-
var
|
|
44521
|
+
var error20 = () => {
|
|
44115
44522
|
const Sizable = {
|
|
44116
44523
|
string: {
|
|
44117
44524
|
unit: {
|
|
@@ -44249,10 +44656,10 @@ var init_hy = __esm(() => {
|
|
|
44249
44656
|
// node_modules/zod/v4/locales/id.js
|
|
44250
44657
|
function id_default() {
|
|
44251
44658
|
return {
|
|
44252
|
-
localeError:
|
|
44659
|
+
localeError: error21()
|
|
44253
44660
|
};
|
|
44254
44661
|
}
|
|
44255
|
-
var
|
|
44662
|
+
var error21 = () => {
|
|
44256
44663
|
const Sizable = {
|
|
44257
44664
|
string: { unit: "karakter", verb: "memiliki" },
|
|
44258
44665
|
file: { unit: "byte", verb: "memiliki" },
|
|
@@ -44359,10 +44766,10 @@ var init_id = __esm(() => {
|
|
|
44359
44766
|
// node_modules/zod/v4/locales/is.js
|
|
44360
44767
|
function is_default() {
|
|
44361
44768
|
return {
|
|
44362
|
-
localeError:
|
|
44769
|
+
localeError: error22()
|
|
44363
44770
|
};
|
|
44364
44771
|
}
|
|
44365
|
-
var
|
|
44772
|
+
var error22 = () => {
|
|
44366
44773
|
const Sizable = {
|
|
44367
44774
|
string: { unit: "stafi", verb: "að hafa" },
|
|
44368
44775
|
file: { unit: "bæti", verb: "að hafa" },
|
|
@@ -44472,10 +44879,10 @@ var init_is = __esm(() => {
|
|
|
44472
44879
|
// node_modules/zod/v4/locales/it.js
|
|
44473
44880
|
function it_default() {
|
|
44474
44881
|
return {
|
|
44475
|
-
localeError:
|
|
44882
|
+
localeError: error23()
|
|
44476
44883
|
};
|
|
44477
44884
|
}
|
|
44478
|
-
var
|
|
44885
|
+
var error23 = () => {
|
|
44479
44886
|
const Sizable = {
|
|
44480
44887
|
string: { unit: "caratteri", verb: "avere" },
|
|
44481
44888
|
file: { unit: "byte", verb: "avere" },
|
|
@@ -44560,7 +44967,7 @@ var error21 = () => {
|
|
|
44560
44967
|
return `Stringa non valida: deve includere "${_issue.includes}"`;
|
|
44561
44968
|
if (_issue.format === "regex")
|
|
44562
44969
|
return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
|
|
44563
|
-
return `
|
|
44970
|
+
return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
44564
44971
|
}
|
|
44565
44972
|
case "not_multiple_of":
|
|
44566
44973
|
return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
|
|
@@ -44584,10 +44991,10 @@ var init_it = __esm(() => {
|
|
|
44584
44991
|
// node_modules/zod/v4/locales/ja.js
|
|
44585
44992
|
function ja_default() {
|
|
44586
44993
|
return {
|
|
44587
|
-
localeError:
|
|
44994
|
+
localeError: error24()
|
|
44588
44995
|
};
|
|
44589
44996
|
}
|
|
44590
|
-
var
|
|
44997
|
+
var error24 = () => {
|
|
44591
44998
|
const Sizable = {
|
|
44592
44999
|
string: { unit: "文字", verb: "である" },
|
|
44593
45000
|
file: { unit: "バイト", verb: "である" },
|
|
@@ -44695,10 +45102,10 @@ var init_ja = __esm(() => {
|
|
|
44695
45102
|
// node_modules/zod/v4/locales/ka.js
|
|
44696
45103
|
function ka_default() {
|
|
44697
45104
|
return {
|
|
44698
|
-
localeError:
|
|
45105
|
+
localeError: error25()
|
|
44699
45106
|
};
|
|
44700
45107
|
}
|
|
44701
|
-
var
|
|
45108
|
+
var error25 = () => {
|
|
44702
45109
|
const Sizable = {
|
|
44703
45110
|
string: { unit: "სიმბოლო", verb: "უნდა შეიცავდეს" },
|
|
44704
45111
|
file: { unit: "ბაიტი", verb: "უნდა შეიცავდეს" },
|
|
@@ -44731,9 +45138,9 @@ var error23 = () => {
|
|
|
44731
45138
|
ipv6: "IPv6 მისამართი",
|
|
44732
45139
|
cidrv4: "IPv4 დიაპაზონი",
|
|
44733
45140
|
cidrv6: "IPv6 დიაპაზონი",
|
|
44734
|
-
base64: "base64-კოდირებული
|
|
44735
|
-
base64url: "base64url-კოდირებული
|
|
44736
|
-
json_string: "JSON
|
|
45141
|
+
base64: "base64-კოდირებული ველი",
|
|
45142
|
+
base64url: "base64url-კოდირებული ველი",
|
|
45143
|
+
json_string: "JSON ველი",
|
|
44737
45144
|
e164: "E.164 ნომერი",
|
|
44738
45145
|
jwt: "JWT",
|
|
44739
45146
|
template_literal: "შეყვანა"
|
|
@@ -44741,7 +45148,7 @@ var error23 = () => {
|
|
|
44741
45148
|
const TypeDictionary = {
|
|
44742
45149
|
nan: "NaN",
|
|
44743
45150
|
number: "რიცხვი",
|
|
44744
|
-
string: "
|
|
45151
|
+
string: "ველი",
|
|
44745
45152
|
boolean: "ბულეანი",
|
|
44746
45153
|
function: "ფუნქცია",
|
|
44747
45154
|
array: "მასივი"
|
|
@@ -44779,14 +45186,14 @@ var error23 = () => {
|
|
|
44779
45186
|
case "invalid_format": {
|
|
44780
45187
|
const _issue = issue2;
|
|
44781
45188
|
if (_issue.format === "starts_with") {
|
|
44782
|
-
return `არასწორი
|
|
45189
|
+
return `არასწორი ველი: უნდა იწყებოდეს "${_issue.prefix}"-ით`;
|
|
44783
45190
|
}
|
|
44784
45191
|
if (_issue.format === "ends_with")
|
|
44785
|
-
return `არასწორი
|
|
45192
|
+
return `არასწორი ველი: უნდა მთავრდებოდეს "${_issue.suffix}"-ით`;
|
|
44786
45193
|
if (_issue.format === "includes")
|
|
44787
|
-
return `არასწორი
|
|
45194
|
+
return `არასწორი ველი: უნდა შეიცავდეს "${_issue.includes}"-ს`;
|
|
44788
45195
|
if (_issue.format === "regex")
|
|
44789
|
-
return `არასწორი
|
|
45196
|
+
return `არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${_issue.pattern}`;
|
|
44790
45197
|
return `არასწორი ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
44791
45198
|
}
|
|
44792
45199
|
case "not_multiple_of":
|
|
@@ -44811,10 +45218,10 @@ var init_ka = __esm(() => {
|
|
|
44811
45218
|
// node_modules/zod/v4/locales/km.js
|
|
44812
45219
|
function km_default() {
|
|
44813
45220
|
return {
|
|
44814
|
-
localeError:
|
|
45221
|
+
localeError: error26()
|
|
44815
45222
|
};
|
|
44816
45223
|
}
|
|
44817
|
-
var
|
|
45224
|
+
var error26 = () => {
|
|
44818
45225
|
const Sizable = {
|
|
44819
45226
|
string: { unit: "តួអក្សរ", verb: "គួរមាន" },
|
|
44820
45227
|
file: { unit: "បៃ", verb: "គួរមាន" },
|
|
@@ -44933,10 +45340,10 @@ var init_kh = __esm(() => {
|
|
|
44933
45340
|
// node_modules/zod/v4/locales/ko.js
|
|
44934
45341
|
function ko_default() {
|
|
44935
45342
|
return {
|
|
44936
|
-
localeError:
|
|
45343
|
+
localeError: error27()
|
|
44937
45344
|
};
|
|
44938
45345
|
}
|
|
44939
|
-
var
|
|
45346
|
+
var error27 = () => {
|
|
44940
45347
|
const Sizable = {
|
|
44941
45348
|
string: { unit: "문자", verb: "to have" },
|
|
44942
45349
|
file: { unit: "바이트", verb: "to have" },
|
|
@@ -45058,12 +45465,12 @@ function getUnitTypeFromNumber(number2) {
|
|
|
45058
45465
|
}
|
|
45059
45466
|
function lt_default() {
|
|
45060
45467
|
return {
|
|
45061
|
-
localeError:
|
|
45468
|
+
localeError: error28()
|
|
45062
45469
|
};
|
|
45063
45470
|
}
|
|
45064
45471
|
var capitalizeFirstCharacter = (text) => {
|
|
45065
45472
|
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
45066
|
-
},
|
|
45473
|
+
}, error28 = () => {
|
|
45067
45474
|
const Sizable = {
|
|
45068
45475
|
string: {
|
|
45069
45476
|
unit: {
|
|
@@ -45254,10 +45661,10 @@ var init_lt = __esm(() => {
|
|
|
45254
45661
|
// node_modules/zod/v4/locales/mk.js
|
|
45255
45662
|
function mk_default() {
|
|
45256
45663
|
return {
|
|
45257
|
-
localeError:
|
|
45664
|
+
localeError: error29()
|
|
45258
45665
|
};
|
|
45259
45666
|
}
|
|
45260
|
-
var
|
|
45667
|
+
var error29 = () => {
|
|
45261
45668
|
const Sizable = {
|
|
45262
45669
|
string: { unit: "знаци", verb: "да имаат" },
|
|
45263
45670
|
file: { unit: "бајти", verb: "да имаат" },
|
|
@@ -45367,10 +45774,10 @@ var init_mk = __esm(() => {
|
|
|
45367
45774
|
// node_modules/zod/v4/locales/ms.js
|
|
45368
45775
|
function ms_default() {
|
|
45369
45776
|
return {
|
|
45370
|
-
localeError:
|
|
45777
|
+
localeError: error30()
|
|
45371
45778
|
};
|
|
45372
45779
|
}
|
|
45373
|
-
var
|
|
45780
|
+
var error30 = () => {
|
|
45374
45781
|
const Sizable = {
|
|
45375
45782
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
45376
45783
|
file: { unit: "bait", verb: "mempunyai" },
|
|
@@ -45478,10 +45885,10 @@ var init_ms = __esm(() => {
|
|
|
45478
45885
|
// node_modules/zod/v4/locales/nl.js
|
|
45479
45886
|
function nl_default() {
|
|
45480
45887
|
return {
|
|
45481
|
-
localeError:
|
|
45888
|
+
localeError: error31()
|
|
45482
45889
|
};
|
|
45483
45890
|
}
|
|
45484
|
-
var
|
|
45891
|
+
var error31 = () => {
|
|
45485
45892
|
const Sizable = {
|
|
45486
45893
|
string: { unit: "tekens", verb: "heeft" },
|
|
45487
45894
|
file: { unit: "bytes", verb: "heeft" },
|
|
@@ -45592,10 +45999,10 @@ var init_nl = __esm(() => {
|
|
|
45592
45999
|
// node_modules/zod/v4/locales/no.js
|
|
45593
46000
|
function no_default() {
|
|
45594
46001
|
return {
|
|
45595
|
-
localeError:
|
|
46002
|
+
localeError: error32()
|
|
45596
46003
|
};
|
|
45597
46004
|
}
|
|
45598
|
-
var
|
|
46005
|
+
var error32 = () => {
|
|
45599
46006
|
const Sizable = {
|
|
45600
46007
|
string: { unit: "tegn", verb: "å ha" },
|
|
45601
46008
|
file: { unit: "bytes", verb: "å ha" },
|
|
@@ -45704,10 +46111,10 @@ var init_no = __esm(() => {
|
|
|
45704
46111
|
// node_modules/zod/v4/locales/ota.js
|
|
45705
46112
|
function ota_default() {
|
|
45706
46113
|
return {
|
|
45707
|
-
localeError:
|
|
46114
|
+
localeError: error33()
|
|
45708
46115
|
};
|
|
45709
46116
|
}
|
|
45710
|
-
var
|
|
46117
|
+
var error33 = () => {
|
|
45711
46118
|
const Sizable = {
|
|
45712
46119
|
string: { unit: "harf", verb: "olmalıdır" },
|
|
45713
46120
|
file: { unit: "bayt", verb: "olmalıdır" },
|
|
@@ -45817,10 +46224,10 @@ var init_ota = __esm(() => {
|
|
|
45817
46224
|
// node_modules/zod/v4/locales/ps.js
|
|
45818
46225
|
function ps_default() {
|
|
45819
46226
|
return {
|
|
45820
|
-
localeError:
|
|
46227
|
+
localeError: error34()
|
|
45821
46228
|
};
|
|
45822
46229
|
}
|
|
45823
|
-
var
|
|
46230
|
+
var error34 = () => {
|
|
45824
46231
|
const Sizable = {
|
|
45825
46232
|
string: { unit: "توکي", verb: "ولري" },
|
|
45826
46233
|
file: { unit: "بایټس", verb: "ولري" },
|
|
@@ -45935,10 +46342,10 @@ var init_ps = __esm(() => {
|
|
|
45935
46342
|
// node_modules/zod/v4/locales/pl.js
|
|
45936
46343
|
function pl_default() {
|
|
45937
46344
|
return {
|
|
45938
|
-
localeError:
|
|
46345
|
+
localeError: error35()
|
|
45939
46346
|
};
|
|
45940
46347
|
}
|
|
45941
|
-
var
|
|
46348
|
+
var error35 = () => {
|
|
45942
46349
|
const Sizable = {
|
|
45943
46350
|
string: { unit: "znaków", verb: "mieć" },
|
|
45944
46351
|
file: { unit: "bajtów", verb: "mieć" },
|
|
@@ -46048,10 +46455,10 @@ var init_pl = __esm(() => {
|
|
|
46048
46455
|
// node_modules/zod/v4/locales/pt.js
|
|
46049
46456
|
function pt_default() {
|
|
46050
46457
|
return {
|
|
46051
|
-
localeError:
|
|
46458
|
+
localeError: error36()
|
|
46052
46459
|
};
|
|
46053
46460
|
}
|
|
46054
|
-
var
|
|
46461
|
+
var error36 = () => {
|
|
46055
46462
|
const Sizable = {
|
|
46056
46463
|
string: { unit: "caracteres", verb: "ter" },
|
|
46057
46464
|
file: { unit: "bytes", verb: "ter" },
|
|
@@ -46157,6 +46564,129 @@ var init_pt = __esm(() => {
|
|
|
46157
46564
|
init_util();
|
|
46158
46565
|
});
|
|
46159
46566
|
|
|
46567
|
+
// node_modules/zod/v4/locales/ro.js
|
|
46568
|
+
function ro_default() {
|
|
46569
|
+
return {
|
|
46570
|
+
localeError: error37()
|
|
46571
|
+
};
|
|
46572
|
+
}
|
|
46573
|
+
var error37 = () => {
|
|
46574
|
+
const Sizable = {
|
|
46575
|
+
string: { unit: "caractere", verb: "să aibă" },
|
|
46576
|
+
file: { unit: "octeți", verb: "să aibă" },
|
|
46577
|
+
array: { unit: "elemente", verb: "să aibă" },
|
|
46578
|
+
set: { unit: "elemente", verb: "să aibă" },
|
|
46579
|
+
map: { unit: "intrări", verb: "să aibă" }
|
|
46580
|
+
};
|
|
46581
|
+
function getSizing(origin) {
|
|
46582
|
+
return Sizable[origin] ?? null;
|
|
46583
|
+
}
|
|
46584
|
+
const FormatDictionary = {
|
|
46585
|
+
regex: "intrare",
|
|
46586
|
+
email: "adresă de email",
|
|
46587
|
+
url: "URL",
|
|
46588
|
+
emoji: "emoji",
|
|
46589
|
+
uuid: "UUID",
|
|
46590
|
+
uuidv4: "UUIDv4",
|
|
46591
|
+
uuidv6: "UUIDv6",
|
|
46592
|
+
nanoid: "nanoid",
|
|
46593
|
+
guid: "GUID",
|
|
46594
|
+
cuid: "cuid",
|
|
46595
|
+
cuid2: "cuid2",
|
|
46596
|
+
ulid: "ULID",
|
|
46597
|
+
xid: "XID",
|
|
46598
|
+
ksuid: "KSUID",
|
|
46599
|
+
datetime: "dată și oră ISO",
|
|
46600
|
+
date: "dată ISO",
|
|
46601
|
+
time: "oră ISO",
|
|
46602
|
+
duration: "durată ISO",
|
|
46603
|
+
ipv4: "adresă IPv4",
|
|
46604
|
+
ipv6: "adresă IPv6",
|
|
46605
|
+
mac: "adresă MAC",
|
|
46606
|
+
cidrv4: "interval IPv4",
|
|
46607
|
+
cidrv6: "interval IPv6",
|
|
46608
|
+
base64: "șir codat base64",
|
|
46609
|
+
base64url: "șir codat base64url",
|
|
46610
|
+
json_string: "șir JSON",
|
|
46611
|
+
e164: "număr E.164",
|
|
46612
|
+
jwt: "JWT",
|
|
46613
|
+
template_literal: "intrare"
|
|
46614
|
+
};
|
|
46615
|
+
const TypeDictionary = {
|
|
46616
|
+
nan: "NaN",
|
|
46617
|
+
string: "șir",
|
|
46618
|
+
number: "număr",
|
|
46619
|
+
boolean: "boolean",
|
|
46620
|
+
function: "funcție",
|
|
46621
|
+
array: "matrice",
|
|
46622
|
+
object: "obiect",
|
|
46623
|
+
undefined: "nedefinit",
|
|
46624
|
+
symbol: "simbol",
|
|
46625
|
+
bigint: "număr mare",
|
|
46626
|
+
void: "void",
|
|
46627
|
+
never: "never",
|
|
46628
|
+
map: "hartă",
|
|
46629
|
+
set: "set"
|
|
46630
|
+
};
|
|
46631
|
+
return (issue2) => {
|
|
46632
|
+
switch (issue2.code) {
|
|
46633
|
+
case "invalid_type": {
|
|
46634
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
46635
|
+
const receivedType = parsedType(issue2.input);
|
|
46636
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
46637
|
+
return `Intrare invalidă: așteptat ${expected}, primit ${received}`;
|
|
46638
|
+
}
|
|
46639
|
+
case "invalid_value":
|
|
46640
|
+
if (issue2.values.length === 1)
|
|
46641
|
+
return `Intrare invalidă: așteptat ${stringifyPrimitive(issue2.values[0])}`;
|
|
46642
|
+
return `Opțiune invalidă: așteptat una dintre ${joinValues(issue2.values, "|")}`;
|
|
46643
|
+
case "too_big": {
|
|
46644
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
46645
|
+
const sizing = getSizing(issue2.origin);
|
|
46646
|
+
if (sizing)
|
|
46647
|
+
return `Prea mare: așteptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
|
|
46648
|
+
return `Prea mare: așteptat ca ${issue2.origin ?? "valoarea"} să fie ${adj}${issue2.maximum.toString()}`;
|
|
46649
|
+
}
|
|
46650
|
+
case "too_small": {
|
|
46651
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
46652
|
+
const sizing = getSizing(issue2.origin);
|
|
46653
|
+
if (sizing) {
|
|
46654
|
+
return `Prea mic: așteptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
46655
|
+
}
|
|
46656
|
+
return `Prea mic: așteptat ca ${issue2.origin} să fie ${adj}${issue2.minimum.toString()}`;
|
|
46657
|
+
}
|
|
46658
|
+
case "invalid_format": {
|
|
46659
|
+
const _issue = issue2;
|
|
46660
|
+
if (_issue.format === "starts_with") {
|
|
46661
|
+
return `Șir invalid: trebuie să înceapă cu "${_issue.prefix}"`;
|
|
46662
|
+
}
|
|
46663
|
+
if (_issue.format === "ends_with")
|
|
46664
|
+
return `Șir invalid: trebuie să se termine cu "${_issue.suffix}"`;
|
|
46665
|
+
if (_issue.format === "includes")
|
|
46666
|
+
return `Șir invalid: trebuie să includă "${_issue.includes}"`;
|
|
46667
|
+
if (_issue.format === "regex")
|
|
46668
|
+
return `Șir invalid: trebuie să se potrivească cu modelul ${_issue.pattern}`;
|
|
46669
|
+
return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
46670
|
+
}
|
|
46671
|
+
case "not_multiple_of":
|
|
46672
|
+
return `Număr invalid: trebuie să fie multiplu de ${issue2.divisor}`;
|
|
46673
|
+
case "unrecognized_keys":
|
|
46674
|
+
return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
|
|
46675
|
+
case "invalid_key":
|
|
46676
|
+
return `Cheie invalidă în ${issue2.origin}`;
|
|
46677
|
+
case "invalid_union":
|
|
46678
|
+
return "Intrare invalidă";
|
|
46679
|
+
case "invalid_element":
|
|
46680
|
+
return `Valoare invalidă în ${issue2.origin}`;
|
|
46681
|
+
default:
|
|
46682
|
+
return `Intrare invalidă`;
|
|
46683
|
+
}
|
|
46684
|
+
};
|
|
46685
|
+
};
|
|
46686
|
+
var init_ro = __esm(() => {
|
|
46687
|
+
init_util();
|
|
46688
|
+
});
|
|
46689
|
+
|
|
46160
46690
|
// node_modules/zod/v4/locales/ru.js
|
|
46161
46691
|
function getRussianPlural(count, one, few, many) {
|
|
46162
46692
|
const absCount = Math.abs(count);
|
|
@@ -46175,10 +46705,10 @@ function getRussianPlural(count, one, few, many) {
|
|
|
46175
46705
|
}
|
|
46176
46706
|
function ru_default() {
|
|
46177
46707
|
return {
|
|
46178
|
-
localeError:
|
|
46708
|
+
localeError: error38()
|
|
46179
46709
|
};
|
|
46180
46710
|
}
|
|
46181
|
-
var
|
|
46711
|
+
var error38 = () => {
|
|
46182
46712
|
const Sizable = {
|
|
46183
46713
|
string: {
|
|
46184
46714
|
unit: {
|
|
@@ -46320,10 +46850,10 @@ var init_ru = __esm(() => {
|
|
|
46320
46850
|
// node_modules/zod/v4/locales/sl.js
|
|
46321
46851
|
function sl_default() {
|
|
46322
46852
|
return {
|
|
46323
|
-
localeError:
|
|
46853
|
+
localeError: error39()
|
|
46324
46854
|
};
|
|
46325
46855
|
}
|
|
46326
|
-
var
|
|
46856
|
+
var error39 = () => {
|
|
46327
46857
|
const Sizable = {
|
|
46328
46858
|
string: { unit: "znakov", verb: "imeti" },
|
|
46329
46859
|
file: { unit: "bajtov", verb: "imeti" },
|
|
@@ -46433,10 +46963,10 @@ var init_sl = __esm(() => {
|
|
|
46433
46963
|
// node_modules/zod/v4/locales/sv.js
|
|
46434
46964
|
function sv_default() {
|
|
46435
46965
|
return {
|
|
46436
|
-
localeError:
|
|
46966
|
+
localeError: error40()
|
|
46437
46967
|
};
|
|
46438
46968
|
}
|
|
46439
|
-
var
|
|
46969
|
+
var error40 = () => {
|
|
46440
46970
|
const Sizable = {
|
|
46441
46971
|
string: { unit: "tecken", verb: "att ha" },
|
|
46442
46972
|
file: { unit: "bytes", verb: "att ha" },
|
|
@@ -46547,10 +47077,10 @@ var init_sv = __esm(() => {
|
|
|
46547
47077
|
// node_modules/zod/v4/locales/ta.js
|
|
46548
47078
|
function ta_default() {
|
|
46549
47079
|
return {
|
|
46550
|
-
localeError:
|
|
47080
|
+
localeError: error41()
|
|
46551
47081
|
};
|
|
46552
47082
|
}
|
|
46553
|
-
var
|
|
47083
|
+
var error41 = () => {
|
|
46554
47084
|
const Sizable = {
|
|
46555
47085
|
string: { unit: "எழுத்துக்கள்", verb: "கொண்டிருக்க வேண்டும்" },
|
|
46556
47086
|
file: { unit: "பைட்டுகள்", verb: "கொண்டிருக்க வேண்டும்" },
|
|
@@ -46661,10 +47191,10 @@ var init_ta = __esm(() => {
|
|
|
46661
47191
|
// node_modules/zod/v4/locales/th.js
|
|
46662
47192
|
function th_default() {
|
|
46663
47193
|
return {
|
|
46664
|
-
localeError:
|
|
47194
|
+
localeError: error42()
|
|
46665
47195
|
};
|
|
46666
47196
|
}
|
|
46667
|
-
var
|
|
47197
|
+
var error42 = () => {
|
|
46668
47198
|
const Sizable = {
|
|
46669
47199
|
string: { unit: "ตัวอักษร", verb: "ควรมี" },
|
|
46670
47200
|
file: { unit: "ไบต์", verb: "ควรมี" },
|
|
@@ -46775,10 +47305,10 @@ var init_th = __esm(() => {
|
|
|
46775
47305
|
// node_modules/zod/v4/locales/tr.js
|
|
46776
47306
|
function tr_default() {
|
|
46777
47307
|
return {
|
|
46778
|
-
localeError:
|
|
47308
|
+
localeError: error43()
|
|
46779
47309
|
};
|
|
46780
47310
|
}
|
|
46781
|
-
var
|
|
47311
|
+
var error43 = () => {
|
|
46782
47312
|
const Sizable = {
|
|
46783
47313
|
string: { unit: "karakter", verb: "olmalı" },
|
|
46784
47314
|
file: { unit: "bayt", verb: "olmalı" },
|
|
@@ -46884,10 +47414,10 @@ var init_tr = __esm(() => {
|
|
|
46884
47414
|
// node_modules/zod/v4/locales/uk.js
|
|
46885
47415
|
function uk_default() {
|
|
46886
47416
|
return {
|
|
46887
|
-
localeError:
|
|
47417
|
+
localeError: error44()
|
|
46888
47418
|
};
|
|
46889
47419
|
}
|
|
46890
|
-
var
|
|
47420
|
+
var error44 = () => {
|
|
46891
47421
|
const Sizable = {
|
|
46892
47422
|
string: { unit: "символів", verb: "матиме" },
|
|
46893
47423
|
file: { unit: "байтів", verb: "матиме" },
|
|
@@ -47004,10 +47534,10 @@ var init_ua = __esm(() => {
|
|
|
47004
47534
|
// node_modules/zod/v4/locales/ur.js
|
|
47005
47535
|
function ur_default() {
|
|
47006
47536
|
return {
|
|
47007
|
-
localeError:
|
|
47537
|
+
localeError: error45()
|
|
47008
47538
|
};
|
|
47009
47539
|
}
|
|
47010
|
-
var
|
|
47540
|
+
var error45 = () => {
|
|
47011
47541
|
const Sizable = {
|
|
47012
47542
|
string: { unit: "حروف", verb: "ہونا" },
|
|
47013
47543
|
file: { unit: "بائٹس", verb: "ہونا" },
|
|
@@ -47118,15 +47648,16 @@ var init_ur = __esm(() => {
|
|
|
47118
47648
|
// node_modules/zod/v4/locales/uz.js
|
|
47119
47649
|
function uz_default() {
|
|
47120
47650
|
return {
|
|
47121
|
-
localeError:
|
|
47651
|
+
localeError: error46()
|
|
47122
47652
|
};
|
|
47123
47653
|
}
|
|
47124
|
-
var
|
|
47654
|
+
var error46 = () => {
|
|
47125
47655
|
const Sizable = {
|
|
47126
47656
|
string: { unit: "belgi", verb: "bo‘lishi kerak" },
|
|
47127
47657
|
file: { unit: "bayt", verb: "bo‘lishi kerak" },
|
|
47128
47658
|
array: { unit: "element", verb: "bo‘lishi kerak" },
|
|
47129
|
-
set: { unit: "element", verb: "bo‘lishi kerak" }
|
|
47659
|
+
set: { unit: "element", verb: "bo‘lishi kerak" },
|
|
47660
|
+
map: { unit: "yozuv", verb: "bo‘lishi kerak" }
|
|
47130
47661
|
};
|
|
47131
47662
|
function getSizing(origin) {
|
|
47132
47663
|
return Sizable[origin] ?? null;
|
|
@@ -47231,10 +47762,10 @@ var init_uz = __esm(() => {
|
|
|
47231
47762
|
// node_modules/zod/v4/locales/vi.js
|
|
47232
47763
|
function vi_default() {
|
|
47233
47764
|
return {
|
|
47234
|
-
localeError:
|
|
47765
|
+
localeError: error47()
|
|
47235
47766
|
};
|
|
47236
47767
|
}
|
|
47237
|
-
var
|
|
47768
|
+
var error47 = () => {
|
|
47238
47769
|
const Sizable = {
|
|
47239
47770
|
string: { unit: "ký tự", verb: "có" },
|
|
47240
47771
|
file: { unit: "byte", verb: "có" },
|
|
@@ -47343,10 +47874,10 @@ var init_vi = __esm(() => {
|
|
|
47343
47874
|
// node_modules/zod/v4/locales/zh-CN.js
|
|
47344
47875
|
function zh_CN_default() {
|
|
47345
47876
|
return {
|
|
47346
|
-
localeError:
|
|
47877
|
+
localeError: error48()
|
|
47347
47878
|
};
|
|
47348
47879
|
}
|
|
47349
|
-
var
|
|
47880
|
+
var error48 = () => {
|
|
47350
47881
|
const Sizable = {
|
|
47351
47882
|
string: { unit: "字符", verb: "包含" },
|
|
47352
47883
|
file: { unit: "字节", verb: "包含" },
|
|
@@ -47456,10 +47987,10 @@ var init_zh_CN = __esm(() => {
|
|
|
47456
47987
|
// node_modules/zod/v4/locales/zh-TW.js
|
|
47457
47988
|
function zh_TW_default() {
|
|
47458
47989
|
return {
|
|
47459
|
-
localeError:
|
|
47990
|
+
localeError: error49()
|
|
47460
47991
|
};
|
|
47461
47992
|
}
|
|
47462
|
-
var
|
|
47993
|
+
var error49 = () => {
|
|
47463
47994
|
const Sizable = {
|
|
47464
47995
|
string: { unit: "字元", verb: "擁有" },
|
|
47465
47996
|
file: { unit: "位元組", verb: "擁有" },
|
|
@@ -47567,10 +48098,10 @@ var init_zh_TW = __esm(() => {
|
|
|
47567
48098
|
// node_modules/zod/v4/locales/yo.js
|
|
47568
48099
|
function yo_default() {
|
|
47569
48100
|
return {
|
|
47570
|
-
localeError:
|
|
48101
|
+
localeError: error50()
|
|
47571
48102
|
};
|
|
47572
48103
|
}
|
|
47573
|
-
var
|
|
48104
|
+
var error50 = () => {
|
|
47574
48105
|
const Sizable = {
|
|
47575
48106
|
string: { unit: "àmi", verb: "ní" },
|
|
47576
48107
|
file: { unit: "bytes", verb: "ní" },
|
|
@@ -47692,6 +48223,7 @@ __export(exports_locales, {
|
|
|
47692
48223
|
sv: () => sv_default,
|
|
47693
48224
|
sl: () => sl_default,
|
|
47694
48225
|
ru: () => ru_default,
|
|
48226
|
+
ro: () => ro_default,
|
|
47695
48227
|
pt: () => pt_default,
|
|
47696
48228
|
ps: () => ps_default,
|
|
47697
48229
|
pl: () => pl_default,
|
|
@@ -47711,6 +48243,7 @@ __export(exports_locales, {
|
|
|
47711
48243
|
id: () => id_default,
|
|
47712
48244
|
hy: () => hy_default,
|
|
47713
48245
|
hu: () => hu_default,
|
|
48246
|
+
hr: () => hr_default,
|
|
47714
48247
|
he: () => he_default,
|
|
47715
48248
|
frCA: () => fr_CA_default,
|
|
47716
48249
|
fr: () => fr_default,
|
|
@@ -47719,6 +48252,7 @@ __export(exports_locales, {
|
|
|
47719
48252
|
es: () => es_default,
|
|
47720
48253
|
eo: () => eo_default,
|
|
47721
48254
|
en: () => en_default,
|
|
48255
|
+
el: () => el_default,
|
|
47722
48256
|
de: () => de_default,
|
|
47723
48257
|
da: () => da_default,
|
|
47724
48258
|
cs: () => cs_default,
|
|
@@ -47737,6 +48271,7 @@ var init_locales = __esm(() => {
|
|
|
47737
48271
|
init_cs();
|
|
47738
48272
|
init_da();
|
|
47739
48273
|
init_de();
|
|
48274
|
+
init_el();
|
|
47740
48275
|
init_en();
|
|
47741
48276
|
init_eo();
|
|
47742
48277
|
init_es();
|
|
@@ -47745,6 +48280,7 @@ var init_locales = __esm(() => {
|
|
|
47745
48280
|
init_fr();
|
|
47746
48281
|
init_fr_CA();
|
|
47747
48282
|
init_he();
|
|
48283
|
+
init_hr();
|
|
47748
48284
|
init_hu();
|
|
47749
48285
|
init_hy();
|
|
47750
48286
|
init_id();
|
|
@@ -47764,6 +48300,7 @@ var init_locales = __esm(() => {
|
|
|
47764
48300
|
init_ps();
|
|
47765
48301
|
init_pl();
|
|
47766
48302
|
init_pt();
|
|
48303
|
+
init_ro();
|
|
47767
48304
|
init_ru();
|
|
47768
48305
|
init_sl();
|
|
47769
48306
|
init_sv();
|
|
@@ -47824,11 +48361,11 @@ class $ZodRegistry {
|
|
|
47824
48361
|
function registry() {
|
|
47825
48362
|
return new $ZodRegistry;
|
|
47826
48363
|
}
|
|
47827
|
-
var
|
|
48364
|
+
var _a2, $output, $input, globalRegistry;
|
|
47828
48365
|
var init_registries = __esm(() => {
|
|
47829
48366
|
$output = Symbol("ZodOutput");
|
|
47830
48367
|
$input = Symbol("ZodInput");
|
|
47831
|
-
(
|
|
48368
|
+
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
47832
48369
|
globalRegistry = globalThis.__zod_globalRegistry;
|
|
47833
48370
|
});
|
|
47834
48371
|
|
|
@@ -48629,7 +49166,7 @@ function _refine(Class2, fn, _params) {
|
|
|
48629
49166
|
});
|
|
48630
49167
|
return schema;
|
|
48631
49168
|
}
|
|
48632
|
-
function _superRefine(fn) {
|
|
49169
|
+
function _superRefine(fn, params) {
|
|
48633
49170
|
const ch = _check((payload) => {
|
|
48634
49171
|
payload.addIssue = (issue2) => {
|
|
48635
49172
|
if (typeof issue2 === "string") {
|
|
@@ -48646,7 +49183,7 @@ function _superRefine(fn) {
|
|
|
48646
49183
|
}
|
|
48647
49184
|
};
|
|
48648
49185
|
return fn(payload.value, payload);
|
|
48649
|
-
});
|
|
49186
|
+
}, params);
|
|
48650
49187
|
return ch;
|
|
48651
49188
|
}
|
|
48652
49189
|
function _check(fn, params) {
|
|
@@ -48782,7 +49319,7 @@ function initializeContext(params) {
|
|
|
48782
49319
|
};
|
|
48783
49320
|
}
|
|
48784
49321
|
function process13(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
48785
|
-
var
|
|
49322
|
+
var _a3;
|
|
48786
49323
|
const def = schema._zod.def;
|
|
48787
49324
|
const seen = ctx.seen.get(schema);
|
|
48788
49325
|
if (seen) {
|
|
@@ -48829,8 +49366,8 @@ function process13(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
|
48829
49366
|
delete result2.schema.examples;
|
|
48830
49367
|
delete result2.schema.default;
|
|
48831
49368
|
}
|
|
48832
|
-
if (ctx.io === "input" && result2.schema
|
|
48833
|
-
(
|
|
49369
|
+
if (ctx.io === "input" && "_prefault" in result2.schema)
|
|
49370
|
+
(_a3 = result2.schema).default ?? (_a3.default = result2.schema._prefault);
|
|
48834
49371
|
delete result2.schema._prefault;
|
|
48835
49372
|
const _result = ctx.seen.get(schema);
|
|
48836
49373
|
return _result.schema;
|
|
@@ -49007,10 +49544,15 @@ function finalize(ctx, schema) {
|
|
|
49007
49544
|
result2.$id = ctx.external.uri(id);
|
|
49008
49545
|
}
|
|
49009
49546
|
Object.assign(result2, root.def ?? root.schema);
|
|
49547
|
+
const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
|
|
49548
|
+
if (rootMetaId !== undefined && result2.id === rootMetaId)
|
|
49549
|
+
delete result2.id;
|
|
49010
49550
|
const defs = ctx.external?.defs ?? {};
|
|
49011
49551
|
for (const entry of ctx.seen.entries()) {
|
|
49012
49552
|
const seen = entry[1];
|
|
49013
49553
|
if (seen.def && seen.defId) {
|
|
49554
|
+
if (seen.def.id === seen.defId)
|
|
49555
|
+
delete seen.def.id;
|
|
49014
49556
|
defs[seen.defId] = seen.def;
|
|
49015
49557
|
}
|
|
49016
49558
|
}
|
|
@@ -49065,6 +49607,8 @@ function isTransforming(_schema, _ctx) {
|
|
|
49065
49607
|
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
|
|
49066
49608
|
}
|
|
49067
49609
|
if (def.type === "pipe") {
|
|
49610
|
+
if (_schema._zod.traits.has("$ZodCodec"))
|
|
49611
|
+
return true;
|
|
49068
49612
|
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
49069
49613
|
}
|
|
49070
49614
|
if (def.type === "object") {
|
|
@@ -49181,39 +49725,28 @@ var formatMap, stringProcessor = (schema, ctx, _json, _params) => {
|
|
|
49181
49725
|
json.type = "integer";
|
|
49182
49726
|
else
|
|
49183
49727
|
json.type = "number";
|
|
49184
|
-
|
|
49185
|
-
|
|
49728
|
+
const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
|
|
49729
|
+
const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
|
|
49730
|
+
const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
|
|
49731
|
+
if (exMin) {
|
|
49732
|
+
if (legacy) {
|
|
49186
49733
|
json.minimum = exclusiveMinimum;
|
|
49187
49734
|
json.exclusiveMinimum = true;
|
|
49188
49735
|
} else {
|
|
49189
49736
|
json.exclusiveMinimum = exclusiveMinimum;
|
|
49190
49737
|
}
|
|
49191
|
-
}
|
|
49192
|
-
if (typeof minimum === "number") {
|
|
49738
|
+
} else if (typeof minimum === "number") {
|
|
49193
49739
|
json.minimum = minimum;
|
|
49194
|
-
if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
|
|
49195
|
-
if (exclusiveMinimum >= minimum)
|
|
49196
|
-
delete json.minimum;
|
|
49197
|
-
else
|
|
49198
|
-
delete json.exclusiveMinimum;
|
|
49199
|
-
}
|
|
49200
49740
|
}
|
|
49201
|
-
if (
|
|
49202
|
-
if (
|
|
49741
|
+
if (exMax) {
|
|
49742
|
+
if (legacy) {
|
|
49203
49743
|
json.maximum = exclusiveMaximum;
|
|
49204
49744
|
json.exclusiveMaximum = true;
|
|
49205
49745
|
} else {
|
|
49206
49746
|
json.exclusiveMaximum = exclusiveMaximum;
|
|
49207
49747
|
}
|
|
49208
|
-
}
|
|
49209
|
-
if (typeof maximum === "number") {
|
|
49748
|
+
} else if (typeof maximum === "number") {
|
|
49210
49749
|
json.maximum = maximum;
|
|
49211
|
-
if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
|
|
49212
|
-
if (exclusiveMaximum <= maximum)
|
|
49213
|
-
delete json.maximum;
|
|
49214
|
-
else
|
|
49215
|
-
delete json.exclusiveMaximum;
|
|
49216
|
-
}
|
|
49217
49750
|
}
|
|
49218
49751
|
if (typeof multipleOf === "number")
|
|
49219
49752
|
json.multipleOf = multipleOf;
|
|
@@ -49359,7 +49892,10 @@ var formatMap, stringProcessor = (schema, ctx, _json, _params) => {
|
|
|
49359
49892
|
if (typeof maximum === "number")
|
|
49360
49893
|
json.maxItems = maximum;
|
|
49361
49894
|
json.type = "array";
|
|
49362
|
-
json.items = process13(def.element, ctx, {
|
|
49895
|
+
json.items = process13(def.element, ctx, {
|
|
49896
|
+
...params,
|
|
49897
|
+
path: [...params.path, "items"]
|
|
49898
|
+
});
|
|
49363
49899
|
}, objectProcessor = (schema, ctx, _json, params) => {
|
|
49364
49900
|
const json = _json;
|
|
49365
49901
|
const def = schema._zod.def;
|
|
@@ -49541,7 +50077,8 @@ var formatMap, stringProcessor = (schema, ctx, _json, _params) => {
|
|
|
49541
50077
|
json.default = catchValue;
|
|
49542
50078
|
}, pipeProcessor = (schema, ctx, _json, params) => {
|
|
49543
50079
|
const def = schema._zod.def;
|
|
49544
|
-
const
|
|
50080
|
+
const inIsTransform = def.in._zod.traits.has("$ZodTransform");
|
|
50081
|
+
const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
|
|
49545
50082
|
process13(innerType, ctx, params);
|
|
49546
50083
|
const seen = ctx.seen.get(schema);
|
|
49547
50084
|
seen.ref = innerType;
|
|
@@ -49887,6 +50424,7 @@ __export(exports_core2, {
|
|
|
49887
50424
|
$ZodRealError: () => $ZodRealError,
|
|
49888
50425
|
$ZodReadonly: () => $ZodReadonly,
|
|
49889
50426
|
$ZodPromise: () => $ZodPromise,
|
|
50427
|
+
$ZodPreprocess: () => $ZodPreprocess,
|
|
49890
50428
|
$ZodPrefault: () => $ZodPrefault,
|
|
49891
50429
|
$ZodPipe: () => $ZodPipe,
|
|
49892
50430
|
$ZodOptional: () => $ZodOptional,
|
|
@@ -50100,8 +50638,8 @@ var init_errors2 = __esm(() => {
|
|
|
50100
50638
|
init_core2();
|
|
50101
50639
|
init_core2();
|
|
50102
50640
|
init_util();
|
|
50103
|
-
ZodError = $constructor("ZodError", initializer2);
|
|
50104
|
-
ZodRealError = $constructor("ZodError", initializer2, {
|
|
50641
|
+
ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
|
|
50642
|
+
ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
|
|
50105
50643
|
Parent: Error
|
|
50106
50644
|
});
|
|
50107
50645
|
});
|
|
@@ -50185,6 +50723,7 @@ __export(exports_schemas2, {
|
|
|
50185
50723
|
json: () => json,
|
|
50186
50724
|
ipv6: () => ipv62,
|
|
50187
50725
|
ipv4: () => ipv42,
|
|
50726
|
+
invertCodec: () => invertCodec,
|
|
50188
50727
|
intersection: () => intersection2,
|
|
50189
50728
|
int64: () => int64,
|
|
50190
50729
|
int32: () => int32,
|
|
@@ -50245,6 +50784,7 @@ __export(exports_schemas2, {
|
|
|
50245
50784
|
ZodRecord: () => ZodRecord,
|
|
50246
50785
|
ZodReadonly: () => ZodReadonly,
|
|
50247
50786
|
ZodPromise: () => ZodPromise,
|
|
50787
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
50248
50788
|
ZodPrefault: () => ZodPrefault,
|
|
50249
50789
|
ZodPipe: () => ZodPipe,
|
|
50250
50790
|
ZodOptional: () => ZodOptional,
|
|
@@ -50293,6 +50833,42 @@ __export(exports_schemas2, {
|
|
|
50293
50833
|
ZodArray: () => ZodArray,
|
|
50294
50834
|
ZodAny: () => ZodAny
|
|
50295
50835
|
});
|
|
50836
|
+
function _installLazyMethods(inst, group, methods) {
|
|
50837
|
+
const proto2 = Object.getPrototypeOf(inst);
|
|
50838
|
+
let installed = _installedGroups.get(proto2);
|
|
50839
|
+
if (!installed) {
|
|
50840
|
+
installed = new Set;
|
|
50841
|
+
_installedGroups.set(proto2, installed);
|
|
50842
|
+
}
|
|
50843
|
+
if (installed.has(group))
|
|
50844
|
+
return;
|
|
50845
|
+
installed.add(group);
|
|
50846
|
+
for (const key in methods) {
|
|
50847
|
+
const fn = methods[key];
|
|
50848
|
+
Object.defineProperty(proto2, key, {
|
|
50849
|
+
configurable: true,
|
|
50850
|
+
enumerable: false,
|
|
50851
|
+
get() {
|
|
50852
|
+
const bound = fn.bind(this);
|
|
50853
|
+
Object.defineProperty(this, key, {
|
|
50854
|
+
configurable: true,
|
|
50855
|
+
writable: true,
|
|
50856
|
+
enumerable: true,
|
|
50857
|
+
value: bound
|
|
50858
|
+
});
|
|
50859
|
+
return bound;
|
|
50860
|
+
},
|
|
50861
|
+
set(v) {
|
|
50862
|
+
Object.defineProperty(this, key, {
|
|
50863
|
+
configurable: true,
|
|
50864
|
+
writable: true,
|
|
50865
|
+
enumerable: true,
|
|
50866
|
+
value: v
|
|
50867
|
+
});
|
|
50868
|
+
}
|
|
50869
|
+
});
|
|
50870
|
+
}
|
|
50871
|
+
}
|
|
50296
50872
|
function string2(params) {
|
|
50297
50873
|
return _string(ZodString, params);
|
|
50298
50874
|
}
|
|
@@ -50319,7 +50895,7 @@ function url(params) {
|
|
|
50319
50895
|
}
|
|
50320
50896
|
function httpUrl(params) {
|
|
50321
50897
|
return _url(ZodURL, {
|
|
50322
|
-
protocol:
|
|
50898
|
+
protocol: exports_regexes.httpProtocol,
|
|
50323
50899
|
hostname: exports_regexes.domain,
|
|
50324
50900
|
...exports_util.normalizeParams(params)
|
|
50325
50901
|
});
|
|
@@ -50516,6 +51092,14 @@ function tuple(items, _paramsOrRest, _params) {
|
|
|
50516
51092
|
});
|
|
50517
51093
|
}
|
|
50518
51094
|
function record(keyType, valueType, params) {
|
|
51095
|
+
if (!valueType || !valueType._zod) {
|
|
51096
|
+
return new ZodRecord({
|
|
51097
|
+
type: "record",
|
|
51098
|
+
keyType: string2(),
|
|
51099
|
+
valueType: keyType,
|
|
51100
|
+
...exports_util.normalizeParams(valueType)
|
|
51101
|
+
});
|
|
51102
|
+
}
|
|
50519
51103
|
return new ZodRecord({
|
|
50520
51104
|
type: "record",
|
|
50521
51105
|
keyType,
|
|
@@ -50666,6 +51250,16 @@ function codec(in_, out, params) {
|
|
|
50666
51250
|
reverseTransform: params.encode
|
|
50667
51251
|
});
|
|
50668
51252
|
}
|
|
51253
|
+
function invertCodec(codec2) {
|
|
51254
|
+
const def = codec2._zod.def;
|
|
51255
|
+
return new ZodCodec({
|
|
51256
|
+
type: "pipe",
|
|
51257
|
+
in: def.out,
|
|
51258
|
+
out: def.in,
|
|
51259
|
+
transform: def.reverseTransform,
|
|
51260
|
+
reverseTransform: def.transform
|
|
51261
|
+
});
|
|
51262
|
+
}
|
|
50669
51263
|
function readonly(innerType) {
|
|
50670
51264
|
return new ZodReadonly({
|
|
50671
51265
|
type: "readonly",
|
|
@@ -50711,8 +51305,8 @@ function custom(fn, _params) {
|
|
|
50711
51305
|
function refine(fn, _params = {}) {
|
|
50712
51306
|
return _refine(ZodCustom, fn, _params);
|
|
50713
51307
|
}
|
|
50714
|
-
function superRefine(fn) {
|
|
50715
|
-
return _superRefine(fn);
|
|
51308
|
+
function superRefine(fn, params) {
|
|
51309
|
+
return _superRefine(fn, params);
|
|
50716
51310
|
}
|
|
50717
51311
|
function _instanceof(cls, params = {}) {
|
|
50718
51312
|
const inst = new ZodCustom({
|
|
@@ -50743,9 +51337,13 @@ function json(params) {
|
|
|
50743
51337
|
return jsonSchema;
|
|
50744
51338
|
}
|
|
50745
51339
|
function preprocess(fn, schema) {
|
|
50746
|
-
return
|
|
51340
|
+
return new ZodPreprocess({
|
|
51341
|
+
type: "pipe",
|
|
51342
|
+
in: transform2(fn),
|
|
51343
|
+
out: schema
|
|
51344
|
+
});
|
|
50747
51345
|
}
|
|
50748
|
-
var ZodType, _ZodString, ZodString, ZodStringFormat, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodMAC, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodCustomStringFormat, ZodNumber, ZodNumberFormat, ZodBoolean, ZodBigInt, ZodBigIntFormat, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodDate, ZodArray, ZodObject, ZodUnion, ZodXor, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodEnum, ZodLiteral, ZodFile, ZodTransform, ZodOptional, ZodExactOptional, ZodNullable, ZodDefault, ZodPrefault, ZodNonOptional, ZodSuccess, ZodCatch, ZodNaN, ZodPipe, ZodCodec, ZodReadonly, ZodTemplateLiteral, ZodLazy, ZodPromise, ZodFunction, ZodCustom, describe2, meta2, stringbool = (...args) => _stringbool({
|
|
51346
|
+
var _installedGroups, ZodType, _ZodString, ZodString, ZodStringFormat, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodMAC, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodCustomStringFormat, ZodNumber, ZodNumberFormat, ZodBoolean, ZodBigInt, ZodBigIntFormat, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodDate, ZodArray, ZodObject, ZodUnion, ZodXor, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodEnum, ZodLiteral, ZodFile, ZodTransform, ZodOptional, ZodExactOptional, ZodNullable, ZodDefault, ZodPrefault, ZodNonOptional, ZodSuccess, ZodCatch, ZodNaN, ZodPipe, ZodCodec, ZodPreprocess, ZodReadonly, ZodTemplateLiteral, ZodLazy, ZodPromise, ZodFunction, ZodCustom, describe2, meta2, stringbool = (...args) => _stringbool({
|
|
50749
51347
|
Codec: ZodCodec,
|
|
50750
51348
|
Boolean: ZodBoolean,
|
|
50751
51349
|
String: ZodString
|
|
@@ -50758,6 +51356,7 @@ var init_schemas2 = __esm(() => {
|
|
|
50758
51356
|
init_checks2();
|
|
50759
51357
|
init_iso();
|
|
50760
51358
|
init_parse2();
|
|
51359
|
+
_installedGroups = /* @__PURE__ */ new WeakMap;
|
|
50761
51360
|
ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
50762
51361
|
$ZodType.init(inst, def);
|
|
50763
51362
|
Object.assign(inst["~standard"], {
|
|
@@ -50770,23 +51369,6 @@ var init_schemas2 = __esm(() => {
|
|
|
50770
51369
|
inst.def = def;
|
|
50771
51370
|
inst.type = def.type;
|
|
50772
51371
|
Object.defineProperty(inst, "_def", { value: def });
|
|
50773
|
-
inst.check = (...checks2) => {
|
|
50774
|
-
return inst.clone(exports_util.mergeDefs(def, {
|
|
50775
|
-
checks: [
|
|
50776
|
-
...def.checks ?? [],
|
|
50777
|
-
...checks2.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
50778
|
-
]
|
|
50779
|
-
}), {
|
|
50780
|
-
parent: true
|
|
50781
|
-
});
|
|
50782
|
-
};
|
|
50783
|
-
inst.with = inst.check;
|
|
50784
|
-
inst.clone = (def2, params) => clone2(inst, def2, params);
|
|
50785
|
-
inst.brand = () => inst;
|
|
50786
|
-
inst.register = (reg, meta2) => {
|
|
50787
|
-
reg.add(inst, meta2);
|
|
50788
|
-
return inst;
|
|
50789
|
-
};
|
|
50790
51372
|
inst.parse = (data, params) => parse3(inst, data, params, { callee: inst.parse });
|
|
50791
51373
|
inst.safeParse = (data, params) => safeParse2(inst, data, params);
|
|
50792
51374
|
inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
|
|
@@ -50800,45 +51382,108 @@ var init_schemas2 = __esm(() => {
|
|
|
50800
51382
|
inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
|
|
50801
51383
|
inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
|
|
50802
51384
|
inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
|
|
50803
|
-
inst
|
|
50804
|
-
|
|
50805
|
-
|
|
50806
|
-
|
|
50807
|
-
|
|
50808
|
-
|
|
50809
|
-
|
|
50810
|
-
|
|
50811
|
-
|
|
50812
|
-
|
|
50813
|
-
|
|
50814
|
-
|
|
50815
|
-
|
|
50816
|
-
|
|
50817
|
-
|
|
50818
|
-
|
|
50819
|
-
|
|
50820
|
-
|
|
50821
|
-
|
|
50822
|
-
|
|
50823
|
-
|
|
50824
|
-
|
|
51385
|
+
_installLazyMethods(inst, "ZodType", {
|
|
51386
|
+
check(...chks) {
|
|
51387
|
+
const def2 = this.def;
|
|
51388
|
+
return this.clone(exports_util.mergeDefs(def2, {
|
|
51389
|
+
checks: [
|
|
51390
|
+
...def2.checks ?? [],
|
|
51391
|
+
...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
51392
|
+
]
|
|
51393
|
+
}), { parent: true });
|
|
51394
|
+
},
|
|
51395
|
+
with(...chks) {
|
|
51396
|
+
return this.check(...chks);
|
|
51397
|
+
},
|
|
51398
|
+
clone(def2, params) {
|
|
51399
|
+
return clone2(this, def2, params);
|
|
51400
|
+
},
|
|
51401
|
+
brand() {
|
|
51402
|
+
return this;
|
|
51403
|
+
},
|
|
51404
|
+
register(reg, meta2) {
|
|
51405
|
+
reg.add(this, meta2);
|
|
51406
|
+
return this;
|
|
51407
|
+
},
|
|
51408
|
+
refine(check, params) {
|
|
51409
|
+
return this.check(refine(check, params));
|
|
51410
|
+
},
|
|
51411
|
+
superRefine(refinement, params) {
|
|
51412
|
+
return this.check(superRefine(refinement, params));
|
|
51413
|
+
},
|
|
51414
|
+
overwrite(fn) {
|
|
51415
|
+
return this.check(_overwrite(fn));
|
|
51416
|
+
},
|
|
51417
|
+
optional() {
|
|
51418
|
+
return optional(this);
|
|
51419
|
+
},
|
|
51420
|
+
exactOptional() {
|
|
51421
|
+
return exactOptional(this);
|
|
51422
|
+
},
|
|
51423
|
+
nullable() {
|
|
51424
|
+
return nullable(this);
|
|
51425
|
+
},
|
|
51426
|
+
nullish() {
|
|
51427
|
+
return optional(nullable(this));
|
|
51428
|
+
},
|
|
51429
|
+
nonoptional(params) {
|
|
51430
|
+
return nonoptional(this, params);
|
|
51431
|
+
},
|
|
51432
|
+
array() {
|
|
51433
|
+
return array(this);
|
|
51434
|
+
},
|
|
51435
|
+
or(arg) {
|
|
51436
|
+
return union2([this, arg]);
|
|
51437
|
+
},
|
|
51438
|
+
and(arg) {
|
|
51439
|
+
return intersection2(this, arg);
|
|
51440
|
+
},
|
|
51441
|
+
transform(tx) {
|
|
51442
|
+
return pipe(this, transform2(tx));
|
|
51443
|
+
},
|
|
51444
|
+
default(d) {
|
|
51445
|
+
return _default2(this, d);
|
|
51446
|
+
},
|
|
51447
|
+
prefault(d) {
|
|
51448
|
+
return prefault(this, d);
|
|
51449
|
+
},
|
|
51450
|
+
catch(params) {
|
|
51451
|
+
return _catch2(this, params);
|
|
51452
|
+
},
|
|
51453
|
+
pipe(target) {
|
|
51454
|
+
return pipe(this, target);
|
|
51455
|
+
},
|
|
51456
|
+
readonly() {
|
|
51457
|
+
return readonly(this);
|
|
51458
|
+
},
|
|
51459
|
+
describe(description) {
|
|
51460
|
+
const cl = this.clone();
|
|
51461
|
+
globalRegistry.add(cl, { description });
|
|
51462
|
+
return cl;
|
|
51463
|
+
},
|
|
51464
|
+
meta(...args) {
|
|
51465
|
+
if (args.length === 0)
|
|
51466
|
+
return globalRegistry.get(this);
|
|
51467
|
+
const cl = this.clone();
|
|
51468
|
+
globalRegistry.add(cl, args[0]);
|
|
51469
|
+
return cl;
|
|
51470
|
+
},
|
|
51471
|
+
isOptional() {
|
|
51472
|
+
return this.safeParse(undefined).success;
|
|
51473
|
+
},
|
|
51474
|
+
isNullable() {
|
|
51475
|
+
return this.safeParse(null).success;
|
|
51476
|
+
},
|
|
51477
|
+
apply(fn) {
|
|
51478
|
+
return fn(this);
|
|
51479
|
+
}
|
|
51480
|
+
});
|
|
50825
51481
|
Object.defineProperty(inst, "description", {
|
|
50826
51482
|
get() {
|
|
50827
51483
|
return globalRegistry.get(inst)?.description;
|
|
50828
51484
|
},
|
|
50829
51485
|
configurable: true
|
|
50830
51486
|
});
|
|
50831
|
-
inst.meta = (...args) => {
|
|
50832
|
-
if (args.length === 0) {
|
|
50833
|
-
return globalRegistry.get(inst);
|
|
50834
|
-
}
|
|
50835
|
-
const cl = inst.clone();
|
|
50836
|
-
globalRegistry.add(cl, args[0]);
|
|
50837
|
-
return cl;
|
|
50838
|
-
};
|
|
50839
|
-
inst.isOptional = () => inst.safeParse(undefined).success;
|
|
50840
|
-
inst.isNullable = () => inst.safeParse(null).success;
|
|
50841
|
-
inst.apply = (fn) => fn(inst);
|
|
50842
51487
|
return inst;
|
|
50843
51488
|
});
|
|
50844
51489
|
_ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
@@ -50849,21 +51494,53 @@ var init_schemas2 = __esm(() => {
|
|
|
50849
51494
|
inst.format = bag.format ?? null;
|
|
50850
51495
|
inst.minLength = bag.minimum ?? null;
|
|
50851
51496
|
inst.maxLength = bag.maximum ?? null;
|
|
50852
|
-
inst
|
|
50853
|
-
|
|
50854
|
-
|
|
50855
|
-
|
|
50856
|
-
|
|
50857
|
-
|
|
50858
|
-
|
|
50859
|
-
|
|
50860
|
-
|
|
50861
|
-
|
|
50862
|
-
|
|
50863
|
-
|
|
50864
|
-
|
|
50865
|
-
|
|
50866
|
-
|
|
51497
|
+
_installLazyMethods(inst, "_ZodString", {
|
|
51498
|
+
regex(...args) {
|
|
51499
|
+
return this.check(_regex(...args));
|
|
51500
|
+
},
|
|
51501
|
+
includes(...args) {
|
|
51502
|
+
return this.check(_includes(...args));
|
|
51503
|
+
},
|
|
51504
|
+
startsWith(...args) {
|
|
51505
|
+
return this.check(_startsWith(...args));
|
|
51506
|
+
},
|
|
51507
|
+
endsWith(...args) {
|
|
51508
|
+
return this.check(_endsWith(...args));
|
|
51509
|
+
},
|
|
51510
|
+
min(...args) {
|
|
51511
|
+
return this.check(_minLength(...args));
|
|
51512
|
+
},
|
|
51513
|
+
max(...args) {
|
|
51514
|
+
return this.check(_maxLength(...args));
|
|
51515
|
+
},
|
|
51516
|
+
length(...args) {
|
|
51517
|
+
return this.check(_length(...args));
|
|
51518
|
+
},
|
|
51519
|
+
nonempty(...args) {
|
|
51520
|
+
return this.check(_minLength(1, ...args));
|
|
51521
|
+
},
|
|
51522
|
+
lowercase(params) {
|
|
51523
|
+
return this.check(_lowercase(params));
|
|
51524
|
+
},
|
|
51525
|
+
uppercase(params) {
|
|
51526
|
+
return this.check(_uppercase(params));
|
|
51527
|
+
},
|
|
51528
|
+
trim() {
|
|
51529
|
+
return this.check(_trim());
|
|
51530
|
+
},
|
|
51531
|
+
normalize(...args) {
|
|
51532
|
+
return this.check(_normalize(...args));
|
|
51533
|
+
},
|
|
51534
|
+
toLowerCase() {
|
|
51535
|
+
return this.check(_toLowerCase());
|
|
51536
|
+
},
|
|
51537
|
+
toUpperCase() {
|
|
51538
|
+
return this.check(_toUpperCase());
|
|
51539
|
+
},
|
|
51540
|
+
slugify() {
|
|
51541
|
+
return this.check(_slugify());
|
|
51542
|
+
}
|
|
51543
|
+
});
|
|
50867
51544
|
});
|
|
50868
51545
|
ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
50869
51546
|
$ZodString.init(inst, def);
|
|
@@ -50988,21 +51665,53 @@ var init_schemas2 = __esm(() => {
|
|
|
50988
51665
|
$ZodNumber.init(inst, def);
|
|
50989
51666
|
ZodType.init(inst, def);
|
|
50990
51667
|
inst._zod.processJSONSchema = (ctx, json, params) => numberProcessor(inst, ctx, json, params);
|
|
50991
|
-
inst
|
|
50992
|
-
|
|
50993
|
-
|
|
50994
|
-
|
|
50995
|
-
|
|
50996
|
-
|
|
50997
|
-
|
|
50998
|
-
|
|
50999
|
-
|
|
51000
|
-
|
|
51001
|
-
|
|
51002
|
-
|
|
51003
|
-
|
|
51004
|
-
|
|
51005
|
-
|
|
51668
|
+
_installLazyMethods(inst, "ZodNumber", {
|
|
51669
|
+
gt(value, params) {
|
|
51670
|
+
return this.check(_gt(value, params));
|
|
51671
|
+
},
|
|
51672
|
+
gte(value, params) {
|
|
51673
|
+
return this.check(_gte(value, params));
|
|
51674
|
+
},
|
|
51675
|
+
min(value, params) {
|
|
51676
|
+
return this.check(_gte(value, params));
|
|
51677
|
+
},
|
|
51678
|
+
lt(value, params) {
|
|
51679
|
+
return this.check(_lt(value, params));
|
|
51680
|
+
},
|
|
51681
|
+
lte(value, params) {
|
|
51682
|
+
return this.check(_lte(value, params));
|
|
51683
|
+
},
|
|
51684
|
+
max(value, params) {
|
|
51685
|
+
return this.check(_lte(value, params));
|
|
51686
|
+
},
|
|
51687
|
+
int(params) {
|
|
51688
|
+
return this.check(int(params));
|
|
51689
|
+
},
|
|
51690
|
+
safe(params) {
|
|
51691
|
+
return this.check(int(params));
|
|
51692
|
+
},
|
|
51693
|
+
positive(params) {
|
|
51694
|
+
return this.check(_gt(0, params));
|
|
51695
|
+
},
|
|
51696
|
+
nonnegative(params) {
|
|
51697
|
+
return this.check(_gte(0, params));
|
|
51698
|
+
},
|
|
51699
|
+
negative(params) {
|
|
51700
|
+
return this.check(_lt(0, params));
|
|
51701
|
+
},
|
|
51702
|
+
nonpositive(params) {
|
|
51703
|
+
return this.check(_lte(0, params));
|
|
51704
|
+
},
|
|
51705
|
+
multipleOf(value, params) {
|
|
51706
|
+
return this.check(_multipleOf(value, params));
|
|
51707
|
+
},
|
|
51708
|
+
step(value, params) {
|
|
51709
|
+
return this.check(_multipleOf(value, params));
|
|
51710
|
+
},
|
|
51711
|
+
finite() {
|
|
51712
|
+
return this;
|
|
51713
|
+
}
|
|
51714
|
+
});
|
|
51006
51715
|
const bag = inst._zod.bag;
|
|
51007
51716
|
inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
51008
51717
|
inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
|
|
@@ -51095,11 +51804,23 @@ var init_schemas2 = __esm(() => {
|
|
|
51095
51804
|
ZodType.init(inst, def);
|
|
51096
51805
|
inst._zod.processJSONSchema = (ctx, json, params) => arrayProcessor(inst, ctx, json, params);
|
|
51097
51806
|
inst.element = def.element;
|
|
51098
|
-
inst
|
|
51099
|
-
|
|
51100
|
-
|
|
51101
|
-
|
|
51102
|
-
|
|
51807
|
+
_installLazyMethods(inst, "ZodArray", {
|
|
51808
|
+
min(n, params) {
|
|
51809
|
+
return this.check(_minLength(n, params));
|
|
51810
|
+
},
|
|
51811
|
+
nonempty(params) {
|
|
51812
|
+
return this.check(_minLength(1, params));
|
|
51813
|
+
},
|
|
51814
|
+
max(n, params) {
|
|
51815
|
+
return this.check(_maxLength(n, params));
|
|
51816
|
+
},
|
|
51817
|
+
length(n, params) {
|
|
51818
|
+
return this.check(_length(n, params));
|
|
51819
|
+
},
|
|
51820
|
+
unwrap() {
|
|
51821
|
+
return this.element;
|
|
51822
|
+
}
|
|
51823
|
+
});
|
|
51103
51824
|
});
|
|
51104
51825
|
ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
51105
51826
|
$ZodObjectJIT.init(inst, def);
|
|
@@ -51108,23 +51829,47 @@ var init_schemas2 = __esm(() => {
|
|
|
51108
51829
|
exports_util.defineLazy(inst, "shape", () => {
|
|
51109
51830
|
return def.shape;
|
|
51110
51831
|
});
|
|
51111
|
-
inst
|
|
51112
|
-
|
|
51113
|
-
|
|
51114
|
-
|
|
51115
|
-
|
|
51116
|
-
|
|
51117
|
-
|
|
51118
|
-
|
|
51119
|
-
|
|
51120
|
-
|
|
51121
|
-
|
|
51122
|
-
|
|
51123
|
-
|
|
51124
|
-
|
|
51125
|
-
|
|
51126
|
-
|
|
51127
|
-
|
|
51832
|
+
_installLazyMethods(inst, "ZodObject", {
|
|
51833
|
+
keyof() {
|
|
51834
|
+
return _enum2(Object.keys(this._zod.def.shape));
|
|
51835
|
+
},
|
|
51836
|
+
catchall(catchall) {
|
|
51837
|
+
return this.clone({ ...this._zod.def, catchall });
|
|
51838
|
+
},
|
|
51839
|
+
passthrough() {
|
|
51840
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
51841
|
+
},
|
|
51842
|
+
loose() {
|
|
51843
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
51844
|
+
},
|
|
51845
|
+
strict() {
|
|
51846
|
+
return this.clone({ ...this._zod.def, catchall: never() });
|
|
51847
|
+
},
|
|
51848
|
+
strip() {
|
|
51849
|
+
return this.clone({ ...this._zod.def, catchall: undefined });
|
|
51850
|
+
},
|
|
51851
|
+
extend(incoming) {
|
|
51852
|
+
return exports_util.extend(this, incoming);
|
|
51853
|
+
},
|
|
51854
|
+
safeExtend(incoming) {
|
|
51855
|
+
return exports_util.safeExtend(this, incoming);
|
|
51856
|
+
},
|
|
51857
|
+
merge(other) {
|
|
51858
|
+
return exports_util.merge(this, other);
|
|
51859
|
+
},
|
|
51860
|
+
pick(mask) {
|
|
51861
|
+
return exports_util.pick(this, mask);
|
|
51862
|
+
},
|
|
51863
|
+
omit(mask) {
|
|
51864
|
+
return exports_util.omit(this, mask);
|
|
51865
|
+
},
|
|
51866
|
+
partial(...args) {
|
|
51867
|
+
return exports_util.partial(ZodOptional, this, args[0]);
|
|
51868
|
+
},
|
|
51869
|
+
required(...args) {
|
|
51870
|
+
return exports_util.required(ZodNonOptional, this, args[0]);
|
|
51871
|
+
}
|
|
51872
|
+
});
|
|
51128
51873
|
});
|
|
51129
51874
|
ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
|
|
51130
51875
|
$ZodUnion.init(inst, def);
|
|
@@ -51268,10 +52013,12 @@ var init_schemas2 = __esm(() => {
|
|
|
51268
52013
|
if (output instanceof Promise) {
|
|
51269
52014
|
return output.then((output2) => {
|
|
51270
52015
|
payload.value = output2;
|
|
52016
|
+
payload.fallback = true;
|
|
51271
52017
|
return payload;
|
|
51272
52018
|
});
|
|
51273
52019
|
}
|
|
51274
52020
|
payload.value = output;
|
|
52021
|
+
payload.fallback = true;
|
|
51275
52022
|
return payload;
|
|
51276
52023
|
};
|
|
51277
52024
|
});
|
|
@@ -51341,6 +52088,10 @@ var init_schemas2 = __esm(() => {
|
|
|
51341
52088
|
ZodPipe.init(inst, def);
|
|
51342
52089
|
$ZodCodec.init(inst, def);
|
|
51343
52090
|
});
|
|
52091
|
+
ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
|
|
52092
|
+
ZodPipe.init(inst, def);
|
|
52093
|
+
$ZodPreprocess.init(inst, def);
|
|
52094
|
+
});
|
|
51344
52095
|
ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
51345
52096
|
$ZodReadonly.init(inst, def);
|
|
51346
52097
|
ZodType.init(inst, def);
|
|
@@ -51722,12 +52473,6 @@ function convertBaseSchema(schema, ctx) {
|
|
|
51722
52473
|
default:
|
|
51723
52474
|
throw new Error(`Unsupported type: ${type}`);
|
|
51724
52475
|
}
|
|
51725
|
-
if (schema.description) {
|
|
51726
|
-
zodSchema = zodSchema.describe(schema.description);
|
|
51727
|
-
}
|
|
51728
|
-
if (schema.default !== undefined) {
|
|
51729
|
-
zodSchema = zodSchema.default(schema.default);
|
|
51730
|
-
}
|
|
51731
52476
|
return zodSchema;
|
|
51732
52477
|
}
|
|
51733
52478
|
function convertSchema(schema, ctx) {
|
|
@@ -51764,6 +52509,9 @@ function convertSchema(schema, ctx) {
|
|
|
51764
52509
|
if (schema.readOnly === true) {
|
|
51765
52510
|
baseSchema = z.readonly(baseSchema);
|
|
51766
52511
|
}
|
|
52512
|
+
if (schema.default !== undefined) {
|
|
52513
|
+
baseSchema = baseSchema.default(schema.default);
|
|
52514
|
+
}
|
|
51767
52515
|
const extraMeta = {};
|
|
51768
52516
|
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
51769
52517
|
for (const key of coreMetadataKeys) {
|
|
@@ -51785,23 +52533,32 @@ function convertSchema(schema, ctx) {
|
|
|
51785
52533
|
if (Object.keys(extraMeta).length > 0) {
|
|
51786
52534
|
ctx.registry.add(baseSchema, extraMeta);
|
|
51787
52535
|
}
|
|
52536
|
+
if (schema.description) {
|
|
52537
|
+
baseSchema = baseSchema.describe(schema.description);
|
|
52538
|
+
}
|
|
51788
52539
|
return baseSchema;
|
|
51789
52540
|
}
|
|
51790
52541
|
function fromJSONSchema(schema, params) {
|
|
51791
52542
|
if (typeof schema === "boolean") {
|
|
51792
52543
|
return schema ? z.any() : z.never();
|
|
51793
52544
|
}
|
|
51794
|
-
|
|
51795
|
-
|
|
52545
|
+
let normalized;
|
|
52546
|
+
try {
|
|
52547
|
+
normalized = JSON.parse(JSON.stringify(schema));
|
|
52548
|
+
} catch {
|
|
52549
|
+
throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
|
|
52550
|
+
}
|
|
52551
|
+
const version2 = detectVersion(normalized, params?.defaultTarget);
|
|
52552
|
+
const defs = normalized.$defs || normalized.definitions || {};
|
|
51796
52553
|
const ctx = {
|
|
51797
52554
|
version: version2,
|
|
51798
52555
|
defs,
|
|
51799
52556
|
refs: new Map,
|
|
51800
52557
|
processing: new Set,
|
|
51801
|
-
rootSchema:
|
|
52558
|
+
rootSchema: normalized,
|
|
51802
52559
|
registry: params?.registry ?? globalRegistry
|
|
51803
52560
|
};
|
|
51804
|
-
return convertSchema(
|
|
52561
|
+
return convertSchema(normalized, ctx);
|
|
51805
52562
|
}
|
|
51806
52563
|
var z, RECOGNIZED_KEYS;
|
|
51807
52564
|
var init_from_json_schema = __esm(() => {
|
|
@@ -51814,7 +52571,7 @@ var init_from_json_schema = __esm(() => {
|
|
|
51814
52571
|
...exports_checks2,
|
|
51815
52572
|
iso: exports_iso
|
|
51816
52573
|
};
|
|
51817
|
-
RECOGNIZED_KEYS = new Set([
|
|
52574
|
+
RECOGNIZED_KEYS = /* @__PURE__ */ new Set([
|
|
51818
52575
|
"$schema",
|
|
51819
52576
|
"$ref",
|
|
51820
52577
|
"$defs",
|
|
@@ -52006,6 +52763,7 @@ __export(exports_external, {
|
|
|
52006
52763
|
iso: () => exports_iso,
|
|
52007
52764
|
ipv6: () => ipv62,
|
|
52008
52765
|
ipv4: () => ipv42,
|
|
52766
|
+
invertCodec: () => invertCodec,
|
|
52009
52767
|
intersection: () => intersection2,
|
|
52010
52768
|
int64: () => int64,
|
|
52011
52769
|
int32: () => int32,
|
|
@@ -52084,6 +52842,7 @@ __export(exports_external, {
|
|
|
52084
52842
|
ZodRealError: () => ZodRealError,
|
|
52085
52843
|
ZodReadonly: () => ZodReadonly,
|
|
52086
52844
|
ZodPromise: () => ZodPromise,
|
|
52845
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
52087
52846
|
ZodPrefault: () => ZodPrefault,
|
|
52088
52847
|
ZodPipe: () => ZodPipe,
|
|
52089
52848
|
ZodOptional: () => ZodOptional,
|
|
@@ -52787,6 +53546,7 @@ function runGitArgs(args, context, cacheCommand) {
|
|
|
52787
53546
|
const output = execFileSync("git", args, {
|
|
52788
53547
|
encoding: "utf8",
|
|
52789
53548
|
stdio: ["pipe", "pipe", "ignore"],
|
|
53549
|
+
env: { ...process.env, GIT_OPTIONAL_LOCKS: "0" },
|
|
52790
53550
|
...cwd2 ? { cwd: cwd2 } : {}
|
|
52791
53551
|
}).trimEnd();
|
|
52792
53552
|
const result2 = output.length > 0 ? output : null;
|
|
@@ -52822,7 +53582,7 @@ function hasRenameOrCopyStatus(line) {
|
|
|
52822
53582
|
return line.startsWith("R") || line.startsWith("C") || line[1] === "R" || line[1] === "C";
|
|
52823
53583
|
}
|
|
52824
53584
|
function getGitStatus(context) {
|
|
52825
|
-
const output = runGit("
|
|
53585
|
+
const output = runGit("status --porcelain -z", context);
|
|
52826
53586
|
if (!output) {
|
|
52827
53587
|
return { staged: false, unstaged: false, untracked: false, conflicts: false };
|
|
52828
53588
|
}
|
|
@@ -52852,7 +53612,7 @@ function getGitStatus(context) {
|
|
|
52852
53612
|
return { staged, unstaged, untracked, conflicts };
|
|
52853
53613
|
}
|
|
52854
53614
|
function getGitFileStatusCounts(context) {
|
|
52855
|
-
const output = runGit("
|
|
53615
|
+
const output = runGit("status --porcelain -z", context);
|
|
52856
53616
|
if (!output) {
|
|
52857
53617
|
return { staged: 0, unstaged: 0, untracked: 0 };
|
|
52858
53618
|
}
|
|
@@ -53173,7 +53933,7 @@ class GitBranchWidget {
|
|
|
53173
53933
|
return displayText;
|
|
53174
53934
|
}
|
|
53175
53935
|
getGitBranch(context) {
|
|
53176
|
-
return runGit("
|
|
53936
|
+
return runGit("symbolic-ref --short HEAD", context);
|
|
53177
53937
|
}
|
|
53178
53938
|
getCustomKeybinds() {
|
|
53179
53939
|
return [
|
|
@@ -53706,7 +54466,7 @@ function runGitForCache(args, cwd2, deps) {
|
|
|
53706
54466
|
}
|
|
53707
54467
|
}
|
|
53708
54468
|
function getCurrentBranch(cwd2, deps) {
|
|
53709
|
-
const branch = runGitForCache(["
|
|
54469
|
+
const branch = runGitForCache(["symbolic-ref", "--short", "HEAD"], cwd2, deps);
|
|
53710
54470
|
return branch.length > 0 ? branch : null;
|
|
53711
54471
|
}
|
|
53712
54472
|
function getCacheRef(cwd2, deps) {
|
|
@@ -56065,7 +56825,7 @@ function getTerminalWidth() {
|
|
|
56065
56825
|
function canDetectTerminalWidth() {
|
|
56066
56826
|
return probeTerminalWidth() !== null;
|
|
56067
56827
|
}
|
|
56068
|
-
var __dirname = "/Users/bytedance/Documents/code/ai/ccstatusline-zh/src/utils", PACKAGE_VERSION = "2.2.
|
|
56828
|
+
var __dirname = "/Users/bytedance/Documents/code/ai/ccstatusline-zh/src/utils", PACKAGE_VERSION = "2.2.18";
|
|
56069
56829
|
var init_terminal = () => {};
|
|
56070
56830
|
|
|
56071
56831
|
// src/utils/renderer.ts
|
|
@@ -58161,9 +58921,9 @@ class CustomCommandWidget {
|
|
|
58161
58921
|
output = output.substring(0, item.maxWidth - 3) + "...";
|
|
58162
58922
|
}
|
|
58163
58923
|
return output || null;
|
|
58164
|
-
} catch (
|
|
58165
|
-
if (
|
|
58166
|
-
const execError =
|
|
58924
|
+
} catch (error51) {
|
|
58925
|
+
if (error51 instanceof Error) {
|
|
58926
|
+
const execError = error51;
|
|
58167
58927
|
if (execError.code === "ENOENT") {
|
|
58168
58928
|
return "[命令未找到]";
|
|
58169
58929
|
} else if (execError.code === "ETIMEDOUT") {
|
|
@@ -58779,13 +59539,13 @@ var require_browser = __commonJS((exports, module) => {
|
|
|
58779
59539
|
} else {
|
|
58780
59540
|
exports.storage.removeItem("debug");
|
|
58781
59541
|
}
|
|
58782
|
-
} catch (
|
|
59542
|
+
} catch (error51) {}
|
|
58783
59543
|
}
|
|
58784
59544
|
function load() {
|
|
58785
59545
|
let r;
|
|
58786
59546
|
try {
|
|
58787
59547
|
r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
|
|
58788
|
-
} catch (
|
|
59548
|
+
} catch (error51) {}
|
|
58789
59549
|
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
58790
59550
|
r = process.env.DEBUG;
|
|
58791
59551
|
}
|
|
@@ -58794,15 +59554,15 @@ var require_browser = __commonJS((exports, module) => {
|
|
|
58794
59554
|
function localstorage() {
|
|
58795
59555
|
try {
|
|
58796
59556
|
return localStorage;
|
|
58797
|
-
} catch (
|
|
59557
|
+
} catch (error51) {}
|
|
58798
59558
|
}
|
|
58799
59559
|
module.exports = require_common()(exports);
|
|
58800
59560
|
var { formatters } = module.exports;
|
|
58801
59561
|
formatters.j = function(v) {
|
|
58802
59562
|
try {
|
|
58803
59563
|
return JSON.stringify(v);
|
|
58804
|
-
} catch (
|
|
58805
|
-
return "[UnexpectedJSONParseError]: " +
|
|
59564
|
+
} catch (error51) {
|
|
59565
|
+
return "[UnexpectedJSONParseError]: " + error51.message;
|
|
58806
59566
|
}
|
|
58807
59567
|
};
|
|
58808
59568
|
});
|
|
@@ -59022,7 +59782,7 @@ var require_node = __commonJS((exports, module) => {
|
|
|
59022
59782
|
221
|
|
59023
59783
|
];
|
|
59024
59784
|
}
|
|
59025
|
-
} catch (
|
|
59785
|
+
} catch (error51) {}
|
|
59026
59786
|
exports.inspectOpts = Object.keys(process.env).filter((key) => {
|
|
59027
59787
|
return /^debug_/i.test(key);
|
|
59028
59788
|
}).reduce((obj, key) => {
|
|
@@ -59437,6 +60197,9 @@ import * as fs3 from "fs";
|
|
|
59437
60197
|
import * as https from "https";
|
|
59438
60198
|
import * as os4 from "os";
|
|
59439
60199
|
import * as path3 from "path";
|
|
60200
|
+
function getUsageApiBucketUtilization(bucket) {
|
|
60201
|
+
return bucket === null ? 0 : bucket?.utilization ?? undefined;
|
|
60202
|
+
}
|
|
59440
60203
|
function parseJsonWithSchema(rawJson, schema) {
|
|
59441
60204
|
try {
|
|
59442
60205
|
const parsed = schema.safeParse(JSON.parse(rawJson));
|
|
@@ -59477,13 +60240,13 @@ function parseUsageApiResponse(rawJson) {
|
|
|
59477
60240
|
return null;
|
|
59478
60241
|
}
|
|
59479
60242
|
return {
|
|
59480
|
-
sessionUsage: parsed.five_hour
|
|
60243
|
+
sessionUsage: getUsageApiBucketUtilization(parsed.five_hour),
|
|
59481
60244
|
sessionResetAt: parsed.five_hour?.resets_at ?? undefined,
|
|
59482
|
-
weeklyUsage: parsed.seven_day
|
|
60245
|
+
weeklyUsage: getUsageApiBucketUtilization(parsed.seven_day),
|
|
59483
60246
|
weeklyResetAt: parsed.seven_day?.resets_at ?? undefined,
|
|
59484
|
-
weeklySonnetUsage: parsed.seven_day_sonnet
|
|
60247
|
+
weeklySonnetUsage: getUsageApiBucketUtilization(parsed.seven_day_sonnet),
|
|
59485
60248
|
weeklySonnetResetAt: parsed.seven_day_sonnet?.resets_at ?? undefined,
|
|
59486
|
-
weeklyOpusUsage: parsed.seven_day_opus
|
|
60249
|
+
weeklyOpusUsage: getUsageApiBucketUtilization(parsed.seven_day_opus),
|
|
59487
60250
|
weeklyOpusResetAt: parsed.seven_day_opus?.resets_at ?? undefined,
|
|
59488
60251
|
extraUsageEnabled: parsed.extra_usage?.is_enabled ?? undefined,
|
|
59489
60252
|
extraUsageLimit: parsed.extra_usage?.monthly_limit ?? undefined,
|
|
@@ -59496,8 +60259,8 @@ function ensureCacheDirExists() {
|
|
|
59496
60259
|
fs3.mkdirSync(CACHE_DIR, { recursive: true });
|
|
59497
60260
|
}
|
|
59498
60261
|
}
|
|
59499
|
-
function setCachedUsageError(
|
|
59500
|
-
const errorData = { error:
|
|
60262
|
+
function setCachedUsageError(error51, now2, maxAge = LOCK_MAX_AGE) {
|
|
60263
|
+
const errorData = { error: error51 };
|
|
59501
60264
|
cachedUsageData = errorData;
|
|
59502
60265
|
usageCacheTime = now2;
|
|
59503
60266
|
usageErrorCacheMaxAge = maxAge;
|
|
@@ -59509,15 +60272,21 @@ function cacheUsageData(data, now2) {
|
|
|
59509
60272
|
usageErrorCacheMaxAge = LOCK_MAX_AGE;
|
|
59510
60273
|
return data;
|
|
59511
60274
|
}
|
|
60275
|
+
function hasRequiredUsageField(data, field) {
|
|
60276
|
+
if (data[field] !== undefined) {
|
|
60277
|
+
return true;
|
|
60278
|
+
}
|
|
60279
|
+
return data.extraUsageEnabled === false && EXTRA_USAGE_DETAIL_FIELDS.has(field);
|
|
60280
|
+
}
|
|
59512
60281
|
function hasRequiredUsageFields(data, requiredFields = []) {
|
|
59513
|
-
return requiredFields.every((field) => data
|
|
60282
|
+
return requiredFields.every((field) => hasRequiredUsageField(data, field));
|
|
59514
60283
|
}
|
|
59515
|
-
function getStaleUsageOrError(
|
|
60284
|
+
function getStaleUsageOrError(error51, now2, errorCacheMaxAge = LOCK_MAX_AGE, requiredFields = []) {
|
|
59516
60285
|
const stale = readStaleUsageCache();
|
|
59517
60286
|
if (stale && !stale.error && hasRequiredUsageFields(stale, requiredFields)) {
|
|
59518
60287
|
return cacheUsageData(stale, now2);
|
|
59519
60288
|
}
|
|
59520
|
-
return setCachedUsageError(
|
|
60289
|
+
return setCachedUsageError(error51, now2, errorCacheMaxAge);
|
|
59521
60290
|
}
|
|
59522
60291
|
function normalizeSecurityTimedateValue(rawValue) {
|
|
59523
60292
|
const cleaned = rawValue.replace(/\\000/g, "").replace(/\0/g, "").trim();
|
|
@@ -59641,10 +60410,10 @@ function readStaleUsageCache() {
|
|
|
59641
60410
|
return null;
|
|
59642
60411
|
}
|
|
59643
60412
|
}
|
|
59644
|
-
function writeUsageLock(blockedUntil,
|
|
60413
|
+
function writeUsageLock(blockedUntil, error51) {
|
|
59645
60414
|
try {
|
|
59646
60415
|
ensureCacheDirExists();
|
|
59647
|
-
fs3.writeFileSync(LOCK_FILE, JSON.stringify({ blockedUntil, error:
|
|
60416
|
+
fs3.writeFileSync(LOCK_FILE, JSON.stringify({ blockedUntil, error: error51 }));
|
|
59648
60417
|
} catch {}
|
|
59649
60418
|
}
|
|
59650
60419
|
function readActiveUsageLock(now2) {
|
|
@@ -59808,9 +60577,11 @@ async function fetchUsageData(options = {}) {
|
|
|
59808
60577
|
}
|
|
59809
60578
|
const usageData = parseUsageApiResponse(response.body);
|
|
59810
60579
|
if (!usageData) {
|
|
60580
|
+
writeUsageLock(now2 + LOCK_MAX_AGE, "parse-error");
|
|
59811
60581
|
return getStaleUsageOrError("parse-error", now2, LOCK_MAX_AGE, requiredFields);
|
|
59812
60582
|
}
|
|
59813
60583
|
if (usageData.sessionUsage === undefined && usageData.weeklyUsage === undefined) {
|
|
60584
|
+
writeUsageLock(now2 + LOCK_MAX_AGE, "parse-error");
|
|
59814
60585
|
return getStaleUsageOrError("parse-error", now2, LOCK_MAX_AGE, requiredFields);
|
|
59815
60586
|
}
|
|
59816
60587
|
try {
|
|
@@ -59819,10 +60590,11 @@ async function fetchUsageData(options = {}) {
|
|
|
59819
60590
|
} catch {}
|
|
59820
60591
|
return cacheUsageData(usageData, now2);
|
|
59821
60592
|
} catch {
|
|
60593
|
+
writeUsageLock(now2 + LOCK_MAX_AGE, "parse-error");
|
|
59822
60594
|
return getStaleUsageOrError("parse-error", now2, LOCK_MAX_AGE, requiredFields);
|
|
59823
60595
|
}
|
|
59824
60596
|
}
|
|
59825
|
-
var CACHE_DIR, CACHE_FILE, LOCK_FILE, CACHE_MAX_AGE = 180, LOCK_MAX_AGE = 30, DEFAULT_RATE_LIMIT_BACKOFF = 300, MACOS_USAGE_CREDENTIALS_SERVICE = "Claude Code-credentials", MACOS_SECURITY_DUMP_MAX_BUFFER, UsageCredentialsSchema, UsageLockErrorSchema, UsageLockSchema, CachedUsageDataSchema,
|
|
60597
|
+
var CACHE_DIR, CACHE_FILE, LOCK_FILE, CACHE_MAX_AGE = 180, LOCK_MAX_AGE = 30, DEFAULT_RATE_LIMIT_BACKOFF = 300, MACOS_USAGE_CREDENTIALS_SERVICE = "Claude Code-credentials", MACOS_SECURITY_DUMP_MAX_BUFFER, EXTRA_USAGE_DETAIL_FIELDS, UsageCredentialsSchema, UsageLockErrorSchema, UsageLockSchema, CachedUsageDataSchema, UsageApiBucketSchema, UsageApiResponseSchema, cachedUsageData = null, usageCacheTime = 0, usageErrorCacheMaxAge, USAGE_API_HOST = "api.anthropic.com", USAGE_API_PATH = "/api/oauth/usage", USAGE_API_TIMEOUT_MS = 5000;
|
|
59826
60598
|
var init_usage_fetch = __esm(async () => {
|
|
59827
60599
|
init_dist5();
|
|
59828
60600
|
init_zod();
|
|
@@ -59832,8 +60604,13 @@ var init_usage_fetch = __esm(async () => {
|
|
|
59832
60604
|
CACHE_FILE = path3.join(CACHE_DIR, "usage.json");
|
|
59833
60605
|
LOCK_FILE = path3.join(CACHE_DIR, "usage.lock");
|
|
59834
60606
|
MACOS_SECURITY_DUMP_MAX_BUFFER = 8 * 1024 * 1024;
|
|
60607
|
+
EXTRA_USAGE_DETAIL_FIELDS = new Set([
|
|
60608
|
+
"extraUsageLimit",
|
|
60609
|
+
"extraUsageUsed",
|
|
60610
|
+
"extraUsageUtilization"
|
|
60611
|
+
]);
|
|
59835
60612
|
UsageCredentialsSchema = exports_external.object({ claudeAiOauth: exports_external.object({ accessToken: exports_external.string().nullable().optional() }).optional() });
|
|
59836
|
-
UsageLockErrorSchema = exports_external.enum(["timeout", "rate-limited"]);
|
|
60613
|
+
UsageLockErrorSchema = exports_external.enum(["timeout", "rate-limited", "parse-error"]);
|
|
59837
60614
|
UsageLockSchema = exports_external.object({
|
|
59838
60615
|
blockedUntil: exports_external.number(),
|
|
59839
60616
|
error: UsageLockErrorSchema.optional()
|
|
@@ -59853,27 +60630,21 @@ var init_usage_fetch = __esm(async () => {
|
|
|
59853
60630
|
extraUsageUtilization: exports_external.number().nullable().optional(),
|
|
59854
60631
|
error: exports_external.string().nullable().optional()
|
|
59855
60632
|
});
|
|
59856
|
-
|
|
60633
|
+
UsageApiBucketSchema = exports_external.looseObject({
|
|
59857
60634
|
utilization: exports_external.number().nullable().optional(),
|
|
59858
60635
|
resets_at: exports_external.string().nullable().optional()
|
|
59859
60636
|
}).nullable().optional();
|
|
59860
|
-
UsageApiResponseSchema = exports_external.
|
|
59861
|
-
five_hour:
|
|
59862
|
-
|
|
59863
|
-
|
|
59864
|
-
|
|
59865
|
-
|
|
59866
|
-
utilization: exports_external.number().nullable().optional(),
|
|
59867
|
-
resets_at: exports_external.string().nullable().optional()
|
|
59868
|
-
}).optional(),
|
|
59869
|
-
seven_day_sonnet: PerModelWeeklyBucketSchema,
|
|
59870
|
-
seven_day_opus: PerModelWeeklyBucketSchema,
|
|
59871
|
-
extra_usage: exports_external.object({
|
|
60637
|
+
UsageApiResponseSchema = exports_external.looseObject({
|
|
60638
|
+
five_hour: UsageApiBucketSchema,
|
|
60639
|
+
seven_day: UsageApiBucketSchema,
|
|
60640
|
+
seven_day_sonnet: UsageApiBucketSchema,
|
|
60641
|
+
seven_day_opus: UsageApiBucketSchema,
|
|
60642
|
+
extra_usage: exports_external.looseObject({
|
|
59872
60643
|
is_enabled: exports_external.boolean().nullable().optional(),
|
|
59873
60644
|
monthly_limit: exports_external.number().nullable().optional(),
|
|
59874
60645
|
used_credits: exports_external.number().nullable().optional(),
|
|
59875
60646
|
utilization: exports_external.number().nullable().optional()
|
|
59876
|
-
}).optional()
|
|
60647
|
+
}).nullable().optional()
|
|
59877
60648
|
});
|
|
59878
60649
|
usageErrorCacheMaxAge = LOCK_MAX_AGE;
|
|
59879
60650
|
});
|
|
@@ -59989,9 +60760,9 @@ function isRecursive(path4, resolved, state) {
|
|
|
59989
60760
|
function isRecursiveUsingRealPaths(resolved, state) {
|
|
59990
60761
|
return state.visited.includes(resolved + state.options.pathSeparator);
|
|
59991
60762
|
}
|
|
59992
|
-
function report(
|
|
59993
|
-
if (
|
|
59994
|
-
callback$1(
|
|
60763
|
+
function report(error51, callback$1, output, suppressErrors) {
|
|
60764
|
+
if (error51 && !suppressErrors)
|
|
60765
|
+
callback$1(error51, output);
|
|
59995
60766
|
else
|
|
59996
60767
|
callback$1(null, output);
|
|
59997
60768
|
}
|
|
@@ -60055,9 +60826,9 @@ var __require2, SLASHES_REGEX, WINDOWS_ROOT_DIR_REGEX, pushDirectory = (director
|
|
|
60055
60826
|
}, empty = () => {}, resolveSymlinksAsync = function(path4, state, callback$1) {
|
|
60056
60827
|
const { queue, fs: fs4, options: { suppressErrors } } = state;
|
|
60057
60828
|
queue.enqueue();
|
|
60058
|
-
fs4.realpath(path4, (
|
|
60059
|
-
if (
|
|
60060
|
-
return queue.dequeue(suppressErrors ? null :
|
|
60829
|
+
fs4.realpath(path4, (error51, resolvedPath) => {
|
|
60830
|
+
if (error51)
|
|
60831
|
+
return queue.dequeue(suppressErrors ? null : error51, state);
|
|
60061
60832
|
fs4.stat(resolvedPath, (error$1, stat) => {
|
|
60062
60833
|
if (error$1)
|
|
60063
60834
|
return queue.dequeue(suppressErrors ? null : error$1, state);
|
|
@@ -60088,17 +60859,17 @@ var __require2, SLASHES_REGEX, WINDOWS_ROOT_DIR_REGEX, pushDirectory = (director
|
|
|
60088
60859
|
return state.paths;
|
|
60089
60860
|
}, limitFilesSync = (state) => {
|
|
60090
60861
|
return state.paths.slice(0, state.options.maxFiles);
|
|
60091
|
-
}, onlyCountsAsync = (state,
|
|
60092
|
-
report(
|
|
60862
|
+
}, onlyCountsAsync = (state, error51, callback$1) => {
|
|
60863
|
+
report(error51, callback$1, state.counts, state.options.suppressErrors);
|
|
60093
60864
|
return null;
|
|
60094
|
-
}, defaultAsync = (state,
|
|
60095
|
-
report(
|
|
60865
|
+
}, defaultAsync = (state, error51, callback$1) => {
|
|
60866
|
+
report(error51, callback$1, state.paths, state.options.suppressErrors);
|
|
60096
60867
|
return null;
|
|
60097
|
-
}, limitFilesAsync = (state,
|
|
60098
|
-
report(
|
|
60868
|
+
}, limitFilesAsync = (state, error51, callback$1) => {
|
|
60869
|
+
report(error51, callback$1, state.paths.slice(0, state.options.maxFiles), state.options.suppressErrors);
|
|
60099
60870
|
return null;
|
|
60100
|
-
}, groupsAsync = (state,
|
|
60101
|
-
report(
|
|
60871
|
+
}, groupsAsync = (state, error51, callback$1) => {
|
|
60872
|
+
report(error51, callback$1, state.groups, state.options.suppressErrors);
|
|
60102
60873
|
return null;
|
|
60103
60874
|
}, readdirOpts, walkAsync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
|
|
60104
60875
|
state.queue.enqueue();
|
|
@@ -60107,9 +60878,9 @@ var __require2, SLASHES_REGEX, WINDOWS_ROOT_DIR_REGEX, pushDirectory = (director
|
|
|
60107
60878
|
const { fs: fs4 } = state;
|
|
60108
60879
|
state.visited.push(crawlPath);
|
|
60109
60880
|
state.counts.directories++;
|
|
60110
|
-
fs4.readdir(crawlPath || ".", readdirOpts, (
|
|
60881
|
+
fs4.readdir(crawlPath || ".", readdirOpts, (error51, entries = []) => {
|
|
60111
60882
|
callback$1(entries, directoryPath, currentDepth);
|
|
60112
|
-
state.queue.dequeue(state.options.suppressErrors ? null :
|
|
60883
|
+
state.queue.dequeue(state.options.suppressErrors ? null : error51, state);
|
|
60113
60884
|
});
|
|
60114
60885
|
}, walkSync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
|
|
60115
60886
|
const { fs: fs4 } = state;
|
|
@@ -60134,10 +60905,10 @@ var __require2, SLASHES_REGEX, WINDOWS_ROOT_DIR_REGEX, pushDirectory = (director
|
|
|
60134
60905
|
this.count++;
|
|
60135
60906
|
return this.count;
|
|
60136
60907
|
}
|
|
60137
|
-
dequeue(
|
|
60138
|
-
if (this.onQueueEmpty && (--this.count <= 0 ||
|
|
60139
|
-
this.onQueueEmpty(
|
|
60140
|
-
if (
|
|
60908
|
+
dequeue(error51, output) {
|
|
60909
|
+
if (this.onQueueEmpty && (--this.count <= 0 || error51)) {
|
|
60910
|
+
this.onQueueEmpty(error51, output);
|
|
60911
|
+
if (error51) {
|
|
60141
60912
|
output.controller.abort();
|
|
60142
60913
|
this.onQueueEmpty = undefined;
|
|
60143
60914
|
}
|
|
@@ -60188,7 +60959,7 @@ var __require2, SLASHES_REGEX, WINDOWS_ROOT_DIR_REGEX, pushDirectory = (director
|
|
|
60188
60959
|
groups: [],
|
|
60189
60960
|
counts: new Counter,
|
|
60190
60961
|
options,
|
|
60191
|
-
queue: new Queue((
|
|
60962
|
+
queue: new Queue((error51, state) => this.callbackInvoker(state, error51, callback$1)),
|
|
60192
60963
|
symlinks: /* @__PURE__ */ new Map,
|
|
60193
60964
|
visited: [""].slice(0, 0),
|
|
60194
60965
|
controller: new Aborter,
|
|
@@ -63238,8 +64009,8 @@ function formatUsageResetAt(resetAt, compact2 = false, timezone, localeOrHour12,
|
|
|
63238
64009
|
}
|
|
63239
64010
|
return formatResetAtUtc(date5, compact2, hour12);
|
|
63240
64011
|
}
|
|
63241
|
-
function getUsageErrorMessage(
|
|
63242
|
-
switch (
|
|
64012
|
+
function getUsageErrorMessage(error51) {
|
|
64013
|
+
switch (error51) {
|
|
63243
64014
|
case "no-credentials":
|
|
63244
64015
|
return "[无凭证]";
|
|
63245
64016
|
case "timeout":
|
|
@@ -65016,6 +65787,183 @@ var init_WeeklyUsage = __esm(async () => {
|
|
|
65016
65787
|
await init_usage();
|
|
65017
65788
|
});
|
|
65018
65789
|
|
|
65790
|
+
// src/widgets/shared/extra-usage-disabled.ts
|
|
65791
|
+
function isHideExtraUsageDisabledEnabled(item) {
|
|
65792
|
+
return isMetadataFlagEnabled(item, HIDE_DISABLED_KEY);
|
|
65793
|
+
}
|
|
65794
|
+
function handleToggleExtraUsageDisabledAction(action, item) {
|
|
65795
|
+
if (action !== TOGGLE_HIDE_DISABLED_ACTION) {
|
|
65796
|
+
return null;
|
|
65797
|
+
}
|
|
65798
|
+
return toggleMetadataFlag(item, HIDE_DISABLED_KEY);
|
|
65799
|
+
}
|
|
65800
|
+
function getHideExtraUsageDisabledKeybind() {
|
|
65801
|
+
return HIDE_DISABLED_KEYBIND;
|
|
65802
|
+
}
|
|
65803
|
+
function appendHideDisabledModifier(modifierText, item) {
|
|
65804
|
+
if (!isHideExtraUsageDisabledEnabled(item)) {
|
|
65805
|
+
return modifierText;
|
|
65806
|
+
}
|
|
65807
|
+
if (!modifierText) {
|
|
65808
|
+
return "(禁用时隐藏)";
|
|
65809
|
+
}
|
|
65810
|
+
return `${modifierText.slice(0, -1)}, 禁用时隐藏)`;
|
|
65811
|
+
}
|
|
65812
|
+
var HIDE_DISABLED_KEY = "hideIfDisabled", TOGGLE_HIDE_DISABLED_ACTION = "toggle-hide-disabled", HIDE_DISABLED_KEYBIND;
|
|
65813
|
+
var init_extra_usage_disabled = __esm(() => {
|
|
65814
|
+
HIDE_DISABLED_KEYBIND = {
|
|
65815
|
+
key: "h",
|
|
65816
|
+
label: "(h)禁用时隐藏",
|
|
65817
|
+
action: TOGGLE_HIDE_DISABLED_ACTION
|
|
65818
|
+
};
|
|
65819
|
+
});
|
|
65820
|
+
|
|
65821
|
+
// src/widgets/ExtraUsageUtilization.ts
|
|
65822
|
+
class ExtraUsageUtilizationWidget {
|
|
65823
|
+
getDefaultColor() {
|
|
65824
|
+
return "green";
|
|
65825
|
+
}
|
|
65826
|
+
getDescription() {
|
|
65827
|
+
return "显示超额用量(按量付费)占比百分比";
|
|
65828
|
+
}
|
|
65829
|
+
getDisplayName() {
|
|
65830
|
+
return "超额用量占比";
|
|
65831
|
+
}
|
|
65832
|
+
getCategory() {
|
|
65833
|
+
return "用量";
|
|
65834
|
+
}
|
|
65835
|
+
getEditorDisplay(item) {
|
|
65836
|
+
return {
|
|
65837
|
+
displayText: this.getDisplayName(),
|
|
65838
|
+
modifierText: appendHideDisabledModifier(getUsageDisplayModifierText(item), item)
|
|
65839
|
+
};
|
|
65840
|
+
}
|
|
65841
|
+
handleEditorAction(action, item) {
|
|
65842
|
+
const hideDisabledItem = handleToggleExtraUsageDisabledAction(action, item);
|
|
65843
|
+
if (hideDisabledItem) {
|
|
65844
|
+
return hideDisabledItem;
|
|
65845
|
+
}
|
|
65846
|
+
if (action === "toggle-progress") {
|
|
65847
|
+
return cycleUsageDisplayMode(item, [], true);
|
|
65848
|
+
}
|
|
65849
|
+
if (action === "toggle-invert") {
|
|
65850
|
+
return toggleUsageInverted(item);
|
|
65851
|
+
}
|
|
65852
|
+
return null;
|
|
65853
|
+
}
|
|
65854
|
+
render(item, context, settings) {
|
|
65855
|
+
const displayMode = getUsageDisplayMode(item);
|
|
65856
|
+
const inverted = isUsageInverted(item);
|
|
65857
|
+
if (context.isPreview) {
|
|
65858
|
+
const previewPercent = 2.6;
|
|
65859
|
+
const renderedPercent2 = inverted ? 100 - previewPercent : previewPercent;
|
|
65860
|
+
if (isUsageProgressMode(displayMode)) {
|
|
65861
|
+
const width = getUsageProgressBarWidth(displayMode);
|
|
65862
|
+
const progressBar = makeTimerProgressBar2(renderedPercent2, width);
|
|
65863
|
+
return formatRawOrLabeledValue(item, "超额: ", `[${progressBar}] ${renderedPercent2.toFixed(1)}%`);
|
|
65864
|
+
}
|
|
65865
|
+
if (isUsageSliderMode(displayMode)) {
|
|
65866
|
+
const slider = makeSliderBar(renderedPercent2);
|
|
65867
|
+
const sliderDisplay = displayMode === "slider" ? `${slider} ${renderedPercent2.toFixed(1)}%` : slider;
|
|
65868
|
+
return formatRawOrLabeledValue(item, "超额: ", sliderDisplay);
|
|
65869
|
+
}
|
|
65870
|
+
return formatRawOrLabeledValue(item, "超额: ", `${previewPercent.toFixed(1)}%`);
|
|
65871
|
+
}
|
|
65872
|
+
const data = context.usageData ?? {};
|
|
65873
|
+
if (data.extraUsageEnabled === false) {
|
|
65874
|
+
return isHideExtraUsageDisabledEnabled(item) ? null : formatRawOrLabeledValue(item, "超额: ", "n/a");
|
|
65875
|
+
}
|
|
65876
|
+
if (data.extraUsageEnabled !== true || data.extraUsageUtilization === undefined) {
|
|
65877
|
+
if (data.error)
|
|
65878
|
+
return getUsageErrorMessage(data.error);
|
|
65879
|
+
return null;
|
|
65880
|
+
}
|
|
65881
|
+
const percent = Math.max(0, Math.min(100, data.extraUsageUtilization * 100));
|
|
65882
|
+
const renderedPercent = inverted ? 100 - percent : percent;
|
|
65883
|
+
if (isUsageProgressMode(displayMode)) {
|
|
65884
|
+
const width = getUsageProgressBarWidth(displayMode);
|
|
65885
|
+
const progressBar = makeTimerProgressBar2(renderedPercent, width);
|
|
65886
|
+
return formatRawOrLabeledValue(item, "超额: ", `[${progressBar}] ${renderedPercent.toFixed(1)}%`);
|
|
65887
|
+
}
|
|
65888
|
+
if (isUsageSliderMode(displayMode)) {
|
|
65889
|
+
const slider = makeSliderBar(renderedPercent);
|
|
65890
|
+
const sliderDisplay = displayMode === "slider" ? `${slider} ${renderedPercent.toFixed(1)}%` : slider;
|
|
65891
|
+
return formatRawOrLabeledValue(item, "超额: ", sliderDisplay);
|
|
65892
|
+
}
|
|
65893
|
+
return formatRawOrLabeledValue(item, "超额: ", `${percent.toFixed(1)}%`);
|
|
65894
|
+
}
|
|
65895
|
+
getCustomKeybinds(item) {
|
|
65896
|
+
return [...getUsagePercentCustomKeybinds(item), getHideExtraUsageDisabledKeybind()];
|
|
65897
|
+
}
|
|
65898
|
+
supportsRawValue() {
|
|
65899
|
+
return true;
|
|
65900
|
+
}
|
|
65901
|
+
supportsColors(item) {
|
|
65902
|
+
return true;
|
|
65903
|
+
}
|
|
65904
|
+
}
|
|
65905
|
+
var init_ExtraUsageUtilization = __esm(async () => {
|
|
65906
|
+
init_extra_usage_disabled();
|
|
65907
|
+
init_usage_display();
|
|
65908
|
+
await init_usage();
|
|
65909
|
+
});
|
|
65910
|
+
|
|
65911
|
+
// src/widgets/ExtraUsageRemaining.ts
|
|
65912
|
+
class ExtraUsageRemainingWidget {
|
|
65913
|
+
getDefaultColor() {
|
|
65914
|
+
return "green";
|
|
65915
|
+
}
|
|
65916
|
+
getDescription() {
|
|
65917
|
+
return "显示每月超额用量额度的剩余金额(美元)";
|
|
65918
|
+
}
|
|
65919
|
+
getDisplayName() {
|
|
65920
|
+
return "超额用量剩余";
|
|
65921
|
+
}
|
|
65922
|
+
getCategory() {
|
|
65923
|
+
return "用量";
|
|
65924
|
+
}
|
|
65925
|
+
getEditorDisplay(item) {
|
|
65926
|
+
return {
|
|
65927
|
+
displayText: this.getDisplayName(),
|
|
65928
|
+
modifierText: appendHideDisabledModifier(undefined, item)
|
|
65929
|
+
};
|
|
65930
|
+
}
|
|
65931
|
+
handleEditorAction(action, item) {
|
|
65932
|
+
return handleToggleExtraUsageDisabledAction(action, item);
|
|
65933
|
+
}
|
|
65934
|
+
render(item, context, settings) {
|
|
65935
|
+
if (context.isPreview) {
|
|
65936
|
+
return formatRawOrLabeledValue(item, "超额剩余: ", "$3,894.00");
|
|
65937
|
+
}
|
|
65938
|
+
const data = context.usageData ?? {};
|
|
65939
|
+
if (data.extraUsageEnabled === false) {
|
|
65940
|
+
return isHideExtraUsageDisabledEnabled(item) ? null : formatRawOrLabeledValue(item, "超额剩余: ", "n/a");
|
|
65941
|
+
}
|
|
65942
|
+
if (data.extraUsageEnabled !== true || data.extraUsageLimit === undefined || data.extraUsageUsed === undefined) {
|
|
65943
|
+
if (data.error)
|
|
65944
|
+
return getUsageErrorMessage(data.error);
|
|
65945
|
+
return null;
|
|
65946
|
+
}
|
|
65947
|
+
const limitDollars = data.extraUsageLimit / 100;
|
|
65948
|
+
const remaining = Math.max(0, limitDollars - data.extraUsageUsed);
|
|
65949
|
+
const formatted = `$${remaining.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
|
|
65950
|
+
return formatRawOrLabeledValue(item, "超额剩余: ", formatted);
|
|
65951
|
+
}
|
|
65952
|
+
getCustomKeybinds() {
|
|
65953
|
+
return [getHideExtraUsageDisabledKeybind()];
|
|
65954
|
+
}
|
|
65955
|
+
supportsRawValue() {
|
|
65956
|
+
return true;
|
|
65957
|
+
}
|
|
65958
|
+
supportsColors(item) {
|
|
65959
|
+
return true;
|
|
65960
|
+
}
|
|
65961
|
+
}
|
|
65962
|
+
var init_ExtraUsageRemaining = __esm(async () => {
|
|
65963
|
+
init_extra_usage_disabled();
|
|
65964
|
+
await init_usage();
|
|
65965
|
+
});
|
|
65966
|
+
|
|
65019
65967
|
// src/widgets/WeeklySonnetUsage.ts
|
|
65020
65968
|
class WeeklySonnetUsageWidget {
|
|
65021
65969
|
getDefaultColor() {
|
|
@@ -67113,6 +68061,8 @@ var init_widgets = __esm(async () => {
|
|
|
67113
68061
|
init_TotalSpeed(),
|
|
67114
68062
|
init_SessionUsage(),
|
|
67115
68063
|
init_WeeklyUsage(),
|
|
68064
|
+
init_ExtraUsageUtilization(),
|
|
68065
|
+
init_ExtraUsageRemaining(),
|
|
67116
68066
|
init_WeeklySonnetUsage(),
|
|
67117
68067
|
init_WeeklyOpusUsage(),
|
|
67118
68068
|
init_VoiceStatus(),
|
|
@@ -67192,6 +68142,8 @@ var init_widget_manifest = __esm(async () => {
|
|
|
67192
68142
|
{ type: "free-memory", create: () => new FreeMemoryWidget },
|
|
67193
68143
|
{ type: "session-usage", create: () => new SessionUsageWidget },
|
|
67194
68144
|
{ type: "weekly-usage", create: () => new WeeklyUsageWidget },
|
|
68145
|
+
{ type: "extra-usage-utilization", create: () => new ExtraUsageUtilizationWidget },
|
|
68146
|
+
{ type: "extra-usage-remaining", create: () => new ExtraUsageRemainingWidget },
|
|
67195
68147
|
{ type: "weekly-sonnet-usage", create: () => new WeeklySonnetUsageWidget },
|
|
67196
68148
|
{ type: "weekly-opus-usage", create: () => new WeeklyOpusUsageWidget },
|
|
67197
68149
|
{ type: "reset-timer", create: () => new BlockResetTimerWidget },
|
|
@@ -67418,8 +68370,8 @@ async function backupBadSettings(paths) {
|
|
|
67418
68370
|
await writeFile(paths.settingsBackupPath, content, "utf-8");
|
|
67419
68371
|
console.error(`Bad settings backed up to ${paths.settingsBackupPath}`);
|
|
67420
68372
|
}
|
|
67421
|
-
} catch (
|
|
67422
|
-
console.error("Failed to backup bad settings:",
|
|
68373
|
+
} catch (error51) {
|
|
68374
|
+
console.error("Failed to backup bad settings:", error51);
|
|
67423
68375
|
}
|
|
67424
68376
|
}
|
|
67425
68377
|
async function writeDefaultSettings(paths) {
|
|
@@ -67431,8 +68383,8 @@ async function writeDefaultSettings(paths) {
|
|
|
67431
68383
|
try {
|
|
67432
68384
|
await writeSettingsJson(settingsWithVersion, paths);
|
|
67433
68385
|
console.error(`Default settings written to ${paths.settingsPath}`);
|
|
67434
|
-
} catch (
|
|
67435
|
-
console.error("Failed to write default settings:",
|
|
68386
|
+
} catch (error51) {
|
|
68387
|
+
console.error("Failed to write default settings:", error51);
|
|
67436
68388
|
}
|
|
67437
68389
|
return defaults2;
|
|
67438
68390
|
}
|
|
@@ -67475,8 +68427,8 @@ async function loadSettings() {
|
|
|
67475
68427
|
...result2.data,
|
|
67476
68428
|
lines: upgradeLegacyWidgetTypes(result2.data.lines)
|
|
67477
68429
|
};
|
|
67478
|
-
} catch (
|
|
67479
|
-
console.error("Error loading settings:",
|
|
68430
|
+
} catch (error51) {
|
|
68431
|
+
console.error("Error loading settings:", error51);
|
|
67480
68432
|
return await recoverWithDefaults(paths);
|
|
67481
68433
|
}
|
|
67482
68434
|
}
|
|
@@ -67582,8 +68534,8 @@ async function backupClaudeSettings(suffix = ".bak") {
|
|
|
67582
68534
|
await writeFile2(backupPath, content, "utf-8");
|
|
67583
68535
|
return backupPath;
|
|
67584
68536
|
}
|
|
67585
|
-
} catch (
|
|
67586
|
-
console.error("Failed to backup Claude settings:",
|
|
68537
|
+
} catch (error51) {
|
|
68538
|
+
console.error("Failed to backup Claude settings:", error51);
|
|
67587
68539
|
}
|
|
67588
68540
|
return null;
|
|
67589
68541
|
}
|
|
@@ -67596,11 +68548,11 @@ function loadClaudeSettingsSync(options = {}) {
|
|
|
67596
68548
|
try {
|
|
67597
68549
|
const content = fs11.readFileSync(settingsPath2, "utf-8");
|
|
67598
68550
|
return JSON.parse(content);
|
|
67599
|
-
} catch (
|
|
68551
|
+
} catch (error51) {
|
|
67600
68552
|
if (logErrors) {
|
|
67601
|
-
console.error("Failed to load Claude settings:",
|
|
68553
|
+
console.error("Failed to load Claude settings:", error51);
|
|
67602
68554
|
}
|
|
67603
|
-
throw
|
|
68555
|
+
throw error51;
|
|
67604
68556
|
}
|
|
67605
68557
|
}
|
|
67606
68558
|
async function loadClaudeSettings(options = {}) {
|
|
@@ -67612,11 +68564,11 @@ async function loadClaudeSettings(options = {}) {
|
|
|
67612
68564
|
try {
|
|
67613
68565
|
const content = await readFile4(settingsPath2, "utf-8");
|
|
67614
68566
|
return JSON.parse(content);
|
|
67615
|
-
} catch (
|
|
68567
|
+
} catch (error51) {
|
|
67616
68568
|
if (logErrors) {
|
|
67617
|
-
console.error("Failed to load Claude settings:",
|
|
68569
|
+
console.error("Failed to load Claude settings:", error51);
|
|
67618
68570
|
}
|
|
67619
|
-
throw
|
|
68571
|
+
throw error51;
|
|
67620
68572
|
}
|
|
67621
68573
|
}
|
|
67622
68574
|
async function saveClaudeSettings(settings) {
|
|
@@ -67868,8 +68820,8 @@ function tryReadVoiceLayer(filePath) {
|
|
|
67868
68820
|
let content;
|
|
67869
68821
|
try {
|
|
67870
68822
|
content = fs11.readFileSync(filePath, "utf-8");
|
|
67871
|
-
} catch (
|
|
67872
|
-
const isMissing =
|
|
68823
|
+
} catch (error51) {
|
|
68824
|
+
const isMissing = error51.code === "ENOENT";
|
|
67873
68825
|
return { fileExisted: !isMissing, enabled: undefined };
|
|
67874
68826
|
}
|
|
67875
68827
|
try {
|
|
@@ -68859,9 +69811,9 @@ function runGlobalPackageUninstall(packageManager, { platform: platform2 = proce
|
|
|
68859
69811
|
const executable = getPackageManagerExecutable(packageManager, platform2);
|
|
68860
69812
|
const args = packageManager === "npm" ? ["uninstall", "-g", "ccstatusline-zh"] : ["remove", "-g", "ccstatusline-zh"];
|
|
68861
69813
|
return new Promise((resolve5, reject2) => {
|
|
68862
|
-
execFile(executable, args, { timeout: GLOBAL_PACKAGE_TIMEOUT_MS }, (
|
|
68863
|
-
if (
|
|
68864
|
-
reject2(
|
|
69814
|
+
execFile(executable, args, { timeout: GLOBAL_PACKAGE_TIMEOUT_MS }, (error51) => {
|
|
69815
|
+
if (error51) {
|
|
69816
|
+
reject2(error51 instanceof Error ? error51 : new Error("全局卸载命令执行失败"));
|
|
68865
69817
|
return;
|
|
68866
69818
|
}
|
|
68867
69819
|
resolve5();
|
|
@@ -69168,8 +70120,8 @@ async function installPowerlineFonts() {
|
|
|
69168
70120
|
} catch {}
|
|
69169
70121
|
}
|
|
69170
70122
|
}
|
|
69171
|
-
} catch (
|
|
69172
|
-
const errorMessage =
|
|
70123
|
+
} catch (error51) {
|
|
70124
|
+
const errorMessage = error51 instanceof Error ? error51.message : String(error51);
|
|
69173
70125
|
if (errorMessage.includes("git")) {
|
|
69174
70126
|
return {
|
|
69175
70127
|
success: false,
|
|
@@ -69297,9 +70249,9 @@ function buildUpdateCheckResult({
|
|
|
69297
70249
|
autoUpdateLaunchCommand: getAutoUpdateLaunchCommand(installation)
|
|
69298
70250
|
};
|
|
69299
70251
|
}
|
|
69300
|
-
function getErrorMessage(
|
|
69301
|
-
if (
|
|
69302
|
-
return
|
|
70252
|
+
function getErrorMessage(error51) {
|
|
70253
|
+
if (error51 instanceof Error && error51.message) {
|
|
70254
|
+
return error51.message;
|
|
69303
70255
|
}
|
|
69304
70256
|
return "无法查询 npm 仓库";
|
|
69305
70257
|
}
|
|
@@ -69320,12 +70272,12 @@ async function checkForUpdates({
|
|
|
69320
70272
|
installationMetadata,
|
|
69321
70273
|
commandAvailability
|
|
69322
70274
|
});
|
|
69323
|
-
} catch (
|
|
70275
|
+
} catch (error51) {
|
|
69324
70276
|
return {
|
|
69325
70277
|
status: "registry-failure",
|
|
69326
70278
|
currentVersion,
|
|
69327
70279
|
installation: getResolvedInstallation(installedCommand, installationMetadata),
|
|
69328
|
-
errorMessage: getErrorMessage(
|
|
70280
|
+
errorMessage: getErrorMessage(error51)
|
|
69329
70281
|
};
|
|
69330
70282
|
}
|
|
69331
70283
|
}
|
|
@@ -69355,8 +70307,8 @@ function fetchLatestNpmVersion(timeoutMs = DEFAULT_REGISTRY_TIMEOUT_MS) {
|
|
|
69355
70307
|
return;
|
|
69356
70308
|
}
|
|
69357
70309
|
resolve5(parsed.version);
|
|
69358
|
-
} catch (
|
|
69359
|
-
reject2(
|
|
70310
|
+
} catch (error51) {
|
|
70311
|
+
reject2(error51 instanceof Error ? error51 : new Error(String(error51)));
|
|
69360
70312
|
}
|
|
69361
70313
|
});
|
|
69362
70314
|
});
|
|
@@ -69371,9 +70323,9 @@ function runGlobalPackageInstall(packageManager, version2, { platform: platform4
|
|
|
69371
70323
|
const executable = getPackageManagerExecutable(packageManager, platform4);
|
|
69372
70324
|
const args = packageManager === "npm" ? ["install", "-g", `ccstatusline-zh@${version2}`] : ["add", "-g", `ccstatusline-zh@${version2}`];
|
|
69373
70325
|
return new Promise((resolve5, reject2) => {
|
|
69374
|
-
execFile2(executable, args, { timeout: GLOBAL_UPDATE_TIMEOUT_MS }, (
|
|
69375
|
-
if (
|
|
69376
|
-
reject2(
|
|
70326
|
+
execFile2(executable, args, { timeout: GLOBAL_UPDATE_TIMEOUT_MS }, (error51) => {
|
|
70327
|
+
if (error51) {
|
|
70328
|
+
reject2(error51 instanceof Error ? error51 : new Error("全局更新命令执行失败"));
|
|
69377
70329
|
return;
|
|
69378
70330
|
}
|
|
69379
70331
|
resolve5();
|
|
@@ -73840,9 +74792,9 @@ var RefreshIntervalMenu = ({
|
|
|
73840
74792
|
setValidationError(null);
|
|
73841
74793
|
return;
|
|
73842
74794
|
}
|
|
73843
|
-
const
|
|
73844
|
-
if (
|
|
73845
|
-
setValidationError(
|
|
74795
|
+
const error51 = validateRefreshIntervalInput(refreshInput);
|
|
74796
|
+
if (error51) {
|
|
74797
|
+
setValidationError(error51);
|
|
73846
74798
|
} else {
|
|
73847
74799
|
const value = parseInt(refreshInput, 10);
|
|
73848
74800
|
onUpdate(value);
|
|
@@ -74292,9 +75244,9 @@ var TerminalWidthMenu = ({
|
|
|
74292
75244
|
use_input_default((input, key) => {
|
|
74293
75245
|
if (editingThreshold) {
|
|
74294
75246
|
if (key.return) {
|
|
74295
|
-
const
|
|
74296
|
-
if (
|
|
74297
|
-
setValidationError(
|
|
75247
|
+
const error51 = validateCompactThresholdInput(thresholdInput);
|
|
75248
|
+
if (error51) {
|
|
75249
|
+
setValidationError(error51);
|
|
74298
75250
|
} else {
|
|
74299
75251
|
const value = parseInt(thresholdInput, 10);
|
|
74300
75252
|
setCompactThreshold(value);
|
|
@@ -75863,7 +76815,9 @@ var USAGE_WIDGET_TYPES = new Set([
|
|
|
75863
76815
|
"weekly-opus-usage",
|
|
75864
76816
|
"block-timer",
|
|
75865
76817
|
"reset-timer",
|
|
75866
|
-
"weekly-reset-timer"
|
|
76818
|
+
"weekly-reset-timer",
|
|
76819
|
+
"extra-usage-utilization",
|
|
76820
|
+
"extra-usage-remaining"
|
|
75867
76821
|
]);
|
|
75868
76822
|
var USAGE_DATA_FIELDS = [
|
|
75869
76823
|
"sessionUsage",
|
|
@@ -75887,7 +76841,16 @@ var USAGE_WIDGET_REQUIREMENTS = {
|
|
|
75887
76841
|
"weekly-opus-usage": [{ field: "weeklyOpusUsage" }],
|
|
75888
76842
|
"block-timer": [{ field: "sessionResetAt" }],
|
|
75889
76843
|
"reset-timer": [{ field: "sessionResetAt" }],
|
|
75890
|
-
"weekly-reset-timer": [{ field: "weeklyResetAt" }]
|
|
76844
|
+
"weekly-reset-timer": [{ field: "weeklyResetAt" }],
|
|
76845
|
+
"extra-usage-utilization": [
|
|
76846
|
+
{ field: "extraUsageEnabled" },
|
|
76847
|
+
{ field: "extraUsageUtilization" }
|
|
76848
|
+
],
|
|
76849
|
+
"extra-usage-remaining": [
|
|
76850
|
+
{ field: "extraUsageEnabled" },
|
|
76851
|
+
{ field: "extraUsageLimit" },
|
|
76852
|
+
{ field: "extraUsageUsed" }
|
|
76853
|
+
]
|
|
75891
76854
|
};
|
|
75892
76855
|
var USAGE_CURSOR_REQUIREMENTS = {
|
|
75893
76856
|
"session-usage": { field: "sessionResetAt" },
|
|
@@ -76217,8 +77180,8 @@ async function main() {
|
|
|
76217
77180
|
process.exit(1);
|
|
76218
77181
|
}
|
|
76219
77182
|
await renderMultipleLines(result2.data);
|
|
76220
|
-
} catch (
|
|
76221
|
-
console.error("Error parsing JSON:",
|
|
77183
|
+
} catch (error51) {
|
|
77184
|
+
console.error("Error parsing JSON:", error51);
|
|
76222
77185
|
process.exit(1);
|
|
76223
77186
|
}
|
|
76224
77187
|
} else {
|