@fanfare-io/fanfare-sdk-solid 0.7.2 → 0.9.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/dist/index.js +301 -296
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createComponent as n, Dynamic as Qr, spread as he, mergeProps as ie, memo as Q, insert as i, effect as A, setAttribute as H, className as M, template as u, use as ft, setStyleProperty as bt, delegateEvents as Et } from "solid-js/web";
|
|
2
|
-
import { createContext as Vt, useContext as Dt, createMemo as d, createSignal as D, createEffect as te, onCleanup as Se, untrack as Ye, Show as
|
|
2
|
+
import { createContext as Vt, useContext as Dt, createMemo as d, createSignal as D, createEffect as te, onCleanup as Se, untrack as Ye, Show as y, splitProps as Z, children as Xr, Switch as Re, Match as J, Index as st, onMount as en, For as At, on as xt } from "solid-js";
|
|
3
3
|
import { createTranslateFunction as wr, en as tn, getLocaleMessages as rn, mergeTranslations as Kt, isRTLLocale as nn, resolveLocaleMapValue as an, normalizeLocale as on } from "@fanfare-io/fanfare-sdk-i18n";
|
|
4
4
|
import { RTL_LOCALES as $f, isRTLLocale as Cf } from "@fanfare-io/fanfare-sdk-i18n";
|
|
5
5
|
import { customElement as fn } from "solid-element";
|
|
@@ -40,17 +40,17 @@ function fe() {
|
|
|
40
40
|
}
|
|
41
41
|
function bn(e, t, r, a, o) {
|
|
42
42
|
const f = d(() => t() ?? e.locale()), s = d(() => {
|
|
43
|
-
const
|
|
44
|
-
return
|
|
43
|
+
const x = t();
|
|
44
|
+
return x && x !== e.locale() ? rn(x) : e.messages();
|
|
45
45
|
}), l = d(() => a() ?? e.experienceTranslations()), c = d(() => {
|
|
46
|
-
const
|
|
47
|
-
return Kt(
|
|
46
|
+
const x = Kt(s(), l() ?? void 0);
|
|
47
|
+
return Kt(x, r());
|
|
48
48
|
}), v = d(() => wr(c(), f())), w = d(() => nn(f()) ? "rtl" : "ltr");
|
|
49
49
|
return {
|
|
50
50
|
locale: f,
|
|
51
51
|
messages: c,
|
|
52
52
|
isRoot: !1,
|
|
53
|
-
t: (...
|
|
53
|
+
t: (...x) => v()(...x),
|
|
54
54
|
dir: w,
|
|
55
55
|
experienceTranslations: l,
|
|
56
56
|
setExperienceTranslations: o
|
|
@@ -128,40 +128,40 @@ function kn(e) {
|
|
|
128
128
|
return typeof e == "function" ? e : () => e;
|
|
129
129
|
}
|
|
130
130
|
function _n(e, t) {
|
|
131
|
-
const r = ct(), { locale: a, setExperienceTranslations: o } = Nt(), f = kn(e), [s, l] = D(null), [c, v] = D(null), [w, b] = D(null), [
|
|
131
|
+
const r = ct(), { locale: a, setExperienceTranslations: o } = Nt(), f = kn(e), [s, l] = D(null), [c, v] = D(null), [w, b] = D(null), [x, _] = D(null);
|
|
132
132
|
te(() => {
|
|
133
133
|
const T = f();
|
|
134
134
|
if (!T) {
|
|
135
135
|
l(null), v(null), b(null), _(null);
|
|
136
136
|
return;
|
|
137
137
|
}
|
|
138
|
-
const
|
|
139
|
-
l(
|
|
140
|
-
const
|
|
138
|
+
const m = r.journeys.get(T);
|
|
139
|
+
l(m), v(m.snapshot$.get()), b(m.view$.get());
|
|
140
|
+
const h = m.snapshot$.listen(v), k = m.view$.listen(b);
|
|
141
141
|
Se(() => {
|
|
142
|
-
|
|
142
|
+
h(), k();
|
|
143
143
|
});
|
|
144
144
|
}), te(() => {
|
|
145
145
|
if (!f()) {
|
|
146
146
|
o(null);
|
|
147
147
|
return;
|
|
148
148
|
}
|
|
149
|
-
let
|
|
150
|
-
const
|
|
149
|
+
let m = !1;
|
|
150
|
+
const h = a(), k = c()?.experience?.experience?.i18n;
|
|
151
151
|
if (k) {
|
|
152
|
-
const z = an(k,
|
|
152
|
+
const z = an(k, h);
|
|
153
153
|
o(z ?? null);
|
|
154
|
-
} else
|
|
154
|
+
} else m || o(null);
|
|
155
155
|
Se(() => {
|
|
156
|
-
|
|
156
|
+
m = !0, o(null);
|
|
157
157
|
});
|
|
158
158
|
});
|
|
159
159
|
const V = async (T) => {
|
|
160
|
-
const
|
|
161
|
-
if (!
|
|
160
|
+
const m = f();
|
|
161
|
+
if (!m)
|
|
162
162
|
throw new Error("experienceId is required to start an experience journey");
|
|
163
|
-
const
|
|
164
|
-
|
|
163
|
+
const h = s(), k = h ?? r.journeys.get(m);
|
|
164
|
+
h || (l(k), v(k.snapshot$.get()), b(k.view$.get())), _(null);
|
|
165
165
|
const z = {
|
|
166
166
|
accessCode: Ke(T?.accessCode) ?? Ke(t?.accessCode),
|
|
167
167
|
autoEnterWaitlist: Ke(T?.autoEnterWaitlist) ?? Ke(t?.autoEnterWaitlist)
|
|
@@ -187,7 +187,7 @@ function _n(e, t) {
|
|
|
187
187
|
journey: s,
|
|
188
188
|
view: w,
|
|
189
189
|
snapshot: c,
|
|
190
|
-
error:
|
|
190
|
+
error: x,
|
|
191
191
|
start: V
|
|
192
192
|
};
|
|
193
193
|
}
|
|
@@ -303,7 +303,7 @@ function yt(e) {
|
|
|
303
303
|
return n(kr.Provider, {
|
|
304
304
|
value: r,
|
|
305
305
|
get children() {
|
|
306
|
-
return n(
|
|
306
|
+
return n(y, {
|
|
307
307
|
get when() {
|
|
308
308
|
return o();
|
|
309
309
|
},
|
|
@@ -364,11 +364,11 @@ const Jt = ["default", "rounded"], Nn = de(["ff:flex ff:w-full ff:rounded-md ff:
|
|
|
364
364
|
}
|
|
365
365
|
});
|
|
366
366
|
function lt(e) {
|
|
367
|
-
const t = $e(), [r, a] = Z(e, ["class", "className", "type", "label", "error", "hasError", "inlineLabel", "inlineError", "id", "name", "placeholder"]), o = d(() => r.id ?? r.name), f = d(() => r.inlineLabel ?? Jt.includes(t())), s = d(() => r.inlineError ?? Jt.includes(t())), l = d(() => !!r.hasError || !!r.error), c = d(() => !!r.error && !r.hasError), v = d(() => !!(f() && r.label)), w = d(() => !!(!f() && r.label)), b = d(() => !!(s() && c())),
|
|
367
|
+
const t = $e(), [r, a] = Z(e, ["class", "className", "type", "label", "error", "hasError", "inlineLabel", "inlineError", "id", "name", "placeholder"]), o = d(() => r.id ?? r.name), f = d(() => r.inlineLabel ?? Jt.includes(t())), s = d(() => r.inlineError ?? Jt.includes(t())), l = d(() => !!r.hasError || !!r.error), c = d(() => !!r.error && !r.hasError), v = d(() => !!(f() && r.label)), w = d(() => !!(!f() && r.label)), b = d(() => !!(s() && c())), x = d(() => !!(!s() && c())), _ = d(() => $(Nn({
|
|
368
368
|
styleVariant: t()
|
|
369
369
|
}), l() && "ff:border-danger ff:focus:border-danger ff:focus:ring-danger", v() && "ff:pt-5 ff:pb-1", r.class, r.className));
|
|
370
370
|
return v() ? (() => {
|
|
371
|
-
var V = Vn(), T = V.firstChild,
|
|
371
|
+
var V = Vn(), T = V.firstChild, m = T.nextSibling;
|
|
372
372
|
return he(T, ie({
|
|
373
373
|
get type() {
|
|
374
374
|
return r.type ?? "text";
|
|
@@ -391,51 +391,51 @@ function lt(e) {
|
|
|
391
391
|
get class() {
|
|
392
392
|
return $(_(), "ff:peer ff:placeholder:opacity-0 ff:placeholder:transition-opacity ff:placeholder:duration-200", "ff:focus:placeholder:opacity-100");
|
|
393
393
|
}
|
|
394
|
-
}, a), !1, !1), i(
|
|
394
|
+
}, a), !1, !1), i(m, () => r.label), i(V, n(y, {
|
|
395
395
|
get when() {
|
|
396
396
|
return b();
|
|
397
397
|
},
|
|
398
398
|
get children() {
|
|
399
|
-
var
|
|
400
|
-
return i(
|
|
399
|
+
var h = Ht();
|
|
400
|
+
return i(h, () => r.error), A(() => H(h, "id", `${o()}-error`)), h;
|
|
401
401
|
}
|
|
402
|
-
}), null), i(V, n(
|
|
402
|
+
}), null), i(V, n(y, {
|
|
403
403
|
get when() {
|
|
404
|
-
return
|
|
404
|
+
return x();
|
|
405
405
|
},
|
|
406
406
|
get children() {
|
|
407
|
-
var
|
|
408
|
-
return i(
|
|
407
|
+
var h = Gt();
|
|
408
|
+
return i(h, () => r.error), A(() => H(h, "id", `${o()}-error`)), h;
|
|
409
409
|
}
|
|
410
|
-
}), null), A((
|
|
410
|
+
}), null), A((h) => {
|
|
411
411
|
var k = l() || void 0, z = o(), C = $("ff:absolute ff:left-3 ff:top-3 ff:z-10 ff:origin-top-left ff:select-none", "ff:text-sm ff:font-medium ff:transition-all ff:duration-150 ff:ease-out", "ff:pointer-events-none", "ff:text-muted ff:-translate-y-2 ff:scale-75", "ff:peer-placeholder-shown:text-muted ff:peer-placeholder-shown:translate-y-0 ff:peer-placeholder-shown:scale-100 ff:peer-placeholder-shown:font-normal", "ff:peer-focus:text-primary ff:peer-focus:-translate-y-2 ff:peer-focus:scale-75 ff:peer-focus:font-medium", "ff:peer-disabled:text-muted ff:peer-disabled:opacity-50", l() && "ff:text-danger ff:peer-focus:text-danger", Zt({
|
|
412
412
|
styleVariant: t()
|
|
413
413
|
}));
|
|
414
|
-
return k !==
|
|
414
|
+
return k !== h.e && H(V, "data-error", h.e = k), z !== h.t && H(m, "for", h.t = z), C !== h.a && M(m, h.a = C), h;
|
|
415
415
|
}, {
|
|
416
416
|
e: void 0,
|
|
417
417
|
t: void 0,
|
|
418
418
|
a: void 0
|
|
419
419
|
}), V;
|
|
420
420
|
})() : (() => {
|
|
421
|
-
var V = An(), T = V.firstChild,
|
|
422
|
-
return i(V, n(
|
|
421
|
+
var V = An(), T = V.firstChild, m = T.firstChild;
|
|
422
|
+
return i(V, n(y, {
|
|
423
423
|
get when() {
|
|
424
424
|
return w();
|
|
425
425
|
},
|
|
426
426
|
get children() {
|
|
427
|
-
var
|
|
428
|
-
return i(
|
|
427
|
+
var h = Dn();
|
|
428
|
+
return i(h, () => r.label), A((k) => {
|
|
429
429
|
var z = o(), C = $("ff:text-foreground ff:mb-1.5 ff:block ff:text-sm ff:font-medium", Zt({
|
|
430
430
|
styleVariant: t()
|
|
431
431
|
}));
|
|
432
|
-
return z !== k.e && H(
|
|
432
|
+
return z !== k.e && H(h, "for", k.e = z), C !== k.t && M(h, k.t = C), k;
|
|
433
433
|
}, {
|
|
434
434
|
e: void 0,
|
|
435
435
|
t: void 0
|
|
436
|
-
}),
|
|
436
|
+
}), h;
|
|
437
437
|
}
|
|
438
|
-
}), T), he(
|
|
438
|
+
}), T), he(m, ie({
|
|
439
439
|
get type() {
|
|
440
440
|
return r.type ?? "text";
|
|
441
441
|
},
|
|
@@ -457,21 +457,21 @@ function lt(e) {
|
|
|
457
457
|
get class() {
|
|
458
458
|
return _();
|
|
459
459
|
}
|
|
460
|
-
}, a), !1, !1), i(T, n(
|
|
460
|
+
}, a), !1, !1), i(T, n(y, {
|
|
461
461
|
get when() {
|
|
462
462
|
return b();
|
|
463
463
|
},
|
|
464
464
|
get children() {
|
|
465
|
-
var
|
|
466
|
-
return i(
|
|
465
|
+
var h = Ht();
|
|
466
|
+
return i(h, () => r.error), A(() => H(h, "id", `${o()}-error`)), h;
|
|
467
467
|
}
|
|
468
|
-
}), null), i(T, n(
|
|
468
|
+
}), null), i(T, n(y, {
|
|
469
469
|
get when() {
|
|
470
|
-
return
|
|
470
|
+
return x();
|
|
471
471
|
},
|
|
472
472
|
get children() {
|
|
473
|
-
var
|
|
474
|
-
return i(
|
|
473
|
+
var h = Gt();
|
|
474
|
+
return i(h, () => r.error), A(() => H(h, "id", `${o()}-error`)), h;
|
|
475
475
|
}
|
|
476
476
|
}), null), A(() => H(V, "data-error", !!r.error || void 0)), V;
|
|
477
477
|
})();
|
|
@@ -566,7 +566,7 @@ function De(e) {
|
|
|
566
566
|
tone: a()
|
|
567
567
|
}), t.class, t.className);
|
|
568
568
|
}
|
|
569
|
-
}, r), !1, !0), i(s, () => t.icon ?? o()), i(l, n(
|
|
569
|
+
}, r), !1, !0), i(s, () => t.icon ?? o()), i(l, n(y, {
|
|
570
570
|
get when() {
|
|
571
571
|
return t.title;
|
|
572
572
|
},
|
|
@@ -576,7 +576,7 @@ function De(e) {
|
|
|
576
576
|
tone: a()
|
|
577
577
|
})))), c;
|
|
578
578
|
}
|
|
579
|
-
}), null), i(l, n(
|
|
579
|
+
}), null), i(l, n(y, {
|
|
580
580
|
get when() {
|
|
581
581
|
return t.description;
|
|
582
582
|
},
|
|
@@ -819,7 +819,7 @@ function Cr(e) {
|
|
|
819
819
|
styleVariant: t()
|
|
820
820
|
}), r.class, r.className);
|
|
821
821
|
}
|
|
822
|
-
}, a), !1, !0), i(l, n(
|
|
822
|
+
}, a), !1, !0), i(l, n(y, {
|
|
823
823
|
get when() {
|
|
824
824
|
return s();
|
|
825
825
|
},
|
|
@@ -840,7 +840,7 @@ function ae(e) {
|
|
|
840
840
|
get class() {
|
|
841
841
|
return $("ff:flex ff:flex-col ff:gap-4", t.class, t.className);
|
|
842
842
|
}
|
|
843
|
-
}, r), !1, !0), i(a, n(
|
|
843
|
+
}, r), !1, !0), i(a, n(y, {
|
|
844
844
|
get when() {
|
|
845
845
|
return t.label;
|
|
846
846
|
},
|
|
@@ -856,13 +856,13 @@ function ae(e) {
|
|
|
856
856
|
}
|
|
857
857
|
})), o;
|
|
858
858
|
}
|
|
859
|
-
}), null), i(a, n(
|
|
859
|
+
}), null), i(a, n(y, {
|
|
860
860
|
get when() {
|
|
861
861
|
return t.title || t.description;
|
|
862
862
|
},
|
|
863
863
|
get children() {
|
|
864
864
|
var o = Yn();
|
|
865
|
-
return i(o, n(
|
|
865
|
+
return i(o, n(y, {
|
|
866
866
|
get when() {
|
|
867
867
|
return t.title;
|
|
868
868
|
},
|
|
@@ -870,7 +870,7 @@ function ae(e) {
|
|
|
870
870
|
var f = Jn();
|
|
871
871
|
return i(f, () => t.title), f;
|
|
872
872
|
}
|
|
873
|
-
}), null), i(o, n(
|
|
873
|
+
}), null), i(o, n(y, {
|
|
874
874
|
get when() {
|
|
875
875
|
return t.description;
|
|
876
876
|
},
|
|
@@ -1018,7 +1018,7 @@ function ee(e) {
|
|
|
1018
1018
|
get class() {
|
|
1019
1019
|
return $("ff:flex ff:items-center ff:justify-between ff:gap-2 ff:border-t ff:border-border-light ff:px-5 ff:py-2.5 ff:text-xxs ff:text-muted-foreground", f() && "ff:font-mono", a.class, a.className);
|
|
1020
1020
|
}
|
|
1021
|
-
}, o), !1, !0), i(s, n(
|
|
1021
|
+
}, o), !1, !0), i(s, n(y, {
|
|
1022
1022
|
get when() {
|
|
1023
1023
|
return a.children;
|
|
1024
1024
|
},
|
|
@@ -1059,7 +1059,7 @@ function ne(e) {
|
|
|
1059
1059
|
return [(() => {
|
|
1060
1060
|
var f = ma();
|
|
1061
1061
|
return i(f, () => o().mainChildren), f;
|
|
1062
|
-
})(), n(
|
|
1062
|
+
})(), n(y, {
|
|
1063
1063
|
get when() {
|
|
1064
1064
|
return o().footerChildren.length > 0;
|
|
1065
1065
|
},
|
|
@@ -1233,7 +1233,7 @@ function O(e) {
|
|
|
1233
1233
|
get disabled() {
|
|
1234
1234
|
return o();
|
|
1235
1235
|
}
|
|
1236
|
-
}, a), !1, !0), i(f, n(
|
|
1236
|
+
}, a), !1, !0), i(f, n(y, {
|
|
1237
1237
|
get when() {
|
|
1238
1238
|
return r.loading;
|
|
1239
1239
|
},
|
|
@@ -1341,7 +1341,7 @@ function er(e) {
|
|
|
1341
1341
|
function La(e) {
|
|
1342
1342
|
return (() => {
|
|
1343
1343
|
var t = xa();
|
|
1344
|
-
return i(t, n(
|
|
1344
|
+
return i(t, n(y, {
|
|
1345
1345
|
get when() {
|
|
1346
1346
|
return e.value;
|
|
1347
1347
|
},
|
|
@@ -1417,31 +1417,31 @@ function ye(e) {
|
|
|
1417
1417
|
timeRemaining: o,
|
|
1418
1418
|
isClient: f,
|
|
1419
1419
|
isPast: s
|
|
1420
|
-
} = za(() => a.targetDate, () => a.onComplete), l = () => a.layout ?? "swiss", c = () => a.showDays ?? !0, v = () => a.showHours ?? !0, w = () => a.showMinutes ?? !0, b = () => a.showSeconds ?? !0,
|
|
1421
|
-
const
|
|
1420
|
+
} = za(() => a.targetDate, () => a.onComplete), l = () => a.layout ?? "swiss", c = () => a.showDays ?? !0, v = () => a.showHours ?? !0, w = () => a.showMinutes ?? !0, b = () => a.showSeconds ?? !0, x = d(() => {
|
|
1421
|
+
const m = o();
|
|
1422
1422
|
return [{
|
|
1423
|
-
value:
|
|
1423
|
+
value: m.days,
|
|
1424
1424
|
label: t("countdown.days"),
|
|
1425
1425
|
shortLabel: t("countdown.daysShort"),
|
|
1426
|
-
show: c() &&
|
|
1426
|
+
show: c() && m.days > 0
|
|
1427
1427
|
}, {
|
|
1428
|
-
value:
|
|
1428
|
+
value: m.hours,
|
|
1429
1429
|
label: t("countdown.hours"),
|
|
1430
1430
|
shortLabel: t("countdown.hoursShort"),
|
|
1431
1431
|
show: v()
|
|
1432
1432
|
}, {
|
|
1433
|
-
value:
|
|
1433
|
+
value: m.minutes,
|
|
1434
1434
|
label: t("countdown.minutes"),
|
|
1435
1435
|
shortLabel: t("countdown.minutesShort"),
|
|
1436
1436
|
show: w()
|
|
1437
1437
|
}, {
|
|
1438
|
-
value:
|
|
1438
|
+
value: m.seconds,
|
|
1439
1439
|
label: t("countdown.seconds"),
|
|
1440
1440
|
shortLabel: t("countdown.secondsShort"),
|
|
1441
1441
|
show: b()
|
|
1442
|
-
}].filter((
|
|
1443
|
-
}), _ = d(() => l() === "swiss" ?
|
|
1444
|
-
return n(
|
|
1442
|
+
}].filter((h) => h.show);
|
|
1443
|
+
}), _ = d(() => l() === "swiss" ? x().slice(0, 3) : x()), V = d(() => s() ? "ff:opacity-50" : void 0), T = (m) => m.toString().padStart(2, "0");
|
|
1444
|
+
return n(y, {
|
|
1445
1445
|
get when() {
|
|
1446
1446
|
return f();
|
|
1447
1447
|
},
|
|
@@ -1454,53 +1454,53 @@ function ye(e) {
|
|
|
1454
1454
|
return Q(() => !!s())() && a.expiredLabel !== void 0;
|
|
1455
1455
|
},
|
|
1456
1456
|
get children() {
|
|
1457
|
-
var
|
|
1458
|
-
return i(
|
|
1457
|
+
var m = $a();
|
|
1458
|
+
return i(m, () => a.expiredLabel), A(() => M(m, $("ff:text-muted ff:font-heading", a.class, a.className))), m;
|
|
1459
1459
|
}
|
|
1460
1460
|
}), n(J, {
|
|
1461
1461
|
get when() {
|
|
1462
1462
|
return l() === "compact";
|
|
1463
1463
|
},
|
|
1464
1464
|
get children() {
|
|
1465
|
-
var
|
|
1466
|
-
return i(
|
|
1465
|
+
var m = Ca();
|
|
1466
|
+
return i(m, n(st, {
|
|
1467
1467
|
get each() {
|
|
1468
1468
|
return _();
|
|
1469
1469
|
},
|
|
1470
|
-
children: (
|
|
1470
|
+
children: (h, k) => [Q(() => T(h().value)), Q(() => h().shortLabel), n(y, {
|
|
1471
1471
|
get when() {
|
|
1472
1472
|
return k < _().length - 1;
|
|
1473
1473
|
},
|
|
1474
1474
|
children: " "
|
|
1475
1475
|
})]
|
|
1476
|
-
})), A((
|
|
1476
|
+
})), A((h) => {
|
|
1477
1477
|
var k = $("ff:tabular-nums ff:font-heading", V(), a.class, a.className), z = s() || void 0, C = s() ? "off" : "polite";
|
|
1478
|
-
return k !==
|
|
1478
|
+
return k !== h.e && M(m, h.e = k), z !== h.t && H(m, "data-past", h.t = z), C !== h.a && H(m, "aria-live", h.a = C), h;
|
|
1479
1479
|
}, {
|
|
1480
1480
|
e: void 0,
|
|
1481
1481
|
t: void 0,
|
|
1482
1482
|
a: void 0
|
|
1483
|
-
}),
|
|
1483
|
+
}), m;
|
|
1484
1484
|
}
|
|
1485
1485
|
}), n(J, {
|
|
1486
1486
|
get when() {
|
|
1487
1487
|
return l() === "swiss";
|
|
1488
1488
|
},
|
|
1489
1489
|
get children() {
|
|
1490
|
-
var
|
|
1491
|
-
return i(
|
|
1490
|
+
var m = Sa();
|
|
1491
|
+
return i(m, n(st, {
|
|
1492
1492
|
get each() {
|
|
1493
1493
|
return _();
|
|
1494
1494
|
},
|
|
1495
|
-
children: (
|
|
1495
|
+
children: (h, k) => [n(Ma, {
|
|
1496
1496
|
get value() {
|
|
1497
|
-
return
|
|
1497
|
+
return h().value;
|
|
1498
1498
|
},
|
|
1499
1499
|
get label() {
|
|
1500
|
-
return
|
|
1500
|
+
return h().label;
|
|
1501
1501
|
},
|
|
1502
1502
|
styleVariant: r
|
|
1503
|
-
}), n(
|
|
1503
|
+
}), n(y, {
|
|
1504
1504
|
get when() {
|
|
1505
1505
|
return k < _().length - 1;
|
|
1506
1506
|
},
|
|
@@ -1510,16 +1510,16 @@ function ye(e) {
|
|
|
1510
1510
|
});
|
|
1511
1511
|
}
|
|
1512
1512
|
})]
|
|
1513
|
-
})), A((
|
|
1513
|
+
})), A((h) => {
|
|
1514
1514
|
var k = $(Ta({
|
|
1515
1515
|
styleVariant: r()
|
|
1516
1516
|
}), V(), a.class, a.className), z = s() || void 0, C = s() ? "off" : "polite";
|
|
1517
|
-
return k !==
|
|
1517
|
+
return k !== h.e && M(m, h.e = k), z !== h.t && H(m, "data-past", h.t = z), C !== h.a && H(m, "aria-live", h.a = C), h;
|
|
1518
1518
|
}, {
|
|
1519
1519
|
e: void 0,
|
|
1520
1520
|
t: void 0,
|
|
1521
1521
|
a: void 0
|
|
1522
|
-
}),
|
|
1522
|
+
}), m;
|
|
1523
1523
|
}
|
|
1524
1524
|
})];
|
|
1525
1525
|
}
|
|
@@ -1558,7 +1558,7 @@ const Xe = () => typeof window > "u" ? !1 : window.matchMedia("(prefers-reduced-
|
|
|
1558
1558
|
var Ba = /* @__PURE__ */ u("<div data-slot=fade-presence>");
|
|
1559
1559
|
function kt(e) {
|
|
1560
1560
|
const t = d(() => Xe() ? "" : "ff:animate-fade-in");
|
|
1561
|
-
return n(
|
|
1561
|
+
return n(y, {
|
|
1562
1562
|
get when() {
|
|
1563
1563
|
return e.show;
|
|
1564
1564
|
},
|
|
@@ -1624,16 +1624,16 @@ function Qe(e) {
|
|
|
1624
1624
|
fill: "forwards"
|
|
1625
1625
|
});
|
|
1626
1626
|
s = w;
|
|
1627
|
-
const
|
|
1627
|
+
const x = () => {
|
|
1628
1628
|
c.style.height = "", c.style.overflow = "";
|
|
1629
1629
|
};
|
|
1630
|
-
b.finished.then(
|
|
1630
|
+
b.finished.then(x).catch(() => {
|
|
1631
1631
|
}), Se(() => {
|
|
1632
|
-
b.cancel(),
|
|
1632
|
+
b.cancel(), x();
|
|
1633
1633
|
});
|
|
1634
1634
|
}), (() => {
|
|
1635
1635
|
var c = Fa();
|
|
1636
|
-
return ft((v) => o = v, c), i(c, n(
|
|
1636
|
+
return ft((v) => o = v, c), i(c, n(y, {
|
|
1637
1637
|
get when() {
|
|
1638
1638
|
return a();
|
|
1639
1639
|
},
|
|
@@ -1641,8 +1641,8 @@ function Qe(e) {
|
|
|
1641
1641
|
children: (v) => (() => {
|
|
1642
1642
|
var w = Pa();
|
|
1643
1643
|
return ft((b) => f = b, w), i(w, () => e.children), A((b) => {
|
|
1644
|
-
var
|
|
1645
|
-
return
|
|
1644
|
+
var x = v.key, _ = $(l());
|
|
1645
|
+
return x !== b.e && H(w, "data-transition-key", b.e = x), _ !== b.t && M(w, b.t = _), b;
|
|
1646
1646
|
}, {
|
|
1647
1647
|
e: void 0,
|
|
1648
1648
|
t: void 0
|
|
@@ -1696,7 +1696,7 @@ function Dr(e) {
|
|
|
1696
1696
|
function Ar(e) {
|
|
1697
1697
|
const {
|
|
1698
1698
|
t
|
|
1699
|
-
} = fe(), [r, a] = Z(e, ["class", "className", "value", "onValueChange", "onValidChange", "onSubmit", "type", "error", "hasError", "label", "disabled", "placeholder"]), o = d(() => (r.type ?? "auto") === "auto"), [f, s] = D(o() ? Dr(r.value) : r.type), [l, c] = D(!1), [v, w] = D(null), [b,
|
|
1699
|
+
} = fe(), [r, a] = Z(e, ["class", "className", "value", "onValueChange", "onValidChange", "onSubmit", "type", "error", "hasError", "label", "disabled", "placeholder"]), o = d(() => (r.type ?? "auto") === "auto"), [f, s] = D(o() ? Dr(r.value) : r.type), [l, c] = D(!1), [v, w] = D(null), [b, x] = D(!1), [_, V] = D(f() === "phone" ? ht(r.value) : r.value);
|
|
1700
1700
|
te(() => {
|
|
1701
1701
|
o() || s(r.type);
|
|
1702
1702
|
}), te(() => {
|
|
@@ -1704,15 +1704,15 @@ function Ar(e) {
|
|
|
1704
1704
|
});
|
|
1705
1705
|
const T = (R, X) => {
|
|
1706
1706
|
if (!R) {
|
|
1707
|
-
w(null),
|
|
1707
|
+
w(null), x(!1), r.onValidChange?.(!1);
|
|
1708
1708
|
return;
|
|
1709
1709
|
}
|
|
1710
|
-
X === "email" ? at.safeParse(Ga, R).success ? (w(null),
|
|
1710
|
+
X === "email" ? at.safeParse(Ga, R).success ? (w(null), x(!0), r.onValidChange?.(!0)) : (w(t("auth.invalidEmail")), x(!1), r.onValidChange?.(!1)) : Wa(R) ? (w(null), x(!0), r.onValidChange?.(!0)) : (w(t("auth.invalidPhone")), x(!1), r.onValidChange?.(!1));
|
|
1711
1711
|
};
|
|
1712
1712
|
te(() => {
|
|
1713
1713
|
T(r.value, f());
|
|
1714
1714
|
});
|
|
1715
|
-
const
|
|
1715
|
+
const m = (R) => {
|
|
1716
1716
|
const X = R.currentTarget.value;
|
|
1717
1717
|
if (f() === "phone") {
|
|
1718
1718
|
const W = ht(X);
|
|
@@ -1722,13 +1722,13 @@ function Ar(e) {
|
|
|
1722
1722
|
} else
|
|
1723
1723
|
V(X), r.onValueChange(X, f());
|
|
1724
1724
|
typeof a.onInput == "function" && a.onInput(R);
|
|
1725
|
-
},
|
|
1725
|
+
}, h = (R) => {
|
|
1726
1726
|
c(!0), typeof a.onBlur == "function" && a.onBlur(R);
|
|
1727
1727
|
}, k = (R) => {
|
|
1728
1728
|
R.key === "Enter" && r.onSubmit && (R.preventDefault(), r.onSubmit()), typeof a.onKeyDown == "function" && a.onKeyDown(R);
|
|
1729
1729
|
}, z = () => {
|
|
1730
1730
|
const R = f() === "email" ? "phone" : "email";
|
|
1731
|
-
s(R), V(""), w(null), c(!1),
|
|
1731
|
+
s(R), V(""), w(null), c(!1), x(!1), r.onValueChange("", R), r.onValidChange?.(!1);
|
|
1732
1732
|
}, C = d(() => r.error || (l() && !b() ? v() : null)), I = d(() => r.placeholder || (f() === "email" ? t("auth.emailPlaceholder") : t("auth.phonePlaceholder"))), U = () => o() ? n(O, {
|
|
1733
1733
|
type: "button",
|
|
1734
1734
|
variant: "link",
|
|
@@ -1763,8 +1763,8 @@ function Ar(e) {
|
|
|
1763
1763
|
get value() {
|
|
1764
1764
|
return _();
|
|
1765
1765
|
},
|
|
1766
|
-
onInput:
|
|
1767
|
-
onBlur:
|
|
1766
|
+
onInput: m,
|
|
1767
|
+
onBlur: h,
|
|
1768
1768
|
onKeyDown: k,
|
|
1769
1769
|
get placeholder() {
|
|
1770
1770
|
return I();
|
|
@@ -1802,8 +1802,8 @@ function Ar(e) {
|
|
|
1802
1802
|
get value() {
|
|
1803
1803
|
return _();
|
|
1804
1804
|
},
|
|
1805
|
-
onInput:
|
|
1806
|
-
onBlur:
|
|
1805
|
+
onInput: m,
|
|
1806
|
+
onBlur: h,
|
|
1807
1807
|
onKeyDown: k,
|
|
1808
1808
|
get placeholder() {
|
|
1809
1809
|
return I();
|
|
@@ -1872,58 +1872,58 @@ const Qa = de(["ff:h-12 ff:w-full ff:min-w-0 ff:text-center ff:text-lg ff:font-s
|
|
|
1872
1872
|
function Nr(e) {
|
|
1873
1873
|
const t = $e(), r = () => e.length ?? 6, a = () => !!e.hasError || !!e.error, o = () => !!e.error && !e.hasError, f = (e.value ?? "").split("").slice(0, r()), [s, l] = D([...f, ...Array(Math.max(0, r() - f.length)).fill("")]);
|
|
1874
1874
|
let c = [];
|
|
1875
|
-
const v = (
|
|
1876
|
-
|
|
1877
|
-
}, w = (
|
|
1878
|
-
const
|
|
1879
|
-
l([...
|
|
1875
|
+
const v = (m) => {
|
|
1876
|
+
m >= 0 && m < r() && c[m]?.focus();
|
|
1877
|
+
}, w = (m) => {
|
|
1878
|
+
const h = m.split("").slice(0, r());
|
|
1879
|
+
l([...h, ...Array(Math.max(0, r() - h.length)).fill("")]);
|
|
1880
1880
|
};
|
|
1881
1881
|
te(() => {
|
|
1882
1882
|
w(e.value ?? "");
|
|
1883
1883
|
}), en(() => {
|
|
1884
1884
|
e.autoFocus && queueMicrotask(() => v(0));
|
|
1885
1885
|
});
|
|
1886
|
-
const b = (
|
|
1887
|
-
const
|
|
1888
|
-
e.onChange?.(
|
|
1889
|
-
},
|
|
1890
|
-
const k =
|
|
1886
|
+
const b = (m) => {
|
|
1887
|
+
const h = m.join("");
|
|
1888
|
+
e.onChange?.(h), h.length === r() && !h.includes("") && e.onComplete?.(h);
|
|
1889
|
+
}, x = (m, h) => {
|
|
1890
|
+
const k = h.replace(/\D/g, "");
|
|
1891
1891
|
if (k.length > 1) {
|
|
1892
1892
|
const I = k.slice(0, r()).split(""), U = [...I, ...Array(Math.max(0, r() - I.length)).fill("")];
|
|
1893
1893
|
l(U), b(U), U.length === r() && !U.includes("") ? v(r() - 1) : v(I.length);
|
|
1894
1894
|
return;
|
|
1895
1895
|
}
|
|
1896
1896
|
const z = k.slice(-1), C = [...s()];
|
|
1897
|
-
C[
|
|
1898
|
-
}, _ = (
|
|
1899
|
-
switch (
|
|
1897
|
+
C[m] = z, l(C), b(C), z && m < r() - 1 && v(m + 1);
|
|
1898
|
+
}, _ = (m, h) => {
|
|
1899
|
+
switch (h.key) {
|
|
1900
1900
|
case "Backspace":
|
|
1901
|
-
|
|
1901
|
+
h.preventDefault(), s()[m] ? x(m, "") : m > 0 && (v(m - 1), x(m - 1, ""));
|
|
1902
1902
|
break;
|
|
1903
1903
|
case "ArrowLeft":
|
|
1904
|
-
|
|
1904
|
+
h.preventDefault(), v(m - 1);
|
|
1905
1905
|
break;
|
|
1906
1906
|
case "ArrowRight":
|
|
1907
|
-
|
|
1907
|
+
h.preventDefault(), v(m + 1);
|
|
1908
1908
|
break;
|
|
1909
1909
|
case "Delete":
|
|
1910
|
-
|
|
1910
|
+
h.preventDefault(), x(m, "");
|
|
1911
1911
|
break;
|
|
1912
1912
|
}
|
|
1913
|
-
}, V = (
|
|
1914
|
-
|
|
1915
|
-
const
|
|
1916
|
-
if (!
|
|
1917
|
-
const k =
|
|
1913
|
+
}, V = (m) => {
|
|
1914
|
+
m.preventDefault();
|
|
1915
|
+
const h = m.clipboardData;
|
|
1916
|
+
if (!h) return;
|
|
1917
|
+
const k = h.getData("text").replace(/\D/g, "").slice(0, r());
|
|
1918
1918
|
if (!k) return;
|
|
1919
1919
|
const z = k.split(""), C = [...z, ...Array(Math.max(0, r() - z.length)).fill("")];
|
|
1920
1920
|
l(C), b(C), C.length === r() && !C.includes("") ? v(r() - 1) : v(z.length);
|
|
1921
|
-
}, T = (
|
|
1922
|
-
|
|
1921
|
+
}, T = (m) => {
|
|
1922
|
+
m.currentTarget.select();
|
|
1923
1923
|
};
|
|
1924
1924
|
return (() => {
|
|
1925
|
-
var
|
|
1926
|
-
return
|
|
1925
|
+
var m = Za(), h = m.firstChild;
|
|
1926
|
+
return h.addEventListener("paste", V), i(h, n(At, {
|
|
1927
1927
|
get each() {
|
|
1928
1928
|
return Array.from({
|
|
1929
1929
|
length: r()
|
|
@@ -1931,7 +1931,7 @@ function Nr(e) {
|
|
|
1931
1931
|
},
|
|
1932
1932
|
children: (k, z) => (() => {
|
|
1933
1933
|
var C = Ya();
|
|
1934
|
-
return C.addEventListener("focus", T), C.$$keydown = (I) => _(z(), I), C.$$input = (I) =>
|
|
1934
|
+
return C.addEventListener("focus", T), C.$$keydown = (I) => _(z(), I), C.$$input = (I) => x(z(), I.currentTarget.value), ft((I) => {
|
|
1935
1935
|
c[z()] = I;
|
|
1936
1936
|
}, C), A((I) => {
|
|
1937
1937
|
var U = z() === 0 ? "one-time-code" : "off", R = e.disabled, X = `Digit ${z() + 1} of ${r()}`, W = a() || void 0, le = Qa({
|
|
@@ -1947,7 +1947,7 @@ function Nr(e) {
|
|
|
1947
1947
|
i: void 0
|
|
1948
1948
|
}), A(() => C.value = s()[z()]), C;
|
|
1949
1949
|
})()
|
|
1950
|
-
})), i(
|
|
1950
|
+
})), i(m, n(y, {
|
|
1951
1951
|
get when() {
|
|
1952
1952
|
return o();
|
|
1953
1953
|
},
|
|
@@ -1957,12 +1957,12 @@ function Nr(e) {
|
|
|
1957
1957
|
}
|
|
1958
1958
|
}), null), A((k) => {
|
|
1959
1959
|
var z = $("fanfare-otp-input", "ff:space-y-1.5", e.class, e.className), C = a() || void 0, I = `repeat(${r()}, minmax(0, 1fr))`;
|
|
1960
|
-
return z !== k.e && M(
|
|
1960
|
+
return z !== k.e && M(m, k.e = z), C !== k.t && H(m, "data-error", k.t = C), I !== k.a && bt(h, "grid-template-columns", k.a = I), k;
|
|
1961
1961
|
}, {
|
|
1962
1962
|
e: void 0,
|
|
1963
1963
|
t: void 0,
|
|
1964
1964
|
a: void 0
|
|
1965
|
-
}),
|
|
1965
|
+
}), m;
|
|
1966
1966
|
})();
|
|
1967
1967
|
}
|
|
1968
1968
|
Nr.displayName = "OTPInput";
|
|
@@ -1976,7 +1976,7 @@ function fo(e) {
|
|
|
1976
1976
|
function Tr(e) {
|
|
1977
1977
|
const {
|
|
1978
1978
|
t
|
|
1979
|
-
} = fe(), r = () => e.label ?? t("auth.badgeLabel"), a = () => e.variant ?? "default", o = () => e.title ?? t("auth.title"), f = () => e.description ?? t("auth.description"), s = () => e.submitLabel ?? t("auth.submit"), l = () => e.verifyLabel ?? t("auth.verify"), c = e.defaultStep ?? "credential", v = e.defaultCredential ?? "", [w, b] = D(c), [
|
|
1979
|
+
} = fe(), r = () => e.label ?? t("auth.badgeLabel"), a = () => e.variant ?? "default", o = () => e.title ?? t("auth.title"), f = () => e.description ?? t("auth.description"), s = () => e.submitLabel ?? t("auth.submit"), l = () => e.verifyLabel ?? t("auth.verify"), c = e.defaultStep ?? "credential", v = e.defaultCredential ?? "", [w, b] = D(c), [x, _] = D(v), [V, T] = D(e.defaultCredentialType ?? Dr(v)), [m, h] = D(!1), [k, z] = D(""), [C, I] = D(!1), [U, R] = D(e.defaultError ?? null), [X, W] = D(c === "verify" && v.length > 0 ? Date.now() + mt : null), [le, _e] = D(Date.now()), [L, P] = D(!1), [q, K] = D(!1), Ee = d(() => V() === "email" ? t("auth.email") : t("auth.phone"));
|
|
1980
1980
|
te(xt(w, (F) => {
|
|
1981
1981
|
if (F !== "verify") return;
|
|
1982
1982
|
const B = setInterval(() => _e(Date.now()), 1e3);
|
|
@@ -1992,10 +1992,10 @@ function Tr(e) {
|
|
|
1992
1992
|
}), ke = d(() => Ve() > 0), qe = (F, B) => {
|
|
1993
1993
|
_(F), T(B), R(null);
|
|
1994
1994
|
}, N = async (F) => {
|
|
1995
|
-
if (F?.preventDefault(), !(!
|
|
1995
|
+
if (F?.preventDefault(), !(!m() || !x())) {
|
|
1996
1996
|
I(!0), R(null);
|
|
1997
1997
|
try {
|
|
1998
|
-
await e.onSubmit?.(
|
|
1998
|
+
await e.onSubmit?.(x(), V()), b("verify"), W(Date.now() + mt);
|
|
1999
1999
|
} catch (B) {
|
|
2000
2000
|
R(B instanceof Error ? B.message : t("auth.sendFailed"));
|
|
2001
2001
|
} finally {
|
|
@@ -2020,10 +2020,10 @@ function Tr(e) {
|
|
|
2020
2020
|
}, ue = () => {
|
|
2021
2021
|
b("credential"), z(""), R(null), W(null), P(!1);
|
|
2022
2022
|
}, ve = async () => {
|
|
2023
|
-
if (!(!
|
|
2023
|
+
if (!(!x() || q())) {
|
|
2024
2024
|
K(!0), R(null), z("");
|
|
2025
2025
|
try {
|
|
2026
|
-
await e.onSubmit?.(
|
|
2026
|
+
await e.onSubmit?.(x(), V()), W(Date.now() + mt), _e(Date.now()), P(!0);
|
|
2027
2027
|
} catch (F) {
|
|
2028
2028
|
R(F instanceof Error ? F.message : t("auth.sendFailed"));
|
|
2029
2029
|
} finally {
|
|
@@ -2044,7 +2044,7 @@ function Tr(e) {
|
|
|
2044
2044
|
var F = Xa(), B = F.firstChild, ce = B.nextSibling;
|
|
2045
2045
|
return i(ce, () => t("auth.success")), A(() => M(B, $("ff:flex ff:h-12 ff:w-12 ff:items-center ff:justify-center ff:rounded-full", "ff:bg-success/10 ff:text-success"))), F;
|
|
2046
2046
|
}
|
|
2047
|
-
}), n(
|
|
2047
|
+
}), n(y, {
|
|
2048
2048
|
get when() {
|
|
2049
2049
|
return Y();
|
|
2050
2050
|
},
|
|
@@ -2075,7 +2075,7 @@ function Tr(e) {
|
|
|
2075
2075
|
}
|
|
2076
2076
|
}), n(re, {
|
|
2077
2077
|
get children() {
|
|
2078
|
-
return [n(
|
|
2078
|
+
return [n(y, {
|
|
2079
2079
|
get when() {
|
|
2080
2080
|
return e.countdownTo;
|
|
2081
2081
|
},
|
|
@@ -2096,7 +2096,7 @@ function Tr(e) {
|
|
|
2096
2096
|
},
|
|
2097
2097
|
mode: "fade",
|
|
2098
2098
|
get children() {
|
|
2099
|
-
return n(
|
|
2099
|
+
return n(y, {
|
|
2100
2100
|
get when() {
|
|
2101
2101
|
return w() === "credential";
|
|
2102
2102
|
},
|
|
@@ -2104,9 +2104,9 @@ function Tr(e) {
|
|
|
2104
2104
|
return [(() => {
|
|
2105
2105
|
var B = tr();
|
|
2106
2106
|
return i(B, Ne), B;
|
|
2107
|
-
})(), n(
|
|
2107
|
+
})(), n(y, {
|
|
2108
2108
|
get when() {
|
|
2109
|
-
return
|
|
2109
|
+
return x();
|
|
2110
2110
|
},
|
|
2111
2111
|
get fallback() {
|
|
2112
2112
|
return (() => {
|
|
@@ -2120,7 +2120,7 @@ function Tr(e) {
|
|
|
2120
2120
|
},
|
|
2121
2121
|
get children() {
|
|
2122
2122
|
var B = no(), ce = B.firstChild, Ce = ce.nextSibling;
|
|
2123
|
-
return Ce.nextSibling, i(B, () => t("auth.sentTo"), ce), i(Ce,
|
|
2123
|
+
return Ce.nextSibling, i(B, () => t("auth.sentTo"), ce), i(Ce, x), i(B, n(O, {
|
|
2124
2124
|
type: "button",
|
|
2125
2125
|
variant: "link",
|
|
2126
2126
|
size: "xs",
|
|
@@ -2154,7 +2154,7 @@ function Tr(e) {
|
|
|
2154
2154
|
return w();
|
|
2155
2155
|
},
|
|
2156
2156
|
get children() {
|
|
2157
|
-
return n(
|
|
2157
|
+
return n(y, {
|
|
2158
2158
|
get when() {
|
|
2159
2159
|
return w() === "credential";
|
|
2160
2160
|
},
|
|
@@ -2179,10 +2179,10 @@ function Tr(e) {
|
|
|
2179
2179
|
get children() {
|
|
2180
2180
|
return n(Ar, {
|
|
2181
2181
|
get value() {
|
|
2182
|
-
return
|
|
2182
|
+
return x();
|
|
2183
2183
|
},
|
|
2184
2184
|
onValueChange: qe,
|
|
2185
|
-
onValidChange:
|
|
2185
|
+
onValidChange: h,
|
|
2186
2186
|
onSubmit: () => {
|
|
2187
2187
|
N();
|
|
2188
2188
|
},
|
|
@@ -2209,14 +2209,14 @@ function Tr(e) {
|
|
|
2209
2209
|
mode: "fade",
|
|
2210
2210
|
layout: !1,
|
|
2211
2211
|
get children() {
|
|
2212
|
-
return n(
|
|
2212
|
+
return n(y, {
|
|
2213
2213
|
get when() {
|
|
2214
2214
|
return L();
|
|
2215
2215
|
},
|
|
2216
2216
|
get fallback() {
|
|
2217
2217
|
return (() => {
|
|
2218
2218
|
var ce = oo(), Ce = ce.firstChild;
|
|
2219
|
-
return i(Ce, () => t("auth.didntGetIt")), i(ce, n(
|
|
2219
|
+
return i(Ce, () => t("auth.didntGetIt")), i(ce, n(y, {
|
|
2220
2220
|
get when() {
|
|
2221
2221
|
return ke();
|
|
2222
2222
|
},
|
|
@@ -2229,7 +2229,7 @@ function Tr(e) {
|
|
|
2229
2229
|
ve();
|
|
2230
2230
|
},
|
|
2231
2231
|
get disabled() {
|
|
2232
|
-
return q() || !
|
|
2232
|
+
return q() || !x();
|
|
2233
2233
|
},
|
|
2234
2234
|
get children() {
|
|
2235
2235
|
return t("auth.resendCode");
|
|
@@ -2271,10 +2271,10 @@ function Tr(e) {
|
|
|
2271
2271
|
type: "submit",
|
|
2272
2272
|
class: "ff:w-full",
|
|
2273
2273
|
get disabled() {
|
|
2274
|
-
return C() || q() || (w() === "credential" ? !
|
|
2274
|
+
return C() || q() || (w() === "credential" ? !m() : k().length < 6);
|
|
2275
2275
|
},
|
|
2276
2276
|
get children() {
|
|
2277
|
-
return n(
|
|
2277
|
+
return n(y, {
|
|
2278
2278
|
get when() {
|
|
2279
2279
|
return C();
|
|
2280
2280
|
},
|
|
@@ -2288,7 +2288,7 @@ function Tr(e) {
|
|
|
2288
2288
|
}
|
|
2289
2289
|
});
|
|
2290
2290
|
}
|
|
2291
|
-
}), null), i(B, n(
|
|
2291
|
+
}), null), i(B, n(y, {
|
|
2292
2292
|
get when() {
|
|
2293
2293
|
return Q(() => !!e.allowSkip)() && w() === "credential";
|
|
2294
2294
|
},
|
|
@@ -2311,7 +2311,7 @@ function Tr(e) {
|
|
|
2311
2311
|
}), null), F;
|
|
2312
2312
|
})()];
|
|
2313
2313
|
}
|
|
2314
|
-
}), n(
|
|
2314
|
+
}), n(y, {
|
|
2315
2315
|
get when() {
|
|
2316
2316
|
return Y();
|
|
2317
2317
|
},
|
|
@@ -2355,13 +2355,13 @@ var co = /* @__PURE__ */ u('<div data-slot=access-code-form-heading><h2 class="f
|
|
|
2355
2355
|
function Lr(e) {
|
|
2356
2356
|
const {
|
|
2357
2357
|
t
|
|
2358
|
-
} = fe(), [r] = Z(e, ["onSubmit", "onSkip", "variant", "label", "title", "description", "countdownTo", "submitLabel", "allowSkip", "autoUppercase", "defaultError", "class", "className"]), a = d(() => r.label ?? t("accessCode.badgeLabel")), o = d(() => r.variant ?? "secondary"), f = d(() => r.title ?? t("accessCode.title")), s = d(() => r.description ?? t("accessCode.description")), l = d(() => r.submitLabel ?? t("accessCode.submit")), [c, v] = D(""), [w, b] = D(!1), [
|
|
2359
|
-
if (
|
|
2358
|
+
} = fe(), [r] = Z(e, ["onSubmit", "onSkip", "variant", "label", "title", "description", "countdownTo", "submitLabel", "allowSkip", "autoUppercase", "defaultError", "class", "className"]), a = d(() => r.label ?? t("accessCode.badgeLabel")), o = d(() => r.variant ?? "secondary"), f = d(() => r.title ?? t("accessCode.title")), s = d(() => r.description ?? t("accessCode.description")), l = d(() => r.submitLabel ?? t("accessCode.submit")), [c, v] = D(""), [w, b] = D(!1), [x, _] = D(r.defaultError ?? null), V = d(() => !!c().trim() && !w()), T = async (m) => {
|
|
2359
|
+
if (m?.preventDefault(), !!c().trim()) {
|
|
2360
2360
|
b(!0), _(null);
|
|
2361
2361
|
try {
|
|
2362
2362
|
await r.onSubmit?.(c().trim());
|
|
2363
|
-
} catch (
|
|
2364
|
-
_(
|
|
2363
|
+
} catch (h) {
|
|
2364
|
+
_(h instanceof Error ? h.message : t("accessCode.invalid"));
|
|
2365
2365
|
} finally {
|
|
2366
2366
|
b(!1);
|
|
2367
2367
|
}
|
|
@@ -2382,27 +2382,27 @@ function Lr(e) {
|
|
|
2382
2382
|
}
|
|
2383
2383
|
}), n(re, {
|
|
2384
2384
|
get children() {
|
|
2385
|
-
return [n(
|
|
2385
|
+
return [n(y, {
|
|
2386
2386
|
get when() {
|
|
2387
2387
|
return r.countdownTo;
|
|
2388
2388
|
},
|
|
2389
|
-
children: (
|
|
2390
|
-
var
|
|
2391
|
-
return i(k, () => t("time.opensIn")), i(
|
|
2389
|
+
children: (m) => (() => {
|
|
2390
|
+
var h = go(), k = h.firstChild;
|
|
2391
|
+
return i(k, () => t("time.opensIn")), i(h, n(ye, {
|
|
2392
2392
|
get targetDate() {
|
|
2393
|
-
return
|
|
2393
|
+
return m();
|
|
2394
2394
|
},
|
|
2395
2395
|
showDays: !1
|
|
2396
|
-
}), null),
|
|
2396
|
+
}), null), h;
|
|
2397
2397
|
})()
|
|
2398
2398
|
}), (() => {
|
|
2399
|
-
var
|
|
2400
|
-
return i(
|
|
2399
|
+
var m = co(), h = m.firstChild, k = h.nextSibling;
|
|
2400
|
+
return i(h, f), i(k, s), m;
|
|
2401
2401
|
})(), (() => {
|
|
2402
|
-
var
|
|
2403
|
-
return
|
|
2402
|
+
var m = uo(), h = m.firstChild;
|
|
2403
|
+
return m.addEventListener("submit", (k) => {
|
|
2404
2404
|
T(k);
|
|
2405
|
-
}), i(
|
|
2405
|
+
}), i(m, n($r, {
|
|
2406
2406
|
get value() {
|
|
2407
2407
|
return c();
|
|
2408
2408
|
},
|
|
@@ -2413,7 +2413,7 @@ function Lr(e) {
|
|
|
2413
2413
|
T();
|
|
2414
2414
|
},
|
|
2415
2415
|
get hasError() {
|
|
2416
|
-
return !!
|
|
2416
|
+
return !!x();
|
|
2417
2417
|
},
|
|
2418
2418
|
get autoUppercase() {
|
|
2419
2419
|
return r.autoUppercase ?? !0;
|
|
@@ -2422,9 +2422,9 @@ function Lr(e) {
|
|
|
2422
2422
|
get disabled() {
|
|
2423
2423
|
return w();
|
|
2424
2424
|
}
|
|
2425
|
-
}),
|
|
2425
|
+
}), h), i(m, n(y, {
|
|
2426
2426
|
get when() {
|
|
2427
|
-
return
|
|
2427
|
+
return x();
|
|
2428
2428
|
},
|
|
2429
2429
|
children: (k) => n(De, {
|
|
2430
2430
|
tone: "danger",
|
|
@@ -2432,7 +2432,7 @@ function Lr(e) {
|
|
|
2432
2432
|
return k();
|
|
2433
2433
|
}
|
|
2434
2434
|
})
|
|
2435
|
-
}),
|
|
2435
|
+
}), h), i(h, n(O, {
|
|
2436
2436
|
type: "submit",
|
|
2437
2437
|
class: "ff:w-full",
|
|
2438
2438
|
get disabled() {
|
|
@@ -2443,7 +2443,7 @@ function Lr(e) {
|
|
|
2443
2443
|
size: "sm"
|
|
2444
2444
|
}) : l();
|
|
2445
2445
|
}
|
|
2446
|
-
}), null), i(
|
|
2446
|
+
}), null), i(h, (() => {
|
|
2447
2447
|
var k = Q(() => !!r.allowSkip);
|
|
2448
2448
|
return () => k() && n(O, {
|
|
2449
2449
|
type: "button",
|
|
@@ -2459,7 +2459,7 @@ function Lr(e) {
|
|
|
2459
2459
|
return t("common.skip");
|
|
2460
2460
|
}
|
|
2461
2461
|
});
|
|
2462
|
-
})(), null),
|
|
2462
|
+
})(), null), m;
|
|
2463
2463
|
})()];
|
|
2464
2464
|
}
|
|
2465
2465
|
}), n(ee, {})];
|
|
@@ -2498,7 +2498,7 @@ function Mr(e) {
|
|
|
2498
2498
|
const {
|
|
2499
2499
|
t,
|
|
2500
2500
|
locale: r
|
|
2501
|
-
} = fe(), [a] = Z(e, ["challenge", "botMitigation", "onVerifyToken", "onRetry", "variant", "label", "title", "description", "countdownTo", "retryLabel", "class", "className"]), [o, f] = D(0), [s, l] = D(!1), [c, v] = D(!1), [w, b] = D(null), [
|
|
2501
|
+
} = fe(), [a] = Z(e, ["challenge", "botMitigation", "onVerifyToken", "onRetry", "variant", "label", "title", "description", "countdownTo", "retryLabel", "class", "className"]), [o, f] = D(0), [s, l] = D(!1), [c, v] = D(!1), [w, b] = D(null), [x, _] = D(!1), [V, T] = D("reload"), [m, h] = D(Date.now()), k = d(() => {
|
|
2502
2502
|
const L = a.challenge?.iframeUrl;
|
|
2503
2503
|
if (!L) return null;
|
|
2504
2504
|
try {
|
|
@@ -2518,17 +2518,17 @@ function Mr(e) {
|
|
|
2518
2518
|
});
|
|
2519
2519
|
te(() => {
|
|
2520
2520
|
const L = a.botMitigation?.blockedUntil, P = Date.now();
|
|
2521
|
-
if (
|
|
2521
|
+
if (h(P), !L) return;
|
|
2522
2522
|
const q = Date.parse(L);
|
|
2523
2523
|
if (!Number.isFinite(q) || q <= P) return;
|
|
2524
|
-
const K = window.setTimeout(() =>
|
|
2524
|
+
const K = window.setTimeout(() => h(Date.now()), Math.min(q - P + 1, 2147483647));
|
|
2525
2525
|
Se(() => window.clearTimeout(K));
|
|
2526
2526
|
});
|
|
2527
|
-
const C = d(() => xo(a.botMitigation,
|
|
2527
|
+
const C = d(() => xo(a.botMitigation, m())), I = d(() => typeof a.botMitigation?.attemptsRemaining == "number" ? a.botMitigation.attemptsRemaining : void 0);
|
|
2528
2528
|
te(xt(() => a.challenge?.id, () => {
|
|
2529
2529
|
f(0), l(!1), v(!1), b(null), _(!1), T("reload");
|
|
2530
2530
|
})), te(() => {
|
|
2531
|
-
|
|
2531
|
+
x() && a.botMitigation?.message && b(a.botMitigation.message);
|
|
2532
2532
|
}), te(() => {
|
|
2533
2533
|
const L = a.challenge?.id, P = k();
|
|
2534
2534
|
if (!L || !P) return;
|
|
@@ -2583,7 +2583,7 @@ function Mr(e) {
|
|
|
2583
2583
|
}
|
|
2584
2584
|
}), n(re, {
|
|
2585
2585
|
get children() {
|
|
2586
|
-
return [n(
|
|
2586
|
+
return [n(y, {
|
|
2587
2587
|
get when() {
|
|
2588
2588
|
return a.countdownTo;
|
|
2589
2589
|
},
|
|
@@ -2599,12 +2599,12 @@ function Mr(e) {
|
|
|
2599
2599
|
}), (() => {
|
|
2600
2600
|
var L = ho(), P = L.firstChild, q = P.nextSibling;
|
|
2601
2601
|
return i(P, U), i(q, R), L;
|
|
2602
|
-
})(), n(
|
|
2602
|
+
})(), n(y, {
|
|
2603
2603
|
get when() {
|
|
2604
2604
|
return C().blocked;
|
|
2605
2605
|
},
|
|
2606
2606
|
get fallback() {
|
|
2607
|
-
return n(
|
|
2607
|
+
return n(y, {
|
|
2608
2608
|
get when() {
|
|
2609
2609
|
return !!z();
|
|
2610
2610
|
},
|
|
@@ -2618,7 +2618,7 @@ function Mr(e) {
|
|
|
2618
2618
|
},
|
|
2619
2619
|
get children() {
|
|
2620
2620
|
var L = wo(), P = L.firstChild;
|
|
2621
|
-
return i(L, n(
|
|
2621
|
+
return i(L, n(y, {
|
|
2622
2622
|
get when() {
|
|
2623
2623
|
return !s();
|
|
2624
2624
|
},
|
|
@@ -2628,7 +2628,7 @@ function Mr(e) {
|
|
|
2628
2628
|
size: "lg"
|
|
2629
2629
|
})), q;
|
|
2630
2630
|
}
|
|
2631
|
-
}), P), i(L, n(
|
|
2631
|
+
}), P), i(L, n(y, {
|
|
2632
2632
|
get when() {
|
|
2633
2633
|
return c();
|
|
2634
2634
|
},
|
|
@@ -2663,7 +2663,7 @@ function Mr(e) {
|
|
|
2663
2663
|
}
|
|
2664
2664
|
});
|
|
2665
2665
|
}
|
|
2666
|
-
}), n(
|
|
2666
|
+
}), n(y, {
|
|
2667
2667
|
get when() {
|
|
2668
2668
|
return w();
|
|
2669
2669
|
},
|
|
@@ -2680,7 +2680,7 @@ function Mr(e) {
|
|
|
2680
2680
|
}) : void 0;
|
|
2681
2681
|
}
|
|
2682
2682
|
})
|
|
2683
|
-
}), n(
|
|
2683
|
+
}), n(y, {
|
|
2684
2684
|
get when() {
|
|
2685
2685
|
return !C().blocked;
|
|
2686
2686
|
},
|
|
@@ -2735,7 +2735,7 @@ function Rr(e) {
|
|
|
2735
2735
|
return [(() => {
|
|
2736
2736
|
var l = ko();
|
|
2737
2737
|
return i(l, o), l;
|
|
2738
|
-
})(), n(
|
|
2738
|
+
})(), n(y, {
|
|
2739
2739
|
get when() {
|
|
2740
2740
|
return f();
|
|
2741
2741
|
},
|
|
@@ -2749,7 +2749,7 @@ function Rr(e) {
|
|
|
2749
2749
|
})()
|
|
2750
2750
|
})];
|
|
2751
2751
|
}
|
|
2752
|
-
}), n(
|
|
2752
|
+
}), n(y, {
|
|
2753
2753
|
get when() {
|
|
2754
2754
|
return Q(() => !!e.ctaLabel)() && e.onCtaClick;
|
|
2755
2755
|
},
|
|
@@ -2777,7 +2777,7 @@ var Co = /* @__PURE__ */ u("<div>");
|
|
|
2777
2777
|
function Ge(e) {
|
|
2778
2778
|
const {
|
|
2779
2779
|
t
|
|
2780
|
-
} = fe(), r = $e(), [a] = Z(e, ["error", "onRetry", "title", "label", "info", "ctaLabel", "class", "className"]), [o, f] = D(!1), s = d(() => a.error instanceof Error ? a.error.message : a.error), l = d(() => a.label ?? t("error.label")), c = d(() => a.title ?? t("error.title")), v = d(() => s() ?? t("error.description")), w = d(() => a.ctaLabel ?? t("error.retry")), b = d(() => Vr(r())),
|
|
2780
|
+
} = fe(), r = $e(), [a] = Z(e, ["error", "onRetry", "title", "label", "info", "ctaLabel", "class", "className"]), [o, f] = D(!1), s = d(() => a.error instanceof Error ? a.error.message : a.error), l = d(() => a.label ?? t("error.label")), c = d(() => a.title ?? t("error.title")), v = d(() => s() ?? t("error.description")), w = d(() => a.ctaLabel ?? t("error.retry")), b = d(() => Vr(r())), x = async () => {
|
|
2781
2781
|
if (a.onRetry) {
|
|
2782
2782
|
f(!0);
|
|
2783
2783
|
try {
|
|
@@ -2811,7 +2811,7 @@ function Ge(e) {
|
|
|
2811
2811
|
get description() {
|
|
2812
2812
|
return v();
|
|
2813
2813
|
}
|
|
2814
|
-
}), n(
|
|
2814
|
+
}), n(y, {
|
|
2815
2815
|
get when() {
|
|
2816
2816
|
return a.info;
|
|
2817
2817
|
},
|
|
@@ -2822,7 +2822,7 @@ function Ge(e) {
|
|
|
2822
2822
|
}
|
|
2823
2823
|
});
|
|
2824
2824
|
}
|
|
2825
|
-
}), n(
|
|
2825
|
+
}), n(y, {
|
|
2826
2826
|
get when() {
|
|
2827
2827
|
return a.onRetry;
|
|
2828
2828
|
},
|
|
@@ -2830,7 +2830,7 @@ function Ge(e) {
|
|
|
2830
2830
|
return n(O, {
|
|
2831
2831
|
class: "ff:mt-auto",
|
|
2832
2832
|
onClick: () => {
|
|
2833
|
-
|
|
2833
|
+
x();
|
|
2834
2834
|
},
|
|
2835
2835
|
get loading() {
|
|
2836
2836
|
return o();
|
|
@@ -2926,7 +2926,7 @@ function et(e) {
|
|
|
2926
2926
|
get children() {
|
|
2927
2927
|
return [(() => {
|
|
2928
2928
|
var f = Do();
|
|
2929
|
-
return ft(a, f), i(f, n(
|
|
2929
|
+
return ft(a, f), i(f, n(y, {
|
|
2930
2930
|
get when() {
|
|
2931
2931
|
return e.expiresAt;
|
|
2932
2932
|
},
|
|
@@ -3123,7 +3123,7 @@ function je(e) {
|
|
|
3123
3123
|
var l = Lo();
|
|
3124
3124
|
return i(l, () => t(a().body)), l;
|
|
3125
3125
|
}
|
|
3126
|
-
}), n(
|
|
3126
|
+
}), n(y, {
|
|
3127
3127
|
get when() {
|
|
3128
3128
|
return o();
|
|
3129
3129
|
},
|
|
@@ -3234,7 +3234,7 @@ function qr(e) {
|
|
|
3234
3234
|
}
|
|
3235
3235
|
}), n(re, {
|
|
3236
3236
|
get children() {
|
|
3237
|
-
return [n(
|
|
3237
|
+
return [n(y, {
|
|
3238
3238
|
get when() {
|
|
3239
3239
|
return e.countdownTo;
|
|
3240
3240
|
},
|
|
@@ -3247,7 +3247,7 @@ function qr(e) {
|
|
|
3247
3247
|
showDays: !1
|
|
3248
3248
|
}), null), o;
|
|
3249
3249
|
})()
|
|
3250
|
-
}), n(
|
|
3250
|
+
}), n(y, {
|
|
3251
3251
|
get when() {
|
|
3252
3252
|
return e.info;
|
|
3253
3253
|
},
|
|
@@ -3303,7 +3303,7 @@ function Br(e) {
|
|
|
3303
3303
|
}
|
|
3304
3304
|
}), n(re, {
|
|
3305
3305
|
get children() {
|
|
3306
|
-
return [n(
|
|
3306
|
+
return [n(y, {
|
|
3307
3307
|
get when() {
|
|
3308
3308
|
return s();
|
|
3309
3309
|
},
|
|
@@ -3325,7 +3325,7 @@ function Br(e) {
|
|
|
3325
3325
|
})];
|
|
3326
3326
|
}
|
|
3327
3327
|
})
|
|
3328
|
-
}), n(
|
|
3328
|
+
}), n(y, {
|
|
3329
3329
|
get when() {
|
|
3330
3330
|
return r.onLeave;
|
|
3331
3331
|
},
|
|
@@ -3426,8 +3426,8 @@ function Xo(e) {
|
|
|
3426
3426
|
return o.$$click = () => {
|
|
3427
3427
|
r.isClosed || e.onSelect(r.date);
|
|
3428
3428
|
}, i(f, () => r.weekdayLabel), i(s, () => r.dayNumber), A((c) => {
|
|
3429
|
-
var v = a(), w = r.isClosed, b = r.isClosed,
|
|
3430
|
-
return v !== c.e && H(o, "aria-selected", c.e = v), w !== c.t && H(o, "aria-disabled", c.t = w), b !== c.a && (o.disabled = c.a = b),
|
|
3429
|
+
var v = a(), w = r.isClosed, b = r.isClosed, x = $("ff:flex ff:shrink-0 ff:flex-col ff:items-center ff:rounded ff:px-2 ff:py-1 ff:transition-colors", a() ? "ff:bg-primary ff:text-primary-foreground" : r.isClosed ? "ff:cursor-not-allowed ff:bg-transparent ff:opacity-40" : "ff:bg-transparent ff:text-foreground ff:hover:bg-secondary"), _ = $("ff:mt-0.5 ff:size-1 ff:rounded-full", r.hasAvailability ? a() ? "ff:bg-primary-foreground" : "ff:bg-success" : "ff:bg-transparent");
|
|
3430
|
+
return v !== c.e && H(o, "aria-selected", c.e = v), w !== c.t && H(o, "aria-disabled", c.t = w), b !== c.a && (o.disabled = c.a = b), x !== c.o && M(o, c.o = x), _ !== c.i && M(l, c.i = _), c;
|
|
3431
3431
|
}, {
|
|
3432
3432
|
e: void 0,
|
|
3433
3433
|
t: void 0,
|
|
@@ -3464,7 +3464,7 @@ function ii(e) {
|
|
|
3464
3464
|
const {
|
|
3465
3465
|
t
|
|
3466
3466
|
} = fe();
|
|
3467
|
-
return n(
|
|
3467
|
+
return n(y, {
|
|
3468
3468
|
get when() {
|
|
3469
3469
|
return !e.isLoading;
|
|
3470
3470
|
},
|
|
@@ -3484,7 +3484,7 @@ function ii(e) {
|
|
|
3484
3484
|
})();
|
|
3485
3485
|
},
|
|
3486
3486
|
get children() {
|
|
3487
|
-
return n(
|
|
3487
|
+
return n(y, {
|
|
3488
3488
|
get when() {
|
|
3489
3489
|
return e.slots.length > 0;
|
|
3490
3490
|
},
|
|
@@ -3567,14 +3567,14 @@ function wi(e, t) {
|
|
|
3567
3567
|
function $t(e) {
|
|
3568
3568
|
const t = ct(), {
|
|
3569
3569
|
t: r
|
|
3570
|
-
} = fe(), a = ze(() => e.display$ ?? hi), [o, f] = D([]), [s, l] = D(!1), [c, v] = D(null), [w, b] = D(null), [
|
|
3570
|
+
} = fe(), a = ze(() => e.display$ ?? hi), [o, f] = D([]), [s, l] = D(!1), [c, v] = D(null), [w, b] = D(null), [x, _] = D(!1), V = d(() => o().filter((N) => N.available > 0)), T = d(() => V().find((N) => N.id === w()) ?? null), m = d(() => {
|
|
3571
3571
|
const N = T();
|
|
3572
3572
|
return N ? r("appointment.continueWithTime", {
|
|
3573
3573
|
values: {
|
|
3574
3574
|
time: Fr(N)
|
|
3575
3575
|
}
|
|
3576
3576
|
}) : r("appointment.selectATime");
|
|
3577
|
-
}),
|
|
3577
|
+
}), h = d(() => {
|
|
3578
3578
|
const N = /* @__PURE__ */ new Map();
|
|
3579
3579
|
for (const G of o()) {
|
|
3580
3580
|
const me = G.startTime ? vt(new Date(G.startTime), G.timezone ?? e.timezone) : G.id.slice(0, 10), ue = N.get(me);
|
|
@@ -3585,7 +3585,7 @@ function $t(e) {
|
|
|
3585
3585
|
const N = Date.now(), G = e.bookingWindowOpenAt ? new Date(e.bookingWindowOpenAt).getTime() : N;
|
|
3586
3586
|
return vt(new Date(Math.max(N, G)), e.timezone);
|
|
3587
3587
|
}), z = d(() => e.bookingWindowCloseAt ? vt(new Date(e.bookingWindowCloseAt), e.timezone) : void 0), C = d(() => {
|
|
3588
|
-
const N = k(), G = z(), me =
|
|
3588
|
+
const N = k(), G = z(), me = h(), ue = s(), ve = [];
|
|
3589
3589
|
for (let Y = 0; Y < mi; Y += 1) {
|
|
3590
3590
|
const be = Go(N, Y);
|
|
3591
3591
|
if (G && be > G) break;
|
|
@@ -3608,14 +3608,14 @@ function $t(e) {
|
|
|
3608
3608
|
});
|
|
3609
3609
|
const R = d(() => {
|
|
3610
3610
|
const N = I();
|
|
3611
|
-
return N ?
|
|
3611
|
+
return N ? h().get(N) ?? [] : [];
|
|
3612
3612
|
}), X = (N) => {
|
|
3613
3613
|
U(N), b(null);
|
|
3614
3614
|
}, W = (N) => {
|
|
3615
3615
|
b((G) => G === N ? null : N);
|
|
3616
3616
|
}, le = () => $("ff:w-full ff:max-w-sm", e.class, e.className);
|
|
3617
3617
|
te(() => {
|
|
3618
|
-
if (e.sequencePhase !== "enterable" && !
|
|
3618
|
+
if (e.sequencePhase !== "enterable" && !x()) return;
|
|
3619
3619
|
const N = Date.now(), G = e.bookingWindowOpenAt ? new Date(e.bookingWindowOpenAt).getTime() : N, me = e.bookingWindowCloseAt ? new Date(e.bookingWindowCloseAt).getTime() : N + or * 6, ue = ir(new Date(Math.max(N, G))), ve = ir(new Date(Math.min(me, N + or * 6)));
|
|
3620
3620
|
let Y = !1;
|
|
3621
3621
|
Se(() => {
|
|
@@ -3635,13 +3635,13 @@ function $t(e) {
|
|
|
3635
3635
|
const _e = async () => {
|
|
3636
3636
|
const N = T();
|
|
3637
3637
|
if (N) {
|
|
3638
|
-
if (
|
|
3638
|
+
if (x()) {
|
|
3639
3639
|
await e.onReschedule(N.id, N.locationId ?? e.defaultLocationId), _(!1), b(null);
|
|
3640
3640
|
return;
|
|
3641
3641
|
}
|
|
3642
3642
|
await e.onBook(N.id, N.locationId ?? e.defaultLocationId);
|
|
3643
3643
|
}
|
|
3644
|
-
}, L = d(() => a().booking), P = d(() => L()?.consumerStatus), q = d(() => P() === "checked_in"), K = d(() => P() === "completed"), Ee = d(() => K() ? r("appointment.completedTitle") : q() ? r("appointment.checkedIn") : r("appointment.bookedTitle")), Ve = d(() => K() ? "completed" : q() ? "checked_in" : "booked"), ke = () =>
|
|
3644
|
+
}, L = d(() => a().booking), P = d(() => L()?.consumerStatus), q = d(() => P() === "checked_in"), K = d(() => P() === "completed"), Ee = d(() => K() ? r("appointment.completedTitle") : q() ? r("appointment.checkedIn") : r("appointment.bookedTitle")), Ve = d(() => K() ? "completed" : q() ? "checked_in" : "booked"), ke = () => x() ? e.isRescheduling : e.isBooking, qe = () => e.bookError ?? c();
|
|
3645
3645
|
return n(Re, {
|
|
3646
3646
|
fallback: null,
|
|
3647
3647
|
get children() {
|
|
@@ -3665,7 +3665,7 @@ function $t(e) {
|
|
|
3665
3665
|
}
|
|
3666
3666
|
}), n(J, {
|
|
3667
3667
|
get when() {
|
|
3668
|
-
return Q(() => e.sequencePhase === "participating")() && !
|
|
3668
|
+
return Q(() => e.sequencePhase === "participating")() && !x();
|
|
3669
3669
|
},
|
|
3670
3670
|
get children() {
|
|
3671
3671
|
return n(ne, {
|
|
@@ -3685,7 +3685,7 @@ function $t(e) {
|
|
|
3685
3685
|
}
|
|
3686
3686
|
}), n(re, {
|
|
3687
3687
|
get children() {
|
|
3688
|
-
return n(
|
|
3688
|
+
return n(y, {
|
|
3689
3689
|
get when() {
|
|
3690
3690
|
return L();
|
|
3691
3691
|
},
|
|
@@ -3695,14 +3695,14 @@ function $t(e) {
|
|
|
3695
3695
|
return i(N, () => r("appointment.loadingBooking")), N;
|
|
3696
3696
|
})();
|
|
3697
3697
|
},
|
|
3698
|
-
children: (N) => n(
|
|
3698
|
+
children: (N) => n(y, {
|
|
3699
3699
|
get when() {
|
|
3700
3700
|
return N().consumerStatus === "checked_in";
|
|
3701
3701
|
},
|
|
3702
3702
|
get fallback() {
|
|
3703
3703
|
return (() => {
|
|
3704
3704
|
var G = li(), me = G.firstChild, ue = me.firstChild, ve = ue.nextSibling;
|
|
3705
|
-
return i(ue, () => vi(N().startTime, e.timezone)), i(ve, () => N().locationName ?? r("appointment.online")), i(G, n(
|
|
3705
|
+
return i(ue, () => vi(N().startTime, e.timezone)), i(ve, () => N().locationName ?? r("appointment.online")), i(G, n(y, {
|
|
3706
3706
|
get when() {
|
|
3707
3707
|
return e.cancelError;
|
|
3708
3708
|
},
|
|
@@ -3712,7 +3712,7 @@ function $t(e) {
|
|
|
3712
3712
|
return Y();
|
|
3713
3713
|
}
|
|
3714
3714
|
})
|
|
3715
|
-
}), null), i(G, n(
|
|
3715
|
+
}), null), i(G, n(y, {
|
|
3716
3716
|
get when() {
|
|
3717
3717
|
return N().consumerStatus !== "completed";
|
|
3718
3718
|
},
|
|
@@ -3762,7 +3762,7 @@ function $t(e) {
|
|
|
3762
3762
|
}
|
|
3763
3763
|
}), n(J, {
|
|
3764
3764
|
get when() {
|
|
3765
|
-
return e.sequencePhase === "enterable" ||
|
|
3765
|
+
return e.sequencePhase === "enterable" || x();
|
|
3766
3766
|
},
|
|
3767
3767
|
get children() {
|
|
3768
3768
|
return n(ne, {
|
|
@@ -3771,13 +3771,13 @@ function $t(e) {
|
|
|
3771
3771
|
},
|
|
3772
3772
|
"data-slot": "appointment-module",
|
|
3773
3773
|
get "data-stage"() {
|
|
3774
|
-
return
|
|
3774
|
+
return x() ? "participating" : "enterable";
|
|
3775
3775
|
},
|
|
3776
3776
|
get children() {
|
|
3777
3777
|
return [n(ae, {
|
|
3778
3778
|
variant: "default",
|
|
3779
3779
|
get label() {
|
|
3780
|
-
return Q(() => !!
|
|
3780
|
+
return Q(() => !!x())() ? r("appointment.rescheduleTitle") : r("appointment.title");
|
|
3781
3781
|
}
|
|
3782
3782
|
}), n(re, {
|
|
3783
3783
|
class: "ff:gap-2",
|
|
@@ -3801,7 +3801,7 @@ function $t(e) {
|
|
|
3801
3801
|
return w();
|
|
3802
3802
|
},
|
|
3803
3803
|
onSelect: W
|
|
3804
|
-
}), n(
|
|
3804
|
+
}), n(y, {
|
|
3805
3805
|
get when() {
|
|
3806
3806
|
return qe();
|
|
3807
3807
|
},
|
|
@@ -3821,7 +3821,7 @@ function $t(e) {
|
|
|
3821
3821
|
},
|
|
3822
3822
|
onClick: _e,
|
|
3823
3823
|
get children() {
|
|
3824
|
-
return
|
|
3824
|
+
return m();
|
|
3825
3825
|
}
|
|
3826
3826
|
})];
|
|
3827
3827
|
}
|
|
@@ -3845,40 +3845,40 @@ function bi(e) {
|
|
|
3845
3845
|
e.booking.joinUrl && window.open(e.booking.joinUrl, "_blank", "noopener,noreferrer");
|
|
3846
3846
|
};
|
|
3847
3847
|
return (() => {
|
|
3848
|
-
var l = ci(), c = l.firstChild, v = c.nextSibling, w = v.nextSibling, b = w.firstChild,
|
|
3848
|
+
var l = ci(), c = l.firstChild, v = c.nextSibling, w = v.nextSibling, b = w.firstChild, x = b.firstChild, _ = x.nextSibling;
|
|
3849
3849
|
return i(c, () => t("appointment.youreUpAt", {
|
|
3850
3850
|
values: {
|
|
3851
3851
|
time: a()
|
|
3852
3852
|
}
|
|
3853
|
-
})), i(v, f), i(
|
|
3853
|
+
})), i(v, f), i(x, () => t("appointment.time")), i(_, a), i(w, n(y, {
|
|
3854
3854
|
get when() {
|
|
3855
3855
|
return o();
|
|
3856
3856
|
},
|
|
3857
3857
|
children: (V) => (() => {
|
|
3858
|
-
var T = di(),
|
|
3859
|
-
return i(
|
|
3858
|
+
var T = di(), m = T.firstChild, h = m.nextSibling;
|
|
3859
|
+
return i(m, () => t("appointment.duration")), i(h, () => t("appointment.minutes", {
|
|
3860
3860
|
values: {
|
|
3861
3861
|
count: V()
|
|
3862
3862
|
}
|
|
3863
3863
|
})), T;
|
|
3864
3864
|
})()
|
|
3865
|
-
}), null), i(w, n(
|
|
3865
|
+
}), null), i(w, n(y, {
|
|
3866
3866
|
get when() {
|
|
3867
3867
|
return Q(() => !r())() && e.booking.locationName;
|
|
3868
3868
|
},
|
|
3869
3869
|
children: (V) => (() => {
|
|
3870
|
-
var T = ui(),
|
|
3871
|
-
return i(
|
|
3870
|
+
var T = ui(), m = T.firstChild, h = m.nextSibling;
|
|
3871
|
+
return i(m, () => t("appointment.location")), i(h, V), T;
|
|
3872
3872
|
})()
|
|
3873
|
-
}), null), i(w, n(
|
|
3873
|
+
}), null), i(w, n(y, {
|
|
3874
3874
|
get when() {
|
|
3875
3875
|
return e.booking.confirmationCode;
|
|
3876
3876
|
},
|
|
3877
3877
|
children: (V) => (() => {
|
|
3878
|
-
var T = gi(),
|
|
3879
|
-
return i(
|
|
3878
|
+
var T = gi(), m = T.firstChild, h = m.nextSibling;
|
|
3879
|
+
return i(m, () => t("appointment.confirmationCode")), i(h, V), T;
|
|
3880
3880
|
})()
|
|
3881
|
-
}), null), i(l, n(
|
|
3881
|
+
}), null), i(l, n(y, {
|
|
3882
3882
|
get when() {
|
|
3883
3883
|
return r();
|
|
3884
3884
|
},
|
|
@@ -3955,19 +3955,21 @@ function Je(e) {
|
|
|
3955
3955
|
const {
|
|
3956
3956
|
t
|
|
3957
3957
|
} = fe(), r = ze(() => e.display$ ?? $i), a = d(() => Ci(e.fallbackState, r())), o = d(() => {
|
|
3958
|
+
const b = a().settleAt;
|
|
3959
|
+
if (b) return new Date(b);
|
|
3958
3960
|
if (e.countdownTo) return e.countdownTo;
|
|
3959
|
-
const
|
|
3960
|
-
return
|
|
3961
|
+
const x = a().closeAt;
|
|
3962
|
+
return x ? new Date(x) : void 0;
|
|
3961
3963
|
}), f = d(() => {
|
|
3962
3964
|
const b = e.expiresAt;
|
|
3963
3965
|
if (b)
|
|
3964
3966
|
return b instanceof Date ? b : new Date(b);
|
|
3965
3967
|
}), s = () => a().currencyCode ?? e.currencyCode, l = (b) => {
|
|
3966
3968
|
if (b === void 0) return;
|
|
3967
|
-
const
|
|
3968
|
-
if (Number.isNaN(
|
|
3969
|
+
const x = parseFloat(b);
|
|
3970
|
+
if (Number.isNaN(x)) return b;
|
|
3969
3971
|
const _ = s();
|
|
3970
|
-
return yi(
|
|
3972
|
+
return yi(x, _ ? {
|
|
3971
3973
|
currencyCode: _,
|
|
3972
3974
|
locale: e.locale
|
|
3973
3975
|
} : {
|
|
@@ -4004,30 +4006,30 @@ function Je(e) {
|
|
|
4004
4006
|
}
|
|
4005
4007
|
}), n(re, {
|
|
4006
4008
|
get children() {
|
|
4007
|
-
return [n(
|
|
4009
|
+
return [n(y, {
|
|
4008
4010
|
get when() {
|
|
4009
4011
|
return o();
|
|
4010
4012
|
},
|
|
4011
|
-
children: (
|
|
4013
|
+
children: (x) => (() => {
|
|
4012
4014
|
var _ = sr(), V = _.firstChild;
|
|
4013
4015
|
return i(V, () => t("auction.endsIn")), i(_, n(ye, {
|
|
4014
4016
|
get targetDate() {
|
|
4015
|
-
return
|
|
4017
|
+
return x();
|
|
4016
4018
|
},
|
|
4017
4019
|
showDays: !1
|
|
4018
4020
|
}), null), _;
|
|
4019
4021
|
})()
|
|
4020
4022
|
}), n(we, {
|
|
4021
4023
|
get children() {
|
|
4022
|
-
var
|
|
4023
|
-
return i(
|
|
4024
|
+
var x = fr();
|
|
4025
|
+
return i(x, () => t("auction.description")), x;
|
|
4024
4026
|
}
|
|
4025
|
-
}), n(
|
|
4027
|
+
}), n(y, {
|
|
4026
4028
|
get when() {
|
|
4027
4029
|
return e.onBid;
|
|
4028
4030
|
},
|
|
4029
4031
|
get fallback() {
|
|
4030
|
-
return n(
|
|
4032
|
+
return n(y, {
|
|
4031
4033
|
get when() {
|
|
4032
4034
|
return e.canEnter;
|
|
4033
4035
|
},
|
|
@@ -4087,45 +4089,45 @@ function Je(e) {
|
|
|
4087
4089
|
}
|
|
4088
4090
|
}), n(re, {
|
|
4089
4091
|
get children() {
|
|
4090
|
-
return [n(
|
|
4092
|
+
return [n(y, {
|
|
4091
4093
|
get when() {
|
|
4092
4094
|
return o();
|
|
4093
4095
|
},
|
|
4094
|
-
children: (
|
|
4096
|
+
children: (x) => (() => {
|
|
4095
4097
|
var _ = sr(), V = _.firstChild;
|
|
4096
4098
|
return i(V, () => t("auction.endsIn")), i(_, n(ye, {
|
|
4097
4099
|
get targetDate() {
|
|
4098
|
-
return
|
|
4100
|
+
return x();
|
|
4099
4101
|
},
|
|
4100
4102
|
showDays: !1
|
|
4101
4103
|
}), null), _;
|
|
4102
4104
|
})()
|
|
4103
4105
|
}), n(we, {
|
|
4104
4106
|
get children() {
|
|
4105
|
-
return [n(
|
|
4107
|
+
return [n(y, {
|
|
4106
4108
|
get when() {
|
|
4107
4109
|
return l(a().highestBid);
|
|
4108
4110
|
},
|
|
4109
|
-
children: (
|
|
4111
|
+
children: (x) => (() => {
|
|
4110
4112
|
var _ = lr(), V = _.firstChild, T = V.nextSibling;
|
|
4111
|
-
return i(V, () => t("auction.currentBid")), i(T,
|
|
4113
|
+
return i(V, () => t("auction.currentBid")), i(T, x), _;
|
|
4112
4114
|
})()
|
|
4113
|
-
}), n(
|
|
4115
|
+
}), n(y, {
|
|
4114
4116
|
get when() {
|
|
4115
4117
|
return l(a().currentBid);
|
|
4116
4118
|
},
|
|
4117
|
-
children: (
|
|
4119
|
+
children: (x) => (() => {
|
|
4118
4120
|
var _ = lr(), V = _.firstChild, T = V.nextSibling;
|
|
4119
4121
|
return i(V, (() => {
|
|
4120
|
-
var
|
|
4121
|
-
return () =>
|
|
4122
|
-
})()), i(T,
|
|
4122
|
+
var m = Q(() => a().status === "winning");
|
|
4123
|
+
return () => m() ? t("auction.yourWinningBid") : t("auction.yourBidLabel");
|
|
4124
|
+
})()), i(T, x), _;
|
|
4123
4125
|
})()
|
|
4124
4126
|
})];
|
|
4125
4127
|
}
|
|
4126
4128
|
}), (() => {
|
|
4127
|
-
var
|
|
4128
|
-
return i(
|
|
4129
|
+
var x = ki();
|
|
4130
|
+
return i(x, n(y, {
|
|
4129
4131
|
get when() {
|
|
4130
4132
|
return e.onBid;
|
|
4131
4133
|
},
|
|
@@ -4138,7 +4140,7 @@ function Je(e) {
|
|
|
4138
4140
|
}
|
|
4139
4141
|
});
|
|
4140
4142
|
}
|
|
4141
|
-
}), null), i(
|
|
4143
|
+
}), null), i(x, n(y, {
|
|
4142
4144
|
get when() {
|
|
4143
4145
|
return e.canLeave;
|
|
4144
4146
|
},
|
|
@@ -4160,7 +4162,7 @@ function Je(e) {
|
|
|
4160
4162
|
}
|
|
4161
4163
|
});
|
|
4162
4164
|
}
|
|
4163
|
-
}), null),
|
|
4165
|
+
}), null), x;
|
|
4164
4166
|
})()];
|
|
4165
4167
|
}
|
|
4166
4168
|
}), n(ee, {})];
|
|
@@ -4190,15 +4192,15 @@ function Je(e) {
|
|
|
4190
4192
|
return n(we, {
|
|
4191
4193
|
get children() {
|
|
4192
4194
|
return [(() => {
|
|
4193
|
-
var
|
|
4194
|
-
return i(
|
|
4195
|
-
})(), n(
|
|
4195
|
+
var x = fr();
|
|
4196
|
+
return i(x, () => t("auction.settlingDescription")), x;
|
|
4197
|
+
})(), n(y, {
|
|
4196
4198
|
get when() {
|
|
4197
4199
|
return l(a().highestBid);
|
|
4198
4200
|
},
|
|
4199
|
-
children: (
|
|
4201
|
+
children: (x) => (() => {
|
|
4200
4202
|
var _ = _i(), V = _.firstChild, T = V.nextSibling;
|
|
4201
|
-
return i(V, () => t("auction.currentBid")), i(T,
|
|
4203
|
+
return i(V, () => t("auction.currentBid")), i(T, x), _;
|
|
4202
4204
|
})()
|
|
4203
4205
|
})];
|
|
4204
4206
|
}
|
|
@@ -4303,7 +4305,7 @@ function Ze(e) {
|
|
|
4303
4305
|
}
|
|
4304
4306
|
}), n(re, {
|
|
4305
4307
|
get children() {
|
|
4306
|
-
return [n(
|
|
4308
|
+
return [n(y, {
|
|
4307
4309
|
get when() {
|
|
4308
4310
|
return a();
|
|
4309
4311
|
},
|
|
@@ -4316,7 +4318,7 @@ function Ze(e) {
|
|
|
4316
4318
|
showDays: !1
|
|
4317
4319
|
}), null), v;
|
|
4318
4320
|
})()
|
|
4319
|
-
}), n(
|
|
4321
|
+
}), n(y, {
|
|
4320
4322
|
get when() {
|
|
4321
4323
|
return e.canEnter;
|
|
4322
4324
|
},
|
|
@@ -4363,7 +4365,7 @@ function Ze(e) {
|
|
|
4363
4365
|
}
|
|
4364
4366
|
}), n(re, {
|
|
4365
4367
|
get children() {
|
|
4366
|
-
return [n(
|
|
4368
|
+
return [n(y, {
|
|
4367
4369
|
get when() {
|
|
4368
4370
|
return r().entryNumber;
|
|
4369
4371
|
},
|
|
@@ -4371,7 +4373,7 @@ function Ze(e) {
|
|
|
4371
4373
|
var v = Si();
|
|
4372
4374
|
return i(v, c), v;
|
|
4373
4375
|
})()
|
|
4374
|
-
}), n(
|
|
4376
|
+
}), n(y, {
|
|
4375
4377
|
get when() {
|
|
4376
4378
|
return a();
|
|
4377
4379
|
},
|
|
@@ -4392,7 +4394,7 @@ function Ze(e) {
|
|
|
4392
4394
|
return () => v() ? t("draw.goodLuck") : t("draw.stayTuned");
|
|
4393
4395
|
})()), c;
|
|
4394
4396
|
}
|
|
4395
|
-
}), n(
|
|
4397
|
+
}), n(y, {
|
|
4396
4398
|
get when() {
|
|
4397
4399
|
return e.canLeave;
|
|
4398
4400
|
},
|
|
@@ -4542,7 +4544,7 @@ function ot(e) {
|
|
|
4542
4544
|
}
|
|
4543
4545
|
}), n(re, {
|
|
4544
4546
|
get children() {
|
|
4545
|
-
return [n(
|
|
4547
|
+
return [n(y, {
|
|
4546
4548
|
get when() {
|
|
4547
4549
|
return e.closeAt;
|
|
4548
4550
|
},
|
|
@@ -4555,7 +4557,7 @@ function ot(e) {
|
|
|
4555
4557
|
showDays: !1
|
|
4556
4558
|
}), null), c;
|
|
4557
4559
|
})()
|
|
4558
|
-
}), n(
|
|
4560
|
+
}), n(y, {
|
|
4559
4561
|
get when() {
|
|
4560
4562
|
return e.canEnter;
|
|
4561
4563
|
},
|
|
@@ -4604,7 +4606,7 @@ function ot(e) {
|
|
|
4604
4606
|
get children() {
|
|
4605
4607
|
return [(() => {
|
|
4606
4608
|
var l = Di(), c = l.firstChild, v = c.nextSibling;
|
|
4607
|
-
return i(c, () => t("queue.estimatedWaitLabel")), i(v, n(
|
|
4609
|
+
return i(c, () => t("queue.estimatedWaitLabel")), i(v, n(y, {
|
|
4608
4610
|
get when() {
|
|
4609
4611
|
return r().estimatedWaitTime != null;
|
|
4610
4612
|
},
|
|
@@ -4619,7 +4621,7 @@ function ot(e) {
|
|
|
4619
4621
|
});
|
|
4620
4622
|
})();
|
|
4621
4623
|
}
|
|
4622
|
-
})), i(l, n(
|
|
4624
|
+
})), i(l, n(y, {
|
|
4623
4625
|
get when() {
|
|
4624
4626
|
return r().estimatedWaitTime != null;
|
|
4625
4627
|
},
|
|
@@ -4633,7 +4635,7 @@ function ot(e) {
|
|
|
4633
4635
|
var l = Ai();
|
|
4634
4636
|
return i(l, () => t("queue.qualitativeReassurance")), l;
|
|
4635
4637
|
}
|
|
4636
|
-
}), n(
|
|
4638
|
+
}), n(y, {
|
|
4637
4639
|
get when() {
|
|
4638
4640
|
return e.canLeave;
|
|
4639
4641
|
},
|
|
@@ -4757,7 +4759,7 @@ function it(e) {
|
|
|
4757
4759
|
}
|
|
4758
4760
|
}), n(re, {
|
|
4759
4761
|
get children() {
|
|
4760
|
-
return [n(
|
|
4762
|
+
return [n(y, {
|
|
4761
4763
|
get when() {
|
|
4762
4764
|
return e.countdownTo;
|
|
4763
4765
|
},
|
|
@@ -4775,7 +4777,7 @@ function it(e) {
|
|
|
4775
4777
|
var c = gr();
|
|
4776
4778
|
return i(c, () => t("timedRelease.description")), c;
|
|
4777
4779
|
}
|
|
4778
|
-
}), n(
|
|
4780
|
+
}), n(y, {
|
|
4779
4781
|
get when() {
|
|
4780
4782
|
return e.canEnter;
|
|
4781
4783
|
},
|
|
@@ -4822,7 +4824,7 @@ function it(e) {
|
|
|
4822
4824
|
}
|
|
4823
4825
|
}), n(re, {
|
|
4824
4826
|
get children() {
|
|
4825
|
-
return [n(
|
|
4827
|
+
return [n(y, {
|
|
4826
4828
|
get when() {
|
|
4827
4829
|
return e.countdownTo;
|
|
4828
4830
|
},
|
|
@@ -4842,7 +4844,7 @@ function it(e) {
|
|
|
4842
4844
|
}
|
|
4843
4845
|
}), (() => {
|
|
4844
4846
|
var c = Ii();
|
|
4845
|
-
return i(c, n(
|
|
4847
|
+
return i(c, n(y, {
|
|
4846
4848
|
get when() {
|
|
4847
4849
|
return o();
|
|
4848
4850
|
},
|
|
@@ -4855,7 +4857,7 @@ function it(e) {
|
|
|
4855
4857
|
}
|
|
4856
4858
|
});
|
|
4857
4859
|
}
|
|
4858
|
-
}), null), i(c, n(
|
|
4860
|
+
}), null), i(c, n(y, {
|
|
4859
4861
|
get when() {
|
|
4860
4862
|
return e.onComplete;
|
|
4861
4863
|
},
|
|
@@ -4873,7 +4875,7 @@ function it(e) {
|
|
|
4873
4875
|
}
|
|
4874
4876
|
});
|
|
4875
4877
|
}
|
|
4876
|
-
}), null), i(c, n(
|
|
4878
|
+
}), null), i(c, n(y, {
|
|
4877
4879
|
get when() {
|
|
4878
4880
|
return e.canLeave;
|
|
4879
4881
|
},
|
|
@@ -4978,7 +4980,7 @@ function Pr(e) {
|
|
|
4978
4980
|
}
|
|
4979
4981
|
}), n(re, {
|
|
4980
4982
|
get children() {
|
|
4981
|
-
return [n(
|
|
4983
|
+
return [n(y, {
|
|
4982
4984
|
get when() {
|
|
4983
4985
|
return o();
|
|
4984
4986
|
},
|
|
@@ -5001,7 +5003,7 @@ function Pr(e) {
|
|
|
5001
5003
|
var s = Mi();
|
|
5002
5004
|
return i(s, a), s;
|
|
5003
5005
|
}
|
|
5004
|
-
}), n(
|
|
5006
|
+
}), n(y, {
|
|
5005
5007
|
get when() {
|
|
5006
5008
|
return Q(() => !!e.canEnter)() && e.onEnter;
|
|
5007
5009
|
},
|
|
@@ -5077,7 +5079,7 @@ function jr(e) {
|
|
|
5077
5079
|
autoStart: () => a.autoStart ?? !1,
|
|
5078
5080
|
accessCode: () => a.accessCode,
|
|
5079
5081
|
autoEnterWaitlist: () => a.autoEnterWaitlist ?? !1
|
|
5080
|
-
}), [f, s] = D(!1), [l, c] = D(!1), [v, w] = D(!1), [b,
|
|
5082
|
+
}), [f, s] = D(!1), [l, c] = D(!1), [v, w] = D(!1), [b, x] = D(!1), [_, V] = D(!1), [T, m] = D(!1), [h, k] = D(!1), [z, C] = D(!1), [I, U] = D(null), R = d(() => o.snapshot()), X = d(() => o.view()), W = d(() => X()?.journeyStage ?? null), le = d(() => {
|
|
5081
5083
|
const g = X();
|
|
5082
5084
|
return g?.journeyStage === "routed" ? g : void 0;
|
|
5083
5085
|
}), _e = d(() => dt(R())), L = d(() => _e()?.phase ?? le()?.sequence.phase ?? null), P = d(() => I() ?? o.error());
|
|
@@ -5180,13 +5182,13 @@ function jr(e) {
|
|
|
5180
5182
|
const p = g.view$.get();
|
|
5181
5183
|
p.journeyStage === "routed" && p.sequence.phase === "enterable" && "enter" in p.sequence && await p.sequence.enter();
|
|
5182
5184
|
}, ve = async () => {
|
|
5183
|
-
|
|
5185
|
+
x(!0), U(null);
|
|
5184
5186
|
try {
|
|
5185
5187
|
await ue();
|
|
5186
5188
|
} catch (g) {
|
|
5187
5189
|
q(g);
|
|
5188
5190
|
} finally {
|
|
5189
|
-
|
|
5191
|
+
x(!1);
|
|
5190
5192
|
}
|
|
5191
5193
|
}, Y = async () => {
|
|
5192
5194
|
const g = o.journey();
|
|
@@ -5226,14 +5228,14 @@ function jr(e) {
|
|
|
5226
5228
|
}, F = async (g, p) => {
|
|
5227
5229
|
const S = o.journey();
|
|
5228
5230
|
if (S) {
|
|
5229
|
-
U(null),
|
|
5231
|
+
U(null), m(!0);
|
|
5230
5232
|
try {
|
|
5231
5233
|
const E = S.view$.get();
|
|
5232
5234
|
E.journeyStage === "routed" && E.sequence.phase === "enterable" && "book" in E.sequence && await E.sequence.book(g, p);
|
|
5233
5235
|
} catch (E) {
|
|
5234
5236
|
q(E);
|
|
5235
5237
|
} finally {
|
|
5236
|
-
|
|
5238
|
+
m(!1);
|
|
5237
5239
|
}
|
|
5238
5240
|
}
|
|
5239
5241
|
}, B = async (g) => {
|
|
@@ -5666,7 +5668,7 @@ function jr(e) {
|
|
|
5666
5668
|
return T();
|
|
5667
5669
|
},
|
|
5668
5670
|
get isCancelling() {
|
|
5669
|
-
return
|
|
5671
|
+
return h();
|
|
5670
5672
|
},
|
|
5671
5673
|
get isRescheduling() {
|
|
5672
5674
|
return z();
|
|
@@ -5893,26 +5895,29 @@ function Or(e) {
|
|
|
5893
5895
|
r(null), o(!1), s(v ?? "Missing required configuration. Set organization-id and publishable-key (or pass defaults to registerWebComponents()).");
|
|
5894
5896
|
return;
|
|
5895
5897
|
}
|
|
5896
|
-
const
|
|
5898
|
+
const x = c;
|
|
5897
5899
|
let _ = !1, V = null;
|
|
5898
5900
|
o(!0), s(null), r(null);
|
|
5899
5901
|
async function T() {
|
|
5900
5902
|
try {
|
|
5901
|
-
const
|
|
5902
|
-
|
|
5903
|
-
|
|
5903
|
+
const m = await sn({
|
|
5904
|
+
...x,
|
|
5905
|
+
autoResume: w && b
|
|
5906
|
+
});
|
|
5907
|
+
if (V = m, _) {
|
|
5908
|
+
m.destroy();
|
|
5904
5909
|
return;
|
|
5905
5910
|
}
|
|
5906
|
-
|
|
5907
|
-
} catch (
|
|
5908
|
-
const
|
|
5909
|
-
_ || (s(
|
|
5911
|
+
_ || (r(m), o(!1));
|
|
5912
|
+
} catch (m) {
|
|
5913
|
+
const h = m instanceof Error ? m.message : "Failed to initialize Fanfare SDK";
|
|
5914
|
+
_ || (s(h), o(!1));
|
|
5910
5915
|
}
|
|
5911
5916
|
}
|
|
5912
5917
|
T(), Se(() => {
|
|
5913
5918
|
_ = !0, V && V.destroy();
|
|
5914
5919
|
});
|
|
5915
|
-
}), [n(Ur, {}), n(
|
|
5920
|
+
}), [n(Ur, {}), n(y, {
|
|
5916
5921
|
get when() {
|
|
5917
5922
|
return l();
|
|
5918
5923
|
},
|
|
@@ -5920,7 +5925,7 @@ function Or(e) {
|
|
|
5920
5925
|
get fallback() {
|
|
5921
5926
|
return (() => {
|
|
5922
5927
|
var c = Zi();
|
|
5923
|
-
return i(c, n(
|
|
5928
|
+
return i(c, n(y, {
|
|
5924
5929
|
get when() {
|
|
5925
5930
|
return f();
|
|
5926
5931
|
},
|