fansunited-frontend-components 0.0.98 → 0.0.99
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 +2 -2
- package/ChanceGame.js +958 -1464
- package/ClassicQuizPlay.js +2 -2
- package/CollectLead.js +1 -1
- package/CompetitionStatistics.js +2042 -2215
- package/CompetitorCard.js +4225 -5079
- package/Discussion.js +2 -2
- package/EitherOrPlay.js +2 -2
- package/EventCard.js +6010 -7547
- package/EventGamePlay.js +2 -2
- package/Leaderboard.js +546 -849
- package/List.js +227 -218
- package/MatchQuizPlay.js +2 -2
- package/Odds.js +50 -42
- package/PersonalityQuizPlay.js +2 -2
- package/PickThePair.js +2 -2
- package/PlayerOfTheMatch.js +285 -269
- package/PollVote.js +2 -2
- package/Predictor.js +80 -127
- package/README.md +1 -1
- package/Standings.js +991 -1324
- package/TopX.js +1120 -1167
- package/chunks/{ChanceGameEmbedVariant-CVys-3Zh.js → ChanceGameEmbedVariant-DM9eLG5s.js} +2 -2
- package/chunks/CheckCircle-I1FktW5Y.js +13 -0
- package/chunks/OddsSkeleton-DP5Yfqpr.js +522 -0
- package/chunks/Person-CXRqyF4E.js +11 -0
- package/chunks/PickOneOfX-DET4ZhjV.js +3117 -0
- package/chunks/Search-CIXthh0D.js +17 -0
- package/chunks/TimerOutlined-D-WA_vpE.js +8 -0
- package/chunks/WorkspacePremiumOutlined-DUXVgJlF.js +136 -0
- package/chunks/{chevrons-right-CXSpQt9w.js → chevrons-right-HWKW2c4I.js} +24 -4
- package/chunks/index-BENM3N_w.js +4 -0
- package/chunks/index-BRxAV693.js +4 -0
- package/chunks/index-BXYTsvIX.js +4 -0
- package/chunks/index-C0ilols1.js +4 -0
- package/chunks/index-D7VhczXH.js +4 -0
- package/chunks/index-DKwvdw9t.js +4 -0
- package/chunks/index-DZN-AITW.js +4 -0
- package/chunks/main-B2sDRFF4.js +2184 -0
- package/chunks/main-CzfWaEQP.js +4869 -0
- package/chunks/main-DFNl3g_U.js +4910 -0
- package/chunks/{main-65WcUqAl.js → main-DLwnvntz.js} +600 -593
- package/chunks/main-DiBlJBNb.js +1956 -0
- package/chunks/main-DxvBjXsd.js +1775 -0
- package/chunks/main-S8_NDSiY.js +3209 -0
- package/chunks/main-lBgr8Liq.js +6571 -0
- package/chunks/{withVersionStamp-T8seRk9h.js → withVersionStamp-BsLyhvNA.js} +1 -1
- package/package.json +2 -2
- package/chunks/OddsSkeleton-ClJE2xhR.js +0 -26
- package/chunks/OddsStrip-BnSp5TXa.js +0 -383
- package/chunks/PickOneOfX-DaJtkbCw.js +0 -4206
- package/chunks/chevron-left-CxfCSZcr.js +0 -13
- package/chunks/chevron-right-BEQMacFn.js +0 -13
- package/chunks/index-Aq5MbUB9.js +0 -4
- package/chunks/index-BBQm_8LD.js +0 -4
- package/chunks/index-BC_sWWgc.js +0 -4
- package/chunks/index-DXKDJ1Vp.js +0 -4
- package/chunks/index-DjT5NrbA.js +0 -4
- package/chunks/index-DvLRehH6.js +0 -4
- package/chunks/index-aIMaxR-p.js +0 -4
- package/chunks/main-52Wff7qC.js +0 -11441
- package/chunks/main-B58mi9jx.js +0 -5622
- package/chunks/main-BIdXUTZS.js +0 -7308
- package/chunks/main-DD-NEzC7.js +0 -8241
- package/chunks/main-DUnfJPzY.js +0 -3608
- package/chunks/main-DpCBqqg_.js +0 -1950
- package/chunks/main-Drznt1ak.js +0 -1790
- package/chunks/users-wbJRbqW8.js +0 -16
- package/chunks/x-CK4GYo7T.js +0 -14
package/PlayerOfTheMatch.js
CHANGED
|
@@ -1,14 +1,30 @@
|
|
|
1
1
|
import { jsx as t, jsxs as v, Fragment as pe } from "react/jsx-runtime";
|
|
2
|
-
import { hexToRgb as J, useColors as
|
|
3
|
-
import { Link as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { useRef as fe, useEffect as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import fo from "
|
|
10
|
-
import { w as xo } from "./chunks/withVersionStamp-
|
|
11
|
-
const
|
|
2
|
+
import { hexToRgb as J, useColors as Qe, useFontFamily as Je, useCornerRadius as Ze, useSpacingScale as qe, useBorderSize as eo, DirectionalIcon as De, cdnAssets as W, onImageError as Ne, FallbackAvatar as G, Notification as oo, extractSdkError as ge, useDisableCache as to, Spinner as ro, Portal as no } from "fansunited-frontend-core";
|
|
3
|
+
import { Link as io, Box as x, IconButton as ve, Typography as h, Card as Ce, CardContent as so, CardActions as ao, Button as q, Input as lo, Chip as he, Stack as Y, Sheet as co } from "@mui/joy";
|
|
4
|
+
import { useTranslation as B } from "react-i18next";
|
|
5
|
+
import { useRef as fe, useEffect as H, useState as T, useMemo as se } from "react";
|
|
6
|
+
import { C as mo, a as uo, S as go, b as po } from "./chunks/Search-CIXthh0D.js";
|
|
7
|
+
import { c as ho } from "./chunks/createLucideIcon-YBRjY5Kl.js";
|
|
8
|
+
import { createSvgIcon as Pe } from "@mui/material";
|
|
9
|
+
import { A as He, C as fo } from "./chunks/CheckCircle-I1FktW5Y.js";
|
|
10
|
+
import { w as xo } from "./chunks/withVersionStamp-BsLyhvNA.js";
|
|
11
|
+
const Me = Pe(/* @__PURE__ */ t("path", {
|
|
12
|
+
d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61"
|
|
13
|
+
}), "FilterAlt"), bo = Pe(/* @__PURE__ */ t("path", {
|
|
14
|
+
d: "M18 13h-.68l-2 2h1.91L19 17H5l1.78-2h2.05l-2-2H6l-3 3v4c0 1.1.89 2 1.99 2H19c1.1 0 2-.89 2-2v-4zm-1-5.05-4.95 4.95-3.54-3.54 4.95-4.95zm-4.24-5.66L6.39 8.66c-.39.39-.39 1.02 0 1.41l4.95 4.95c.39.39 1.02.39 1.41 0l6.36-6.36c.39-.39.39-1.02 0-1.41L14.16 2.3c-.38-.4-1.01-.4-1.4-.01"
|
|
15
|
+
}), "HowToVote"), ae = Pe(/* @__PURE__ */ t("path", {
|
|
16
|
+
d: "M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"
|
|
17
|
+
}), "Star");
|
|
18
|
+
/**
|
|
19
|
+
* @license lucide-react v0.454.0 - ISC
|
|
20
|
+
*
|
|
21
|
+
* This source code is licensed under the ISC license.
|
|
22
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
23
|
+
*/
|
|
24
|
+
const So = ho("X", [
|
|
25
|
+
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
26
|
+
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
27
|
+
]), wo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "150px" }) => {
|
|
12
28
|
const s = /* @__PURE__ */ v(
|
|
13
29
|
x,
|
|
14
30
|
{
|
|
@@ -66,7 +82,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
66
82
|
}
|
|
67
83
|
);
|
|
68
84
|
return o ? /* @__PURE__ */ t(
|
|
69
|
-
|
|
85
|
+
io,
|
|
70
86
|
{
|
|
71
87
|
href: o,
|
|
72
88
|
target: "_blank",
|
|
@@ -81,7 +97,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
81
97
|
children: s
|
|
82
98
|
}
|
|
83
99
|
) : s;
|
|
84
|
-
},
|
|
100
|
+
}, yo = (e) => ({
|
|
85
101
|
width: "100%",
|
|
86
102
|
// Take full width of parent container
|
|
87
103
|
maxWidth: "100%",
|
|
@@ -98,7 +114,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
98
114
|
// Include padding and border in width calculation
|
|
99
115
|
fontSize: "1em"
|
|
100
116
|
// Anchor the em cascade for all descendants (Shadow DOM rem safety)
|
|
101
|
-
}), Be = { xs: "24.5em", sm: "24.5em" },
|
|
117
|
+
}), Be = { xs: "24.5em", sm: "24.5em" }, vo = {
|
|
102
118
|
position: "relative",
|
|
103
119
|
height: Be,
|
|
104
120
|
overflow: "visible",
|
|
@@ -113,19 +129,19 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
113
129
|
"&:active": {
|
|
114
130
|
cursor: "grabbing"
|
|
115
131
|
}
|
|
116
|
-
},
|
|
132
|
+
}, zo = {
|
|
117
133
|
position: "relative",
|
|
118
134
|
height: "100%",
|
|
119
135
|
// Full height: nothing is positioned inside this box any more
|
|
120
136
|
display: "flex",
|
|
121
137
|
alignItems: "center",
|
|
122
138
|
justifyContent: "center"
|
|
123
|
-
},
|
|
139
|
+
}, Co = (e) => ({
|
|
124
140
|
color: e.colors.tertiary,
|
|
125
141
|
mb: e.spacing.xl,
|
|
126
142
|
fontSize: "0.875em"
|
|
127
143
|
// body-sm
|
|
128
|
-
}),
|
|
144
|
+
}), Po = (e, o) => {
|
|
129
145
|
const r = e - o, n = 1 - Math.min(0.25, Math.abs(r) * 0.15), s = r * 55, l = 20 - Math.abs(r);
|
|
130
146
|
return {
|
|
131
147
|
transform: `translateX(${s}%) scale(${n})`,
|
|
@@ -133,7 +149,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
133
149
|
opacity: 1
|
|
134
150
|
// Full opacity for all cards
|
|
135
151
|
};
|
|
136
|
-
},
|
|
152
|
+
}, To = (e, o) => ({
|
|
137
153
|
position: "absolute",
|
|
138
154
|
top: 0,
|
|
139
155
|
left: 0,
|
|
@@ -166,7 +182,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
166
182
|
boxShadow: `0 0 0 ${o.border.size} ${o.colors.primary}`
|
|
167
183
|
},
|
|
168
184
|
bgcolor: o.colors.surface
|
|
169
|
-
}),
|
|
185
|
+
}), _o = (e) => ({
|
|
170
186
|
position: "absolute",
|
|
171
187
|
top: "0.625em",
|
|
172
188
|
left: "0.625em",
|
|
@@ -175,7 +191,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
175
191
|
alignItems: "center",
|
|
176
192
|
gap: e.spacing["2xs"],
|
|
177
193
|
zIndex: 2
|
|
178
|
-
}),
|
|
194
|
+
}), Do = (e) => ({
|
|
179
195
|
bgcolor: e.colors.primary,
|
|
180
196
|
color: e.colors.onPrimary,
|
|
181
197
|
width: "1.875em",
|
|
@@ -185,13 +201,13 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
185
201
|
justifyContent: "center",
|
|
186
202
|
alignItems: "center",
|
|
187
203
|
display: "flex"
|
|
188
|
-
}),
|
|
204
|
+
}), Mo = {
|
|
189
205
|
width: "1.5em",
|
|
190
206
|
height: "1.25em",
|
|
191
207
|
position: "absolute",
|
|
192
208
|
top: "0.625em",
|
|
193
209
|
right: "0.625em"
|
|
194
|
-
},
|
|
210
|
+
}, ko = {
|
|
195
211
|
display: "flex",
|
|
196
212
|
flexDirection: "column",
|
|
197
213
|
alignItems: "center",
|
|
@@ -204,7 +220,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
204
220
|
// Let the text children actually shrink so ellipsis can kick in
|
|
205
221
|
overflow: "hidden"
|
|
206
222
|
// Clip instead of forcing the fixed-height card to grow
|
|
207
|
-
},
|
|
223
|
+
}, ke = (e, o) => ({
|
|
208
224
|
fontSize: "0.875em",
|
|
209
225
|
// body-sm
|
|
210
226
|
color: e,
|
|
@@ -218,7 +234,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
218
234
|
mb: o.spacing.xs,
|
|
219
235
|
minHeight: "1.25em",
|
|
220
236
|
flexShrink: 0
|
|
221
|
-
}),
|
|
237
|
+
}), Ro = (e) => ({
|
|
222
238
|
width: "6em",
|
|
223
239
|
height: "6em",
|
|
224
240
|
flexShrink: 0,
|
|
@@ -226,7 +242,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
226
242
|
border: `${e.border.size} solid`,
|
|
227
243
|
borderColor: e.colors.primary,
|
|
228
244
|
bgcolor: e.colors.surface
|
|
229
|
-
}),
|
|
245
|
+
}), $o = {
|
|
230
246
|
display: "flex",
|
|
231
247
|
flexDirection: "row",
|
|
232
248
|
justifyContent: "center",
|
|
@@ -234,7 +250,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
234
250
|
width: "100%",
|
|
235
251
|
maxWidth: "100%",
|
|
236
252
|
gap: { xs: "0.25em", sm: "0.5em" }
|
|
237
|
-
},
|
|
253
|
+
}, Io = (e, o) => {
|
|
238
254
|
const r = J(e.colors.primary);
|
|
239
255
|
return {
|
|
240
256
|
display: "flex",
|
|
@@ -283,7 +299,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
283
299
|
zIndex: 3
|
|
284
300
|
}
|
|
285
301
|
};
|
|
286
|
-
},
|
|
302
|
+
}, Vo = (e) => ({
|
|
287
303
|
position: "absolute",
|
|
288
304
|
top: "50%",
|
|
289
305
|
transform: "translateY(-50%)",
|
|
@@ -312,7 +328,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
312
328
|
// Ensure good touch target size on mobile
|
|
313
329
|
minWidth: { xs: "2.75em", sm: "3em" },
|
|
314
330
|
minHeight: { xs: "2.75em", sm: "3em" }
|
|
315
|
-
}),
|
|
331
|
+
}), Eo = (e) => {
|
|
316
332
|
const o = J(e.colors.primary);
|
|
317
333
|
return {
|
|
318
334
|
textAlign: "center",
|
|
@@ -329,7 +345,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
329
345
|
background: `linear-gradient(135deg, rgba(${o}, 0.1) 0%, rgba(255, 255, 255, 0) 50%, rgba(${o}, 0.08) 100%)`,
|
|
330
346
|
zIndex: 1
|
|
331
347
|
};
|
|
332
|
-
},
|
|
348
|
+
}, Wo = (e) => {
|
|
333
349
|
const o = J(e.colors.primary);
|
|
334
350
|
return {
|
|
335
351
|
position: "absolute",
|
|
@@ -345,7 +361,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
345
361
|
backgroundSize: "1.875em 1.875em",
|
|
346
362
|
zIndex: 2
|
|
347
363
|
};
|
|
348
|
-
},
|
|
364
|
+
}, Lo = (e) => {
|
|
349
365
|
const o = J(e.colors.primary);
|
|
350
366
|
return {
|
|
351
367
|
position: "absolute",
|
|
@@ -361,20 +377,20 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
361
377
|
backgroundSize: "3.75em 3.75em",
|
|
362
378
|
zIndex: 3
|
|
363
379
|
};
|
|
364
|
-
},
|
|
380
|
+
}, No = (e) => ({
|
|
365
381
|
mb: e.spacing.sm,
|
|
366
382
|
fontWeight: 300,
|
|
367
383
|
letterSpacing: "0.02em",
|
|
368
384
|
color: e.colors.primary,
|
|
369
385
|
fontSize: "1.5em"
|
|
370
386
|
// h3
|
|
371
|
-
}),
|
|
387
|
+
}), Ho = (e) => ({
|
|
372
388
|
mb: e.spacing.xl,
|
|
373
389
|
maxWidth: "31.25em",
|
|
374
390
|
color: e.colors.dim,
|
|
375
391
|
fontSize: "1em"
|
|
376
392
|
// body-md
|
|
377
|
-
}),
|
|
393
|
+
}), Bo = (e) => ({
|
|
378
394
|
maxWidth: "28.75em",
|
|
379
395
|
width: "90%",
|
|
380
396
|
borderRadius: e.radius.lg,
|
|
@@ -388,34 +404,34 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
388
404
|
fontSize: "1em",
|
|
389
405
|
// Anchor the em cascade for the countdown content
|
|
390
406
|
background: e.colors.surface
|
|
391
|
-
}),
|
|
407
|
+
}), jo = {
|
|
392
408
|
position: "absolute",
|
|
393
409
|
left: { xs: 0, sm: "0.5em" },
|
|
394
410
|
color: "neutral.400",
|
|
395
411
|
fontSize: "1.25em"
|
|
396
|
-
},
|
|
412
|
+
}, Fo = {
|
|
397
413
|
justifyContent: "center",
|
|
398
414
|
width: "100%"
|
|
399
|
-
},
|
|
415
|
+
}, Uo = (e) => ({
|
|
400
416
|
color: e.colors.text,
|
|
401
417
|
fontVariantNumeric: "tabular-nums",
|
|
402
418
|
fontWeight: 600,
|
|
403
419
|
fontSize: "1.25em"
|
|
404
420
|
// h4
|
|
405
|
-
}),
|
|
421
|
+
}), Ao = (e) => ({
|
|
406
422
|
color: e.colors.dim,
|
|
407
423
|
fontSize: "0.7em",
|
|
408
424
|
textTransform: "uppercase",
|
|
409
425
|
letterSpacing: "0.05em",
|
|
410
426
|
mt: "0.25em"
|
|
411
|
-
}),
|
|
427
|
+
}), Oo = {
|
|
412
428
|
alignSelf: "flex-start",
|
|
413
429
|
mt: "0.25em",
|
|
414
430
|
color: "neutral.300",
|
|
415
431
|
fontWeight: 300,
|
|
416
432
|
fontSize: "1.25em"
|
|
417
433
|
// h4
|
|
418
|
-
},
|
|
434
|
+
}, Xo = (e, o, r, n, s, l) => {
|
|
419
435
|
const m = () => e ? "linear-gradient(135deg,rgb(213, 169, 133),rgb(255, 167, 3))" : o ? "linear-gradient(135deg, #C0C0C0, #A9A9A9)" : r ? "linear-gradient(135deg, #CD7F32, #8B4513)" : "none", w = () => e ? { xs: 1, sm: 1.01 } : o ? { xs: 1, sm: 0.95 } : { xs: 1, sm: 0.95 };
|
|
420
436
|
return {
|
|
421
437
|
width: { xs: "auto", sm: "30%" },
|
|
@@ -457,7 +473,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
457
473
|
sm: e ? s !== void 0 ? s : 0 : o ? -1 : 1
|
|
458
474
|
}
|
|
459
475
|
};
|
|
460
|
-
},
|
|
476
|
+
}, Go = (e, o) => ({
|
|
461
477
|
position: "absolute",
|
|
462
478
|
top: "-0.9375em",
|
|
463
479
|
left: "50%",
|
|
@@ -472,19 +488,19 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
472
488
|
boxShadow: "0 0.125em 0.5em rgba(0,0,0,0.2)",
|
|
473
489
|
zIndex: 10,
|
|
474
490
|
fontSize: e ? "1.2em" : "1em"
|
|
475
|
-
}),
|
|
491
|
+
}), Yo = {
|
|
476
492
|
width: "1.875em",
|
|
477
493
|
height: "1.875em",
|
|
478
494
|
position: "absolute",
|
|
479
495
|
top: "0.625em",
|
|
480
496
|
right: "0.625em"
|
|
481
|
-
},
|
|
497
|
+
}, Ko = (e, o) => ({
|
|
482
498
|
width: e ? "6.875em" : "6.25em",
|
|
483
499
|
height: e ? "6.875em" : "6.25em",
|
|
484
500
|
my: o.spacing.md,
|
|
485
501
|
border: `${o.border.size} solid`,
|
|
486
502
|
borderColor: e ? o.colors.warning : "neutral.300"
|
|
487
|
-
}),
|
|
503
|
+
}), Qo = (e, o) => ({
|
|
488
504
|
width: "80%",
|
|
489
505
|
mx: "auto",
|
|
490
506
|
height: "0.5em",
|
|
@@ -492,7 +508,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
492
508
|
borderRadius: "0.25em",
|
|
493
509
|
overflow: "hidden",
|
|
494
510
|
position: "relative"
|
|
495
|
-
}),
|
|
511
|
+
}), Jo = (e, o, r) => ({
|
|
496
512
|
position: "absolute",
|
|
497
513
|
top: 0,
|
|
498
514
|
left: 0,
|
|
@@ -501,7 +517,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
501
517
|
bgcolor: e ? r.colors.warning : "neutral.400",
|
|
502
518
|
borderRadius: "0.25em",
|
|
503
519
|
transition: "width 1s ease-in-out"
|
|
504
|
-
}),
|
|
520
|
+
}), Zo = (e) => ({
|
|
505
521
|
display: "flex",
|
|
506
522
|
flexDirection: "column",
|
|
507
523
|
alignItems: "center",
|
|
@@ -509,12 +525,12 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
509
525
|
width: "100%",
|
|
510
526
|
fontSize: "1em"
|
|
511
527
|
// Anchor the em cascade for the controls
|
|
512
|
-
}),
|
|
528
|
+
}), qo = () => ({
|
|
513
529
|
width: "100%",
|
|
514
530
|
maxWidth: "24em",
|
|
515
531
|
mx: "auto",
|
|
516
532
|
minWidth: 0
|
|
517
|
-
}),
|
|
533
|
+
}), et = (e) => ({
|
|
518
534
|
fontFamily: e.fonts.primary,
|
|
519
535
|
fontSize: "0.875em",
|
|
520
536
|
// body-sm
|
|
@@ -527,14 +543,14 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
527
543
|
bgcolor: e.colors.surface,
|
|
528
544
|
color: e.colors.text,
|
|
529
545
|
borderColor: e.colors.border
|
|
530
|
-
}),
|
|
546
|
+
}), ot = (e) => ({
|
|
531
547
|
color: e.colors.dim,
|
|
532
548
|
fontSize: "0.75em",
|
|
533
549
|
// body-xs
|
|
534
550
|
fontVariantNumeric: "tabular-nums",
|
|
535
551
|
mt: e.spacing["2xs"],
|
|
536
552
|
textAlign: "center"
|
|
537
|
-
}),
|
|
553
|
+
}), tt = (e) => ({
|
|
538
554
|
display: "flex",
|
|
539
555
|
flexWrap: "wrap",
|
|
540
556
|
justifyContent: "center",
|
|
@@ -542,7 +558,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
542
558
|
gap: e.spacing["2xs"],
|
|
543
559
|
width: "100%",
|
|
544
560
|
fontSize: "1em"
|
|
545
|
-
}),
|
|
561
|
+
}), Re = (e, o) => ({
|
|
546
562
|
cursor: "pointer",
|
|
547
563
|
fontSize: { xs: "0.75em", sm: "0.8125em" },
|
|
548
564
|
fontFamily: o.fonts.primary,
|
|
@@ -562,7 +578,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
562
578
|
"&:hover": {
|
|
563
579
|
bgcolor: e ? o.colors.primarySoft : o.colors.surfaceVariant
|
|
564
580
|
}
|
|
565
|
-
}),
|
|
581
|
+
}), rt = (e, o) => ({
|
|
566
582
|
display: "inline-flex",
|
|
567
583
|
alignItems: "center",
|
|
568
584
|
justifyContent: "center",
|
|
@@ -575,7 +591,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
575
591
|
lineHeight: 1.7,
|
|
576
592
|
bgcolor: e ? o.colors.primary : o.colors.surfaceVariant,
|
|
577
593
|
color: e ? o.colors.onPrimary : o.colors.dim
|
|
578
|
-
}),
|
|
594
|
+
}), nt = (e) => {
|
|
579
595
|
const o = J(e.colors.primary);
|
|
580
596
|
return {
|
|
581
597
|
display: "flex",
|
|
@@ -600,25 +616,25 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
600
616
|
fontSize: "1em"
|
|
601
617
|
// Anchor the em cascade for the strip
|
|
602
618
|
};
|
|
603
|
-
},
|
|
619
|
+
}, $e = (e) => ({
|
|
604
620
|
display: "flex",
|
|
605
621
|
alignItems: "center",
|
|
606
622
|
gap: e.spacing["2xs"],
|
|
607
623
|
color: e.colors.dim,
|
|
608
624
|
fontSize: "0.8125em",
|
|
609
625
|
whiteSpace: "nowrap"
|
|
610
|
-
}),
|
|
626
|
+
}), it = (e, o) => ({
|
|
611
627
|
fontVariantNumeric: "tabular-nums",
|
|
612
628
|
fontWeight: 600,
|
|
613
629
|
fontSize: "inherit",
|
|
614
630
|
letterSpacing: "0.01em",
|
|
615
631
|
color: e ? o.colors.danger : o.colors.primary
|
|
616
|
-
}),
|
|
632
|
+
}), st = (e) => ({
|
|
617
633
|
display: { xs: "none", sm: "block" },
|
|
618
634
|
color: e.colors.tertiary,
|
|
619
635
|
fontSize: "0.8125em",
|
|
620
636
|
opacity: 0.6
|
|
621
|
-
}),
|
|
637
|
+
}), at = (e) => {
|
|
622
638
|
const o = J(e.colors.primary);
|
|
623
639
|
return {
|
|
624
640
|
display: "inline-flex",
|
|
@@ -641,7 +657,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
641
657
|
bgcolor: `rgba(${o}, 0.18)`
|
|
642
658
|
}
|
|
643
659
|
};
|
|
644
|
-
},
|
|
660
|
+
}, lt = (e) => ({
|
|
645
661
|
// Deliberately static. This used to be `position: absolute; bottom: -0.625em` inside the carousel
|
|
646
662
|
// box, which pinned it to a fixed offset regardless of how tall the active card actually was — a
|
|
647
663
|
// two-line player name pushed the card straight over it. As a normal sibling it just gets the
|
|
@@ -656,14 +672,14 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
656
672
|
// context above them. Belt and braces — with a matched height there should be no overlap at all.
|
|
657
673
|
position: "relative",
|
|
658
674
|
zIndex: 31
|
|
659
|
-
}),
|
|
675
|
+
}), ct = (e) => ({
|
|
660
676
|
color: e.colors.dim,
|
|
661
677
|
fontSize: "0.75em",
|
|
662
678
|
fontVariantNumeric: "tabular-nums",
|
|
663
679
|
fontWeight: 600,
|
|
664
680
|
letterSpacing: "0.02em",
|
|
665
681
|
whiteSpace: "nowrap"
|
|
666
|
-
}),
|
|
682
|
+
}), dt = (e) => ({
|
|
667
683
|
position: "relative",
|
|
668
684
|
flex: 1,
|
|
669
685
|
maxWidth: "14em",
|
|
@@ -671,7 +687,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
671
687
|
borderRadius: "0.125em",
|
|
672
688
|
bgcolor: e.colors.border,
|
|
673
689
|
overflow: "hidden"
|
|
674
|
-
}),
|
|
690
|
+
}), mt = (e, o) => ({
|
|
675
691
|
position: "absolute",
|
|
676
692
|
top: 0,
|
|
677
693
|
left: 0,
|
|
@@ -684,7 +700,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
684
700
|
"@media (prefers-reduced-motion: reduce)": {
|
|
685
701
|
transition: "none"
|
|
686
702
|
}
|
|
687
|
-
}),
|
|
703
|
+
}), ut = (e) => ({
|
|
688
704
|
display: "flex",
|
|
689
705
|
alignItems: "flex-start",
|
|
690
706
|
gap: e.spacing.xs,
|
|
@@ -704,7 +720,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
704
720
|
// Horizontal swipes belong to the rail; vertical ones must still scroll the host page.
|
|
705
721
|
touchAction: "pan-x",
|
|
706
722
|
overscrollBehaviorX: "contain"
|
|
707
|
-
}),
|
|
723
|
+
}), gt = (e, o, r, n) => ({
|
|
708
724
|
position: "relative",
|
|
709
725
|
flex: "0 0 auto",
|
|
710
726
|
display: "flex",
|
|
@@ -737,7 +753,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
737
753
|
"& .potm-rail-avatar": {
|
|
738
754
|
borderStyle: r ? "dashed" : "solid"
|
|
739
755
|
}
|
|
740
|
-
}),
|
|
756
|
+
}), pt = (e, o, r) => ({
|
|
741
757
|
width: "2.5em",
|
|
742
758
|
height: "2.5em",
|
|
743
759
|
bgcolor: r.colors.surface,
|
|
@@ -746,13 +762,13 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
746
762
|
boxShadow: e ? `0 0 0 ${r.border.size} ${r.colors.primary}` : "none",
|
|
747
763
|
filter: e ? "none" : "saturate(0.75)",
|
|
748
764
|
transition: "border-color 150ms ease, box-shadow 150ms ease"
|
|
749
|
-
}),
|
|
765
|
+
}), ht = (e, o) => ({
|
|
750
766
|
fontSize: "0.6875em",
|
|
751
767
|
fontVariantNumeric: "tabular-nums",
|
|
752
768
|
fontWeight: 600,
|
|
753
769
|
lineHeight: 1.2,
|
|
754
770
|
color: e ? o.colors.primary : o.colors.tertiary
|
|
755
|
-
}),
|
|
771
|
+
}), ft = (e) => ({
|
|
756
772
|
position: "absolute",
|
|
757
773
|
top: "-0.125em",
|
|
758
774
|
right: "0.125em",
|
|
@@ -766,7 +782,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
766
782
|
border: `${e.border.size} solid ${e.colors.surface}`,
|
|
767
783
|
fontSize: "1em",
|
|
768
784
|
zIndex: 2
|
|
769
|
-
}),
|
|
785
|
+
}), xt = (e) => ({
|
|
770
786
|
display: "flex",
|
|
771
787
|
alignItems: "center",
|
|
772
788
|
justifyContent: "center",
|
|
@@ -782,7 +798,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
782
798
|
letterSpacing: "0.06em",
|
|
783
799
|
lineHeight: 1.6,
|
|
784
800
|
whiteSpace: "nowrap"
|
|
785
|
-
}),
|
|
801
|
+
}), bt = (e) => ({
|
|
786
802
|
display: "flex",
|
|
787
803
|
flexDirection: "column",
|
|
788
804
|
alignItems: "center",
|
|
@@ -793,7 +809,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
793
809
|
px: e.spacing.md,
|
|
794
810
|
fontSize: "1em",
|
|
795
811
|
color: e.colors.dim
|
|
796
|
-
}),
|
|
812
|
+
}), St = (e, o) => ({
|
|
797
813
|
mb: o.spacing["2xs"],
|
|
798
814
|
fontSize: "1.25em",
|
|
799
815
|
// title-lg
|
|
@@ -806,20 +822,20 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
806
822
|
WebkitLineClamp: 2,
|
|
807
823
|
WebkitBoxOrient: "vertical",
|
|
808
824
|
overflow: "hidden"
|
|
809
|
-
}),
|
|
825
|
+
}), wt = (e) => ({
|
|
810
826
|
color: e.colors.dim,
|
|
811
827
|
fontSize: "0.875em",
|
|
812
828
|
// body-sm
|
|
813
829
|
minHeight: "1.5em",
|
|
814
830
|
flexShrink: 0,
|
|
815
831
|
textAlign: "center"
|
|
816
|
-
}),
|
|
832
|
+
}), yt = (e) => ({
|
|
817
833
|
color: e.colors.tertiary,
|
|
818
834
|
fontSize: "0.875em",
|
|
819
835
|
// body-sm
|
|
820
836
|
textAlign: "center"
|
|
821
837
|
}), j = () => {
|
|
822
|
-
const e =
|
|
838
|
+
const e = Qe(), o = Je(), r = Ze(), n = qe(), s = eo();
|
|
823
839
|
return {
|
|
824
840
|
fonts: o,
|
|
825
841
|
spacing: n,
|
|
@@ -840,8 +856,8 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
840
856
|
danger: e.palette.danger.plainColor
|
|
841
857
|
}
|
|
842
858
|
};
|
|
843
|
-
},
|
|
844
|
-
const s = j(), l =
|
|
859
|
+
}, vt = ({ activeIndex: e, totalItems: o, onPrev: r, onNext: n }) => {
|
|
860
|
+
const s = j(), l = Vo(s);
|
|
845
861
|
return o <= 1 ? null : /* @__PURE__ */ v(pe, { children: [
|
|
846
862
|
/* @__PURE__ */ t(
|
|
847
863
|
ve,
|
|
@@ -855,7 +871,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
855
871
|
opacity: e === 0 ? 0.4 : 1
|
|
856
872
|
},
|
|
857
873
|
"aria-label": "Previous player",
|
|
858
|
-
children: /* @__PURE__ */ t(
|
|
874
|
+
children: /* @__PURE__ */ t(De, { children: /* @__PURE__ */ t(mo, { sx: { fontSize: "1.5em", color: s.colors.onPrimary } }) })
|
|
859
875
|
}
|
|
860
876
|
),
|
|
861
877
|
/* @__PURE__ */ t(
|
|
@@ -870,19 +886,19 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
870
886
|
opacity: e === o - 1 ? 0.4 : 1
|
|
871
887
|
},
|
|
872
888
|
"aria-label": "Next player",
|
|
873
|
-
children: /* @__PURE__ */ t(
|
|
889
|
+
children: /* @__PURE__ */ t(De, { children: /* @__PURE__ */ t(uo, { sx: { fontSize: "1.5em", color: s.colors.onPrimary } }) })
|
|
874
890
|
}
|
|
875
891
|
)
|
|
876
892
|
] });
|
|
877
|
-
},
|
|
893
|
+
}, zt = ({
|
|
878
894
|
activeIndex: e,
|
|
879
895
|
totalItems: o
|
|
880
896
|
}) => {
|
|
881
|
-
const { t: r } =
|
|
897
|
+
const { t: r } = B(), n = j();
|
|
882
898
|
if (o <= 1) return null;
|
|
883
899
|
const s = (e + 1) / o * 100;
|
|
884
|
-
return /* @__PURE__ */ v(x, { sx:
|
|
885
|
-
/* @__PURE__ */ t(h, { "aria-live": "polite", sx:
|
|
900
|
+
return /* @__PURE__ */ v(x, { sx: lt(n), children: [
|
|
901
|
+
/* @__PURE__ */ t(h, { "aria-live": "polite", sx: ct(n), children: r("potm.player_position", {
|
|
886
902
|
current: e + 1,
|
|
887
903
|
total: o
|
|
888
904
|
}) }),
|
|
@@ -893,12 +909,12 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
893
909
|
"aria-valuemin": 1,
|
|
894
910
|
"aria-valuemax": o,
|
|
895
911
|
"aria-valuenow": e + 1,
|
|
896
|
-
sx:
|
|
897
|
-
children: /* @__PURE__ */ t(x, { sx:
|
|
912
|
+
sx: dt(n),
|
|
913
|
+
children: /* @__PURE__ */ t(x, { sx: mt(s, n) })
|
|
898
914
|
}
|
|
899
915
|
)
|
|
900
916
|
] });
|
|
901
|
-
},
|
|
917
|
+
}, Ct = W.playerPlaceholder, Pt = ({
|
|
902
918
|
player: e,
|
|
903
919
|
isSelected: o,
|
|
904
920
|
index: r,
|
|
@@ -912,7 +928,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
912
928
|
signInCTA: p,
|
|
913
929
|
voteCount: u
|
|
914
930
|
}) => {
|
|
915
|
-
const { t: d } =
|
|
931
|
+
const { t: d } = B(), i = j(), g = Po(r, n), y = (P) => (P.stopPropagation(), P.preventDefault(), l(e.id), !1), M = {
|
|
916
932
|
borderRadius: "full",
|
|
917
933
|
position: "relative",
|
|
918
934
|
zIndex: 30,
|
|
@@ -968,7 +984,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
968
984
|
backgroundRepeat: "no-repeat",
|
|
969
985
|
backgroundSize: "cover",
|
|
970
986
|
backgroundPosition: "center",
|
|
971
|
-
...
|
|
987
|
+
...To(o, i),
|
|
972
988
|
// Add light gray background for inactive cards
|
|
973
989
|
...r !== n && {
|
|
974
990
|
bgcolor: i.colors.surface,
|
|
@@ -995,20 +1011,20 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
995
1011
|
// Allow content to overflow (for shadow effects)
|
|
996
1012
|
},
|
|
997
1013
|
children: [
|
|
998
|
-
/* @__PURE__ */ v(x, { sx:
|
|
999
|
-
/* @__PURE__ */ t(x, { sx:
|
|
1000
|
-
e.type !== "start" && /* @__PURE__ */ t(h, { sx:
|
|
1014
|
+
/* @__PURE__ */ v(x, { sx: _o(i), children: [
|
|
1015
|
+
/* @__PURE__ */ t(x, { sx: Do(i), children: /* @__PURE__ */ t(h, { sx: { fontSize: "0.75em", color: "inherit" }, children: e.number }) }),
|
|
1016
|
+
e.type !== "start" && /* @__PURE__ */ t(h, { sx: xt(i), children: d("potm.substitute_short") })
|
|
1001
1017
|
] }),
|
|
1002
|
-
/* @__PURE__ */ t("img", { src: s, style:
|
|
1003
|
-
/* @__PURE__ */ v(
|
|
1018
|
+
/* @__PURE__ */ t("img", { src: s, style: Mo, alt: "Team logo", onError: Ne(W.teamPlaceholder) }),
|
|
1019
|
+
/* @__PURE__ */ v(so, { sx: ko, children: [
|
|
1004
1020
|
/* @__PURE__ */ t(
|
|
1005
1021
|
G,
|
|
1006
1022
|
{
|
|
1007
|
-
src: e.image ||
|
|
1023
|
+
src: e.image || Ct,
|
|
1008
1024
|
placeholder: W.playerPlaceholder,
|
|
1009
1025
|
alt: e.name,
|
|
1010
1026
|
sx: {
|
|
1011
|
-
...
|
|
1027
|
+
...Ro(i),
|
|
1012
1028
|
// Increase desaturation and add brightness reduction for inactive cards
|
|
1013
1029
|
...r !== n && {
|
|
1014
1030
|
filter: "saturate(0.5) brightness(0.9)"
|
|
@@ -1020,7 +1036,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1020
1036
|
h,
|
|
1021
1037
|
{
|
|
1022
1038
|
level: "title-lg",
|
|
1023
|
-
sx:
|
|
1039
|
+
sx: St(r === n, i),
|
|
1024
1040
|
children: e.name
|
|
1025
1041
|
}
|
|
1026
1042
|
),
|
|
@@ -1028,7 +1044,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1028
1044
|
h,
|
|
1029
1045
|
{
|
|
1030
1046
|
level: "body-sm",
|
|
1031
|
-
sx:
|
|
1047
|
+
sx: ke(
|
|
1032
1048
|
r === n ? i.colors.text : i.colors.dim,
|
|
1033
1049
|
i
|
|
1034
1050
|
),
|
|
@@ -1040,7 +1056,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1040
1056
|
{
|
|
1041
1057
|
level: "body-sm",
|
|
1042
1058
|
sx: {
|
|
1043
|
-
...
|
|
1059
|
+
...ke(
|
|
1044
1060
|
r === n ? i.colors.primary : i.colors.tertiary,
|
|
1045
1061
|
i
|
|
1046
1062
|
),
|
|
@@ -1052,9 +1068,9 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1052
1068
|
children: e.minutesPlayed && e.minutesPlayed > 0 ? d("potm.minutes_played", { minutes: e.minutesPlayed }) : ""
|
|
1053
1069
|
}
|
|
1054
1070
|
),
|
|
1055
|
-
/* @__PURE__ */ t(h, { level: "body-sm", sx:
|
|
1071
|
+
/* @__PURE__ */ t(h, { level: "body-sm", sx: wt(i), children: u ? `${u} ${d("potm.votes", { count: u })}` : "" })
|
|
1056
1072
|
] }),
|
|
1057
|
-
/* @__PURE__ */ t(
|
|
1073
|
+
/* @__PURE__ */ t(ao, { sx: { width: "100%", pb: i.spacing.md }, children: z ? S() : /* @__PURE__ */ t(
|
|
1058
1074
|
q,
|
|
1059
1075
|
{
|
|
1060
1076
|
fullWidth: !0,
|
|
@@ -1064,7 +1080,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1064
1080
|
disabled: r !== n || m || w,
|
|
1065
1081
|
color: o ? "warning" : "primary",
|
|
1066
1082
|
variant: o ? "outlined" : "solid",
|
|
1067
|
-
startDecorator: o ? /* @__PURE__ */ t(
|
|
1083
|
+
startDecorator: o ? /* @__PURE__ */ t(So, {}) : /* @__PURE__ */ t(ae, {}),
|
|
1068
1084
|
sx: {
|
|
1069
1085
|
borderRadius: "full",
|
|
1070
1086
|
position: "relative",
|
|
@@ -1090,23 +1106,23 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1090
1106
|
},
|
|
1091
1107
|
e.id
|
|
1092
1108
|
);
|
|
1093
|
-
},
|
|
1109
|
+
}, Tt = ({
|
|
1094
1110
|
query: e,
|
|
1095
1111
|
setQuery: o,
|
|
1096
1112
|
resultCount: r,
|
|
1097
1113
|
totalCount: n
|
|
1098
1114
|
}) => {
|
|
1099
|
-
const { t: s } =
|
|
1100
|
-
return /* @__PURE__ */ v(x, { sx:
|
|
1115
|
+
const { t: s } = B(), l = j();
|
|
1116
|
+
return /* @__PURE__ */ v(x, { sx: qo(), children: [
|
|
1101
1117
|
/* @__PURE__ */ t(
|
|
1102
|
-
|
|
1118
|
+
lo,
|
|
1103
1119
|
{
|
|
1104
1120
|
size: "sm",
|
|
1105
1121
|
value: e,
|
|
1106
1122
|
onChange: (m) => o(m.target.value),
|
|
1107
1123
|
placeholder: s("potm.search_placeholder"),
|
|
1108
1124
|
"aria-label": s("potm.search_label"),
|
|
1109
|
-
startDecorator: /* @__PURE__ */ t(
|
|
1125
|
+
startDecorator: /* @__PURE__ */ t(go, { sx: { fontSize: "1.125em", color: l.colors.dim } }),
|
|
1110
1126
|
endDecorator: e ? /* @__PURE__ */ t(
|
|
1111
1127
|
ve,
|
|
1112
1128
|
{
|
|
@@ -1116,10 +1132,10 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1116
1132
|
onClick: () => o(""),
|
|
1117
1133
|
"aria-label": s("potm.search_clear"),
|
|
1118
1134
|
sx: { fontSize: "1em", minWidth: "1.5em", minHeight: "1.5em" },
|
|
1119
|
-
children: /* @__PURE__ */ t(
|
|
1135
|
+
children: /* @__PURE__ */ t(po, { sx: { fontSize: "1em" } })
|
|
1120
1136
|
}
|
|
1121
1137
|
) : null,
|
|
1122
|
-
sx:
|
|
1138
|
+
sx: et(l)
|
|
1123
1139
|
}
|
|
1124
1140
|
),
|
|
1125
1141
|
e ? /* @__PURE__ */ t(
|
|
@@ -1127,7 +1143,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1127
1143
|
{
|
|
1128
1144
|
"aria-live": "polite",
|
|
1129
1145
|
level: "body-xs",
|
|
1130
|
-
sx:
|
|
1146
|
+
sx: ot(l),
|
|
1131
1147
|
children: s("potm.search_results_count", {
|
|
1132
1148
|
count: r,
|
|
1133
1149
|
total: n
|
|
@@ -1135,16 +1151,16 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1135
1151
|
}
|
|
1136
1152
|
) : null
|
|
1137
1153
|
] });
|
|
1138
|
-
},
|
|
1154
|
+
}, _t = ({
|
|
1139
1155
|
positionCounts: e,
|
|
1140
1156
|
positionFilter: o,
|
|
1141
1157
|
setPositionFilter: r,
|
|
1142
1158
|
totalCount: n
|
|
1143
1159
|
}) => {
|
|
1144
|
-
const { t: s } =
|
|
1160
|
+
const { t: s } = B(), l = j();
|
|
1145
1161
|
if (e.length <= 1) return null;
|
|
1146
|
-
const m = (w, b) => /* @__PURE__ */ t(x, { sx:
|
|
1147
|
-
return /* @__PURE__ */ v(x, { sx:
|
|
1162
|
+
const m = (w, b) => /* @__PURE__ */ t(x, { sx: rt(w, l), children: b });
|
|
1163
|
+
return /* @__PURE__ */ v(x, { sx: tt(l), children: [
|
|
1148
1164
|
/* @__PURE__ */ t(
|
|
1149
1165
|
he,
|
|
1150
1166
|
{
|
|
@@ -1153,7 +1169,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1153
1169
|
size: "sm",
|
|
1154
1170
|
"aria-pressed": o === "all",
|
|
1155
1171
|
endDecorator: m(o === "all", n),
|
|
1156
|
-
sx:
|
|
1172
|
+
sx: Re(o === "all", l),
|
|
1157
1173
|
children: /* @__PURE__ */ t(h, { sx: { fontSize: "inherit", color: "inherit" }, children: s("potm.all") })
|
|
1158
1174
|
}
|
|
1159
1175
|
),
|
|
@@ -1168,7 +1184,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1168
1184
|
"aria-pressed": z,
|
|
1169
1185
|
"aria-label": s(`potm.${w}`),
|
|
1170
1186
|
endDecorator: m(z, b),
|
|
1171
|
-
sx:
|
|
1187
|
+
sx: Re(z, l),
|
|
1172
1188
|
children: [
|
|
1173
1189
|
/* @__PURE__ */ t(
|
|
1174
1190
|
h,
|
|
@@ -1198,14 +1214,14 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1198
1214
|
);
|
|
1199
1215
|
})
|
|
1200
1216
|
] });
|
|
1201
|
-
},
|
|
1217
|
+
}, Dt = W.playerPlaceholder, Mt = ({
|
|
1202
1218
|
players: e,
|
|
1203
1219
|
activeIndex: o,
|
|
1204
1220
|
votedPlayerId: r,
|
|
1205
1221
|
onSelect: n
|
|
1206
1222
|
}) => {
|
|
1207
|
-
const { t: s } =
|
|
1208
|
-
return
|
|
1223
|
+
const { t: s } = B(), l = j(), m = fe(null), w = fe([]);
|
|
1224
|
+
return H(() => {
|
|
1209
1225
|
var g;
|
|
1210
1226
|
const b = w.current[o], z = m.current;
|
|
1211
1227
|
if (!b || !z) return;
|
|
@@ -1220,7 +1236,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1220
1236
|
ref: m,
|
|
1221
1237
|
role: "tablist",
|
|
1222
1238
|
"aria-label": s("potm.roster_label"),
|
|
1223
|
-
sx:
|
|
1239
|
+
sx: ut(l),
|
|
1224
1240
|
children: e.map((b, z) => {
|
|
1225
1241
|
const p = z === o, u = r === b.id, d = b.type !== "start";
|
|
1226
1242
|
return /* @__PURE__ */ v(
|
|
@@ -1240,9 +1256,9 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1240
1256
|
number: b.number,
|
|
1241
1257
|
name: b.name
|
|
1242
1258
|
}),
|
|
1243
|
-
sx:
|
|
1259
|
+
sx: gt(p, u, d, l),
|
|
1244
1260
|
children: [
|
|
1245
|
-
u && /* @__PURE__ */ t(x, { sx:
|
|
1261
|
+
u && /* @__PURE__ */ t(x, { sx: ft(l), children: /* @__PURE__ */ t(
|
|
1246
1262
|
ae,
|
|
1247
1263
|
{
|
|
1248
1264
|
sx: { fontSize: "0.75em", color: l.colors.warning }
|
|
@@ -1252,13 +1268,13 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1252
1268
|
G,
|
|
1253
1269
|
{
|
|
1254
1270
|
className: "potm-rail-avatar",
|
|
1255
|
-
src: b.image ||
|
|
1271
|
+
src: b.image || Dt,
|
|
1256
1272
|
placeholder: W.playerPlaceholder,
|
|
1257
1273
|
alt: "",
|
|
1258
|
-
sx:
|
|
1274
|
+
sx: pt(p, u, l)
|
|
1259
1275
|
}
|
|
1260
1276
|
),
|
|
1261
|
-
/* @__PURE__ */ t(h, { sx:
|
|
1277
|
+
/* @__PURE__ */ t(h, { sx: ht(p, l), children: b.number || "-" })
|
|
1262
1278
|
]
|
|
1263
1279
|
},
|
|
1264
1280
|
b.id
|
|
@@ -1266,9 +1282,9 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1266
1282
|
})
|
|
1267
1283
|
}
|
|
1268
1284
|
) });
|
|
1269
|
-
},
|
|
1270
|
-
const { t: s } =
|
|
1271
|
-
return /* @__PURE__ */ v(Y, { direction: "row", spacing: l.spacing.xs, justifyContent: "center", sx:
|
|
1285
|
+
}, kt = ({ teams: e, activeFilter: o, setActiveFilter: r, setActiveIndex: n }) => {
|
|
1286
|
+
const { t: s } = B(), l = j();
|
|
1287
|
+
return /* @__PURE__ */ v(Y, { direction: "row", spacing: l.spacing.xs, justifyContent: "center", sx: $o, children: [
|
|
1272
1288
|
/* @__PURE__ */ t(
|
|
1273
1289
|
q,
|
|
1274
1290
|
{
|
|
@@ -1277,7 +1293,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1277
1293
|
},
|
|
1278
1294
|
variant: o === "all" ? "soft" : "outlined",
|
|
1279
1295
|
color: o === "all" ? "primary" : "neutral",
|
|
1280
|
-
startDecorator: /* @__PURE__ */ t(
|
|
1296
|
+
startDecorator: /* @__PURE__ */ t(Me, { sx: { fontSize: "1.5em" } }),
|
|
1281
1297
|
size: "sm",
|
|
1282
1298
|
sx: {
|
|
1283
1299
|
display: { xs: "none", md: "flex" },
|
|
@@ -1343,7 +1359,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1343
1359
|
},
|
|
1344
1360
|
variant: o === "all" ? "soft" : "outlined",
|
|
1345
1361
|
color: o === "all" ? "primary" : "neutral",
|
|
1346
|
-
startDecorator: /* @__PURE__ */ t(
|
|
1362
|
+
startDecorator: /* @__PURE__ */ t(Me, { sx: { fontSize: "1em" } }),
|
|
1347
1363
|
size: "sm",
|
|
1348
1364
|
sx: {
|
|
1349
1365
|
display: { xs: "flex", md: "none" },
|
|
@@ -1394,7 +1410,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1394
1410
|
`mobile-${m.id}`
|
|
1395
1411
|
))
|
|
1396
1412
|
] });
|
|
1397
|
-
},
|
|
1413
|
+
}, Ie = (e) => {
|
|
1398
1414
|
const o = +new Date(e) - +/* @__PURE__ */ new Date();
|
|
1399
1415
|
return o <= 0 ? { days: 0, hours: 0, minutes: 0, seconds: 0, isExpired: !0 } : {
|
|
1400
1416
|
days: Math.floor(o / (1e3 * 60 * 60 * 24)),
|
|
@@ -1403,30 +1419,30 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1403
1419
|
seconds: Math.floor(o / 1e3 % 60),
|
|
1404
1420
|
isExpired: !1
|
|
1405
1421
|
};
|
|
1406
|
-
},
|
|
1422
|
+
}, je = (e) => {
|
|
1407
1423
|
const [o, r] = T(
|
|
1408
|
-
|
|
1424
|
+
Ie(e)
|
|
1409
1425
|
);
|
|
1410
|
-
return
|
|
1426
|
+
return H(() => {
|
|
1411
1427
|
if (o.isExpired) return;
|
|
1412
1428
|
const n = setInterval(() => {
|
|
1413
|
-
r(
|
|
1429
|
+
r(Ie(e));
|
|
1414
1430
|
}, 1e3);
|
|
1415
1431
|
return () => clearInterval(n);
|
|
1416
1432
|
}, [e, o.isExpired]), o;
|
|
1417
|
-
},
|
|
1433
|
+
}, Rt = 30, $t = ({
|
|
1418
1434
|
votingDeadline: e,
|
|
1419
1435
|
totalVotes: o
|
|
1420
1436
|
}) => {
|
|
1421
|
-
const { t: r } =
|
|
1437
|
+
const { t: r } = B(), n = j(), { days: s, hours: l, minutes: m, seconds: w, isExpired: b } = je(
|
|
1422
1438
|
e ?? /* @__PURE__ */ new Date(0)
|
|
1423
1439
|
), z = !!e && !b, p = o > 0;
|
|
1424
1440
|
if (!z && !p) return null;
|
|
1425
|
-
const u = s === 0 && l === 0 && m <
|
|
1426
|
-
return /* @__PURE__ */ v(x, { sx:
|
|
1427
|
-
z && /* @__PURE__ */ v(x, { sx:
|
|
1441
|
+
const u = s === 0 && l === 0 && m < Rt, d = () => s > 0 ? r("potm.remaining_days_hours", { days: s, hours: l }) : l > 0 ? r("potm.remaining_hours_minutes", { hours: l, minutes: m }) : r("potm.remaining_minutes_seconds", { minutes: m, seconds: w });
|
|
1442
|
+
return /* @__PURE__ */ v(x, { sx: nt(n), children: [
|
|
1443
|
+
z && /* @__PURE__ */ v(x, { sx: $e(n), children: [
|
|
1428
1444
|
/* @__PURE__ */ t(
|
|
1429
|
-
|
|
1445
|
+
He,
|
|
1430
1446
|
{
|
|
1431
1447
|
sx: {
|
|
1432
1448
|
fontSize: "1em",
|
|
@@ -1439,19 +1455,19 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1439
1455
|
h,
|
|
1440
1456
|
{
|
|
1441
1457
|
"aria-live": "off",
|
|
1442
|
-
sx:
|
|
1458
|
+
sx: it(u, n),
|
|
1443
1459
|
children: d()
|
|
1444
1460
|
}
|
|
1445
1461
|
)
|
|
1446
1462
|
] }),
|
|
1447
|
-
z && p && /* @__PURE__ */ t(h, { sx:
|
|
1448
|
-
p && /* @__PURE__ */ v(x, { sx:
|
|
1449
|
-
/* @__PURE__ */ t(
|
|
1463
|
+
z && p && /* @__PURE__ */ t(h, { sx: st(n), children: "·" }),
|
|
1464
|
+
p && /* @__PURE__ */ v(x, { sx: $e(n), children: [
|
|
1465
|
+
/* @__PURE__ */ t(bo, { sx: { fontSize: "1em", color: n.colors.tertiary } }),
|
|
1450
1466
|
/* @__PURE__ */ t(h, { sx: { fontSize: "inherit", color: "inherit" }, children: r("potm.total_votes_cast", { count: o }) })
|
|
1451
1467
|
] })
|
|
1452
1468
|
] });
|
|
1453
|
-
},
|
|
1454
|
-
const { t: r } =
|
|
1469
|
+
}, It = ({ playerName: e, onJumpToVote: o }) => {
|
|
1470
|
+
const { t: r } = B(), n = j(), s = !!o;
|
|
1455
1471
|
return /* @__PURE__ */ v(
|
|
1456
1472
|
x,
|
|
1457
1473
|
{
|
|
@@ -1460,11 +1476,11 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1460
1476
|
onClick: o,
|
|
1461
1477
|
onMouseDown: (l) => l.stopPropagation(),
|
|
1462
1478
|
sx: {
|
|
1463
|
-
...
|
|
1479
|
+
...at(n),
|
|
1464
1480
|
...s ? {} : { cursor: "default", "&:hover": { bgcolor: "inherit" } }
|
|
1465
1481
|
},
|
|
1466
1482
|
children: [
|
|
1467
|
-
/* @__PURE__ */ t(
|
|
1483
|
+
/* @__PURE__ */ t(fo, { sx: { fontSize: "1em" } }),
|
|
1468
1484
|
/* @__PURE__ */ t(
|
|
1469
1485
|
h,
|
|
1470
1486
|
{
|
|
@@ -1494,24 +1510,24 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1494
1510
|
]
|
|
1495
1511
|
}
|
|
1496
1512
|
);
|
|
1497
|
-
},
|
|
1513
|
+
}, Vt = 450, Et = 25, Wt = 70, Lt = 12, Nt = (e) => {
|
|
1498
1514
|
const [o, r] = T(0), [n, s] = T(0), [l, m] = T(0), [w, b] = T(!1), [z, p] = T(0), u = fe(null), d = fe(null), i = Math.abs(z) > 10, g = () => {
|
|
1499
1515
|
d.current !== null && (clearInterval(d.current), d.current = null);
|
|
1500
1516
|
};
|
|
1501
|
-
|
|
1517
|
+
H(() => g, []);
|
|
1502
1518
|
const y = (f) => {
|
|
1503
1519
|
g(), r(Math.max(0, Math.min(Math.max(e - 1, 0), f)));
|
|
1504
1520
|
}, M = (f) => {
|
|
1505
1521
|
var U;
|
|
1506
1522
|
g();
|
|
1507
1523
|
const _ = Math.max(0, Math.min(Math.max(e - 1, 0), f)), R = Math.abs(_ - o), $ = typeof window < "u" && ((U = window.matchMedia) == null ? void 0 : U.call(window, "(prefers-reduced-motion: reduce)").matches);
|
|
1508
|
-
if (R <= 1 || R >
|
|
1524
|
+
if (R <= 1 || R > Lt || $) {
|
|
1509
1525
|
r(_);
|
|
1510
1526
|
return;
|
|
1511
1527
|
}
|
|
1512
1528
|
const L = _ > o ? 1 : -1, K = Math.min(
|
|
1513
|
-
|
|
1514
|
-
Math.max(
|
|
1529
|
+
Wt,
|
|
1530
|
+
Math.max(Et, Math.round(Vt / R))
|
|
1515
1531
|
);
|
|
1516
1532
|
let X = o;
|
|
1517
1533
|
d.current = window.setInterval(() => {
|
|
@@ -1540,14 +1556,14 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1540
1556
|
b(!1), p(0);
|
|
1541
1557
|
}
|
|
1542
1558
|
};
|
|
1543
|
-
return
|
|
1559
|
+
return H(() => {
|
|
1544
1560
|
const f = u.current;
|
|
1545
1561
|
if (!f) return;
|
|
1546
1562
|
const _ = (L) => c(L), R = (L) => a(L), $ = () => k();
|
|
1547
1563
|
return f.addEventListener("touchstart", _), f.addEventListener("touchmove", R), f.addEventListener("touchend", $), () => {
|
|
1548
1564
|
f.removeEventListener("touchstart", _), f.removeEventListener("touchmove", R), f.removeEventListener("touchend", $);
|
|
1549
1565
|
};
|
|
1550
|
-
}, [w, n, l, o, e]),
|
|
1566
|
+
}, [w, n, l, o, e]), H(() => {
|
|
1551
1567
|
const f = u.current;
|
|
1552
1568
|
if (!f) return;
|
|
1553
1569
|
const _ = (R) => {
|
|
@@ -1570,20 +1586,20 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1570
1586
|
isDragging: w,
|
|
1571
1587
|
isSignificantDrag: i
|
|
1572
1588
|
};
|
|
1573
|
-
},
|
|
1589
|
+
}, Ve = W.teamPlaceholder, Ht = (e, o, r) => {
|
|
1574
1590
|
var S, P;
|
|
1575
1591
|
const [n, s] = T([]), [l, m] = T([]), [w, b] = T([]), z = [
|
|
1576
1592
|
{
|
|
1577
1593
|
id: e.homeTeam.id,
|
|
1578
1594
|
name: e.homeTeam.name,
|
|
1579
1595
|
code: e.homeTeam.code,
|
|
1580
|
-
logo: ((S = e.homeTeam.assets) == null ? void 0 : S.logo) ||
|
|
1596
|
+
logo: ((S = e.homeTeam.assets) == null ? void 0 : S.logo) || Ve
|
|
1581
1597
|
},
|
|
1582
1598
|
{
|
|
1583
1599
|
id: e.awayTeam.id,
|
|
1584
1600
|
name: e.awayTeam.name,
|
|
1585
1601
|
code: e.awayTeam.code,
|
|
1586
|
-
logo: ((P = e.awayTeam.assets) == null ? void 0 : P.logo) ||
|
|
1602
|
+
logo: ((P = e.awayTeam.assets) == null ? void 0 : P.logo) || Ve
|
|
1587
1603
|
}
|
|
1588
1604
|
], p = (c) => {
|
|
1589
1605
|
const a = e.playerStats.find(
|
|
@@ -1661,9 +1677,9 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1661
1677
|
votes: u((a == null ? void 0 : a.id) || "")
|
|
1662
1678
|
};
|
|
1663
1679
|
}) || [];
|
|
1664
|
-
return
|
|
1680
|
+
return H(() => {
|
|
1665
1681
|
s([...d, ...g]), m([...i, ...y]);
|
|
1666
|
-
}, [e, o]),
|
|
1682
|
+
}, [e, o]), H(() => {
|
|
1667
1683
|
let c = [...n, ...l];
|
|
1668
1684
|
r && r.length > 0 && (c = c.filter(
|
|
1669
1685
|
(a) => r.includes(a.id)
|
|
@@ -1676,7 +1692,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1676
1692
|
return a ? a.logo : "";
|
|
1677
1693
|
}
|
|
1678
1694
|
};
|
|
1679
|
-
},
|
|
1695
|
+
}, Fe = {
|
|
1680
1696
|
ł: "l",
|
|
1681
1697
|
// l with stroke - pl
|
|
1682
1698
|
đ: "d",
|
|
@@ -1697,22 +1713,22 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1697
1713
|
œ: "oe",
|
|
1698
1714
|
þ: "th"
|
|
1699
1715
|
// thorn
|
|
1700
|
-
},
|
|
1701
|
-
`[${Object.keys(
|
|
1716
|
+
}, Bt = new RegExp(
|
|
1717
|
+
`[${Object.keys(Fe).join("")}]`,
|
|
1702
1718
|
"g"
|
|
1703
|
-
), ze = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(
|
|
1719
|
+
), ze = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(Bt, (o) => Fe[o] || o).trim(), Ue = [
|
|
1704
1720
|
"keeper",
|
|
1705
1721
|
"defender",
|
|
1706
1722
|
"midfielder",
|
|
1707
1723
|
"forward"
|
|
1708
|
-
],
|
|
1724
|
+
], Ee = (e) => {
|
|
1709
1725
|
const o = ze(e);
|
|
1710
|
-
return
|
|
1711
|
-
},
|
|
1726
|
+
return Ue.includes(o) ? o : "unknown";
|
|
1727
|
+
}, jt = ({
|
|
1712
1728
|
players: e,
|
|
1713
1729
|
teamFilter: o
|
|
1714
1730
|
}) => {
|
|
1715
|
-
const { i18n: r } =
|
|
1731
|
+
const { i18n: r } = B(), [n, s] = T(""), [l, m] = T(
|
|
1716
1732
|
"all"
|
|
1717
1733
|
), w = se(
|
|
1718
1734
|
() => new Intl.Collator(r.language, { numeric: !0 }),
|
|
@@ -1723,14 +1739,14 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1723
1739
|
), z = se(() => {
|
|
1724
1740
|
const i = /* @__PURE__ */ new Map();
|
|
1725
1741
|
return b.forEach((g) => {
|
|
1726
|
-
const y =
|
|
1742
|
+
const y = Ee(g.position);
|
|
1727
1743
|
i.set(y, (i.get(y) || 0) + 1);
|
|
1728
|
-
}),
|
|
1744
|
+
}), Ue.filter((g) => i.has(g)).map(
|
|
1729
1745
|
(g) => ({ bucket: g, count: i.get(g) || 0 })
|
|
1730
1746
|
);
|
|
1731
1747
|
}, [b]), p = se(() => {
|
|
1732
1748
|
const i = ze(n);
|
|
1733
|
-
return [...b.filter((y) => l !== "all" &&
|
|
1749
|
+
return [...b.filter((y) => l !== "all" && Ee(y.position) !== l ? !1 : i ? ze(y.name).includes(i) || String(y.number).startsWith(i) : !0)].sort(
|
|
1734
1750
|
(y, M) => (M.votes || 0) - (y.votes || 0) || w.compare(y.name, M.name)
|
|
1735
1751
|
);
|
|
1736
1752
|
}, [b, n, l, w]), u = !!n || l !== "all", d = () => {
|
|
@@ -1747,16 +1763,16 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1747
1763
|
isFiltered: u,
|
|
1748
1764
|
resetFilters: d
|
|
1749
1765
|
};
|
|
1750
|
-
},
|
|
1751
|
-
|
|
1766
|
+
}, Ft = (e, o) => {
|
|
1767
|
+
H(() => {
|
|
1752
1768
|
o(0);
|
|
1753
1769
|
}, [e]);
|
|
1754
|
-
},
|
|
1770
|
+
}, Ut = 4, At = (e) => {
|
|
1755
1771
|
const o = /* @__PURE__ */ new Map();
|
|
1756
1772
|
return e != null && e.data && e.data.forEach((r) => {
|
|
1757
1773
|
o.set(r.playerId, r.votes);
|
|
1758
1774
|
}), o;
|
|
1759
|
-
},
|
|
1775
|
+
}, Ot = ({
|
|
1760
1776
|
match: e,
|
|
1761
1777
|
sdk: o,
|
|
1762
1778
|
userVote: r,
|
|
@@ -1770,7 +1786,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1770
1786
|
signInCTA: p,
|
|
1771
1787
|
votingDeadline: u = null
|
|
1772
1788
|
}) => {
|
|
1773
|
-
const { t: d } =
|
|
1789
|
+
const { t: d } = B(), i = j(), { players: g, teams: y, getTeamLogo: M } = Ht(
|
|
1774
1790
|
e,
|
|
1775
1791
|
n,
|
|
1776
1792
|
w
|
|
@@ -1780,7 +1796,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1780
1796
|
title: "",
|
|
1781
1797
|
message: ""
|
|
1782
1798
|
}), [$, L] = T(
|
|
1783
|
-
|
|
1799
|
+
At(n)
|
|
1784
1800
|
), [K, X] = T(null), U = (C, D) => {
|
|
1785
1801
|
R({ open: !0, variant: C, title: "", message: D });
|
|
1786
1802
|
}, ee = () => {
|
|
@@ -1794,26 +1810,26 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1794
1810
|
filteredPlayers: F,
|
|
1795
1811
|
teamScopedCount: de,
|
|
1796
1812
|
resetFilters: be
|
|
1797
|
-
} =
|
|
1813
|
+
} = jt({ players: g, teamFilter: S }), {
|
|
1798
1814
|
activeIndex: Q,
|
|
1799
1815
|
jumpToIndex: te,
|
|
1800
1816
|
animateToIndex: ne,
|
|
1801
1817
|
handleDragStart: V,
|
|
1802
1818
|
handleDragMove: I,
|
|
1803
|
-
handleDragEnd:
|
|
1819
|
+
handleDragEnd: A,
|
|
1804
1820
|
goToPrevious: Se,
|
|
1805
1821
|
goToNext: me,
|
|
1806
1822
|
carouselRef: E
|
|
1807
|
-
} =
|
|
1808
|
-
|
|
1823
|
+
} = Nt(F.length);
|
|
1824
|
+
Ft(
|
|
1809
1825
|
`${oe}|${re}|${S}`,
|
|
1810
1826
|
te
|
|
1811
|
-
),
|
|
1827
|
+
), H(() => {
|
|
1812
1828
|
a(r);
|
|
1813
|
-
}, [r]),
|
|
1829
|
+
}, [r]), H(() => {
|
|
1814
1830
|
P(m);
|
|
1815
1831
|
}, [m]);
|
|
1816
|
-
const
|
|
1832
|
+
const O = (C, D) => {
|
|
1817
1833
|
const N = new Map($);
|
|
1818
1834
|
if (C) {
|
|
1819
1835
|
const Z = N.get(D) || 0;
|
|
@@ -1821,8 +1837,8 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1821
1837
|
} else {
|
|
1822
1838
|
const Z = N.get(D) || 0;
|
|
1823
1839
|
if (N.set(D, Z + 1), c && c !== D) {
|
|
1824
|
-
const
|
|
1825
|
-
N.set(c, Math.max(0,
|
|
1840
|
+
const Ke = N.get(c) || 0;
|
|
1841
|
+
N.set(c, Math.max(0, Ke - 1));
|
|
1826
1842
|
}
|
|
1827
1843
|
}
|
|
1828
1844
|
L(N);
|
|
@@ -1830,7 +1846,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1830
1846
|
f(!0);
|
|
1831
1847
|
try {
|
|
1832
1848
|
const D = c === C;
|
|
1833
|
-
await s(C) ? (
|
|
1849
|
+
await s(C) ? (O(D, C), a(D ? null : C), U(
|
|
1834
1850
|
"success",
|
|
1835
1851
|
d(D ? "potm.vote_removed" : "potm.vote_success")
|
|
1836
1852
|
)) : U("error", d("potm.vote_error"));
|
|
@@ -1841,13 +1857,13 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1841
1857
|
} finally {
|
|
1842
1858
|
f(!1);
|
|
1843
1859
|
}
|
|
1844
|
-
},
|
|
1860
|
+
}, Ae = (C) => {
|
|
1845
1861
|
k || V(C);
|
|
1846
1862
|
}, Oe = (C) => {
|
|
1847
1863
|
k || I(C);
|
|
1848
|
-
},
|
|
1849
|
-
k ||
|
|
1850
|
-
},
|
|
1864
|
+
}, Te = () => {
|
|
1865
|
+
k || A();
|
|
1866
|
+
}, _e = (C) => {
|
|
1851
1867
|
if ($.has(C))
|
|
1852
1868
|
return $.get(C) || 0;
|
|
1853
1869
|
if (!n || !n.data) return 0;
|
|
@@ -1855,7 +1871,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1855
1871
|
(N) => N.playerId === C
|
|
1856
1872
|
);
|
|
1857
1873
|
return D ? D.votes : 0;
|
|
1858
|
-
},
|
|
1874
|
+
}, Xe = (C) => {
|
|
1859
1875
|
const D = F.findIndex(
|
|
1860
1876
|
(Z) => Z.id === C
|
|
1861
1877
|
);
|
|
@@ -1866,34 +1882,34 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1866
1882
|
const N = g.find((Z) => Z.id === C);
|
|
1867
1883
|
N && (le(""), ce("all"), m.toLowerCase() === "all" && P(N.team), X(C));
|
|
1868
1884
|
};
|
|
1869
|
-
|
|
1885
|
+
H(() => {
|
|
1870
1886
|
if (!K) return;
|
|
1871
1887
|
const C = F.findIndex(
|
|
1872
1888
|
(D) => D.id === K
|
|
1873
1889
|
);
|
|
1874
1890
|
C !== -1 && (te(C), X(null));
|
|
1875
1891
|
}, [K, F]);
|
|
1876
|
-
const ie = c ? g.find((C) => C.id === c) : void 0,
|
|
1877
|
-
(C, D) => C +
|
|
1892
|
+
const ie = c ? g.find((C) => C.id === c) : void 0, Ge = !!(ie && (m.toLowerCase() === "all" || ie.team === S)), Ye = g.reduce(
|
|
1893
|
+
(C, D) => C + _e(D.id),
|
|
1878
1894
|
0
|
|
1879
1895
|
);
|
|
1880
1896
|
return /* @__PURE__ */ v(Y, { spacing: i.spacing.md, children: [
|
|
1881
1897
|
/* @__PURE__ */ t(
|
|
1882
|
-
|
|
1898
|
+
$t,
|
|
1883
1899
|
{
|
|
1884
1900
|
votingDeadline: u,
|
|
1885
|
-
totalVotes:
|
|
1901
|
+
totalVotes: Ye
|
|
1886
1902
|
}
|
|
1887
1903
|
),
|
|
1888
1904
|
ie && /* @__PURE__ */ t(
|
|
1889
|
-
|
|
1905
|
+
It,
|
|
1890
1906
|
{
|
|
1891
1907
|
playerName: ie.name,
|
|
1892
|
-
onJumpToVote:
|
|
1908
|
+
onJumpToVote: Ge ? () => Xe(ie.id) : void 0
|
|
1893
1909
|
}
|
|
1894
1910
|
),
|
|
1895
1911
|
m.toLowerCase() === "all" && /* @__PURE__ */ t(
|
|
1896
|
-
|
|
1912
|
+
kt,
|
|
1897
1913
|
{
|
|
1898
1914
|
teams: y,
|
|
1899
1915
|
activeFilter: S,
|
|
@@ -1901,9 +1917,9 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1901
1917
|
setActiveIndex: te
|
|
1902
1918
|
}
|
|
1903
1919
|
),
|
|
1904
|
-
/* @__PURE__ */ v(x, { sx:
|
|
1920
|
+
/* @__PURE__ */ v(x, { sx: Zo(i), children: [
|
|
1905
1921
|
/* @__PURE__ */ t(
|
|
1906
|
-
|
|
1922
|
+
Tt,
|
|
1907
1923
|
{
|
|
1908
1924
|
query: oe,
|
|
1909
1925
|
setQuery: le,
|
|
@@ -1912,7 +1928,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1912
1928
|
}
|
|
1913
1929
|
),
|
|
1914
1930
|
/* @__PURE__ */ t(
|
|
1915
|
-
|
|
1931
|
+
_t,
|
|
1916
1932
|
{
|
|
1917
1933
|
positionCounts: xe,
|
|
1918
1934
|
positionFilter: re,
|
|
@@ -1921,7 +1937,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1921
1937
|
}
|
|
1922
1938
|
)
|
|
1923
1939
|
] }),
|
|
1924
|
-
F.length === 0 ? /* @__PURE__ */ v(x, { sx:
|
|
1940
|
+
F.length === 0 ? /* @__PURE__ */ v(x, { sx: bt(i), children: [
|
|
1925
1941
|
/* @__PURE__ */ t(
|
|
1926
1942
|
h,
|
|
1927
1943
|
{
|
|
@@ -1949,14 +1965,14 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1949
1965
|
tabIndex: 0,
|
|
1950
1966
|
role: "region",
|
|
1951
1967
|
"aria-label": d("potm.carousel_label"),
|
|
1952
|
-
sx:
|
|
1953
|
-
onMouseDown:
|
|
1968
|
+
sx: vo,
|
|
1969
|
+
onMouseDown: Ae,
|
|
1954
1970
|
onMouseMove: Oe,
|
|
1955
|
-
onMouseUp:
|
|
1956
|
-
onMouseLeave:
|
|
1971
|
+
onMouseUp: Te,
|
|
1972
|
+
onMouseLeave: Te,
|
|
1957
1973
|
children: [
|
|
1958
1974
|
/* @__PURE__ */ t(
|
|
1959
|
-
|
|
1975
|
+
vt,
|
|
1960
1976
|
{
|
|
1961
1977
|
activeIndex: Q,
|
|
1962
1978
|
totalItems: F.length,
|
|
@@ -1964,13 +1980,13 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1964
1980
|
onNext: me
|
|
1965
1981
|
}
|
|
1966
1982
|
),
|
|
1967
|
-
/* @__PURE__ */ t(x, { sx:
|
|
1968
|
-
(C, D) => Math.abs(D - Q) >
|
|
1969
|
-
|
|
1983
|
+
/* @__PURE__ */ t(x, { sx: zo, children: F.map(
|
|
1984
|
+
(C, D) => Math.abs(D - Q) > Ut ? null : /* @__PURE__ */ t(
|
|
1985
|
+
Pt,
|
|
1970
1986
|
{
|
|
1971
1987
|
player: C,
|
|
1972
1988
|
isSelected: c === C.id,
|
|
1973
|
-
voteCount:
|
|
1989
|
+
voteCount: _e(C.id),
|
|
1974
1990
|
index: D,
|
|
1975
1991
|
activeIndex: Q,
|
|
1976
1992
|
teamLogo: M(C.team),
|
|
@@ -1988,14 +2004,14 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
1988
2004
|
}
|
|
1989
2005
|
),
|
|
1990
2006
|
/* @__PURE__ */ t(
|
|
1991
|
-
|
|
2007
|
+
zt,
|
|
1992
2008
|
{
|
|
1993
2009
|
activeIndex: Q,
|
|
1994
2010
|
totalItems: F.length
|
|
1995
2011
|
}
|
|
1996
2012
|
),
|
|
1997
2013
|
/* @__PURE__ */ t(
|
|
1998
|
-
|
|
2014
|
+
Mt,
|
|
1999
2015
|
{
|
|
2000
2016
|
players: F,
|
|
2001
2017
|
activeIndex: Q,
|
|
@@ -2003,13 +2019,13 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
2003
2019
|
onSelect: ne
|
|
2004
2020
|
}
|
|
2005
2021
|
),
|
|
2006
|
-
F.length > 1 && !l && /* @__PURE__ */ t(h, { sx:
|
|
2022
|
+
F.length > 1 && !l && /* @__PURE__ */ t(h, { sx: yt(i), children: d("potm.helper_text") })
|
|
2007
2023
|
] }),
|
|
2008
|
-
/* @__PURE__ */ t(
|
|
2024
|
+
/* @__PURE__ */ t(oo, { notification: _, onClose: ee })
|
|
2009
2025
|
] });
|
|
2010
|
-
},
|
|
2026
|
+
}, Xt = ({ teams: e, headerBannerStyles: o }) => {
|
|
2011
2027
|
var l, m, w, b, z, p, u, d, i, g, y, M, S, P;
|
|
2012
|
-
const { t: r } =
|
|
2028
|
+
const { t: r } = B(), n = j(), s = (o == null ? void 0 : o.textColor) ?? n.colors.dim;
|
|
2013
2029
|
return /* @__PURE__ */ v(x, { sx: { textAlign: "center", position: "relative" }, children: [
|
|
2014
2030
|
/* @__PURE__ */ v(Y, { spacing: n.spacing.md, sx: { mb: n.spacing.md }, children: [
|
|
2015
2031
|
/* @__PURE__ */ t(h, { level: "h4", sx: { fontSize: "1.25em" }, children: r("potm.title") }),
|
|
@@ -2031,10 +2047,10 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
2031
2047
|
mb: n.spacing.md
|
|
2032
2048
|
},
|
|
2033
2049
|
children: /* @__PURE__ */ v(
|
|
2034
|
-
|
|
2050
|
+
co,
|
|
2035
2051
|
{
|
|
2036
2052
|
variant: "outlined",
|
|
2037
|
-
sx:
|
|
2053
|
+
sx: Io(n, o),
|
|
2038
2054
|
children: [
|
|
2039
2055
|
/* @__PURE__ */ v(
|
|
2040
2056
|
x,
|
|
@@ -2211,13 +2227,13 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
2211
2227
|
}
|
|
2212
2228
|
)
|
|
2213
2229
|
] });
|
|
2214
|
-
},
|
|
2230
|
+
}, We = W.teamPlaceholder, Gt = W.playerPlaceholder, Yt = (e, o) => o === 0 ? "0%" : `${(e / o * 100).toFixed(1)}%`, Kt = ({
|
|
2215
2231
|
results: e,
|
|
2216
2232
|
match: o,
|
|
2217
2233
|
showPlayers: r
|
|
2218
2234
|
}) => {
|
|
2219
|
-
const { t: n } =
|
|
2220
|
-
|
|
2235
|
+
const { t: n } = B(), s = j(), [l, m] = T([]), [w, b] = T(0);
|
|
2236
|
+
H(() => {
|
|
2221
2237
|
if (!(e != null && e.length)) return;
|
|
2222
2238
|
let u = e;
|
|
2223
2239
|
r && r.length > 0 && (u = e.filter(
|
|
@@ -2256,7 +2272,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
2256
2272
|
var i, g;
|
|
2257
2273
|
return o.lineups.homeTeam.players.some(
|
|
2258
2274
|
(y) => y.id === u
|
|
2259
|
-
) ? ((i = o.homeTeam.assets) == null ? void 0 : i.logo) ||
|
|
2275
|
+
) ? ((i = o.homeTeam.assets) == null ? void 0 : i.logo) || We : ((g = o.awayTeam.assets) == null ? void 0 : g.logo) || We;
|
|
2260
2276
|
};
|
|
2261
2277
|
return l.length ? /* @__PURE__ */ v(x, { sx: { pb: s.spacing.xl }, children: [
|
|
2262
2278
|
/* @__PURE__ */ t(x, { sx: { mb: s.spacing.xl }, children: /* @__PURE__ */ t(h, { level: "h3", textAlign: "center", sx: { fontSize: "1.5em" }, children: n("potm.results_title") }) }),
|
|
@@ -2277,7 +2293,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
2277
2293
|
Ce,
|
|
2278
2294
|
{
|
|
2279
2295
|
variant: "outlined",
|
|
2280
|
-
sx:
|
|
2296
|
+
sx: Xo(
|
|
2281
2297
|
i,
|
|
2282
2298
|
y,
|
|
2283
2299
|
M,
|
|
@@ -2286,23 +2302,23 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
2286
2302
|
s
|
|
2287
2303
|
),
|
|
2288
2304
|
children: [
|
|
2289
|
-
/* @__PURE__ */ t(x, { sx:
|
|
2305
|
+
/* @__PURE__ */ t(x, { sx: Go(i, s), children: P() }),
|
|
2290
2306
|
/* @__PURE__ */ t(
|
|
2291
2307
|
"img",
|
|
2292
2308
|
{
|
|
2293
2309
|
src: p(u.playerId),
|
|
2294
|
-
onError:
|
|
2295
|
-
style:
|
|
2310
|
+
onError: Ne(W.teamPlaceholder),
|
|
2311
|
+
style: Yo,
|
|
2296
2312
|
alt: "Team logo"
|
|
2297
2313
|
}
|
|
2298
2314
|
),
|
|
2299
2315
|
/* @__PURE__ */ t(
|
|
2300
2316
|
G,
|
|
2301
2317
|
{
|
|
2302
|
-
src: ((f = u.playerDetails) == null ? void 0 : f.image) ||
|
|
2318
|
+
src: ((f = u.playerDetails) == null ? void 0 : f.image) || Gt,
|
|
2303
2319
|
placeholder: W.playerPlaceholder,
|
|
2304
2320
|
alt: ((_ = u.playerDetails) == null ? void 0 : _.name) || "Player",
|
|
2305
|
-
sx:
|
|
2321
|
+
sx: Ko(i, s)
|
|
2306
2322
|
}
|
|
2307
2323
|
),
|
|
2308
2324
|
/* @__PURE__ */ t(
|
|
@@ -2317,11 +2333,11 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
2317
2333
|
children: /* @__PURE__ */ t(
|
|
2318
2334
|
x,
|
|
2319
2335
|
{
|
|
2320
|
-
sx:
|
|
2336
|
+
sx: Qo(i, s),
|
|
2321
2337
|
children: /* @__PURE__ */ t(
|
|
2322
2338
|
x,
|
|
2323
2339
|
{
|
|
2324
|
-
sx:
|
|
2340
|
+
sx: Jo(
|
|
2325
2341
|
i,
|
|
2326
2342
|
u.percent,
|
|
2327
2343
|
s
|
|
@@ -2386,7 +2402,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
2386
2402
|
level: "title-md",
|
|
2387
2403
|
color: S(),
|
|
2388
2404
|
sx: { fontSize: "1em" },
|
|
2389
|
-
children:
|
|
2405
|
+
children: Yt(u.votes, w)
|
|
2390
2406
|
}
|
|
2391
2407
|
),
|
|
2392
2408
|
/* @__PURE__ */ v(
|
|
@@ -2414,16 +2430,16 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
2414
2430
|
}
|
|
2415
2431
|
)
|
|
2416
2432
|
] }) : /* @__PURE__ */ t(x, { sx: { textAlign: "center", py: s.spacing.xl }, children: /* @__PURE__ */ t(h, { level: "body-lg", sx: { fontSize: "1.125em" }, children: n("potm.no_votes_yet") }) });
|
|
2417
|
-
},
|
|
2418
|
-
const { t: o } =
|
|
2419
|
-
return /* @__PURE__ */ v(x, { sx:
|
|
2420
|
-
/* @__PURE__ */ t(x, { sx:
|
|
2421
|
-
/* @__PURE__ */ t(x, { sx:
|
|
2422
|
-
/* @__PURE__ */ t(h, { level: "h3", sx:
|
|
2423
|
-
/* @__PURE__ */ t(h, { level: "body-md", sx:
|
|
2424
|
-
/* @__PURE__ */ t(Ce, { variant: "outlined", sx:
|
|
2425
|
-
/* @__PURE__ */ t(
|
|
2426
|
-
w ? /* @__PURE__ */ t(h, { level: "title-lg", color: "primary", sx: { fontSize: "1.25em" }, children: o("potm.match_starting_soon") }) : /* @__PURE__ */ v(Y, { direction: "row", spacing: 2, sx:
|
|
2433
|
+
}, Qt = ({ match: e }) => {
|
|
2434
|
+
const { t: o } = B(), r = j(), { days: n, hours: s, minutes: l, seconds: m, isExpired: w } = je(e.kickoffAt);
|
|
2435
|
+
return /* @__PURE__ */ v(x, { sx: Eo(r), children: [
|
|
2436
|
+
/* @__PURE__ */ t(x, { sx: Wo(r) }),
|
|
2437
|
+
/* @__PURE__ */ t(x, { sx: Lo(r) }),
|
|
2438
|
+
/* @__PURE__ */ t(h, { level: "h3", sx: No(r), children: o("potm.voting_opens_soon") }),
|
|
2439
|
+
/* @__PURE__ */ t(h, { level: "body-md", sx: Ho(r), children: o("potm.voting_upcoming_message") }),
|
|
2440
|
+
/* @__PURE__ */ t(Ce, { variant: "outlined", sx: Bo(r), children: /* @__PURE__ */ v(Y, { direction: "row", alignItems: "center", justifyContent: "center", sx: { position: "relative" }, children: [
|
|
2441
|
+
/* @__PURE__ */ t(He, { sx: jo }),
|
|
2442
|
+
w ? /* @__PURE__ */ t(h, { level: "title-lg", color: "primary", sx: { fontSize: "1.25em" }, children: o("potm.match_starting_soon") }) : /* @__PURE__ */ v(Y, { direction: "row", spacing: 2, sx: Fo, children: [
|
|
2427
2443
|
/* @__PURE__ */ t(ue, { value: n, label: o("potm.days"), styles: r }),
|
|
2428
2444
|
/* @__PURE__ */ t(ye, {}),
|
|
2429
2445
|
/* @__PURE__ */ t(ue, { value: s, label: o("potm.hours"), styles: r }),
|
|
@@ -2439,9 +2455,9 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
2439
2455
|
label: o,
|
|
2440
2456
|
styles: r
|
|
2441
2457
|
}) => /* @__PURE__ */ v(Y, { alignItems: "center", children: [
|
|
2442
|
-
/* @__PURE__ */ t(h, { level: "h4", sx:
|
|
2443
|
-
/* @__PURE__ */ t(h, { level: "body-xs", sx:
|
|
2444
|
-
] }), ye = () => /* @__PURE__ */ t(h, { level: "h4", sx:
|
|
2458
|
+
/* @__PURE__ */ t(h, { level: "h4", sx: Uo(r), children: e.toString().padStart(2, "0") }),
|
|
2459
|
+
/* @__PURE__ */ t(h, { level: "body-xs", sx: Ao(r), children: o })
|
|
2460
|
+
] }), ye = () => /* @__PURE__ */ t(h, { level: "h4", sx: Oo, children: ":" }), Le = W.teamPlaceholder, Jt = ({
|
|
2445
2461
|
entityId: e,
|
|
2446
2462
|
sdk: o,
|
|
2447
2463
|
votingWindow: r = 1,
|
|
@@ -2456,10 +2472,10 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
2456
2472
|
headerBannerStyles: u
|
|
2457
2473
|
}) => {
|
|
2458
2474
|
var te, ne;
|
|
2459
|
-
const { t: d } =
|
|
2475
|
+
const { t: d } = B(), i = j(), [g, y] = T(!0), M = to(), [S, P] = T(null), [c, a] = T(null), [k, f] = T(null), [_, R] = T(!1), [$, L] = T(!1), [K, X] = T(!1), [U, ee] = T(!1), [oe, le] = T(!1), re = (V) => {
|
|
2460
2476
|
const I = V.finishedAt ? new Date(V.finishedAt) : (() => {
|
|
2461
|
-
const
|
|
2462
|
-
return
|
|
2477
|
+
const A = new Date(V.kickoffAt);
|
|
2478
|
+
return A.setHours(A.getHours() + 2), A < /* @__PURE__ */ new Date() ? A : null;
|
|
2463
2479
|
})();
|
|
2464
2480
|
return I ? new Date(I.getTime() + r * 60 * 60 * 1e3) : null;
|
|
2465
2481
|
}, ce = (V) => {
|
|
@@ -2470,8 +2486,8 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
2470
2486
|
try {
|
|
2471
2487
|
const I = await o.football.getMatchById(V, M);
|
|
2472
2488
|
P(I);
|
|
2473
|
-
const
|
|
2474
|
-
if (
|
|
2489
|
+
const A = /* @__PURE__ */ new Date(), Se = new Date(I.kickoffAt);
|
|
2490
|
+
if (A < Se) {
|
|
2475
2491
|
L(!0), y(!1);
|
|
2476
2492
|
return;
|
|
2477
2493
|
}
|
|
@@ -2483,8 +2499,8 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
2483
2499
|
return;
|
|
2484
2500
|
} catch (E) {
|
|
2485
2501
|
console.error("Failed to fetch voting results", E);
|
|
2486
|
-
const { status:
|
|
2487
|
-
|
|
2502
|
+
const { status: O } = ge(E, o);
|
|
2503
|
+
O === "match_id_not_full_coverage" ? ee(!0) : R(!0);
|
|
2488
2504
|
}
|
|
2489
2505
|
try {
|
|
2490
2506
|
const E = await o.voting.getOwnVotesForPlayerOfTheMatch({
|
|
@@ -2492,10 +2508,10 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
2492
2508
|
limit: 1
|
|
2493
2509
|
});
|
|
2494
2510
|
if (E.data && E.data.length > 0) {
|
|
2495
|
-
const
|
|
2511
|
+
const O = E.data.find(
|
|
2496
2512
|
(we) => we.matchId === V
|
|
2497
2513
|
);
|
|
2498
|
-
|
|
2514
|
+
O && a(O.playerId);
|
|
2499
2515
|
}
|
|
2500
2516
|
} catch (E) {
|
|
2501
2517
|
console.warn("User not logged in or no votes found", E);
|
|
@@ -2505,20 +2521,20 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
2505
2521
|
f(E);
|
|
2506
2522
|
} catch (E) {
|
|
2507
2523
|
console.error("Failed to fetch voting results", E);
|
|
2508
|
-
const { status:
|
|
2509
|
-
|
|
2524
|
+
const { status: O } = ge(E, o);
|
|
2525
|
+
O === "match_id_not_full_coverage" ? ee(!0) : (O === "voting_potm_finished" || O === "voting_potm_not_started") && R(!0);
|
|
2510
2526
|
}
|
|
2511
2527
|
} catch (I) {
|
|
2512
2528
|
console.error("Failed to fetch match data", I);
|
|
2513
|
-
const { status:
|
|
2514
|
-
|
|
2529
|
+
const { status: A } = ge(I, o);
|
|
2530
|
+
A === "match_id_not_full_coverage" && ee(!0);
|
|
2515
2531
|
} finally {
|
|
2516
2532
|
y(!1);
|
|
2517
2533
|
}
|
|
2518
2534
|
};
|
|
2519
|
-
|
|
2535
|
+
H(() => {
|
|
2520
2536
|
xe(e);
|
|
2521
|
-
}, [e, r, o, M]),
|
|
2537
|
+
}, [e, r, o, M]), H(() => {
|
|
2522
2538
|
le(w === "REGISTERED" && !b);
|
|
2523
2539
|
}, [w, b]);
|
|
2524
2540
|
const F = se(
|
|
@@ -2534,7 +2550,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
2534
2550
|
}
|
|
2535
2551
|
};
|
|
2536
2552
|
if (g)
|
|
2537
|
-
return /* @__PURE__ */ t(
|
|
2553
|
+
return /* @__PURE__ */ t(ro, { my: 20 });
|
|
2538
2554
|
if (!S)
|
|
2539
2555
|
return /* @__PURE__ */ t(x, { sx: { textAlign: "center", p: i.spacing.md, fontSize: "1em" }, children: d(U ? "potm.match_not_full_coverage" : "potm.match_not_found") });
|
|
2540
2556
|
const be = [
|
|
@@ -2542,13 +2558,13 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
2542
2558
|
id: S.homeTeam.id,
|
|
2543
2559
|
name: S.homeTeam.name,
|
|
2544
2560
|
code: S.homeTeam.code || S.homeTeam.name.substring(0, 3),
|
|
2545
|
-
logo: ((te = S.homeTeam.assets) == null ? void 0 : te.logo) ||
|
|
2561
|
+
logo: ((te = S.homeTeam.assets) == null ? void 0 : te.logo) || Le
|
|
2546
2562
|
},
|
|
2547
2563
|
{
|
|
2548
2564
|
id: S.awayTeam.id,
|
|
2549
2565
|
name: S.awayTeam.name,
|
|
2550
2566
|
code: S.awayTeam.code || S.awayTeam.name.substring(0, 3),
|
|
2551
|
-
logo: ((ne = S.awayTeam.assets) == null ? void 0 : ne.logo) ||
|
|
2567
|
+
logo: ((ne = S.awayTeam.assets) == null ? void 0 : ne.logo) || Le
|
|
2552
2568
|
}
|
|
2553
2569
|
], Q = $ || U ? null : K ? d("potm.voting_ended_message", {
|
|
2554
2570
|
defaultValue: "Voting has ended. These are the final results."
|
|
@@ -2558,7 +2574,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
2558
2574
|
{
|
|
2559
2575
|
spacing: i.spacing.md,
|
|
2560
2576
|
sx: {
|
|
2561
|
-
...
|
|
2577
|
+
...yo(i),
|
|
2562
2578
|
backgroundImage: p ? `url(${p})` : "none",
|
|
2563
2579
|
backgroundRepeat: "no-repeat",
|
|
2564
2580
|
backgroundSize: "cover",
|
|
@@ -2567,7 +2583,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
2567
2583
|
},
|
|
2568
2584
|
children: [
|
|
2569
2585
|
l && /* @__PURE__ */ t(
|
|
2570
|
-
|
|
2586
|
+
wo,
|
|
2571
2587
|
{
|
|
2572
2588
|
backgroundImage: l,
|
|
2573
2589
|
link: m,
|
|
@@ -2575,17 +2591,17 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
2575
2591
|
minHeight: "120px"
|
|
2576
2592
|
}
|
|
2577
2593
|
),
|
|
2578
|
-
/* @__PURE__ */ t(
|
|
2594
|
+
/* @__PURE__ */ t(Xt, { teams: be, headerBannerStyles: u }),
|
|
2579
2595
|
/* @__PURE__ */ t(x, { sx: { p: i.spacing.lg }, children: $ ? (
|
|
2580
2596
|
// For upcoming matches - show countdown
|
|
2581
|
-
/* @__PURE__ */ t(
|
|
2597
|
+
/* @__PURE__ */ t(Qt, { match: S })
|
|
2582
2598
|
) : U ? (
|
|
2583
2599
|
// No player data for this match — nothing to vote on, so skip the carousel entirely
|
|
2584
2600
|
/* @__PURE__ */ t(x, { sx: { textAlign: "center", py: i.spacing.xl }, children: /* @__PURE__ */ t(h, { level: "body-lg", sx: { fontSize: "1.125em" }, children: d("potm.match_not_full_coverage") }) })
|
|
2585
2601
|
) : K && k ? (
|
|
2586
2602
|
// For matches where voting period has ended - show results
|
|
2587
2603
|
/* @__PURE__ */ t(
|
|
2588
|
-
|
|
2604
|
+
Kt,
|
|
2589
2605
|
{
|
|
2590
2606
|
results: k.data,
|
|
2591
2607
|
match: S,
|
|
@@ -2595,7 +2611,7 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
2595
2611
|
) : (
|
|
2596
2612
|
// For ongoing/completed matches within voting window - show voting interface
|
|
2597
2613
|
/* @__PURE__ */ t(
|
|
2598
|
-
|
|
2614
|
+
Ot,
|
|
2599
2615
|
{
|
|
2600
2616
|
match: S,
|
|
2601
2617
|
sdk: o,
|
|
@@ -2617,14 +2633,14 @@ const bo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "
|
|
|
2617
2633
|
{
|
|
2618
2634
|
level: "body-sm",
|
|
2619
2635
|
textAlign: "center",
|
|
2620
|
-
sx:
|
|
2636
|
+
sx: Co(i),
|
|
2621
2637
|
children: Q
|
|
2622
2638
|
}
|
|
2623
2639
|
)
|
|
2624
2640
|
]
|
|
2625
2641
|
}
|
|
2626
2642
|
);
|
|
2627
|
-
},
|
|
2643
|
+
}, Zt = (e) => /* @__PURE__ */ t(no, { packageName: "player-of-the-match", ...e, children: /* @__PURE__ */ t(Jt, { ...e }) }), cr = xo(Zt);
|
|
2628
2644
|
export {
|
|
2629
|
-
|
|
2645
|
+
cr as PlayerOfTheMatch
|
|
2630
2646
|
};
|