@soma-vertical-web/multi-lib 1.0.36 → 1.0.38
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/constants.d.ts +0 -14
- package/data/api/checkout/order-form/items/index.d.ts +2 -2
- package/data/api/checkout/order-form/items/update/index.d.ts +2 -2
- package/data/api/xml/index.d.ts +4 -2
- package/index-DbyPXL-x.mjs +2696 -0
- package/index-HEA7MkPc.js +4 -0
- package/index.js +18 -18
- package/index.mjs +2901 -2930
- package/index2.js +2 -2
- package/index2.mjs +273 -275
- package/layout/team-component/UserMenu/Composite/Menu.d.ts +1 -1
- package/layout/team-component/UserMenu/UserMenu.d.ts +1 -1
- package/package.json +1 -1
- package/types/constants.d.ts +12 -0
- package/types/layout/team-components/Filter/index.d.ts +0 -1
- package/types/layout/team-components/Header/index.d.ts +8 -1
- package/types/layout/team-components/UserMenu/index.d.ts +4 -5
package/index2.mjs
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsx as T, jsxs as pe, Fragment as W } from "react/jsx-runtime";
|
|
2
|
-
import { a4 as F, W as oe, a5 as _t, a6 as j, a7 as Rt, a8 as It, a9 as Pt, a as xt, J as St, N as Ct, K as kt, Q as Et, L as Be, O as Ot, P as At, M as Tt, B as jt, aa as qt, ab as Nt, ac as Ft, ad as $t, D as Lt, ae as Dt, af as Ut } from "./index-
|
|
2
|
+
import { a4 as F, W as oe, a5 as _t, a6 as j, a7 as Rt, a8 as It, a9 as Pt, a as xt, J as St, N as Ct, K as kt, Q as Et, L as Be, O as Ot, P as At, M as Tt, B as jt, aa as qt, ab as Nt, ac as Ft, ad as $t, D as Lt, ae as Dt, af as Ut } from "./index-DbyPXL-x.mjs";
|
|
3
3
|
import { Utils as se, helpers as ce } from "@soma-vertical-web/core-components";
|
|
4
4
|
import * as l from "yup";
|
|
5
5
|
import Mt from "sanitize-html";
|
|
6
6
|
import { decodeJwt as Ht } from "jose";
|
|
7
|
-
|
|
8
|
-
const zt = async ({
|
|
7
|
+
const Bt = async ({
|
|
9
8
|
children: e,
|
|
10
9
|
ClientCartProvider: t,
|
|
11
10
|
...r
|
|
@@ -15,7 +14,7 @@ const zt = async ({
|
|
|
15
14
|
r
|
|
16
15
|
);
|
|
17
16
|
return /* @__PURE__ */ T(t, { ...n ? Array.isArray(n) ? { data: n[0] } : { data: n } : {}, children: e });
|
|
18
|
-
},
|
|
17
|
+
}, zt = ({
|
|
19
18
|
slug: e,
|
|
20
19
|
data: t,
|
|
21
20
|
SectionZone: r,
|
|
@@ -57,7 +56,7 @@ const zt = async ({
|
|
|
57
56
|
}
|
|
58
57
|
)
|
|
59
58
|
] });
|
|
60
|
-
},
|
|
59
|
+
}, Gt = async ({
|
|
61
60
|
slug: e,
|
|
62
61
|
SectionZone: t,
|
|
63
62
|
COMMON_PAGE_COLUMN_GAP: r,
|
|
@@ -69,7 +68,7 @@ const zt = async ({
|
|
|
69
68
|
a
|
|
70
69
|
);
|
|
71
70
|
return !o || !Array.isArray(o) || o.length === 0 ? null : /* @__PURE__ */ T(
|
|
72
|
-
|
|
71
|
+
zt,
|
|
73
72
|
{
|
|
74
73
|
data: o,
|
|
75
74
|
slug: e,
|
|
@@ -78,7 +77,7 @@ const zt = async ({
|
|
|
78
77
|
identifyWhoIsFirst: n
|
|
79
78
|
}
|
|
80
79
|
);
|
|
81
|
-
},
|
|
80
|
+
}, Vt = async ({
|
|
82
81
|
children: e,
|
|
83
82
|
ClientFlagsAndTagsProvider: t,
|
|
84
83
|
...r
|
|
@@ -88,7 +87,7 @@ const zt = async ({
|
|
|
88
87
|
r
|
|
89
88
|
);
|
|
90
89
|
return !n || !Array.isArray(n) ? null : /* @__PURE__ */ T(t, { data: n[0], children: e });
|
|
91
|
-
},
|
|
90
|
+
}, Wt = async ({
|
|
92
91
|
className: e,
|
|
93
92
|
PAYMENT_FLAGS_DICTIONARY: t,
|
|
94
93
|
PAYMENT_FLAGS: r,
|
|
@@ -138,7 +137,7 @@ const zt = async ({
|
|
|
138
137
|
ICONS: a
|
|
139
138
|
}
|
|
140
139
|
) : null;
|
|
141
|
-
},
|
|
140
|
+
}, Qt = async ({
|
|
142
141
|
children: e,
|
|
143
142
|
ClientHeaderProvider: t,
|
|
144
143
|
...r
|
|
@@ -160,7 +159,7 @@ const zt = async ({
|
|
|
160
159
|
children: e
|
|
161
160
|
}
|
|
162
161
|
);
|
|
163
|
-
},
|
|
162
|
+
}, Xt = (e) => {
|
|
164
163
|
var c, i;
|
|
165
164
|
const t = (i = (c = e[0]) == null ? void 0 : c.items) == null ? void 0 : i.items;
|
|
166
165
|
if ((t == null ? void 0 : t.items.length) === 0 || e.length === 0)
|
|
@@ -189,7 +188,7 @@ const zt = async ({
|
|
|
189
188
|
helpButtonSize: a,
|
|
190
189
|
content: o
|
|
191
190
|
};
|
|
192
|
-
},
|
|
191
|
+
}, Kt = async ({
|
|
193
192
|
HelpButton: e,
|
|
194
193
|
ICONS: t,
|
|
195
194
|
className: r,
|
|
@@ -201,7 +200,7 @@ const zt = async ({
|
|
|
201
200
|
);
|
|
202
201
|
if (!a || !Array.isArray(a) || a.length === 0)
|
|
203
202
|
return null;
|
|
204
|
-
const o =
|
|
203
|
+
const o = Xt(a);
|
|
205
204
|
return /* @__PURE__ */ T(
|
|
206
205
|
e,
|
|
207
206
|
{
|
|
@@ -210,7 +209,7 @@ const zt = async ({
|
|
|
210
209
|
className: r
|
|
211
210
|
}
|
|
212
211
|
);
|
|
213
|
-
},
|
|
212
|
+
}, Jt = async ({
|
|
214
213
|
SectionZone: e,
|
|
215
214
|
LPCadastro: t,
|
|
216
215
|
...r
|
|
@@ -227,7 +226,7 @@ const zt = async ({
|
|
|
227
226
|
/* @__PURE__ */ T(t, { sections: o, content: c }),
|
|
228
227
|
/* @__PURE__ */ T(e, { data: i })
|
|
229
228
|
] });
|
|
230
|
-
},
|
|
229
|
+
}, Zt = async ({
|
|
231
230
|
LPLOJAS_TEMPLATE_RETURN_BUTTON: e,
|
|
232
231
|
ICONS: t,
|
|
233
232
|
entity: r,
|
|
@@ -248,7 +247,7 @@ const zt = async ({
|
|
|
248
247
|
LPLOJAS_TEMPLATE_RETURN_BUTTON: e
|
|
249
248
|
}
|
|
250
249
|
);
|
|
251
|
-
},
|
|
250
|
+
}, Yt = async ({
|
|
252
251
|
ERROR_TEMPLATE_RETURN_BUTTON: e,
|
|
253
252
|
ErrorTemplate: t,
|
|
254
253
|
...r
|
|
@@ -265,7 +264,7 @@ const zt = async ({
|
|
|
265
264
|
ERROR_TEMPLATE_RETURN_BUTTON: e
|
|
266
265
|
}
|
|
267
266
|
) : /* @__PURE__ */ T(W, {});
|
|
268
|
-
},
|
|
267
|
+
}, er = async ({
|
|
269
268
|
children: e,
|
|
270
269
|
productId: t,
|
|
271
270
|
COMMON_PAGE_COLUMN_GAP: r,
|
|
@@ -287,9 +286,9 @@ const zt = async ({
|
|
|
287
286
|
children: e
|
|
288
287
|
}
|
|
289
288
|
);
|
|
290
|
-
},
|
|
289
|
+
}, tr = {
|
|
291
290
|
"column-modifier": "_column-modifier_1tqap_1"
|
|
292
|
-
},
|
|
291
|
+
}, rr = async ({
|
|
293
292
|
className: e,
|
|
294
293
|
children: t,
|
|
295
294
|
slug: r,
|
|
@@ -331,7 +330,7 @@ const zt = async ({
|
|
|
331
330
|
{
|
|
332
331
|
className: ce.classNameConcat(
|
|
333
332
|
oe["responsive-desktop-flex"],
|
|
334
|
-
[
|
|
333
|
+
[tr["column-modifier"], ...w]
|
|
335
334
|
),
|
|
336
335
|
style: {
|
|
337
336
|
minHeight: "100vh"
|
|
@@ -359,7 +358,7 @@ const zt = async ({
|
|
|
359
358
|
}
|
|
360
359
|
) })
|
|
361
360
|
] });
|
|
362
|
-
},
|
|
361
|
+
}, nr = async ({ slug: e, ...t }) => {
|
|
363
362
|
var c, i, u;
|
|
364
363
|
const { data: r } = await F(
|
|
365
364
|
"redirect_to_search",
|
|
@@ -399,7 +398,7 @@ const zt = async ({
|
|
|
399
398
|
filters: null,
|
|
400
399
|
sort: null
|
|
401
400
|
};
|
|
402
|
-
},
|
|
401
|
+
}, ar = async ({ slug: e, ...t }) => {
|
|
403
402
|
var c, i, u;
|
|
404
403
|
const { data: r } = await F(
|
|
405
404
|
"redirect_to_search",
|
|
@@ -421,7 +420,7 @@ const zt = async ({
|
|
|
421
420
|
title: o.pageTitle,
|
|
422
421
|
description: o.pageDescription
|
|
423
422
|
} : null;
|
|
424
|
-
},
|
|
423
|
+
}, ir = async ({
|
|
425
424
|
slug: e,
|
|
426
425
|
Politicas: t,
|
|
427
426
|
SectionZone: r,
|
|
@@ -447,7 +446,7 @@ const zt = async ({
|
|
|
447
446
|
),
|
|
448
447
|
g && /* @__PURE__ */ T(r, { data: g })
|
|
449
448
|
] });
|
|
450
|
-
},
|
|
449
|
+
}, or = async ({
|
|
451
450
|
children: e,
|
|
452
451
|
SectionZone: t,
|
|
453
452
|
className: r,
|
|
@@ -466,7 +465,7 @@ const zt = async ({
|
|
|
466
465
|
children: e
|
|
467
466
|
}
|
|
468
467
|
) : /* @__PURE__ */ T(W, { children: "children" });
|
|
469
|
-
},
|
|
468
|
+
}, sr = async ({
|
|
470
469
|
ClientTipbarContent: e,
|
|
471
470
|
...t
|
|
472
471
|
}) => {
|
|
@@ -475,7 +474,7 @@ const zt = async ({
|
|
|
475
474
|
t
|
|
476
475
|
);
|
|
477
476
|
return /* @__PURE__ */ T(e, { data: r });
|
|
478
|
-
},
|
|
477
|
+
}, cr = async ({
|
|
479
478
|
children: e,
|
|
480
479
|
SectionZone: t,
|
|
481
480
|
WishlistScreening: r,
|
|
@@ -493,34 +492,34 @@ const zt = async ({
|
|
|
493
492
|
children: e
|
|
494
493
|
}
|
|
495
494
|
);
|
|
496
|
-
},
|
|
497
|
-
CommonPageContent:
|
|
498
|
-
CartContent:
|
|
499
|
-
FlagsAndTagsContent:
|
|
500
|
-
HeaderContent:
|
|
501
|
-
TipbarContent:
|
|
502
|
-
FooterContent:
|
|
503
|
-
PLPContent:
|
|
504
|
-
PDPContent:
|
|
505
|
-
getRedirectData:
|
|
506
|
-
getPLPSynteticMetaData:
|
|
507
|
-
SearchPageContent:
|
|
508
|
-
HelpButtonContent:
|
|
509
|
-
LPCadastroContent:
|
|
510
|
-
LPLojasContent:
|
|
511
|
-
PolicyPageContent:
|
|
512
|
-
NotFoundContent:
|
|
513
|
-
WishlistContent:
|
|
514
|
-
},
|
|
495
|
+
}, lr = {
|
|
496
|
+
CommonPageContent: Gt,
|
|
497
|
+
CartContent: Bt,
|
|
498
|
+
FlagsAndTagsContent: Vt,
|
|
499
|
+
HeaderContent: Qt,
|
|
500
|
+
TipbarContent: sr,
|
|
501
|
+
FooterContent: Wt,
|
|
502
|
+
PLPContent: rr,
|
|
503
|
+
PDPContent: er,
|
|
504
|
+
getRedirectData: nr,
|
|
505
|
+
getPLPSynteticMetaData: ar,
|
|
506
|
+
SearchPageContent: or,
|
|
507
|
+
HelpButtonContent: Kt,
|
|
508
|
+
LPCadastroContent: Jt,
|
|
509
|
+
LPLojasContent: Zt,
|
|
510
|
+
PolicyPageContent: ir,
|
|
511
|
+
NotFoundContent: Yt,
|
|
512
|
+
WishlistContent: cr
|
|
513
|
+
}, Ia = { Components: lr }, ur = l.object({
|
|
515
514
|
country: l.string().length(3, "Country code must be 3 characters long").required("Country is required"),
|
|
516
515
|
postalCode: l.string().nullable()
|
|
517
516
|
});
|
|
518
|
-
async function
|
|
517
|
+
async function dr({ apiUrl: e, body: t, fetchOptions: r }) {
|
|
519
518
|
if (!t) {
|
|
520
519
|
console.error("[ERROR FETCHING] Body is required");
|
|
521
520
|
return;
|
|
522
521
|
}
|
|
523
|
-
await
|
|
522
|
+
await ur.validate(t);
|
|
524
523
|
const { country: n, postalCode: a } = t;
|
|
525
524
|
return await j(
|
|
526
525
|
`${e}/api/checkout/pub/postal-code/${n}/${a}`,
|
|
@@ -531,7 +530,7 @@ async function pr({ apiUrl: e, body: t, fetchOptions: r }) {
|
|
|
531
530
|
}
|
|
532
531
|
);
|
|
533
532
|
}
|
|
534
|
-
const
|
|
533
|
+
const pr = l.object({
|
|
535
534
|
orderFormId: l.string().nullable(),
|
|
536
535
|
sellerCode: l.string().nullable(),
|
|
537
536
|
sellerName: l.string().nullable()
|
|
@@ -545,7 +544,7 @@ async function ze({
|
|
|
545
544
|
console.error("[ERROR FETCHING] Body is required");
|
|
546
545
|
return;
|
|
547
546
|
}
|
|
548
|
-
await
|
|
547
|
+
await pr.validate(t);
|
|
549
548
|
const { orderFormId: n, sellerCode: a, sellerName: o } = t, c = a ? `${a.trim()} - ${o}` : null;
|
|
550
549
|
return j(
|
|
551
550
|
`${e}/api/checkout/pub/orderForm/${n}/attachments/openTextField`,
|
|
@@ -558,7 +557,7 @@ async function ze({
|
|
|
558
557
|
}
|
|
559
558
|
);
|
|
560
559
|
}
|
|
561
|
-
const
|
|
560
|
+
const mr = l.object({
|
|
562
561
|
orderFormId: l.string().nullable(),
|
|
563
562
|
sellerCode: l.string().nullable(),
|
|
564
563
|
marketingData: l.object()
|
|
@@ -573,7 +572,7 @@ async function Ge({
|
|
|
573
572
|
console.error("[ERROR FETCHING] Body is required");
|
|
574
573
|
return;
|
|
575
574
|
}
|
|
576
|
-
await
|
|
575
|
+
await mr.validate(t);
|
|
577
576
|
const { orderFormId: a, sellerCode: o, marketingData: c } = t, i = o ? {
|
|
578
577
|
utmCampaign: o ? o.toUpperCase() : "",
|
|
579
578
|
utmiCampaign: o ? `${r.VENDOR_CODE}` : "semcodigo"
|
|
@@ -590,17 +589,17 @@ async function Ge({
|
|
|
590
589
|
}
|
|
591
590
|
);
|
|
592
591
|
}
|
|
593
|
-
const
|
|
592
|
+
const fr = l.object({
|
|
594
593
|
orderFormId: l.string().nullable(),
|
|
595
594
|
sellerCode: l.string().nullable(),
|
|
596
595
|
sellerName: l.string().nullable()
|
|
597
596
|
});
|
|
598
|
-
async function
|
|
597
|
+
async function hr({ apiUrl: e, body: t, fetchOptions: r, extraData: n }) {
|
|
599
598
|
if (!t) {
|
|
600
599
|
console.error("[ERROR FETCHING] Body is required");
|
|
601
600
|
return;
|
|
602
601
|
}
|
|
603
|
-
await
|
|
602
|
+
await fr.validate(t);
|
|
604
603
|
const a = await ze({ apiUrl: e, body: t, fetchOptions: r });
|
|
605
604
|
return Ge({
|
|
606
605
|
apiUrl: e,
|
|
@@ -612,11 +611,11 @@ async function gr({ apiUrl: e, body: t, fetchOptions: r, extraData: n }) {
|
|
|
612
611
|
fetchOptions: r
|
|
613
612
|
});
|
|
614
613
|
}
|
|
615
|
-
const
|
|
614
|
+
const gr = l.object({
|
|
616
615
|
orderFormId: l.string().nullable(),
|
|
617
616
|
coupon: l.string().nullable()
|
|
618
617
|
});
|
|
619
|
-
async function
|
|
618
|
+
async function br({
|
|
620
619
|
apiUrl: e,
|
|
621
620
|
body: t,
|
|
622
621
|
fetchOptions: r
|
|
@@ -625,7 +624,7 @@ async function wr({
|
|
|
625
624
|
console.error("[ERROR FETCHING] Body is required");
|
|
626
625
|
return;
|
|
627
626
|
}
|
|
628
|
-
await
|
|
627
|
+
await gr.validate(t);
|
|
629
628
|
const { coupon: n = "", orderFormId: a } = t;
|
|
630
629
|
return j(
|
|
631
630
|
`${e}/api/checkout/pub/orderForm/${a}/coupons`,
|
|
@@ -636,12 +635,12 @@ async function wr({
|
|
|
636
635
|
}
|
|
637
636
|
);
|
|
638
637
|
}
|
|
639
|
-
const
|
|
638
|
+
const wr = l.object({
|
|
640
639
|
appId: l.string().required("App ID is required"),
|
|
641
640
|
orderFormId: l.string().nullable(),
|
|
642
641
|
key: l.array().of(l.string())
|
|
643
642
|
});
|
|
644
|
-
async function
|
|
643
|
+
async function vr({
|
|
645
644
|
apiUrl: e,
|
|
646
645
|
body: t,
|
|
647
646
|
fetchOptions: r
|
|
@@ -650,7 +649,7 @@ async function yr({
|
|
|
650
649
|
console.error("[ERROR FETCHING] Body is required");
|
|
651
650
|
return;
|
|
652
651
|
}
|
|
653
|
-
await
|
|
652
|
+
await wr.validate(t);
|
|
654
653
|
const { appId: n = "faststore", orderFormId: a, key: o } = t;
|
|
655
654
|
return j(
|
|
656
655
|
`${e}/api/checkout/pub/orderForm/${a}/customData/${n}/${o}`,
|
|
@@ -660,23 +659,23 @@ async function yr({
|
|
|
660
659
|
}
|
|
661
660
|
);
|
|
662
661
|
}
|
|
663
|
-
const
|
|
662
|
+
const yr = l.object().shape({
|
|
664
663
|
name: l.string().required("Attachment name is required"),
|
|
665
664
|
content: l.object().nullable()
|
|
666
665
|
});
|
|
667
666
|
var Me;
|
|
668
|
-
const
|
|
669
|
-
attachments: (Me = l.array().of(
|
|
667
|
+
const _r = l.object().shape({
|
|
668
|
+
attachments: (Me = l.array().of(yr)) == null ? void 0 : Me.nullable(),
|
|
670
669
|
id: l.string().required("ID of SKU is required"),
|
|
671
670
|
index: l.number().integer().nullable(),
|
|
672
671
|
quantity: l.number().integer().nullable(),
|
|
673
672
|
seller: l.string().required("Seller is required"),
|
|
674
673
|
price: l.number().integer()
|
|
675
|
-
}),
|
|
674
|
+
}), Rr = l.object({
|
|
676
675
|
orderFormId: l.string().required("OrderFormId is required"),
|
|
677
|
-
orderItems: l.array().of(
|
|
676
|
+
orderItems: l.array().of(_r)
|
|
678
677
|
});
|
|
679
|
-
async function
|
|
678
|
+
async function Ir({
|
|
680
679
|
apiUrl: e,
|
|
681
680
|
body: t,
|
|
682
681
|
fetchOptions: r
|
|
@@ -685,7 +684,7 @@ async function Pr({
|
|
|
685
684
|
console.error("[ERROR FETCHING] Body is required");
|
|
686
685
|
return;
|
|
687
686
|
}
|
|
688
|
-
await
|
|
687
|
+
await Rr.validate(t);
|
|
689
688
|
const { orderFormId: n, orderItems: a } = t;
|
|
690
689
|
return j(
|
|
691
690
|
`${e}/api/checkout/pub/orderForm/${n}/items`,
|
|
@@ -696,10 +695,10 @@ async function Pr({
|
|
|
696
695
|
}
|
|
697
696
|
);
|
|
698
697
|
}
|
|
699
|
-
const
|
|
698
|
+
const Pr = l.object({
|
|
700
699
|
orderFormId: l.string().nullable()
|
|
701
700
|
});
|
|
702
|
-
async function
|
|
701
|
+
async function xr({
|
|
703
702
|
apiUrl: e,
|
|
704
703
|
body: t,
|
|
705
704
|
fetchOptions: r
|
|
@@ -708,7 +707,7 @@ async function Sr({
|
|
|
708
707
|
console.error("[ERROR FETCHING] Body is required");
|
|
709
708
|
return;
|
|
710
709
|
}
|
|
711
|
-
await
|
|
710
|
+
await Pr.validate(t);
|
|
712
711
|
const { orderFormId: n } = t;
|
|
713
712
|
return j(
|
|
714
713
|
`${e}/api/checkout/pub/orderForm/${n}/items/removeAll`,
|
|
@@ -718,23 +717,23 @@ async function Sr({
|
|
|
718
717
|
}
|
|
719
718
|
);
|
|
720
719
|
}
|
|
721
|
-
const
|
|
720
|
+
const Sr = l.object().shape({
|
|
722
721
|
name: l.string().required("Attachment name is required"),
|
|
723
722
|
content: l.object().nullable()
|
|
724
723
|
});
|
|
725
724
|
var He;
|
|
726
|
-
const
|
|
727
|
-
attachments: (He = l.array().of(
|
|
725
|
+
const Cr = l.object().shape({
|
|
726
|
+
attachments: (He = l.array().of(Sr)) == null ? void 0 : He.nullable(),
|
|
728
727
|
id: l.string().required("ID of SKU is required"),
|
|
729
728
|
index: l.number().integer().nullable(),
|
|
730
729
|
quantity: l.number().integer().nullable(),
|
|
731
730
|
seller: l.string().required("Seller is required"),
|
|
732
731
|
price: l.number().integer()
|
|
733
|
-
}),
|
|
732
|
+
}), kr = l.object({
|
|
734
733
|
orderFormId: l.string().nullable(),
|
|
735
|
-
orderItems: l.array().of(
|
|
734
|
+
orderItems: l.array().of(Cr)
|
|
736
735
|
});
|
|
737
|
-
async function
|
|
736
|
+
async function Er({
|
|
738
737
|
apiUrl: e,
|
|
739
738
|
body: t,
|
|
740
739
|
fetchOptions: r
|
|
@@ -743,7 +742,7 @@ async function Or({
|
|
|
743
742
|
console.error("[ERROR FETCHING] Body is required");
|
|
744
743
|
return;
|
|
745
744
|
}
|
|
746
|
-
await
|
|
745
|
+
await kr.validate(t);
|
|
747
746
|
const { orderFormId: n, orderItems: a } = t;
|
|
748
747
|
return j(
|
|
749
748
|
`${e}/api/checkout/pub/orderForm/${n}/items/update`,
|
|
@@ -754,10 +753,10 @@ async function Or({
|
|
|
754
753
|
}
|
|
755
754
|
);
|
|
756
755
|
}
|
|
757
|
-
const
|
|
756
|
+
const Or = l.object({
|
|
758
757
|
orderFormId: l.string().nullable()
|
|
759
758
|
});
|
|
760
|
-
async function
|
|
759
|
+
async function Ar({
|
|
761
760
|
apiUrl: e,
|
|
762
761
|
body: t,
|
|
763
762
|
fetchOptions: r
|
|
@@ -766,7 +765,7 @@ async function Tr({
|
|
|
766
765
|
console.error("[ERROR FETCHING] Body is required");
|
|
767
766
|
return;
|
|
768
767
|
}
|
|
769
|
-
await
|
|
768
|
+
await Or.validate(t);
|
|
770
769
|
const { orderFormId: n } = t;
|
|
771
770
|
return j(
|
|
772
771
|
`${e}/api/checkout/pub/orderForm/${n}/messages/clear`,
|
|
@@ -776,19 +775,19 @@ async function Tr({
|
|
|
776
775
|
}
|
|
777
776
|
);
|
|
778
777
|
}
|
|
779
|
-
const
|
|
778
|
+
const Tr = l.object({
|
|
780
779
|
id: l.string().nullable(),
|
|
781
780
|
// id offering
|
|
782
781
|
itemIndex: l.number().nullable(),
|
|
783
782
|
orderFormId: l.string().nullable(),
|
|
784
783
|
remove: l.boolean().nullable()
|
|
785
784
|
});
|
|
786
|
-
async function
|
|
785
|
+
async function jr({ apiUrl: e, body: t, fetchOptions: r }) {
|
|
787
786
|
if (!t) {
|
|
788
787
|
console.error("[ERROR FETCHING] Body is required");
|
|
789
788
|
return;
|
|
790
789
|
}
|
|
791
|
-
await
|
|
790
|
+
await Tr.validate(t);
|
|
792
791
|
const { itemIndex: n, orderFormId: a, id: o, remove: c } = t, i = c ? `/${o}/remove` : "", u = `${e}/api/checkout/pub/orderForm/${a}/items/${n}/offerings${i}`;
|
|
793
792
|
return j(u, {
|
|
794
793
|
method: "POST",
|
|
@@ -796,10 +795,10 @@ async function qr({ apiUrl: e, body: t, fetchOptions: r }) {
|
|
|
796
795
|
...r
|
|
797
796
|
});
|
|
798
797
|
}
|
|
799
|
-
const
|
|
798
|
+
const qr = l.object({
|
|
800
799
|
orderFormId: l.string().nullable()
|
|
801
800
|
});
|
|
802
|
-
async function
|
|
801
|
+
async function Nr({
|
|
803
802
|
apiUrl: e,
|
|
804
803
|
body: t,
|
|
805
804
|
fetchOptions: r,
|
|
@@ -810,13 +809,13 @@ async function Fr({
|
|
|
810
809
|
console.error("[ERROR FETCHING] Body is required");
|
|
811
810
|
return;
|
|
812
811
|
}
|
|
813
|
-
await
|
|
812
|
+
await qr.validate(t);
|
|
814
813
|
const a = new URLSearchParams({
|
|
815
814
|
refreshOutdatedData: "true"
|
|
816
815
|
}), o = t.orderFormId && ((c = n.orderFormPurchaseId) == null ? void 0 : c.value) !== t.orderFormId ? `${e}/api/checkout/pub/orderForm/${t.orderFormId}?${String(a)}` : `${e}/api/checkout/pub/orderForm`;
|
|
817
816
|
return j(o, { method: "GET", ...r });
|
|
818
817
|
}
|
|
819
|
-
const
|
|
818
|
+
const Fr = l.object({
|
|
820
819
|
orderFormId: l.string().nullable(),
|
|
821
820
|
email: l.string().email().required(),
|
|
822
821
|
firstName: l.string().required(),
|
|
@@ -825,7 +824,7 @@ const $r = l.object({
|
|
|
825
824
|
document: l.string().required(),
|
|
826
825
|
phone: l.string().matches(/^\+\d{1,3}\d{10,11}$/)
|
|
827
826
|
});
|
|
828
|
-
async function
|
|
827
|
+
async function $r({
|
|
829
828
|
apiUrl: e,
|
|
830
829
|
body: t,
|
|
831
830
|
fetchOptions: r
|
|
@@ -834,7 +833,7 @@ async function Lr({
|
|
|
834
833
|
console.error("[ERROR FETCHING] Body is required");
|
|
835
834
|
return;
|
|
836
835
|
}
|
|
837
|
-
await
|
|
836
|
+
await Fr.validate(t);
|
|
838
837
|
const { orderFormId: n, ...a } = t;
|
|
839
838
|
return j(
|
|
840
839
|
`${e}/api/checkout/pub/orderForm/${n}/attachments/clientProfileData`,
|
|
@@ -845,10 +844,10 @@ async function Lr({
|
|
|
845
844
|
}
|
|
846
845
|
);
|
|
847
846
|
}
|
|
848
|
-
const
|
|
847
|
+
const Lr = l.object({
|
|
849
848
|
sellerCode: l.string().nullable()
|
|
850
849
|
});
|
|
851
|
-
async function
|
|
850
|
+
async function Dr({
|
|
852
851
|
apiUrl: e,
|
|
853
852
|
body: t,
|
|
854
853
|
extraData: r,
|
|
@@ -858,7 +857,7 @@ async function Ur({
|
|
|
858
857
|
console.error("[ERROR FETCHING] Body is required");
|
|
859
858
|
return;
|
|
860
859
|
}
|
|
861
|
-
await
|
|
860
|
+
await Lr.validate(t);
|
|
862
861
|
const { sellerCode: a = "" } = t;
|
|
863
862
|
return j(
|
|
864
863
|
`${e}/api/dataentities/${r.ENTITIES}/search?_fields=${r.FIELDS}&${r.FILTER}=${a}`,
|
|
@@ -871,12 +870,12 @@ async function Ur({
|
|
|
871
870
|
}
|
|
872
871
|
);
|
|
873
872
|
}
|
|
874
|
-
const
|
|
873
|
+
const Ur = l.object().shape({
|
|
875
874
|
country: l.string().length(3, "Country code must be 3 characters long").required("Country is required"),
|
|
876
875
|
orderFormId: l.string().nullable(),
|
|
877
876
|
postalCode: l.string().nullable()
|
|
878
877
|
});
|
|
879
|
-
async function
|
|
878
|
+
async function Mr({
|
|
880
879
|
apiUrl: e,
|
|
881
880
|
body: t,
|
|
882
881
|
fetchOptions: r
|
|
@@ -885,7 +884,7 @@ async function Hr({
|
|
|
885
884
|
console.error("[ERROR FETCHING] Body is required");
|
|
886
885
|
return;
|
|
887
886
|
}
|
|
888
|
-
await
|
|
887
|
+
await Ur.validate(t);
|
|
889
888
|
const { country: n, orderFormId: a, postalCode: o } = t, c = o ? {
|
|
890
889
|
address: {
|
|
891
890
|
addressType: "residential",
|
|
@@ -905,7 +904,7 @@ async function Hr({
|
|
|
905
904
|
}
|
|
906
905
|
);
|
|
907
906
|
}
|
|
908
|
-
const
|
|
907
|
+
const Hr = l.object().shape({
|
|
909
908
|
orderFormId: l.string().nullable(),
|
|
910
909
|
options: l.array().of(
|
|
911
910
|
l.object().shape({
|
|
@@ -933,12 +932,12 @@ const Br = l.object().shape({
|
|
|
933
932
|
})
|
|
934
933
|
)
|
|
935
934
|
});
|
|
936
|
-
async function
|
|
935
|
+
async function Br({ apiUrl: e, body: t, fetchOptions: r }) {
|
|
937
936
|
if (!t) {
|
|
938
937
|
console.error("[ERROR FETCHING] Body is required");
|
|
939
938
|
return;
|
|
940
939
|
}
|
|
941
|
-
await
|
|
940
|
+
await Hr.validate(t);
|
|
942
941
|
const { orderFormId: n, options: a, selectedAddresses: o } = t;
|
|
943
942
|
return j(
|
|
944
943
|
`${e}/api/checkout/pub/orderForm/${n}/attachments/shippingData`,
|
|
@@ -953,7 +952,7 @@ async function zr({ apiUrl: e, body: t, fetchOptions: r }) {
|
|
|
953
952
|
}
|
|
954
953
|
);
|
|
955
954
|
}
|
|
956
|
-
const
|
|
955
|
+
const zr = l.object({
|
|
957
956
|
country: l.string().length(3, "Country code must be 3 characters long").required("Country is required"),
|
|
958
957
|
postalCode: l.string().nullable(),
|
|
959
958
|
geoCoordinates: l.object().shape({
|
|
@@ -961,12 +960,12 @@ const Gr = l.object({
|
|
|
961
960
|
latitude: l.number().required()
|
|
962
961
|
})
|
|
963
962
|
});
|
|
964
|
-
async function
|
|
963
|
+
async function Gr({ apiUrl: e, body: t, fetchOptions: r }) {
|
|
965
964
|
if (!t) {
|
|
966
965
|
console.error("[ERROR FETCHING] Body is required");
|
|
967
966
|
return;
|
|
968
967
|
}
|
|
969
|
-
await
|
|
968
|
+
await zr.validate(t);
|
|
970
969
|
const { country: n = "", geoCoordinates: a, postalCode: o = "" } = t, c = new URLSearchParams({ country: String(n) });
|
|
971
970
|
return o ? c.append("postalCode", o) : c.append(
|
|
972
971
|
"geoCoordinates",
|
|
@@ -979,22 +978,22 @@ async function Vr({ apiUrl: e, body: t, fetchOptions: r }) {
|
|
|
979
978
|
}
|
|
980
979
|
);
|
|
981
980
|
}
|
|
982
|
-
const
|
|
981
|
+
const Vr = l.object({
|
|
983
982
|
id: l.string().required("ID of SKU is required"),
|
|
984
983
|
quantity: l.number().integer().required("Quantity of item is required"),
|
|
985
984
|
seller: l.string()
|
|
986
|
-
}),
|
|
987
|
-
items: l.array().of(
|
|
985
|
+
}), Wr = l.object({
|
|
986
|
+
items: l.array().of(Vr),
|
|
988
987
|
country: l.string().length(3, "Country code must be 3 characters long").required("Country is required"),
|
|
989
988
|
postalCode: l.string().nullable(),
|
|
990
989
|
geoCoordinates: l.array().nullable().of(l.number()).length(2)
|
|
991
990
|
});
|
|
992
|
-
async function
|
|
991
|
+
async function Qr({ apiUrl: e, body: t, fetchOptions: r }) {
|
|
993
992
|
if (!t) {
|
|
994
993
|
console.error("[ERROR FETCHING] Body is required");
|
|
995
994
|
return;
|
|
996
995
|
}
|
|
997
|
-
return await
|
|
996
|
+
return await Wr.validate(t), j(
|
|
998
997
|
`${e}/api/checkout/pub/orderForms/simulation`,
|
|
999
998
|
{
|
|
1000
999
|
method: "POST",
|
|
@@ -1003,35 +1002,35 @@ async function Xr({ apiUrl: e, body: t, fetchOptions: r }) {
|
|
|
1003
1002
|
}
|
|
1004
1003
|
);
|
|
1005
1004
|
}
|
|
1006
|
-
const
|
|
1005
|
+
const Xr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1007
1006
|
__proto__: null,
|
|
1008
|
-
getMasterDataSellerCode:
|
|
1009
|
-
getOrderForm:
|
|
1010
|
-
postOrderFormAddCoupon:
|
|
1011
|
-
postOrderFormAttachClientProfileData:
|
|
1012
|
-
postOrderFormAttachOrderFormData:
|
|
1013
|
-
postOrderFormAttachShippingData:
|
|
1007
|
+
getMasterDataSellerCode: Dr,
|
|
1008
|
+
getOrderForm: Nr,
|
|
1009
|
+
postOrderFormAddCoupon: br,
|
|
1010
|
+
postOrderFormAttachClientProfileData: $r,
|
|
1011
|
+
postOrderFormAttachOrderFormData: hr,
|
|
1012
|
+
postOrderFormAttachShippingData: Mr,
|
|
1014
1013
|
postOrderFormAttachmentsMarketingData: Ge,
|
|
1015
1014
|
postOrderFormAttachmentsOpenTextField: ze,
|
|
1016
|
-
postOrderFormClearMessages:
|
|
1017
|
-
postOrderFormFreightSimulation:
|
|
1018
|
-
postOrderFormItems:
|
|
1019
|
-
postOrderFormRegion:
|
|
1020
|
-
postOrderFormRemoveAllItems:
|
|
1021
|
-
postOrderFormUpdateItems:
|
|
1022
|
-
postOrderFormUpdateShippingData:
|
|
1023
|
-
postOrderformAddress:
|
|
1024
|
-
putOrderFormCustomData:
|
|
1025
|
-
updateOrderFormOffering:
|
|
1026
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1015
|
+
postOrderFormClearMessages: Ar,
|
|
1016
|
+
postOrderFormFreightSimulation: Qr,
|
|
1017
|
+
postOrderFormItems: Ir,
|
|
1018
|
+
postOrderFormRegion: Gr,
|
|
1019
|
+
postOrderFormRemoveAllItems: xr,
|
|
1020
|
+
postOrderFormUpdateItems: Er,
|
|
1021
|
+
postOrderFormUpdateShippingData: Br,
|
|
1022
|
+
postOrderformAddress: dr,
|
|
1023
|
+
putOrderFormCustomData: vr,
|
|
1024
|
+
updateOrderFormOffering: jr
|
|
1025
|
+
}, Symbol.toStringTag, { value: "Module" })), Kr = l.object({
|
|
1027
1026
|
skuId: l.string()
|
|
1028
1027
|
});
|
|
1029
|
-
async function
|
|
1028
|
+
async function Jr({ apiUrl: e, body: t, fetchOptions: r }) {
|
|
1030
1029
|
if (!t) {
|
|
1031
1030
|
console.error("[ERROR FETCHING] Body is required");
|
|
1032
1031
|
return;
|
|
1033
1032
|
}
|
|
1034
|
-
await
|
|
1033
|
+
await Kr.validate(t);
|
|
1035
1034
|
const { skuId: n } = t;
|
|
1036
1035
|
return j(
|
|
1037
1036
|
`${e}/api/catalog/pvt/stockkeepingunitkit?parentSkuId=${n}`,
|
|
@@ -1040,15 +1039,15 @@ async function Zr({ apiUrl: e, body: t, fetchOptions: r }) {
|
|
|
1040
1039
|
}
|
|
1041
1040
|
);
|
|
1042
1041
|
}
|
|
1043
|
-
const
|
|
1042
|
+
const Zr = l.object({
|
|
1044
1043
|
ids: l.array().of(l.string().required("ID are required")).required("IDs are required")
|
|
1045
1044
|
});
|
|
1046
|
-
async function
|
|
1045
|
+
async function Yr({ apiUrl: e, body: t, fetchOptions: r }) {
|
|
1047
1046
|
if (!t) {
|
|
1048
1047
|
console.error("[ERROR FETCHING] Body is required");
|
|
1049
1048
|
return;
|
|
1050
1049
|
}
|
|
1051
|
-
await
|
|
1050
|
+
await Zr.validate(t);
|
|
1052
1051
|
const { ids: n } = t;
|
|
1053
1052
|
return j(
|
|
1054
1053
|
`${e}/api/catalog_system/pub/products/search?fq=${n.map((a) => `productId:${a}`).join("&fq=")}`,
|
|
@@ -1057,15 +1056,15 @@ async function en({ apiUrl: e, body: t, fetchOptions: r }) {
|
|
|
1057
1056
|
}
|
|
1058
1057
|
);
|
|
1059
1058
|
}
|
|
1060
|
-
const
|
|
1059
|
+
const en = l.object({
|
|
1061
1060
|
productId: l.number().required("Product ID is required")
|
|
1062
1061
|
});
|
|
1063
|
-
async function
|
|
1062
|
+
async function tn({ apiUrl: e, body: t, fetchOptions: r }) {
|
|
1064
1063
|
if (!t) {
|
|
1065
1064
|
console.error("[ERROR FETCHING] Body is required");
|
|
1066
1065
|
return;
|
|
1067
1066
|
}
|
|
1068
|
-
await
|
|
1067
|
+
await en.validate(t);
|
|
1069
1068
|
const { productId: n } = t;
|
|
1070
1069
|
return j(
|
|
1071
1070
|
`${e}/api/catalog_system/pub/products/crossselling/similars/${n.toString()}`,
|
|
@@ -1074,7 +1073,7 @@ async function rn({ apiUrl: e, body: t, fetchOptions: r }) {
|
|
|
1074
1073
|
}
|
|
1075
1074
|
);
|
|
1076
1075
|
}
|
|
1077
|
-
async function
|
|
1076
|
+
async function rn({
|
|
1078
1077
|
apiUrl: e,
|
|
1079
1078
|
params: t,
|
|
1080
1079
|
fetchOptions: r
|
|
@@ -1086,16 +1085,16 @@ async function nn({
|
|
|
1086
1085
|
}
|
|
1087
1086
|
) : (console.error("[ERROR FETCHING] slug is required"), null);
|
|
1088
1087
|
}
|
|
1089
|
-
const
|
|
1088
|
+
const nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1090
1089
|
__proto__: null,
|
|
1091
|
-
getCatalogKitProducts:
|
|
1092
|
-
getCatalogPageInfo:
|
|
1093
|
-
getCatalogProducts:
|
|
1094
|
-
getCatalogSimilars:
|
|
1095
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1090
|
+
getCatalogKitProducts: Jr,
|
|
1091
|
+
getCatalogPageInfo: rn,
|
|
1092
|
+
getCatalogProducts: Yr,
|
|
1093
|
+
getCatalogSimilars: tn
|
|
1094
|
+
}, Symbol.toStringTag, { value: "Module" })), an = l.object({
|
|
1096
1095
|
query: l.string()
|
|
1097
1096
|
});
|
|
1098
|
-
async function
|
|
1097
|
+
async function on({
|
|
1099
1098
|
apiUrl: e,
|
|
1100
1099
|
body: t,
|
|
1101
1100
|
fetchOptions: r
|
|
@@ -1104,7 +1103,7 @@ async function sn({
|
|
|
1104
1103
|
console.error("[ERROR FETCHING] Body is required");
|
|
1105
1104
|
return;
|
|
1106
1105
|
}
|
|
1107
|
-
await
|
|
1106
|
+
await an.validate(t);
|
|
1108
1107
|
const { query: n = "" } = t, a = new URLSearchParams({ query: n });
|
|
1109
1108
|
return j(
|
|
1110
1109
|
`${e}/api/io/_v/api/intelligent-search/autocomplete_suggestions?${a.toString()}`,
|
|
@@ -1113,10 +1112,10 @@ async function sn({
|
|
|
1113
1112
|
}
|
|
1114
1113
|
);
|
|
1115
1114
|
}
|
|
1116
|
-
const
|
|
1115
|
+
const sn = (e, t) => Mt(e, t), cn = (e) => ({
|
|
1117
1116
|
...e,
|
|
1118
|
-
description: e.description ?
|
|
1119
|
-
}),
|
|
1117
|
+
description: e.description ? sn(e.description) : e.description
|
|
1118
|
+
}), ln = ({
|
|
1120
1119
|
offer: e,
|
|
1121
1120
|
seller: t,
|
|
1122
1121
|
product: r
|
|
@@ -1126,8 +1125,8 @@ const cn = (e, t) => Mt(e, t), ln = (e) => ({
|
|
|
1126
1125
|
seller: t
|
|
1127
1126
|
}), Ve = (e, t) => ({
|
|
1128
1127
|
...e,
|
|
1129
|
-
isVariantOf:
|
|
1130
|
-
}),
|
|
1128
|
+
isVariantOf: cn(t)
|
|
1129
|
+
}), un = (e) => e ? "https://schema.org/InStock" : "https://schema.org/OutOfStock", ie = (e) => e.AvailableQuantity > 0, Le = (e) => e.spotPrice ?? 0, dn = (e) => e.Price ?? 0, We = (e, t) => ie(e) && !ie(t) ? -1 : !ie(e) && ie(t) ? 1 : Le(e) - Le(t), pn = (e, t) => {
|
|
1131
1130
|
let r = 0;
|
|
1132
1131
|
for (let n = 1; n < e.length; n++)
|
|
1133
1132
|
t(e[r], e[n]) > 0 && (r = n);
|
|
@@ -1138,7 +1137,7 @@ const cn = (e, t) => Mt(e, t), ln = (e) => ({
|
|
|
1138
1137
|
offer: a.commertialOffer,
|
|
1139
1138
|
sku: n
|
|
1140
1139
|
}))
|
|
1141
|
-
), r =
|
|
1140
|
+
), r = pn(
|
|
1142
1141
|
t,
|
|
1143
1142
|
({ offer: n }, { offer: a }) => We(n, a)
|
|
1144
1143
|
);
|
|
@@ -1153,11 +1152,11 @@ const cn = (e, t) => Mt(e, t), ln = (e) => ({
|
|
|
1153
1152
|
attachment: "ATTACHMENT",
|
|
1154
1153
|
specification: "SPECIFICATION",
|
|
1155
1154
|
attribute: "ATTRIBUTE"
|
|
1156
|
-
},
|
|
1155
|
+
}, mn = (e) => ({
|
|
1157
1156
|
name: e.name,
|
|
1158
1157
|
value: e.content,
|
|
1159
1158
|
valueReference: le.attachment
|
|
1160
|
-
}),
|
|
1159
|
+
}), fn = (e) => ({
|
|
1161
1160
|
propertyID: e.id,
|
|
1162
1161
|
name: e.name,
|
|
1163
1162
|
value: e.value,
|
|
@@ -1174,23 +1173,23 @@ const cn = (e, t) => Mt(e, t), ln = (e) => ({
|
|
|
1174
1173
|
name: c,
|
|
1175
1174
|
value: "",
|
|
1176
1175
|
valueReference: le.specification
|
|
1177
|
-
}), a = Array.isArray(r) ? r.map(
|
|
1176
|
+
}), a = Array.isArray(r) ? r.map(mn) : [], o = t ? t.map(fn) : [];
|
|
1178
1177
|
return [
|
|
1179
1178
|
...n,
|
|
1180
1179
|
...a,
|
|
1181
1180
|
...o
|
|
1182
1181
|
];
|
|
1183
|
-
}, De = "ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a",
|
|
1182
|
+
}, De = "ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a", hn = "AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa", gn = (e) => {
|
|
1184
1183
|
let t = e.slice(0);
|
|
1185
1184
|
for (let r = 0; r < De.length; r++)
|
|
1186
1185
|
t = t.replace(
|
|
1187
1186
|
new RegExp(De.charAt(r), "g"),
|
|
1188
|
-
|
|
1187
|
+
hn.charAt(r)
|
|
1189
1188
|
);
|
|
1190
1189
|
return t;
|
|
1191
|
-
},
|
|
1190
|
+
}, bn = (e) => e.replace(/[·/_,:]/, "-"), Ke = (e) => {
|
|
1192
1191
|
const r = e.replace(/,/g, "").replace(/[*+~.()'"!:@&\[\]`/ %$#?{}|><=_^]/g, "-");
|
|
1193
|
-
return
|
|
1192
|
+
return bn(gn(r)).toLowerCase();
|
|
1194
1193
|
}, Je = (e) => `/${e}/p`, Ze = (e) => {
|
|
1195
1194
|
const t = Math.max(
|
|
1196
1195
|
...e.map((n) => n.NumberOfInstallments)
|
|
@@ -1207,7 +1206,7 @@ const cn = (e, t) => Mt(e, t), ln = (e) => ({
|
|
|
1207
1206
|
listPrice: 0,
|
|
1208
1207
|
sellerDefault: !1
|
|
1209
1208
|
}, a = e.map(
|
|
1210
|
-
(o) =>
|
|
1209
|
+
(o) => ln({
|
|
1211
1210
|
offer: o.commertialOffer,
|
|
1212
1211
|
seller: o,
|
|
1213
1212
|
product: t
|
|
@@ -1215,7 +1214,7 @@ const cn = (e, t) => Mt(e, t), ln = (e) => ({
|
|
|
1215
1214
|
).sort(We).map((o) => (o.seller.sellerId === "1" && o.AvailableQuantity > 0 && (r.price = o.Price, r.listPrice = o.ListPrice, r.sellerDefault = !0), {
|
|
1216
1215
|
availability: o.AvailableQuantity > 0,
|
|
1217
1216
|
listPrice: o.ListPrice,
|
|
1218
|
-
price:
|
|
1217
|
+
price: dn(o),
|
|
1219
1218
|
priceValidUntil: o.PriceValidUntil,
|
|
1220
1219
|
priceCurrency: "BRL",
|
|
1221
1220
|
installments: o.Installments,
|
|
@@ -1237,7 +1236,7 @@ const cn = (e, t) => Mt(e, t), ln = (e) => ({
|
|
|
1237
1236
|
name: n,
|
|
1238
1237
|
offers: {
|
|
1239
1238
|
offers: a == null ? void 0 : a.map(({ sellerId: c, commertialOffer: i }) => ({
|
|
1240
|
-
availability:
|
|
1239
|
+
availability: un(i.AvailableQuantity > 0),
|
|
1241
1240
|
listPrice: i.ListPrice,
|
|
1242
1241
|
price: i.Price,
|
|
1243
1242
|
quantity: i.AvailableQuantity,
|
|
@@ -1249,7 +1248,7 @@ const cn = (e, t) => Mt(e, t), ln = (e) => ({
|
|
|
1249
1248
|
sku: r
|
|
1250
1249
|
// slug: getSlug('', itemId), // getSlug('', itemId) que tipo de slug é esse?
|
|
1251
1250
|
};
|
|
1252
|
-
},
|
|
1251
|
+
}, wn = (e) => {
|
|
1253
1252
|
var I;
|
|
1254
1253
|
const {
|
|
1255
1254
|
attributes: t,
|
|
@@ -1324,7 +1323,7 @@ const cn = (e, t) => Mt(e, t), ln = (e) => ({
|
|
|
1324
1323
|
},
|
|
1325
1324
|
installments: _
|
|
1326
1325
|
};
|
|
1327
|
-
},
|
|
1326
|
+
}, vn = (e) => {
|
|
1328
1327
|
var _;
|
|
1329
1328
|
const {
|
|
1330
1329
|
attributes: t,
|
|
@@ -1413,13 +1412,13 @@ const cn = (e, t) => Mt(e, t), ln = (e) => ({
|
|
|
1413
1412
|
},
|
|
1414
1413
|
installments: A
|
|
1415
1414
|
};
|
|
1416
|
-
},
|
|
1415
|
+
}, yn = l.array().of(
|
|
1417
1416
|
l.object({
|
|
1418
1417
|
key: l.string().required(),
|
|
1419
1418
|
value: l.string().required()
|
|
1420
1419
|
})
|
|
1421
1420
|
).required("Facets are required");
|
|
1422
|
-
async function
|
|
1421
|
+
async function _n({
|
|
1423
1422
|
apiUrl: e,
|
|
1424
1423
|
body: t,
|
|
1425
1424
|
fetchOptions: r
|
|
@@ -1428,7 +1427,7 @@ async function Rn({
|
|
|
1428
1427
|
console.error("[ERROR FETCHING] Body is required");
|
|
1429
1428
|
return;
|
|
1430
1429
|
}
|
|
1431
|
-
await
|
|
1430
|
+
await yn.validate(t);
|
|
1432
1431
|
const n = new URLSearchParams({}), a = t.map(({ key: c, value: i }) => `${c}/${i}`).join("/");
|
|
1433
1432
|
Rt(t, n);
|
|
1434
1433
|
const o = `${e}/api/catalog_system/pub/products/crossselling/${a}`;
|
|
@@ -1439,7 +1438,7 @@ async function Rn({
|
|
|
1439
1438
|
const g = Qe(u.items);
|
|
1440
1439
|
return g && Ve(g, u);
|
|
1441
1440
|
}).filter((u) => !!u).map((u) => ({
|
|
1442
|
-
node:
|
|
1441
|
+
node: vn(u)
|
|
1443
1442
|
})));
|
|
1444
1443
|
}
|
|
1445
1444
|
const tt = ({
|
|
@@ -1481,7 +1480,7 @@ const tt = ({
|
|
|
1481
1480
|
}
|
|
1482
1481
|
);
|
|
1483
1482
|
};
|
|
1484
|
-
async function
|
|
1483
|
+
async function Rn({
|
|
1485
1484
|
body: e,
|
|
1486
1485
|
extraData: t,
|
|
1487
1486
|
...r
|
|
@@ -1512,13 +1511,13 @@ async function In({
|
|
|
1512
1511
|
total: o.count
|
|
1513
1512
|
},
|
|
1514
1513
|
products: a.map((i, u) => ({
|
|
1515
|
-
node:
|
|
1514
|
+
node: wn(i),
|
|
1516
1515
|
cursor: u.toString()
|
|
1517
1516
|
}))
|
|
1518
1517
|
}
|
|
1519
1518
|
};
|
|
1520
1519
|
}
|
|
1521
|
-
async function
|
|
1520
|
+
async function In({ body: e, extraData: t, ...r }) {
|
|
1522
1521
|
if (!e) {
|
|
1523
1522
|
console.error("[ERROR FETCHING] Body is required");
|
|
1524
1523
|
return;
|
|
@@ -1538,16 +1537,16 @@ async function Pn({ body: e, extraData: t, ...r }) {
|
|
|
1538
1537
|
}
|
|
1539
1538
|
};
|
|
1540
1539
|
}
|
|
1541
|
-
const
|
|
1540
|
+
const Pn = l.object({
|
|
1542
1541
|
query: l.string().optional(),
|
|
1543
1542
|
locale: l.string().optional()
|
|
1544
1543
|
});
|
|
1545
|
-
async function
|
|
1544
|
+
async function xn({ apiUrl: e, body: t, fetchOptions: r }) {
|
|
1546
1545
|
if (!t) {
|
|
1547
1546
|
console.error("[ERROR FETCHING] Body is required");
|
|
1548
1547
|
return;
|
|
1549
1548
|
}
|
|
1550
|
-
await
|
|
1549
|
+
await Pn.validate(t);
|
|
1551
1550
|
const { query: n = "", locale: a = "default_locale" } = t, o = new URLSearchParams({ query: n, locale: a });
|
|
1552
1551
|
return j(
|
|
1553
1552
|
`${e}/api/io/_v/api/intelligent-search/search_suggestions?${o.toString()}`,
|
|
@@ -1556,22 +1555,22 @@ async function Sn({ apiUrl: e, body: t, fetchOptions: r }) {
|
|
|
1556
1555
|
}
|
|
1557
1556
|
);
|
|
1558
1557
|
}
|
|
1559
|
-
async function
|
|
1558
|
+
async function Sn({ apiUrl: e }) {
|
|
1560
1559
|
return j(`${e}/api/io/_v/api/intelligent-search/top_searches`);
|
|
1561
1560
|
}
|
|
1562
|
-
const
|
|
1561
|
+
const Cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1563
1562
|
__proto__: null,
|
|
1564
|
-
getSearchAutoCompleteSuggestions:
|
|
1565
|
-
getSearchCrossellingProducts:
|
|
1566
|
-
getSearchFacets:
|
|
1567
|
-
getSearchProducts:
|
|
1568
|
-
getSearchSuggestedTerms:
|
|
1569
|
-
getSearchTopSearchs:
|
|
1570
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1563
|
+
getSearchAutoCompleteSuggestions: on,
|
|
1564
|
+
getSearchCrossellingProducts: _n,
|
|
1565
|
+
getSearchFacets: In,
|
|
1566
|
+
getSearchProducts: Rn,
|
|
1567
|
+
getSearchSuggestedTerms: xn,
|
|
1568
|
+
getSearchTopSearchs: Sn
|
|
1569
|
+
}, Symbol.toStringTag, { value: "Module" })), kn = l.object({
|
|
1571
1570
|
masterDataEntity: l.string().nonNullable(),
|
|
1572
1571
|
payload: l.object().shape({}).nullable()
|
|
1573
1572
|
});
|
|
1574
|
-
async function
|
|
1573
|
+
async function En({
|
|
1575
1574
|
apiUrl: e,
|
|
1576
1575
|
body: t,
|
|
1577
1576
|
fetchOptions: r
|
|
@@ -1580,7 +1579,7 @@ async function On({
|
|
|
1580
1579
|
console.error("[ERROR FETCHING] Body is required");
|
|
1581
1580
|
return;
|
|
1582
1581
|
}
|
|
1583
|
-
await
|
|
1582
|
+
await kn.validate(t);
|
|
1584
1583
|
const { masterDataEntity: n, payload: a } = t, o = `${e}/api/dataentities/${n}/documents`;
|
|
1585
1584
|
return j(o, {
|
|
1586
1585
|
method: "POST",
|
|
@@ -1590,16 +1589,16 @@ async function On({
|
|
|
1590
1589
|
...r
|
|
1591
1590
|
});
|
|
1592
1591
|
}
|
|
1593
|
-
const
|
|
1592
|
+
const On = l.object().shape({
|
|
1594
1593
|
_where: l.string().optional(),
|
|
1595
1594
|
_fields: l.string().optional(),
|
|
1596
1595
|
_sort: l.string().optional(),
|
|
1597
1596
|
_from: l.number().integer().min(0).optional(),
|
|
1598
1597
|
_to: l.number().integer().min(0).optional(),
|
|
1599
1598
|
_keyword: l.string().optional()
|
|
1600
|
-
}),
|
|
1599
|
+
}), An = l.object({
|
|
1601
1600
|
masterDataEntity: l.string().required(),
|
|
1602
|
-
searchFields:
|
|
1601
|
+
searchFields: On,
|
|
1603
1602
|
headers: l.object().shape({
|
|
1604
1603
|
"REST-Range": l.string().notRequired()
|
|
1605
1604
|
})
|
|
@@ -1614,7 +1613,7 @@ async function rt({
|
|
|
1614
1613
|
return;
|
|
1615
1614
|
}
|
|
1616
1615
|
const n = new URLSearchParams();
|
|
1617
|
-
await
|
|
1616
|
+
await An.validate(t);
|
|
1618
1617
|
const { masterDataEntity: a, searchFields: o, headers: c } = t;
|
|
1619
1618
|
o && Object.entries(o).forEach(([g, s]) => {
|
|
1620
1619
|
n.append(g, String(s));
|
|
@@ -1642,12 +1641,12 @@ async function rt({
|
|
|
1642
1641
|
} while (u);
|
|
1643
1642
|
return i;
|
|
1644
1643
|
}
|
|
1645
|
-
const
|
|
1644
|
+
const Tn = l.object({
|
|
1646
1645
|
dataEntityName: l.string().required(),
|
|
1647
1646
|
id: l.string().required(),
|
|
1648
1647
|
fieldsToBeUpdated: l.object().shape({})
|
|
1649
1648
|
});
|
|
1650
|
-
async function
|
|
1649
|
+
async function jn({
|
|
1651
1650
|
apiUrl: e,
|
|
1652
1651
|
body: t,
|
|
1653
1652
|
fetchOptions: r
|
|
@@ -1656,7 +1655,7 @@ async function qn({
|
|
|
1656
1655
|
console.error("[ERROR FETCHING] Body is required");
|
|
1657
1656
|
return;
|
|
1658
1657
|
}
|
|
1659
|
-
await
|
|
1658
|
+
await Tn.validate(t);
|
|
1660
1659
|
const { dataEntityName: n, id: a, fieldsToBeUpdated: o } = t, c = `${e}/api/dataentities/${n}/documents/${a}`;
|
|
1661
1660
|
return j(c, {
|
|
1662
1661
|
body: {
|
|
@@ -1666,13 +1665,13 @@ async function qn({
|
|
|
1666
1665
|
...r
|
|
1667
1666
|
});
|
|
1668
1667
|
}
|
|
1669
|
-
const
|
|
1668
|
+
const qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1670
1669
|
__proto__: null,
|
|
1671
1670
|
getSearchMasterdata: rt,
|
|
1672
|
-
patchUpdateMasterdata:
|
|
1673
|
-
postMasterdata:
|
|
1671
|
+
patchUpdateMasterdata: jn,
|
|
1672
|
+
postMasterdata: En
|
|
1674
1673
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1675
|
-
async function
|
|
1674
|
+
async function Nn({ body: e, apiUrl: t, extraData: r, fetchOptions: n }) {
|
|
1676
1675
|
const { productIds: a } = e;
|
|
1677
1676
|
if (!a)
|
|
1678
1677
|
return console.error("[ERROR FETCHING] productIds is required"), [];
|
|
@@ -1787,9 +1786,9 @@ async function Fn({ body: e, apiUrl: t, extraData: r, fetchOptions: n }) {
|
|
|
1787
1786
|
};
|
|
1788
1787
|
});
|
|
1789
1788
|
}
|
|
1790
|
-
const
|
|
1789
|
+
const Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1791
1790
|
__proto__: null,
|
|
1792
|
-
getWishlistProducts:
|
|
1791
|
+
getWishlistProducts: Nn
|
|
1793
1792
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1794
1793
|
var _e = { exports: {} }, nt = {}, Ie = {}, at = {}, it = {};
|
|
1795
1794
|
(function(e) {
|
|
@@ -2196,23 +2195,23 @@ var lt = {};
|
|
|
2196
2195
|
}
|
|
2197
2196
|
}
|
|
2198
2197
|
})(lt);
|
|
2199
|
-
var de = {}, xe = Object.defineProperty,
|
|
2198
|
+
var de = {}, xe = Object.defineProperty, $n = Object.getOwnPropertyDescriptor, Ln = Object.getOwnPropertyNames, Dn = Object.prototype.hasOwnProperty, Un = (e, t) => {
|
|
2200
2199
|
for (var r in t)
|
|
2201
2200
|
xe(e, r, { get: t[r], enumerable: !0 });
|
|
2202
|
-
},
|
|
2201
|
+
}, Mn = (e, t, r, n) => {
|
|
2203
2202
|
if (t && typeof t == "object" || typeof t == "function")
|
|
2204
|
-
for (let a of
|
|
2205
|
-
!
|
|
2203
|
+
for (let a of Ln(t))
|
|
2204
|
+
!Dn.call(e, a) && a !== r && xe(e, a, { get: () => t[a], enumerable: !(n = $n(t, a)) || n.enumerable });
|
|
2206
2205
|
return e;
|
|
2207
|
-
},
|
|
2208
|
-
|
|
2209
|
-
RequestCookies: () =>
|
|
2210
|
-
ResponseCookies: () =>
|
|
2206
|
+
}, Hn = (e) => Mn(xe({}, "__esModule", { value: !0 }), e), ut = {};
|
|
2207
|
+
Un(ut, {
|
|
2208
|
+
RequestCookies: () => Kn,
|
|
2209
|
+
ResponseCookies: () => Jn,
|
|
2211
2210
|
parseCookie: () => Se,
|
|
2212
2211
|
parseSetCookie: () => dt,
|
|
2213
2212
|
stringifyCookie: () => K
|
|
2214
2213
|
});
|
|
2215
|
-
var
|
|
2214
|
+
var Bn = Hn(ut);
|
|
2216
2215
|
function K(e) {
|
|
2217
2216
|
var t;
|
|
2218
2217
|
const r = [
|
|
@@ -2269,28 +2268,28 @@ function dt(e) {
|
|
|
2269
2268
|
...c && { httpOnly: !0 },
|
|
2270
2269
|
...typeof i == "string" && { maxAge: Number(i) },
|
|
2271
2270
|
path: u,
|
|
2272
|
-
...g && { sameSite:
|
|
2271
|
+
...g && { sameSite: Vn(g) },
|
|
2273
2272
|
...s && { secure: !0 },
|
|
2274
|
-
...w && { priority:
|
|
2273
|
+
...w && { priority: Qn(w) },
|
|
2275
2274
|
...d && { partitioned: !0 }
|
|
2276
2275
|
};
|
|
2277
|
-
return
|
|
2276
|
+
return zn(v);
|
|
2278
2277
|
}
|
|
2279
|
-
function
|
|
2278
|
+
function zn(e) {
|
|
2280
2279
|
const t = {};
|
|
2281
2280
|
for (const r in e)
|
|
2282
2281
|
e[r] && (t[r] = e[r]);
|
|
2283
2282
|
return t;
|
|
2284
2283
|
}
|
|
2285
|
-
var
|
|
2286
|
-
function
|
|
2287
|
-
return e = e.toLowerCase(),
|
|
2284
|
+
var Gn = ["strict", "lax", "none"];
|
|
2285
|
+
function Vn(e) {
|
|
2286
|
+
return e = e.toLowerCase(), Gn.includes(e) ? e : void 0;
|
|
2288
2287
|
}
|
|
2289
|
-
var
|
|
2290
|
-
function
|
|
2291
|
-
return e = e.toLowerCase(),
|
|
2288
|
+
var Wn = ["low", "medium", "high"];
|
|
2289
|
+
function Qn(e) {
|
|
2290
|
+
return e = e.toLowerCase(), Wn.includes(e) ? e : void 0;
|
|
2292
2291
|
}
|
|
2293
|
-
function
|
|
2292
|
+
function Xn(e) {
|
|
2294
2293
|
if (!e)
|
|
2295
2294
|
return [];
|
|
2296
2295
|
var t = [], r = 0, n, a, o, c, i;
|
|
@@ -2314,7 +2313,7 @@ function Kn(e) {
|
|
|
2314
2313
|
}
|
|
2315
2314
|
return t;
|
|
2316
2315
|
}
|
|
2317
|
-
var
|
|
2316
|
+
var Kn = class {
|
|
2318
2317
|
constructor(e) {
|
|
2319
2318
|
this._parsed = /* @__PURE__ */ new Map(), this._headers = e;
|
|
2320
2319
|
const t = e.get("cookie");
|
|
@@ -2380,12 +2379,12 @@ var Jn = class {
|
|
|
2380
2379
|
toString() {
|
|
2381
2380
|
return [...this._parsed.values()].map((e) => `${e.name}=${encodeURIComponent(e.value)}`).join("; ");
|
|
2382
2381
|
}
|
|
2383
|
-
},
|
|
2382
|
+
}, Jn = class {
|
|
2384
2383
|
constructor(e) {
|
|
2385
2384
|
this._parsed = /* @__PURE__ */ new Map();
|
|
2386
2385
|
var t, r, n;
|
|
2387
2386
|
this._headers = e;
|
|
2388
|
-
const a = (n = (r = (t = e.getSetCookie) == null ? void 0 : t.call(e)) != null ? r : e.get("set-cookie")) != null ? n : [], o = Array.isArray(a) ? a :
|
|
2387
|
+
const a = (n = (r = (t = e.getSetCookie) == null ? void 0 : t.call(e)) != null ? r : e.get("set-cookie")) != null ? n : [], o = Array.isArray(a) ? a : Xn(a);
|
|
2389
2388
|
for (const c of o) {
|
|
2390
2389
|
const i = dt(c);
|
|
2391
2390
|
i && this._parsed.set(i.name, i);
|
|
@@ -2417,7 +2416,7 @@ var Jn = class {
|
|
|
2417
2416
|
*/
|
|
2418
2417
|
set(...e) {
|
|
2419
2418
|
const [t, r, n] = e.length === 1 ? [e[0].name, e[0].value, e[0]] : e, a = this._parsed;
|
|
2420
|
-
return a.set(t,
|
|
2419
|
+
return a.set(t, Yn({ name: t, value: r, ...n })), Zn(a, this._headers), this;
|
|
2421
2420
|
}
|
|
2422
2421
|
/**
|
|
2423
2422
|
* {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise.
|
|
@@ -2433,14 +2432,14 @@ var Jn = class {
|
|
|
2433
2432
|
return [...this._parsed.values()].map(K).join("; ");
|
|
2434
2433
|
}
|
|
2435
2434
|
};
|
|
2436
|
-
function
|
|
2435
|
+
function Zn(e, t) {
|
|
2437
2436
|
t.delete("set-cookie");
|
|
2438
2437
|
for (const [, r] of e) {
|
|
2439
2438
|
const n = K(r);
|
|
2440
2439
|
t.append("set-cookie", n);
|
|
2441
2440
|
}
|
|
2442
2441
|
}
|
|
2443
|
-
function
|
|
2442
|
+
function Yn(e = { name: "", value: "" }) {
|
|
2444
2443
|
return typeof e.expires == "number" && (e.expires = new Date(e.expires)), e.maxAge && (e.expires = new Date(Date.now() + e.maxAge * 1e3)), (e.path === null || e.path === void 0) && (e.path = "/"), e;
|
|
2445
2444
|
}
|
|
2446
2445
|
(function(e) {
|
|
@@ -2464,7 +2463,7 @@ function ea(e = { name: "", value: "" }) {
|
|
|
2464
2463
|
return r.stringifyCookie;
|
|
2465
2464
|
}
|
|
2466
2465
|
});
|
|
2467
|
-
const r =
|
|
2466
|
+
const r = Bn;
|
|
2468
2467
|
})(de);
|
|
2469
2468
|
(function(e) {
|
|
2470
2469
|
Object.defineProperty(e, "__esModule", {
|
|
@@ -2796,7 +2795,7 @@ var Re = {}, ht = { exports: {} };
|
|
|
2796
2795
|
var n = r(226);
|
|
2797
2796
|
ht.exports = n;
|
|
2798
2797
|
})();
|
|
2799
|
-
var
|
|
2798
|
+
var ea = ht.exports;
|
|
2800
2799
|
(function(e) {
|
|
2801
2800
|
Object.defineProperty(e, "__esModule", {
|
|
2802
2801
|
value: !0
|
|
@@ -2818,7 +2817,7 @@ var ta = ht.exports;
|
|
|
2818
2817
|
return o;
|
|
2819
2818
|
}
|
|
2820
2819
|
});
|
|
2821
|
-
const r = /* @__PURE__ */ n(
|
|
2820
|
+
const r = /* @__PURE__ */ n(ea);
|
|
2822
2821
|
function n(i) {
|
|
2823
2822
|
return i && i.__esModule ? i : {
|
|
2824
2823
|
default: i
|
|
@@ -2864,7 +2863,7 @@ var gt = {};
|
|
|
2864
2863
|
e.exports = r, t.NextRequest = r.NextRequest, t.NextResponse = r.NextResponse, t.ImageResponse = r.ImageResponse, t.userAgentFromString = r.userAgentFromString, t.userAgent = r.userAgent, t.URLPattern = r.URLPattern;
|
|
2865
2864
|
})(_e, _e.exports);
|
|
2866
2865
|
var Ue = _e.exports;
|
|
2867
|
-
async function
|
|
2866
|
+
async function ta({
|
|
2868
2867
|
apiUrl: e,
|
|
2869
2868
|
extraData: t,
|
|
2870
2869
|
fetchOptions: r
|
|
@@ -2914,15 +2913,15 @@ async function ra({
|
|
|
2914
2913
|
) : null;
|
|
2915
2914
|
return { ...f, ...C, userCredits: A, sub: R, userId: p };
|
|
2916
2915
|
}
|
|
2917
|
-
const
|
|
2916
|
+
const ra = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2918
2917
|
__proto__: null,
|
|
2919
|
-
getUserData:
|
|
2920
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2918
|
+
getUserData: ta
|
|
2919
|
+
}, Symbol.toStringTag, { value: "Module" })), na = l.object({
|
|
2921
2920
|
userName: l.string().optional(),
|
|
2922
2921
|
email: l.string().optional(),
|
|
2923
2922
|
sku: l.string().optional()
|
|
2924
2923
|
});
|
|
2925
|
-
async function
|
|
2924
|
+
async function aa({
|
|
2926
2925
|
apiUrl: e,
|
|
2927
2926
|
body: t
|
|
2928
2927
|
}) {
|
|
@@ -2930,7 +2929,7 @@ async function ia({
|
|
|
2930
2929
|
console.error("[ERROR FETCHING] Body is required");
|
|
2931
2930
|
return;
|
|
2932
2931
|
}
|
|
2933
|
-
await
|
|
2932
|
+
await na.validate(t);
|
|
2934
2933
|
const r = `https://${e}.myvtex.com/no-cache/AviseMe.aspx`, n = await fetch(r, {
|
|
2935
2934
|
method: "POST",
|
|
2936
2935
|
headers: {
|
|
@@ -2944,11 +2943,11 @@ async function ia({
|
|
|
2944
2943
|
text: a
|
|
2945
2944
|
};
|
|
2946
2945
|
}
|
|
2947
|
-
const
|
|
2946
|
+
const ia = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2948
2947
|
__proto__: null,
|
|
2949
|
-
aviseMe:
|
|
2948
|
+
aviseMe: aa
|
|
2950
2949
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2951
|
-
function
|
|
2950
|
+
function oa({
|
|
2952
2951
|
platformCMS: e,
|
|
2953
2952
|
request: t
|
|
2954
2953
|
}) {
|
|
@@ -2964,54 +2963,53 @@ function sa({
|
|
|
2964
2963
|
} : null
|
|
2965
2964
|
};
|
|
2966
2965
|
}
|
|
2967
|
-
const
|
|
2966
|
+
const sa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2968
2967
|
__proto__: null,
|
|
2969
|
-
getCMSPreviewData:
|
|
2968
|
+
getCMSPreviewData: oa
|
|
2970
2969
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2971
|
-
function
|
|
2970
|
+
function ca(e) {
|
|
2972
2971
|
return {
|
|
2973
2972
|
redirectTo: e.nextUrl.searchParams.get("redirect") ?? "/",
|
|
2974
2973
|
clearCookies: ["cms_preview_data"],
|
|
2975
2974
|
disableDraft: !0
|
|
2976
2975
|
};
|
|
2977
2976
|
}
|
|
2978
|
-
const
|
|
2977
|
+
const la = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2979
2978
|
__proto__: null,
|
|
2980
|
-
getCMSPreviewExitData:
|
|
2979
|
+
getCMSPreviewExitData: ca
|
|
2981
2980
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2982
|
-
async function
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2981
|
+
async function ua({
|
|
2982
|
+
pathname: e,
|
|
2983
|
+
apiUrl: t,
|
|
2984
|
+
siteHost: r
|
|
2985
|
+
}) {
|
|
2986
|
+
const n = await fetch(`${t}${e}`, {
|
|
2987
|
+
headers: {
|
|
2988
|
+
"Content-Type": "application/xml"
|
|
2989
2989
|
}
|
|
2990
|
-
)).
|
|
2991
|
-
|
|
2992
|
-
"www.multimarcassoma"
|
|
2993
|
-
);
|
|
2990
|
+
}), a = new URL(t).hostname;
|
|
2991
|
+
return (await n.text()).replaceAll(a, r);
|
|
2994
2992
|
}
|
|
2995
|
-
const
|
|
2993
|
+
const da = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2996
2994
|
__proto__: null,
|
|
2997
|
-
getVtexXmlProxyData:
|
|
2998
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2995
|
+
getVtexXmlProxyData: ua
|
|
2996
|
+
}, Symbol.toStringTag, { value: "Module" })), pa = async (e) => await fetch(e, {
|
|
2999
2997
|
method: "POST",
|
|
3000
2998
|
cache: "force-cache",
|
|
3001
2999
|
headers: {
|
|
3002
3000
|
Authorization: `Bearer ${process.env.ditoUser}:${process.env.ditoPassword}`
|
|
3003
3001
|
}
|
|
3004
3002
|
}).then((r) => r.json());
|
|
3005
|
-
function
|
|
3003
|
+
function ma(e) {
|
|
3006
3004
|
return e.type === "TRACK";
|
|
3007
3005
|
}
|
|
3008
|
-
function
|
|
3006
|
+
function fa(e) {
|
|
3009
3007
|
const t = {};
|
|
3010
3008
|
for (const [r, n] of Object.entries(e))
|
|
3011
3009
|
typeof n == "string" && (t[r] = n);
|
|
3012
3010
|
return t;
|
|
3013
3011
|
}
|
|
3014
|
-
function
|
|
3012
|
+
function ha(e) {
|
|
3015
3013
|
var i, u;
|
|
3016
3014
|
const t = ((i = e["sec-ch-ua-platform"]) == null ? void 0 : i.toLowerCase()) || "", r = e["sec-ch-ua-mobile"], n = ((u = e["user-agent"]) == null ? void 0 : u.toLowerCase()) || "";
|
|
3017
3015
|
let a = r === "?1" ? "Mobile" : "Desktop";
|
|
@@ -3019,7 +3017,7 @@ function ga(e) {
|
|
|
3019
3017
|
const o = /iphone|ipad|ipod/.test(n) || t.includes("ios") ? "iOS" : /android/.test(n) || t.includes("android") ? "Android" : "Desktop", c = /chrome/.test(n) && !/edg|opr/.test(n) ? "Chrome" : /safari/.test(n) && !/chrome/.test(n) ? "Safari" : /firefox/.test(n) ? "Firefox" : /edg/.test(n) ? "Edge" : "Other";
|
|
3020
3018
|
return { platform_name: a, os_name: o, browser_name: c };
|
|
3021
3019
|
}
|
|
3022
|
-
async function
|
|
3020
|
+
async function ga({
|
|
3023
3021
|
body: e,
|
|
3024
3022
|
userToken: t,
|
|
3025
3023
|
headers: r,
|
|
@@ -3027,7 +3025,7 @@ async function ba({
|
|
|
3027
3025
|
apiUrl: a
|
|
3028
3026
|
}) {
|
|
3029
3027
|
var d, w;
|
|
3030
|
-
const o =
|
|
3028
|
+
const o = fa(r), c = await pa(n.authUrl), { platform_name: i, os_name: u, browser_name: g } = ha(o), s = e.findIndex(({ type: v }) => v === "IDENTIFY");
|
|
3031
3029
|
if (s >= 0 && t) {
|
|
3032
3030
|
const v = jt(t), y = e[s], R = await rt({
|
|
3033
3031
|
apiUrl: a,
|
|
@@ -3063,7 +3061,7 @@ async function ba({
|
|
|
3063
3061
|
}
|
|
3064
3062
|
}
|
|
3065
3063
|
return e.forEach((v) => {
|
|
3066
|
-
|
|
3064
|
+
ma(v) && (v.properties.custom_data = {
|
|
3067
3065
|
platform_name: i,
|
|
3068
3066
|
os_name: u,
|
|
3069
3067
|
browser_name: g,
|
|
@@ -3079,26 +3077,26 @@ async function ba({
|
|
|
3079
3077
|
body: JSON.stringify(e)
|
|
3080
3078
|
});
|
|
3081
3079
|
}
|
|
3082
|
-
const
|
|
3080
|
+
const ba = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3083
3081
|
__proto__: null,
|
|
3084
|
-
ditoIngestService:
|
|
3085
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3086
|
-
checkout:
|
|
3087
|
-
catalog:
|
|
3082
|
+
ditoIngestService: ga
|
|
3083
|
+
}, Symbol.toStringTag, { value: "Module" })), Pa = {
|
|
3084
|
+
checkout: Xr,
|
|
3085
|
+
catalog: nn,
|
|
3088
3086
|
cms: Nt,
|
|
3089
|
-
search:
|
|
3090
|
-
masterdata:
|
|
3087
|
+
search: Cn,
|
|
3088
|
+
masterdata: qn,
|
|
3091
3089
|
marketingdata: qt,
|
|
3092
|
-
user:
|
|
3093
|
-
aviseme:
|
|
3094
|
-
preview:
|
|
3095
|
-
exitpreview:
|
|
3096
|
-
vtexXmlProxy:
|
|
3090
|
+
user: ra,
|
|
3091
|
+
aviseme: ia,
|
|
3092
|
+
preview: sa,
|
|
3093
|
+
exitpreview: la,
|
|
3094
|
+
vtexXmlProxy: da,
|
|
3097
3095
|
wishlist: {
|
|
3098
|
-
|
|
3096
|
+
...Fn
|
|
3099
3097
|
},
|
|
3100
|
-
ditoIngestService:
|
|
3101
|
-
},
|
|
3098
|
+
ditoIngestService: ba
|
|
3099
|
+
}, xa = {
|
|
3102
3100
|
catalog: Ut,
|
|
3103
3101
|
search: Dt,
|
|
3104
3102
|
product: Lt,
|
|
@@ -3106,14 +3104,14 @@ const wa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3106
3104
|
...$t,
|
|
3107
3105
|
...Ft
|
|
3108
3106
|
}
|
|
3109
|
-
},
|
|
3107
|
+
}, Sa = {
|
|
3110
3108
|
template: {
|
|
3111
3109
|
pdp: {}
|
|
3112
3110
|
}
|
|
3113
3111
|
};
|
|
3114
3112
|
export {
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3113
|
+
Pa as serverAPIs,
|
|
3114
|
+
Ia as serverCMS,
|
|
3115
|
+
Sa as serverComponents,
|
|
3116
|
+
xa as serverHelpers
|
|
3119
3117
|
};
|