fansunited-frontend-components 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BattleOfFans.js +512 -469
- package/Betslip.js +1 -1
- package/ChanceGame.js +1 -1
- package/ClassicQuizPlay.js +2 -2
- package/CollectLead.js +1 -1
- package/CompetitionStatistics.js +1 -1
- package/CompetitorCard.js +1 -1
- package/Discussion.js +1 -1
- package/EitherOrPlay.js +2 -2
- package/EventCard.js +1 -1
- package/EventGamePlay.js +2 -2
- package/Leaderboard.js +1 -1
- package/List.js +4 -4
- package/MatchQuizPlay.js +2 -2
- package/Odds.js +1 -1
- package/PersonalityQuizPlay.js +2 -2
- package/PickThePair.js +1 -1
- package/PlayerOfTheMatch.js +805 -857
- package/PollVote.js +2 -2
- package/Predictor.js +1 -1
- package/ProfileStats.d.ts +4 -0
- package/ProfileStats.d.ts.map +1 -0
- package/ProfileStats.js +2781 -0
- package/README.md +65 -4
- package/Standings.js +1 -1
- package/TopX.js +1 -1
- package/chunks/index-CLJiQKNv.js +4 -0
- package/chunks/index-D6-V3WrE.js +4 -0
- package/chunks/index-Dt38wFLo.js +4 -0
- package/chunks/index-Ehvd1Qmz.js +4 -0
- package/chunks/index-QtarvzAb.js +4 -0
- package/chunks/index-kffkFNES.js +4 -0
- package/chunks/{main-DdL0UekL.js → main-BnuQygIM.js} +1853 -1783
- package/chunks/main-BpGmqCTf.js +2142 -0
- package/chunks/main-C0PSUCR_.js +3027 -0
- package/chunks/{main-LEE8n2cG.js → main-CfdOHNHz.js} +1268 -1203
- package/chunks/{main-D_QDfmAw.js → main-PpLP-LeG.js} +1797 -1753
- package/chunks/{main-C7X4dM_P.js → main-p1Qbq-Fw.js} +1532 -1483
- package/chunks/{withVersionStamp-Cck3fT4t.js → withVersionStamp-C1gbpK3-.js} +1 -1
- package/components.d.ts +2 -1
- package/components.d.ts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +11 -9
- package/package.json +6 -2
- package/chunks/index-BNl8scz6.js +0 -4
- package/chunks/index-CSa2JU4m.js +0 -4
- package/chunks/index-Cd1dg0KI.js +0 -4
- package/chunks/index-Cei2fzi7.js +0 -4
- package/chunks/index-Cxb4wEJU.js +0 -4
- package/chunks/index-w1LGN5dz.js +0 -4
- package/chunks/main-07vzblS8.js +0 -2091
- package/chunks/main-DmBfwyb4.js +0 -2992
package/PlayerOfTheMatch.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DirectionalIcon as
|
|
3
|
-
import { BODY_FONT as
|
|
1
|
+
import { jsxs as y, Fragment as Se, jsx as n } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { DirectionalIcon as at, onImageError as We, cdnAssets as Q, useIsRtl as Co, bidiIsolateAuto as Gt, extractSdkError as Le, useDisableCache as $o, hexToRgb as ko, useColors as To } from "fansunited-frontend-core";
|
|
3
|
+
import { BODY_FONT as zo, space as ce, radius as xe, useBreakpointUp as Z, Avatar as Io, Notification as Do, baseBody as Ro, baseHeading as Po, Spinner as _o, BrandedArea as Mo, WidgetPortal as Ao } from "fansunited-frontend-core/ui/emotion";
|
|
4
4
|
import { useTranslation as G } from "react-i18next";
|
|
5
|
-
import { useRef as
|
|
5
|
+
import { useRef as Ce, useEffect as U, useState as I, useMemo as we } from "react";
|
|
6
|
+
import { ChevronLeftIcon as Bo, ChevronRightIcon as Eo, StarIcon as Ke, SearchIcon as Lo, CloseIcon as Wo, FilterAltIcon as st, AccessTimeIcon as Yt, HowToVoteIcon as Fo, CheckCircleIcon as Ho } from "fansunited-frontend-core/ui/icons";
|
|
6
7
|
import { css as r } from "@emotion/react";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { w as Vo } from "./chunks/withVersionStamp-Cck3fT4t.js";
|
|
8
|
+
import { X as Oo } from "fansunited-frontend-core/ui/icons/lucide";
|
|
9
|
+
import { w as No } from "./chunks/withVersionStamp-C1gbpK3-.js";
|
|
10
10
|
const e = {
|
|
11
11
|
fontPrimary: "var(--fu-ucrc-font-primary)",
|
|
12
12
|
fontSecondary: "var(--fu-ucrc-font-secondary)",
|
|
13
13
|
/** Joy's body stack, for text that set no font family. */
|
|
14
|
-
fontBody:
|
|
14
|
+
fontBody: zo,
|
|
15
15
|
space3xs: ce("3xs"),
|
|
16
16
|
space2xs: ce("2xs"),
|
|
17
17
|
spaceXs: ce("xs"),
|
|
@@ -19,11 +19,11 @@ const e = {
|
|
|
19
19
|
spaceMd: ce("md"),
|
|
20
20
|
spaceLg: ce("lg"),
|
|
21
21
|
spaceXl: ce("xl"),
|
|
22
|
-
radiusXs:
|
|
23
|
-
radiusSm:
|
|
24
|
-
radiusMd:
|
|
25
|
-
radiusLg:
|
|
26
|
-
radiusFull:
|
|
22
|
+
radiusXs: xe("xs"),
|
|
23
|
+
radiusSm: xe("sm"),
|
|
24
|
+
radiusMd: xe("md"),
|
|
25
|
+
radiusLg: xe("lg"),
|
|
26
|
+
radiusFull: xe("full"),
|
|
27
27
|
borderSize: "var(--fu-ucrc-border-size)",
|
|
28
28
|
surface: "var(--fu-ucrc-surface)",
|
|
29
29
|
surfaceVariant: "var(--fu-ucrc-surface-variant)",
|
|
@@ -40,7 +40,7 @@ const e = {
|
|
|
40
40
|
primarySoft: "var(--fu-ucrc-potm-primary-soft)",
|
|
41
41
|
/** `r, g, b` of the primary colour, for `rgba(${V.primaryRgb}, alpha)`. */
|
|
42
42
|
primaryRgb: "var(--fu-ucrc-potm-primary-rgb)"
|
|
43
|
-
},
|
|
43
|
+
}, Xo = {
|
|
44
44
|
"primary-soft-hover-bg": ["#C7DFF7", "#12467B"],
|
|
45
45
|
"primary-soft-active-color": ["#0A2744", "#E3EFFB"],
|
|
46
46
|
"primary-soft-active-bg": ["#97C3F0", "#185EA5"],
|
|
@@ -54,12 +54,12 @@ const e = {
|
|
|
54
54
|
"warning-outlined-border": ["#F3C896", "#492B08"],
|
|
55
55
|
"warning-outlined-hover-bg": ["#FDF0E1", "#2E1B05"],
|
|
56
56
|
"warning-outlined-active-bg": ["#FCE1C2", "#492B08"]
|
|
57
|
-
},
|
|
58
|
-
Object.entries(
|
|
57
|
+
}, lt = (t) => Object.fromEntries(
|
|
58
|
+
Object.entries(Xo).map(([o, i]) => [
|
|
59
59
|
`--fu-ucrc-potm-${o}`,
|
|
60
60
|
`var(--fu-ucrc-${o}, ${i[t]})`
|
|
61
61
|
])
|
|
62
|
-
),
|
|
62
|
+
), Vo = r({ ...lt(0), ".dark &": lt(1) }), L = (t) => `var(--fu-ucrc-${t})`, K = (t) => `var(--fu-ucrc-potm-${t})`, v = {
|
|
63
63
|
focus: L("focus-visible"),
|
|
64
64
|
textSecondary: L("palette-text-secondary"),
|
|
65
65
|
textIcon: L("palette-text-icon"),
|
|
@@ -94,12 +94,12 @@ const e = {
|
|
|
94
94
|
warningOutlinedBorder: K("warning-outlined-border"),
|
|
95
95
|
warningOutlinedHoverBg: K("warning-outlined-hover-bg"),
|
|
96
96
|
warningOutlinedActiveBg: K("warning-outlined-active-bg")
|
|
97
|
-
},
|
|
97
|
+
}, ke = { xs: "2px", sm: "6px", md: "8px", cardChild: "3.5px" }, P = {
|
|
98
98
|
margin: 0,
|
|
99
99
|
display: "block",
|
|
100
100
|
fontFamily: e.fontBody,
|
|
101
101
|
lineHeight: 1.5
|
|
102
|
-
},
|
|
102
|
+
}, Kt = {
|
|
103
103
|
boxSizing: "border-box",
|
|
104
104
|
margin: 0,
|
|
105
105
|
font: "inherit",
|
|
@@ -107,9 +107,9 @@ const e = {
|
|
|
107
107
|
userSelect: "none",
|
|
108
108
|
textDecoration: "none",
|
|
109
109
|
WebkitTapHighlightColor: "transparent",
|
|
110
|
-
"&:focus-visible": { outline: `2px solid ${
|
|
111
|
-
},
|
|
112
|
-
...
|
|
110
|
+
"&:focus-visible": { outline: `2px solid ${v.focus}`, outlineOffset: "2px" }
|
|
111
|
+
}, ot = (t) => ({
|
|
112
|
+
...Kt,
|
|
113
113
|
position: "relative",
|
|
114
114
|
display: "inline-flex",
|
|
115
115
|
alignItems: "center",
|
|
@@ -117,56 +117,56 @@ const e = {
|
|
|
117
117
|
minHeight: t === "sm" ? "32px" : "36px",
|
|
118
118
|
padding: t === "sm" ? "4px 12px" : "6px 16px",
|
|
119
119
|
border: "none",
|
|
120
|
-
borderRadius:
|
|
120
|
+
borderRadius: ke.sm,
|
|
121
121
|
fontWeight: 600,
|
|
122
122
|
lineHeight: 1.5,
|
|
123
123
|
"&:disabled": { pointerEvents: "none", cursor: "default" }
|
|
124
|
-
}),
|
|
124
|
+
}), he = {
|
|
125
125
|
softPrimary: {
|
|
126
126
|
"--Icon-color": "currentColor",
|
|
127
|
-
color:
|
|
128
|
-
backgroundColor:
|
|
129
|
-
"@media (hover: hover)": { "&:hover": { backgroundColor:
|
|
130
|
-
"&:active": { color:
|
|
127
|
+
color: v.primarySoftColor,
|
|
128
|
+
backgroundColor: v.primarySoftBg,
|
|
129
|
+
"@media (hover: hover)": { "&:hover": { backgroundColor: v.primarySoftHoverBg } },
|
|
130
|
+
"&:active": { color: v.primarySoftActiveColor, backgroundColor: v.primarySoftActiveBg }
|
|
131
131
|
},
|
|
132
132
|
softNeutral: {
|
|
133
133
|
"--Icon-color": "currentColor",
|
|
134
|
-
color:
|
|
135
|
-
backgroundColor:
|
|
136
|
-
"@media (hover: hover)": { "&:hover": { backgroundColor:
|
|
137
|
-
"&:active": { color:
|
|
134
|
+
color: v.neutralSoftColor,
|
|
135
|
+
backgroundColor: v.neutralSoftBg,
|
|
136
|
+
"@media (hover: hover)": { "&:hover": { backgroundColor: v.neutralSoftHoverBg } },
|
|
137
|
+
"&:active": { color: v.neutralSoftActiveColor, backgroundColor: v.neutralSoftActiveBg }
|
|
138
138
|
},
|
|
139
139
|
outlinedNeutral: {
|
|
140
|
-
"--Icon-color":
|
|
141
|
-
color:
|
|
142
|
-
border: `1px solid ${
|
|
143
|
-
"@media (hover: hover)": { "&:hover": { backgroundColor:
|
|
144
|
-
"&:active": { backgroundColor:
|
|
140
|
+
"--Icon-color": v.textIcon,
|
|
141
|
+
color: v.neutralOutlinedColor,
|
|
142
|
+
border: `1px solid ${v.neutralOutlinedBorder}`,
|
|
143
|
+
"@media (hover: hover)": { "&:hover": { backgroundColor: v.neutralOutlinedHoverBg } },
|
|
144
|
+
"&:active": { backgroundColor: v.neutralOutlinedActiveBg }
|
|
145
145
|
}
|
|
146
|
-
},
|
|
147
|
-
...
|
|
146
|
+
}, Qt = {
|
|
147
|
+
...Kt,
|
|
148
148
|
lineHeight: "normal",
|
|
149
149
|
// IconButton never set one, so the UA button's applied
|
|
150
150
|
display: "inline-flex",
|
|
151
151
|
alignItems: "center",
|
|
152
152
|
justifyContent: "center",
|
|
153
153
|
border: "none",
|
|
154
|
-
borderRadius:
|
|
154
|
+
borderRadius: ke.sm,
|
|
155
155
|
fontWeight: 500,
|
|
156
156
|
backgroundColor: "transparent",
|
|
157
|
-
color:
|
|
158
|
-
"--Icon-color":
|
|
157
|
+
color: v.neutralPlainColor,
|
|
158
|
+
"--Icon-color": v.textIcon,
|
|
159
159
|
"@media (hover: hover)": {
|
|
160
|
-
"&:hover": { "--Icon-color": "currentColor", backgroundColor:
|
|
160
|
+
"&:hover": { "--Icon-color": "currentColor", backgroundColor: v.neutralPlainHoverBg, color: v.neutralPlainHoverColor }
|
|
161
161
|
},
|
|
162
|
-
"&:active": { "--Icon-color": "currentColor", backgroundColor:
|
|
163
|
-
"&:disabled": { pointerEvents: "none", cursor: "default", color:
|
|
164
|
-
},
|
|
162
|
+
"&:active": { "--Icon-color": "currentColor", backgroundColor: v.neutralPlainActiveBg },
|
|
163
|
+
"&:disabled": { pointerEvents: "none", cursor: "default", color: v.neutralPlainDisabledColor }
|
|
164
|
+
}, qt = (t) => r({ display: "flex", marginRight: t }), $e = {
|
|
165
165
|
teamButton: { margin: "0 0 0 -3px" },
|
|
166
166
|
cta: { margin: "0 0 0 -4px" },
|
|
167
167
|
chip: { margin: "0 0 0 -1.5px" },
|
|
168
168
|
input: { margin: "0 0 0 calc(0.875em / -4)" }
|
|
169
|
-
},
|
|
169
|
+
}, jo = {
|
|
170
170
|
display: "flex",
|
|
171
171
|
alignItems: "center",
|
|
172
172
|
justifyContent: "center",
|
|
@@ -174,61 +174,9 @@ const e = {
|
|
|
174
174
|
overflow: "hidden",
|
|
175
175
|
borderRadius: 0,
|
|
176
176
|
lineHeight: 1
|
|
177
|
-
},
|
|
178
|
-
position: "relative",
|
|
179
|
-
width: "100%",
|
|
180
|
-
backgroundPosition: "center center",
|
|
181
|
-
// Always center the image
|
|
182
|
-
backgroundRepeat: "no-repeat",
|
|
183
|
-
overflow: "hidden",
|
|
184
|
-
display: "flex",
|
|
185
|
-
alignItems: "center",
|
|
186
|
-
justifyContent: "center"
|
|
187
|
-
}, ut = { position: "relative", zIndex: 2, height: "100%" }, fe = {
|
|
188
|
-
// The image is 860px wide: on mobile it keeps its aspect ratio and fills the height, so the
|
|
189
|
-
// sides get cut off but the centre 300px stays visible.
|
|
190
|
-
area: r({ ...dt, backgroundSize: "auto 100%" }),
|
|
191
|
-
areaSm: r({ ...dt, backgroundSize: "860px 150px" }),
|
|
192
|
-
overlay: r({ position: "absolute", top: 0, left: 0, right: 0, bottom: 0, background: "transparent", zIndex: 1 }),
|
|
193
|
-
safeArea: r({ ...ut, width: "100%" }),
|
|
194
|
-
safeAreaSm: r({ ...ut, width: "300px" }),
|
|
195
|
-
link: r({
|
|
196
|
-
display: "block",
|
|
197
|
-
alignItems: "center",
|
|
198
|
-
position: "relative",
|
|
199
|
-
margin: 0,
|
|
200
|
-
padding: 0,
|
|
201
|
-
border: 0,
|
|
202
|
-
borderRadius: ve.xs,
|
|
203
|
-
outline: 0,
|
|
204
|
-
backgroundColor: "transparent",
|
|
205
|
-
fontFamily: e.fontBody,
|
|
206
|
-
fontSize: "1em",
|
|
207
|
-
lineHeight: 1.5,
|
|
208
|
-
color: "rgba(var(--fu-ucrc-primary-main-channel) / 1)",
|
|
209
|
-
textDecoration: "none",
|
|
210
|
-
textUnderlineOffset: "0.15em",
|
|
211
|
-
cursor: "pointer",
|
|
212
|
-
WebkitTapHighlightColor: "transparent",
|
|
213
|
-
"&:hover": { opacity: 0.95 },
|
|
214
|
-
"&:focus-visible": { outline: "2px solid var(--fu-ucrc-focus-visible)", outlineOffset: "2px" }
|
|
215
|
-
})
|
|
216
|
-
}, Yo = ({ backgroundImage: t, link: o, height: i = "150px", minHeight: l = "150px" }) => {
|
|
217
|
-
const p = Z("sm"), u = /* @__PURE__ */ v(
|
|
218
|
-
"div",
|
|
219
|
-
{
|
|
220
|
-
css: p ? fe.areaSm : fe.area,
|
|
221
|
-
style: { height: i, minHeight: l, backgroundImage: t ? `url(${t})` : "none" },
|
|
222
|
-
children: [
|
|
223
|
-
/* @__PURE__ */ n("div", { css: fe.overlay }),
|
|
224
|
-
/* @__PURE__ */ n("div", { css: p ? fe.safeAreaSm : fe.safeArea })
|
|
225
|
-
]
|
|
226
|
-
}
|
|
227
|
-
);
|
|
228
|
-
return o ? /* @__PURE__ */ n("a", { href: o, target: "_blank", rel: "noopener noreferrer", css: fe.link, children: u }) : u;
|
|
229
|
-
}, to = "24.5em", oo = "@media (prefers-reduced-motion: reduce)", ie = {
|
|
177
|
+
}, Jt = "24.5em", Zt = "@media (prefers-reduced-motion: reduce)", ie = {
|
|
230
178
|
// Joy Stack spacing: a top margin on every child after the first, not a gap.
|
|
231
|
-
root: r(
|
|
179
|
+
root: r(Vo, {
|
|
232
180
|
display: "flex",
|
|
233
181
|
flexDirection: "column",
|
|
234
182
|
"& > :not(style):not(style)": { margin: 0 },
|
|
@@ -257,13 +205,13 @@ const e = {
|
|
|
257
205
|
color: e.dim
|
|
258
206
|
}),
|
|
259
207
|
noResultsText: r(P, { color: "inherit", fontSize: "1em" }),
|
|
260
|
-
clearFilters: r(
|
|
208
|
+
clearFilters: r(ot("sm"), he.outlinedNeutral, {
|
|
261
209
|
backgroundColor: "transparent",
|
|
262
210
|
fontSize: "0.875em"
|
|
263
211
|
}),
|
|
264
212
|
container: r({
|
|
265
213
|
position: "relative",
|
|
266
|
-
height:
|
|
214
|
+
height: Jt,
|
|
267
215
|
overflow: "visible",
|
|
268
216
|
// Cards scale/translate outside the box
|
|
269
217
|
width: "100%",
|
|
@@ -284,7 +232,7 @@ const e = {
|
|
|
284
232
|
justifyContent: "center"
|
|
285
233
|
}),
|
|
286
234
|
hint: r(P, { color: e.tertiary, fontSize: "0.875em", textAlign: "center" })
|
|
287
|
-
},
|
|
235
|
+
}, Uo = (t, o, i) => r(Qt, {
|
|
288
236
|
position: "absolute",
|
|
289
237
|
top: "50%",
|
|
290
238
|
transform: "translateY(-50%)",
|
|
@@ -314,11 +262,11 @@ const e = {
|
|
|
314
262
|
// The carousel handles ←/→ itself, so after a click the focused arrow would light up on
|
|
315
263
|
// every key press. Joy never showed a ring here either (its focus var didn't resolve).
|
|
316
264
|
"&:focus-visible": { outline: "none" }
|
|
317
|
-
}),
|
|
265
|
+
}), Qe = {};
|
|
318
266
|
for (const t of ["left", "right"])
|
|
319
267
|
for (const o of [!1, !0])
|
|
320
|
-
for (const i of [!1, !0])
|
|
321
|
-
const
|
|
268
|
+
for (const i of [!1, !0]) Qe[`${t}|${o}|${i}`] = Uo(t, o, i);
|
|
269
|
+
const Re = {
|
|
322
270
|
// Static on purpose: a normal Stack sibling, so a tall card can't push over it.
|
|
323
271
|
wrapper: r({
|
|
324
272
|
display: "flex",
|
|
@@ -358,7 +306,7 @@ const Pe = {
|
|
|
358
306
|
borderRadius: "0.125em",
|
|
359
307
|
backgroundColor: e.primary,
|
|
360
308
|
transition: "width 250ms ease-out",
|
|
361
|
-
[
|
|
309
|
+
[Zt]: { transition: "none" }
|
|
362
310
|
})
|
|
363
311
|
}, ne = {
|
|
364
312
|
bar: r({
|
|
@@ -404,7 +352,7 @@ const Pe = {
|
|
|
404
352
|
}),
|
|
405
353
|
separator: r(P, { display: "none", color: e.tertiary, fontSize: "0.8125em", opacity: 0.6 }),
|
|
406
354
|
separatorShown: r(P, { color: e.tertiary, fontSize: "0.8125em", opacity: 0.6 })
|
|
407
|
-
},
|
|
355
|
+
}, ct = {
|
|
408
356
|
display: "inline-flex",
|
|
409
357
|
alignItems: "center",
|
|
410
358
|
gap: e.space2xs,
|
|
@@ -420,9 +368,9 @@ const Pe = {
|
|
|
420
368
|
fontFamily: e.fontPrimary,
|
|
421
369
|
transition: "background-color 150ms ease",
|
|
422
370
|
"&:hover": { backgroundColor: `rgba(${e.primaryRgb}, 0.18)` }
|
|
423
|
-
},
|
|
424
|
-
pill: r(
|
|
425
|
-
pillStatic: r(
|
|
371
|
+
}, Pe = {
|
|
372
|
+
pill: r(ct),
|
|
373
|
+
pillStatic: r(ct, { cursor: "default", "&:hover": { backgroundColor: "inherit" } }),
|
|
426
374
|
text: r(P, {
|
|
427
375
|
fontSize: "inherit",
|
|
428
376
|
color: "inherit",
|
|
@@ -437,7 +385,7 @@ const Pe = {
|
|
|
437
385
|
textDecoration: "underline",
|
|
438
386
|
flexShrink: 0
|
|
439
387
|
})
|
|
440
|
-
},
|
|
388
|
+
}, Ve = {
|
|
441
389
|
root: r({ position: "relative", width: "100%", fontSize: "1em" }),
|
|
442
390
|
scroller: r({
|
|
443
391
|
display: "flex",
|
|
@@ -473,7 +421,7 @@ const Pe = {
|
|
|
473
421
|
fontSize: "1em",
|
|
474
422
|
zIndex: 2
|
|
475
423
|
})
|
|
476
|
-
},
|
|
424
|
+
}, dt = (t) => r({
|
|
477
425
|
position: "relative",
|
|
478
426
|
flex: "0 0 auto",
|
|
479
427
|
display: "flex",
|
|
@@ -495,11 +443,11 @@ const Pe = {
|
|
|
495
443
|
outlineOffset: "0.125em",
|
|
496
444
|
borderRadius: e.radiusXs
|
|
497
445
|
},
|
|
498
|
-
[
|
|
446
|
+
[Zt]: {
|
|
499
447
|
transition: "opacity 150ms ease",
|
|
500
448
|
"&:hover": { opacity: 1, transform: "none" }
|
|
501
449
|
}
|
|
502
|
-
}),
|
|
450
|
+
}), ut = { lit: dt(!0), dim: dt(!1) }, Go = (t, o, i) => r({
|
|
503
451
|
position: "relative",
|
|
504
452
|
width: "2.5em",
|
|
505
453
|
height: "2.5em",
|
|
@@ -511,54 +459,54 @@ const Pe = {
|
|
|
511
459
|
boxShadow: t ? `0 0 0 ${e.borderSize} ${e.primary}` : "none",
|
|
512
460
|
filter: t ? "none" : "saturate(0.75)",
|
|
513
461
|
transition: "border-color 150ms ease, box-shadow 150ms ease"
|
|
514
|
-
}),
|
|
462
|
+
}), eo = {};
|
|
515
463
|
for (const t of [!1, !0])
|
|
516
464
|
for (const o of [!1, !0])
|
|
517
465
|
for (const i of [!1, !0])
|
|
518
|
-
|
|
519
|
-
const
|
|
466
|
+
eo[`${t}|${o}|${i}`] = Go(t, o, i);
|
|
467
|
+
const mt = (t) => r(P, {
|
|
520
468
|
fontSize: "0.6875em",
|
|
521
469
|
fontVariantNumeric: "tabular-nums",
|
|
522
470
|
fontWeight: 600,
|
|
523
471
|
lineHeight: 1.2,
|
|
524
472
|
color: t ? e.primary : e.tertiary
|
|
525
|
-
}),
|
|
526
|
-
const
|
|
473
|
+
}), pt = { active: mt(!0), idle: mt(!1) }, Yo = ({ activeIndex: t, totalItems: o, onPrev: i, onNext: d }) => {
|
|
474
|
+
const h = Z("sm");
|
|
527
475
|
if (o <= 1) return null;
|
|
528
|
-
const
|
|
529
|
-
return /* @__PURE__ */
|
|
476
|
+
const m = t === 0, p = t === o - 1;
|
|
477
|
+
return /* @__PURE__ */ y(Se, { children: [
|
|
530
478
|
/* @__PURE__ */ n(
|
|
531
479
|
"button",
|
|
532
480
|
{
|
|
533
481
|
type: "button",
|
|
534
482
|
onClick: i,
|
|
535
|
-
disabled:
|
|
536
|
-
css:
|
|
483
|
+
disabled: m,
|
|
484
|
+
css: Qe[`left|${m}|${h}`],
|
|
537
485
|
"aria-label": "Previous player",
|
|
538
|
-
children: /* @__PURE__ */ n(
|
|
486
|
+
children: /* @__PURE__ */ n(at, { children: /* @__PURE__ */ n(Bo, { size: "1.5em", color: e.onPrimary }) })
|
|
539
487
|
}
|
|
540
488
|
),
|
|
541
489
|
/* @__PURE__ */ n(
|
|
542
490
|
"button",
|
|
543
491
|
{
|
|
544
492
|
type: "button",
|
|
545
|
-
onClick:
|
|
546
|
-
disabled:
|
|
547
|
-
css:
|
|
493
|
+
onClick: d,
|
|
494
|
+
disabled: p,
|
|
495
|
+
css: Qe[`right|${p}|${h}`],
|
|
548
496
|
"aria-label": "Next player",
|
|
549
|
-
children: /* @__PURE__ */ n(
|
|
497
|
+
children: /* @__PURE__ */ n(at, { children: /* @__PURE__ */ n(Eo, { size: "1.5em", color: e.onPrimary }) })
|
|
550
498
|
}
|
|
551
499
|
)
|
|
552
500
|
] });
|
|
553
|
-
},
|
|
501
|
+
}, Ko = ({
|
|
554
502
|
activeIndex: t,
|
|
555
503
|
totalItems: o
|
|
556
504
|
}) => {
|
|
557
505
|
const { t: i } = G();
|
|
558
506
|
if (o <= 1) return null;
|
|
559
|
-
const
|
|
560
|
-
return /* @__PURE__ */
|
|
561
|
-
/* @__PURE__ */ n("p", { "aria-live": "polite", css:
|
|
507
|
+
const d = (t + 1) / o * 100;
|
|
508
|
+
return /* @__PURE__ */ y("div", { css: Re.wrapper, children: [
|
|
509
|
+
/* @__PURE__ */ n("p", { "aria-live": "polite", css: Re.counter, children: i("potm.player_position", {
|
|
562
510
|
current: t + 1,
|
|
563
511
|
total: o
|
|
564
512
|
}) }),
|
|
@@ -569,15 +517,15 @@ const gt = (t) => r(P, {
|
|
|
569
517
|
"aria-valuemin": 1,
|
|
570
518
|
"aria-valuemax": o,
|
|
571
519
|
"aria-valuenow": t + 1,
|
|
572
|
-
css:
|
|
573
|
-
children: /* @__PURE__ */ n("div", { css:
|
|
520
|
+
css: Re.track,
|
|
521
|
+
children: /* @__PURE__ */ n("div", { css: Re.fill, style: { width: `${d}%` } })
|
|
574
522
|
}
|
|
575
523
|
)
|
|
576
524
|
] });
|
|
577
|
-
},
|
|
525
|
+
}, Qo = { width: "100%", height: "100%", objectFit: "cover" }, nt = ({ src: t, placeholder: o, alt: i, className: d, style: h }) => (
|
|
578
526
|
// `style` replaces the Avatar's own inline root style, so it is only passed when given.
|
|
579
|
-
/* @__PURE__ */ n(
|
|
580
|
-
),
|
|
527
|
+
/* @__PURE__ */ n(Io, { src: t, alt: i, className: d, ...h && { style: h }, children: /* @__PURE__ */ n("img", { src: o, alt: i ?? "", onError: We(), style: Qo }) })
|
|
528
|
+
), qo = (t, o, i) => r({
|
|
581
529
|
position: "absolute",
|
|
582
530
|
top: 0,
|
|
583
531
|
left: 0,
|
|
@@ -585,7 +533,7 @@ const gt = (t) => r(P, {
|
|
|
585
533
|
marginLeft: "auto",
|
|
586
534
|
marginRight: "auto",
|
|
587
535
|
width: i ? "15em" : "13em",
|
|
588
|
-
height:
|
|
536
|
+
height: Jt,
|
|
589
537
|
maxWidth: "90%",
|
|
590
538
|
boxSizing: "border-box",
|
|
591
539
|
display: "flex",
|
|
@@ -596,13 +544,13 @@ const gt = (t) => r(P, {
|
|
|
596
544
|
fontFamily: e.fontBody,
|
|
597
545
|
fontSize: "1em",
|
|
598
546
|
lineHeight: 1.5,
|
|
599
|
-
color:
|
|
547
|
+
color: v.neutralOutlinedColor,
|
|
600
548
|
backgroundColor: e.surface,
|
|
601
549
|
backgroundRepeat: "no-repeat",
|
|
602
550
|
backgroundSize: "cover",
|
|
603
551
|
backgroundPosition: "center",
|
|
604
552
|
border: `${e.borderSize} solid`,
|
|
605
|
-
borderRadius:
|
|
553
|
+
borderRadius: ke.md,
|
|
606
554
|
borderColor: t ? e.primary : e.primarySoft,
|
|
607
555
|
boxShadow: t ? "0 0.5em 1.5em rgba(0,0,0,0.12)" : o ? `0 0 0 ${e.borderSize} ${e.primary}` : "none",
|
|
608
556
|
overflow: "visible",
|
|
@@ -613,11 +561,11 @@ const gt = (t) => r(P, {
|
|
|
613
561
|
transition: "border-color 300ms ease-out, box-shadow 300ms ease-out"
|
|
614
562
|
},
|
|
615
563
|
"&:hover": { borderColor: e.primary, cursor: "default" }
|
|
616
|
-
}),
|
|
564
|
+
}), to = {};
|
|
617
565
|
for (const t of [!1, !0])
|
|
618
566
|
for (const o of [!1, !0])
|
|
619
|
-
for (const i of [!1, !0])
|
|
620
|
-
const
|
|
567
|
+
for (const i of [!1, !0]) to[`${t}|${o}|${i}`] = qo(t, o, i);
|
|
568
|
+
const _e = {
|
|
621
569
|
cluster: r({
|
|
622
570
|
position: "absolute",
|
|
623
571
|
top: "0.625em",
|
|
@@ -657,7 +605,7 @@ const Ae = {
|
|
|
657
605
|
lineHeight: 1.6,
|
|
658
606
|
whiteSpace: "nowrap"
|
|
659
607
|
})
|
|
660
|
-
},
|
|
608
|
+
}, Jo = r({
|
|
661
609
|
width: "1.75em",
|
|
662
610
|
height: "1.75em",
|
|
663
611
|
objectFit: "contain",
|
|
@@ -665,7 +613,7 @@ const Ae = {
|
|
|
665
613
|
position: "absolute",
|
|
666
614
|
top: "0.625em",
|
|
667
615
|
right: "0.625em"
|
|
668
|
-
}),
|
|
616
|
+
}), Zo = r({
|
|
669
617
|
zIndex: 1,
|
|
670
618
|
display: "flex",
|
|
671
619
|
flexDirection: "column",
|
|
@@ -680,17 +628,17 @@ const Ae = {
|
|
|
680
628
|
// Lets the text children shrink so ellipsis can kick in
|
|
681
629
|
overflow: "hidden"
|
|
682
630
|
// Clip instead of forcing the fixed-height card to grow
|
|
683
|
-
}),
|
|
631
|
+
}), ft = {
|
|
684
632
|
position: "relative",
|
|
685
633
|
width: "6em",
|
|
686
634
|
height: "6em",
|
|
687
635
|
marginBottom: e.spaceMd,
|
|
688
636
|
border: `${e.borderSize} solid ${e.primary}`,
|
|
689
637
|
backgroundColor: e.surface
|
|
690
|
-
},
|
|
691
|
-
active: r(
|
|
692
|
-
idle: r(
|
|
693
|
-
},
|
|
638
|
+
}, gt = {
|
|
639
|
+
active: r(ft),
|
|
640
|
+
idle: r(ft, { filter: "saturate(0.5) brightness(0.9)" })
|
|
641
|
+
}, ht = (t) => r(P, {
|
|
694
642
|
display: "-webkit-box",
|
|
695
643
|
marginBottom: e.space2xs,
|
|
696
644
|
fontSize: "1.25em",
|
|
@@ -705,7 +653,7 @@ const Ae = {
|
|
|
705
653
|
WebkitLineClamp: 2,
|
|
706
654
|
WebkitBoxOrient: "vertical",
|
|
707
655
|
overflow: "hidden"
|
|
708
|
-
}),
|
|
656
|
+
}), bt = { active: ht(!0), idle: ht(!1) }, Me = (t) => r(P, {
|
|
709
657
|
fontSize: "0.875em",
|
|
710
658
|
// body-sm
|
|
711
659
|
color: t,
|
|
@@ -719,19 +667,19 @@ const Ae = {
|
|
|
719
667
|
marginBottom: e.spaceXs,
|
|
720
668
|
minHeight: "1.25em",
|
|
721
669
|
flexShrink: 0
|
|
722
|
-
}),
|
|
670
|
+
}), Ae = {
|
|
723
671
|
positionActive: Me(e.text),
|
|
724
672
|
positionIdle: Me(e.dim),
|
|
725
673
|
minutesActive: r(Me(e.primary), { fontWeight: 500 }),
|
|
726
674
|
minutesIdle: r(Me(e.tertiary), { fontWeight: 500 })
|
|
727
|
-
},
|
|
675
|
+
}, en = r(P, {
|
|
728
676
|
color: e.dim,
|
|
729
677
|
fontSize: "0.875em",
|
|
730
678
|
// body-sm
|
|
731
679
|
minHeight: "1.5em",
|
|
732
680
|
flexShrink: 0,
|
|
733
681
|
textAlign: "center"
|
|
734
|
-
}),
|
|
682
|
+
}), tn = r({
|
|
735
683
|
zIndex: 1,
|
|
736
684
|
display: "flex",
|
|
737
685
|
flexDirection: "row",
|
|
@@ -739,130 +687,130 @@ const Ae = {
|
|
|
739
687
|
gap: "10px",
|
|
740
688
|
width: "100%",
|
|
741
689
|
padding: `12px 0 ${e.spaceMd}`
|
|
742
|
-
}),
|
|
743
|
-
...
|
|
744
|
-
borderRadius:
|
|
690
|
+
}), je = {
|
|
691
|
+
...ot("md"),
|
|
692
|
+
borderRadius: ke.cardChild,
|
|
745
693
|
// Joy's --Card-childRadius
|
|
746
694
|
flex: "1 1 auto",
|
|
747
695
|
width: "100%",
|
|
748
696
|
zIndex: 30
|
|
749
697
|
// Above the carousel's drag surface
|
|
750
|
-
},
|
|
698
|
+
}, vt = {
|
|
751
699
|
"--Icon-color": "currentColor",
|
|
752
|
-
color:
|
|
753
|
-
backgroundColor:
|
|
754
|
-
"@media (hover: hover)": { "&:hover": { backgroundColor:
|
|
755
|
-
"&:active": { backgroundColor:
|
|
700
|
+
color: v.primarySolidColor,
|
|
701
|
+
backgroundColor: v.primarySolidBg,
|
|
702
|
+
"@media (hover: hover)": { "&:hover": { backgroundColor: v.primarySolidHoverBg } },
|
|
703
|
+
"&:active": { backgroundColor: v.primarySolidActiveBg }
|
|
756
704
|
}, ue = {};
|
|
757
705
|
for (const t of [!1, !0]) {
|
|
758
706
|
const o = t ? "1em" : "0.8em";
|
|
759
|
-
ue[`signIn|${t}`] = r(
|
|
707
|
+
ue[`signIn|${t}`] = r(je, vt, {
|
|
760
708
|
fontSize: o,
|
|
761
|
-
"&:disabled": { color:
|
|
762
|
-
}), ue[`vote|${t}`] = r(
|
|
709
|
+
"&:disabled": { color: v.primarySolidDisabledColor, backgroundColor: v.primarySolidDisabledBg }
|
|
710
|
+
}), ue[`vote|${t}`] = r(je, vt, {
|
|
763
711
|
fontSize: o,
|
|
764
|
-
"&:disabled": { color: e.tertiary, backgroundColor:
|
|
765
|
-
}), ue[`remove|${t}`] = r(
|
|
712
|
+
"&:disabled": { color: e.tertiary, backgroundColor: v.primaryOutlinedBorder }
|
|
713
|
+
}), ue[`remove|${t}`] = r(je, {
|
|
766
714
|
"--Icon-color": "currentColor",
|
|
767
|
-
color:
|
|
715
|
+
color: v.warningOutlinedColor,
|
|
768
716
|
backgroundColor: "transparent",
|
|
769
|
-
border: `1px solid ${
|
|
717
|
+
border: `1px solid ${v.warningOutlinedBorder}`,
|
|
770
718
|
fontSize: o,
|
|
771
|
-
"@media (hover: hover)": { "&:hover": { backgroundColor:
|
|
772
|
-
"&:active": { backgroundColor:
|
|
719
|
+
"@media (hover: hover)": { "&:hover": { backgroundColor: v.warningOutlinedHoverBg } },
|
|
720
|
+
"&:active": { backgroundColor: v.warningOutlinedActiveBg },
|
|
773
721
|
"&:disabled": { backgroundColor: "transparent", color: e.warning, borderColor: e.warning }
|
|
774
722
|
});
|
|
775
723
|
}
|
|
776
|
-
const
|
|
777
|
-
const
|
|
724
|
+
const yt = qt("8px"), on = Q.playerPlaceholder, nn = (t, o, i) => {
|
|
725
|
+
const d = t - o, h = 1 - Math.min(0.25, Math.abs(d) * 0.15);
|
|
778
726
|
return {
|
|
779
|
-
transform: `translateX(${
|
|
780
|
-
zIndex: 20 - Math.abs(
|
|
727
|
+
transform: `translateX(${d * 55 * (i ? -1 : 1)}%) scale(${h})`,
|
|
728
|
+
zIndex: 20 - Math.abs(d),
|
|
781
729
|
opacity: 1
|
|
782
730
|
};
|
|
783
|
-
},
|
|
731
|
+
}, rn = ({
|
|
784
732
|
player: t,
|
|
785
733
|
isSelected: o,
|
|
786
734
|
index: i,
|
|
787
|
-
activeIndex:
|
|
788
|
-
teamLogo:
|
|
789
|
-
handleVote:
|
|
790
|
-
isVoting:
|
|
735
|
+
activeIndex: d,
|
|
736
|
+
teamLogo: h,
|
|
737
|
+
handleVote: m,
|
|
738
|
+
isVoting: p,
|
|
791
739
|
isVotingClosed: b,
|
|
792
740
|
defaultImagePlaceholderUrl: x,
|
|
793
|
-
showSignInCTA:
|
|
741
|
+
showSignInCTA: T,
|
|
794
742
|
signInCTA: s,
|
|
795
|
-
voteCount:
|
|
743
|
+
voteCount: g
|
|
796
744
|
}) => {
|
|
797
|
-
const { t:
|
|
798
|
-
...
|
|
745
|
+
const { t: c } = G(), l = Co(), f = Z("sm"), $ = f ? "1.25em" : "1.5625em", w = i === d, E = {
|
|
746
|
+
...nn(i, d, l),
|
|
799
747
|
backgroundImage: x ? `url(${x})` : void 0
|
|
800
|
-
}, _ = (
|
|
801
|
-
/* @__PURE__ */ n("span", { css:
|
|
802
|
-
(s == null ? void 0 : s.defaultLabel) ??
|
|
748
|
+
}, _ = (S) => (S.stopPropagation(), S.preventDefault(), m(t.id), !1), u = /* @__PURE__ */ y(Se, { children: [
|
|
749
|
+
/* @__PURE__ */ n("span", { css: yt, children: /* @__PURE__ */ n(Ke, { size: $, style: $e.cta }) }),
|
|
750
|
+
(s == null ? void 0 : s.defaultLabel) ?? c("common.signIn")
|
|
803
751
|
] }), a = () => s != null && s.component ? s.component : s != null && s.onClick ? /* @__PURE__ */ n(
|
|
804
752
|
"button",
|
|
805
753
|
{
|
|
806
754
|
type: "button",
|
|
807
755
|
onClick: s.onClick,
|
|
808
|
-
onMouseDown: (
|
|
809
|
-
onTouchStart: (
|
|
810
|
-
disabled: !
|
|
811
|
-
css: ue[`signIn|${
|
|
812
|
-
children:
|
|
756
|
+
onMouseDown: (S) => S.stopPropagation(),
|
|
757
|
+
onTouchStart: (S) => S.stopPropagation(),
|
|
758
|
+
disabled: !w,
|
|
759
|
+
css: ue[`signIn|${f}`],
|
|
760
|
+
children: u
|
|
813
761
|
}
|
|
814
762
|
) : s != null && s.url ? /* @__PURE__ */ n(
|
|
815
763
|
"button",
|
|
816
764
|
{
|
|
817
765
|
type: "button",
|
|
818
|
-
onClick: (
|
|
819
|
-
|
|
766
|
+
onClick: (S) => {
|
|
767
|
+
S.stopPropagation(), s.target === "_blank" ? window.open(s.url, "_blank") : window.location.href = s.url;
|
|
820
768
|
},
|
|
821
|
-
onMouseDown: (
|
|
822
|
-
onTouchStart: (
|
|
823
|
-
disabled: !
|
|
824
|
-
css: ue[`signIn|${
|
|
825
|
-
children:
|
|
769
|
+
onMouseDown: (S) => S.stopPropagation(),
|
|
770
|
+
onTouchStart: (S) => S.stopPropagation(),
|
|
771
|
+
disabled: !w,
|
|
772
|
+
css: ue[`signIn|${f}`],
|
|
773
|
+
children: u
|
|
826
774
|
}
|
|
827
|
-
) : /* @__PURE__ */ n("button", { type: "button", disabled: !0, css: ue[`signIn|${
|
|
828
|
-
return /* @__PURE__ */
|
|
829
|
-
/* @__PURE__ */
|
|
830
|
-
/* @__PURE__ */ n("div", { css:
|
|
831
|
-
t.type !== "start" && /* @__PURE__ */ n("p", { css:
|
|
775
|
+
) : /* @__PURE__ */ n("button", { type: "button", disabled: !0, css: ue[`signIn|${f}`], children: u });
|
|
776
|
+
return /* @__PURE__ */ y("div", { css: to[`${w}|${o}|${f}`], style: E, children: [
|
|
777
|
+
/* @__PURE__ */ y("div", { css: _e.cluster, children: [
|
|
778
|
+
/* @__PURE__ */ n("div", { css: _e.number, children: /* @__PURE__ */ n("p", { css: _e.numberText, children: t.number }) }),
|
|
779
|
+
t.type !== "start" && /* @__PURE__ */ n("p", { css: _e.substitute, children: c("potm.substitute_short") })
|
|
832
780
|
] }),
|
|
833
|
-
/* @__PURE__ */ n("img", { src:
|
|
834
|
-
/* @__PURE__ */
|
|
781
|
+
/* @__PURE__ */ n("img", { src: h, css: Jo, alt: "Team logo", onError: We(Q.teamPlaceholder) }),
|
|
782
|
+
/* @__PURE__ */ y("div", { css: Zo, children: [
|
|
835
783
|
/* @__PURE__ */ n(
|
|
836
|
-
|
|
784
|
+
nt,
|
|
837
785
|
{
|
|
838
|
-
src: t.image ||
|
|
786
|
+
src: t.image || on,
|
|
839
787
|
placeholder: Q.playerPlaceholder,
|
|
840
788
|
alt: t.name,
|
|
841
|
-
css:
|
|
789
|
+
css: w ? gt.active : gt.idle
|
|
842
790
|
}
|
|
843
791
|
),
|
|
844
|
-
/* @__PURE__ */ n("p", { css:
|
|
845
|
-
/* @__PURE__ */ n("p", { css:
|
|
846
|
-
/* @__PURE__ */ n("p", { css:
|
|
847
|
-
/* @__PURE__ */ n("p", { css:
|
|
792
|
+
/* @__PURE__ */ n("p", { css: w ? bt.active : bt.idle, children: t.name }),
|
|
793
|
+
/* @__PURE__ */ n("p", { css: w ? Ae.positionActive : Ae.positionIdle, children: c(`potm.${t.position}`) }),
|
|
794
|
+
/* @__PURE__ */ n("p", { css: w ? Ae.minutesActive : Ae.minutesIdle, children: t.minutesPlayed && t.minutesPlayed > 0 ? c("potm.minutes_played", { minutes: t.minutesPlayed }) : "" }),
|
|
795
|
+
/* @__PURE__ */ n("p", { css: en, children: g ? `${g} ${c("potm.votes", { count: g })}` : "" })
|
|
848
796
|
] }),
|
|
849
|
-
/* @__PURE__ */ n("div", { css:
|
|
797
|
+
/* @__PURE__ */ n("div", { css: tn, children: T ? a() : /* @__PURE__ */ y(
|
|
850
798
|
"button",
|
|
851
799
|
{
|
|
852
800
|
type: "button",
|
|
853
801
|
onClick: _,
|
|
854
|
-
onMouseDown: (
|
|
855
|
-
onTouchStart: (
|
|
856
|
-
disabled: !
|
|
857
|
-
css: ue[`${o ? "remove" : "vote"}|${
|
|
802
|
+
onMouseDown: (S) => S.stopPropagation(),
|
|
803
|
+
onTouchStart: (S) => S.stopPropagation(),
|
|
804
|
+
disabled: !w || p || b,
|
|
805
|
+
css: ue[`${o ? "remove" : "vote"}|${f}`],
|
|
858
806
|
children: [
|
|
859
|
-
/* @__PURE__ */ n("span", { css:
|
|
860
|
-
|
|
807
|
+
/* @__PURE__ */ n("span", { css: yt, children: o ? /* @__PURE__ */ n(Oo, {}) : /* @__PURE__ */ n(Ke, { size: $, style: $e.cta }) }),
|
|
808
|
+
c(b ? "potm.voting_closed" : p ? "potm.voting" : o ? "potm.remove_vote" : "potm.vote")
|
|
861
809
|
]
|
|
862
810
|
}
|
|
863
811
|
) })
|
|
864
812
|
] });
|
|
865
|
-
},
|
|
813
|
+
}, oo = r({ display: "none" }), no = {
|
|
866
814
|
position: "relative",
|
|
867
815
|
display: "inline-flex",
|
|
868
816
|
alignItems: "center",
|
|
@@ -878,7 +826,7 @@ const wt = eo("8px"), an = Q.playerPlaceholder, sn = (t, o, i) => {
|
|
|
878
826
|
cursor: "pointer",
|
|
879
827
|
minHeight: "2em",
|
|
880
828
|
"--Icon-color": "currentColor"
|
|
881
|
-
},
|
|
829
|
+
}, Ue = {
|
|
882
830
|
position: "absolute",
|
|
883
831
|
zIndex: 0,
|
|
884
832
|
inset: 0,
|
|
@@ -890,11 +838,11 @@ const wt = eo("8px"), an = Q.playerPlaceholder, sn = (t, o, i) => {
|
|
|
890
838
|
borderRadius: "inherit",
|
|
891
839
|
cursor: "pointer",
|
|
892
840
|
textDecoration: "none",
|
|
893
|
-
"&:focus-visible": { outline: `2px solid ${
|
|
841
|
+
"&:focus-visible": { outline: `2px solid ${v.focus}`, outlineOffset: "2px" }
|
|
894
842
|
}, J = {
|
|
895
|
-
actionSoftPrimary: r(
|
|
896
|
-
actionSoftNeutral: r(
|
|
897
|
-
actionOutlinedNeutral: r(
|
|
843
|
+
actionSoftPrimary: r(Ue, he.softPrimary),
|
|
844
|
+
actionSoftNeutral: r(Ue, he.softNeutral),
|
|
845
|
+
actionOutlinedNeutral: r(Ue, he.outlinedNeutral, { backgroundColor: v.bgSurface }),
|
|
898
846
|
label: r({
|
|
899
847
|
display: "inline-block",
|
|
900
848
|
overflow: "hidden",
|
|
@@ -917,8 +865,8 @@ const wt = eo("8px"), an = Q.playerPlaceholder, sn = (t, o, i) => {
|
|
|
917
865
|
zIndex: 1,
|
|
918
866
|
pointerEvents: "none"
|
|
919
867
|
})
|
|
920
|
-
},
|
|
921
|
-
color:
|
|
868
|
+
}, xt = {
|
|
869
|
+
color: v.textSecondary,
|
|
922
870
|
fontSize: "inherit",
|
|
923
871
|
overflow: "hidden",
|
|
924
872
|
textOverflow: "ellipsis",
|
|
@@ -947,37 +895,37 @@ const wt = eo("8px"), an = Q.playerPlaceholder, sn = (t, o, i) => {
|
|
|
947
895
|
"& > :not(style):not(style)": { margin: 0 },
|
|
948
896
|
"& > :not(style) ~ :not(style)": { marginLeft: e.spaceXs }
|
|
949
897
|
}),
|
|
950
|
-
hidden:
|
|
951
|
-
decorator:
|
|
898
|
+
hidden: oo,
|
|
899
|
+
decorator: qt("6px"),
|
|
952
900
|
// Joy's Avatar took its size from a 16px font of its own.
|
|
953
901
|
buttonAvatar: r({ position: "relative", width: "20px", height: "20px", backgroundColor: "transparent" }),
|
|
954
|
-
label: r(P,
|
|
955
|
-
teamLabel: r(P,
|
|
956
|
-
chipLabel: r(P, { color:
|
|
957
|
-
teamChipLabel: r(P, { color:
|
|
958
|
-
},
|
|
902
|
+
label: r(P, xt),
|
|
903
|
+
teamLabel: r(P, xt, { unicodeBidi: "plaintext" }),
|
|
904
|
+
chipLabel: r(P, { color: v.textSecondary, fontSize: "inherit" }),
|
|
905
|
+
teamChipLabel: r(P, { color: v.textSecondary, fontSize: "inherit", unicodeBidi: "plaintext" })
|
|
906
|
+
}, wt = (t) => r(ot("sm"), t ? he.softPrimary : he.outlinedNeutral, {
|
|
959
907
|
...t ? {} : { backgroundColor: "transparent" },
|
|
960
908
|
display: "flex",
|
|
961
909
|
flex: 1,
|
|
962
910
|
minWidth: "9em",
|
|
963
911
|
justifyContent: "center",
|
|
964
912
|
fontSize: "0.875em"
|
|
965
|
-
}),
|
|
913
|
+
}), St = { active: wt(!0), idle: wt(!1) }, an = (t, o, i) => r(no, {
|
|
966
914
|
gap: "3px",
|
|
967
915
|
display: "flex",
|
|
968
916
|
fontSize: i ? "0.875em" : "0.75em",
|
|
969
917
|
padding: `${e.space2xs} ${e.spaceSm}`,
|
|
970
918
|
borderRadius: "24px",
|
|
971
|
-
color: t ?
|
|
919
|
+
color: t ? v.primarySoftColor : v.neutralOutlinedColor,
|
|
972
920
|
...o ? { maxWidth: i ? "7.5em" : "5em" } : {}
|
|
973
|
-
}),
|
|
921
|
+
}), qe = {};
|
|
974
922
|
for (const t of [!1, !0])
|
|
975
923
|
for (const o of [!1, !0])
|
|
976
|
-
for (const i of [!1, !0])
|
|
977
|
-
const
|
|
924
|
+
for (const i of [!1, !0]) qe[`${t}|${o}|${i}`] = an(t, o, i);
|
|
925
|
+
const Ct = {
|
|
978
926
|
narrow: r({ position: "relative", width: "8px", height: "8px", marginInlineStart: "-6px", backgroundColor: "transparent" }),
|
|
979
927
|
wide: r({ position: "relative", width: "10px", height: "10px", marginInlineStart: "-6px", backgroundColor: "transparent" })
|
|
980
|
-
},
|
|
928
|
+
}, fe = {
|
|
981
929
|
row: r({
|
|
982
930
|
display: "flex",
|
|
983
931
|
flexWrap: "wrap",
|
|
@@ -989,8 +937,8 @@ const zt = {
|
|
|
989
937
|
}),
|
|
990
938
|
text: r(P, { fontSize: "inherit", color: "inherit" }),
|
|
991
939
|
textInline: r(P, { display: "inline", fontSize: "inherit", color: "inherit" }),
|
|
992
|
-
hidden:
|
|
993
|
-
},
|
|
940
|
+
hidden: oo
|
|
941
|
+
}, sn = (t, o) => r(no, {
|
|
994
942
|
fontFamily: e.fontPrimary,
|
|
995
943
|
fontSize: o ? "0.8125em" : "0.75em",
|
|
996
944
|
gap: "0.5em",
|
|
@@ -1005,10 +953,10 @@ const zt = {
|
|
|
1005
953
|
backgroundColor: t ? e.primarySoft : "transparent",
|
|
1006
954
|
transition: "background-color 150ms ease, color 150ms ease, border-color 150ms ease",
|
|
1007
955
|
"&:hover": { backgroundColor: t ? e.primarySoft : e.surfaceVariant }
|
|
1008
|
-
}),
|
|
956
|
+
}), ro = {};
|
|
1009
957
|
for (const t of [!1, !0])
|
|
1010
|
-
for (const o of [!1, !0])
|
|
1011
|
-
const
|
|
958
|
+
for (const o of [!1, !0]) ro[`${t}|${o}`] = sn(t, o);
|
|
959
|
+
const $t = (t) => r({
|
|
1012
960
|
display: "inline-flex",
|
|
1013
961
|
alignItems: "center",
|
|
1014
962
|
justifyContent: "center",
|
|
@@ -1022,7 +970,7 @@ const Tt = (t) => r({
|
|
|
1022
970
|
lineHeight: 1.7,
|
|
1023
971
|
backgroundColor: t ? e.primary : e.surfaceVariant,
|
|
1024
972
|
color: t ? e.onPrimary : e.dim
|
|
1025
|
-
}),
|
|
973
|
+
}), kt = { active: $t(!0), idle: $t(!1) }, Je = "0.875em", Fe = "2.5em", io = `min(24px, ${Fe})`, Tt = `max((${Fe} - 2px - ${io}) / 2, 0px)`, de = {
|
|
1026
974
|
// Caps the field so it reads as a control rather than a full-bleed bar.
|
|
1027
975
|
wrapper: r({
|
|
1028
976
|
width: "100%",
|
|
@@ -1036,9 +984,9 @@ const Tt = (t) => r({
|
|
|
1036
984
|
display: "flex",
|
|
1037
985
|
boxSizing: "border-box",
|
|
1038
986
|
minWidth: 0,
|
|
1039
|
-
minHeight:
|
|
987
|
+
minHeight: Fe,
|
|
1040
988
|
width: "100%",
|
|
1041
|
-
paddingInline:
|
|
989
|
+
paddingInline: Je,
|
|
1042
990
|
borderRadius: e.radiusFull,
|
|
1043
991
|
border: `1px solid ${e.border}`,
|
|
1044
992
|
boxShadow: "var(--fu-ucrc-shadow-ring), 0px 1px 2px 0px rgba(var(--fu-ucrc-shadow-channel) / var(--fu-ucrc-shadow-opacity))",
|
|
@@ -1061,21 +1009,21 @@ const Tt = (t) => r({
|
|
|
1061
1009
|
borderRadius: "inherit",
|
|
1062
1010
|
margin: "-1px"
|
|
1063
1011
|
},
|
|
1064
|
-
"&:focus-within::before": { boxShadow: `inset 0 0 0 ${e.borderSize} ${
|
|
1012
|
+
"&:focus-within::before": { boxShadow: `inset 0 0 0 ${e.borderSize} ${v.focus}` }
|
|
1065
1013
|
}),
|
|
1066
1014
|
startDecorator: r({
|
|
1067
1015
|
display: "flex",
|
|
1068
1016
|
alignItems: "center",
|
|
1069
1017
|
flexWrap: "wrap",
|
|
1070
1018
|
marginInlineEnd: "8px",
|
|
1071
|
-
color:
|
|
1019
|
+
color: v.textIcon,
|
|
1072
1020
|
cursor: "initial"
|
|
1073
1021
|
}),
|
|
1074
1022
|
endDecorator: r({
|
|
1075
1023
|
display: "flex",
|
|
1076
1024
|
alignItems: "center",
|
|
1077
1025
|
marginInlineStart: "8px",
|
|
1078
|
-
color:
|
|
1026
|
+
color: v.textIcon,
|
|
1079
1027
|
cursor: "initial"
|
|
1080
1028
|
}),
|
|
1081
1029
|
input: r({
|
|
@@ -1094,10 +1042,10 @@ const Tt = (t) => r({
|
|
|
1094
1042
|
textOverflow: "ellipsis",
|
|
1095
1043
|
"&::placeholder": { color: "inherit", opacity: 0.64 }
|
|
1096
1044
|
}),
|
|
1097
|
-
clear: r(
|
|
1045
|
+
clear: r(Qt, {
|
|
1098
1046
|
position: "relative",
|
|
1099
1047
|
padding: "0 2px",
|
|
1100
|
-
borderRadius: `max(calc(${e.radiusFull} - 1px - ${
|
|
1048
|
+
borderRadius: `max(calc(${e.radiusFull} - 1px - ${Tt}), min(calc(${Tt} + 1px), calc(${e.radiusFull} / 2)))`,
|
|
1101
1049
|
fontSize: "1em",
|
|
1102
1050
|
minWidth: "1.5em",
|
|
1103
1051
|
minHeight: "1.5em"
|
|
@@ -1111,35 +1059,35 @@ const Tt = (t) => r({
|
|
|
1111
1059
|
marginTop: e.space2xs,
|
|
1112
1060
|
textAlign: "center"
|
|
1113
1061
|
})
|
|
1114
|
-
},
|
|
1115
|
-
margin: `0 calc(min(calc(${
|
|
1116
|
-
},
|
|
1062
|
+
}, ln = {
|
|
1063
|
+
margin: `0 calc(min(calc(${Je} - (${Fe} - 2px - ${io}) / 2), ${Je}) * -1) 0 0`
|
|
1064
|
+
}, cn = ({
|
|
1117
1065
|
query: t,
|
|
1118
1066
|
setQuery: o,
|
|
1119
1067
|
resultCount: i,
|
|
1120
|
-
totalCount:
|
|
1068
|
+
totalCount: d
|
|
1121
1069
|
}) => {
|
|
1122
|
-
const { t:
|
|
1123
|
-
return /* @__PURE__ */
|
|
1124
|
-
/* @__PURE__ */
|
|
1070
|
+
const { t: h } = G(), m = Ce(null);
|
|
1071
|
+
return /* @__PURE__ */ y("div", { css: de.wrapper, children: [
|
|
1072
|
+
/* @__PURE__ */ y(
|
|
1125
1073
|
"div",
|
|
1126
1074
|
{
|
|
1127
1075
|
css: de.root,
|
|
1128
|
-
onClick: (
|
|
1076
|
+
onClick: (p) => {
|
|
1129
1077
|
var b;
|
|
1130
|
-
return
|
|
1078
|
+
return p.target === p.currentTarget && ((b = m.current) == null ? void 0 : b.focus());
|
|
1131
1079
|
},
|
|
1132
1080
|
children: [
|
|
1133
|
-
/* @__PURE__ */ n("div", { css: de.startDecorator, children: /* @__PURE__ */ n(
|
|
1081
|
+
/* @__PURE__ */ n("div", { css: de.startDecorator, children: /* @__PURE__ */ n(Lo, { size: "1.125em", color: e.dim, style: $e.input }) }),
|
|
1134
1082
|
/* @__PURE__ */ n(
|
|
1135
1083
|
"input",
|
|
1136
1084
|
{
|
|
1137
|
-
ref:
|
|
1085
|
+
ref: m,
|
|
1138
1086
|
css: de.input,
|
|
1139
1087
|
value: t,
|
|
1140
|
-
onChange: (
|
|
1141
|
-
placeholder:
|
|
1142
|
-
"aria-label":
|
|
1088
|
+
onChange: (p) => o(p.target.value),
|
|
1089
|
+
placeholder: h("potm.search_placeholder"),
|
|
1090
|
+
"aria-label": h("potm.search_label")
|
|
1143
1091
|
}
|
|
1144
1092
|
),
|
|
1145
1093
|
t ? /* @__PURE__ */ n("div", { css: de.endDecorator, children: /* @__PURE__ */ n(
|
|
@@ -1147,124 +1095,124 @@ const Tt = (t) => r({
|
|
|
1147
1095
|
{
|
|
1148
1096
|
type: "button",
|
|
1149
1097
|
css: de.clear,
|
|
1150
|
-
style:
|
|
1098
|
+
style: ln,
|
|
1151
1099
|
onClick: () => o(""),
|
|
1152
|
-
"aria-label":
|
|
1153
|
-
children: /* @__PURE__ */ n(
|
|
1100
|
+
"aria-label": h("potm.search_clear"),
|
|
1101
|
+
children: /* @__PURE__ */ n(Wo, { size: "1em", color: "var(--Icon-color)" })
|
|
1154
1102
|
}
|
|
1155
1103
|
) }) : null
|
|
1156
1104
|
]
|
|
1157
1105
|
}
|
|
1158
1106
|
),
|
|
1159
|
-
t ? /* @__PURE__ */ n("span", { "aria-live": "polite", css: de.feedback, children:
|
|
1107
|
+
t ? /* @__PURE__ */ n("span", { "aria-live": "polite", css: de.feedback, children: h("potm.search_results_count", {
|
|
1160
1108
|
count: i,
|
|
1161
|
-
total:
|
|
1109
|
+
total: d
|
|
1162
1110
|
}) }) : null
|
|
1163
1111
|
] });
|
|
1164
|
-
},
|
|
1112
|
+
}, zt = ({ isActive: t, wide: o, count: i, label: d, onClick: h, children: m }) => /* @__PURE__ */ y("div", { css: ro[`${t}|${o}`], children: [
|
|
1165
1113
|
/* @__PURE__ */ n(
|
|
1166
1114
|
"button",
|
|
1167
1115
|
{
|
|
1168
1116
|
type: "button",
|
|
1169
|
-
onClick:
|
|
1117
|
+
onClick: h,
|
|
1170
1118
|
"aria-pressed": t,
|
|
1171
|
-
"aria-label":
|
|
1119
|
+
"aria-label": d,
|
|
1172
1120
|
css: t ? J.actionSoftNeutral : J.actionOutlinedNeutral
|
|
1173
1121
|
}
|
|
1174
1122
|
),
|
|
1175
|
-
/* @__PURE__ */ n("span", { css: J.label, children:
|
|
1176
|
-
/* @__PURE__ */ n("span", { css: J.endDecorator, children: /* @__PURE__ */ n("div", { css: t ?
|
|
1177
|
-
] }),
|
|
1123
|
+
/* @__PURE__ */ n("span", { css: J.label, children: m }),
|
|
1124
|
+
/* @__PURE__ */ n("span", { css: J.endDecorator, children: /* @__PURE__ */ n("div", { css: t ? kt.active : kt.idle, children: i }) })
|
|
1125
|
+
] }), dn = ({
|
|
1178
1126
|
positionCounts: t,
|
|
1179
1127
|
positionFilter: o,
|
|
1180
1128
|
setPositionFilter: i,
|
|
1181
|
-
totalCount:
|
|
1129
|
+
totalCount: d
|
|
1182
1130
|
}) => {
|
|
1183
|
-
const { t:
|
|
1184
|
-
return t.length <= 1 ? null : /* @__PURE__ */
|
|
1131
|
+
const { t: h } = G(), m = Z("sm");
|
|
1132
|
+
return t.length <= 1 ? null : /* @__PURE__ */ y("div", { css: fe.row, children: [
|
|
1185
1133
|
/* @__PURE__ */ n(
|
|
1186
|
-
|
|
1134
|
+
zt,
|
|
1187
1135
|
{
|
|
1188
1136
|
isActive: o === "all",
|
|
1189
|
-
wide:
|
|
1190
|
-
count:
|
|
1137
|
+
wide: m,
|
|
1138
|
+
count: d,
|
|
1191
1139
|
onClick: () => i("all"),
|
|
1192
|
-
children: /* @__PURE__ */ n("p", { css:
|
|
1140
|
+
children: /* @__PURE__ */ n("p", { css: fe.text, children: h("potm.all") })
|
|
1193
1141
|
}
|
|
1194
1142
|
),
|
|
1195
|
-
t.map(({ bucket:
|
|
1196
|
-
const x = o ===
|
|
1197
|
-
return /* @__PURE__ */
|
|
1198
|
-
|
|
1143
|
+
t.map(({ bucket: p, count: b }) => {
|
|
1144
|
+
const x = o === p;
|
|
1145
|
+
return /* @__PURE__ */ y(
|
|
1146
|
+
zt,
|
|
1199
1147
|
{
|
|
1200
1148
|
isActive: x,
|
|
1201
|
-
wide:
|
|
1149
|
+
wide: m,
|
|
1202
1150
|
count: b,
|
|
1203
|
-
label:
|
|
1204
|
-
onClick: () => i(x ? "all" :
|
|
1151
|
+
label: h(`potm.${p}`),
|
|
1152
|
+
onClick: () => i(x ? "all" : p),
|
|
1205
1153
|
children: [
|
|
1206
|
-
/* @__PURE__ */ n("p", { css:
|
|
1207
|
-
/* @__PURE__ */ n("p", { css:
|
|
1154
|
+
/* @__PURE__ */ n("p", { css: m ? fe.textInline : fe.hidden, children: h(`potm.${p}`) }),
|
|
1155
|
+
/* @__PURE__ */ n("p", { css: m ? fe.hidden : fe.textInline, children: h(`potm.position_short_${p}`) })
|
|
1208
1156
|
]
|
|
1209
1157
|
},
|
|
1210
|
-
|
|
1158
|
+
p
|
|
1211
1159
|
);
|
|
1212
1160
|
})
|
|
1213
1161
|
] });
|
|
1214
|
-
},
|
|
1162
|
+
}, un = Q.playerPlaceholder, mn = ({
|
|
1215
1163
|
players: t,
|
|
1216
1164
|
activeIndex: o,
|
|
1217
1165
|
votedPlayerId: i,
|
|
1218
|
-
onSelect:
|
|
1166
|
+
onSelect: d
|
|
1219
1167
|
}) => {
|
|
1220
|
-
const { t:
|
|
1168
|
+
const { t: h } = G(), m = Ce(null), p = Ce([]);
|
|
1221
1169
|
return U(() => {
|
|
1222
|
-
var
|
|
1223
|
-
const b =
|
|
1170
|
+
var l;
|
|
1171
|
+
const b = p.current[o], x = m.current;
|
|
1224
1172
|
if (!b || !x) return;
|
|
1225
|
-
const
|
|
1173
|
+
const T = typeof window < "u" && ((l = window.matchMedia) == null ? void 0 : l.call(window, "(prefers-reduced-motion: reduce)").matches), s = b.getBoundingClientRect(), g = x.getBoundingClientRect(), c = s.left - g.left - (x.clientWidth - b.offsetWidth) / 2;
|
|
1226
1174
|
x.scrollBy({
|
|
1227
|
-
left:
|
|
1228
|
-
behavior:
|
|
1175
|
+
left: c,
|
|
1176
|
+
behavior: T ? "auto" : "smooth"
|
|
1229
1177
|
});
|
|
1230
|
-
}, [o, t.length]), t.length <= 1 ? null : /* @__PURE__ */ n("div", { css:
|
|
1178
|
+
}, [o, t.length]), t.length <= 1 ? null : /* @__PURE__ */ n("div", { css: Ve.root, children: /* @__PURE__ */ n(
|
|
1231
1179
|
"div",
|
|
1232
1180
|
{
|
|
1233
|
-
ref:
|
|
1181
|
+
ref: m,
|
|
1234
1182
|
role: "tablist",
|
|
1235
|
-
"aria-label":
|
|
1236
|
-
css:
|
|
1183
|
+
"aria-label": h("potm.roster_label"),
|
|
1184
|
+
css: Ve.scroller,
|
|
1237
1185
|
children: t.map((b, x) => {
|
|
1238
|
-
const
|
|
1239
|
-
return /* @__PURE__ */
|
|
1186
|
+
const T = x === o, s = i === b.id, g = b.type !== "start";
|
|
1187
|
+
return /* @__PURE__ */ y(
|
|
1240
1188
|
"button",
|
|
1241
1189
|
{
|
|
1242
1190
|
type: "button",
|
|
1243
|
-
ref: (
|
|
1244
|
-
|
|
1191
|
+
ref: (c) => {
|
|
1192
|
+
p.current[x] = c;
|
|
1245
1193
|
},
|
|
1246
|
-
onClick: () =>
|
|
1247
|
-
onMouseDown: (
|
|
1248
|
-
onTouchStart: (
|
|
1194
|
+
onClick: () => d(x),
|
|
1195
|
+
onMouseDown: (c) => c.stopPropagation(),
|
|
1196
|
+
onTouchStart: (c) => c.stopPropagation(),
|
|
1249
1197
|
role: "tab",
|
|
1250
|
-
"aria-selected":
|
|
1251
|
-
"aria-label":
|
|
1198
|
+
"aria-selected": T,
|
|
1199
|
+
"aria-label": h("potm.roster_thumb_label", {
|
|
1252
1200
|
number: b.number,
|
|
1253
1201
|
name: b.name
|
|
1254
1202
|
}),
|
|
1255
|
-
css:
|
|
1203
|
+
css: T || s ? ut.lit : ut.dim,
|
|
1256
1204
|
children: [
|
|
1257
|
-
s && /* @__PURE__ */ n("div", { css:
|
|
1205
|
+
s && /* @__PURE__ */ n("div", { css: Ve.votedBadge, children: /* @__PURE__ */ n(Ke, { size: "0.75em", color: e.warning }) }),
|
|
1258
1206
|
/* @__PURE__ */ n(
|
|
1259
|
-
|
|
1207
|
+
nt,
|
|
1260
1208
|
{
|
|
1261
|
-
src: b.image ||
|
|
1209
|
+
src: b.image || un,
|
|
1262
1210
|
placeholder: Q.playerPlaceholder,
|
|
1263
1211
|
alt: "",
|
|
1264
|
-
css:
|
|
1212
|
+
css: eo[`${T}|${s}|${g}`]
|
|
1265
1213
|
}
|
|
1266
1214
|
),
|
|
1267
|
-
/* @__PURE__ */ n("p", { css:
|
|
1215
|
+
/* @__PURE__ */ n("p", { css: T ? pt.active : pt.idle, children: b.number || "-" })
|
|
1268
1216
|
]
|
|
1269
1217
|
},
|
|
1270
1218
|
b.id
|
|
@@ -1272,54 +1220,54 @@ const Tt = (t) => r({
|
|
|
1272
1220
|
})
|
|
1273
1221
|
}
|
|
1274
1222
|
) });
|
|
1275
|
-
},
|
|
1223
|
+
}, pn = {
|
|
1276
1224
|
width: "100%",
|
|
1277
1225
|
height: "100%",
|
|
1278
1226
|
objectFit: "contain"
|
|
1279
|
-
},
|
|
1227
|
+
}, ao = ({ src: t, alt: o = "", className: i }) => /* @__PURE__ */ n("div", { className: i, style: jo, children: /* @__PURE__ */ n(
|
|
1280
1228
|
"img",
|
|
1281
1229
|
{
|
|
1282
1230
|
src: t || Q.teamPlaceholder,
|
|
1283
1231
|
alt: o,
|
|
1284
|
-
onError:
|
|
1285
|
-
style:
|
|
1232
|
+
onError: We(Q.teamPlaceholder),
|
|
1233
|
+
style: pn
|
|
1286
1234
|
}
|
|
1287
|
-
) }),
|
|
1288
|
-
const { t:
|
|
1289
|
-
i(s),
|
|
1290
|
-
},
|
|
1291
|
-
return /* @__PURE__ */
|
|
1292
|
-
/* @__PURE__ */
|
|
1293
|
-
/* @__PURE__ */ n("span", { css: V.decorator, children: /* @__PURE__ */ n(
|
|
1294
|
-
/* @__PURE__ */ n("p", { css: V.label, children:
|
|
1235
|
+
) }), It = ({ team: t, className: o }) => /* @__PURE__ */ n(ao, { src: t.logo, alt: t.name, className: o }), Dt = (t) => t.code || t.name.substring(0, 3).toUpperCase(), fn = ({ teams: t, activeFilter: o, setActiveFilter: i, setActiveIndex: d }) => {
|
|
1236
|
+
const { t: h } = G(), m = Z("sm"), p = Z("md"), b = Z("lg"), x = (s) => {
|
|
1237
|
+
i(s), d(0);
|
|
1238
|
+
}, T = o === "all";
|
|
1239
|
+
return /* @__PURE__ */ y("div", { css: m ? V.rowWide : V.row, children: [
|
|
1240
|
+
/* @__PURE__ */ y("button", { type: "button", onClick: () => x("all"), css: p ? St[T ? "active" : "idle"] : V.hidden, children: [
|
|
1241
|
+
/* @__PURE__ */ n("span", { css: V.decorator, children: /* @__PURE__ */ n(st, { size: "1.5em", color: "var(--Icon-color)", style: $e.teamButton }) }),
|
|
1242
|
+
/* @__PURE__ */ n("p", { css: V.label, children: h("potm.all_players") })
|
|
1295
1243
|
] }),
|
|
1296
|
-
t.map((s) => /* @__PURE__ */
|
|
1244
|
+
t.map((s) => /* @__PURE__ */ y(
|
|
1297
1245
|
"button",
|
|
1298
1246
|
{
|
|
1299
1247
|
type: "button",
|
|
1300
1248
|
onClick: () => x(s.id),
|
|
1301
|
-
css:
|
|
1249
|
+
css: p ? St[o === s.id ? "active" : "idle"] : V.hidden,
|
|
1302
1250
|
children: [
|
|
1303
|
-
/* @__PURE__ */ n("span", { css: V.decorator, children: /* @__PURE__ */ n(
|
|
1251
|
+
/* @__PURE__ */ n("span", { css: V.decorator, children: /* @__PURE__ */ n(It, { team: s, css: V.buttonAvatar }) }),
|
|
1304
1252
|
/* @__PURE__ */ n("p", { css: b ? V.teamLabel : V.hidden, children: s.name }),
|
|
1305
|
-
/* @__PURE__ */ n("p", { css:
|
|
1253
|
+
/* @__PURE__ */ n("p", { css: p && !b ? V.teamLabel : V.hidden, children: Dt(s) })
|
|
1306
1254
|
]
|
|
1307
1255
|
},
|
|
1308
1256
|
s.id
|
|
1309
1257
|
)),
|
|
1310
|
-
/* @__PURE__ */
|
|
1258
|
+
/* @__PURE__ */ y("div", { css: p ? V.hidden : qe[`${T}|false|${m}`], children: [
|
|
1311
1259
|
/* @__PURE__ */ n(
|
|
1312
1260
|
"button",
|
|
1313
1261
|
{
|
|
1314
1262
|
type: "button",
|
|
1315
1263
|
onClick: () => x("all"),
|
|
1316
|
-
css:
|
|
1264
|
+
css: T ? J.actionSoftPrimary : J.actionOutlinedNeutral
|
|
1317
1265
|
}
|
|
1318
1266
|
),
|
|
1319
|
-
/* @__PURE__ */ n("span", { css: J.label, children: /* @__PURE__ */ n("p", { css: V.chipLabel, children:
|
|
1320
|
-
/* @__PURE__ */ n("span", { css: J.startDecorator, children: /* @__PURE__ */ n(
|
|
1267
|
+
/* @__PURE__ */ n("span", { css: J.label, children: /* @__PURE__ */ n("p", { css: V.chipLabel, children: h("potm.all") }) }),
|
|
1268
|
+
/* @__PURE__ */ n("span", { css: J.startDecorator, children: /* @__PURE__ */ n(st, { size: "1em", color: "var(--Icon-color)", style: $e.chip }) })
|
|
1321
1269
|
] }),
|
|
1322
|
-
t.map((s) => /* @__PURE__ */
|
|
1270
|
+
t.map((s) => /* @__PURE__ */ y("div", { css: p ? V.hidden : qe[`${o === s.id}|true|${m}`], children: [
|
|
1323
1271
|
/* @__PURE__ */ n(
|
|
1324
1272
|
"button",
|
|
1325
1273
|
{
|
|
@@ -1328,11 +1276,11 @@ const Tt = (t) => r({
|
|
|
1328
1276
|
css: o === s.id ? J.actionSoftPrimary : J.actionOutlinedNeutral
|
|
1329
1277
|
}
|
|
1330
1278
|
),
|
|
1331
|
-
/* @__PURE__ */ n("span", { css: J.label, children: /* @__PURE__ */ n("p", { css: V.teamChipLabel, children:
|
|
1332
|
-
/* @__PURE__ */ n("span", { css: J.startDecorator, children: /* @__PURE__ */ n(
|
|
1279
|
+
/* @__PURE__ */ n("span", { css: J.label, children: /* @__PURE__ */ n("p", { css: V.teamChipLabel, children: Dt(s) }) }),
|
|
1280
|
+
/* @__PURE__ */ n("span", { css: J.startDecorator, children: /* @__PURE__ */ n(It, { team: s, css: m ? Ct.wide : Ct.narrow }) })
|
|
1333
1281
|
] }, `mobile-${s.id}`))
|
|
1334
1282
|
] });
|
|
1335
|
-
},
|
|
1283
|
+
}, Rt = (t) => {
|
|
1336
1284
|
const o = +new Date(t) - +/* @__PURE__ */ new Date();
|
|
1337
1285
|
return o <= 0 ? { days: 0, hours: 0, minutes: 0, seconds: 0, isExpired: !0 } : {
|
|
1338
1286
|
days: Math.floor(o / (1e3 * 60 * 60 * 24)),
|
|
@@ -1341,189 +1289,189 @@ const Tt = (t) => r({
|
|
|
1341
1289
|
seconds: Math.floor(o / 1e3 % 60),
|
|
1342
1290
|
isExpired: !1
|
|
1343
1291
|
};
|
|
1344
|
-
},
|
|
1292
|
+
}, so = (t) => {
|
|
1345
1293
|
const [o, i] = I(
|
|
1346
|
-
|
|
1294
|
+
Rt(t)
|
|
1347
1295
|
);
|
|
1348
1296
|
return U(() => {
|
|
1349
1297
|
if (o.isExpired) return;
|
|
1350
|
-
const
|
|
1351
|
-
i(
|
|
1298
|
+
const d = setInterval(() => {
|
|
1299
|
+
i(Rt(t));
|
|
1352
1300
|
}, 1e3);
|
|
1353
|
-
return () => clearInterval(
|
|
1301
|
+
return () => clearInterval(d);
|
|
1354
1302
|
}, [t, o.isExpired]), o;
|
|
1355
|
-
},
|
|
1303
|
+
}, gn = 30, hn = ({
|
|
1356
1304
|
votingDeadline: t,
|
|
1357
1305
|
totalVotes: o
|
|
1358
1306
|
}) => {
|
|
1359
|
-
const { t: i } = G(),
|
|
1307
|
+
const { t: i } = G(), d = Z("sm"), { days: h, hours: m, minutes: p, seconds: b, isExpired: x } = so(
|
|
1360
1308
|
t ?? /* @__PURE__ */ new Date(0)
|
|
1361
|
-
),
|
|
1362
|
-
if (!
|
|
1363
|
-
const
|
|
1364
|
-
return /* @__PURE__ */
|
|
1365
|
-
|
|
1366
|
-
/* @__PURE__ */ n(
|
|
1309
|
+
), T = !!t && !x, s = o > 0;
|
|
1310
|
+
if (!T && !s) return null;
|
|
1311
|
+
const g = h === 0 && m === 0 && p < gn, c = () => h > 0 ? i("potm.remaining_days_hours", { days: h, hours: m }) : m > 0 ? i("potm.remaining_hours_minutes", { hours: m, minutes: p }) : i("potm.remaining_minutes_seconds", { minutes: p, seconds: b });
|
|
1312
|
+
return /* @__PURE__ */ y("div", { css: ne.bar, children: [
|
|
1313
|
+
T && /* @__PURE__ */ y("div", { css: ne.item, children: [
|
|
1314
|
+
/* @__PURE__ */ n(Yt, { size: "1em", color: g ? e.danger : e.primary }),
|
|
1367
1315
|
/* @__PURE__ */ n("p", { css: ne.label, children: i("potm.time_left_prefix") }),
|
|
1368
|
-
/* @__PURE__ */ n("p", { "aria-live": "off", css:
|
|
1316
|
+
/* @__PURE__ */ n("p", { "aria-live": "off", css: g ? ne.valueUrgent : ne.value, children: c() })
|
|
1369
1317
|
] }),
|
|
1370
|
-
|
|
1371
|
-
s && /* @__PURE__ */
|
|
1372
|
-
/* @__PURE__ */ n(
|
|
1318
|
+
T && s && /* @__PURE__ */ n("p", { css: d ? ne.separatorShown : ne.separator, children: "·" }),
|
|
1319
|
+
s && /* @__PURE__ */ y("div", { css: ne.item, children: [
|
|
1320
|
+
/* @__PURE__ */ n(Fo, { size: "1em", color: e.tertiary }),
|
|
1373
1321
|
/* @__PURE__ */ n("p", { css: ne.label, children: i("potm.total_votes_cast", { count: o }) })
|
|
1374
1322
|
] })
|
|
1375
1323
|
] });
|
|
1376
|
-
},
|
|
1377
|
-
const { t: i } = G(),
|
|
1378
|
-
return /* @__PURE__ */
|
|
1379
|
-
|
|
1324
|
+
}, bn = ({ playerName: t, onJumpToVote: o }) => {
|
|
1325
|
+
const { t: i } = G(), d = !!o;
|
|
1326
|
+
return /* @__PURE__ */ y(
|
|
1327
|
+
d ? "button" : "div",
|
|
1380
1328
|
{
|
|
1381
|
-
type:
|
|
1329
|
+
type: d ? "button" : void 0,
|
|
1382
1330
|
onClick: o,
|
|
1383
|
-
onMouseDown: (
|
|
1384
|
-
css:
|
|
1331
|
+
onMouseDown: (m) => m.stopPropagation(),
|
|
1332
|
+
css: d ? Pe.pill : Pe.pillStatic,
|
|
1385
1333
|
children: [
|
|
1386
|
-
/* @__PURE__ */ n(
|
|
1387
|
-
/* @__PURE__ */ n("p", { css:
|
|
1388
|
-
|
|
1334
|
+
/* @__PURE__ */ n(Ho, { size: "1em", color: v.textIcon }),
|
|
1335
|
+
/* @__PURE__ */ n("p", { css: Pe.text, children: i("potm.your_vote_is", { name: Gt(t) }) }),
|
|
1336
|
+
d && /* @__PURE__ */ n("p", { css: Pe.jump, children: i("potm.jump_to_vote") })
|
|
1389
1337
|
]
|
|
1390
1338
|
}
|
|
1391
1339
|
);
|
|
1392
|
-
},
|
|
1393
|
-
const [o, i] = I(0), [
|
|
1394
|
-
|
|
1340
|
+
}, vn = 450, yn = 25, xn = 70, wn = 12, Sn = (t) => {
|
|
1341
|
+
const [o, i] = I(0), [d, h] = I(0), [m, p] = I(0), [b, x] = I(!1), [T, s] = I(0), g = Ce(null), c = Ce(null), l = Math.abs(T) > 10, f = () => {
|
|
1342
|
+
c.current !== null && (clearInterval(c.current), c.current = null);
|
|
1395
1343
|
};
|
|
1396
|
-
U(() =>
|
|
1397
|
-
const
|
|
1398
|
-
|
|
1399
|
-
},
|
|
1344
|
+
U(() => f, []);
|
|
1345
|
+
const $ = (C) => {
|
|
1346
|
+
f(), i(Math.max(0, Math.min(Math.max(t - 1, 0), C)));
|
|
1347
|
+
}, w = (C) => {
|
|
1400
1348
|
var oe;
|
|
1401
|
-
|
|
1402
|
-
const
|
|
1403
|
-
if (R <= 1 || R >
|
|
1404
|
-
i(
|
|
1349
|
+
f();
|
|
1350
|
+
const z = Math.max(0, Math.min(Math.max(t - 1, 0), C)), R = Math.abs(z - o), M = typeof window < "u" && ((oe = window.matchMedia) == null ? void 0 : oe.call(window, "(prefers-reduced-motion: reduce)").matches);
|
|
1351
|
+
if (R <= 1 || R > wn || M) {
|
|
1352
|
+
i(z);
|
|
1405
1353
|
return;
|
|
1406
1354
|
}
|
|
1407
|
-
const F =
|
|
1408
|
-
|
|
1409
|
-
Math.max(
|
|
1355
|
+
const F = z > o ? 1 : -1, se = Math.min(
|
|
1356
|
+
xn,
|
|
1357
|
+
Math.max(yn, Math.round(vn / R))
|
|
1410
1358
|
);
|
|
1411
1359
|
let q = o;
|
|
1412
|
-
|
|
1413
|
-
q += F, i(q), q ===
|
|
1360
|
+
c.current = window.setInterval(() => {
|
|
1361
|
+
q += F, i(q), q === z && f();
|
|
1414
1362
|
}, se);
|
|
1415
1363
|
}, E = () => {
|
|
1416
|
-
|
|
1364
|
+
f(), o > 0 && i(o - 1);
|
|
1417
1365
|
}, _ = () => {
|
|
1418
|
-
|
|
1419
|
-
},
|
|
1420
|
-
|
|
1421
|
-
const
|
|
1422
|
-
|
|
1366
|
+
f(), o < t - 1 && i(o + 1);
|
|
1367
|
+
}, u = (C) => {
|
|
1368
|
+
f(), s(0), x(!0);
|
|
1369
|
+
const z = "touches" in C ? C.touches[0] ? C.touches[0].clientX : 0 : "clientX" in C ? C.clientX : 0;
|
|
1370
|
+
h(z), p(z);
|
|
1423
1371
|
}, a = (C) => {
|
|
1424
1372
|
if (!b) return;
|
|
1425
|
-
const
|
|
1426
|
-
|
|
1427
|
-
const R =
|
|
1373
|
+
const z = "touches" in C ? C.touches[0] ? C.touches[0].clientX : 0 : "clientX" in C ? C.clientX : 0;
|
|
1374
|
+
p(z);
|
|
1375
|
+
const R = z - d;
|
|
1428
1376
|
s(R);
|
|
1429
|
-
},
|
|
1377
|
+
}, S = () => {
|
|
1430
1378
|
if (b) {
|
|
1431
|
-
if (
|
|
1432
|
-
const C =
|
|
1433
|
-
C >
|
|
1379
|
+
if (l) {
|
|
1380
|
+
const C = d - m, z = 50;
|
|
1381
|
+
C > z && o < t - 1 ? i(o + 1) : C < -z && o > 0 && i(o - 1);
|
|
1434
1382
|
}
|
|
1435
1383
|
x(!1), s(0);
|
|
1436
1384
|
}
|
|
1437
1385
|
};
|
|
1438
1386
|
return U(() => {
|
|
1439
|
-
const C =
|
|
1387
|
+
const C = g.current;
|
|
1440
1388
|
if (!C) return;
|
|
1441
|
-
const
|
|
1442
|
-
return C.addEventListener("touchstart",
|
|
1443
|
-
C.removeEventListener("touchstart",
|
|
1389
|
+
const z = (F) => u(F), R = (F) => a(F), M = () => S();
|
|
1390
|
+
return C.addEventListener("touchstart", z), C.addEventListener("touchmove", R), C.addEventListener("touchend", M), () => {
|
|
1391
|
+
C.removeEventListener("touchstart", z), C.removeEventListener("touchmove", R), C.removeEventListener("touchend", M);
|
|
1444
1392
|
};
|
|
1445
|
-
}, [b,
|
|
1446
|
-
const C =
|
|
1393
|
+
}, [b, d, m, o, t]), U(() => {
|
|
1394
|
+
const C = g.current;
|
|
1447
1395
|
if (!C) return;
|
|
1448
|
-
const
|
|
1449
|
-
const
|
|
1450
|
-
(
|
|
1396
|
+
const z = (R) => {
|
|
1397
|
+
const M = R.target;
|
|
1398
|
+
(M == null ? void 0 : M.tagName) === "INPUT" || (M == null ? void 0 : M.tagName) === "TEXTAREA" || M != null && M.isContentEditable || (R.key === "ArrowLeft" ? (R.preventDefault(), E()) : R.key === "ArrowRight" && (R.preventDefault(), _()));
|
|
1451
1399
|
};
|
|
1452
|
-
return C.addEventListener("keydown",
|
|
1453
|
-
C.removeEventListener("keydown",
|
|
1400
|
+
return C.addEventListener("keydown", z), () => {
|
|
1401
|
+
C.removeEventListener("keydown", z);
|
|
1454
1402
|
};
|
|
1455
1403
|
}, [o, t]), {
|
|
1456
1404
|
activeIndex: o,
|
|
1457
|
-
jumpToIndex:
|
|
1458
|
-
animateToIndex:
|
|
1459
|
-
handleDragStart:
|
|
1405
|
+
jumpToIndex: $,
|
|
1406
|
+
animateToIndex: w,
|
|
1407
|
+
handleDragStart: u,
|
|
1460
1408
|
handleDragMove: a,
|
|
1461
|
-
handleDragEnd:
|
|
1409
|
+
handleDragEnd: S,
|
|
1462
1410
|
goToPrevious: E,
|
|
1463
1411
|
goToNext: _,
|
|
1464
|
-
carouselRef:
|
|
1412
|
+
carouselRef: g,
|
|
1465
1413
|
isDragging: b,
|
|
1466
|
-
isSignificantDrag:
|
|
1414
|
+
isSignificantDrag: l
|
|
1467
1415
|
};
|
|
1468
|
-
},
|
|
1416
|
+
}, Pt = Q.teamPlaceholder, Cn = (t, o, i) => {
|
|
1469
1417
|
var E, _;
|
|
1470
|
-
const [
|
|
1418
|
+
const [d, h] = I([]), [m, p] = I([]), [b, x] = I([]), T = [
|
|
1471
1419
|
{
|
|
1472
1420
|
id: t.homeTeam.id,
|
|
1473
1421
|
name: t.homeTeam.name,
|
|
1474
1422
|
code: t.homeTeam.code,
|
|
1475
|
-
logo: ((E = t.homeTeam.assets) == null ? void 0 : E.logo) ||
|
|
1423
|
+
logo: ((E = t.homeTeam.assets) == null ? void 0 : E.logo) || Pt
|
|
1476
1424
|
},
|
|
1477
1425
|
{
|
|
1478
1426
|
id: t.awayTeam.id,
|
|
1479
1427
|
name: t.awayTeam.name,
|
|
1480
1428
|
code: t.awayTeam.code,
|
|
1481
|
-
logo: ((_ = t.awayTeam.assets) == null ? void 0 : _.logo) ||
|
|
1429
|
+
logo: ((_ = t.awayTeam.assets) == null ? void 0 : _.logo) || Pt
|
|
1482
1430
|
}
|
|
1483
|
-
], s = (
|
|
1431
|
+
], s = (u) => {
|
|
1484
1432
|
const a = t.playerStats.find(
|
|
1485
|
-
(
|
|
1433
|
+
(S) => S.playerId === u
|
|
1486
1434
|
);
|
|
1487
1435
|
return (a == null ? void 0 : a.minutesPlayed) || 0;
|
|
1488
|
-
},
|
|
1436
|
+
}, g = (u) => {
|
|
1489
1437
|
if (!o || !o.data) return 0;
|
|
1490
1438
|
const a = o.data.find(
|
|
1491
|
-
(
|
|
1439
|
+
(S) => S.playerId === u
|
|
1492
1440
|
);
|
|
1493
1441
|
return a ? a.votes : 0;
|
|
1494
|
-
},
|
|
1442
|
+
}, c = t.lineups.homeTeam.players.filter((u) => u.type === "start").map((u) => {
|
|
1495
1443
|
var a;
|
|
1496
1444
|
return {
|
|
1497
|
-
id:
|
|
1498
|
-
name:
|
|
1499
|
-
number:
|
|
1445
|
+
id: u.id,
|
|
1446
|
+
name: u.name,
|
|
1447
|
+
number: u.shirtNumber || 0,
|
|
1500
1448
|
team: t.homeTeam.id,
|
|
1501
|
-
position:
|
|
1502
|
-
image: (a =
|
|
1503
|
-
type:
|
|
1504
|
-
minutesPlayed: s(
|
|
1505
|
-
votes:
|
|
1449
|
+
position: u.position || "Unknown",
|
|
1450
|
+
image: (a = u.assets) == null ? void 0 : a.headshot,
|
|
1451
|
+
type: u.type,
|
|
1452
|
+
minutesPlayed: s(u.id),
|
|
1453
|
+
votes: g(u.id)
|
|
1506
1454
|
};
|
|
1507
|
-
}) || [],
|
|
1455
|
+
}) || [], l = t.lineups.awayTeam.players.filter((u) => u.type === "start").map((u) => {
|
|
1508
1456
|
var a;
|
|
1509
1457
|
return {
|
|
1510
|
-
id:
|
|
1511
|
-
name:
|
|
1512
|
-
number:
|
|
1458
|
+
id: u.id,
|
|
1459
|
+
name: u.name,
|
|
1460
|
+
number: u.shirtNumber || 0,
|
|
1513
1461
|
team: t.awayTeam.id,
|
|
1514
|
-
position:
|
|
1515
|
-
image: (a =
|
|
1516
|
-
type:
|
|
1517
|
-
minutesPlayed: s(
|
|
1518
|
-
votes:
|
|
1462
|
+
position: u.position || "Unknown",
|
|
1463
|
+
image: (a = u.assets) == null ? void 0 : a.headshot,
|
|
1464
|
+
type: u.type,
|
|
1465
|
+
minutesPlayed: s(u.id),
|
|
1466
|
+
votes: g(u.id)
|
|
1519
1467
|
};
|
|
1520
|
-
}) || [],
|
|
1521
|
-
if (
|
|
1522
|
-
return
|
|
1523
|
-
}).map((
|
|
1524
|
-
var
|
|
1468
|
+
}) || [], f = t.timeline.filter((u) => {
|
|
1469
|
+
if (u.type === "substitution" && u.teamId === t.homeTeam.id)
|
|
1470
|
+
return u;
|
|
1471
|
+
}).map((u) => {
|
|
1472
|
+
var S;
|
|
1525
1473
|
const a = t.lineups.homeTeam.players.find(
|
|
1526
|
-
(C) => C.id ===
|
|
1474
|
+
(C) => C.id === u.relatedPlayer.id
|
|
1527
1475
|
);
|
|
1528
1476
|
return {
|
|
1529
1477
|
id: (a == null ? void 0 : a.id) ?? "",
|
|
@@ -1531,18 +1479,18 @@ const Tt = (t) => r({
|
|
|
1531
1479
|
number: (a == null ? void 0 : a.shirtNumber) || 0,
|
|
1532
1480
|
team: t.homeTeam.id,
|
|
1533
1481
|
position: (a == null ? void 0 : a.position) || "Unknown",
|
|
1534
|
-
image: ((
|
|
1482
|
+
image: ((S = a == null ? void 0 : a.assets) == null ? void 0 : S.headshot) ?? "",
|
|
1535
1483
|
type: (a == null ? void 0 : a.type) ?? "",
|
|
1536
1484
|
minutesPlayed: s((a == null ? void 0 : a.id) ?? "") || 0,
|
|
1537
|
-
votes:
|
|
1485
|
+
votes: g((a == null ? void 0 : a.id) ?? "")
|
|
1538
1486
|
};
|
|
1539
|
-
}) || [],
|
|
1540
|
-
if (
|
|
1541
|
-
return
|
|
1542
|
-
}).map((
|
|
1543
|
-
var
|
|
1487
|
+
}) || [], $ = t.timeline.filter((u) => {
|
|
1488
|
+
if (u.type === "substitution" && u.teamId === t.awayTeam.id)
|
|
1489
|
+
return u;
|
|
1490
|
+
}).map((u) => {
|
|
1491
|
+
var S;
|
|
1544
1492
|
const a = t.lineups.awayTeam.players.find(
|
|
1545
|
-
(C) => C.id ===
|
|
1493
|
+
(C) => C.id === u.relatedPlayer.id
|
|
1546
1494
|
);
|
|
1547
1495
|
return {
|
|
1548
1496
|
id: (a == null ? void 0 : a.id) || "",
|
|
@@ -1550,28 +1498,28 @@ const Tt = (t) => r({
|
|
|
1550
1498
|
number: (a == null ? void 0 : a.shirtNumber) || 0,
|
|
1551
1499
|
team: t.awayTeam.id,
|
|
1552
1500
|
position: (a == null ? void 0 : a.position) || "Unknown",
|
|
1553
|
-
image: ((
|
|
1501
|
+
image: ((S = a == null ? void 0 : a.assets) == null ? void 0 : S.headshot) || "",
|
|
1554
1502
|
type: (a == null ? void 0 : a.type) || "",
|
|
1555
1503
|
minutesPlayed: s((a == null ? void 0 : a.id) || "") || 0,
|
|
1556
|
-
votes:
|
|
1504
|
+
votes: g((a == null ? void 0 : a.id) || "")
|
|
1557
1505
|
};
|
|
1558
1506
|
}) || [];
|
|
1559
1507
|
return U(() => {
|
|
1560
|
-
|
|
1508
|
+
h([...c, ...f]), p([...l, ...$]);
|
|
1561
1509
|
}, [t, o]), U(() => {
|
|
1562
|
-
let
|
|
1563
|
-
i && i.length > 0 && (
|
|
1510
|
+
let u = [...d, ...m];
|
|
1511
|
+
i && i.length > 0 && (u = u.filter(
|
|
1564
1512
|
(a) => i.includes(a.id)
|
|
1565
|
-
)), x(
|
|
1566
|
-
}, [
|
|
1513
|
+
)), x(u);
|
|
1514
|
+
}, [d, m, i]), {
|
|
1567
1515
|
players: b,
|
|
1568
|
-
teams:
|
|
1569
|
-
getTeamLogo: (
|
|
1570
|
-
const a =
|
|
1516
|
+
teams: T,
|
|
1517
|
+
getTeamLogo: (u) => {
|
|
1518
|
+
const a = T.find((S) => S.id === u);
|
|
1571
1519
|
return a ? a.logo : "";
|
|
1572
1520
|
}
|
|
1573
1521
|
};
|
|
1574
|
-
},
|
|
1522
|
+
}, lo = {
|
|
1575
1523
|
ł: "l",
|
|
1576
1524
|
// l with stroke - pl
|
|
1577
1525
|
đ: "d",
|
|
@@ -1592,313 +1540,313 @@ const Tt = (t) => r({
|
|
|
1592
1540
|
œ: "oe",
|
|
1593
1541
|
þ: "th"
|
|
1594
1542
|
// thorn
|
|
1595
|
-
},
|
|
1596
|
-
`[${Object.keys(
|
|
1543
|
+
}, $n = new RegExp(
|
|
1544
|
+
`[${Object.keys(lo).join("")}]`,
|
|
1597
1545
|
"g"
|
|
1598
|
-
),
|
|
1546
|
+
), Ze = (t) => t.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace($n, (o) => lo[o] || o).trim(), co = [
|
|
1599
1547
|
"keeper",
|
|
1600
1548
|
"defender",
|
|
1601
1549
|
"midfielder",
|
|
1602
1550
|
"forward"
|
|
1603
|
-
],
|
|
1604
|
-
const o =
|
|
1605
|
-
return
|
|
1606
|
-
},
|
|
1551
|
+
], _t = (t) => {
|
|
1552
|
+
const o = Ze(t);
|
|
1553
|
+
return co.includes(o) ? o : "unknown";
|
|
1554
|
+
}, kn = ({
|
|
1607
1555
|
players: t,
|
|
1608
1556
|
teamFilter: o
|
|
1609
1557
|
}) => {
|
|
1610
|
-
const { i18n: i } = G(), [
|
|
1558
|
+
const { i18n: i } = G(), [d, h] = I(""), [m, p] = I(
|
|
1611
1559
|
"all"
|
|
1612
|
-
), b =
|
|
1560
|
+
), b = we(
|
|
1613
1561
|
() => new Intl.Collator(i.language, { numeric: !0 }),
|
|
1614
1562
|
[i.language]
|
|
1615
|
-
), x =
|
|
1616
|
-
() => o === "all" ? t : t.filter((
|
|
1563
|
+
), x = we(
|
|
1564
|
+
() => o === "all" ? t : t.filter((l) => l.team === o),
|
|
1617
1565
|
[t, o]
|
|
1618
|
-
),
|
|
1619
|
-
const
|
|
1620
|
-
return x.forEach((
|
|
1621
|
-
const
|
|
1622
|
-
|
|
1623
|
-
}),
|
|
1624
|
-
(
|
|
1566
|
+
), T = we(() => {
|
|
1567
|
+
const l = /* @__PURE__ */ new Map();
|
|
1568
|
+
return x.forEach((f) => {
|
|
1569
|
+
const $ = _t(f.position);
|
|
1570
|
+
l.set($, (l.get($) || 0) + 1);
|
|
1571
|
+
}), co.filter((f) => l.has(f)).map(
|
|
1572
|
+
(f) => ({ bucket: f, count: l.get(f) || 0 })
|
|
1625
1573
|
);
|
|
1626
|
-
}, [x]), s =
|
|
1627
|
-
const
|
|
1628
|
-
return [...x.filter((
|
|
1629
|
-
(
|
|
1574
|
+
}, [x]), s = we(() => {
|
|
1575
|
+
const l = Ze(d);
|
|
1576
|
+
return [...x.filter(($) => m !== "all" && _t($.position) !== m ? !1 : l ? Ze($.name).includes(l) || String($.number).startsWith(l) : !0)].sort(
|
|
1577
|
+
($, w) => (w.votes || 0) - ($.votes || 0) || b.compare($.name, w.name)
|
|
1630
1578
|
);
|
|
1631
|
-
}, [x,
|
|
1632
|
-
|
|
1579
|
+
}, [x, d, m, b]), g = !!d || m !== "all", c = () => {
|
|
1580
|
+
h(""), p("all");
|
|
1633
1581
|
};
|
|
1634
1582
|
return {
|
|
1635
|
-
query:
|
|
1636
|
-
setQuery:
|
|
1637
|
-
positionFilter:
|
|
1638
|
-
setPositionFilter:
|
|
1639
|
-
positionCounts:
|
|
1583
|
+
query: d,
|
|
1584
|
+
setQuery: h,
|
|
1585
|
+
positionFilter: m,
|
|
1586
|
+
setPositionFilter: p,
|
|
1587
|
+
positionCounts: T,
|
|
1640
1588
|
filteredPlayers: s,
|
|
1641
1589
|
teamScopedCount: x.length,
|
|
1642
|
-
isFiltered:
|
|
1643
|
-
resetFilters:
|
|
1590
|
+
isFiltered: g,
|
|
1591
|
+
resetFilters: c
|
|
1644
1592
|
};
|
|
1645
|
-
},
|
|
1593
|
+
}, Tn = (t, o) => {
|
|
1646
1594
|
U(() => {
|
|
1647
1595
|
o(0);
|
|
1648
1596
|
}, [t]);
|
|
1649
|
-
},
|
|
1597
|
+
}, zn = 4, In = (t) => {
|
|
1650
1598
|
const o = /* @__PURE__ */ new Map();
|
|
1651
1599
|
return t != null && t.data && t.data.forEach((i) => {
|
|
1652
1600
|
o.set(i.playerId, i.votes);
|
|
1653
1601
|
}), o;
|
|
1654
|
-
},
|
|
1602
|
+
}, Dn = ({
|
|
1655
1603
|
match: t,
|
|
1656
1604
|
sdk: o,
|
|
1657
1605
|
userVote: i,
|
|
1658
|
-
votingResults:
|
|
1659
|
-
handleVote:
|
|
1660
|
-
isVotingClosed:
|
|
1661
|
-
show:
|
|
1606
|
+
votingResults: d,
|
|
1607
|
+
handleVote: h,
|
|
1608
|
+
isVotingClosed: m,
|
|
1609
|
+
show: p = "all",
|
|
1662
1610
|
showPlayers: b,
|
|
1663
1611
|
defaultImagePlaceholderUrl: x,
|
|
1664
|
-
showSignInCTA:
|
|
1612
|
+
showSignInCTA: T,
|
|
1665
1613
|
signInCTA: s,
|
|
1666
|
-
votingDeadline:
|
|
1614
|
+
votingDeadline: g = null
|
|
1667
1615
|
}) => {
|
|
1668
|
-
const { t:
|
|
1616
|
+
const { t: c } = G(), { players: l, teams: f, getTeamLogo: $ } = Cn(
|
|
1669
1617
|
t,
|
|
1670
|
-
|
|
1618
|
+
d,
|
|
1671
1619
|
b
|
|
1672
|
-
), [
|
|
1620
|
+
), [w, E] = I(p ?? "all"), [_, u] = I(i), [a, S] = I(!1), [C, z] = I({
|
|
1673
1621
|
open: !1,
|
|
1674
1622
|
variant: "success",
|
|
1675
1623
|
title: "",
|
|
1676
1624
|
message: ""
|
|
1677
|
-
}), [R,
|
|
1678
|
-
|
|
1679
|
-
), [F, se] = I(null), q = (
|
|
1680
|
-
|
|
1625
|
+
}), [R, M] = I(
|
|
1626
|
+
In(d)
|
|
1627
|
+
), [F, se] = I(null), q = (k, D) => {
|
|
1628
|
+
z({ open: !0, variant: k, title: "", message: D });
|
|
1681
1629
|
}, oe = () => {
|
|
1682
|
-
|
|
1630
|
+
z((k) => ({ ...k, open: !1 }));
|
|
1683
1631
|
}, {
|
|
1684
1632
|
query: me,
|
|
1685
1633
|
setQuery: Te,
|
|
1686
|
-
positionFilter:
|
|
1687
|
-
setPositionFilter:
|
|
1688
|
-
positionCounts:
|
|
1634
|
+
positionFilter: be,
|
|
1635
|
+
setPositionFilter: ze,
|
|
1636
|
+
positionCounts: He,
|
|
1689
1637
|
filteredPlayers: Y,
|
|
1690
|
-
teamScopedCount:
|
|
1691
|
-
resetFilters:
|
|
1692
|
-
} =
|
|
1638
|
+
teamScopedCount: Ie,
|
|
1639
|
+
resetFilters: Oe
|
|
1640
|
+
} = kn({ players: l, teamFilter: w }), {
|
|
1693
1641
|
activeIndex: re,
|
|
1694
1642
|
jumpToIndex: pe,
|
|
1695
|
-
animateToIndex:
|
|
1643
|
+
animateToIndex: ve,
|
|
1696
1644
|
handleDragStart: H,
|
|
1697
1645
|
handleDragMove: W,
|
|
1698
1646
|
handleDragEnd: ee,
|
|
1699
|
-
goToPrevious:
|
|
1700
|
-
goToNext:
|
|
1647
|
+
goToPrevious: Ne,
|
|
1648
|
+
goToNext: De,
|
|
1701
1649
|
carouselRef: O
|
|
1702
|
-
} =
|
|
1703
|
-
|
|
1704
|
-
`${me}|${
|
|
1650
|
+
} = Sn(Y.length);
|
|
1651
|
+
Tn(
|
|
1652
|
+
`${me}|${be}|${w}`,
|
|
1705
1653
|
pe
|
|
1706
1654
|
), U(() => {
|
|
1707
|
-
|
|
1655
|
+
u(i);
|
|
1708
1656
|
}, [i]), U(() => {
|
|
1709
|
-
E(
|
|
1710
|
-
}, [
|
|
1711
|
-
const te = (
|
|
1657
|
+
E(p);
|
|
1658
|
+
}, [p]);
|
|
1659
|
+
const te = (k, D) => {
|
|
1712
1660
|
const X = new Map(R);
|
|
1713
|
-
if (
|
|
1661
|
+
if (k) {
|
|
1714
1662
|
const le = X.get(D) || 0;
|
|
1715
1663
|
X.set(D, Math.max(0, le - 1));
|
|
1716
1664
|
} else {
|
|
1717
1665
|
const le = X.get(D) || 0;
|
|
1718
1666
|
if (X.set(D, le + 1), _ && _ !== D) {
|
|
1719
|
-
const
|
|
1720
|
-
X.set(_, Math.max(0,
|
|
1667
|
+
const So = X.get(_) || 0;
|
|
1668
|
+
X.set(_, Math.max(0, So - 1));
|
|
1721
1669
|
}
|
|
1722
1670
|
}
|
|
1723
|
-
|
|
1724
|
-
},
|
|
1725
|
-
|
|
1671
|
+
M(X);
|
|
1672
|
+
}, Xe = async (k) => {
|
|
1673
|
+
S(!0);
|
|
1726
1674
|
try {
|
|
1727
|
-
const D = _ ===
|
|
1728
|
-
await
|
|
1675
|
+
const D = _ === k;
|
|
1676
|
+
await h(k) ? (te(D, k), u(D ? null : k), q(
|
|
1729
1677
|
"success",
|
|
1730
|
-
|
|
1731
|
-
)) : q("error",
|
|
1678
|
+
c(D ? "potm.vote_removed" : "potm.vote_success")
|
|
1679
|
+
)) : q("error", c("potm.vote_error"));
|
|
1732
1680
|
} catch (D) {
|
|
1733
1681
|
console.error("Error handling vote", D);
|
|
1734
|
-
const { status: X } =
|
|
1735
|
-
X === "voting_potm_finished" || X === "voting_potm_not_started" ? q("error",
|
|
1682
|
+
const { status: X } = Le(D, o);
|
|
1683
|
+
X === "voting_potm_finished" || X === "voting_potm_not_started" ? q("error", c("potm.voting_closed")) : q("error", c("potm.vote_error"));
|
|
1736
1684
|
} finally {
|
|
1737
|
-
|
|
1685
|
+
S(!1);
|
|
1738
1686
|
}
|
|
1739
|
-
},
|
|
1740
|
-
a || H(
|
|
1741
|
-
},
|
|
1742
|
-
a || W(
|
|
1743
|
-
},
|
|
1687
|
+
}, bo = (k) => {
|
|
1688
|
+
a || H(k);
|
|
1689
|
+
}, vo = (k) => {
|
|
1690
|
+
a || W(k);
|
|
1691
|
+
}, rt = () => {
|
|
1744
1692
|
a || ee();
|
|
1745
|
-
},
|
|
1746
|
-
if (R.has(
|
|
1747
|
-
return R.get(
|
|
1748
|
-
if (!
|
|
1749
|
-
const D =
|
|
1750
|
-
(X) => X.playerId ===
|
|
1693
|
+
}, it = (k) => {
|
|
1694
|
+
if (R.has(k))
|
|
1695
|
+
return R.get(k) || 0;
|
|
1696
|
+
if (!d || !d.data) return 0;
|
|
1697
|
+
const D = d.data.find(
|
|
1698
|
+
(X) => X.playerId === k
|
|
1751
1699
|
);
|
|
1752
1700
|
return D ? D.votes : 0;
|
|
1753
|
-
},
|
|
1701
|
+
}, yo = (k) => {
|
|
1754
1702
|
const D = Y.findIndex(
|
|
1755
|
-
(le) => le.id ===
|
|
1703
|
+
(le) => le.id === k
|
|
1756
1704
|
);
|
|
1757
1705
|
if (D !== -1) {
|
|
1758
|
-
|
|
1706
|
+
ve(D);
|
|
1759
1707
|
return;
|
|
1760
1708
|
}
|
|
1761
|
-
const X =
|
|
1762
|
-
X && (Te(""),
|
|
1709
|
+
const X = l.find((le) => le.id === k);
|
|
1710
|
+
X && (Te(""), ze("all"), p.toLowerCase() === "all" && E(X.team), se(k));
|
|
1763
1711
|
};
|
|
1764
1712
|
U(() => {
|
|
1765
1713
|
if (!F) return;
|
|
1766
|
-
const
|
|
1714
|
+
const k = Y.findIndex(
|
|
1767
1715
|
(D) => D.id === F
|
|
1768
1716
|
);
|
|
1769
|
-
|
|
1717
|
+
k !== -1 && (pe(k), se(null));
|
|
1770
1718
|
}, [F, Y]);
|
|
1771
|
-
const
|
|
1772
|
-
(
|
|
1719
|
+
const ye = _ ? l.find((k) => k.id === _) : void 0, xo = !!(ye && (p.toLowerCase() === "all" || ye.team === w)), wo = l.reduce(
|
|
1720
|
+
(k, D) => k + it(D.id),
|
|
1773
1721
|
0
|
|
1774
1722
|
);
|
|
1775
|
-
return /* @__PURE__ */
|
|
1723
|
+
return /* @__PURE__ */ y("div", { css: ie.root, children: [
|
|
1776
1724
|
/* @__PURE__ */ n(
|
|
1777
|
-
|
|
1725
|
+
hn,
|
|
1778
1726
|
{
|
|
1779
|
-
votingDeadline:
|
|
1780
|
-
totalVotes:
|
|
1727
|
+
votingDeadline: g,
|
|
1728
|
+
totalVotes: wo
|
|
1781
1729
|
}
|
|
1782
1730
|
),
|
|
1783
|
-
|
|
1784
|
-
|
|
1731
|
+
ye && /* @__PURE__ */ n(
|
|
1732
|
+
bn,
|
|
1785
1733
|
{
|
|
1786
|
-
playerName:
|
|
1787
|
-
onJumpToVote:
|
|
1734
|
+
playerName: ye.name,
|
|
1735
|
+
onJumpToVote: xo ? () => yo(ye.id) : void 0
|
|
1788
1736
|
}
|
|
1789
1737
|
),
|
|
1790
|
-
|
|
1791
|
-
|
|
1738
|
+
p.toLowerCase() === "all" && /* @__PURE__ */ n(
|
|
1739
|
+
fn,
|
|
1792
1740
|
{
|
|
1793
|
-
teams:
|
|
1794
|
-
activeFilter:
|
|
1741
|
+
teams: f,
|
|
1742
|
+
activeFilter: w,
|
|
1795
1743
|
setActiveFilter: E,
|
|
1796
1744
|
setActiveIndex: pe
|
|
1797
1745
|
}
|
|
1798
1746
|
),
|
|
1799
|
-
/* @__PURE__ */
|
|
1747
|
+
/* @__PURE__ */ y("div", { css: ie.filterGroup, children: [
|
|
1800
1748
|
/* @__PURE__ */ n(
|
|
1801
|
-
|
|
1749
|
+
cn,
|
|
1802
1750
|
{
|
|
1803
1751
|
query: me,
|
|
1804
1752
|
setQuery: Te,
|
|
1805
1753
|
resultCount: Y.length,
|
|
1806
|
-
totalCount:
|
|
1754
|
+
totalCount: Ie
|
|
1807
1755
|
}
|
|
1808
1756
|
),
|
|
1809
1757
|
/* @__PURE__ */ n(
|
|
1810
|
-
|
|
1758
|
+
dn,
|
|
1811
1759
|
{
|
|
1812
|
-
positionCounts:
|
|
1813
|
-
positionFilter:
|
|
1814
|
-
setPositionFilter:
|
|
1815
|
-
totalCount:
|
|
1760
|
+
positionCounts: He,
|
|
1761
|
+
positionFilter: be,
|
|
1762
|
+
setPositionFilter: ze,
|
|
1763
|
+
totalCount: Ie
|
|
1816
1764
|
}
|
|
1817
1765
|
)
|
|
1818
1766
|
] }),
|
|
1819
|
-
Y.length === 0 ? /* @__PURE__ */
|
|
1820
|
-
/* @__PURE__ */ n("p", { css: ie.noResultsText, children: me ?
|
|
1821
|
-
/* @__PURE__ */ n("button", { type: "button", css: ie.clearFilters, onClick:
|
|
1822
|
-
] }) : /* @__PURE__ */
|
|
1823
|
-
/* @__PURE__ */
|
|
1767
|
+
Y.length === 0 ? /* @__PURE__ */ y("div", { css: ie.noResults, children: [
|
|
1768
|
+
/* @__PURE__ */ n("p", { css: ie.noResultsText, children: me ? c("potm.no_search_results", { query: Gt(me) }) : c("potm.no_players_for_filter") }),
|
|
1769
|
+
/* @__PURE__ */ n("button", { type: "button", css: ie.clearFilters, onClick: Oe, children: c("potm.clear_filters") })
|
|
1770
|
+
] }) : /* @__PURE__ */ y(Se, { children: [
|
|
1771
|
+
/* @__PURE__ */ y(
|
|
1824
1772
|
"div",
|
|
1825
1773
|
{
|
|
1826
1774
|
ref: O,
|
|
1827
1775
|
tabIndex: 0,
|
|
1828
1776
|
role: "region",
|
|
1829
|
-
"aria-label":
|
|
1777
|
+
"aria-label": c("potm.carousel_label"),
|
|
1830
1778
|
css: ie.container,
|
|
1831
|
-
onMouseDown:
|
|
1832
|
-
onMouseMove:
|
|
1833
|
-
onMouseUp:
|
|
1834
|
-
onMouseLeave:
|
|
1779
|
+
onMouseDown: bo,
|
|
1780
|
+
onMouseMove: vo,
|
|
1781
|
+
onMouseUp: rt,
|
|
1782
|
+
onMouseLeave: rt,
|
|
1835
1783
|
children: [
|
|
1836
1784
|
/* @__PURE__ */ n(
|
|
1837
|
-
|
|
1785
|
+
Yo,
|
|
1838
1786
|
{
|
|
1839
1787
|
activeIndex: re,
|
|
1840
1788
|
totalItems: Y.length,
|
|
1841
|
-
onPrev:
|
|
1842
|
-
onNext:
|
|
1789
|
+
onPrev: Ne,
|
|
1790
|
+
onNext: De
|
|
1843
1791
|
}
|
|
1844
1792
|
),
|
|
1845
1793
|
/* @__PURE__ */ n("div", { css: ie.content, children: Y.map(
|
|
1846
|
-
(
|
|
1847
|
-
|
|
1794
|
+
(k, D) => Math.abs(D - re) > zn ? null : /* @__PURE__ */ n(
|
|
1795
|
+
rn,
|
|
1848
1796
|
{
|
|
1849
|
-
player:
|
|
1850
|
-
isSelected: _ ===
|
|
1851
|
-
voteCount:
|
|
1797
|
+
player: k,
|
|
1798
|
+
isSelected: _ === k.id,
|
|
1799
|
+
voteCount: it(k.id),
|
|
1852
1800
|
index: D,
|
|
1853
1801
|
activeIndex: re,
|
|
1854
|
-
teamLogo: k
|
|
1855
|
-
handleVote:
|
|
1802
|
+
teamLogo: $(k.team),
|
|
1803
|
+
handleVote: Xe,
|
|
1856
1804
|
isVoting: a,
|
|
1857
|
-
isVotingClosed:
|
|
1805
|
+
isVotingClosed: m,
|
|
1858
1806
|
defaultImagePlaceholderUrl: x,
|
|
1859
|
-
showSignInCTA:
|
|
1807
|
+
showSignInCTA: T,
|
|
1860
1808
|
signInCTA: s
|
|
1861
1809
|
},
|
|
1862
|
-
|
|
1810
|
+
k.id
|
|
1863
1811
|
)
|
|
1864
1812
|
) })
|
|
1865
1813
|
]
|
|
1866
1814
|
}
|
|
1867
1815
|
),
|
|
1868
1816
|
/* @__PURE__ */ n(
|
|
1869
|
-
|
|
1817
|
+
Ko,
|
|
1870
1818
|
{
|
|
1871
1819
|
activeIndex: re,
|
|
1872
1820
|
totalItems: Y.length
|
|
1873
1821
|
}
|
|
1874
1822
|
),
|
|
1875
1823
|
/* @__PURE__ */ n(
|
|
1876
|
-
|
|
1824
|
+
mn,
|
|
1877
1825
|
{
|
|
1878
1826
|
players: Y,
|
|
1879
1827
|
activeIndex: re,
|
|
1880
1828
|
votedPlayerId: _,
|
|
1881
|
-
onSelect:
|
|
1829
|
+
onSelect: ve
|
|
1882
1830
|
}
|
|
1883
1831
|
),
|
|
1884
|
-
Y.length > 1 && !
|
|
1832
|
+
Y.length > 1 && !m && /* @__PURE__ */ n("p", { css: ie.hint, children: c("potm.helper_text") })
|
|
1885
1833
|
] }),
|
|
1886
|
-
/* @__PURE__ */ n(
|
|
1834
|
+
/* @__PURE__ */ n(Do, { notification: C, onClose: oe })
|
|
1887
1835
|
] });
|
|
1888
|
-
},
|
|
1889
|
-
h3: { ...
|
|
1890
|
-
h4: { ...
|
|
1891
|
-
titleLg: { ...
|
|
1892
|
-
titleMd: { ...
|
|
1893
|
-
body:
|
|
1894
|
-
bodyXs: { ...
|
|
1895
|
-
},
|
|
1836
|
+
}, Ge = "var(--fu-ucrc-palette-text-primary)", Rn = "var(--fu-ucrc-palette-text-secondary)", et = "#DDE7EE", tt = "#CDD7E1", uo = "#9FA6AD", ge = { ...Ro, display: "block", fontFamily: e.fontBody }, N = {
|
|
1837
|
+
h3: { ...ge, ...Po, fontWeight: 600, color: Ge },
|
|
1838
|
+
h4: { ...ge, letterSpacing: "-0.025em", fontWeight: 600, color: Ge },
|
|
1839
|
+
titleLg: { ...ge, lineHeight: 1.33334, fontWeight: 600, color: Ge },
|
|
1840
|
+
titleMd: { ...ge, fontWeight: 500 },
|
|
1841
|
+
body: ge,
|
|
1842
|
+
bodyXs: { ...ge, fontWeight: 500 }
|
|
1843
|
+
}, mo = (t) => ({
|
|
1896
1844
|
"& > :not(style):not(style)": { margin: 0 },
|
|
1897
1845
|
"& > :not(style) ~ :not(style)": { marginTop: t }
|
|
1898
|
-
}),
|
|
1846
|
+
}), po = (t) => ({
|
|
1899
1847
|
"& > :not(style):not(style)": { margin: 0 },
|
|
1900
1848
|
"& > :not(style) ~ :not(style)": { marginLeft: t }
|
|
1901
|
-
}),
|
|
1849
|
+
}), fo = {
|
|
1902
1850
|
position: "relative",
|
|
1903
1851
|
fontFamily: e.fontBody,
|
|
1904
1852
|
fontWeight: 500,
|
|
@@ -1907,7 +1855,7 @@ const Tt = (t) => r({
|
|
|
1907
1855
|
userSelect: "none",
|
|
1908
1856
|
// Joy's Avatar image: hides the alt text while it loads.
|
|
1909
1857
|
"& > img": { textAlign: "center", color: "transparent", textIndent: "10000px" }
|
|
1910
|
-
},
|
|
1858
|
+
}, Pn = `var(--fu-ucrc-potm-banner-text, ${e.dim})`, Mt = {
|
|
1911
1859
|
fontFamily: e.fontBody,
|
|
1912
1860
|
lineHeight: 1.5,
|
|
1913
1861
|
color: "var(--fu-ucrc-neutral-outlined-color)",
|
|
@@ -1947,73 +1895,73 @@ const Tt = (t) => r({
|
|
|
1947
1895
|
backgroundSize: "3.75em 3.75em",
|
|
1948
1896
|
zIndex: 3
|
|
1949
1897
|
}
|
|
1950
|
-
},
|
|
1898
|
+
}, go = { alignItems: "center", width: "100%" }, At = { ...go, justifyContent: "space-between" }, Bt = { ...go, justifyContent: "center", gap: e.space2xs }, Et = { display: "flex", alignItems: "center", gap: e.spaceXs, width: "45%", position: "relative", zIndex: 1 }, Lt = { ...fo, backgroundColor: "transparent" }, Be = { ...N.body, color: Pn }, A = {
|
|
1951
1899
|
root: r({ textAlign: "center", position: "relative" }),
|
|
1952
|
-
intro: r({ display: "flex", flexDirection: "column", marginBottom: e.spaceMd, ...
|
|
1900
|
+
intro: r({ display: "flex", flexDirection: "column", marginBottom: e.spaceMd, ...mo(e.spaceMd) }),
|
|
1953
1901
|
title: r({ ...N.h4, fontSize: "1.25em" }),
|
|
1954
1902
|
description: r({ ...N.body, color: e.dim, fontSize: "1em" }),
|
|
1955
1903
|
bannerWrap: r({ display: "flex", justifyContent: "center", marginBottom: e.spaceMd }),
|
|
1956
|
-
banner: r({ ...
|
|
1957
|
-
bannerSm: r({ ...
|
|
1904
|
+
banner: r({ ...Mt, padding: e.spaceSm }),
|
|
1905
|
+
bannerSm: r({ ...Mt, padding: e.spaceMd }),
|
|
1958
1906
|
// Large screens get the full names side by side; smaller ones a single line of team codes.
|
|
1959
|
-
desktop: r({ ...
|
|
1960
|
-
desktopHidden: r({ ...
|
|
1961
|
-
mobile: r({ ...
|
|
1962
|
-
mobileHidden: r({ ...
|
|
1963
|
-
homeTeam: r(
|
|
1964
|
-
awayTeam: r({ ...
|
|
1965
|
-
avatarLarge: r({ ...
|
|
1966
|
-
avatarSmall: r({ ...
|
|
1967
|
-
name: r({ ...
|
|
1968
|
-
code: r({ ...
|
|
1907
|
+
desktop: r({ ...At, display: "flex" }),
|
|
1908
|
+
desktopHidden: r({ ...At, display: "none" }),
|
|
1909
|
+
mobile: r({ ...Bt, display: "flex" }),
|
|
1910
|
+
mobileHidden: r({ ...Bt, display: "none" }),
|
|
1911
|
+
homeTeam: r(Et),
|
|
1912
|
+
awayTeam: r({ ...Et, justifyContent: "flex-end" }),
|
|
1913
|
+
avatarLarge: r({ ...Lt, padding: e.spaceXs, width: "4.6875em", height: "4.6875em" }),
|
|
1914
|
+
avatarSmall: r({ ...Lt, padding: e.space2xs, width: "1.75em", height: "1.75em" }),
|
|
1915
|
+
name: r({ ...Be, fontSize: "1em", fontWeight: 500, unicodeBidi: "plaintext" }),
|
|
1916
|
+
code: r({ ...Be, fontSize: "0.875em", fontWeight: 500, unicodeBidi: "plaintext" }),
|
|
1969
1917
|
vsBox: r({ textAlign: "center", width: "20%", position: "relative", zIndex: 1 }),
|
|
1970
|
-
vs: r({ ...
|
|
1971
|
-
vsInline: r({ ...
|
|
1972
|
-
},
|
|
1973
|
-
var b, x,
|
|
1974
|
-
const { t: i } = G(),
|
|
1918
|
+
vs: r({ ...Be, fontSize: "0.75em" }),
|
|
1919
|
+
vsInline: r({ ...Be, marginLeft: e.space2xs, marginRight: e.space2xs, fontSize: "0.75em" })
|
|
1920
|
+
}, _n = ({ teams: t, headerBannerStyles: o }) => {
|
|
1921
|
+
var b, x, T, s, g, c;
|
|
1922
|
+
const { t: i } = G(), d = Z("sm"), h = Z("lg"), m = {
|
|
1975
1923
|
background: o == null ? void 0 : o.background,
|
|
1976
1924
|
borderColor: o == null ? void 0 : o.borderColor,
|
|
1977
1925
|
"--fu-ucrc-potm-banner-text": o == null ? void 0 : o.textColor
|
|
1978
|
-
},
|
|
1979
|
-
return /* @__PURE__ */
|
|
1980
|
-
/* @__PURE__ */
|
|
1981
|
-
/* @__PURE__ */ n("h4", { css:
|
|
1982
|
-
/* @__PURE__ */ n("p", { css:
|
|
1926
|
+
}, p = (l, f) => /* @__PURE__ */ n(ao, { src: l == null ? void 0 : l.logo, alt: l == null ? void 0 : l.name, css: f ? A.avatarLarge : A.avatarSmall });
|
|
1927
|
+
return /* @__PURE__ */ y("div", { css: A.root, children: [
|
|
1928
|
+
/* @__PURE__ */ y("div", { css: A.intro, children: [
|
|
1929
|
+
/* @__PURE__ */ n("h4", { css: A.title, children: i("potm.title") }),
|
|
1930
|
+
/* @__PURE__ */ n("p", { css: A.description, children: i("potm.description") })
|
|
1983
1931
|
] }),
|
|
1984
|
-
/* @__PURE__ */ n("div", { css:
|
|
1985
|
-
/* @__PURE__ */
|
|
1986
|
-
t.length > 0 && /* @__PURE__ */
|
|
1987
|
-
|
|
1988
|
-
/* @__PURE__ */ n("p", { css:
|
|
1932
|
+
/* @__PURE__ */ n("div", { css: A.bannerWrap, children: /* @__PURE__ */ y("div", { css: d ? A.bannerSm : A.banner, style: m, children: [
|
|
1933
|
+
/* @__PURE__ */ y("div", { css: h ? A.desktop : A.desktopHidden, children: [
|
|
1934
|
+
t.length > 0 && /* @__PURE__ */ y("div", { css: A.homeTeam, children: [
|
|
1935
|
+
p(t[0], !0),
|
|
1936
|
+
/* @__PURE__ */ n("p", { css: A.name, children: (b = t[0]) == null ? void 0 : b.name })
|
|
1989
1937
|
] }),
|
|
1990
|
-
/* @__PURE__ */ n("div", { css:
|
|
1991
|
-
t.length > 1 && /* @__PURE__ */
|
|
1992
|
-
/* @__PURE__ */ n("p", { css:
|
|
1993
|
-
|
|
1938
|
+
/* @__PURE__ */ n("div", { css: A.vsBox, children: /* @__PURE__ */ n("p", { css: A.vs, children: i("potm.vs") }) }),
|
|
1939
|
+
t.length > 1 && /* @__PURE__ */ y("div", { css: A.awayTeam, children: [
|
|
1940
|
+
/* @__PURE__ */ n("p", { css: A.name, children: (x = t[1]) == null ? void 0 : x.name }),
|
|
1941
|
+
p(t[1], !0)
|
|
1994
1942
|
] })
|
|
1995
1943
|
] }),
|
|
1996
|
-
/* @__PURE__ */
|
|
1997
|
-
t.length > 0 && /* @__PURE__ */
|
|
1998
|
-
/* @__PURE__ */ n("p", { css:
|
|
1999
|
-
|
|
1944
|
+
/* @__PURE__ */ y("div", { css: h ? A.mobileHidden : A.mobile, children: [
|
|
1945
|
+
t.length > 0 && /* @__PURE__ */ y(Se, { children: [
|
|
1946
|
+
/* @__PURE__ */ n("p", { css: A.code, children: ((T = t[0]) == null ? void 0 : T.code) || ((s = t[0]) == null ? void 0 : s.name.substring(0, 3)) }),
|
|
1947
|
+
p(t[0], !1)
|
|
2000
1948
|
] }),
|
|
2001
|
-
/* @__PURE__ */ n("p", { css:
|
|
2002
|
-
t.length > 1 && /* @__PURE__ */
|
|
2003
|
-
|
|
2004
|
-
/* @__PURE__ */ n("p", { css:
|
|
1949
|
+
/* @__PURE__ */ n("p", { css: A.vsInline, children: i("potm.vs") }),
|
|
1950
|
+
t.length > 1 && /* @__PURE__ */ y(Se, { children: [
|
|
1951
|
+
p(t[1], !1),
|
|
1952
|
+
/* @__PURE__ */ n("p", { css: A.code, children: ((g = t[1]) == null ? void 0 : g.code) || ((c = t[1]) == null ? void 0 : c.name.substring(0, 3)) })
|
|
2005
1953
|
] })
|
|
2006
1954
|
] })
|
|
2007
1955
|
] }) })
|
|
2008
1956
|
] });
|
|
2009
|
-
},
|
|
1957
|
+
}, Mn = {
|
|
2010
1958
|
display: "flex",
|
|
2011
1959
|
flexDirection: "column",
|
|
2012
1960
|
alignItems: "center",
|
|
2013
1961
|
justifyContent: "flex-start",
|
|
2014
1962
|
gap: "0.75em 1em",
|
|
2015
1963
|
padding: `${e.spaceLg} ${e.spaceMd}`,
|
|
2016
|
-
borderRadius:
|
|
1964
|
+
borderRadius: ke.md,
|
|
2017
1965
|
backgroundColor: "var(--fu-ucrc-bg-surface)",
|
|
2018
1966
|
fontFamily: e.fontBody,
|
|
2019
1967
|
lineHeight: 1.5,
|
|
@@ -2024,7 +1972,7 @@ const Tt = (t) => r({
|
|
|
2024
1972
|
transformOrigin: "center top",
|
|
2025
1973
|
transition: "all 0.3s ease",
|
|
2026
1974
|
overflow: "visible"
|
|
2027
|
-
},
|
|
1975
|
+
}, An = {
|
|
2028
1976
|
winner: {
|
|
2029
1977
|
border: `${e.borderSize} solid ${e.warning}`,
|
|
2030
1978
|
boxShadow: `0 0.625em 1.5625em color-mix(in srgb, ${e.warning} 20%, transparent)`,
|
|
@@ -2042,16 +1990,16 @@ const Tt = (t) => r({
|
|
|
2042
1990
|
opacity: 0.4
|
|
2043
1991
|
}
|
|
2044
1992
|
},
|
|
2045
|
-
second: { border: `${e.borderSize} solid ${
|
|
2046
|
-
other: { border: `${e.borderSize} solid ${
|
|
2047
|
-
},
|
|
2048
|
-
for (const t of
|
|
1993
|
+
second: { border: `${e.borderSize} solid ${et}`, boxShadow: "0 0.3125em 0.9375em rgba(0,0,0,0.06)", zIndex: 1 },
|
|
1994
|
+
other: { border: `${e.borderSize} solid ${et}`, boxShadow: "0 0.3125em 0.9375em rgba(0,0,0,0.06)", zIndex: 0 }
|
|
1995
|
+
}, Bn = ["winner", "second", "other"], ho = {};
|
|
1996
|
+
for (const t of Bn)
|
|
2049
1997
|
for (const o of [!1, !0])
|
|
2050
|
-
|
|
1998
|
+
ho[`${t}|${o}`] = r(Mn, An[t], {
|
|
2051
1999
|
width: o ? "30%" : "auto",
|
|
2052
2000
|
transform: `scale(${o ? t === "winner" ? 1.01 : 0.95 : 1})`
|
|
2053
2001
|
});
|
|
2054
|
-
const
|
|
2002
|
+
const Wt = {
|
|
2055
2003
|
position: "absolute",
|
|
2056
2004
|
top: "-0.9375em",
|
|
2057
2005
|
left: "50%",
|
|
@@ -2064,27 +2012,27 @@ const Ot = {
|
|
|
2064
2012
|
alignItems: "center",
|
|
2065
2013
|
boxShadow: "0 0.125em 0.5em rgba(0,0,0,0.2)",
|
|
2066
2014
|
zIndex: 10
|
|
2067
|
-
},
|
|
2068
|
-
...
|
|
2015
|
+
}, Ft = {
|
|
2016
|
+
...fo,
|
|
2069
2017
|
backgroundColor: "var(--fu-ucrc-neutral-soft-bg)",
|
|
2070
2018
|
marginTop: e.spaceMd,
|
|
2071
2019
|
marginBottom: e.spaceMd
|
|
2072
|
-
},
|
|
2020
|
+
}, Ht = { width: "80%", marginLeft: "auto", marginRight: "auto", height: "0.5em", borderRadius: "0.25em", overflow: "hidden", position: "relative" }, Ot = { position: "absolute", top: 0, left: 0, height: "100%", borderRadius: "0.25em", transition: "width 1s ease-in-out" }, Nt = { ...N.titleMd, fontSize: "1em" }, En = { color: "rgb(154, 91, 19)", ".dark &": { color: "rgb(234, 154, 62)" } }, B = {
|
|
2073
2021
|
root: r({ paddingBottom: e.spaceXl }),
|
|
2074
2022
|
titleBox: r({ marginBottom: e.spaceXl }),
|
|
2075
2023
|
title: r({ ...N.h3, textAlign: "center", fontSize: "1.5em" }),
|
|
2076
2024
|
list: r({ display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "stretch", gap: e.spaceXl }),
|
|
2077
2025
|
listSm: r({ display: "flex", flexDirection: "row", justifyContent: "center", alignItems: "stretch", gap: e.spaceXl }),
|
|
2078
|
-
badgeWinner: r({ ...
|
|
2079
|
-
badge: r({ ...
|
|
2026
|
+
badgeWinner: r({ ...Wt, backgroundColor: e.warning, fontSize: "1.2em" }),
|
|
2027
|
+
badge: r({ ...Wt, backgroundColor: tt, fontSize: "1em" }),
|
|
2080
2028
|
medal: r({ fontSize: "1.375em", lineHeight: 1 }),
|
|
2081
|
-
avatarWinner: r({ ...
|
|
2082
|
-
avatar: r({ ...
|
|
2029
|
+
avatarWinner: r({ ...Ft, width: "6.875em", height: "6.875em", border: `${e.borderSize} solid ${e.warning}` }),
|
|
2030
|
+
avatar: r({ ...Ft, width: "6.25em", height: "6.25em", border: `${e.borderSize} solid ${tt}` }),
|
|
2083
2031
|
barWrap: r({ width: "100%", marginBottom: e.spaceMd, marginTop: e.spaceXs, paddingLeft: e.spaceXs, paddingRight: e.spaceXs }),
|
|
2084
|
-
barWinner: r({ ...
|
|
2085
|
-
bar: r({ ...
|
|
2086
|
-
fillWinner: r({ ...
|
|
2087
|
-
fill: r({ ...
|
|
2032
|
+
barWinner: r({ ...Ht, backgroundColor: e.warningSoft }),
|
|
2033
|
+
bar: r({ ...Ht, backgroundColor: et }),
|
|
2034
|
+
fillWinner: r({ ...Ot, backgroundColor: e.warning }),
|
|
2035
|
+
fill: r({ ...Ot, backgroundColor: uo }),
|
|
2088
2036
|
name: r({ ...N.titleLg, marginBottom: e.space2xs, textAlign: "center", fontSize: "1.25em", unicodeBidi: "plaintext" }),
|
|
2089
2037
|
tied: r({
|
|
2090
2038
|
...N.bodyXs,
|
|
@@ -2097,11 +2045,11 @@ const Ot = {
|
|
|
2097
2045
|
fontSize: "0.75em"
|
|
2098
2046
|
}),
|
|
2099
2047
|
position: r({ ...N.body, marginBottom: e.spaceXs, color: e.dim, fontSize: "0.875em" }),
|
|
2100
|
-
stats: r({ display: "flex", flexDirection: "row", alignItems: "center", marginTop: e.spaceXs, ...
|
|
2101
|
-
percentageWinner: r({ ...
|
|
2102
|
-
percentage: r({ ...
|
|
2048
|
+
stats: r({ display: "flex", flexDirection: "row", alignItems: "center", marginTop: e.spaceXs, ...po(e.spaceXs) }),
|
|
2049
|
+
percentageWinner: r({ ...Nt, ...En }),
|
|
2050
|
+
percentage: r({ ...Nt, color: "rgba(var(--fu-ucrc-neutral-main-channel) / 1)" }),
|
|
2103
2051
|
votes: r({ ...N.body, color: e.dim, fontSize: "0.875em" })
|
|
2104
|
-
},
|
|
2052
|
+
}, Ln = r({
|
|
2105
2053
|
width: "1.875em",
|
|
2106
2054
|
height: "1.875em",
|
|
2107
2055
|
objectFit: "contain",
|
|
@@ -2128,114 +2076,114 @@ const Ot = {
|
|
|
2128
2076
|
backgroundRepeat: "no-repeat",
|
|
2129
2077
|
backgroundSize: "cover",
|
|
2130
2078
|
backgroundPosition: "center",
|
|
2131
|
-
...
|
|
2079
|
+
...mo(e.spaceMd)
|
|
2132
2080
|
}),
|
|
2133
2081
|
notFound: r({ textAlign: "center", padding: e.spaceMd, fontSize: "1em" }),
|
|
2134
2082
|
content: r({ padding: e.spaceLg }),
|
|
2135
2083
|
// Also the results view's "no votes yet".
|
|
2136
2084
|
emptyState: r({ textAlign: "center", paddingTop: e.spaceXl, paddingBottom: e.spaceXl }),
|
|
2137
|
-
emptyText: r({ ...N.body, color:
|
|
2085
|
+
emptyText: r({ ...N.body, color: Rn, fontSize: "1.125em" }),
|
|
2138
2086
|
status: r({ ...N.body, textAlign: "center", color: e.tertiary, fontSize: "0.875em" })
|
|
2139
|
-
},
|
|
2087
|
+
}, Xt = Q.teamPlaceholder, Wn = Q.playerPlaceholder, Fn = (t, o) => o === 0 ? "0%" : `${(t / o * 100).toFixed(1)}%`, Hn = ({
|
|
2140
2088
|
results: t,
|
|
2141
2089
|
match: o,
|
|
2142
2090
|
showPlayers: i
|
|
2143
2091
|
}) => {
|
|
2144
|
-
const { t:
|
|
2092
|
+
const { t: d } = G(), h = Z("sm"), [m, p] = I([]), [b, x] = I(0);
|
|
2145
2093
|
U(() => {
|
|
2146
2094
|
if (!(t != null && t.length)) return;
|
|
2147
|
-
let
|
|
2148
|
-
i && i.length > 0 && (
|
|
2149
|
-
(
|
|
2095
|
+
let g = t;
|
|
2096
|
+
i && i.length > 0 && (g = t.filter(
|
|
2097
|
+
(f) => i.includes(f.playerId)
|
|
2150
2098
|
));
|
|
2151
|
-
const
|
|
2152
|
-
(
|
|
2099
|
+
const c = g.reduce(
|
|
2100
|
+
(f, $) => f + $.votes,
|
|
2153
2101
|
0
|
|
2154
2102
|
);
|
|
2155
|
-
x(
|
|
2156
|
-
const
|
|
2157
|
-
...
|
|
2158
|
-
percent:
|
|
2159
|
-
playerDetails:
|
|
2103
|
+
x(c);
|
|
2104
|
+
const l = [...g].sort((f, $) => f.winner && !$.winner ? -1 : !f.winner && $.winner ? 1 : $.votes - f.votes).slice(0, 3).map((f) => ({
|
|
2105
|
+
...f,
|
|
2106
|
+
percent: c > 0 ? f.votes / c * 100 : 0,
|
|
2107
|
+
playerDetails: T(f.playerId, o)
|
|
2160
2108
|
}));
|
|
2161
|
-
|
|
2109
|
+
p(l);
|
|
2162
2110
|
}, [t, o, i]);
|
|
2163
|
-
const
|
|
2164
|
-
var
|
|
2165
|
-
let
|
|
2166
|
-
if (
|
|
2167
|
-
const
|
|
2168
|
-
(E) => E.playerId ===
|
|
2169
|
-
),
|
|
2111
|
+
const T = (g, c) => {
|
|
2112
|
+
var w;
|
|
2113
|
+
let l = c.lineups.homeTeam.players.find((E) => E.id === g);
|
|
2114
|
+
if (l || (l = c.lineups.awayTeam.players.find((E) => E.id === g)), !l) return;
|
|
2115
|
+
const f = c.playerStats.find(
|
|
2116
|
+
(E) => E.playerId === g
|
|
2117
|
+
), $ = (f == null ? void 0 : f.minutesPlayed) || 0;
|
|
2170
2118
|
return {
|
|
2171
|
-
id:
|
|
2172
|
-
name:
|
|
2173
|
-
number:
|
|
2174
|
-
team:
|
|
2175
|
-
position:
|
|
2176
|
-
image: (
|
|
2177
|
-
type:
|
|
2178
|
-
minutesPlayed:
|
|
2119
|
+
id: l.id,
|
|
2120
|
+
name: l.name,
|
|
2121
|
+
number: l.shirtNumber || 0,
|
|
2122
|
+
team: l.id.includes(c.homeTeam.id) ? c.homeTeam.id : c.awayTeam.id,
|
|
2123
|
+
position: l.position || "Unknown",
|
|
2124
|
+
image: (w = l.assets) == null ? void 0 : w.headshot,
|
|
2125
|
+
type: l.type,
|
|
2126
|
+
minutesPlayed: $
|
|
2179
2127
|
};
|
|
2180
|
-
}, s = (
|
|
2181
|
-
var
|
|
2128
|
+
}, s = (g) => {
|
|
2129
|
+
var l, f;
|
|
2182
2130
|
return o.lineups.homeTeam.players.some(
|
|
2183
|
-
(
|
|
2184
|
-
) ? ((
|
|
2131
|
+
($) => $.id === g
|
|
2132
|
+
) ? ((l = o.homeTeam.assets) == null ? void 0 : l.logo) || Xt : ((f = o.awayTeam.assets) == null ? void 0 : f.logo) || Xt;
|
|
2185
2133
|
};
|
|
2186
|
-
return
|
|
2187
|
-
/* @__PURE__ */ n("div", { css: B.titleBox, children: /* @__PURE__ */ n("h3", { css: B.title, children:
|
|
2188
|
-
/* @__PURE__ */ n("div", { css:
|
|
2189
|
-
var
|
|
2190
|
-
const
|
|
2134
|
+
return m.length ? /* @__PURE__ */ y("div", { css: B.root, children: [
|
|
2135
|
+
/* @__PURE__ */ n("div", { css: B.titleBox, children: /* @__PURE__ */ n("h3", { css: B.title, children: d("potm.results_title") }) }),
|
|
2136
|
+
/* @__PURE__ */ n("div", { css: h ? B.listSm : B.list, children: m.map((g, c) => {
|
|
2137
|
+
var z, R, M;
|
|
2138
|
+
const l = g.winner === !0, f = m.filter((F) => !F.winner).indexOf(g), $ = !l && f === 0, w = !l && f === 1, E = () => l ? "🏆" : $ ? "🥈" : w ? "🥉" : "", _ = m.filter(
|
|
2191
2139
|
(F) => F.winner === !0
|
|
2192
|
-
).length,
|
|
2193
|
-
if (!
|
|
2194
|
-
const
|
|
2195
|
-
return /* @__PURE__ */
|
|
2196
|
-
/* @__PURE__ */ n("div", { css:
|
|
2140
|
+
).length, u = l && _ > 1, a = l ? m.filter((F) => F.winner === !0).indexOf(g) : void 0;
|
|
2141
|
+
if (!g.playerDetails) return null;
|
|
2142
|
+
const S = l ? "winner" : $ ? "second" : "other", C = h ? l ? a ?? 0 : $ ? -1 : 1 : c;
|
|
2143
|
+
return /* @__PURE__ */ y("div", { css: ho[`${S}|${h}`], style: { order: C }, children: [
|
|
2144
|
+
/* @__PURE__ */ n("div", { css: l ? B.badgeWinner : B.badge, children: /* @__PURE__ */ n("span", { css: B.medal, children: E() }) }),
|
|
2197
2145
|
/* @__PURE__ */ n(
|
|
2198
2146
|
"img",
|
|
2199
2147
|
{
|
|
2200
|
-
src: s(
|
|
2201
|
-
onError:
|
|
2202
|
-
css:
|
|
2148
|
+
src: s(g.playerId),
|
|
2149
|
+
onError: We(Q.teamPlaceholder),
|
|
2150
|
+
css: Ln,
|
|
2203
2151
|
alt: "Team logo"
|
|
2204
2152
|
}
|
|
2205
2153
|
),
|
|
2206
2154
|
/* @__PURE__ */ n(
|
|
2207
|
-
|
|
2155
|
+
nt,
|
|
2208
2156
|
{
|
|
2209
|
-
src: ((
|
|
2157
|
+
src: ((z = g.playerDetails) == null ? void 0 : z.image) || Wn,
|
|
2210
2158
|
placeholder: Q.playerPlaceholder,
|
|
2211
|
-
alt: ((R =
|
|
2212
|
-
css:
|
|
2159
|
+
alt: ((R = g.playerDetails) == null ? void 0 : R.name) || "Player",
|
|
2160
|
+
css: l ? B.avatarWinner : B.avatar
|
|
2213
2161
|
}
|
|
2214
2162
|
),
|
|
2215
|
-
/* @__PURE__ */ n("div", { css: B.barWrap, children: /* @__PURE__ */ n("div", { css:
|
|
2163
|
+
/* @__PURE__ */ n("div", { css: B.barWrap, children: /* @__PURE__ */ n("div", { css: l ? B.barWinner : B.bar, children: /* @__PURE__ */ n(
|
|
2216
2164
|
"div",
|
|
2217
2165
|
{
|
|
2218
|
-
css:
|
|
2219
|
-
style: { width: `${
|
|
2166
|
+
css: l ? B.fillWinner : B.fill,
|
|
2167
|
+
style: { width: `${g.percent}%` }
|
|
2220
2168
|
}
|
|
2221
2169
|
) }) }),
|
|
2222
|
-
/* @__PURE__ */ n("p", { css: B.name, children: ((
|
|
2223
|
-
|
|
2224
|
-
/* @__PURE__ */ n("p", { css: B.position, children:
|
|
2225
|
-
/* @__PURE__ */
|
|
2226
|
-
/* @__PURE__ */ n("p", { css:
|
|
2227
|
-
/* @__PURE__ */
|
|
2170
|
+
/* @__PURE__ */ n("p", { css: B.name, children: ((M = g.playerDetails) == null ? void 0 : M.name) || "Unknown Player" }),
|
|
2171
|
+
u && /* @__PURE__ */ n("span", { css: B.tied, children: d("potm.tied_winner", "Tied Winner") }),
|
|
2172
|
+
/* @__PURE__ */ n("p", { css: B.position, children: g.playerDetails ? d(`potm.${g.playerDetails.position}`) : "" }),
|
|
2173
|
+
/* @__PURE__ */ y("div", { css: B.stats, children: [
|
|
2174
|
+
/* @__PURE__ */ n("p", { css: l ? B.percentageWinner : B.percentage, children: Fn(g.votes, b) }),
|
|
2175
|
+
/* @__PURE__ */ y("p", { css: B.votes, children: [
|
|
2228
2176
|
"(",
|
|
2229
|
-
|
|
2177
|
+
g.votes,
|
|
2230
2178
|
" ",
|
|
2231
|
-
|
|
2179
|
+
d("potm.votes", { count: g.votes }),
|
|
2232
2180
|
")"
|
|
2233
2181
|
] })
|
|
2234
2182
|
] })
|
|
2235
|
-
] },
|
|
2183
|
+
] }, g.playerId);
|
|
2236
2184
|
}) })
|
|
2237
|
-
] }) : /* @__PURE__ */ n("div", { css: ae.emptyState, children: /* @__PURE__ */ n("p", { css: ae.emptyText, children:
|
|
2238
|
-
},
|
|
2185
|
+
] }) : /* @__PURE__ */ n("div", { css: ae.emptyState, children: /* @__PURE__ */ n("p", { css: ae.emptyText, children: d("potm.no_votes_cast") }) });
|
|
2186
|
+
}, Vt = { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, opacity: 0.02 }, jt = { position: "absolute", color: uo }, j = {
|
|
2239
2187
|
root: r({
|
|
2240
2188
|
textAlign: "center",
|
|
2241
2189
|
padding: `${e.spaceXl} ${e.spaceMd}`,
|
|
@@ -2251,13 +2199,13 @@ const Ot = {
|
|
|
2251
2199
|
zIndex: 1
|
|
2252
2200
|
}),
|
|
2253
2201
|
grid: r({
|
|
2254
|
-
...
|
|
2202
|
+
...Vt,
|
|
2255
2203
|
backgroundImage: `linear-gradient(rgba(${e.primaryRgb}, 0.5) 0.0625em, transparent 0.0625em), linear-gradient(to right, rgba(${e.primaryRgb}, 0.5) 0.0625em, transparent 0.0625em)`,
|
|
2256
2204
|
backgroundSize: "1.875em 1.875em",
|
|
2257
2205
|
zIndex: 2
|
|
2258
2206
|
}),
|
|
2259
2207
|
diagonal: r({
|
|
2260
|
-
...
|
|
2208
|
+
...Vt,
|
|
2261
2209
|
backgroundImage: `linear-gradient(45deg, rgba(${e.primaryRgb}, 0.6) 0.0625em, transparent 0.0625em), linear-gradient(135deg, rgba(${e.primaryRgb}, 0.6) 0.0625em, transparent 0.0625em)`,
|
|
2262
2210
|
backgroundSize: "3.75em 3.75em",
|
|
2263
2211
|
zIndex: 3
|
|
@@ -2294,10 +2242,10 @@ const Ot = {
|
|
|
2294
2242
|
background: e.surface
|
|
2295
2243
|
}),
|
|
2296
2244
|
cardRow: r({ display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "center", position: "relative" }),
|
|
2297
|
-
clock: r({ ...
|
|
2298
|
-
clockSm: r({ ...
|
|
2245
|
+
clock: r({ ...jt, left: 0 }),
|
|
2246
|
+
clockSm: r({ ...jt, left: "0.5em" }),
|
|
2299
2247
|
startingSoon: r({ ...N.titleLg, color: "rgba(var(--fu-ucrc-primary-main-channel) / 1)", fontSize: "1.25em" }),
|
|
2300
|
-
countdown: r({ display: "flex", flexDirection: "row", justifyContent: "center", width: "100%", ...
|
|
2248
|
+
countdown: r({ display: "flex", flexDirection: "row", justifyContent: "center", width: "100%", ...po("16px") }),
|
|
2301
2249
|
unit: r({ display: "flex", flexDirection: "column", alignItems: "center" }),
|
|
2302
2250
|
value: r({ ...N.h4, color: e.text, fontVariantNumeric: "tabular-nums", fontWeight: 600, fontSize: "1.25em" }),
|
|
2303
2251
|
label: r({
|
|
@@ -2311,77 +2259,77 @@ const Ot = {
|
|
|
2311
2259
|
separator: r({
|
|
2312
2260
|
...N.h4,
|
|
2313
2261
|
alignSelf: "flex-start",
|
|
2314
|
-
color:
|
|
2262
|
+
color: tt,
|
|
2315
2263
|
fontWeight: 300,
|
|
2316
2264
|
fontSize: "1.25em"
|
|
2317
2265
|
})
|
|
2318
|
-
},
|
|
2319
|
-
const { t: o } = G(), i = Z("sm"), { days:
|
|
2320
|
-
return /* @__PURE__ */
|
|
2266
|
+
}, On = ({ match: t }) => {
|
|
2267
|
+
const { t: o } = G(), i = Z("sm"), { days: d, hours: h, minutes: m, seconds: p, isExpired: b } = so(t.kickoffAt);
|
|
2268
|
+
return /* @__PURE__ */ y("div", { css: j.root, children: [
|
|
2321
2269
|
/* @__PURE__ */ n("div", { css: j.grid }),
|
|
2322
2270
|
/* @__PURE__ */ n("div", { css: j.diagonal }),
|
|
2323
2271
|
/* @__PURE__ */ n("h3", { css: j.title, children: o("potm.voting_opens_soon") }),
|
|
2324
2272
|
/* @__PURE__ */ n("p", { css: j.description, children: o("potm.voting_upcoming_message") }),
|
|
2325
|
-
/* @__PURE__ */ n("div", { css: j.card, children: /* @__PURE__ */
|
|
2326
|
-
/* @__PURE__ */ n(
|
|
2327
|
-
b ? /* @__PURE__ */ n("p", { css: j.startingSoon, children: o("potm.match_starting_soon") }) : /* @__PURE__ */
|
|
2328
|
-
/* @__PURE__ */ n(
|
|
2329
|
-
/* @__PURE__ */ n(
|
|
2330
|
-
/* @__PURE__ */ n(
|
|
2331
|
-
/* @__PURE__ */ n(
|
|
2332
|
-
/* @__PURE__ */ n(
|
|
2333
|
-
/* @__PURE__ */ n(
|
|
2334
|
-
/* @__PURE__ */ n(
|
|
2273
|
+
/* @__PURE__ */ n("div", { css: j.card, children: /* @__PURE__ */ y("div", { css: j.cardRow, children: [
|
|
2274
|
+
/* @__PURE__ */ n(Yt, { size: "1.25em", css: i ? j.clockSm : j.clock }),
|
|
2275
|
+
b ? /* @__PURE__ */ n("p", { css: j.startingSoon, children: o("potm.match_starting_soon") }) : /* @__PURE__ */ y("div", { css: j.countdown, children: [
|
|
2276
|
+
/* @__PURE__ */ n(Ee, { value: d, label: o("potm.days") }),
|
|
2277
|
+
/* @__PURE__ */ n(Ye, {}),
|
|
2278
|
+
/* @__PURE__ */ n(Ee, { value: h, label: o("potm.hours") }),
|
|
2279
|
+
/* @__PURE__ */ n(Ye, {}),
|
|
2280
|
+
/* @__PURE__ */ n(Ee, { value: m, label: o("potm.min") }),
|
|
2281
|
+
/* @__PURE__ */ n(Ye, {}),
|
|
2282
|
+
/* @__PURE__ */ n(Ee, { value: p, label: o("potm.sec") })
|
|
2335
2283
|
] })
|
|
2336
2284
|
] }) })
|
|
2337
2285
|
] });
|
|
2338
|
-
},
|
|
2286
|
+
}, Ee = ({ value: t, label: o }) => /* @__PURE__ */ y("div", { css: j.unit, children: [
|
|
2339
2287
|
/* @__PURE__ */ n("h4", { css: j.value, children: t.toString().padStart(2, "0") }),
|
|
2340
2288
|
/* @__PURE__ */ n("span", { css: j.label, children: o })
|
|
2341
|
-
] }),
|
|
2289
|
+
] }), Ye = () => /* @__PURE__ */ n("h4", { css: j.separator, children: ":" }), Ut = Q.teamPlaceholder, Nn = ({
|
|
2342
2290
|
entityId: t,
|
|
2343
2291
|
sdk: o,
|
|
2344
2292
|
votingWindow: i = 1,
|
|
2345
|
-
showTeam:
|
|
2346
|
-
showPlayers:
|
|
2347
|
-
brandedAreaImage:
|
|
2348
|
-
brandedAreaLink:
|
|
2293
|
+
showTeam: d = "all",
|
|
2294
|
+
showPlayers: h,
|
|
2295
|
+
brandedAreaImage: m,
|
|
2296
|
+
brandedAreaLink: p,
|
|
2349
2297
|
authRequirement: b,
|
|
2350
2298
|
userIsLoggedIn: x,
|
|
2351
|
-
signInCTA:
|
|
2299
|
+
signInCTA: T,
|
|
2352
2300
|
defaultImagePlaceholderUrl: s,
|
|
2353
|
-
headerBannerStyles:
|
|
2301
|
+
headerBannerStyles: g
|
|
2354
2302
|
}) => {
|
|
2355
|
-
var pe,
|
|
2356
|
-
const { t:
|
|
2303
|
+
var pe, ve;
|
|
2304
|
+
const { t: c } = G(), [l, f] = I(!0), $ = $o(), [w, E] = I(null), [_, u] = I(null), [a, S] = I(null), [C, z] = I(!1), [R, M] = I(!1), [F, se] = I(!1), [q, oe] = I(!1), [me, Te] = I(!1), be = (H) => {
|
|
2357
2305
|
const W = H.finishedAt ? new Date(H.finishedAt) : (() => {
|
|
2358
2306
|
const ee = new Date(H.kickoffAt);
|
|
2359
2307
|
return ee.setHours(ee.getHours() + 2), ee < /* @__PURE__ */ new Date() ? ee : null;
|
|
2360
2308
|
})();
|
|
2361
2309
|
return W ? new Date(W.getTime() + i * 60 * 60 * 1e3) : null;
|
|
2362
|
-
},
|
|
2363
|
-
const W =
|
|
2310
|
+
}, ze = (H) => {
|
|
2311
|
+
const W = be(H);
|
|
2364
2312
|
return W ? /* @__PURE__ */ new Date() > W : !1;
|
|
2365
|
-
},
|
|
2366
|
-
|
|
2313
|
+
}, He = async (H) => {
|
|
2314
|
+
f(!0), M(!1), se(!1), z(!1), oe(!1), u(null), S(null);
|
|
2367
2315
|
try {
|
|
2368
|
-
const W = await o.football.getMatchById(H,
|
|
2316
|
+
const W = await o.football.getMatchById(H, $);
|
|
2369
2317
|
E(W);
|
|
2370
|
-
const ee = /* @__PURE__ */ new Date(),
|
|
2371
|
-
if (ee <
|
|
2372
|
-
|
|
2318
|
+
const ee = /* @__PURE__ */ new Date(), Ne = new Date(W.kickoffAt);
|
|
2319
|
+
if (ee < Ne) {
|
|
2320
|
+
M(!0), f(!1);
|
|
2373
2321
|
return;
|
|
2374
2322
|
}
|
|
2375
|
-
const
|
|
2376
|
-
if (se(
|
|
2323
|
+
const De = ze(W);
|
|
2324
|
+
if (se(De), De)
|
|
2377
2325
|
try {
|
|
2378
|
-
const O = await o.voting.getResultsForPlayerOfTheMatch(H,
|
|
2379
|
-
|
|
2326
|
+
const O = await o.voting.getResultsForPlayerOfTheMatch(H, $);
|
|
2327
|
+
S(O), f(!1);
|
|
2380
2328
|
return;
|
|
2381
2329
|
} catch (O) {
|
|
2382
2330
|
console.error("Failed to fetch voting results", O);
|
|
2383
|
-
const { status: te } =
|
|
2384
|
-
te === "match_id_not_full_coverage" ? oe(!0) :
|
|
2331
|
+
const { status: te } = Le(O, o);
|
|
2332
|
+
te === "match_id_not_full_coverage" ? oe(!0) : z(!0);
|
|
2385
2333
|
}
|
|
2386
2334
|
try {
|
|
2387
2335
|
const O = await o.voting.getOwnVotesForPlayerOfTheMatch({
|
|
@@ -2390,115 +2338,115 @@ const Ot = {
|
|
|
2390
2338
|
});
|
|
2391
2339
|
if (O.data && O.data.length > 0) {
|
|
2392
2340
|
const te = O.data.find(
|
|
2393
|
-
(
|
|
2341
|
+
(Xe) => Xe.matchId === H
|
|
2394
2342
|
);
|
|
2395
|
-
te &&
|
|
2343
|
+
te && u(te.playerId);
|
|
2396
2344
|
}
|
|
2397
2345
|
} catch (O) {
|
|
2398
2346
|
console.warn("User not logged in or no votes found", O);
|
|
2399
2347
|
}
|
|
2400
2348
|
try {
|
|
2401
|
-
const O = await o.voting.getResultsForPlayerOfTheMatch(H,
|
|
2402
|
-
|
|
2349
|
+
const O = await o.voting.getResultsForPlayerOfTheMatch(H, $);
|
|
2350
|
+
S(O);
|
|
2403
2351
|
} catch (O) {
|
|
2404
2352
|
console.error("Failed to fetch voting results", O);
|
|
2405
|
-
const { status: te } =
|
|
2406
|
-
te === "match_id_not_full_coverage" ? oe(!0) : (te === "voting_potm_finished" || te === "voting_potm_not_started") &&
|
|
2353
|
+
const { status: te } = Le(O, o);
|
|
2354
|
+
te === "match_id_not_full_coverage" ? oe(!0) : (te === "voting_potm_finished" || te === "voting_potm_not_started") && z(!0);
|
|
2407
2355
|
}
|
|
2408
2356
|
} catch (W) {
|
|
2409
2357
|
console.error("Failed to fetch match data", W);
|
|
2410
|
-
const { status: ee } =
|
|
2358
|
+
const { status: ee } = Le(W, o);
|
|
2411
2359
|
ee === "match_id_not_full_coverage" && oe(!0);
|
|
2412
2360
|
} finally {
|
|
2413
|
-
|
|
2361
|
+
f(!1);
|
|
2414
2362
|
}
|
|
2415
2363
|
};
|
|
2416
2364
|
U(() => {
|
|
2417
|
-
|
|
2418
|
-
}, [t, i, o,
|
|
2365
|
+
He(t);
|
|
2366
|
+
}, [t, i, o, $]), U(() => {
|
|
2419
2367
|
Te(b === "REGISTERED" && !x);
|
|
2420
2368
|
}, [b, x]);
|
|
2421
|
-
const Y =
|
|
2422
|
-
() =>
|
|
2369
|
+
const Y = we(
|
|
2370
|
+
() => w ? be(w) : null,
|
|
2423
2371
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- getVotingDeadline only reads votingWindow, which is listed
|
|
2424
|
-
[
|
|
2425
|
-
),
|
|
2372
|
+
[w, i]
|
|
2373
|
+
), Ie = async (H) => {
|
|
2426
2374
|
try {
|
|
2427
|
-
_ === H ? (await o.voting.deleteVoteForPlayerOfTheMatch(t),
|
|
2375
|
+
_ === H ? (await o.voting.deleteVoteForPlayerOfTheMatch(t), u(null)) : (await o.voting.voteForPlayerOfTheMatch(t, H), u(H));
|
|
2428
2376
|
const W = await o.voting.getResultsForPlayerOfTheMatch(t, !0);
|
|
2429
|
-
return
|
|
2377
|
+
return S(W), !0;
|
|
2430
2378
|
} catch (W) {
|
|
2431
2379
|
throw console.error("Error voting", W), W;
|
|
2432
2380
|
}
|
|
2433
2381
|
};
|
|
2434
|
-
if (
|
|
2435
|
-
return /* @__PURE__ */ n(
|
|
2436
|
-
if (!
|
|
2437
|
-
return /* @__PURE__ */ n("div", { css: ae.notFound, children:
|
|
2438
|
-
const
|
|
2382
|
+
if (l)
|
|
2383
|
+
return /* @__PURE__ */ n(_o, { marginBlock: "160px" });
|
|
2384
|
+
if (!w)
|
|
2385
|
+
return /* @__PURE__ */ n("div", { css: ae.notFound, children: c(q ? "potm.match_not_full_coverage" : "potm.match_not_found") });
|
|
2386
|
+
const Oe = [
|
|
2439
2387
|
{
|
|
2440
|
-
id:
|
|
2441
|
-
name:
|
|
2442
|
-
code:
|
|
2443
|
-
logo: ((pe =
|
|
2388
|
+
id: w.homeTeam.id,
|
|
2389
|
+
name: w.homeTeam.name,
|
|
2390
|
+
code: w.homeTeam.code || w.homeTeam.name.substring(0, 3),
|
|
2391
|
+
logo: ((pe = w.homeTeam.assets) == null ? void 0 : pe.logo) || Ut
|
|
2444
2392
|
},
|
|
2445
2393
|
{
|
|
2446
|
-
id:
|
|
2447
|
-
name:
|
|
2448
|
-
code:
|
|
2449
|
-
logo: ((
|
|
2394
|
+
id: w.awayTeam.id,
|
|
2395
|
+
name: w.awayTeam.name,
|
|
2396
|
+
code: w.awayTeam.code || w.awayTeam.name.substring(0, 3),
|
|
2397
|
+
logo: ((ve = w.awayTeam.assets) == null ? void 0 : ve.logo) || Ut
|
|
2450
2398
|
}
|
|
2451
|
-
], re = R || q ? null : F ?
|
|
2399
|
+
], re = R || q ? null : F ? c("potm.voting_ended_message", {
|
|
2452
2400
|
defaultValue: "Voting has ended. These are the final results."
|
|
2453
|
-
}) : C ?
|
|
2454
|
-
return /* @__PURE__ */
|
|
2401
|
+
}) : C ? c("potm.voting_closed_message") : null;
|
|
2402
|
+
return /* @__PURE__ */ y(
|
|
2455
2403
|
"div",
|
|
2456
2404
|
{
|
|
2457
2405
|
css: ae.container,
|
|
2458
2406
|
style: s ? { backgroundImage: `url(${s})` } : void 0,
|
|
2459
2407
|
children: [
|
|
2460
|
-
|
|
2461
|
-
|
|
2408
|
+
m && /* @__PURE__ */ n(
|
|
2409
|
+
Mo,
|
|
2462
2410
|
{
|
|
2463
|
-
backgroundImage:
|
|
2464
|
-
link:
|
|
2411
|
+
backgroundImage: m,
|
|
2412
|
+
link: p,
|
|
2465
2413
|
height: "150px",
|
|
2466
2414
|
minHeight: "120px"
|
|
2467
2415
|
}
|
|
2468
2416
|
),
|
|
2469
|
-
/* @__PURE__ */ n(
|
|
2417
|
+
/* @__PURE__ */ n(_n, { teams: Oe, headerBannerStyles: g }),
|
|
2470
2418
|
/* @__PURE__ */ n("div", { css: ae.content, children: R ? (
|
|
2471
2419
|
// For upcoming matches - show countdown
|
|
2472
|
-
/* @__PURE__ */ n(
|
|
2420
|
+
/* @__PURE__ */ n(On, { match: w })
|
|
2473
2421
|
) : q ? (
|
|
2474
2422
|
// No player data for this match — nothing to vote on, so skip the carousel entirely
|
|
2475
|
-
/* @__PURE__ */ n("div", { css: ae.emptyState, children: /* @__PURE__ */ n("p", { css: ae.emptyText, children:
|
|
2423
|
+
/* @__PURE__ */ n("div", { css: ae.emptyState, children: /* @__PURE__ */ n("p", { css: ae.emptyText, children: c("potm.match_not_full_coverage") }) })
|
|
2476
2424
|
) : F && a ? (
|
|
2477
2425
|
// For matches where voting period has ended - show results
|
|
2478
2426
|
/* @__PURE__ */ n(
|
|
2479
|
-
|
|
2427
|
+
Hn,
|
|
2480
2428
|
{
|
|
2481
2429
|
results: a.data,
|
|
2482
|
-
match:
|
|
2483
|
-
showPlayers:
|
|
2430
|
+
match: w,
|
|
2431
|
+
showPlayers: h
|
|
2484
2432
|
}
|
|
2485
2433
|
)
|
|
2486
2434
|
) : (
|
|
2487
2435
|
// For ongoing/completed matches within voting window - show voting interface
|
|
2488
2436
|
/* @__PURE__ */ n(
|
|
2489
|
-
|
|
2437
|
+
Dn,
|
|
2490
2438
|
{
|
|
2491
|
-
match:
|
|
2439
|
+
match: w,
|
|
2492
2440
|
sdk: o,
|
|
2493
2441
|
userVote: _,
|
|
2494
2442
|
votingResults: a,
|
|
2495
|
-
handleVote:
|
|
2443
|
+
handleVote: Ie,
|
|
2496
2444
|
isVotingClosed: C,
|
|
2497
|
-
show:
|
|
2498
|
-
showPlayers:
|
|
2445
|
+
show: d ?? "all",
|
|
2446
|
+
showPlayers: h,
|
|
2499
2447
|
defaultImagePlaceholderUrl: s,
|
|
2500
2448
|
showSignInCTA: me,
|
|
2501
|
-
signInCTA:
|
|
2449
|
+
signInCTA: T,
|
|
2502
2450
|
votingDeadline: Y
|
|
2503
2451
|
}
|
|
2504
2452
|
)
|
|
@@ -2507,23 +2455,23 @@ const Ot = {
|
|
|
2507
2455
|
]
|
|
2508
2456
|
}
|
|
2509
2457
|
);
|
|
2510
|
-
},
|
|
2511
|
-
const o =
|
|
2458
|
+
}, Xn = ({ children: t }) => {
|
|
2459
|
+
const o = ko(To().palette.primary.plainColor), i = {
|
|
2512
2460
|
display: "contents",
|
|
2513
2461
|
"--fu-ucrc-potm-primary-rgb": o,
|
|
2514
2462
|
"--fu-ucrc-potm-primary-soft": `rgba(${o}, 0.12)`
|
|
2515
2463
|
};
|
|
2516
2464
|
return /* @__PURE__ */ n("div", { style: i, children: t });
|
|
2517
|
-
},
|
|
2518
|
-
|
|
2465
|
+
}, Vn = (t) => /* @__PURE__ */ n(
|
|
2466
|
+
Ao,
|
|
2519
2467
|
{
|
|
2520
2468
|
packageName: "player-of-the-match",
|
|
2521
2469
|
language: t.language,
|
|
2522
2470
|
themeOptions: t.themeOptions,
|
|
2523
2471
|
disableCache: t.disableCache,
|
|
2524
|
-
children: /* @__PURE__ */ n(
|
|
2472
|
+
children: /* @__PURE__ */ n(Xn, { children: /* @__PURE__ */ n(Nn, { ...t }) })
|
|
2525
2473
|
}
|
|
2526
|
-
),
|
|
2474
|
+
), er = No(Vn);
|
|
2527
2475
|
export {
|
|
2528
|
-
|
|
2476
|
+
er as PlayerOfTheMatch
|
|
2529
2477
|
};
|