@myxtra/authentication-green 2.15.0 → 2.16.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.
- package/README.md +3 -2
- package/dist/{App-DEBNfzli.js → App-ByREaqc2.js} +568 -536
- package/dist/{index-C6YE3hyL.js → index-BtxpGhGV.js} +2192 -2187
- package/dist/xtra-authentication.js +1 -1
- package/package.json +18 -18
|
@@ -11,7 +11,7 @@ var ze = (e, t, s, r) => ({
|
|
|
11
11
|
return n(e, t, r);
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
|
-
import { r as
|
|
14
|
+
import { r as d, j as i, u as Ds, a as Ts, b as je, P as Pt, c as It, d as Us, e as Qs, E as Hs, C as Ks } from "./index-BtxpGhGV.js";
|
|
15
15
|
var He = class {
|
|
16
16
|
constructor() {
|
|
17
17
|
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
|
|
@@ -31,13 +31,13 @@ var He = class {
|
|
|
31
31
|
}, Qe = typeof window > "u" || "Deno" in globalThis;
|
|
32
32
|
function $() {
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function Gs(e, t) {
|
|
35
35
|
return typeof e == "function" ? e(t) : e;
|
|
36
36
|
}
|
|
37
37
|
function nt(e) {
|
|
38
38
|
return typeof e == "number" && e >= 0 && e !== 1 / 0;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function Bt(e, t) {
|
|
41
41
|
return Math.max(e + (t || 0) - Date.now(), 0);
|
|
42
42
|
}
|
|
43
43
|
function Se(e, t) {
|
|
@@ -63,8 +63,8 @@ function At(e, t) {
|
|
|
63
63
|
return !1;
|
|
64
64
|
}
|
|
65
65
|
if (s !== "all") {
|
|
66
|
-
const
|
|
67
|
-
if (s === "active" && !
|
|
66
|
+
const f = t.isActive();
|
|
67
|
+
if (s === "active" && !f || s === "inactive" && f)
|
|
68
68
|
return !1;
|
|
69
69
|
}
|
|
70
70
|
return !(typeof c == "boolean" && t.isStale() !== c || a && a !== t.state.fetchStatus || l && !l(t));
|
|
@@ -94,18 +94,18 @@ function be(e) {
|
|
|
94
94
|
function Ge(e, t) {
|
|
95
95
|
return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? !Object.keys(t).some((s) => !Ge(e[s], t[s])) : !1;
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function es(e, t) {
|
|
98
98
|
if (e === t)
|
|
99
99
|
return e;
|
|
100
100
|
const s = Nt(e) && Nt(t);
|
|
101
101
|
if (s || at(e) && at(t)) {
|
|
102
102
|
const r = s ? e : Object.keys(e), a = r.length, l = s ? t : Object.keys(t), o = l.length, c = s ? [] : {};
|
|
103
|
-
let
|
|
104
|
-
for (let
|
|
105
|
-
const h = s ?
|
|
106
|
-
(!s && r.includes(h) || s) && e[h] === void 0 && t[h] === void 0 ? (c[h] = void 0,
|
|
103
|
+
let f = 0;
|
|
104
|
+
for (let m = 0; m < o; m++) {
|
|
105
|
+
const h = s ? m : l[m];
|
|
106
|
+
(!s && r.includes(h) || s) && e[h] === void 0 && t[h] === void 0 ? (c[h] = void 0, f++) : (c[h] = es(e[h], t[h]), c[h] === e[h] && e[h] !== void 0 && f++);
|
|
107
107
|
}
|
|
108
|
-
return a === o &&
|
|
108
|
+
return a === o && f === a ? e : c;
|
|
109
109
|
}
|
|
110
110
|
return t;
|
|
111
111
|
}
|
|
@@ -132,27 +132,27 @@ function at(e) {
|
|
|
132
132
|
function Mt(e) {
|
|
133
133
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function qs(e) {
|
|
136
136
|
return new Promise((t) => {
|
|
137
137
|
setTimeout(t, e);
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
140
|
function ot(e, t, s) {
|
|
141
|
-
return typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ?
|
|
141
|
+
return typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ? es(e, t) : t;
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function Ws(e, t, s = 0) {
|
|
144
144
|
const r = [...e, t];
|
|
145
145
|
return s && r.length > s ? r.slice(1) : r;
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function Vs(e, t, s = 0) {
|
|
148
148
|
const r = [t, ...e];
|
|
149
149
|
return s && r.length > s ? r.slice(0, -1) : r;
|
|
150
150
|
}
|
|
151
|
-
var
|
|
152
|
-
function
|
|
153
|
-
return !e.queryFn && (t != null && t.initialPromise) ? () => t.initialPromise : !e.queryFn || e.queryFn ===
|
|
151
|
+
var ts = Symbol();
|
|
152
|
+
function ss(e, t) {
|
|
153
|
+
return !e.queryFn && (t != null && t.initialPromise) ? () => t.initialPromise : !e.queryFn || e.queryFn === ts ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
|
|
154
154
|
}
|
|
155
|
-
var pe, ae, Ee,
|
|
155
|
+
var pe, ae, Ee, Gt, $s = (Gt = class extends He {
|
|
156
156
|
constructor() {
|
|
157
157
|
super();
|
|
158
158
|
y(this, pe);
|
|
@@ -193,7 +193,7 @@ var pe, ae, Ee, Kt, Vs = (Kt = class extends He {
|
|
|
193
193
|
var t;
|
|
194
194
|
return typeof n(this, pe) == "boolean" ? n(this, pe) : ((t = globalThis.document) == null ? void 0 : t.visibilityState) !== "hidden";
|
|
195
195
|
}
|
|
196
|
-
}, pe = new WeakMap(), ae = new WeakMap(), Ee = new WeakMap(),
|
|
196
|
+
}, pe = new WeakMap(), ae = new WeakMap(), Ee = new WeakMap(), Gt), bt = new $s(), Pe, oe, Ae, qt, Zs = (qt = class extends He {
|
|
197
197
|
constructor() {
|
|
198
198
|
super();
|
|
199
199
|
y(this, Pe, !0);
|
|
@@ -227,39 +227,39 @@ var pe, ae, Ee, Kt, Vs = (Kt = class extends He {
|
|
|
227
227
|
isOnline() {
|
|
228
228
|
return n(this, Pe);
|
|
229
229
|
}
|
|
230
|
-
}, Pe = new WeakMap(), oe = new WeakMap(), Ae = new WeakMap(),
|
|
231
|
-
function
|
|
230
|
+
}, Pe = new WeakMap(), oe = new WeakMap(), Ae = new WeakMap(), qt), Be = new Zs();
|
|
231
|
+
function Ys(e) {
|
|
232
232
|
return Math.min(1e3 * 2 ** e, 3e4);
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function rs(e) {
|
|
235
235
|
return (e ?? "online") === "online" ? Be.isOnline() : !0;
|
|
236
236
|
}
|
|
237
|
-
var
|
|
237
|
+
var is = class extends Error {
|
|
238
238
|
constructor(e) {
|
|
239
239
|
super("CancelledError"), this.revert = e == null ? void 0 : e.revert, this.silent = e == null ? void 0 : e.silent;
|
|
240
240
|
}
|
|
241
241
|
};
|
|
242
242
|
function it(e) {
|
|
243
|
-
return e instanceof
|
|
243
|
+
return e instanceof is;
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function ns(e) {
|
|
246
246
|
let t = !1, s = 0, r = !1, a, l, o;
|
|
247
247
|
const c = new Promise((C, j) => {
|
|
248
248
|
l = C, o = j;
|
|
249
|
-
}),
|
|
249
|
+
}), f = (C) => {
|
|
250
250
|
var j;
|
|
251
|
-
r || (S(new
|
|
252
|
-
},
|
|
251
|
+
r || (S(new is(C)), (j = e.abort) == null || j.call(e));
|
|
252
|
+
}, m = () => {
|
|
253
253
|
t = !0;
|
|
254
254
|
}, h = () => {
|
|
255
255
|
t = !1;
|
|
256
|
-
}, u = () => bt.isFocused() && (e.networkMode === "always" || Be.isOnline()) && e.canRun(),
|
|
256
|
+
}, u = () => bt.isFocused() && (e.networkMode === "always" || Be.isOnline()) && e.canRun(), v = () => rs(e.networkMode) && e.canRun(), g = (C) => {
|
|
257
257
|
var j;
|
|
258
258
|
r || (r = !0, (j = e.onSuccess) == null || j.call(e, C), a == null || a(), l(C));
|
|
259
259
|
}, S = (C) => {
|
|
260
260
|
var j;
|
|
261
261
|
r || (r = !0, (j = e.onError) == null || j.call(e, C), a == null || a(), o(C));
|
|
262
|
-
},
|
|
262
|
+
}, _ = () => new Promise((C) => {
|
|
263
263
|
var j;
|
|
264
264
|
a = (b) => {
|
|
265
265
|
(r || u()) && C(b);
|
|
@@ -267,7 +267,7 @@ function is(e) {
|
|
|
267
267
|
}).then(() => {
|
|
268
268
|
var C;
|
|
269
269
|
a = void 0, r || (C = e.onContinue) == null || C.call(e);
|
|
270
|
-
}),
|
|
270
|
+
}), P = () => {
|
|
271
271
|
if (r)
|
|
272
272
|
return;
|
|
273
273
|
let C;
|
|
@@ -277,79 +277,90 @@ function is(e) {
|
|
|
277
277
|
} catch (b) {
|
|
278
278
|
C = Promise.reject(b);
|
|
279
279
|
}
|
|
280
|
-
Promise.resolve(C).then(
|
|
281
|
-
var
|
|
280
|
+
Promise.resolve(C).then(g).catch((b) => {
|
|
281
|
+
var A;
|
|
282
282
|
if (r)
|
|
283
283
|
return;
|
|
284
|
-
const M = e.retry ?? (Qe ? 0 : 3),
|
|
284
|
+
const M = e.retry ?? (Qe ? 0 : 3), F = e.retryDelay ?? Ys, J = typeof F == "function" ? F(s, b) : F, te = M === !0 || typeof M == "number" && s < M || typeof M == "function" && M(s, b);
|
|
285
285
|
if (t || !te) {
|
|
286
286
|
S(b);
|
|
287
287
|
return;
|
|
288
288
|
}
|
|
289
|
-
s++, (
|
|
290
|
-
t ? S(b) :
|
|
289
|
+
s++, (A = e.onFail) == null || A.call(e, s, b), qs(J).then(() => u() ? void 0 : _()).then(() => {
|
|
290
|
+
t ? S(b) : P();
|
|
291
291
|
});
|
|
292
292
|
});
|
|
293
293
|
};
|
|
294
294
|
return {
|
|
295
295
|
promise: c,
|
|
296
|
-
cancel:
|
|
296
|
+
cancel: f,
|
|
297
297
|
continue: () => (a == null || a(), c),
|
|
298
|
-
cancelRetry:
|
|
298
|
+
cancelRetry: m,
|
|
299
299
|
continueRetry: h,
|
|
300
|
-
canStart:
|
|
301
|
-
start: () => (
|
|
300
|
+
canStart: v,
|
|
301
|
+
start: () => (v() ? P() : _().then(P), c)
|
|
302
302
|
};
|
|
303
303
|
}
|
|
304
|
-
function
|
|
305
|
-
let e = [], t = 0, s = (
|
|
306
|
-
|
|
307
|
-
}, r = (
|
|
308
|
-
|
|
309
|
-
}, a = (
|
|
310
|
-
const l = (
|
|
311
|
-
a
|
|
312
|
-
|
|
313
|
-
let m;
|
|
314
|
-
t++;
|
|
315
|
-
try {
|
|
316
|
-
m = d();
|
|
317
|
-
} finally {
|
|
318
|
-
t--, t || g();
|
|
319
|
-
}
|
|
320
|
-
return m;
|
|
321
|
-
}, c = (d) => {
|
|
322
|
-
t ? e.push(d) : a(() => {
|
|
323
|
-
s(d);
|
|
324
|
-
});
|
|
325
|
-
}, v = (d) => (...m) => {
|
|
326
|
-
c(() => {
|
|
327
|
-
d(...m);
|
|
304
|
+
function zs() {
|
|
305
|
+
let e = [], t = 0, s = (c) => {
|
|
306
|
+
c();
|
|
307
|
+
}, r = (c) => {
|
|
308
|
+
c();
|
|
309
|
+
}, a = (c) => setTimeout(c, 0);
|
|
310
|
+
const l = (c) => {
|
|
311
|
+
t ? e.push(c) : a(() => {
|
|
312
|
+
s(c);
|
|
328
313
|
});
|
|
329
|
-
},
|
|
330
|
-
const
|
|
331
|
-
e = [],
|
|
314
|
+
}, o = () => {
|
|
315
|
+
const c = e;
|
|
316
|
+
e = [], c.length && a(() => {
|
|
332
317
|
r(() => {
|
|
333
|
-
|
|
334
|
-
s(
|
|
318
|
+
c.forEach((f) => {
|
|
319
|
+
s(f);
|
|
335
320
|
});
|
|
336
321
|
});
|
|
337
322
|
});
|
|
338
323
|
};
|
|
339
324
|
return {
|
|
340
|
-
batch:
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
325
|
+
batch: (c) => {
|
|
326
|
+
let f;
|
|
327
|
+
t++;
|
|
328
|
+
try {
|
|
329
|
+
f = c();
|
|
330
|
+
} finally {
|
|
331
|
+
t--, t || o();
|
|
332
|
+
}
|
|
333
|
+
return f;
|
|
334
|
+
},
|
|
335
|
+
/**
|
|
336
|
+
* All calls to the wrapped function will be batched.
|
|
337
|
+
*/
|
|
338
|
+
batchCalls: (c) => (...f) => {
|
|
339
|
+
l(() => {
|
|
340
|
+
c(...f);
|
|
341
|
+
});
|
|
342
|
+
},
|
|
343
|
+
schedule: l,
|
|
344
|
+
/**
|
|
345
|
+
* Use this method to set a custom notify function.
|
|
346
|
+
* This can be used to for example wrap notifications with `React.act` while running tests.
|
|
347
|
+
*/
|
|
348
|
+
setNotifyFunction: (c) => {
|
|
349
|
+
s = c;
|
|
345
350
|
},
|
|
346
|
-
|
|
347
|
-
|
|
351
|
+
/**
|
|
352
|
+
* Use this method to set a custom function to batch notifications together into a single tick.
|
|
353
|
+
* By default React Query will use the batch function provided by ReactDOM or React Native.
|
|
354
|
+
*/
|
|
355
|
+
setBatchNotifyFunction: (c) => {
|
|
356
|
+
r = c;
|
|
348
357
|
},
|
|
349
|
-
setScheduler:
|
|
358
|
+
setScheduler: (c) => {
|
|
359
|
+
a = c;
|
|
360
|
+
}
|
|
350
361
|
};
|
|
351
362
|
}
|
|
352
|
-
var D =
|
|
363
|
+
var D = zs(), me, Wt, as = (Wt = class {
|
|
353
364
|
constructor() {
|
|
354
365
|
y(this, me);
|
|
355
366
|
}
|
|
@@ -370,7 +381,7 @@ var D = Ys(), me, qt, ns = (qt = class {
|
|
|
370
381
|
clearGcTimeout() {
|
|
371
382
|
n(this, me) && (clearTimeout(n(this, me)), p(this, me, void 0));
|
|
372
383
|
}
|
|
373
|
-
}, me = new WeakMap(),
|
|
384
|
+
}, me = new WeakMap(), Wt), ke, Ne, V, T, qe, ve, Y, se, Vt, Js = (Vt = class extends as {
|
|
374
385
|
constructor(t) {
|
|
375
386
|
super();
|
|
376
387
|
y(this, Y);
|
|
@@ -380,7 +391,7 @@ var D = Ys(), me, qt, ns = (qt = class {
|
|
|
380
391
|
y(this, T);
|
|
381
392
|
y(this, qe);
|
|
382
393
|
y(this, ve);
|
|
383
|
-
p(this, ve, !1), p(this, qe, t.defaultOptions), this.setOptions(t.options), this.observers = [], p(this, V, t.cache), this.queryKey = t.queryKey, this.queryHash = t.queryHash, p(this, ke,
|
|
394
|
+
p(this, ve, !1), p(this, qe, t.defaultOptions), this.setOptions(t.options), this.observers = [], p(this, V, t.cache), this.queryKey = t.queryKey, this.queryHash = t.queryHash, p(this, ke, Xs(this.options)), this.state = t.state ?? n(this, ke), this.scheduleGc();
|
|
384
395
|
}
|
|
385
396
|
get meta() {
|
|
386
397
|
return this.options.meta;
|
|
@@ -432,7 +443,7 @@ var D = Ys(), me, qt, ns = (qt = class {
|
|
|
432
443
|
) : this.state.data === void 0;
|
|
433
444
|
}
|
|
434
445
|
isStaleByTime(t = 0) {
|
|
435
|
-
return this.state.isInvalidated || this.state.data === void 0 || !
|
|
446
|
+
return this.state.isInvalidated || this.state.data === void 0 || !Bt(this.state.dataUpdatedAt, t);
|
|
436
447
|
}
|
|
437
448
|
onFocus() {
|
|
438
449
|
var s;
|
|
@@ -457,7 +468,7 @@ var D = Ys(), me, qt, ns = (qt = class {
|
|
|
457
468
|
this.state.isInvalidated || w(this, Y, se).call(this, { type: "invalidate" });
|
|
458
469
|
}
|
|
459
470
|
fetch(t, s) {
|
|
460
|
-
var
|
|
471
|
+
var f, m, h;
|
|
461
472
|
if (this.state.fetchStatus !== "idle") {
|
|
462
473
|
if (this.state.data !== void 0 && (s != null && s.cancelRefetch))
|
|
463
474
|
this.cancel({ silent: !0 });
|
|
@@ -465,7 +476,7 @@ var D = Ys(), me, qt, ns = (qt = class {
|
|
|
465
476
|
return n(this, T).continueRetry(), n(this, T).promise;
|
|
466
477
|
}
|
|
467
478
|
if (t && this.setOptions(t), !this.options.queryFn) {
|
|
468
|
-
const u = this.observers.find((
|
|
479
|
+
const u = this.observers.find((v) => v.options.queryFn);
|
|
469
480
|
u && this.setOptions(u.options);
|
|
470
481
|
}
|
|
471
482
|
const r = new AbortController(), a = (u) => {
|
|
@@ -474,15 +485,15 @@ var D = Ys(), me, qt, ns = (qt = class {
|
|
|
474
485
|
get: () => (p(this, ve, !0), r.signal)
|
|
475
486
|
});
|
|
476
487
|
}, l = () => {
|
|
477
|
-
const u =
|
|
488
|
+
const u = ss(this.options, s), v = {
|
|
478
489
|
queryKey: this.queryKey,
|
|
479
490
|
meta: this.meta
|
|
480
491
|
};
|
|
481
|
-
return a(
|
|
492
|
+
return a(v), p(this, ve, !1), this.options.persister ? this.options.persister(
|
|
482
493
|
u,
|
|
483
|
-
|
|
494
|
+
v,
|
|
484
495
|
this
|
|
485
|
-
) : u(
|
|
496
|
+
) : u(v);
|
|
486
497
|
}, o = {
|
|
487
498
|
fetchOptions: s,
|
|
488
499
|
options: this.options,
|
|
@@ -490,37 +501,43 @@ var D = Ys(), me, qt, ns = (qt = class {
|
|
|
490
501
|
state: this.state,
|
|
491
502
|
fetchFn: l
|
|
492
503
|
};
|
|
493
|
-
a(o), (
|
|
504
|
+
a(o), (f = this.options.behavior) == null || f.onFetch(
|
|
494
505
|
o,
|
|
495
506
|
this
|
|
496
|
-
), p(this, Ne, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((
|
|
507
|
+
), p(this, Ne, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((m = o.fetchOptions) == null ? void 0 : m.meta)) && w(this, Y, se).call(this, { type: "fetch", meta: (h = o.fetchOptions) == null ? void 0 : h.meta });
|
|
497
508
|
const c = (u) => {
|
|
498
|
-
var
|
|
509
|
+
var v, g, S, _;
|
|
499
510
|
it(u) && u.silent || w(this, Y, se).call(this, {
|
|
500
511
|
type: "error",
|
|
501
512
|
error: u
|
|
502
|
-
}), it(u) || ((
|
|
503
|
-
|
|
513
|
+
}), it(u) || ((g = (v = n(this, V).config).onError) == null || g.call(
|
|
514
|
+
v,
|
|
504
515
|
u,
|
|
505
516
|
this
|
|
506
|
-
), (
|
|
517
|
+
), (_ = (S = n(this, V).config).onSettled) == null || _.call(
|
|
507
518
|
S,
|
|
508
519
|
this.state.data,
|
|
509
520
|
u,
|
|
510
521
|
this
|
|
511
522
|
)), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
|
|
512
523
|
};
|
|
513
|
-
return p(this, T,
|
|
524
|
+
return p(this, T, ns({
|
|
514
525
|
initialPromise: s == null ? void 0 : s.initialPromise,
|
|
515
526
|
fn: o.fetchFn,
|
|
516
527
|
abort: r.abort.bind(r),
|
|
517
528
|
onSuccess: (u) => {
|
|
518
|
-
var
|
|
529
|
+
var v, g, S, _;
|
|
519
530
|
if (u === void 0) {
|
|
520
531
|
c(new Error(`${this.queryHash} data is undefined`));
|
|
521
532
|
return;
|
|
522
533
|
}
|
|
523
|
-
|
|
534
|
+
try {
|
|
535
|
+
this.setData(u);
|
|
536
|
+
} catch (P) {
|
|
537
|
+
c(P);
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
(g = (v = n(this, V).config).onSuccess) == null || g.call(v, u, this), (_ = (S = n(this, V).config).onSettled) == null || _.call(
|
|
524
541
|
S,
|
|
525
542
|
u,
|
|
526
543
|
this.state.error,
|
|
@@ -528,8 +545,8 @@ var D = Ys(), me, qt, ns = (qt = class {
|
|
|
528
545
|
), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
|
|
529
546
|
},
|
|
530
547
|
onError: c,
|
|
531
|
-
onFail: (u,
|
|
532
|
-
w(this, Y, se).call(this, { type: "failed", failureCount: u, error:
|
|
548
|
+
onFail: (u, v) => {
|
|
549
|
+
w(this, Y, se).call(this, { type: "failed", failureCount: u, error: v });
|
|
533
550
|
},
|
|
534
551
|
onPause: () => {
|
|
535
552
|
w(this, Y, se).call(this, { type: "pause" });
|
|
@@ -565,7 +582,7 @@ var D = Ys(), me, qt, ns = (qt = class {
|
|
|
565
582
|
case "fetch":
|
|
566
583
|
return {
|
|
567
584
|
...r,
|
|
568
|
-
...
|
|
585
|
+
...os(r.data, this.options),
|
|
569
586
|
fetchMeta: t.meta ?? null
|
|
570
587
|
};
|
|
571
588
|
case "success":
|
|
@@ -612,19 +629,19 @@ var D = Ys(), me, qt, ns = (qt = class {
|
|
|
612
629
|
r.onQueryUpdate();
|
|
613
630
|
}), n(this, V).notify({ query: this, type: "updated", action: t });
|
|
614
631
|
});
|
|
615
|
-
},
|
|
616
|
-
function
|
|
632
|
+
}, Vt);
|
|
633
|
+
function os(e, t) {
|
|
617
634
|
return {
|
|
618
635
|
fetchFailureCount: 0,
|
|
619
636
|
fetchFailureReason: null,
|
|
620
|
-
fetchStatus:
|
|
637
|
+
fetchStatus: rs(t.networkMode) ? "fetching" : "paused",
|
|
621
638
|
...e === void 0 && {
|
|
622
639
|
error: null,
|
|
623
640
|
status: "pending"
|
|
624
641
|
}
|
|
625
642
|
};
|
|
626
643
|
}
|
|
627
|
-
function
|
|
644
|
+
function Xs(e) {
|
|
628
645
|
const t = typeof e.initialData == "function" ? e.initialData() : e.initialData, s = t !== void 0, r = s ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
|
|
629
646
|
return {
|
|
630
647
|
data: t,
|
|
@@ -641,7 +658,7 @@ function Js(e) {
|
|
|
641
658
|
fetchStatus: "idle"
|
|
642
659
|
};
|
|
643
660
|
}
|
|
644
|
-
var X,
|
|
661
|
+
var X, $t, Is = ($t = class extends He {
|
|
645
662
|
constructor(t = {}) {
|
|
646
663
|
super();
|
|
647
664
|
y(this, X);
|
|
@@ -650,7 +667,7 @@ var X, Vt, Xs = (Vt = class extends He {
|
|
|
650
667
|
build(t, s, r) {
|
|
651
668
|
const a = s.queryKey, l = s.queryHash ?? xt(a, s);
|
|
652
669
|
let o = this.get(l);
|
|
653
|
-
return o || (o = new
|
|
670
|
+
return o || (o = new Js({
|
|
654
671
|
cache: this,
|
|
655
672
|
queryKey: a,
|
|
656
673
|
queryHash: l,
|
|
@@ -713,14 +730,14 @@ var X, Vt, Xs = (Vt = class extends He {
|
|
|
713
730
|
});
|
|
714
731
|
});
|
|
715
732
|
}
|
|
716
|
-
}, X = new WeakMap(),
|
|
733
|
+
}, X = new WeakMap(), $t), I, U, ge, B, ne, Zt, Bs = (Zt = class extends as {
|
|
717
734
|
constructor(t) {
|
|
718
735
|
super();
|
|
719
736
|
y(this, B);
|
|
720
737
|
y(this, I);
|
|
721
738
|
y(this, U);
|
|
722
739
|
y(this, ge);
|
|
723
|
-
this.mutationId = t.mutationId, p(this, U, t.mutationCache), p(this, I, []), this.state = t.state ||
|
|
740
|
+
this.mutationId = t.mutationId, p(this, U, t.mutationCache), p(this, I, []), this.state = t.state || ls(), this.setOptions(t.options), this.scheduleGc();
|
|
724
741
|
}
|
|
725
742
|
setOptions(t) {
|
|
726
743
|
this.options = t, this.updateGcTime(this.options.gcTime);
|
|
@@ -751,11 +768,11 @@ var X, Vt, Xs = (Vt = class extends He {
|
|
|
751
768
|
this.execute(this.state.variables);
|
|
752
769
|
}
|
|
753
770
|
async execute(t) {
|
|
754
|
-
var a, l, o, c,
|
|
755
|
-
p(this, ge,
|
|
771
|
+
var a, l, o, c, f, m, h, u, v, g, S, _, P, C, j, b, M, F, J, te;
|
|
772
|
+
p(this, ge, ns({
|
|
756
773
|
fn: () => this.options.mutationFn ? this.options.mutationFn(t) : Promise.reject(new Error("No mutationFn found")),
|
|
757
|
-
onFail: (
|
|
758
|
-
w(this, B, ne).call(this, { type: "failed", failureCount:
|
|
774
|
+
onFail: (A, Z) => {
|
|
775
|
+
w(this, B, ne).call(this, { type: "failed", failureCount: A, error: Z });
|
|
759
776
|
},
|
|
760
777
|
onPause: () => {
|
|
761
778
|
w(this, B, ne).call(this, { type: "pause" });
|
|
@@ -784,50 +801,50 @@ var X, Vt, Xs = (Vt = class extends He {
|
|
|
784
801
|
isPaused: r
|
|
785
802
|
});
|
|
786
803
|
}
|
|
787
|
-
const
|
|
788
|
-
return await ((
|
|
789
|
-
|
|
790
|
-
|
|
804
|
+
const A = await n(this, ge).start();
|
|
805
|
+
return await ((m = (f = n(this, U).config).onSuccess) == null ? void 0 : m.call(
|
|
806
|
+
f,
|
|
807
|
+
A,
|
|
791
808
|
t,
|
|
792
809
|
this.state.context,
|
|
793
810
|
this
|
|
794
|
-
)), await ((u = (h = this.options).onSuccess) == null ? void 0 : u.call(h,
|
|
795
|
-
|
|
796
|
-
|
|
811
|
+
)), await ((u = (h = this.options).onSuccess) == null ? void 0 : u.call(h, A, t, this.state.context)), await ((g = (v = n(this, U).config).onSettled) == null ? void 0 : g.call(
|
|
812
|
+
v,
|
|
813
|
+
A,
|
|
797
814
|
null,
|
|
798
815
|
this.state.variables,
|
|
799
816
|
this.state.context,
|
|
800
817
|
this
|
|
801
|
-
)), await ((
|
|
802
|
-
} catch (
|
|
818
|
+
)), await ((_ = (S = this.options).onSettled) == null ? void 0 : _.call(S, A, null, t, this.state.context)), w(this, B, ne).call(this, { type: "success", data: A }), A;
|
|
819
|
+
} catch (A) {
|
|
803
820
|
try {
|
|
804
|
-
throw await ((C = (
|
|
805
|
-
|
|
806
|
-
|
|
821
|
+
throw await ((C = (P = n(this, U).config).onError) == null ? void 0 : C.call(
|
|
822
|
+
P,
|
|
823
|
+
A,
|
|
807
824
|
t,
|
|
808
825
|
this.state.context,
|
|
809
826
|
this
|
|
810
827
|
)), await ((b = (j = this.options).onError) == null ? void 0 : b.call(
|
|
811
828
|
j,
|
|
812
|
-
|
|
829
|
+
A,
|
|
813
830
|
t,
|
|
814
831
|
this.state.context
|
|
815
|
-
)), await ((
|
|
832
|
+
)), await ((F = (M = n(this, U).config).onSettled) == null ? void 0 : F.call(
|
|
816
833
|
M,
|
|
817
834
|
void 0,
|
|
818
|
-
|
|
835
|
+
A,
|
|
819
836
|
this.state.variables,
|
|
820
837
|
this.state.context,
|
|
821
838
|
this
|
|
822
839
|
)), await ((te = (J = this.options).onSettled) == null ? void 0 : te.call(
|
|
823
840
|
J,
|
|
824
841
|
void 0,
|
|
825
|
-
|
|
842
|
+
A,
|
|
826
843
|
t,
|
|
827
844
|
this.state.context
|
|
828
|
-
)),
|
|
845
|
+
)), A;
|
|
829
846
|
} finally {
|
|
830
|
-
w(this, B, ne).call(this, { type: "error", error:
|
|
847
|
+
w(this, B, ne).call(this, { type: "error", error: A });
|
|
831
848
|
}
|
|
832
849
|
} finally {
|
|
833
850
|
n(this, U).runNext(this);
|
|
@@ -896,8 +913,8 @@ var X, Vt, Xs = (Vt = class extends He {
|
|
|
896
913
|
action: t
|
|
897
914
|
});
|
|
898
915
|
});
|
|
899
|
-
},
|
|
900
|
-
function
|
|
916
|
+
}, Zt);
|
|
917
|
+
function ls() {
|
|
901
918
|
return {
|
|
902
919
|
context: void 0,
|
|
903
920
|
data: void 0,
|
|
@@ -910,7 +927,7 @@ function os() {
|
|
|
910
927
|
submittedAt: 0
|
|
911
928
|
};
|
|
912
929
|
}
|
|
913
|
-
var q, We,
|
|
930
|
+
var q, We, Yt, er = (Yt = class extends He {
|
|
914
931
|
constructor(t = {}) {
|
|
915
932
|
super();
|
|
916
933
|
y(this, q);
|
|
@@ -918,7 +935,7 @@ var q, We, Zt, Bs = (Zt = class extends He {
|
|
|
918
935
|
this.config = t, p(this, q, /* @__PURE__ */ new Map()), p(this, We, Date.now());
|
|
919
936
|
}
|
|
920
937
|
build(t, s, r) {
|
|
921
|
-
const a = new
|
|
938
|
+
const a = new Bs({
|
|
922
939
|
mutationCache: this,
|
|
923
940
|
mutationId: ++ze(this, We)._,
|
|
924
941
|
options: t.defaultMutationOptions(s),
|
|
@@ -983,72 +1000,68 @@ var q, We, Zt, Bs = (Zt = class extends He {
|
|
|
983
1000
|
)
|
|
984
1001
|
);
|
|
985
1002
|
}
|
|
986
|
-
}, q = new WeakMap(), We = new WeakMap(),
|
|
1003
|
+
}, q = new WeakMap(), We = new WeakMap(), Yt);
|
|
987
1004
|
function Je(e) {
|
|
988
1005
|
var t;
|
|
989
1006
|
return ((t = e.options.scope) == null ? void 0 : t.id) ?? String(e.mutationId);
|
|
990
1007
|
}
|
|
991
|
-
function
|
|
1008
|
+
function Ot(e) {
|
|
992
1009
|
return {
|
|
993
1010
|
onFetch: (t, s) => {
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
1011
|
+
var h, u, v, g, S;
|
|
1012
|
+
const r = t.options, a = (v = (u = (h = t.fetchOptions) == null ? void 0 : h.meta) == null ? void 0 : u.fetchMore) == null ? void 0 : v.direction, l = ((g = t.state.data) == null ? void 0 : g.pages) || [], o = ((S = t.state.data) == null ? void 0 : S.pageParams) || [];
|
|
1013
|
+
let c = { pages: [], pageParams: [] }, f = 0;
|
|
1014
|
+
const m = async () => {
|
|
1015
|
+
let _ = !1;
|
|
1016
|
+
const P = (b) => {
|
|
999
1017
|
Object.defineProperty(b, "signal", {
|
|
1000
1018
|
enumerable: !0,
|
|
1001
|
-
get: () => (t.signal.aborted ?
|
|
1002
|
-
|
|
1019
|
+
get: () => (t.signal.aborted ? _ = !0 : t.signal.addEventListener("abort", () => {
|
|
1020
|
+
_ = !0;
|
|
1003
1021
|
}), t.signal)
|
|
1004
1022
|
});
|
|
1005
|
-
},
|
|
1006
|
-
if (
|
|
1023
|
+
}, C = ss(t.options, t.fetchOptions), j = async (b, M, F) => {
|
|
1024
|
+
if (_)
|
|
1007
1025
|
return Promise.reject();
|
|
1008
1026
|
if (M == null && b.pages.length)
|
|
1009
1027
|
return Promise.resolve(b);
|
|
1010
1028
|
const J = {
|
|
1011
1029
|
queryKey: t.queryKey,
|
|
1012
1030
|
pageParam: M,
|
|
1013
|
-
direction:
|
|
1031
|
+
direction: F ? "backward" : "forward",
|
|
1014
1032
|
meta: t.options.meta
|
|
1015
1033
|
};
|
|
1016
|
-
|
|
1017
|
-
const te = await
|
|
1034
|
+
P(J);
|
|
1035
|
+
const te = await C(
|
|
1018
1036
|
J
|
|
1019
|
-
), { maxPages:
|
|
1037
|
+
), { maxPages: A } = t.options, Z = F ? Vs : Ws;
|
|
1020
1038
|
return {
|
|
1021
|
-
pages: Z(b.pages, te,
|
|
1022
|
-
pageParams: Z(b.pageParams, M,
|
|
1039
|
+
pages: Z(b.pages, te, A),
|
|
1040
|
+
pageParams: Z(b.pageParams, M, A)
|
|
1023
1041
|
};
|
|
1024
1042
|
};
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
m = await d(R, J, b);
|
|
1043
|
+
if (a && l.length) {
|
|
1044
|
+
const b = a === "backward", M = b ? tr : Rt, F = {
|
|
1045
|
+
pages: l,
|
|
1046
|
+
pageParams: o
|
|
1047
|
+
}, J = M(r, F);
|
|
1048
|
+
c = await j(F, J, b);
|
|
1032
1049
|
} else {
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
const b = e ?? o.length;
|
|
1038
|
-
for (let M = 1; M < b; M++) {
|
|
1039
|
-
const R = Ot(a, m);
|
|
1040
|
-
if (R == null)
|
|
1050
|
+
const b = e ?? l.length;
|
|
1051
|
+
do {
|
|
1052
|
+
const M = f === 0 ? o[0] ?? r.initialPageParam : Rt(r, c);
|
|
1053
|
+
if (f > 0 && M == null)
|
|
1041
1054
|
break;
|
|
1042
|
-
|
|
1043
|
-
}
|
|
1055
|
+
c = await j(c, M), f++;
|
|
1056
|
+
} while (f < b);
|
|
1044
1057
|
}
|
|
1045
|
-
return
|
|
1058
|
+
return c;
|
|
1046
1059
|
};
|
|
1047
1060
|
t.options.persister ? t.fetchFn = () => {
|
|
1048
|
-
var
|
|
1049
|
-
return (
|
|
1050
|
-
|
|
1051
|
-
|
|
1061
|
+
var _, P;
|
|
1062
|
+
return (P = (_ = t.options).persister) == null ? void 0 : P.call(
|
|
1063
|
+
_,
|
|
1064
|
+
m,
|
|
1052
1065
|
{
|
|
1053
1066
|
queryKey: t.queryKey,
|
|
1054
1067
|
meta: t.options.meta,
|
|
@@ -1056,11 +1069,11 @@ function er(e) {
|
|
|
1056
1069
|
},
|
|
1057
1070
|
s
|
|
1058
1071
|
);
|
|
1059
|
-
} : t.fetchFn =
|
|
1072
|
+
} : t.fetchFn = m;
|
|
1060
1073
|
}
|
|
1061
1074
|
};
|
|
1062
1075
|
}
|
|
1063
|
-
function
|
|
1076
|
+
function Rt(e, { pages: t, pageParams: s }) {
|
|
1064
1077
|
const r = t.length - 1;
|
|
1065
1078
|
return t.length > 0 ? e.getNextPageParam(
|
|
1066
1079
|
t[r],
|
|
@@ -1073,9 +1086,9 @@ function tr(e, { pages: t, pageParams: s }) {
|
|
|
1073
1086
|
var r;
|
|
1074
1087
|
return t.length > 0 ? (r = e.getPreviousPageParam) == null ? void 0 : r.call(e, t[0], t, s[0], s) : void 0;
|
|
1075
1088
|
}
|
|
1076
|
-
var
|
|
1089
|
+
var R, le, ce, Me, Oe, ue, Re, Le, zt, cs = (zt = class {
|
|
1077
1090
|
constructor(e = {}) {
|
|
1078
|
-
y(this,
|
|
1091
|
+
y(this, R);
|
|
1079
1092
|
y(this, le);
|
|
1080
1093
|
y(this, ce);
|
|
1081
1094
|
y(this, Me);
|
|
@@ -1083,13 +1096,13 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
|
|
|
1083
1096
|
y(this, ue);
|
|
1084
1097
|
y(this, Re);
|
|
1085
1098
|
y(this, Le);
|
|
1086
|
-
p(this,
|
|
1099
|
+
p(this, R, e.queryCache || new Is()), p(this, le, e.mutationCache || new er()), p(this, ce, e.defaultOptions || {}), p(this, Me, /* @__PURE__ */ new Map()), p(this, Oe, /* @__PURE__ */ new Map()), p(this, ue, 0);
|
|
1087
1100
|
}
|
|
1088
1101
|
mount() {
|
|
1089
1102
|
ze(this, ue)._++, n(this, ue) === 1 && (p(this, Re, bt.subscribe(async (e) => {
|
|
1090
|
-
e && (await this.resumePausedMutations(), n(this,
|
|
1103
|
+
e && (await this.resumePausedMutations(), n(this, R).onFocus());
|
|
1091
1104
|
})), p(this, Le, Be.subscribe(async (e) => {
|
|
1092
|
-
e && (await this.resumePausedMutations(), n(this,
|
|
1105
|
+
e && (await this.resumePausedMutations(), n(this, R).onOnline());
|
|
1093
1106
|
})));
|
|
1094
1107
|
}
|
|
1095
1108
|
unmount() {
|
|
@@ -1097,7 +1110,7 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
|
|
|
1097
1110
|
ze(this, ue)._--, n(this, ue) === 0 && ((e = n(this, Re)) == null || e.call(this), p(this, Re, void 0), (t = n(this, Le)) == null || t.call(this), p(this, Le, void 0));
|
|
1098
1111
|
}
|
|
1099
1112
|
isFetching(e) {
|
|
1100
|
-
return n(this,
|
|
1113
|
+
return n(this, R).findAll({ ...e, fetchStatus: "fetching" }).length;
|
|
1101
1114
|
}
|
|
1102
1115
|
isMutating(e) {
|
|
1103
1116
|
return n(this, le).findAll({ ...e, status: "pending" }).length;
|
|
@@ -1105,33 +1118,33 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
|
|
|
1105
1118
|
getQueryData(e) {
|
|
1106
1119
|
var s;
|
|
1107
1120
|
const t = this.defaultQueryOptions({ queryKey: e });
|
|
1108
|
-
return (s = n(this,
|
|
1121
|
+
return (s = n(this, R).get(t.queryHash)) == null ? void 0 : s.state.data;
|
|
1109
1122
|
}
|
|
1110
1123
|
ensureQueryData(e) {
|
|
1111
1124
|
const t = this.getQueryData(e.queryKey);
|
|
1112
1125
|
if (t === void 0)
|
|
1113
1126
|
return this.fetchQuery(e);
|
|
1114
1127
|
{
|
|
1115
|
-
const s = this.defaultQueryOptions(e), r = n(this,
|
|
1128
|
+
const s = this.defaultQueryOptions(e), r = n(this, R).build(this, s);
|
|
1116
1129
|
return e.revalidateIfStale && r.isStaleByTime(Se(s.staleTime, r)) && this.prefetchQuery(s), Promise.resolve(t);
|
|
1117
1130
|
}
|
|
1118
1131
|
}
|
|
1119
1132
|
getQueriesData(e) {
|
|
1120
|
-
return n(this,
|
|
1133
|
+
return n(this, R).findAll(e).map(({ queryKey: t, state: s }) => {
|
|
1121
1134
|
const r = s.data;
|
|
1122
1135
|
return [t, r];
|
|
1123
1136
|
});
|
|
1124
1137
|
}
|
|
1125
1138
|
setQueryData(e, t, s) {
|
|
1126
|
-
const r = this.defaultQueryOptions({ queryKey: e }), a = n(this,
|
|
1139
|
+
const r = this.defaultQueryOptions({ queryKey: e }), a = n(this, R).get(
|
|
1127
1140
|
r.queryHash
|
|
1128
|
-
), l = a == null ? void 0 : a.state.data, o =
|
|
1141
|
+
), l = a == null ? void 0 : a.state.data, o = Gs(t, l);
|
|
1129
1142
|
if (o !== void 0)
|
|
1130
|
-
return n(this,
|
|
1143
|
+
return n(this, R).build(this, r).setData(o, { ...s, manual: !0 });
|
|
1131
1144
|
}
|
|
1132
1145
|
setQueriesData(e, t, s) {
|
|
1133
1146
|
return D.batch(
|
|
1134
|
-
() => n(this,
|
|
1147
|
+
() => n(this, R).findAll(e).map(({ queryKey: r }) => [
|
|
1135
1148
|
r,
|
|
1136
1149
|
this.setQueryData(r, t, s)
|
|
1137
1150
|
])
|
|
@@ -1140,10 +1153,10 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
|
|
|
1140
1153
|
getQueryState(e) {
|
|
1141
1154
|
var s;
|
|
1142
1155
|
const t = this.defaultQueryOptions({ queryKey: e });
|
|
1143
|
-
return (s = n(this,
|
|
1156
|
+
return (s = n(this, R).get(t.queryHash)) == null ? void 0 : s.state;
|
|
1144
1157
|
}
|
|
1145
1158
|
removeQueries(e) {
|
|
1146
|
-
const t = n(this,
|
|
1159
|
+
const t = n(this, R);
|
|
1147
1160
|
D.batch(() => {
|
|
1148
1161
|
t.findAll(e).forEach((s) => {
|
|
1149
1162
|
t.remove(s);
|
|
@@ -1151,7 +1164,7 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
|
|
|
1151
1164
|
});
|
|
1152
1165
|
}
|
|
1153
1166
|
resetQueries(e, t) {
|
|
1154
|
-
const s = n(this,
|
|
1167
|
+
const s = n(this, R), r = {
|
|
1155
1168
|
type: "active",
|
|
1156
1169
|
...e
|
|
1157
1170
|
};
|
|
@@ -1161,13 +1174,13 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
|
|
|
1161
1174
|
}
|
|
1162
1175
|
cancelQueries(e = {}, t = {}) {
|
|
1163
1176
|
const s = { revert: !0, ...t }, r = D.batch(
|
|
1164
|
-
() => n(this,
|
|
1177
|
+
() => n(this, R).findAll(e).map((a) => a.cancel(s))
|
|
1165
1178
|
);
|
|
1166
1179
|
return Promise.all(r).then($).catch($);
|
|
1167
1180
|
}
|
|
1168
1181
|
invalidateQueries(e = {}, t = {}) {
|
|
1169
1182
|
return D.batch(() => {
|
|
1170
|
-
if (n(this,
|
|
1183
|
+
if (n(this, R).findAll(e).forEach((r) => {
|
|
1171
1184
|
r.invalidate();
|
|
1172
1185
|
}), e.refetchType === "none")
|
|
1173
1186
|
return Promise.resolve();
|
|
@@ -1183,7 +1196,7 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
|
|
|
1183
1196
|
...t,
|
|
1184
1197
|
cancelRefetch: (t == null ? void 0 : t.cancelRefetch) ?? !0
|
|
1185
1198
|
}, r = D.batch(
|
|
1186
|
-
() => n(this,
|
|
1199
|
+
() => n(this, R).findAll(e).filter((a) => !a.isDisabled()).map((a) => {
|
|
1187
1200
|
let l = a.fetch(void 0, s);
|
|
1188
1201
|
return s.throwOnError || (l = l.catch($)), a.state.fetchStatus === "paused" ? Promise.resolve() : l;
|
|
1189
1202
|
})
|
|
@@ -1193,7 +1206,7 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
|
|
|
1193
1206
|
fetchQuery(e) {
|
|
1194
1207
|
const t = this.defaultQueryOptions(e);
|
|
1195
1208
|
t.retry === void 0 && (t.retry = !1);
|
|
1196
|
-
const s = n(this,
|
|
1209
|
+
const s = n(this, R).build(this, t);
|
|
1197
1210
|
return s.isStaleByTime(
|
|
1198
1211
|
Se(t.staleTime, s)
|
|
1199
1212
|
) ? s.fetch(t) : Promise.resolve(s.state.data);
|
|
@@ -1202,16 +1215,19 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
|
|
|
1202
1215
|
return this.fetchQuery(e).then($).catch($);
|
|
1203
1216
|
}
|
|
1204
1217
|
fetchInfiniteQuery(e) {
|
|
1205
|
-
return e.behavior =
|
|
1218
|
+
return e.behavior = Ot(e.pages), this.fetchQuery(e);
|
|
1206
1219
|
}
|
|
1207
1220
|
prefetchInfiniteQuery(e) {
|
|
1208
1221
|
return this.fetchInfiniteQuery(e).then($).catch($);
|
|
1209
1222
|
}
|
|
1223
|
+
ensureInfiniteQueryData(e) {
|
|
1224
|
+
return e.behavior = Ot(e.pages), this.ensureQueryData(e);
|
|
1225
|
+
}
|
|
1210
1226
|
resumePausedMutations() {
|
|
1211
1227
|
return Be.isOnline() ? n(this, le).resumePausedMutations() : Promise.resolve();
|
|
1212
1228
|
}
|
|
1213
1229
|
getQueryCache() {
|
|
1214
|
-
return n(this,
|
|
1230
|
+
return n(this, R);
|
|
1215
1231
|
}
|
|
1216
1232
|
getMutationCache() {
|
|
1217
1233
|
return n(this, le);
|
|
@@ -1260,7 +1276,7 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
|
|
|
1260
1276
|
return t.queryHash || (t.queryHash = xt(
|
|
1261
1277
|
t.queryKey,
|
|
1262
1278
|
t
|
|
1263
|
-
)), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn ===
|
|
1279
|
+
)), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn === ts && (t.enabled = !1), t;
|
|
1264
1280
|
}
|
|
1265
1281
|
defaultMutationOptions(e) {
|
|
1266
1282
|
return e != null && e._defaulted ? e : {
|
|
@@ -1271,14 +1287,14 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
|
|
|
1271
1287
|
};
|
|
1272
1288
|
}
|
|
1273
1289
|
clear() {
|
|
1274
|
-
n(this,
|
|
1290
|
+
n(this, R).clear(), n(this, le).clear();
|
|
1275
1291
|
}
|
|
1276
|
-
},
|
|
1292
|
+
}, R = new WeakMap(), le = new WeakMap(), ce = new WeakMap(), Me = new WeakMap(), Oe = new WeakMap(), ue = new WeakMap(), Re = new WeakMap(), Le = new WeakMap(), zt), H, E, Ve, Q, ye, Fe, ee, $e, De, Te, Ce, xe, he, Ue, N, Ke, lt, ct, ut, ht, dt, ft, pt, us, Jt, sr = (Jt = class extends He {
|
|
1277
1293
|
constructor(t, s) {
|
|
1278
1294
|
super();
|
|
1279
1295
|
y(this, N);
|
|
1280
1296
|
y(this, H);
|
|
1281
|
-
y(this,
|
|
1297
|
+
y(this, E);
|
|
1282
1298
|
y(this, Ve);
|
|
1283
1299
|
y(this, Q);
|
|
1284
1300
|
y(this, ye);
|
|
@@ -1299,52 +1315,52 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
|
|
|
1299
1315
|
this.refetch = this.refetch.bind(this);
|
|
1300
1316
|
}
|
|
1301
1317
|
onSubscribe() {
|
|
1302
|
-
this.listeners.size === 1 && (n(this,
|
|
1318
|
+
this.listeners.size === 1 && (n(this, E).addObserver(this), Lt(n(this, E), this.options) ? w(this, N, Ke).call(this) : this.updateResult(), w(this, N, ht).call(this));
|
|
1303
1319
|
}
|
|
1304
1320
|
onUnsubscribe() {
|
|
1305
1321
|
this.hasListeners() || this.destroy();
|
|
1306
1322
|
}
|
|
1307
1323
|
shouldFetchOnReconnect() {
|
|
1308
1324
|
return mt(
|
|
1309
|
-
n(this,
|
|
1325
|
+
n(this, E),
|
|
1310
1326
|
this.options,
|
|
1311
1327
|
this.options.refetchOnReconnect
|
|
1312
1328
|
);
|
|
1313
1329
|
}
|
|
1314
1330
|
shouldFetchOnWindowFocus() {
|
|
1315
1331
|
return mt(
|
|
1316
|
-
n(this,
|
|
1332
|
+
n(this, E),
|
|
1317
1333
|
this.options,
|
|
1318
1334
|
this.options.refetchOnWindowFocus
|
|
1319
1335
|
);
|
|
1320
1336
|
}
|
|
1321
1337
|
destroy() {
|
|
1322
|
-
this.listeners = /* @__PURE__ */ new Set(), w(this, N, dt).call(this), w(this, N, ft).call(this), n(this,
|
|
1338
|
+
this.listeners = /* @__PURE__ */ new Set(), w(this, N, dt).call(this), w(this, N, ft).call(this), n(this, E).removeObserver(this);
|
|
1323
1339
|
}
|
|
1324
1340
|
setOptions(t, s) {
|
|
1325
|
-
const r = this.options, a = n(this,
|
|
1326
|
-
if (this.options = n(this, H).defaultQueryOptions(t), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof z(this.options.enabled, n(this,
|
|
1341
|
+
const r = this.options, a = n(this, E);
|
|
1342
|
+
if (this.options = n(this, H).defaultQueryOptions(t), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof z(this.options.enabled, n(this, E)) != "boolean")
|
|
1327
1343
|
throw new Error(
|
|
1328
1344
|
"Expected enabled to be a boolean or a callback that returns a boolean"
|
|
1329
1345
|
);
|
|
1330
|
-
w(this, N, pt).call(this), n(this,
|
|
1346
|
+
w(this, N, pt).call(this), n(this, E).setOptions(this.options), r._defaulted && !Ie(this.options, r) && n(this, H).getQueryCache().notify({
|
|
1331
1347
|
type: "observerOptionsUpdated",
|
|
1332
|
-
query: n(this,
|
|
1348
|
+
query: n(this, E),
|
|
1333
1349
|
observer: this
|
|
1334
1350
|
});
|
|
1335
1351
|
const l = this.hasListeners();
|
|
1336
|
-
l &&
|
|
1337
|
-
n(this,
|
|
1352
|
+
l && Ft(
|
|
1353
|
+
n(this, E),
|
|
1338
1354
|
a,
|
|
1339
1355
|
this.options,
|
|
1340
1356
|
r
|
|
1341
|
-
) && w(this, N, Ke).call(this), this.updateResult(s), l && (n(this,
|
|
1357
|
+
) && w(this, N, Ke).call(this), this.updateResult(s), l && (n(this, E) !== a || z(this.options.enabled, n(this, E)) !== z(r.enabled, n(this, E)) || Se(this.options.staleTime, n(this, E)) !== Se(r.staleTime, n(this, E))) && w(this, N, lt).call(this);
|
|
1342
1358
|
const o = w(this, N, ct).call(this);
|
|
1343
|
-
l && (n(this,
|
|
1359
|
+
l && (n(this, E) !== a || z(this.options.enabled, n(this, E)) !== z(r.enabled, n(this, E)) || o !== n(this, he)) && w(this, N, ut).call(this, o);
|
|
1344
1360
|
}
|
|
1345
1361
|
getOptimisticResult(t) {
|
|
1346
1362
|
const s = n(this, H).getQueryCache().build(n(this, H), t), r = this.createResult(s, t);
|
|
1347
|
-
return ir(this, r) && (p(this, Q, r), p(this, Fe, this.options), p(this, ye, n(this,
|
|
1363
|
+
return ir(this, r) && (p(this, Q, r), p(this, Fe, this.options), p(this, ye, n(this, E).state)), r;
|
|
1348
1364
|
}
|
|
1349
1365
|
getCurrentResult() {
|
|
1350
1366
|
return n(this, Q);
|
|
@@ -1363,7 +1379,7 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
|
|
|
1363
1379
|
n(this, Ue).add(t);
|
|
1364
1380
|
}
|
|
1365
1381
|
getCurrentQuery() {
|
|
1366
|
-
return n(this,
|
|
1382
|
+
return n(this, E);
|
|
1367
1383
|
}
|
|
1368
1384
|
refetch({ ...t } = {}) {
|
|
1369
1385
|
return this.fetch({
|
|
@@ -1382,78 +1398,78 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
|
|
|
1382
1398
|
}
|
|
1383
1399
|
createResult(t, s) {
|
|
1384
1400
|
var te;
|
|
1385
|
-
const r = n(this,
|
|
1386
|
-
let u = { ...h },
|
|
1401
|
+
const r = n(this, E), a = this.options, l = n(this, Q), o = n(this, ye), c = n(this, Fe), m = t !== r ? t.state : n(this, Ve), { state: h } = t;
|
|
1402
|
+
let u = { ...h }, v = !1, g;
|
|
1387
1403
|
if (s._optimisticResults) {
|
|
1388
|
-
const
|
|
1389
|
-
(Z ||
|
|
1404
|
+
const A = this.hasListeners(), Z = !A && Lt(t, s), Fs = A && Ft(t, r, s, a);
|
|
1405
|
+
(Z || Fs) && (u = {
|
|
1390
1406
|
...u,
|
|
1391
|
-
...
|
|
1407
|
+
...os(h.data, t.options)
|
|
1392
1408
|
}), s._optimisticResults === "isRestoring" && (u.fetchStatus = "idle");
|
|
1393
1409
|
}
|
|
1394
|
-
let { error: S, errorUpdatedAt:
|
|
1410
|
+
let { error: S, errorUpdatedAt: _, status: P } = u;
|
|
1395
1411
|
if (s.select && u.data !== void 0)
|
|
1396
1412
|
if (l && u.data === (o == null ? void 0 : o.data) && s.select === n(this, $e))
|
|
1397
|
-
|
|
1413
|
+
g = n(this, De);
|
|
1398
1414
|
else
|
|
1399
1415
|
try {
|
|
1400
|
-
p(this, $e, s.select),
|
|
1401
|
-
} catch (
|
|
1402
|
-
p(this, ee,
|
|
1416
|
+
p(this, $e, s.select), g = s.select(u.data), g = ot(l == null ? void 0 : l.data, g, s), p(this, De, g), p(this, ee, null);
|
|
1417
|
+
} catch (A) {
|
|
1418
|
+
p(this, ee, A);
|
|
1403
1419
|
}
|
|
1404
1420
|
else
|
|
1405
|
-
|
|
1406
|
-
if (s.placeholderData !== void 0 &&
|
|
1407
|
-
let
|
|
1421
|
+
g = u.data;
|
|
1422
|
+
if (s.placeholderData !== void 0 && g === void 0 && P === "pending") {
|
|
1423
|
+
let A;
|
|
1408
1424
|
if (l != null && l.isPlaceholderData && s.placeholderData === (c == null ? void 0 : c.placeholderData))
|
|
1409
|
-
|
|
1410
|
-
else if (
|
|
1425
|
+
A = l.data;
|
|
1426
|
+
else if (A = typeof s.placeholderData == "function" ? s.placeholderData(
|
|
1411
1427
|
(te = n(this, Te)) == null ? void 0 : te.state.data,
|
|
1412
1428
|
n(this, Te)
|
|
1413
|
-
) : s.placeholderData, s.select &&
|
|
1429
|
+
) : s.placeholderData, s.select && A !== void 0)
|
|
1414
1430
|
try {
|
|
1415
|
-
|
|
1431
|
+
A = s.select(A), p(this, ee, null);
|
|
1416
1432
|
} catch (Z) {
|
|
1417
1433
|
p(this, ee, Z);
|
|
1418
1434
|
}
|
|
1419
|
-
|
|
1435
|
+
A !== void 0 && (P = "success", g = ot(
|
|
1420
1436
|
l == null ? void 0 : l.data,
|
|
1421
|
-
|
|
1437
|
+
A,
|
|
1422
1438
|
s
|
|
1423
|
-
),
|
|
1439
|
+
), v = !0);
|
|
1424
1440
|
}
|
|
1425
|
-
n(this, ee) && (S = n(this, ee),
|
|
1426
|
-
const C = u.fetchStatus === "fetching", j =
|
|
1441
|
+
n(this, ee) && (S = n(this, ee), g = n(this, De), _ = Date.now(), P = "error");
|
|
1442
|
+
const C = u.fetchStatus === "fetching", j = P === "pending", b = P === "error", M = j && C, F = g !== void 0;
|
|
1427
1443
|
return {
|
|
1428
|
-
status:
|
|
1444
|
+
status: P,
|
|
1429
1445
|
fetchStatus: u.fetchStatus,
|
|
1430
1446
|
isPending: j,
|
|
1431
|
-
isSuccess:
|
|
1447
|
+
isSuccess: P === "success",
|
|
1432
1448
|
isError: b,
|
|
1433
1449
|
isInitialLoading: M,
|
|
1434
1450
|
isLoading: M,
|
|
1435
|
-
data:
|
|
1451
|
+
data: g,
|
|
1436
1452
|
dataUpdatedAt: u.dataUpdatedAt,
|
|
1437
1453
|
error: S,
|
|
1438
|
-
errorUpdatedAt:
|
|
1454
|
+
errorUpdatedAt: _,
|
|
1439
1455
|
failureCount: u.fetchFailureCount,
|
|
1440
1456
|
failureReason: u.fetchFailureReason,
|
|
1441
1457
|
errorUpdateCount: u.errorUpdateCount,
|
|
1442
1458
|
isFetched: u.dataUpdateCount > 0 || u.errorUpdateCount > 0,
|
|
1443
|
-
isFetchedAfterMount: u.dataUpdateCount >
|
|
1459
|
+
isFetchedAfterMount: u.dataUpdateCount > m.dataUpdateCount || u.errorUpdateCount > m.errorUpdateCount,
|
|
1444
1460
|
isFetching: C,
|
|
1445
1461
|
isRefetching: C && !j,
|
|
1446
|
-
isLoadingError: b && !
|
|
1462
|
+
isLoadingError: b && !F,
|
|
1447
1463
|
isPaused: u.fetchStatus === "paused",
|
|
1448
|
-
isPlaceholderData:
|
|
1449
|
-
isRefetchError: b &&
|
|
1464
|
+
isPlaceholderData: v,
|
|
1465
|
+
isRefetchError: b && F,
|
|
1450
1466
|
isStale: wt(t, s),
|
|
1451
1467
|
refetch: this.refetch
|
|
1452
1468
|
};
|
|
1453
1469
|
}
|
|
1454
1470
|
updateResult(t) {
|
|
1455
|
-
const s = n(this, Q), r = this.createResult(n(this,
|
|
1456
|
-
if (p(this, ye, n(this,
|
|
1471
|
+
const s = n(this, Q), r = this.createResult(n(this, E), this.options);
|
|
1472
|
+
if (p(this, ye, n(this, E).state), p(this, Fe, this.options), n(this, ye).data !== void 0 && p(this, Te, n(this, E)), Ie(r, s))
|
|
1457
1473
|
return;
|
|
1458
1474
|
p(this, Q, r);
|
|
1459
1475
|
const a = {}, l = () => {
|
|
@@ -1462,22 +1478,22 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
|
|
|
1462
1478
|
const { notifyOnChangeProps: o } = this.options, c = typeof o == "function" ? o() : o;
|
|
1463
1479
|
if (c === "all" || !c && !n(this, Ue).size)
|
|
1464
1480
|
return !0;
|
|
1465
|
-
const
|
|
1481
|
+
const f = new Set(
|
|
1466
1482
|
c ?? n(this, Ue)
|
|
1467
1483
|
);
|
|
1468
|
-
return this.options.throwOnError &&
|
|
1469
|
-
const h =
|
|
1470
|
-
return n(this, Q)[h] !== s[h] &&
|
|
1484
|
+
return this.options.throwOnError && f.add("error"), Object.keys(n(this, Q)).some((m) => {
|
|
1485
|
+
const h = m;
|
|
1486
|
+
return n(this, Q)[h] !== s[h] && f.has(h);
|
|
1471
1487
|
});
|
|
1472
1488
|
};
|
|
1473
|
-
(t == null ? void 0 : t.listeners) !== !1 && l() && (a.listeners = !0), w(this, N,
|
|
1489
|
+
(t == null ? void 0 : t.listeners) !== !1 && l() && (a.listeners = !0), w(this, N, us).call(this, { ...a, ...t });
|
|
1474
1490
|
}
|
|
1475
1491
|
onQueryUpdate() {
|
|
1476
1492
|
this.updateResult(), this.hasListeners() && w(this, N, ht).call(this);
|
|
1477
1493
|
}
|
|
1478
|
-
}, H = new WeakMap(),
|
|
1494
|
+
}, H = new WeakMap(), E = new WeakMap(), Ve = new WeakMap(), Q = new WeakMap(), ye = new WeakMap(), Fe = new WeakMap(), ee = new WeakMap(), $e = new WeakMap(), De = new WeakMap(), Te = new WeakMap(), Ce = new WeakMap(), xe = new WeakMap(), he = new WeakMap(), Ue = new WeakMap(), N = new WeakSet(), Ke = function(t) {
|
|
1479
1495
|
w(this, N, pt).call(this);
|
|
1480
|
-
let s = n(this,
|
|
1496
|
+
let s = n(this, E).fetch(
|
|
1481
1497
|
this.options,
|
|
1482
1498
|
t
|
|
1483
1499
|
);
|
|
@@ -1486,18 +1502,18 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
|
|
|
1486
1502
|
w(this, N, dt).call(this);
|
|
1487
1503
|
const t = Se(
|
|
1488
1504
|
this.options.staleTime,
|
|
1489
|
-
n(this,
|
|
1505
|
+
n(this, E)
|
|
1490
1506
|
);
|
|
1491
1507
|
if (Qe || n(this, Q).isStale || !nt(t))
|
|
1492
1508
|
return;
|
|
1493
|
-
const r =
|
|
1509
|
+
const r = Bt(n(this, Q).dataUpdatedAt, t) + 1;
|
|
1494
1510
|
p(this, Ce, setTimeout(() => {
|
|
1495
1511
|
n(this, Q).isStale || this.updateResult();
|
|
1496
1512
|
}, r));
|
|
1497
1513
|
}, ct = function() {
|
|
1498
|
-
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(n(this,
|
|
1514
|
+
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(n(this, E)) : this.options.refetchInterval) ?? !1;
|
|
1499
1515
|
}, ut = function(t) {
|
|
1500
|
-
w(this, N, ft).call(this), p(this, he, t), !(Qe || z(this.options.enabled, n(this,
|
|
1516
|
+
w(this, N, ft).call(this), p(this, he, t), !(Qe || z(this.options.enabled, n(this, E)) === !1 || !nt(n(this, he)) || n(this, he) === 0) && p(this, xe, setInterval(() => {
|
|
1501
1517
|
(this.options.refetchIntervalInBackground || bt.isFocused()) && w(this, N, Ke).call(this);
|
|
1502
1518
|
}, n(this, he)));
|
|
1503
1519
|
}, ht = function() {
|
|
@@ -1508,24 +1524,24 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
|
|
|
1508
1524
|
n(this, xe) && (clearInterval(n(this, xe)), p(this, xe, void 0));
|
|
1509
1525
|
}, pt = function() {
|
|
1510
1526
|
const t = n(this, H).getQueryCache().build(n(this, H), this.options);
|
|
1511
|
-
if (t === n(this,
|
|
1527
|
+
if (t === n(this, E))
|
|
1512
1528
|
return;
|
|
1513
|
-
const s = n(this,
|
|
1514
|
-
p(this,
|
|
1515
|
-
},
|
|
1529
|
+
const s = n(this, E);
|
|
1530
|
+
p(this, E, t), p(this, Ve, t.state), this.hasListeners() && (s == null || s.removeObserver(this), t.addObserver(this));
|
|
1531
|
+
}, us = function(t) {
|
|
1516
1532
|
D.batch(() => {
|
|
1517
1533
|
t.listeners && this.listeners.forEach((s) => {
|
|
1518
1534
|
s(n(this, Q));
|
|
1519
1535
|
}), n(this, H).getQueryCache().notify({
|
|
1520
|
-
query: n(this,
|
|
1536
|
+
query: n(this, E),
|
|
1521
1537
|
type: "observerResultsUpdated"
|
|
1522
1538
|
});
|
|
1523
1539
|
});
|
|
1524
|
-
},
|
|
1540
|
+
}, Jt);
|
|
1525
1541
|
function rr(e, t) {
|
|
1526
1542
|
return z(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
|
|
1527
1543
|
}
|
|
1528
|
-
function
|
|
1544
|
+
function Lt(e, t) {
|
|
1529
1545
|
return rr(e, t) || e.state.data !== void 0 && mt(e, t, t.refetchOnMount);
|
|
1530
1546
|
}
|
|
1531
1547
|
function mt(e, t, s) {
|
|
@@ -1535,7 +1551,7 @@ function mt(e, t, s) {
|
|
|
1535
1551
|
}
|
|
1536
1552
|
return !1;
|
|
1537
1553
|
}
|
|
1538
|
-
function
|
|
1554
|
+
function Ft(e, t, s, r) {
|
|
1539
1555
|
return (e !== t || z(r.enabled, e) === !1) && (!s.suspense || e.state.status !== "error") && wt(e, s);
|
|
1540
1556
|
}
|
|
1541
1557
|
function wt(e, t) {
|
|
@@ -1544,7 +1560,7 @@ function wt(e, t) {
|
|
|
1544
1560
|
function ir(e, t) {
|
|
1545
1561
|
return !Ie(e.getCurrentResult(), t);
|
|
1546
1562
|
}
|
|
1547
|
-
var de, fe, K, re, ie, Xe, vt,
|
|
1563
|
+
var de, fe, K, re, ie, Xe, vt, Xt, nr = (Xt = class extends He {
|
|
1548
1564
|
constructor(t, s) {
|
|
1549
1565
|
super();
|
|
1550
1566
|
y(this, ie);
|
|
@@ -1586,7 +1602,7 @@ var de, fe, K, re, ie, Xe, vt, Jt, nr = (Jt = class extends He {
|
|
|
1586
1602
|
}
|
|
1587
1603
|
}, de = new WeakMap(), fe = new WeakMap(), K = new WeakMap(), re = new WeakMap(), ie = new WeakSet(), Xe = function() {
|
|
1588
1604
|
var s;
|
|
1589
|
-
const t = ((s = n(this, K)) == null ? void 0 : s.state) ??
|
|
1605
|
+
const t = ((s = n(this, K)) == null ? void 0 : s.state) ?? ls();
|
|
1590
1606
|
p(this, fe, {
|
|
1591
1607
|
...t,
|
|
1592
1608
|
isPending: t.status === "pending",
|
|
@@ -1598,11 +1614,11 @@ var de, fe, K, re, ie, Xe, vt, Jt, nr = (Jt = class extends He {
|
|
|
1598
1614
|
});
|
|
1599
1615
|
}, vt = function(t) {
|
|
1600
1616
|
D.batch(() => {
|
|
1601
|
-
var s, r, a, l, o, c,
|
|
1617
|
+
var s, r, a, l, o, c, f, m;
|
|
1602
1618
|
if (n(this, re) && this.hasListeners()) {
|
|
1603
1619
|
const h = n(this, fe).variables, u = n(this, fe).context;
|
|
1604
|
-
(t == null ? void 0 : t.type) === "success" ? ((r = (s = n(this, re)).onSuccess) == null || r.call(s, t.data, h, u), (l = (a = n(this, re)).onSettled) == null || l.call(a, t.data, null, h, u)) : (t == null ? void 0 : t.type) === "error" && ((c = (o = n(this, re)).onError) == null || c.call(o, t.error, h, u), (
|
|
1605
|
-
|
|
1620
|
+
(t == null ? void 0 : t.type) === "success" ? ((r = (s = n(this, re)).onSuccess) == null || r.call(s, t.data, h, u), (l = (a = n(this, re)).onSettled) == null || l.call(a, t.data, null, h, u)) : (t == null ? void 0 : t.type) === "error" && ((c = (o = n(this, re)).onError) == null || c.call(o, t.error, h, u), (m = (f = n(this, re)).onSettled) == null || m.call(
|
|
1621
|
+
f,
|
|
1606
1622
|
void 0,
|
|
1607
1623
|
t.error,
|
|
1608
1624
|
h,
|
|
@@ -1613,20 +1629,20 @@ var de, fe, K, re, ie, Xe, vt, Jt, nr = (Jt = class extends He {
|
|
|
1613
1629
|
h(n(this, fe));
|
|
1614
1630
|
});
|
|
1615
1631
|
});
|
|
1616
|
-
},
|
|
1632
|
+
}, Xt), hs = d.createContext(
|
|
1617
1633
|
void 0
|
|
1618
1634
|
), jt = (e) => {
|
|
1619
|
-
const t =
|
|
1635
|
+
const t = d.useContext(hs);
|
|
1620
1636
|
if (!t)
|
|
1621
1637
|
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
|
1622
1638
|
return t;
|
|
1623
1639
|
}, ar = ({
|
|
1624
1640
|
client: e,
|
|
1625
1641
|
children: t
|
|
1626
|
-
}) => (
|
|
1642
|
+
}) => (d.useEffect(() => (e.mount(), () => {
|
|
1627
1643
|
e.unmount();
|
|
1628
|
-
}), [e]), /* @__PURE__ */ i.jsx(
|
|
1629
|
-
|
|
1644
|
+
}), [e]), /* @__PURE__ */ i.jsx(hs.Provider, { value: e, children: t })), ds = d.createContext(!1), or = () => d.useContext(ds);
|
|
1645
|
+
ds.Provider;
|
|
1630
1646
|
function lr() {
|
|
1631
1647
|
let e = !1;
|
|
1632
1648
|
return {
|
|
@@ -1639,8 +1655,8 @@ function lr() {
|
|
|
1639
1655
|
isReset: () => e
|
|
1640
1656
|
};
|
|
1641
1657
|
}
|
|
1642
|
-
var cr =
|
|
1643
|
-
function
|
|
1658
|
+
var cr = d.createContext(lr()), ur = () => d.useContext(cr);
|
|
1659
|
+
function fs(e, t) {
|
|
1644
1660
|
return typeof e == "function" ? e(...t) : !!e;
|
|
1645
1661
|
}
|
|
1646
1662
|
function hr() {
|
|
@@ -1648,7 +1664,7 @@ function hr() {
|
|
|
1648
1664
|
var dr = (e, t) => {
|
|
1649
1665
|
(e.suspense || e.throwOnError) && (t.isReset() || (e.retryOnMount = !1));
|
|
1650
1666
|
}, fr = (e) => {
|
|
1651
|
-
|
|
1667
|
+
d.useEffect(() => {
|
|
1652
1668
|
e.clearReset();
|
|
1653
1669
|
}, [e]);
|
|
1654
1670
|
}, pr = ({
|
|
@@ -1656,109 +1672,109 @@ var dr = (e, t) => {
|
|
|
1656
1672
|
errorResetBoundary: t,
|
|
1657
1673
|
throwOnError: s,
|
|
1658
1674
|
query: r
|
|
1659
|
-
}) => e.isError && !t.isReset() && !e.isFetching && r &&
|
|
1675
|
+
}) => e.isError && !t.isReset() && !e.isFetching && r && fs(s, [e.error, r]), mr = (e) => {
|
|
1660
1676
|
e.suspense && (typeof e.staleTime != "number" && (e.staleTime = 1e3), typeof e.gcTime == "number" && (e.gcTime = Math.max(e.gcTime, 1e3)));
|
|
1661
1677
|
}, vr = (e, t) => (e == null ? void 0 : e.suspense) && t.isPending, gr = (e, t, s) => t.fetchOptimistic(e).catch(() => {
|
|
1662
1678
|
s.clearReset();
|
|
1663
1679
|
});
|
|
1664
1680
|
function yr(e, t, s) {
|
|
1665
|
-
var
|
|
1681
|
+
var m, h, u, v;
|
|
1666
1682
|
const r = jt(), a = or(), l = ur(), o = r.defaultQueryOptions(e);
|
|
1667
|
-
(h = (
|
|
1668
|
-
|
|
1683
|
+
(h = (m = r.getDefaultOptions().queries) == null ? void 0 : m._experimental_beforeQuery) == null || h.call(
|
|
1684
|
+
m,
|
|
1669
1685
|
o
|
|
1670
1686
|
), o._optimisticResults = a ? "isRestoring" : "optimistic", mr(o), dr(o, l), fr(l);
|
|
1671
|
-
const [c] =
|
|
1687
|
+
const [c] = d.useState(
|
|
1672
1688
|
() => new t(
|
|
1673
1689
|
r,
|
|
1674
1690
|
o
|
|
1675
1691
|
)
|
|
1676
|
-
),
|
|
1677
|
-
if (
|
|
1678
|
-
|
|
1679
|
-
(
|
|
1692
|
+
), f = c.getOptimisticResult(o);
|
|
1693
|
+
if (d.useSyncExternalStore(
|
|
1694
|
+
d.useCallback(
|
|
1695
|
+
(g) => {
|
|
1680
1696
|
const S = a ? () => {
|
|
1681
|
-
} : c.subscribe(D.batchCalls(
|
|
1697
|
+
} : c.subscribe(D.batchCalls(g));
|
|
1682
1698
|
return c.updateResult(), S;
|
|
1683
1699
|
},
|
|
1684
1700
|
[c, a]
|
|
1685
1701
|
),
|
|
1686
1702
|
() => c.getCurrentResult(),
|
|
1687
1703
|
() => c.getCurrentResult()
|
|
1688
|
-
),
|
|
1704
|
+
), d.useEffect(() => {
|
|
1689
1705
|
c.setOptions(o, { listeners: !1 });
|
|
1690
|
-
}, [o, c]), vr(o,
|
|
1706
|
+
}, [o, c]), vr(o, f))
|
|
1691
1707
|
throw gr(o, c, l);
|
|
1692
1708
|
if (pr({
|
|
1693
|
-
result:
|
|
1709
|
+
result: f,
|
|
1694
1710
|
errorResetBoundary: l,
|
|
1695
1711
|
throwOnError: o.throwOnError,
|
|
1696
1712
|
query: r.getQueryCache().get(o.queryHash)
|
|
1697
1713
|
}))
|
|
1698
|
-
throw
|
|
1699
|
-
return (
|
|
1714
|
+
throw f.error;
|
|
1715
|
+
return (v = (u = r.getDefaultOptions().queries) == null ? void 0 : u._experimental_afterQuery) == null || v.call(
|
|
1700
1716
|
u,
|
|
1701
1717
|
o,
|
|
1702
|
-
|
|
1703
|
-
), o.notifyOnChangeProps ?
|
|
1718
|
+
f
|
|
1719
|
+
), o.notifyOnChangeProps ? f : c.trackResult(f);
|
|
1704
1720
|
}
|
|
1705
|
-
function
|
|
1721
|
+
function ps(e, t) {
|
|
1706
1722
|
return yr(e, sr);
|
|
1707
1723
|
}
|
|
1708
1724
|
function Cr(e, t) {
|
|
1709
|
-
const s = jt(), [r] =
|
|
1725
|
+
const s = jt(), [r] = d.useState(
|
|
1710
1726
|
() => new nr(
|
|
1711
1727
|
s,
|
|
1712
1728
|
e
|
|
1713
1729
|
)
|
|
1714
1730
|
);
|
|
1715
|
-
|
|
1731
|
+
d.useEffect(() => {
|
|
1716
1732
|
r.setOptions(e);
|
|
1717
1733
|
}, [r, e]);
|
|
1718
|
-
const a =
|
|
1719
|
-
|
|
1734
|
+
const a = d.useSyncExternalStore(
|
|
1735
|
+
d.useCallback(
|
|
1720
1736
|
(o) => r.subscribe(D.batchCalls(o)),
|
|
1721
1737
|
[r]
|
|
1722
1738
|
),
|
|
1723
1739
|
() => r.getCurrentResult(),
|
|
1724
1740
|
() => r.getCurrentResult()
|
|
1725
|
-
), l =
|
|
1741
|
+
), l = d.useCallback(
|
|
1726
1742
|
(o, c) => {
|
|
1727
1743
|
r.mutate(o, c).catch(hr);
|
|
1728
1744
|
},
|
|
1729
1745
|
[r]
|
|
1730
1746
|
);
|
|
1731
|
-
if (a.error &&
|
|
1747
|
+
if (a.error && fs(r.options.throwOnError, [a.error]))
|
|
1732
1748
|
throw a.error;
|
|
1733
1749
|
return { ...a, mutate: l, mutateAsync: a.mutate };
|
|
1734
1750
|
}
|
|
1735
|
-
function
|
|
1751
|
+
function ms(e) {
|
|
1736
1752
|
var t, s, r = "";
|
|
1737
1753
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
1738
1754
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
1739
1755
|
var a = e.length;
|
|
1740
|
-
for (t = 0; t < a; t++) e[t] && (s =
|
|
1756
|
+
for (t = 0; t < a; t++) e[t] && (s = ms(e[t])) && (r && (r += " "), r += s);
|
|
1741
1757
|
} else for (s in e) e[s] && (r && (r += " "), r += s);
|
|
1742
1758
|
return r;
|
|
1743
1759
|
}
|
|
1744
1760
|
function O() {
|
|
1745
|
-
for (var e, t, s = 0, r = "", a = arguments.length; s < a; s++) (e = arguments[s]) && (t =
|
|
1761
|
+
for (var e, t, s = 0, r = "", a = arguments.length; s < a; s++) (e = arguments[s]) && (t = ms(e)) && (r && (r += " "), r += t);
|
|
1746
1762
|
return r;
|
|
1747
1763
|
}
|
|
1748
|
-
var xr = Object.defineProperty, br = Object.defineProperties, wr = Object.getOwnPropertyDescriptors, et = Object.getOwnPropertySymbols,
|
|
1764
|
+
var xr = Object.defineProperty, br = Object.defineProperties, wr = Object.getOwnPropertyDescriptors, et = Object.getOwnPropertySymbols, vs = Object.prototype.hasOwnProperty, gs = Object.prototype.propertyIsEnumerable, Dt = (e, t, s) => t in e ? xr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, x = (e, t) => {
|
|
1749
1765
|
for (var s in t || (t = {}))
|
|
1750
|
-
|
|
1766
|
+
vs.call(t, s) && Dt(e, s, t[s]);
|
|
1751
1767
|
if (et)
|
|
1752
1768
|
for (var s of et(t))
|
|
1753
|
-
|
|
1769
|
+
gs.call(t, s) && Dt(e, s, t[s]);
|
|
1754
1770
|
return e;
|
|
1755
|
-
},
|
|
1771
|
+
}, k = (e, t) => br(e, wr(t)), L = (e, t) => {
|
|
1756
1772
|
var s = {};
|
|
1757
1773
|
for (var r in e)
|
|
1758
|
-
|
|
1774
|
+
vs.call(e, r) && t.indexOf(r) < 0 && (s[r] = e[r]);
|
|
1759
1775
|
if (e != null && et)
|
|
1760
1776
|
for (var r of et(e))
|
|
1761
|
-
t.indexOf(r) < 0 &&
|
|
1777
|
+
t.indexOf(r) < 0 && gs.call(e, r) && (s[r] = e[r]);
|
|
1762
1778
|
return s;
|
|
1763
1779
|
};
|
|
1764
1780
|
function jr(e, t) {
|
|
@@ -1767,30 +1783,30 @@ function jr(e, t) {
|
|
|
1767
1783
|
function _r(...e) {
|
|
1768
1784
|
return (t) => e.forEach((s) => jr(s, t));
|
|
1769
1785
|
}
|
|
1770
|
-
var Sr =
|
|
1771
|
-
const s = e, { children: r } = s, a =
|
|
1786
|
+
var Sr = d.forwardRef((e, t) => {
|
|
1787
|
+
const s = e, { children: r } = s, a = L(s, ["children"]), l = d.Children.toArray(r), o = l.find(Pr);
|
|
1772
1788
|
if (o) {
|
|
1773
|
-
const c = o.props.children,
|
|
1774
|
-
return /* @__PURE__ */ i.jsx(gt,
|
|
1789
|
+
const c = o.props.children, f = l.map((m) => m === o ? d.Children.count(c) > 1 ? d.Children.only(null) : d.isValidElement(c) ? c.props.children : null : m);
|
|
1790
|
+
return /* @__PURE__ */ i.jsx(gt, k(x({}, a), { ref: t, children: d.isValidElement(c) ? d.cloneElement(c, void 0, f) : null }));
|
|
1775
1791
|
}
|
|
1776
|
-
return /* @__PURE__ */ i.jsx(gt,
|
|
1792
|
+
return /* @__PURE__ */ i.jsx(gt, k(x({}, a), { ref: t, children: r }));
|
|
1777
1793
|
});
|
|
1778
1794
|
Sr.displayName = "Slot";
|
|
1779
|
-
var gt =
|
|
1780
|
-
const s = e, { children: r } = s, a =
|
|
1781
|
-
if (
|
|
1795
|
+
var gt = d.forwardRef((e, t) => {
|
|
1796
|
+
const s = e, { children: r } = s, a = L(s, ["children"]);
|
|
1797
|
+
if (d.isValidElement(r)) {
|
|
1782
1798
|
const l = kr(r);
|
|
1783
|
-
return
|
|
1799
|
+
return d.cloneElement(r, k(x({}, Ar(a, r.props)), {
|
|
1784
1800
|
// @ts-ignore
|
|
1785
1801
|
ref: t ? _r(t, l) : l
|
|
1786
1802
|
}));
|
|
1787
1803
|
}
|
|
1788
|
-
return
|
|
1804
|
+
return d.Children.count(r) > 1 ? d.Children.only(null) : null;
|
|
1789
1805
|
});
|
|
1790
1806
|
gt.displayName = "SlotClone";
|
|
1791
1807
|
var Er = ({ children: e }) => /* @__PURE__ */ i.jsx(i.Fragment, { children: e });
|
|
1792
1808
|
function Pr(e) {
|
|
1793
|
-
return
|
|
1809
|
+
return d.isValidElement(e) && e.type === Er;
|
|
1794
1810
|
}
|
|
1795
1811
|
function Ar(e, t) {
|
|
1796
1812
|
const s = x({}, t);
|
|
@@ -1818,7 +1834,7 @@ var Nr = ({ firstName: e, lastName: t, variant: s = "small" }) => {
|
|
|
1818
1834
|
children: /* @__PURE__ */ i.jsx("span", { className: "avatar__initials", children: r })
|
|
1819
1835
|
}
|
|
1820
1836
|
);
|
|
1821
|
-
}, Ze =
|
|
1837
|
+
}, Ze = d.forwardRef(
|
|
1822
1838
|
(e, t) => {
|
|
1823
1839
|
var s = e, {
|
|
1824
1840
|
iconLeft: r,
|
|
@@ -1826,9 +1842,9 @@ var Nr = ({ firstName: e, lastName: t, variant: s = "small" }) => {
|
|
|
1826
1842
|
isPending: l = !1,
|
|
1827
1843
|
isFilled: o = !1,
|
|
1828
1844
|
variant: c,
|
|
1829
|
-
className:
|
|
1830
|
-
children:
|
|
1831
|
-
} = s, h =
|
|
1845
|
+
className: f,
|
|
1846
|
+
children: m
|
|
1847
|
+
} = s, h = L(s, [
|
|
1832
1848
|
"iconLeft",
|
|
1833
1849
|
"iconRight",
|
|
1834
1850
|
"isPending",
|
|
@@ -1840,7 +1856,7 @@ var Nr = ({ firstName: e, lastName: t, variant: s = "small" }) => {
|
|
|
1840
1856
|
const u = !!r || !!a;
|
|
1841
1857
|
return /* @__PURE__ */ i.jsxs(
|
|
1842
1858
|
"button",
|
|
1843
|
-
|
|
1859
|
+
k(x({
|
|
1844
1860
|
ref: t
|
|
1845
1861
|
}, h), {
|
|
1846
1862
|
className: O(
|
|
@@ -1849,11 +1865,11 @@ var Nr = ({ firstName: e, lastName: t, variant: s = "small" }) => {
|
|
|
1849
1865
|
c && o && `button--${c}--filled`,
|
|
1850
1866
|
u && "button--with-icon",
|
|
1851
1867
|
l && "button--pending",
|
|
1852
|
-
|
|
1868
|
+
f
|
|
1853
1869
|
),
|
|
1854
1870
|
children: [
|
|
1855
1871
|
r && /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: r }),
|
|
1856
|
-
!!
|
|
1872
|
+
!!m && /* @__PURE__ */ i.jsx("span", { className: "button__label", children: m }),
|
|
1857
1873
|
a && /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: a })
|
|
1858
1874
|
]
|
|
1859
1875
|
})
|
|
@@ -1861,10 +1877,10 @@ var Nr = ({ firstName: e, lastName: t, variant: s = "small" }) => {
|
|
|
1861
1877
|
}
|
|
1862
1878
|
);
|
|
1863
1879
|
Ze.displayName = "Button";
|
|
1864
|
-
|
|
1865
|
-
var Mr =
|
|
1880
|
+
d.createContext(void 0);
|
|
1881
|
+
var Mr = d.forwardRef(
|
|
1866
1882
|
(e, t) => {
|
|
1867
|
-
var s = e, { prefix: r, suffix: a, className: l } = s, o =
|
|
1883
|
+
var s = e, { prefix: r, suffix: a, className: l } = s, o = L(s, ["prefix", "suffix", "className"]);
|
|
1868
1884
|
return /* @__PURE__ */ i.jsxs("div", { className: "input__wrapper", children: [
|
|
1869
1885
|
r && /* @__PURE__ */ i.jsx("span", { className: "input__prefix", children: r }),
|
|
1870
1886
|
/* @__PURE__ */ i.jsx(
|
|
@@ -1884,13 +1900,13 @@ var Mr = f.forwardRef(
|
|
|
1884
1900
|
}
|
|
1885
1901
|
);
|
|
1886
1902
|
Mr.displayName = "TextField";
|
|
1887
|
-
|
|
1903
|
+
d.createContext(void 0);
|
|
1888
1904
|
var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__header__action", children: e }), Rr = (e) => {
|
|
1889
|
-
var t = e, { children: s, className: r } = t, a =
|
|
1890
|
-
return /* @__PURE__ */ i.jsx("div",
|
|
1905
|
+
var t = e, { children: s, className: r } = t, a = L(t, ["children", "className"]);
|
|
1906
|
+
return /* @__PURE__ */ i.jsx("div", k(x({ className: O("card__body", r) }, a), { children: s }));
|
|
1891
1907
|
}, Lr = (e) => /* @__PURE__ */ i.jsx(
|
|
1892
1908
|
"svg",
|
|
1893
|
-
|
|
1909
|
+
k(x({
|
|
1894
1910
|
width: "24",
|
|
1895
1911
|
height: "24",
|
|
1896
1912
|
viewBox: "0 0 24 24",
|
|
@@ -1910,7 +1926,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
1910
1926
|
})
|
|
1911
1927
|
), _t = Lr, Fr = (e) => /* @__PURE__ */ i.jsx(
|
|
1912
1928
|
"svg",
|
|
1913
|
-
|
|
1929
|
+
k(x({
|
|
1914
1930
|
width: "24",
|
|
1915
1931
|
height: "24",
|
|
1916
1932
|
viewBox: "0 0 24 24",
|
|
@@ -1930,7 +1946,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
1930
1946
|
})
|
|
1931
1947
|
), Dr = Fr, Tr = (e) => /* @__PURE__ */ i.jsx(
|
|
1932
1948
|
"svg",
|
|
1933
|
-
|
|
1949
|
+
k(x({
|
|
1934
1950
|
width: "24",
|
|
1935
1951
|
height: "24",
|
|
1936
1952
|
viewBox: "0 0 24 24",
|
|
@@ -1949,7 +1965,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
1949
1965
|
})
|
|
1950
1966
|
), Ur = Tr, Qr = (e) => /* @__PURE__ */ i.jsx(
|
|
1951
1967
|
"svg",
|
|
1952
|
-
|
|
1968
|
+
k(x({
|
|
1953
1969
|
width: "24",
|
|
1954
1970
|
height: "24",
|
|
1955
1971
|
viewBox: "0 0 24 24",
|
|
@@ -1968,7 +1984,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
1968
1984
|
})
|
|
1969
1985
|
), Hr = Qr, Kr = (e) => /* @__PURE__ */ i.jsx(
|
|
1970
1986
|
"svg",
|
|
1971
|
-
|
|
1987
|
+
k(x({
|
|
1972
1988
|
width: "24",
|
|
1973
1989
|
height: "24",
|
|
1974
1990
|
viewBox: "0 0 24 24",
|
|
@@ -1987,7 +2003,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
1987
2003
|
})
|
|
1988
2004
|
), Gr = Kr, qr = (e) => /* @__PURE__ */ i.jsxs(
|
|
1989
2005
|
"svg",
|
|
1990
|
-
|
|
2006
|
+
k(x({
|
|
1991
2007
|
width: "24",
|
|
1992
2008
|
height: "24",
|
|
1993
2009
|
fill: "none",
|
|
@@ -2024,7 +2040,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2024
2040
|
})
|
|
2025
2041
|
), Wr = qr, Vr = (e) => /* @__PURE__ */ i.jsxs(
|
|
2026
2042
|
"svg",
|
|
2027
|
-
|
|
2043
|
+
k(x({
|
|
2028
2044
|
width: "24",
|
|
2029
2045
|
height: "24",
|
|
2030
2046
|
viewBox: "0 0 24 24",
|
|
@@ -2056,7 +2072,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2056
2072
|
})
|
|
2057
2073
|
), $r = Vr, Zr = (e) => /* @__PURE__ */ i.jsxs(
|
|
2058
2074
|
"svg",
|
|
2059
|
-
|
|
2075
|
+
k(x({
|
|
2060
2076
|
width: "24",
|
|
2061
2077
|
height: "24",
|
|
2062
2078
|
viewBox: "0 0 24 24",
|
|
@@ -2107,10 +2123,10 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2107
2123
|
]
|
|
2108
2124
|
})
|
|
2109
2125
|
), Yr = Zr, zr = (e) => {
|
|
2110
|
-
var t = e, { className: s } = t, r =
|
|
2126
|
+
var t = e, { className: s } = t, r = L(t, ["className"]);
|
|
2111
2127
|
return /* @__PURE__ */ i.jsxs(
|
|
2112
2128
|
"svg",
|
|
2113
|
-
|
|
2129
|
+
k(x({
|
|
2114
2130
|
width: "20",
|
|
2115
2131
|
height: "20",
|
|
2116
2132
|
viewBox: "0 0 20 20",
|
|
@@ -2137,7 +2153,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2137
2153
|
);
|
|
2138
2154
|
}, Jr = zr, Xr = (e) => /* @__PURE__ */ i.jsxs(
|
|
2139
2155
|
"svg",
|
|
2140
|
-
|
|
2156
|
+
k(x({
|
|
2141
2157
|
width: "24",
|
|
2142
2158
|
height: "24",
|
|
2143
2159
|
fill: "none",
|
|
@@ -2173,7 +2189,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2173
2189
|
const t = (s) => `${s}${e.suffix ? `_${e.suffix}` : ""}`;
|
|
2174
2190
|
return /* @__PURE__ */ i.jsxs(
|
|
2175
2191
|
"svg",
|
|
2176
|
-
|
|
2192
|
+
k(x({
|
|
2177
2193
|
width: "24",
|
|
2178
2194
|
height: "24",
|
|
2179
2195
|
viewBox: "0 0 24 24",
|
|
@@ -2340,9 +2356,9 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2340
2356
|
]
|
|
2341
2357
|
})
|
|
2342
2358
|
);
|
|
2343
|
-
},
|
|
2359
|
+
}, ys = Br, ei = (e) => /* @__PURE__ */ i.jsxs(
|
|
2344
2360
|
"svg",
|
|
2345
|
-
|
|
2361
|
+
k(x({
|
|
2346
2362
|
fill: "none",
|
|
2347
2363
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2348
2364
|
viewBox: "0 0 24 24",
|
|
@@ -2404,7 +2420,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2404
2420
|
})
|
|
2405
2421
|
), ti = ei, si = (e) => /* @__PURE__ */ i.jsx(
|
|
2406
2422
|
"svg",
|
|
2407
|
-
|
|
2423
|
+
k(x({
|
|
2408
2424
|
fill: "none",
|
|
2409
2425
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2410
2426
|
viewBox: "0 0 21 16",
|
|
@@ -2424,7 +2440,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2424
2440
|
})
|
|
2425
2441
|
), ri = si, ii = (e) => /* @__PURE__ */ i.jsxs(
|
|
2426
2442
|
"svg",
|
|
2427
|
-
|
|
2443
|
+
k(x({
|
|
2428
2444
|
width: "24",
|
|
2429
2445
|
height: "24",
|
|
2430
2446
|
fill: "none",
|
|
@@ -2457,7 +2473,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2457
2473
|
title: l,
|
|
2458
2474
|
description: o,
|
|
2459
2475
|
className: c
|
|
2460
|
-
} = t,
|
|
2476
|
+
} = t, f = L(t, [
|
|
2461
2477
|
"variant",
|
|
2462
2478
|
"icon",
|
|
2463
2479
|
"isStandalone",
|
|
@@ -2467,7 +2483,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2467
2483
|
]);
|
|
2468
2484
|
return /* @__PURE__ */ i.jsx(
|
|
2469
2485
|
"div",
|
|
2470
|
-
|
|
2486
|
+
k(x({}, f), {
|
|
2471
2487
|
className: O(
|
|
2472
2488
|
"card__empty-state",
|
|
2473
2489
|
s === "error" && "card__empty-state--error",
|
|
@@ -2489,7 +2505,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2489
2505
|
sticky: r,
|
|
2490
2506
|
className: a,
|
|
2491
2507
|
children: l
|
|
2492
|
-
} = t, o =
|
|
2508
|
+
} = t, o = L(t, [
|
|
2493
2509
|
"variant",
|
|
2494
2510
|
"sticky",
|
|
2495
2511
|
"className",
|
|
@@ -2497,7 +2513,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2497
2513
|
]);
|
|
2498
2514
|
return /* @__PURE__ */ i.jsx(
|
|
2499
2515
|
"div",
|
|
2500
|
-
|
|
2516
|
+
k(x({}, o), {
|
|
2501
2517
|
className: O(
|
|
2502
2518
|
"card__header",
|
|
2503
2519
|
s && `card__header--${s}`,
|
|
@@ -2510,10 +2526,10 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2510
2526
|
}, ci = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__image", children: e }), ui = ({ children: e, className: t }) => /* @__PURE__ */ i.jsx("div", { className: O("card__body__item", t), children: e }), hi = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__body__subtitle", children: e }), di = ({ icon: e, children: t }) => /* @__PURE__ */ i.jsxs("div", { className: "card__header__title", children: [
|
|
2511
2527
|
e && /* @__PURE__ */ i.jsx("span", { className: "card__header__title__icon", children: e }),
|
|
2512
2528
|
t
|
|
2513
|
-
] }),
|
|
2529
|
+
] }), Cs = d.forwardRef(
|
|
2514
2530
|
(e, t) => {
|
|
2515
|
-
var s = e, { type: r, children: a, className: l, variant: o = "default", disabled: c = !1 } = s,
|
|
2516
|
-
return
|
|
2531
|
+
var s = e, { type: r, children: a, className: l, variant: o = "default", disabled: c = !1 } = s, f = L(s, ["type", "children", "className", "variant", "disabled"]);
|
|
2532
|
+
return d.createElement(
|
|
2517
2533
|
r,
|
|
2518
2534
|
x({
|
|
2519
2535
|
className: O(
|
|
@@ -2523,13 +2539,13 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2523
2539
|
l
|
|
2524
2540
|
),
|
|
2525
2541
|
ref: t
|
|
2526
|
-
},
|
|
2542
|
+
}, f),
|
|
2527
2543
|
a
|
|
2528
2544
|
);
|
|
2529
2545
|
}
|
|
2530
2546
|
);
|
|
2531
|
-
|
|
2532
|
-
Object.assign(
|
|
2547
|
+
Cs.displayName = "Card";
|
|
2548
|
+
Object.assign(Cs, {
|
|
2533
2549
|
Header: li,
|
|
2534
2550
|
Action: Or,
|
|
2535
2551
|
Title: di,
|
|
@@ -2541,20 +2557,20 @@ Object.assign(ys, {
|
|
|
2541
2557
|
EmptyState: ai
|
|
2542
2558
|
});
|
|
2543
2559
|
var fi = (e) => {
|
|
2544
|
-
var t = e, { className: s, children: r } = t, a =
|
|
2545
|
-
return /* @__PURE__ */ i.jsx("div",
|
|
2560
|
+
var t = e, { className: s, children: r } = t, a = L(t, ["className", "children"]);
|
|
2561
|
+
return /* @__PURE__ */ i.jsx("div", k(x({ className: O("checkbox__content", s) }, a), { children: r }));
|
|
2546
2562
|
}, pi = (e) => {
|
|
2547
|
-
var t = e, { className: s, children: r } = t, a =
|
|
2548
|
-
return /* @__PURE__ */ i.jsx("span",
|
|
2549
|
-
},
|
|
2550
|
-
const e =
|
|
2563
|
+
var t = e, { className: s, children: r } = t, a = L(t, ["className", "children"]);
|
|
2564
|
+
return /* @__PURE__ */ i.jsx("span", k(x({ className: O("checkbox__hint", s) }, a), { children: r }));
|
|
2565
|
+
}, xs = d.createContext(void 0), mi = ({ id: e, name: t, children: s }) => /* @__PURE__ */ i.jsx(xs.Provider, { value: { id: e, name: t }, children: s }), vi = () => {
|
|
2566
|
+
const e = d.useContext(xs);
|
|
2551
2567
|
if (!e)
|
|
2552
2568
|
throw new Error("Checkbox compound components can not be rendered outside of Checkbox");
|
|
2553
2569
|
return e;
|
|
2554
2570
|
}, gi = (e) => {
|
|
2555
|
-
var t = e, { className: s, children: r } = t, a =
|
|
2571
|
+
var t = e, { className: s, children: r } = t, a = L(t, ["className", "children"]);
|
|
2556
2572
|
const { id: l } = vi();
|
|
2557
|
-
return /* @__PURE__ */ i.jsx("label",
|
|
2573
|
+
return /* @__PURE__ */ i.jsx("label", k(x({ htmlFor: l, className: O("checkbox__label", s) }, a), { children: r }));
|
|
2558
2574
|
}, we = (e) => {
|
|
2559
2575
|
var t = e, {
|
|
2560
2576
|
id: s,
|
|
@@ -2563,9 +2579,9 @@ var fi = (e) => {
|
|
|
2563
2579
|
variant: l = "neutral",
|
|
2564
2580
|
hasError: o = !1,
|
|
2565
2581
|
single: c,
|
|
2566
|
-
className:
|
|
2567
|
-
children:
|
|
2568
|
-
} = t, h =
|
|
2582
|
+
className: f,
|
|
2583
|
+
children: m
|
|
2584
|
+
} = t, h = L(t, [
|
|
2569
2585
|
"id",
|
|
2570
2586
|
"name",
|
|
2571
2587
|
"isPending",
|
|
@@ -2575,8 +2591,8 @@ var fi = (e) => {
|
|
|
2575
2591
|
"className",
|
|
2576
2592
|
"children"
|
|
2577
2593
|
]);
|
|
2578
|
-
const u =
|
|
2579
|
-
return
|
|
2594
|
+
const u = d.useRef(null);
|
|
2595
|
+
return d.useEffect(() => {
|
|
2580
2596
|
u.current && (a ? u.current.indeterminate = !0 : u.current.indeterminate = !1);
|
|
2581
2597
|
}, [a]), /* @__PURE__ */ i.jsxs(
|
|
2582
2598
|
"div",
|
|
@@ -2590,12 +2606,12 @@ var fi = (e) => {
|
|
|
2590
2606
|
name: r,
|
|
2591
2607
|
type: "checkbox",
|
|
2592
2608
|
ref: u,
|
|
2593
|
-
className: O("checkbox__input",
|
|
2609
|
+
className: O("checkbox__input", f),
|
|
2594
2610
|
value: c ? "true" : ""
|
|
2595
2611
|
}, h)
|
|
2596
2612
|
),
|
|
2597
2613
|
a ? /* @__PURE__ */ i.jsx(Jr, { className: "checkbox__spinner", "aria-hidden": !0 }) : /* @__PURE__ */ i.jsx(Dr, { className: "checkbox__check", "aria-hidden": !0, strokeDasharray: "75" }),
|
|
2598
|
-
/* @__PURE__ */ i.jsx(mi, { id: s, name: r, children:
|
|
2614
|
+
/* @__PURE__ */ i.jsx(mi, { id: s, name: r, children: m })
|
|
2599
2615
|
]
|
|
2600
2616
|
}
|
|
2601
2617
|
);
|
|
@@ -2605,65 +2621,65 @@ we.Label = gi;
|
|
|
2605
2621
|
we.Hint = pi;
|
|
2606
2622
|
we.Error = Error;
|
|
2607
2623
|
var yi = (e) => {
|
|
2608
|
-
var t = e, { type: s = "div", className: r, children: a } = t, l =
|
|
2609
|
-
return
|
|
2610
|
-
}, yt = () => document.body.style.removeProperty("overflow"),
|
|
2611
|
-
var t = e, { className: s, children: r, shouldAnimate: a = !0 } = t, l =
|
|
2612
|
-
const { ref: o, defaultOpen: c, isModal:
|
|
2613
|
-
return
|
|
2624
|
+
var t = e, { type: s = "div", className: r, children: a } = t, l = L(t, ["type", "className", "children"]);
|
|
2625
|
+
return d.createElement(s, x({ className: O("dialog__body", r) }, l), a);
|
|
2626
|
+
}, yt = () => document.body.style.removeProperty("overflow"), Tt = (e) => e.preventDefault(), Ci = '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])', xi = (e) => {
|
|
2627
|
+
var t = e, { className: s, children: r, shouldAnimate: a = !0 } = t, l = L(t, ["className", "children", "shouldAnimate"]);
|
|
2628
|
+
const { ref: o, defaultOpen: c, isModal: f, onClose: m } = Ye();
|
|
2629
|
+
return d.useEffect(() => {
|
|
2614
2630
|
const h = o == null ? void 0 : o.current;
|
|
2615
2631
|
if (h != null && h.open) {
|
|
2616
|
-
const u = h.querySelectorAll(Ci),
|
|
2617
|
-
if (!(
|
|
2632
|
+
const u = h.querySelectorAll(Ci), v = u[0], g = u[u.length - 1], S = (_) => {
|
|
2633
|
+
if (!(_.key === "Tab"))
|
|
2618
2634
|
return;
|
|
2619
|
-
|
|
2635
|
+
_.shiftKey ? document.activeElement === v && (g.focus(), _.preventDefault()) : document.activeElement === g && (v.focus(), _.preventDefault());
|
|
2620
2636
|
};
|
|
2621
2637
|
return document.body.style.overflow = "hidden", h.addEventListener("keydown", S), window.addEventListener("popstate", () => yt()), () => {
|
|
2622
2638
|
h.removeEventListener("keydown", S), window.removeEventListener("popstate", () => yt());
|
|
2623
2639
|
};
|
|
2624
2640
|
}
|
|
2625
|
-
}, [o]),
|
|
2641
|
+
}, [o]), d.useEffect(() => {
|
|
2626
2642
|
const h = o == null ? void 0 : o.current;
|
|
2627
2643
|
if (!h)
|
|
2628
2644
|
return;
|
|
2629
|
-
if (c && (h.removeAttribute("open"), h.showModal(), h.focus()),
|
|
2630
|
-
return h.addEventListener("cancel",
|
|
2631
|
-
const u = ({ clientX:
|
|
2632
|
-
const { top: S, right:
|
|
2633
|
-
j && !(b && M) &&
|
|
2645
|
+
if (c && (h.removeAttribute("open"), h.showModal(), h.focus()), f)
|
|
2646
|
+
return h.addEventListener("cancel", Tt), () => h.removeEventListener("cancel", Tt);
|
|
2647
|
+
const u = ({ clientX: v, clientY: g }) => {
|
|
2648
|
+
const { top: S, right: _, bottom: P, left: C } = h.getBoundingClientRect(), j = 0 < g && 0 < v, b = S < g && g < P, M = C < v && v < _;
|
|
2649
|
+
j && !(b && M) && m();
|
|
2634
2650
|
};
|
|
2635
|
-
return h.addEventListener("cancel",
|
|
2636
|
-
h.removeEventListener("cancel",
|
|
2651
|
+
return h.addEventListener("cancel", m), h.addEventListener("mousedown", u), () => {
|
|
2652
|
+
h.removeEventListener("cancel", m), h.removeEventListener("mousedown", u);
|
|
2637
2653
|
};
|
|
2638
|
-
}, [o,
|
|
2654
|
+
}, [o, f, m, c]), /* @__PURE__ */ i.jsx(
|
|
2639
2655
|
"dialog",
|
|
2640
|
-
|
|
2656
|
+
k(x({
|
|
2641
2657
|
ref: o,
|
|
2642
2658
|
open: c,
|
|
2643
|
-
"aria-modal": !!
|
|
2659
|
+
"aria-modal": !!f,
|
|
2644
2660
|
"aria-labelledby": "dialogTitle",
|
|
2645
2661
|
className: O("dialog", a && "dialog--animated", s)
|
|
2646
2662
|
}, l), {
|
|
2647
2663
|
children: r
|
|
2648
2664
|
})
|
|
2649
2665
|
);
|
|
2650
|
-
},
|
|
2651
|
-
const a =
|
|
2666
|
+
}, bs = d.createContext(void 0), bi = ({ defaultOpen: e, onClose: t, isModal: s, children: r }) => {
|
|
2667
|
+
const a = d.useRef(null), l = d.useRef(t), o = d.useCallback(() => {
|
|
2652
2668
|
var c;
|
|
2653
2669
|
yt(), (c = a.current) == null || c.close(), l.current && (l == null || l.current());
|
|
2654
2670
|
}, [a]);
|
|
2655
|
-
return /* @__PURE__ */ i.jsx(
|
|
2671
|
+
return /* @__PURE__ */ i.jsx(bs.Provider, { value: { ref: a, defaultOpen: e, isModal: s, onClose: o }, children: r });
|
|
2656
2672
|
}, Ye = () => {
|
|
2657
|
-
const e =
|
|
2673
|
+
const e = d.useContext(bs);
|
|
2658
2674
|
if (!e)
|
|
2659
2675
|
throw new Error("Dialog compound components can not be rendered outside of Dialog");
|
|
2660
2676
|
return e;
|
|
2661
2677
|
}, wi = (e) => {
|
|
2662
|
-
var t = e, { children: s } = t, r =
|
|
2678
|
+
var t = e, { children: s } = t, r = L(t, ["children"]);
|
|
2663
2679
|
const { onClose: a } = Ye();
|
|
2664
|
-
return /* @__PURE__ */ i.jsx(Ze,
|
|
2665
|
-
},
|
|
2666
|
-
var s = e, { className: r } = s, a =
|
|
2680
|
+
return /* @__PURE__ */ i.jsx(Ze, k(x({ onClick: a }, r), { children: s }));
|
|
2681
|
+
}, ws = d.forwardRef((e, t) => {
|
|
2682
|
+
var s = e, { className: r } = s, a = L(s, ["className"]);
|
|
2667
2683
|
const { onClose: l } = Ye();
|
|
2668
2684
|
return /* @__PURE__ */ i.jsx(
|
|
2669
2685
|
Ze,
|
|
@@ -2678,18 +2694,18 @@ var yi = (e) => {
|
|
|
2678
2694
|
}, a)
|
|
2679
2695
|
);
|
|
2680
2696
|
});
|
|
2681
|
-
|
|
2697
|
+
ws.displayName = "Close";
|
|
2682
2698
|
var ji = (e) => {
|
|
2683
|
-
var t = e, { className: s, children: r } = t, a =
|
|
2684
|
-
return /* @__PURE__ */ i.jsx("div",
|
|
2699
|
+
var t = e, { className: s, children: r } = t, a = L(t, ["className", "children"]);
|
|
2700
|
+
return /* @__PURE__ */ i.jsx("div", k(x({ className: O("dialog__footer", s) }, a), { children: r }));
|
|
2685
2701
|
}, _i = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "dialog__header", children: e }), Si = (e) => {
|
|
2686
|
-
var t = e, { icon: s, children: r, className: a } = t, l =
|
|
2687
|
-
const { ref: o } = Ye(), c =
|
|
2688
|
-
return
|
|
2702
|
+
var t = e, { icon: s, children: r, className: a } = t, l = L(t, ["icon", "children", "className"]);
|
|
2703
|
+
const { ref: o } = Ye(), c = d.useRef(null);
|
|
2704
|
+
return d.useEffect(() => {
|
|
2689
2705
|
o != null && o.current && o.current.focus();
|
|
2690
2706
|
}, [o]), /* @__PURE__ */ i.jsxs(
|
|
2691
2707
|
"div",
|
|
2692
|
-
|
|
2708
|
+
k(x({
|
|
2693
2709
|
tabIndex: 0,
|
|
2694
2710
|
ref: c,
|
|
2695
2711
|
id: "dialogTitle",
|
|
@@ -2702,9 +2718,9 @@ var ji = (e) => {
|
|
|
2702
2718
|
})
|
|
2703
2719
|
);
|
|
2704
2720
|
}, Ei = (e) => {
|
|
2705
|
-
var t = e, { children: s } = t, r =
|
|
2721
|
+
var t = e, { children: s } = t, r = L(t, ["children"]);
|
|
2706
2722
|
const { ref: a } = Ye();
|
|
2707
|
-
return /* @__PURE__ */ i.jsx(Ze,
|
|
2723
|
+
return /* @__PURE__ */ i.jsx(Ze, k(x({ onClick: () => {
|
|
2708
2724
|
var l;
|
|
2709
2725
|
return (l = a == null ? void 0 : a.current) == null ? void 0 : l.showModal();
|
|
2710
2726
|
} }, r), { children: s }));
|
|
@@ -2716,8 +2732,8 @@ G.Header = _i;
|
|
|
2716
2732
|
G.Body = yi;
|
|
2717
2733
|
G.Footer = ji;
|
|
2718
2734
|
G.Button = wi;
|
|
2719
|
-
G.Close =
|
|
2720
|
-
var
|
|
2735
|
+
G.Close = ws;
|
|
2736
|
+
var js = d.createContext(void 0), Pi = ({
|
|
2721
2737
|
id: e,
|
|
2722
2738
|
position: t,
|
|
2723
2739
|
isOpen: s,
|
|
@@ -2726,10 +2742,10 @@ var ws = f.createContext(void 0), Pi = ({
|
|
|
2726
2742
|
setActiveItemIndex: l,
|
|
2727
2743
|
clearActiveItemIndex: o,
|
|
2728
2744
|
triggerRef: c,
|
|
2729
|
-
contentRef:
|
|
2730
|
-
children:
|
|
2745
|
+
contentRef: f,
|
|
2746
|
+
children: m
|
|
2731
2747
|
}) => /* @__PURE__ */ i.jsx(
|
|
2732
|
-
|
|
2748
|
+
js.Provider,
|
|
2733
2749
|
{
|
|
2734
2750
|
value: {
|
|
2735
2751
|
id: e,
|
|
@@ -2740,12 +2756,12 @@ var ws = f.createContext(void 0), Pi = ({
|
|
|
2740
2756
|
setActiveItemIndex: l,
|
|
2741
2757
|
clearActiveItemIndex: o,
|
|
2742
2758
|
triggerRef: c,
|
|
2743
|
-
contentRef:
|
|
2759
|
+
contentRef: f
|
|
2744
2760
|
},
|
|
2745
|
-
children:
|
|
2761
|
+
children: m
|
|
2746
2762
|
}
|
|
2747
|
-
),
|
|
2748
|
-
const e =
|
|
2763
|
+
), _s = () => {
|
|
2764
|
+
const e = d.useContext(js);
|
|
2749
2765
|
if (e === void 0)
|
|
2750
2766
|
throw new Error("useMenu must be used within a MenuProvider");
|
|
2751
2767
|
return e;
|
|
@@ -2757,43 +2773,43 @@ var ws = f.createContext(void 0), Pi = ({
|
|
|
2757
2773
|
setIsOpen: l,
|
|
2758
2774
|
activeItemIndex: o,
|
|
2759
2775
|
setActiveItemIndex: c,
|
|
2760
|
-
clearActiveItemIndex:
|
|
2761
|
-
triggerRef:
|
|
2776
|
+
clearActiveItemIndex: f,
|
|
2777
|
+
triggerRef: m,
|
|
2762
2778
|
contentRef: h
|
|
2763
|
-
} =
|
|
2764
|
-
var
|
|
2779
|
+
} = _s(), u = (v) => {
|
|
2780
|
+
var g;
|
|
2765
2781
|
if (!a)
|
|
2766
2782
|
return;
|
|
2767
|
-
if (
|
|
2768
|
-
return
|
|
2769
|
-
const S =
|
|
2770
|
-
switch (
|
|
2783
|
+
if (v.key === "Escape")
|
|
2784
|
+
return f(), l(!1), (g = m.current) == null ? void 0 : g.focus();
|
|
2785
|
+
const S = v.shiftKey, _ = Es(h.current).length - 1;
|
|
2786
|
+
switch (v.key) {
|
|
2771
2787
|
case "Tab": {
|
|
2772
2788
|
if (S && o !== 0)
|
|
2773
|
-
return
|
|
2774
|
-
if (!S && o !==
|
|
2775
|
-
|
|
2776
|
-
const
|
|
2777
|
-
return c(Math.min(
|
|
2789
|
+
return v.preventDefault(), c(o ? Math.max(0, o - 1) : 0);
|
|
2790
|
+
if (!S && o !== _) {
|
|
2791
|
+
v.preventDefault();
|
|
2792
|
+
const P = o !== void 0 ? o + 1 : 0;
|
|
2793
|
+
return c(Math.min(_, P));
|
|
2778
2794
|
}
|
|
2779
2795
|
break;
|
|
2780
2796
|
}
|
|
2781
2797
|
case "ArrowUp":
|
|
2782
2798
|
case "ArrowLeft":
|
|
2783
|
-
return
|
|
2799
|
+
return v.preventDefault(), c(o ? Math.max(0, o - 1) : 0);
|
|
2784
2800
|
case "ArrowDown":
|
|
2785
2801
|
case "ArrowRight": {
|
|
2786
|
-
|
|
2787
|
-
const
|
|
2788
|
-
return c(Math.min(
|
|
2802
|
+
v.preventDefault();
|
|
2803
|
+
const P = o !== void 0 ? o + 1 : 0;
|
|
2804
|
+
return c(Math.min(_, P));
|
|
2789
2805
|
}
|
|
2790
2806
|
case "Home":
|
|
2791
|
-
return
|
|
2807
|
+
return v.preventDefault(), c(0);
|
|
2792
2808
|
case "End":
|
|
2793
|
-
return
|
|
2809
|
+
return v.preventDefault(), c(_);
|
|
2794
2810
|
}
|
|
2795
2811
|
};
|
|
2796
|
-
return e ?
|
|
2812
|
+
return e ? d.createElement(
|
|
2797
2813
|
e,
|
|
2798
2814
|
{
|
|
2799
2815
|
id: `${s}-content`,
|
|
@@ -2816,38 +2832,38 @@ var ws = f.createContext(void 0), Pi = ({
|
|
|
2816
2832
|
)
|
|
2817
2833
|
);
|
|
2818
2834
|
}, ki = (e) => {
|
|
2819
|
-
var t = e, { children: s, className: r } = t, a =
|
|
2820
|
-
return /* @__PURE__ */ i.jsx("li",
|
|
2821
|
-
},
|
|
2822
|
-
const { id: s, isOpen: r, setIsOpen: a, clearActiveItemIndex: l, setActiveItemIndex: o, triggerRef: c } =
|
|
2835
|
+
var t = e, { children: s, className: r } = t, a = L(t, ["children", "className"]);
|
|
2836
|
+
return /* @__PURE__ */ i.jsx("li", k(x({}, a), { className: O("menu__list-item", r), children: s }));
|
|
2837
|
+
}, Ss = ({ children: e, className: t }) => {
|
|
2838
|
+
const { id: s, isOpen: r, setIsOpen: a, clearActiveItemIndex: l, setActiveItemIndex: o, triggerRef: c } = _s(), f = () => {
|
|
2823
2839
|
l(), a((h) => !h), r || o(0);
|
|
2824
|
-
},
|
|
2840
|
+
}, m = (h) => {
|
|
2825
2841
|
if (r) {
|
|
2826
2842
|
if (h.key === "Escape")
|
|
2827
2843
|
return l(), a(!1);
|
|
2828
2844
|
h.key === "ArrowDown" && (h.preventDefault(), o(0));
|
|
2829
2845
|
}
|
|
2830
2846
|
};
|
|
2831
|
-
return
|
|
2847
|
+
return d.cloneElement(e, {
|
|
2832
2848
|
id: `${s}-trigger`,
|
|
2833
2849
|
ref: c,
|
|
2834
2850
|
className: O("menu__trigger", t),
|
|
2835
|
-
onClick:
|
|
2836
|
-
onKeyDown:
|
|
2851
|
+
onClick: f,
|
|
2852
|
+
onKeyDown: m,
|
|
2837
2853
|
"aria-expanded": r,
|
|
2838
2854
|
"aria-controls": `${s}-content`
|
|
2839
2855
|
});
|
|
2840
2856
|
};
|
|
2841
|
-
|
|
2842
|
-
var
|
|
2843
|
-
var t = e, { type: s, id: r, position: a = "bottom-end", children: l, className: o } = t, c =
|
|
2844
|
-
const
|
|
2845
|
-
|
|
2857
|
+
Ss.displayName = "Trigger";
|
|
2858
|
+
var Es = (e) => e ? e.tagName === "UL" ? e.children : Array.from(e.getElementsByTagName("ul")).reduce((s, r) => [...s, ...Array.from(r.getElementsByTagName("li"))], []) : [], W = (e) => {
|
|
2859
|
+
var t = e, { type: s, id: r, position: a = "bottom-end", children: l, className: o } = t, c = L(t, ["type", "id", "position", "children", "className"]);
|
|
2860
|
+
const f = d.useRef(null), m = d.useRef(null), h = d.useRef(null), [u, v] = d.useState(!1), [g, S] = d.useState(), [_, P] = d.useState(g);
|
|
2861
|
+
g !== _ && g !== void 0 && h.current && (Es(h.current)[g].firstChild.focus(), P(g));
|
|
2846
2862
|
const C = () => {
|
|
2847
|
-
S(void 0),
|
|
2863
|
+
S(void 0), P(void 0);
|
|
2848
2864
|
}, j = (b) => {
|
|
2849
2865
|
var M;
|
|
2850
|
-
((M =
|
|
2866
|
+
((M = f.current) == null ? void 0 : M.contains(b.relatedTarget)) || (C(), v(!1));
|
|
2851
2867
|
};
|
|
2852
2868
|
return /* @__PURE__ */ i.jsx(
|
|
2853
2869
|
Pi,
|
|
@@ -2855,17 +2871,17 @@ var Ss = (e) => e ? e.tagName === "UL" ? e.children : Array.from(e.getElementsBy
|
|
|
2855
2871
|
id: r,
|
|
2856
2872
|
position: a,
|
|
2857
2873
|
isOpen: u,
|
|
2858
|
-
setIsOpen:
|
|
2859
|
-
activeItemIndex:
|
|
2874
|
+
setIsOpen: v,
|
|
2875
|
+
activeItemIndex: g,
|
|
2860
2876
|
setActiveItemIndex: S,
|
|
2861
2877
|
clearActiveItemIndex: C,
|
|
2862
|
-
triggerRef:
|
|
2878
|
+
triggerRef: m,
|
|
2863
2879
|
contentRef: h,
|
|
2864
|
-
children:
|
|
2880
|
+
children: d.createElement(
|
|
2865
2881
|
s,
|
|
2866
|
-
|
|
2882
|
+
k(x({}, c), {
|
|
2867
2883
|
id: r,
|
|
2868
|
-
ref:
|
|
2884
|
+
ref: f,
|
|
2869
2885
|
className: `menu ${o || ""}`,
|
|
2870
2886
|
onBlur: j
|
|
2871
2887
|
}),
|
|
@@ -2874,17 +2890,17 @@ var Ss = (e) => e ? e.tagName === "UL" ? e.children : Array.from(e.getElementsBy
|
|
|
2874
2890
|
}
|
|
2875
2891
|
);
|
|
2876
2892
|
};
|
|
2877
|
-
W.Trigger =
|
|
2893
|
+
W.Trigger = Ss;
|
|
2878
2894
|
W.Content = Ai;
|
|
2879
2895
|
W.Item = ki;
|
|
2880
|
-
|
|
2896
|
+
d.createContext(void 0);
|
|
2881
2897
|
var Ni = (/* @__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");
|
|
2882
2898
|
[...new Set(Ni.values())].map((e) => ({
|
|
2883
2899
|
label: `+${e}`,
|
|
2884
2900
|
value: e
|
|
2885
2901
|
}));
|
|
2886
|
-
|
|
2887
|
-
|
|
2902
|
+
d.createContext(void 0);
|
|
2903
|
+
d.createContext(void 0);
|
|
2888
2904
|
var tt = /* @__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))(tt || {});
|
|
2889
2905
|
const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
2890
2906
|
bouIconId: e,
|
|
@@ -2898,7 +2914,7 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
2898
2914
|
/* @__PURE__ */ i.jsx(Ct, { icon: r }),
|
|
2899
2915
|
e
|
|
2900
2916
|
] }) }), _e = (e) => {
|
|
2901
|
-
const t =
|
|
2917
|
+
const t = Ds(), { className: s, label: r, mobileUrl: a, desktopUrl: l, icon: o } = e;
|
|
2902
2918
|
return /* @__PURE__ */ i.jsxs(W.Item, { className: s, children: [
|
|
2903
2919
|
(!t || t && !l) && /* @__PURE__ */ i.jsxs("a", { href: a, referrerPolicy: "no-referrer-when-downgrade", children: [
|
|
2904
2920
|
/* @__PURE__ */ i.jsx(Ct, { icon: o }),
|
|
@@ -2909,35 +2925,35 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
2909
2925
|
r
|
|
2910
2926
|
] })
|
|
2911
2927
|
] });
|
|
2912
|
-
},
|
|
2913
|
-
const e =
|
|
2928
|
+
}, Ps = d.createContext(void 0), Li = ({ position: e, bouMenuItems: t, country: s, children: r }) => /* @__PURE__ */ i.jsx(Ps.Provider, { value: { position: e, bouMenuItems: t, country: s }, children: r }), As = () => {
|
|
2929
|
+
const e = d.useContext(Ps);
|
|
2914
2930
|
if (!e)
|
|
2915
2931
|
throw new Error("Authentication context can not be rendered outside of Authentication");
|
|
2916
2932
|
return e;
|
|
2917
|
-
},
|
|
2918
|
-
const e =
|
|
2933
|
+
}, ks = d.createContext(void 0), Fi = ({ apiUrl: e, redirectUrl: t, children: s }) => /* @__PURE__ */ i.jsx(ks.Provider, { value: { apiUrl: e, redirectUrl: t }, children: s }), St = () => {
|
|
2934
|
+
const e = d.useContext(ks);
|
|
2919
2935
|
if (!e)
|
|
2920
2936
|
throw new Error("Api context can not be rendered outside of Api");
|
|
2921
2937
|
return e;
|
|
2922
|
-
},
|
|
2938
|
+
}, Ns = ({ apiUrl: e, redirectUrl: t, trackingInfo: s }) => {
|
|
2923
2939
|
const r = new URLSearchParams({ redirectUrl: t });
|
|
2924
2940
|
s && r.append("trackingInfo", s);
|
|
2925
2941
|
const a = `${e}/login?${r.toString()}`, l = `${e}/logout?${r.toString()}`;
|
|
2926
2942
|
return { loginUrl: a, logoutUrl: l };
|
|
2927
2943
|
}, st = () => {
|
|
2928
|
-
const { apiUrl: e, redirectUrl: t } = St(), s =
|
|
2929
|
-
return
|
|
2944
|
+
const { apiUrl: e, redirectUrl: t } = St(), s = Ts();
|
|
2945
|
+
return Ns({ apiUrl: e, redirectUrl: t, trackingInfo: s });
|
|
2930
2946
|
}, Di = () => {
|
|
2931
2947
|
const { apiUrl: e } = St();
|
|
2932
2948
|
return `${`${e}/xtra`}/authentication/v1/user/profile`;
|
|
2933
|
-
},
|
|
2934
|
-
const { loginUrl: s } =
|
|
2949
|
+
}, Ut = (e) => e ? `+${e.countryCode} ${e.number}` : "", Qt = (e, t) => t == null ? void 0 : t.find((s) => s.type === e), Ht = ({ apiUrl: e, redirectUrl: t }) => {
|
|
2950
|
+
const { loginUrl: s } = Ns({ apiUrl: e, redirectUrl: t });
|
|
2935
2951
|
window.location.replace(s);
|
|
2936
|
-
},
|
|
2952
|
+
}, Kt = (e) => {
|
|
2937
2953
|
var l;
|
|
2938
2954
|
if (!e)
|
|
2939
|
-
return { user: { state: () => "NotAuthenticated" }, tryToLogon:
|
|
2940
|
-
const t = new Date(e.dateOfBirth), s =
|
|
2955
|
+
return { user: { state: () => "NotAuthenticated" }, tryToLogon: Ht };
|
|
2956
|
+
const t = new Date(e.dateOfBirth), s = Qt(Pt.Mobile, e.phone), r = Qt(Pt.Fixed, e.phone), a = Ut(s) ?? Ut(r) ?? "";
|
|
2941
2957
|
return {
|
|
2942
2958
|
user: {
|
|
2943
2959
|
...(l = window.XTRA) == null ? void 0 : l.user,
|
|
@@ -2976,12 +2992,12 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
2976
2992
|
cbh: () => e.customerIdentifier,
|
|
2977
2993
|
state: () => "Authenticated"
|
|
2978
2994
|
},
|
|
2979
|
-
tryToLogon:
|
|
2995
|
+
tryToLogon: Ht
|
|
2980
2996
|
};
|
|
2981
|
-
},
|
|
2997
|
+
}, Ms = ["profile"], Os = () => {
|
|
2982
2998
|
const { i18n: e } = je(), t = Di(), s = sessionStorage.getItem("profile"), r = !!s;
|
|
2983
|
-
return
|
|
2984
|
-
queryKey:
|
|
2999
|
+
return ps({
|
|
3000
|
+
queryKey: Ms,
|
|
2985
3001
|
queryFn: async () => {
|
|
2986
3002
|
const l = await fetch(t, {
|
|
2987
3003
|
credentials: "include",
|
|
@@ -2990,7 +3006,7 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
2990
3006
|
});
|
|
2991
3007
|
if (!l.ok) {
|
|
2992
3008
|
if (l.status === 401)
|
|
2993
|
-
return window.XTRA = { ...window.XTRA, ...
|
|
3009
|
+
return window.XTRA = { ...window.XTRA, ...Kt() }, window.postMessage(
|
|
2994
3010
|
{ source: "xtra-authentication", isAuthenticated: !1 },
|
|
2995
3011
|
new URL(window.location.href).origin
|
|
2996
3012
|
), sessionStorage.removeItem("profile"), { authenticationStatus: "NotAuthenticated" };
|
|
@@ -2998,11 +3014,11 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
2998
3014
|
return { authenticationStatus: "Authenticated", profile: JSON.parse(s) };
|
|
2999
3015
|
throw new Error("Failed to retrieve profile");
|
|
3000
3016
|
}
|
|
3001
|
-
const o = await l.json(), { firstName: c, lastName:
|
|
3002
|
-
return sessionStorage.setItem("profile", JSON.stringify({ firstName: c, lastName:
|
|
3017
|
+
const o = await l.json(), { firstName: c, lastName: f } = o;
|
|
3018
|
+
return sessionStorage.setItem("profile", JSON.stringify({ firstName: c, lastName: f })), window.postMessage(
|
|
3003
3019
|
{ source: "xtra-authentication", isAuthenticated: !0 },
|
|
3004
3020
|
new URL(window.location.href).origin
|
|
3005
|
-
), window.XTRA = { ...window.XTRA, ...
|
|
3021
|
+
), window.XTRA = { ...window.XTRA, ...Kt(o) }, {
|
|
3006
3022
|
authenticationStatus: "Authenticated",
|
|
3007
3023
|
profile: { firstName: o.firstName, lastName: o.lastName }
|
|
3008
3024
|
};
|
|
@@ -3015,10 +3031,10 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3015
3031
|
refetchOnWindowFocus: !1
|
|
3016
3032
|
});
|
|
3017
3033
|
}, Ti = () => {
|
|
3018
|
-
const { t: e } = je(),
|
|
3019
|
-
sessionStorage.removeItem("profile"), window.location.href =
|
|
3034
|
+
const { t: e } = je(), { position: t, bouMenuItems: s, country: r } = As(), a = It({ country: r }), { logoutUrl: l } = st(), c = jt().getQueryData(Ms), f = (c == null ? void 0 : c.profile.firstName) ?? "", m = (c == null ? void 0 : c.profile.lastName) ?? "", h = () => {
|
|
3035
|
+
sessionStorage.removeItem("profile"), window.location.href = l;
|
|
3020
3036
|
};
|
|
3021
|
-
return /* @__PURE__ */ i.jsxs(W, { type: "nav", id: "xtra-menu", position:
|
|
3037
|
+
return /* @__PURE__ */ i.jsxs(W, { type: "nav", id: "xtra-menu", position: t, children: [
|
|
3022
3038
|
/* @__PURE__ */ i.jsx(
|
|
3023
3039
|
W.Trigger,
|
|
3024
3040
|
{
|
|
@@ -3029,39 +3045,39 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3029
3045
|
"button--authentication--authenticated"
|
|
3030
3046
|
),
|
|
3031
3047
|
children: /* @__PURE__ */ i.jsxs("button", { children: [
|
|
3032
|
-
/* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Nr, { variant: "small", firstName:
|
|
3033
|
-
/* @__PURE__ */ i.jsx("span", { className: "button__label", children:
|
|
3048
|
+
/* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Nr, { variant: "small", firstName: f, lastName: m }) }),
|
|
3049
|
+
/* @__PURE__ */ i.jsx("span", { className: "button__label", children: f }),
|
|
3034
3050
|
/* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(_t, {}) })
|
|
3035
3051
|
] })
|
|
3036
3052
|
}
|
|
3037
3053
|
),
|
|
3038
3054
|
/* @__PURE__ */ i.jsxs(W.Content, { as: "div", children: [
|
|
3039
|
-
!!
|
|
3055
|
+
!!s && s.length > 0 && /* @__PURE__ */ i.jsx("ul", { className: "bou-menu__list", children: s.map(({ label: u, icon: v, url: g }, S) => /* @__PURE__ */ i.jsx(
|
|
3040
3056
|
_e,
|
|
3041
3057
|
{
|
|
3042
3058
|
className: "bou-menu-item",
|
|
3043
|
-
mobileUrl:
|
|
3044
|
-
icon:
|
|
3045
|
-
label:
|
|
3059
|
+
mobileUrl: g,
|
|
3060
|
+
icon: v,
|
|
3061
|
+
label: u
|
|
3046
3062
|
},
|
|
3047
|
-
|
|
3063
|
+
S
|
|
3048
3064
|
)) }),
|
|
3049
3065
|
/* @__PURE__ */ i.jsxs("ul", { children: [
|
|
3050
3066
|
/* @__PURE__ */ i.jsx(
|
|
3051
3067
|
_e,
|
|
3052
3068
|
{
|
|
3053
3069
|
className: "manage-profile",
|
|
3054
|
-
mobileUrl: `${
|
|
3055
|
-
desktopUrl: `${
|
|
3070
|
+
mobileUrl: `${a}/manage-profile`,
|
|
3071
|
+
desktopUrl: `${a}/manage-profile/personal-data`,
|
|
3056
3072
|
icon: /* @__PURE__ */ i.jsx($r, {}),
|
|
3057
3073
|
label: e("manageProfile")
|
|
3058
3074
|
}
|
|
3059
3075
|
),
|
|
3060
|
-
/* @__PURE__ */ i.jsx(
|
|
3076
|
+
r === "BE" && /* @__PURE__ */ i.jsx(
|
|
3061
3077
|
_e,
|
|
3062
3078
|
{
|
|
3063
3079
|
className: "payment",
|
|
3064
|
-
mobileUrl: `${
|
|
3080
|
+
mobileUrl: `${a}/payment`,
|
|
3065
3081
|
icon: /* @__PURE__ */ i.jsx(ri, {}),
|
|
3066
3082
|
label: e("payment")
|
|
3067
3083
|
}
|
|
@@ -3070,7 +3086,7 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3070
3086
|
_e,
|
|
3071
3087
|
{
|
|
3072
3088
|
className: "gift-cards",
|
|
3073
|
-
mobileUrl: `${
|
|
3089
|
+
mobileUrl: `${a}/gift-cards`,
|
|
3074
3090
|
icon: /* @__PURE__ */ i.jsx(ti, {}),
|
|
3075
3091
|
label: e("giftCards")
|
|
3076
3092
|
}
|
|
@@ -3078,7 +3094,7 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3078
3094
|
/* @__PURE__ */ i.jsx(
|
|
3079
3095
|
_e,
|
|
3080
3096
|
{
|
|
3081
|
-
mobileUrl: `${
|
|
3097
|
+
mobileUrl: `${a}/identifiers`,
|
|
3082
3098
|
icon: /* @__PURE__ */ i.jsx(ni, {}),
|
|
3083
3099
|
label: e("qrCode")
|
|
3084
3100
|
}
|
|
@@ -3087,13 +3103,13 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3087
3103
|
_e,
|
|
3088
3104
|
{
|
|
3089
3105
|
className: "manage-privacy",
|
|
3090
|
-
mobileUrl: `${
|
|
3091
|
-
desktopUrl: `${
|
|
3106
|
+
mobileUrl: `${a}/manage-privacy`,
|
|
3107
|
+
desktopUrl: `${a}/manage-privacy/permissions`,
|
|
3092
3108
|
icon: /* @__PURE__ */ i.jsx(Wr, {}),
|
|
3093
3109
|
label: e("privacy")
|
|
3094
3110
|
}
|
|
3095
3111
|
),
|
|
3096
|
-
/* @__PURE__ */ i.jsx(Ri, { onClick:
|
|
3112
|
+
/* @__PURE__ */ i.jsx(Ri, { onClick: h, icon: /* @__PURE__ */ i.jsx(Gr, {}), label: e("logout") })
|
|
3097
3113
|
] })
|
|
3098
3114
|
] })
|
|
3099
3115
|
] });
|
|
@@ -3120,14 +3136,14 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3120
3136
|
e
|
|
3121
3137
|
),
|
|
3122
3138
|
children: [
|
|
3123
|
-
/* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(
|
|
3139
|
+
/* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(ys, { width: 24, height: 24, suffix: "desktop" }) }),
|
|
3124
3140
|
/* @__PURE__ */ i.jsx("span", { className: "button__label", children: t("login") }),
|
|
3125
3141
|
/* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(_t, {}) })
|
|
3126
3142
|
]
|
|
3127
3143
|
}
|
|
3128
3144
|
);
|
|
3129
3145
|
}, Hi = () => {
|
|
3130
|
-
const { t: e } = je(), { loginUrl: t } = st(), s =
|
|
3146
|
+
const { t: e } = je(), { loginUrl: t } = st(), s = It(), { position: r } = As();
|
|
3131
3147
|
return /* @__PURE__ */ i.jsxs(
|
|
3132
3148
|
W,
|
|
3133
3149
|
{
|
|
@@ -3138,7 +3154,7 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3138
3154
|
"aria-label": e("xtraMenuAriaLabel"),
|
|
3139
3155
|
children: [
|
|
3140
3156
|
/* @__PURE__ */ i.jsx(W.Trigger, { className: O("button", "button--neutral", "button--authentication"), children: /* @__PURE__ */ i.jsxs("button", { children: [
|
|
3141
|
-
/* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(
|
|
3157
|
+
/* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(ys, { width: 24, height: 24, suffix: "mobile" }) }),
|
|
3142
3158
|
/* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(_t, {}) })
|
|
3143
3159
|
] }) }),
|
|
3144
3160
|
/* @__PURE__ */ i.jsxs(W.Content, { children: [
|
|
@@ -3156,16 +3172,16 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3156
3172
|
);
|
|
3157
3173
|
}, Ki = () => {
|
|
3158
3174
|
var t, s;
|
|
3159
|
-
const e =
|
|
3175
|
+
const e = Os();
|
|
3160
3176
|
return ((t = e.data) == null ? void 0 : t.authenticationStatus) === "Authenticated" ? /* @__PURE__ */ i.jsx(Ti, {}) : ((s = e.data) == null ? void 0 : s.authenticationStatus) === "NotAuthenticated" || e.isError ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
3161
3177
|
/* @__PURE__ */ i.jsx(Qi, {}),
|
|
3162
3178
|
/* @__PURE__ */ i.jsx(Hi, {})
|
|
3163
3179
|
] }) : /* @__PURE__ */ i.jsx(Ui, {});
|
|
3164
|
-
},
|
|
3180
|
+
}, Rs = () => {
|
|
3165
3181
|
const { apiUrl: e } = St();
|
|
3166
3182
|
return `${`${e}/xtra`}/authentication/v1/gdpr`;
|
|
3167
3183
|
}, Gi = () => {
|
|
3168
|
-
const e =
|
|
3184
|
+
const e = Rs(), t = new cs();
|
|
3169
3185
|
return Cr({
|
|
3170
3186
|
mutationFn: async (r) => {
|
|
3171
3187
|
const a = await fetch(`${e}/tc`, {
|
|
@@ -3185,8 +3201,8 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3185
3201
|
});
|
|
3186
3202
|
}, qi = () => {
|
|
3187
3203
|
var l;
|
|
3188
|
-
const { i18n: e } = je(), t =
|
|
3189
|
-
return
|
|
3204
|
+
const { i18n: e } = je(), t = Rs(), r = ((l = Os().data) == null ? void 0 : l.authenticationStatus) === "Authenticated";
|
|
3205
|
+
return ps({
|
|
3190
3206
|
queryKey: ["gdpr"],
|
|
3191
3207
|
queryFn: async () => {
|
|
3192
3208
|
const o = await fetch(`${t}/tc/check`, {
|
|
@@ -3201,37 +3217,37 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3201
3217
|
enabled: r
|
|
3202
3218
|
});
|
|
3203
3219
|
}, Wi = () => {
|
|
3204
|
-
var
|
|
3205
|
-
const { t: e } = je(), { logoutUrl: t } = st(), [s, r] =
|
|
3206
|
-
|
|
3207
|
-
const
|
|
3208
|
-
|
|
3220
|
+
var P;
|
|
3221
|
+
const { t: e } = je(), { logoutUrl: t } = st(), [s, r] = d.useState(0), [a, l] = d.useState({}), { AccessibleFormMessage: o, formRef: c } = Us({ submitCount: s, errors: a }), { mutate: f, isError: m } = Gi(), h = qi(), [u, v] = d.useState(!1);
|
|
3222
|
+
Qs({ element: "xtra-authentication" });
|
|
3223
|
+
const g = e("termsAndConditions.error.required"), S = () => {
|
|
3224
|
+
v(!1), document.body.style.removeProperty("overflow");
|
|
3209
3225
|
};
|
|
3210
|
-
|
|
3226
|
+
d.useEffect(() => {
|
|
3211
3227
|
var C;
|
|
3212
|
-
(C = h.data) != null && C.length &&
|
|
3213
|
-
}, [(
|
|
3228
|
+
(C = h.data) != null && C.length && v(!0);
|
|
3229
|
+
}, [(P = h.data) == null ? void 0 : P.length]), d.useEffect(() => {
|
|
3214
3230
|
u && document.body.style.setProperty("overflow", "hidden");
|
|
3215
|
-
}, [u]),
|
|
3216
|
-
|
|
3217
|
-
}, [
|
|
3218
|
-
const
|
|
3231
|
+
}, [u]), d.useEffect(() => {
|
|
3232
|
+
m && l({ acceptedTC: g });
|
|
3233
|
+
}, [g, m]);
|
|
3234
|
+
const _ = (C) => {
|
|
3219
3235
|
C.preventDefault(), r((b) => b + 1);
|
|
3220
3236
|
const { acceptedTC: j } = C.target;
|
|
3221
3237
|
if (j instanceof RadioNodeList) {
|
|
3222
3238
|
const b = Object.values(j);
|
|
3223
|
-
b.every((
|
|
3239
|
+
b.every((F) => F.checked) ? (l({}), f(b.map((F) => F.value)), S()) : l({ acceptedTC: g });
|
|
3224
3240
|
} else
|
|
3225
|
-
j != null && j.checked ? (l({}),
|
|
3241
|
+
j != null && j.checked ? (l({}), f([j.value]), S()) : l({ acceptedTC: g });
|
|
3226
3242
|
};
|
|
3227
3243
|
return u ? /* @__PURE__ */ i.jsxs(G, { defaultOpen: u, isModal: !0, children: [
|
|
3228
3244
|
o,
|
|
3229
3245
|
/* @__PURE__ */ i.jsxs(G.Root, { children: [
|
|
3230
3246
|
/* @__PURE__ */ i.jsx(G.Header, { children: /* @__PURE__ */ i.jsx(G.Title, { icon: /* @__PURE__ */ i.jsx("i", { className: "commerce__icon" }), children: /* @__PURE__ */ i.jsx(Yi, { children: e("termsAndConditions.title") }) }) }),
|
|
3231
|
-
/* @__PURE__ */ i.jsx(G.Body, { children: /* @__PURE__ */ i.jsxs(
|
|
3247
|
+
/* @__PURE__ */ i.jsx(G.Body, { children: /* @__PURE__ */ i.jsxs(Ls, { ref: c, id: "tc-form", onSubmit: _, children: [
|
|
3232
3248
|
/* @__PURE__ */ i.jsxs($i, { children: [
|
|
3233
3249
|
e("termsAndConditions.description"),
|
|
3234
|
-
a.acceptedTC && /* @__PURE__ */ i.jsx(zi, { children:
|
|
3250
|
+
a.acceptedTC && /* @__PURE__ */ i.jsx(zi, { children: g })
|
|
3235
3251
|
] }),
|
|
3236
3252
|
h.data.map(({ tcCode: C, title: j, URL: b }) => /* @__PURE__ */ i.jsx(
|
|
3237
3253
|
we,
|
|
@@ -3264,8 +3280,8 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3264
3280
|
}, Vi = ({
|
|
3265
3281
|
children: e,
|
|
3266
3282
|
...t
|
|
3267
|
-
}) => /* @__PURE__ */ i.jsx(we.Label, { className: "form--tc__label", ...t, children: e }),
|
|
3268
|
-
|
|
3283
|
+
}) => /* @__PURE__ */ i.jsx(we.Label, { className: "form--tc__label", ...t, children: e }), Ls = d.forwardRef(({ children: e, ...t }, s) => /* @__PURE__ */ i.jsx("form", { className: "form--tc", ref: s, ...t, children: e }));
|
|
3284
|
+
Ls.displayName = "TermsAndConditionsForm";
|
|
3269
3285
|
const $i = ({
|
|
3270
3286
|
children: e,
|
|
3271
3287
|
...t
|
|
@@ -3280,8 +3296,24 @@ const $i = ({
|
|
|
3280
3296
|
...t,
|
|
3281
3297
|
children: e
|
|
3282
3298
|
}
|
|
3283
|
-
), Yi = ({ children: e }) => /* @__PURE__ */ i.jsx("h1", { className: "form--tc__title", children: e }), zi = ({ children: e, ...t }) => /* @__PURE__ */ i.jsx("span", { className: "form--tc__error", role: "alert", ...t, children: e }), Ji = new
|
|
3284
|
-
|
|
3299
|
+
), Yi = ({ children: e }) => /* @__PURE__ */ i.jsx("h1", { className: "form--tc__title", children: e }), zi = ({ children: e, ...t }) => /* @__PURE__ */ i.jsx("span", { className: "form--tc__error", role: "alert", ...t, children: e }), Ji = new cs(), Bi = ({
|
|
3300
|
+
environment: e,
|
|
3301
|
+
redirectUrl: t,
|
|
3302
|
+
apiUrl: s,
|
|
3303
|
+
position: r,
|
|
3304
|
+
commerceId: a,
|
|
3305
|
+
bouMenuItems: l,
|
|
3306
|
+
country: o
|
|
3307
|
+
}) => /* @__PURE__ */ i.jsx(Hs, { environment: e, children: /* @__PURE__ */ i.jsx(Ks, { commerceId: a, children: /* @__PURE__ */ i.jsx(Fi, { apiUrl: s, redirectUrl: t, children: /* @__PURE__ */ i.jsxs(ar, { client: Ji, children: [
|
|
3308
|
+
/* @__PURE__ */ i.jsx(
|
|
3309
|
+
Li,
|
|
3310
|
+
{
|
|
3311
|
+
position: r,
|
|
3312
|
+
bouMenuItems: l,
|
|
3313
|
+
country: o,
|
|
3314
|
+
children: /* @__PURE__ */ i.jsx(Ki, {})
|
|
3315
|
+
}
|
|
3316
|
+
),
|
|
3285
3317
|
/* @__PURE__ */ i.jsx(Wi, {})
|
|
3286
3318
|
] }) }) }) });
|
|
3287
3319
|
export {
|