@soma-vertical-web/multi-lib 1.0.42 → 1.0.44

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.
@@ -0,0 +1,2700 @@
1
+ import { decodeJwt as en } from "jose";
2
+ import * as U from "yup";
3
+ import { jsxs as bt, Fragment as tn, jsx as G } from "react/jsx-runtime";
4
+ import { Utils as rn } from "@soma-vertical-web/core-components";
5
+ const rt = (t, e = !0) => Intl.NumberFormat("pt-BR", {
6
+ style: "currency",
7
+ currency: "BRL",
8
+ minimumFractionDigits: e ? 2 : 0
9
+ }).format(t), nn = ({ valueInCents: t, hasFree: e, freeTaxMessage: r }) => t === 0 ? e ? r : rt(0) : rt(t / 100), on = (t, e) => {
10
+ const n = (t - e) * 100 / t;
11
+ return Math.floor(n);
12
+ }, tr = (t, e) => {
13
+ const [r, n] = t.split(e);
14
+ return { name: r.trim(), size: n ? n.trim() : "" };
15
+ }, an = (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
+ }, ln = (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
+ }, cn = (t, e) => t.replace(e, "").trim(), sn = (t) => t.replace(/\//g, ""), un = ({ items: t, NAME_SPLIT_SYMBOL: e }) => {
27
+ const r = {
28
+ price: 0,
29
+ listPrice: 0,
30
+ installments: {
31
+ count: 0,
32
+ value: 0
33
+ }
34
+ }, n = (i, l) => {
35
+ var u;
36
+ l && (l.sellerId = i.sellerId, l.sellerName = i.sellerName, l.available = !0, l.isSellerDefault = i.sellerDefault);
37
+ const {
38
+ Price: c,
39
+ ListPrice: f,
40
+ PaymentOptions: { installmentOptions: s }
41
+ } = i.commertialOffer;
42
+ r.price = c, r.listPrice = f;
43
+ const p = (u = s == null ? void 0 : s[0]) == null ? void 0 : u.installments;
44
+ if (p) {
45
+ const { count: y, value: d } = p[p.length - 1];
46
+ r.installments = {
47
+ count: y,
48
+ value: d / 100
49
+ };
50
+ }
51
+ };
52
+ let o = !0;
53
+ const a = t.reduce((i, l) => {
54
+ var s;
55
+ const c = {
56
+ name: l.name,
57
+ sku: l.itemId,
58
+ value: ((s = l.Tamanho) == null ? void 0 : s[0]) ?? tr(l.nameComplete ?? l.name, e).size,
59
+ available: !1,
60
+ sellerId: "",
61
+ sellerName: "",
62
+ isSellerDefault: !1
63
+ }, f = l.sellers.filter((p) => (p.sellerDefault && p.commertialOffer.IsAvailable && (c.available = !0, n(p, c)), p.commertialOffer.IsAvailable));
64
+ return !c.isSellerDefault && f.length > 0 && (c.available = !0, n(f[0], {
65
+ ...c,
66
+ sellerId: f[0].sellerId,
67
+ sellerName: f[0].sellerName
68
+ })), c.available === !1 && (o = !1), i.push(c), i;
69
+ }, []);
70
+ return {
71
+ ...r,
72
+ sizes: a,
73
+ allSizesAvailable: o
74
+ };
75
+ }, fn = (t) => t ? !t.offers.offers.find(({ quantity: e = 0 }) => e > 0) : !1, pn = (t, e) => {
76
+ const r = t.find(
77
+ (n) => n.availability.includes("InStock") && n.quantity && n.listPrice > 0 && n.seller.identifier === e
78
+ );
79
+ return r || t.find(
80
+ (n) => n.availability.includes("InStock") && n.quantity && n.listPrice > 0
81
+ );
82
+ }, dn = ({ images: t, TEXTURE_IMAGE: e }) => t.find((r) => e.includes(r.imageLabel)) ?? t[0], yn = (t, e) => {
83
+ const r = /\/ids\/(\d+)\//, n = t.match(r);
84
+ return n ? t.replace(
85
+ `/${n[1]}/`,
86
+ `/${n[1]}-${e.width}-${e.height}/`
87
+ ) : t;
88
+ }, vn = (t, e) => {
89
+ const r = /\/ids\/(\d+)-(\d+)-(\d+)\//, n = t.match(r);
90
+ return n ? t.replace(
91
+ `/${n[1]}-${n[2]}-${n[3]}/`,
92
+ `/${n[1]}-${e.width}-${e.height}/`
93
+ ) : t;
94
+ }, mn = ({
95
+ images: t,
96
+ label: e
97
+ }) => {
98
+ const r = t.filter(
99
+ (n) => n.keywords === e.first || n.keywords === e.second || n.alternateName === e.first || n.alternateName === e.second
100
+ );
101
+ return r.length === 0 ? t.slice(0, 2) : r;
102
+ }, gn = (t) => {
103
+ const [e, r] = t.split("/").map(Number);
104
+ if (Number.isNaN(e) || Number.isNaN(r))
105
+ throw new Error("[ERROR ASPECT RATIO IMAGE]: Invalid aspect ratio format");
106
+ return r / e;
107
+ }, hn = (t, e, r) => {
108
+ e && (t ? (e.getAttribute("src") || (e.src = r ?? ""), e.play()) : e.pause());
109
+ }, Pl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
110
+ __proto__: null,
111
+ disableSKU: fn,
112
+ formatPriceToCurrency: rt,
113
+ freightParsePrice: nn,
114
+ getAspectRatio: gn,
115
+ getColorAndSizeFromSkuName: an,
116
+ getDiscountPercent: on,
117
+ getFirstImages: mn,
118
+ getProductNameWithoutSku: cn,
119
+ getSKUName: ln,
120
+ getSkuInfos: un,
121
+ getThumbImage: dn,
122
+ getValidOffer: pn,
123
+ removeSlashes: sn,
124
+ resizingImg: yn,
125
+ setVideoPlay: hn,
126
+ splitNameAndSizeFromFullName: tr,
127
+ updatedResizedImg: vn
128
+ }, Symbol.toStringTag, { value: "Module" })), _n = {
129
+ attachment: "ATTACHMENT",
130
+ specification: "SPECIFICATION",
131
+ attribute: "ATTRIBUTE"
132
+ }, T = Promise.resolve(!1), En = {
133
+ id: "",
134
+ isOpen: !1,
135
+ items: [],
136
+ loading: !1,
137
+ marketingData: null,
138
+ messages: [],
139
+ openTextField: {},
140
+ paymentData: null,
141
+ shippingData: null,
142
+ totalizers: [],
143
+ itemMetadata: [],
144
+ recentlyAddedProducts: [],
145
+ addCoupon: () => T,
146
+ addItem: () => T,
147
+ addSellerCode: () => T,
148
+ addMarketingData: () => T,
149
+ emptyCart: () => ({}),
150
+ removeItem: () => T,
151
+ setIsOpen: () => ({}),
152
+ shipping: () => T,
153
+ shippingUpdate: () => T,
154
+ toggleServiceToProduct: () => T,
155
+ updateItemQuantity: () => T,
156
+ insertProfileEmail: () => T,
157
+ setRecentlyAddedProducts: () => ({})
158
+ }, ut = (t) => t === 0, rr = (t, e) => {
159
+ if (!t || t.length === 0)
160
+ return [];
161
+ let r = "";
162
+ const n = [], o = t.match(/\d+/g) ?? [];
163
+ for (const a of o) {
164
+ const i = e[Number(a)];
165
+ i && (r += (r ? "/" : "") + i, n.push(r));
166
+ }
167
+ return n;
168
+ }, nr = (t, e) => {
169
+ const {
170
+ availability: r,
171
+ additionalInfo: { brandName: n },
172
+ bundleItems: o,
173
+ id: a,
174
+ uniqueId: i,
175
+ detailUrl: l,
176
+ ean: c,
177
+ imageUrl: f,
178
+ name: s,
179
+ listPrice: p,
180
+ quantity: u,
181
+ price: y,
182
+ priceDefinition: d,
183
+ productCategories: h,
184
+ productCategoryIds: E,
185
+ productId: O,
186
+ refId: P,
187
+ seller: m,
188
+ referenceId: R,
189
+ offerings: I,
190
+ productRefId: F,
191
+ skuName: C,
192
+ sellingPrice: j
193
+ } = t;
194
+ return {
195
+ availability: r,
196
+ bundleItems: o,
197
+ referenceId: R,
198
+ productRefId: F,
199
+ id: a,
200
+ ean: c,
201
+ uniqueId: i,
202
+ itemOffered: {
203
+ additionalProperty: [],
204
+ brand: {
205
+ name: n
206
+ },
207
+ categories: rr(E, h),
208
+ categoriesIds: E,
209
+ gtin: P,
210
+ image: [
211
+ {
212
+ alternateName: (e == null ? void 0 : e.MAIN_IMAGE) ?? "1",
213
+ url: f
214
+ }
215
+ ],
216
+ name: s,
217
+ isVariationOf: {
218
+ name: s,
219
+ productGroupID: O
220
+ },
221
+ sku: a,
222
+ slug: l,
223
+ skuName: C
224
+ },
225
+ listPrice: p,
226
+ quantity: u,
227
+ offerings: I,
228
+ price: y,
229
+ priceDefinition: d,
230
+ sellingPrice: j,
231
+ seller: m
232
+ };
233
+ }, Sn = (t, e) => {
234
+ const r = t.map((n) => ({
235
+ id: n.uniqueId,
236
+ quantity: n.quantity,
237
+ seller: n.seller
238
+ }));
239
+ return Array.isArray(e) ? [...r, ...e] : [...r, e];
240
+ }, An = (t, e) => {
241
+ const r = t.find((n) => n.id === e);
242
+ if (r) {
243
+ const n = t.map((o, a) => {
244
+ var i, l;
245
+ return {
246
+ id: ((i = o.itemOffered) == null ? void 0 : i.sku) ?? "",
247
+ index: a,
248
+ quantity: (r == null ? void 0 : r.id) === ((l = o.itemOffered) == null ? void 0 : l.sku) ? 0 : o.quantity,
249
+ seller: o.seller ?? ""
250
+ };
251
+ });
252
+ return {
253
+ updateItems: n,
254
+ filterItems: n.filter((o) => o.id !== e)
255
+ };
256
+ }
257
+ return { updateItems: [], filterItems: [] };
258
+ }, bn = (t, e, r) => t.filter(
259
+ (n) => n.availability !== "withoutStock" && n.availability !== "https://schema.org/OutOfStock"
260
+ ).map(
261
+ (n, o) => {
262
+ var a, i;
263
+ return n.id === e ? {
264
+ id: n.id,
265
+ index: o,
266
+ quantity: r,
267
+ seller: n.seller,
268
+ sku: ((a = n.itemOffered) == null ? void 0 : a.sku) ?? ""
269
+ } : {
270
+ id: n.id,
271
+ index: o,
272
+ quantity: n.quantity,
273
+ seller: n.seller,
274
+ sku: ((i = n.itemOffered) == null ? void 0 : i.sku) ?? ""
275
+ };
276
+ }
277
+ ), On = (t, e) => t.filter((r) => r.availability !== "withoutStock").findIndex(({ id: r }) => r === e), Pn = (t, e) => {
278
+ var r;
279
+ return Array.isArray(t) ? (((r = t == null ? void 0 : t.find((n) => {
280
+ var o;
281
+ return ((o = n == null ? void 0 : n.id) == null ? void 0 : o.toLowerCase()) === e;
282
+ })) == null ? void 0 : r.value) ?? 0) / 100 : 0;
283
+ }, Rn = (t) => {
284
+ const e = t.reduce((o, a) => {
285
+ const i = ut(a.price) ? 0 : a.quantity;
286
+ return o + i;
287
+ }, 0), r = t.reduce(
288
+ (o, a) => o + a.price * a.quantity,
289
+ 0
290
+ ), n = t.reduce(
291
+ (o, a) => o + a.listPrice * a.quantity,
292
+ 0
293
+ );
294
+ return {
295
+ totalItems: e,
296
+ total: r,
297
+ subTotal: n
298
+ };
299
+ }, In = (t) => Array.isArray(t) ? t.filter((e) => e.availability !== "withoutStock").reduce((e, r) => e + (ut(r == null ? void 0 : r.price) ? 0 : r.quantity), 0) : 0, ft = (t, e) => {
300
+ const { items: r, orderFormId: n, ...o } = t;
301
+ return {
302
+ ...o,
303
+ id: n,
304
+ items: Array.isArray(r) ? r.map((a) => nr(a, e)) : []
305
+ };
306
+ }, wn = (t, e) => {
307
+ const r = t.find((n) => n.id === e);
308
+ return r ? r.availability === "unavailableItemFulfillment" : !1;
309
+ }, Tn = (t, e) => {
310
+ const r = t.sku, n = t.isVariantOf.hasVariant.find((o) => o.sku === r);
311
+ return n ? n.name.split(e)[1] : "--";
312
+ }, Cn = (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 }, Nn = (t, e) => {
313
+ const r = /* @__PURE__ */ new Set();
314
+ return [t, ...e].filter(
315
+ (n) => !r.has(n) && r.add(n),
316
+ r
317
+ );
318
+ }, Dn = (t, e) => e && Array.isArray(e) && e.find((n) => n.id === t) ? Promise.resolve(t) : Promise.resolve(!1), xn = (t, e) => e ? Promise.resolve(t[e]) : Promise.resolve(!1), $n = async (t) => {
319
+ try {
320
+ const e = await t();
321
+ if (typeof e != "boolean")
322
+ return e;
323
+ } catch (e) {
324
+ console.error(`[Error orderForm]: ${e}`);
325
+ }
326
+ return !1;
327
+ }, Mn = (t, e) => {
328
+ if (e !== -1) {
329
+ const r = Number(t);
330
+ return r ? r + 1 : 1;
331
+ }
332
+ return t ?? 1;
333
+ }, Fn = (t, e) => Array.isArray(t) ? t.filter(
334
+ (r) => e == null ? void 0 : e.some((n) => n.id === r.id)
335
+ ) : [], Ln = async (t, e) => t.then((r) => [...r ?? [], ...e ?? []]), Un = async (t, e, r, n) => {
336
+ const { priority: o = "auto", body: a } = e;
337
+ return fetch(t, {
338
+ // priority,
339
+ headers: {
340
+ "Content-Type": "application/json"
341
+ },
342
+ priority: o,
343
+ method: "POST",
344
+ body: JSON.stringify(a)
345
+ }).then(async (i) => {
346
+ const l = await i.json();
347
+ return r ? l : ft(l, n);
348
+ });
349
+ }, Gn = (t, e, r) => ({
350
+ notifications: [
351
+ ...t.notifications,
352
+ { id: Date.now(), message: e, callback: r }
353
+ ]
354
+ }), Bn = (t) => [...Array.isArray(t) ? t : [t], "faststore"], jn = (t) => {
355
+ const e = t.get("utm_source") || V("utm_source"), r = t.get("utm_campaign") || V("utm_campaign"), n = t.get("utm_medium") || V("utm_medium"), o = t.get("utmi_cp") || V("utmi_cp"), a = t.get("utmi_pc") || V("utmi_pc"), i = t.get("utmi_p") || V("utmi_p");
356
+ return {
357
+ ...e && { utmSource: e },
358
+ ...n && { utmMedium: n },
359
+ ...r && { utmCampaign: r },
360
+ ...o && { utmiCampaign: o },
361
+ ...a && { utmiPart: a },
362
+ ...i && { utmipage: i }
363
+ };
364
+ }, V = (t) => {
365
+ if (!t || typeof window > "u")
366
+ return;
367
+ const e = window.location.href;
368
+ t = t.replace(/[[\]]/g, "\\$&");
369
+ const r = new RegExp("[?&]" + t + "(=([^&#]*)|&|#|$)"), n = r.exec(e);
370
+ return n ? n[2] ? decodeURIComponent(n[2].replace(/\+/g, " ")) : "" : null;
371
+ }, kn = (t, e, r = "BR") => {
372
+ const n = e, o = {
373
+ country: r,
374
+ addressType: "",
375
+ postalCode: t || null,
376
+ city: "",
377
+ state: "",
378
+ street: "",
379
+ number: "",
380
+ neighborhood: "",
381
+ complement: "",
382
+ reference: "",
383
+ geoCoordinates: []
384
+ };
385
+ if (n) {
386
+ const a = typeof n == "object" && "latitude" in n ? n.latitude : null, i = typeof n == "object" && "longitude" in n ? n.longitude : null;
387
+ o.geoCoordinates = typeof a == "number" && typeof i == "number" ? { latitude: a, longitude: i } : null;
388
+ }
389
+ return [o];
390
+ }, Rl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
391
+ __proto__: null,
392
+ VALUE_REFERENCES: _n,
393
+ addItemOrder: Sn,
394
+ addNotification: Gn,
395
+ createItemOrder: nr,
396
+ createNewAddress: kn,
397
+ fetchCartAPI: Un,
398
+ findItemIndex: On,
399
+ findOptions: Fn,
400
+ findTotalizerValue: Pn,
401
+ getCategories: rr,
402
+ getCode: Cn,
403
+ getQuantity: Mn,
404
+ getRemoveId: Dn,
405
+ getSize: Tn,
406
+ getTotalItems: In,
407
+ getTotalizer: Rn,
408
+ getUrlParameter: V,
409
+ getValue: xn,
410
+ initialState: En,
411
+ isGift: ut,
412
+ marketingTagsBuilder: Bn,
413
+ mergeOptionsPromise: Ln,
414
+ mountMarketingData: jn,
415
+ orderFormValues: ft,
416
+ promiseDefault: T,
417
+ removeQuantity: An,
418
+ updateItemSellerExternal: wn,
419
+ updateOrderFormPromise: $n,
420
+ updateQuantity: bn,
421
+ wishlistArray: Nn
422
+ }, Symbol.toStringTag, { value: "Module" })), nt = { baseUrl: "" }, Il = (t) => {
423
+ nt.baseUrl || Object.defineProperty(nt, "baseUrl", {
424
+ value: `https://${t}.myvtex.com`,
425
+ writable: !1,
426
+ configurable: !1
427
+ });
428
+ }, or = (t, e) => fetch(`${nt.baseUrl}${t}`, e), wl = async (t, e, r = !1, n) => {
429
+ const { priority: o = "auto", body: a } = e, i = await or(t, {
430
+ headers: { "Content-Type": "application/json" },
431
+ method: "POST",
432
+ body: JSON.stringify(a),
433
+ priority: o
434
+ });
435
+ if (!i.ok) {
436
+ const c = await i.json().catch(() => ({ message: "Unknown error" }));
437
+ throw new Error(c.message || `HTTP ${i.status}`);
438
+ }
439
+ const l = await i.json();
440
+ return r ? l : ft(l, n);
441
+ }, Ot = "fuzzy", Pt = "operator", Hn = (t) => ({
442
+ isDepartment: t != null && t.length ? t[0].key === "category-1" : !1
443
+ }), Xn = (t, e) => {
444
+ const r = decodeURIComponent(e ?? "").slice(1).split("/");
445
+ return t.map((n) => {
446
+ if (n.key === "category-2" && n.__typename === "FacetBoolean") {
447
+ const o = n.values;
448
+ return {
449
+ ...n,
450
+ values: o.filter(
451
+ (a) => !r.find(
452
+ (i) => i.toLowerCase() === a.value || i.toLowerCase() === a.name.toLowerCase()
453
+ )
454
+ )
455
+ };
456
+ }
457
+ return n;
458
+ });
459
+ }, ar = (t, e) => e ? t === "category-1" : !1, Wn = (t) => t.key === "operator" && (t.value === "and" || t.value === "or"), qn = (t) => t.type === "TEXT", Vn = (t) => t.key === "fuzzy" && (t.value === "0" || t.value === "1" || t.value === "auto"), zn = (t) => {
460
+ const { key: e, name: r, values: n } = t;
461
+ return {
462
+ __typename: "FacetBoolean",
463
+ key: e,
464
+ label: r,
465
+ values: n.slice().sort((o, a) => o.name.localeCompare(a.name))
466
+ };
467
+ }, Kn = ({ key: t, values: e }) => ({
468
+ __typename: "FacetRange",
469
+ key: t,
470
+ values: e
471
+ }), Tl = (t, e, r) => {
472
+ if (!(t instanceof Object) || !("facets" in t))
473
+ return [];
474
+ const { facets: n = [] } = t, o = e != null && e.length ? e[0].key === "category-1" : !1;
475
+ return n.filter(
476
+ (i) => !r || !ar(i.key, o)
477
+ ).map(
478
+ (i) => qn(i) ? zn(i) : Kn(i)
479
+ );
480
+ }, Cl = (t, e) => {
481
+ const r = t.find(({ key: o }) => o === Ot) ?? null, n = t.find(({ key: o }) => o === Pt) ?? null;
482
+ r && Vn(r) && e.append(Ot, r.value), n && Wn(n) && e.append(Pt, n.value);
483
+ }, ir = (t) => t.map((e) => {
484
+ const [r, n] = e.split("/");
485
+ return { key: r, value: n };
486
+ }), Yn = (t, e) => {
487
+ const r = decodeURIComponent(e ?? "").slice(1).split("/"), n = t.filter(({ value: a }) => !r.includes(decodeURIComponent(a))).map((a) => ({
488
+ ...a,
489
+ value: decodeURIComponent(a.value)
490
+ })), { isDepartment: o } = Hn(n);
491
+ return n == null ? void 0 : n.filter((a) => !ar(a.key, o));
492
+ }, Nl = (t) => t.getAll("facets").flatMap((e) => {
493
+ const [r, ...n] = e.split("/");
494
+ return !r || n.length === 0 ? [] : [
495
+ {
496
+ key: r,
497
+ value: n.join("/")
498
+ }
499
+ ];
500
+ }), Dl = (t) => {
501
+ const e = en(t ?? "");
502
+ return {
503
+ email: e.sub,
504
+ userId: e.userId
505
+ };
506
+ }, Qn = ({ pathname: t, searchParams: e }, r) => {
507
+ const n = e.get("sort") ?? "", o = e.get("query") ?? null, a = parseInt(e.get("page") ?? "1", 10);
508
+ return {
509
+ sort: n,
510
+ facets: ir(r),
511
+ term: o,
512
+ base: o ? "" : t,
513
+ page: a
514
+ };
515
+ }, Jn = (t) => {
516
+ const e = new URLSearchParams();
517
+ return Object.entries(t).forEach(([r, n]) => {
518
+ Array.isArray(n) ? n.forEach((o) => e.append(r, o)) : n !== void 0 && e.append(r, n);
519
+ }), e;
520
+ }, xl = (t, e, r = 24, n = 1, o) => {
521
+ const a = `/search?query=${e ?? ""}&count=${r}&page=${n}${o ? `&sort=${o.replace("_", ":")}` : ""}`;
522
+ t.push(a);
523
+ }, Zn = {
524
+ parseSearchState: Qn,
525
+ convertSearchParams: Jn,
526
+ filterNonRootFacets: Yn,
527
+ selectedFacets: ir,
528
+ filterNonCategorySelected: Xn
529
+ }, $l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
530
+ __proto__: null,
531
+ default: Zn
532
+ }, Symbol.toStringTag, { value: "Module" }));
533
+ var Rt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
534
+ function eo(t) {
535
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
536
+ }
537
+ function to(t) {
538
+ if (t.__esModule) return t;
539
+ var e = t.default;
540
+ if (typeof e == "function") {
541
+ var r = function n() {
542
+ return this instanceof n ? Reflect.construct(e, arguments, this.constructor) : e.apply(this, arguments);
543
+ };
544
+ r.prototype = e.prototype;
545
+ } else r = {};
546
+ return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(t).forEach(function(n) {
547
+ var o = Object.getOwnPropertyDescriptor(t, n);
548
+ Object.defineProperty(r, n, o.get ? o : {
549
+ enumerable: !0,
550
+ get: function() {
551
+ return t[n];
552
+ }
553
+ });
554
+ }), r;
555
+ }
556
+ var ro = {};
557
+ (function(t) {
558
+ Object.defineProperty(t, "__esModule", {
559
+ value: !0
560
+ }), Object.defineProperty(t, "removeTrailingSlash", {
561
+ enumerable: !0,
562
+ get: function() {
563
+ return e;
564
+ }
565
+ });
566
+ function e(r) {
567
+ return r.replace(/\/$/, "") || "/";
568
+ }
569
+ })(ro);
570
+ var pt = {};
571
+ (function(t) {
572
+ Object.defineProperty(t, "__esModule", {
573
+ value: !0
574
+ }), Object.defineProperty(t, "parsePath", {
575
+ enumerable: !0,
576
+ get: function() {
577
+ return e;
578
+ }
579
+ });
580
+ function e(r) {
581
+ const n = r.indexOf("#"), o = r.indexOf("?"), a = o > -1 && (n < 0 || o < n);
582
+ return a || n > -1 ? {
583
+ pathname: r.substring(0, a ? o : n),
584
+ query: a ? r.substring(o, n > -1 ? n : void 0) : "",
585
+ hash: n > -1 ? r.slice(n) : ""
586
+ } : {
587
+ pathname: r,
588
+ query: "",
589
+ hash: ""
590
+ };
591
+ }
592
+ })(pt);
593
+ var lr = {};
594
+ (function(t) {
595
+ Object.defineProperty(t, "__esModule", {
596
+ value: !0
597
+ }), Object.defineProperty(t, "pathHasPrefix", {
598
+ enumerable: !0,
599
+ get: function() {
600
+ return r;
601
+ }
602
+ });
603
+ const e = pt;
604
+ function r(n, o) {
605
+ if (typeof n != "string")
606
+ return !1;
607
+ const { pathname: a } = (0, e.parsePath)(n);
608
+ return a === o || a.startsWith(o + "/");
609
+ }
610
+ })(lr);
611
+ var no = {};
612
+ (function(t) {
613
+ Object.defineProperty(t, "__esModule", {
614
+ value: !0
615
+ });
616
+ function e(Zr, St) {
617
+ for (var At in St) Object.defineProperty(Zr, At, {
618
+ enumerable: !0,
619
+ get: St[At]
620
+ });
621
+ }
622
+ e(t, {
623
+ ACTION_SUFFIX: function() {
624
+ return c;
625
+ },
626
+ APP_DIR_ALIAS: function() {
627
+ return Q;
628
+ },
629
+ CACHE_ONE_YEAR: function() {
630
+ return R;
631
+ },
632
+ DOT_NEXT_ALIAS: function() {
633
+ return L;
634
+ },
635
+ ESLINT_DEFAULT_DIRS: function() {
636
+ return Kr;
637
+ },
638
+ GSP_NO_RETURNED_VALUE: function() {
639
+ return Hr;
640
+ },
641
+ GSSP_COMPONENT_MEMBER_ERROR: function() {
642
+ return qr;
643
+ },
644
+ GSSP_NO_RETURNED_VALUE: function() {
645
+ return Xr;
646
+ },
647
+ INSTRUMENTATION_HOOK_FILENAME: function() {
648
+ return C;
649
+ },
650
+ MIDDLEWARE_FILENAME: function() {
651
+ return I;
652
+ },
653
+ MIDDLEWARE_LOCATION_REGEXP: function() {
654
+ return F;
655
+ },
656
+ NEXT_BODY_SUFFIX: function() {
657
+ return p;
658
+ },
659
+ NEXT_CACHE_IMPLICIT_TAG_ID: function() {
660
+ return m;
661
+ },
662
+ NEXT_CACHE_REVALIDATED_TAGS_HEADER: function() {
663
+ return d;
664
+ },
665
+ NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: function() {
666
+ return h;
667
+ },
668
+ NEXT_CACHE_SOFT_TAGS_HEADER: function() {
669
+ return y;
670
+ },
671
+ NEXT_CACHE_SOFT_TAG_MAX_LENGTH: function() {
672
+ return P;
673
+ },
674
+ NEXT_CACHE_TAGS_HEADER: function() {
675
+ return u;
676
+ },
677
+ NEXT_CACHE_TAG_MAX_ITEMS: function() {
678
+ return E;
679
+ },
680
+ NEXT_CACHE_TAG_MAX_LENGTH: function() {
681
+ return O;
682
+ },
683
+ NEXT_DATA_SUFFIX: function() {
684
+ return f;
685
+ },
686
+ NEXT_INTERCEPTION_MARKER_PREFIX: function() {
687
+ return n;
688
+ },
689
+ NEXT_META_SUFFIX: function() {
690
+ return s;
691
+ },
692
+ NEXT_QUERY_PARAM_PREFIX: function() {
693
+ return r;
694
+ },
695
+ NON_STANDARD_NODE_ENV: function() {
696
+ return Vr;
697
+ },
698
+ PAGES_DIR_ALIAS: function() {
699
+ return j;
700
+ },
701
+ PRERENDER_REVALIDATE_HEADER: function() {
702
+ return o;
703
+ },
704
+ PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER: function() {
705
+ return a;
706
+ },
707
+ PUBLIC_DIR_MIDDLEWARE_CONFLICT: function() {
708
+ return ae;
709
+ },
710
+ ROOT_DIR_ALIAS: function() {
711
+ return N;
712
+ },
713
+ RSC_ACTION_CLIENT_WRAPPER_ALIAS: function() {
714
+ return q;
715
+ },
716
+ RSC_ACTION_ENCRYPTION_ALIAS: function() {
717
+ return w;
718
+ },
719
+ RSC_ACTION_PROXY_ALIAS: function() {
720
+ return D;
721
+ },
722
+ RSC_ACTION_VALIDATE_ALIAS: function() {
723
+ return b;
724
+ },
725
+ RSC_MOD_REF_PROXY_ALIAS: function() {
726
+ return k;
727
+ },
728
+ RSC_PREFETCH_SUFFIX: function() {
729
+ return i;
730
+ },
731
+ RSC_SUFFIX: function() {
732
+ return l;
733
+ },
734
+ SERVER_PROPS_EXPORT_ERROR: function() {
735
+ return kr;
736
+ },
737
+ SERVER_PROPS_GET_INIT_PROPS_CONFLICT: function() {
738
+ return ge;
739
+ },
740
+ SERVER_PROPS_SSG_CONFLICT: function() {
741
+ return ie;
742
+ },
743
+ SERVER_RUNTIME: function() {
744
+ return Yr;
745
+ },
746
+ SSG_FALLBACK_EXPORT_ERROR: function() {
747
+ return zr;
748
+ },
749
+ SSG_GET_INITIAL_PROPS_CONFLICT: function() {
750
+ return Fe;
751
+ },
752
+ STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: function() {
753
+ return jr;
754
+ },
755
+ UNSTABLE_REVALIDATE_RENAME_ERROR: function() {
756
+ return Wr;
757
+ },
758
+ WEBPACK_LAYERS: function() {
759
+ return Qr;
760
+ },
761
+ WEBPACK_RESOURCE_QUERIES: function() {
762
+ return Jr;
763
+ }
764
+ });
765
+ const r = "nxtP", n = "nxtI", o = "x-prerender-revalidate", a = "x-prerender-revalidate-if-generated", i = ".prefetch.rsc", l = ".rsc", c = ".action", f = ".json", s = ".meta", p = ".body", u = "x-next-cache-tags", y = "x-next-cache-soft-tags", d = "x-next-revalidated-tags", h = "x-next-revalidate-tag-token", E = 128, O = 256, P = 1024, m = "_N_T_", R = 31536e3, I = "middleware", F = `(?:src/)?${I}`, C = "instrumentation", j = "private-next-pages", L = "private-dot-next", N = "private-next-root-dir", Q = "private-next-app-dir", k = "private-next-rsc-mod-ref-proxy", b = "private-next-rsc-action-validate", D = "private-next-rsc-server-reference", w = "private-next-rsc-action-encryption", q = "private-next-rsc-action-client-wrapper", ae = "You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict", Fe = "You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps", ge = "You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.", ie = "You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps", jr = "can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props", kr = "pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export", Hr = "Your `getStaticProps` function did not return an object. Did you forget to add a `return`?", Xr = "Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?", Wr = "The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.", qr = "can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member", Vr = 'You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env', zr = "Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export", Kr = [
766
+ "app",
767
+ "pages",
768
+ "components",
769
+ "lib",
770
+ "src"
771
+ ], Yr = {
772
+ edge: "edge",
773
+ experimentalEdge: "experimental-edge",
774
+ nodejs: "nodejs"
775
+ }, S = {
776
+ /**
777
+ * The layer for the shared code between the client and server bundles.
778
+ */
779
+ shared: "shared",
780
+ /**
781
+ * React Server Components layer (rsc).
782
+ */
783
+ reactServerComponents: "rsc",
784
+ /**
785
+ * Server Side Rendering layer for app (ssr).
786
+ */
787
+ serverSideRendering: "ssr",
788
+ /**
789
+ * The browser client bundle layer for actions.
790
+ */
791
+ actionBrowser: "action-browser",
792
+ /**
793
+ * The layer for the API routes.
794
+ */
795
+ api: "api",
796
+ /**
797
+ * The layer for the middleware code.
798
+ */
799
+ middleware: "middleware",
800
+ /**
801
+ * The layer for the instrumentation hooks.
802
+ */
803
+ instrument: "instrument",
804
+ /**
805
+ * The layer for assets on the edge.
806
+ */
807
+ edgeAsset: "edge-asset",
808
+ /**
809
+ * The browser client bundle layer for App directory.
810
+ */
811
+ appPagesBrowser: "app-pages-browser",
812
+ /**
813
+ * The server bundle layer for metadata routes.
814
+ */
815
+ appMetadataRoute: "app-metadata-route",
816
+ /**
817
+ * The layer for the server bundle for App Route handlers.
818
+ */
819
+ appRouteHandler: "app-route-handler"
820
+ }, Qr = {
821
+ ...S,
822
+ GROUP: {
823
+ serverOnly: [
824
+ S.reactServerComponents,
825
+ S.actionBrowser,
826
+ S.appMetadataRoute,
827
+ S.appRouteHandler,
828
+ S.instrument
829
+ ],
830
+ clientOnly: [
831
+ S.serverSideRendering,
832
+ S.appPagesBrowser
833
+ ],
834
+ nonClientServerTarget: [
835
+ // middleware and pages api
836
+ S.middleware,
837
+ S.api
838
+ ],
839
+ app: [
840
+ S.reactServerComponents,
841
+ S.actionBrowser,
842
+ S.appMetadataRoute,
843
+ S.appRouteHandler,
844
+ S.serverSideRendering,
845
+ S.appPagesBrowser,
846
+ S.shared,
847
+ S.instrument
848
+ ]
849
+ }
850
+ }, Jr = {
851
+ edgeSSREntry: "__next_edge_ssr_entry__",
852
+ metadata: "__next_metadata__",
853
+ metadataRoute: "__next_metadata_route__",
854
+ metadataImageMeta: "__next_metadata_image_meta__"
855
+ };
856
+ })(no);
857
+ var oo = {}, cr = {};
858
+ (function(t) {
859
+ Object.defineProperty(t, "__esModule", {
860
+ value: !0
861
+ }), Object.defineProperty(t, "addPathPrefix", {
862
+ enumerable: !0,
863
+ get: function() {
864
+ return r;
865
+ }
866
+ });
867
+ const e = pt;
868
+ function r(n, o) {
869
+ if (!n.startsWith("/") || !o)
870
+ return n;
871
+ const { pathname: a, query: i, hash: l } = (0, e.parsePath)(n);
872
+ return "" + o + a + i + l;
873
+ }
874
+ })(cr);
875
+ (function(t) {
876
+ Object.defineProperty(t, "__esModule", {
877
+ value: !0
878
+ }), Object.defineProperty(t, "addLocale", {
879
+ enumerable: !0,
880
+ get: function() {
881
+ return n;
882
+ }
883
+ });
884
+ const e = cr, r = lr;
885
+ function n(o, a, i, l) {
886
+ if (!a || a === i) return o;
887
+ const c = o.toLowerCase();
888
+ return !l && ((0, r.pathHasPrefix)(c, "/api") || (0, r.pathHasPrefix)(c, "/" + a.toLowerCase())) ? o : (0, e.addPathPrefix)(o, "/" + a);
889
+ }
890
+ })(oo);
891
+ var ao = {};
892
+ (function(t) {
893
+ Object.defineProperty(t, "__esModule", {
894
+ value: !0
895
+ }), Object.defineProperty(t, "normalizeLocalePath", {
896
+ enumerable: !0,
897
+ get: function() {
898
+ return e;
899
+ }
900
+ });
901
+ function e(r, n) {
902
+ let o;
903
+ const a = r.split("/");
904
+ return (n || []).some((i) => a[1] && a[1].toLowerCase() === i.toLowerCase() ? (o = i, a.splice(1, 1), r = a.join("/") || "/", !0) : !1), {
905
+ pathname: r,
906
+ detectedLocale: o
907
+ };
908
+ }
909
+ })(ao);
910
+ var io = {};
911
+ (function(t) {
912
+ Object.defineProperty(t, "__esModule", {
913
+ value: !0
914
+ }), Object.defineProperty(t, "detectDomainLocale", {
915
+ enumerable: !0,
916
+ get: function() {
917
+ return e;
918
+ }
919
+ });
920
+ function e(r, n, o) {
921
+ if (r) {
922
+ o && (o = o.toLowerCase());
923
+ for (const l of r) {
924
+ var a, i;
925
+ const c = (a = l.domain) == null ? void 0 : a.split(":", 1)[0].toLowerCase();
926
+ if (n === c || o === l.defaultLocale.toLowerCase() || (i = l.locales) != null && i.some((f) => f.toLowerCase() === o))
927
+ return l;
928
+ }
929
+ }
930
+ }
931
+ })(io);
932
+ const lo = (t = "") => t.charAt(0).toUpperCase() + t.slice(1), It = (t, e = " ") => !t || typeof t == "string" && t.length === 0 ? t : (Array.isArray(t) ? t : t.split("-")).map(lo).join(e), co = ({ canonical: t, seo: e, slug: r }) => {
933
+ const n = Array.isArray(r) ? r.join(", ") : r;
934
+ return {
935
+ id: 0,
936
+ Title: `${Array.isArray(r) ? r.map((a) => It(a)).join(",") : It(r)} - ${e.title}`,
937
+ MetaTagDescription: e.description,
938
+ name: n,
939
+ hasChildren: !1,
940
+ url: t,
941
+ children: []
942
+ };
943
+ }, so = ({ canonical: t, category: e, previousImages: r, seo: n }) => ({
944
+ category: String(e == null ? void 0 : e.id),
945
+ title: (e == null ? void 0 : e.Title) ?? n.title,
946
+ description: (e == null ? void 0 : e.MetaTagDescription) ?? n.description,
947
+ alternates: { canonical: t },
948
+ openGraph: {
949
+ type: "website",
950
+ title: (e == null ? void 0 : e.Title) ?? n.title,
951
+ description: (e == null ? void 0 : e.MetaTagDescription) ?? n.description,
952
+ images: Array.isArray(r) ? [...r] : []
953
+ }
954
+ }), uo = ({ items: t, parent: e, apiUrl: r, find: n }) => {
955
+ const o = t.find(
956
+ (i) => i.url.replace(r, "") === decodeURIComponent(e.toLowerCase())
957
+ );
958
+ return (o == null ? void 0 : o.children.find(
959
+ (i) => i.name.toLowerCase() === decodeURIComponent(String(n))
960
+ )) ?? o;
961
+ }, fo = (t) => {
962
+ t instanceof Error ? (console.error(`[ERROR CATEGORY INFO]: ${t.message}`), console.error(t.stack)) : console.error("[ERROR CATEGORY INFO]: Unknown error", t);
963
+ }, po = /* @__PURE__ */ new Set([
964
+ "brand",
965
+ "category",
966
+ "department",
967
+ "subcategory",
968
+ "collection",
969
+ "cluster"
970
+ ]), yo = (t) => typeof (t == null ? void 0 : t.pageType) == "string" && po.has(t == null ? void 0 : t.pageType.toLowerCase()), vo = (t) => ({
971
+ collection: t.Coleção,
972
+ categoryId: t.categoryId,
973
+ current_collection: t["Coleção Atual"],
974
+ items: t.items
975
+ }), mo = (t, e) => t.reduce((r, n) => {
976
+ if (n.items.filter(
977
+ (i) => i.sellers.find((l) => l.commertialOffer.IsAvailable)
978
+ ).length === 0 || (r == null ? void 0 : r.find((i) => (i == null ? void 0 : i.productId) === (n == null ? void 0 : n.productId))) !== void 0)
979
+ return r;
980
+ const a = n.items[0].images.find(
981
+ (i) => e.includes(i.imageLabel)
982
+ );
983
+ return r.push({
984
+ slug: `/${n.linkText}/p`,
985
+ productId: n == null ? void 0 : n.productId,
986
+ textureImage: (a == null ? void 0 : a.imageUrl) ?? "",
987
+ textureAlt: (a == null ? void 0 : a.imageText) ?? ""
988
+ }), r;
989
+ }, []), Ml = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
990
+ __proto__: null,
991
+ createEmptySeoCategory: co,
992
+ createSeoCategory: so,
993
+ findCategory: uo,
994
+ formattedSimilars: mo,
995
+ isCollectionPageType: yo,
996
+ notFindCategoryError: fo,
997
+ responseAdapter: vo
998
+ }, Symbol.toStringTag, { value: "Module" })), he = {
999
+ "responsive-mobile-flex": "_responsive-mobile-flex_1e0ai_1",
1000
+ "responsive-desktop-flex": "_responsive-desktop-flex_1e0ai_15",
1001
+ "responsive-mobile-block": "_responsive-mobile-block_1e0ai_30",
1002
+ "responsive-desktop-block": "_responsive-desktop-block_1e0ai_41"
1003
+ }, sr = async (t, e = {}) => {
1004
+ const { method: r = "GET", body: n, headers: o = {}, priority: a = "auto", cache: i = "default" } = e;
1005
+ return fetch(t, {
1006
+ method: r,
1007
+ headers: {
1008
+ ...o,
1009
+ Accept: "application/json",
1010
+ "Content-Type": "application/json"
1011
+ },
1012
+ priority: a,
1013
+ cache: i,
1014
+ ...n ? { body: JSON.stringify(n) } : {}
1015
+ // not body in get
1016
+ }).then((l) => l.json()).catch((l) => {
1017
+ console.error("[ERROR FETCH VTEX]", l);
1018
+ });
1019
+ }, le = /* @__PURE__ */ new Map();
1020
+ async function Fl(t, e = {}) {
1021
+ var r;
1022
+ try {
1023
+ const { abort: n = !1 } = e, o = new AbortController();
1024
+ n && (le.has(t) && ((r = le.get(t)) == null || r.abort(), le.delete(t)), le.set(t, o));
1025
+ const a = sr(t, {
1026
+ ...e,
1027
+ ...n ? { signal: o.signal } : {}
1028
+ });
1029
+ return n && le.delete(t), a;
1030
+ } catch (n) {
1031
+ if (n.name === "AbortError") {
1032
+ console.log(`[REQUEST CANCELLED]: ${t}`);
1033
+ return;
1034
+ }
1035
+ throw console.error(`[ERROR API]: ${n.message}`), n;
1036
+ }
1037
+ }
1038
+ const go = U.object({
1039
+ orderFormId: U.string().required(),
1040
+ coupon: U.string().nullable(),
1041
+ utmSource: U.string().optional(),
1042
+ utmMedium: U.string().optional(),
1043
+ utmCampaign: U.string().optional(),
1044
+ utmiCampaign: U.string().optional(),
1045
+ utmiPart: U.string().optional(),
1046
+ utmipage: U.string().optional()
1047
+ });
1048
+ async function ho({
1049
+ apiUrl: t,
1050
+ body: e
1051
+ }) {
1052
+ if (!e) {
1053
+ console.error("[ERROR FETCHING] Body is required");
1054
+ return;
1055
+ }
1056
+ await go.validate(e);
1057
+ const { orderFormId: r, utmiPart: n, coupon: o, ...a } = e, i = `${t}/api/checkout/pub/orderForm/${r}/attachments/marketingData`;
1058
+ return sr(i, {
1059
+ method: "POST",
1060
+ body: {
1061
+ orderFormId: r,
1062
+ utmiPart: n ?? r,
1063
+ coupon: o ?? null,
1064
+ ...a
1065
+ }
1066
+ });
1067
+ }
1068
+ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1069
+ __proto__: null,
1070
+ postMediaData: ho
1071
+ }, Symbol.toStringTag, { value: "Module" })), Ul = ({
1072
+ children: t,
1073
+ data: e,
1074
+ SectionZone: r,
1075
+ className: n
1076
+ }) => {
1077
+ var s, p;
1078
+ const o = ((s = e == null ? void 0 : e.filter((u) => {
1079
+ var y, d;
1080
+ return ((d = (y = u.config) == null ? void 0 : y.responsive) == null ? void 0 : d.deviceType) === "mobile";
1081
+ })[0]) == null ? void 0 : s.sections) || [], a = ((p = e == null ? void 0 : e.filter((u) => {
1082
+ var y, d;
1083
+ return ((d = (y = u.config) == null ? void 0 : y.responsive) == null ? void 0 : d.deviceType) === "desktop";
1084
+ })[0]) == null ? void 0 : p.sections) || [], i = o.slice(0, 1), l = o.slice(1, o.length), c = a.slice(0, 1), f = a.slice(1, a.length);
1085
+ return /* @__PURE__ */ bt(tn, { children: [
1086
+ /* @__PURE__ */ bt("div", { className: n, children: [
1087
+ /* @__PURE__ */ G("div", { className: he["responsive-mobile-flex"], children: /* @__PURE__ */ G(r, { data: i ?? [] }) }),
1088
+ /* @__PURE__ */ G("div", { className: he["responsive-desktop-flex"], children: /* @__PURE__ */ G(r, { data: c ?? [] }) })
1089
+ ] }),
1090
+ t,
1091
+ /* @__PURE__ */ G("div", { className: he["responsive-mobile-flex"], children: /* @__PURE__ */ G(r, { data: l ?? [] }) }),
1092
+ /* @__PURE__ */ G("div", { className: he["responsive-desktop-flex"], children: /* @__PURE__ */ G(r, { data: f ?? [] }) }),
1093
+ /* @__PURE__ */ G(rn.Divider, {})
1094
+ ] });
1095
+ };
1096
+ var oe = TypeError;
1097
+ const _o = {}, Eo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1098
+ __proto__: null,
1099
+ default: _o
1100
+ }, Symbol.toStringTag, { value: "Module" })), So = /* @__PURE__ */ to(Eo);
1101
+ var dt = typeof Map == "function" && Map.prototype, Le = Object.getOwnPropertyDescriptor && dt ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, Pe = dt && Le && typeof Le.get == "function" ? Le.get : null, wt = dt && Map.prototype.forEach, yt = typeof Set == "function" && Set.prototype, Ue = Object.getOwnPropertyDescriptor && yt ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, Re = yt && Ue && typeof Ue.get == "function" ? Ue.get : null, Tt = yt && Set.prototype.forEach, Ao = typeof WeakMap == "function" && WeakMap.prototype, se = Ao ? WeakMap.prototype.has : null, bo = typeof WeakSet == "function" && WeakSet.prototype, ue = bo ? WeakSet.prototype.has : null, Oo = typeof WeakRef == "function" && WeakRef.prototype, Ct = Oo ? WeakRef.prototype.deref : null, Po = Boolean.prototype.valueOf, Ro = Object.prototype.toString, Io = Function.prototype.toString, wo = String.prototype.match, vt = String.prototype.slice, H = String.prototype.replace, To = String.prototype.toUpperCase, Nt = String.prototype.toLowerCase, ur = RegExp.prototype.test, Dt = Array.prototype.concat, M = Array.prototype.join, Co = Array.prototype.slice, xt = Math.floor, ot = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, Ge = Object.getOwnPropertySymbols, at = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, re = typeof Symbol == "function" && typeof Symbol.iterator == "object", fe = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === re || !0) ? Symbol.toStringTag : null, fr = Object.prototype.propertyIsEnumerable, $t = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(t) {
1102
+ return t.__proto__;
1103
+ } : null);
1104
+ function Mt(t, e) {
1105
+ if (t === 1 / 0 || t === -1 / 0 || t !== t || t && t > -1e3 && t < 1e3 || ur.call(/e/, e))
1106
+ return e;
1107
+ var r = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
1108
+ if (typeof t == "number") {
1109
+ var n = t < 0 ? -xt(-t) : xt(t);
1110
+ if (n !== t) {
1111
+ var o = String(n), a = vt.call(e, o.length + 1);
1112
+ return H.call(o, r, "$&_") + "." + H.call(H.call(a, /([0-9]{3})/g, "$&_"), /_$/, "");
1113
+ }
1114
+ }
1115
+ return H.call(e, r, "$&_");
1116
+ }
1117
+ var it = So, Ft = it.custom, Lt = yr(Ft) ? Ft : null, pr = {
1118
+ __proto__: null,
1119
+ double: '"',
1120
+ single: "'"
1121
+ }, No = {
1122
+ __proto__: null,
1123
+ double: /(["\\])/g,
1124
+ single: /(['\\])/g
1125
+ }, Ce = function t(e, r, n, o) {
1126
+ var a = r || {};
1127
+ if (B(a, "quoteStyle") && !B(pr, a.quoteStyle))
1128
+ throw new TypeError('option "quoteStyle" must be "single" or "double"');
1129
+ if (B(a, "maxStringLength") && (typeof a.maxStringLength == "number" ? a.maxStringLength < 0 && a.maxStringLength !== 1 / 0 : a.maxStringLength !== null))
1130
+ throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
1131
+ var i = B(a, "customInspect") ? a.customInspect : !0;
1132
+ if (typeof i != "boolean" && i !== "symbol")
1133
+ throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
1134
+ if (B(a, "indent") && a.indent !== null && a.indent !== " " && !(parseInt(a.indent, 10) === a.indent && a.indent > 0))
1135
+ throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
1136
+ if (B(a, "numericSeparator") && typeof a.numericSeparator != "boolean")
1137
+ throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
1138
+ var l = a.numericSeparator;
1139
+ if (typeof e > "u")
1140
+ return "undefined";
1141
+ if (e === null)
1142
+ return "null";
1143
+ if (typeof e == "boolean")
1144
+ return e ? "true" : "false";
1145
+ if (typeof e == "string")
1146
+ return mr(e, a);
1147
+ if (typeof e == "number") {
1148
+ if (e === 0)
1149
+ return 1 / 0 / e > 0 ? "0" : "-0";
1150
+ var c = String(e);
1151
+ return l ? Mt(e, c) : c;
1152
+ }
1153
+ if (typeof e == "bigint") {
1154
+ var f = String(e) + "n";
1155
+ return l ? Mt(e, f) : f;
1156
+ }
1157
+ var s = typeof a.depth > "u" ? 5 : a.depth;
1158
+ if (typeof n > "u" && (n = 0), n >= s && s > 0 && typeof e == "object")
1159
+ return lt(e) ? "[Array]" : "[Object]";
1160
+ var p = Ko(a, n);
1161
+ if (typeof o > "u")
1162
+ o = [];
1163
+ else if (vr(o, e) >= 0)
1164
+ return "[Circular]";
1165
+ function u(b, D, w) {
1166
+ if (D && (o = Co.call(o), o.push(D)), w) {
1167
+ var q = {
1168
+ depth: a.depth
1169
+ };
1170
+ return B(a, "quoteStyle") && (q.quoteStyle = a.quoteStyle), t(b, q, n + 1, o);
1171
+ }
1172
+ return t(b, a, n + 1, o);
1173
+ }
1174
+ if (typeof e == "function" && !Ut(e)) {
1175
+ var y = Bo(e), d = _e(e, u);
1176
+ return "[Function" + (y ? ": " + y : " (anonymous)") + "]" + (d.length > 0 ? " { " + M.call(d, ", ") + " }" : "");
1177
+ }
1178
+ if (yr(e)) {
1179
+ var h = re ? H.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : at.call(e);
1180
+ return typeof e == "object" && !re ? ce(h) : h;
1181
+ }
1182
+ if (qo(e)) {
1183
+ for (var E = "<" + Nt.call(String(e.nodeName)), O = e.attributes || [], P = 0; P < O.length; P++)
1184
+ E += " " + O[P].name + "=" + dr(Do(O[P].value), "double", a);
1185
+ return E += ">", e.childNodes && e.childNodes.length && (E += "..."), E += "</" + Nt.call(String(e.nodeName)) + ">", E;
1186
+ }
1187
+ if (lt(e)) {
1188
+ if (e.length === 0)
1189
+ return "[]";
1190
+ var m = _e(e, u);
1191
+ return p && !zo(m) ? "[" + ct(m, p) + "]" : "[ " + M.call(m, ", ") + " ]";
1192
+ }
1193
+ if ($o(e)) {
1194
+ var R = _e(e, u);
1195
+ return !("cause" in Error.prototype) && "cause" in e && !fr.call(e, "cause") ? "{ [" + String(e) + "] " + M.call(Dt.call("[cause]: " + u(e.cause), R), ", ") + " }" : R.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + M.call(R, ", ") + " }";
1196
+ }
1197
+ if (typeof e == "object" && i) {
1198
+ if (Lt && typeof e[Lt] == "function" && it)
1199
+ return it(e, { depth: s - n });
1200
+ if (i !== "symbol" && typeof e.inspect == "function")
1201
+ return e.inspect();
1202
+ }
1203
+ if (jo(e)) {
1204
+ var I = [];
1205
+ return wt && wt.call(e, function(b, D) {
1206
+ I.push(u(D, e, !0) + " => " + u(b, e));
1207
+ }), Gt("Map", Pe.call(e), I, p);
1208
+ }
1209
+ if (Xo(e)) {
1210
+ var F = [];
1211
+ return Tt && Tt.call(e, function(b) {
1212
+ F.push(u(b, e));
1213
+ }), Gt("Set", Re.call(e), F, p);
1214
+ }
1215
+ if (ko(e))
1216
+ return Be("WeakMap");
1217
+ if (Wo(e))
1218
+ return Be("WeakSet");
1219
+ if (Ho(e))
1220
+ return Be("WeakRef");
1221
+ if (Fo(e))
1222
+ return ce(u(Number(e)));
1223
+ if (Uo(e))
1224
+ return ce(u(ot.call(e)));
1225
+ if (Lo(e))
1226
+ return ce(Po.call(e));
1227
+ if (Mo(e))
1228
+ return ce(u(String(e)));
1229
+ if (typeof window < "u" && e === window)
1230
+ return "{ [object Window] }";
1231
+ if (typeof globalThis < "u" && e === globalThis || typeof Rt < "u" && e === Rt)
1232
+ return "{ [object globalThis] }";
1233
+ if (!xo(e) && !Ut(e)) {
1234
+ var C = _e(e, u), j = $t ? $t(e) === Object.prototype : e instanceof Object || e.constructor === Object, L = e instanceof Object ? "" : "null prototype", N = !j && fe && Object(e) === e && fe in e ? vt.call(W(e), 8, -1) : L ? "Object" : "", Q = j || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : "", k = Q + (N || L ? "[" + M.call(Dt.call([], N || [], L || []), ": ") + "] " : "");
1235
+ return C.length === 0 ? k + "{}" : p ? k + "{" + ct(C, p) + "}" : k + "{ " + M.call(C, ", ") + " }";
1236
+ }
1237
+ return String(e);
1238
+ };
1239
+ function dr(t, e, r) {
1240
+ var n = r.quoteStyle || e, o = pr[n];
1241
+ return o + t + o;
1242
+ }
1243
+ function Do(t) {
1244
+ return H.call(String(t), /"/g, "&quot;");
1245
+ }
1246
+ function Y(t) {
1247
+ return !fe || !(typeof t == "object" && (fe in t || typeof t[fe] < "u"));
1248
+ }
1249
+ function lt(t) {
1250
+ return W(t) === "[object Array]" && Y(t);
1251
+ }
1252
+ function xo(t) {
1253
+ return W(t) === "[object Date]" && Y(t);
1254
+ }
1255
+ function Ut(t) {
1256
+ return W(t) === "[object RegExp]" && Y(t);
1257
+ }
1258
+ function $o(t) {
1259
+ return W(t) === "[object Error]" && Y(t);
1260
+ }
1261
+ function Mo(t) {
1262
+ return W(t) === "[object String]" && Y(t);
1263
+ }
1264
+ function Fo(t) {
1265
+ return W(t) === "[object Number]" && Y(t);
1266
+ }
1267
+ function Lo(t) {
1268
+ return W(t) === "[object Boolean]" && Y(t);
1269
+ }
1270
+ function yr(t) {
1271
+ if (re)
1272
+ return t && typeof t == "object" && t instanceof Symbol;
1273
+ if (typeof t == "symbol")
1274
+ return !0;
1275
+ if (!t || typeof t != "object" || !at)
1276
+ return !1;
1277
+ try {
1278
+ return at.call(t), !0;
1279
+ } catch {
1280
+ }
1281
+ return !1;
1282
+ }
1283
+ function Uo(t) {
1284
+ if (!t || typeof t != "object" || !ot)
1285
+ return !1;
1286
+ try {
1287
+ return ot.call(t), !0;
1288
+ } catch {
1289
+ }
1290
+ return !1;
1291
+ }
1292
+ var Go = Object.prototype.hasOwnProperty || function(t) {
1293
+ return t in this;
1294
+ };
1295
+ function B(t, e) {
1296
+ return Go.call(t, e);
1297
+ }
1298
+ function W(t) {
1299
+ return Ro.call(t);
1300
+ }
1301
+ function Bo(t) {
1302
+ if (t.name)
1303
+ return t.name;
1304
+ var e = wo.call(Io.call(t), /^function\s*([\w$]+)/);
1305
+ return e ? e[1] : null;
1306
+ }
1307
+ function vr(t, e) {
1308
+ if (t.indexOf)
1309
+ return t.indexOf(e);
1310
+ for (var r = 0, n = t.length; r < n; r++)
1311
+ if (t[r] === e)
1312
+ return r;
1313
+ return -1;
1314
+ }
1315
+ function jo(t) {
1316
+ if (!Pe || !t || typeof t != "object")
1317
+ return !1;
1318
+ try {
1319
+ Pe.call(t);
1320
+ try {
1321
+ Re.call(t);
1322
+ } catch {
1323
+ return !0;
1324
+ }
1325
+ return t instanceof Map;
1326
+ } catch {
1327
+ }
1328
+ return !1;
1329
+ }
1330
+ function ko(t) {
1331
+ if (!se || !t || typeof t != "object")
1332
+ return !1;
1333
+ try {
1334
+ se.call(t, se);
1335
+ try {
1336
+ ue.call(t, ue);
1337
+ } catch {
1338
+ return !0;
1339
+ }
1340
+ return t instanceof WeakMap;
1341
+ } catch {
1342
+ }
1343
+ return !1;
1344
+ }
1345
+ function Ho(t) {
1346
+ if (!Ct || !t || typeof t != "object")
1347
+ return !1;
1348
+ try {
1349
+ return Ct.call(t), !0;
1350
+ } catch {
1351
+ }
1352
+ return !1;
1353
+ }
1354
+ function Xo(t) {
1355
+ if (!Re || !t || typeof t != "object")
1356
+ return !1;
1357
+ try {
1358
+ Re.call(t);
1359
+ try {
1360
+ Pe.call(t);
1361
+ } catch {
1362
+ return !0;
1363
+ }
1364
+ return t instanceof Set;
1365
+ } catch {
1366
+ }
1367
+ return !1;
1368
+ }
1369
+ function Wo(t) {
1370
+ if (!ue || !t || typeof t != "object")
1371
+ return !1;
1372
+ try {
1373
+ ue.call(t, ue);
1374
+ try {
1375
+ se.call(t, se);
1376
+ } catch {
1377
+ return !0;
1378
+ }
1379
+ return t instanceof WeakSet;
1380
+ } catch {
1381
+ }
1382
+ return !1;
1383
+ }
1384
+ function qo(t) {
1385
+ return !t || typeof t != "object" ? !1 : typeof HTMLElement < "u" && t instanceof HTMLElement ? !0 : typeof t.nodeName == "string" && typeof t.getAttribute == "function";
1386
+ }
1387
+ function mr(t, e) {
1388
+ if (t.length > e.maxStringLength) {
1389
+ var r = t.length - e.maxStringLength, n = "... " + r + " more character" + (r > 1 ? "s" : "");
1390
+ return mr(vt.call(t, 0, e.maxStringLength), e) + n;
1391
+ }
1392
+ var o = No[e.quoteStyle || "single"];
1393
+ o.lastIndex = 0;
1394
+ var a = H.call(H.call(t, o, "\\$1"), /[\x00-\x1f]/g, Vo);
1395
+ return dr(a, "single", e);
1396
+ }
1397
+ function Vo(t) {
1398
+ var e = t.charCodeAt(0), r = {
1399
+ 8: "b",
1400
+ 9: "t",
1401
+ 10: "n",
1402
+ 12: "f",
1403
+ 13: "r"
1404
+ }[e];
1405
+ return r ? "\\" + r : "\\x" + (e < 16 ? "0" : "") + To.call(e.toString(16));
1406
+ }
1407
+ function ce(t) {
1408
+ return "Object(" + t + ")";
1409
+ }
1410
+ function Be(t) {
1411
+ return t + " { ? }";
1412
+ }
1413
+ function Gt(t, e, r, n) {
1414
+ var o = n ? ct(r, n) : M.call(r, ", ");
1415
+ return t + " (" + e + ") {" + o + "}";
1416
+ }
1417
+ function zo(t) {
1418
+ for (var e = 0; e < t.length; e++)
1419
+ if (vr(t[e], `
1420
+ `) >= 0)
1421
+ return !1;
1422
+ return !0;
1423
+ }
1424
+ function Ko(t, e) {
1425
+ var r;
1426
+ if (t.indent === " ")
1427
+ r = " ";
1428
+ else if (typeof t.indent == "number" && t.indent > 0)
1429
+ r = M.call(Array(t.indent + 1), " ");
1430
+ else
1431
+ return null;
1432
+ return {
1433
+ base: r,
1434
+ prev: M.call(Array(e + 1), r)
1435
+ };
1436
+ }
1437
+ function ct(t, e) {
1438
+ if (t.length === 0)
1439
+ return "";
1440
+ var r = `
1441
+ ` + e.prev + e.base;
1442
+ return r + M.call(t, "," + r) + `
1443
+ ` + e.prev;
1444
+ }
1445
+ function _e(t, e) {
1446
+ var r = lt(t), n = [];
1447
+ if (r) {
1448
+ n.length = t.length;
1449
+ for (var o = 0; o < t.length; o++)
1450
+ n[o] = B(t, o) ? e(t[o], t) : "";
1451
+ }
1452
+ var a = typeof Ge == "function" ? Ge(t) : [], i;
1453
+ if (re) {
1454
+ i = {};
1455
+ for (var l = 0; l < a.length; l++)
1456
+ i["$" + a[l]] = a[l];
1457
+ }
1458
+ for (var c in t)
1459
+ B(t, c) && (r && String(Number(c)) === c && c < t.length || re && i["$" + c] instanceof Symbol || (ur.call(/[^\w$]/, c) ? n.push(e(c, t) + ": " + e(t[c], t)) : n.push(c + ": " + e(t[c], t))));
1460
+ if (typeof Ge == "function")
1461
+ for (var f = 0; f < a.length; f++)
1462
+ fr.call(t, a[f]) && n.push("[" + e(a[f]) + "]: " + e(t[a[f]], t));
1463
+ return n;
1464
+ }
1465
+ var Yo = Ce, Qo = oe, Ne = function(t, e, r) {
1466
+ for (var n = t, o; (o = n.next) != null; n = o)
1467
+ if (o.key === e)
1468
+ return n.next = o.next, r || (o.next = /** @type {NonNullable<typeof list.next>} */
1469
+ t.next, t.next = o), o;
1470
+ }, Jo = function(t, e) {
1471
+ if (t) {
1472
+ var r = Ne(t, e);
1473
+ return r && r.value;
1474
+ }
1475
+ }, Zo = function(t, e, r) {
1476
+ var n = Ne(t, e);
1477
+ n ? n.value = r : t.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */
1478
+ {
1479
+ // eslint-disable-line no-param-reassign, no-extra-parens
1480
+ key: e,
1481
+ next: t.next,
1482
+ value: r
1483
+ };
1484
+ }, ea = function(t, e) {
1485
+ return t ? !!Ne(t, e) : !1;
1486
+ }, ta = function(t, e) {
1487
+ if (t)
1488
+ return Ne(t, e, !0);
1489
+ }, ra = function() {
1490
+ var e, r = {
1491
+ assert: function(n) {
1492
+ if (!r.has(n))
1493
+ throw new Qo("Side channel does not contain " + Yo(n));
1494
+ },
1495
+ delete: function(n) {
1496
+ var o = e && e.next, a = ta(e, n);
1497
+ return a && o && o === a && (e = void 0), !!a;
1498
+ },
1499
+ get: function(n) {
1500
+ return Jo(e, n);
1501
+ },
1502
+ has: function(n) {
1503
+ return ea(e, n);
1504
+ },
1505
+ set: function(n, o) {
1506
+ e || (e = {
1507
+ next: void 0
1508
+ }), Zo(
1509
+ /** @type {NonNullable<typeof $o>} */
1510
+ e,
1511
+ n,
1512
+ o
1513
+ );
1514
+ }
1515
+ };
1516
+ return r;
1517
+ }, gr = Object, na = Error, oa = EvalError, aa = RangeError, ia = ReferenceError, la = SyntaxError, ca = URIError, sa = Math.abs, ua = Math.floor, fa = Math.max, pa = Math.min, da = Math.pow, ya = Math.round, va = Number.isNaN || function(e) {
1518
+ return e !== e;
1519
+ }, ma = va, ga = function(e) {
1520
+ return ma(e) || e === 0 ? e : e < 0 ? -1 : 1;
1521
+ }, ha = Object.getOwnPropertyDescriptor, Se = ha;
1522
+ if (Se)
1523
+ try {
1524
+ Se([], "length");
1525
+ } catch {
1526
+ Se = null;
1527
+ }
1528
+ var hr = Se, Ae = Object.defineProperty || !1;
1529
+ if (Ae)
1530
+ try {
1531
+ Ae({}, "a", { value: 1 });
1532
+ } catch {
1533
+ Ae = !1;
1534
+ }
1535
+ var _a = Ae, je, Bt;
1536
+ function Ea() {
1537
+ return Bt || (Bt = 1, je = function() {
1538
+ if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
1539
+ return !1;
1540
+ if (typeof Symbol.iterator == "symbol")
1541
+ return !0;
1542
+ var e = {}, r = Symbol("test"), n = Object(r);
1543
+ if (typeof r == "string" || Object.prototype.toString.call(r) !== "[object Symbol]" || Object.prototype.toString.call(n) !== "[object Symbol]")
1544
+ return !1;
1545
+ var o = 42;
1546
+ e[r] = o;
1547
+ for (var a in e)
1548
+ return !1;
1549
+ if (typeof Object.keys == "function" && Object.keys(e).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(e).length !== 0)
1550
+ return !1;
1551
+ var i = Object.getOwnPropertySymbols(e);
1552
+ if (i.length !== 1 || i[0] !== r || !Object.prototype.propertyIsEnumerable.call(e, r))
1553
+ return !1;
1554
+ if (typeof Object.getOwnPropertyDescriptor == "function") {
1555
+ var l = (
1556
+ /** @type {PropertyDescriptor} */
1557
+ Object.getOwnPropertyDescriptor(e, r)
1558
+ );
1559
+ if (l.value !== o || l.enumerable !== !0)
1560
+ return !1;
1561
+ }
1562
+ return !0;
1563
+ }), je;
1564
+ }
1565
+ var ke, jt;
1566
+ function Sa() {
1567
+ if (jt) return ke;
1568
+ jt = 1;
1569
+ var t = typeof Symbol < "u" && Symbol, e = Ea();
1570
+ return ke = function() {
1571
+ return typeof t != "function" || typeof Symbol != "function" || typeof t("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : e();
1572
+ }, ke;
1573
+ }
1574
+ var He, kt;
1575
+ function _r() {
1576
+ return kt || (kt = 1, He = typeof Reflect < "u" && Reflect.getPrototypeOf || null), He;
1577
+ }
1578
+ var Xe, Ht;
1579
+ function Er() {
1580
+ if (Ht) return Xe;
1581
+ Ht = 1;
1582
+ var t = gr;
1583
+ return Xe = t.getPrototypeOf || null, Xe;
1584
+ }
1585
+ var Aa = "Function.prototype.bind called on incompatible ", ba = Object.prototype.toString, Oa = Math.max, Pa = "[object Function]", Xt = function(e, r) {
1586
+ for (var n = [], o = 0; o < e.length; o += 1)
1587
+ n[o] = e[o];
1588
+ for (var a = 0; a < r.length; a += 1)
1589
+ n[a + e.length] = r[a];
1590
+ return n;
1591
+ }, Ra = function(e, r) {
1592
+ for (var n = [], o = r, a = 0; o < e.length; o += 1, a += 1)
1593
+ n[a] = e[o];
1594
+ return n;
1595
+ }, Ia = function(t, e) {
1596
+ for (var r = "", n = 0; n < t.length; n += 1)
1597
+ r += t[n], n + 1 < t.length && (r += e);
1598
+ return r;
1599
+ }, wa = function(e) {
1600
+ var r = this;
1601
+ if (typeof r != "function" || ba.apply(r) !== Pa)
1602
+ throw new TypeError(Aa + r);
1603
+ for (var n = Ra(arguments, 1), o, a = function() {
1604
+ if (this instanceof o) {
1605
+ var s = r.apply(
1606
+ this,
1607
+ Xt(n, arguments)
1608
+ );
1609
+ return Object(s) === s ? s : this;
1610
+ }
1611
+ return r.apply(
1612
+ e,
1613
+ Xt(n, arguments)
1614
+ );
1615
+ }, i = Oa(0, r.length - n.length), l = [], c = 0; c < i; c++)
1616
+ l[c] = "$" + c;
1617
+ if (o = Function("binder", "return function (" + Ia(l, ",") + "){ return binder.apply(this,arguments); }")(a), r.prototype) {
1618
+ var f = function() {
1619
+ };
1620
+ f.prototype = r.prototype, o.prototype = new f(), f.prototype = null;
1621
+ }
1622
+ return o;
1623
+ }, Ta = wa, De = Function.prototype.bind || Ta, We, Wt;
1624
+ function mt() {
1625
+ return Wt || (Wt = 1, We = Function.prototype.call), We;
1626
+ }
1627
+ var qe, qt;
1628
+ function Sr() {
1629
+ return qt || (qt = 1, qe = Function.prototype.apply), qe;
1630
+ }
1631
+ var Ca = typeof Reflect < "u" && Reflect && Reflect.apply, Na = De, Da = Sr(), xa = mt(), $a = Ca, Ma = $a || Na.call(xa, Da), Fa = De, La = oe, Ua = mt(), Ga = Ma, Ar = function(e) {
1632
+ if (e.length < 1 || typeof e[0] != "function")
1633
+ throw new La("a function is required");
1634
+ return Ga(Fa, Ua, e);
1635
+ }, Ve, Vt;
1636
+ function Ba() {
1637
+ if (Vt) return Ve;
1638
+ Vt = 1;
1639
+ var t = Ar, e = hr, r;
1640
+ try {
1641
+ r = /** @type {{ __proto__?: typeof Array.prototype }} */
1642
+ [].__proto__ === Array.prototype;
1643
+ } catch (i) {
1644
+ if (!i || typeof i != "object" || !("code" in i) || i.code !== "ERR_PROTO_ACCESS")
1645
+ throw i;
1646
+ }
1647
+ var n = !!r && e && e(
1648
+ Object.prototype,
1649
+ /** @type {keyof typeof Object.prototype} */
1650
+ "__proto__"
1651
+ ), o = Object, a = o.getPrototypeOf;
1652
+ return Ve = n && typeof n.get == "function" ? t([n.get]) : typeof a == "function" ? (
1653
+ /** @type {import('./get')} */
1654
+ function(l) {
1655
+ return a(l == null ? l : o(l));
1656
+ }
1657
+ ) : !1, Ve;
1658
+ }
1659
+ var ze, zt;
1660
+ function ja() {
1661
+ if (zt) return ze;
1662
+ zt = 1;
1663
+ var t = _r(), e = Er(), r = Ba();
1664
+ return ze = t ? function(o) {
1665
+ return t(o);
1666
+ } : e ? function(o) {
1667
+ if (!o || typeof o != "object" && typeof o != "function")
1668
+ throw new TypeError("getProto: not an object");
1669
+ return e(o);
1670
+ } : r ? function(o) {
1671
+ return r(o);
1672
+ } : null, ze;
1673
+ }
1674
+ var Ke, Kt;
1675
+ function ka() {
1676
+ if (Kt) return Ke;
1677
+ Kt = 1;
1678
+ var t = Function.prototype.call, e = Object.prototype.hasOwnProperty, r = De;
1679
+ return Ke = r.call(t, e), Ke;
1680
+ }
1681
+ var v, Ha = gr, Xa = na, Wa = oa, qa = aa, Va = ia, ne = la, te = oe, za = ca, Ka = sa, Ya = ua, Qa = fa, Ja = pa, Za = da, ei = ya, ti = ga, br = Function, Ye = function(t) {
1682
+ try {
1683
+ return br('"use strict"; return (' + t + ").constructor;")();
1684
+ } catch {
1685
+ }
1686
+ }, de = hr, ri = _a, Qe = function() {
1687
+ throw new te();
1688
+ }, ni = de ? function() {
1689
+ try {
1690
+ return arguments.callee, Qe;
1691
+ } catch {
1692
+ try {
1693
+ return de(arguments, "callee").get;
1694
+ } catch {
1695
+ return Qe;
1696
+ }
1697
+ }
1698
+ }() : Qe, J = Sa()(), A = ja(), oi = Er(), ai = _r(), Or = Sr(), ye = mt(), ee = {}, ii = typeof Uint8Array > "u" || !A ? v : A(Uint8Array), K = {
1699
+ __proto__: null,
1700
+ "%AggregateError%": typeof AggregateError > "u" ? v : AggregateError,
1701
+ "%Array%": Array,
1702
+ "%ArrayBuffer%": typeof ArrayBuffer > "u" ? v : ArrayBuffer,
1703
+ "%ArrayIteratorPrototype%": J && A ? A([][Symbol.iterator]()) : v,
1704
+ "%AsyncFromSyncIteratorPrototype%": v,
1705
+ "%AsyncFunction%": ee,
1706
+ "%AsyncGenerator%": ee,
1707
+ "%AsyncGeneratorFunction%": ee,
1708
+ "%AsyncIteratorPrototype%": ee,
1709
+ "%Atomics%": typeof Atomics > "u" ? v : Atomics,
1710
+ "%BigInt%": typeof BigInt > "u" ? v : BigInt,
1711
+ "%BigInt64Array%": typeof BigInt64Array > "u" ? v : BigInt64Array,
1712
+ "%BigUint64Array%": typeof BigUint64Array > "u" ? v : BigUint64Array,
1713
+ "%Boolean%": Boolean,
1714
+ "%DataView%": typeof DataView > "u" ? v : DataView,
1715
+ "%Date%": Date,
1716
+ "%decodeURI%": decodeURI,
1717
+ "%decodeURIComponent%": decodeURIComponent,
1718
+ "%encodeURI%": encodeURI,
1719
+ "%encodeURIComponent%": encodeURIComponent,
1720
+ "%Error%": Xa,
1721
+ "%eval%": eval,
1722
+ // eslint-disable-line no-eval
1723
+ "%EvalError%": Wa,
1724
+ "%Float16Array%": typeof Float16Array > "u" ? v : Float16Array,
1725
+ "%Float32Array%": typeof Float32Array > "u" ? v : Float32Array,
1726
+ "%Float64Array%": typeof Float64Array > "u" ? v : Float64Array,
1727
+ "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? v : FinalizationRegistry,
1728
+ "%Function%": br,
1729
+ "%GeneratorFunction%": ee,
1730
+ "%Int8Array%": typeof Int8Array > "u" ? v : Int8Array,
1731
+ "%Int16Array%": typeof Int16Array > "u" ? v : Int16Array,
1732
+ "%Int32Array%": typeof Int32Array > "u" ? v : Int32Array,
1733
+ "%isFinite%": isFinite,
1734
+ "%isNaN%": isNaN,
1735
+ "%IteratorPrototype%": J && A ? A(A([][Symbol.iterator]())) : v,
1736
+ "%JSON%": typeof JSON == "object" ? JSON : v,
1737
+ "%Map%": typeof Map > "u" ? v : Map,
1738
+ "%MapIteratorPrototype%": typeof Map > "u" || !J || !A ? v : A((/* @__PURE__ */ new Map())[Symbol.iterator]()),
1739
+ "%Math%": Math,
1740
+ "%Number%": Number,
1741
+ "%Object%": Ha,
1742
+ "%Object.getOwnPropertyDescriptor%": de,
1743
+ "%parseFloat%": parseFloat,
1744
+ "%parseInt%": parseInt,
1745
+ "%Promise%": typeof Promise > "u" ? v : Promise,
1746
+ "%Proxy%": typeof Proxy > "u" ? v : Proxy,
1747
+ "%RangeError%": qa,
1748
+ "%ReferenceError%": Va,
1749
+ "%Reflect%": typeof Reflect > "u" ? v : Reflect,
1750
+ "%RegExp%": RegExp,
1751
+ "%Set%": typeof Set > "u" ? v : Set,
1752
+ "%SetIteratorPrototype%": typeof Set > "u" || !J || !A ? v : A((/* @__PURE__ */ new Set())[Symbol.iterator]()),
1753
+ "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? v : SharedArrayBuffer,
1754
+ "%String%": String,
1755
+ "%StringIteratorPrototype%": J && A ? A(""[Symbol.iterator]()) : v,
1756
+ "%Symbol%": J ? Symbol : v,
1757
+ "%SyntaxError%": ne,
1758
+ "%ThrowTypeError%": ni,
1759
+ "%TypedArray%": ii,
1760
+ "%TypeError%": te,
1761
+ "%Uint8Array%": typeof Uint8Array > "u" ? v : Uint8Array,
1762
+ "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? v : Uint8ClampedArray,
1763
+ "%Uint16Array%": typeof Uint16Array > "u" ? v : Uint16Array,
1764
+ "%Uint32Array%": typeof Uint32Array > "u" ? v : Uint32Array,
1765
+ "%URIError%": za,
1766
+ "%WeakMap%": typeof WeakMap > "u" ? v : WeakMap,
1767
+ "%WeakRef%": typeof WeakRef > "u" ? v : WeakRef,
1768
+ "%WeakSet%": typeof WeakSet > "u" ? v : WeakSet,
1769
+ "%Function.prototype.call%": ye,
1770
+ "%Function.prototype.apply%": Or,
1771
+ "%Object.defineProperty%": ri,
1772
+ "%Object.getPrototypeOf%": oi,
1773
+ "%Math.abs%": Ka,
1774
+ "%Math.floor%": Ya,
1775
+ "%Math.max%": Qa,
1776
+ "%Math.min%": Ja,
1777
+ "%Math.pow%": Za,
1778
+ "%Math.round%": ei,
1779
+ "%Math.sign%": ti,
1780
+ "%Reflect.getPrototypeOf%": ai
1781
+ };
1782
+ if (A)
1783
+ try {
1784
+ null.error;
1785
+ } catch (t) {
1786
+ var li = A(A(t));
1787
+ K["%Error.prototype%"] = li;
1788
+ }
1789
+ var ci = function t(e) {
1790
+ var r;
1791
+ if (e === "%AsyncFunction%")
1792
+ r = Ye("async function () {}");
1793
+ else if (e === "%GeneratorFunction%")
1794
+ r = Ye("function* () {}");
1795
+ else if (e === "%AsyncGeneratorFunction%")
1796
+ r = Ye("async function* () {}");
1797
+ else if (e === "%AsyncGenerator%") {
1798
+ var n = t("%AsyncGeneratorFunction%");
1799
+ n && (r = n.prototype);
1800
+ } else if (e === "%AsyncIteratorPrototype%") {
1801
+ var o = t("%AsyncGenerator%");
1802
+ o && A && (r = A(o.prototype));
1803
+ }
1804
+ return K[e] = r, r;
1805
+ }, Yt = {
1806
+ __proto__: null,
1807
+ "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
1808
+ "%ArrayPrototype%": ["Array", "prototype"],
1809
+ "%ArrayProto_entries%": ["Array", "prototype", "entries"],
1810
+ "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
1811
+ "%ArrayProto_keys%": ["Array", "prototype", "keys"],
1812
+ "%ArrayProto_values%": ["Array", "prototype", "values"],
1813
+ "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
1814
+ "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
1815
+ "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
1816
+ "%BooleanPrototype%": ["Boolean", "prototype"],
1817
+ "%DataViewPrototype%": ["DataView", "prototype"],
1818
+ "%DatePrototype%": ["Date", "prototype"],
1819
+ "%ErrorPrototype%": ["Error", "prototype"],
1820
+ "%EvalErrorPrototype%": ["EvalError", "prototype"],
1821
+ "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
1822
+ "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
1823
+ "%FunctionPrototype%": ["Function", "prototype"],
1824
+ "%Generator%": ["GeneratorFunction", "prototype"],
1825
+ "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
1826
+ "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
1827
+ "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
1828
+ "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
1829
+ "%JSONParse%": ["JSON", "parse"],
1830
+ "%JSONStringify%": ["JSON", "stringify"],
1831
+ "%MapPrototype%": ["Map", "prototype"],
1832
+ "%NumberPrototype%": ["Number", "prototype"],
1833
+ "%ObjectPrototype%": ["Object", "prototype"],
1834
+ "%ObjProto_toString%": ["Object", "prototype", "toString"],
1835
+ "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
1836
+ "%PromisePrototype%": ["Promise", "prototype"],
1837
+ "%PromiseProto_then%": ["Promise", "prototype", "then"],
1838
+ "%Promise_all%": ["Promise", "all"],
1839
+ "%Promise_reject%": ["Promise", "reject"],
1840
+ "%Promise_resolve%": ["Promise", "resolve"],
1841
+ "%RangeErrorPrototype%": ["RangeError", "prototype"],
1842
+ "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
1843
+ "%RegExpPrototype%": ["RegExp", "prototype"],
1844
+ "%SetPrototype%": ["Set", "prototype"],
1845
+ "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
1846
+ "%StringPrototype%": ["String", "prototype"],
1847
+ "%SymbolPrototype%": ["Symbol", "prototype"],
1848
+ "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
1849
+ "%TypedArrayPrototype%": ["TypedArray", "prototype"],
1850
+ "%TypeErrorPrototype%": ["TypeError", "prototype"],
1851
+ "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
1852
+ "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
1853
+ "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
1854
+ "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
1855
+ "%URIErrorPrototype%": ["URIError", "prototype"],
1856
+ "%WeakMapPrototype%": ["WeakMap", "prototype"],
1857
+ "%WeakSetPrototype%": ["WeakSet", "prototype"]
1858
+ }, ve = De, Ie = ka(), si = ve.call(ye, Array.prototype.concat), ui = ve.call(Or, Array.prototype.splice), Qt = ve.call(ye, String.prototype.replace), we = ve.call(ye, String.prototype.slice), fi = ve.call(ye, RegExp.prototype.exec), pi = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, di = /\\(\\)?/g, yi = function(e) {
1859
+ var r = we(e, 0, 1), n = we(e, -1);
1860
+ if (r === "%" && n !== "%")
1861
+ throw new ne("invalid intrinsic syntax, expected closing `%`");
1862
+ if (n === "%" && r !== "%")
1863
+ throw new ne("invalid intrinsic syntax, expected opening `%`");
1864
+ var o = [];
1865
+ return Qt(e, pi, function(a, i, l, c) {
1866
+ o[o.length] = l ? Qt(c, di, "$1") : i || a;
1867
+ }), o;
1868
+ }, vi = function(e, r) {
1869
+ var n = e, o;
1870
+ if (Ie(Yt, n) && (o = Yt[n], n = "%" + o[0] + "%"), Ie(K, n)) {
1871
+ var a = K[n];
1872
+ if (a === ee && (a = ci(n)), typeof a > "u" && !r)
1873
+ throw new te("intrinsic " + e + " exists, but is not available. Please file an issue!");
1874
+ return {
1875
+ alias: o,
1876
+ name: n,
1877
+ value: a
1878
+ };
1879
+ }
1880
+ throw new ne("intrinsic " + e + " does not exist!");
1881
+ }, gt = function(e, r) {
1882
+ if (typeof e != "string" || e.length === 0)
1883
+ throw new te("intrinsic name must be a non-empty string");
1884
+ if (arguments.length > 1 && typeof r != "boolean")
1885
+ throw new te('"allowMissing" argument must be a boolean');
1886
+ if (fi(/^%?[^%]*%?$/, e) === null)
1887
+ throw new ne("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
1888
+ var n = yi(e), o = n.length > 0 ? n[0] : "", a = vi("%" + o + "%", r), i = a.name, l = a.value, c = !1, f = a.alias;
1889
+ f && (o = f[0], ui(n, si([0, 1], f)));
1890
+ for (var s = 1, p = !0; s < n.length; s += 1) {
1891
+ var u = n[s], y = we(u, 0, 1), d = we(u, -1);
1892
+ if ((y === '"' || y === "'" || y === "`" || d === '"' || d === "'" || d === "`") && y !== d)
1893
+ throw new ne("property names with quotes must have matching quotes");
1894
+ if ((u === "constructor" || !p) && (c = !0), o += "." + u, i = "%" + o + "%", Ie(K, i))
1895
+ l = K[i];
1896
+ else if (l != null) {
1897
+ if (!(u in l)) {
1898
+ if (!r)
1899
+ throw new te("base intrinsic for " + e + " exists, but the property is not available.");
1900
+ return;
1901
+ }
1902
+ if (de && s + 1 >= n.length) {
1903
+ var h = de(l, u);
1904
+ p = !!h, p && "get" in h && !("originalValue" in h.get) ? l = h.get : l = l[u];
1905
+ } else
1906
+ p = Ie(l, u), l = l[u];
1907
+ p && !c && (K[i] = l);
1908
+ }
1909
+ }
1910
+ return l;
1911
+ }, Pr = gt, Rr = Ar, mi = Rr([Pr("%String.prototype.indexOf%")]), Ir = function(e, r) {
1912
+ var n = (
1913
+ /** @type {(this: unknown, ...args: unknown[]) => unknown} */
1914
+ Pr(e, !!r)
1915
+ );
1916
+ return typeof n == "function" && mi(e, ".prototype.") > -1 ? Rr(
1917
+ /** @type {const} */
1918
+ [n]
1919
+ ) : n;
1920
+ }, gi = gt, me = Ir, hi = Ce, _i = oe, Jt = gi("%Map%", !0), Ei = me("Map.prototype.get", !0), Si = me("Map.prototype.set", !0), Ai = me("Map.prototype.has", !0), bi = me("Map.prototype.delete", !0), Oi = me("Map.prototype.size", !0), wr = !!Jt && /** @type {Exclude<import('.'), false>} */
1921
+ function() {
1922
+ var e, r = {
1923
+ assert: function(n) {
1924
+ if (!r.has(n))
1925
+ throw new _i("Side channel does not contain " + hi(n));
1926
+ },
1927
+ delete: function(n) {
1928
+ if (e) {
1929
+ var o = bi(e, n);
1930
+ return Oi(e) === 0 && (e = void 0), o;
1931
+ }
1932
+ return !1;
1933
+ },
1934
+ get: function(n) {
1935
+ if (e)
1936
+ return Ei(e, n);
1937
+ },
1938
+ has: function(n) {
1939
+ return e ? Ai(e, n) : !1;
1940
+ },
1941
+ set: function(n, o) {
1942
+ e || (e = new Jt()), Si(e, n, o);
1943
+ }
1944
+ };
1945
+ return r;
1946
+ }, Pi = gt, xe = Ir, Ri = Ce, Ee = wr, Ii = oe, Z = Pi("%WeakMap%", !0), wi = xe("WeakMap.prototype.get", !0), Ti = xe("WeakMap.prototype.set", !0), Ci = xe("WeakMap.prototype.has", !0), Ni = xe("WeakMap.prototype.delete", !0), Di = Z ? (
1947
+ /** @type {Exclude<import('.'), false>} */
1948
+ function() {
1949
+ var e, r, n = {
1950
+ assert: function(o) {
1951
+ if (!n.has(o))
1952
+ throw new Ii("Side channel does not contain " + Ri(o));
1953
+ },
1954
+ delete: function(o) {
1955
+ if (Z && o && (typeof o == "object" || typeof o == "function")) {
1956
+ if (e)
1957
+ return Ni(e, o);
1958
+ } else if (Ee && r)
1959
+ return r.delete(o);
1960
+ return !1;
1961
+ },
1962
+ get: function(o) {
1963
+ return Z && o && (typeof o == "object" || typeof o == "function") && e ? wi(e, o) : r && r.get(o);
1964
+ },
1965
+ has: function(o) {
1966
+ return Z && o && (typeof o == "object" || typeof o == "function") && e ? Ci(e, o) : !!r && r.has(o);
1967
+ },
1968
+ set: function(o, a) {
1969
+ Z && o && (typeof o == "object" || typeof o == "function") ? (e || (e = new Z()), Ti(e, o, a)) : Ee && (r || (r = Ee()), r.set(o, a));
1970
+ }
1971
+ };
1972
+ return n;
1973
+ }
1974
+ ) : Ee, xi = oe, $i = Ce, Mi = ra, Fi = wr, Li = Di, Ui = Li || Fi || Mi, Tr = function() {
1975
+ var e, r = {
1976
+ assert: function(n) {
1977
+ if (!r.has(n))
1978
+ throw new xi("Side channel does not contain " + $i(n));
1979
+ },
1980
+ delete: function(n) {
1981
+ return !!e && e.delete(n);
1982
+ },
1983
+ get: function(n) {
1984
+ return e && e.get(n);
1985
+ },
1986
+ has: function(n) {
1987
+ return !!e && e.has(n);
1988
+ },
1989
+ set: function(n, o) {
1990
+ e || (e = Ui()), e.set(n, o);
1991
+ }
1992
+ };
1993
+ return r;
1994
+ }, Gi = String.prototype.replace, Bi = /%20/g, Je = {
1995
+ RFC1738: "RFC1738",
1996
+ RFC3986: "RFC3986"
1997
+ }, ht = {
1998
+ default: Je.RFC3986,
1999
+ formatters: {
2000
+ RFC1738: function(t) {
2001
+ return Gi.call(t, Bi, "+");
2002
+ },
2003
+ RFC3986: function(t) {
2004
+ return String(t);
2005
+ }
2006
+ },
2007
+ RFC1738: Je.RFC1738,
2008
+ RFC3986: Je.RFC3986
2009
+ }, ji = ht, ki = Tr, Ze = Object.prototype.hasOwnProperty, z = Array.isArray, $e = ki(), Cr = function(e, r) {
2010
+ return $e.set(e, r), e;
2011
+ }, Te = function(e) {
2012
+ return $e.has(e);
2013
+ }, st = function(e) {
2014
+ return $e.get(e);
2015
+ }, Nr = function(e, r) {
2016
+ $e.set(e, r);
2017
+ }, x = function() {
2018
+ for (var t = [], e = 0; e < 256; ++e)
2019
+ t.push("%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase());
2020
+ return t;
2021
+ }(), Hi = function(e) {
2022
+ for (; e.length > 1; ) {
2023
+ var r = e.pop(), n = r.obj[r.prop];
2024
+ if (z(n)) {
2025
+ for (var o = [], a = 0; a < n.length; ++a)
2026
+ typeof n[a] < "u" && o.push(n[a]);
2027
+ r.obj[r.prop] = o;
2028
+ }
2029
+ }
2030
+ }, _t = function(e, r) {
2031
+ for (var n = r && r.plainObjects ? { __proto__: null } : {}, o = 0; o < e.length; ++o)
2032
+ typeof e[o] < "u" && (n[o] = e[o]);
2033
+ return n;
2034
+ }, Xi = function t(e, r, n) {
2035
+ if (!r)
2036
+ return e;
2037
+ if (typeof r != "object" && typeof r != "function") {
2038
+ if (z(e))
2039
+ e.push(r);
2040
+ else if (e && typeof e == "object")
2041
+ if (Te(e)) {
2042
+ var o = st(e) + 1;
2043
+ e[o] = r, Nr(e, o);
2044
+ } else (n && (n.plainObjects || n.allowPrototypes) || !Ze.call(Object.prototype, r)) && (e[r] = !0);
2045
+ else
2046
+ return [e, r];
2047
+ return e;
2048
+ }
2049
+ if (!e || typeof e != "object") {
2050
+ if (Te(r)) {
2051
+ for (var a = Object.keys(r), i = n && n.plainObjects ? { __proto__: null, 0: e } : { 0: e }, l = 0; l < a.length; l++) {
2052
+ var c = parseInt(a[l], 10);
2053
+ i[c + 1] = r[a[l]];
2054
+ }
2055
+ return Cr(i, st(r) + 1);
2056
+ }
2057
+ return [e].concat(r);
2058
+ }
2059
+ var f = e;
2060
+ return z(e) && !z(r) && (f = _t(e, n)), z(e) && z(r) ? (r.forEach(function(s, p) {
2061
+ if (Ze.call(e, p)) {
2062
+ var u = e[p];
2063
+ u && typeof u == "object" && s && typeof s == "object" ? e[p] = t(u, s, n) : e.push(s);
2064
+ } else
2065
+ e[p] = s;
2066
+ }), e) : Object.keys(r).reduce(function(s, p) {
2067
+ var u = r[p];
2068
+ return Ze.call(s, p) ? s[p] = t(s[p], u, n) : s[p] = u, s;
2069
+ }, f);
2070
+ }, Wi = function(e, r) {
2071
+ return Object.keys(r).reduce(function(n, o) {
2072
+ return n[o] = r[o], n;
2073
+ }, e);
2074
+ }, qi = function(t, e, r) {
2075
+ var n = t.replace(/\+/g, " ");
2076
+ if (r === "iso-8859-1")
2077
+ return n.replace(/%[0-9a-f]{2}/gi, unescape);
2078
+ try {
2079
+ return decodeURIComponent(n);
2080
+ } catch {
2081
+ return n;
2082
+ }
2083
+ }, et = 1024, Vi = function(e, r, n, o, a) {
2084
+ if (e.length === 0)
2085
+ return e;
2086
+ var i = e;
2087
+ if (typeof e == "symbol" ? i = Symbol.prototype.toString.call(e) : typeof e != "string" && (i = String(e)), n === "iso-8859-1")
2088
+ return escape(i).replace(/%u[0-9a-f]{4}/gi, function(y) {
2089
+ return "%26%23" + parseInt(y.slice(2), 16) + "%3B";
2090
+ });
2091
+ for (var l = "", c = 0; c < i.length; c += et) {
2092
+ for (var f = i.length >= et ? i.slice(c, c + et) : i, s = [], p = 0; p < f.length; ++p) {
2093
+ var u = f.charCodeAt(p);
2094
+ if (u === 45 || u === 46 || u === 95 || u === 126 || u >= 48 && u <= 57 || u >= 65 && u <= 90 || u >= 97 && u <= 122 || a === ji.RFC1738 && (u === 40 || u === 41)) {
2095
+ s[s.length] = f.charAt(p);
2096
+ continue;
2097
+ }
2098
+ if (u < 128) {
2099
+ s[s.length] = x[u];
2100
+ continue;
2101
+ }
2102
+ if (u < 2048) {
2103
+ s[s.length] = x[192 | u >> 6] + x[128 | u & 63];
2104
+ continue;
2105
+ }
2106
+ if (u < 55296 || u >= 57344) {
2107
+ s[s.length] = x[224 | u >> 12] + x[128 | u >> 6 & 63] + x[128 | u & 63];
2108
+ continue;
2109
+ }
2110
+ p += 1, u = 65536 + ((u & 1023) << 10 | f.charCodeAt(p) & 1023), s[s.length] = x[240 | u >> 18] + x[128 | u >> 12 & 63] + x[128 | u >> 6 & 63] + x[128 | u & 63];
2111
+ }
2112
+ l += s.join("");
2113
+ }
2114
+ return l;
2115
+ }, zi = function(e) {
2116
+ for (var r = [{ obj: { o: e }, prop: "o" }], n = [], o = 0; o < r.length; ++o)
2117
+ for (var a = r[o], i = a.obj[a.prop], l = Object.keys(i), c = 0; c < l.length; ++c) {
2118
+ var f = l[c], s = i[f];
2119
+ typeof s == "object" && s !== null && n.indexOf(s) === -1 && (r.push({ obj: i, prop: f }), n.push(s));
2120
+ }
2121
+ return Hi(r), e;
2122
+ }, Ki = function(e) {
2123
+ return Object.prototype.toString.call(e) === "[object RegExp]";
2124
+ }, Yi = function(e) {
2125
+ return !e || typeof e != "object" ? !1 : !!(e.constructor && e.constructor.isBuffer && e.constructor.isBuffer(e));
2126
+ }, Qi = function(e, r, n, o) {
2127
+ if (Te(e)) {
2128
+ var a = st(e) + 1;
2129
+ return e[a] = r, Nr(e, a), e;
2130
+ }
2131
+ var i = [].concat(e, r);
2132
+ return i.length > n ? Cr(_t(i, { plainObjects: o }), i.length - 1) : i;
2133
+ }, Ji = function(e, r) {
2134
+ if (z(e)) {
2135
+ for (var n = [], o = 0; o < e.length; o += 1)
2136
+ n.push(r(e[o]));
2137
+ return n;
2138
+ }
2139
+ return r(e);
2140
+ }, Dr = {
2141
+ arrayToObject: _t,
2142
+ assign: Wi,
2143
+ combine: Qi,
2144
+ compact: zi,
2145
+ decode: qi,
2146
+ encode: Vi,
2147
+ isBuffer: Yi,
2148
+ isOverflow: Te,
2149
+ isRegExp: Ki,
2150
+ maybeMap: Ji,
2151
+ merge: Xi
2152
+ }, xr = Tr, be = Dr, pe = ht, Zi = Object.prototype.hasOwnProperty, $r = {
2153
+ brackets: function(e) {
2154
+ return e + "[]";
2155
+ },
2156
+ comma: "comma",
2157
+ indices: function(e, r) {
2158
+ return e + "[" + r + "]";
2159
+ },
2160
+ repeat: function(e) {
2161
+ return e;
2162
+ }
2163
+ }, $ = Array.isArray, el = Array.prototype.push, Mr = function(t, e) {
2164
+ el.apply(t, $(e) ? e : [e]);
2165
+ }, tl = Date.prototype.toISOString, Zt = pe.default, _ = {
2166
+ addQueryPrefix: !1,
2167
+ allowDots: !1,
2168
+ allowEmptyArrays: !1,
2169
+ arrayFormat: "indices",
2170
+ charset: "utf-8",
2171
+ charsetSentinel: !1,
2172
+ commaRoundTrip: !1,
2173
+ delimiter: "&",
2174
+ encode: !0,
2175
+ encodeDotInKeys: !1,
2176
+ encoder: be.encode,
2177
+ encodeValuesOnly: !1,
2178
+ filter: void 0,
2179
+ format: Zt,
2180
+ formatter: pe.formatters[Zt],
2181
+ // deprecated
2182
+ indices: !1,
2183
+ serializeDate: function(e) {
2184
+ return tl.call(e);
2185
+ },
2186
+ skipNulls: !1,
2187
+ strictNullHandling: !1
2188
+ }, rl = function(e) {
2189
+ return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" || typeof e == "bigint";
2190
+ }, tt = {}, nl = function t(e, r, n, o, a, i, l, c, f, s, p, u, y, d, h, E, O, P) {
2191
+ for (var m = e, R = P, I = 0, F = !1; (R = R.get(tt)) !== void 0 && !F; ) {
2192
+ var C = R.get(e);
2193
+ if (I += 1, typeof C < "u") {
2194
+ if (C === I)
2195
+ throw new RangeError("Cyclic object value");
2196
+ F = !0;
2197
+ }
2198
+ typeof R.get(tt) > "u" && (I = 0);
2199
+ }
2200
+ if (typeof s == "function" ? m = s(r, m) : m instanceof Date ? m = y(m) : n === "comma" && $(m) && (m = be.maybeMap(m, function(ie) {
2201
+ return ie instanceof Date ? y(ie) : ie;
2202
+ })), m === null) {
2203
+ if (i)
2204
+ return f && !E ? f(r, _.encoder, O, "key", d) : r;
2205
+ m = "";
2206
+ }
2207
+ if (rl(m) || be.isBuffer(m)) {
2208
+ if (f) {
2209
+ var j = E ? r : f(r, _.encoder, O, "key", d);
2210
+ return [h(j) + "=" + h(f(m, _.encoder, O, "value", d))];
2211
+ }
2212
+ return [h(r) + "=" + h(String(m))];
2213
+ }
2214
+ var L = [];
2215
+ if (typeof m > "u")
2216
+ return L;
2217
+ var N;
2218
+ if (n === "comma" && $(m))
2219
+ E && f && (m = be.maybeMap(m, f)), N = [{ value: m.length > 0 ? m.join(",") || null : void 0 }];
2220
+ else if ($(s))
2221
+ N = s;
2222
+ else {
2223
+ var Q = Object.keys(m);
2224
+ N = p ? Q.sort(p) : Q;
2225
+ }
2226
+ var k = c ? String(r).replace(/\./g, "%2E") : String(r), b = o && $(m) && m.length === 1 ? k + "[]" : k;
2227
+ if (a && $(m) && m.length === 0)
2228
+ return b + "[]";
2229
+ for (var D = 0; D < N.length; ++D) {
2230
+ var w = N[D], q = typeof w == "object" && w && typeof w.value < "u" ? w.value : m[w];
2231
+ if (!(l && q === null)) {
2232
+ var ae = u && c ? String(w).replace(/\./g, "%2E") : String(w), Fe = $(m) ? typeof n == "function" ? n(b, ae) : b : b + (u ? "." + ae : "[" + ae + "]");
2233
+ P.set(e, I);
2234
+ var ge = xr();
2235
+ ge.set(tt, P), Mr(L, t(
2236
+ q,
2237
+ Fe,
2238
+ n,
2239
+ o,
2240
+ a,
2241
+ i,
2242
+ l,
2243
+ c,
2244
+ n === "comma" && E && $(m) ? null : f,
2245
+ s,
2246
+ p,
2247
+ u,
2248
+ y,
2249
+ d,
2250
+ h,
2251
+ E,
2252
+ O,
2253
+ ge
2254
+ ));
2255
+ }
2256
+ }
2257
+ return L;
2258
+ }, ol = function(e) {
2259
+ if (!e)
2260
+ return _;
2261
+ if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
2262
+ throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
2263
+ if (typeof e.encodeDotInKeys < "u" && typeof e.encodeDotInKeys != "boolean")
2264
+ throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
2265
+ if (e.encoder !== null && typeof e.encoder < "u" && typeof e.encoder != "function")
2266
+ throw new TypeError("Encoder has to be a function.");
2267
+ var r = e.charset || _.charset;
2268
+ if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
2269
+ throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
2270
+ var n = pe.default;
2271
+ if (typeof e.format < "u") {
2272
+ if (!Zi.call(pe.formatters, e.format))
2273
+ throw new TypeError("Unknown format option provided.");
2274
+ n = e.format;
2275
+ }
2276
+ var o = pe.formatters[n], a = _.filter;
2277
+ (typeof e.filter == "function" || $(e.filter)) && (a = e.filter);
2278
+ var i;
2279
+ if (e.arrayFormat in $r ? i = e.arrayFormat : "indices" in e ? i = e.indices ? "indices" : "repeat" : i = _.arrayFormat, "commaRoundTrip" in e && typeof e.commaRoundTrip != "boolean")
2280
+ throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
2281
+ var l = typeof e.allowDots > "u" ? e.encodeDotInKeys === !0 ? !0 : _.allowDots : !!e.allowDots;
2282
+ return {
2283
+ addQueryPrefix: typeof e.addQueryPrefix == "boolean" ? e.addQueryPrefix : _.addQueryPrefix,
2284
+ allowDots: l,
2285
+ allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : _.allowEmptyArrays,
2286
+ arrayFormat: i,
2287
+ charset: r,
2288
+ charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : _.charsetSentinel,
2289
+ commaRoundTrip: !!e.commaRoundTrip,
2290
+ delimiter: typeof e.delimiter > "u" ? _.delimiter : e.delimiter,
2291
+ encode: typeof e.encode == "boolean" ? e.encode : _.encode,
2292
+ encodeDotInKeys: typeof e.encodeDotInKeys == "boolean" ? e.encodeDotInKeys : _.encodeDotInKeys,
2293
+ encoder: typeof e.encoder == "function" ? e.encoder : _.encoder,
2294
+ encodeValuesOnly: typeof e.encodeValuesOnly == "boolean" ? e.encodeValuesOnly : _.encodeValuesOnly,
2295
+ filter: a,
2296
+ format: n,
2297
+ formatter: o,
2298
+ serializeDate: typeof e.serializeDate == "function" ? e.serializeDate : _.serializeDate,
2299
+ skipNulls: typeof e.skipNulls == "boolean" ? e.skipNulls : _.skipNulls,
2300
+ sort: typeof e.sort == "function" ? e.sort : null,
2301
+ strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : _.strictNullHandling
2302
+ };
2303
+ }, al = function(t, e) {
2304
+ var r = t, n = ol(e), o, a;
2305
+ typeof n.filter == "function" ? (a = n.filter, r = a("", r)) : $(n.filter) && (a = n.filter, o = a);
2306
+ var i = [];
2307
+ if (typeof r != "object" || r === null)
2308
+ return "";
2309
+ var l = $r[n.arrayFormat], c = l === "comma" && n.commaRoundTrip;
2310
+ o || (o = Object.keys(r)), n.sort && o.sort(n.sort);
2311
+ for (var f = xr(), s = 0; s < o.length; ++s) {
2312
+ var p = o[s], u = r[p];
2313
+ n.skipNulls && u === null || Mr(i, nl(
2314
+ u,
2315
+ p,
2316
+ l,
2317
+ c,
2318
+ n.allowEmptyArrays,
2319
+ n.strictNullHandling,
2320
+ n.skipNulls,
2321
+ n.encodeDotInKeys,
2322
+ n.encode ? n.encoder : null,
2323
+ n.filter,
2324
+ n.sort,
2325
+ n.allowDots,
2326
+ n.serializeDate,
2327
+ n.format,
2328
+ n.formatter,
2329
+ n.encodeValuesOnly,
2330
+ n.charset,
2331
+ f
2332
+ ));
2333
+ }
2334
+ var y = i.join(n.delimiter), d = n.addQueryPrefix === !0 ? "?" : "";
2335
+ return n.charsetSentinel && (n.charset === "iso-8859-1" ? d += "utf8=%26%2310003%3B&" : d += "utf8=%E2%9C%93&"), y.length > 0 ? d + y : "";
2336
+ }, X = Dr, Oe = Object.prototype.hasOwnProperty, er = Array.isArray, g = {
2337
+ allowDots: !1,
2338
+ allowEmptyArrays: !1,
2339
+ allowPrototypes: !1,
2340
+ allowSparse: !1,
2341
+ arrayLimit: 20,
2342
+ charset: "utf-8",
2343
+ charsetSentinel: !1,
2344
+ comma: !1,
2345
+ decodeDotInKeys: !1,
2346
+ decoder: X.decode,
2347
+ delimiter: "&",
2348
+ depth: 5,
2349
+ duplicates: "combine",
2350
+ ignoreQueryPrefix: !1,
2351
+ interpretNumericEntities: !1,
2352
+ parameterLimit: 1e3,
2353
+ parseArrays: !0,
2354
+ plainObjects: !1,
2355
+ strictDepth: !1,
2356
+ strictNullHandling: !1,
2357
+ throwOnLimitExceeded: !1
2358
+ }, il = function(t) {
2359
+ return t.replace(/&#(\d+);/g, function(e, r) {
2360
+ return String.fromCharCode(parseInt(r, 10));
2361
+ });
2362
+ }, Fr = function(t, e, r) {
2363
+ if (t && typeof t == "string" && e.comma && t.indexOf(",") > -1)
2364
+ return t.split(",");
2365
+ if (e.throwOnLimitExceeded && r >= e.arrayLimit)
2366
+ throw new RangeError("Array limit exceeded. Only " + e.arrayLimit + " element" + (e.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
2367
+ return t;
2368
+ }, ll = "utf8=%26%2310003%3B", cl = "utf8=%E2%9C%93", sl = function(e, r) {
2369
+ var n = { __proto__: null }, o = r.ignoreQueryPrefix ? e.replace(/^\?/, "") : e;
2370
+ o = o.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
2371
+ var a = r.parameterLimit === 1 / 0 ? void 0 : r.parameterLimit, i = o.split(
2372
+ r.delimiter,
2373
+ r.throwOnLimitExceeded ? a + 1 : a
2374
+ );
2375
+ if (r.throwOnLimitExceeded && i.length > a)
2376
+ throw new RangeError("Parameter limit exceeded. Only " + a + " parameter" + (a === 1 ? "" : "s") + " allowed.");
2377
+ var l = -1, c, f = r.charset;
2378
+ if (r.charsetSentinel)
2379
+ for (c = 0; c < i.length; ++c)
2380
+ i[c].indexOf("utf8=") === 0 && (i[c] === cl ? f = "utf-8" : i[c] === ll && (f = "iso-8859-1"), l = c, c = i.length);
2381
+ for (c = 0; c < i.length; ++c)
2382
+ if (c !== l) {
2383
+ var s = i[c], p = s.indexOf("]="), u = p === -1 ? s.indexOf("=") : p + 1, y, d;
2384
+ if (u === -1 ? (y = r.decoder(s, g.decoder, f, "key"), d = r.strictNullHandling ? null : "") : (y = r.decoder(s.slice(0, u), g.decoder, f, "key"), y !== null && (d = X.maybeMap(
2385
+ Fr(
2386
+ s.slice(u + 1),
2387
+ r,
2388
+ er(n[y]) ? n[y].length : 0
2389
+ ),
2390
+ function(E) {
2391
+ return r.decoder(E, g.decoder, f, "value");
2392
+ }
2393
+ ))), d && r.interpretNumericEntities && f === "iso-8859-1" && (d = il(String(d))), s.indexOf("[]=") > -1 && (d = er(d) ? [d] : d), y !== null) {
2394
+ var h = Oe.call(n, y);
2395
+ h && r.duplicates === "combine" ? n[y] = X.combine(
2396
+ n[y],
2397
+ d,
2398
+ r.arrayLimit,
2399
+ r.plainObjects
2400
+ ) : (!h || r.duplicates === "last") && (n[y] = d);
2401
+ }
2402
+ }
2403
+ return n;
2404
+ }, ul = function(t, e, r, n) {
2405
+ var o = 0;
2406
+ if (t.length > 0 && t[t.length - 1] === "[]") {
2407
+ var a = t.slice(0, -1).join("");
2408
+ o = Array.isArray(e) && e[a] ? e[a].length : 0;
2409
+ }
2410
+ for (var i = n ? e : Fr(e, r, o), l = t.length - 1; l >= 0; --l) {
2411
+ var c, f = t[l];
2412
+ if (f === "[]" && r.parseArrays)
2413
+ X.isOverflow(i) ? c = i : c = r.allowEmptyArrays && (i === "" || r.strictNullHandling && i === null) ? [] : X.combine(
2414
+ [],
2415
+ i,
2416
+ r.arrayLimit,
2417
+ r.plainObjects
2418
+ );
2419
+ else {
2420
+ c = r.plainObjects ? { __proto__: null } : {};
2421
+ var s = f.charAt(0) === "[" && f.charAt(f.length - 1) === "]" ? f.slice(1, -1) : f, p = r.decodeDotInKeys ? s.replace(/%2E/g, ".") : s, u = parseInt(p, 10);
2422
+ !r.parseArrays && p === "" ? c = { 0: i } : !isNaN(u) && f !== p && String(u) === p && u >= 0 && r.parseArrays && u <= r.arrayLimit ? (c = [], c[u] = i) : p !== "__proto__" && (c[p] = i);
2423
+ }
2424
+ i = c;
2425
+ }
2426
+ return i;
2427
+ }, fl = function(e, r) {
2428
+ var n = r.allowDots ? e.replace(/\.([^.[]+)/g, "[$1]") : e;
2429
+ if (r.depth <= 0)
2430
+ return !r.plainObjects && Oe.call(Object.prototype, n) && !r.allowPrototypes ? void 0 : [n];
2431
+ var o = /(\[[^[\]]*])/, a = /(\[[^[\]]*])/g, i = o.exec(n), l = i ? n.slice(0, i.index) : n, c = [];
2432
+ if (l) {
2433
+ if (!r.plainObjects && Oe.call(Object.prototype, l) && !r.allowPrototypes)
2434
+ return;
2435
+ c.push(l);
2436
+ }
2437
+ for (var f = 0; (i = a.exec(n)) !== null && f < r.depth; ) {
2438
+ f += 1;
2439
+ var s = i[1].slice(1, -1);
2440
+ if (!r.plainObjects && Oe.call(Object.prototype, s) && !r.allowPrototypes)
2441
+ return;
2442
+ c.push(i[1]);
2443
+ }
2444
+ if (i) {
2445
+ if (r.strictDepth === !0)
2446
+ throw new RangeError("Input depth exceeded depth option of " + r.depth + " and strictDepth is true");
2447
+ c.push("[" + n.slice(i.index) + "]");
2448
+ }
2449
+ return c;
2450
+ }, pl = function(e, r, n, o) {
2451
+ if (e) {
2452
+ var a = fl(e, n);
2453
+ if (a)
2454
+ return ul(a, r, n, o);
2455
+ }
2456
+ }, dl = function(e) {
2457
+ if (!e)
2458
+ return g;
2459
+ if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
2460
+ throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
2461
+ if (typeof e.decodeDotInKeys < "u" && typeof e.decodeDotInKeys != "boolean")
2462
+ throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");
2463
+ if (e.decoder !== null && typeof e.decoder < "u" && typeof e.decoder != "function")
2464
+ throw new TypeError("Decoder has to be a function.");
2465
+ if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
2466
+ throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
2467
+ if (typeof e.throwOnLimitExceeded < "u" && typeof e.throwOnLimitExceeded != "boolean")
2468
+ throw new TypeError("`throwOnLimitExceeded` option must be a boolean");
2469
+ var r = typeof e.charset > "u" ? g.charset : e.charset, n = typeof e.duplicates > "u" ? g.duplicates : e.duplicates;
2470
+ if (n !== "combine" && n !== "first" && n !== "last")
2471
+ throw new TypeError("The duplicates option must be either combine, first, or last");
2472
+ var o = typeof e.allowDots > "u" ? e.decodeDotInKeys === !0 ? !0 : g.allowDots : !!e.allowDots;
2473
+ return {
2474
+ allowDots: o,
2475
+ allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : g.allowEmptyArrays,
2476
+ allowPrototypes: typeof e.allowPrototypes == "boolean" ? e.allowPrototypes : g.allowPrototypes,
2477
+ allowSparse: typeof e.allowSparse == "boolean" ? e.allowSparse : g.allowSparse,
2478
+ arrayLimit: typeof e.arrayLimit == "number" ? e.arrayLimit : g.arrayLimit,
2479
+ charset: r,
2480
+ charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : g.charsetSentinel,
2481
+ comma: typeof e.comma == "boolean" ? e.comma : g.comma,
2482
+ decodeDotInKeys: typeof e.decodeDotInKeys == "boolean" ? e.decodeDotInKeys : g.decodeDotInKeys,
2483
+ decoder: typeof e.decoder == "function" ? e.decoder : g.decoder,
2484
+ delimiter: typeof e.delimiter == "string" || X.isRegExp(e.delimiter) ? e.delimiter : g.delimiter,
2485
+ // eslint-disable-next-line no-implicit-coercion, no-extra-parens
2486
+ depth: typeof e.depth == "number" || e.depth === !1 ? +e.depth : g.depth,
2487
+ duplicates: n,
2488
+ ignoreQueryPrefix: e.ignoreQueryPrefix === !0,
2489
+ interpretNumericEntities: typeof e.interpretNumericEntities == "boolean" ? e.interpretNumericEntities : g.interpretNumericEntities,
2490
+ parameterLimit: typeof e.parameterLimit == "number" ? e.parameterLimit : g.parameterLimit,
2491
+ parseArrays: e.parseArrays !== !1,
2492
+ plainObjects: typeof e.plainObjects == "boolean" ? e.plainObjects : g.plainObjects,
2493
+ strictDepth: typeof e.strictDepth == "boolean" ? !!e.strictDepth : g.strictDepth,
2494
+ strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : g.strictNullHandling,
2495
+ throwOnLimitExceeded: typeof e.throwOnLimitExceeded == "boolean" ? e.throwOnLimitExceeded : !1
2496
+ };
2497
+ }, yl = function(t, e) {
2498
+ var r = dl(e);
2499
+ if (t === "" || t === null || typeof t > "u")
2500
+ return r.plainObjects ? { __proto__: null } : {};
2501
+ for (var n = typeof t == "string" ? sl(t, r) : t, o = r.plainObjects ? { __proto__: null } : {}, a = Object.keys(n), i = 0; i < a.length; ++i) {
2502
+ var l = a[i], c = pl(l, n[l], r, typeof t == "string");
2503
+ o = X.merge(o, c, r);
2504
+ }
2505
+ return r.allowSparse === !0 ? o : X.compact(o);
2506
+ }, vl = al, ml = yl, gl = ht, hl = {
2507
+ formats: gl,
2508
+ parse: ml,
2509
+ stringify: vl
2510
+ };
2511
+ const _l = /* @__PURE__ */ eo(hl);
2512
+ async function Me(t, e = {}, r) {
2513
+ const { cms: n = "cms" } = e;
2514
+ return fetch(`${t.href}?${_l.stringify(e)}`, {
2515
+ method: "GET",
2516
+ cache: r ? "no-store" : "default",
2517
+ headers: {
2518
+ Accept: "application/json",
2519
+ "Content-Type": "application/json",
2520
+ "strapi-encode-source-maps": n === "strapi" && r ? "true" : "false"
2521
+ // strapi
2522
+ }
2523
+ });
2524
+ }
2525
+ function Et(t, e) {
2526
+ return !(e != null && e.cms) || (e == null ? void 0 : e.cms) === "vtex" ? `https://${e == null ? void 0 : e.storeId}.myvtex.com/_v/cms/api/${e == null ? void 0 : e.name}/${t}` : String(
2527
+ new URL(`api/${t}`, process.env.NEXT_PUBLIC_API_URL)
2528
+ );
2529
+ }
2530
+ function Lr(t) {
2531
+ return Array.isArray(t) && t.length > 0 ? t[0] : Array.isArray(t) ? null : t;
2532
+ }
2533
+ async function Ur(t, e = [], r = {}) {
2534
+ var n;
2535
+ if ((r == null ? void 0 : r.contentType) === t) {
2536
+ const o = (r == null ? void 0 : r.previewMode) === "true", a = (r == null ? void 0 : r.documentId) ?? "", i = a && ((n = String(a)) != null && n.length) ? `/${r.documentId}` : "", l = new URL(Et(`${t}${i}`, r)), c = await Me(l, r, o);
2537
+ if (!c.ok)
2538
+ return console.error(`[Error fetching preview data]: ${t} - status: ${c.statusText}`), [];
2539
+ const f = await c.json(), s = e.findIndex((p) => p.documentId === f.id);
2540
+ return s !== -1 ? (e[s] = f, [...e]) : [f, ...e];
2541
+ }
2542
+ return e;
2543
+ }
2544
+ const Gl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2545
+ __proto__: null,
2546
+ createUrl: Et,
2547
+ fetchCMS: Me,
2548
+ mergePreviewDocument: Ur,
2549
+ spreadStrapiData: Lr
2550
+ }, Symbol.toStringTag, { value: "Module" }));
2551
+ async function Gr(t, e = {}, r) {
2552
+ const n = !!(e != null && e.previewMode), o = await Me(t, e, n);
2553
+ if (!o.ok)
2554
+ return console.log(
2555
+ `Failed to fetch Strapi (url=${String(t)}, status=${o.status})`
2556
+ ), { status: 404, data: [], error: String(o.status) };
2557
+ const { data: a } = await o.json();
2558
+ return a ? {
2559
+ status: 200,
2560
+ data: r ? Lr(a) : a
2561
+ } : { status: 404, data: [], error: "No data found" };
2562
+ }
2563
+ async function Br(t, e, r = {}) {
2564
+ const n = (r == null ? void 0 : r.previewId) ?? "", o = (r == null ? void 0 : r.previewMode) === "true", a = { ...r, versionId: n }, i = [];
2565
+ let l = 1, c = 0, f = !0;
2566
+ try {
2567
+ do {
2568
+ const s = await Me(e, { ...a, page: l }, o).then((p) => p.json()).catch((p) => (console.error("Error fetching VTEX CMS data:", p), console.error("Error URL:", e.toString()), null));
2569
+ l === 1 && (c = s.totalItems), Array.isArray(s == null ? void 0 : s.data) && i.push(...s.data), f = !!(s != null && s.hasNextPage), l++;
2570
+ } while (f && i.length < c);
2571
+ if (o && i.length > 0) {
2572
+ if (!t || !n)
2573
+ throw new Error(
2574
+ "contentType and previewId are required for preview mode in vtexCMSData"
2575
+ );
2576
+ const s = await Ur(
2577
+ t,
2578
+ i,
2579
+ a
2580
+ );
2581
+ return {
2582
+ status: s.length > 0 ? 200 : 404,
2583
+ data: s
2584
+ };
2585
+ }
2586
+ return {
2587
+ status: i.length ? 200 : 404,
2588
+ data: i
2589
+ };
2590
+ } catch (s) {
2591
+ return {
2592
+ status: 500,
2593
+ data: [],
2594
+ error: s instanceof Error ? s.message : String(s)
2595
+ };
2596
+ }
2597
+ }
2598
+ const Bl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2599
+ __proto__: null,
2600
+ strapiCMSData: Gr,
2601
+ vtexCMSData: Br
2602
+ }, Symbol.toStringTag, { value: "Module" }));
2603
+ async function El({
2604
+ contentType: t,
2605
+ documentId: e,
2606
+ versionId: r,
2607
+ CMS_PROJECT_NAME: n
2608
+ }) {
2609
+ const o = e && e.length ? `/${e}` : "", a = r && r.length ? `?versionId=${r}` : "";
2610
+ return or(
2611
+ `/cms/api/${n}/${t}${o}${a}`,
2612
+ { cache: "no-cache" }
2613
+ );
2614
+ }
2615
+ async function Sl(t, e = {}, r) {
2616
+ const { cms: n = "vtex" } = e ?? {};
2617
+ try {
2618
+ const o = new URL(Et(t, e));
2619
+ return n !== "vtex" ? Gr(o, e, r) : Br(t, o, e);
2620
+ } catch (o) {
2621
+ return console.error(`[Fetch ContentType Error CMS ${n}]`, o), r ? { status: 400, data: null } : { status: 200, data: [] };
2622
+ }
2623
+ }
2624
+ const jl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2625
+ __proto__: null,
2626
+ fetchContentType: Sl,
2627
+ getCMSContentType: El
2628
+ }, Symbol.toStringTag, { value: "Module" }));
2629
+ export {
2630
+ Yn as $,
2631
+ fn as A,
2632
+ Dl as B,
2633
+ $l as C,
2634
+ Pl as D,
2635
+ Rl as E,
2636
+ rt as F,
2637
+ vn as G,
2638
+ nn as H,
2639
+ pn as I,
2640
+ pt as J,
2641
+ ro as K,
2642
+ lr as L,
2643
+ no as M,
2644
+ oo as N,
2645
+ ao as O,
2646
+ io as P,
2647
+ cr as Q,
2648
+ eo as R,
2649
+ mo as S,
2650
+ on as T,
2651
+ mn as U,
2652
+ hn as V,
2653
+ he as W,
2654
+ Bn as X,
2655
+ cn as Y,
2656
+ yn as Z,
2657
+ Nl as _,
2658
+ un as a,
2659
+ Xn as a0,
2660
+ Rt as a1,
2661
+ xl as a2,
2662
+ ho as a3,
2663
+ Sl as a4,
2664
+ Ul as a5,
2665
+ sr as a6,
2666
+ Cl as a7,
2667
+ Fl as a8,
2668
+ Tl as a9,
2669
+ Ll as aa,
2670
+ jl as ab,
2671
+ Gl as ac,
2672
+ Bl as ad,
2673
+ Zn as ae,
2674
+ Ml as af,
2675
+ dn as b,
2676
+ Sn as c,
2677
+ bn as d,
2678
+ Dn as e,
2679
+ Gn as f,
2680
+ an as g,
2681
+ Fn as h,
2682
+ En as i,
2683
+ $n as j,
2684
+ xn as k,
2685
+ T as l,
2686
+ Ln as m,
2687
+ kn as n,
2688
+ Il as o,
2689
+ wl as p,
2690
+ jn as q,
2691
+ An as r,
2692
+ tr as s,
2693
+ Cn as t,
2694
+ wn as u,
2695
+ On as v,
2696
+ Mn as w,
2697
+ ir as x,
2698
+ or as y,
2699
+ ln as z
2700
+ };