@soma-vertical-web/multi-lib 0.0.25 → 0.0.26

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.
Files changed (69) hide show
  1. package/contexts/contexts/GlobalContext.d.ts +1 -1
  2. package/contexts/hooks/useOperations.d.ts +1 -0
  3. package/contexts/index.d.ts +1 -1
  4. package/data/helpers/cart/index.d.ts +10 -0
  5. package/index.js +20 -20
  6. package/index.mjs +4435 -4381
  7. package/package.json +1 -1
  8. package/types/constants.d.ts +1 -0
  9. package/types/contexts/contexts/global.d.ts +1 -0
  10. package/types/contexts/store/cart.d.ts +1 -0
  11. package/types/layout/team-components/Header/index.d.ts +2 -1
  12. package/cms/Sections/Banner/Composite/Slot.d.ts +0 -0
  13. package/cms/Sections/index.d.ts +0 -10
  14. package/cms/api/index.d.ts +0 -11
  15. package/cms/ui/ContentTypes/CommonPage/CommonPage.d.ts +0 -3
  16. package/cms/ui/ContentTypes/CommonPage/DataScreening.d.ts +0 -6
  17. package/cms/ui/ContentTypes/CommonPage/index.d.ts +0 -2
  18. package/cms/ui/ContentTypes/FlagsAndTags/index.d.ts +0 -1
  19. package/cms/ui/ContentTypes/index.d.ts +0 -6
  20. package/cms/ui/Factories/common.d.ts +0 -7
  21. package/cms/ui/Factories/contentType.d.ts +0 -9
  22. package/cms/ui/Factories/index.d.ts +0 -2
  23. package/cms/ui/Factories/section.d.ts +0 -7
  24. package/cms/ui/Sections/Banner/Component.d.ts +0 -7
  25. package/cms/ui/Sections/Banner/Composite/Content.d.ts +0 -4
  26. package/cms/ui/Sections/Banner/Composite/Slot.d.ts +0 -0
  27. package/cms/ui/Sections/Banner/adapter.d.ts +0 -32
  28. package/cms/ui/Sections/Banner/index.d.ts +0 -8
  29. package/cms/ui/Sections/TextContent/Component.d.ts +0 -4
  30. package/cms/ui/Sections/TextContent/Composite/Content.d.ts +0 -3
  31. package/cms/ui/Sections/TextContent/Composite/ContentWrapper.d.ts +0 -3
  32. package/cms/ui/Sections/TextContent/adapter.d.ts +0 -3
  33. package/cms/ui/Sections/TextContent/index.d.ts +0 -8
  34. package/cms/ui/Sections/_common/Accordion.d.ts +0 -2
  35. package/cms/ui/Sections/_common/BannerItem.d.ts +0 -5
  36. package/cms/ui/Sections/_common/TextStructure.d.ts +0 -17
  37. package/cms/ui/Sections/_common/interfaces.d.ts +0 -8
  38. package/cms/ui/Sections/index.d.ts +0 -4
  39. package/data/helpers/product/imageResize.d.ts +0 -8
  40. package/index-B8dtKJc0.mjs +0 -68
  41. package/index-BArDD1Jh.mjs +0 -68
  42. package/index-BCZReEF1.js +0 -4
  43. package/index-BI5_UgNN.mjs +0 -3210
  44. package/index-BK5yScKK.js +0 -1
  45. package/index-BaPdEOcD.js +0 -4
  46. package/index-BcniWgv2.mjs +0 -68
  47. package/index-C3_oOo51.js +0 -1
  48. package/index-C7gBx1Sj.js +0 -4
  49. package/index-CAM8BZOC.mjs +0 -3509
  50. package/index-CG59Ho-O.mjs +0 -3514
  51. package/index-CHaVlwnS.js +0 -1
  52. package/index-CWsS9JhJ.mjs +0 -69
  53. package/index-CqPFy76Q.mjs +0 -3531
  54. package/index-DVeRXseR.js +0 -4
  55. package/index-DXjpbLiy.js +0 -4
  56. package/index-DmJIk8vB.mjs +0 -3210
  57. package/index-Dq-m7diJ.mjs +0 -68
  58. package/index-KIgYoXyH.mjs +0 -3526
  59. package/index-NWyULgUV.js +0 -4
  60. package/index-T-_Ys9t7.mjs +0 -3483
  61. package/index-T1F-4OSy.js +0 -4
  62. package/index-dgE7GGD0.js +0 -4
  63. package/index-fnNrOQ41.js +0 -1
  64. package/index-lWJI65gt.js +0 -1
  65. package/index-tKMO8iJa.mjs +0 -3215
  66. package/layout/team-component/ProductCard/helpers.d.ts +0 -18
  67. package/server-DvV_v1l2.mjs +0 -69
  68. package/server-b0_Jc3E_.js +0 -1
  69. package/types/cms/api/index.d.ts +0 -0
