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