fansunited-frontend-components 0.0.95 → 0.0.96
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/Betslip.d.ts +1 -2
- package/Betslip.d.ts.map +1 -1
- package/Betslip.js +4 -3
- package/ChanceGame.js +165 -163
- package/ChanceGameComponent.d.ts +1 -1
- package/ChanceGameComponent.d.ts.map +1 -1
- package/ClassicQuizPlay.d.ts +1 -1
- package/ClassicQuizPlay.d.ts.map +1 -1
- package/ClassicQuizPlay.js +4 -3
- package/CollectLead.d.ts +1 -1
- package/CollectLead.d.ts.map +1 -1
- package/CollectLead.js +37 -36
- package/CompetitionStatistics.d.ts +1 -2
- package/CompetitionStatistics.d.ts.map +1 -1
- package/CompetitionStatistics.js +458 -451
- package/CompetitorCard.d.ts +1 -2
- package/CompetitorCard.d.ts.map +1 -1
- package/CompetitorCard.js +1235 -1226
- package/Discussion.d.ts +1 -1
- package/Discussion.d.ts.map +1 -1
- package/Discussion.js +4 -3
- package/EitherOrPlay.d.ts +1 -1
- package/EitherOrPlay.d.ts.map +1 -1
- package/EitherOrPlay.js +4 -3
- package/EventCard.d.ts +1 -2
- package/EventCard.d.ts.map +1 -1
- package/EventCard.js +1249 -1244
- package/EventGamePlay.d.ts +1 -1
- package/EventGamePlay.d.ts.map +1 -1
- package/EventGamePlay.js +4 -3
- package/Leaderboard.d.ts +1 -1
- package/Leaderboard.d.ts.map +1 -1
- package/Leaderboard.js +482 -449
- package/List.d.ts +1 -2
- package/List.d.ts.map +1 -1
- package/List.js +258 -254
- package/MatchQuizPlay.d.ts +1 -1
- package/MatchQuizPlay.d.ts.map +1 -1
- package/MatchQuizPlay.js +4 -3
- package/Odds.d.ts +1 -2
- package/Odds.d.ts.map +1 -1
- package/Odds.js +35 -34
- package/PersonalityQuizPlay.d.ts +1 -1
- package/PersonalityQuizPlay.d.ts.map +1 -1
- package/PersonalityQuizPlay.js +4 -3
- package/PickThePair.js +102 -100
- package/PickThePairComponent.d.ts +1 -1
- package/PickThePairComponent.d.ts.map +1 -1
- package/PlayerOfTheMatch.d.ts +1 -2
- package/PlayerOfTheMatch.d.ts.map +1 -1
- package/PlayerOfTheMatch.js +1096 -1085
- package/PollVote.d.ts +1 -1
- package/PollVote.d.ts.map +1 -1
- package/PollVote.js +4 -3
- package/Predictor.d.ts +1 -2
- package/Predictor.d.ts.map +1 -1
- package/Predictor.js +4553 -4525
- package/README.md +1 -1
- package/Standings.d.ts +1 -2
- package/Standings.d.ts.map +1 -1
- package/Standings.js +404 -394
- package/TopX.d.ts +1 -2
- package/TopX.d.ts.map +1 -1
- package/TopX.js +5296 -5286
- package/chunks/{ChanceGameEmbedVariant-C3NGwvTF.js → ChanceGameEmbedVariant-CVys-3Zh.js} +1 -1
- package/chunks/{OddsSkeleton-Bav8FHHN.js → OddsSkeleton-ClJE2xhR.js} +5 -5
- package/chunks/{OddsStrip-CviVfQI4.js → OddsStrip-BnSp5TXa.js} +3 -3
- package/chunks/{PickOneOfX-a6Dv0-rR.js → PickOneOfX-DaJtkbCw.js} +6 -6
- package/chunks/index-Aq5MbUB9.js +4 -0
- package/chunks/index-BBQm_8LD.js +4 -0
- package/chunks/index-BC_sWWgc.js +4 -0
- package/chunks/index-DXKDJ1Vp.js +4 -0
- package/chunks/index-DjT5NrbA.js +4 -0
- package/chunks/index-DvLRehH6.js +4 -0
- package/chunks/index-aIMaxR-p.js +4 -0
- package/chunks/{main-Dj4Manb5.js → main-52Wff7qC.js} +1763 -1757
- package/chunks/{main-dwV_55lz.js → main-65WcUqAl.js} +615 -615
- package/chunks/{main-gexg6lc-.js → main-B58mi9jx.js} +349 -334
- package/chunks/{main-Dys2_Jt2.js → main-BIdXUTZS.js} +842 -827
- package/chunks/{main-CFwRpvUi.js → main-DD-NEzC7.js} +818 -817
- package/chunks/{main-DjiQz1dv.js → main-DUnfJPzY.js} +311 -311
- package/chunks/{main-eAQMCxQ7.js → main-DpCBqqg_.js} +322 -321
- package/chunks/{main-D9tFZv2q.js → main-Drznt1ak.js} +283 -282
- package/chunks/withVersionStamp-B6nArAj4.js +16 -0
- package/index.d.ts.map +1 -1
- package/index.js +45 -50
- package/package.json +57 -49
- package/withVersionStamp.d.ts +4 -0
- package/withVersionStamp.d.ts.map +1 -0
- package/chunks/3dicons-bookmark-fav-dynamic-color-BkMV51tL.js +0 -4
- package/chunks/3dicons-crow-dynamic-color-BnvCj9i8.js +0 -4
- package/chunks/3dicons-fire-dynamic-color-rNRL0kAe.js +0 -4
- package/chunks/3dicons-flag-dynamic-color-BscQxNXn.js +0 -4
- package/chunks/3dicons-medal-dynamic-color-CsR036OL.js +0 -4
- package/chunks/3dicons-rocket-dynamic-color-EiHCJ2rb.js +0 -4
- package/chunks/3dicons-target-dynamic-color-ChQzHpwv.js +0 -4
- package/chunks/3dicons-thumb-down-dynamic-color-NQLnsNFt.js +0 -4
- package/chunks/index-B1d9q8fX.js +0 -4
- package/chunks/index-BP0pvFJ4.js +0 -4
- package/chunks/index-CHZyL_g_.js +0 -4
- package/chunks/index-CeCUdRmF.js +0 -4
- package/chunks/index-Ckyyw-I8.js +0 -4
- package/chunks/index-DGvCP5G8.js +0 -4
- package/chunks/index-yjMVOgwO.js +0 -4
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { useFontFamily as Te, isExtraSmall as He, getBrandingClickUrl as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { EitherOrFullModel as
|
|
1
|
+
import { jsx as t, jsxs as g, Fragment as Qe } from "react/jsx-runtime";
|
|
2
|
+
import { useDisableCache as Lt, useFontFamily as Te, isExtraSmall as He, getBrandingClickUrl as Kt, isMobile as Se, useColors as K, useCornerRadius as pe, useSpacingScale as Pe, hexToRgb as le, ConsentPanel as rt, DirectionalIcon as ct, busyButtonStyles as Ot, useImageUrl as Xt, AdditionalCTA as Zt, useIntlLocale as Jt, useInternalTheme as Ne, Spinner as ot, useBorderSize as Qt, useImageVariant as it, WidgetTemplate as ve, StandardSkeleton as en, NotFoundSkeleton as tn, StandardSignInSkeleton as nn, extractBrandingModelProperties as lt, StandardApiErrorSkeleton as zt, CollectLeadForm as rn, StandardLeadAfterCollection as Bt, sanitizeBackgroundUrl as Dt, useImageBackgroundGradient as $t, OverlayScoreStateWrapperSkeleton as on, OverlaySkeleton as ln, defaultBgVertical as dt, defaultBg as ut, OverlaySignInSkeleton as an, OverlayApiErrorSkeleton as sn, OverlayLeadAfterCollection as Ft, ConsentCta as Et, useConsents as cn, initializeI18n as dn, extractSdkError as un, Portal as mn } from "fansunited-frontend-core";
|
|
3
|
+
import { useState as z, useEffect as he, useRef as mt, useCallback as Me } from "react";
|
|
4
|
+
import { EitherOrFullModel as gn } from "fansunited-sdk-esm/models";
|
|
5
5
|
import gt from "@mui/icons-material/ArrowRightAlt";
|
|
6
|
-
import { Timer as
|
|
7
|
-
import { Box as r, Typography as C, Button as ye, Stack as je, Sheet as
|
|
8
|
-
import { useTranslation as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
6
|
+
import { Timer as fn, Favorite as hn, EmojiEvents as xn, CheckCircle as wt, Cancel as Rt } from "@mui/icons-material";
|
|
7
|
+
import { Box as r, Typography as C, Button as ye, Stack as je, Sheet as bn, Table as yn, Avatar as pn, tabClasses as Ut, Tabs as Wt, TabList as Mt, Tab as et, TabPanel as tt } from "@mui/joy";
|
|
8
|
+
import { useTranslation as ee } from "react-i18next";
|
|
9
|
+
import jt from "@mui/icons-material/CompareArrows";
|
|
10
|
+
import Sn from "@mui/icons-material/SwapVert";
|
|
11
11
|
import at from "@mui/icons-material/Favorite";
|
|
12
|
-
import
|
|
13
|
-
import { keyframes as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
12
|
+
import Gt from "@mui/icons-material/FavoriteBorder";
|
|
13
|
+
import { keyframes as Cn } from "@emotion/react";
|
|
14
|
+
import In from "@mui/icons-material/TimerOutlined";
|
|
15
|
+
import kn from "@mui/icons-material/CheckCircle";
|
|
16
|
+
import Tn from "@mui/icons-material/Cancel";
|
|
17
|
+
import Pn from "@mui/icons-material/AccessTime";
|
|
18
18
|
import Ge from "@mui/icons-material/EmojiEvents";
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
const
|
|
24
|
-
const [l, i] =
|
|
19
|
+
import vn from "@mui/icons-material/WorkspacePremium";
|
|
20
|
+
import An from "@mui/icons-material/Person";
|
|
21
|
+
import Ht from "@mui/icons-material/Leaderboard";
|
|
22
|
+
import wn from "@mui/icons-material/Timer";
|
|
23
|
+
const Rn = (e, n) => {
|
|
24
|
+
const [l, i] = z(null), s = Lt(), f = async () => {
|
|
25
25
|
try {
|
|
26
|
-
const
|
|
27
|
-
i(
|
|
28
|
-
} catch (
|
|
29
|
-
console.error(
|
|
26
|
+
const o = await n.miniGames.getEitherOrById(e, s);
|
|
27
|
+
i(o);
|
|
28
|
+
} catch (o) {
|
|
29
|
+
console.error(o), i(new gn());
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
return he(() => (
|
|
33
|
-
},
|
|
34
|
-
const [i, s] =
|
|
32
|
+
return he(() => (f(), () => i(null)), [e, n, s]), l;
|
|
33
|
+
}, Ln = (e, n, l = !1) => {
|
|
34
|
+
const [i, s] = z(null), [f, o] = z(!1), [m, c] = z(!1), u = async () => {
|
|
35
35
|
try {
|
|
36
36
|
const h = await n.miniGames.getMyEitherOrStats(e);
|
|
37
37
|
s(h);
|
|
@@ -62,18 +62,18 @@ const wn = (e, n) => {
|
|
|
62
62
|
}), [e, n, l]), {
|
|
63
63
|
myStats: i,
|
|
64
64
|
setMyStats: s,
|
|
65
|
-
isUnauthorized:
|
|
65
|
+
isUnauthorized: f,
|
|
66
66
|
isApiError: m,
|
|
67
67
|
setIsUnauthorized: o,
|
|
68
68
|
setIsApiError: c
|
|
69
69
|
};
|
|
70
|
-
},
|
|
70
|
+
}, q = {
|
|
71
71
|
LOADING: "loading",
|
|
72
72
|
TUTORIAL: "tutorial",
|
|
73
73
|
PLAYING: "playing",
|
|
74
74
|
RESULTS: "results"
|
|
75
|
-
},
|
|
76
|
-
const n = Te().secondary, l = He(), i =
|
|
75
|
+
}, me = (e) => {
|
|
76
|
+
const n = Te().secondary, l = He(), i = Kt(
|
|
77
77
|
e.primaryUrl,
|
|
78
78
|
e.secondaryUrl,
|
|
79
79
|
"logo"
|
|
@@ -82,7 +82,7 @@ const wn = (e, n) => {
|
|
|
82
82
|
return null;
|
|
83
83
|
const s = () => {
|
|
84
84
|
i && window.open(i, "_blank", "noopener,noreferrer");
|
|
85
|
-
},
|
|
85
|
+
}, f = /* @__PURE__ */ t(
|
|
86
86
|
"img",
|
|
87
87
|
{
|
|
88
88
|
src: e.brandingLogo,
|
|
@@ -101,17 +101,17 @@ const wn = (e, n) => {
|
|
|
101
101
|
textDecoration: "none",
|
|
102
102
|
display: "inline-flex"
|
|
103
103
|
},
|
|
104
|
-
children:
|
|
104
|
+
children: f
|
|
105
105
|
}
|
|
106
106
|
) : /* @__PURE__ */ t(
|
|
107
107
|
r,
|
|
108
108
|
{
|
|
109
109
|
onClick: s,
|
|
110
110
|
sx: { cursor: "pointer", display: "inline-flex" },
|
|
111
|
-
children:
|
|
111
|
+
children: f
|
|
112
112
|
}
|
|
113
|
-
) :
|
|
114
|
-
return e.isCentered || l ? /* @__PURE__ */
|
|
113
|
+
) : f;
|
|
114
|
+
return e.isCentered || l ? /* @__PURE__ */ g(
|
|
115
115
|
r,
|
|
116
116
|
{
|
|
117
117
|
sx: {
|
|
@@ -143,7 +143,7 @@ const wn = (e, n) => {
|
|
|
143
143
|
o
|
|
144
144
|
]
|
|
145
145
|
}
|
|
146
|
-
) : /* @__PURE__ */
|
|
146
|
+
) : /* @__PURE__ */ g(
|
|
147
147
|
r,
|
|
148
148
|
{
|
|
149
149
|
sx: {
|
|
@@ -175,25 +175,25 @@ const wn = (e, n) => {
|
|
|
175
175
|
]
|
|
176
176
|
}
|
|
177
177
|
);
|
|
178
|
-
},
|
|
178
|
+
}, On = ({
|
|
179
179
|
onStart: e,
|
|
180
180
|
game: n,
|
|
181
181
|
signInCTA: l,
|
|
182
182
|
showSignInCTA: i,
|
|
183
183
|
consents: s,
|
|
184
|
-
isSubmitting:
|
|
184
|
+
isSubmitting: f
|
|
185
185
|
}) => {
|
|
186
|
-
var
|
|
187
|
-
const { t: o } =
|
|
186
|
+
var B, v, D, O, V, $, R, k, G, M, H;
|
|
187
|
+
const { t: o } = ee(), m = Se(), c = He(), u = ((B = n == null ? void 0 : n.branding) == null ? void 0 : B.colors) || null, h = (u == null ? void 0 : u.primaryColor) || K().palette.primary.plainColor, b = K().palette.primary.onPrimary, p = (u == null ? void 0 : u.contentColor) || K().textColor, x = K().surfaceVariant, A = Te().primary, E = pe().xl, w = pe().md, I = Pe(), y = le(h || ""), d = le(x || ""), L = y ? `rgba(${y.replace(/[^\d,]/g, "")}, 0.12)` : `${h}20`, S = m ? ((D = (v = n == null ? void 0 : n.branding) == null ? void 0 : v.images) == null ? void 0 : D.mobileLogo) || ((V = (O = n == null ? void 0 : n.branding) == null ? void 0 : O.images) == null ? void 0 : V.mainLogo) || "" : ((R = ($ = n == null ? void 0 : n.branding) == null ? void 0 : $.images) == null ? void 0 : R.mainLogo) || "", P = [
|
|
188
188
|
{
|
|
189
|
-
icon: /* @__PURE__ */ t(
|
|
189
|
+
icon: /* @__PURE__ */ t(fn, { sx: { fontSize: "1.1em" } }),
|
|
190
190
|
title: o("eitherOr.tutorial.step1Title"),
|
|
191
191
|
description: o("eitherOr.tutorial.step1Description", {
|
|
192
192
|
seconds: (n == null ? void 0 : n.time) ?? 10
|
|
193
193
|
})
|
|
194
194
|
},
|
|
195
195
|
{
|
|
196
|
-
icon: /* @__PURE__ */ t(
|
|
196
|
+
icon: /* @__PURE__ */ t(hn, { sx: { fontSize: "1.1em" } }),
|
|
197
197
|
title: o("eitherOr.tutorial.step2Title", {
|
|
198
198
|
lives: (n == null ? void 0 : n.lives) ?? 3,
|
|
199
199
|
context: String((n == null ? void 0 : n.lives) ?? 3)
|
|
@@ -204,12 +204,12 @@ const wn = (e, n) => {
|
|
|
204
204
|
})
|
|
205
205
|
},
|
|
206
206
|
{
|
|
207
|
-
icon: /* @__PURE__ */ t(
|
|
207
|
+
icon: /* @__PURE__ */ t(xn, { sx: { fontSize: "1.1em" } }),
|
|
208
208
|
title: o("eitherOr.tutorial.step3Title"),
|
|
209
209
|
description: o("eitherOr.tutorial.step3Description")
|
|
210
210
|
}
|
|
211
211
|
];
|
|
212
|
-
return n ? /* @__PURE__ */ t(r, { sx: { display: "flex", flexDirection: "column", p: I.md }, children: /* @__PURE__ */
|
|
212
|
+
return n ? /* @__PURE__ */ t(r, { sx: { display: "flex", flexDirection: "column", p: I.md }, children: /* @__PURE__ */ g(
|
|
213
213
|
r,
|
|
214
214
|
{
|
|
215
215
|
sx: {
|
|
@@ -229,10 +229,10 @@ const wn = (e, n) => {
|
|
|
229
229
|
flexDirection: "column",
|
|
230
230
|
backdropFilter: "blur(4px)"
|
|
231
231
|
},
|
|
232
|
-
children: P.map((a,
|
|
233
|
-
const T =
|
|
234
|
-
return /* @__PURE__ */
|
|
235
|
-
/* @__PURE__ */
|
|
232
|
+
children: P.map((a, Y) => {
|
|
233
|
+
const T = Y === P.length - 1;
|
|
234
|
+
return /* @__PURE__ */ g(r, { children: [
|
|
235
|
+
/* @__PURE__ */ g(
|
|
236
236
|
r,
|
|
237
237
|
{
|
|
238
238
|
sx: {
|
|
@@ -260,7 +260,7 @@ const wn = (e, n) => {
|
|
|
260
260
|
children: a.icon
|
|
261
261
|
}
|
|
262
262
|
),
|
|
263
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ g(r, { sx: { flex: 1, minWidth: 0, pt: "2px" }, children: [
|
|
264
264
|
/* @__PURE__ */ t(
|
|
265
265
|
C,
|
|
266
266
|
{
|
|
@@ -303,7 +303,7 @@ const wn = (e, n) => {
|
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
305
|
)
|
|
306
|
-
] },
|
|
306
|
+
] }, Y);
|
|
307
307
|
})
|
|
308
308
|
}
|
|
309
309
|
),
|
|
@@ -324,13 +324,13 @@ const wn = (e, n) => {
|
|
|
324
324
|
consents: s,
|
|
325
325
|
primaryColor: h,
|
|
326
326
|
textColor: p,
|
|
327
|
-
brandingUrls: (
|
|
327
|
+
brandingUrls: (k = n == null ? void 0 : n.branding) == null ? void 0 : k.urls,
|
|
328
328
|
align: "center"
|
|
329
329
|
}
|
|
330
330
|
)
|
|
331
331
|
}
|
|
332
332
|
) : null,
|
|
333
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ g(
|
|
334
334
|
r,
|
|
335
335
|
{
|
|
336
336
|
sx: {
|
|
@@ -342,18 +342,18 @@ const wn = (e, n) => {
|
|
|
342
342
|
},
|
|
343
343
|
children: [
|
|
344
344
|
S && !c && /* @__PURE__ */ t(
|
|
345
|
-
|
|
345
|
+
me,
|
|
346
346
|
{
|
|
347
347
|
brandingLogo: S,
|
|
348
348
|
textColor: p,
|
|
349
|
-
label: ((
|
|
349
|
+
label: ((G = n == null ? void 0 : n.labels) == null ? void 0 : G.sponsor) || null
|
|
350
350
|
}
|
|
351
351
|
),
|
|
352
352
|
/* @__PURE__ */ t(
|
|
353
353
|
ye,
|
|
354
354
|
{
|
|
355
355
|
variant: "soft",
|
|
356
|
-
loading:
|
|
356
|
+
loading: f,
|
|
357
357
|
endDecorator: /* @__PURE__ */ t(ct, { children: /* @__PURE__ */ t(gt, {}) }),
|
|
358
358
|
onClick: i && l ? l.onClick : e,
|
|
359
359
|
sx: {
|
|
@@ -381,7 +381,7 @@ const wn = (e, n) => {
|
|
|
381
381
|
},
|
|
382
382
|
animation: "pulse 1s infinite",
|
|
383
383
|
fontSize: "0.9375em",
|
|
384
|
-
...
|
|
384
|
+
...f ? Ot(h, b) : {}
|
|
385
385
|
},
|
|
386
386
|
children: /* @__PURE__ */ t(
|
|
387
387
|
C,
|
|
@@ -393,22 +393,22 @@ const wn = (e, n) => {
|
|
|
393
393
|
lineHeight: "24px",
|
|
394
394
|
letterSpacing: "0.46px",
|
|
395
395
|
textTransform: "uppercase",
|
|
396
|
-
color:
|
|
396
|
+
color: f ? "transparent" : b,
|
|
397
397
|
gap: I.xs,
|
|
398
398
|
display: "flex",
|
|
399
399
|
alignItems: "center"
|
|
400
400
|
},
|
|
401
|
-
children: i && l ? l.defaultLabel : ((
|
|
401
|
+
children: i && l ? l.defaultLabel : ((M = s == null ? void 0 : s.labels) == null ? void 0 : M.ctaLabel) || o("eitherOr.buttons.start")
|
|
402
402
|
}
|
|
403
403
|
)
|
|
404
404
|
}
|
|
405
405
|
),
|
|
406
406
|
S && c && /* @__PURE__ */ t(
|
|
407
|
-
|
|
407
|
+
me,
|
|
408
408
|
{
|
|
409
409
|
brandingLogo: S,
|
|
410
410
|
textColor: p,
|
|
411
|
-
label: ((
|
|
411
|
+
label: ((H = n == null ? void 0 : n.labels) == null ? void 0 : H.sponsor) || null
|
|
412
412
|
}
|
|
413
413
|
)
|
|
414
414
|
]
|
|
@@ -417,7 +417,7 @@ const wn = (e, n) => {
|
|
|
417
417
|
]
|
|
418
418
|
}
|
|
419
419
|
) }) : null;
|
|
420
|
-
},
|
|
420
|
+
}, zn = Cn`
|
|
421
421
|
0% {
|
|
422
422
|
opacity: 1;
|
|
423
423
|
transform: translateY(0);
|
|
@@ -426,13 +426,13 @@ const wn = (e, n) => {
|
|
|
426
426
|
opacity: 0;
|
|
427
427
|
transform: translateY(-20px);
|
|
428
428
|
}
|
|
429
|
-
`,
|
|
429
|
+
`, Nt = {
|
|
430
430
|
pointsAdded: {
|
|
431
431
|
position: "absolute",
|
|
432
432
|
top: -20,
|
|
433
433
|
right: 0,
|
|
434
434
|
color: "primary.500",
|
|
435
|
-
animation: `${
|
|
435
|
+
animation: `${zn} 1s ease-out forwards`
|
|
436
436
|
},
|
|
437
437
|
optionWrapper: {
|
|
438
438
|
position: "relative",
|
|
@@ -481,13 +481,13 @@ const wn = (e, n) => {
|
|
|
481
481
|
feedback: l,
|
|
482
482
|
onSelect: i,
|
|
483
483
|
pairId: s,
|
|
484
|
-
brandingPrimaryColor:
|
|
484
|
+
brandingPrimaryColor: f,
|
|
485
485
|
optionIndex: o = 0
|
|
486
486
|
}) => {
|
|
487
|
-
const m =
|
|
487
|
+
const m = K(), c = Pe(), u = f || m.palette.primary.plainColor, h = m.palette.primary.onPrimary, b = m.palette.success.plainColor, p = m.palette.danger.plainColor, x = le(u || ""), A = x ? x.replace(/[^\d,]/g, "") : null, E = Xt(e.images ?? null), w = !!E, I = o === 0 ? "A" : "B", y = l.selectedOption === e.id, d = y && !!l.isCorrect || e.id === l.correctOptionId, L = y && !l.isCorrect || !!l.timedOut && e.id !== l.correctOptionId;
|
|
488
488
|
if (!w) {
|
|
489
|
-
const S = o === 0 ? "135deg" : "225deg", P = d ? `linear-gradient(${S}, ${b}20 0%, ${b}0D 100%)` : L ? `linear-gradient(${S}, ${p}20 0%, ${p}0D 100%)` : A ? `linear-gradient(${S}, rgba(${A}, 0.22) 0%, rgba(${A}, 0.08) 60%, rgba(${A}, 0.14) 100%)` : `linear-gradient(${S}, ${u}38 0%, ${u}14 60%, ${u}24 100%)`,
|
|
490
|
-
return /* @__PURE__ */
|
|
489
|
+
const S = o === 0 ? "135deg" : "225deg", P = d ? `linear-gradient(${S}, ${b}20 0%, ${b}0D 100%)` : L ? `linear-gradient(${S}, ${p}20 0%, ${p}0D 100%)` : A ? `linear-gradient(${S}, rgba(${A}, 0.22) 0%, rgba(${A}, 0.08) 60%, rgba(${A}, 0.14) 100%)` : `linear-gradient(${S}, ${u}38 0%, ${u}14 60%, ${u}24 100%)`, B = A ? `repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(${A}, 0.04) 10px, rgba(${A}, 0.04) 11px)` : "none", v = d ? b : L ? p : A ? `rgba(${A}, 0.3)` : `${u}4D`, D = d ? b : L ? p : u;
|
|
490
|
+
return /* @__PURE__ */ g(
|
|
491
491
|
r,
|
|
492
492
|
{
|
|
493
493
|
onClick: () => !n && i(s, e.id),
|
|
@@ -518,7 +518,7 @@ const wn = (e, n) => {
|
|
|
518
518
|
sx: {
|
|
519
519
|
position: "absolute",
|
|
520
520
|
inset: 0,
|
|
521
|
-
background:
|
|
521
|
+
background: B,
|
|
522
522
|
zIndex: 0
|
|
523
523
|
}
|
|
524
524
|
}
|
|
@@ -530,7 +530,7 @@ const wn = (e, n) => {
|
|
|
530
530
|
width: 40,
|
|
531
531
|
height: 40,
|
|
532
532
|
borderRadius: "50%",
|
|
533
|
-
bgcolor:
|
|
533
|
+
bgcolor: D,
|
|
534
534
|
display: "flex",
|
|
535
535
|
alignItems: "center",
|
|
536
536
|
justifyContent: "center",
|
|
@@ -573,7 +573,7 @@ const wn = (e, n) => {
|
|
|
573
573
|
}
|
|
574
574
|
);
|
|
575
575
|
}
|
|
576
|
-
return /* @__PURE__ */
|
|
576
|
+
return /* @__PURE__ */ g(
|
|
577
577
|
r,
|
|
578
578
|
{
|
|
579
579
|
onClick: () => !n && i(s, e.id),
|
|
@@ -677,12 +677,12 @@ const wn = (e, n) => {
|
|
|
677
677
|
]
|
|
678
678
|
}
|
|
679
679
|
);
|
|
680
|
-
},
|
|
680
|
+
}, Vt = ({
|
|
681
681
|
time: e,
|
|
682
682
|
maxTime: n,
|
|
683
683
|
brandingPrimaryColor: l
|
|
684
684
|
}) => {
|
|
685
|
-
const i =
|
|
685
|
+
const i = K().palette.danger.softBg, s = K().palette.danger.plainColor, f = K().palette.warning.softBg, o = K().palette.warning.plainColor, m = l || K().palette.primary.plainColor, c = K().palette.primary.onPrimary, u = pe().xl, h = Te().secondary, b = Pe(), p = {
|
|
686
686
|
"@keyframes pulse": {
|
|
687
687
|
"0%": { transform: "scale(1)" },
|
|
688
688
|
"50%": { transform: "scale(1.05)" },
|
|
@@ -693,7 +693,7 @@ const wn = (e, n) => {
|
|
|
693
693
|
color: s,
|
|
694
694
|
animation: "pulse 1s infinite"
|
|
695
695
|
} : x <= 50 ? {
|
|
696
|
-
background:
|
|
696
|
+
background: f,
|
|
697
697
|
color: o,
|
|
698
698
|
animation: void 0
|
|
699
699
|
} : {
|
|
@@ -704,7 +704,7 @@ const wn = (e, n) => {
|
|
|
704
704
|
const y = Math.floor(I / 60), d = I % 60;
|
|
705
705
|
return `${y < 10 ? "0" : ""}${y}:${d < 10 ? "0" : ""}${d}${y > 0 ? "m" : "s"}`;
|
|
706
706
|
};
|
|
707
|
-
return /* @__PURE__ */
|
|
707
|
+
return /* @__PURE__ */ g(
|
|
708
708
|
r,
|
|
709
709
|
{
|
|
710
710
|
sx: {
|
|
@@ -725,7 +725,7 @@ const wn = (e, n) => {
|
|
|
725
725
|
},
|
|
726
726
|
children: [
|
|
727
727
|
/* @__PURE__ */ t(
|
|
728
|
-
|
|
728
|
+
In,
|
|
729
729
|
{
|
|
730
730
|
sx: {
|
|
731
731
|
width: "24px",
|
|
@@ -753,86 +753,86 @@ const wn = (e, n) => {
|
|
|
753
753
|
]
|
|
754
754
|
}
|
|
755
755
|
);
|
|
756
|
-
},
|
|
756
|
+
}, Bn = ({
|
|
757
757
|
currentPair: e,
|
|
758
758
|
timer: n,
|
|
759
759
|
selected: l,
|
|
760
760
|
maxTime: i,
|
|
761
761
|
feedback: s,
|
|
762
|
-
onSelect:
|
|
762
|
+
onSelect: f,
|
|
763
763
|
stepInfo: o,
|
|
764
764
|
brandingPrimaryColor: m,
|
|
765
765
|
game: c
|
|
766
766
|
}) => {
|
|
767
|
-
var X, Z,
|
|
768
|
-
const [u, h] =
|
|
767
|
+
var J, X, Z, te, ae, ne, Q, de, _, fe;
|
|
768
|
+
const [u, h] = z(0), [b, p] = z(!1), [x, A] = z(0), [E, w] = z(0), [I, y] = z(!1), d = mt(0), { t: L } = ee(), S = Se(), P = He(), B = K(), v = B.surfaceVariant, D = m || B.palette.primary.plainColor, O = ((X = (J = c == null ? void 0 : c.branding) == null ? void 0 : J.colors) == null ? void 0 : X.contentColor) || B.textColor, V = pe().md, $ = Pe(), R = le(v || ""), k = le(D || ""), G = S ? ((te = (Z = c == null ? void 0 : c.branding) == null ? void 0 : Z.images) == null ? void 0 : te.mobileLogo) || ((ne = (ae = c == null ? void 0 : c.branding) == null ? void 0 : ae.images) == null ? void 0 : ne.mainLogo) || "" : ((de = (Q = c == null ? void 0 : c.branding) == null ? void 0 : Q.images) == null ? void 0 : de.mainLogo) || "", M = L("common.labels.point", { count: u });
|
|
769
769
|
he(() => {
|
|
770
770
|
if (o != null && o.currentPoints && o.currentPoints > u) {
|
|
771
|
-
A(o.currentPoints - u), p(!0), w((
|
|
771
|
+
A(o.currentPoints - u), p(!0), w((j) => j + 1);
|
|
772
772
|
const U = setTimeout(() => p(!1), 1e3);
|
|
773
773
|
return h(o.currentPoints), () => clearTimeout(U);
|
|
774
774
|
}
|
|
775
775
|
}, [o == null ? void 0 : o.currentPoints, u]);
|
|
776
|
-
const
|
|
776
|
+
const H = (c == null ? void 0 : c.points) ?? [], a = H.length >= 2 ? H[1].correctSteps - H[0].correctSteps : ((_ = H[0]) == null ? void 0 : _.correctSteps) || 5;
|
|
777
777
|
he(() => {
|
|
778
|
-
const U = d.current,
|
|
779
|
-
if (d.current =
|
|
778
|
+
const U = d.current, j = (o == null ? void 0 : o.currentStreak) ?? 0;
|
|
779
|
+
if (d.current = j, j > U && j > 0 && j % a === 0) {
|
|
780
780
|
y(!0);
|
|
781
|
-
const
|
|
782
|
-
return () => clearTimeout(
|
|
781
|
+
const ue = setTimeout(() => y(!1), 500);
|
|
782
|
+
return () => clearTimeout(ue);
|
|
783
783
|
}
|
|
784
784
|
}, [o == null ? void 0 : o.currentStreak, a]);
|
|
785
|
-
const
|
|
786
|
-
const U = [],
|
|
787
|
-
for (let
|
|
785
|
+
const Y = () => {
|
|
786
|
+
const U = [], j = (o == null ? void 0 : o.currentLives) ?? 3;
|
|
787
|
+
for (let ue = 0; ue < j; ue++)
|
|
788
788
|
U.push(
|
|
789
789
|
/* @__PURE__ */ t(
|
|
790
790
|
at,
|
|
791
791
|
{
|
|
792
|
-
sx: { height: 20, color:
|
|
792
|
+
sx: { height: 20, color: D }
|
|
793
793
|
},
|
|
794
|
-
`life-${
|
|
794
|
+
`life-${ue}`
|
|
795
795
|
)
|
|
796
796
|
);
|
|
797
|
-
for (let
|
|
797
|
+
for (let ue = j; ue < 3; ue++)
|
|
798
798
|
U.push(
|
|
799
799
|
/* @__PURE__ */ t(
|
|
800
|
-
|
|
800
|
+
Gt,
|
|
801
801
|
{
|
|
802
802
|
sx: {
|
|
803
803
|
height: 20,
|
|
804
|
-
color:
|
|
804
|
+
color: k ? `rgba(${k.replace(/[^\d,]/g, "")}, 0.35)` : `${D}59`
|
|
805
805
|
}
|
|
806
806
|
},
|
|
807
|
-
`empty-${
|
|
807
|
+
`empty-${ue}`
|
|
808
808
|
)
|
|
809
809
|
);
|
|
810
810
|
return U;
|
|
811
811
|
}, T = () => {
|
|
812
|
-
const U = (o == null ? void 0 : o.currentStreak) ?? 0,
|
|
813
|
-
return /* @__PURE__ */
|
|
812
|
+
const U = (o == null ? void 0 : o.currentStreak) ?? 0, j = I ? a : U % a, Ae = Math.floor(U / a) + 1;
|
|
813
|
+
return /* @__PURE__ */ g(r, { sx: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
814
814
|
Array.from({ length: a }, (we, Ce) => /* @__PURE__ */ t(
|
|
815
815
|
r,
|
|
816
816
|
{
|
|
817
817
|
sx: {
|
|
818
818
|
flex: 1,
|
|
819
819
|
height: 4,
|
|
820
|
-
bgcolor: Ce <
|
|
820
|
+
bgcolor: Ce < j ? D : k ? `rgba(${k.replace(/[^\d,]/g, "")}, 0.2)` : `${D}33`,
|
|
821
821
|
borderRadius: "2px",
|
|
822
822
|
transition: "background-color 0.3s ease"
|
|
823
823
|
}
|
|
824
824
|
},
|
|
825
825
|
`streak-${Ce}`
|
|
826
826
|
)),
|
|
827
|
-
Ae > 1 && /* @__PURE__ */
|
|
827
|
+
Ae > 1 && /* @__PURE__ */ g(
|
|
828
828
|
C,
|
|
829
829
|
{
|
|
830
830
|
sx: {
|
|
831
|
-
color:
|
|
831
|
+
color: D,
|
|
832
832
|
fontWeight: 700,
|
|
833
833
|
fontSize: "0.75em",
|
|
834
834
|
lineHeight: 1,
|
|
835
|
-
ml:
|
|
835
|
+
ml: $["2xs"],
|
|
836
836
|
flexShrink: 0
|
|
837
837
|
},
|
|
838
838
|
children: [
|
|
@@ -842,49 +842,49 @@ const wn = (e, n) => {
|
|
|
842
842
|
}
|
|
843
843
|
)
|
|
844
844
|
] });
|
|
845
|
-
},
|
|
845
|
+
}, N = () => /* @__PURE__ */ t(
|
|
846
846
|
r,
|
|
847
847
|
{
|
|
848
848
|
sx: {
|
|
849
849
|
display: "flex",
|
|
850
850
|
justifyContent: "center",
|
|
851
851
|
alignItems: "center",
|
|
852
|
-
...S ? { width: "100%", my:
|
|
852
|
+
...S ? { width: "100%", my: $.sm } : {}
|
|
853
853
|
},
|
|
854
854
|
children: /* @__PURE__ */ t(
|
|
855
855
|
r,
|
|
856
856
|
{
|
|
857
857
|
sx: {
|
|
858
858
|
borderRadius: "50%",
|
|
859
|
-
bgcolor:
|
|
859
|
+
bgcolor: B.surface,
|
|
860
860
|
boxShadow: "sm",
|
|
861
861
|
width: "32px",
|
|
862
862
|
height: "32px",
|
|
863
863
|
minWidth: "32px",
|
|
864
864
|
border: "1px solid",
|
|
865
|
-
borderColor:
|
|
865
|
+
borderColor: D,
|
|
866
866
|
display: "flex",
|
|
867
867
|
alignItems: "center",
|
|
868
868
|
justifyContent: "center"
|
|
869
869
|
},
|
|
870
|
-
children: S ? /* @__PURE__ */ t(
|
|
870
|
+
children: S ? /* @__PURE__ */ t(Sn, { sx: { fontSize: "1.1em", color: D } }) : /* @__PURE__ */ t(jt, { sx: { fontSize: "1.1em", color: D } })
|
|
871
871
|
}
|
|
872
872
|
)
|
|
873
873
|
}
|
|
874
874
|
);
|
|
875
875
|
return e ? (
|
|
876
876
|
// questionArea
|
|
877
|
-
/* @__PURE__ */ t(r, { sx: { display: "flex", flexDirection: "column", p:
|
|
877
|
+
/* @__PURE__ */ t(r, { sx: { display: "flex", flexDirection: "column", p: $.md }, children: /* @__PURE__ */ g(
|
|
878
878
|
r,
|
|
879
879
|
{
|
|
880
880
|
sx: {
|
|
881
881
|
display: "flex",
|
|
882
882
|
flexDirection: "column",
|
|
883
|
-
gap: S ?
|
|
883
|
+
gap: S ? $.lg : $.md
|
|
884
884
|
},
|
|
885
885
|
children: [
|
|
886
886
|
/* @__PURE__ */ t(r, { sx: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ t(
|
|
887
|
-
|
|
887
|
+
Vt,
|
|
888
888
|
{
|
|
889
889
|
time: n,
|
|
890
890
|
maxTime: i,
|
|
@@ -898,22 +898,22 @@ const wn = (e, n) => {
|
|
|
898
898
|
sx: {
|
|
899
899
|
borderRadius: V,
|
|
900
900
|
overflow: "hidden",
|
|
901
|
-
bgcolor:
|
|
901
|
+
bgcolor: R ? `rgba(${R.replace(/[^\d,]/g, "")}, 0.5)` : B.surfaceVariant,
|
|
902
902
|
display: "flex",
|
|
903
903
|
flexDirection: "column",
|
|
904
904
|
backdropFilter: "blur(4px)",
|
|
905
|
-
px:
|
|
906
|
-
pt:
|
|
907
|
-
pb:
|
|
908
|
-
gap:
|
|
905
|
+
px: $.md,
|
|
906
|
+
pt: $.md,
|
|
907
|
+
pb: $.lg,
|
|
908
|
+
gap: $.md
|
|
909
909
|
},
|
|
910
|
-
children: /* @__PURE__ */
|
|
910
|
+
children: /* @__PURE__ */ g(
|
|
911
911
|
r,
|
|
912
912
|
{
|
|
913
913
|
sx: {
|
|
914
914
|
display: "flex",
|
|
915
915
|
flexDirection: S ? "column" : "row",
|
|
916
|
-
gap: S ? 0 :
|
|
916
|
+
gap: S ? 0 : $.md,
|
|
917
917
|
alignItems: S ? "stretch" : "center"
|
|
918
918
|
},
|
|
919
919
|
children: [
|
|
@@ -923,20 +923,20 @@ const wn = (e, n) => {
|
|
|
923
923
|
option: e.optionOne,
|
|
924
924
|
selected: l,
|
|
925
925
|
feedback: s,
|
|
926
|
-
onSelect:
|
|
926
|
+
onSelect: f,
|
|
927
927
|
pairId: e.pairId,
|
|
928
928
|
brandingPrimaryColor: m,
|
|
929
929
|
optionIndex: 0
|
|
930
930
|
}
|
|
931
931
|
) }),
|
|
932
|
-
|
|
932
|
+
N(),
|
|
933
933
|
/* @__PURE__ */ t(r, { sx: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ t(
|
|
934
934
|
nt,
|
|
935
935
|
{
|
|
936
936
|
option: e.optionTwo,
|
|
937
937
|
selected: l,
|
|
938
938
|
feedback: s,
|
|
939
|
-
onSelect:
|
|
939
|
+
onSelect: f,
|
|
940
940
|
pairId: e.pairId,
|
|
941
941
|
brandingPrimaryColor: m,
|
|
942
942
|
optionIndex: 1
|
|
@@ -947,32 +947,32 @@ const wn = (e, n) => {
|
|
|
947
947
|
)
|
|
948
948
|
}
|
|
949
949
|
),
|
|
950
|
-
/* @__PURE__ */
|
|
951
|
-
/* @__PURE__ */ t(r, { sx: { mb:
|
|
952
|
-
/* @__PURE__ */
|
|
950
|
+
/* @__PURE__ */ g(r, { children: [
|
|
951
|
+
/* @__PURE__ */ t(r, { sx: { mb: $.xs }, children: T() }),
|
|
952
|
+
/* @__PURE__ */ g(
|
|
953
953
|
je,
|
|
954
954
|
{
|
|
955
955
|
direction: "row",
|
|
956
956
|
justifyContent: "space-between",
|
|
957
957
|
alignItems: "center",
|
|
958
958
|
children: [
|
|
959
|
-
/* @__PURE__ */ t(r, { children:
|
|
960
|
-
/* @__PURE__ */
|
|
961
|
-
/* @__PURE__ */
|
|
962
|
-
|
|
959
|
+
/* @__PURE__ */ t(r, { children: Y() }),
|
|
960
|
+
/* @__PURE__ */ g(je, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
961
|
+
/* @__PURE__ */ g(C, { sx: { color: O }, children: [
|
|
962
|
+
M,
|
|
963
963
|
":"
|
|
964
964
|
] }),
|
|
965
|
-
/* @__PURE__ */
|
|
965
|
+
/* @__PURE__ */ g(
|
|
966
966
|
C,
|
|
967
967
|
{
|
|
968
968
|
level: "h4",
|
|
969
969
|
sx: { position: "relative", color: O },
|
|
970
970
|
children: [
|
|
971
971
|
u,
|
|
972
|
-
b && /* @__PURE__ */
|
|
972
|
+
b && /* @__PURE__ */ g(
|
|
973
973
|
C,
|
|
974
974
|
{
|
|
975
|
-
sx:
|
|
975
|
+
sx: Nt.pointsAdded,
|
|
976
976
|
children: [
|
|
977
977
|
"+",
|
|
978
978
|
x
|
|
@@ -987,18 +987,18 @@ const wn = (e, n) => {
|
|
|
987
987
|
]
|
|
988
988
|
}
|
|
989
989
|
),
|
|
990
|
-
|
|
990
|
+
G && /* @__PURE__ */ t(
|
|
991
991
|
r,
|
|
992
992
|
{
|
|
993
993
|
sx: {
|
|
994
|
-
mt:
|
|
994
|
+
mt: $.xs,
|
|
995
995
|
display: "flex",
|
|
996
996
|
justifyContent: P ? "center" : "flex-start"
|
|
997
997
|
},
|
|
998
998
|
children: /* @__PURE__ */ t(
|
|
999
|
-
|
|
999
|
+
me,
|
|
1000
1000
|
{
|
|
1001
|
-
brandingLogo:
|
|
1001
|
+
brandingLogo: G,
|
|
1002
1002
|
textColor: O,
|
|
1003
1003
|
label: ((fe = c == null ? void 0 : c.labels) == null ? void 0 : fe.sponsor) || null
|
|
1004
1004
|
}
|
|
@@ -1010,58 +1010,58 @@ const wn = (e, n) => {
|
|
|
1010
1010
|
}
|
|
1011
1011
|
) })
|
|
1012
1012
|
) : null;
|
|
1013
|
-
},
|
|
1013
|
+
}, Dn = (e, n, l, i) => {
|
|
1014
1014
|
if (n === 0)
|
|
1015
1015
|
return {
|
|
1016
1016
|
emoji: "🎮",
|
|
1017
1017
|
message: i("eitherOr.results.practice", "Keep practicing!")
|
|
1018
1018
|
};
|
|
1019
1019
|
const s = e / n * 100;
|
|
1020
|
-
let
|
|
1021
|
-
if (s === 100 ?
|
|
1020
|
+
let f;
|
|
1021
|
+
if (s === 100 ? f = {
|
|
1022
1022
|
emoji: "🏆",
|
|
1023
1023
|
message: i("eitherOr.results.perfect", "Perfect! Flawless!")
|
|
1024
|
-
} : s >= 80 ?
|
|
1024
|
+
} : s >= 80 ? f = {
|
|
1025
1025
|
emoji: "🔥",
|
|
1026
1026
|
message: i("eitherOr.results.excellent", "Excellent!")
|
|
1027
|
-
} : s >= 60 ?
|
|
1027
|
+
} : s >= 60 ? f = { emoji: "✨", message: i("eitherOr.results.great", "Great job!") } : s >= 40 ? f = { emoji: "💪", message: i("eitherOr.results.good", "Good try!") } : f = {
|
|
1028
1028
|
emoji: "📚",
|
|
1029
1029
|
message: i("eitherOr.results.practice", "Keep practicing!")
|
|
1030
1030
|
}, l > 0) {
|
|
1031
1031
|
const o = i("eitherOr.results.livesBonus", { count: l }) || (l === 1 ? "And with 1 life to spare!" : `And with ${l} lives to spare!`);
|
|
1032
|
-
|
|
1032
|
+
f = { ...f, message: `${f.message} ${o}` };
|
|
1033
1033
|
}
|
|
1034
|
-
return
|
|
1034
|
+
return f;
|
|
1035
1035
|
}, st = ({
|
|
1036
1036
|
stepInfo: e,
|
|
1037
1037
|
game: n,
|
|
1038
1038
|
sdk: l,
|
|
1039
1039
|
onPlayAgain: i,
|
|
1040
1040
|
brandingPrimaryColor: s,
|
|
1041
|
-
additionalCTA:
|
|
1041
|
+
additionalCTA: f
|
|
1042
1042
|
}) => {
|
|
1043
|
-
var
|
|
1044
|
-
const { t: o } =
|
|
1043
|
+
var X, Z, te, ae, ne, Q, de, _, fe;
|
|
1044
|
+
const { t: o } = ee(), m = K(), c = s || m.palette.primary.plainColor, u = m.palette.primary.onPrimary, h = ((Z = (X = n == null ? void 0 : n.branding) == null ? void 0 : X.colors) == null ? void 0 : Z.contentColor) || m.textColor, b = m.palette.success.plainColor, p = m.palette.danger.plainColor, x = m.palette.success.softBg, A = m.palette.danger.softBg, E = pe().md, w = pe().xl, I = Pe(), y = Te().primary, d = Se(), L = He(), S = le(c || ""), P = S ? S.replace(/[^\d,]/g, "") : null, B = d ? ((ae = (te = n == null ? void 0 : n.branding) == null ? void 0 : te.images) == null ? void 0 : ae.mobileLogo) || ((Q = (ne = n == null ? void 0 : n.branding) == null ? void 0 : ne.images) == null ? void 0 : Q.mainLogo) || "" : ((_ = (de = n == null ? void 0 : n.branding) == null ? void 0 : de.images) == null ? void 0 : _.mainLogo) || "", [v, D] = z(0), [O, V] = z(null), $ = (e == null ? void 0 : e.currentPoints) ?? 0, R = v > 0 && $ >= v;
|
|
1045
1045
|
if (he(() => {
|
|
1046
1046
|
n && (async () => {
|
|
1047
1047
|
try {
|
|
1048
|
-
const
|
|
1049
|
-
|
|
1048
|
+
const j = await l.miniGames.getMyEitherOrStats(n.id);
|
|
1049
|
+
D(j.personalBest ?? 0), V(j.betterThan ?? null);
|
|
1050
1050
|
} catch {
|
|
1051
1051
|
}
|
|
1052
1052
|
})();
|
|
1053
1053
|
}, [e, n, l]), !e) return null;
|
|
1054
|
-
const
|
|
1054
|
+
const k = e.steps.filter((U) => U.played), G = k.filter((U) => U.correct === !0).length, M = k.filter(
|
|
1055
1055
|
(U) => U.correct === !1 && U.userSelection !== null
|
|
1056
|
-
).length,
|
|
1056
|
+
).length, H = k.filter(
|
|
1057
1057
|
(U) => U.userSelection === null
|
|
1058
|
-
).length, a =
|
|
1059
|
-
|
|
1058
|
+
).length, a = k.length, Y = Dn(
|
|
1059
|
+
G,
|
|
1060
1060
|
a,
|
|
1061
1061
|
e.currentLives,
|
|
1062
1062
|
o
|
|
1063
|
-
), T = a > 0 ?
|
|
1064
|
-
return /* @__PURE__ */
|
|
1063
|
+
), T = a > 0 ? G / a * 100 : 0, N = a > 0 ? M / a * 100 : 0, J = a > 0 ? H / a * 100 : 0;
|
|
1064
|
+
return /* @__PURE__ */ g(
|
|
1065
1065
|
r,
|
|
1066
1066
|
{
|
|
1067
1067
|
sx: {
|
|
@@ -1076,7 +1076,7 @@ const wn = (e, n) => {
|
|
|
1076
1076
|
}
|
|
1077
1077
|
},
|
|
1078
1078
|
children: [
|
|
1079
|
-
|
|
1079
|
+
R && /* @__PURE__ */ g(
|
|
1080
1080
|
r,
|
|
1081
1081
|
{
|
|
1082
1082
|
sx: {
|
|
@@ -1107,7 +1107,7 @@ const wn = (e, n) => {
|
|
|
1107
1107
|
}
|
|
1108
1108
|
},
|
|
1109
1109
|
children: [
|
|
1110
|
-
/* @__PURE__ */
|
|
1110
|
+
/* @__PURE__ */ g(
|
|
1111
1111
|
r,
|
|
1112
1112
|
{
|
|
1113
1113
|
sx: {
|
|
@@ -1154,8 +1154,8 @@ const wn = (e, n) => {
|
|
|
1154
1154
|
]
|
|
1155
1155
|
}
|
|
1156
1156
|
),
|
|
1157
|
-
/* @__PURE__ */
|
|
1158
|
-
/* @__PURE__ */
|
|
1157
|
+
/* @__PURE__ */ g(r, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
1158
|
+
/* @__PURE__ */ g(
|
|
1159
1159
|
r,
|
|
1160
1160
|
{
|
|
1161
1161
|
sx: {
|
|
@@ -1233,7 +1233,7 @@ const wn = (e, n) => {
|
|
|
1233
1233
|
]
|
|
1234
1234
|
}
|
|
1235
1235
|
),
|
|
1236
|
-
/* @__PURE__ */
|
|
1236
|
+
/* @__PURE__ */ g(
|
|
1237
1237
|
r,
|
|
1238
1238
|
{
|
|
1239
1239
|
sx: {
|
|
@@ -1306,21 +1306,21 @@ const wn = (e, n) => {
|
|
|
1306
1306
|
children: e.currentPoints
|
|
1307
1307
|
}
|
|
1308
1308
|
),
|
|
1309
|
-
/* @__PURE__ */
|
|
1309
|
+
/* @__PURE__ */ g(
|
|
1310
1310
|
C,
|
|
1311
1311
|
{
|
|
1312
1312
|
sx: { fontSize: "1em", fontWeight: 600, color: m.textColor },
|
|
1313
1313
|
children: [
|
|
1314
|
-
|
|
1314
|
+
Y.emoji,
|
|
1315
1315
|
" ",
|
|
1316
|
-
|
|
1316
|
+
Y.message
|
|
1317
1317
|
]
|
|
1318
1318
|
}
|
|
1319
1319
|
)
|
|
1320
1320
|
]
|
|
1321
1321
|
}
|
|
1322
1322
|
),
|
|
1323
|
-
/* @__PURE__ */
|
|
1323
|
+
/* @__PURE__ */ g(
|
|
1324
1324
|
r,
|
|
1325
1325
|
{
|
|
1326
1326
|
sx: {
|
|
@@ -1341,21 +1341,21 @@ const wn = (e, n) => {
|
|
|
1341
1341
|
}
|
|
1342
1342
|
}
|
|
1343
1343
|
),
|
|
1344
|
-
|
|
1344
|
+
N > 0 && /* @__PURE__ */ t(
|
|
1345
1345
|
r,
|
|
1346
1346
|
{
|
|
1347
1347
|
sx: {
|
|
1348
|
-
width: `${
|
|
1348
|
+
width: `${N}%`,
|
|
1349
1349
|
bgcolor: p,
|
|
1350
1350
|
transition: "width 0.7s ease 0.1s"
|
|
1351
1351
|
}
|
|
1352
1352
|
}
|
|
1353
1353
|
),
|
|
1354
|
-
|
|
1354
|
+
J > 0 && /* @__PURE__ */ t(
|
|
1355
1355
|
r,
|
|
1356
1356
|
{
|
|
1357
1357
|
sx: {
|
|
1358
|
-
width: `${
|
|
1358
|
+
width: `${J}%`,
|
|
1359
1359
|
bgcolor: m.secondaryContainer,
|
|
1360
1360
|
transition: "width 0.7s ease 0.2s"
|
|
1361
1361
|
}
|
|
@@ -1367,20 +1367,20 @@ const wn = (e, n) => {
|
|
|
1367
1367
|
/* @__PURE__ */ t(je, { direction: "row", spacing: 1, children: [
|
|
1368
1368
|
{
|
|
1369
1369
|
icon: /* @__PURE__ */ t(
|
|
1370
|
-
|
|
1370
|
+
kn,
|
|
1371
1371
|
{
|
|
1372
1372
|
sx: { fontSize: "1.25em", color: b }
|
|
1373
1373
|
}
|
|
1374
1374
|
),
|
|
1375
|
-
value:
|
|
1375
|
+
value: G,
|
|
1376
1376
|
label: o("eitherOr.results.correct", "Correct"),
|
|
1377
1377
|
bg: x,
|
|
1378
1378
|
valueSx: { color: b },
|
|
1379
1379
|
labelSx: { color: b }
|
|
1380
1380
|
},
|
|
1381
1381
|
{
|
|
1382
|
-
icon: /* @__PURE__ */ t(
|
|
1383
|
-
value:
|
|
1382
|
+
icon: /* @__PURE__ */ t(Tn, { sx: { fontSize: "1.25em", color: p } }),
|
|
1383
|
+
value: M,
|
|
1384
1384
|
label: o("eitherOr.results.wrong", "Wrong"),
|
|
1385
1385
|
bg: A,
|
|
1386
1386
|
valueSx: { color: p },
|
|
@@ -1388,18 +1388,18 @@ const wn = (e, n) => {
|
|
|
1388
1388
|
},
|
|
1389
1389
|
{
|
|
1390
1390
|
icon: /* @__PURE__ */ t(
|
|
1391
|
-
|
|
1391
|
+
Pn,
|
|
1392
1392
|
{
|
|
1393
1393
|
sx: { fontSize: "1.25em", color: m.textColor }
|
|
1394
1394
|
}
|
|
1395
1395
|
),
|
|
1396
|
-
value:
|
|
1396
|
+
value: H,
|
|
1397
1397
|
label: o("eitherOr.results.missed", "Missed"),
|
|
1398
1398
|
bg: m.surfaceVariant,
|
|
1399
1399
|
valueSx: { color: m.textColor },
|
|
1400
1400
|
labelSx: { color: m.textColor }
|
|
1401
1401
|
}
|
|
1402
|
-
].map((U) => /* @__PURE__ */
|
|
1402
|
+
].map((U) => /* @__PURE__ */ g(
|
|
1403
1403
|
r,
|
|
1404
1404
|
{
|
|
1405
1405
|
sx: {
|
|
@@ -1437,7 +1437,7 @@ const wn = (e, n) => {
|
|
|
1437
1437
|
},
|
|
1438
1438
|
U.label
|
|
1439
1439
|
)) }),
|
|
1440
|
-
v > 0 && O !== null && O > 0 && /* @__PURE__ */
|
|
1440
|
+
v > 0 && O !== null && O > 0 && /* @__PURE__ */ g(
|
|
1441
1441
|
r,
|
|
1442
1442
|
{
|
|
1443
1443
|
sx: {
|
|
@@ -1464,7 +1464,7 @@ const wn = (e, n) => {
|
|
|
1464
1464
|
},
|
|
1465
1465
|
children: [
|
|
1466
1466
|
/* @__PURE__ */ t(
|
|
1467
|
-
|
|
1467
|
+
vn,
|
|
1468
1468
|
{
|
|
1469
1469
|
sx: { color: c, fontSize: "1.4em", flexShrink: 0 }
|
|
1470
1470
|
}
|
|
@@ -1478,7 +1478,7 @@ const wn = (e, n) => {
|
|
|
1478
1478
|
lineHeight: 1.5
|
|
1479
1479
|
},
|
|
1480
1480
|
children: o("eitherOr.betterThanLabel", {
|
|
1481
|
-
points:
|
|
1481
|
+
points: R ? $ : v,
|
|
1482
1482
|
percentile: O
|
|
1483
1483
|
})
|
|
1484
1484
|
}
|
|
@@ -1486,21 +1486,21 @@ const wn = (e, n) => {
|
|
|
1486
1486
|
]
|
|
1487
1487
|
}
|
|
1488
1488
|
),
|
|
1489
|
-
/* @__PURE__ */
|
|
1489
|
+
/* @__PURE__ */ g(
|
|
1490
1490
|
r,
|
|
1491
1491
|
{
|
|
1492
1492
|
sx: {
|
|
1493
1493
|
display: "flex",
|
|
1494
1494
|
flexDirection: L ? "column-reverse" : "row",
|
|
1495
|
-
justifyContent:
|
|
1495
|
+
justifyContent: B ? "space-between" : "flex-end",
|
|
1496
1496
|
alignItems: "center",
|
|
1497
1497
|
gap: I.lg
|
|
1498
1498
|
},
|
|
1499
1499
|
children: [
|
|
1500
1500
|
/* @__PURE__ */ t(
|
|
1501
|
-
|
|
1501
|
+
me,
|
|
1502
1502
|
{
|
|
1503
|
-
brandingLogo:
|
|
1503
|
+
brandingLogo: B,
|
|
1504
1504
|
textColor: h,
|
|
1505
1505
|
label: ((fe = n == null ? void 0 : n.labels) == null ? void 0 : fe.sponsor) || null
|
|
1506
1506
|
}
|
|
@@ -1545,9 +1545,9 @@ const wn = (e, n) => {
|
|
|
1545
1545
|
}
|
|
1546
1546
|
),
|
|
1547
1547
|
/* @__PURE__ */ t(
|
|
1548
|
-
|
|
1548
|
+
Zt,
|
|
1549
1549
|
{
|
|
1550
|
-
additionalCTA:
|
|
1550
|
+
additionalCTA: f,
|
|
1551
1551
|
buttonStyle: {
|
|
1552
1552
|
borderRadius: w,
|
|
1553
1553
|
width: "100%",
|
|
@@ -1567,18 +1567,18 @@ const wn = (e, n) => {
|
|
|
1567
1567
|
]
|
|
1568
1568
|
}
|
|
1569
1569
|
);
|
|
1570
|
-
},
|
|
1570
|
+
}, $n = 150, Fn = ({
|
|
1571
1571
|
breakdown: e,
|
|
1572
1572
|
currentPoints: n,
|
|
1573
1573
|
primaryColor: l,
|
|
1574
1574
|
textColor: i
|
|
1575
1575
|
}) => {
|
|
1576
|
-
const { t: s } =
|
|
1576
|
+
const { t: s } = ee(), f = Jt(), o = (R) => R.toLocaleString(f), m = K(), c = pe(), u = Pe(), h = Te().primary, b = m.outlineEnabledBorder, p = le(l), [x, A] = z(null), [E, w] = z(!1);
|
|
1577
1577
|
if (he(() => {
|
|
1578
|
-
const
|
|
1578
|
+
const R = requestAnimationFrame(() => {
|
|
1579
1579
|
setTimeout(() => w(!0), 80);
|
|
1580
1580
|
});
|
|
1581
|
-
return () => cancelAnimationFrame(
|
|
1581
|
+
return () => cancelAnimationFrame(R);
|
|
1582
1582
|
}, []), !e || e.length === 0)
|
|
1583
1583
|
return /* @__PURE__ */ t(r, { sx: { py: u.lg, textAlign: "center" }, children: /* @__PURE__ */ t(
|
|
1584
1584
|
C,
|
|
@@ -1592,22 +1592,22 @@ const wn = (e, n) => {
|
|
|
1592
1592
|
children: "No distribution data available."
|
|
1593
1593
|
}
|
|
1594
1594
|
) });
|
|
1595
|
-
const I = e.filter((
|
|
1596
|
-
(
|
|
1595
|
+
const I = e.filter((R) => R.totalUsers > 0), y = Math.max(...I.map((R) => R.totalUsers), 1), d = Math.log(y + 1), L = e.reduce((R, k) => R + k.totalUsers, 0), S = n != null ? e.find(
|
|
1596
|
+
(R) => n >= R.rangeStartInclusive && n <= R.rangeEndInclusive
|
|
1597
1597
|
) ?? null : null, P = S ? I.findIndex(
|
|
1598
|
-
(
|
|
1599
|
-
) : -1,
|
|
1598
|
+
(R) => R.rangeStartInclusive === S.rangeStartInclusive
|
|
1599
|
+
) : -1, B = x !== null ? I[x] : null, v = B ? `${o(B.rangeStartInclusive)} – ${o(B.rangeEndInclusive)} ${s("eitherOr.standings.pts", "pts")}` : S ? s("eitherOr.standings.yourRange", "Your range: {{start}} – {{end}}", {
|
|
1600
1600
|
start: o(S.rangeStartInclusive),
|
|
1601
1601
|
end: o(S.rangeEndInclusive)
|
|
1602
|
-
}) : null,
|
|
1602
|
+
}) : null, D = B ? B.totalUsers : S ? S.totalUsers : null, O = 5, V = Math.floor(
|
|
1603
1603
|
(I.length - 1) / (O - 1)
|
|
1604
|
-
),
|
|
1604
|
+
), $ = new Set(
|
|
1605
1605
|
Array.from(
|
|
1606
1606
|
{ length: O },
|
|
1607
|
-
(
|
|
1607
|
+
(R, k) => Math.min(k * V, I.length - 1)
|
|
1608
1608
|
)
|
|
1609
1609
|
);
|
|
1610
|
-
return /* @__PURE__ */
|
|
1610
|
+
return /* @__PURE__ */ g(
|
|
1611
1611
|
r,
|
|
1612
1612
|
{
|
|
1613
1613
|
sx: {
|
|
@@ -1632,7 +1632,7 @@ const wn = (e, n) => {
|
|
|
1632
1632
|
"& > *": { position: "relative", zIndex: 1 }
|
|
1633
1633
|
},
|
|
1634
1634
|
children: [
|
|
1635
|
-
/* @__PURE__ */
|
|
1635
|
+
/* @__PURE__ */ g(
|
|
1636
1636
|
r,
|
|
1637
1637
|
{
|
|
1638
1638
|
sx: {
|
|
@@ -1688,10 +1688,10 @@ const wn = (e, n) => {
|
|
|
1688
1688
|
mb: u.md,
|
|
1689
1689
|
borderRadius: c.xs,
|
|
1690
1690
|
borderLeft: `3px solid ${v ? l : b}`,
|
|
1691
|
-
backgroundColor:
|
|
1691
|
+
backgroundColor: B ? `rgba(${le(b)}, 0.6)` : `rgba(${le(b)}, 0.35)`,
|
|
1692
1692
|
transition: "background-color 200ms ease, border-left-color 200ms ease"
|
|
1693
1693
|
},
|
|
1694
|
-
children: v ? /* @__PURE__ */
|
|
1694
|
+
children: v ? /* @__PURE__ */ g(Qe, { children: [
|
|
1695
1695
|
/* @__PURE__ */ t(
|
|
1696
1696
|
C,
|
|
1697
1697
|
{
|
|
@@ -1715,7 +1715,7 @@ const wn = (e, n) => {
|
|
|
1715
1715
|
fontWeight: 600
|
|
1716
1716
|
},
|
|
1717
1717
|
children: s("eitherOr.standings.totalUsers", "{{count}} users", {
|
|
1718
|
-
count:
|
|
1718
|
+
count: D ?? 0
|
|
1719
1719
|
})
|
|
1720
1720
|
}
|
|
1721
1721
|
)
|
|
@@ -1741,11 +1741,11 @@ const wn = (e, n) => {
|
|
|
1741
1741
|
display: "flex",
|
|
1742
1742
|
alignItems: "flex-end",
|
|
1743
1743
|
gap: "3px",
|
|
1744
|
-
height: `${
|
|
1744
|
+
height: `${$n}px`,
|
|
1745
1745
|
width: "100%"
|
|
1746
1746
|
},
|
|
1747
|
-
children: I.map((
|
|
1748
|
-
const
|
|
1747
|
+
children: I.map((R, k) => {
|
|
1748
|
+
const G = k === P, M = x === k, H = Math.log(R.totalUsers + 1) / d * 100, a = G || M ? l : `rgba(${p}, 0.5)`;
|
|
1749
1749
|
return /* @__PURE__ */ t(
|
|
1750
1750
|
r,
|
|
1751
1751
|
{
|
|
@@ -1756,10 +1756,10 @@ const wn = (e, n) => {
|
|
|
1756
1756
|
alignItems: "flex-end",
|
|
1757
1757
|
cursor: "pointer"
|
|
1758
1758
|
},
|
|
1759
|
-
onMouseEnter: () => A(
|
|
1759
|
+
onMouseEnter: () => A(k),
|
|
1760
1760
|
onMouseLeave: () => A(null),
|
|
1761
|
-
onTouchStart: (
|
|
1762
|
-
|
|
1761
|
+
onTouchStart: (Y) => {
|
|
1762
|
+
Y.preventDefault(), A(k);
|
|
1763
1763
|
},
|
|
1764
1764
|
onTouchEnd: () => setTimeout(() => A(null), 2e3),
|
|
1765
1765
|
children: /* @__PURE__ */ t(
|
|
@@ -1767,18 +1767,18 @@ const wn = (e, n) => {
|
|
|
1767
1767
|
{
|
|
1768
1768
|
sx: {
|
|
1769
1769
|
width: "100%",
|
|
1770
|
-
height: E ? `${
|
|
1770
|
+
height: E ? `${H}%` : "0%",
|
|
1771
1771
|
borderRadius: "3px 3px 1px 1px",
|
|
1772
1772
|
backgroundColor: a,
|
|
1773
|
-
boxShadow:
|
|
1773
|
+
boxShadow: G || M ? `0 0 10px rgba(${p}, 0.4), 0 0 3px rgba(${p}, 0.2)` : "none",
|
|
1774
1774
|
transition: [
|
|
1775
|
-
`height 480ms cubic-bezier(0.34, 1.56, 0.64, 1) ${
|
|
1775
|
+
`height 480ms cubic-bezier(0.34, 1.56, 0.64, 1) ${k * 18}ms`,
|
|
1776
1776
|
"background-color 150ms ease",
|
|
1777
1777
|
"box-shadow 150ms ease"
|
|
1778
1778
|
].join(", "),
|
|
1779
1779
|
position: "relative",
|
|
1780
1780
|
overflow: "hidden",
|
|
1781
|
-
"&::after":
|
|
1781
|
+
"&::after": G ? {
|
|
1782
1782
|
content: '""',
|
|
1783
1783
|
position: "absolute",
|
|
1784
1784
|
top: 0,
|
|
@@ -1791,22 +1791,22 @@ const wn = (e, n) => {
|
|
|
1791
1791
|
}
|
|
1792
1792
|
)
|
|
1793
1793
|
},
|
|
1794
|
-
|
|
1794
|
+
k
|
|
1795
1795
|
);
|
|
1796
1796
|
})
|
|
1797
1797
|
}
|
|
1798
1798
|
),
|
|
1799
1799
|
/* @__PURE__ */ t(r, { sx: { height: "1px", backgroundColor: b, mt: "1px" } }),
|
|
1800
|
-
/* @__PURE__ */ t(r, { sx: { position: "relative", height: "18px", mt: "4px" }, children: I.map((
|
|
1801
|
-
if (
|
|
1802
|
-
const
|
|
1800
|
+
/* @__PURE__ */ t(r, { sx: { position: "relative", height: "18px", mt: "4px" }, children: I.map((R, k) => {
|
|
1801
|
+
if (!$.has(k)) return null;
|
|
1802
|
+
const G = I.length > 1 ? k / (I.length - 1) * 100 : 0, M = k === 0, H = k === I.length - 1;
|
|
1803
1803
|
return /* @__PURE__ */ t(
|
|
1804
1804
|
C,
|
|
1805
1805
|
{
|
|
1806
1806
|
sx: {
|
|
1807
1807
|
position: "absolute",
|
|
1808
|
-
left: `${
|
|
1809
|
-
transform:
|
|
1808
|
+
left: `${G}%`,
|
|
1809
|
+
transform: M ? "none" : H ? "translateX(-100%)" : "translateX(-50%)",
|
|
1810
1810
|
fontSize: "0.6em",
|
|
1811
1811
|
fontFamily: h,
|
|
1812
1812
|
color: i,
|
|
@@ -1814,38 +1814,38 @@ const wn = (e, n) => {
|
|
|
1814
1814
|
lineHeight: 1,
|
|
1815
1815
|
userSelect: "none"
|
|
1816
1816
|
},
|
|
1817
|
-
children: o(
|
|
1817
|
+
children: o(R.rangeStartInclusive)
|
|
1818
1818
|
},
|
|
1819
|
-
|
|
1819
|
+
k
|
|
1820
1820
|
);
|
|
1821
1821
|
}) })
|
|
1822
1822
|
]
|
|
1823
1823
|
}
|
|
1824
1824
|
);
|
|
1825
|
-
}, Ze = 10,
|
|
1825
|
+
}, Ze = 10, Yt = ({
|
|
1826
1826
|
game: e,
|
|
1827
1827
|
sdk: n,
|
|
1828
1828
|
stepInfo: l,
|
|
1829
1829
|
brandingPrimaryColor: i
|
|
1830
1830
|
}) => {
|
|
1831
|
-
var
|
|
1832
|
-
const { t: s } =
|
|
1831
|
+
var Y;
|
|
1832
|
+
const { t: s } = ee(), f = Ne(), o = K(), m = ((Y = e == null ? void 0 : e.branding) == null ? void 0 : Y.colors) || null, c = i || (m == null ? void 0 : m.primaryColor) || o.palette.primary.plainColor, u = (m == null ? void 0 : m.contentColor) || o.textColor, h = Te().primary, b = Te().secondary, p = pe(), x = Pe(), A = He(), E = o.surfaceVariant, w = f.colorSchemes.light.palette.primary.onPrimary, I = o.outlineEnabledBorder, [y, d] = z(null), [L, S] = z(!0), [P, B] = z(0), [v, D] = z(null), [O, V] = z("leaderboard"), $ = Lt(), R = (l == null ? void 0 : l.currentPoints) ?? 0;
|
|
1833
1833
|
he(() => {
|
|
1834
1834
|
(async () => {
|
|
1835
1835
|
try {
|
|
1836
1836
|
if (!e) return;
|
|
1837
|
-
const [
|
|
1838
|
-
n.miniGames.getEitherOrResults(e.id),
|
|
1837
|
+
const [N, J] = await Promise.all([
|
|
1838
|
+
n.miniGames.getEitherOrResults(e.id, $),
|
|
1839
1839
|
n.profile.getOwn().getInfo().catch(() => null)
|
|
1840
|
-
]), X = (
|
|
1841
|
-
if (
|
|
1842
|
-
(
|
|
1840
|
+
]), X = (J == null ? void 0 : J.id) ?? null;
|
|
1841
|
+
if (D(X), X && N.standings.some(
|
|
1842
|
+
(te) => te.userId === X
|
|
1843
1843
|
)) {
|
|
1844
|
-
d(
|
|
1844
|
+
d(N);
|
|
1845
1845
|
return;
|
|
1846
1846
|
}
|
|
1847
1847
|
if (R > 0) {
|
|
1848
|
-
const Z = [...
|
|
1848
|
+
const Z = [...N.standings], te = {
|
|
1849
1849
|
userId: "current",
|
|
1850
1850
|
userModel: {
|
|
1851
1851
|
id: "current",
|
|
@@ -1864,18 +1864,18 @@ const wn = (e, n) => {
|
|
|
1864
1864
|
followersCount: 0
|
|
1865
1865
|
},
|
|
1866
1866
|
personalBest: R.toString()
|
|
1867
|
-
},
|
|
1868
|
-
(
|
|
1867
|
+
}, ae = Z.findIndex(
|
|
1868
|
+
(ne) => Number.parseInt(ne.personalBest) < R
|
|
1869
1869
|
);
|
|
1870
|
-
|
|
1870
|
+
ae >= 0 && ae < 50 && (Z.splice(ae, 0, te), N.standings = Z);
|
|
1871
1871
|
}
|
|
1872
|
-
d(
|
|
1872
|
+
d(N);
|
|
1873
1873
|
} catch {
|
|
1874
1874
|
} finally {
|
|
1875
1875
|
S(!1);
|
|
1876
1876
|
}
|
|
1877
1877
|
})();
|
|
1878
|
-
}, [e, n, l]);
|
|
1878
|
+
}, [e, n, l, $]);
|
|
1879
1879
|
const k = {
|
|
1880
1880
|
tableContainer: {
|
|
1881
1881
|
overflowX: "auto",
|
|
@@ -1889,7 +1889,7 @@ const wn = (e, n) => {
|
|
|
1889
1889
|
cursor: "default",
|
|
1890
1890
|
"& > tbody > tr:hover": { backgroundColor: "transparent" },
|
|
1891
1891
|
"& > thead > tr > th": {
|
|
1892
|
-
backgroundColor: `rgba(${
|
|
1892
|
+
backgroundColor: `rgba(${le(E)}, 0.8)`,
|
|
1893
1893
|
color: u,
|
|
1894
1894
|
fontFamily: h,
|
|
1895
1895
|
fontWeight: 600,
|
|
@@ -1899,7 +1899,7 @@ const wn = (e, n) => {
|
|
|
1899
1899
|
}
|
|
1900
1900
|
},
|
|
1901
1901
|
headerCellPosition: {
|
|
1902
|
-
backgroundColor: `rgba(${
|
|
1902
|
+
backgroundColor: `rgba(${le(E)}, 0.8)`,
|
|
1903
1903
|
color: u,
|
|
1904
1904
|
fontFamily: h,
|
|
1905
1905
|
fontWeight: 600,
|
|
@@ -1909,7 +1909,7 @@ const wn = (e, n) => {
|
|
|
1909
1909
|
width: "10%"
|
|
1910
1910
|
},
|
|
1911
1911
|
headerCellName: {
|
|
1912
|
-
backgroundColor: `rgba(${
|
|
1912
|
+
backgroundColor: `rgba(${le(E)}, 0.8)`,
|
|
1913
1913
|
color: u,
|
|
1914
1914
|
fontFamily: h,
|
|
1915
1915
|
fontWeight: 600,
|
|
@@ -1919,7 +1919,7 @@ const wn = (e, n) => {
|
|
|
1919
1919
|
width: "80%"
|
|
1920
1920
|
},
|
|
1921
1921
|
headerCellPoints: {
|
|
1922
|
-
backgroundColor: `rgba(${
|
|
1922
|
+
backgroundColor: `rgba(${le(E)}, 0.8)`,
|
|
1923
1923
|
color: u,
|
|
1924
1924
|
fontFamily: h,
|
|
1925
1925
|
fontWeight: 600,
|
|
@@ -1940,7 +1940,7 @@ const wn = (e, n) => {
|
|
|
1940
1940
|
textAlign: "center"
|
|
1941
1941
|
},
|
|
1942
1942
|
userRow: {
|
|
1943
|
-
backgroundColor: `rgba(${
|
|
1943
|
+
backgroundColor: `rgba(${le(c)}, 0.1)`
|
|
1944
1944
|
},
|
|
1945
1945
|
nameCell: {
|
|
1946
1946
|
display: "flex",
|
|
@@ -2001,10 +2001,10 @@ const wn = (e, n) => {
|
|
|
2001
2001
|
children: /* @__PURE__ */ t(C, { level: "body-lg", sx: k.noLeaderboardText, children: s("common.labels.noData", "No standings available yet.") })
|
|
2002
2002
|
}
|
|
2003
2003
|
);
|
|
2004
|
-
const
|
|
2004
|
+
const G = y.standings, M = Math.ceil(G.length / Ze), H = G.slice(
|
|
2005
2005
|
P * Ze,
|
|
2006
2006
|
(P + 1) * Ze
|
|
2007
|
-
),
|
|
2007
|
+
), a = [
|
|
2008
2008
|
{
|
|
2009
2009
|
id: "leaderboard",
|
|
2010
2010
|
label: s("eitherOr.standings.leaderboard", "Leaderboard")
|
|
@@ -2014,7 +2014,7 @@ const wn = (e, n) => {
|
|
|
2014
2014
|
label: s("eitherOr.standings.distribution", "Distribution")
|
|
2015
2015
|
}
|
|
2016
2016
|
];
|
|
2017
|
-
return /* @__PURE__ */
|
|
2017
|
+
return /* @__PURE__ */ g(
|
|
2018
2018
|
r,
|
|
2019
2019
|
{
|
|
2020
2020
|
sx: {
|
|
@@ -2033,12 +2033,12 @@ const wn = (e, n) => {
|
|
|
2033
2033
|
p: "3px",
|
|
2034
2034
|
gap: x.xs
|
|
2035
2035
|
},
|
|
2036
|
-
children:
|
|
2037
|
-
const
|
|
2036
|
+
children: a.map((T) => {
|
|
2037
|
+
const N = O === T.id;
|
|
2038
2038
|
return /* @__PURE__ */ t(
|
|
2039
2039
|
r,
|
|
2040
2040
|
{
|
|
2041
|
-
onClick: () => V(
|
|
2041
|
+
onClick: () => V(T.id),
|
|
2042
2042
|
sx: {
|
|
2043
2043
|
flex: 1,
|
|
2044
2044
|
display: "flex",
|
|
@@ -2046,7 +2046,7 @@ const wn = (e, n) => {
|
|
|
2046
2046
|
justifyContent: "center",
|
|
2047
2047
|
p: x.xs,
|
|
2048
2048
|
borderRadius: `calc(${p["2xl"]} - 3px)`,
|
|
2049
|
-
backgroundColor:
|
|
2049
|
+
backgroundColor: N ? c : E,
|
|
2050
2050
|
cursor: "pointer",
|
|
2051
2051
|
transition: "background-color 220ms ease",
|
|
2052
2052
|
userSelect: "none",
|
|
@@ -2057,23 +2057,23 @@ const wn = (e, n) => {
|
|
|
2057
2057
|
{
|
|
2058
2058
|
sx: {
|
|
2059
2059
|
fontFamily: h,
|
|
2060
|
-
fontWeight:
|
|
2060
|
+
fontWeight: N ? 700 : 500,
|
|
2061
2061
|
fontSize: "0.8em",
|
|
2062
|
-
color:
|
|
2063
|
-
opacity:
|
|
2062
|
+
color: N ? w : u,
|
|
2063
|
+
opacity: N ? 1 : 0.45,
|
|
2064
2064
|
transition: "color 220ms ease, opacity 220ms ease",
|
|
2065
2065
|
lineHeight: 1
|
|
2066
2066
|
},
|
|
2067
|
-
children:
|
|
2067
|
+
children: T.label
|
|
2068
2068
|
}
|
|
2069
2069
|
)
|
|
2070
2070
|
},
|
|
2071
|
-
|
|
2071
|
+
T.id
|
|
2072
2072
|
);
|
|
2073
2073
|
})
|
|
2074
2074
|
}
|
|
2075
2075
|
),
|
|
2076
|
-
O === "leaderboard" && /* @__PURE__ */
|
|
2076
|
+
O === "leaderboard" && /* @__PURE__ */ g(Qe, { children: [
|
|
2077
2077
|
/* @__PURE__ */ t(
|
|
2078
2078
|
C,
|
|
2079
2079
|
{
|
|
@@ -2087,8 +2087,8 @@ const wn = (e, n) => {
|
|
|
2087
2087
|
children: s("eitherOr.leaderboard.top50Note", "Top 50")
|
|
2088
2088
|
}
|
|
2089
2089
|
),
|
|
2090
|
-
/* @__PURE__ */ t(
|
|
2091
|
-
|
|
2090
|
+
/* @__PURE__ */ t(bn, { sx: k.tableContainer, children: /* @__PURE__ */ g(
|
|
2091
|
+
yn,
|
|
2092
2092
|
{
|
|
2093
2093
|
variant: "outlined",
|
|
2094
2094
|
hoverRow: !1,
|
|
@@ -2096,25 +2096,25 @@ const wn = (e, n) => {
|
|
|
2096
2096
|
size: "sm",
|
|
2097
2097
|
sx: k.table,
|
|
2098
2098
|
children: [
|
|
2099
|
-
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */
|
|
2099
|
+
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ g("tr", { children: [
|
|
2100
2100
|
/* @__PURE__ */ t("th", { style: k.headerCellPosition, children: A ? "" : s("eitherOr.leaderboard.position", "#") }),
|
|
2101
2101
|
/* @__PURE__ */ t("th", { style: k.headerCellName, children: s("eitherOr.leaderboard.name", "Name") }),
|
|
2102
2102
|
/* @__PURE__ */ t("th", { style: k.headerCellPoints, children: A ? "🎯" : s("eitherOr.leaderboard.points", "Pts") })
|
|
2103
2103
|
] }) }),
|
|
2104
|
-
/* @__PURE__ */ t("tbody", { children: H.map((
|
|
2105
|
-
var
|
|
2106
|
-
const
|
|
2107
|
-
return /* @__PURE__ */
|
|
2104
|
+
/* @__PURE__ */ t("tbody", { children: H.map((T, N) => {
|
|
2105
|
+
var ae, ne, Q;
|
|
2106
|
+
const J = P * Ze + N, X = T.userId === "current" || v !== null && T.userId === v, Z = ((ae = T.userModel) == null ? void 0 : ae.avatar) || void 0, te = ((ne = T.userModel) == null ? void 0 : ne.nickname) || ((Q = T.userModel) == null ? void 0 : Q.name) || s("common.labels.anonymous", "Anonymous");
|
|
2107
|
+
return /* @__PURE__ */ g(
|
|
2108
2108
|
"tr",
|
|
2109
2109
|
{
|
|
2110
2110
|
style: X ? k.userRow : void 0,
|
|
2111
2111
|
children: [
|
|
2112
|
-
/* @__PURE__ */ t("td", { style: k.tableCellPosition, children: /* @__PURE__ */
|
|
2112
|
+
/* @__PURE__ */ t("td", { style: k.tableCellPosition, children: /* @__PURE__ */ g(C, { sx: k.positionText, children: [
|
|
2113
2113
|
"#",
|
|
2114
|
-
|
|
2114
|
+
J + 1
|
|
2115
2115
|
] }) }),
|
|
2116
|
-
/* @__PURE__ */ t("td", { style: k.tableCellName, children: /* @__PURE__ */
|
|
2117
|
-
/* @__PURE__ */ t(
|
|
2116
|
+
/* @__PURE__ */ t("td", { style: k.tableCellName, children: /* @__PURE__ */ g(r, { sx: k.nameCell, children: [
|
|
2117
|
+
/* @__PURE__ */ t(pn, { src: Z, sx: k.leaderboardAvatar, children: !Z && /* @__PURE__ */ t(An, { sx: k.avatarIcon }) }),
|
|
2118
2118
|
/* @__PURE__ */ t(
|
|
2119
2119
|
C,
|
|
2120
2120
|
{
|
|
@@ -2123,20 +2123,20 @@ const wn = (e, n) => {
|
|
|
2123
2123
|
fontWeight: X ? 700 : 500,
|
|
2124
2124
|
color: X ? c : u
|
|
2125
2125
|
},
|
|
2126
|
-
children: X ? s("common.labels.me", "Me") :
|
|
2126
|
+
children: X ? s("common.labels.me", "Me") : te
|
|
2127
2127
|
}
|
|
2128
2128
|
)
|
|
2129
2129
|
] }) }),
|
|
2130
|
-
/* @__PURE__ */ t("td", { style: k.tableCellPoints, children: /* @__PURE__ */ t(C, { sx: k.pointsText, children:
|
|
2130
|
+
/* @__PURE__ */ t("td", { style: k.tableCellPoints, children: /* @__PURE__ */ t(C, { sx: k.pointsText, children: T.personalBest }) })
|
|
2131
2131
|
]
|
|
2132
2132
|
},
|
|
2133
|
-
`${
|
|
2133
|
+
`${T.userId}-${J}`
|
|
2134
2134
|
);
|
|
2135
2135
|
}) })
|
|
2136
2136
|
]
|
|
2137
2137
|
}
|
|
2138
2138
|
) }),
|
|
2139
|
-
|
|
2139
|
+
M > 1 && /* @__PURE__ */ g(
|
|
2140
2140
|
r,
|
|
2141
2141
|
{
|
|
2142
2142
|
sx: {
|
|
@@ -2149,7 +2149,7 @@ const wn = (e, n) => {
|
|
|
2149
2149
|
/* @__PURE__ */ t(
|
|
2150
2150
|
r,
|
|
2151
2151
|
{
|
|
2152
|
-
onClick: () => P > 0 &&
|
|
2152
|
+
onClick: () => P > 0 && B((T) => T - 1),
|
|
2153
2153
|
sx: {
|
|
2154
2154
|
cursor: P > 0 ? "pointer" : "default",
|
|
2155
2155
|
opacity: P > 0 ? 1 : 0.3,
|
|
@@ -2165,7 +2165,7 @@ const wn = (e, n) => {
|
|
|
2165
2165
|
children: "‹"
|
|
2166
2166
|
}
|
|
2167
2167
|
),
|
|
2168
|
-
/* @__PURE__ */
|
|
2168
|
+
/* @__PURE__ */ g(
|
|
2169
2169
|
C,
|
|
2170
2170
|
{
|
|
2171
2171
|
sx: {
|
|
@@ -2177,17 +2177,17 @@ const wn = (e, n) => {
|
|
|
2177
2177
|
children: [
|
|
2178
2178
|
P + 1,
|
|
2179
2179
|
" / ",
|
|
2180
|
-
|
|
2180
|
+
M
|
|
2181
2181
|
]
|
|
2182
2182
|
}
|
|
2183
2183
|
),
|
|
2184
2184
|
/* @__PURE__ */ t(
|
|
2185
2185
|
r,
|
|
2186
2186
|
{
|
|
2187
|
-
onClick: () => P <
|
|
2187
|
+
onClick: () => P < M - 1 && B((T) => T + 1),
|
|
2188
2188
|
sx: {
|
|
2189
|
-
cursor: P <
|
|
2190
|
-
opacity: P <
|
|
2189
|
+
cursor: P < M - 1 ? "pointer" : "default",
|
|
2190
|
+
opacity: P < M - 1 ? 1 : 0.3,
|
|
2191
2191
|
fontFamily: h,
|
|
2192
2192
|
fontSize: "1.25em",
|
|
2193
2193
|
fontWeight: 600,
|
|
@@ -2205,7 +2205,7 @@ const wn = (e, n) => {
|
|
|
2205
2205
|
)
|
|
2206
2206
|
] }),
|
|
2207
2207
|
O === "distribution" && /* @__PURE__ */ t(
|
|
2208
|
-
|
|
2208
|
+
Fn,
|
|
2209
2209
|
{
|
|
2210
2210
|
breakdown: y.breakdown,
|
|
2211
2211
|
currentPoints: R > 0 ? R : void 0,
|
|
@@ -2220,7 +2220,7 @@ const wn = (e, n) => {
|
|
|
2220
2220
|
children: e,
|
|
2221
2221
|
brandingBorderColor: n
|
|
2222
2222
|
}) => {
|
|
2223
|
-
const l = pe().md, i = n ||
|
|
2223
|
+
const l = pe().md, i = n || K().secondaryContainer, s = K().surface, f = Qt().size, o = Se(), m = f + " solid " + i;
|
|
2224
2224
|
return /* @__PURE__ */ t(
|
|
2225
2225
|
r,
|
|
2226
2226
|
{
|
|
@@ -2238,14 +2238,14 @@ const wn = (e, n) => {
|
|
|
2238
2238
|
children: e
|
|
2239
2239
|
}
|
|
2240
2240
|
);
|
|
2241
|
-
},
|
|
2242
|
-
var
|
|
2241
|
+
}, En = (e) => {
|
|
2242
|
+
var Y, T;
|
|
2243
2243
|
const {
|
|
2244
2244
|
eitherOr: n,
|
|
2245
2245
|
currentPair: l,
|
|
2246
2246
|
stepInfo: i,
|
|
2247
2247
|
gameState: s,
|
|
2248
|
-
timer:
|
|
2248
|
+
timer: f,
|
|
2249
2249
|
selected: o,
|
|
2250
2250
|
feedback: m,
|
|
2251
2251
|
sdk: c,
|
|
@@ -2257,19 +2257,19 @@ const wn = (e, n) => {
|
|
|
2257
2257
|
onSelection: A,
|
|
2258
2258
|
onPlayAgain: E,
|
|
2259
2259
|
imagePosition: w = "left"
|
|
2260
|
-
} = e, { t: I } =
|
|
2260
|
+
} = e, { t: I } = ee(), y = K(), d = ((Y = n == null ? void 0 : n.branding) == null ? void 0 : Y.colors) || null, L = (d == null ? void 0 : d.primaryColor) || y.palette.primary.plainColor, S = y.secondaryContainer, P = y.surfaceTintDim, B = ((T = le(P || "")) == null ? void 0 : T.replace(/[^\d,]/g, "")) ?? null, v = pe().md, D = Te().primary, O = Pe(), V = Se(), [$, R] = z(0), k = it(
|
|
2261
2261
|
{
|
|
2262
2262
|
images: n == null ? void 0 : n.images,
|
|
2263
2263
|
imagePlaceholder: u || ""
|
|
2264
2264
|
},
|
|
2265
2265
|
ve.STANDARD
|
|
2266
|
-
),
|
|
2266
|
+
), G = () => {
|
|
2267
2267
|
switch (s) {
|
|
2268
|
-
case
|
|
2268
|
+
case q.LOADING:
|
|
2269
2269
|
return /* @__PURE__ */ t(ot, { my: 20 });
|
|
2270
|
-
case
|
|
2270
|
+
case q.TUTORIAL:
|
|
2271
2271
|
return /* @__PURE__ */ t(
|
|
2272
|
-
|
|
2272
|
+
On,
|
|
2273
2273
|
{
|
|
2274
2274
|
onStart: x,
|
|
2275
2275
|
game: n,
|
|
@@ -2278,12 +2278,12 @@ const wn = (e, n) => {
|
|
|
2278
2278
|
isSubmitting: e.isSubmitting
|
|
2279
2279
|
}
|
|
2280
2280
|
);
|
|
2281
|
-
case
|
|
2281
|
+
case q.PLAYING:
|
|
2282
2282
|
return /* @__PURE__ */ t(
|
|
2283
|
-
|
|
2283
|
+
Bn,
|
|
2284
2284
|
{
|
|
2285
2285
|
currentPair: l,
|
|
2286
|
-
timer:
|
|
2286
|
+
timer: f,
|
|
2287
2287
|
maxTime: (n == null ? void 0 : n.time) ?? 10,
|
|
2288
2288
|
selected: o,
|
|
2289
2289
|
feedback: m,
|
|
@@ -2293,7 +2293,7 @@ const wn = (e, n) => {
|
|
|
2293
2293
|
game: n
|
|
2294
2294
|
}
|
|
2295
2295
|
);
|
|
2296
|
-
case
|
|
2296
|
+
case q.RESULTS:
|
|
2297
2297
|
return /* @__PURE__ */ t(
|
|
2298
2298
|
st,
|
|
2299
2299
|
{
|
|
@@ -2308,7 +2308,7 @@ const wn = (e, n) => {
|
|
|
2308
2308
|
default:
|
|
2309
2309
|
return null;
|
|
2310
2310
|
}
|
|
2311
|
-
},
|
|
2311
|
+
}, M = s === q.RESULTS, H = {
|
|
2312
2312
|
display: "flex",
|
|
2313
2313
|
flexDirection: "row",
|
|
2314
2314
|
justifyContent: "center",
|
|
@@ -2321,10 +2321,10 @@ const wn = (e, n) => {
|
|
|
2321
2321
|
px: O.md,
|
|
2322
2322
|
gap: O.xs,
|
|
2323
2323
|
"&:not(.Mui-selected):hover": {
|
|
2324
|
-
bgcolor:
|
|
2324
|
+
bgcolor: B ? `rgba(${B},0.06)` : `${P}0F`
|
|
2325
2325
|
},
|
|
2326
|
-
[`&.${
|
|
2327
|
-
bgcolor:
|
|
2326
|
+
[`&.${Ut.selected}`]: {
|
|
2327
|
+
bgcolor: B ? `rgba(${B},0.06)` : `${P}0F`,
|
|
2328
2328
|
borderBottom: "3px solid " + L,
|
|
2329
2329
|
opacity: "100%",
|
|
2330
2330
|
mb: "-1px"
|
|
@@ -2335,19 +2335,19 @@ const wn = (e, n) => {
|
|
|
2335
2335
|
flexDirection: "column",
|
|
2336
2336
|
overflow: "auto"
|
|
2337
2337
|
};
|
|
2338
|
-
return
|
|
2339
|
-
|
|
2338
|
+
return M && b ? /* @__PURE__ */ t(ke, { brandingBorderColor: (d == null ? void 0 : d.borderColor) || null, children: /* @__PURE__ */ g(
|
|
2339
|
+
Wt,
|
|
2340
2340
|
{
|
|
2341
|
-
value:
|
|
2342
|
-
onChange: (
|
|
2341
|
+
value: $,
|
|
2342
|
+
onChange: (N, J) => R(J),
|
|
2343
2343
|
sx: {
|
|
2344
2344
|
borderRadius: v,
|
|
2345
2345
|
width: "100%",
|
|
2346
2346
|
backgroundColor: "transparent"
|
|
2347
2347
|
},
|
|
2348
2348
|
children: [
|
|
2349
|
-
/* @__PURE__ */
|
|
2350
|
-
|
|
2349
|
+
/* @__PURE__ */ g(
|
|
2350
|
+
Mt,
|
|
2351
2351
|
{
|
|
2352
2352
|
sx: {
|
|
2353
2353
|
fontSize: "1em",
|
|
@@ -2355,7 +2355,7 @@ const wn = (e, n) => {
|
|
|
2355
2355
|
flexDirection: V ? "column" : "row"
|
|
2356
2356
|
},
|
|
2357
2357
|
children: [
|
|
2358
|
-
/* @__PURE__ */ t(et, { sx:
|
|
2358
|
+
/* @__PURE__ */ t(et, { sx: H, disableIndicator: !0, children: /* @__PURE__ */ g(
|
|
2359
2359
|
r,
|
|
2360
2360
|
{
|
|
2361
2361
|
sx: {
|
|
@@ -2369,7 +2369,7 @@ const wn = (e, n) => {
|
|
|
2369
2369
|
C,
|
|
2370
2370
|
{
|
|
2371
2371
|
sx: {
|
|
2372
|
-
fontFamily:
|
|
2372
|
+
fontFamily: D,
|
|
2373
2373
|
fontSize: "1em",
|
|
2374
2374
|
fontWeight: 500,
|
|
2375
2375
|
lineHeight: "24px",
|
|
@@ -2382,7 +2382,7 @@ const wn = (e, n) => {
|
|
|
2382
2382
|
]
|
|
2383
2383
|
}
|
|
2384
2384
|
) }),
|
|
2385
|
-
/* @__PURE__ */ t(et, { sx:
|
|
2385
|
+
/* @__PURE__ */ t(et, { sx: H, disableIndicator: !0, children: /* @__PURE__ */ g(
|
|
2386
2386
|
r,
|
|
2387
2387
|
{
|
|
2388
2388
|
sx: {
|
|
@@ -2391,12 +2391,12 @@ const wn = (e, n) => {
|
|
|
2391
2391
|
gap: O.xs
|
|
2392
2392
|
},
|
|
2393
2393
|
children: [
|
|
2394
|
-
/* @__PURE__ */ t(
|
|
2394
|
+
/* @__PURE__ */ t(Ht, { sx: { fontSize: "1.25em" } }),
|
|
2395
2395
|
/* @__PURE__ */ t(
|
|
2396
2396
|
C,
|
|
2397
2397
|
{
|
|
2398
2398
|
sx: {
|
|
2399
|
-
fontFamily:
|
|
2399
|
+
fontFamily: D,
|
|
2400
2400
|
fontSize: "1em",
|
|
2401
2401
|
fontWeight: 500,
|
|
2402
2402
|
lineHeight: "24px",
|
|
@@ -2412,9 +2412,9 @@ const wn = (e, n) => {
|
|
|
2412
2412
|
]
|
|
2413
2413
|
}
|
|
2414
2414
|
),
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2415
|
+
$ === 0 && /* @__PURE__ */ t(tt, { value: 0, sx: { p: 0, fontSize: "1em", display: "flex" }, children: /* @__PURE__ */ t(r, { sx: a, children: G() }) }),
|
|
2416
|
+
$ === 1 && /* @__PURE__ */ t(tt, { value: 1, sx: { p: 0, fontSize: "1em", display: "flex" }, children: /* @__PURE__ */ t(r, { sx: a, children: /* @__PURE__ */ t(
|
|
2417
|
+
Yt,
|
|
2418
2418
|
{
|
|
2419
2419
|
game: n,
|
|
2420
2420
|
sdk: c,
|
|
@@ -2424,27 +2424,27 @@ const wn = (e, n) => {
|
|
|
2424
2424
|
) }) })
|
|
2425
2425
|
]
|
|
2426
2426
|
}
|
|
2427
|
-
) }) :
|
|
2428
|
-
|
|
2427
|
+
) }) : M ? /* @__PURE__ */ t(ke, { brandingBorderColor: (d == null ? void 0 : d.borderColor) || null, children: /* @__PURE__ */ t(r, { sx: a, children: G() }) }) : /* @__PURE__ */ t(ke, { brandingBorderColor: (d == null ? void 0 : d.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2428
|
+
en,
|
|
2429
2429
|
{
|
|
2430
2430
|
entity: n,
|
|
2431
2431
|
headline: I("eitherOr.headline", "Either/Or"),
|
|
2432
|
-
finalImage:
|
|
2432
|
+
finalImage: k,
|
|
2433
2433
|
imagePosition: w,
|
|
2434
2434
|
rulesDisplay: h,
|
|
2435
|
-
children:
|
|
2435
|
+
children: G()
|
|
2436
2436
|
}
|
|
2437
2437
|
) });
|
|
2438
|
-
},
|
|
2439
|
-
const { t: e } =
|
|
2438
|
+
}, Un = () => {
|
|
2439
|
+
const { t: e } = ee();
|
|
2440
2440
|
return /* @__PURE__ */ t(ke, { brandingBorderColor: null, children: /* @__PURE__ */ t(
|
|
2441
|
-
|
|
2441
|
+
tn,
|
|
2442
2442
|
{
|
|
2443
2443
|
notFoundTitle: e("eitherOr.eitherOrNotFound"),
|
|
2444
2444
|
notFoundMessage: e("eitherOr.eitherOrNotFoundDescription")
|
|
2445
2445
|
}
|
|
2446
2446
|
) });
|
|
2447
|
-
},
|
|
2447
|
+
}, Wn = (e) => ({
|
|
2448
2448
|
// Pulse animation for buttons
|
|
2449
2449
|
pulseAnimation: {
|
|
2450
2450
|
"@keyframes pulse": {
|
|
@@ -2492,7 +2492,7 @@ const wn = (e, n) => {
|
|
|
2492
2492
|
display: "flex",
|
|
2493
2493
|
alignItems: "center"
|
|
2494
2494
|
}
|
|
2495
|
-
}),
|
|
2495
|
+
}), Mn = (e) => {
|
|
2496
2496
|
var E, w, I, y, d;
|
|
2497
2497
|
const n = ((E = e.eitherOr.branding) == null ? void 0 : E.colors) || null, l = Se(), i = Ne(), s = it(
|
|
2498
2498
|
{
|
|
@@ -2500,13 +2500,13 @@ const wn = (e, n) => {
|
|
|
2500
2500
|
imagePlaceholder: e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : ""
|
|
2501
2501
|
},
|
|
2502
2502
|
ve.STANDARD
|
|
2503
|
-
),
|
|
2504
|
-
fontFamilyPrimary:
|
|
2503
|
+
), f = Te().primary, o = pe().xl, m = (n == null ? void 0 : n.primaryColor) || K().palette.primary.plainColor, c = K().palette.primary.onPrimary, u = (n == null ? void 0 : n.contentColor) || K().textColor, h = l ? ((w = e.eitherOr.branding) == null ? void 0 : w.images.mobileLogo) || ((I = e.eitherOr.branding) == null ? void 0 : I.images.mainLogo) || "" : ((y = e.eitherOr.branding) == null ? void 0 : y.images.mainLogo) || "", { t: b } = ee(), p = e.imagePosition || "left", x = Wn({
|
|
2504
|
+
fontFamilyPrimary: f,
|
|
2505
2505
|
buttonRadius: o,
|
|
2506
2506
|
primaryColor: m,
|
|
2507
2507
|
onPrimaryColor: c
|
|
2508
2508
|
}), A = () => {
|
|
2509
|
-
var L, S, P,
|
|
2509
|
+
var L, S, P, B;
|
|
2510
2510
|
return e.signInCTA ? (L = e.signInCTA) != null && L.component ? e.signInCTA.component : (S = e.signInCTA) != null && S.onClick ? /* @__PURE__ */ t(
|
|
2511
2511
|
ye,
|
|
2512
2512
|
{
|
|
@@ -2523,7 +2523,7 @@ const wn = (e, n) => {
|
|
|
2523
2523
|
{
|
|
2524
2524
|
component: "a",
|
|
2525
2525
|
href: e.signInCTA.url,
|
|
2526
|
-
target: ((
|
|
2526
|
+
target: ((B = e.signInCTA) == null ? void 0 : B.target) || "_self",
|
|
2527
2527
|
sx: {
|
|
2528
2528
|
...x.signInButton,
|
|
2529
2529
|
...x.pulseAnimation,
|
|
@@ -2543,8 +2543,8 @@ const wn = (e, n) => {
|
|
|
2543
2543
|
...x.pulseAnimation
|
|
2544
2544
|
},
|
|
2545
2545
|
onClick: () => {
|
|
2546
|
-
var v,
|
|
2547
|
-
((v = e.signInCTA) == null ? void 0 : v.target) === "_blank" ? window.open((
|
|
2546
|
+
var v, D, O;
|
|
2547
|
+
((v = e.signInCTA) == null ? void 0 : v.target) === "_blank" ? window.open((D = e.signInCTA) == null ? void 0 : D.url, "_blank") : window.location.href = (O = e.signInCTA) == null ? void 0 : O.url;
|
|
2548
2548
|
},
|
|
2549
2549
|
children: /* @__PURE__ */ t(C, { sx: x.signInButtonText, children: e.signInCTA.defaultLabel || b("common.signIn") })
|
|
2550
2550
|
}
|
|
@@ -2571,7 +2571,7 @@ const wn = (e, n) => {
|
|
|
2571
2571
|
);
|
|
2572
2572
|
};
|
|
2573
2573
|
return /* @__PURE__ */ t(ke, { brandingBorderColor: (n == null ? void 0 : n.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2574
|
-
|
|
2574
|
+
nn,
|
|
2575
2575
|
{
|
|
2576
2576
|
entity: e.eitherOr,
|
|
2577
2577
|
headline: b("eitherOr.headline"),
|
|
@@ -2579,7 +2579,7 @@ const wn = (e, n) => {
|
|
|
2579
2579
|
imagePosition: p,
|
|
2580
2580
|
signInContent: A(),
|
|
2581
2581
|
brandingContent: /* @__PURE__ */ t(
|
|
2582
|
-
|
|
2582
|
+
me,
|
|
2583
2583
|
{
|
|
2584
2584
|
brandingLogo: h,
|
|
2585
2585
|
textColor: l && s ? (n == null ? void 0 : n.contentColor) || i.colorSchemes.dark.textColor : u,
|
|
@@ -2589,19 +2589,19 @@ const wn = (e, n) => {
|
|
|
2589
2589
|
rulesDisplay: e.rulesDisplay
|
|
2590
2590
|
}
|
|
2591
2591
|
) });
|
|
2592
|
-
},
|
|
2592
|
+
}, jn = ({
|
|
2593
2593
|
eitherOr: e,
|
|
2594
2594
|
imagePosition: n,
|
|
2595
2595
|
defaultImagePlaceholderUrl: l,
|
|
2596
2596
|
rulesDisplay: i
|
|
2597
2597
|
}) => {
|
|
2598
2598
|
var u;
|
|
2599
|
-
const { t: s } =
|
|
2599
|
+
const { t: s } = ee(), f = ((u = e.branding) == null ? void 0 : u.colors) || null, { brandingLogo: o } = lt(
|
|
2600
2600
|
e.branding || null
|
|
2601
2601
|
), m = (h) => {
|
|
2602
2602
|
var b;
|
|
2603
2603
|
return /* @__PURE__ */ t(
|
|
2604
|
-
|
|
2604
|
+
me,
|
|
2605
2605
|
{
|
|
2606
2606
|
brandingLogo: o,
|
|
2607
2607
|
textColor: h,
|
|
@@ -2618,8 +2618,8 @@ const wn = (e, n) => {
|
|
|
2618
2618
|
customAlertMessage: s("eitherOr.gameNotAvailableDescription"),
|
|
2619
2619
|
renderPresentedBy: m
|
|
2620
2620
|
};
|
|
2621
|
-
return /* @__PURE__ */ t(ke, { brandingBorderColor: (
|
|
2622
|
-
|
|
2621
|
+
return /* @__PURE__ */ t(ke, { brandingBorderColor: (f == null ? void 0 : f.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2622
|
+
zt,
|
|
2623
2623
|
{
|
|
2624
2624
|
...c,
|
|
2625
2625
|
imagePosition: n || "left",
|
|
@@ -2627,9 +2627,9 @@ const wn = (e, n) => {
|
|
|
2627
2627
|
rulesDisplay: i
|
|
2628
2628
|
}
|
|
2629
2629
|
) });
|
|
2630
|
-
},
|
|
2631
|
-
var
|
|
2632
|
-
const { t: n } =
|
|
2630
|
+
}, Gn = (e) => {
|
|
2631
|
+
var f, o, m, c, u, h, b;
|
|
2632
|
+
const { t: n } = ee(), l = ((f = e.eitherOr.branding) == null ? void 0 : f.colors) || null, i = Se() ? ((m = (o = e.eitherOr.branding) == null ? void 0 : o.images) == null ? void 0 : m.mobileLogo) || ((u = (c = e.eitherOr.branding) == null ? void 0 : c.images) == null ? void 0 : u.mainLogo) || "" : ((b = (h = e.eitherOr.branding) == null ? void 0 : h.images) == null ? void 0 : b.mainLogo) || "", s = {
|
|
2633
2633
|
...e.eitherOr,
|
|
2634
2634
|
branding: e.eitherOr.branding ? {
|
|
2635
2635
|
...e.eitherOr.branding,
|
|
@@ -2637,7 +2637,7 @@ const wn = (e, n) => {
|
|
|
2637
2637
|
} : null
|
|
2638
2638
|
};
|
|
2639
2639
|
return /* @__PURE__ */ t(ke, { brandingBorderColor: (l == null ? void 0 : l.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2640
|
-
|
|
2640
|
+
zt,
|
|
2641
2641
|
{
|
|
2642
2642
|
entity: s,
|
|
2643
2643
|
headline: n("eitherOr.headline"),
|
|
@@ -2650,7 +2650,7 @@ const wn = (e, n) => {
|
|
|
2650
2650
|
renderPresentedBy: (p) => {
|
|
2651
2651
|
var x;
|
|
2652
2652
|
return /* @__PURE__ */ t(
|
|
2653
|
-
|
|
2653
|
+
me,
|
|
2654
2654
|
{
|
|
2655
2655
|
brandingLogo: i,
|
|
2656
2656
|
textColor: p,
|
|
@@ -2661,13 +2661,13 @@ const wn = (e, n) => {
|
|
|
2661
2661
|
rulesDisplay: e.rulesDisplay
|
|
2662
2662
|
}
|
|
2663
2663
|
) });
|
|
2664
|
-
},
|
|
2664
|
+
}, _t = ({
|
|
2665
2665
|
sdk: e,
|
|
2666
2666
|
contentId: n,
|
|
2667
2667
|
contentName: l,
|
|
2668
2668
|
brandingColors: i,
|
|
2669
2669
|
brandingUrls: s,
|
|
2670
|
-
campaignId:
|
|
2670
|
+
campaignId: f,
|
|
2671
2671
|
campaignName: o,
|
|
2672
2672
|
startGame: m,
|
|
2673
2673
|
fields: c = ["fullName", "email"],
|
|
@@ -2681,12 +2681,12 @@ const wn = (e, n) => {
|
|
|
2681
2681
|
isAfterPosition: w = !1,
|
|
2682
2682
|
isSubmittingParticipation: I = !1
|
|
2683
2683
|
}) => {
|
|
2684
|
-
const { t: y } =
|
|
2684
|
+
const { t: y } = ee(), d = u ?? y("leads.header.title"), L = h ?? y("leads.header.description"), S = b ?? y("leads.buttons.submit"), P = p ?? y("leads.success.title"), B = x ?? y("leads.success.description"), v = {
|
|
2685
2685
|
defaultLabel: y(w ? "eitherOr.buttons.finish" : "eitherOr.buttons.start"),
|
|
2686
2686
|
onClick: m
|
|
2687
2687
|
};
|
|
2688
2688
|
return /* @__PURE__ */ t(
|
|
2689
|
-
|
|
2689
|
+
rn,
|
|
2690
2690
|
{
|
|
2691
2691
|
sdk: e,
|
|
2692
2692
|
content: {
|
|
@@ -2700,7 +2700,7 @@ const wn = (e, n) => {
|
|
|
2700
2700
|
urls: s
|
|
2701
2701
|
},
|
|
2702
2702
|
campaign: {
|
|
2703
|
-
id:
|
|
2703
|
+
id: f,
|
|
2704
2704
|
name: o
|
|
2705
2705
|
},
|
|
2706
2706
|
fields: c,
|
|
@@ -2709,17 +2709,17 @@ const wn = (e, n) => {
|
|
|
2709
2709
|
description: L,
|
|
2710
2710
|
submitButtonLabel: S,
|
|
2711
2711
|
successTitle: P,
|
|
2712
|
-
successDescription:
|
|
2712
|
+
successDescription: B
|
|
2713
2713
|
},
|
|
2714
2714
|
syncWithProfile: A,
|
|
2715
2715
|
consents: E,
|
|
2716
2716
|
isSubmittingParticipation: I
|
|
2717
2717
|
}
|
|
2718
2718
|
);
|
|
2719
|
-
},
|
|
2720
|
-
const { t: n } =
|
|
2719
|
+
}, Hn = (e) => {
|
|
2720
|
+
const { t: n } = ee();
|
|
2721
2721
|
return /* @__PURE__ */ t(
|
|
2722
|
-
|
|
2722
|
+
Bt,
|
|
2723
2723
|
{
|
|
2724
2724
|
entity: e.eitherOr,
|
|
2725
2725
|
headline: n("eitherOr.headline"),
|
|
@@ -2730,13 +2730,13 @@ const wn = (e, n) => {
|
|
|
2730
2730
|
onLeadSubmitted: e.onLeadSubmitted,
|
|
2731
2731
|
isSubmitting: e.isSubmitting,
|
|
2732
2732
|
MainCard: ke,
|
|
2733
|
-
PresentedBy:
|
|
2734
|
-
CollectLeadWrapper:
|
|
2733
|
+
PresentedBy: me,
|
|
2734
|
+
CollectLeadWrapper: _t,
|
|
2735
2735
|
consents: e.consents,
|
|
2736
2736
|
rulesDisplay: e.rulesDisplay
|
|
2737
2737
|
}
|
|
2738
2738
|
);
|
|
2739
|
-
},
|
|
2739
|
+
}, Nn = (e) => ({
|
|
2740
2740
|
// Pulse animation for buttons
|
|
2741
2741
|
pulseAnimation: {
|
|
2742
2742
|
"@keyframes pulse": {
|
|
@@ -2848,14 +2848,14 @@ const wn = (e, n) => {
|
|
|
2848
2848
|
flexDirection: e.isMobile ? "column-reverse" : "row",
|
|
2849
2849
|
gap: e.spacingScale.md
|
|
2850
2850
|
}
|
|
2851
|
-
}),
|
|
2852
|
-
var
|
|
2851
|
+
}), Vn = (e) => {
|
|
2852
|
+
var oe, xe, Oe, be, Fe, Ee, Ue, Xe, ft, ht, xt, bt, yt, pt, St, Ct, It, kt, Tt, Pt;
|
|
2853
2853
|
const {
|
|
2854
2854
|
eitherOr: n,
|
|
2855
2855
|
currentPair: l,
|
|
2856
2856
|
stepInfo: i,
|
|
2857
2857
|
gameState: s,
|
|
2858
|
-
timer:
|
|
2858
|
+
timer: f,
|
|
2859
2859
|
selected: o,
|
|
2860
2860
|
feedback: m,
|
|
2861
2861
|
sdk: c,
|
|
@@ -2868,87 +2868,87 @@ const wn = (e, n) => {
|
|
|
2868
2868
|
onGameStart: E,
|
|
2869
2869
|
onSelection: w,
|
|
2870
2870
|
onPlayAgain: I
|
|
2871
|
-
} = e, y = Ne(), d = Pe(), L = Se(), { t: S } =
|
|
2871
|
+
} = e, y = Ne(), d = Pe(), L = Se(), { t: S } = ee(), [P, B] = z(0), [v, D] = z(0), [O, V] = z(!1), [$, R] = z(0), [k, G] = z(0), [M, H] = z(!1), a = mt(0), { brandingImage: Y, brandingColors: T } = lt(
|
|
2872
2872
|
n.branding || null
|
|
2873
|
-
),
|
|
2874
|
-
{ images: n == null ? void 0 : n.images, imagePlaceholder:
|
|
2873
|
+
), N = u || (L ? dt : ut), J = it(
|
|
2874
|
+
{ images: n == null ? void 0 : n.images, imagePlaceholder: N },
|
|
2875
2875
|
ve.OVERLAY
|
|
2876
|
-
),
|
|
2876
|
+
), X = Y || J, Z = Dt(X), te = $t(
|
|
2877
2877
|
ve.OVERLAY
|
|
2878
|
-
),
|
|
2878
|
+
), ae = y.customRadius.dark.sm, ne = y.customRadius.dark.md, Q = (T == null ? void 0 : T.backgroundColor) || ((xe = (oe = y.colorSchemes) == null ? void 0 : oe.dark) == null ? void 0 : xe.surfaceVariant), de = (be = (Oe = y.customRadius) == null ? void 0 : Oe.light) == null ? void 0 : be.xl, _ = (T == null ? void 0 : T.primaryColor) || ((Xe = (Ue = (Ee = (Fe = y.colorSchemes) == null ? void 0 : Fe.light) == null ? void 0 : Ee.palette) == null ? void 0 : Ue.primary) == null ? void 0 : Xe.plainColor), fe = (bt = (xt = (ht = (ft = y.colorSchemes) == null ? void 0 : ft.light) == null ? void 0 : ht.palette) == null ? void 0 : xt.primary) == null ? void 0 : bt.onPrimary, U = y.customFontFamily.dark.primary, j = y.colorSchemes.dark.textColor, ue = y.colorSchemes.dark.surface, Ae = y.colorSchemes.dark.secondaryContainer, we = y.colorSchemes.dark.surfaceTintDim, Ce = ((yt = le(we || "")) == null ? void 0 : yt.replace(/[^\d,]/g, "")) ?? null, Ie = le(_ || ""), se = Nn({
|
|
2879
2879
|
spacingScale: d,
|
|
2880
|
-
smBorderRadius:
|
|
2881
|
-
contentBgColor:
|
|
2882
|
-
buttonRadius:
|
|
2883
|
-
primaryColor:
|
|
2880
|
+
smBorderRadius: ae,
|
|
2881
|
+
contentBgColor: Q,
|
|
2882
|
+
buttonRadius: de,
|
|
2883
|
+
primaryColor: _,
|
|
2884
2884
|
onPrimaryColor: fe,
|
|
2885
2885
|
fontFamilyPrimary: U,
|
|
2886
|
-
darkTextColor:
|
|
2886
|
+
darkTextColor: j,
|
|
2887
2887
|
isMobile: L
|
|
2888
2888
|
});
|
|
2889
2889
|
he(() => {
|
|
2890
2890
|
if (i != null && i.currentPoints && i.currentPoints > v) {
|
|
2891
|
-
|
|
2892
|
-
const
|
|
2893
|
-
return
|
|
2891
|
+
R(i.currentPoints - v), V(!0), G((ce) => ce + 1);
|
|
2892
|
+
const ie = setTimeout(() => V(!1), 1e3);
|
|
2893
|
+
return D(i.currentPoints), () => clearTimeout(ie);
|
|
2894
2894
|
}
|
|
2895
2895
|
}, [i == null ? void 0 : i.currentPoints, v]);
|
|
2896
2896
|
const De = (n == null ? void 0 : n.points) ?? [], Re = De.length >= 2 ? De[1].correctSteps - De[0].correctSteps : ((pt = De[0]) == null ? void 0 : pt.correctSteps) || 5;
|
|
2897
2897
|
he(() => {
|
|
2898
|
-
const
|
|
2899
|
-
if (a.current =
|
|
2900
|
-
|
|
2901
|
-
const ge = setTimeout(() =>
|
|
2898
|
+
const ie = a.current, ce = (i == null ? void 0 : i.currentStreak) ?? 0;
|
|
2899
|
+
if (a.current = ce, ce > ie && ce > 0 && ce % Re === 0) {
|
|
2900
|
+
H(!0);
|
|
2901
|
+
const ge = setTimeout(() => H(!1), 500);
|
|
2902
2902
|
return () => clearTimeout(ge);
|
|
2903
2903
|
}
|
|
2904
2904
|
}, [i == null ? void 0 : i.currentStreak, Re]);
|
|
2905
2905
|
const Le = L ? ((Ct = (St = n.branding) == null ? void 0 : St.images) == null ? void 0 : Ct.mobileLogo) || ((kt = (It = n.branding) == null ? void 0 : It.images) == null ? void 0 : kt.mainLogo) || "" : ((Pt = (Tt = n.branding) == null ? void 0 : Tt.images) == null ? void 0 : Pt.mainLogo) || "", Ve = S("common.labels.point", { count: v }), Ye = () => {
|
|
2906
|
-
const
|
|
2907
|
-
for (let ge = 0; ge <
|
|
2908
|
-
|
|
2906
|
+
const ie = [], ce = (i == null ? void 0 : i.currentLives) ?? 3;
|
|
2907
|
+
for (let ge = 0; ge < ce; ge++)
|
|
2908
|
+
ie.push(
|
|
2909
2909
|
/* @__PURE__ */ t(
|
|
2910
2910
|
at,
|
|
2911
2911
|
{
|
|
2912
|
-
sx: { height: 20, color:
|
|
2912
|
+
sx: { height: 20, color: _ }
|
|
2913
2913
|
},
|
|
2914
2914
|
`life-${ge}`
|
|
2915
2915
|
)
|
|
2916
2916
|
);
|
|
2917
|
-
for (let ge =
|
|
2918
|
-
|
|
2917
|
+
for (let ge = ce; ge < 3; ge++)
|
|
2918
|
+
ie.push(
|
|
2919
2919
|
/* @__PURE__ */ t(
|
|
2920
|
-
|
|
2920
|
+
Gt,
|
|
2921
2921
|
{
|
|
2922
2922
|
sx: {
|
|
2923
2923
|
height: 20,
|
|
2924
|
-
color: Ie ? `rgba(${Ie.replace(/[^\d,]/g, "")}, 0.35)` : `${
|
|
2924
|
+
color: Ie ? `rgba(${Ie.replace(/[^\d,]/g, "")}, 0.35)` : `${_}59`
|
|
2925
2925
|
}
|
|
2926
2926
|
},
|
|
2927
2927
|
`empty-${ge}`
|
|
2928
2928
|
)
|
|
2929
2929
|
);
|
|
2930
|
-
return
|
|
2930
|
+
return ie;
|
|
2931
2931
|
}, _e = () => {
|
|
2932
|
-
const
|
|
2933
|
-
return /* @__PURE__ */
|
|
2932
|
+
const ie = (i == null ? void 0 : i.currentStreak) ?? 0, ce = M ? Re : ie % Re, We = Math.floor(ie / Re) + 1;
|
|
2933
|
+
return /* @__PURE__ */ g(r, { sx: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
2934
2934
|
Array.from({ length: Re }, (vt, ze) => /* @__PURE__ */ t(
|
|
2935
2935
|
r,
|
|
2936
2936
|
{
|
|
2937
2937
|
sx: {
|
|
2938
2938
|
flex: 1,
|
|
2939
2939
|
height: 4,
|
|
2940
|
-
bgcolor: ze <
|
|
2940
|
+
bgcolor: ze < ce ? _ : j,
|
|
2941
2941
|
borderRadius: "2px",
|
|
2942
2942
|
transition: "background-color 0.3s ease"
|
|
2943
2943
|
}
|
|
2944
2944
|
},
|
|
2945
2945
|
`streak-${ze}`
|
|
2946
2946
|
)),
|
|
2947
|
-
We > 1 && /* @__PURE__ */
|
|
2947
|
+
We > 1 && /* @__PURE__ */ g(
|
|
2948
2948
|
C,
|
|
2949
2949
|
{
|
|
2950
2950
|
sx: {
|
|
2951
|
-
color:
|
|
2951
|
+
color: _,
|
|
2952
2952
|
fontWeight: 700,
|
|
2953
2953
|
fontSize: "0.75em",
|
|
2954
2954
|
lineHeight: 1,
|
|
@@ -2962,39 +2962,39 @@ const wn = (e, n) => {
|
|
|
2962
2962
|
}
|
|
2963
2963
|
)
|
|
2964
2964
|
] });
|
|
2965
|
-
}, qe = () => /* @__PURE__ */ t(r, { sx:
|
|
2965
|
+
}, qe = () => /* @__PURE__ */ t(r, { sx: se.dividerContainer, children: /* @__PURE__ */ t(
|
|
2966
2966
|
r,
|
|
2967
2967
|
{
|
|
2968
2968
|
sx: {
|
|
2969
2969
|
borderRadius: "50%",
|
|
2970
|
-
bgcolor:
|
|
2970
|
+
bgcolor: ue,
|
|
2971
2971
|
boxShadow: "sm",
|
|
2972
2972
|
width: "32px",
|
|
2973
2973
|
height: "32px",
|
|
2974
2974
|
minWidth: "32px",
|
|
2975
2975
|
border: "1px solid",
|
|
2976
|
-
borderColor:
|
|
2976
|
+
borderColor: _,
|
|
2977
2977
|
display: "flex",
|
|
2978
2978
|
alignItems: "center",
|
|
2979
2979
|
justifyContent: "center"
|
|
2980
2980
|
},
|
|
2981
|
-
children: /* @__PURE__ */ t(
|
|
2981
|
+
children: /* @__PURE__ */ t(jt, { sx: { fontSize: "1.1em", color: _ } })
|
|
2982
2982
|
}
|
|
2983
2983
|
) }), Ke = () => {
|
|
2984
|
-
var
|
|
2985
|
-
return l ? /* @__PURE__ */
|
|
2986
|
-
/* @__PURE__ */ t(r, { sx:
|
|
2987
|
-
|
|
2984
|
+
var ie;
|
|
2985
|
+
return l ? /* @__PURE__ */ g(r, { sx: se.mainContentSection, children: [
|
|
2986
|
+
/* @__PURE__ */ t(r, { sx: se.timerContainer, children: /* @__PURE__ */ t(
|
|
2987
|
+
Vt,
|
|
2988
2988
|
{
|
|
2989
|
-
time:
|
|
2989
|
+
time: f,
|
|
2990
2990
|
maxTime: (n == null ? void 0 : n.time) ?? 10,
|
|
2991
2991
|
brandingPrimaryColor: (T == null ? void 0 : T.primaryColor) || null
|
|
2992
2992
|
},
|
|
2993
2993
|
`timer-${l.pairId}`
|
|
2994
2994
|
) }),
|
|
2995
|
-
/* @__PURE__ */
|
|
2996
|
-
/* @__PURE__ */
|
|
2997
|
-
/* @__PURE__ */ t(r, { sx:
|
|
2995
|
+
/* @__PURE__ */ g(r, { sx: se.contentContainerWithBackdrop, children: [
|
|
2996
|
+
/* @__PURE__ */ g(r, { sx: se.optionsContainer, children: [
|
|
2997
|
+
/* @__PURE__ */ t(r, { sx: se.optionWrapper, children: /* @__PURE__ */ t(
|
|
2998
2998
|
nt,
|
|
2999
2999
|
{
|
|
3000
3000
|
option: l.optionOne,
|
|
@@ -3007,7 +3007,7 @@ const wn = (e, n) => {
|
|
|
3007
3007
|
}
|
|
3008
3008
|
) }),
|
|
3009
3009
|
qe(),
|
|
3010
|
-
/* @__PURE__ */ t(r, { sx:
|
|
3010
|
+
/* @__PURE__ */ t(r, { sx: se.optionWrapper, children: /* @__PURE__ */ t(
|
|
3011
3011
|
nt,
|
|
3012
3012
|
{
|
|
3013
3013
|
option: l.optionTwo,
|
|
@@ -3020,9 +3020,9 @@ const wn = (e, n) => {
|
|
|
3020
3020
|
}
|
|
3021
3021
|
) })
|
|
3022
3022
|
] }),
|
|
3023
|
-
/* @__PURE__ */
|
|
3023
|
+
/* @__PURE__ */ g(r, { children: [
|
|
3024
3024
|
/* @__PURE__ */ t(r, { sx: { mb: d.xs }, children: _e() }),
|
|
3025
|
-
/* @__PURE__ */
|
|
3025
|
+
/* @__PURE__ */ g(
|
|
3026
3026
|
je,
|
|
3027
3027
|
{
|
|
3028
3028
|
direction: "row",
|
|
@@ -3030,28 +3030,28 @@ const wn = (e, n) => {
|
|
|
3030
3030
|
alignItems: "center",
|
|
3031
3031
|
children: [
|
|
3032
3032
|
/* @__PURE__ */ t(r, { children: Ye() }),
|
|
3033
|
-
/* @__PURE__ */
|
|
3034
|
-
/* @__PURE__ */
|
|
3033
|
+
/* @__PURE__ */ g(je, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
3034
|
+
/* @__PURE__ */ g(C, { sx: { color: j }, children: [
|
|
3035
3035
|
Ve,
|
|
3036
3036
|
":"
|
|
3037
3037
|
] }),
|
|
3038
|
-
/* @__PURE__ */
|
|
3038
|
+
/* @__PURE__ */ g(
|
|
3039
3039
|
C,
|
|
3040
3040
|
{
|
|
3041
3041
|
level: "h4",
|
|
3042
|
-
sx: { position: "relative", color:
|
|
3042
|
+
sx: { position: "relative", color: j },
|
|
3043
3043
|
children: [
|
|
3044
3044
|
v,
|
|
3045
|
-
O && /* @__PURE__ */
|
|
3045
|
+
O && /* @__PURE__ */ g(
|
|
3046
3046
|
C,
|
|
3047
3047
|
{
|
|
3048
|
-
sx:
|
|
3048
|
+
sx: Nt.pointsAdded,
|
|
3049
3049
|
children: [
|
|
3050
3050
|
"+",
|
|
3051
|
-
|
|
3051
|
+
$
|
|
3052
3052
|
]
|
|
3053
3053
|
},
|
|
3054
|
-
|
|
3054
|
+
k
|
|
3055
3055
|
)
|
|
3056
3056
|
]
|
|
3057
3057
|
}
|
|
@@ -3062,12 +3062,12 @@ const wn = (e, n) => {
|
|
|
3062
3062
|
)
|
|
3063
3063
|
] })
|
|
3064
3064
|
] }),
|
|
3065
|
-
Le && /* @__PURE__ */ t(r, { sx:
|
|
3066
|
-
|
|
3065
|
+
Le && /* @__PURE__ */ t(r, { sx: se.bottomFooterContainer, children: /* @__PURE__ */ t(
|
|
3066
|
+
me,
|
|
3067
3067
|
{
|
|
3068
3068
|
brandingLogo: Le,
|
|
3069
|
-
textColor:
|
|
3070
|
-
label: ((
|
|
3069
|
+
textColor: j,
|
|
3070
|
+
label: ((ie = n == null ? void 0 : n.labels) == null ? void 0 : ie.sponsor) || null,
|
|
3071
3071
|
isCentered: L
|
|
3072
3072
|
}
|
|
3073
3073
|
) })
|
|
@@ -3087,30 +3087,30 @@ const wn = (e, n) => {
|
|
|
3087
3087
|
"&:not(.Mui-selected):hover": {
|
|
3088
3088
|
bgcolor: Ce ? `rgba(${Ce},0.06)` : `${we}0F`
|
|
3089
3089
|
},
|
|
3090
|
-
[`&.${
|
|
3090
|
+
[`&.${Ut.selected}`]: {
|
|
3091
3091
|
bgcolor: Ce ? `rgba(${Ce},0.06)` : `${we}0F`,
|
|
3092
|
-
borderBottom: "3px solid " +
|
|
3092
|
+
borderBottom: "3px solid " + _,
|
|
3093
3093
|
opacity: "100%",
|
|
3094
3094
|
mb: "-1px"
|
|
3095
3095
|
}
|
|
3096
|
-
},
|
|
3096
|
+
}, W = {
|
|
3097
3097
|
flex: 1,
|
|
3098
3098
|
display: "flex",
|
|
3099
3099
|
flexDirection: "column",
|
|
3100
3100
|
overflow: "auto"
|
|
3101
|
-
}, F = () => b ? /* @__PURE__ */ t(r, { sx: { width: "100%" }, children: /* @__PURE__ */
|
|
3102
|
-
|
|
3101
|
+
}, F = () => b ? /* @__PURE__ */ t(r, { sx: { width: "100%" }, children: /* @__PURE__ */ g(
|
|
3102
|
+
Wt,
|
|
3103
3103
|
{
|
|
3104
3104
|
value: P,
|
|
3105
|
-
onChange: (
|
|
3105
|
+
onChange: (ie, ce) => B(ce),
|
|
3106
3106
|
sx: {
|
|
3107
|
-
borderRadius:
|
|
3107
|
+
borderRadius: ne,
|
|
3108
3108
|
width: "100%",
|
|
3109
3109
|
backgroundColor: "transparent"
|
|
3110
3110
|
},
|
|
3111
3111
|
children: [
|
|
3112
|
-
/* @__PURE__ */
|
|
3113
|
-
|
|
3112
|
+
/* @__PURE__ */ g(
|
|
3113
|
+
Mt,
|
|
3114
3114
|
{
|
|
3115
3115
|
sx: {
|
|
3116
3116
|
fontSize: "1em",
|
|
@@ -3118,7 +3118,7 @@ const wn = (e, n) => {
|
|
|
3118
3118
|
flexDirection: L ? "column" : "row"
|
|
3119
3119
|
},
|
|
3120
3120
|
children: [
|
|
3121
|
-
/* @__PURE__ */ t(et, { sx: $e, disableIndicator: !0, children: /* @__PURE__ */
|
|
3121
|
+
/* @__PURE__ */ t(et, { sx: $e, disableIndicator: !0, children: /* @__PURE__ */ g(
|
|
3122
3122
|
r,
|
|
3123
3123
|
{
|
|
3124
3124
|
sx: {
|
|
@@ -3138,7 +3138,7 @@ const wn = (e, n) => {
|
|
|
3138
3138
|
lineHeight: "24px",
|
|
3139
3139
|
letterSpacing: "0.4px",
|
|
3140
3140
|
textTransform: "uppercase",
|
|
3141
|
-
color:
|
|
3141
|
+
color: j
|
|
3142
3142
|
},
|
|
3143
3143
|
children: S("eitherOr.tabs.score", "Score")
|
|
3144
3144
|
}
|
|
@@ -3146,7 +3146,7 @@ const wn = (e, n) => {
|
|
|
3146
3146
|
]
|
|
3147
3147
|
}
|
|
3148
3148
|
) }),
|
|
3149
|
-
/* @__PURE__ */ t(et, { sx: $e, disableIndicator: !0, children: /* @__PURE__ */
|
|
3149
|
+
/* @__PURE__ */ t(et, { sx: $e, disableIndicator: !0, children: /* @__PURE__ */ g(
|
|
3150
3150
|
r,
|
|
3151
3151
|
{
|
|
3152
3152
|
sx: {
|
|
@@ -3155,7 +3155,7 @@ const wn = (e, n) => {
|
|
|
3155
3155
|
gap: d.xs
|
|
3156
3156
|
},
|
|
3157
3157
|
children: [
|
|
3158
|
-
/* @__PURE__ */ t(
|
|
3158
|
+
/* @__PURE__ */ t(Ht, { sx: { fontSize: "1.25em" } }),
|
|
3159
3159
|
/* @__PURE__ */ t(
|
|
3160
3160
|
C,
|
|
3161
3161
|
{
|
|
@@ -3166,7 +3166,7 @@ const wn = (e, n) => {
|
|
|
3166
3166
|
lineHeight: "24px",
|
|
3167
3167
|
letterSpacing: "0.4px",
|
|
3168
3168
|
textTransform: "uppercase",
|
|
3169
|
-
color:
|
|
3169
|
+
color: j
|
|
3170
3170
|
},
|
|
3171
3171
|
children: S("eitherOr.tabs.standings", "Standings")
|
|
3172
3172
|
}
|
|
@@ -3182,7 +3182,7 @@ const wn = (e, n) => {
|
|
|
3182
3182
|
{
|
|
3183
3183
|
value: 0,
|
|
3184
3184
|
sx: { p: 0, fontSize: "1em", display: "flex" },
|
|
3185
|
-
children: /* @__PURE__ */ t(r, { sx:
|
|
3185
|
+
children: /* @__PURE__ */ t(r, { sx: W, children: /* @__PURE__ */ t(
|
|
3186
3186
|
st,
|
|
3187
3187
|
{
|
|
3188
3188
|
stepInfo: i,
|
|
@@ -3200,8 +3200,8 @@ const wn = (e, n) => {
|
|
|
3200
3200
|
{
|
|
3201
3201
|
value: 1,
|
|
3202
3202
|
sx: { p: 0, fontSize: "1em", display: "flex" },
|
|
3203
|
-
children: /* @__PURE__ */ t(r, { sx:
|
|
3204
|
-
|
|
3203
|
+
children: /* @__PURE__ */ t(r, { sx: W, children: /* @__PURE__ */ t(
|
|
3204
|
+
Yt,
|
|
3205
3205
|
{
|
|
3206
3206
|
game: n,
|
|
3207
3207
|
sdk: c,
|
|
@@ -3223,15 +3223,15 @@ const wn = (e, n) => {
|
|
|
3223
3223
|
brandingPrimaryColor: (T == null ? void 0 : T.primaryColor) || null,
|
|
3224
3224
|
additionalCTA: p
|
|
3225
3225
|
}
|
|
3226
|
-
),
|
|
3227
|
-
var
|
|
3226
|
+
), re = () => {
|
|
3227
|
+
var ie, ce, ge;
|
|
3228
3228
|
switch (s) {
|
|
3229
|
-
case
|
|
3229
|
+
case q.LOADING:
|
|
3230
3230
|
return /* @__PURE__ */ t(ot, { my: 20 });
|
|
3231
|
-
case
|
|
3231
|
+
case q.TUTORIAL: {
|
|
3232
3232
|
const We = [
|
|
3233
3233
|
{
|
|
3234
|
-
icon: /* @__PURE__ */ t(
|
|
3234
|
+
icon: /* @__PURE__ */ t(wn, { sx: { fontSize: "1.1em" } }),
|
|
3235
3235
|
title: S("eitherOr.tutorial.step1Title"),
|
|
3236
3236
|
description: S("eitherOr.tutorial.step1Description", {
|
|
3237
3237
|
seconds: (n == null ? void 0 : n.time) ?? 10
|
|
@@ -3253,8 +3253,8 @@ const wn = (e, n) => {
|
|
|
3253
3253
|
title: S("eitherOr.tutorial.step3Title"),
|
|
3254
3254
|
description: S("eitherOr.tutorial.step3Description")
|
|
3255
3255
|
}
|
|
3256
|
-
], vt = Ie ? `rgba(${Ie.replace(/[^\d,]/g, "")}, 0.12)` : `${
|
|
3257
|
-
return /* @__PURE__ */
|
|
3256
|
+
], vt = Ie ? `rgba(${Ie.replace(/[^\d,]/g, "")}, 0.12)` : `${_}20`;
|
|
3257
|
+
return /* @__PURE__ */ g(
|
|
3258
3258
|
r,
|
|
3259
3259
|
{
|
|
3260
3260
|
sx: {
|
|
@@ -3267,7 +3267,7 @@ const wn = (e, n) => {
|
|
|
3267
3267
|
r,
|
|
3268
3268
|
{
|
|
3269
3269
|
sx: {
|
|
3270
|
-
borderRadius:
|
|
3270
|
+
borderRadius: ae,
|
|
3271
3271
|
overflow: "hidden",
|
|
3272
3272
|
display: "flex",
|
|
3273
3273
|
flexDirection: "column",
|
|
@@ -3280,7 +3280,7 @@ const wn = (e, n) => {
|
|
|
3280
3280
|
left: 0,
|
|
3281
3281
|
right: 0,
|
|
3282
3282
|
bottom: 0,
|
|
3283
|
-
backgroundColor:
|
|
3283
|
+
backgroundColor: Q,
|
|
3284
3284
|
opacity: 0.5,
|
|
3285
3285
|
borderRadius: "inherit",
|
|
3286
3286
|
zIndex: 0
|
|
@@ -3288,9 +3288,9 @@ const wn = (e, n) => {
|
|
|
3288
3288
|
"& > *": { position: "relative", zIndex: 1 }
|
|
3289
3289
|
},
|
|
3290
3290
|
children: We.map((ze, At) => {
|
|
3291
|
-
const
|
|
3292
|
-
return /* @__PURE__ */
|
|
3293
|
-
/* @__PURE__ */
|
|
3291
|
+
const qt = At === We.length - 1;
|
|
3292
|
+
return /* @__PURE__ */ g(r, { children: [
|
|
3293
|
+
/* @__PURE__ */ g(
|
|
3294
3294
|
r,
|
|
3295
3295
|
{
|
|
3296
3296
|
sx: {
|
|
@@ -3309,7 +3309,7 @@ const wn = (e, n) => {
|
|
|
3309
3309
|
height: 36,
|
|
3310
3310
|
borderRadius: "50%",
|
|
3311
3311
|
bgcolor: vt,
|
|
3312
|
-
color:
|
|
3312
|
+
color: _,
|
|
3313
3313
|
display: "flex",
|
|
3314
3314
|
alignItems: "center",
|
|
3315
3315
|
justifyContent: "center",
|
|
@@ -3318,7 +3318,7 @@ const wn = (e, n) => {
|
|
|
3318
3318
|
children: ze.icon
|
|
3319
3319
|
}
|
|
3320
3320
|
),
|
|
3321
|
-
/* @__PURE__ */
|
|
3321
|
+
/* @__PURE__ */ g(r, { sx: { flex: 1, minWidth: 0, pt: "2px" }, children: [
|
|
3322
3322
|
/* @__PURE__ */ t(
|
|
3323
3323
|
C,
|
|
3324
3324
|
{
|
|
@@ -3327,7 +3327,7 @@ const wn = (e, n) => {
|
|
|
3327
3327
|
fontWeight: 700,
|
|
3328
3328
|
fontSize: "0.875em",
|
|
3329
3329
|
lineHeight: 1.3,
|
|
3330
|
-
color:
|
|
3330
|
+
color: j
|
|
3331
3331
|
},
|
|
3332
3332
|
children: ze.title
|
|
3333
3333
|
}
|
|
@@ -3340,7 +3340,7 @@ const wn = (e, n) => {
|
|
|
3340
3340
|
fontWeight: 400,
|
|
3341
3341
|
fontSize: "0.75em",
|
|
3342
3342
|
lineHeight: 1.6,
|
|
3343
|
-
color:
|
|
3343
|
+
color: j,
|
|
3344
3344
|
opacity: 0.65,
|
|
3345
3345
|
mt: d["2xs"]
|
|
3346
3346
|
},
|
|
@@ -3351,13 +3351,13 @@ const wn = (e, n) => {
|
|
|
3351
3351
|
]
|
|
3352
3352
|
}
|
|
3353
3353
|
),
|
|
3354
|
-
!
|
|
3354
|
+
!qt && /* @__PURE__ */ t(
|
|
3355
3355
|
r,
|
|
3356
3356
|
{
|
|
3357
3357
|
sx: {
|
|
3358
3358
|
height: "1px",
|
|
3359
3359
|
mx: d.md,
|
|
3360
|
-
bgcolor: Ie ? `rgba(${Ie.replace(/[^\d,]/g, "")}, 0.1)` : `${
|
|
3360
|
+
bgcolor: Ie ? `rgba(${Ie.replace(/[^\d,]/g, "")}, 0.1)` : `${_}1A`
|
|
3361
3361
|
}
|
|
3362
3362
|
}
|
|
3363
3363
|
)
|
|
@@ -3365,29 +3365,29 @@ const wn = (e, n) => {
|
|
|
3365
3365
|
})
|
|
3366
3366
|
}
|
|
3367
3367
|
),
|
|
3368
|
-
x != null && x.items.length ? /* @__PURE__ */ t(r, { sx:
|
|
3368
|
+
x != null && x.items.length ? /* @__PURE__ */ t(r, { sx: se.contentContainerWithBackdrop, children: /* @__PURE__ */ t(
|
|
3369
3369
|
rt,
|
|
3370
3370
|
{
|
|
3371
3371
|
consents: x,
|
|
3372
|
-
primaryColor:
|
|
3373
|
-
textColor:
|
|
3374
|
-
brandingUrls: (
|
|
3372
|
+
primaryColor: _,
|
|
3373
|
+
textColor: j,
|
|
3374
|
+
brandingUrls: (ie = n == null ? void 0 : n.branding) == null ? void 0 : ie.urls
|
|
3375
3375
|
}
|
|
3376
3376
|
) }) : null,
|
|
3377
|
-
/* @__PURE__ */
|
|
3377
|
+
/* @__PURE__ */ g(
|
|
3378
3378
|
r,
|
|
3379
3379
|
{
|
|
3380
3380
|
sx: {
|
|
3381
|
-
...
|
|
3381
|
+
...se.filterScreenContainer,
|
|
3382
3382
|
justifyContent: Le ? "space-between" : "flex-end"
|
|
3383
3383
|
},
|
|
3384
3384
|
children: [
|
|
3385
3385
|
/* @__PURE__ */ t(
|
|
3386
|
-
|
|
3386
|
+
me,
|
|
3387
3387
|
{
|
|
3388
3388
|
brandingLogo: Le,
|
|
3389
|
-
textColor:
|
|
3390
|
-
label: ((
|
|
3389
|
+
textColor: j,
|
|
3390
|
+
label: ((ce = n == null ? void 0 : n.labels) == null ? void 0 : ce.sponsor) || null,
|
|
3391
3391
|
isCentered: L
|
|
3392
3392
|
}
|
|
3393
3393
|
),
|
|
@@ -3397,10 +3397,10 @@ const wn = (e, n) => {
|
|
|
3397
3397
|
variant: "soft",
|
|
3398
3398
|
loading: A,
|
|
3399
3399
|
sx: {
|
|
3400
|
-
...
|
|
3401
|
-
...
|
|
3402
|
-
...A ?
|
|
3403
|
-
|
|
3400
|
+
...se.startButton,
|
|
3401
|
+
...se.pulseAnimation,
|
|
3402
|
+
...A ? Ot(
|
|
3403
|
+
_,
|
|
3404
3404
|
fe
|
|
3405
3405
|
) : {}
|
|
3406
3406
|
},
|
|
@@ -3410,7 +3410,7 @@ const wn = (e, n) => {
|
|
|
3410
3410
|
C,
|
|
3411
3411
|
{
|
|
3412
3412
|
sx: {
|
|
3413
|
-
...
|
|
3413
|
+
...se.startButtonText,
|
|
3414
3414
|
...A ? { color: "transparent" } : {}
|
|
3415
3415
|
},
|
|
3416
3416
|
children: ((ge = x == null ? void 0 : x.labels) == null ? void 0 : ge.ctaLabel) || S("eitherOr.buttons.start")
|
|
@@ -3425,32 +3425,32 @@ const wn = (e, n) => {
|
|
|
3425
3425
|
}
|
|
3426
3426
|
);
|
|
3427
3427
|
}
|
|
3428
|
-
case
|
|
3428
|
+
case q.PLAYING:
|
|
3429
3429
|
return Ke();
|
|
3430
3430
|
default:
|
|
3431
3431
|
return null;
|
|
3432
3432
|
}
|
|
3433
3433
|
};
|
|
3434
|
-
return s ===
|
|
3435
|
-
|
|
3434
|
+
return s === q.RESULTS ? /* @__PURE__ */ t(
|
|
3435
|
+
on,
|
|
3436
3436
|
{
|
|
3437
3437
|
entity: n,
|
|
3438
|
-
backgroundImage:
|
|
3439
|
-
imageBackgroundGradient:
|
|
3438
|
+
backgroundImage: Z,
|
|
3439
|
+
imageBackgroundGradient: te,
|
|
3440
3440
|
isWrappedWithScoreStateWrapper: !0,
|
|
3441
3441
|
children: F()
|
|
3442
3442
|
}
|
|
3443
3443
|
) : /* @__PURE__ */ t(
|
|
3444
|
-
|
|
3444
|
+
ln,
|
|
3445
3445
|
{
|
|
3446
3446
|
entity: n,
|
|
3447
3447
|
headline: S("eitherOr.headline"),
|
|
3448
|
-
finalImage:
|
|
3448
|
+
finalImage: X,
|
|
3449
3449
|
rulesDisplay: h,
|
|
3450
|
-
children:
|
|
3450
|
+
children: re()
|
|
3451
3451
|
}
|
|
3452
3452
|
);
|
|
3453
|
-
},
|
|
3453
|
+
}, Yn = (e) => ({
|
|
3454
3454
|
// Pulse animation for buttons
|
|
3455
3455
|
pulseAnimation: {
|
|
3456
3456
|
"@keyframes pulse": {
|
|
@@ -3488,21 +3488,21 @@ const wn = (e, n) => {
|
|
|
3488
3488
|
display: "flex",
|
|
3489
3489
|
alignItems: "center"
|
|
3490
3490
|
}
|
|
3491
|
-
}),
|
|
3492
|
-
var y, d, L, S, P,
|
|
3493
|
-
const n = Ne(), { t: l } =
|
|
3491
|
+
}), _n = (e) => {
|
|
3492
|
+
var y, d, L, S, P, B, v, D, O, V, $;
|
|
3493
|
+
const n = Ne(), { t: l } = ee(), i = Se(), s = $t(
|
|
3494
3494
|
ve.OVERLAY
|
|
3495
|
-
),
|
|
3496
|
-
{ images: e.eitherOr.images, imagePlaceholder:
|
|
3495
|
+
), f = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : i ? dt : ut, o = it(
|
|
3496
|
+
{ images: e.eitherOr.images, imagePlaceholder: f },
|
|
3497
3497
|
ve.OVERLAY
|
|
3498
|
-
), { brandingImage: m, brandingColors: c, brandingLogo: u } = lt(e.eitherOr.branding || null), b =
|
|
3498
|
+
), { brandingImage: m, brandingColors: c, brandingLogo: u } = lt(e.eitherOr.branding || null), b = Dt(m || o), p = (d = (y = n.customRadius) == null ? void 0 : y.light) == null ? void 0 : d.xl, x = (c == null ? void 0 : c.primaryColor) || ((B = (P = (S = (L = n.colorSchemes) == null ? void 0 : L.light) == null ? void 0 : S.palette) == null ? void 0 : P.primary) == null ? void 0 : B.plainColor), A = (V = (O = (D = (v = n.colorSchemes) == null ? void 0 : v.light) == null ? void 0 : D.palette) == null ? void 0 : O.primary) == null ? void 0 : V.onPrimary, E = n.customFontFamily.dark.primary, w = Yn({
|
|
3499
3499
|
buttonRadius: p,
|
|
3500
3500
|
primaryColor: x,
|
|
3501
3501
|
onPrimaryColor: A,
|
|
3502
3502
|
fontFamilyPrimary: E
|
|
3503
3503
|
}), I = () => {
|
|
3504
|
-
var
|
|
3505
|
-
return e.signInCTA ? (
|
|
3504
|
+
var R, k, G, M;
|
|
3505
|
+
return e.signInCTA ? (R = e.signInCTA) != null && R.component ? e.signInCTA.component : (k = e.signInCTA) != null && k.onClick ? /* @__PURE__ */ t(
|
|
3506
3506
|
ye,
|
|
3507
3507
|
{
|
|
3508
3508
|
variant: "soft",
|
|
@@ -3510,12 +3510,12 @@ const wn = (e, n) => {
|
|
|
3510
3510
|
onClick: e.signInCTA.onClick,
|
|
3511
3511
|
children: /* @__PURE__ */ t(C, { sx: w.signInButtonText, children: e.signInCTA.defaultLabel || l("common.signIn") })
|
|
3512
3512
|
}
|
|
3513
|
-
) : (
|
|
3513
|
+
) : (G = e.signInCTA) != null && G.url ? typeof window > "u" ? /* @__PURE__ */ t(
|
|
3514
3514
|
r,
|
|
3515
3515
|
{
|
|
3516
3516
|
component: "a",
|
|
3517
3517
|
href: e.signInCTA.url,
|
|
3518
|
-
target: ((
|
|
3518
|
+
target: ((M = e.signInCTA) == null ? void 0 : M.target) || "_self",
|
|
3519
3519
|
sx: {
|
|
3520
3520
|
...w.signInButton,
|
|
3521
3521
|
...w.pulseAnimation,
|
|
@@ -3532,15 +3532,15 @@ const wn = (e, n) => {
|
|
|
3532
3532
|
variant: "soft",
|
|
3533
3533
|
sx: { ...w.signInButton, ...w.pulseAnimation },
|
|
3534
3534
|
onClick: () => {
|
|
3535
|
-
var
|
|
3536
|
-
((
|
|
3535
|
+
var H, a, Y;
|
|
3536
|
+
((H = e.signInCTA) == null ? void 0 : H.target) === "_blank" ? window.open((a = e.signInCTA) == null ? void 0 : a.url, "_blank") : window.location.href = (Y = e.signInCTA) == null ? void 0 : Y.url;
|
|
3537
3537
|
},
|
|
3538
3538
|
children: /* @__PURE__ */ t(C, { sx: w.signInButtonText, children: e.signInCTA.defaultLabel || l("common.signIn") })
|
|
3539
3539
|
}
|
|
3540
3540
|
) : /* @__PURE__ */ t(ye, { variant: "soft", sx: w.signInButton, disabled: !0, children: /* @__PURE__ */ t(C, { sx: w.signInButtonText, children: e.signInCTA.defaultLabel || l("common.signIn") }) }) : /* @__PURE__ */ t(ye, { variant: "soft", sx: w.signInButton, disabled: !0, children: /* @__PURE__ */ t(C, { sx: w.signInButtonText, children: l("common.signIn") }) });
|
|
3541
3541
|
};
|
|
3542
3542
|
return /* @__PURE__ */ t(
|
|
3543
|
-
|
|
3543
|
+
an,
|
|
3544
3544
|
{
|
|
3545
3545
|
entity: e.eitherOr,
|
|
3546
3546
|
headline: l("eitherOr.headline"),
|
|
@@ -3548,22 +3548,22 @@ const wn = (e, n) => {
|
|
|
3548
3548
|
imageBackgroundGradient: s,
|
|
3549
3549
|
signInContent: I(),
|
|
3550
3550
|
brandingContent: /* @__PURE__ */ t(
|
|
3551
|
-
|
|
3551
|
+
me,
|
|
3552
3552
|
{
|
|
3553
3553
|
brandingLogo: u,
|
|
3554
3554
|
textColor: n.colorSchemes.dark.textColor,
|
|
3555
|
-
label: ((
|
|
3555
|
+
label: (($ = e.eitherOr.labels) == null ? void 0 : $.sponsor) || null
|
|
3556
3556
|
}
|
|
3557
3557
|
),
|
|
3558
3558
|
rulesDisplay: e.rulesDisplay
|
|
3559
3559
|
}
|
|
3560
3560
|
);
|
|
3561
|
-
},
|
|
3562
|
-
const { t: n } =
|
|
3561
|
+
}, qn = (e) => {
|
|
3562
|
+
const { t: n } = ee(), l = Se(), i = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : l ? dt : ut, { brandingLogo: s } = lt(
|
|
3563
3563
|
e.eitherOr.branding || null
|
|
3564
3564
|
);
|
|
3565
3565
|
return /* @__PURE__ */ t(
|
|
3566
|
-
|
|
3566
|
+
sn,
|
|
3567
3567
|
{
|
|
3568
3568
|
entity: e.eitherOr,
|
|
3569
3569
|
headline: n("eitherOr.headline"),
|
|
@@ -3572,13 +3572,13 @@ const wn = (e, n) => {
|
|
|
3572
3572
|
isApiError: e.isApiError,
|
|
3573
3573
|
apiErrorMessage: e.apiErrorMessage,
|
|
3574
3574
|
toggleTryAgain: e.toggleTryAgain,
|
|
3575
|
-
renderPresentedBy: (
|
|
3575
|
+
renderPresentedBy: (f) => {
|
|
3576
3576
|
var o;
|
|
3577
3577
|
return /* @__PURE__ */ t(
|
|
3578
|
-
|
|
3578
|
+
me,
|
|
3579
3579
|
{
|
|
3580
3580
|
brandingLogo: s,
|
|
3581
|
-
textColor:
|
|
3581
|
+
textColor: f,
|
|
3582
3582
|
label: ((o = e.eitherOr.labels) == null ? void 0 : o.sponsor) || null,
|
|
3583
3583
|
isCentered: l
|
|
3584
3584
|
}
|
|
@@ -3587,10 +3587,10 @@ const wn = (e, n) => {
|
|
|
3587
3587
|
rulesDisplay: e.rulesDisplay
|
|
3588
3588
|
}
|
|
3589
3589
|
);
|
|
3590
|
-
},
|
|
3591
|
-
const { t: n } =
|
|
3590
|
+
}, Kn = (e) => {
|
|
3591
|
+
const { t: n } = ee();
|
|
3592
3592
|
return /* @__PURE__ */ t(
|
|
3593
|
-
|
|
3593
|
+
Ft,
|
|
3594
3594
|
{
|
|
3595
3595
|
entity: e.eitherOr,
|
|
3596
3596
|
headline: n("eitherOr.headline"),
|
|
@@ -3599,17 +3599,17 @@ const wn = (e, n) => {
|
|
|
3599
3599
|
defaultImagePlaceholder: e.defaultImagePlaceholderUrl,
|
|
3600
3600
|
onLeadSubmitted: e.onLeadSubmitted,
|
|
3601
3601
|
isSubmitting: e.isSubmitting,
|
|
3602
|
-
PresentedBy:
|
|
3603
|
-
CollectLeadWrapper:
|
|
3602
|
+
PresentedBy: me,
|
|
3603
|
+
CollectLeadWrapper: _t,
|
|
3604
3604
|
consents: e.consents,
|
|
3605
3605
|
rulesDisplay: e.rulesDisplay
|
|
3606
3606
|
}
|
|
3607
3607
|
);
|
|
3608
|
-
},
|
|
3609
|
-
var s,
|
|
3610
|
-
const { t: n } =
|
|
3608
|
+
}, Xn = (e) => {
|
|
3609
|
+
var s, f, o;
|
|
3610
|
+
const { t: n } = ee(), l = ((s = e.eitherOr.branding) == null ? void 0 : s.colors) || null, i = (l == null ? void 0 : l.primaryColor) || K().palette.primary.plainColor;
|
|
3611
3611
|
return /* @__PURE__ */ t(
|
|
3612
|
-
|
|
3612
|
+
Bt,
|
|
3613
3613
|
{
|
|
3614
3614
|
entity: e.eitherOr,
|
|
3615
3615
|
headline: n("eitherOr.headline"),
|
|
@@ -3619,19 +3619,19 @@ const wn = (e, n) => {
|
|
|
3619
3619
|
onLeadSubmitted: e.onSubmit,
|
|
3620
3620
|
isSubmitting: e.isSubmitting,
|
|
3621
3621
|
MainCard: ke,
|
|
3622
|
-
PresentedBy:
|
|
3622
|
+
PresentedBy: me,
|
|
3623
3623
|
rulesDisplay: e.rulesDisplay,
|
|
3624
3624
|
content: /* @__PURE__ */ t(
|
|
3625
3625
|
rt,
|
|
3626
3626
|
{
|
|
3627
3627
|
consents: e.consents,
|
|
3628
3628
|
primaryColor: i,
|
|
3629
|
-
brandingUrls: (
|
|
3629
|
+
brandingUrls: (f = e.eitherOr.branding) == null ? void 0 : f.urls,
|
|
3630
3630
|
align: "center"
|
|
3631
3631
|
}
|
|
3632
3632
|
),
|
|
3633
3633
|
footerAction: /* @__PURE__ */ t(
|
|
3634
|
-
|
|
3634
|
+
Et,
|
|
3635
3635
|
{
|
|
3636
3636
|
onClick: e.onSubmit,
|
|
3637
3637
|
label: ((o = e.consents.labels) == null ? void 0 : o.ctaLabel) || n("eitherOr.buttons.finish"),
|
|
@@ -3641,11 +3641,11 @@ const wn = (e, n) => {
|
|
|
3641
3641
|
)
|
|
3642
3642
|
}
|
|
3643
3643
|
);
|
|
3644
|
-
},
|
|
3645
|
-
var
|
|
3646
|
-
const { t: n } =
|
|
3644
|
+
}, Zn = (e) => {
|
|
3645
|
+
var f, o, m;
|
|
3646
|
+
const { t: n } = ee(), l = Ne(), i = ((f = e.eitherOr.branding) == null ? void 0 : f.colors) || null, s = (i == null ? void 0 : i.primaryColor) || l.colorSchemes.dark.palette.primary.plainColor;
|
|
3647
3647
|
return /* @__PURE__ */ t(
|
|
3648
|
-
|
|
3648
|
+
Ft,
|
|
3649
3649
|
{
|
|
3650
3650
|
entity: e.eitherOr,
|
|
3651
3651
|
headline: n("eitherOr.headline"),
|
|
@@ -3653,7 +3653,7 @@ const wn = (e, n) => {
|
|
|
3653
3653
|
defaultImagePlaceholder: e.defaultImagePlaceholderUrl,
|
|
3654
3654
|
onLeadSubmitted: e.onSubmit,
|
|
3655
3655
|
isSubmitting: e.isSubmitting,
|
|
3656
|
-
PresentedBy:
|
|
3656
|
+
PresentedBy: me,
|
|
3657
3657
|
rulesDisplay: e.rulesDisplay,
|
|
3658
3658
|
content: /* @__PURE__ */ t(
|
|
3659
3659
|
rt,
|
|
@@ -3665,7 +3665,7 @@ const wn = (e, n) => {
|
|
|
3665
3665
|
}
|
|
3666
3666
|
),
|
|
3667
3667
|
footerAction: /* @__PURE__ */ t(
|
|
3668
|
-
|
|
3668
|
+
Et,
|
|
3669
3669
|
{
|
|
3670
3670
|
onClick: e.onSubmit,
|
|
3671
3671
|
label: ((m = e.consents.labels) == null ? void 0 : m.ctaLabel) || n("eitherOr.buttons.finish"),
|
|
@@ -3682,89 +3682,89 @@ function Be(e) {
|
|
|
3682
3682
|
function Je(e) {
|
|
3683
3683
|
return e.template === ve.OVERLAY;
|
|
3684
3684
|
}
|
|
3685
|
-
const
|
|
3685
|
+
const Jn = (e) => {
|
|
3686
3686
|
var Le, Ve, Ye, _e, qe, Ke, $e;
|
|
3687
|
-
const [n, l] =
|
|
3688
|
-
|
|
3689
|
-
), [i, s] =
|
|
3687
|
+
const [n, l] = z(
|
|
3688
|
+
q.LOADING
|
|
3689
|
+
), [i, s] = z(null), [f, o] = z(null), [m, c] = z(10), [u, h] = z(null), [b, p] = z({
|
|
3690
3690
|
isCorrect: null,
|
|
3691
3691
|
selectedOption: null
|
|
3692
|
-
}), [x, A] =
|
|
3693
|
-
setIsUnauthorized:
|
|
3692
|
+
}), [x, A] = z(!1), [E, w] = z(!1), [I, y] = z(!1), [d, L] = z(""), [S, P] = z(!1), [B, v] = z(!1), [D, O] = z(!1), [V, $] = z(!1), [R, k] = z(!1), [G, M] = z(!1), H = mt(null), a = Rn(e.entityId, e.sdk), {
|
|
3693
|
+
setIsUnauthorized: Y,
|
|
3694
3694
|
setIsApiError: T
|
|
3695
|
-
} =
|
|
3696
|
-
pending:
|
|
3697
|
-
checked:
|
|
3698
|
-
setChecked:
|
|
3699
|
-
allRequiredChecked:
|
|
3700
|
-
submit:
|
|
3701
|
-
} =
|
|
3695
|
+
} = Ln(e.entityId, e.sdk, x), {
|
|
3696
|
+
pending: N,
|
|
3697
|
+
checked: J,
|
|
3698
|
+
setChecked: X,
|
|
3699
|
+
allRequiredChecked: Z,
|
|
3700
|
+
submit: te
|
|
3701
|
+
} = cn({
|
|
3702
3702
|
sdk: e.sdk,
|
|
3703
3703
|
consents: (Le = e.consents) == null ? void 0 : Le.items,
|
|
3704
3704
|
entityId: e.entityId,
|
|
3705
3705
|
entityType: "either_or"
|
|
3706
|
-
}),
|
|
3707
|
-
|
|
3708
|
-
}, fe = (
|
|
3706
|
+
}), ne = !!((a == null ? void 0 : a.authRequirement) === "LEAD" ? (Ve = e.leads) == null ? void 0 : Ve.position : void 0) && N.length > 0, Q = ne ? [] : N.filter((W) => W.position !== "after"), de = ne ? [] : N.filter((W) => W.position === "after"), _ = (W) => {
|
|
3707
|
+
X(W), M(!1);
|
|
3708
|
+
}, fe = (W) => {
|
|
3709
3709
|
var F;
|
|
3710
3710
|
return {
|
|
3711
|
-
items:
|
|
3712
|
-
checked:
|
|
3713
|
-
onChange:
|
|
3711
|
+
items: W,
|
|
3712
|
+
checked: J,
|
|
3713
|
+
onChange: _,
|
|
3714
3714
|
labels: (F = e.consents) == null ? void 0 : F.labels,
|
|
3715
|
-
showError:
|
|
3715
|
+
showError: G
|
|
3716
3716
|
};
|
|
3717
3717
|
};
|
|
3718
3718
|
he(() => {
|
|
3719
|
-
var
|
|
3720
|
-
n !==
|
|
3719
|
+
var W, F;
|
|
3720
|
+
n !== q.RESULTS || !f || (F = (W = e.callbacks) == null ? void 0 : W.onFinish) == null || F.call(W, f);
|
|
3721
3721
|
}, [n]), he(() => {
|
|
3722
|
-
|
|
3722
|
+
dn(e.language || "en");
|
|
3723
3723
|
}, [e.language]), he(() => {
|
|
3724
|
-
a && a.id && l(
|
|
3724
|
+
a && a.id && l(q.TUTORIAL);
|
|
3725
3725
|
}, [a]);
|
|
3726
3726
|
const U = () => ({
|
|
3727
|
-
onTimerTick: (
|
|
3728
|
-
c(
|
|
3727
|
+
onTimerTick: (W) => {
|
|
3728
|
+
c(W);
|
|
3729
3729
|
},
|
|
3730
|
-
onElapsedResponse: (
|
|
3731
|
-
const F =
|
|
3732
|
-
(
|
|
3730
|
+
onElapsedResponse: (W) => {
|
|
3731
|
+
const F = W.steps.find(
|
|
3732
|
+
(oe) => {
|
|
3733
3733
|
var xe;
|
|
3734
|
-
return
|
|
3734
|
+
return oe.pairId === ((xe = H.current) == null ? void 0 : xe.pairId);
|
|
3735
3735
|
}
|
|
3736
|
-
),
|
|
3736
|
+
), re = ((F == null ? void 0 : F.optionOne.value) ?? 0) >= ((F == null ? void 0 : F.optionTwo.value) ?? 0) ? (F == null ? void 0 : F.optionOne.id) ?? null : (F == null ? void 0 : F.optionTwo.id) ?? null;
|
|
3737
3737
|
p({
|
|
3738
3738
|
isCorrect: !1,
|
|
3739
3739
|
selectedOption: null,
|
|
3740
3740
|
timedOut: !0,
|
|
3741
|
-
correctOptionId:
|
|
3742
|
-
}), o(
|
|
3741
|
+
correctOptionId: re
|
|
3742
|
+
}), o(W), setTimeout(() => {
|
|
3743
3743
|
var Oe;
|
|
3744
|
-
const
|
|
3745
|
-
if (
|
|
3746
|
-
|
|
3744
|
+
const oe = ((Oe = e.leads) == null ? void 0 : Oe.position) === "after" && (a == null ? void 0 : a.authRequirement) === "LEAD" && !S;
|
|
3745
|
+
if (W.currentLives === 0) {
|
|
3746
|
+
oe ? v(!0) : l(q.RESULTS);
|
|
3747
3747
|
return;
|
|
3748
3748
|
}
|
|
3749
|
-
const xe =
|
|
3750
|
-
xe ? (s(xe), h(null), p({ isCorrect: null, selectedOption: null })) :
|
|
3749
|
+
const xe = W.steps.find((be) => !be.played);
|
|
3750
|
+
xe ? (s(xe), h(null), p({ isCorrect: null, selectedOption: null })) : oe ? v(!0) : l(q.RESULTS);
|
|
3751
3751
|
}, 1e3);
|
|
3752
3752
|
}
|
|
3753
|
-
}),
|
|
3754
|
-
console.error("[either-or-play] request failed",
|
|
3755
|
-
const { code: F, message:
|
|
3756
|
-
F === 401 || F === 403 ? w(!0) : (y(!0), L(
|
|
3757
|
-
},
|
|
3758
|
-
var
|
|
3759
|
-
if (
|
|
3760
|
-
if (
|
|
3761
|
-
if (!
|
|
3762
|
-
|
|
3753
|
+
}), j = (W) => {
|
|
3754
|
+
console.error("[either-or-play] request failed", W);
|
|
3755
|
+
const { code: F, message: re } = un(W, e.sdk);
|
|
3756
|
+
F === 401 || F === 403 ? w(!0) : (y(!0), L(re));
|
|
3757
|
+
}, ue = Me(async () => {
|
|
3758
|
+
var W;
|
|
3759
|
+
if (Q.length > 0) {
|
|
3760
|
+
if (D) return;
|
|
3761
|
+
if (!Z(Q)) {
|
|
3762
|
+
M(!0);
|
|
3763
3763
|
return;
|
|
3764
3764
|
}
|
|
3765
|
-
O(!0), await
|
|
3765
|
+
O(!0), await te(Q), O(!1);
|
|
3766
3766
|
}
|
|
3767
|
-
if ((a == null ? void 0 : a.authRequirement) === "LEAD" && ((
|
|
3767
|
+
if ((a == null ? void 0 : a.authRequirement) === "LEAD" && ((W = e.leads) == null ? void 0 : W.position) === "before" && !S) {
|
|
3768
3768
|
v(!0);
|
|
3769
3769
|
return;
|
|
3770
3770
|
}
|
|
@@ -3774,9 +3774,9 @@ const Zn = (e) => {
|
|
|
3774
3774
|
null,
|
|
3775
3775
|
U()
|
|
3776
3776
|
);
|
|
3777
|
-
c((a == null ? void 0 : a.time) ?? 10), o(F), s(F.steps.find((
|
|
3777
|
+
c((a == null ? void 0 : a.time) ?? 10), o(F), s(F.steps.find((re) => !re.played) || null), l(q.PLAYING);
|
|
3778
3778
|
} catch (F) {
|
|
3779
|
-
console.error("Failed to start game:", F),
|
|
3779
|
+
console.error("Failed to start game:", F), j(F);
|
|
3780
3780
|
}
|
|
3781
3781
|
}, [
|
|
3782
3782
|
e.entityId,
|
|
@@ -3785,36 +3785,36 @@ const Zn = (e) => {
|
|
|
3785
3785
|
a == null ? void 0 : a.authRequirement,
|
|
3786
3786
|
a == null ? void 0 : a.time,
|
|
3787
3787
|
S,
|
|
3788
|
-
|
|
3789
|
-
|
|
3788
|
+
Q,
|
|
3789
|
+
D
|
|
3790
3790
|
]);
|
|
3791
|
-
|
|
3791
|
+
H.current = i;
|
|
3792
3792
|
const Ae = Me(
|
|
3793
|
-
async (
|
|
3793
|
+
async (W, F) => {
|
|
3794
3794
|
if (!u) {
|
|
3795
3795
|
h(F);
|
|
3796
3796
|
try {
|
|
3797
|
-
const
|
|
3797
|
+
const re = await e.sdk.miniGames.participateInEitherOr(
|
|
3798
3798
|
e.entityId,
|
|
3799
|
-
{ pair:
|
|
3799
|
+
{ pair: W, answer: F },
|
|
3800
3800
|
U()
|
|
3801
|
-
),
|
|
3802
|
-
(be) => be.pairId ===
|
|
3803
|
-
), xe = (
|
|
3801
|
+
), oe = re.steps.find(
|
|
3802
|
+
(be) => be.pairId === W
|
|
3803
|
+
), xe = (oe == null ? void 0 : oe.correct) ?? !1, Oe = xe ? null : [oe == null ? void 0 : oe.optionOne.id, oe == null ? void 0 : oe.optionTwo.id].find(
|
|
3804
3804
|
(be) => be !== F
|
|
3805
3805
|
) ?? null;
|
|
3806
|
-
p({ isCorrect: xe, selectedOption: F, correctOptionId: Oe }), o(
|
|
3806
|
+
p({ isCorrect: xe, selectedOption: F, correctOptionId: Oe }), o(re), setTimeout(() => {
|
|
3807
3807
|
var Ue;
|
|
3808
|
-
const be = ((Ue = e.leads) == null ? void 0 : Ue.position) === "after" && (a == null ? void 0 : a.authRequirement) === "LEAD" && !S, Fe =
|
|
3809
|
-
if (
|
|
3810
|
-
Fe ?
|
|
3808
|
+
const be = ((Ue = e.leads) == null ? void 0 : Ue.position) === "after" && (a == null ? void 0 : a.authRequirement) === "LEAD" && !S, Fe = de.length > 0 && !R;
|
|
3809
|
+
if (re.currentLives === 0) {
|
|
3810
|
+
Fe ? $(!0) : be ? v(!0) : l(q.RESULTS);
|
|
3811
3811
|
return;
|
|
3812
3812
|
}
|
|
3813
|
-
const Ee =
|
|
3814
|
-
Ee ? (s(Ee), h(null), p({ isCorrect: null, selectedOption: null })) : Fe ?
|
|
3813
|
+
const Ee = re.steps.find((Xe) => !Xe.played);
|
|
3814
|
+
Ee ? (s(Ee), h(null), p({ isCorrect: null, selectedOption: null })) : Fe ? $(!0) : be ? v(!0) : l(q.RESULTS);
|
|
3815
3815
|
}, 1e3);
|
|
3816
|
-
} catch (
|
|
3817
|
-
console.error("Failed to submit answer:",
|
|
3816
|
+
} catch (re) {
|
|
3817
|
+
console.error("Failed to submit answer:", re), h(null), j(re);
|
|
3818
3818
|
}
|
|
3819
3819
|
}
|
|
3820
3820
|
},
|
|
@@ -3825,12 +3825,12 @@ const Zn = (e) => {
|
|
|
3825
3825
|
a == null ? void 0 : a.authRequirement,
|
|
3826
3826
|
(_e = e.leads) == null ? void 0 : _e.position,
|
|
3827
3827
|
S,
|
|
3828
|
-
|
|
3829
|
-
|
|
3828
|
+
de,
|
|
3829
|
+
R
|
|
3830
3830
|
]
|
|
3831
3831
|
), we = Me(async () => {
|
|
3832
|
-
var
|
|
3833
|
-
if (P(!0), ((
|
|
3832
|
+
var W;
|
|
3833
|
+
if (P(!0), ((W = e.leads) == null ? void 0 : W.position) === "before") {
|
|
3834
3834
|
O(!0);
|
|
3835
3835
|
try {
|
|
3836
3836
|
const F = await e.sdk.miniGames.participateInEitherOr(
|
|
@@ -3838,30 +3838,30 @@ const Zn = (e) => {
|
|
|
3838
3838
|
null,
|
|
3839
3839
|
U()
|
|
3840
3840
|
);
|
|
3841
|
-
c((a == null ? void 0 : a.time) ?? 10), o(F), s(F.steps.find((
|
|
3841
|
+
c((a == null ? void 0 : a.time) ?? 10), o(F), s(F.steps.find((re) => !re.played) || null), v(!1), O(!1), l(q.PLAYING);
|
|
3842
3842
|
} catch (F) {
|
|
3843
|
-
O(!1), v(!1),
|
|
3843
|
+
O(!1), v(!1), j(F);
|
|
3844
3844
|
}
|
|
3845
3845
|
} else
|
|
3846
|
-
v(!1), O(!1), l(
|
|
3846
|
+
v(!1), O(!1), l(q.RESULTS);
|
|
3847
3847
|
}, [(qe = e.leads) == null ? void 0 : qe.position, e.entityId, e.sdk, a == null ? void 0 : a.time]), Ce = Me(async () => {
|
|
3848
|
-
if (!
|
|
3849
|
-
|
|
3848
|
+
if (!Z(de)) {
|
|
3849
|
+
M(!0);
|
|
3850
3850
|
return;
|
|
3851
3851
|
}
|
|
3852
|
-
O(!0), await
|
|
3853
|
-
}, [
|
|
3854
|
-
l(
|
|
3855
|
-
}, [a == null ? void 0 : a.time]),
|
|
3856
|
-
y(!1), w(!1), L(""), T(!1),
|
|
3852
|
+
O(!0), await te(de), k(!0), O(!1), $(!1), l(q.RESULTS);
|
|
3853
|
+
}, [de, Z, te]), Ie = Me(() => {
|
|
3854
|
+
l(q.TUTORIAL), s(null), o(null), c((a == null ? void 0 : a.time) ?? 10), h(null), p({ isCorrect: null, selectedOption: null }), P(!1), v(!1), $(!1), M(!1);
|
|
3855
|
+
}, [a == null ? void 0 : a.time]), se = () => {
|
|
3856
|
+
y(!1), w(!1), L(""), T(!1), Y(!1), A(!x), l(q.TUTORIAL), s(null), o(null), h(null), p({ isCorrect: null, selectedOption: null }), P(!1), v(!1), $(!1), M(!1);
|
|
3857
3857
|
};
|
|
3858
3858
|
if (!a)
|
|
3859
3859
|
return /* @__PURE__ */ t(ot, { my: 20 });
|
|
3860
3860
|
if (!a.id)
|
|
3861
|
-
return /* @__PURE__ */ t(
|
|
3861
|
+
return /* @__PURE__ */ t(Un, {});
|
|
3862
3862
|
if (a.status !== "ACTIVE")
|
|
3863
3863
|
return /* @__PURE__ */ t(
|
|
3864
|
-
|
|
3864
|
+
jn,
|
|
3865
3865
|
{
|
|
3866
3866
|
eitherOr: a,
|
|
3867
3867
|
template: e.template,
|
|
@@ -3872,7 +3872,7 @@ const Zn = (e) => {
|
|
|
3872
3872
|
);
|
|
3873
3873
|
if (a.authRequirement === "REGISTERED" && !e.userIsLoggedIn)
|
|
3874
3874
|
return Be(e) ? /* @__PURE__ */ t(
|
|
3875
|
-
|
|
3875
|
+
Mn,
|
|
3876
3876
|
{
|
|
3877
3877
|
eitherOr: a,
|
|
3878
3878
|
imagePosition: e.imagePosition,
|
|
@@ -3881,7 +3881,7 @@ const Zn = (e) => {
|
|
|
3881
3881
|
rulesDisplay: e.rulesDisplay
|
|
3882
3882
|
}
|
|
3883
3883
|
) : Je(e) ? /* @__PURE__ */ t(
|
|
3884
|
-
|
|
3884
|
+
_n,
|
|
3885
3885
|
{
|
|
3886
3886
|
eitherOr: a,
|
|
3887
3887
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
@@ -3891,49 +3891,49 @@ const Zn = (e) => {
|
|
|
3891
3891
|
) : /* @__PURE__ */ t(Qe, {});
|
|
3892
3892
|
if (E || I)
|
|
3893
3893
|
return Je(e) ? /* @__PURE__ */ t(
|
|
3894
|
-
|
|
3894
|
+
qn,
|
|
3895
3895
|
{
|
|
3896
3896
|
eitherOr: a,
|
|
3897
3897
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3898
3898
|
isApiError: I,
|
|
3899
3899
|
apiErrorMessage: d,
|
|
3900
|
-
toggleTryAgain:
|
|
3900
|
+
toggleTryAgain: se,
|
|
3901
3901
|
rulesDisplay: e.rulesDisplay
|
|
3902
3902
|
}
|
|
3903
3903
|
) : /* @__PURE__ */ t(
|
|
3904
|
-
|
|
3904
|
+
Gn,
|
|
3905
3905
|
{
|
|
3906
3906
|
eitherOr: a,
|
|
3907
3907
|
imagePosition: Be(e) ? e.imagePosition : void 0,
|
|
3908
3908
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3909
3909
|
isApiError: I,
|
|
3910
3910
|
apiErrorMessage: d,
|
|
3911
|
-
toggleTryAgain:
|
|
3911
|
+
toggleTryAgain: se,
|
|
3912
3912
|
rulesDisplay: e.rulesDisplay
|
|
3913
3913
|
}
|
|
3914
3914
|
);
|
|
3915
|
-
if (V &&
|
|
3916
|
-
const
|
|
3915
|
+
if (V && de.length > 0) {
|
|
3916
|
+
const W = {
|
|
3917
3917
|
eitherOr: a,
|
|
3918
3918
|
sdk: e.sdk,
|
|
3919
|
-
consents: fe(
|
|
3919
|
+
consents: fe(de),
|
|
3920
3920
|
onSubmit: Ce,
|
|
3921
|
-
isSubmitting:
|
|
3921
|
+
isSubmitting: D,
|
|
3922
3922
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3923
3923
|
rulesDisplay: e.rulesDisplay
|
|
3924
3924
|
};
|
|
3925
3925
|
return Be(e) ? /* @__PURE__ */ t(
|
|
3926
|
-
|
|
3926
|
+
Xn,
|
|
3927
3927
|
{
|
|
3928
|
-
...
|
|
3928
|
+
...W,
|
|
3929
3929
|
imagePosition: e.imagePosition
|
|
3930
3930
|
}
|
|
3931
|
-
) : /* @__PURE__ */ t(
|
|
3931
|
+
) : /* @__PURE__ */ t(Zn, { ...W });
|
|
3932
3932
|
}
|
|
3933
|
-
if (
|
|
3933
|
+
if (B && a.authRequirement === "LEAD" && (((Ke = e.leads) == null ? void 0 : Ke.position) === "after" || (($e = e.leads) == null ? void 0 : $e.position) === "before")) {
|
|
3934
3934
|
if (Be(e))
|
|
3935
3935
|
return /* @__PURE__ */ t(
|
|
3936
|
-
|
|
3936
|
+
Hn,
|
|
3937
3937
|
{
|
|
3938
3938
|
eitherOr: a,
|
|
3939
3939
|
sdk: e.sdk,
|
|
@@ -3941,32 +3941,32 @@ const Zn = (e) => {
|
|
|
3941
3941
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3942
3942
|
onLeadSubmitted: we,
|
|
3943
3943
|
imagePosition: e.imagePosition,
|
|
3944
|
-
isSubmitting:
|
|
3944
|
+
isSubmitting: D,
|
|
3945
3945
|
rulesDisplay: e.rulesDisplay,
|
|
3946
|
-
consents:
|
|
3946
|
+
consents: ne ? N : void 0
|
|
3947
3947
|
}
|
|
3948
3948
|
);
|
|
3949
3949
|
if (Je(e))
|
|
3950
3950
|
return /* @__PURE__ */ t(
|
|
3951
|
-
|
|
3951
|
+
Kn,
|
|
3952
3952
|
{
|
|
3953
3953
|
eitherOr: a,
|
|
3954
3954
|
sdk: e.sdk,
|
|
3955
3955
|
leads: e.leads,
|
|
3956
3956
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3957
3957
|
onLeadSubmitted: we,
|
|
3958
|
-
isSubmitting:
|
|
3958
|
+
isSubmitting: D,
|
|
3959
3959
|
rulesDisplay: e.rulesDisplay,
|
|
3960
|
-
consents:
|
|
3960
|
+
consents: ne ? N : void 0
|
|
3961
3961
|
}
|
|
3962
3962
|
);
|
|
3963
3963
|
}
|
|
3964
3964
|
return Be(e) ? /* @__PURE__ */ t(
|
|
3965
|
-
|
|
3965
|
+
En,
|
|
3966
3966
|
{
|
|
3967
3967
|
eitherOr: a,
|
|
3968
3968
|
currentPair: i,
|
|
3969
|
-
stepInfo:
|
|
3969
|
+
stepInfo: f,
|
|
3970
3970
|
gameState: n,
|
|
3971
3971
|
timer: m,
|
|
3972
3972
|
selected: u,
|
|
@@ -3978,18 +3978,18 @@ const Zn = (e) => {
|
|
|
3978
3978
|
showStandings: e.showStandings,
|
|
3979
3979
|
additionalCTA: e.additionalCTA,
|
|
3980
3980
|
imagePosition: e.imagePosition,
|
|
3981
|
-
consents: fe(
|
|
3982
|
-
isSubmitting:
|
|
3983
|
-
onGameStart:
|
|
3981
|
+
consents: fe(Q),
|
|
3982
|
+
isSubmitting: D,
|
|
3983
|
+
onGameStart: ue,
|
|
3984
3984
|
onSelection: Ae,
|
|
3985
3985
|
onPlayAgain: Ie
|
|
3986
3986
|
}
|
|
3987
3987
|
) : Je(e) ? /* @__PURE__ */ t(
|
|
3988
|
-
|
|
3988
|
+
Vn,
|
|
3989
3989
|
{
|
|
3990
3990
|
eitherOr: a,
|
|
3991
3991
|
currentPair: i,
|
|
3992
|
-
stepInfo:
|
|
3992
|
+
stepInfo: f,
|
|
3993
3993
|
gameState: n,
|
|
3994
3994
|
timer: m,
|
|
3995
3995
|
selected: u,
|
|
@@ -4000,14 +4000,14 @@ const Zn = (e) => {
|
|
|
4000
4000
|
rulesDisplay: e.rulesDisplay,
|
|
4001
4001
|
showStandings: e.showStandings,
|
|
4002
4002
|
additionalCTA: e.additionalCTA,
|
|
4003
|
-
consents: fe(
|
|
4004
|
-
isSubmitting:
|
|
4005
|
-
onGameStart:
|
|
4003
|
+
consents: fe(Q),
|
|
4004
|
+
isSubmitting: D,
|
|
4005
|
+
onGameStart: ue,
|
|
4006
4006
|
onSelection: Ae,
|
|
4007
4007
|
onPlayAgain: Ie
|
|
4008
4008
|
}
|
|
4009
4009
|
) : /* @__PURE__ */ t(Qe, {});
|
|
4010
|
-
},
|
|
4010
|
+
}, Cr = (e) => /* @__PURE__ */ t(mn, { packageName: "either-or-play", ...e, children: /* @__PURE__ */ t(Jn, { ...e }) });
|
|
4011
4011
|
export {
|
|
4012
|
-
|
|
4012
|
+
Cr as M
|
|
4013
4013
|
};
|