@gengage/assistant-fe 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -282
- package/dist/assistant-fe.css +1 -1
- package/dist/chat/api.d.ts +1 -12
- package/dist/chat/api.d.ts.map +1 -1
- package/dist/chat/components/ChatDrawer.d.ts +15 -1
- package/dist/chat/components/ChatDrawer.d.ts.map +1 -1
- package/dist/chat/components/ChoicePrompter.d.ts +1 -0
- package/dist/chat/components/ChoicePrompter.d.ts.map +1 -1
- package/dist/chat/components/ComparisonTable.d.ts +5 -3
- package/dist/chat/components/ComparisonTable.d.ts.map +1 -1
- package/dist/chat/components/PanelTopBar.d.ts +2 -0
- package/dist/chat/components/PanelTopBar.d.ts.map +1 -1
- package/dist/chat/components/ProductSummaryCard.d.ts.map +1 -1
- package/dist/chat/components/ReviewHighlights.d.ts +3 -0
- package/dist/chat/components/ReviewHighlights.d.ts.map +1 -1
- package/dist/chat/components/renderUISpec.d.ts +0 -5
- package/dist/chat/components/renderUISpec.d.ts.map +1 -1
- package/dist/chat/index.d.ts +18 -9
- 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/session-persistence.d.ts +3 -0
- package/dist/chat/session-persistence.d.ts.map +1 -1
- package/dist/chat/types.d.ts +23 -25
- package/dist/chat/types.d.ts.map +1 -1
- package/dist/chat.cjs +1 -1
- package/dist/chat.iife.js +24 -24
- package/dist/chat.iife.js.map +1 -1
- package/dist/chat.js +8 -9
- package/dist/chat.js.map +1 -1
- package/dist/common/action-router.d.ts.map +1 -1
- package/dist/common/activity-tracker.d.ts +1 -1
- package/dist/common/analytics.d.ts +12 -8
- package/dist/common/analytics.d.ts.map +1 -1
- package/dist/common/api-paths.d.ts +2 -5
- package/dist/common/api-paths.d.ts.map +1 -1
- package/dist/common/config-schema.d.ts.map +1 -1
- package/dist/common/debug.d.ts +14 -0
- package/dist/common/debug.d.ts.map +1 -0
- package/dist/common/events.d.ts.map +1 -1
- package/dist/common/index.d.ts +2 -2
- package/dist/common/index.d.ts.map +1 -1
- package/dist/common/overlay.d.ts +19 -0
- package/dist/common/overlay.d.ts.map +1 -1
- package/dist/common/{v1-protocol-adapter.d.ts → protocol-adapter.d.ts} +2 -2
- package/dist/common/protocol-adapter.d.ts.map +1 -0
- package/dist/common/quantity-stepper.d.ts +10 -10
- package/dist/common/quantity-stepper.d.ts.map +1 -1
- package/dist/common/safe-html.d.ts.map +1 -1
- package/dist/common/streaming.d.ts.map +1 -1
- package/dist/common/tts-player.d.ts +2 -0
- package/dist/common/tts-player.d.ts.map +1 -1
- package/dist/common/types.d.ts +1 -1
- package/dist/common/voice-input.d.ts +1 -0
- package/dist/common/voice-input.d.ts.map +1 -1
- package/dist/common/widget-base.d.ts.map +1 -1
- package/dist/common.cjs +1 -1
- package/dist/common.cjs.map +1 -1
- package/dist/common.js +173 -172
- package/dist/common.js.map +1 -1
- package/dist/index-BWPx4pM7.cjs +13 -0
- package/dist/index-BWPx4pM7.cjs.map +1 -0
- package/dist/index-CEt87kCd.js +4463 -0
- package/dist/index-CEt87kCd.js.map +1 -0
- package/dist/index-DL4CAkyL.cjs +2 -0
- package/dist/index-DL4CAkyL.cjs.map +1 -0
- package/dist/{index-BH-V2lWn.js → index-DR2uepzb.js} +108 -106
- package/dist/index-DR2uepzb.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +16 -16
- package/dist/native.cjs +1 -1
- package/dist/native.iife.js +18 -18
- package/dist/native.iife.js.map +1 -1
- package/dist/native.js +1 -1
- package/dist/qna/index.d.ts +19 -0
- package/dist/qna/index.d.ts.map +1 -1
- package/dist/qna/types.d.ts +2 -2
- package/dist/qna/types.d.ts.map +1 -1
- package/dist/qna.cjs +1 -1
- package/dist/qna.cjs.map +1 -1
- package/dist/qna.css +1 -1
- package/dist/qna.iife.js +7 -7
- package/dist/qna.iife.js.map +1 -1
- package/dist/qna.js +14 -14
- package/dist/qna.js.map +1 -1
- package/dist/quantity-stepper-C-nV4lwi.js +77 -0
- package/dist/quantity-stepper-C-nV4lwi.js.map +1 -0
- package/dist/quantity-stepper-CURMkwRF.cjs +2 -0
- package/dist/quantity-stepper-CURMkwRF.cjs.map +1 -0
- package/dist/{schemas-yF4IOEUi.js → schemas-DIhL3DkL.js} +1166 -947
- package/dist/schemas-DIhL3DkL.js.map +1 -0
- package/dist/schemas-Dsr0bbO_.cjs +86 -0
- package/dist/schemas-Dsr0bbO_.cjs.map +1 -0
- package/dist/simrel/api.d.ts +1 -1
- package/dist/simrel/api.d.ts.map +1 -1
- package/dist/simrel/components/GroupTabs.d.ts +1 -1
- package/dist/simrel/components/GroupTabs.d.ts.map +1 -1
- package/dist/simrel/components/ProductCard.d.ts +1 -1
- package/dist/simrel/components/ProductCard.d.ts.map +1 -1
- package/dist/simrel/components/ProductGrid.d.ts +1 -1
- package/dist/simrel/components/ProductGrid.d.ts.map +1 -1
- package/dist/simrel/index.d.ts +20 -1
- 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 +1 -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.css +1 -1
- package/dist/simrel.iife.js +11 -11
- package/dist/simrel.iife.js.map +1 -1
- package/dist/simrel.js +123 -111
- package/dist/simrel.js.map +1 -1
- package/package.json +1 -1
- package/dist/chat/components/ProactivePopup.d.ts +0 -20
- package/dist/chat/components/ProactivePopup.d.ts.map +0 -1
- package/dist/chat/heartbeat.d.ts +0 -71
- package/dist/chat/heartbeat.d.ts.map +0 -1
- package/dist/common/v1-protocol-adapter.d.ts.map +0 -1
- package/dist/index-1yPxOqAw.cjs +0 -13
- package/dist/index-1yPxOqAw.cjs.map +0 -1
- package/dist/index-BH-V2lWn.js.map +0 -1
- package/dist/index-BelS6Vnv.cjs +0 -2
- package/dist/index-BelS6Vnv.cjs.map +0 -1
- package/dist/index-CERWfDdF.js +0 -4571
- package/dist/index-CERWfDdF.js.map +0 -1
- package/dist/quantity-stepper-B8kX8GbN.js +0 -209
- package/dist/quantity-stepper-B8kX8GbN.js.map +0 -1
- package/dist/quantity-stepper-UbAp53Ow.cjs +0 -2
- package/dist/quantity-stepper-UbAp53Ow.cjs.map +0 -1
- package/dist/schemas-DHzfUzwA.cjs +0 -86
- package/dist/schemas-DHzfUzwA.cjs.map +0 -1
- package/dist/schemas-yF4IOEUi.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const Jt = ({ 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 Dt = ({ element: e, renderElement: t }) => {
|
|
|
8
8
|
}
|
|
9
9
|
return n;
|
|
10
10
|
};
|
|
11
|
-
function
|
|
11
|
+
function Xa(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 ?? Jt, 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 Fa(e) {
|
|
|
31
31
|
}, i = o(e.spec.root);
|
|
32
32
|
return i && t.appendChild(i), t;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function ec(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 tc(e, t) {
|
|
42
42
|
const n = {
|
|
43
43
|
event_name: "stream.start",
|
|
44
44
|
account_id: e.account_id,
|
|
@@ -51,7 +51,7 @@ function Ja(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 nc(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 qa(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 rc(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 Va(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 oc(e, t) {
|
|
84
84
|
const n = {
|
|
85
85
|
event_name: "stream.done",
|
|
86
86
|
account_id: e.account_id,
|
|
@@ -94,7 +94,7 @@ function Ga(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 ic(e, t) {
|
|
98
98
|
const n = {
|
|
99
99
|
event_name: "stream.error",
|
|
100
100
|
account_id: e.account_id,
|
|
@@ -108,7 +108,7 @@ function Ba(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 sc(e, t) {
|
|
112
112
|
const n = {
|
|
113
113
|
model: t.model,
|
|
114
114
|
prompt_tokens: t.prompt_tokens,
|
|
@@ -125,7 +125,7 @@ function Wa(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 ac(e, t) {
|
|
129
129
|
const n = {
|
|
130
130
|
event_name: "metering.increment",
|
|
131
131
|
account_id: e.account_id,
|
|
@@ -139,7 +139,7 @@ function Ha(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 qt(e, t) {
|
|
143
143
|
const n = {
|
|
144
144
|
event_name: "metering.summary",
|
|
145
145
|
account_id: e.account_id,
|
|
@@ -153,7 +153,7 @@ function Lt(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 cc(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 Ka(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 uc(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 Ya(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 dc(e, t) {
|
|
186
186
|
const n = {
|
|
187
187
|
event_name: "basket.add",
|
|
188
188
|
account_id: e.account_id,
|
|
@@ -200,7 +200,7 @@ function Qa(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 Vt(e, t) {
|
|
204
204
|
const n = {
|
|
205
205
|
event_name: "checkout.start",
|
|
206
206
|
account_id: e.account_id,
|
|
@@ -217,7 +217,7 @@ function Ut(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 Wt(e, t) {
|
|
221
221
|
const n = {
|
|
222
222
|
event_name: "checkout.complete",
|
|
223
223
|
account_id: e.account_id,
|
|
@@ -234,16 +234,223 @@ function Mt(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
|
-
|
|
237
|
+
const Gt = /* @__PURE__ */ new Set([
|
|
238
|
+
"p",
|
|
239
|
+
"br",
|
|
240
|
+
"a",
|
|
241
|
+
"strong",
|
|
242
|
+
"b",
|
|
243
|
+
"em",
|
|
244
|
+
"i",
|
|
245
|
+
"u",
|
|
246
|
+
"ul",
|
|
247
|
+
"ol",
|
|
248
|
+
"li",
|
|
249
|
+
"h1",
|
|
250
|
+
"h2",
|
|
251
|
+
"h3",
|
|
252
|
+
"h4",
|
|
253
|
+
"h5",
|
|
254
|
+
"h6",
|
|
255
|
+
"span",
|
|
256
|
+
"div",
|
|
257
|
+
"table",
|
|
258
|
+
"thead",
|
|
259
|
+
"tbody",
|
|
260
|
+
"tr",
|
|
261
|
+
"th",
|
|
262
|
+
"td",
|
|
263
|
+
"hr",
|
|
264
|
+
"code",
|
|
265
|
+
"pre",
|
|
266
|
+
"blockquote",
|
|
267
|
+
"img",
|
|
268
|
+
"sup",
|
|
269
|
+
"sub"
|
|
270
|
+
]), Bt = /* @__PURE__ */ new Set([
|
|
271
|
+
"script",
|
|
272
|
+
"iframe",
|
|
273
|
+
"object",
|
|
274
|
+
"embed",
|
|
275
|
+
"form",
|
|
276
|
+
"input",
|
|
277
|
+
"textarea",
|
|
278
|
+
"select",
|
|
279
|
+
"button",
|
|
280
|
+
"style",
|
|
281
|
+
"link",
|
|
282
|
+
"meta",
|
|
283
|
+
"template",
|
|
284
|
+
"noscript"
|
|
285
|
+
]), Ie = {
|
|
286
|
+
"*": /* @__PURE__ */ new Set(["class"]),
|
|
287
|
+
a: /* @__PURE__ */ new Set(["href", "target", "rel"]),
|
|
288
|
+
img: /* @__PURE__ */ new Set(["src", "alt", "width", "height"]),
|
|
289
|
+
div: /* @__PURE__ */ new Set(["style"]),
|
|
290
|
+
span: /* @__PURE__ */ new Set(["style"]),
|
|
291
|
+
p: /* @__PURE__ */ new Set(["style"])
|
|
292
|
+
};
|
|
293
|
+
function Ht(e) {
|
|
294
|
+
return /^\s*javascript\s*:/i.test(e);
|
|
295
|
+
}
|
|
296
|
+
const Kt = /* @__PURE__ */ new Set([
|
|
297
|
+
"color",
|
|
298
|
+
"background-color",
|
|
299
|
+
"font-size",
|
|
300
|
+
"font-weight",
|
|
301
|
+
"font-style",
|
|
302
|
+
"font-family",
|
|
303
|
+
"text-align",
|
|
304
|
+
"text-decoration",
|
|
305
|
+
"line-height",
|
|
306
|
+
"letter-spacing",
|
|
307
|
+
"margin",
|
|
308
|
+
"margin-top",
|
|
309
|
+
"margin-right",
|
|
310
|
+
"margin-bottom",
|
|
311
|
+
"margin-left",
|
|
312
|
+
"padding",
|
|
313
|
+
"padding-top",
|
|
314
|
+
"padding-right",
|
|
315
|
+
"padding-bottom",
|
|
316
|
+
"padding-left",
|
|
317
|
+
"border",
|
|
318
|
+
"border-top",
|
|
319
|
+
"border-right",
|
|
320
|
+
"border-bottom",
|
|
321
|
+
"border-left",
|
|
322
|
+
"border-radius",
|
|
323
|
+
"border-color",
|
|
324
|
+
"border-width",
|
|
325
|
+
"border-style",
|
|
326
|
+
"width",
|
|
327
|
+
"max-width",
|
|
328
|
+
"min-width",
|
|
329
|
+
"height",
|
|
330
|
+
"max-height",
|
|
331
|
+
"min-height",
|
|
332
|
+
"display",
|
|
333
|
+
"vertical-align",
|
|
334
|
+
"white-space",
|
|
335
|
+
"word-break",
|
|
336
|
+
"overflow",
|
|
337
|
+
"opacity",
|
|
338
|
+
"visibility",
|
|
339
|
+
"list-style",
|
|
340
|
+
"list-style-type",
|
|
341
|
+
"text-transform",
|
|
342
|
+
"text-indent",
|
|
343
|
+
"text-overflow",
|
|
344
|
+
"box-sizing",
|
|
345
|
+
"flex",
|
|
346
|
+
"flex-direction",
|
|
347
|
+
"flex-wrap",
|
|
348
|
+
"justify-content",
|
|
349
|
+
"align-items",
|
|
350
|
+
"gap"
|
|
351
|
+
]), Yt = /url\s*\(|expression\s*\(|javascript\s*:|\bimport\b|-moz-binding|behavior\s*:/i;
|
|
352
|
+
function Qt(e) {
|
|
353
|
+
const t = [];
|
|
354
|
+
for (const n of e.split(";")) {
|
|
355
|
+
const r = n.trim();
|
|
356
|
+
if (!r) continue;
|
|
357
|
+
const o = r.indexOf(":");
|
|
358
|
+
if (o === -1) continue;
|
|
359
|
+
const i = r.slice(0, o).trim().toLowerCase(), s = r.slice(o + 1).trim();
|
|
360
|
+
Kt.has(i) && (Yt.test(s) || t.push(r));
|
|
361
|
+
}
|
|
362
|
+
return t.join("; ");
|
|
363
|
+
}
|
|
364
|
+
function he(e, t) {
|
|
365
|
+
if (e.nodeType === Node.TEXT_NODE) return;
|
|
366
|
+
if (e.nodeType !== Node.ELEMENT_NODE) {
|
|
367
|
+
e.parentNode?.removeChild(e);
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
const n = e, r = n.tagName.toLowerCase();
|
|
371
|
+
if (Bt.has(r)) {
|
|
372
|
+
n.parentNode?.removeChild(n);
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
if (!Gt.has(r)) {
|
|
376
|
+
const c = Array.from(n.childNodes);
|
|
377
|
+
for (const u of c)
|
|
378
|
+
t.insertBefore(u, n);
|
|
379
|
+
t.removeChild(n);
|
|
380
|
+
for (const u of c)
|
|
381
|
+
he(u, t);
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
const o = Ie["*"] ?? /* @__PURE__ */ new Set(), i = Ie[r] ?? /* @__PURE__ */ new Set(), s = Array.from(n.attributes);
|
|
385
|
+
for (const c of s) {
|
|
386
|
+
const u = c.name.toLowerCase();
|
|
387
|
+
if (!o.has(u) && !i.has(u)) {
|
|
388
|
+
n.removeAttribute(c.name);
|
|
389
|
+
continue;
|
|
390
|
+
}
|
|
391
|
+
if (Ht(c.value)) {
|
|
392
|
+
n.removeAttribute(c.name);
|
|
393
|
+
continue;
|
|
394
|
+
}
|
|
395
|
+
if (u === "style") {
|
|
396
|
+
const l = Qt(c.value);
|
|
397
|
+
l ? n.setAttribute("style", l) : n.removeAttribute("style");
|
|
398
|
+
continue;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
if (r === "a") {
|
|
402
|
+
const c = n.getAttribute("href");
|
|
403
|
+
if (c !== null) {
|
|
404
|
+
const u = c.trim().toLowerCase();
|
|
405
|
+
!u.startsWith("http://") && !u.startsWith("https://") && !u.startsWith("mailto:") && n.removeAttribute("href");
|
|
406
|
+
}
|
|
407
|
+
n.setAttribute("target", "_blank"), n.setAttribute("rel", "noopener noreferrer");
|
|
408
|
+
}
|
|
409
|
+
if (r === "img") {
|
|
410
|
+
const c = n.getAttribute("src");
|
|
411
|
+
c !== null && (c.trim().toLowerCase().startsWith("https://") || n.removeAttribute("src"));
|
|
412
|
+
}
|
|
413
|
+
const a = Array.from(n.childNodes);
|
|
414
|
+
for (const c of a)
|
|
415
|
+
he(c, n);
|
|
416
|
+
}
|
|
417
|
+
const it = ["http:", "https:"];
|
|
418
|
+
function lc(e) {
|
|
419
|
+
try {
|
|
420
|
+
return it.includes(new URL(e).protocol);
|
|
421
|
+
} catch {
|
|
422
|
+
return !1;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
function st(e) {
|
|
426
|
+
if (e.startsWith("/") && !e.startsWith("//")) return !0;
|
|
427
|
+
try {
|
|
428
|
+
const t = new URL(e);
|
|
429
|
+
return it.includes(t.protocol);
|
|
430
|
+
} catch {
|
|
431
|
+
return !1;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
function fc(e, t, n) {
|
|
435
|
+
(t === "href" || t === "src") && !st(n) || e.setAttribute(t, n);
|
|
436
|
+
}
|
|
437
|
+
function pc(e) {
|
|
438
|
+
if (!e) return "";
|
|
439
|
+
const n = new DOMParser().parseFromString(e, "text/html").body, r = Array.from(n.childNodes);
|
|
440
|
+
for (const o of r)
|
|
441
|
+
he(o, n);
|
|
442
|
+
return n.innerHTML;
|
|
443
|
+
}
|
|
444
|
+
function gc(e, t) {
|
|
238
445
|
window.dispatchEvent(new CustomEvent(e, { detail: t, bubbles: !1 }));
|
|
239
446
|
}
|
|
240
|
-
function
|
|
447
|
+
function te(e, t) {
|
|
241
448
|
const n = (r) => {
|
|
242
449
|
t(r.detail);
|
|
243
450
|
};
|
|
244
451
|
return window.addEventListener(e, n), () => window.removeEventListener(e, n);
|
|
245
452
|
}
|
|
246
|
-
function
|
|
453
|
+
function Xt(e) {
|
|
247
454
|
if (e.type !== "user_message" && e.type !== "inputText") return null;
|
|
248
455
|
if (typeof e.payload == "string" && e.payload.trim().length > 0)
|
|
249
456
|
return e.payload.trim();
|
|
@@ -253,7 +460,7 @@ function Ft(e) {
|
|
|
253
460
|
}
|
|
254
461
|
return typeof e.title == "string" && e.title.trim().length > 0 ? e.title.trim() : null;
|
|
255
462
|
}
|
|
256
|
-
function
|
|
463
|
+
function hc(e) {
|
|
257
464
|
let t = !1;
|
|
258
465
|
const n = [];
|
|
259
466
|
let r = 0, o = null, i = 0;
|
|
@@ -267,7 +474,7 @@ function ec(e) {
|
|
|
267
474
|
), t = !0), e?.onChatUnavailable?.();
|
|
268
475
|
}
|
|
269
476
|
function l(m, k) {
|
|
270
|
-
const I =
|
|
477
|
+
const I = Xt(k);
|
|
271
478
|
if (I && m.sendMessage) {
|
|
272
479
|
m.open?.(), m.sendMessage(I);
|
|
273
480
|
return;
|
|
@@ -292,14 +499,14 @@ function ec(e) {
|
|
|
292
499
|
p() || Date.now() - i >= a && (n.length = 0, r = 0, f());
|
|
293
500
|
}, s));
|
|
294
501
|
}
|
|
295
|
-
const y =
|
|
502
|
+
const y = te("gengage:qna:action", (m) => {
|
|
296
503
|
const k = c();
|
|
297
504
|
if (k) {
|
|
298
505
|
l(k, m);
|
|
299
506
|
return;
|
|
300
507
|
}
|
|
301
508
|
u(), n.length >= 20 && n.shift(), n.push(m), g();
|
|
302
|
-
}), _ =
|
|
509
|
+
}), _ = te("gengage:qna:open-chat", () => {
|
|
303
510
|
const m = c();
|
|
304
511
|
if (m) {
|
|
305
512
|
m.open?.();
|
|
@@ -311,32 +518,32 @@ function ec(e) {
|
|
|
311
518
|
y(), _(), n.length = 0, r = 0, f();
|
|
312
519
|
};
|
|
313
520
|
}
|
|
314
|
-
function
|
|
315
|
-
return
|
|
316
|
-
n && window.gengage?.chat?.saveSession(n, e), window.location.href = t;
|
|
521
|
+
function mc() {
|
|
522
|
+
return te("gengage:similar:product-click", ({ sku: e, url: t, sessionId: n }) => {
|
|
523
|
+
n && window.gengage?.chat?.saveSession(n, e), st(t) && (window.location.href = t);
|
|
317
524
|
});
|
|
318
525
|
}
|
|
319
|
-
function
|
|
526
|
+
function en() {
|
|
320
527
|
const t = window.__gengageSessionId ?? sessionStorage.getItem("gengage_session_id") ?? null ?? crypto.randomUUID();
|
|
321
528
|
return window.__gengageSessionId = t, sessionStorage.setItem("gengage_session_id", t), window.gengage || (window.gengage = {}), window.gengage.sessionId = t, t;
|
|
322
529
|
}
|
|
323
|
-
function
|
|
530
|
+
function _c() {
|
|
324
531
|
return window.gengage?.pageContext ?? null;
|
|
325
532
|
}
|
|
326
|
-
function
|
|
533
|
+
function yc(e) {
|
|
327
534
|
window.gengage || (window.gengage = {}), window.gengage.pageContext = {
|
|
328
535
|
pageType: "other",
|
|
329
536
|
...window.gengage.pageContext,
|
|
330
537
|
...e
|
|
331
538
|
}, window.dispatchEvent(new CustomEvent("gengage:context:update", { detail: e }));
|
|
332
539
|
}
|
|
333
|
-
function
|
|
540
|
+
function tn(e) {
|
|
334
541
|
return {
|
|
335
|
-
sessionId: e?.sessionId ??
|
|
542
|
+
sessionId: e?.sessionId ?? en(),
|
|
336
543
|
...e
|
|
337
544
|
};
|
|
338
545
|
}
|
|
339
|
-
const
|
|
546
|
+
const Oe = {
|
|
340
547
|
"--gengage-chat-offset": "20px",
|
|
341
548
|
"--gengage-chat-launcher-size": "56px",
|
|
342
549
|
"--gengage-chat-width": "400px",
|
|
@@ -350,41 +557,41 @@ const Ee = {
|
|
|
350
557
|
"--gengage-qna-input-radius": "14px",
|
|
351
558
|
"--gengage-simrel-card-radius": "14px"
|
|
352
559
|
};
|
|
353
|
-
function
|
|
354
|
-
return e ? { ...
|
|
560
|
+
function nn(e) {
|
|
561
|
+
return e ? { ...Oe, ...e } : { ...Oe };
|
|
355
562
|
}
|
|
356
|
-
const
|
|
357
|
-
let
|
|
358
|
-
function
|
|
563
|
+
const j = "gengage-global-toast-root", Ae = "gengage-global-toast-style", we = "gengage-global-toast-root--visible", rn = 4200, on = 1500, sn = 15e3;
|
|
564
|
+
let Pe = !1, J = null;
|
|
565
|
+
function vc(e) {
|
|
359
566
|
return typeof e == "string" && e.toLowerCase().startsWith("tr") ? "Baglanti sorunu olustu. Lutfen tekrar deneyin." : "Connection issue. Please try again.";
|
|
360
567
|
}
|
|
361
|
-
function
|
|
362
|
-
|
|
363
|
-
|
|
568
|
+
function an() {
|
|
569
|
+
Pe || typeof window > "u" || typeof document > "u" || (Pe = !0, te("gengage:global:error", (e) => {
|
|
570
|
+
cn(e);
|
|
364
571
|
}));
|
|
365
572
|
}
|
|
366
|
-
function
|
|
573
|
+
function cn(e) {
|
|
367
574
|
if (typeof document > "u") return;
|
|
368
575
|
const t = e.message.trim();
|
|
369
576
|
if (!t) return;
|
|
370
|
-
|
|
371
|
-
const n =
|
|
577
|
+
pn();
|
|
578
|
+
const n = ln();
|
|
372
579
|
n.innerHTML = "";
|
|
373
580
|
const r = document.createElement("section");
|
|
374
581
|
r.className = "gengage-global-toast gengage-global-toast--error", r.setAttribute("role", "status"), r.setAttribute("aria-live", "polite");
|
|
375
582
|
const o = document.createElement("div");
|
|
376
|
-
o.className = "gengage-global-toast-title", o.textContent =
|
|
583
|
+
o.className = "gengage-global-toast-title", o.textContent = dn(e.source);
|
|
377
584
|
const i = document.createElement("div");
|
|
378
|
-
i.className = "gengage-global-toast-message", i.textContent = t, r.appendChild(o), r.appendChild(i), n.appendChild(r), n.classList.add(
|
|
379
|
-
|
|
380
|
-
},
|
|
585
|
+
i.className = "gengage-global-toast-message", i.textContent = t, r.appendChild(o), r.appendChild(i), n.appendChild(r), n.classList.add(we), J && (clearTimeout(J), J = null), J = setTimeout(() => {
|
|
586
|
+
un();
|
|
587
|
+
}, fn(e.durationMs));
|
|
381
588
|
}
|
|
382
|
-
function
|
|
589
|
+
function un() {
|
|
383
590
|
if (typeof document > "u") return;
|
|
384
|
-
const e = document.getElementById(
|
|
385
|
-
e && (e.classList.remove(
|
|
591
|
+
const e = document.getElementById(j);
|
|
592
|
+
e && (e.classList.remove(we), e.innerHTML = "", J && (clearTimeout(J), J = null));
|
|
386
593
|
}
|
|
387
|
-
function
|
|
594
|
+
function dn(e) {
|
|
388
595
|
switch (e) {
|
|
389
596
|
case "chat":
|
|
390
597
|
return "Chat warning";
|
|
@@ -396,30 +603,30 @@ function Yt(e) {
|
|
|
396
603
|
return "Connection warning";
|
|
397
604
|
}
|
|
398
605
|
}
|
|
399
|
-
function
|
|
400
|
-
const e = document.getElementById(
|
|
606
|
+
function ln() {
|
|
607
|
+
const e = document.getElementById(j);
|
|
401
608
|
if (e instanceof HTMLElement) return e;
|
|
402
609
|
const t = document.createElement("div");
|
|
403
|
-
return t.id =
|
|
610
|
+
return t.id = j, t.className = "gengage-global-toast-root", document.body.appendChild(t), t;
|
|
404
611
|
}
|
|
405
|
-
function
|
|
406
|
-
return typeof e != "number" || !Number.isFinite(e) ?
|
|
612
|
+
function fn(e) {
|
|
613
|
+
return typeof e != "number" || !Number.isFinite(e) ? rn : Math.min(sn, Math.max(on, Math.round(e)));
|
|
407
614
|
}
|
|
408
|
-
function
|
|
409
|
-
if (document.getElementById(
|
|
615
|
+
function pn() {
|
|
616
|
+
if (document.getElementById(Ae)) return;
|
|
410
617
|
const e = document.createElement("style");
|
|
411
|
-
e.id =
|
|
412
|
-
#${
|
|
618
|
+
e.id = Ae, e.textContent = `
|
|
619
|
+
#${j} {
|
|
413
620
|
position: fixed;
|
|
414
621
|
top: 16px;
|
|
415
622
|
right: 16px;
|
|
416
623
|
z-index: 2147483646;
|
|
417
624
|
pointer-events: none;
|
|
418
625
|
}
|
|
419
|
-
#${
|
|
626
|
+
#${j}.${we} {
|
|
420
627
|
pointer-events: auto;
|
|
421
628
|
}
|
|
422
|
-
#${
|
|
629
|
+
#${j} .gengage-global-toast {
|
|
423
630
|
min-width: 260px;
|
|
424
631
|
max-width: min(92vw, 420px);
|
|
425
632
|
border-radius: 12px;
|
|
@@ -434,12 +641,12 @@ function en() {
|
|
|
434
641
|
line-height: 1.4;
|
|
435
642
|
animation: gengage-global-toast-in 180ms ease-out forwards;
|
|
436
643
|
}
|
|
437
|
-
#${
|
|
644
|
+
#${j} .gengage-global-toast-title {
|
|
438
645
|
margin: 0 0 4px;
|
|
439
646
|
font-size: 12px;
|
|
440
647
|
font-weight: 700;
|
|
441
648
|
}
|
|
442
|
-
#${
|
|
649
|
+
#${j} .gengage-global-toast-message {
|
|
443
650
|
margin: 0;
|
|
444
651
|
font-weight: 500;
|
|
445
652
|
}
|
|
@@ -455,7 +662,20 @@ function en() {
|
|
|
455
662
|
}
|
|
456
663
|
`, document.head.appendChild(e);
|
|
457
664
|
}
|
|
458
|
-
|
|
665
|
+
let Y = null;
|
|
666
|
+
function gn() {
|
|
667
|
+
if (Y !== null) return Y;
|
|
668
|
+
try {
|
|
669
|
+
Y = localStorage.getItem("gengage:debug") === "1";
|
|
670
|
+
} catch {
|
|
671
|
+
Y = !1;
|
|
672
|
+
}
|
|
673
|
+
return Y;
|
|
674
|
+
}
|
|
675
|
+
function me(e, t, n) {
|
|
676
|
+
gn() && (n !== void 0 ? console.debug(`[gengage:${e}]`, t, n) : console.debug(`[gengage:${e}]`, t));
|
|
677
|
+
}
|
|
678
|
+
class wc {
|
|
459
679
|
constructor() {
|
|
460
680
|
this.isVisible = !1, this.isInitialised = !1, this._handlers = /* @__PURE__ */ new Map(), this._cleanups = [], this._ownsRoot = !1, this._destroying = !1;
|
|
461
681
|
}
|
|
@@ -467,20 +687,23 @@ class ic {
|
|
|
467
687
|
console.warn("[gengage] Widget already initialised. Call update() instead.");
|
|
468
688
|
return;
|
|
469
689
|
}
|
|
470
|
-
const n =
|
|
690
|
+
const n = nn(t.theme);
|
|
471
691
|
this.config = {
|
|
472
692
|
...t,
|
|
473
693
|
theme: n,
|
|
474
|
-
session:
|
|
475
|
-
}, this.root = this._resolveMount(t.mountTarget), this._applyTheme(n),
|
|
476
|
-
const r =
|
|
477
|
-
this._cleanups.push(r)
|
|
694
|
+
session: tn(t.session)
|
|
695
|
+
}, this.root = this._resolveMount(t.mountTarget), this._applyTheme(n), an();
|
|
696
|
+
const r = te("gengage:context:update", (o) => this.update(o));
|
|
697
|
+
this._cleanups.push(r), me("lifecycle", `${this.constructor.name}.init`, {
|
|
698
|
+
accountId: t.accountId,
|
|
699
|
+
sku: t.pageContext?.sku
|
|
700
|
+
});
|
|
478
701
|
try {
|
|
479
702
|
await this.onInit(this.config);
|
|
480
703
|
} catch (o) {
|
|
481
704
|
throw this.destroy(), o;
|
|
482
705
|
}
|
|
483
|
-
this.isInitialised = !0, this.emit("ready");
|
|
706
|
+
this.isInitialised = !0, me("lifecycle", `${this.constructor.name} ready`), this.emit("ready");
|
|
484
707
|
}
|
|
485
708
|
update(t) {
|
|
486
709
|
this.isInitialised && (this.config.pageContext ? this.config = {
|
|
@@ -502,12 +725,12 @@ class ic {
|
|
|
502
725
|
}
|
|
503
726
|
/** Track a checkout start event. Called by host page to attribute checkout to widget interaction. */
|
|
504
727
|
trackCheckout(t, n) {
|
|
505
|
-
const r = t === "start" ?
|
|
728
|
+
const r = t === "start" ? Vt : Wt;
|
|
506
729
|
this.track(r(this.analyticsContext(), n));
|
|
507
730
|
}
|
|
508
731
|
/** Track a metering summary event. Called by host page for session-level aggregation. */
|
|
509
732
|
flushMeteringSummary(t) {
|
|
510
|
-
this.track(
|
|
733
|
+
this.track(qt(this.analyticsContext(), t));
|
|
511
734
|
}
|
|
512
735
|
// ---------------------------------------------------------------------------
|
|
513
736
|
// Protected helpers
|
|
@@ -550,19 +773,19 @@ class ic {
|
|
|
550
773
|
if (t) {
|
|
551
774
|
for (const [n, r] of Object.entries(t))
|
|
552
775
|
if (r !== void 0) {
|
|
553
|
-
const o = n.startsWith("--") ? n : `--gengage-${
|
|
776
|
+
const o = n.startsWith("--") ? n : `--gengage-${hn(n)}`;
|
|
554
777
|
this.root.style.setProperty(o, r);
|
|
555
778
|
}
|
|
556
779
|
}
|
|
557
780
|
}
|
|
558
781
|
}
|
|
559
|
-
function
|
|
782
|
+
function hn(e) {
|
|
560
783
|
return e.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
561
784
|
}
|
|
562
|
-
function
|
|
785
|
+
function Ce(e) {
|
|
563
786
|
return typeof e == "object" && e !== null && typeof e.type == "string";
|
|
564
787
|
}
|
|
565
|
-
function
|
|
788
|
+
function mn(e) {
|
|
566
789
|
const t = [];
|
|
567
790
|
let n = 0, r = !1, o = !1, i = 0;
|
|
568
791
|
for (let s = 0; s < e.length; s++) {
|
|
@@ -583,21 +806,22 @@ function nn(e) {
|
|
|
583
806
|
}
|
|
584
807
|
return t.length > 0 ? t : [e];
|
|
585
808
|
}
|
|
586
|
-
function
|
|
809
|
+
function Ne(e, t) {
|
|
587
810
|
const n = e.trim();
|
|
588
811
|
if (!n || n.startsWith(":")) return !1;
|
|
589
812
|
const r = n.startsWith("data: ") ? n.slice(6) : n;
|
|
590
|
-
if (r === "[DONE]")
|
|
813
|
+
if (r === "[DONE]")
|
|
814
|
+
return t.onDone?.(), !0;
|
|
591
815
|
try {
|
|
592
816
|
const o = JSON.parse(r);
|
|
593
|
-
return
|
|
817
|
+
return Ce(o) ? (me("stream", `event: ${o.type}`, o), t.onEvent(o), o.type === "done" ? (t.onDone?.(), !0) : !1) : !1;
|
|
594
818
|
} catch {
|
|
595
|
-
const o =
|
|
819
|
+
const o = mn(r);
|
|
596
820
|
if (o.length > 1) {
|
|
597
821
|
for (const i of o)
|
|
598
822
|
try {
|
|
599
823
|
const s = JSON.parse(i);
|
|
600
|
-
if (!
|
|
824
|
+
if (!Ce(s)) continue;
|
|
601
825
|
if (t.onEvent(s), s.type === "done")
|
|
602
826
|
return t.onDone?.(), !0;
|
|
603
827
|
} catch {
|
|
@@ -607,7 +831,7 @@ function Oe(e, t) {
|
|
|
607
831
|
return !1;
|
|
608
832
|
}
|
|
609
833
|
}
|
|
610
|
-
async function
|
|
834
|
+
async function _n(e, t) {
|
|
611
835
|
if (!e.ok) {
|
|
612
836
|
t.onError?.(new Error(`HTTP ${e.status}: ${e.statusText}`));
|
|
613
837
|
return;
|
|
@@ -641,9 +865,9 @@ async function rn(e, t) {
|
|
|
641
865
|
`);
|
|
642
866
|
o = g.pop() ?? "";
|
|
643
867
|
for (const y of g)
|
|
644
|
-
if (
|
|
868
|
+
if (Ne(y, t)) return;
|
|
645
869
|
}
|
|
646
|
-
if (o.trim() &&
|
|
870
|
+
if (o.trim() && Ne(o, t))
|
|
647
871
|
return;
|
|
648
872
|
} catch (c) {
|
|
649
873
|
if (c instanceof DOMException && c.name === "AbortError") return;
|
|
@@ -653,8 +877,8 @@ async function rn(e, t) {
|
|
|
653
877
|
}
|
|
654
878
|
t.onDone?.();
|
|
655
879
|
}
|
|
656
|
-
function
|
|
657
|
-
const r = new AbortController(), o = n.signal ?
|
|
880
|
+
function bc(e, t, n) {
|
|
881
|
+
const r = new AbortController(), o = n.signal ? yn([n.signal, r.signal]) : r.signal;
|
|
658
882
|
return fetch(e, {
|
|
659
883
|
method: "POST",
|
|
660
884
|
headers: {
|
|
@@ -663,11 +887,11 @@ function sc(e, t, n) {
|
|
|
663
887
|
},
|
|
664
888
|
body: JSON.stringify(t),
|
|
665
889
|
signal: o
|
|
666
|
-
}).then((i) =>
|
|
890
|
+
}).then((i) => _n(i, { ...n, signal: o })).catch((i) => {
|
|
667
891
|
i instanceof DOMException && i.name === "AbortError" || n.onError?.(i instanceof Error ? i : new Error(String(i)));
|
|
668
892
|
}), r;
|
|
669
893
|
}
|
|
670
|
-
function
|
|
894
|
+
function yn(e) {
|
|
671
895
|
const t = new AbortController(), n = [];
|
|
672
896
|
for (const r of e) {
|
|
673
897
|
if (r.aborted)
|
|
@@ -683,84 +907,84 @@ function on(e) {
|
|
|
683
907
|
{ once: !0 }
|
|
684
908
|
), t.signal;
|
|
685
909
|
}
|
|
686
|
-
function
|
|
910
|
+
function kc(e) {
|
|
687
911
|
if (typeof e.type != "string") return null;
|
|
688
|
-
if (
|
|
912
|
+
if (vn(e))
|
|
689
913
|
return e;
|
|
690
914
|
const n = e;
|
|
691
915
|
switch (n.type) {
|
|
692
916
|
case "outputText":
|
|
693
|
-
return
|
|
917
|
+
return wn(n);
|
|
694
918
|
case "suggestedActions":
|
|
695
|
-
return
|
|
919
|
+
return bn(n);
|
|
696
920
|
case "productList":
|
|
697
|
-
return
|
|
921
|
+
return kn(n);
|
|
698
922
|
case "productDetails":
|
|
699
|
-
return
|
|
923
|
+
return zn(n);
|
|
700
924
|
case "productDetailsSimilars":
|
|
701
|
-
return
|
|
925
|
+
return Sn(n);
|
|
702
926
|
case "comparisonTable":
|
|
703
|
-
return
|
|
927
|
+
return $n(n);
|
|
704
928
|
case "context":
|
|
705
|
-
return
|
|
929
|
+
return In(n);
|
|
706
930
|
case "chatStreamEnd":
|
|
707
|
-
return
|
|
931
|
+
return On();
|
|
708
932
|
case "loading":
|
|
709
|
-
return
|
|
933
|
+
return An(n);
|
|
710
934
|
case "panelLoading":
|
|
711
|
-
return
|
|
935
|
+
return Pn(n);
|
|
712
936
|
case "similarLoading":
|
|
713
|
-
return
|
|
937
|
+
return Cn(n);
|
|
714
938
|
case "redirect":
|
|
715
|
-
return
|
|
939
|
+
return Nn(n);
|
|
716
940
|
case "error":
|
|
717
|
-
return
|
|
941
|
+
return Rn(n);
|
|
718
942
|
case "dummy":
|
|
719
|
-
return
|
|
943
|
+
return Dn();
|
|
720
944
|
case "launcherAction":
|
|
721
|
-
return
|
|
945
|
+
return jn(n);
|
|
722
946
|
case "text":
|
|
723
|
-
return
|
|
947
|
+
return be(n);
|
|
724
948
|
case "productItem":
|
|
725
|
-
return
|
|
949
|
+
return Ln(n);
|
|
726
950
|
case "text_image":
|
|
727
|
-
return
|
|
951
|
+
return at(n);
|
|
728
952
|
case "quick_qna":
|
|
729
|
-
return
|
|
953
|
+
return ct(n);
|
|
730
954
|
case "reviewHighlights":
|
|
731
|
-
return
|
|
955
|
+
return Un(n);
|
|
732
956
|
case "aiProductSuggestions":
|
|
733
|
-
return
|
|
957
|
+
return Fn(n);
|
|
734
958
|
case "aiProductGroupings":
|
|
735
|
-
return
|
|
959
|
+
return Jn(n);
|
|
736
960
|
case "aiSuggestedSearches":
|
|
737
|
-
return
|
|
961
|
+
return qn(n);
|
|
738
962
|
case "prosAndCons":
|
|
739
|
-
return
|
|
963
|
+
return Mn(n);
|
|
740
964
|
case "getGroundingReview":
|
|
741
|
-
return
|
|
965
|
+
return Vn(n);
|
|
742
966
|
case "voice":
|
|
743
|
-
return
|
|
967
|
+
return Gn(n);
|
|
744
968
|
case "visitorDataResponse":
|
|
745
|
-
return
|
|
969
|
+
return xn(n);
|
|
746
970
|
case "productListPreview":
|
|
747
|
-
return
|
|
971
|
+
return Wn();
|
|
748
972
|
case "groupList":
|
|
749
|
-
return
|
|
973
|
+
return Bn(n);
|
|
750
974
|
case "formGetInfo":
|
|
751
975
|
case "formTestDrive":
|
|
752
976
|
case "formServiceRequest":
|
|
753
977
|
case "launchFormPage":
|
|
754
|
-
return
|
|
978
|
+
return Hn(n);
|
|
755
979
|
case "launcherContent":
|
|
756
|
-
return
|
|
980
|
+
return Yn(n);
|
|
757
981
|
case "handoff":
|
|
758
|
-
return
|
|
982
|
+
return Kn(n);
|
|
759
983
|
default:
|
|
760
984
|
return null;
|
|
761
985
|
}
|
|
762
986
|
}
|
|
763
|
-
function
|
|
987
|
+
function vn(e) {
|
|
764
988
|
const t = e.type;
|
|
765
989
|
if (typeof t != "string") return !1;
|
|
766
990
|
switch (t) {
|
|
@@ -771,11 +995,11 @@ function sn(e) {
|
|
|
771
995
|
case "ui_spec": {
|
|
772
996
|
const n = e.widget;
|
|
773
997
|
if (n !== "chat" && n !== "qna" && n !== "simrel") return !1;
|
|
774
|
-
const r =
|
|
775
|
-
return r ? typeof r.root == "string" &&
|
|
998
|
+
const r = D(e.spec);
|
|
999
|
+
return r ? typeof r.root == "string" && D(r.elements) !== null : !1;
|
|
776
1000
|
}
|
|
777
1001
|
case "action": {
|
|
778
|
-
const n =
|
|
1002
|
+
const n = D(e.action);
|
|
779
1003
|
return n !== null && typeof n.kind == "string";
|
|
780
1004
|
}
|
|
781
1005
|
case "error":
|
|
@@ -786,7 +1010,7 @@ function sn(e) {
|
|
|
786
1010
|
return !1;
|
|
787
1011
|
}
|
|
788
1012
|
}
|
|
789
|
-
function
|
|
1013
|
+
function wn(e) {
|
|
790
1014
|
const t = w(e.payload.text, e.payload.plain_text) ?? "", n = w(e.payload.plain_text, e.payload.text) ?? t;
|
|
791
1015
|
if (e.payload.is_error)
|
|
792
1016
|
return {
|
|
@@ -807,7 +1031,7 @@ function an(e) {
|
|
|
807
1031
|
const s = e.payload.conversation_mode;
|
|
808
1032
|
return typeof s == "string" && s && (r.conversationMode = s), r;
|
|
809
1033
|
}
|
|
810
|
-
function
|
|
1034
|
+
function bn(e) {
|
|
811
1035
|
const t = (e.payload.actions ?? []).map((n) => {
|
|
812
1036
|
const r = w(n.title) ?? "", o = R(n.requestDetails, r), i = o ? {
|
|
813
1037
|
label: r,
|
|
@@ -815,15 +1039,15 @@ function cn(e) {
|
|
|
815
1039
|
} : null;
|
|
816
1040
|
return i ? (typeof n.icon == "string" && (i.icon = n.icon), typeof n.image == "string" && (i.image = n.image), i) : null;
|
|
817
1041
|
});
|
|
818
|
-
return
|
|
1042
|
+
return ut(t.filter(lt), "chat");
|
|
819
1043
|
}
|
|
820
|
-
function
|
|
821
|
-
const t =
|
|
1044
|
+
function kn(e) {
|
|
1045
|
+
const t = dt(e.payload.product_list ?? [], "chat");
|
|
822
1046
|
t.panelHint = "panel";
|
|
823
1047
|
const n = t.spec.elements[t.spec.root];
|
|
824
1048
|
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;
|
|
825
1049
|
}
|
|
826
|
-
function
|
|
1050
|
+
function zn(e) {
|
|
827
1051
|
const t = e.payload.productDetails;
|
|
828
1052
|
return t ? {
|
|
829
1053
|
type: "ui_spec",
|
|
@@ -838,13 +1062,13 @@ function dn(e) {
|
|
|
838
1062
|
}
|
|
839
1063
|
},
|
|
840
1064
|
panelHint: "panel"
|
|
841
|
-
} :
|
|
1065
|
+
} : Xn("chat");
|
|
842
1066
|
}
|
|
843
|
-
function
|
|
844
|
-
const t =
|
|
1067
|
+
function Sn(e) {
|
|
1068
|
+
const t = dt(e.payload.similarProducts ?? [], "chat"), n = t.spec.elements[t.spec.root];
|
|
845
1069
|
return n && (n.props = { ...n.props, similarsAppend: !0 }), { ...t, panelHint: "panel" };
|
|
846
1070
|
}
|
|
847
|
-
function
|
|
1071
|
+
function $n(e) {
|
|
848
1072
|
const t = e.payload.multiple_product_details ?? [], n = e.payload, r = {
|
|
849
1073
|
key_differences: n.key_differences,
|
|
850
1074
|
recommended_choice: n.recommended_choice,
|
|
@@ -861,14 +1085,14 @@ function fn(e) {
|
|
|
861
1085
|
const k = M(m);
|
|
862
1086
|
s.push(k);
|
|
863
1087
|
}
|
|
864
|
-
const a =
|
|
1088
|
+
const a = En(o, s, r, i);
|
|
865
1089
|
let c;
|
|
866
1090
|
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);
|
|
867
1091
|
const u = c ? s.find((m) => m.sku === c) ?? s[0] : s[0], l = [];
|
|
868
1092
|
if (Array.isArray(r?.key_differences))
|
|
869
1093
|
for (const m of r.key_differences)
|
|
870
1094
|
typeof m == "string" && l.push(m);
|
|
871
|
-
const f =
|
|
1095
|
+
const f = rr(r?.special_considerations), p = r?.recommended_choice, g = r?.winner_hits, y = {};
|
|
872
1096
|
for (const m of s) {
|
|
873
1097
|
const k = m.sku;
|
|
874
1098
|
k && (y[k] = {
|
|
@@ -898,7 +1122,7 @@ function fn(e) {
|
|
|
898
1122
|
panelHint: "panel"
|
|
899
1123
|
};
|
|
900
1124
|
}
|
|
901
|
-
function
|
|
1125
|
+
function En(e, t, n, r) {
|
|
902
1126
|
if (!e) return [];
|
|
903
1127
|
const o = Object.entries(e);
|
|
904
1128
|
if (o.length === 0) return [];
|
|
@@ -913,7 +1137,7 @@ function pn(e, t, n, r) {
|
|
|
913
1137
|
}
|
|
914
1138
|
return y;
|
|
915
1139
|
}
|
|
916
|
-
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 :
|
|
1140
|
+
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 : Tn(s)).filter(
|
|
917
1141
|
(p) => p !== "name" && p !== "name_short" && !p.endsWith("_short")
|
|
918
1142
|
), f = [];
|
|
919
1143
|
for (const p of l) {
|
|
@@ -921,7 +1145,7 @@ function pn(e, t, n, r) {
|
|
|
921
1145
|
const m = s[_];
|
|
922
1146
|
if (!m || typeof m != "object") return "";
|
|
923
1147
|
const k = m[`${p}_short`], I = m[p];
|
|
924
|
-
return
|
|
1148
|
+
return Zn(k ?? I);
|
|
925
1149
|
});
|
|
926
1150
|
if (g.every((_) => _.length === 0)) continue;
|
|
927
1151
|
const y = c[p] ?? p;
|
|
@@ -929,7 +1153,7 @@ function pn(e, t, n, r) {
|
|
|
929
1153
|
}
|
|
930
1154
|
return f;
|
|
931
1155
|
}
|
|
932
|
-
function
|
|
1156
|
+
function Tn(e) {
|
|
933
1157
|
const t = [], n = /* @__PURE__ */ new Set();
|
|
934
1158
|
for (const r of Object.values(e))
|
|
935
1159
|
if (!(!r || typeof r != "object"))
|
|
@@ -937,10 +1161,10 @@ function gn(e) {
|
|
|
937
1161
|
n.has(o) || (n.add(o), t.push(o));
|
|
938
1162
|
return t;
|
|
939
1163
|
}
|
|
940
|
-
function
|
|
1164
|
+
function Zn(e) {
|
|
941
1165
|
return typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" ? String(e) : "";
|
|
942
1166
|
}
|
|
943
|
-
function
|
|
1167
|
+
function In(e) {
|
|
944
1168
|
return {
|
|
945
1169
|
type: "metadata",
|
|
946
1170
|
sessionId: "",
|
|
@@ -952,10 +1176,10 @@ function mn(e) {
|
|
|
952
1176
|
}
|
|
953
1177
|
};
|
|
954
1178
|
}
|
|
955
|
-
function
|
|
1179
|
+
function On() {
|
|
956
1180
|
return { type: "done" };
|
|
957
1181
|
}
|
|
958
|
-
function
|
|
1182
|
+
function An(e) {
|
|
959
1183
|
return {
|
|
960
1184
|
type: "metadata",
|
|
961
1185
|
sessionId: "",
|
|
@@ -968,7 +1192,7 @@ function yn(e) {
|
|
|
968
1192
|
}
|
|
969
1193
|
};
|
|
970
1194
|
}
|
|
971
|
-
function
|
|
1195
|
+
function Pn(e) {
|
|
972
1196
|
return {
|
|
973
1197
|
type: "metadata",
|
|
974
1198
|
sessionId: "",
|
|
@@ -981,7 +1205,7 @@ function vn(e) {
|
|
|
981
1205
|
}
|
|
982
1206
|
};
|
|
983
1207
|
}
|
|
984
|
-
function
|
|
1208
|
+
function Cn(e) {
|
|
985
1209
|
return {
|
|
986
1210
|
type: "metadata",
|
|
987
1211
|
sessionId: "",
|
|
@@ -994,7 +1218,7 @@ function wn(e) {
|
|
|
994
1218
|
}
|
|
995
1219
|
};
|
|
996
1220
|
}
|
|
997
|
-
function
|
|
1221
|
+
function Nn(e) {
|
|
998
1222
|
const t = w(e.payload.url);
|
|
999
1223
|
return t ? {
|
|
1000
1224
|
type: "action",
|
|
@@ -1013,14 +1237,14 @@ function bn(e) {
|
|
|
1013
1237
|
}
|
|
1014
1238
|
};
|
|
1015
1239
|
}
|
|
1016
|
-
function
|
|
1240
|
+
function Rn(e) {
|
|
1017
1241
|
return {
|
|
1018
1242
|
type: "error",
|
|
1019
1243
|
code: "BACKEND_ERROR",
|
|
1020
1244
|
message: w(e.payload?.text, e.payload?.message, e.payload?.error) ?? "Backend returned an error"
|
|
1021
1245
|
};
|
|
1022
1246
|
}
|
|
1023
|
-
function
|
|
1247
|
+
function Dn(e) {
|
|
1024
1248
|
return {
|
|
1025
1249
|
type: "metadata",
|
|
1026
1250
|
sessionId: "",
|
|
@@ -1030,29 +1254,29 @@ function zn(e) {
|
|
|
1030
1254
|
}
|
|
1031
1255
|
};
|
|
1032
1256
|
}
|
|
1033
|
-
function
|
|
1257
|
+
function jn(e) {
|
|
1034
1258
|
const t = e.payload ?? {};
|
|
1035
1259
|
if (Array.isArray(t.action_list)) {
|
|
1036
1260
|
const i = {
|
|
1037
1261
|
action_list: t.action_list
|
|
1038
1262
|
}, s = typeof t.type == "string" ? t.type : void 0, a = typeof t.theme == "string" ? t.theme : void 0;
|
|
1039
|
-
return s !== void 0 && (i.type = s), a !== void 0 && (i.theme = a),
|
|
1263
|
+
return s !== void 0 && (i.type = s), a !== void 0 && (i.theme = a), ct({
|
|
1040
1264
|
payload: i
|
|
1041
1265
|
});
|
|
1042
1266
|
}
|
|
1043
|
-
const r =
|
|
1267
|
+
const r = D(t.action);
|
|
1044
1268
|
if (r) {
|
|
1045
1269
|
const i = {
|
|
1046
1270
|
action: r
|
|
1047
1271
|
}, 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;
|
|
1048
|
-
return s !== void 0 && (i.text = s), a !== void 0 && (i.image_url = a), c !== void 0 && (i.theme = c),
|
|
1272
|
+
return s !== void 0 && (i.text = s), a !== void 0 && (i.image_url = a), c !== void 0 && (i.theme = c), at({
|
|
1049
1273
|
payload: i
|
|
1050
1274
|
});
|
|
1051
1275
|
}
|
|
1052
1276
|
const o = typeof t.text == "string" ? t.text : "";
|
|
1053
1277
|
if (o) {
|
|
1054
|
-
const i = { text: o }, s = typeof t.type == "string" ? t.type : void 0, a = typeof t.theme == "string" ? t.theme : void 0, c =
|
|
1055
|
-
return s !== void 0 && (i.type = s), c !== void 0 && (i.payload = c), a !== void 0 && (i.theme = a),
|
|
1278
|
+
const i = { text: o }, s = typeof t.type == "string" ? t.type : void 0, a = typeof t.theme == "string" ? t.theme : void 0, c = D(t.payload) ?? void 0;
|
|
1279
|
+
return s !== void 0 && (i.type = s), c !== void 0 && (i.payload = c), a !== void 0 && (i.theme = a), be({
|
|
1056
1280
|
payload: i
|
|
1057
1281
|
});
|
|
1058
1282
|
}
|
|
@@ -1065,7 +1289,7 @@ function $n(e) {
|
|
|
1065
1289
|
}
|
|
1066
1290
|
};
|
|
1067
1291
|
}
|
|
1068
|
-
function
|
|
1292
|
+
function be(e) {
|
|
1069
1293
|
const t = {
|
|
1070
1294
|
text: w(e.payload.text) ?? ""
|
|
1071
1295
|
};
|
|
@@ -1083,10 +1307,10 @@ function ye(e) {
|
|
|
1083
1307
|
}
|
|
1084
1308
|
};
|
|
1085
1309
|
}
|
|
1086
|
-
function
|
|
1087
|
-
return
|
|
1310
|
+
function Ln(e) {
|
|
1311
|
+
return Qn(e.payload, "qna");
|
|
1088
1312
|
}
|
|
1089
|
-
function
|
|
1313
|
+
function at(e) {
|
|
1090
1314
|
const t = w(e.payload.text) ?? "", n = R(e.payload.action, t);
|
|
1091
1315
|
if (n) {
|
|
1092
1316
|
const o = {
|
|
@@ -1110,11 +1334,11 @@ function tt(e) {
|
|
|
1110
1334
|
const r = {
|
|
1111
1335
|
text: t
|
|
1112
1336
|
};
|
|
1113
|
-
return typeof e.payload.theme == "string" && (r.theme = e.payload.theme),
|
|
1337
|
+
return typeof e.payload.theme == "string" && (r.theme = e.payload.theme), be({
|
|
1114
1338
|
payload: r
|
|
1115
1339
|
});
|
|
1116
1340
|
}
|
|
1117
|
-
function
|
|
1341
|
+
function ct(e) {
|
|
1118
1342
|
const t = (e.payload.action_list ?? []).map((n) => {
|
|
1119
1343
|
const r = w(n.title) ?? "", o = R(n.requestDetails, r), i = o ? {
|
|
1120
1344
|
label: r,
|
|
@@ -1122,9 +1346,9 @@ function nt(e) {
|
|
|
1122
1346
|
} : null;
|
|
1123
1347
|
return i ? (typeof n.icon == "string" && (i.icon = n.icon), typeof n.image == "string" && (i.image = n.image), i) : null;
|
|
1124
1348
|
});
|
|
1125
|
-
return
|
|
1349
|
+
return ut(t.filter(lt), "qna");
|
|
1126
1350
|
}
|
|
1127
|
-
function
|
|
1351
|
+
function Un(e) {
|
|
1128
1352
|
const n = { reviews: (e.payload.reviews ?? []).map((r) => {
|
|
1129
1353
|
const o = {};
|
|
1130
1354
|
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;
|
|
@@ -1143,7 +1367,7 @@ function En(e) {
|
|
|
1143
1367
|
}
|
|
1144
1368
|
};
|
|
1145
1369
|
}
|
|
1146
|
-
function
|
|
1370
|
+
function Mn(e) {
|
|
1147
1371
|
const t = {};
|
|
1148
1372
|
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), {
|
|
1149
1373
|
type: "ui_spec",
|
|
@@ -1159,7 +1383,7 @@ function Zn(e) {
|
|
|
1159
1383
|
}
|
|
1160
1384
|
};
|
|
1161
1385
|
}
|
|
1162
|
-
function
|
|
1386
|
+
function xn(e) {
|
|
1163
1387
|
return {
|
|
1164
1388
|
type: "metadata",
|
|
1165
1389
|
sessionId: "",
|
|
@@ -1169,12 +1393,12 @@ function Tn(e) {
|
|
|
1169
1393
|
}
|
|
1170
1394
|
};
|
|
1171
1395
|
}
|
|
1172
|
-
function
|
|
1396
|
+
function Fn(e) {
|
|
1173
1397
|
const t = e.payload.product_suggestions ?? [], n = [];
|
|
1174
1398
|
for (let r = 0; r < t.length; r++) {
|
|
1175
1399
|
const o = t[r];
|
|
1176
1400
|
if (!o) continue;
|
|
1177
|
-
const i =
|
|
1401
|
+
const i = er(o);
|
|
1178
1402
|
if (!i) continue;
|
|
1179
1403
|
const s = { product: i }, a = R(o.requestDetails, i.name);
|
|
1180
1404
|
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);
|
|
@@ -1200,7 +1424,7 @@ function In(e) {
|
|
|
1200
1424
|
}
|
|
1201
1425
|
};
|
|
1202
1426
|
}
|
|
1203
|
-
function
|
|
1427
|
+
function Jn(e) {
|
|
1204
1428
|
const t = e.payload.product_groupings ?? [], n = [];
|
|
1205
1429
|
for (let r = 0; r < t.length; r++) {
|
|
1206
1430
|
const o = t[r];
|
|
@@ -1235,14 +1459,14 @@ function On(e) {
|
|
|
1235
1459
|
}
|
|
1236
1460
|
};
|
|
1237
1461
|
}
|
|
1238
|
-
function
|
|
1462
|
+
function qn(e) {
|
|
1239
1463
|
const t = e.payload.suggested_searches ?? [], n = [];
|
|
1240
1464
|
for (let r = 0; r < t.length; r++) {
|
|
1241
1465
|
const o = t[r];
|
|
1242
1466
|
if (!o) continue;
|
|
1243
|
-
const i = w(o.short_name, o.chosen_attribute, o.detailed_user_message) ?? `
|
|
1467
|
+
const i = w(o.short_name, o.chosen_attribute, o.detailed_user_message) ?? `Search ${r + 1}`, s = {}, a = w(o.detailed_user_message);
|
|
1244
1468
|
a && (s.text = a);
|
|
1245
|
-
const c =
|
|
1469
|
+
const c = D(o.requestDetails), u = D(c?.payload), l = u?.group_skus;
|
|
1246
1470
|
o.group_skus && Array.isArray(o.group_skus) ? s.group_skus = o.group_skus : Array.isArray(l) && (s.group_skus = l.filter((I) => typeof I == "string"));
|
|
1247
1471
|
const f = w(o.sku, o.representative_product_sku, u?.sku);
|
|
1248
1472
|
f && (s.sku = f), s.is_suggested_text = 1;
|
|
@@ -1274,7 +1498,7 @@ function Pn(e) {
|
|
|
1274
1498
|
}
|
|
1275
1499
|
};
|
|
1276
1500
|
}
|
|
1277
|
-
function
|
|
1501
|
+
function Vn(e) {
|
|
1278
1502
|
const t = R(
|
|
1279
1503
|
e.payload.requestDetails,
|
|
1280
1504
|
w(e.payload.review_count, e.payload.text, e.payload.title) ?? "Urun yorumlarini goster"
|
|
@@ -1303,7 +1527,7 @@ function An(e) {
|
|
|
1303
1527
|
}
|
|
1304
1528
|
};
|
|
1305
1529
|
}
|
|
1306
|
-
function
|
|
1530
|
+
function Wn() {
|
|
1307
1531
|
return {
|
|
1308
1532
|
type: "metadata",
|
|
1309
1533
|
sessionId: "",
|
|
@@ -1313,7 +1537,7 @@ function Nn() {
|
|
|
1313
1537
|
}
|
|
1314
1538
|
};
|
|
1315
1539
|
}
|
|
1316
|
-
function
|
|
1540
|
+
function Gn(e) {
|
|
1317
1541
|
return {
|
|
1318
1542
|
type: "metadata",
|
|
1319
1543
|
sessionId: "",
|
|
@@ -1323,7 +1547,7 @@ function Cn(e) {
|
|
|
1323
1547
|
}
|
|
1324
1548
|
};
|
|
1325
1549
|
}
|
|
1326
|
-
function
|
|
1550
|
+
function Bn(e) {
|
|
1327
1551
|
const t = e.payload.group_list ?? [], n = [];
|
|
1328
1552
|
for (const o of t) {
|
|
1329
1553
|
const i = o.group_name ?? "", s = (o.product_list ?? []).map(M);
|
|
@@ -1351,7 +1575,7 @@ function Rn(e) {
|
|
|
1351
1575
|
panelHint: "panel"
|
|
1352
1576
|
};
|
|
1353
1577
|
}
|
|
1354
|
-
function
|
|
1578
|
+
function Hn(e) {
|
|
1355
1579
|
return {
|
|
1356
1580
|
type: "metadata",
|
|
1357
1581
|
sessionId: "",
|
|
@@ -1362,7 +1586,7 @@ function jn(e) {
|
|
|
1362
1586
|
}
|
|
1363
1587
|
};
|
|
1364
1588
|
}
|
|
1365
|
-
function
|
|
1589
|
+
function Kn(e) {
|
|
1366
1590
|
const t = {};
|
|
1367
1591
|
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), {
|
|
1368
1592
|
type: "ui_spec",
|
|
@@ -1378,7 +1602,7 @@ function Dn(e) {
|
|
|
1378
1602
|
}
|
|
1379
1603
|
};
|
|
1380
1604
|
}
|
|
1381
|
-
function
|
|
1605
|
+
function Yn(e) {
|
|
1382
1606
|
return {
|
|
1383
1607
|
type: "metadata",
|
|
1384
1608
|
sessionId: "",
|
|
@@ -1388,7 +1612,7 @@ function Ln(e) {
|
|
|
1388
1612
|
}
|
|
1389
1613
|
};
|
|
1390
1614
|
}
|
|
1391
|
-
function
|
|
1615
|
+
function ut(e, t) {
|
|
1392
1616
|
const n = {}, r = [];
|
|
1393
1617
|
for (let o = 0; o < e.length; o++) {
|
|
1394
1618
|
const i = e[o];
|
|
@@ -1422,7 +1646,7 @@ function rt(e, t) {
|
|
|
1422
1646
|
spec: { root: "root", elements: n }
|
|
1423
1647
|
};
|
|
1424
1648
|
}
|
|
1425
|
-
function
|
|
1649
|
+
function dt(e, t) {
|
|
1426
1650
|
const n = {}, r = [];
|
|
1427
1651
|
for (let o = 0; o < e.length; o++) {
|
|
1428
1652
|
const i = e[o];
|
|
@@ -1443,7 +1667,7 @@ function ot(e, t) {
|
|
|
1443
1667
|
spec: { root: "root", elements: n }
|
|
1444
1668
|
};
|
|
1445
1669
|
}
|
|
1446
|
-
function
|
|
1670
|
+
function Qn(e, t) {
|
|
1447
1671
|
return {
|
|
1448
1672
|
type: "ui_spec",
|
|
1449
1673
|
widget: t,
|
|
@@ -1458,7 +1682,7 @@ function Un(e, t) {
|
|
|
1458
1682
|
}
|
|
1459
1683
|
};
|
|
1460
1684
|
}
|
|
1461
|
-
function
|
|
1685
|
+
function Xn(e) {
|
|
1462
1686
|
return {
|
|
1463
1687
|
type: "ui_spec",
|
|
1464
1688
|
widget: e,
|
|
@@ -1474,11 +1698,11 @@ function Mn(e) {
|
|
|
1474
1698
|
}
|
|
1475
1699
|
};
|
|
1476
1700
|
}
|
|
1477
|
-
function
|
|
1478
|
-
const t = w(e.sku), n = w(e.short_name), r =
|
|
1479
|
-
return
|
|
1701
|
+
function er(e) {
|
|
1702
|
+
const t = w(e.sku), n = w(e.short_name), r = D(e.product_item) ?? e;
|
|
1703
|
+
return tr(r, t, n);
|
|
1480
1704
|
}
|
|
1481
|
-
function
|
|
1705
|
+
function tr(e, t, n) {
|
|
1482
1706
|
const r = w(e.sku, t), o = w(e.name, n);
|
|
1483
1707
|
if (!r || !o) return null;
|
|
1484
1708
|
const i = {
|
|
@@ -1488,26 +1712,26 @@ function xn(e, t, n) {
|
|
|
1488
1712
|
s && (i.brand = s);
|
|
1489
1713
|
const a = w(e.url);
|
|
1490
1714
|
a && (i.url = a);
|
|
1491
|
-
const c =
|
|
1715
|
+
const c = nr(e.images);
|
|
1492
1716
|
if (c.length > 0)
|
|
1493
1717
|
i.images = c;
|
|
1494
1718
|
else {
|
|
1495
1719
|
const y = w(e.image, e.image_url, e.imageUrl);
|
|
1496
1720
|
y && (i.images = [y]);
|
|
1497
1721
|
}
|
|
1498
|
-
const u =
|
|
1722
|
+
const u = Q(e.price_discounted);
|
|
1499
1723
|
u !== void 0 && (i.price_discounted = u);
|
|
1500
|
-
const l =
|
|
1724
|
+
const l = Q(e.price);
|
|
1501
1725
|
l !== void 0 && (i.price = l);
|
|
1502
|
-
const f =
|
|
1726
|
+
const f = Q(e.rating);
|
|
1503
1727
|
f !== void 0 && (i.rating = f);
|
|
1504
|
-
const p =
|
|
1728
|
+
const p = Q(e.review_count) ?? Q(e.reviewCount);
|
|
1505
1729
|
p !== void 0 && (i.review_count = p);
|
|
1506
1730
|
const g = w(e.cart_code, e.cartCode);
|
|
1507
1731
|
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);
|
|
1508
1732
|
}
|
|
1509
1733
|
function R(e, t) {
|
|
1510
|
-
const n =
|
|
1734
|
+
const n = D(e);
|
|
1511
1735
|
if (!n) return null;
|
|
1512
1736
|
const r = n.type;
|
|
1513
1737
|
if (typeof r != "string" || r.length === 0) return null;
|
|
@@ -1517,7 +1741,7 @@ function R(e, t) {
|
|
|
1517
1741
|
};
|
|
1518
1742
|
return n.payload !== void 0 && (o.payload = n.payload), o;
|
|
1519
1743
|
}
|
|
1520
|
-
function
|
|
1744
|
+
function D(e) {
|
|
1521
1745
|
return !e || typeof e != "object" || Array.isArray(e) ? null : e;
|
|
1522
1746
|
}
|
|
1523
1747
|
function w(...e) {
|
|
@@ -1527,17 +1751,17 @@ function w(...e) {
|
|
|
1527
1751
|
if (n.length > 0) return n;
|
|
1528
1752
|
}
|
|
1529
1753
|
}
|
|
1530
|
-
function
|
|
1754
|
+
function nr(e) {
|
|
1531
1755
|
return Array.isArray(e) ? e.filter((t) => typeof t == "string" && t.length > 0) : [];
|
|
1532
1756
|
}
|
|
1533
|
-
function
|
|
1757
|
+
function rr(e) {
|
|
1534
1758
|
if (typeof e == "string") {
|
|
1535
1759
|
const t = e.trim();
|
|
1536
1760
|
return t ? [t] : [];
|
|
1537
1761
|
}
|
|
1538
1762
|
return Array.isArray(e) ? e.filter((t) => typeof t == "string").map((t) => t.trim()).filter((t) => t.length > 0) : [];
|
|
1539
1763
|
}
|
|
1540
|
-
function
|
|
1764
|
+
function Q(e) {
|
|
1541
1765
|
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
1542
1766
|
if (typeof e == "string") {
|
|
1543
1767
|
let t;
|
|
@@ -1546,7 +1770,7 @@ function Y(e) {
|
|
|
1546
1770
|
if (Number.isFinite(n)) return n;
|
|
1547
1771
|
}
|
|
1548
1772
|
}
|
|
1549
|
-
function
|
|
1773
|
+
function lt(e) {
|
|
1550
1774
|
return e != null;
|
|
1551
1775
|
}
|
|
1552
1776
|
function M(e) {
|
|
@@ -1560,10 +1784,10 @@ function M(e) {
|
|
|
1560
1784
|
}, c = e.images?.[0];
|
|
1561
1785
|
return c && (a.imageUrl = c), e.images && e.images.length > 1 && (a.images = e.images), t != null && (a.price = String(t)), n != null && (a.originalPrice = String(n)), r !== void 0 && (a.discountPercent = r), o !== void 0 && (a.brand = o), e.rating !== void 0 && (a.rating = e.rating), e.review_count !== void 0 && (a.reviewCount = e.review_count), e.cart_code !== void 0 && (a.cartCode = e.cart_code), e.in_stock !== void 0 && (a.inStock = e.in_stock), e.variants && e.variants.length > 0 && (a.variants = e.variants), e.discount_reason !== void 0 && (a.discountReason = e.discount_reason), e.promotions && e.promotions.length > 0 && (a.promotions = e.promotions), a;
|
|
1562
1786
|
}
|
|
1563
|
-
function
|
|
1787
|
+
function zc(e) {
|
|
1564
1788
|
return e.results.map(M);
|
|
1565
1789
|
}
|
|
1566
|
-
function
|
|
1790
|
+
function Sc(e) {
|
|
1567
1791
|
return e.product_groupings.map((t) => {
|
|
1568
1792
|
const n = {
|
|
1569
1793
|
name: t.name,
|
|
@@ -1572,139 +1796,129 @@ function uc(e) {
|
|
|
1572
1796
|
return t.highlight !== void 0 && (n.highlight = t.highlight), n;
|
|
1573
1797
|
});
|
|
1574
1798
|
}
|
|
1575
|
-
const
|
|
1799
|
+
const or = {
|
|
1576
1800
|
process_action: "/process_action",
|
|
1577
1801
|
launcher_action: "/launcher_action",
|
|
1578
1802
|
similar_products: "/similar_products",
|
|
1579
|
-
product_groupings: "/product_groupings"
|
|
1580
|
-
proactive_action: "/proactive_action"
|
|
1581
|
-
}, Gn = {
|
|
1582
|
-
process_action: "/message",
|
|
1583
|
-
launcher_action: "/message"
|
|
1803
|
+
product_groupings: "/product_groupings"
|
|
1584
1804
|
};
|
|
1585
|
-
function
|
|
1805
|
+
function ir(e) {
|
|
1586
1806
|
if (e === void 0)
|
|
1587
1807
|
throw new Error("[gengage] middlewareUrl is required. Pass your Gengage backend URL in widget config.");
|
|
1588
1808
|
const t = e.trim();
|
|
1589
1809
|
return t === "" ? "" : t.replace(/\/+$/, "");
|
|
1590
1810
|
}
|
|
1591
|
-
function
|
|
1592
|
-
|
|
1593
|
-
if (t.backendType === "acap") {
|
|
1594
|
-
const r = t.accountId ?? "", o = Gn[e];
|
|
1595
|
-
if (o)
|
|
1596
|
-
return `${n}/api/chat/${r}${o}`;
|
|
1597
|
-
}
|
|
1598
|
-
return `${n}/chat${Vn[e]}`;
|
|
1811
|
+
function $c(e, t) {
|
|
1812
|
+
return `${ir(t?.middlewareUrl)}/chat${or[e]}`;
|
|
1599
1813
|
}
|
|
1600
|
-
function
|
|
1814
|
+
function sr() {
|
|
1601
1815
|
return typeof window < "u" && Array.isArray(window.dataLayer);
|
|
1602
1816
|
}
|
|
1603
|
-
function
|
|
1817
|
+
function T(e, t) {
|
|
1604
1818
|
const n = {
|
|
1605
1819
|
event: e,
|
|
1606
1820
|
...t
|
|
1607
1821
|
};
|
|
1608
|
-
|
|
1822
|
+
sr() && window.dataLayer.push(n);
|
|
1609
1823
|
}
|
|
1610
|
-
function
|
|
1611
|
-
|
|
1824
|
+
function ar(e) {
|
|
1825
|
+
T("gengage-on-init", { gengage_widget: e });
|
|
1612
1826
|
}
|
|
1613
|
-
function
|
|
1614
|
-
|
|
1827
|
+
function Re(e) {
|
|
1828
|
+
T("gengage-show", { gengage_widget: e });
|
|
1615
1829
|
}
|
|
1616
|
-
function
|
|
1617
|
-
|
|
1830
|
+
function cr(e) {
|
|
1831
|
+
T("gengage-hide", { gengage_widget: e });
|
|
1618
1832
|
}
|
|
1619
|
-
function
|
|
1620
|
-
|
|
1833
|
+
function ur(e, t) {
|
|
1834
|
+
T("gengage-suggested-question", {
|
|
1621
1835
|
gengage_question_title: e,
|
|
1622
1836
|
gengage_action_type: t
|
|
1623
1837
|
});
|
|
1624
1838
|
}
|
|
1625
|
-
function
|
|
1626
|
-
|
|
1839
|
+
function Ec(e) {
|
|
1840
|
+
T("gengage-find-similars", { gengage_sku: e });
|
|
1627
1841
|
}
|
|
1628
|
-
function
|
|
1629
|
-
|
|
1842
|
+
function Tc(e) {
|
|
1843
|
+
T("gengage-compare-preselection", { gengage_sku: e });
|
|
1630
1844
|
}
|
|
1631
|
-
function
|
|
1632
|
-
|
|
1845
|
+
function Zc(e) {
|
|
1846
|
+
T("gengage-compare-selected", {
|
|
1633
1847
|
gengage_skus: e,
|
|
1634
1848
|
gengage_product_count: e.length
|
|
1635
1849
|
});
|
|
1636
1850
|
}
|
|
1637
|
-
function
|
|
1638
|
-
|
|
1851
|
+
function Ic() {
|
|
1852
|
+
T("gengage-compare-clear");
|
|
1639
1853
|
}
|
|
1640
|
-
function
|
|
1641
|
-
|
|
1854
|
+
function Oc(e) {
|
|
1855
|
+
T("gengage-compare-received", {
|
|
1642
1856
|
gengage_product_count: e
|
|
1643
1857
|
});
|
|
1644
1858
|
}
|
|
1645
|
-
function
|
|
1646
|
-
|
|
1859
|
+
function Ac(e) {
|
|
1860
|
+
T("gengage-like-product", { gengage_sku: e });
|
|
1647
1861
|
}
|
|
1648
|
-
function
|
|
1649
|
-
|
|
1862
|
+
function Pc() {
|
|
1863
|
+
T("gengage-like-list");
|
|
1650
1864
|
}
|
|
1651
|
-
function
|
|
1652
|
-
|
|
1865
|
+
function Cc(e, t) {
|
|
1866
|
+
T("gengage-search", {
|
|
1653
1867
|
gengage_search_query: e,
|
|
1654
1868
|
gengage_result_count: t
|
|
1655
1869
|
});
|
|
1656
1870
|
}
|
|
1657
|
-
function
|
|
1658
|
-
|
|
1871
|
+
function dr(e, t) {
|
|
1872
|
+
T("gengage-product-detail", {
|
|
1659
1873
|
gengage_sku: e,
|
|
1660
1874
|
gengage_product_name: t
|
|
1661
1875
|
});
|
|
1662
1876
|
}
|
|
1663
|
-
function
|
|
1664
|
-
|
|
1877
|
+
function De(e, t) {
|
|
1878
|
+
T("gengage-cart-add", {
|
|
1665
1879
|
gengage_sku: e,
|
|
1666
1880
|
gengage_quantity: t
|
|
1667
1881
|
});
|
|
1668
1882
|
}
|
|
1669
|
-
function
|
|
1670
|
-
|
|
1883
|
+
function Nc() {
|
|
1884
|
+
T("gengage-message-sent");
|
|
1671
1885
|
}
|
|
1672
|
-
function
|
|
1673
|
-
|
|
1886
|
+
function Rc() {
|
|
1887
|
+
T("gengage-message-received");
|
|
1674
1888
|
}
|
|
1675
|
-
function
|
|
1676
|
-
|
|
1889
|
+
function Dc() {
|
|
1890
|
+
T("gengage-conversation-start");
|
|
1677
1891
|
}
|
|
1678
|
-
function
|
|
1679
|
-
|
|
1892
|
+
function lr() {
|
|
1893
|
+
T("gengage-voice-input");
|
|
1680
1894
|
}
|
|
1681
|
-
function
|
|
1682
|
-
|
|
1895
|
+
function fr(e, t) {
|
|
1896
|
+
T("gengage-error", { gengage_widget: e, gengage_error: t });
|
|
1683
1897
|
}
|
|
1684
|
-
let
|
|
1685
|
-
function
|
|
1898
|
+
let X = null;
|
|
1899
|
+
function jc() {
|
|
1686
1900
|
if (typeof window > "u") return () => {
|
|
1687
1901
|
};
|
|
1688
|
-
if (
|
|
1902
|
+
if (X) return X;
|
|
1689
1903
|
const e = [];
|
|
1690
1904
|
function t(n, r) {
|
|
1691
1905
|
const o = (i) => r(i.detail);
|
|
1692
1906
|
window.addEventListener(n, o), e.push(() => window.removeEventListener(n, o));
|
|
1693
1907
|
}
|
|
1694
|
-
return t("gengage:chat:open", () =>
|
|
1695
|
-
|
|
1908
|
+
return t("gengage:chat:open", () => Re("chat")), t("gengage:chat:close", () => cr("chat")), t("gengage:chat:ready", () => ar("chat")), t("gengage:chat:add-to-cart", ({ sku: n, quantity: r }) => {
|
|
1909
|
+
De(n, r);
|
|
1696
1910
|
}), t("gengage:similar:add-to-cart", ({ sku: n, quantity: r }) => {
|
|
1697
|
-
|
|
1911
|
+
De(n, r);
|
|
1698
1912
|
}), t("gengage:similar:product-click", ({ sku: n }) => {
|
|
1699
|
-
|
|
1913
|
+
dr(n);
|
|
1700
1914
|
}), t("gengage:qna:action", ({ title: n, type: r }) => {
|
|
1701
|
-
|
|
1702
|
-
}), t("gengage:chat:voice", () =>
|
|
1703
|
-
|
|
1704
|
-
}),
|
|
1915
|
+
ur(n, r);
|
|
1916
|
+
}), t("gengage:chat:voice", () => lr()), t("gengage:qna:open-chat", () => Re("chat")), t("gengage:global:error", ({ source: n, message: r }) => {
|
|
1917
|
+
fr(n, r);
|
|
1918
|
+
}), X = () => {
|
|
1705
1919
|
for (const n of e) n();
|
|
1706
|
-
e.length = 0,
|
|
1707
|
-
},
|
|
1920
|
+
e.length = 0, X = null;
|
|
1921
|
+
}, X;
|
|
1708
1922
|
}
|
|
1709
1923
|
function d(e, t, n) {
|
|
1710
1924
|
function r(a, c) {
|
|
@@ -1740,28 +1954,28 @@ function d(e, t, n) {
|
|
|
1740
1954
|
value: (a) => n?.Parent && a instanceof n.Parent ? !0 : a?._zod?.traits?.has(e)
|
|
1741
1955
|
}), Object.defineProperty(s, "name", { value: e }), s;
|
|
1742
1956
|
}
|
|
1743
|
-
class
|
|
1957
|
+
class G extends Error {
|
|
1744
1958
|
constructor() {
|
|
1745
1959
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
1746
1960
|
}
|
|
1747
1961
|
}
|
|
1748
|
-
class
|
|
1962
|
+
class ft extends Error {
|
|
1749
1963
|
constructor(t) {
|
|
1750
1964
|
super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
|
|
1751
1965
|
}
|
|
1752
1966
|
}
|
|
1753
|
-
const
|
|
1967
|
+
const pt = {};
|
|
1754
1968
|
function L(e) {
|
|
1755
|
-
return
|
|
1969
|
+
return pt;
|
|
1756
1970
|
}
|
|
1757
|
-
function
|
|
1971
|
+
function gt(e) {
|
|
1758
1972
|
const t = Object.values(e).filter((r) => typeof r == "number");
|
|
1759
1973
|
return Object.entries(e).filter(([r, o]) => t.indexOf(+r) === -1).map(([r, o]) => o);
|
|
1760
1974
|
}
|
|
1761
|
-
function
|
|
1975
|
+
function _e(e, t) {
|
|
1762
1976
|
return typeof t == "bigint" ? t.toString() : t;
|
|
1763
1977
|
}
|
|
1764
|
-
function
|
|
1978
|
+
function ke(e) {
|
|
1765
1979
|
return {
|
|
1766
1980
|
get value() {
|
|
1767
1981
|
{
|
|
@@ -1771,14 +1985,14 @@ function ve(e) {
|
|
|
1771
1985
|
}
|
|
1772
1986
|
};
|
|
1773
1987
|
}
|
|
1774
|
-
function
|
|
1988
|
+
function ze(e) {
|
|
1775
1989
|
return e == null;
|
|
1776
1990
|
}
|
|
1777
|
-
function
|
|
1991
|
+
function Se(e) {
|
|
1778
1992
|
const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
|
|
1779
1993
|
return e.slice(t, n);
|
|
1780
1994
|
}
|
|
1781
|
-
function
|
|
1995
|
+
function pr(e, t) {
|
|
1782
1996
|
const n = (e.toString().split(".")[1] || "").length, r = t.toString();
|
|
1783
1997
|
let o = (r.split(".")[1] || "").length;
|
|
1784
1998
|
if (o === 0 && /\d?e-\d?/.test(r)) {
|
|
@@ -1788,13 +2002,13 @@ function tr(e, t) {
|
|
|
1788
2002
|
const i = n > o ? n : o, s = Number.parseInt(e.toFixed(i).replace(".", "")), a = Number.parseInt(t.toFixed(i).replace(".", ""));
|
|
1789
2003
|
return s % a / 10 ** i;
|
|
1790
2004
|
}
|
|
1791
|
-
const
|
|
2005
|
+
const je = /* @__PURE__ */ Symbol("evaluating");
|
|
1792
2006
|
function v(e, t, n) {
|
|
1793
2007
|
let r;
|
|
1794
2008
|
Object.defineProperty(e, t, {
|
|
1795
2009
|
get() {
|
|
1796
|
-
if (r !==
|
|
1797
|
-
return r === void 0 && (r =
|
|
2010
|
+
if (r !== je)
|
|
2011
|
+
return r === void 0 && (r = je, r = n()), r;
|
|
1798
2012
|
},
|
|
1799
2013
|
set(o) {
|
|
1800
2014
|
Object.defineProperty(e, t, {
|
|
@@ -1813,7 +2027,7 @@ function q(e, t, n) {
|
|
|
1813
2027
|
configurable: !0
|
|
1814
2028
|
});
|
|
1815
2029
|
}
|
|
1816
|
-
function
|
|
2030
|
+
function x(...e) {
|
|
1817
2031
|
const t = {};
|
|
1818
2032
|
for (const n of e) {
|
|
1819
2033
|
const r = Object.getOwnPropertyDescriptors(n);
|
|
@@ -1821,18 +2035,18 @@ function F(...e) {
|
|
|
1821
2035
|
}
|
|
1822
2036
|
return Object.defineProperties({}, t);
|
|
1823
2037
|
}
|
|
1824
|
-
function
|
|
2038
|
+
function Le(e) {
|
|
1825
2039
|
return JSON.stringify(e);
|
|
1826
2040
|
}
|
|
1827
|
-
function
|
|
2041
|
+
function gr(e) {
|
|
1828
2042
|
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
1829
2043
|
}
|
|
1830
|
-
const
|
|
2044
|
+
const ht = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
1831
2045
|
};
|
|
1832
|
-
function
|
|
2046
|
+
function se(e) {
|
|
1833
2047
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
1834
2048
|
}
|
|
1835
|
-
const
|
|
2049
|
+
const hr = ke(() => {
|
|
1836
2050
|
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
|
|
1837
2051
|
return !1;
|
|
1838
2052
|
try {
|
|
@@ -1842,23 +2056,23 @@ const rr = ve(() => {
|
|
|
1842
2056
|
return !1;
|
|
1843
2057
|
}
|
|
1844
2058
|
});
|
|
1845
|
-
function
|
|
1846
|
-
if (
|
|
2059
|
+
function B(e) {
|
|
2060
|
+
if (se(e) === !1)
|
|
1847
2061
|
return !1;
|
|
1848
2062
|
const t = e.constructor;
|
|
1849
2063
|
if (t === void 0 || typeof t != "function")
|
|
1850
2064
|
return !0;
|
|
1851
2065
|
const n = t.prototype;
|
|
1852
|
-
return !(
|
|
2066
|
+
return !(se(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
|
|
1853
2067
|
}
|
|
1854
|
-
function
|
|
1855
|
-
return
|
|
2068
|
+
function mt(e) {
|
|
2069
|
+
return B(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
|
|
1856
2070
|
}
|
|
1857
|
-
const
|
|
2071
|
+
const mr = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
1858
2072
|
function H(e) {
|
|
1859
2073
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1860
2074
|
}
|
|
1861
|
-
function
|
|
2075
|
+
function F(e, t, n) {
|
|
1862
2076
|
const r = new e._zod.constr(t ?? e._zod.def);
|
|
1863
2077
|
return (!t || n?.parent) && (r._zod.parent = e), r;
|
|
1864
2078
|
}
|
|
@@ -1875,21 +2089,21 @@ function h(e) {
|
|
|
1875
2089
|
}
|
|
1876
2090
|
return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
|
|
1877
2091
|
}
|
|
1878
|
-
function
|
|
2092
|
+
function _r(e) {
|
|
1879
2093
|
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
|
|
1880
2094
|
}
|
|
1881
|
-
const
|
|
2095
|
+
const yr = {
|
|
1882
2096
|
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
1883
2097
|
int32: [-2147483648, 2147483647],
|
|
1884
2098
|
uint32: [0, 4294967295],
|
|
1885
2099
|
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
1886
2100
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
1887
2101
|
};
|
|
1888
|
-
function
|
|
2102
|
+
function vr(e, t) {
|
|
1889
2103
|
const n = e._zod.def, r = n.checks;
|
|
1890
2104
|
if (r && r.length > 0)
|
|
1891
2105
|
throw new Error(".pick() cannot be used on object schemas containing refinements");
|
|
1892
|
-
const i =
|
|
2106
|
+
const i = x(e._zod.def, {
|
|
1893
2107
|
get shape() {
|
|
1894
2108
|
const s = {};
|
|
1895
2109
|
for (const a in t) {
|
|
@@ -1901,13 +2115,13 @@ function ar(e, t) {
|
|
|
1901
2115
|
},
|
|
1902
2116
|
checks: []
|
|
1903
2117
|
});
|
|
1904
|
-
return
|
|
2118
|
+
return F(e, i);
|
|
1905
2119
|
}
|
|
1906
|
-
function
|
|
2120
|
+
function wr(e, t) {
|
|
1907
2121
|
const n = e._zod.def, r = n.checks;
|
|
1908
2122
|
if (r && r.length > 0)
|
|
1909
2123
|
throw new Error(".omit() cannot be used on object schemas containing refinements");
|
|
1910
|
-
const i =
|
|
2124
|
+
const i = x(e._zod.def, {
|
|
1911
2125
|
get shape() {
|
|
1912
2126
|
const s = { ...e._zod.def.shape };
|
|
1913
2127
|
for (const a in t) {
|
|
@@ -1919,10 +2133,10 @@ function cr(e, t) {
|
|
|
1919
2133
|
},
|
|
1920
2134
|
checks: []
|
|
1921
2135
|
});
|
|
1922
|
-
return
|
|
2136
|
+
return F(e, i);
|
|
1923
2137
|
}
|
|
1924
|
-
function
|
|
1925
|
-
if (!
|
|
2138
|
+
function br(e, t) {
|
|
2139
|
+
if (!B(t))
|
|
1926
2140
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
1927
2141
|
const n = e._zod.def.checks;
|
|
1928
2142
|
if (n && n.length > 0) {
|
|
@@ -1931,27 +2145,27 @@ function ur(e, t) {
|
|
|
1931
2145
|
if (Object.getOwnPropertyDescriptor(i, s) !== void 0)
|
|
1932
2146
|
throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
|
|
1933
2147
|
}
|
|
1934
|
-
const o =
|
|
2148
|
+
const o = x(e._zod.def, {
|
|
1935
2149
|
get shape() {
|
|
1936
2150
|
const i = { ...e._zod.def.shape, ...t };
|
|
1937
2151
|
return q(this, "shape", i), i;
|
|
1938
2152
|
}
|
|
1939
2153
|
});
|
|
1940
|
-
return
|
|
2154
|
+
return F(e, o);
|
|
1941
2155
|
}
|
|
1942
|
-
function
|
|
1943
|
-
if (!
|
|
2156
|
+
function kr(e, t) {
|
|
2157
|
+
if (!B(t))
|
|
1944
2158
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
1945
|
-
const n =
|
|
2159
|
+
const n = x(e._zod.def, {
|
|
1946
2160
|
get shape() {
|
|
1947
2161
|
const r = { ...e._zod.def.shape, ...t };
|
|
1948
2162
|
return q(this, "shape", r), r;
|
|
1949
2163
|
}
|
|
1950
2164
|
});
|
|
1951
|
-
return
|
|
2165
|
+
return F(e, n);
|
|
1952
2166
|
}
|
|
1953
|
-
function
|
|
1954
|
-
const n =
|
|
2167
|
+
function zr(e, t) {
|
|
2168
|
+
const n = x(e._zod.def, {
|
|
1955
2169
|
get shape() {
|
|
1956
2170
|
const r = { ...e._zod.def.shape, ...t._zod.def.shape };
|
|
1957
2171
|
return q(this, "shape", r), r;
|
|
@@ -1962,13 +2176,13 @@ function lr(e, t) {
|
|
|
1962
2176
|
checks: []
|
|
1963
2177
|
// delete existing checks
|
|
1964
2178
|
});
|
|
1965
|
-
return
|
|
2179
|
+
return F(e, n);
|
|
1966
2180
|
}
|
|
1967
|
-
function
|
|
2181
|
+
function Sr(e, t, n) {
|
|
1968
2182
|
const o = t._zod.def.checks;
|
|
1969
2183
|
if (o && o.length > 0)
|
|
1970
2184
|
throw new Error(".partial() cannot be used on object schemas containing refinements");
|
|
1971
|
-
const s =
|
|
2185
|
+
const s = x(t._zod.def, {
|
|
1972
2186
|
get shape() {
|
|
1973
2187
|
const a = t._zod.def.shape, c = { ...a };
|
|
1974
2188
|
if (n)
|
|
@@ -1990,10 +2204,10 @@ function fr(e, t, n) {
|
|
|
1990
2204
|
},
|
|
1991
2205
|
checks: []
|
|
1992
2206
|
});
|
|
1993
|
-
return
|
|
2207
|
+
return F(t, s);
|
|
1994
2208
|
}
|
|
1995
|
-
function
|
|
1996
|
-
const r =
|
|
2209
|
+
function $r(e, t, n) {
|
|
2210
|
+
const r = x(t._zod.def, {
|
|
1997
2211
|
get shape() {
|
|
1998
2212
|
const o = t._zod.def.shape, i = { ...o };
|
|
1999
2213
|
if (n)
|
|
@@ -2014,7 +2228,7 @@ function pr(e, t, n) {
|
|
|
2014
2228
|
return q(this, "shape", i), i;
|
|
2015
2229
|
}
|
|
2016
2230
|
});
|
|
2017
|
-
return
|
|
2231
|
+
return F(t, r);
|
|
2018
2232
|
}
|
|
2019
2233
|
function V(e, t = 0) {
|
|
2020
2234
|
if (e.aborted === !0)
|
|
@@ -2024,27 +2238,27 @@ function V(e, t = 0) {
|
|
|
2024
2238
|
return !0;
|
|
2025
2239
|
return !1;
|
|
2026
2240
|
}
|
|
2027
|
-
function
|
|
2241
|
+
function W(e, t) {
|
|
2028
2242
|
return t.map((n) => {
|
|
2029
2243
|
var r;
|
|
2030
2244
|
return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
|
|
2031
2245
|
});
|
|
2032
2246
|
}
|
|
2033
|
-
function
|
|
2247
|
+
function re(e) {
|
|
2034
2248
|
return typeof e == "string" ? e : e?.message;
|
|
2035
2249
|
}
|
|
2036
2250
|
function U(e, t, n) {
|
|
2037
2251
|
const r = { ...e, path: e.path ?? [] };
|
|
2038
2252
|
if (!e.message) {
|
|
2039
|
-
const o =
|
|
2253
|
+
const o = re(e.inst?._zod.def?.error?.(e)) ?? re(t?.error?.(e)) ?? re(n.customError?.(e)) ?? re(n.localeError?.(e)) ?? "Invalid input";
|
|
2040
2254
|
r.message = o;
|
|
2041
2255
|
}
|
|
2042
2256
|
return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
|
|
2043
2257
|
}
|
|
2044
|
-
function
|
|
2258
|
+
function $e(e) {
|
|
2045
2259
|
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
2046
2260
|
}
|
|
2047
|
-
function
|
|
2261
|
+
function ne(...e) {
|
|
2048
2262
|
const [t, n, r] = e;
|
|
2049
2263
|
return typeof t == "string" ? {
|
|
2050
2264
|
message: t,
|
|
@@ -2053,25 +2267,25 @@ function te(...e) {
|
|
|
2053
2267
|
inst: r
|
|
2054
2268
|
} : { ...t };
|
|
2055
2269
|
}
|
|
2056
|
-
const
|
|
2270
|
+
const _t = (e, t) => {
|
|
2057
2271
|
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
2058
2272
|
value: e._zod,
|
|
2059
2273
|
enumerable: !1
|
|
2060
2274
|
}), Object.defineProperty(e, "issues", {
|
|
2061
2275
|
value: t,
|
|
2062
2276
|
enumerable: !1
|
|
2063
|
-
}), e.message = JSON.stringify(t,
|
|
2277
|
+
}), e.message = JSON.stringify(t, _e, 2), Object.defineProperty(e, "toString", {
|
|
2064
2278
|
value: () => e.message,
|
|
2065
2279
|
enumerable: !1
|
|
2066
2280
|
});
|
|
2067
|
-
},
|
|
2068
|
-
function
|
|
2281
|
+
}, yt = d("$ZodError", _t), vt = d("$ZodError", _t, { Parent: Error });
|
|
2282
|
+
function Er(e, t = (n) => n.message) {
|
|
2069
2283
|
const n = {}, r = [];
|
|
2070
2284
|
for (const o of e.issues)
|
|
2071
2285
|
o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
|
|
2072
2286
|
return { formErrors: r, fieldErrors: n };
|
|
2073
2287
|
}
|
|
2074
|
-
function
|
|
2288
|
+
function Tr(e, t = (n) => n.message) {
|
|
2075
2289
|
const n = { _errors: [] }, r = (o) => {
|
|
2076
2290
|
for (const i of o.issues)
|
|
2077
2291
|
if (i.code === "invalid_union" && i.errors.length)
|
|
@@ -2092,81 +2306,81 @@ function hr(e, t = (n) => n.message) {
|
|
|
2092
2306
|
};
|
|
2093
2307
|
return r(e), n;
|
|
2094
2308
|
}
|
|
2095
|
-
const
|
|
2309
|
+
const Ee = (e) => (t, n, r, o) => {
|
|
2096
2310
|
const i = r ? Object.assign(r, { async: !1 }) : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, i);
|
|
2097
2311
|
if (s instanceof Promise)
|
|
2098
|
-
throw new
|
|
2312
|
+
throw new G();
|
|
2099
2313
|
if (s.issues.length) {
|
|
2100
2314
|
const a = new (o?.Err ?? e)(s.issues.map((c) => U(c, i, L())));
|
|
2101
|
-
throw
|
|
2315
|
+
throw ht(a, o?.callee), a;
|
|
2102
2316
|
}
|
|
2103
2317
|
return s.value;
|
|
2104
|
-
},
|
|
2318
|
+
}, Te = (e) => async (t, n, r, o) => {
|
|
2105
2319
|
const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
2106
2320
|
let s = t._zod.run({ value: n, issues: [] }, i);
|
|
2107
2321
|
if (s instanceof Promise && (s = await s), s.issues.length) {
|
|
2108
2322
|
const a = new (o?.Err ?? e)(s.issues.map((c) => U(c, i, L())));
|
|
2109
|
-
throw
|
|
2323
|
+
throw ht(a, o?.callee), a;
|
|
2110
2324
|
}
|
|
2111
2325
|
return s.value;
|
|
2112
|
-
},
|
|
2326
|
+
}, de = (e) => (t, n, r) => {
|
|
2113
2327
|
const o = r ? { ...r, async: !1 } : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, o);
|
|
2114
2328
|
if (i instanceof Promise)
|
|
2115
|
-
throw new
|
|
2329
|
+
throw new G();
|
|
2116
2330
|
return i.issues.length ? {
|
|
2117
2331
|
success: !1,
|
|
2118
|
-
error: new (e ??
|
|
2332
|
+
error: new (e ?? yt)(i.issues.map((s) => U(s, o, L())))
|
|
2119
2333
|
} : { success: !0, data: i.value };
|
|
2120
|
-
},
|
|
2334
|
+
}, Zr = /* @__PURE__ */ de(vt), le = (e) => async (t, n, r) => {
|
|
2121
2335
|
const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
2122
2336
|
let i = t._zod.run({ value: n, issues: [] }, o);
|
|
2123
2337
|
return i instanceof Promise && (i = await i), i.issues.length ? {
|
|
2124
2338
|
success: !1,
|
|
2125
2339
|
error: new e(i.issues.map((s) => U(s, o, L())))
|
|
2126
2340
|
} : { success: !0, data: i.value };
|
|
2127
|
-
},
|
|
2128
|
-
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
2129
|
-
return ze(e)(t, n, o);
|
|
2130
|
-
}, vr = (e) => (t, n, r) => ze(e)(t, n, r), wr = (e) => async (t, n, r) => {
|
|
2341
|
+
}, Ir = /* @__PURE__ */ le(vt), Or = (e) => (t, n, r) => {
|
|
2131
2342
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
2132
|
-
return
|
|
2133
|
-
},
|
|
2343
|
+
return Ee(e)(t, n, o);
|
|
2344
|
+
}, Ar = (e) => (t, n, r) => Ee(e)(t, n, r), Pr = (e) => async (t, n, r) => {
|
|
2134
2345
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
2135
|
-
return
|
|
2136
|
-
},
|
|
2346
|
+
return Te(e)(t, n, o);
|
|
2347
|
+
}, Cr = (e) => async (t, n, r) => Te(e)(t, n, r), Nr = (e) => (t, n, r) => {
|
|
2137
2348
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
2138
2349
|
return de(e)(t, n, o);
|
|
2139
|
-
},
|
|
2140
|
-
|
|
2141
|
-
return
|
|
2350
|
+
}, Rr = (e) => (t, n, r) => de(e)(t, n, r), Dr = (e) => async (t, n, r) => {
|
|
2351
|
+
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
2352
|
+
return le(e)(t, n, o);
|
|
2353
|
+
}, jr = (e) => async (t, n, r) => le(e)(t, n, r), Lr = /^[cC][^\s-]{8,}$/, Ur = /^[0-9a-z]+$/, Mr = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, xr = /^[0-9a-vA-V]{20}$/, Fr = /^[A-Za-z0-9]{27}$/, Jr = /^[a-zA-Z0-9_-]{21}$/, qr = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Vr = /^([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})$/, Ue = (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)$/, Wr = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Gr = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
2354
|
+
function Br() {
|
|
2355
|
+
return new RegExp(Gr, "u");
|
|
2142
2356
|
}
|
|
2143
|
-
const
|
|
2144
|
-
function
|
|
2357
|
+
const Hr = /^(?:(?: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])$/, Kr = /^(([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}|:))$/, Yr = /^((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])$/, Qr = /^(([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])$/, Xr = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, wt = /^[A-Za-z0-9_-]*$/, eo = /^\+[1-9]\d{6,14}$/, bt = "(?:(?:\\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])))", to = /* @__PURE__ */ new RegExp(`^${bt}$`);
|
|
2358
|
+
function kt(e) {
|
|
2145
2359
|
const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
2146
2360
|
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+)?)?`;
|
|
2147
2361
|
}
|
|
2148
|
-
function
|
|
2149
|
-
return new RegExp(`^${
|
|
2362
|
+
function no(e) {
|
|
2363
|
+
return new RegExp(`^${kt(e)}$`);
|
|
2150
2364
|
}
|
|
2151
|
-
function
|
|
2152
|
-
const t =
|
|
2365
|
+
function ro(e) {
|
|
2366
|
+
const t = kt({ precision: e.precision }), n = ["Z"];
|
|
2153
2367
|
e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
2154
2368
|
const r = `${t}(?:${n.join("|")})`;
|
|
2155
|
-
return new RegExp(`^${
|
|
2369
|
+
return new RegExp(`^${bt}T(?:${r})$`);
|
|
2156
2370
|
}
|
|
2157
|
-
const
|
|
2371
|
+
const oo = (e) => {
|
|
2158
2372
|
const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
2159
2373
|
return new RegExp(`^${t}$`);
|
|
2160
|
-
},
|
|
2374
|
+
}, io = /^-?\d+$/, zt = /^-?\d+(?:\.\d+)?$/, so = /^(?:true|false)$/i, ao = /^[^A-Z]*$/, co = /^[^a-z]*$/, A = /* @__PURE__ */ d("$ZodCheck", (e, t) => {
|
|
2161
2375
|
var n;
|
|
2162
2376
|
e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
2163
|
-
}),
|
|
2377
|
+
}), St = {
|
|
2164
2378
|
number: "number",
|
|
2165
2379
|
bigint: "bigint",
|
|
2166
2380
|
object: "date"
|
|
2167
|
-
},
|
|
2168
|
-
|
|
2169
|
-
const n =
|
|
2381
|
+
}, $t = /* @__PURE__ */ d("$ZodCheckLessThan", (e, t) => {
|
|
2382
|
+
A.init(e, t);
|
|
2383
|
+
const n = St[typeof t.value];
|
|
2170
2384
|
e._zod.onattach.push((r) => {
|
|
2171
2385
|
const o = r._zod.bag, i = (t.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
2172
2386
|
t.value < i && (t.inclusive ? o.maximum = t.value : o.exclusiveMaximum = t.value);
|
|
@@ -2181,9 +2395,9 @@ const Gr = (e) => {
|
|
|
2181
2395
|
continue: !t.abort
|
|
2182
2396
|
});
|
|
2183
2397
|
};
|
|
2184
|
-
}),
|
|
2185
|
-
|
|
2186
|
-
const n =
|
|
2398
|
+
}), Et = /* @__PURE__ */ d("$ZodCheckGreaterThan", (e, t) => {
|
|
2399
|
+
A.init(e, t);
|
|
2400
|
+
const n = St[typeof t.value];
|
|
2187
2401
|
e._zod.onattach.push((r) => {
|
|
2188
2402
|
const o = r._zod.bag, i = (t.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
2189
2403
|
t.value > i && (t.inclusive ? o.minimum = t.value : o.exclusiveMinimum = t.value);
|
|
@@ -2198,14 +2412,14 @@ const Gr = (e) => {
|
|
|
2198
2412
|
continue: !t.abort
|
|
2199
2413
|
});
|
|
2200
2414
|
};
|
|
2201
|
-
}),
|
|
2202
|
-
|
|
2415
|
+
}), uo = /* @__PURE__ */ d("$ZodCheckMultipleOf", (e, t) => {
|
|
2416
|
+
A.init(e, t), e._zod.onattach.push((n) => {
|
|
2203
2417
|
var r;
|
|
2204
2418
|
(r = n._zod.bag).multipleOf ?? (r.multipleOf = t.value);
|
|
2205
2419
|
}), e._zod.check = (n) => {
|
|
2206
2420
|
if (typeof n.value != typeof t.value)
|
|
2207
2421
|
throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
2208
|
-
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) :
|
|
2422
|
+
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : pr(n.value, t.value) === 0) || n.issues.push({
|
|
2209
2423
|
origin: typeof n.value,
|
|
2210
2424
|
code: "not_multiple_of",
|
|
2211
2425
|
divisor: t.value,
|
|
@@ -2214,12 +2428,12 @@ const Gr = (e) => {
|
|
|
2214
2428
|
continue: !t.abort
|
|
2215
2429
|
});
|
|
2216
2430
|
};
|
|
2217
|
-
}),
|
|
2218
|
-
|
|
2219
|
-
const n = t.format?.includes("int"), r = n ? "int" : "number", [o, i] =
|
|
2431
|
+
}), lo = /* @__PURE__ */ d("$ZodCheckNumberFormat", (e, t) => {
|
|
2432
|
+
A.init(e, t), t.format = t.format || "float64";
|
|
2433
|
+
const n = t.format?.includes("int"), r = n ? "int" : "number", [o, i] = yr[t.format];
|
|
2220
2434
|
e._zod.onattach.push((s) => {
|
|
2221
2435
|
const a = s._zod.bag;
|
|
2222
|
-
a.format = t.format, a.minimum = o, a.maximum = i, n && (a.pattern =
|
|
2436
|
+
a.format = t.format, a.minimum = o, a.maximum = i, n && (a.pattern = io);
|
|
2223
2437
|
}), e._zod.check = (s) => {
|
|
2224
2438
|
const a = s.value;
|
|
2225
2439
|
if (n) {
|
|
@@ -2275,11 +2489,11 @@ const Gr = (e) => {
|
|
|
2275
2489
|
continue: !t.abort
|
|
2276
2490
|
});
|
|
2277
2491
|
};
|
|
2278
|
-
}),
|
|
2492
|
+
}), fo = /* @__PURE__ */ d("$ZodCheckMaxLength", (e, t) => {
|
|
2279
2493
|
var n;
|
|
2280
|
-
|
|
2494
|
+
A.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
2281
2495
|
const o = r.value;
|
|
2282
|
-
return !
|
|
2496
|
+
return !ze(o) && o.length !== void 0;
|
|
2283
2497
|
}), e._zod.onattach.push((r) => {
|
|
2284
2498
|
const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
2285
2499
|
t.maximum < o && (r._zod.bag.maximum = t.maximum);
|
|
@@ -2287,7 +2501,7 @@ const Gr = (e) => {
|
|
|
2287
2501
|
const o = r.value;
|
|
2288
2502
|
if (o.length <= t.maximum)
|
|
2289
2503
|
return;
|
|
2290
|
-
const s =
|
|
2504
|
+
const s = $e(o);
|
|
2291
2505
|
r.issues.push({
|
|
2292
2506
|
origin: s,
|
|
2293
2507
|
code: "too_big",
|
|
@@ -2298,11 +2512,11 @@ const Gr = (e) => {
|
|
|
2298
2512
|
continue: !t.abort
|
|
2299
2513
|
});
|
|
2300
2514
|
};
|
|
2301
|
-
}),
|
|
2515
|
+
}), po = /* @__PURE__ */ d("$ZodCheckMinLength", (e, t) => {
|
|
2302
2516
|
var n;
|
|
2303
|
-
|
|
2517
|
+
A.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
2304
2518
|
const o = r.value;
|
|
2305
|
-
return !
|
|
2519
|
+
return !ze(o) && o.length !== void 0;
|
|
2306
2520
|
}), e._zod.onattach.push((r) => {
|
|
2307
2521
|
const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
2308
2522
|
t.minimum > o && (r._zod.bag.minimum = t.minimum);
|
|
@@ -2310,7 +2524,7 @@ const Gr = (e) => {
|
|
|
2310
2524
|
const o = r.value;
|
|
2311
2525
|
if (o.length >= t.minimum)
|
|
2312
2526
|
return;
|
|
2313
|
-
const s =
|
|
2527
|
+
const s = $e(o);
|
|
2314
2528
|
r.issues.push({
|
|
2315
2529
|
origin: s,
|
|
2316
2530
|
code: "too_small",
|
|
@@ -2321,11 +2535,11 @@ const Gr = (e) => {
|
|
|
2321
2535
|
continue: !t.abort
|
|
2322
2536
|
});
|
|
2323
2537
|
};
|
|
2324
|
-
}),
|
|
2538
|
+
}), go = /* @__PURE__ */ d("$ZodCheckLengthEquals", (e, t) => {
|
|
2325
2539
|
var n;
|
|
2326
|
-
|
|
2540
|
+
A.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
2327
2541
|
const o = r.value;
|
|
2328
|
-
return !
|
|
2542
|
+
return !ze(o) && o.length !== void 0;
|
|
2329
2543
|
}), e._zod.onattach.push((r) => {
|
|
2330
2544
|
const o = r._zod.bag;
|
|
2331
2545
|
o.minimum = t.length, o.maximum = t.length, o.length = t.length;
|
|
@@ -2333,7 +2547,7 @@ const Gr = (e) => {
|
|
|
2333
2547
|
const o = r.value, i = o.length;
|
|
2334
2548
|
if (i === t.length)
|
|
2335
2549
|
return;
|
|
2336
|
-
const s =
|
|
2550
|
+
const s = $e(o), a = i > t.length;
|
|
2337
2551
|
r.issues.push({
|
|
2338
2552
|
origin: s,
|
|
2339
2553
|
...a ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
|
|
@@ -2344,9 +2558,9 @@ const Gr = (e) => {
|
|
|
2344
2558
|
continue: !t.abort
|
|
2345
2559
|
});
|
|
2346
2560
|
};
|
|
2347
|
-
}),
|
|
2561
|
+
}), fe = /* @__PURE__ */ d("$ZodCheckStringFormat", (e, t) => {
|
|
2348
2562
|
var n, r;
|
|
2349
|
-
|
|
2563
|
+
A.init(e, t), e._zod.onattach.push((o) => {
|
|
2350
2564
|
const i = o._zod.bag;
|
|
2351
2565
|
i.format = t.format, t.pattern && (i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(t.pattern));
|
|
2352
2566
|
}), t.pattern ? (n = e._zod).check ?? (n.check = (o) => {
|
|
@@ -2361,8 +2575,8 @@ const Gr = (e) => {
|
|
|
2361
2575
|
});
|
|
2362
2576
|
}) : (r = e._zod).check ?? (r.check = () => {
|
|
2363
2577
|
});
|
|
2364
|
-
}),
|
|
2365
|
-
|
|
2578
|
+
}), ho = /* @__PURE__ */ d("$ZodCheckRegex", (e, t) => {
|
|
2579
|
+
fe.init(e, t), e._zod.check = (n) => {
|
|
2366
2580
|
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
2367
2581
|
origin: "string",
|
|
2368
2582
|
code: "invalid_format",
|
|
@@ -2373,12 +2587,12 @@ const Gr = (e) => {
|
|
|
2373
2587
|
continue: !t.abort
|
|
2374
2588
|
});
|
|
2375
2589
|
};
|
|
2376
|
-
}),
|
|
2377
|
-
t.pattern ?? (t.pattern =
|
|
2378
|
-
}),
|
|
2379
|
-
t.pattern ?? (t.pattern =
|
|
2380
|
-
}),
|
|
2381
|
-
|
|
2590
|
+
}), mo = /* @__PURE__ */ d("$ZodCheckLowerCase", (e, t) => {
|
|
2591
|
+
t.pattern ?? (t.pattern = ao), fe.init(e, t);
|
|
2592
|
+
}), _o = /* @__PURE__ */ d("$ZodCheckUpperCase", (e, t) => {
|
|
2593
|
+
t.pattern ?? (t.pattern = co), fe.init(e, t);
|
|
2594
|
+
}), yo = /* @__PURE__ */ d("$ZodCheckIncludes", (e, t) => {
|
|
2595
|
+
A.init(e, t);
|
|
2382
2596
|
const n = H(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
2383
2597
|
t.pattern = r, e._zod.onattach.push((o) => {
|
|
2384
2598
|
const i = o._zod.bag;
|
|
@@ -2394,8 +2608,8 @@ const Gr = (e) => {
|
|
|
2394
2608
|
continue: !t.abort
|
|
2395
2609
|
});
|
|
2396
2610
|
};
|
|
2397
|
-
}),
|
|
2398
|
-
|
|
2611
|
+
}), vo = /* @__PURE__ */ d("$ZodCheckStartsWith", (e, t) => {
|
|
2612
|
+
A.init(e, t);
|
|
2399
2613
|
const n = new RegExp(`^${H(t.prefix)}.*`);
|
|
2400
2614
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
2401
2615
|
const o = r._zod.bag;
|
|
@@ -2411,8 +2625,8 @@ const Gr = (e) => {
|
|
|
2411
2625
|
continue: !t.abort
|
|
2412
2626
|
});
|
|
2413
2627
|
};
|
|
2414
|
-
}),
|
|
2415
|
-
|
|
2628
|
+
}), wo = /* @__PURE__ */ d("$ZodCheckEndsWith", (e, t) => {
|
|
2629
|
+
A.init(e, t);
|
|
2416
2630
|
const n = new RegExp(`.*${H(t.suffix)}$`);
|
|
2417
2631
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
2418
2632
|
const o = r._zod.bag;
|
|
@@ -2428,12 +2642,12 @@ const Gr = (e) => {
|
|
|
2428
2642
|
continue: !t.abort
|
|
2429
2643
|
});
|
|
2430
2644
|
};
|
|
2431
|
-
}),
|
|
2432
|
-
|
|
2645
|
+
}), bo = /* @__PURE__ */ d("$ZodCheckOverwrite", (e, t) => {
|
|
2646
|
+
A.init(e, t), e._zod.check = (n) => {
|
|
2433
2647
|
n.value = t.tx(n.value);
|
|
2434
2648
|
};
|
|
2435
2649
|
});
|
|
2436
|
-
class
|
|
2650
|
+
class ko {
|
|
2437
2651
|
constructor(t = []) {
|
|
2438
2652
|
this.content = [], this.indent = 0, this && (this.args = t);
|
|
2439
2653
|
}
|
|
@@ -2456,13 +2670,13 @@ class uo {
|
|
|
2456
2670
|
`));
|
|
2457
2671
|
}
|
|
2458
2672
|
}
|
|
2459
|
-
const
|
|
2673
|
+
const zo = {
|
|
2460
2674
|
major: 4,
|
|
2461
2675
|
minor: 3,
|
|
2462
2676
|
patch: 6
|
|
2463
2677
|
}, z = /* @__PURE__ */ d("$ZodType", (e, t) => {
|
|
2464
2678
|
var n;
|
|
2465
|
-
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version =
|
|
2679
|
+
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = zo;
|
|
2466
2680
|
const r = [...e._zod.def.checks ?? []];
|
|
2467
2681
|
e._zod.traits.has("$ZodCheck") && r.unshift(e);
|
|
2468
2682
|
for (const o of r)
|
|
@@ -2483,7 +2697,7 @@ const lo = {
|
|
|
2483
2697
|
continue;
|
|
2484
2698
|
const p = s.issues.length, g = f._zod.check(s);
|
|
2485
2699
|
if (g instanceof Promise && c?.async === !1)
|
|
2486
|
-
throw new
|
|
2700
|
+
throw new G();
|
|
2487
2701
|
if (l || g instanceof Promise)
|
|
2488
2702
|
l = (l ?? Promise.resolve()).then(async () => {
|
|
2489
2703
|
await g, s.issues.length !== p && (u || (u = V(s, p)));
|
|
@@ -2501,7 +2715,7 @@ const lo = {
|
|
|
2501
2715
|
const u = o(a, r, c);
|
|
2502
2716
|
if (u instanceof Promise) {
|
|
2503
2717
|
if (c.async === !1)
|
|
2504
|
-
throw new
|
|
2718
|
+
throw new G();
|
|
2505
2719
|
return u.then((l) => e._zod.parse(l, c));
|
|
2506
2720
|
}
|
|
2507
2721
|
return e._zod.parse(u, c);
|
|
@@ -2516,7 +2730,7 @@ const lo = {
|
|
|
2516
2730
|
const c = e._zod.parse(s, a);
|
|
2517
2731
|
if (c instanceof Promise) {
|
|
2518
2732
|
if (a.async === !1)
|
|
2519
|
-
throw new
|
|
2733
|
+
throw new G();
|
|
2520
2734
|
return c.then((u) => o(u, r, a));
|
|
2521
2735
|
}
|
|
2522
2736
|
return o(c, r, a);
|
|
@@ -2525,17 +2739,17 @@ const lo = {
|
|
|
2525
2739
|
v(e, "~standard", () => ({
|
|
2526
2740
|
validate: (o) => {
|
|
2527
2741
|
try {
|
|
2528
|
-
const i =
|
|
2742
|
+
const i = Zr(e, o);
|
|
2529
2743
|
return i.success ? { value: i.data } : { issues: i.error?.issues };
|
|
2530
2744
|
} catch {
|
|
2531
|
-
return
|
|
2745
|
+
return Ir(e, o).then((s) => s.success ? { value: s.data } : { issues: s.error?.issues });
|
|
2532
2746
|
}
|
|
2533
2747
|
},
|
|
2534
2748
|
vendor: "zod",
|
|
2535
2749
|
version: 1
|
|
2536
2750
|
}));
|
|
2537
|
-
}),
|
|
2538
|
-
z.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ??
|
|
2751
|
+
}), Ze = /* @__PURE__ */ d("$ZodString", (e, t) => {
|
|
2752
|
+
z.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? oo(e._zod.bag), e._zod.parse = (n, r) => {
|
|
2539
2753
|
if (t.coerce)
|
|
2540
2754
|
try {
|
|
2541
2755
|
n.value = String(n.value);
|
|
@@ -2549,10 +2763,10 @@ const lo = {
|
|
|
2549
2763
|
}), n;
|
|
2550
2764
|
};
|
|
2551
2765
|
}), b = /* @__PURE__ */ d("$ZodStringFormat", (e, t) => {
|
|
2552
|
-
|
|
2553
|
-
}),
|
|
2554
|
-
t.pattern ?? (t.pattern =
|
|
2555
|
-
}),
|
|
2766
|
+
fe.init(e, t), Ze.init(e, t);
|
|
2767
|
+
}), So = /* @__PURE__ */ d("$ZodGUID", (e, t) => {
|
|
2768
|
+
t.pattern ?? (t.pattern = Vr), b.init(e, t);
|
|
2769
|
+
}), $o = /* @__PURE__ */ d("$ZodUUID", (e, t) => {
|
|
2556
2770
|
if (t.version) {
|
|
2557
2771
|
const r = {
|
|
2558
2772
|
v1: 1,
|
|
@@ -2566,13 +2780,13 @@ const lo = {
|
|
|
2566
2780
|
}[t.version];
|
|
2567
2781
|
if (r === void 0)
|
|
2568
2782
|
throw new Error(`Invalid UUID version: "${t.version}"`);
|
|
2569
|
-
t.pattern ?? (t.pattern =
|
|
2783
|
+
t.pattern ?? (t.pattern = Ue(r));
|
|
2570
2784
|
} else
|
|
2571
|
-
t.pattern ?? (t.pattern =
|
|
2785
|
+
t.pattern ?? (t.pattern = Ue());
|
|
2572
2786
|
b.init(e, t);
|
|
2573
|
-
}),
|
|
2574
|
-
t.pattern ?? (t.pattern =
|
|
2575
|
-
}),
|
|
2787
|
+
}), Eo = /* @__PURE__ */ d("$ZodEmail", (e, t) => {
|
|
2788
|
+
t.pattern ?? (t.pattern = Wr), b.init(e, t);
|
|
2789
|
+
}), To = /* @__PURE__ */ d("$ZodURL", (e, t) => {
|
|
2576
2790
|
b.init(e, t), e._zod.check = (n) => {
|
|
2577
2791
|
try {
|
|
2578
2792
|
const r = n.value.trim(), o = new URL(r);
|
|
@@ -2604,32 +2818,32 @@ const lo = {
|
|
|
2604
2818
|
});
|
|
2605
2819
|
}
|
|
2606
2820
|
};
|
|
2607
|
-
}),
|
|
2608
|
-
t.pattern ?? (t.pattern =
|
|
2609
|
-
}),
|
|
2610
|
-
t.pattern ?? (t.pattern = Pr), b.init(e, t);
|
|
2611
|
-
}), yo = /* @__PURE__ */ d("$ZodCUID", (e, t) => {
|
|
2612
|
-
t.pattern ?? (t.pattern = Er), b.init(e, t);
|
|
2613
|
-
}), vo = /* @__PURE__ */ d("$ZodCUID2", (e, t) => {
|
|
2614
|
-
t.pattern ?? (t.pattern = Zr), b.init(e, t);
|
|
2615
|
-
}), wo = /* @__PURE__ */ d("$ZodULID", (e, t) => {
|
|
2616
|
-
t.pattern ?? (t.pattern = Tr), b.init(e, t);
|
|
2617
|
-
}), bo = /* @__PURE__ */ d("$ZodXID", (e, t) => {
|
|
2618
|
-
t.pattern ?? (t.pattern = Ir), b.init(e, t);
|
|
2619
|
-
}), ko = /* @__PURE__ */ d("$ZodKSUID", (e, t) => {
|
|
2620
|
-
t.pattern ?? (t.pattern = Or), b.init(e, t);
|
|
2621
|
-
}), zo = /* @__PURE__ */ d("$ZodISODateTime", (e, t) => {
|
|
2622
|
-
t.pattern ?? (t.pattern = Vr(t)), b.init(e, t);
|
|
2623
|
-
}), $o = /* @__PURE__ */ d("$ZodISODate", (e, t) => {
|
|
2821
|
+
}), Zo = /* @__PURE__ */ d("$ZodEmoji", (e, t) => {
|
|
2822
|
+
t.pattern ?? (t.pattern = Br()), b.init(e, t);
|
|
2823
|
+
}), Io = /* @__PURE__ */ d("$ZodNanoID", (e, t) => {
|
|
2624
2824
|
t.pattern ?? (t.pattern = Jr), b.init(e, t);
|
|
2625
|
-
}),
|
|
2626
|
-
t.pattern ?? (t.pattern =
|
|
2627
|
-
}),
|
|
2628
|
-
t.pattern ?? (t.pattern =
|
|
2629
|
-
}),
|
|
2630
|
-
t.pattern ?? (t.pattern =
|
|
2631
|
-
}),
|
|
2632
|
-
t.pattern ?? (t.pattern =
|
|
2825
|
+
}), Oo = /* @__PURE__ */ d("$ZodCUID", (e, t) => {
|
|
2826
|
+
t.pattern ?? (t.pattern = Lr), b.init(e, t);
|
|
2827
|
+
}), Ao = /* @__PURE__ */ d("$ZodCUID2", (e, t) => {
|
|
2828
|
+
t.pattern ?? (t.pattern = Ur), b.init(e, t);
|
|
2829
|
+
}), Po = /* @__PURE__ */ d("$ZodULID", (e, t) => {
|
|
2830
|
+
t.pattern ?? (t.pattern = Mr), b.init(e, t);
|
|
2831
|
+
}), Co = /* @__PURE__ */ d("$ZodXID", (e, t) => {
|
|
2832
|
+
t.pattern ?? (t.pattern = xr), b.init(e, t);
|
|
2833
|
+
}), No = /* @__PURE__ */ d("$ZodKSUID", (e, t) => {
|
|
2834
|
+
t.pattern ?? (t.pattern = Fr), b.init(e, t);
|
|
2835
|
+
}), Ro = /* @__PURE__ */ d("$ZodISODateTime", (e, t) => {
|
|
2836
|
+
t.pattern ?? (t.pattern = ro(t)), b.init(e, t);
|
|
2837
|
+
}), Do = /* @__PURE__ */ d("$ZodISODate", (e, t) => {
|
|
2838
|
+
t.pattern ?? (t.pattern = to), b.init(e, t);
|
|
2839
|
+
}), jo = /* @__PURE__ */ d("$ZodISOTime", (e, t) => {
|
|
2840
|
+
t.pattern ?? (t.pattern = no(t)), b.init(e, t);
|
|
2841
|
+
}), Lo = /* @__PURE__ */ d("$ZodISODuration", (e, t) => {
|
|
2842
|
+
t.pattern ?? (t.pattern = qr), b.init(e, t);
|
|
2843
|
+
}), Uo = /* @__PURE__ */ d("$ZodIPv4", (e, t) => {
|
|
2844
|
+
t.pattern ?? (t.pattern = Hr), b.init(e, t), e._zod.bag.format = "ipv4";
|
|
2845
|
+
}), Mo = /* @__PURE__ */ d("$ZodIPv6", (e, t) => {
|
|
2846
|
+
t.pattern ?? (t.pattern = Kr), b.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
|
|
2633
2847
|
try {
|
|
2634
2848
|
new URL(`http://[${n.value}]`);
|
|
2635
2849
|
} catch {
|
|
@@ -2642,10 +2856,10 @@ const lo = {
|
|
|
2642
2856
|
});
|
|
2643
2857
|
}
|
|
2644
2858
|
};
|
|
2645
|
-
}),
|
|
2646
|
-
t.pattern ?? (t.pattern =
|
|
2647
|
-
}),
|
|
2648
|
-
t.pattern ?? (t.pattern =
|
|
2859
|
+
}), xo = /* @__PURE__ */ d("$ZodCIDRv4", (e, t) => {
|
|
2860
|
+
t.pattern ?? (t.pattern = Yr), b.init(e, t);
|
|
2861
|
+
}), Fo = /* @__PURE__ */ d("$ZodCIDRv6", (e, t) => {
|
|
2862
|
+
t.pattern ?? (t.pattern = Qr), b.init(e, t), e._zod.check = (n) => {
|
|
2649
2863
|
const r = n.value.split("/");
|
|
2650
2864
|
try {
|
|
2651
2865
|
if (r.length !== 2)
|
|
@@ -2670,7 +2884,7 @@ const lo = {
|
|
|
2670
2884
|
}
|
|
2671
2885
|
};
|
|
2672
2886
|
});
|
|
2673
|
-
function
|
|
2887
|
+
function Tt(e) {
|
|
2674
2888
|
if (e === "")
|
|
2675
2889
|
return !0;
|
|
2676
2890
|
if (e.length % 4 !== 0)
|
|
@@ -2681,9 +2895,9 @@ function bt(e) {
|
|
|
2681
2895
|
return !1;
|
|
2682
2896
|
}
|
|
2683
2897
|
}
|
|
2684
|
-
const
|
|
2685
|
-
t.pattern ?? (t.pattern =
|
|
2686
|
-
|
|
2898
|
+
const Jo = /* @__PURE__ */ d("$ZodBase64", (e, t) => {
|
|
2899
|
+
t.pattern ?? (t.pattern = Xr), b.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
|
|
2900
|
+
Tt(n.value) || n.issues.push({
|
|
2687
2901
|
code: "invalid_format",
|
|
2688
2902
|
format: "base64",
|
|
2689
2903
|
input: n.value,
|
|
@@ -2692,15 +2906,15 @@ const Po = /* @__PURE__ */ d("$ZodBase64", (e, t) => {
|
|
|
2692
2906
|
});
|
|
2693
2907
|
};
|
|
2694
2908
|
});
|
|
2695
|
-
function
|
|
2696
|
-
if (!
|
|
2909
|
+
function qo(e) {
|
|
2910
|
+
if (!wt.test(e))
|
|
2697
2911
|
return !1;
|
|
2698
2912
|
const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
|
|
2699
|
-
return
|
|
2913
|
+
return Tt(n);
|
|
2700
2914
|
}
|
|
2701
|
-
const
|
|
2702
|
-
t.pattern ?? (t.pattern =
|
|
2703
|
-
|
|
2915
|
+
const Vo = /* @__PURE__ */ d("$ZodBase64URL", (e, t) => {
|
|
2916
|
+
t.pattern ?? (t.pattern = wt), b.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
|
|
2917
|
+
qo(n.value) || n.issues.push({
|
|
2704
2918
|
code: "invalid_format",
|
|
2705
2919
|
format: "base64url",
|
|
2706
2920
|
input: n.value,
|
|
@@ -2708,10 +2922,10 @@ const No = /* @__PURE__ */ d("$ZodBase64URL", (e, t) => {
|
|
|
2708
2922
|
continue: !t.abort
|
|
2709
2923
|
});
|
|
2710
2924
|
};
|
|
2711
|
-
}),
|
|
2712
|
-
t.pattern ?? (t.pattern =
|
|
2925
|
+
}), Wo = /* @__PURE__ */ d("$ZodE164", (e, t) => {
|
|
2926
|
+
t.pattern ?? (t.pattern = eo), b.init(e, t);
|
|
2713
2927
|
});
|
|
2714
|
-
function
|
|
2928
|
+
function Go(e, t = null) {
|
|
2715
2929
|
try {
|
|
2716
2930
|
const n = e.split(".");
|
|
2717
2931
|
if (n.length !== 3)
|
|
@@ -2725,9 +2939,9 @@ function Ro(e, t = null) {
|
|
|
2725
2939
|
return !1;
|
|
2726
2940
|
}
|
|
2727
2941
|
}
|
|
2728
|
-
const
|
|
2942
|
+
const Bo = /* @__PURE__ */ d("$ZodJWT", (e, t) => {
|
|
2729
2943
|
b.init(e, t), e._zod.check = (n) => {
|
|
2730
|
-
|
|
2944
|
+
Go(n.value, t.alg) || n.issues.push({
|
|
2731
2945
|
code: "invalid_format",
|
|
2732
2946
|
format: "jwt",
|
|
2733
2947
|
input: n.value,
|
|
@@ -2735,8 +2949,8 @@ const jo = /* @__PURE__ */ d("$ZodJWT", (e, t) => {
|
|
|
2735
2949
|
continue: !t.abort
|
|
2736
2950
|
});
|
|
2737
2951
|
};
|
|
2738
|
-
}),
|
|
2739
|
-
z.init(e, t), e._zod.pattern = e._zod.bag.pattern ??
|
|
2952
|
+
}), Zt = /* @__PURE__ */ d("$ZodNumber", (e, t) => {
|
|
2953
|
+
z.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? zt, e._zod.parse = (n, r) => {
|
|
2740
2954
|
if (t.coerce)
|
|
2741
2955
|
try {
|
|
2742
2956
|
n.value = Number(n.value);
|
|
@@ -2754,10 +2968,10 @@ const jo = /* @__PURE__ */ d("$ZodJWT", (e, t) => {
|
|
|
2754
2968
|
...i ? { received: i } : {}
|
|
2755
2969
|
}), n;
|
|
2756
2970
|
};
|
|
2757
|
-
}),
|
|
2758
|
-
|
|
2759
|
-
}),
|
|
2760
|
-
z.init(e, t), e._zod.pattern =
|
|
2971
|
+
}), Ho = /* @__PURE__ */ d("$ZodNumberFormat", (e, t) => {
|
|
2972
|
+
lo.init(e, t), Zt.init(e, t);
|
|
2973
|
+
}), Ko = /* @__PURE__ */ d("$ZodBoolean", (e, t) => {
|
|
2974
|
+
z.init(e, t), e._zod.pattern = so, e._zod.parse = (n, r) => {
|
|
2761
2975
|
if (t.coerce)
|
|
2762
2976
|
try {
|
|
2763
2977
|
n.value = !!n.value;
|
|
@@ -2771,9 +2985,9 @@ const jo = /* @__PURE__ */ d("$ZodJWT", (e, t) => {
|
|
|
2771
2985
|
inst: e
|
|
2772
2986
|
}), n;
|
|
2773
2987
|
};
|
|
2774
|
-
}),
|
|
2988
|
+
}), Yo = /* @__PURE__ */ d("$ZodUnknown", (e, t) => {
|
|
2775
2989
|
z.init(e, t), e._zod.parse = (n) => n;
|
|
2776
|
-
}),
|
|
2990
|
+
}), Qo = /* @__PURE__ */ d("$ZodNever", (e, t) => {
|
|
2777
2991
|
z.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
|
|
2778
2992
|
expected: "never",
|
|
2779
2993
|
code: "invalid_type",
|
|
@@ -2781,10 +2995,10 @@ const jo = /* @__PURE__ */ d("$ZodJWT", (e, t) => {
|
|
|
2781
2995
|
inst: e
|
|
2782
2996
|
}), n);
|
|
2783
2997
|
});
|
|
2784
|
-
function
|
|
2785
|
-
e.issues.length && t.issues.push(...
|
|
2998
|
+
function Me(e, t, n) {
|
|
2999
|
+
e.issues.length && t.issues.push(...W(n, e.issues)), t.value[n] = e.value;
|
|
2786
3000
|
}
|
|
2787
|
-
const
|
|
3001
|
+
const Xo = /* @__PURE__ */ d("$ZodArray", (e, t) => {
|
|
2788
3002
|
z.init(e, t), e._zod.parse = (n, r) => {
|
|
2789
3003
|
const o = n.value;
|
|
2790
3004
|
if (!Array.isArray(o))
|
|
@@ -2801,25 +3015,25 @@ const Fo = /* @__PURE__ */ d("$ZodArray", (e, t) => {
|
|
|
2801
3015
|
value: a,
|
|
2802
3016
|
issues: []
|
|
2803
3017
|
}, r);
|
|
2804
|
-
c instanceof Promise ? i.push(c.then((u) =>
|
|
3018
|
+
c instanceof Promise ? i.push(c.then((u) => Me(u, n, s))) : Me(c, n, s);
|
|
2805
3019
|
}
|
|
2806
3020
|
return i.length ? Promise.all(i).then(() => n) : n;
|
|
2807
3021
|
};
|
|
2808
3022
|
});
|
|
2809
|
-
function
|
|
3023
|
+
function ae(e, t, n, r, o) {
|
|
2810
3024
|
if (e.issues.length) {
|
|
2811
3025
|
if (o && !(n in r))
|
|
2812
3026
|
return;
|
|
2813
|
-
t.issues.push(...
|
|
3027
|
+
t.issues.push(...W(n, e.issues));
|
|
2814
3028
|
}
|
|
2815
3029
|
e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
2816
3030
|
}
|
|
2817
|
-
function
|
|
3031
|
+
function It(e) {
|
|
2818
3032
|
const t = Object.keys(e.shape);
|
|
2819
3033
|
for (const r of t)
|
|
2820
3034
|
if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
|
|
2821
3035
|
throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
|
|
2822
|
-
const n =
|
|
3036
|
+
const n = _r(e.shape);
|
|
2823
3037
|
return {
|
|
2824
3038
|
...e,
|
|
2825
3039
|
keys: t,
|
|
@@ -2828,7 +3042,7 @@ function zt(e) {
|
|
|
2828
3042
|
optionalKeys: new Set(n)
|
|
2829
3043
|
};
|
|
2830
3044
|
}
|
|
2831
|
-
function
|
|
3045
|
+
function Ot(e, t, n, r, o, i) {
|
|
2832
3046
|
const s = [], a = o.keySet, c = o.catchall._zod, u = c.def.type, l = c.optout === "optional";
|
|
2833
3047
|
for (const f in t) {
|
|
2834
3048
|
if (a.has(f))
|
|
@@ -2838,7 +3052,7 @@ function $t(e, t, n, r, o, i) {
|
|
|
2838
3052
|
continue;
|
|
2839
3053
|
}
|
|
2840
3054
|
const p = c.run({ value: t[f], issues: [] }, r);
|
|
2841
|
-
p instanceof Promise ? e.push(p.then((g) =>
|
|
3055
|
+
p instanceof Promise ? e.push(p.then((g) => ae(g, n, f, t, l))) : ae(p, n, f, t, l);
|
|
2842
3056
|
}
|
|
2843
3057
|
return s.length && n.issues.push({
|
|
2844
3058
|
code: "unrecognized_keys",
|
|
@@ -2847,7 +3061,7 @@ function $t(e, t, n, r, o, i) {
|
|
|
2847
3061
|
inst: i
|
|
2848
3062
|
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
2849
3063
|
}
|
|
2850
|
-
const
|
|
3064
|
+
const ei = /* @__PURE__ */ d("$ZodObject", (e, t) => {
|
|
2851
3065
|
if (z.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
2852
3066
|
const a = t.shape;
|
|
2853
3067
|
Object.defineProperty(t, "shape", {
|
|
@@ -2859,7 +3073,7 @@ const xo = /* @__PURE__ */ d("$ZodObject", (e, t) => {
|
|
|
2859
3073
|
}
|
|
2860
3074
|
});
|
|
2861
3075
|
}
|
|
2862
|
-
const r =
|
|
3076
|
+
const r = ke(() => It(t));
|
|
2863
3077
|
v(e._zod, "propValues", () => {
|
|
2864
3078
|
const a = t.shape, c = {};
|
|
2865
3079
|
for (const u in a) {
|
|
@@ -2872,7 +3086,7 @@ const xo = /* @__PURE__ */ d("$ZodObject", (e, t) => {
|
|
|
2872
3086
|
}
|
|
2873
3087
|
return c;
|
|
2874
3088
|
});
|
|
2875
|
-
const o =
|
|
3089
|
+
const o = se, i = t.catchall;
|
|
2876
3090
|
let s;
|
|
2877
3091
|
e._zod.parse = (a, c) => {
|
|
2878
3092
|
s ?? (s = r.value);
|
|
@@ -2888,72 +3102,72 @@ const xo = /* @__PURE__ */ d("$ZodObject", (e, t) => {
|
|
|
2888
3102
|
const l = [], f = s.shape;
|
|
2889
3103
|
for (const p of s.keys) {
|
|
2890
3104
|
const g = f[p], y = g._zod.optout === "optional", _ = g._zod.run({ value: u[p], issues: [] }, c);
|
|
2891
|
-
_ instanceof Promise ? l.push(_.then((m) =>
|
|
3105
|
+
_ instanceof Promise ? l.push(_.then((m) => ae(m, a, p, u, y))) : ae(_, a, p, u, y);
|
|
2892
3106
|
}
|
|
2893
|
-
return i ?
|
|
3107
|
+
return i ? Ot(l, u, a, c, r.value, e) : l.length ? Promise.all(l).then(() => a) : a;
|
|
2894
3108
|
};
|
|
2895
|
-
}),
|
|
2896
|
-
|
|
2897
|
-
const n = e._zod.parse, r =
|
|
2898
|
-
const g = new
|
|
2899
|
-
const O =
|
|
3109
|
+
}), ti = /* @__PURE__ */ d("$ZodObjectJIT", (e, t) => {
|
|
3110
|
+
ei.init(e, t);
|
|
3111
|
+
const n = e._zod.parse, r = ke(() => It(t)), o = (p) => {
|
|
3112
|
+
const g = new ko(["shape", "payload", "ctx"]), y = r.value, _ = (N) => {
|
|
3113
|
+
const O = Le(N);
|
|
2900
3114
|
return `shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`;
|
|
2901
3115
|
};
|
|
2902
3116
|
g.write("const input = payload.value;");
|
|
2903
3117
|
const m = /* @__PURE__ */ Object.create(null);
|
|
2904
3118
|
let k = 0;
|
|
2905
|
-
for (const
|
|
2906
|
-
m[
|
|
3119
|
+
for (const N of y.keys)
|
|
3120
|
+
m[N] = `key_${k++}`;
|
|
2907
3121
|
g.write("const newResult = {};");
|
|
2908
|
-
for (const
|
|
2909
|
-
const O = m[
|
|
2910
|
-
g.write(`const ${O} = ${_(
|
|
3122
|
+
for (const N of y.keys) {
|
|
3123
|
+
const O = m[N], C = Le(N), Ft = p[N]?._zod?.optout === "optional";
|
|
3124
|
+
g.write(`const ${O} = ${_(N)};`), Ft ? g.write(`
|
|
2911
3125
|
if (${O}.issues.length) {
|
|
2912
|
-
if (${
|
|
3126
|
+
if (${C} in input) {
|
|
2913
3127
|
payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
|
|
2914
3128
|
...iss,
|
|
2915
|
-
path: iss.path ? [${
|
|
3129
|
+
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
2916
3130
|
})));
|
|
2917
3131
|
}
|
|
2918
3132
|
}
|
|
2919
3133
|
|
|
2920
3134
|
if (${O}.value === undefined) {
|
|
2921
|
-
if (${
|
|
2922
|
-
newResult[${
|
|
3135
|
+
if (${C} in input) {
|
|
3136
|
+
newResult[${C}] = undefined;
|
|
2923
3137
|
}
|
|
2924
3138
|
} else {
|
|
2925
|
-
newResult[${
|
|
3139
|
+
newResult[${C}] = ${O}.value;
|
|
2926
3140
|
}
|
|
2927
3141
|
|
|
2928
3142
|
`) : g.write(`
|
|
2929
3143
|
if (${O}.issues.length) {
|
|
2930
3144
|
payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
|
|
2931
3145
|
...iss,
|
|
2932
|
-
path: iss.path ? [${
|
|
3146
|
+
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
2933
3147
|
})));
|
|
2934
3148
|
}
|
|
2935
3149
|
|
|
2936
3150
|
if (${O}.value === undefined) {
|
|
2937
|
-
if (${
|
|
2938
|
-
newResult[${
|
|
3151
|
+
if (${C} in input) {
|
|
3152
|
+
newResult[${C}] = undefined;
|
|
2939
3153
|
}
|
|
2940
3154
|
} else {
|
|
2941
|
-
newResult[${
|
|
3155
|
+
newResult[${C}] = ${O}.value;
|
|
2942
3156
|
}
|
|
2943
3157
|
|
|
2944
3158
|
`);
|
|
2945
3159
|
}
|
|
2946
3160
|
g.write("payload.value = newResult;"), g.write("return payload;");
|
|
2947
3161
|
const I = g.compile();
|
|
2948
|
-
return (
|
|
3162
|
+
return (N, O) => I(p, N, O);
|
|
2949
3163
|
};
|
|
2950
3164
|
let i;
|
|
2951
|
-
const s =
|
|
3165
|
+
const s = se, a = !pt.jitless, u = a && hr.value, l = t.catchall;
|
|
2952
3166
|
let f;
|
|
2953
3167
|
e._zod.parse = (p, g) => {
|
|
2954
3168
|
f ?? (f = r.value);
|
|
2955
3169
|
const y = p.value;
|
|
2956
|
-
return s(y) ? a && u && g?.async === !1 && g.jitless !== !0 ? (i || (i = o(t.shape)), p = i(p, g), l ?
|
|
3170
|
+
return s(y) ? a && u && g?.async === !1 && g.jitless !== !0 ? (i || (i = o(t.shape)), p = i(p, g), l ? Ot([], y, p, g, f, e) : p) : n(p, g) : (p.issues.push({
|
|
2957
3171
|
expected: "object",
|
|
2958
3172
|
code: "invalid_type",
|
|
2959
3173
|
input: y,
|
|
@@ -2961,7 +3175,7 @@ const xo = /* @__PURE__ */ d("$ZodObject", (e, t) => {
|
|
|
2961
3175
|
}), p);
|
|
2962
3176
|
};
|
|
2963
3177
|
});
|
|
2964
|
-
function
|
|
3178
|
+
function xe(e, t, n, r) {
|
|
2965
3179
|
for (const i of e)
|
|
2966
3180
|
if (i.issues.length === 0)
|
|
2967
3181
|
return t.value = i.value, t;
|
|
@@ -2973,14 +3187,14 @@ function De(e, t, n, r) {
|
|
|
2973
3187
|
errors: e.map((i) => i.issues.map((s) => U(s, r, L())))
|
|
2974
3188
|
}), t);
|
|
2975
3189
|
}
|
|
2976
|
-
const
|
|
3190
|
+
const ni = /* @__PURE__ */ d("$ZodUnion", (e, t) => {
|
|
2977
3191
|
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", () => {
|
|
2978
3192
|
if (t.options.every((o) => o._zod.values))
|
|
2979
3193
|
return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
|
|
2980
3194
|
}), v(e._zod, "pattern", () => {
|
|
2981
3195
|
if (t.options.every((o) => o._zod.pattern)) {
|
|
2982
3196
|
const o = t.options.map((i) => i._zod.pattern);
|
|
2983
|
-
return new RegExp(`^(${o.map((i) =>
|
|
3197
|
+
return new RegExp(`^(${o.map((i) => Se(i.source)).join("|")})$`);
|
|
2984
3198
|
}
|
|
2985
3199
|
});
|
|
2986
3200
|
const n = t.options.length === 1, r = t.options[0]._zod.run;
|
|
@@ -3002,23 +3216,23 @@ const qo = /* @__PURE__ */ d("$ZodUnion", (e, t) => {
|
|
|
3002
3216
|
a.push(u);
|
|
3003
3217
|
}
|
|
3004
3218
|
}
|
|
3005
|
-
return s ? Promise.all(a).then((c) =>
|
|
3219
|
+
return s ? Promise.all(a).then((c) => xe(c, o, e, i)) : xe(a, o, e, i);
|
|
3006
3220
|
};
|
|
3007
|
-
}),
|
|
3221
|
+
}), ri = /* @__PURE__ */ d("$ZodIntersection", (e, t) => {
|
|
3008
3222
|
z.init(e, t), e._zod.parse = (n, r) => {
|
|
3009
3223
|
const o = n.value, i = t.left._zod.run({ value: o, issues: [] }, r), s = t.right._zod.run({ value: o, issues: [] }, r);
|
|
3010
|
-
return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([c, u]) =>
|
|
3224
|
+
return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([c, u]) => Fe(n, c, u)) : Fe(n, i, s);
|
|
3011
3225
|
};
|
|
3012
3226
|
});
|
|
3013
|
-
function
|
|
3227
|
+
function ye(e, t) {
|
|
3014
3228
|
if (e === t)
|
|
3015
3229
|
return { valid: !0, data: e };
|
|
3016
3230
|
if (e instanceof Date && t instanceof Date && +e == +t)
|
|
3017
3231
|
return { valid: !0, data: e };
|
|
3018
|
-
if (
|
|
3232
|
+
if (B(e) && B(t)) {
|
|
3019
3233
|
const n = Object.keys(t), r = Object.keys(e).filter((i) => n.indexOf(i) !== -1), o = { ...e, ...t };
|
|
3020
3234
|
for (const i of r) {
|
|
3021
|
-
const s =
|
|
3235
|
+
const s = ye(e[i], t[i]);
|
|
3022
3236
|
if (!s.valid)
|
|
3023
3237
|
return {
|
|
3024
3238
|
valid: !1,
|
|
@@ -3033,7 +3247,7 @@ function he(e, t) {
|
|
|
3033
3247
|
return { valid: !1, mergeErrorPath: [] };
|
|
3034
3248
|
const n = [];
|
|
3035
3249
|
for (let r = 0; r < e.length; r++) {
|
|
3036
|
-
const o = e[r], i = t[r], s =
|
|
3250
|
+
const o = e[r], i = t[r], s = ye(o, i);
|
|
3037
3251
|
if (!s.valid)
|
|
3038
3252
|
return {
|
|
3039
3253
|
valid: !1,
|
|
@@ -3045,7 +3259,7 @@ function he(e, t) {
|
|
|
3045
3259
|
}
|
|
3046
3260
|
return { valid: !1, mergeErrorPath: [] };
|
|
3047
3261
|
}
|
|
3048
|
-
function
|
|
3262
|
+
function Fe(e, t, n) {
|
|
3049
3263
|
const r = /* @__PURE__ */ new Map();
|
|
3050
3264
|
let o;
|
|
3051
3265
|
for (const a of t.issues)
|
|
@@ -3064,15 +3278,15 @@ function Le(e, t, n) {
|
|
|
3064
3278
|
const i = [...r].filter(([, a]) => a.l && a.r).map(([a]) => a);
|
|
3065
3279
|
if (i.length && o && e.issues.push({ ...o, keys: i }), V(e))
|
|
3066
3280
|
return e;
|
|
3067
|
-
const s =
|
|
3281
|
+
const s = ye(t.value, n.value);
|
|
3068
3282
|
if (!s.valid)
|
|
3069
3283
|
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);
|
|
3070
3284
|
return e.value = s.data, e;
|
|
3071
3285
|
}
|
|
3072
|
-
const
|
|
3286
|
+
const oi = /* @__PURE__ */ d("$ZodRecord", (e, t) => {
|
|
3073
3287
|
z.init(e, t), e._zod.parse = (n, r) => {
|
|
3074
3288
|
const o = n.value;
|
|
3075
|
-
if (!
|
|
3289
|
+
if (!B(o))
|
|
3076
3290
|
return n.issues.push({
|
|
3077
3291
|
expected: "record",
|
|
3078
3292
|
code: "invalid_type",
|
|
@@ -3088,8 +3302,8 @@ const Go = /* @__PURE__ */ d("$ZodRecord", (e, t) => {
|
|
|
3088
3302
|
a.add(typeof u == "number" ? u.toString() : u);
|
|
3089
3303
|
const l = t.valueType._zod.run({ value: o[u], issues: [] }, r);
|
|
3090
3304
|
l instanceof Promise ? i.push(l.then((f) => {
|
|
3091
|
-
f.issues.length && n.issues.push(...
|
|
3092
|
-
})) : (l.issues.length && n.issues.push(...
|
|
3305
|
+
f.issues.length && n.issues.push(...W(u, f.issues)), n.value[u] = f.value;
|
|
3306
|
+
})) : (l.issues.length && n.issues.push(...W(u, l.issues)), n.value[u] = l.value);
|
|
3093
3307
|
}
|
|
3094
3308
|
let c;
|
|
3095
3309
|
for (const u in o)
|
|
@@ -3108,7 +3322,7 @@ const Go = /* @__PURE__ */ d("$ZodRecord", (e, t) => {
|
|
|
3108
3322
|
let c = t.keyType._zod.run({ value: a, issues: [] }, r);
|
|
3109
3323
|
if (c instanceof Promise)
|
|
3110
3324
|
throw new Error("Async schemas not supported in object keys currently");
|
|
3111
|
-
if (typeof a == "string" &&
|
|
3325
|
+
if (typeof a == "string" && zt.test(a) && c.issues.length) {
|
|
3112
3326
|
const f = t.keyType._zod.run({ value: Number(a), issues: [] }, r);
|
|
3113
3327
|
if (f instanceof Promise)
|
|
3114
3328
|
throw new Error("Async schemas not supported in object keys currently");
|
|
@@ -3127,16 +3341,16 @@ const Go = /* @__PURE__ */ d("$ZodRecord", (e, t) => {
|
|
|
3127
3341
|
}
|
|
3128
3342
|
const l = t.valueType._zod.run({ value: o[a], issues: [] }, r);
|
|
3129
3343
|
l instanceof Promise ? i.push(l.then((f) => {
|
|
3130
|
-
f.issues.length && n.issues.push(...
|
|
3131
|
-
})) : (l.issues.length && n.issues.push(...
|
|
3344
|
+
f.issues.length && n.issues.push(...W(a, f.issues)), n.value[c.value] = f.value;
|
|
3345
|
+
})) : (l.issues.length && n.issues.push(...W(a, l.issues)), n.value[c.value] = l.value);
|
|
3132
3346
|
}
|
|
3133
3347
|
}
|
|
3134
3348
|
return i.length ? Promise.all(i).then(() => n) : n;
|
|
3135
3349
|
};
|
|
3136
|
-
}),
|
|
3350
|
+
}), ii = /* @__PURE__ */ d("$ZodEnum", (e, t) => {
|
|
3137
3351
|
z.init(e, t);
|
|
3138
|
-
const n =
|
|
3139
|
-
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) =>
|
|
3352
|
+
const n = gt(t.entries), r = new Set(n);
|
|
3353
|
+
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => mr.has(typeof o)).map((o) => typeof o == "string" ? H(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => {
|
|
3140
3354
|
const s = o.value;
|
|
3141
3355
|
return r.has(s) || o.issues.push({
|
|
3142
3356
|
code: "invalid_value",
|
|
@@ -3145,7 +3359,7 @@ const Go = /* @__PURE__ */ d("$ZodRecord", (e, t) => {
|
|
|
3145
3359
|
inst: e
|
|
3146
3360
|
}), o;
|
|
3147
3361
|
};
|
|
3148
|
-
}),
|
|
3362
|
+
}), si = /* @__PURE__ */ d("$ZodLiteral", (e, t) => {
|
|
3149
3363
|
if (z.init(e, t), t.values.length === 0)
|
|
3150
3364
|
throw new Error("Cannot create literal schema with no valid values");
|
|
3151
3365
|
const n = new Set(t.values);
|
|
@@ -3158,64 +3372,64 @@ const Go = /* @__PURE__ */ d("$ZodRecord", (e, t) => {
|
|
|
3158
3372
|
inst: e
|
|
3159
3373
|
}), r;
|
|
3160
3374
|
};
|
|
3161
|
-
}),
|
|
3375
|
+
}), ai = /* @__PURE__ */ d("$ZodTransform", (e, t) => {
|
|
3162
3376
|
z.init(e, t), e._zod.parse = (n, r) => {
|
|
3163
3377
|
if (r.direction === "backward")
|
|
3164
|
-
throw new
|
|
3378
|
+
throw new ft(e.constructor.name);
|
|
3165
3379
|
const o = t.transform(n.value, n);
|
|
3166
3380
|
if (r.async)
|
|
3167
3381
|
return (o instanceof Promise ? o : Promise.resolve(o)).then((s) => (n.value = s, n));
|
|
3168
3382
|
if (o instanceof Promise)
|
|
3169
|
-
throw new
|
|
3383
|
+
throw new G();
|
|
3170
3384
|
return n.value = o, n;
|
|
3171
3385
|
};
|
|
3172
3386
|
});
|
|
3173
|
-
function
|
|
3387
|
+
function Je(e, t) {
|
|
3174
3388
|
return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
|
|
3175
3389
|
}
|
|
3176
|
-
const
|
|
3390
|
+
const At = /* @__PURE__ */ d("$ZodOptional", (e, t) => {
|
|
3177
3391
|
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", () => {
|
|
3178
3392
|
const n = t.innerType._zod.pattern;
|
|
3179
|
-
return n ? new RegExp(`^(${
|
|
3393
|
+
return n ? new RegExp(`^(${Se(n.source)})?$`) : void 0;
|
|
3180
3394
|
}), e._zod.parse = (n, r) => {
|
|
3181
3395
|
if (t.innerType._zod.optin === "optional") {
|
|
3182
3396
|
const o = t.innerType._zod.run(n, r);
|
|
3183
|
-
return o instanceof Promise ? o.then((i) =>
|
|
3397
|
+
return o instanceof Promise ? o.then((i) => Je(i, n.value)) : Je(o, n.value);
|
|
3184
3398
|
}
|
|
3185
3399
|
return n.value === void 0 ? n : t.innerType._zod.run(n, r);
|
|
3186
3400
|
};
|
|
3187
|
-
}),
|
|
3188
|
-
|
|
3189
|
-
}),
|
|
3401
|
+
}), ci = /* @__PURE__ */ d("$ZodExactOptional", (e, t) => {
|
|
3402
|
+
At.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);
|
|
3403
|
+
}), ui = /* @__PURE__ */ d("$ZodNullable", (e, t) => {
|
|
3190
3404
|
z.init(e, t), v(e._zod, "optin", () => t.innerType._zod.optin), v(e._zod, "optout", () => t.innerType._zod.optout), v(e._zod, "pattern", () => {
|
|
3191
3405
|
const n = t.innerType._zod.pattern;
|
|
3192
|
-
return n ? new RegExp(`^(${
|
|
3406
|
+
return n ? new RegExp(`^(${Se(n.source)}|null)$`) : void 0;
|
|
3193
3407
|
}), 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);
|
|
3194
|
-
}),
|
|
3408
|
+
}), di = /* @__PURE__ */ d("$ZodDefault", (e, t) => {
|
|
3195
3409
|
z.init(e, t), e._zod.optin = "optional", v(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
|
|
3196
3410
|
if (r.direction === "backward")
|
|
3197
3411
|
return t.innerType._zod.run(n, r);
|
|
3198
3412
|
if (n.value === void 0)
|
|
3199
3413
|
return n.value = t.defaultValue, n;
|
|
3200
3414
|
const o = t.innerType._zod.run(n, r);
|
|
3201
|
-
return o instanceof Promise ? o.then((i) =>
|
|
3415
|
+
return o instanceof Promise ? o.then((i) => qe(i, t)) : qe(o, t);
|
|
3202
3416
|
};
|
|
3203
3417
|
});
|
|
3204
|
-
function
|
|
3418
|
+
function qe(e, t) {
|
|
3205
3419
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
3206
3420
|
}
|
|
3207
|
-
const
|
|
3421
|
+
const li = /* @__PURE__ */ d("$ZodPrefault", (e, t) => {
|
|
3208
3422
|
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));
|
|
3209
|
-
}),
|
|
3423
|
+
}), fi = /* @__PURE__ */ d("$ZodNonOptional", (e, t) => {
|
|
3210
3424
|
z.init(e, t), v(e._zod, "values", () => {
|
|
3211
3425
|
const n = t.innerType._zod.values;
|
|
3212
3426
|
return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
|
|
3213
3427
|
}), e._zod.parse = (n, r) => {
|
|
3214
3428
|
const o = t.innerType._zod.run(n, r);
|
|
3215
|
-
return o instanceof Promise ? o.then((i) =>
|
|
3429
|
+
return o instanceof Promise ? o.then((i) => Ve(i, e)) : Ve(o, e);
|
|
3216
3430
|
};
|
|
3217
3431
|
});
|
|
3218
|
-
function
|
|
3432
|
+
function Ve(e, t) {
|
|
3219
3433
|
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
3220
3434
|
code: "invalid_type",
|
|
3221
3435
|
expected: "nonoptional",
|
|
@@ -3223,7 +3437,7 @@ function Fe(e, t) {
|
|
|
3223
3437
|
inst: t
|
|
3224
3438
|
}), e;
|
|
3225
3439
|
}
|
|
3226
|
-
const
|
|
3440
|
+
const pi = /* @__PURE__ */ d("$ZodCatch", (e, t) => {
|
|
3227
3441
|
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) => {
|
|
3228
3442
|
if (r.direction === "backward")
|
|
3229
3443
|
return t.innerType._zod.run(n, r);
|
|
@@ -3242,39 +3456,39 @@ const ti = /* @__PURE__ */ d("$ZodCatch", (e, t) => {
|
|
|
3242
3456
|
input: n.value
|
|
3243
3457
|
}), n.issues = []), n);
|
|
3244
3458
|
};
|
|
3245
|
-
}),
|
|
3459
|
+
}), gi = /* @__PURE__ */ d("$ZodPipe", (e, t) => {
|
|
3246
3460
|
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) => {
|
|
3247
3461
|
if (r.direction === "backward") {
|
|
3248
3462
|
const i = t.out._zod.run(n, r);
|
|
3249
|
-
return i instanceof Promise ? i.then((s) =>
|
|
3463
|
+
return i instanceof Promise ? i.then((s) => oe(s, t.in, r)) : oe(i, t.in, r);
|
|
3250
3464
|
}
|
|
3251
3465
|
const o = t.in._zod.run(n, r);
|
|
3252
|
-
return o instanceof Promise ? o.then((i) =>
|
|
3466
|
+
return o instanceof Promise ? o.then((i) => oe(i, t.out, r)) : oe(o, t.out, r);
|
|
3253
3467
|
};
|
|
3254
3468
|
});
|
|
3255
|
-
function
|
|
3469
|
+
function oe(e, t, n) {
|
|
3256
3470
|
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
|
|
3257
3471
|
}
|
|
3258
|
-
const
|
|
3472
|
+
const hi = /* @__PURE__ */ d("$ZodReadonly", (e, t) => {
|
|
3259
3473
|
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) => {
|
|
3260
3474
|
if (r.direction === "backward")
|
|
3261
3475
|
return t.innerType._zod.run(n, r);
|
|
3262
3476
|
const o = t.innerType._zod.run(n, r);
|
|
3263
|
-
return o instanceof Promise ? o.then(
|
|
3477
|
+
return o instanceof Promise ? o.then(We) : We(o);
|
|
3264
3478
|
};
|
|
3265
3479
|
});
|
|
3266
|
-
function
|
|
3480
|
+
function We(e) {
|
|
3267
3481
|
return e.value = Object.freeze(e.value), e;
|
|
3268
3482
|
}
|
|
3269
|
-
const
|
|
3270
|
-
|
|
3483
|
+
const mi = /* @__PURE__ */ d("$ZodCustom", (e, t) => {
|
|
3484
|
+
A.init(e, t), z.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
|
|
3271
3485
|
const r = n.value, o = t.fn(r);
|
|
3272
3486
|
if (o instanceof Promise)
|
|
3273
|
-
return o.then((i) =>
|
|
3274
|
-
|
|
3487
|
+
return o.then((i) => Ge(i, n, r, e));
|
|
3488
|
+
Ge(o, n, r, e);
|
|
3275
3489
|
};
|
|
3276
3490
|
});
|
|
3277
|
-
function
|
|
3491
|
+
function Ge(e, t, n, r) {
|
|
3278
3492
|
if (!e) {
|
|
3279
3493
|
const o = {
|
|
3280
3494
|
code: "custom",
|
|
@@ -3286,11 +3500,11 @@ function Je(e, t, n, r) {
|
|
|
3286
3500
|
continue: !r._zod.def.abort
|
|
3287
3501
|
// params: inst._zod.def.params,
|
|
3288
3502
|
};
|
|
3289
|
-
r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(
|
|
3503
|
+
r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(ne(o));
|
|
3290
3504
|
}
|
|
3291
3505
|
}
|
|
3292
|
-
var
|
|
3293
|
-
class
|
|
3506
|
+
var Be;
|
|
3507
|
+
class _i {
|
|
3294
3508
|
constructor() {
|
|
3295
3509
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
3296
3510
|
}
|
|
@@ -3319,20 +3533,20 @@ class ii {
|
|
|
3319
3533
|
return this._map.has(t);
|
|
3320
3534
|
}
|
|
3321
3535
|
}
|
|
3322
|
-
function
|
|
3323
|
-
return new
|
|
3536
|
+
function yi() {
|
|
3537
|
+
return new _i();
|
|
3324
3538
|
}
|
|
3325
|
-
(
|
|
3326
|
-
const
|
|
3539
|
+
(Be = globalThis).__zod_globalRegistry ?? (Be.__zod_globalRegistry = yi());
|
|
3540
|
+
const ee = globalThis.__zod_globalRegistry;
|
|
3327
3541
|
// @__NO_SIDE_EFFECTS__
|
|
3328
|
-
function
|
|
3542
|
+
function vi(e, t) {
|
|
3329
3543
|
return new e({
|
|
3330
3544
|
type: "string",
|
|
3331
3545
|
...h(t)
|
|
3332
3546
|
});
|
|
3333
3547
|
}
|
|
3334
3548
|
// @__NO_SIDE_EFFECTS__
|
|
3335
|
-
function
|
|
3549
|
+
function wi(e, t) {
|
|
3336
3550
|
return new e({
|
|
3337
3551
|
type: "string",
|
|
3338
3552
|
format: "email",
|
|
@@ -3342,7 +3556,7 @@ function ci(e, t) {
|
|
|
3342
3556
|
});
|
|
3343
3557
|
}
|
|
3344
3558
|
// @__NO_SIDE_EFFECTS__
|
|
3345
|
-
function
|
|
3559
|
+
function He(e, t) {
|
|
3346
3560
|
return new e({
|
|
3347
3561
|
type: "string",
|
|
3348
3562
|
format: "guid",
|
|
@@ -3352,7 +3566,7 @@ function Ve(e, t) {
|
|
|
3352
3566
|
});
|
|
3353
3567
|
}
|
|
3354
3568
|
// @__NO_SIDE_EFFECTS__
|
|
3355
|
-
function
|
|
3569
|
+
function bi(e, t) {
|
|
3356
3570
|
return new e({
|
|
3357
3571
|
type: "string",
|
|
3358
3572
|
format: "uuid",
|
|
@@ -3362,7 +3576,7 @@ function ui(e, t) {
|
|
|
3362
3576
|
});
|
|
3363
3577
|
}
|
|
3364
3578
|
// @__NO_SIDE_EFFECTS__
|
|
3365
|
-
function
|
|
3579
|
+
function ki(e, t) {
|
|
3366
3580
|
return new e({
|
|
3367
3581
|
type: "string",
|
|
3368
3582
|
format: "uuid",
|
|
@@ -3373,7 +3587,7 @@ function di(e, t) {
|
|
|
3373
3587
|
});
|
|
3374
3588
|
}
|
|
3375
3589
|
// @__NO_SIDE_EFFECTS__
|
|
3376
|
-
function
|
|
3590
|
+
function zi(e, t) {
|
|
3377
3591
|
return new e({
|
|
3378
3592
|
type: "string",
|
|
3379
3593
|
format: "uuid",
|
|
@@ -3384,7 +3598,7 @@ function li(e, t) {
|
|
|
3384
3598
|
});
|
|
3385
3599
|
}
|
|
3386
3600
|
// @__NO_SIDE_EFFECTS__
|
|
3387
|
-
function
|
|
3601
|
+
function Si(e, t) {
|
|
3388
3602
|
return new e({
|
|
3389
3603
|
type: "string",
|
|
3390
3604
|
format: "uuid",
|
|
@@ -3395,7 +3609,7 @@ function fi(e, t) {
|
|
|
3395
3609
|
});
|
|
3396
3610
|
}
|
|
3397
3611
|
// @__NO_SIDE_EFFECTS__
|
|
3398
|
-
function
|
|
3612
|
+
function $i(e, t) {
|
|
3399
3613
|
return new e({
|
|
3400
3614
|
type: "string",
|
|
3401
3615
|
format: "url",
|
|
@@ -3405,7 +3619,7 @@ function pi(e, t) {
|
|
|
3405
3619
|
});
|
|
3406
3620
|
}
|
|
3407
3621
|
// @__NO_SIDE_EFFECTS__
|
|
3408
|
-
function
|
|
3622
|
+
function Ei(e, t) {
|
|
3409
3623
|
return new e({
|
|
3410
3624
|
type: "string",
|
|
3411
3625
|
format: "emoji",
|
|
@@ -3415,7 +3629,7 @@ function gi(e, t) {
|
|
|
3415
3629
|
});
|
|
3416
3630
|
}
|
|
3417
3631
|
// @__NO_SIDE_EFFECTS__
|
|
3418
|
-
function
|
|
3632
|
+
function Ti(e, t) {
|
|
3419
3633
|
return new e({
|
|
3420
3634
|
type: "string",
|
|
3421
3635
|
format: "nanoid",
|
|
@@ -3425,7 +3639,7 @@ function hi(e, t) {
|
|
|
3425
3639
|
});
|
|
3426
3640
|
}
|
|
3427
3641
|
// @__NO_SIDE_EFFECTS__
|
|
3428
|
-
function
|
|
3642
|
+
function Zi(e, t) {
|
|
3429
3643
|
return new e({
|
|
3430
3644
|
type: "string",
|
|
3431
3645
|
format: "cuid",
|
|
@@ -3435,7 +3649,7 @@ function mi(e, t) {
|
|
|
3435
3649
|
});
|
|
3436
3650
|
}
|
|
3437
3651
|
// @__NO_SIDE_EFFECTS__
|
|
3438
|
-
function
|
|
3652
|
+
function Ii(e, t) {
|
|
3439
3653
|
return new e({
|
|
3440
3654
|
type: "string",
|
|
3441
3655
|
format: "cuid2",
|
|
@@ -3445,7 +3659,7 @@ function _i(e, t) {
|
|
|
3445
3659
|
});
|
|
3446
3660
|
}
|
|
3447
3661
|
// @__NO_SIDE_EFFECTS__
|
|
3448
|
-
function
|
|
3662
|
+
function Oi(e, t) {
|
|
3449
3663
|
return new e({
|
|
3450
3664
|
type: "string",
|
|
3451
3665
|
format: "ulid",
|
|
@@ -3455,7 +3669,7 @@ function yi(e, t) {
|
|
|
3455
3669
|
});
|
|
3456
3670
|
}
|
|
3457
3671
|
// @__NO_SIDE_EFFECTS__
|
|
3458
|
-
function
|
|
3672
|
+
function Ai(e, t) {
|
|
3459
3673
|
return new e({
|
|
3460
3674
|
type: "string",
|
|
3461
3675
|
format: "xid",
|
|
@@ -3465,7 +3679,7 @@ function vi(e, t) {
|
|
|
3465
3679
|
});
|
|
3466
3680
|
}
|
|
3467
3681
|
// @__NO_SIDE_EFFECTS__
|
|
3468
|
-
function
|
|
3682
|
+
function Pi(e, t) {
|
|
3469
3683
|
return new e({
|
|
3470
3684
|
type: "string",
|
|
3471
3685
|
format: "ksuid",
|
|
@@ -3475,7 +3689,7 @@ function wi(e, t) {
|
|
|
3475
3689
|
});
|
|
3476
3690
|
}
|
|
3477
3691
|
// @__NO_SIDE_EFFECTS__
|
|
3478
|
-
function
|
|
3692
|
+
function Ci(e, t) {
|
|
3479
3693
|
return new e({
|
|
3480
3694
|
type: "string",
|
|
3481
3695
|
format: "ipv4",
|
|
@@ -3485,7 +3699,7 @@ function bi(e, t) {
|
|
|
3485
3699
|
});
|
|
3486
3700
|
}
|
|
3487
3701
|
// @__NO_SIDE_EFFECTS__
|
|
3488
|
-
function
|
|
3702
|
+
function Ni(e, t) {
|
|
3489
3703
|
return new e({
|
|
3490
3704
|
type: "string",
|
|
3491
3705
|
format: "ipv6",
|
|
@@ -3495,7 +3709,7 @@ function ki(e, t) {
|
|
|
3495
3709
|
});
|
|
3496
3710
|
}
|
|
3497
3711
|
// @__NO_SIDE_EFFECTS__
|
|
3498
|
-
function
|
|
3712
|
+
function Ri(e, t) {
|
|
3499
3713
|
return new e({
|
|
3500
3714
|
type: "string",
|
|
3501
3715
|
format: "cidrv4",
|
|
@@ -3505,7 +3719,7 @@ function zi(e, t) {
|
|
|
3505
3719
|
});
|
|
3506
3720
|
}
|
|
3507
3721
|
// @__NO_SIDE_EFFECTS__
|
|
3508
|
-
function
|
|
3722
|
+
function Di(e, t) {
|
|
3509
3723
|
return new e({
|
|
3510
3724
|
type: "string",
|
|
3511
3725
|
format: "cidrv6",
|
|
@@ -3515,7 +3729,7 @@ function $i(e, t) {
|
|
|
3515
3729
|
});
|
|
3516
3730
|
}
|
|
3517
3731
|
// @__NO_SIDE_EFFECTS__
|
|
3518
|
-
function
|
|
3732
|
+
function ji(e, t) {
|
|
3519
3733
|
return new e({
|
|
3520
3734
|
type: "string",
|
|
3521
3735
|
format: "base64",
|
|
@@ -3525,7 +3739,7 @@ function Si(e, t) {
|
|
|
3525
3739
|
});
|
|
3526
3740
|
}
|
|
3527
3741
|
// @__NO_SIDE_EFFECTS__
|
|
3528
|
-
function
|
|
3742
|
+
function Li(e, t) {
|
|
3529
3743
|
return new e({
|
|
3530
3744
|
type: "string",
|
|
3531
3745
|
format: "base64url",
|
|
@@ -3535,7 +3749,7 @@ function Ei(e, t) {
|
|
|
3535
3749
|
});
|
|
3536
3750
|
}
|
|
3537
3751
|
// @__NO_SIDE_EFFECTS__
|
|
3538
|
-
function
|
|
3752
|
+
function Ui(e, t) {
|
|
3539
3753
|
return new e({
|
|
3540
3754
|
type: "string",
|
|
3541
3755
|
format: "e164",
|
|
@@ -3545,7 +3759,7 @@ function Zi(e, t) {
|
|
|
3545
3759
|
});
|
|
3546
3760
|
}
|
|
3547
3761
|
// @__NO_SIDE_EFFECTS__
|
|
3548
|
-
function
|
|
3762
|
+
function Mi(e, t) {
|
|
3549
3763
|
return new e({
|
|
3550
3764
|
type: "string",
|
|
3551
3765
|
format: "jwt",
|
|
@@ -3555,7 +3769,7 @@ function Ti(e, t) {
|
|
|
3555
3769
|
});
|
|
3556
3770
|
}
|
|
3557
3771
|
// @__NO_SIDE_EFFECTS__
|
|
3558
|
-
function
|
|
3772
|
+
function xi(e, t) {
|
|
3559
3773
|
return new e({
|
|
3560
3774
|
type: "string",
|
|
3561
3775
|
format: "datetime",
|
|
@@ -3567,7 +3781,7 @@ function Ii(e, t) {
|
|
|
3567
3781
|
});
|
|
3568
3782
|
}
|
|
3569
3783
|
// @__NO_SIDE_EFFECTS__
|
|
3570
|
-
function
|
|
3784
|
+
function Fi(e, t) {
|
|
3571
3785
|
return new e({
|
|
3572
3786
|
type: "string",
|
|
3573
3787
|
format: "date",
|
|
@@ -3576,7 +3790,7 @@ function Oi(e, t) {
|
|
|
3576
3790
|
});
|
|
3577
3791
|
}
|
|
3578
3792
|
// @__NO_SIDE_EFFECTS__
|
|
3579
|
-
function
|
|
3793
|
+
function Ji(e, t) {
|
|
3580
3794
|
return new e({
|
|
3581
3795
|
type: "string",
|
|
3582
3796
|
format: "time",
|
|
@@ -3586,7 +3800,7 @@ function Pi(e, t) {
|
|
|
3586
3800
|
});
|
|
3587
3801
|
}
|
|
3588
3802
|
// @__NO_SIDE_EFFECTS__
|
|
3589
|
-
function
|
|
3803
|
+
function qi(e, t) {
|
|
3590
3804
|
return new e({
|
|
3591
3805
|
type: "string",
|
|
3592
3806
|
format: "duration",
|
|
@@ -3595,7 +3809,7 @@ function Ai(e, t) {
|
|
|
3595
3809
|
});
|
|
3596
3810
|
}
|
|
3597
3811
|
// @__NO_SIDE_EFFECTS__
|
|
3598
|
-
function
|
|
3812
|
+
function Vi(e, t) {
|
|
3599
3813
|
return new e({
|
|
3600
3814
|
type: "number",
|
|
3601
3815
|
checks: [],
|
|
@@ -3603,7 +3817,7 @@ function Ni(e, t) {
|
|
|
3603
3817
|
});
|
|
3604
3818
|
}
|
|
3605
3819
|
// @__NO_SIDE_EFFECTS__
|
|
3606
|
-
function
|
|
3820
|
+
function Wi(e, t) {
|
|
3607
3821
|
return new e({
|
|
3608
3822
|
type: "number",
|
|
3609
3823
|
check: "number_format",
|
|
@@ -3613,28 +3827,28 @@ function Ci(e, t) {
|
|
|
3613
3827
|
});
|
|
3614
3828
|
}
|
|
3615
3829
|
// @__NO_SIDE_EFFECTS__
|
|
3616
|
-
function
|
|
3830
|
+
function Gi(e, t) {
|
|
3617
3831
|
return new e({
|
|
3618
3832
|
type: "boolean",
|
|
3619
3833
|
...h(t)
|
|
3620
3834
|
});
|
|
3621
3835
|
}
|
|
3622
3836
|
// @__NO_SIDE_EFFECTS__
|
|
3623
|
-
function
|
|
3837
|
+
function Bi(e) {
|
|
3624
3838
|
return new e({
|
|
3625
3839
|
type: "unknown"
|
|
3626
3840
|
});
|
|
3627
3841
|
}
|
|
3628
3842
|
// @__NO_SIDE_EFFECTS__
|
|
3629
|
-
function
|
|
3843
|
+
function Hi(e, t) {
|
|
3630
3844
|
return new e({
|
|
3631
3845
|
type: "never",
|
|
3632
3846
|
...h(t)
|
|
3633
3847
|
});
|
|
3634
3848
|
}
|
|
3635
3849
|
// @__NO_SIDE_EFFECTS__
|
|
3636
|
-
function
|
|
3637
|
-
return new
|
|
3850
|
+
function Ke(e, t) {
|
|
3851
|
+
return new $t({
|
|
3638
3852
|
check: "less_than",
|
|
3639
3853
|
...h(t),
|
|
3640
3854
|
value: e,
|
|
@@ -3642,8 +3856,8 @@ function Ge(e, t) {
|
|
|
3642
3856
|
});
|
|
3643
3857
|
}
|
|
3644
3858
|
// @__NO_SIDE_EFFECTS__
|
|
3645
|
-
function
|
|
3646
|
-
return new
|
|
3859
|
+
function pe(e, t) {
|
|
3860
|
+
return new $t({
|
|
3647
3861
|
check: "less_than",
|
|
3648
3862
|
...h(t),
|
|
3649
3863
|
value: e,
|
|
@@ -3651,8 +3865,8 @@ function fe(e, t) {
|
|
|
3651
3865
|
});
|
|
3652
3866
|
}
|
|
3653
3867
|
// @__NO_SIDE_EFFECTS__
|
|
3654
|
-
function
|
|
3655
|
-
return new
|
|
3868
|
+
function Ye(e, t) {
|
|
3869
|
+
return new Et({
|
|
3656
3870
|
check: "greater_than",
|
|
3657
3871
|
...h(t),
|
|
3658
3872
|
value: e,
|
|
@@ -3660,8 +3874,8 @@ function Be(e, t) {
|
|
|
3660
3874
|
});
|
|
3661
3875
|
}
|
|
3662
3876
|
// @__NO_SIDE_EFFECTS__
|
|
3663
|
-
function
|
|
3664
|
-
return new
|
|
3877
|
+
function ge(e, t) {
|
|
3878
|
+
return new Et({
|
|
3665
3879
|
check: "greater_than",
|
|
3666
3880
|
...h(t),
|
|
3667
3881
|
value: e,
|
|
@@ -3669,40 +3883,40 @@ function pe(e, t) {
|
|
|
3669
3883
|
});
|
|
3670
3884
|
}
|
|
3671
3885
|
// @__NO_SIDE_EFFECTS__
|
|
3672
|
-
function
|
|
3673
|
-
return new
|
|
3886
|
+
function Qe(e, t) {
|
|
3887
|
+
return new uo({
|
|
3674
3888
|
check: "multiple_of",
|
|
3675
3889
|
...h(t),
|
|
3676
3890
|
value: e
|
|
3677
3891
|
});
|
|
3678
3892
|
}
|
|
3679
3893
|
// @__NO_SIDE_EFFECTS__
|
|
3680
|
-
function
|
|
3681
|
-
return new
|
|
3894
|
+
function Pt(e, t) {
|
|
3895
|
+
return new fo({
|
|
3682
3896
|
check: "max_length",
|
|
3683
3897
|
...h(t),
|
|
3684
3898
|
maximum: e
|
|
3685
3899
|
});
|
|
3686
3900
|
}
|
|
3687
3901
|
// @__NO_SIDE_EFFECTS__
|
|
3688
|
-
function
|
|
3689
|
-
return new
|
|
3902
|
+
function ce(e, t) {
|
|
3903
|
+
return new po({
|
|
3690
3904
|
check: "min_length",
|
|
3691
3905
|
...h(t),
|
|
3692
3906
|
minimum: e
|
|
3693
3907
|
});
|
|
3694
3908
|
}
|
|
3695
3909
|
// @__NO_SIDE_EFFECTS__
|
|
3696
|
-
function
|
|
3697
|
-
return new
|
|
3910
|
+
function Ct(e, t) {
|
|
3911
|
+
return new go({
|
|
3698
3912
|
check: "length_equals",
|
|
3699
3913
|
...h(t),
|
|
3700
3914
|
length: e
|
|
3701
3915
|
});
|
|
3702
3916
|
}
|
|
3703
3917
|
// @__NO_SIDE_EFFECTS__
|
|
3704
|
-
function
|
|
3705
|
-
return new
|
|
3918
|
+
function Ki(e, t) {
|
|
3919
|
+
return new ho({
|
|
3706
3920
|
check: "string_format",
|
|
3707
3921
|
format: "regex",
|
|
3708
3922
|
...h(t),
|
|
@@ -3710,24 +3924,24 @@ function Li(e, t) {
|
|
|
3710
3924
|
});
|
|
3711
3925
|
}
|
|
3712
3926
|
// @__NO_SIDE_EFFECTS__
|
|
3713
|
-
function
|
|
3714
|
-
return new
|
|
3927
|
+
function Yi(e) {
|
|
3928
|
+
return new mo({
|
|
3715
3929
|
check: "string_format",
|
|
3716
3930
|
format: "lowercase",
|
|
3717
3931
|
...h(e)
|
|
3718
3932
|
});
|
|
3719
3933
|
}
|
|
3720
3934
|
// @__NO_SIDE_EFFECTS__
|
|
3721
|
-
function
|
|
3722
|
-
return new
|
|
3935
|
+
function Qi(e) {
|
|
3936
|
+
return new _o({
|
|
3723
3937
|
check: "string_format",
|
|
3724
3938
|
format: "uppercase",
|
|
3725
3939
|
...h(e)
|
|
3726
3940
|
});
|
|
3727
3941
|
}
|
|
3728
3942
|
// @__NO_SIDE_EFFECTS__
|
|
3729
|
-
function
|
|
3730
|
-
return new
|
|
3943
|
+
function Xi(e, t) {
|
|
3944
|
+
return new yo({
|
|
3731
3945
|
check: "string_format",
|
|
3732
3946
|
format: "includes",
|
|
3733
3947
|
...h(t),
|
|
@@ -3735,8 +3949,8 @@ function Fi(e, t) {
|
|
|
3735
3949
|
});
|
|
3736
3950
|
}
|
|
3737
3951
|
// @__NO_SIDE_EFFECTS__
|
|
3738
|
-
function
|
|
3739
|
-
return new
|
|
3952
|
+
function es(e, t) {
|
|
3953
|
+
return new vo({
|
|
3740
3954
|
check: "string_format",
|
|
3741
3955
|
format: "starts_with",
|
|
3742
3956
|
...h(t),
|
|
@@ -3744,8 +3958,8 @@ function xi(e, t) {
|
|
|
3744
3958
|
});
|
|
3745
3959
|
}
|
|
3746
3960
|
// @__NO_SIDE_EFFECTS__
|
|
3747
|
-
function
|
|
3748
|
-
return new
|
|
3961
|
+
function ts(e, t) {
|
|
3962
|
+
return new wo({
|
|
3749
3963
|
check: "string_format",
|
|
3750
3964
|
format: "ends_with",
|
|
3751
3965
|
...h(t),
|
|
@@ -3754,33 +3968,33 @@ function Ji(e, t) {
|
|
|
3754
3968
|
}
|
|
3755
3969
|
// @__NO_SIDE_EFFECTS__
|
|
3756
3970
|
function K(e) {
|
|
3757
|
-
return new
|
|
3971
|
+
return new bo({
|
|
3758
3972
|
check: "overwrite",
|
|
3759
3973
|
tx: e
|
|
3760
3974
|
});
|
|
3761
3975
|
}
|
|
3762
3976
|
// @__NO_SIDE_EFFECTS__
|
|
3763
|
-
function
|
|
3977
|
+
function ns(e) {
|
|
3764
3978
|
return /* @__PURE__ */ K((t) => t.normalize(e));
|
|
3765
3979
|
}
|
|
3766
3980
|
// @__NO_SIDE_EFFECTS__
|
|
3767
|
-
function
|
|
3981
|
+
function rs() {
|
|
3768
3982
|
return /* @__PURE__ */ K((e) => e.trim());
|
|
3769
3983
|
}
|
|
3770
3984
|
// @__NO_SIDE_EFFECTS__
|
|
3771
|
-
function
|
|
3985
|
+
function os() {
|
|
3772
3986
|
return /* @__PURE__ */ K((e) => e.toLowerCase());
|
|
3773
3987
|
}
|
|
3774
3988
|
// @__NO_SIDE_EFFECTS__
|
|
3775
|
-
function
|
|
3989
|
+
function is() {
|
|
3776
3990
|
return /* @__PURE__ */ K((e) => e.toUpperCase());
|
|
3777
3991
|
}
|
|
3778
3992
|
// @__NO_SIDE_EFFECTS__
|
|
3779
|
-
function
|
|
3780
|
-
return /* @__PURE__ */ K((e) =>
|
|
3993
|
+
function ss() {
|
|
3994
|
+
return /* @__PURE__ */ K((e) => gr(e));
|
|
3781
3995
|
}
|
|
3782
3996
|
// @__NO_SIDE_EFFECTS__
|
|
3783
|
-
function
|
|
3997
|
+
function as(e, t, n) {
|
|
3784
3998
|
return new e({
|
|
3785
3999
|
type: "array",
|
|
3786
4000
|
element: t,
|
|
@@ -3791,7 +4005,7 @@ function Hi(e, t, n) {
|
|
|
3791
4005
|
});
|
|
3792
4006
|
}
|
|
3793
4007
|
// @__NO_SIDE_EFFECTS__
|
|
3794
|
-
function
|
|
4008
|
+
function cs(e, t, n) {
|
|
3795
4009
|
return new e({
|
|
3796
4010
|
type: "custom",
|
|
3797
4011
|
check: "custom",
|
|
@@ -3800,30 +4014,30 @@ function Ki(e, t, n) {
|
|
|
3800
4014
|
});
|
|
3801
4015
|
}
|
|
3802
4016
|
// @__NO_SIDE_EFFECTS__
|
|
3803
|
-
function
|
|
3804
|
-
const t = /* @__PURE__ */
|
|
4017
|
+
function us(e) {
|
|
4018
|
+
const t = /* @__PURE__ */ ds((n) => (n.addIssue = (r) => {
|
|
3805
4019
|
if (typeof r == "string")
|
|
3806
|
-
n.issues.push(
|
|
4020
|
+
n.issues.push(ne(r, n.value, t._zod.def));
|
|
3807
4021
|
else {
|
|
3808
4022
|
const o = r;
|
|
3809
|
-
o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(
|
|
4023
|
+
o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(ne(o));
|
|
3810
4024
|
}
|
|
3811
4025
|
}, e(n.value, n)));
|
|
3812
4026
|
return t;
|
|
3813
4027
|
}
|
|
3814
4028
|
// @__NO_SIDE_EFFECTS__
|
|
3815
|
-
function
|
|
3816
|
-
const n = new
|
|
4029
|
+
function ds(e, t) {
|
|
4030
|
+
const n = new A({
|
|
3817
4031
|
check: "custom",
|
|
3818
4032
|
...h(t)
|
|
3819
4033
|
});
|
|
3820
4034
|
return n._zod.check = e, n;
|
|
3821
4035
|
}
|
|
3822
|
-
function
|
|
4036
|
+
function Nt(e) {
|
|
3823
4037
|
let t = e?.target ?? "draft-2020-12";
|
|
3824
4038
|
return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
|
|
3825
4039
|
processors: e.processors ?? {},
|
|
3826
|
-
metadataRegistry: e?.metadata ??
|
|
4040
|
+
metadataRegistry: e?.metadata ?? ee,
|
|
3827
4041
|
target: t,
|
|
3828
4042
|
unrepresentable: e?.unrepresentable ?? "throw",
|
|
3829
4043
|
override: e?.override ?? (() => {
|
|
@@ -3864,9 +4078,9 @@ function E(e, t, n = { path: [], schemaPath: [] }) {
|
|
|
3864
4078
|
f && (s.ref || (s.ref = f), E(f, t, l), t.seen.get(f).isParent = !0);
|
|
3865
4079
|
}
|
|
3866
4080
|
const c = t.metadataRegistry.get(e);
|
|
3867
|
-
return c && Object.assign(s.schema, c), t.io === "input" &&
|
|
4081
|
+
return c && Object.assign(s.schema, c), t.io === "input" && Z(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;
|
|
3868
4082
|
}
|
|
3869
|
-
function
|
|
4083
|
+
function Rt(e, t) {
|
|
3870
4084
|
const n = e.seen.get(t);
|
|
3871
4085
|
if (!n)
|
|
3872
4086
|
throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
@@ -3938,7 +4152,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
3938
4152
|
}
|
|
3939
4153
|
}
|
|
3940
4154
|
}
|
|
3941
|
-
function
|
|
4155
|
+
function Dt(e, t) {
|
|
3942
4156
|
const n = e.seen.get(t);
|
|
3943
4157
|
if (!n)
|
|
3944
4158
|
throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
@@ -3993,8 +4207,8 @@ function Ot(e, t) {
|
|
|
3993
4207
|
value: {
|
|
3994
4208
|
...t["~standard"],
|
|
3995
4209
|
jsonSchema: {
|
|
3996
|
-
input:
|
|
3997
|
-
output:
|
|
4210
|
+
input: ue(t, "input", e.processors),
|
|
4211
|
+
output: ue(t, "output", e.processors)
|
|
3998
4212
|
}
|
|
3999
4213
|
},
|
|
4000
4214
|
enumerable: !1,
|
|
@@ -4004,7 +4218,7 @@ function Ot(e, t) {
|
|
|
4004
4218
|
throw new Error("Error converting schema to JSON.");
|
|
4005
4219
|
}
|
|
4006
4220
|
}
|
|
4007
|
-
function
|
|
4221
|
+
function Z(e, t) {
|
|
4008
4222
|
const n = t ?? { seen: /* @__PURE__ */ new Set() };
|
|
4009
4223
|
if (n.seen.has(e))
|
|
4010
4224
|
return !1;
|
|
@@ -4013,57 +4227,57 @@ function T(e, t) {
|
|
|
4013
4227
|
if (r.type === "transform")
|
|
4014
4228
|
return !0;
|
|
4015
4229
|
if (r.type === "array")
|
|
4016
|
-
return
|
|
4230
|
+
return Z(r.element, n);
|
|
4017
4231
|
if (r.type === "set")
|
|
4018
|
-
return
|
|
4232
|
+
return Z(r.valueType, n);
|
|
4019
4233
|
if (r.type === "lazy")
|
|
4020
|
-
return
|
|
4234
|
+
return Z(r.getter(), n);
|
|
4021
4235
|
if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault")
|
|
4022
|
-
return
|
|
4236
|
+
return Z(r.innerType, n);
|
|
4023
4237
|
if (r.type === "intersection")
|
|
4024
|
-
return
|
|
4238
|
+
return Z(r.left, n) || Z(r.right, n);
|
|
4025
4239
|
if (r.type === "record" || r.type === "map")
|
|
4026
|
-
return
|
|
4240
|
+
return Z(r.keyType, n) || Z(r.valueType, n);
|
|
4027
4241
|
if (r.type === "pipe")
|
|
4028
|
-
return
|
|
4242
|
+
return Z(r.in, n) || Z(r.out, n);
|
|
4029
4243
|
if (r.type === "object") {
|
|
4030
4244
|
for (const o in r.shape)
|
|
4031
|
-
if (
|
|
4245
|
+
if (Z(r.shape[o], n))
|
|
4032
4246
|
return !0;
|
|
4033
4247
|
return !1;
|
|
4034
4248
|
}
|
|
4035
4249
|
if (r.type === "union") {
|
|
4036
4250
|
for (const o of r.options)
|
|
4037
|
-
if (
|
|
4251
|
+
if (Z(o, n))
|
|
4038
4252
|
return !0;
|
|
4039
4253
|
return !1;
|
|
4040
4254
|
}
|
|
4041
4255
|
if (r.type === "tuple") {
|
|
4042
4256
|
for (const o of r.items)
|
|
4043
|
-
if (
|
|
4257
|
+
if (Z(o, n))
|
|
4044
4258
|
return !0;
|
|
4045
|
-
return !!(r.rest &&
|
|
4259
|
+
return !!(r.rest && Z(r.rest, n));
|
|
4046
4260
|
}
|
|
4047
4261
|
return !1;
|
|
4048
4262
|
}
|
|
4049
|
-
const
|
|
4050
|
-
const r =
|
|
4051
|
-
return E(e, r),
|
|
4052
|
-
},
|
|
4053
|
-
const { libraryOptions: o, target: i } = r ?? {}, s =
|
|
4054
|
-
return E(e, s),
|
|
4055
|
-
},
|
|
4263
|
+
const ls = (e, t = {}) => (n) => {
|
|
4264
|
+
const r = Nt({ ...n, processors: t });
|
|
4265
|
+
return E(e, r), Rt(r, e), Dt(r, e);
|
|
4266
|
+
}, ue = (e, t, n = {}) => (r) => {
|
|
4267
|
+
const { libraryOptions: o, target: i } = r ?? {}, s = Nt({ ...o ?? {}, target: i, io: t, processors: n });
|
|
4268
|
+
return E(e, s), Rt(s, e), Dt(s, e);
|
|
4269
|
+
}, fs = {
|
|
4056
4270
|
guid: "uuid",
|
|
4057
4271
|
url: "uri",
|
|
4058
4272
|
datetime: "date-time",
|
|
4059
4273
|
json_string: "json-string",
|
|
4060
4274
|
regex: ""
|
|
4061
4275
|
// do not set
|
|
4062
|
-
},
|
|
4276
|
+
}, ps = (e, t, n, r) => {
|
|
4063
4277
|
const o = n;
|
|
4064
4278
|
o.type = "string";
|
|
4065
4279
|
const { minimum: i, maximum: s, format: a, patterns: c, contentEncoding: u } = e._zod.bag;
|
|
4066
|
-
if (typeof i == "number" && (o.minLength = i), typeof s == "number" && (o.maxLength = s), a && (o.format =
|
|
4280
|
+
if (typeof i == "number" && (o.minLength = i), typeof s == "number" && (o.maxLength = s), a && (o.format = fs[a] ?? a, o.format === "" && delete o.format, a === "time" && delete o.format), u && (o.contentEncoding = u), c && c.size > 0) {
|
|
4067
4281
|
const l = [...c];
|
|
4068
4282
|
l.length === 1 ? o.pattern = l[0].source : l.length > 1 && (o.allOf = [
|
|
4069
4283
|
...l.map((f) => ({
|
|
@@ -4072,18 +4286,18 @@ const Xi = (e, t = {}) => (n) => {
|
|
|
4072
4286
|
}))
|
|
4073
4287
|
]);
|
|
4074
4288
|
}
|
|
4075
|
-
},
|
|
4289
|
+
}, gs = (e, t, n, r) => {
|
|
4076
4290
|
const o = n, { minimum: i, maximum: s, format: a, multipleOf: c, exclusiveMaximum: u, exclusiveMinimum: l } = e._zod.bag;
|
|
4077
4291
|
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);
|
|
4078
|
-
},
|
|
4292
|
+
}, hs = (e, t, n, r) => {
|
|
4079
4293
|
n.type = "boolean";
|
|
4080
|
-
},
|
|
4294
|
+
}, ms = (e, t, n, r) => {
|
|
4081
4295
|
n.not = {};
|
|
4082
|
-
},
|
|
4083
|
-
},
|
|
4084
|
-
const o = e._zod.def, i =
|
|
4296
|
+
}, _s = (e, t, n, r) => {
|
|
4297
|
+
}, ys = (e, t, n, r) => {
|
|
4298
|
+
const o = e._zod.def, i = gt(o.entries);
|
|
4085
4299
|
i.every((s) => typeof s == "number") && (n.type = "number"), i.every((s) => typeof s == "string") && (n.type = "string"), n.enum = i;
|
|
4086
|
-
},
|
|
4300
|
+
}, vs = (e, t, n, r) => {
|
|
4087
4301
|
const o = e._zod.def, i = [];
|
|
4088
4302
|
for (const s of o.values)
|
|
4089
4303
|
if (s === void 0) {
|
|
@@ -4100,16 +4314,16 @@ const Xi = (e, t = {}) => (n) => {
|
|
|
4100
4314
|
n.type = s === null ? "null" : typeof s, t.target === "draft-04" || t.target === "openapi-3.0" ? n.enum = [s] : n.const = s;
|
|
4101
4315
|
} else
|
|
4102
4316
|
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;
|
|
4103
|
-
},
|
|
4317
|
+
}, ws = (e, t, n, r) => {
|
|
4104
4318
|
if (t.unrepresentable === "throw")
|
|
4105
4319
|
throw new Error("Custom types cannot be represented in JSON Schema");
|
|
4106
|
-
},
|
|
4320
|
+
}, bs = (e, t, n, r) => {
|
|
4107
4321
|
if (t.unrepresentable === "throw")
|
|
4108
4322
|
throw new Error("Transforms cannot be represented in JSON Schema");
|
|
4109
|
-
},
|
|
4323
|
+
}, ks = (e, t, n, r) => {
|
|
4110
4324
|
const o = n, i = e._zod.def, { minimum: s, maximum: a } = e._zod.bag;
|
|
4111
4325
|
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"] });
|
|
4112
|
-
},
|
|
4326
|
+
}, zs = (e, t, n, r) => {
|
|
4113
4327
|
const o = n, i = e._zod.def;
|
|
4114
4328
|
o.type = "object", o.properties = {};
|
|
4115
4329
|
const s = i.shape;
|
|
@@ -4126,13 +4340,13 @@ const Xi = (e, t = {}) => (n) => {
|
|
|
4126
4340
|
...r,
|
|
4127
4341
|
path: [...r.path, "additionalProperties"]
|
|
4128
4342
|
})) : t.io === "output" && (o.additionalProperties = !1);
|
|
4129
|
-
},
|
|
4343
|
+
}, Ss = (e, t, n, r) => {
|
|
4130
4344
|
const o = e._zod.def, i = o.inclusive === !1, s = o.options.map((a, c) => E(a, t, {
|
|
4131
4345
|
...r,
|
|
4132
4346
|
path: [...r.path, i ? "oneOf" : "anyOf", c]
|
|
4133
4347
|
}));
|
|
4134
4348
|
i ? n.oneOf = s : n.anyOf = s;
|
|
4135
|
-
},
|
|
4349
|
+
}, $s = (e, t, n, r) => {
|
|
4136
4350
|
const o = e._zod.def, i = E(o.left, t, {
|
|
4137
4351
|
...r,
|
|
4138
4352
|
path: [...r.path, "allOf", 0]
|
|
@@ -4144,7 +4358,7 @@ const Xi = (e, t = {}) => (n) => {
|
|
|
4144
4358
|
...a(s) ? s.allOf : [s]
|
|
4145
4359
|
];
|
|
4146
4360
|
n.allOf = c;
|
|
4147
|
-
},
|
|
4361
|
+
}, Es = (e, t, n, r) => {
|
|
4148
4362
|
const o = n, i = e._zod.def;
|
|
4149
4363
|
o.type = "object";
|
|
4150
4364
|
const s = i.keyType, c = s._zod.bag?.patterns;
|
|
@@ -4169,25 +4383,25 @@ const Xi = (e, t = {}) => (n) => {
|
|
|
4169
4383
|
const l = [...u].filter((f) => typeof f == "string" || typeof f == "number");
|
|
4170
4384
|
l.length > 0 && (o.required = l);
|
|
4171
4385
|
}
|
|
4172
|
-
},
|
|
4386
|
+
}, Ts = (e, t, n, r) => {
|
|
4173
4387
|
const o = e._zod.def, i = E(o.innerType, t, r), s = t.seen.get(e);
|
|
4174
4388
|
t.target === "openapi-3.0" ? (s.ref = o.innerType, n.nullable = !0) : n.anyOf = [i, { type: "null" }];
|
|
4175
|
-
},
|
|
4389
|
+
}, Zs = (e, t, n, r) => {
|
|
4176
4390
|
const o = e._zod.def;
|
|
4177
4391
|
E(o.innerType, t, r);
|
|
4178
4392
|
const i = t.seen.get(e);
|
|
4179
4393
|
i.ref = o.innerType;
|
|
4180
|
-
},
|
|
4394
|
+
}, Is = (e, t, n, r) => {
|
|
4181
4395
|
const o = e._zod.def;
|
|
4182
4396
|
E(o.innerType, t, r);
|
|
4183
4397
|
const i = t.seen.get(e);
|
|
4184
4398
|
i.ref = o.innerType, n.default = JSON.parse(JSON.stringify(o.defaultValue));
|
|
4185
|
-
},
|
|
4399
|
+
}, Os = (e, t, n, r) => {
|
|
4186
4400
|
const o = e._zod.def;
|
|
4187
4401
|
E(o.innerType, t, r);
|
|
4188
4402
|
const i = t.seen.get(e);
|
|
4189
4403
|
i.ref = o.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
|
|
4190
|
-
},
|
|
4404
|
+
}, As = (e, t, n, r) => {
|
|
4191
4405
|
const o = e._zod.def;
|
|
4192
4406
|
E(o.innerType, t, r);
|
|
4193
4407
|
const i = t.seen.get(e);
|
|
@@ -4199,64 +4413,64 @@ const Xi = (e, t = {}) => (n) => {
|
|
|
4199
4413
|
throw new Error("Dynamic catch values are not supported in JSON Schema");
|
|
4200
4414
|
}
|
|
4201
4415
|
n.default = s;
|
|
4202
|
-
},
|
|
4416
|
+
}, Ps = (e, t, n, r) => {
|
|
4203
4417
|
const o = e._zod.def, i = t.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
|
|
4204
4418
|
E(i, t, r);
|
|
4205
4419
|
const s = t.seen.get(e);
|
|
4206
4420
|
s.ref = i;
|
|
4207
|
-
},
|
|
4421
|
+
}, Cs = (e, t, n, r) => {
|
|
4208
4422
|
const o = e._zod.def;
|
|
4209
4423
|
E(o.innerType, t, r);
|
|
4210
4424
|
const i = t.seen.get(e);
|
|
4211
4425
|
i.ref = o.innerType, n.readOnly = !0;
|
|
4212
|
-
},
|
|
4426
|
+
}, jt = (e, t, n, r) => {
|
|
4213
4427
|
const o = e._zod.def;
|
|
4214
4428
|
E(o.innerType, t, r);
|
|
4215
4429
|
const i = t.seen.get(e);
|
|
4216
4430
|
i.ref = o.innerType;
|
|
4217
|
-
},
|
|
4218
|
-
|
|
4431
|
+
}, Ns = /* @__PURE__ */ d("ZodISODateTime", (e, t) => {
|
|
4432
|
+
Ro.init(e, t), $.init(e, t);
|
|
4219
4433
|
});
|
|
4220
|
-
function
|
|
4221
|
-
return /* @__PURE__ */
|
|
4434
|
+
function Rs(e) {
|
|
4435
|
+
return /* @__PURE__ */ xi(Ns, e);
|
|
4222
4436
|
}
|
|
4223
|
-
const
|
|
4224
|
-
|
|
4437
|
+
const Ds = /* @__PURE__ */ d("ZodISODate", (e, t) => {
|
|
4438
|
+
Do.init(e, t), $.init(e, t);
|
|
4225
4439
|
});
|
|
4226
|
-
function
|
|
4227
|
-
return /* @__PURE__ */
|
|
4440
|
+
function js(e) {
|
|
4441
|
+
return /* @__PURE__ */ Fi(Ds, e);
|
|
4228
4442
|
}
|
|
4229
|
-
const
|
|
4230
|
-
|
|
4443
|
+
const Ls = /* @__PURE__ */ d("ZodISOTime", (e, t) => {
|
|
4444
|
+
jo.init(e, t), $.init(e, t);
|
|
4231
4445
|
});
|
|
4232
|
-
function
|
|
4233
|
-
return /* @__PURE__ */
|
|
4446
|
+
function Us(e) {
|
|
4447
|
+
return /* @__PURE__ */ Ji(Ls, e);
|
|
4234
4448
|
}
|
|
4235
|
-
const
|
|
4236
|
-
|
|
4449
|
+
const Ms = /* @__PURE__ */ d("ZodISODuration", (e, t) => {
|
|
4450
|
+
Lo.init(e, t), $.init(e, t);
|
|
4237
4451
|
});
|
|
4238
|
-
function
|
|
4239
|
-
return /* @__PURE__ */
|
|
4452
|
+
function xs(e) {
|
|
4453
|
+
return /* @__PURE__ */ qi(Ms, e);
|
|
4240
4454
|
}
|
|
4241
|
-
const
|
|
4242
|
-
|
|
4455
|
+
const Fs = (e, t) => {
|
|
4456
|
+
yt.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
4243
4457
|
format: {
|
|
4244
|
-
value: (n) =>
|
|
4458
|
+
value: (n) => Tr(e, n)
|
|
4245
4459
|
// enumerable: false,
|
|
4246
4460
|
},
|
|
4247
4461
|
flatten: {
|
|
4248
|
-
value: (n) =>
|
|
4462
|
+
value: (n) => Er(e, n)
|
|
4249
4463
|
// enumerable: false,
|
|
4250
4464
|
},
|
|
4251
4465
|
addIssue: {
|
|
4252
4466
|
value: (n) => {
|
|
4253
|
-
e.issues.push(n), e.message = JSON.stringify(e.issues,
|
|
4467
|
+
e.issues.push(n), e.message = JSON.stringify(e.issues, _e, 2);
|
|
4254
4468
|
}
|
|
4255
4469
|
// enumerable: false,
|
|
4256
4470
|
},
|
|
4257
4471
|
addIssues: {
|
|
4258
4472
|
value: (n) => {
|
|
4259
|
-
e.issues.push(...n), e.message = JSON.stringify(e.issues,
|
|
4473
|
+
e.issues.push(...n), e.message = JSON.stringify(e.issues, _e, 2);
|
|
4260
4474
|
}
|
|
4261
4475
|
// enumerable: false,
|
|
4262
4476
|
},
|
|
@@ -4267,165 +4481,165 @@ const Os = (e, t) => {
|
|
|
4267
4481
|
// enumerable: false,
|
|
4268
4482
|
}
|
|
4269
4483
|
});
|
|
4270
|
-
},
|
|
4484
|
+
}, P = d("ZodError", Fs, {
|
|
4271
4485
|
Parent: Error
|
|
4272
|
-
}),
|
|
4486
|
+
}), Js = /* @__PURE__ */ Ee(P), qs = /* @__PURE__ */ Te(P), Vs = /* @__PURE__ */ de(P), Ws = /* @__PURE__ */ le(P), Gs = /* @__PURE__ */ Or(P), Bs = /* @__PURE__ */ Ar(P), Hs = /* @__PURE__ */ Pr(P), Ks = /* @__PURE__ */ Cr(P), Ys = /* @__PURE__ */ Nr(P), Qs = /* @__PURE__ */ Rr(P), Xs = /* @__PURE__ */ Dr(P), ea = /* @__PURE__ */ jr(P), S = /* @__PURE__ */ d("ZodType", (e, t) => (z.init(e, t), Object.assign(e["~standard"], {
|
|
4273
4487
|
jsonSchema: {
|
|
4274
|
-
input:
|
|
4275
|
-
output:
|
|
4488
|
+
input: ue(e, "input"),
|
|
4489
|
+
output: ue(e, "output")
|
|
4276
4490
|
}
|
|
4277
|
-
}), e.toJSONSchema =
|
|
4491
|
+
}), e.toJSONSchema = ls(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(x(t, {
|
|
4278
4492
|
checks: [
|
|
4279
4493
|
...t.checks ?? [],
|
|
4280
4494
|
...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
|
|
4281
4495
|
]
|
|
4282
4496
|
}), {
|
|
4283
4497
|
parent: !0
|
|
4284
|
-
}), e.with = e.check, e.clone = (n, r) =>
|
|
4498
|
+
}), 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) => Js(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Vs(e, n, r), e.parseAsync = async (n, r) => qs(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => Ws(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => Gs(e, n, r), e.decode = (n, r) => Bs(e, n, r), e.encodeAsync = async (n, r) => Hs(e, n, r), e.decodeAsync = async (n, r) => Ks(e, n, r), e.safeEncode = (n, r) => Ys(e, n, r), e.safeDecode = (n, r) => Qs(e, n, r), e.safeEncodeAsync = async (n, r) => Xs(e, n, r), e.safeDecodeAsync = async (n, r) => ea(e, n, r), e.refine = (n, r) => e.check(Ka(n, r)), e.superRefine = (n) => e.check(Ya(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ K(n)), e.optional = () => nt(e), e.exactOptional = () => ja(e), e.nullable = () => rt(e), e.nullish = () => nt(rt(e)), e.nonoptional = (n) => Ja(e, n), e.array = () => $a(e), e.or = (n) => Za([e, n]), e.and = (n) => Oa(e, n), e.transform = (n) => ot(e, Ra(n)), e.default = (n) => Ma(e, n), e.prefault = (n) => Fa(e, n), e.catch = (n) => Va(e, n), e.pipe = (n) => ot(e, n), e.readonly = () => Ba(e), e.describe = (n) => {
|
|
4285
4499
|
const r = e.clone();
|
|
4286
|
-
return
|
|
4500
|
+
return ee.add(r, { description: n }), r;
|
|
4287
4501
|
}, Object.defineProperty(e, "description", {
|
|
4288
4502
|
get() {
|
|
4289
|
-
return
|
|
4503
|
+
return ee.get(e)?.description;
|
|
4290
4504
|
},
|
|
4291
4505
|
configurable: !0
|
|
4292
4506
|
}), e.meta = (...n) => {
|
|
4293
4507
|
if (n.length === 0)
|
|
4294
|
-
return
|
|
4508
|
+
return ee.get(e);
|
|
4295
4509
|
const r = e.clone();
|
|
4296
|
-
return
|
|
4297
|
-
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)),
|
|
4298
|
-
|
|
4510
|
+
return ee.add(r, n[0]), r;
|
|
4511
|
+
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), Lt = /* @__PURE__ */ d("_ZodString", (e, t) => {
|
|
4512
|
+
Ze.init(e, t), S.init(e, t), e._zod.processJSONSchema = (r, o, i) => ps(e, r, o);
|
|
4299
4513
|
const n = e._zod.bag;
|
|
4300
|
-
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */
|
|
4301
|
-
}),
|
|
4302
|
-
|
|
4514
|
+
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ Ki(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ Xi(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ es(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ ts(...r)), e.min = (...r) => e.check(/* @__PURE__ */ ce(...r)), e.max = (...r) => e.check(/* @__PURE__ */ Pt(...r)), e.length = (...r) => e.check(/* @__PURE__ */ Ct(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ ce(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ Yi(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ Qi(r)), e.trim = () => e.check(/* @__PURE__ */ rs()), e.normalize = (...r) => e.check(/* @__PURE__ */ ns(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ os()), e.toUpperCase = () => e.check(/* @__PURE__ */ is()), e.slugify = () => e.check(/* @__PURE__ */ ss());
|
|
4515
|
+
}), ta = /* @__PURE__ */ d("ZodString", (e, t) => {
|
|
4516
|
+
Ze.init(e, t), Lt.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ wi(na, n)), e.url = (n) => e.check(/* @__PURE__ */ $i(ra, n)), e.jwt = (n) => e.check(/* @__PURE__ */ Mi(ya, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Ei(oa, n)), e.guid = (n) => e.check(/* @__PURE__ */ He(Xe, n)), e.uuid = (n) => e.check(/* @__PURE__ */ bi(ie, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ ki(ie, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ zi(ie, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ Si(ie, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Ti(ia, n)), e.guid = (n) => e.check(/* @__PURE__ */ He(Xe, n)), e.cuid = (n) => e.check(/* @__PURE__ */ Zi(sa, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ Ii(aa, n)), e.ulid = (n) => e.check(/* @__PURE__ */ Oi(ca, n)), e.base64 = (n) => e.check(/* @__PURE__ */ ji(ha, n)), e.base64url = (n) => e.check(/* @__PURE__ */ Li(ma, n)), e.xid = (n) => e.check(/* @__PURE__ */ Ai(ua, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ Pi(da, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ Ci(la, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ Ni(fa, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ Ri(pa, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ Di(ga, n)), e.e164 = (n) => e.check(/* @__PURE__ */ Ui(_a, n)), e.datetime = (n) => e.check(Rs(n)), e.date = (n) => e.check(js(n)), e.time = (n) => e.check(Us(n)), e.duration = (n) => e.check(xs(n));
|
|
4303
4517
|
});
|
|
4304
|
-
function
|
|
4305
|
-
return /* @__PURE__ */
|
|
4306
|
-
}
|
|
4307
|
-
const
|
|
4308
|
-
b.init(e, t),
|
|
4309
|
-
}),
|
|
4310
|
-
|
|
4311
|
-
}),
|
|
4312
|
-
|
|
4313
|
-
}),
|
|
4314
|
-
|
|
4315
|
-
}),
|
|
4316
|
-
|
|
4317
|
-
}),
|
|
4318
|
-
|
|
4319
|
-
}),
|
|
4320
|
-
|
|
4321
|
-
}),
|
|
4322
|
-
|
|
4323
|
-
}),
|
|
4324
|
-
|
|
4325
|
-
}),
|
|
4326
|
-
|
|
4327
|
-
}),
|
|
4328
|
-
|
|
4329
|
-
}),
|
|
4330
|
-
|
|
4331
|
-
}),
|
|
4332
|
-
|
|
4333
|
-
}),
|
|
4334
|
-
|
|
4335
|
-
}),
|
|
4336
|
-
|
|
4337
|
-
}),
|
|
4338
|
-
|
|
4339
|
-
}),
|
|
4340
|
-
|
|
4341
|
-
}),
|
|
4342
|
-
|
|
4343
|
-
}),
|
|
4344
|
-
|
|
4345
|
-
}),
|
|
4346
|
-
|
|
4347
|
-
}),
|
|
4348
|
-
|
|
4518
|
+
function Lc(e) {
|
|
4519
|
+
return /* @__PURE__ */ vi(ta, e);
|
|
4520
|
+
}
|
|
4521
|
+
const $ = /* @__PURE__ */ d("ZodStringFormat", (e, t) => {
|
|
4522
|
+
b.init(e, t), Lt.init(e, t);
|
|
4523
|
+
}), na = /* @__PURE__ */ d("ZodEmail", (e, t) => {
|
|
4524
|
+
Eo.init(e, t), $.init(e, t);
|
|
4525
|
+
}), Xe = /* @__PURE__ */ d("ZodGUID", (e, t) => {
|
|
4526
|
+
So.init(e, t), $.init(e, t);
|
|
4527
|
+
}), ie = /* @__PURE__ */ d("ZodUUID", (e, t) => {
|
|
4528
|
+
$o.init(e, t), $.init(e, t);
|
|
4529
|
+
}), ra = /* @__PURE__ */ d("ZodURL", (e, t) => {
|
|
4530
|
+
To.init(e, t), $.init(e, t);
|
|
4531
|
+
}), oa = /* @__PURE__ */ d("ZodEmoji", (e, t) => {
|
|
4532
|
+
Zo.init(e, t), $.init(e, t);
|
|
4533
|
+
}), ia = /* @__PURE__ */ d("ZodNanoID", (e, t) => {
|
|
4534
|
+
Io.init(e, t), $.init(e, t);
|
|
4535
|
+
}), sa = /* @__PURE__ */ d("ZodCUID", (e, t) => {
|
|
4536
|
+
Oo.init(e, t), $.init(e, t);
|
|
4537
|
+
}), aa = /* @__PURE__ */ d("ZodCUID2", (e, t) => {
|
|
4538
|
+
Ao.init(e, t), $.init(e, t);
|
|
4539
|
+
}), ca = /* @__PURE__ */ d("ZodULID", (e, t) => {
|
|
4540
|
+
Po.init(e, t), $.init(e, t);
|
|
4541
|
+
}), ua = /* @__PURE__ */ d("ZodXID", (e, t) => {
|
|
4542
|
+
Co.init(e, t), $.init(e, t);
|
|
4543
|
+
}), da = /* @__PURE__ */ d("ZodKSUID", (e, t) => {
|
|
4544
|
+
No.init(e, t), $.init(e, t);
|
|
4545
|
+
}), la = /* @__PURE__ */ d("ZodIPv4", (e, t) => {
|
|
4546
|
+
Uo.init(e, t), $.init(e, t);
|
|
4547
|
+
}), fa = /* @__PURE__ */ d("ZodIPv6", (e, t) => {
|
|
4548
|
+
Mo.init(e, t), $.init(e, t);
|
|
4549
|
+
}), pa = /* @__PURE__ */ d("ZodCIDRv4", (e, t) => {
|
|
4550
|
+
xo.init(e, t), $.init(e, t);
|
|
4551
|
+
}), ga = /* @__PURE__ */ d("ZodCIDRv6", (e, t) => {
|
|
4552
|
+
Fo.init(e, t), $.init(e, t);
|
|
4553
|
+
}), ha = /* @__PURE__ */ d("ZodBase64", (e, t) => {
|
|
4554
|
+
Jo.init(e, t), $.init(e, t);
|
|
4555
|
+
}), ma = /* @__PURE__ */ d("ZodBase64URL", (e, t) => {
|
|
4556
|
+
Vo.init(e, t), $.init(e, t);
|
|
4557
|
+
}), _a = /* @__PURE__ */ d("ZodE164", (e, t) => {
|
|
4558
|
+
Wo.init(e, t), $.init(e, t);
|
|
4559
|
+
}), ya = /* @__PURE__ */ d("ZodJWT", (e, t) => {
|
|
4560
|
+
Bo.init(e, t), $.init(e, t);
|
|
4561
|
+
}), Ut = /* @__PURE__ */ d("ZodNumber", (e, t) => {
|
|
4562
|
+
Zt.init(e, t), S.init(e, t), e._zod.processJSONSchema = (r, o, i) => gs(e, r, o), e.gt = (r, o) => e.check(/* @__PURE__ */ Ye(r, o)), e.gte = (r, o) => e.check(/* @__PURE__ */ ge(r, o)), e.min = (r, o) => e.check(/* @__PURE__ */ ge(r, o)), e.lt = (r, o) => e.check(/* @__PURE__ */ Ke(r, o)), e.lte = (r, o) => e.check(/* @__PURE__ */ pe(r, o)), e.max = (r, o) => e.check(/* @__PURE__ */ pe(r, o)), e.int = (r) => e.check(et(r)), e.safe = (r) => e.check(et(r)), e.positive = (r) => e.check(/* @__PURE__ */ Ye(0, r)), e.nonnegative = (r) => e.check(/* @__PURE__ */ ge(0, r)), e.negative = (r) => e.check(/* @__PURE__ */ Ke(0, r)), e.nonpositive = (r) => e.check(/* @__PURE__ */ pe(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;
|
|
4349
4563
|
const n = e._zod.bag;
|
|
4350
4564
|
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;
|
|
4351
4565
|
});
|
|
4352
|
-
function
|
|
4353
|
-
return /* @__PURE__ */
|
|
4566
|
+
function Uc(e) {
|
|
4567
|
+
return /* @__PURE__ */ Vi(Ut, e);
|
|
4354
4568
|
}
|
|
4355
|
-
const
|
|
4356
|
-
|
|
4569
|
+
const va = /* @__PURE__ */ d("ZodNumberFormat", (e, t) => {
|
|
4570
|
+
Ho.init(e, t), Ut.init(e, t);
|
|
4357
4571
|
});
|
|
4358
|
-
function
|
|
4359
|
-
return /* @__PURE__ */
|
|
4572
|
+
function et(e) {
|
|
4573
|
+
return /* @__PURE__ */ Wi(va, e);
|
|
4360
4574
|
}
|
|
4361
|
-
const
|
|
4362
|
-
|
|
4575
|
+
const wa = /* @__PURE__ */ d("ZodBoolean", (e, t) => {
|
|
4576
|
+
Ko.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => hs(e, n, r);
|
|
4363
4577
|
});
|
|
4364
|
-
function
|
|
4365
|
-
return /* @__PURE__ */
|
|
4578
|
+
function Mc(e) {
|
|
4579
|
+
return /* @__PURE__ */ Gi(wa, e);
|
|
4366
4580
|
}
|
|
4367
|
-
const
|
|
4368
|
-
|
|
4581
|
+
const ba = /* @__PURE__ */ d("ZodUnknown", (e, t) => {
|
|
4582
|
+
Yo.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => _s();
|
|
4369
4583
|
});
|
|
4370
|
-
function
|
|
4371
|
-
return /* @__PURE__ */
|
|
4584
|
+
function tt() {
|
|
4585
|
+
return /* @__PURE__ */ Bi(ba);
|
|
4372
4586
|
}
|
|
4373
|
-
const
|
|
4374
|
-
|
|
4587
|
+
const ka = /* @__PURE__ */ d("ZodNever", (e, t) => {
|
|
4588
|
+
Qo.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => ms(e, n, r);
|
|
4375
4589
|
});
|
|
4376
|
-
function
|
|
4377
|
-
return /* @__PURE__ */
|
|
4590
|
+
function za(e) {
|
|
4591
|
+
return /* @__PURE__ */ Hi(ka, e);
|
|
4378
4592
|
}
|
|
4379
|
-
const
|
|
4380
|
-
|
|
4593
|
+
const Sa = /* @__PURE__ */ d("ZodArray", (e, t) => {
|
|
4594
|
+
Xo.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => ks(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__ */ Pt(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ Ct(n, r)), e.unwrap = () => e.element;
|
|
4381
4595
|
});
|
|
4382
|
-
function
|
|
4383
|
-
return /* @__PURE__ */
|
|
4596
|
+
function $a(e, t) {
|
|
4597
|
+
return /* @__PURE__ */ as(Sa, e, t);
|
|
4384
4598
|
}
|
|
4385
|
-
const
|
|
4386
|
-
|
|
4599
|
+
const Ea = /* @__PURE__ */ d("ZodObject", (e, t) => {
|
|
4600
|
+
ti.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => zs(e, n, r, o), v(e, "shape", () => t.shape), e.keyof = () => Pa(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: tt() }), e.loose = () => e.clone({ ...e._zod.def, catchall: tt() }), e.strict = () => e.clone({ ...e._zod.def, catchall: za() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => br(e, n), e.safeExtend = (n) => kr(e, n), e.merge = (n) => zr(e, n), e.pick = (n) => vr(e, n), e.omit = (n) => wr(e, n), e.partial = (...n) => Sr(Mt, e, n[0]), e.required = (...n) => $r(xt, e, n[0]);
|
|
4387
4601
|
});
|
|
4388
|
-
function
|
|
4602
|
+
function xc(e, t) {
|
|
4389
4603
|
const n = {
|
|
4390
4604
|
type: "object",
|
|
4391
4605
|
shape: e ?? {},
|
|
4392
4606
|
...h(t)
|
|
4393
4607
|
};
|
|
4394
|
-
return new
|
|
4608
|
+
return new Ea(n);
|
|
4395
4609
|
}
|
|
4396
|
-
const
|
|
4397
|
-
|
|
4610
|
+
const Ta = /* @__PURE__ */ d("ZodUnion", (e, t) => {
|
|
4611
|
+
ni.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ss(e, n, r, o), e.options = t.options;
|
|
4398
4612
|
});
|
|
4399
|
-
function
|
|
4400
|
-
return new
|
|
4613
|
+
function Za(e, t) {
|
|
4614
|
+
return new Ta({
|
|
4401
4615
|
type: "union",
|
|
4402
4616
|
options: e,
|
|
4403
4617
|
...h(t)
|
|
4404
4618
|
});
|
|
4405
4619
|
}
|
|
4406
|
-
const
|
|
4407
|
-
|
|
4620
|
+
const Ia = /* @__PURE__ */ d("ZodIntersection", (e, t) => {
|
|
4621
|
+
ri.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => $s(e, n, r, o);
|
|
4408
4622
|
});
|
|
4409
|
-
function
|
|
4410
|
-
return new
|
|
4623
|
+
function Oa(e, t) {
|
|
4624
|
+
return new Ia({
|
|
4411
4625
|
type: "intersection",
|
|
4412
4626
|
left: e,
|
|
4413
4627
|
right: t
|
|
4414
4628
|
});
|
|
4415
4629
|
}
|
|
4416
|
-
const
|
|
4417
|
-
|
|
4630
|
+
const Aa = /* @__PURE__ */ d("ZodRecord", (e, t) => {
|
|
4631
|
+
oi.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => Es(e, n, r, o), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
4418
4632
|
});
|
|
4419
|
-
function
|
|
4420
|
-
return new
|
|
4633
|
+
function Fc(e, t, n) {
|
|
4634
|
+
return new Aa({
|
|
4421
4635
|
type: "record",
|
|
4422
4636
|
keyType: e,
|
|
4423
4637
|
valueType: t,
|
|
4424
4638
|
...h(n)
|
|
4425
4639
|
});
|
|
4426
4640
|
}
|
|
4427
|
-
const
|
|
4428
|
-
|
|
4641
|
+
const ve = /* @__PURE__ */ d("ZodEnum", (e, t) => {
|
|
4642
|
+
ii.init(e, t), S.init(e, t), e._zod.processJSONSchema = (r, o, i) => ys(e, r, o), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
4429
4643
|
const n = new Set(Object.keys(t.entries));
|
|
4430
4644
|
e.extract = (r, o) => {
|
|
4431
4645
|
const i = {};
|
|
@@ -4434,7 +4648,7 @@ const me = /* @__PURE__ */ d("ZodEnum", (e, t) => {
|
|
|
4434
4648
|
i[s] = t.entries[s];
|
|
4435
4649
|
else
|
|
4436
4650
|
throw new Error(`Key ${s} not found in enum`);
|
|
4437
|
-
return new
|
|
4651
|
+
return new ve({
|
|
4438
4652
|
...t,
|
|
4439
4653
|
checks: [],
|
|
4440
4654
|
...h(o),
|
|
@@ -4447,7 +4661,7 @@ const me = /* @__PURE__ */ d("ZodEnum", (e, t) => {
|
|
|
4447
4661
|
delete i[s];
|
|
4448
4662
|
else
|
|
4449
4663
|
throw new Error(`Key ${s} not found in enum`);
|
|
4450
|
-
return new
|
|
4664
|
+
return new ve({
|
|
4451
4665
|
...t,
|
|
4452
4666
|
checks: [],
|
|
4453
4667
|
...h(o),
|
|
@@ -4455,16 +4669,16 @@ const me = /* @__PURE__ */ d("ZodEnum", (e, t) => {
|
|
|
4455
4669
|
});
|
|
4456
4670
|
};
|
|
4457
4671
|
});
|
|
4458
|
-
function
|
|
4672
|
+
function Pa(e, t) {
|
|
4459
4673
|
const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
|
|
4460
|
-
return new
|
|
4674
|
+
return new ve({
|
|
4461
4675
|
type: "enum",
|
|
4462
4676
|
entries: n,
|
|
4463
4677
|
...h(t)
|
|
4464
4678
|
});
|
|
4465
4679
|
}
|
|
4466
|
-
const
|
|
4467
|
-
|
|
4680
|
+
const Ca = /* @__PURE__ */ d("ZodLiteral", (e, t) => {
|
|
4681
|
+
si.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => vs(e, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", {
|
|
4468
4682
|
get() {
|
|
4469
4683
|
if (t.values.length > 1)
|
|
4470
4684
|
throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
@@ -4472,202 +4686,207 @@ const ba = /* @__PURE__ */ d("ZodLiteral", (e, t) => {
|
|
|
4472
4686
|
}
|
|
4473
4687
|
});
|
|
4474
4688
|
});
|
|
4475
|
-
function
|
|
4476
|
-
return new
|
|
4689
|
+
function Jc(e, t) {
|
|
4690
|
+
return new Ca({
|
|
4477
4691
|
type: "literal",
|
|
4478
4692
|
values: Array.isArray(e) ? e : [e],
|
|
4479
4693
|
...h(t)
|
|
4480
4694
|
});
|
|
4481
4695
|
}
|
|
4482
|
-
const
|
|
4483
|
-
|
|
4696
|
+
const Na = /* @__PURE__ */ d("ZodTransform", (e, t) => {
|
|
4697
|
+
ai.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => bs(e, n), e._zod.parse = (n, r) => {
|
|
4484
4698
|
if (r.direction === "backward")
|
|
4485
|
-
throw new
|
|
4699
|
+
throw new ft(e.constructor.name);
|
|
4486
4700
|
n.addIssue = (i) => {
|
|
4487
4701
|
if (typeof i == "string")
|
|
4488
|
-
n.issues.push(
|
|
4702
|
+
n.issues.push(ne(i, n.value, t));
|
|
4489
4703
|
else {
|
|
4490
4704
|
const s = i;
|
|
4491
|
-
s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = n.value), s.inst ?? (s.inst = e), n.issues.push(
|
|
4705
|
+
s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = n.value), s.inst ?? (s.inst = e), n.issues.push(ne(s));
|
|
4492
4706
|
}
|
|
4493
4707
|
};
|
|
4494
4708
|
const o = t.transform(n.value, n);
|
|
4495
4709
|
return o instanceof Promise ? o.then((i) => (n.value = i, n)) : (n.value = o, n);
|
|
4496
4710
|
};
|
|
4497
4711
|
});
|
|
4498
|
-
function
|
|
4499
|
-
return new
|
|
4712
|
+
function Ra(e) {
|
|
4713
|
+
return new Na({
|
|
4500
4714
|
type: "transform",
|
|
4501
4715
|
transform: e
|
|
4502
4716
|
});
|
|
4503
4717
|
}
|
|
4504
|
-
const
|
|
4505
|
-
|
|
4718
|
+
const Mt = /* @__PURE__ */ d("ZodOptional", (e, t) => {
|
|
4719
|
+
At.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => jt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4506
4720
|
});
|
|
4507
|
-
function
|
|
4508
|
-
return new
|
|
4721
|
+
function nt(e) {
|
|
4722
|
+
return new Mt({
|
|
4509
4723
|
type: "optional",
|
|
4510
4724
|
innerType: e
|
|
4511
4725
|
});
|
|
4512
4726
|
}
|
|
4513
|
-
const
|
|
4514
|
-
|
|
4727
|
+
const Da = /* @__PURE__ */ d("ZodExactOptional", (e, t) => {
|
|
4728
|
+
ci.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => jt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4515
4729
|
});
|
|
4516
|
-
function
|
|
4517
|
-
return new
|
|
4730
|
+
function ja(e) {
|
|
4731
|
+
return new Da({
|
|
4518
4732
|
type: "optional",
|
|
4519
4733
|
innerType: e
|
|
4520
4734
|
});
|
|
4521
4735
|
}
|
|
4522
|
-
const
|
|
4523
|
-
|
|
4736
|
+
const La = /* @__PURE__ */ d("ZodNullable", (e, t) => {
|
|
4737
|
+
ui.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ts(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4524
4738
|
});
|
|
4525
|
-
function
|
|
4526
|
-
return new
|
|
4739
|
+
function rt(e) {
|
|
4740
|
+
return new La({
|
|
4527
4741
|
type: "nullable",
|
|
4528
4742
|
innerType: e
|
|
4529
4743
|
});
|
|
4530
4744
|
}
|
|
4531
|
-
const
|
|
4532
|
-
|
|
4745
|
+
const Ua = /* @__PURE__ */ d("ZodDefault", (e, t) => {
|
|
4746
|
+
di.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => Is(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
4533
4747
|
});
|
|
4534
|
-
function
|
|
4535
|
-
return new
|
|
4748
|
+
function Ma(e, t) {
|
|
4749
|
+
return new Ua({
|
|
4536
4750
|
type: "default",
|
|
4537
4751
|
innerType: e,
|
|
4538
4752
|
get defaultValue() {
|
|
4539
|
-
return typeof t == "function" ? t() :
|
|
4753
|
+
return typeof t == "function" ? t() : mt(t);
|
|
4540
4754
|
}
|
|
4541
4755
|
});
|
|
4542
4756
|
}
|
|
4543
|
-
const
|
|
4544
|
-
|
|
4757
|
+
const xa = /* @__PURE__ */ d("ZodPrefault", (e, t) => {
|
|
4758
|
+
li.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => Os(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4545
4759
|
});
|
|
4546
|
-
function
|
|
4547
|
-
return new
|
|
4760
|
+
function Fa(e, t) {
|
|
4761
|
+
return new xa({
|
|
4548
4762
|
type: "prefault",
|
|
4549
4763
|
innerType: e,
|
|
4550
4764
|
get defaultValue() {
|
|
4551
|
-
return typeof t == "function" ? t() :
|
|
4765
|
+
return typeof t == "function" ? t() : mt(t);
|
|
4552
4766
|
}
|
|
4553
4767
|
});
|
|
4554
4768
|
}
|
|
4555
|
-
const
|
|
4556
|
-
|
|
4769
|
+
const xt = /* @__PURE__ */ d("ZodNonOptional", (e, t) => {
|
|
4770
|
+
fi.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => Zs(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4557
4771
|
});
|
|
4558
|
-
function
|
|
4559
|
-
return new
|
|
4772
|
+
function Ja(e, t) {
|
|
4773
|
+
return new xt({
|
|
4560
4774
|
type: "nonoptional",
|
|
4561
4775
|
innerType: e,
|
|
4562
4776
|
...h(t)
|
|
4563
4777
|
});
|
|
4564
4778
|
}
|
|
4565
|
-
const
|
|
4566
|
-
|
|
4779
|
+
const qa = /* @__PURE__ */ d("ZodCatch", (e, t) => {
|
|
4780
|
+
pi.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => As(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
4567
4781
|
});
|
|
4568
|
-
function
|
|
4569
|
-
return new
|
|
4782
|
+
function Va(e, t) {
|
|
4783
|
+
return new qa({
|
|
4570
4784
|
type: "catch",
|
|
4571
4785
|
innerType: e,
|
|
4572
4786
|
catchValue: typeof t == "function" ? t : () => t
|
|
4573
4787
|
});
|
|
4574
4788
|
}
|
|
4575
|
-
const
|
|
4576
|
-
|
|
4789
|
+
const Wa = /* @__PURE__ */ d("ZodPipe", (e, t) => {
|
|
4790
|
+
gi.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ps(e, n, r, o), e.in = t.in, e.out = t.out;
|
|
4577
4791
|
});
|
|
4578
|
-
function
|
|
4579
|
-
return new
|
|
4792
|
+
function ot(e, t) {
|
|
4793
|
+
return new Wa({
|
|
4580
4794
|
type: "pipe",
|
|
4581
4795
|
in: e,
|
|
4582
4796
|
out: t
|
|
4583
4797
|
// ...util.normalizeParams(params),
|
|
4584
4798
|
});
|
|
4585
4799
|
}
|
|
4586
|
-
const
|
|
4587
|
-
|
|
4800
|
+
const Ga = /* @__PURE__ */ d("ZodReadonly", (e, t) => {
|
|
4801
|
+
hi.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => Cs(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4588
4802
|
});
|
|
4589
|
-
function
|
|
4590
|
-
return new
|
|
4803
|
+
function Ba(e) {
|
|
4804
|
+
return new Ga({
|
|
4591
4805
|
type: "readonly",
|
|
4592
4806
|
innerType: e
|
|
4593
4807
|
});
|
|
4594
4808
|
}
|
|
4595
|
-
const
|
|
4596
|
-
|
|
4809
|
+
const Ha = /* @__PURE__ */ d("ZodCustom", (e, t) => {
|
|
4810
|
+
mi.init(e, t), S.init(e, t), e._zod.processJSONSchema = (n, r, o) => ws(e, n);
|
|
4597
4811
|
});
|
|
4598
|
-
function
|
|
4599
|
-
return /* @__PURE__ */
|
|
4812
|
+
function Ka(e, t = {}) {
|
|
4813
|
+
return /* @__PURE__ */ cs(Ha, e, t);
|
|
4600
4814
|
}
|
|
4601
|
-
function
|
|
4602
|
-
return /* @__PURE__ */
|
|
4815
|
+
function Ya(e) {
|
|
4816
|
+
return /* @__PURE__ */ us(e);
|
|
4603
4817
|
}
|
|
4604
4818
|
export {
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4819
|
+
hc as $,
|
|
4820
|
+
De as A,
|
|
4821
|
+
wc as B,
|
|
4822
|
+
dc as C,
|
|
4823
|
+
me as D,
|
|
4824
|
+
st as E,
|
|
4825
|
+
fc as F,
|
|
4826
|
+
Fc as G,
|
|
4827
|
+
Pc as H,
|
|
4828
|
+
Nc as I,
|
|
4829
|
+
Dc as J,
|
|
4830
|
+
Ic as K,
|
|
4831
|
+
Tc as L,
|
|
4832
|
+
Zc as M,
|
|
4833
|
+
Ac as N,
|
|
4834
|
+
Ec as O,
|
|
4835
|
+
Rc as P,
|
|
4836
|
+
ac as Q,
|
|
4837
|
+
cc as R,
|
|
4838
|
+
lr as S,
|
|
4839
|
+
sc as T,
|
|
4840
|
+
rc as U,
|
|
4841
|
+
Oc as V,
|
|
4842
|
+
Cc as W,
|
|
4843
|
+
nc as X,
|
|
4844
|
+
Jc as Y,
|
|
4845
|
+
tn as Z,
|
|
4846
|
+
Pa as _,
|
|
4847
|
+
kc as a,
|
|
4848
|
+
ir as a0,
|
|
4849
|
+
Oe as a1,
|
|
4850
|
+
en as a2,
|
|
4851
|
+
Wt as a3,
|
|
4852
|
+
Vt as a4,
|
|
4853
|
+
Jt as a5,
|
|
4854
|
+
un as a6,
|
|
4855
|
+
_c as a7,
|
|
4856
|
+
te as a8,
|
|
4857
|
+
qt as a9,
|
|
4858
|
+
M as aa,
|
|
4859
|
+
an as ab,
|
|
4860
|
+
cn as ac,
|
|
4861
|
+
bc as ad,
|
|
4862
|
+
yc as ae,
|
|
4863
|
+
jc as af,
|
|
4864
|
+
mc as ag,
|
|
4865
|
+
nn as ah,
|
|
4866
|
+
$c as b,
|
|
4867
|
+
_n as c,
|
|
4868
|
+
Mc as d,
|
|
4869
|
+
tt as e,
|
|
4870
|
+
$a as f,
|
|
4871
|
+
tc as g,
|
|
4872
|
+
oc as h,
|
|
4873
|
+
Re as i,
|
|
4874
|
+
gc as j,
|
|
4875
|
+
vc as k,
|
|
4876
|
+
ic as l,
|
|
4877
|
+
ec as m,
|
|
4878
|
+
ur as n,
|
|
4879
|
+
xc as o,
|
|
4880
|
+
zc as p,
|
|
4881
|
+
Sc as q,
|
|
4882
|
+
Xa as r,
|
|
4883
|
+
Lc as s,
|
|
4884
|
+
ar as t,
|
|
4885
|
+
Za as u,
|
|
4886
|
+
pc as v,
|
|
4887
|
+
uc as w,
|
|
4888
|
+
lc as x,
|
|
4889
|
+
Uc as y,
|
|
4890
|
+
dr as z
|
|
4672
4891
|
};
|
|
4673
|
-
//# sourceMappingURL=schemas-
|
|
4892
|
+
//# sourceMappingURL=schemas-DIhL3DkL.js.map
|