@opentabs-dev/opentabs-plugin-priceline 0.0.84 → 0.0.86
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 +11 -1
- package/dist/adapter.iife.js +1629 -522
- package/dist/adapter.iife.js.map +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/priceline-api.d.ts +3 -1
- package/dist/priceline-api.d.ts.map +1 -1
- package/dist/priceline-api.js +40 -3
- package/dist/priceline-api.js.map +1 -1
- package/dist/tools/find-cheapest-flight-date.d.ts +28 -0
- package/dist/tools/find-cheapest-flight-date.d.ts.map +1 -0
- package/dist/tools/find-cheapest-flight-date.js +77 -0
- package/dist/tools/find-cheapest-flight-date.js.map +1 -0
- package/dist/tools/get-flight-price-calendar.d.ts +30 -0
- package/dist/tools/get-flight-price-calendar.d.ts.map +1 -0
- package/dist/tools/get-flight-price-calendar.js +97 -0
- package/dist/tools/get-flight-price-calendar.js.map +1 -0
- package/dist/tools/list-flight-price-watches.d.ts +17 -0
- package/dist/tools/list-flight-price-watches.d.ts.map +1 -0
- package/dist/tools/list-flight-price-watches.js +54 -0
- package/dist/tools/list-flight-price-watches.js.map +1 -0
- package/dist/tools/navigate-to-flight-search.d.ts +21 -0
- package/dist/tools/navigate-to-flight-search.d.ts.map +1 -0
- package/dist/tools/navigate-to-flight-search.js +43 -0
- package/dist/tools/navigate-to-flight-search.js.map +1 -0
- package/dist/tools/schemas.d.ts +111 -0
- package/dist/tools/schemas.d.ts.map +1 -1
- package/dist/tools/schemas.js +79 -0
- package/dist/tools/schemas.js.map +1 -1
- package/dist/tools/search-airports.d.ts +17 -0
- package/dist/tools/search-airports.d.ts.map +1 -0
- package/dist/tools/search-airports.js +25 -0
- package/dist/tools/search-airports.js.map +1 -0
- package/dist/tools.json +534 -1
- package/package.json +4 -4
package/dist/adapter.iife.js
CHANGED
|
@@ -74,9 +74,11 @@
|
|
|
74
74
|
return ToolError.timeout(message);
|
|
75
75
|
}
|
|
76
76
|
if (status >= 500) {
|
|
77
|
+
const TRANSIENT_5XX = /* @__PURE__ */ new Set([500, 502, 503, 504]);
|
|
78
|
+
const retryable = TRANSIENT_5XX.has(status);
|
|
77
79
|
const retryAfter = status === 503 ? response.headers.get("Retry-After") : null;
|
|
78
80
|
const retryAfterMs = retryAfter !== null ? parseRetryAfterMs(retryAfter) : void 0;
|
|
79
|
-
return new ToolError(message, "http_error", { category: "internal", retryable
|
|
81
|
+
return new ToolError(message, "http_error", { category: "internal", retryable, retryAfterMs });
|
|
80
82
|
}
|
|
81
83
|
if (status >= 400 && status < 500) {
|
|
82
84
|
return new ToolError(message, "http_error", { retryable: false });
|
|
@@ -121,14 +123,14 @@
|
|
|
121
123
|
...rest2,
|
|
122
124
|
signal: combinedSignal
|
|
123
125
|
});
|
|
124
|
-
} catch (
|
|
125
|
-
if (
|
|
126
|
+
} catch (error51) {
|
|
127
|
+
if (error51 instanceof DOMException && error51.name === "TimeoutError") {
|
|
126
128
|
throw ToolError.timeout(`fetchFromPage: request timed out after ${timeout}ms for ${url2}`);
|
|
127
129
|
}
|
|
128
130
|
if (combinedSignal.aborted) {
|
|
129
131
|
throw new ToolError(`fetchFromPage: request aborted for ${url2}`, "aborted");
|
|
130
132
|
}
|
|
131
|
-
throw new ToolError(`fetchFromPage: network error for ${url2}: ${toErrorMessage(
|
|
133
|
+
throw new ToolError(`fetchFromPage: network error for ${url2}: ${toErrorMessage(error51)}`, "network_error", {
|
|
132
134
|
category: "internal",
|
|
133
135
|
retryable: true
|
|
134
136
|
});
|
|
@@ -178,6 +180,7 @@
|
|
|
178
180
|
return new Promise((resolve, reject) => {
|
|
179
181
|
let settled = false;
|
|
180
182
|
let poller;
|
|
183
|
+
let lastPredicateError;
|
|
181
184
|
const isSettled = () => settled;
|
|
182
185
|
const cleanup = () => {
|
|
183
186
|
settled = true;
|
|
@@ -196,7 +199,8 @@
|
|
|
196
199
|
if (isSettled())
|
|
197
200
|
return;
|
|
198
201
|
cleanup();
|
|
199
|
-
|
|
202
|
+
const errorContext = lastPredicateError instanceof Error ? `: predicate last threw \u2014 ${lastPredicateError.message}` : "";
|
|
203
|
+
reject(new Error(`waitUntil: timed out after ${timeout}ms waiting for predicate to return true${errorContext}`));
|
|
200
204
|
}, timeout);
|
|
201
205
|
const check2 = async () => {
|
|
202
206
|
if (isSettled())
|
|
@@ -208,7 +212,8 @@
|
|
|
208
212
|
resolve();
|
|
209
213
|
return;
|
|
210
214
|
}
|
|
211
|
-
} catch {
|
|
215
|
+
} catch (err2) {
|
|
216
|
+
lastPredicateError = err2;
|
|
212
217
|
}
|
|
213
218
|
if (!isSettled()) {
|
|
214
219
|
poller = setTimeout(() => void check2(), interval);
|
|
@@ -451,7 +456,9 @@
|
|
|
451
456
|
|
|
452
457
|
// src/priceline-api.ts
|
|
453
458
|
var GRAPH_BASE = "https://www.priceline.com/pws/v0/pcln-graph/?gqlOp=";
|
|
459
|
+
var FLY_GRAPH_URL = "https://www.priceline.com/pws/v0/fly/graph/query";
|
|
454
460
|
var REST_BASE = "https://www.priceline.com/pws/v0";
|
|
461
|
+
var AC_BASE = "https://www.priceline.com/svcs/ac/index";
|
|
455
462
|
var decodeJwtPayload = (jwt2) => {
|
|
456
463
|
try {
|
|
457
464
|
const parts = jwt2.split(".");
|
|
@@ -507,17 +514,20 @@
|
|
|
507
514
|
var getEmail = () => requireAuth().email;
|
|
508
515
|
var getCguid = () => requireAuth().cguid;
|
|
509
516
|
var getAuthToken = () => requireAuth().authToken;
|
|
510
|
-
var graphql = async (operationName, variables,
|
|
517
|
+
var graphql = async (operationName, variables, queryOrPersistedHash) => {
|
|
511
518
|
const auth = requireAuth();
|
|
512
519
|
const url2 = `${GRAPH_BASE}${operationName}`;
|
|
513
520
|
const reqBody = {
|
|
514
521
|
operationName,
|
|
515
522
|
variables
|
|
516
523
|
};
|
|
517
|
-
|
|
524
|
+
const isPersistedHash = typeof queryOrPersistedHash === "string" && /^[a-f0-9]{64}$/.test(queryOrPersistedHash);
|
|
525
|
+
if (queryOrPersistedHash && isPersistedHash) {
|
|
518
526
|
reqBody.extensions = {
|
|
519
|
-
persistedQuery: { version: 1, sha256Hash:
|
|
527
|
+
persistedQuery: { version: 1, sha256Hash: queryOrPersistedHash }
|
|
520
528
|
};
|
|
529
|
+
} else if (queryOrPersistedHash) {
|
|
530
|
+
reqBody.query = queryOrPersistedHash;
|
|
521
531
|
}
|
|
522
532
|
const headers = {
|
|
523
533
|
"Content-Type": "application/json",
|
|
@@ -558,6 +568,33 @@
|
|
|
558
568
|
if (data === void 0) throw ToolError.internal(`Empty response from ${endpoint}`);
|
|
559
569
|
return data;
|
|
560
570
|
};
|
|
571
|
+
var autocomplete = async (product, query) => {
|
|
572
|
+
const encoded = encodeURIComponent(query);
|
|
573
|
+
const url2 = `${AC_BASE}/${product}/${encoded}/0/9/0/0`;
|
|
574
|
+
const data = await fetchJSON(url2);
|
|
575
|
+
return data?.searchItems ?? [];
|
|
576
|
+
};
|
|
577
|
+
var flyGraphql = async (operationName, variables, query) => {
|
|
578
|
+
const headers = {
|
|
579
|
+
"Content-Type": "application/json",
|
|
580
|
+
"apollographql-client-name": "m-fly-search",
|
|
581
|
+
"apollographql-client-version": "main-0.0.19"
|
|
582
|
+
};
|
|
583
|
+
const resp = await fetchJSON(FLY_GRAPH_URL, {
|
|
584
|
+
method: "POST",
|
|
585
|
+
headers,
|
|
586
|
+
body: JSON.stringify({ operationName, variables, query })
|
|
587
|
+
}) ?? {};
|
|
588
|
+
const errors = resp.errors ?? [];
|
|
589
|
+
if (errors.length > 0 && !resp.data) {
|
|
590
|
+
const first = errors[0] ?? {};
|
|
591
|
+
const code = first.extensions?.code ?? "";
|
|
592
|
+
const message = first.message ?? "Unknown GraphQL error";
|
|
593
|
+
if (code === "UNAUTHENTICATED") throw ToolError.auth(`Auth error: ${message}`);
|
|
594
|
+
throw ToolError.internal(`GraphQL error (${operationName}): ${message}`);
|
|
595
|
+
}
|
|
596
|
+
return resp.data ?? {};
|
|
597
|
+
};
|
|
561
598
|
|
|
562
599
|
// node_modules/zod/v4/classic/external.js
|
|
563
600
|
var external_exports = {};
|
|
@@ -621,6 +658,7 @@
|
|
|
621
658
|
ZodOptional: () => ZodOptional,
|
|
622
659
|
ZodPipe: () => ZodPipe,
|
|
623
660
|
ZodPrefault: () => ZodPrefault,
|
|
661
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
624
662
|
ZodPromise: () => ZodPromise,
|
|
625
663
|
ZodReadonly: () => ZodReadonly,
|
|
626
664
|
ZodRealError: () => ZodRealError,
|
|
@@ -699,6 +737,7 @@
|
|
|
699
737
|
int32: () => int32,
|
|
700
738
|
int64: () => int64,
|
|
701
739
|
intersection: () => intersection,
|
|
740
|
+
invertCodec: () => invertCodec,
|
|
702
741
|
ipv4: () => ipv42,
|
|
703
742
|
ipv6: () => ipv62,
|
|
704
743
|
iso: () => iso_exports,
|
|
@@ -880,6 +919,7 @@
|
|
|
880
919
|
$ZodOptional: () => $ZodOptional,
|
|
881
920
|
$ZodPipe: () => $ZodPipe,
|
|
882
921
|
$ZodPrefault: () => $ZodPrefault,
|
|
922
|
+
$ZodPreprocess: () => $ZodPreprocess,
|
|
883
923
|
$ZodPromise: () => $ZodPromise,
|
|
884
924
|
$ZodReadonly: () => $ZodReadonly,
|
|
885
925
|
$ZodRealError: () => $ZodRealError,
|
|
@@ -1079,7 +1119,8 @@
|
|
|
1079
1119
|
});
|
|
1080
1120
|
|
|
1081
1121
|
// node_modules/zod/v4/core/core.js
|
|
1082
|
-
var
|
|
1122
|
+
var _a;
|
|
1123
|
+
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
1083
1124
|
status: "aborted"
|
|
1084
1125
|
});
|
|
1085
1126
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1114,10 +1155,10 @@
|
|
|
1114
1155
|
}
|
|
1115
1156
|
Object.defineProperty(Definition, "name", { value: name });
|
|
1116
1157
|
function _(def) {
|
|
1117
|
-
var
|
|
1158
|
+
var _a3;
|
|
1118
1159
|
const inst = params?.Parent ? new Definition() : this;
|
|
1119
1160
|
init(inst, def);
|
|
1120
|
-
(
|
|
1161
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
1121
1162
|
for (const fn of inst._zod.deferred) {
|
|
1122
1163
|
fn();
|
|
1123
1164
|
}
|
|
@@ -1146,7 +1187,8 @@
|
|
|
1146
1187
|
this.name = "ZodEncodeError";
|
|
1147
1188
|
}
|
|
1148
1189
|
};
|
|
1149
|
-
|
|
1190
|
+
(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
|
|
1191
|
+
var globalConfig = globalThis.__zod_globalConfig;
|
|
1150
1192
|
function config(newConfig) {
|
|
1151
1193
|
if (newConfig)
|
|
1152
1194
|
Object.assign(globalConfig, newConfig);
|
|
@@ -1179,6 +1221,7 @@
|
|
|
1179
1221
|
defineLazy: () => defineLazy,
|
|
1180
1222
|
esc: () => esc,
|
|
1181
1223
|
escapeRegex: () => escapeRegex,
|
|
1224
|
+
explicitlyAborted: () => explicitlyAborted,
|
|
1182
1225
|
extend: () => extend,
|
|
1183
1226
|
finalizeIssue: () => finalizeIssue,
|
|
1184
1227
|
floatSafeRemainder: () => floatSafeRemainder,
|
|
@@ -1267,19 +1310,12 @@
|
|
|
1267
1310
|
return source.slice(start, end);
|
|
1268
1311
|
}
|
|
1269
1312
|
function floatSafeRemainder(val, step) {
|
|
1270
|
-
const
|
|
1271
|
-
const
|
|
1272
|
-
|
|
1273
|
-
if (
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
stepDecCount = Number.parseInt(match[1]);
|
|
1277
|
-
}
|
|
1278
|
-
}
|
|
1279
|
-
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
1280
|
-
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
|
|
1281
|
-
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
|
1282
|
-
return valInt % stepInt / 10 ** decCount;
|
|
1313
|
+
const ratio = val / step;
|
|
1314
|
+
const roundedRatio = Math.round(ratio);
|
|
1315
|
+
const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
|
|
1316
|
+
if (Math.abs(ratio - roundedRatio) < tolerance)
|
|
1317
|
+
return 0;
|
|
1318
|
+
return ratio - roundedRatio;
|
|
1283
1319
|
}
|
|
1284
1320
|
var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
1285
1321
|
function defineLazy(object2, key, getter) {
|
|
@@ -1361,7 +1397,10 @@
|
|
|
1361
1397
|
function isObject(data) {
|
|
1362
1398
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
1363
1399
|
}
|
|
1364
|
-
var allowsEval = cached(() => {
|
|
1400
|
+
var allowsEval = /* @__PURE__ */ cached(() => {
|
|
1401
|
+
if (globalConfig.jitless) {
|
|
1402
|
+
return false;
|
|
1403
|
+
}
|
|
1365
1404
|
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
|
|
1366
1405
|
return false;
|
|
1367
1406
|
}
|
|
@@ -1394,6 +1433,10 @@
|
|
|
1394
1433
|
return { ...o };
|
|
1395
1434
|
if (Array.isArray(o))
|
|
1396
1435
|
return [...o];
|
|
1436
|
+
if (o instanceof Map)
|
|
1437
|
+
return new Map(o);
|
|
1438
|
+
if (o instanceof Set)
|
|
1439
|
+
return new Set(o);
|
|
1397
1440
|
return o;
|
|
1398
1441
|
}
|
|
1399
1442
|
function numKeys(data) {
|
|
@@ -1450,7 +1493,14 @@
|
|
|
1450
1493
|
}
|
|
1451
1494
|
};
|
|
1452
1495
|
var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
1453
|
-
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
1496
|
+
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
1497
|
+
"string",
|
|
1498
|
+
"number",
|
|
1499
|
+
"bigint",
|
|
1500
|
+
"boolean",
|
|
1501
|
+
"symbol",
|
|
1502
|
+
"undefined"
|
|
1503
|
+
]);
|
|
1454
1504
|
function escapeRegex(str) {
|
|
1455
1505
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1456
1506
|
}
|
|
@@ -1619,6 +1669,9 @@
|
|
|
1619
1669
|
return clone(schema, def);
|
|
1620
1670
|
}
|
|
1621
1671
|
function merge(a, b) {
|
|
1672
|
+
if (a._zod.def.checks?.length) {
|
|
1673
|
+
throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
1674
|
+
}
|
|
1622
1675
|
const def = mergeDefs(a._zod.def, {
|
|
1623
1676
|
get shape() {
|
|
1624
1677
|
const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
|
|
@@ -1628,8 +1681,7 @@
|
|
|
1628
1681
|
get catchall() {
|
|
1629
1682
|
return b._zod.def.catchall;
|
|
1630
1683
|
},
|
|
1631
|
-
checks: []
|
|
1632
|
-
// delete existing checks
|
|
1684
|
+
checks: b._zod.def.checks ?? []
|
|
1633
1685
|
});
|
|
1634
1686
|
return clone(a, def);
|
|
1635
1687
|
}
|
|
@@ -1712,10 +1764,20 @@
|
|
|
1712
1764
|
}
|
|
1713
1765
|
return false;
|
|
1714
1766
|
}
|
|
1767
|
+
function explicitlyAborted(x, startIndex = 0) {
|
|
1768
|
+
if (x.aborted === true)
|
|
1769
|
+
return true;
|
|
1770
|
+
for (let i = startIndex; i < x.issues.length; i++) {
|
|
1771
|
+
if (x.issues[i]?.continue === false) {
|
|
1772
|
+
return true;
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
return false;
|
|
1776
|
+
}
|
|
1715
1777
|
function prefixIssues(path, issues) {
|
|
1716
1778
|
return issues.map((iss) => {
|
|
1717
|
-
var
|
|
1718
|
-
(
|
|
1779
|
+
var _a3;
|
|
1780
|
+
(_a3 = iss).path ?? (_a3.path = []);
|
|
1719
1781
|
iss.path.unshift(path);
|
|
1720
1782
|
return iss;
|
|
1721
1783
|
});
|
|
@@ -1724,17 +1786,14 @@
|
|
|
1724
1786
|
return typeof message === "string" ? message : message?.message;
|
|
1725
1787
|
}
|
|
1726
1788
|
function finalizeIssue(iss, ctx, config2) {
|
|
1727
|
-
const
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1789
|
+
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";
|
|
1790
|
+
const { inst: _inst, continue: _continue, input: _input, ...rest2 } = iss;
|
|
1791
|
+
rest2.path ?? (rest2.path = []);
|
|
1792
|
+
rest2.message = message;
|
|
1793
|
+
if (ctx?.reportInput) {
|
|
1794
|
+
rest2.input = _input;
|
|
1731
1795
|
}
|
|
1732
|
-
|
|
1733
|
-
delete full.continue;
|
|
1734
|
-
if (!ctx?.reportInput) {
|
|
1735
|
-
delete full.input;
|
|
1736
|
-
}
|
|
1737
|
-
return full;
|
|
1796
|
+
return rest2;
|
|
1738
1797
|
}
|
|
1739
1798
|
function getSizableOrigin(input) {
|
|
1740
1799
|
if (input instanceof Set)
|
|
@@ -1851,10 +1910,10 @@
|
|
|
1851
1910
|
};
|
|
1852
1911
|
var $ZodError = $constructor("$ZodError", initializer);
|
|
1853
1912
|
var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
|
|
1854
|
-
function flattenError(
|
|
1913
|
+
function flattenError(error51, mapper = (issue2) => issue2.message) {
|
|
1855
1914
|
const fieldErrors = {};
|
|
1856
1915
|
const formErrors = [];
|
|
1857
|
-
for (const sub of
|
|
1916
|
+
for (const sub of error51.issues) {
|
|
1858
1917
|
if (sub.path.length > 0) {
|
|
1859
1918
|
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
1860
1919
|
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
@@ -1864,50 +1923,53 @@
|
|
|
1864
1923
|
}
|
|
1865
1924
|
return { formErrors, fieldErrors };
|
|
1866
1925
|
}
|
|
1867
|
-
function formatError(
|
|
1926
|
+
function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
1868
1927
|
const fieldErrors = { _errors: [] };
|
|
1869
|
-
const processError = (
|
|
1870
|
-
for (const issue2 of
|
|
1928
|
+
const processError = (error52, path = []) => {
|
|
1929
|
+
for (const issue2 of error52.issues) {
|
|
1871
1930
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
1872
|
-
issue2.errors.map((issues) => processError({ issues }));
|
|
1931
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
1873
1932
|
} else if (issue2.code === "invalid_key") {
|
|
1874
|
-
processError({ issues: issue2.issues });
|
|
1933
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
1875
1934
|
} else if (issue2.code === "invalid_element") {
|
|
1876
|
-
processError({ issues: issue2.issues });
|
|
1877
|
-
} else if (issue2.path.length === 0) {
|
|
1878
|
-
fieldErrors._errors.push(mapper(issue2));
|
|
1935
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
1879
1936
|
} else {
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1937
|
+
const fullpath = [...path, ...issue2.path];
|
|
1938
|
+
if (fullpath.length === 0) {
|
|
1939
|
+
fieldErrors._errors.push(mapper(issue2));
|
|
1940
|
+
} else {
|
|
1941
|
+
let curr = fieldErrors;
|
|
1942
|
+
let i = 0;
|
|
1943
|
+
while (i < fullpath.length) {
|
|
1944
|
+
const el = fullpath[i];
|
|
1945
|
+
const terminal = i === fullpath.length - 1;
|
|
1946
|
+
if (!terminal) {
|
|
1947
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
1948
|
+
} else {
|
|
1949
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
1950
|
+
curr[el]._errors.push(mapper(issue2));
|
|
1951
|
+
}
|
|
1952
|
+
curr = curr[el];
|
|
1953
|
+
i++;
|
|
1890
1954
|
}
|
|
1891
|
-
curr = curr[el];
|
|
1892
|
-
i++;
|
|
1893
1955
|
}
|
|
1894
1956
|
}
|
|
1895
1957
|
}
|
|
1896
1958
|
};
|
|
1897
|
-
processError(
|
|
1959
|
+
processError(error51);
|
|
1898
1960
|
return fieldErrors;
|
|
1899
1961
|
}
|
|
1900
|
-
function treeifyError(
|
|
1962
|
+
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
1901
1963
|
const result = { errors: [] };
|
|
1902
|
-
const processError = (
|
|
1903
|
-
var
|
|
1904
|
-
for (const issue2 of
|
|
1964
|
+
const processError = (error52, path = []) => {
|
|
1965
|
+
var _a3, _b;
|
|
1966
|
+
for (const issue2 of error52.issues) {
|
|
1905
1967
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
1906
|
-
issue2.errors.map((issues) => processError({ issues }, issue2.path));
|
|
1968
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
1907
1969
|
} else if (issue2.code === "invalid_key") {
|
|
1908
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
1970
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
1909
1971
|
} else if (issue2.code === "invalid_element") {
|
|
1910
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
1972
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
1911
1973
|
} else {
|
|
1912
1974
|
const fullpath = [...path, ...issue2.path];
|
|
1913
1975
|
if (fullpath.length === 0) {
|
|
@@ -1921,7 +1983,7 @@
|
|
|
1921
1983
|
const terminal = i === fullpath.length - 1;
|
|
1922
1984
|
if (typeof el === "string") {
|
|
1923
1985
|
curr.properties ?? (curr.properties = {});
|
|
1924
|
-
(
|
|
1986
|
+
(_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
|
|
1925
1987
|
curr = curr.properties[el];
|
|
1926
1988
|
} else {
|
|
1927
1989
|
curr.items ?? (curr.items = []);
|
|
@@ -1936,7 +1998,7 @@
|
|
|
1936
1998
|
}
|
|
1937
1999
|
}
|
|
1938
2000
|
};
|
|
1939
|
-
processError(
|
|
2001
|
+
processError(error51);
|
|
1940
2002
|
return result;
|
|
1941
2003
|
}
|
|
1942
2004
|
function toDotPath(_path) {
|
|
@@ -1957,9 +2019,9 @@
|
|
|
1957
2019
|
}
|
|
1958
2020
|
return segs.join("");
|
|
1959
2021
|
}
|
|
1960
|
-
function prettifyError(
|
|
2022
|
+
function prettifyError(error51) {
|
|
1961
2023
|
const lines = [];
|
|
1962
|
-
const issues = [...
|
|
2024
|
+
const issues = [...error51.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
|
|
1963
2025
|
for (const issue2 of issues) {
|
|
1964
2026
|
lines.push(`\u2716 ${issue2.message}`);
|
|
1965
2027
|
if (issue2.path?.length)
|
|
@@ -1970,7 +2032,7 @@
|
|
|
1970
2032
|
|
|
1971
2033
|
// node_modules/zod/v4/core/parse.js
|
|
1972
2034
|
var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
1973
|
-
const ctx = _ctx ?
|
|
2035
|
+
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
1974
2036
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
1975
2037
|
if (result instanceof Promise) {
|
|
1976
2038
|
throw new $ZodAsyncError();
|
|
@@ -1984,7 +2046,7 @@
|
|
|
1984
2046
|
};
|
|
1985
2047
|
var parse = /* @__PURE__ */ _parse($ZodRealError);
|
|
1986
2048
|
var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
1987
|
-
const ctx = _ctx ?
|
|
2049
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
1988
2050
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
1989
2051
|
if (result instanceof Promise)
|
|
1990
2052
|
result = await result;
|
|
@@ -2009,7 +2071,7 @@
|
|
|
2009
2071
|
};
|
|
2010
2072
|
var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
|
|
2011
2073
|
var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
2012
|
-
const ctx = _ctx ?
|
|
2074
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
2013
2075
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
2014
2076
|
if (result instanceof Promise)
|
|
2015
2077
|
result = await result;
|
|
@@ -2020,7 +2082,7 @@
|
|
|
2020
2082
|
};
|
|
2021
2083
|
var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
2022
2084
|
var _encode = (_Err) => (schema, value, _ctx) => {
|
|
2023
|
-
const ctx = _ctx ?
|
|
2085
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
2024
2086
|
return _parse(_Err)(schema, value, ctx);
|
|
2025
2087
|
};
|
|
2026
2088
|
var encode = /* @__PURE__ */ _encode($ZodRealError);
|
|
@@ -2029,7 +2091,7 @@
|
|
|
2029
2091
|
};
|
|
2030
2092
|
var decode = /* @__PURE__ */ _decode($ZodRealError);
|
|
2031
2093
|
var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
2032
|
-
const ctx = _ctx ?
|
|
2094
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
2033
2095
|
return _parseAsync(_Err)(schema, value, ctx);
|
|
2034
2096
|
};
|
|
2035
2097
|
var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
|
|
@@ -2038,7 +2100,7 @@
|
|
|
2038
2100
|
};
|
|
2039
2101
|
var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
|
|
2040
2102
|
var _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
2041
|
-
const ctx = _ctx ?
|
|
2103
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
2042
2104
|
return _safeParse(_Err)(schema, value, ctx);
|
|
2043
2105
|
};
|
|
2044
2106
|
var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
|
|
@@ -2047,7 +2109,7 @@
|
|
|
2047
2109
|
};
|
|
2048
2110
|
var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
|
|
2049
2111
|
var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
2050
|
-
const ctx = _ctx ?
|
|
2112
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
2051
2113
|
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
2052
2114
|
};
|
|
2053
2115
|
var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
|
|
@@ -2080,6 +2142,7 @@
|
|
|
2080
2142
|
hex: () => hex,
|
|
2081
2143
|
hostname: () => hostname,
|
|
2082
2144
|
html5Email: () => html5Email,
|
|
2145
|
+
httpProtocol: () => httpProtocol,
|
|
2083
2146
|
idnEmail: () => idnEmail,
|
|
2084
2147
|
integer: () => integer,
|
|
2085
2148
|
ipv4: () => ipv4,
|
|
@@ -2118,7 +2181,7 @@
|
|
|
2118
2181
|
uuid7: () => uuid7,
|
|
2119
2182
|
xid: () => xid
|
|
2120
2183
|
});
|
|
2121
|
-
var cuid = /^[cC][
|
|
2184
|
+
var cuid = /^[cC][0-9a-z]{6,}$/;
|
|
2122
2185
|
var cuid2 = /^[0-9a-z]+$/;
|
|
2123
2186
|
var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
2124
2187
|
var xid = /^[0-9a-vA-V]{20}$/;
|
|
@@ -2157,6 +2220,7 @@
|
|
|
2157
2220
|
var base64url = /^[A-Za-z0-9_-]*$/;
|
|
2158
2221
|
var hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/;
|
|
2159
2222
|
var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
|
|
2223
|
+
var httpProtocol = /^https?$/;
|
|
2160
2224
|
var e164 = /^\+[1-9]\d{6,14}$/;
|
|
2161
2225
|
var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
|
|
2162
2226
|
var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
@@ -2215,10 +2279,10 @@
|
|
|
2215
2279
|
|
|
2216
2280
|
// node_modules/zod/v4/core/checks.js
|
|
2217
2281
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
2218
|
-
var
|
|
2282
|
+
var _a3;
|
|
2219
2283
|
inst._zod ?? (inst._zod = {});
|
|
2220
2284
|
inst._zod.def = def;
|
|
2221
|
-
(
|
|
2285
|
+
(_a3 = inst._zod).onattach ?? (_a3.onattach = []);
|
|
2222
2286
|
});
|
|
2223
2287
|
var numericOriginMap = {
|
|
2224
2288
|
number: "number",
|
|
@@ -2284,8 +2348,8 @@
|
|
|
2284
2348
|
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
2285
2349
|
$ZodCheck.init(inst, def);
|
|
2286
2350
|
inst._zod.onattach.push((inst2) => {
|
|
2287
|
-
var
|
|
2288
|
-
(
|
|
2351
|
+
var _a3;
|
|
2352
|
+
(_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
|
|
2289
2353
|
});
|
|
2290
2354
|
inst._zod.check = (payload) => {
|
|
2291
2355
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -2418,9 +2482,9 @@
|
|
|
2418
2482
|
};
|
|
2419
2483
|
});
|
|
2420
2484
|
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
2421
|
-
var
|
|
2485
|
+
var _a3;
|
|
2422
2486
|
$ZodCheck.init(inst, def);
|
|
2423
|
-
(
|
|
2487
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2424
2488
|
const val = payload.value;
|
|
2425
2489
|
return !nullish(val) && val.size !== void 0;
|
|
2426
2490
|
});
|
|
@@ -2446,9 +2510,9 @@
|
|
|
2446
2510
|
};
|
|
2447
2511
|
});
|
|
2448
2512
|
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
2449
|
-
var
|
|
2513
|
+
var _a3;
|
|
2450
2514
|
$ZodCheck.init(inst, def);
|
|
2451
|
-
(
|
|
2515
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2452
2516
|
const val = payload.value;
|
|
2453
2517
|
return !nullish(val) && val.size !== void 0;
|
|
2454
2518
|
});
|
|
@@ -2474,9 +2538,9 @@
|
|
|
2474
2538
|
};
|
|
2475
2539
|
});
|
|
2476
2540
|
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
2477
|
-
var
|
|
2541
|
+
var _a3;
|
|
2478
2542
|
$ZodCheck.init(inst, def);
|
|
2479
|
-
(
|
|
2543
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2480
2544
|
const val = payload.value;
|
|
2481
2545
|
return !nullish(val) && val.size !== void 0;
|
|
2482
2546
|
});
|
|
@@ -2504,9 +2568,9 @@
|
|
|
2504
2568
|
};
|
|
2505
2569
|
});
|
|
2506
2570
|
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
2507
|
-
var
|
|
2571
|
+
var _a3;
|
|
2508
2572
|
$ZodCheck.init(inst, def);
|
|
2509
|
-
(
|
|
2573
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2510
2574
|
const val = payload.value;
|
|
2511
2575
|
return !nullish(val) && val.length !== void 0;
|
|
2512
2576
|
});
|
|
@@ -2533,9 +2597,9 @@
|
|
|
2533
2597
|
};
|
|
2534
2598
|
});
|
|
2535
2599
|
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
2536
|
-
var
|
|
2600
|
+
var _a3;
|
|
2537
2601
|
$ZodCheck.init(inst, def);
|
|
2538
|
-
(
|
|
2602
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2539
2603
|
const val = payload.value;
|
|
2540
2604
|
return !nullish(val) && val.length !== void 0;
|
|
2541
2605
|
});
|
|
@@ -2562,9 +2626,9 @@
|
|
|
2562
2626
|
};
|
|
2563
2627
|
});
|
|
2564
2628
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
2565
|
-
var
|
|
2629
|
+
var _a3;
|
|
2566
2630
|
$ZodCheck.init(inst, def);
|
|
2567
|
-
(
|
|
2631
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2568
2632
|
const val = payload.value;
|
|
2569
2633
|
return !nullish(val) && val.length !== void 0;
|
|
2570
2634
|
});
|
|
@@ -2593,7 +2657,7 @@
|
|
|
2593
2657
|
};
|
|
2594
2658
|
});
|
|
2595
2659
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
2596
|
-
var
|
|
2660
|
+
var _a3, _b;
|
|
2597
2661
|
$ZodCheck.init(inst, def);
|
|
2598
2662
|
inst._zod.onattach.push((inst2) => {
|
|
2599
2663
|
const bag = inst2._zod.bag;
|
|
@@ -2604,7 +2668,7 @@
|
|
|
2604
2668
|
}
|
|
2605
2669
|
});
|
|
2606
2670
|
if (def.pattern)
|
|
2607
|
-
(
|
|
2671
|
+
(_a3 = inst._zod).check ?? (_a3.check = (payload) => {
|
|
2608
2672
|
def.pattern.lastIndex = 0;
|
|
2609
2673
|
if (def.pattern.test(payload.value))
|
|
2610
2674
|
return;
|
|
@@ -2800,13 +2864,13 @@
|
|
|
2800
2864
|
// node_modules/zod/v4/core/versions.js
|
|
2801
2865
|
var version = {
|
|
2802
2866
|
major: 4,
|
|
2803
|
-
minor:
|
|
2804
|
-
patch:
|
|
2867
|
+
minor: 4,
|
|
2868
|
+
patch: 3
|
|
2805
2869
|
};
|
|
2806
2870
|
|
|
2807
2871
|
// node_modules/zod/v4/core/schemas.js
|
|
2808
2872
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
2809
|
-
var
|
|
2873
|
+
var _a3;
|
|
2810
2874
|
inst ?? (inst = {});
|
|
2811
2875
|
inst._zod.def = def;
|
|
2812
2876
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -2821,7 +2885,7 @@
|
|
|
2821
2885
|
}
|
|
2822
2886
|
}
|
|
2823
2887
|
if (checks.length === 0) {
|
|
2824
|
-
(
|
|
2888
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
2825
2889
|
inst._zod.deferred?.push(() => {
|
|
2826
2890
|
inst._zod.run = inst._zod.parse;
|
|
2827
2891
|
});
|
|
@@ -2831,6 +2895,8 @@
|
|
|
2831
2895
|
let asyncResult;
|
|
2832
2896
|
for (const ch of checks2) {
|
|
2833
2897
|
if (ch._zod.def.when) {
|
|
2898
|
+
if (explicitlyAborted(payload))
|
|
2899
|
+
continue;
|
|
2834
2900
|
const shouldRun = ch._zod.def.when(payload);
|
|
2835
2901
|
if (!shouldRun)
|
|
2836
2902
|
continue;
|
|
@@ -2971,6 +3037,19 @@
|
|
|
2971
3037
|
inst._zod.check = (payload) => {
|
|
2972
3038
|
try {
|
|
2973
3039
|
const trimmed = payload.value.trim();
|
|
3040
|
+
if (!def.normalize && def.protocol?.source === httpProtocol.source) {
|
|
3041
|
+
if (!/^https?:\/\//i.test(trimmed)) {
|
|
3042
|
+
payload.issues.push({
|
|
3043
|
+
code: "invalid_format",
|
|
3044
|
+
format: "url",
|
|
3045
|
+
note: "Invalid URL format",
|
|
3046
|
+
input: payload.value,
|
|
3047
|
+
inst,
|
|
3048
|
+
continue: !def.abort
|
|
3049
|
+
});
|
|
3050
|
+
return;
|
|
3051
|
+
}
|
|
3052
|
+
}
|
|
2974
3053
|
const url2 = new URL(trimmed);
|
|
2975
3054
|
if (def.hostname) {
|
|
2976
3055
|
def.hostname.lastIndex = 0;
|
|
@@ -3124,6 +3203,8 @@
|
|
|
3124
3203
|
function isValidBase64(data) {
|
|
3125
3204
|
if (data === "")
|
|
3126
3205
|
return true;
|
|
3206
|
+
if (/\s/.test(data))
|
|
3207
|
+
return false;
|
|
3127
3208
|
if (data.length % 4 !== 0)
|
|
3128
3209
|
return false;
|
|
3129
3210
|
try {
|
|
@@ -3316,8 +3397,6 @@
|
|
|
3316
3397
|
$ZodType.init(inst, def);
|
|
3317
3398
|
inst._zod.pattern = _undefined;
|
|
3318
3399
|
inst._zod.values = /* @__PURE__ */ new Set([void 0]);
|
|
3319
|
-
inst._zod.optin = "optional";
|
|
3320
|
-
inst._zod.optout = "optional";
|
|
3321
3400
|
inst._zod.parse = (payload, _ctx) => {
|
|
3322
3401
|
const input = payload.value;
|
|
3323
3402
|
if (typeof input === "undefined")
|
|
@@ -3446,15 +3525,27 @@
|
|
|
3446
3525
|
return payload;
|
|
3447
3526
|
};
|
|
3448
3527
|
});
|
|
3449
|
-
function handlePropertyResult(result, final, key, input, isOptionalOut) {
|
|
3528
|
+
function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
|
|
3529
|
+
const isPresent = key in input;
|
|
3450
3530
|
if (result.issues.length) {
|
|
3451
|
-
if (isOptionalOut && !
|
|
3531
|
+
if (isOptionalIn && isOptionalOut && !isPresent) {
|
|
3452
3532
|
return;
|
|
3453
3533
|
}
|
|
3454
3534
|
final.issues.push(...prefixIssues(key, result.issues));
|
|
3455
3535
|
}
|
|
3536
|
+
if (!isPresent && !isOptionalIn) {
|
|
3537
|
+
if (!result.issues.length) {
|
|
3538
|
+
final.issues.push({
|
|
3539
|
+
code: "invalid_type",
|
|
3540
|
+
expected: "nonoptional",
|
|
3541
|
+
input: void 0,
|
|
3542
|
+
path: [key]
|
|
3543
|
+
});
|
|
3544
|
+
}
|
|
3545
|
+
return;
|
|
3546
|
+
}
|
|
3456
3547
|
if (result.value === void 0) {
|
|
3457
|
-
if (
|
|
3548
|
+
if (isPresent) {
|
|
3458
3549
|
final.value[key] = void 0;
|
|
3459
3550
|
}
|
|
3460
3551
|
} else {
|
|
@@ -3482,8 +3573,11 @@
|
|
|
3482
3573
|
const keySet = def.keySet;
|
|
3483
3574
|
const _catchall = def.catchall._zod;
|
|
3484
3575
|
const t = _catchall.def.type;
|
|
3576
|
+
const isOptionalIn = _catchall.optin === "optional";
|
|
3485
3577
|
const isOptionalOut = _catchall.optout === "optional";
|
|
3486
3578
|
for (const key in input) {
|
|
3579
|
+
if (key === "__proto__")
|
|
3580
|
+
continue;
|
|
3487
3581
|
if (keySet.has(key))
|
|
3488
3582
|
continue;
|
|
3489
3583
|
if (t === "never") {
|
|
@@ -3492,9 +3586,9 @@
|
|
|
3492
3586
|
}
|
|
3493
3587
|
const r = _catchall.run({ value: input[key], issues: [] }, ctx);
|
|
3494
3588
|
if (r instanceof Promise) {
|
|
3495
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
3589
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
3496
3590
|
} else {
|
|
3497
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
3591
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
3498
3592
|
}
|
|
3499
3593
|
}
|
|
3500
3594
|
if (unrecognized.length) {
|
|
@@ -3560,12 +3654,13 @@
|
|
|
3560
3654
|
const shape = value.shape;
|
|
3561
3655
|
for (const key of value.keys) {
|
|
3562
3656
|
const el = shape[key];
|
|
3657
|
+
const isOptionalIn = el._zod.optin === "optional";
|
|
3563
3658
|
const isOptionalOut = el._zod.optout === "optional";
|
|
3564
3659
|
const r = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
3565
3660
|
if (r instanceof Promise) {
|
|
3566
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
3661
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
3567
3662
|
} else {
|
|
3568
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
3663
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
3569
3664
|
}
|
|
3570
3665
|
}
|
|
3571
3666
|
if (!catchall) {
|
|
@@ -3596,9 +3691,10 @@
|
|
|
3596
3691
|
const id = ids[key];
|
|
3597
3692
|
const k = esc(key);
|
|
3598
3693
|
const schema = shape[key];
|
|
3694
|
+
const isOptionalIn = schema?._zod?.optin === "optional";
|
|
3599
3695
|
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
3600
3696
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
3601
|
-
if (isOptionalOut) {
|
|
3697
|
+
if (isOptionalIn && isOptionalOut) {
|
|
3602
3698
|
doc.write(`
|
|
3603
3699
|
if (${id}.issues.length) {
|
|
3604
3700
|
if (${k} in input) {
|
|
@@ -3617,6 +3713,33 @@
|
|
|
3617
3713
|
newResult[${k}] = ${id}.value;
|
|
3618
3714
|
}
|
|
3619
3715
|
|
|
3716
|
+
`);
|
|
3717
|
+
} else if (!isOptionalIn) {
|
|
3718
|
+
doc.write(`
|
|
3719
|
+
const ${id}_present = ${k} in input;
|
|
3720
|
+
if (${id}.issues.length) {
|
|
3721
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
3722
|
+
...iss,
|
|
3723
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
3724
|
+
})));
|
|
3725
|
+
}
|
|
3726
|
+
if (!${id}_present && !${id}.issues.length) {
|
|
3727
|
+
payload.issues.push({
|
|
3728
|
+
code: "invalid_type",
|
|
3729
|
+
expected: "nonoptional",
|
|
3730
|
+
input: undefined,
|
|
3731
|
+
path: [${k}]
|
|
3732
|
+
});
|
|
3733
|
+
}
|
|
3734
|
+
|
|
3735
|
+
if (${id}_present) {
|
|
3736
|
+
if (${id}.value === undefined) {
|
|
3737
|
+
newResult[${k}] = undefined;
|
|
3738
|
+
} else {
|
|
3739
|
+
newResult[${k}] = ${id}.value;
|
|
3740
|
+
}
|
|
3741
|
+
}
|
|
3742
|
+
|
|
3620
3743
|
`);
|
|
3621
3744
|
} else {
|
|
3622
3745
|
doc.write(`
|
|
@@ -3710,10 +3833,9 @@
|
|
|
3710
3833
|
}
|
|
3711
3834
|
return void 0;
|
|
3712
3835
|
});
|
|
3713
|
-
const
|
|
3714
|
-
const first = def.options[0]._zod.run;
|
|
3836
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
3715
3837
|
inst._zod.parse = (payload, ctx) => {
|
|
3716
|
-
if (
|
|
3838
|
+
if (first) {
|
|
3717
3839
|
return first(payload, ctx);
|
|
3718
3840
|
}
|
|
3719
3841
|
let async = false;
|
|
@@ -3766,10 +3888,9 @@
|
|
|
3766
3888
|
var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
|
|
3767
3889
|
$ZodUnion.init(inst, def);
|
|
3768
3890
|
def.inclusive = false;
|
|
3769
|
-
const
|
|
3770
|
-
const first = def.options[0]._zod.run;
|
|
3891
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
3771
3892
|
inst._zod.parse = (payload, ctx) => {
|
|
3772
|
-
if (
|
|
3893
|
+
if (first) {
|
|
3773
3894
|
return first(payload, ctx);
|
|
3774
3895
|
}
|
|
3775
3896
|
let async = false;
|
|
@@ -3844,7 +3965,7 @@
|
|
|
3844
3965
|
if (opt) {
|
|
3845
3966
|
return opt._zod.run(payload, ctx);
|
|
3846
3967
|
}
|
|
3847
|
-
if (def.unionFallback) {
|
|
3968
|
+
if (def.unionFallback || ctx.direction === "backward") {
|
|
3848
3969
|
return _super(payload, ctx);
|
|
3849
3970
|
}
|
|
3850
3971
|
payload.issues.push({
|
|
@@ -3852,6 +3973,7 @@
|
|
|
3852
3973
|
errors: [],
|
|
3853
3974
|
note: "No matching discriminator",
|
|
3854
3975
|
discriminator: def.discriminator,
|
|
3976
|
+
options: Array.from(disc.value.keys()),
|
|
3855
3977
|
input,
|
|
3856
3978
|
path: [def.discriminator],
|
|
3857
3979
|
inst
|
|
@@ -3973,64 +4095,96 @@
|
|
|
3973
4095
|
}
|
|
3974
4096
|
payload.value = [];
|
|
3975
4097
|
const proms = [];
|
|
3976
|
-
const
|
|
3977
|
-
const
|
|
4098
|
+
const optinStart = getTupleOptStart(items, "optin");
|
|
4099
|
+
const optoutStart = getTupleOptStart(items, "optout");
|
|
3978
4100
|
if (!def.rest) {
|
|
3979
|
-
|
|
3980
|
-
const tooSmall = input.length < optStart - 1;
|
|
3981
|
-
if (tooBig || tooSmall) {
|
|
4101
|
+
if (input.length < optinStart) {
|
|
3982
4102
|
payload.issues.push({
|
|
3983
|
-
|
|
4103
|
+
code: "too_small",
|
|
4104
|
+
minimum: optinStart,
|
|
4105
|
+
inclusive: true,
|
|
3984
4106
|
input,
|
|
3985
4107
|
inst,
|
|
3986
4108
|
origin: "array"
|
|
3987
4109
|
});
|
|
3988
4110
|
return payload;
|
|
3989
4111
|
}
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
4112
|
+
if (input.length > items.length) {
|
|
4113
|
+
payload.issues.push({
|
|
4114
|
+
code: "too_big",
|
|
4115
|
+
maximum: items.length,
|
|
4116
|
+
inclusive: true,
|
|
4117
|
+
input,
|
|
4118
|
+
inst,
|
|
4119
|
+
origin: "array"
|
|
4120
|
+
});
|
|
3997
4121
|
}
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
}, ctx);
|
|
4002
|
-
if (
|
|
4003
|
-
proms.push(
|
|
4122
|
+
}
|
|
4123
|
+
const itemResults = new Array(items.length);
|
|
4124
|
+
for (let i = 0; i < items.length; i++) {
|
|
4125
|
+
const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
|
|
4126
|
+
if (r instanceof Promise) {
|
|
4127
|
+
proms.push(r.then((rr) => {
|
|
4128
|
+
itemResults[i] = rr;
|
|
4129
|
+
}));
|
|
4004
4130
|
} else {
|
|
4005
|
-
|
|
4131
|
+
itemResults[i] = r;
|
|
4006
4132
|
}
|
|
4007
4133
|
}
|
|
4008
4134
|
if (def.rest) {
|
|
4135
|
+
let i = items.length - 1;
|
|
4009
4136
|
const rest2 = input.slice(items.length);
|
|
4010
4137
|
for (const el of rest2) {
|
|
4011
4138
|
i++;
|
|
4012
|
-
const result = def.rest._zod.run({
|
|
4013
|
-
value: el,
|
|
4014
|
-
issues: []
|
|
4015
|
-
}, ctx);
|
|
4139
|
+
const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
|
|
4016
4140
|
if (result instanceof Promise) {
|
|
4017
|
-
proms.push(result.then((
|
|
4141
|
+
proms.push(result.then((r) => handleTupleResult(r, payload, i)));
|
|
4018
4142
|
} else {
|
|
4019
4143
|
handleTupleResult(result, payload, i);
|
|
4020
4144
|
}
|
|
4021
4145
|
}
|
|
4022
4146
|
}
|
|
4023
|
-
if (proms.length)
|
|
4024
|
-
return Promise.all(proms).then(() => payload);
|
|
4025
|
-
|
|
4147
|
+
if (proms.length) {
|
|
4148
|
+
return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
|
|
4149
|
+
}
|
|
4150
|
+
return handleTupleResults(itemResults, payload, items, input, optoutStart);
|
|
4026
4151
|
};
|
|
4027
4152
|
});
|
|
4153
|
+
function getTupleOptStart(items, key) {
|
|
4154
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
4155
|
+
if (items[i]._zod[key] !== "optional")
|
|
4156
|
+
return i + 1;
|
|
4157
|
+
}
|
|
4158
|
+
return 0;
|
|
4159
|
+
}
|
|
4028
4160
|
function handleTupleResult(result, final, index) {
|
|
4029
4161
|
if (result.issues.length) {
|
|
4030
4162
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
4031
4163
|
}
|
|
4032
4164
|
final.value[index] = result.value;
|
|
4033
4165
|
}
|
|
4166
|
+
function handleTupleResults(itemResults, final, items, input, optoutStart) {
|
|
4167
|
+
for (let i = 0; i < items.length; i++) {
|
|
4168
|
+
const r = itemResults[i];
|
|
4169
|
+
const isPresent = i < input.length;
|
|
4170
|
+
if (r.issues.length) {
|
|
4171
|
+
if (!isPresent && i >= optoutStart) {
|
|
4172
|
+
final.value.length = i;
|
|
4173
|
+
break;
|
|
4174
|
+
}
|
|
4175
|
+
final.issues.push(...prefixIssues(i, r.issues));
|
|
4176
|
+
}
|
|
4177
|
+
final.value[i] = r.value;
|
|
4178
|
+
}
|
|
4179
|
+
for (let i = final.value.length - 1; i >= input.length; i--) {
|
|
4180
|
+
if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
|
|
4181
|
+
final.value.length = i;
|
|
4182
|
+
} else {
|
|
4183
|
+
break;
|
|
4184
|
+
}
|
|
4185
|
+
}
|
|
4186
|
+
return final;
|
|
4187
|
+
}
|
|
4034
4188
|
var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
4035
4189
|
$ZodType.init(inst, def);
|
|
4036
4190
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -4052,19 +4206,35 @@
|
|
|
4052
4206
|
for (const key of values) {
|
|
4053
4207
|
if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
4054
4208
|
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
4209
|
+
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
4210
|
+
if (keyResult instanceof Promise) {
|
|
4211
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
4212
|
+
}
|
|
4213
|
+
if (keyResult.issues.length) {
|
|
4214
|
+
payload.issues.push({
|
|
4215
|
+
code: "invalid_key",
|
|
4216
|
+
origin: "record",
|
|
4217
|
+
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
4218
|
+
input: key,
|
|
4219
|
+
path: [key],
|
|
4220
|
+
inst
|
|
4221
|
+
});
|
|
4222
|
+
continue;
|
|
4223
|
+
}
|
|
4224
|
+
const outKey = keyResult.value;
|
|
4055
4225
|
const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
|
|
4056
4226
|
if (result instanceof Promise) {
|
|
4057
4227
|
proms.push(result.then((result2) => {
|
|
4058
4228
|
if (result2.issues.length) {
|
|
4059
4229
|
payload.issues.push(...prefixIssues(key, result2.issues));
|
|
4060
4230
|
}
|
|
4061
|
-
payload.value[
|
|
4231
|
+
payload.value[outKey] = result2.value;
|
|
4062
4232
|
}));
|
|
4063
4233
|
} else {
|
|
4064
4234
|
if (result.issues.length) {
|
|
4065
4235
|
payload.issues.push(...prefixIssues(key, result.issues));
|
|
4066
4236
|
}
|
|
4067
|
-
payload.value[
|
|
4237
|
+
payload.value[outKey] = result.value;
|
|
4068
4238
|
}
|
|
4069
4239
|
}
|
|
4070
4240
|
}
|
|
@@ -4088,6 +4258,8 @@
|
|
|
4088
4258
|
for (const key of Reflect.ownKeys(input)) {
|
|
4089
4259
|
if (key === "__proto__")
|
|
4090
4260
|
continue;
|
|
4261
|
+
if (!Object.prototype.propertyIsEnumerable.call(input, key))
|
|
4262
|
+
continue;
|
|
4091
4263
|
let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
4092
4264
|
if (keyResult instanceof Promise) {
|
|
4093
4265
|
throw new Error("Async schemas not supported in object keys currently");
|
|
@@ -4292,6 +4464,7 @@
|
|
|
4292
4464
|
});
|
|
4293
4465
|
var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
|
|
4294
4466
|
$ZodType.init(inst, def);
|
|
4467
|
+
inst._zod.optin = "optional";
|
|
4295
4468
|
inst._zod.parse = (payload, ctx) => {
|
|
4296
4469
|
if (ctx.direction === "backward") {
|
|
4297
4470
|
throw new $ZodEncodeError(inst.constructor.name);
|
|
@@ -4301,6 +4474,7 @@
|
|
|
4301
4474
|
const output = _out instanceof Promise ? _out : Promise.resolve(_out);
|
|
4302
4475
|
return output.then((output2) => {
|
|
4303
4476
|
payload.value = output2;
|
|
4477
|
+
payload.fallback = true;
|
|
4304
4478
|
return payload;
|
|
4305
4479
|
});
|
|
4306
4480
|
}
|
|
@@ -4308,11 +4482,12 @@
|
|
|
4308
4482
|
throw new $ZodAsyncError();
|
|
4309
4483
|
}
|
|
4310
4484
|
payload.value = _out;
|
|
4485
|
+
payload.fallback = true;
|
|
4311
4486
|
return payload;
|
|
4312
4487
|
};
|
|
4313
4488
|
});
|
|
4314
4489
|
function handleOptionalResult(result, input) {
|
|
4315
|
-
if (result.issues.length
|
|
4490
|
+
if (input === void 0 && (result.issues.length || result.fallback)) {
|
|
4316
4491
|
return { issues: [], value: void 0 };
|
|
4317
4492
|
}
|
|
4318
4493
|
return result;
|
|
@@ -4330,10 +4505,11 @@
|
|
|
4330
4505
|
});
|
|
4331
4506
|
inst._zod.parse = (payload, ctx) => {
|
|
4332
4507
|
if (def.innerType._zod.optin === "optional") {
|
|
4508
|
+
const input = payload.value;
|
|
4333
4509
|
const result = def.innerType._zod.run(payload, ctx);
|
|
4334
4510
|
if (result instanceof Promise)
|
|
4335
|
-
return result.then((r) => handleOptionalResult(r,
|
|
4336
|
-
return handleOptionalResult(result,
|
|
4511
|
+
return result.then((r) => handleOptionalResult(r, input));
|
|
4512
|
+
return handleOptionalResult(result, input);
|
|
4337
4513
|
}
|
|
4338
4514
|
if (payload.value === void 0) {
|
|
4339
4515
|
return payload;
|
|
@@ -4449,7 +4625,7 @@
|
|
|
4449
4625
|
});
|
|
4450
4626
|
var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
4451
4627
|
$ZodType.init(inst, def);
|
|
4452
|
-
|
|
4628
|
+
inst._zod.optin = "optional";
|
|
4453
4629
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
4454
4630
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
4455
4631
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -4469,6 +4645,7 @@
|
|
|
4469
4645
|
input: payload.value
|
|
4470
4646
|
});
|
|
4471
4647
|
payload.issues = [];
|
|
4648
|
+
payload.fallback = true;
|
|
4472
4649
|
}
|
|
4473
4650
|
return payload;
|
|
4474
4651
|
});
|
|
@@ -4483,6 +4660,7 @@
|
|
|
4483
4660
|
input: payload.value
|
|
4484
4661
|
});
|
|
4485
4662
|
payload.issues = [];
|
|
4663
|
+
payload.fallback = true;
|
|
4486
4664
|
}
|
|
4487
4665
|
return payload;
|
|
4488
4666
|
};
|
|
@@ -4528,7 +4706,7 @@
|
|
|
4528
4706
|
left.aborted = true;
|
|
4529
4707
|
return left;
|
|
4530
4708
|
}
|
|
4531
|
-
return next._zod.run({ value: left.value, issues: left.issues }, ctx);
|
|
4709
|
+
return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
|
|
4532
4710
|
}
|
|
4533
4711
|
var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
|
|
4534
4712
|
$ZodType.init(inst, def);
|
|
@@ -4580,6 +4758,9 @@
|
|
|
4580
4758
|
}
|
|
4581
4759
|
return nextSchema._zod.run({ value, issues: left.issues }, ctx);
|
|
4582
4760
|
}
|
|
4761
|
+
var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
|
|
4762
|
+
$ZodPipe.init(inst, def);
|
|
4763
|
+
});
|
|
4583
4764
|
var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
4584
4765
|
$ZodType.init(inst, def);
|
|
4585
4766
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
@@ -4731,7 +4912,12 @@
|
|
|
4731
4912
|
});
|
|
4732
4913
|
var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
4733
4914
|
$ZodType.init(inst, def);
|
|
4734
|
-
defineLazy(inst._zod, "innerType", () =>
|
|
4915
|
+
defineLazy(inst._zod, "innerType", () => {
|
|
4916
|
+
const d = def;
|
|
4917
|
+
if (!d._cachedInner)
|
|
4918
|
+
d._cachedInner = def.getter();
|
|
4919
|
+
return d._cachedInner;
|
|
4920
|
+
});
|
|
4735
4921
|
defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
|
|
4736
4922
|
defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
|
|
4737
4923
|
defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
|
|
@@ -4786,6 +4972,7 @@
|
|
|
4786
4972
|
cs: () => cs_default,
|
|
4787
4973
|
da: () => da_default,
|
|
4788
4974
|
de: () => de_default,
|
|
4975
|
+
el: () => el_default,
|
|
4789
4976
|
en: () => en_default,
|
|
4790
4977
|
eo: () => eo_default,
|
|
4791
4978
|
es: () => es_default,
|
|
@@ -4794,6 +4981,7 @@
|
|
|
4794
4981
|
fr: () => fr_default,
|
|
4795
4982
|
frCA: () => fr_CA_default,
|
|
4796
4983
|
he: () => he_default,
|
|
4984
|
+
hr: () => hr_default,
|
|
4797
4985
|
hu: () => hu_default,
|
|
4798
4986
|
hy: () => hy_default,
|
|
4799
4987
|
id: () => id_default,
|
|
@@ -4813,6 +5001,7 @@
|
|
|
4813
5001
|
pl: () => pl_default,
|
|
4814
5002
|
ps: () => ps_default,
|
|
4815
5003
|
pt: () => pt_default,
|
|
5004
|
+
ro: () => ro_default,
|
|
4816
5005
|
ru: () => ru_default,
|
|
4817
5006
|
sl: () => sl_default,
|
|
4818
5007
|
sv: () => sv_default,
|
|
@@ -5766,8 +5955,118 @@
|
|
|
5766
5955
|
};
|
|
5767
5956
|
}
|
|
5768
5957
|
|
|
5769
|
-
// node_modules/zod/v4/locales/
|
|
5958
|
+
// node_modules/zod/v4/locales/el.js
|
|
5770
5959
|
var error9 = () => {
|
|
5960
|
+
const Sizable = {
|
|
5961
|
+
string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5962
|
+
file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5963
|
+
array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5964
|
+
set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5965
|
+
map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
|
|
5966
|
+
};
|
|
5967
|
+
function getSizing(origin) {
|
|
5968
|
+
return Sizable[origin] ?? null;
|
|
5969
|
+
}
|
|
5970
|
+
const FormatDictionary = {
|
|
5971
|
+
regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
|
|
5972
|
+
email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
|
|
5973
|
+
url: "URL",
|
|
5974
|
+
emoji: "emoji",
|
|
5975
|
+
uuid: "UUID",
|
|
5976
|
+
uuidv4: "UUIDv4",
|
|
5977
|
+
uuidv6: "UUIDv6",
|
|
5978
|
+
nanoid: "nanoid",
|
|
5979
|
+
guid: "GUID",
|
|
5980
|
+
cuid: "cuid",
|
|
5981
|
+
cuid2: "cuid2",
|
|
5982
|
+
ulid: "ULID",
|
|
5983
|
+
xid: "XID",
|
|
5984
|
+
ksuid: "KSUID",
|
|
5985
|
+
datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
|
|
5986
|
+
date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
|
|
5987
|
+
time: "ISO \u03CE\u03C1\u03B1",
|
|
5988
|
+
duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
|
|
5989
|
+
ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
|
|
5990
|
+
ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
|
|
5991
|
+
mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
|
|
5992
|
+
cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
|
|
5993
|
+
cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
|
|
5994
|
+
base64: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",
|
|
5995
|
+
base64url: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",
|
|
5996
|
+
json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
|
|
5997
|
+
e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
|
|
5998
|
+
jwt: "JWT",
|
|
5999
|
+
template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
|
|
6000
|
+
};
|
|
6001
|
+
const TypeDictionary = {
|
|
6002
|
+
nan: "NaN"
|
|
6003
|
+
};
|
|
6004
|
+
return (issue2) => {
|
|
6005
|
+
switch (issue2.code) {
|
|
6006
|
+
case "invalid_type": {
|
|
6007
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
6008
|
+
const receivedType = parsedType(issue2.input);
|
|
6009
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
6010
|
+
if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
|
|
6011
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${issue2.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`;
|
|
6012
|
+
}
|
|
6013
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`;
|
|
6014
|
+
}
|
|
6015
|
+
case "invalid_value":
|
|
6016
|
+
if (issue2.values.length === 1)
|
|
6017
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${stringifyPrimitive(issue2.values[0])}`;
|
|
6018
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${joinValues(issue2.values, "|")}`;
|
|
6019
|
+
case "too_big": {
|
|
6020
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
6021
|
+
const sizing = getSizing(issue2.origin);
|
|
6022
|
+
if (sizing)
|
|
6023
|
+
return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`;
|
|
6024
|
+
return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue2.maximum.toString()}`;
|
|
6025
|
+
}
|
|
6026
|
+
case "too_small": {
|
|
6027
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
6028
|
+
const sizing = getSizing(issue2.origin);
|
|
6029
|
+
if (sizing) {
|
|
6030
|
+
return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
6031
|
+
}
|
|
6032
|
+
return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue2.minimum.toString()}`;
|
|
6033
|
+
}
|
|
6034
|
+
case "invalid_format": {
|
|
6035
|
+
const _issue = issue2;
|
|
6036
|
+
if (_issue.format === "starts_with") {
|
|
6037
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${_issue.prefix}"`;
|
|
6038
|
+
}
|
|
6039
|
+
if (_issue.format === "ends_with")
|
|
6040
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${_issue.suffix}"`;
|
|
6041
|
+
if (_issue.format === "includes")
|
|
6042
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${_issue.includes}"`;
|
|
6043
|
+
if (_issue.format === "regex")
|
|
6044
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${_issue.pattern}`;
|
|
6045
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
6046
|
+
}
|
|
6047
|
+
case "not_multiple_of":
|
|
6048
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${issue2.divisor}`;
|
|
6049
|
+
case "unrecognized_keys":
|
|
6050
|
+
return `\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${issue2.keys.length > 1 ? "\u03B1" : "\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${issue2.keys.length > 1 ? "\u03B9\u03AC" : "\u03AF"}: ${joinValues(issue2.keys, ", ")}`;
|
|
6051
|
+
case "invalid_key":
|
|
6052
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
6053
|
+
case "invalid_union":
|
|
6054
|
+
return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
|
|
6055
|
+
case "invalid_element":
|
|
6056
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
6057
|
+
default:
|
|
6058
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
|
|
6059
|
+
}
|
|
6060
|
+
};
|
|
6061
|
+
};
|
|
6062
|
+
function el_default() {
|
|
6063
|
+
return {
|
|
6064
|
+
localeError: error9()
|
|
6065
|
+
};
|
|
6066
|
+
}
|
|
6067
|
+
|
|
6068
|
+
// node_modules/zod/v4/locales/en.js
|
|
6069
|
+
var error10 = () => {
|
|
5771
6070
|
const Sizable = {
|
|
5772
6071
|
string: { unit: "characters", verb: "to have" },
|
|
5773
6072
|
file: { unit: "bytes", verb: "to have" },
|
|
@@ -5861,6 +6160,10 @@
|
|
|
5861
6160
|
case "invalid_key":
|
|
5862
6161
|
return `Invalid key in ${issue2.origin}`;
|
|
5863
6162
|
case "invalid_union":
|
|
6163
|
+
if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
|
|
6164
|
+
const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
|
|
6165
|
+
return `Invalid discriminator value. Expected ${opts}`;
|
|
6166
|
+
}
|
|
5864
6167
|
return "Invalid input";
|
|
5865
6168
|
case "invalid_element":
|
|
5866
6169
|
return `Invalid value in ${issue2.origin}`;
|
|
@@ -5871,12 +6174,12 @@
|
|
|
5871
6174
|
};
|
|
5872
6175
|
function en_default() {
|
|
5873
6176
|
return {
|
|
5874
|
-
localeError:
|
|
6177
|
+
localeError: error10()
|
|
5875
6178
|
};
|
|
5876
6179
|
}
|
|
5877
6180
|
|
|
5878
6181
|
// node_modules/zod/v4/locales/eo.js
|
|
5879
|
-
var
|
|
6182
|
+
var error11 = () => {
|
|
5880
6183
|
const Sizable = {
|
|
5881
6184
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
5882
6185
|
file: { unit: "bajtojn", verb: "havi" },
|
|
@@ -5981,12 +6284,12 @@
|
|
|
5981
6284
|
};
|
|
5982
6285
|
function eo_default() {
|
|
5983
6286
|
return {
|
|
5984
|
-
localeError:
|
|
6287
|
+
localeError: error11()
|
|
5985
6288
|
};
|
|
5986
6289
|
}
|
|
5987
6290
|
|
|
5988
6291
|
// node_modules/zod/v4/locales/es.js
|
|
5989
|
-
var
|
|
6292
|
+
var error12 = () => {
|
|
5990
6293
|
const Sizable = {
|
|
5991
6294
|
string: { unit: "caracteres", verb: "tener" },
|
|
5992
6295
|
file: { unit: "bytes", verb: "tener" },
|
|
@@ -6114,12 +6417,12 @@
|
|
|
6114
6417
|
};
|
|
6115
6418
|
function es_default() {
|
|
6116
6419
|
return {
|
|
6117
|
-
localeError:
|
|
6420
|
+
localeError: error12()
|
|
6118
6421
|
};
|
|
6119
6422
|
}
|
|
6120
6423
|
|
|
6121
6424
|
// node_modules/zod/v4/locales/fa.js
|
|
6122
|
-
var
|
|
6425
|
+
var error13 = () => {
|
|
6123
6426
|
const Sizable = {
|
|
6124
6427
|
string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
6125
6428
|
file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
@@ -6229,12 +6532,12 @@
|
|
|
6229
6532
|
};
|
|
6230
6533
|
function fa_default() {
|
|
6231
6534
|
return {
|
|
6232
|
-
localeError:
|
|
6535
|
+
localeError: error13()
|
|
6233
6536
|
};
|
|
6234
6537
|
}
|
|
6235
6538
|
|
|
6236
6539
|
// node_modules/zod/v4/locales/fi.js
|
|
6237
|
-
var
|
|
6540
|
+
var error14 = () => {
|
|
6238
6541
|
const Sizable = {
|
|
6239
6542
|
string: { unit: "merkki\xE4", subject: "merkkijonon" },
|
|
6240
6543
|
file: { unit: "tavua", subject: "tiedoston" },
|
|
@@ -6342,12 +6645,12 @@
|
|
|
6342
6645
|
};
|
|
6343
6646
|
function fi_default() {
|
|
6344
6647
|
return {
|
|
6345
|
-
localeError:
|
|
6648
|
+
localeError: error14()
|
|
6346
6649
|
};
|
|
6347
6650
|
}
|
|
6348
6651
|
|
|
6349
6652
|
// node_modules/zod/v4/locales/fr.js
|
|
6350
|
-
var
|
|
6653
|
+
var error15 = () => {
|
|
6351
6654
|
const Sizable = {
|
|
6352
6655
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
6353
6656
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -6388,9 +6691,27 @@
|
|
|
6388
6691
|
template_literal: "entr\xE9e"
|
|
6389
6692
|
};
|
|
6390
6693
|
const TypeDictionary = {
|
|
6391
|
-
|
|
6694
|
+
string: "cha\xEEne",
|
|
6392
6695
|
number: "nombre",
|
|
6393
|
-
|
|
6696
|
+
int: "entier",
|
|
6697
|
+
boolean: "bool\xE9en",
|
|
6698
|
+
bigint: "grand entier",
|
|
6699
|
+
symbol: "symbole",
|
|
6700
|
+
undefined: "ind\xE9fini",
|
|
6701
|
+
null: "null",
|
|
6702
|
+
never: "jamais",
|
|
6703
|
+
void: "vide",
|
|
6704
|
+
date: "date",
|
|
6705
|
+
array: "tableau",
|
|
6706
|
+
object: "objet",
|
|
6707
|
+
tuple: "tuple",
|
|
6708
|
+
record: "enregistrement",
|
|
6709
|
+
map: "carte",
|
|
6710
|
+
set: "ensemble",
|
|
6711
|
+
file: "fichier",
|
|
6712
|
+
nonoptional: "non-optionnel",
|
|
6713
|
+
nan: "NaN",
|
|
6714
|
+
function: "fonction"
|
|
6394
6715
|
};
|
|
6395
6716
|
return (issue2) => {
|
|
6396
6717
|
switch (issue2.code) {
|
|
@@ -6411,16 +6732,15 @@
|
|
|
6411
6732
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
6412
6733
|
const sizing = getSizing(issue2.origin);
|
|
6413
6734
|
if (sizing)
|
|
6414
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
6415
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
6735
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
6736
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
6416
6737
|
}
|
|
6417
6738
|
case "too_small": {
|
|
6418
6739
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
6419
6740
|
const sizing = getSizing(issue2.origin);
|
|
6420
|
-
if (sizing)
|
|
6421
|
-
return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
6422
|
-
}
|
|
6423
|
-
return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
6741
|
+
if (sizing)
|
|
6742
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
6743
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
6424
6744
|
}
|
|
6425
6745
|
case "invalid_format": {
|
|
6426
6746
|
const _issue = issue2;
|
|
@@ -6451,12 +6771,12 @@
|
|
|
6451
6771
|
};
|
|
6452
6772
|
function fr_default() {
|
|
6453
6773
|
return {
|
|
6454
|
-
localeError:
|
|
6774
|
+
localeError: error15()
|
|
6455
6775
|
};
|
|
6456
6776
|
}
|
|
6457
6777
|
|
|
6458
6778
|
// node_modules/zod/v4/locales/fr-CA.js
|
|
6459
|
-
var
|
|
6779
|
+
var error16 = () => {
|
|
6460
6780
|
const Sizable = {
|
|
6461
6781
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
6462
6782
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -6559,12 +6879,12 @@
|
|
|
6559
6879
|
};
|
|
6560
6880
|
function fr_CA_default() {
|
|
6561
6881
|
return {
|
|
6562
|
-
localeError:
|
|
6882
|
+
localeError: error16()
|
|
6563
6883
|
};
|
|
6564
6884
|
}
|
|
6565
6885
|
|
|
6566
6886
|
// node_modules/zod/v4/locales/he.js
|
|
6567
|
-
var
|
|
6887
|
+
var error17 = () => {
|
|
6568
6888
|
const TypeNames = {
|
|
6569
6889
|
string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
|
|
6570
6890
|
number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
|
|
@@ -6754,24 +7074,24 @@
|
|
|
6754
7074
|
};
|
|
6755
7075
|
function he_default() {
|
|
6756
7076
|
return {
|
|
6757
|
-
localeError:
|
|
7077
|
+
localeError: error17()
|
|
6758
7078
|
};
|
|
6759
7079
|
}
|
|
6760
7080
|
|
|
6761
|
-
// node_modules/zod/v4/locales/
|
|
6762
|
-
var
|
|
7081
|
+
// node_modules/zod/v4/locales/hr.js
|
|
7082
|
+
var error18 = () => {
|
|
6763
7083
|
const Sizable = {
|
|
6764
|
-
string: { unit: "
|
|
6765
|
-
file: { unit: "
|
|
6766
|
-
array: { unit: "
|
|
6767
|
-
set: { unit: "
|
|
7084
|
+
string: { unit: "znakova", verb: "imati" },
|
|
7085
|
+
file: { unit: "bajtova", verb: "imati" },
|
|
7086
|
+
array: { unit: "stavki", verb: "imati" },
|
|
7087
|
+
set: { unit: "stavki", verb: "imati" }
|
|
6768
7088
|
};
|
|
6769
7089
|
function getSizing(origin) {
|
|
6770
7090
|
return Sizable[origin] ?? null;
|
|
6771
7091
|
}
|
|
6772
7092
|
const FormatDictionary = {
|
|
6773
|
-
regex: "
|
|
6774
|
-
email: "email
|
|
7093
|
+
regex: "unos",
|
|
7094
|
+
email: "email adresa",
|
|
6775
7095
|
url: "URL",
|
|
6776
7096
|
emoji: "emoji",
|
|
6777
7097
|
uuid: "UUID",
|
|
@@ -6784,20 +7104,143 @@
|
|
|
6784
7104
|
ulid: "ULID",
|
|
6785
7105
|
xid: "XID",
|
|
6786
7106
|
ksuid: "KSUID",
|
|
6787
|
-
datetime: "ISO
|
|
6788
|
-
date: "ISO
|
|
6789
|
-
time: "ISO
|
|
6790
|
-
duration: "ISO
|
|
6791
|
-
ipv4: "IPv4
|
|
6792
|
-
ipv6: "IPv6
|
|
6793
|
-
cidrv4: "IPv4
|
|
6794
|
-
cidrv6: "IPv6
|
|
6795
|
-
base64: "base64
|
|
6796
|
-
base64url: "base64url
|
|
6797
|
-
json_string: "JSON
|
|
6798
|
-
e164: "E.164
|
|
7107
|
+
datetime: "ISO datum i vrijeme",
|
|
7108
|
+
date: "ISO datum",
|
|
7109
|
+
time: "ISO vrijeme",
|
|
7110
|
+
duration: "ISO trajanje",
|
|
7111
|
+
ipv4: "IPv4 adresa",
|
|
7112
|
+
ipv6: "IPv6 adresa",
|
|
7113
|
+
cidrv4: "IPv4 raspon",
|
|
7114
|
+
cidrv6: "IPv6 raspon",
|
|
7115
|
+
base64: "base64 kodirani tekst",
|
|
7116
|
+
base64url: "base64url kodirani tekst",
|
|
7117
|
+
json_string: "JSON tekst",
|
|
7118
|
+
e164: "E.164 broj",
|
|
6799
7119
|
jwt: "JWT",
|
|
6800
|
-
template_literal: "
|
|
7120
|
+
template_literal: "unos"
|
|
7121
|
+
};
|
|
7122
|
+
const TypeDictionary = {
|
|
7123
|
+
nan: "NaN",
|
|
7124
|
+
string: "tekst",
|
|
7125
|
+
number: "broj",
|
|
7126
|
+
boolean: "boolean",
|
|
7127
|
+
array: "niz",
|
|
7128
|
+
object: "objekt",
|
|
7129
|
+
set: "skup",
|
|
7130
|
+
file: "datoteka",
|
|
7131
|
+
date: "datum",
|
|
7132
|
+
bigint: "bigint",
|
|
7133
|
+
symbol: "simbol",
|
|
7134
|
+
undefined: "undefined",
|
|
7135
|
+
null: "null",
|
|
7136
|
+
function: "funkcija",
|
|
7137
|
+
map: "mapa"
|
|
7138
|
+
};
|
|
7139
|
+
return (issue2) => {
|
|
7140
|
+
switch (issue2.code) {
|
|
7141
|
+
case "invalid_type": {
|
|
7142
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
7143
|
+
const receivedType = parsedType(issue2.input);
|
|
7144
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
7145
|
+
if (/^[A-Z]/.test(issue2.expected)) {
|
|
7146
|
+
return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
|
|
7147
|
+
}
|
|
7148
|
+
return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
|
|
7149
|
+
}
|
|
7150
|
+
case "invalid_value":
|
|
7151
|
+
if (issue2.values.length === 1)
|
|
7152
|
+
return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
|
|
7153
|
+
return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
|
|
7154
|
+
case "too_big": {
|
|
7155
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
7156
|
+
const sizing = getSizing(issue2.origin);
|
|
7157
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
7158
|
+
if (sizing)
|
|
7159
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
|
|
7160
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
|
|
7161
|
+
}
|
|
7162
|
+
case "too_small": {
|
|
7163
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
7164
|
+
const sizing = getSizing(issue2.origin);
|
|
7165
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
7166
|
+
if (sizing) {
|
|
7167
|
+
return `Premalo: o\u010Dekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
7168
|
+
}
|
|
7169
|
+
return `Premalo: o\u010Dekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
|
|
7170
|
+
}
|
|
7171
|
+
case "invalid_format": {
|
|
7172
|
+
const _issue = issue2;
|
|
7173
|
+
if (_issue.format === "starts_with")
|
|
7174
|
+
return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
|
|
7175
|
+
if (_issue.format === "ends_with")
|
|
7176
|
+
return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
|
|
7177
|
+
if (_issue.format === "includes")
|
|
7178
|
+
return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
|
|
7179
|
+
if (_issue.format === "regex")
|
|
7180
|
+
return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
|
|
7181
|
+
return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
7182
|
+
}
|
|
7183
|
+
case "not_multiple_of":
|
|
7184
|
+
return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
|
|
7185
|
+
case "unrecognized_keys":
|
|
7186
|
+
return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
|
|
7187
|
+
case "invalid_key":
|
|
7188
|
+
return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
7189
|
+
case "invalid_union":
|
|
7190
|
+
return "Neispravan unos";
|
|
7191
|
+
case "invalid_element":
|
|
7192
|
+
return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
7193
|
+
default:
|
|
7194
|
+
return `Neispravan unos`;
|
|
7195
|
+
}
|
|
7196
|
+
};
|
|
7197
|
+
};
|
|
7198
|
+
function hr_default() {
|
|
7199
|
+
return {
|
|
7200
|
+
localeError: error18()
|
|
7201
|
+
};
|
|
7202
|
+
}
|
|
7203
|
+
|
|
7204
|
+
// node_modules/zod/v4/locales/hu.js
|
|
7205
|
+
var error19 = () => {
|
|
7206
|
+
const Sizable = {
|
|
7207
|
+
string: { unit: "karakter", verb: "legyen" },
|
|
7208
|
+
file: { unit: "byte", verb: "legyen" },
|
|
7209
|
+
array: { unit: "elem", verb: "legyen" },
|
|
7210
|
+
set: { unit: "elem", verb: "legyen" }
|
|
7211
|
+
};
|
|
7212
|
+
function getSizing(origin) {
|
|
7213
|
+
return Sizable[origin] ?? null;
|
|
7214
|
+
}
|
|
7215
|
+
const FormatDictionary = {
|
|
7216
|
+
regex: "bemenet",
|
|
7217
|
+
email: "email c\xEDm",
|
|
7218
|
+
url: "URL",
|
|
7219
|
+
emoji: "emoji",
|
|
7220
|
+
uuid: "UUID",
|
|
7221
|
+
uuidv4: "UUIDv4",
|
|
7222
|
+
uuidv6: "UUIDv6",
|
|
7223
|
+
nanoid: "nanoid",
|
|
7224
|
+
guid: "GUID",
|
|
7225
|
+
cuid: "cuid",
|
|
7226
|
+
cuid2: "cuid2",
|
|
7227
|
+
ulid: "ULID",
|
|
7228
|
+
xid: "XID",
|
|
7229
|
+
ksuid: "KSUID",
|
|
7230
|
+
datetime: "ISO id\u0151b\xE9lyeg",
|
|
7231
|
+
date: "ISO d\xE1tum",
|
|
7232
|
+
time: "ISO id\u0151",
|
|
7233
|
+
duration: "ISO id\u0151intervallum",
|
|
7234
|
+
ipv4: "IPv4 c\xEDm",
|
|
7235
|
+
ipv6: "IPv6 c\xEDm",
|
|
7236
|
+
cidrv4: "IPv4 tartom\xE1ny",
|
|
7237
|
+
cidrv6: "IPv6 tartom\xE1ny",
|
|
7238
|
+
base64: "base64-k\xF3dolt string",
|
|
7239
|
+
base64url: "base64url-k\xF3dolt string",
|
|
7240
|
+
json_string: "JSON string",
|
|
7241
|
+
e164: "E.164 sz\xE1m",
|
|
7242
|
+
jwt: "JWT",
|
|
7243
|
+
template_literal: "bemenet"
|
|
6801
7244
|
};
|
|
6802
7245
|
const TypeDictionary = {
|
|
6803
7246
|
nan: "NaN",
|
|
@@ -6863,7 +7306,7 @@
|
|
|
6863
7306
|
};
|
|
6864
7307
|
function hu_default() {
|
|
6865
7308
|
return {
|
|
6866
|
-
localeError:
|
|
7309
|
+
localeError: error19()
|
|
6867
7310
|
};
|
|
6868
7311
|
}
|
|
6869
7312
|
|
|
@@ -6878,7 +7321,7 @@
|
|
|
6878
7321
|
const lastChar = word[word.length - 1];
|
|
6879
7322
|
return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568");
|
|
6880
7323
|
}
|
|
6881
|
-
var
|
|
7324
|
+
var error20 = () => {
|
|
6882
7325
|
const Sizable = {
|
|
6883
7326
|
string: {
|
|
6884
7327
|
unit: {
|
|
@@ -7011,12 +7454,12 @@
|
|
|
7011
7454
|
};
|
|
7012
7455
|
function hy_default() {
|
|
7013
7456
|
return {
|
|
7014
|
-
localeError:
|
|
7457
|
+
localeError: error20()
|
|
7015
7458
|
};
|
|
7016
7459
|
}
|
|
7017
7460
|
|
|
7018
7461
|
// node_modules/zod/v4/locales/id.js
|
|
7019
|
-
var
|
|
7462
|
+
var error21 = () => {
|
|
7020
7463
|
const Sizable = {
|
|
7021
7464
|
string: { unit: "karakter", verb: "memiliki" },
|
|
7022
7465
|
file: { unit: "byte", verb: "memiliki" },
|
|
@@ -7118,12 +7561,12 @@
|
|
|
7118
7561
|
};
|
|
7119
7562
|
function id_default() {
|
|
7120
7563
|
return {
|
|
7121
|
-
localeError:
|
|
7564
|
+
localeError: error21()
|
|
7122
7565
|
};
|
|
7123
7566
|
}
|
|
7124
7567
|
|
|
7125
7568
|
// node_modules/zod/v4/locales/is.js
|
|
7126
|
-
var
|
|
7569
|
+
var error22 = () => {
|
|
7127
7570
|
const Sizable = {
|
|
7128
7571
|
string: { unit: "stafi", verb: "a\xF0 hafa" },
|
|
7129
7572
|
file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
|
|
@@ -7228,12 +7671,12 @@
|
|
|
7228
7671
|
};
|
|
7229
7672
|
function is_default() {
|
|
7230
7673
|
return {
|
|
7231
|
-
localeError:
|
|
7674
|
+
localeError: error22()
|
|
7232
7675
|
};
|
|
7233
7676
|
}
|
|
7234
7677
|
|
|
7235
7678
|
// node_modules/zod/v4/locales/it.js
|
|
7236
|
-
var
|
|
7679
|
+
var error23 = () => {
|
|
7237
7680
|
const Sizable = {
|
|
7238
7681
|
string: { unit: "caratteri", verb: "avere" },
|
|
7239
7682
|
file: { unit: "byte", verb: "avere" },
|
|
@@ -7318,7 +7761,7 @@
|
|
|
7318
7761
|
return `Stringa non valida: deve includere "${_issue.includes}"`;
|
|
7319
7762
|
if (_issue.format === "regex")
|
|
7320
7763
|
return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
|
|
7321
|
-
return `
|
|
7764
|
+
return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
7322
7765
|
}
|
|
7323
7766
|
case "not_multiple_of":
|
|
7324
7767
|
return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
|
|
@@ -7337,12 +7780,12 @@
|
|
|
7337
7780
|
};
|
|
7338
7781
|
function it_default() {
|
|
7339
7782
|
return {
|
|
7340
|
-
localeError:
|
|
7783
|
+
localeError: error23()
|
|
7341
7784
|
};
|
|
7342
7785
|
}
|
|
7343
7786
|
|
|
7344
7787
|
// node_modules/zod/v4/locales/ja.js
|
|
7345
|
-
var
|
|
7788
|
+
var error24 = () => {
|
|
7346
7789
|
const Sizable = {
|
|
7347
7790
|
string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
|
|
7348
7791
|
file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
|
|
@@ -7445,12 +7888,12 @@
|
|
|
7445
7888
|
};
|
|
7446
7889
|
function ja_default() {
|
|
7447
7890
|
return {
|
|
7448
|
-
localeError:
|
|
7891
|
+
localeError: error24()
|
|
7449
7892
|
};
|
|
7450
7893
|
}
|
|
7451
7894
|
|
|
7452
7895
|
// node_modules/zod/v4/locales/ka.js
|
|
7453
|
-
var
|
|
7896
|
+
var error25 = () => {
|
|
7454
7897
|
const Sizable = {
|
|
7455
7898
|
string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
7456
7899
|
file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
@@ -7483,9 +7926,9 @@
|
|
|
7483
7926
|
ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
|
|
7484
7927
|
cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
7485
7928
|
cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
7486
|
-
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
7487
|
-
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
7488
|
-
json_string: "JSON \
|
|
7929
|
+
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
7930
|
+
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
7931
|
+
json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
|
|
7489
7932
|
e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
|
|
7490
7933
|
jwt: "JWT",
|
|
7491
7934
|
template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
|
|
@@ -7493,7 +7936,7 @@
|
|
|
7493
7936
|
const TypeDictionary = {
|
|
7494
7937
|
nan: "NaN",
|
|
7495
7938
|
number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
|
|
7496
|
-
string: "\
|
|
7939
|
+
string: "\u10D5\u10D4\u10DA\u10D8",
|
|
7497
7940
|
boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
|
|
7498
7941
|
function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
|
|
7499
7942
|
array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
|
|
@@ -7531,14 +7974,14 @@
|
|
|
7531
7974
|
case "invalid_format": {
|
|
7532
7975
|
const _issue = issue2;
|
|
7533
7976
|
if (_issue.format === "starts_with") {
|
|
7534
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7977
|
+
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`;
|
|
7535
7978
|
}
|
|
7536
7979
|
if (_issue.format === "ends_with")
|
|
7537
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7980
|
+
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`;
|
|
7538
7981
|
if (_issue.format === "includes")
|
|
7539
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7982
|
+
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`;
|
|
7540
7983
|
if (_issue.format === "regex")
|
|
7541
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7984
|
+
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`;
|
|
7542
7985
|
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
7543
7986
|
}
|
|
7544
7987
|
case "not_multiple_of":
|
|
@@ -7558,12 +8001,12 @@
|
|
|
7558
8001
|
};
|
|
7559
8002
|
function ka_default() {
|
|
7560
8003
|
return {
|
|
7561
|
-
localeError:
|
|
8004
|
+
localeError: error25()
|
|
7562
8005
|
};
|
|
7563
8006
|
}
|
|
7564
8007
|
|
|
7565
8008
|
// node_modules/zod/v4/locales/km.js
|
|
7566
|
-
var
|
|
8009
|
+
var error26 = () => {
|
|
7567
8010
|
const Sizable = {
|
|
7568
8011
|
string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
7569
8012
|
file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
@@ -7669,7 +8112,7 @@
|
|
|
7669
8112
|
};
|
|
7670
8113
|
function km_default() {
|
|
7671
8114
|
return {
|
|
7672
|
-
localeError:
|
|
8115
|
+
localeError: error26()
|
|
7673
8116
|
};
|
|
7674
8117
|
}
|
|
7675
8118
|
|
|
@@ -7679,7 +8122,7 @@
|
|
|
7679
8122
|
}
|
|
7680
8123
|
|
|
7681
8124
|
// node_modules/zod/v4/locales/ko.js
|
|
7682
|
-
var
|
|
8125
|
+
var error27 = () => {
|
|
7683
8126
|
const Sizable = {
|
|
7684
8127
|
string: { unit: "\uBB38\uC790", verb: "to have" },
|
|
7685
8128
|
file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
|
|
@@ -7786,7 +8229,7 @@
|
|
|
7786
8229
|
};
|
|
7787
8230
|
function ko_default() {
|
|
7788
8231
|
return {
|
|
7789
|
-
localeError:
|
|
8232
|
+
localeError: error27()
|
|
7790
8233
|
};
|
|
7791
8234
|
}
|
|
7792
8235
|
|
|
@@ -7804,7 +8247,7 @@
|
|
|
7804
8247
|
return "one";
|
|
7805
8248
|
return "few";
|
|
7806
8249
|
}
|
|
7807
|
-
var
|
|
8250
|
+
var error28 = () => {
|
|
7808
8251
|
const Sizable = {
|
|
7809
8252
|
string: {
|
|
7810
8253
|
unit: {
|
|
@@ -7990,12 +8433,12 @@
|
|
|
7990
8433
|
};
|
|
7991
8434
|
function lt_default() {
|
|
7992
8435
|
return {
|
|
7993
|
-
localeError:
|
|
8436
|
+
localeError: error28()
|
|
7994
8437
|
};
|
|
7995
8438
|
}
|
|
7996
8439
|
|
|
7997
8440
|
// node_modules/zod/v4/locales/mk.js
|
|
7998
|
-
var
|
|
8441
|
+
var error29 = () => {
|
|
7999
8442
|
const Sizable = {
|
|
8000
8443
|
string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
8001
8444
|
file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
@@ -8100,12 +8543,12 @@
|
|
|
8100
8543
|
};
|
|
8101
8544
|
function mk_default() {
|
|
8102
8545
|
return {
|
|
8103
|
-
localeError:
|
|
8546
|
+
localeError: error29()
|
|
8104
8547
|
};
|
|
8105
8548
|
}
|
|
8106
8549
|
|
|
8107
8550
|
// node_modules/zod/v4/locales/ms.js
|
|
8108
|
-
var
|
|
8551
|
+
var error30 = () => {
|
|
8109
8552
|
const Sizable = {
|
|
8110
8553
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
8111
8554
|
file: { unit: "bait", verb: "mempunyai" },
|
|
@@ -8208,12 +8651,12 @@
|
|
|
8208
8651
|
};
|
|
8209
8652
|
function ms_default() {
|
|
8210
8653
|
return {
|
|
8211
|
-
localeError:
|
|
8654
|
+
localeError: error30()
|
|
8212
8655
|
};
|
|
8213
8656
|
}
|
|
8214
8657
|
|
|
8215
8658
|
// node_modules/zod/v4/locales/nl.js
|
|
8216
|
-
var
|
|
8659
|
+
var error31 = () => {
|
|
8217
8660
|
const Sizable = {
|
|
8218
8661
|
string: { unit: "tekens", verb: "heeft" },
|
|
8219
8662
|
file: { unit: "bytes", verb: "heeft" },
|
|
@@ -8319,12 +8762,12 @@
|
|
|
8319
8762
|
};
|
|
8320
8763
|
function nl_default() {
|
|
8321
8764
|
return {
|
|
8322
|
-
localeError:
|
|
8765
|
+
localeError: error31()
|
|
8323
8766
|
};
|
|
8324
8767
|
}
|
|
8325
8768
|
|
|
8326
8769
|
// node_modules/zod/v4/locales/no.js
|
|
8327
|
-
var
|
|
8770
|
+
var error32 = () => {
|
|
8328
8771
|
const Sizable = {
|
|
8329
8772
|
string: { unit: "tegn", verb: "\xE5 ha" },
|
|
8330
8773
|
file: { unit: "bytes", verb: "\xE5 ha" },
|
|
@@ -8428,12 +8871,12 @@
|
|
|
8428
8871
|
};
|
|
8429
8872
|
function no_default() {
|
|
8430
8873
|
return {
|
|
8431
|
-
localeError:
|
|
8874
|
+
localeError: error32()
|
|
8432
8875
|
};
|
|
8433
8876
|
}
|
|
8434
8877
|
|
|
8435
8878
|
// node_modules/zod/v4/locales/ota.js
|
|
8436
|
-
var
|
|
8879
|
+
var error33 = () => {
|
|
8437
8880
|
const Sizable = {
|
|
8438
8881
|
string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
|
|
8439
8882
|
file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
|
|
@@ -8538,12 +8981,12 @@
|
|
|
8538
8981
|
};
|
|
8539
8982
|
function ota_default() {
|
|
8540
8983
|
return {
|
|
8541
|
-
localeError:
|
|
8984
|
+
localeError: error33()
|
|
8542
8985
|
};
|
|
8543
8986
|
}
|
|
8544
8987
|
|
|
8545
8988
|
// node_modules/zod/v4/locales/ps.js
|
|
8546
|
-
var
|
|
8989
|
+
var error34 = () => {
|
|
8547
8990
|
const Sizable = {
|
|
8548
8991
|
string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
|
|
8549
8992
|
file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
|
|
@@ -8653,12 +9096,12 @@
|
|
|
8653
9096
|
};
|
|
8654
9097
|
function ps_default() {
|
|
8655
9098
|
return {
|
|
8656
|
-
localeError:
|
|
9099
|
+
localeError: error34()
|
|
8657
9100
|
};
|
|
8658
9101
|
}
|
|
8659
9102
|
|
|
8660
9103
|
// node_modules/zod/v4/locales/pl.js
|
|
8661
|
-
var
|
|
9104
|
+
var error35 = () => {
|
|
8662
9105
|
const Sizable = {
|
|
8663
9106
|
string: { unit: "znak\xF3w", verb: "mie\u0107" },
|
|
8664
9107
|
file: { unit: "bajt\xF3w", verb: "mie\u0107" },
|
|
@@ -8763,12 +9206,12 @@
|
|
|
8763
9206
|
};
|
|
8764
9207
|
function pl_default() {
|
|
8765
9208
|
return {
|
|
8766
|
-
localeError:
|
|
9209
|
+
localeError: error35()
|
|
8767
9210
|
};
|
|
8768
9211
|
}
|
|
8769
9212
|
|
|
8770
9213
|
// node_modules/zod/v4/locales/pt.js
|
|
8771
|
-
var
|
|
9214
|
+
var error36 = () => {
|
|
8772
9215
|
const Sizable = {
|
|
8773
9216
|
string: { unit: "caracteres", verb: "ter" },
|
|
8774
9217
|
file: { unit: "bytes", verb: "ter" },
|
|
@@ -8872,7 +9315,127 @@
|
|
|
8872
9315
|
};
|
|
8873
9316
|
function pt_default() {
|
|
8874
9317
|
return {
|
|
8875
|
-
localeError:
|
|
9318
|
+
localeError: error36()
|
|
9319
|
+
};
|
|
9320
|
+
}
|
|
9321
|
+
|
|
9322
|
+
// node_modules/zod/v4/locales/ro.js
|
|
9323
|
+
var error37 = () => {
|
|
9324
|
+
const Sizable = {
|
|
9325
|
+
string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
|
|
9326
|
+
file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
|
|
9327
|
+
array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
9328
|
+
set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
9329
|
+
map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
|
|
9330
|
+
};
|
|
9331
|
+
function getSizing(origin) {
|
|
9332
|
+
return Sizable[origin] ?? null;
|
|
9333
|
+
}
|
|
9334
|
+
const FormatDictionary = {
|
|
9335
|
+
regex: "intrare",
|
|
9336
|
+
email: "adres\u0103 de email",
|
|
9337
|
+
url: "URL",
|
|
9338
|
+
emoji: "emoji",
|
|
9339
|
+
uuid: "UUID",
|
|
9340
|
+
uuidv4: "UUIDv4",
|
|
9341
|
+
uuidv6: "UUIDv6",
|
|
9342
|
+
nanoid: "nanoid",
|
|
9343
|
+
guid: "GUID",
|
|
9344
|
+
cuid: "cuid",
|
|
9345
|
+
cuid2: "cuid2",
|
|
9346
|
+
ulid: "ULID",
|
|
9347
|
+
xid: "XID",
|
|
9348
|
+
ksuid: "KSUID",
|
|
9349
|
+
datetime: "dat\u0103 \u0219i or\u0103 ISO",
|
|
9350
|
+
date: "dat\u0103 ISO",
|
|
9351
|
+
time: "or\u0103 ISO",
|
|
9352
|
+
duration: "durat\u0103 ISO",
|
|
9353
|
+
ipv4: "adres\u0103 IPv4",
|
|
9354
|
+
ipv6: "adres\u0103 IPv6",
|
|
9355
|
+
mac: "adres\u0103 MAC",
|
|
9356
|
+
cidrv4: "interval IPv4",
|
|
9357
|
+
cidrv6: "interval IPv6",
|
|
9358
|
+
base64: "\u0219ir codat base64",
|
|
9359
|
+
base64url: "\u0219ir codat base64url",
|
|
9360
|
+
json_string: "\u0219ir JSON",
|
|
9361
|
+
e164: "num\u0103r E.164",
|
|
9362
|
+
jwt: "JWT",
|
|
9363
|
+
template_literal: "intrare"
|
|
9364
|
+
};
|
|
9365
|
+
const TypeDictionary = {
|
|
9366
|
+
nan: "NaN",
|
|
9367
|
+
string: "\u0219ir",
|
|
9368
|
+
number: "num\u0103r",
|
|
9369
|
+
boolean: "boolean",
|
|
9370
|
+
function: "func\u021Bie",
|
|
9371
|
+
array: "matrice",
|
|
9372
|
+
object: "obiect",
|
|
9373
|
+
undefined: "nedefinit",
|
|
9374
|
+
symbol: "simbol",
|
|
9375
|
+
bigint: "num\u0103r mare",
|
|
9376
|
+
void: "void",
|
|
9377
|
+
never: "never",
|
|
9378
|
+
map: "hart\u0103",
|
|
9379
|
+
set: "set"
|
|
9380
|
+
};
|
|
9381
|
+
return (issue2) => {
|
|
9382
|
+
switch (issue2.code) {
|
|
9383
|
+
case "invalid_type": {
|
|
9384
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
9385
|
+
const receivedType = parsedType(issue2.input);
|
|
9386
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
9387
|
+
return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
|
|
9388
|
+
}
|
|
9389
|
+
case "invalid_value":
|
|
9390
|
+
if (issue2.values.length === 1)
|
|
9391
|
+
return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
|
|
9392
|
+
return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
|
|
9393
|
+
case "too_big": {
|
|
9394
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
9395
|
+
const sizing = getSizing(issue2.origin);
|
|
9396
|
+
if (sizing)
|
|
9397
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
|
|
9398
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
|
|
9399
|
+
}
|
|
9400
|
+
case "too_small": {
|
|
9401
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
9402
|
+
const sizing = getSizing(issue2.origin);
|
|
9403
|
+
if (sizing) {
|
|
9404
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
9405
|
+
}
|
|
9406
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
|
|
9407
|
+
}
|
|
9408
|
+
case "invalid_format": {
|
|
9409
|
+
const _issue = issue2;
|
|
9410
|
+
if (_issue.format === "starts_with") {
|
|
9411
|
+
return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
|
|
9412
|
+
}
|
|
9413
|
+
if (_issue.format === "ends_with")
|
|
9414
|
+
return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
|
|
9415
|
+
if (_issue.format === "includes")
|
|
9416
|
+
return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
|
|
9417
|
+
if (_issue.format === "regex")
|
|
9418
|
+
return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
|
|
9419
|
+
return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
9420
|
+
}
|
|
9421
|
+
case "not_multiple_of":
|
|
9422
|
+
return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
|
|
9423
|
+
case "unrecognized_keys":
|
|
9424
|
+
return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
|
|
9425
|
+
case "invalid_key":
|
|
9426
|
+
return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
|
|
9427
|
+
case "invalid_union":
|
|
9428
|
+
return "Intrare invalid\u0103";
|
|
9429
|
+
case "invalid_element":
|
|
9430
|
+
return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
|
|
9431
|
+
default:
|
|
9432
|
+
return `Intrare invalid\u0103`;
|
|
9433
|
+
}
|
|
9434
|
+
};
|
|
9435
|
+
};
|
|
9436
|
+
function ro_default() {
|
|
9437
|
+
return {
|
|
9438
|
+
localeError: error37()
|
|
8876
9439
|
};
|
|
8877
9440
|
}
|
|
8878
9441
|
|
|
@@ -8892,7 +9455,7 @@
|
|
|
8892
9455
|
}
|
|
8893
9456
|
return many;
|
|
8894
9457
|
}
|
|
8895
|
-
var
|
|
9458
|
+
var error38 = () => {
|
|
8896
9459
|
const Sizable = {
|
|
8897
9460
|
string: {
|
|
8898
9461
|
unit: {
|
|
@@ -9029,12 +9592,12 @@
|
|
|
9029
9592
|
};
|
|
9030
9593
|
function ru_default() {
|
|
9031
9594
|
return {
|
|
9032
|
-
localeError:
|
|
9595
|
+
localeError: error38()
|
|
9033
9596
|
};
|
|
9034
9597
|
}
|
|
9035
9598
|
|
|
9036
9599
|
// node_modules/zod/v4/locales/sl.js
|
|
9037
|
-
var
|
|
9600
|
+
var error39 = () => {
|
|
9038
9601
|
const Sizable = {
|
|
9039
9602
|
string: { unit: "znakov", verb: "imeti" },
|
|
9040
9603
|
file: { unit: "bajtov", verb: "imeti" },
|
|
@@ -9139,12 +9702,12 @@
|
|
|
9139
9702
|
};
|
|
9140
9703
|
function sl_default() {
|
|
9141
9704
|
return {
|
|
9142
|
-
localeError:
|
|
9705
|
+
localeError: error39()
|
|
9143
9706
|
};
|
|
9144
9707
|
}
|
|
9145
9708
|
|
|
9146
9709
|
// node_modules/zod/v4/locales/sv.js
|
|
9147
|
-
var
|
|
9710
|
+
var error40 = () => {
|
|
9148
9711
|
const Sizable = {
|
|
9149
9712
|
string: { unit: "tecken", verb: "att ha" },
|
|
9150
9713
|
file: { unit: "bytes", verb: "att ha" },
|
|
@@ -9250,12 +9813,12 @@
|
|
|
9250
9813
|
};
|
|
9251
9814
|
function sv_default() {
|
|
9252
9815
|
return {
|
|
9253
|
-
localeError:
|
|
9816
|
+
localeError: error40()
|
|
9254
9817
|
};
|
|
9255
9818
|
}
|
|
9256
9819
|
|
|
9257
9820
|
// node_modules/zod/v4/locales/ta.js
|
|
9258
|
-
var
|
|
9821
|
+
var error41 = () => {
|
|
9259
9822
|
const Sizable = {
|
|
9260
9823
|
string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
|
|
9261
9824
|
file: { unit: "\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
|
|
@@ -9361,12 +9924,12 @@
|
|
|
9361
9924
|
};
|
|
9362
9925
|
function ta_default() {
|
|
9363
9926
|
return {
|
|
9364
|
-
localeError:
|
|
9927
|
+
localeError: error41()
|
|
9365
9928
|
};
|
|
9366
9929
|
}
|
|
9367
9930
|
|
|
9368
9931
|
// node_modules/zod/v4/locales/th.js
|
|
9369
|
-
var
|
|
9932
|
+
var error42 = () => {
|
|
9370
9933
|
const Sizable = {
|
|
9371
9934
|
string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
9372
9935
|
file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
@@ -9472,12 +10035,12 @@
|
|
|
9472
10035
|
};
|
|
9473
10036
|
function th_default() {
|
|
9474
10037
|
return {
|
|
9475
|
-
localeError:
|
|
10038
|
+
localeError: error42()
|
|
9476
10039
|
};
|
|
9477
10040
|
}
|
|
9478
10041
|
|
|
9479
10042
|
// node_modules/zod/v4/locales/tr.js
|
|
9480
|
-
var
|
|
10043
|
+
var error43 = () => {
|
|
9481
10044
|
const Sizable = {
|
|
9482
10045
|
string: { unit: "karakter", verb: "olmal\u0131" },
|
|
9483
10046
|
file: { unit: "bayt", verb: "olmal\u0131" },
|
|
@@ -9578,12 +10141,12 @@
|
|
|
9578
10141
|
};
|
|
9579
10142
|
function tr_default() {
|
|
9580
10143
|
return {
|
|
9581
|
-
localeError:
|
|
10144
|
+
localeError: error43()
|
|
9582
10145
|
};
|
|
9583
10146
|
}
|
|
9584
10147
|
|
|
9585
10148
|
// node_modules/zod/v4/locales/uk.js
|
|
9586
|
-
var
|
|
10149
|
+
var error44 = () => {
|
|
9587
10150
|
const Sizable = {
|
|
9588
10151
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
9589
10152
|
file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
@@ -9687,7 +10250,7 @@
|
|
|
9687
10250
|
};
|
|
9688
10251
|
function uk_default() {
|
|
9689
10252
|
return {
|
|
9690
|
-
localeError:
|
|
10253
|
+
localeError: error44()
|
|
9691
10254
|
};
|
|
9692
10255
|
}
|
|
9693
10256
|
|
|
@@ -9697,7 +10260,7 @@
|
|
|
9697
10260
|
}
|
|
9698
10261
|
|
|
9699
10262
|
// node_modules/zod/v4/locales/ur.js
|
|
9700
|
-
var
|
|
10263
|
+
var error45 = () => {
|
|
9701
10264
|
const Sizable = {
|
|
9702
10265
|
string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
|
|
9703
10266
|
file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
|
|
@@ -9803,17 +10366,18 @@
|
|
|
9803
10366
|
};
|
|
9804
10367
|
function ur_default() {
|
|
9805
10368
|
return {
|
|
9806
|
-
localeError:
|
|
10369
|
+
localeError: error45()
|
|
9807
10370
|
};
|
|
9808
10371
|
}
|
|
9809
10372
|
|
|
9810
10373
|
// node_modules/zod/v4/locales/uz.js
|
|
9811
|
-
var
|
|
10374
|
+
var error46 = () => {
|
|
9812
10375
|
const Sizable = {
|
|
9813
10376
|
string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
|
|
9814
10377
|
file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
|
|
9815
10378
|
array: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
9816
|
-
set: { unit: "element", verb: "bo\u2018lishi kerak" }
|
|
10379
|
+
set: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
10380
|
+
map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
|
|
9817
10381
|
};
|
|
9818
10382
|
function getSizing(origin) {
|
|
9819
10383
|
return Sizable[origin] ?? null;
|
|
@@ -9913,12 +10477,12 @@
|
|
|
9913
10477
|
};
|
|
9914
10478
|
function uz_default() {
|
|
9915
10479
|
return {
|
|
9916
|
-
localeError:
|
|
10480
|
+
localeError: error46()
|
|
9917
10481
|
};
|
|
9918
10482
|
}
|
|
9919
10483
|
|
|
9920
10484
|
// node_modules/zod/v4/locales/vi.js
|
|
9921
|
-
var
|
|
10485
|
+
var error47 = () => {
|
|
9922
10486
|
const Sizable = {
|
|
9923
10487
|
string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
|
|
9924
10488
|
file: { unit: "byte", verb: "c\xF3" },
|
|
@@ -10022,12 +10586,12 @@
|
|
|
10022
10586
|
};
|
|
10023
10587
|
function vi_default() {
|
|
10024
10588
|
return {
|
|
10025
|
-
localeError:
|
|
10589
|
+
localeError: error47()
|
|
10026
10590
|
};
|
|
10027
10591
|
}
|
|
10028
10592
|
|
|
10029
10593
|
// node_modules/zod/v4/locales/zh-CN.js
|
|
10030
|
-
var
|
|
10594
|
+
var error48 = () => {
|
|
10031
10595
|
const Sizable = {
|
|
10032
10596
|
string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
|
|
10033
10597
|
file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
|
|
@@ -10132,12 +10696,12 @@
|
|
|
10132
10696
|
};
|
|
10133
10697
|
function zh_CN_default() {
|
|
10134
10698
|
return {
|
|
10135
|
-
localeError:
|
|
10699
|
+
localeError: error48()
|
|
10136
10700
|
};
|
|
10137
10701
|
}
|
|
10138
10702
|
|
|
10139
10703
|
// node_modules/zod/v4/locales/zh-TW.js
|
|
10140
|
-
var
|
|
10704
|
+
var error49 = () => {
|
|
10141
10705
|
const Sizable = {
|
|
10142
10706
|
string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
|
|
10143
10707
|
file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
|
|
@@ -10240,12 +10804,12 @@
|
|
|
10240
10804
|
};
|
|
10241
10805
|
function zh_TW_default() {
|
|
10242
10806
|
return {
|
|
10243
|
-
localeError:
|
|
10807
|
+
localeError: error49()
|
|
10244
10808
|
};
|
|
10245
10809
|
}
|
|
10246
10810
|
|
|
10247
10811
|
// node_modules/zod/v4/locales/yo.js
|
|
10248
|
-
var
|
|
10812
|
+
var error50 = () => {
|
|
10249
10813
|
const Sizable = {
|
|
10250
10814
|
string: { unit: "\xE0mi", verb: "n\xED" },
|
|
10251
10815
|
file: { unit: "bytes", verb: "n\xED" },
|
|
@@ -10348,12 +10912,12 @@
|
|
|
10348
10912
|
};
|
|
10349
10913
|
function yo_default() {
|
|
10350
10914
|
return {
|
|
10351
|
-
localeError:
|
|
10915
|
+
localeError: error50()
|
|
10352
10916
|
};
|
|
10353
10917
|
}
|
|
10354
10918
|
|
|
10355
10919
|
// node_modules/zod/v4/core/registries.js
|
|
10356
|
-
var
|
|
10920
|
+
var _a2;
|
|
10357
10921
|
var $output = /* @__PURE__ */ Symbol("ZodOutput");
|
|
10358
10922
|
var $input = /* @__PURE__ */ Symbol("ZodInput");
|
|
10359
10923
|
var $ZodRegistry = class {
|
|
@@ -10399,7 +10963,7 @@
|
|
|
10399
10963
|
function registry() {
|
|
10400
10964
|
return new $ZodRegistry();
|
|
10401
10965
|
}
|
|
10402
|
-
(
|
|
10966
|
+
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
10403
10967
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
10404
10968
|
|
|
10405
10969
|
// node_modules/zod/v4/core/api.js
|
|
@@ -11317,7 +11881,7 @@
|
|
|
11317
11881
|
return schema;
|
|
11318
11882
|
}
|
|
11319
11883
|
// @__NO_SIDE_EFFECTS__
|
|
11320
|
-
function _superRefine(fn) {
|
|
11884
|
+
function _superRefine(fn, params) {
|
|
11321
11885
|
const ch = /* @__PURE__ */ _check((payload) => {
|
|
11322
11886
|
payload.addIssue = (issue2) => {
|
|
11323
11887
|
if (typeof issue2 === "string") {
|
|
@@ -11334,7 +11898,7 @@
|
|
|
11334
11898
|
}
|
|
11335
11899
|
};
|
|
11336
11900
|
return fn(payload.value, payload);
|
|
11337
|
-
});
|
|
11901
|
+
}, params);
|
|
11338
11902
|
return ch;
|
|
11339
11903
|
}
|
|
11340
11904
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -11464,7 +12028,7 @@
|
|
|
11464
12028
|
};
|
|
11465
12029
|
}
|
|
11466
12030
|
function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
11467
|
-
var
|
|
12031
|
+
var _a3;
|
|
11468
12032
|
const def = schema._zod.def;
|
|
11469
12033
|
const seen = ctx.seen.get(schema);
|
|
11470
12034
|
if (seen) {
|
|
@@ -11511,8 +12075,8 @@
|
|
|
11511
12075
|
delete result.schema.examples;
|
|
11512
12076
|
delete result.schema.default;
|
|
11513
12077
|
}
|
|
11514
|
-
if (ctx.io === "input" && result.schema
|
|
11515
|
-
(
|
|
12078
|
+
if (ctx.io === "input" && "_prefault" in result.schema)
|
|
12079
|
+
(_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
|
|
11516
12080
|
delete result.schema._prefault;
|
|
11517
12081
|
const _result = ctx.seen.get(schema);
|
|
11518
12082
|
return _result.schema;
|
|
@@ -11693,10 +12257,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
11693
12257
|
result.$id = ctx.external.uri(id);
|
|
11694
12258
|
}
|
|
11695
12259
|
Object.assign(result, root.def ?? root.schema);
|
|
12260
|
+
const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
|
|
12261
|
+
if (rootMetaId !== void 0 && result.id === rootMetaId)
|
|
12262
|
+
delete result.id;
|
|
11696
12263
|
const defs = ctx.external?.defs ?? {};
|
|
11697
12264
|
for (const entry of ctx.seen.entries()) {
|
|
11698
12265
|
const seen = entry[1];
|
|
11699
12266
|
if (seen.def && seen.defId) {
|
|
12267
|
+
if (seen.def.id === seen.defId)
|
|
12268
|
+
delete seen.def.id;
|
|
11700
12269
|
defs[seen.defId] = seen.def;
|
|
11701
12270
|
}
|
|
11702
12271
|
}
|
|
@@ -11752,6 +12321,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
11752
12321
|
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
|
|
11753
12322
|
}
|
|
11754
12323
|
if (def.type === "pipe") {
|
|
12324
|
+
if (_schema._zod.traits.has("$ZodCodec"))
|
|
12325
|
+
return true;
|
|
11755
12326
|
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
11756
12327
|
}
|
|
11757
12328
|
if (def.type === "object") {
|
|
@@ -11841,39 +12412,28 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
11841
12412
|
json2.type = "integer";
|
|
11842
12413
|
else
|
|
11843
12414
|
json2.type = "number";
|
|
11844
|
-
|
|
11845
|
-
|
|
12415
|
+
const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
|
|
12416
|
+
const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
|
|
12417
|
+
const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
|
|
12418
|
+
if (exMin) {
|
|
12419
|
+
if (legacy) {
|
|
11846
12420
|
json2.minimum = exclusiveMinimum;
|
|
11847
12421
|
json2.exclusiveMinimum = true;
|
|
11848
12422
|
} else {
|
|
11849
12423
|
json2.exclusiveMinimum = exclusiveMinimum;
|
|
11850
12424
|
}
|
|
11851
|
-
}
|
|
11852
|
-
if (typeof minimum === "number") {
|
|
12425
|
+
} else if (typeof minimum === "number") {
|
|
11853
12426
|
json2.minimum = minimum;
|
|
11854
|
-
if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
|
|
11855
|
-
if (exclusiveMinimum >= minimum)
|
|
11856
|
-
delete json2.minimum;
|
|
11857
|
-
else
|
|
11858
|
-
delete json2.exclusiveMinimum;
|
|
11859
|
-
}
|
|
11860
12427
|
}
|
|
11861
|
-
if (
|
|
11862
|
-
if (
|
|
12428
|
+
if (exMax) {
|
|
12429
|
+
if (legacy) {
|
|
11863
12430
|
json2.maximum = exclusiveMaximum;
|
|
11864
12431
|
json2.exclusiveMaximum = true;
|
|
11865
12432
|
} else {
|
|
11866
12433
|
json2.exclusiveMaximum = exclusiveMaximum;
|
|
11867
12434
|
}
|
|
11868
|
-
}
|
|
11869
|
-
if (typeof maximum === "number") {
|
|
12435
|
+
} else if (typeof maximum === "number") {
|
|
11870
12436
|
json2.maximum = maximum;
|
|
11871
|
-
if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
|
|
11872
|
-
if (exclusiveMaximum <= maximum)
|
|
11873
|
-
delete json2.maximum;
|
|
11874
|
-
else
|
|
11875
|
-
delete json2.exclusiveMaximum;
|
|
11876
|
-
}
|
|
11877
12437
|
}
|
|
11878
12438
|
if (typeof multipleOf === "number")
|
|
11879
12439
|
json2.multipleOf = multipleOf;
|
|
@@ -12045,7 +12605,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12045
12605
|
if (typeof maximum === "number")
|
|
12046
12606
|
json2.maxItems = maximum;
|
|
12047
12607
|
json2.type = "array";
|
|
12048
|
-
json2.items = process2(def.element, ctx, {
|
|
12608
|
+
json2.items = process2(def.element, ctx, {
|
|
12609
|
+
...params,
|
|
12610
|
+
path: [...params.path, "items"]
|
|
12611
|
+
});
|
|
12049
12612
|
};
|
|
12050
12613
|
var objectProcessor = (schema, ctx, _json, params) => {
|
|
12051
12614
|
const json2 = _json;
|
|
@@ -12238,7 +12801,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12238
12801
|
};
|
|
12239
12802
|
var pipeProcessor = (schema, ctx, _json, params) => {
|
|
12240
12803
|
const def = schema._zod.def;
|
|
12241
|
-
const
|
|
12804
|
+
const inIsTransform = def.in._zod.traits.has("$ZodTransform");
|
|
12805
|
+
const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
|
|
12242
12806
|
process2(innerType, ctx, params);
|
|
12243
12807
|
const seen = ctx.seen.get(schema);
|
|
12244
12808
|
seen.ref = innerType;
|
|
@@ -12472,6 +13036,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12472
13036
|
ZodOptional: () => ZodOptional,
|
|
12473
13037
|
ZodPipe: () => ZodPipe,
|
|
12474
13038
|
ZodPrefault: () => ZodPrefault,
|
|
13039
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
12475
13040
|
ZodPromise: () => ZodPromise,
|
|
12476
13041
|
ZodReadonly: () => ZodReadonly,
|
|
12477
13042
|
ZodRecord: () => ZodRecord,
|
|
@@ -12532,6 +13097,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12532
13097
|
int32: () => int32,
|
|
12533
13098
|
int64: () => int64,
|
|
12534
13099
|
intersection: () => intersection,
|
|
13100
|
+
invertCodec: () => invertCodec,
|
|
12535
13101
|
ipv4: () => ipv42,
|
|
12536
13102
|
ipv6: () => ipv62,
|
|
12537
13103
|
json: () => json,
|
|
@@ -12701,8 +13267,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12701
13267
|
}
|
|
12702
13268
|
});
|
|
12703
13269
|
};
|
|
12704
|
-
var ZodError = $constructor("ZodError", initializer2);
|
|
12705
|
-
var ZodRealError = $constructor("ZodError", initializer2, {
|
|
13270
|
+
var ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
|
|
13271
|
+
var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
|
|
12706
13272
|
Parent: Error
|
|
12707
13273
|
});
|
|
12708
13274
|
|
|
@@ -12721,6 +13287,43 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12721
13287
|
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
12722
13288
|
|
|
12723
13289
|
// node_modules/zod/v4/classic/schemas.js
|
|
13290
|
+
var _installedGroups = /* @__PURE__ */ new WeakMap();
|
|
13291
|
+
function _installLazyMethods(inst, group, methods) {
|
|
13292
|
+
const proto = Object.getPrototypeOf(inst);
|
|
13293
|
+
let installed = _installedGroups.get(proto);
|
|
13294
|
+
if (!installed) {
|
|
13295
|
+
installed = /* @__PURE__ */ new Set();
|
|
13296
|
+
_installedGroups.set(proto, installed);
|
|
13297
|
+
}
|
|
13298
|
+
if (installed.has(group))
|
|
13299
|
+
return;
|
|
13300
|
+
installed.add(group);
|
|
13301
|
+
for (const key in methods) {
|
|
13302
|
+
const fn = methods[key];
|
|
13303
|
+
Object.defineProperty(proto, key, {
|
|
13304
|
+
configurable: true,
|
|
13305
|
+
enumerable: false,
|
|
13306
|
+
get() {
|
|
13307
|
+
const bound = fn.bind(this);
|
|
13308
|
+
Object.defineProperty(this, key, {
|
|
13309
|
+
configurable: true,
|
|
13310
|
+
writable: true,
|
|
13311
|
+
enumerable: true,
|
|
13312
|
+
value: bound
|
|
13313
|
+
});
|
|
13314
|
+
return bound;
|
|
13315
|
+
},
|
|
13316
|
+
set(v) {
|
|
13317
|
+
Object.defineProperty(this, key, {
|
|
13318
|
+
configurable: true,
|
|
13319
|
+
writable: true,
|
|
13320
|
+
enumerable: true,
|
|
13321
|
+
value: v
|
|
13322
|
+
});
|
|
13323
|
+
}
|
|
13324
|
+
});
|
|
13325
|
+
}
|
|
13326
|
+
}
|
|
12724
13327
|
var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
12725
13328
|
$ZodType.init(inst, def);
|
|
12726
13329
|
Object.assign(inst["~standard"], {
|
|
@@ -12733,23 +13336,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12733
13336
|
inst.def = def;
|
|
12734
13337
|
inst.type = def.type;
|
|
12735
13338
|
Object.defineProperty(inst, "_def", { value: def });
|
|
12736
|
-
inst.check = (...checks) => {
|
|
12737
|
-
return inst.clone(util_exports.mergeDefs(def, {
|
|
12738
|
-
checks: [
|
|
12739
|
-
...def.checks ?? [],
|
|
12740
|
-
...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
12741
|
-
]
|
|
12742
|
-
}), {
|
|
12743
|
-
parent: true
|
|
12744
|
-
});
|
|
12745
|
-
};
|
|
12746
|
-
inst.with = inst.check;
|
|
12747
|
-
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
12748
|
-
inst.brand = () => inst;
|
|
12749
|
-
inst.register = ((reg, meta3) => {
|
|
12750
|
-
reg.add(inst, meta3);
|
|
12751
|
-
return inst;
|
|
12752
|
-
});
|
|
12753
13339
|
inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
|
|
12754
13340
|
inst.safeParse = (data, params) => safeParse2(inst, data, params);
|
|
12755
13341
|
inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
|
|
@@ -12763,45 +13349,108 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12763
13349
|
inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
|
|
12764
13350
|
inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
|
|
12765
13351
|
inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
|
|
12766
|
-
inst
|
|
12767
|
-
|
|
12768
|
-
|
|
12769
|
-
|
|
12770
|
-
|
|
12771
|
-
|
|
12772
|
-
|
|
12773
|
-
|
|
12774
|
-
|
|
12775
|
-
|
|
12776
|
-
|
|
12777
|
-
|
|
12778
|
-
|
|
12779
|
-
|
|
12780
|
-
|
|
12781
|
-
|
|
12782
|
-
|
|
12783
|
-
|
|
12784
|
-
|
|
12785
|
-
|
|
12786
|
-
|
|
12787
|
-
|
|
13352
|
+
_installLazyMethods(inst, "ZodType", {
|
|
13353
|
+
check(...chks) {
|
|
13354
|
+
const def2 = this.def;
|
|
13355
|
+
return this.clone(util_exports.mergeDefs(def2, {
|
|
13356
|
+
checks: [
|
|
13357
|
+
...def2.checks ?? [],
|
|
13358
|
+
...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
13359
|
+
]
|
|
13360
|
+
}), { parent: true });
|
|
13361
|
+
},
|
|
13362
|
+
with(...chks) {
|
|
13363
|
+
return this.check(...chks);
|
|
13364
|
+
},
|
|
13365
|
+
clone(def2, params) {
|
|
13366
|
+
return clone(this, def2, params);
|
|
13367
|
+
},
|
|
13368
|
+
brand() {
|
|
13369
|
+
return this;
|
|
13370
|
+
},
|
|
13371
|
+
register(reg, meta3) {
|
|
13372
|
+
reg.add(this, meta3);
|
|
13373
|
+
return this;
|
|
13374
|
+
},
|
|
13375
|
+
refine(check2, params) {
|
|
13376
|
+
return this.check(refine(check2, params));
|
|
13377
|
+
},
|
|
13378
|
+
superRefine(refinement, params) {
|
|
13379
|
+
return this.check(superRefine(refinement, params));
|
|
13380
|
+
},
|
|
13381
|
+
overwrite(fn) {
|
|
13382
|
+
return this.check(_overwrite(fn));
|
|
13383
|
+
},
|
|
13384
|
+
optional() {
|
|
13385
|
+
return optional(this);
|
|
13386
|
+
},
|
|
13387
|
+
exactOptional() {
|
|
13388
|
+
return exactOptional(this);
|
|
13389
|
+
},
|
|
13390
|
+
nullable() {
|
|
13391
|
+
return nullable(this);
|
|
13392
|
+
},
|
|
13393
|
+
nullish() {
|
|
13394
|
+
return optional(nullable(this));
|
|
13395
|
+
},
|
|
13396
|
+
nonoptional(params) {
|
|
13397
|
+
return nonoptional(this, params);
|
|
13398
|
+
},
|
|
13399
|
+
array() {
|
|
13400
|
+
return array(this);
|
|
13401
|
+
},
|
|
13402
|
+
or(arg) {
|
|
13403
|
+
return union([this, arg]);
|
|
13404
|
+
},
|
|
13405
|
+
and(arg) {
|
|
13406
|
+
return intersection(this, arg);
|
|
13407
|
+
},
|
|
13408
|
+
transform(tx) {
|
|
13409
|
+
return pipe(this, transform(tx));
|
|
13410
|
+
},
|
|
13411
|
+
default(d) {
|
|
13412
|
+
return _default2(this, d);
|
|
13413
|
+
},
|
|
13414
|
+
prefault(d) {
|
|
13415
|
+
return prefault(this, d);
|
|
13416
|
+
},
|
|
13417
|
+
catch(params) {
|
|
13418
|
+
return _catch2(this, params);
|
|
13419
|
+
},
|
|
13420
|
+
pipe(target) {
|
|
13421
|
+
return pipe(this, target);
|
|
13422
|
+
},
|
|
13423
|
+
readonly() {
|
|
13424
|
+
return readonly(this);
|
|
13425
|
+
},
|
|
13426
|
+
describe(description) {
|
|
13427
|
+
const cl = this.clone();
|
|
13428
|
+
globalRegistry.add(cl, { description });
|
|
13429
|
+
return cl;
|
|
13430
|
+
},
|
|
13431
|
+
meta(...args) {
|
|
13432
|
+
if (args.length === 0)
|
|
13433
|
+
return globalRegistry.get(this);
|
|
13434
|
+
const cl = this.clone();
|
|
13435
|
+
globalRegistry.add(cl, args[0]);
|
|
13436
|
+
return cl;
|
|
13437
|
+
},
|
|
13438
|
+
isOptional() {
|
|
13439
|
+
return this.safeParse(void 0).success;
|
|
13440
|
+
},
|
|
13441
|
+
isNullable() {
|
|
13442
|
+
return this.safeParse(null).success;
|
|
13443
|
+
},
|
|
13444
|
+
apply(fn) {
|
|
13445
|
+
return fn(this);
|
|
13446
|
+
}
|
|
13447
|
+
});
|
|
12788
13448
|
Object.defineProperty(inst, "description", {
|
|
12789
13449
|
get() {
|
|
12790
13450
|
return globalRegistry.get(inst)?.description;
|
|
12791
13451
|
},
|
|
12792
13452
|
configurable: true
|
|
12793
13453
|
});
|
|
12794
|
-
inst.meta = (...args) => {
|
|
12795
|
-
if (args.length === 0) {
|
|
12796
|
-
return globalRegistry.get(inst);
|
|
12797
|
-
}
|
|
12798
|
-
const cl = inst.clone();
|
|
12799
|
-
globalRegistry.add(cl, args[0]);
|
|
12800
|
-
return cl;
|
|
12801
|
-
};
|
|
12802
|
-
inst.isOptional = () => inst.safeParse(void 0).success;
|
|
12803
|
-
inst.isNullable = () => inst.safeParse(null).success;
|
|
12804
|
-
inst.apply = (fn) => fn(inst);
|
|
12805
13454
|
return inst;
|
|
12806
13455
|
});
|
|
12807
13456
|
var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
@@ -12812,21 +13461,53 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12812
13461
|
inst.format = bag.format ?? null;
|
|
12813
13462
|
inst.minLength = bag.minimum ?? null;
|
|
12814
13463
|
inst.maxLength = bag.maximum ?? null;
|
|
12815
|
-
inst
|
|
12816
|
-
|
|
12817
|
-
|
|
12818
|
-
|
|
12819
|
-
|
|
12820
|
-
|
|
12821
|
-
|
|
12822
|
-
|
|
12823
|
-
|
|
12824
|
-
|
|
12825
|
-
|
|
12826
|
-
|
|
12827
|
-
|
|
12828
|
-
|
|
12829
|
-
|
|
13464
|
+
_installLazyMethods(inst, "_ZodString", {
|
|
13465
|
+
regex(...args) {
|
|
13466
|
+
return this.check(_regex(...args));
|
|
13467
|
+
},
|
|
13468
|
+
includes(...args) {
|
|
13469
|
+
return this.check(_includes(...args));
|
|
13470
|
+
},
|
|
13471
|
+
startsWith(...args) {
|
|
13472
|
+
return this.check(_startsWith(...args));
|
|
13473
|
+
},
|
|
13474
|
+
endsWith(...args) {
|
|
13475
|
+
return this.check(_endsWith(...args));
|
|
13476
|
+
},
|
|
13477
|
+
min(...args) {
|
|
13478
|
+
return this.check(_minLength(...args));
|
|
13479
|
+
},
|
|
13480
|
+
max(...args) {
|
|
13481
|
+
return this.check(_maxLength(...args));
|
|
13482
|
+
},
|
|
13483
|
+
length(...args) {
|
|
13484
|
+
return this.check(_length(...args));
|
|
13485
|
+
},
|
|
13486
|
+
nonempty(...args) {
|
|
13487
|
+
return this.check(_minLength(1, ...args));
|
|
13488
|
+
},
|
|
13489
|
+
lowercase(params) {
|
|
13490
|
+
return this.check(_lowercase(params));
|
|
13491
|
+
},
|
|
13492
|
+
uppercase(params) {
|
|
13493
|
+
return this.check(_uppercase(params));
|
|
13494
|
+
},
|
|
13495
|
+
trim() {
|
|
13496
|
+
return this.check(_trim());
|
|
13497
|
+
},
|
|
13498
|
+
normalize(...args) {
|
|
13499
|
+
return this.check(_normalize(...args));
|
|
13500
|
+
},
|
|
13501
|
+
toLowerCase() {
|
|
13502
|
+
return this.check(_toLowerCase());
|
|
13503
|
+
},
|
|
13504
|
+
toUpperCase() {
|
|
13505
|
+
return this.check(_toUpperCase());
|
|
13506
|
+
},
|
|
13507
|
+
slugify() {
|
|
13508
|
+
return this.check(_slugify());
|
|
13509
|
+
}
|
|
13510
|
+
});
|
|
12830
13511
|
});
|
|
12831
13512
|
var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
12832
13513
|
$ZodString.init(inst, def);
|
|
@@ -12905,7 +13586,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12905
13586
|
}
|
|
12906
13587
|
function httpUrl(params) {
|
|
12907
13588
|
return _url(ZodURL, {
|
|
12908
|
-
protocol:
|
|
13589
|
+
protocol: regexes_exports.httpProtocol,
|
|
12909
13590
|
hostname: regexes_exports.domain,
|
|
12910
13591
|
...util_exports.normalizeParams(params)
|
|
12911
13592
|
});
|
|
@@ -13047,21 +13728,53 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
13047
13728
|
$ZodNumber.init(inst, def);
|
|
13048
13729
|
ZodType.init(inst, def);
|
|
13049
13730
|
inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
|
|
13050
|
-
inst
|
|
13051
|
-
|
|
13052
|
-
|
|
13053
|
-
|
|
13054
|
-
|
|
13055
|
-
|
|
13056
|
-
|
|
13057
|
-
|
|
13058
|
-
|
|
13059
|
-
|
|
13060
|
-
|
|
13061
|
-
|
|
13062
|
-
|
|
13063
|
-
|
|
13064
|
-
|
|
13731
|
+
_installLazyMethods(inst, "ZodNumber", {
|
|
13732
|
+
gt(value, params) {
|
|
13733
|
+
return this.check(_gt(value, params));
|
|
13734
|
+
},
|
|
13735
|
+
gte(value, params) {
|
|
13736
|
+
return this.check(_gte(value, params));
|
|
13737
|
+
},
|
|
13738
|
+
min(value, params) {
|
|
13739
|
+
return this.check(_gte(value, params));
|
|
13740
|
+
},
|
|
13741
|
+
lt(value, params) {
|
|
13742
|
+
return this.check(_lt(value, params));
|
|
13743
|
+
},
|
|
13744
|
+
lte(value, params) {
|
|
13745
|
+
return this.check(_lte(value, params));
|
|
13746
|
+
},
|
|
13747
|
+
max(value, params) {
|
|
13748
|
+
return this.check(_lte(value, params));
|
|
13749
|
+
},
|
|
13750
|
+
int(params) {
|
|
13751
|
+
return this.check(int(params));
|
|
13752
|
+
},
|
|
13753
|
+
safe(params) {
|
|
13754
|
+
return this.check(int(params));
|
|
13755
|
+
},
|
|
13756
|
+
positive(params) {
|
|
13757
|
+
return this.check(_gt(0, params));
|
|
13758
|
+
},
|
|
13759
|
+
nonnegative(params) {
|
|
13760
|
+
return this.check(_gte(0, params));
|
|
13761
|
+
},
|
|
13762
|
+
negative(params) {
|
|
13763
|
+
return this.check(_lt(0, params));
|
|
13764
|
+
},
|
|
13765
|
+
nonpositive(params) {
|
|
13766
|
+
return this.check(_lte(0, params));
|
|
13767
|
+
},
|
|
13768
|
+
multipleOf(value, params) {
|
|
13769
|
+
return this.check(_multipleOf(value, params));
|
|
13770
|
+
},
|
|
13771
|
+
step(value, params) {
|
|
13772
|
+
return this.check(_multipleOf(value, params));
|
|
13773
|
+
},
|
|
13774
|
+
finite() {
|
|
13775
|
+
return this;
|
|
13776
|
+
}
|
|
13777
|
+
});
|
|
13065
13778
|
const bag = inst._zod.bag;
|
|
13066
13779
|
inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
13067
13780
|
inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
|
|
@@ -13208,11 +13921,23 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
13208
13921
|
ZodType.init(inst, def);
|
|
13209
13922
|
inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
|
|
13210
13923
|
inst.element = def.element;
|
|
13211
|
-
inst
|
|
13212
|
-
|
|
13213
|
-
|
|
13214
|
-
|
|
13215
|
-
|
|
13924
|
+
_installLazyMethods(inst, "ZodArray", {
|
|
13925
|
+
min(n, params) {
|
|
13926
|
+
return this.check(_minLength(n, params));
|
|
13927
|
+
},
|
|
13928
|
+
nonempty(params) {
|
|
13929
|
+
return this.check(_minLength(1, params));
|
|
13930
|
+
},
|
|
13931
|
+
max(n, params) {
|
|
13932
|
+
return this.check(_maxLength(n, params));
|
|
13933
|
+
},
|
|
13934
|
+
length(n, params) {
|
|
13935
|
+
return this.check(_length(n, params));
|
|
13936
|
+
},
|
|
13937
|
+
unwrap() {
|
|
13938
|
+
return this.element;
|
|
13939
|
+
}
|
|
13940
|
+
});
|
|
13216
13941
|
});
|
|
13217
13942
|
function array(element, params) {
|
|
13218
13943
|
return _array(ZodArray, element, params);
|
|
@@ -13228,23 +13953,47 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
13228
13953
|
util_exports.defineLazy(inst, "shape", () => {
|
|
13229
13954
|
return def.shape;
|
|
13230
13955
|
});
|
|
13231
|
-
inst
|
|
13232
|
-
|
|
13233
|
-
|
|
13234
|
-
|
|
13235
|
-
|
|
13236
|
-
|
|
13237
|
-
|
|
13238
|
-
|
|
13239
|
-
|
|
13240
|
-
|
|
13241
|
-
|
|
13242
|
-
|
|
13243
|
-
|
|
13244
|
-
|
|
13245
|
-
|
|
13246
|
-
|
|
13247
|
-
|
|
13956
|
+
_installLazyMethods(inst, "ZodObject", {
|
|
13957
|
+
keyof() {
|
|
13958
|
+
return _enum2(Object.keys(this._zod.def.shape));
|
|
13959
|
+
},
|
|
13960
|
+
catchall(catchall) {
|
|
13961
|
+
return this.clone({ ...this._zod.def, catchall });
|
|
13962
|
+
},
|
|
13963
|
+
passthrough() {
|
|
13964
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
13965
|
+
},
|
|
13966
|
+
loose() {
|
|
13967
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
13968
|
+
},
|
|
13969
|
+
strict() {
|
|
13970
|
+
return this.clone({ ...this._zod.def, catchall: never() });
|
|
13971
|
+
},
|
|
13972
|
+
strip() {
|
|
13973
|
+
return this.clone({ ...this._zod.def, catchall: void 0 });
|
|
13974
|
+
},
|
|
13975
|
+
extend(incoming) {
|
|
13976
|
+
return util_exports.extend(this, incoming);
|
|
13977
|
+
},
|
|
13978
|
+
safeExtend(incoming) {
|
|
13979
|
+
return util_exports.safeExtend(this, incoming);
|
|
13980
|
+
},
|
|
13981
|
+
merge(other) {
|
|
13982
|
+
return util_exports.merge(this, other);
|
|
13983
|
+
},
|
|
13984
|
+
pick(mask) {
|
|
13985
|
+
return util_exports.pick(this, mask);
|
|
13986
|
+
},
|
|
13987
|
+
omit(mask) {
|
|
13988
|
+
return util_exports.omit(this, mask);
|
|
13989
|
+
},
|
|
13990
|
+
partial(...args) {
|
|
13991
|
+
return util_exports.partial(ZodOptional, this, args[0]);
|
|
13992
|
+
},
|
|
13993
|
+
required(...args) {
|
|
13994
|
+
return util_exports.required(ZodNonOptional, this, args[0]);
|
|
13995
|
+
}
|
|
13996
|
+
});
|
|
13248
13997
|
});
|
|
13249
13998
|
function object(shape, params) {
|
|
13250
13999
|
const def = {
|
|
@@ -13349,6 +14098,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
13349
14098
|
inst.valueType = def.valueType;
|
|
13350
14099
|
});
|
|
13351
14100
|
function record(keyType, valueType, params) {
|
|
14101
|
+
if (!valueType || !valueType._zod) {
|
|
14102
|
+
return new ZodRecord({
|
|
14103
|
+
type: "record",
|
|
14104
|
+
keyType: string2(),
|
|
14105
|
+
valueType: keyType,
|
|
14106
|
+
...util_exports.normalizeParams(valueType)
|
|
14107
|
+
});
|
|
14108
|
+
}
|
|
13352
14109
|
return new ZodRecord({
|
|
13353
14110
|
type: "record",
|
|
13354
14111
|
keyType,
|
|
@@ -13520,10 +14277,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
13520
14277
|
if (output instanceof Promise) {
|
|
13521
14278
|
return output.then((output2) => {
|
|
13522
14279
|
payload.value = output2;
|
|
14280
|
+
payload.fallback = true;
|
|
13523
14281
|
return payload;
|
|
13524
14282
|
});
|
|
13525
14283
|
}
|
|
13526
14284
|
payload.value = output;
|
|
14285
|
+
payload.fallback = true;
|
|
13527
14286
|
return payload;
|
|
13528
14287
|
};
|
|
13529
14288
|
});
|
|
@@ -13678,6 +14437,20 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
13678
14437
|
reverseTransform: params.encode
|
|
13679
14438
|
});
|
|
13680
14439
|
}
|
|
14440
|
+
function invertCodec(codec2) {
|
|
14441
|
+
const def = codec2._zod.def;
|
|
14442
|
+
return new ZodCodec({
|
|
14443
|
+
type: "pipe",
|
|
14444
|
+
in: def.out,
|
|
14445
|
+
out: def.in,
|
|
14446
|
+
transform: def.reverseTransform,
|
|
14447
|
+
reverseTransform: def.transform
|
|
14448
|
+
});
|
|
14449
|
+
}
|
|
14450
|
+
var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
|
|
14451
|
+
ZodPipe.init(inst, def);
|
|
14452
|
+
$ZodPreprocess.init(inst, def);
|
|
14453
|
+
});
|
|
13681
14454
|
var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
13682
14455
|
$ZodReadonly.init(inst, def);
|
|
13683
14456
|
ZodType.init(inst, def);
|
|
@@ -13757,8 +14530,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
13757
14530
|
function refine(fn, _params = {}) {
|
|
13758
14531
|
return _refine(ZodCustom, fn, _params);
|
|
13759
14532
|
}
|
|
13760
|
-
function superRefine(fn) {
|
|
13761
|
-
return _superRefine(fn);
|
|
14533
|
+
function superRefine(fn, params) {
|
|
14534
|
+
return _superRefine(fn, params);
|
|
13762
14535
|
}
|
|
13763
14536
|
var describe2 = describe;
|
|
13764
14537
|
var meta2 = meta;
|
|
@@ -13796,7 +14569,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
13796
14569
|
return jsonSchema;
|
|
13797
14570
|
}
|
|
13798
14571
|
function preprocess(fn, schema) {
|
|
13799
|
-
return
|
|
14572
|
+
return new ZodPreprocess({
|
|
14573
|
+
type: "pipe",
|
|
14574
|
+
in: transform(fn),
|
|
14575
|
+
out: schema
|
|
14576
|
+
});
|
|
13800
14577
|
}
|
|
13801
14578
|
|
|
13802
14579
|
// node_modules/zod/v4/classic/compat.js
|
|
@@ -14217,12 +14994,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14217
14994
|
default:
|
|
14218
14995
|
throw new Error(`Unsupported type: ${type}`);
|
|
14219
14996
|
}
|
|
14220
|
-
if (schema.description) {
|
|
14221
|
-
zodSchema = zodSchema.describe(schema.description);
|
|
14222
|
-
}
|
|
14223
|
-
if (schema.default !== void 0) {
|
|
14224
|
-
zodSchema = zodSchema.default(schema.default);
|
|
14225
|
-
}
|
|
14226
14997
|
return zodSchema;
|
|
14227
14998
|
}
|
|
14228
14999
|
function convertSchema(schema, ctx) {
|
|
@@ -14259,6 +15030,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14259
15030
|
if (schema.readOnly === true) {
|
|
14260
15031
|
baseSchema = z.readonly(baseSchema);
|
|
14261
15032
|
}
|
|
15033
|
+
if (schema.default !== void 0) {
|
|
15034
|
+
baseSchema = baseSchema.default(schema.default);
|
|
15035
|
+
}
|
|
14262
15036
|
const extraMeta = {};
|
|
14263
15037
|
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
14264
15038
|
for (const key of coreMetadataKeys) {
|
|
@@ -14280,23 +15054,32 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14280
15054
|
if (Object.keys(extraMeta).length > 0) {
|
|
14281
15055
|
ctx.registry.add(baseSchema, extraMeta);
|
|
14282
15056
|
}
|
|
15057
|
+
if (schema.description) {
|
|
15058
|
+
baseSchema = baseSchema.describe(schema.description);
|
|
15059
|
+
}
|
|
14283
15060
|
return baseSchema;
|
|
14284
15061
|
}
|
|
14285
15062
|
function fromJSONSchema(schema, params) {
|
|
14286
15063
|
if (typeof schema === "boolean") {
|
|
14287
15064
|
return schema ? z.any() : z.never();
|
|
14288
15065
|
}
|
|
14289
|
-
|
|
14290
|
-
|
|
15066
|
+
let normalized;
|
|
15067
|
+
try {
|
|
15068
|
+
normalized = JSON.parse(JSON.stringify(schema));
|
|
15069
|
+
} catch {
|
|
15070
|
+
throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
|
|
15071
|
+
}
|
|
15072
|
+
const version2 = detectVersion(normalized, params?.defaultTarget);
|
|
15073
|
+
const defs = normalized.$defs || normalized.definitions || {};
|
|
14291
15074
|
const ctx = {
|
|
14292
15075
|
version: version2,
|
|
14293
15076
|
defs,
|
|
14294
15077
|
refs: /* @__PURE__ */ new Map(),
|
|
14295
15078
|
processing: /* @__PURE__ */ new Set(),
|
|
14296
|
-
rootSchema:
|
|
15079
|
+
rootSchema: normalized,
|
|
14297
15080
|
registry: params?.registry ?? globalRegistry
|
|
14298
15081
|
};
|
|
14299
|
-
return convertSchema(
|
|
15082
|
+
return convertSchema(normalized, ctx);
|
|
14300
15083
|
}
|
|
14301
15084
|
|
|
14302
15085
|
// node_modules/zod/v4/classic/coerce.js
|
|
@@ -14327,104 +15110,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14327
15110
|
// node_modules/zod/v4/classic/external.js
|
|
14328
15111
|
config(en_default());
|
|
14329
15112
|
|
|
14330
|
-
// src/tools/get-abandoned-items.ts
|
|
14331
|
-
var PERSISTED_HASH = "bd547859ce08366e86541b80eb6951d93aa36e1e4608842366309826793c223f";
|
|
14332
|
-
var getAbandonedItems = defineTool({
|
|
14333
|
-
name: "get_abandoned_items",
|
|
14334
|
-
displayName: "Get Abandoned Items",
|
|
14335
|
-
description: "Get items the user previously viewed or added to cart but did not complete booking. Useful for resuming interrupted booking flows.",
|
|
14336
|
-
summary: "Get your abandoned cart items",
|
|
14337
|
-
icon: "shopping-cart",
|
|
14338
|
-
group: "Account",
|
|
14339
|
-
input: external_exports.object({}),
|
|
14340
|
-
output: external_exports.object({
|
|
14341
|
-
items: external_exports.array(
|
|
14342
|
-
external_exports.object({
|
|
14343
|
-
type: external_exports.string().describe("Item type (HOTEL, FLIGHT, CAR)"),
|
|
14344
|
-
hotel_name: external_exports.string().describe("Hotel name (if hotel)"),
|
|
14345
|
-
hotel_id: external_exports.string().describe("Hotel ID (if hotel)"),
|
|
14346
|
-
city_name: external_exports.string().describe("City name"),
|
|
14347
|
-
check_in: external_exports.string().describe("Check-in date"),
|
|
14348
|
-
check_out: external_exports.string().describe("Check-out date"),
|
|
14349
|
-
price: external_exports.number().describe("Price at time of abandonment")
|
|
14350
|
-
})
|
|
14351
|
-
).describe("Abandoned booking items")
|
|
14352
|
-
}),
|
|
14353
|
-
handle: async () => {
|
|
14354
|
-
const data = await graphql("getAbandonedItemsByCguid", { cguid: getCguid() }, PERSISTED_HASH);
|
|
14355
|
-
const items = data.getAbandonedItemsByCguid ?? [];
|
|
14356
|
-
return {
|
|
14357
|
-
items: items.map((item) => ({
|
|
14358
|
-
type: item.type ?? "",
|
|
14359
|
-
hotel_name: item.hotelName ?? "",
|
|
14360
|
-
hotel_id: item.hotelId ?? "",
|
|
14361
|
-
city_name: item.cityName ?? "",
|
|
14362
|
-
check_in: item.checkIn ?? "",
|
|
14363
|
-
check_out: item.checkOut ?? "",
|
|
14364
|
-
price: item.price ?? 0
|
|
14365
|
-
}))
|
|
14366
|
-
};
|
|
14367
|
-
}
|
|
14368
|
-
});
|
|
14369
|
-
|
|
14370
|
-
// src/tools/get-customer-coupons.ts
|
|
14371
|
-
var PERSISTED_HASH2 = "a1131592ee367b7b6dbe778e942d09d7d0219d5eacf47810a1894116d7454b6d";
|
|
14372
|
-
var isCouponError = (v) => {
|
|
14373
|
-
return "customerCouponError" in v;
|
|
14374
|
-
};
|
|
14375
|
-
var getCustomerCoupons = defineTool({
|
|
14376
|
-
name: "get_customer_coupons",
|
|
14377
|
-
displayName: "Get Customer Coupons",
|
|
14378
|
-
description: "Get available coupons for the authenticated user. Coupons can be filtered by product type (STAY, FLY, DRIVE). Returns coupon codes, descriptions, expiration dates, and discount amounts.",
|
|
14379
|
-
summary: "Get your available coupons",
|
|
14380
|
-
icon: "ticket",
|
|
14381
|
-
group: "Account",
|
|
14382
|
-
input: external_exports.object({
|
|
14383
|
-
product: external_exports.enum(["STAY", "FLY", "DRIVE"]).optional().describe("Product type to filter coupons (default STAY)")
|
|
14384
|
-
}),
|
|
14385
|
-
output: external_exports.object({
|
|
14386
|
-
coupons: external_exports.array(
|
|
14387
|
-
external_exports.object({
|
|
14388
|
-
coupon_code: external_exports.string().describe("Coupon code"),
|
|
14389
|
-
description: external_exports.string().describe("Coupon description"),
|
|
14390
|
-
expiration_date: external_exports.string().describe("Expiration date"),
|
|
14391
|
-
min_spend: external_exports.number().describe("Minimum spend amount"),
|
|
14392
|
-
discount: external_exports.number().describe("Discount amount"),
|
|
14393
|
-
discount_type: external_exports.string().describe("Discount type (PERCENT, FIXED)")
|
|
14394
|
-
})
|
|
14395
|
-
).describe("Available coupons"),
|
|
14396
|
-
message: external_exports.string().describe("Status message (e.g., no coupons found)")
|
|
14397
|
-
}),
|
|
14398
|
-
handle: async (params) => {
|
|
14399
|
-
const data = await graphql(
|
|
14400
|
-
"CustomerCoupons",
|
|
14401
|
-
{
|
|
14402
|
-
customerRequestOptions: {
|
|
14403
|
-
products: [params.product ?? "STAY"]
|
|
14404
|
-
}
|
|
14405
|
-
},
|
|
14406
|
-
PERSISTED_HASH2
|
|
14407
|
-
);
|
|
14408
|
-
const result = data.customerCoupons;
|
|
14409
|
-
if (!result || isCouponError(result)) {
|
|
14410
|
-
return {
|
|
14411
|
-
coupons: [],
|
|
14412
|
-
message: result?.customerCouponError ?? "No coupons available"
|
|
14413
|
-
};
|
|
14414
|
-
}
|
|
14415
|
-
const couponData = result;
|
|
14416
|
-
const coupons = (couponData.customerCoupons ?? []).map((c) => ({
|
|
14417
|
-
coupon_code: c.couponCode ?? "",
|
|
14418
|
-
description: c.description ?? "",
|
|
14419
|
-
expiration_date: c.expirationDate ?? "",
|
|
14420
|
-
min_spend: c.minSpend ?? 0,
|
|
14421
|
-
discount: c.discount ?? 0,
|
|
14422
|
-
discount_type: c.discountType ?? ""
|
|
14423
|
-
}));
|
|
14424
|
-
return { coupons, message: coupons.length > 0 ? "OK" : "No coupons available" };
|
|
14425
|
-
}
|
|
14426
|
-
});
|
|
14427
|
-
|
|
14428
15113
|
// src/tools/schemas.ts
|
|
14429
15114
|
var searchItemSchema = external_exports.object({
|
|
14430
15115
|
id: external_exports.string().describe("Location ID (city ID, POI ID, etc.)"),
|
|
@@ -14576,6 +15261,239 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14576
15261
|
is_top_rated: e.topBadges?.isTopRated ?? false,
|
|
14577
15262
|
is_top_booked: e.topBadges?.isTopBooked ?? false
|
|
14578
15263
|
});
|
|
15264
|
+
var airportSchema = external_exports.object({
|
|
15265
|
+
id: external_exports.string().describe("IATA code for an airport (e.g., JFK, LAX) or city code for a metro area (e.g., NYC)"),
|
|
15266
|
+
type: external_exports.string().describe("Entry type \u2014 AIRPORT for a specific airport, GDS_CITY for a multi-airport metropolitan area"),
|
|
15267
|
+
display_name: external_exports.string().describe('Full display name (e.g., "New York City, NY - John F Kennedy Intl Airport (JFK)")'),
|
|
15268
|
+
city_name: external_exports.string().describe("City name"),
|
|
15269
|
+
state_code: external_exports.string().describe("State or province code (US only)"),
|
|
15270
|
+
country_code: external_exports.string().describe("ISO country code (e.g., US, GB)"),
|
|
15271
|
+
latitude: external_exports.number().describe("Airport latitude in decimal degrees; 0 for multi-airport metro entries"),
|
|
15272
|
+
longitude: external_exports.number().describe("Airport longitude in decimal degrees; 0 for multi-airport metro entries"),
|
|
15273
|
+
timezone: external_exports.string().describe("IANA timezone name (e.g., America/New_York)")
|
|
15274
|
+
});
|
|
15275
|
+
var mapAirport = (a) => ({
|
|
15276
|
+
id: a.id ?? "",
|
|
15277
|
+
type: a.subType ?? "",
|
|
15278
|
+
display_name: a.displayName ?? "",
|
|
15279
|
+
city_name: a.cityName ?? "",
|
|
15280
|
+
state_code: a.stateCode ?? "",
|
|
15281
|
+
country_code: a.countryCode ?? "",
|
|
15282
|
+
latitude: a.lat ?? 0,
|
|
15283
|
+
longitude: a.lon ?? 0,
|
|
15284
|
+
timezone: a.timeZoneName ?? ""
|
|
15285
|
+
});
|
|
15286
|
+
var flightFareRecordSchema = external_exports.object({
|
|
15287
|
+
dates: external_exports.array(external_exports.string()).describe(
|
|
15288
|
+
"Travel date(s) in YYYY-MM-DD format. One entry for one-way searches; two entries (depart, return) for round-trip."
|
|
15289
|
+
),
|
|
15290
|
+
min_price: external_exports.number().describe("Minimum fare per passenger in the response currency"),
|
|
15291
|
+
currency: external_exports.string().describe("Currency code (e.g., USD)"),
|
|
15292
|
+
is_private_fare: external_exports.boolean().describe("Whether the fare is a members-only private rate"),
|
|
15293
|
+
stops_by_slice: external_exports.array(
|
|
15294
|
+
external_exports.object({
|
|
15295
|
+
slice_id: external_exports.number().int().describe("Slice number (1 for outbound, 2 for return)"),
|
|
15296
|
+
stops: external_exports.number().int().describe("Number of stops for this slice (0 = non-stop)")
|
|
15297
|
+
})
|
|
15298
|
+
).describe("Stop counts for each flight slice"),
|
|
15299
|
+
takeoff_times: external_exports.array(external_exports.string()).describe("Departure times per slice in HH:MM (24h)"),
|
|
15300
|
+
landing_times: external_exports.array(external_exports.string()).describe("Arrival times per slice in HH:MM (24h)")
|
|
15301
|
+
});
|
|
15302
|
+
var mapFlightFareRecord = (r) => ({
|
|
15303
|
+
dates: r.dates ?? [],
|
|
15304
|
+
min_price: r.minimumFare?.amtPerPax ?? 0,
|
|
15305
|
+
currency: r.minimumFare?.currency ?? "",
|
|
15306
|
+
is_private_fare: r.minimumFare?.isPrivateFare ?? false,
|
|
15307
|
+
stops_by_slice: (r.minimumFare?.listOfStops ?? []).map((s) => ({
|
|
15308
|
+
slice_id: s.sliceId ?? 0,
|
|
15309
|
+
stops: s.stops ?? 0
|
|
15310
|
+
})),
|
|
15311
|
+
takeoff_times: r.minimumFare?.commonAttributes?.takeOffTimes ?? [],
|
|
15312
|
+
landing_times: r.minimumFare?.commonAttributes?.landingTimes ?? []
|
|
15313
|
+
});
|
|
15314
|
+
var flightPriceWatchSchema = external_exports.object({
|
|
15315
|
+
origin_code: external_exports.string().describe("Origin airport or city code"),
|
|
15316
|
+
destination_code: external_exports.string().describe("Destination airport or city code"),
|
|
15317
|
+
depart_date: external_exports.string().describe("Outbound date in YYYY-MM-DD format"),
|
|
15318
|
+
return_date: external_exports.string().describe("Return date in YYYY-MM-DD format, empty for one-way watches"),
|
|
15319
|
+
cabin_class: external_exports.string().describe("Cabin class (ECO, BUS, FIRST)"),
|
|
15320
|
+
current_price: external_exports.number().describe("Most recently observed minimum fare"),
|
|
15321
|
+
target_price: external_exports.number().describe("User-set target fare for alerts"),
|
|
15322
|
+
is_active: external_exports.boolean().describe("Whether the watch is currently active"),
|
|
15323
|
+
created_at: external_exports.string().describe("When the watch was created (ISO 8601)")
|
|
15324
|
+
});
|
|
15325
|
+
var mapFlightPriceWatch = (w) => ({
|
|
15326
|
+
origin_code: w.originCityCode ?? "",
|
|
15327
|
+
destination_code: w.destCityCode ?? "",
|
|
15328
|
+
depart_date: w.departDate ?? "",
|
|
15329
|
+
return_date: w.returnDate ?? "",
|
|
15330
|
+
cabin_class: w.cabinClass ?? "",
|
|
15331
|
+
current_price: w.currentPrice ?? 0,
|
|
15332
|
+
target_price: w.targetPrice ?? 0,
|
|
15333
|
+
is_active: w.active ?? false,
|
|
15334
|
+
created_at: w.createdDate ?? ""
|
|
15335
|
+
});
|
|
15336
|
+
|
|
15337
|
+
// src/tools/find-cheapest-flight-date.ts
|
|
15338
|
+
var PRICE_CALENDAR_QUERY = `
|
|
15339
|
+
query airPriceGuideCalendar($input: AirPriceGuideRequest) {
|
|
15340
|
+
airPriceGuide(input: $input) {
|
|
15341
|
+
error { type code message }
|
|
15342
|
+
records {
|
|
15343
|
+
dates
|
|
15344
|
+
minimumFare {
|
|
15345
|
+
isPrivateFare
|
|
15346
|
+
currency
|
|
15347
|
+
amtPerPax
|
|
15348
|
+
commonAttributes { takeOffTimes landingTimes }
|
|
15349
|
+
listOfStops { sliceId stops }
|
|
15350
|
+
}
|
|
15351
|
+
}
|
|
15352
|
+
}
|
|
15353
|
+
}`;
|
|
15354
|
+
var findCheapestFlightDate = defineTool({
|
|
15355
|
+
name: "find_cheapest_flight_date",
|
|
15356
|
+
displayName: "Find Cheapest Flight Date",
|
|
15357
|
+
description: "Find the single cheapest date to fly a route within a given date window. Returns the bottom N fares ordered from lowest to highest price, so the caller can pick the best date that fits their schedule. Works for one-way routes; for round-trip price optimization use get_flight_price_calendar with two trips.",
|
|
15358
|
+
summary: "Find the cheapest flight date in a window",
|
|
15359
|
+
icon: "piggy-bank",
|
|
15360
|
+
group: "Flights",
|
|
15361
|
+
input: external_exports.object({
|
|
15362
|
+
origin: external_exports.string().describe("Origin airport or city code (e.g., JFK, NYC)"),
|
|
15363
|
+
destination: external_exports.string().describe("Destination airport or city code (e.g., LAX, LON)"),
|
|
15364
|
+
depart_date_from: external_exports.string().describe("Start of departure window in YYYY-MM-DD format"),
|
|
15365
|
+
depart_date_to: external_exports.string().describe("End of departure window in YYYY-MM-DD format"),
|
|
15366
|
+
top_n: external_exports.number().int().min(1).max(30).optional().describe("Number of cheapest dates to return (default 5, max 30)"),
|
|
15367
|
+
cabin_class: external_exports.enum(["ECO", "PREMIUM", "BUS", "FIRST"]).optional().describe("Cabin class filter (default ECO)")
|
|
15368
|
+
}),
|
|
15369
|
+
output: external_exports.object({
|
|
15370
|
+
records: external_exports.array(flightFareRecordSchema).describe("Cheapest flight dates in the window, sorted ascending by price")
|
|
15371
|
+
}),
|
|
15372
|
+
handle: async (params) => {
|
|
15373
|
+
const variables = {
|
|
15374
|
+
input: {
|
|
15375
|
+
trips: [
|
|
15376
|
+
{
|
|
15377
|
+
originCity: [params.origin],
|
|
15378
|
+
destinationCity: [params.destination],
|
|
15379
|
+
departDateRange: { fromDate: params.depart_date_from, toDate: params.depart_date_to }
|
|
15380
|
+
}
|
|
15381
|
+
],
|
|
15382
|
+
size: 720,
|
|
15383
|
+
consumer: "PCLN-HOME",
|
|
15384
|
+
cabinClass: params.cabin_class ?? "ECO"
|
|
15385
|
+
}
|
|
15386
|
+
};
|
|
15387
|
+
const data = await graphql("airPriceGuideCalendar", variables, PRICE_CALENDAR_QUERY);
|
|
15388
|
+
const guide = data.airPriceGuide;
|
|
15389
|
+
if (guide?.error) {
|
|
15390
|
+
const msg = guide.error.message ?? "";
|
|
15391
|
+
if (msg === "Zero results") return { records: [] };
|
|
15392
|
+
throw ToolError.internal(`Flight price calendar error: ${msg}`);
|
|
15393
|
+
}
|
|
15394
|
+
const raw = guide?.records ?? [];
|
|
15395
|
+
const mapped = raw.map(mapFlightFareRecord).filter((r) => r.min_price > 0).sort((a, b) => a.min_price - b.min_price).slice(0, params.top_n ?? 5);
|
|
15396
|
+
return { records: mapped };
|
|
15397
|
+
}
|
|
15398
|
+
});
|
|
15399
|
+
|
|
15400
|
+
// src/tools/get-abandoned-items.ts
|
|
15401
|
+
var PERSISTED_HASH = "bd547859ce08366e86541b80eb6951d93aa36e1e4608842366309826793c223f";
|
|
15402
|
+
var getAbandonedItems = defineTool({
|
|
15403
|
+
name: "get_abandoned_items",
|
|
15404
|
+
displayName: "Get Abandoned Items",
|
|
15405
|
+
description: "Get items the user previously viewed or added to cart but did not complete booking. Useful for resuming interrupted booking flows.",
|
|
15406
|
+
summary: "Get your abandoned cart items",
|
|
15407
|
+
icon: "shopping-cart",
|
|
15408
|
+
group: "Account",
|
|
15409
|
+
input: external_exports.object({}),
|
|
15410
|
+
output: external_exports.object({
|
|
15411
|
+
items: external_exports.array(
|
|
15412
|
+
external_exports.object({
|
|
15413
|
+
type: external_exports.string().describe("Item type (HOTEL, FLIGHT, CAR)"),
|
|
15414
|
+
hotel_name: external_exports.string().describe("Hotel name (if hotel)"),
|
|
15415
|
+
hotel_id: external_exports.string().describe("Hotel ID (if hotel)"),
|
|
15416
|
+
city_name: external_exports.string().describe("City name"),
|
|
15417
|
+
check_in: external_exports.string().describe("Check-in date"),
|
|
15418
|
+
check_out: external_exports.string().describe("Check-out date"),
|
|
15419
|
+
price: external_exports.number().describe("Price at time of abandonment")
|
|
15420
|
+
})
|
|
15421
|
+
).describe("Abandoned booking items")
|
|
15422
|
+
}),
|
|
15423
|
+
handle: async () => {
|
|
15424
|
+
const data = await graphql("getAbandonedItemsByCguid", { cguid: getCguid() }, PERSISTED_HASH);
|
|
15425
|
+
const items = data.getAbandonedItemsByCguid ?? [];
|
|
15426
|
+
return {
|
|
15427
|
+
items: items.map((item) => ({
|
|
15428
|
+
type: item.type ?? "",
|
|
15429
|
+
hotel_name: item.hotelName ?? "",
|
|
15430
|
+
hotel_id: item.hotelId ?? "",
|
|
15431
|
+
city_name: item.cityName ?? "",
|
|
15432
|
+
check_in: item.checkIn ?? "",
|
|
15433
|
+
check_out: item.checkOut ?? "",
|
|
15434
|
+
price: item.price ?? 0
|
|
15435
|
+
}))
|
|
15436
|
+
};
|
|
15437
|
+
}
|
|
15438
|
+
});
|
|
15439
|
+
|
|
15440
|
+
// src/tools/get-customer-coupons.ts
|
|
15441
|
+
var PERSISTED_HASH2 = "a1131592ee367b7b6dbe778e942d09d7d0219d5eacf47810a1894116d7454b6d";
|
|
15442
|
+
var isCouponError = (v) => {
|
|
15443
|
+
return "customerCouponError" in v;
|
|
15444
|
+
};
|
|
15445
|
+
var getCustomerCoupons = defineTool({
|
|
15446
|
+
name: "get_customer_coupons",
|
|
15447
|
+
displayName: "Get Customer Coupons",
|
|
15448
|
+
description: "Get available coupons for the authenticated user. Coupons can be filtered by product type (STAY, FLY, DRIVE). Returns coupon codes, descriptions, expiration dates, and discount amounts.",
|
|
15449
|
+
summary: "Get your available coupons",
|
|
15450
|
+
icon: "ticket",
|
|
15451
|
+
group: "Account",
|
|
15452
|
+
input: external_exports.object({
|
|
15453
|
+
product: external_exports.enum(["STAY", "FLY", "DRIVE"]).optional().describe("Product type to filter coupons (default STAY)")
|
|
15454
|
+
}),
|
|
15455
|
+
output: external_exports.object({
|
|
15456
|
+
coupons: external_exports.array(
|
|
15457
|
+
external_exports.object({
|
|
15458
|
+
coupon_code: external_exports.string().describe("Coupon code"),
|
|
15459
|
+
description: external_exports.string().describe("Coupon description"),
|
|
15460
|
+
expiration_date: external_exports.string().describe("Expiration date"),
|
|
15461
|
+
min_spend: external_exports.number().describe("Minimum spend amount"),
|
|
15462
|
+
discount: external_exports.number().describe("Discount amount"),
|
|
15463
|
+
discount_type: external_exports.string().describe("Discount type (PERCENT, FIXED)")
|
|
15464
|
+
})
|
|
15465
|
+
).describe("Available coupons"),
|
|
15466
|
+
message: external_exports.string().describe("Status message (e.g., no coupons found)")
|
|
15467
|
+
}),
|
|
15468
|
+
handle: async (params) => {
|
|
15469
|
+
const data = await graphql(
|
|
15470
|
+
"CustomerCoupons",
|
|
15471
|
+
{
|
|
15472
|
+
customerRequestOptions: {
|
|
15473
|
+
products: [params.product ?? "STAY"]
|
|
15474
|
+
}
|
|
15475
|
+
},
|
|
15476
|
+
PERSISTED_HASH2
|
|
15477
|
+
);
|
|
15478
|
+
const result = data.customerCoupons;
|
|
15479
|
+
if (!result || isCouponError(result)) {
|
|
15480
|
+
return {
|
|
15481
|
+
coupons: [],
|
|
15482
|
+
message: result?.customerCouponError ?? "No coupons available"
|
|
15483
|
+
};
|
|
15484
|
+
}
|
|
15485
|
+
const couponData = result;
|
|
15486
|
+
const coupons = (couponData.customerCoupons ?? []).map((c) => ({
|
|
15487
|
+
coupon_code: c.couponCode ?? "",
|
|
15488
|
+
description: c.description ?? "",
|
|
15489
|
+
expiration_date: c.expirationDate ?? "",
|
|
15490
|
+
min_spend: c.minSpend ?? 0,
|
|
15491
|
+
discount: c.discount ?? 0,
|
|
15492
|
+
discount_type: c.discountType ?? ""
|
|
15493
|
+
}));
|
|
15494
|
+
return { coupons, message: coupons.length > 0 ? "OK" : "No coupons available" };
|
|
15495
|
+
}
|
|
15496
|
+
});
|
|
14579
15497
|
|
|
14580
15498
|
// src/tools/get-customer-profile.ts
|
|
14581
15499
|
var PERSISTED_HASH3 = "48d8218318dd4384631ab71f001f4475b9e47312a6bcfea98af8beb90526d7ff";
|
|
@@ -14644,6 +15562,80 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14644
15562
|
}
|
|
14645
15563
|
});
|
|
14646
15564
|
|
|
15565
|
+
// src/tools/get-flight-price-calendar.ts
|
|
15566
|
+
var PRICE_CALENDAR_QUERY2 = `
|
|
15567
|
+
query airPriceGuideCalendar($input: AirPriceGuideRequest) {
|
|
15568
|
+
airPriceGuide(input: $input) {
|
|
15569
|
+
error { type code message }
|
|
15570
|
+
records {
|
|
15571
|
+
dates
|
|
15572
|
+
minimumFare {
|
|
15573
|
+
isPrivateFare
|
|
15574
|
+
currency
|
|
15575
|
+
amtPerPax
|
|
15576
|
+
commonAttributes { takeOffTimes landingTimes }
|
|
15577
|
+
listOfStops { sliceId stops }
|
|
15578
|
+
}
|
|
15579
|
+
}
|
|
15580
|
+
}
|
|
15581
|
+
}`;
|
|
15582
|
+
var cabinClassSchema = external_exports.enum(["ECO", "PREMIUM", "BUS", "FIRST"]).describe("Cabin class \u2014 ECO (economy), PREMIUM (premium economy), BUS (business), FIRST (first)");
|
|
15583
|
+
var tripSchema = external_exports.object({
|
|
15584
|
+
origin: external_exports.string().describe("Origin airport/city code (e.g., JFK, NYC)"),
|
|
15585
|
+
destination: external_exports.string().describe("Destination airport/city code (e.g., LAX, LON)"),
|
|
15586
|
+
depart_date: external_exports.string().optional().describe("Single departure date in YYYY-MM-DD format. Provide either this or depart_date_range, not both."),
|
|
15587
|
+
depart_date_from: external_exports.string().optional().describe("Start of departure date window in YYYY-MM-DD format. Pair with depart_date_to for range searches."),
|
|
15588
|
+
depart_date_to: external_exports.string().optional().describe("End of departure date window in YYYY-MM-DD format. Pair with depart_date_from for range searches.")
|
|
15589
|
+
}).describe("A single flight slice (leg). For one-way pass one slice; for round-trip pass two (outbound + return).");
|
|
15590
|
+
var buildTrip = (t) => {
|
|
15591
|
+
const trip = {
|
|
15592
|
+
originCity: [t.origin],
|
|
15593
|
+
destinationCity: [t.destination]
|
|
15594
|
+
};
|
|
15595
|
+
if (t.depart_date_from && t.depart_date_to) {
|
|
15596
|
+
trip.departDateRange = { fromDate: t.depart_date_from, toDate: t.depart_date_to };
|
|
15597
|
+
} else if (t.depart_date) {
|
|
15598
|
+
trip.departDate = t.depart_date;
|
|
15599
|
+
} else {
|
|
15600
|
+
throw ToolError.validation("Each trip must have either depart_date or both depart_date_from and depart_date_to.");
|
|
15601
|
+
}
|
|
15602
|
+
return trip;
|
|
15603
|
+
};
|
|
15604
|
+
var getFlightPriceCalendar = defineTool({
|
|
15605
|
+
name: "get_flight_price_calendar",
|
|
15606
|
+
displayName: "Get Flight Price Calendar",
|
|
15607
|
+
description: "Get Priceline's fare forecast for a route over a date range. Returns the cheapest available fare for each date (or date combination for round-trips), along with departure/arrival times and stop counts. Pass a single `trips` entry for one-way, or two entries (outbound + return) for round-trip. Each trip can be a single date (`depart_date`) or a date window (`depart_date_from`/`depart_date_to`). Useful for finding the cheapest date to fly before booking.",
|
|
15608
|
+
summary: "Flight fare forecast for a date range",
|
|
15609
|
+
icon: "calendar-range",
|
|
15610
|
+
group: "Flights",
|
|
15611
|
+
input: external_exports.object({
|
|
15612
|
+
trips: external_exports.array(tripSchema).min(1).max(6).describe("Flight slices \u2014 1 for one-way, 2 for round-trip, up to 6 for multi-city"),
|
|
15613
|
+
cabin_class: cabinClassSchema.optional().describe("Cabin class filter (default ECO)")
|
|
15614
|
+
}),
|
|
15615
|
+
output: external_exports.object({
|
|
15616
|
+
records: external_exports.array(flightFareRecordSchema).describe("Cheapest fares by date combination, sorted by trip dates")
|
|
15617
|
+
}),
|
|
15618
|
+
handle: async (params) => {
|
|
15619
|
+
const variables = {
|
|
15620
|
+
input: {
|
|
15621
|
+
trips: params.trips.map(buildTrip),
|
|
15622
|
+
size: 720,
|
|
15623
|
+
consumer: "PCLN-HOME",
|
|
15624
|
+
cabinClass: params.cabin_class ?? "ECO"
|
|
15625
|
+
}
|
|
15626
|
+
};
|
|
15627
|
+
const data = await graphql("airPriceGuideCalendar", variables, PRICE_CALENDAR_QUERY2);
|
|
15628
|
+
const guide = data.airPriceGuide;
|
|
15629
|
+
if (guide?.error) {
|
|
15630
|
+
const msg = guide.error.message ?? "";
|
|
15631
|
+
if (msg === "Zero results") return { records: [] };
|
|
15632
|
+
throw ToolError.internal(`Flight price calendar error: ${msg}`);
|
|
15633
|
+
}
|
|
15634
|
+
const records = guide?.records ?? [];
|
|
15635
|
+
return { records: records.map(mapFlightFareRecord) };
|
|
15636
|
+
}
|
|
15637
|
+
});
|
|
15638
|
+
|
|
14647
15639
|
// src/tools/get-hotel-descriptions.ts
|
|
14648
15640
|
var PERSISTED_HASH5 = "991edc70fc5972ea86c4db02e07cc45ba1b75fffa12f4b5e2bd3998faaaf70c7";
|
|
14649
15641
|
var getHotelDescriptions = defineTool({
|
|
@@ -14794,6 +15786,93 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14794
15786
|
}
|
|
14795
15787
|
});
|
|
14796
15788
|
|
|
15789
|
+
// src/tools/list-flight-price-watches.ts
|
|
15790
|
+
var PRICE_WATCH_LIST_QUERY = `
|
|
15791
|
+
query PriceWatches($input: AirPriceWatchGetListRequest!) {
|
|
15792
|
+
airPriceWatchGetListResponse(input: $input) {
|
|
15793
|
+
status statusCode statusMessage email
|
|
15794
|
+
error { code message }
|
|
15795
|
+
priceWatchGetListResp
|
|
15796
|
+
}
|
|
15797
|
+
}`;
|
|
15798
|
+
var generateRequestId = () => {
|
|
15799
|
+
return `opentabs-${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;
|
|
15800
|
+
};
|
|
15801
|
+
var listFlightPriceWatches = defineTool({
|
|
15802
|
+
name: "list_flight_price_watches",
|
|
15803
|
+
displayName: "List Flight Price Watches",
|
|
15804
|
+
description: "List the authenticated user's active Priceline flight price watches. Returns watches the user has set up to track fare changes on specific routes. Each entry includes origin, destination, travel dates, cabin class, current price, and target price.",
|
|
15805
|
+
summary: "List user's flight price alerts",
|
|
15806
|
+
icon: "bell",
|
|
15807
|
+
group: "Flights",
|
|
15808
|
+
input: external_exports.object({
|
|
15809
|
+
include_inactive: external_exports.boolean().optional().describe("Include inactive (paused or expired) watches in addition to active ones (default false)")
|
|
15810
|
+
}),
|
|
15811
|
+
output: external_exports.object({
|
|
15812
|
+
price_watches: external_exports.array(flightPriceWatchSchema).describe("Active flight price watches for the signed-in user")
|
|
15813
|
+
}),
|
|
15814
|
+
handle: async (params) => {
|
|
15815
|
+
const email3 = getEmail();
|
|
15816
|
+
const variables = {
|
|
15817
|
+
input: {
|
|
15818
|
+
email: email3,
|
|
15819
|
+
requestId: generateRequestId(),
|
|
15820
|
+
includeInactive: params.include_inactive ?? false,
|
|
15821
|
+
includeOptedOut: false
|
|
15822
|
+
}
|
|
15823
|
+
};
|
|
15824
|
+
const data = await flyGraphql("PriceWatches", variables, PRICE_WATCH_LIST_QUERY);
|
|
15825
|
+
const resp = data.airPriceWatchGetListResponse;
|
|
15826
|
+
if (resp?.status === "ERROR") {
|
|
15827
|
+
throw ToolError.internal(`Price watch list error: ${resp.statusMessage ?? "unknown error"}`);
|
|
15828
|
+
}
|
|
15829
|
+
if (resp?.error) {
|
|
15830
|
+
throw ToolError.internal(`Price watch list error: ${resp.error.message ?? "unknown error"}`);
|
|
15831
|
+
}
|
|
15832
|
+
const list = resp?.priceWatchGetListResp?.priceWatches ?? resp?.priceWatchGetListResp?.optedInData ?? [];
|
|
15833
|
+
return { price_watches: list.map(mapFlightPriceWatch) };
|
|
15834
|
+
}
|
|
15835
|
+
});
|
|
15836
|
+
|
|
15837
|
+
// src/tools/navigate-to-flight-search.ts
|
|
15838
|
+
var tripTypeSchema = external_exports.enum(["OW", "RT"]).describe("Trip type \u2014 OW (one-way) or RT (round-trip)");
|
|
15839
|
+
var cabinClassSchema2 = external_exports.enum(["ECONOMY", "PREMIUM", "BUSINESS", "FIRST"]).describe("Cabin class for the search URL");
|
|
15840
|
+
var toYmd = (date5) => {
|
|
15841
|
+
const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(date5);
|
|
15842
|
+
if (!match) throw new Error(`Invalid date ${date5} \u2014 expected YYYY-MM-DD`);
|
|
15843
|
+
return date5;
|
|
15844
|
+
};
|
|
15845
|
+
var navigateToFlightSearch = defineTool({
|
|
15846
|
+
name: "navigate_to_flight_search",
|
|
15847
|
+
displayName: "Navigate to Flight Search",
|
|
15848
|
+
description: "Open Priceline's flight search results page for a given route and dates in the user's browser. This navigates the current tab so the user can review flights, apply filters, and book in their authenticated session. Use this after get_flight_price_calendar or find_cheapest_flight_date has identified a good route/date \u2014 it hands control back to the user for the full search and booking flow. Requires airport/city codes (use search_airports to find them).",
|
|
15849
|
+
summary: "Open Priceline flight search for a route",
|
|
15850
|
+
icon: "plane",
|
|
15851
|
+
group: "Flights",
|
|
15852
|
+
input: external_exports.object({
|
|
15853
|
+
origin: external_exports.string().describe("Origin airport or city code (e.g., JFK, NYC)"),
|
|
15854
|
+
destination: external_exports.string().describe("Destination airport or city code (e.g., LAX, LON)"),
|
|
15855
|
+
depart_date: external_exports.string().describe("Departure date in YYYY-MM-DD format"),
|
|
15856
|
+
return_date: external_exports.string().optional().describe("Return date in YYYY-MM-DD format (round-trip only; omit for one-way)"),
|
|
15857
|
+
trip_type: tripTypeSchema.optional().describe("Trip type (default OW for one-way, RT when return_date is set)"),
|
|
15858
|
+
cabin_class: cabinClassSchema2.optional().describe("Cabin class (default ECONOMY)"),
|
|
15859
|
+
passengers: external_exports.number().int().min(1).max(8).optional().describe("Number of passengers (default 1)")
|
|
15860
|
+
}),
|
|
15861
|
+
output: external_exports.object({
|
|
15862
|
+
url: external_exports.string().describe("The Priceline flight search URL that was opened")
|
|
15863
|
+
}),
|
|
15864
|
+
handle: async (params) => {
|
|
15865
|
+
const depart = toYmd(params.depart_date);
|
|
15866
|
+
const tripType = params.trip_type ?? (params.return_date ? "RT" : "OW");
|
|
15867
|
+
const cabin = params.cabin_class ?? "ECONOMY";
|
|
15868
|
+
const pax = params.passengers ?? 1;
|
|
15869
|
+
const returnSegment = tripType === "RT" && params.return_date ? `/${toYmd(params.return_date)}` : "";
|
|
15870
|
+
const url2 = `https://www.priceline.com/m/fly/search/${params.origin}-${params.destination}/${depart}${returnSegment}/?tripType=${tripType}&cabinClass=${cabin}&numOfPassengers=${pax}`;
|
|
15871
|
+
window.location.href = url2;
|
|
15872
|
+
return { url: url2 };
|
|
15873
|
+
}
|
|
15874
|
+
});
|
|
15875
|
+
|
|
14797
15876
|
// src/tools/navigate-to-hotel.ts
|
|
14798
15877
|
var navigateToHotel = defineTool({
|
|
14799
15878
|
name: "navigate_to_hotel",
|
|
@@ -14850,6 +15929,26 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14850
15929
|
}
|
|
14851
15930
|
});
|
|
14852
15931
|
|
|
15932
|
+
// src/tools/search-airports.ts
|
|
15933
|
+
var searchAirports = defineTool({
|
|
15934
|
+
name: "search_airports",
|
|
15935
|
+
displayName: "Search Airports",
|
|
15936
|
+
description: "Find airports and multi-airport metro areas matching a keyword. Returns IATA codes (e.g., JFK, LAX) for specific airports and three-letter city codes (e.g., NYC, LON) for metros that combine all nearby airports. Use the returned `id` value as the origin or destination code in other flight tools. Results are ranked by relevance.",
|
|
15937
|
+
summary: "Find airport and city codes by keyword",
|
|
15938
|
+
icon: "plane-takeoff",
|
|
15939
|
+
group: "Flights",
|
|
15940
|
+
input: external_exports.object({
|
|
15941
|
+
keyword: external_exports.string().describe('Search keyword \u2014 a city name, airport name, or IATA code (e.g., "new york", "heathrow", "JFK")')
|
|
15942
|
+
}),
|
|
15943
|
+
output: external_exports.object({
|
|
15944
|
+
airports: external_exports.array(airportSchema).describe("Matching airports and metro areas ranked by relevance")
|
|
15945
|
+
}),
|
|
15946
|
+
handle: async (params) => {
|
|
15947
|
+
const items = await autocomplete("flights", params.keyword);
|
|
15948
|
+
return { airports: items.map(mapAirport) };
|
|
15949
|
+
}
|
|
15950
|
+
});
|
|
15951
|
+
|
|
14853
15952
|
// src/tools/search-hotels.ts
|
|
14854
15953
|
var PERSISTED_HASH9 = "ffaeed6473a0adf0074403134bb897df6c6f402f9a0322017b0ec4d268d943c3";
|
|
14855
15954
|
var searchHotels = defineTool({
|
|
@@ -14993,6 +16092,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14993
16092
|
getMerchandisingBadges,
|
|
14994
16093
|
getPriceGuidance,
|
|
14995
16094
|
navigateToHotel,
|
|
16095
|
+
// Flights
|
|
16096
|
+
searchAirports,
|
|
16097
|
+
getFlightPriceCalendar,
|
|
16098
|
+
findCheapestFlightDate,
|
|
16099
|
+
listFlightPriceWatches,
|
|
16100
|
+
navigateToFlightSearch,
|
|
14996
16101
|
// Account
|
|
14997
16102
|
getCustomerProfile,
|
|
14998
16103
|
getCustomerCoupons,
|
|
@@ -15006,7 +16111,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15006
16111
|
};
|
|
15007
16112
|
var src_default = new PricelinePlugin();
|
|
15008
16113
|
|
|
15009
|
-
// dist/
|
|
16114
|
+
// dist/_adapter_entry_3c2de676-3e04-47cd-b75b-8798f6845c97.ts
|
|
15010
16115
|
if (!globalThis.__openTabs) {
|
|
15011
16116
|
globalThis.__openTabs = {};
|
|
15012
16117
|
} else {
|
|
@@ -15094,6 +16199,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15094
16199
|
const origHandle = tool.handle;
|
|
15095
16200
|
tool.handle = async function(...handleArgs) {
|
|
15096
16201
|
const startTime = performance.now();
|
|
16202
|
+
const runtime = globalThis.__openTabs;
|
|
16203
|
+
runtime._pluginName = "priceline";
|
|
15097
16204
|
if (hasLifecycleHooks && typeof src_default.onToolInvocationStart === "function") {
|
|
15098
16205
|
try {
|
|
15099
16206
|
src_default.onToolInvocationStart(tool.name);
|
|
@@ -15222,5 +16329,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15222
16329
|
};
|
|
15223
16330
|
delete src_default.onDeactivate;
|
|
15224
16331
|
}
|
|
15225
|
-
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["priceline"]){var a=o.adapters["priceline"];a.__adapterHash="
|
|
16332
|
+
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["priceline"]){var a=o.adapters["priceline"];a.__adapterHash="d30d91b5eff0ecc689d50872c91fbb4407a38618991233afb2abeab806d51f7a";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"priceline",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
|
|
15226
16333
|
//# sourceMappingURL=adapter.iife.js.map
|