fansunited-frontend-components 0.0.48 → 0.0.49
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/ChanceGame.js +45 -45
- package/ClassicQuizPlay.js +184 -183
- package/CollectLead.js +16 -15
- package/Discussion.js +1 -1
- package/EitherOrPlay.js +66 -65
- package/EventGamePlay.js +68 -67
- package/Leaderboard.js +22 -22
- package/MatchQuizPlay.js +82 -81
- package/PersonalityQuizPlay.js +77 -76
- package/PickThePair.js +42 -42
- package/PollVote.js +53 -52
- package/Predictor.js +75 -75
- package/README.md +272 -0
- package/chunks/{AlertMessage-D4Uc6n5U.js → AlertMessage-Ds45MBHB.js} +3 -3
- package/chunks/{ArrowRightAlt-wEs8SY1V.js → ArrowRightAlt-DKADQN2o.js} +1 -1
- package/chunks/{Avatar-BXHdXHLA.js → Avatar-K1EWhhkA.js} +2 -2
- package/chunks/{ChanceGameEmbedVariant-DfS5LPpp.js → ChanceGameEmbedVariant-DqFg4YKU.js} +31 -29
- package/chunks/{CheckCircle-CU2itira.js → CheckCircle-CV9iMpkZ.js} +1 -1
- package/chunks/{Close-DBt1nfGo.js → Close-BHp4N1-6.js} +1 -1
- package/chunks/{Close-C5SGTkPr.js → Close-C6Cw96SJ.js} +1 -1
- package/chunks/{CollectLeadForm-BqjgPYKX.js → CollectLeadForm-DnLKA8qz.js} +13 -13
- package/chunks/{Divider-Cbns9B3Y.js → Divider-BvUimRFw.js} +2 -2
- package/chunks/{Edit-BVP8fCB4.js → Edit-CZ3ni-Ur.js} +4 -4
- package/chunks/{EmojiEvents-D_ObJxNy.js → EmojiEvents-DpmLq98V.js} +1 -1
- package/chunks/{FavoriteBorder-_mUf1vas.js → FavoriteBorder-DUK_DrY4.js} +1 -1
- package/chunks/{FormControl-DLBvX-Sn.js → FormControl-BUItlVIg.js} +3 -3
- package/chunks/{FormLabel-jXtScWTI.js → FormLabel-CeTNPUn7.js} +2 -2
- package/chunks/{Input-Cha_dm3J.js → Input-MJCQcYzo.js} +2 -2
- package/chunks/{KeyboardArrowDown-C_8g8wLS.js → KeyboardArrowDown-SZpn2GhJ.js} +1 -1
- package/chunks/{ModalDialog-Co3jck0z.js → ModalDialog-Cfgv9UAA.js} +2 -2
- package/chunks/{NotFoundSkeleton-D5Jh3lnu.js → NotFoundSkeleton-Cs6DtD9u.js} +13 -12
- package/chunks/{Notification-r1Fm0If2.js → Notification-pcKtlRms.js} +4 -4
- package/chunks/{OverlayApiErrorSkeleton-BUuD0zL8.js → OverlayApiErrorSkeleton-Dl3s5Oaf.js} +20 -19
- package/chunks/{OverlayLeadAfterCollection-B-N1OjPu.js → OverlayLeadAfterCollection-F2TAV9wK.js} +14 -12
- package/chunks/{OverlayScoreStateSkeleton-Bd3-ZNlU.js → OverlayScoreStateSkeleton-LQ0svzeX.js} +3 -3
- package/chunks/{Person-K8GGMiAW.js → Person-BGdniS_p.js} +1 -1
- package/chunks/{PickOneOfX-CvIn7QOd.js → PickOneOfX-Ci4ZJf7G.js} +8 -7
- package/chunks/{Popper-Bti_HOMS.js → Popper-DOVSI4rJ.js} +1 -1
- package/chunks/{Portal-B-nN3a_R.js → Portal-Cs0dgwmH.js} +1 -1
- package/chunks/{index-Btf_jw7-.js → PrizeCard-DF3QxwQJ.js} +0 -1
- package/chunks/{Select-C2QtqgA7.js → Select-BHeTdOYr.js} +3 -3
- package/chunks/{Spinner-D7-MZe2m.js → Spinner-DbUB64Gj.js} +1 -1
- package/chunks/{SplitLeadAfterCollection-CyXBWAIK.js → SplitLeadAfterCollection-DSw6X5fx.js} +36 -34
- package/chunks/{Stack-CU36SsgA.js → Stack-BpHk5eb0.js} +1 -1
- package/chunks/{StandardContentSkeleton-CYduGHsc.js → StandardContentSkeleton-Bae1LLQ_.js} +1 -1
- package/chunks/{Tabs-CA-FqQfT.js → Tabs-hwJ7jsUl.js} +3 -3
- package/chunks/{Textarea-Cn4VvCBl.js → Textarea-zOtMdgc5.js} +3 -3
- package/chunks/{TimerOutlined-DOpryr42.js → TimerOutlined-DWE7f0YX.js} +1 -1
- package/chunks/{helpers-1jFObSvc.js → helpers-NuC1SzL3.js} +1 -1
- package/chunks/index-BaypiKlO.js +4 -0
- package/chunks/{main-Chqd9Wwn.js → main-hB01WcoP.js} +88 -88
- package/chunks/{useEventCallback-CkO2rd5W.js → useEventCallback-CizlfWBo.js} +1 -1
- package/chunks/{useForwardedInput-C3SP2QmS.js → useForwardedInput-RWDntqBU.js} +2 -2
- package/chunks/{useImageVariant-BJ722AFw.js → useImageVariant-Cex1eIqq.js} +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/chunks/index-CyODGG_P.js +0 -4
package/CollectLead.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsx as n, jsxs as g, Fragment as r } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { g as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { createContext as ce } from "react";
|
|
3
|
+
import { c as Y, i as Q, B as o, T as u, f as de, g as J, u as K, e as X, n as Z, W as w, b as U, a as h, d as se } from "./chunks/PrizeCard-DF3QxwQJ.js";
|
|
4
|
+
import { P as me } from "./chunks/Portal-Cs0dgwmH.js";
|
|
5
|
+
import "react-dom";
|
|
6
|
+
import { g as ge, a as xe, h as oe } from "./chunks/helpers-NuC1SzL3.js";
|
|
7
|
+
import { d as le, a as ae, b as ee } from "./chunks/useImageVariant-Cex1eIqq.js";
|
|
8
|
+
import { C as fe } from "./chunks/CollectLeadForm-DnLKA8qz.js";
|
|
8
9
|
const te = (e) => {
|
|
9
|
-
const i = Y().secondary, s = Q(), a =
|
|
10
|
+
const i = Y().secondary, s = Q(), a = ge(e.primaryUrl, e.secondaryUrl, "logo");
|
|
10
11
|
if (!e.brandingLogo)
|
|
11
12
|
return null;
|
|
12
13
|
const d = () => {
|
|
@@ -110,7 +111,7 @@ const te = (e) => {
|
|
|
110
111
|
]
|
|
111
112
|
}
|
|
112
113
|
);
|
|
113
|
-
}, _ =
|
|
114
|
+
}, _ = ce({
|
|
114
115
|
shadowRootElement: null,
|
|
115
116
|
language: null,
|
|
116
117
|
sdk: null
|
|
@@ -154,7 +155,7 @@ const te = (e) => {
|
|
|
154
155
|
children: S
|
|
155
156
|
}
|
|
156
157
|
), ne = () => {
|
|
157
|
-
const { t: e } =
|
|
158
|
+
const { t: e } = de(), {
|
|
158
159
|
sdk: i,
|
|
159
160
|
content: s,
|
|
160
161
|
branding: a,
|
|
@@ -188,7 +189,7 @@ const te = (e) => {
|
|
|
188
189
|
termsAndConditionsUrlLabel: t == null ? void 0 : t.termsAndConditionsUrlLabel
|
|
189
190
|
};
|
|
190
191
|
return /* @__PURE__ */ n(
|
|
191
|
-
|
|
192
|
+
fe,
|
|
192
193
|
{
|
|
193
194
|
sdk: i,
|
|
194
195
|
content: s,
|
|
@@ -400,7 +401,7 @@ const te = (e) => {
|
|
|
400
401
|
imagePlaceholder: f
|
|
401
402
|
},
|
|
402
403
|
w.OVERLAY
|
|
403
|
-
), C =
|
|
404
|
+
), C = xe(b), S = i.colorSchemes.dark.textColor, p = i.customFontFamily.dark.primary, T = i.customFontFamily.dark.secondary, j = i.customRadius.dark.md, N = ($ = i.border) == null ? void 0 : $.dark.size, k = (P = (q = i.colorSchemes) == null ? void 0 : q.dark) == null ? void 0 : P.surfaceVariant, F = (I = (R = i.customRadius) == null ? void 0 : R.light) == null ? void 0 : I.xl, M = (H = (z = (D = (L = i.colorSchemes) == null ? void 0 : L.light) == null ? void 0 : D.palette) == null ? void 0 : z.primary) == null ? void 0 : H.plainColor, V = (m = (y = (B = (v = i.colorSchemes) == null ? void 0 : v.light) == null ? void 0 : B.palette) == null ? void 0 : y.primary) == null ? void 0 : m.onPrimary, c = ue({
|
|
404
405
|
spacingScale: s,
|
|
405
406
|
secondaryColor: S,
|
|
406
407
|
fontFamilyPrimary: p,
|
|
@@ -436,7 +437,7 @@ const te = (e) => {
|
|
|
436
437
|
] })
|
|
437
438
|
] });
|
|
438
439
|
}, re = ({ children: e }) => {
|
|
439
|
-
const i = U().md, s = h().surface, a = h().secondaryContainer, t =
|
|
440
|
+
const i = U().md, s = h().surface, a = h().secondaryContainer, t = se().size + " solid " + a;
|
|
440
441
|
return /* @__PURE__ */ n(
|
|
441
442
|
o,
|
|
442
443
|
{
|
|
@@ -1223,7 +1224,7 @@ function ke(e) {
|
|
|
1223
1224
|
const Fe = (e) => e.template === w.OVERLAY ? /* @__PURE__ */ n(be, {}) : ke(e) ? /* @__PURE__ */ n(Se, { imagePosition: e.imagePosition || "left" }) : /* @__PURE__ */ n(Te, {}), Pe = (e) => {
|
|
1224
1225
|
var i;
|
|
1225
1226
|
return /* @__PURE__ */ n(
|
|
1226
|
-
|
|
1227
|
+
me,
|
|
1227
1228
|
{
|
|
1228
1229
|
packageName: "collect-lead",
|
|
1229
1230
|
entityId: ((i = e.content) == null ? void 0 : i.id) || "",
|
|
@@ -1251,7 +1252,7 @@ const Fe = (e) => e.template === w.OVERLAY ? /* @__PURE__ */ n(be, {}) : ke(e) ?
|
|
|
1251
1252
|
)
|
|
1252
1253
|
}
|
|
1253
1254
|
);
|
|
1254
|
-
},
|
|
1255
|
+
}, We = Pe;
|
|
1255
1256
|
export {
|
|
1256
|
-
|
|
1257
|
+
We as CollectLead
|
|
1257
1258
|
};
|
package/Discussion.js
CHANGED
package/EitherOrPlay.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { jsx as t, jsxs as g, Fragment as De } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { S as tn,
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
2
|
+
import { useState as D, useEffect as ge, useRef as qe, useCallback as Le } from "react";
|
|
3
|
+
import { m as Ce, c as be, l as ze, B as r, T as x, f as se, i as xe, a as q, b as he, e as pe, j as me, Q as Ht, u as Me, d as jt, W as Se, n as St, o as Gt } from "./chunks/PrizeCard-DF3QxwQJ.js";
|
|
4
|
+
import { P as Vt } from "./chunks/Portal-Cs0dgwmH.js";
|
|
5
|
+
import "react-dom";
|
|
6
|
+
import { S as He } from "./chunks/Spinner-DbUB64Gj.js";
|
|
7
|
+
import { z as Nt } from "./chunks/index-D1K1OB4p.js";
|
|
8
|
+
import { g as Yt, h as re, e as je, a as Ct } from "./chunks/helpers-NuC1SzL3.js";
|
|
9
|
+
import { S as _t, N as qt, O as Kt } from "./chunks/NotFoundSkeleton-Cs6DtD9u.js";
|
|
10
|
+
import { u as Xt, b as Ge, d as Ke, a as Xe } from "./chunks/useImageVariant-Cex1eIqq.js";
|
|
11
|
+
import { A as Ze, O as Zt } from "./chunks/ArrowRightAlt-DKADQN2o.js";
|
|
12
|
+
import { F as Fe, a as It } from "./chunks/FavoriteBorder-DUK_DrY4.js";
|
|
13
|
+
import { E as Pe } from "./chunks/EmojiEvents-DpmLq98V.js";
|
|
14
|
+
import { C as Ne } from "./chunks/CheckCircle-CV9iMpkZ.js";
|
|
15
|
+
import { T as Qt } from "./chunks/TimerOutlined-DWE7f0YX.js";
|
|
16
|
+
import { S as we } from "./chunks/Stack-BpHk5eb0.js";
|
|
17
|
+
import { A as Jt, S as Tt, O as en } from "./chunks/OverlayApiErrorSkeleton-Dl3s5Oaf.js";
|
|
18
|
+
import { S as tn, T as nn, P as rn } from "./chunks/Person-BGdniS_p.js";
|
|
19
|
+
import { A as on } from "./chunks/Avatar-K1EWhhkA.js";
|
|
20
|
+
import { t as vt, T as Pt, a as kt, b as Ee, c as We } from "./chunks/Tabs-hwJ7jsUl.js";
|
|
21
|
+
import { S as ln, a as an, O as sn, b as cn } from "./chunks/OverlayLeadAfterCollection-F2TAV9wK.js";
|
|
22
|
+
import { C as dn } from "./chunks/CollectLeadForm-DnLKA8qz.js";
|
|
22
23
|
const un = Ce([/* @__PURE__ */ t("path", {
|
|
23
24
|
d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"
|
|
24
25
|
}, "0"), /* @__PURE__ */ t("path", {
|
|
@@ -41,10 +42,10 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
41
42
|
const h = await n.miniGames.getEitherOrById(e, !0);
|
|
42
43
|
s(h);
|
|
43
44
|
} catch (h) {
|
|
44
|
-
console.error(h), s(new
|
|
45
|
+
console.error(h), s(new Nt());
|
|
45
46
|
}
|
|
46
47
|
};
|
|
47
|
-
return
|
|
48
|
+
return ge(() => (d(), () => s(null)), [e, n]), i;
|
|
48
49
|
}, fn = (e, n, i = !1) => {
|
|
49
50
|
const [s, d] = D(null), [h, l] = D(!1), [u, a] = D(!1), m = async () => {
|
|
50
51
|
try {
|
|
@@ -72,7 +73,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
72
73
|
a(!0);
|
|
73
74
|
}
|
|
74
75
|
};
|
|
75
|
-
return
|
|
76
|
+
return ge(() => (m(), () => {
|
|
76
77
|
d(null), l(!1), a(!1);
|
|
77
78
|
}), [e, n, i]), {
|
|
78
79
|
myStats: s,
|
|
@@ -197,7 +198,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
197
198
|
showSignInCTA: s
|
|
198
199
|
}) => {
|
|
199
200
|
var k, v, W, R, F, E, O, o, z;
|
|
200
|
-
const { t: d } = se(), h = xe(), l = ze(), u = ((k = n == null ? void 0 : n.branding) == null ? void 0 : k.colors) || null, a = (u == null ? void 0 : u.primaryColor) || q().palette.primary.plainColor, m = q().palette.primary.onPrimary, y = (u == null ? void 0 : u.contentColor) || q().textColor, b = q().surfaceVariant, f = be().primary, I =
|
|
201
|
+
const { t: d } = se(), h = xe(), l = ze(), u = ((k = n == null ? void 0 : n.branding) == null ? void 0 : k.colors) || null, a = (u == null ? void 0 : u.primaryColor) || q().palette.primary.plainColor, m = q().palette.primary.onPrimary, y = (u == null ? void 0 : u.contentColor) || q().textColor, b = q().surfaceVariant, f = be().primary, I = he().xl, L = he().md, p = pe(), S = re(a || ""), C = re(b || ""), P = S ? `rgba(${S.replace(/[^\d,]/g, "")}, 0.12)` : `${a}20`, c = h ? ((W = (v = n == null ? void 0 : n.branding) == null ? void 0 : v.images) == null ? void 0 : W.mobileLogo) || ((F = (R = n == null ? void 0 : n.branding) == null ? void 0 : R.images) == null ? void 0 : F.mainLogo) || "" : ((O = (E = n == null ? void 0 : n.branding) == null ? void 0 : E.images) == null ? void 0 : O.mainLogo) || "", B = [
|
|
201
202
|
{
|
|
202
203
|
icon: /* @__PURE__ */ t(zt, { sx: { fontSize: "1.1em" } }),
|
|
203
204
|
title: d("eitherOr.tutorial.step1Title"),
|
|
@@ -339,7 +340,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
339
340
|
me,
|
|
340
341
|
{
|
|
341
342
|
variant: "soft",
|
|
342
|
-
endDecorator: /* @__PURE__ */ t(
|
|
343
|
+
endDecorator: /* @__PURE__ */ t(Ze, {}),
|
|
343
344
|
onClick: s && i ? i.onClick : e,
|
|
344
345
|
sx: {
|
|
345
346
|
borderRadius: I,
|
|
@@ -468,7 +469,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
468
469
|
brandingPrimaryColor: h,
|
|
469
470
|
optionIndex: l = 0
|
|
470
471
|
}) => {
|
|
471
|
-
const u = q(), a = pe(), m = h || u.palette.primary.plainColor, y = u.palette.primary.onPrimary, b = u.palette.success.plainColor, f = u.palette.danger.plainColor, I = re(m || ""), L = I ? I.replace(/[^\d,]/g, "") : null, p =
|
|
472
|
+
const u = q(), a = pe(), m = h || u.palette.primary.plainColor, y = u.palette.primary.onPrimary, b = u.palette.success.plainColor, f = u.palette.danger.plainColor, I = re(m || ""), L = I ? I.replace(/[^\d,]/g, "") : null, p = Xt(e.images ?? null), S = !!p, C = l === 0 ? "A" : "B", P = i.selectedOption === e.id, c = P && !!i.isCorrect || e.id === i.correctOptionId, B = P && !i.isCorrect || !!i.timedOut && e.id !== i.correctOptionId;
|
|
472
473
|
if (!S) {
|
|
473
474
|
const k = l === 0 ? "135deg" : "225deg", v = c ? `linear-gradient(${k}, ${b}20 0%, ${b}0D 100%)` : B ? `linear-gradient(${k}, ${f}20 0%, ${f}0D 100%)` : L ? `linear-gradient(${k}, rgba(${L}, 0.22) 0%, rgba(${L}, 0.08) 60%, rgba(${L}, 0.14) 100%)` : `linear-gradient(${k}, ${m}38 0%, ${m}14 60%, ${m}24 100%)`, W = L ? `repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(${L}, 0.04) 10px, rgba(${L}, 0.04) 11px)` : "none", R = c ? b : B ? f : L ? `rgba(${L}, 0.3)` : `${m}4D`, F = c ? b : B ? f : m;
|
|
474
475
|
return /* @__PURE__ */ g(
|
|
@@ -666,7 +667,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
666
667
|
maxTime: n,
|
|
667
668
|
brandingPrimaryColor: i
|
|
668
669
|
}) => {
|
|
669
|
-
const s = q().palette.danger.softBg, d = q().palette.danger.plainColor, h = q().palette.warning.softBg, l = q().palette.warning.plainColor, u = i || q().palette.primary.plainColor, a = q().palette.primary.onPrimary, m =
|
|
670
|
+
const s = q().palette.danger.softBg, d = q().palette.danger.plainColor, h = q().palette.warning.softBg, l = q().palette.warning.plainColor, u = i || q().palette.primary.plainColor, a = q().palette.primary.onPrimary, m = he().xl, y = be().secondary, b = pe(), f = {
|
|
670
671
|
"@keyframes pulse": {
|
|
671
672
|
"0%": { transform: "scale(1)" },
|
|
672
673
|
"50%": { transform: "scale(1.05)" },
|
|
@@ -709,7 +710,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
709
710
|
},
|
|
710
711
|
children: [
|
|
711
712
|
/* @__PURE__ */ t(
|
|
712
|
-
|
|
713
|
+
Qt,
|
|
713
714
|
{
|
|
714
715
|
sx: {
|
|
715
716
|
width: "24px",
|
|
@@ -749,8 +750,8 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
749
750
|
game: a
|
|
750
751
|
}) => {
|
|
751
752
|
var X, oe, ee, te, ie, ce, _, j, w, $;
|
|
752
|
-
const [m, y] = D(0), [b, f] = D(!1), [I, L] = D(0), [p, S] = D(0), [C, P] = D(!1), c = qe(0), { t: B } = se(), k = xe(), v = ze(), W = q(), R = W.surfaceVariant, F = u || W.palette.primary.plainColor, E = ((oe = (X = a == null ? void 0 : a.branding) == null ? void 0 : X.colors) == null ? void 0 : oe.contentColor) || W.textColor, O =
|
|
753
|
-
|
|
753
|
+
const [m, y] = D(0), [b, f] = D(!1), [I, L] = D(0), [p, S] = D(0), [C, P] = D(!1), c = qe(0), { t: B } = se(), k = xe(), v = ze(), W = q(), R = W.surfaceVariant, F = u || W.palette.primary.plainColor, E = ((oe = (X = a == null ? void 0 : a.branding) == null ? void 0 : X.colors) == null ? void 0 : oe.contentColor) || W.textColor, O = he().md, o = pe(), z = re(R || ""), H = re(F || ""), U = k ? ((te = (ee = a == null ? void 0 : a.branding) == null ? void 0 : ee.images) == null ? void 0 : te.mobileLogo) || ((ce = (ie = a == null ? void 0 : a.branding) == null ? void 0 : ie.images) == null ? void 0 : ce.mainLogo) || "" : ((j = (_ = a == null ? void 0 : a.branding) == null ? void 0 : _.images) == null ? void 0 : j.mainLogo) || "", N = B("common.labels.point", { count: m });
|
|
754
|
+
ge(() => {
|
|
754
755
|
if (l != null && l.currentPoints && l.currentPoints > m) {
|
|
755
756
|
L(l.currentPoints - m), f(!0), S((V) => V + 1);
|
|
756
757
|
const A = setTimeout(() => f(!1), 1e3);
|
|
@@ -758,7 +759,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
758
759
|
}
|
|
759
760
|
}, [l == null ? void 0 : l.currentPoints, m]);
|
|
760
761
|
const Y = (a == null ? void 0 : a.points) ?? [], T = Y.length >= 2 ? Y[1].correctSteps - Y[0].correctSteps : ((w = Y[0]) == null ? void 0 : w.correctSteps) || 5;
|
|
761
|
-
|
|
762
|
+
ge(() => {
|
|
762
763
|
const A = c.current, V = (l == null ? void 0 : l.currentStreak) ?? 0;
|
|
763
764
|
if (c.current = V, V > A && V > 0 && V % T === 0) {
|
|
764
765
|
P(!0);
|
|
@@ -1025,8 +1026,8 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
1025
1026
|
additionalCTA: h
|
|
1026
1027
|
}) => {
|
|
1027
1028
|
var oe, ee, te, ie, ce, _, j, w, $;
|
|
1028
|
-
const { t: l } = se(), u = q(), a = d || u.palette.primary.plainColor, m = u.palette.primary.onPrimary, y = ((ee = (oe = n == null ? void 0 : n.branding) == null ? void 0 : oe.colors) == null ? void 0 : ee.contentColor) || u.textColor, b = u.palette.success.plainColor, f = u.palette.danger.plainColor, I = u.palette.success.softBg, L = u.palette.danger.softBg, p =
|
|
1029
|
-
if (
|
|
1029
|
+
const { t: l } = se(), u = q(), a = d || u.palette.primary.plainColor, m = u.palette.primary.onPrimary, y = ((ee = (oe = n == null ? void 0 : n.branding) == null ? void 0 : oe.colors) == null ? void 0 : ee.contentColor) || u.textColor, b = u.palette.success.plainColor, f = u.palette.danger.plainColor, I = u.palette.success.softBg, L = u.palette.danger.softBg, p = he().md, S = he().xl, C = pe(), P = be().primary, c = xe(), B = ze(), k = re(a || ""), v = k ? k.replace(/[^\d,]/g, "") : null, W = c ? ((ie = (te = n == null ? void 0 : n.branding) == null ? void 0 : te.images) == null ? void 0 : ie.mobileLogo) || ((_ = (ce = n == null ? void 0 : n.branding) == null ? void 0 : ce.images) == null ? void 0 : _.mainLogo) || "" : ((w = (j = n == null ? void 0 : n.branding) == null ? void 0 : j.images) == null ? void 0 : w.mainLogo) || "", [R, F] = D(0), [E, O] = D(null), o = (e == null ? void 0 : e.currentPoints) ?? 0, z = R > 0 && o >= R;
|
|
1030
|
+
if (ge(() => {
|
|
1030
1031
|
n && (async () => {
|
|
1031
1032
|
try {
|
|
1032
1033
|
const V = await i.miniGames.getMyEitherOrStats(n.id);
|
|
@@ -1493,7 +1494,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
1493
1494
|
me,
|
|
1494
1495
|
{
|
|
1495
1496
|
variant: "soft",
|
|
1496
|
-
endDecorator: /* @__PURE__ */ t(
|
|
1497
|
+
endDecorator: /* @__PURE__ */ t(Ze, {}),
|
|
1497
1498
|
onClick: s,
|
|
1498
1499
|
sx: {
|
|
1499
1500
|
borderRadius: S,
|
|
@@ -1529,7 +1530,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
1529
1530
|
}
|
|
1530
1531
|
),
|
|
1531
1532
|
/* @__PURE__ */ t(
|
|
1532
|
-
|
|
1533
|
+
Jt,
|
|
1533
1534
|
{
|
|
1534
1535
|
additionalCTA: h,
|
|
1535
1536
|
buttonStyle: {
|
|
@@ -1557,8 +1558,8 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
1557
1558
|
primaryColor: i,
|
|
1558
1559
|
textColor: s
|
|
1559
1560
|
}) => {
|
|
1560
|
-
const { t: d } = se(), h = q(), l =
|
|
1561
|
-
if (
|
|
1561
|
+
const { t: d } = se(), h = q(), l = he(), u = pe(), a = be().primary, m = h.outlineEnabledBorder, y = re(i), [b, f] = D(null), [I, L] = D(!1);
|
|
1562
|
+
if (ge(() => {
|
|
1562
1563
|
const O = requestAnimationFrame(() => {
|
|
1563
1564
|
setTimeout(() => L(!0), 80);
|
|
1564
1565
|
});
|
|
@@ -1813,8 +1814,8 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
1813
1814
|
brandingPrimaryColor: s
|
|
1814
1815
|
}) => {
|
|
1815
1816
|
var T;
|
|
1816
|
-
const { t: d } = se(), h = Me(), l = q(), u = ((T = e == null ? void 0 : e.branding) == null ? void 0 : T.colors) || null, a = s || (u == null ? void 0 : u.primaryColor) || l.palette.primary.plainColor, m = (u == null ? void 0 : u.contentColor) || l.textColor, y = be().primary, b = be().secondary, f =
|
|
1817
|
-
|
|
1817
|
+
const { t: d } = se(), h = Me(), l = q(), u = ((T = e == null ? void 0 : e.branding) == null ? void 0 : T.colors) || null, a = s || (u == null ? void 0 : u.primaryColor) || l.palette.primary.plainColor, m = (u == null ? void 0 : u.contentColor) || l.textColor, y = be().primary, b = be().secondary, f = he(), I = pe(), L = ze(), p = l.surfaceVariant, S = h.colorSchemes.light.palette.primary.onPrimary, C = l.outlineEnabledBorder, [P, c] = D(null), [B, k] = D(!0), [v, W] = D(0), [R, F] = D(null), [E, O] = D("leaderboard"), o = (i == null ? void 0 : i.currentPoints) ?? 0;
|
|
1818
|
+
ge(() => {
|
|
1818
1819
|
(async () => {
|
|
1819
1820
|
try {
|
|
1820
1821
|
if (!e) return;
|
|
@@ -2071,8 +2072,8 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2071
2072
|
children: d("eitherOr.leaderboard.top50Note", "Top 50")
|
|
2072
2073
|
}
|
|
2073
2074
|
),
|
|
2074
|
-
/* @__PURE__ */ t(
|
|
2075
|
-
|
|
2075
|
+
/* @__PURE__ */ t(tn, { sx: z.tableContainer, children: /* @__PURE__ */ g(
|
|
2076
|
+
nn,
|
|
2076
2077
|
{
|
|
2077
2078
|
variant: "outlined",
|
|
2078
2079
|
hoverRow: !1,
|
|
@@ -2098,7 +2099,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2098
2099
|
Q + 1
|
|
2099
2100
|
] }) }),
|
|
2100
2101
|
/* @__PURE__ */ t("td", { style: z.tableCellName, children: /* @__PURE__ */ g(r, { sx: z.nameCell, children: [
|
|
2101
|
-
/* @__PURE__ */ t(
|
|
2102
|
+
/* @__PURE__ */ t(on, { src: oe, sx: z.leaderboardAvatar, children: !oe && /* @__PURE__ */ t(rn, { sx: z.avatarIcon }) }),
|
|
2102
2103
|
/* @__PURE__ */ t(
|
|
2103
2104
|
x,
|
|
2104
2105
|
{
|
|
@@ -2204,7 +2205,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2204
2205
|
children: e,
|
|
2205
2206
|
brandingBorderColor: n
|
|
2206
2207
|
}) => {
|
|
2207
|
-
const i =
|
|
2208
|
+
const i = he().md, s = n || q().secondaryContainer, d = q().surface, h = jt().size, l = xe(), u = h + " solid " + s;
|
|
2208
2209
|
return /* @__PURE__ */ t(
|
|
2209
2210
|
r,
|
|
2210
2211
|
{
|
|
@@ -2241,7 +2242,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2241
2242
|
onSelection: L,
|
|
2242
2243
|
onPlayAgain: p,
|
|
2243
2244
|
imagePosition: S = "left"
|
|
2244
|
-
} = e, { t: C } = se(), P = q(), c = ((M = n == null ? void 0 : n.branding) == null ? void 0 : M.colors) || null, B = (c == null ? void 0 : c.primaryColor) || P.palette.primary.plainColor, k = P.secondaryContainer, v = P.surfaceTintDim, W = ((G = re(v || "")) == null ? void 0 : G.replace(/[^\d,]/g, "")) ?? null, R =
|
|
2245
|
+
} = e, { t: C } = se(), P = q(), c = ((M = n == null ? void 0 : n.branding) == null ? void 0 : M.colors) || null, B = (c == null ? void 0 : c.primaryColor) || P.palette.primary.plainColor, k = P.secondaryContainer, v = P.surfaceTintDim, W = ((G = re(v || "")) == null ? void 0 : G.replace(/[^\d,]/g, "")) ?? null, R = he().md, F = be().primary, E = pe(), O = xe(), [o, z] = D(0), H = Ge(
|
|
2245
2246
|
{
|
|
2246
2247
|
images: n == null ? void 0 : n.images,
|
|
2247
2248
|
imagePlaceholder: m || ""
|
|
@@ -2407,7 +2408,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2407
2408
|
]
|
|
2408
2409
|
}
|
|
2409
2410
|
) }) : N ? /* @__PURE__ */ t(ye, { brandingBorderColor: (c == null ? void 0 : c.borderColor) || null, children: /* @__PURE__ */ t(r, { sx: T, children: U() }) }) : /* @__PURE__ */ t(ye, { brandingBorderColor: (c == null ? void 0 : c.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2410
|
-
|
|
2411
|
+
_t,
|
|
2411
2412
|
{
|
|
2412
2413
|
entity: n,
|
|
2413
2414
|
headline: C("eitherOr.headline", "Either/Or"),
|
|
@@ -2420,7 +2421,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2420
2421
|
}, Tn = () => {
|
|
2421
2422
|
const { t: e } = se();
|
|
2422
2423
|
return /* @__PURE__ */ t(ye, { brandingBorderColor: null, children: /* @__PURE__ */ t(
|
|
2423
|
-
|
|
2424
|
+
qt,
|
|
2424
2425
|
{
|
|
2425
2426
|
notFoundTitle: e("eitherOr.eitherOrNotFound"),
|
|
2426
2427
|
notFoundMessage: e("eitherOr.eitherOrNotFoundDescription")
|
|
@@ -2482,7 +2483,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2482
2483
|
imagePlaceholder: e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : ""
|
|
2483
2484
|
},
|
|
2484
2485
|
Se.STANDARD
|
|
2485
|
-
), h = be().primary, l =
|
|
2486
|
+
), h = be().primary, l = he().xl, u = (n == null ? void 0 : n.primaryColor) || q().palette.primary.plainColor, a = q().palette.primary.onPrimary, m = (n == null ? void 0 : n.contentColor) || q().textColor, y = i ? ((S = e.eitherOr.branding) == null ? void 0 : S.images.mobileLogo) || ((C = e.eitherOr.branding) == null ? void 0 : C.images.mainLogo) || "" : ((P = e.eitherOr.branding) == null ? void 0 : P.images.mainLogo) || "", { t: b } = se(), f = e.imagePosition || "left", I = vn({
|
|
2486
2487
|
fontFamilyPrimary: h,
|
|
2487
2488
|
buttonRadius: l,
|
|
2488
2489
|
primaryColor: u,
|
|
@@ -2553,7 +2554,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2553
2554
|
);
|
|
2554
2555
|
};
|
|
2555
2556
|
return /* @__PURE__ */ t(ye, { brandingBorderColor: (n == null ? void 0 : n.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2556
|
-
|
|
2557
|
+
ln,
|
|
2557
2558
|
{
|
|
2558
2559
|
entity: e.eitherOr,
|
|
2559
2560
|
headline: b("eitherOr.headline"),
|
|
@@ -2667,7 +2668,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2667
2668
|
onClick: u
|
|
2668
2669
|
};
|
|
2669
2670
|
return /* @__PURE__ */ t(
|
|
2670
|
-
|
|
2671
|
+
dn,
|
|
2671
2672
|
{
|
|
2672
2673
|
sdk: e,
|
|
2673
2674
|
content: {
|
|
@@ -2699,7 +2700,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2699
2700
|
}, wn = (e) => {
|
|
2700
2701
|
const { t: n } = se();
|
|
2701
2702
|
return /* @__PURE__ */ t(
|
|
2702
|
-
|
|
2703
|
+
an,
|
|
2703
2704
|
{
|
|
2704
2705
|
entity: e.eitherOr,
|
|
2705
2706
|
headline: n("eitherOr.headline"),
|
|
@@ -2847,7 +2848,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2847
2848
|
onPlayAgain: p
|
|
2848
2849
|
} = e, S = Me(), C = pe(), P = xe(), { t: c } = se(), [B, k] = D(0), [v, W] = D(0), [R, F] = D(!1), [E, O] = D(0), [o, z] = D(0), [H, U] = D(!1), N = qe(0), { brandingImage: Y, brandingColors: T } = je(
|
|
2849
2850
|
n.branding || null
|
|
2850
|
-
), M = m || (P ?
|
|
2851
|
+
), M = m || (P ? Ke : Xe), G = Ge(
|
|
2851
2852
|
{ images: n == null ? void 0 : n.images, imagePlaceholder: M },
|
|
2852
2853
|
Se.OVERLAY
|
|
2853
2854
|
), Q = Y || G, X = Ct(Q), oe = St(
|
|
@@ -2863,7 +2864,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2863
2864
|
darkTextColor: $,
|
|
2864
2865
|
isMobile: P
|
|
2865
2866
|
});
|
|
2866
|
-
|
|
2867
|
+
ge(() => {
|
|
2867
2868
|
if (s != null && s.currentPoints && s.currentPoints > v) {
|
|
2868
2869
|
O(s.currentPoints - v), F(!0), z((ae) => ae + 1);
|
|
2869
2870
|
const ne = setTimeout(() => F(!1), 1e3);
|
|
@@ -2871,7 +2872,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2871
2872
|
}
|
|
2872
2873
|
}, [s == null ? void 0 : s.currentPoints, v]);
|
|
2873
2874
|
const Ie = (n == null ? void 0 : n.points) ?? [], Te = Ie.length >= 2 ? Ie[1].correctSteps - Ie[0].correctSteps : ((gt = Ie[0]) == null ? void 0 : gt.correctSteps) || 5;
|
|
2874
|
-
|
|
2875
|
+
ge(() => {
|
|
2875
2876
|
const ne = N.current, ae = (s == null ? void 0 : s.currentStreak) ?? 0;
|
|
2876
2877
|
if (N.current = ae, ae > ne && ae > 0 && ae % Te === 0) {
|
|
2877
2878
|
U(!0);
|
|
@@ -3362,7 +3363,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
3362
3363
|
{
|
|
3363
3364
|
variant: "soft",
|
|
3364
3365
|
sx: { ...J.startButton, ...J.pulseAnimation },
|
|
3365
|
-
endDecorator: /* @__PURE__ */ t(
|
|
3366
|
+
endDecorator: /* @__PURE__ */ t(Ze, {}),
|
|
3366
3367
|
onClick: I,
|
|
3367
3368
|
children: /* @__PURE__ */ t(x, { sx: J.startButtonText, children: c("eitherOr.buttons.start") })
|
|
3368
3369
|
}
|
|
@@ -3381,7 +3382,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
3381
3382
|
}
|
|
3382
3383
|
};
|
|
3383
3384
|
return d === K.RESULTS ? /* @__PURE__ */ t(
|
|
3384
|
-
|
|
3385
|
+
Zt,
|
|
3385
3386
|
{
|
|
3386
3387
|
entity: n,
|
|
3387
3388
|
backgroundImage: X,
|
|
@@ -3390,7 +3391,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
3390
3391
|
children: Ut()
|
|
3391
3392
|
}
|
|
3392
3393
|
) : /* @__PURE__ */ t(
|
|
3393
|
-
|
|
3394
|
+
Kt,
|
|
3394
3395
|
{
|
|
3395
3396
|
entity: n,
|
|
3396
3397
|
headline: c("eitherOr.headline"),
|
|
@@ -3441,7 +3442,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
3441
3442
|
var P, c, B, k, v, W, R, F, E, O, o;
|
|
3442
3443
|
const n = Me(), { t: i } = se(), s = xe(), d = St(
|
|
3443
3444
|
Se.OVERLAY
|
|
3444
|
-
), h = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : s ?
|
|
3445
|
+
), h = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : s ? Ke : Xe, l = Ge(
|
|
3445
3446
|
{ images: e.eitherOr.images, imagePlaceholder: h },
|
|
3446
3447
|
Se.OVERLAY
|
|
3447
3448
|
), { brandingImage: u, brandingColors: a, brandingLogo: m } = je(e.eitherOr.branding || null), b = Ct(u || l), f = (c = (P = n.customRadius) == null ? void 0 : P.light) == null ? void 0 : c.xl, I = (a == null ? void 0 : a.primaryColor) || ((W = (v = (k = (B = n.colorSchemes) == null ? void 0 : B.light) == null ? void 0 : k.palette) == null ? void 0 : v.primary) == null ? void 0 : W.plainColor), L = (O = (E = (F = (R = n.colorSchemes) == null ? void 0 : R.light) == null ? void 0 : F.palette) == null ? void 0 : E.primary) == null ? void 0 : O.onPrimary, p = n.customFontFamily.dark.primary, S = On({
|
|
@@ -3489,7 +3490,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
3489
3490
|
) : /* @__PURE__ */ t(me, { variant: "soft", sx: S.signInButton, disabled: !0, children: /* @__PURE__ */ t(x, { sx: S.signInButtonText, children: e.signInCTA.defaultLabel || i("common.signIn") }) }) : /* @__PURE__ */ t(me, { variant: "soft", sx: S.signInButton, disabled: !0, children: /* @__PURE__ */ t(x, { sx: S.signInButtonText, children: i("common.signIn") }) });
|
|
3490
3491
|
};
|
|
3491
3492
|
return /* @__PURE__ */ t(
|
|
3492
|
-
|
|
3493
|
+
sn,
|
|
3493
3494
|
{
|
|
3494
3495
|
entity: e.eitherOr,
|
|
3495
3496
|
headline: i("eitherOr.headline"),
|
|
@@ -3508,11 +3509,11 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
3508
3509
|
}
|
|
3509
3510
|
);
|
|
3510
3511
|
}, Bn = (e) => {
|
|
3511
|
-
const { t: n } = se(), i = xe(), s = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : i ?
|
|
3512
|
+
const { t: n } = se(), i = xe(), s = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : i ? Ke : Xe, { brandingLogo: d } = je(
|
|
3512
3513
|
e.eitherOr.branding || null
|
|
3513
3514
|
);
|
|
3514
3515
|
return /* @__PURE__ */ t(
|
|
3515
|
-
|
|
3516
|
+
en,
|
|
3516
3517
|
{
|
|
3517
3518
|
entity: e.eitherOr,
|
|
3518
3519
|
headline: n("eitherOr.headline"),
|
|
@@ -3539,7 +3540,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
3539
3540
|
}, $n = (e) => {
|
|
3540
3541
|
const { t: n } = se();
|
|
3541
3542
|
return /* @__PURE__ */ t(
|
|
3542
|
-
|
|
3543
|
+
cn,
|
|
3543
3544
|
{
|
|
3544
3545
|
entity: e.eitherOr,
|
|
3545
3546
|
headline: n("eitherOr.headline"),
|
|
@@ -3571,9 +3572,9 @@ const Dn = (e) => {
|
|
|
3571
3572
|
setIsUnauthorized: z,
|
|
3572
3573
|
setIsApiError: H
|
|
3573
3574
|
} = fn(e.entityId, e.sdk, I);
|
|
3574
|
-
|
|
3575
|
+
ge(() => {
|
|
3575
3576
|
Gt(e.language || "en");
|
|
3576
|
-
}, [e.language]),
|
|
3577
|
+
}, [e.language]), ge(() => {
|
|
3577
3578
|
o && o.id && i(K.TUTORIAL);
|
|
3578
3579
|
}, [o]);
|
|
3579
3580
|
const U = () => ({
|
|
@@ -3822,7 +3823,7 @@ const Dn = (e) => {
|
|
|
3822
3823
|
onPlayAgain: G
|
|
3823
3824
|
}
|
|
3824
3825
|
) : /* @__PURE__ */ t(De, {});
|
|
3825
|
-
}, Fn = (e) => /* @__PURE__ */ t(
|
|
3826
|
+
}, Fn = (e) => /* @__PURE__ */ t(Vt, { packageName: "either-or-play", ...e, children: /* @__PURE__ */ t(Dn, { ...e }) }), ir = Fn;
|
|
3826
3827
|
export {
|
|
3827
|
-
|
|
3828
|
+
ir as EitherOrPlay
|
|
3828
3829
|
};
|