@opentabs-dev/opentabs-plugin-priceline 0.0.84 → 0.0.85
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 +1599 -517
- 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 = {};
|
|
@@ -699,6 +736,7 @@
|
|
|
699
736
|
int32: () => int32,
|
|
700
737
|
int64: () => int64,
|
|
701
738
|
intersection: () => intersection,
|
|
739
|
+
invertCodec: () => invertCodec,
|
|
702
740
|
ipv4: () => ipv42,
|
|
703
741
|
ipv6: () => ipv62,
|
|
704
742
|
iso: () => iso_exports,
|
|
@@ -1079,7 +1117,8 @@
|
|
|
1079
1117
|
});
|
|
1080
1118
|
|
|
1081
1119
|
// node_modules/zod/v4/core/core.js
|
|
1082
|
-
var
|
|
1120
|
+
var _a;
|
|
1121
|
+
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
1083
1122
|
status: "aborted"
|
|
1084
1123
|
});
|
|
1085
1124
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1114,10 +1153,10 @@
|
|
|
1114
1153
|
}
|
|
1115
1154
|
Object.defineProperty(Definition, "name", { value: name });
|
|
1116
1155
|
function _(def) {
|
|
1117
|
-
var
|
|
1156
|
+
var _a3;
|
|
1118
1157
|
const inst = params?.Parent ? new Definition() : this;
|
|
1119
1158
|
init(inst, def);
|
|
1120
|
-
(
|
|
1159
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
1121
1160
|
for (const fn of inst._zod.deferred) {
|
|
1122
1161
|
fn();
|
|
1123
1162
|
}
|
|
@@ -1146,7 +1185,8 @@
|
|
|
1146
1185
|
this.name = "ZodEncodeError";
|
|
1147
1186
|
}
|
|
1148
1187
|
};
|
|
1149
|
-
|
|
1188
|
+
(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
|
|
1189
|
+
var globalConfig = globalThis.__zod_globalConfig;
|
|
1150
1190
|
function config(newConfig) {
|
|
1151
1191
|
if (newConfig)
|
|
1152
1192
|
Object.assign(globalConfig, newConfig);
|
|
@@ -1179,6 +1219,7 @@
|
|
|
1179
1219
|
defineLazy: () => defineLazy,
|
|
1180
1220
|
esc: () => esc,
|
|
1181
1221
|
escapeRegex: () => escapeRegex,
|
|
1222
|
+
explicitlyAborted: () => explicitlyAborted,
|
|
1182
1223
|
extend: () => extend,
|
|
1183
1224
|
finalizeIssue: () => finalizeIssue,
|
|
1184
1225
|
floatSafeRemainder: () => floatSafeRemainder,
|
|
@@ -1267,19 +1308,12 @@
|
|
|
1267
1308
|
return source.slice(start, end);
|
|
1268
1309
|
}
|
|
1269
1310
|
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;
|
|
1311
|
+
const ratio = val / step;
|
|
1312
|
+
const roundedRatio = Math.round(ratio);
|
|
1313
|
+
const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
|
|
1314
|
+
if (Math.abs(ratio - roundedRatio) < tolerance)
|
|
1315
|
+
return 0;
|
|
1316
|
+
return ratio - roundedRatio;
|
|
1283
1317
|
}
|
|
1284
1318
|
var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
1285
1319
|
function defineLazy(object2, key, getter) {
|
|
@@ -1361,7 +1395,10 @@
|
|
|
1361
1395
|
function isObject(data) {
|
|
1362
1396
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
1363
1397
|
}
|
|
1364
|
-
var allowsEval = cached(() => {
|
|
1398
|
+
var allowsEval = /* @__PURE__ */ cached(() => {
|
|
1399
|
+
if (globalConfig.jitless) {
|
|
1400
|
+
return false;
|
|
1401
|
+
}
|
|
1365
1402
|
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
|
|
1366
1403
|
return false;
|
|
1367
1404
|
}
|
|
@@ -1394,6 +1431,10 @@
|
|
|
1394
1431
|
return { ...o };
|
|
1395
1432
|
if (Array.isArray(o))
|
|
1396
1433
|
return [...o];
|
|
1434
|
+
if (o instanceof Map)
|
|
1435
|
+
return new Map(o);
|
|
1436
|
+
if (o instanceof Set)
|
|
1437
|
+
return new Set(o);
|
|
1397
1438
|
return o;
|
|
1398
1439
|
}
|
|
1399
1440
|
function numKeys(data) {
|
|
@@ -1450,7 +1491,14 @@
|
|
|
1450
1491
|
}
|
|
1451
1492
|
};
|
|
1452
1493
|
var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
1453
|
-
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
1494
|
+
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
1495
|
+
"string",
|
|
1496
|
+
"number",
|
|
1497
|
+
"bigint",
|
|
1498
|
+
"boolean",
|
|
1499
|
+
"symbol",
|
|
1500
|
+
"undefined"
|
|
1501
|
+
]);
|
|
1454
1502
|
function escapeRegex(str) {
|
|
1455
1503
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1456
1504
|
}
|
|
@@ -1619,6 +1667,9 @@
|
|
|
1619
1667
|
return clone(schema, def);
|
|
1620
1668
|
}
|
|
1621
1669
|
function merge(a, b) {
|
|
1670
|
+
if (a._zod.def.checks?.length) {
|
|
1671
|
+
throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
1672
|
+
}
|
|
1622
1673
|
const def = mergeDefs(a._zod.def, {
|
|
1623
1674
|
get shape() {
|
|
1624
1675
|
const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
|
|
@@ -1628,8 +1679,7 @@
|
|
|
1628
1679
|
get catchall() {
|
|
1629
1680
|
return b._zod.def.catchall;
|
|
1630
1681
|
},
|
|
1631
|
-
checks: []
|
|
1632
|
-
// delete existing checks
|
|
1682
|
+
checks: b._zod.def.checks ?? []
|
|
1633
1683
|
});
|
|
1634
1684
|
return clone(a, def);
|
|
1635
1685
|
}
|
|
@@ -1712,10 +1762,20 @@
|
|
|
1712
1762
|
}
|
|
1713
1763
|
return false;
|
|
1714
1764
|
}
|
|
1765
|
+
function explicitlyAborted(x, startIndex = 0) {
|
|
1766
|
+
if (x.aborted === true)
|
|
1767
|
+
return true;
|
|
1768
|
+
for (let i = startIndex; i < x.issues.length; i++) {
|
|
1769
|
+
if (x.issues[i]?.continue === false) {
|
|
1770
|
+
return true;
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
return false;
|
|
1774
|
+
}
|
|
1715
1775
|
function prefixIssues(path, issues) {
|
|
1716
1776
|
return issues.map((iss) => {
|
|
1717
|
-
var
|
|
1718
|
-
(
|
|
1777
|
+
var _a3;
|
|
1778
|
+
(_a3 = iss).path ?? (_a3.path = []);
|
|
1719
1779
|
iss.path.unshift(path);
|
|
1720
1780
|
return iss;
|
|
1721
1781
|
});
|
|
@@ -1724,17 +1784,14 @@
|
|
|
1724
1784
|
return typeof message === "string" ? message : message?.message;
|
|
1725
1785
|
}
|
|
1726
1786
|
function finalizeIssue(iss, ctx, config2) {
|
|
1727
|
-
const
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1787
|
+
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";
|
|
1788
|
+
const { inst: _inst, continue: _continue, input: _input, ...rest2 } = iss;
|
|
1789
|
+
rest2.path ?? (rest2.path = []);
|
|
1790
|
+
rest2.message = message;
|
|
1791
|
+
if (ctx?.reportInput) {
|
|
1792
|
+
rest2.input = _input;
|
|
1731
1793
|
}
|
|
1732
|
-
|
|
1733
|
-
delete full.continue;
|
|
1734
|
-
if (!ctx?.reportInput) {
|
|
1735
|
-
delete full.input;
|
|
1736
|
-
}
|
|
1737
|
-
return full;
|
|
1794
|
+
return rest2;
|
|
1738
1795
|
}
|
|
1739
1796
|
function getSizableOrigin(input) {
|
|
1740
1797
|
if (input instanceof Set)
|
|
@@ -1851,10 +1908,10 @@
|
|
|
1851
1908
|
};
|
|
1852
1909
|
var $ZodError = $constructor("$ZodError", initializer);
|
|
1853
1910
|
var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
|
|
1854
|
-
function flattenError(
|
|
1911
|
+
function flattenError(error51, mapper = (issue2) => issue2.message) {
|
|
1855
1912
|
const fieldErrors = {};
|
|
1856
1913
|
const formErrors = [];
|
|
1857
|
-
for (const sub of
|
|
1914
|
+
for (const sub of error51.issues) {
|
|
1858
1915
|
if (sub.path.length > 0) {
|
|
1859
1916
|
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
1860
1917
|
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
@@ -1864,50 +1921,53 @@
|
|
|
1864
1921
|
}
|
|
1865
1922
|
return { formErrors, fieldErrors };
|
|
1866
1923
|
}
|
|
1867
|
-
function formatError(
|
|
1924
|
+
function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
1868
1925
|
const fieldErrors = { _errors: [] };
|
|
1869
|
-
const processError = (
|
|
1870
|
-
for (const issue2 of
|
|
1926
|
+
const processError = (error52, path = []) => {
|
|
1927
|
+
for (const issue2 of error52.issues) {
|
|
1871
1928
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
1872
|
-
issue2.errors.map((issues) => processError({ issues }));
|
|
1929
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
1873
1930
|
} else if (issue2.code === "invalid_key") {
|
|
1874
|
-
processError({ issues: issue2.issues });
|
|
1931
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
1875
1932
|
} else if (issue2.code === "invalid_element") {
|
|
1876
|
-
processError({ issues: issue2.issues });
|
|
1877
|
-
} else if (issue2.path.length === 0) {
|
|
1878
|
-
fieldErrors._errors.push(mapper(issue2));
|
|
1933
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
1879
1934
|
} else {
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1935
|
+
const fullpath = [...path, ...issue2.path];
|
|
1936
|
+
if (fullpath.length === 0) {
|
|
1937
|
+
fieldErrors._errors.push(mapper(issue2));
|
|
1938
|
+
} else {
|
|
1939
|
+
let curr = fieldErrors;
|
|
1940
|
+
let i = 0;
|
|
1941
|
+
while (i < fullpath.length) {
|
|
1942
|
+
const el = fullpath[i];
|
|
1943
|
+
const terminal = i === fullpath.length - 1;
|
|
1944
|
+
if (!terminal) {
|
|
1945
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
1946
|
+
} else {
|
|
1947
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
1948
|
+
curr[el]._errors.push(mapper(issue2));
|
|
1949
|
+
}
|
|
1950
|
+
curr = curr[el];
|
|
1951
|
+
i++;
|
|
1890
1952
|
}
|
|
1891
|
-
curr = curr[el];
|
|
1892
|
-
i++;
|
|
1893
1953
|
}
|
|
1894
1954
|
}
|
|
1895
1955
|
}
|
|
1896
1956
|
};
|
|
1897
|
-
processError(
|
|
1957
|
+
processError(error51);
|
|
1898
1958
|
return fieldErrors;
|
|
1899
1959
|
}
|
|
1900
|
-
function treeifyError(
|
|
1960
|
+
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
1901
1961
|
const result = { errors: [] };
|
|
1902
|
-
const processError = (
|
|
1903
|
-
var
|
|
1904
|
-
for (const issue2 of
|
|
1962
|
+
const processError = (error52, path = []) => {
|
|
1963
|
+
var _a3, _b;
|
|
1964
|
+
for (const issue2 of error52.issues) {
|
|
1905
1965
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
1906
|
-
issue2.errors.map((issues) => processError({ issues }, issue2.path));
|
|
1966
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
1907
1967
|
} else if (issue2.code === "invalid_key") {
|
|
1908
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
1968
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
1909
1969
|
} else if (issue2.code === "invalid_element") {
|
|
1910
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
1970
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
1911
1971
|
} else {
|
|
1912
1972
|
const fullpath = [...path, ...issue2.path];
|
|
1913
1973
|
if (fullpath.length === 0) {
|
|
@@ -1921,7 +1981,7 @@
|
|
|
1921
1981
|
const terminal = i === fullpath.length - 1;
|
|
1922
1982
|
if (typeof el === "string") {
|
|
1923
1983
|
curr.properties ?? (curr.properties = {});
|
|
1924
|
-
(
|
|
1984
|
+
(_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
|
|
1925
1985
|
curr = curr.properties[el];
|
|
1926
1986
|
} else {
|
|
1927
1987
|
curr.items ?? (curr.items = []);
|
|
@@ -1936,7 +1996,7 @@
|
|
|
1936
1996
|
}
|
|
1937
1997
|
}
|
|
1938
1998
|
};
|
|
1939
|
-
processError(
|
|
1999
|
+
processError(error51);
|
|
1940
2000
|
return result;
|
|
1941
2001
|
}
|
|
1942
2002
|
function toDotPath(_path) {
|
|
@@ -1957,9 +2017,9 @@
|
|
|
1957
2017
|
}
|
|
1958
2018
|
return segs.join("");
|
|
1959
2019
|
}
|
|
1960
|
-
function prettifyError(
|
|
2020
|
+
function prettifyError(error51) {
|
|
1961
2021
|
const lines = [];
|
|
1962
|
-
const issues = [...
|
|
2022
|
+
const issues = [...error51.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
|
|
1963
2023
|
for (const issue2 of issues) {
|
|
1964
2024
|
lines.push(`\u2716 ${issue2.message}`);
|
|
1965
2025
|
if (issue2.path?.length)
|
|
@@ -1970,7 +2030,7 @@
|
|
|
1970
2030
|
|
|
1971
2031
|
// node_modules/zod/v4/core/parse.js
|
|
1972
2032
|
var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
1973
|
-
const ctx = _ctx ?
|
|
2033
|
+
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
1974
2034
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
1975
2035
|
if (result instanceof Promise) {
|
|
1976
2036
|
throw new $ZodAsyncError();
|
|
@@ -1984,7 +2044,7 @@
|
|
|
1984
2044
|
};
|
|
1985
2045
|
var parse = /* @__PURE__ */ _parse($ZodRealError);
|
|
1986
2046
|
var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
1987
|
-
const ctx = _ctx ?
|
|
2047
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
1988
2048
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
1989
2049
|
if (result instanceof Promise)
|
|
1990
2050
|
result = await result;
|
|
@@ -2009,7 +2069,7 @@
|
|
|
2009
2069
|
};
|
|
2010
2070
|
var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
|
|
2011
2071
|
var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
2012
|
-
const ctx = _ctx ?
|
|
2072
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
2013
2073
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
2014
2074
|
if (result instanceof Promise)
|
|
2015
2075
|
result = await result;
|
|
@@ -2020,7 +2080,7 @@
|
|
|
2020
2080
|
};
|
|
2021
2081
|
var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
2022
2082
|
var _encode = (_Err) => (schema, value, _ctx) => {
|
|
2023
|
-
const ctx = _ctx ?
|
|
2083
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
2024
2084
|
return _parse(_Err)(schema, value, ctx);
|
|
2025
2085
|
};
|
|
2026
2086
|
var encode = /* @__PURE__ */ _encode($ZodRealError);
|
|
@@ -2029,7 +2089,7 @@
|
|
|
2029
2089
|
};
|
|
2030
2090
|
var decode = /* @__PURE__ */ _decode($ZodRealError);
|
|
2031
2091
|
var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
2032
|
-
const ctx = _ctx ?
|
|
2092
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
2033
2093
|
return _parseAsync(_Err)(schema, value, ctx);
|
|
2034
2094
|
};
|
|
2035
2095
|
var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
|
|
@@ -2038,7 +2098,7 @@
|
|
|
2038
2098
|
};
|
|
2039
2099
|
var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
|
|
2040
2100
|
var _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
2041
|
-
const ctx = _ctx ?
|
|
2101
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
2042
2102
|
return _safeParse(_Err)(schema, value, ctx);
|
|
2043
2103
|
};
|
|
2044
2104
|
var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
|
|
@@ -2047,7 +2107,7 @@
|
|
|
2047
2107
|
};
|
|
2048
2108
|
var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
|
|
2049
2109
|
var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
2050
|
-
const ctx = _ctx ?
|
|
2110
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
2051
2111
|
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
2052
2112
|
};
|
|
2053
2113
|
var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
|
|
@@ -2080,6 +2140,7 @@
|
|
|
2080
2140
|
hex: () => hex,
|
|
2081
2141
|
hostname: () => hostname,
|
|
2082
2142
|
html5Email: () => html5Email,
|
|
2143
|
+
httpProtocol: () => httpProtocol,
|
|
2083
2144
|
idnEmail: () => idnEmail,
|
|
2084
2145
|
integer: () => integer,
|
|
2085
2146
|
ipv4: () => ipv4,
|
|
@@ -2118,7 +2179,7 @@
|
|
|
2118
2179
|
uuid7: () => uuid7,
|
|
2119
2180
|
xid: () => xid
|
|
2120
2181
|
});
|
|
2121
|
-
var cuid = /^[cC][
|
|
2182
|
+
var cuid = /^[cC][0-9a-z]{6,}$/;
|
|
2122
2183
|
var cuid2 = /^[0-9a-z]+$/;
|
|
2123
2184
|
var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
2124
2185
|
var xid = /^[0-9a-vA-V]{20}$/;
|
|
@@ -2157,6 +2218,7 @@
|
|
|
2157
2218
|
var base64url = /^[A-Za-z0-9_-]*$/;
|
|
2158
2219
|
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
2220
|
var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
|
|
2221
|
+
var httpProtocol = /^https?$/;
|
|
2160
2222
|
var e164 = /^\+[1-9]\d{6,14}$/;
|
|
2161
2223
|
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
2224
|
var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
@@ -2215,10 +2277,10 @@
|
|
|
2215
2277
|
|
|
2216
2278
|
// node_modules/zod/v4/core/checks.js
|
|
2217
2279
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
2218
|
-
var
|
|
2280
|
+
var _a3;
|
|
2219
2281
|
inst._zod ?? (inst._zod = {});
|
|
2220
2282
|
inst._zod.def = def;
|
|
2221
|
-
(
|
|
2283
|
+
(_a3 = inst._zod).onattach ?? (_a3.onattach = []);
|
|
2222
2284
|
});
|
|
2223
2285
|
var numericOriginMap = {
|
|
2224
2286
|
number: "number",
|
|
@@ -2284,8 +2346,8 @@
|
|
|
2284
2346
|
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
2285
2347
|
$ZodCheck.init(inst, def);
|
|
2286
2348
|
inst._zod.onattach.push((inst2) => {
|
|
2287
|
-
var
|
|
2288
|
-
(
|
|
2349
|
+
var _a3;
|
|
2350
|
+
(_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
|
|
2289
2351
|
});
|
|
2290
2352
|
inst._zod.check = (payload) => {
|
|
2291
2353
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -2418,9 +2480,9 @@
|
|
|
2418
2480
|
};
|
|
2419
2481
|
});
|
|
2420
2482
|
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
2421
|
-
var
|
|
2483
|
+
var _a3;
|
|
2422
2484
|
$ZodCheck.init(inst, def);
|
|
2423
|
-
(
|
|
2485
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2424
2486
|
const val = payload.value;
|
|
2425
2487
|
return !nullish(val) && val.size !== void 0;
|
|
2426
2488
|
});
|
|
@@ -2446,9 +2508,9 @@
|
|
|
2446
2508
|
};
|
|
2447
2509
|
});
|
|
2448
2510
|
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
2449
|
-
var
|
|
2511
|
+
var _a3;
|
|
2450
2512
|
$ZodCheck.init(inst, def);
|
|
2451
|
-
(
|
|
2513
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2452
2514
|
const val = payload.value;
|
|
2453
2515
|
return !nullish(val) && val.size !== void 0;
|
|
2454
2516
|
});
|
|
@@ -2474,9 +2536,9 @@
|
|
|
2474
2536
|
};
|
|
2475
2537
|
});
|
|
2476
2538
|
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
2477
|
-
var
|
|
2539
|
+
var _a3;
|
|
2478
2540
|
$ZodCheck.init(inst, def);
|
|
2479
|
-
(
|
|
2541
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2480
2542
|
const val = payload.value;
|
|
2481
2543
|
return !nullish(val) && val.size !== void 0;
|
|
2482
2544
|
});
|
|
@@ -2504,9 +2566,9 @@
|
|
|
2504
2566
|
};
|
|
2505
2567
|
});
|
|
2506
2568
|
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
2507
|
-
var
|
|
2569
|
+
var _a3;
|
|
2508
2570
|
$ZodCheck.init(inst, def);
|
|
2509
|
-
(
|
|
2571
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2510
2572
|
const val = payload.value;
|
|
2511
2573
|
return !nullish(val) && val.length !== void 0;
|
|
2512
2574
|
});
|
|
@@ -2533,9 +2595,9 @@
|
|
|
2533
2595
|
};
|
|
2534
2596
|
});
|
|
2535
2597
|
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
2536
|
-
var
|
|
2598
|
+
var _a3;
|
|
2537
2599
|
$ZodCheck.init(inst, def);
|
|
2538
|
-
(
|
|
2600
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2539
2601
|
const val = payload.value;
|
|
2540
2602
|
return !nullish(val) && val.length !== void 0;
|
|
2541
2603
|
});
|
|
@@ -2562,9 +2624,9 @@
|
|
|
2562
2624
|
};
|
|
2563
2625
|
});
|
|
2564
2626
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
2565
|
-
var
|
|
2627
|
+
var _a3;
|
|
2566
2628
|
$ZodCheck.init(inst, def);
|
|
2567
|
-
(
|
|
2629
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2568
2630
|
const val = payload.value;
|
|
2569
2631
|
return !nullish(val) && val.length !== void 0;
|
|
2570
2632
|
});
|
|
@@ -2593,7 +2655,7 @@
|
|
|
2593
2655
|
};
|
|
2594
2656
|
});
|
|
2595
2657
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
2596
|
-
var
|
|
2658
|
+
var _a3, _b;
|
|
2597
2659
|
$ZodCheck.init(inst, def);
|
|
2598
2660
|
inst._zod.onattach.push((inst2) => {
|
|
2599
2661
|
const bag = inst2._zod.bag;
|
|
@@ -2604,7 +2666,7 @@
|
|
|
2604
2666
|
}
|
|
2605
2667
|
});
|
|
2606
2668
|
if (def.pattern)
|
|
2607
|
-
(
|
|
2669
|
+
(_a3 = inst._zod).check ?? (_a3.check = (payload) => {
|
|
2608
2670
|
def.pattern.lastIndex = 0;
|
|
2609
2671
|
if (def.pattern.test(payload.value))
|
|
2610
2672
|
return;
|
|
@@ -2800,13 +2862,13 @@
|
|
|
2800
2862
|
// node_modules/zod/v4/core/versions.js
|
|
2801
2863
|
var version = {
|
|
2802
2864
|
major: 4,
|
|
2803
|
-
minor:
|
|
2804
|
-
patch:
|
|
2865
|
+
minor: 4,
|
|
2866
|
+
patch: 1
|
|
2805
2867
|
};
|
|
2806
2868
|
|
|
2807
2869
|
// node_modules/zod/v4/core/schemas.js
|
|
2808
2870
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
2809
|
-
var
|
|
2871
|
+
var _a3;
|
|
2810
2872
|
inst ?? (inst = {});
|
|
2811
2873
|
inst._zod.def = def;
|
|
2812
2874
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -2821,7 +2883,7 @@
|
|
|
2821
2883
|
}
|
|
2822
2884
|
}
|
|
2823
2885
|
if (checks.length === 0) {
|
|
2824
|
-
(
|
|
2886
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
2825
2887
|
inst._zod.deferred?.push(() => {
|
|
2826
2888
|
inst._zod.run = inst._zod.parse;
|
|
2827
2889
|
});
|
|
@@ -2831,6 +2893,8 @@
|
|
|
2831
2893
|
let asyncResult;
|
|
2832
2894
|
for (const ch of checks2) {
|
|
2833
2895
|
if (ch._zod.def.when) {
|
|
2896
|
+
if (explicitlyAborted(payload))
|
|
2897
|
+
continue;
|
|
2834
2898
|
const shouldRun = ch._zod.def.when(payload);
|
|
2835
2899
|
if (!shouldRun)
|
|
2836
2900
|
continue;
|
|
@@ -2971,6 +3035,19 @@
|
|
|
2971
3035
|
inst._zod.check = (payload) => {
|
|
2972
3036
|
try {
|
|
2973
3037
|
const trimmed = payload.value.trim();
|
|
3038
|
+
if (!def.normalize && def.protocol?.source === httpProtocol.source) {
|
|
3039
|
+
if (!/^https?:\/\//i.test(trimmed)) {
|
|
3040
|
+
payload.issues.push({
|
|
3041
|
+
code: "invalid_format",
|
|
3042
|
+
format: "url",
|
|
3043
|
+
note: "Invalid URL format",
|
|
3044
|
+
input: payload.value,
|
|
3045
|
+
inst,
|
|
3046
|
+
continue: !def.abort
|
|
3047
|
+
});
|
|
3048
|
+
return;
|
|
3049
|
+
}
|
|
3050
|
+
}
|
|
2974
3051
|
const url2 = new URL(trimmed);
|
|
2975
3052
|
if (def.hostname) {
|
|
2976
3053
|
def.hostname.lastIndex = 0;
|
|
@@ -3124,6 +3201,8 @@
|
|
|
3124
3201
|
function isValidBase64(data) {
|
|
3125
3202
|
if (data === "")
|
|
3126
3203
|
return true;
|
|
3204
|
+
if (/\s/.test(data))
|
|
3205
|
+
return false;
|
|
3127
3206
|
if (data.length % 4 !== 0)
|
|
3128
3207
|
return false;
|
|
3129
3208
|
try {
|
|
@@ -3316,8 +3395,6 @@
|
|
|
3316
3395
|
$ZodType.init(inst, def);
|
|
3317
3396
|
inst._zod.pattern = _undefined;
|
|
3318
3397
|
inst._zod.values = /* @__PURE__ */ new Set([void 0]);
|
|
3319
|
-
inst._zod.optin = "optional";
|
|
3320
|
-
inst._zod.optout = "optional";
|
|
3321
3398
|
inst._zod.parse = (payload, _ctx) => {
|
|
3322
3399
|
const input = payload.value;
|
|
3323
3400
|
if (typeof input === "undefined")
|
|
@@ -3446,15 +3523,27 @@
|
|
|
3446
3523
|
return payload;
|
|
3447
3524
|
};
|
|
3448
3525
|
});
|
|
3449
|
-
function handlePropertyResult(result, final, key, input, isOptionalOut) {
|
|
3526
|
+
function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
|
|
3527
|
+
const isPresent = key in input;
|
|
3450
3528
|
if (result.issues.length) {
|
|
3451
|
-
if (isOptionalOut && !
|
|
3529
|
+
if (isOptionalIn && isOptionalOut && !isPresent) {
|
|
3452
3530
|
return;
|
|
3453
3531
|
}
|
|
3454
3532
|
final.issues.push(...prefixIssues(key, result.issues));
|
|
3455
3533
|
}
|
|
3534
|
+
if (!isPresent && !isOptionalIn) {
|
|
3535
|
+
if (!result.issues.length) {
|
|
3536
|
+
final.issues.push({
|
|
3537
|
+
code: "invalid_type",
|
|
3538
|
+
expected: "nonoptional",
|
|
3539
|
+
input: void 0,
|
|
3540
|
+
path: [key]
|
|
3541
|
+
});
|
|
3542
|
+
}
|
|
3543
|
+
return;
|
|
3544
|
+
}
|
|
3456
3545
|
if (result.value === void 0) {
|
|
3457
|
-
if (
|
|
3546
|
+
if (isPresent) {
|
|
3458
3547
|
final.value[key] = void 0;
|
|
3459
3548
|
}
|
|
3460
3549
|
} else {
|
|
@@ -3482,8 +3571,11 @@
|
|
|
3482
3571
|
const keySet = def.keySet;
|
|
3483
3572
|
const _catchall = def.catchall._zod;
|
|
3484
3573
|
const t = _catchall.def.type;
|
|
3574
|
+
const isOptionalIn = _catchall.optin === "optional";
|
|
3485
3575
|
const isOptionalOut = _catchall.optout === "optional";
|
|
3486
3576
|
for (const key in input) {
|
|
3577
|
+
if (key === "__proto__")
|
|
3578
|
+
continue;
|
|
3487
3579
|
if (keySet.has(key))
|
|
3488
3580
|
continue;
|
|
3489
3581
|
if (t === "never") {
|
|
@@ -3492,9 +3584,9 @@
|
|
|
3492
3584
|
}
|
|
3493
3585
|
const r = _catchall.run({ value: input[key], issues: [] }, ctx);
|
|
3494
3586
|
if (r instanceof Promise) {
|
|
3495
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
3587
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
3496
3588
|
} else {
|
|
3497
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
3589
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
3498
3590
|
}
|
|
3499
3591
|
}
|
|
3500
3592
|
if (unrecognized.length) {
|
|
@@ -3560,12 +3652,13 @@
|
|
|
3560
3652
|
const shape = value.shape;
|
|
3561
3653
|
for (const key of value.keys) {
|
|
3562
3654
|
const el = shape[key];
|
|
3655
|
+
const isOptionalIn = el._zod.optin === "optional";
|
|
3563
3656
|
const isOptionalOut = el._zod.optout === "optional";
|
|
3564
3657
|
const r = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
3565
3658
|
if (r instanceof Promise) {
|
|
3566
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
3659
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
3567
3660
|
} else {
|
|
3568
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
3661
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
3569
3662
|
}
|
|
3570
3663
|
}
|
|
3571
3664
|
if (!catchall) {
|
|
@@ -3596,9 +3689,10 @@
|
|
|
3596
3689
|
const id = ids[key];
|
|
3597
3690
|
const k = esc(key);
|
|
3598
3691
|
const schema = shape[key];
|
|
3692
|
+
const isOptionalIn = schema?._zod?.optin === "optional";
|
|
3599
3693
|
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
3600
3694
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
3601
|
-
if (isOptionalOut) {
|
|
3695
|
+
if (isOptionalIn && isOptionalOut) {
|
|
3602
3696
|
doc.write(`
|
|
3603
3697
|
if (${id}.issues.length) {
|
|
3604
3698
|
if (${k} in input) {
|
|
@@ -3617,6 +3711,33 @@
|
|
|
3617
3711
|
newResult[${k}] = ${id}.value;
|
|
3618
3712
|
}
|
|
3619
3713
|
|
|
3714
|
+
`);
|
|
3715
|
+
} else if (!isOptionalIn) {
|
|
3716
|
+
doc.write(`
|
|
3717
|
+
const ${id}_present = ${k} in input;
|
|
3718
|
+
if (${id}.issues.length) {
|
|
3719
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
3720
|
+
...iss,
|
|
3721
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
3722
|
+
})));
|
|
3723
|
+
}
|
|
3724
|
+
if (!${id}_present && !${id}.issues.length) {
|
|
3725
|
+
payload.issues.push({
|
|
3726
|
+
code: "invalid_type",
|
|
3727
|
+
expected: "nonoptional",
|
|
3728
|
+
input: undefined,
|
|
3729
|
+
path: [${k}]
|
|
3730
|
+
});
|
|
3731
|
+
}
|
|
3732
|
+
|
|
3733
|
+
if (${id}_present) {
|
|
3734
|
+
if (${id}.value === undefined) {
|
|
3735
|
+
newResult[${k}] = undefined;
|
|
3736
|
+
} else {
|
|
3737
|
+
newResult[${k}] = ${id}.value;
|
|
3738
|
+
}
|
|
3739
|
+
}
|
|
3740
|
+
|
|
3620
3741
|
`);
|
|
3621
3742
|
} else {
|
|
3622
3743
|
doc.write(`
|
|
@@ -3710,10 +3831,9 @@
|
|
|
3710
3831
|
}
|
|
3711
3832
|
return void 0;
|
|
3712
3833
|
});
|
|
3713
|
-
const
|
|
3714
|
-
const first = def.options[0]._zod.run;
|
|
3834
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
3715
3835
|
inst._zod.parse = (payload, ctx) => {
|
|
3716
|
-
if (
|
|
3836
|
+
if (first) {
|
|
3717
3837
|
return first(payload, ctx);
|
|
3718
3838
|
}
|
|
3719
3839
|
let async = false;
|
|
@@ -3766,10 +3886,9 @@
|
|
|
3766
3886
|
var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
|
|
3767
3887
|
$ZodUnion.init(inst, def);
|
|
3768
3888
|
def.inclusive = false;
|
|
3769
|
-
const
|
|
3770
|
-
const first = def.options[0]._zod.run;
|
|
3889
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
3771
3890
|
inst._zod.parse = (payload, ctx) => {
|
|
3772
|
-
if (
|
|
3891
|
+
if (first) {
|
|
3773
3892
|
return first(payload, ctx);
|
|
3774
3893
|
}
|
|
3775
3894
|
let async = false;
|
|
@@ -3844,7 +3963,7 @@
|
|
|
3844
3963
|
if (opt) {
|
|
3845
3964
|
return opt._zod.run(payload, ctx);
|
|
3846
3965
|
}
|
|
3847
|
-
if (def.unionFallback) {
|
|
3966
|
+
if (def.unionFallback || ctx.direction === "backward") {
|
|
3848
3967
|
return _super(payload, ctx);
|
|
3849
3968
|
}
|
|
3850
3969
|
payload.issues.push({
|
|
@@ -3852,6 +3971,7 @@
|
|
|
3852
3971
|
errors: [],
|
|
3853
3972
|
note: "No matching discriminator",
|
|
3854
3973
|
discriminator: def.discriminator,
|
|
3974
|
+
options: Array.from(disc.value.keys()),
|
|
3855
3975
|
input,
|
|
3856
3976
|
path: [def.discriminator],
|
|
3857
3977
|
inst
|
|
@@ -3973,64 +4093,96 @@
|
|
|
3973
4093
|
}
|
|
3974
4094
|
payload.value = [];
|
|
3975
4095
|
const proms = [];
|
|
3976
|
-
const
|
|
3977
|
-
const
|
|
4096
|
+
const optinStart = getTupleOptStart(items, "optin");
|
|
4097
|
+
const optoutStart = getTupleOptStart(items, "optout");
|
|
3978
4098
|
if (!def.rest) {
|
|
3979
|
-
|
|
3980
|
-
const tooSmall = input.length < optStart - 1;
|
|
3981
|
-
if (tooBig || tooSmall) {
|
|
4099
|
+
if (input.length < optinStart) {
|
|
3982
4100
|
payload.issues.push({
|
|
3983
|
-
|
|
4101
|
+
code: "too_small",
|
|
4102
|
+
minimum: optinStart,
|
|
4103
|
+
inclusive: true,
|
|
3984
4104
|
input,
|
|
3985
4105
|
inst,
|
|
3986
4106
|
origin: "array"
|
|
3987
4107
|
});
|
|
3988
4108
|
return payload;
|
|
3989
4109
|
}
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
4110
|
+
if (input.length > items.length) {
|
|
4111
|
+
payload.issues.push({
|
|
4112
|
+
code: "too_big",
|
|
4113
|
+
maximum: items.length,
|
|
4114
|
+
inclusive: true,
|
|
4115
|
+
input,
|
|
4116
|
+
inst,
|
|
4117
|
+
origin: "array"
|
|
4118
|
+
});
|
|
3997
4119
|
}
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
}, ctx);
|
|
4002
|
-
if (
|
|
4003
|
-
proms.push(
|
|
4120
|
+
}
|
|
4121
|
+
const itemResults = new Array(items.length);
|
|
4122
|
+
for (let i = 0; i < items.length; i++) {
|
|
4123
|
+
const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
|
|
4124
|
+
if (r instanceof Promise) {
|
|
4125
|
+
proms.push(r.then((rr) => {
|
|
4126
|
+
itemResults[i] = rr;
|
|
4127
|
+
}));
|
|
4004
4128
|
} else {
|
|
4005
|
-
|
|
4129
|
+
itemResults[i] = r;
|
|
4006
4130
|
}
|
|
4007
4131
|
}
|
|
4008
4132
|
if (def.rest) {
|
|
4133
|
+
let i = items.length - 1;
|
|
4009
4134
|
const rest2 = input.slice(items.length);
|
|
4010
4135
|
for (const el of rest2) {
|
|
4011
4136
|
i++;
|
|
4012
|
-
const result = def.rest._zod.run({
|
|
4013
|
-
value: el,
|
|
4014
|
-
issues: []
|
|
4015
|
-
}, ctx);
|
|
4137
|
+
const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
|
|
4016
4138
|
if (result instanceof Promise) {
|
|
4017
|
-
proms.push(result.then((
|
|
4139
|
+
proms.push(result.then((r) => handleTupleResult(r, payload, i)));
|
|
4018
4140
|
} else {
|
|
4019
4141
|
handleTupleResult(result, payload, i);
|
|
4020
4142
|
}
|
|
4021
4143
|
}
|
|
4022
4144
|
}
|
|
4023
|
-
if (proms.length)
|
|
4024
|
-
return Promise.all(proms).then(() => payload);
|
|
4025
|
-
|
|
4145
|
+
if (proms.length) {
|
|
4146
|
+
return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
|
|
4147
|
+
}
|
|
4148
|
+
return handleTupleResults(itemResults, payload, items, input, optoutStart);
|
|
4026
4149
|
};
|
|
4027
4150
|
});
|
|
4151
|
+
function getTupleOptStart(items, key) {
|
|
4152
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
4153
|
+
if (items[i]._zod[key] !== "optional")
|
|
4154
|
+
return i + 1;
|
|
4155
|
+
}
|
|
4156
|
+
return 0;
|
|
4157
|
+
}
|
|
4028
4158
|
function handleTupleResult(result, final, index) {
|
|
4029
4159
|
if (result.issues.length) {
|
|
4030
4160
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
4031
4161
|
}
|
|
4032
4162
|
final.value[index] = result.value;
|
|
4033
4163
|
}
|
|
4164
|
+
function handleTupleResults(itemResults, final, items, input, optoutStart) {
|
|
4165
|
+
for (let i = 0; i < items.length; i++) {
|
|
4166
|
+
const r = itemResults[i];
|
|
4167
|
+
const isPresent = i < input.length;
|
|
4168
|
+
if (r.issues.length) {
|
|
4169
|
+
if (!isPresent && i >= optoutStart) {
|
|
4170
|
+
final.value.length = i;
|
|
4171
|
+
break;
|
|
4172
|
+
}
|
|
4173
|
+
final.issues.push(...prefixIssues(i, r.issues));
|
|
4174
|
+
}
|
|
4175
|
+
final.value[i] = r.value;
|
|
4176
|
+
}
|
|
4177
|
+
for (let i = final.value.length - 1; i >= input.length; i--) {
|
|
4178
|
+
if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
|
|
4179
|
+
final.value.length = i;
|
|
4180
|
+
} else {
|
|
4181
|
+
break;
|
|
4182
|
+
}
|
|
4183
|
+
}
|
|
4184
|
+
return final;
|
|
4185
|
+
}
|
|
4034
4186
|
var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
4035
4187
|
$ZodType.init(inst, def);
|
|
4036
4188
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -4052,19 +4204,35 @@
|
|
|
4052
4204
|
for (const key of values) {
|
|
4053
4205
|
if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
4054
4206
|
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
4207
|
+
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
4208
|
+
if (keyResult instanceof Promise) {
|
|
4209
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
4210
|
+
}
|
|
4211
|
+
if (keyResult.issues.length) {
|
|
4212
|
+
payload.issues.push({
|
|
4213
|
+
code: "invalid_key",
|
|
4214
|
+
origin: "record",
|
|
4215
|
+
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
4216
|
+
input: key,
|
|
4217
|
+
path: [key],
|
|
4218
|
+
inst
|
|
4219
|
+
});
|
|
4220
|
+
continue;
|
|
4221
|
+
}
|
|
4222
|
+
const outKey = keyResult.value;
|
|
4055
4223
|
const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
|
|
4056
4224
|
if (result instanceof Promise) {
|
|
4057
4225
|
proms.push(result.then((result2) => {
|
|
4058
4226
|
if (result2.issues.length) {
|
|
4059
4227
|
payload.issues.push(...prefixIssues(key, result2.issues));
|
|
4060
4228
|
}
|
|
4061
|
-
payload.value[
|
|
4229
|
+
payload.value[outKey] = result2.value;
|
|
4062
4230
|
}));
|
|
4063
4231
|
} else {
|
|
4064
4232
|
if (result.issues.length) {
|
|
4065
4233
|
payload.issues.push(...prefixIssues(key, result.issues));
|
|
4066
4234
|
}
|
|
4067
|
-
payload.value[
|
|
4235
|
+
payload.value[outKey] = result.value;
|
|
4068
4236
|
}
|
|
4069
4237
|
}
|
|
4070
4238
|
}
|
|
@@ -4088,6 +4256,8 @@
|
|
|
4088
4256
|
for (const key of Reflect.ownKeys(input)) {
|
|
4089
4257
|
if (key === "__proto__")
|
|
4090
4258
|
continue;
|
|
4259
|
+
if (!Object.prototype.propertyIsEnumerable.call(input, key))
|
|
4260
|
+
continue;
|
|
4091
4261
|
let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
4092
4262
|
if (keyResult instanceof Promise) {
|
|
4093
4263
|
throw new Error("Async schemas not supported in object keys currently");
|
|
@@ -4731,7 +4901,12 @@
|
|
|
4731
4901
|
});
|
|
4732
4902
|
var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
4733
4903
|
$ZodType.init(inst, def);
|
|
4734
|
-
defineLazy(inst._zod, "innerType", () =>
|
|
4904
|
+
defineLazy(inst._zod, "innerType", () => {
|
|
4905
|
+
const d = def;
|
|
4906
|
+
if (!d._cachedInner)
|
|
4907
|
+
d._cachedInner = def.getter();
|
|
4908
|
+
return d._cachedInner;
|
|
4909
|
+
});
|
|
4735
4910
|
defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
|
|
4736
4911
|
defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
|
|
4737
4912
|
defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
|
|
@@ -4786,6 +4961,7 @@
|
|
|
4786
4961
|
cs: () => cs_default,
|
|
4787
4962
|
da: () => da_default,
|
|
4788
4963
|
de: () => de_default,
|
|
4964
|
+
el: () => el_default,
|
|
4789
4965
|
en: () => en_default,
|
|
4790
4966
|
eo: () => eo_default,
|
|
4791
4967
|
es: () => es_default,
|
|
@@ -4794,6 +4970,7 @@
|
|
|
4794
4970
|
fr: () => fr_default,
|
|
4795
4971
|
frCA: () => fr_CA_default,
|
|
4796
4972
|
he: () => he_default,
|
|
4973
|
+
hr: () => hr_default,
|
|
4797
4974
|
hu: () => hu_default,
|
|
4798
4975
|
hy: () => hy_default,
|
|
4799
4976
|
id: () => id_default,
|
|
@@ -4813,6 +4990,7 @@
|
|
|
4813
4990
|
pl: () => pl_default,
|
|
4814
4991
|
ps: () => ps_default,
|
|
4815
4992
|
pt: () => pt_default,
|
|
4993
|
+
ro: () => ro_default,
|
|
4816
4994
|
ru: () => ru_default,
|
|
4817
4995
|
sl: () => sl_default,
|
|
4818
4996
|
sv: () => sv_default,
|
|
@@ -5766,8 +5944,118 @@
|
|
|
5766
5944
|
};
|
|
5767
5945
|
}
|
|
5768
5946
|
|
|
5769
|
-
// node_modules/zod/v4/locales/
|
|
5947
|
+
// node_modules/zod/v4/locales/el.js
|
|
5770
5948
|
var error9 = () => {
|
|
5949
|
+
const Sizable = {
|
|
5950
|
+
string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5951
|
+
file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5952
|
+
array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5953
|
+
set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5954
|
+
map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
|
|
5955
|
+
};
|
|
5956
|
+
function getSizing(origin) {
|
|
5957
|
+
return Sizable[origin] ?? null;
|
|
5958
|
+
}
|
|
5959
|
+
const FormatDictionary = {
|
|
5960
|
+
regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
|
|
5961
|
+
email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
|
|
5962
|
+
url: "URL",
|
|
5963
|
+
emoji: "emoji",
|
|
5964
|
+
uuid: "UUID",
|
|
5965
|
+
uuidv4: "UUIDv4",
|
|
5966
|
+
uuidv6: "UUIDv6",
|
|
5967
|
+
nanoid: "nanoid",
|
|
5968
|
+
guid: "GUID",
|
|
5969
|
+
cuid: "cuid",
|
|
5970
|
+
cuid2: "cuid2",
|
|
5971
|
+
ulid: "ULID",
|
|
5972
|
+
xid: "XID",
|
|
5973
|
+
ksuid: "KSUID",
|
|
5974
|
+
datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
|
|
5975
|
+
date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
|
|
5976
|
+
time: "ISO \u03CE\u03C1\u03B1",
|
|
5977
|
+
duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
|
|
5978
|
+
ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
|
|
5979
|
+
ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
|
|
5980
|
+
mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
|
|
5981
|
+
cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
|
|
5982
|
+
cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
|
|
5983
|
+
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",
|
|
5984
|
+
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",
|
|
5985
|
+
json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
|
|
5986
|
+
e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
|
|
5987
|
+
jwt: "JWT",
|
|
5988
|
+
template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
|
|
5989
|
+
};
|
|
5990
|
+
const TypeDictionary = {
|
|
5991
|
+
nan: "NaN"
|
|
5992
|
+
};
|
|
5993
|
+
return (issue2) => {
|
|
5994
|
+
switch (issue2.code) {
|
|
5995
|
+
case "invalid_type": {
|
|
5996
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
5997
|
+
const receivedType = parsedType(issue2.input);
|
|
5998
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
5999
|
+
if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
|
|
6000
|
+
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}`;
|
|
6001
|
+
}
|
|
6002
|
+
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}`;
|
|
6003
|
+
}
|
|
6004
|
+
case "invalid_value":
|
|
6005
|
+
if (issue2.values.length === 1)
|
|
6006
|
+
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])}`;
|
|
6007
|
+
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, "|")}`;
|
|
6008
|
+
case "too_big": {
|
|
6009
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
6010
|
+
const sizing = getSizing(issue2.origin);
|
|
6011
|
+
if (sizing)
|
|
6012
|
+
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"}`;
|
|
6013
|
+
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()}`;
|
|
6014
|
+
}
|
|
6015
|
+
case "too_small": {
|
|
6016
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
6017
|
+
const sizing = getSizing(issue2.origin);
|
|
6018
|
+
if (sizing) {
|
|
6019
|
+
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}`;
|
|
6020
|
+
}
|
|
6021
|
+
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()}`;
|
|
6022
|
+
}
|
|
6023
|
+
case "invalid_format": {
|
|
6024
|
+
const _issue = issue2;
|
|
6025
|
+
if (_issue.format === "starts_with") {
|
|
6026
|
+
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}"`;
|
|
6027
|
+
}
|
|
6028
|
+
if (_issue.format === "ends_with")
|
|
6029
|
+
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}"`;
|
|
6030
|
+
if (_issue.format === "includes")
|
|
6031
|
+
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}"`;
|
|
6032
|
+
if (_issue.format === "regex")
|
|
6033
|
+
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}`;
|
|
6034
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
6035
|
+
}
|
|
6036
|
+
case "not_multiple_of":
|
|
6037
|
+
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}`;
|
|
6038
|
+
case "unrecognized_keys":
|
|
6039
|
+
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, ", ")}`;
|
|
6040
|
+
case "invalid_key":
|
|
6041
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
6042
|
+
case "invalid_union":
|
|
6043
|
+
return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
|
|
6044
|
+
case "invalid_element":
|
|
6045
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
6046
|
+
default:
|
|
6047
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
|
|
6048
|
+
}
|
|
6049
|
+
};
|
|
6050
|
+
};
|
|
6051
|
+
function el_default() {
|
|
6052
|
+
return {
|
|
6053
|
+
localeError: error9()
|
|
6054
|
+
};
|
|
6055
|
+
}
|
|
6056
|
+
|
|
6057
|
+
// node_modules/zod/v4/locales/en.js
|
|
6058
|
+
var error10 = () => {
|
|
5771
6059
|
const Sizable = {
|
|
5772
6060
|
string: { unit: "characters", verb: "to have" },
|
|
5773
6061
|
file: { unit: "bytes", verb: "to have" },
|
|
@@ -5861,6 +6149,10 @@
|
|
|
5861
6149
|
case "invalid_key":
|
|
5862
6150
|
return `Invalid key in ${issue2.origin}`;
|
|
5863
6151
|
case "invalid_union":
|
|
6152
|
+
if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
|
|
6153
|
+
const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
|
|
6154
|
+
return `Invalid discriminator value. Expected ${opts}`;
|
|
6155
|
+
}
|
|
5864
6156
|
return "Invalid input";
|
|
5865
6157
|
case "invalid_element":
|
|
5866
6158
|
return `Invalid value in ${issue2.origin}`;
|
|
@@ -5871,12 +6163,12 @@
|
|
|
5871
6163
|
};
|
|
5872
6164
|
function en_default() {
|
|
5873
6165
|
return {
|
|
5874
|
-
localeError:
|
|
6166
|
+
localeError: error10()
|
|
5875
6167
|
};
|
|
5876
6168
|
}
|
|
5877
6169
|
|
|
5878
6170
|
// node_modules/zod/v4/locales/eo.js
|
|
5879
|
-
var
|
|
6171
|
+
var error11 = () => {
|
|
5880
6172
|
const Sizable = {
|
|
5881
6173
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
5882
6174
|
file: { unit: "bajtojn", verb: "havi" },
|
|
@@ -5981,12 +6273,12 @@
|
|
|
5981
6273
|
};
|
|
5982
6274
|
function eo_default() {
|
|
5983
6275
|
return {
|
|
5984
|
-
localeError:
|
|
6276
|
+
localeError: error11()
|
|
5985
6277
|
};
|
|
5986
6278
|
}
|
|
5987
6279
|
|
|
5988
6280
|
// node_modules/zod/v4/locales/es.js
|
|
5989
|
-
var
|
|
6281
|
+
var error12 = () => {
|
|
5990
6282
|
const Sizable = {
|
|
5991
6283
|
string: { unit: "caracteres", verb: "tener" },
|
|
5992
6284
|
file: { unit: "bytes", verb: "tener" },
|
|
@@ -6114,12 +6406,12 @@
|
|
|
6114
6406
|
};
|
|
6115
6407
|
function es_default() {
|
|
6116
6408
|
return {
|
|
6117
|
-
localeError:
|
|
6409
|
+
localeError: error12()
|
|
6118
6410
|
};
|
|
6119
6411
|
}
|
|
6120
6412
|
|
|
6121
6413
|
// node_modules/zod/v4/locales/fa.js
|
|
6122
|
-
var
|
|
6414
|
+
var error13 = () => {
|
|
6123
6415
|
const Sizable = {
|
|
6124
6416
|
string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
6125
6417
|
file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
@@ -6229,12 +6521,12 @@
|
|
|
6229
6521
|
};
|
|
6230
6522
|
function fa_default() {
|
|
6231
6523
|
return {
|
|
6232
|
-
localeError:
|
|
6524
|
+
localeError: error13()
|
|
6233
6525
|
};
|
|
6234
6526
|
}
|
|
6235
6527
|
|
|
6236
6528
|
// node_modules/zod/v4/locales/fi.js
|
|
6237
|
-
var
|
|
6529
|
+
var error14 = () => {
|
|
6238
6530
|
const Sizable = {
|
|
6239
6531
|
string: { unit: "merkki\xE4", subject: "merkkijonon" },
|
|
6240
6532
|
file: { unit: "tavua", subject: "tiedoston" },
|
|
@@ -6342,12 +6634,12 @@
|
|
|
6342
6634
|
};
|
|
6343
6635
|
function fi_default() {
|
|
6344
6636
|
return {
|
|
6345
|
-
localeError:
|
|
6637
|
+
localeError: error14()
|
|
6346
6638
|
};
|
|
6347
6639
|
}
|
|
6348
6640
|
|
|
6349
6641
|
// node_modules/zod/v4/locales/fr.js
|
|
6350
|
-
var
|
|
6642
|
+
var error15 = () => {
|
|
6351
6643
|
const Sizable = {
|
|
6352
6644
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
6353
6645
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -6388,9 +6680,27 @@
|
|
|
6388
6680
|
template_literal: "entr\xE9e"
|
|
6389
6681
|
};
|
|
6390
6682
|
const TypeDictionary = {
|
|
6391
|
-
|
|
6683
|
+
string: "cha\xEEne",
|
|
6392
6684
|
number: "nombre",
|
|
6393
|
-
|
|
6685
|
+
int: "entier",
|
|
6686
|
+
boolean: "bool\xE9en",
|
|
6687
|
+
bigint: "grand entier",
|
|
6688
|
+
symbol: "symbole",
|
|
6689
|
+
undefined: "ind\xE9fini",
|
|
6690
|
+
null: "null",
|
|
6691
|
+
never: "jamais",
|
|
6692
|
+
void: "vide",
|
|
6693
|
+
date: "date",
|
|
6694
|
+
array: "tableau",
|
|
6695
|
+
object: "objet",
|
|
6696
|
+
tuple: "tuple",
|
|
6697
|
+
record: "enregistrement",
|
|
6698
|
+
map: "carte",
|
|
6699
|
+
set: "ensemble",
|
|
6700
|
+
file: "fichier",
|
|
6701
|
+
nonoptional: "non-optionnel",
|
|
6702
|
+
nan: "NaN",
|
|
6703
|
+
function: "fonction"
|
|
6394
6704
|
};
|
|
6395
6705
|
return (issue2) => {
|
|
6396
6706
|
switch (issue2.code) {
|
|
@@ -6411,16 +6721,15 @@
|
|
|
6411
6721
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
6412
6722
|
const sizing = getSizing(issue2.origin);
|
|
6413
6723
|
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()}`;
|
|
6724
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
6725
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
6416
6726
|
}
|
|
6417
6727
|
case "too_small": {
|
|
6418
6728
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
6419
6729
|
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()}`;
|
|
6730
|
+
if (sizing)
|
|
6731
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
6732
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
6424
6733
|
}
|
|
6425
6734
|
case "invalid_format": {
|
|
6426
6735
|
const _issue = issue2;
|
|
@@ -6451,12 +6760,12 @@
|
|
|
6451
6760
|
};
|
|
6452
6761
|
function fr_default() {
|
|
6453
6762
|
return {
|
|
6454
|
-
localeError:
|
|
6763
|
+
localeError: error15()
|
|
6455
6764
|
};
|
|
6456
6765
|
}
|
|
6457
6766
|
|
|
6458
6767
|
// node_modules/zod/v4/locales/fr-CA.js
|
|
6459
|
-
var
|
|
6768
|
+
var error16 = () => {
|
|
6460
6769
|
const Sizable = {
|
|
6461
6770
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
6462
6771
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -6559,12 +6868,12 @@
|
|
|
6559
6868
|
};
|
|
6560
6869
|
function fr_CA_default() {
|
|
6561
6870
|
return {
|
|
6562
|
-
localeError:
|
|
6871
|
+
localeError: error16()
|
|
6563
6872
|
};
|
|
6564
6873
|
}
|
|
6565
6874
|
|
|
6566
6875
|
// node_modules/zod/v4/locales/he.js
|
|
6567
|
-
var
|
|
6876
|
+
var error17 = () => {
|
|
6568
6877
|
const TypeNames = {
|
|
6569
6878
|
string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
|
|
6570
6879
|
number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
|
|
@@ -6754,24 +7063,24 @@
|
|
|
6754
7063
|
};
|
|
6755
7064
|
function he_default() {
|
|
6756
7065
|
return {
|
|
6757
|
-
localeError:
|
|
7066
|
+
localeError: error17()
|
|
6758
7067
|
};
|
|
6759
7068
|
}
|
|
6760
7069
|
|
|
6761
|
-
// node_modules/zod/v4/locales/
|
|
6762
|
-
var
|
|
7070
|
+
// node_modules/zod/v4/locales/hr.js
|
|
7071
|
+
var error18 = () => {
|
|
6763
7072
|
const Sizable = {
|
|
6764
|
-
string: { unit: "
|
|
6765
|
-
file: { unit: "
|
|
6766
|
-
array: { unit: "
|
|
6767
|
-
set: { unit: "
|
|
7073
|
+
string: { unit: "znakova", verb: "imati" },
|
|
7074
|
+
file: { unit: "bajtova", verb: "imati" },
|
|
7075
|
+
array: { unit: "stavki", verb: "imati" },
|
|
7076
|
+
set: { unit: "stavki", verb: "imati" }
|
|
6768
7077
|
};
|
|
6769
7078
|
function getSizing(origin) {
|
|
6770
7079
|
return Sizable[origin] ?? null;
|
|
6771
7080
|
}
|
|
6772
7081
|
const FormatDictionary = {
|
|
6773
|
-
regex: "
|
|
6774
|
-
email: "email
|
|
7082
|
+
regex: "unos",
|
|
7083
|
+
email: "email adresa",
|
|
6775
7084
|
url: "URL",
|
|
6776
7085
|
emoji: "emoji",
|
|
6777
7086
|
uuid: "UUID",
|
|
@@ -6784,25 +7093,148 @@
|
|
|
6784
7093
|
ulid: "ULID",
|
|
6785
7094
|
xid: "XID",
|
|
6786
7095
|
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
|
|
7096
|
+
datetime: "ISO datum i vrijeme",
|
|
7097
|
+
date: "ISO datum",
|
|
7098
|
+
time: "ISO vrijeme",
|
|
7099
|
+
duration: "ISO trajanje",
|
|
7100
|
+
ipv4: "IPv4 adresa",
|
|
7101
|
+
ipv6: "IPv6 adresa",
|
|
7102
|
+
cidrv4: "IPv4 raspon",
|
|
7103
|
+
cidrv6: "IPv6 raspon",
|
|
7104
|
+
base64: "base64 kodirani tekst",
|
|
7105
|
+
base64url: "base64url kodirani tekst",
|
|
7106
|
+
json_string: "JSON tekst",
|
|
7107
|
+
e164: "E.164 broj",
|
|
6799
7108
|
jwt: "JWT",
|
|
6800
|
-
template_literal: "
|
|
7109
|
+
template_literal: "unos"
|
|
6801
7110
|
};
|
|
6802
7111
|
const TypeDictionary = {
|
|
6803
7112
|
nan: "NaN",
|
|
6804
|
-
|
|
6805
|
-
|
|
7113
|
+
string: "tekst",
|
|
7114
|
+
number: "broj",
|
|
7115
|
+
boolean: "boolean",
|
|
7116
|
+
array: "niz",
|
|
7117
|
+
object: "objekt",
|
|
7118
|
+
set: "skup",
|
|
7119
|
+
file: "datoteka",
|
|
7120
|
+
date: "datum",
|
|
7121
|
+
bigint: "bigint",
|
|
7122
|
+
symbol: "simbol",
|
|
7123
|
+
undefined: "undefined",
|
|
7124
|
+
null: "null",
|
|
7125
|
+
function: "funkcija",
|
|
7126
|
+
map: "mapa"
|
|
7127
|
+
};
|
|
7128
|
+
return (issue2) => {
|
|
7129
|
+
switch (issue2.code) {
|
|
7130
|
+
case "invalid_type": {
|
|
7131
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
7132
|
+
const receivedType = parsedType(issue2.input);
|
|
7133
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
7134
|
+
if (/^[A-Z]/.test(issue2.expected)) {
|
|
7135
|
+
return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
|
|
7136
|
+
}
|
|
7137
|
+
return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
|
|
7138
|
+
}
|
|
7139
|
+
case "invalid_value":
|
|
7140
|
+
if (issue2.values.length === 1)
|
|
7141
|
+
return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
|
|
7142
|
+
return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
|
|
7143
|
+
case "too_big": {
|
|
7144
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
7145
|
+
const sizing = getSizing(issue2.origin);
|
|
7146
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
7147
|
+
if (sizing)
|
|
7148
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
|
|
7149
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
|
|
7150
|
+
}
|
|
7151
|
+
case "too_small": {
|
|
7152
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
7153
|
+
const sizing = getSizing(issue2.origin);
|
|
7154
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
7155
|
+
if (sizing) {
|
|
7156
|
+
return `Premalo: o\u010Dekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
7157
|
+
}
|
|
7158
|
+
return `Premalo: o\u010Dekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
|
|
7159
|
+
}
|
|
7160
|
+
case "invalid_format": {
|
|
7161
|
+
const _issue = issue2;
|
|
7162
|
+
if (_issue.format === "starts_with")
|
|
7163
|
+
return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
|
|
7164
|
+
if (_issue.format === "ends_with")
|
|
7165
|
+
return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
|
|
7166
|
+
if (_issue.format === "includes")
|
|
7167
|
+
return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
|
|
7168
|
+
if (_issue.format === "regex")
|
|
7169
|
+
return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
|
|
7170
|
+
return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
7171
|
+
}
|
|
7172
|
+
case "not_multiple_of":
|
|
7173
|
+
return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
|
|
7174
|
+
case "unrecognized_keys":
|
|
7175
|
+
return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
|
|
7176
|
+
case "invalid_key":
|
|
7177
|
+
return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
7178
|
+
case "invalid_union":
|
|
7179
|
+
return "Neispravan unos";
|
|
7180
|
+
case "invalid_element":
|
|
7181
|
+
return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
7182
|
+
default:
|
|
7183
|
+
return `Neispravan unos`;
|
|
7184
|
+
}
|
|
7185
|
+
};
|
|
7186
|
+
};
|
|
7187
|
+
function hr_default() {
|
|
7188
|
+
return {
|
|
7189
|
+
localeError: error18()
|
|
7190
|
+
};
|
|
7191
|
+
}
|
|
7192
|
+
|
|
7193
|
+
// node_modules/zod/v4/locales/hu.js
|
|
7194
|
+
var error19 = () => {
|
|
7195
|
+
const Sizable = {
|
|
7196
|
+
string: { unit: "karakter", verb: "legyen" },
|
|
7197
|
+
file: { unit: "byte", verb: "legyen" },
|
|
7198
|
+
array: { unit: "elem", verb: "legyen" },
|
|
7199
|
+
set: { unit: "elem", verb: "legyen" }
|
|
7200
|
+
};
|
|
7201
|
+
function getSizing(origin) {
|
|
7202
|
+
return Sizable[origin] ?? null;
|
|
7203
|
+
}
|
|
7204
|
+
const FormatDictionary = {
|
|
7205
|
+
regex: "bemenet",
|
|
7206
|
+
email: "email c\xEDm",
|
|
7207
|
+
url: "URL",
|
|
7208
|
+
emoji: "emoji",
|
|
7209
|
+
uuid: "UUID",
|
|
7210
|
+
uuidv4: "UUIDv4",
|
|
7211
|
+
uuidv6: "UUIDv6",
|
|
7212
|
+
nanoid: "nanoid",
|
|
7213
|
+
guid: "GUID",
|
|
7214
|
+
cuid: "cuid",
|
|
7215
|
+
cuid2: "cuid2",
|
|
7216
|
+
ulid: "ULID",
|
|
7217
|
+
xid: "XID",
|
|
7218
|
+
ksuid: "KSUID",
|
|
7219
|
+
datetime: "ISO id\u0151b\xE9lyeg",
|
|
7220
|
+
date: "ISO d\xE1tum",
|
|
7221
|
+
time: "ISO id\u0151",
|
|
7222
|
+
duration: "ISO id\u0151intervallum",
|
|
7223
|
+
ipv4: "IPv4 c\xEDm",
|
|
7224
|
+
ipv6: "IPv6 c\xEDm",
|
|
7225
|
+
cidrv4: "IPv4 tartom\xE1ny",
|
|
7226
|
+
cidrv6: "IPv6 tartom\xE1ny",
|
|
7227
|
+
base64: "base64-k\xF3dolt string",
|
|
7228
|
+
base64url: "base64url-k\xF3dolt string",
|
|
7229
|
+
json_string: "JSON string",
|
|
7230
|
+
e164: "E.164 sz\xE1m",
|
|
7231
|
+
jwt: "JWT",
|
|
7232
|
+
template_literal: "bemenet"
|
|
7233
|
+
};
|
|
7234
|
+
const TypeDictionary = {
|
|
7235
|
+
nan: "NaN",
|
|
7236
|
+
number: "sz\xE1m",
|
|
7237
|
+
array: "t\xF6mb"
|
|
6806
7238
|
};
|
|
6807
7239
|
return (issue2) => {
|
|
6808
7240
|
switch (issue2.code) {
|
|
@@ -6863,7 +7295,7 @@
|
|
|
6863
7295
|
};
|
|
6864
7296
|
function hu_default() {
|
|
6865
7297
|
return {
|
|
6866
|
-
localeError:
|
|
7298
|
+
localeError: error19()
|
|
6867
7299
|
};
|
|
6868
7300
|
}
|
|
6869
7301
|
|
|
@@ -6878,7 +7310,7 @@
|
|
|
6878
7310
|
const lastChar = word[word.length - 1];
|
|
6879
7311
|
return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568");
|
|
6880
7312
|
}
|
|
6881
|
-
var
|
|
7313
|
+
var error20 = () => {
|
|
6882
7314
|
const Sizable = {
|
|
6883
7315
|
string: {
|
|
6884
7316
|
unit: {
|
|
@@ -7011,12 +7443,12 @@
|
|
|
7011
7443
|
};
|
|
7012
7444
|
function hy_default() {
|
|
7013
7445
|
return {
|
|
7014
|
-
localeError:
|
|
7446
|
+
localeError: error20()
|
|
7015
7447
|
};
|
|
7016
7448
|
}
|
|
7017
7449
|
|
|
7018
7450
|
// node_modules/zod/v4/locales/id.js
|
|
7019
|
-
var
|
|
7451
|
+
var error21 = () => {
|
|
7020
7452
|
const Sizable = {
|
|
7021
7453
|
string: { unit: "karakter", verb: "memiliki" },
|
|
7022
7454
|
file: { unit: "byte", verb: "memiliki" },
|
|
@@ -7118,12 +7550,12 @@
|
|
|
7118
7550
|
};
|
|
7119
7551
|
function id_default() {
|
|
7120
7552
|
return {
|
|
7121
|
-
localeError:
|
|
7553
|
+
localeError: error21()
|
|
7122
7554
|
};
|
|
7123
7555
|
}
|
|
7124
7556
|
|
|
7125
7557
|
// node_modules/zod/v4/locales/is.js
|
|
7126
|
-
var
|
|
7558
|
+
var error22 = () => {
|
|
7127
7559
|
const Sizable = {
|
|
7128
7560
|
string: { unit: "stafi", verb: "a\xF0 hafa" },
|
|
7129
7561
|
file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
|
|
@@ -7228,12 +7660,12 @@
|
|
|
7228
7660
|
};
|
|
7229
7661
|
function is_default() {
|
|
7230
7662
|
return {
|
|
7231
|
-
localeError:
|
|
7663
|
+
localeError: error22()
|
|
7232
7664
|
};
|
|
7233
7665
|
}
|
|
7234
7666
|
|
|
7235
7667
|
// node_modules/zod/v4/locales/it.js
|
|
7236
|
-
var
|
|
7668
|
+
var error23 = () => {
|
|
7237
7669
|
const Sizable = {
|
|
7238
7670
|
string: { unit: "caratteri", verb: "avere" },
|
|
7239
7671
|
file: { unit: "byte", verb: "avere" },
|
|
@@ -7318,7 +7750,7 @@
|
|
|
7318
7750
|
return `Stringa non valida: deve includere "${_issue.includes}"`;
|
|
7319
7751
|
if (_issue.format === "regex")
|
|
7320
7752
|
return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
|
|
7321
|
-
return `
|
|
7753
|
+
return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
7322
7754
|
}
|
|
7323
7755
|
case "not_multiple_of":
|
|
7324
7756
|
return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
|
|
@@ -7337,12 +7769,12 @@
|
|
|
7337
7769
|
};
|
|
7338
7770
|
function it_default() {
|
|
7339
7771
|
return {
|
|
7340
|
-
localeError:
|
|
7772
|
+
localeError: error23()
|
|
7341
7773
|
};
|
|
7342
7774
|
}
|
|
7343
7775
|
|
|
7344
7776
|
// node_modules/zod/v4/locales/ja.js
|
|
7345
|
-
var
|
|
7777
|
+
var error24 = () => {
|
|
7346
7778
|
const Sizable = {
|
|
7347
7779
|
string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
|
|
7348
7780
|
file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
|
|
@@ -7445,12 +7877,12 @@
|
|
|
7445
7877
|
};
|
|
7446
7878
|
function ja_default() {
|
|
7447
7879
|
return {
|
|
7448
|
-
localeError:
|
|
7880
|
+
localeError: error24()
|
|
7449
7881
|
};
|
|
7450
7882
|
}
|
|
7451
7883
|
|
|
7452
7884
|
// node_modules/zod/v4/locales/ka.js
|
|
7453
|
-
var
|
|
7885
|
+
var error25 = () => {
|
|
7454
7886
|
const Sizable = {
|
|
7455
7887
|
string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
7456
7888
|
file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
@@ -7483,9 +7915,9 @@
|
|
|
7483
7915
|
ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
|
|
7484
7916
|
cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
7485
7917
|
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 \
|
|
7918
|
+
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
7919
|
+
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
7920
|
+
json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
|
|
7489
7921
|
e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
|
|
7490
7922
|
jwt: "JWT",
|
|
7491
7923
|
template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
|
|
@@ -7493,7 +7925,7 @@
|
|
|
7493
7925
|
const TypeDictionary = {
|
|
7494
7926
|
nan: "NaN",
|
|
7495
7927
|
number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
|
|
7496
|
-
string: "\
|
|
7928
|
+
string: "\u10D5\u10D4\u10DA\u10D8",
|
|
7497
7929
|
boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
|
|
7498
7930
|
function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
|
|
7499
7931
|
array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
|
|
@@ -7531,14 +7963,14 @@
|
|
|
7531
7963
|
case "invalid_format": {
|
|
7532
7964
|
const _issue = issue2;
|
|
7533
7965
|
if (_issue.format === "starts_with") {
|
|
7534
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7966
|
+
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
7967
|
}
|
|
7536
7968
|
if (_issue.format === "ends_with")
|
|
7537
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7969
|
+
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
7970
|
if (_issue.format === "includes")
|
|
7539
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7971
|
+
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
7972
|
if (_issue.format === "regex")
|
|
7541
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7973
|
+
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
7974
|
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
7543
7975
|
}
|
|
7544
7976
|
case "not_multiple_of":
|
|
@@ -7558,12 +7990,12 @@
|
|
|
7558
7990
|
};
|
|
7559
7991
|
function ka_default() {
|
|
7560
7992
|
return {
|
|
7561
|
-
localeError:
|
|
7993
|
+
localeError: error25()
|
|
7562
7994
|
};
|
|
7563
7995
|
}
|
|
7564
7996
|
|
|
7565
7997
|
// node_modules/zod/v4/locales/km.js
|
|
7566
|
-
var
|
|
7998
|
+
var error26 = () => {
|
|
7567
7999
|
const Sizable = {
|
|
7568
8000
|
string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
7569
8001
|
file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
@@ -7669,7 +8101,7 @@
|
|
|
7669
8101
|
};
|
|
7670
8102
|
function km_default() {
|
|
7671
8103
|
return {
|
|
7672
|
-
localeError:
|
|
8104
|
+
localeError: error26()
|
|
7673
8105
|
};
|
|
7674
8106
|
}
|
|
7675
8107
|
|
|
@@ -7679,7 +8111,7 @@
|
|
|
7679
8111
|
}
|
|
7680
8112
|
|
|
7681
8113
|
// node_modules/zod/v4/locales/ko.js
|
|
7682
|
-
var
|
|
8114
|
+
var error27 = () => {
|
|
7683
8115
|
const Sizable = {
|
|
7684
8116
|
string: { unit: "\uBB38\uC790", verb: "to have" },
|
|
7685
8117
|
file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
|
|
@@ -7786,7 +8218,7 @@
|
|
|
7786
8218
|
};
|
|
7787
8219
|
function ko_default() {
|
|
7788
8220
|
return {
|
|
7789
|
-
localeError:
|
|
8221
|
+
localeError: error27()
|
|
7790
8222
|
};
|
|
7791
8223
|
}
|
|
7792
8224
|
|
|
@@ -7804,7 +8236,7 @@
|
|
|
7804
8236
|
return "one";
|
|
7805
8237
|
return "few";
|
|
7806
8238
|
}
|
|
7807
|
-
var
|
|
8239
|
+
var error28 = () => {
|
|
7808
8240
|
const Sizable = {
|
|
7809
8241
|
string: {
|
|
7810
8242
|
unit: {
|
|
@@ -7990,12 +8422,12 @@
|
|
|
7990
8422
|
};
|
|
7991
8423
|
function lt_default() {
|
|
7992
8424
|
return {
|
|
7993
|
-
localeError:
|
|
8425
|
+
localeError: error28()
|
|
7994
8426
|
};
|
|
7995
8427
|
}
|
|
7996
8428
|
|
|
7997
8429
|
// node_modules/zod/v4/locales/mk.js
|
|
7998
|
-
var
|
|
8430
|
+
var error29 = () => {
|
|
7999
8431
|
const Sizable = {
|
|
8000
8432
|
string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
8001
8433
|
file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
@@ -8100,12 +8532,12 @@
|
|
|
8100
8532
|
};
|
|
8101
8533
|
function mk_default() {
|
|
8102
8534
|
return {
|
|
8103
|
-
localeError:
|
|
8535
|
+
localeError: error29()
|
|
8104
8536
|
};
|
|
8105
8537
|
}
|
|
8106
8538
|
|
|
8107
8539
|
// node_modules/zod/v4/locales/ms.js
|
|
8108
|
-
var
|
|
8540
|
+
var error30 = () => {
|
|
8109
8541
|
const Sizable = {
|
|
8110
8542
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
8111
8543
|
file: { unit: "bait", verb: "mempunyai" },
|
|
@@ -8208,12 +8640,12 @@
|
|
|
8208
8640
|
};
|
|
8209
8641
|
function ms_default() {
|
|
8210
8642
|
return {
|
|
8211
|
-
localeError:
|
|
8643
|
+
localeError: error30()
|
|
8212
8644
|
};
|
|
8213
8645
|
}
|
|
8214
8646
|
|
|
8215
8647
|
// node_modules/zod/v4/locales/nl.js
|
|
8216
|
-
var
|
|
8648
|
+
var error31 = () => {
|
|
8217
8649
|
const Sizable = {
|
|
8218
8650
|
string: { unit: "tekens", verb: "heeft" },
|
|
8219
8651
|
file: { unit: "bytes", verb: "heeft" },
|
|
@@ -8319,12 +8751,12 @@
|
|
|
8319
8751
|
};
|
|
8320
8752
|
function nl_default() {
|
|
8321
8753
|
return {
|
|
8322
|
-
localeError:
|
|
8754
|
+
localeError: error31()
|
|
8323
8755
|
};
|
|
8324
8756
|
}
|
|
8325
8757
|
|
|
8326
8758
|
// node_modules/zod/v4/locales/no.js
|
|
8327
|
-
var
|
|
8759
|
+
var error32 = () => {
|
|
8328
8760
|
const Sizable = {
|
|
8329
8761
|
string: { unit: "tegn", verb: "\xE5 ha" },
|
|
8330
8762
|
file: { unit: "bytes", verb: "\xE5 ha" },
|
|
@@ -8428,12 +8860,12 @@
|
|
|
8428
8860
|
};
|
|
8429
8861
|
function no_default() {
|
|
8430
8862
|
return {
|
|
8431
|
-
localeError:
|
|
8863
|
+
localeError: error32()
|
|
8432
8864
|
};
|
|
8433
8865
|
}
|
|
8434
8866
|
|
|
8435
8867
|
// node_modules/zod/v4/locales/ota.js
|
|
8436
|
-
var
|
|
8868
|
+
var error33 = () => {
|
|
8437
8869
|
const Sizable = {
|
|
8438
8870
|
string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
|
|
8439
8871
|
file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
|
|
@@ -8538,12 +8970,12 @@
|
|
|
8538
8970
|
};
|
|
8539
8971
|
function ota_default() {
|
|
8540
8972
|
return {
|
|
8541
|
-
localeError:
|
|
8973
|
+
localeError: error33()
|
|
8542
8974
|
};
|
|
8543
8975
|
}
|
|
8544
8976
|
|
|
8545
8977
|
// node_modules/zod/v4/locales/ps.js
|
|
8546
|
-
var
|
|
8978
|
+
var error34 = () => {
|
|
8547
8979
|
const Sizable = {
|
|
8548
8980
|
string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
|
|
8549
8981
|
file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
|
|
@@ -8653,12 +9085,12 @@
|
|
|
8653
9085
|
};
|
|
8654
9086
|
function ps_default() {
|
|
8655
9087
|
return {
|
|
8656
|
-
localeError:
|
|
9088
|
+
localeError: error34()
|
|
8657
9089
|
};
|
|
8658
9090
|
}
|
|
8659
9091
|
|
|
8660
9092
|
// node_modules/zod/v4/locales/pl.js
|
|
8661
|
-
var
|
|
9093
|
+
var error35 = () => {
|
|
8662
9094
|
const Sizable = {
|
|
8663
9095
|
string: { unit: "znak\xF3w", verb: "mie\u0107" },
|
|
8664
9096
|
file: { unit: "bajt\xF3w", verb: "mie\u0107" },
|
|
@@ -8763,12 +9195,12 @@
|
|
|
8763
9195
|
};
|
|
8764
9196
|
function pl_default() {
|
|
8765
9197
|
return {
|
|
8766
|
-
localeError:
|
|
9198
|
+
localeError: error35()
|
|
8767
9199
|
};
|
|
8768
9200
|
}
|
|
8769
9201
|
|
|
8770
9202
|
// node_modules/zod/v4/locales/pt.js
|
|
8771
|
-
var
|
|
9203
|
+
var error36 = () => {
|
|
8772
9204
|
const Sizable = {
|
|
8773
9205
|
string: { unit: "caracteres", verb: "ter" },
|
|
8774
9206
|
file: { unit: "bytes", verb: "ter" },
|
|
@@ -8872,7 +9304,127 @@
|
|
|
8872
9304
|
};
|
|
8873
9305
|
function pt_default() {
|
|
8874
9306
|
return {
|
|
8875
|
-
localeError:
|
|
9307
|
+
localeError: error36()
|
|
9308
|
+
};
|
|
9309
|
+
}
|
|
9310
|
+
|
|
9311
|
+
// node_modules/zod/v4/locales/ro.js
|
|
9312
|
+
var error37 = () => {
|
|
9313
|
+
const Sizable = {
|
|
9314
|
+
string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
|
|
9315
|
+
file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
|
|
9316
|
+
array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
9317
|
+
set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
9318
|
+
map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
|
|
9319
|
+
};
|
|
9320
|
+
function getSizing(origin) {
|
|
9321
|
+
return Sizable[origin] ?? null;
|
|
9322
|
+
}
|
|
9323
|
+
const FormatDictionary = {
|
|
9324
|
+
regex: "intrare",
|
|
9325
|
+
email: "adres\u0103 de email",
|
|
9326
|
+
url: "URL",
|
|
9327
|
+
emoji: "emoji",
|
|
9328
|
+
uuid: "UUID",
|
|
9329
|
+
uuidv4: "UUIDv4",
|
|
9330
|
+
uuidv6: "UUIDv6",
|
|
9331
|
+
nanoid: "nanoid",
|
|
9332
|
+
guid: "GUID",
|
|
9333
|
+
cuid: "cuid",
|
|
9334
|
+
cuid2: "cuid2",
|
|
9335
|
+
ulid: "ULID",
|
|
9336
|
+
xid: "XID",
|
|
9337
|
+
ksuid: "KSUID",
|
|
9338
|
+
datetime: "dat\u0103 \u0219i or\u0103 ISO",
|
|
9339
|
+
date: "dat\u0103 ISO",
|
|
9340
|
+
time: "or\u0103 ISO",
|
|
9341
|
+
duration: "durat\u0103 ISO",
|
|
9342
|
+
ipv4: "adres\u0103 IPv4",
|
|
9343
|
+
ipv6: "adres\u0103 IPv6",
|
|
9344
|
+
mac: "adres\u0103 MAC",
|
|
9345
|
+
cidrv4: "interval IPv4",
|
|
9346
|
+
cidrv6: "interval IPv6",
|
|
9347
|
+
base64: "\u0219ir codat base64",
|
|
9348
|
+
base64url: "\u0219ir codat base64url",
|
|
9349
|
+
json_string: "\u0219ir JSON",
|
|
9350
|
+
e164: "num\u0103r E.164",
|
|
9351
|
+
jwt: "JWT",
|
|
9352
|
+
template_literal: "intrare"
|
|
9353
|
+
};
|
|
9354
|
+
const TypeDictionary = {
|
|
9355
|
+
nan: "NaN",
|
|
9356
|
+
string: "\u0219ir",
|
|
9357
|
+
number: "num\u0103r",
|
|
9358
|
+
boolean: "boolean",
|
|
9359
|
+
function: "func\u021Bie",
|
|
9360
|
+
array: "matrice",
|
|
9361
|
+
object: "obiect",
|
|
9362
|
+
undefined: "nedefinit",
|
|
9363
|
+
symbol: "simbol",
|
|
9364
|
+
bigint: "num\u0103r mare",
|
|
9365
|
+
void: "void",
|
|
9366
|
+
never: "never",
|
|
9367
|
+
map: "hart\u0103",
|
|
9368
|
+
set: "set"
|
|
9369
|
+
};
|
|
9370
|
+
return (issue2) => {
|
|
9371
|
+
switch (issue2.code) {
|
|
9372
|
+
case "invalid_type": {
|
|
9373
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
9374
|
+
const receivedType = parsedType(issue2.input);
|
|
9375
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
9376
|
+
return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
|
|
9377
|
+
}
|
|
9378
|
+
case "invalid_value":
|
|
9379
|
+
if (issue2.values.length === 1)
|
|
9380
|
+
return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
|
|
9381
|
+
return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
|
|
9382
|
+
case "too_big": {
|
|
9383
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
9384
|
+
const sizing = getSizing(issue2.origin);
|
|
9385
|
+
if (sizing)
|
|
9386
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
|
|
9387
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
|
|
9388
|
+
}
|
|
9389
|
+
case "too_small": {
|
|
9390
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
9391
|
+
const sizing = getSizing(issue2.origin);
|
|
9392
|
+
if (sizing) {
|
|
9393
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
9394
|
+
}
|
|
9395
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
|
|
9396
|
+
}
|
|
9397
|
+
case "invalid_format": {
|
|
9398
|
+
const _issue = issue2;
|
|
9399
|
+
if (_issue.format === "starts_with") {
|
|
9400
|
+
return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
|
|
9401
|
+
}
|
|
9402
|
+
if (_issue.format === "ends_with")
|
|
9403
|
+
return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
|
|
9404
|
+
if (_issue.format === "includes")
|
|
9405
|
+
return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
|
|
9406
|
+
if (_issue.format === "regex")
|
|
9407
|
+
return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
|
|
9408
|
+
return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
9409
|
+
}
|
|
9410
|
+
case "not_multiple_of":
|
|
9411
|
+
return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
|
|
9412
|
+
case "unrecognized_keys":
|
|
9413
|
+
return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
|
|
9414
|
+
case "invalid_key":
|
|
9415
|
+
return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
|
|
9416
|
+
case "invalid_union":
|
|
9417
|
+
return "Intrare invalid\u0103";
|
|
9418
|
+
case "invalid_element":
|
|
9419
|
+
return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
|
|
9420
|
+
default:
|
|
9421
|
+
return `Intrare invalid\u0103`;
|
|
9422
|
+
}
|
|
9423
|
+
};
|
|
9424
|
+
};
|
|
9425
|
+
function ro_default() {
|
|
9426
|
+
return {
|
|
9427
|
+
localeError: error37()
|
|
8876
9428
|
};
|
|
8877
9429
|
}
|
|
8878
9430
|
|
|
@@ -8892,7 +9444,7 @@
|
|
|
8892
9444
|
}
|
|
8893
9445
|
return many;
|
|
8894
9446
|
}
|
|
8895
|
-
var
|
|
9447
|
+
var error38 = () => {
|
|
8896
9448
|
const Sizable = {
|
|
8897
9449
|
string: {
|
|
8898
9450
|
unit: {
|
|
@@ -9029,12 +9581,12 @@
|
|
|
9029
9581
|
};
|
|
9030
9582
|
function ru_default() {
|
|
9031
9583
|
return {
|
|
9032
|
-
localeError:
|
|
9584
|
+
localeError: error38()
|
|
9033
9585
|
};
|
|
9034
9586
|
}
|
|
9035
9587
|
|
|
9036
9588
|
// node_modules/zod/v4/locales/sl.js
|
|
9037
|
-
var
|
|
9589
|
+
var error39 = () => {
|
|
9038
9590
|
const Sizable = {
|
|
9039
9591
|
string: { unit: "znakov", verb: "imeti" },
|
|
9040
9592
|
file: { unit: "bajtov", verb: "imeti" },
|
|
@@ -9139,12 +9691,12 @@
|
|
|
9139
9691
|
};
|
|
9140
9692
|
function sl_default() {
|
|
9141
9693
|
return {
|
|
9142
|
-
localeError:
|
|
9694
|
+
localeError: error39()
|
|
9143
9695
|
};
|
|
9144
9696
|
}
|
|
9145
9697
|
|
|
9146
9698
|
// node_modules/zod/v4/locales/sv.js
|
|
9147
|
-
var
|
|
9699
|
+
var error40 = () => {
|
|
9148
9700
|
const Sizable = {
|
|
9149
9701
|
string: { unit: "tecken", verb: "att ha" },
|
|
9150
9702
|
file: { unit: "bytes", verb: "att ha" },
|
|
@@ -9250,12 +9802,12 @@
|
|
|
9250
9802
|
};
|
|
9251
9803
|
function sv_default() {
|
|
9252
9804
|
return {
|
|
9253
|
-
localeError:
|
|
9805
|
+
localeError: error40()
|
|
9254
9806
|
};
|
|
9255
9807
|
}
|
|
9256
9808
|
|
|
9257
9809
|
// node_modules/zod/v4/locales/ta.js
|
|
9258
|
-
var
|
|
9810
|
+
var error41 = () => {
|
|
9259
9811
|
const Sizable = {
|
|
9260
9812
|
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
9813
|
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 +9913,12 @@
|
|
|
9361
9913
|
};
|
|
9362
9914
|
function ta_default() {
|
|
9363
9915
|
return {
|
|
9364
|
-
localeError:
|
|
9916
|
+
localeError: error41()
|
|
9365
9917
|
};
|
|
9366
9918
|
}
|
|
9367
9919
|
|
|
9368
9920
|
// node_modules/zod/v4/locales/th.js
|
|
9369
|
-
var
|
|
9921
|
+
var error42 = () => {
|
|
9370
9922
|
const Sizable = {
|
|
9371
9923
|
string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
9372
9924
|
file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
@@ -9472,12 +10024,12 @@
|
|
|
9472
10024
|
};
|
|
9473
10025
|
function th_default() {
|
|
9474
10026
|
return {
|
|
9475
|
-
localeError:
|
|
10027
|
+
localeError: error42()
|
|
9476
10028
|
};
|
|
9477
10029
|
}
|
|
9478
10030
|
|
|
9479
10031
|
// node_modules/zod/v4/locales/tr.js
|
|
9480
|
-
var
|
|
10032
|
+
var error43 = () => {
|
|
9481
10033
|
const Sizable = {
|
|
9482
10034
|
string: { unit: "karakter", verb: "olmal\u0131" },
|
|
9483
10035
|
file: { unit: "bayt", verb: "olmal\u0131" },
|
|
@@ -9578,12 +10130,12 @@
|
|
|
9578
10130
|
};
|
|
9579
10131
|
function tr_default() {
|
|
9580
10132
|
return {
|
|
9581
|
-
localeError:
|
|
10133
|
+
localeError: error43()
|
|
9582
10134
|
};
|
|
9583
10135
|
}
|
|
9584
10136
|
|
|
9585
10137
|
// node_modules/zod/v4/locales/uk.js
|
|
9586
|
-
var
|
|
10138
|
+
var error44 = () => {
|
|
9587
10139
|
const Sizable = {
|
|
9588
10140
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
9589
10141
|
file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
@@ -9687,7 +10239,7 @@
|
|
|
9687
10239
|
};
|
|
9688
10240
|
function uk_default() {
|
|
9689
10241
|
return {
|
|
9690
|
-
localeError:
|
|
10242
|
+
localeError: error44()
|
|
9691
10243
|
};
|
|
9692
10244
|
}
|
|
9693
10245
|
|
|
@@ -9697,7 +10249,7 @@
|
|
|
9697
10249
|
}
|
|
9698
10250
|
|
|
9699
10251
|
// node_modules/zod/v4/locales/ur.js
|
|
9700
|
-
var
|
|
10252
|
+
var error45 = () => {
|
|
9701
10253
|
const Sizable = {
|
|
9702
10254
|
string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
|
|
9703
10255
|
file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
|
|
@@ -9803,17 +10355,18 @@
|
|
|
9803
10355
|
};
|
|
9804
10356
|
function ur_default() {
|
|
9805
10357
|
return {
|
|
9806
|
-
localeError:
|
|
10358
|
+
localeError: error45()
|
|
9807
10359
|
};
|
|
9808
10360
|
}
|
|
9809
10361
|
|
|
9810
10362
|
// node_modules/zod/v4/locales/uz.js
|
|
9811
|
-
var
|
|
10363
|
+
var error46 = () => {
|
|
9812
10364
|
const Sizable = {
|
|
9813
10365
|
string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
|
|
9814
10366
|
file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
|
|
9815
10367
|
array: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
9816
|
-
set: { unit: "element", verb: "bo\u2018lishi kerak" }
|
|
10368
|
+
set: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
10369
|
+
map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
|
|
9817
10370
|
};
|
|
9818
10371
|
function getSizing(origin) {
|
|
9819
10372
|
return Sizable[origin] ?? null;
|
|
@@ -9913,12 +10466,12 @@
|
|
|
9913
10466
|
};
|
|
9914
10467
|
function uz_default() {
|
|
9915
10468
|
return {
|
|
9916
|
-
localeError:
|
|
10469
|
+
localeError: error46()
|
|
9917
10470
|
};
|
|
9918
10471
|
}
|
|
9919
10472
|
|
|
9920
10473
|
// node_modules/zod/v4/locales/vi.js
|
|
9921
|
-
var
|
|
10474
|
+
var error47 = () => {
|
|
9922
10475
|
const Sizable = {
|
|
9923
10476
|
string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
|
|
9924
10477
|
file: { unit: "byte", verb: "c\xF3" },
|
|
@@ -10022,12 +10575,12 @@
|
|
|
10022
10575
|
};
|
|
10023
10576
|
function vi_default() {
|
|
10024
10577
|
return {
|
|
10025
|
-
localeError:
|
|
10578
|
+
localeError: error47()
|
|
10026
10579
|
};
|
|
10027
10580
|
}
|
|
10028
10581
|
|
|
10029
10582
|
// node_modules/zod/v4/locales/zh-CN.js
|
|
10030
|
-
var
|
|
10583
|
+
var error48 = () => {
|
|
10031
10584
|
const Sizable = {
|
|
10032
10585
|
string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
|
|
10033
10586
|
file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
|
|
@@ -10132,12 +10685,12 @@
|
|
|
10132
10685
|
};
|
|
10133
10686
|
function zh_CN_default() {
|
|
10134
10687
|
return {
|
|
10135
|
-
localeError:
|
|
10688
|
+
localeError: error48()
|
|
10136
10689
|
};
|
|
10137
10690
|
}
|
|
10138
10691
|
|
|
10139
10692
|
// node_modules/zod/v4/locales/zh-TW.js
|
|
10140
|
-
var
|
|
10693
|
+
var error49 = () => {
|
|
10141
10694
|
const Sizable = {
|
|
10142
10695
|
string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
|
|
10143
10696
|
file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
|
|
@@ -10240,12 +10793,12 @@
|
|
|
10240
10793
|
};
|
|
10241
10794
|
function zh_TW_default() {
|
|
10242
10795
|
return {
|
|
10243
|
-
localeError:
|
|
10796
|
+
localeError: error49()
|
|
10244
10797
|
};
|
|
10245
10798
|
}
|
|
10246
10799
|
|
|
10247
10800
|
// node_modules/zod/v4/locales/yo.js
|
|
10248
|
-
var
|
|
10801
|
+
var error50 = () => {
|
|
10249
10802
|
const Sizable = {
|
|
10250
10803
|
string: { unit: "\xE0mi", verb: "n\xED" },
|
|
10251
10804
|
file: { unit: "bytes", verb: "n\xED" },
|
|
@@ -10348,12 +10901,12 @@
|
|
|
10348
10901
|
};
|
|
10349
10902
|
function yo_default() {
|
|
10350
10903
|
return {
|
|
10351
|
-
localeError:
|
|
10904
|
+
localeError: error50()
|
|
10352
10905
|
};
|
|
10353
10906
|
}
|
|
10354
10907
|
|
|
10355
10908
|
// node_modules/zod/v4/core/registries.js
|
|
10356
|
-
var
|
|
10909
|
+
var _a2;
|
|
10357
10910
|
var $output = /* @__PURE__ */ Symbol("ZodOutput");
|
|
10358
10911
|
var $input = /* @__PURE__ */ Symbol("ZodInput");
|
|
10359
10912
|
var $ZodRegistry = class {
|
|
@@ -10399,7 +10952,7 @@
|
|
|
10399
10952
|
function registry() {
|
|
10400
10953
|
return new $ZodRegistry();
|
|
10401
10954
|
}
|
|
10402
|
-
(
|
|
10955
|
+
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
10403
10956
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
10404
10957
|
|
|
10405
10958
|
// node_modules/zod/v4/core/api.js
|
|
@@ -11317,7 +11870,7 @@
|
|
|
11317
11870
|
return schema;
|
|
11318
11871
|
}
|
|
11319
11872
|
// @__NO_SIDE_EFFECTS__
|
|
11320
|
-
function _superRefine(fn) {
|
|
11873
|
+
function _superRefine(fn, params) {
|
|
11321
11874
|
const ch = /* @__PURE__ */ _check((payload) => {
|
|
11322
11875
|
payload.addIssue = (issue2) => {
|
|
11323
11876
|
if (typeof issue2 === "string") {
|
|
@@ -11334,7 +11887,7 @@
|
|
|
11334
11887
|
}
|
|
11335
11888
|
};
|
|
11336
11889
|
return fn(payload.value, payload);
|
|
11337
|
-
});
|
|
11890
|
+
}, params);
|
|
11338
11891
|
return ch;
|
|
11339
11892
|
}
|
|
11340
11893
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -11464,7 +12017,7 @@
|
|
|
11464
12017
|
};
|
|
11465
12018
|
}
|
|
11466
12019
|
function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
11467
|
-
var
|
|
12020
|
+
var _a3;
|
|
11468
12021
|
const def = schema._zod.def;
|
|
11469
12022
|
const seen = ctx.seen.get(schema);
|
|
11470
12023
|
if (seen) {
|
|
@@ -11511,8 +12064,8 @@
|
|
|
11511
12064
|
delete result.schema.examples;
|
|
11512
12065
|
delete result.schema.default;
|
|
11513
12066
|
}
|
|
11514
|
-
if (ctx.io === "input" && result.schema
|
|
11515
|
-
(
|
|
12067
|
+
if (ctx.io === "input" && "_prefault" in result.schema)
|
|
12068
|
+
(_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
|
|
11516
12069
|
delete result.schema._prefault;
|
|
11517
12070
|
const _result = ctx.seen.get(schema);
|
|
11518
12071
|
return _result.schema;
|
|
@@ -11693,10 +12246,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
11693
12246
|
result.$id = ctx.external.uri(id);
|
|
11694
12247
|
}
|
|
11695
12248
|
Object.assign(result, root.def ?? root.schema);
|
|
12249
|
+
const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
|
|
12250
|
+
if (rootMetaId !== void 0 && result.id === rootMetaId)
|
|
12251
|
+
delete result.id;
|
|
11696
12252
|
const defs = ctx.external?.defs ?? {};
|
|
11697
12253
|
for (const entry of ctx.seen.entries()) {
|
|
11698
12254
|
const seen = entry[1];
|
|
11699
12255
|
if (seen.def && seen.defId) {
|
|
12256
|
+
if (seen.def.id === seen.defId)
|
|
12257
|
+
delete seen.def.id;
|
|
11700
12258
|
defs[seen.defId] = seen.def;
|
|
11701
12259
|
}
|
|
11702
12260
|
}
|
|
@@ -11841,39 +12399,28 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
11841
12399
|
json2.type = "integer";
|
|
11842
12400
|
else
|
|
11843
12401
|
json2.type = "number";
|
|
11844
|
-
|
|
11845
|
-
|
|
12402
|
+
const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
|
|
12403
|
+
const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
|
|
12404
|
+
const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
|
|
12405
|
+
if (exMin) {
|
|
12406
|
+
if (legacy) {
|
|
11846
12407
|
json2.minimum = exclusiveMinimum;
|
|
11847
12408
|
json2.exclusiveMinimum = true;
|
|
11848
12409
|
} else {
|
|
11849
12410
|
json2.exclusiveMinimum = exclusiveMinimum;
|
|
11850
12411
|
}
|
|
11851
|
-
}
|
|
11852
|
-
if (typeof minimum === "number") {
|
|
12412
|
+
} else if (typeof minimum === "number") {
|
|
11853
12413
|
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
12414
|
}
|
|
11861
|
-
if (
|
|
11862
|
-
if (
|
|
12415
|
+
if (exMax) {
|
|
12416
|
+
if (legacy) {
|
|
11863
12417
|
json2.maximum = exclusiveMaximum;
|
|
11864
12418
|
json2.exclusiveMaximum = true;
|
|
11865
12419
|
} else {
|
|
11866
12420
|
json2.exclusiveMaximum = exclusiveMaximum;
|
|
11867
12421
|
}
|
|
11868
|
-
}
|
|
11869
|
-
if (typeof maximum === "number") {
|
|
12422
|
+
} else if (typeof maximum === "number") {
|
|
11870
12423
|
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
12424
|
}
|
|
11878
12425
|
if (typeof multipleOf === "number")
|
|
11879
12426
|
json2.multipleOf = multipleOf;
|
|
@@ -12045,7 +12592,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12045
12592
|
if (typeof maximum === "number")
|
|
12046
12593
|
json2.maxItems = maximum;
|
|
12047
12594
|
json2.type = "array";
|
|
12048
|
-
json2.items = process2(def.element, ctx, {
|
|
12595
|
+
json2.items = process2(def.element, ctx, {
|
|
12596
|
+
...params,
|
|
12597
|
+
path: [...params.path, "items"]
|
|
12598
|
+
});
|
|
12049
12599
|
};
|
|
12050
12600
|
var objectProcessor = (schema, ctx, _json, params) => {
|
|
12051
12601
|
const json2 = _json;
|
|
@@ -12532,6 +13082,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12532
13082
|
int32: () => int32,
|
|
12533
13083
|
int64: () => int64,
|
|
12534
13084
|
intersection: () => intersection,
|
|
13085
|
+
invertCodec: () => invertCodec,
|
|
12535
13086
|
ipv4: () => ipv42,
|
|
12536
13087
|
ipv6: () => ipv62,
|
|
12537
13088
|
json: () => json,
|
|
@@ -12701,8 +13252,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12701
13252
|
}
|
|
12702
13253
|
});
|
|
12703
13254
|
};
|
|
12704
|
-
var ZodError = $constructor("ZodError", initializer2);
|
|
12705
|
-
var ZodRealError = $constructor("ZodError", initializer2, {
|
|
13255
|
+
var ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
|
|
13256
|
+
var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
|
|
12706
13257
|
Parent: Error
|
|
12707
13258
|
});
|
|
12708
13259
|
|
|
@@ -12721,6 +13272,43 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12721
13272
|
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
12722
13273
|
|
|
12723
13274
|
// node_modules/zod/v4/classic/schemas.js
|
|
13275
|
+
var _installedGroups = /* @__PURE__ */ new WeakMap();
|
|
13276
|
+
function _installLazyMethods(inst, group, methods) {
|
|
13277
|
+
const proto = Object.getPrototypeOf(inst);
|
|
13278
|
+
let installed = _installedGroups.get(proto);
|
|
13279
|
+
if (!installed) {
|
|
13280
|
+
installed = /* @__PURE__ */ new Set();
|
|
13281
|
+
_installedGroups.set(proto, installed);
|
|
13282
|
+
}
|
|
13283
|
+
if (installed.has(group))
|
|
13284
|
+
return;
|
|
13285
|
+
installed.add(group);
|
|
13286
|
+
for (const key in methods) {
|
|
13287
|
+
const fn = methods[key];
|
|
13288
|
+
Object.defineProperty(proto, key, {
|
|
13289
|
+
configurable: true,
|
|
13290
|
+
enumerable: false,
|
|
13291
|
+
get() {
|
|
13292
|
+
const bound = fn.bind(this);
|
|
13293
|
+
Object.defineProperty(this, key, {
|
|
13294
|
+
configurable: true,
|
|
13295
|
+
writable: true,
|
|
13296
|
+
enumerable: true,
|
|
13297
|
+
value: bound
|
|
13298
|
+
});
|
|
13299
|
+
return bound;
|
|
13300
|
+
},
|
|
13301
|
+
set(v) {
|
|
13302
|
+
Object.defineProperty(this, key, {
|
|
13303
|
+
configurable: true,
|
|
13304
|
+
writable: true,
|
|
13305
|
+
enumerable: true,
|
|
13306
|
+
value: v
|
|
13307
|
+
});
|
|
13308
|
+
}
|
|
13309
|
+
});
|
|
13310
|
+
}
|
|
13311
|
+
}
|
|
12724
13312
|
var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
12725
13313
|
$ZodType.init(inst, def);
|
|
12726
13314
|
Object.assign(inst["~standard"], {
|
|
@@ -12733,23 +13321,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12733
13321
|
inst.def = def;
|
|
12734
13322
|
inst.type = def.type;
|
|
12735
13323
|
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
13324
|
inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
|
|
12754
13325
|
inst.safeParse = (data, params) => safeParse2(inst, data, params);
|
|
12755
13326
|
inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
|
|
@@ -12763,45 +13334,108 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12763
13334
|
inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
|
|
12764
13335
|
inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
|
|
12765
13336
|
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
|
-
|
|
13337
|
+
_installLazyMethods(inst, "ZodType", {
|
|
13338
|
+
check(...chks) {
|
|
13339
|
+
const def2 = this.def;
|
|
13340
|
+
return this.clone(util_exports.mergeDefs(def2, {
|
|
13341
|
+
checks: [
|
|
13342
|
+
...def2.checks ?? [],
|
|
13343
|
+
...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
13344
|
+
]
|
|
13345
|
+
}), { parent: true });
|
|
13346
|
+
},
|
|
13347
|
+
with(...chks) {
|
|
13348
|
+
return this.check(...chks);
|
|
13349
|
+
},
|
|
13350
|
+
clone(def2, params) {
|
|
13351
|
+
return clone(this, def2, params);
|
|
13352
|
+
},
|
|
13353
|
+
brand() {
|
|
13354
|
+
return this;
|
|
13355
|
+
},
|
|
13356
|
+
register(reg, meta3) {
|
|
13357
|
+
reg.add(this, meta3);
|
|
13358
|
+
return this;
|
|
13359
|
+
},
|
|
13360
|
+
refine(check2, params) {
|
|
13361
|
+
return this.check(refine(check2, params));
|
|
13362
|
+
},
|
|
13363
|
+
superRefine(refinement, params) {
|
|
13364
|
+
return this.check(superRefine(refinement, params));
|
|
13365
|
+
},
|
|
13366
|
+
overwrite(fn) {
|
|
13367
|
+
return this.check(_overwrite(fn));
|
|
13368
|
+
},
|
|
13369
|
+
optional() {
|
|
13370
|
+
return optional(this);
|
|
13371
|
+
},
|
|
13372
|
+
exactOptional() {
|
|
13373
|
+
return exactOptional(this);
|
|
13374
|
+
},
|
|
13375
|
+
nullable() {
|
|
13376
|
+
return nullable(this);
|
|
13377
|
+
},
|
|
13378
|
+
nullish() {
|
|
13379
|
+
return optional(nullable(this));
|
|
13380
|
+
},
|
|
13381
|
+
nonoptional(params) {
|
|
13382
|
+
return nonoptional(this, params);
|
|
13383
|
+
},
|
|
13384
|
+
array() {
|
|
13385
|
+
return array(this);
|
|
13386
|
+
},
|
|
13387
|
+
or(arg) {
|
|
13388
|
+
return union([this, arg]);
|
|
13389
|
+
},
|
|
13390
|
+
and(arg) {
|
|
13391
|
+
return intersection(this, arg);
|
|
13392
|
+
},
|
|
13393
|
+
transform(tx) {
|
|
13394
|
+
return pipe(this, transform(tx));
|
|
13395
|
+
},
|
|
13396
|
+
default(d) {
|
|
13397
|
+
return _default2(this, d);
|
|
13398
|
+
},
|
|
13399
|
+
prefault(d) {
|
|
13400
|
+
return prefault(this, d);
|
|
13401
|
+
},
|
|
13402
|
+
catch(params) {
|
|
13403
|
+
return _catch2(this, params);
|
|
13404
|
+
},
|
|
13405
|
+
pipe(target) {
|
|
13406
|
+
return pipe(this, target);
|
|
13407
|
+
},
|
|
13408
|
+
readonly() {
|
|
13409
|
+
return readonly(this);
|
|
13410
|
+
},
|
|
13411
|
+
describe(description) {
|
|
13412
|
+
const cl = this.clone();
|
|
13413
|
+
globalRegistry.add(cl, { description });
|
|
13414
|
+
return cl;
|
|
13415
|
+
},
|
|
13416
|
+
meta(...args) {
|
|
13417
|
+
if (args.length === 0)
|
|
13418
|
+
return globalRegistry.get(this);
|
|
13419
|
+
const cl = this.clone();
|
|
13420
|
+
globalRegistry.add(cl, args[0]);
|
|
13421
|
+
return cl;
|
|
13422
|
+
},
|
|
13423
|
+
isOptional() {
|
|
13424
|
+
return this.safeParse(void 0).success;
|
|
13425
|
+
},
|
|
13426
|
+
isNullable() {
|
|
13427
|
+
return this.safeParse(null).success;
|
|
13428
|
+
},
|
|
13429
|
+
apply(fn) {
|
|
13430
|
+
return fn(this);
|
|
13431
|
+
}
|
|
13432
|
+
});
|
|
12788
13433
|
Object.defineProperty(inst, "description", {
|
|
12789
13434
|
get() {
|
|
12790
13435
|
return globalRegistry.get(inst)?.description;
|
|
12791
13436
|
},
|
|
12792
13437
|
configurable: true
|
|
12793
13438
|
});
|
|
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
13439
|
return inst;
|
|
12806
13440
|
});
|
|
12807
13441
|
var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
@@ -12812,21 +13446,53 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12812
13446
|
inst.format = bag.format ?? null;
|
|
12813
13447
|
inst.minLength = bag.minimum ?? null;
|
|
12814
13448
|
inst.maxLength = bag.maximum ?? null;
|
|
12815
|
-
inst
|
|
12816
|
-
|
|
12817
|
-
|
|
12818
|
-
|
|
12819
|
-
|
|
12820
|
-
|
|
12821
|
-
|
|
12822
|
-
|
|
12823
|
-
|
|
12824
|
-
|
|
12825
|
-
|
|
12826
|
-
|
|
12827
|
-
|
|
12828
|
-
|
|
12829
|
-
|
|
13449
|
+
_installLazyMethods(inst, "_ZodString", {
|
|
13450
|
+
regex(...args) {
|
|
13451
|
+
return this.check(_regex(...args));
|
|
13452
|
+
},
|
|
13453
|
+
includes(...args) {
|
|
13454
|
+
return this.check(_includes(...args));
|
|
13455
|
+
},
|
|
13456
|
+
startsWith(...args) {
|
|
13457
|
+
return this.check(_startsWith(...args));
|
|
13458
|
+
},
|
|
13459
|
+
endsWith(...args) {
|
|
13460
|
+
return this.check(_endsWith(...args));
|
|
13461
|
+
},
|
|
13462
|
+
min(...args) {
|
|
13463
|
+
return this.check(_minLength(...args));
|
|
13464
|
+
},
|
|
13465
|
+
max(...args) {
|
|
13466
|
+
return this.check(_maxLength(...args));
|
|
13467
|
+
},
|
|
13468
|
+
length(...args) {
|
|
13469
|
+
return this.check(_length(...args));
|
|
13470
|
+
},
|
|
13471
|
+
nonempty(...args) {
|
|
13472
|
+
return this.check(_minLength(1, ...args));
|
|
13473
|
+
},
|
|
13474
|
+
lowercase(params) {
|
|
13475
|
+
return this.check(_lowercase(params));
|
|
13476
|
+
},
|
|
13477
|
+
uppercase(params) {
|
|
13478
|
+
return this.check(_uppercase(params));
|
|
13479
|
+
},
|
|
13480
|
+
trim() {
|
|
13481
|
+
return this.check(_trim());
|
|
13482
|
+
},
|
|
13483
|
+
normalize(...args) {
|
|
13484
|
+
return this.check(_normalize(...args));
|
|
13485
|
+
},
|
|
13486
|
+
toLowerCase() {
|
|
13487
|
+
return this.check(_toLowerCase());
|
|
13488
|
+
},
|
|
13489
|
+
toUpperCase() {
|
|
13490
|
+
return this.check(_toUpperCase());
|
|
13491
|
+
},
|
|
13492
|
+
slugify() {
|
|
13493
|
+
return this.check(_slugify());
|
|
13494
|
+
}
|
|
13495
|
+
});
|
|
12830
13496
|
});
|
|
12831
13497
|
var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
12832
13498
|
$ZodString.init(inst, def);
|
|
@@ -12905,7 +13571,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12905
13571
|
}
|
|
12906
13572
|
function httpUrl(params) {
|
|
12907
13573
|
return _url(ZodURL, {
|
|
12908
|
-
protocol:
|
|
13574
|
+
protocol: regexes_exports.httpProtocol,
|
|
12909
13575
|
hostname: regexes_exports.domain,
|
|
12910
13576
|
...util_exports.normalizeParams(params)
|
|
12911
13577
|
});
|
|
@@ -13047,21 +13713,53 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
13047
13713
|
$ZodNumber.init(inst, def);
|
|
13048
13714
|
ZodType.init(inst, def);
|
|
13049
13715
|
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
|
-
|
|
13716
|
+
_installLazyMethods(inst, "ZodNumber", {
|
|
13717
|
+
gt(value, params) {
|
|
13718
|
+
return this.check(_gt(value, params));
|
|
13719
|
+
},
|
|
13720
|
+
gte(value, params) {
|
|
13721
|
+
return this.check(_gte(value, params));
|
|
13722
|
+
},
|
|
13723
|
+
min(value, params) {
|
|
13724
|
+
return this.check(_gte(value, params));
|
|
13725
|
+
},
|
|
13726
|
+
lt(value, params) {
|
|
13727
|
+
return this.check(_lt(value, params));
|
|
13728
|
+
},
|
|
13729
|
+
lte(value, params) {
|
|
13730
|
+
return this.check(_lte(value, params));
|
|
13731
|
+
},
|
|
13732
|
+
max(value, params) {
|
|
13733
|
+
return this.check(_lte(value, params));
|
|
13734
|
+
},
|
|
13735
|
+
int(params) {
|
|
13736
|
+
return this.check(int(params));
|
|
13737
|
+
},
|
|
13738
|
+
safe(params) {
|
|
13739
|
+
return this.check(int(params));
|
|
13740
|
+
},
|
|
13741
|
+
positive(params) {
|
|
13742
|
+
return this.check(_gt(0, params));
|
|
13743
|
+
},
|
|
13744
|
+
nonnegative(params) {
|
|
13745
|
+
return this.check(_gte(0, params));
|
|
13746
|
+
},
|
|
13747
|
+
negative(params) {
|
|
13748
|
+
return this.check(_lt(0, params));
|
|
13749
|
+
},
|
|
13750
|
+
nonpositive(params) {
|
|
13751
|
+
return this.check(_lte(0, params));
|
|
13752
|
+
},
|
|
13753
|
+
multipleOf(value, params) {
|
|
13754
|
+
return this.check(_multipleOf(value, params));
|
|
13755
|
+
},
|
|
13756
|
+
step(value, params) {
|
|
13757
|
+
return this.check(_multipleOf(value, params));
|
|
13758
|
+
},
|
|
13759
|
+
finite() {
|
|
13760
|
+
return this;
|
|
13761
|
+
}
|
|
13762
|
+
});
|
|
13065
13763
|
const bag = inst._zod.bag;
|
|
13066
13764
|
inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
13067
13765
|
inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
|
|
@@ -13208,11 +13906,23 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
13208
13906
|
ZodType.init(inst, def);
|
|
13209
13907
|
inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
|
|
13210
13908
|
inst.element = def.element;
|
|
13211
|
-
inst
|
|
13212
|
-
|
|
13213
|
-
|
|
13214
|
-
|
|
13215
|
-
|
|
13909
|
+
_installLazyMethods(inst, "ZodArray", {
|
|
13910
|
+
min(n, params) {
|
|
13911
|
+
return this.check(_minLength(n, params));
|
|
13912
|
+
},
|
|
13913
|
+
nonempty(params) {
|
|
13914
|
+
return this.check(_minLength(1, params));
|
|
13915
|
+
},
|
|
13916
|
+
max(n, params) {
|
|
13917
|
+
return this.check(_maxLength(n, params));
|
|
13918
|
+
},
|
|
13919
|
+
length(n, params) {
|
|
13920
|
+
return this.check(_length(n, params));
|
|
13921
|
+
},
|
|
13922
|
+
unwrap() {
|
|
13923
|
+
return this.element;
|
|
13924
|
+
}
|
|
13925
|
+
});
|
|
13216
13926
|
});
|
|
13217
13927
|
function array(element, params) {
|
|
13218
13928
|
return _array(ZodArray, element, params);
|
|
@@ -13228,23 +13938,47 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
13228
13938
|
util_exports.defineLazy(inst, "shape", () => {
|
|
13229
13939
|
return def.shape;
|
|
13230
13940
|
});
|
|
13231
|
-
inst
|
|
13232
|
-
|
|
13233
|
-
|
|
13234
|
-
|
|
13235
|
-
|
|
13236
|
-
|
|
13237
|
-
|
|
13238
|
-
|
|
13239
|
-
|
|
13240
|
-
|
|
13241
|
-
|
|
13242
|
-
|
|
13243
|
-
|
|
13244
|
-
|
|
13245
|
-
|
|
13246
|
-
|
|
13247
|
-
|
|
13941
|
+
_installLazyMethods(inst, "ZodObject", {
|
|
13942
|
+
keyof() {
|
|
13943
|
+
return _enum2(Object.keys(this._zod.def.shape));
|
|
13944
|
+
},
|
|
13945
|
+
catchall(catchall) {
|
|
13946
|
+
return this.clone({ ...this._zod.def, catchall });
|
|
13947
|
+
},
|
|
13948
|
+
passthrough() {
|
|
13949
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
13950
|
+
},
|
|
13951
|
+
loose() {
|
|
13952
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
13953
|
+
},
|
|
13954
|
+
strict() {
|
|
13955
|
+
return this.clone({ ...this._zod.def, catchall: never() });
|
|
13956
|
+
},
|
|
13957
|
+
strip() {
|
|
13958
|
+
return this.clone({ ...this._zod.def, catchall: void 0 });
|
|
13959
|
+
},
|
|
13960
|
+
extend(incoming) {
|
|
13961
|
+
return util_exports.extend(this, incoming);
|
|
13962
|
+
},
|
|
13963
|
+
safeExtend(incoming) {
|
|
13964
|
+
return util_exports.safeExtend(this, incoming);
|
|
13965
|
+
},
|
|
13966
|
+
merge(other) {
|
|
13967
|
+
return util_exports.merge(this, other);
|
|
13968
|
+
},
|
|
13969
|
+
pick(mask) {
|
|
13970
|
+
return util_exports.pick(this, mask);
|
|
13971
|
+
},
|
|
13972
|
+
omit(mask) {
|
|
13973
|
+
return util_exports.omit(this, mask);
|
|
13974
|
+
},
|
|
13975
|
+
partial(...args) {
|
|
13976
|
+
return util_exports.partial(ZodOptional, this, args[0]);
|
|
13977
|
+
},
|
|
13978
|
+
required(...args) {
|
|
13979
|
+
return util_exports.required(ZodNonOptional, this, args[0]);
|
|
13980
|
+
}
|
|
13981
|
+
});
|
|
13248
13982
|
});
|
|
13249
13983
|
function object(shape, params) {
|
|
13250
13984
|
const def = {
|
|
@@ -13349,6 +14083,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
13349
14083
|
inst.valueType = def.valueType;
|
|
13350
14084
|
});
|
|
13351
14085
|
function record(keyType, valueType, params) {
|
|
14086
|
+
if (!valueType || !valueType._zod) {
|
|
14087
|
+
return new ZodRecord({
|
|
14088
|
+
type: "record",
|
|
14089
|
+
keyType: string2(),
|
|
14090
|
+
valueType: keyType,
|
|
14091
|
+
...util_exports.normalizeParams(valueType)
|
|
14092
|
+
});
|
|
14093
|
+
}
|
|
13352
14094
|
return new ZodRecord({
|
|
13353
14095
|
type: "record",
|
|
13354
14096
|
keyType,
|
|
@@ -13678,6 +14420,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
13678
14420
|
reverseTransform: params.encode
|
|
13679
14421
|
});
|
|
13680
14422
|
}
|
|
14423
|
+
function invertCodec(codec2) {
|
|
14424
|
+
const def = codec2._zod.def;
|
|
14425
|
+
return new ZodCodec({
|
|
14426
|
+
type: "pipe",
|
|
14427
|
+
in: def.out,
|
|
14428
|
+
out: def.in,
|
|
14429
|
+
transform: def.reverseTransform,
|
|
14430
|
+
reverseTransform: def.transform
|
|
14431
|
+
});
|
|
14432
|
+
}
|
|
13681
14433
|
var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
13682
14434
|
$ZodReadonly.init(inst, def);
|
|
13683
14435
|
ZodType.init(inst, def);
|
|
@@ -13757,8 +14509,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
13757
14509
|
function refine(fn, _params = {}) {
|
|
13758
14510
|
return _refine(ZodCustom, fn, _params);
|
|
13759
14511
|
}
|
|
13760
|
-
function superRefine(fn) {
|
|
13761
|
-
return _superRefine(fn);
|
|
14512
|
+
function superRefine(fn, params) {
|
|
14513
|
+
return _superRefine(fn, params);
|
|
13762
14514
|
}
|
|
13763
14515
|
var describe2 = describe;
|
|
13764
14516
|
var meta2 = meta;
|
|
@@ -14217,12 +14969,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14217
14969
|
default:
|
|
14218
14970
|
throw new Error(`Unsupported type: ${type}`);
|
|
14219
14971
|
}
|
|
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
14972
|
return zodSchema;
|
|
14227
14973
|
}
|
|
14228
14974
|
function convertSchema(schema, ctx) {
|
|
@@ -14259,6 +15005,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14259
15005
|
if (schema.readOnly === true) {
|
|
14260
15006
|
baseSchema = z.readonly(baseSchema);
|
|
14261
15007
|
}
|
|
15008
|
+
if (schema.default !== void 0) {
|
|
15009
|
+
baseSchema = baseSchema.default(schema.default);
|
|
15010
|
+
}
|
|
14262
15011
|
const extraMeta = {};
|
|
14263
15012
|
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
14264
15013
|
for (const key of coreMetadataKeys) {
|
|
@@ -14280,23 +15029,32 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14280
15029
|
if (Object.keys(extraMeta).length > 0) {
|
|
14281
15030
|
ctx.registry.add(baseSchema, extraMeta);
|
|
14282
15031
|
}
|
|
15032
|
+
if (schema.description) {
|
|
15033
|
+
baseSchema = baseSchema.describe(schema.description);
|
|
15034
|
+
}
|
|
14283
15035
|
return baseSchema;
|
|
14284
15036
|
}
|
|
14285
15037
|
function fromJSONSchema(schema, params) {
|
|
14286
15038
|
if (typeof schema === "boolean") {
|
|
14287
15039
|
return schema ? z.any() : z.never();
|
|
14288
15040
|
}
|
|
14289
|
-
|
|
14290
|
-
|
|
15041
|
+
let normalized;
|
|
15042
|
+
try {
|
|
15043
|
+
normalized = JSON.parse(JSON.stringify(schema));
|
|
15044
|
+
} catch {
|
|
15045
|
+
throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
|
|
15046
|
+
}
|
|
15047
|
+
const version2 = detectVersion(normalized, params?.defaultTarget);
|
|
15048
|
+
const defs = normalized.$defs || normalized.definitions || {};
|
|
14291
15049
|
const ctx = {
|
|
14292
15050
|
version: version2,
|
|
14293
15051
|
defs,
|
|
14294
15052
|
refs: /* @__PURE__ */ new Map(),
|
|
14295
15053
|
processing: /* @__PURE__ */ new Set(),
|
|
14296
|
-
rootSchema:
|
|
15054
|
+
rootSchema: normalized,
|
|
14297
15055
|
registry: params?.registry ?? globalRegistry
|
|
14298
15056
|
};
|
|
14299
|
-
return convertSchema(
|
|
15057
|
+
return convertSchema(normalized, ctx);
|
|
14300
15058
|
}
|
|
14301
15059
|
|
|
14302
15060
|
// node_modules/zod/v4/classic/coerce.js
|
|
@@ -14327,104 +15085,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14327
15085
|
// node_modules/zod/v4/classic/external.js
|
|
14328
15086
|
config(en_default());
|
|
14329
15087
|
|
|
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
15088
|
// src/tools/schemas.ts
|
|
14429
15089
|
var searchItemSchema = external_exports.object({
|
|
14430
15090
|
id: external_exports.string().describe("Location ID (city ID, POI ID, etc.)"),
|
|
@@ -14576,6 +15236,239 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14576
15236
|
is_top_rated: e.topBadges?.isTopRated ?? false,
|
|
14577
15237
|
is_top_booked: e.topBadges?.isTopBooked ?? false
|
|
14578
15238
|
});
|
|
15239
|
+
var airportSchema = external_exports.object({
|
|
15240
|
+
id: external_exports.string().describe("IATA code for an airport (e.g., JFK, LAX) or city code for a metro area (e.g., NYC)"),
|
|
15241
|
+
type: external_exports.string().describe("Entry type \u2014 AIRPORT for a specific airport, GDS_CITY for a multi-airport metropolitan area"),
|
|
15242
|
+
display_name: external_exports.string().describe('Full display name (e.g., "New York City, NY - John F Kennedy Intl Airport (JFK)")'),
|
|
15243
|
+
city_name: external_exports.string().describe("City name"),
|
|
15244
|
+
state_code: external_exports.string().describe("State or province code (US only)"),
|
|
15245
|
+
country_code: external_exports.string().describe("ISO country code (e.g., US, GB)"),
|
|
15246
|
+
latitude: external_exports.number().describe("Airport latitude in decimal degrees; 0 for multi-airport metro entries"),
|
|
15247
|
+
longitude: external_exports.number().describe("Airport longitude in decimal degrees; 0 for multi-airport metro entries"),
|
|
15248
|
+
timezone: external_exports.string().describe("IANA timezone name (e.g., America/New_York)")
|
|
15249
|
+
});
|
|
15250
|
+
var mapAirport = (a) => ({
|
|
15251
|
+
id: a.id ?? "",
|
|
15252
|
+
type: a.subType ?? "",
|
|
15253
|
+
display_name: a.displayName ?? "",
|
|
15254
|
+
city_name: a.cityName ?? "",
|
|
15255
|
+
state_code: a.stateCode ?? "",
|
|
15256
|
+
country_code: a.countryCode ?? "",
|
|
15257
|
+
latitude: a.lat ?? 0,
|
|
15258
|
+
longitude: a.lon ?? 0,
|
|
15259
|
+
timezone: a.timeZoneName ?? ""
|
|
15260
|
+
});
|
|
15261
|
+
var flightFareRecordSchema = external_exports.object({
|
|
15262
|
+
dates: external_exports.array(external_exports.string()).describe(
|
|
15263
|
+
"Travel date(s) in YYYY-MM-DD format. One entry for one-way searches; two entries (depart, return) for round-trip."
|
|
15264
|
+
),
|
|
15265
|
+
min_price: external_exports.number().describe("Minimum fare per passenger in the response currency"),
|
|
15266
|
+
currency: external_exports.string().describe("Currency code (e.g., USD)"),
|
|
15267
|
+
is_private_fare: external_exports.boolean().describe("Whether the fare is a members-only private rate"),
|
|
15268
|
+
stops_by_slice: external_exports.array(
|
|
15269
|
+
external_exports.object({
|
|
15270
|
+
slice_id: external_exports.number().int().describe("Slice number (1 for outbound, 2 for return)"),
|
|
15271
|
+
stops: external_exports.number().int().describe("Number of stops for this slice (0 = non-stop)")
|
|
15272
|
+
})
|
|
15273
|
+
).describe("Stop counts for each flight slice"),
|
|
15274
|
+
takeoff_times: external_exports.array(external_exports.string()).describe("Departure times per slice in HH:MM (24h)"),
|
|
15275
|
+
landing_times: external_exports.array(external_exports.string()).describe("Arrival times per slice in HH:MM (24h)")
|
|
15276
|
+
});
|
|
15277
|
+
var mapFlightFareRecord = (r) => ({
|
|
15278
|
+
dates: r.dates ?? [],
|
|
15279
|
+
min_price: r.minimumFare?.amtPerPax ?? 0,
|
|
15280
|
+
currency: r.minimumFare?.currency ?? "",
|
|
15281
|
+
is_private_fare: r.minimumFare?.isPrivateFare ?? false,
|
|
15282
|
+
stops_by_slice: (r.minimumFare?.listOfStops ?? []).map((s) => ({
|
|
15283
|
+
slice_id: s.sliceId ?? 0,
|
|
15284
|
+
stops: s.stops ?? 0
|
|
15285
|
+
})),
|
|
15286
|
+
takeoff_times: r.minimumFare?.commonAttributes?.takeOffTimes ?? [],
|
|
15287
|
+
landing_times: r.minimumFare?.commonAttributes?.landingTimes ?? []
|
|
15288
|
+
});
|
|
15289
|
+
var flightPriceWatchSchema = external_exports.object({
|
|
15290
|
+
origin_code: external_exports.string().describe("Origin airport or city code"),
|
|
15291
|
+
destination_code: external_exports.string().describe("Destination airport or city code"),
|
|
15292
|
+
depart_date: external_exports.string().describe("Outbound date in YYYY-MM-DD format"),
|
|
15293
|
+
return_date: external_exports.string().describe("Return date in YYYY-MM-DD format, empty for one-way watches"),
|
|
15294
|
+
cabin_class: external_exports.string().describe("Cabin class (ECO, BUS, FIRST)"),
|
|
15295
|
+
current_price: external_exports.number().describe("Most recently observed minimum fare"),
|
|
15296
|
+
target_price: external_exports.number().describe("User-set target fare for alerts"),
|
|
15297
|
+
is_active: external_exports.boolean().describe("Whether the watch is currently active"),
|
|
15298
|
+
created_at: external_exports.string().describe("When the watch was created (ISO 8601)")
|
|
15299
|
+
});
|
|
15300
|
+
var mapFlightPriceWatch = (w) => ({
|
|
15301
|
+
origin_code: w.originCityCode ?? "",
|
|
15302
|
+
destination_code: w.destCityCode ?? "",
|
|
15303
|
+
depart_date: w.departDate ?? "",
|
|
15304
|
+
return_date: w.returnDate ?? "",
|
|
15305
|
+
cabin_class: w.cabinClass ?? "",
|
|
15306
|
+
current_price: w.currentPrice ?? 0,
|
|
15307
|
+
target_price: w.targetPrice ?? 0,
|
|
15308
|
+
is_active: w.active ?? false,
|
|
15309
|
+
created_at: w.createdDate ?? ""
|
|
15310
|
+
});
|
|
15311
|
+
|
|
15312
|
+
// src/tools/find-cheapest-flight-date.ts
|
|
15313
|
+
var PRICE_CALENDAR_QUERY = `
|
|
15314
|
+
query airPriceGuideCalendar($input: AirPriceGuideRequest) {
|
|
15315
|
+
airPriceGuide(input: $input) {
|
|
15316
|
+
error { type code message }
|
|
15317
|
+
records {
|
|
15318
|
+
dates
|
|
15319
|
+
minimumFare {
|
|
15320
|
+
isPrivateFare
|
|
15321
|
+
currency
|
|
15322
|
+
amtPerPax
|
|
15323
|
+
commonAttributes { takeOffTimes landingTimes }
|
|
15324
|
+
listOfStops { sliceId stops }
|
|
15325
|
+
}
|
|
15326
|
+
}
|
|
15327
|
+
}
|
|
15328
|
+
}`;
|
|
15329
|
+
var findCheapestFlightDate = defineTool({
|
|
15330
|
+
name: "find_cheapest_flight_date",
|
|
15331
|
+
displayName: "Find Cheapest Flight Date",
|
|
15332
|
+
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.",
|
|
15333
|
+
summary: "Find the cheapest flight date in a window",
|
|
15334
|
+
icon: "piggy-bank",
|
|
15335
|
+
group: "Flights",
|
|
15336
|
+
input: external_exports.object({
|
|
15337
|
+
origin: external_exports.string().describe("Origin airport or city code (e.g., JFK, NYC)"),
|
|
15338
|
+
destination: external_exports.string().describe("Destination airport or city code (e.g., LAX, LON)"),
|
|
15339
|
+
depart_date_from: external_exports.string().describe("Start of departure window in YYYY-MM-DD format"),
|
|
15340
|
+
depart_date_to: external_exports.string().describe("End of departure window in YYYY-MM-DD format"),
|
|
15341
|
+
top_n: external_exports.number().int().min(1).max(30).optional().describe("Number of cheapest dates to return (default 5, max 30)"),
|
|
15342
|
+
cabin_class: external_exports.enum(["ECO", "PREMIUM", "BUS", "FIRST"]).optional().describe("Cabin class filter (default ECO)")
|
|
15343
|
+
}),
|
|
15344
|
+
output: external_exports.object({
|
|
15345
|
+
records: external_exports.array(flightFareRecordSchema).describe("Cheapest flight dates in the window, sorted ascending by price")
|
|
15346
|
+
}),
|
|
15347
|
+
handle: async (params) => {
|
|
15348
|
+
const variables = {
|
|
15349
|
+
input: {
|
|
15350
|
+
trips: [
|
|
15351
|
+
{
|
|
15352
|
+
originCity: [params.origin],
|
|
15353
|
+
destinationCity: [params.destination],
|
|
15354
|
+
departDateRange: { fromDate: params.depart_date_from, toDate: params.depart_date_to }
|
|
15355
|
+
}
|
|
15356
|
+
],
|
|
15357
|
+
size: 720,
|
|
15358
|
+
consumer: "PCLN-HOME",
|
|
15359
|
+
cabinClass: params.cabin_class ?? "ECO"
|
|
15360
|
+
}
|
|
15361
|
+
};
|
|
15362
|
+
const data = await graphql("airPriceGuideCalendar", variables, PRICE_CALENDAR_QUERY);
|
|
15363
|
+
const guide = data.airPriceGuide;
|
|
15364
|
+
if (guide?.error) {
|
|
15365
|
+
const msg = guide.error.message ?? "";
|
|
15366
|
+
if (msg === "Zero results") return { records: [] };
|
|
15367
|
+
throw ToolError.internal(`Flight price calendar error: ${msg}`);
|
|
15368
|
+
}
|
|
15369
|
+
const raw = guide?.records ?? [];
|
|
15370
|
+
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);
|
|
15371
|
+
return { records: mapped };
|
|
15372
|
+
}
|
|
15373
|
+
});
|
|
15374
|
+
|
|
15375
|
+
// src/tools/get-abandoned-items.ts
|
|
15376
|
+
var PERSISTED_HASH = "bd547859ce08366e86541b80eb6951d93aa36e1e4608842366309826793c223f";
|
|
15377
|
+
var getAbandonedItems = defineTool({
|
|
15378
|
+
name: "get_abandoned_items",
|
|
15379
|
+
displayName: "Get Abandoned Items",
|
|
15380
|
+
description: "Get items the user previously viewed or added to cart but did not complete booking. Useful for resuming interrupted booking flows.",
|
|
15381
|
+
summary: "Get your abandoned cart items",
|
|
15382
|
+
icon: "shopping-cart",
|
|
15383
|
+
group: "Account",
|
|
15384
|
+
input: external_exports.object({}),
|
|
15385
|
+
output: external_exports.object({
|
|
15386
|
+
items: external_exports.array(
|
|
15387
|
+
external_exports.object({
|
|
15388
|
+
type: external_exports.string().describe("Item type (HOTEL, FLIGHT, CAR)"),
|
|
15389
|
+
hotel_name: external_exports.string().describe("Hotel name (if hotel)"),
|
|
15390
|
+
hotel_id: external_exports.string().describe("Hotel ID (if hotel)"),
|
|
15391
|
+
city_name: external_exports.string().describe("City name"),
|
|
15392
|
+
check_in: external_exports.string().describe("Check-in date"),
|
|
15393
|
+
check_out: external_exports.string().describe("Check-out date"),
|
|
15394
|
+
price: external_exports.number().describe("Price at time of abandonment")
|
|
15395
|
+
})
|
|
15396
|
+
).describe("Abandoned booking items")
|
|
15397
|
+
}),
|
|
15398
|
+
handle: async () => {
|
|
15399
|
+
const data = await graphql("getAbandonedItemsByCguid", { cguid: getCguid() }, PERSISTED_HASH);
|
|
15400
|
+
const items = data.getAbandonedItemsByCguid ?? [];
|
|
15401
|
+
return {
|
|
15402
|
+
items: items.map((item) => ({
|
|
15403
|
+
type: item.type ?? "",
|
|
15404
|
+
hotel_name: item.hotelName ?? "",
|
|
15405
|
+
hotel_id: item.hotelId ?? "",
|
|
15406
|
+
city_name: item.cityName ?? "",
|
|
15407
|
+
check_in: item.checkIn ?? "",
|
|
15408
|
+
check_out: item.checkOut ?? "",
|
|
15409
|
+
price: item.price ?? 0
|
|
15410
|
+
}))
|
|
15411
|
+
};
|
|
15412
|
+
}
|
|
15413
|
+
});
|
|
15414
|
+
|
|
15415
|
+
// src/tools/get-customer-coupons.ts
|
|
15416
|
+
var PERSISTED_HASH2 = "a1131592ee367b7b6dbe778e942d09d7d0219d5eacf47810a1894116d7454b6d";
|
|
15417
|
+
var isCouponError = (v) => {
|
|
15418
|
+
return "customerCouponError" in v;
|
|
15419
|
+
};
|
|
15420
|
+
var getCustomerCoupons = defineTool({
|
|
15421
|
+
name: "get_customer_coupons",
|
|
15422
|
+
displayName: "Get Customer Coupons",
|
|
15423
|
+
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.",
|
|
15424
|
+
summary: "Get your available coupons",
|
|
15425
|
+
icon: "ticket",
|
|
15426
|
+
group: "Account",
|
|
15427
|
+
input: external_exports.object({
|
|
15428
|
+
product: external_exports.enum(["STAY", "FLY", "DRIVE"]).optional().describe("Product type to filter coupons (default STAY)")
|
|
15429
|
+
}),
|
|
15430
|
+
output: external_exports.object({
|
|
15431
|
+
coupons: external_exports.array(
|
|
15432
|
+
external_exports.object({
|
|
15433
|
+
coupon_code: external_exports.string().describe("Coupon code"),
|
|
15434
|
+
description: external_exports.string().describe("Coupon description"),
|
|
15435
|
+
expiration_date: external_exports.string().describe("Expiration date"),
|
|
15436
|
+
min_spend: external_exports.number().describe("Minimum spend amount"),
|
|
15437
|
+
discount: external_exports.number().describe("Discount amount"),
|
|
15438
|
+
discount_type: external_exports.string().describe("Discount type (PERCENT, FIXED)")
|
|
15439
|
+
})
|
|
15440
|
+
).describe("Available coupons"),
|
|
15441
|
+
message: external_exports.string().describe("Status message (e.g., no coupons found)")
|
|
15442
|
+
}),
|
|
15443
|
+
handle: async (params) => {
|
|
15444
|
+
const data = await graphql(
|
|
15445
|
+
"CustomerCoupons",
|
|
15446
|
+
{
|
|
15447
|
+
customerRequestOptions: {
|
|
15448
|
+
products: [params.product ?? "STAY"]
|
|
15449
|
+
}
|
|
15450
|
+
},
|
|
15451
|
+
PERSISTED_HASH2
|
|
15452
|
+
);
|
|
15453
|
+
const result = data.customerCoupons;
|
|
15454
|
+
if (!result || isCouponError(result)) {
|
|
15455
|
+
return {
|
|
15456
|
+
coupons: [],
|
|
15457
|
+
message: result?.customerCouponError ?? "No coupons available"
|
|
15458
|
+
};
|
|
15459
|
+
}
|
|
15460
|
+
const couponData = result;
|
|
15461
|
+
const coupons = (couponData.customerCoupons ?? []).map((c) => ({
|
|
15462
|
+
coupon_code: c.couponCode ?? "",
|
|
15463
|
+
description: c.description ?? "",
|
|
15464
|
+
expiration_date: c.expirationDate ?? "",
|
|
15465
|
+
min_spend: c.minSpend ?? 0,
|
|
15466
|
+
discount: c.discount ?? 0,
|
|
15467
|
+
discount_type: c.discountType ?? ""
|
|
15468
|
+
}));
|
|
15469
|
+
return { coupons, message: coupons.length > 0 ? "OK" : "No coupons available" };
|
|
15470
|
+
}
|
|
15471
|
+
});
|
|
14579
15472
|
|
|
14580
15473
|
// src/tools/get-customer-profile.ts
|
|
14581
15474
|
var PERSISTED_HASH3 = "48d8218318dd4384631ab71f001f4475b9e47312a6bcfea98af8beb90526d7ff";
|
|
@@ -14644,6 +15537,80 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14644
15537
|
}
|
|
14645
15538
|
});
|
|
14646
15539
|
|
|
15540
|
+
// src/tools/get-flight-price-calendar.ts
|
|
15541
|
+
var PRICE_CALENDAR_QUERY2 = `
|
|
15542
|
+
query airPriceGuideCalendar($input: AirPriceGuideRequest) {
|
|
15543
|
+
airPriceGuide(input: $input) {
|
|
15544
|
+
error { type code message }
|
|
15545
|
+
records {
|
|
15546
|
+
dates
|
|
15547
|
+
minimumFare {
|
|
15548
|
+
isPrivateFare
|
|
15549
|
+
currency
|
|
15550
|
+
amtPerPax
|
|
15551
|
+
commonAttributes { takeOffTimes landingTimes }
|
|
15552
|
+
listOfStops { sliceId stops }
|
|
15553
|
+
}
|
|
15554
|
+
}
|
|
15555
|
+
}
|
|
15556
|
+
}`;
|
|
15557
|
+
var cabinClassSchema = external_exports.enum(["ECO", "PREMIUM", "BUS", "FIRST"]).describe("Cabin class \u2014 ECO (economy), PREMIUM (premium economy), BUS (business), FIRST (first)");
|
|
15558
|
+
var tripSchema = external_exports.object({
|
|
15559
|
+
origin: external_exports.string().describe("Origin airport/city code (e.g., JFK, NYC)"),
|
|
15560
|
+
destination: external_exports.string().describe("Destination airport/city code (e.g., LAX, LON)"),
|
|
15561
|
+
depart_date: external_exports.string().optional().describe("Single departure date in YYYY-MM-DD format. Provide either this or depart_date_range, not both."),
|
|
15562
|
+
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."),
|
|
15563
|
+
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.")
|
|
15564
|
+
}).describe("A single flight slice (leg). For one-way pass one slice; for round-trip pass two (outbound + return).");
|
|
15565
|
+
var buildTrip = (t) => {
|
|
15566
|
+
const trip = {
|
|
15567
|
+
originCity: [t.origin],
|
|
15568
|
+
destinationCity: [t.destination]
|
|
15569
|
+
};
|
|
15570
|
+
if (t.depart_date_from && t.depart_date_to) {
|
|
15571
|
+
trip.departDateRange = { fromDate: t.depart_date_from, toDate: t.depart_date_to };
|
|
15572
|
+
} else if (t.depart_date) {
|
|
15573
|
+
trip.departDate = t.depart_date;
|
|
15574
|
+
} else {
|
|
15575
|
+
throw ToolError.validation("Each trip must have either depart_date or both depart_date_from and depart_date_to.");
|
|
15576
|
+
}
|
|
15577
|
+
return trip;
|
|
15578
|
+
};
|
|
15579
|
+
var getFlightPriceCalendar = defineTool({
|
|
15580
|
+
name: "get_flight_price_calendar",
|
|
15581
|
+
displayName: "Get Flight Price Calendar",
|
|
15582
|
+
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.",
|
|
15583
|
+
summary: "Flight fare forecast for a date range",
|
|
15584
|
+
icon: "calendar-range",
|
|
15585
|
+
group: "Flights",
|
|
15586
|
+
input: external_exports.object({
|
|
15587
|
+
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"),
|
|
15588
|
+
cabin_class: cabinClassSchema.optional().describe("Cabin class filter (default ECO)")
|
|
15589
|
+
}),
|
|
15590
|
+
output: external_exports.object({
|
|
15591
|
+
records: external_exports.array(flightFareRecordSchema).describe("Cheapest fares by date combination, sorted by trip dates")
|
|
15592
|
+
}),
|
|
15593
|
+
handle: async (params) => {
|
|
15594
|
+
const variables = {
|
|
15595
|
+
input: {
|
|
15596
|
+
trips: params.trips.map(buildTrip),
|
|
15597
|
+
size: 720,
|
|
15598
|
+
consumer: "PCLN-HOME",
|
|
15599
|
+
cabinClass: params.cabin_class ?? "ECO"
|
|
15600
|
+
}
|
|
15601
|
+
};
|
|
15602
|
+
const data = await graphql("airPriceGuideCalendar", variables, PRICE_CALENDAR_QUERY2);
|
|
15603
|
+
const guide = data.airPriceGuide;
|
|
15604
|
+
if (guide?.error) {
|
|
15605
|
+
const msg = guide.error.message ?? "";
|
|
15606
|
+
if (msg === "Zero results") return { records: [] };
|
|
15607
|
+
throw ToolError.internal(`Flight price calendar error: ${msg}`);
|
|
15608
|
+
}
|
|
15609
|
+
const records = guide?.records ?? [];
|
|
15610
|
+
return { records: records.map(mapFlightFareRecord) };
|
|
15611
|
+
}
|
|
15612
|
+
});
|
|
15613
|
+
|
|
14647
15614
|
// src/tools/get-hotel-descriptions.ts
|
|
14648
15615
|
var PERSISTED_HASH5 = "991edc70fc5972ea86c4db02e07cc45ba1b75fffa12f4b5e2bd3998faaaf70c7";
|
|
14649
15616
|
var getHotelDescriptions = defineTool({
|
|
@@ -14794,6 +15761,93 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14794
15761
|
}
|
|
14795
15762
|
});
|
|
14796
15763
|
|
|
15764
|
+
// src/tools/list-flight-price-watches.ts
|
|
15765
|
+
var PRICE_WATCH_LIST_QUERY = `
|
|
15766
|
+
query PriceWatches($input: AirPriceWatchGetListRequest!) {
|
|
15767
|
+
airPriceWatchGetListResponse(input: $input) {
|
|
15768
|
+
status statusCode statusMessage email
|
|
15769
|
+
error { code message }
|
|
15770
|
+
priceWatchGetListResp
|
|
15771
|
+
}
|
|
15772
|
+
}`;
|
|
15773
|
+
var generateRequestId = () => {
|
|
15774
|
+
return `opentabs-${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;
|
|
15775
|
+
};
|
|
15776
|
+
var listFlightPriceWatches = defineTool({
|
|
15777
|
+
name: "list_flight_price_watches",
|
|
15778
|
+
displayName: "List Flight Price Watches",
|
|
15779
|
+
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.",
|
|
15780
|
+
summary: "List user's flight price alerts",
|
|
15781
|
+
icon: "bell",
|
|
15782
|
+
group: "Flights",
|
|
15783
|
+
input: external_exports.object({
|
|
15784
|
+
include_inactive: external_exports.boolean().optional().describe("Include inactive (paused or expired) watches in addition to active ones (default false)")
|
|
15785
|
+
}),
|
|
15786
|
+
output: external_exports.object({
|
|
15787
|
+
price_watches: external_exports.array(flightPriceWatchSchema).describe("Active flight price watches for the signed-in user")
|
|
15788
|
+
}),
|
|
15789
|
+
handle: async (params) => {
|
|
15790
|
+
const email3 = getEmail();
|
|
15791
|
+
const variables = {
|
|
15792
|
+
input: {
|
|
15793
|
+
email: email3,
|
|
15794
|
+
requestId: generateRequestId(),
|
|
15795
|
+
includeInactive: params.include_inactive ?? false,
|
|
15796
|
+
includeOptedOut: false
|
|
15797
|
+
}
|
|
15798
|
+
};
|
|
15799
|
+
const data = await flyGraphql("PriceWatches", variables, PRICE_WATCH_LIST_QUERY);
|
|
15800
|
+
const resp = data.airPriceWatchGetListResponse;
|
|
15801
|
+
if (resp?.status === "ERROR") {
|
|
15802
|
+
throw ToolError.internal(`Price watch list error: ${resp.statusMessage ?? "unknown error"}`);
|
|
15803
|
+
}
|
|
15804
|
+
if (resp?.error) {
|
|
15805
|
+
throw ToolError.internal(`Price watch list error: ${resp.error.message ?? "unknown error"}`);
|
|
15806
|
+
}
|
|
15807
|
+
const list = resp?.priceWatchGetListResp?.priceWatches ?? resp?.priceWatchGetListResp?.optedInData ?? [];
|
|
15808
|
+
return { price_watches: list.map(mapFlightPriceWatch) };
|
|
15809
|
+
}
|
|
15810
|
+
});
|
|
15811
|
+
|
|
15812
|
+
// src/tools/navigate-to-flight-search.ts
|
|
15813
|
+
var tripTypeSchema = external_exports.enum(["OW", "RT"]).describe("Trip type \u2014 OW (one-way) or RT (round-trip)");
|
|
15814
|
+
var cabinClassSchema2 = external_exports.enum(["ECONOMY", "PREMIUM", "BUSINESS", "FIRST"]).describe("Cabin class for the search URL");
|
|
15815
|
+
var toYmd = (date5) => {
|
|
15816
|
+
const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(date5);
|
|
15817
|
+
if (!match) throw new Error(`Invalid date ${date5} \u2014 expected YYYY-MM-DD`);
|
|
15818
|
+
return date5;
|
|
15819
|
+
};
|
|
15820
|
+
var navigateToFlightSearch = defineTool({
|
|
15821
|
+
name: "navigate_to_flight_search",
|
|
15822
|
+
displayName: "Navigate to Flight Search",
|
|
15823
|
+
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).",
|
|
15824
|
+
summary: "Open Priceline flight search for a route",
|
|
15825
|
+
icon: "plane",
|
|
15826
|
+
group: "Flights",
|
|
15827
|
+
input: external_exports.object({
|
|
15828
|
+
origin: external_exports.string().describe("Origin airport or city code (e.g., JFK, NYC)"),
|
|
15829
|
+
destination: external_exports.string().describe("Destination airport or city code (e.g., LAX, LON)"),
|
|
15830
|
+
depart_date: external_exports.string().describe("Departure date in YYYY-MM-DD format"),
|
|
15831
|
+
return_date: external_exports.string().optional().describe("Return date in YYYY-MM-DD format (round-trip only; omit for one-way)"),
|
|
15832
|
+
trip_type: tripTypeSchema.optional().describe("Trip type (default OW for one-way, RT when return_date is set)"),
|
|
15833
|
+
cabin_class: cabinClassSchema2.optional().describe("Cabin class (default ECONOMY)"),
|
|
15834
|
+
passengers: external_exports.number().int().min(1).max(8).optional().describe("Number of passengers (default 1)")
|
|
15835
|
+
}),
|
|
15836
|
+
output: external_exports.object({
|
|
15837
|
+
url: external_exports.string().describe("The Priceline flight search URL that was opened")
|
|
15838
|
+
}),
|
|
15839
|
+
handle: async (params) => {
|
|
15840
|
+
const depart = toYmd(params.depart_date);
|
|
15841
|
+
const tripType = params.trip_type ?? (params.return_date ? "RT" : "OW");
|
|
15842
|
+
const cabin = params.cabin_class ?? "ECONOMY";
|
|
15843
|
+
const pax = params.passengers ?? 1;
|
|
15844
|
+
const returnSegment = tripType === "RT" && params.return_date ? `/${toYmd(params.return_date)}` : "";
|
|
15845
|
+
const url2 = `https://www.priceline.com/m/fly/search/${params.origin}-${params.destination}/${depart}${returnSegment}/?tripType=${tripType}&cabinClass=${cabin}&numOfPassengers=${pax}`;
|
|
15846
|
+
window.location.href = url2;
|
|
15847
|
+
return { url: url2 };
|
|
15848
|
+
}
|
|
15849
|
+
});
|
|
15850
|
+
|
|
14797
15851
|
// src/tools/navigate-to-hotel.ts
|
|
14798
15852
|
var navigateToHotel = defineTool({
|
|
14799
15853
|
name: "navigate_to_hotel",
|
|
@@ -14850,6 +15904,26 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14850
15904
|
}
|
|
14851
15905
|
});
|
|
14852
15906
|
|
|
15907
|
+
// src/tools/search-airports.ts
|
|
15908
|
+
var searchAirports = defineTool({
|
|
15909
|
+
name: "search_airports",
|
|
15910
|
+
displayName: "Search Airports",
|
|
15911
|
+
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.",
|
|
15912
|
+
summary: "Find airport and city codes by keyword",
|
|
15913
|
+
icon: "plane-takeoff",
|
|
15914
|
+
group: "Flights",
|
|
15915
|
+
input: external_exports.object({
|
|
15916
|
+
keyword: external_exports.string().describe('Search keyword \u2014 a city name, airport name, or IATA code (e.g., "new york", "heathrow", "JFK")')
|
|
15917
|
+
}),
|
|
15918
|
+
output: external_exports.object({
|
|
15919
|
+
airports: external_exports.array(airportSchema).describe("Matching airports and metro areas ranked by relevance")
|
|
15920
|
+
}),
|
|
15921
|
+
handle: async (params) => {
|
|
15922
|
+
const items = await autocomplete("flights", params.keyword);
|
|
15923
|
+
return { airports: items.map(mapAirport) };
|
|
15924
|
+
}
|
|
15925
|
+
});
|
|
15926
|
+
|
|
14853
15927
|
// src/tools/search-hotels.ts
|
|
14854
15928
|
var PERSISTED_HASH9 = "ffaeed6473a0adf0074403134bb897df6c6f402f9a0322017b0ec4d268d943c3";
|
|
14855
15929
|
var searchHotels = defineTool({
|
|
@@ -14993,6 +16067,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14993
16067
|
getMerchandisingBadges,
|
|
14994
16068
|
getPriceGuidance,
|
|
14995
16069
|
navigateToHotel,
|
|
16070
|
+
// Flights
|
|
16071
|
+
searchAirports,
|
|
16072
|
+
getFlightPriceCalendar,
|
|
16073
|
+
findCheapestFlightDate,
|
|
16074
|
+
listFlightPriceWatches,
|
|
16075
|
+
navigateToFlightSearch,
|
|
14996
16076
|
// Account
|
|
14997
16077
|
getCustomerProfile,
|
|
14998
16078
|
getCustomerCoupons,
|
|
@@ -15006,7 +16086,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15006
16086
|
};
|
|
15007
16087
|
var src_default = new PricelinePlugin();
|
|
15008
16088
|
|
|
15009
|
-
// dist/
|
|
16089
|
+
// dist/_adapter_entry_42ad1878-e5c5-4b74-9b7c-c78c0e998891.ts
|
|
15010
16090
|
if (!globalThis.__openTabs) {
|
|
15011
16091
|
globalThis.__openTabs = {};
|
|
15012
16092
|
} else {
|
|
@@ -15094,6 +16174,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15094
16174
|
const origHandle = tool.handle;
|
|
15095
16175
|
tool.handle = async function(...handleArgs) {
|
|
15096
16176
|
const startTime = performance.now();
|
|
16177
|
+
const runtime = globalThis.__openTabs;
|
|
16178
|
+
runtime._pluginName = "priceline";
|
|
15097
16179
|
if (hasLifecycleHooks && typeof src_default.onToolInvocationStart === "function") {
|
|
15098
16180
|
try {
|
|
15099
16181
|
src_default.onToolInvocationStart(tool.name);
|
|
@@ -15222,5 +16304,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15222
16304
|
};
|
|
15223
16305
|
delete src_default.onDeactivate;
|
|
15224
16306
|
}
|
|
15225
|
-
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["priceline"]){var a=o.adapters["priceline"];a.__adapterHash="
|
|
16307
|
+
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["priceline"]){var a=o.adapters["priceline"];a.__adapterHash="9fc3443ca87448f19750143d81ee45e4ea133cfdb224402a7ea25247692a5bd5";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
16308
|
//# sourceMappingURL=adapter.iife.js.map
|