@soma-vertical-web/multi-lib 1.0.0 → 1.0.2

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/index2.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  import { jsx as b, jsxs as N, Fragment as L } from "react/jsx-runtime";
2
- import { x as E, r as j, S as ce, y as le, z as ue, a as de, v as pe, t as me, A as fe, p as ge, o as M, B as he, e as ye } from "./SearchPageScreening-DER0_wzr.mjs";
2
+ import { x as E, r as j, S as ce, y as le, z as ue, a as de, v as pe, t as me, A as fe, p as ge, o as M, B as he, C as ye, D as be, e as Ie } from "./index-CCvTne7y.mjs";
3
3
  import { Utils as D, helpers as _ } from "@soma-vertical-web/core-components";
4
4
  import * as a from "yup";
5
- import be from "sanitize-html";
6
- const Ie = async ({
5
+ import Ce from "sanitize-html";
6
+ const Re = async ({
7
7
  children: t,
8
8
  ClientCartProvider: e,
9
9
  ...n
@@ -13,7 +13,7 @@ const Ie = async ({
13
13
  n
14
14
  );
15
15
  return /* @__PURE__ */ b(e, { ...r ? Array.isArray(r) ? { data: r[0] } : { data: r } : {}, children: t });
16
- }, Ce = ({
16
+ }, ve = ({
17
17
  slug: t,
18
18
  data: e,
19
19
  SectionZone: n,
@@ -55,7 +55,7 @@ const Ie = async ({
55
55
  }
56
56
  )
57
57
  ] });
58
- }, Re = async ({
58
+ }, Se = async ({
59
59
  slug: t,
60
60
  SectionZone: e,
61
61
  COMMON_PAGE_COLUMN_GAP: n,
@@ -67,7 +67,7 @@ const Ie = async ({
67
67
  s
68
68
  );
69
69
  return !o || !Array.isArray(o) || o.length === 0 ? null : /* @__PURE__ */ b(
70
- Ce,
70
+ ve,
71
71
  {
72
72
  data: o,
73
73
  slug: t,
@@ -76,7 +76,7 @@ const Ie = async ({
76
76
  identifyWhoIsFirst: r
77
77
  }
78
78
  );
79
- }, ve = async ({
79
+ }, Ee = async ({
80
80
  children: t,
81
81
  ClientFlagsAndTagsProvider: e,
82
82
  ...n
@@ -86,7 +86,7 @@ const Ie = async ({
86
86
  n
87
87
  );
88
88
  return !r || !Array.isArray(r) ? null : /* @__PURE__ */ b(e, { data: r[0], children: t });
89
- }, Se = async ({
89
+ }, Te = async ({
90
90
  className: t,
91
91
  PAYMENT_FLAGS_DICTIONARY: e,
92
92
  PAYMENT_FLAGS: n,
@@ -137,7 +137,7 @@ const Ie = async ({
137
137
  ICONS: s
138
138
  }
139
139
  ) : null;
140
- }, Ee = async ({
140
+ }, Fe = async ({
141
141
  children: t,
142
142
  ClientHeaderProvider: e,
143
143
  ...n
@@ -159,7 +159,7 @@ const Ie = async ({
159
159
  children: t
160
160
  }
161
161
  );
162
- }, Te = (t) => {
162
+ }, Oe = (t) => {
163
163
  var i, l;
164
164
  const e = (l = (i = t[0]) == null ? void 0 : i.items) == null ? void 0 : l.items;
165
165
  if ((e == null ? void 0 : e.items.length) === 0 || t.length === 0)
@@ -188,7 +188,7 @@ const Ie = async ({
188
188
  helpButtonSize: s,
189
189
  content: o
190
190
  };
191
- }, Fe = async ({
191
+ }, $e = async ({
192
192
  HelpButton: t,
193
193
  ICONS: e,
194
194
  className: n,
@@ -200,7 +200,7 @@ const Ie = async ({
200
200
  );
201
201
  if (!s || !Array.isArray(s) || s.length === 0)
202
202
  return null;
203
- const o = Te(s);
203
+ const o = Oe(s);
204
204
  return /* @__PURE__ */ b(
205
205
  t,
206
206
  {
@@ -209,7 +209,7 @@ const Ie = async ({
209
209
  className: n
210
210
  }
211
211
  );
212
- }, Oe = async ({
212
+ }, qe = async ({
213
213
  SectionZone: t,
214
214
  LPCadastro: e,
215
215
  ...n
@@ -226,7 +226,7 @@ const Ie = async ({
226
226
  /* @__PURE__ */ b(e, { sections: o, content: i }),
227
227
  /* @__PURE__ */ b(t, { data: l })
228
228
  ] });
229
- }, $e = async ({
229
+ }, Ae = async ({
230
230
  children: t,
231
231
  productId: e,
232
232
  COMMON_PAGE_COLUMN_GAP: n,
@@ -248,9 +248,9 @@ const Ie = async ({
248
248
  children: t
249
249
  }
250
250
  );
251
- }, qe = {
251
+ }, Pe = {
252
252
  "column-modifier": "_column-modifier_1tqap_1"
253
- }, Ae = async ({
253
+ }, we = async ({
254
254
  className: t,
255
255
  children: e,
256
256
  slug: n,
@@ -292,7 +292,7 @@ const Ie = async ({
292
292
  {
293
293
  className: _.classNameConcat(
294
294
  j["responsive-desktop-flex"],
295
- [qe["column-modifier"], ...C]
295
+ [Pe["column-modifier"], ...C]
296
296
  ),
297
297
  style: {
298
298
  minHeight: "100vh"
@@ -320,7 +320,7 @@ const Ie = async ({
320
320
  }
321
321
  ) })
322
322
  ] });
323
- }, Pe = async ({ slug: t, ...e }) => {
323
+ }, Ne = async ({ slug: t, ...e }) => {
324
324
  var i, l, u;
325
325
  const { data: n } = await E(
326
326
  "redirect_to_search",
@@ -360,7 +360,7 @@ const Ie = async ({
360
360
  filters: null,
361
361
  sort: null
362
362
  };
363
- }, we = async ({ slug: t, ...e }) => {
363
+ }, ke = async ({ slug: t, ...e }) => {
364
364
  var i, l, u;
365
365
  const { data: n } = await E(
366
366
  "redirect_to_search",
@@ -382,7 +382,7 @@ const Ie = async ({
382
382
  title: o.pageTitle,
383
383
  description: o.pageDescription
384
384
  } : null;
385
- }, Ne = async ({
385
+ }, je = async ({
386
386
  children: t,
387
387
  SectionZone: e,
388
388
  className: n,
@@ -401,7 +401,7 @@ const Ie = async ({
401
401
  children: t
402
402
  }
403
403
  ) : /* @__PURE__ */ b(L, { children: "children" });
404
- }, ke = async ({
404
+ }, De = async ({
405
405
  ClientTipbarContent: t,
406
406
  ...e
407
407
  }) => {
@@ -410,21 +410,21 @@ const Ie = async ({
410
410
  e
411
411
  );
412
412
  return /* @__PURE__ */ b(t, { data: n });
413
- }, je = {
414
- CommonPageContent: Re,
415
- CartContent: Ie,
416
- FlagsAndTagsContent: ve,
417
- HeaderContent: Ee,
418
- TipbarContent: ke,
419
- FooterContent: Se,
420
- PLPContent: Ae,
421
- PDPContent: $e,
422
- getRedirectData: Pe,
423
- getPLPSynteticMetaData: we,
424
- SearchPageContent: Ne,
425
- HelpButtonContent: Fe,
426
- LPCadastroContent: Oe
427
- }, Er = { Components: je }, h = async (t, e = {}) => {
413
+ }, _e = {
414
+ CommonPageContent: Se,
415
+ CartContent: Re,
416
+ FlagsAndTagsContent: Ee,
417
+ HeaderContent: Fe,
418
+ TipbarContent: De,
419
+ FooterContent: Te,
420
+ PLPContent: we,
421
+ PDPContent: Ae,
422
+ getRedirectData: Ne,
423
+ getPLPSynteticMetaData: ke,
424
+ SearchPageContent: je,
425
+ HelpButtonContent: $e,
426
+ LPCadastroContent: qe
427
+ }, Fr = { Components: _e }, h = async (t, e = {}) => {
428
428
  const { method: n = "GET", body: r, headers: s = {}, priority: o = "auto", cache: i = "default" } = e;
429
429
  return fetch(t, {
430
430
  method: n,
@@ -441,7 +441,7 @@ const Ie = async ({
441
441
  console.error("[ERROR FETCH VTEX]", l);
442
442
  });
443
443
  }, w = /* @__PURE__ */ new Map();
444
- async function De(t, e = {}) {
444
+ async function He(t, e = {}) {
445
445
  var n;
446
446
  try {
447
447
  const { abort: r = !1 } = e, s = new AbortController();
@@ -459,16 +459,16 @@ async function De(t, e = {}) {
459
459
  throw console.error(`[ERROR API]: ${r.message}`), r;
460
460
  }
461
461
  }
462
- const _e = a.object({
462
+ const Be = a.object({
463
463
  country: a.string().length(3, "Country code must be 3 characters long").required("Country is required"),
464
464
  postalCode: a.string().nullable()
465
465
  });
466
- async function He({ apiUrl: t, body: e, fetchOptions: n }) {
466
+ async function Le({ apiUrl: t, body: e, fetchOptions: n }) {
467
467
  if (!e) {
468
468
  console.error("[ERROR FETCHING] Body is required");
469
469
  return;
470
470
  }
471
- await _e.validate(e);
471
+ await Be.validate(e);
472
472
  const { country: r, postalCode: s } = e;
473
473
  return await h(
474
474
  `${t}/api/checkout/pub/postal-code/${r}/${s}`,
@@ -479,7 +479,7 @@ async function He({ apiUrl: t, body: e, fetchOptions: n }) {
479
479
  }
480
480
  );
481
481
  }
482
- const Be = a.object({
482
+ const Ge = a.object({
483
483
  orderFormId: a.string().nullable(),
484
484
  sellerCode: a.string().nullable(),
485
485
  sellerName: a.string().nullable()
@@ -493,7 +493,7 @@ async function K({
493
493
  console.error("[ERROR FETCHING] Body is required");
494
494
  return;
495
495
  }
496
- await Be.validate(e);
496
+ await Ge.validate(e);
497
497
  const { orderFormId: r, sellerCode: s, sellerName: o } = e, i = s ? `${s.trim()} - ${o}` : null;
498
498
  return h(
499
499
  `${t}/api/checkout/pub/orderForm/${r}/attachments/openTextField`,
@@ -506,7 +506,7 @@ async function K({
506
506
  }
507
507
  );
508
508
  }
509
- const Le = a.object({
509
+ const Me = a.object({
510
510
  orderFormId: a.string().nullable(),
511
511
  sellerCode: a.string().nullable(),
512
512
  marketingData: a.object()
@@ -521,7 +521,7 @@ async function J({
521
521
  console.error("[ERROR FETCHING] Body is required");
522
522
  return;
523
523
  }
524
- await Le.validate(e);
524
+ await Me.validate(e);
525
525
  const { orderFormId: s, sellerCode: o, marketingData: i } = e, l = o ? {
526
526
  utmCampaign: o ? o.toUpperCase() : "",
527
527
  utmiCampaign: o ? `${n.VENDOR_CODE}` : "semcodigo"
@@ -538,17 +538,17 @@ async function J({
538
538
  }
539
539
  );
540
540
  }
541
- const Ge = a.object({
541
+ const Ue = a.object({
542
542
  orderFormId: a.string().nullable(),
543
543
  sellerCode: a.string().nullable(),
544
544
  sellerName: a.string().nullable()
545
545
  });
546
- async function Me({ apiUrl: t, body: e, fetchOptions: n }) {
546
+ async function Ve({ apiUrl: t, body: e, fetchOptions: n }) {
547
547
  if (!e) {
548
548
  console.error("[ERROR FETCHING] Body is required");
549
549
  return;
550
550
  }
551
- await Ge.validate(e);
551
+ await Ue.validate(e);
552
552
  const r = await K({ apiUrl: t, body: e, fetchOptions: n });
553
553
  return J({
554
554
  apiUrl: t,
@@ -559,11 +559,11 @@ async function Me({ apiUrl: t, body: e, fetchOptions: n }) {
559
559
  fetchOptions: n
560
560
  });
561
561
  }
562
- const Ue = a.object({
562
+ const ze = a.object({
563
563
  orderFormId: a.string().nullable(),
564
564
  coupon: a.string().nullable()
565
565
  });
566
- async function Ve({
566
+ async function xe({
567
567
  apiUrl: t,
568
568
  body: e,
569
569
  fetchOptions: n
@@ -572,7 +572,7 @@ async function Ve({
572
572
  console.error("[ERROR FETCHING] Body is required");
573
573
  return;
574
574
  }
575
- await Ue.validate(e);
575
+ await ze.validate(e);
576
576
  const { coupon: r = "", orderFormId: s } = e;
577
577
  return h(
578
578
  `${t}/api/checkout/pub/orderForm/${s}/coupons`,
@@ -583,12 +583,12 @@ async function Ve({
583
583
  }
584
584
  );
585
585
  }
586
- const ze = a.object({
586
+ const Qe = a.object({
587
587
  appId: a.string().required("App ID is required"),
588
588
  orderFormId: a.string().nullable(),
589
589
  key: a.array().of(a.string())
590
590
  });
591
- async function xe({
591
+ async function Ke({
592
592
  apiUrl: t,
593
593
  body: e,
594
594
  fetchOptions: n
@@ -597,7 +597,7 @@ async function xe({
597
597
  console.error("[ERROR FETCHING] Body is required");
598
598
  return;
599
599
  }
600
- await ze.validate(e);
600
+ await Qe.validate(e);
601
601
  const { appId: r = "faststore", orderFormId: s, key: o } = e;
602
602
  return h(
603
603
  `${t}/api/checkout/pub/orderForm/${s}/customData/${r}/${o}`,
@@ -607,23 +607,23 @@ async function xe({
607
607
  }
608
608
  );
609
609
  }
610
- const Qe = a.object().shape({
610
+ const Je = a.object().shape({
611
611
  name: a.string().required("Attachment name is required"),
612
612
  content: a.object().nullable()
613
613
  });
614
614
  var x;
615
- const Ke = a.object().shape({
616
- attachments: (x = a.array().of(Qe)) == null ? void 0 : x.nullable(),
615
+ const Ye = a.object().shape({
616
+ attachments: (x = a.array().of(Je)) == null ? void 0 : x.nullable(),
617
617
  id: a.string().required("ID of SKU is required"),
618
618
  index: a.number().integer().nullable(),
619
619
  quantity: a.number().integer().nullable(),
620
620
  seller: a.string().required("Seller is required"),
621
621
  price: a.number().integer()
622
- }), Je = a.object({
622
+ }), We = a.object({
623
623
  orderFormId: a.string().required("OrderFormId is required"),
624
- orderItems: a.array().of(Ke)
624
+ orderItems: a.array().of(Ye)
625
625
  });
626
- async function Ye({
626
+ async function Xe({
627
627
  apiUrl: t,
628
628
  body: e,
629
629
  fetchOptions: n
@@ -632,7 +632,7 @@ async function Ye({
632
632
  console.error("[ERROR FETCHING] Body is required");
633
633
  return;
634
634
  }
635
- await Je.validate(e);
635
+ await We.validate(e);
636
636
  const { orderFormId: r, orderItems: s } = e;
637
637
  return h(
638
638
  `${t}/api/checkout/pub/orderForm/${r}/items`,
@@ -643,10 +643,10 @@ async function Ye({
643
643
  }
644
644
  );
645
645
  }
646
- const We = a.object({
646
+ const Ze = a.object({
647
647
  orderFormId: a.string().nullable()
648
648
  });
649
- async function Xe({
649
+ async function et({
650
650
  apiUrl: t,
651
651
  body: e,
652
652
  fetchOptions: n
@@ -655,7 +655,7 @@ async function Xe({
655
655
  console.error("[ERROR FETCHING] Body is required");
656
656
  return;
657
657
  }
658
- await We.validate(e);
658
+ await Ze.validate(e);
659
659
  const { orderFormId: r } = e;
660
660
  return h(
661
661
  `${t}/api/checkout/pub/orderForm/${r}/items/removeAll`,
@@ -665,23 +665,23 @@ async function Xe({
665
665
  }
666
666
  );
667
667
  }
668
- const Ze = a.object().shape({
668
+ const tt = a.object().shape({
669
669
  name: a.string().required("Attachment name is required"),
670
670
  content: a.object().nullable()
671
671
  });
672
672
  var Q;
673
- const et = a.object().shape({
674
- attachments: (Q = a.array().of(Ze)) == null ? void 0 : Q.nullable(),
673
+ const rt = a.object().shape({
674
+ attachments: (Q = a.array().of(tt)) == null ? void 0 : Q.nullable(),
675
675
  id: a.string().required("ID of SKU is required"),
676
676
  index: a.number().integer().nullable(),
677
677
  quantity: a.number().integer().nullable(),
678
678
  seller: a.string().required("Seller is required"),
679
679
  price: a.number().integer()
680
- }), tt = a.object({
680
+ }), nt = a.object({
681
681
  orderFormId: a.string().nullable(),
682
- orderItems: a.array().of(et)
682
+ orderItems: a.array().of(rt)
683
683
  });
684
- async function rt({
684
+ async function at({
685
685
  apiUrl: t,
686
686
  body: e,
687
687
  fetchOptions: n
@@ -690,7 +690,7 @@ async function rt({
690
690
  console.error("[ERROR FETCHING] Body is required");
691
691
  return;
692
692
  }
693
- await tt.validate(e);
693
+ await nt.validate(e);
694
694
  const { orderFormId: r, orderItems: s } = e;
695
695
  return h(
696
696
  `${t}/api/checkout/pub/orderForm/${r}/items/update`,
@@ -701,10 +701,10 @@ async function rt({
701
701
  }
702
702
  );
703
703
  }
704
- const nt = a.object({
704
+ const st = a.object({
705
705
  orderFormId: a.string().nullable()
706
706
  });
707
- async function at({
707
+ async function ot({
708
708
  apiUrl: t,
709
709
  body: e,
710
710
  fetchOptions: n
@@ -713,7 +713,7 @@ async function at({
713
713
  console.error("[ERROR FETCHING] Body is required");
714
714
  return;
715
715
  }
716
- await nt.validate(e);
716
+ await st.validate(e);
717
717
  const { orderFormId: r } = e;
718
718
  return h(
719
719
  `${t}/api/checkout/pub/orderForm/${r}/messages/clear`,
@@ -723,19 +723,19 @@ async function at({
723
723
  }
724
724
  );
725
725
  }
726
- const st = a.object({
726
+ const it = a.object({
727
727
  id: a.string().nullable(),
728
728
  // id offering
729
729
  itemIndex: a.number().nullable(),
730
730
  orderFormId: a.string().nullable(),
731
731
  remove: a.boolean().nullable()
732
732
  });
733
- async function ot({ apiUrl: t, body: e, fetchOptions: n }) {
733
+ async function ct({ apiUrl: t, body: e, fetchOptions: n }) {
734
734
  if (!e) {
735
735
  console.error("[ERROR FETCHING] Body is required");
736
736
  return;
737
737
  }
738
- await st.validate(e);
738
+ await it.validate(e);
739
739
  const { itemIndex: r, orderFormId: s, id: o, remove: i } = e, l = i ? `/${o}/remove` : "", u = `${t}/api/checkout/pub/orderForm/${s}/items/${r}/offerings${l}`;
740
740
  return h(u, {
741
741
  method: "POST",
@@ -743,10 +743,10 @@ async function ot({ apiUrl: t, body: e, fetchOptions: n }) {
743
743
  ...n
744
744
  });
745
745
  }
746
- const it = a.object({
746
+ const lt = a.object({
747
747
  orderFormId: a.string().nullable()
748
748
  });
749
- async function ct({
749
+ async function ut({
750
750
  apiUrl: t,
751
751
  body: e,
752
752
  fetchOptions: n,
@@ -757,13 +757,13 @@ async function ct({
757
757
  console.error("[ERROR FETCHING] Body is required");
758
758
  return;
759
759
  }
760
- await it.validate(e);
760
+ await lt.validate(e);
761
761
  const s = new URLSearchParams({
762
762
  refreshOutdatedData: "true"
763
763
  }), o = e.orderFormId && ((i = r.orderFormPurchaseId) == null ? void 0 : i.value) !== e.orderFormId ? `${t}/api/checkout/pub/orderForm/${e.orderFormId}?${String(s)}` : `${t}/api/checkout/pub/orderForm`;
764
764
  return h(o, { method: "GET", ...n });
765
765
  }
766
- const lt = a.object({
766
+ const dt = a.object({
767
767
  orderFormId: a.string().nullable(),
768
768
  email: a.string().email().required(),
769
769
  firstName: a.string().required(),
@@ -772,7 +772,7 @@ const lt = a.object({
772
772
  document: a.string().required(),
773
773
  phone: a.string().matches(/^\+\d{1,3}\d{10,11}$/)
774
774
  });
775
- async function ut({
775
+ async function pt({
776
776
  apiUrl: t,
777
777
  body: e,
778
778
  fetchOptions: n
@@ -781,7 +781,7 @@ async function ut({
781
781
  console.error("[ERROR FETCHING] Body is required");
782
782
  return;
783
783
  }
784
- await lt.validate(e);
784
+ await dt.validate(e);
785
785
  const { orderFormId: r, ...s } = e;
786
786
  return h(
787
787
  `${t}/api/checkout/pub/orderForm/${r}/attachments/clientProfileData`,
@@ -792,10 +792,10 @@ async function ut({
792
792
  }
793
793
  );
794
794
  }
795
- const dt = a.object({
795
+ const mt = a.object({
796
796
  sellerCode: a.string().nullable()
797
797
  });
798
- async function pt({
798
+ async function ft({
799
799
  apiUrl: t,
800
800
  body: e,
801
801
  extraData: n,
@@ -805,7 +805,7 @@ async function pt({
805
805
  console.error("[ERROR FETCHING] Body is required");
806
806
  return;
807
807
  }
808
- await dt.validate(e);
808
+ await mt.validate(e);
809
809
  const { sellerCode: s = "" } = e;
810
810
  return h(
811
811
  `${t}/api/dataentities/${n.ENTITIES}/search?_fields=${n.FIELDS}&${n.FILTER}=${s}`,
@@ -818,12 +818,12 @@ async function pt({
818
818
  }
819
819
  );
820
820
  }
821
- const mt = a.object().shape({
821
+ const gt = a.object().shape({
822
822
  country: a.string().length(3, "Country code must be 3 characters long").required("Country is required"),
823
823
  orderFormId: a.string().nullable(),
824
824
  postalCode: a.string().nullable()
825
825
  });
826
- async function ft({
826
+ async function ht({
827
827
  apiUrl: t,
828
828
  body: e,
829
829
  fetchOptions: n
@@ -832,7 +832,7 @@ async function ft({
832
832
  console.error("[ERROR FETCHING] Body is required");
833
833
  return;
834
834
  }
835
- await mt.validate(e);
835
+ await gt.validate(e);
836
836
  const { country: r, orderFormId: s, postalCode: o } = e, i = o ? {
837
837
  address: {
838
838
  addressType: "residential",
@@ -852,7 +852,7 @@ async function ft({
852
852
  }
853
853
  );
854
854
  }
855
- const gt = a.object().shape({
855
+ const yt = a.object().shape({
856
856
  orderFormId: a.string().nullable(),
857
857
  options: a.array().of(
858
858
  a.object().shape({
@@ -880,12 +880,12 @@ const gt = a.object().shape({
880
880
  })
881
881
  )
882
882
  });
883
- async function ht({ apiUrl: t, body: e, fetchOptions: n }) {
883
+ async function bt({ apiUrl: t, body: e, fetchOptions: n }) {
884
884
  if (!e) {
885
885
  console.error("[ERROR FETCHING] Body is required");
886
886
  return;
887
887
  }
888
- await gt.validate(e);
888
+ await yt.validate(e);
889
889
  const { orderFormId: r, options: s, selectedAddresses: o } = e;
890
890
  return h(
891
891
  `${t}/api/checkout/pub/orderForm/${r}/attachments/shippingData`,
@@ -900,7 +900,7 @@ async function ht({ apiUrl: t, body: e, fetchOptions: n }) {
900
900
  }
901
901
  );
902
902
  }
903
- const yt = a.object({
903
+ const It = a.object({
904
904
  country: a.string().length(3, "Country code must be 3 characters long").required("Country is required"),
905
905
  postalCode: a.string().nullable(),
906
906
  geoCoordinates: a.object().shape({
@@ -908,12 +908,12 @@ const yt = a.object({
908
908
  latitude: a.number().required()
909
909
  })
910
910
  });
911
- async function bt({ apiUrl: t, body: e, fetchOptions: n }) {
911
+ async function Ct({ apiUrl: t, body: e, fetchOptions: n }) {
912
912
  if (!e) {
913
913
  console.error("[ERROR FETCHING] Body is required");
914
914
  return;
915
915
  }
916
- await yt.validate(e);
916
+ await It.validate(e);
917
917
  const { country: r = "", geoCoordinates: s, postalCode: o = "" } = e, i = new URLSearchParams({ country: String(r) });
918
918
  return o ? i.append("postalCode", o) : i.append(
919
919
  "geoCoordinates",
@@ -926,22 +926,22 @@ async function bt({ apiUrl: t, body: e, fetchOptions: n }) {
926
926
  }
927
927
  );
928
928
  }
929
- const It = a.object({
929
+ const Rt = a.object({
930
930
  id: a.string().required("ID of SKU is required"),
931
931
  quantity: a.number().integer().required("Quantity of item is required"),
932
932
  seller: a.string()
933
- }), Ct = a.object({
934
- items: a.array().of(It),
933
+ }), vt = a.object({
934
+ items: a.array().of(Rt),
935
935
  country: a.string().length(3, "Country code must be 3 characters long").required("Country is required"),
936
936
  postalCode: a.string().nullable(),
937
937
  geoCoordinates: a.array().nullable().of(a.number()).length(2)
938
938
  });
939
- async function Rt({ apiUrl: t, body: e, fetchOptions: n }) {
939
+ async function St({ apiUrl: t, body: e, fetchOptions: n }) {
940
940
  if (!e) {
941
941
  console.error("[ERROR FETCHING] Body is required");
942
942
  return;
943
943
  }
944
- return await Ct.validate(e), h(
944
+ return await vt.validate(e), h(
945
945
  `${t}/api/checkout/pub/orderForms/simulation`,
946
946
  {
947
947
  method: "POST",
@@ -950,35 +950,35 @@ async function Rt({ apiUrl: t, body: e, fetchOptions: n }) {
950
950
  }
951
951
  );
952
952
  }
953
- const vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
953
+ const Et = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
954
954
  __proto__: null,
955
- getMasterDataSellerCode: pt,
956
- getOrderForm: ct,
957
- postOrderFormAddCoupon: Ve,
958
- postOrderFormAttachClientProfileData: ut,
959
- postOrderFormAttachOrderFormData: Me,
960
- postOrderFormAttachShippingData: ft,
955
+ getMasterDataSellerCode: ft,
956
+ getOrderForm: ut,
957
+ postOrderFormAddCoupon: xe,
958
+ postOrderFormAttachClientProfileData: pt,
959
+ postOrderFormAttachOrderFormData: Ve,
960
+ postOrderFormAttachShippingData: ht,
961
961
  postOrderFormAttachmentsMarketingData: J,
962
962
  postOrderFormAttachmentsOpenTextField: K,
963
- postOrderFormClearMessages: at,
964
- postOrderFormFreightSimulation: Rt,
965
- postOrderFormItems: Ye,
966
- postOrderFormRegion: bt,
967
- postOrderFormRemoveAllItems: Xe,
968
- postOrderFormUpdateItems: rt,
969
- postOrderFormUpdateShippingData: ht,
970
- postOrderformAddress: He,
971
- putOrderFormCustomData: xe,
972
- updateOrderFormOffering: ot
973
- }, Symbol.toStringTag, { value: "Module" })), St = a.object({
963
+ postOrderFormClearMessages: ot,
964
+ postOrderFormFreightSimulation: St,
965
+ postOrderFormItems: Xe,
966
+ postOrderFormRegion: Ct,
967
+ postOrderFormRemoveAllItems: et,
968
+ postOrderFormUpdateItems: at,
969
+ postOrderFormUpdateShippingData: bt,
970
+ postOrderformAddress: Le,
971
+ putOrderFormCustomData: Ke,
972
+ updateOrderFormOffering: ct
973
+ }, Symbol.toStringTag, { value: "Module" })), Tt = a.object({
974
974
  skuId: a.string()
975
975
  });
976
- async function Et({ apiUrl: t, body: e, fetchOptions: n }) {
976
+ async function Ft({ apiUrl: t, body: e, fetchOptions: n }) {
977
977
  if (!e) {
978
978
  console.error("[ERROR FETCHING] Body is required");
979
979
  return;
980
980
  }
981
- await St.validate(e);
981
+ await Tt.validate(e);
982
982
  const { skuId: r } = e;
983
983
  return h(
984
984
  `${t}/api/catalog/pvt/stockkeepingunitkit?parentSkuId=${r}`,
@@ -987,15 +987,15 @@ async function Et({ apiUrl: t, body: e, fetchOptions: n }) {
987
987
  }
988
988
  );
989
989
  }
990
- const Tt = a.object({
990
+ const Ot = a.object({
991
991
  ids: a.array().of(a.string().required("ID are required")).required("IDs are required")
992
992
  });
993
- async function Ft({ apiUrl: t, body: e, fetchOptions: n }) {
993
+ async function $t({ apiUrl: t, body: e, fetchOptions: n }) {
994
994
  if (!e) {
995
995
  console.error("[ERROR FETCHING] Body is required");
996
996
  return;
997
997
  }
998
- await Tt.validate(e);
998
+ await Ot.validate(e);
999
999
  const { ids: r } = e;
1000
1000
  return h(
1001
1001
  `${t}/api/catalog_system/pub/products/search?fq=${r.map((s) => `productId:${s}`).join("&fq=")}`,
@@ -1004,15 +1004,15 @@ async function Ft({ apiUrl: t, body: e, fetchOptions: n }) {
1004
1004
  }
1005
1005
  );
1006
1006
  }
1007
- const Ot = a.object({
1007
+ const qt = a.object({
1008
1008
  productId: a.number().required("Product ID is required")
1009
1009
  });
1010
- async function $t({ apiUrl: t, body: e, fetchOptions: n }) {
1010
+ async function At({ apiUrl: t, body: e, fetchOptions: n }) {
1011
1011
  if (!e) {
1012
1012
  console.error("[ERROR FETCHING] Body is required");
1013
1013
  return;
1014
1014
  }
1015
- await Ot.validate(e);
1015
+ await qt.validate(e);
1016
1016
  const { productId: r } = e;
1017
1017
  return h(
1018
1018
  `${t}/api/catalog_system/pub/products/crossselling/similars/${r.toString()}`,
@@ -1021,15 +1021,15 @@ async function $t({ apiUrl: t, body: e, fetchOptions: n }) {
1021
1021
  }
1022
1022
  );
1023
1023
  }
1024
- const qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1024
+ const Pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1025
1025
  __proto__: null,
1026
- getCatalogKitProducts: Et,
1027
- getCatalogProducts: Ft,
1028
- getCatalogSimilars: $t
1029
- }, Symbol.toStringTag, { value: "Module" })), At = a.object({
1026
+ getCatalogKitProducts: Ft,
1027
+ getCatalogProducts: $t,
1028
+ getCatalogSimilars: At
1029
+ }, Symbol.toStringTag, { value: "Module" })), wt = a.object({
1030
1030
  query: a.string()
1031
1031
  });
1032
- async function Pt({
1032
+ async function Nt({
1033
1033
  apiUrl: t,
1034
1034
  body: e,
1035
1035
  fetchOptions: n
@@ -1038,7 +1038,7 @@ async function Pt({
1038
1038
  console.error("[ERROR FETCHING] Body is required");
1039
1039
  return;
1040
1040
  }
1041
- await At.validate(e);
1041
+ await wt.validate(e);
1042
1042
  const { query: r = "" } = e, s = new URLSearchParams({ query: r });
1043
1043
  return h(
1044
1044
  `${t}/api/io/_v/api/intelligent-search/autocomplete_suggestions?${s.toString()}`,
@@ -1047,10 +1047,10 @@ async function Pt({
1047
1047
  }
1048
1048
  );
1049
1049
  }
1050
- const wt = (t, e) => be(t, e), Nt = (t) => ({
1050
+ const kt = (t, e) => Ce(t, e), jt = (t) => ({
1051
1051
  ...t,
1052
- description: t.description ? wt(t.description) : t.description
1053
- }), kt = ({
1052
+ description: t.description ? kt(t.description) : t.description
1053
+ }), Dt = ({
1054
1054
  offer: t,
1055
1055
  seller: e,
1056
1056
  product: n
@@ -1060,8 +1060,8 @@ const wt = (t, e) => be(t, e), Nt = (t) => ({
1060
1060
  seller: e
1061
1061
  }), Y = (t, e) => ({
1062
1062
  ...t,
1063
- isVariantOf: Nt(e)
1064
- }), jt = (t) => t ? "https://schema.org/InStock" : "https://schema.org/OutOfStock", k = (t) => t.AvailableQuantity > 0, U = (t) => t.spotPrice ?? 0, Dt = (t) => t.Price ?? 0, W = (t, e) => k(t) && !k(e) ? -1 : !k(t) && k(e) ? 1 : U(t) - U(e), _t = (t, e) => {
1063
+ isVariantOf: jt(e)
1064
+ }), _t = (t) => t ? "https://schema.org/InStock" : "https://schema.org/OutOfStock", k = (t) => t.AvailableQuantity > 0, U = (t) => t.spotPrice ?? 0, Ht = (t) => t.Price ?? 0, W = (t, e) => k(t) && !k(e) ? -1 : !k(t) && k(e) ? 1 : U(t) - U(e), Bt = (t, e) => {
1065
1065
  let n = 0;
1066
1066
  for (let r = 1; r < t.length; r++)
1067
1067
  e(t[n], t[r]) > 0 && (n = r);
@@ -1072,7 +1072,7 @@ const wt = (t, e) => be(t, e), Nt = (t) => ({
1072
1072
  offer: s.commertialOffer,
1073
1073
  sku: r
1074
1074
  }))
1075
- ), n = _t(
1075
+ ), n = Bt(
1076
1076
  e,
1077
1077
  ({ offer: r }, { offer: s }) => W(r, s)
1078
1078
  );
@@ -1087,11 +1087,11 @@ const wt = (t, e) => be(t, e), Nt = (t) => ({
1087
1087
  attachment: "ATTACHMENT",
1088
1088
  specification: "SPECIFICATION",
1089
1089
  attribute: "ATTRIBUTE"
1090
- }, Ht = (t) => ({
1090
+ }, Lt = (t) => ({
1091
1091
  name: t.name,
1092
1092
  value: t.content,
1093
1093
  valueReference: H.attachment
1094
- }), Bt = (t) => ({
1094
+ }), Gt = (t) => ({
1095
1095
  propertyID: t.id,
1096
1096
  name: t.name,
1097
1097
  value: t.value,
@@ -1108,23 +1108,23 @@ const wt = (t, e) => be(t, e), Nt = (t) => ({
1108
1108
  name: i,
1109
1109
  value: "",
1110
1110
  valueReference: H.specification
1111
- }), s = Array.isArray(n) ? n.map(Ht) : [], o = e ? e.map(Bt) : [];
1111
+ }), s = Array.isArray(n) ? n.map(Lt) : [], o = e ? e.map(Gt) : [];
1112
1112
  return [
1113
1113
  ...r,
1114
1114
  ...s,
1115
1115
  ...o
1116
1116
  ];
1117
- }, V = "ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a", Lt = "AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa", Gt = (t) => {
1117
+ }, V = "ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a", Mt = "AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa", Ut = (t) => {
1118
1118
  let e = t.slice(0);
1119
1119
  for (let n = 0; n < V.length; n++)
1120
1120
  e = e.replace(
1121
1121
  new RegExp(V.charAt(n), "g"),
1122
- Lt.charAt(n)
1122
+ Mt.charAt(n)
1123
1123
  );
1124
1124
  return e;
1125
- }, Mt = (t) => t.replace(/[·/_,:]/, "-"), ee = (t) => {
1125
+ }, Vt = (t) => t.replace(/[·/_,:]/, "-"), ee = (t) => {
1126
1126
  const n = t.replace(/,/g, "").replace(/[*+~.()'"!:@&\[\]`/ %$#?{}|><=_^]/g, "-");
1127
- return Mt(Gt(n)).toLowerCase();
1127
+ return Vt(Ut(n)).toLowerCase();
1128
1128
  }, te = (t) => `/${t}/p`, re = (t) => {
1129
1129
  const e = Math.max(
1130
1130
  ...t.map((r) => r.NumberOfInstallments)
@@ -1141,7 +1141,7 @@ const wt = (t, e) => be(t, e), Nt = (t) => ({
1141
1141
  listPrice: 0,
1142
1142
  sellerDefault: !1
1143
1143
  }, s = t.map(
1144
- (o) => kt({
1144
+ (o) => Dt({
1145
1145
  offer: o.commertialOffer,
1146
1146
  seller: o,
1147
1147
  product: e
@@ -1149,7 +1149,7 @@ const wt = (t, e) => be(t, e), Nt = (t) => ({
1149
1149
  ).sort(W).map((o) => (o.seller.sellerId === "1" && o.AvailableQuantity > 0 && (n.price = o.Price, n.listPrice = o.ListPrice, n.sellerDefault = !0), {
1150
1150
  availability: o.AvailableQuantity > 0,
1151
1151
  listPrice: o.ListPrice,
1152
- price: Dt(o),
1152
+ price: Ht(o),
1153
1153
  priceValidUntil: o.PriceValidUntil,
1154
1154
  priceCurrency: "BRL",
1155
1155
  installments: o.Installments,
@@ -1171,7 +1171,7 @@ const wt = (t, e) => be(t, e), Nt = (t) => ({
1171
1171
  name: r,
1172
1172
  offers: {
1173
1173
  offers: s == null ? void 0 : s.map(({ sellerId: i, commertialOffer: l }) => ({
1174
- availability: jt(l.AvailableQuantity > 0),
1174
+ availability: _t(l.AvailableQuantity > 0),
1175
1175
  listPrice: l.ListPrice,
1176
1176
  price: l.Price,
1177
1177
  quantity: l.AvailableQuantity,
@@ -1183,7 +1183,7 @@ const wt = (t, e) => be(t, e), Nt = (t) => ({
1183
1183
  sku: n
1184
1184
  // slug: getSlug('', itemId), // getSlug('', itemId) que tipo de slug é esse?
1185
1185
  };
1186
- }, Ut = (t) => {
1186
+ }, zt = (t) => {
1187
1187
  var T;
1188
1188
  const {
1189
1189
  attributes: e,
@@ -1258,7 +1258,7 @@ const wt = (t, e) => be(t, e), Nt = (t) => ({
1258
1258
  },
1259
1259
  installments: S
1260
1260
  };
1261
- }, Vt = (t) => {
1261
+ }, xt = (t) => {
1262
1262
  var S;
1263
1263
  const {
1264
1264
  attributes: e,
@@ -1347,16 +1347,16 @@ const wt = (t, e) => be(t, e), Nt = (t) => ({
1347
1347
  },
1348
1348
  installments: R
1349
1349
  };
1350
- }, zt = a.array().of(a.object({
1350
+ }, Qt = a.array().of(a.object({
1351
1351
  key: a.string().required(),
1352
1352
  value: a.string().required()
1353
1353
  })).required("Facets are required");
1354
- async function xt({ apiUrl: t, body: e, fetchOptions: n }) {
1354
+ async function Kt({ apiUrl: t, body: e, fetchOptions: n }) {
1355
1355
  if (!e) {
1356
1356
  console.error("[ERROR FETCHING] Body is required");
1357
1357
  return;
1358
1358
  }
1359
- await zt.validate(e);
1359
+ await Qt.validate(e);
1360
1360
  const r = new URLSearchParams({}), s = e.map(({ key: i, value: l }) => `${i}/${l}`).join("/");
1361
1361
  le(e, r);
1362
1362
  const o = `${t}/api/catalog_system/pub/products/crossselling/${s}`;
@@ -1367,7 +1367,7 @@ async function xt({ apiUrl: t, body: e, fetchOptions: n }) {
1367
1367
  const m = X(u.items);
1368
1368
  return m && Y(m, u);
1369
1369
  }).filter((u) => !!u).map((u) => ({
1370
- node: Vt(u)
1370
+ node: xt(u)
1371
1371
  })));
1372
1372
  }
1373
1373
  const se = ({
@@ -1398,7 +1398,7 @@ const se = ({
1398
1398
  });
1399
1399
  c !== void 0 && C.append("hideUnavailableItems", c.toString());
1400
1400
  const f = u.map((p) => `${p.key}/${p.value}`).join("/") ?? "";
1401
- return De(
1401
+ return He(
1402
1402
  `${t}/api/io/_v/api/intelligent-search/${m}/${f}?${C.toString()}`,
1403
1403
  {
1404
1404
  headers: {
@@ -1409,7 +1409,7 @@ const se = ({
1409
1409
  }
1410
1410
  );
1411
1411
  };
1412
- async function Qt({ body: t, extraData: e, ...n }) {
1412
+ async function Jt({ body: t, extraData: e, ...n }) {
1413
1413
  if (!t) {
1414
1414
  console.error("[ERROR FETCHING] Body is required");
1415
1415
  return;
@@ -1439,13 +1439,13 @@ async function Qt({ body: t, extraData: e, ...n }) {
1439
1439
  total: o.count
1440
1440
  },
1441
1441
  products: s.map((l, u) => ({
1442
- node: Ut(l),
1442
+ node: zt(l),
1443
1443
  cursor: u.toString()
1444
1444
  }))
1445
1445
  }
1446
1446
  };
1447
1447
  }
1448
- async function Kt({ body: t, extraData: e, ...n }) {
1448
+ async function Yt({ body: t, extraData: e, ...n }) {
1449
1449
  if (!t) {
1450
1450
  console.error("[ERROR FETCHING] Body is required");
1451
1451
  return;
@@ -1465,16 +1465,16 @@ async function Kt({ body: t, extraData: e, ...n }) {
1465
1465
  }
1466
1466
  };
1467
1467
  }
1468
- const Jt = a.object({
1468
+ const Wt = a.object({
1469
1469
  query: a.string().optional(),
1470
1470
  locale: a.string().optional()
1471
1471
  });
1472
- async function Yt({ apiUrl: t, body: e, fetchOptions: n }) {
1472
+ async function Xt({ apiUrl: t, body: e, fetchOptions: n }) {
1473
1473
  if (!e) {
1474
1474
  console.error("[ERROR FETCHING] Body is required");
1475
1475
  return;
1476
1476
  }
1477
- await Jt.validate(e);
1477
+ await Wt.validate(e);
1478
1478
  const { query: r = "", locale: s = "default_locale" } = e, o = new URLSearchParams({ query: r, locale: s });
1479
1479
  return h(
1480
1480
  `${t}/api/io/_v/api/intelligent-search/search_suggestions?${o.toString()}`,
@@ -1483,22 +1483,22 @@ async function Yt({ apiUrl: t, body: e, fetchOptions: n }) {
1483
1483
  }
1484
1484
  );
1485
1485
  }
1486
- async function Wt({ apiUrl: t }) {
1486
+ async function Zt({ apiUrl: t }) {
1487
1487
  return h(`${t}/api/io/_v/api/intelligent-search/top_searches`);
1488
1488
  }
1489
- const Xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1489
+ const er = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1490
1490
  __proto__: null,
1491
- getSearchAutoCompleteSuggestions: Pt,
1492
- getSearchCrossellingProducts: xt,
1493
- getSearchFacets: Kt,
1494
- getSearchProducts: Qt,
1495
- getSearchSuggestedTerms: Yt,
1496
- getSearchTopSearchs: Wt
1497
- }, Symbol.toStringTag, { value: "Module" })), Zt = a.object({
1491
+ getSearchAutoCompleteSuggestions: Nt,
1492
+ getSearchCrossellingProducts: Kt,
1493
+ getSearchFacets: Yt,
1494
+ getSearchProducts: Jt,
1495
+ getSearchSuggestedTerms: Xt,
1496
+ getSearchTopSearchs: Zt
1497
+ }, Symbol.toStringTag, { value: "Module" })), tr = a.object({
1498
1498
  masterDataEntity: a.string().nonNullable(),
1499
1499
  payload: a.object().shape({}).nullable()
1500
1500
  });
1501
- async function er({
1501
+ async function rr({
1502
1502
  apiUrl: t,
1503
1503
  body: e,
1504
1504
  fetchOptions: n
@@ -1507,7 +1507,7 @@ async function er({
1507
1507
  console.error("[ERROR FETCHING] Body is required");
1508
1508
  return;
1509
1509
  }
1510
- await Zt.validate(e);
1510
+ await tr.validate(e);
1511
1511
  const { masterDataEntity: r, payload: s } = e, o = `${t}/api/dataentities/${r}/documents`;
1512
1512
  return h(o, {
1513
1513
  method: "POST",
@@ -1517,21 +1517,21 @@ async function er({
1517
1517
  ...n
1518
1518
  });
1519
1519
  }
1520
- const tr = a.object().shape({
1520
+ const nr = a.object().shape({
1521
1521
  _where: a.string().optional(),
1522
1522
  _fields: a.string().optional(),
1523
1523
  _sort: a.string().optional(),
1524
1524
  _from: a.number().integer().min(0).optional(),
1525
1525
  _to: a.number().integer().min(0).optional(),
1526
1526
  _keyword: a.string().optional()
1527
- }), rr = a.object({
1527
+ }), ar = a.object({
1528
1528
  masterDataEntity: a.string().required(),
1529
- searchFields: tr,
1529
+ searchFields: nr,
1530
1530
  headers: a.object().shape({
1531
1531
  "REST-Range": a.string().notRequired()
1532
1532
  })
1533
1533
  });
1534
- async function nr({
1534
+ async function sr({
1535
1535
  apiUrl: t,
1536
1536
  body: e,
1537
1537
  fetchOptions: n
@@ -1541,7 +1541,7 @@ async function nr({
1541
1541
  return;
1542
1542
  }
1543
1543
  const r = new URLSearchParams();
1544
- await rr.validate(e);
1544
+ await ar.validate(e);
1545
1545
  const { masterDataEntity: s, searchFields: o, headers: i } = e;
1546
1546
  o && Object.entries(o).forEach(([u, m]) => {
1547
1547
  r.append(u, String(m));
@@ -1555,12 +1555,12 @@ async function nr({
1555
1555
  ...n
1556
1556
  });
1557
1557
  }
1558
- const ar = a.object({
1558
+ const or = a.object({
1559
1559
  dataEntityName: a.string().required(),
1560
1560
  id: a.string().required(),
1561
1561
  fieldsToBeUpdated: a.object().shape({})
1562
1562
  });
1563
- async function sr({
1563
+ async function ir({
1564
1564
  apiUrl: t,
1565
1565
  body: e,
1566
1566
  fetchOptions: n
@@ -1569,7 +1569,7 @@ async function sr({
1569
1569
  console.error("[ERROR FETCHING] Body is required");
1570
1570
  return;
1571
1571
  }
1572
- await ar.validate(e);
1572
+ await or.validate(e);
1573
1573
  const { dataEntityName: r, id: s, fieldsToBeUpdated: o } = e, i = `${t}/api/dataentities/${r}/documents/${s}`;
1574
1574
  return h(i, {
1575
1575
  body: {
@@ -1579,13 +1579,13 @@ async function sr({
1579
1579
  ...n
1580
1580
  });
1581
1581
  }
1582
- const or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1582
+ const cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1583
1583
  __proto__: null,
1584
- getSearchMasterdata: nr,
1585
- patchUpdateMasterdata: sr,
1586
- postMasterdata: er
1584
+ getSearchMasterdata: sr,
1585
+ patchUpdateMasterdata: ir,
1586
+ postMasterdata: rr
1587
1587
  }, Symbol.toStringTag, { value: "Module" }));
1588
- async function ir({ body: t, apiUrl: e, extraData: n, fetchOptions: r }) {
1588
+ async function lr({ body: t, apiUrl: e, extraData: n, fetchOptions: r }) {
1589
1589
  const { productIds: s } = t;
1590
1590
  if (!s)
1591
1591
  return console.error("[ERROR FETCHING] productIds is required"), [];
@@ -1700,10 +1700,10 @@ async function ir({ body: t, apiUrl: e, extraData: n, fetchOptions: r }) {
1700
1700
  };
1701
1701
  });
1702
1702
  }
1703
- const cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1703
+ const ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1704
1704
  __proto__: null,
1705
- getWishlistProducts: ir
1706
- }, Symbol.toStringTag, { value: "Module" })), lr = (t = "") => t.charAt(0).toUpperCase() + t.slice(1), z = (t, e = " ") => !t || typeof t == "string" && t.length === 0 ? t : (Array.isArray(t) ? t : t.split("-")).map(lr).join(e), ur = ({ canonical: t, seo: e, slug: n }) => {
1705
+ getWishlistProducts: lr
1706
+ }, Symbol.toStringTag, { value: "Module" })), dr = (t = "") => t.charAt(0).toUpperCase() + t.slice(1), z = (t, e = " ") => !t || typeof t == "string" && t.length === 0 ? t : (Array.isArray(t) ? t : t.split("-")).map(dr).join(e), pr = ({ canonical: t, seo: e, slug: n }) => {
1707
1707
  const r = Array.isArray(n) ? n.join(", ") : n;
1708
1708
  return {
1709
1709
  id: 0,
@@ -1714,7 +1714,7 @@ const cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1714
1714
  url: t,
1715
1715
  children: []
1716
1716
  };
1717
- }, dr = ({ canonical: t, category: e, previousImages: n, seo: r }) => ({
1717
+ }, mr = ({ canonical: t, category: e, previousImages: n, seo: r }) => ({
1718
1718
  category: String(e == null ? void 0 : e.id),
1719
1719
  title: (e == null ? void 0 : e.Title) ?? r.title,
1720
1720
  description: (e == null ? void 0 : e.MetaTagDescription) ?? r.description,
@@ -1725,23 +1725,23 @@ const cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1725
1725
  description: (e == null ? void 0 : e.MetaTagDescription) ?? r.description,
1726
1726
  images: Array.isArray(n) ? [...n] : []
1727
1727
  }
1728
- }), pr = ({ items: t, parent: e, apiUrl: n, find: r }) => {
1728
+ }), fr = ({ items: t, parent: e, apiUrl: n, find: r }) => {
1729
1729
  const s = t.find(
1730
1730
  (i) => i.url.replace(n, "") === decodeURIComponent(e.toLowerCase())
1731
1731
  );
1732
1732
  return (s == null ? void 0 : s.children.find(
1733
1733
  (i) => i.name.toLowerCase() === decodeURIComponent(String(r))
1734
1734
  )) ?? s;
1735
- }, mr = (t) => {
1735
+ }, gr = (t) => {
1736
1736
  t instanceof Error ? (console.error(`[ERROR CATEGORY INFO]: ${t.message}`), console.error(t.stack)) : console.error("[ERROR CATEGORY INFO]: Unknown error", t);
1737
- }, fr = /* @__PURE__ */ new Set([
1737
+ }, hr = /* @__PURE__ */ new Set([
1738
1738
  "brand",
1739
1739
  "category",
1740
1740
  "department",
1741
1741
  "subcategory",
1742
1742
  "collection",
1743
1743
  "cluster"
1744
- ]), gr = (t) => typeof (t == null ? void 0 : t.pageType) == "string" && fr.has(t == null ? void 0 : t.pageType.toLowerCase()), hr = (t) => ({
1744
+ ]), yr = (t) => typeof (t == null ? void 0 : t.pageType) == "string" && hr.has(t == null ? void 0 : t.pageType.toLowerCase()), br = (t) => ({
1745
1745
  collection: t.Coleção,
1746
1746
  categoryId: t.categoryId,
1747
1747
  current_collection: t["Coleção Atual"],
@@ -1760,21 +1760,21 @@ const cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1760
1760
  textureImage: (o == null ? void 0 : o.imageUrl) ?? "",
1761
1761
  textureAlt: (o == null ? void 0 : o.imageText) ?? ""
1762
1762
  }), n;
1763
- }, []), yr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1763
+ }, []), Ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1764
1764
  __proto__: null,
1765
- createEmptySeoCategory: ur,
1766
- createSeoCategory: dr,
1767
- findCategory: pr,
1765
+ createEmptySeoCategory: pr,
1766
+ createSeoCategory: mr,
1767
+ findCategory: fr,
1768
1768
  formattedSimilars: oe,
1769
- isCollectionPageType: gr,
1770
- notFindCategoryError: mr,
1771
- responseAdapter: hr
1772
- }, Symbol.toStringTag, { value: "Module" })), br = {
1769
+ isCollectionPageType: yr,
1770
+ notFindCategoryError: gr,
1771
+ responseAdapter: br
1772
+ }, Symbol.toStringTag, { value: "Module" })), Cr = {
1773
1773
  parseSearchState: ge,
1774
1774
  convertSearchParams: fe,
1775
1775
  filterNonRootFacets: me,
1776
1776
  filterNonCategorySelected: pe
1777
- }, Ir = async ({ children: t, apiUrl: e, productId: n, ClientItems: r, PDP_INFO: s, TEXTURE_IMAGE: o, TOGGLE_STYLE_MODIFIER: i }) => {
1777
+ }, Rr = async ({ children: t, apiUrl: e, productId: n, ClientItems: r, PDP_INFO: s, TEXTURE_IMAGE: o, TOGGLE_STYLE_MODIFIER: i }) => {
1778
1778
  const l = await fetch(
1779
1779
  `${e}/api/catalog_system/pub/products/crossselling/similars/${n.toString()}`
1780
1780
  ).then((m) => m.json()), u = oe(l, o);
@@ -1785,27 +1785,31 @@ const cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1785
1785
  ] }),
1786
1786
  /* @__PURE__ */ b(r, { productId: n, similars: u, TOGGLE_STYLE_MODIFIER: i })
1787
1787
  ] });
1788
- }, Tr = {
1789
- checkout: vt,
1790
- catalog: qt,
1788
+ }, Or = {
1789
+ checkout: Et,
1790
+ catalog: Pt,
1791
1791
  cms: he,
1792
- search: Xt,
1793
- masterdata: or,
1792
+ search: er,
1793
+ masterdata: cr,
1794
1794
  wishlist: {
1795
- ...cr
1795
+ ...ur
1796
1796
  }
1797
- }, Fr = {
1798
- catalog: yr,
1799
- search: br,
1800
- product: ye
1801
- }, Or = {
1797
+ }, $r = {
1798
+ catalog: Ir,
1799
+ search: Cr,
1800
+ product: Ie,
1801
+ cms: {
1802
+ ...be,
1803
+ ...ye
1804
+ }
1805
+ }, qr = {
1802
1806
  template: {
1803
- pdp: { PDPSimilars: Ir }
1807
+ pdp: { PDPSimilars: Rr }
1804
1808
  }
1805
1809
  };
1806
1810
  export {
1807
- Tr as serverAPIs,
1808
- Er as serverCMS,
1809
- Or as serverComponents,
1810
- Fr as serverHelpers
1811
+ Or as serverAPIs,
1812
+ Fr as serverCMS,
1813
+ qr as serverComponents,
1814
+ $r as serverHelpers
1811
1815
  };