@gengage/assistant-fe 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chat/api.d.ts.map +1 -1
- package/dist/chat/chat-presentation-state.d.ts +54 -0
- package/dist/chat/chat-presentation-state.d.ts.map +1 -0
- package/dist/chat/components/AIGroupingCards.d.ts.map +1 -1
- package/dist/chat/components/AISuggestedSearchCards.d.ts.map +1 -1
- package/dist/chat/components/AITopPicks.d.ts.map +1 -1
- package/dist/chat/components/ChatDrawer.d.ts +46 -0
- package/dist/chat/components/ChatDrawer.d.ts.map +1 -1
- package/dist/chat/components/GroundingReviewCard.d.ts.map +1 -1
- package/dist/chat/components/ThumbnailsColumn.d.ts +2 -0
- package/dist/chat/components/ThumbnailsColumn.d.ts.map +1 -1
- package/dist/chat/index.d.ts +10 -0
- package/dist/chat/index.d.ts.map +1 -1
- package/dist/chat/locales/en.d.ts.map +1 -1
- package/dist/chat/locales/tr.d.ts.map +1 -1
- package/dist/chat/types.d.ts +7 -1
- package/dist/chat/types.d.ts.map +1 -1
- package/dist/chat/utils/chat-presentation-debug.d.ts +20 -0
- package/dist/chat/utils/chat-presentation-debug.d.ts.map +1 -0
- package/dist/chat/utils/get-chat-scroll-element.d.ts +11 -0
- package/dist/chat/utils/get-chat-scroll-element.d.ts.map +1 -0
- package/dist/chat.cjs +1 -1
- package/dist/chat.iife.js +22 -22
- package/dist/chat.iife.js.map +1 -1
- package/dist/chat.js +10 -6
- package/dist/common/action-router.d.ts.map +1 -1
- package/dist/common/ga-datalayer.d.ts.map +1 -1
- package/dist/common/index.d.ts +2 -0
- package/dist/common/index.d.ts.map +1 -1
- package/dist/common/protocol-adapter.d.ts.map +1 -1
- package/dist/common/suggested-search-keywords.d.ts +19 -0
- package/dist/common/suggested-search-keywords.d.ts.map +1 -0
- package/dist/common.cjs +1 -1
- package/dist/common.js +50 -48
- package/dist/index-BLq9Phmq.js +5101 -0
- package/dist/index-BLq9Phmq.js.map +1 -0
- package/dist/{index-DjdiNtXX.cjs → index-BeP3ETm1.cjs} +2 -2
- package/dist/{index-DjdiNtXX.cjs.map → index-BeP3ETm1.cjs.map} +1 -1
- package/dist/index-BwBJkYGY.cjs +13 -0
- package/dist/index-BwBJkYGY.cjs.map +1 -0
- package/dist/{index-hUs4nTXp.js → index-ZO_kMfUR.js} +3 -3
- package/dist/{index-hUs4nTXp.js.map → index-ZO_kMfUR.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +5 -5
- package/dist/native.cjs +1 -1
- package/dist/native.iife.js +28 -28
- package/dist/native.iife.js.map +1 -1
- package/dist/native.js +1 -1
- package/dist/qna/index.d.ts.map +1 -1
- package/dist/qna.cjs +1 -1
- package/dist/qna.cjs.map +1 -1
- package/dist/qna.iife.js +6 -6
- package/dist/qna.iife.js.map +1 -1
- package/dist/qna.js +8 -8
- package/dist/qna.js.map +1 -1
- package/dist/schemas-CaaT5BuE.cjs +86 -0
- package/dist/schemas-CaaT5BuE.cjs.map +1 -0
- package/dist/{schemas-C7h8aelU.js → schemas-DR_GaPQj.js} +895 -873
- package/dist/schemas-DR_GaPQj.js.map +1 -0
- package/dist/simrel/index.d.ts.map +1 -1
- package/dist/simrel/locales/en.d.ts.map +1 -1
- package/dist/simrel/locales/tr.d.ts.map +1 -1
- package/dist/simrel/types.d.ts +4 -0
- package/dist/simrel/types.d.ts.map +1 -1
- package/dist/simrel.cjs +1 -1
- package/dist/simrel.cjs.map +1 -1
- package/dist/simrel.iife.js +7 -7
- package/dist/simrel.iife.js.map +1 -1
- package/dist/simrel.js +29 -25
- package/dist/simrel.js.map +1 -1
- package/package.json +2 -1
- package/dist/index-BQVIyEOM.cjs +0 -13
- package/dist/index-BQVIyEOM.cjs.map +0 -1
- package/dist/index-Cdmhc_35.js +0 -4783
- package/dist/index-Cdmhc_35.js.map +0 -1
- package/dist/schemas-C7h8aelU.js.map +0 -1
- package/dist/schemas-DXvpS-Yg.cjs +0 -86
- package/dist/schemas-DXvpS-Yg.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const qt = ({ element: e, renderElement: t }) => {
|
|
2
2
|
if (!e.children || e.children.length === 0)
|
|
3
3
|
return null;
|
|
4
4
|
const n = document.createElement("div");
|
|
@@ -8,10 +8,10 @@ const Jt = ({ element: e, renderElement: t }) => {
|
|
|
8
8
|
}
|
|
9
9
|
return n;
|
|
10
10
|
};
|
|
11
|
-
function
|
|
11
|
+
function ic(e) {
|
|
12
12
|
const t = document.createElement("div");
|
|
13
13
|
if (t.className = e.containerClassName, !e.spec.elements[e.spec.root]) return t;
|
|
14
|
-
const r = e.unknownRenderer ??
|
|
14
|
+
const r = e.unknownRenderer ?? qt, o = (s) => {
|
|
15
15
|
const a = e.spec.elements[s];
|
|
16
16
|
if (!a) return null;
|
|
17
17
|
const c = e.registry[a.type];
|
|
@@ -31,14 +31,14 @@ function ec(e) {
|
|
|
31
31
|
}, i = o(e.spec.root);
|
|
32
32
|
return i && t.appendChild(i), t;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function sc(e, t) {
|
|
35
35
|
if (!t) return e;
|
|
36
36
|
const n = { ...e };
|
|
37
37
|
for (const [r, o] of Object.entries(t))
|
|
38
38
|
o && (n[r] = o);
|
|
39
39
|
return n;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function ac(e, t) {
|
|
42
42
|
const n = {
|
|
43
43
|
event_name: "stream.start",
|
|
44
44
|
account_id: e.account_id,
|
|
@@ -51,7 +51,7 @@ function nc(e, t) {
|
|
|
51
51
|
};
|
|
52
52
|
return e.view_id !== void 0 && (n.view_id = e.view_id), e.user_id !== void 0 && (n.user_id = e.user_id), t.widget !== void 0 && (n.widget = t.widget), e.page_type !== void 0 && (n.page_type = e.page_type), e.sku !== void 0 && (n.sku = e.sku), n;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function cc(e, t) {
|
|
55
55
|
const n = {
|
|
56
56
|
request_id: t.request_id,
|
|
57
57
|
chunk_index: t.chunk_index
|
|
@@ -66,7 +66,7 @@ function rc(e, t) {
|
|
|
66
66
|
};
|
|
67
67
|
return e.view_id !== void 0 && (r.view_id = e.view_id), e.user_id !== void 0 && (r.user_id = e.user_id), t.widget !== void 0 && (r.widget = t.widget), e.page_type !== void 0 && (r.page_type = e.page_type), e.sku !== void 0 && (r.sku = e.sku), r;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function uc(e, t) {
|
|
70
70
|
const n = {
|
|
71
71
|
event_name: "stream.ui_spec",
|
|
72
72
|
account_id: e.account_id,
|
|
@@ -80,7 +80,7 @@ function oc(e, t) {
|
|
|
80
80
|
};
|
|
81
81
|
return e.view_id !== void 0 && (n.view_id = e.view_id), e.user_id !== void 0 && (n.user_id = e.user_id), t.widget !== void 0 && (n.widget = t.widget), e.page_type !== void 0 && (n.page_type = e.page_type), e.sku !== void 0 && (n.sku = e.sku), n;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function dc(e, t) {
|
|
84
84
|
const n = {
|
|
85
85
|
event_name: "stream.done",
|
|
86
86
|
account_id: e.account_id,
|
|
@@ -94,7 +94,7 @@ function ic(e, t) {
|
|
|
94
94
|
};
|
|
95
95
|
return e.view_id !== void 0 && (n.view_id = e.view_id), e.user_id !== void 0 && (n.user_id = e.user_id), t.widget !== void 0 && (n.widget = t.widget), e.page_type !== void 0 && (n.page_type = e.page_type), e.sku !== void 0 && (n.sku = e.sku), n;
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function lc(e, t) {
|
|
98
98
|
const n = {
|
|
99
99
|
event_name: "stream.error",
|
|
100
100
|
account_id: e.account_id,
|
|
@@ -108,7 +108,7 @@ function sc(e, t) {
|
|
|
108
108
|
};
|
|
109
109
|
return e.view_id !== void 0 && (n.view_id = e.view_id), e.user_id !== void 0 && (n.user_id = e.user_id), t.widget !== void 0 && (n.widget = t.widget), e.page_type !== void 0 && (n.page_type = e.page_type), e.sku !== void 0 && (n.sku = e.sku), n;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function fc(e, t) {
|
|
112
112
|
const n = {
|
|
113
113
|
model: t.model,
|
|
114
114
|
prompt_tokens: t.prompt_tokens,
|
|
@@ -125,7 +125,7 @@ function ac(e, t) {
|
|
|
125
125
|
};
|
|
126
126
|
return e.view_id !== void 0 && (r.view_id = e.view_id), e.user_id !== void 0 && (r.user_id = e.user_id), e.page_type !== void 0 && (r.page_type = e.page_type), e.sku !== void 0 && (r.sku = e.sku), r;
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function pc(e, t) {
|
|
129
129
|
const n = {
|
|
130
130
|
event_name: "metering.increment",
|
|
131
131
|
account_id: e.account_id,
|
|
@@ -139,7 +139,7 @@ function cc(e, t) {
|
|
|
139
139
|
};
|
|
140
140
|
return e.view_id !== void 0 && (n.view_id = e.view_id), e.user_id !== void 0 && (n.user_id = e.user_id), e.page_type !== void 0 && (n.page_type = e.page_type), e.sku !== void 0 && (n.sku = e.sku), n;
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function Vt(e, t) {
|
|
143
143
|
const n = {
|
|
144
144
|
event_name: "metering.summary",
|
|
145
145
|
account_id: e.account_id,
|
|
@@ -153,7 +153,7 @@ function qt(e, t) {
|
|
|
153
153
|
};
|
|
154
154
|
return e.view_id !== void 0 && (n.view_id = e.view_id), e.user_id !== void 0 && (n.user_id = e.user_id), e.page_type !== void 0 && (n.page_type = e.page_type), e.sku !== void 0 && (n.sku = e.sku), n;
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function gc(e, t) {
|
|
157
157
|
const n = {
|
|
158
158
|
event_name: "chat.history.snapshot",
|
|
159
159
|
account_id: e.account_id,
|
|
@@ -167,7 +167,7 @@ function uc(e, t) {
|
|
|
167
167
|
};
|
|
168
168
|
return e.view_id !== void 0 && (n.view_id = e.view_id), e.user_id !== void 0 && (n.user_id = e.user_id), e.page_type !== void 0 && (n.page_type = e.page_type), e.sku !== void 0 && (n.sku = e.sku), n;
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function hc(e, t) {
|
|
171
171
|
const n = {
|
|
172
172
|
event_name: "widget.history.snapshot",
|
|
173
173
|
account_id: e.account_id,
|
|
@@ -182,7 +182,7 @@ function dc(e, t) {
|
|
|
182
182
|
};
|
|
183
183
|
return e.view_id !== void 0 && (n.view_id = e.view_id), e.user_id !== void 0 && (n.user_id = e.user_id), e.page_type !== void 0 && (n.page_type = e.page_type), e.sku !== void 0 && (n.sku = e.sku), n;
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function mc(e, t) {
|
|
186
186
|
const n = {
|
|
187
187
|
event_name: "basket.add",
|
|
188
188
|
account_id: e.account_id,
|
|
@@ -200,7 +200,7 @@ function lc(e, t) {
|
|
|
200
200
|
};
|
|
201
201
|
return e.view_id !== void 0 && (n.view_id = e.view_id), e.user_id !== void 0 && (n.user_id = e.user_id), e.page_type !== void 0 && (n.page_type = e.page_type), e.sku !== void 0 && (n.sku = e.sku), n;
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function Wt(e, t) {
|
|
204
204
|
const n = {
|
|
205
205
|
event_name: "checkout.start",
|
|
206
206
|
account_id: e.account_id,
|
|
@@ -217,7 +217,7 @@ function Vt(e, t) {
|
|
|
217
217
|
};
|
|
218
218
|
return e.view_id !== void 0 && (n.view_id = e.view_id), e.user_id !== void 0 && (n.user_id = e.user_id), e.page_type !== void 0 && (n.page_type = e.page_type), e.sku !== void 0 && (n.sku = e.sku), n;
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function Gt(e, t) {
|
|
221
221
|
const n = {
|
|
222
222
|
event_name: "checkout.complete",
|
|
223
223
|
account_id: e.account_id,
|
|
@@ -234,7 +234,7 @@ function Wt(e, t) {
|
|
|
234
234
|
};
|
|
235
235
|
return e.view_id !== void 0 && (n.view_id = e.view_id), e.user_id !== void 0 && (n.user_id = e.user_id), e.page_type !== void 0 && (n.page_type = e.page_type), e.sku !== void 0 && (n.sku = e.sku), n;
|
|
236
236
|
}
|
|
237
|
-
const
|
|
237
|
+
const Bt = /* @__PURE__ */ new Set([
|
|
238
238
|
"p",
|
|
239
239
|
"br",
|
|
240
240
|
"a",
|
|
@@ -267,7 +267,7 @@ const Gt = /* @__PURE__ */ new Set([
|
|
|
267
267
|
"img",
|
|
268
268
|
"sup",
|
|
269
269
|
"sub"
|
|
270
|
-
]),
|
|
270
|
+
]), Kt = /* @__PURE__ */ new Set([
|
|
271
271
|
"script",
|
|
272
272
|
"iframe",
|
|
273
273
|
"object",
|
|
@@ -282,7 +282,7 @@ const Gt = /* @__PURE__ */ new Set([
|
|
|
282
282
|
"meta",
|
|
283
283
|
"template",
|
|
284
284
|
"noscript"
|
|
285
|
-
]),
|
|
285
|
+
]), Ie = {
|
|
286
286
|
"*": /* @__PURE__ */ new Set(["class"]),
|
|
287
287
|
a: /* @__PURE__ */ new Set(["href", "target", "rel"]),
|
|
288
288
|
img: /* @__PURE__ */ new Set(["src", "alt", "width", "height"]),
|
|
@@ -293,7 +293,7 @@ const Gt = /* @__PURE__ */ new Set([
|
|
|
293
293
|
function Ht(e) {
|
|
294
294
|
return /^\s*javascript\s*:/i.test(e);
|
|
295
295
|
}
|
|
296
|
-
const
|
|
296
|
+
const Yt = /* @__PURE__ */ new Set([
|
|
297
297
|
"color",
|
|
298
298
|
"background-color",
|
|
299
299
|
"font-size",
|
|
@@ -348,7 +348,7 @@ const Kt = /* @__PURE__ */ new Set([
|
|
|
348
348
|
"justify-content",
|
|
349
349
|
"align-items",
|
|
350
350
|
"gap"
|
|
351
|
-
]),
|
|
351
|
+
]), Xt = /url\s*\(|expression\s*\(|javascript\s*:|\bimport\b|-moz-binding|behavior\s*:/i;
|
|
352
352
|
function Qt(e) {
|
|
353
353
|
const t = [];
|
|
354
354
|
for (const n of e.split(";")) {
|
|
@@ -357,31 +357,31 @@ function Qt(e) {
|
|
|
357
357
|
const o = r.indexOf(":");
|
|
358
358
|
if (o === -1) continue;
|
|
359
359
|
const i = r.slice(0, o).trim().toLowerCase(), s = r.slice(o + 1).trim();
|
|
360
|
-
|
|
360
|
+
Yt.has(i) && (Xt.test(s) || t.push(r));
|
|
361
361
|
}
|
|
362
362
|
return t.join("; ");
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function me(e, t) {
|
|
365
365
|
if (e.nodeType === Node.TEXT_NODE) return;
|
|
366
366
|
if (e.nodeType !== Node.ELEMENT_NODE) {
|
|
367
367
|
e.parentNode?.removeChild(e);
|
|
368
368
|
return;
|
|
369
369
|
}
|
|
370
370
|
const n = e, r = n.tagName.toLowerCase();
|
|
371
|
-
if (
|
|
371
|
+
if (Kt.has(r)) {
|
|
372
372
|
n.parentNode?.removeChild(n);
|
|
373
373
|
return;
|
|
374
374
|
}
|
|
375
|
-
if (!
|
|
375
|
+
if (!Bt.has(r)) {
|
|
376
376
|
const c = Array.from(n.childNodes);
|
|
377
377
|
for (const u of c)
|
|
378
378
|
t.insertBefore(u, n);
|
|
379
379
|
t.removeChild(n);
|
|
380
380
|
for (const u of c)
|
|
381
|
-
|
|
381
|
+
me(u, t);
|
|
382
382
|
return;
|
|
383
383
|
}
|
|
384
|
-
const o =
|
|
384
|
+
const o = Ie["*"] ?? /* @__PURE__ */ new Set(), i = Ie[r] ?? /* @__PURE__ */ new Set(), s = Array.from(n.attributes);
|
|
385
385
|
for (const c of s) {
|
|
386
386
|
const u = c.name.toLowerCase();
|
|
387
387
|
if (!o.has(u) && !i.has(u)) {
|
|
@@ -412,36 +412,36 @@ function he(e, t) {
|
|
|
412
412
|
}
|
|
413
413
|
const a = Array.from(n.childNodes);
|
|
414
414
|
for (const c of a)
|
|
415
|
-
|
|
415
|
+
me(c, n);
|
|
416
416
|
}
|
|
417
|
-
const
|
|
418
|
-
function
|
|
417
|
+
const st = ["http:", "https:"];
|
|
418
|
+
function _c(e) {
|
|
419
419
|
try {
|
|
420
|
-
return
|
|
420
|
+
return st.includes(new URL(e).protocol);
|
|
421
421
|
} catch {
|
|
422
422
|
return !1;
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function at(e) {
|
|
426
426
|
if (e.startsWith("/") && !e.startsWith("//")) return !0;
|
|
427
427
|
try {
|
|
428
428
|
const t = new URL(e);
|
|
429
|
-
return
|
|
429
|
+
return st.includes(t.protocol);
|
|
430
430
|
} catch {
|
|
431
431
|
return !1;
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
|
-
function
|
|
435
|
-
(t === "href" || t === "src") && !
|
|
434
|
+
function yc(e, t, n) {
|
|
435
|
+
(t === "href" || t === "src") && !at(n) || e.setAttribute(t, n);
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function vc(e) {
|
|
438
438
|
if (!e) return "";
|
|
439
439
|
const n = new DOMParser().parseFromString(e, "text/html").body, r = Array.from(n.childNodes);
|
|
440
440
|
for (const o of r)
|
|
441
|
-
|
|
441
|
+
me(o, n);
|
|
442
442
|
return n.innerHTML;
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function wc(e, t) {
|
|
445
445
|
window.dispatchEvent(new CustomEvent(e, { detail: t, bubbles: !1 }));
|
|
446
446
|
}
|
|
447
447
|
function te(e, t) {
|
|
@@ -450,7 +450,7 @@ function te(e, t) {
|
|
|
450
450
|
};
|
|
451
451
|
return window.addEventListener(e, n), () => window.removeEventListener(e, n);
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function en(e) {
|
|
454
454
|
if (e.type !== "user_message" && e.type !== "inputText") return null;
|
|
455
455
|
if (typeof e.payload == "string" && e.payload.trim().length > 0)
|
|
456
456
|
return e.payload.trim();
|
|
@@ -463,7 +463,7 @@ function Xt(e) {
|
|
|
463
463
|
}
|
|
464
464
|
return typeof e.title == "string" && e.title.trim().length > 0 ? e.title.trim() : null;
|
|
465
465
|
}
|
|
466
|
-
function
|
|
466
|
+
function bc(e) {
|
|
467
467
|
let t = !1;
|
|
468
468
|
const n = [];
|
|
469
469
|
let r = 0, o = null, i = 0;
|
|
@@ -476,13 +476,13 @@ function mc(e) {
|
|
|
476
476
|
"[gengage] QNA tried to open chat, but chat widget is not initialized. Ensure GengageChat is initialized before calling wireQNAToChat()."
|
|
477
477
|
), t = !0), e?.onChatUnavailable?.();
|
|
478
478
|
}
|
|
479
|
-
function l(m,
|
|
480
|
-
const
|
|
481
|
-
if (
|
|
482
|
-
m.open?.(), m.sendMessage(
|
|
479
|
+
function l(m, b) {
|
|
480
|
+
const Z = en(b);
|
|
481
|
+
if (Z && m.sendMessage) {
|
|
482
|
+
m.open?.(), m.sendMessage(Z);
|
|
483
483
|
return;
|
|
484
484
|
}
|
|
485
|
-
m.openWithAction?.(
|
|
485
|
+
m.openWithAction?.(b);
|
|
486
486
|
}
|
|
487
487
|
function f() {
|
|
488
488
|
o !== null && (window.clearInterval(o), o = null);
|
|
@@ -491,9 +491,9 @@ function mc(e) {
|
|
|
491
491
|
const m = c();
|
|
492
492
|
if (!m) return !1;
|
|
493
493
|
if (r > 0 && (m.open?.(), r = 0), n.length > 0) {
|
|
494
|
-
const
|
|
495
|
-
for (const
|
|
496
|
-
l(m,
|
|
494
|
+
const b = n.splice(0, n.length);
|
|
495
|
+
for (const Z of b)
|
|
496
|
+
l(m, Z);
|
|
497
497
|
}
|
|
498
498
|
return f(), !0;
|
|
499
499
|
}
|
|
@@ -503,9 +503,9 @@ function mc(e) {
|
|
|
503
503
|
}, s));
|
|
504
504
|
}
|
|
505
505
|
const y = te("gengage:qna:action", (m) => {
|
|
506
|
-
const
|
|
507
|
-
if (
|
|
508
|
-
l(
|
|
506
|
+
const b = c();
|
|
507
|
+
if (b) {
|
|
508
|
+
l(b, m);
|
|
509
509
|
return;
|
|
510
510
|
}
|
|
511
511
|
u(), n.length >= 20 && n.shift(), n.push(m), g();
|
|
@@ -521,32 +521,32 @@ function mc(e) {
|
|
|
521
521
|
y(), _(), n.length = 0, r = 0, f();
|
|
522
522
|
};
|
|
523
523
|
}
|
|
524
|
-
function
|
|
524
|
+
function kc() {
|
|
525
525
|
return te("gengage:similar:product-click", ({ sku: e, url: t, sessionId: n }) => {
|
|
526
|
-
n && window.gengage?.chat?.saveSession(n, e),
|
|
526
|
+
n && window.gengage?.chat?.saveSession(n, e), at(t) && (window.location.href = t);
|
|
527
527
|
});
|
|
528
528
|
}
|
|
529
|
-
function
|
|
529
|
+
function tn() {
|
|
530
530
|
const t = window.__gengageSessionId ?? sessionStorage.getItem("gengage_session_id") ?? null ?? crypto.randomUUID();
|
|
531
531
|
return window.__gengageSessionId = t, sessionStorage.setItem("gengage_session_id", t), window.gengage || (window.gengage = {}), window.gengage.sessionId = t, t;
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function zc() {
|
|
534
534
|
return window.gengage?.pageContext ?? null;
|
|
535
535
|
}
|
|
536
|
-
function
|
|
536
|
+
function Sc(e) {
|
|
537
537
|
window.gengage || (window.gengage = {}), window.gengage.pageContext = {
|
|
538
538
|
pageType: "other",
|
|
539
539
|
...window.gengage.pageContext,
|
|
540
540
|
...e
|
|
541
541
|
}, window.dispatchEvent(new CustomEvent("gengage:context:update", { detail: e }));
|
|
542
542
|
}
|
|
543
|
-
function
|
|
543
|
+
function nn(e) {
|
|
544
544
|
return {
|
|
545
|
-
sessionId: e?.sessionId ??
|
|
545
|
+
sessionId: e?.sessionId ?? tn(),
|
|
546
546
|
...e
|
|
547
547
|
};
|
|
548
548
|
}
|
|
549
|
-
const
|
|
549
|
+
const Ae = {
|
|
550
550
|
"--gengage-chat-offset": "20px",
|
|
551
551
|
"--gengage-chat-launcher-size": "56px",
|
|
552
552
|
"--gengage-chat-width": "400px",
|
|
@@ -560,41 +560,41 @@ const Ie = {
|
|
|
560
560
|
"--gengage-qna-input-radius": "14px",
|
|
561
561
|
"--gengage-simrel-card-radius": "14px"
|
|
562
562
|
};
|
|
563
|
-
function
|
|
564
|
-
return e ? { ...
|
|
563
|
+
function rn(e) {
|
|
564
|
+
return e ? { ...Ae, ...e } : { ...Ae };
|
|
565
565
|
}
|
|
566
|
-
const
|
|
567
|
-
let
|
|
568
|
-
function
|
|
569
|
-
return typeof e == "string" && e.toLowerCase().startsWith("tr") ? "
|
|
566
|
+
const D = "gengage-global-toast-root", Pe = "gengage-global-toast-style", be = "gengage-global-toast-root--visible", on = 4200, sn = 1500, an = 15e3;
|
|
567
|
+
let Ne = !1, J = null;
|
|
568
|
+
function $c(e) {
|
|
569
|
+
return typeof e == "string" && e.toLowerCase().startsWith("tr") ? "Bağlantı sorunu oluştu. Lütfen tekrar deneyin." : "Connection issue. Please try again.";
|
|
570
570
|
}
|
|
571
|
-
function
|
|
572
|
-
|
|
573
|
-
|
|
571
|
+
function cn() {
|
|
572
|
+
Ne || typeof window > "u" || typeof document > "u" || (Ne = !0, te("gengage:global:error", (e) => {
|
|
573
|
+
un(e);
|
|
574
574
|
}));
|
|
575
575
|
}
|
|
576
|
-
function
|
|
576
|
+
function un(e) {
|
|
577
577
|
if (typeof document > "u") return;
|
|
578
578
|
const t = e.message.trim();
|
|
579
579
|
if (!t) return;
|
|
580
|
-
|
|
581
|
-
const n =
|
|
580
|
+
gn();
|
|
581
|
+
const n = fn();
|
|
582
582
|
n.innerHTML = "";
|
|
583
583
|
const r = document.createElement("section");
|
|
584
584
|
r.className = "gengage-global-toast gengage-global-toast--error", r.setAttribute("role", "status"), r.setAttribute("aria-live", "polite");
|
|
585
585
|
const o = document.createElement("div");
|
|
586
|
-
o.className = "gengage-global-toast-title", o.textContent =
|
|
586
|
+
o.className = "gengage-global-toast-title", o.textContent = ln(e.source);
|
|
587
587
|
const i = document.createElement("div");
|
|
588
|
-
i.className = "gengage-global-toast-message", i.textContent = t, r.appendChild(o), r.appendChild(i), n.appendChild(r), n.classList.add(
|
|
589
|
-
|
|
590
|
-
},
|
|
588
|
+
i.className = "gengage-global-toast-message", i.textContent = t, r.appendChild(o), r.appendChild(i), n.appendChild(r), n.classList.add(be), J && (clearTimeout(J), J = null), J = setTimeout(() => {
|
|
589
|
+
dn();
|
|
590
|
+
}, pn(e.durationMs));
|
|
591
591
|
}
|
|
592
|
-
function
|
|
592
|
+
function dn() {
|
|
593
593
|
if (typeof document > "u") return;
|
|
594
|
-
const e = document.getElementById(
|
|
595
|
-
e && (e.classList.remove(
|
|
594
|
+
const e = document.getElementById(D);
|
|
595
|
+
e && (e.classList.remove(be), e.innerHTML = "", J && (clearTimeout(J), J = null));
|
|
596
596
|
}
|
|
597
|
-
function
|
|
597
|
+
function ln(e) {
|
|
598
598
|
switch (e) {
|
|
599
599
|
case "chat":
|
|
600
600
|
return "Chat warning";
|
|
@@ -606,30 +606,30 @@ function dn(e) {
|
|
|
606
606
|
return "Connection warning";
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
|
-
function
|
|
610
|
-
const e = document.getElementById(
|
|
609
|
+
function fn() {
|
|
610
|
+
const e = document.getElementById(D);
|
|
611
611
|
if (e instanceof HTMLElement) return e;
|
|
612
612
|
const t = document.createElement("div");
|
|
613
|
-
return t.id =
|
|
613
|
+
return t.id = D, t.className = "gengage-global-toast-root", document.body.appendChild(t), t;
|
|
614
614
|
}
|
|
615
|
-
function
|
|
616
|
-
return typeof e != "number" || !Number.isFinite(e) ?
|
|
615
|
+
function pn(e) {
|
|
616
|
+
return typeof e != "number" || !Number.isFinite(e) ? on : Math.min(an, Math.max(sn, Math.round(e)));
|
|
617
617
|
}
|
|
618
|
-
function
|
|
619
|
-
if (document.getElementById(
|
|
618
|
+
function gn() {
|
|
619
|
+
if (document.getElementById(Pe)) return;
|
|
620
620
|
const e = document.createElement("style");
|
|
621
|
-
e.id =
|
|
622
|
-
#${
|
|
621
|
+
e.id = Pe, e.textContent = `
|
|
622
|
+
#${D} {
|
|
623
623
|
position: fixed;
|
|
624
624
|
top: 16px;
|
|
625
625
|
right: 16px;
|
|
626
626
|
z-index: 2147483646;
|
|
627
627
|
pointer-events: none;
|
|
628
628
|
}
|
|
629
|
-
#${
|
|
629
|
+
#${D}.${be} {
|
|
630
630
|
pointer-events: auto;
|
|
631
631
|
}
|
|
632
|
-
#${
|
|
632
|
+
#${D} .gengage-global-toast {
|
|
633
633
|
min-width: 260px;
|
|
634
634
|
max-width: min(92vw, 420px);
|
|
635
635
|
border-radius: 12px;
|
|
@@ -644,12 +644,12 @@ function pn() {
|
|
|
644
644
|
line-height: 1.4;
|
|
645
645
|
animation: gengage-global-toast-in 180ms ease-out forwards;
|
|
646
646
|
}
|
|
647
|
-
#${
|
|
647
|
+
#${D} .gengage-global-toast-title {
|
|
648
648
|
margin: 0 0 4px;
|
|
649
649
|
font-size: 12px;
|
|
650
650
|
font-weight: 700;
|
|
651
651
|
}
|
|
652
|
-
#${
|
|
652
|
+
#${D} .gengage-global-toast-message {
|
|
653
653
|
margin: 0;
|
|
654
654
|
font-weight: 500;
|
|
655
655
|
}
|
|
@@ -666,7 +666,7 @@ function pn() {
|
|
|
666
666
|
`, document.head.appendChild(e);
|
|
667
667
|
}
|
|
668
668
|
let Y = null;
|
|
669
|
-
function
|
|
669
|
+
function hn() {
|
|
670
670
|
if (Y !== null) return Y;
|
|
671
671
|
try {
|
|
672
672
|
Y = localStorage.getItem("gengage:debug") === "1";
|
|
@@ -675,12 +675,12 @@ function gn() {
|
|
|
675
675
|
}
|
|
676
676
|
return Y;
|
|
677
677
|
}
|
|
678
|
-
function
|
|
679
|
-
if (!
|
|
678
|
+
function _e(e, t, n) {
|
|
679
|
+
if (!hn()) return;
|
|
680
680
|
const r = [`[gengage:${e}]`, t];
|
|
681
681
|
n !== void 0 && r.push(n), console.debug(...r);
|
|
682
682
|
}
|
|
683
|
-
class
|
|
683
|
+
class Ec {
|
|
684
684
|
constructor() {
|
|
685
685
|
this.isVisible = !1, this.isInitialised = !1, this._handlers = /* @__PURE__ */ new Map(), this._cleanups = [], this._ownsRoot = !1, this._destroying = !1;
|
|
686
686
|
}
|
|
@@ -692,14 +692,14 @@ class bc {
|
|
|
692
692
|
console.warn("[gengage] Widget already initialised. Call update() instead.");
|
|
693
693
|
return;
|
|
694
694
|
}
|
|
695
|
-
const n =
|
|
695
|
+
const n = rn(t.theme);
|
|
696
696
|
this.config = {
|
|
697
697
|
...t,
|
|
698
698
|
theme: n,
|
|
699
|
-
session:
|
|
700
|
-
}, this.root = this._resolveMount(t.mountTarget), this._applyTheme(n),
|
|
699
|
+
session: nn(t.session)
|
|
700
|
+
}, this.root = this._resolveMount(t.mountTarget), this._applyTheme(n), cn();
|
|
701
701
|
const r = te("gengage:context:update", (o) => this.update(o));
|
|
702
|
-
this._cleanups.push(r),
|
|
702
|
+
this._cleanups.push(r), _e("lifecycle", `${this.constructor.name}.init`, {
|
|
703
703
|
accountId: t.accountId,
|
|
704
704
|
sku: t.pageContext?.sku
|
|
705
705
|
});
|
|
@@ -708,7 +708,7 @@ class bc {
|
|
|
708
708
|
} catch (o) {
|
|
709
709
|
throw this.destroy(), o;
|
|
710
710
|
}
|
|
711
|
-
this._destroying || (this.isInitialised = !0,
|
|
711
|
+
this._destroying || (this.isInitialised = !0, _e("lifecycle", `${this.constructor.name} ready`), this.emit("ready"));
|
|
712
712
|
}
|
|
713
713
|
update(t) {
|
|
714
714
|
this.isInitialised && (this.config.pageContext ? this.config = {
|
|
@@ -730,12 +730,12 @@ class bc {
|
|
|
730
730
|
}
|
|
731
731
|
/** Track a checkout start event. Called by host page to attribute checkout to widget interaction. */
|
|
732
732
|
trackCheckout(t, n) {
|
|
733
|
-
const r = t === "start" ?
|
|
733
|
+
const r = t === "start" ? Wt : Gt;
|
|
734
734
|
this.track(r(this.analyticsContext(), n));
|
|
735
735
|
}
|
|
736
736
|
/** Track a metering summary event. Called by host page for session-level aggregation. */
|
|
737
737
|
flushMeteringSummary(t) {
|
|
738
|
-
this.track(
|
|
738
|
+
this.track(Vt(this.analyticsContext(), t));
|
|
739
739
|
}
|
|
740
740
|
// ---------------------------------------------------------------------------
|
|
741
741
|
// Protected helpers
|
|
@@ -778,19 +778,19 @@ class bc {
|
|
|
778
778
|
if (t) {
|
|
779
779
|
for (const [n, r] of Object.entries(t))
|
|
780
780
|
if (r !== void 0) {
|
|
781
|
-
const o = n.startsWith("--") ? n : `--gengage-${
|
|
781
|
+
const o = n.startsWith("--") ? n : `--gengage-${mn(n)}`;
|
|
782
782
|
this.root.style.setProperty(o, r);
|
|
783
783
|
}
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
786
|
}
|
|
787
|
-
function
|
|
787
|
+
function mn(e) {
|
|
788
788
|
return e.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
789
789
|
}
|
|
790
|
-
function
|
|
790
|
+
function Ce(e) {
|
|
791
791
|
return typeof e == "object" && e !== null && typeof e.type == "string";
|
|
792
792
|
}
|
|
793
|
-
function
|
|
793
|
+
function _n(e) {
|
|
794
794
|
const t = [];
|
|
795
795
|
let n = 0, r = !1, o = !1, i = 0;
|
|
796
796
|
for (let s = 0; s < e.length; s++) {
|
|
@@ -811,7 +811,7 @@ function mn(e) {
|
|
|
811
811
|
}
|
|
812
812
|
return t.length > 0 ? t : [e];
|
|
813
813
|
}
|
|
814
|
-
function
|
|
814
|
+
function Re(e, t) {
|
|
815
815
|
const n = e.trim();
|
|
816
816
|
if (!n || n.startsWith(":")) return !1;
|
|
817
817
|
const r = n.startsWith("data: ") ? n.slice(6) : n;
|
|
@@ -819,14 +819,14 @@ function Ce(e, t) {
|
|
|
819
819
|
return t.onDone?.(), !0;
|
|
820
820
|
try {
|
|
821
821
|
const o = JSON.parse(r);
|
|
822
|
-
return
|
|
822
|
+
return Ce(o) ? (_e("stream", `event: ${o.type}`, o), t.onEvent(o), o.type === "done" ? (t.onDone?.(), !0) : !1) : !1;
|
|
823
823
|
} catch {
|
|
824
|
-
const o =
|
|
824
|
+
const o = _n(r);
|
|
825
825
|
if (o.length > 1) {
|
|
826
826
|
for (const i of o)
|
|
827
827
|
try {
|
|
828
828
|
const s = JSON.parse(i);
|
|
829
|
-
if (!
|
|
829
|
+
if (!Ce(s)) continue;
|
|
830
830
|
if (t.onEvent(s), s.type === "done")
|
|
831
831
|
return t.onDone?.(), !0;
|
|
832
832
|
} catch {
|
|
@@ -836,7 +836,7 @@ function Ce(e, t) {
|
|
|
836
836
|
return !1;
|
|
837
837
|
}
|
|
838
838
|
}
|
|
839
|
-
async function
|
|
839
|
+
async function yn(e, t) {
|
|
840
840
|
if (!e.ok) {
|
|
841
841
|
t.onError?.(new Error(`HTTP ${e.status}: ${e.statusText}`));
|
|
842
842
|
return;
|
|
@@ -870,9 +870,9 @@ async function _n(e, t) {
|
|
|
870
870
|
`);
|
|
871
871
|
o = g.pop() ?? "";
|
|
872
872
|
for (const y of g)
|
|
873
|
-
if (
|
|
873
|
+
if (Re(y, t)) return;
|
|
874
874
|
}
|
|
875
|
-
if (o.trim() &&
|
|
875
|
+
if (o.trim() && Re(o, t))
|
|
876
876
|
return;
|
|
877
877
|
} catch (c) {
|
|
878
878
|
if (c instanceof DOMException && c.name === "AbortError") return;
|
|
@@ -882,8 +882,8 @@ async function _n(e, t) {
|
|
|
882
882
|
}
|
|
883
883
|
t.onDone?.();
|
|
884
884
|
}
|
|
885
|
-
function
|
|
886
|
-
const r = new AbortController(), o = n.signal ?
|
|
885
|
+
function Tc(e, t, n) {
|
|
886
|
+
const r = new AbortController(), o = n.signal ? vn([n.signal, r.signal]) : r.signal;
|
|
887
887
|
return fetch(e, {
|
|
888
888
|
method: "POST",
|
|
889
889
|
headers: {
|
|
@@ -892,11 +892,11 @@ function kc(e, t, n) {
|
|
|
892
892
|
},
|
|
893
893
|
body: JSON.stringify(t),
|
|
894
894
|
signal: o
|
|
895
|
-
}).then((i) =>
|
|
895
|
+
}).then((i) => yn(i, { ...n, signal: o })).catch((i) => {
|
|
896
896
|
i instanceof DOMException && i.name === "AbortError" || n.onError?.(i instanceof Error ? i : new Error(String(i)));
|
|
897
897
|
}), r;
|
|
898
898
|
}
|
|
899
|
-
function
|
|
899
|
+
function vn(e) {
|
|
900
900
|
const t = new AbortController(), n = [];
|
|
901
901
|
for (const r of e) {
|
|
902
902
|
if (r.aborted)
|
|
@@ -912,84 +912,106 @@ function yn(e) {
|
|
|
912
912
|
{ once: !0 }
|
|
913
913
|
), t.signal;
|
|
914
914
|
}
|
|
915
|
-
|
|
915
|
+
const je = 3, wn = (e, t) => {
|
|
916
|
+
const n = e.replace(/\s+/g, " ").trim().replace(/^[,.;:!?•-]+|[,.;:!?•-]+$/g, "");
|
|
917
|
+
if (!n)
|
|
918
|
+
return "";
|
|
919
|
+
const r = t?.stripLeadingStopWords ? n.replace(/^(?:daha|için)\s+/i, "").trim() : n;
|
|
920
|
+
return r ? r.split(/\s+/).slice(0, 3).join(" ").trim() : "";
|
|
921
|
+
}, pe = (e, t) => e ? e.split(/[•,;:/()]|(?:\sve\s)|(?:\sand\s)|(?:\sile\s)|(?:\sfor\s)|(?:\swith\s)/i).map((n) => wn(n, t)).filter(Boolean) : [];
|
|
922
|
+
function bn(e) {
|
|
923
|
+
const t = (e.display_keywords ?? []).flatMap(
|
|
924
|
+
(o) => pe(o, { stripLeadingStopWords: !0 })
|
|
925
|
+
), n = t.filter((o, i) => t.indexOf(o) === i);
|
|
926
|
+
if (n.length > 0)
|
|
927
|
+
return n.slice(0, je);
|
|
928
|
+
const r = [
|
|
929
|
+
...pe(e.chosen_attribute, { stripLeadingStopWords: !0 }),
|
|
930
|
+
...pe(e.short_name)
|
|
931
|
+
];
|
|
932
|
+
return r.filter((o, i) => r.indexOf(o) === i).slice(0, je);
|
|
933
|
+
}
|
|
934
|
+
function kn(e) {
|
|
935
|
+
return bn(e).join(" • ");
|
|
936
|
+
}
|
|
937
|
+
function Zc(e) {
|
|
916
938
|
if (typeof e.type != "string") return null;
|
|
917
|
-
if (
|
|
939
|
+
if (zn(e))
|
|
918
940
|
return e;
|
|
919
941
|
const n = e;
|
|
920
942
|
switch (n.type) {
|
|
921
943
|
case "outputText":
|
|
922
|
-
return
|
|
944
|
+
return Sn(n);
|
|
923
945
|
case "suggestedActions":
|
|
924
|
-
return
|
|
946
|
+
return $n(n);
|
|
925
947
|
case "productList":
|
|
926
|
-
return
|
|
948
|
+
return En(n);
|
|
927
949
|
case "productDetails":
|
|
928
|
-
return
|
|
950
|
+
return Tn(n);
|
|
929
951
|
case "productDetailsSimilars":
|
|
930
|
-
return
|
|
952
|
+
return Zn(n);
|
|
931
953
|
case "comparisonTable":
|
|
932
|
-
return $n(n);
|
|
933
|
-
case "context":
|
|
934
954
|
return On(n);
|
|
955
|
+
case "context":
|
|
956
|
+
return Nn(n);
|
|
935
957
|
case "chatStreamEnd":
|
|
936
|
-
return
|
|
958
|
+
return Cn();
|
|
937
959
|
case "loading":
|
|
938
|
-
return
|
|
960
|
+
return Rn(n);
|
|
939
961
|
case "panelLoading":
|
|
940
|
-
return
|
|
962
|
+
return jn(n);
|
|
941
963
|
case "similarLoading":
|
|
942
|
-
return
|
|
964
|
+
return Dn(n);
|
|
943
965
|
case "redirect":
|
|
944
|
-
return
|
|
966
|
+
return Ln(n);
|
|
945
967
|
case "error":
|
|
946
|
-
return
|
|
968
|
+
return Un(n);
|
|
947
969
|
case "dummy":
|
|
948
|
-
return
|
|
970
|
+
return Mn();
|
|
949
971
|
case "launcherAction":
|
|
950
|
-
return
|
|
972
|
+
return xn(n);
|
|
951
973
|
case "text":
|
|
952
|
-
return
|
|
974
|
+
return ke(n);
|
|
953
975
|
case "productItem":
|
|
954
|
-
return
|
|
976
|
+
return Fn(n);
|
|
955
977
|
case "text_image":
|
|
956
|
-
return at(n);
|
|
957
|
-
case "quick_qna":
|
|
958
978
|
return ct(n);
|
|
979
|
+
case "quick_qna":
|
|
980
|
+
return ut(n);
|
|
959
981
|
case "reviewHighlights":
|
|
960
|
-
return
|
|
982
|
+
return Jn(n);
|
|
961
983
|
case "aiProductSuggestions":
|
|
962
|
-
return
|
|
984
|
+
return Wn(n);
|
|
963
985
|
case "aiProductGroupings":
|
|
964
|
-
return
|
|
986
|
+
return Gn(n);
|
|
965
987
|
case "aiSuggestedSearches":
|
|
966
|
-
return
|
|
988
|
+
return Bn(n);
|
|
967
989
|
case "prosAndCons":
|
|
968
|
-
return
|
|
990
|
+
return qn(n);
|
|
969
991
|
case "getGroundingReview":
|
|
970
|
-
return
|
|
992
|
+
return Kn(n);
|
|
971
993
|
case "voice":
|
|
972
|
-
return
|
|
994
|
+
return Yn(n);
|
|
973
995
|
case "visitorDataResponse":
|
|
974
|
-
return
|
|
996
|
+
return Vn(n);
|
|
975
997
|
case "productListPreview":
|
|
976
|
-
return
|
|
998
|
+
return Hn();
|
|
977
999
|
case "groupList":
|
|
978
|
-
return
|
|
1000
|
+
return Xn(n);
|
|
979
1001
|
case "formGetInfo":
|
|
980
1002
|
case "formTestDrive":
|
|
981
1003
|
case "formServiceRequest":
|
|
982
1004
|
case "launchFormPage":
|
|
983
|
-
return
|
|
1005
|
+
return Qn(n);
|
|
984
1006
|
case "launcherContent":
|
|
985
|
-
return
|
|
1007
|
+
return tr(n);
|
|
986
1008
|
case "handoff":
|
|
987
|
-
return
|
|
1009
|
+
return er(n);
|
|
988
1010
|
default:
|
|
989
1011
|
return null;
|
|
990
1012
|
}
|
|
991
1013
|
}
|
|
992
|
-
function
|
|
1014
|
+
function zn(e) {
|
|
993
1015
|
const t = e.type;
|
|
994
1016
|
if (typeof t != "string") return !1;
|
|
995
1017
|
switch (t) {
|
|
@@ -1000,11 +1022,11 @@ function vn(e) {
|
|
|
1000
1022
|
case "ui_spec": {
|
|
1001
1023
|
const n = e.widget;
|
|
1002
1024
|
if (n !== "chat" && n !== "qna" && n !== "simrel") return !1;
|
|
1003
|
-
const r =
|
|
1004
|
-
return r ? typeof r.root == "string" &&
|
|
1025
|
+
const r = j(e.spec);
|
|
1026
|
+
return r ? typeof r.root == "string" && j(r.elements) !== null : !1;
|
|
1005
1027
|
}
|
|
1006
1028
|
case "action": {
|
|
1007
|
-
const n =
|
|
1029
|
+
const n = j(e.action);
|
|
1008
1030
|
return n !== null && typeof n.kind == "string";
|
|
1009
1031
|
}
|
|
1010
1032
|
case "error":
|
|
@@ -1015,7 +1037,7 @@ function vn(e) {
|
|
|
1015
1037
|
return !1;
|
|
1016
1038
|
}
|
|
1017
1039
|
}
|
|
1018
|
-
function
|
|
1040
|
+
function Sn(e) {
|
|
1019
1041
|
const t = w(e.payload.text, e.payload.plain_text) ?? "", n = w(e.payload.plain_text, e.payload.text) ?? t;
|
|
1020
1042
|
if (e.payload.is_error)
|
|
1021
1043
|
return {
|
|
@@ -1036,7 +1058,7 @@ function wn(e) {
|
|
|
1036
1058
|
const s = e.payload.conversation_mode;
|
|
1037
1059
|
return typeof s == "string" && s && (r.conversationMode = s), r;
|
|
1038
1060
|
}
|
|
1039
|
-
function
|
|
1061
|
+
function $n(e) {
|
|
1040
1062
|
const t = (e.payload.actions ?? []).map((n) => {
|
|
1041
1063
|
const r = w(n.title) ?? "", o = R(n.requestDetails, r), i = o ? {
|
|
1042
1064
|
label: r,
|
|
@@ -1044,15 +1066,15 @@ function bn(e) {
|
|
|
1044
1066
|
} : null;
|
|
1045
1067
|
return i ? (typeof n.icon == "string" && (i.icon = n.icon), typeof n.image == "string" && (i.image = n.image), i) : null;
|
|
1046
1068
|
});
|
|
1047
|
-
return
|
|
1069
|
+
return dt(t.filter(ft), "chat");
|
|
1048
1070
|
}
|
|
1049
|
-
function
|
|
1050
|
-
const t =
|
|
1071
|
+
function En(e) {
|
|
1072
|
+
const t = lt(e.payload.product_list ?? [], "chat");
|
|
1051
1073
|
t.panelHint = "panel";
|
|
1052
1074
|
const n = t.spec.elements[t.spec.root];
|
|
1053
1075
|
return n && (typeof e.payload.offset == "number" && (n.props = { ...n.props, offset: e.payload.offset }), typeof e.payload.end_of_list == "boolean" && (n.props = { ...n.props, endOfList: e.payload.end_of_list }), typeof e.payload.title == "string" && (n.props = { ...n.props, panelTitle: e.payload.title })), t;
|
|
1054
1076
|
}
|
|
1055
|
-
function
|
|
1077
|
+
function Tn(e) {
|
|
1056
1078
|
const t = e.payload.productDetails;
|
|
1057
1079
|
return t ? {
|
|
1058
1080
|
type: "ui_spec",
|
|
@@ -1067,13 +1089,13 @@ function zn(e) {
|
|
|
1067
1089
|
}
|
|
1068
1090
|
},
|
|
1069
1091
|
panelHint: "panel"
|
|
1070
|
-
} :
|
|
1092
|
+
} : rr("chat");
|
|
1071
1093
|
}
|
|
1072
|
-
function
|
|
1073
|
-
const t =
|
|
1094
|
+
function Zn(e) {
|
|
1095
|
+
const t = lt(e.payload.similarProducts ?? [], "chat"), n = t.spec.elements[t.spec.root];
|
|
1074
1096
|
return n && (n.props = { ...n.props, similarsAppend: !0 }), { ...t, panelHint: "panel" };
|
|
1075
1097
|
}
|
|
1076
|
-
function
|
|
1098
|
+
function On(e) {
|
|
1077
1099
|
const t = e.payload.multiple_product_details ?? [], n = e.payload, r = {
|
|
1078
1100
|
key_differences: n.key_differences,
|
|
1079
1101
|
recommended_choice: n.recommended_choice,
|
|
@@ -1087,23 +1109,23 @@ function $n(e) {
|
|
|
1087
1109
|
...e.payload.product_comparison_framework ?? {}
|
|
1088
1110
|
}, o = e.payload.table, i = e.payload.features_list, s = [];
|
|
1089
1111
|
for (const m of t) {
|
|
1090
|
-
const
|
|
1091
|
-
s.push(
|
|
1112
|
+
const b = M(m);
|
|
1113
|
+
s.push(b);
|
|
1092
1114
|
}
|
|
1093
|
-
const a =
|
|
1115
|
+
const a = In(o, s, r, i);
|
|
1094
1116
|
let c;
|
|
1095
1117
|
r?.recommended_choice_sku ? c = r.recommended_choice_sku : r?.winner_product && r.winner_product.length > 0 && (c = r.winner_product[0]?.product_detail?.sku ?? r.winner_product[0]?.sku);
|
|
1096
1118
|
const u = c ? s.find((m) => m.sku === c) ?? s[0] : s[0], l = [];
|
|
1097
1119
|
if (Array.isArray(r?.key_differences))
|
|
1098
1120
|
for (const m of r.key_differences)
|
|
1099
1121
|
typeof m == "string" && l.push(m);
|
|
1100
|
-
const f =
|
|
1122
|
+
const f = ar(r?.special_considerations), p = r?.recommended_choice, g = r?.winner_hits, y = {};
|
|
1101
1123
|
for (const m of s) {
|
|
1102
|
-
const
|
|
1103
|
-
|
|
1104
|
-
title: m.name ??
|
|
1124
|
+
const b = m.sku;
|
|
1125
|
+
b && (y[b] = {
|
|
1126
|
+
title: m.name ?? b,
|
|
1105
1127
|
type: "launchSingleProduct",
|
|
1106
|
-
payload: { sku:
|
|
1128
|
+
payload: { sku: b }
|
|
1107
1129
|
});
|
|
1108
1130
|
}
|
|
1109
1131
|
const _ = {
|
|
@@ -1127,7 +1149,7 @@ function $n(e) {
|
|
|
1127
1149
|
panelHint: "panel"
|
|
1128
1150
|
};
|
|
1129
1151
|
}
|
|
1130
|
-
function
|
|
1152
|
+
function In(e, t, n, r) {
|
|
1131
1153
|
if (!e) return [];
|
|
1132
1154
|
const o = Object.entries(e);
|
|
1133
1155
|
if (o.length === 0) return [];
|
|
@@ -1137,20 +1159,20 @@ function En(e, t, n, r) {
|
|
|
1137
1159
|
for (const _ of g) {
|
|
1138
1160
|
const m = e[_];
|
|
1139
1161
|
if (!m || !Array.isArray(m)) continue;
|
|
1140
|
-
const
|
|
1141
|
-
y.push({ label:
|
|
1162
|
+
const b = p[_] ?? _;
|
|
1163
|
+
y.push({ label: b, values: m.map((Z) => typeof Z == "string" ? Z : String(Z ?? "")) });
|
|
1142
1164
|
}
|
|
1143
1165
|
return y;
|
|
1144
1166
|
}
|
|
1145
|
-
const s = e, a = t.map((p) => String(p.sku ?? "")).filter((p) => p.length > 0), c = n.criteria_view ?? n.criteria_view_short ?? {}, l = (r && r.length > 0 ? r : n.compared_field_names && n.compared_field_names.length > 0 ? n.compared_field_names :
|
|
1167
|
+
const s = e, a = t.map((p) => String(p.sku ?? "")).filter((p) => p.length > 0), c = n.criteria_view ?? n.criteria_view_short ?? {}, l = (r && r.length > 0 ? r : n.compared_field_names && n.compared_field_names.length > 0 ? n.compared_field_names : An(s)).filter(
|
|
1146
1168
|
(p) => p !== "name" && p !== "name_short" && !p.endsWith("_short")
|
|
1147
1169
|
), f = [];
|
|
1148
1170
|
for (const p of l) {
|
|
1149
1171
|
const g = a.map((_) => {
|
|
1150
1172
|
const m = s[_];
|
|
1151
1173
|
if (!m || typeof m != "object") return "";
|
|
1152
|
-
const
|
|
1153
|
-
return
|
|
1174
|
+
const b = m[`${p}_short`], Z = m[p];
|
|
1175
|
+
return Pn(b ?? Z);
|
|
1154
1176
|
});
|
|
1155
1177
|
if (g.every((_) => _.length === 0)) continue;
|
|
1156
1178
|
const y = c[p] ?? p;
|
|
@@ -1158,7 +1180,7 @@ function En(e, t, n, r) {
|
|
|
1158
1180
|
}
|
|
1159
1181
|
return f;
|
|
1160
1182
|
}
|
|
1161
|
-
function
|
|
1183
|
+
function An(e) {
|
|
1162
1184
|
const t = [], n = /* @__PURE__ */ new Set();
|
|
1163
1185
|
for (const r of Object.values(e))
|
|
1164
1186
|
if (!(!r || typeof r != "object"))
|
|
@@ -1166,10 +1188,10 @@ function Tn(e) {
|
|
|
1166
1188
|
n.has(o) || (n.add(o), t.push(o));
|
|
1167
1189
|
return t;
|
|
1168
1190
|
}
|
|
1169
|
-
function
|
|
1191
|
+
function Pn(e) {
|
|
1170
1192
|
return typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" ? String(e) : "";
|
|
1171
1193
|
}
|
|
1172
|
-
function
|
|
1194
|
+
function Nn(e) {
|
|
1173
1195
|
return {
|
|
1174
1196
|
type: "metadata",
|
|
1175
1197
|
sessionId: "",
|
|
@@ -1181,10 +1203,10 @@ function On(e) {
|
|
|
1181
1203
|
}
|
|
1182
1204
|
};
|
|
1183
1205
|
}
|
|
1184
|
-
function
|
|
1206
|
+
function Cn() {
|
|
1185
1207
|
return { type: "done" };
|
|
1186
1208
|
}
|
|
1187
|
-
function
|
|
1209
|
+
function Rn(e) {
|
|
1188
1210
|
return {
|
|
1189
1211
|
type: "metadata",
|
|
1190
1212
|
sessionId: "",
|
|
@@ -1197,7 +1219,7 @@ function An(e) {
|
|
|
1197
1219
|
}
|
|
1198
1220
|
};
|
|
1199
1221
|
}
|
|
1200
|
-
function
|
|
1222
|
+
function jn(e) {
|
|
1201
1223
|
return {
|
|
1202
1224
|
type: "metadata",
|
|
1203
1225
|
sessionId: "",
|
|
@@ -1210,7 +1232,7 @@ function Pn(e) {
|
|
|
1210
1232
|
}
|
|
1211
1233
|
};
|
|
1212
1234
|
}
|
|
1213
|
-
function
|
|
1235
|
+
function Dn(e) {
|
|
1214
1236
|
return {
|
|
1215
1237
|
type: "metadata",
|
|
1216
1238
|
sessionId: "",
|
|
@@ -1223,7 +1245,7 @@ function Nn(e) {
|
|
|
1223
1245
|
}
|
|
1224
1246
|
};
|
|
1225
1247
|
}
|
|
1226
|
-
function
|
|
1248
|
+
function Ln(e) {
|
|
1227
1249
|
const t = w(e.payload.url);
|
|
1228
1250
|
return t ? {
|
|
1229
1251
|
type: "action",
|
|
@@ -1242,14 +1264,14 @@ function Cn(e) {
|
|
|
1242
1264
|
}
|
|
1243
1265
|
};
|
|
1244
1266
|
}
|
|
1245
|
-
function
|
|
1267
|
+
function Un(e) {
|
|
1246
1268
|
return {
|
|
1247
1269
|
type: "error",
|
|
1248
1270
|
code: "BACKEND_ERROR",
|
|
1249
1271
|
message: w(e.payload?.text, e.payload?.message, e.payload?.error) ?? "Backend returned an error"
|
|
1250
1272
|
};
|
|
1251
1273
|
}
|
|
1252
|
-
function
|
|
1274
|
+
function Mn(e) {
|
|
1253
1275
|
return {
|
|
1254
1276
|
type: "metadata",
|
|
1255
1277
|
sessionId: "",
|
|
@@ -1259,29 +1281,29 @@ function Dn(e) {
|
|
|
1259
1281
|
}
|
|
1260
1282
|
};
|
|
1261
1283
|
}
|
|
1262
|
-
function
|
|
1284
|
+
function xn(e) {
|
|
1263
1285
|
const t = e.payload ?? {};
|
|
1264
1286
|
if (Array.isArray(t.action_list)) {
|
|
1265
1287
|
const i = {
|
|
1266
1288
|
action_list: t.action_list
|
|
1267
1289
|
}, s = typeof t.type == "string" ? t.type : void 0, a = typeof t.theme == "string" ? t.theme : void 0;
|
|
1268
|
-
return s !== void 0 && (i.type = s), a !== void 0 && (i.theme = a),
|
|
1290
|
+
return s !== void 0 && (i.type = s), a !== void 0 && (i.theme = a), ut({
|
|
1269
1291
|
payload: i
|
|
1270
1292
|
});
|
|
1271
1293
|
}
|
|
1272
|
-
const r =
|
|
1294
|
+
const r = j(t.action);
|
|
1273
1295
|
if (r) {
|
|
1274
1296
|
const i = {
|
|
1275
1297
|
action: r
|
|
1276
1298
|
}, s = typeof t.text == "string" ? t.text : void 0, a = typeof t.image_url == "string" ? t.image_url : void 0, c = typeof t.theme == "string" ? t.theme : void 0;
|
|
1277
|
-
return s !== void 0 && (i.text = s), a !== void 0 && (i.image_url = a), c !== void 0 && (i.theme = c),
|
|
1299
|
+
return s !== void 0 && (i.text = s), a !== void 0 && (i.image_url = a), c !== void 0 && (i.theme = c), ct({
|
|
1278
1300
|
payload: i
|
|
1279
1301
|
});
|
|
1280
1302
|
}
|
|
1281
1303
|
const o = typeof t.text == "string" ? t.text : "";
|
|
1282
1304
|
if (o) {
|
|
1283
|
-
const i = { text: o }, s = typeof t.type == "string" ? t.type : void 0, a = typeof t.theme == "string" ? t.theme : void 0, c =
|
|
1284
|
-
return s !== void 0 && (i.type = s), c !== void 0 && (i.payload = c), a !== void 0 && (i.theme = a),
|
|
1305
|
+
const i = { text: o }, s = typeof t.type == "string" ? t.type : void 0, a = typeof t.theme == "string" ? t.theme : void 0, c = j(t.payload) ?? void 0;
|
|
1306
|
+
return s !== void 0 && (i.type = s), c !== void 0 && (i.payload = c), a !== void 0 && (i.theme = a), ke({
|
|
1285
1307
|
payload: i
|
|
1286
1308
|
});
|
|
1287
1309
|
}
|
|
@@ -1294,7 +1316,7 @@ function jn(e) {
|
|
|
1294
1316
|
}
|
|
1295
1317
|
};
|
|
1296
1318
|
}
|
|
1297
|
-
function
|
|
1319
|
+
function ke(e) {
|
|
1298
1320
|
const t = {
|
|
1299
1321
|
text: w(e.payload.text) ?? ""
|
|
1300
1322
|
};
|
|
@@ -1312,10 +1334,10 @@ function be(e) {
|
|
|
1312
1334
|
}
|
|
1313
1335
|
};
|
|
1314
1336
|
}
|
|
1315
|
-
function
|
|
1316
|
-
return
|
|
1337
|
+
function Fn(e) {
|
|
1338
|
+
return nr(e.payload, "qna");
|
|
1317
1339
|
}
|
|
1318
|
-
function
|
|
1340
|
+
function ct(e) {
|
|
1319
1341
|
const t = w(e.payload.text) ?? "", n = R(e.payload.action, t);
|
|
1320
1342
|
if (n) {
|
|
1321
1343
|
const o = {
|
|
@@ -1339,11 +1361,11 @@ function at(e) {
|
|
|
1339
1361
|
const r = {
|
|
1340
1362
|
text: t
|
|
1341
1363
|
};
|
|
1342
|
-
return typeof e.payload.theme == "string" && (r.theme = e.payload.theme),
|
|
1364
|
+
return typeof e.payload.theme == "string" && (r.theme = e.payload.theme), ke({
|
|
1343
1365
|
payload: r
|
|
1344
1366
|
});
|
|
1345
1367
|
}
|
|
1346
|
-
function
|
|
1368
|
+
function ut(e) {
|
|
1347
1369
|
const t = (e.payload.action_list ?? []).map((n) => {
|
|
1348
1370
|
const r = w(n.title) ?? "", o = R(n.requestDetails, r), i = o ? {
|
|
1349
1371
|
label: r,
|
|
@@ -1351,9 +1373,9 @@ function ct(e) {
|
|
|
1351
1373
|
} : null;
|
|
1352
1374
|
return i ? (typeof n.icon == "string" && (i.icon = n.icon), typeof n.image == "string" && (i.image = n.image), i) : null;
|
|
1353
1375
|
});
|
|
1354
|
-
return
|
|
1376
|
+
return dt(t.filter(ft), "qna");
|
|
1355
1377
|
}
|
|
1356
|
-
function
|
|
1378
|
+
function Jn(e) {
|
|
1357
1379
|
const n = { reviews: (e.payload.reviews ?? []).map((r) => {
|
|
1358
1380
|
const o = {};
|
|
1359
1381
|
return typeof r.review_class == "string" && (o.review_class = r.review_class), typeof r.review_text == "string" && (o.review_text = r.review_text), (typeof r.review_rating == "string" || typeof r.review_rating == "number") && (o.review_rating = r.review_rating), typeof r.review_tag == "string" && (o.review_tag = r.review_tag), o;
|
|
@@ -1372,7 +1394,7 @@ function Un(e) {
|
|
|
1372
1394
|
}
|
|
1373
1395
|
};
|
|
1374
1396
|
}
|
|
1375
|
-
function
|
|
1397
|
+
function qn(e) {
|
|
1376
1398
|
const t = {};
|
|
1377
1399
|
return Array.isArray(e.payload.pros) && (t.pros = e.payload.pros), Array.isArray(e.payload.cons) && (t.cons = e.payload.cons), typeof e.payload.product_name == "string" && (t.productName = e.payload.product_name), {
|
|
1378
1400
|
type: "ui_spec",
|
|
@@ -1388,7 +1410,7 @@ function Mn(e) {
|
|
|
1388
1410
|
}
|
|
1389
1411
|
};
|
|
1390
1412
|
}
|
|
1391
|
-
function
|
|
1413
|
+
function Vn(e) {
|
|
1392
1414
|
return {
|
|
1393
1415
|
type: "metadata",
|
|
1394
1416
|
sessionId: "",
|
|
@@ -1398,12 +1420,12 @@ function xn(e) {
|
|
|
1398
1420
|
}
|
|
1399
1421
|
};
|
|
1400
1422
|
}
|
|
1401
|
-
function
|
|
1423
|
+
function Wn(e) {
|
|
1402
1424
|
const t = e.payload.product_suggestions ?? [], n = [];
|
|
1403
1425
|
for (let r = 0; r < t.length; r++) {
|
|
1404
1426
|
const o = t[r];
|
|
1405
1427
|
if (!o) continue;
|
|
1406
|
-
const i =
|
|
1428
|
+
const i = or(o);
|
|
1407
1429
|
if (!i) continue;
|
|
1408
1430
|
const s = { product: i }, a = R(o.requestDetails, i.name);
|
|
1409
1431
|
a && (s.action = a), typeof o.role == "string" && (s.role = o.role), typeof o.reason == "string" && (s.reason = o.reason), typeof o.review_highlight == "string" && (s.reviewHighlight = o.review_highlight), Array.isArray(o.labels) && (s.labels = o.labels), typeof o.expert_quality_score == "number" && (s.expertQualityScore = o.expert_quality_score), n.push(s);
|
|
@@ -1429,7 +1451,7 @@ function Fn(e) {
|
|
|
1429
1451
|
}
|
|
1430
1452
|
};
|
|
1431
1453
|
}
|
|
1432
|
-
function
|
|
1454
|
+
function Gn(e) {
|
|
1433
1455
|
const t = e.payload.product_groupings ?? [], n = [];
|
|
1434
1456
|
for (let r = 0; r < t.length; r++) {
|
|
1435
1457
|
const o = t[r];
|
|
@@ -1464,23 +1486,23 @@ function Jn(e) {
|
|
|
1464
1486
|
}
|
|
1465
1487
|
};
|
|
1466
1488
|
}
|
|
1467
|
-
function
|
|
1489
|
+
function Bn(e) {
|
|
1468
1490
|
const t = e.payload.suggested_searches ?? [], n = [];
|
|
1469
1491
|
for (let r = 0; r < t.length; r++) {
|
|
1470
1492
|
const o = t[r];
|
|
1471
1493
|
if (!o) continue;
|
|
1472
1494
|
const i = w(o.short_name, o.chosen_attribute, o.detailed_user_message) ?? `Search ${r + 1}`, s = {}, a = w(o.detailed_user_message);
|
|
1473
1495
|
a && (s.text = a);
|
|
1474
|
-
const c =
|
|
1475
|
-
o.group_skus && Array.isArray(o.group_skus) ? s.group_skus = o.group_skus : Array.isArray(l) && (s.group_skus = l.filter((
|
|
1496
|
+
const c = j(o.requestDetails), u = j(c?.payload), l = u?.group_skus;
|
|
1497
|
+
o.group_skus && Array.isArray(o.group_skus) ? s.group_skus = o.group_skus : Array.isArray(l) && (s.group_skus = l.filter((Z) => typeof Z == "string"));
|
|
1476
1498
|
const f = w(o.sku, o.representative_product_sku, u?.sku);
|
|
1477
1499
|
f && (s.sku = f), s.is_suggested_text = 1;
|
|
1478
1500
|
const p = { type: "inputText", payload: s }, g = R(o.requestDetails, i), y = g?.type === "findSimilar" && typeof s.text == "string" ? R(p, i) : g ?? R(p, i);
|
|
1479
1501
|
if (!y) continue;
|
|
1480
1502
|
const _ = { shortName: i, action: y }, m = w(o.detailed_user_message);
|
|
1481
1503
|
m && m !== i && (_.detailedMessage = m);
|
|
1482
|
-
const
|
|
1483
|
-
|
|
1504
|
+
const b = kn(o);
|
|
1505
|
+
b && b !== i && b !== (m ?? "") && (_.whyDifferent = b), typeof o.image == "string" && (_.image = o.image), n.push(_);
|
|
1484
1506
|
}
|
|
1485
1507
|
return n.length === 0 ? {
|
|
1486
1508
|
type: "metadata",
|
|
@@ -1503,10 +1525,10 @@ function qn(e) {
|
|
|
1503
1525
|
}
|
|
1504
1526
|
};
|
|
1505
1527
|
}
|
|
1506
|
-
function
|
|
1528
|
+
function Kn(e) {
|
|
1507
1529
|
const t = R(
|
|
1508
1530
|
e.payload.requestDetails,
|
|
1509
|
-
w(e.payload.review_count, e.payload.text, e.payload.title) ?? "
|
|
1531
|
+
w(e.payload.review_count, e.payload.text, e.payload.title) ?? "Show product reviews"
|
|
1510
1532
|
);
|
|
1511
1533
|
if (!t)
|
|
1512
1534
|
return {
|
|
@@ -1532,7 +1554,7 @@ function Vn(e) {
|
|
|
1532
1554
|
}
|
|
1533
1555
|
};
|
|
1534
1556
|
}
|
|
1535
|
-
function
|
|
1557
|
+
function Hn() {
|
|
1536
1558
|
return {
|
|
1537
1559
|
type: "metadata",
|
|
1538
1560
|
sessionId: "",
|
|
@@ -1542,7 +1564,7 @@ function Wn() {
|
|
|
1542
1564
|
}
|
|
1543
1565
|
};
|
|
1544
1566
|
}
|
|
1545
|
-
function
|
|
1567
|
+
function Yn(e) {
|
|
1546
1568
|
return {
|
|
1547
1569
|
type: "metadata",
|
|
1548
1570
|
sessionId: "",
|
|
@@ -1552,7 +1574,7 @@ function Gn(e) {
|
|
|
1552
1574
|
}
|
|
1553
1575
|
};
|
|
1554
1576
|
}
|
|
1555
|
-
function
|
|
1577
|
+
function Xn(e) {
|
|
1556
1578
|
const t = e.payload.group_list ?? [], n = [];
|
|
1557
1579
|
for (const o of t) {
|
|
1558
1580
|
const i = o.group_name ?? "", s = (o.product_list ?? []).map(M);
|
|
@@ -1580,7 +1602,7 @@ function Bn(e) {
|
|
|
1580
1602
|
panelHint: "panel"
|
|
1581
1603
|
};
|
|
1582
1604
|
}
|
|
1583
|
-
function
|
|
1605
|
+
function Qn(e) {
|
|
1584
1606
|
return {
|
|
1585
1607
|
type: "metadata",
|
|
1586
1608
|
sessionId: "",
|
|
@@ -1591,7 +1613,7 @@ function Hn(e) {
|
|
|
1591
1613
|
}
|
|
1592
1614
|
};
|
|
1593
1615
|
}
|
|
1594
|
-
function
|
|
1616
|
+
function er(e) {
|
|
1595
1617
|
const t = {};
|
|
1596
1618
|
return typeof e.payload?.summary == "string" && (t.summary = e.payload.summary), Array.isArray(e.payload?.products_discussed) && (t.products_discussed = e.payload.products_discussed), typeof e.payload?.user_sentiment == "string" && (t.user_sentiment = e.payload.user_sentiment), {
|
|
1597
1619
|
type: "ui_spec",
|
|
@@ -1607,7 +1629,7 @@ function Kn(e) {
|
|
|
1607
1629
|
}
|
|
1608
1630
|
};
|
|
1609
1631
|
}
|
|
1610
|
-
function
|
|
1632
|
+
function tr(e) {
|
|
1611
1633
|
return {
|
|
1612
1634
|
type: "metadata",
|
|
1613
1635
|
sessionId: "",
|
|
@@ -1617,7 +1639,7 @@ function Yn(e) {
|
|
|
1617
1639
|
}
|
|
1618
1640
|
};
|
|
1619
1641
|
}
|
|
1620
|
-
function
|
|
1642
|
+
function dt(e, t) {
|
|
1621
1643
|
const n = {}, r = [];
|
|
1622
1644
|
for (let o = 0; o < e.length; o++) {
|
|
1623
1645
|
const i = e[o];
|
|
@@ -1651,7 +1673,7 @@ function ut(e, t) {
|
|
|
1651
1673
|
spec: { root: "root", elements: n }
|
|
1652
1674
|
};
|
|
1653
1675
|
}
|
|
1654
|
-
function
|
|
1676
|
+
function lt(e, t) {
|
|
1655
1677
|
const n = {}, r = [];
|
|
1656
1678
|
for (let o = 0; o < e.length; o++) {
|
|
1657
1679
|
const i = e[o];
|
|
@@ -1672,7 +1694,7 @@ function dt(e, t) {
|
|
|
1672
1694
|
spec: { root: "root", elements: n }
|
|
1673
1695
|
};
|
|
1674
1696
|
}
|
|
1675
|
-
function
|
|
1697
|
+
function nr(e, t) {
|
|
1676
1698
|
return {
|
|
1677
1699
|
type: "ui_spec",
|
|
1678
1700
|
widget: t,
|
|
@@ -1687,7 +1709,7 @@ function Qn(e, t) {
|
|
|
1687
1709
|
}
|
|
1688
1710
|
};
|
|
1689
1711
|
}
|
|
1690
|
-
function
|
|
1712
|
+
function rr(e) {
|
|
1691
1713
|
return {
|
|
1692
1714
|
type: "ui_spec",
|
|
1693
1715
|
widget: e,
|
|
@@ -1703,11 +1725,11 @@ function Xn(e) {
|
|
|
1703
1725
|
}
|
|
1704
1726
|
};
|
|
1705
1727
|
}
|
|
1706
|
-
function
|
|
1707
|
-
const t = w(e.sku), n = w(e.short_name), r =
|
|
1708
|
-
return
|
|
1728
|
+
function or(e) {
|
|
1729
|
+
const t = w(e.sku), n = w(e.short_name), r = j(e.product_item) ?? e;
|
|
1730
|
+
return ir(r, t, n);
|
|
1709
1731
|
}
|
|
1710
|
-
function
|
|
1732
|
+
function ir(e, t, n) {
|
|
1711
1733
|
const r = w(e.sku, t), o = w(e.name, n);
|
|
1712
1734
|
if (!r || !o) return null;
|
|
1713
1735
|
const i = {
|
|
@@ -1717,26 +1739,26 @@ function tr(e, t, n) {
|
|
|
1717
1739
|
s && (i.brand = s);
|
|
1718
1740
|
const a = w(e.url);
|
|
1719
1741
|
a && (i.url = a);
|
|
1720
|
-
const c =
|
|
1742
|
+
const c = sr(e.images);
|
|
1721
1743
|
if (c.length > 0)
|
|
1722
1744
|
i.images = c;
|
|
1723
1745
|
else {
|
|
1724
1746
|
const y = w(e.image, e.image_url, e.imageUrl);
|
|
1725
1747
|
y && (i.images = [y]);
|
|
1726
1748
|
}
|
|
1727
|
-
const u =
|
|
1749
|
+
const u = X(e.price_discounted);
|
|
1728
1750
|
u !== void 0 && (i.price_discounted = u);
|
|
1729
|
-
const l =
|
|
1751
|
+
const l = X(e.price);
|
|
1730
1752
|
l !== void 0 && (i.price = l);
|
|
1731
|
-
const f =
|
|
1753
|
+
const f = X(e.rating);
|
|
1732
1754
|
f !== void 0 && (i.rating = f);
|
|
1733
|
-
const p =
|
|
1755
|
+
const p = X(e.review_count) ?? X(e.reviewCount);
|
|
1734
1756
|
p !== void 0 && (i.review_count = p);
|
|
1735
1757
|
const g = w(e.cart_code, e.cartCode);
|
|
1736
1758
|
return g && (i.cart_code = g), typeof e.in_stock == "boolean" && (i.in_stock = e.in_stock), typeof e.inStock == "boolean" && (i.in_stock = e.inStock), M(i);
|
|
1737
1759
|
}
|
|
1738
1760
|
function R(e, t) {
|
|
1739
|
-
const n =
|
|
1761
|
+
const n = j(e);
|
|
1740
1762
|
if (!n) return null;
|
|
1741
1763
|
const r = n.type;
|
|
1742
1764
|
if (typeof r != "string" || r.length === 0) return null;
|
|
@@ -1746,7 +1768,7 @@ function R(e, t) {
|
|
|
1746
1768
|
};
|
|
1747
1769
|
return n.payload !== void 0 && (o.payload = n.payload), o;
|
|
1748
1770
|
}
|
|
1749
|
-
function
|
|
1771
|
+
function j(e) {
|
|
1750
1772
|
return !e || typeof e != "object" || Array.isArray(e) ? null : e;
|
|
1751
1773
|
}
|
|
1752
1774
|
function w(...e) {
|
|
@@ -1756,17 +1778,17 @@ function w(...e) {
|
|
|
1756
1778
|
if (n.length > 0) return n;
|
|
1757
1779
|
}
|
|
1758
1780
|
}
|
|
1759
|
-
function
|
|
1781
|
+
function sr(e) {
|
|
1760
1782
|
return Array.isArray(e) ? e.filter((t) => typeof t == "string" && t.length > 0) : [];
|
|
1761
1783
|
}
|
|
1762
|
-
function
|
|
1784
|
+
function ar(e) {
|
|
1763
1785
|
if (typeof e == "string") {
|
|
1764
1786
|
const t = e.trim();
|
|
1765
1787
|
return t ? [t] : [];
|
|
1766
1788
|
}
|
|
1767
1789
|
return Array.isArray(e) ? e.filter((t) => typeof t == "string").map((t) => t.trim()).filter((t) => t.length > 0) : [];
|
|
1768
1790
|
}
|
|
1769
|
-
function
|
|
1791
|
+
function X(e) {
|
|
1770
1792
|
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
1771
1793
|
if (typeof e == "string") {
|
|
1772
1794
|
let t;
|
|
@@ -1775,10 +1797,10 @@ function Q(e) {
|
|
|
1775
1797
|
if (Number.isFinite(n)) return n;
|
|
1776
1798
|
}
|
|
1777
1799
|
}
|
|
1778
|
-
function
|
|
1800
|
+
function ft(e) {
|
|
1779
1801
|
return e != null;
|
|
1780
1802
|
}
|
|
1781
|
-
const
|
|
1803
|
+
const cr = /* @__PURE__ */ new Set([
|
|
1782
1804
|
"sku",
|
|
1783
1805
|
"name",
|
|
1784
1806
|
"brand",
|
|
@@ -1811,13 +1833,13 @@ function M(e) {
|
|
|
1811
1833
|
const l = e, f = {};
|
|
1812
1834
|
let p = !1;
|
|
1813
1835
|
for (const g of Object.keys(l))
|
|
1814
|
-
|
|
1836
|
+
cr.has(g) || (f[g] = l[g], p = !0);
|
|
1815
1837
|
return p && (c.extras = f), c;
|
|
1816
1838
|
}
|
|
1817
|
-
function
|
|
1839
|
+
function Oc(e) {
|
|
1818
1840
|
return e.results.map(M);
|
|
1819
1841
|
}
|
|
1820
|
-
function
|
|
1842
|
+
function Ic(e) {
|
|
1821
1843
|
return e.product_groupings.map((t) => {
|
|
1822
1844
|
const n = {
|
|
1823
1845
|
name: t.name,
|
|
@@ -1826,22 +1848,22 @@ function $c(e) {
|
|
|
1826
1848
|
return t.highlight !== void 0 && (n.highlight = t.highlight), n;
|
|
1827
1849
|
});
|
|
1828
1850
|
}
|
|
1829
|
-
const
|
|
1851
|
+
const ur = {
|
|
1830
1852
|
process_action: "/process_action",
|
|
1831
1853
|
launcher_action: "/launcher_action",
|
|
1832
1854
|
similar_products: "/similar_products",
|
|
1833
1855
|
product_groupings: "/product_groupings"
|
|
1834
1856
|
};
|
|
1835
|
-
function
|
|
1857
|
+
function dr(e) {
|
|
1836
1858
|
if (e === void 0)
|
|
1837
1859
|
throw new Error("[gengage] middlewareUrl is required. Pass your Gengage backend URL in widget config.");
|
|
1838
1860
|
const t = e.trim();
|
|
1839
1861
|
return t === "" ? "" : t.replace(/\/+$/, "");
|
|
1840
1862
|
}
|
|
1841
|
-
function
|
|
1842
|
-
return `${
|
|
1863
|
+
function Ac(e, t) {
|
|
1864
|
+
return `${dr(t?.middlewareUrl)}/chat${ur[e]}`;
|
|
1843
1865
|
}
|
|
1844
|
-
function
|
|
1866
|
+
function lr() {
|
|
1845
1867
|
return typeof window < "u" && Array.isArray(window.dataLayer);
|
|
1846
1868
|
}
|
|
1847
1869
|
function T(e, t) {
|
|
@@ -1849,106 +1871,104 @@ function T(e, t) {
|
|
|
1849
1871
|
event: e,
|
|
1850
1872
|
...t
|
|
1851
1873
|
};
|
|
1852
|
-
|
|
1874
|
+
lr() && window.dataLayer.push(n);
|
|
1853
1875
|
}
|
|
1854
|
-
function
|
|
1876
|
+
function fr(e) {
|
|
1855
1877
|
T("gengage-on-init", { gengage_widget: e });
|
|
1856
1878
|
}
|
|
1857
|
-
function
|
|
1879
|
+
function De(e) {
|
|
1858
1880
|
T("gengage-show", { gengage_widget: e });
|
|
1859
1881
|
}
|
|
1860
|
-
function
|
|
1882
|
+
function pr(e) {
|
|
1861
1883
|
T("gengage-hide", { gengage_widget: e });
|
|
1862
1884
|
}
|
|
1863
|
-
function
|
|
1885
|
+
function gr(e, t) {
|
|
1864
1886
|
T("gengage-suggested-question", {
|
|
1865
1887
|
gengage_question_title: e,
|
|
1866
1888
|
gengage_action_type: t
|
|
1867
1889
|
});
|
|
1868
1890
|
}
|
|
1869
|
-
function
|
|
1891
|
+
function Pc(e) {
|
|
1870
1892
|
T("gengage-find-similars", { gengage_sku: e });
|
|
1871
1893
|
}
|
|
1872
|
-
function
|
|
1894
|
+
function Nc(e) {
|
|
1873
1895
|
T("gengage-compare-preselection", { gengage_sku: e });
|
|
1874
1896
|
}
|
|
1875
|
-
function
|
|
1897
|
+
function Cc(e) {
|
|
1876
1898
|
T("gengage-compare-selected", {
|
|
1877
1899
|
gengage_skus: e,
|
|
1878
1900
|
gengage_product_count: e.length
|
|
1879
1901
|
});
|
|
1880
1902
|
}
|
|
1881
|
-
function
|
|
1903
|
+
function Rc() {
|
|
1882
1904
|
T("gengage-compare-clear");
|
|
1883
1905
|
}
|
|
1884
|
-
function
|
|
1906
|
+
function jc(e) {
|
|
1885
1907
|
T("gengage-compare-received", {
|
|
1886
1908
|
gengage_product_count: e
|
|
1887
1909
|
});
|
|
1888
1910
|
}
|
|
1889
|
-
function
|
|
1911
|
+
function Dc(e) {
|
|
1890
1912
|
T("gengage-like-product", { gengage_sku: e });
|
|
1891
1913
|
}
|
|
1892
|
-
function
|
|
1914
|
+
function Lc() {
|
|
1893
1915
|
T("gengage-like-list");
|
|
1894
1916
|
}
|
|
1895
|
-
function
|
|
1917
|
+
function Uc(e, t) {
|
|
1896
1918
|
T("gengage-search", {
|
|
1897
1919
|
gengage_search_query: e,
|
|
1898
1920
|
gengage_result_count: t
|
|
1899
1921
|
});
|
|
1900
1922
|
}
|
|
1901
|
-
function
|
|
1923
|
+
function hr(e, t) {
|
|
1902
1924
|
T("gengage-product-detail", {
|
|
1903
1925
|
gengage_sku: e,
|
|
1904
1926
|
gengage_product_name: t
|
|
1905
1927
|
});
|
|
1906
1928
|
}
|
|
1907
|
-
function
|
|
1929
|
+
function mr(e, t) {
|
|
1908
1930
|
T("gengage-cart-add", {
|
|
1909
1931
|
gengage_sku: e,
|
|
1910
1932
|
gengage_quantity: t
|
|
1911
1933
|
});
|
|
1912
1934
|
}
|
|
1913
|
-
function
|
|
1935
|
+
function Mc() {
|
|
1914
1936
|
T("gengage-message-sent");
|
|
1915
1937
|
}
|
|
1916
|
-
function
|
|
1938
|
+
function xc() {
|
|
1917
1939
|
T("gengage-message-received");
|
|
1918
1940
|
}
|
|
1919
|
-
function
|
|
1941
|
+
function Fc() {
|
|
1920
1942
|
T("gengage-conversation-start");
|
|
1921
1943
|
}
|
|
1922
|
-
function
|
|
1944
|
+
function _r() {
|
|
1923
1945
|
T("gengage-voice-input");
|
|
1924
1946
|
}
|
|
1925
|
-
function
|
|
1947
|
+
function yr(e, t) {
|
|
1926
1948
|
T("gengage-error", { gengage_widget: e, gengage_error: t });
|
|
1927
1949
|
}
|
|
1928
|
-
let
|
|
1929
|
-
function
|
|
1950
|
+
let Q = null;
|
|
1951
|
+
function Jc() {
|
|
1930
1952
|
if (typeof window > "u") return () => {
|
|
1931
1953
|
};
|
|
1932
|
-
if (
|
|
1954
|
+
if (Q) return Q;
|
|
1933
1955
|
const e = [];
|
|
1934
1956
|
function t(n, r) {
|
|
1935
1957
|
const o = (i) => r(i.detail);
|
|
1936
1958
|
window.addEventListener(n, o), e.push(() => window.removeEventListener(n, o));
|
|
1937
1959
|
}
|
|
1938
|
-
return t("gengage:chat:open", () =>
|
|
1939
|
-
|
|
1940
|
-
}), t("gengage:similar:add-to-cart", ({ sku: n, quantity: r }) => {
|
|
1941
|
-
De(n, r);
|
|
1960
|
+
return t("gengage:chat:open", () => De("chat")), t("gengage:chat:close", () => pr("chat")), t("gengage:chat:ready", () => fr("chat")), t("gengage:similar:add-to-cart", ({ sku: n, quantity: r }) => {
|
|
1961
|
+
mr(n, r);
|
|
1942
1962
|
}), t("gengage:similar:product-click", ({ sku: n }) => {
|
|
1943
|
-
|
|
1963
|
+
hr(n);
|
|
1944
1964
|
}), t("gengage:qna:action", ({ title: n, type: r }) => {
|
|
1945
|
-
|
|
1946
|
-
}), t("gengage:chat:voice", () =>
|
|
1947
|
-
|
|
1948
|
-
}),
|
|
1965
|
+
gr(n, r);
|
|
1966
|
+
}), t("gengage:chat:voice", () => _r()), t("gengage:qna:open-chat", () => De("chat")), t("gengage:global:error", ({ source: n, message: r }) => {
|
|
1967
|
+
yr(n, r);
|
|
1968
|
+
}), Q = () => {
|
|
1949
1969
|
for (const n of e) n();
|
|
1950
|
-
e.length = 0,
|
|
1951
|
-
},
|
|
1970
|
+
e.length = 0, Q = null;
|
|
1971
|
+
}, Q;
|
|
1952
1972
|
}
|
|
1953
1973
|
function d(e, t, n) {
|
|
1954
1974
|
function r(a, c) {
|
|
@@ -1989,23 +2009,23 @@ class G extends Error {
|
|
|
1989
2009
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
1990
2010
|
}
|
|
1991
2011
|
}
|
|
1992
|
-
class
|
|
2012
|
+
class pt extends Error {
|
|
1993
2013
|
constructor(t) {
|
|
1994
2014
|
super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
|
|
1995
2015
|
}
|
|
1996
2016
|
}
|
|
1997
|
-
const
|
|
2017
|
+
const gt = {};
|
|
1998
2018
|
function L(e) {
|
|
1999
|
-
return
|
|
2019
|
+
return gt;
|
|
2000
2020
|
}
|
|
2001
|
-
function
|
|
2021
|
+
function ht(e) {
|
|
2002
2022
|
const t = Object.values(e).filter((r) => typeof r == "number");
|
|
2003
2023
|
return Object.entries(e).filter(([r, o]) => t.indexOf(+r) === -1).map(([r, o]) => o);
|
|
2004
2024
|
}
|
|
2005
|
-
function
|
|
2025
|
+
function ye(e, t) {
|
|
2006
2026
|
return typeof t == "bigint" ? t.toString() : t;
|
|
2007
2027
|
}
|
|
2008
|
-
function
|
|
2028
|
+
function ze(e) {
|
|
2009
2029
|
return {
|
|
2010
2030
|
get value() {
|
|
2011
2031
|
{
|
|
@@ -2015,14 +2035,14 @@ function ke(e) {
|
|
|
2015
2035
|
}
|
|
2016
2036
|
};
|
|
2017
2037
|
}
|
|
2018
|
-
function
|
|
2038
|
+
function Se(e) {
|
|
2019
2039
|
return e == null;
|
|
2020
2040
|
}
|
|
2021
|
-
function
|
|
2041
|
+
function $e(e) {
|
|
2022
2042
|
const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
|
|
2023
2043
|
return e.slice(t, n);
|
|
2024
2044
|
}
|
|
2025
|
-
function
|
|
2045
|
+
function vr(e, t) {
|
|
2026
2046
|
const n = (e.toString().split(".")[1] || "").length, r = t.toString();
|
|
2027
2047
|
let o = (r.split(".")[1] || "").length;
|
|
2028
2048
|
if (o === 0 && /\d?e-\d?/.test(r)) {
|
|
@@ -2032,13 +2052,13 @@ function gr(e, t) {
|
|
|
2032
2052
|
const i = n > o ? n : o, s = Number.parseInt(e.toFixed(i).replace(".", "")), a = Number.parseInt(t.toFixed(i).replace(".", ""));
|
|
2033
2053
|
return s % a / 10 ** i;
|
|
2034
2054
|
}
|
|
2035
|
-
const
|
|
2055
|
+
const Le = /* @__PURE__ */ Symbol("evaluating");
|
|
2036
2056
|
function v(e, t, n) {
|
|
2037
2057
|
let r;
|
|
2038
2058
|
Object.defineProperty(e, t, {
|
|
2039
2059
|
get() {
|
|
2040
|
-
if (r !==
|
|
2041
|
-
return r === void 0 && (r =
|
|
2060
|
+
if (r !== Le)
|
|
2061
|
+
return r === void 0 && (r = Le, r = n()), r;
|
|
2042
2062
|
},
|
|
2043
2063
|
set(o) {
|
|
2044
2064
|
Object.defineProperty(e, t, {
|
|
@@ -2065,18 +2085,18 @@ function x(...e) {
|
|
|
2065
2085
|
}
|
|
2066
2086
|
return Object.defineProperties({}, t);
|
|
2067
2087
|
}
|
|
2068
|
-
function
|
|
2088
|
+
function Ue(e) {
|
|
2069
2089
|
return JSON.stringify(e);
|
|
2070
2090
|
}
|
|
2071
|
-
function
|
|
2091
|
+
function wr(e) {
|
|
2072
2092
|
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
2073
2093
|
}
|
|
2074
|
-
const
|
|
2094
|
+
const mt = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
2075
2095
|
};
|
|
2076
2096
|
function se(e) {
|
|
2077
2097
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
2078
2098
|
}
|
|
2079
|
-
const
|
|
2099
|
+
const br = ze(() => {
|
|
2080
2100
|
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
|
|
2081
2101
|
return !1;
|
|
2082
2102
|
try {
|
|
@@ -2095,11 +2115,11 @@ function B(e) {
|
|
|
2095
2115
|
const n = t.prototype;
|
|
2096
2116
|
return !(se(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
|
|
2097
2117
|
}
|
|
2098
|
-
function
|
|
2118
|
+
function _t(e) {
|
|
2099
2119
|
return B(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
|
|
2100
2120
|
}
|
|
2101
|
-
const
|
|
2102
|
-
function
|
|
2121
|
+
const kr = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
2122
|
+
function K(e) {
|
|
2103
2123
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2104
2124
|
}
|
|
2105
2125
|
function F(e, t, n) {
|
|
@@ -2119,17 +2139,17 @@ function h(e) {
|
|
|
2119
2139
|
}
|
|
2120
2140
|
return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
|
|
2121
2141
|
}
|
|
2122
|
-
function
|
|
2142
|
+
function zr(e) {
|
|
2123
2143
|
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
|
|
2124
2144
|
}
|
|
2125
|
-
const
|
|
2145
|
+
const Sr = {
|
|
2126
2146
|
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
2127
2147
|
int32: [-2147483648, 2147483647],
|
|
2128
2148
|
uint32: [0, 4294967295],
|
|
2129
2149
|
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
2130
2150
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
2131
2151
|
};
|
|
2132
|
-
function
|
|
2152
|
+
function $r(e, t) {
|
|
2133
2153
|
const n = e._zod.def, r = n.checks;
|
|
2134
2154
|
if (r && r.length > 0)
|
|
2135
2155
|
throw new Error(".pick() cannot be used on object schemas containing refinements");
|
|
@@ -2147,7 +2167,7 @@ function wr(e, t) {
|
|
|
2147
2167
|
});
|
|
2148
2168
|
return F(e, i);
|
|
2149
2169
|
}
|
|
2150
|
-
function
|
|
2170
|
+
function Er(e, t) {
|
|
2151
2171
|
const n = e._zod.def, r = n.checks;
|
|
2152
2172
|
if (r && r.length > 0)
|
|
2153
2173
|
throw new Error(".omit() cannot be used on object schemas containing refinements");
|
|
@@ -2165,7 +2185,7 @@ function br(e, t) {
|
|
|
2165
2185
|
});
|
|
2166
2186
|
return F(e, i);
|
|
2167
2187
|
}
|
|
2168
|
-
function
|
|
2188
|
+
function Tr(e, t) {
|
|
2169
2189
|
if (!B(t))
|
|
2170
2190
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
2171
2191
|
const n = e._zod.def.checks;
|
|
@@ -2183,7 +2203,7 @@ function kr(e, t) {
|
|
|
2183
2203
|
});
|
|
2184
2204
|
return F(e, o);
|
|
2185
2205
|
}
|
|
2186
|
-
function
|
|
2206
|
+
function Zr(e, t) {
|
|
2187
2207
|
if (!B(t))
|
|
2188
2208
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
2189
2209
|
const n = x(e._zod.def, {
|
|
@@ -2194,7 +2214,7 @@ function zr(e, t) {
|
|
|
2194
2214
|
});
|
|
2195
2215
|
return F(e, n);
|
|
2196
2216
|
}
|
|
2197
|
-
function
|
|
2217
|
+
function Or(e, t) {
|
|
2198
2218
|
const n = x(e._zod.def, {
|
|
2199
2219
|
get shape() {
|
|
2200
2220
|
const r = { ...e._zod.def.shape, ...t._zod.def.shape };
|
|
@@ -2208,7 +2228,7 @@ function Sr(e, t) {
|
|
|
2208
2228
|
});
|
|
2209
2229
|
return F(e, n);
|
|
2210
2230
|
}
|
|
2211
|
-
function
|
|
2231
|
+
function Ir(e, t, n) {
|
|
2212
2232
|
const o = t._zod.def.checks;
|
|
2213
2233
|
if (o && o.length > 0)
|
|
2214
2234
|
throw new Error(".partial() cannot be used on object schemas containing refinements");
|
|
@@ -2236,7 +2256,7 @@ function $r(e, t, n) {
|
|
|
2236
2256
|
});
|
|
2237
2257
|
return F(t, s);
|
|
2238
2258
|
}
|
|
2239
|
-
function
|
|
2259
|
+
function Ar(e, t, n) {
|
|
2240
2260
|
const r = x(t._zod.def, {
|
|
2241
2261
|
get shape() {
|
|
2242
2262
|
const o = t._zod.def.shape, i = { ...o };
|
|
@@ -2285,7 +2305,7 @@ function U(e, t, n) {
|
|
|
2285
2305
|
}
|
|
2286
2306
|
return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
|
|
2287
2307
|
}
|
|
2288
|
-
function
|
|
2308
|
+
function Ee(e) {
|
|
2289
2309
|
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
2290
2310
|
}
|
|
2291
2311
|
function ne(...e) {
|
|
@@ -2297,25 +2317,25 @@ function ne(...e) {
|
|
|
2297
2317
|
inst: r
|
|
2298
2318
|
} : { ...t };
|
|
2299
2319
|
}
|
|
2300
|
-
const
|
|
2320
|
+
const yt = (e, t) => {
|
|
2301
2321
|
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
2302
2322
|
value: e._zod,
|
|
2303
2323
|
enumerable: !1
|
|
2304
2324
|
}), Object.defineProperty(e, "issues", {
|
|
2305
2325
|
value: t,
|
|
2306
2326
|
enumerable: !1
|
|
2307
|
-
}), e.message = JSON.stringify(t,
|
|
2327
|
+
}), e.message = JSON.stringify(t, ye, 2), Object.defineProperty(e, "toString", {
|
|
2308
2328
|
value: () => e.message,
|
|
2309
2329
|
enumerable: !1
|
|
2310
2330
|
});
|
|
2311
|
-
},
|
|
2312
|
-
function
|
|
2331
|
+
}, vt = d("$ZodError", yt), wt = d("$ZodError", yt, { Parent: Error });
|
|
2332
|
+
function Pr(e, t = (n) => n.message) {
|
|
2313
2333
|
const n = {}, r = [];
|
|
2314
2334
|
for (const o of e.issues)
|
|
2315
2335
|
o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
|
|
2316
2336
|
return { formErrors: r, fieldErrors: n };
|
|
2317
2337
|
}
|
|
2318
|
-
function
|
|
2338
|
+
function Nr(e, t = (n) => n.message) {
|
|
2319
2339
|
const n = { _errors: [] }, r = (o) => {
|
|
2320
2340
|
for (const i of o.issues)
|
|
2321
2341
|
if (i.code === "invalid_union" && i.errors.length)
|
|
@@ -2336,21 +2356,21 @@ function Zr(e, t = (n) => n.message) {
|
|
|
2336
2356
|
};
|
|
2337
2357
|
return r(e), n;
|
|
2338
2358
|
}
|
|
2339
|
-
const
|
|
2359
|
+
const Te = (e) => (t, n, r, o) => {
|
|
2340
2360
|
const i = r ? Object.assign(r, { async: !1 }) : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, i);
|
|
2341
2361
|
if (s instanceof Promise)
|
|
2342
2362
|
throw new G();
|
|
2343
2363
|
if (s.issues.length) {
|
|
2344
2364
|
const a = new (o?.Err ?? e)(s.issues.map((c) => U(c, i, L())));
|
|
2345
|
-
throw
|
|
2365
|
+
throw mt(a, o?.callee), a;
|
|
2346
2366
|
}
|
|
2347
2367
|
return s.value;
|
|
2348
|
-
},
|
|
2368
|
+
}, Ze = (e) => async (t, n, r, o) => {
|
|
2349
2369
|
const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
2350
2370
|
let s = t._zod.run({ value: n, issues: [] }, i);
|
|
2351
2371
|
if (s instanceof Promise && (s = await s), s.issues.length) {
|
|
2352
2372
|
const a = new (o?.Err ?? e)(s.issues.map((c) => U(c, i, L())));
|
|
2353
|
-
throw
|
|
2373
|
+
throw mt(a, o?.callee), a;
|
|
2354
2374
|
}
|
|
2355
2375
|
return s.value;
|
|
2356
2376
|
}, de = (e) => (t, n, r) => {
|
|
@@ -2359,58 +2379,58 @@ const Ee = (e) => (t, n, r, o) => {
|
|
|
2359
2379
|
throw new G();
|
|
2360
2380
|
return i.issues.length ? {
|
|
2361
2381
|
success: !1,
|
|
2362
|
-
error: new (e ??
|
|
2382
|
+
error: new (e ?? vt)(i.issues.map((s) => U(s, o, L())))
|
|
2363
2383
|
} : { success: !0, data: i.value };
|
|
2364
|
-
},
|
|
2384
|
+
}, Cr = /* @__PURE__ */ de(wt), le = (e) => async (t, n, r) => {
|
|
2365
2385
|
const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
2366
2386
|
let i = t._zod.run({ value: n, issues: [] }, o);
|
|
2367
2387
|
return i instanceof Promise && (i = await i), i.issues.length ? {
|
|
2368
2388
|
success: !1,
|
|
2369
2389
|
error: new e(i.issues.map((s) => U(s, o, L())))
|
|
2370
2390
|
} : { success: !0, data: i.value };
|
|
2371
|
-
},
|
|
2372
|
-
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
2373
|
-
return Ee(e)(t, n, o);
|
|
2374
|
-
}, Pr = (e) => (t, n, r) => Ee(e)(t, n, r), Nr = (e) => async (t, n, r) => {
|
|
2391
|
+
}, Rr = /* @__PURE__ */ le(wt), jr = (e) => (t, n, r) => {
|
|
2375
2392
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
2376
2393
|
return Te(e)(t, n, o);
|
|
2377
|
-
},
|
|
2394
|
+
}, Dr = (e) => (t, n, r) => Te(e)(t, n, r), Lr = (e) => async (t, n, r) => {
|
|
2395
|
+
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
2396
|
+
return Ze(e)(t, n, o);
|
|
2397
|
+
}, Ur = (e) => async (t, n, r) => Ze(e)(t, n, r), Mr = (e) => (t, n, r) => {
|
|
2378
2398
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
2379
2399
|
return de(e)(t, n, o);
|
|
2380
|
-
},
|
|
2400
|
+
}, xr = (e) => (t, n, r) => de(e)(t, n, r), Fr = (e) => async (t, n, r) => {
|
|
2381
2401
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
2382
2402
|
return le(e)(t, n, o);
|
|
2383
|
-
},
|
|
2384
|
-
function
|
|
2385
|
-
return new RegExp(
|
|
2403
|
+
}, Jr = (e) => async (t, n, r) => le(e)(t, n, r), qr = /^[cC][^\s-]{8,}$/, Vr = /^[0-9a-z]+$/, Wr = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Gr = /^[0-9a-vA-V]{20}$/, Br = /^[A-Za-z0-9]{27}$/, Kr = /^[a-zA-Z0-9_-]{21}$/, Hr = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Yr = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, Me = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, Xr = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Qr = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
2404
|
+
function eo() {
|
|
2405
|
+
return new RegExp(Qr, "u");
|
|
2386
2406
|
}
|
|
2387
|
-
const
|
|
2388
|
-
function
|
|
2407
|
+
const to = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, no = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, ro = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, oo = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, io = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, bt = /^[A-Za-z0-9_-]*$/, so = /^\+[1-9]\d{6,14}$/, kt = "(?:(?:\\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])))", ao = /* @__PURE__ */ new RegExp(`^${kt}$`);
|
|
2408
|
+
function zt(e) {
|
|
2389
2409
|
const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
2390
2410
|
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
2391
2411
|
}
|
|
2392
|
-
function
|
|
2393
|
-
return new RegExp(`^${
|
|
2412
|
+
function co(e) {
|
|
2413
|
+
return new RegExp(`^${zt(e)}$`);
|
|
2394
2414
|
}
|
|
2395
|
-
function
|
|
2396
|
-
const t =
|
|
2415
|
+
function uo(e) {
|
|
2416
|
+
const t = zt({ precision: e.precision }), n = ["Z"];
|
|
2397
2417
|
e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
2398
2418
|
const r = `${t}(?:${n.join("|")})`;
|
|
2399
|
-
return new RegExp(`^${
|
|
2419
|
+
return new RegExp(`^${kt}T(?:${r})$`);
|
|
2400
2420
|
}
|
|
2401
|
-
const
|
|
2421
|
+
const lo = (e) => {
|
|
2402
2422
|
const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
2403
2423
|
return new RegExp(`^${t}$`);
|
|
2404
|
-
},
|
|
2424
|
+
}, fo = /^-?\d+$/, St = /^-?\d+(?:\.\d+)?$/, po = /^(?:true|false)$/i, go = /^[^A-Z]*$/, ho = /^[^a-z]*$/, A = /* @__PURE__ */ d("$ZodCheck", (e, t) => {
|
|
2405
2425
|
var n;
|
|
2406
2426
|
e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
2407
|
-
}),
|
|
2427
|
+
}), $t = {
|
|
2408
2428
|
number: "number",
|
|
2409
2429
|
bigint: "bigint",
|
|
2410
2430
|
object: "date"
|
|
2411
|
-
},
|
|
2431
|
+
}, Et = /* @__PURE__ */ d("$ZodCheckLessThan", (e, t) => {
|
|
2412
2432
|
A.init(e, t);
|
|
2413
|
-
const n =
|
|
2433
|
+
const n = $t[typeof t.value];
|
|
2414
2434
|
e._zod.onattach.push((r) => {
|
|
2415
2435
|
const o = r._zod.bag, i = (t.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
2416
2436
|
t.value < i && (t.inclusive ? o.maximum = t.value : o.exclusiveMaximum = t.value);
|
|
@@ -2425,9 +2445,9 @@ const io = (e) => {
|
|
|
2425
2445
|
continue: !t.abort
|
|
2426
2446
|
});
|
|
2427
2447
|
};
|
|
2428
|
-
}),
|
|
2448
|
+
}), Tt = /* @__PURE__ */ d("$ZodCheckGreaterThan", (e, t) => {
|
|
2429
2449
|
A.init(e, t);
|
|
2430
|
-
const n =
|
|
2450
|
+
const n = $t[typeof t.value];
|
|
2431
2451
|
e._zod.onattach.push((r) => {
|
|
2432
2452
|
const o = r._zod.bag, i = (t.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
2433
2453
|
t.value > i && (t.inclusive ? o.minimum = t.value : o.exclusiveMinimum = t.value);
|
|
@@ -2442,14 +2462,14 @@ const io = (e) => {
|
|
|
2442
2462
|
continue: !t.abort
|
|
2443
2463
|
});
|
|
2444
2464
|
};
|
|
2445
|
-
}),
|
|
2465
|
+
}), mo = /* @__PURE__ */ d("$ZodCheckMultipleOf", (e, t) => {
|
|
2446
2466
|
A.init(e, t), e._zod.onattach.push((n) => {
|
|
2447
2467
|
var r;
|
|
2448
2468
|
(r = n._zod.bag).multipleOf ?? (r.multipleOf = t.value);
|
|
2449
2469
|
}), e._zod.check = (n) => {
|
|
2450
2470
|
if (typeof n.value != typeof t.value)
|
|
2451
2471
|
throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
2452
|
-
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) :
|
|
2472
|
+
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : vr(n.value, t.value) === 0) || n.issues.push({
|
|
2453
2473
|
origin: typeof n.value,
|
|
2454
2474
|
code: "not_multiple_of",
|
|
2455
2475
|
divisor: t.value,
|
|
@@ -2458,12 +2478,12 @@ const io = (e) => {
|
|
|
2458
2478
|
continue: !t.abort
|
|
2459
2479
|
});
|
|
2460
2480
|
};
|
|
2461
|
-
}),
|
|
2481
|
+
}), _o = /* @__PURE__ */ d("$ZodCheckNumberFormat", (e, t) => {
|
|
2462
2482
|
A.init(e, t), t.format = t.format || "float64";
|
|
2463
|
-
const n = t.format?.includes("int"), r = n ? "int" : "number", [o, i] =
|
|
2483
|
+
const n = t.format?.includes("int"), r = n ? "int" : "number", [o, i] = Sr[t.format];
|
|
2464
2484
|
e._zod.onattach.push((s) => {
|
|
2465
2485
|
const a = s._zod.bag;
|
|
2466
|
-
a.format = t.format, a.minimum = o, a.maximum = i, n && (a.pattern =
|
|
2486
|
+
a.format = t.format, a.minimum = o, a.maximum = i, n && (a.pattern = fo);
|
|
2467
2487
|
}), e._zod.check = (s) => {
|
|
2468
2488
|
const a = s.value;
|
|
2469
2489
|
if (n) {
|
|
@@ -2519,11 +2539,11 @@ const io = (e) => {
|
|
|
2519
2539
|
continue: !t.abort
|
|
2520
2540
|
});
|
|
2521
2541
|
};
|
|
2522
|
-
}),
|
|
2542
|
+
}), yo = /* @__PURE__ */ d("$ZodCheckMaxLength", (e, t) => {
|
|
2523
2543
|
var n;
|
|
2524
2544
|
A.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
2525
2545
|
const o = r.value;
|
|
2526
|
-
return !
|
|
2546
|
+
return !Se(o) && o.length !== void 0;
|
|
2527
2547
|
}), e._zod.onattach.push((r) => {
|
|
2528
2548
|
const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
2529
2549
|
t.maximum < o && (r._zod.bag.maximum = t.maximum);
|
|
@@ -2531,7 +2551,7 @@ const io = (e) => {
|
|
|
2531
2551
|
const o = r.value;
|
|
2532
2552
|
if (o.length <= t.maximum)
|
|
2533
2553
|
return;
|
|
2534
|
-
const s =
|
|
2554
|
+
const s = Ee(o);
|
|
2535
2555
|
r.issues.push({
|
|
2536
2556
|
origin: s,
|
|
2537
2557
|
code: "too_big",
|
|
@@ -2542,11 +2562,11 @@ const io = (e) => {
|
|
|
2542
2562
|
continue: !t.abort
|
|
2543
2563
|
});
|
|
2544
2564
|
};
|
|
2545
|
-
}),
|
|
2565
|
+
}), vo = /* @__PURE__ */ d("$ZodCheckMinLength", (e, t) => {
|
|
2546
2566
|
var n;
|
|
2547
2567
|
A.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
2548
2568
|
const o = r.value;
|
|
2549
|
-
return !
|
|
2569
|
+
return !Se(o) && o.length !== void 0;
|
|
2550
2570
|
}), e._zod.onattach.push((r) => {
|
|
2551
2571
|
const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
2552
2572
|
t.minimum > o && (r._zod.bag.minimum = t.minimum);
|
|
@@ -2554,7 +2574,7 @@ const io = (e) => {
|
|
|
2554
2574
|
const o = r.value;
|
|
2555
2575
|
if (o.length >= t.minimum)
|
|
2556
2576
|
return;
|
|
2557
|
-
const s =
|
|
2577
|
+
const s = Ee(o);
|
|
2558
2578
|
r.issues.push({
|
|
2559
2579
|
origin: s,
|
|
2560
2580
|
code: "too_small",
|
|
@@ -2565,11 +2585,11 @@ const io = (e) => {
|
|
|
2565
2585
|
continue: !t.abort
|
|
2566
2586
|
});
|
|
2567
2587
|
};
|
|
2568
|
-
}),
|
|
2588
|
+
}), wo = /* @__PURE__ */ d("$ZodCheckLengthEquals", (e, t) => {
|
|
2569
2589
|
var n;
|
|
2570
2590
|
A.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
2571
2591
|
const o = r.value;
|
|
2572
|
-
return !
|
|
2592
|
+
return !Se(o) && o.length !== void 0;
|
|
2573
2593
|
}), e._zod.onattach.push((r) => {
|
|
2574
2594
|
const o = r._zod.bag;
|
|
2575
2595
|
o.minimum = t.length, o.maximum = t.length, o.length = t.length;
|
|
@@ -2577,7 +2597,7 @@ const io = (e) => {
|
|
|
2577
2597
|
const o = r.value, i = o.length;
|
|
2578
2598
|
if (i === t.length)
|
|
2579
2599
|
return;
|
|
2580
|
-
const s =
|
|
2600
|
+
const s = Ee(o), a = i > t.length;
|
|
2581
2601
|
r.issues.push({
|
|
2582
2602
|
origin: s,
|
|
2583
2603
|
...a ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
|
|
@@ -2605,7 +2625,7 @@ const io = (e) => {
|
|
|
2605
2625
|
});
|
|
2606
2626
|
}) : (r = e._zod).check ?? (r.check = () => {
|
|
2607
2627
|
});
|
|
2608
|
-
}),
|
|
2628
|
+
}), bo = /* @__PURE__ */ d("$ZodCheckRegex", (e, t) => {
|
|
2609
2629
|
fe.init(e, t), e._zod.check = (n) => {
|
|
2610
2630
|
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
2611
2631
|
origin: "string",
|
|
@@ -2617,13 +2637,13 @@ const io = (e) => {
|
|
|
2617
2637
|
continue: !t.abort
|
|
2618
2638
|
});
|
|
2619
2639
|
};
|
|
2620
|
-
}),
|
|
2621
|
-
t.pattern ?? (t.pattern =
|
|
2622
|
-
}),
|
|
2623
|
-
t.pattern ?? (t.pattern =
|
|
2624
|
-
}),
|
|
2640
|
+
}), ko = /* @__PURE__ */ d("$ZodCheckLowerCase", (e, t) => {
|
|
2641
|
+
t.pattern ?? (t.pattern = go), fe.init(e, t);
|
|
2642
|
+
}), zo = /* @__PURE__ */ d("$ZodCheckUpperCase", (e, t) => {
|
|
2643
|
+
t.pattern ?? (t.pattern = ho), fe.init(e, t);
|
|
2644
|
+
}), So = /* @__PURE__ */ d("$ZodCheckIncludes", (e, t) => {
|
|
2625
2645
|
A.init(e, t);
|
|
2626
|
-
const n =
|
|
2646
|
+
const n = K(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
2627
2647
|
t.pattern = r, e._zod.onattach.push((o) => {
|
|
2628
2648
|
const i = o._zod.bag;
|
|
2629
2649
|
i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(r);
|
|
@@ -2638,9 +2658,9 @@ const io = (e) => {
|
|
|
2638
2658
|
continue: !t.abort
|
|
2639
2659
|
});
|
|
2640
2660
|
};
|
|
2641
|
-
}),
|
|
2661
|
+
}), $o = /* @__PURE__ */ d("$ZodCheckStartsWith", (e, t) => {
|
|
2642
2662
|
A.init(e, t);
|
|
2643
|
-
const n = new RegExp(`^${
|
|
2663
|
+
const n = new RegExp(`^${K(t.prefix)}.*`);
|
|
2644
2664
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
2645
2665
|
const o = r._zod.bag;
|
|
2646
2666
|
o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
|
|
@@ -2655,9 +2675,9 @@ const io = (e) => {
|
|
|
2655
2675
|
continue: !t.abort
|
|
2656
2676
|
});
|
|
2657
2677
|
};
|
|
2658
|
-
}),
|
|
2678
|
+
}), Eo = /* @__PURE__ */ d("$ZodCheckEndsWith", (e, t) => {
|
|
2659
2679
|
A.init(e, t);
|
|
2660
|
-
const n = new RegExp(`.*${
|
|
2680
|
+
const n = new RegExp(`.*${K(t.suffix)}$`);
|
|
2661
2681
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
2662
2682
|
const o = r._zod.bag;
|
|
2663
2683
|
o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
|
|
@@ -2672,12 +2692,12 @@ const io = (e) => {
|
|
|
2672
2692
|
continue: !t.abort
|
|
2673
2693
|
});
|
|
2674
2694
|
};
|
|
2675
|
-
}),
|
|
2695
|
+
}), To = /* @__PURE__ */ d("$ZodCheckOverwrite", (e, t) => {
|
|
2676
2696
|
A.init(e, t), e._zod.check = (n) => {
|
|
2677
2697
|
n.value = t.tx(n.value);
|
|
2678
2698
|
};
|
|
2679
2699
|
});
|
|
2680
|
-
class
|
|
2700
|
+
class Zo {
|
|
2681
2701
|
constructor(t = []) {
|
|
2682
2702
|
this.content = [], this.indent = 0, this && (this.args = t);
|
|
2683
2703
|
}
|
|
@@ -2700,13 +2720,13 @@ class zo {
|
|
|
2700
2720
|
`));
|
|
2701
2721
|
}
|
|
2702
2722
|
}
|
|
2703
|
-
const
|
|
2723
|
+
const Oo = {
|
|
2704
2724
|
major: 4,
|
|
2705
2725
|
minor: 3,
|
|
2706
2726
|
patch: 6
|
|
2707
2727
|
}, z = /* @__PURE__ */ d("$ZodType", (e, t) => {
|
|
2708
2728
|
var n;
|
|
2709
|
-
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version =
|
|
2729
|
+
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Oo;
|
|
2710
2730
|
const r = [...e._zod.def.checks ?? []];
|
|
2711
2731
|
e._zod.traits.has("$ZodCheck") && r.unshift(e);
|
|
2712
2732
|
for (const o of r)
|
|
@@ -2769,17 +2789,17 @@ const So = {
|
|
|
2769
2789
|
v(e, "~standard", () => ({
|
|
2770
2790
|
validate: (o) => {
|
|
2771
2791
|
try {
|
|
2772
|
-
const i =
|
|
2792
|
+
const i = Cr(e, o);
|
|
2773
2793
|
return i.success ? { value: i.data } : { issues: i.error?.issues };
|
|
2774
2794
|
} catch {
|
|
2775
|
-
return
|
|
2795
|
+
return Rr(e, o).then((s) => s.success ? { value: s.data } : { issues: s.error?.issues });
|
|
2776
2796
|
}
|
|
2777
2797
|
},
|
|
2778
2798
|
vendor: "zod",
|
|
2779
2799
|
version: 1
|
|
2780
2800
|
}));
|
|
2781
|
-
}),
|
|
2782
|
-
z.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ??
|
|
2801
|
+
}), Oe = /* @__PURE__ */ d("$ZodString", (e, t) => {
|
|
2802
|
+
z.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? lo(e._zod.bag), e._zod.parse = (n, r) => {
|
|
2783
2803
|
if (t.coerce)
|
|
2784
2804
|
try {
|
|
2785
2805
|
n.value = String(n.value);
|
|
@@ -2792,11 +2812,11 @@ const So = {
|
|
|
2792
2812
|
inst: e
|
|
2793
2813
|
}), n;
|
|
2794
2814
|
};
|
|
2795
|
-
}),
|
|
2796
|
-
fe.init(e, t),
|
|
2797
|
-
}),
|
|
2798
|
-
t.pattern ?? (t.pattern =
|
|
2799
|
-
}),
|
|
2815
|
+
}), k = /* @__PURE__ */ d("$ZodStringFormat", (e, t) => {
|
|
2816
|
+
fe.init(e, t), Oe.init(e, t);
|
|
2817
|
+
}), Io = /* @__PURE__ */ d("$ZodGUID", (e, t) => {
|
|
2818
|
+
t.pattern ?? (t.pattern = Yr), k.init(e, t);
|
|
2819
|
+
}), Ao = /* @__PURE__ */ d("$ZodUUID", (e, t) => {
|
|
2800
2820
|
if (t.version) {
|
|
2801
2821
|
const r = {
|
|
2802
2822
|
v1: 1,
|
|
@@ -2810,14 +2830,14 @@ const So = {
|
|
|
2810
2830
|
}[t.version];
|
|
2811
2831
|
if (r === void 0)
|
|
2812
2832
|
throw new Error(`Invalid UUID version: "${t.version}"`);
|
|
2813
|
-
t.pattern ?? (t.pattern =
|
|
2833
|
+
t.pattern ?? (t.pattern = Me(r));
|
|
2814
2834
|
} else
|
|
2815
|
-
t.pattern ?? (t.pattern =
|
|
2816
|
-
|
|
2817
|
-
}),
|
|
2818
|
-
t.pattern ?? (t.pattern =
|
|
2819
|
-
}),
|
|
2820
|
-
|
|
2835
|
+
t.pattern ?? (t.pattern = Me());
|
|
2836
|
+
k.init(e, t);
|
|
2837
|
+
}), Po = /* @__PURE__ */ d("$ZodEmail", (e, t) => {
|
|
2838
|
+
t.pattern ?? (t.pattern = Xr), k.init(e, t);
|
|
2839
|
+
}), No = /* @__PURE__ */ d("$ZodURL", (e, t) => {
|
|
2840
|
+
k.init(e, t), e._zod.check = (n) => {
|
|
2821
2841
|
try {
|
|
2822
2842
|
const r = n.value.trim(), o = new URL(r);
|
|
2823
2843
|
t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(o.hostname) || n.issues.push({
|
|
@@ -2848,32 +2868,32 @@ const So = {
|
|
|
2848
2868
|
});
|
|
2849
2869
|
}
|
|
2850
2870
|
};
|
|
2851
|
-
}),
|
|
2852
|
-
t.pattern ?? (t.pattern =
|
|
2853
|
-
}),
|
|
2854
|
-
t.pattern ?? (t.pattern =
|
|
2855
|
-
}),
|
|
2856
|
-
t.pattern ?? (t.pattern =
|
|
2857
|
-
}),
|
|
2858
|
-
t.pattern ?? (t.pattern =
|
|
2859
|
-
}),
|
|
2860
|
-
t.pattern ?? (t.pattern =
|
|
2861
|
-
}),
|
|
2862
|
-
t.pattern ?? (t.pattern =
|
|
2863
|
-
}),
|
|
2864
|
-
t.pattern ?? (t.pattern =
|
|
2865
|
-
}),
|
|
2866
|
-
t.pattern ?? (t.pattern =
|
|
2867
|
-
}),
|
|
2868
|
-
t.pattern ?? (t.pattern =
|
|
2869
|
-
}),
|
|
2870
|
-
t.pattern ?? (t.pattern =
|
|
2871
|
-
}),
|
|
2872
|
-
t.pattern ?? (t.pattern =
|
|
2873
|
-
}),
|
|
2874
|
-
t.pattern ?? (t.pattern =
|
|
2875
|
-
}),
|
|
2876
|
-
t.pattern ?? (t.pattern =
|
|
2871
|
+
}), Co = /* @__PURE__ */ d("$ZodEmoji", (e, t) => {
|
|
2872
|
+
t.pattern ?? (t.pattern = eo()), k.init(e, t);
|
|
2873
|
+
}), Ro = /* @__PURE__ */ d("$ZodNanoID", (e, t) => {
|
|
2874
|
+
t.pattern ?? (t.pattern = Kr), k.init(e, t);
|
|
2875
|
+
}), jo = /* @__PURE__ */ d("$ZodCUID", (e, t) => {
|
|
2876
|
+
t.pattern ?? (t.pattern = qr), k.init(e, t);
|
|
2877
|
+
}), Do = /* @__PURE__ */ d("$ZodCUID2", (e, t) => {
|
|
2878
|
+
t.pattern ?? (t.pattern = Vr), k.init(e, t);
|
|
2879
|
+
}), Lo = /* @__PURE__ */ d("$ZodULID", (e, t) => {
|
|
2880
|
+
t.pattern ?? (t.pattern = Wr), k.init(e, t);
|
|
2881
|
+
}), Uo = /* @__PURE__ */ d("$ZodXID", (e, t) => {
|
|
2882
|
+
t.pattern ?? (t.pattern = Gr), k.init(e, t);
|
|
2883
|
+
}), Mo = /* @__PURE__ */ d("$ZodKSUID", (e, t) => {
|
|
2884
|
+
t.pattern ?? (t.pattern = Br), k.init(e, t);
|
|
2885
|
+
}), xo = /* @__PURE__ */ d("$ZodISODateTime", (e, t) => {
|
|
2886
|
+
t.pattern ?? (t.pattern = uo(t)), k.init(e, t);
|
|
2887
|
+
}), Fo = /* @__PURE__ */ d("$ZodISODate", (e, t) => {
|
|
2888
|
+
t.pattern ?? (t.pattern = ao), k.init(e, t);
|
|
2889
|
+
}), Jo = /* @__PURE__ */ d("$ZodISOTime", (e, t) => {
|
|
2890
|
+
t.pattern ?? (t.pattern = co(t)), k.init(e, t);
|
|
2891
|
+
}), qo = /* @__PURE__ */ d("$ZodISODuration", (e, t) => {
|
|
2892
|
+
t.pattern ?? (t.pattern = Hr), k.init(e, t);
|
|
2893
|
+
}), Vo = /* @__PURE__ */ d("$ZodIPv4", (e, t) => {
|
|
2894
|
+
t.pattern ?? (t.pattern = to), k.init(e, t), e._zod.bag.format = "ipv4";
|
|
2895
|
+
}), Wo = /* @__PURE__ */ d("$ZodIPv6", (e, t) => {
|
|
2896
|
+
t.pattern ?? (t.pattern = no), k.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
|
|
2877
2897
|
try {
|
|
2878
2898
|
new URL(`http://[${n.value}]`);
|
|
2879
2899
|
} catch {
|
|
@@ -2886,10 +2906,10 @@ const So = {
|
|
|
2886
2906
|
});
|
|
2887
2907
|
}
|
|
2888
2908
|
};
|
|
2889
|
-
}),
|
|
2890
|
-
t.pattern ?? (t.pattern =
|
|
2891
|
-
}),
|
|
2892
|
-
t.pattern ?? (t.pattern =
|
|
2909
|
+
}), Go = /* @__PURE__ */ d("$ZodCIDRv4", (e, t) => {
|
|
2910
|
+
t.pattern ?? (t.pattern = ro), k.init(e, t);
|
|
2911
|
+
}), Bo = /* @__PURE__ */ d("$ZodCIDRv6", (e, t) => {
|
|
2912
|
+
t.pattern ?? (t.pattern = oo), k.init(e, t), e._zod.check = (n) => {
|
|
2893
2913
|
const r = n.value.split("/");
|
|
2894
2914
|
try {
|
|
2895
2915
|
if (r.length !== 2)
|
|
@@ -2914,7 +2934,7 @@ const So = {
|
|
|
2914
2934
|
}
|
|
2915
2935
|
};
|
|
2916
2936
|
});
|
|
2917
|
-
function
|
|
2937
|
+
function Zt(e) {
|
|
2918
2938
|
if (e === "")
|
|
2919
2939
|
return !0;
|
|
2920
2940
|
if (e.length % 4 !== 0)
|
|
@@ -2925,9 +2945,9 @@ function Tt(e) {
|
|
|
2925
2945
|
return !1;
|
|
2926
2946
|
}
|
|
2927
2947
|
}
|
|
2928
|
-
const
|
|
2929
|
-
t.pattern ?? (t.pattern =
|
|
2930
|
-
|
|
2948
|
+
const Ko = /* @__PURE__ */ d("$ZodBase64", (e, t) => {
|
|
2949
|
+
t.pattern ?? (t.pattern = io), k.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
|
|
2950
|
+
Zt(n.value) || n.issues.push({
|
|
2931
2951
|
code: "invalid_format",
|
|
2932
2952
|
format: "base64",
|
|
2933
2953
|
input: n.value,
|
|
@@ -2936,15 +2956,15 @@ const qo = /* @__PURE__ */ d("$ZodBase64", (e, t) => {
|
|
|
2936
2956
|
});
|
|
2937
2957
|
};
|
|
2938
2958
|
});
|
|
2939
|
-
function
|
|
2940
|
-
if (!
|
|
2959
|
+
function Ho(e) {
|
|
2960
|
+
if (!bt.test(e))
|
|
2941
2961
|
return !1;
|
|
2942
2962
|
const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
|
|
2943
|
-
return
|
|
2963
|
+
return Zt(n);
|
|
2944
2964
|
}
|
|
2945
|
-
const
|
|
2946
|
-
t.pattern ?? (t.pattern =
|
|
2947
|
-
|
|
2965
|
+
const Yo = /* @__PURE__ */ d("$ZodBase64URL", (e, t) => {
|
|
2966
|
+
t.pattern ?? (t.pattern = bt), k.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
|
|
2967
|
+
Ho(n.value) || n.issues.push({
|
|
2948
2968
|
code: "invalid_format",
|
|
2949
2969
|
format: "base64url",
|
|
2950
2970
|
input: n.value,
|
|
@@ -2952,10 +2972,10 @@ const Wo = /* @__PURE__ */ d("$ZodBase64URL", (e, t) => {
|
|
|
2952
2972
|
continue: !t.abort
|
|
2953
2973
|
});
|
|
2954
2974
|
};
|
|
2955
|
-
}),
|
|
2956
|
-
t.pattern ?? (t.pattern =
|
|
2975
|
+
}), Xo = /* @__PURE__ */ d("$ZodE164", (e, t) => {
|
|
2976
|
+
t.pattern ?? (t.pattern = so), k.init(e, t);
|
|
2957
2977
|
});
|
|
2958
|
-
function
|
|
2978
|
+
function Qo(e, t = null) {
|
|
2959
2979
|
try {
|
|
2960
2980
|
const n = e.split(".");
|
|
2961
2981
|
if (n.length !== 3)
|
|
@@ -2969,9 +2989,9 @@ function Bo(e, t = null) {
|
|
|
2969
2989
|
return !1;
|
|
2970
2990
|
}
|
|
2971
2991
|
}
|
|
2972
|
-
const
|
|
2973
|
-
|
|
2974
|
-
|
|
2992
|
+
const ei = /* @__PURE__ */ d("$ZodJWT", (e, t) => {
|
|
2993
|
+
k.init(e, t), e._zod.check = (n) => {
|
|
2994
|
+
Qo(n.value, t.alg) || n.issues.push({
|
|
2975
2995
|
code: "invalid_format",
|
|
2976
2996
|
format: "jwt",
|
|
2977
2997
|
input: n.value,
|
|
@@ -2979,8 +2999,8 @@ const Ho = /* @__PURE__ */ d("$ZodJWT", (e, t) => {
|
|
|
2979
2999
|
continue: !t.abort
|
|
2980
3000
|
});
|
|
2981
3001
|
};
|
|
2982
|
-
}),
|
|
2983
|
-
z.init(e, t), e._zod.pattern = e._zod.bag.pattern ??
|
|
3002
|
+
}), Ot = /* @__PURE__ */ d("$ZodNumber", (e, t) => {
|
|
3003
|
+
z.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? St, e._zod.parse = (n, r) => {
|
|
2984
3004
|
if (t.coerce)
|
|
2985
3005
|
try {
|
|
2986
3006
|
n.value = Number(n.value);
|
|
@@ -2998,10 +3018,10 @@ const Ho = /* @__PURE__ */ d("$ZodJWT", (e, t) => {
|
|
|
2998
3018
|
...i ? { received: i } : {}
|
|
2999
3019
|
}), n;
|
|
3000
3020
|
};
|
|
3001
|
-
}),
|
|
3002
|
-
|
|
3003
|
-
}),
|
|
3004
|
-
z.init(e, t), e._zod.pattern =
|
|
3021
|
+
}), ti = /* @__PURE__ */ d("$ZodNumberFormat", (e, t) => {
|
|
3022
|
+
_o.init(e, t), Ot.init(e, t);
|
|
3023
|
+
}), ni = /* @__PURE__ */ d("$ZodBoolean", (e, t) => {
|
|
3024
|
+
z.init(e, t), e._zod.pattern = po, e._zod.parse = (n, r) => {
|
|
3005
3025
|
if (t.coerce)
|
|
3006
3026
|
try {
|
|
3007
3027
|
n.value = !!n.value;
|
|
@@ -3015,9 +3035,9 @@ const Ho = /* @__PURE__ */ d("$ZodJWT", (e, t) => {
|
|
|
3015
3035
|
inst: e
|
|
3016
3036
|
}), n;
|
|
3017
3037
|
};
|
|
3018
|
-
}),
|
|
3038
|
+
}), ri = /* @__PURE__ */ d("$ZodUnknown", (e, t) => {
|
|
3019
3039
|
z.init(e, t), e._zod.parse = (n) => n;
|
|
3020
|
-
}),
|
|
3040
|
+
}), oi = /* @__PURE__ */ d("$ZodNever", (e, t) => {
|
|
3021
3041
|
z.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
|
|
3022
3042
|
expected: "never",
|
|
3023
3043
|
code: "invalid_type",
|
|
@@ -3025,10 +3045,10 @@ const Ho = /* @__PURE__ */ d("$ZodJWT", (e, t) => {
|
|
|
3025
3045
|
inst: e
|
|
3026
3046
|
}), n);
|
|
3027
3047
|
});
|
|
3028
|
-
function
|
|
3048
|
+
function xe(e, t, n) {
|
|
3029
3049
|
e.issues.length && t.issues.push(...W(n, e.issues)), t.value[n] = e.value;
|
|
3030
3050
|
}
|
|
3031
|
-
const
|
|
3051
|
+
const ii = /* @__PURE__ */ d("$ZodArray", (e, t) => {
|
|
3032
3052
|
z.init(e, t), e._zod.parse = (n, r) => {
|
|
3033
3053
|
const o = n.value;
|
|
3034
3054
|
if (!Array.isArray(o))
|
|
@@ -3045,7 +3065,7 @@ const ei = /* @__PURE__ */ d("$ZodArray", (e, t) => {
|
|
|
3045
3065
|
value: a,
|
|
3046
3066
|
issues: []
|
|
3047
3067
|
}, r);
|
|
3048
|
-
c instanceof Promise ? i.push(c.then((u) =>
|
|
3068
|
+
c instanceof Promise ? i.push(c.then((u) => xe(u, n, s))) : xe(c, n, s);
|
|
3049
3069
|
}
|
|
3050
3070
|
return i.length ? Promise.all(i).then(() => n) : n;
|
|
3051
3071
|
};
|
|
@@ -3058,12 +3078,12 @@ function ae(e, t, n, r, o) {
|
|
|
3058
3078
|
}
|
|
3059
3079
|
e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
3060
3080
|
}
|
|
3061
|
-
function
|
|
3081
|
+
function It(e) {
|
|
3062
3082
|
const t = Object.keys(e.shape);
|
|
3063
3083
|
for (const r of t)
|
|
3064
3084
|
if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
|
|
3065
3085
|
throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
|
|
3066
|
-
const n =
|
|
3086
|
+
const n = zr(e.shape);
|
|
3067
3087
|
return {
|
|
3068
3088
|
...e,
|
|
3069
3089
|
keys: t,
|
|
@@ -3072,7 +3092,7 @@ function Ot(e) {
|
|
|
3072
3092
|
optionalKeys: new Set(n)
|
|
3073
3093
|
};
|
|
3074
3094
|
}
|
|
3075
|
-
function
|
|
3095
|
+
function At(e, t, n, r, o, i) {
|
|
3076
3096
|
const s = [], a = o.keySet, c = o.catchall._zod, u = c.def.type, l = c.optout === "optional";
|
|
3077
3097
|
for (const f in t) {
|
|
3078
3098
|
if (a.has(f))
|
|
@@ -3091,7 +3111,7 @@ function It(e, t, n, r, o, i) {
|
|
|
3091
3111
|
inst: i
|
|
3092
3112
|
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
3093
3113
|
}
|
|
3094
|
-
const
|
|
3114
|
+
const si = /* @__PURE__ */ d("$ZodObject", (e, t) => {
|
|
3095
3115
|
if (z.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
3096
3116
|
const a = t.shape;
|
|
3097
3117
|
Object.defineProperty(t, "shape", {
|
|
@@ -3103,7 +3123,7 @@ const ti = /* @__PURE__ */ d("$ZodObject", (e, t) => {
|
|
|
3103
3123
|
}
|
|
3104
3124
|
});
|
|
3105
3125
|
}
|
|
3106
|
-
const r =
|
|
3126
|
+
const r = ze(() => It(t));
|
|
3107
3127
|
v(e._zod, "propValues", () => {
|
|
3108
3128
|
const a = t.shape, c = {};
|
|
3109
3129
|
for (const u in a) {
|
|
@@ -3134,24 +3154,24 @@ const ti = /* @__PURE__ */ d("$ZodObject", (e, t) => {
|
|
|
3134
3154
|
const g = f[p], y = g._zod.optout === "optional", _ = g._zod.run({ value: u[p], issues: [] }, c);
|
|
3135
3155
|
_ instanceof Promise ? l.push(_.then((m) => ae(m, a, p, u, y))) : ae(_, a, p, u, y);
|
|
3136
3156
|
}
|
|
3137
|
-
return i ?
|
|
3157
|
+
return i ? At(l, u, a, c, r.value, e) : l.length ? Promise.all(l).then(() => a) : a;
|
|
3138
3158
|
};
|
|
3139
|
-
}),
|
|
3140
|
-
|
|
3141
|
-
const n = e._zod.parse, r =
|
|
3142
|
-
const g = new
|
|
3143
|
-
const I =
|
|
3159
|
+
}), ai = /* @__PURE__ */ d("$ZodObjectJIT", (e, t) => {
|
|
3160
|
+
si.init(e, t);
|
|
3161
|
+
const n = e._zod.parse, r = ze(() => It(t)), o = (p) => {
|
|
3162
|
+
const g = new Zo(["shape", "payload", "ctx"]), y = r.value, _ = (C) => {
|
|
3163
|
+
const I = Ue(C);
|
|
3144
3164
|
return `shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`;
|
|
3145
3165
|
};
|
|
3146
3166
|
g.write("const input = payload.value;");
|
|
3147
3167
|
const m = /* @__PURE__ */ Object.create(null);
|
|
3148
|
-
let
|
|
3168
|
+
let b = 0;
|
|
3149
3169
|
for (const C of y.keys)
|
|
3150
|
-
m[C] = `key_${
|
|
3170
|
+
m[C] = `key_${b++}`;
|
|
3151
3171
|
g.write("const newResult = {};");
|
|
3152
3172
|
for (const C of y.keys) {
|
|
3153
|
-
const I = m[C], N =
|
|
3154
|
-
g.write(`const ${I} = ${_(C)};`),
|
|
3173
|
+
const I = m[C], N = Ue(C), Jt = p[C]?._zod?.optout === "optional";
|
|
3174
|
+
g.write(`const ${I} = ${_(C)};`), Jt ? g.write(`
|
|
3155
3175
|
if (${I}.issues.length) {
|
|
3156
3176
|
if (${N} in input) {
|
|
3157
3177
|
payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
|
|
@@ -3188,16 +3208,16 @@ const ti = /* @__PURE__ */ d("$ZodObject", (e, t) => {
|
|
|
3188
3208
|
`);
|
|
3189
3209
|
}
|
|
3190
3210
|
g.write("payload.value = newResult;"), g.write("return payload;");
|
|
3191
|
-
const
|
|
3192
|
-
return (C, I) =>
|
|
3211
|
+
const Z = g.compile();
|
|
3212
|
+
return (C, I) => Z(p, C, I);
|
|
3193
3213
|
};
|
|
3194
3214
|
let i;
|
|
3195
|
-
const s = se, a = !
|
|
3215
|
+
const s = se, a = !gt.jitless, u = a && br.value, l = t.catchall;
|
|
3196
3216
|
let f;
|
|
3197
3217
|
e._zod.parse = (p, g) => {
|
|
3198
3218
|
f ?? (f = r.value);
|
|
3199
3219
|
const y = p.value;
|
|
3200
|
-
return s(y) ? a && u && g?.async === !1 && g.jitless !== !0 ? (i || (i = o(t.shape)), p = i(p, g), l ?
|
|
3220
|
+
return s(y) ? a && u && g?.async === !1 && g.jitless !== !0 ? (i || (i = o(t.shape)), p = i(p, g), l ? At([], y, p, g, f, e) : p) : n(p, g) : (p.issues.push({
|
|
3201
3221
|
expected: "object",
|
|
3202
3222
|
code: "invalid_type",
|
|
3203
3223
|
input: y,
|
|
@@ -3205,7 +3225,7 @@ const ti = /* @__PURE__ */ d("$ZodObject", (e, t) => {
|
|
|
3205
3225
|
}), p);
|
|
3206
3226
|
};
|
|
3207
3227
|
});
|
|
3208
|
-
function
|
|
3228
|
+
function Fe(e, t, n, r) {
|
|
3209
3229
|
for (const i of e)
|
|
3210
3230
|
if (i.issues.length === 0)
|
|
3211
3231
|
return t.value = i.value, t;
|
|
@@ -3217,14 +3237,14 @@ function xe(e, t, n, r) {
|
|
|
3217
3237
|
errors: e.map((i) => i.issues.map((s) => U(s, r, L())))
|
|
3218
3238
|
}), t);
|
|
3219
3239
|
}
|
|
3220
|
-
const
|
|
3240
|
+
const ci = /* @__PURE__ */ d("$ZodUnion", (e, t) => {
|
|
3221
3241
|
z.init(e, t), v(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), v(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), v(e._zod, "values", () => {
|
|
3222
3242
|
if (t.options.every((o) => o._zod.values))
|
|
3223
3243
|
return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
|
|
3224
3244
|
}), v(e._zod, "pattern", () => {
|
|
3225
3245
|
if (t.options.every((o) => o._zod.pattern)) {
|
|
3226
3246
|
const o = t.options.map((i) => i._zod.pattern);
|
|
3227
|
-
return new RegExp(`^(${o.map((i) =>
|
|
3247
|
+
return new RegExp(`^(${o.map((i) => $e(i.source)).join("|")})$`);
|
|
3228
3248
|
}
|
|
3229
3249
|
});
|
|
3230
3250
|
const n = t.options.length === 1, r = t.options[0]._zod.run;
|
|
@@ -3246,15 +3266,15 @@ const ri = /* @__PURE__ */ d("$ZodUnion", (e, t) => {
|
|
|
3246
3266
|
a.push(u);
|
|
3247
3267
|
}
|
|
3248
3268
|
}
|
|
3249
|
-
return s ? Promise.all(a).then((c) =>
|
|
3269
|
+
return s ? Promise.all(a).then((c) => Fe(c, o, e, i)) : Fe(a, o, e, i);
|
|
3250
3270
|
};
|
|
3251
|
-
}),
|
|
3271
|
+
}), ui = /* @__PURE__ */ d("$ZodIntersection", (e, t) => {
|
|
3252
3272
|
z.init(e, t), e._zod.parse = (n, r) => {
|
|
3253
3273
|
const o = n.value, i = t.left._zod.run({ value: o, issues: [] }, r), s = t.right._zod.run({ value: o, issues: [] }, r);
|
|
3254
|
-
return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([c, u]) =>
|
|
3274
|
+
return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([c, u]) => Je(n, c, u)) : Je(n, i, s);
|
|
3255
3275
|
};
|
|
3256
3276
|
});
|
|
3257
|
-
function
|
|
3277
|
+
function ve(e, t) {
|
|
3258
3278
|
if (e === t)
|
|
3259
3279
|
return { valid: !0, data: e };
|
|
3260
3280
|
if (e instanceof Date && t instanceof Date && +e == +t)
|
|
@@ -3262,7 +3282,7 @@ function ye(e, t) {
|
|
|
3262
3282
|
if (B(e) && B(t)) {
|
|
3263
3283
|
const n = Object.keys(t), r = Object.keys(e).filter((i) => n.indexOf(i) !== -1), o = { ...e, ...t };
|
|
3264
3284
|
for (const i of r) {
|
|
3265
|
-
const s =
|
|
3285
|
+
const s = ve(e[i], t[i]);
|
|
3266
3286
|
if (!s.valid)
|
|
3267
3287
|
return {
|
|
3268
3288
|
valid: !1,
|
|
@@ -3277,7 +3297,7 @@ function ye(e, t) {
|
|
|
3277
3297
|
return { valid: !1, mergeErrorPath: [] };
|
|
3278
3298
|
const n = [];
|
|
3279
3299
|
for (let r = 0; r < e.length; r++) {
|
|
3280
|
-
const o = e[r], i = t[r], s =
|
|
3300
|
+
const o = e[r], i = t[r], s = ve(o, i);
|
|
3281
3301
|
if (!s.valid)
|
|
3282
3302
|
return {
|
|
3283
3303
|
valid: !1,
|
|
@@ -3289,7 +3309,7 @@ function ye(e, t) {
|
|
|
3289
3309
|
}
|
|
3290
3310
|
return { valid: !1, mergeErrorPath: [] };
|
|
3291
3311
|
}
|
|
3292
|
-
function
|
|
3312
|
+
function Je(e, t, n) {
|
|
3293
3313
|
const r = /* @__PURE__ */ new Map();
|
|
3294
3314
|
let o;
|
|
3295
3315
|
for (const a of t.issues)
|
|
@@ -3308,12 +3328,12 @@ function Fe(e, t, n) {
|
|
|
3308
3328
|
const i = [...r].filter(([, a]) => a.l && a.r).map(([a]) => a);
|
|
3309
3329
|
if (i.length && o && e.issues.push({ ...o, keys: i }), V(e))
|
|
3310
3330
|
return e;
|
|
3311
|
-
const s =
|
|
3331
|
+
const s = ve(t.value, n.value);
|
|
3312
3332
|
if (!s.valid)
|
|
3313
3333
|
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);
|
|
3314
3334
|
return e.value = s.data, e;
|
|
3315
3335
|
}
|
|
3316
|
-
const
|
|
3336
|
+
const di = /* @__PURE__ */ d("$ZodRecord", (e, t) => {
|
|
3317
3337
|
z.init(e, t), e._zod.parse = (n, r) => {
|
|
3318
3338
|
const o = n.value;
|
|
3319
3339
|
if (!B(o))
|
|
@@ -3352,7 +3372,7 @@ const ii = /* @__PURE__ */ d("$ZodRecord", (e, t) => {
|
|
|
3352
3372
|
let c = t.keyType._zod.run({ value: a, issues: [] }, r);
|
|
3353
3373
|
if (c instanceof Promise)
|
|
3354
3374
|
throw new Error("Async schemas not supported in object keys currently");
|
|
3355
|
-
if (typeof a == "string" &&
|
|
3375
|
+
if (typeof a == "string" && St.test(a) && c.issues.length) {
|
|
3356
3376
|
const f = t.keyType._zod.run({ value: Number(a), issues: [] }, r);
|
|
3357
3377
|
if (f instanceof Promise)
|
|
3358
3378
|
throw new Error("Async schemas not supported in object keys currently");
|
|
@@ -3377,10 +3397,10 @@ const ii = /* @__PURE__ */ d("$ZodRecord", (e, t) => {
|
|
|
3377
3397
|
}
|
|
3378
3398
|
return i.length ? Promise.all(i).then(() => n) : n;
|
|
3379
3399
|
};
|
|
3380
|
-
}),
|
|
3400
|
+
}), li = /* @__PURE__ */ d("$ZodEnum", (e, t) => {
|
|
3381
3401
|
z.init(e, t);
|
|
3382
|
-
const n =
|
|
3383
|
-
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) =>
|
|
3402
|
+
const n = ht(t.entries), r = new Set(n);
|
|
3403
|
+
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => kr.has(typeof o)).map((o) => typeof o == "string" ? K(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => {
|
|
3384
3404
|
const s = o.value;
|
|
3385
3405
|
return r.has(s) || o.issues.push({
|
|
3386
3406
|
code: "invalid_value",
|
|
@@ -3389,11 +3409,11 @@ const ii = /* @__PURE__ */ d("$ZodRecord", (e, t) => {
|
|
|
3389
3409
|
inst: e
|
|
3390
3410
|
}), o;
|
|
3391
3411
|
};
|
|
3392
|
-
}),
|
|
3412
|
+
}), fi = /* @__PURE__ */ d("$ZodLiteral", (e, t) => {
|
|
3393
3413
|
if (z.init(e, t), t.values.length === 0)
|
|
3394
3414
|
throw new Error("Cannot create literal schema with no valid values");
|
|
3395
3415
|
const n = new Set(t.values);
|
|
3396
|
-
e._zod.values = n, e._zod.pattern = new RegExp(`^(${t.values.map((r) => typeof r == "string" ?
|
|
3416
|
+
e._zod.values = n, e._zod.pattern = new RegExp(`^(${t.values.map((r) => typeof r == "string" ? K(r) : r ? K(r.toString()) : String(r)).join("|")})$`), e._zod.parse = (r, o) => {
|
|
3397
3417
|
const i = r.value;
|
|
3398
3418
|
return n.has(i) || r.issues.push({
|
|
3399
3419
|
code: "invalid_value",
|
|
@@ -3402,10 +3422,10 @@ const ii = /* @__PURE__ */ d("$ZodRecord", (e, t) => {
|
|
|
3402
3422
|
inst: e
|
|
3403
3423
|
}), r;
|
|
3404
3424
|
};
|
|
3405
|
-
}),
|
|
3425
|
+
}), pi = /* @__PURE__ */ d("$ZodTransform", (e, t) => {
|
|
3406
3426
|
z.init(e, t), e._zod.parse = (n, r) => {
|
|
3407
3427
|
if (r.direction === "backward")
|
|
3408
|
-
throw new
|
|
3428
|
+
throw new pt(e.constructor.name);
|
|
3409
3429
|
const o = t.transform(n.value, n);
|
|
3410
3430
|
if (r.async)
|
|
3411
3431
|
return (o instanceof Promise ? o : Promise.resolve(o)).then((s) => (n.value = s, n));
|
|
@@ -3414,52 +3434,52 @@ const ii = /* @__PURE__ */ d("$ZodRecord", (e, t) => {
|
|
|
3414
3434
|
return n.value = o, n;
|
|
3415
3435
|
};
|
|
3416
3436
|
});
|
|
3417
|
-
function
|
|
3437
|
+
function qe(e, t) {
|
|
3418
3438
|
return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
|
|
3419
3439
|
}
|
|
3420
|
-
const
|
|
3440
|
+
const Pt = /* @__PURE__ */ d("$ZodOptional", (e, t) => {
|
|
3421
3441
|
z.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", v(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), v(e._zod, "pattern", () => {
|
|
3422
3442
|
const n = t.innerType._zod.pattern;
|
|
3423
|
-
return n ? new RegExp(`^(${
|
|
3443
|
+
return n ? new RegExp(`^(${$e(n.source)})?$`) : void 0;
|
|
3424
3444
|
}), e._zod.parse = (n, r) => {
|
|
3425
3445
|
if (t.innerType._zod.optin === "optional") {
|
|
3426
3446
|
const o = t.innerType._zod.run(n, r);
|
|
3427
|
-
return o instanceof Promise ? o.then((i) =>
|
|
3447
|
+
return o instanceof Promise ? o.then((i) => qe(i, n.value)) : qe(o, n.value);
|
|
3428
3448
|
}
|
|
3429
3449
|
return n.value === void 0 ? n : t.innerType._zod.run(n, r);
|
|
3430
3450
|
};
|
|
3431
|
-
}),
|
|
3432
|
-
|
|
3433
|
-
}),
|
|
3451
|
+
}), gi = /* @__PURE__ */ d("$ZodExactOptional", (e, t) => {
|
|
3452
|
+
Pt.init(e, t), v(e._zod, "values", () => t.innerType._zod.values), v(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
|
|
3453
|
+
}), hi = /* @__PURE__ */ d("$ZodNullable", (e, t) => {
|
|
3434
3454
|
z.init(e, t), v(e._zod, "optin", () => t.innerType._zod.optin), v(e._zod, "optout", () => t.innerType._zod.optout), v(e._zod, "pattern", () => {
|
|
3435
3455
|
const n = t.innerType._zod.pattern;
|
|
3436
|
-
return n ? new RegExp(`^(${
|
|
3456
|
+
return n ? new RegExp(`^(${$e(n.source)}|null)$`) : void 0;
|
|
3437
3457
|
}), v(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
|
|
3438
|
-
}),
|
|
3458
|
+
}), mi = /* @__PURE__ */ d("$ZodDefault", (e, t) => {
|
|
3439
3459
|
z.init(e, t), e._zod.optin = "optional", v(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
|
|
3440
3460
|
if (r.direction === "backward")
|
|
3441
3461
|
return t.innerType._zod.run(n, r);
|
|
3442
3462
|
if (n.value === void 0)
|
|
3443
3463
|
return n.value = t.defaultValue, n;
|
|
3444
3464
|
const o = t.innerType._zod.run(n, r);
|
|
3445
|
-
return o instanceof Promise ? o.then((i) =>
|
|
3465
|
+
return o instanceof Promise ? o.then((i) => Ve(i, t)) : Ve(o, t);
|
|
3446
3466
|
};
|
|
3447
3467
|
});
|
|
3448
|
-
function
|
|
3468
|
+
function Ve(e, t) {
|
|
3449
3469
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
3450
3470
|
}
|
|
3451
|
-
const
|
|
3471
|
+
const _i = /* @__PURE__ */ d("$ZodPrefault", (e, t) => {
|
|
3452
3472
|
z.init(e, t), e._zod.optin = "optional", v(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
|
|
3453
|
-
}),
|
|
3473
|
+
}), yi = /* @__PURE__ */ d("$ZodNonOptional", (e, t) => {
|
|
3454
3474
|
z.init(e, t), v(e._zod, "values", () => {
|
|
3455
3475
|
const n = t.innerType._zod.values;
|
|
3456
3476
|
return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
|
|
3457
3477
|
}), e._zod.parse = (n, r) => {
|
|
3458
3478
|
const o = t.innerType._zod.run(n, r);
|
|
3459
|
-
return o instanceof Promise ? o.then((i) =>
|
|
3479
|
+
return o instanceof Promise ? o.then((i) => We(i, e)) : We(o, e);
|
|
3460
3480
|
};
|
|
3461
3481
|
});
|
|
3462
|
-
function
|
|
3482
|
+
function We(e, t) {
|
|
3463
3483
|
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
3464
3484
|
code: "invalid_type",
|
|
3465
3485
|
expected: "nonoptional",
|
|
@@ -3467,7 +3487,7 @@ function Ve(e, t) {
|
|
|
3467
3487
|
inst: t
|
|
3468
3488
|
}), e;
|
|
3469
3489
|
}
|
|
3470
|
-
const
|
|
3490
|
+
const vi = /* @__PURE__ */ d("$ZodCatch", (e, t) => {
|
|
3471
3491
|
z.init(e, t), v(e._zod, "optin", () => t.innerType._zod.optin), v(e._zod, "optout", () => t.innerType._zod.optout), v(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
|
|
3472
3492
|
if (r.direction === "backward")
|
|
3473
3493
|
return t.innerType._zod.run(n, r);
|
|
@@ -3486,7 +3506,7 @@ const gi = /* @__PURE__ */ d("$ZodCatch", (e, t) => {
|
|
|
3486
3506
|
input: n.value
|
|
3487
3507
|
}), n.issues = []), n);
|
|
3488
3508
|
};
|
|
3489
|
-
}),
|
|
3509
|
+
}), wi = /* @__PURE__ */ d("$ZodPipe", (e, t) => {
|
|
3490
3510
|
z.init(e, t), v(e._zod, "values", () => t.in._zod.values), v(e._zod, "optin", () => t.in._zod.optin), v(e._zod, "optout", () => t.out._zod.optout), v(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
|
|
3491
3511
|
if (r.direction === "backward") {
|
|
3492
3512
|
const i = t.out._zod.run(n, r);
|
|
@@ -3499,26 +3519,26 @@ const gi = /* @__PURE__ */ d("$ZodCatch", (e, t) => {
|
|
|
3499
3519
|
function oe(e, t, n) {
|
|
3500
3520
|
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
|
|
3501
3521
|
}
|
|
3502
|
-
const
|
|
3522
|
+
const bi = /* @__PURE__ */ d("$ZodReadonly", (e, t) => {
|
|
3503
3523
|
z.init(e, t), v(e._zod, "propValues", () => t.innerType._zod.propValues), v(e._zod, "values", () => t.innerType._zod.values), v(e._zod, "optin", () => t.innerType?._zod?.optin), v(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
|
|
3504
3524
|
if (r.direction === "backward")
|
|
3505
3525
|
return t.innerType._zod.run(n, r);
|
|
3506
3526
|
const o = t.innerType._zod.run(n, r);
|
|
3507
|
-
return o instanceof Promise ? o.then(
|
|
3527
|
+
return o instanceof Promise ? o.then(Ge) : Ge(o);
|
|
3508
3528
|
};
|
|
3509
3529
|
});
|
|
3510
|
-
function
|
|
3530
|
+
function Ge(e) {
|
|
3511
3531
|
return e.value = Object.freeze(e.value), e;
|
|
3512
3532
|
}
|
|
3513
|
-
const
|
|
3533
|
+
const ki = /* @__PURE__ */ d("$ZodCustom", (e, t) => {
|
|
3514
3534
|
A.init(e, t), z.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
|
|
3515
3535
|
const r = n.value, o = t.fn(r);
|
|
3516
3536
|
if (o instanceof Promise)
|
|
3517
|
-
return o.then((i) =>
|
|
3518
|
-
|
|
3537
|
+
return o.then((i) => Be(i, n, r, e));
|
|
3538
|
+
Be(o, n, r, e);
|
|
3519
3539
|
};
|
|
3520
3540
|
});
|
|
3521
|
-
function
|
|
3541
|
+
function Be(e, t, n, r) {
|
|
3522
3542
|
if (!e) {
|
|
3523
3543
|
const o = {
|
|
3524
3544
|
code: "custom",
|
|
@@ -3533,8 +3553,8 @@ function Ge(e, t, n, r) {
|
|
|
3533
3553
|
r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(ne(o));
|
|
3534
3554
|
}
|
|
3535
3555
|
}
|
|
3536
|
-
var
|
|
3537
|
-
class
|
|
3556
|
+
var Ke;
|
|
3557
|
+
class zi {
|
|
3538
3558
|
constructor() {
|
|
3539
3559
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
3540
3560
|
}
|
|
@@ -3563,20 +3583,20 @@ class yi {
|
|
|
3563
3583
|
return this._map.has(t);
|
|
3564
3584
|
}
|
|
3565
3585
|
}
|
|
3566
|
-
function
|
|
3567
|
-
return new
|
|
3586
|
+
function Si() {
|
|
3587
|
+
return new zi();
|
|
3568
3588
|
}
|
|
3569
|
-
(
|
|
3589
|
+
(Ke = globalThis).__zod_globalRegistry ?? (Ke.__zod_globalRegistry = Si());
|
|
3570
3590
|
const ee = globalThis.__zod_globalRegistry;
|
|
3571
3591
|
// @__NO_SIDE_EFFECTS__
|
|
3572
|
-
function
|
|
3592
|
+
function $i(e, t) {
|
|
3573
3593
|
return new e({
|
|
3574
3594
|
type: "string",
|
|
3575
3595
|
...h(t)
|
|
3576
3596
|
});
|
|
3577
3597
|
}
|
|
3578
3598
|
// @__NO_SIDE_EFFECTS__
|
|
3579
|
-
function
|
|
3599
|
+
function Ei(e, t) {
|
|
3580
3600
|
return new e({
|
|
3581
3601
|
type: "string",
|
|
3582
3602
|
format: "email",
|
|
@@ -3596,7 +3616,7 @@ function He(e, t) {
|
|
|
3596
3616
|
});
|
|
3597
3617
|
}
|
|
3598
3618
|
// @__NO_SIDE_EFFECTS__
|
|
3599
|
-
function
|
|
3619
|
+
function Ti(e, t) {
|
|
3600
3620
|
return new e({
|
|
3601
3621
|
type: "string",
|
|
3602
3622
|
format: "uuid",
|
|
@@ -3606,7 +3626,7 @@ function ki(e, t) {
|
|
|
3606
3626
|
});
|
|
3607
3627
|
}
|
|
3608
3628
|
// @__NO_SIDE_EFFECTS__
|
|
3609
|
-
function
|
|
3629
|
+
function Zi(e, t) {
|
|
3610
3630
|
return new e({
|
|
3611
3631
|
type: "string",
|
|
3612
3632
|
format: "uuid",
|
|
@@ -3617,7 +3637,7 @@ function zi(e, t) {
|
|
|
3617
3637
|
});
|
|
3618
3638
|
}
|
|
3619
3639
|
// @__NO_SIDE_EFFECTS__
|
|
3620
|
-
function
|
|
3640
|
+
function Oi(e, t) {
|
|
3621
3641
|
return new e({
|
|
3622
3642
|
type: "string",
|
|
3623
3643
|
format: "uuid",
|
|
@@ -3628,7 +3648,7 @@ function Si(e, t) {
|
|
|
3628
3648
|
});
|
|
3629
3649
|
}
|
|
3630
3650
|
// @__NO_SIDE_EFFECTS__
|
|
3631
|
-
function
|
|
3651
|
+
function Ii(e, t) {
|
|
3632
3652
|
return new e({
|
|
3633
3653
|
type: "string",
|
|
3634
3654
|
format: "uuid",
|
|
@@ -3639,7 +3659,7 @@ function $i(e, t) {
|
|
|
3639
3659
|
});
|
|
3640
3660
|
}
|
|
3641
3661
|
// @__NO_SIDE_EFFECTS__
|
|
3642
|
-
function
|
|
3662
|
+
function Ai(e, t) {
|
|
3643
3663
|
return new e({
|
|
3644
3664
|
type: "string",
|
|
3645
3665
|
format: "url",
|
|
@@ -3649,7 +3669,7 @@ function Ei(e, t) {
|
|
|
3649
3669
|
});
|
|
3650
3670
|
}
|
|
3651
3671
|
// @__NO_SIDE_EFFECTS__
|
|
3652
|
-
function
|
|
3672
|
+
function Pi(e, t) {
|
|
3653
3673
|
return new e({
|
|
3654
3674
|
type: "string",
|
|
3655
3675
|
format: "emoji",
|
|
@@ -3659,7 +3679,7 @@ function Ti(e, t) {
|
|
|
3659
3679
|
});
|
|
3660
3680
|
}
|
|
3661
3681
|
// @__NO_SIDE_EFFECTS__
|
|
3662
|
-
function
|
|
3682
|
+
function Ni(e, t) {
|
|
3663
3683
|
return new e({
|
|
3664
3684
|
type: "string",
|
|
3665
3685
|
format: "nanoid",
|
|
@@ -3669,7 +3689,7 @@ function Zi(e, t) {
|
|
|
3669
3689
|
});
|
|
3670
3690
|
}
|
|
3671
3691
|
// @__NO_SIDE_EFFECTS__
|
|
3672
|
-
function
|
|
3692
|
+
function Ci(e, t) {
|
|
3673
3693
|
return new e({
|
|
3674
3694
|
type: "string",
|
|
3675
3695
|
format: "cuid",
|
|
@@ -3679,7 +3699,7 @@ function Oi(e, t) {
|
|
|
3679
3699
|
});
|
|
3680
3700
|
}
|
|
3681
3701
|
// @__NO_SIDE_EFFECTS__
|
|
3682
|
-
function
|
|
3702
|
+
function Ri(e, t) {
|
|
3683
3703
|
return new e({
|
|
3684
3704
|
type: "string",
|
|
3685
3705
|
format: "cuid2",
|
|
@@ -3689,7 +3709,7 @@ function Ii(e, t) {
|
|
|
3689
3709
|
});
|
|
3690
3710
|
}
|
|
3691
3711
|
// @__NO_SIDE_EFFECTS__
|
|
3692
|
-
function
|
|
3712
|
+
function ji(e, t) {
|
|
3693
3713
|
return new e({
|
|
3694
3714
|
type: "string",
|
|
3695
3715
|
format: "ulid",
|
|
@@ -3699,7 +3719,7 @@ function Ai(e, t) {
|
|
|
3699
3719
|
});
|
|
3700
3720
|
}
|
|
3701
3721
|
// @__NO_SIDE_EFFECTS__
|
|
3702
|
-
function
|
|
3722
|
+
function Di(e, t) {
|
|
3703
3723
|
return new e({
|
|
3704
3724
|
type: "string",
|
|
3705
3725
|
format: "xid",
|
|
@@ -3709,7 +3729,7 @@ function Pi(e, t) {
|
|
|
3709
3729
|
});
|
|
3710
3730
|
}
|
|
3711
3731
|
// @__NO_SIDE_EFFECTS__
|
|
3712
|
-
function
|
|
3732
|
+
function Li(e, t) {
|
|
3713
3733
|
return new e({
|
|
3714
3734
|
type: "string",
|
|
3715
3735
|
format: "ksuid",
|
|
@@ -3719,7 +3739,7 @@ function Ni(e, t) {
|
|
|
3719
3739
|
});
|
|
3720
3740
|
}
|
|
3721
3741
|
// @__NO_SIDE_EFFECTS__
|
|
3722
|
-
function
|
|
3742
|
+
function Ui(e, t) {
|
|
3723
3743
|
return new e({
|
|
3724
3744
|
type: "string",
|
|
3725
3745
|
format: "ipv4",
|
|
@@ -3729,7 +3749,7 @@ function Ci(e, t) {
|
|
|
3729
3749
|
});
|
|
3730
3750
|
}
|
|
3731
3751
|
// @__NO_SIDE_EFFECTS__
|
|
3732
|
-
function
|
|
3752
|
+
function Mi(e, t) {
|
|
3733
3753
|
return new e({
|
|
3734
3754
|
type: "string",
|
|
3735
3755
|
format: "ipv6",
|
|
@@ -3739,7 +3759,7 @@ function Ri(e, t) {
|
|
|
3739
3759
|
});
|
|
3740
3760
|
}
|
|
3741
3761
|
// @__NO_SIDE_EFFECTS__
|
|
3742
|
-
function
|
|
3762
|
+
function xi(e, t) {
|
|
3743
3763
|
return new e({
|
|
3744
3764
|
type: "string",
|
|
3745
3765
|
format: "cidrv4",
|
|
@@ -3749,7 +3769,7 @@ function Di(e, t) {
|
|
|
3749
3769
|
});
|
|
3750
3770
|
}
|
|
3751
3771
|
// @__NO_SIDE_EFFECTS__
|
|
3752
|
-
function
|
|
3772
|
+
function Fi(e, t) {
|
|
3753
3773
|
return new e({
|
|
3754
3774
|
type: "string",
|
|
3755
3775
|
format: "cidrv6",
|
|
@@ -3759,7 +3779,7 @@ function ji(e, t) {
|
|
|
3759
3779
|
});
|
|
3760
3780
|
}
|
|
3761
3781
|
// @__NO_SIDE_EFFECTS__
|
|
3762
|
-
function
|
|
3782
|
+
function Ji(e, t) {
|
|
3763
3783
|
return new e({
|
|
3764
3784
|
type: "string",
|
|
3765
3785
|
format: "base64",
|
|
@@ -3769,7 +3789,7 @@ function Li(e, t) {
|
|
|
3769
3789
|
});
|
|
3770
3790
|
}
|
|
3771
3791
|
// @__NO_SIDE_EFFECTS__
|
|
3772
|
-
function
|
|
3792
|
+
function qi(e, t) {
|
|
3773
3793
|
return new e({
|
|
3774
3794
|
type: "string",
|
|
3775
3795
|
format: "base64url",
|
|
@@ -3779,7 +3799,7 @@ function Ui(e, t) {
|
|
|
3779
3799
|
});
|
|
3780
3800
|
}
|
|
3781
3801
|
// @__NO_SIDE_EFFECTS__
|
|
3782
|
-
function
|
|
3802
|
+
function Vi(e, t) {
|
|
3783
3803
|
return new e({
|
|
3784
3804
|
type: "string",
|
|
3785
3805
|
format: "e164",
|
|
@@ -3789,7 +3809,7 @@ function Mi(e, t) {
|
|
|
3789
3809
|
});
|
|
3790
3810
|
}
|
|
3791
3811
|
// @__NO_SIDE_EFFECTS__
|
|
3792
|
-
function
|
|
3812
|
+
function Wi(e, t) {
|
|
3793
3813
|
return new e({
|
|
3794
3814
|
type: "string",
|
|
3795
3815
|
format: "jwt",
|
|
@@ -3799,7 +3819,7 @@ function xi(e, t) {
|
|
|
3799
3819
|
});
|
|
3800
3820
|
}
|
|
3801
3821
|
// @__NO_SIDE_EFFECTS__
|
|
3802
|
-
function
|
|
3822
|
+
function Gi(e, t) {
|
|
3803
3823
|
return new e({
|
|
3804
3824
|
type: "string",
|
|
3805
3825
|
format: "datetime",
|
|
@@ -3811,7 +3831,7 @@ function Fi(e, t) {
|
|
|
3811
3831
|
});
|
|
3812
3832
|
}
|
|
3813
3833
|
// @__NO_SIDE_EFFECTS__
|
|
3814
|
-
function
|
|
3834
|
+
function Bi(e, t) {
|
|
3815
3835
|
return new e({
|
|
3816
3836
|
type: "string",
|
|
3817
3837
|
format: "date",
|
|
@@ -3820,7 +3840,7 @@ function Ji(e, t) {
|
|
|
3820
3840
|
});
|
|
3821
3841
|
}
|
|
3822
3842
|
// @__NO_SIDE_EFFECTS__
|
|
3823
|
-
function
|
|
3843
|
+
function Ki(e, t) {
|
|
3824
3844
|
return new e({
|
|
3825
3845
|
type: "string",
|
|
3826
3846
|
format: "time",
|
|
@@ -3830,7 +3850,7 @@ function qi(e, t) {
|
|
|
3830
3850
|
});
|
|
3831
3851
|
}
|
|
3832
3852
|
// @__NO_SIDE_EFFECTS__
|
|
3833
|
-
function
|
|
3853
|
+
function Hi(e, t) {
|
|
3834
3854
|
return new e({
|
|
3835
3855
|
type: "string",
|
|
3836
3856
|
format: "duration",
|
|
@@ -3839,7 +3859,7 @@ function Vi(e, t) {
|
|
|
3839
3859
|
});
|
|
3840
3860
|
}
|
|
3841
3861
|
// @__NO_SIDE_EFFECTS__
|
|
3842
|
-
function
|
|
3862
|
+
function Yi(e, t) {
|
|
3843
3863
|
return new e({
|
|
3844
3864
|
type: "number",
|
|
3845
3865
|
checks: [],
|
|
@@ -3847,7 +3867,7 @@ function Wi(e, t) {
|
|
|
3847
3867
|
});
|
|
3848
3868
|
}
|
|
3849
3869
|
// @__NO_SIDE_EFFECTS__
|
|
3850
|
-
function
|
|
3870
|
+
function Xi(e, t) {
|
|
3851
3871
|
return new e({
|
|
3852
3872
|
type: "number",
|
|
3853
3873
|
check: "number_format",
|
|
@@ -3857,28 +3877,28 @@ function Gi(e, t) {
|
|
|
3857
3877
|
});
|
|
3858
3878
|
}
|
|
3859
3879
|
// @__NO_SIDE_EFFECTS__
|
|
3860
|
-
function
|
|
3880
|
+
function Qi(e, t) {
|
|
3861
3881
|
return new e({
|
|
3862
3882
|
type: "boolean",
|
|
3863
3883
|
...h(t)
|
|
3864
3884
|
});
|
|
3865
3885
|
}
|
|
3866
3886
|
// @__NO_SIDE_EFFECTS__
|
|
3867
|
-
function
|
|
3887
|
+
function es(e) {
|
|
3868
3888
|
return new e({
|
|
3869
3889
|
type: "unknown"
|
|
3870
3890
|
});
|
|
3871
3891
|
}
|
|
3872
3892
|
// @__NO_SIDE_EFFECTS__
|
|
3873
|
-
function
|
|
3893
|
+
function ts(e, t) {
|
|
3874
3894
|
return new e({
|
|
3875
3895
|
type: "never",
|
|
3876
3896
|
...h(t)
|
|
3877
3897
|
});
|
|
3878
3898
|
}
|
|
3879
3899
|
// @__NO_SIDE_EFFECTS__
|
|
3880
|
-
function
|
|
3881
|
-
return new
|
|
3900
|
+
function Ye(e, t) {
|
|
3901
|
+
return new Et({
|
|
3882
3902
|
check: "less_than",
|
|
3883
3903
|
...h(t),
|
|
3884
3904
|
value: e,
|
|
@@ -3886,8 +3906,8 @@ function Ke(e, t) {
|
|
|
3886
3906
|
});
|
|
3887
3907
|
}
|
|
3888
3908
|
// @__NO_SIDE_EFFECTS__
|
|
3889
|
-
function
|
|
3890
|
-
return new
|
|
3909
|
+
function ge(e, t) {
|
|
3910
|
+
return new Et({
|
|
3891
3911
|
check: "less_than",
|
|
3892
3912
|
...h(t),
|
|
3893
3913
|
value: e,
|
|
@@ -3895,8 +3915,8 @@ function pe(e, t) {
|
|
|
3895
3915
|
});
|
|
3896
3916
|
}
|
|
3897
3917
|
// @__NO_SIDE_EFFECTS__
|
|
3898
|
-
function
|
|
3899
|
-
return new
|
|
3918
|
+
function Xe(e, t) {
|
|
3919
|
+
return new Tt({
|
|
3900
3920
|
check: "greater_than",
|
|
3901
3921
|
...h(t),
|
|
3902
3922
|
value: e,
|
|
@@ -3904,8 +3924,8 @@ function Ye(e, t) {
|
|
|
3904
3924
|
});
|
|
3905
3925
|
}
|
|
3906
3926
|
// @__NO_SIDE_EFFECTS__
|
|
3907
|
-
function
|
|
3908
|
-
return new
|
|
3927
|
+
function he(e, t) {
|
|
3928
|
+
return new Tt({
|
|
3909
3929
|
check: "greater_than",
|
|
3910
3930
|
...h(t),
|
|
3911
3931
|
value: e,
|
|
@@ -3914,15 +3934,15 @@ function ge(e, t) {
|
|
|
3914
3934
|
}
|
|
3915
3935
|
// @__NO_SIDE_EFFECTS__
|
|
3916
3936
|
function Qe(e, t) {
|
|
3917
|
-
return new
|
|
3937
|
+
return new mo({
|
|
3918
3938
|
check: "multiple_of",
|
|
3919
3939
|
...h(t),
|
|
3920
3940
|
value: e
|
|
3921
3941
|
});
|
|
3922
3942
|
}
|
|
3923
3943
|
// @__NO_SIDE_EFFECTS__
|
|
3924
|
-
function
|
|
3925
|
-
return new
|
|
3944
|
+
function Nt(e, t) {
|
|
3945
|
+
return new yo({
|
|
3926
3946
|
check: "max_length",
|
|
3927
3947
|
...h(t),
|
|
3928
3948
|
maximum: e
|
|
@@ -3930,23 +3950,23 @@ function Pt(e, t) {
|
|
|
3930
3950
|
}
|
|
3931
3951
|
// @__NO_SIDE_EFFECTS__
|
|
3932
3952
|
function ce(e, t) {
|
|
3933
|
-
return new
|
|
3953
|
+
return new vo({
|
|
3934
3954
|
check: "min_length",
|
|
3935
3955
|
...h(t),
|
|
3936
3956
|
minimum: e
|
|
3937
3957
|
});
|
|
3938
3958
|
}
|
|
3939
3959
|
// @__NO_SIDE_EFFECTS__
|
|
3940
|
-
function
|
|
3941
|
-
return new
|
|
3960
|
+
function Ct(e, t) {
|
|
3961
|
+
return new wo({
|
|
3942
3962
|
check: "length_equals",
|
|
3943
3963
|
...h(t),
|
|
3944
3964
|
length: e
|
|
3945
3965
|
});
|
|
3946
3966
|
}
|
|
3947
3967
|
// @__NO_SIDE_EFFECTS__
|
|
3948
|
-
function
|
|
3949
|
-
return new
|
|
3968
|
+
function ns(e, t) {
|
|
3969
|
+
return new bo({
|
|
3950
3970
|
check: "string_format",
|
|
3951
3971
|
format: "regex",
|
|
3952
3972
|
...h(t),
|
|
@@ -3954,24 +3974,24 @@ function Yi(e, t) {
|
|
|
3954
3974
|
});
|
|
3955
3975
|
}
|
|
3956
3976
|
// @__NO_SIDE_EFFECTS__
|
|
3957
|
-
function
|
|
3958
|
-
return new
|
|
3977
|
+
function rs(e) {
|
|
3978
|
+
return new ko({
|
|
3959
3979
|
check: "string_format",
|
|
3960
3980
|
format: "lowercase",
|
|
3961
3981
|
...h(e)
|
|
3962
3982
|
});
|
|
3963
3983
|
}
|
|
3964
3984
|
// @__NO_SIDE_EFFECTS__
|
|
3965
|
-
function
|
|
3966
|
-
return new
|
|
3985
|
+
function os(e) {
|
|
3986
|
+
return new zo({
|
|
3967
3987
|
check: "string_format",
|
|
3968
3988
|
format: "uppercase",
|
|
3969
3989
|
...h(e)
|
|
3970
3990
|
});
|
|
3971
3991
|
}
|
|
3972
3992
|
// @__NO_SIDE_EFFECTS__
|
|
3973
|
-
function
|
|
3974
|
-
return new
|
|
3993
|
+
function is(e, t) {
|
|
3994
|
+
return new So({
|
|
3975
3995
|
check: "string_format",
|
|
3976
3996
|
format: "includes",
|
|
3977
3997
|
...h(t),
|
|
@@ -3979,8 +3999,8 @@ function es(e, t) {
|
|
|
3979
3999
|
});
|
|
3980
4000
|
}
|
|
3981
4001
|
// @__NO_SIDE_EFFECTS__
|
|
3982
|
-
function
|
|
3983
|
-
return new
|
|
4002
|
+
function ss(e, t) {
|
|
4003
|
+
return new $o({
|
|
3984
4004
|
check: "string_format",
|
|
3985
4005
|
format: "starts_with",
|
|
3986
4006
|
...h(t),
|
|
@@ -3988,8 +4008,8 @@ function ts(e, t) {
|
|
|
3988
4008
|
});
|
|
3989
4009
|
}
|
|
3990
4010
|
// @__NO_SIDE_EFFECTS__
|
|
3991
|
-
function
|
|
3992
|
-
return new
|
|
4011
|
+
function as(e, t) {
|
|
4012
|
+
return new Eo({
|
|
3993
4013
|
check: "string_format",
|
|
3994
4014
|
format: "ends_with",
|
|
3995
4015
|
...h(t),
|
|
@@ -3997,34 +4017,34 @@ function ns(e, t) {
|
|
|
3997
4017
|
});
|
|
3998
4018
|
}
|
|
3999
4019
|
// @__NO_SIDE_EFFECTS__
|
|
4000
|
-
function
|
|
4001
|
-
return new
|
|
4020
|
+
function H(e) {
|
|
4021
|
+
return new To({
|
|
4002
4022
|
check: "overwrite",
|
|
4003
4023
|
tx: e
|
|
4004
4024
|
});
|
|
4005
4025
|
}
|
|
4006
4026
|
// @__NO_SIDE_EFFECTS__
|
|
4007
|
-
function
|
|
4008
|
-
return /* @__PURE__ */
|
|
4027
|
+
function cs(e) {
|
|
4028
|
+
return /* @__PURE__ */ H((t) => t.normalize(e));
|
|
4009
4029
|
}
|
|
4010
4030
|
// @__NO_SIDE_EFFECTS__
|
|
4011
|
-
function
|
|
4012
|
-
return /* @__PURE__ */
|
|
4031
|
+
function us() {
|
|
4032
|
+
return /* @__PURE__ */ H((e) => e.trim());
|
|
4013
4033
|
}
|
|
4014
4034
|
// @__NO_SIDE_EFFECTS__
|
|
4015
|
-
function
|
|
4016
|
-
return /* @__PURE__ */
|
|
4035
|
+
function ds() {
|
|
4036
|
+
return /* @__PURE__ */ H((e) => e.toLowerCase());
|
|
4017
4037
|
}
|
|
4018
4038
|
// @__NO_SIDE_EFFECTS__
|
|
4019
|
-
function
|
|
4020
|
-
return /* @__PURE__ */
|
|
4039
|
+
function ls() {
|
|
4040
|
+
return /* @__PURE__ */ H((e) => e.toUpperCase());
|
|
4021
4041
|
}
|
|
4022
4042
|
// @__NO_SIDE_EFFECTS__
|
|
4023
|
-
function
|
|
4024
|
-
return /* @__PURE__ */
|
|
4043
|
+
function fs() {
|
|
4044
|
+
return /* @__PURE__ */ H((e) => wr(e));
|
|
4025
4045
|
}
|
|
4026
4046
|
// @__NO_SIDE_EFFECTS__
|
|
4027
|
-
function
|
|
4047
|
+
function ps(e, t, n) {
|
|
4028
4048
|
return new e({
|
|
4029
4049
|
type: "array",
|
|
4030
4050
|
element: t,
|
|
@@ -4035,7 +4055,7 @@ function cs(e, t, n) {
|
|
|
4035
4055
|
});
|
|
4036
4056
|
}
|
|
4037
4057
|
// @__NO_SIDE_EFFECTS__
|
|
4038
|
-
function
|
|
4058
|
+
function gs(e, t, n) {
|
|
4039
4059
|
return new e({
|
|
4040
4060
|
type: "custom",
|
|
4041
4061
|
check: "custom",
|
|
@@ -4044,8 +4064,8 @@ function us(e, t, n) {
|
|
|
4044
4064
|
});
|
|
4045
4065
|
}
|
|
4046
4066
|
// @__NO_SIDE_EFFECTS__
|
|
4047
|
-
function
|
|
4048
|
-
const t = /* @__PURE__ */
|
|
4067
|
+
function hs(e) {
|
|
4068
|
+
const t = /* @__PURE__ */ ms((n) => (n.addIssue = (r) => {
|
|
4049
4069
|
if (typeof r == "string")
|
|
4050
4070
|
n.issues.push(ne(r, n.value, t._zod.def));
|
|
4051
4071
|
else {
|
|
@@ -4056,14 +4076,14 @@ function ds(e) {
|
|
|
4056
4076
|
return t;
|
|
4057
4077
|
}
|
|
4058
4078
|
// @__NO_SIDE_EFFECTS__
|
|
4059
|
-
function
|
|
4079
|
+
function ms(e, t) {
|
|
4060
4080
|
const n = new A({
|
|
4061
4081
|
check: "custom",
|
|
4062
4082
|
...h(t)
|
|
4063
4083
|
});
|
|
4064
4084
|
return n._zod.check = e, n;
|
|
4065
4085
|
}
|
|
4066
|
-
function
|
|
4086
|
+
function Rt(e) {
|
|
4067
4087
|
let t = e?.target ?? "draft-2020-12";
|
|
4068
4088
|
return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
|
|
4069
4089
|
processors: e.processors ?? {},
|
|
@@ -4108,9 +4128,9 @@ function E(e, t, n = { path: [], schemaPath: [] }) {
|
|
|
4108
4128
|
f && (s.ref || (s.ref = f), E(f, t, l), t.seen.get(f).isParent = !0);
|
|
4109
4129
|
}
|
|
4110
4130
|
const c = t.metadataRegistry.get(e);
|
|
4111
|
-
return c && Object.assign(s.schema, c), t.io === "input" &&
|
|
4131
|
+
return c && Object.assign(s.schema, c), t.io === "input" && O(e) && (delete s.schema.examples, delete s.schema.default), t.io === "input" && s.schema._prefault && ((r = s.schema).default ?? (r.default = s.schema._prefault)), delete s.schema._prefault, t.seen.get(e).schema;
|
|
4112
4132
|
}
|
|
4113
|
-
function
|
|
4133
|
+
function jt(e, t) {
|
|
4114
4134
|
const n = e.seen.get(t);
|
|
4115
4135
|
if (!n)
|
|
4116
4136
|
throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
@@ -4248,7 +4268,7 @@ function Dt(e, t) {
|
|
|
4248
4268
|
throw new Error("Error converting schema to JSON.");
|
|
4249
4269
|
}
|
|
4250
4270
|
}
|
|
4251
|
-
function
|
|
4271
|
+
function O(e, t) {
|
|
4252
4272
|
const n = t ?? { seen: /* @__PURE__ */ new Set() };
|
|
4253
4273
|
if (n.seen.has(e))
|
|
4254
4274
|
return !1;
|
|
@@ -4257,57 +4277,57 @@ function Z(e, t) {
|
|
|
4257
4277
|
if (r.type === "transform")
|
|
4258
4278
|
return !0;
|
|
4259
4279
|
if (r.type === "array")
|
|
4260
|
-
return
|
|
4280
|
+
return O(r.element, n);
|
|
4261
4281
|
if (r.type === "set")
|
|
4262
|
-
return
|
|
4282
|
+
return O(r.valueType, n);
|
|
4263
4283
|
if (r.type === "lazy")
|
|
4264
|
-
return
|
|
4284
|
+
return O(r.getter(), n);
|
|
4265
4285
|
if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault")
|
|
4266
|
-
return
|
|
4286
|
+
return O(r.innerType, n);
|
|
4267
4287
|
if (r.type === "intersection")
|
|
4268
|
-
return
|
|
4288
|
+
return O(r.left, n) || O(r.right, n);
|
|
4269
4289
|
if (r.type === "record" || r.type === "map")
|
|
4270
|
-
return
|
|
4290
|
+
return O(r.keyType, n) || O(r.valueType, n);
|
|
4271
4291
|
if (r.type === "pipe")
|
|
4272
|
-
return
|
|
4292
|
+
return O(r.in, n) || O(r.out, n);
|
|
4273
4293
|
if (r.type === "object") {
|
|
4274
4294
|
for (const o in r.shape)
|
|
4275
|
-
if (
|
|
4295
|
+
if (O(r.shape[o], n))
|
|
4276
4296
|
return !0;
|
|
4277
4297
|
return !1;
|
|
4278
4298
|
}
|
|
4279
4299
|
if (r.type === "union") {
|
|
4280
4300
|
for (const o of r.options)
|
|
4281
|
-
if (
|
|
4301
|
+
if (O(o, n))
|
|
4282
4302
|
return !0;
|
|
4283
4303
|
return !1;
|
|
4284
4304
|
}
|
|
4285
4305
|
if (r.type === "tuple") {
|
|
4286
4306
|
for (const o of r.items)
|
|
4287
|
-
if (
|
|
4307
|
+
if (O(o, n))
|
|
4288
4308
|
return !0;
|
|
4289
|
-
return !!(r.rest &&
|
|
4309
|
+
return !!(r.rest && O(r.rest, n));
|
|
4290
4310
|
}
|
|
4291
4311
|
return !1;
|
|
4292
4312
|
}
|
|
4293
|
-
const
|
|
4294
|
-
const r =
|
|
4295
|
-
return E(e, r),
|
|
4313
|
+
const _s = (e, t = {}) => (n) => {
|
|
4314
|
+
const r = Rt({ ...n, processors: t });
|
|
4315
|
+
return E(e, r), jt(r, e), Dt(r, e);
|
|
4296
4316
|
}, ue = (e, t, n = {}) => (r) => {
|
|
4297
|
-
const { libraryOptions: o, target: i } = r ?? {}, s =
|
|
4298
|
-
return E(e, s),
|
|
4299
|
-
},
|
|
4317
|
+
const { libraryOptions: o, target: i } = r ?? {}, s = Rt({ ...o ?? {}, target: i, io: t, processors: n });
|
|
4318
|
+
return E(e, s), jt(s, e), Dt(s, e);
|
|
4319
|
+
}, ys = {
|
|
4300
4320
|
guid: "uuid",
|
|
4301
4321
|
url: "uri",
|
|
4302
4322
|
datetime: "date-time",
|
|
4303
4323
|
json_string: "json-string",
|
|
4304
4324
|
regex: ""
|
|
4305
4325
|
// do not set
|
|
4306
|
-
},
|
|
4326
|
+
}, vs = (e, t, n, r) => {
|
|
4307
4327
|
const o = n;
|
|
4308
4328
|
o.type = "string";
|
|
4309
4329
|
const { minimum: i, maximum: s, format: a, patterns: c, contentEncoding: u } = e._zod.bag;
|
|
4310
|
-
if (typeof i == "number" && (o.minLength = i), typeof s == "number" && (o.maxLength = s), a && (o.format =
|
|
4330
|
+
if (typeof i == "number" && (o.minLength = i), typeof s == "number" && (o.maxLength = s), a && (o.format = ys[a] ?? a, o.format === "" && delete o.format, a === "time" && delete o.format), u && (o.contentEncoding = u), c && c.size > 0) {
|
|
4311
4331
|
const l = [...c];
|
|
4312
4332
|
l.length === 1 ? o.pattern = l[0].source : l.length > 1 && (o.allOf = [
|
|
4313
4333
|
...l.map((f) => ({
|
|
@@ -4316,18 +4336,18 @@ const fs = (e, t = {}) => (n) => {
|
|
|
4316
4336
|
}))
|
|
4317
4337
|
]);
|
|
4318
4338
|
}
|
|
4319
|
-
},
|
|
4339
|
+
}, ws = (e, t, n, r) => {
|
|
4320
4340
|
const o = n, { minimum: i, maximum: s, format: a, multipleOf: c, exclusiveMaximum: u, exclusiveMinimum: l } = e._zod.bag;
|
|
4321
4341
|
typeof a == "string" && a.includes("int") ? o.type = "integer" : o.type = "number", typeof l == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.minimum = l, o.exclusiveMinimum = !0) : o.exclusiveMinimum = l), typeof i == "number" && (o.minimum = i, typeof l == "number" && t.target !== "draft-04" && (l >= i ? delete o.minimum : delete o.exclusiveMinimum)), typeof u == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.maximum = u, o.exclusiveMaximum = !0) : o.exclusiveMaximum = u), typeof s == "number" && (o.maximum = s, typeof u == "number" && t.target !== "draft-04" && (u <= s ? delete o.maximum : delete o.exclusiveMaximum)), typeof c == "number" && (o.multipleOf = c);
|
|
4322
|
-
},
|
|
4342
|
+
}, bs = (e, t, n, r) => {
|
|
4323
4343
|
n.type = "boolean";
|
|
4324
|
-
},
|
|
4344
|
+
}, ks = (e, t, n, r) => {
|
|
4325
4345
|
n.not = {};
|
|
4326
|
-
},
|
|
4327
|
-
},
|
|
4328
|
-
const o = e._zod.def, i =
|
|
4346
|
+
}, zs = (e, t, n, r) => {
|
|
4347
|
+
}, Ss = (e, t, n, r) => {
|
|
4348
|
+
const o = e._zod.def, i = ht(o.entries);
|
|
4329
4349
|
i.every((s) => typeof s == "number") && (n.type = "number"), i.every((s) => typeof s == "string") && (n.type = "string"), n.enum = i;
|
|
4330
|
-
},
|
|
4350
|
+
}, $s = (e, t, n, r) => {
|
|
4331
4351
|
const o = e._zod.def, i = [];
|
|
4332
4352
|
for (const s of o.values)
|
|
4333
4353
|
if (s === void 0) {
|
|
@@ -4344,16 +4364,16 @@ const fs = (e, t = {}) => (n) => {
|
|
|
4344
4364
|
n.type = s === null ? "null" : typeof s, t.target === "draft-04" || t.target === "openapi-3.0" ? n.enum = [s] : n.const = s;
|
|
4345
4365
|
} else
|
|
4346
4366
|
i.every((s) => typeof s == "number") && (n.type = "number"), i.every((s) => typeof s == "string") && (n.type = "string"), i.every((s) => typeof s == "boolean") && (n.type = "boolean"), i.every((s) => s === null) && (n.type = "null"), n.enum = i;
|
|
4347
|
-
},
|
|
4367
|
+
}, Es = (e, t, n, r) => {
|
|
4348
4368
|
if (t.unrepresentable === "throw")
|
|
4349
4369
|
throw new Error("Custom types cannot be represented in JSON Schema");
|
|
4350
|
-
},
|
|
4370
|
+
}, Ts = (e, t, n, r) => {
|
|
4351
4371
|
if (t.unrepresentable === "throw")
|
|
4352
4372
|
throw new Error("Transforms cannot be represented in JSON Schema");
|
|
4353
|
-
},
|
|
4373
|
+
}, Zs = (e, t, n, r) => {
|
|
4354
4374
|
const o = n, i = e._zod.def, { minimum: s, maximum: a } = e._zod.bag;
|
|
4355
4375
|
typeof s == "number" && (o.minItems = s), typeof a == "number" && (o.maxItems = a), o.type = "array", o.items = E(i.element, t, { ...r, path: [...r.path, "items"] });
|
|
4356
|
-
},
|
|
4376
|
+
}, Os = (e, t, n, r) => {
|
|
4357
4377
|
const o = n, i = e._zod.def;
|
|
4358
4378
|
o.type = "object", o.properties = {};
|
|
4359
4379
|
const s = i.shape;
|
|
@@ -4370,13 +4390,13 @@ const fs = (e, t = {}) => (n) => {
|
|
|
4370
4390
|
...r,
|
|
4371
4391
|
path: [...r.path, "additionalProperties"]
|
|
4372
4392
|
})) : t.io === "output" && (o.additionalProperties = !1);
|
|
4373
|
-
},
|
|
4393
|
+
}, Is = (e, t, n, r) => {
|
|
4374
4394
|
const o = e._zod.def, i = o.inclusive === !1, s = o.options.map((a, c) => E(a, t, {
|
|
4375
4395
|
...r,
|
|
4376
4396
|
path: [...r.path, i ? "oneOf" : "anyOf", c]
|
|
4377
4397
|
}));
|
|
4378
4398
|
i ? n.oneOf = s : n.anyOf = s;
|
|
4379
|
-
},
|
|
4399
|
+
}, As = (e, t, n, r) => {
|
|
4380
4400
|
const o = e._zod.def, i = E(o.left, t, {
|
|
4381
4401
|
...r,
|
|
4382
4402
|
path: [...r.path, "allOf", 0]
|
|
@@ -4388,7 +4408,7 @@ const fs = (e, t = {}) => (n) => {
|
|
|
4388
4408
|
...a(s) ? s.allOf : [s]
|
|
4389
4409
|
];
|
|
4390
4410
|
n.allOf = c;
|
|
4391
|
-
},
|
|
4411
|
+
}, Ps = (e, t, n, r) => {
|
|
4392
4412
|
const o = n, i = e._zod.def;
|
|
4393
4413
|
o.type = "object";
|
|
4394
4414
|
const s = i.keyType, c = s._zod.bag?.patterns;
|
|
@@ -4413,25 +4433,25 @@ const fs = (e, t = {}) => (n) => {
|
|
|
4413
4433
|
const l = [...u].filter((f) => typeof f == "string" || typeof f == "number");
|
|
4414
4434
|
l.length > 0 && (o.required = l);
|
|
4415
4435
|
}
|
|
4416
|
-
},
|
|
4436
|
+
}, Ns = (e, t, n, r) => {
|
|
4417
4437
|
const o = e._zod.def, i = E(o.innerType, t, r), s = t.seen.get(e);
|
|
4418
4438
|
t.target === "openapi-3.0" ? (s.ref = o.innerType, n.nullable = !0) : n.anyOf = [i, { type: "null" }];
|
|
4419
|
-
},
|
|
4439
|
+
}, Cs = (e, t, n, r) => {
|
|
4420
4440
|
const o = e._zod.def;
|
|
4421
4441
|
E(o.innerType, t, r);
|
|
4422
4442
|
const i = t.seen.get(e);
|
|
4423
4443
|
i.ref = o.innerType;
|
|
4424
|
-
},
|
|
4444
|
+
}, Rs = (e, t, n, r) => {
|
|
4425
4445
|
const o = e._zod.def;
|
|
4426
4446
|
E(o.innerType, t, r);
|
|
4427
4447
|
const i = t.seen.get(e);
|
|
4428
4448
|
i.ref = o.innerType, n.default = JSON.parse(JSON.stringify(o.defaultValue));
|
|
4429
|
-
},
|
|
4449
|
+
}, js = (e, t, n, r) => {
|
|
4430
4450
|
const o = e._zod.def;
|
|
4431
4451
|
E(o.innerType, t, r);
|
|
4432
4452
|
const i = t.seen.get(e);
|
|
4433
4453
|
i.ref = o.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
|
|
4434
|
-
},
|
|
4454
|
+
}, Ds = (e, t, n, r) => {
|
|
4435
4455
|
const o = e._zod.def;
|
|
4436
4456
|
E(o.innerType, t, r);
|
|
4437
4457
|
const i = t.seen.get(e);
|
|
@@ -4443,64 +4463,64 @@ const fs = (e, t = {}) => (n) => {
|
|
|
4443
4463
|
throw new Error("Dynamic catch values are not supported in JSON Schema");
|
|
4444
4464
|
}
|
|
4445
4465
|
n.default = s;
|
|
4446
|
-
},
|
|
4466
|
+
}, Ls = (e, t, n, r) => {
|
|
4447
4467
|
const o = e._zod.def, i = t.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
|
|
4448
4468
|
E(i, t, r);
|
|
4449
4469
|
const s = t.seen.get(e);
|
|
4450
4470
|
s.ref = i;
|
|
4451
|
-
},
|
|
4471
|
+
}, Us = (e, t, n, r) => {
|
|
4452
4472
|
const o = e._zod.def;
|
|
4453
4473
|
E(o.innerType, t, r);
|
|
4454
4474
|
const i = t.seen.get(e);
|
|
4455
4475
|
i.ref = o.innerType, n.readOnly = !0;
|
|
4456
|
-
},
|
|
4476
|
+
}, Lt = (e, t, n, r) => {
|
|
4457
4477
|
const o = e._zod.def;
|
|
4458
4478
|
E(o.innerType, t, r);
|
|
4459
4479
|
const i = t.seen.get(e);
|
|
4460
4480
|
i.ref = o.innerType;
|
|
4461
|
-
},
|
|
4462
|
-
|
|
4481
|
+
}, Ms = /* @__PURE__ */ d("ZodISODateTime", (e, t) => {
|
|
4482
|
+
xo.init(e, t), $.init(e, t);
|
|
4463
4483
|
});
|
|
4464
|
-
function
|
|
4465
|
-
return /* @__PURE__ */
|
|
4484
|
+
function xs(e) {
|
|
4485
|
+
return /* @__PURE__ */ Gi(Ms, e);
|
|
4466
4486
|
}
|
|
4467
|
-
const
|
|
4468
|
-
|
|
4487
|
+
const Fs = /* @__PURE__ */ d("ZodISODate", (e, t) => {
|
|
4488
|
+
Fo.init(e, t), $.init(e, t);
|
|
4469
4489
|
});
|
|
4470
|
-
function
|
|
4471
|
-
return /* @__PURE__ */
|
|
4490
|
+
function Js(e) {
|
|
4491
|
+
return /* @__PURE__ */ Bi(Fs, e);
|
|
4472
4492
|
}
|
|
4473
|
-
const
|
|
4474
|
-
|
|
4493
|
+
const qs = /* @__PURE__ */ d("ZodISOTime", (e, t) => {
|
|
4494
|
+
Jo.init(e, t), $.init(e, t);
|
|
4475
4495
|
});
|
|
4476
|
-
function
|
|
4477
|
-
return /* @__PURE__ */
|
|
4496
|
+
function Vs(e) {
|
|
4497
|
+
return /* @__PURE__ */ Ki(qs, e);
|
|
4478
4498
|
}
|
|
4479
|
-
const
|
|
4480
|
-
|
|
4499
|
+
const Ws = /* @__PURE__ */ d("ZodISODuration", (e, t) => {
|
|
4500
|
+
qo.init(e, t), $.init(e, t);
|
|
4481
4501
|
});
|
|
4482
|
-
function
|
|
4483
|
-
return /* @__PURE__ */
|
|
4502
|
+
function Gs(e) {
|
|
4503
|
+
return /* @__PURE__ */ Hi(Ws, e);
|
|
4484
4504
|
}
|
|
4485
|
-
const
|
|
4486
|
-
|
|
4505
|
+
const Bs = (e, t) => {
|
|
4506
|
+
vt.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
4487
4507
|
format: {
|
|
4488
|
-
value: (n) =>
|
|
4508
|
+
value: (n) => Nr(e, n)
|
|
4489
4509
|
// enumerable: false,
|
|
4490
4510
|
},
|
|
4491
4511
|
flatten: {
|
|
4492
|
-
value: (n) =>
|
|
4512
|
+
value: (n) => Pr(e, n)
|
|
4493
4513
|
// enumerable: false,
|
|
4494
4514
|
},
|
|
4495
4515
|
addIssue: {
|
|
4496
4516
|
value: (n) => {
|
|
4497
|
-
e.issues.push(n), e.message = JSON.stringify(e.issues,
|
|
4517
|
+
e.issues.push(n), e.message = JSON.stringify(e.issues, ye, 2);
|
|
4498
4518
|
}
|
|
4499
4519
|
// enumerable: false,
|
|
4500
4520
|
},
|
|
4501
4521
|
addIssues: {
|
|
4502
4522
|
value: (n) => {
|
|
4503
|
-
e.issues.push(...n), e.message = JSON.stringify(e.issues,
|
|
4523
|
+
e.issues.push(...n), e.message = JSON.stringify(e.issues, ye, 2);
|
|
4504
4524
|
}
|
|
4505
4525
|
// enumerable: false,
|
|
4506
4526
|
},
|
|
@@ -4511,21 +4531,21 @@ const Js = (e, t) => {
|
|
|
4511
4531
|
// enumerable: false,
|
|
4512
4532
|
}
|
|
4513
4533
|
});
|
|
4514
|
-
}, P = d("ZodError",
|
|
4534
|
+
}, P = d("ZodError", Bs, {
|
|
4515
4535
|
Parent: Error
|
|
4516
|
-
}),
|
|
4536
|
+
}), Ks = /* @__PURE__ */ Te(P), Hs = /* @__PURE__ */ Ze(P), Ys = /* @__PURE__ */ de(P), Xs = /* @__PURE__ */ le(P), Qs = /* @__PURE__ */ jr(P), ea = /* @__PURE__ */ Dr(P), ta = /* @__PURE__ */ Lr(P), na = /* @__PURE__ */ Ur(P), ra = /* @__PURE__ */ Mr(P), oa = /* @__PURE__ */ xr(P), ia = /* @__PURE__ */ Fr(P), sa = /* @__PURE__ */ Jr(P), S = /* @__PURE__ */ d("ZodType", (e, t) => (z.init(e, t), Object.assign(e["~standard"], {
|
|
4517
4537
|
jsonSchema: {
|
|
4518
4538
|
input: ue(e, "input"),
|
|
4519
4539
|
output: ue(e, "output")
|
|
4520
4540
|
}
|
|
4521
|
-
}), e.toJSONSchema =
|
|
4541
|
+
}), e.toJSONSchema = _s(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(x(t, {
|
|
4522
4542
|
checks: [
|
|
4523
4543
|
...t.checks ?? [],
|
|
4524
4544
|
...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
|
|
4525
4545
|
]
|
|
4526
4546
|
}), {
|
|
4527
4547
|
parent: !0
|
|
4528
|
-
}), e.with = e.check, e.clone = (n, r) => F(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) =>
|
|
4548
|
+
}), e.with = e.check, e.clone = (n, r) => F(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => Ks(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Ys(e, n, r), e.parseAsync = async (n, r) => Hs(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => Xs(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => Qs(e, n, r), e.decode = (n, r) => ea(e, n, r), e.encodeAsync = async (n, r) => ta(e, n, r), e.decodeAsync = async (n, r) => na(e, n, r), e.safeEncode = (n, r) => ra(e, n, r), e.safeDecode = (n, r) => oa(e, n, r), e.safeEncodeAsync = async (n, r) => ia(e, n, r), e.safeDecodeAsync = async (n, r) => sa(e, n, r), e.refine = (n, r) => e.check(nc(n, r)), e.superRefine = (n) => e.check(rc(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ H(n)), e.optional = () => rt(e), e.exactOptional = () => Ja(e), e.nullable = () => ot(e), e.nullish = () => rt(ot(e)), e.nonoptional = (n) => Ka(e, n), e.array = () => Aa(e), e.or = (n) => Ca([e, n]), e.and = (n) => ja(e, n), e.transform = (n) => it(e, xa(n)), e.default = (n) => Wa(e, n), e.prefault = (n) => Ba(e, n), e.catch = (n) => Ya(e, n), e.pipe = (n) => it(e, n), e.readonly = () => ec(e), e.describe = (n) => {
|
|
4529
4549
|
const r = e.clone();
|
|
4530
4550
|
return ee.add(r, { description: n }), r;
|
|
4531
4551
|
}, Object.defineProperty(e, "description", {
|
|
@@ -4538,138 +4558,138 @@ const Js = (e, t) => {
|
|
|
4538
4558
|
return ee.get(e);
|
|
4539
4559
|
const r = e.clone();
|
|
4540
4560
|
return ee.add(r, n[0]), r;
|
|
4541
|
-
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)),
|
|
4542
|
-
|
|
4561
|
+
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), Ut = /* @__PURE__ */ d("_ZodString", (e, t) => {
|
|
4562
|
+
Oe.init(e, t), S.init(e, t), e._zod.processJSONSchema = (r, o, i) => vs(e, r, o);
|
|
4543
4563
|
const n = e._zod.bag;
|
|
4544
|
-
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */
|
|
4545
|
-
}),
|
|
4546
|
-
|
|
4564
|
+
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ ns(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ is(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ ss(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ as(...r)), e.min = (...r) => e.check(/* @__PURE__ */ ce(...r)), e.max = (...r) => e.check(/* @__PURE__ */ Nt(...r)), e.length = (...r) => e.check(/* @__PURE__ */ Ct(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ ce(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ rs(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ os(r)), e.trim = () => e.check(/* @__PURE__ */ us()), e.normalize = (...r) => e.check(/* @__PURE__ */ cs(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ ds()), e.toUpperCase = () => e.check(/* @__PURE__ */ ls()), e.slugify = () => e.check(/* @__PURE__ */ fs());
|
|
4565
|
+
}), aa = /* @__PURE__ */ d("ZodString", (e, t) => {
|
|
4566
|
+
Oe.init(e, t), Ut.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ Ei(ca, n)), e.url = (n) => e.check(/* @__PURE__ */ Ai(ua, n)), e.jwt = (n) => e.check(/* @__PURE__ */ Wi(Sa, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Pi(da, n)), e.guid = (n) => e.check(/* @__PURE__ */ He(et, n)), e.uuid = (n) => e.check(/* @__PURE__ */ Ti(ie, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ Zi(ie, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ Oi(ie, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ Ii(ie, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Ni(la, n)), e.guid = (n) => e.check(/* @__PURE__ */ He(et, n)), e.cuid = (n) => e.check(/* @__PURE__ */ Ci(fa, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ Ri(pa, n)), e.ulid = (n) => e.check(/* @__PURE__ */ ji(ga, n)), e.base64 = (n) => e.check(/* @__PURE__ */ Ji(ba, n)), e.base64url = (n) => e.check(/* @__PURE__ */ qi(ka, n)), e.xid = (n) => e.check(/* @__PURE__ */ Di(ha, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ Li(ma, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ Ui(_a, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ Mi(ya, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ xi(va, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ Fi(wa, n)), e.e164 = (n) => e.check(/* @__PURE__ */ Vi(za, n)), e.datetime = (n) => e.check(xs(n)), e.date = (n) => e.check(Js(n)), e.time = (n) => e.check(Vs(n)), e.duration = (n) => e.check(Gs(n));
|
|
4547
4567
|
});
|
|
4548
|
-
function
|
|
4549
|
-
return /* @__PURE__ */
|
|
4568
|
+
function qc(e) {
|
|
4569
|
+
return /* @__PURE__ */ $i(aa, e);
|
|
4550
4570
|
}
|
|
4551
4571
|
const $ = /* @__PURE__ */ d("ZodStringFormat", (e, t) => {
|
|
4552
|
-
|
|
4553
|
-
}),
|
|
4554
|
-
|
|
4555
|
-
}),
|
|
4556
|
-
$o.init(e, t), $.init(e, t);
|
|
4557
|
-
}), ie = /* @__PURE__ */ d("ZodUUID", (e, t) => {
|
|
4558
|
-
Eo.init(e, t), $.init(e, t);
|
|
4559
|
-
}), oa = /* @__PURE__ */ d("ZodURL", (e, t) => {
|
|
4560
|
-
Zo.init(e, t), $.init(e, t);
|
|
4561
|
-
}), ia = /* @__PURE__ */ d("ZodEmoji", (e, t) => {
|
|
4562
|
-
Oo.init(e, t), $.init(e, t);
|
|
4563
|
-
}), sa = /* @__PURE__ */ d("ZodNanoID", (e, t) => {
|
|
4572
|
+
k.init(e, t), Ut.init(e, t);
|
|
4573
|
+
}), ca = /* @__PURE__ */ d("ZodEmail", (e, t) => {
|
|
4574
|
+
Po.init(e, t), $.init(e, t);
|
|
4575
|
+
}), et = /* @__PURE__ */ d("ZodGUID", (e, t) => {
|
|
4564
4576
|
Io.init(e, t), $.init(e, t);
|
|
4565
|
-
}),
|
|
4577
|
+
}), ie = /* @__PURE__ */ d("ZodUUID", (e, t) => {
|
|
4566
4578
|
Ao.init(e, t), $.init(e, t);
|
|
4567
|
-
}),
|
|
4568
|
-
Po.init(e, t), $.init(e, t);
|
|
4569
|
-
}), ua = /* @__PURE__ */ d("ZodULID", (e, t) => {
|
|
4579
|
+
}), ua = /* @__PURE__ */ d("ZodURL", (e, t) => {
|
|
4570
4580
|
No.init(e, t), $.init(e, t);
|
|
4571
|
-
}), da = /* @__PURE__ */ d("
|
|
4581
|
+
}), da = /* @__PURE__ */ d("ZodEmoji", (e, t) => {
|
|
4572
4582
|
Co.init(e, t), $.init(e, t);
|
|
4573
|
-
}), la = /* @__PURE__ */ d("
|
|
4583
|
+
}), la = /* @__PURE__ */ d("ZodNanoID", (e, t) => {
|
|
4574
4584
|
Ro.init(e, t), $.init(e, t);
|
|
4575
|
-
}), fa = /* @__PURE__ */ d("
|
|
4585
|
+
}), fa = /* @__PURE__ */ d("ZodCUID", (e, t) => {
|
|
4586
|
+
jo.init(e, t), $.init(e, t);
|
|
4587
|
+
}), pa = /* @__PURE__ */ d("ZodCUID2", (e, t) => {
|
|
4588
|
+
Do.init(e, t), $.init(e, t);
|
|
4589
|
+
}), ga = /* @__PURE__ */ d("ZodULID", (e, t) => {
|
|
4590
|
+
Lo.init(e, t), $.init(e, t);
|
|
4591
|
+
}), ha = /* @__PURE__ */ d("ZodXID", (e, t) => {
|
|
4592
|
+
Uo.init(e, t), $.init(e, t);
|
|
4593
|
+
}), ma = /* @__PURE__ */ d("ZodKSUID", (e, t) => {
|
|
4576
4594
|
Mo.init(e, t), $.init(e, t);
|
|
4577
|
-
}),
|
|
4578
|
-
|
|
4579
|
-
}),
|
|
4580
|
-
Fo.init(e, t), $.init(e, t);
|
|
4581
|
-
}), ha = /* @__PURE__ */ d("ZodCIDRv6", (e, t) => {
|
|
4582
|
-
Jo.init(e, t), $.init(e, t);
|
|
4583
|
-
}), ma = /* @__PURE__ */ d("ZodBase64", (e, t) => {
|
|
4584
|
-
qo.init(e, t), $.init(e, t);
|
|
4585
|
-
}), _a = /* @__PURE__ */ d("ZodBase64URL", (e, t) => {
|
|
4595
|
+
}), _a = /* @__PURE__ */ d("ZodIPv4", (e, t) => {
|
|
4596
|
+
Vo.init(e, t), $.init(e, t);
|
|
4597
|
+
}), ya = /* @__PURE__ */ d("ZodIPv6", (e, t) => {
|
|
4586
4598
|
Wo.init(e, t), $.init(e, t);
|
|
4587
|
-
}),
|
|
4599
|
+
}), va = /* @__PURE__ */ d("ZodCIDRv4", (e, t) => {
|
|
4588
4600
|
Go.init(e, t), $.init(e, t);
|
|
4589
|
-
}),
|
|
4590
|
-
|
|
4591
|
-
}),
|
|
4592
|
-
|
|
4601
|
+
}), wa = /* @__PURE__ */ d("ZodCIDRv6", (e, t) => {
|
|
4602
|
+
Bo.init(e, t), $.init(e, t);
|
|
4603
|
+
}), ba = /* @__PURE__ */ d("ZodBase64", (e, t) => {
|
|
4604
|
+
Ko.init(e, t), $.init(e, t);
|
|
4605
|
+
}), ka = /* @__PURE__ */ d("ZodBase64URL", (e, t) => {
|
|
4606
|
+
Yo.init(e, t), $.init(e, t);
|
|
4607
|
+
}), za = /* @__PURE__ */ d("ZodE164", (e, t) => {
|
|
4608
|
+
Xo.init(e, t), $.init(e, t);
|
|
4609
|
+
}), Sa = /* @__PURE__ */ d("ZodJWT", (e, t) => {
|
|
4610
|
+
ei.init(e, t), $.init(e, t);
|
|
4611
|
+
}), Mt = /* @__PURE__ */ d("ZodNumber", (e, t) => {
|
|
4612
|
+
Ot.init(e, t), S.init(e, t), e._zod.processJSONSchema = (r, o, i) => ws(e, r, o), e.gt = (r, o) => e.check(/* @__PURE__ */ Xe(r, o)), e.gte = (r, o) => e.check(/* @__PURE__ */ he(r, o)), e.min = (r, o) => e.check(/* @__PURE__ */ he(r, o)), e.lt = (r, o) => e.check(/* @__PURE__ */ Ye(r, o)), e.lte = (r, o) => e.check(/* @__PURE__ */ ge(r, o)), e.max = (r, o) => e.check(/* @__PURE__ */ ge(r, o)), e.int = (r) => e.check(tt(r)), e.safe = (r) => e.check(tt(r)), e.positive = (r) => e.check(/* @__PURE__ */ Xe(0, r)), e.nonnegative = (r) => e.check(/* @__PURE__ */ he(0, r)), e.negative = (r) => e.check(/* @__PURE__ */ Ye(0, r)), e.nonpositive = (r) => e.check(/* @__PURE__ */ ge(0, r)), e.multipleOf = (r, o) => e.check(/* @__PURE__ */ Qe(r, o)), e.step = (r, o) => e.check(/* @__PURE__ */ Qe(r, o)), e.finite = () => e;
|
|
4593
4613
|
const n = e._zod.bag;
|
|
4594
4614
|
e.minValue = Math.max(n.minimum ?? Number.NEGATIVE_INFINITY, n.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(n.maximum ?? Number.POSITIVE_INFINITY, n.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? 0.5), e.isFinite = !0, e.format = n.format ?? null;
|
|
4595
4615
|
});
|
|
4596
|
-
function
|
|
4597
|
-
return /* @__PURE__ */
|
|
4616
|
+
function Vc(e) {
|
|
4617
|
+
return /* @__PURE__ */ Yi(Mt, e);
|
|
4598
4618
|
}
|
|
4599
|
-
const
|
|
4600
|
-
|
|
4619
|
+
const $a = /* @__PURE__ */ d("ZodNumberFormat", (e, t) => {
|
|
4620
|
+
ti.init(e, t), Mt.init(e, t);
|
|
4601
4621
|
});
|
|
4602
|
-
function
|
|
4603
|
-
return /* @__PURE__ */
|
|
4622
|
+
function tt(e) {
|
|
4623
|
+
return /* @__PURE__ */ Xi($a, e);
|
|
4604
4624
|
}
|
|
4605
|
-
const
|
|
4606
|
-
|
|
4625
|
+
const Ea = /* @__PURE__ */ d("ZodBoolean", (e, t) => {
|
|
4626
|
+
ni.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => bs(e, n, r);
|
|
4607
4627
|
});
|
|
4608
|
-
function
|
|
4609
|
-
return /* @__PURE__ */
|
|
4628
|
+
function Wc(e) {
|
|
4629
|
+
return /* @__PURE__ */ Qi(Ea, e);
|
|
4610
4630
|
}
|
|
4611
|
-
const
|
|
4612
|
-
|
|
4631
|
+
const Ta = /* @__PURE__ */ d("ZodUnknown", (e, t) => {
|
|
4632
|
+
ri.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => zs();
|
|
4613
4633
|
});
|
|
4614
|
-
function
|
|
4615
|
-
return /* @__PURE__ */
|
|
4634
|
+
function nt() {
|
|
4635
|
+
return /* @__PURE__ */ es(Ta);
|
|
4616
4636
|
}
|
|
4617
|
-
const
|
|
4618
|
-
|
|
4637
|
+
const Za = /* @__PURE__ */ d("ZodNever", (e, t) => {
|
|
4638
|
+
oi.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => ks(e, n, r);
|
|
4619
4639
|
});
|
|
4620
|
-
function
|
|
4621
|
-
return /* @__PURE__ */
|
|
4640
|
+
function Oa(e) {
|
|
4641
|
+
return /* @__PURE__ */ ts(Za, e);
|
|
4622
4642
|
}
|
|
4623
|
-
const
|
|
4624
|
-
|
|
4643
|
+
const Ia = /* @__PURE__ */ d("ZodArray", (e, t) => {
|
|
4644
|
+
ii.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => Zs(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ ce(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ ce(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ Nt(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ Ct(n, r)), e.unwrap = () => e.element;
|
|
4625
4645
|
});
|
|
4626
|
-
function
|
|
4627
|
-
return /* @__PURE__ */
|
|
4646
|
+
function Aa(e, t) {
|
|
4647
|
+
return /* @__PURE__ */ ps(Ia, e, t);
|
|
4628
4648
|
}
|
|
4629
|
-
const
|
|
4630
|
-
|
|
4649
|
+
const Pa = /* @__PURE__ */ d("ZodObject", (e, t) => {
|
|
4650
|
+
ai.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => Os(e, n, r, o), v(e, "shape", () => t.shape), e.keyof = () => La(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: nt() }), e.loose = () => e.clone({ ...e._zod.def, catchall: nt() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Oa() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => Tr(e, n), e.safeExtend = (n) => Zr(e, n), e.merge = (n) => Or(e, n), e.pick = (n) => $r(e, n), e.omit = (n) => Er(e, n), e.partial = (...n) => Ir(xt, e, n[0]), e.required = (...n) => Ar(Ft, e, n[0]);
|
|
4631
4651
|
});
|
|
4632
|
-
function
|
|
4652
|
+
function Gc(e, t) {
|
|
4633
4653
|
const n = {
|
|
4634
4654
|
type: "object",
|
|
4635
4655
|
shape: e ?? {},
|
|
4636
4656
|
...h(t)
|
|
4637
4657
|
};
|
|
4638
|
-
return new
|
|
4658
|
+
return new Pa(n);
|
|
4639
4659
|
}
|
|
4640
|
-
const
|
|
4641
|
-
|
|
4660
|
+
const Na = /* @__PURE__ */ d("ZodUnion", (e, t) => {
|
|
4661
|
+
ci.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => Is(e, n, r, o), e.options = t.options;
|
|
4642
4662
|
});
|
|
4643
|
-
function
|
|
4644
|
-
return new
|
|
4663
|
+
function Ca(e, t) {
|
|
4664
|
+
return new Na({
|
|
4645
4665
|
type: "union",
|
|
4646
4666
|
options: e,
|
|
4647
4667
|
...h(t)
|
|
4648
4668
|
});
|
|
4649
4669
|
}
|
|
4650
|
-
const
|
|
4651
|
-
|
|
4670
|
+
const Ra = /* @__PURE__ */ d("ZodIntersection", (e, t) => {
|
|
4671
|
+
ui.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => As(e, n, r, o);
|
|
4652
4672
|
});
|
|
4653
|
-
function
|
|
4654
|
-
return new
|
|
4673
|
+
function ja(e, t) {
|
|
4674
|
+
return new Ra({
|
|
4655
4675
|
type: "intersection",
|
|
4656
4676
|
left: e,
|
|
4657
4677
|
right: t
|
|
4658
4678
|
});
|
|
4659
4679
|
}
|
|
4660
|
-
const
|
|
4661
|
-
|
|
4680
|
+
const Da = /* @__PURE__ */ d("ZodRecord", (e, t) => {
|
|
4681
|
+
di.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ps(e, n, r, o), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
4662
4682
|
});
|
|
4663
|
-
function
|
|
4664
|
-
return new
|
|
4683
|
+
function Bc(e, t, n) {
|
|
4684
|
+
return new Da({
|
|
4665
4685
|
type: "record",
|
|
4666
4686
|
keyType: e,
|
|
4667
4687
|
valueType: t,
|
|
4668
4688
|
...h(n)
|
|
4669
4689
|
});
|
|
4670
4690
|
}
|
|
4671
|
-
const
|
|
4672
|
-
|
|
4691
|
+
const we = /* @__PURE__ */ d("ZodEnum", (e, t) => {
|
|
4692
|
+
li.init(e, t), S.init(e, t), e._zod.processJSONSchema = (r, o, i) => Ss(e, r, o), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
4673
4693
|
const n = new Set(Object.keys(t.entries));
|
|
4674
4694
|
e.extract = (r, o) => {
|
|
4675
4695
|
const i = {};
|
|
@@ -4678,7 +4698,7 @@ const ve = /* @__PURE__ */ d("ZodEnum", (e, t) => {
|
|
|
4678
4698
|
i[s] = t.entries[s];
|
|
4679
4699
|
else
|
|
4680
4700
|
throw new Error(`Key ${s} not found in enum`);
|
|
4681
|
-
return new
|
|
4701
|
+
return new we({
|
|
4682
4702
|
...t,
|
|
4683
4703
|
checks: [],
|
|
4684
4704
|
...h(o),
|
|
@@ -4691,7 +4711,7 @@ const ve = /* @__PURE__ */ d("ZodEnum", (e, t) => {
|
|
|
4691
4711
|
delete i[s];
|
|
4692
4712
|
else
|
|
4693
4713
|
throw new Error(`Key ${s} not found in enum`);
|
|
4694
|
-
return new
|
|
4714
|
+
return new we({
|
|
4695
4715
|
...t,
|
|
4696
4716
|
checks: [],
|
|
4697
4717
|
...h(o),
|
|
@@ -4699,16 +4719,16 @@ const ve = /* @__PURE__ */ d("ZodEnum", (e, t) => {
|
|
|
4699
4719
|
});
|
|
4700
4720
|
};
|
|
4701
4721
|
});
|
|
4702
|
-
function
|
|
4722
|
+
function La(e, t) {
|
|
4703
4723
|
const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
|
|
4704
|
-
return new
|
|
4724
|
+
return new we({
|
|
4705
4725
|
type: "enum",
|
|
4706
4726
|
entries: n,
|
|
4707
4727
|
...h(t)
|
|
4708
4728
|
});
|
|
4709
4729
|
}
|
|
4710
|
-
const
|
|
4711
|
-
|
|
4730
|
+
const Ua = /* @__PURE__ */ d("ZodLiteral", (e, t) => {
|
|
4731
|
+
fi.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => $s(e, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", {
|
|
4712
4732
|
get() {
|
|
4713
4733
|
if (t.values.length > 1)
|
|
4714
4734
|
throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
@@ -4716,17 +4736,17 @@ const Ca = /* @__PURE__ */ d("ZodLiteral", (e, t) => {
|
|
|
4716
4736
|
}
|
|
4717
4737
|
});
|
|
4718
4738
|
});
|
|
4719
|
-
function
|
|
4720
|
-
return new
|
|
4739
|
+
function Kc(e, t) {
|
|
4740
|
+
return new Ua({
|
|
4721
4741
|
type: "literal",
|
|
4722
4742
|
values: Array.isArray(e) ? e : [e],
|
|
4723
4743
|
...h(t)
|
|
4724
4744
|
});
|
|
4725
4745
|
}
|
|
4726
|
-
const
|
|
4727
|
-
|
|
4746
|
+
const Ma = /* @__PURE__ */ d("ZodTransform", (e, t) => {
|
|
4747
|
+
pi.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ts(e, n), e._zod.parse = (n, r) => {
|
|
4728
4748
|
if (r.direction === "backward")
|
|
4729
|
-
throw new
|
|
4749
|
+
throw new pt(e.constructor.name);
|
|
4730
4750
|
n.addIssue = (i) => {
|
|
4731
4751
|
if (typeof i == "string")
|
|
4732
4752
|
n.issues.push(ne(i, n.value, t));
|
|
@@ -4739,184 +4759,186 @@ const Ra = /* @__PURE__ */ d("ZodTransform", (e, t) => {
|
|
|
4739
4759
|
return o instanceof Promise ? o.then((i) => (n.value = i, n)) : (n.value = o, n);
|
|
4740
4760
|
};
|
|
4741
4761
|
});
|
|
4742
|
-
function
|
|
4743
|
-
return new
|
|
4762
|
+
function xa(e) {
|
|
4763
|
+
return new Ma({
|
|
4744
4764
|
type: "transform",
|
|
4745
4765
|
transform: e
|
|
4746
4766
|
});
|
|
4747
4767
|
}
|
|
4748
|
-
const
|
|
4749
|
-
|
|
4768
|
+
const xt = /* @__PURE__ */ d("ZodOptional", (e, t) => {
|
|
4769
|
+
Pt.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => Lt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4750
4770
|
});
|
|
4751
|
-
function
|
|
4752
|
-
return new
|
|
4771
|
+
function rt(e) {
|
|
4772
|
+
return new xt({
|
|
4753
4773
|
type: "optional",
|
|
4754
4774
|
innerType: e
|
|
4755
4775
|
});
|
|
4756
4776
|
}
|
|
4757
|
-
const
|
|
4758
|
-
|
|
4777
|
+
const Fa = /* @__PURE__ */ d("ZodExactOptional", (e, t) => {
|
|
4778
|
+
gi.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => Lt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4759
4779
|
});
|
|
4760
|
-
function
|
|
4761
|
-
return new
|
|
4780
|
+
function Ja(e) {
|
|
4781
|
+
return new Fa({
|
|
4762
4782
|
type: "optional",
|
|
4763
4783
|
innerType: e
|
|
4764
4784
|
});
|
|
4765
4785
|
}
|
|
4766
|
-
const
|
|
4767
|
-
|
|
4786
|
+
const qa = /* @__PURE__ */ d("ZodNullable", (e, t) => {
|
|
4787
|
+
hi.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ns(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4768
4788
|
});
|
|
4769
|
-
function
|
|
4770
|
-
return new
|
|
4789
|
+
function ot(e) {
|
|
4790
|
+
return new qa({
|
|
4771
4791
|
type: "nullable",
|
|
4772
4792
|
innerType: e
|
|
4773
4793
|
});
|
|
4774
4794
|
}
|
|
4775
|
-
const
|
|
4776
|
-
|
|
4795
|
+
const Va = /* @__PURE__ */ d("ZodDefault", (e, t) => {
|
|
4796
|
+
mi.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => Rs(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
4777
4797
|
});
|
|
4778
|
-
function
|
|
4779
|
-
return new
|
|
4798
|
+
function Wa(e, t) {
|
|
4799
|
+
return new Va({
|
|
4780
4800
|
type: "default",
|
|
4781
4801
|
innerType: e,
|
|
4782
4802
|
get defaultValue() {
|
|
4783
|
-
return typeof t == "function" ? t() :
|
|
4803
|
+
return typeof t == "function" ? t() : _t(t);
|
|
4784
4804
|
}
|
|
4785
4805
|
});
|
|
4786
4806
|
}
|
|
4787
|
-
const
|
|
4788
|
-
|
|
4807
|
+
const Ga = /* @__PURE__ */ d("ZodPrefault", (e, t) => {
|
|
4808
|
+
_i.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => js(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4789
4809
|
});
|
|
4790
|
-
function
|
|
4791
|
-
return new
|
|
4810
|
+
function Ba(e, t) {
|
|
4811
|
+
return new Ga({
|
|
4792
4812
|
type: "prefault",
|
|
4793
4813
|
innerType: e,
|
|
4794
4814
|
get defaultValue() {
|
|
4795
|
-
return typeof t == "function" ? t() :
|
|
4815
|
+
return typeof t == "function" ? t() : _t(t);
|
|
4796
4816
|
}
|
|
4797
4817
|
});
|
|
4798
4818
|
}
|
|
4799
|
-
const
|
|
4800
|
-
|
|
4819
|
+
const Ft = /* @__PURE__ */ d("ZodNonOptional", (e, t) => {
|
|
4820
|
+
yi.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => Cs(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4801
4821
|
});
|
|
4802
|
-
function
|
|
4803
|
-
return new
|
|
4822
|
+
function Ka(e, t) {
|
|
4823
|
+
return new Ft({
|
|
4804
4824
|
type: "nonoptional",
|
|
4805
4825
|
innerType: e,
|
|
4806
4826
|
...h(t)
|
|
4807
4827
|
});
|
|
4808
4828
|
}
|
|
4809
|
-
const
|
|
4810
|
-
|
|
4829
|
+
const Ha = /* @__PURE__ */ d("ZodCatch", (e, t) => {
|
|
4830
|
+
vi.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ds(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
4811
4831
|
});
|
|
4812
|
-
function
|
|
4813
|
-
return new
|
|
4832
|
+
function Ya(e, t) {
|
|
4833
|
+
return new Ha({
|
|
4814
4834
|
type: "catch",
|
|
4815
4835
|
innerType: e,
|
|
4816
4836
|
catchValue: typeof t == "function" ? t : () => t
|
|
4817
4837
|
});
|
|
4818
4838
|
}
|
|
4819
|
-
const
|
|
4820
|
-
|
|
4839
|
+
const Xa = /* @__PURE__ */ d("ZodPipe", (e, t) => {
|
|
4840
|
+
wi.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ls(e, n, r, o), e.in = t.in, e.out = t.out;
|
|
4821
4841
|
});
|
|
4822
|
-
function
|
|
4823
|
-
return new
|
|
4842
|
+
function it(e, t) {
|
|
4843
|
+
return new Xa({
|
|
4824
4844
|
type: "pipe",
|
|
4825
4845
|
in: e,
|
|
4826
4846
|
out: t
|
|
4827
4847
|
// ...util.normalizeParams(params),
|
|
4828
4848
|
});
|
|
4829
4849
|
}
|
|
4830
|
-
const
|
|
4831
|
-
|
|
4850
|
+
const Qa = /* @__PURE__ */ d("ZodReadonly", (e, t) => {
|
|
4851
|
+
bi.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => Us(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4832
4852
|
});
|
|
4833
|
-
function
|
|
4834
|
-
return new
|
|
4853
|
+
function ec(e) {
|
|
4854
|
+
return new Qa({
|
|
4835
4855
|
type: "readonly",
|
|
4836
4856
|
innerType: e
|
|
4837
4857
|
});
|
|
4838
4858
|
}
|
|
4839
|
-
const
|
|
4840
|
-
|
|
4859
|
+
const tc = /* @__PURE__ */ d("ZodCustom", (e, t) => {
|
|
4860
|
+
ki.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => Es(e, n);
|
|
4841
4861
|
});
|
|
4842
|
-
function
|
|
4843
|
-
return /* @__PURE__ */
|
|
4862
|
+
function nc(e, t = {}) {
|
|
4863
|
+
return /* @__PURE__ */ gs(tc, e, t);
|
|
4844
4864
|
}
|
|
4845
|
-
function
|
|
4846
|
-
return /* @__PURE__ */
|
|
4865
|
+
function rc(e) {
|
|
4866
|
+
return /* @__PURE__ */ hs(e);
|
|
4847
4867
|
}
|
|
4848
4868
|
export {
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4869
|
+
bc as $,
|
|
4870
|
+
mr as A,
|
|
4871
|
+
Ec as B,
|
|
4872
|
+
mc as C,
|
|
4873
|
+
_e as D,
|
|
4874
|
+
at as E,
|
|
4875
|
+
yc as F,
|
|
4876
|
+
Bc as G,
|
|
4877
|
+
Lc as H,
|
|
4878
|
+
Mc as I,
|
|
4879
|
+
Fc as J,
|
|
4880
|
+
Rc as K,
|
|
4881
|
+
Nc as L,
|
|
4882
|
+
Cc as M,
|
|
4883
|
+
Dc as N,
|
|
4884
|
+
Pc as O,
|
|
4885
|
+
xc as P,
|
|
4886
|
+
pc as Q,
|
|
4887
|
+
gc as R,
|
|
4888
|
+
_r as S,
|
|
4889
|
+
fc as T,
|
|
4890
|
+
uc as U,
|
|
4891
|
+
jc as V,
|
|
4892
|
+
Uc as W,
|
|
4893
|
+
cc as X,
|
|
4894
|
+
Kc as Y,
|
|
4895
|
+
nn as Z,
|
|
4896
|
+
La as _,
|
|
4897
|
+
Zc as a,
|
|
4898
|
+
dr as a0,
|
|
4899
|
+
Ae as a1,
|
|
4900
|
+
tn as a2,
|
|
4901
|
+
Gt as a3,
|
|
4902
|
+
Wt as a4,
|
|
4903
|
+
qt as a5,
|
|
4904
|
+
dn as a6,
|
|
4905
|
+
bn as a7,
|
|
4906
|
+
kn as a8,
|
|
4907
|
+
zc as a9,
|
|
4908
|
+
te as aa,
|
|
4909
|
+
Vt as ab,
|
|
4910
|
+
M as ac,
|
|
4911
|
+
cn as ad,
|
|
4912
|
+
un as ae,
|
|
4913
|
+
Tc as af,
|
|
4914
|
+
Sc as ag,
|
|
4915
|
+
Jc as ah,
|
|
4916
|
+
kc as ai,
|
|
4917
|
+
rn as aj,
|
|
4918
|
+
Ac as b,
|
|
4919
|
+
yn as c,
|
|
4920
|
+
Wc as d,
|
|
4921
|
+
nt as e,
|
|
4922
|
+
Aa as f,
|
|
4923
|
+
ac as g,
|
|
4924
|
+
dc as h,
|
|
4925
|
+
De as i,
|
|
4926
|
+
wc as j,
|
|
4927
|
+
$c as k,
|
|
4928
|
+
lc as l,
|
|
4929
|
+
sc as m,
|
|
4930
|
+
gr as n,
|
|
4931
|
+
Gc as o,
|
|
4932
|
+
Oc as p,
|
|
4933
|
+
Ic as q,
|
|
4934
|
+
ic as r,
|
|
4935
|
+
qc as s,
|
|
4936
|
+
fr as t,
|
|
4937
|
+
Ca as u,
|
|
4938
|
+
vc as v,
|
|
4939
|
+
hc as w,
|
|
4940
|
+
_c as x,
|
|
4941
|
+
Vc as y,
|
|
4942
|
+
hr as z
|
|
4921
4943
|
};
|
|
4922
|
-
//# sourceMappingURL=schemas-
|
|
4944
|
+
//# sourceMappingURL=schemas-DR_GaPQj.js.map
|