fansunited-frontend-components 0.0.69 → 0.0.71
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.js +1 -1
- package/ChanceGame.js +529 -520
- package/ClassicQuizPlay.js +1725 -1458
- package/CollectLead.js +141 -141
- package/Discussion.js +1 -1
- package/EitherOrPlay.js +1524 -1331
- package/EventCard.js +3001 -1848
- package/EventGamePlay.js +2023 -1742
- package/Leaderboard.js +367 -357
- package/MatchQuizPlay.js +2936 -2649
- package/PersonalityQuizPlay.js +1395 -1119
- package/PickThePair.js +481 -472
- package/PlayerOfTheMatch.js +235 -234
- package/PollVote.js +1318 -1036
- package/Predictor.js +4383 -4390
- package/README.md +110 -4
- package/Standings.js +652 -643
- package/TopX.js +2646 -2645
- package/chunks/{AccessTime-7cim24ED.js → AccessTime-BkHriW4j.js} +1 -1
- package/chunks/{AlertMessage-X4MQ4qsN.js → AlertMessage-DwSmhmHt.js} +11 -11
- package/chunks/{Avatar-RBMU1Gkk.js → Avatar-CEbT4X-o.js} +22 -22
- package/chunks/{Button-GawVOPKi.js → Button-CO-k2gLb.js} +3 -3
- package/chunks/{Card--xcz3SKi.js → Card-DZdPl8-h.js} +7 -7
- package/chunks/{CardActions-CPwvcLGp.js → CardActions-DTThyeLX.js} +20 -20
- package/chunks/{CardContent-Ew6fr-KR.js → CardContent-CzC1EwoD.js} +14 -14
- package/chunks/{ChanceGameEmbedVariant-Dio4ihOd.js → ChanceGameEmbedVariant-CteJ4tix.js} +309 -195
- package/chunks/{CheckCircle-DgKcR_no.js → CheckCircle-BzM-2e1z.js} +1 -1
- package/chunks/{Chip-CYpaygnD.js → Chip-BF1FXK0I.js} +15 -15
- package/chunks/{Close-CdJNGcLx.js → Close-BiMLcNyG.js} +1 -1
- package/chunks/{Close-D2mtuGDo.js → Close-CggU6Ga3.js} +1 -1
- package/chunks/{CollectLeadForm-D0P_JHmT.js → CollectLeadForm-BZj-9IDt.js} +1389 -1463
- package/chunks/ConsentsList-CtKgLYa8.js +339 -0
- package/chunks/DirectionScope-BGDPaR6B.js +24 -0
- package/chunks/{Divider-DcW0V71y.js → Divider-Dueyhj7K.js} +8 -8
- package/chunks/{Edit-Bcj6J4rt.js → Edit-Dqa7th_A.js} +3 -3
- package/chunks/EditOutlined-B__rjTwX.js +14 -0
- package/chunks/{EmojiEvents-g001ss_z.js → EmojiEvents-CpsA2Qo0.js} +1 -1
- package/chunks/{FavoriteBorder-Lr6swB6-.js → FavoriteBorder-DrC_eOCd.js} +1 -1
- package/chunks/{FormControl-BKlK7WPd.js → FormControl-fKyT2Mql.js} +34 -33
- package/chunks/{FormControlContext-B2HqeXgq.js → FormControlContext-CSrMcHcv.js} +11 -11
- package/chunks/{FormLabel-C47pX5hN.js → FormLabel-DlXT5RZd.js} +22 -25
- package/chunks/{InlineSpinner-Imz27zb2.js → InlineSpinner-CuisRY-E.js} +2 -2
- package/chunks/{Input-nS_KO1Bu.js → Input-CkSIGH-d.js} +15 -15
- package/chunks/{KeyboardArrowDown-CyZAOE-W.js → KeyboardArrowDown-DL8VjkJT.js} +1 -1
- package/chunks/{KeyboardArrowRight-FI0kqwO1.js → KeyboardArrowRight-Cm50UqHb.js} +1 -1
- package/chunks/{Link-DKU7kDL8.js → Link-BljMbRuR.js} +13 -13
- package/chunks/{ListItemButton-CPVIEVpf.js → ListItemButton-BqEcbBU0.js} +50 -50
- package/chunks/{ModalDialog-DDx8wQa3.js → ModalDialog-B0DLv5vW.js} +59 -59
- package/chunks/{NotFoundSkeleton-CJZIRj5-.js → NotFoundSkeleton-DKxLhOwI.js} +149 -125
- package/chunks/{Notification-BvVfrrB3.js → Notification-CEdU0opQ.js} +18 -18
- package/chunks/{OverlayScoreStateSkeleton-CAhCAjkS.js → OverlayScoreStateSkeleton-BtCy650g.js} +18 -12
- package/chunks/{ArrowRightAlt-DrBMgptf.js → OverlayScoreStateWrapperSkeleton-Ch_E6KQ6.js} +18 -21
- package/chunks/OverlaySignInSkeleton-DEiH7fmp.js +517 -0
- package/chunks/{Person-DB_bEPcg.js → Person-CLQl7Sxs.js} +1 -1
- package/chunks/{PersonOutline-BAOtfb1t.js → PersonOutline-D8yrpbw7.js} +1 -1
- package/chunks/{PickOneOfX-Dp6fzXJn.js → PickOneOfX-CG0B5u7Y.js} +3 -3
- package/chunks/{Popper-Bpy7eYt-.js → Popper-BSnc2Lit.js} +58 -58
- package/chunks/Portal-D8t1Jd5e.js +65 -0
- package/chunks/{Portal-Dvh4m8kk.js → Portal-cK515D9M.js} +4 -4
- package/chunks/{PrizeCard-CXjFADAN.js → PrizeCard-CyVJJLo1.js} +6295 -4346
- package/chunks/{Search-uVJw-NhK.js → Search-BXhhax8M.js} +1 -1
- package/chunks/{Select-BeixD4Vw.js → Select-DyRdhrMr.js} +61 -61
- package/chunks/{Sheet-vOgATocO.js → Sheet-sYNAL7gX.js} +14 -14
- package/chunks/{Spinner-C219bcnm.js → Spinner-Bb4eb64F.js} +2 -2
- package/chunks/SplitSignInSkeleton-BZT0ngoW.js +150 -0
- package/chunks/{Stack-JIDLCVx0.js → Stack-DX41loGb.js} +21 -21
- package/chunks/{StandardContentSkeleton-DsGBNMHN.js → StandardContentSkeleton-DAh7l7cd.js} +12 -12
- package/chunks/{Table-Cx7htUDp.js → Table-C09wF6nK.js} +8 -8
- package/chunks/{Tabs-CIJK8YZY.js → Tabs-Dhih1Lqb.js} +46 -46
- package/chunks/{Textarea-KSwIUuq8.js → Textarea-DWyUKbVv.js} +184 -244
- package/chunks/{TimerOutlined-BUL4BZFp.js → TimerOutlined-DeWQFv5g.js} +1 -1
- package/chunks/{Tooltip-DrP2vx9i.js → Tooltip-Dnj_oxHb.js} +55 -55
- package/chunks/{Typography-DFdgIDQS.js → Typography-B8CtvKkm.js} +1 -1
- package/chunks/{dividerClasses-BtSFa36Z.js → dividerClasses-BoOrlu7X.js} +1 -1
- package/chunks/{elementAcceptingRef-CZFKGdxR.js → elementAcceptingRef-DROQPsxj.js} +1 -1
- package/chunks/formLabelClasses-Bh4Fh0fk.js +9 -0
- package/chunks/{helpers-D8cWUfGf.js → helpers-DgUDSfd1.js} +14 -12
- package/chunks/{index-DZqXLvFO.js → index-C_R74meU.js} +69 -72
- package/chunks/index-PC-q6Shn.js +4 -0
- package/chunks/{main-C05CZWMa.js → main-5c5yYsj9.js} +973 -963
- package/chunks/{main-CHr45Z4W.js → main-BXu1mzLz.js} +157 -157
- package/chunks/{useButton-tjUHKc-B.js → useButton-CQ2o2nXk.js} +2 -2
- package/chunks/useConsents-CIhPZNel.js +1165 -0
- package/chunks/{useEventCallback-BFPi8YtI.js → useEventCallback-B1ahtq-a.js} +1 -1
- package/chunks/{useForwardedInput-VvmRv9KU.js → useForwardedInput-DRXHXEOw.js} +22 -22
- package/chunks/{useImageVariant-Cs6lWUs2.js → useImageVariant-D6aho5sy.js} +1 -1
- package/chunks/useSwitch-CYz8kkTr.js +65 -0
- package/index.js +3 -3
- package/package.json +2 -2
- package/chunks/EditOutlined-PCc4gafz.js +0 -11
- package/chunks/OverlayApiErrorSkeleton-JMWA0FV8.js +0 -731
- package/chunks/OverlayLeadAfterCollection-BwF9MvIB.js +0 -678
- package/chunks/Portal-bNE7Trh9.js +0 -55
- package/chunks/SplitLeadAfterCollection-BijLacCk.js +0 -236
- package/chunks/index-JDeYpSi1.js +0 -4
package/Leaderboard.js
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { u as
|
|
4
|
-
import { a as J } from "./chunks/AlertMessage-
|
|
5
|
-
import { createPortal as
|
|
6
|
-
import { F as
|
|
7
|
-
import { T as
|
|
8
|
-
import { S as
|
|
9
|
-
import { P as
|
|
10
|
-
import { h as U, s as
|
|
11
|
-
import { S as
|
|
12
|
-
import { S as
|
|
13
|
-
import { T as
|
|
14
|
-
import { A as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { C as
|
|
18
|
-
|
|
1
|
+
import { jsxs as E, jsx as l, Fragment as ce } from "react/jsx-runtime";
|
|
2
|
+
import z, { useState as B, useEffect as Q, useCallback as me, useMemo as _ } from "react";
|
|
3
|
+
import { u as G, g as fe, C as he, s as ge, b as X, c as de, d as O, f as j, B as L, a as ue, k as be, A as ye, n as xe, D as Ce, E as ve, F as Te, G as Pe, H as Se, I as we, J as Ee } from "./chunks/PrizeCard-CyVJJLo1.js";
|
|
4
|
+
import { a as J } from "./chunks/AlertMessage-DwSmhmHt.js";
|
|
5
|
+
import { createPortal as Ie } from "react-dom";
|
|
6
|
+
import { F as Ae } from "./chunks/FormLabel-DlXT5RZd.js";
|
|
7
|
+
import { T as R } from "./chunks/Typography-B8CtvKkm.js";
|
|
8
|
+
import { S as Re, a as Le } from "./chunks/Select-DyRdhrMr.js";
|
|
9
|
+
import { P as ee } from "./chunks/Person-CLQl7Sxs.js";
|
|
10
|
+
import { h as U, s as Me } from "./chunks/helpers-DgUDSfd1.js";
|
|
11
|
+
import { S as ze } from "./chunks/Spinner-Bb4eb64F.js";
|
|
12
|
+
import { S as Be } from "./chunks/Sheet-sYNAL7gX.js";
|
|
13
|
+
import { T as Fe } from "./chunks/Table-C09wF6nK.js";
|
|
14
|
+
import { A as te } from "./chunks/Avatar-CEbT4X-o.js";
|
|
15
|
+
import { D as H } from "./chunks/DirectionScope-BGDPaR6B.js";
|
|
16
|
+
import { I as k, B as re } from "./chunks/Button-CO-k2gLb.js";
|
|
17
|
+
import { C as Ue, a as $e } from "./chunks/chevrons-right-CXSpQt9w.js";
|
|
18
|
+
import { C as Qe, a as He } from "./chunks/chevron-right-eZEqQ93O.js";
|
|
19
|
+
const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()).join(" "), De = ({
|
|
19
20
|
options: e,
|
|
20
21
|
selectedId: t,
|
|
21
22
|
onChange: a
|
|
22
23
|
}) => {
|
|
23
|
-
const { t: r } =
|
|
24
|
+
const { t: r } = G(), { shadowRootElement: o } = fe(he), b = ge(), v = X(), d = de(), m = O().primary, c = j(), C = v.textColor, p = {
|
|
24
25
|
background: {
|
|
25
26
|
surface: b.colorSchemes.light.palette.background.surface,
|
|
26
27
|
popup: b.colorSchemes.light.palette.background.popup
|
|
@@ -35,18 +36,18 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
35
36
|
}
|
|
36
37
|
}, x = {
|
|
37
38
|
flexShrink: 0,
|
|
38
|
-
fontFamily:
|
|
39
|
+
fontFamily: m,
|
|
39
40
|
fontSize: "0.65em",
|
|
40
41
|
fontWeight: 600,
|
|
41
42
|
letterSpacing: "0.05em",
|
|
42
43
|
textTransform: "uppercase",
|
|
43
|
-
color:
|
|
44
|
-
bgcolor:
|
|
45
|
-
border: `1px solid ${
|
|
44
|
+
color: p.neutral.outlinedColor,
|
|
45
|
+
bgcolor: p.neutral.plainHoverBg,
|
|
46
|
+
border: `1px solid ${p.neutral.outlinedBorder}`,
|
|
46
47
|
borderRadius: d.sm,
|
|
47
|
-
px:
|
|
48
|
-
py:
|
|
49
|
-
},
|
|
48
|
+
px: c["2xs"],
|
|
49
|
+
py: c["3xs"]
|
|
50
|
+
}, I = (g) => /* @__PURE__ */ E(
|
|
50
51
|
L,
|
|
51
52
|
{
|
|
52
53
|
sx: {
|
|
@@ -54,107 +55,107 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
54
55
|
alignItems: "center",
|
|
55
56
|
justifyContent: "space-between",
|
|
56
57
|
width: "100%",
|
|
57
|
-
gap:
|
|
58
|
+
gap: c.sm
|
|
58
59
|
},
|
|
59
60
|
children: [
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
|
|
61
|
+
/* @__PURE__ */ l("span", { children: g.label }),
|
|
62
|
+
g.type && /* @__PURE__ */ l(L, { sx: x, children: ke(g.type) })
|
|
62
63
|
]
|
|
63
64
|
}
|
|
64
|
-
),
|
|
65
|
+
), P = {
|
|
65
66
|
root: {
|
|
66
67
|
sx: {
|
|
67
|
-
fontFamily:
|
|
68
|
+
fontFamily: m,
|
|
68
69
|
borderRadius: d.sm,
|
|
69
|
-
bgcolor:
|
|
70
|
-
borderColor:
|
|
71
|
-
color:
|
|
70
|
+
bgcolor: p.background.surface,
|
|
71
|
+
borderColor: p.neutral.outlinedBorder,
|
|
72
|
+
color: p.neutral.outlinedColor,
|
|
72
73
|
fontSize: "1em",
|
|
73
|
-
"&:hover": { bgcolor:
|
|
74
|
+
"&:hover": { bgcolor: p.neutral.outlinedHoverBg }
|
|
74
75
|
}
|
|
75
76
|
},
|
|
76
77
|
listbox: {
|
|
77
78
|
container: o,
|
|
78
79
|
sx: {
|
|
79
80
|
zIndex: 10,
|
|
80
|
-
bgcolor:
|
|
81
|
-
border: `1px solid ${
|
|
81
|
+
bgcolor: p.background.popup,
|
|
82
|
+
border: `1px solid ${p.neutral.outlinedBorder}`,
|
|
82
83
|
borderRadius: d.sm,
|
|
83
84
|
boxShadow: "0 4px 6px -1px rgb(0 0 0 / 0.1)"
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
|
-
},
|
|
87
|
-
fontFamily:
|
|
88
|
-
color: `${
|
|
87
|
+
}, u = {
|
|
88
|
+
fontFamily: m,
|
|
89
|
+
color: `${p.neutral.outlinedColor} !important`,
|
|
89
90
|
bgcolor: "transparent",
|
|
90
91
|
"&:hover": {
|
|
91
|
-
bgcolor: `${
|
|
92
|
-
color: `${
|
|
92
|
+
bgcolor: `${p.neutral.plainHoverBg} !important`,
|
|
93
|
+
color: `${p.neutral.plainHoverColor} !important`
|
|
93
94
|
},
|
|
94
95
|
"&.Mui-selected": {
|
|
95
|
-
bgcolor: `${
|
|
96
|
-
color: `${
|
|
96
|
+
bgcolor: `${p.neutral.plainActiveBg} !important`,
|
|
97
|
+
color: `${p.neutral.outlinedColor} !important`
|
|
97
98
|
},
|
|
98
99
|
"&.Mui-selected:hover": {
|
|
99
|
-
bgcolor: `${
|
|
100
|
-
color: `${
|
|
100
|
+
bgcolor: `${p.neutral.plainActiveBg} !important`,
|
|
101
|
+
color: `${p.neutral.outlinedColor} !important`
|
|
101
102
|
}
|
|
102
103
|
};
|
|
103
|
-
return /* @__PURE__ */
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
|
|
104
|
+
return /* @__PURE__ */ E(L, { sx: { display: "flex", flexDirection: "column", gap: c["2xs"] }, children: [
|
|
105
|
+
/* @__PURE__ */ l(
|
|
106
|
+
Ae,
|
|
106
107
|
{
|
|
107
108
|
sx: {
|
|
108
|
-
color: `${
|
|
109
|
-
fontFamily:
|
|
109
|
+
color: `${C} !important`,
|
|
110
|
+
fontFamily: m,
|
|
110
111
|
fontSize: "0.875em"
|
|
111
112
|
},
|
|
112
|
-
children: /* @__PURE__ */
|
|
113
|
-
|
|
113
|
+
children: /* @__PURE__ */ l(
|
|
114
|
+
R,
|
|
114
115
|
{
|
|
115
116
|
sx: {
|
|
116
|
-
fontFamily:
|
|
117
|
+
fontFamily: m,
|
|
117
118
|
fontSize: "0.875em",
|
|
118
|
-
color:
|
|
119
|
+
color: C
|
|
119
120
|
},
|
|
120
121
|
children: r("leaderboard.selectLabel")
|
|
121
122
|
}
|
|
122
123
|
)
|
|
123
124
|
}
|
|
124
125
|
),
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
|
|
126
|
+
/* @__PURE__ */ l(
|
|
127
|
+
Re,
|
|
127
128
|
{
|
|
128
129
|
value: t,
|
|
129
|
-
onChange: (
|
|
130
|
-
slotProps:
|
|
131
|
-
renderValue: (
|
|
132
|
-
if (!
|
|
133
|
-
const
|
|
134
|
-
return
|
|
130
|
+
onChange: (g, S) => S && a(S),
|
|
131
|
+
slotProps: P,
|
|
132
|
+
renderValue: (g) => {
|
|
133
|
+
if (!g) return null;
|
|
134
|
+
const S = e.find((f) => f.id === g.value);
|
|
135
|
+
return S ? I(S) : g.label;
|
|
135
136
|
},
|
|
136
|
-
children: e.map((
|
|
137
|
+
children: e.map((g) => /* @__PURE__ */ l(Le, { value: g.id, sx: u, children: I(g) }, g.id))
|
|
137
138
|
}
|
|
138
139
|
)
|
|
139
140
|
] });
|
|
140
|
-
},
|
|
141
|
+
}, _e = ({
|
|
141
142
|
leaderboard: e,
|
|
142
143
|
userRank: t,
|
|
143
144
|
showHeading: a,
|
|
144
145
|
title: r,
|
|
145
146
|
description: o,
|
|
146
147
|
isSplitVariant: b,
|
|
147
|
-
brandingColors:
|
|
148
|
+
brandingColors: v,
|
|
148
149
|
rankStyles: d
|
|
149
150
|
}) => {
|
|
150
|
-
const { t:
|
|
151
|
+
const { t: m } = G(), c = ue(), C = X(), p = (v == null ? void 0 : v.primaryColor) || C.palette.primary.plainColor, x = (v == null ? void 0 : v.contentColor) || C.textColor, I = C.textColor, P = O().primary, u = O().secondary, g = de(), S = j(), f = be(), i = C.surfaceVariant, n = c.colorSchemes.light.palette.primary.onPrimary, h = C.outlineEnabledBorder, s = {
|
|
151
152
|
leaderboardContainer: {
|
|
152
153
|
display: "flex",
|
|
153
154
|
flexDirection: "column",
|
|
154
|
-
gap:
|
|
155
|
+
gap: S.md
|
|
155
156
|
},
|
|
156
157
|
leaderboardTitle: {
|
|
157
|
-
fontFamily:
|
|
158
|
+
fontFamily: P,
|
|
158
159
|
fontWeight: 700,
|
|
159
160
|
lineHeight: "133%",
|
|
160
161
|
letterSpacing: "0px",
|
|
@@ -164,11 +165,11 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
164
165
|
},
|
|
165
166
|
tableContainer: {
|
|
166
167
|
overflowX: "auto",
|
|
167
|
-
borderRadius:
|
|
168
|
-
border: `1px solid ${
|
|
168
|
+
borderRadius: g.md,
|
|
169
|
+
border: `1px solid ${h}`
|
|
169
170
|
},
|
|
170
171
|
table: {
|
|
171
|
-
backgroundColor:
|
|
172
|
+
backgroundColor: i,
|
|
172
173
|
"--TableCell-paddingX": "0.5rem",
|
|
173
174
|
"--TableCell-paddingY": "0.375rem",
|
|
174
175
|
cursor: "default",
|
|
@@ -176,19 +177,19 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
176
177
|
backgroundColor: "transparent"
|
|
177
178
|
},
|
|
178
179
|
"& > thead > tr > th": {
|
|
179
|
-
backgroundColor: `rgba(${U(
|
|
180
|
+
backgroundColor: `rgba(${U(i)}, 0.8)`,
|
|
180
181
|
color: x,
|
|
181
|
-
fontFamily:
|
|
182
|
+
fontFamily: P,
|
|
182
183
|
fontWeight: 600,
|
|
183
184
|
fontSize: "0.875em",
|
|
184
185
|
textAlign: "center",
|
|
185
|
-
borderBottom: `1px solid ${
|
|
186
|
+
borderBottom: `1px solid ${h}`
|
|
186
187
|
}
|
|
187
188
|
},
|
|
188
189
|
headerCellPosition: {
|
|
189
|
-
backgroundColor: `rgba(${U(
|
|
190
|
+
backgroundColor: `rgba(${U(i)}, 0.8)`,
|
|
190
191
|
color: x,
|
|
191
|
-
fontFamily:
|
|
192
|
+
fontFamily: P,
|
|
192
193
|
fontWeight: 600,
|
|
193
194
|
fontSize: "0.875em",
|
|
194
195
|
textAlign: "center",
|
|
@@ -196,9 +197,9 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
196
197
|
width: "10%"
|
|
197
198
|
},
|
|
198
199
|
headerCellName: {
|
|
199
|
-
backgroundColor: `rgba(${U(
|
|
200
|
+
backgroundColor: `rgba(${U(i)}, 0.8)`,
|
|
200
201
|
color: x,
|
|
201
|
-
fontFamily:
|
|
202
|
+
fontFamily: P,
|
|
202
203
|
fontWeight: 600,
|
|
203
204
|
fontSize: "0.875em",
|
|
204
205
|
textAlign: "left",
|
|
@@ -206,9 +207,9 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
206
207
|
width: "80%"
|
|
207
208
|
},
|
|
208
209
|
headerCellPoints: {
|
|
209
|
-
backgroundColor: `rgba(${U(
|
|
210
|
+
backgroundColor: `rgba(${U(i)}, 0.8)`,
|
|
210
211
|
color: x,
|
|
211
|
-
fontFamily:
|
|
212
|
+
fontFamily: P,
|
|
212
213
|
fontWeight: 600,
|
|
213
214
|
fontSize: "0.875em",
|
|
214
215
|
textAlign: "center",
|
|
@@ -230,23 +231,23 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
230
231
|
textAlign: "center"
|
|
231
232
|
},
|
|
232
233
|
userRow: {
|
|
233
|
-
backgroundColor: `rgba(${U(
|
|
234
|
+
backgroundColor: `rgba(${U(p)}, 0.1)`
|
|
234
235
|
},
|
|
235
236
|
nameCell: {
|
|
236
237
|
display: "flex",
|
|
237
238
|
alignItems: "center",
|
|
238
|
-
gap:
|
|
239
|
+
gap: S.sm
|
|
239
240
|
},
|
|
240
241
|
leaderboardAvatar: {
|
|
241
242
|
width: "32px",
|
|
242
243
|
height: "32px",
|
|
243
244
|
fontSize: "0.875em",
|
|
244
245
|
fontWeight: 600,
|
|
245
|
-
backgroundColor:
|
|
246
|
+
backgroundColor: p,
|
|
246
247
|
color: n
|
|
247
248
|
},
|
|
248
249
|
nameText: {
|
|
249
|
-
fontFamily:
|
|
250
|
+
fontFamily: P,
|
|
250
251
|
fontWeight: 500,
|
|
251
252
|
fontSize: "0.875em",
|
|
252
253
|
color: x,
|
|
@@ -255,13 +256,13 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
255
256
|
whiteSpace: "nowrap"
|
|
256
257
|
},
|
|
257
258
|
positionText: {
|
|
258
|
-
fontFamily:
|
|
259
|
+
fontFamily: P,
|
|
259
260
|
fontWeight: 600,
|
|
260
261
|
fontSize: "0.875em",
|
|
261
262
|
color: x
|
|
262
263
|
},
|
|
263
264
|
pointsText: {
|
|
264
|
-
fontFamily:
|
|
265
|
+
fontFamily: P,
|
|
265
266
|
fontWeight: 600,
|
|
266
267
|
fontSize: "0.875em",
|
|
267
268
|
color: x
|
|
@@ -271,20 +272,20 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
271
272
|
color: n
|
|
272
273
|
},
|
|
273
274
|
noLeaderboardText: {
|
|
274
|
-
fontFamily:
|
|
275
|
+
fontFamily: u,
|
|
275
276
|
fontSize: "1.25em",
|
|
276
277
|
color: x,
|
|
277
278
|
textAlign: "center",
|
|
278
|
-
marginY:
|
|
279
|
+
marginY: S.md
|
|
279
280
|
}
|
|
280
281
|
};
|
|
281
282
|
if (!e)
|
|
282
|
-
return /* @__PURE__ */
|
|
283
|
+
return /* @__PURE__ */ l(ze, { my: 10 });
|
|
283
284
|
if (e.length === 0)
|
|
284
|
-
return /* @__PURE__ */
|
|
285
|
-
const T = t,
|
|
286
|
-
return /* @__PURE__ */
|
|
287
|
-
a && /* @__PURE__ */
|
|
285
|
+
return /* @__PURE__ */ l(R, { level: "body-lg", sx: s.noLeaderboardText, children: m("leaderboard.noLeaderboardAvailable") });
|
|
286
|
+
const T = t, w = T == null ? void 0 : T.profileId, F = w && e.some((y) => y.profileId === w);
|
|
287
|
+
return /* @__PURE__ */ E(L, { sx: s.leaderboardContainer, children: [
|
|
288
|
+
a && /* @__PURE__ */ E(
|
|
288
289
|
L,
|
|
289
290
|
{
|
|
290
291
|
sx: {
|
|
@@ -294,8 +295,8 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
294
295
|
textAlign: "center"
|
|
295
296
|
},
|
|
296
297
|
children: [
|
|
297
|
-
/* @__PURE__ */
|
|
298
|
-
|
|
298
|
+
/* @__PURE__ */ l(
|
|
299
|
+
R,
|
|
299
300
|
{
|
|
300
301
|
level: "body-sm",
|
|
301
302
|
sx: {
|
|
@@ -304,36 +305,36 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
304
305
|
letterSpacing: "1px",
|
|
305
306
|
textTransform: "uppercase",
|
|
306
307
|
fontSize: "0.75em",
|
|
307
|
-
color:
|
|
308
|
+
color: I,
|
|
308
309
|
opacity: "60%",
|
|
309
|
-
fontFamily:
|
|
310
|
+
fontFamily: u
|
|
310
311
|
},
|
|
311
|
-
children:
|
|
312
|
+
children: m("leaderboard.heading")
|
|
312
313
|
}
|
|
313
314
|
),
|
|
314
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ E(
|
|
315
316
|
L,
|
|
316
317
|
{
|
|
317
318
|
sx: {
|
|
318
319
|
display: "flex",
|
|
319
320
|
flexDirection: "column",
|
|
320
|
-
gap:
|
|
321
|
+
gap: S["3xs"]
|
|
321
322
|
},
|
|
322
323
|
children: [
|
|
323
|
-
r && /* @__PURE__ */
|
|
324
|
-
o && /* @__PURE__ */
|
|
325
|
-
|
|
324
|
+
r && /* @__PURE__ */ l(R, { level: "h4", sx: s.leaderboardTitle, children: r }),
|
|
325
|
+
o && /* @__PURE__ */ l(
|
|
326
|
+
R,
|
|
326
327
|
{
|
|
327
328
|
sx: {
|
|
328
329
|
fontWeight: 400,
|
|
329
330
|
lineHeight: "140%",
|
|
330
331
|
letterSpacing: "0.15px",
|
|
331
332
|
fontSize: "1.25em",
|
|
332
|
-
color:
|
|
333
|
+
color: I,
|
|
333
334
|
opacity: "60%",
|
|
334
|
-
fontFamily:
|
|
335
|
+
fontFamily: P
|
|
335
336
|
},
|
|
336
|
-
children:
|
|
337
|
+
children: Me(o)
|
|
337
338
|
}
|
|
338
339
|
)
|
|
339
340
|
]
|
|
@@ -342,8 +343,8 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
342
343
|
]
|
|
343
344
|
}
|
|
344
345
|
),
|
|
345
|
-
/* @__PURE__ */
|
|
346
|
-
|
|
346
|
+
/* @__PURE__ */ l(Be, { sx: s.tableContainer, children: /* @__PURE__ */ E(
|
|
347
|
+
Fe,
|
|
347
348
|
{
|
|
348
349
|
variant: "outlined",
|
|
349
350
|
hoverRow: !1,
|
|
@@ -351,101 +352,101 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
351
352
|
size: "sm",
|
|
352
353
|
sx: s.table,
|
|
353
354
|
children: [
|
|
354
|
-
/* @__PURE__ */
|
|
355
|
-
/* @__PURE__ */
|
|
356
|
-
/* @__PURE__ */
|
|
357
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ l("thead", { children: /* @__PURE__ */ E("tr", { children: [
|
|
356
|
+
/* @__PURE__ */ l("th", { style: s.headerCellPosition, children: f || b ? "" : m("leaderboard.position") }),
|
|
357
|
+
/* @__PURE__ */ l("th", { style: s.headerCellName, children: m("leaderboard.name") }),
|
|
358
|
+
/* @__PURE__ */ l("th", { style: s.headerCellPoints, children: f || b ? "🎯" : m("leaderboard.points") })
|
|
358
359
|
] }) }),
|
|
359
|
-
/* @__PURE__ */
|
|
360
|
-
T && !F && /* @__PURE__ */
|
|
361
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ E("tbody", { children: [
|
|
361
|
+
T && !F && /* @__PURE__ */ E("tr", { style: s.userRow, children: [
|
|
362
|
+
/* @__PURE__ */ l("td", { style: s.tableCellPosition, children: /* @__PURE__ */ E(R, { sx: s.positionText, children: [
|
|
362
363
|
"#",
|
|
363
364
|
T.position
|
|
364
365
|
] }) }),
|
|
365
|
-
/* @__PURE__ */
|
|
366
|
-
/* @__PURE__ */
|
|
367
|
-
/* @__PURE__ */
|
|
366
|
+
/* @__PURE__ */ l("td", { style: s.tableCellName, children: /* @__PURE__ */ E(L, { sx: s.nameCell, children: [
|
|
367
|
+
/* @__PURE__ */ l(te, { sx: s.leaderboardAvatar, children: /* @__PURE__ */ l(ee, { sx: s.avatarIcon }) }),
|
|
368
|
+
/* @__PURE__ */ l(R, { sx: s.nameText, children: m("leaderboard.you") })
|
|
368
369
|
] }) }),
|
|
369
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ l("td", { style: s.tableCellPoints, children: /* @__PURE__ */ l(R, { sx: s.pointsText, children: T.points }) })
|
|
370
371
|
] }),
|
|
371
|
-
e.map((
|
|
372
|
-
var
|
|
373
|
-
const
|
|
374
|
-
return /* @__PURE__ */
|
|
375
|
-
/* @__PURE__ */
|
|
372
|
+
e.map((y, A) => {
|
|
373
|
+
var V, Y, K, q;
|
|
374
|
+
const M = w === y.profileId, pe = M ? s.userRow : d == null ? void 0 : d[A + 1];
|
|
375
|
+
return /* @__PURE__ */ E("tr", { style: pe, children: [
|
|
376
|
+
/* @__PURE__ */ l("td", { style: s.tableCellPosition, children: /* @__PURE__ */ E(R, { sx: s.positionText, children: [
|
|
376
377
|
"#",
|
|
377
|
-
|
|
378
|
+
y.position
|
|
378
379
|
] }) }),
|
|
379
|
-
/* @__PURE__ */
|
|
380
|
-
/* @__PURE__ */
|
|
381
|
-
|
|
380
|
+
/* @__PURE__ */ l("td", { style: s.tableCellName, children: /* @__PURE__ */ E(L, { sx: s.nameCell, children: [
|
|
381
|
+
/* @__PURE__ */ l(
|
|
382
|
+
te,
|
|
382
383
|
{
|
|
383
|
-
src: ((
|
|
384
|
+
src: ((V = y.profileModel) == null ? void 0 : V.avatar) || void 0,
|
|
384
385
|
sx: s.leaderboardAvatar,
|
|
385
|
-
children: (
|
|
386
|
+
children: (Y = y.profileModel) != null && Y.avatar ? /* @__PURE__ */ l(ce, {}) : /* @__PURE__ */ l(ee, { sx: s.avatarIcon })
|
|
386
387
|
}
|
|
387
388
|
),
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ l(R, { sx: s.nameText, children: M ? m("leaderboard.you") : ((K = y.profileModel) == null ? void 0 : K.nickname) || ((q = y.profileModel) == null ? void 0 : q.name) || m("leaderboard.anonymous") })
|
|
389
390
|
] }) }),
|
|
390
|
-
/* @__PURE__ */
|
|
391
|
-
] },
|
|
391
|
+
/* @__PURE__ */ l("td", { style: s.tableCellPoints, children: /* @__PURE__ */ l(R, { sx: s.pointsText, children: y.points }) })
|
|
392
|
+
] }, y.profileId);
|
|
392
393
|
})
|
|
393
394
|
] })
|
|
394
395
|
]
|
|
395
396
|
}
|
|
396
397
|
) })
|
|
397
398
|
] });
|
|
398
|
-
},
|
|
399
|
+
}, Oe = ({
|
|
399
400
|
count: e = 10,
|
|
400
401
|
page: t = 1,
|
|
401
402
|
onChange: a,
|
|
402
403
|
siblingCount: r = 1,
|
|
403
404
|
boundaryCount: o = 1,
|
|
404
405
|
showFirstButton: b = !0,
|
|
405
|
-
showLastButton:
|
|
406
|
+
showLastButton: v = !0,
|
|
406
407
|
size: d = "md",
|
|
407
|
-
disabled:
|
|
408
|
-
isOverlayVariant:
|
|
408
|
+
disabled: m = !1,
|
|
409
|
+
isOverlayVariant: c = !1
|
|
409
410
|
}) => {
|
|
410
|
-
const
|
|
411
|
-
a &&
|
|
412
|
-
}, x = (
|
|
413
|
-
const
|
|
414
|
-
for (let s =
|
|
415
|
-
return
|
|
416
|
-
},
|
|
411
|
+
const C = ue(), p = (i) => {
|
|
412
|
+
a && i >= 1 && i <= e && a(i);
|
|
413
|
+
}, x = (i, n) => {
|
|
414
|
+
const h = [];
|
|
415
|
+
for (let s = i; s <= n; s++) h.push(s);
|
|
416
|
+
return h;
|
|
417
|
+
}, P = (() => {
|
|
417
418
|
if (e <= 0) return [];
|
|
418
|
-
const
|
|
419
|
+
const i = x(1, Math.min(o, e)), n = x(
|
|
419
420
|
Math.max(e - o + 1, o + 1),
|
|
420
421
|
e
|
|
421
|
-
),
|
|
422
|
-
if (
|
|
423
|
-
for (let
|
|
424
|
-
T.push(
|
|
422
|
+
), h = Math.max(o + 1, t - r), s = Math.min(e - o, t + r), T = [...i];
|
|
423
|
+
if (h > o + 1 && T.push("ellipsis-start"), h <= s)
|
|
424
|
+
for (let w = h; w <= s; w++)
|
|
425
|
+
T.push(w);
|
|
425
426
|
s < e - o && T.push("ellipsis-end");
|
|
426
|
-
for (const
|
|
427
|
-
T.includes(
|
|
427
|
+
for (const w of n)
|
|
428
|
+
T.includes(w) || T.push(w);
|
|
428
429
|
return T;
|
|
429
|
-
})(),
|
|
430
|
-
if (!
|
|
430
|
+
})(), u = d === "sm" ? "sm" : d === "lg" ? "lg" : "md", g = d === "sm" ? 16 : d === "lg" ? 24 : 20, S = (i = !1) => {
|
|
431
|
+
if (!c)
|
|
431
432
|
return {
|
|
432
433
|
borderRadius: "8px",
|
|
433
434
|
minWidth: "32px",
|
|
434
435
|
minHeight: "32px",
|
|
435
|
-
fontWeight:
|
|
436
|
+
fontWeight: i ? 600 : 400
|
|
436
437
|
};
|
|
437
|
-
const n =
|
|
438
|
+
const n = C.colorSchemes.dark;
|
|
438
439
|
return {
|
|
439
440
|
borderRadius: "8px",
|
|
440
441
|
minWidth: "32px",
|
|
441
442
|
minHeight: "32px",
|
|
442
|
-
fontWeight:
|
|
443
|
-
backgroundColor:
|
|
444
|
-
color:
|
|
443
|
+
fontWeight: i ? 600 : 400,
|
|
444
|
+
backgroundColor: i ? n.palette.neutral.solidBg : "transparent",
|
|
445
|
+
color: i ? n.palette.neutral.solidColor : n.textColor,
|
|
445
446
|
border: "none",
|
|
446
447
|
"&:hover": {
|
|
447
448
|
backgroundColor: n.palette.neutral.solidBg,
|
|
448
|
-
color:
|
|
449
|
+
color: i ? n.palette.neutral.solidColor : n.textColor
|
|
449
450
|
},
|
|
450
451
|
"&:active": {
|
|
451
452
|
backgroundColor: n.palette.neutral.plainActiveBg
|
|
@@ -457,35 +458,35 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
457
458
|
}
|
|
458
459
|
};
|
|
459
460
|
}, f = () => {
|
|
460
|
-
if (!
|
|
461
|
+
if (!c)
|
|
461
462
|
return {
|
|
462
463
|
borderRadius: "8px",
|
|
463
464
|
minWidth: "32px",
|
|
464
465
|
minHeight: "32px"
|
|
465
466
|
};
|
|
466
|
-
const
|
|
467
|
+
const i = C.colorSchemes.dark;
|
|
467
468
|
return {
|
|
468
469
|
borderRadius: "8px",
|
|
469
470
|
minWidth: "32px",
|
|
470
471
|
minHeight: "32px",
|
|
471
472
|
backgroundColor: "transparent",
|
|
472
|
-
color:
|
|
473
|
+
color: i.textColor,
|
|
473
474
|
border: "none",
|
|
474
475
|
"&:hover": {
|
|
475
|
-
backgroundColor:
|
|
476
|
-
color:
|
|
476
|
+
backgroundColor: i.palette.neutral.solidBg,
|
|
477
|
+
color: i.textColor
|
|
477
478
|
},
|
|
478
479
|
"&:active": {
|
|
479
|
-
backgroundColor:
|
|
480
|
+
backgroundColor: i.palette.neutral.plainActiveBg
|
|
480
481
|
},
|
|
481
482
|
"&.Mui-disabled": {
|
|
482
483
|
backgroundColor: "transparent",
|
|
483
|
-
color:
|
|
484
|
+
color: i.textDisabled,
|
|
484
485
|
opacity: 0.5
|
|
485
486
|
}
|
|
486
487
|
};
|
|
487
488
|
};
|
|
488
|
-
return /* @__PURE__ */
|
|
489
|
+
return /* @__PURE__ */ E(
|
|
489
490
|
L,
|
|
490
491
|
{
|
|
491
492
|
sx: {
|
|
@@ -495,45 +496,45 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
495
496
|
flexWrap: "wrap"
|
|
496
497
|
},
|
|
497
498
|
children: [
|
|
498
|
-
b && /* @__PURE__ */
|
|
499
|
-
|
|
499
|
+
b && /* @__PURE__ */ l(
|
|
500
|
+
k,
|
|
500
501
|
{
|
|
501
|
-
size:
|
|
502
|
+
size: u,
|
|
502
503
|
variant: "plain",
|
|
503
504
|
color: "neutral",
|
|
504
|
-
onClick: () =>
|
|
505
|
-
disabled:
|
|
505
|
+
onClick: () => p(1),
|
|
506
|
+
disabled: m || t === 1,
|
|
506
507
|
sx: f(),
|
|
507
|
-
children: /* @__PURE__ */
|
|
508
|
+
children: /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Ue, { size: g }) })
|
|
508
509
|
}
|
|
509
510
|
),
|
|
510
|
-
/* @__PURE__ */
|
|
511
|
-
|
|
511
|
+
/* @__PURE__ */ l(
|
|
512
|
+
k,
|
|
512
513
|
{
|
|
513
|
-
size:
|
|
514
|
+
size: u,
|
|
514
515
|
variant: "plain",
|
|
515
516
|
color: "neutral",
|
|
516
|
-
onClick: () =>
|
|
517
|
-
disabled:
|
|
517
|
+
onClick: () => p(t - 1),
|
|
518
|
+
disabled: m || t === 1,
|
|
518
519
|
sx: f(),
|
|
519
|
-
children: /* @__PURE__ */
|
|
520
|
+
children: /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Qe, { size: g }) })
|
|
520
521
|
}
|
|
521
522
|
),
|
|
522
|
-
|
|
523
|
-
if (typeof
|
|
524
|
-
return /* @__PURE__ */
|
|
525
|
-
|
|
523
|
+
P.map((i, n) => {
|
|
524
|
+
if (typeof i == "string" && i.startsWith("ellipsis"))
|
|
525
|
+
return /* @__PURE__ */ l(
|
|
526
|
+
re,
|
|
526
527
|
{
|
|
527
|
-
size:
|
|
528
|
+
size: u,
|
|
528
529
|
variant: "plain",
|
|
529
530
|
color: "neutral",
|
|
530
531
|
disabled: !0,
|
|
531
532
|
sx: {
|
|
532
|
-
...
|
|
533
|
+
...S(!1),
|
|
533
534
|
cursor: "default",
|
|
534
|
-
"&.Mui-disabled":
|
|
535
|
+
"&.Mui-disabled": c ? {
|
|
535
536
|
backgroundColor: "transparent",
|
|
536
|
-
color:
|
|
537
|
+
color: C.colorSchemes.dark.textDisabled,
|
|
537
538
|
opacity: 0.5
|
|
538
539
|
} : {
|
|
539
540
|
opacity: 1,
|
|
@@ -542,67 +543,67 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
542
543
|
},
|
|
543
544
|
children: "..."
|
|
544
545
|
},
|
|
545
|
-
`${
|
|
546
|
+
`${i}-${n}`
|
|
546
547
|
);
|
|
547
|
-
const
|
|
548
|
-
return /* @__PURE__ */
|
|
549
|
-
|
|
548
|
+
const h = i === t;
|
|
549
|
+
return /* @__PURE__ */ l(
|
|
550
|
+
re,
|
|
550
551
|
{
|
|
551
|
-
size:
|
|
552
|
-
variant:
|
|
552
|
+
size: u,
|
|
553
|
+
variant: h ? "solid" : "plain",
|
|
553
554
|
color: "neutral",
|
|
554
|
-
onClick: () =>
|
|
555
|
-
disabled:
|
|
556
|
-
sx:
|
|
557
|
-
children:
|
|
555
|
+
onClick: () => p(i),
|
|
556
|
+
disabled: m,
|
|
557
|
+
sx: S(h),
|
|
558
|
+
children: i
|
|
558
559
|
},
|
|
559
|
-
|
|
560
|
+
i
|
|
560
561
|
);
|
|
561
562
|
}),
|
|
562
|
-
/* @__PURE__ */
|
|
563
|
-
|
|
563
|
+
/* @__PURE__ */ l(
|
|
564
|
+
k,
|
|
564
565
|
{
|
|
565
|
-
size:
|
|
566
|
+
size: u,
|
|
566
567
|
variant: "plain",
|
|
567
568
|
color: "neutral",
|
|
568
|
-
onClick: () =>
|
|
569
|
-
disabled:
|
|
569
|
+
onClick: () => p(t + 1),
|
|
570
|
+
disabled: m || t === e,
|
|
570
571
|
sx: f(),
|
|
571
|
-
children: /* @__PURE__ */
|
|
572
|
+
children: /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(He, { size: g }) })
|
|
572
573
|
}
|
|
573
574
|
),
|
|
574
|
-
|
|
575
|
-
|
|
575
|
+
v && /* @__PURE__ */ l(
|
|
576
|
+
k,
|
|
576
577
|
{
|
|
577
|
-
size:
|
|
578
|
+
size: u,
|
|
578
579
|
variant: "plain",
|
|
579
580
|
color: "neutral",
|
|
580
|
-
onClick: () =>
|
|
581
|
-
disabled:
|
|
581
|
+
onClick: () => p(e),
|
|
582
|
+
disabled: m || t === e,
|
|
582
583
|
sx: f(),
|
|
583
|
-
children: /* @__PURE__ */
|
|
584
|
+
children: /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l($e, { size: g }) })
|
|
584
585
|
}
|
|
585
586
|
)
|
|
586
587
|
]
|
|
587
588
|
}
|
|
588
589
|
);
|
|
589
|
-
}, $ = "ALL",
|
|
590
|
+
}, $ = "ALL", Z = (e) => ({
|
|
590
591
|
currentPage: e.currentPage,
|
|
591
592
|
totalPages: e.numberOfPages,
|
|
592
593
|
totalItems: e.totalItems,
|
|
593
594
|
itemsPerPage: e.itemsPerPage
|
|
594
|
-
}),
|
|
595
|
+
}), N = (e) => e.map((t) => ({
|
|
595
596
|
position: t.position,
|
|
596
597
|
profileId: t.profileId,
|
|
597
598
|
profileModel: t.profileModel,
|
|
598
599
|
points: t.points
|
|
599
|
-
})),
|
|
600
|
+
})), We = async (e) => {
|
|
600
601
|
try {
|
|
601
602
|
return await e.profile.getOwn().getInfo();
|
|
602
603
|
} catch {
|
|
603
604
|
return null;
|
|
604
605
|
}
|
|
605
|
-
},
|
|
606
|
+
}, oe = async (e, t) => e.length === 0 ? [] : (await t.topX.getGames({ gameIds: e })).data.map((r) => {
|
|
606
607
|
var o;
|
|
607
608
|
return {
|
|
608
609
|
id: r.id,
|
|
@@ -610,7 +611,7 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
610
611
|
description: r.description || null,
|
|
611
612
|
branding: ((o = r.branding) == null ? void 0 : o.colors) || null
|
|
612
613
|
};
|
|
613
|
-
}),
|
|
614
|
+
}), ne = async (e, t) => e.length === 0 ? [] : (await t.matchQuiz.getGames({ gameIds: e })).data.map((r) => {
|
|
614
615
|
var o;
|
|
615
616
|
return {
|
|
616
617
|
id: r.id,
|
|
@@ -618,7 +619,7 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
618
619
|
description: r.description || null,
|
|
619
620
|
branding: ((o = r.branding) == null ? void 0 : o.colors) || null
|
|
620
621
|
};
|
|
621
|
-
}),
|
|
622
|
+
}), ae = async (e, t) => e.length === 0 ? [] : (await t.loyalty.getTemplates()).data.filter((r) => e.includes(r.id)).map((r) => {
|
|
622
623
|
var o;
|
|
623
624
|
return {
|
|
624
625
|
id: r.id,
|
|
@@ -626,7 +627,7 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
626
627
|
description: r.description || null,
|
|
627
628
|
branding: ((o = r.branding) == null ? void 0 : o.colors) || null
|
|
628
629
|
};
|
|
629
|
-
}),
|
|
630
|
+
}), le = async (e, t) => e.length === 0 ? [] : (await t.miniGames.getClassicQuizzes({
|
|
630
631
|
classicQuizIds: e,
|
|
631
632
|
limit: e.length
|
|
632
633
|
})).data.map((r) => {
|
|
@@ -637,20 +638,20 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
637
638
|
description: r.description || null,
|
|
638
639
|
branding: ((o = r.branding) == null ? void 0 : o.colors) || null
|
|
639
640
|
};
|
|
640
|
-
}),
|
|
641
|
+
}), Ge = async (e, t, a, r) => {
|
|
641
642
|
const o = await t.loyalty.getLeaderboardForGame(e, { page: a, limit: r });
|
|
642
643
|
return {
|
|
643
|
-
leaderboard:
|
|
644
|
-
pagination:
|
|
644
|
+
leaderboard: N(o.data),
|
|
645
|
+
pagination: Z(o.meta.pagination)
|
|
645
646
|
};
|
|
646
|
-
},
|
|
647
|
+
}, Xe = async (e, t, a, r) => {
|
|
647
648
|
const o = await t.loyalty.getLeaderboard(
|
|
648
649
|
e,
|
|
649
650
|
{ page: a, limit: r }
|
|
650
651
|
);
|
|
651
652
|
return {
|
|
652
|
-
leaderboard:
|
|
653
|
-
pagination:
|
|
653
|
+
leaderboard: N(o.data),
|
|
654
|
+
pagination: Z(o.meta.pagination)
|
|
654
655
|
};
|
|
655
656
|
}, W = async (e, t, a, r) => {
|
|
656
657
|
const o = await t.miniGames.getLeaderboardForClassicQuizzes({
|
|
@@ -659,13 +660,13 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
659
660
|
limit: r
|
|
660
661
|
});
|
|
661
662
|
return {
|
|
662
|
-
leaderboard:
|
|
663
|
-
pagination:
|
|
663
|
+
leaderboard: N(o.data),
|
|
664
|
+
pagination: Z(o.meta.pagination)
|
|
664
665
|
};
|
|
665
|
-
},
|
|
666
|
+
}, ie = (e, t, a, r) => {
|
|
666
667
|
const o = e.type.toUpperCase();
|
|
667
|
-
return o === "TOP_X" || o === "MATCH_QUIZ" ?
|
|
668
|
-
},
|
|
668
|
+
return o === "TOP_X" || o === "MATCH_QUIZ" ? Ge(e.id, t, a, r) : o === "TEMPLATE" ? Xe(e.id, t, a, r) : W([e.id], t, a, r);
|
|
669
|
+
}, je = async (e, t, a) => {
|
|
669
670
|
const o = a.toUpperCase() === "TEMPLATE" ? { rankType: "TEMPLATE", leaderboardIds: [e] } : { rankType: "GAME", gameType: a.toUpperCase(), leaderboardIds: [e] }, d = (await t.loyalty.getOwnRankings(o, !0)).data[0] ?? null;
|
|
670
671
|
return d ? {
|
|
671
672
|
position: d.position,
|
|
@@ -673,55 +674,55 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
673
674
|
profileModel: d.profileModel,
|
|
674
675
|
points: d.points
|
|
675
676
|
} : null;
|
|
676
|
-
},
|
|
677
|
+
}, Ze = async (e, t, a) => {
|
|
677
678
|
const b = (await t.miniGames.getClassicQuizzesUserRanking(
|
|
678
679
|
a,
|
|
679
680
|
void 0,
|
|
680
681
|
!0
|
|
681
|
-
)).data.find((
|
|
682
|
+
)).data.find((v) => v.classicQuizId === e) ?? null;
|
|
682
683
|
return b ? {
|
|
683
684
|
position: b.position,
|
|
684
685
|
profileId: a,
|
|
685
686
|
profileModel: null,
|
|
686
687
|
points: b.points
|
|
687
688
|
} : null;
|
|
688
|
-
},
|
|
689
|
+
}, Ne = (e, t, a) => {
|
|
689
690
|
const r = e.type.toUpperCase();
|
|
690
|
-
return r === "TOP_X" || r === "MATCH_QUIZ" || r === "TEMPLATE" ?
|
|
691
|
-
},
|
|
692
|
-
const [o, b] = B({}), [
|
|
691
|
+
return r === "TOP_X" || r === "MATCH_QUIZ" || r === "TEMPLATE" ? je(e.id, t, e.type) : Ze(e.id, t, a);
|
|
692
|
+
}, Ve = (e, t, a, r = 10) => {
|
|
693
|
+
const [o, b] = B({}), [v, d] = B(null), [m, c] = B(!1), [C, p] = B(!1), [x, I] = B(
|
|
693
694
|
null
|
|
694
|
-
), [
|
|
695
|
+
), [P, u] = B(null);
|
|
695
696
|
Q(() => {
|
|
696
697
|
const f = {
|
|
697
698
|
topX: e.filter((n) => n.type.toUpperCase() === "TOP_X").map((n) => n.id),
|
|
698
699
|
matchQuiz: e.filter((n) => n.type.toUpperCase() === "MATCH_QUIZ").map((n) => n.id),
|
|
699
700
|
template: e.filter((n) => n.type.toUpperCase() === "TEMPLATE").map((n) => n.id),
|
|
700
701
|
classicQuiz: e.filter((n) => n.type.toUpperCase() === "CLASSIC_QUIZ").map((n) => n.id)
|
|
701
|
-
},
|
|
702
|
+
}, i = (n) => n.catch(() => []);
|
|
702
703
|
Promise.all([
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
704
|
+
i(oe(f.topX, t)),
|
|
705
|
+
i(ne(f.matchQuiz, t)),
|
|
706
|
+
i(ae(f.template, t)),
|
|
707
|
+
i(le(f.classicQuiz, t))
|
|
707
708
|
]).then((n) => {
|
|
708
|
-
const
|
|
709
|
+
const h = {};
|
|
709
710
|
n.flat().forEach((s) => {
|
|
710
|
-
|
|
711
|
-
}), b(
|
|
711
|
+
h[s.id] = s;
|
|
712
|
+
}), b(h);
|
|
712
713
|
});
|
|
713
714
|
}, [e, t]), Q(() => {
|
|
714
|
-
|
|
715
|
+
We(t).then(I);
|
|
715
716
|
}, [t]), Q(() => {
|
|
716
717
|
if (!a || !x) {
|
|
717
|
-
|
|
718
|
+
u(null);
|
|
718
719
|
return;
|
|
719
720
|
}
|
|
720
|
-
let f = !1,
|
|
721
|
+
let f = !1, i;
|
|
721
722
|
if (a === $) {
|
|
722
|
-
const n = e.map((
|
|
723
|
-
|
|
724
|
-
const T =
|
|
723
|
+
const n = e.map((h) => h.id);
|
|
724
|
+
i = t.miniGames.getClassicQuizzesUserRanking(x.id, void 0, !0).then((h) => {
|
|
725
|
+
const T = h.data.find((w) => n.includes(w.classicQuizId)) ?? null;
|
|
725
726
|
return T ? {
|
|
726
727
|
position: T.position,
|
|
727
728
|
profileId: x.id,
|
|
@@ -730,26 +731,26 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
730
731
|
} : null;
|
|
731
732
|
});
|
|
732
733
|
} else {
|
|
733
|
-
const n = e.find((
|
|
734
|
+
const n = e.find((h) => h.id === a);
|
|
734
735
|
if (!n) return;
|
|
735
|
-
|
|
736
|
+
i = Ne(n, t, x.id);
|
|
736
737
|
}
|
|
737
|
-
return
|
|
738
|
-
f ||
|
|
738
|
+
return i.then((n) => {
|
|
739
|
+
f || u(n);
|
|
739
740
|
}).catch(() => {
|
|
740
|
-
f ||
|
|
741
|
+
f || u(null);
|
|
741
742
|
}), () => {
|
|
742
743
|
f = !0;
|
|
743
744
|
};
|
|
744
745
|
}, [a, e, t, x]), Q(() => {
|
|
745
746
|
if (!a) return;
|
|
746
747
|
let f = !1;
|
|
747
|
-
return
|
|
748
|
+
return c(!0), p(!1), d(null), (async () => {
|
|
748
749
|
try {
|
|
749
|
-
const n = e.length > 1 && e.every((
|
|
750
|
+
const n = e.length > 1 && e.every((y) => y.type.toUpperCase() === "CLASSIC_QUIZ");
|
|
750
751
|
if (a === $ && n) {
|
|
751
|
-
const
|
|
752
|
-
|
|
752
|
+
const y = e.map((M) => M.id), A = await W(
|
|
753
|
+
y,
|
|
753
754
|
t,
|
|
754
755
|
1,
|
|
755
756
|
r
|
|
@@ -763,59 +764,59 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
763
764
|
});
|
|
764
765
|
return;
|
|
765
766
|
}
|
|
766
|
-
const
|
|
767
|
-
if (!
|
|
768
|
-
const s =
|
|
769
|
-
|
|
767
|
+
const h = e.find((y) => y.id === a);
|
|
768
|
+
if (!h) return;
|
|
769
|
+
const s = h.type.toUpperCase(), T = s === "TOP_X" ? oe([a], t) : s === "MATCH_QUIZ" ? ne([a], t) : s === "TEMPLATE" ? ae([a], t) : le([a], t), [w, F] = await Promise.all([
|
|
770
|
+
ie(h, t, 1, r),
|
|
770
771
|
T.catch(() => [])
|
|
771
772
|
]);
|
|
772
773
|
if (!f) {
|
|
773
|
-
const
|
|
774
|
+
const y = F[0];
|
|
774
775
|
d({
|
|
775
776
|
id: a,
|
|
776
|
-
title: (
|
|
777
|
-
description: (
|
|
778
|
-
branding: (
|
|
779
|
-
...
|
|
777
|
+
title: (y == null ? void 0 : y.title) || a,
|
|
778
|
+
description: (y == null ? void 0 : y.description) || null,
|
|
779
|
+
branding: (y == null ? void 0 : y.branding) || null,
|
|
780
|
+
...w
|
|
780
781
|
});
|
|
781
782
|
}
|
|
782
783
|
} catch (n) {
|
|
783
|
-
console.error("Failed to fetch leaderboard:", n), f ||
|
|
784
|
+
console.error("Failed to fetch leaderboard:", n), f || p(!0);
|
|
784
785
|
} finally {
|
|
785
|
-
f ||
|
|
786
|
+
f || c(!1);
|
|
786
787
|
}
|
|
787
788
|
})(), () => {
|
|
788
789
|
f = !0;
|
|
789
790
|
};
|
|
790
791
|
}, [a, e, t, r]);
|
|
791
|
-
const
|
|
792
|
+
const g = me(
|
|
792
793
|
async (f) => {
|
|
793
794
|
if (a) {
|
|
794
|
-
|
|
795
|
+
c(!0);
|
|
795
796
|
try {
|
|
796
|
-
let
|
|
797
|
+
let i;
|
|
797
798
|
if (a === $) {
|
|
798
|
-
const n = e.map((
|
|
799
|
-
|
|
799
|
+
const n = e.map((h) => h.id);
|
|
800
|
+
i = await W(n, t, f, r);
|
|
800
801
|
} else {
|
|
801
|
-
const n = e.find((
|
|
802
|
+
const n = e.find((h) => h.id === a);
|
|
802
803
|
if (!n) return;
|
|
803
|
-
|
|
804
|
+
i = await ie(n, t, f, r);
|
|
804
805
|
}
|
|
805
|
-
d((n) => n ? { ...n, ...
|
|
806
|
-
} catch (
|
|
807
|
-
console.error("Failed to fetch page:",
|
|
806
|
+
d((n) => n ? { ...n, ...i } : null);
|
|
807
|
+
} catch (i) {
|
|
808
|
+
console.error("Failed to fetch page:", i);
|
|
808
809
|
} finally {
|
|
809
|
-
|
|
810
|
+
c(!1);
|
|
810
811
|
}
|
|
811
812
|
}
|
|
812
813
|
},
|
|
813
814
|
[a, e, t, r]
|
|
814
|
-
),
|
|
815
|
-
Object.entries(o).map(([f,
|
|
815
|
+
), S = Object.fromEntries(
|
|
816
|
+
Object.entries(o).map(([f, i]) => [f, i.title])
|
|
816
817
|
);
|
|
817
|
-
return { data:
|
|
818
|
-
},
|
|
818
|
+
return { data: v, entityTitles: S, loading: m, error: C, setPage: g, userRank: P };
|
|
819
|
+
}, D = "ALL", se = ["TOP_X", "MATCH_QUIZ", "TEMPLATE", "CLASSIC_QUIZ"], Ye = (e, t) => {
|
|
819
820
|
if (!Array.isArray(e) || e.length === 0)
|
|
820
821
|
return "The 'entities' setting is required and must be a non-empty array.";
|
|
821
822
|
const a = /* @__PURE__ */ new Set();
|
|
@@ -829,11 +830,11 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
829
830
|
return `Duplicate entity id '${o.id}' found at index ${r}. Each entity must have a unique id.`;
|
|
830
831
|
if (a.add(o.id), !o.type || typeof o.type != "string")
|
|
831
832
|
return `Entity at index ${r} is missing a required 'type' string field.`;
|
|
832
|
-
if (!
|
|
833
|
-
return `Entity at index ${r} has an invalid type '${o.type}'. Valid values are: ${
|
|
833
|
+
if (!se.includes(o.type.toUpperCase()))
|
|
834
|
+
return `Entity at index ${r} has an invalid type '${o.type}'. Valid values are: ${se.join(", ")} (case-insensitive).`;
|
|
834
835
|
}
|
|
835
836
|
return t !== void 0 && (typeof t != "number" || !Number.isInteger(t) || t < 1 || t > 50) ? "The 'pageSize' setting must be an integer between 1 and 50." : null;
|
|
836
|
-
},
|
|
837
|
+
}, Ke = ({
|
|
837
838
|
entities: e,
|
|
838
839
|
sdk: t,
|
|
839
840
|
pageSize: a,
|
|
@@ -841,134 +842,143 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
|
|
|
841
842
|
showOverallOnly: o = !1,
|
|
842
843
|
showHeading: b = !0
|
|
843
844
|
}) => {
|
|
844
|
-
var
|
|
845
|
-
const { t:
|
|
846
|
-
() =>
|
|
845
|
+
var y;
|
|
846
|
+
const { t: v } = G(), d = j(), m = X().surface, c = _(
|
|
847
|
+
() => Ye(e, a),
|
|
847
848
|
[e, a]
|
|
848
|
-
),
|
|
849
|
-
() => !
|
|
850
|
-
[e,
|
|
851
|
-
),
|
|
849
|
+
), C = _(
|
|
850
|
+
() => !c && e.length > 1 && e.every((A) => A.type.toUpperCase() === "CLASSIC_QUIZ"),
|
|
851
|
+
[e, c]
|
|
852
|
+
), p = o && C, x = C ? D : ((y = e[0]) == null ? void 0 : y.id) || "", [I, P] = B(x);
|
|
852
853
|
Q(() => {
|
|
853
|
-
|
|
854
|
+
I === D || e.some((M) => M.id === I) || P(x);
|
|
854
855
|
}, [e]);
|
|
855
|
-
const { data:
|
|
856
|
-
|
|
856
|
+
const { data: u, entityTitles: g, loading: S, error: f, setPage: i, userRank: n } = Ve(
|
|
857
|
+
c ? [] : e,
|
|
857
858
|
t,
|
|
858
|
-
|
|
859
|
+
c ? "" : I,
|
|
859
860
|
a
|
|
860
|
-
),
|
|
861
|
-
if (
|
|
861
|
+
), h = _(() => {
|
|
862
|
+
if (c) return [];
|
|
862
863
|
const A = [];
|
|
863
|
-
return
|
|
864
|
+
return C && A.push({ id: D, label: v("leaderboard.overall") }), e.forEach((M) => {
|
|
864
865
|
A.push({
|
|
865
|
-
id:
|
|
866
|
-
label:
|
|
867
|
-
type:
|
|
866
|
+
id: M.id,
|
|
867
|
+
label: g[M.id] ?? "",
|
|
868
|
+
type: M.type.toUpperCase()
|
|
868
869
|
});
|
|
869
870
|
}), A;
|
|
870
|
-
}, [e,
|
|
871
|
-
return
|
|
871
|
+
}, [e, C, v, g, c]), s = e.every((A) => g[A.id] !== void 0), T = !c && !p && (e.length > 1 || C) && s, w = (u == null ? void 0 : u.pagination) || null, F = I === D ? v("leaderboard.overall") : (u == null ? void 0 : u.title) || null;
|
|
872
|
+
return c ? /* @__PURE__ */ l(
|
|
872
873
|
J,
|
|
873
874
|
{
|
|
874
875
|
variant: "error",
|
|
875
876
|
title: "Configuration Error",
|
|
876
|
-
message:
|
|
877
|
+
message: c
|
|
877
878
|
}
|
|
878
|
-
) : f ? /* @__PURE__ */
|
|
879
|
+
) : f ? /* @__PURE__ */ l(
|
|
879
880
|
J,
|
|
880
881
|
{
|
|
881
882
|
variant: "error",
|
|
882
883
|
title: "Failed to Load Leaderboard",
|
|
883
884
|
message: "One or more entity IDs could not be found. Please verify the provided IDs and try again."
|
|
884
885
|
}
|
|
885
|
-
) : /* @__PURE__ */
|
|
886
|
+
) : /* @__PURE__ */ E(
|
|
886
887
|
L,
|
|
887
888
|
{
|
|
888
889
|
sx: {
|
|
889
890
|
display: "flex",
|
|
890
891
|
flexDirection: "column",
|
|
891
892
|
gap: d.md,
|
|
892
|
-
backgroundColor:
|
|
893
|
+
backgroundColor: m,
|
|
893
894
|
padding: d.md
|
|
894
895
|
},
|
|
895
896
|
children: [
|
|
896
|
-
T && /* @__PURE__ */
|
|
897
|
-
|
|
897
|
+
T && /* @__PURE__ */ l(
|
|
898
|
+
De,
|
|
898
899
|
{
|
|
899
|
-
options:
|
|
900
|
-
selectedId:
|
|
901
|
-
onChange:
|
|
900
|
+
options: h,
|
|
901
|
+
selectedId: I,
|
|
902
|
+
onChange: P
|
|
902
903
|
}
|
|
903
904
|
),
|
|
904
|
-
/* @__PURE__ */
|
|
905
|
-
|
|
905
|
+
/* @__PURE__ */ l(
|
|
906
|
+
_e,
|
|
906
907
|
{
|
|
907
|
-
leaderboard:
|
|
908
|
-
userRank:
|
|
908
|
+
leaderboard: S ? null : (u == null ? void 0 : u.leaderboard) || null,
|
|
909
|
+
userRank: S ? null : n,
|
|
909
910
|
showHeading: b && !T,
|
|
910
911
|
title: F,
|
|
911
|
-
description: (
|
|
912
|
-
brandingColors: (
|
|
912
|
+
description: (u == null ? void 0 : u.description) || null,
|
|
913
|
+
brandingColors: (u == null ? void 0 : u.branding) || null,
|
|
913
914
|
rankStyles: r
|
|
914
915
|
}
|
|
915
916
|
),
|
|
916
|
-
!
|
|
917
|
-
|
|
917
|
+
!S && w && w.totalPages > 1 && /* @__PURE__ */ l(
|
|
918
|
+
Oe,
|
|
918
919
|
{
|
|
919
|
-
count:
|
|
920
|
-
page:
|
|
921
|
-
onChange:
|
|
920
|
+
count: w.totalPages,
|
|
921
|
+
page: w.currentPage,
|
|
922
|
+
onChange: i
|
|
922
923
|
}
|
|
923
924
|
)
|
|
924
925
|
]
|
|
925
926
|
}
|
|
926
927
|
);
|
|
927
|
-
},
|
|
928
|
-
var
|
|
929
|
-
const [t, a] =
|
|
928
|
+
}, qe = (e) => {
|
|
929
|
+
var P;
|
|
930
|
+
const [t, a] = z.useState(!1), [r, o] = z.useState(!1), b = ye(e.language), v = z.useRef(
|
|
930
931
|
`leaderboard-shadow-root-${Math.random().toString(36).substring(2, 11)}`
|
|
931
|
-
),
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
}, [e.language]),
|
|
935
|
-
if (
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
932
|
+
), d = z.useRef(null), m = z.useRef(null), c = z.useRef(null), [C, p] = z.useState(null);
|
|
933
|
+
z.useEffect(() => {
|
|
934
|
+
xe(e.language || "en").finally(() => o(!0));
|
|
935
|
+
}, [e.language]), z.useEffect(() => {
|
|
936
|
+
if (!d.current) return;
|
|
937
|
+
d.current.shadowRoot ? (m.current = d.current.shadowRoot, c.current = m.current.getElementById(
|
|
938
|
+
v.current
|
|
939
|
+
), c.current || (c.current = document.createElement("div"), c.current.id = v.current, m.current.appendChild(c.current))) : (m.current = d.current.attachShadow({ mode: "open" }), c.current = document.createElement("div"), c.current.id = v.current, m.current.appendChild(c.current)), Ce(c.current, b);
|
|
940
|
+
const u = Ee("leaderboard", b);
|
|
941
|
+
return p(
|
|
942
|
+
(g) => (g == null ? void 0 : g.key) === u ? g : ve(
|
|
943
|
+
"leaderboard",
|
|
944
|
+
m.current,
|
|
945
|
+
b
|
|
946
|
+
)
|
|
947
|
+
), a(!0), () => {
|
|
948
|
+
a(!1);
|
|
949
|
+
};
|
|
950
|
+
}, [b]);
|
|
951
|
+
const x = /* @__PURE__ */ l(L, { ref: d }), I = t && r && c.current && C ? Ie(
|
|
952
|
+
// Keyed on the cache, not on `direction`: it must change in the same
|
|
953
|
+
// render that adopts the new cache, or CssVarsProvider writes its CSS
|
|
954
|
+
// variables into the outgoing cache and never repeats.
|
|
955
|
+
/* @__PURE__ */ l(Te, { value: C, children: /* @__PURE__ */ l(Pe, { containerRef: d, children: /* @__PURE__ */ l(
|
|
956
|
+
Se,
|
|
949
957
|
{
|
|
950
958
|
customTheme: e.themeOptions,
|
|
951
|
-
mode: (
|
|
959
|
+
mode: (P = e.themeOptions) == null ? void 0 : P.mode,
|
|
952
960
|
shadowRootElement: c.current,
|
|
953
|
-
|
|
954
|
-
|
|
961
|
+
direction: b,
|
|
962
|
+
children: /* @__PURE__ */ l(
|
|
963
|
+
we,
|
|
955
964
|
{
|
|
956
965
|
shadowRootElement: c.current,
|
|
957
966
|
leadPhoneCountryCode: null,
|
|
958
967
|
language: e.language,
|
|
959
968
|
optionsLayout: null,
|
|
969
|
+
direction: b,
|
|
960
970
|
children: e.children
|
|
961
971
|
}
|
|
962
972
|
)
|
|
963
973
|
}
|
|
964
|
-
) }) }),
|
|
974
|
+
) }) }, C.key),
|
|
965
975
|
c.current
|
|
966
976
|
) : null;
|
|
967
|
-
return /* @__PURE__ */
|
|
968
|
-
|
|
969
|
-
|
|
977
|
+
return /* @__PURE__ */ E(ce, { children: [
|
|
978
|
+
x,
|
|
979
|
+
I
|
|
970
980
|
] });
|
|
971
|
-
},
|
|
981
|
+
}, Je = (e) => /* @__PURE__ */ l(qe, { ...e, children: /* @__PURE__ */ l(Ke, { ...e }) }), yt = Je;
|
|
972
982
|
export {
|
|
973
|
-
|
|
983
|
+
yt as Leaderboard
|
|
974
984
|
};
|