@myxtra/authentication-green 1.13.0 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3356 @@
1
+ var bt = (e, t, s) => {
2
+ if (!t.has(e))
3
+ throw TypeError("Cannot " + s);
4
+ };
5
+ var n = (e, t, s) => (bt(e, t, "read from private field"), s ? s.call(e) : t.get(e)), p = (e, t, s) => {
6
+ if (t.has(e))
7
+ throw TypeError("Cannot add the same private member more than once");
8
+ t instanceof WeakSet ? t.add(e) : t.set(e, s);
9
+ }, h = (e, t, s, r) => (bt(e, t, "write to private field"), r ? r.call(e, s) : t.set(e, s), s);
10
+ var lt = (e, t, s, r) => ({
11
+ set _(a) {
12
+ h(e, t, a, s);
13
+ },
14
+ get _() {
15
+ return n(e, t, r);
16
+ }
17
+ }), x = (e, t, s) => (bt(e, t, "access private method"), s);
18
+ import { r as d, j as i, u as Zs, a as zs, b as Ee, c as ps, P as qt, d as Ys, E as Js } from "./index-01ba456f.mjs";
19
+ var Ge = class {
20
+ constructor() {
21
+ this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
22
+ }
23
+ subscribe(e) {
24
+ return this.listeners.add(e), this.onSubscribe(), () => {
25
+ this.listeners.delete(e), this.onUnsubscribe();
26
+ };
27
+ }
28
+ hasListeners() {
29
+ return this.listeners.size > 0;
30
+ }
31
+ onSubscribe() {
32
+ }
33
+ onUnsubscribe() {
34
+ }
35
+ }, Ke = typeof window > "u" || "Deno" in window;
36
+ function z() {
37
+ }
38
+ function Xs(e, t) {
39
+ return typeof e == "function" ? e(t) : e;
40
+ }
41
+ function jt(e) {
42
+ return typeof e == "number" && e >= 0 && e !== 1 / 0;
43
+ }
44
+ function ms(e, t) {
45
+ return Math.max(e + (t || 0) - Date.now(), 0);
46
+ }
47
+ function Vt(e, t) {
48
+ const {
49
+ type: s = "all",
50
+ exact: r,
51
+ fetchStatus: a,
52
+ predicate: o,
53
+ queryKey: l,
54
+ stale: c
55
+ } = e;
56
+ if (l) {
57
+ if (r) {
58
+ if (t.queryHash !== Qt(l, t.options))
59
+ return !1;
60
+ } else if (!Ze(t.queryKey, l))
61
+ return !1;
62
+ }
63
+ if (s !== "all") {
64
+ const f = t.isActive();
65
+ if (s === "active" && !f || s === "inactive" && f)
66
+ return !1;
67
+ }
68
+ return !(typeof c == "boolean" && t.isStale() !== c || typeof a < "u" && a !== t.state.fetchStatus || o && !o(t));
69
+ }
70
+ function Wt(e, t) {
71
+ const { exact: s, status: r, predicate: a, mutationKey: o } = e;
72
+ if (o) {
73
+ if (!t.options.mutationKey)
74
+ return !1;
75
+ if (s) {
76
+ if (We(t.options.mutationKey) !== We(o))
77
+ return !1;
78
+ } else if (!Ze(t.options.mutationKey, o))
79
+ return !1;
80
+ }
81
+ return !(r && t.state.status !== r || a && !a(t));
82
+ }
83
+ function Qt(e, t) {
84
+ return ((t == null ? void 0 : t.queryKeyHashFn) || We)(e);
85
+ }
86
+ function We(e) {
87
+ return JSON.stringify(
88
+ e,
89
+ (t, s) => _t(s) ? Object.keys(s).sort().reduce((r, a) => (r[a] = s[a], r), {}) : s
90
+ );
91
+ }
92
+ function Ze(e, t) {
93
+ return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? !Object.keys(t).some((s) => !Ze(e[s], t[s])) : !1;
94
+ }
95
+ function vs(e, t) {
96
+ if (e === t)
97
+ return e;
98
+ const s = Zt(e) && Zt(t);
99
+ if (s || _t(e) && _t(t)) {
100
+ const r = s ? e.length : Object.keys(e).length, a = s ? t : Object.keys(t), o = a.length, l = s ? [] : {};
101
+ let c = 0;
102
+ for (let f = 0; f < o; f++) {
103
+ const g = s ? f : a[f];
104
+ l[g] = vs(e[g], t[g]), l[g] === e[g] && c++;
105
+ }
106
+ return r === o && c === r ? e : l;
107
+ }
108
+ return t;
109
+ }
110
+ function ht(e, t) {
111
+ if (e && !t || t && !e)
112
+ return !1;
113
+ for (const s in e)
114
+ if (e[s] !== t[s])
115
+ return !1;
116
+ return !0;
117
+ }
118
+ function Zt(e) {
119
+ return Array.isArray(e) && e.length === Object.keys(e).length;
120
+ }
121
+ function _t(e) {
122
+ if (!zt(e))
123
+ return !1;
124
+ const t = e.constructor;
125
+ if (typeof t > "u")
126
+ return !0;
127
+ const s = t.prototype;
128
+ return !(!zt(s) || !s.hasOwnProperty("isPrototypeOf"));
129
+ }
130
+ function zt(e) {
131
+ return Object.prototype.toString.call(e) === "[object Object]";
132
+ }
133
+ function gs(e) {
134
+ return new Promise((t) => {
135
+ setTimeout(t, e);
136
+ });
137
+ }
138
+ function Yt(e) {
139
+ gs(0).then(e);
140
+ }
141
+ function Et(e, t, s) {
142
+ return typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ? vs(e, t) : t;
143
+ }
144
+ function Is(e, t, s = 0) {
145
+ const r = [...e, t];
146
+ return s && r.length > s ? r.slice(1) : r;
147
+ }
148
+ function Bs(e, t, s = 0) {
149
+ const r = [t, ...e];
150
+ return s && r.length > s ? r.slice(0, -1) : r;
151
+ }
152
+ var me, ae, Ae, is, er = (is = class extends Ge {
153
+ constructor() {
154
+ super();
155
+ p(this, me, void 0);
156
+ p(this, ae, void 0);
157
+ p(this, Ae, void 0);
158
+ h(this, Ae, (t) => {
159
+ if (!Ke && window.addEventListener) {
160
+ const s = () => t();
161
+ return window.addEventListener("visibilitychange", s, !1), () => {
162
+ window.removeEventListener("visibilitychange", s);
163
+ };
164
+ }
165
+ });
166
+ }
167
+ onSubscribe() {
168
+ n(this, ae) || this.setEventListener(n(this, Ae));
169
+ }
170
+ onUnsubscribe() {
171
+ var t;
172
+ this.hasListeners() || ((t = n(this, ae)) == null || t.call(this), h(this, ae, void 0));
173
+ }
174
+ setEventListener(t) {
175
+ var s;
176
+ h(this, Ae, t), (s = n(this, ae)) == null || s.call(this), h(this, ae, t((r) => {
177
+ typeof r == "boolean" ? this.setFocused(r) : this.onFocus();
178
+ }));
179
+ }
180
+ setFocused(t) {
181
+ n(this, me) !== t && (h(this, me, t), this.onFocus());
182
+ }
183
+ onFocus() {
184
+ this.listeners.forEach((t) => {
185
+ t();
186
+ });
187
+ }
188
+ isFocused() {
189
+ var t;
190
+ return typeof n(this, me) == "boolean" ? n(this, me) : ((t = globalThis.document) == null ? void 0 : t.visibilityState) !== "hidden";
191
+ }
192
+ }, me = new WeakMap(), ae = new WeakMap(), Ae = new WeakMap(), is), ft = new er(), Se, oe, ke, ns, tr = (ns = class extends Ge {
193
+ constructor() {
194
+ super();
195
+ p(this, Se, !0);
196
+ p(this, oe, void 0);
197
+ p(this, ke, void 0);
198
+ h(this, ke, (t) => {
199
+ if (!Ke && window.addEventListener) {
200
+ const s = () => t(!0), r = () => t(!1);
201
+ return window.addEventListener("online", s, !1), window.addEventListener("offline", r, !1), () => {
202
+ window.removeEventListener("online", s), window.removeEventListener("offline", r);
203
+ };
204
+ }
205
+ });
206
+ }
207
+ onSubscribe() {
208
+ n(this, oe) || this.setEventListener(n(this, ke));
209
+ }
210
+ onUnsubscribe() {
211
+ var t;
212
+ this.hasListeners() || ((t = n(this, oe)) == null || t.call(this), h(this, oe, void 0));
213
+ }
214
+ setEventListener(t) {
215
+ var s;
216
+ h(this, ke, t), (s = n(this, oe)) == null || s.call(this), h(this, oe, t(this.setOnline.bind(this)));
217
+ }
218
+ setOnline(t) {
219
+ n(this, Se) !== t && (h(this, Se, t), this.listeners.forEach((r) => {
220
+ r(t);
221
+ }));
222
+ }
223
+ isOnline() {
224
+ return n(this, Se);
225
+ }
226
+ }, Se = new WeakMap(), oe = new WeakMap(), ke = new WeakMap(), ns), pt = new tr();
227
+ function sr(e) {
228
+ return Math.min(1e3 * 2 ** e, 3e4);
229
+ }
230
+ function xt(e) {
231
+ return (e ?? "online") === "online" ? pt.isOnline() : !0;
232
+ }
233
+ var ys = class {
234
+ constructor(e) {
235
+ this.revert = e == null ? void 0 : e.revert, this.silent = e == null ? void 0 : e.silent;
236
+ }
237
+ };
238
+ function wt(e) {
239
+ return e instanceof ys;
240
+ }
241
+ function Cs(e) {
242
+ let t = !1, s = 0, r = !1, a, o, l;
243
+ const c = new Promise((m, y) => {
244
+ o = m, l = y;
245
+ }), f = (m) => {
246
+ var y;
247
+ r || (v(new ys(m)), (y = e.abort) == null || y.call(e));
248
+ }, g = () => {
249
+ t = !0;
250
+ }, u = () => {
251
+ t = !1;
252
+ }, C = () => !ft.isFocused() || e.networkMode !== "always" && !pt.isOnline(), w = (m) => {
253
+ var y;
254
+ r || (r = !0, (y = e.onSuccess) == null || y.call(e, m), a == null || a(), o(m));
255
+ }, v = (m) => {
256
+ var y;
257
+ r || (r = !0, (y = e.onError) == null || y.call(e, m), a == null || a(), l(m));
258
+ }, b = () => new Promise((m) => {
259
+ var y;
260
+ a = (S) => {
261
+ const E = r || !C();
262
+ return E && m(S), E;
263
+ }, (y = e.onPause) == null || y.call(e);
264
+ }).then(() => {
265
+ var m;
266
+ a = void 0, r || (m = e.onContinue) == null || m.call(e);
267
+ }), _ = () => {
268
+ if (r)
269
+ return;
270
+ let m;
271
+ try {
272
+ m = e.fn();
273
+ } catch (y) {
274
+ m = Promise.reject(y);
275
+ }
276
+ Promise.resolve(m).then(w).catch((y) => {
277
+ var K;
278
+ if (r)
279
+ return;
280
+ const S = e.retry ?? (Ke ? 0 : 3), E = e.retryDelay ?? sr, k = typeof E == "function" ? E(s, y) : E, U = S === !0 || typeof S == "number" && s < S || typeof S == "function" && S(s, y);
281
+ if (t || !U) {
282
+ v(y);
283
+ return;
284
+ }
285
+ s++, (K = e.onFail) == null || K.call(e, s, y), gs(k).then(() => {
286
+ if (C())
287
+ return b();
288
+ }).then(() => {
289
+ t ? v(y) : _();
290
+ });
291
+ });
292
+ };
293
+ return xt(e.networkMode) ? _() : b().then(_), {
294
+ promise: c,
295
+ cancel: f,
296
+ continue: () => (a == null ? void 0 : a()) ? c : Promise.resolve(),
297
+ cancelRetry: g,
298
+ continueRetry: u
299
+ };
300
+ }
301
+ function rr() {
302
+ let e = [], t = 0, s = (u) => {
303
+ u();
304
+ }, r = (u) => {
305
+ u();
306
+ };
307
+ const a = (u) => {
308
+ let C;
309
+ t++;
310
+ try {
311
+ C = u();
312
+ } finally {
313
+ t--, t || c();
314
+ }
315
+ return C;
316
+ }, o = (u) => {
317
+ t ? e.push(u) : Yt(() => {
318
+ s(u);
319
+ });
320
+ }, l = (u) => (...C) => {
321
+ o(() => {
322
+ u(...C);
323
+ });
324
+ }, c = () => {
325
+ const u = e;
326
+ e = [], u.length && Yt(() => {
327
+ r(() => {
328
+ u.forEach((C) => {
329
+ s(C);
330
+ });
331
+ });
332
+ });
333
+ };
334
+ return {
335
+ batch: a,
336
+ batchCalls: l,
337
+ schedule: o,
338
+ setNotifyFunction: (u) => {
339
+ s = u;
340
+ },
341
+ setBatchNotifyFunction: (u) => {
342
+ r = u;
343
+ }
344
+ };
345
+ }
346
+ var F = rr(), ve, as, xs = (as = class {
347
+ constructor() {
348
+ p(this, ve, void 0);
349
+ }
350
+ destroy() {
351
+ this.clearGcTimeout();
352
+ }
353
+ scheduleGc() {
354
+ this.clearGcTimeout(), jt(this.gcTime) && h(this, ve, setTimeout(() => {
355
+ this.optionalRemove();
356
+ }, this.gcTime));
357
+ }
358
+ updateGcTime(e) {
359
+ this.gcTime = Math.max(
360
+ this.gcTime || 0,
361
+ e ?? (Ke ? 1 / 0 : 5 * 60 * 1e3)
362
+ );
363
+ }
364
+ clearGcTimeout() {
365
+ n(this, ve) && (clearTimeout(n(this, ve)), h(this, ve, void 0));
366
+ }
367
+ }, ve = new WeakMap(), as), Pe, Ne, q, le, V, R, ze, ge, Me, ut, X, re, os, ir = (os = class extends xs {
368
+ constructor(t) {
369
+ super();
370
+ p(this, Me);
371
+ p(this, X);
372
+ p(this, Pe, void 0);
373
+ p(this, Ne, void 0);
374
+ p(this, q, void 0);
375
+ p(this, le, void 0);
376
+ p(this, V, void 0);
377
+ p(this, R, void 0);
378
+ p(this, ze, void 0);
379
+ p(this, ge, void 0);
380
+ h(this, ge, !1), h(this, ze, t.defaultOptions), x(this, Me, ut).call(this, t.options), h(this, R, []), h(this, q, t.cache), this.queryKey = t.queryKey, this.queryHash = t.queryHash, h(this, Pe, t.state || nr(this.options)), this.state = n(this, Pe), this.scheduleGc();
381
+ }
382
+ get meta() {
383
+ return this.options.meta;
384
+ }
385
+ optionalRemove() {
386
+ !n(this, R).length && this.state.fetchStatus === "idle" && n(this, q).remove(this);
387
+ }
388
+ setData(t, s) {
389
+ const r = Et(this.state.data, t, this.options);
390
+ return x(this, X, re).call(this, {
391
+ data: r,
392
+ type: "success",
393
+ dataUpdatedAt: s == null ? void 0 : s.updatedAt,
394
+ manual: s == null ? void 0 : s.manual
395
+ }), r;
396
+ }
397
+ setState(t, s) {
398
+ x(this, X, re).call(this, { type: "setState", state: t, setStateOptions: s });
399
+ }
400
+ cancel(t) {
401
+ var r;
402
+ const s = n(this, le);
403
+ return (r = n(this, V)) == null || r.cancel(t), s ? s.then(z).catch(z) : Promise.resolve();
404
+ }
405
+ destroy() {
406
+ super.destroy(), this.cancel({ silent: !0 });
407
+ }
408
+ reset() {
409
+ this.destroy(), this.setState(n(this, Pe));
410
+ }
411
+ isActive() {
412
+ return n(this, R).some(
413
+ (t) => t.options.enabled !== !1
414
+ );
415
+ }
416
+ isDisabled() {
417
+ return this.getObserversCount() > 0 && !this.isActive();
418
+ }
419
+ isStale() {
420
+ return this.state.isInvalidated || !this.state.dataUpdatedAt || n(this, R).some((t) => t.getCurrentResult().isStale);
421
+ }
422
+ isStaleByTime(t = 0) {
423
+ return this.state.isInvalidated || !this.state.dataUpdatedAt || !ms(this.state.dataUpdatedAt, t);
424
+ }
425
+ onFocus() {
426
+ var s;
427
+ const t = n(this, R).find((r) => r.shouldFetchOnWindowFocus());
428
+ t == null || t.refetch({ cancelRefetch: !1 }), (s = n(this, V)) == null || s.continue();
429
+ }
430
+ onOnline() {
431
+ var s;
432
+ const t = n(this, R).find((r) => r.shouldFetchOnReconnect());
433
+ t == null || t.refetch({ cancelRefetch: !1 }), (s = n(this, V)) == null || s.continue();
434
+ }
435
+ addObserver(t) {
436
+ n(this, R).includes(t) || (n(this, R).push(t), this.clearGcTimeout(), n(this, q).notify({ type: "observerAdded", query: this, observer: t }));
437
+ }
438
+ removeObserver(t) {
439
+ n(this, R).includes(t) && (h(this, R, n(this, R).filter((s) => s !== t)), n(this, R).length || (n(this, V) && (n(this, ge) ? n(this, V).cancel({ revert: !0 }) : n(this, V).cancelRetry()), this.scheduleGc()), n(this, q).notify({ type: "observerRemoved", query: this, observer: t }));
440
+ }
441
+ getObserversCount() {
442
+ return n(this, R).length;
443
+ }
444
+ invalidate() {
445
+ this.state.isInvalidated || x(this, X, re).call(this, { type: "invalidate" });
446
+ }
447
+ fetch(t, s) {
448
+ var g, u, C, w;
449
+ if (this.state.fetchStatus !== "idle") {
450
+ if (this.state.dataUpdatedAt && (s != null && s.cancelRefetch))
451
+ this.cancel({ silent: !0 });
452
+ else if (n(this, le))
453
+ return (g = n(this, V)) == null || g.continueRetry(), n(this, le);
454
+ }
455
+ if (t && x(this, Me, ut).call(this, t), !this.options.queryFn) {
456
+ const v = n(this, R).find((b) => b.options.queryFn);
457
+ v && x(this, Me, ut).call(this, v.options);
458
+ }
459
+ const r = new AbortController(), a = {
460
+ queryKey: this.queryKey,
461
+ meta: this.meta
462
+ }, o = (v) => {
463
+ Object.defineProperty(v, "signal", {
464
+ enumerable: !0,
465
+ get: () => (h(this, ge, !0), r.signal)
466
+ });
467
+ };
468
+ o(a);
469
+ const l = () => this.options.queryFn ? (h(this, ge, !1), this.options.persister ? this.options.persister(
470
+ this.options.queryFn,
471
+ a,
472
+ this
473
+ ) : this.options.queryFn(
474
+ a
475
+ )) : Promise.reject(
476
+ new Error(`Missing queryFn: '${this.options.queryHash}'`)
477
+ ), c = {
478
+ fetchOptions: s,
479
+ options: this.options,
480
+ queryKey: this.queryKey,
481
+ state: this.state,
482
+ fetchFn: l
483
+ };
484
+ o(c), (u = this.options.behavior) == null || u.onFetch(
485
+ c,
486
+ this
487
+ ), h(this, Ne, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((C = c.fetchOptions) == null ? void 0 : C.meta)) && x(this, X, re).call(this, { type: "fetch", meta: (w = c.fetchOptions) == null ? void 0 : w.meta });
488
+ const f = (v) => {
489
+ var b, _, m, y;
490
+ wt(v) && v.silent || x(this, X, re).call(this, {
491
+ type: "error",
492
+ error: v
493
+ }), wt(v) || ((_ = (b = n(this, q).config).onError) == null || _.call(
494
+ b,
495
+ v,
496
+ this
497
+ ), (y = (m = n(this, q).config).onSettled) == null || y.call(
498
+ m,
499
+ this.state.data,
500
+ v,
501
+ this
502
+ )), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
503
+ };
504
+ return h(this, V, Cs({
505
+ fn: c.fetchFn,
506
+ abort: r.abort.bind(r),
507
+ onSuccess: (v) => {
508
+ var b, _, m, y;
509
+ if (typeof v > "u") {
510
+ f(new Error(`${this.queryHash} data is undefined`));
511
+ return;
512
+ }
513
+ this.setData(v), (_ = (b = n(this, q).config).onSuccess) == null || _.call(b, v, this), (y = (m = n(this, q).config).onSettled) == null || y.call(
514
+ m,
515
+ v,
516
+ this.state.error,
517
+ this
518
+ ), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
519
+ },
520
+ onError: f,
521
+ onFail: (v, b) => {
522
+ x(this, X, re).call(this, { type: "failed", failureCount: v, error: b });
523
+ },
524
+ onPause: () => {
525
+ x(this, X, re).call(this, { type: "pause" });
526
+ },
527
+ onContinue: () => {
528
+ x(this, X, re).call(this, { type: "continue" });
529
+ },
530
+ retry: c.options.retry,
531
+ retryDelay: c.options.retryDelay,
532
+ networkMode: c.options.networkMode
533
+ })), h(this, le, n(this, V).promise), n(this, le);
534
+ }
535
+ }, Pe = new WeakMap(), Ne = new WeakMap(), q = new WeakMap(), le = new WeakMap(), V = new WeakMap(), R = new WeakMap(), ze = new WeakMap(), ge = new WeakMap(), Me = new WeakSet(), ut = function(t) {
536
+ this.options = { ...n(this, ze), ...t }, this.updateGcTime(this.options.gcTime);
537
+ }, X = new WeakSet(), re = function(t) {
538
+ const s = (r) => {
539
+ switch (t.type) {
540
+ case "failed":
541
+ return {
542
+ ...r,
543
+ fetchFailureCount: t.failureCount,
544
+ fetchFailureReason: t.error
545
+ };
546
+ case "pause":
547
+ return {
548
+ ...r,
549
+ fetchStatus: "paused"
550
+ };
551
+ case "continue":
552
+ return {
553
+ ...r,
554
+ fetchStatus: "fetching"
555
+ };
556
+ case "fetch":
557
+ return {
558
+ ...r,
559
+ fetchFailureCount: 0,
560
+ fetchFailureReason: null,
561
+ fetchMeta: t.meta ?? null,
562
+ fetchStatus: xt(this.options.networkMode) ? "fetching" : "paused",
563
+ ...!r.dataUpdatedAt && {
564
+ error: null,
565
+ status: "pending"
566
+ }
567
+ };
568
+ case "success":
569
+ return {
570
+ ...r,
571
+ data: t.data,
572
+ dataUpdateCount: r.dataUpdateCount + 1,
573
+ dataUpdatedAt: t.dataUpdatedAt ?? Date.now(),
574
+ error: null,
575
+ isInvalidated: !1,
576
+ status: "success",
577
+ ...!t.manual && {
578
+ fetchStatus: "idle",
579
+ fetchFailureCount: 0,
580
+ fetchFailureReason: null
581
+ }
582
+ };
583
+ case "error":
584
+ const a = t.error;
585
+ return wt(a) && a.revert && n(this, Ne) ? { ...n(this, Ne), fetchStatus: "idle" } : {
586
+ ...r,
587
+ error: a,
588
+ errorUpdateCount: r.errorUpdateCount + 1,
589
+ errorUpdatedAt: Date.now(),
590
+ fetchFailureCount: r.fetchFailureCount + 1,
591
+ fetchFailureReason: a,
592
+ fetchStatus: "idle",
593
+ status: "error"
594
+ };
595
+ case "invalidate":
596
+ return {
597
+ ...r,
598
+ isInvalidated: !0
599
+ };
600
+ case "setState":
601
+ return {
602
+ ...r,
603
+ ...t.state
604
+ };
605
+ }
606
+ };
607
+ this.state = s(this.state), F.batch(() => {
608
+ n(this, R).forEach((r) => {
609
+ r.onQueryUpdate();
610
+ }), n(this, q).notify({ query: this, type: "updated", action: t });
611
+ });
612
+ }, os);
613
+ function nr(e) {
614
+ const t = typeof e.initialData == "function" ? e.initialData() : e.initialData, s = typeof t < "u", r = s ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
615
+ return {
616
+ data: t,
617
+ dataUpdateCount: 0,
618
+ dataUpdatedAt: s ? r ?? Date.now() : 0,
619
+ error: null,
620
+ errorUpdateCount: 0,
621
+ errorUpdatedAt: 0,
622
+ fetchFailureCount: 0,
623
+ fetchFailureReason: null,
624
+ fetchMeta: null,
625
+ isInvalidated: !1,
626
+ status: s ? "success" : "pending",
627
+ fetchStatus: "idle"
628
+ };
629
+ }
630
+ var I, ls, ar = (ls = class extends Ge {
631
+ constructor(t = {}) {
632
+ super();
633
+ p(this, I, void 0);
634
+ this.config = t, h(this, I, /* @__PURE__ */ new Map());
635
+ }
636
+ build(t, s, r) {
637
+ const a = s.queryKey, o = s.queryHash ?? Qt(a, s);
638
+ let l = this.get(o);
639
+ return l || (l = new ir({
640
+ cache: this,
641
+ queryKey: a,
642
+ queryHash: o,
643
+ options: t.defaultQueryOptions(s),
644
+ state: r,
645
+ defaultOptions: t.getQueryDefaults(a)
646
+ }), this.add(l)), l;
647
+ }
648
+ add(t) {
649
+ n(this, I).has(t.queryHash) || (n(this, I).set(t.queryHash, t), this.notify({
650
+ type: "added",
651
+ query: t
652
+ }));
653
+ }
654
+ remove(t) {
655
+ const s = n(this, I).get(t.queryHash);
656
+ s && (t.destroy(), s === t && n(this, I).delete(t.queryHash), this.notify({ type: "removed", query: t }));
657
+ }
658
+ clear() {
659
+ F.batch(() => {
660
+ this.getAll().forEach((t) => {
661
+ this.remove(t);
662
+ });
663
+ });
664
+ }
665
+ get(t) {
666
+ return n(this, I).get(t);
667
+ }
668
+ getAll() {
669
+ return [...n(this, I).values()];
670
+ }
671
+ find(t) {
672
+ const s = { exact: !0, ...t };
673
+ return this.getAll().find(
674
+ (r) => Vt(s, r)
675
+ );
676
+ }
677
+ findAll(t = {}) {
678
+ const s = this.getAll();
679
+ return Object.keys(t).length > 0 ? s.filter((r) => Vt(t, r)) : s;
680
+ }
681
+ notify(t) {
682
+ F.batch(() => {
683
+ this.listeners.forEach((s) => {
684
+ s(t);
685
+ });
686
+ });
687
+ }
688
+ onFocus() {
689
+ F.batch(() => {
690
+ this.getAll().forEach((t) => {
691
+ t.onFocus();
692
+ });
693
+ });
694
+ }
695
+ onOnline() {
696
+ F.batch(() => {
697
+ this.getAll().forEach((t) => {
698
+ t.onOnline();
699
+ });
700
+ });
701
+ }
702
+ }, I = new WeakMap(), ls), B, Ye, G, Oe, ee, ne, cs, or = (cs = class extends xs {
703
+ constructor(t) {
704
+ super();
705
+ p(this, ee);
706
+ p(this, B, void 0);
707
+ p(this, Ye, void 0);
708
+ p(this, G, void 0);
709
+ p(this, Oe, void 0);
710
+ this.mutationId = t.mutationId, h(this, Ye, t.defaultOptions), h(this, G, t.mutationCache), h(this, B, []), this.state = t.state || bs(), this.setOptions(t.options), this.scheduleGc();
711
+ }
712
+ setOptions(t) {
713
+ this.options = { ...n(this, Ye), ...t }, this.updateGcTime(this.options.gcTime);
714
+ }
715
+ get meta() {
716
+ return this.options.meta;
717
+ }
718
+ addObserver(t) {
719
+ n(this, B).includes(t) || (n(this, B).push(t), this.clearGcTimeout(), n(this, G).notify({
720
+ type: "observerAdded",
721
+ mutation: this,
722
+ observer: t
723
+ }));
724
+ }
725
+ removeObserver(t) {
726
+ h(this, B, n(this, B).filter((s) => s !== t)), this.scheduleGc(), n(this, G).notify({
727
+ type: "observerRemoved",
728
+ mutation: this,
729
+ observer: t
730
+ });
731
+ }
732
+ optionalRemove() {
733
+ n(this, B).length || (this.state.status === "pending" ? this.scheduleGc() : n(this, G).remove(this));
734
+ }
735
+ continue() {
736
+ var t;
737
+ return ((t = n(this, Oe)) == null ? void 0 : t.continue()) ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
738
+ this.execute(this.state.variables);
739
+ }
740
+ async execute(t) {
741
+ var a, o, l, c, f, g, u, C, w, v, b, _, m, y, S, E, k, U, K, D;
742
+ const s = () => (h(this, Oe, Cs({
743
+ fn: () => this.options.mutationFn ? this.options.mutationFn(t) : Promise.reject(new Error("No mutationFn found")),
744
+ onFail: (M, se) => {
745
+ x(this, ee, ne).call(this, { type: "failed", failureCount: M, error: se });
746
+ },
747
+ onPause: () => {
748
+ x(this, ee, ne).call(this, { type: "pause" });
749
+ },
750
+ onContinue: () => {
751
+ x(this, ee, ne).call(this, { type: "continue" });
752
+ },
753
+ retry: this.options.retry ?? 0,
754
+ retryDelay: this.options.retryDelay,
755
+ networkMode: this.options.networkMode
756
+ })), n(this, Oe).promise), r = this.state.status === "pending";
757
+ try {
758
+ if (!r) {
759
+ x(this, ee, ne).call(this, { type: "pending", variables: t }), await ((o = (a = n(this, G).config).onMutate) == null ? void 0 : o.call(
760
+ a,
761
+ t,
762
+ this
763
+ ));
764
+ const se = await ((c = (l = this.options).onMutate) == null ? void 0 : c.call(l, t));
765
+ se !== this.state.context && x(this, ee, ne).call(this, {
766
+ type: "pending",
767
+ context: se,
768
+ variables: t
769
+ });
770
+ }
771
+ const M = await s();
772
+ return await ((g = (f = n(this, G).config).onSuccess) == null ? void 0 : g.call(
773
+ f,
774
+ M,
775
+ t,
776
+ this.state.context,
777
+ this
778
+ )), await ((C = (u = this.options).onSuccess) == null ? void 0 : C.call(u, M, t, this.state.context)), await ((v = (w = n(this, G).config).onSettled) == null ? void 0 : v.call(
779
+ w,
780
+ M,
781
+ null,
782
+ this.state.variables,
783
+ this.state.context,
784
+ this
785
+ )), await ((_ = (b = this.options).onSettled) == null ? void 0 : _.call(b, M, null, t, this.state.context)), x(this, ee, ne).call(this, { type: "success", data: M }), M;
786
+ } catch (M) {
787
+ try {
788
+ throw await ((y = (m = n(this, G).config).onError) == null ? void 0 : y.call(
789
+ m,
790
+ M,
791
+ t,
792
+ this.state.context,
793
+ this
794
+ )), await ((E = (S = this.options).onError) == null ? void 0 : E.call(
795
+ S,
796
+ M,
797
+ t,
798
+ this.state.context
799
+ )), await ((U = (k = n(this, G).config).onSettled) == null ? void 0 : U.call(
800
+ k,
801
+ void 0,
802
+ M,
803
+ this.state.variables,
804
+ this.state.context,
805
+ this
806
+ )), await ((D = (K = this.options).onSettled) == null ? void 0 : D.call(
807
+ K,
808
+ void 0,
809
+ M,
810
+ t,
811
+ this.state.context
812
+ )), M;
813
+ } finally {
814
+ x(this, ee, ne).call(this, { type: "error", error: M });
815
+ }
816
+ }
817
+ }
818
+ }, B = new WeakMap(), Ye = new WeakMap(), G = new WeakMap(), Oe = new WeakMap(), ee = new WeakSet(), ne = function(t) {
819
+ const s = (r) => {
820
+ switch (t.type) {
821
+ case "failed":
822
+ return {
823
+ ...r,
824
+ failureCount: t.failureCount,
825
+ failureReason: t.error
826
+ };
827
+ case "pause":
828
+ return {
829
+ ...r,
830
+ isPaused: !0
831
+ };
832
+ case "continue":
833
+ return {
834
+ ...r,
835
+ isPaused: !1
836
+ };
837
+ case "pending":
838
+ return {
839
+ ...r,
840
+ context: t.context,
841
+ data: void 0,
842
+ failureCount: 0,
843
+ failureReason: null,
844
+ error: null,
845
+ isPaused: !xt(this.options.networkMode),
846
+ status: "pending",
847
+ variables: t.variables,
848
+ submittedAt: Date.now()
849
+ };
850
+ case "success":
851
+ return {
852
+ ...r,
853
+ data: t.data,
854
+ failureCount: 0,
855
+ failureReason: null,
856
+ error: null,
857
+ status: "success",
858
+ isPaused: !1
859
+ };
860
+ case "error":
861
+ return {
862
+ ...r,
863
+ data: void 0,
864
+ error: t.error,
865
+ failureCount: r.failureCount + 1,
866
+ failureReason: t.error,
867
+ isPaused: !1,
868
+ status: "error"
869
+ };
870
+ }
871
+ };
872
+ this.state = s(this.state), F.batch(() => {
873
+ n(this, B).forEach((r) => {
874
+ r.onMutationUpdate(t);
875
+ }), n(this, G).notify({
876
+ mutation: this,
877
+ type: "updated",
878
+ action: t
879
+ });
880
+ });
881
+ }, cs);
882
+ function bs() {
883
+ return {
884
+ context: void 0,
885
+ data: void 0,
886
+ error: null,
887
+ failureCount: 0,
888
+ failureReason: null,
889
+ isPaused: !1,
890
+ status: "idle",
891
+ variables: void 0,
892
+ submittedAt: 0
893
+ };
894
+ }
895
+ var W, Je, ye, us, lr = (us = class extends Ge {
896
+ constructor(t = {}) {
897
+ super();
898
+ p(this, W, void 0);
899
+ p(this, Je, void 0);
900
+ p(this, ye, void 0);
901
+ this.config = t, h(this, W, []), h(this, Je, 0);
902
+ }
903
+ build(t, s, r) {
904
+ const a = new or({
905
+ mutationCache: this,
906
+ mutationId: ++lt(this, Je)._,
907
+ options: t.defaultMutationOptions(s),
908
+ state: r
909
+ });
910
+ return this.add(a), a;
911
+ }
912
+ add(t) {
913
+ n(this, W).push(t), this.notify({ type: "added", mutation: t });
914
+ }
915
+ remove(t) {
916
+ h(this, W, n(this, W).filter((s) => s !== t)), this.notify({ type: "removed", mutation: t });
917
+ }
918
+ clear() {
919
+ F.batch(() => {
920
+ n(this, W).forEach((t) => {
921
+ this.remove(t);
922
+ });
923
+ });
924
+ }
925
+ getAll() {
926
+ return n(this, W);
927
+ }
928
+ find(t) {
929
+ const s = { exact: !0, ...t };
930
+ return n(this, W).find(
931
+ (r) => Wt(s, r)
932
+ );
933
+ }
934
+ findAll(t = {}) {
935
+ return n(this, W).filter(
936
+ (s) => Wt(t, s)
937
+ );
938
+ }
939
+ notify(t) {
940
+ F.batch(() => {
941
+ this.listeners.forEach((s) => {
942
+ s(t);
943
+ });
944
+ });
945
+ }
946
+ resumePausedMutations() {
947
+ return h(this, ye, (n(this, ye) ?? Promise.resolve()).then(() => {
948
+ const t = n(this, W).filter((s) => s.state.isPaused);
949
+ return F.batch(
950
+ () => t.reduce(
951
+ (s, r) => s.then(() => r.continue().catch(z)),
952
+ Promise.resolve()
953
+ )
954
+ );
955
+ }).then(() => {
956
+ h(this, ye, void 0);
957
+ })), n(this, ye);
958
+ }
959
+ }, W = new WeakMap(), Je = new WeakMap(), ye = new WeakMap(), us);
960
+ function cr(e) {
961
+ return {
962
+ onFetch: (t, s) => {
963
+ const r = async () => {
964
+ var b, _, m, y, S;
965
+ const a = t.options, o = (m = (_ = (b = t.fetchOptions) == null ? void 0 : b.meta) == null ? void 0 : _.fetchMore) == null ? void 0 : m.direction, l = ((y = t.state.data) == null ? void 0 : y.pages) || [], c = ((S = t.state.data) == null ? void 0 : S.pageParams) || [], f = { pages: [], pageParams: [] };
966
+ let g = !1;
967
+ const u = (E) => {
968
+ Object.defineProperty(E, "signal", {
969
+ enumerable: !0,
970
+ get: () => (t.signal.aborted ? g = !0 : t.signal.addEventListener("abort", () => {
971
+ g = !0;
972
+ }), t.signal)
973
+ });
974
+ }, C = t.options.queryFn || (() => Promise.reject(
975
+ new Error(`Missing queryFn: '${t.options.queryHash}'`)
976
+ )), w = async (E, k, U) => {
977
+ if (g)
978
+ return Promise.reject();
979
+ if (k == null && E.pages.length)
980
+ return Promise.resolve(E);
981
+ const K = {
982
+ queryKey: t.queryKey,
983
+ pageParam: k,
984
+ direction: U ? "backward" : "forward",
985
+ meta: t.options.meta
986
+ };
987
+ u(K);
988
+ const D = await C(
989
+ K
990
+ ), { maxPages: M } = t.options, se = U ? Bs : Is;
991
+ return {
992
+ pages: se(E.pages, D, M),
993
+ pageParams: se(E.pageParams, k, M)
994
+ };
995
+ };
996
+ let v;
997
+ if (o && l.length) {
998
+ const E = o === "backward", k = E ? ur : Jt, U = {
999
+ pages: l,
1000
+ pageParams: c
1001
+ }, K = k(a, U);
1002
+ v = await w(U, K, E);
1003
+ } else {
1004
+ v = await w(
1005
+ f,
1006
+ c[0] ?? a.initialPageParam
1007
+ );
1008
+ const E = e ?? l.length;
1009
+ for (let k = 1; k < E; k++) {
1010
+ const U = Jt(a, v);
1011
+ v = await w(v, U);
1012
+ }
1013
+ }
1014
+ return v;
1015
+ };
1016
+ t.options.persister ? t.fetchFn = () => {
1017
+ var a, o;
1018
+ return (o = (a = t.options).persister) == null ? void 0 : o.call(
1019
+ a,
1020
+ r,
1021
+ {
1022
+ queryKey: t.queryKey,
1023
+ meta: t.options.meta,
1024
+ signal: t.signal
1025
+ },
1026
+ s
1027
+ );
1028
+ } : t.fetchFn = r;
1029
+ }
1030
+ };
1031
+ }
1032
+ function Jt(e, { pages: t, pageParams: s }) {
1033
+ const r = t.length - 1;
1034
+ return e.getNextPageParam(
1035
+ t[r],
1036
+ t,
1037
+ s[r],
1038
+ s
1039
+ );
1040
+ }
1041
+ function ur(e, { pages: t, pageParams: s }) {
1042
+ var r;
1043
+ return (r = e.getPreviousPageParam) == null ? void 0 : r.call(
1044
+ e,
1045
+ t[0],
1046
+ t,
1047
+ s[0],
1048
+ s
1049
+ );
1050
+ }
1051
+ var L, ce, ue, Le, Fe, de, Re, De, ds, ws = (ds = class {
1052
+ constructor(e = {}) {
1053
+ p(this, L, void 0);
1054
+ p(this, ce, void 0);
1055
+ p(this, ue, void 0);
1056
+ p(this, Le, void 0);
1057
+ p(this, Fe, void 0);
1058
+ p(this, de, void 0);
1059
+ p(this, Re, void 0);
1060
+ p(this, De, void 0);
1061
+ h(this, L, e.queryCache || new ar()), h(this, ce, e.mutationCache || new lr()), h(this, ue, e.defaultOptions || {}), h(this, Le, /* @__PURE__ */ new Map()), h(this, Fe, /* @__PURE__ */ new Map()), h(this, de, 0);
1062
+ }
1063
+ mount() {
1064
+ lt(this, de)._++, n(this, de) === 1 && (h(this, Re, ft.subscribe(() => {
1065
+ ft.isFocused() && (this.resumePausedMutations(), n(this, L).onFocus());
1066
+ })), h(this, De, pt.subscribe(() => {
1067
+ pt.isOnline() && (this.resumePausedMutations(), n(this, L).onOnline());
1068
+ })));
1069
+ }
1070
+ unmount() {
1071
+ var e, t;
1072
+ lt(this, de)._--, n(this, de) === 0 && ((e = n(this, Re)) == null || e.call(this), h(this, Re, void 0), (t = n(this, De)) == null || t.call(this), h(this, De, void 0));
1073
+ }
1074
+ isFetching(e) {
1075
+ return n(this, L).findAll({ ...e, fetchStatus: "fetching" }).length;
1076
+ }
1077
+ isMutating(e) {
1078
+ return n(this, ce).findAll({ ...e, status: "pending" }).length;
1079
+ }
1080
+ getQueryData(e) {
1081
+ var t;
1082
+ return (t = n(this, L).find({ queryKey: e })) == null ? void 0 : t.state.data;
1083
+ }
1084
+ ensureQueryData(e) {
1085
+ const t = this.getQueryData(e.queryKey);
1086
+ return t !== void 0 ? Promise.resolve(t) : this.fetchQuery(e);
1087
+ }
1088
+ getQueriesData(e) {
1089
+ return this.getQueryCache().findAll(e).map(({ queryKey: t, state: s }) => {
1090
+ const r = s.data;
1091
+ return [t, r];
1092
+ });
1093
+ }
1094
+ setQueryData(e, t, s) {
1095
+ const r = n(this, L).find({ queryKey: e }), a = r == null ? void 0 : r.state.data, o = Xs(t, a);
1096
+ if (typeof o > "u")
1097
+ return;
1098
+ const l = this.defaultQueryOptions({ queryKey: e });
1099
+ return n(this, L).build(this, l).setData(o, { ...s, manual: !0 });
1100
+ }
1101
+ setQueriesData(e, t, s) {
1102
+ return F.batch(
1103
+ () => this.getQueryCache().findAll(e).map(({ queryKey: r }) => [
1104
+ r,
1105
+ this.setQueryData(r, t, s)
1106
+ ])
1107
+ );
1108
+ }
1109
+ getQueryState(e) {
1110
+ var t;
1111
+ return (t = n(this, L).find({ queryKey: e })) == null ? void 0 : t.state;
1112
+ }
1113
+ removeQueries(e) {
1114
+ const t = n(this, L);
1115
+ F.batch(() => {
1116
+ t.findAll(e).forEach((s) => {
1117
+ t.remove(s);
1118
+ });
1119
+ });
1120
+ }
1121
+ resetQueries(e, t) {
1122
+ const s = n(this, L), r = {
1123
+ type: "active",
1124
+ ...e
1125
+ };
1126
+ return F.batch(() => (s.findAll(e).forEach((a) => {
1127
+ a.reset();
1128
+ }), this.refetchQueries(r, t)));
1129
+ }
1130
+ cancelQueries(e = {}, t = {}) {
1131
+ const s = { revert: !0, ...t }, r = F.batch(
1132
+ () => n(this, L).findAll(e).map((a) => a.cancel(s))
1133
+ );
1134
+ return Promise.all(r).then(z).catch(z);
1135
+ }
1136
+ invalidateQueries(e = {}, t = {}) {
1137
+ return F.batch(() => {
1138
+ if (n(this, L).findAll(e).forEach((r) => {
1139
+ r.invalidate();
1140
+ }), e.refetchType === "none")
1141
+ return Promise.resolve();
1142
+ const s = {
1143
+ ...e,
1144
+ type: e.refetchType ?? e.type ?? "active"
1145
+ };
1146
+ return this.refetchQueries(s, t);
1147
+ });
1148
+ }
1149
+ refetchQueries(e = {}, t) {
1150
+ const s = {
1151
+ ...t,
1152
+ cancelRefetch: (t == null ? void 0 : t.cancelRefetch) ?? !0
1153
+ }, r = F.batch(
1154
+ () => n(this, L).findAll(e).filter((a) => !a.isDisabled()).map((a) => {
1155
+ let o = a.fetch(void 0, s);
1156
+ return s.throwOnError || (o = o.catch(z)), a.state.fetchStatus === "paused" ? Promise.resolve() : o;
1157
+ })
1158
+ );
1159
+ return Promise.all(r).then(z);
1160
+ }
1161
+ fetchQuery(e) {
1162
+ const t = this.defaultQueryOptions(e);
1163
+ typeof t.retry > "u" && (t.retry = !1);
1164
+ const s = n(this, L).build(this, t);
1165
+ return s.isStaleByTime(t.staleTime) ? s.fetch(t) : Promise.resolve(s.state.data);
1166
+ }
1167
+ prefetchQuery(e) {
1168
+ return this.fetchQuery(e).then(z).catch(z);
1169
+ }
1170
+ fetchInfiniteQuery(e) {
1171
+ return e.behavior = cr(e.pages), this.fetchQuery(e);
1172
+ }
1173
+ prefetchInfiniteQuery(e) {
1174
+ return this.fetchInfiniteQuery(e).then(z).catch(z);
1175
+ }
1176
+ resumePausedMutations() {
1177
+ return n(this, ce).resumePausedMutations();
1178
+ }
1179
+ getQueryCache() {
1180
+ return n(this, L);
1181
+ }
1182
+ getMutationCache() {
1183
+ return n(this, ce);
1184
+ }
1185
+ getDefaultOptions() {
1186
+ return n(this, ue);
1187
+ }
1188
+ setDefaultOptions(e) {
1189
+ h(this, ue, e);
1190
+ }
1191
+ setQueryDefaults(e, t) {
1192
+ n(this, Le).set(We(e), {
1193
+ queryKey: e,
1194
+ defaultOptions: t
1195
+ });
1196
+ }
1197
+ getQueryDefaults(e) {
1198
+ const t = [...n(this, Le).values()];
1199
+ let s = {};
1200
+ return t.forEach((r) => {
1201
+ Ze(e, r.queryKey) && (s = { ...s, ...r.defaultOptions });
1202
+ }), s;
1203
+ }
1204
+ setMutationDefaults(e, t) {
1205
+ n(this, Fe).set(We(e), {
1206
+ mutationKey: e,
1207
+ defaultOptions: t
1208
+ });
1209
+ }
1210
+ getMutationDefaults(e) {
1211
+ const t = [...n(this, Fe).values()];
1212
+ let s = {};
1213
+ return t.forEach((r) => {
1214
+ Ze(e, r.mutationKey) && (s = { ...s, ...r.defaultOptions });
1215
+ }), s;
1216
+ }
1217
+ defaultQueryOptions(e) {
1218
+ if (e != null && e._defaulted)
1219
+ return e;
1220
+ const t = {
1221
+ ...n(this, ue).queries,
1222
+ ...(e == null ? void 0 : e.queryKey) && this.getQueryDefaults(e.queryKey),
1223
+ ...e,
1224
+ _defaulted: !0
1225
+ };
1226
+ return t.queryHash || (t.queryHash = Qt(
1227
+ t.queryKey,
1228
+ t
1229
+ )), typeof t.refetchOnReconnect > "u" && (t.refetchOnReconnect = t.networkMode !== "always"), typeof t.throwOnError > "u" && (t.throwOnError = !!t.suspense), typeof t.networkMode > "u" && t.persister && (t.networkMode = "offlineFirst"), t;
1230
+ }
1231
+ defaultMutationOptions(e) {
1232
+ return e != null && e._defaulted ? e : {
1233
+ ...n(this, ue).mutations,
1234
+ ...(e == null ? void 0 : e.mutationKey) && this.getMutationDefaults(e.mutationKey),
1235
+ ...e,
1236
+ _defaulted: !0
1237
+ };
1238
+ }
1239
+ clear() {
1240
+ n(this, L).clear(), n(this, ce).clear();
1241
+ }
1242
+ }, L = new WeakMap(), ce = new WeakMap(), ue = new WeakMap(), Le = new WeakMap(), Fe = new WeakMap(), de = new WeakMap(), Re = new WeakMap(), De = new WeakMap(), ds), H, P, Te, T, Ce, Ue, te, Xe, Qe, He, xe, be, he, we, je, Ve, Ie, At, Be, St, et, kt, tt, Pt, st, Nt, rt, Mt, it, Ot, Ct, js, hs, dr = (hs = class extends Ge {
1243
+ constructor(t, s) {
1244
+ super();
1245
+ p(this, je);
1246
+ p(this, Ie);
1247
+ p(this, Be);
1248
+ p(this, et);
1249
+ p(this, tt);
1250
+ p(this, st);
1251
+ p(this, rt);
1252
+ p(this, it);
1253
+ p(this, Ct);
1254
+ p(this, H, void 0);
1255
+ p(this, P, void 0);
1256
+ p(this, Te, void 0);
1257
+ p(this, T, void 0);
1258
+ p(this, Ce, void 0);
1259
+ p(this, Ue, void 0);
1260
+ p(this, te, void 0);
1261
+ p(this, Xe, void 0);
1262
+ p(this, Qe, void 0);
1263
+ // This property keeps track of the last query with defined data.
1264
+ // It will be used to pass the previous data and query to the placeholder function between renders.
1265
+ p(this, He, void 0);
1266
+ p(this, xe, void 0);
1267
+ p(this, be, void 0);
1268
+ p(this, he, void 0);
1269
+ p(this, we, void 0);
1270
+ h(this, P, void 0), h(this, Te, void 0), h(this, T, void 0), h(this, we, /* @__PURE__ */ new Set()), h(this, H, t), this.options = s, h(this, te, null), this.bindMethods(), this.setOptions(s);
1271
+ }
1272
+ bindMethods() {
1273
+ this.refetch = this.refetch.bind(this);
1274
+ }
1275
+ onSubscribe() {
1276
+ this.listeners.size === 1 && (n(this, P).addObserver(this), Xt(n(this, P), this.options) ? x(this, je, Ve).call(this) : this.updateResult(), x(this, tt, Pt).call(this));
1277
+ }
1278
+ onUnsubscribe() {
1279
+ this.hasListeners() || this.destroy();
1280
+ }
1281
+ shouldFetchOnReconnect() {
1282
+ return Lt(
1283
+ n(this, P),
1284
+ this.options,
1285
+ this.options.refetchOnReconnect
1286
+ );
1287
+ }
1288
+ shouldFetchOnWindowFocus() {
1289
+ return Lt(
1290
+ n(this, P),
1291
+ this.options,
1292
+ this.options.refetchOnWindowFocus
1293
+ );
1294
+ }
1295
+ destroy() {
1296
+ this.listeners = /* @__PURE__ */ new Set(), x(this, st, Nt).call(this), x(this, rt, Mt).call(this), n(this, P).removeObserver(this);
1297
+ }
1298
+ setOptions(t, s) {
1299
+ const r = this.options, a = n(this, P);
1300
+ if (this.options = n(this, H).defaultQueryOptions(t), ht(r, this.options) || n(this, H).getQueryCache().notify({
1301
+ type: "observerOptionsUpdated",
1302
+ query: n(this, P),
1303
+ observer: this
1304
+ }), typeof this.options.enabled < "u" && typeof this.options.enabled != "boolean")
1305
+ throw new Error("Expected enabled to be a boolean");
1306
+ this.options.queryKey || (this.options.queryKey = r.queryKey), x(this, it, Ot).call(this);
1307
+ const o = this.hasListeners();
1308
+ o && It(
1309
+ n(this, P),
1310
+ a,
1311
+ this.options,
1312
+ r
1313
+ ) && x(this, je, Ve).call(this), this.updateResult(s), o && (n(this, P) !== a || this.options.enabled !== r.enabled || this.options.staleTime !== r.staleTime) && x(this, Ie, At).call(this);
1314
+ const l = x(this, Be, St).call(this);
1315
+ o && (n(this, P) !== a || this.options.enabled !== r.enabled || l !== n(this, he)) && x(this, et, kt).call(this, l);
1316
+ }
1317
+ getOptimisticResult(t) {
1318
+ const s = n(this, H).getQueryCache().build(n(this, H), t), r = this.createResult(s, t);
1319
+ return fr(this, r) && (h(this, T, r), h(this, Ue, this.options), h(this, Ce, n(this, P).state)), r;
1320
+ }
1321
+ getCurrentResult() {
1322
+ return n(this, T);
1323
+ }
1324
+ trackResult(t) {
1325
+ const s = {};
1326
+ return Object.keys(t).forEach((r) => {
1327
+ Object.defineProperty(s, r, {
1328
+ configurable: !1,
1329
+ enumerable: !0,
1330
+ get: () => (n(this, we).add(r), t[r])
1331
+ });
1332
+ }), s;
1333
+ }
1334
+ getCurrentQuery() {
1335
+ return n(this, P);
1336
+ }
1337
+ refetch({ ...t } = {}) {
1338
+ return this.fetch({
1339
+ ...t
1340
+ });
1341
+ }
1342
+ fetchOptimistic(t) {
1343
+ const s = n(this, H).defaultQueryOptions(t), r = n(this, H).getQueryCache().build(n(this, H), s);
1344
+ return r.isFetchingOptimistic = !0, r.fetch().then(() => this.createResult(r, s));
1345
+ }
1346
+ fetch(t) {
1347
+ return x(this, je, Ve).call(this, {
1348
+ ...t,
1349
+ cancelRefetch: t.cancelRefetch ?? !0
1350
+ }).then(() => (this.updateResult(), n(this, T)));
1351
+ }
1352
+ createResult(t, s) {
1353
+ var K;
1354
+ const r = n(this, P), a = this.options, o = n(this, T), l = n(this, Ce), c = n(this, Ue), g = t !== r ? t.state : n(this, Te), { state: u } = t;
1355
+ let { error: C, errorUpdatedAt: w, fetchStatus: v, status: b } = u, _ = !1, m;
1356
+ if (s._optimisticResults) {
1357
+ const D = this.hasListeners(), M = !D && Xt(t, s), se = D && It(t, r, s, a);
1358
+ (M || se) && (v = xt(t.options.networkMode) ? "fetching" : "paused", u.dataUpdatedAt || (b = "pending")), s._optimisticResults === "isRestoring" && (v = "idle");
1359
+ }
1360
+ if (s.select && typeof u.data < "u")
1361
+ if (o && u.data === (l == null ? void 0 : l.data) && s.select === n(this, Xe))
1362
+ m = n(this, Qe);
1363
+ else
1364
+ try {
1365
+ h(this, Xe, s.select), m = s.select(u.data), m = Et(o == null ? void 0 : o.data, m, s), h(this, Qe, m), h(this, te, null);
1366
+ } catch (D) {
1367
+ h(this, te, D);
1368
+ }
1369
+ else
1370
+ m = u.data;
1371
+ if (typeof s.placeholderData < "u" && typeof m > "u" && b === "pending") {
1372
+ let D;
1373
+ if (o != null && o.isPlaceholderData && s.placeholderData === (c == null ? void 0 : c.placeholderData))
1374
+ D = o.data;
1375
+ else if (D = typeof s.placeholderData == "function" ? s.placeholderData(
1376
+ (K = n(this, He)) == null ? void 0 : K.state.data,
1377
+ n(this, He)
1378
+ ) : s.placeholderData, s.select && typeof D < "u")
1379
+ try {
1380
+ D = s.select(D), h(this, te, null);
1381
+ } catch (M) {
1382
+ h(this, te, M);
1383
+ }
1384
+ typeof D < "u" && (b = "success", m = Et(
1385
+ o == null ? void 0 : o.data,
1386
+ D,
1387
+ s
1388
+ ), _ = !0);
1389
+ }
1390
+ n(this, te) && (C = n(this, te), m = n(this, Qe), w = Date.now(), b = "error");
1391
+ const y = v === "fetching", S = b === "pending", E = b === "error", k = S && y;
1392
+ return {
1393
+ status: b,
1394
+ fetchStatus: v,
1395
+ isPending: S,
1396
+ isSuccess: b === "success",
1397
+ isError: E,
1398
+ isInitialLoading: k,
1399
+ isLoading: k,
1400
+ data: m,
1401
+ dataUpdatedAt: u.dataUpdatedAt,
1402
+ error: C,
1403
+ errorUpdatedAt: w,
1404
+ failureCount: u.fetchFailureCount,
1405
+ failureReason: u.fetchFailureReason,
1406
+ errorUpdateCount: u.errorUpdateCount,
1407
+ isFetched: u.dataUpdateCount > 0 || u.errorUpdateCount > 0,
1408
+ isFetchedAfterMount: u.dataUpdateCount > g.dataUpdateCount || u.errorUpdateCount > g.errorUpdateCount,
1409
+ isFetching: y,
1410
+ isRefetching: y && !S,
1411
+ isLoadingError: E && u.dataUpdatedAt === 0,
1412
+ isPaused: v === "paused",
1413
+ isPlaceholderData: _,
1414
+ isRefetchError: E && u.dataUpdatedAt !== 0,
1415
+ isStale: Ht(t, s),
1416
+ refetch: this.refetch
1417
+ };
1418
+ }
1419
+ updateResult(t) {
1420
+ const s = n(this, T), r = this.createResult(n(this, P), this.options);
1421
+ if (h(this, Ce, n(this, P).state), h(this, Ue, this.options), n(this, Ce).data !== void 0 && h(this, He, n(this, P)), ht(r, s))
1422
+ return;
1423
+ h(this, T, r);
1424
+ const a = {}, o = () => {
1425
+ if (!s)
1426
+ return !0;
1427
+ const { notifyOnChangeProps: l } = this.options, c = typeof l == "function" ? l() : l;
1428
+ if (c === "all" || !c && !n(this, we).size)
1429
+ return !0;
1430
+ const f = new Set(
1431
+ c ?? n(this, we)
1432
+ );
1433
+ return this.options.throwOnError && f.add("error"), Object.keys(n(this, T)).some((g) => {
1434
+ const u = g;
1435
+ return n(this, T)[u] !== s[u] && f.has(u);
1436
+ });
1437
+ };
1438
+ (t == null ? void 0 : t.listeners) !== !1 && o() && (a.listeners = !0), x(this, Ct, js).call(this, { ...a, ...t });
1439
+ }
1440
+ onQueryUpdate() {
1441
+ this.updateResult(), this.hasListeners() && x(this, tt, Pt).call(this);
1442
+ }
1443
+ }, H = new WeakMap(), P = new WeakMap(), Te = new WeakMap(), T = new WeakMap(), Ce = new WeakMap(), Ue = new WeakMap(), te = new WeakMap(), Xe = new WeakMap(), Qe = new WeakMap(), He = new WeakMap(), xe = new WeakMap(), be = new WeakMap(), he = new WeakMap(), we = new WeakMap(), je = new WeakSet(), Ve = function(t) {
1444
+ x(this, it, Ot).call(this);
1445
+ let s = n(this, P).fetch(
1446
+ this.options,
1447
+ t
1448
+ );
1449
+ return t != null && t.throwOnError || (s = s.catch(z)), s;
1450
+ }, Ie = new WeakSet(), At = function() {
1451
+ if (x(this, st, Nt).call(this), Ke || n(this, T).isStale || !jt(this.options.staleTime))
1452
+ return;
1453
+ const s = ms(
1454
+ n(this, T).dataUpdatedAt,
1455
+ this.options.staleTime
1456
+ ) + 1;
1457
+ h(this, xe, setTimeout(() => {
1458
+ n(this, T).isStale || this.updateResult();
1459
+ }, s));
1460
+ }, Be = new WeakSet(), St = function() {
1461
+ return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(n(this, P)) : this.options.refetchInterval) ?? !1;
1462
+ }, et = new WeakSet(), kt = function(t) {
1463
+ x(this, rt, Mt).call(this), h(this, he, t), !(Ke || this.options.enabled === !1 || !jt(n(this, he)) || n(this, he) === 0) && h(this, be, setInterval(() => {
1464
+ (this.options.refetchIntervalInBackground || ft.isFocused()) && x(this, je, Ve).call(this);
1465
+ }, n(this, he)));
1466
+ }, tt = new WeakSet(), Pt = function() {
1467
+ x(this, Ie, At).call(this), x(this, et, kt).call(this, x(this, Be, St).call(this));
1468
+ }, st = new WeakSet(), Nt = function() {
1469
+ n(this, xe) && (clearTimeout(n(this, xe)), h(this, xe, void 0));
1470
+ }, rt = new WeakSet(), Mt = function() {
1471
+ n(this, be) && (clearInterval(n(this, be)), h(this, be, void 0));
1472
+ }, it = new WeakSet(), Ot = function() {
1473
+ const t = n(this, H).getQueryCache().build(n(this, H), this.options);
1474
+ if (t === n(this, P))
1475
+ return;
1476
+ const s = n(this, P);
1477
+ h(this, P, t), h(this, Te, t.state), this.hasListeners() && (s == null || s.removeObserver(this), t.addObserver(this));
1478
+ }, Ct = new WeakSet(), js = function(t) {
1479
+ F.batch(() => {
1480
+ t.listeners && this.listeners.forEach((s) => {
1481
+ s(n(this, T));
1482
+ }), n(this, H).getQueryCache().notify({
1483
+ query: n(this, P),
1484
+ type: "observerResultsUpdated"
1485
+ });
1486
+ });
1487
+ }, hs);
1488
+ function hr(e, t) {
1489
+ return t.enabled !== !1 && !e.state.dataUpdatedAt && !(e.state.status === "error" && t.retryOnMount === !1);
1490
+ }
1491
+ function Xt(e, t) {
1492
+ return hr(e, t) || e.state.dataUpdatedAt > 0 && Lt(e, t, t.refetchOnMount);
1493
+ }
1494
+ function Lt(e, t, s) {
1495
+ if (t.enabled !== !1) {
1496
+ const r = typeof s == "function" ? s(e) : s;
1497
+ return r === "always" || r !== !1 && Ht(e, t);
1498
+ }
1499
+ return !1;
1500
+ }
1501
+ function It(e, t, s, r) {
1502
+ return s.enabled !== !1 && (e !== t || r.enabled === !1) && (!s.suspense || e.state.status !== "error") && Ht(e, s);
1503
+ }
1504
+ function Ht(e, t) {
1505
+ return e.isStaleByTime(t.staleTime);
1506
+ }
1507
+ function fr(e, t) {
1508
+ return !ht(e.getCurrentResult(), t);
1509
+ }
1510
+ var fe, Q, Z, ie, $e, dt, nt, Ft, fs, pr = (fs = class extends Ge {
1511
+ constructor(t, s) {
1512
+ super();
1513
+ p(this, $e);
1514
+ p(this, nt);
1515
+ p(this, fe, void 0);
1516
+ p(this, Q, void 0);
1517
+ p(this, Z, void 0);
1518
+ p(this, ie, void 0);
1519
+ h(this, Q, void 0), h(this, fe, t), this.setOptions(s), this.bindMethods(), x(this, $e, dt).call(this);
1520
+ }
1521
+ bindMethods() {
1522
+ this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
1523
+ }
1524
+ setOptions(t) {
1525
+ var r;
1526
+ const s = this.options;
1527
+ this.options = n(this, fe).defaultMutationOptions(t), ht(s, this.options) || n(this, fe).getMutationCache().notify({
1528
+ type: "observerOptionsUpdated",
1529
+ mutation: n(this, Z),
1530
+ observer: this
1531
+ }), (r = n(this, Z)) == null || r.setOptions(this.options);
1532
+ }
1533
+ onUnsubscribe() {
1534
+ var t;
1535
+ this.hasListeners() || (t = n(this, Z)) == null || t.removeObserver(this);
1536
+ }
1537
+ onMutationUpdate(t) {
1538
+ x(this, $e, dt).call(this), x(this, nt, Ft).call(this, t);
1539
+ }
1540
+ getCurrentResult() {
1541
+ return n(this, Q);
1542
+ }
1543
+ reset() {
1544
+ h(this, Z, void 0), x(this, $e, dt).call(this), x(this, nt, Ft).call(this);
1545
+ }
1546
+ mutate(t, s) {
1547
+ var r;
1548
+ return h(this, ie, s), (r = n(this, Z)) == null || r.removeObserver(this), h(this, Z, n(this, fe).getMutationCache().build(n(this, fe), this.options)), n(this, Z).addObserver(this), n(this, Z).execute(t);
1549
+ }
1550
+ }, fe = new WeakMap(), Q = new WeakMap(), Z = new WeakMap(), ie = new WeakMap(), $e = new WeakSet(), dt = function() {
1551
+ var s;
1552
+ const t = ((s = n(this, Z)) == null ? void 0 : s.state) ?? bs();
1553
+ h(this, Q, {
1554
+ ...t,
1555
+ isPending: t.status === "pending",
1556
+ isSuccess: t.status === "success",
1557
+ isError: t.status === "error",
1558
+ isIdle: t.status === "idle",
1559
+ mutate: this.mutate,
1560
+ reset: this.reset
1561
+ });
1562
+ }, nt = new WeakSet(), Ft = function(t) {
1563
+ F.batch(() => {
1564
+ var s, r, a, o, l, c, f, g;
1565
+ n(this, ie) && this.hasListeners() && ((t == null ? void 0 : t.type) === "success" ? ((r = (s = n(this, ie)).onSuccess) == null || r.call(
1566
+ s,
1567
+ t.data,
1568
+ n(this, Q).variables,
1569
+ n(this, Q).context
1570
+ ), (o = (a = n(this, ie)).onSettled) == null || o.call(
1571
+ a,
1572
+ t.data,
1573
+ null,
1574
+ n(this, Q).variables,
1575
+ n(this, Q).context
1576
+ )) : (t == null ? void 0 : t.type) === "error" && ((c = (l = n(this, ie)).onError) == null || c.call(
1577
+ l,
1578
+ t.error,
1579
+ n(this, Q).variables,
1580
+ n(this, Q).context
1581
+ ), (g = (f = n(this, ie)).onSettled) == null || g.call(
1582
+ f,
1583
+ void 0,
1584
+ t.error,
1585
+ n(this, Q).variables,
1586
+ n(this, Q).context
1587
+ ))), this.listeners.forEach((u) => {
1588
+ u(n(this, Q));
1589
+ });
1590
+ });
1591
+ }, fs), _s = d.createContext(
1592
+ void 0
1593
+ ), Es = (e) => {
1594
+ const t = d.useContext(_s);
1595
+ if (e)
1596
+ return e;
1597
+ if (!t)
1598
+ throw new Error("No QueryClient set, use QueryClientProvider to set one");
1599
+ return t;
1600
+ }, mr = ({
1601
+ client: e,
1602
+ children: t
1603
+ }) => (d.useEffect(() => (e.mount(), () => {
1604
+ e.unmount();
1605
+ }), [e]), /* @__PURE__ */ d.createElement(_s.Provider, { value: e }, t)), As = d.createContext(!1), vr = () => d.useContext(As);
1606
+ As.Provider;
1607
+ function gr() {
1608
+ let e = !1;
1609
+ return {
1610
+ clearReset: () => {
1611
+ e = !1;
1612
+ },
1613
+ reset: () => {
1614
+ e = !0;
1615
+ },
1616
+ isReset: () => e
1617
+ };
1618
+ }
1619
+ var yr = d.createContext(gr()), Cr = () => d.useContext(yr);
1620
+ function Ss(e, t) {
1621
+ return typeof e == "function" ? e(...t) : !!e;
1622
+ }
1623
+ var xr = (e, t) => {
1624
+ (e.suspense || e.throwOnError) && (t.isReset() || (e.retryOnMount = !1));
1625
+ }, br = (e) => {
1626
+ d.useEffect(() => {
1627
+ e.clearReset();
1628
+ }, [e]);
1629
+ }, wr = ({
1630
+ result: e,
1631
+ errorResetBoundary: t,
1632
+ throwOnError: s,
1633
+ query: r
1634
+ }) => e.isError && !t.isReset() && !e.isFetching && Ss(s, [e.error, r]), jr = (e) => {
1635
+ e.suspense && typeof e.staleTime != "number" && (e.staleTime = 1e3);
1636
+ }, _r = (e, t) => (e == null ? void 0 : e.suspense) && t.isPending, Er = (e, t, s) => t.fetchOptimistic(e).catch(() => {
1637
+ s.clearReset();
1638
+ });
1639
+ function Ar(e, t, s) {
1640
+ const r = Es(s), a = vr(), o = Cr(), l = r.defaultQueryOptions(e);
1641
+ l._optimisticResults = a ? "isRestoring" : "optimistic", jr(l), xr(l, o), br(o);
1642
+ const [c] = d.useState(
1643
+ () => new t(
1644
+ r,
1645
+ l
1646
+ )
1647
+ ), f = c.getOptimisticResult(l);
1648
+ if (d.useSyncExternalStore(
1649
+ d.useCallback(
1650
+ (g) => {
1651
+ const u = a ? () => {
1652
+ } : c.subscribe(F.batchCalls(g));
1653
+ return c.updateResult(), u;
1654
+ },
1655
+ [c, a]
1656
+ ),
1657
+ () => c.getCurrentResult(),
1658
+ () => c.getCurrentResult()
1659
+ ), d.useEffect(() => {
1660
+ c.setOptions(l, { listeners: !1 });
1661
+ }, [l, c]), _r(l, f))
1662
+ throw c.setOptions(l, { listeners: !1 }), Er(l, c, o);
1663
+ if (wr({
1664
+ result: f,
1665
+ errorResetBoundary: o,
1666
+ throwOnError: l.throwOnError,
1667
+ query: c.getCurrentQuery()
1668
+ }))
1669
+ throw f.error;
1670
+ return l.notifyOnChangeProps ? f : c.trackResult(f);
1671
+ }
1672
+ function ks(e, t) {
1673
+ return Ar(e, dr, t);
1674
+ }
1675
+ function Sr(e, t) {
1676
+ const s = Es(t), [r] = d.useState(
1677
+ () => new pr(
1678
+ s,
1679
+ e
1680
+ )
1681
+ );
1682
+ d.useEffect(() => {
1683
+ r.setOptions(e);
1684
+ }, [r, e]);
1685
+ const a = d.useSyncExternalStore(
1686
+ d.useCallback(
1687
+ (l) => r.subscribe(F.batchCalls(l)),
1688
+ [r]
1689
+ ),
1690
+ () => r.getCurrentResult(),
1691
+ () => r.getCurrentResult()
1692
+ ), o = d.useCallback(
1693
+ (l, c) => {
1694
+ r.mutate(l, c).catch(kr);
1695
+ },
1696
+ [r]
1697
+ );
1698
+ if (a.error && Ss(r.options.throwOnError, [a.error]))
1699
+ throw a.error;
1700
+ return { ...a, mutate: o, mutateAsync: a.mutate };
1701
+ }
1702
+ function kr() {
1703
+ }
1704
+ function Ps(e) {
1705
+ var t, s, r = "";
1706
+ if (typeof e == "string" || typeof e == "number")
1707
+ r += e;
1708
+ else if (typeof e == "object")
1709
+ if (Array.isArray(e))
1710
+ for (t = 0; t < e.length; t++)
1711
+ e[t] && (s = Ps(e[t])) && (r && (r += " "), r += s);
1712
+ else
1713
+ for (t in e)
1714
+ e[t] && (r && (r += " "), r += t);
1715
+ return r;
1716
+ }
1717
+ function N() {
1718
+ for (var e, t, s = 0, r = ""; s < arguments.length; )
1719
+ (e = arguments[s++]) && (t = Ps(e)) && (r && (r += " "), r += t);
1720
+ return r;
1721
+ }
1722
+ var Pr = Object.defineProperty, Nr = Object.defineProperties, Mr = Object.getOwnPropertyDescriptors, mt = Object.getOwnPropertySymbols, Ns = Object.prototype.hasOwnProperty, Ms = Object.prototype.propertyIsEnumerable, Bt = (e, t, s) => t in e ? Pr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, j = (e, t) => {
1723
+ for (var s in t || (t = {}))
1724
+ Ns.call(t, s) && Bt(e, s, t[s]);
1725
+ if (mt)
1726
+ for (var s of mt(t))
1727
+ Ms.call(t, s) && Bt(e, s, t[s]);
1728
+ return e;
1729
+ }, A = (e, t) => Nr(e, Mr(t)), O = (e, t) => {
1730
+ var s = {};
1731
+ for (var r in e)
1732
+ Ns.call(e, r) && t.indexOf(r) < 0 && (s[r] = e[r]);
1733
+ if (e != null && mt)
1734
+ for (var r of mt(e))
1735
+ t.indexOf(r) < 0 && Ms.call(e, r) && (s[r] = e[r]);
1736
+ return s;
1737
+ };
1738
+ function vt() {
1739
+ return vt = Object.assign ? Object.assign.bind() : function(e) {
1740
+ for (var t = 1; t < arguments.length; t++) {
1741
+ var s = arguments[t];
1742
+ for (var r in s)
1743
+ Object.prototype.hasOwnProperty.call(s, r) && (e[r] = s[r]);
1744
+ }
1745
+ return e;
1746
+ }, vt.apply(this, arguments);
1747
+ }
1748
+ function Or(e, t) {
1749
+ typeof e == "function" ? e(t) : e != null && (e.current = t);
1750
+ }
1751
+ function Lr(...e) {
1752
+ return (t) => e.forEach(
1753
+ (s) => Or(s, t)
1754
+ );
1755
+ }
1756
+ var Fr = /* @__PURE__ */ d.forwardRef((e, t) => {
1757
+ const s = e, { children: r } = s, a = O(s, ["children"]), o = d.Children.toArray(r), l = o.find(Dr);
1758
+ if (l) {
1759
+ const c = l.props.children, f = o.map((g) => g === l ? d.Children.count(c) > 1 ? d.Children.only(null) : /* @__PURE__ */ d.isValidElement(c) ? c.props.children : null : g);
1760
+ return /* @__PURE__ */ d.createElement(Rt, vt({}, a, {
1761
+ ref: t
1762
+ }), /* @__PURE__ */ d.isValidElement(c) ? /* @__PURE__ */ d.cloneElement(c, void 0, f) : null);
1763
+ }
1764
+ return /* @__PURE__ */ d.createElement(Rt, vt({}, a, {
1765
+ ref: t
1766
+ }), r);
1767
+ });
1768
+ Fr.displayName = "Slot";
1769
+ var Rt = /* @__PURE__ */ d.forwardRef((e, t) => {
1770
+ const s = e, { children: r } = s, a = O(s, ["children"]);
1771
+ return /* @__PURE__ */ d.isValidElement(r) ? /* @__PURE__ */ d.cloneElement(r, A(j({}, Tr(a, r.props)), {
1772
+ ref: t ? Lr(t, r.ref) : r.ref
1773
+ })) : d.Children.count(r) > 1 ? d.Children.only(null) : null;
1774
+ });
1775
+ Rt.displayName = "SlotClone";
1776
+ var Rr = ({ children: e }) => /* @__PURE__ */ d.createElement(d.Fragment, null, e);
1777
+ function Dr(e) {
1778
+ return /* @__PURE__ */ d.isValidElement(e) && e.type === Rr;
1779
+ }
1780
+ function Tr(e, t) {
1781
+ const s = j({}, t);
1782
+ for (const r in t) {
1783
+ const a = e[r], o = t[r];
1784
+ /^on[A-Z]/.test(r) ? a && o ? s[r] = (...c) => {
1785
+ o(...c), a(...c);
1786
+ } : a && (s[r] = a) : r === "style" ? s[r] = j(j({}, a), o) : r === "className" && (s[r] = [
1787
+ a,
1788
+ o
1789
+ ].filter(Boolean).join(" "));
1790
+ }
1791
+ return j(j({}, e), s);
1792
+ }
1793
+ var Ur = ({ firstName: e, lastName: t, variant: s = "small" }) => {
1794
+ const r = `${e.charAt(0)}${t.charAt(0)}`;
1795
+ return /* @__PURE__ */ i.jsx(
1796
+ "span",
1797
+ {
1798
+ className: `avatar avatar--${s}`,
1799
+ "aria-label": `${e} ${t}`,
1800
+ role: "img",
1801
+ children: /* @__PURE__ */ i.jsx("span", { className: "avatar__initials", children: r })
1802
+ }
1803
+ );
1804
+ }, at = d.forwardRef(
1805
+ (e, t) => {
1806
+ var s = e, {
1807
+ iconLeft: r,
1808
+ iconRight: a,
1809
+ isPending: o = !1,
1810
+ isFilled: l = !1,
1811
+ variant: c,
1812
+ className: f,
1813
+ children: g
1814
+ } = s, u = O(s, [
1815
+ "iconLeft",
1816
+ "iconRight",
1817
+ "isPending",
1818
+ "isFilled",
1819
+ "variant",
1820
+ "className",
1821
+ "children"
1822
+ ]);
1823
+ const C = !!r || !!a;
1824
+ return /* @__PURE__ */ i.jsxs(
1825
+ "button",
1826
+ A(j({
1827
+ ref: t
1828
+ }, u), {
1829
+ className: N(
1830
+ "button",
1831
+ c && `button--${c}`,
1832
+ c && l && `button--${c}--filled`,
1833
+ C && "button--with-icon",
1834
+ o && "button--pending",
1835
+ f
1836
+ ),
1837
+ children: [
1838
+ r && /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: r }),
1839
+ !!g && /* @__PURE__ */ i.jsx("span", { className: "button__label", children: g }),
1840
+ a && /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: a })
1841
+ ]
1842
+ })
1843
+ );
1844
+ }
1845
+ );
1846
+ at.displayName = "Button";
1847
+ d.createContext(void 0);
1848
+ var Qr = d.forwardRef(
1849
+ (e, t) => {
1850
+ var s = e, { prefix: r, suffix: a, className: o } = s, l = O(s, ["prefix", "suffix", "className"]);
1851
+ return /* @__PURE__ */ i.jsxs("div", { className: "input__wrapper", children: [
1852
+ r && /* @__PURE__ */ i.jsx("span", { className: "input__prefix", children: r }),
1853
+ /* @__PURE__ */ i.jsx(
1854
+ "input",
1855
+ j({
1856
+ ref: t,
1857
+ className: N(
1858
+ "input",
1859
+ r && "input--with-prefix",
1860
+ a && "input--with-suffix",
1861
+ o
1862
+ )
1863
+ }, l)
1864
+ ),
1865
+ a && /* @__PURE__ */ i.jsx("span", { className: "input__suffix", children: a })
1866
+ ] });
1867
+ }
1868
+ );
1869
+ Qr.displayName = "TextField";
1870
+ d.createContext(void 0);
1871
+ var Hr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__header__action", children: e }), $r = (e) => {
1872
+ var t = e, { children: s, className: r } = t, a = O(t, ["children", "className"]);
1873
+ return /* @__PURE__ */ i.jsx("div", A(j({ className: N("card__body", r) }, a), { children: s }));
1874
+ }, Kr = (e) => /* @__PURE__ */ i.jsx(
1875
+ "svg",
1876
+ A(j({
1877
+ width: "24",
1878
+ height: "24",
1879
+ viewBox: "0 0 24 24",
1880
+ fill: "none",
1881
+ xmlns: "http://www.w3.org/2000/svg"
1882
+ }, e), {
1883
+ children: /* @__PURE__ */ i.jsx(
1884
+ "path",
1885
+ {
1886
+ d: "M8 10L12 14L16 10",
1887
+ stroke: "currentColor",
1888
+ strokeWidth: "1.5",
1889
+ strokeLinecap: "round",
1890
+ strokeLinejoin: "round"
1891
+ }
1892
+ )
1893
+ })
1894
+ ), $t = Kr, Gr = (e) => /* @__PURE__ */ i.jsx(
1895
+ "svg",
1896
+ A(j({
1897
+ width: "24",
1898
+ height: "24",
1899
+ viewBox: "0 0 24 24",
1900
+ fill: "none",
1901
+ xmlns: "http://www.w3.org/2000/svg"
1902
+ }, e), {
1903
+ children: /* @__PURE__ */ i.jsx(
1904
+ "path",
1905
+ {
1906
+ d: "M20 6.5L9 17.5L4 12.5",
1907
+ stroke: "currentColor",
1908
+ strokeWidth: "1.5",
1909
+ strokeLinecap: "round",
1910
+ strokeLinejoin: "round"
1911
+ }
1912
+ )
1913
+ })
1914
+ ), qr = Gr, Vr = (e) => /* @__PURE__ */ i.jsx(
1915
+ "svg",
1916
+ A(j({
1917
+ width: "24",
1918
+ height: "24",
1919
+ viewBox: "0 0 24 24",
1920
+ fill: "none",
1921
+ xmlns: "http://www.w3.org/2000/svg"
1922
+ }, e), {
1923
+ children: /* @__PURE__ */ i.jsx(
1924
+ "path",
1925
+ {
1926
+ fillRule: "evenodd",
1927
+ clipRule: "evenodd",
1928
+ fill: "currentColor",
1929
+ d: "M5.53033 4.46967C5.23744 4.17678 4.76256 4.17678 4.46967 4.46967C4.17678 4.76256 4.17678 5.23744 4.46967 5.53033L10.9393 12L4.46967 18.4697C4.17678 18.7626 4.17678 19.2374 4.46967 19.5303C4.76256 19.8232 5.23744 19.8232 5.53033 19.5303L12 13.0607L18.4697 19.5303C18.7626 19.8232 19.2374 19.8232 19.5303 19.5303C19.8232 19.2374 19.8232 18.7626 19.5303 18.4697L13.0607 12L19.5303 5.53033C19.8232 5.23744 19.8232 4.76256 19.5303 4.46967C19.2374 4.17678 18.7626 4.17678 18.4697 4.46967L12 10.9393L5.53033 4.46967Z"
1930
+ }
1931
+ )
1932
+ })
1933
+ ), Wr = Vr, Zr = (e) => /* @__PURE__ */ i.jsx(
1934
+ "svg",
1935
+ A(j({
1936
+ width: "24",
1937
+ height: "24",
1938
+ viewBox: "0 0 24 24",
1939
+ fill: "none",
1940
+ xmlns: "http://www.w3.org/2000/svg"
1941
+ }, e), {
1942
+ children: /* @__PURE__ */ i.jsx(
1943
+ "path",
1944
+ {
1945
+ fillRule: "evenodd",
1946
+ clipRule: "evenodd",
1947
+ d: "M10.25 2.25C9.83579 2.25 9.5 2.58579 9.5 3C9.5 3.41421 9.83579 3.75 10.25 3.75H15.25C16.112 3.75 16.9386 4.09241 17.5481 4.7019C18.1576 5.3114 18.5 6.13805 18.5 7V17C18.5 17.862 18.1576 18.6886 17.5481 19.2981C16.9386 19.9076 16.112 20.25 15.25 20.25H10.25C9.83579 20.25 9.5 20.5858 9.5 21C9.5 21.4142 9.83579 21.75 10.25 21.75H15.25C16.5098 21.75 17.718 21.2496 18.6088 20.3588C19.4996 19.468 20 18.2598 20 17V7C20 5.74022 19.4996 4.53204 18.6088 3.64124C17.718 2.75044 16.5098 2.25 15.25 2.25H10.25ZM9.71967 9.53033C9.42678 9.23744 9.42678 8.76256 9.71967 8.46967C10.0126 8.17678 10.4874 8.17678 10.7803 8.46967L13.7803 11.4697C14.0732 11.7626 14.0732 12.2374 13.7803 12.5303L10.7803 15.5303C10.4874 15.8232 10.0126 15.8232 9.71967 15.5303C9.42678 15.2374 9.42678 14.7626 9.71967 14.4697L11.4393 12.75L4.25 12.75C3.83579 12.75 3.5 12.4142 3.5 12C3.5 11.5858 3.83579 11.25 4.25 11.25L11.4393 11.25L9.71967 9.53033Z",
1948
+ fill: "#323232"
1949
+ }
1950
+ )
1951
+ })
1952
+ ), zr = Zr, Yr = (e) => /* @__PURE__ */ i.jsx(
1953
+ "svg",
1954
+ A(j({
1955
+ width: "24",
1956
+ height: "24",
1957
+ viewBox: "0 0 24 24",
1958
+ fill: "none",
1959
+ xmlns: "http://www.w3.org/2000/svg"
1960
+ }, e), {
1961
+ children: /* @__PURE__ */ i.jsx(
1962
+ "path",
1963
+ {
1964
+ fillRule: "evenodd",
1965
+ clipRule: "evenodd",
1966
+ d: "M13.25 2.25C13.6642 2.25 14 2.58579 14 3C14 3.41421 13.6642 3.75 13.25 3.75H8.25C7.38805 3.75 6.5614 4.09241 5.9519 4.7019C5.34241 5.3114 5 6.13805 5 7V17C5 17.862 5.34241 18.6886 5.9519 19.2981C6.5614 19.9076 7.38805 20.25 8.25 20.25H13.25C13.6642 20.25 14 20.5858 14 21C14 21.4142 13.6642 21.75 13.25 21.75H8.25C6.99022 21.75 5.78204 21.2496 4.89124 20.3588C4.00045 19.468 3.5 18.2598 3.5 17V7C3.5 5.74022 4.00045 4.53204 4.89124 3.64124C5.78204 2.75044 6.99022 2.25 8.25 2.25H13.25ZM15.7197 8.46967C16.0126 8.17678 16.4874 8.17678 16.7803 8.46967L19.7803 11.4697C20.0732 11.7626 20.0732 12.2374 19.7803 12.5303L16.7803 15.5303C16.4874 15.8232 16.0126 15.8232 15.7197 15.5303C15.4268 15.2374 15.4268 14.7626 15.7197 14.4697L17.4393 12.75L10.25 12.75C9.83579 12.75 9.5 12.4142 9.5 12C9.5 11.5858 9.83579 11.25 10.25 11.25L17.4393 11.25L15.7197 9.53033C15.4268 9.23744 15.4268 8.76256 15.7197 8.46967Z",
1967
+ fill: "currentColor"
1968
+ }
1969
+ )
1970
+ })
1971
+ ), Jr = Yr, Xr = (e) => /* @__PURE__ */ i.jsxs(
1972
+ "svg",
1973
+ A(j({
1974
+ width: "24",
1975
+ height: "24",
1976
+ fill: "none",
1977
+ viewBox: "0 0 24 24",
1978
+ xmlns: "http://www.w3.org/2000/svg"
1979
+ }, e), {
1980
+ children: [
1981
+ /* @__PURE__ */ i.jsxs("g", { clipPath: "url(#clip0_19_444)", children: [
1982
+ /* @__PURE__ */ i.jsx(
1983
+ "path",
1984
+ {
1985
+ d: "M17 21H7V21C5.89543 21 5 20.1046 5 19V12V12C5 10.8954 5.89543 10 7 10H17V10C18.1046 10 19 10.8954 19 12V19V19C19 20.1046 18.1046 21 17 21C17 21 17 21 17 21V21Z",
1986
+ stroke: "currentColor",
1987
+ strokeWidth: "1.5",
1988
+ strokeLinecap: "round",
1989
+ strokeLinejoin: "round"
1990
+ }
1991
+ ),
1992
+ /* @__PURE__ */ i.jsx("circle", { cx: "10.3", cy: "15.5", r: "0.8", fill: "currentColor" }),
1993
+ /* @__PURE__ */ i.jsx("circle", { cx: "13.7", cy: "15.5", r: "0.8", fill: "currentColor" }),
1994
+ /* @__PURE__ */ i.jsx(
1995
+ "path",
1996
+ {
1997
+ d: "M8 10V7V7C8 4.79086 9.79086 3 12 3V3C14.2091 3 16 4.79086 16 7V10",
1998
+ stroke: "currentColor",
1999
+ strokeWidth: "1.5",
2000
+ strokeLinecap: "round",
2001
+ strokeLinejoin: "round"
2002
+ }
2003
+ )
2004
+ ] }),
2005
+ /* @__PURE__ */ i.jsx("defs", { children: /* @__PURE__ */ i.jsx("clipPath", { id: "clip0_19_444", children: /* @__PURE__ */ i.jsx("rect", { width: "24", height: "24", fill: "white" }) }) })
2006
+ ]
2007
+ })
2008
+ ), Ir = Xr, Br = (e) => /* @__PURE__ */ i.jsxs(
2009
+ "svg",
2010
+ A(j({
2011
+ width: "24",
2012
+ height: "24",
2013
+ viewBox: "0 0 24 24",
2014
+ fill: "none",
2015
+ xmlns: "http://www.w3.org/2000/svg"
2016
+ }, e), {
2017
+ children: [
2018
+ /* @__PURE__ */ i.jsx(
2019
+ "path",
2020
+ {
2021
+ d: "M14.4749 4.52513C15.8418 5.89197 15.8418 8.10804 14.4749 9.47488C13.1081 10.8417 10.892 10.8417 9.52516 9.47488C8.15832 8.10804 8.15832 5.89197 9.52516 4.52513C10.892 3.15829 13.1081 3.15829 14.4749 4.52513",
2022
+ stroke: "currentColor",
2023
+ strokeWidth: "1.5",
2024
+ strokeLinecap: "round",
2025
+ strokeLinejoin: "round"
2026
+ }
2027
+ ),
2028
+ /* @__PURE__ */ i.jsx(
2029
+ "path",
2030
+ {
2031
+ d: "M4 18.5V19.5C4 20.052 4.448 20.5 5 20.5H19C19.552 20.5 20 20.052 20 19.5V18.5C20 15.474 16.048 13.508 12 13.508C7.952 13.508 4 15.474 4 18.5Z",
2032
+ stroke: "currentColor",
2033
+ strokeWidth: "1.5",
2034
+ strokeLinecap: "round",
2035
+ strokeLinejoin: "round"
2036
+ }
2037
+ )
2038
+ ]
2039
+ })
2040
+ ), ei = Br, ti = (e) => /* @__PURE__ */ i.jsxs(
2041
+ "svg",
2042
+ A(j({
2043
+ width: "24",
2044
+ height: "24",
2045
+ viewBox: "0 0 24 24",
2046
+ fill: "none",
2047
+ xmlns: "http://www.w3.org/2000/svg"
2048
+ }, e), {
2049
+ children: [
2050
+ /* @__PURE__ */ i.jsx(
2051
+ "path",
2052
+ {
2053
+ d: "M14.4749 4.52513C15.8418 5.89197 15.8418 8.10804 14.4749 9.47488C13.1081 10.8417 10.892 10.8417 9.52516 9.47488C8.15832 8.10804 8.15832 5.89197 9.52516 4.52513C10.892 3.15829 13.1081 3.15829 14.4749 4.52513",
2054
+ stroke: "currentColor",
2055
+ strokeWidth: "1.5",
2056
+ strokeLinecap: "round",
2057
+ strokeLinejoin: "round"
2058
+ }
2059
+ ),
2060
+ /* @__PURE__ */ i.jsx(
2061
+ "path",
2062
+ {
2063
+ d: "M13.5 20.5H10H5C4.448 20.5 4 20.052 4 19.5V18.5C4 15.9788 6.7434 14.1935 10 13.6679C10.6521 13.5627 11.3247 13.508 12 13.508C13.0272 13.508 14.0482 13.6346 15 13.873",
2064
+ stroke: "currentColor",
2065
+ strokeWidth: "1.5",
2066
+ strokeLinecap: "round",
2067
+ strokeLinejoin: "round"
2068
+ }
2069
+ ),
2070
+ /* @__PURE__ */ i.jsx(
2071
+ "path",
2072
+ {
2073
+ d: "M17.5 16V18.0164V20",
2074
+ stroke: "currentColor",
2075
+ strokeWidth: "1.5",
2076
+ strokeLinecap: "round",
2077
+ strokeLinejoin: "round"
2078
+ }
2079
+ ),
2080
+ /* @__PURE__ */ i.jsx(
2081
+ "path",
2082
+ {
2083
+ d: "M19.5 18L17.4836 18L15.5 18",
2084
+ stroke: "currentColor",
2085
+ strokeWidth: "1.5",
2086
+ strokeLinecap: "round",
2087
+ strokeLinejoin: "round"
2088
+ }
2089
+ )
2090
+ ]
2091
+ })
2092
+ ), si = ti, ri = (e) => /* @__PURE__ */ i.jsxs(
2093
+ "svg",
2094
+ A(j({
2095
+ width: "20",
2096
+ height: "21",
2097
+ fill: "none",
2098
+ viewBox: "0 0 20 21",
2099
+ xmlns: "http://www.w3.org/2000/svg"
2100
+ }, e), {
2101
+ children: [
2102
+ /* @__PURE__ */ i.jsx("circle", { cx: "10", cy: "10.0996", r: "7.5", stroke: "#00ab9e", strokeWidth: "1.25" }),
2103
+ /* @__PURE__ */ i.jsx(
2104
+ "circle",
2105
+ {
2106
+ cx: "10",
2107
+ cy: "10.0996",
2108
+ r: "7.5",
2109
+ stroke: "white",
2110
+ strokeDasharray: "15 30",
2111
+ strokeWidth: "1.25"
2112
+ }
2113
+ )
2114
+ ]
2115
+ })
2116
+ ), ii = ri, ni = (e) => /* @__PURE__ */ i.jsxs(
2117
+ "svg",
2118
+ A(j({
2119
+ width: "24",
2120
+ height: "24",
2121
+ fill: "none",
2122
+ viewBox: "0 0 24 24",
2123
+ xmlns: "http://www.w3.org/2000/svg"
2124
+ }, e), {
2125
+ children: [
2126
+ /* @__PURE__ */ i.jsxs("g", { clipPath: "url(#clip0_762_2934)", children: [
2127
+ /* @__PURE__ */ i.jsx(
2128
+ "path",
2129
+ {
2130
+ fillRule: "evenodd",
2131
+ clipRule: "evenodd",
2132
+ d: "M12.75 8.39996C12.75 7.98575 12.4142 7.64996 12 7.64996C11.5858 7.64996 11.25 7.98575 11.25 8.39996V11.669C11.25 12.0832 11.5858 12.419 12 12.419C12.4142 12.419 12.75 12.0832 12.75 11.669V8.39996ZM12.005 16.35C12.5159 16.35 12.93 15.9359 12.93 15.425C12.93 14.9141 12.5159 14.5 12.005 14.5C11.4942 14.5 11.08 14.9141 11.08 15.425C11.08 15.9359 11.4942 16.35 12.005 16.35Z",
2133
+ fill: "currentColor"
2134
+ }
2135
+ ),
2136
+ /* @__PURE__ */ i.jsx(
2137
+ "path",
2138
+ {
2139
+ d: "M12 21C7.029 21 3 16.971 3 12C3 7.029 7.029 3 12 3C16.971 3 21 7.029 21 12C21 16.971 16.971 21 12 21Z",
2140
+ stroke: "currentColor",
2141
+ strokeWidth: "1.5",
2142
+ strokeLinecap: "round",
2143
+ strokeLinejoin: "round"
2144
+ }
2145
+ )
2146
+ ] }),
2147
+ /* @__PURE__ */ i.jsx("defs", { children: /* @__PURE__ */ i.jsx("clipPath", { id: "clip0_762_2934", children: /* @__PURE__ */ i.jsx("rect", { width: "24", height: "24", fill: "white" }) }) })
2148
+ ]
2149
+ })
2150
+ ), ai = ni, oi = (e) => {
2151
+ const t = (s) => `${s}${e.suffix ? `_${e.suffix}` : ""}`;
2152
+ return /* @__PURE__ */ i.jsxs(
2153
+ "svg",
2154
+ A(j({
2155
+ width: "24",
2156
+ height: "24",
2157
+ viewBox: "0 0 24 24",
2158
+ fill: "none",
2159
+ xmlns: "http://www.w3.org/2000/svg"
2160
+ }, e), {
2161
+ children: [
2162
+ /* @__PURE__ */ i.jsx(
2163
+ "path",
2164
+ {
2165
+ d: "M17.6214 11.1549C20.4161 8.33951 21.712 5.41047 20.6067 3.876C19.1586 1.85988 14.1278 2.98841 9.3766 6.39936C8.31103 7.15864 7.31229 8.00725 6.39122 8.93598L17.6214 11.1549Z",
2166
+ fill: t("url(#paint0")
2167
+ }
2168
+ ),
2169
+ /* @__PURE__ */ i.jsx(
2170
+ "path",
2171
+ {
2172
+ opacity: "0.9",
2173
+ d: "M17.6214 11.1548C17.1178 9.955 16.5189 8.79735 15.8301 7.693C12.6925 2.58286 8.41126 -0.498612 6.30132 0.794902C4.66377 1.79657 4.80319 5.119 6.39145 8.93562L17.6214 11.1548Z",
2174
+ fill: t("url(#paint1")
2175
+ }
2176
+ ),
2177
+ /* @__PURE__ */ i.jsx(
2178
+ "path",
2179
+ {
2180
+ d: "M6.39122 8.93591C6.89474 10.1357 7.49373 11.2934 8.18245 12.3977C11.3329 17.5079 15.6006 20.5894 17.7229 19.2958C19.3616 18.2942 19.221 14.9718 17.6339 11.1549L6.39122 8.93591Z",
2181
+ fill: t("url(#paint2")
2182
+ }
2183
+ ),
2184
+ /* @__PURE__ */ i.jsx(
2185
+ "path",
2186
+ {
2187
+ opacity: "0.85",
2188
+ d: "M6.39113 8.93591C3.5836 11.7637 2.28796 14.6927 3.39319 16.2272C4.8413 18.2433 9.87186 17.1147 14.6224 13.7038C15.6888 12.9404 16.6916 12.0922 17.6213 11.1677L6.39113 8.93591Z",
2189
+ fill: t("url(#paint3")
2190
+ }
2191
+ ),
2192
+ /* @__PURE__ */ i.jsx(
2193
+ "path",
2194
+ {
2195
+ opacity: "0.87",
2196
+ d: "M6.39113 8.93591C3.5836 11.7509 2.28796 14.6801 3.39319 16.2272C4.8413 18.2433 9.87186 17.1147 14.6224 13.7038C15.6888 12.9404 16.6916 12.0922 17.6213 11.1677L6.39113 8.93591Z",
2197
+ fill: t("url(#paint4")
2198
+ }
2199
+ ),
2200
+ /* @__PURE__ */ i.jsx(
2201
+ "path",
2202
+ {
2203
+ d: "M12.0064 23.2897C16.2652 23.2897 19.7177 22.9093 19.7177 22.4402C19.7177 21.971 16.2652 21.5907 12.0064 21.5907C7.74761 21.5907 4.29517 21.971 4.29517 22.4402C4.29517 22.9093 7.74761 23.2897 12.0064 23.2897Z",
2204
+ fill: t("url(#paint5")
2205
+ }
2206
+ ),
2207
+ /* @__PURE__ */ i.jsxs("defs", { children: [
2208
+ /* @__PURE__ */ i.jsxs(
2209
+ "linearGradient",
2210
+ {
2211
+ id: t("paint0"),
2212
+ x1: "10.6862",
2213
+ y1: "11.0225",
2214
+ x2: "14.9751",
2215
+ y2: "0.707188",
2216
+ gradientUnits: "userSpaceOnUse",
2217
+ children: [
2218
+ /* @__PURE__ */ i.jsx("stop", { offset: "0.413", stopColor: "#90B117" }),
2219
+ /* @__PURE__ */ i.jsx("stop", { offset: "0.501", stopColor: "#8BAF19" }),
2220
+ /* @__PURE__ */ i.jsx("stop", { offset: "0.601", stopColor: "#7DAB1E" }),
2221
+ /* @__PURE__ */ i.jsx("stop", { offset: "0.706", stopColor: "#67A325" }),
2222
+ /* @__PURE__ */ i.jsx("stop", { offset: "0.815", stopColor: "#479830" }),
2223
+ /* @__PURE__ */ i.jsx("stop", { offset: "0.925", stopColor: "#1F8A3E" }),
2224
+ /* @__PURE__ */ i.jsx("stop", { offset: "1", stopColor: "#007F48" })
2225
+ ]
2226
+ }
2227
+ ),
2228
+ /* @__PURE__ */ i.jsxs(
2229
+ "linearGradient",
2230
+ {
2231
+ id: t("paint1"),
2232
+ x1: "11.5281",
2233
+ y1: "8.85339",
2234
+ x2: "12.4519",
2235
+ y2: "1.60772",
2236
+ gradientUnits: "userSpaceOnUse",
2237
+ children: [
2238
+ /* @__PURE__ */ i.jsx("stop", { stopColor: "#36BCEE" }),
2239
+ /* @__PURE__ */ i.jsx("stop", { offset: "0.201", stopColor: "#31ACE3" }),
2240
+ /* @__PURE__ */ i.jsx("stop", { offset: "0.59", stopColor: "#2583C5" }),
2241
+ /* @__PURE__ */ i.jsx("stop", { offset: "1", stopColor: "#1652A1" })
2242
+ ]
2243
+ }
2244
+ ),
2245
+ /* @__PURE__ */ i.jsxs(
2246
+ "linearGradient",
2247
+ {
2248
+ id: t("paint2"),
2249
+ x1: "15.0651",
2250
+ y1: "18.7384",
2251
+ x2: "12.9747",
2252
+ y2: "8.0336",
2253
+ gradientUnits: "userSpaceOnUse",
2254
+ children: [
2255
+ /* @__PURE__ */ i.jsx("stop", { stopColor: "#E42313" }),
2256
+ /* @__PURE__ */ i.jsx("stop", { offset: "0.071", stopColor: "#E73611" }),
2257
+ /* @__PURE__ */ i.jsx("stop", { offset: "0.312", stopColor: "#F0710B" }),
2258
+ /* @__PURE__ */ i.jsx("stop", { offset: "0.534", stopColor: "#F6A006" }),
2259
+ /* @__PURE__ */ i.jsx("stop", { offset: "0.73", stopColor: "#FBC103" }),
2260
+ /* @__PURE__ */ i.jsx("stop", { offset: "0.891", stopColor: "#FED601" }),
2261
+ /* @__PURE__ */ i.jsx("stop", { offset: "0.999", stopColor: "#FFDD00" })
2262
+ ]
2263
+ }
2264
+ ),
2265
+ /* @__PURE__ */ i.jsxs(
2266
+ "linearGradient",
2267
+ {
2268
+ id: t("paint3"),
2269
+ x1: "13.9806",
2270
+ y1: "8.29749",
2271
+ x2: "10.8203",
2272
+ y2: "18.1127",
2273
+ gradientUnits: "userSpaceOnUse",
2274
+ children: [
2275
+ /* @__PURE__ */ i.jsx("stop", { stopColor: "#FFC832" }),
2276
+ /* @__PURE__ */ i.jsx("stop", { offset: "0.354", stopColor: "#F8A220" }),
2277
+ /* @__PURE__ */ i.jsx("stop", { offset: "0.779", stopColor: "#F07A0D" }),
2278
+ /* @__PURE__ */ i.jsx("stop", { offset: "1", stopColor: "#ED6B06" })
2279
+ ]
2280
+ }
2281
+ ),
2282
+ /* @__PURE__ */ i.jsxs(
2283
+ "linearGradient",
2284
+ {
2285
+ id: t("paint4"),
2286
+ x1: "13.9806",
2287
+ y1: "8.2892",
2288
+ x2: "10.8212",
2289
+ y2: "18.1113",
2290
+ gradientUnits: "userSpaceOnUse",
2291
+ children: [
2292
+ /* @__PURE__ */ i.jsx("stop", { offset: "0.461", stopColor: "#F3C636", stopOpacity: "0" }),
2293
+ /* @__PURE__ */ i.jsx("stop", { offset: "0.645", stopColor: "#F1A223", stopOpacity: "0.341" }),
2294
+ /* @__PURE__ */ i.jsx("stop", { offset: "0.879", stopColor: "#EE7A0E", stopOpacity: "0.776" }),
2295
+ /* @__PURE__ */ i.jsx("stop", { offset: "1", stopColor: "#ED6B06" })
2296
+ ]
2297
+ }
2298
+ ),
2299
+ /* @__PURE__ */ i.jsxs(
2300
+ "radialGradient",
2301
+ {
2302
+ id: t("paint5"),
2303
+ cx: "0",
2304
+ cy: "0",
2305
+ r: "1",
2306
+ gradientUnits: "userSpaceOnUse",
2307
+ gradientTransform: "translate(11.9404 22.4736) scale(7.73227 0.851796)",
2308
+ children: [
2309
+ /* @__PURE__ */ i.jsx("stop", { stopColor: "#C9C9C9" }),
2310
+ /* @__PURE__ */ i.jsx("stop", { offset: "0.302", stopColor: "#CCCCCC", stopOpacity: "0.698" }),
2311
+ /* @__PURE__ */ i.jsx("stop", { offset: "0.554", stopColor: "#D7D7D7", stopOpacity: "0.447" }),
2312
+ /* @__PURE__ */ i.jsx("stop", { offset: "0.787", stopColor: "#E8E8E8", stopOpacity: "0.212" }),
2313
+ /* @__PURE__ */ i.jsx("stop", { offset: "1", stopColor: "white", stopOpacity: "0" })
2314
+ ]
2315
+ }
2316
+ )
2317
+ ] })
2318
+ ]
2319
+ })
2320
+ );
2321
+ }, Kt = oi, li = (e) => /* @__PURE__ */ i.jsxs(
2322
+ "svg",
2323
+ A(j({
2324
+ fill: "none",
2325
+ xmlns: "http://www.w3.org/2000/svg",
2326
+ viewBox: "0 0 24 24",
2327
+ width: "24",
2328
+ height: "24"
2329
+ }, e), {
2330
+ children: [
2331
+ /* @__PURE__ */ i.jsx(
2332
+ "path",
2333
+ {
2334
+ d: "M16 3H8C5.23858 3 3 5.23858 3 8V16C3 18.7614 5.23858 21 8 21H16C18.7614 21 21 18.7614 21 16V8C21 5.23858 18.7614 3 16 3Z",
2335
+ stroke: "currentColor",
2336
+ strokeWidth: "1.5",
2337
+ strokeLinecap: "round",
2338
+ strokeLinejoin: "round"
2339
+ }
2340
+ ),
2341
+ /* @__PURE__ */ i.jsx(
2342
+ "path",
2343
+ {
2344
+ d: "M12.001 11.258C12.001 8.906 13.634 7 15.648 7C16.515 7 17.218 7.703 17.218 8.57C17.218 10.464 14.881 12 11.999 12C9.117 12 6.78 10.465 6.78 8.57C6.78 7.703 7.483 7 8.351 7C10.365 7 11.998 8.906 11.998 11.258",
2345
+ stroke: "currentColor",
2346
+ strokeWidth: "1.5",
2347
+ strokeLinecap: "round",
2348
+ strokeLinejoin: "round"
2349
+ }
2350
+ ),
2351
+ /* @__PURE__ */ i.jsx(
2352
+ "path",
2353
+ {
2354
+ d: "M8 15.854C10.208 15.854 11.998 13.764 11.998 11.186L12.002 11.2C12.002 13.778 13.792 15.868 16 15.868",
2355
+ stroke: "currentColor",
2356
+ strokeWidth: "1.5",
2357
+ strokeLinecap: "round",
2358
+ strokeLinejoin: "round"
2359
+ }
2360
+ ),
2361
+ /* @__PURE__ */ i.jsx(
2362
+ "path",
2363
+ {
2364
+ d: "M12 3V21",
2365
+ stroke: "currentColor",
2366
+ strokeWidth: "1.5",
2367
+ strokeLinecap: "round",
2368
+ strokeLinejoin: "round"
2369
+ }
2370
+ ),
2371
+ /* @__PURE__ */ i.jsx(
2372
+ "path",
2373
+ {
2374
+ d: "M21 12H3",
2375
+ stroke: "currentColor",
2376
+ strokeWidth: "1.5",
2377
+ strokeLinecap: "round",
2378
+ strokeLinejoin: "round"
2379
+ }
2380
+ )
2381
+ ]
2382
+ })
2383
+ ), ci = li, ui = (e) => /* @__PURE__ */ i.jsx(
2384
+ "svg",
2385
+ A(j({
2386
+ fill: "none",
2387
+ xmlns: "http://www.w3.org/2000/svg",
2388
+ viewBox: "0 0 21 16",
2389
+ width: "21",
2390
+ height: "16"
2391
+ }, e), {
2392
+ children: /* @__PURE__ */ i.jsx(
2393
+ "path",
2394
+ {
2395
+ d: "M1.5 5h18M8.07 9H5.5M16.5 15h-12a3 3 0 0 1-3-3V4a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v8a3 3 0 0 1-3 3Z",
2396
+ stroke: "currentcolor",
2397
+ strokeWidth: "1.5",
2398
+ strokeLinecap: "round",
2399
+ strokeLinejoin: "round"
2400
+ }
2401
+ )
2402
+ })
2403
+ ), di = ui, hi = (e) => /* @__PURE__ */ i.jsxs(
2404
+ "svg",
2405
+ A(j({
2406
+ width: "24",
2407
+ height: "24",
2408
+ fill: "none",
2409
+ xmlns: "http://www.w3.org/2000/svg",
2410
+ viewBox: "0 0 24 24"
2411
+ }, e), {
2412
+ children: [
2413
+ /* @__PURE__ */ i.jsx(
2414
+ "path",
2415
+ {
2416
+ d: "M3 3h6v6H3V3ZM2.8 14.8h6v6h-6v-6ZM20.8 8.8h-6v-6h6v6Z",
2417
+ strokeWidth: "1.5",
2418
+ strokeLinecap: "round",
2419
+ strokeLinejoin: "round",
2420
+ stroke: "currentColor"
2421
+ }
2422
+ ),
2423
+ /* @__PURE__ */ i.jsx("circle", { r: ".8", transform: "matrix(1 0 0 -1 14.8 14.7)", fill: "currentColor" }),
2424
+ /* @__PURE__ */ i.jsx("circle", { r: ".8", transform: "matrix(1 0 0 -1 20.8 14.7)", fill: "currentColor" }),
2425
+ /* @__PURE__ */ i.jsx("circle", { r: ".8", transform: "matrix(1 0 0 -1 17.8 17.7)", fill: "currentColor" }),
2426
+ /* @__PURE__ */ i.jsx("circle", { r: ".8", transform: "matrix(1 0 0 -1 14.8 20.7)", fill: "currentColor" }),
2427
+ /* @__PURE__ */ i.jsx("circle", { r: ".8", transform: "matrix(1 0 0 -1 20.8 20.7)", fill: "currentColor" })
2428
+ ]
2429
+ })
2430
+ ), fi = hi, pi = (e) => {
2431
+ var t = e, {
2432
+ variant: s,
2433
+ icon: r,
2434
+ isStandalone: a,
2435
+ title: o,
2436
+ description: l,
2437
+ className: c
2438
+ } = t, f = O(t, [
2439
+ "variant",
2440
+ "icon",
2441
+ "isStandalone",
2442
+ "title",
2443
+ "description",
2444
+ "className"
2445
+ ]);
2446
+ return /* @__PURE__ */ i.jsx(
2447
+ "div",
2448
+ A(j({}, f), {
2449
+ className: N(
2450
+ "card__empty-state",
2451
+ s === "error" && "card__empty-state--error",
2452
+ a && "card__empty-state--standalone",
2453
+ c
2454
+ ),
2455
+ children: /* @__PURE__ */ i.jsxs("div", { className: "card__empty-state__wrapper", children: [
2456
+ /* @__PURE__ */ i.jsx("i", { className: "card__empty-state__icon", "aria-hidden": !0, children: s === "error" ? /* @__PURE__ */ i.jsx(ai, {}) : r }),
2457
+ /* @__PURE__ */ i.jsxs("div", { className: "card__empty-state__content", children: [
2458
+ /* @__PURE__ */ i.jsx("p", { className: "card__empty-state__title", children: o }),
2459
+ /* @__PURE__ */ i.jsx("p", { className: "card__empty-state__description", children: l })
2460
+ ] })
2461
+ ] })
2462
+ })
2463
+ );
2464
+ }, mi = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__footer", children: e }), vi = (e) => {
2465
+ var t = e, {
2466
+ variant: s = "default",
2467
+ sticky: r,
2468
+ className: a,
2469
+ children: o
2470
+ } = t, l = O(t, [
2471
+ "variant",
2472
+ "sticky",
2473
+ "className",
2474
+ "children"
2475
+ ]);
2476
+ return /* @__PURE__ */ i.jsx(
2477
+ "div",
2478
+ A(j({}, l), {
2479
+ className: N(
2480
+ "card__header",
2481
+ s && `card__header--${s}`,
2482
+ r && "card__header--sticky",
2483
+ a
2484
+ ),
2485
+ children: o
2486
+ })
2487
+ );
2488
+ }, gi = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__image", children: e }), yi = ({ children: e, className: t }) => /* @__PURE__ */ i.jsx("div", { className: N("card__body__item", t), children: e }), Ci = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__body__subtitle", children: e }), xi = ({ icon: e, children: t }) => /* @__PURE__ */ i.jsxs("div", { className: "card__header__title", children: [
2489
+ e && /* @__PURE__ */ i.jsx("span", { className: "card__header__title__icon", children: e }),
2490
+ t
2491
+ ] }), Os = d.forwardRef(
2492
+ (e, t) => {
2493
+ var s = e, { type: r, children: a, className: o, variant: l = "default", disabled: c = !1 } = s, f = O(s, ["type", "children", "className", "variant", "disabled"]);
2494
+ return d.createElement(
2495
+ r,
2496
+ j({
2497
+ className: N(
2498
+ "card",
2499
+ c && "card--disabled",
2500
+ l && `card--${l}`,
2501
+ o
2502
+ ),
2503
+ ref: t
2504
+ }, f),
2505
+ a
2506
+ );
2507
+ }
2508
+ );
2509
+ Os.displayName = "Card";
2510
+ Object.assign(Os, {
2511
+ Header: vi,
2512
+ Action: Hr,
2513
+ Title: xi,
2514
+ Subtitle: Ci,
2515
+ Body: $r,
2516
+ Image: gi,
2517
+ Item: yi,
2518
+ Footer: mi,
2519
+ EmptyState: pi
2520
+ });
2521
+ var bi = (e) => {
2522
+ var t = e, { className: s, children: r } = t, a = O(t, ["className", "children"]);
2523
+ return /* @__PURE__ */ i.jsx("div", A(j({ className: N("checkbox__content", s) }, a), { children: r }));
2524
+ }, wi = (e) => {
2525
+ var t = e, { className: s, children: r } = t, a = O(t, ["className", "children"]);
2526
+ return /* @__PURE__ */ i.jsx("span", A(j({ className: N("checkbox__hint", s) }, a), { children: r }));
2527
+ }, Ls = d.createContext(void 0), ji = ({ id: e, name: t, children: s }) => /* @__PURE__ */ i.jsx(Ls.Provider, { value: { id: e, name: t }, children: s }), _i = () => {
2528
+ const e = d.useContext(Ls);
2529
+ if (!e)
2530
+ throw new Error("Checkbox compound components can not be rendered outside of Checkbox");
2531
+ return e;
2532
+ }, Ei = (e) => {
2533
+ var t = e, { className: s, children: r } = t, a = O(t, ["className", "children"]);
2534
+ const { id: o } = _i();
2535
+ return /* @__PURE__ */ i.jsx("label", A(j({ htmlFor: o, className: N("checkbox__label", s) }, a), { children: r }));
2536
+ }, _e = (e) => {
2537
+ var t = e, {
2538
+ id: s,
2539
+ name: r,
2540
+ isPending: a = !1,
2541
+ variant: o = "neutral",
2542
+ hasError: l = !1,
2543
+ single: c,
2544
+ className: f,
2545
+ children: g
2546
+ } = t, u = O(t, [
2547
+ "id",
2548
+ "name",
2549
+ "isPending",
2550
+ "variant",
2551
+ "hasError",
2552
+ "single",
2553
+ "className",
2554
+ "children"
2555
+ ]);
2556
+ const C = d.useRef(null);
2557
+ return d.useEffect(() => {
2558
+ C.current && (a ? C.current.indeterminate = !0 : C.current.indeterminate = !1);
2559
+ }, [a]), /* @__PURE__ */ i.jsxs(
2560
+ "div",
2561
+ {
2562
+ className: N("checkbox", o && `checkbox--${o}`, l && "checkbox--error"),
2563
+ children: [
2564
+ /* @__PURE__ */ i.jsx(
2565
+ "input",
2566
+ j({
2567
+ id: s,
2568
+ name: r,
2569
+ type: "checkbox",
2570
+ ref: C,
2571
+ className: N("checkbox__input", f),
2572
+ value: c ? "true" : ""
2573
+ }, u)
2574
+ ),
2575
+ a ? /* @__PURE__ */ i.jsx(ii, { className: "checkbox__spinner", "aria-hidden": !0 }) : /* @__PURE__ */ i.jsx(qr, { className: "checkbox__check", "aria-hidden": !0, strokeDasharray: "75" }),
2576
+ /* @__PURE__ */ i.jsx(ji, { id: s, name: r, children: g })
2577
+ ]
2578
+ }
2579
+ );
2580
+ };
2581
+ _e.Content = bi;
2582
+ _e.Label = Ei;
2583
+ _e.Hint = wi;
2584
+ _e.Error = Error;
2585
+ var Ai = (e) => {
2586
+ var t = e, { type: s = "div", className: r, children: a } = t, o = O(t, ["type", "className", "children"]);
2587
+ return d.createElement(s, j({ className: N("dialog__body", r) }, o), a);
2588
+ }, Dt = () => document.body.style.removeProperty("overflow"), es = (e) => e.preventDefault(), Si = 'a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])', ki = (e) => {
2589
+ var t = e, { className: s, children: r, shouldAnimate: a = !0 } = t, o = O(t, ["className", "children", "shouldAnimate"]);
2590
+ const { ref: l, defaultOpen: c, isModal: f, onClose: g } = ot();
2591
+ return d.useEffect(() => {
2592
+ const u = l == null ? void 0 : l.current;
2593
+ if (u != null && u.open) {
2594
+ const C = u.querySelectorAll(Si), w = C[0], v = C[C.length - 1], b = (_) => {
2595
+ if (!(_.key === "Tab"))
2596
+ return;
2597
+ _.shiftKey ? document.activeElement === w && (v.focus(), _.preventDefault()) : document.activeElement === v && (w.focus(), _.preventDefault());
2598
+ };
2599
+ return document.body.style.overflow = "hidden", u.addEventListener("keydown", b), window.addEventListener("popstate", () => Dt()), () => {
2600
+ u.removeEventListener("keydown", b), window.removeEventListener("popstate", () => Dt());
2601
+ };
2602
+ }
2603
+ }, [l]), d.useEffect(() => {
2604
+ const u = l == null ? void 0 : l.current;
2605
+ if (!u)
2606
+ return;
2607
+ if (c && (u.removeAttribute("open"), u.showModal(), u.focus()), f)
2608
+ return u.addEventListener("cancel", es), () => u.removeEventListener("cancel", es);
2609
+ const C = ({ clientX: w, clientY: v }) => {
2610
+ const { top: b, right: _, bottom: m, left: y } = u.getBoundingClientRect(), S = 0 < v && 0 < w, E = b < v && v < m, k = y < w && w < _;
2611
+ S && !(E && k) && g();
2612
+ };
2613
+ return u.addEventListener("cancel", g), u.addEventListener("mousedown", C), () => {
2614
+ u.removeEventListener("cancel", g), u.removeEventListener("mousedown", C);
2615
+ };
2616
+ }, [l, f, g, c]), /* @__PURE__ */ i.jsx(
2617
+ "dialog",
2618
+ A(j({
2619
+ ref: l,
2620
+ open: c,
2621
+ "aria-modal": !!f,
2622
+ "aria-labelledby": "dialogTitle",
2623
+ className: N("dialog", a && "dialog--animated", s)
2624
+ }, o), {
2625
+ children: r
2626
+ })
2627
+ );
2628
+ }, Fs = d.createContext(void 0), Pi = ({ defaultOpen: e, onClose: t, isModal: s, children: r }) => {
2629
+ const a = d.useRef(null), o = d.useRef(t), l = d.useCallback(() => {
2630
+ var c;
2631
+ Dt(), (c = a.current) == null || c.close(), o.current && (o == null || o.current());
2632
+ }, [a]);
2633
+ return /* @__PURE__ */ i.jsx(Fs.Provider, { value: { ref: a, defaultOpen: e, isModal: s, onClose: l }, children: r });
2634
+ }, ot = () => {
2635
+ const e = d.useContext(Fs);
2636
+ if (!e)
2637
+ throw new Error("Dialog compound components can not be rendered outside of Dialog");
2638
+ return e;
2639
+ }, Ni = (e) => {
2640
+ var t = e, { children: s } = t, r = O(t, ["children"]);
2641
+ const { onClose: a } = ot();
2642
+ return /* @__PURE__ */ i.jsx(at, A(j({ onClick: a }, r), { children: s }));
2643
+ }, Rs = d.forwardRef((e, t) => {
2644
+ var s = e, { className: r } = s, a = O(s, ["className"]);
2645
+ const { onClose: o } = ot();
2646
+ return /* @__PURE__ */ i.jsx(
2647
+ at,
2648
+ j({
2649
+ type: "submit",
2650
+ ref: t,
2651
+ formMethod: "dialog",
2652
+ onClick: o,
2653
+ iconLeft: /* @__PURE__ */ i.jsx(Wr, {}),
2654
+ variant: "icon--secondary",
2655
+ className: N("dialog__close button--icon", r)
2656
+ }, a)
2657
+ );
2658
+ });
2659
+ Rs.displayName = "Close";
2660
+ var Mi = (e) => {
2661
+ var t = e, { className: s, children: r } = t, a = O(t, ["className", "children"]);
2662
+ return /* @__PURE__ */ i.jsx("div", A(j({ className: N("dialog__footer", s) }, a), { children: r }));
2663
+ }, Oi = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "dialog__header", children: e }), Li = (e) => {
2664
+ var t = e, { icon: s, children: r, className: a } = t, o = O(t, ["icon", "children", "className"]);
2665
+ const { ref: l } = ot(), c = d.useRef(null);
2666
+ return d.useEffect(() => {
2667
+ l != null && l.current && l.current.focus();
2668
+ }, [l]), /* @__PURE__ */ i.jsxs(
2669
+ "div",
2670
+ A(j({
2671
+ tabIndex: 0,
2672
+ ref: c,
2673
+ id: "dialogTitle",
2674
+ className: N("dialog__header__title", a)
2675
+ }, o), {
2676
+ children: [
2677
+ s && /* @__PURE__ */ i.jsx("span", { className: "dialog__header__icon", children: s }),
2678
+ r
2679
+ ]
2680
+ })
2681
+ );
2682
+ }, Fi = (e) => {
2683
+ var t = e, { children: s } = t, r = O(t, ["children"]);
2684
+ const { ref: a } = ot();
2685
+ return /* @__PURE__ */ i.jsx(at, A(j({ onClick: () => {
2686
+ var o;
2687
+ return (o = a == null ? void 0 : a.current) == null ? void 0 : o.showModal();
2688
+ } }, r), { children: s }));
2689
+ }, $ = ({ defaultOpen: e, isModal: t, children: s, onClose: r }) => /* @__PURE__ */ i.jsx(Pi, { defaultOpen: !!e, isModal: t, onClose: r, children: s });
2690
+ $.Trigger = Fi;
2691
+ $.Root = ki;
2692
+ $.Title = Li;
2693
+ $.Header = Oi;
2694
+ $.Body = Ai;
2695
+ $.Footer = Mi;
2696
+ $.Button = Ni;
2697
+ $.Close = Rs;
2698
+ var Ds = d.createContext(void 0), Ri = ({
2699
+ id: e,
2700
+ position: t,
2701
+ isOpen: s,
2702
+ setIsOpen: r,
2703
+ activeItemIndex: a,
2704
+ setActiveItemIndex: o,
2705
+ clearActiveItemIndex: l,
2706
+ triggerRef: c,
2707
+ contentRef: f,
2708
+ children: g
2709
+ }) => /* @__PURE__ */ i.jsx(
2710
+ Ds.Provider,
2711
+ {
2712
+ value: {
2713
+ id: e,
2714
+ position: t,
2715
+ isOpen: s,
2716
+ setIsOpen: r,
2717
+ activeItemIndex: a,
2718
+ setActiveItemIndex: o,
2719
+ clearActiveItemIndex: l,
2720
+ triggerRef: c,
2721
+ contentRef: f
2722
+ },
2723
+ children: g
2724
+ }
2725
+ ), Ts = () => {
2726
+ const e = d.useContext(Ds);
2727
+ if (e === void 0)
2728
+ throw new Error("useMenu must be used within a MenuProvider");
2729
+ return e;
2730
+ }, Di = ({ as: e, children: t }) => {
2731
+ const {
2732
+ id: s,
2733
+ position: r,
2734
+ isOpen: a,
2735
+ setIsOpen: o,
2736
+ activeItemIndex: l,
2737
+ setActiveItemIndex: c,
2738
+ clearActiveItemIndex: f,
2739
+ triggerRef: g,
2740
+ contentRef: u
2741
+ } = Ts(), C = (w) => {
2742
+ var v;
2743
+ if (!a)
2744
+ return;
2745
+ if (w.key === "Escape")
2746
+ return f(), o(!1), (v = g.current) == null ? void 0 : v.focus();
2747
+ const b = w.shiftKey, _ = Qs(u.current).length - 1;
2748
+ switch (w.key) {
2749
+ case "Tab": {
2750
+ if (b && l !== 0)
2751
+ return w.preventDefault(), c(l ? Math.max(0, l - 1) : 0);
2752
+ if (!b && l !== _) {
2753
+ w.preventDefault();
2754
+ const m = l !== void 0 ? l + 1 : 0;
2755
+ return c(Math.min(_, m));
2756
+ }
2757
+ break;
2758
+ }
2759
+ case "ArrowUp":
2760
+ case "ArrowLeft":
2761
+ return w.preventDefault(), c(l ? Math.max(0, l - 1) : 0);
2762
+ case "ArrowDown":
2763
+ case "ArrowRight": {
2764
+ w.preventDefault();
2765
+ const m = l !== void 0 ? l + 1 : 0;
2766
+ return c(Math.min(_, m));
2767
+ }
2768
+ case "Home":
2769
+ return w.preventDefault(), c(0);
2770
+ case "End":
2771
+ return w.preventDefault(), c(_);
2772
+ }
2773
+ };
2774
+ return e ? d.createElement(
2775
+ e,
2776
+ {
2777
+ id: `${s}-content`,
2778
+ ref: u,
2779
+ className: N("menu__list", `menu__list--${r}`, a && "menu__list--active"),
2780
+ onKeyDown: C
2781
+ },
2782
+ t
2783
+ ) : (
2784
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
2785
+ /* @__PURE__ */ i.jsx(
2786
+ "ul",
2787
+ {
2788
+ id: `${s}-content`,
2789
+ ref: u,
2790
+ className: N("menu__list", `menu__list--${r}`, a && "menu__list--active"),
2791
+ onKeyDown: C,
2792
+ children: t
2793
+ }
2794
+ )
2795
+ );
2796
+ }, Ti = (e) => {
2797
+ var t = e, { children: s, className: r } = t, a = O(t, ["children", "className"]);
2798
+ return /* @__PURE__ */ i.jsx("li", A(j({}, a), { className: N("menu__list-item", r), children: s }));
2799
+ }, Us = ({ children: e, className: t }) => {
2800
+ const { id: s, isOpen: r, setIsOpen: a, clearActiveItemIndex: o, setActiveItemIndex: l, triggerRef: c } = Ts(), f = () => {
2801
+ o(), a((u) => !u), r || l(0);
2802
+ }, g = (u) => {
2803
+ if (r) {
2804
+ if (u.key === "Escape")
2805
+ return o(), a(!1);
2806
+ u.key === "ArrowDown" && (u.preventDefault(), l(0));
2807
+ }
2808
+ };
2809
+ return d.cloneElement(e, {
2810
+ id: `${s}-trigger`,
2811
+ ref: c,
2812
+ className: N("menu__trigger", t),
2813
+ onClick: f,
2814
+ onKeyDown: g,
2815
+ "aria-expanded": r,
2816
+ "aria-controls": `${s}-content`
2817
+ });
2818
+ };
2819
+ Us.displayName = "Trigger";
2820
+ var Qs = (e) => e ? e.tagName === "UL" ? e.children : Array.from(e.getElementsByTagName("ul")).reduce((s, r) => [...s, ...Array.from(r.getElementsByTagName("li"))], []) : [], J = (e) => {
2821
+ var t = e, { type: s, id: r, position: a = "right", children: o, className: l } = t, c = O(t, ["type", "id", "position", "children", "className"]);
2822
+ const f = d.useRef(null), g = d.useRef(null), u = d.useRef(null), [C, w] = d.useState(!1), [v, b] = d.useState(), [_, m] = d.useState(v);
2823
+ v !== _ && v !== void 0 && u.current && (Qs(u.current)[v].firstChild.focus(), m(v));
2824
+ const y = () => {
2825
+ b(void 0), m(void 0);
2826
+ }, S = (E) => {
2827
+ var k;
2828
+ ((k = f.current) == null ? void 0 : k.contains(E.relatedTarget)) || (y(), w(!1));
2829
+ };
2830
+ return /* @__PURE__ */ i.jsx(
2831
+ Ri,
2832
+ {
2833
+ id: r,
2834
+ position: a,
2835
+ isOpen: C,
2836
+ setIsOpen: w,
2837
+ activeItemIndex: v,
2838
+ setActiveItemIndex: b,
2839
+ clearActiveItemIndex: y,
2840
+ triggerRef: g,
2841
+ contentRef: u,
2842
+ children: d.createElement(
2843
+ s,
2844
+ A(j({}, c), {
2845
+ id: r,
2846
+ ref: f,
2847
+ className: `menu ${l || ""}`,
2848
+ onBlur: S
2849
+ }),
2850
+ o
2851
+ )
2852
+ }
2853
+ );
2854
+ };
2855
+ J.Trigger = Us;
2856
+ J.Content = Di;
2857
+ J.Item = Ti;
2858
+ d.createContext(void 0);
2859
+ var Ui = (/* @__PURE__ */ new Map()).set("BE", "32").set("FR", "33").set("NL", "31").set("LU", "352").set("DE", "49").set("CA", "1").set("PR", "1").set("TC", "1").set("US", "1").set("BS", "1242").set("BB", "1246").set("AI", "1264").set("AG", "1268").set("KY", "1345").set("BM", "1441").set("GD", "1473").set("MS", "1664").set("GU", "1671").set("LC", "1758").set("DM", "1767").set("VC", "1784").set("DO", "1809").set("TT", "1868").set("KN", "1869").set("JM", "1876").set("EG", "20").set("SS", "211").set("MA", "212").set("DZ", "213").set("TN", "216").set("LY", "218").set("GM", "220").set("SN", "221").set("MR", "222").set("ML", "223").set("GN", "224").set("CI", "225").set("BF", "226").set("NE", "227").set("TG", "228").set("BJ", "229").set("MU", "230").set("LR", "231").set("SL", "232").set("GH", "233").set("NG", "234").set("TD", "235").set("CF", "236").set("CM", "237").set("CV", "238").set("ST", "239").set("GQ", "240").set("GA", "241").set("CG", "242").set("CD", "243").set("AO", "244").set("GW", "245").set("SC", "248").set("SD", "249").set("RW", "250").set("ET", "251").set("SO", "252").set("DJ", "253").set("KE", "254").set("TZ", "255").set("UG", "256").set("BI", "257").set("MZ", "258").set("ZM", "260").set("MG", "261").set("RE", "262").set("ZW", "263").set("NA", "264").set("MW", "265").set("LS", "266").set("BW", "267").set("SZ", "268").set("KM", "269").set("ZA", "27").set("VG", "284").set("ER", "291").set("AW", "297").set("FO", "298").set("GL", "299").set("GR", "30").set("ES", "34").set("GI", "350").set("PT", "351").set("IE", "353").set("IS", "354").set("AL", "355").set("MT", "356").set("CY", "357").set("FI", "358").set("BG", "359").set("HU", "36").set("LT", "370").set("LV", "371").set("EE", "372").set("MD", "373").set("AM", "374").set("BY", "375").set("AD", "376").set("MC", "377").set("SM", "378").set("UA", "380").set("RS", "381").set("ME", "382").set("HR", "385").set("SI", "386").set("BA", "387").set("MK", "389").set("IT", "39").set("RO", "40").set("CH", "41").set("CZ", "420").set("SK", "421").set("LI", "423").set("AT", "43").set("GB", "44").set("DK", "45").set("SE", "46").set("NO", "47").set("PL", "48").set("FK", "500").set("BZ", "501").set("GT", "502").set("SV", "503").set("HN", "504").set("NI", "505").set("CR", "506").set("PA", "507").set("PM", "508").set("HT", "509").set("PE", "51").set("MX", "52").set("CU", "53").set("AR", "54").set("BR", "55").set("CL", "56").set("CO", "57").set("VE", "58").set("GP", "590").set("BO", "591").set("GY", "592").set("EC", "593").set("FG", "594").set("PY", "595").set("MQ", "596").set("SR", "597").set("UY", "598").set("CW", "599").set("AN", "599").set("MY", "60").set("AU", "61").set("ID", "62").set("PH", "63").set("NZ", "64").set("SG", "65").set("TH", "66").set("TP", "670").set("BN", "673").set("PG", "675").set("TO", "676").set("SB", "677").set("VU", "678").set("FJ", "679").set("PW", "680").set("CK", "682").set("NU", "683").set("AS", "684").set("WS", "685").set("KI", "686").set("NC", "687").set("TV", "688").set("PF", "689").set("FM", "691").set("KZ", "7").set("RU", "7").set("JP", "81").set("KR", "82").set("VN", "84").set("KP", "850").set("HK", "852").set("MO", "853").set("KH", "855").set("LA", "856").set("CN", "86").set("BD", "880").set("TW", "886").set("TR", "90").set("IN", "91").set("PK", "92").set("AF", "93").set("LK", "94").set("MM", "95").set("MV", "960").set("LB", "961").set("JO", "962").set("SY", "963").set("IQ", "964").set("KW", "965").set("SA", "966").set("YE", "967").set("OM", "968").set("PS", "970").set("AE", "971").set("IL", "972").set("BH", "973").set("QA", "974").set("BT", "975").set("MN", "976").set("NP", "977").set("IR", "98").set("TK", "992").set("TM", "993").set("AZ", "994").set("GE", "995").set("KG", "996").set("UZ", "998");
2860
+ [...new Set(Ui.values())].map((e) => ({
2861
+ label: `+${e}`,
2862
+ value: e
2863
+ }));
2864
+ d.createContext(void 0);
2865
+ d.createContext(void 0);
2866
+ var gt = /* @__PURE__ */ ((e) => (e[e.categoriesVegetables = 0] = "categoriesVegetables", e[e.categoriesMeat = 1] = "categoriesMeat", e[e.categoriesFish = 2] = "categoriesFish", e[e.categoriesDairy = 3] = "categoriesDairy", e[e.categoriesBreakfast = 4] = "categoriesBreakfast", e[e.categoriesSnacks = 5] = "categoriesSnacks", e[e.categoriesCandy = 6] = "categoriesCandy", e[e.categoriesNonFood = 7] = "categoriesNonFood", e[e.categoriesDryFood = 8] = "categoriesDryFood", e[e.categoriesTins = 9] = "categoriesTins", e[e.categoriesGrid = 10] = "categoriesGrid", e[e.categoriesSoda = 11] = "categoriesSoda", e[e.categoriesBakery = 12] = "categoriesBakery", e[e.categoriesWine = 13] = "categoriesWine", e[e.categoriesBaby = 14] = "categoriesBaby", e[e.categoriesDiet = 15] = "categoriesDiet", e[e.categoriesHygiene = 16] = "categoriesHygiene", e[e.categoriesCleaning = 17] = "categoriesCleaning", e[e.categoriesPets = 18] = "categoriesPets", e[e.categoriesFreezer = 19] = "categoriesFreezer", e[e.categoriesBbq = 20] = "categoriesBbq", e[e.categoriesMealbox = 21] = "categoriesMealbox", e[e.categoriesBrik = 22] = "categoriesBrik", e[e.categoriesGranen = 23] = "categoriesGranen", e[e.categoriesConserve = 24] = "categoriesConserve", e[e.categoriesHome = 25] = "categoriesHome", e[e.categoriesEaster = 26] = "categoriesEaster", e[e.categoriesOnlinePromo = 27] = "categoriesOnlinePromo", e[e.categoriesSportFood = 28] = "categoriesSportFood", e[e.categoriesClothing = 29] = "categoriesClothing", e[e.categoriesEnergy = 30] = "categoriesEnergy", e[e.categoriesDeskAndTravel = 31] = "categoriesDeskAndTravel", e[e.categoriesCigarette = 32] = "categoriesCigarette", e[e.categoriesFood = 33] = "categoriesFood", e[e.categoriesChild = 34] = "categoriesChild", e[e.categoriesPuzzle = 35] = "categoriesPuzzle", e[e.categoriesToys = 36] = "categoriesToys", e[e.categoriesCar = 37] = "categoriesCar", e[e.categoriesPlaceholder = 38] = "categoriesPlaceholder", e[e.categoriesFuel = 39] = "categoriesFuel", e[e.categoriesCarAndBike = 40] = "categoriesCarAndBike", e[e.categoriesToyAndHobby = 41] = "categoriesToyAndHobby", e[e.categoriesMultimedia = 42] = "categoriesMultimedia", e[e.categoriesParty = 43] = "categoriesParty", e[e.toolsPay = 44] = "toolsPay", e[e.toolsReceipt = 45] = "toolsReceipt", e[e.toolsFuel = 46] = "toolsFuel", e[e.toolsStoreLocator = 47] = "toolsStoreLocator", e[e.toolsStats = 48] = "toolsStats", e[e.toolsShowXtraOld = 49] = "toolsShowXtraOld", e[e.toolsShowXtraNew = 50] = "toolsShowXtraNew", e[e.toolsScan2 = 51] = "toolsScan2", e[e.toolsRecipes2 = 52] = "toolsRecipes2", e[e.toolsWarranty = 53] = "toolsWarranty", e[e.toolsCoupons = 54] = "toolsCoupons", e[e.toolsFavoriteInactive = 55] = "toolsFavoriteInactive", e[e.toolsFavoriteActive = 56] = "toolsFavoriteActive", e[e.toolsAssortment = 57] = "toolsAssortment", e[e.toolsPromo = 58] = "toolsPromo", e[e.fuelCng = 59] = "fuelCng", e[e.fuelE5 = 60] = "fuelE5", e[e.fuelAdblue = 61] = "fuelAdblue", e[e.fuelB7 = 62] = "fuelB7", e[e.fuelH2 = 63] = "fuelH2", e[e.fuelE10 = 64] = "fuelE10", e[e.fuelFreeTireInflation = 65] = "fuelFreeTireInflation", e[e.functionalClose = 66] = "functionalClose", e[e.functionalBack = 67] = "functionalBack", e[e.functionalSearch = 68] = "functionalSearch", e[e.functionalEdit = 69] = "functionalEdit", e[e.functionalShare = 70] = "functionalShare", e[e.functionalLocation = 71] = "functionalLocation", e[e.functionalTrash = 72] = "functionalTrash", e[e.functionalCamera = 73] = "functionalCamera", e[e.functionalPhone = 74] = "functionalPhone", e[e.functionalPushNotifications = 75] = "functionalPushNotifications", e[e.functionalMail = 76] = "functionalMail", e[e.functionalGift = 77] = "functionalGift", e[e.functionalPresent = 78] = "functionalPresent", e[e.functionalLoading = 79] = "functionalLoading", e[e.functionalChevronRight = 80] = "functionalChevronRight", e[e.functionalCheck = 81] = "functionalCheck", e[e.functionalChevronDown = 82] = "functionalChevronDown", e[e.functionalChevronUp = 83] = "functionalChevronUp", e[e.functionalPlus = 84] = "functionalPlus", e[e.functionalReset = 85] = "functionalReset", e[e.functionalDownload = 86] = "functionalDownload", e[e.functionalExport = 87] = "functionalExport", e[e.functionalCustomerService = 88] = "functionalCustomerService", e[e.functionalTruck = 89] = "functionalTruck", e[e.functionalBox = 90] = "functionalBox", e[e.functionalEllipsis = 91] = "functionalEllipsis", e[e.functionalLocationHome = 92] = "functionalLocationHome", e[e.functionalLocationPickup = 93] = "functionalLocationPickup", e[e.functionalAccount = 94] = "functionalAccount", e[e.functionalPrivacy = 95] = "functionalPrivacy", e[e.functionalSettings = 96] = "functionalSettings", e[e.functionalUserInfo = 97] = "functionalUserInfo", e[e.functionalPinOutlines = 98] = "functionalPinOutlines", e[e.functionalCalendar = 99] = "functionalCalendar", e[e.functionalMinus = 100] = "functionalMinus", e[e.functionalLifestyle = 101] = "functionalLifestyle", e[e.functionalSms = 102] = "functionalSms", e[e.functionalSwitch = 103] = "functionalSwitch", e[e.functionalSorting = 104] = "functionalSorting", e[e.functionalWarningCircle = 105] = "functionalWarningCircle", e[e.functionalQuestionCircle = 106] = "functionalQuestionCircle", e[e.functionalErrorCircle = 107] = "functionalErrorCircle", e[e.functionalSuccessCircle = 108] = "functionalSuccessCircle", e[e.functionalMessage = 109] = "functionalMessage", e[e.functionalExternalLink = 110] = "functionalExternalLink", e[e.functionalAddToList = 111] = "functionalAddToList", e[e.functionalShoppingcart = 112] = "functionalShoppingcart", e[e.functionalFilter = 113] = "functionalFilter", e[e.functionalLocate = 114] = "functionalLocate", e[e.functionalBarcode = 115] = "functionalBarcode", e[e.functionalClock = 116] = "functionalClock", e[e.functionalHistory = 117] = "functionalHistory", e[e.functionalShops = 118] = "functionalShops", e[e.functionalAddUser = 119] = "functionalAddUser", e[e.functionalOther = 120] = "functionalOther", e[e.functionalInAppNotifications = 121] = "functionalInAppNotifications", e[e.functionalExit = 122] = "functionalExit", e[e.functionalShared = 123] = "functionalShared", e[e.functionalThumbsup = 124] = "functionalThumbsup", e[e.functionalDiscount = 125] = "functionalDiscount", e[e.functionalPercentage = 126] = "functionalPercentage", e[e.functionalList = 127] = "functionalList", e[e.functionalMapLocation = 128] = "functionalMapLocation", e[e.functionalNoConnection = 129] = "functionalNoConnection", e[e.functionalSwap = 130] = "functionalSwap", e[e.functionalPiece = 131] = "functionalPiece", e[e.functionalWeight = 132] = "functionalWeight", e[e.functionalPack = 133] = "functionalPack", e[e.functionalCommunications = 134] = "functionalCommunications", e[e.functionalDeliveryAddresses = 135] = "functionalDeliveryAddresses", e[e["functional18+"] = 136] = "functional18+", e[e.functionalReadtime = 137] = "functionalReadtime", e[e.functionalCopy = 138] = "functionalCopy", e[e.functionalMessageField = 139] = "functionalMessageField", e[e.functionalNext = 140] = "functionalNext", e[e.functionalSave = 141] = "functionalSave", e[e.functionalLogin = 142] = "functionalLogin", e[e.functionalLogout = 143] = "functionalLogout", e[e.functionalWebsite = 144] = "functionalWebsite", e[e.functionalMenu = 145] = "functionalMenu", e[e.functionalRegister = 146] = "functionalRegister", e[e.functionalNews = 147] = "functionalNews", e[e.functionalTimer = 148] = "functionalTimer", e[e.functionalEyeShow = 149] = "functionalEyeShow", e[e.functionalMobilePay = 150] = "functionalMobilePay", e[e.functionalConnectionCable = 151] = "functionalConnectionCable", e[e.functionalDryCleaning = 152] = "functionalDryCleaning", e[e.functionalKiosk = 153] = "functionalKiosk", e[e.functionalConnectedDevice = 154] = "functionalConnectedDevice", e[e.functionalCookies = 155] = "functionalCookies", e[e.functionalViewFile = 156] = "functionalViewFile", e[e.functionalLastAdded = 157] = "functionalLastAdded", e[e.functionalFirstAdded = 158] = "functionalFirstAdded", e[e.functionalStoreLayout = 159] = "functionalStoreLayout", e[e.functionalBlock = 160] = "functionalBlock", e[e.functionalChecklist = 161] = "functionalChecklist", e[e.functionalCartCheckout = 162] = "functionalCartCheckout", e[e.functionalCartEdit = 163] = "functionalCartEdit", e[e.functionalEyeHidden = 164] = "functionalEyeHidden", e[e.functionalWarningCircleFilled = 165] = "functionalWarningCircleFilled", e[e.functionalErrorCircleFilled = 166] = "functionalErrorCircleFilled", e[e.functionalSuccessCircleFilled = 167] = "functionalSuccessCircleFilled", e[e.functionalPlusCircle = 168] = "functionalPlusCircle", e[e.functionalSpinner = 169] = "functionalSpinner", e[e.functionalEcoEarth = 170] = "functionalEcoEarth", e[e.functionalAlphaBeta = 171] = "functionalAlphaBeta", e[e.functionalEuro = 172] = "functionalEuro", e[e.functionalNumber = 173] = "functionalNumber", e[e.functionalIdea = 174] = "functionalIdea", e[e.functionalMultifactorAuthenticator = 175] = "functionalMultifactorAuthenticator", e[e.functionalPassword = 176] = "functionalPassword", e[e.functionalDiscountCode = 177] = "functionalDiscountCode", e))(gt || {});
2867
+ const Qi = "/icons/bouMenuIcons.svg", Hi = ({
2868
+ bouIconId: e,
2869
+ ...t
2870
+ }) => /* @__PURE__ */ i.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i.jsx("use", { href: `${Qi}#${gt[e]}` }) }), pe = ({
2871
+ className: e,
2872
+ label: t,
2873
+ mobileUrl: s,
2874
+ desktopUrl: r,
2875
+ icon: a
2876
+ }) => {
2877
+ const o = Zs(), l = () => typeof a == "string" && a in gt ? /* @__PURE__ */ i.jsx(Hi, { bouIconId: gt[a] }) : a;
2878
+ return /* @__PURE__ */ i.jsxs(J.Item, { className: e, children: [
2879
+ !o || o && !r && /* @__PURE__ */ i.jsxs("a", { href: s, referrerPolicy: "no-referrer-when-downgrade", children: [
2880
+ l(),
2881
+ t
2882
+ ] }),
2883
+ !!r && /* @__PURE__ */ i.jsxs("a", { href: r, referrerPolicy: "no-referrer-when-downgrade", children: [
2884
+ l(),
2885
+ t
2886
+ ] })
2887
+ ] });
2888
+ }, Hs = d.createContext(void 0), $i = ({
2889
+ position: e,
2890
+ bouMenuItems: t,
2891
+ authenticationStatus: s,
2892
+ profile: r,
2893
+ children: a
2894
+ }) => /* @__PURE__ */ i.jsx(Hs.Provider, { value: { position: e, bouMenuItems: t, authenticationStatus: s, profile: r }, children: a }), Gt = () => {
2895
+ const e = d.useContext(Hs);
2896
+ if (!e)
2897
+ throw new Error("Authentication context can not be rendered outside of Authentication");
2898
+ return e;
2899
+ }, $s = d.createContext(void 0), Ki = ({ apiUrl: e, redirectUrl: t, children: s }) => /* @__PURE__ */ i.jsx($s.Provider, { value: { apiUrl: e, redirectUrl: t }, children: s }), Ks = () => {
2900
+ const e = d.useContext($s);
2901
+ if (!e)
2902
+ throw new Error("Api context can not be rendered outside of Api");
2903
+ return e;
2904
+ }, Gs = ({ apiUrl: e, redirectUrl: t, trackingInfo: s }) => {
2905
+ const r = new URLSearchParams({ redirectUrl: t });
2906
+ s && r.append("trackingInfo", s);
2907
+ const a = `${e}/login?${r.toString()}`, o = `${e}/logout?${r.toString()}`;
2908
+ return { loginUrl: a, logoutUrl: o };
2909
+ }, qs = () => {
2910
+ const { apiUrl: e, redirectUrl: t } = Ks(), s = zs();
2911
+ return Gs({ apiUrl: e, redirectUrl: t, trackingInfo: s });
2912
+ }, qe = () => {
2913
+ const { apiUrl: e } = Ks(), { loginUrl: t, logoutUrl: s } = qs(), r = `${e}/user/profile`, a = `${e}/gdpr/tc/check`, o = `${e}/gdpr/tc`;
2914
+ return {
2915
+ loginUrl: t,
2916
+ logoutUrl: s,
2917
+ profileEndpoint: r,
2918
+ getTermsAndConditionsEndpoint: a,
2919
+ postTermsAndConditionsEndpoint: o
2920
+ };
2921
+ }, Gi = (e) => e != null && e.length ? /* @__PURE__ */ i.jsx("ul", { className: "bou-menu__list", children: e == null ? void 0 : e.map(({ label: t, icon: s, url: r }, a) => /* @__PURE__ */ i.jsx(
2922
+ pe,
2923
+ {
2924
+ className: "bou-menu-item",
2925
+ mobileUrl: r,
2926
+ icon: s,
2927
+ label: t
2928
+ },
2929
+ a
2930
+ )) }) : null, qi = () => {
2931
+ const { t: e } = Ee(), t = ps(), { position: s, profile: r, bouMenuItems: a } = Gt(), { logoutUrl: o } = qe(), l = (r == null ? void 0 : r.firstName) ?? "", c = (r == null ? void 0 : r.lastName) ?? "";
2932
+ return /* @__PURE__ */ i.jsxs(J, { type: "nav", id: "xtra-menu", position: s, children: [
2933
+ /* @__PURE__ */ i.jsx(
2934
+ J.Trigger,
2935
+ {
2936
+ className: N(
2937
+ "button",
2938
+ "button--neutral",
2939
+ "button--authentication",
2940
+ "button--authentication--authenticated"
2941
+ ),
2942
+ children: /* @__PURE__ */ i.jsxs("button", { children: [
2943
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Ur, { variant: "small", firstName: l, lastName: c }) }),
2944
+ /* @__PURE__ */ i.jsx("span", { className: "button__label", children: l }),
2945
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx($t, {}) })
2946
+ ] })
2947
+ }
2948
+ ),
2949
+ /* @__PURE__ */ i.jsxs(J.Content, { as: "div", children: [
2950
+ Gi(a),
2951
+ /* @__PURE__ */ i.jsxs("ul", { children: [
2952
+ /* @__PURE__ */ i.jsx(
2953
+ pe,
2954
+ {
2955
+ className: "manage-profile",
2956
+ mobileUrl: `${t}/manage-profile`,
2957
+ desktopUrl: `${t}/manage-profile/personal-data`,
2958
+ icon: /* @__PURE__ */ i.jsx(ei, {}),
2959
+ label: e("manageProfile")
2960
+ }
2961
+ ),
2962
+ /* @__PURE__ */ i.jsx(
2963
+ pe,
2964
+ {
2965
+ className: "payment",
2966
+ mobileUrl: `${t}/payment`,
2967
+ icon: /* @__PURE__ */ i.jsx(di, {}),
2968
+ label: e("payment")
2969
+ }
2970
+ ),
2971
+ /* @__PURE__ */ i.jsx(
2972
+ pe,
2973
+ {
2974
+ className: "gift-cards",
2975
+ mobileUrl: `${t}/gift-cards`,
2976
+ icon: /* @__PURE__ */ i.jsx(ci, {}),
2977
+ label: e("giftCards")
2978
+ }
2979
+ ),
2980
+ /* @__PURE__ */ i.jsx(
2981
+ pe,
2982
+ {
2983
+ mobileUrl: `${t}/identifiers`,
2984
+ icon: /* @__PURE__ */ i.jsx(fi, {}),
2985
+ label: e("qrCode")
2986
+ }
2987
+ ),
2988
+ /* @__PURE__ */ i.jsx(
2989
+ pe,
2990
+ {
2991
+ className: "manage-privacy",
2992
+ mobileUrl: `${t}/manage-privacy`,
2993
+ desktopUrl: `${t}/manage-privacy/permissions`,
2994
+ icon: /* @__PURE__ */ i.jsx(Ir, {}),
2995
+ label: e("privacy")
2996
+ }
2997
+ ),
2998
+ /* @__PURE__ */ i.jsx(pe, { mobileUrl: o, icon: /* @__PURE__ */ i.jsx(Jr, {}), label: e("logout") })
2999
+ ] })
3000
+ ] })
3001
+ ] });
3002
+ }, Vi = () => {
3003
+ const { t: e } = Ee();
3004
+ return /* @__PURE__ */ i.jsxs("button", { className: N("button", "button--neutral", "button--authentication"), children: [
3005
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx("i", { className: "spinner" }) }),
3006
+ /* @__PURE__ */ i.jsxs("span", { className: "button__label", children: [
3007
+ e("loading"),
3008
+ "..."
3009
+ ] })
3010
+ ] });
3011
+ }, Wi = ({ className: e }) => {
3012
+ const { t } = Ee(), { loginUrl: s } = qe();
3013
+ return /* @__PURE__ */ i.jsxs(
3014
+ "a",
3015
+ {
3016
+ href: s,
3017
+ className: N(
3018
+ "button",
3019
+ "button--neutral",
3020
+ "button--authentication",
3021
+ "button--authentication--unauthenticated",
3022
+ e
3023
+ ),
3024
+ children: [
3025
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Kt, { width: 24, height: 24, suffix: "desktop" }) }),
3026
+ /* @__PURE__ */ i.jsx("span", { className: "button__label", children: t("login") }),
3027
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx($t, {}) })
3028
+ ]
3029
+ }
3030
+ );
3031
+ };
3032
+ const Zi = () => {
3033
+ const { t: e } = Ee(), { loginUrl: t } = qe(), s = ps(), { position: r } = Gt();
3034
+ return /* @__PURE__ */ i.jsxs(
3035
+ J,
3036
+ {
3037
+ type: "nav",
3038
+ id: "xtra-menu",
3039
+ position: r,
3040
+ className: "menu--unauthenticated",
3041
+ "aria-label": e("xtraMenuAriaLabel"),
3042
+ children: [
3043
+ /* @__PURE__ */ i.jsx(J.Trigger, { className: N("button", "button--neutral", "button--authentication"), children: /* @__PURE__ */ i.jsxs("button", { children: [
3044
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Kt, { width: 24, height: 24, suffix: "mobile" }) }),
3045
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx($t, {}) })
3046
+ ] }) }),
3047
+ /* @__PURE__ */ i.jsxs(J.Content, { children: [
3048
+ /* @__PURE__ */ i.jsx(J.Item, { children: /* @__PURE__ */ i.jsxs("a", { href: t, className: "button button--with-icon", children: [
3049
+ /* @__PURE__ */ i.jsx("span", { className: "button__icon", children: /* @__PURE__ */ i.jsx(zr, {}) }),
3050
+ /* @__PURE__ */ i.jsx("span", { className: "button__label", children: e("login") })
3051
+ ] }) }),
3052
+ /* @__PURE__ */ i.jsx(J.Item, { children: /* @__PURE__ */ i.jsxs("a", { href: `${s}/onboarding/register`, className: "button button--with-icon", children: [
3053
+ /* @__PURE__ */ i.jsx("span", { className: "button__icon", children: /* @__PURE__ */ i.jsx(si, {}) }),
3054
+ /* @__PURE__ */ i.jsx("span", { className: "button__label", children: e("register") })
3055
+ ] }) })
3056
+ ] })
3057
+ ]
3058
+ }
3059
+ );
3060
+ };
3061
+ var Y = /* @__PURE__ */ ((e) => (e.Authenticated = "authenticated", e.NotAuthenticated = "notAuthenticated", e.Pending = "pending", e))(Y || {});
3062
+ const zi = () => {
3063
+ const { authenticationStatus: e } = Gt();
3064
+ return e === Y.NotAuthenticated ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
3065
+ /* @__PURE__ */ i.jsx(Wi, {}),
3066
+ /* @__PURE__ */ i.jsx(Zi, {})
3067
+ ] }) : e === Y.Pending ? /* @__PURE__ */ i.jsx(Vi, {}) : /* @__PURE__ */ i.jsx(qi, {});
3068
+ };
3069
+ /*! js-cookie v3.0.5 | MIT */
3070
+ function ct(e) {
3071
+ for (var t = 1; t < arguments.length; t++) {
3072
+ var s = arguments[t];
3073
+ for (var r in s)
3074
+ e[r] = s[r];
3075
+ }
3076
+ return e;
3077
+ }
3078
+ var Yi = {
3079
+ read: function(e) {
3080
+ return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
3081
+ },
3082
+ write: function(e) {
3083
+ return encodeURIComponent(e).replace(
3084
+ /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
3085
+ decodeURIComponent
3086
+ );
3087
+ }
3088
+ };
3089
+ function Tt(e, t) {
3090
+ function s(a, o, l) {
3091
+ if (!(typeof document > "u")) {
3092
+ l = ct({}, t, l), typeof l.expires == "number" && (l.expires = new Date(Date.now() + l.expires * 864e5)), l.expires && (l.expires = l.expires.toUTCString()), a = encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
3093
+ var c = "";
3094
+ for (var f in l)
3095
+ l[f] && (c += "; " + f, l[f] !== !0 && (c += "=" + l[f].split(";")[0]));
3096
+ return document.cookie = a + "=" + e.write(o, a) + c;
3097
+ }
3098
+ }
3099
+ function r(a) {
3100
+ if (!(typeof document > "u" || arguments.length && !a)) {
3101
+ for (var o = document.cookie ? document.cookie.split("; ") : [], l = {}, c = 0; c < o.length; c++) {
3102
+ var f = o[c].split("="), g = f.slice(1).join("=");
3103
+ try {
3104
+ var u = decodeURIComponent(f[0]);
3105
+ if (l[u] = e.read(g, u), a === u)
3106
+ break;
3107
+ } catch {
3108
+ }
3109
+ }
3110
+ return a ? l[a] : l;
3111
+ }
3112
+ }
3113
+ return Object.create(
3114
+ {
3115
+ set: s,
3116
+ get: r,
3117
+ remove: function(a, o) {
3118
+ s(
3119
+ a,
3120
+ "",
3121
+ ct({}, o, {
3122
+ expires: -1
3123
+ })
3124
+ );
3125
+ },
3126
+ withAttributes: function(a) {
3127
+ return Tt(this.converter, ct({}, this.attributes, a));
3128
+ },
3129
+ withConverter: function(a) {
3130
+ return Tt(ct({}, this.converter, a), this.attributes);
3131
+ }
3132
+ },
3133
+ {
3134
+ attributes: { value: Object.freeze(t) },
3135
+ converter: { value: Object.freeze(e) }
3136
+ }
3137
+ );
3138
+ }
3139
+ var Ut = Tt(Yi, { path: "/" });
3140
+ class yt extends Error {
3141
+ constructor(t) {
3142
+ super(t), this.name = "UnauthorizedError";
3143
+ }
3144
+ }
3145
+ const Ji = () => {
3146
+ const { i18n: e } = Ee(), { profileEndpoint: t } = qe();
3147
+ return ks({
3148
+ queryKey: ["profile"],
3149
+ queryFn: async () => {
3150
+ const r = await fetch(t, {
3151
+ credentials: "include",
3152
+ mode: "cors",
3153
+ headers: { "Accept-Language": e.language }
3154
+ });
3155
+ if (!r.ok)
3156
+ throw r.status === 401 ? new yt(`${r.status} - ${r.statusText}`) : new Error("Network response was not ok");
3157
+ return await r.json();
3158
+ },
3159
+ retry: (r, a) => a instanceof yt ? !1 : r < 2,
3160
+ refetchOnWindowFocus: !1
3161
+ });
3162
+ }, ts = (e) => e ? `+${e.countryCode} ${e.number}` : "", ss = (e, t) => t == null ? void 0 : t.find((s) => s.type === e), rs = ({ apiUrl: e, redirectUrl: t }) => {
3163
+ const { loginUrl: s } = Gs({ apiUrl: e, redirectUrl: t });
3164
+ window.location.replace(s);
3165
+ }, Xi = (e) => {
3166
+ if (!e)
3167
+ return { user: { state: () => Y.NotAuthenticated }, tryToLogon: rs };
3168
+ const t = new Date(e.dateOfBirth), s = ss(qt.Mobile, e.phone), r = ss(qt.Fixed, e.phone), a = ts(s) ?? ts(r) ?? "";
3169
+ return {
3170
+ user: {
3171
+ firstName: () => e.firstName,
3172
+ lastName: () => e.lastName,
3173
+ dob: () => t.getDate(),
3174
+ mob: () => t.getMonth() + 1,
3175
+ yob: () => t.getFullYear(),
3176
+ gender: () => e.genderCode,
3177
+ phone: () => a,
3178
+ streetName: () => {
3179
+ var o;
3180
+ return (o = e.address) == null ? void 0 : o.streetName;
3181
+ },
3182
+ houseNr: () => {
3183
+ var o;
3184
+ return (o = e.address) == null ? void 0 : o.houseNumber;
3185
+ },
3186
+ box: () => {
3187
+ var o;
3188
+ return (o = e.address) == null ? void 0 : o.letterBoxName;
3189
+ },
3190
+ zip: () => {
3191
+ var o;
3192
+ return (o = e.address) == null ? void 0 : o.postalCode;
3193
+ },
3194
+ city: () => {
3195
+ var o;
3196
+ return (o = e.address) == null ? void 0 : o.locationName;
3197
+ },
3198
+ country: () => {
3199
+ var o;
3200
+ return (o = e.address) == null ? void 0 : o.countryCode;
3201
+ },
3202
+ email: () => e.email,
3203
+ cbh: () => e.customerIdentifier,
3204
+ state: () => Y.Authenticated
3205
+ },
3206
+ tryToLogon: rs
3207
+ };
3208
+ }, Vs = () => {
3209
+ const e = Ji(), t = Ut.get("profile"), s = !!t, [r, a] = d.useState(
3210
+ s ? Y.Authenticated : Y.Pending
3211
+ ), [o, l] = d.useState(
3212
+ s ? JSON.parse(t) : void 0
3213
+ );
3214
+ return d.useEffect(() => {
3215
+ e.isError && e.error instanceof yt && (Ut.remove("profile"), a(Y.NotAuthenticated)), e.isError && !(e.error instanceof yt) && a(
3216
+ s ? Y.Authenticated : Y.NotAuthenticated
3217
+ ), e.isSuccess && (a(Y.Authenticated), l(e.data), window.postMessage(
3218
+ { source: "xtra-authentication", isAuthenticated: !0 },
3219
+ new URL(window.location.href).origin
3220
+ )), window.XTRA = Xi(e.data);
3221
+ }, [
3222
+ s,
3223
+ e.data,
3224
+ e.error,
3225
+ e.isError,
3226
+ e.isSuccess
3227
+ ]), { authenticationStatus: r, profile: o };
3228
+ }, Ii = ({ position: e, bouMenuItems: t }) => {
3229
+ const { authenticationStatus: s, profile: r } = Vs();
3230
+ return /* @__PURE__ */ i.jsx(
3231
+ $i,
3232
+ {
3233
+ bouMenuItems: t,
3234
+ authenticationStatus: s,
3235
+ position: e,
3236
+ profile: r,
3237
+ children: /* @__PURE__ */ i.jsx(zi, {})
3238
+ }
3239
+ );
3240
+ }, Bi = () => {
3241
+ const { postTermsAndConditionsEndpoint: e } = qe(), t = new ws();
3242
+ return Sr({
3243
+ mutationFn: async (r) => {
3244
+ const a = await fetch(e, {
3245
+ method: "post",
3246
+ body: JSON.stringify({ acceptedTC: r }),
3247
+ credentials: "include",
3248
+ mode: "cors"
3249
+ });
3250
+ if (!a.ok)
3251
+ throw new Error("Network response was not ok");
3252
+ return a;
3253
+ },
3254
+ onSuccess: async () => {
3255
+ await t.invalidateQueries({ queryKey: ["gdpr"] });
3256
+ }
3257
+ });
3258
+ }, en = () => {
3259
+ const { i18n: e } = Ee(), { getTermsAndConditionsEndpoint: t } = qe(), { authenticationStatus: s } = Vs(), r = Ut.get("hasAcceptedLatestTermsAndConditions"), a = [], o = r === "true", l = s === Y.Authenticated;
3260
+ return ks({
3261
+ queryKey: ["gdpr"],
3262
+ queryFn: async () => {
3263
+ const f = await fetch(t, {
3264
+ credentials: "include",
3265
+ mode: "cors",
3266
+ headers: { "Accept-Language": e.language }
3267
+ });
3268
+ if (!f.ok)
3269
+ throw new Error("Network response was not ok");
3270
+ return await f.json();
3271
+ },
3272
+ enabled: l && !o,
3273
+ initialData: a
3274
+ });
3275
+ }, tn = () => {
3276
+ const { t: e } = Ee(), { logoutUrl: t } = qs(), s = d.useRef(null), [r, a] = d.useState(0), [o, l] = d.useState({}), { mutate: c, isError: f } = Bi(), { AccessibleFormMessage: g, formRef: u } = Ys({ submitCount: r, errors: o }), { data: C } = en(), w = !!(C != null && C.length), v = e("termsAndConditions.error.required"), b = () => {
3277
+ var m;
3278
+ (m = s == null ? void 0 : s.current) == null || m.click(), document.body.style.removeProperty("overflow");
3279
+ };
3280
+ d.useEffect(() => {
3281
+ w && document.body.style.setProperty("overflow", "hidden");
3282
+ }, [w]), d.useEffect(() => {
3283
+ f && l({ acceptedTC: v });
3284
+ }, [v, f]);
3285
+ const _ = (m) => {
3286
+ m.preventDefault(), a(r + 1);
3287
+ const { acceptedTC: y } = m.target;
3288
+ if (y instanceof RadioNodeList) {
3289
+ const S = Object.values(y);
3290
+ S.every((k) => k.checked) ? (l({}), c(S.map((k) => k.value)), b()) : l({ acceptedTC: v });
3291
+ } else
3292
+ y != null && y.checked ? (l({}), c([y.value]), b()) : l({ acceptedTC: v });
3293
+ };
3294
+ return w ? /* @__PURE__ */ i.jsxs($, { defaultOpen: w, isModal: !0, children: [
3295
+ g,
3296
+ /* @__PURE__ */ i.jsxs($.Root, { children: [
3297
+ /* @__PURE__ */ i.jsx($.Header, { children: /* @__PURE__ */ i.jsx($.Title, { icon: /* @__PURE__ */ i.jsx(Kt, { role: "presentation" }), children: /* @__PURE__ */ i.jsx(an, { children: e("termsAndConditions.title") }) }) }),
3298
+ /* @__PURE__ */ i.jsx($.Body, { children: /* @__PURE__ */ i.jsxs(Ws, { ref: u, id: "tc-form", onSubmit: _, children: [
3299
+ /* @__PURE__ */ i.jsxs(rn, { children: [
3300
+ e("termsAndConditions.description"),
3301
+ o.acceptedTC && /* @__PURE__ */ i.jsx(on, { children: v })
3302
+ ] }),
3303
+ C.map(({ tcCode: m, title: y, URL: S }) => /* @__PURE__ */ i.jsx(
3304
+ _e,
3305
+ {
3306
+ id: m,
3307
+ value: m,
3308
+ name: "acceptedTC",
3309
+ variant: "primary",
3310
+ children: /* @__PURE__ */ i.jsxs(_e.Content, { children: [
3311
+ /* @__PURE__ */ i.jsx(sn, { children: y }),
3312
+ /* @__PURE__ */ i.jsx(nn, { href: S, children: e("termsAndConditions.action", { title: y }) })
3313
+ ] })
3314
+ },
3315
+ m
3316
+ ))
3317
+ ] }) }),
3318
+ /* @__PURE__ */ i.jsxs($.Footer, { children: [
3319
+ /* @__PURE__ */ i.jsx(
3320
+ "a",
3321
+ {
3322
+ className: N("button", "button--secondary", "button--terms-and-conditions"),
3323
+ href: t,
3324
+ children: e("logout")
3325
+ }
3326
+ ),
3327
+ /* @__PURE__ */ i.jsx(at, { form: "tc-form", type: "submit", variant: "primary", children: e("confirm") })
3328
+ ] })
3329
+ ] })
3330
+ ] }) : /* @__PURE__ */ i.jsx(i.Fragment, {});
3331
+ }, sn = ({
3332
+ children: e,
3333
+ ...t
3334
+ }) => /* @__PURE__ */ i.jsx(_e.Label, { className: "form--tc__label", ...t, children: e }), Ws = d.forwardRef(({ children: e, ...t }, s) => /* @__PURE__ */ i.jsx("form", { className: "form--tc", ref: s, ...t, children: e }));
3335
+ Ws.displayName = "TermsAndConditionsForm";
3336
+ const rn = ({
3337
+ children: e,
3338
+ ...t
3339
+ }) => /* @__PURE__ */ i.jsx("p", { className: "form--tc__description", ...t, children: e }), nn = ({ children: e, ...t }) => /* @__PURE__ */ i.jsx(
3340
+ "a",
3341
+ {
3342
+ className: "form--tc__link",
3343
+ target: "_blank",
3344
+ rel: "noreferrer",
3345
+ role: "button",
3346
+ download: !0,
3347
+ ...t,
3348
+ children: e
3349
+ }
3350
+ ), an = ({ children: e }) => /* @__PURE__ */ i.jsx("h1", { className: "form--tc__title", children: e }), on = ({ children: e, ...t }) => /* @__PURE__ */ i.jsx("span", { className: "form--tc__error", role: "alert", ...t, children: e }), ln = new ws(), dn = ({ environment: e, redirectUrl: t, apiUrl: s, position: r, bouMenuItems: a }) => /* @__PURE__ */ i.jsx(Js, { environment: e, children: /* @__PURE__ */ i.jsx(Ki, { apiUrl: s, redirectUrl: t, children: /* @__PURE__ */ i.jsxs(mr, { client: ln, children: [
3351
+ /* @__PURE__ */ i.jsx(Ii, { position: r, bouMenuItems: a }),
3352
+ /* @__PURE__ */ i.jsx(tn, {})
3353
+ ] }) }) });
3354
+ export {
3355
+ dn as default
3356
+ };