@haus-storefront-react/vendure-plugin-configs 1.0.4-next.16 → 1.0.4-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +0 -164
  2. package/badge.js +21 -1
  3. package/badge.mjs +3058 -449
  4. package/campaign.js +1 -1
  5. package/campaign.mjs +106 -50
  6. package/elastic.js +1 -1
  7. package/elastic.mjs +26 -10
  8. package/index-BCrKAB0K.mjs +311 -0
  9. package/index-BRlTlK6a.mjs +3768 -0
  10. package/index-CgxqXyHf.js +20 -0
  11. package/index-DgRzu7XX.js +10 -0
  12. package/index.js +1 -1
  13. package/index.mjs +4 -2
  14. package/lib/configs/vendure-badge-plugin.d.ts +2 -10
  15. package/lib/configs/vendure-badge-plugin.types.d.ts +1 -0
  16. package/lib/configs/vendure-campaign-plugin.d.ts +1 -1
  17. package/lib/configs/vendure-elastic-search-plugin.d.ts +1 -1
  18. package/lib/configs/vendure-packagesize-plugin.d.ts +1 -1
  19. package/lib/configs/vendure-product-popularity-plugin.d.ts +1 -1
  20. package/lib/plugin-config.d.ts +1 -2
  21. package/lib/types.d.ts +0 -2
  22. package/package.json +4 -31
  23. package/packagesize.js +1 -1
  24. package/packagesize.mjs +59 -15
  25. package/product-popularity.js +1 -1
  26. package/product-popularity.mjs +22 -12
  27. package/lib/configs/vendure-product-variant-specifications-plugin.d.ts +0 -55
  28. package/lib/configs/vendure-product-variant-specifications-plugin.types.d.ts +0 -8
  29. package/lib/configs/vendure-products-by-sku-plugin.d.ts +0 -11
  30. package/lib/configs/vendure-products-by-sku-plugin.types.d.ts +0 -13
  31. package/lib/configs/vendure-purchase-order-payment-plugin.d.ts +0 -14
  32. package/lib/configs/vendure-purchase-order-payment-plugin.types.d.ts +0 -7
  33. package/lib/configs/vendure-related-products-plugin.d.ts +0 -39
  34. package/lib/configs/vendure-related-products-plugin.types.d.ts +0 -16
  35. package/lib/exports/product-variant-specifications.d.ts +0 -2
  36. package/lib/exports/products-by-sku.d.ts +0 -3
  37. package/lib/exports/purchase-order-payment.d.ts +0 -3
  38. package/lib/exports/related-products.d.ts +0 -3
  39. package/lib/hooks/use-add-purchase-order-payment.d.ts +0 -13
  40. package/lib/hooks/use-related-products.d.ts +0 -2
  41. package/lib/strategies/quick-order-variant-sku-validation-strategy.d.ts +0 -6
  42. package/plugin-config-DrQQb9Ry.js +0 -1
  43. package/plugin-config-DywohMgp.mjs +0 -903
  44. package/product-variant-specifications.d.ts +0 -2
  45. package/product-variant-specifications.js +0 -1
  46. package/product-variant-specifications.mjs +0 -9
  47. package/products-by-sku.d.ts +0 -2
  48. package/products-by-sku.js +0 -1
  49. package/products-by-sku.mjs +0 -54
  50. package/purchase-order-payment.d.ts +0 -2
  51. package/purchase-order-payment.js +0 -27
  52. package/purchase-order-payment.mjs +0 -209
  53. package/related-products.d.ts +0 -2
  54. package/related-products.js +0 -1
  55. package/related-products.mjs +0 -35
  56. package/src-ChzQhPCd.js +0 -6
  57. package/src-CsM7SeIh.mjs +0 -455
  58. package/src-Dq29mogl.js +0 -21
  59. package/src-Dud_XHV6.mjs +0 -2718
