@myxtra/authentication-green 1.9.4 → 1.9.5
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as d, j as n, g as _t, u as q, a as Ke, b as St, E as Et } from "./index-
|
|
1
|
+
import { r as d, j as n, g as _t, u as q, a as Ke, b as St, E as Et } from "./index-f380d606.mjs";
|
|
2
2
|
class V {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
|
|
@@ -20,7 +20,7 @@ class V {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
const X = typeof window > "u" || "Deno" in window;
|
|
23
|
-
function
|
|
23
|
+
function k() {
|
|
24
24
|
}
|
|
25
25
|
function Pt(e, t) {
|
|
26
26
|
return typeof e == "function" ? e(t) : e;
|
|
@@ -142,15 +142,15 @@ function Oe(e) {
|
|
|
142
142
|
return Array.isArray(e) && e.length === Object.keys(e).length;
|
|
143
143
|
}
|
|
144
144
|
function pe(e) {
|
|
145
|
-
if (!
|
|
145
|
+
if (!Fe(e))
|
|
146
146
|
return !1;
|
|
147
147
|
const t = e.constructor;
|
|
148
148
|
if (typeof t > "u")
|
|
149
149
|
return !0;
|
|
150
150
|
const s = t.prototype;
|
|
151
|
-
return !(!
|
|
151
|
+
return !(!Fe(s) || !s.hasOwnProperty("isPrototypeOf"));
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function Fe(e) {
|
|
154
154
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
155
155
|
}
|
|
156
156
|
function I(e) {
|
|
@@ -161,7 +161,7 @@ function $e(e) {
|
|
|
161
161
|
setTimeout(t, e);
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function Ne(e) {
|
|
165
165
|
$e(0).then(e);
|
|
166
166
|
}
|
|
167
167
|
function At() {
|
|
@@ -211,16 +211,16 @@ class Ot extends V {
|
|
|
211
211
|
return typeof this.focused == "boolean" ? this.focused : typeof document > "u" ? !0 : [void 0, "visible", "prerender"].includes(document.visibilityState);
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
const ne = new Ot(),
|
|
215
|
-
class
|
|
214
|
+
const ne = new Ot(), Me = ["online", "offline"];
|
|
215
|
+
class Ft extends V {
|
|
216
216
|
constructor() {
|
|
217
217
|
super(), this.setup = (t) => {
|
|
218
218
|
if (!X && window.addEventListener) {
|
|
219
219
|
const s = () => t();
|
|
220
|
-
return
|
|
220
|
+
return Me.forEach((r) => {
|
|
221
221
|
window.addEventListener(r, s, !1);
|
|
222
222
|
}), () => {
|
|
223
|
-
|
|
223
|
+
Me.forEach((r) => {
|
|
224
224
|
window.removeEventListener(r, s);
|
|
225
225
|
});
|
|
226
226
|
};
|
|
@@ -256,8 +256,8 @@ class Nt extends V {
|
|
|
256
256
|
return typeof this.online == "boolean" ? this.online : typeof navigator > "u" || typeof navigator.onLine > "u" ? !0 : navigator.onLine;
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
|
-
const ie = new
|
|
260
|
-
function
|
|
259
|
+
const ie = new Ft();
|
|
260
|
+
function Nt(e) {
|
|
261
261
|
return Math.min(1e3 * 2 ** e, 3e4);
|
|
262
262
|
}
|
|
263
263
|
function ue(e) {
|
|
@@ -273,22 +273,22 @@ function te(e) {
|
|
|
273
273
|
}
|
|
274
274
|
function Ze(e) {
|
|
275
275
|
let t = !1, s = 0, r = !1, i, a, o;
|
|
276
|
-
const l = new Promise((m,
|
|
277
|
-
a = m, o =
|
|
276
|
+
const l = new Promise((m, g) => {
|
|
277
|
+
a = m, o = g;
|
|
278
278
|
}), c = (m) => {
|
|
279
|
-
r || (
|
|
279
|
+
r || (p(new We(m)), e.abort == null || e.abort());
|
|
280
280
|
}, h = () => {
|
|
281
281
|
t = !0;
|
|
282
282
|
}, u = () => {
|
|
283
283
|
t = !1;
|
|
284
|
-
},
|
|
284
|
+
}, f = () => !ne.isFocused() || e.networkMode !== "always" && !ie.isOnline(), v = (m) => {
|
|
285
285
|
r || (r = !0, e.onSuccess == null || e.onSuccess(m), i == null || i(), a(m));
|
|
286
|
-
},
|
|
286
|
+
}, p = (m) => {
|
|
287
287
|
r || (r = !0, e.onError == null || e.onError(m), i == null || i(), o(m));
|
|
288
288
|
}, y = () => new Promise((m) => {
|
|
289
|
-
i = (
|
|
290
|
-
const _ = r || !
|
|
291
|
-
return _ && m(
|
|
289
|
+
i = (g) => {
|
|
290
|
+
const _ = r || !f();
|
|
291
|
+
return _ && m(g), _;
|
|
292
292
|
}, e.onPause == null || e.onPause();
|
|
293
293
|
}).then(() => {
|
|
294
294
|
i = void 0, r || e.onContinue == null || e.onContinue();
|
|
@@ -298,23 +298,23 @@ function Ze(e) {
|
|
|
298
298
|
let m;
|
|
299
299
|
try {
|
|
300
300
|
m = e.fn();
|
|
301
|
-
} catch (
|
|
302
|
-
m = Promise.reject(
|
|
301
|
+
} catch (g) {
|
|
302
|
+
m = Promise.reject(g);
|
|
303
303
|
}
|
|
304
|
-
Promise.resolve(m).then(v).catch((
|
|
304
|
+
Promise.resolve(m).then(v).catch((g) => {
|
|
305
305
|
var _, w;
|
|
306
306
|
if (r)
|
|
307
307
|
return;
|
|
308
|
-
const
|
|
308
|
+
const P = (_ = e.retry) != null ? _ : 3, F = (w = e.retryDelay) != null ? w : Nt, S = typeof F == "function" ? F(s, g) : F, j = P === !0 || typeof P == "number" && s < P || typeof P == "function" && P(s, g);
|
|
309
309
|
if (t || !j) {
|
|
310
|
-
|
|
310
|
+
p(g);
|
|
311
311
|
return;
|
|
312
312
|
}
|
|
313
|
-
s++, e.onFail == null || e.onFail(s,
|
|
314
|
-
if (
|
|
313
|
+
s++, e.onFail == null || e.onFail(s, g), $e(S).then(() => {
|
|
314
|
+
if (f())
|
|
315
315
|
return y();
|
|
316
316
|
}).then(() => {
|
|
317
|
-
t ?
|
|
317
|
+
t ? p(g) : x();
|
|
318
318
|
});
|
|
319
319
|
});
|
|
320
320
|
};
|
|
@@ -327,35 +327,35 @@ function Ze(e) {
|
|
|
327
327
|
};
|
|
328
328
|
}
|
|
329
329
|
const je = console;
|
|
330
|
-
function
|
|
330
|
+
function Mt() {
|
|
331
331
|
let e = [], t = 0, s = (u) => {
|
|
332
332
|
u();
|
|
333
333
|
}, r = (u) => {
|
|
334
334
|
u();
|
|
335
335
|
};
|
|
336
336
|
const i = (u) => {
|
|
337
|
-
let
|
|
337
|
+
let f;
|
|
338
338
|
t++;
|
|
339
339
|
try {
|
|
340
|
-
|
|
340
|
+
f = u();
|
|
341
341
|
} finally {
|
|
342
342
|
t--, t || l();
|
|
343
343
|
}
|
|
344
|
-
return
|
|
344
|
+
return f;
|
|
345
345
|
}, a = (u) => {
|
|
346
|
-
t ? e.push(u) :
|
|
346
|
+
t ? e.push(u) : Ne(() => {
|
|
347
347
|
s(u);
|
|
348
348
|
});
|
|
349
|
-
}, o = (u) => (...
|
|
349
|
+
}, o = (u) => (...f) => {
|
|
350
350
|
a(() => {
|
|
351
|
-
u(...
|
|
351
|
+
u(...f);
|
|
352
352
|
});
|
|
353
353
|
}, l = () => {
|
|
354
354
|
const u = e;
|
|
355
|
-
e = [], u.length &&
|
|
355
|
+
e = [], u.length && Ne(() => {
|
|
356
356
|
r(() => {
|
|
357
|
-
u.forEach((
|
|
358
|
-
s(
|
|
357
|
+
u.forEach((f) => {
|
|
358
|
+
s(f);
|
|
359
359
|
});
|
|
360
360
|
});
|
|
361
361
|
});
|
|
@@ -372,7 +372,7 @@ function kt() {
|
|
|
372
372
|
}
|
|
373
373
|
};
|
|
374
374
|
}
|
|
375
|
-
const A =
|
|
375
|
+
const A = Mt();
|
|
376
376
|
class ze {
|
|
377
377
|
destroy() {
|
|
378
378
|
this.clearGcTimeout();
|
|
@@ -389,7 +389,7 @@ class ze {
|
|
|
389
389
|
this.gcTimeout && (clearTimeout(this.gcTimeout), this.gcTimeout = void 0);
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
|
-
class
|
|
392
|
+
class kt extends ze {
|
|
393
393
|
constructor(t) {
|
|
394
394
|
super(), this.abortSignalConsumed = !1, this.defaultOptions = t.defaultOptions, this.setOptions(t.options), this.observers = [], this.cache = t.cache, this.logger = t.logger || je, this.queryKey = t.queryKey, this.queryHash = t.queryHash, this.initialState = t.state || Lt(this.options), this.state = this.initialState, this.scheduleGc();
|
|
395
395
|
}
|
|
@@ -424,7 +424,7 @@ class Mt extends ze {
|
|
|
424
424
|
cancel(t) {
|
|
425
425
|
var s;
|
|
426
426
|
const r = this.promise;
|
|
427
|
-
return (s = this.retryer) == null || s.cancel(t), r ? r.then(
|
|
427
|
+
return (s = this.retryer) == null || s.cancel(t), r ? r.then(k).catch(k) : Promise.resolve();
|
|
428
428
|
}
|
|
429
429
|
destroy() {
|
|
430
430
|
super.destroy(), this.cancel({
|
|
@@ -497,16 +497,16 @@ class Mt extends ze {
|
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
499
|
if (t && this.setOptions(t), !this.options.queryFn) {
|
|
500
|
-
const
|
|
501
|
-
|
|
500
|
+
const p = this.observers.find((y) => y.options.queryFn);
|
|
501
|
+
p && this.setOptions(p.options);
|
|
502
502
|
}
|
|
503
503
|
Array.isArray(this.options.queryKey);
|
|
504
504
|
const o = At(), l = {
|
|
505
505
|
queryKey: this.queryKey,
|
|
506
506
|
pageParam: void 0,
|
|
507
507
|
meta: this.meta
|
|
508
|
-
}, c = (
|
|
509
|
-
Object.defineProperty(
|
|
508
|
+
}, c = (p) => {
|
|
509
|
+
Object.defineProperty(p, "signal", {
|
|
510
510
|
enumerable: !0,
|
|
511
511
|
get: () => {
|
|
512
512
|
if (o)
|
|
@@ -523,38 +523,38 @@ class Mt extends ze {
|
|
|
523
523
|
fetchFn: h
|
|
524
524
|
};
|
|
525
525
|
if (c(u), (r = this.options.behavior) == null || r.onFetch(u), this.revertState = this.state, this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((i = u.fetchOptions) == null ? void 0 : i.meta)) {
|
|
526
|
-
var
|
|
526
|
+
var f;
|
|
527
527
|
this.dispatch({
|
|
528
528
|
type: "fetch",
|
|
529
|
-
meta: (
|
|
529
|
+
meta: (f = u.fetchOptions) == null ? void 0 : f.meta
|
|
530
530
|
});
|
|
531
531
|
}
|
|
532
|
-
const v = (
|
|
533
|
-
if (te(
|
|
532
|
+
const v = (p) => {
|
|
533
|
+
if (te(p) && p.silent || this.dispatch({
|
|
534
534
|
type: "error",
|
|
535
|
-
error:
|
|
536
|
-
}), !te(
|
|
537
|
-
var y, x, m,
|
|
538
|
-
(y = (x = this.cache.config).onError) == null || y.call(x,
|
|
535
|
+
error: p
|
|
536
|
+
}), !te(p)) {
|
|
537
|
+
var y, x, m, g;
|
|
538
|
+
(y = (x = this.cache.config).onError) == null || y.call(x, p, this), (m = (g = this.cache.config).onSettled) == null || m.call(g, this.state.data, p, this);
|
|
539
539
|
}
|
|
540
540
|
this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
|
|
541
541
|
};
|
|
542
542
|
return this.retryer = Ze({
|
|
543
543
|
fn: u.fetchFn,
|
|
544
544
|
abort: o == null ? void 0 : o.abort.bind(o),
|
|
545
|
-
onSuccess: (
|
|
546
|
-
var y, x, m,
|
|
547
|
-
if (typeof
|
|
545
|
+
onSuccess: (p) => {
|
|
546
|
+
var y, x, m, g;
|
|
547
|
+
if (typeof p > "u") {
|
|
548
548
|
v(new Error(this.queryHash + " data is undefined"));
|
|
549
549
|
return;
|
|
550
550
|
}
|
|
551
|
-
this.setData(
|
|
551
|
+
this.setData(p), (y = (x = this.cache.config).onSuccess) == null || y.call(x, p, this), (m = (g = this.cache.config).onSettled) == null || m.call(g, p, this.state.error, this), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
|
|
552
552
|
},
|
|
553
553
|
onError: v,
|
|
554
|
-
onFail: (
|
|
554
|
+
onFail: (p, y) => {
|
|
555
555
|
this.dispatch({
|
|
556
556
|
type: "failed",
|
|
557
|
-
failureCount:
|
|
557
|
+
failureCount: p,
|
|
558
558
|
error: y
|
|
559
559
|
});
|
|
560
560
|
},
|
|
@@ -682,7 +682,7 @@ class Dt extends V {
|
|
|
682
682
|
var i;
|
|
683
683
|
const a = s.queryKey, o = (i = s.queryHash) != null ? i : we(a, s);
|
|
684
684
|
let l = this.get(o);
|
|
685
|
-
return l || (l = new
|
|
685
|
+
return l || (l = new kt({
|
|
686
686
|
cache: this,
|
|
687
687
|
logger: t.getLogger(),
|
|
688
688
|
queryKey: a,
|
|
@@ -795,11 +795,11 @@ class Tt extends ze {
|
|
|
795
795
|
var j;
|
|
796
796
|
return this.retryer = Ze({
|
|
797
797
|
fn: () => this.options.mutationFn ? this.options.mutationFn(this.state.variables) : Promise.reject("No mutationFn found"),
|
|
798
|
-
onFail: (b,
|
|
798
|
+
onFail: (b, M) => {
|
|
799
799
|
this.dispatch({
|
|
800
800
|
type: "failed",
|
|
801
801
|
failureCount: b,
|
|
802
|
-
error:
|
|
802
|
+
error: M
|
|
803
803
|
});
|
|
804
804
|
},
|
|
805
805
|
onPause: () => {
|
|
@@ -820,12 +820,12 @@ class Tt extends ze {
|
|
|
820
820
|
try {
|
|
821
821
|
var r, i, a, o, l, c, h, u;
|
|
822
822
|
if (!s) {
|
|
823
|
-
var
|
|
823
|
+
var f, v, p, y;
|
|
824
824
|
this.dispatch({
|
|
825
825
|
type: "loading",
|
|
826
826
|
variables: this.options.variables
|
|
827
|
-
}), await ((
|
|
828
|
-
const b = await ((
|
|
827
|
+
}), await ((f = (v = this.mutationCache.config).onMutate) == null ? void 0 : f.call(v, this.state.variables, this));
|
|
828
|
+
const b = await ((p = (y = this.options).onMutate) == null ? void 0 : p.call(y, this.state.variables));
|
|
829
829
|
b !== this.state.context && this.dispatch({
|
|
830
830
|
type: "loading",
|
|
831
831
|
context: b,
|
|
@@ -839,8 +839,8 @@ class Tt extends ze {
|
|
|
839
839
|
}), j;
|
|
840
840
|
} catch (j) {
|
|
841
841
|
try {
|
|
842
|
-
var x, m,
|
|
843
|
-
throw await ((x = (m = this.mutationCache.config).onError) == null ? void 0 : x.call(m, j, this.state.variables, this.state.context, this)), await ((
|
|
842
|
+
var x, m, g, _, w, P, F, S;
|
|
843
|
+
throw await ((x = (m = this.mutationCache.config).onError) == null ? void 0 : x.call(m, j, this.state.variables, this.state.context, this)), await ((g = (_ = this.options).onError) == null ? void 0 : g.call(_, j, this.state.variables, this.state.context)), await ((w = (P = this.mutationCache.config).onSettled) == null ? void 0 : w.call(P, void 0, j, this.state.variables, this.state.context, this)), await ((F = (S = this.options).onSettled) == null ? void 0 : F.call(S, void 0, j, this.state.variables, this.state.context)), j;
|
|
844
844
|
} finally {
|
|
845
845
|
this.dispatch({
|
|
846
846
|
type: "error",
|
|
@@ -986,7 +986,7 @@ class Ut extends V {
|
|
|
986
986
|
var t;
|
|
987
987
|
return this.resuming = ((t = this.resuming) != null ? t : Promise.resolve()).then(() => {
|
|
988
988
|
const s = this.mutations.filter((r) => r.state.isPaused);
|
|
989
|
-
return A.batch(() => s.reduce((r, i) => r.then(() => i.continue().catch(
|
|
989
|
+
return A.batch(() => s.reduce((r, i) => r.then(() => i.continue().catch(k)), Promise.resolve()));
|
|
990
990
|
}).then(() => {
|
|
991
991
|
this.resuming = void 0;
|
|
992
992
|
}), this.resuming;
|
|
@@ -997,8 +997,8 @@ function Qt() {
|
|
|
997
997
|
onFetch: (e) => {
|
|
998
998
|
e.fetchFn = () => {
|
|
999
999
|
var t, s, r, i, a, o;
|
|
1000
|
-
const l = (t = e.fetchOptions) == null || (s = t.meta) == null ? void 0 : s.refetchPage, c = (r = e.fetchOptions) == null || (i = r.meta) == null ? void 0 : i.fetchMore, h = c == null ? void 0 : c.pageParam, u = (c == null ? void 0 : c.direction) === "forward",
|
|
1001
|
-
let y =
|
|
1000
|
+
const l = (t = e.fetchOptions) == null || (s = t.meta) == null ? void 0 : s.refetchPage, c = (r = e.fetchOptions) == null || (i = r.meta) == null ? void 0 : i.fetchMore, h = c == null ? void 0 : c.pageParam, u = (c == null ? void 0 : c.direction) === "forward", f = (c == null ? void 0 : c.direction) === "backward", v = ((a = e.state.data) == null ? void 0 : a.pages) || [], p = ((o = e.state.data) == null ? void 0 : o.pageParams) || [];
|
|
1001
|
+
let y = p, x = !1;
|
|
1002
1002
|
const m = (S) => {
|
|
1003
1003
|
Object.defineProperty(S, "signal", {
|
|
1004
1004
|
enumerable: !0,
|
|
@@ -1015,7 +1015,7 @@ function Qt() {
|
|
|
1015
1015
|
return e.signal;
|
|
1016
1016
|
}
|
|
1017
1017
|
});
|
|
1018
|
-
},
|
|
1018
|
+
}, g = e.options.queryFn || (() => Promise.reject("Missing queryFn for queryKey '" + e.options.queryHash + "'")), _ = (S, j, b, M) => (y = M ? [j, ...y] : [...y, j], M ? [b, ...S] : [...S, b]), w = (S, j, b, M) => {
|
|
1019
1019
|
if (x)
|
|
1020
1020
|
return Promise.reject("Cancelled");
|
|
1021
1021
|
if (typeof b > "u" && !j && S.length)
|
|
@@ -1026,32 +1026,32 @@ function Qt() {
|
|
|
1026
1026
|
meta: e.options.meta
|
|
1027
1027
|
};
|
|
1028
1028
|
m(Y);
|
|
1029
|
-
const de =
|
|
1030
|
-
return Promise.resolve(de).then((jt) => _(S, b, jt,
|
|
1029
|
+
const de = g(Y);
|
|
1030
|
+
return Promise.resolve(de).then((jt) => _(S, b, jt, M));
|
|
1031
1031
|
};
|
|
1032
|
-
let
|
|
1032
|
+
let P;
|
|
1033
1033
|
if (!v.length)
|
|
1034
|
-
|
|
1034
|
+
P = w([]);
|
|
1035
1035
|
else if (u) {
|
|
1036
|
-
const S = typeof h < "u", j = S ? h :
|
|
1037
|
-
|
|
1038
|
-
} else if (
|
|
1036
|
+
const S = typeof h < "u", j = S ? h : ke(e.options, v);
|
|
1037
|
+
P = w(v, S, j);
|
|
1038
|
+
} else if (f) {
|
|
1039
1039
|
const S = typeof h < "u", j = S ? h : qt(e.options, v);
|
|
1040
|
-
|
|
1040
|
+
P = w(v, S, j, !0);
|
|
1041
1041
|
} else {
|
|
1042
1042
|
y = [];
|
|
1043
1043
|
const S = typeof e.options.getNextPageParam > "u";
|
|
1044
|
-
|
|
1044
|
+
P = (l && v[0] ? l(v[0], 0, v) : !0) ? w([], S, p[0]) : Promise.resolve(_([], p[0], v[0]));
|
|
1045
1045
|
for (let b = 1; b < v.length; b++)
|
|
1046
|
-
|
|
1046
|
+
P = P.then((M) => {
|
|
1047
1047
|
if (l && v[b] ? l(v[b], b, v) : !0) {
|
|
1048
|
-
const de = S ?
|
|
1049
|
-
return w(
|
|
1048
|
+
const de = S ? p[b] : ke(e.options, M);
|
|
1049
|
+
return w(M, S, de);
|
|
1050
1050
|
}
|
|
1051
|
-
return Promise.resolve(_(
|
|
1051
|
+
return Promise.resolve(_(M, p[b], v[b]));
|
|
1052
1052
|
});
|
|
1053
1053
|
}
|
|
1054
|
-
return
|
|
1054
|
+
return P.then((S) => ({
|
|
1055
1055
|
pages: S,
|
|
1056
1056
|
pageParams: y
|
|
1057
1057
|
}));
|
|
@@ -1059,7 +1059,7 @@ function Qt() {
|
|
|
1059
1059
|
}
|
|
1060
1060
|
};
|
|
1061
1061
|
}
|
|
1062
|
-
function
|
|
1062
|
+
function ke(e, t) {
|
|
1063
1063
|
return e.getNextPageParam == null ? void 0 : e.getNextPageParam(t[t.length - 1], t);
|
|
1064
1064
|
}
|
|
1065
1065
|
function qt(e, t) {
|
|
@@ -1147,7 +1147,7 @@ class Je {
|
|
|
1147
1147
|
const [i, a = {}] = T(t, s, r);
|
|
1148
1148
|
typeof a.revert > "u" && (a.revert = !0);
|
|
1149
1149
|
const o = A.batch(() => this.queryCache.findAll(i).map((l) => l.cancel(a)));
|
|
1150
|
-
return Promise.all(o).then(
|
|
1150
|
+
return Promise.all(o).then(k).catch(k);
|
|
1151
1151
|
}
|
|
1152
1152
|
invalidateQueries(t, s, r) {
|
|
1153
1153
|
const [i, a] = T(t, s, r);
|
|
@@ -1175,8 +1175,8 @@ class Je {
|
|
|
1175
1175
|
}
|
|
1176
1176
|
});
|
|
1177
1177
|
}));
|
|
1178
|
-
let l = Promise.all(o).then(
|
|
1179
|
-
return a != null && a.throwOnError || (l = l.catch(
|
|
1178
|
+
let l = Promise.all(o).then(k);
|
|
1179
|
+
return a != null && a.throwOnError || (l = l.catch(k)), l;
|
|
1180
1180
|
}
|
|
1181
1181
|
fetchQuery(t, s, r) {
|
|
1182
1182
|
const i = J(t, s, r), a = this.defaultQueryOptions(i);
|
|
@@ -1185,14 +1185,14 @@ class Je {
|
|
|
1185
1185
|
return o.isStaleByTime(a.staleTime) ? o.fetch(a) : Promise.resolve(o.state.data);
|
|
1186
1186
|
}
|
|
1187
1187
|
prefetchQuery(t, s, r) {
|
|
1188
|
-
return this.fetchQuery(t, s, r).then(
|
|
1188
|
+
return this.fetchQuery(t, s, r).then(k).catch(k);
|
|
1189
1189
|
}
|
|
1190
1190
|
fetchInfiniteQuery(t, s, r) {
|
|
1191
1191
|
const i = J(t, s, r);
|
|
1192
1192
|
return i.behavior = Qt(), this.fetchQuery(i);
|
|
1193
1193
|
}
|
|
1194
1194
|
prefetchInfiniteQuery(t, s, r) {
|
|
1195
|
-
return this.fetchInfiniteQuery(t, s, r).then(
|
|
1195
|
+
return this.fetchInfiniteQuery(t, s, r).then(k).catch(k);
|
|
1196
1196
|
}
|
|
1197
1197
|
resumePausedMutations() {
|
|
1198
1198
|
return this.mutationCache.resumePausedMutations();
|
|
@@ -1345,7 +1345,7 @@ class Kt extends V {
|
|
|
1345
1345
|
executeFetch(t) {
|
|
1346
1346
|
this.updateQuery();
|
|
1347
1347
|
let s = this.currentQuery.fetch(this.options, t);
|
|
1348
|
-
return t != null && t.throwOnError || (s = s.catch(
|
|
1348
|
+
return t != null && t.throwOnError || (s = s.catch(k)), s;
|
|
1349
1349
|
}
|
|
1350
1350
|
updateStaleTimeout() {
|
|
1351
1351
|
if (this.clearStaleTimeout(), X || this.currentResult.isStale || !fe(this.options.staleTime))
|
|
@@ -1375,32 +1375,32 @@ class Kt extends V {
|
|
|
1375
1375
|
}
|
|
1376
1376
|
createResult(t, s) {
|
|
1377
1377
|
const r = this.currentQuery, i = this.options, a = this.currentResult, o = this.currentResultState, l = this.currentResultOptions, c = t !== r, h = c ? t.state : this.currentQueryInitialState, u = c ? this.currentResult : this.previousQueryResult, {
|
|
1378
|
-
state:
|
|
1378
|
+
state: f
|
|
1379
1379
|
} = t;
|
|
1380
1380
|
let {
|
|
1381
1381
|
dataUpdatedAt: v,
|
|
1382
|
-
error:
|
|
1382
|
+
error: p,
|
|
1383
1383
|
errorUpdatedAt: y,
|
|
1384
1384
|
fetchStatus: x,
|
|
1385
1385
|
status: m
|
|
1386
|
-
} =
|
|
1386
|
+
} = f, g = !1, _ = !1, w;
|
|
1387
1387
|
if (s._optimisticResults) {
|
|
1388
|
-
const b = this.hasListeners(),
|
|
1389
|
-
(
|
|
1388
|
+
const b = this.hasListeners(), M = !b && Le(t, s), Y = b && De(t, r, s, i);
|
|
1389
|
+
(M || Y) && (x = ue(t.options.networkMode) ? "fetching" : "paused", v || (m = "loading")), s._optimisticResults === "isRestoring" && (x = "idle");
|
|
1390
1390
|
}
|
|
1391
|
-
if (s.keepPreviousData && !
|
|
1392
|
-
w = u.data, v = u.dataUpdatedAt, m = u.status,
|
|
1393
|
-
else if (s.select && typeof
|
|
1394
|
-
if (a &&
|
|
1391
|
+
if (s.keepPreviousData && !f.dataUpdatedAt && u != null && u.isSuccess && m !== "error")
|
|
1392
|
+
w = u.data, v = u.dataUpdatedAt, m = u.status, g = !0;
|
|
1393
|
+
else if (s.select && typeof f.data < "u")
|
|
1394
|
+
if (a && f.data === (o == null ? void 0 : o.data) && s.select === this.selectFn)
|
|
1395
1395
|
w = this.selectResult;
|
|
1396
1396
|
else
|
|
1397
1397
|
try {
|
|
1398
|
-
this.selectFn = s.select, w = s.select(
|
|
1398
|
+
this.selectFn = s.select, w = s.select(f.data), w = ve(a == null ? void 0 : a.data, w, s), this.selectResult = w, this.selectError = null;
|
|
1399
1399
|
} catch (b) {
|
|
1400
1400
|
this.selectError = b;
|
|
1401
1401
|
}
|
|
1402
1402
|
else
|
|
1403
|
-
w =
|
|
1403
|
+
w = f.data;
|
|
1404
1404
|
if (typeof s.placeholderData < "u" && typeof w > "u" && m === "loading") {
|
|
1405
1405
|
let b;
|
|
1406
1406
|
if (a != null && a.isPlaceholderData && s.placeholderData === (l == null ? void 0 : l.placeholderData))
|
|
@@ -1408,36 +1408,36 @@ class Kt extends V {
|
|
|
1408
1408
|
else if (b = typeof s.placeholderData == "function" ? s.placeholderData() : s.placeholderData, s.select && typeof b < "u")
|
|
1409
1409
|
try {
|
|
1410
1410
|
b = s.select(b), this.selectError = null;
|
|
1411
|
-
} catch (
|
|
1412
|
-
this.selectError =
|
|
1411
|
+
} catch (M) {
|
|
1412
|
+
this.selectError = M;
|
|
1413
1413
|
}
|
|
1414
1414
|
typeof b < "u" && (m = "success", w = ve(a == null ? void 0 : a.data, b, s), _ = !0);
|
|
1415
1415
|
}
|
|
1416
|
-
this.selectError && (
|
|
1417
|
-
const
|
|
1416
|
+
this.selectError && (p = this.selectError, w = this.selectResult, y = Date.now(), m = "error");
|
|
1417
|
+
const P = x === "fetching", F = m === "loading", S = m === "error";
|
|
1418
1418
|
return {
|
|
1419
1419
|
status: m,
|
|
1420
1420
|
fetchStatus: x,
|
|
1421
|
-
isLoading:
|
|
1421
|
+
isLoading: F,
|
|
1422
1422
|
isSuccess: m === "success",
|
|
1423
1423
|
isError: S,
|
|
1424
|
-
isInitialLoading:
|
|
1424
|
+
isInitialLoading: F && P,
|
|
1425
1425
|
data: w,
|
|
1426
1426
|
dataUpdatedAt: v,
|
|
1427
|
-
error:
|
|
1427
|
+
error: p,
|
|
1428
1428
|
errorUpdatedAt: y,
|
|
1429
|
-
failureCount:
|
|
1430
|
-
failureReason:
|
|
1431
|
-
errorUpdateCount:
|
|
1432
|
-
isFetched:
|
|
1433
|
-
isFetchedAfterMount:
|
|
1434
|
-
isFetching:
|
|
1435
|
-
isRefetching:
|
|
1436
|
-
isLoadingError: S &&
|
|
1429
|
+
failureCount: f.fetchFailureCount,
|
|
1430
|
+
failureReason: f.fetchFailureReason,
|
|
1431
|
+
errorUpdateCount: f.errorUpdateCount,
|
|
1432
|
+
isFetched: f.dataUpdateCount > 0 || f.errorUpdateCount > 0,
|
|
1433
|
+
isFetchedAfterMount: f.dataUpdateCount > h.dataUpdateCount || f.errorUpdateCount > h.errorUpdateCount,
|
|
1434
|
+
isFetching: P,
|
|
1435
|
+
isRefetching: P && !F,
|
|
1436
|
+
isLoadingError: S && f.dataUpdatedAt === 0,
|
|
1437
1437
|
isPaused: x === "paused",
|
|
1438
1438
|
isPlaceholderData: _,
|
|
1439
|
-
isPreviousData:
|
|
1440
|
-
isRefetchError: S &&
|
|
1439
|
+
isPreviousData: g,
|
|
1440
|
+
isRefetchError: S && f.dataUpdatedAt !== 0,
|
|
1441
1441
|
isStale: _e(t, s),
|
|
1442
1442
|
refetch: this.refetch,
|
|
1443
1443
|
remove: this.remove
|
|
@@ -1764,19 +1764,19 @@ function at(e) {
|
|
|
1764
1764
|
e[t] && (r && (r += " "), r += t);
|
|
1765
1765
|
return r;
|
|
1766
1766
|
}
|
|
1767
|
-
function
|
|
1767
|
+
function R() {
|
|
1768
1768
|
for (var e, t, s = 0, r = ""; s < arguments.length; )
|
|
1769
1769
|
(e = arguments[s++]) && (t = at(e)) && (r && (r += " "), r += t);
|
|
1770
1770
|
return r;
|
|
1771
1771
|
}
|
|
1772
|
-
var ms = Object.defineProperty, ys = Object.defineProperties,
|
|
1772
|
+
var ms = Object.defineProperty, ys = Object.defineProperties, gs = Object.getOwnPropertyDescriptors, ae = Object.getOwnPropertySymbols, ot = Object.prototype.hasOwnProperty, lt = Object.prototype.propertyIsEnumerable, Ue = (e, t, s) => t in e ? ms(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, C = (e, t) => {
|
|
1773
1773
|
for (var s in t || (t = {}))
|
|
1774
1774
|
ot.call(t, s) && Ue(e, s, t[s]);
|
|
1775
1775
|
if (ae)
|
|
1776
1776
|
for (var s of ae(t))
|
|
1777
1777
|
lt.call(t, s) && Ue(e, s, t[s]);
|
|
1778
1778
|
return e;
|
|
1779
|
-
}, E = (e, t) => ys(e,
|
|
1779
|
+
}, E = (e, t) => ys(e, gs(t)), O = (e, t) => {
|
|
1780
1780
|
var s = {};
|
|
1781
1781
|
for (var r in e)
|
|
1782
1782
|
ot.call(e, r) && t.indexOf(r) < 0 && (s[r] = e[r]);
|
|
@@ -1795,12 +1795,12 @@ function oe() {
|
|
|
1795
1795
|
return e;
|
|
1796
1796
|
}, oe.apply(this, arguments);
|
|
1797
1797
|
}
|
|
1798
|
-
function
|
|
1798
|
+
function Cs(e, t) {
|
|
1799
1799
|
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
1800
1800
|
}
|
|
1801
1801
|
function xs(...e) {
|
|
1802
1802
|
return (t) => e.forEach(
|
|
1803
|
-
(s) =>
|
|
1803
|
+
(s) => Cs(s, t)
|
|
1804
1804
|
);
|
|
1805
1805
|
}
|
|
1806
1806
|
var bs = /* @__PURE__ */ d.forwardRef((e, t) => {
|
|
@@ -1818,7 +1818,7 @@ var bs = /* @__PURE__ */ d.forwardRef((e, t) => {
|
|
|
1818
1818
|
bs.displayName = "Slot";
|
|
1819
1819
|
var ye = /* @__PURE__ */ d.forwardRef((e, t) => {
|
|
1820
1820
|
const s = e, { children: r } = s, i = O(s, ["children"]);
|
|
1821
|
-
return /* @__PURE__ */ d.isValidElement(r) ? /* @__PURE__ */ d.cloneElement(r, E(
|
|
1821
|
+
return /* @__PURE__ */ d.isValidElement(r) ? /* @__PURE__ */ d.cloneElement(r, E(C({}, _s(i, r.props)), {
|
|
1822
1822
|
ref: t ? xs(t, r.ref) : r.ref
|
|
1823
1823
|
})) : d.Children.count(r) > 1 ? d.Children.only(null) : null;
|
|
1824
1824
|
});
|
|
@@ -1828,17 +1828,17 @@ function js(e) {
|
|
|
1828
1828
|
return /* @__PURE__ */ d.isValidElement(e) && e.type === ws;
|
|
1829
1829
|
}
|
|
1830
1830
|
function _s(e, t) {
|
|
1831
|
-
const s =
|
|
1831
|
+
const s = C({}, t);
|
|
1832
1832
|
for (const r in t) {
|
|
1833
1833
|
const i = e[r], a = t[r];
|
|
1834
1834
|
/^on[A-Z]/.test(r) ? i && a ? s[r] = (...l) => {
|
|
1835
1835
|
a(...l), i(...l);
|
|
1836
|
-
} : i && (s[r] = i) : r === "style" ? s[r] =
|
|
1836
|
+
} : i && (s[r] = i) : r === "style" ? s[r] = C(C({}, i), a) : r === "className" && (s[r] = [
|
|
1837
1837
|
i,
|
|
1838
1838
|
a
|
|
1839
1839
|
].filter(Boolean).join(" "));
|
|
1840
1840
|
}
|
|
1841
|
-
return
|
|
1841
|
+
return C(C({}, e), s);
|
|
1842
1842
|
}
|
|
1843
1843
|
var Ss = ({ firstName: e, lastName: t, variant: s = "small" }) => {
|
|
1844
1844
|
const r = `${e.charAt(0)}${t.charAt(0)}`;
|
|
@@ -1870,17 +1870,17 @@ var Ss = ({ firstName: e, lastName: t, variant: s = "small" }) => {
|
|
|
1870
1870
|
"className",
|
|
1871
1871
|
"children"
|
|
1872
1872
|
]);
|
|
1873
|
-
const
|
|
1873
|
+
const f = !!r || !!i;
|
|
1874
1874
|
return /* @__PURE__ */ n.jsxs(
|
|
1875
1875
|
"button",
|
|
1876
|
-
E(
|
|
1876
|
+
E(C({
|
|
1877
1877
|
ref: t
|
|
1878
1878
|
}, u), {
|
|
1879
|
-
className:
|
|
1879
|
+
className: R(
|
|
1880
1880
|
"button",
|
|
1881
1881
|
l && `button--${l}`,
|
|
1882
1882
|
l && o && `button--${l}--filled`,
|
|
1883
|
-
|
|
1883
|
+
f && "button--with-icon",
|
|
1884
1884
|
a && "button--pending",
|
|
1885
1885
|
c
|
|
1886
1886
|
),
|
|
@@ -1902,9 +1902,9 @@ var Es = d.forwardRef(
|
|
|
1902
1902
|
r && /* @__PURE__ */ n.jsx("span", { className: "input__prefix", children: r }),
|
|
1903
1903
|
/* @__PURE__ */ n.jsx(
|
|
1904
1904
|
"input",
|
|
1905
|
-
|
|
1905
|
+
C({
|
|
1906
1906
|
ref: t,
|
|
1907
|
-
className:
|
|
1907
|
+
className: R(
|
|
1908
1908
|
"input",
|
|
1909
1909
|
r && "input--with-prefix",
|
|
1910
1910
|
i && "input--with-suffix",
|
|
@@ -1920,10 +1920,10 @@ Es.displayName = "TextField";
|
|
|
1920
1920
|
d.createContext(void 0);
|
|
1921
1921
|
var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__header__action", children: e }), Rs = (e) => {
|
|
1922
1922
|
var t = e, { children: s } = t, r = O(t, ["children"]);
|
|
1923
|
-
return /* @__PURE__ */ n.jsx("div", E(
|
|
1923
|
+
return /* @__PURE__ */ n.jsx("div", E(C({ className: "card__body" }, r), { children: s }));
|
|
1924
1924
|
}, As = (e) => /* @__PURE__ */ n.jsx(
|
|
1925
1925
|
"svg",
|
|
1926
|
-
E(
|
|
1926
|
+
E(C({
|
|
1927
1927
|
width: "24",
|
|
1928
1928
|
height: "24",
|
|
1929
1929
|
viewBox: "0 0 24 24",
|
|
@@ -1943,7 +1943,7 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
1943
1943
|
})
|
|
1944
1944
|
), Se = As, Os = (e) => /* @__PURE__ */ n.jsx(
|
|
1945
1945
|
"svg",
|
|
1946
|
-
E(
|
|
1946
|
+
E(C({
|
|
1947
1947
|
width: "24",
|
|
1948
1948
|
height: "24",
|
|
1949
1949
|
viewBox: "0 0 24 24",
|
|
@@ -1961,9 +1961,9 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
1961
1961
|
}
|
|
1962
1962
|
)
|
|
1963
1963
|
})
|
|
1964
|
-
),
|
|
1964
|
+
), Fs = Os, Ns = (e) => /* @__PURE__ */ n.jsx(
|
|
1965
1965
|
"svg",
|
|
1966
|
-
E(
|
|
1966
|
+
E(C({
|
|
1967
1967
|
width: "24",
|
|
1968
1968
|
height: "24",
|
|
1969
1969
|
viewBox: "0 0 24 24",
|
|
@@ -1980,9 +1980,9 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
1980
1980
|
}
|
|
1981
1981
|
)
|
|
1982
1982
|
})
|
|
1983
|
-
),
|
|
1983
|
+
), Ms = Ns, ks = (e) => /* @__PURE__ */ n.jsx(
|
|
1984
1984
|
"svg",
|
|
1985
|
-
E(
|
|
1985
|
+
E(C({
|
|
1986
1986
|
width: "24",
|
|
1987
1987
|
height: "24",
|
|
1988
1988
|
viewBox: "0 0 24 24",
|
|
@@ -1999,9 +1999,9 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
1999
1999
|
}
|
|
2000
2000
|
)
|
|
2001
2001
|
})
|
|
2002
|
-
), Ls =
|
|
2002
|
+
), Ls = ks, Ds = (e) => /* @__PURE__ */ n.jsx(
|
|
2003
2003
|
"svg",
|
|
2004
|
-
E(
|
|
2004
|
+
E(C({
|
|
2005
2005
|
width: "24",
|
|
2006
2006
|
height: "24",
|
|
2007
2007
|
viewBox: "0 0 24 24",
|
|
@@ -2020,7 +2020,7 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2020
2020
|
})
|
|
2021
2021
|
), Ts = Ds, Us = (e) => /* @__PURE__ */ n.jsxs(
|
|
2022
2022
|
"svg",
|
|
2023
|
-
E(
|
|
2023
|
+
E(C({
|
|
2024
2024
|
width: "24",
|
|
2025
2025
|
height: "24",
|
|
2026
2026
|
fill: "none",
|
|
@@ -2057,7 +2057,7 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2057
2057
|
})
|
|
2058
2058
|
), Qs = Us, qs = (e) => /* @__PURE__ */ n.jsxs(
|
|
2059
2059
|
"svg",
|
|
2060
|
-
E(
|
|
2060
|
+
E(C({
|
|
2061
2061
|
width: "24",
|
|
2062
2062
|
height: "24",
|
|
2063
2063
|
viewBox: "0 0 24 24",
|
|
@@ -2089,7 +2089,7 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2089
2089
|
})
|
|
2090
2090
|
), Ks = qs, Hs = (e) => /* @__PURE__ */ n.jsxs(
|
|
2091
2091
|
"svg",
|
|
2092
|
-
E(
|
|
2092
|
+
E(C({
|
|
2093
2093
|
width: "24",
|
|
2094
2094
|
height: "24",
|
|
2095
2095
|
viewBox: "0 0 24 24",
|
|
@@ -2141,7 +2141,7 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2141
2141
|
})
|
|
2142
2142
|
), Gs = Hs, Vs = (e) => /* @__PURE__ */ n.jsxs(
|
|
2143
2143
|
"svg",
|
|
2144
|
-
E(
|
|
2144
|
+
E(C({
|
|
2145
2145
|
width: "20",
|
|
2146
2146
|
height: "21",
|
|
2147
2147
|
fill: "none",
|
|
@@ -2165,7 +2165,7 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2165
2165
|
})
|
|
2166
2166
|
), $s = Vs, Ws = (e) => /* @__PURE__ */ n.jsxs(
|
|
2167
2167
|
"svg",
|
|
2168
|
-
E(
|
|
2168
|
+
E(C({
|
|
2169
2169
|
width: "24",
|
|
2170
2170
|
height: "24",
|
|
2171
2171
|
fill: "none",
|
|
@@ -2201,7 +2201,7 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2201
2201
|
const t = (s) => `${s}${e.suffix ? `_${e.suffix}` : ""}`;
|
|
2202
2202
|
return /* @__PURE__ */ n.jsxs(
|
|
2203
2203
|
"svg",
|
|
2204
|
-
E(
|
|
2204
|
+
E(C({
|
|
2205
2205
|
width: "24",
|
|
2206
2206
|
height: "24",
|
|
2207
2207
|
viewBox: "0 0 24 24",
|
|
@@ -2370,7 +2370,7 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2370
2370
|
);
|
|
2371
2371
|
}, Ee = zs, Ys = (e) => /* @__PURE__ */ n.jsx(
|
|
2372
2372
|
"svg",
|
|
2373
|
-
E(
|
|
2373
|
+
E(C({
|
|
2374
2374
|
fill: "none",
|
|
2375
2375
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2376
2376
|
viewBox: "0 0 21 16",
|
|
@@ -2390,7 +2390,7 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2390
2390
|
})
|
|
2391
2391
|
), Js = Ys, Xs = (e) => /* @__PURE__ */ n.jsxs(
|
|
2392
2392
|
"svg",
|
|
2393
|
-
E(
|
|
2393
|
+
E(C({
|
|
2394
2394
|
width: "24",
|
|
2395
2395
|
height: "24",
|
|
2396
2396
|
fill: "none",
|
|
@@ -2433,8 +2433,8 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2433
2433
|
]);
|
|
2434
2434
|
return /* @__PURE__ */ n.jsx(
|
|
2435
2435
|
"div",
|
|
2436
|
-
E(
|
|
2437
|
-
className:
|
|
2436
|
+
E(C({}, c), {
|
|
2437
|
+
className: R(
|
|
2438
2438
|
"card__empty-state",
|
|
2439
2439
|
s === "error" && "card__empty-state--error",
|
|
2440
2440
|
i && "card__empty-state--standalone",
|
|
@@ -2463,8 +2463,8 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2463
2463
|
]);
|
|
2464
2464
|
return /* @__PURE__ */ n.jsx(
|
|
2465
2465
|
"div",
|
|
2466
|
-
E(
|
|
2467
|
-
className:
|
|
2466
|
+
E(C({}, o), {
|
|
2467
|
+
className: R(
|
|
2468
2468
|
"card__header",
|
|
2469
2469
|
s && `card__header--${s}`,
|
|
2470
2470
|
r && "card__header--sticky",
|
|
@@ -2473,7 +2473,7 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2473
2473
|
children: a
|
|
2474
2474
|
})
|
|
2475
2475
|
);
|
|
2476
|
-
}, sr = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__image", children: e }), rr = ({ children: e, className: t }) => /* @__PURE__ */ n.jsx("div", { className:
|
|
2476
|
+
}, sr = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__image", children: e }), rr = ({ children: e, className: t }) => /* @__PURE__ */ n.jsx("div", { className: R("card__body__item", t), children: e }), nr = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__body__subtitle", children: e }), ir = ({ icon: e, children: t }) => /* @__PURE__ */ n.jsxs("div", { className: "card__header__title", children: [
|
|
2477
2477
|
e && /* @__PURE__ */ n.jsx("span", { className: "card__header__title__icon", children: e }),
|
|
2478
2478
|
t
|
|
2479
2479
|
] }), ct = d.forwardRef(
|
|
@@ -2481,8 +2481,8 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2481
2481
|
var s = e, { type: r, children: i, className: a, variant: o = "default", disabled: l = !1 } = s, c = O(s, ["type", "children", "className", "variant", "disabled"]);
|
|
2482
2482
|
return d.createElement(
|
|
2483
2483
|
r,
|
|
2484
|
-
|
|
2485
|
-
className:
|
|
2484
|
+
C({
|
|
2485
|
+
className: R(
|
|
2486
2486
|
"card",
|
|
2487
2487
|
l && "card--disabled",
|
|
2488
2488
|
o && `card--${o}`,
|
|
@@ -2508,22 +2508,19 @@ Object.assign(ct, {
|
|
|
2508
2508
|
});
|
|
2509
2509
|
var ar = (e) => {
|
|
2510
2510
|
var t = e, { className: s, children: r } = t, i = O(t, ["className", "children"]);
|
|
2511
|
-
return /* @__PURE__ */ n.jsx("div", E(
|
|
2511
|
+
return /* @__PURE__ */ n.jsx("div", E(C({ className: R("checkbox__content", s) }, i), { children: r }));
|
|
2512
2512
|
}, or = (e) => {
|
|
2513
2513
|
var t = e, { className: s, children: r } = t, i = O(t, ["className", "children"]);
|
|
2514
|
-
return /* @__PURE__ */ n.jsx("span", E(
|
|
2515
|
-
}, lr = (e) => {
|
|
2516
|
-
var t = e, { className: s, children: r } = t, i = O(t, ["className", "children"]);
|
|
2517
|
-
return /* @__PURE__ */ n.jsx("span", E(g({ className: P("checkbox__hint", s) }, i), { children: r }));
|
|
2518
|
-
}, ut = d.createContext(void 0), cr = ({ id: e, name: t, children: s }) => /* @__PURE__ */ n.jsx(ut.Provider, { value: { id: e, name: t }, children: s }), ur = () => {
|
|
2514
|
+
return /* @__PURE__ */ n.jsx("span", E(C({ className: R("checkbox__hint", s) }, i), { children: r }));
|
|
2515
|
+
}, ut = d.createContext(void 0), lr = ({ id: e, name: t, children: s }) => /* @__PURE__ */ n.jsx(ut.Provider, { value: { id: e, name: t }, children: s }), cr = () => {
|
|
2519
2516
|
const e = d.useContext(ut);
|
|
2520
2517
|
if (!e)
|
|
2521
2518
|
throw new Error("Checkbox compound components can not be rendered outside of Checkbox");
|
|
2522
2519
|
return e;
|
|
2523
|
-
},
|
|
2520
|
+
}, ur = (e) => {
|
|
2524
2521
|
var t = e, { className: s, children: r } = t, i = O(t, ["className", "children"]);
|
|
2525
|
-
const { id: a } =
|
|
2526
|
-
return /* @__PURE__ */ n.jsx("label", E(
|
|
2522
|
+
const { id: a } = cr();
|
|
2523
|
+
return /* @__PURE__ */ n.jsx("label", E(C({ htmlFor: a, className: R("checkbox__label", s) }, i), { children: r }));
|
|
2527
2524
|
}, Q = (e) => {
|
|
2528
2525
|
var t = e, {
|
|
2529
2526
|
id: s,
|
|
@@ -2531,61 +2528,64 @@ var ar = (e) => {
|
|
|
2531
2528
|
isPending: i = !1,
|
|
2532
2529
|
variant: a = "neutral",
|
|
2533
2530
|
hasError: o = !1,
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2531
|
+
single: l,
|
|
2532
|
+
className: c,
|
|
2533
|
+
children: h
|
|
2534
|
+
} = t, u = O(t, [
|
|
2537
2535
|
"id",
|
|
2538
2536
|
"name",
|
|
2539
2537
|
"isPending",
|
|
2540
2538
|
"variant",
|
|
2541
2539
|
"hasError",
|
|
2540
|
+
"single",
|
|
2542
2541
|
"className",
|
|
2543
2542
|
"children"
|
|
2544
2543
|
]);
|
|
2545
|
-
const
|
|
2544
|
+
const f = d.useRef(null);
|
|
2546
2545
|
return d.useEffect(() => {
|
|
2547
|
-
|
|
2546
|
+
f.current && (i ? f.current.indeterminate = !0 : f.current.indeterminate = !1);
|
|
2548
2547
|
}, [i]), /* @__PURE__ */ n.jsxs(
|
|
2549
2548
|
"div",
|
|
2550
2549
|
{
|
|
2551
|
-
className:
|
|
2550
|
+
className: R("checkbox", a && `checkbox--${a}`, o && "checkbox--error"),
|
|
2552
2551
|
children: [
|
|
2553
2552
|
/* @__PURE__ */ n.jsx(
|
|
2554
2553
|
"input",
|
|
2555
|
-
|
|
2554
|
+
C({
|
|
2556
2555
|
id: s,
|
|
2557
2556
|
name: r,
|
|
2558
2557
|
type: "checkbox",
|
|
2559
|
-
ref:
|
|
2560
|
-
className:
|
|
2561
|
-
|
|
2558
|
+
ref: f,
|
|
2559
|
+
className: R("checkbox__input", c),
|
|
2560
|
+
value: l ? "true" : ""
|
|
2561
|
+
}, u)
|
|
2562
2562
|
),
|
|
2563
|
-
i ? /* @__PURE__ */ n.jsx($s, { className: "checkbox__spinner", "aria-hidden": !0 }) : /* @__PURE__ */ n.jsx(
|
|
2564
|
-
/* @__PURE__ */ n.jsx(
|
|
2563
|
+
i ? /* @__PURE__ */ n.jsx($s, { className: "checkbox__spinner", "aria-hidden": !0 }) : /* @__PURE__ */ n.jsx(Fs, { className: "checkbox__check", "aria-hidden": !0, strokeDasharray: "75" }),
|
|
2564
|
+
/* @__PURE__ */ n.jsx(lr, { id: s, name: r, children: h })
|
|
2565
2565
|
]
|
|
2566
2566
|
}
|
|
2567
2567
|
);
|
|
2568
2568
|
};
|
|
2569
2569
|
Q.Content = ar;
|
|
2570
|
-
Q.Label =
|
|
2571
|
-
Q.Hint =
|
|
2572
|
-
Q.Error =
|
|
2573
|
-
var
|
|
2570
|
+
Q.Label = ur;
|
|
2571
|
+
Q.Hint = or;
|
|
2572
|
+
Q.Error = Error;
|
|
2573
|
+
var dr = (e) => {
|
|
2574
2574
|
var t = e, { type: s = "div", className: r, children: i } = t, a = O(t, ["type", "className", "children"]);
|
|
2575
|
-
return d.createElement(s,
|
|
2576
|
-
},
|
|
2575
|
+
return d.createElement(s, C({ className: R("dialog__body", r) }, a), i);
|
|
2576
|
+
}, ge = () => document.body.style.removeProperty("overflow"), Qe = (e) => e.preventDefault(), hr = '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])', fr = (e) => {
|
|
2577
2577
|
var t = e, { className: s, children: r, shouldAnimate: i = !0 } = t, a = O(t, ["className", "children", "shouldAnimate"]);
|
|
2578
2578
|
const { ref: o, defaultOpen: l, isModal: c, onClose: h } = B();
|
|
2579
2579
|
return d.useEffect(() => {
|
|
2580
2580
|
const u = o == null ? void 0 : o.current;
|
|
2581
2581
|
if (u != null && u.open) {
|
|
2582
|
-
const
|
|
2582
|
+
const f = u.querySelectorAll(hr), v = f[0], p = f[f.length - 1], y = (x) => {
|
|
2583
2583
|
if (!(x.key === "Tab"))
|
|
2584
2584
|
return;
|
|
2585
|
-
x.shiftKey ? document.activeElement === v && (
|
|
2585
|
+
x.shiftKey ? document.activeElement === v && (p.focus(), x.preventDefault()) : document.activeElement === p && (v.focus(), x.preventDefault());
|
|
2586
2586
|
};
|
|
2587
|
-
return document.body.style.overflow = "hidden", u.addEventListener("keydown", y), window.addEventListener("popstate", () =>
|
|
2588
|
-
u.removeEventListener("keydown", y), window.removeEventListener("popstate", () =>
|
|
2587
|
+
return document.body.style.overflow = "hidden", u.addEventListener("keydown", y), window.addEventListener("popstate", () => ge()), () => {
|
|
2588
|
+
u.removeEventListener("keydown", y), window.removeEventListener("popstate", () => ge());
|
|
2589
2589
|
};
|
|
2590
2590
|
}
|
|
2591
2591
|
}, [o]), d.useEffect(() => {
|
|
@@ -2594,29 +2594,29 @@ var hr = (e) => {
|
|
|
2594
2594
|
return;
|
|
2595
2595
|
if (l && (u.removeAttribute("open"), u.showModal(), u.focus()), c)
|
|
2596
2596
|
return u.addEventListener("cancel", Qe), () => u.removeEventListener("cancel", Qe);
|
|
2597
|
-
const
|
|
2598
|
-
const { top: y, right: x, bottom: m, left:
|
|
2599
|
-
_ && !(w &&
|
|
2597
|
+
const f = ({ clientX: v, clientY: p }) => {
|
|
2598
|
+
const { top: y, right: x, bottom: m, left: g } = u.getBoundingClientRect(), _ = 0 < p && 0 < v, w = y < p && p < m, P = g < v && v < x;
|
|
2599
|
+
_ && !(w && P) && h();
|
|
2600
2600
|
};
|
|
2601
|
-
return u.addEventListener("cancel", h), u.addEventListener("mousedown",
|
|
2602
|
-
u.removeEventListener("cancel", h), u.removeEventListener("mousedown",
|
|
2601
|
+
return u.addEventListener("cancel", h), u.addEventListener("mousedown", f), () => {
|
|
2602
|
+
u.removeEventListener("cancel", h), u.removeEventListener("mousedown", f);
|
|
2603
2603
|
};
|
|
2604
2604
|
}, [o, c, h, l]), /* @__PURE__ */ n.jsx(
|
|
2605
2605
|
"dialog",
|
|
2606
|
-
E(
|
|
2606
|
+
E(C({
|
|
2607
2607
|
ref: o,
|
|
2608
2608
|
open: l,
|
|
2609
2609
|
"aria-modal": !!c,
|
|
2610
2610
|
"aria-labelledby": "dialogTitle",
|
|
2611
|
-
className:
|
|
2611
|
+
className: R("dialog", i && "dialog--animated", s)
|
|
2612
2612
|
}, a), {
|
|
2613
2613
|
children: r
|
|
2614
2614
|
})
|
|
2615
2615
|
);
|
|
2616
|
-
}, dt = d.createContext(void 0),
|
|
2616
|
+
}, dt = d.createContext(void 0), pr = ({ defaultOpen: e, onClose: t, isModal: s, children: r }) => {
|
|
2617
2617
|
const i = d.useRef(null), a = d.useRef(t), o = d.useCallback(() => {
|
|
2618
2618
|
var l;
|
|
2619
|
-
|
|
2619
|
+
ge(), (l = i.current) == null || l.close(), a.current && (a == null || a.current());
|
|
2620
2620
|
}, [i]);
|
|
2621
2621
|
return /* @__PURE__ */ n.jsx(dt.Provider, { value: { ref: i, defaultOpen: e, isModal: s, onClose: o }, children: r });
|
|
2622
2622
|
}, B = () => {
|
|
@@ -2624,42 +2624,42 @@ var hr = (e) => {
|
|
|
2624
2624
|
if (!e)
|
|
2625
2625
|
throw new Error("Dialog compound components can not be rendered outside of Dialog");
|
|
2626
2626
|
return e;
|
|
2627
|
-
},
|
|
2627
|
+
}, vr = (e) => {
|
|
2628
2628
|
var t = e, { children: s } = t, r = O(t, ["children"]);
|
|
2629
2629
|
const { onClose: i } = B();
|
|
2630
|
-
return /* @__PURE__ */ n.jsx($, E(
|
|
2630
|
+
return /* @__PURE__ */ n.jsx($, E(C({ onClick: i }, r), { children: s }));
|
|
2631
2631
|
}, ht = d.forwardRef((e, t) => {
|
|
2632
2632
|
var s = e, { className: r } = s, i = O(s, ["className"]);
|
|
2633
2633
|
const { onClose: a } = B();
|
|
2634
2634
|
return /* @__PURE__ */ n.jsx(
|
|
2635
2635
|
$,
|
|
2636
|
-
|
|
2636
|
+
C({
|
|
2637
2637
|
type: "submit",
|
|
2638
2638
|
ref: t,
|
|
2639
2639
|
formMethod: "dialog",
|
|
2640
2640
|
onClick: a,
|
|
2641
|
-
iconLeft: /* @__PURE__ */ n.jsx(
|
|
2641
|
+
iconLeft: /* @__PURE__ */ n.jsx(Ms, {}),
|
|
2642
2642
|
variant: "icon--secondary",
|
|
2643
|
-
className:
|
|
2643
|
+
className: R("dialog__close button--icon", r)
|
|
2644
2644
|
}, i)
|
|
2645
2645
|
);
|
|
2646
2646
|
});
|
|
2647
2647
|
ht.displayName = "Close";
|
|
2648
|
-
var
|
|
2648
|
+
var mr = (e) => {
|
|
2649
2649
|
var t = e, { className: s, children: r } = t, i = O(t, ["className", "children"]);
|
|
2650
|
-
return /* @__PURE__ */ n.jsx("div", E(
|
|
2651
|
-
},
|
|
2650
|
+
return /* @__PURE__ */ n.jsx("div", E(C({ className: R("dialog__footer", s) }, i), { children: r }));
|
|
2651
|
+
}, yr = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "dialog__header", children: e }), gr = (e) => {
|
|
2652
2652
|
var t = e, { icon: s, children: r, className: i } = t, a = O(t, ["icon", "children", "className"]);
|
|
2653
2653
|
const { ref: o } = B(), l = d.useRef(null);
|
|
2654
2654
|
return d.useEffect(() => {
|
|
2655
2655
|
o != null && o.current && o.current.focus();
|
|
2656
2656
|
}, [o]), /* @__PURE__ */ n.jsxs(
|
|
2657
2657
|
"div",
|
|
2658
|
-
E(
|
|
2658
|
+
E(C({
|
|
2659
2659
|
tabIndex: 0,
|
|
2660
2660
|
ref: l,
|
|
2661
2661
|
id: "dialogTitle",
|
|
2662
|
-
className:
|
|
2662
|
+
className: R("dialog__header__title", i)
|
|
2663
2663
|
}, a), {
|
|
2664
2664
|
children: [
|
|
2665
2665
|
s && /* @__PURE__ */ n.jsx("span", { className: "dialog__header__icon", children: s }),
|
|
@@ -2667,23 +2667,23 @@ var yr = (e) => {
|
|
|
2667
2667
|
]
|
|
2668
2668
|
})
|
|
2669
2669
|
);
|
|
2670
|
-
},
|
|
2670
|
+
}, Cr = (e) => {
|
|
2671
2671
|
var t = e, { children: s } = t, r = O(t, ["children"]);
|
|
2672
2672
|
const { ref: i } = B();
|
|
2673
|
-
return /* @__PURE__ */ n.jsx($, E(
|
|
2673
|
+
return /* @__PURE__ */ n.jsx($, E(C({ onClick: () => {
|
|
2674
2674
|
var a;
|
|
2675
2675
|
return (a = i == null ? void 0 : i.current) == null ? void 0 : a.showModal();
|
|
2676
2676
|
} }, r), { children: s }));
|
|
2677
|
-
},
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
var ft = d.createContext(void 0),
|
|
2677
|
+
}, N = ({ defaultOpen: e, isModal: t, children: s, onClose: r }) => /* @__PURE__ */ n.jsx(pr, { defaultOpen: !!e, isModal: t, onClose: r, children: s });
|
|
2678
|
+
N.Trigger = Cr;
|
|
2679
|
+
N.Root = fr;
|
|
2680
|
+
N.Title = gr;
|
|
2681
|
+
N.Header = yr;
|
|
2682
|
+
N.Body = dr;
|
|
2683
|
+
N.Footer = mr;
|
|
2684
|
+
N.Button = vr;
|
|
2685
|
+
N.Close = ht;
|
|
2686
|
+
var ft = d.createContext(void 0), xr = ({
|
|
2687
2687
|
id: e,
|
|
2688
2688
|
position: t,
|
|
2689
2689
|
isOpen: s,
|
|
@@ -2715,7 +2715,7 @@ var ft = d.createContext(void 0), br = ({
|
|
|
2715
2715
|
if (e === void 0)
|
|
2716
2716
|
throw new Error("useMenu must be used within a MenuProvider");
|
|
2717
2717
|
return e;
|
|
2718
|
-
},
|
|
2718
|
+
}, br = ({ as: e, children: t }) => {
|
|
2719
2719
|
const {
|
|
2720
2720
|
id: s,
|
|
2721
2721
|
position: r,
|
|
@@ -2726,12 +2726,12 @@ var ft = d.createContext(void 0), br = ({
|
|
|
2726
2726
|
clearActiveItemIndex: c,
|
|
2727
2727
|
triggerRef: h,
|
|
2728
2728
|
contentRef: u
|
|
2729
|
-
} = pt(),
|
|
2730
|
-
var
|
|
2729
|
+
} = pt(), f = (v) => {
|
|
2730
|
+
var p;
|
|
2731
2731
|
if (!i)
|
|
2732
2732
|
return;
|
|
2733
2733
|
if (v.key === "Escape")
|
|
2734
|
-
return c(), a(!1), (
|
|
2734
|
+
return c(), a(!1), (p = h.current) == null ? void 0 : p.focus();
|
|
2735
2735
|
const y = u.current.childElementCount - 1;
|
|
2736
2736
|
switch (v.key) {
|
|
2737
2737
|
case "ArrowUp":
|
|
@@ -2753,8 +2753,8 @@ var ft = d.createContext(void 0), br = ({
|
|
|
2753
2753
|
{
|
|
2754
2754
|
id: `${s}-content`,
|
|
2755
2755
|
ref: u,
|
|
2756
|
-
className:
|
|
2757
|
-
onKeyDown:
|
|
2756
|
+
className: R("menu__list", `menu__list--${r}`, i && "menu__list--active"),
|
|
2757
|
+
onKeyDown: f
|
|
2758
2758
|
},
|
|
2759
2759
|
t
|
|
2760
2760
|
) : (
|
|
@@ -2764,15 +2764,15 @@ var ft = d.createContext(void 0), br = ({
|
|
|
2764
2764
|
{
|
|
2765
2765
|
id: `${s}-content`,
|
|
2766
2766
|
ref: u,
|
|
2767
|
-
className:
|
|
2768
|
-
onKeyDown:
|
|
2767
|
+
className: R("menu__list", `menu__list--${r}`, i && "menu__list--active"),
|
|
2768
|
+
onKeyDown: f,
|
|
2769
2769
|
children: t
|
|
2770
2770
|
}
|
|
2771
2771
|
)
|
|
2772
2772
|
);
|
|
2773
|
-
},
|
|
2773
|
+
}, wr = (e) => {
|
|
2774
2774
|
var t = e, { children: s, className: r } = t, i = O(t, ["children", "className"]);
|
|
2775
|
-
return /* @__PURE__ */ n.jsx("li", E(
|
|
2775
|
+
return /* @__PURE__ */ n.jsx("li", E(C({}, i), { className: R("menu__list-item", r), children: s }));
|
|
2776
2776
|
}, vt = ({ children: e, className: t }) => {
|
|
2777
2777
|
const { id: s, isOpen: r, setIsOpen: i, clearActiveItemIndex: a, setActiveItemIndex: o, triggerRef: l } = pt(), c = () => {
|
|
2778
2778
|
a(), i((u) => !u);
|
|
@@ -2786,7 +2786,7 @@ var ft = d.createContext(void 0), br = ({
|
|
|
2786
2786
|
return d.cloneElement(e, {
|
|
2787
2787
|
id: `${s}-trigger`,
|
|
2788
2788
|
ref: l,
|
|
2789
|
-
className:
|
|
2789
|
+
className: R("menu__trigger", t),
|
|
2790
2790
|
onClick: c,
|
|
2791
2791
|
onKeyDown: h,
|
|
2792
2792
|
"aria-expanded": r,
|
|
@@ -2796,29 +2796,29 @@ var ft = d.createContext(void 0), br = ({
|
|
|
2796
2796
|
vt.displayName = "Trigger";
|
|
2797
2797
|
var L = (e) => {
|
|
2798
2798
|
var t = e, { type: s, id: r, position: i = "right", children: a, className: o } = t, l = O(t, ["type", "id", "position", "children", "className"]);
|
|
2799
|
-
const c = d.useRef(null), h = d.useRef(null), u = d.useRef(null), [
|
|
2800
|
-
|
|
2801
|
-
const
|
|
2799
|
+
const c = d.useRef(null), h = d.useRef(null), u = d.useRef(null), [f, v] = d.useState(!1), [p, y] = d.useState(), [x, m] = d.useState(p);
|
|
2800
|
+
p !== x && p !== void 0 && (u.current.children[p].firstChild.focus(), m(p));
|
|
2801
|
+
const g = () => {
|
|
2802
2802
|
y(void 0), m(void 0);
|
|
2803
2803
|
}, _ = (w) => {
|
|
2804
|
-
var
|
|
2805
|
-
((
|
|
2804
|
+
var P;
|
|
2805
|
+
((P = c.current) == null ? void 0 : P.contains(w.relatedTarget)) || (g(), v(!1));
|
|
2806
2806
|
};
|
|
2807
2807
|
return /* @__PURE__ */ n.jsx(
|
|
2808
|
-
|
|
2808
|
+
xr,
|
|
2809
2809
|
{
|
|
2810
2810
|
id: r,
|
|
2811
2811
|
position: i,
|
|
2812
|
-
isOpen:
|
|
2812
|
+
isOpen: f,
|
|
2813
2813
|
setIsOpen: v,
|
|
2814
|
-
activeItemIndex:
|
|
2814
|
+
activeItemIndex: p,
|
|
2815
2815
|
setActiveItemIndex: y,
|
|
2816
|
-
clearActiveItemIndex:
|
|
2816
|
+
clearActiveItemIndex: g,
|
|
2817
2817
|
triggerRef: h,
|
|
2818
2818
|
contentRef: u,
|
|
2819
2819
|
children: d.createElement(
|
|
2820
2820
|
s,
|
|
2821
|
-
E(
|
|
2821
|
+
E(C({}, l), {
|
|
2822
2822
|
id: r,
|
|
2823
2823
|
ref: c,
|
|
2824
2824
|
className: `menu ${o || ""}`,
|
|
@@ -2830,28 +2830,28 @@ var L = (e) => {
|
|
|
2830
2830
|
);
|
|
2831
2831
|
};
|
|
2832
2832
|
L.Trigger = vt;
|
|
2833
|
-
L.Content =
|
|
2834
|
-
L.Item =
|
|
2833
|
+
L.Content = br;
|
|
2834
|
+
L.Item = wr;
|
|
2835
2835
|
d.createContext(void 0);
|
|
2836
|
-
var
|
|
2837
|
-
[...new Set(
|
|
2836
|
+
var jr = (/* @__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");
|
|
2837
|
+
[...new Set(jr.values())].map((e) => ({
|
|
2838
2838
|
label: `+${e}`,
|
|
2839
2839
|
value: e
|
|
2840
2840
|
}));
|
|
2841
2841
|
d.createContext(void 0);
|
|
2842
2842
|
d.createContext(void 0);
|
|
2843
2843
|
var le = /* @__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))(le || {});
|
|
2844
|
-
const
|
|
2844
|
+
const _r = "/icons/bouMenuIcons.svg", Sr = ({
|
|
2845
2845
|
bouIconId: e,
|
|
2846
2846
|
...t
|
|
2847
|
-
}) => /* @__PURE__ */ n.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ n.jsx("use", { href: `${
|
|
2847
|
+
}) => /* @__PURE__ */ n.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ n.jsx("use", { href: `${_r}#${le[e]}` }) }), H = ({
|
|
2848
2848
|
className: e,
|
|
2849
2849
|
label: t,
|
|
2850
2850
|
mobileUrl: s,
|
|
2851
2851
|
desktopUrl: r,
|
|
2852
2852
|
icon: i
|
|
2853
2853
|
}) => {
|
|
2854
|
-
const a = () => typeof i == "string" && i in le ? /* @__PURE__ */ n.jsx(
|
|
2854
|
+
const a = () => typeof i == "string" && i in le ? /* @__PURE__ */ n.jsx(Sr, { bouIconId: le[i] }) : i;
|
|
2855
2855
|
return /* @__PURE__ */ n.jsxs(L.Item, { className: e, children: [
|
|
2856
2856
|
/* @__PURE__ */ n.jsxs("a", { href: s, referrerPolicy: "no-referrer-when-downgrade", children: [
|
|
2857
2857
|
a(),
|
|
@@ -2862,7 +2862,7 @@ const Sr = "/icons/bouMenuIcons.svg", Er = ({
|
|
|
2862
2862
|
t
|
|
2863
2863
|
] })
|
|
2864
2864
|
] });
|
|
2865
|
-
}, mt = d.createContext(void 0),
|
|
2865
|
+
}, mt = d.createContext(void 0), Er = ({
|
|
2866
2866
|
position: e,
|
|
2867
2867
|
bouMenuItems: t,
|
|
2868
2868
|
authenticationStatus: s,
|
|
@@ -2873,13 +2873,13 @@ const Sr = "/icons/bouMenuIcons.svg", Er = ({
|
|
|
2873
2873
|
if (!e)
|
|
2874
2874
|
throw new Error("Authentication context can not be rendered outside of Authentication");
|
|
2875
2875
|
return e;
|
|
2876
|
-
}, yt = d.createContext(void 0),
|
|
2876
|
+
}, yt = d.createContext(void 0), Pr = ({ apiUrl: e, redirectUrl: t, children: s }) => /* @__PURE__ */ n.jsx(yt.Provider, { value: { apiUrl: e, redirectUrl: t }, children: s }), gt = () => {
|
|
2877
2877
|
const e = d.useContext(yt);
|
|
2878
2878
|
if (!e)
|
|
2879
2879
|
throw new Error("Api context can not be rendered outside of Api");
|
|
2880
2880
|
return e;
|
|
2881
2881
|
}, W = () => {
|
|
2882
|
-
const { apiUrl: e, redirectUrl: t } =
|
|
2882
|
+
const { apiUrl: e, redirectUrl: t } = gt(), s = _t({ apiUrl: e, redirectUrl: t }), r = `${e}/logout?redirectUrl=${t}`, i = `${e}/user/profile`, a = `${e}/gdpr/tc/check`, o = `${e}/gdpr/tc`;
|
|
2883
2883
|
return {
|
|
2884
2884
|
loginUrl: s,
|
|
2885
2885
|
logoutUrl: r,
|
|
@@ -2887,7 +2887,7 @@ const Sr = "/icons/bouMenuIcons.svg", Er = ({
|
|
|
2887
2887
|
getTermsAndConditionsEndpoint: a,
|
|
2888
2888
|
postTermsAndConditionsEndpoint: o
|
|
2889
2889
|
};
|
|
2890
|
-
},
|
|
2890
|
+
}, Rr = (e) => e != null && e.length ? /* @__PURE__ */ n.jsx("ul", { className: "bou-menu__list", children: e == null ? void 0 : e.map(({ label: t, icon: s, url: r }, i) => /* @__PURE__ */ n.jsx(
|
|
2891
2891
|
H,
|
|
2892
2892
|
{
|
|
2893
2893
|
className: "bou-menu-item",
|
|
@@ -2897,13 +2897,13 @@ const Sr = "/icons/bouMenuIcons.svg", Er = ({
|
|
|
2897
2897
|
label: t
|
|
2898
2898
|
},
|
|
2899
2899
|
i
|
|
2900
|
-
)) }) : null,
|
|
2900
|
+
)) }) : null, Ar = () => {
|
|
2901
2901
|
const { t: e } = q(), t = Ke(), { position: s, profile: r, bouMenuItems: i } = Pe(), { logoutUrl: a } = W(), o = (r == null ? void 0 : r.firstName) ?? "", l = (r == null ? void 0 : r.lastName) ?? "";
|
|
2902
2902
|
return /* @__PURE__ */ n.jsxs(L, { type: "nav", id: "xtra-menu", position: s, children: [
|
|
2903
2903
|
/* @__PURE__ */ n.jsx(
|
|
2904
2904
|
L.Trigger,
|
|
2905
2905
|
{
|
|
2906
|
-
className:
|
|
2906
|
+
className: R(
|
|
2907
2907
|
"button",
|
|
2908
2908
|
"button--neutral",
|
|
2909
2909
|
"button--authentication",
|
|
@@ -2917,7 +2917,7 @@ const Sr = "/icons/bouMenuIcons.svg", Er = ({
|
|
|
2917
2917
|
}
|
|
2918
2918
|
),
|
|
2919
2919
|
/* @__PURE__ */ n.jsxs(L.Content, { as: "div", children: [
|
|
2920
|
-
|
|
2920
|
+
Rr(i),
|
|
2921
2921
|
/* @__PURE__ */ n.jsxs("ul", { children: [
|
|
2922
2922
|
/* @__PURE__ */ n.jsx(
|
|
2923
2923
|
H,
|
|
@@ -2960,9 +2960,9 @@ const Sr = "/icons/bouMenuIcons.svg", Er = ({
|
|
|
2960
2960
|
] })
|
|
2961
2961
|
] })
|
|
2962
2962
|
] });
|
|
2963
|
-
},
|
|
2963
|
+
}, Or = () => {
|
|
2964
2964
|
const { t: e } = q();
|
|
2965
|
-
return /* @__PURE__ */ n.jsxs("button", { className:
|
|
2965
|
+
return /* @__PURE__ */ n.jsxs("button", { className: R("button", "button--neutral", "button--authentication"), children: [
|
|
2966
2966
|
/* @__PURE__ */ n.jsx("div", { className: "button__icon", children: /* @__PURE__ */ n.jsx("i", { className: "spinner" }) }),
|
|
2967
2967
|
/* @__PURE__ */ n.jsxs("span", { className: "button__label", children: [
|
|
2968
2968
|
e("loading"),
|
|
@@ -2975,7 +2975,7 @@ const Sr = "/icons/bouMenuIcons.svg", Er = ({
|
|
|
2975
2975
|
"a",
|
|
2976
2976
|
{
|
|
2977
2977
|
href: s,
|
|
2978
|
-
className:
|
|
2978
|
+
className: R(
|
|
2979
2979
|
"button",
|
|
2980
2980
|
"button--neutral",
|
|
2981
2981
|
"button--authentication",
|
|
@@ -2990,7 +2990,7 @@ const Sr = "/icons/bouMenuIcons.svg", Er = ({
|
|
|
2990
2990
|
}
|
|
2991
2991
|
);
|
|
2992
2992
|
};
|
|
2993
|
-
const
|
|
2993
|
+
const Nr = () => {
|
|
2994
2994
|
const { t: e } = q(), { loginUrl: t } = W(), s = Ke(), { position: r } = Pe();
|
|
2995
2995
|
return /* @__PURE__ */ n.jsxs(
|
|
2996
2996
|
L,
|
|
@@ -3001,7 +3001,7 @@ const kr = () => {
|
|
|
3001
3001
|
className: "menu--unauthenticated",
|
|
3002
3002
|
"aria-label": e("xtraMenuAriaLabel"),
|
|
3003
3003
|
children: [
|
|
3004
|
-
/* @__PURE__ */ n.jsx(L.Trigger, { className:
|
|
3004
|
+
/* @__PURE__ */ n.jsx(L.Trigger, { className: R("button", "button--neutral", "button--authentication"), children: /* @__PURE__ */ n.jsxs("button", { children: [
|
|
3005
3005
|
/* @__PURE__ */ n.jsx("div", { className: "button__icon", children: /* @__PURE__ */ n.jsx(Ee, { width: 24, height: 24, suffix: "mobile" }) }),
|
|
3006
3006
|
/* @__PURE__ */ n.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ n.jsx(Se, {}) })
|
|
3007
3007
|
] }) }),
|
|
@@ -3024,8 +3024,8 @@ const Mr = () => {
|
|
|
3024
3024
|
const { authenticationStatus: e } = Pe();
|
|
3025
3025
|
return e === D.NotAuthenticated ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3026
3026
|
/* @__PURE__ */ n.jsx(Fr, {}),
|
|
3027
|
-
/* @__PURE__ */ n.jsx(
|
|
3028
|
-
] }) : e === D.Pending ? /* @__PURE__ */ n.jsx(
|
|
3027
|
+
/* @__PURE__ */ n.jsx(Nr, {})
|
|
3028
|
+
] }) : e === D.Pending ? /* @__PURE__ */ n.jsx(Or, {}) : /* @__PURE__ */ n.jsx(Ar, {});
|
|
3029
3029
|
};
|
|
3030
3030
|
/*! js-cookie v3.0.5 | MIT */
|
|
3031
3031
|
function ee(e) {
|
|
@@ -3036,7 +3036,7 @@ function ee(e) {
|
|
|
3036
3036
|
}
|
|
3037
3037
|
return e;
|
|
3038
3038
|
}
|
|
3039
|
-
var
|
|
3039
|
+
var kr = {
|
|
3040
3040
|
read: function(e) {
|
|
3041
3041
|
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
3042
3042
|
},
|
|
@@ -3047,7 +3047,7 @@ var Lr = {
|
|
|
3047
3047
|
);
|
|
3048
3048
|
}
|
|
3049
3049
|
};
|
|
3050
|
-
function
|
|
3050
|
+
function Ce(e, t) {
|
|
3051
3051
|
function s(i, a, o) {
|
|
3052
3052
|
if (!(typeof document > "u")) {
|
|
3053
3053
|
o = ee({}, t, o), typeof o.expires == "number" && (o.expires = new Date(Date.now() + o.expires * 864e5)), o.expires && (o.expires = o.expires.toUTCString()), i = encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
@@ -3085,10 +3085,10 @@ function ge(e, t) {
|
|
|
3085
3085
|
);
|
|
3086
3086
|
},
|
|
3087
3087
|
withAttributes: function(i) {
|
|
3088
|
-
return
|
|
3088
|
+
return Ce(this.converter, ee({}, this.attributes, i));
|
|
3089
3089
|
},
|
|
3090
3090
|
withConverter: function(i) {
|
|
3091
|
-
return
|
|
3091
|
+
return Ce(ee({}, this.converter, i), this.attributes);
|
|
3092
3092
|
}
|
|
3093
3093
|
},
|
|
3094
3094
|
{
|
|
@@ -3097,13 +3097,13 @@ function ge(e, t) {
|
|
|
3097
3097
|
}
|
|
3098
3098
|
);
|
|
3099
3099
|
}
|
|
3100
|
-
var xe =
|
|
3100
|
+
var xe = Ce(kr, { path: "/" });
|
|
3101
3101
|
class be extends Error {
|
|
3102
3102
|
constructor(t) {
|
|
3103
3103
|
super(t), this.name = "UnauthorizedError";
|
|
3104
3104
|
}
|
|
3105
3105
|
}
|
|
3106
|
-
const
|
|
3106
|
+
const Lr = () => {
|
|
3107
3107
|
const { i18n: e } = q(), { profileEndpoint: t } = W();
|
|
3108
3108
|
return it({
|
|
3109
3109
|
queryKey: ["profile"],
|
|
@@ -3120,13 +3120,13 @@ const Dr = () => {
|
|
|
3120
3120
|
retry: (r, i) => i instanceof be ? !1 : r < 2,
|
|
3121
3121
|
refetchOnWindowFocus: !1
|
|
3122
3122
|
});
|
|
3123
|
-
},
|
|
3123
|
+
}, Ct = () => {
|
|
3124
3124
|
var l, c;
|
|
3125
3125
|
const e = xe.get("profile"), t = !!e, [s, r] = d.useState(
|
|
3126
3126
|
t ? D.Authenticated : D.Pending
|
|
3127
3127
|
), [i, a] = d.useState(
|
|
3128
3128
|
t ? JSON.parse(e) : void 0
|
|
3129
|
-
), o =
|
|
3129
|
+
), o = Lr();
|
|
3130
3130
|
return d.useEffect(() => {
|
|
3131
3131
|
if (o.isError && o.error instanceof be && (xe.remove("profile"), r(D.NotAuthenticated)), o.isError && r(
|
|
3132
3132
|
t ? D.Authenticated : D.NotAuthenticated
|
|
@@ -3146,10 +3146,10 @@ const Dr = () => {
|
|
|
3146
3146
|
o.isError,
|
|
3147
3147
|
o.isSuccess
|
|
3148
3148
|
]), { authenticationStatus: s, profile: i };
|
|
3149
|
-
},
|
|
3150
|
-
const { authenticationStatus: s, profile: r } =
|
|
3149
|
+
}, Dr = ({ position: e, bouMenuItems: t }) => {
|
|
3150
|
+
const { authenticationStatus: s, profile: r } = Ct();
|
|
3151
3151
|
return /* @__PURE__ */ n.jsx(
|
|
3152
|
-
|
|
3152
|
+
Er,
|
|
3153
3153
|
{
|
|
3154
3154
|
bouMenuItems: t,
|
|
3155
3155
|
authenticationStatus: s,
|
|
@@ -3159,14 +3159,14 @@ const Dr = () => {
|
|
|
3159
3159
|
}
|
|
3160
3160
|
);
|
|
3161
3161
|
};
|
|
3162
|
-
var
|
|
3162
|
+
var Tr = Object.defineProperty, Ur = Object.defineProperties, Qr = Object.getOwnPropertyDescriptors, ce = Object.getOwnPropertySymbols, xt = Object.prototype.hasOwnProperty, bt = Object.prototype.propertyIsEnumerable, qe = (e, t, s) => t in e ? Tr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, K = (e, t) => {
|
|
3163
3163
|
for (var s in t || (t = {}))
|
|
3164
3164
|
xt.call(t, s) && qe(e, s, t[s]);
|
|
3165
3165
|
if (ce)
|
|
3166
3166
|
for (var s of ce(t))
|
|
3167
3167
|
bt.call(t, s) && qe(e, s, t[s]);
|
|
3168
3168
|
return e;
|
|
3169
|
-
}, Z = (e, t) =>
|
|
3169
|
+
}, Z = (e, t) => Ur(e, Qr(t)), z = (e, t) => {
|
|
3170
3170
|
var s = {};
|
|
3171
3171
|
for (var r in e)
|
|
3172
3172
|
xt.call(e, r) && t.indexOf(r) < 0 && (s[r] = e[r]);
|
|
@@ -3174,14 +3174,14 @@ var Ur = Object.defineProperty, Qr = Object.defineProperties, qr = Object.getOwn
|
|
|
3174
3174
|
for (var r of ce(e))
|
|
3175
3175
|
t.indexOf(r) < 0 && bt.call(e, r) && (s[r] = e[r]);
|
|
3176
3176
|
return s;
|
|
3177
|
-
},
|
|
3177
|
+
}, qr = d.forwardRef((e, t) => {
|
|
3178
3178
|
const s = e, { isAuthenticated: r, className: i } = s, a = z(s, ["isAuthenticated", "className"]);
|
|
3179
3179
|
return /* @__PURE__ */ n.jsx(
|
|
3180
3180
|
$,
|
|
3181
3181
|
K({
|
|
3182
3182
|
type: "button",
|
|
3183
3183
|
ref: t,
|
|
3184
|
-
className:
|
|
3184
|
+
className: R(
|
|
3185
3185
|
"button--neutral",
|
|
3186
3186
|
"button--authentication",
|
|
3187
3187
|
r && "button--authentication--authenticated",
|
|
@@ -3190,8 +3190,8 @@ var Ur = Object.defineProperty, Qr = Object.defineProperties, qr = Object.getOwn
|
|
|
3190
3190
|
}, a)
|
|
3191
3191
|
);
|
|
3192
3192
|
});
|
|
3193
|
-
|
|
3194
|
-
var
|
|
3193
|
+
qr.displayName = "AuthenticationButton";
|
|
3194
|
+
var Kr = (e) => {
|
|
3195
3195
|
var t = e, {
|
|
3196
3196
|
children: s
|
|
3197
3197
|
} = t, r = z(t, [
|
|
@@ -3205,14 +3205,14 @@ var Hr = (e) => {
|
|
|
3205
3205
|
}
|
|
3206
3206
|
);
|
|
3207
3207
|
wt.displayName = "TermsAndConditionsForm";
|
|
3208
|
-
var
|
|
3208
|
+
var Hr = (e) => {
|
|
3209
3209
|
var t = e, {
|
|
3210
3210
|
children: s
|
|
3211
3211
|
} = t, r = z(t, [
|
|
3212
3212
|
"children"
|
|
3213
3213
|
]);
|
|
3214
3214
|
return /* @__PURE__ */ n.jsx("p", Z(K({ className: "form--tc__description" }, r), { children: s }));
|
|
3215
|
-
},
|
|
3215
|
+
}, Gr = (e) => {
|
|
3216
3216
|
var t = e, { children: s } = t, r = z(t, ["children"]);
|
|
3217
3217
|
return /* @__PURE__ */ n.jsx(
|
|
3218
3218
|
"a",
|
|
@@ -3226,15 +3226,15 @@ var Gr = (e) => {
|
|
|
3226
3226
|
children: s
|
|
3227
3227
|
})
|
|
3228
3228
|
);
|
|
3229
|
-
},
|
|
3230
|
-
(e, t) => /* @__PURE__ */ n.jsx(
|
|
3229
|
+
}, Vr = ({ children: e }) => /* @__PURE__ */ n.jsx("h1", { className: "form--tc__title", children: e }), $r = d.forwardRef(
|
|
3230
|
+
(e, t) => /* @__PURE__ */ n.jsx(N.Close, Z(K({ className: "hidden" }, e), { ref: t }))
|
|
3231
3231
|
);
|
|
3232
|
-
|
|
3233
|
-
var
|
|
3232
|
+
$r.displayName = "TermsAndConditionsClose";
|
|
3233
|
+
var Wr = (e) => {
|
|
3234
3234
|
var t = e, { children: s } = t, r = z(t, ["children"]);
|
|
3235
3235
|
return /* @__PURE__ */ n.jsx("span", Z(K({ className: "form--tc__error", role: "alert" }, r), { children: s }));
|
|
3236
3236
|
};
|
|
3237
|
-
const
|
|
3237
|
+
const Zr = () => {
|
|
3238
3238
|
const { postTermsAndConditionsEndpoint: e } = W(), t = new Je();
|
|
3239
3239
|
return ps({
|
|
3240
3240
|
mutationFn: async (r) => {
|
|
@@ -3252,8 +3252,8 @@ const zr = () => {
|
|
|
3252
3252
|
await t.invalidateQueries({ queryKey: ["gdpr"] });
|
|
3253
3253
|
}
|
|
3254
3254
|
});
|
|
3255
|
-
},
|
|
3256
|
-
const { i18n: e } = q(), { getTermsAndConditionsEndpoint: t } = W(), { authenticationStatus: s } =
|
|
3255
|
+
}, zr = () => {
|
|
3256
|
+
const { i18n: e } = q(), { getTermsAndConditionsEndpoint: t } = W(), { authenticationStatus: s } = Ct(), r = xe.get("hasAcceptedLatestTermsAndConditions"), i = [], a = r === "true", o = s === D.Authenticated;
|
|
3257
3257
|
return it({
|
|
3258
3258
|
queryKey: ["gdpr"],
|
|
3259
3259
|
queryFn: async () => {
|
|
@@ -3269,54 +3269,54 @@ const zr = () => {
|
|
|
3269
3269
|
enabled: o && !a,
|
|
3270
3270
|
initialData: i
|
|
3271
3271
|
});
|
|
3272
|
-
},
|
|
3273
|
-
const { t } = q(), { apiUrl: s } =
|
|
3274
|
-
var
|
|
3275
|
-
(
|
|
3272
|
+
}, Yr = ({ redirectUrl: e }) => {
|
|
3273
|
+
const { t } = q(), { apiUrl: s } = gt(), r = d.useRef(null), [i, a] = d.useState(0), [o, l] = d.useState({}), { mutate: c, isError: h } = Zr(), { AccessibleFormMessage: u, formRef: f } = St({ submitCount: i, errors: o }), { data: v } = zr(), p = !!(v != null && v.length), y = t("termsAndConditions.error.required"), x = () => {
|
|
3274
|
+
var g;
|
|
3275
|
+
(g = r == null ? void 0 : r.current) == null || g.click(), document.body.style.removeProperty("overflow");
|
|
3276
3276
|
};
|
|
3277
3277
|
d.useEffect(() => {
|
|
3278
|
-
|
|
3279
|
-
}, [
|
|
3278
|
+
p && document.body.style.setProperty("overflow", "hidden");
|
|
3279
|
+
}, [p]), d.useEffect(() => {
|
|
3280
3280
|
h && l({ acceptedTC: y });
|
|
3281
3281
|
}, [y, h]);
|
|
3282
|
-
const m = (
|
|
3283
|
-
|
|
3284
|
-
const { acceptedTC: _ } =
|
|
3282
|
+
const m = (g) => {
|
|
3283
|
+
g.preventDefault(), a(i + 1);
|
|
3284
|
+
const { acceptedTC: _ } = g.target;
|
|
3285
3285
|
if (_ instanceof RadioNodeList) {
|
|
3286
3286
|
const w = Object.values(_);
|
|
3287
|
-
w.every((
|
|
3287
|
+
w.every((F) => F.checked) ? (l({}), c(w.map((F) => F.value)), x()) : l({ acceptedTC: y });
|
|
3288
3288
|
} else
|
|
3289
3289
|
_ != null && _.checked ? (l({}), c([_.value]), x()) : l({ acceptedTC: y });
|
|
3290
3290
|
};
|
|
3291
|
-
return
|
|
3291
|
+
return p ? /* @__PURE__ */ n.jsxs(N, { defaultOpen: p, isModal: !0, children: [
|
|
3292
3292
|
u,
|
|
3293
|
-
/* @__PURE__ */ n.jsxs(
|
|
3294
|
-
/* @__PURE__ */ n.jsx(
|
|
3295
|
-
/* @__PURE__ */ n.jsx(
|
|
3296
|
-
/* @__PURE__ */ n.jsxs(
|
|
3293
|
+
/* @__PURE__ */ n.jsxs(N.Root, { children: [
|
|
3294
|
+
/* @__PURE__ */ n.jsx(N.Header, { children: /* @__PURE__ */ n.jsx(N.Title, { icon: /* @__PURE__ */ n.jsx(Ee, { role: "presentation" }), children: /* @__PURE__ */ n.jsx(Vr, { children: t("termsAndConditions.title") }) }) }),
|
|
3295
|
+
/* @__PURE__ */ n.jsx(N.Body, { children: /* @__PURE__ */ n.jsxs(wt, { ref: f, id: "tc-form", onSubmit: m, children: [
|
|
3296
|
+
/* @__PURE__ */ n.jsxs(Hr, { children: [
|
|
3297
3297
|
t("termsAndConditions.description"),
|
|
3298
|
-
o.acceptedTC && /* @__PURE__ */ n.jsx(
|
|
3298
|
+
o.acceptedTC && /* @__PURE__ */ n.jsx(Wr, { children: y })
|
|
3299
3299
|
] }),
|
|
3300
|
-
v.map(({ tcCode:
|
|
3300
|
+
v.map(({ tcCode: g, title: _, URL: w }) => /* @__PURE__ */ n.jsx(
|
|
3301
3301
|
Q,
|
|
3302
3302
|
{
|
|
3303
|
-
id:
|
|
3304
|
-
value:
|
|
3303
|
+
id: g,
|
|
3304
|
+
value: g,
|
|
3305
3305
|
name: "acceptedTC",
|
|
3306
3306
|
variant: "primary",
|
|
3307
3307
|
children: /* @__PURE__ */ n.jsxs(Q.Content, { children: [
|
|
3308
|
-
/* @__PURE__ */ n.jsx(
|
|
3309
|
-
/* @__PURE__ */ n.jsx(
|
|
3308
|
+
/* @__PURE__ */ n.jsx(Kr, { children: _ }),
|
|
3309
|
+
/* @__PURE__ */ n.jsx(Gr, { href: w, children: t("termsAndConditions.action", { title: _ }) })
|
|
3310
3310
|
] })
|
|
3311
3311
|
},
|
|
3312
|
-
|
|
3312
|
+
g
|
|
3313
3313
|
))
|
|
3314
3314
|
] }) }),
|
|
3315
|
-
/* @__PURE__ */ n.jsxs(
|
|
3315
|
+
/* @__PURE__ */ n.jsxs(N.Footer, { children: [
|
|
3316
3316
|
/* @__PURE__ */ n.jsx(
|
|
3317
3317
|
"a",
|
|
3318
3318
|
{
|
|
3319
|
-
className:
|
|
3319
|
+
className: R("button", "button--secondary", "button--terms-and-conditions"),
|
|
3320
3320
|
href: `${s}/logout?redirectUrl=${e}`,
|
|
3321
3321
|
children: t("logout")
|
|
3322
3322
|
}
|
|
@@ -3325,12 +3325,12 @@ const zr = () => {
|
|
|
3325
3325
|
] })
|
|
3326
3326
|
] })
|
|
3327
3327
|
] }) : /* @__PURE__ */ n.jsx(n.Fragment, {});
|
|
3328
|
-
},
|
|
3329
|
-
|
|
3330
|
-
const
|
|
3331
|
-
/* @__PURE__ */ n.jsx(
|
|
3332
|
-
/* @__PURE__ */ n.jsx(
|
|
3328
|
+
}, Jr = d.forwardRef(({ children: e, ...t }, s) => /* @__PURE__ */ n.jsx("form", { className: "form--tc", ref: s, ...t, children: e }));
|
|
3329
|
+
Jr.displayName = "TermsAndConditionsForm";
|
|
3330
|
+
const Xr = new Je(), en = ({ environment: e, redirectUrl: t, apiUrl: s, position: r, bouMenuItems: i }) => /* @__PURE__ */ n.jsx(Et, { environment: e, children: /* @__PURE__ */ n.jsx(Pr, { apiUrl: s, redirectUrl: t, children: /* @__PURE__ */ n.jsxs(ts, { client: Xr, children: [
|
|
3331
|
+
/* @__PURE__ */ n.jsx(Dr, { position: r, bouMenuItems: i }),
|
|
3332
|
+
/* @__PURE__ */ n.jsx(Yr, { redirectUrl: t })
|
|
3333
3333
|
] }) }) });
|
|
3334
3334
|
export {
|
|
3335
|
-
|
|
3335
|
+
en as default
|
|
3336
3336
|
};
|