@@ -1,3531 +0,0 @@
1
- var cn = Object.defineProperty;
2
- var ln = (t, e, r) => e in t ? cn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var je = (t, e, r) => ln(t, typeof e != "symbol" ? e + "" : e, r);
4
- import { jsx as E, jsxs as G, Fragment as B } from "react/jsx-runtime";
5
- import Se, { createContext as Ne, useRef as U, useContext as Te, useState as ne, useMemo as dt, useEffect as oe } from "react";
6
- import { get as Me, set as De } from "idb-keyval";
7
- import { create as Or } from "zustand";
8
- import { Utils as Oe, helpers as Y, TextStructure as At, Icon as xt, Button as dn, Timer as K, Banner as ke } from "@soma-vertical-web/core-components";
9
- import { SizesSmallExtended as ue, Mode as fn } from "@soma-vertical-web/foundations";
10
- import { DefaultDraftBlockRenderMap as pn, convertFromRaw as Sr, CompositeDecorator as mn, EditorState as ft, Editor as Lt } from "draft-js";
11
- import { TZDate as qt } from "@date-fns/tz";
12
- const hn = (t, e) => {
13
- const [r, n] = t.split(e);
14
- return { name: r.trim(), size: n ? n.trim() : "" };
15
- }, Nr = (t, e) => {
16
- if (!t)
17
- return {};
18
- const [r, n] = t.split(e);
19
- return { color: r == null ? void 0 : r.trim(), size: n == null ? void 0 : n.trim() };
20
- }, ii = (t, e = "tamanho") => {
21
- if (t.additionalProperty) {
22
- const [r] = t.additionalProperty;
23
- return r != null && r.name ? r.name.toLocaleLowerCase() === e ? r.value : t.name : "";
24
- }
25
- return t.name;
26
- }, ai = (t) => t.replace(/\//g, ""), Q = ({ event: t, data: e }) => {
27
- const r = (window == null ? void 0 : window.dataLayer) || [];
28
- e.ecommerce && r.push({
29
- ecommerce: null
30
- }), r.push({ ...t && { event: `custom_${t}` }, ...e });
31
- }, C = {
32
- configs: {
33
- PLP_FILTERS: [{ key: "", label: "", eventLabel: "", order: 0 }],
34
- currency: "BRL",
35
- categoryOff: "bazar",
36
- storeUrl: "https://www.example.com",
37
- MAIN_IMAGE: "1",
38
- // Default main image identifier
39
- NAME_SPLIT_SYMBOL: "-"
40
- },
41
- productEvents: (t, e) => {
42
- const { event: r, commonData: n, customData: o, promotionInfo: i, itemList: s, outsideEcommerceData: a } = t, { availableSizes: u, sizes: l, price: f } = n, d = {
43
- ...r === "view_item" ? {
44
- currency: C.configs.currency,
45
- value: f,
46
- grade_disponivel: u ?? (l ? Tr(l) : "")
47
- } : {},
48
- ...r === "add_to_wishlist" || r === "remove_from_wishlist" ? {
49
- value: f,
50
- currency: C.configs.currency
51
- } : {}
52
- }, c = fe({
53
- data: n,
54
- customData: {
55
- ...o,
56
- ...s,
57
- ...i
58
- },
59
- configs: C.configs
60
- });
61
- Q({
62
- event: r,
63
- data: {
64
- ...a,
65
- ecommerce: {
66
- ...s,
67
- ...d,
68
- items: [c]
69
- }
70
- }
71
- }), typeof e == "function" && e(c, d);
72
- },
73
- productListEvent: (t) => {
74
- const {
75
- commonData: { products: e },
76
- promotionInfo: r,
77
- itemList: n,
78
- outsideEcommerceData: o,
79
- customData: i
80
- } = t;
81
- if (e.length === 0)
82
- return;
83
- const s = e.map(({ node: a }, u) => fe({
84
- data: { ...a },
85
- customData: {
86
- ...r,
87
- index: u,
88
- ...i != null && i.item_list_name ? { item_list_name: i == null ? void 0 : i.item_list_name } : n
89
- },
90
- configs: C.configs
91
- }));
92
- Q({
93
- event: "view_item_list",
94
- data: {
95
- ...o,
96
- ecommerce: {
97
- ...i != null && i.item_list_name ? { item_list_name: i == null ? void 0 : i.item_list_name } : n,
98
- items: s
99
- }
100
- }
101
- });
102
- },
103
- skuEvents: (t) => {
104
- const {
105
- event: e,
106
- commonData: { products: r },
107
- customData: n,
108
- supportData: { selectedSkus: o, price: i },
109
- //in case of kit price and list price are here
110
- promotionInfo: s,
111
- itemList: a,
112
- outsideEcommerceData: u
113
- } = t;
114
- let l = 0;
115
- const f = r.map((d) => {
116
- var m, g, _, w, b, h, P, v, R;
117
- const c = o == null ? void 0 : o.find(
118
- (O) => (d.productId ?? d.id) === O.productId
119
- );
120
- let p = { ...s, ...a };
121
- if (c) {
122
- const O = Ar(), T = xr(O, c);
123
- T && (p = {
124
- ...p,
125
- ...T
126
- }), e === "add_to_cart" && (s || a) && pt({
127
- persistedData: O,
128
- type: "add",
129
- sku: (c == null ? void 0 : c.id) ?? (c == null ? void 0 : c.sku),
130
- newData: {
131
- promotionInfo: s,
132
- itemList: a
133
- }
134
- }), e === "remove_from_cart" && pt({
135
- persistedData: O,
136
- type: "remove",
137
- sku: (c == null ? void 0 : c.id) ?? (c == null ? void 0 : c.sku)
138
- });
139
- }
140
- l += d.price ?? ((_ = (g = (m = c == null ? void 0 : c.offers) == null ? void 0 : m.offers) == null ? void 0 : g[0]) == null ? void 0 : _.price) ?? 0;
141
- const y = (c == null ? void 0 : c.size) ?? Nr(
142
- (c == null ? void 0 : c.skuName) ?? (c == null ? void 0 : c.name) ?? ((w = d.itemOffered) == null ? void 0 : w.skuName),
143
- C.configs.NAME_SPLIT_SYMBOL
144
- ).size;
145
- return fe({
146
- data: d,
147
- customData: {
148
- ...n,
149
- ...p ?? {
150
- ...s,
151
- ...a
152
- },
153
- item_sku: (c == null ? void 0 : c.id) ?? (c == null ? void 0 : c.sku) ?? ((b = d.itemOffered) == null ? void 0 : b.sku),
154
- quantity: (n == null ? void 0 : n.quantity) ?? d.quantity ?? 1,
155
- item_variant2: y,
156
- seller_id: (c == null ? void 0 : c.sellerId) ?? (c == null ? void 0 : c.seller) ?? ((R = (v = (P = (h = c == null ? void 0 : c.offers) == null ? void 0 : h.offers) == null ? void 0 : P[0]) == null ? void 0 : v.seller) == null ? void 0 : R.identifier) ?? d.seller
157
- },
158
- configs: C.configs
159
- });
160
- });
161
- Q({
162
- event: e,
163
- data: {
164
- ...u,
165
- ecommerce: {
166
- value: i ?? l,
167
- currency: C.configs.currency,
168
- items: f
169
- }
170
- }
171
- });
172
- },
173
- filterEvent: (t) => {
174
- var s;
175
- const { commonData: e, customData: r, outsideEcommerceData: n } = t, o = {}, i = {};
176
- Array.isArray(e == null ? void 0 : e.selectedFacets) && ((s = e == null ? void 0 : e.selectedFacets) != null && s.length) && ((e == null ? void 0 : e.selectedFacets).forEach(({ key: a, value: u }) => {
177
- var d;
178
- const l = ((d = C.configs.PLP_FILTERS.find((c) => c.key === a)) == null ? void 0 : d.eventLabel) ?? a, f = (o == null ? void 0 : o[l]) || [];
179
- l === "price_range" && u.replace(":", "-"), o[l] = [...f, u];
180
- }), Object.keys(o).forEach((a) => i[a] = o[a].join(", "))), Q({
181
- event: "filter",
182
- data: {
183
- ...n,
184
- ...i,
185
- ...r
186
- }
187
- });
188
- },
189
- viewCartEvent: (t) => {
190
- var f, d, c, p, y, m, g, _, w, b;
191
- const { commonData: e, outsideEcommerceData: r } = t, { cartStore: n } = e;
192
- if (!n)
193
- return;
194
- const o = window.localStorage.getItem("persistedCartEventsData"), i = o ? JSON.parse(o) : {}, s = n.items.map((h) => {
195
- const { promotionInfo: P, itemList: v } = i[h.id] ?? {};
196
- return fe({
197
- data: {
198
- ...h,
199
- price: h.price / 100,
200
- listPrice: h.listPrice / 100
201
- },
202
- customData: {
203
- ...P,
204
- ...v,
205
- item_sku: h.id ?? h.itemOffered.sku,
206
- quantity: h.quantity ?? 1
207
- },
208
- configs: C.configs
209
- });
210
- }), a = (((f = n.totalizers.find((h) => h.name === "Total dos Itens")) == null ? void 0 : f.value) ?? 0) / 100, u = (((d = n.totalizers.find((h) => h.name === "Total dos Descontos")) == null ? void 0 : d.value) ?? 0) / 100, l = ((c = n.marketingData) == null ? void 0 : c.utmiCampaign) === "codigodavendedora" ? (p = n.marketingData) == null ? void 0 : p.utmCampaign : (m = String((y = n.openTextField) == null ? void 0 : y.value)) == null ? void 0 : m.split(" - ")[0];
211
- Q({
212
- event: "view_cart",
213
- data: {
214
- ...r,
215
- ecommerce: {
216
- currency: C.configs.currency,
217
- value: a + u,
218
- total_discount: Math.abs(u),
219
- cep_preenchido: !!((_ = (g = n.shippingData) == null ? void 0 : g.address) != null && _.postalCode),
220
- ...l ? { seller_coupon_name: l } : {},
221
- ...((w = n.marketingData) == null ? void 0 : w.coupon) && {
222
- sale_coupon_name: (b = n.marketingData) == null ? void 0 : b.coupon
223
- },
224
- subtotal: a,
225
- items: s
226
- }
227
- }
228
- });
229
- },
230
- readyEvents: (t) => {
231
- const { event: e, readyData: r } = t;
232
- Q({
233
- event: e,
234
- data: {
235
- ...r
236
- }
237
- });
238
- }
239
- }, Tr = (t) => t.reduce((e, r) => (r.available && e.push(r.value), e), []).toString(), gn = (t) => {
240
- const e = t.length;
241
- return {
242
- ...t && t.length > 0 ? {
243
- item_category: t[0].includes(C.configs.categoryOff) ? "Bazar" : "Coleção",
244
- ...t[1] ? { item_category2: t[1] } : {},
245
- ...e > 2 ? { item_category3: t[e - 1] } : {}
246
- } : {}
247
- };
248
- }, fe = ({ data: t, customData: e, configs: r }) => ({
249
- ...yn(t, r == null ? void 0 : r.MAIN_IMAGE),
250
- ..._n(t),
251
- ...vn(t),
252
- ...bn(t),
253
- ...e
254
- }), Cr = () => {
255
- var t, e;
256
- return document ? ((e = (t = window.document.head.querySelector('meta[name="category"]')) == null ? void 0 : t.getAttribute("content")) == null ? void 0 : e.split("_")) ?? [] : [];
257
- }, Ar = () => {
258
- const t = window.localStorage.getItem("persistedCartEventsData");
259
- return t ? JSON.parse(t) : null;
260
- }, xr = (t, e) => t == null ? void 0 : t[e], pt = ({
261
- persistedData: t,
262
- type: e,
263
- sku: r,
264
- newData: n
265
- }) => {
266
- if (!t && e === "add") {
267
- window.localStorage.setItem("persistedCartEventsData", JSON.stringify({ [r]: n }));
268
- return;
269
- }
270
- if (t && e === "add") {
271
- window.localStorage.setItem(
272
- "persistedCartEventsData",
273
- JSON.stringify({ ...t, [r]: n })
274
- );
275
- return;
276
- }
277
- t && e === "remove" && (delete t[r], window.localStorage.setItem("persistedCartEventsData", JSON.stringify(t)));
278
- }, yn = (t, e = "1") => {
279
- var i, s, a, u, l, f, d, c, p, y, m;
280
- const r = t.productReference ?? t.gtin ?? t.productRefId, n = t.image ?? ((s = (i = t.items) == null ? void 0 : i[0]) == null ? void 0 : s.images) ?? ((a = t.itemOffered) == null ? void 0 : a.image), o = n == null ? void 0 : n.find(
281
- (g) => g.alternateName === e || g.imageLabel === e || g.keywords === e
282
- );
283
- return {
284
- item_id: t.productId ?? ((u = t.isVariantOf) == null ? void 0 : u.productGroupID) ?? ((l = t.isVariationOf) == null ? void 0 : l.productGroupID) ?? ((d = (f = t.itemOffered) == null ? void 0 : f.isVariationOf) == null ? void 0 : d.productGroupID),
285
- item_ref: /_\d$/.test(r) ? r.slice(0, -2) : r,
286
- item_name: t.productTitle ?? t.productName ?? t.name ?? hn((c = t.itemOffered) == null ? void 0 : c.name, C.configs.NAME_SPLIT_SYMBOL).name,
287
- item_brand: ((p = t.brand) == null ? void 0 : p.brandName) ?? ((y = t.brand) == null ? void 0 : y.name) ?? t.brand ?? ((m = t.itemOffered) == null ? void 0 : m.brand.name),
288
- item_url: `${C.configs.storeUrl}${t.linkText}/p`,
289
- item_image: (o == null ? void 0 : o.url) ?? (o == null ? void 0 : o.imageUrl)
290
- };
291
- }, jt = (t) => Array.isArray(t) ? t.reduce((e, r) => (r.length > e.length && (e = r), e), "") : t, _n = (t) => {
292
- var l, f;
293
- const { categories: e, categoriesIds: r } = t, n = e ?? ((l = t.itemOffered) == null ? void 0 : l.categories), o = r ?? ((f = t.itemOffered) == null ? void 0 : f.categoriesIds), i = jt(n), s = jt(o), a = i.slice(1, -1).split("/"), u = s.slice(1, -1).split("/");
294
- return {
295
- item_category: a[0].toLowerCase().includes(C.configs.categoryOff) ? "Bazar" : "Coleção",
296
- ...a[1] && { item_category2: a[1] },
297
- ...a.length > 2 && {
298
- item_category3: a[a.length - 1]
299
- },
300
- item_category_id: u[u.length - 1],
301
- ...u.length > 1 && {
302
- item_parent_category_id: u[u.length - 2]
303
- }
304
- };
305
- }, vn = (t) => {
306
- var o, i, s, a, u, l;
307
- const e = ((o = t.itemOffered) == null ? void 0 : o.skuName) ?? ((a = (s = (i = t.isVariantOf) == null ? void 0 : i.hasVariant) == null ? void 0 : s[0]) == null ? void 0 : a.name) ?? ((l = (u = t.items) == null ? void 0 : u[0]) == null ? void 0 : l.name), { color: r, size: n } = Nr(e, C.configs.NAME_SPLIT_SYMBOL);
308
- return {
309
- item_variant: r,
310
- ...t.itemOffered && { item_variant2: n }
311
- };
312
- }, bn = (t) => {
313
- var u, l;
314
- const { price: e, listPrice: r, installments: n } = t, o = e ?? ((u = t.offers) == null ? void 0 : u.lowPrice) ?? 0, i = r ?? ((l = t.offers) == null ? void 0 : l.highPrice) ?? 0, s = i ? i - o : 0, a = s % 1 === 0 ? s : Number(s.toFixed(2));
315
- return {
316
- ...e && { price: o ?? i },
317
- ...i && {
318
- list_price: i,
319
- discount: a
320
- },
321
- ...n && {
322
- installments: n == null ? void 0 : n.count,
323
- installment_value: n == null ? void 0 : n.value
324
- },
325
- item_currency: C.configs.currency
326
- };
327
- }, Pn = () => {
328
- const [t, e] = Cr(), [r, n] = t.split("-"), o = r.includes("shop") || r.includes("sale") ? r : "";
329
- return {
330
- page_category: o && n ? n : "",
331
- page_departament: o,
332
- id: e,
333
- name: t
334
- };
335
- }, si = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
336
- __proto__: null,
337
- eventsFunctions: C,
338
- findDataInPersistedData: xr,
339
- getAvailablesSizes: Tr,
340
- getCategories: gn,
341
- getPageCategoryAndDepartmentFromSlug: Pn,
342
- getPersistedData: Ar,
343
- getProductListInfoFromHead: Cr,
344
- pushDatalayer: Q,
345
- updatePersistedData: pt
346
- }, Symbol.toStringTag, { value: "Module" })), Lr = Ne({}), ui = ({ children: t, evtFunctionsConfigs: e }) => {
347
- const r = U({}), n = U(null), o = U(null), i = U({}), s = U({
348
- trigger: !1,
349
- index: 0
350
- }), a = ({
351
- functionKey: f,
352
- data: d,
353
- callBack: c,
354
- timeout: p = 100
355
- }) => {
356
- window.dataLayer || (window.dataLayer = []), C.configs = e;
357
- try {
358
- typeof C[f] == "function" && setTimeout(() => {
359
- var y;
360
- d.promotionInfo = r.current, (y = o.current) != null && y.item_list_name && (d.itemList = o.current), C[f](d, c);
361
- }, p);
362
- } catch (y) {
363
- Q({
364
- event: "error_event",
365
- data: {
366
- error_message: (y == null ? void 0 : y.message) ?? y
367
- }
368
- });
369
- }
370
- }, u = ({ content: f }) => {
371
- a({
372
- functionKey: "readyEvents",
373
- data: {
374
- event: "select_content",
375
- readyData: {
376
- content_type: f.replace("::", ":")
377
- }
378
- }
379
- });
380
- }, l = ({
381
- updatePromotionRef: f,
382
- promotion: d,
383
- index: c
384
- }) => {
385
- f && (r.current = {
386
- ...d
387
- }), a({
388
- functionKey: "readyEvents",
389
- data: {
390
- event: "select_promotion",
391
- readyData: {
392
- ecommerce: {
393
- ...d,
394
- ...c !== void 0 && { index: c }
395
- }
396
- }
397
- }
398
- });
399
- };
400
- return /* @__PURE__ */ E(
401
- Lr.Provider,
402
- {
403
- value: {
404
- sendDataLayerEvent: a,
405
- triggerSelectItemEventRef: s,
406
- promotionEventRef: r,
407
- currentLocalRef: n,
408
- itemListRef: o,
409
- cartProductsFullDataRef: i,
410
- handleSelectContent: u,
411
- handleSelectPromotionEvent: l
412
- },
413
- children: t
414
- }
415
- );
416
- }, qr = () => Te(Lr), Rn = {
417
- attachment: "ATTACHMENT",
418
- specification: "SPECIFICATION",
419
- attribute: "ATTRIBUTE"
420
- }, k = Promise.resolve(!1), mt = {
421
- id: "",
422
- isOpen: !1,
423
- items: [],
424
- loading: !1,
425
- marketingData: null,
426
- messages: [],
427
- openTextField: {},
428
- paymentData: null,
429
- shippingData: null,
430
- totalizers: [],
431
- itemMetadata: [],
432
- recentlyAddedProducts: [],
433
- addCoupon: () => k,
434
- addItem: () => k,
435
- addSellerCode: () => k,
436
- emptyCart: () => {
437
- },
438
- removeItem: () => k,
439
- setIsOpen: () => {
440
- },
441
- shipping: () => k,
442
- shippingUpdate: () => k,
443
- toggleServiceToProduct: () => k,
444
- updateItemQuantity: () => k,
445
- insertProfileEmail: () => k,
446
- setRecentlyAddedProducts: () => {
447
- }
448
- }, vt = (t) => t === 0, jr = (t, e) => {
449
- if (!t || t.length === 0)
450
- return [];
451
- let r = "";
452
- const n = [], o = t.match(/\d+/g) ?? [];
453
- for (const i of o) {
454
- const s = e[Number(i)];
455
- s && (r += (r ? "/" : "") + s, n.push(r));
456
- }
457
- return n;
458
- }, Mr = (t) => {
459
- const {
460
- availability: e,
461
- additionalInfo: { brandName: r },
462
- bundleItems: n,
463
- id: o,
464
- detailUrl: i,
465
- ean: s,
466
- imageUrl: a,
467
- name: u,
468
- listPrice: l,
469
- quantity: f,
470
- price: d,
471
- priceDefinition: c,
472
- productCategories: p,
473
- productCategoryIds: y,
474
- productId: m,
475
- refId: g,
476
- seller: _,
477
- referenceId: w,
478
- offerings: b,
479
- productRefId: h,
480
- skuName: P,
481
- sellingPrice: v
482
- } = t;
483
- return {
484
- availability: e,
485
- bundleItems: n,
486
- referenceId: w,
487
- productRefId: h,
488
- id: o,
489
- ean: s,
490
- itemOffered: {
491
- additionalProperty: [],
492
- brand: {
493
- name: r
494
- },
495
- categories: jr(y, p),
496
- categoriesIds: y,
497
- gtin: g,
498
- image: [
499
- {
500
- alternateName: "1",
501
- url: a
502
- }
503
- ],
504
- name: u,
505
- isVariationOf: {
506
- name: u,
507
- productGroupID: m
508
- },
509
- sku: o,
510
- slug: i,
511
- skuName: P
512
- },
513
- listPrice: l,
514
- quantity: f,
515
- offerings: b,
516
- price: d,
517
- priceDefinition: c,
518
- sellingPrice: v,
519
- seller: _
520
- };
521
- }, Dr = (t, e) => {
522
- const r = t.map((n) => ({
523
- id: n.id,
524
- quantity: n.quantity,
525
- seller: n.seller
526
- }));
527
- return Array.isArray(e) ? [...r, ...e] : [...r, e];
528
- }, kr = (t, e) => {
529
- const r = t.find((n) => n.id === e);
530
- if (r) {
531
- const n = t.map((o, i) => {
532
- var s, a;
533
- return {
534
- id: ((s = o.itemOffered) == null ? void 0 : s.sku) ?? "",
535
- index: i,
536
- quantity: (r == null ? void 0 : r.id) === ((a = o.itemOffered) == null ? void 0 : a.sku) ? 0 : o.quantity,
537
- seller: o.seller ?? ""
538
- };
539
- });
540
- return {
541
- updateItems: n,
542
- filterItems: n.filter((o) => o.id !== e)
543
- };
544
- }
545
- return { updateItems: [], filterItems: [] };
546
- }, zr = (t, e, r) => t.filter(
547
- (n) => n.availability !== "withoutStock" && n.availability !== "https://schema.org/OutOfStock"
548
- ).map(
549
- (n, o) => {
550
- var i, s;
551
- return n.id === e ? {
552
- id: n.id,
553
- index: o,
554
- quantity: r,
555
- seller: n.seller,
556
- sku: ((i = n.itemOffered) == null ? void 0 : i.sku) ?? ""
557
- } : {
558
- id: n.id,
559
- index: o,
560
- quantity: n.quantity,
561
- seller: n.seller,
562
- sku: ((s = n.itemOffered) == null ? void 0 : s.sku) ?? ""
563
- };
564
- }
565
- ), En = (t, e) => t.filter((r) => r.availability !== "withoutStock").findIndex(({ id: r }) => r === e), wn = (t, e) => {
566
- var r;
567
- return Array.isArray(t) ? (((r = t == null ? void 0 : t.find((n) => {
568
- var o;
569
- return ((o = n == null ? void 0 : n.id) == null ? void 0 : o.toLowerCase()) === e;
570
- })) == null ? void 0 : r.value) ?? 0) / 100 : 0;
571
- }, In = (t) => {
572
- const e = t.reduce((o, i) => {
573
- const s = vt(i.price) ? 0 : i.quantity;
574
- return o + s;
575
- }, 0), r = t.reduce(
576
- (o, i) => o + i.price * i.quantity,
577
- 0
578
- ), n = t.reduce(
579
- (o, i) => o + i.listPrice * i.quantity,
580
- 0
581
- );
582
- return {
583
- totalItems: e,
584
- total: r,
585
- subTotal: n
586
- };
587
- }, On = (t) => Array.isArray(t) ? t.filter((e) => e.availability !== "withoutStock").reduce((e, r) => e + (vt(r == null ? void 0 : r.price) ? 0 : r.quantity), 0) : 0, Ur = (t) => {
588
- const {
589
- items: e,
590
- itemMetadata: r,
591
- marketingData: n,
592
- messages: o,
593
- orderFormId: i,
594
- openTextField: s,
595
- paymentData: a,
596
- shippingData: u,
597
- totalizers: l
598
- } = t;
599
- return {
600
- id: i,
601
- itemMetadata: r,
602
- items: Array.isArray(e) ? e.map(Mr) : [],
603
- marketingData: n,
604
- messages: o,
605
- openTextField: s,
606
- paymentData: a,
607
- shippingData: u,
608
- totalizers: l
609
- };
610
- }, Br = (t, e) => {
611
- const r = t.find((n) => n.id === e);
612
- return r ? r.availability === "unavailableItemFulfillment" : !1;
613
- }, Sn = (t, e) => {
614
- const r = t.sku, n = t.isVariantOf.hasVariant.find((o) => o.sku === r);
615
- return n ? n.name.split(e)[1] : "--";
616
- }, Nn = (t, e, r = !1) => !t && e !== "" ? { code: 300, value: e, statusOk: r } : t === e ? { code: 200, value: e, statusOk: r } : { code: 400, value: e, statusOk: r }, Tn = (t, e) => {
617
- const r = /* @__PURE__ */ new Set();
618
- return [t, ...e].filter(
619
- (n) => !r.has(n) && r.add(n),
620
- r
621
- );
622
- }, Vr = (t, e) => e && Array.isArray(e) && e.find((n) => n.id === t) ? Promise.resolve(t) : Promise.resolve(!1), Fr = (t, e) => e ? Promise.resolve(t[e]) : Promise.resolve(!1), Wr = async (t) => {
623
- try {
624
- const e = await t();
625
- if (typeof e != "boolean")
626
- return e;
627
- } catch (e) {
628
- console.error(`[Error orderForm]: ${e}`);
629
- }
630
- return !1;
631
- }, Cn = (t, e) => {
632
- if (e !== -1) {
633
- const r = Number(t);
634
- return r ? r + 1 : 1;
635
- }
636
- return t ?? 1;
637
- }, Hr = (t, e) => Array.isArray(t) ? t.filter(
638
- (r) => e == null ? void 0 : e.some((n) => n.id === r.id)
639
- ) : [], Gr = async (t, e) => t.then((r) => [...r ?? [], ...e ?? []]), q = async (t, e, r) => {
640
- const { priority: n = "auto", body: o } = e;
641
- return fetch(t, {
642
- // priority,
643
- headers: {
644
- "Content-Type": "application/json"
645
- },
646
- priority: n,
647
- method: "POST",
648
- body: JSON.stringify(o)
649
- }).then(async (i) => {
650
- const s = await i.json();
651
- return r ? s : Ur(s);
652
- });
653
- }, $r = (t, e, r) => ({
654
- notifications: [
655
- ...t.notifications,
656
- { id: Date.now(), message: e, callback: r }
657
- ]
658
- }), An = (t) => [...Array.isArray(t) ? t : [t], "faststore"], ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
659
- __proto__: null,
660
- VALUE_REFERENCES: Rn,
661
- addItemOrder: Dr,
662
- addNotification: $r,
663
- createItemOrder: Mr,
664
- fetchCartAPI: q,
665
- findItemIndex: En,
666
- findOptions: Hr,
667
- findTotalizerValue: wn,
668
- getCategories: jr,
669
- getCode: Nn,
670
- getQuantity: Cn,
671
- getRemoveId: Vr,
672
- getSize: Sn,
673
- getTotalItems: On,
674
- getTotalizer: In,
675
- getValue: Fr,
676
- initialState: mt,
677
- isGift: vt,
678
- marketingTagsBuilder: An,
679
- mergeOptionsPromise: Gr,
680
- orderFormValues: Ur,
681
- promiseDefault: k,
682
- removeQuantity: kr,
683
- updateItemSellerExternal: Br,
684
- updateOrderFormPromise: Wr,
685
- updateQuantity: zr,
686
- wishlistArray: Tn
687
- }, Symbol.toStringTag, { value: "Module" })), xn = () => {
688
- const t = async (c, p) => q("/api/checkout/order-form/coupon", {
689
- body: {
690
- orderFormId: c,
691
- coupon: p
692
- }
693
- }), e = async (c, p) => {
694
- if (p) {
695
- const y = p.includes(" - ") ? p.split(" - ")[0] : p, m = await q(
696
- "/api/checkout/order-form/seller-code",
697
- {
698
- body: {
699
- orderFormId: c,
700
- sellerCode: y
701
- }
702
- },
703
- !0
704
- );
705
- return q("/api/checkout/order-form/attachments", {
706
- body: {
707
- orderFormId: c,
708
- sellerCode: y,
709
- sellerName: m instanceof Object && "nome" in m ? m == null ? void 0 : m.nome : ""
710
- }
711
- }).then((g) => ({
712
- ...g,
713
- openTextField: {
714
- ...(g == null ? void 0 : g.openTextField) ?? {},
715
- statusOk: (m == null ? void 0 : m.status) ?? !1
716
- }
717
- }));
718
- } else
719
- return q("/api/checkout/order-form/attachments", {
720
- body: {
721
- orderFormId: c,
722
- sellerCode: "",
723
- sellerName: ""
724
- }
725
- });
726
- }, r = async (c, p, y) => q("/api/checkout/order-form/items", {
727
- body: {
728
- orderFormId: c,
729
- orderItems: Dr(p, y)
730
- }
731
- }), n = async (c, p, y, m) => q("/api/checkout/order-form/offerings", {
732
- body: {
733
- id: p,
734
- itemIndex: y,
735
- orderFormId: c,
736
- remove: m
737
- }
738
- }), o = async (c) => q("/api/checkout/order-form/items/remove-all", {
739
- body: { orderFormId: c }
740
- }), i = async (c, p = "low") => q("/api/checkout/order-form", {
741
- priority: p,
742
- body: { orderFormId: c ?? "" }
743
- }), s = async (c, p) => q("/api/checkout/order-form/profile", {
744
- body: {
745
- orderFormId: c,
746
- email: p
747
- }
748
- }), a = async (c, p, y) => {
749
- const m = kr(p, y);
750
- return q("/api/checkout/order-form/items/update", {
751
- body: {
752
- orderItems: m.updateItems,
753
- orderFormId: c
754
- }
755
- });
756
- }, u = async (c, p, y) => q("/api/checkout/order-form/shipping", {
757
- body: {
758
- orderFormId: c,
759
- country: y,
760
- postalCode: p
761
- }
762
- }), l = async (c, p, y) => q("/api/checkout/order-form/shipping/update", {
763
- body: {
764
- orderFormId: c,
765
- options: p,
766
- selectedAddresses: y
767
- }
768
- }), f = async (c, p, y, m) => {
769
- const g = zr(p, y, m);
770
- return q("/api/checkout/order-form/items/update", {
771
- body: {
772
- orderFormId: c,
773
- orderItems: g
774
- }
775
- });
776
- };
777
- return {
778
- addCoupon: t,
779
- addItem: r,
780
- addSellerCode: e,
781
- giftItem: n,
782
- emptyCart: o,
783
- getOrderForm: i,
784
- insertProfileEmail: s,
785
- removeItem: a,
786
- shipping: u,
787
- shippingUpdate: l,
788
- updateItemQuantity: async (c, p, y, m, g) => f(
789
- c,
790
- p,
791
- y,
792
- m
793
- ).then((_) => _ && Array.isArray(_.items) ? Br(_.items, y) ? f(
794
- c,
795
- p,
796
- y,
797
- g
798
- ) : _ : !1)
799
- };
800
- }, ht = "soma::cart", se = "soma::options", bt = Or((t, e) => {
801
- const r = xn(), n = async (o, i, s) => {
802
- t({ loading: !0 });
803
- const a = await Wr(o);
804
- if (typeof a != "boolean") {
805
- t({ ...a });
806
- const u = await Gr(
807
- Me(se),
808
- s
809
- );
810
- return De(se, u), Fr(a, i).finally(
811
- () => t({ loading: !1, options: u })
812
- );
813
- }
814
- return k;
815
- };
816
- if (typeof window < "u") {
817
- const o = async (i) => {
818
- if (i) {
819
- const s = await Me(se).then(
820
- (l) => Hr(l, i.items)
821
- );
822
- De(ht, i), De(se, s), t({ ...i, options: s });
823
- const a = new URLSearchParams(window.location.search), u = a.get("utm_campaign") || a.get("utmi_campaign") || "";
824
- u && n(
825
- () => r.addSellerCode(e().id, u.toUpperCase()),
826
- "openTextField"
827
- );
828
- }
829
- };
830
- return Me(ht).then(
831
- (i) => r.getOrderForm(i ? i.id : "").then(o)
832
- // create form
833
- ), {
834
- ...mt,
835
- // coupon
836
- addCoupon: async (i) => n(
837
- () => r.addCoupon(e().id, i),
838
- "marketingData"
839
- ),
840
- // add to cart
841
- addItem: (i, s) => {
842
- n(
843
- () => r.addItem(e().id, e().items, i),
844
- "items",
845
- s
846
- );
847
- },
848
- // seller code
849
- addSellerCode: async (i) => n(
850
- () => r.addSellerCode(e().id, i),
851
- "openTextField"
852
- ),
853
- // empty cart
854
- emptyCart: () => {
855
- n(() => r.emptyCart(e().id));
856
- },
857
- // remove item
858
- removeItem: async (i) => {
859
- const s = await n(
860
- () => r.removeItem(e().id, e().items, i),
861
- // remove item by quantity = 0
862
- "items"
863
- );
864
- return Vr(i, s);
865
- },
866
- // shipping
867
- shipping: async (i, s = "BR") => n(
868
- () => r.shipping(e().id, i, s),
869
- // shipping first selected value,
870
- "shippingData"
871
- ),
872
- // shipping update
873
- shippingUpdate: async (i) => n(
874
- () => {
875
- var s;
876
- return r.shippingUpdate(
877
- e().id,
878
- i,
879
- (s = e().shippingData) == null ? void 0 : s.selectedAddresses
880
- );
881
- },
882
- "shippingData"
883
- ),
884
- // toggle service product
885
- toggleServiceToProduct: async (i, s, a) => n(
886
- () => r.giftItem(e().id, i, s, a),
887
- "items"
888
- ),
889
- // update item
890
- updateItemQuantity: async (i, s, a) => {
891
- const { id: u, items: l } = e();
892
- return n(
893
- () => {
894
- var f;
895
- return r.updateItemQuantity(
896
- u,
897
- l,
898
- i,
899
- s,
900
- ((f = l.find((d) => d.id === i)) == null ? void 0 : f.quantity) ?? 1
901
- );
902
- },
903
- "items",
904
- a ? [a] : void 0
905
- );
906
- },
907
- insertProfileEmail: async (i) => n(
908
- () => r.insertProfileEmail(e().id, i),
909
- "clientProfileData"
910
- ),
911
- setIsOpen: (i) => t({ isOpen: i })
912
- };
913
- }
914
- return mt;
915
- }), Ln = () => bt((t) => t), Kr = Or((t) => ({
916
- notifications: [],
917
- actions: {
918
- addNotification: (e, r) => t(
919
- (n) => $r(n, e, r)
920
- ),
921
- removeNotification: (e) => t((r) => ({
922
- notifications: r.notifications.filter((n) => n.id !== e)
923
- }))
924
- }
925
- })), qn = () => Kr(
926
- (t) => t.notifications
927
- ), jn = () => Kr(
928
- (t) => t.actions
929
- ), li = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
930
- __proto__: null,
931
- KEY_INDEXED_OPTIONS: se,
932
- KEY_INDEXED_STORE: ht,
933
- useCartStore: bt,
934
- useGetCartStoreState: Ln,
935
- useGetNotificationActions: jn,
936
- useGetNotificationsStore: qn
937
- }, Symbol.toStringTag, { value: "Module" })), Mn = 6e3, Qr = Ne({}), Dn = ({ children: t, ...e }) => {
938
- const { items: r } = bt(), [n, o] = ne([]), i = U(null), s = dt(() => Array.isArray(n) && n.length > 0 ? n.map((a) => r.find((u) => u.id === a.id)).filter((a) => a !== void 0) : [], [r, n]);
939
- return oe(() => {
940
- n.length && (clearTimeout(i.current ?? 0), i.current = setTimeout(() => {
941
- o([]);
942
- }, Mn));
943
- }, [n]), /* @__PURE__ */ E(
944
- Qr.Provider,
945
- {
946
- value: dt(
947
- () => ({
948
- ...e,
949
- setRecentlyAdded: o,
950
- recentlyAddedProducts: s
951
- }),
952
- [e, o, s]
953
- ),
954
- children: t
955
- }
956
- );
957
- }, di = () => {
958
- const t = Te(Qr);
959
- if (t === void 0)
960
- throw new Error("useUIContext must be used within a UIProvider");
961
- return t;
962
- };
963
- class kn {
964
- constructor() {
965
- je(this, "events", {});
966
- je(this, "prevData", {});
967
- }
968
- subscribe(e, r) {
969
- return this.events[e] || (this.events[e] = []), this.events[e].push(r), () => {
970
- this.events[e] = this.events[e].filter((n) => n !== r);
971
- };
972
- }
973
- publish(e, r) {
974
- this.events[e] && this.events[e].forEach((n) => {
975
- this.prevData[e] = r, n(r);
976
- });
977
- }
978
- }
979
- const Xr = Ne({}), fi = ({ children: t, headerConfigs: e, pathname: r, ...n }) => {
980
- const [o, i] = ne(!0), s = r === "/", a = U(new kn()), u = (d) => d ? {
981
- headerVariant: e.home_default_variant,
982
- bannerVariant: e.home_default_variant,
983
- position: e.home_default_position
984
- } : {
985
- headerVariant: e.default_variant,
986
- bannerVariant: e.default_variant,
987
- position: e.default_position
988
- }, l = u(s), f = U(l);
989
- return oe(() => {
990
- const d = () => {
991
- const c = typeof (window == null ? void 0 : window.navigator) > "u" ? "" : navigator == null ? void 0 : navigator.userAgent, p = window.innerWidth < 1024 || !!c.match(
992
- /Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i
993
- );
994
- o !== p && i(p);
995
- };
996
- return d(), window.addEventListener("resize", d, { passive: !0 }), () => window.removeEventListener("resize", d);
997
- }, [o]), oe(() => {
998
- const d = u(s);
999
- a.current.publish(
1000
- "header:change_variant",
1001
- d.headerVariant
1002
- ), a.current.publish(
1003
- "header:change_position",
1004
- d.position
1005
- ), f.current = d;
1006
- }, [s]), /* @__PURE__ */ E(
1007
- Xr.Provider,
1008
- {
1009
- value: {
1010
- isMobile: o,
1011
- mediatorRef: a,
1012
- currentHeaderConfigsRef: f,
1013
- ...n
1014
- },
1015
- children: /* @__PURE__ */ E(Dn, { children: t })
1016
- }
1017
- );
1018
- }, pi = () => Te(Xr), Yr = Ne({}), mi = ({ children: t, ...e }) => /* @__PURE__ */ E(
1019
- Yr.Provider,
1020
- {
1021
- value: {
1022
- ...e
1023
- },
1024
- children: t
1025
- }
1026
- ), Jr = () => Te(Yr), zn = (t, e) => e.getTime() > t.getTime() ? Math.abs(e.getTime() - t.getTime()) : 0, pe = (t, e) => Math.floor(e === "days" ? t / (1e3 * 60 * 60 * 24) : e === "hours" ? t % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60) : e === "minutes" ? t % (1e3 * 60 * 60) / (1e3 * 60) : t % (1e3 * 60) / 1e3);
1027
- function Un(t) {
1028
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
1029
- }
1030
- var gt = { exports: {} }, ce = {};
1031
- ce._ = ce._interop_require_default = Bn;
1032
- function Bn(t) {
1033
- return t && t.__esModule ? t : { default: t };
1034
- }
1035
- var me = { exports: {} }, ze = {}, Mt;
1036
- function Zr() {
1037
- return Mt || (Mt = 1, function(t) {
1038
- Object.defineProperty(t, "__esModule", {
1039
- value: !0
1040
- });
1041
- function e(s, a) {
1042
- for (var u in a) Object.defineProperty(s, u, {
1043
- enumerable: !0,
1044
- get: a[u]
1045
- });
1046
- }
1047
- e(t, {
1048
- searchParamsToUrlQuery: function() {
1049
- return r;
1050
- },
1051
- urlQueryToSearchParams: function() {
1052
- return o;
1053
- },
1054
- assign: function() {
1055
- return i;
1056
- }
1057
- });
1058
- function r(s) {
1059
- const a = {};
1060
- return s.forEach((u, l) => {
1061
- typeof a[l] > "u" ? a[l] = u : Array.isArray(a[l]) ? a[l].push(u) : a[l] = [
1062
- a[l],
1063
- u
1064
- ];
1065
- }), a;
1066
- }
1067
- function n(s) {
1068
- return typeof s == "string" || typeof s == "number" && !isNaN(s) || typeof s == "boolean" ? String(s) : "";
1069
- }
1070
- function o(s) {
1071
- const a = new URLSearchParams();
1072
- return Object.entries(s).forEach((u) => {
1073
- let [l, f] = u;
1074
- Array.isArray(f) ? f.forEach((d) => a.append(l, n(d))) : a.set(l, n(f));
1075
- }), a;
1076
- }
1077
- function i(s) {
1078
- for (var a = arguments.length, u = new Array(a > 1 ? a - 1 : 0), l = 1; l < a; l++)
1079
- u[l - 1] = arguments[l];
1080
- return u.forEach((f) => {
1081
- Array.from(f.keys()).forEach((d) => s.delete(d)), f.forEach((d, c) => s.append(c, d));
1082
- }), s;
1083
- }
1084
- }(ze)), ze;
1085
- }
1086
- var Ue = {}, he = {}, Dt;
1087
- function Vn() {
1088
- if (Dt) return he;
1089
- Dt = 1;
1090
- function t(r) {
1091
- if (typeof WeakMap != "function") return null;
1092
- var n = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap();
1093
- return (t = function(i) {
1094
- return i ? o : n;
1095
- })(r);
1096
- }
1097
- he._ = he._interop_require_wildcard = e;
1098
- function e(r, n) {
1099
- if (!n && r && r.__esModule) return r;
1100
- if (r === null || typeof r != "object" && typeof r != "function") return { default: r };
1101
- var o = t(n);
1102
- if (o && o.has(r)) return o.get(r);
1103
- var i = {}, s = Object.defineProperty && Object.getOwnPropertyDescriptor;
1104
- for (var a in r)
1105
- if (a !== "default" && Object.prototype.hasOwnProperty.call(r, a)) {
1106
- var u = s ? Object.getOwnPropertyDescriptor(r, a) : null;
1107
- u && (u.get || u.set) ? Object.defineProperty(i, a, u) : i[a] = r[a];
1108
- }
1109
- return i.default = r, o && o.set(r, i), i;
1110
- }
1111
- return he;
1112
- }
1113
- var kt;
1114
- function en() {
1115
- return kt || (kt = 1, function(t) {
1116
- Object.defineProperty(t, "__esModule", {
1117
- value: !0
1118
- });
1119
- function e(u, l) {
1120
- for (var f in l) Object.defineProperty(u, f, {
1121
- enumerable: !0,
1122
- get: l[f]
1123
- });
1124
- }
1125
- e(t, {
1126
- formatUrl: function() {
1127
- return i;
1128
- },
1129
- urlObjectKeys: function() {
1130
- return s;
1131
- },
1132
- formatWithValidation: function() {
1133
- return a;
1134
- }
1135
- });
1136
- const n = /* @__PURE__ */ Vn()._(Zr()), o = /https?|ftp|gopher|file/;
1137
- function i(u) {
1138
- let { auth: l, hostname: f } = u, d = u.protocol || "", c = u.pathname || "", p = u.hash || "", y = u.query || "", m = !1;
1139
- l = l ? encodeURIComponent(l).replace(/%3A/i, ":") + "@" : "", u.host ? m = l + u.host : f && (m = l + (~f.indexOf(":") ? "[" + f + "]" : f), u.port && (m += ":" + u.port)), y && typeof y == "object" && (y = String(n.urlQueryToSearchParams(y)));
1140
- let g = u.search || y && "?" + y || "";
1141
- return d && !d.endsWith(":") && (d += ":"), u.slashes || (!d || o.test(d)) && m !== !1 ? (m = "//" + (m || ""), c && c[0] !== "/" && (c = "/" + c)) : m || (m = ""), p && p[0] !== "#" && (p = "#" + p), g && g[0] !== "?" && (g = "?" + g), c = c.replace(/[?#]/g, encodeURIComponent), g = g.replace("#", "%23"), "" + d + m + c + g + p;
1142
- }
1143
- const s = [
1144
- "auth",
1145
- "hash",
1146
- "host",
1147
- "hostname",
1148
- "href",
1149
- "path",
1150
- "pathname",
1151
- "port",
1152
- "protocol",
1153
- "query",
1154
- "search",
1155
- "slashes"
1156
- ];
1157
- function a(u) {
1158
- return process.env.NODE_ENV === "development" && u !== null && typeof u == "object" && Object.keys(u).forEach((l) => {
1159
- s.includes(l) || console.warn("Unknown key passed via urlObject into url.format: " + l);
1160
- }), i(u);
1161
- }
1162
- }(Ue)), Ue;
1163
- }
1164
- var Be = {}, zt;
1165
- function Fn() {
1166
- return zt || (zt = 1, function(t) {
1167
- Object.defineProperty(t, "__esModule", {
1168
- value: !0
1169
- }), Object.defineProperty(t, "omit", {
1170
- enumerable: !0,
1171
- get: function() {
1172
- return e;
1173
- }
1174
- });
1175
- function e(r, n) {
1176
- const o = {};
1177
- return Object.keys(r).forEach((i) => {
1178
- n.includes(i) || (o[i] = r[i]);
1179
- }), o;
1180
- }
1181
- }(Be)), Be;
1182
- }
1183
- var Ve = {}, Ut;
1184
- function Ce() {
1185
- return Ut || (Ut = 1, function(t) {
1186
- Object.defineProperty(t, "__esModule", {
1187
- value: !0
1188
- });
1189
- function e(h, P) {
1190
- for (var v in P) Object.defineProperty(h, v, {
1191
- enumerable: !0,
1192
- get: P[v]
1193
- });
1194
- }
1195
- e(t, {
1196
- WEB_VITALS: function() {
1197
- return r;
1198
- },
1199
- execOnce: function() {
1200
- return n;
1201
- },
1202
- isAbsoluteUrl: function() {
1203
- return i;
1204
- },
1205
- getLocationOrigin: function() {
1206
- return s;
1207
- },
1208
- getURL: function() {
1209
- return a;
1210
- },
1211
- getDisplayName: function() {
1212
- return u;
1213
- },
1214
- isResSent: function() {
1215
- return l;
1216
- },
1217
- normalizeRepeatedSlashes: function() {
1218
- return f;
1219
- },
1220
- loadGetInitialProps: function() {
1221
- return d;
1222
- },
1223
- SP: function() {
1224
- return c;
1225
- },
1226
- ST: function() {
1227
- return p;
1228
- },
1229
- DecodeError: function() {
1230
- return y;
1231
- },
1232
- NormalizeError: function() {
1233
- return m;
1234
- },
1235
- PageNotFoundError: function() {
1236
- return g;
1237
- },
1238
- MissingStaticPage: function() {
1239
- return _;
1240
- },
1241
- MiddlewareNotFoundError: function() {
1242
- return w;
1243
- },
1244
- stringifyError: function() {
1245
- return b;
1246
- }
1247
- });
1248
- const r = [
1249
- "CLS",
1250
- "FCP",
1251
- "FID",
1252
- "INP",
1253
- "LCP",
1254
- "TTFB"
1255
- ];
1256
- function n(h) {
1257
- let P = !1, v;
1258
- return function() {
1259
- for (var R = arguments.length, O = new Array(R), T = 0; T < R; T++)
1260
- O[T] = arguments[T];
1261
- return P || (P = !0, v = h(...O)), v;
1262
- };
1263
- }
1264
- const o = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/, i = (h) => o.test(h);
1265
- function s() {
1266
- const { protocol: h, hostname: P, port: v } = window.location;
1267
- return h + "//" + P + (v ? ":" + v : "");
1268
- }
1269
- function a() {
1270
- const { href: h } = window.location, P = s();
1271
- return h.substring(P.length);
1272
- }
1273
- function u(h) {
1274
- return typeof h == "string" ? h : h.displayName || h.name || "Unknown";
1275
- }
1276
- function l(h) {
1277
- return h.finished || h.headersSent;
1278
- }
1279
- function f(h) {
1280
- const P = h.split("?");
1281
- return P[0].replace(/\\/g, "/").replace(/\/\/+/g, "/") + (P[1] ? "?" + P.slice(1).join("?") : "");
1282
- }
1283
- async function d(h, P) {
1284
- if (process.env.NODE_ENV !== "production") {
1285
- var v;
1286
- if ((v = h.prototype) != null && v.getInitialProps) {
1287
- const T = '"' + u(h) + '.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.';
1288
- throw new Error(T);
1289
- }
1290
- }
1291
- const R = P.res || P.ctx && P.ctx.res;
1292
- if (!h.getInitialProps)
1293
- return P.ctx && P.Component ? {
1294
- pageProps: await d(P.Component, P.ctx)
1295
- } : {};
1296
- const O = await h.getInitialProps(P);
1297
- if (R && l(R))
1298
- return O;
1299
- if (!O) {
1300
- const T = '"' + u(h) + '.getInitialProps()" should resolve to an object. But found "' + O + '" instead.';
1301
- throw new Error(T);
1302
- }
1303
- return process.env.NODE_ENV !== "production" && Object.keys(O).length === 0 && !P.ctx && console.warn("" + u(h) + " returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps"), O;
1304
- }
1305
- const c = typeof performance < "u", p = c && [
1306
- "mark",
1307
- "measure",
1308
- "getEntriesByName"
1309
- ].every((h) => typeof performance[h] == "function");
1310
- class y extends Error {
1311
- }
1312
- class m extends Error {
1313
- }
1314
- class g extends Error {
1315
- constructor(P) {
1316
- super(), this.code = "ENOENT", this.name = "PageNotFoundError", this.message = "Cannot find module for page: " + P;
1317
- }
1318
- }
1319
- class _ extends Error {
1320
- constructor(P, v) {
1321
- super(), this.message = "Failed to load static file for page: " + P + " " + v;
1322
- }
1323
- }
1324
- class w extends Error {
1325
- constructor() {
1326
- super(), this.code = "ENOENT", this.message = "Cannot find the middleware module";
1327
- }
1328
- }
1329
- function b(h) {
1330
- return JSON.stringify({
1331
- message: h.message,
1332
- stack: h.stack
1333
- });
1334
- }
1335
- }(Ve)), Ve;
1336
- }
1337
- var ge = { exports: {} }, Fe = {}, Bt;
1338
- function tn() {
1339
- return Bt || (Bt = 1, function(t) {
1340
- Object.defineProperty(t, "__esModule", {
1341
- value: !0
1342
- }), Object.defineProperty(t, "removeTrailingSlash", {
1343
- enumerable: !0,
1344
- get: function() {
1345
- return e;
1346
- }
1347
- });
1348
- function e(r) {
1349
- return r.replace(/\/$/, "") || "/";
1350
- }
1351
- }(Fe)), Fe;
1352
- }
1353
- var We = {}, Vt;
1354
- function Pt() {
1355
- return Vt || (Vt = 1, function(t) {
1356
- Object.defineProperty(t, "__esModule", {
1357
- value: !0
1358
- }), Object.defineProperty(t, "parsePath", {
1359
- enumerable: !0,
1360
- get: function() {
1361
- return e;
1362
- }
1363
- });
1364
- function e(r) {
1365
- const n = r.indexOf("#"), o = r.indexOf("?"), i = o > -1 && (n < 0 || o < n);
1366
- return i || n > -1 ? {
1367
- pathname: r.substring(0, i ? o : n),
1368
- query: i ? r.substring(o, n > -1 ? n : void 0) : "",
1369
- hash: n > -1 ? r.slice(n) : ""
1370
- } : {
1371
- pathname: r,
1372
- query: "",
1373
- hash: ""
1374
- };
1375
- }
1376
- }(We)), We;
1377
- }
1378
- var Ft;
1379
- function Ae() {
1380
- return Ft || (Ft = 1, function(t, e) {
1381
- Object.defineProperty(e, "__esModule", {
1382
- value: !0
1383
- }), Object.defineProperty(e, "normalizePathTrailingSlash", {
1384
- enumerable: !0,
1385
- get: function() {
1386
- return o;
1387
- }
1388
- });
1389
- const r = tn(), n = Pt(), o = (i) => {
1390
- if (!i.startsWith("/") || process.env.__NEXT_MANUAL_TRAILING_SLASH)
1391
- return i;
1392
- const { pathname: s, query: a, hash: u } = (0, n.parsePath)(i);
1393
- return process.env.__NEXT_TRAILING_SLASH ? /\.[^/]+\/?$/.test(s) ? "" + (0, r.removeTrailingSlash)(s) + a + u : s.endsWith("/") ? "" + s + a + u : s + "/" + a + u : "" + (0, r.removeTrailingSlash)(s) + a + u;
1394
- };
1395
- (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
1396
- }(ge, ge.exports)), ge.exports;
1397
- }
1398
- var He = {}, ye = { exports: {} }, Ge = {}, Wt;
1399
- function rn() {
1400
- return Wt || (Wt = 1, function(t) {
1401
- Object.defineProperty(t, "__esModule", {
1402
- value: !0
1403
- }), Object.defineProperty(t, "pathHasPrefix", {
1404
- enumerable: !0,
1405
- get: function() {
1406
- return r;
1407
- }
1408
- });
1409
- const e = Pt();
1410
- function r(n, o) {
1411
- if (typeof n != "string")
1412
- return !1;
1413
- const { pathname: i } = (0, e.parsePath)(n);
1414
- return i === o || i.startsWith(o + "/");
1415
- }
1416
- }(Ge)), Ge;
1417
- }
1418
- var Ht;
1419
- function Wn() {
1420
- return Ht || (Ht = 1, function(t, e) {
1421
- Object.defineProperty(e, "__esModule", {
1422
- value: !0
1423
- }), Object.defineProperty(e, "hasBasePath", {
1424
- enumerable: !0,
1425
- get: function() {
1426
- return o;
1427
- }
1428
- });
1429
- const r = rn(), n = process.env.__NEXT_ROUTER_BASEPATH || "";
1430
- function o(i) {
1431
- return (0, r.pathHasPrefix)(i, n);
1432
- }
1433
- (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
1434
- }(ye, ye.exports)), ye.exports;
1435
- }
1436
- var Gt;
1437
- function nn() {
1438
- return Gt || (Gt = 1, function(t) {
1439
- Object.defineProperty(t, "__esModule", {
1440
- value: !0
1441
- }), Object.defineProperty(t, "isLocalURL", {
1442
- enumerable: !0,
1443
- get: function() {
1444
- return n;
1445
- }
1446
- });
1447
- const e = Ce(), r = Wn();
1448
- function n(o) {
1449
- if (!(0, e.isAbsoluteUrl)(o)) return !0;
1450
- try {
1451
- const i = (0, e.getLocationOrigin)(), s = new URL(o, i);
1452
- return s.origin === i && (0, r.hasBasePath)(s.pathname);
1453
- } catch {
1454
- return !1;
1455
- }
1456
- }
1457
- }(He)), He;
1458
- }
1459
- var $e = {}, Ke = {}, $t;
1460
- function Hn() {
1461
- return $t || ($t = 1, function(t) {
1462
- Object.defineProperty(t, "__esModule", {
1463
- value: !0
1464
- }), Object.defineProperty(t, "getSortedRoutes", {
1465
- enumerable: !0,
1466
- get: function() {
1467
- return r;
1468
- }
1469
- });
1470
- class e {
1471
- insert(o) {
1472
- this._insert(o.split("/").filter(Boolean), [], !1);
1473
- }
1474
- smoosh() {
1475
- return this._smoosh();
1476
- }
1477
- _smoosh(o) {
1478
- o === void 0 && (o = "/");
1479
- const i = [
1480
- ...this.children.keys()
1481
- ].sort();
1482
- this.slugName !== null && i.splice(i.indexOf("[]"), 1), this.restSlugName !== null && i.splice(i.indexOf("[...]"), 1), this.optionalRestSlugName !== null && i.splice(i.indexOf("[[...]]"), 1);
1483
- const s = i.map((a) => this.children.get(a)._smoosh("" + o + a + "/")).reduce((a, u) => [
1484
- ...a,
1485
- ...u
1486
- ], []);
1487
- if (this.slugName !== null && s.push(...this.children.get("[]")._smoosh(o + "[" + this.slugName + "]/")), !this.placeholder) {
1488
- const a = o === "/" ? "/" : o.slice(0, -1);
1489
- if (this.optionalRestSlugName != null)
1490
- throw new Error('You cannot define a route with the same specificity as a optional catch-all route ("' + a + '" and "' + a + "[[..." + this.optionalRestSlugName + ']]").');
1491
- s.unshift(a);
1492
- }
1493
- return this.restSlugName !== null && s.push(...this.children.get("[...]")._smoosh(o + "[..." + this.restSlugName + "]/")), this.optionalRestSlugName !== null && s.push(...this.children.get("[[...]]")._smoosh(o + "[[..." + this.optionalRestSlugName + "]]/")), s;
1494
- }
1495
- _insert(o, i, s) {
1496
- if (o.length === 0) {
1497
- this.placeholder = !1;
1498
- return;
1499
- }
1500
- if (s)
1501
- throw new Error("Catch-all must be the last part of the URL.");
1502
- let a = o[0];
1503
- if (a.startsWith("[") && a.endsWith("]")) {
1504
- let f = function(d, c) {
1505
- if (d !== null && d !== c)
1506
- throw new Error("You cannot use different slug names for the same dynamic path ('" + d + "' !== '" + c + "').");
1507
- i.forEach((p) => {
1508
- if (p === c)
1509
- throw new Error('You cannot have the same slug name "' + c + '" repeat within a single dynamic path');
1510
- if (p.replace(/\W/g, "") === a.replace(/\W/g, ""))
1511
- throw new Error('You cannot have the slug names "' + p + '" and "' + c + '" differ only by non-word symbols within a single dynamic path');
1512
- }), i.push(c);
1513
- }, u = a.slice(1, -1), l = !1;
1514
- if (u.startsWith("[") && u.endsWith("]") && (u = u.slice(1, -1), l = !0), u.startsWith("...") && (u = u.substring(3), s = !0), u.startsWith("[") || u.endsWith("]"))
1515
- throw new Error("Segment names may not start or end with extra brackets ('" + u + "').");
1516
- if (u.startsWith("."))
1517
- throw new Error("Segment names may not start with erroneous periods ('" + u + "').");
1518
- if (s)
1519
- if (l) {
1520
- if (this.restSlugName != null)
1521
- throw new Error('You cannot use both an required and optional catch-all route at the same level ("[...' + this.restSlugName + ']" and "' + o[0] + '" ).');
1522
- f(this.optionalRestSlugName, u), this.optionalRestSlugName = u, a = "[[...]]";
1523
- } else {
1524
- if (this.optionalRestSlugName != null)
1525
- throw new Error('You cannot use both an optional and required catch-all route at the same level ("[[...' + this.optionalRestSlugName + ']]" and "' + o[0] + '").');
1526
- f(this.restSlugName, u), this.restSlugName = u, a = "[...]";
1527
- }
1528
- else {
1529
- if (l)
1530
- throw new Error('Optional route parameters are not yet supported ("' + o[0] + '").');
1531
- f(this.slugName, u), this.slugName = u, a = "[]";
1532
- }
1533
- }
1534
- this.children.has(a) || this.children.set(a, new e()), this.children.get(a)._insert(o.slice(1), i, s);
1535
- }
1536
- constructor() {
1537
- this.placeholder = !0, this.children = /* @__PURE__ */ new Map(), this.slugName = null, this.restSlugName = null, this.optionalRestSlugName = null;
1538
- }
1539
- }
1540
- function r(n) {
1541
- const o = new e();
1542
- return n.forEach((i) => o.insert(i)), o.smoosh();
1543
- }
1544
- }(Ke)), Ke;
1545
- }
1546
- var Qe = {}, Kt;
1547
- function Gn() {
1548
- return Kt || (Kt = 1, function(t) {
1549
- Object.defineProperty(t, "__esModule", {
1550
- value: !0
1551
- }), Object.defineProperty(t, "isDynamicRoute", {
1552
- enumerable: !0,
1553
- get: function() {
1554
- return r;
1555
- }
1556
- });
1557
- const e = /\/\[[^/]+?\](?=\/|$)/;
1558
- function r(n) {
1559
- return e.test(n);
1560
- }
1561
- }(Qe)), Qe;
1562
- }
1563
- var Qt;
1564
- function $n() {
1565
- return Qt || (Qt = 1, function(t) {
1566
- Object.defineProperty(t, "__esModule", {
1567
- value: !0
1568
- });
1569
- function e(o, i) {
1570
- for (var s in i) Object.defineProperty(o, s, {
1571
- enumerable: !0,
1572
- get: i[s]
1573
- });
1574
- }
1575
- e(t, {
1576
- getSortedRoutes: function() {
1577
- return r.getSortedRoutes;
1578
- },
1579
- isDynamicRoute: function() {
1580
- return n.isDynamicRoute;
1581
- }
1582
- });
1583
- const r = Hn(), n = Gn();
1584
- }($e)), $e;
1585
- }
1586
- var Xe = {}, Ye = {}, Xt;
1587
- function Kn() {
1588
- return Xt || (Xt = 1, function(t) {
1589
- Object.defineProperty(t, "__esModule", {
1590
- value: !0
1591
- }), Object.defineProperty(t, "getRouteMatcher", {
1592
- enumerable: !0,
1593
- get: function() {
1594
- return r;
1595
- }
1596
- });
1597
- const e = Ce();
1598
- function r(n) {
1599
- let { re: o, groups: i } = n;
1600
- return (s) => {
1601
- const a = o.exec(s);
1602
- if (!a)
1603
- return !1;
1604
- const u = (f) => {
1605
- try {
1606
- return decodeURIComponent(f);
1607
- } catch {
1608
- throw new e.DecodeError("failed to decode param");
1609
- }
1610
- }, l = {};
1611
- return Object.keys(i).forEach((f) => {
1612
- const d = i[f], c = a[d.pos];
1613
- c !== void 0 && (l[f] = ~c.indexOf("/") ? c.split("/").map((p) => u(p)) : d.repeat ? [
1614
- u(c)
1615
- ] : u(c));
1616
- }), l;
1617
- };
1618
- }
1619
- }(Ye)), Ye;
1620
- }
1621
- var Je = {}, Ze = {}, et = {}, tt = {}, Yt;
1622
- function Qn() {
1623
- return Yt || (Yt = 1, function(t) {
1624
- Object.defineProperty(t, "__esModule", {
1625
- value: !0
1626
- }), Object.defineProperty(t, "ensureLeadingSlash", {
1627
- enumerable: !0,
1628
- get: function() {
1629
- return e;
1630
- }
1631
- });
1632
- function e(r) {
1633
- return r.startsWith("/") ? r : "/" + r;
1634
- }
1635
- }(tt)), tt;
1636
- }
1637
- var rt = {}, Jt;
1638
- function Xn() {
1639
- return Jt || (Jt = 1, function(t) {
1640
- Object.defineProperty(t, "__esModule", {
1641
- value: !0
1642
- }), Object.defineProperty(t, "isGroupSegment", {
1643
- enumerable: !0,
1644
- get: function() {
1645
- return e;
1646
- }
1647
- });
1648
- function e(r) {
1649
- return r[0] === "(" && r.endsWith(")");
1650
- }
1651
- }(rt)), rt;
1652
- }
1653
- var Zt;
1654
- function Yn() {
1655
- return Zt || (Zt = 1, function(t) {
1656
- Object.defineProperty(t, "__esModule", {
1657
- value: !0
1658
- });
1659
- function e(s, a) {
1660
- for (var u in a) Object.defineProperty(s, u, {
1661
- enumerable: !0,
1662
- get: a[u]
1663
- });
1664
- }
1665
- e(t, {
1666
- normalizeAppPath: function() {
1667
- return o;
1668
- },
1669
- normalizeRscPath: function() {
1670
- return i;
1671
- }
1672
- });
1673
- const r = Qn(), n = Xn();
1674
- function o(s) {
1675
- return (0, r.ensureLeadingSlash)(s.split("/").reduce((a, u, l, f) => !u || (0, n.isGroupSegment)(u) || u[0] === "@" || (u === "page" || u === "route") && l === f.length - 1 ? a : a + "/" + u, ""));
1676
- }
1677
- function i(s, a) {
1678
- return a ? s.replace(
1679
- /\.rsc($|\?)/,
1680
- // $1 ensures `?` is preserved
1681
- "$1"
1682
- ) : s;
1683
- }
1684
- }(et)), et;
1685
- }
1686
- var er;
1687
- function Jn() {
1688
- return er || (er = 1, function(t) {
1689
- Object.defineProperty(t, "__esModule", {
1690
- value: !0
1691
- });
1692
- function e(s, a) {
1693
- for (var u in a) Object.defineProperty(s, u, {
1694
- enumerable: !0,
1695
- get: a[u]
1696
- });
1697
- }
1698
- e(t, {
1699
- INTERCEPTION_ROUTE_MARKERS: function() {
1700
- return n;
1701
- },
1702
- isInterceptionRouteAppPath: function() {
1703
- return o;
1704
- },
1705
- extractInterceptionRouteInformation: function() {
1706
- return i;
1707
- }
1708
- });
1709
- const r = Yn(), n = [
1710
- "(..)(..)",
1711
- "(.)",
1712
- "(..)",
1713
- "(...)"
1714
- ];
1715
- function o(s) {
1716
- return s.split("/").find((a) => n.find((u) => a.startsWith(u))) !== void 0;
1717
- }
1718
- function i(s) {
1719
- let a, u, l;
1720
- for (const f of s.split("/"))
1721
- if (u = n.find((d) => f.startsWith(d)), u) {
1722
- [a, l] = s.split(u, 2);
1723
- break;
1724
- }
1725
- if (!a || !u || !l)
1726
- throw new Error(`Invalid interception route: ${s}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`);
1727
- switch (a = (0, r.normalizeAppPath)(a), u) {
1728
- case "(.)":
1729
- a === "/" ? l = `/${l}` : l = a + "/" + l;
1730
- break;
1731
- case "(..)":
1732
- if (a === "/")
1733
- throw new Error(`Invalid interception route: ${s}. Cannot use (..) marker at the root level, use (.) instead.`);
1734
- l = a.split("/").slice(0, -1).concat(l).join("/");
1735
- break;
1736
- case "(...)":
1737
- l = "/" + l;
1738
- break;
1739
- case "(..)(..)":
1740
- const f = a.split("/");
1741
- if (f.length <= 2)
1742
- throw new Error(`Invalid interception route: ${s}. Cannot use (..)(..) marker at the root level or one level up.`);
1743
- l = f.slice(0, -2).concat(l).join("/");
1744
- break;
1745
- default:
1746
- throw new Error("Invariant: unexpected marker");
1747
- }
1748
- return {
1749
- interceptingRoute: a,
1750
- interceptedRoute: l
1751
- };
1752
- }
1753
- }(Ze)), Ze;
1754
- }
1755
- var nt = {}, tr;
1756
- function Zn() {
1757
- return tr || (tr = 1, function(t) {
1758
- Object.defineProperty(t, "__esModule", {
1759
- value: !0
1760
- }), Object.defineProperty(t, "escapeStringRegexp", {
1761
- enumerable: !0,
1762
- get: function() {
1763
- return n;
1764
- }
1765
- });
1766
- const e = /[|\\{}()[\]^$+*?.-]/, r = /[|\\{}()[\]^$+*?.-]/g;
1767
- function n(o) {
1768
- return e.test(o) ? o.replace(r, "\\$&") : o;
1769
- }
1770
- }(nt)), nt;
1771
- }
1772
- var rr;
1773
- function eo() {
1774
- return rr || (rr = 1, function(t) {
1775
- Object.defineProperty(t, "__esModule", {
1776
- value: !0
1777
- });
1778
- function e(m, g) {
1779
- for (var _ in g) Object.defineProperty(m, _, {
1780
- enumerable: !0,
1781
- get: g[_]
1782
- });
1783
- }
1784
- e(t, {
1785
- getRouteRegex: function() {
1786
- return l;
1787
- },
1788
- getNamedRouteRegex: function() {
1789
- return p;
1790
- },
1791
- getNamedMiddlewareRegex: function() {
1792
- return y;
1793
- }
1794
- });
1795
- const r = Jn(), n = Zn(), o = tn(), i = "nxtP", s = "nxtI";
1796
- function a(m) {
1797
- const g = m.startsWith("[") && m.endsWith("]");
1798
- g && (m = m.slice(1, -1));
1799
- const _ = m.startsWith("...");
1800
- return _ && (m = m.slice(3)), {
1801
- key: m,
1802
- repeat: _,
1803
- optional: g
1804
- };
1805
- }
1806
- function u(m) {
1807
- const g = (0, o.removeTrailingSlash)(m).slice(1).split("/"), _ = {};
1808
- let w = 1;
1809
- return {
1810
- parameterizedRoute: g.map((b) => {
1811
- const h = r.INTERCEPTION_ROUTE_MARKERS.find((v) => b.startsWith(v)), P = b.match(/\[((?:\[.*\])|.+)\]/);
1812
- if (h && P) {
1813
- const { key: v, optional: R, repeat: O } = a(P[1]);
1814
- return _[v] = {
1815
- pos: w++,
1816
- repeat: O,
1817
- optional: R
1818
- }, "/" + (0, n.escapeStringRegexp)(h) + "([^/]+?)";
1819
- } else if (P) {
1820
- const { key: v, repeat: R, optional: O } = a(P[1]);
1821
- return _[v] = {
1822
- pos: w++,
1823
- repeat: R,
1824
- optional: O
1825
- }, R ? O ? "(?:/(.+?))?" : "/(.+?)" : "/([^/]+?)";
1826
- } else
1827
- return "/" + (0, n.escapeStringRegexp)(b);
1828
- }).join(""),
1829
- groups: _
1830
- };
1831
- }
1832
- function l(m) {
1833
- const { parameterizedRoute: g, groups: _ } = u(m);
1834
- return {
1835
- re: new RegExp("^" + g + "(?:/)?$"),
1836
- groups: _
1837
- };
1838
- }
1839
- function f() {
1840
- let m = 0;
1841
- return () => {
1842
- let g = "", _ = ++m;
1843
- for (; _ > 0; )
1844
- g += String.fromCharCode(97 + (_ - 1) % 26), _ = Math.floor((_ - 1) / 26);
1845
- return g;
1846
- };
1847
- }
1848
- function d(m) {
1849
- let { getSafeRouteKey: g, segment: _, routeKeys: w, keyPrefix: b } = m;
1850
- const { key: h, optional: P, repeat: v } = a(_);
1851
- let R = h.replace(/\W/g, "");
1852
- b && (R = "" + b + R);
1853
- let O = !1;
1854
- return (R.length === 0 || R.length > 30) && (O = !0), isNaN(parseInt(R.slice(0, 1))) || (O = !0), O && (R = g()), b ? w[R] = "" + b + h : w[R] = "" + h, v ? P ? "(?:/(?<" + R + ">.+?))?" : "/(?<" + R + ">.+?)" : "/(?<" + R + ">[^/]+?)";
1855
- }
1856
- function c(m, g) {
1857
- const _ = (0, o.removeTrailingSlash)(m).slice(1).split("/"), w = f(), b = {};
1858
- return {
1859
- namedParameterizedRoute: _.map((h) => {
1860
- const P = r.INTERCEPTION_ROUTE_MARKERS.some((R) => h.startsWith(R)), v = h.match(/\[((?:\[.*\])|.+)\]/);
1861
- return P && v ? d({
1862
- getSafeRouteKey: w,
1863
- segment: v[1],
1864
- routeKeys: b,
1865
- keyPrefix: g ? s : void 0
1866
- }) : v ? d({
1867
- getSafeRouteKey: w,
1868
- segment: v[1],
1869
- routeKeys: b,
1870
- keyPrefix: g ? i : void 0
1871
- }) : "/" + (0, n.escapeStringRegexp)(h);
1872
- }).join(""),
1873
- routeKeys: b
1874
- };
1875
- }
1876
- function p(m, g) {
1877
- const _ = c(m, g);
1878
- return {
1879
- ...l(m),
1880
- namedRegex: "^" + _.namedParameterizedRoute + "(?:/)?$",
1881
- routeKeys: _.routeKeys
1882
- };
1883
- }
1884
- function y(m, g) {
1885
- const { parameterizedRoute: _ } = u(m), { catchAll: w = !0 } = g;
1886
- if (_ === "/")
1887
- return {
1888
- namedRegex: "^/" + (w ? ".*" : "") + "$"
1889
- };
1890
- const { namedParameterizedRoute: b } = c(m, !1);
1891
- let h = w ? "(?:(/.*)?)" : "";
1892
- return {
1893
- namedRegex: "^" + b + h + "$"
1894
- };
1895
- }
1896
- }(Je)), Je;
1897
- }
1898
- var nr;
1899
- function to() {
1900
- return nr || (nr = 1, function(t) {
1901
- Object.defineProperty(t, "__esModule", {
1902
- value: !0
1903
- }), Object.defineProperty(t, "interpolateAs", {
1904
- enumerable: !0,
1905
- get: function() {
1906
- return n;
1907
- }
1908
- });
1909
- const e = Kn(), r = eo();
1910
- function n(o, i, s) {
1911
- let a = "";
1912
- const u = (0, r.getRouteRegex)(o), l = u.groups, f = (
1913
- // Try to match the dynamic route against the asPath
1914
- (i !== o ? (0, e.getRouteMatcher)(u)(i) : "") || // Fall back to reading the values from the href
1915
- // TODO: should this take priority; also need to change in the router.
1916
- s
1917
- );
1918
- a = o;
1919
- const d = Object.keys(l);
1920
- return d.every((c) => {
1921
- let p = f[c] || "";
1922
- const { repeat: y, optional: m } = l[c];
1923
- let g = "[" + (y ? "..." : "") + c + "]";
1924
- return m && (g = (p ? "" : "/") + "[" + g + "]"), y && !Array.isArray(p) && (p = [
1925
- p
1926
- ]), (m || c in f) && // Interpolate group into data URL if present
1927
- (a = a.replace(g, y ? p.map(
1928
- // these values should be fully encoded instead of just
1929
- // path delimiter escaped since they are being inserted
1930
- // into the URL and we expect URL encoded segments
1931
- // when parsing dynamic route params
1932
- (_) => encodeURIComponent(_)
1933
- ).join("/") : encodeURIComponent(p)) || "/");
1934
- }) || (a = ""), {
1935
- params: d,
1936
- result: a
1937
- };
1938
- }
1939
- }(Xe)), Xe;
1940
- }
1941
- var or;
1942
- function ro() {
1943
- return or || (or = 1, function(t, e) {
1944
- Object.defineProperty(e, "__esModule", {
1945
- value: !0
1946
- }), Object.defineProperty(e, "resolveHref", {
1947
- enumerable: !0,
1948
- get: function() {
1949
- return f;
1950
- }
1951
- });
1952
- const r = Zr(), n = en(), o = Fn(), i = Ce(), s = Ae(), a = nn(), u = $n(), l = to();
1953
- function f(d, c, p) {
1954
- let y, m = typeof c == "string" ? c : (0, n.formatWithValidation)(c);
1955
- const g = m.match(/^[a-zA-Z]{1,}:\/\//), _ = g ? m.slice(g[0].length) : m;
1956
- if ((_.split("?")[0] || "").match(/(\/\/|\\)/)) {
1957
- console.error("Invalid href '" + m + "' passed to next/router in page: '" + d.pathname + "'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");
1958
- const b = (0, i.normalizeRepeatedSlashes)(_);
1959
- m = (g ? g[0] : "") + b;
1960
- }
1961
- if (!(0, a.isLocalURL)(m))
1962
- return p ? [
1963
- m
1964
- ] : m;
1965
- try {
1966
- y = new URL(m.startsWith("#") ? d.asPath : d.pathname, "http://n");
1967
- } catch {
1968
- y = new URL("/", "http://n");
1969
- }
1970
- try {
1971
- const b = new URL(m, y);
1972
- b.pathname = (0, s.normalizePathTrailingSlash)(b.pathname);
1973
- let h = "";
1974
- if ((0, u.isDynamicRoute)(b.pathname) && b.searchParams && p) {
1975
- const v = (0, r.searchParamsToUrlQuery)(b.searchParams), { result: R, params: O } = (0, l.interpolateAs)(b.pathname, b.pathname, v);
1976
- R && (h = (0, n.formatWithValidation)({
1977
- pathname: R,
1978
- hash: b.hash,
1979
- query: (0, o.omit)(v, O)
1980
- }));
1981
- }
1982
- const P = b.origin === y.origin ? b.href.slice(b.origin.length) : b.href;
1983
- return p ? [
1984
- P,
1985
- h || P
1986
- ] : P;
1987
- } catch {
1988
- return p ? [
1989
- m
1990
- ] : m;
1991
- }
1992
- }
1993
- (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
1994
- }(me, me.exports)), me.exports;
1995
- }
1996
- var _e = { exports: {} }, ot = {}, it = {}, ir;
1997
- function on() {
1998
- return ir || (ir = 1, function(t) {
1999
- Object.defineProperty(t, "__esModule", {
2000
- value: !0
2001
- }), Object.defineProperty(t, "addPathPrefix", {
2002
- enumerable: !0,
2003
- get: function() {
2004
- return r;
2005
- }
2006
- });
2007
- const e = Pt();
2008
- function r(n, o) {
2009
- if (!n.startsWith("/") || !o)
2010
- return n;
2011
- const { pathname: i, query: s, hash: a } = (0, e.parsePath)(n);
2012
- return "" + o + i + s + a;
2013
- }
2014
- }(it)), it;
2015
- }
2016
- var ar;
2017
- function no() {
2018
- return ar || (ar = 1, function(t) {
2019
- Object.defineProperty(t, "__esModule", {
2020
- value: !0
2021
- }), Object.defineProperty(t, "addLocale", {
2022
- enumerable: !0,
2023
- get: function() {
2024
- return n;
2025
- }
2026
- });
2027
- const e = on(), r = rn();
2028
- function n(o, i, s, a) {
2029
- if (!i || i === s) return o;
2030
- const u = o.toLowerCase();
2031
- return !a && ((0, r.pathHasPrefix)(u, "/api") || (0, r.pathHasPrefix)(u, "/" + i.toLowerCase())) ? o : (0, e.addPathPrefix)(o, "/" + i);
2032
- }
2033
- }(ot)), ot;
2034
- }
2035
- var sr;
2036
- function oo() {
2037
- return sr || (sr = 1, function(t, e) {
2038
- Object.defineProperty(e, "__esModule", {
2039
- value: !0
2040
- }), Object.defineProperty(e, "addLocale", {
2041
- enumerable: !0,
2042
- get: function() {
2043
- return n;
2044
- }
2045
- });
2046
- const r = Ae(), n = function(o) {
2047
- for (var i = arguments.length, s = new Array(i > 1 ? i - 1 : 0), a = 1; a < i; a++)
2048
- s[a - 1] = arguments[a];
2049
- return process.env.__NEXT_I18N_SUPPORT ? (0, r.normalizePathTrailingSlash)(no().addLocale(o, ...s)) : o;
2050
- };
2051
- (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
2052
- }(_e, _e.exports)), _e.exports;
2053
- }
2054
- var at = {}, ur;
2055
- function io() {
2056
- return ur || (ur = 1, function(t) {
2057
- Object.defineProperty(t, "__esModule", {
2058
- value: !0
2059
- }), Object.defineProperty(t, "RouterContext", {
2060
- enumerable: !0,
2061
- get: function() {
2062
- return n;
2063
- }
2064
- });
2065
- const n = (/* @__PURE__ */ ce._(Se)).default.createContext(null);
2066
- process.env.NODE_ENV !== "production" && (n.displayName = "RouterContext");
2067
- }(at)), at;
2068
- }
2069
- var st = {}, cr;
2070
- function ao() {
2071
- return cr || (cr = 1, function(t) {
2072
- "use client";
2073
- Object.defineProperty(t, "__esModule", {
2074
- value: !0
2075
- });
2076
- function e(l, f) {
2077
- for (var d in f) Object.defineProperty(l, d, {
2078
- enumerable: !0,
2079
- get: f[d]
2080
- });
2081
- }
2082
- e(t, {
2083
- CacheStates: function() {
2084
- return o;
2085
- },
2086
- AppRouterContext: function() {
2087
- return i;
2088
- },
2089
- LayoutRouterContext: function() {
2090
- return s;
2091
- },
2092
- GlobalLayoutRouterContext: function() {
2093
- return a;
2094
- },
2095
- TemplateContext: function() {
2096
- return u;
2097
- }
2098
- });
2099
- const n = /* @__PURE__ */ ce._(Se);
2100
- var o;
2101
- (function(l) {
2102
- l.LAZY_INITIALIZED = "LAZYINITIALIZED", l.DATA_FETCH = "DATAFETCH", l.READY = "READY";
2103
- })(o || (o = {}));
2104
- const i = n.default.createContext(null), s = n.default.createContext(null), a = n.default.createContext(null), u = n.default.createContext(null);
2105
- process.env.NODE_ENV !== "production" && (i.displayName = "AppRouterContext", s.displayName = "LayoutRouterContext", a.displayName = "GlobalLayoutRouterContext", u.displayName = "TemplateContext");
2106
- }(st)), st;
2107
- }
2108
- var ve = { exports: {} }, be = { exports: {} }, lr;
2109
- function so() {
2110
- return lr || (lr = 1, function(t, e) {
2111
- Object.defineProperty(e, "__esModule", {
2112
- value: !0
2113
- });
2114
- function r(i, s) {
2115
- for (var a in s) Object.defineProperty(i, a, {
2116
- enumerable: !0,
2117
- get: s[a]
2118
- });
2119
- }
2120
- r(e, {
2121
- requestIdleCallback: function() {
2122
- return n;
2123
- },
2124
- cancelIdleCallback: function() {
2125
- return o;
2126
- }
2127
- });
2128
- const n = typeof self < "u" && self.requestIdleCallback && self.requestIdleCallback.bind(window) || function(i) {
2129
- let s = Date.now();
2130
- return self.setTimeout(function() {
2131
- i({
2132
- didTimeout: !1,
2133
- timeRemaining: function() {
2134
- return Math.max(0, 50 - (Date.now() - s));
2135
- }
2136
- });
2137
- }, 1);
2138
- }, o = typeof self < "u" && self.cancelIdleCallback && self.cancelIdleCallback.bind(window) || function(i) {
2139
- return clearTimeout(i);
2140
- };
2141
- (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
2142
- }(be, be.exports)), be.exports;
2143
- }
2144
- var dr;
2145
- function uo() {
2146
- return dr || (dr = 1, function(t, e) {
2147
- Object.defineProperty(e, "__esModule", {
2148
- value: !0
2149
- }), Object.defineProperty(e, "useIntersection", {
2150
- enumerable: !0,
2151
- get: function() {
2152
- return l;
2153
- }
2154
- });
2155
- const r = Se, n = so(), o = typeof IntersectionObserver == "function", i = /* @__PURE__ */ new Map(), s = [];
2156
- function a(f) {
2157
- const d = {
2158
- root: f.root || null,
2159
- margin: f.rootMargin || ""
2160
- }, c = s.find((g) => g.root === d.root && g.margin === d.margin);
2161
- let p;
2162
- if (c && (p = i.get(c), p))
2163
- return p;
2164
- const y = /* @__PURE__ */ new Map(), m = new IntersectionObserver((g) => {
2165
- g.forEach((_) => {
2166
- const w = y.get(_.target), b = _.isIntersecting || _.intersectionRatio > 0;
2167
- w && b && w(b);
2168
- });
2169
- }, f);
2170
- return p = {
2171
- id: d,
2172
- observer: m,
2173
- elements: y
2174
- }, s.push(d), i.set(d, p), p;
2175
- }
2176
- function u(f, d, c) {
2177
- const { id: p, observer: y, elements: m } = a(c);
2178
- return m.set(f, d), y.observe(f), function() {
2179
- if (m.delete(f), y.unobserve(f), m.size === 0) {
2180
- y.disconnect(), i.delete(p);
2181
- const _ = s.findIndex((w) => w.root === p.root && w.margin === p.margin);
2182
- _ > -1 && s.splice(_, 1);
2183
- }
2184
- };
2185
- }
2186
- function l(f) {
2187
- let { rootRef: d, rootMargin: c, disabled: p } = f;
2188
- const y = p || !o, [m, g] = (0, r.useState)(!1), _ = (0, r.useRef)(null), w = (0, r.useCallback)((h) => {
2189
- _.current = h;
2190
- }, []);
2191
- (0, r.useEffect)(() => {
2192
- if (o) {
2193
- if (y || m) return;
2194
- const h = _.current;
2195
- if (h && h.tagName)
2196
- return u(h, (v) => v && g(v), {
2197
- root: d == null ? void 0 : d.current,
2198
- rootMargin: c
2199
- });
2200
- } else if (!m) {
2201
- const h = (0, n.requestIdleCallback)(() => g(!0));
2202
- return () => (0, n.cancelIdleCallback)(h);
2203
- }
2204
- }, [
2205
- y,
2206
- c,
2207
- d,
2208
- m,
2209
- _.current
2210
- ]);
2211
- const b = (0, r.useCallback)(() => {
2212
- g(!1);
2213
- }, []);
2214
- return [
2215
- w,
2216
- m,
2217
- b
2218
- ];
2219
- }
2220
- (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
2221
- }(ve, ve.exports)), ve.exports;
2222
- }
2223
- var Pe = { exports: {} }, Re = { exports: {} }, ut = {}, fr;
2224
- function co() {
2225
- return fr || (fr = 1, function(t) {
2226
- Object.defineProperty(t, "__esModule", {
2227
- value: !0
2228
- }), Object.defineProperty(t, "normalizeLocalePath", {
2229
- enumerable: !0,
2230
- get: function() {
2231
- return e;
2232
- }
2233
- });
2234
- function e(r, n) {
2235
- let o;
2236
- const i = r.split("/");
2237
- return (n || []).some((s) => i[1] && i[1].toLowerCase() === s.toLowerCase() ? (o = s, i.splice(1, 1), r = i.join("/") || "/", !0) : !1), {
2238
- pathname: r,
2239
- detectedLocale: o
2240
- };
2241
- }
2242
- }(ut)), ut;
2243
- }
2244
- var pr;
2245
- function lo() {
2246
- return pr || (pr = 1, function(t, e) {
2247
- Object.defineProperty(e, "__esModule", {
2248
- value: !0
2249
- }), Object.defineProperty(e, "normalizeLocalePath", {
2250
- enumerable: !0,
2251
- get: function() {
2252
- return r;
2253
- }
2254
- });
2255
- const r = (n, o) => process.env.__NEXT_I18N_SUPPORT ? co().normalizeLocalePath(n, o) : {
2256
- pathname: n,
2257
- detectedLocale: void 0
2258
- };
2259
- (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
2260
- }(Re, Re.exports)), Re.exports;
2261
- }
2262
- var Ee = { exports: {} }, ct = {}, mr;
2263
- function fo() {
2264
- return mr || (mr = 1, function(t) {
2265
- Object.defineProperty(t, "__esModule", {
2266
- value: !0
2267
- }), Object.defineProperty(t, "detectDomainLocale", {
2268
- enumerable: !0,
2269
- get: function() {
2270
- return e;
2271
- }
2272
- });
2273
- function e(r, n, o) {
2274
- if (r) {
2275
- o && (o = o.toLowerCase());
2276
- for (const a of r) {
2277
- var i, s;
2278
- const u = (i = a.domain) == null ? void 0 : i.split(":")[0].toLowerCase();
2279
- if (n === u || o === a.defaultLocale.toLowerCase() || (s = a.locales) != null && s.some((l) => l.toLowerCase() === o))
2280
- return a;
2281
- }
2282
- }
2283
- }
2284
- }(ct)), ct;
2285
- }
2286
- var hr;
2287
- function po() {
2288
- return hr || (hr = 1, function(t, e) {
2289
- Object.defineProperty(e, "__esModule", {
2290
- value: !0
2291
- }), Object.defineProperty(e, "detectDomainLocale", {
2292
- enumerable: !0,
2293
- get: function() {
2294
- return r;
2295
- }
2296
- });
2297
- const r = function() {
2298
- for (var n = arguments.length, o = new Array(n), i = 0; i < n; i++)
2299
- o[i] = arguments[i];
2300
- if (process.env.__NEXT_I18N_SUPPORT)
2301
- return fo().detectDomainLocale(...o);
2302
- };
2303
- (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
2304
- }(Ee, Ee.exports)), Ee.exports;
2305
- }
2306
- var gr;
2307
- function mo() {
2308
- return gr || (gr = 1, function(t, e) {
2309
- Object.defineProperty(e, "__esModule", {
2310
- value: !0
2311
- }), Object.defineProperty(e, "getDomainLocale", {
2312
- enumerable: !0,
2313
- get: function() {
2314
- return o;
2315
- }
2316
- });
2317
- const r = Ae(), n = process.env.__NEXT_ROUTER_BASEPATH || "";
2318
- function o(i, s, a, u) {
2319
- if (process.env.__NEXT_I18N_SUPPORT) {
2320
- const l = lo().normalizeLocalePath, f = po().detectDomainLocale, d = s || l(i, a).detectedLocale, c = f(u, void 0, d);
2321
- if (c) {
2322
- const p = "http" + (c.http ? "" : "s") + "://", y = d === c.defaultLocale ? "" : "/" + d;
2323
- return "" + p + c.domain + (0, r.normalizePathTrailingSlash)("" + n + y + i);
2324
- }
2325
- return !1;
2326
- } else
2327
- return !1;
2328
- }
2329
- (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
2330
- }(Pe, Pe.exports)), Pe.exports;
2331
- }
2332
- var we = { exports: {} }, yr;
2333
- function ho() {
2334
- return yr || (yr = 1, function(t, e) {
2335
- Object.defineProperty(e, "__esModule", {
2336
- value: !0
2337
- }), Object.defineProperty(e, "addBasePath", {
2338
- enumerable: !0,
2339
- get: function() {
2340
- return i;
2341
- }
2342
- });
2343
- const r = on(), n = Ae(), o = process.env.__NEXT_ROUTER_BASEPATH || "";
2344
- function i(s, a) {
2345
- return (0, n.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH && !a ? s : (0, r.addPathPrefix)(s, o));
2346
- }
2347
- (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
2348
- }(we, we.exports)), we.exports;
2349
- }
2350
- var Ie = { exports: {} }, _r;
2351
- function go() {
2352
- return _r || (_r = 1, function(t, e) {
2353
- Object.defineProperty(e, "__esModule", {
2354
- value: !0
2355
- });
2356
- function r(d, c) {
2357
- for (var p in c) Object.defineProperty(d, p, {
2358
- enumerable: !0,
2359
- get: c[p]
2360
- });
2361
- }
2362
- r(e, {
2363
- PrefetchKind: function() {
2364
- return f;
2365
- },
2366
- ACTION_REFRESH: function() {
2367
- return n;
2368
- },
2369
- ACTION_NAVIGATE: function() {
2370
- return o;
2371
- },
2372
- ACTION_RESTORE: function() {
2373
- return i;
2374
- },
2375
- ACTION_SERVER_PATCH: function() {
2376
- return s;
2377
- },
2378
- ACTION_PREFETCH: function() {
2379
- return a;
2380
- },
2381
- ACTION_FAST_REFRESH: function() {
2382
- return u;
2383
- },
2384
- ACTION_SERVER_ACTION: function() {
2385
- return l;
2386
- }
2387
- });
2388
- const n = "refresh", o = "navigate", i = "restore", s = "server-patch", a = "prefetch", u = "fast-refresh", l = "server-action";
2389
- var f;
2390
- (function(d) {
2391
- d.AUTO = "auto", d.FULL = "full", d.TEMPORARY = "temporary";
2392
- })(f || (f = {})), (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
2393
- }(Ie, Ie.exports)), Ie.exports;
2394
- }
2395
- (function(t, e) {
2396
- "use client";
2397
- Object.defineProperty(e, "__esModule", {
2398
- value: !0
2399
- }), Object.defineProperty(e, "default", {
2400
- enumerable: !0,
2401
- get: function() {
2402
- return P;
2403
- }
2404
- });
2405
- const n = /* @__PURE__ */ ce._(Se), o = ro(), i = nn(), s = en(), a = Ce(), u = oo(), l = io(), f = ao(), d = uo(), c = mo(), p = ho(), y = go(), m = /* @__PURE__ */ new Set();
2406
- function g(v, R, O, T, x, M) {
2407
- if (typeof window > "u" || !M && !(0, i.isLocalURL)(R))
2408
- return;
2409
- if (!T.bypassPrefetchedCheck) {
2410
- const $ = (
2411
- // Let the link's locale prop override the default router locale.
2412
- typeof T.locale < "u" ? T.locale : "locale" in v ? v.locale : void 0
2413
- ), X = R + "%" + O + "%" + $;
2414
- if (m.has(X))
2415
- return;
2416
- m.add(X);
2417
- }
2418
- const J = M ? v.prefetch(R, x) : v.prefetch(R, O, T);
2419
- Promise.resolve(J).catch(($) => {
2420
- if (process.env.NODE_ENV !== "production")
2421
- throw $;
2422
- });
2423
- }
2424
- function _(v) {
2425
- const O = v.currentTarget.getAttribute("target");
2426
- return O && O !== "_self" || v.metaKey || v.ctrlKey || v.shiftKey || v.altKey || // triggers resource download
2427
- v.nativeEvent && v.nativeEvent.which === 2;
2428
- }
2429
- function w(v, R, O, T, x, M, J, $, X, xe) {
2430
- const { nodeName: Le } = v.currentTarget;
2431
- if (Le.toUpperCase() === "A" && (_(v) || // app-router supports external urls out of the box so it shouldn't short-circuit here as support for e.g. `replace` is added in the app-router.
2432
- !X && !(0, i.isLocalURL)(O)))
2433
- return;
2434
- v.preventDefault();
2435
- const z = () => {
2436
- const Z = J ?? !0;
2437
- "beforePopState" in R ? R[x ? "replace" : "push"](O, T, {
2438
- shallow: M,
2439
- locale: $,
2440
- scroll: Z
2441
- }) : R[x ? "replace" : "push"](T || O, {
2442
- forceOptimisticNavigation: !xe,
2443
- scroll: Z
2444
- });
2445
- };
2446
- X ? n.default.startTransition(z) : z();
2447
- }
2448
- function b(v) {
2449
- return typeof v == "string" ? v : (0, s.formatUrl)(v);
2450
- }
2451
- const P = /* @__PURE__ */ n.default.forwardRef(function(R, O) {
2452
- let T;
2453
- const { href: x, as: M, children: J, prefetch: $ = null, passHref: X, replace: xe, shallow: Le, scroll: Et, locale: z, onClick: Z, onMouseEnter: qe, onTouchStart: wt, legacyBehavior: D = !1, ...an } = R;
2454
- T = J, D && (typeof T == "string" || typeof T == "number") && (T = /* @__PURE__ */ n.default.createElement("a", null, T));
2455
- const A = n.default.useContext(l.RouterContext), sn = n.default.useContext(f.AppRouterContext), V = A ?? sn, F = !A, ie = $ !== !1, le = $ === null ? y.PrefetchKind.AUTO : y.PrefetchKind.FULL;
2456
- if (process.env.NODE_ENV !== "production") {
2457
- let S = function(N) {
2458
- return new Error("Failed prop type: The prop `" + N.key + "` expects a " + N.expected + " in `<Link>`, but got `" + N.actual + "` instead." + (typeof window < "u" ? `
2459
- Open your browser's console to view the Component stack trace.` : ""));
2460
- };
2461
- Object.keys({
2462
- href: !0
2463
- }).forEach((N) => {
2464
- if (N === "href" && (R[N] == null || typeof R[N] != "string" && typeof R[N] != "object"))
2465
- throw S({
2466
- key: N,
2467
- expected: "`string` or `object`",
2468
- actual: R[N] === null ? "null" : typeof R[N]
2469
- });
2470
- }), Object.keys({
2471
- as: !0,
2472
- replace: !0,
2473
- scroll: !0,
2474
- shallow: !0,
2475
- passHref: !0,
2476
- prefetch: !0,
2477
- locale: !0,
2478
- onClick: !0,
2479
- onMouseEnter: !0,
2480
- onTouchStart: !0,
2481
- legacyBehavior: !0
2482
- }).forEach((N) => {
2483
- const H = typeof R[N];
2484
- if (N === "as") {
2485
- if (R[N] && H !== "string" && H !== "object")
2486
- throw S({
2487
- key: N,
2488
- expected: "`string` or `object`",
2489
- actual: H
2490
- });
2491
- } else if (N === "locale") {
2492
- if (R[N] && H !== "string")
2493
- throw S({
2494
- key: N,
2495
- expected: "`string`",
2496
- actual: H
2497
- });
2498
- } else if (N === "onClick" || N === "onMouseEnter" || N === "onTouchStart") {
2499
- if (R[N] && H !== "function")
2500
- throw S({
2501
- key: N,
2502
- expected: "`function`",
2503
- actual: H
2504
- });
2505
- } else if ((N === "replace" || N === "scroll" || N === "shallow" || N === "passHref" || N === "prefetch" || N === "legacyBehavior") && R[N] != null && H !== "boolean")
2506
- throw S({
2507
- key: N,
2508
- expected: "`boolean`",
2509
- actual: H
2510
- });
2511
- });
2512
- const Ct = n.default.useRef(!1);
2513
- R.prefetch && !Ct.current && !F && (Ct.current = !0, console.warn("Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://nextjs.org/docs/messages/prefetch-true-deprecated"));
2514
- }
2515
- if (process.env.NODE_ENV !== "production" && F && !M) {
2516
- let S;
2517
- if (typeof x == "string" ? S = x : typeof x == "object" && typeof x.pathname == "string" && (S = x.pathname), S && S.split("/").some((te) => te.startsWith("[") && te.endsWith("]")))
2518
- throw new Error("Dynamic href `" + S + "` found in <Link> while using the `/app` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href");
2519
- }
2520
- const { href: W, as: j } = n.default.useMemo(() => {
2521
- if (!A) {
2522
- const te = b(x);
2523
- return {
2524
- href: te,
2525
- as: M ? b(M) : te
2526
- };
2527
- }
2528
- const [S, ae] = (0, o.resolveHref)(A, x, !0);
2529
- return {
2530
- href: S,
2531
- as: M ? (0, o.resolveHref)(A, M) : ae || S
2532
- };
2533
- }, [
2534
- A,
2535
- x,
2536
- M
2537
- ]), It = n.default.useRef(W), Ot = n.default.useRef(j);
2538
- let L;
2539
- if (D)
2540
- if (process.env.NODE_ENV === "development") {
2541
- Z && console.warn('"onClick" was passed to <Link> with `href` of `' + x + '` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link'), qe && console.warn('"onMouseEnter" was passed to <Link> with `href` of `' + x + '` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link');
2542
- try {
2543
- L = n.default.Children.only(T);
2544
- } catch {
2545
- throw T ? new Error("Multiple children were passed to <Link> with `href` of `" + x + "` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children" + (typeof window < "u" ? `
2546
- Open your browser's console to view the Component stack trace.` : "")) : new Error("No children were passed to <Link> with `href` of `" + x + "` but one child is required https://nextjs.org/docs/messages/link-no-children");
2547
- }
2548
- } else
2549
- L = n.default.Children.only(T);
2550
- else if (process.env.NODE_ENV === "development" && (T == null ? void 0 : T.type) === "a")
2551
- throw new Error(`Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.
2552
- Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`);
2553
- const ee = D ? L && typeof L == "object" && L.ref : O, [St, Nt, Tt] = (0, d.useIntersection)({
2554
- rootMargin: "200px"
2555
- }), un = n.default.useCallback((S) => {
2556
- (Ot.current !== j || It.current !== W) && (Tt(), Ot.current = j, It.current = W), St(S), ee && (typeof ee == "function" ? ee(S) : typeof ee == "object" && (ee.current = S));
2557
- }, [
2558
- j,
2559
- ee,
2560
- W,
2561
- Tt,
2562
- St
2563
- ]);
2564
- n.default.useEffect(() => {
2565
- process.env.NODE_ENV === "production" && V && (!Nt || !ie || g(V, W, j, {
2566
- locale: z
2567
- }, {
2568
- kind: le
2569
- }, F));
2570
- }, [
2571
- j,
2572
- W,
2573
- Nt,
2574
- z,
2575
- ie,
2576
- A == null ? void 0 : A.locale,
2577
- V,
2578
- F,
2579
- le
2580
- ]);
2581
- const de = {
2582
- ref: un,
2583
- onClick(S) {
2584
- if (process.env.NODE_ENV !== "production" && !S)
2585
- throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');
2586
- !D && typeof Z == "function" && Z(S), D && L.props && typeof L.props.onClick == "function" && L.props.onClick(S), V && (S.defaultPrevented || w(S, V, W, j, xe, Le, Et, z, F, ie));
2587
- },
2588
- onMouseEnter(S) {
2589
- !D && typeof qe == "function" && qe(S), D && L.props && typeof L.props.onMouseEnter == "function" && L.props.onMouseEnter(S), V && ((!ie || process.env.NODE_ENV === "development") && F || g(V, W, j, {
2590
- locale: z,
2591
- priority: !0,
2592
- // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
2593
- bypassPrefetchedCheck: !0
2594
- }, {
2595
- kind: le
2596
- }, F));
2597
- },
2598
- onTouchStart(S) {
2599
- !D && typeof wt == "function" && wt(S), D && L.props && typeof L.props.onTouchStart == "function" && L.props.onTouchStart(S), V && (!ie && F || g(V, W, j, {
2600
- locale: z,
2601
- priority: !0,
2602
- // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
2603
- bypassPrefetchedCheck: !0
2604
- }, {
2605
- kind: le
2606
- }, F));
2607
- }
2608
- };
2609
- if ((0, a.isAbsoluteUrl)(j))
2610
- de.href = j;
2611
- else if (!D || X || L.type === "a" && !("href" in L.props)) {
2612
- const S = typeof z < "u" ? z : A == null ? void 0 : A.locale, ae = (A == null ? void 0 : A.isLocaleDomain) && (0, c.getDomainLocale)(j, S, A == null ? void 0 : A.locales, A == null ? void 0 : A.domainLocales);
2613
- de.href = ae || (0, p.addBasePath)((0, u.addLocale)(j, S, A == null ? void 0 : A.defaultLocale));
2614
- }
2615
- return D ? /* @__PURE__ */ n.default.cloneElement(L, de) : /* @__PURE__ */ n.default.createElement("a", {
2616
- ...an,
2617
- ...de
2618
- }, T);
2619
- });
2620
- (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
2621
- })(gt, gt.exports);
2622
- var yo = gt.exports, _o = yo;
2623
- const Rt = /* @__PURE__ */ Un(_o), vo = (t) => {
2624
- const e = t.getBlocksAsArray(), r = [];
2625
- return e.forEach((n) => {
2626
- const o = n.getType(), i = n.getText();
2627
- let s;
2628
- const a = n.getInlineStyleAt(0).toArray();
2629
- a.length > 0 && (s = a.map((l) => {
2630
- switch (l) {
2631
- case "BOLD":
2632
- return "font-weight: bold;";
2633
- case "ITALIC":
2634
- return "font-style: italic;";
2635
- case "UNDERLINE":
2636
- return "text-decoration: underline;";
2637
- default:
2638
- return "";
2639
- }
2640
- }).join(" "));
2641
- const u = {
2642
- type: "p",
2643
- text: i,
2644
- ...s && { styleText: s }
2645
- };
2646
- switch (o) {
2647
- case "header-one":
2648
- u.type = "h1";
2649
- break;
2650
- case "header-two":
2651
- u.type = "h2";
2652
- break;
2653
- case "header-three":
2654
- u.type = "h3";
2655
- break;
2656
- case "unordered-list-item":
2657
- u.type = "li";
2658
- break;
2659
- case "ordered-list-item":
2660
- u.type = "li";
2661
- break;
2662
- case "blockquote":
2663
- u.type = "blockquote";
2664
- break;
2665
- case "code-block":
2666
- u.type = "pre";
2667
- break;
2668
- default:
2669
- u.type = "p";
2670
- }
2671
- r.push(u);
2672
- }), r;
2673
- }, bo = (t, e, r) => {
2674
- t.findEntityRanges((n) => {
2675
- const o = n.getEntity();
2676
- return o === null ? !1 : r.getEntity(o).getType() === "LINK";
2677
- }, e);
2678
- }, yt = (t) => {
2679
- const e = new mn([
2680
- {
2681
- strategy: bo,
2682
- component: Rt
2683
- }
2684
- ]), r = Sr(
2685
- t
2686
- );
2687
- return ft.createWithContent(r, e);
2688
- }, Po = (t) => Sr(t), _t = pn.set(
2689
- "unstyled",
2690
- {
2691
- element: "div",
2692
- aliasedElements: ["div"]
2693
- }
2694
- ), hi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2695
- __proto__: null,
2696
- CREATE_CONTENT: yt,
2697
- EXTENDED_BLOCK_RENDER_MAP: _t,
2698
- GET_CONTENT_STATE: Po,
2699
- convertDraftToHTML: vo
2700
- }, Symbol.toStringTag, { value: "Module" })), vr = {
2701
- "responsive-mobile-flex": "_responsive-mobile-flex_t5bry_2",
2702
- "responsive-desktop-flex": "_responsive-desktop-flex_t5bry_13",
2703
- "responsive-mobile-block": "_responsive-mobile-block_t5bry_24",
2704
- "responsive-desktop-block": "_responsive-desktop-block_t5bry_35"
2705
- }, gi = ({
2706
- slug: t,
2707
- data: e,
2708
- SectionZone: r,
2709
- COMMON_PAGE_COLUMN_GAP: n
2710
- }) => {
2711
- const o = e == null ? void 0 : e.find(
2712
- (f) => {
2713
- var d, c, p, y;
2714
- return ((c = (d = f.config) == null ? void 0 : d.responsive) == null ? void 0 : c.deviceType) === "desktop" && ((y = (p = f.config) == null ? void 0 : p.seo) == null ? void 0 : y.slug) === t;
2715
- }
2716
- ), i = o == null ? void 0 : o.config.responsive.gapCustom, s = o == null ? void 0 : o.config.responsive.gapSections, a = e == null ? void 0 : e.find(
2717
- (f) => {
2718
- var d, c, p, y;
2719
- return ((c = (d = f.config) == null ? void 0 : d.responsive) == null ? void 0 : c.deviceType) === "mobile" && ((y = (p = f.config) == null ? void 0 : p.seo) == null ? void 0 : y.slug) === t;
2720
- }
2721
- ), u = a == null ? void 0 : a.config.responsive.gapCustom, l = a == null ? void 0 : a.config.responsive.gapSections;
2722
- return /* @__PURE__ */ G(B, { children: [
2723
- /* @__PURE__ */ E(
2724
- Oe.Column,
2725
- {
2726
- gap: i && s ? s : n,
2727
- className: Y.classNameConcat(
2728
- vr["responsive-desktop-flex"],
2729
- "utils-column-modifier"
2730
- ),
2731
- children: /* @__PURE__ */ E(r, { data: (o == null ? void 0 : o.sections) ?? [] })
2732
- }
2733
- ),
2734
- /* @__PURE__ */ E(
2735
- Oe.Column,
2736
- {
2737
- gap: u && l ? l : n,
2738
- className: Y.classNameConcat(
2739
- vr["responsive-mobile-flex"],
2740
- "utils-column-modifier"
2741
- ),
2742
- children: /* @__PURE__ */ E(r, { data: (a == null ? void 0 : a.sections) ?? [] })
2743
- }
2744
- )
2745
- ] });
2746
- }, re = (t) => ({
2747
- centro: "center",
2748
- esquerda: "start",
2749
- direita: "end"
2750
- })[t], Ro = ({ expanded: t, content: e }) => /* @__PURE__ */ G("details", { open: t, children: [
2751
- e.textStructureReduced ? /* @__PURE__ */ E("summary", { onClick: (r) => r.preventDefault(), children: /* @__PURE__ */ E(
2752
- Lt,
2753
- {
2754
- editorKey: "draft-editor-1",
2755
- blockRenderMap: _t,
2756
- editorState: e != null && e.textStructureReduced ? yt(JSON.parse(e.textStructureReduced)) : ft.createEmpty(),
2757
- onChange: () => null,
2758
- readOnly: !0
2759
- }
2760
- ) }) : /* @__PURE__ */ E(B, {}),
2761
- e.showTextStructureExpander && e.textStructure ? /* @__PURE__ */ E(B, { children: /* @__PURE__ */ E(
2762
- Lt,
2763
- {
2764
- editorKey: "draft-editor-1",
2765
- blockRenderMap: _t,
2766
- editorState: e.textStructure ? yt(JSON.parse(e.textStructure)) : ft.createEmpty(),
2767
- onChange: () => null,
2768
- readOnly: !0
2769
- }
2770
- ) }) : /* @__PURE__ */ E(B, {})
2771
- ] }), Eo = {
2772
- "draftjs-text-modifier": "_draftjs-text-modifier_1itwm_2"
2773
- }, wo = "_textContentWrapper_1bigo_5", Io = "_textContentSection_1bigo_13", br = {
2774
- "link-modifier": "_link-modifier_1bigo_1",
2775
- textContentWrapper: wo,
2776
- textContentSection: Io
2777
- }, Oo = "_link_w24h0_1", So = "_wrapper_w24h0_98", No = "_text_w24h0_106", lt = {
2778
- link: Oo,
2779
- wrapper: So,
2780
- text: No
2781
- }, To = ({
2782
- children: t,
2783
- adornments: e,
2784
- className: r,
2785
- disableUnderline: n,
2786
- href: o,
2787
- mode: i,
2788
- size: s,
2789
- title: a,
2790
- onClick: u,
2791
- disablePadding: l,
2792
- ...f
2793
- }) => {
2794
- const d = Y.ValidateProp({
2795
- fieldTypes: ue,
2796
- property: s,
2797
- fallback: "medium"
2798
- }), c = Y.ValidateProp({
2799
- fieldTypes: fn,
2800
- property: i,
2801
- fallback: "default"
2802
- });
2803
- return /* @__PURE__ */ E(
2804
- Rt,
2805
- {
2806
- ...f,
2807
- className: Y.classNameConcat(lt.link, r),
2808
- href: o && o.length > 0 ? o : "#",
2809
- "data-size": d,
2810
- "data-variant": c,
2811
- title: a || "NextLink",
2812
- "data-disable-underline": n ?? !1,
2813
- "data-disable-padding": l ?? !0,
2814
- children: /* @__PURE__ */ G("div", { className: lt.wrapper, onClick: u, children: [
2815
- e == null ? void 0 : e.start,
2816
- /* @__PURE__ */ E("p", { className: lt.text, "data-size": d, children: t }),
2817
- e == null ? void 0 : e.end
2818
- ] })
2819
- }
2820
- );
2821
- }, Co = ({
2822
- data: t
2823
- }) => {
2824
- var n;
2825
- const [e, r] = ne(!1);
2826
- return /* @__PURE__ */ E(
2827
- At.Root,
2828
- {
2829
- layoutProps: {
2830
- textRow: {
2831
- alignContent: re(t.textStructureAlignment),
2832
- alignItems: re(t.textStructureAlignment)
2833
- },
2834
- columnWrapper: {
2835
- alignContent: re(t.textStructureAlignment),
2836
- alignItems: re(t.textStructureAlignment)
2837
- }
2838
- },
2839
- adornment: {
2840
- bottom: t.showTextStructureExpander && t.textStructure ? /* @__PURE__ */ E(
2841
- dn,
2842
- {
2843
- variant: "tertiary",
2844
- adornment: {
2845
- end: /* @__PURE__ */ E(xt, { name: e ? "arrow-up" : "arrow-down" })
2846
- },
2847
- onClick: () => r((o) => !o),
2848
- size: "small",
2849
- children: e ? "Ver Menos" : "Ver Mais"
2850
- }
2851
- ) : /* @__PURE__ */ E(B, {})
2852
- },
2853
- children: /* @__PURE__ */ G(
2854
- Oe.Column,
2855
- {
2856
- className: br.textContentWrapper,
2857
- style: {
2858
- alignItems: re(
2859
- t.textStructureAlignment
2860
- )
2861
- },
2862
- children: [
2863
- /* @__PURE__ */ E(
2864
- At.DivWrapper,
2865
- {
2866
- style: {
2867
- textAlign: re(
2868
- t.textStructureAlignment
2869
- )
2870
- },
2871
- mode: t.textStructureMode ?? "default",
2872
- className: Eo["draftjs-text-modifier"],
2873
- children: t.textStructureReduced ? /* @__PURE__ */ E(Ro, { content: t, expanded: e }) : /* @__PURE__ */ E(B, {})
2874
- }
2875
- ),
2876
- t.textStructureButtonLabel ? /* @__PURE__ */ E(
2877
- To,
2878
- {
2879
- mode: t.textStructureMode ?? "default",
2880
- href: t.textStructureButtonHref ?? "#",
2881
- size: t.textStructureButtonSize,
2882
- className: br["link-modifier"],
2883
- adornments: (n = t.textStructureButtonIcon) != null && n.length && t.enableIcon ? { end: /* @__PURE__ */ E(xt, { name: t.textStructureButtonIcon }) } : void 0,
2884
- children: t.textStructureButtonLabel
2885
- }
2886
- ) : /* @__PURE__ */ E(B, {})
2887
- ]
2888
- }
2889
- )
2890
- }
2891
- );
2892
- }, Ao = (t) => ({
2893
- centro: {
2894
- verticalAlignment: "center",
2895
- horizontalAlignment: "center"
2896
- },
2897
- "centro-esquerda": {
2898
- verticalAlignment: "center",
2899
- horizontalAlignment: "start"
2900
- },
2901
- "centro-direita": {
2902
- verticalAlignment: "center",
2903
- horizontalAlignment: "end"
2904
- },
2905
- "superior-centro": {
2906
- verticalAlignment: "start",
2907
- horizontalAlignment: "center"
2908
- },
2909
- "superior-esquerda": {
2910
- verticalAlignment: "start",
2911
- horizontalAlignment: "start"
2912
- },
2913
- "superior-direita": {
2914
- verticalAlignment: "start",
2915
- horizontalAlignment: "end"
2916
- },
2917
- "inferior-centro": {
2918
- verticalAlignment: "end",
2919
- horizontalAlignment: "center"
2920
- },
2921
- "inferior-esquerda": {
2922
- verticalAlignment: "end",
2923
- horizontalAlignment: "start"
2924
- },
2925
- "inferior-direita": {
2926
- verticalAlignment: "end",
2927
- horizontalAlignment: "end"
2928
- }
2929
- })[t], Pr = (t) => ({
2930
- centro: "center",
2931
- esquerda: "start",
2932
- direita: "end"
2933
- })[t], xo = "_image_lypfr_1", Lo = {
2934
- image: xo
2935
- }, qo = ({
2936
- alt: t,
2937
- className: e,
2938
- objectFit: r,
2939
- ...n
2940
- }) => {
2941
- const { nextimage: o } = Jr();
2942
- return /* @__PURE__ */ E(
2943
- o,
2944
- {
2945
- quality: 90,
2946
- ...n,
2947
- alt: t ?? "",
2948
- className: Y.classNameConcat(Lo.image, e),
2949
- "data-object-fit": r ?? "cover"
2950
- }
2951
- );
2952
- }, jo = ({ videoRef: t, ...e }) => /* @__PURE__ */ E("video", { ...e, ref: t, children: /* @__PURE__ */ E("track", { kind: "captions" }) }), Mo = {
2953
- Image: qo,
2954
- Video: jo
2955
- }, Rr = ({
2956
- dateEnd: t,
2957
- dateInit: e,
2958
- TIME_ZONE: r = "America/Sao_Paulo",
2959
- ...n
2960
- }) => {
2961
- const [o, i] = ne(
2962
- zn(
2963
- new qt(Date.now(), r),
2964
- new qt(t, r)
2965
- )
2966
- ), [s, a] = ne(!1);
2967
- oe(() => {
2968
- s || a(!0);
2969
- const l = setInterval(() => {
2970
- if (o <= 0) {
2971
- clearInterval(l);
2972
- return;
2973
- }
2974
- i(o - 1e3);
2975
- }, 1e3);
2976
- return () => {
2977
- clearInterval(l);
2978
- };
2979
- }, [o, i, s]);
2980
- const u = pe(o, "days");
2981
- return s && o > 0 ? /* @__PURE__ */ G(K.Root, { ...n, children: [
2982
- u ? /* @__PURE__ */ G(B, { children: [
2983
- /* @__PURE__ */ E(K.Digit, { label: "dias", value: u }),
2984
- /* @__PURE__ */ E(K.Separator, {})
2985
- ] }) : null,
2986
- /* @__PURE__ */ E(
2987
- K.Digit,
2988
- {
2989
- label: "horas",
2990
- value: pe(o, "hours")
2991
- }
2992
- ),
2993
- /* @__PURE__ */ E(K.Separator, {}),
2994
- /* @__PURE__ */ E(
2995
- K.Digit,
2996
- {
2997
- label: "min",
2998
- value: pe(o, "minutes")
2999
- }
3000
- ),
3001
- /* @__PURE__ */ E(K.Separator, {}),
3002
- /* @__PURE__ */ E(
3003
- K.Digit,
3004
- {
3005
- label: "segs",
3006
- value: pe(o),
3007
- suppressHydrationWarning: !0
3008
- }
3009
- )
3010
- ] }) : /* @__PURE__ */ E(B, {});
3011
- }, Er = {
3012
- "content-modifier": "_content-modifier_16y4u_5",
3013
- "banner-image-wrapper-modifier": "_banner-image-wrapper-modifier_16y4u_13"
3014
- }, wr = ({
3015
- data: t,
3016
- videoUrl: e,
3017
- priority: r,
3018
- videoRef: n,
3019
- ...o
3020
- }) => {
3021
- const {
3022
- video: i,
3023
- image: s,
3024
- imageHref: a,
3025
- imageOpacity: u,
3026
- altImage: l,
3027
- backgroundColor: f,
3028
- position: d,
3029
- contentAlignment: c,
3030
- showTimer: p,
3031
- contentOrder: y,
3032
- timerMode: m,
3033
- timerEnd: g,
3034
- timerInit: _,
3035
- textStructure: w,
3036
- textStructureReduced: b
3037
- } = t.banner, h = (a == null ? void 0 : a.trim()) || (s == null ? void 0 : s.trim()) || null, { nextimage: P } = Jr();
3038
- return /* @__PURE__ */ G(ke.Container, { ...o, children: [
3039
- /* @__PURE__ */ G(
3040
- ke.ImageWrapper,
3041
- {
3042
- className: Er["banner-image-wrapper-modifier"],
3043
- style: u ? { background: f } : void 0,
3044
- children: [
3045
- i && /* @__PURE__ */ E(
3046
- Mo.Video,
3047
- {
3048
- videoRef: n,
3049
- src: e,
3050
- autoPlay: r,
3051
- loop: !0,
3052
- playsInline: !0,
3053
- muted: !0
3054
- }
3055
- ),
3056
- h && !(i != null && i.length) && /* @__PURE__ */ E(
3057
- P,
3058
- {
3059
- src: h,
3060
- width: "1920",
3061
- height: "1080",
3062
- alt: l ?? s ?? "",
3063
- ...r ? { priority: r } : {},
3064
- style: u ? { opacity: "0" } : void 0
3065
- }
3066
- ),
3067
- !s && !(i != null && i.length) && /* @__PURE__ */ E(
3068
- "div",
3069
- {
3070
- style: {
3071
- background: f
3072
- }
3073
- }
3074
- )
3075
- ]
3076
- }
3077
- ),
3078
- p || b || w ? /* @__PURE__ */ E(
3079
- ke.Slot,
3080
- {
3081
- ...Ao(d ?? "centro"),
3082
- className: Er["content-modifier"],
3083
- style: {
3084
- textAlign: Pr(
3085
- c
3086
- )
3087
- },
3088
- children: /* @__PURE__ */ G(
3089
- Oe.Column,
3090
- {
3091
- gap: "16px",
3092
- alignItems: Pr(c),
3093
- children: [
3094
- p && y === "timer-first" && /* @__PURE__ */ E(
3095
- Rr,
3096
- {
3097
- mode: m ?? "default",
3098
- size: "small",
3099
- dateEnd: g ? new Date(g) : /* @__PURE__ */ new Date(),
3100
- dateInit: _ ? new Date(_) : /* @__PURE__ */ new Date()
3101
- }
3102
- ),
3103
- /* @__PURE__ */ E(Co, { data: t.banner }),
3104
- p && y !== "timer-first" && /* @__PURE__ */ E(
3105
- Rr,
3106
- {
3107
- mode: m ?? "default",
3108
- size: "small",
3109
- dateEnd: g ? new Date(g) : /* @__PURE__ */ new Date(),
3110
- dateInit: _ ? new Date(_) : /* @__PURE__ */ new Date()
3111
- }
3112
- )
3113
- ]
3114
- }
3115
- )
3116
- }
3117
- ) : /* @__PURE__ */ E(B, {})
3118
- ] });
3119
- }, Do = {
3120
- "observer-wrapper": "_observer-wrapper_r43gk_1"
3121
- };
3122
- function ko(t, e, r) {
3123
- const [n, o] = ne(!1), { threshold: i } = r || {};
3124
- return oe(() => {
3125
- if (!t.current)
3126
- return () => {
3127
- };
3128
- let s = null;
3129
- const a = new IntersectionObserver(
3130
- ([u]) => {
3131
- if (r != null && r.delay) {
3132
- s && clearTimeout(s), s = setTimeout(() => {
3133
- o(u.isIntersecting), e && u.isIntersecting && a.unobserve(t.current);
3134
- }, r.delay);
3135
- return;
3136
- }
3137
- o(u.isIntersecting), e && u.isIntersecting && a.unobserve(t.current);
3138
- },
3139
- {
3140
- threshold: i || 1
3141
- }
3142
- );
3143
- return a.observe(t.current), () => {
3144
- a.disconnect();
3145
- };
3146
- }, [t]), n;
3147
- }
3148
- const zo = ({
3149
- children: t,
3150
- eventData: e,
3151
- observerOptions: r,
3152
- callBackWhenVisible: n,
3153
- stopOnIntersection: o = !0,
3154
- className: i,
3155
- ...s
3156
- }) => {
3157
- const a = U(null), u = ko(a, o, r), { sendDataLayerEvent: l } = qr();
3158
- return oe(() => {
3159
- u && (typeof n == "function" && n(), e && l({ ...e }));
3160
- }, [u]), /* @__PURE__ */ E(
3161
- "div",
3162
- {
3163
- ...s,
3164
- ref: a,
3165
- className: Y.classNameConcat(Do["observer-wrapper"], i),
3166
- children: t
3167
- }
3168
- );
3169
- }, Uo = ({
3170
- data: t,
3171
- className: e,
3172
- priority: r,
3173
- creative: n,
3174
- ...o
3175
- }) => {
3176
- const { handleSelectPromotionEvent: i, currentLocalRef: s } = qr(), {
3177
- banner: { promotion_name: a },
3178
- index: u,
3179
- componentIndex: l
3180
- } = t, f = typeof u == "number" ? `:${u + 1}` : "", d = {
3181
- creative_name: n,
3182
- creative_slot: `${n}-${s.current}:${l + 1}${f}`,
3183
- promotion_id: t.banner.href,
3184
- promotion_name: a
3185
- }, c = U(null), p = dt(() => {
3186
- var m;
3187
- if ((m = t.banner.video) != null && m.includes("player.vimeo")) {
3188
- const g = t.banner.video.split("?")[1], _ = g == null ? void 0 : g.split("&"), w = _ == null ? void 0 : _.filter(
3189
- (h) => h.includes("loc") || h.includes("signature") || h.includes("user_id")
3190
- ), b = w == null ? void 0 : w.join("&");
3191
- return `${t.banner.video.split("?")[0]}?${b}`;
3192
- }
3193
- return t.banner.video;
3194
- }, [t]), y = () => {
3195
- var m;
3196
- (m = c.current) != null && m.paused && c.current.play();
3197
- };
3198
- return /* @__PURE__ */ E(
3199
- zo,
3200
- {
3201
- eventData: {
3202
- functionKey: "readyEvents",
3203
- data: {
3204
- event: "view_promotion",
3205
- readyData: {
3206
- ecommerce: {
3207
- ...d,
3208
- index: u
3209
- }
3210
- }
3211
- }
3212
- },
3213
- observerOptions: {
3214
- delay: 100,
3215
- ...p && { threshold: 0.1 }
3216
- },
3217
- ...p && { callBackWhenVisible: y },
3218
- children: t.banner.href ? /* @__PURE__ */ E(
3219
- Rt,
3220
- {
3221
- href: t.banner.href,
3222
- onClick: () => {
3223
- i({
3224
- updatePromotionRef: !0,
3225
- promotion: d,
3226
- index: u
3227
- });
3228
- },
3229
- children: /* @__PURE__ */ E(
3230
- wr,
3231
- {
3232
- data: t,
3233
- videoUrl: p,
3234
- priority: r,
3235
- videoRef: c,
3236
- ...o
3237
- }
3238
- )
3239
- }
3240
- ) : /* @__PURE__ */ E(
3241
- wr,
3242
- {
3243
- data: t,
3244
- videoUrl: p,
3245
- priority: r,
3246
- videoRef: c,
3247
- ...o
3248
- }
3249
- )
3250
- }
3251
- );
3252
- }, Bo = (t) => /* @__PURE__ */ E(Uo, { ...t }), Vo = (t) => t, Fo = (t) => t, Ir = { schema: Vo, base: Fo }, Wo = (t) => t, Ho = (t) => ({
3253
- ...t.uiWidget ? { "ui:widget": t.uiWidget } : {},
3254
- ...t.uiObjectFieldTemplate ? { "ui:ObjectFieldTemplate": t.uiObjectFieldTemplate } : {}
3255
- }), I = {
3256
- property: Wo,
3257
- widget: Ho
3258
- };
3259
- function Go({ ICONS: t }) {
3260
- return {
3261
- borderTop: I.property({
3262
- title: "Esconder borda superior",
3263
- type: "boolean"
3264
- }),
3265
- textStructure: I.property({
3266
- title: 'Texto complementar (caso queira o "ver mais")',
3267
- type: "string",
3268
- widget: I.widget({
3269
- uiWidget: "draftjs-rich-text"
3270
- })
3271
- }),
3272
- textStructureReduced: I.property({
3273
- title: "Texto inicial",
3274
- type: "string",
3275
- widget: I.widget({
3276
- uiWidget: "draftjs-rich-text"
3277
- })
3278
- }),
3279
- textStructureMode: I.property({
3280
- title: "cor da estrutura de texto",
3281
- type: "string",
3282
- enumNames: ["Padrão(preto)", "Invertido(branco)"],
3283
- enum: ["default", "inverse"]
3284
- }),
3285
- textStructureButtonSize: I.property({
3286
- title: "Tamanho botão estrutura de texto",
3287
- type: "string",
3288
- enumNames: ue,
3289
- enum: ue
3290
- }),
3291
- enableIcon: I.property({
3292
- type: "boolean",
3293
- title: "Ativar ícone"
3294
- }),
3295
- textStructureButtonIcon: I.property({
3296
- title: "Icone botão estrutura de texto",
3297
- type: "string",
3298
- enum: Object.values(t),
3299
- enumNames: Object.keys(t)
3300
- }),
3301
- textStructureButtonLabel: I.property({
3302
- title: "Label botão estrutura de texto",
3303
- type: "string"
3304
- }),
3305
- textStructureButtonHref: I.property({
3306
- title: "Url botão estrutura texto",
3307
- type: "string"
3308
- }),
3309
- showTextStructureExpander: I.property({
3310
- title: 'Mostrar botão "ver mais" (Caso ja tenha um texto reduzido)',
3311
- type: "boolean"
3312
- }),
3313
- textStructureAlignment: I.property({
3314
- title: "alinhamento do texto",
3315
- type: "string",
3316
- enumNames: ["centro", "esquerda", "direita"],
3317
- enum: ["centro", "esquerda", "direita"]
3318
- })
3319
- };
3320
- }
3321
- function $o({ ICONS: t }) {
3322
- return I.property({
3323
- type: "object",
3324
- title: "Item",
3325
- properties: {
3326
- title: I.property({ type: "object", title: "Item" }),
3327
- creative_name: I.property({
3328
- type: "string",
3329
- title: "creative name ex: carrossel home, ex2: stories"
3330
- }),
3331
- creative_slot: I.property({
3332
- type: "string",
3333
- title: "creative slot ex: carrossel-home: 1"
3334
- }),
3335
- promotion_id: I.property({
3336
- type: "string",
3337
- title: "promotion id ex: /animale: ex2: /new-collection?O=OrderByScoreDESC"
3338
- }),
3339
- promotion_name: I.property({
3340
- type: "string",
3341
- title: "promotion name ex: special-gift-for-you"
3342
- }),
3343
- href: I.property({
3344
- type: "string",
3345
- title: "Link"
3346
- }),
3347
- image: I.property({
3348
- type: "string",
3349
- title: "Imagem upload",
3350
- description: "Upload de imagens ou seleção de imagens já existentes.",
3351
- widget: I.widget({
3352
- uiWidget: "media-gallery"
3353
- })
3354
- }),
3355
- imageHref: I.property({
3356
- type: "string",
3357
- title: "Imagem via link",
3358
- description: "Informe um link de imagem apenas se não for usar o upload da VTEX. Os dois não podem ser usados juntos."
3359
- }),
3360
- imageOpacity: I.property({
3361
- title: "Deixar imagem transparente",
3362
- type: "boolean"
3363
- }),
3364
- headerVariant: I.property({
3365
- title: "cor do header no banner principal (se Banner Carousel na home)",
3366
- type: "string",
3367
- enumNames: ["Padrão(preto)", "Invertido(branco)"],
3368
- enum: ["transparent-black", "transparent-white"]
3369
- }),
3370
- video: I.property({
3371
- type: "string",
3372
- title: "Video",
3373
- widget: I.widget({
3374
- uiWidget: "media-gallery"
3375
- })
3376
- }),
3377
- altImage: I.property({
3378
- type: "string",
3379
- title: "Alt Image"
3380
- }),
3381
- isHeroBanner: I.property({
3382
- title: "é hero banner",
3383
- type: "boolean"
3384
- }),
3385
- backgroundColor: I.property({
3386
- title: "Cor de fundo ex: #ffffff",
3387
- type: "string"
3388
- }),
3389
- position: I.property({
3390
- title: "Posição do conteudo na imagem",
3391
- type: "string",
3392
- enumNames: [
3393
- "superior-esquerda",
3394
- "superior-centro",
3395
- "superior-direita",
3396
- "centro",
3397
- "centro-esquerda",
3398
- "centro-direita",
3399
- "inferior-esquerda",
3400
- "inferior-centro",
3401
- "inferior-direita"
3402
- ],
3403
- enum: [
3404
- "superior-esquerda",
3405
- "superior-centro",
3406
- "superior-direita",
3407
- "centro",
3408
- "centro-esquerda",
3409
- "centro-direita",
3410
- "inferior-esquerda",
3411
- "inferior-centro",
3412
- "inferior-direita"
3413
- ]
3414
- }),
3415
- showTimer: I.property({
3416
- title: "mostrar relogio",
3417
- type: "boolean"
3418
- }),
3419
- timerInit: I.property({
3420
- title: "relogio inicio",
3421
- type: "string",
3422
- widget: {
3423
- "ui:widget": "date-time"
3424
- }
3425
- }),
3426
- timerEnd: I.property({
3427
- title: "relogio Fim",
3428
- type: "string",
3429
- widget: {
3430
- "ui:widget": "date-time"
3431
- }
3432
- }),
3433
- timerMode: I.property({
3434
- title: "cor do relogio",
3435
- type: "string",
3436
- enumNames: ["Padrão(preto)", "Invertido(branco)"],
3437
- enum: ["default", "inverse"]
3438
- }),
3439
- timerSize: I.property({
3440
- title: "tamanho do relogio",
3441
- type: "string",
3442
- enumNames: ue,
3443
- enum: ue
3444
- }),
3445
- contentAlignment: I.property({
3446
- title: "alinhamento do conteúdo",
3447
- type: "string",
3448
- enumNames: ["centro", "esquerda", "direita"],
3449
- enum: ["centro", "esquerda", "direita"]
3450
- }),
3451
- contentOrder: I.property({
3452
- title: "ordem do conteúdo",
3453
- type: "string",
3454
- enumNames: ["relógio primeiro", "estrutura de texto primeiro"],
3455
- enum: ["timer-first", "text-structure-first"]
3456
- }),
3457
- ...Go({ ICONS: t })
3458
- }
3459
- });
3460
- }
3461
- function yi({ ICONS: t }) {
3462
- return Ir.base({
3463
- name: "Banner",
3464
- id: "banner",
3465
- href: "",
3466
- requiredScopes: [
3467
- "common_page",
3468
- "categories_page",
3469
- "wishlist_page",
3470
- "search_page",
3471
- "prehome"
3472
- ],
3473
- schema: Ir.schema({
3474
- title: "Banner",
3475
- description: "Banners Único para pagina",
3476
- type: "object",
3477
- properties: {
3478
- banner: $o({ ICONS: t })
3479
- }
3480
- })
3481
- });
3482
- }
3483
- const _i = { Banner: Bo };
3484
- export {
3485
- To as A,
3486
- Uo as B,
3487
- _i as C,
3488
- gi as D,
3489
- ui as E,
3490
- vr as F,
3491
- fi as G,
3492
- Rr as H,
3493
- I,
3494
- Ir as J,
3495
- Go as K,
3496
- Rt as L,
3497
- kn as M,
3498
- mi as N,
3499
- zo as O,
3500
- yi as P,
3501
- Bo as S,
3502
- Co as T,
3503
- Dn as U,
3504
- ce as _,
3505
- ii as a,
3506
- pi as b,
3507
- bt as c,
3508
- di as d,
3509
- qn as e,
3510
- jn as f,
3511
- Nr as g,
3512
- Nn as h,
3513
- En as i,
3514
- Cn as j,
3515
- li as k,
3516
- Jr as l,
3517
- pe as m,
3518
- zn as n,
3519
- si as o,
3520
- ci as p,
3521
- br as q,
3522
- ai as r,
3523
- hn as s,
3524
- hi as t,
3525
- qr as u,
3526
- Mo as v,
3527
- Pn as w,
3528
- Un as x,
3529
- Vn as y,
3530
- so as z
3531
- };