package/badge.mjs CHANGED
@@ -1,453 +1,3062 @@
1
- import { a as e, c as t, o as n, r, s as i } from "./src-CsM7SeIh.mjs";
2
- import { C as a, S as o, T as s, _ as c, a as l, b as u, c as d, d as f, f as p, g as m, h, i as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as ee, u as w, v as te, w as T, x as ne, y as re } from "./plugin-config-DywohMgp.mjs";
3
- import { i as E } from "./src-Dud_XHV6.mjs";
4
- import { useRef as ie } from "react";
5
- //#region ../../../node_modules/lodash-es/_setCacheAdd.js
6
- var ae = "__lodash_hash_undefined__";
7
- function oe(e) {
8
- return this.__data__.set(e, ae), this;
9
- }
10
- //#endregion
11
- //#region ../../../node_modules/lodash-es/_setCacheHas.js
12
- function se(e) {
13
- return this.__data__.has(e);
14
- }
15
- //#endregion
16
- //#region ../../../node_modules/lodash-es/_SetCache.js
17
- function D(e) {
18
- var t = -1, n = e == null ? 0 : e.length;
19
- for (this.__data__ = new p(); ++t < n;) this.add(e[t]);
20
- }
21
- D.prototype.add = D.prototype.push = oe, D.prototype.has = se;
22
- //#endregion
23
- //#region ../../../node_modules/lodash-es/_arraySome.js
24
- function ce(e, t) {
25
- for (var n = -1, r = e == null ? 0 : e.length; ++n < r;) if (t(e[n], n, e)) return !0;
26
- return !1;
27
- }
28
- //#endregion
29
- //#region ../../../node_modules/lodash-es/_cacheHas.js
30
- function le(e, t) {
31
- return e.has(t);
32
- }
33
- //#endregion
34
- //#region ../../../node_modules/lodash-es/_equalArrays.js
35
- var ue = 1, de = 2;
36
- function O(e, t, n, r, i, a) {
37
- var o = n & ue, s = e.length, c = t.length;
38
- if (s != c && !(o && c > s)) return !1;
39
- var l = a.get(e), u = a.get(t);
40
- if (l && u) return l == t && u == e;
41
- var d = -1, f = !0, p = n & de ? new D() : void 0;
42
- for (a.set(e, t), a.set(t, e); ++d < s;) {
43
- var m = e[d], h = t[d];
44
- if (r) var g = o ? r(h, m, d, t, e, a) : r(m, h, d, e, t, a);
45
- if (g !== void 0) {
46
- if (g) continue;
47
- f = !1;
48
- break;
49
- }
50
- if (p) {
51
- if (!ce(t, function(e, t) {
52
- if (!le(p, t) && (m === e || i(m, e, n, r, a))) return p.push(t);
53
- })) {
54
- f = !1;
55
- break;
56
- }
57
- } else if (!(m === h || i(m, h, n, r, a))) {
58
- f = !1;
59
- break;
60
- }
61
- }
62
- return a.delete(e), a.delete(t), f;
63
- }
64
- //#endregion
65
- //#region ../../../node_modules/lodash-es/_mapToArray.js
66
- function fe(e) {
67
- var t = -1, n = Array(e.size);
68
- return e.forEach(function(e, r) {
69
- n[++t] = [r, e];
70
- }), n;
71
- }
72
- //#endregion
73
- //#region ../../../node_modules/lodash-es/_setToArray.js
74
- function pe(e) {
75
- var t = -1, n = Array(e.size);
76
- return e.forEach(function(e) {
77
- n[++t] = e;
78
- }), n;
79
- }
80
- //#endregion
81
- //#region ../../../node_modules/lodash-es/_equalByTag.js
82
- var me = 1, he = 2, ge = "[object Boolean]", _e = "[object Date]", k = "[object Error]", A = "[object Map]", j = "[object Number]", M = "[object RegExp]", N = "[object Set]", P = "[object String]", F = "[object Symbol]", I = "[object ArrayBuffer]", ve = "[object DataView]", L = s ? s.prototype : void 0, R = L ? L.valueOf : void 0;
83
- function ye(e, t, n, r, i, a, o) {
84
- switch (n) {
85
- case ve:
86
- if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1;
87
- e = e.buffer, t = t.buffer;
88
- case I: return !(e.byteLength != t.byteLength || !a(new S(e), new S(t)));
89
- case ge:
90
- case _e:
91
- case j: return re(+e, +t);
92
- case k: return e.name == t.name && e.message == t.message;
93
- case M:
94
- case P: return e == t + "";
95
- case A: var s = fe;
96
- case N:
97
- var c = r & me;
98
- if (s ||= pe, e.size != t.size && !c) return !1;
99
- var l = o.get(e);
100
- if (l) return l == t;
101
- r |= he, o.set(e, t);
102
- var u = O(s(e), s(t), r, i, a, o);
103
- return o.delete(e), u;
104
- case F: if (R) return R.call(e) == R.call(t);
105
- }
106
- return !1;
107
- }
108
- //#endregion
109
- //#region ../../../node_modules/lodash-es/_equalObjects.js
110
- var be = 1, xe = Object.prototype.hasOwnProperty;
111
- function Se(e, t, n, r, i, a) {
112
- var o = n & be, s = l(e), c = s.length;
113
- if (c != l(t).length && !o) return !1;
114
- for (var u = c; u--;) {
115
- var d = s[u];
116
- if (!(o ? d in t : xe.call(t, d))) return !1;
117
- }
118
- var f = a.get(e), p = a.get(t);
119
- if (f && p) return f == t && p == e;
120
- var m = !0;
121
- a.set(e, t), a.set(t, e);
122
- for (var h = o; ++u < c;) {
123
- d = s[u];
124
- var g = e[d], _ = t[d];
125
- if (r) var v = o ? r(_, g, d, t, e, a) : r(g, _, d, e, t, a);
126
- if (!(v === void 0 ? g === _ || i(g, _, n, r, a) : v)) {
127
- m = !1;
128
- break;
129
- }
130
- h ||= d == "constructor";
131
- }
132
- if (m && !h) {
133
- var y = e.constructor, b = t.constructor;
134
- y != b && "constructor" in e && "constructor" in t && !(typeof y == "function" && y instanceof y && typeof b == "function" && b instanceof b) && (m = !1);
135
- }
136
- return a.delete(e), a.delete(t), m;
137
- }
138
- //#endregion
139
- //#region ../../../node_modules/lodash-es/_baseIsEqualDeep.js
140
- var Ce = 1, z = "[object Arguments]", B = "[object Array]", V = "[object Object]", H = Object.prototype.hasOwnProperty;
141
- function we(e, t, n, r, i, o) {
142
- var s = a(e), c = a(t), l = s ? B : g(e), u = c ? B : g(t);
143
- l = l == z ? V : l, u = u == z ? V : u;
144
- var d = l == V, f = u == V, p = l == u;
145
- if (p && m(e)) {
146
- if (!m(t)) return !1;
147
- s = !0, d = !1;
148
- }
149
- if (p && !d) return o ||= new C(), s || h(e) ? O(e, t, n, r, i, o) : ye(e, t, l, n, r, i, o);
150
- if (!(n & Ce)) {
151
- var _ = d && H.call(e, "__wrapped__"), v = f && H.call(t, "__wrapped__");
152
- if (_ || v) {
153
- var y = _ ? e.value() : e, b = v ? t.value() : t;
154
- return o ||= new C(), i(y, b, n, r, o);
155
- }
156
- }
157
- return p ? (o ||= new C(), Se(e, t, n, r, i, o)) : !1;
158
- }
159
- //#endregion
160
- //#region ../../../node_modules/lodash-es/_baseIsEqual.js
161
- function U(e, t, n, r, i) {
162
- return e === t ? !0 : e == null || t == null || !T(e) && !T(t) ? e !== e && t !== t : we(e, t, n, r, U, i);
163
- }
164
- //#endregion
165
- //#region ../../../node_modules/lodash-es/_baseIsMatch.js
166
- var Te = 1, Ee = 2;
167
- function De(e, t, n, r) {
168
- var i = n.length, a = i, o = !r;
169
- if (e == null) return !a;
170
- for (e = Object(e); i--;) {
171
- var s = n[i];
172
- if (o && s[2] ? s[1] !== e[s[0]] : !(s[0] in e)) return !1;
173
- }
174
- for (; ++i < a;) {
175
- s = n[i];
176
- var c = s[0], l = e[c], u = s[1];
177
- if (o && s[2]) {
178
- if (l === void 0 && !(c in e)) return !1;
179
- } else {
180
- var d = new C();
181
- if (r) var f = r(l, u, c, e, t, d);
182
- if (!(f === void 0 ? U(u, l, Te | Ee, r, d) : f)) return !1;
183
- }
184
- }
185
- return !0;
186
- }
187
- //#endregion
188
- //#region ../../../node_modules/lodash-es/_isStrictComparable.js
189
- function W(e) {
190
- return e === e && !o(e);
191
- }
192
- //#endregion
193
- //#region ../../../node_modules/lodash-es/_getMatchData.js
194
- function Oe(e) {
195
- for (var t = v(e), n = t.length; n--;) {
196
- var r = t[n], i = e[r];
197
- t[n] = [
198
- r,
199
- i,
200
- W(i)
201
- ];
202
- }
203
- return t;
204
- }
205
- //#endregion
206
- //#region ../../../node_modules/lodash-es/_matchesStrictComparable.js
207
- function G(e, t) {
208
- return function(n) {
209
- return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n));
210
- };
211
- }
212
- //#endregion
213
- //#region ../../../node_modules/lodash-es/_baseMatches.js
214
- function ke(e) {
215
- var t = Oe(e);
216
- return t.length == 1 && t[0][2] ? G(t[0][0], t[0][1]) : function(n) {
217
- return n === e || De(n, e, t);
218
- };
219
- }
220
- //#endregion
221
- //#region ../../../node_modules/lodash-es/_baseHasIn.js
222
- function Ae(e, t) {
223
- return e != null && t in Object(e);
224
- }
225
- //#endregion
226
- //#region ../../../node_modules/lodash-es/_hasPath.js
227
- function je(e, t, n) {
228
- t = f(t, e);
229
- for (var r = -1, i = t.length, o = !1; ++r < i;) {
230
- var s = w(t[r]);
231
- if (!(o = e != null && n(e, s))) break;
232
- e = e[s];
233
- }
234
- return o || ++r != i ? o : (i = e == null ? 0 : e.length, !!i && te(i) && u(s, i) && (a(e) || c(e)));
235
- }
236
- //#endregion
237
- //#region ../../../node_modules/lodash-es/hasIn.js
238
- function Me(e, t) {
239
- return e != null && je(e, t, Ae);
240
- }
241
- //#endregion
242
- //#region ../../../node_modules/lodash-es/_baseMatchesProperty.js
243
- var Ne = 1, Pe = 2;
244
- function Fe(e, t) {
245
- return x(e) && W(t) ? G(w(e), t) : function(n) {
246
- var r = d(n, e);
247
- return r === void 0 && r === t ? Me(n, e) : U(t, r, Ne | Pe);
248
- };
249
- }
250
- //#endregion
251
- //#region ../../../node_modules/lodash-es/_baseProperty.js
252
- function Ie(e) {
253
- return function(t) {
254
- return t?.[e];
255
- };
256
- }
257
- //#endregion
258
- //#region ../../../node_modules/lodash-es/_basePropertyDeep.js
259
- function Le(e) {
260
- return function(t) {
261
- return _(t, e);
262
- };
263
- }
264
- //#endregion
265
- //#region ../../../node_modules/lodash-es/property.js
266
- function Re(e) {
267
- return x(e) ? Ie(w(e)) : Le(e);
268
- }
269
- //#endregion
270
- //#region ../../../node_modules/lodash-es/_baseIteratee.js
271
- function ze(e) {
272
- return typeof e == "function" ? e : e == null ? ne : typeof e == "object" ? a(e) ? Fe(e[0], e[1]) : ke(e) : Re(e);
273
- }
274
- //#endregion
275
- //#region ../../../node_modules/lodash-es/_baseFilter.js
276
- function Be(e, t) {
277
- var n = [];
278
- return y(e, function(e, r, i) {
279
- t(e, r, i) && n.push(e);
280
- }), n;
281
- }
282
- //#endregion
283
- //#region ../../../node_modules/lodash-es/filter.js
284
- function Ve(e, t) {
285
- return (a(e) ? b : Be)(e, ze(t, 3));
286
- }
287
- //#endregion
288
- //#region src/lib/configs/vendure-badge-plugin.ts
289
- var K = new ee({
290
- name: "badges",
291
- enableFeatures: { showBadges: ({ badges: e = [], parentComponent: t }) => {
292
- let n = t ? K.getSettings().availablePositions[t] : K.getSettings().defaultPositions;
293
- return {
294
- badges: Ve(e, (e) => n ? n.includes(e.position) : !0),
295
- availablePositions: n
296
- };
297
- } },
298
- queryUpdates: {},
299
- settings: {
300
- defaultPositions: [
301
- "top-left",
302
- "top-right",
303
- "bottom-left",
304
- "bottom-right"
305
- ],
306
- availablePositions: {
307
- productListItem: [
308
- "top-left",
309
- "top-right",
310
- "bottom-left",
311
- "bottom-right"
312
- ],
313
- productDetail: [
314
- "top-left",
315
- "top-right",
316
- "bottom-left",
317
- "bottom-right"
318
- ],
319
- imageCarousel: [
320
- "top-left",
321
- "top-right",
322
- "bottom-left",
323
- "bottom-right"
324
- ]
325
- }
326
- }
1
+ import { V as hr, l as jt } from "./index-BRlTlK6a.mjs";
2
+ import { c as U, j as F, r as Ft } from "./index-BCrKAB0K.mjs";
3
+ import * as E from "react";
4
+ import mr, { createContext as yr, useContext as gr, useRef as br } from "react";
5
+ import { QueryClient as Ke } from "@tanstack/react-query";
6
+ const Z = new hr({
7
+ name: "badges",
8
+ enableFeatures: {
9
+ showBadges: ({
10
+ badges: t = [],
11
+ parentComponent: e
12
+ }) => {
13
+ const r = e ? Z.getSettings().availablePositions[e] : Z.getSettings().defaultPositions;
14
+ return {
15
+ badges: jt.filter(t, (o) => r ? r.includes(o.position) : !0),
16
+ availablePositions: r
17
+ };
18
+ }
19
+ },
20
+ queryUpdates: {},
21
+ settings: {
22
+ defaultPositions: ["top-left", "top-right", "bottom-left", "bottom-right"],
23
+ availablePositions: {
24
+ productListItem: ["top-left", "top-right", "bottom-left", "bottom-right"],
25
+ productDetail: ["top-left", "top-right", "bottom-left", "bottom-right"],
26
+ imageCarousel: ["top-left", "top-right", "bottom-left", "bottom-right"]
27
+ }
28
+ }
327
29
  });
328
- K.setQueryUpdates({
329
- product: { fields: [{ badges: [
330
- "id",
331
- "position",
332
- "assetId",
333
- { asset: [
334
- "id",
335
- "name",
336
- "preview",
337
- "source"
338
- ] },
339
- { collection: ["id", "name"] }
340
- ] }] },
341
- search: { fields: [{ items: [{ badges: [
342
- "id",
343
- "position",
344
- "assetId",
345
- { asset: [
346
- "id",
347
- "name",
348
- "preview",
349
- "source"
350
- ] },
351
- { collection: ["id", "name"] }
352
- ] }] }] },
353
- products: { fields: [{ items: [{ badges: [
354
- "id",
355
- "position",
356
- "assetId",
357
- { asset: [
358
- "id",
359
- "name",
360
- "preview",
361
- "source"
362
- ] },
363
- { collection: ["id", "name"] }
364
- ] }] }] },
365
- briefProducts: { fields: [{ items: [{ badges: [
366
- "id",
367
- "position",
368
- "assetId",
369
- { asset: [
370
- "id",
371
- "name",
372
- "preview",
373
- "source"
374
- ] },
375
- { collection: ["id", "name"] }
376
- ] }] }] }
377
- }), K.setRequests({ getBadges: async () => K.getSdk().createRequest({
378
- operation: "badges",
379
- fields: ["totalItems", { items: [
380
- "id",
381
- "createdAt",
382
- "updatedAt",
383
- "collectionId",
384
- "position",
385
- "assetId",
386
- { asset: [
387
- "id",
388
- "name",
389
- "preview",
390
- "source"
391
- ] },
392
- { collection: ["id", "name"] }
393
- ] }]
394
- }, { options: { take: 100 } }, !1).then((e) => e.data).catch((e) => ({
395
- message: e.message,
396
- errorCode: e.code || "unknown"
397
- })) });
398
- //#endregion
399
- //#region src/lib/components/product-badges.tsx
400
- var q = t(), J = "ProductBadge", [Y] = i(J), [He, Ue] = Y(J), X = ({ children: t, product: n, __scopeProductBadge: i, style: a, ...o }) => {
401
- let s = ie(null), c = e(E());
402
- if (!K.getEnabled()) return null;
403
- let { badges: l } = n;
404
- if (!l) return null;
405
- let u = l.reduce((e, t) => (e[t.position] || (e[t.position] = []), e[t.position].push(t), e), {}), d = {
406
- groupedBadges: u,
407
- badges: l,
408
- badgesRef: s,
409
- positions: Object.keys(u)
410
- };
411
- return /* @__PURE__ */ (0, q.jsx)(He, {
412
- scope: i,
413
- ...d,
414
- children: /* @__PURE__ */ (0, q.jsx)(c, {
415
- ...o,
416
- style: a,
417
- children: r(t, d)
418
- })
419
- });
30
+ Z.setQueryUpdates({
31
+ product: {
32
+ fields: [{
33
+ badges: ["id", "position", "assetId", {
34
+ asset: ["id", "name", "preview", "source"]
35
+ }, {
36
+ collection: ["id", "name"]
37
+ }]
38
+ }]
39
+ },
40
+ search: {
41
+ fields: [{
42
+ items: [{
43
+ badges: ["id", "position", "assetId", {
44
+ asset: ["id", "name", "preview", "source"]
45
+ }, {
46
+ collection: ["id", "name"]
47
+ }]
48
+ }]
49
+ }]
50
+ },
51
+ products: {
52
+ fields: [{
53
+ items: [{
54
+ badges: ["id", "position", "assetId", {
55
+ asset: ["id", "name", "preview", "source"]
56
+ }, {
57
+ collection: ["id", "name"]
58
+ }]
59
+ }]
60
+ }]
61
+ },
62
+ briefProducts: {
63
+ fields: [{
64
+ items: [{
65
+ badges: ["id", "position", "assetId", {
66
+ asset: ["id", "name", "preview", "source"]
67
+ }, {
68
+ collection: ["id", "name"]
69
+ }]
70
+ }]
71
+ }]
72
+ }
73
+ });
74
+ Z.setRequests({
75
+ getBadges: async () => Z.getSdk().createRequest({
76
+ operation: "badges",
77
+ fields: ["totalItems", {
78
+ items: ["id", "createdAt", "updatedAt", "collectionId", "position", "assetId", {
79
+ asset: ["id", "name", "preview", "source"]
80
+ }, {
81
+ collection: ["id", "name"]
82
+ }]
83
+ }]
84
+ }, {
85
+ options: {
86
+ take: 100
87
+ }
88
+ }, !1).then((t) => t.data).catch((t) => ({
89
+ message: t.message,
90
+ errorCode: t.code || "unknown"
91
+ }))
92
+ });
93
+ function wr(t) {
94
+ const e = [];
95
+ function r(o, s) {
96
+ const i = E.createContext(s), a = e.length;
97
+ e.push(i);
98
+ const c = (l) => {
99
+ const d = U.c(8);
100
+ let m, g, p;
101
+ d[0] !== l ? ({
102
+ scope: p,
103
+ children: m,
104
+ ...g
105
+ } = l, d[0] = l, d[1] = m, d[2] = g, d[3] = p) : (m = d[1], g = d[2], p = d[3]);
106
+ const y = p?.[t]?.[a] || i, h = g;
107
+ let w;
108
+ return d[4] !== y.Provider || d[5] !== m || d[6] !== h ? (w = /* @__PURE__ */ F.jsx(y.Provider, { value: h, children: m }), d[4] = y.Provider, d[5] = m, d[6] = h, d[7] = w) : w = d[7], w;
109
+ };
110
+ c.displayName = o + "Provider";
111
+ function u(l, d) {
112
+ const m = d?.[t]?.[a] || i, g = E.useContext(m);
113
+ if (g)
114
+ return g;
115
+ if (s !== void 0)
116
+ return s;
117
+ throw new Error(`\`${l}\` must be used within \`${o}\``);
118
+ }
119
+ return [c, u];
120
+ }
121
+ function n() {
122
+ const o = e.map((s) => E.createContext(s));
123
+ return function(i) {
124
+ const a = i?.[t] || o;
125
+ return E.useMemo(() => ({
126
+ [`__scope${t}`]: {
127
+ ...i,
128
+ [t]: a
129
+ }
130
+ }), [i, a]);
131
+ };
132
+ }
133
+ return n.scopeName = t, [r, n];
134
+ }
135
+ function Ar(t, e) {
136
+ if (e === "web")
137
+ return t;
138
+ const {
139
+ src: r,
140
+ alt: n,
141
+ width: o,
142
+ height: s,
143
+ ...i
144
+ } = t, a = [typeof o == "number" ? {
145
+ width: o
146
+ } : void 0, typeof s == "number" ? {
147
+ height: s
148
+ } : void 0].filter(Boolean);
149
+ let c;
150
+ return a.length === 1 ? c = a[0] : a.length > 1 && (c = a), {
151
+ ...i,
152
+ source: {
153
+ uri: r
154
+ },
155
+ ...c ? {
156
+ style: c
157
+ } : {}
158
+ // alt tas bort, finns inte i RN
159
+ };
160
+ }
161
+ function Sr(t) {
162
+ const {
163
+ src: e,
164
+ alt: r,
165
+ ...n
166
+ } = t;
167
+ return e ? {
168
+ ...n,
169
+ source: {
170
+ uri: e
171
+ }
172
+ } : n;
173
+ }
174
+ const Er = {
175
+ div: "View",
176
+ span: "Text",
177
+ p: "Text",
178
+ h1: "Text",
179
+ h2: "Text",
180
+ h3: "Text",
181
+ h4: "Text",
182
+ h5: "Text",
183
+ h6: "Text",
184
+ button: "Pressable",
185
+ input: "TextInput",
186
+ form: "View",
187
+ section: "View",
188
+ article: "View",
189
+ nav: "View",
190
+ header: "View",
191
+ footer: "View",
192
+ main: "View",
193
+ aside: "View",
194
+ ul: "View",
195
+ ol: "View",
196
+ li: "View",
197
+ a: "Pressable",
198
+ img: "Image",
199
+ label: "Text",
200
+ textarea: "TextInput",
201
+ select: "Pressable",
202
+ option: "Text"
420
203
  };
421
- X.displayName = J;
422
- var Z = ({ children: t, position: n, asChild: i, __scopeProductBadge: a, ...o }) => {
423
- let s = e(E(), i, "div"), { groupedBadges: c } = Ue(J, a), l = c[n];
424
- return /* @__PURE__ */ (0, q.jsx)(s, {
425
- ...o,
426
- "data-position": n,
427
- children: r(t, {
428
- badges: l,
429
- position: n
430
- })
431
- });
432
- }, Q = ({ children: t, asChild: n, badge: r, ...i }) => /* @__PURE__ */ (0, q.jsx)(e(E(), n, "div"), {
433
- ...i,
434
- "data-badge-id": r?.id,
435
- children: t
436
- }), $ = ({ badge: t, asChild: r, ...i }) => {
437
- let a = E(), o = e(a, r, "img"), s = n(i, a);
438
- return /* @__PURE__ */ (0, q.jsx)(o, {
439
- src: t.asset?.preview,
440
- alt: t.collection.name,
441
- "data-badge-name": t.collection.name,
442
- ...s
443
- });
204
+ function Or(t, e) {
205
+ if (e === "web")
206
+ return t;
207
+ let r = null;
208
+ try {
209
+ r = require("react-native");
210
+ } catch {
211
+ r = null;
212
+ }
213
+ if (!r)
214
+ return console.warn(`react-native is not available at runtime; falling back to 'View' for '${t}'`), "div";
215
+ const n = Er[t];
216
+ if (!n)
217
+ return console.warn(`No native component mapping found for '${t}', falling back to View`), r.View;
218
+ if (n === "Image") {
219
+ const s = mr.forwardRef((i, a) => {
220
+ const c = U.c(5);
221
+ if (!i.src)
222
+ return null;
223
+ let u;
224
+ c[0] !== i ? (u = Sr(i), c[0] = i, c[1] = u) : u = c[1];
225
+ let l;
226
+ return c[2] !== a || c[3] !== u ? (l = /* @__PURE__ */ F.jsx(r.Image, { ref: a, ...u }), c[2] = a, c[3] = u, c[4] = l) : l = c[4], l;
227
+ });
228
+ return s.displayName = "PlatformPrimitiveImage", s;
229
+ }
230
+ const o = r[n];
231
+ return o || (console.warn(`Native component '${n}' not found, falling back to View`), r.View);
232
+ }
233
+ const vr = /* @__PURE__ */ Symbol("radix.slottable");
234
+ function Tr(...t) {
235
+ return (e) => t.forEach((r) => {
236
+ typeof r == "function" ? r(e) : r != null && (r.current = e);
237
+ });
238
+ }
239
+ function Rr(t, e) {
240
+ const r = {
241
+ ...e
242
+ };
243
+ for (const n in e) {
244
+ const o = t[n], s = e[n];
245
+ /^on[A-Z]/.test(n) ? o && s ? r[n] = (...a) => {
246
+ const c = s(...a);
247
+ return o(...a), c;
248
+ } : o && (r[n] = o) : n === "style" ? r[n] = _r(o, s) : n === "className" && (r[n] = [o, s].filter(Boolean).join(" "));
249
+ }
250
+ return {
251
+ ...t,
252
+ ...r
253
+ };
254
+ }
255
+ function _r(t, e) {
256
+ let r = null;
257
+ try {
258
+ r = require("react-native");
259
+ } catch {
260
+ r = null;
261
+ }
262
+ const n = r?.StyleSheet?.flatten;
263
+ if (typeof t == "function" && typeof e == "function")
264
+ return (s) => {
265
+ const i = [t(s), e(s)];
266
+ return n ? n(i) : i;
267
+ };
268
+ if (typeof t == "function")
269
+ return (s) => {
270
+ const i = e ? [t(s), e] : t(s);
271
+ return n ? n(i) : i;
272
+ };
273
+ if (typeof e == "function")
274
+ return (s) => {
275
+ const i = t ? [t, e(s)] : e(s);
276
+ return n ? n(i) : i;
277
+ };
278
+ const o = [t, e].filter(Boolean);
279
+ return n ? n(o) : o;
280
+ }
281
+ function xr(t) {
282
+ return E.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === vr;
283
+ }
284
+ function Cr(t) {
285
+ let e = Object.getOwnPropertyDescriptor(t.props, "ref")?.get, r = e && "isReactWarning" in e && e.isReactWarning;
286
+ return r ? t.ref : (e = Object.getOwnPropertyDescriptor(t, "ref")?.get, r = e && "isReactWarning" in e && e.isReactWarning, r ? t.props.ref : t.props.ref || t.ref);
287
+ }
288
+ function Pr(t, e) {
289
+ const r = E.forwardRef((n, o) => {
290
+ const {
291
+ children: s,
292
+ ...i
293
+ } = n;
294
+ if (E.isValidElement(s)) {
295
+ const a = Cr(s), c = Rr(i, s.props);
296
+ return s.type !== E.Fragment && (c.ref = o ? Tr(o, a) : a), E.cloneElement(s, c);
297
+ }
298
+ return E.Children.count(s) > 1 ? E.Children.only(null) : null;
299
+ });
300
+ return r.displayName = `${t}.SlotClone`, r;
301
+ }
302
+ function Re(t, e = !1, r = "div") {
303
+ if (!e)
304
+ return Or(r, t);
305
+ const n = Pr("Slot"), o = E.forwardRef((s, i) => {
306
+ const a = U.c(15);
307
+ let c, u;
308
+ a[0] !== s ? ({
309
+ children: c,
310
+ ...u
311
+ } = s, a[0] = s, a[1] = c, a[2] = u) : (c = a[1], u = a[2]);
312
+ let l;
313
+ if (a[3] !== c || a[4] !== i || a[5] !== u) {
314
+ l = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
315
+ e: {
316
+ const m = E.Children.toArray(c), g = m.find(xr);
317
+ if (g) {
318
+ const p = g.props.children, y = m.map((v) => v === g ? E.Children.count(p) > 1 ? E.Children.only(null) : E.isValidElement(p) ? p.props.children : null : v), h = E.isValidElement(p) ? E.cloneElement(p, void 0, y) : null;
319
+ let w;
320
+ a[7] !== i || a[8] !== u || a[9] !== h ? (w = /* @__PURE__ */ F.jsx(n, { ...u, ref: i, children: h }), a[7] = i, a[8] = u, a[9] = h, a[10] = w) : w = a[10], l = w;
321
+ break e;
322
+ }
323
+ }
324
+ a[3] = c, a[4] = i, a[5] = u, a[6] = l;
325
+ } else
326
+ l = a[6];
327
+ if (l !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
328
+ return l;
329
+ let d;
330
+ return a[11] !== c || a[12] !== i || a[13] !== u ? (d = /* @__PURE__ */ F.jsx(n, { ...u, ref: i, children: c }), a[11] = c, a[12] = i, a[13] = u, a[14] = d) : d = a[14], d;
331
+ });
332
+ return o.displayName = "Slot", o;
333
+ }
334
+ const Nr = "debug", P = () => {
335
+ try {
336
+ if (typeof window > "u" || typeof localStorage > "u")
337
+ return !1;
338
+ const t = localStorage.getItem(Nr);
339
+ return t === "true" || t === "1";
340
+ } catch {
341
+ return !1;
342
+ }
343
+ }, qr = () => {
344
+ const t = (e, r, n = []) => r ? typeof e == "string" ? [`<${r}> ${e}`, ...n] : [`<${r}>`, e, ...n] : Array.isArray(e) ? [...e, ...n] : [e, ...n];
345
+ return {
346
+ log: (e, r, ...n) => {
347
+ P() && console.log(...t(e, r, n));
348
+ },
349
+ info: (e, r, ...n) => {
350
+ P() && console.info(...t(e, r, n));
351
+ },
352
+ warn: (e, r, ...n) => {
353
+ P() && console.warn(...t(e, r, n));
354
+ },
355
+ error: (e, r, ...n) => {
356
+ P() && console.error(...t(e, r, n));
357
+ },
358
+ debug: (e, r, ...n) => {
359
+ P() && console.debug(...t(e, r, n));
360
+ },
361
+ group: (e, r) => {
362
+ if (P()) {
363
+ const n = typeof e == "string" ? e : void 0;
364
+ console.group(r ? n ? `<${r}> ${n}` : `<${r}>` : n);
365
+ }
366
+ },
367
+ groupCollapsed: (e, r) => {
368
+ if (P()) {
369
+ const n = typeof e == "string" ? e : void 0;
370
+ console.groupCollapsed(r ? n ? `<${r}> ${n}` : `<${r}>` : n);
371
+ }
372
+ },
373
+ groupEnd: () => {
374
+ P() && console.groupEnd();
375
+ },
376
+ table: (e, r, n) => {
377
+ P() && (r && console.log(`<${r}>`), console.table(e, n));
378
+ },
379
+ time: (e, r) => {
380
+ if (P()) {
381
+ const n = typeof e == "string" ? e : void 0;
382
+ console.time(r ? n ? `<${r}> ${n}` : `<${r}>` : n);
383
+ }
384
+ },
385
+ timeEnd: (e, r) => {
386
+ if (P()) {
387
+ const n = typeof e == "string" ? e : void 0;
388
+ console.timeEnd(r ? n ? `<${r}> ${n}` : `<${r}>` : n);
389
+ }
390
+ }
391
+ };
392
+ }, Dr = qr();
393
+ function jr(t) {
394
+ return { all: t = t || /* @__PURE__ */ new Map(), on: function(e, r) {
395
+ var n = t.get(e);
396
+ n ? n.push(r) : t.set(e, [r]);
397
+ }, off: function(e, r) {
398
+ var n = t.get(e);
399
+ n && (r ? n.splice(n.indexOf(r) >>> 0, 1) : t.set(e, []));
400
+ }, emit: function(e, r) {
401
+ var n = t.get(e);
402
+ n && n.slice().map(function(o) {
403
+ o(r);
404
+ }), (n = t.get("*")) && n.slice().map(function(o) {
405
+ o(e, r);
406
+ });
407
+ } };
408
+ }
409
+ let Y;
410
+ try {
411
+ Y = require("@react-native-async-storage/async-storage").default;
412
+ } catch {
413
+ Y = null;
414
+ }
415
+ let ke = null;
416
+ try {
417
+ const {
418
+ AsyncLocalStorage: t
419
+ } = require("node:async_hooks");
420
+ ke = new t();
421
+ } catch {
422
+ ke = null;
423
+ }
424
+ const K = typeof window < "u" && typeof window.localStorage < "u", z = !!Y, me = {}, Be = {
425
+ getItem: async () => null,
426
+ setItem: async () => {
427
+ },
428
+ removeItem: async () => {
429
+ }
430
+ }, Ie = () => {
431
+ try {
432
+ return ke?.getStore?.() ?? null;
433
+ } catch {
434
+ return null;
435
+ }
436
+ }, Me = {
437
+ getItem: async (t) => {
438
+ const e = !K && !z ? Ie() : null;
439
+ return e ? e.getItem(t) : z ? Y.getItem(t) : K ? new Promise((r) => {
440
+ Promise.resolve().then(() => {
441
+ const n = window.localStorage.getItem(t), o = me[t];
442
+ n !== o && (me[t] = n || ""), r(n);
443
+ });
444
+ }) : Be.getItem(t);
445
+ },
446
+ setItem: async (t, e) => {
447
+ const r = !K && !z ? Ie() : null;
448
+ return r ? r.setItem(t, e) : z ? Y.setItem(t, e) : K ? new Promise((n, o) => {
449
+ Promise.resolve().then(() => {
450
+ try {
451
+ window.localStorage.setItem(t, e);
452
+ const s = window.localStorage.getItem(t);
453
+ s === e ? (me[t] = e, n()) : o(new Error(`Failed to set localStorage item: expected "${e}", got "${s}"`));
454
+ } catch (s) {
455
+ o(s);
456
+ }
457
+ });
458
+ }) : Be.setItem(t, e);
459
+ },
460
+ removeItem: async (t) => {
461
+ const e = !K && !z ? Ie() : null;
462
+ return e ? e.removeItem(t) : z ? Y.removeItem(t) : K ? new Promise((r, n) => {
463
+ Promise.resolve().then(() => {
464
+ try {
465
+ window.localStorage.removeItem(t);
466
+ const o = window.localStorage.getItem(t);
467
+ o === null ? (delete me[t], r()) : n(new Error(`Failed to remove localStorage item: key "${t}" still exists with value "${o}"`));
468
+ } catch (o) {
469
+ n(o);
470
+ }
471
+ });
472
+ }) : Be.removeItem(t);
473
+ }
474
+ }, st = 50, M = {
475
+ get: async () => {
476
+ try {
477
+ const t = await Me.getItem("eventHistory");
478
+ return t ? JSON.parse(t) : [];
479
+ } catch (t) {
480
+ return console.error("Error getting event history", t), [];
481
+ }
482
+ },
483
+ set: async (t) => {
484
+ try {
485
+ await Me.setItem("eventHistory", JSON.stringify(t.slice(-st)));
486
+ } catch (e) {
487
+ console.error("Error setting event history", e);
488
+ }
489
+ },
490
+ clear: async () => {
491
+ try {
492
+ await Me.removeItem("eventHistory");
493
+ } catch (t) {
494
+ console.error("Error clearing event history", t);
495
+ }
496
+ },
497
+ push: async (t) => {
498
+ const e = await M.get();
499
+ await M.set([{
500
+ ...t,
501
+ timestamp: Date.now()
502
+ }, ...e].slice(-st));
503
+ },
504
+ find: async (t) => (await M.get()).find((r) => r.key === t.key && r.identifier === t.identifier),
505
+ filter: async (t, e) => {
506
+ const r = await M.get();
507
+ return e ? r.filter(e) : r.filter(({
508
+ key: n,
509
+ identifier: o
510
+ }) => (!n || t.key === n) && (!o || t.identifier === o));
511
+ }
512
+ };
513
+ function Fr() {
514
+ const t = globalThis;
515
+ return t.__HAUS_EVENT_EMITTER__ ||= jr(), t.__HAUS_EVENT_EMITTER__;
516
+ }
517
+ function W(t) {
518
+ const e = Fr(), r = ((...c) => console.error(...c));
519
+ M.get().then((c) => {
520
+ const l = jt.first(c)?.timestamp;
521
+ l && l < Date.now() - 1e3 * 60 * 60 && (Dr.info("Clearing event history since it is older than 1 hour:", "eventBus", l), M.clear());
522
+ });
523
+ const n = (c, u, l) => {
524
+ const d = (m) => {
525
+ try {
526
+ if (typeof m == "object" && m !== null) {
527
+ const {
528
+ identifier: g,
529
+ data: p
530
+ } = m;
531
+ (!g || g === l) && u(p);
532
+ } else
533
+ u(m);
534
+ } catch (g) {
535
+ r(g);
536
+ }
537
+ };
538
+ return e.on(c, d), () => {
539
+ o(c, u, l);
540
+ };
541
+ }, o = (c, u, l) => {
542
+ const d = (m) => {
543
+ if (typeof m == "object" && m !== null) {
544
+ const {
545
+ identifier: g
546
+ } = m;
547
+ (!g || g === l) && e.off(c, u);
548
+ }
549
+ };
550
+ e.off(c, d);
551
+ };
552
+ return {
553
+ on: n,
554
+ off: o,
555
+ once: (c, u, l) => {
556
+ const d = (m) => {
557
+ try {
558
+ if (typeof m == "object" && m !== null) {
559
+ const {
560
+ identifier: g,
561
+ data: p
562
+ } = m;
563
+ (!g || g === l) && u(p);
564
+ } else
565
+ u(m);
566
+ } finally {
567
+ o(c, d, l);
568
+ }
569
+ };
570
+ e.on(c, d);
571
+ },
572
+ emit: (c, u, ...l) => {
573
+ const d = {
574
+ identifier: u,
575
+ data: l.length === 1 ? l[0] : l
576
+ };
577
+ M.push({
578
+ key: c,
579
+ identifier: u,
580
+ payload: d.data
581
+ }), e.emit(c, d);
582
+ },
583
+ getEventHistory: (c, u) => M.filter({
584
+ key: c,
585
+ identifier: u
586
+ })
587
+ };
588
+ }
589
+ W();
590
+ W();
591
+ W();
592
+ W();
593
+ W();
594
+ W();
595
+ W();
596
+ const Br = globalThis.__STORE_SDK_CONTEXT__ ||= yr(void 0);
597
+ function Bt(t, e) {
598
+ return function() {
599
+ return t.apply(e, arguments);
600
+ };
601
+ }
602
+ const { toString: Ir } = Object.prototype, { getPrototypeOf: ze } = Object, { iterator: _e, toStringTag: It } = Symbol, xe = /* @__PURE__ */ ((t) => (e) => {
603
+ const r = Ir.call(e);
604
+ return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
605
+ })(/* @__PURE__ */ Object.create(null)), q = (t) => (t = t.toLowerCase(), (e) => xe(e) === t), Ce = (t) => (e) => typeof e === t, { isArray: te } = Array, ee = Ce("undefined");
606
+ function ie(t) {
607
+ return t !== null && !ee(t) && t.constructor !== null && !ee(t.constructor) && R(t.constructor.isBuffer) && t.constructor.isBuffer(t);
608
+ }
609
+ const Mt = q("ArrayBuffer");
610
+ function Mr(t) {
611
+ let e;
612
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Mt(t.buffer), e;
613
+ }
614
+ const Ur = Ce("string"), R = Ce("function"), Ut = Ce("number"), ae = (t) => t !== null && typeof t == "object", Lr = (t) => t === !0 || t === !1, Ee = (t) => {
615
+ if (xe(t) !== "object")
616
+ return !1;
617
+ const e = ze(t);
618
+ return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(It in t) && !(_e in t);
619
+ }, $r = (t) => {
620
+ if (!ae(t) || ie(t))
621
+ return !1;
622
+ try {
623
+ return Object.keys(t).length === 0 && Object.getPrototypeOf(t) === Object.prototype;
624
+ } catch {
625
+ return !1;
626
+ }
627
+ }, kr = q("Date"), Hr = q("File"), Vr = q("Blob"), Wr = q("FileList"), Qr = (t) => ae(t) && R(t.pipe), Kr = (t) => {
628
+ let e;
629
+ return t && (typeof FormData == "function" && t instanceof FormData || R(t.append) && ((e = xe(t)) === "formdata" || // detect form-data instance
630
+ e === "object" && R(t.toString) && t.toString() === "[object FormData]"));
631
+ }, zr = q("URLSearchParams"), [Jr, Gr, Xr, Yr] = ["ReadableStream", "Request", "Response", "Headers"].map(q), Zr = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
632
+ function ce(t, e, { allOwnKeys: r = !1 } = {}) {
633
+ if (t === null || typeof t > "u")
634
+ return;
635
+ let n, o;
636
+ if (typeof t != "object" && (t = [t]), te(t))
637
+ for (n = 0, o = t.length; n < o; n++)
638
+ e.call(null, t[n], n, t);
639
+ else {
640
+ if (ie(t))
641
+ return;
642
+ const s = r ? Object.getOwnPropertyNames(t) : Object.keys(t), i = s.length;
643
+ let a;
644
+ for (n = 0; n < i; n++)
645
+ a = s[n], e.call(null, t[a], a, t);
646
+ }
647
+ }
648
+ function Lt(t, e) {
649
+ if (ie(t))
650
+ return null;
651
+ e = e.toLowerCase();
652
+ const r = Object.keys(t);
653
+ let n = r.length, o;
654
+ for (; n-- > 0; )
655
+ if (o = r[n], e === o.toLowerCase())
656
+ return o;
657
+ return null;
658
+ }
659
+ const k = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, $t = (t) => !ee(t) && t !== k;
660
+ function He() {
661
+ const { caseless: t, skipUndefined: e } = $t(this) && this || {}, r = {}, n = (o, s) => {
662
+ const i = t && Lt(r, s) || s;
663
+ Ee(r[i]) && Ee(o) ? r[i] = He(r[i], o) : Ee(o) ? r[i] = He({}, o) : te(o) ? r[i] = o.slice() : (!e || !ee(o)) && (r[i] = o);
664
+ };
665
+ for (let o = 0, s = arguments.length; o < s; o++)
666
+ arguments[o] && ce(arguments[o], n);
667
+ return r;
668
+ }
669
+ const en = (t, e, r, { allOwnKeys: n } = {}) => (ce(e, (o, s) => {
670
+ r && R(o) ? t[s] = Bt(o, r) : t[s] = o;
671
+ }, { allOwnKeys: n }), t), tn = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), rn = (t, e, r, n) => {
672
+ t.prototype = Object.create(e.prototype, n), t.prototype.constructor = t, Object.defineProperty(t, "super", {
673
+ value: e.prototype
674
+ }), r && Object.assign(t.prototype, r);
675
+ }, nn = (t, e, r, n) => {
676
+ let o, s, i;
677
+ const a = {};
678
+ if (e = e || {}, t == null) return e;
679
+ do {
680
+ for (o = Object.getOwnPropertyNames(t), s = o.length; s-- > 0; )
681
+ i = o[s], (!n || n(i, t, e)) && !a[i] && (e[i] = t[i], a[i] = !0);
682
+ t = r !== !1 && ze(t);
683
+ } while (t && (!r || r(t, e)) && t !== Object.prototype);
684
+ return e;
685
+ }, on = (t, e, r) => {
686
+ t = String(t), (r === void 0 || r > t.length) && (r = t.length), r -= e.length;
687
+ const n = t.indexOf(e, r);
688
+ return n !== -1 && n === r;
689
+ }, sn = (t) => {
690
+ if (!t) return null;
691
+ if (te(t)) return t;
692
+ let e = t.length;
693
+ if (!Ut(e)) return null;
694
+ const r = new Array(e);
695
+ for (; e-- > 0; )
696
+ r[e] = t[e];
697
+ return r;
698
+ }, an = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && ze(Uint8Array)), cn = (t, e) => {
699
+ const n = (t && t[_e]).call(t);
700
+ let o;
701
+ for (; (o = n.next()) && !o.done; ) {
702
+ const s = o.value;
703
+ e.call(t, s[0], s[1]);
704
+ }
705
+ }, un = (t, e) => {
706
+ let r;
707
+ const n = [];
708
+ for (; (r = t.exec(e)) !== null; )
709
+ n.push(r);
710
+ return n;
711
+ }, ln = q("HTMLFormElement"), fn = (t) => t.toLowerCase().replace(
712
+ /[-_\s]([a-z\d])(\w*)/g,
713
+ function(r, n, o) {
714
+ return n.toUpperCase() + o;
715
+ }
716
+ ), it = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), dn = q("RegExp"), kt = (t, e) => {
717
+ const r = Object.getOwnPropertyDescriptors(t), n = {};
718
+ ce(r, (o, s) => {
719
+ let i;
720
+ (i = e(o, s, t)) !== !1 && (n[s] = i || o);
721
+ }), Object.defineProperties(t, n);
722
+ }, pn = (t) => {
723
+ kt(t, (e, r) => {
724
+ if (R(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
725
+ return !1;
726
+ const n = t[r];
727
+ if (R(n)) {
728
+ if (e.enumerable = !1, "writable" in e) {
729
+ e.writable = !1;
730
+ return;
731
+ }
732
+ e.set || (e.set = () => {
733
+ throw Error("Can not rewrite read-only method '" + r + "'");
734
+ });
735
+ }
736
+ });
737
+ }, hn = (t, e) => {
738
+ const r = {}, n = (o) => {
739
+ o.forEach((s) => {
740
+ r[s] = !0;
741
+ });
742
+ };
743
+ return te(t) ? n(t) : n(String(t).split(e)), r;
744
+ }, mn = () => {
745
+ }, yn = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
746
+ function gn(t) {
747
+ return !!(t && R(t.append) && t[It] === "FormData" && t[_e]);
748
+ }
749
+ const bn = (t) => {
750
+ const e = new Array(10), r = (n, o) => {
751
+ if (ae(n)) {
752
+ if (e.indexOf(n) >= 0)
753
+ return;
754
+ if (ie(n))
755
+ return n;
756
+ if (!("toJSON" in n)) {
757
+ e[o] = n;
758
+ const s = te(n) ? [] : {};
759
+ return ce(n, (i, a) => {
760
+ const c = r(i, o + 1);
761
+ !ee(c) && (s[a] = c);
762
+ }), e[o] = void 0, s;
763
+ }
764
+ }
765
+ return n;
766
+ };
767
+ return r(t, 0);
768
+ }, wn = q("AsyncFunction"), An = (t) => t && (ae(t) || R(t)) && R(t.then) && R(t.catch), Ht = ((t, e) => t ? setImmediate : e ? ((r, n) => (k.addEventListener("message", ({ source: o, data: s }) => {
769
+ o === k && s === r && n.length && n.shift()();
770
+ }, !1), (o) => {
771
+ n.push(o), k.postMessage(r, "*");
772
+ }))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
773
+ typeof setImmediate == "function",
774
+ R(k.postMessage)
775
+ ), Sn = typeof queueMicrotask < "u" ? queueMicrotask.bind(k) : typeof process < "u" && process.nextTick || Ht, En = (t) => t != null && R(t[_e]), f = {
776
+ isArray: te,
777
+ isArrayBuffer: Mt,
778
+ isBuffer: ie,
779
+ isFormData: Kr,
780
+ isArrayBufferView: Mr,
781
+ isString: Ur,
782
+ isNumber: Ut,
783
+ isBoolean: Lr,
784
+ isObject: ae,
785
+ isPlainObject: Ee,
786
+ isEmptyObject: $r,
787
+ isReadableStream: Jr,
788
+ isRequest: Gr,
789
+ isResponse: Xr,
790
+ isHeaders: Yr,
791
+ isUndefined: ee,
792
+ isDate: kr,
793
+ isFile: Hr,
794
+ isBlob: Vr,
795
+ isRegExp: dn,
796
+ isFunction: R,
797
+ isStream: Qr,
798
+ isURLSearchParams: zr,
799
+ isTypedArray: an,
800
+ isFileList: Wr,
801
+ forEach: ce,
802
+ merge: He,
803
+ extend: en,
804
+ trim: Zr,
805
+ stripBOM: tn,
806
+ inherits: rn,
807
+ toFlatObject: nn,
808
+ kindOf: xe,
809
+ kindOfTest: q,
810
+ endsWith: on,
811
+ toArray: sn,
812
+ forEachEntry: cn,
813
+ matchAll: un,
814
+ isHTMLForm: ln,
815
+ hasOwnProperty: it,
816
+ hasOwnProp: it,
817
+ // an alias to avoid ESLint no-prototype-builtins detection
818
+ reduceDescriptors: kt,
819
+ freezeMethods: pn,
820
+ toObjectSet: hn,
821
+ toCamelCase: fn,
822
+ noop: mn,
823
+ toFiniteNumber: yn,
824
+ findKey: Lt,
825
+ global: k,
826
+ isContextDefined: $t,
827
+ isSpecCompliantForm: gn,
828
+ toJSONObject: bn,
829
+ isAsyncFn: wn,
830
+ isThenable: An,
831
+ setImmediate: Ht,
832
+ asap: Sn,
833
+ isIterable: En
444
834
  };
445
- Z.displayName = "ProductBadgeGroup", Q.displayName = "ProductBadgeItem", $.displayName = "ProductBadgeImage";
446
- var We = {
447
- Root: X,
448
- Group: Z,
449
- Item: Q,
450
- Image: $
835
+ function b(t, e, r, n, o) {
836
+ Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), r && (this.config = r), n && (this.request = n), o && (this.response = o, this.status = o.status ? o.status : null);
837
+ }
838
+ f.inherits(b, Error, {
839
+ toJSON: function() {
840
+ return {
841
+ // Standard
842
+ message: this.message,
843
+ name: this.name,
844
+ // Microsoft
845
+ description: this.description,
846
+ number: this.number,
847
+ // Mozilla
848
+ fileName: this.fileName,
849
+ lineNumber: this.lineNumber,
850
+ columnNumber: this.columnNumber,
851
+ stack: this.stack,
852
+ // Axios
853
+ config: f.toJSONObject(this.config),
854
+ code: this.code,
855
+ status: this.status
856
+ };
857
+ }
858
+ });
859
+ const Vt = b.prototype, Wt = {};
860
+ [
861
+ "ERR_BAD_OPTION_VALUE",
862
+ "ERR_BAD_OPTION",
863
+ "ECONNABORTED",
864
+ "ETIMEDOUT",
865
+ "ERR_NETWORK",
866
+ "ERR_FR_TOO_MANY_REDIRECTS",
867
+ "ERR_DEPRECATED",
868
+ "ERR_BAD_RESPONSE",
869
+ "ERR_BAD_REQUEST",
870
+ "ERR_CANCELED",
871
+ "ERR_NOT_SUPPORT",
872
+ "ERR_INVALID_URL"
873
+ // eslint-disable-next-line func-names
874
+ ].forEach((t) => {
875
+ Wt[t] = { value: t };
876
+ });
877
+ Object.defineProperties(b, Wt);
878
+ Object.defineProperty(Vt, "isAxiosError", { value: !0 });
879
+ b.from = (t, e, r, n, o, s) => {
880
+ const i = Object.create(Vt);
881
+ f.toFlatObject(t, i, function(l) {
882
+ return l !== Error.prototype;
883
+ }, (u) => u !== "isAxiosError");
884
+ const a = t && t.message ? t.message : "Error", c = e == null && t ? t.code : e;
885
+ return b.call(i, a, c, r, n, o), t && i.cause == null && Object.defineProperty(i, "cause", { value: t, configurable: !0 }), i.name = t && t.name || "Error", s && Object.assign(i, s), i;
886
+ };
887
+ const On = null;
888
+ function Ve(t) {
889
+ return f.isPlainObject(t) || f.isArray(t);
890
+ }
891
+ function Qt(t) {
892
+ return f.endsWith(t, "[]") ? t.slice(0, -2) : t;
893
+ }
894
+ function at(t, e, r) {
895
+ return t ? t.concat(e).map(function(o, s) {
896
+ return o = Qt(o), !r && s ? "[" + o + "]" : o;
897
+ }).join(r ? "." : "") : e;
898
+ }
899
+ function vn(t) {
900
+ return f.isArray(t) && !t.some(Ve);
901
+ }
902
+ const Tn = f.toFlatObject(f, {}, null, function(e) {
903
+ return /^is[A-Z]/.test(e);
904
+ });
905
+ function Pe(t, e, r) {
906
+ if (!f.isObject(t))
907
+ throw new TypeError("target must be an object");
908
+ e = e || new FormData(), r = f.toFlatObject(r, {
909
+ metaTokens: !0,
910
+ dots: !1,
911
+ indexes: !1
912
+ }, !1, function(y, h) {
913
+ return !f.isUndefined(h[y]);
914
+ });
915
+ const n = r.metaTokens, o = r.visitor || l, s = r.dots, i = r.indexes, c = (r.Blob || typeof Blob < "u" && Blob) && f.isSpecCompliantForm(e);
916
+ if (!f.isFunction(o))
917
+ throw new TypeError("visitor must be a function");
918
+ function u(p) {
919
+ if (p === null) return "";
920
+ if (f.isDate(p))
921
+ return p.toISOString();
922
+ if (f.isBoolean(p))
923
+ return p.toString();
924
+ if (!c && f.isBlob(p))
925
+ throw new b("Blob is not supported. Use a Buffer instead.");
926
+ return f.isArrayBuffer(p) || f.isTypedArray(p) ? c && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
927
+ }
928
+ function l(p, y, h) {
929
+ let w = p;
930
+ if (p && !h && typeof p == "object") {
931
+ if (f.endsWith(y, "{}"))
932
+ y = n ? y : y.slice(0, -2), p = JSON.stringify(p);
933
+ else if (f.isArray(p) && vn(p) || (f.isFileList(p) || f.endsWith(y, "[]")) && (w = f.toArray(p)))
934
+ return y = Qt(y), w.forEach(function(S, T) {
935
+ !(f.isUndefined(S) || S === null) && e.append(
936
+ // eslint-disable-next-line no-nested-ternary
937
+ i === !0 ? at([y], T, s) : i === null ? y : y + "[]",
938
+ u(S)
939
+ );
940
+ }), !1;
941
+ }
942
+ return Ve(p) ? !0 : (e.append(at(h, y, s), u(p)), !1);
943
+ }
944
+ const d = [], m = Object.assign(Tn, {
945
+ defaultVisitor: l,
946
+ convertValue: u,
947
+ isVisitable: Ve
948
+ });
949
+ function g(p, y) {
950
+ if (!f.isUndefined(p)) {
951
+ if (d.indexOf(p) !== -1)
952
+ throw Error("Circular reference detected in " + y.join("."));
953
+ d.push(p), f.forEach(p, function(w, v) {
954
+ (!(f.isUndefined(w) || w === null) && o.call(
955
+ e,
956
+ w,
957
+ f.isString(v) ? v.trim() : v,
958
+ y,
959
+ m
960
+ )) === !0 && g(w, y ? y.concat(v) : [v]);
961
+ }), d.pop();
962
+ }
963
+ }
964
+ if (!f.isObject(t))
965
+ throw new TypeError("data must be an object");
966
+ return g(t), e;
967
+ }
968
+ function ct(t) {
969
+ const e = {
970
+ "!": "%21",
971
+ "'": "%27",
972
+ "(": "%28",
973
+ ")": "%29",
974
+ "~": "%7E",
975
+ "%20": "+",
976
+ "%00": "\0"
977
+ };
978
+ return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g, function(n) {
979
+ return e[n];
980
+ });
981
+ }
982
+ function Je(t, e) {
983
+ this._pairs = [], t && Pe(t, this, e);
984
+ }
985
+ const Kt = Je.prototype;
986
+ Kt.append = function(e, r) {
987
+ this._pairs.push([e, r]);
988
+ };
989
+ Kt.toString = function(e) {
990
+ const r = e ? function(n) {
991
+ return e.call(this, n, ct);
992
+ } : ct;
993
+ return this._pairs.map(function(o) {
994
+ return r(o[0]) + "=" + r(o[1]);
995
+ }, "").join("&");
996
+ };
997
+ function Rn(t) {
998
+ return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
999
+ }
1000
+ function zt(t, e, r) {
1001
+ if (!e)
1002
+ return t;
1003
+ const n = r && r.encode || Rn;
1004
+ f.isFunction(r) && (r = {
1005
+ serialize: r
1006
+ });
1007
+ const o = r && r.serialize;
1008
+ let s;
1009
+ if (o ? s = o(e, r) : s = f.isURLSearchParams(e) ? e.toString() : new Je(e, r).toString(n), s) {
1010
+ const i = t.indexOf("#");
1011
+ i !== -1 && (t = t.slice(0, i)), t += (t.indexOf("?") === -1 ? "?" : "&") + s;
1012
+ }
1013
+ return t;
1014
+ }
1015
+ class ut {
1016
+ constructor() {
1017
+ this.handlers = [];
1018
+ }
1019
+ /**
1020
+ * Add a new interceptor to the stack
1021
+ *
1022
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
1023
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
1024
+ *
1025
+ * @return {Number} An ID used to remove interceptor later
1026
+ */
1027
+ use(e, r, n) {
1028
+ return this.handlers.push({
1029
+ fulfilled: e,
1030
+ rejected: r,
1031
+ synchronous: n ? n.synchronous : !1,
1032
+ runWhen: n ? n.runWhen : null
1033
+ }), this.handlers.length - 1;
1034
+ }
1035
+ /**
1036
+ * Remove an interceptor from the stack
1037
+ *
1038
+ * @param {Number} id The ID that was returned by `use`
1039
+ *
1040
+ * @returns {void}
1041
+ */
1042
+ eject(e) {
1043
+ this.handlers[e] && (this.handlers[e] = null);
1044
+ }
1045
+ /**
1046
+ * Clear all interceptors from the stack
1047
+ *
1048
+ * @returns {void}
1049
+ */
1050
+ clear() {
1051
+ this.handlers && (this.handlers = []);
1052
+ }
1053
+ /**
1054
+ * Iterate over all the registered interceptors
1055
+ *
1056
+ * This method is particularly useful for skipping over any
1057
+ * interceptors that may have become `null` calling `eject`.
1058
+ *
1059
+ * @param {Function} fn The function to call for each interceptor
1060
+ *
1061
+ * @returns {void}
1062
+ */
1063
+ forEach(e) {
1064
+ f.forEach(this.handlers, function(n) {
1065
+ n !== null && e(n);
1066
+ });
1067
+ }
1068
+ }
1069
+ const Jt = {
1070
+ silentJSONParsing: !0,
1071
+ forcedJSONParsing: !0,
1072
+ clarifyTimeoutError: !1
1073
+ }, _n = typeof URLSearchParams < "u" ? URLSearchParams : Je, xn = typeof FormData < "u" ? FormData : null, Cn = typeof Blob < "u" ? Blob : null, Pn = {
1074
+ isBrowser: !0,
1075
+ classes: {
1076
+ URLSearchParams: _n,
1077
+ FormData: xn,
1078
+ Blob: Cn
1079
+ },
1080
+ protocols: ["http", "https", "file", "blob", "url", "data"]
1081
+ }, Ge = typeof window < "u" && typeof document < "u", We = typeof navigator == "object" && navigator || void 0, Nn = Ge && (!We || ["ReactNative", "NativeScript", "NS"].indexOf(We.product) < 0), qn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
1082
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Dn = Ge && window.location.href || "http://localhost", jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1083
+ __proto__: null,
1084
+ hasBrowserEnv: Ge,
1085
+ hasStandardBrowserEnv: Nn,
1086
+ hasStandardBrowserWebWorkerEnv: qn,
1087
+ navigator: We,
1088
+ origin: Dn
1089
+ }, Symbol.toStringTag, { value: "Module" })), O = {
1090
+ ...jn,
1091
+ ...Pn
1092
+ };
1093
+ function Fn(t, e) {
1094
+ return Pe(t, new O.classes.URLSearchParams(), {
1095
+ visitor: function(r, n, o, s) {
1096
+ return O.isNode && f.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
1097
+ },
1098
+ ...e
1099
+ });
1100
+ }
1101
+ function Bn(t) {
1102
+ return f.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
1103
+ }
1104
+ function In(t) {
1105
+ const e = {}, r = Object.keys(t);
1106
+ let n;
1107
+ const o = r.length;
1108
+ let s;
1109
+ for (n = 0; n < o; n++)
1110
+ s = r[n], e[s] = t[s];
1111
+ return e;
1112
+ }
1113
+ function Gt(t) {
1114
+ function e(r, n, o, s) {
1115
+ let i = r[s++];
1116
+ if (i === "__proto__") return !0;
1117
+ const a = Number.isFinite(+i), c = s >= r.length;
1118
+ return i = !i && f.isArray(o) ? o.length : i, c ? (f.hasOwnProp(o, i) ? o[i] = [o[i], n] : o[i] = n, !a) : ((!o[i] || !f.isObject(o[i])) && (o[i] = []), e(r, n, o[i], s) && f.isArray(o[i]) && (o[i] = In(o[i])), !a);
1119
+ }
1120
+ if (f.isFormData(t) && f.isFunction(t.entries)) {
1121
+ const r = {};
1122
+ return f.forEachEntry(t, (n, o) => {
1123
+ e(Bn(n), o, r, 0);
1124
+ }), r;
1125
+ }
1126
+ return null;
1127
+ }
1128
+ function Mn(t, e, r) {
1129
+ if (f.isString(t))
1130
+ try {
1131
+ return (e || JSON.parse)(t), f.trim(t);
1132
+ } catch (n) {
1133
+ if (n.name !== "SyntaxError")
1134
+ throw n;
1135
+ }
1136
+ return (r || JSON.stringify)(t);
1137
+ }
1138
+ const ue = {
1139
+ transitional: Jt,
1140
+ adapter: ["xhr", "http", "fetch"],
1141
+ transformRequest: [function(e, r) {
1142
+ const n = r.getContentType() || "", o = n.indexOf("application/json") > -1, s = f.isObject(e);
1143
+ if (s && f.isHTMLForm(e) && (e = new FormData(e)), f.isFormData(e))
1144
+ return o ? JSON.stringify(Gt(e)) : e;
1145
+ if (f.isArrayBuffer(e) || f.isBuffer(e) || f.isStream(e) || f.isFile(e) || f.isBlob(e) || f.isReadableStream(e))
1146
+ return e;
1147
+ if (f.isArrayBufferView(e))
1148
+ return e.buffer;
1149
+ if (f.isURLSearchParams(e))
1150
+ return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
1151
+ let a;
1152
+ if (s) {
1153
+ if (n.indexOf("application/x-www-form-urlencoded") > -1)
1154
+ return Fn(e, this.formSerializer).toString();
1155
+ if ((a = f.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
1156
+ const c = this.env && this.env.FormData;
1157
+ return Pe(
1158
+ a ? { "files[]": e } : e,
1159
+ c && new c(),
1160
+ this.formSerializer
1161
+ );
1162
+ }
1163
+ }
1164
+ return s || o ? (r.setContentType("application/json", !1), Mn(e)) : e;
1165
+ }],
1166
+ transformResponse: [function(e) {
1167
+ const r = this.transitional || ue.transitional, n = r && r.forcedJSONParsing, o = this.responseType === "json";
1168
+ if (f.isResponse(e) || f.isReadableStream(e))
1169
+ return e;
1170
+ if (e && f.isString(e) && (n && !this.responseType || o)) {
1171
+ const i = !(r && r.silentJSONParsing) && o;
1172
+ try {
1173
+ return JSON.parse(e, this.parseReviver);
1174
+ } catch (a) {
1175
+ if (i)
1176
+ throw a.name === "SyntaxError" ? b.from(a, b.ERR_BAD_RESPONSE, this, null, this.response) : a;
1177
+ }
1178
+ }
1179
+ return e;
1180
+ }],
1181
+ /**
1182
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
1183
+ * timeout is not created.
1184
+ */
1185
+ timeout: 0,
1186
+ xsrfCookieName: "XSRF-TOKEN",
1187
+ xsrfHeaderName: "X-XSRF-TOKEN",
1188
+ maxContentLength: -1,
1189
+ maxBodyLength: -1,
1190
+ env: {
1191
+ FormData: O.classes.FormData,
1192
+ Blob: O.classes.Blob
1193
+ },
1194
+ validateStatus: function(e) {
1195
+ return e >= 200 && e < 300;
1196
+ },
1197
+ headers: {
1198
+ common: {
1199
+ Accept: "application/json, text/plain, */*",
1200
+ "Content-Type": void 0
1201
+ }
1202
+ }
1203
+ };
1204
+ f.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
1205
+ ue.headers[t] = {};
1206
+ });
1207
+ const Un = f.toObjectSet([
1208
+ "age",
1209
+ "authorization",
1210
+ "content-length",
1211
+ "content-type",
1212
+ "etag",
1213
+ "expires",
1214
+ "from",
1215
+ "host",
1216
+ "if-modified-since",
1217
+ "if-unmodified-since",
1218
+ "last-modified",
1219
+ "location",
1220
+ "max-forwards",
1221
+ "proxy-authorization",
1222
+ "referer",
1223
+ "retry-after",
1224
+ "user-agent"
1225
+ ]), Ln = (t) => {
1226
+ const e = {};
1227
+ let r, n, o;
1228
+ return t && t.split(`
1229
+ `).forEach(function(i) {
1230
+ o = i.indexOf(":"), r = i.substring(0, o).trim().toLowerCase(), n = i.substring(o + 1).trim(), !(!r || e[r] && Un[r]) && (r === "set-cookie" ? e[r] ? e[r].push(n) : e[r] = [n] : e[r] = e[r] ? e[r] + ", " + n : n);
1231
+ }), e;
1232
+ }, lt = /* @__PURE__ */ Symbol("internals");
1233
+ function oe(t) {
1234
+ return t && String(t).trim().toLowerCase();
1235
+ }
1236
+ function Oe(t) {
1237
+ return t === !1 || t == null ? t : f.isArray(t) ? t.map(Oe) : String(t);
1238
+ }
1239
+ function $n(t) {
1240
+ const e = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1241
+ let n;
1242
+ for (; n = r.exec(t); )
1243
+ e[n[1]] = n[2];
1244
+ return e;
1245
+ }
1246
+ const kn = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
1247
+ function Ue(t, e, r, n, o) {
1248
+ if (f.isFunction(n))
1249
+ return n.call(this, e, r);
1250
+ if (o && (e = r), !!f.isString(e)) {
1251
+ if (f.isString(n))
1252
+ return e.indexOf(n) !== -1;
1253
+ if (f.isRegExp(n))
1254
+ return n.test(e);
1255
+ }
1256
+ }
1257
+ function Hn(t) {
1258
+ return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, r, n) => r.toUpperCase() + n);
1259
+ }
1260
+ function Vn(t, e) {
1261
+ const r = f.toCamelCase(" " + e);
1262
+ ["get", "set", "has"].forEach((n) => {
1263
+ Object.defineProperty(t, n + r, {
1264
+ value: function(o, s, i) {
1265
+ return this[n].call(this, e, o, s, i);
1266
+ },
1267
+ configurable: !0
1268
+ });
1269
+ });
1270
+ }
1271
+ let _ = class {
1272
+ constructor(e) {
1273
+ e && this.set(e);
1274
+ }
1275
+ set(e, r, n) {
1276
+ const o = this;
1277
+ function s(a, c, u) {
1278
+ const l = oe(c);
1279
+ if (!l)
1280
+ throw new Error("header name must be a non-empty string");
1281
+ const d = f.findKey(o, l);
1282
+ (!d || o[d] === void 0 || u === !0 || u === void 0 && o[d] !== !1) && (o[d || c] = Oe(a));
1283
+ }
1284
+ const i = (a, c) => f.forEach(a, (u, l) => s(u, l, c));
1285
+ if (f.isPlainObject(e) || e instanceof this.constructor)
1286
+ i(e, r);
1287
+ else if (f.isString(e) && (e = e.trim()) && !kn(e))
1288
+ i(Ln(e), r);
1289
+ else if (f.isObject(e) && f.isIterable(e)) {
1290
+ let a = {}, c, u;
1291
+ for (const l of e) {
1292
+ if (!f.isArray(l))
1293
+ throw TypeError("Object iterator must return a key-value pair");
1294
+ a[u = l[0]] = (c = a[u]) ? f.isArray(c) ? [...c, l[1]] : [c, l[1]] : l[1];
1295
+ }
1296
+ i(a, r);
1297
+ } else
1298
+ e != null && s(r, e, n);
1299
+ return this;
1300
+ }
1301
+ get(e, r) {
1302
+ if (e = oe(e), e) {
1303
+ const n = f.findKey(this, e);
1304
+ if (n) {
1305
+ const o = this[n];
1306
+ if (!r)
1307
+ return o;
1308
+ if (r === !0)
1309
+ return $n(o);
1310
+ if (f.isFunction(r))
1311
+ return r.call(this, o, n);
1312
+ if (f.isRegExp(r))
1313
+ return r.exec(o);
1314
+ throw new TypeError("parser must be boolean|regexp|function");
1315
+ }
1316
+ }
1317
+ }
1318
+ has(e, r) {
1319
+ if (e = oe(e), e) {
1320
+ const n = f.findKey(this, e);
1321
+ return !!(n && this[n] !== void 0 && (!r || Ue(this, this[n], n, r)));
1322
+ }
1323
+ return !1;
1324
+ }
1325
+ delete(e, r) {
1326
+ const n = this;
1327
+ let o = !1;
1328
+ function s(i) {
1329
+ if (i = oe(i), i) {
1330
+ const a = f.findKey(n, i);
1331
+ a && (!r || Ue(n, n[a], a, r)) && (delete n[a], o = !0);
1332
+ }
1333
+ }
1334
+ return f.isArray(e) ? e.forEach(s) : s(e), o;
1335
+ }
1336
+ clear(e) {
1337
+ const r = Object.keys(this);
1338
+ let n = r.length, o = !1;
1339
+ for (; n--; ) {
1340
+ const s = r[n];
1341
+ (!e || Ue(this, this[s], s, e, !0)) && (delete this[s], o = !0);
1342
+ }
1343
+ return o;
1344
+ }
1345
+ normalize(e) {
1346
+ const r = this, n = {};
1347
+ return f.forEach(this, (o, s) => {
1348
+ const i = f.findKey(n, s);
1349
+ if (i) {
1350
+ r[i] = Oe(o), delete r[s];
1351
+ return;
1352
+ }
1353
+ const a = e ? Hn(s) : String(s).trim();
1354
+ a !== s && delete r[s], r[a] = Oe(o), n[a] = !0;
1355
+ }), this;
1356
+ }
1357
+ concat(...e) {
1358
+ return this.constructor.concat(this, ...e);
1359
+ }
1360
+ toJSON(e) {
1361
+ const r = /* @__PURE__ */ Object.create(null);
1362
+ return f.forEach(this, (n, o) => {
1363
+ n != null && n !== !1 && (r[o] = e && f.isArray(n) ? n.join(", ") : n);
1364
+ }), r;
1365
+ }
1366
+ [Symbol.iterator]() {
1367
+ return Object.entries(this.toJSON())[Symbol.iterator]();
1368
+ }
1369
+ toString() {
1370
+ return Object.entries(this.toJSON()).map(([e, r]) => e + ": " + r).join(`
1371
+ `);
1372
+ }
1373
+ getSetCookie() {
1374
+ return this.get("set-cookie") || [];
1375
+ }
1376
+ get [Symbol.toStringTag]() {
1377
+ return "AxiosHeaders";
1378
+ }
1379
+ static from(e) {
1380
+ return e instanceof this ? e : new this(e);
1381
+ }
1382
+ static concat(e, ...r) {
1383
+ const n = new this(e);
1384
+ return r.forEach((o) => n.set(o)), n;
1385
+ }
1386
+ static accessor(e) {
1387
+ const n = (this[lt] = this[lt] = {
1388
+ accessors: {}
1389
+ }).accessors, o = this.prototype;
1390
+ function s(i) {
1391
+ const a = oe(i);
1392
+ n[a] || (Vn(o, i), n[a] = !0);
1393
+ }
1394
+ return f.isArray(e) ? e.forEach(s) : s(e), this;
1395
+ }
1396
+ };
1397
+ _.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1398
+ f.reduceDescriptors(_.prototype, ({ value: t }, e) => {
1399
+ let r = e[0].toUpperCase() + e.slice(1);
1400
+ return {
1401
+ get: () => t,
1402
+ set(n) {
1403
+ this[r] = n;
1404
+ }
1405
+ };
1406
+ });
1407
+ f.freezeMethods(_);
1408
+ function Le(t, e) {
1409
+ const r = this || ue, n = e || r, o = _.from(n.headers);
1410
+ let s = n.data;
1411
+ return f.forEach(t, function(a) {
1412
+ s = a.call(r, s, o.normalize(), e ? e.status : void 0);
1413
+ }), o.normalize(), s;
1414
+ }
1415
+ function Xt(t) {
1416
+ return !!(t && t.__CANCEL__);
1417
+ }
1418
+ function re(t, e, r) {
1419
+ b.call(this, t ?? "canceled", b.ERR_CANCELED, e, r), this.name = "CanceledError";
1420
+ }
1421
+ f.inherits(re, b, {
1422
+ __CANCEL__: !0
1423
+ });
1424
+ function Yt(t, e, r) {
1425
+ const n = r.config.validateStatus;
1426
+ !r.status || !n || n(r.status) ? t(r) : e(new b(
1427
+ "Request failed with status code " + r.status,
1428
+ [b.ERR_BAD_REQUEST, b.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
1429
+ r.config,
1430
+ r.request,
1431
+ r
1432
+ ));
1433
+ }
1434
+ function Wn(t) {
1435
+ const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
1436
+ return e && e[1] || "";
1437
+ }
1438
+ function Qn(t, e) {
1439
+ t = t || 10;
1440
+ const r = new Array(t), n = new Array(t);
1441
+ let o = 0, s = 0, i;
1442
+ return e = e !== void 0 ? e : 1e3, function(c) {
1443
+ const u = Date.now(), l = n[s];
1444
+ i || (i = u), r[o] = c, n[o] = u;
1445
+ let d = s, m = 0;
1446
+ for (; d !== o; )
1447
+ m += r[d++], d = d % t;
1448
+ if (o = (o + 1) % t, o === s && (s = (s + 1) % t), u - i < e)
1449
+ return;
1450
+ const g = l && u - l;
1451
+ return g ? Math.round(m * 1e3 / g) : void 0;
1452
+ };
1453
+ }
1454
+ function Kn(t, e) {
1455
+ let r = 0, n = 1e3 / e, o, s;
1456
+ const i = (u, l = Date.now()) => {
1457
+ r = l, o = null, s && (clearTimeout(s), s = null), t(...u);
1458
+ };
1459
+ return [(...u) => {
1460
+ const l = Date.now(), d = l - r;
1461
+ d >= n ? i(u, l) : (o = u, s || (s = setTimeout(() => {
1462
+ s = null, i(o);
1463
+ }, n - d)));
1464
+ }, () => o && i(o)];
1465
+ }
1466
+ const Te = (t, e, r = 3) => {
1467
+ let n = 0;
1468
+ const o = Qn(50, 250);
1469
+ return Kn((s) => {
1470
+ const i = s.loaded, a = s.lengthComputable ? s.total : void 0, c = i - n, u = o(c), l = i <= a;
1471
+ n = i;
1472
+ const d = {
1473
+ loaded: i,
1474
+ total: a,
1475
+ progress: a ? i / a : void 0,
1476
+ bytes: c,
1477
+ rate: u || void 0,
1478
+ estimated: u && a && l ? (a - i) / u : void 0,
1479
+ event: s,
1480
+ lengthComputable: a != null,
1481
+ [e ? "download" : "upload"]: !0
1482
+ };
1483
+ t(d);
1484
+ }, r);
1485
+ }, ft = (t, e) => {
1486
+ const r = t != null;
1487
+ return [(n) => e[0]({
1488
+ lengthComputable: r,
1489
+ total: t,
1490
+ loaded: n
1491
+ }), e[1]];
1492
+ }, dt = (t) => (...e) => f.asap(() => t(...e)), zn = O.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (r) => (r = new URL(r, O.origin), t.protocol === r.protocol && t.host === r.host && (e || t.port === r.port)))(
1493
+ new URL(O.origin),
1494
+ O.navigator && /(msie|trident)/i.test(O.navigator.userAgent)
1495
+ ) : () => !0, Jn = O.hasStandardBrowserEnv ? (
1496
+ // Standard browser envs support document.cookie
1497
+ {
1498
+ write(t, e, r, n, o, s, i) {
1499
+ if (typeof document > "u") return;
1500
+ const a = [`${t}=${encodeURIComponent(e)}`];
1501
+ f.isNumber(r) && a.push(`expires=${new Date(r).toUTCString()}`), f.isString(n) && a.push(`path=${n}`), f.isString(o) && a.push(`domain=${o}`), s === !0 && a.push("secure"), f.isString(i) && a.push(`SameSite=${i}`), document.cookie = a.join("; ");
1502
+ },
1503
+ read(t) {
1504
+ if (typeof document > "u") return null;
1505
+ const e = document.cookie.match(new RegExp("(?:^|; )" + t + "=([^;]*)"));
1506
+ return e ? decodeURIComponent(e[1]) : null;
1507
+ },
1508
+ remove(t) {
1509
+ this.write(t, "", Date.now() - 864e5, "/");
1510
+ }
1511
+ }
1512
+ ) : (
1513
+ // Non-standard browser env (web workers, react-native) lack needed support.
1514
+ {
1515
+ write() {
1516
+ },
1517
+ read() {
1518
+ return null;
1519
+ },
1520
+ remove() {
1521
+ }
1522
+ }
1523
+ );
1524
+ function Gn(t) {
1525
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
1526
+ }
1527
+ function Xn(t, e) {
1528
+ return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
1529
+ }
1530
+ function Zt(t, e, r) {
1531
+ let n = !Gn(e);
1532
+ return t && (n || r == !1) ? Xn(t, e) : e;
1533
+ }
1534
+ const pt = (t) => t instanceof _ ? { ...t } : t;
1535
+ function V(t, e) {
1536
+ e = e || {};
1537
+ const r = {};
1538
+ function n(u, l, d, m) {
1539
+ return f.isPlainObject(u) && f.isPlainObject(l) ? f.merge.call({ caseless: m }, u, l) : f.isPlainObject(l) ? f.merge({}, l) : f.isArray(l) ? l.slice() : l;
1540
+ }
1541
+ function o(u, l, d, m) {
1542
+ if (f.isUndefined(l)) {
1543
+ if (!f.isUndefined(u))
1544
+ return n(void 0, u, d, m);
1545
+ } else return n(u, l, d, m);
1546
+ }
1547
+ function s(u, l) {
1548
+ if (!f.isUndefined(l))
1549
+ return n(void 0, l);
1550
+ }
1551
+ function i(u, l) {
1552
+ if (f.isUndefined(l)) {
1553
+ if (!f.isUndefined(u))
1554
+ return n(void 0, u);
1555
+ } else return n(void 0, l);
1556
+ }
1557
+ function a(u, l, d) {
1558
+ if (d in e)
1559
+ return n(u, l);
1560
+ if (d in t)
1561
+ return n(void 0, u);
1562
+ }
1563
+ const c = {
1564
+ url: s,
1565
+ method: s,
1566
+ data: s,
1567
+ baseURL: i,
1568
+ transformRequest: i,
1569
+ transformResponse: i,
1570
+ paramsSerializer: i,
1571
+ timeout: i,
1572
+ timeoutMessage: i,
1573
+ withCredentials: i,
1574
+ withXSRFToken: i,
1575
+ adapter: i,
1576
+ responseType: i,
1577
+ xsrfCookieName: i,
1578
+ xsrfHeaderName: i,
1579
+ onUploadProgress: i,
1580
+ onDownloadProgress: i,
1581
+ decompress: i,
1582
+ maxContentLength: i,
1583
+ maxBodyLength: i,
1584
+ beforeRedirect: i,
1585
+ transport: i,
1586
+ httpAgent: i,
1587
+ httpsAgent: i,
1588
+ cancelToken: i,
1589
+ socketPath: i,
1590
+ responseEncoding: i,
1591
+ validateStatus: a,
1592
+ headers: (u, l, d) => o(pt(u), pt(l), d, !0)
1593
+ };
1594
+ return f.forEach(Object.keys({ ...t, ...e }), function(l) {
1595
+ const d = c[l] || o, m = d(t[l], e[l], l);
1596
+ f.isUndefined(m) && d !== a || (r[l] = m);
1597
+ }), r;
1598
+ }
1599
+ const er = (t) => {
1600
+ const e = V({}, t);
1601
+ let { data: r, withXSRFToken: n, xsrfHeaderName: o, xsrfCookieName: s, headers: i, auth: a } = e;
1602
+ if (e.headers = i = _.from(i), e.url = zt(Zt(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), a && i.set(
1603
+ "Authorization",
1604
+ "Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
1605
+ ), f.isFormData(r)) {
1606
+ if (O.hasStandardBrowserEnv || O.hasStandardBrowserWebWorkerEnv)
1607
+ i.setContentType(void 0);
1608
+ else if (f.isFunction(r.getHeaders)) {
1609
+ const c = r.getHeaders(), u = ["content-type", "content-length"];
1610
+ Object.entries(c).forEach(([l, d]) => {
1611
+ u.includes(l.toLowerCase()) && i.set(l, d);
1612
+ });
1613
+ }
1614
+ }
1615
+ if (O.hasStandardBrowserEnv && (n && f.isFunction(n) && (n = n(e)), n || n !== !1 && zn(e.url))) {
1616
+ const c = o && s && Jn.read(s);
1617
+ c && i.set(o, c);
1618
+ }
1619
+ return e;
1620
+ }, Yn = typeof XMLHttpRequest < "u", Zn = Yn && function(t) {
1621
+ return new Promise(function(r, n) {
1622
+ const o = er(t);
1623
+ let s = o.data;
1624
+ const i = _.from(o.headers).normalize();
1625
+ let { responseType: a, onUploadProgress: c, onDownloadProgress: u } = o, l, d, m, g, p;
1626
+ function y() {
1627
+ g && g(), p && p(), o.cancelToken && o.cancelToken.unsubscribe(l), o.signal && o.signal.removeEventListener("abort", l);
1628
+ }
1629
+ let h = new XMLHttpRequest();
1630
+ h.open(o.method.toUpperCase(), o.url, !0), h.timeout = o.timeout;
1631
+ function w() {
1632
+ if (!h)
1633
+ return;
1634
+ const S = _.from(
1635
+ "getAllResponseHeaders" in h && h.getAllResponseHeaders()
1636
+ ), C = {
1637
+ data: !a || a === "text" || a === "json" ? h.responseText : h.response,
1638
+ status: h.status,
1639
+ statusText: h.statusText,
1640
+ headers: S,
1641
+ config: t,
1642
+ request: h
1643
+ };
1644
+ Yt(function(x) {
1645
+ r(x), y();
1646
+ }, function(x) {
1647
+ n(x), y();
1648
+ }, C), h = null;
1649
+ }
1650
+ "onloadend" in h ? h.onloadend = w : h.onreadystatechange = function() {
1651
+ !h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(w);
1652
+ }, h.onabort = function() {
1653
+ h && (n(new b("Request aborted", b.ECONNABORTED, t, h)), h = null);
1654
+ }, h.onerror = function(T) {
1655
+ const C = T && T.message ? T.message : "Network Error", L = new b(C, b.ERR_NETWORK, t, h);
1656
+ L.event = T || null, n(L), h = null;
1657
+ }, h.ontimeout = function() {
1658
+ let T = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
1659
+ const C = o.transitional || Jt;
1660
+ o.timeoutErrorMessage && (T = o.timeoutErrorMessage), n(new b(
1661
+ T,
1662
+ C.clarifyTimeoutError ? b.ETIMEDOUT : b.ECONNABORTED,
1663
+ t,
1664
+ h
1665
+ )), h = null;
1666
+ }, s === void 0 && i.setContentType(null), "setRequestHeader" in h && f.forEach(i.toJSON(), function(T, C) {
1667
+ h.setRequestHeader(C, T);
1668
+ }), f.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), a && a !== "json" && (h.responseType = o.responseType), u && ([m, p] = Te(u, !0), h.addEventListener("progress", m)), c && h.upload && ([d, g] = Te(c), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", g)), (o.cancelToken || o.signal) && (l = (S) => {
1669
+ h && (n(!S || S.type ? new re(null, t, h) : S), h.abort(), h = null);
1670
+ }, o.cancelToken && o.cancelToken.subscribe(l), o.signal && (o.signal.aborted ? l() : o.signal.addEventListener("abort", l)));
1671
+ const v = Wn(o.url);
1672
+ if (v && O.protocols.indexOf(v) === -1) {
1673
+ n(new b("Unsupported protocol " + v + ":", b.ERR_BAD_REQUEST, t));
1674
+ return;
1675
+ }
1676
+ h.send(s || null);
1677
+ });
1678
+ }, eo = (t, e) => {
1679
+ const { length: r } = t = t ? t.filter(Boolean) : [];
1680
+ if (e || r) {
1681
+ let n = new AbortController(), o;
1682
+ const s = function(u) {
1683
+ if (!o) {
1684
+ o = !0, a();
1685
+ const l = u instanceof Error ? u : this.reason;
1686
+ n.abort(l instanceof b ? l : new re(l instanceof Error ? l.message : l));
1687
+ }
1688
+ };
1689
+ let i = e && setTimeout(() => {
1690
+ i = null, s(new b(`timeout ${e} of ms exceeded`, b.ETIMEDOUT));
1691
+ }, e);
1692
+ const a = () => {
1693
+ t && (i && clearTimeout(i), i = null, t.forEach((u) => {
1694
+ u.unsubscribe ? u.unsubscribe(s) : u.removeEventListener("abort", s);
1695
+ }), t = null);
1696
+ };
1697
+ t.forEach((u) => u.addEventListener("abort", s));
1698
+ const { signal: c } = n;
1699
+ return c.unsubscribe = () => f.asap(a), c;
1700
+ }
1701
+ }, to = function* (t, e) {
1702
+ let r = t.byteLength;
1703
+ if (r < e) {
1704
+ yield t;
1705
+ return;
1706
+ }
1707
+ let n = 0, o;
1708
+ for (; n < r; )
1709
+ o = n + e, yield t.slice(n, o), n = o;
1710
+ }, ro = async function* (t, e) {
1711
+ for await (const r of no(t))
1712
+ yield* to(r, e);
1713
+ }, no = async function* (t) {
1714
+ if (t[Symbol.asyncIterator]) {
1715
+ yield* t;
1716
+ return;
1717
+ }
1718
+ const e = t.getReader();
1719
+ try {
1720
+ for (; ; ) {
1721
+ const { done: r, value: n } = await e.read();
1722
+ if (r)
1723
+ break;
1724
+ yield n;
1725
+ }
1726
+ } finally {
1727
+ await e.cancel();
1728
+ }
1729
+ }, ht = (t, e, r, n) => {
1730
+ const o = ro(t, e);
1731
+ let s = 0, i, a = (c) => {
1732
+ i || (i = !0, n && n(c));
1733
+ };
1734
+ return new ReadableStream({
1735
+ async pull(c) {
1736
+ try {
1737
+ const { done: u, value: l } = await o.next();
1738
+ if (u) {
1739
+ a(), c.close();
1740
+ return;
1741
+ }
1742
+ let d = l.byteLength;
1743
+ if (r) {
1744
+ let m = s += d;
1745
+ r(m);
1746
+ }
1747
+ c.enqueue(new Uint8Array(l));
1748
+ } catch (u) {
1749
+ throw a(u), u;
1750
+ }
1751
+ },
1752
+ cancel(c) {
1753
+ return a(c), o.return();
1754
+ }
1755
+ }, {
1756
+ highWaterMark: 2
1757
+ });
1758
+ }, mt = 64 * 1024, { isFunction: ye } = f, oo = (({ Request: t, Response: e }) => ({
1759
+ Request: t,
1760
+ Response: e
1761
+ }))(f.global), {
1762
+ ReadableStream: yt,
1763
+ TextEncoder: gt
1764
+ } = f.global, bt = (t, ...e) => {
1765
+ try {
1766
+ return !!t(...e);
1767
+ } catch {
1768
+ return !1;
1769
+ }
1770
+ }, so = (t) => {
1771
+ t = f.merge.call({
1772
+ skipUndefined: !0
1773
+ }, oo, t);
1774
+ const { fetch: e, Request: r, Response: n } = t, o = e ? ye(e) : typeof fetch == "function", s = ye(r), i = ye(n);
1775
+ if (!o)
1776
+ return !1;
1777
+ const a = o && ye(yt), c = o && (typeof gt == "function" ? /* @__PURE__ */ ((p) => (y) => p.encode(y))(new gt()) : async (p) => new Uint8Array(await new r(p).arrayBuffer())), u = s && a && bt(() => {
1778
+ let p = !1;
1779
+ const y = new r(O.origin, {
1780
+ body: new yt(),
1781
+ method: "POST",
1782
+ get duplex() {
1783
+ return p = !0, "half";
1784
+ }
1785
+ }).headers.has("Content-Type");
1786
+ return p && !y;
1787
+ }), l = i && a && bt(() => f.isReadableStream(new n("").body)), d = {
1788
+ stream: l && ((p) => p.body)
1789
+ };
1790
+ o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((p) => {
1791
+ !d[p] && (d[p] = (y, h) => {
1792
+ let w = y && y[p];
1793
+ if (w)
1794
+ return w.call(y);
1795
+ throw new b(`Response type '${p}' is not supported`, b.ERR_NOT_SUPPORT, h);
1796
+ });
1797
+ });
1798
+ const m = async (p) => {
1799
+ if (p == null)
1800
+ return 0;
1801
+ if (f.isBlob(p))
1802
+ return p.size;
1803
+ if (f.isSpecCompliantForm(p))
1804
+ return (await new r(O.origin, {
1805
+ method: "POST",
1806
+ body: p
1807
+ }).arrayBuffer()).byteLength;
1808
+ if (f.isArrayBufferView(p) || f.isArrayBuffer(p))
1809
+ return p.byteLength;
1810
+ if (f.isURLSearchParams(p) && (p = p + ""), f.isString(p))
1811
+ return (await c(p)).byteLength;
1812
+ }, g = async (p, y) => {
1813
+ const h = f.toFiniteNumber(p.getContentLength());
1814
+ return h ?? m(y);
1815
+ };
1816
+ return async (p) => {
1817
+ let {
1818
+ url: y,
1819
+ method: h,
1820
+ data: w,
1821
+ signal: v,
1822
+ cancelToken: S,
1823
+ timeout: T,
1824
+ onDownloadProgress: C,
1825
+ onUploadProgress: L,
1826
+ responseType: x,
1827
+ headers: je,
1828
+ withCredentials: de = "same-origin",
1829
+ fetchOptions: Ze
1830
+ } = er(p), et = e || fetch;
1831
+ x = x ? (x + "").toLowerCase() : "text";
1832
+ let pe = eo([v, S && S.toAbortSignal()], T), ne = null;
1833
+ const $ = pe && pe.unsubscribe && (() => {
1834
+ pe.unsubscribe();
1835
+ });
1836
+ let tt;
1837
+ try {
1838
+ if (L && u && h !== "get" && h !== "head" && (tt = await g(je, w)) !== 0) {
1839
+ let I = new r(y, {
1840
+ method: "POST",
1841
+ body: w,
1842
+ duplex: "half"
1843
+ }), Q;
1844
+ if (f.isFormData(w) && (Q = I.headers.get("content-type")) && je.setContentType(Q), I.body) {
1845
+ const [Fe, he] = ft(
1846
+ tt,
1847
+ Te(dt(L))
1848
+ );
1849
+ w = ht(I.body, mt, Fe, he);
1850
+ }
1851
+ }
1852
+ f.isString(de) || (de = de ? "include" : "omit");
1853
+ const D = s && "credentials" in r.prototype, rt = {
1854
+ ...Ze,
1855
+ signal: pe,
1856
+ method: h.toUpperCase(),
1857
+ headers: je.normalize().toJSON(),
1858
+ body: w,
1859
+ duplex: "half",
1860
+ credentials: D ? de : void 0
1861
+ };
1862
+ ne = s && new r(y, rt);
1863
+ let B = await (s ? et(ne, Ze) : et(y, rt));
1864
+ const nt = l && (x === "stream" || x === "response");
1865
+ if (l && (C || nt && $)) {
1866
+ const I = {};
1867
+ ["status", "statusText", "headers"].forEach((ot) => {
1868
+ I[ot] = B[ot];
1869
+ });
1870
+ const Q = f.toFiniteNumber(B.headers.get("content-length")), [Fe, he] = C && ft(
1871
+ Q,
1872
+ Te(dt(C), !0)
1873
+ ) || [];
1874
+ B = new n(
1875
+ ht(B.body, mt, Fe, () => {
1876
+ he && he(), $ && $();
1877
+ }),
1878
+ I
1879
+ );
1880
+ }
1881
+ x = x || "text";
1882
+ let pr = await d[f.findKey(d, x) || "text"](B, p);
1883
+ return !nt && $ && $(), await new Promise((I, Q) => {
1884
+ Yt(I, Q, {
1885
+ data: pr,
1886
+ headers: _.from(B.headers),
1887
+ status: B.status,
1888
+ statusText: B.statusText,
1889
+ config: p,
1890
+ request: ne
1891
+ });
1892
+ });
1893
+ } catch (D) {
1894
+ throw $ && $(), D && D.name === "TypeError" && /Load failed|fetch/i.test(D.message) ? Object.assign(
1895
+ new b("Network Error", b.ERR_NETWORK, p, ne),
1896
+ {
1897
+ cause: D.cause || D
1898
+ }
1899
+ ) : b.from(D, D && D.code, p, ne);
1900
+ }
1901
+ };
1902
+ }, io = /* @__PURE__ */ new Map(), tr = (t) => {
1903
+ let e = t && t.env || {};
1904
+ const { fetch: r, Request: n, Response: o } = e, s = [
1905
+ n,
1906
+ o,
1907
+ r
1908
+ ];
1909
+ let i = s.length, a = i, c, u, l = io;
1910
+ for (; a--; )
1911
+ c = s[a], u = l.get(c), u === void 0 && l.set(c, u = a ? /* @__PURE__ */ new Map() : so(e)), l = u;
1912
+ return u;
1913
+ };
1914
+ tr();
1915
+ const Xe = {
1916
+ http: On,
1917
+ xhr: Zn,
1918
+ fetch: {
1919
+ get: tr
1920
+ }
1921
+ };
1922
+ f.forEach(Xe, (t, e) => {
1923
+ if (t) {
1924
+ try {
1925
+ Object.defineProperty(t, "name", { value: e });
1926
+ } catch {
1927
+ }
1928
+ Object.defineProperty(t, "adapterName", { value: e });
1929
+ }
1930
+ });
1931
+ const wt = (t) => `- ${t}`, ao = (t) => f.isFunction(t) || t === null || t === !1;
1932
+ function co(t, e) {
1933
+ t = f.isArray(t) ? t : [t];
1934
+ const { length: r } = t;
1935
+ let n, o;
1936
+ const s = {};
1937
+ for (let i = 0; i < r; i++) {
1938
+ n = t[i];
1939
+ let a;
1940
+ if (o = n, !ao(n) && (o = Xe[(a = String(n)).toLowerCase()], o === void 0))
1941
+ throw new b(`Unknown adapter '${a}'`);
1942
+ if (o && (f.isFunction(o) || (o = o.get(e))))
1943
+ break;
1944
+ s[a || "#" + i] = o;
1945
+ }
1946
+ if (!o) {
1947
+ const i = Object.entries(s).map(
1948
+ ([c, u]) => `adapter ${c} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
1949
+ );
1950
+ let a = r ? i.length > 1 ? `since :
1951
+ ` + i.map(wt).join(`
1952
+ `) : " " + wt(i[0]) : "as no adapter specified";
1953
+ throw new b(
1954
+ "There is no suitable adapter to dispatch the request " + a,
1955
+ "ERR_NOT_SUPPORT"
1956
+ );
1957
+ }
1958
+ return o;
1959
+ }
1960
+ const rr = {
1961
+ /**
1962
+ * Resolve an adapter from a list of adapter names or functions.
1963
+ * @type {Function}
1964
+ */
1965
+ getAdapter: co,
1966
+ /**
1967
+ * Exposes all known adapters
1968
+ * @type {Object<string, Function|Object>}
1969
+ */
1970
+ adapters: Xe
1971
+ };
1972
+ function $e(t) {
1973
+ if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
1974
+ throw new re(null, t);
1975
+ }
1976
+ function At(t) {
1977
+ return $e(t), t.headers = _.from(t.headers), t.data = Le.call(
1978
+ t,
1979
+ t.transformRequest
1980
+ ), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), rr.getAdapter(t.adapter || ue.adapter, t)(t).then(function(n) {
1981
+ return $e(t), n.data = Le.call(
1982
+ t,
1983
+ t.transformResponse,
1984
+ n
1985
+ ), n.headers = _.from(n.headers), n;
1986
+ }, function(n) {
1987
+ return Xt(n) || ($e(t), n && n.response && (n.response.data = Le.call(
1988
+ t,
1989
+ t.transformResponse,
1990
+ n.response
1991
+ ), n.response.headers = _.from(n.response.headers))), Promise.reject(n);
1992
+ });
1993
+ }
1994
+ const nr = "1.13.2", Ne = {};
1995
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
1996
+ Ne[t] = function(n) {
1997
+ return typeof n === t || "a" + (e < 1 ? "n " : " ") + t;
1998
+ };
1999
+ });
2000
+ const St = {};
2001
+ Ne.transitional = function(e, r, n) {
2002
+ function o(s, i) {
2003
+ return "[Axios v" + nr + "] Transitional option '" + s + "'" + i + (n ? ". " + n : "");
2004
+ }
2005
+ return (s, i, a) => {
2006
+ if (e === !1)
2007
+ throw new b(
2008
+ o(i, " has been removed" + (r ? " in " + r : "")),
2009
+ b.ERR_DEPRECATED
2010
+ );
2011
+ return r && !St[i] && (St[i] = !0, console.warn(
2012
+ o(
2013
+ i,
2014
+ " has been deprecated since v" + r + " and will be removed in the near future"
2015
+ )
2016
+ )), e ? e(s, i, a) : !0;
2017
+ };
2018
+ };
2019
+ Ne.spelling = function(e) {
2020
+ return (r, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
2021
+ };
2022
+ function uo(t, e, r) {
2023
+ if (typeof t != "object")
2024
+ throw new b("options must be an object", b.ERR_BAD_OPTION_VALUE);
2025
+ const n = Object.keys(t);
2026
+ let o = n.length;
2027
+ for (; o-- > 0; ) {
2028
+ const s = n[o], i = e[s];
2029
+ if (i) {
2030
+ const a = t[s], c = a === void 0 || i(a, s, t);
2031
+ if (c !== !0)
2032
+ throw new b("option " + s + " must be " + c, b.ERR_BAD_OPTION_VALUE);
2033
+ continue;
2034
+ }
2035
+ if (r !== !0)
2036
+ throw new b("Unknown option " + s, b.ERR_BAD_OPTION);
2037
+ }
2038
+ }
2039
+ const ve = {
2040
+ assertOptions: uo,
2041
+ validators: Ne
2042
+ }, j = ve.validators;
2043
+ let H = class {
2044
+ constructor(e) {
2045
+ this.defaults = e || {}, this.interceptors = {
2046
+ request: new ut(),
2047
+ response: new ut()
2048
+ };
2049
+ }
2050
+ /**
2051
+ * Dispatch a request
2052
+ *
2053
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
2054
+ * @param {?Object} config
2055
+ *
2056
+ * @returns {Promise} The Promise to be fulfilled
2057
+ */
2058
+ async request(e, r) {
2059
+ try {
2060
+ return await this._request(e, r);
2061
+ } catch (n) {
2062
+ if (n instanceof Error) {
2063
+ let o = {};
2064
+ Error.captureStackTrace ? Error.captureStackTrace(o) : o = new Error();
2065
+ const s = o.stack ? o.stack.replace(/^.+\n/, "") : "";
2066
+ try {
2067
+ n.stack ? s && !String(n.stack).endsWith(s.replace(/^.+\n.+\n/, "")) && (n.stack += `
2068
+ ` + s) : n.stack = s;
2069
+ } catch {
2070
+ }
2071
+ }
2072
+ throw n;
2073
+ }
2074
+ }
2075
+ _request(e, r) {
2076
+ typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = V(this.defaults, r);
2077
+ const { transitional: n, paramsSerializer: o, headers: s } = r;
2078
+ n !== void 0 && ve.assertOptions(n, {
2079
+ silentJSONParsing: j.transitional(j.boolean),
2080
+ forcedJSONParsing: j.transitional(j.boolean),
2081
+ clarifyTimeoutError: j.transitional(j.boolean)
2082
+ }, !1), o != null && (f.isFunction(o) ? r.paramsSerializer = {
2083
+ serialize: o
2084
+ } : ve.assertOptions(o, {
2085
+ encode: j.function,
2086
+ serialize: j.function
2087
+ }, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), ve.assertOptions(r, {
2088
+ baseUrl: j.spelling("baseURL"),
2089
+ withXsrfToken: j.spelling("withXSRFToken")
2090
+ }, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
2091
+ let i = s && f.merge(
2092
+ s.common,
2093
+ s[r.method]
2094
+ );
2095
+ s && f.forEach(
2096
+ ["delete", "get", "head", "post", "put", "patch", "common"],
2097
+ (p) => {
2098
+ delete s[p];
2099
+ }
2100
+ ), r.headers = _.concat(i, s);
2101
+ const a = [];
2102
+ let c = !0;
2103
+ this.interceptors.request.forEach(function(y) {
2104
+ typeof y.runWhen == "function" && y.runWhen(r) === !1 || (c = c && y.synchronous, a.unshift(y.fulfilled, y.rejected));
2105
+ });
2106
+ const u = [];
2107
+ this.interceptors.response.forEach(function(y) {
2108
+ u.push(y.fulfilled, y.rejected);
2109
+ });
2110
+ let l, d = 0, m;
2111
+ if (!c) {
2112
+ const p = [At.bind(this), void 0];
2113
+ for (p.unshift(...a), p.push(...u), m = p.length, l = Promise.resolve(r); d < m; )
2114
+ l = l.then(p[d++], p[d++]);
2115
+ return l;
2116
+ }
2117
+ m = a.length;
2118
+ let g = r;
2119
+ for (; d < m; ) {
2120
+ const p = a[d++], y = a[d++];
2121
+ try {
2122
+ g = p(g);
2123
+ } catch (h) {
2124
+ y.call(this, h);
2125
+ break;
2126
+ }
2127
+ }
2128
+ try {
2129
+ l = At.call(this, g);
2130
+ } catch (p) {
2131
+ return Promise.reject(p);
2132
+ }
2133
+ for (d = 0, m = u.length; d < m; )
2134
+ l = l.then(u[d++], u[d++]);
2135
+ return l;
2136
+ }
2137
+ getUri(e) {
2138
+ e = V(this.defaults, e);
2139
+ const r = Zt(e.baseURL, e.url, e.allowAbsoluteUrls);
2140
+ return zt(r, e.params, e.paramsSerializer);
2141
+ }
2142
+ };
2143
+ f.forEach(["delete", "get", "head", "options"], function(e) {
2144
+ H.prototype[e] = function(r, n) {
2145
+ return this.request(V(n || {}, {
2146
+ method: e,
2147
+ url: r,
2148
+ data: (n || {}).data
2149
+ }));
2150
+ };
2151
+ });
2152
+ f.forEach(["post", "put", "patch"], function(e) {
2153
+ function r(n) {
2154
+ return function(s, i, a) {
2155
+ return this.request(V(a || {}, {
2156
+ method: e,
2157
+ headers: n ? {
2158
+ "Content-Type": "multipart/form-data"
2159
+ } : {},
2160
+ url: s,
2161
+ data: i
2162
+ }));
2163
+ };
2164
+ }
2165
+ H.prototype[e] = r(), H.prototype[e + "Form"] = r(!0);
2166
+ });
2167
+ let lo = class or {
2168
+ constructor(e) {
2169
+ if (typeof e != "function")
2170
+ throw new TypeError("executor must be a function.");
2171
+ let r;
2172
+ this.promise = new Promise(function(s) {
2173
+ r = s;
2174
+ });
2175
+ const n = this;
2176
+ this.promise.then((o) => {
2177
+ if (!n._listeners) return;
2178
+ let s = n._listeners.length;
2179
+ for (; s-- > 0; )
2180
+ n._listeners[s](o);
2181
+ n._listeners = null;
2182
+ }), this.promise.then = (o) => {
2183
+ let s;
2184
+ const i = new Promise((a) => {
2185
+ n.subscribe(a), s = a;
2186
+ }).then(o);
2187
+ return i.cancel = function() {
2188
+ n.unsubscribe(s);
2189
+ }, i;
2190
+ }, e(function(s, i, a) {
2191
+ n.reason || (n.reason = new re(s, i, a), r(n.reason));
2192
+ });
2193
+ }
2194
+ /**
2195
+ * Throws a `CanceledError` if cancellation has been requested.
2196
+ */
2197
+ throwIfRequested() {
2198
+ if (this.reason)
2199
+ throw this.reason;
2200
+ }
2201
+ /**
2202
+ * Subscribe to the cancel signal
2203
+ */
2204
+ subscribe(e) {
2205
+ if (this.reason) {
2206
+ e(this.reason);
2207
+ return;
2208
+ }
2209
+ this._listeners ? this._listeners.push(e) : this._listeners = [e];
2210
+ }
2211
+ /**
2212
+ * Unsubscribe from the cancel signal
2213
+ */
2214
+ unsubscribe(e) {
2215
+ if (!this._listeners)
2216
+ return;
2217
+ const r = this._listeners.indexOf(e);
2218
+ r !== -1 && this._listeners.splice(r, 1);
2219
+ }
2220
+ toAbortSignal() {
2221
+ const e = new AbortController(), r = (n) => {
2222
+ e.abort(n);
2223
+ };
2224
+ return this.subscribe(r), e.signal.unsubscribe = () => this.unsubscribe(r), e.signal;
2225
+ }
2226
+ /**
2227
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
2228
+ * cancels the `CancelToken`.
2229
+ */
2230
+ static source() {
2231
+ let e;
2232
+ return {
2233
+ token: new or(function(o) {
2234
+ e = o;
2235
+ }),
2236
+ cancel: e
2237
+ };
2238
+ }
2239
+ };
2240
+ function fo(t) {
2241
+ return function(r) {
2242
+ return t.apply(null, r);
2243
+ };
2244
+ }
2245
+ function po(t) {
2246
+ return f.isObject(t) && t.isAxiosError === !0;
2247
+ }
2248
+ const Qe = {
2249
+ Continue: 100,
2250
+ SwitchingProtocols: 101,
2251
+ Processing: 102,
2252
+ EarlyHints: 103,
2253
+ Ok: 200,
2254
+ Created: 201,
2255
+ Accepted: 202,
2256
+ NonAuthoritativeInformation: 203,
2257
+ NoContent: 204,
2258
+ ResetContent: 205,
2259
+ PartialContent: 206,
2260
+ MultiStatus: 207,
2261
+ AlreadyReported: 208,
2262
+ ImUsed: 226,
2263
+ MultipleChoices: 300,
2264
+ MovedPermanently: 301,
2265
+ Found: 302,
2266
+ SeeOther: 303,
2267
+ NotModified: 304,
2268
+ UseProxy: 305,
2269
+ Unused: 306,
2270
+ TemporaryRedirect: 307,
2271
+ PermanentRedirect: 308,
2272
+ BadRequest: 400,
2273
+ Unauthorized: 401,
2274
+ PaymentRequired: 402,
2275
+ Forbidden: 403,
2276
+ NotFound: 404,
2277
+ MethodNotAllowed: 405,
2278
+ NotAcceptable: 406,
2279
+ ProxyAuthenticationRequired: 407,
2280
+ RequestTimeout: 408,
2281
+ Conflict: 409,
2282
+ Gone: 410,
2283
+ LengthRequired: 411,
2284
+ PreconditionFailed: 412,
2285
+ PayloadTooLarge: 413,
2286
+ UriTooLong: 414,
2287
+ UnsupportedMediaType: 415,
2288
+ RangeNotSatisfiable: 416,
2289
+ ExpectationFailed: 417,
2290
+ ImATeapot: 418,
2291
+ MisdirectedRequest: 421,
2292
+ UnprocessableEntity: 422,
2293
+ Locked: 423,
2294
+ FailedDependency: 424,
2295
+ TooEarly: 425,
2296
+ UpgradeRequired: 426,
2297
+ PreconditionRequired: 428,
2298
+ TooManyRequests: 429,
2299
+ RequestHeaderFieldsTooLarge: 431,
2300
+ UnavailableForLegalReasons: 451,
2301
+ InternalServerError: 500,
2302
+ NotImplemented: 501,
2303
+ BadGateway: 502,
2304
+ ServiceUnavailable: 503,
2305
+ GatewayTimeout: 504,
2306
+ HttpVersionNotSupported: 505,
2307
+ VariantAlsoNegotiates: 506,
2308
+ InsufficientStorage: 507,
2309
+ LoopDetected: 508,
2310
+ NotExtended: 510,
2311
+ NetworkAuthenticationRequired: 511,
2312
+ WebServerIsDown: 521,
2313
+ ConnectionTimedOut: 522,
2314
+ OriginIsUnreachable: 523,
2315
+ TimeoutOccurred: 524,
2316
+ SslHandshakeFailed: 525,
2317
+ InvalidSslCertificate: 526
2318
+ };
2319
+ Object.entries(Qe).forEach(([t, e]) => {
2320
+ Qe[e] = t;
2321
+ });
2322
+ function sr(t) {
2323
+ const e = new H(t), r = Bt(H.prototype.request, e);
2324
+ return f.extend(r, H.prototype, e, { allOwnKeys: !0 }), f.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(o) {
2325
+ return sr(V(t, o));
2326
+ }, r;
2327
+ }
2328
+ const A = sr(ue);
2329
+ A.Axios = H;
2330
+ A.CanceledError = re;
2331
+ A.CancelToken = lo;
2332
+ A.isCancel = Xt;
2333
+ A.VERSION = nr;
2334
+ A.toFormData = Pe;
2335
+ A.AxiosError = b;
2336
+ A.Cancel = A.CanceledError;
2337
+ A.all = function(e) {
2338
+ return Promise.all(e);
2339
+ };
2340
+ A.spread = fo;
2341
+ A.isAxiosError = po;
2342
+ A.mergeConfig = V;
2343
+ A.AxiosHeaders = _;
2344
+ A.formToJSON = (t) => Gt(f.isHTMLForm(t) ? new FormData(t) : t);
2345
+ A.getAdapter = rr.getAdapter;
2346
+ A.HttpStatusCode = Qe;
2347
+ A.default = A;
2348
+ const {
2349
+ Axios: Io,
2350
+ AxiosError: Mo,
2351
+ CanceledError: Uo,
2352
+ isCancel: Lo,
2353
+ CancelToken: $o,
2354
+ VERSION: ko,
2355
+ all: Ho,
2356
+ Cancel: Vo,
2357
+ isAxiosError: Wo,
2358
+ spread: Qo,
2359
+ toFormData: Ko,
2360
+ AxiosHeaders: zo,
2361
+ HttpStatusCode: Jo,
2362
+ formToJSON: Go,
2363
+ getAdapter: Xo,
2364
+ mergeConfig: Yo
2365
+ } = A, Et = typeof window < "u";
2366
+ class ho {
2367
+ constructor(e = {}) {
2368
+ this.requestStrategy = async (r, n) => {
2369
+ await n(r);
2370
+ }, this.responseStrategy = async (r, n) => {
2371
+ await n(r);
2372
+ }, this.defaultBaseUrl = e.defaultBaseUrl, this.useGlobalSingletons = e.useGlobalSingletons ?? !1, this.globalQueryClientKey = e.globalQueryClientKey || "__STORE_QUERY_CLIENT__", this.globalAxiosKey = e.globalAxiosKey || "__STORE_API_CLIENT__", this.createQueryClientImpl = e.createQueryClient || (() => new Ke({
2373
+ defaultOptions: {
2374
+ queries: {
2375
+ refetchOnWindowFocus: !0,
2376
+ refetchOnMount: !1,
2377
+ retry: 3,
2378
+ staleTime: 1e3 * 60 * 5
2379
+ }
2380
+ }
2381
+ })), this.createAxiosImpl = e.createAxios || ((r) => {
2382
+ const n = A.create({
2383
+ baseURL: r || this.defaultBaseUrl,
2384
+ withCredentials: !0
2385
+ });
2386
+ return this.configureAxios(n);
2387
+ });
2388
+ }
2389
+ getQueryClient(e) {
2390
+ if (Et) {
2391
+ if (e?.client) return e.client;
2392
+ if (this.useGlobalSingletons) {
2393
+ const r = globalThis, n = r[this.globalQueryClientKey];
2394
+ if (n)
2395
+ return n;
2396
+ const o = this.createQueryClientImpl();
2397
+ return r[this.globalQueryClientKey] = o, o;
2398
+ }
2399
+ return this.queryClientSingleton || (this.queryClientSingleton = this.createQueryClientImpl()), this.queryClientSingleton;
2400
+ }
2401
+ return this.createQueryClientImpl();
2402
+ }
2403
+ getAxiosInstance() {
2404
+ if (Et) {
2405
+ if (this.useGlobalSingletons) {
2406
+ const e = globalThis, r = e[this.globalAxiosKey];
2407
+ if (r)
2408
+ return r;
2409
+ const n = this.configureAxios(this.createAxiosImpl());
2410
+ return e[this.globalAxiosKey] = n, n;
2411
+ }
2412
+ return this.axiosSingleton || (this.axiosSingleton = this.configureAxios(this.createAxiosImpl())), this.axiosSingleton;
2413
+ }
2414
+ return this.configureAxios(this.createAxiosImpl());
2415
+ }
2416
+ setDefaultApiBaseUrl(e) {
2417
+ this.defaultBaseUrl = e;
2418
+ }
2419
+ async setApiUrl(e) {
2420
+ const r = this.getAxiosInstance();
2421
+ r.defaults.baseURL = e;
2422
+ }
2423
+ setRequestInterceptorStrategy(e) {
2424
+ this.requestStrategy = e, this.axiosSingleton && (this.axiosSingleton = this.configureAxios(this.axiosSingleton));
2425
+ }
2426
+ setResponseInterceptorStrategy(e) {
2427
+ this.responseStrategy = e, this.axiosSingleton && (this.axiosSingleton = this.configureAxios(this.axiosSingleton));
2428
+ }
2429
+ getAxiosProxy() {
2430
+ return new Proxy({}, {
2431
+ get: (e, r) => {
2432
+ const n = this.getAxiosInstance(), o = Reflect.get(n, r);
2433
+ return typeof o == "function" ? o.bind(n) : o;
2434
+ },
2435
+ set: (e, r, n) => Reflect.set(this.getAxiosInstance(), r, n)
2436
+ });
2437
+ }
2438
+ getQueryClientProxy() {
2439
+ return new Proxy({}, {
2440
+ get: (e, r) => {
2441
+ const n = this.getQueryClient(), o = Reflect.get(n, r);
2442
+ return typeof o == "function" ? o.bind(n) : o;
2443
+ },
2444
+ set: (e, r, n) => Reflect.set(this.getQueryClient(), r, n)
2445
+ });
2446
+ }
2447
+ configureAxios(e) {
2448
+ return e.interceptors.request.clear(), e.interceptors.response.clear(), e.interceptors.request.use(async (r) => {
2449
+ const n = async (o) => {
2450
+ };
2451
+ return await this.requestStrategy(r, n), r;
2452
+ }), e.interceptors.response.use(async (r) => {
2453
+ const n = async (o) => {
2454
+ };
2455
+ return await this.responseStrategy(r, n), r;
2456
+ }), e;
2457
+ }
2458
+ }
2459
+ const Ot = "__HAUS_NAMED_HTTP_CLIENTS__", mo = typeof window < "u", ir = "default";
2460
+ function Ye() {
2461
+ if (mo) {
2462
+ const e = globalThis, r = e[Ot];
2463
+ if (r) return r;
2464
+ const n = {};
2465
+ return e[Ot] = n, n;
2466
+ }
2467
+ const t = Ye;
2468
+ return t._ssr || (t._ssr = {}), t._ssr;
2469
+ }
2470
+ function ar(t = {}) {
2471
+ return new ho({
2472
+ createQueryClient: t.createQueryClient || (() => new Ke({
2473
+ defaultOptions: {
2474
+ queries: {
2475
+ refetchOnWindowFocus: !0,
2476
+ refetchOnMount: !1,
2477
+ retry: 3,
2478
+ staleTime: 1e3 * 60 * 5
2479
+ }
2480
+ }
2481
+ })),
2482
+ createAxios: t.createAxios || ((e) => A.create({
2483
+ baseURL: e ?? t.defaultBaseUrl,
2484
+ withCredentials: !0
2485
+ })),
2486
+ defaultBaseUrl: t.defaultBaseUrl,
2487
+ useGlobalSingletons: t.useGlobalSingletons,
2488
+ globalQueryClientKey: t.globalQueryClientKey,
2489
+ globalAxiosKey: t.globalAxiosKey
2490
+ });
2491
+ }
2492
+ function yo(t, e = {}, r = {}) {
2493
+ const n = Ye();
2494
+ if (n[t] && !r.overwrite) return n[t];
2495
+ const o = ar(e);
2496
+ return n[t] = o, o;
2497
+ }
2498
+ function go(t, e = {}) {
2499
+ const r = Ye();
2500
+ return r[t] || (r[t] = ar(e)), r[t];
2501
+ }
2502
+ yo(ir, {
2503
+ // Keep WP / multi-react-tree compatibility by using global singletons for the default client
2504
+ useGlobalSingletons: !0,
2505
+ globalQueryClientKey: "__STORE_QUERY_CLIENT__",
2506
+ globalAxiosKey: "__STORE_API_CLIENT__"
2507
+ }, {
2508
+ overwrite: !1
2509
+ });
2510
+ const cr = go(ir, {
2511
+ createQueryClient: () => new Ke({
2512
+ defaultOptions: {
2513
+ queries: {
2514
+ refetchOnWindowFocus: !0,
2515
+ refetchOnMount: !1,
2516
+ retry: 3,
2517
+ staleTime: 1e3 * 60 * 5
2518
+ }
2519
+ }
2520
+ }),
2521
+ createAxios: (t) => A.create({
2522
+ baseURL: t,
2523
+ withCredentials: !0
2524
+ })
2525
+ // NOTE: useGlobalSingletons is configured in namedClients.ts for the default client
2526
+ });
2527
+ cr.getAxiosProxy();
2528
+ cr.getQueryClientProxy();
2529
+ var N = {}, ge = {}, be = {}, we = {}, vt;
2530
+ function le() {
2531
+ if (vt) return we;
2532
+ vt = 1, Object.defineProperty(we, "__esModule", { value: !0 });
2533
+ var t;
2534
+ return (function(e) {
2535
+ e.Mutation = "mutation", e.Query = "query", e.Subscription = "subscription";
2536
+ })(t || (t = {})), we.default = t, we;
2537
+ }
2538
+ var J = {}, se = {}, Tt;
2539
+ function bo() {
2540
+ if (Tt) return se;
2541
+ Tt = 1, Object.defineProperty(se, "__esModule", { value: !0 }), se.isNestedField = void 0;
2542
+ function t(e) {
2543
+ return typeof e == "object" && e.hasOwnProperty("operation") && e.hasOwnProperty("variables") && e.hasOwnProperty("fields") || typeof e == "object" && e.hasOwnProperty("operation") && e.hasOwnProperty("fragment") && e.hasOwnProperty("fields");
2544
+ }
2545
+ return se.isNestedField = t, se;
2546
+ }
2547
+ var Rt;
2548
+ function fe() {
2549
+ if (Rt) return J;
2550
+ Rt = 1;
2551
+ var t = J && J.__assign || function() {
2552
+ return t = Object.assign || function(n) {
2553
+ for (var o, s = 1, i = arguments.length; s < i; s++) {
2554
+ o = arguments[s];
2555
+ for (var a in o) Object.prototype.hasOwnProperty.call(o, a) && (n[a] = o[a]);
2556
+ }
2557
+ return n;
2558
+ }, t.apply(this, arguments);
2559
+ };
2560
+ Object.defineProperty(J, "__esModule", { value: !0 });
2561
+ var e = bo(), r = (
2562
+ /** @class */
2563
+ (function() {
2564
+ function n() {
2565
+ }
2566
+ return n.resolveVariables = function(o) {
2567
+ for (var s = {}, i = 0, a = o; i < a.length; i++) {
2568
+ var c = a[i], u = c.variables, l = c.fields;
2569
+ s = t(t(t({}, s), u), l && n.getNestedVariables(l) || {});
2570
+ }
2571
+ return s;
2572
+ }, n.queryDataNameAndArgumentMap = function(o) {
2573
+ return o && Object.keys(o).length ? "(".concat(Object.entries(o).reduce(function(s, i, a) {
2574
+ var c = i[0], u = i[1];
2575
+ return "".concat(s).concat(a !== 0 ? ", " : "").concat(u && u.name ? u.name : c, ": $").concat(c);
2576
+ }, ""), ")") : "";
2577
+ }, n.queryFieldsMap = function(o) {
2578
+ var s = this;
2579
+ return o ? o.map(function(i) {
2580
+ if ((0, e.isNestedField)(i))
2581
+ return n.queryNestedFieldMap(i);
2582
+ if (typeof i == "object") {
2583
+ var a = "";
2584
+ return Object.entries(i).forEach(function(c, u, l) {
2585
+ var d = c[0], m = c[1];
2586
+ a += "".concat(d, " ").concat(m.length > 0 ? "{ " + s.queryFieldsMap(m) + " }" : ""), u < l.length - 1 && (a += ", ");
2587
+ }), a;
2588
+ } else
2589
+ return "".concat(i);
2590
+ }).join(", ") : "";
2591
+ }, n.operationOrAlias = function(o) {
2592
+ return typeof o == "string" ? o : "".concat(o.alias, ": ").concat(o.name);
2593
+ }, n.isFragment = function(o) {
2594
+ var s;
2595
+ return (s = o?.fragment === !0) !== null && s !== void 0 ? s : !1;
2596
+ }, n.operationOrFragment = function(o) {
2597
+ return n.isFragment(o) ? o.operation : n.operationOrAlias(o.operation);
2598
+ }, n.getFragment = function(o) {
2599
+ return n.isFragment(o) ? "... on " : "";
2600
+ }, n.queryNestedFieldMap = function(o) {
2601
+ return "".concat(n.getFragment(o)).concat(n.operationOrFragment(o), " ").concat(this.isFragment(o) ? "" : this.queryDataNameAndArgumentMap(o.variables), " ").concat(o.fields.length > 0 ? "{ " + this.queryFieldsMap(o.fields) + " }" : "");
2602
+ }, n.queryVariablesMap = function(o, s) {
2603
+ var i = {}, a = function(c) {
2604
+ c && Object.keys(c).map(function(u) {
2605
+ i[u] = typeof c[u] == "object" ? c[u].value : c[u];
2606
+ });
2607
+ };
2608
+ return a(o), s && typeof s == "object" && a(n.getNestedVariables(s)), i;
2609
+ }, n.getNestedVariables = function(o) {
2610
+ var s = {};
2611
+ function i(a) {
2612
+ return a?.forEach(function(c) {
2613
+ if ((0, e.isNestedField)(c))
2614
+ s = t(t(t({}, c.variables), s), c.fields && i(c.fields));
2615
+ else if (typeof c == "object")
2616
+ for (var u = 0, l = Object.entries(c); u < l.length; u++) {
2617
+ var d = l[u], m = d[1];
2618
+ i(m);
2619
+ }
2620
+ }), s;
2621
+ }
2622
+ return i(o), s;
2623
+ }, n.queryDataType = function(o) {
2624
+ var s = "String", i = typeof o == "object" ? o.value : o;
2625
+ if (o?.type != null)
2626
+ s = o.type;
2627
+ else {
2628
+ var a = Array.isArray(i) ? i[0] : i;
2629
+ switch (typeof a) {
2630
+ case "object":
2631
+ s = "Object";
2632
+ break;
2633
+ case "boolean":
2634
+ s = "Boolean";
2635
+ break;
2636
+ case "number":
2637
+ s = a % 1 === 0 ? "Int" : "Float";
2638
+ break;
2639
+ }
2640
+ }
2641
+ return typeof o == "object" && (o.list === !0 ? s = "[".concat(s, "]") : Array.isArray(o.list) && (s = "[".concat(s).concat(o.list[0] ? "!" : "", "]")), o.required && (s += "!")), s;
2642
+ }, n;
2643
+ })()
2644
+ );
2645
+ return J.default = r, J;
2646
+ }
2647
+ var _t;
2648
+ function wo() {
2649
+ if (_t) return be;
2650
+ _t = 1, Object.defineProperty(be, "__esModule", { value: !0 });
2651
+ var t = le(), e = fe(), r = (
2652
+ /** @class */
2653
+ (function() {
2654
+ function n(o) {
2655
+ Array.isArray(o) ? this.variables = e.default.resolveVariables(o) : (this.variables = o.variables, this.fields = o.fields, this.operation = o.operation);
2656
+ }
2657
+ return n.prototype.mutationBuilder = function() {
2658
+ return this.operationWrapperTemplate(this.variables, this.operationTemplate(this.operation));
2659
+ }, n.prototype.mutationsBuilder = function(o) {
2660
+ var s = this, i = o.map(function(a) {
2661
+ return s.operation = a.operation, s.variables = a.variables, s.fields = a.fields, s.operationTemplate(a.operation);
2662
+ });
2663
+ return this.operationWrapperTemplate(e.default.resolveVariables(o), i.join(`
2664
+ `));
2665
+ }, n.prototype.queryDataNameAndArgumentMap = function() {
2666
+ return this.variables && Object.keys(this.variables).length ? "(".concat(Object.keys(this.variables).reduce(function(o, s, i) {
2667
+ return "".concat(o).concat(i !== 0 ? ", " : "").concat(s, ": $").concat(s);
2668
+ }, ""), ")") : "";
2669
+ }, n.prototype.queryDataArgumentAndTypeMap = function(o) {
2670
+ return Object.keys(o).length ? "(".concat(Object.keys(o).reduce(function(s, i, a) {
2671
+ return "".concat(s).concat(a !== 0 ? ", " : "", "$").concat(i, ": ").concat(e.default.queryDataType(o[i]));
2672
+ }, ""), ")") : "";
2673
+ }, n.prototype.operationWrapperTemplate = function(o, s) {
2674
+ var i = typeof this.operation == "string" ? this.operation : this.operation.name;
2675
+ return {
2676
+ query: "".concat(t.default.Mutation, " ").concat(i.charAt(0).toUpperCase() + i.slice(1), " ").concat(this.queryDataArgumentAndTypeMap(o), ` {
2677
+ `).concat(s, `
2678
+ }`),
2679
+ variables: e.default.queryVariablesMap(o)
2680
+ };
2681
+ }, n.prototype.operationTemplate = function(o) {
2682
+ var s = typeof o == "string" ? o : "".concat(o.alias, ": ").concat(o.name);
2683
+ return "".concat(s, " ").concat(this.queryDataNameAndArgumentMap(), ` {
2684
+ `).concat(this.queryFieldsMap(this.fields), `
2685
+ }`);
2686
+ }, n.prototype.queryFieldsMap = function(o) {
2687
+ var s = this;
2688
+ return Array.isArray(o) ? o.map(function(i) {
2689
+ return typeof i == "object" ? "".concat(Object.keys(i)[0], " { ").concat(s.queryFieldsMap(Object.values(i)[0]), " }") : "".concat(i);
2690
+ }).join(", ") : "";
2691
+ }, n;
2692
+ })()
2693
+ );
2694
+ return be.default = r, be;
2695
+ }
2696
+ var Ae = {}, xt;
2697
+ function Ao() {
2698
+ if (xt) return Ae;
2699
+ xt = 1, Object.defineProperty(Ae, "__esModule", { value: !0 });
2700
+ var t = le(), e = fe(), r = (
2701
+ /** @class */
2702
+ (function() {
2703
+ function n(o) {
2704
+ this.queryDataType = function(s) {
2705
+ var i = "String", a = typeof s == "object" ? s.value : s;
2706
+ if (s.type !== void 0)
2707
+ i = s.type;
2708
+ else
2709
+ switch (typeof a) {
2710
+ case "object":
2711
+ i = "Object";
2712
+ break;
2713
+ case "boolean":
2714
+ i = "Boolean";
2715
+ break;
2716
+ case "number":
2717
+ i = a % 1 === 0 ? "Int" : "Float";
2718
+ break;
2719
+ }
2720
+ return typeof s == "object" && s.required && (i += "!"), i;
2721
+ }, Array.isArray(o) ? this.variables = e.default.resolveVariables(o) : (this.variables = o.variables, this.fields = o.fields || [], this.operation = o.operation);
2722
+ }
2723
+ return n.prototype.queryBuilder = function() {
2724
+ return this.operationWrapperTemplate(this.operationTemplate());
2725
+ }, n.prototype.queriesBuilder = function(o) {
2726
+ var s = this, i = function() {
2727
+ var a = [];
2728
+ return o.forEach(function(c) {
2729
+ c && (s.operation = c.operation, s.fields = c.fields, s.variables = c.variables, a.push(s.operationTemplate()));
2730
+ }), a.join(" ");
2731
+ };
2732
+ return this.operationWrapperTemplate(i());
2733
+ }, n.prototype.queryDataNameAndArgumentMap = function() {
2734
+ return this.variables && Object.keys(this.variables).length ? "(".concat(Object.keys(this.variables).reduce(function(o, s, i) {
2735
+ return "".concat(o).concat(i !== 0 ? ", " : "").concat(s, ": $").concat(s);
2736
+ }, ""), ")") : "";
2737
+ }, n.prototype.queryDataArgumentAndTypeMap = function() {
2738
+ var o = this;
2739
+ return this.variables && Object.keys(this.variables).length ? "(".concat(Object.keys(this.variables).reduce(function(s, i, a) {
2740
+ return "".concat(s).concat(a !== 0 ? ", " : "", "$").concat(i, ": ").concat(o.queryDataType(o.variables[i]));
2741
+ }, ""), ")") : "";
2742
+ }, n.prototype.operationWrapperTemplate = function(o) {
2743
+ var s = typeof this.operation == "string" ? this.operation : this.operation.name;
2744
+ return {
2745
+ query: "".concat(t.default.Query, " ").concat(s.charAt(0).toUpperCase()).concat(s.slice(1), " ").concat(this.queryDataArgumentAndTypeMap(), " { ").concat(o, " }"),
2746
+ variables: e.default.queryVariablesMap(this.variables)
2747
+ };
2748
+ }, n.prototype.operationTemplate = function() {
2749
+ var o = typeof this.operation == "string" ? this.operation : "".concat(this.operation.alias, ": ").concat(this.operation.name);
2750
+ return "".concat(o, " ").concat(this.queryDataNameAndArgumentMap(), " { nodes { ").concat(e.default.queryFieldsMap(this.fields), " } }");
2751
+ }, n;
2752
+ })()
2753
+ );
2754
+ return Ae.default = r, Ae;
2755
+ }
2756
+ var Ct;
2757
+ function So() {
2758
+ if (Ct) return ge;
2759
+ Ct = 1, Object.defineProperty(ge, "__esModule", { value: !0 });
2760
+ var t = wo(), e = Ao();
2761
+ return ge.default = { DefaultAppSyncQueryAdapter: e.default, DefaultAppSyncMutationAdapter: t.default }, ge;
2762
+ }
2763
+ var G = {}, Pt;
2764
+ function Eo() {
2765
+ if (Pt) return G;
2766
+ Pt = 1;
2767
+ var t = G && G.__assign || function() {
2768
+ return t = Object.assign || function(o) {
2769
+ for (var s, i = 1, a = arguments.length; i < a; i++) {
2770
+ s = arguments[i];
2771
+ for (var c in s) Object.prototype.hasOwnProperty.call(s, c) && (o[c] = s[c]);
2772
+ }
2773
+ return o;
2774
+ }, t.apply(this, arguments);
2775
+ };
2776
+ Object.defineProperty(G, "__esModule", { value: !0 });
2777
+ var e = le(), r = fe(), n = (
2778
+ /** @class */
2779
+ (function() {
2780
+ function o(s, i) {
2781
+ var a = this;
2782
+ Array.isArray(s) ? this.variables = r.default.resolveVariables(s) : (this.variables = s.variables, this.fields = s.fields, this.operation = s.operation), this.config = {
2783
+ operationName: ""
2784
+ }, i && Object.entries(i).forEach(function(c) {
2785
+ var u = c[0], l = c[1];
2786
+ a.config[u] = l;
2787
+ });
2788
+ }
2789
+ return o.prototype.mutationBuilder = function() {
2790
+ return this.operationWrapperTemplate(e.default.Mutation, this.variables, this.operationTemplate(this.operation));
2791
+ }, o.prototype.mutationsBuilder = function(s) {
2792
+ var i = this, a = s.map(function(c) {
2793
+ return i.operation = c.operation, i.variables = c.variables, i.fields = c.fields, i.operationTemplate(c.operation);
2794
+ });
2795
+ return this.operationWrapperTemplate(e.default.Mutation, r.default.resolveVariables(s), a.join(`
2796
+ `));
2797
+ }, o.prototype.queryDataArgumentAndTypeMap = function(s) {
2798
+ return this.fields && typeof this.fields == "object" && (s = t(t({}, r.default.getNestedVariables(this.fields)), s)), s && Object.keys(s).length > 0 ? "(".concat(Object.keys(s).reduce(function(i, a, c) {
2799
+ return "".concat(i).concat(c !== 0 ? ", " : "", "$").concat(a, ": ").concat(r.default.queryDataType(s[a]));
2800
+ }, ""), ")") : "";
2801
+ }, o.prototype.operationWrapperTemplate = function(s, i, a) {
2802
+ var c = "".concat(s, " ").concat(this.queryDataArgumentAndTypeMap(i), ` {
2803
+ `).concat(a, `
2804
+ }`);
2805
+ return this.config.operationName && (c = c.replace("mutation", "mutation ".concat(this.config.operationName))), {
2806
+ query: c,
2807
+ variables: r.default.queryVariablesMap(i, this.fields)
2808
+ };
2809
+ }, o.prototype.operationTemplate = function(s) {
2810
+ var i = typeof s == "string" ? s : "".concat(s.alias, ": ").concat(s.name);
2811
+ return "".concat(i, " ").concat(r.default.queryDataNameAndArgumentMap(this.variables), " ").concat(this.fields && this.fields.length > 0 ? `{
2812
+ `.concat(r.default.queryFieldsMap(this.fields), `
2813
+ }`) : "");
2814
+ }, o;
2815
+ })()
2816
+ );
2817
+ return G.default = n, G;
2818
+ }
2819
+ var X = {}, Nt;
2820
+ function Oo() {
2821
+ if (Nt) return X;
2822
+ Nt = 1;
2823
+ var t = X && X.__assign || function() {
2824
+ return t = Object.assign || function(o) {
2825
+ for (var s, i = 1, a = arguments.length; i < a; i++) {
2826
+ s = arguments[i];
2827
+ for (var c in s) Object.prototype.hasOwnProperty.call(s, c) && (o[c] = s[c]);
2828
+ }
2829
+ return o;
2830
+ }, t.apply(this, arguments);
2831
+ };
2832
+ Object.defineProperty(X, "__esModule", { value: !0 });
2833
+ var e = le(), r = fe(), n = (
2834
+ /** @class */
2835
+ (function() {
2836
+ function o(s, i) {
2837
+ var a = this;
2838
+ this.config = {
2839
+ operationName: ""
2840
+ }, i && Object.entries(i).forEach(function(c) {
2841
+ var u = c[0], l = c[1];
2842
+ a.config[u] = l;
2843
+ }), Array.isArray(s) ? this.variables = r.default.resolveVariables(s) : (this.variables = s.variables, this.fields = s.fields || [], this.operation = s.operation);
2844
+ }
2845
+ return o.prototype.queryBuilder = function() {
2846
+ return this.operationWrapperTemplate(this.operationTemplate(this.variables));
2847
+ }, o.prototype.queriesBuilder = function(s) {
2848
+ var i = this, a = function() {
2849
+ var c = [];
2850
+ return s.forEach(function(u) {
2851
+ u && (i.operation = u.operation, i.fields = u.fields, c.push(i.operationTemplate(u.variables)));
2852
+ }), c.join(" ");
2853
+ };
2854
+ return this.operationWrapperTemplate(a());
2855
+ }, o.prototype.queryDataArgumentAndTypeMap = function() {
2856
+ var s = this.variables;
2857
+ return this.fields && typeof this.fields == "object" && (s = t(t({}, r.default.getNestedVariables(this.fields)), s)), s && Object.keys(s).length > 0 ? "(".concat(Object.keys(s).reduce(function(i, a, c) {
2858
+ return "".concat(i).concat(c !== 0 ? ", " : "", "$").concat(a, ": ").concat(r.default.queryDataType(s[a]));
2859
+ }, ""), ")") : "";
2860
+ }, o.prototype.operationWrapperTemplate = function(s) {
2861
+ var i = "".concat(e.default.Query, " ").concat(this.queryDataArgumentAndTypeMap(), " { ").concat(s, " }");
2862
+ return i = i.replace("query", "query".concat(this.config.operationName !== "" ? " " + this.config.operationName : "")), {
2863
+ query: i,
2864
+ variables: r.default.queryVariablesMap(this.variables, this.fields)
2865
+ };
2866
+ }, o.prototype.operationTemplate = function(s) {
2867
+ var i = typeof this.operation == "string" ? this.operation : "".concat(this.operation.alias, ": ").concat(this.operation.name);
2868
+ return "".concat(i, " ").concat(s ? r.default.queryDataNameAndArgumentMap(s) : "", " ").concat(this.fields && this.fields.length > 0 ? "{ " + r.default.queryFieldsMap(this.fields) + " }" : "");
2869
+ }, o;
2870
+ })()
2871
+ );
2872
+ return X.default = n, X;
2873
+ }
2874
+ var Se = {}, qt;
2875
+ function vo() {
2876
+ if (qt) return Se;
2877
+ qt = 1, Object.defineProperty(Se, "__esModule", { value: !0 });
2878
+ var t = le(), e = fe(), r = (
2879
+ /** @class */
2880
+ (function() {
2881
+ function n(o) {
2882
+ Array.isArray(o) ? this.variables = e.default.resolveVariables(o) : (this.variables = o.variables, this.fields = o.fields, this.operation = o.operation);
2883
+ }
2884
+ return n.prototype.subscriptionBuilder = function() {
2885
+ return this.operationWrapperTemplate(t.default.Subscription, this.variables, this.operationTemplate(this.operation));
2886
+ }, n.prototype.subscriptionsBuilder = function(o) {
2887
+ var s = this, i = o.map(function(a) {
2888
+ return s.operation = a.operation, s.variables = a.variables, s.fields = a.fields, s.operationTemplate(a.operation);
2889
+ });
2890
+ return this.operationWrapperTemplate(t.default.Subscription, e.default.resolveVariables(o), i.join(`
2891
+ `));
2892
+ }, n.prototype.queryDataNameAndArgumentMap = function() {
2893
+ return this.variables && Object.keys(this.variables).length ? "(".concat(Object.keys(this.variables).reduce(function(o, s, i) {
2894
+ return "".concat(o).concat(i !== 0 ? ", " : "").concat(s, ": $").concat(s);
2895
+ }, ""), ")") : "";
2896
+ }, n.prototype.queryDataArgumentAndTypeMap = function(o) {
2897
+ return Object.keys(o).length ? "(".concat(Object.keys(o).reduce(function(s, i, a) {
2898
+ return "".concat(s).concat(a !== 0 ? ", " : "", "$").concat(i, ": ").concat(e.default.queryDataType(o[i]));
2899
+ }, ""), ")") : "";
2900
+ }, n.prototype.operationWrapperTemplate = function(o, s, i) {
2901
+ return {
2902
+ query: "".concat(o, " ").concat(this.queryDataArgumentAndTypeMap(s), ` {
2903
+ `).concat(i, `
2904
+ }`),
2905
+ variables: e.default.queryVariablesMap(s)
2906
+ };
2907
+ }, n.prototype.operationTemplate = function(o) {
2908
+ var s = typeof this.operation == "string" ? this.operation : "".concat(this.operation.alias, ": ").concat(this.operation.name);
2909
+ return "".concat(s, " ").concat(this.queryDataNameAndArgumentMap(), ` {
2910
+ `).concat(this.queryFieldsMap(this.fields), `
2911
+ }`);
2912
+ }, n.prototype.queryFieldsMap = function(o) {
2913
+ var s = this;
2914
+ return o ? o.map(function(i) {
2915
+ return typeof i == "object" ? "".concat(Object.keys(i)[0], " { ").concat(s.queryFieldsMap(Object.values(i)[0]), " }") : "".concat(i);
2916
+ }).join(", ") : "";
2917
+ }, n;
2918
+ })()
2919
+ );
2920
+ return Se.default = r, Se;
2921
+ }
2922
+ var Dt;
2923
+ function To() {
2924
+ if (Dt) return N;
2925
+ Dt = 1, Object.defineProperty(N, "__esModule", { value: !0 }), N.adapters = N.query = N.mutation = N.subscription = void 0;
2926
+ var t = So();
2927
+ N.adapters = t.default;
2928
+ var e = Eo(), r = Oo(), n = vo();
2929
+ function o(a, c, u) {
2930
+ var l;
2931
+ if (Array.isArray(a)) {
2932
+ if (c) {
2933
+ var d = new c(a, u);
2934
+ return d.queriesBuilder(a);
2935
+ }
2936
+ return l = new r.default(a, u), l.queriesBuilder(a);
2937
+ }
2938
+ if (c) {
2939
+ var d = new c(a, u);
2940
+ return d.queryBuilder();
2941
+ }
2942
+ return l = new r.default(a, u), l.queryBuilder();
2943
+ }
2944
+ N.query = o;
2945
+ function s(a, c, u) {
2946
+ var l, d;
2947
+ return Array.isArray(a) ? c ? (l = new c(a, u), l.mutationsBuilder(a)) : (d = new e.default(a, u), d.mutationsBuilder(a)) : c ? (l = new c(a, u), l.mutationBuilder()) : (d = new e.default(a, u), d.mutationBuilder());
2948
+ }
2949
+ N.mutation = s;
2950
+ function i(a, c) {
2951
+ var u, l;
2952
+ return Array.isArray(a) ? c ? (u = new c(a), u.subscriptionsBuilder(a)) : (l = new n.default(a), l.subscriptionsBuilder(a)) : c ? (u = new c(a), u.subscriptionBuilder()) : (l = new n.default(a), l.subscriptionBuilder());
2953
+ }
2954
+ return N.subscription = i, N;
2955
+ }
2956
+ To();
2957
+ const Ro = () => {
2958
+ const e = gr(Br)?.sdk;
2959
+ return e || console.error("You must wrap your component in a <DataProvider>"), e?.sdkType === "dummy" || e?.sdkType === "vendure", e;
2960
+ }, qe = () => {
2961
+ const t = U.c(2), {
2962
+ getPlatform: e
2963
+ } = Ro();
2964
+ let r;
2965
+ return t[0] !== e ? (r = e(), t[0] = e, t[1] = r) : r = t[1], r;
2966
+ }, De = "ProductBadge", [_o] = wr(De), [xo, Co] = _o(De), ur = (t) => {
2967
+ const e = U.c(13);
2968
+ let r, n, o, s, i;
2969
+ e[0] !== t ? ({
2970
+ children: n,
2971
+ product: o,
2972
+ __scopeProductBadge: r,
2973
+ style: i,
2974
+ ...s
2975
+ } = t, e[0] = t, e[1] = r, e[2] = n, e[3] = o, e[4] = s, e[5] = i) : (r = e[1], n = e[2], o = e[3], s = e[4], i = e[5]);
2976
+ const a = br(null), c = qe();
2977
+ let u;
2978
+ e[6] !== c ? (u = Re(c), e[6] = c, e[7] = u) : u = e[7];
2979
+ const l = u;
2980
+ if (!Z.getEnabled())
2981
+ return null;
2982
+ const {
2983
+ badges: d
2984
+ } = o;
2985
+ if (!d)
2986
+ return null;
2987
+ const m = d.reduce(Po, {}), g = Object.keys(m), p = {
2988
+ groupedBadges: m,
2989
+ badges: d,
2990
+ badgesRef: a,
2991
+ positions: g
2992
+ }, y = Ft(n, p);
2993
+ let h;
2994
+ return e[8] !== l || e[9] !== s || e[10] !== i || e[11] !== y ? (h = /* @__PURE__ */ F.jsx(l, { ...s, style: i, children: y }), e[8] = l, e[9] = s, e[10] = i, e[11] = y, e[12] = h) : h = e[12], /* @__PURE__ */ F.jsx(xo, { scope: r, ...p, children: h });
2995
+ };
2996
+ ur.displayName = De;
2997
+ const lr = (t) => {
2998
+ const e = U.c(18);
2999
+ let r, n, o, s, i;
3000
+ e[0] !== t ? ({
3001
+ children: o,
3002
+ position: s,
3003
+ asChild: n,
3004
+ __scopeProductBadge: r,
3005
+ ...i
3006
+ } = t, e[0] = t, e[1] = r, e[2] = n, e[3] = o, e[4] = s, e[5] = i) : (r = e[1], n = e[2], o = e[3], s = e[4], i = e[5]);
3007
+ const a = qe();
3008
+ let c;
3009
+ e[6] !== n || e[7] !== a ? (c = Re(a, n, "div"), e[6] = n, e[7] = a, e[8] = c) : c = e[8];
3010
+ const u = c, {
3011
+ groupedBadges: l
3012
+ } = Co(De, r), d = l[s];
3013
+ let m;
3014
+ e[9] !== d || e[10] !== o || e[11] !== s ? (m = Ft(o, {
3015
+ badges: d,
3016
+ position: s
3017
+ }), e[9] = d, e[10] = o, e[11] = s, e[12] = m) : m = e[12];
3018
+ let g;
3019
+ return e[13] !== u || e[14] !== s || e[15] !== i || e[16] !== m ? (g = /* @__PURE__ */ F.jsx(u, { ...i, "data-position": s, children: m }), e[13] = u, e[14] = s, e[15] = i, e[16] = m, e[17] = g) : g = e[17], g;
3020
+ }, fr = (t) => {
3021
+ const e = U.c(13);
3022
+ let r, n, o, s;
3023
+ e[0] !== t ? ({
3024
+ children: o,
3025
+ asChild: r,
3026
+ badge: n,
3027
+ ...s
3028
+ } = t, e[0] = t, e[1] = r, e[2] = n, e[3] = o, e[4] = s) : (r = e[1], n = e[2], o = e[3], s = e[4]);
3029
+ const i = qe();
3030
+ let a;
3031
+ e[5] !== r || e[6] !== i ? (a = Re(i, r, "div"), e[5] = r, e[6] = i, e[7] = a) : a = e[7];
3032
+ const c = a, u = n?.id;
3033
+ let l;
3034
+ return e[8] !== c || e[9] !== o || e[10] !== s || e[11] !== u ? (l = /* @__PURE__ */ F.jsx(c, { ...s, "data-badge-id": u, children: o }), e[8] = c, e[9] = o, e[10] = s, e[11] = u, e[12] = l) : l = e[12], l;
3035
+ }, dr = (t) => {
3036
+ const e = U.c(8), {
3037
+ badge: r,
3038
+ asChild: n,
3039
+ ...o
3040
+ } = t, s = qe();
3041
+ let i;
3042
+ e[0] !== n || e[1] !== s ? (i = Re(s, n, "img"), e[0] = n, e[1] = s, e[2] = i) : i = e[2];
3043
+ const a = i, c = Ar(o, s), u = r.asset?.preview;
3044
+ let l;
3045
+ return e[3] !== a || e[4] !== r.collection.name || e[5] !== u || e[6] !== c ? (l = /* @__PURE__ */ F.jsx(a, { src: u, alt: r.collection.name, "data-badge-name": r.collection.name, ...c }), e[3] = a, e[4] = r.collection.name, e[5] = u, e[6] = c, e[7] = l) : l = e[7], l;
3046
+ };
3047
+ lr.displayName = "ProductBadgeGroup";
3048
+ fr.displayName = "ProductBadgeItem";
3049
+ dr.displayName = "ProductBadgeImage";
3050
+ const Zo = {
3051
+ Root: ur,
3052
+ Group: lr,
3053
+ Item: fr,
3054
+ Image: dr
3055
+ };
3056
+ function Po(t, e) {
3057
+ return t[e.position] || (t[e.position] = []), t[e.position].push(e), t;
3058
+ }
3059
+ export {
3060
+ Zo as ProductBadge,
3061
+ Z as VendureBadgePlugin
451
3062
  };
452
- //#endregion
453
- export { We as ProductBadge, K as VendureBadgePlugin };