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/EventCard.js
CHANGED
|
@@ -3,13 +3,13 @@ import { Notification as Yi, InlineSpinner as Qi, ShadowTooltip as Kt, Spinner a
|
|
|
3
3
|
import Q, { useState as z, useCallback as Fe, useEffect as Ce, useRef as Ae, useMemo as we, useContext as Ji, useLayoutEffect as ea } from "react";
|
|
4
4
|
import { css as t, keyframes as ta } from "@emotion/react";
|
|
5
5
|
import { useTranslation as Se } from "react-i18next";
|
|
6
|
-
import { getSportsApiCredentials as na, fetchSearchEntitiesByIds as oa, toIntlLocale as Dn, useDisableCache as Yt, fetchEventById as ra, useColors as ii, useFontFamily as ia, useCornerRadius as aa, useSpacingScale as sa, hexToRgb as la, bidiIsolate as Bt,
|
|
7
|
-
import { u as
|
|
8
|
-
import { EmojiEventsIcon as On, KeyboardArrowDownIcon as lt, CheckRoundedIcon as Gt, HowToVoteRoundedIcon as ai, KeyboardArrowRightIcon as
|
|
9
|
-
import { createPortal as
|
|
10
|
-
import { w as
|
|
6
|
+
import { getSportsApiCredentials as na, fetchSearchEntitiesByIds as oa, toIntlLocale as Dn, useDisableCache as Yt, fetchEventById as ra, useColors as ii, useFontFamily as ia, useCornerRadius as aa, useSpacingScale as sa, hexToRgb as la, bidiIsolate as Bt, DirectionalIcon as ca, ConstantsContext as da, useIntlLocale as ua, useCurrentThemeMode as ma, useIsMobile as Mn, bidiIsolateAuto as pa } from "fansunited-frontend-core";
|
|
7
|
+
import { u as ha, O as fa } from "./chunks/OddsSkeleton-DP5Yfqpr.js";
|
|
8
|
+
import { EmojiEventsIcon as On, KeyboardArrowDownIcon as lt, CheckRoundedIcon as Gt, HowToVoteRoundedIcon as ai, KeyboardArrowRightIcon as ga, KeyboardArrowLeftIcon as ya, KeyboardArrowUpIcon as ba, SearchRoundedIcon as si, PersonOutlineIcon as wa, FlagRoundedIcon as xa, EditOutlinedIcon as Sa, DeleteOutlineIcon as qn, CheckCircleRoundedIcon as va, BoltRoundedIcon as Ea, PersonIcon as li, ShieldOutlinedIcon as Ca, SportsSoccerIcon as _a } from "fansunited-frontend-core/ui/icons";
|
|
9
|
+
import { createPortal as ka } from "react-dom";
|
|
10
|
+
import { w as Ra } from "./chunks/withVersionStamp-CPDfSE5H.js";
|
|
11
11
|
const Zn = (e) => {
|
|
12
|
-
var l, d, c,
|
|
12
|
+
var l, d, c, m, p, b;
|
|
13
13
|
if (!(e != null && e.event)) return [];
|
|
14
14
|
const o = /* @__PURE__ */ new Set(), r = (g) => {
|
|
15
15
|
typeof g == "string" && g && o.add(g);
|
|
@@ -22,7 +22,7 @@ const Zn = (e) => {
|
|
|
22
22
|
(h) => r(h.id)
|
|
23
23
|
);
|
|
24
24
|
};
|
|
25
|
-
return s((c = a.lineups) == null ? void 0 : c.competitor_one), s((
|
|
25
|
+
return s((c = a.lineups) == null ? void 0 : c.competitor_one), s((m = a.lineups) == null ? void 0 : m.competitor_two), (((p = e.standings) == null ? void 0 : p.groups) ?? []).forEach((g) => {
|
|
26
26
|
(g.standings ?? []).forEach((h) => r(h.competitor_id));
|
|
27
27
|
}), (((b = e.head_to_head) == null ? void 0 : b.events) ?? []).forEach((g) => {
|
|
28
28
|
var h, E;
|
|
@@ -36,7 +36,7 @@ const Zn = (e) => {
|
|
|
36
36
|
});
|
|
37
37
|
});
|
|
38
38
|
}), Array.from(o);
|
|
39
|
-
},
|
|
39
|
+
}, La = async (e, o, r, a = !1) => {
|
|
40
40
|
if (!o) return null;
|
|
41
41
|
try {
|
|
42
42
|
return await e.sports.getCompetitionById(
|
|
@@ -57,7 +57,7 @@ const Zn = (e) => {
|
|
|
57
57
|
d,
|
|
58
58
|
l,
|
|
59
59
|
{ signal: r, partial: !0, disableCache: a }
|
|
60
|
-
)).forEach((
|
|
60
|
+
)).forEach((m) => s.set(m.id, m));
|
|
61
61
|
} catch {
|
|
62
62
|
return s;
|
|
63
63
|
}
|
|
@@ -86,7 +86,7 @@ const Zn = (e) => {
|
|
|
86
86
|
var r, a;
|
|
87
87
|
const o = e == null ? void 0 : e.assets;
|
|
88
88
|
return o ? ((r = o.find((s) => s.key === "LOGO")) == null ? void 0 : r.value) ?? ((a = o.find((s) => s.key === "HEADSHOT")) == null ? void 0 : a.value) ?? null : null;
|
|
89
|
-
},
|
|
89
|
+
}, Ta = (e) => (e == null ? void 0 : e.three_letter_code) ?? null, me = (e, ...o) => {
|
|
90
90
|
if (e)
|
|
91
91
|
for (const r of o) {
|
|
92
92
|
const a = e[r];
|
|
@@ -96,18 +96,18 @@ const Zn = (e) => {
|
|
|
96
96
|
if (e == null || e === "") return null;
|
|
97
97
|
const o = Number(e);
|
|
98
98
|
return Number.isFinite(o) ? o : null;
|
|
99
|
-
},
|
|
99
|
+
}, Oa = (e) => {
|
|
100
100
|
var o;
|
|
101
101
|
return ((o = e == null ? void 0 : e.find((r) => r.key === "LOGO")) == null ? void 0 : o.value) ?? null;
|
|
102
102
|
}, di = (e) => {
|
|
103
103
|
if (!e) return null;
|
|
104
104
|
const o = e.trim().split(/\s+/).filter(Boolean);
|
|
105
105
|
return o.length === 0 ? null : o.length === 1 ? o[0].slice(0, 3).toUpperCase() : o.slice(0, 2).map((r) => r[0]).join("").toUpperCase();
|
|
106
|
-
},
|
|
106
|
+
}, Aa = /(LIVE|PROGRESS|PLAY|INPLAY|IN_PLAY|1ST|2ND|HALF|PERIOD)/, Ia = new RegExp("(FINISH|ENDED|FULL[_\\s-]?TIME|CLOSED|AFTER_|AET|(?<![A-Z])PEN(?![A-Z])|\\bFT\\b)"), $a = /(CANCEL|POSTPON|ABANDON|SUSPEND|INTERRUPT|WALKOVER|DELAYED)/, Na = (e, o) => {
|
|
107
107
|
const r = (e ?? "").toUpperCase();
|
|
108
|
-
if (
|
|
109
|
-
if (
|
|
110
|
-
if (
|
|
108
|
+
if ($a.test(r)) return "CANCELLED";
|
|
109
|
+
if (Ia.test(r)) return "FINISHED";
|
|
110
|
+
if (Aa.test(r)) return "LIVE";
|
|
111
111
|
if (/(UPCOMING|NOT[_\s-]?STARTED|SCHEDULED|FIXTURE|PENDING|NS)/.test(r))
|
|
112
112
|
return "UPCOMING";
|
|
113
113
|
if (o) {
|
|
@@ -115,7 +115,7 @@ const Zn = (e) => {
|
|
|
115
115
|
if (!Number.isNaN(a)) return a > Date.now() ? "UPCOMING" : "LIVE";
|
|
116
116
|
}
|
|
117
117
|
return "UPCOMING";
|
|
118
|
-
},
|
|
118
|
+
}, Fa = (e, o) => {
|
|
119
119
|
const r = (o ?? "").toUpperCase();
|
|
120
120
|
return e === "FINISHED" ? r.includes("RETIRED") ? "retired" : r.includes("AWARDED") || r.includes("WALKOVER") ? "awardedWin" : r.includes("PEN") ? "afterPenalties" : r.includes("AET") || r.includes("EXTRA") ? "afterExtraTime" : r.includes("OVERTIME") ? "afterOvertime" : "finished" : e === "CANCELLED" ? r.includes("ABANDON") ? "abandoned" : r.includes("INTERRUPT") ? "interrupted" : r.includes("SUSPEND") ? "suspended" : r.includes("POSTPON") ? "postponed" : "cancelled" : e === "UPCOMING" ? r.includes("POSTPON") ? "postponed" : r.includes("RAIN") ? "delayedByRain" : r.includes("DELAY") ? "startDelayed" : r.includes("FINISH") ? "toFinish" : null : null;
|
|
121
121
|
}, ui = (e) => {
|
|
@@ -134,13 +134,13 @@ const Zn = (e) => {
|
|
|
134
134
|
return { unit: "penalties" };
|
|
135
135
|
const a = o.match(/^extra_time_(\d+)$/);
|
|
136
136
|
return a ? { unit: "extraTime", n: Number(a[1]) } : o.startsWith("extra_time") ? { unit: "extraTime", n: 1 } : null;
|
|
137
|
-
},
|
|
137
|
+
}, Pa = 45, eo = 90, Wa = 15, za = (e, o) => {
|
|
138
138
|
if (e !== "football") return null;
|
|
139
139
|
const r = ui(o);
|
|
140
140
|
if (!r) return null;
|
|
141
141
|
const { unit: a, n: s } = r;
|
|
142
|
-
return a === "half" ? s === 1 ? 0 : s === 2 ?
|
|
143
|
-
},
|
|
142
|
+
return a === "half" ? s === 1 ? 0 : s === 2 ? Pa : null : a === "extraTime" ? s === 1 ? eo : s === 2 ? eo + Wa : null : null;
|
|
143
|
+
}, Da = /^(running|started|in_progress|active|live)$/, Ma = (e) => {
|
|
144
144
|
const o = me(e, "timing", "clock");
|
|
145
145
|
if (!o || typeof o != "object") return null;
|
|
146
146
|
const r = ne(me(o, "current_minute", "currentMinute")) ?? 0, a = ne(me(o, "played_seconds", "playedSeconds")) ?? 0;
|
|
@@ -149,9 +149,9 @@ const Zn = (e) => {
|
|
|
149
149
|
return {
|
|
150
150
|
minute: r,
|
|
151
151
|
playedSeconds: a,
|
|
152
|
-
running:
|
|
152
|
+
running: Da.test(s.toLowerCase())
|
|
153
153
|
};
|
|
154
|
-
},
|
|
154
|
+
}, Ha = (e) => {
|
|
155
155
|
const o = /* @__PURE__ */ new Map(), r = me(e, "score", "scores", "results");
|
|
156
156
|
return (Array.isArray(r) ? r : []).forEach((a) => {
|
|
157
157
|
const s = String(me(a, "key", "type", "name") ?? "").toLowerCase();
|
|
@@ -167,31 +167,31 @@ const Zn = (e) => {
|
|
|
167
167
|
}, to = (e, o) => {
|
|
168
168
|
const r = e.get("result") ?? e.get("full_time") ?? e.get("current") ?? e.get("ft");
|
|
169
169
|
return r ? r[o] : null;
|
|
170
|
-
},
|
|
170
|
+
}, Ba = (e) => {
|
|
171
171
|
const o = e == null ? void 0 : e.result;
|
|
172
172
|
return D(o == null ? void 0 : o.competitor_one) !== null && D(o == null ? void 0 : o.competitor_two) !== null ? o : e == null ? void 0 : e.full_time;
|
|
173
|
-
},
|
|
173
|
+
}, Ga = /^(?:set|period)[_\s-]?(\d+)$/, no = (e, o) => {
|
|
174
174
|
const r = o === "one" ? "two" : "one", a = [];
|
|
175
175
|
return e.forEach((s, l) => {
|
|
176
|
-
const d = l.match(
|
|
176
|
+
const d = l.match(Ga);
|
|
177
177
|
if (!d) return;
|
|
178
|
-
const c = Number(d[1]),
|
|
178
|
+
const c = Number(d[1]), m = s[o] ?? "", p = e.get(`set_${c}_tiebreak`) ?? e.get(`tie_break_${c}`) ?? e.get(`tiebreak_${c}`) ?? e.get(`set${c}_tiebreak`), b = Number(s[o]), g = Number(s[r]);
|
|
179
179
|
a.push({
|
|
180
180
|
n: c,
|
|
181
181
|
cell: {
|
|
182
|
-
games:
|
|
183
|
-
tiebreak:
|
|
182
|
+
games: m,
|
|
183
|
+
tiebreak: p ? p[o] : null,
|
|
184
184
|
won: !Number.isNaN(b) && !Number.isNaN(g) && b > g
|
|
185
185
|
}
|
|
186
186
|
});
|
|
187
187
|
}), a.sort((s, l) => s.n - l.n).map((s) => s.cell);
|
|
188
188
|
}, oo = (e, o, r, a, s, l, d) => {
|
|
189
|
-
const c = e ? r.get(e) : void 0,
|
|
190
|
-
return { id: e, name:
|
|
189
|
+
const c = e ? r.get(e) : void 0, m = tt(c, a) ?? s, b = mi(c, a, m === s ? null : m), g = Hn(c, a), h = wt(c), E = c != null && c.type ? c.type.toUpperCase() === "ATHLETE" : l, S = (c == null ? void 0 : c.country_id) ?? null, y = S ? d.get(S) ?? null : null;
|
|
190
|
+
return { id: e, name: m, abbr: b, shortName: g, logoUrl: h, isAthlete: E, flagUrl: y, score: o };
|
|
191
191
|
}, mi = (e, o, r) => {
|
|
192
192
|
const a = Hn(e, o), s = a && r && a.length < r.length ? a : r;
|
|
193
|
-
return di(s) ??
|
|
194
|
-
},
|
|
193
|
+
return di(s) ?? Ta(e);
|
|
194
|
+
}, Ua = (e) => e.includes("tennis"), ro = (e) => String(e.filter((o) => o.won).length), pi = {
|
|
195
195
|
match: [
|
|
196
196
|
"ball_possession_percentage",
|
|
197
197
|
"total_shots",
|
|
@@ -292,13 +292,13 @@ const Zn = (e) => {
|
|
|
292
292
|
season: xt,
|
|
293
293
|
streaks: St
|
|
294
294
|
}
|
|
295
|
-
},
|
|
295
|
+
}, Va = (e) => Bn[e.toLowerCase().replace(/[^a-z]/g, "")] ?? pi, ja = Array.from(
|
|
296
296
|
new Set(
|
|
297
297
|
Object.values(Bn).flatMap((e) => [...e.match, ...e.season])
|
|
298
298
|
)
|
|
299
|
-
),
|
|
299
|
+
), Xa = Array.from(
|
|
300
300
|
new Set(Object.values(Bn).flatMap((e) => e.streaks))
|
|
301
|
-
),
|
|
301
|
+
), Ka = {
|
|
302
302
|
goalkeeper: "GK",
|
|
303
303
|
defender: "DF",
|
|
304
304
|
midfielder: "MF",
|
|
@@ -307,47 +307,47 @@ const Zn = (e) => {
|
|
|
307
307
|
}, et = (e, o) => {
|
|
308
308
|
const r = (e ?? []).find((a) => (a == null ? void 0 : a.key) === o);
|
|
309
309
|
return r ? r.value : void 0;
|
|
310
|
-
},
|
|
310
|
+
}, Ya = (e, o) => {
|
|
311
311
|
var r;
|
|
312
312
|
return (r = et(e, o)) == null ? void 0 : r.total;
|
|
313
|
-
},
|
|
313
|
+
}, Qa = (e, o) => {
|
|
314
314
|
const r = e + o;
|
|
315
315
|
if (!r) return [50, 50];
|
|
316
316
|
const a = Math.round(100 * e / r);
|
|
317
317
|
return [a, 100 - a];
|
|
318
|
-
},
|
|
319
|
-
|
|
320
|
-
),
|
|
321
|
-
|
|
322
|
-
),
|
|
323
|
-
const r =
|
|
318
|
+
}, qa = (e, o) => e > o ? "home" : o > e ? "away" : null, Za = Object.fromEntries(
|
|
319
|
+
ja.map((e) => [e, `eventCard.detail.stats.${e}`])
|
|
320
|
+
), Ja = Object.fromEntries(
|
|
321
|
+
Xa.map((e) => [e, `eventCard.detail.streaks.${e}`])
|
|
322
|
+
), es = (e, o) => {
|
|
323
|
+
const r = Za[e] ?? e, a = (o ?? "").toLowerCase().replace(/[^a-z]/g, "");
|
|
324
324
|
return a ? [`eventCard.detail.stats.${a}.${e}`, r] : [r];
|
|
325
|
-
},
|
|
326
|
-
const r =
|
|
325
|
+
}, ts = (e, o) => {
|
|
326
|
+
const r = Ja[e] ?? e, a = (o ?? "").toLowerCase().replace(/[^a-z]/g, "");
|
|
327
327
|
return a ? [`eventCard.detail.streaks.${a}.${e}`, r] : [r];
|
|
328
|
-
},
|
|
328
|
+
}, ns = [
|
|
329
329
|
// First: `relegationPlayOffs` and friends contain "playoffs" and would otherwise read as promotion.
|
|
330
330
|
[/relegat/, "relegation"],
|
|
331
331
|
[/championsleague|playoff|promotion|champion/, "promotion"],
|
|
332
332
|
[/europaleague|conferenceleague|playin|qual/, "qualification"]
|
|
333
|
-
],
|
|
333
|
+
], os = (e) => {
|
|
334
334
|
const o = (e ?? []).map(
|
|
335
335
|
(r) => String(r).toLowerCase().replace(/[^a-z]/g, "")
|
|
336
336
|
);
|
|
337
|
-
for (const [r, a] of
|
|
337
|
+
for (const [r, a] of ns)
|
|
338
338
|
if (o.some((s) => r.test(s))) return a;
|
|
339
339
|
return null;
|
|
340
|
-
},
|
|
341
|
-
const d = e ? o.get(e) : void 0, c = e && tt(d, r) || a,
|
|
340
|
+
}, rs = (e) => e && e.split(/\s+/).filter((r) => /^[A-Z]/.test(r)).map((r) => r[0]).slice(0, 2).join("") || "CP", Ut = (e, o, r, a, s, l) => {
|
|
341
|
+
const d = e ? o.get(e) : void 0, c = e && tt(d, r) || a, m = d != null && d.type ? d.type.toUpperCase() === "ATHLETE" : l, p = (d == null ? void 0 : d.country_id) ?? null;
|
|
342
342
|
return {
|
|
343
343
|
id: e ?? "",
|
|
344
344
|
name: c,
|
|
345
345
|
abbr: mi(d, r, c === a ? null : c),
|
|
346
346
|
shortName: Hn(d, r),
|
|
347
347
|
logoUrl: wt(d),
|
|
348
|
-
isAthlete:
|
|
348
|
+
isAthlete: m,
|
|
349
349
|
// Only an athlete falls back to a flag; a club without a badge gets the placeholder.
|
|
350
|
-
flagUrl:
|
|
350
|
+
flagUrl: m && p ? s.get(p) ?? null : null
|
|
351
351
|
};
|
|
352
352
|
}, An = (e, o, r) => {
|
|
353
353
|
if (!e) return null;
|
|
@@ -355,14 +355,14 @@ const Zn = (e) => {
|
|
|
355
355
|
if (!s) return `#${e.split(":").pop()}`;
|
|
356
356
|
const l = s.trim().split(/\s+/);
|
|
357
357
|
return l.length > 1 ? l.slice(1).join(" ") : s;
|
|
358
|
-
},
|
|
358
|
+
}, is = (e, o) => {
|
|
359
359
|
var a;
|
|
360
360
|
const r = e ? (a = o.get(e)) == null ? void 0 : a.position : null;
|
|
361
|
-
return r ?
|
|
362
|
-
},
|
|
361
|
+
return r ? Ka[r.toLowerCase()] ?? null : null;
|
|
362
|
+
}, as = (e) => /DISALLOWED|VAR|CANCELLED/.test(e) ? "var" : /MISSED_PENALTY/.test(e) ? "miss" : /GOAL/.test(e) ? "goal" : /RED/.test(e) ? "red" : /CARD/.test(e) ? "yellow" : "sub", ss = (e, o, r) => (e ?? []).map((a) => ({
|
|
363
363
|
type: String((a == null ? void 0 : a.type) ?? ""),
|
|
364
364
|
side: (a == null ? void 0 : a.competitor_position) === "TWO" ? "away" : "home",
|
|
365
|
-
kind:
|
|
365
|
+
kind: as(String((a == null ? void 0 : a.type) ?? "")),
|
|
366
366
|
isOwnGoal: /OWN[_\s-]?GOAL/.test(String((a == null ? void 0 : a.type) ?? "")),
|
|
367
367
|
// `MISSED_PENALTY` also contains "PENALT" but is not a goal from the spot, so it is excluded.
|
|
368
368
|
isPenalty: /PENALT/.test(String((a == null ? void 0 : a.type) ?? "")) && !/MISS/.test(String((a == null ? void 0 : a.type) ?? "")),
|
|
@@ -381,13 +381,13 @@ const Zn = (e) => {
|
|
|
381
381
|
}, so = (e, o, r, a = !1) => e.map((s) => {
|
|
382
382
|
const l = ao(o("one", s)), d = ao(o("two", s));
|
|
383
383
|
if (!l && !d) return null;
|
|
384
|
-
const c = (l == null ? void 0 : l.value) ?? 0,
|
|
384
|
+
const c = (l == null ? void 0 : l.value) ?? 0, m = (d == null ? void 0 : d.value) ?? 0, p = (l == null ? void 0 : l.isPercent) || (d == null ? void 0 : d.isPercent) || r(s), [b, g] = p ? [
|
|
385
385
|
Math.min(100, Math.round(c)),
|
|
386
|
-
Math.min(100, Math.round(
|
|
387
|
-
] :
|
|
388
|
-
if (!E) return
|
|
386
|
+
Math.min(100, Math.round(m))
|
|
387
|
+
] : Qa(c, m), h = (E) => {
|
|
388
|
+
if (!E) return p ? "0%" : "0";
|
|
389
389
|
const S = a ? String(Math.round(E.value)) : E.text;
|
|
390
|
-
return
|
|
390
|
+
return p ? S.includes("%") ? S : `${S}%` : S;
|
|
391
391
|
};
|
|
392
392
|
return {
|
|
393
393
|
key: s,
|
|
@@ -395,26 +395,26 @@ const Zn = (e) => {
|
|
|
395
395
|
away: h(d),
|
|
396
396
|
homeShare: b,
|
|
397
397
|
awayShare: g,
|
|
398
|
-
leader:
|
|
398
|
+
leader: qa(c, m)
|
|
399
399
|
};
|
|
400
400
|
}).filter((s) => s !== null), vt = (e, o, r, a) => a.map((s) => {
|
|
401
|
-
var c,
|
|
402
|
-
const l = D((c = et(e, s)) == null ? void 0 : c[r]), d = D((
|
|
401
|
+
var c, m;
|
|
402
|
+
const l = D((c = et(e, s)) == null ? void 0 : c[r]), d = D((m = et(o, s)) == null ? void 0 : m[r]);
|
|
403
403
|
return l == null && d == null ? null : { key: s, home: l ?? "0", away: d ?? "0" };
|
|
404
|
-
}).filter((s) => s !== null),
|
|
404
|
+
}).filter((s) => s !== null), ls = (e, o, r) => ({
|
|
405
405
|
overall: vt(e, o, "total", r),
|
|
406
406
|
home: vt(e, o, "home", r),
|
|
407
407
|
away: vt(e, o, "away", r),
|
|
408
408
|
inCompetition: vt(e, o, "in_competition", r)
|
|
409
409
|
}), lo = (e, o, r) => {
|
|
410
|
-
const a = D(e == null ? void 0 : e.id) ?? "", s = (
|
|
410
|
+
const a = D(e == null ? void 0 : e.id) ?? "", s = (m) => et(e == null ? void 0 : e.stats, m), l = ne(s("yellow_cards")) ?? 0, d = ne(s("second_yellow_cards")) ?? 0, c = ne(s("red_cards")) ?? 0;
|
|
411
411
|
return {
|
|
412
412
|
id: a,
|
|
413
413
|
name: An(a, o, r),
|
|
414
414
|
shirt: D(e == null ? void 0 : e.shirt_nr),
|
|
415
415
|
// `entityLogo` falls through LOGO -> HEADSHOT; an athlete only ever carries the latter.
|
|
416
416
|
photoUrl: wt(a ? o.get(a) : void 0),
|
|
417
|
-
position:
|
|
417
|
+
position: is(a, o) ?? (D(s("current_goalkeeper")) === "1" ? "GK" : null),
|
|
418
418
|
captain: D(s("captain")) === "1",
|
|
419
419
|
subbedOffMinute: null,
|
|
420
420
|
subbedOnMinute: null,
|
|
@@ -423,7 +423,7 @@ const Zn = (e) => {
|
|
|
423
423
|
assists: ne(s("assists")) ?? 0,
|
|
424
424
|
card: c > 0 || d > 0 ? "red" : l > 0 ? "yellow" : null
|
|
425
425
|
};
|
|
426
|
-
},
|
|
426
|
+
}, cs = (e, o, r) => {
|
|
427
427
|
const a = /* @__PURE__ */ new Map();
|
|
428
428
|
[...e.starting, ...e.bench, ...o.starting, ...o.bench].forEach(
|
|
429
429
|
(s) => a.set(s.id, s)
|
|
@@ -432,35 +432,35 @@ const Zn = (e) => {
|
|
|
432
432
|
d && (d.subbedOffMinute = l), c && (c.subbedOnMinute = l);
|
|
433
433
|
});
|
|
434
434
|
}, co = (e, o, r, a) => {
|
|
435
|
-
var
|
|
435
|
+
var m;
|
|
436
436
|
if (!e) return null;
|
|
437
437
|
const s = [...e.starting ?? []].sort(
|
|
438
|
-
(
|
|
439
|
-
).map((
|
|
440
|
-
(
|
|
441
|
-
), d = typeof e.coach == "string" ? e.coach : (
|
|
438
|
+
(p, b) => (p.field_position ?? 99) - (b.field_position ?? 99)
|
|
439
|
+
).map((p) => lo(p, o, r)), l = (e.substitutes ?? []).map(
|
|
440
|
+
(p) => lo(p, o, r)
|
|
441
|
+
), d = typeof e.coach == "string" ? e.coach : (m = e.coach) == null ? void 0 : m.id, c = d ? tt(o.get(d), r) : null;
|
|
442
442
|
return { formation: a, starting: s, bench: l, coach: c };
|
|
443
|
-
},
|
|
443
|
+
}, ds = (e, o, r, a, s, l, d) => (e ?? []).map((c) => {
|
|
444
444
|
var E, S, y, w, u, C, _;
|
|
445
|
-
const
|
|
446
|
-
|
|
445
|
+
const m = ((E = c == null ? void 0 : c.competitor_one) == null ? void 0 : E.id) === o, p = m ? (S = c == null ? void 0 : c.competitor_two) == null ? void 0 : S.id : (y = c == null ? void 0 : c.competitor_one) == null ? void 0 : y.id, b = Ut(
|
|
446
|
+
p,
|
|
447
447
|
r,
|
|
448
448
|
a,
|
|
449
449
|
s,
|
|
450
450
|
l,
|
|
451
451
|
d
|
|
452
|
-
), g =
|
|
452
|
+
), g = m ? (w = c == null ? void 0 : c.result) == null ? void 0 : w.competitor_one : (u = c == null ? void 0 : c.result) == null ? void 0 : u.competitor_two, h = m ? (C = c == null ? void 0 : c.result) == null ? void 0 : C.competitor_two : (_ = c == null ? void 0 : c.result) == null ? void 0 : _.competitor_one;
|
|
453
453
|
return {
|
|
454
454
|
eventId: D(c == null ? void 0 : c.id) ?? "",
|
|
455
455
|
date: hi(c == null ? void 0 : c.date, a),
|
|
456
456
|
outcome: (c == null ? void 0 : c.outcome) ?? "D",
|
|
457
|
-
venue:
|
|
457
|
+
venue: m ? "home" : "away",
|
|
458
458
|
opponent: b,
|
|
459
459
|
score: { own: D(g) ?? "0", opp: D(h) ?? "0" }
|
|
460
460
|
};
|
|
461
461
|
}), uo = (e, o, r, a, s, l, d) => {
|
|
462
|
-
const c = (
|
|
463
|
-
|
|
462
|
+
const c = (m) => ds(
|
|
463
|
+
m,
|
|
464
464
|
o,
|
|
465
465
|
r,
|
|
466
466
|
a,
|
|
@@ -482,7 +482,7 @@ const Zn = (e) => {
|
|
|
482
482
|
month: "short",
|
|
483
483
|
year: "numeric"
|
|
484
484
|
});
|
|
485
|
-
},
|
|
485
|
+
}, us = [
|
|
486
486
|
["played", "played"],
|
|
487
487
|
["won", "won"],
|
|
488
488
|
["drawn", "drawn"],
|
|
@@ -491,15 +491,15 @@ const Zn = (e) => {
|
|
|
491
491
|
["goalsAgainst", "goals_against"],
|
|
492
492
|
["goalDifference", "goals_difference"],
|
|
493
493
|
["points", "points"]
|
|
494
|
-
],
|
|
494
|
+
], ms = (e) => {
|
|
495
495
|
var r, a, s;
|
|
496
496
|
const o = ((s = (a = (r = e.standings) == null ? void 0 : r.groups) == null ? void 0 : a[0]) == null ? void 0 : s.standings) ?? [];
|
|
497
|
-
return
|
|
497
|
+
return us.filter(
|
|
498
498
|
([, l]) => o.some((d) => et(d == null ? void 0 : d.stats, l) != null)
|
|
499
499
|
).map(([l]) => l);
|
|
500
|
-
},
|
|
501
|
-
var
|
|
502
|
-
return (((g = (b = (
|
|
500
|
+
}, ps = (e, o, r, a, s, l, d, c) => {
|
|
501
|
+
var p, b, g;
|
|
502
|
+
return (((g = (b = (p = e.standings) == null ? void 0 : p.groups) == null ? void 0 : b[0]) == null ? void 0 : g.standings) ?? []).map((h) => {
|
|
503
503
|
const E = (u) => D(et(h.stats, u)) ?? "0", S = D(h.competitor_id) ?? "", y = S === o, w = S === r;
|
|
504
504
|
return {
|
|
505
505
|
rank: ne(h.rank) ?? 0,
|
|
@@ -523,18 +523,18 @@ const Zn = (e) => {
|
|
|
523
523
|
return Number.isFinite(u) && u > 0 ? `+${u}` : String(u || 0);
|
|
524
524
|
})(),
|
|
525
525
|
points: E("points"),
|
|
526
|
-
zone:
|
|
526
|
+
zone: os(h.rules),
|
|
527
527
|
isInvolved: y || w,
|
|
528
528
|
isHome: y,
|
|
529
529
|
isAway: w
|
|
530
530
|
};
|
|
531
531
|
}).sort((h, E) => h.rank - E.rank);
|
|
532
|
-
},
|
|
532
|
+
}, hs = (e, o, r, a, s, l) => {
|
|
533
533
|
const d = e.head_to_head;
|
|
534
534
|
if (!d) return null;
|
|
535
535
|
const c = new Map(
|
|
536
536
|
(d.summary ?? []).map((v) => [v.key, v.value])
|
|
537
|
-
),
|
|
537
|
+
), m = c.get("wins") ?? {}, p = c.get("draws") ?? {}, b = c.get("goals_scored") ?? {}, g = c.get("avg_goals_per_match") ?? {}, h = c.get("events_played") ?? {}, E = ne(m.competitor_one) ?? 0, S = ne(m.competitor_two) ?? 0, y = ne(p.competitor_one) ?? 0, w = ne(h.competitor_one) ?? E + S + y, u = w ? Math.round(100 * E / w) : 0, C = w ? Math.round(100 * S / w) : 0, _ = Math.max(0, 100 - u - C), k = (d.events ?? []).map(
|
|
538
538
|
(v) => {
|
|
539
539
|
var $, V;
|
|
540
540
|
const T = Ut(
|
|
@@ -551,7 +551,7 @@ const Zn = (e) => {
|
|
|
551
551
|
a,
|
|
552
552
|
s,
|
|
553
553
|
l
|
|
554
|
-
), I = v != null && v.competition_id ? o.get(v.competition_id) : void 0, N = v != null && v.competition_id ? tt(I, r) : null, O =
|
|
554
|
+
), I = v != null && v.competition_id ? o.get(v.competition_id) : void 0, N = v != null && v.competition_id ? tt(I, r) : null, O = Ba(v == null ? void 0 : v.score);
|
|
555
555
|
return {
|
|
556
556
|
eventId: D(v == null ? void 0 : v.id) ?? "",
|
|
557
557
|
date: hi(v == null ? void 0 : v.date, r),
|
|
@@ -566,7 +566,7 @@ const Zn = (e) => {
|
|
|
566
566
|
id: D(v == null ? void 0 : v.competition_id),
|
|
567
567
|
name: N,
|
|
568
568
|
logoUrl: wt(I),
|
|
569
|
-
abbr:
|
|
569
|
+
abbr: rs(N)
|
|
570
570
|
}
|
|
571
571
|
};
|
|
572
572
|
}
|
|
@@ -589,7 +589,7 @@ const Zn = (e) => {
|
|
|
589
589
|
},
|
|
590
590
|
meetings: k
|
|
591
591
|
};
|
|
592
|
-
},
|
|
592
|
+
}, fs = (e, o, r) => {
|
|
593
593
|
const a = e === "UPCOMING", s = a ? ["preview", "stats", "table", "h2h"] : ["summary", "stats", "lineups", "table", "h2h"], l = {
|
|
594
594
|
preview: o.form.home.overall.length > 0 || o.form.away.overall.length > 0,
|
|
595
595
|
summary: o.timeline.length > 0,
|
|
@@ -606,14 +606,14 @@ const Zn = (e) => {
|
|
|
606
606
|
h2h: r.showHeadToHead ?? !0
|
|
607
607
|
};
|
|
608
608
|
return s.filter((c) => d[c] && l[c]);
|
|
609
|
-
},
|
|
610
|
-
var fe, se, We, ze, Re, De, nt, Ke, Me, $e, He,
|
|
609
|
+
}, gs = (e, o, r, a, s, l, d) => {
|
|
610
|
+
var fe, se, We, ze, Re, De, nt, Ke, Me, $e, He, Le, Ye, Be;
|
|
611
611
|
if (!(e != null && e.event)) return null;
|
|
612
|
-
const c = e.event,
|
|
613
|
-
if (!
|
|
614
|
-
const
|
|
612
|
+
const c = e.event, m = D(me(c, "id", "event_id", "match_id"));
|
|
613
|
+
if (!m) return null;
|
|
614
|
+
const p = String(me(c, "sport", "sport_type") ?? "").toLowerCase(), b = Ua(p), g = D(
|
|
615
615
|
((fe = me(c, "timing")) == null ? void 0 : fe.start_time) ?? me(c, "started_at", "kickoff_time")
|
|
616
|
-
), h = c.status && typeof c.status == "object" ? c.status : null, E = D(h ? me(h, "type", "code") : c.status), S = h ? D(me(h, "sub_type", "code")) : null, y =
|
|
616
|
+
), h = c.status && typeof c.status == "object" ? c.status : null, E = D(h ? me(h, "type", "code") : c.status), S = h ? D(me(h, "sub_type", "code")) : null, y = Na(E, g), w = D((se = c.competitor_one) == null ? void 0 : se.id) ?? "", u = D((We = c.competitor_two) == null ? void 0 : We.id) ?? "", C = Ha(c), _ = oo(
|
|
617
617
|
w,
|
|
618
618
|
to(C, "one"),
|
|
619
619
|
o,
|
|
@@ -645,7 +645,7 @@ const Zn = (e) => {
|
|
|
645
645
|
}
|
|
646
646
|
const O = D(me(c, "competition_id")), $ = (r == null ? void 0 : r.season) ?? null, V = D(me(c, "stage_id")), R = V ? (($ == null ? void 0 : $.stages) ?? []).find((L) => L.id === V) ?? null : null, A = (r == null ? void 0 : r.name) ?? (r == null ? void 0 : r.shortName) ?? // Falls back to the Search entity: a competition the competitions endpoint has no record of
|
|
647
647
|
// otherwise left the header showing only its subtitle — a bare country name under a trophy.
|
|
648
|
-
(O ? tt(o.get(O), s) : null) ?? null, q = ($ == null ? void 0 : $.year) || ($ == null ? void 0 : $.name) || null, K = (((ze = $ == null ? void 0 : $.stages) == null ? void 0 : ze.length) ?? 0) <= 1, ie = ((Re = R == null ? void 0 : R.stageNameModel) == null ? void 0 : Re.name) ?? null, Z = K ? a ?? ie : ie, J = (De = e.stats) == null ? void 0 : De.competitor_one, he = (nt = e.stats) == null ? void 0 : nt.competitor_two, ae =
|
|
648
|
+
(O ? tt(o.get(O), s) : null) ?? null, q = ($ == null ? void 0 : $.year) || ($ == null ? void 0 : $.name) || null, K = (((ze = $ == null ? void 0 : $.stages) == null ? void 0 : ze.length) ?? 0) <= 1, ie = ((Re = R == null ? void 0 : R.stageNameModel) == null ? void 0 : Re.name) ?? null, Z = K ? a ?? ie : ie, J = (De = e.stats) == null ? void 0 : De.competitor_one, he = (nt = e.stats) == null ? void 0 : nt.competitor_two, ae = Va(p), pe = so(
|
|
649
649
|
ae.match,
|
|
650
650
|
(L, M) => {
|
|
651
651
|
var P;
|
|
@@ -656,7 +656,7 @@ const Zn = (e) => {
|
|
|
656
656
|
), ve = so(
|
|
657
657
|
ae.season,
|
|
658
658
|
// Season stats carry their own "%" where they mean one, so no key list is needed here.
|
|
659
|
-
(L, M) =>
|
|
659
|
+
(L, M) => Ya(L === "one" ? J : he, M),
|
|
660
660
|
() => !1
|
|
661
661
|
), G = co(
|
|
662
662
|
(Ke = c.lineups) == null ? void 0 : Ke.competitor_one,
|
|
@@ -669,8 +669,8 @@ const Zn = (e) => {
|
|
|
669
669
|
s,
|
|
670
670
|
D((He = c.competitor_two) == null ? void 0 : He.formation)
|
|
671
671
|
);
|
|
672
|
-
G && oe &&
|
|
673
|
-
const ke = G && oe ? { home: G, away: oe } : null, Xe =
|
|
672
|
+
G && oe && cs(G, oe, c.main_events);
|
|
673
|
+
const ke = G && oe ? { home: G, away: oe } : null, Xe = ps(
|
|
674
674
|
e,
|
|
675
675
|
w,
|
|
676
676
|
u,
|
|
@@ -680,8 +680,8 @@ const Zn = (e) => {
|
|
|
680
680
|
d
|
|
681
681
|
), ee = C.get("half_time");
|
|
682
682
|
return {
|
|
683
|
-
id:
|
|
684
|
-
sport:
|
|
683
|
+
id: m,
|
|
684
|
+
sport: p,
|
|
685
685
|
isTennis: b,
|
|
686
686
|
status: y,
|
|
687
687
|
// The localized status/phase labels are all resolved in `useEvent` (where the i18n `t` lives).
|
|
@@ -691,14 +691,14 @@ const Zn = (e) => {
|
|
|
691
691
|
phaseLabel: null,
|
|
692
692
|
phaseLabelFull: null,
|
|
693
693
|
// Only meaningful while live — a finished event's clock is history.
|
|
694
|
-
timing: y === "LIVE" ?
|
|
694
|
+
timing: y === "LIVE" ? Ma(c) : null,
|
|
695
695
|
startsAt: g,
|
|
696
696
|
competition: {
|
|
697
697
|
id: O,
|
|
698
698
|
name: A,
|
|
699
699
|
season: q,
|
|
700
700
|
abbr: (r == null ? void 0 : r.shortName) ?? di(A),
|
|
701
|
-
logoUrl:
|
|
701
|
+
logoUrl: Oa(r == null ? void 0 : r.assets),
|
|
702
702
|
subtitle: Z
|
|
703
703
|
},
|
|
704
704
|
home: _,
|
|
@@ -708,11 +708,11 @@ const Zn = (e) => {
|
|
|
708
708
|
penalties: I,
|
|
709
709
|
winner: N,
|
|
710
710
|
round: {
|
|
711
|
-
matchday: ne((
|
|
711
|
+
matchday: ne((Le = me(c, "round")) == null ? void 0 : Le.matchday),
|
|
712
712
|
label: Z
|
|
713
713
|
},
|
|
714
714
|
halfTime: ee ? { home: ee.one ?? "0", away: ee.two ?? "0" } : null,
|
|
715
|
-
timeline:
|
|
715
|
+
timeline: ss(c.main_events, o, s),
|
|
716
716
|
matchStats: pe,
|
|
717
717
|
lineups: ke,
|
|
718
718
|
form: {
|
|
@@ -736,10 +736,10 @@ const Zn = (e) => {
|
|
|
736
736
|
)
|
|
737
737
|
},
|
|
738
738
|
seasonStats: ve,
|
|
739
|
-
streaks:
|
|
740
|
-
standingsColumns:
|
|
739
|
+
streaks: ls(J, he, ae.streaks),
|
|
740
|
+
standingsColumns: ms(e),
|
|
741
741
|
standings: Xe,
|
|
742
|
-
headToHead:
|
|
742
|
+
headToHead: hs(
|
|
743
743
|
e,
|
|
744
744
|
o,
|
|
745
745
|
s,
|
|
@@ -748,7 +748,7 @@ const Zn = (e) => {
|
|
|
748
748
|
b
|
|
749
749
|
)
|
|
750
750
|
};
|
|
751
|
-
}, mo = ["first", "second", "third", "fourth", "fifth"],
|
|
751
|
+
}, mo = ["first", "second", "third", "fourth", "fifth"], ys = (e) => e.charAt(0).toUpperCase() + e.slice(1), bs = {
|
|
752
752
|
finished: "ft",
|
|
753
753
|
afterPenalties: "pen",
|
|
754
754
|
afterExtraTime: "aet",
|
|
@@ -763,12 +763,12 @@ const Zn = (e) => {
|
|
|
763
763
|
startDelayed: "startDelayed",
|
|
764
764
|
delayedByRain: "delayedByRain",
|
|
765
765
|
toFinish: "toFinish"
|
|
766
|
-
},
|
|
766
|
+
}, ws = (e, o) => {
|
|
767
767
|
if (e.status === "LIVE")
|
|
768
768
|
e.statusLabel = o("eventCard.live"), e.statusLabelShort = o("eventCard.live");
|
|
769
769
|
else {
|
|
770
|
-
const r =
|
|
771
|
-
e.statusLabel = r ? o(`eventCard.statusFull.${r}`) : null, r ? r === "finished" && e.isTennis ? e.statusLabelShort = o("eventCard.statusFull.finished") : e.statusLabelShort = o(`eventCard.status.${
|
|
770
|
+
const r = Fa(e.status, e.subType);
|
|
771
|
+
e.statusLabel = r ? o(`eventCard.statusFull.${r}`) : null, r ? r === "finished" && e.isTennis ? e.statusLabelShort = o("eventCard.statusFull.finished") : e.statusLabelShort = o(`eventCard.status.${bs[r]}`) : e.statusLabelShort = null;
|
|
772
772
|
}
|
|
773
773
|
if (e.status === "LIVE") {
|
|
774
774
|
const r = ui(e.subType);
|
|
@@ -778,24 +778,24 @@ const Zn = (e) => {
|
|
|
778
778
|
const d = {};
|
|
779
779
|
(a === "overtime" || a === "extraTime") && (l = s != null ? `${a}N` : a), s != null && (d.n = s), e.phaseLabel = o(`eventCard.phase.${l}`, d);
|
|
780
780
|
let c;
|
|
781
|
-
a === "halftime" || a === "penalties" || a === "break" || (a === "overtime" || a === "extraTime") && s == null ? c = a : s != null && s >= 1 && s <= mo.length ? c = `${mo[s - 1]}${
|
|
781
|
+
a === "halftime" || a === "penalties" || a === "break" || (a === "overtime" || a === "extraTime") && s == null ? c = a : s != null && s >= 1 && s <= mo.length ? c = `${mo[s - 1]}${ys(a)}` : c = a, e.phaseLabelFull = o(`eventCard.phaseFull.${c}`);
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
784
|
return e;
|
|
785
|
-
},
|
|
786
|
-
const { t: l } = Se("common"), [d, c] = z(null), [
|
|
785
|
+
}, xs = (e, o, r, a, s) => {
|
|
786
|
+
const { t: l } = Se("common"), [d, c] = z(null), [m, p] = z(!0), [b, g] = z(!1), h = Yt(), E = Fe(
|
|
787
787
|
async (w, u) => {
|
|
788
788
|
var C, _, k, v, T, x, I;
|
|
789
|
-
u || (
|
|
789
|
+
u || (p(!0), g(!1));
|
|
790
790
|
try {
|
|
791
|
-
const N = await ra(e, o, w, h), O = await
|
|
791
|
+
const N = await ra(e, o, w, h), O = await La(
|
|
792
792
|
e,
|
|
793
793
|
((C = N == null ? void 0 : N.event) == null ? void 0 : C.competition_id) ?? null,
|
|
794
794
|
((_ = N == null ? void 0 : N.event) == null ? void 0 : _.season_id) ?? null,
|
|
795
795
|
h
|
|
796
796
|
);
|
|
797
797
|
if (w.aborted) return;
|
|
798
|
-
const $ =
|
|
798
|
+
const $ = Ss((k = N == null ? void 0 : N.event) == null ? void 0 : k.competitor_one), V = (((v = O == null ? void 0 : O.season) == null ? void 0 : v.stages) ?? []).length <= 1, R = V ? ((x = (T = O == null ? void 0 : O.related) == null ? void 0 : T.find((G) => /country/i.test(G.relationship))) == null ? void 0 : x.relatedId) ?? null : null, A = await Jn(
|
|
799
799
|
e,
|
|
800
800
|
R ? [...Zn(N), R] : Zn(N),
|
|
801
801
|
w,
|
|
@@ -819,7 +819,7 @@ const Zn = (e) => {
|
|
|
819
819
|
const oe = (ke = J(G)) == null ? void 0 : ke.flag;
|
|
820
820
|
oe && pe.set(G, oe);
|
|
821
821
|
});
|
|
822
|
-
const ve =
|
|
822
|
+
const ve = gs(
|
|
823
823
|
N,
|
|
824
824
|
A,
|
|
825
825
|
O,
|
|
@@ -828,19 +828,19 @@ const Zn = (e) => {
|
|
|
828
828
|
{ unknownCompetitor: l("eventCard.unknownCompetitor") },
|
|
829
829
|
pe
|
|
830
830
|
);
|
|
831
|
-
ve &&
|
|
831
|
+
ve && ws(ve, l), c(ve), g(!1);
|
|
832
832
|
} catch (N) {
|
|
833
833
|
if (w.aborted || (N == null ? void 0 : N.name) === "AbortError") return;
|
|
834
834
|
u || g(!0);
|
|
835
835
|
} finally {
|
|
836
|
-
!w.aborted && !u &&
|
|
836
|
+
!w.aborted && !u && p(!1);
|
|
837
837
|
}
|
|
838
838
|
},
|
|
839
839
|
[e, o, r, l, h]
|
|
840
840
|
);
|
|
841
841
|
Ce(() => {
|
|
842
842
|
if (!e || !o) {
|
|
843
|
-
|
|
843
|
+
p(!1);
|
|
844
844
|
return;
|
|
845
845
|
}
|
|
846
846
|
const w = new AbortController();
|
|
@@ -856,8 +856,8 @@ const Zn = (e) => {
|
|
|
856
856
|
), () => {
|
|
857
857
|
w.abort(), y.current && clearInterval(y.current);
|
|
858
858
|
};
|
|
859
|
-
}, [a, S, s, E]), { data: d, loading:
|
|
860
|
-
},
|
|
859
|
+
}, [a, S, s, E]), { data: d, loading: m, error: b };
|
|
860
|
+
}, Ss = (e) => typeof (e == null ? void 0 : e.id) == "string" ? e.id : null, n = {
|
|
861
861
|
surface: "var(--fu-ucrc-surface)",
|
|
862
862
|
inner: "var(--fu-ucrc-on-surface)",
|
|
863
863
|
chip: "var(--fu-ucrc-surface-variant)",
|
|
@@ -942,41 +942,41 @@ const Zn = (e) => {
|
|
|
942
942
|
warning: e.palette.warning.plainColor
|
|
943
943
|
}
|
|
944
944
|
};
|
|
945
|
-
},
|
|
945
|
+
}, vs = (e, o) => {
|
|
946
946
|
const r = new Set(o), a = /* @__PURE__ */ new Map();
|
|
947
947
|
return ((e == null ? void 0 : e.data) ?? []).forEach((s) => {
|
|
948
948
|
(s == null ? void 0 : s.gameType) === "SINGLE" && (s.fixtures ?? []).forEach((l) => {
|
|
949
|
-
var c,
|
|
949
|
+
var c, m, p, b, g;
|
|
950
950
|
const d = l == null ? void 0 : l.market;
|
|
951
951
|
!d || !r.has(d) || a.set(d, {
|
|
952
952
|
market: d,
|
|
953
953
|
predictionId: s.id,
|
|
954
954
|
value: (c = l.prediction) == null ? void 0 : c.value,
|
|
955
|
-
playerId: ((
|
|
956
|
-
outcome: ((
|
|
955
|
+
playerId: ((m = l.prediction) == null ? void 0 : m.playerId) ?? null,
|
|
956
|
+
outcome: ((p = l.result) == null ? void 0 : p.outcome) ?? null,
|
|
957
957
|
points: ((b = l.result) == null ? void 0 : b.points) ?? null,
|
|
958
958
|
status: ((g = l.result) == null ? void 0 : g.status) ?? null
|
|
959
959
|
});
|
|
960
960
|
});
|
|
961
961
|
}), a;
|
|
962
|
-
},
|
|
963
|
-
const [s, l] = z(/* @__PURE__ */ new Map()), [d, c] = z(a), [
|
|
962
|
+
}, Es = (e, o, r, a) => {
|
|
963
|
+
const [s, l] = z(/* @__PURE__ */ new Map()), [d, c] = z(a), [m, p] = z(!1), b = r.join(","), g = Ae(0);
|
|
964
964
|
Ce(() => {
|
|
965
965
|
if (!a || !e || !o || r.length === 0) {
|
|
966
|
-
l(/* @__PURE__ */ new Map()), c(!1),
|
|
966
|
+
l(/* @__PURE__ */ new Map()), c(!1), p(!1);
|
|
967
967
|
return;
|
|
968
968
|
}
|
|
969
969
|
const S = ++g.current;
|
|
970
|
-
return c(!0),
|
|
970
|
+
return c(!0), p(!1), (async () => {
|
|
971
971
|
try {
|
|
972
972
|
const y = await e.predictor.getMyPredictionsForMatches([
|
|
973
973
|
o
|
|
974
974
|
]);
|
|
975
975
|
if (g.current !== S) return;
|
|
976
|
-
l(
|
|
976
|
+
l(vs(y, r));
|
|
977
977
|
} catch {
|
|
978
978
|
if (g.current !== S) return;
|
|
979
|
-
l(/* @__PURE__ */ new Map()),
|
|
979
|
+
l(/* @__PURE__ */ new Map()), p(!0);
|
|
980
980
|
} finally {
|
|
981
981
|
g.current === S && c(!1);
|
|
982
982
|
}
|
|
@@ -1035,20 +1035,20 @@ const Zn = (e) => {
|
|
|
1035
1035
|
},
|
|
1036
1036
|
[e, s]
|
|
1037
1037
|
);
|
|
1038
|
-
return { predictions: s, loading: d, error:
|
|
1039
|
-
},
|
|
1038
|
+
return { predictions: s, loading: d, error: m, submit: h, remove: E };
|
|
1039
|
+
}, Cs = 12 * 60 * 60 * 1e3, _s = (e, o) => {
|
|
1040
1040
|
var d, c;
|
|
1041
1041
|
if (!e) return !1;
|
|
1042
1042
|
const r = (d = e.homeTeam) == null ? void 0 : d.id, a = (c = e.awayTeam) == null ? void 0 : c.id;
|
|
1043
1043
|
if (!r || !a || r !== o.home.id || a !== o.away.id) return !1;
|
|
1044
1044
|
if (!e.kickoffAt || !o.startsAt) return !0;
|
|
1045
1045
|
const s = new Date(e.kickoffAt).getTime(), l = new Date(o.startsAt).getTime();
|
|
1046
|
-
return Number.isNaN(s) || Number.isNaN(l) ? !0 : Math.abs(s - l) <=
|
|
1047
|
-
},
|
|
1046
|
+
return Number.isNaN(s) || Number.isNaN(l) ? !0 : Math.abs(s - l) <= Cs;
|
|
1047
|
+
}, ks = async (e, o, r = !1) => {
|
|
1048
1048
|
if (!o.id) return null;
|
|
1049
1049
|
try {
|
|
1050
1050
|
const a = await e.football.getMatchById(o.id, r);
|
|
1051
|
-
if (!
|
|
1051
|
+
if (!_s(a, o)) return null;
|
|
1052
1052
|
const s = a.id ?? null;
|
|
1053
1053
|
return s ? {
|
|
1054
1054
|
id: s,
|
|
@@ -1057,23 +1057,23 @@ const Zn = (e) => {
|
|
|
1057
1057
|
} catch {
|
|
1058
1058
|
return null;
|
|
1059
1059
|
}
|
|
1060
|
-
},
|
|
1060
|
+
}, Rs = (e, o, r) => {
|
|
1061
1061
|
const [a, s] = z(null), [l, d] = z(
|
|
1062
1062
|
null
|
|
1063
|
-
), [c,
|
|
1063
|
+
), [c, m] = z(!1), p = Yt(), b = Ae(0), g = (o == null ? void 0 : o.id) ?? null, h = (o == null ? void 0 : o.home.id) ?? null, E = (o == null ? void 0 : o.away.id) ?? null, S = (o == null ? void 0 : o.startsAt) ?? null;
|
|
1064
1064
|
return Ce(() => {
|
|
1065
1065
|
if (!r || !e || !o || !g) {
|
|
1066
|
-
s(null), d(null),
|
|
1066
|
+
s(null), d(null), m(!1);
|
|
1067
1067
|
return;
|
|
1068
1068
|
}
|
|
1069
1069
|
const y = ++b.current;
|
|
1070
|
-
return
|
|
1071
|
-
const w = await
|
|
1072
|
-
b.current === y && (s((w == null ? void 0 : w.id) ?? null), d((w == null ? void 0 : w.availableMarkets) ?? null),
|
|
1070
|
+
return m(!0), (async () => {
|
|
1071
|
+
const w = await ks(e, o, p);
|
|
1072
|
+
b.current === y && (s((w == null ? void 0 : w.id) ?? null), d((w == null ? void 0 : w.availableMarkets) ?? null), m(!1));
|
|
1073
1073
|
})(), () => {
|
|
1074
1074
|
b.current++;
|
|
1075
1075
|
};
|
|
1076
|
-
}, [e, r, g, h, E, S,
|
|
1076
|
+
}, [e, r, g, h, E, S, p]), { matchId: a, availableMarkets: l, resolving: c };
|
|
1077
1077
|
}, po = ["GOALKEEPER", "DEFENDER", "MIDFIELDER", "FORWARD"], ho = (e) => {
|
|
1078
1078
|
const o = po.findIndex(
|
|
1079
1079
|
(r) => (e ?? "").toUpperCase().startsWith(r.slice(0, 4))
|
|
@@ -1089,24 +1089,24 @@ const Zn = (e) => {
|
|
|
1089
1089
|
headshotUrl: ((a = r.assets) == null ? void 0 : a.headshot) ?? null,
|
|
1090
1090
|
side: o
|
|
1091
1091
|
};
|
|
1092
|
-
}),
|
|
1093
|
-
const [s, l] = z([]), [d, c] = z(!1),
|
|
1092
|
+
}), Ls = (e, o, r, a) => {
|
|
1093
|
+
const [s, l] = z([]), [d, c] = z(!1), m = Ae(0), p = Yt();
|
|
1094
1094
|
Ce(() => {
|
|
1095
1095
|
if (!a || !e || !o || !r) {
|
|
1096
1096
|
l([]), c(!1);
|
|
1097
1097
|
return;
|
|
1098
1098
|
}
|
|
1099
|
-
const h = ++
|
|
1099
|
+
const h = ++m.current;
|
|
1100
1100
|
return c(!0), (async () => {
|
|
1101
1101
|
const [E, S] = await Promise.all([
|
|
1102
|
-
e.football.getTeamById(o,
|
|
1103
|
-
e.football.getTeamById(r,
|
|
1102
|
+
e.football.getTeamById(o, p).catch(() => null),
|
|
1103
|
+
e.football.getTeamById(r, p).catch(() => null)
|
|
1104
1104
|
]);
|
|
1105
|
-
|
|
1105
|
+
m.current === h && (l([...fo(E, "home"), ...fo(S, "away")]), c(!1));
|
|
1106
1106
|
})(), () => {
|
|
1107
|
-
|
|
1107
|
+
m.current++;
|
|
1108
1108
|
};
|
|
1109
|
-
}, [e, o, r, a,
|
|
1109
|
+
}, [e, o, r, a, p]);
|
|
1110
1110
|
const b = we(
|
|
1111
1111
|
() => [...s].sort(
|
|
1112
1112
|
(h, E) => (h.side === E.side ? 0 : h.side === "home" ? -1 : 1) || ho(h.position) - ho(E.position) || h.name.localeCompare(E.name)
|
|
@@ -1121,24 +1121,24 @@ const Zn = (e) => {
|
|
|
1121
1121
|
loading: d,
|
|
1122
1122
|
playerName: (h) => g.get(h) ?? null
|
|
1123
1123
|
};
|
|
1124
|
-
},
|
|
1124
|
+
}, Ts = (e, o, r) => {
|
|
1125
1125
|
const [a, s] = z(null), [l, d] = z(!1), c = Ae(0);
|
|
1126
1126
|
return Ce(() => {
|
|
1127
1127
|
if (!r || !e || !o) {
|
|
1128
1128
|
s(null), d(!1);
|
|
1129
1129
|
return;
|
|
1130
1130
|
}
|
|
1131
|
-
const
|
|
1131
|
+
const m = ++c.current;
|
|
1132
1132
|
return d(!0), (async () => {
|
|
1133
1133
|
try {
|
|
1134
|
-
const
|
|
1135
|
-
if (c.current !==
|
|
1136
|
-
s(
|
|
1134
|
+
const p = await e.predictor.getMatchMarketsResults(o);
|
|
1135
|
+
if (c.current !== m) return;
|
|
1136
|
+
s(p ?? null);
|
|
1137
1137
|
} catch {
|
|
1138
|
-
if (c.current !==
|
|
1138
|
+
if (c.current !== m) return;
|
|
1139
1139
|
s(null);
|
|
1140
1140
|
} finally {
|
|
1141
|
-
c.current ===
|
|
1141
|
+
c.current === m && d(!1);
|
|
1142
1142
|
}
|
|
1143
1143
|
})(), () => {
|
|
1144
1144
|
c.current++;
|
|
@@ -1177,17 +1177,17 @@ const Zn = (e) => {
|
|
|
1177
1177
|
PLAYER_SCORE_HATTRICK: "player",
|
|
1178
1178
|
PLAYER_YELLOW_CARD: "player",
|
|
1179
1179
|
PLAYER_RED_CARD: "player"
|
|
1180
|
-
},
|
|
1180
|
+
}, Os = "PLAYER_SCORE_FIRST_GOAL", Qt = "OWN_GOAL", As = Object.keys(
|
|
1181
1181
|
Gn
|
|
1182
|
-
), Pe = (e) => Gn[e],
|
|
1182
|
+
), Pe = (e) => Gn[e], Is = (e) => typeof e == "string" && e in Gn, $s = (e) => {
|
|
1183
1183
|
if (!(e != null && e.length)) return [];
|
|
1184
1184
|
const o = /* @__PURE__ */ new Set(), r = [];
|
|
1185
1185
|
return e.forEach((a) => {
|
|
1186
|
-
|
|
1186
|
+
Is(a) ? o.add(a) : r.push(a);
|
|
1187
1187
|
}), r.length && console.warn(
|
|
1188
|
-
`[EventCard] Ignoring unrecognised prediction market(s): ${r.map((a) => JSON.stringify(a)).join(", ")}. Supported: ${
|
|
1188
|
+
`[EventCard] Ignoring unrecognised prediction market(s): ${r.map((a) => JSON.stringify(a)).join(", ")}. Supported: ${As.join(", ")}.`
|
|
1189
1189
|
), Array.from(o);
|
|
1190
|
-
},
|
|
1190
|
+
}, Ns = (e, o, r) => {
|
|
1191
1191
|
if (!(o != null && o.length)) return [...e];
|
|
1192
1192
|
const a = new Set(
|
|
1193
1193
|
o.map((d) => String(d).toUpperCase())
|
|
@@ -1197,7 +1197,7 @@ const Zn = (e) => {
|
|
|
1197
1197
|
", "
|
|
1198
1198
|
)}. The Football API reports these available${r ? ` for ${r}` : ""}: ${[...a].join(", ")}.`
|
|
1199
1199
|
), s;
|
|
1200
|
-
}, go = (e, o) => Math.floor(parseFloat(e.replace(o, "").replace("_", "."))),
|
|
1200
|
+
}, go = (e, o) => Math.floor(parseFloat(e.replace(o, "").replace("_", "."))), Fs = (e, o) => {
|
|
1201
1201
|
switch (e) {
|
|
1202
1202
|
case "FT_1X2":
|
|
1203
1203
|
return o("matchQuiz.fixtures.oneXTwoFixtureTitle");
|
|
@@ -1268,18 +1268,18 @@ const Zn = (e) => {
|
|
|
1268
1268
|
case "player":
|
|
1269
1269
|
return ((a = r.playerName) == null ? void 0 : a.call(r, String(o))) ?? String(o);
|
|
1270
1270
|
}
|
|
1271
|
-
},
|
|
1271
|
+
}, Ps = (e, o) => {
|
|
1272
1272
|
var r;
|
|
1273
1273
|
return e == null ? o.noGoal : e === Qt ? o.ownGoal : ((r = o.playerName) == null ? void 0 : r.call(o, e)) ?? e;
|
|
1274
|
-
},
|
|
1274
|
+
}, Ws = (e) => e != null && e !== "", yo = 15, zs = (e, o = yo) => {
|
|
1275
1275
|
if (!e) return null;
|
|
1276
1276
|
const r = new Date(e).getTime();
|
|
1277
1277
|
if (Number.isNaN(r)) return null;
|
|
1278
1278
|
const a = Math.max(yo, o);
|
|
1279
1279
|
return r - a * 6e4;
|
|
1280
|
-
},
|
|
1280
|
+
}, Ds = (e, o, r, a = Date.now()) => {
|
|
1281
1281
|
if (e !== "UPCOMING") return !1;
|
|
1282
|
-
const s =
|
|
1282
|
+
const s = zs(o, r);
|
|
1283
1283
|
return s === null || a < s;
|
|
1284
1284
|
}, yi = {
|
|
1285
1285
|
FT_1X2: "fullTimeOneXTwo",
|
|
@@ -1314,7 +1314,7 @@ const Zn = (e) => {
|
|
|
1314
1314
|
PLAYER_SCORE_HATTRICK: "playerScoreHattrick",
|
|
1315
1315
|
PLAYER_YELLOW_CARD: "playerYellowCard",
|
|
1316
1316
|
PLAYER_RED_CARD: "playerRedCard"
|
|
1317
|
-
}, bi = "NOBODY",
|
|
1317
|
+
}, bi = "NOBODY", Ms = "OWN_GOAL", zt = (e) => {
|
|
1318
1318
|
if (typeof e == "number") return Number.isFinite(e) ? e : null;
|
|
1319
1319
|
if (typeof e == "string" && e.trim() !== "" && Number.isFinite(Number(e)))
|
|
1320
1320
|
return Number(e);
|
|
@@ -1326,17 +1326,17 @@ const Zn = (e) => {
|
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
1328
1328
|
return null;
|
|
1329
|
-
},
|
|
1329
|
+
}, Hs = (e, o) => {
|
|
1330
1330
|
if (o <= 0) return e.map(() => 0);
|
|
1331
1331
|
const r = e.map((c) => c / o * 100), a = r.map((c) => Math.floor(c));
|
|
1332
|
-
let s = 100 - a.reduce((c,
|
|
1333
|
-
const l = r.map((c,
|
|
1332
|
+
let s = 100 - a.reduce((c, m) => c + m, 0);
|
|
1333
|
+
const l = r.map((c, m) => ({ index: m, fraction: c - Math.floor(c) })).sort((c, m) => m.fraction - c.fraction), d = [...a];
|
|
1334
1334
|
for (const { index: c } of l) {
|
|
1335
1335
|
if (s <= 0) break;
|
|
1336
1336
|
d[c] += 1, s -= 1;
|
|
1337
1337
|
}
|
|
1338
1338
|
return d;
|
|
1339
|
-
},
|
|
1339
|
+
}, Bs = (e, o) => {
|
|
1340
1340
|
var a;
|
|
1341
1341
|
const r = (a = e == null ? void 0 : e.predictions) == null ? void 0 : a[yi[o]];
|
|
1342
1342
|
return !r || typeof r != "object" ? null : r;
|
|
@@ -1344,7 +1344,7 @@ const Zn = (e) => {
|
|
|
1344
1344
|
oneXTwo: ["1", "x", "2"],
|
|
1345
1345
|
yesNo: ["yes", "no"],
|
|
1346
1346
|
doubleChance: ["1x", "12", "x2"]
|
|
1347
|
-
},
|
|
1347
|
+
}, Gs = (e) => wi[e] !== void 0, xi = (e, o) => {
|
|
1348
1348
|
if (o in e) return o;
|
|
1349
1349
|
const r = o.toLowerCase();
|
|
1350
1350
|
return Object.keys(e).find((a) => a.toLowerCase() === r) ?? null;
|
|
@@ -1379,31 +1379,31 @@ const Zn = (e) => {
|
|
|
1379
1379
|
return r.map((l) => l == null ? void 0 : l.playerId).filter((l) => typeof l == "string" && l !== "");
|
|
1380
1380
|
const s = Si(e, o);
|
|
1381
1381
|
return s ? [s] : [];
|
|
1382
|
-
}, qt = 3,
|
|
1382
|
+
}, qt = 3, Us = (e, o, r) => {
|
|
1383
1383
|
const a = o == null ? void 0 : o[e];
|
|
1384
1384
|
if (a == null) return null;
|
|
1385
1385
|
const s = Pe(e);
|
|
1386
1386
|
if (s === "player") {
|
|
1387
1387
|
const d = (Array.isArray(a) ? a : [a]).map((c) => {
|
|
1388
|
-
var
|
|
1389
|
-
const
|
|
1390
|
-
return typeof
|
|
1388
|
+
var p, b;
|
|
1389
|
+
const m = c == null ? void 0 : c.playerId;
|
|
1390
|
+
return typeof m != "string" || m === "" ? null : ((p = c == null ? void 0 : c.playerModel) == null ? void 0 : p.name) ?? ((b = r.playerName) == null ? void 0 : b.call(r, m)) ?? m;
|
|
1391
1391
|
}).filter((c) => !!c);
|
|
1392
1392
|
return d.length === 0 ? null : d.length <= qt ? d.join(", ") : `${d.slice(0, qt).join(", ")} +${d.length - qt}`;
|
|
1393
1393
|
}
|
|
1394
1394
|
if (s === "doubleChance") {
|
|
1395
1395
|
const d = vi(o, e).map(
|
|
1396
|
-
(
|
|
1396
|
+
(m) => new Set(m.split(""))
|
|
1397
1397
|
), c = ["1", "x", "2"].filter(
|
|
1398
|
-
(
|
|
1398
|
+
(m) => d.length > 0 ? d.every((p) => p.has(m)) : !1
|
|
1399
1399
|
);
|
|
1400
1400
|
return c.length !== 1 ? null : c[0] === "1" ? r.homeName : c[0] === "2" ? r.awayName : r.draw;
|
|
1401
1401
|
}
|
|
1402
1402
|
const l = Si(o, e);
|
|
1403
1403
|
return l ? Ei(e, l, r) : null;
|
|
1404
|
-
},
|
|
1404
|
+
}, Vs = 3, js = 1, Xs = (e, o, r) => {
|
|
1405
1405
|
var T;
|
|
1406
|
-
const a =
|
|
1406
|
+
const a = Bs(e, o);
|
|
1407
1407
|
if (!a) return null;
|
|
1408
1408
|
const s = Pe(o), l = wi[s], d = l ? l.map((x) => xi(a, x) ?? x) : Object.keys(a).filter(
|
|
1409
1409
|
(x) => (zt(a[x]) ?? 0) > 0
|
|
@@ -1411,26 +1411,26 @@ const Zn = (e) => {
|
|
|
1411
1411
|
(x) => x in a ? zt(a[x]) : 0
|
|
1412
1412
|
);
|
|
1413
1413
|
if (c.some((x) => x === null)) return null;
|
|
1414
|
-
let
|
|
1414
|
+
let m = d, p = c, b = p.reduce((x, I) => x + I, 0);
|
|
1415
1415
|
const g = ((T = r.ownKeys) == null ? void 0 : T[o]) ?? null, h = Object.values(a).some(
|
|
1416
1416
|
(x) => zt(x) === null
|
|
1417
1417
|
);
|
|
1418
1418
|
if (b === 0 && g && !h) {
|
|
1419
|
-
const x =
|
|
1419
|
+
const x = m.findIndex(
|
|
1420
1420
|
(I) => I.toLowerCase() === g.toLowerCase()
|
|
1421
1421
|
);
|
|
1422
|
-
x >= 0 ?
|
|
1422
|
+
x >= 0 ? p = p.map((I, N) => N === x ? 1 : I) : (m = [...m, g], p = [...p, 1]), b = 1;
|
|
1423
1423
|
}
|
|
1424
|
-
if (b < Math.max(1, r.minPredictions ??
|
|
1424
|
+
if (b < Math.max(1, r.minPredictions ?? js))
|
|
1425
1425
|
return null;
|
|
1426
|
-
const E =
|
|
1427
|
-
let y =
|
|
1426
|
+
const E = Hs(p, b), S = vi(r.results, o);
|
|
1427
|
+
let y = m.map((x, I) => {
|
|
1428
1428
|
const N = S.some(
|
|
1429
1429
|
(V) => V.toLowerCase() === x.toLowerCase()
|
|
1430
1430
|
), O = !!g && g.toLowerCase() === x.toLowerCase(), $ = [];
|
|
1431
1431
|
return N && $.push("actual"), O && $.push("own"), {
|
|
1432
1432
|
key: x,
|
|
1433
|
-
count:
|
|
1433
|
+
count: p[I],
|
|
1434
1434
|
percentage: E[I],
|
|
1435
1435
|
isActual: N,
|
|
1436
1436
|
isOwn: O,
|
|
@@ -1443,7 +1443,7 @@ const Zn = (e) => {
|
|
|
1443
1443
|
const w = y.reduce(
|
|
1444
1444
|
(x, I) => !x || I.count > x.count ? I : x,
|
|
1445
1445
|
null
|
|
1446
|
-
), C = !!w && y.filter((x) => x.count === w.count).length > 1 ? null : w, _ = l ? y.length : Math.max(1, r.topOutcomes ??
|
|
1446
|
+
), C = !!w && y.filter((x) => x.count === w.count).length > 1 ? null : w, _ = l ? y.length : Math.max(1, r.topOutcomes ?? Vs), k = y.slice(0, _), v = y.slice(_);
|
|
1447
1447
|
return {
|
|
1448
1448
|
market: o,
|
|
1449
1449
|
kind: s,
|
|
@@ -1467,14 +1467,14 @@ const Zn = (e) => {
|
|
|
1467
1467
|
0
|
|
1468
1468
|
)
|
|
1469
1469
|
};
|
|
1470
|
-
},
|
|
1470
|
+
}, Ks = (e, o, r) => e ? o.map((a) => Xs(e, a, r)).filter((a) => a !== null) : [], Ys = (e, o) => {
|
|
1471
1471
|
if (!e || o.length === 0) return e;
|
|
1472
1472
|
const r = { ...e.predictions ?? {} };
|
|
1473
1473
|
return o.forEach(({ market: a, outcomeKey: s, delta: l }) => {
|
|
1474
1474
|
const d = yi[a];
|
|
1475
1475
|
if (!d) return;
|
|
1476
|
-
const c = { ...r[d] ?? {} },
|
|
1477
|
-
|
|
1476
|
+
const c = { ...r[d] ?? {} }, m = xi(c, s) ?? s, p = c[m];
|
|
1477
|
+
p !== void 0 && typeof p != "number" && typeof p != "string" || (c[m] = Math.max(0, (zt(p) ?? 0) + l), r[d] = c);
|
|
1478
1478
|
}), { ...e, predictions: r };
|
|
1479
1479
|
}, Ei = (e, o, r) => {
|
|
1480
1480
|
var a;
|
|
@@ -1482,7 +1482,7 @@ const Zn = (e) => {
|
|
|
1482
1482
|
case "yesNo":
|
|
1483
1483
|
return o.toLowerCase() === "yes" ? r.yes : r.no;
|
|
1484
1484
|
case "player":
|
|
1485
|
-
return o === bi ? r.noGoal : o ===
|
|
1485
|
+
return o === bi ? r.noGoal : o === Ms || o === Qt ? r.ownGoal : ((a = r.playerName) == null ? void 0 : a.call(r, o)) ?? o;
|
|
1486
1486
|
default:
|
|
1487
1487
|
return gi(e, o, r);
|
|
1488
1488
|
}
|
|
@@ -1501,8 +1501,8 @@ const Zn = (e) => {
|
|
|
1501
1501
|
case "player":
|
|
1502
1502
|
return r === void 0 ? null : r === null ? bi : r;
|
|
1503
1503
|
}
|
|
1504
|
-
},
|
|
1505
|
-
const [a, s] = z(null), [l, d] = z(r), [c,
|
|
1504
|
+
}, Qs = (e, o, r) => {
|
|
1505
|
+
const [a, s] = z(null), [l, d] = z(r), [c, m] = z(!1), [p, b] = z([]), g = Yt(), h = Ae(0), E = Fe(
|
|
1506
1506
|
(y, w, u) => {
|
|
1507
1507
|
b((C) => {
|
|
1508
1508
|
const _ = [...C];
|
|
@@ -1513,11 +1513,11 @@ const Zn = (e) => {
|
|
|
1513
1513
|
);
|
|
1514
1514
|
return Ce(() => {
|
|
1515
1515
|
if (!r || !e || !o) {
|
|
1516
|
-
s(null), b([]), d(!1),
|
|
1516
|
+
s(null), b([]), d(!1), m(!1);
|
|
1517
1517
|
return;
|
|
1518
1518
|
}
|
|
1519
1519
|
const y = ++h.current;
|
|
1520
|
-
return d(!0),
|
|
1520
|
+
return d(!0), m(!1), (async () => {
|
|
1521
1521
|
try {
|
|
1522
1522
|
const w = await e.predictor.getMatchSummary(
|
|
1523
1523
|
o,
|
|
@@ -1527,7 +1527,7 @@ const Zn = (e) => {
|
|
|
1527
1527
|
s(w ?? null), b([]);
|
|
1528
1528
|
} catch (w) {
|
|
1529
1529
|
if (h.current !== y) return;
|
|
1530
|
-
s(null),
|
|
1530
|
+
s(null), m(!0), console.warn(
|
|
1531
1531
|
`[EventCard] Could not load the prediction summary for match ${o}; the crowd split will not be shown.`,
|
|
1532
1532
|
w
|
|
1533
1533
|
);
|
|
@@ -1538,8 +1538,8 @@ const Zn = (e) => {
|
|
|
1538
1538
|
h.current++;
|
|
1539
1539
|
};
|
|
1540
1540
|
}, [e, o, r, g]), { summary: we(
|
|
1541
|
-
() =>
|
|
1542
|
-
[a,
|
|
1541
|
+
() => Ys(a, p),
|
|
1542
|
+
[a, p]
|
|
1543
1543
|
), loading: l, error: c, recordOwnVote: E };
|
|
1544
1544
|
}, In = t({
|
|
1545
1545
|
position: "relative",
|
|
@@ -1552,7 +1552,7 @@ const Zn = (e) => {
|
|
|
1552
1552
|
backgroundColor: n.surface,
|
|
1553
1553
|
border: `1px solid ${n.border}`,
|
|
1554
1554
|
borderRadius: n.radiusMd
|
|
1555
|
-
}), bo = t(In, { display: "flex", flexDirection: "column" }),
|
|
1555
|
+
}), bo = t(In, { display: "flex", flexDirection: "column" }), qs = {
|
|
1556
1556
|
state: In,
|
|
1557
1557
|
compact: t(In, { overflow: "hidden" }),
|
|
1558
1558
|
standard: t(bo, { padding: n.spaceLg, gap: n.spaceMd }),
|
|
@@ -1560,7 +1560,7 @@ const Zn = (e) => {
|
|
|
1560
1560
|
}, ft = ({
|
|
1561
1561
|
variant: e,
|
|
1562
1562
|
children: o
|
|
1563
|
-
}) => /* @__PURE__ */ i("div", { css:
|
|
1563
|
+
}) => /* @__PURE__ */ i("div", { css: qs[e], style: fi(), children: o }), Ci = t({
|
|
1564
1564
|
flexShrink: 0,
|
|
1565
1565
|
// Without this the 1px tile border is ADDED to the declared size, so a crest that falls
|
|
1566
1566
|
// back to the tile (placeholder icon / abbreviation) renders ~2px bigger than the bare
|
|
@@ -1599,11 +1599,11 @@ const Zn = (e) => {
|
|
|
1599
1599
|
labelFontEm: l,
|
|
1600
1600
|
fallbackIcon: d,
|
|
1601
1601
|
plainLogo: c = !1,
|
|
1602
|
-
avatar:
|
|
1603
|
-
flagUrl:
|
|
1602
|
+
avatar: m = !1,
|
|
1603
|
+
flagUrl: p = null,
|
|
1604
1604
|
alt: b
|
|
1605
1605
|
}) => {
|
|
1606
|
-
const g = e ??
|
|
1606
|
+
const g = e ?? p, h = !e && !!p, E = h || c && !!e && !m, S = m && !h;
|
|
1607
1607
|
return /* @__PURE__ */ i(
|
|
1608
1608
|
"div",
|
|
1609
1609
|
{
|
|
@@ -1655,7 +1655,7 @@ const Zn = (e) => {
|
|
|
1655
1655
|
fontSize: "0.75em",
|
|
1656
1656
|
color: n.dim
|
|
1657
1657
|
})
|
|
1658
|
-
},
|
|
1658
|
+
}, Zs = ({
|
|
1659
1659
|
competition: e,
|
|
1660
1660
|
template: o
|
|
1661
1661
|
}) => {
|
|
@@ -1696,17 +1696,17 @@ const Zn = (e) => {
|
|
|
1696
1696
|
e.subtitle && /* @__PURE__ */ i("p", { css: qe.subtitle, children: e.subtitle })
|
|
1697
1697
|
] })
|
|
1698
1698
|
] });
|
|
1699
|
-
},
|
|
1699
|
+
}, Js = 180, Un = (e) => {
|
|
1700
1700
|
const { t: o } = Se("common"), r = (e == null ? void 0 : e.timing) ?? null, [a, s] = z(0);
|
|
1701
1701
|
if (Ce(() => {
|
|
1702
1702
|
if (s(0), !(r != null && r.running)) return;
|
|
1703
|
-
let
|
|
1704
|
-
const
|
|
1705
|
-
|
|
1703
|
+
let m = 0;
|
|
1704
|
+
const p = setInterval(() => {
|
|
1705
|
+
m += 1, s(m), m >= Js && clearInterval(p);
|
|
1706
1706
|
}, 1e3);
|
|
1707
|
-
return () => clearInterval(
|
|
1707
|
+
return () => clearInterval(p);
|
|
1708
1708
|
}, [r == null ? void 0 : r.minute, r == null ? void 0 : r.playedSeconds, r == null ? void 0 : r.running]), !r || !e) return null;
|
|
1709
|
-
const l =
|
|
1709
|
+
const l = za(e.sport, e.subType);
|
|
1710
1710
|
if (l === null) return null;
|
|
1711
1711
|
const d = Math.max(0, r.playedSeconds) % 60, c = l + r.minute + Math.floor((d + a) / 60);
|
|
1712
1712
|
return o("eventCard.minute", { n: c });
|
|
@@ -1747,14 +1747,14 @@ const Zn = (e) => {
|
|
|
1747
1747
|
color: n.dim,
|
|
1748
1748
|
marginLeft: "0.06em"
|
|
1749
1749
|
})
|
|
1750
|
-
},
|
|
1750
|
+
}, el = ({ sets: e }) => /* @__PURE__ */ i("div", { css: Ct.root, children: e.map((o, r) => /* @__PURE__ */ f("span", { css: o.won ? Ct.won : Ct.lost, children: [
|
|
1751
1751
|
o.games,
|
|
1752
1752
|
o.tiebreak !== null && /* @__PURE__ */ i("sup", { css: Ct.tiebreak, children: o.tiebreak })
|
|
1753
|
-
] }, r)) }),
|
|
1753
|
+
] }, r)) }), tl = ta({ "0%, 100%": { opacity: 1 }, "50%": { opacity: 0.25 } }), ki = {
|
|
1754
1754
|
dot: t({
|
|
1755
1755
|
borderRadius: "50%",
|
|
1756
1756
|
backgroundColor: n.danger,
|
|
1757
|
-
animation: `${
|
|
1757
|
+
animation: `${tl} 1s ease-in-out infinite`,
|
|
1758
1758
|
flexShrink: 0
|
|
1759
1759
|
}),
|
|
1760
1760
|
badge: t({
|
|
@@ -1798,7 +1798,7 @@ const Zn = (e) => {
|
|
|
1798
1798
|
fontSize: "1em",
|
|
1799
1799
|
minWidth: "1em",
|
|
1800
1800
|
textAlign: "right"
|
|
1801
|
-
}), Eo = t(Li, { fontSize: "0.8125em" }),
|
|
1801
|
+
}), Eo = t(Li, { fontSize: "0.8125em" }), nl = t({
|
|
1802
1802
|
width: "1px",
|
|
1803
1803
|
alignSelf: "stretch",
|
|
1804
1804
|
backgroundColor: n.border,
|
|
@@ -1854,7 +1854,7 @@ const Zn = (e) => {
|
|
|
1854
1854
|
textOverflow: "ellipsis"
|
|
1855
1855
|
}),
|
|
1856
1856
|
scores: t({ display: "flex", alignItems: "center", gap: n.spaceXs }),
|
|
1857
|
-
divider:
|
|
1857
|
+
divider: nl,
|
|
1858
1858
|
match: t(Co, { borderTop: `1px solid ${n.border}` }),
|
|
1859
1859
|
matchFlush: t(Co, { borderTop: "none" }),
|
|
1860
1860
|
competitors: t({
|
|
@@ -1881,19 +1881,19 @@ const Zn = (e) => {
|
|
|
1881
1881
|
boxShadow: "0 0 #000, 0px 1px 2px 0px rgba(0 0 0 / 0.6), 0px 2px 4px 0px rgba(0 0 0 / 0.6)"
|
|
1882
1882
|
}
|
|
1883
1883
|
})
|
|
1884
|
-
},
|
|
1885
|
-
const a = Q.useRef(null), s = Q.useRef(null), l = Q.useRef(void 0), [d, c] = Q.useState(!1), [
|
|
1884
|
+
}, ol = 10, rl = ({ short: e, full: o, tone: r }) => {
|
|
1885
|
+
const a = Q.useRef(null), s = Q.useRef(null), l = Q.useRef(void 0), [d, c] = Q.useState(!1), [m, p] = Q.useState(null), [b, g] = Q.useReducer((y) => y + 1, 0), h = !!o && o !== e;
|
|
1886
1886
|
Q.useEffect(() => () => window.clearTimeout(l.current), []), Q.useLayoutEffect(() => {
|
|
1887
1887
|
const y = a.current, w = s.current, u = w == null ? void 0 : w.offsetParent;
|
|
1888
1888
|
if (!d || !y || !w || !u) return;
|
|
1889
1889
|
const C = y.getBoundingClientRect(), _ = u.getBoundingClientRect(), k = w.getBoundingClientRect();
|
|
1890
|
-
|
|
1890
|
+
p({
|
|
1891
1891
|
x: Math.round(
|
|
1892
1892
|
C.left + C.width / 2 - k.width / 2 - _.left - u.clientLeft
|
|
1893
1893
|
),
|
|
1894
1894
|
// From the parent's bottom edge, as Popper placed a "top" tooltip.
|
|
1895
1895
|
y: Math.round(
|
|
1896
|
-
C.top -
|
|
1896
|
+
C.top - ol - (_.top + u.clientTop + u.clientHeight)
|
|
1897
1897
|
)
|
|
1898
1898
|
});
|
|
1899
1899
|
}, [d, b]), Q.useEffect(() => {
|
|
@@ -1905,7 +1905,7 @@ const Zn = (e) => {
|
|
|
1905
1905
|
const E = () => {
|
|
1906
1906
|
window.clearTimeout(l.current), l.current = window.setTimeout(() => c(!0), 100);
|
|
1907
1907
|
}, S = () => {
|
|
1908
|
-
window.clearTimeout(l.current), c(!1),
|
|
1908
|
+
window.clearTimeout(l.current), c(!1), p(null);
|
|
1909
1909
|
};
|
|
1910
1910
|
return /* @__PURE__ */ f(B, { children: [
|
|
1911
1911
|
/* @__PURE__ */ i(
|
|
@@ -1928,16 +1928,17 @@ const Zn = (e) => {
|
|
|
1928
1928
|
role: "tooltip",
|
|
1929
1929
|
css: ye.tooltip,
|
|
1930
1930
|
style: {
|
|
1931
|
+
// eslint-disable-next-line no-restricted-syntax -- measured in px: physical by design
|
|
1931
1932
|
left: 0,
|
|
1932
1933
|
bottom: 0,
|
|
1933
|
-
transform:
|
|
1934
|
-
visibility:
|
|
1934
|
+
transform: m ? `translate(${m.x}px, ${m.y}px)` : void 0,
|
|
1935
|
+
visibility: m ? void 0 : "hidden"
|
|
1935
1936
|
},
|
|
1936
1937
|
children: o
|
|
1937
1938
|
}
|
|
1938
1939
|
)
|
|
1939
1940
|
] });
|
|
1940
|
-
},
|
|
1941
|
+
}, il = ({
|
|
1941
1942
|
event: e,
|
|
1942
1943
|
showHeaderBorder: o,
|
|
1943
1944
|
language: r,
|
|
@@ -1948,7 +1949,7 @@ const Zn = (e) => {
|
|
|
1948
1949
|
detail: c = null
|
|
1949
1950
|
}) => {
|
|
1950
1951
|
var u, C, _, k;
|
|
1951
|
-
const
|
|
1952
|
+
const m = Un(e), p = Vn(e.startsAt, r), b = jn(
|
|
1952
1953
|
e.startsAt,
|
|
1953
1954
|
r,
|
|
1954
1955
|
a.today,
|
|
@@ -1956,14 +1957,14 @@ const Zn = (e) => {
|
|
|
1956
1957
|
), g = e.status === "LIVE" || e.status === "FINISHED", h = (v, T) => {
|
|
1957
1958
|
const x = Number(v), I = Number(T);
|
|
1958
1959
|
return Number.isNaN(x) || Number.isNaN(I) || x === I || x > I ? "lead" : "trail";
|
|
1959
|
-
}, E = (v, T, x) => v ? /* @__PURE__ */ i(
|
|
1960
|
-
|
|
1960
|
+
}, E = (v, T, x) => v ? /* @__PURE__ */ i(rl, { short: v, full: T, tone: x }) : null, S = /* @__PURE__ */ i("div", { css: ye.statusRail, children: e.status === "UPCOMING" ? /* @__PURE__ */ f(B, { children: [
|
|
1961
|
+
p && /* @__PURE__ */ i("p", { css: ye.time, children: p }),
|
|
1961
1962
|
b && /* @__PURE__ */ i("p", { css: ye.day, children: b }),
|
|
1962
1963
|
E(e.statusLabelShort, e.statusLabel, "textSmall")
|
|
1963
1964
|
] }) : e.status === "LIVE" ? /* @__PURE__ */ f(B, { children: [
|
|
1964
1965
|
/* @__PURE__ */ i(Ri, {}),
|
|
1965
1966
|
E(
|
|
1966
|
-
|
|
1967
|
+
m ?? e.phaseLabel ?? e.statusLabelShort,
|
|
1967
1968
|
e.phaseLabelFull,
|
|
1968
1969
|
"danger"
|
|
1969
1970
|
)
|
|
@@ -1986,7 +1987,7 @@ const Zn = (e) => {
|
|
|
1986
1987
|
/* @__PURE__ */ i("p", { css: ye.name, children: v.name }),
|
|
1987
1988
|
g && /* @__PURE__ */ f("div", { css: ye.scores, children: [
|
|
1988
1989
|
e.isTennis && T.length > 0 && /* @__PURE__ */ f(B, { children: [
|
|
1989
|
-
/* @__PURE__ */ i(
|
|
1990
|
+
/* @__PURE__ */ i(el, { sets: T }),
|
|
1990
1991
|
/* @__PURE__ */ i("div", { css: ye.divider })
|
|
1991
1992
|
] }),
|
|
1992
1993
|
y(v, x),
|
|
@@ -2108,9 +2109,9 @@ const Zn = (e) => {
|
|
|
2108
2109
|
const l = Math.max(e.length, o.length);
|
|
2109
2110
|
if (l === 0) return null;
|
|
2110
2111
|
const d = (c) => {
|
|
2111
|
-
var
|
|
2112
|
-
const
|
|
2113
|
-
return /* @__PURE__ */ i("div", { css: rt.pip, children:
|
|
2112
|
+
var p, b;
|
|
2113
|
+
const m = (p = e[c]) != null && p.won ? "home" : (b = o[c]) != null && b.won ? "away" : null;
|
|
2114
|
+
return /* @__PURE__ */ i("div", { css: rt.pip, children: m && /* @__PURE__ */ i("div", { css: rt[m] }) }, c);
|
|
2114
2115
|
};
|
|
2115
2116
|
return /* @__PURE__ */ f(
|
|
2116
2117
|
"button",
|
|
@@ -2121,7 +2122,7 @@ const Zn = (e) => {
|
|
|
2121
2122
|
"aria-expanded": r,
|
|
2122
2123
|
css: rt.button,
|
|
2123
2124
|
children: [
|
|
2124
|
-
/* @__PURE__ */ i("div", { css: rt.pips, children: Array.from({ length: l }).map((c,
|
|
2125
|
+
/* @__PURE__ */ i("div", { css: rt.pips, children: Array.from({ length: l }).map((c, m) => d(m)) }),
|
|
2125
2126
|
/* @__PURE__ */ i(
|
|
2126
2127
|
lt,
|
|
2127
2128
|
{
|
|
@@ -2200,33 +2201,33 @@ const Zn = (e) => {
|
|
|
2200
2201
|
awaySets: a,
|
|
2201
2202
|
expanded: s
|
|
2202
2203
|
}) => {
|
|
2203
|
-
const { colors: l } = _e(), d = Math.max(r.length, a.length), c = (
|
|
2204
|
-
(
|
|
2205
|
-
(
|
|
2206
|
-
] }, b),
|
|
2204
|
+
const { colors: l } = _e(), d = Math.max(r.length, a.length), c = (p, b) => /* @__PURE__ */ f("div", { css: p != null && p.won ? Ee.won : Ee.lost, children: [
|
|
2205
|
+
(p == null ? void 0 : p.games) ?? "-",
|
|
2206
|
+
(p == null ? void 0 : p.tiebreak) != null && /* @__PURE__ */ i("sup", { css: Ee.tiebreak, children: p.tiebreak })
|
|
2207
|
+
] }, b), m = (p, b) => /* @__PURE__ */ f("div", { css: Ee.row, children: [
|
|
2207
2208
|
/* @__PURE__ */ f("div", { css: Ee.player, children: [
|
|
2208
2209
|
/* @__PURE__ */ i(
|
|
2209
2210
|
Ie,
|
|
2210
2211
|
{
|
|
2211
|
-
logoUrl:
|
|
2212
|
-
label:
|
|
2212
|
+
logoUrl: p.logoUrl,
|
|
2213
|
+
label: p.abbr,
|
|
2213
2214
|
sizeEm: 1.375,
|
|
2214
2215
|
shape: "circle",
|
|
2215
2216
|
bg: l.inner,
|
|
2216
2217
|
labelFontEm: 0.5625,
|
|
2217
2218
|
plainLogo: !0,
|
|
2218
|
-
avatar:
|
|
2219
|
-
flagUrl:
|
|
2220
|
-
alt:
|
|
2219
|
+
avatar: p.isAthlete,
|
|
2220
|
+
flagUrl: p.flagUrl,
|
|
2221
|
+
alt: p.name
|
|
2221
2222
|
}
|
|
2222
2223
|
),
|
|
2223
|
-
/* @__PURE__ */ i("p", { css: Ee.name, children:
|
|
2224
|
+
/* @__PURE__ */ i("p", { css: Ee.name, children: p.name })
|
|
2224
2225
|
] }),
|
|
2225
2226
|
/* @__PURE__ */ i("div", { css: Ee.cells, children: Array.from({ length: d }).map((g, h) => c(b[h], h)) })
|
|
2226
2227
|
] });
|
|
2227
2228
|
return /* @__PURE__ */ i("div", { css: s ? Ee.open : Ee.closed, children: /* @__PURE__ */ i("div", { css: Ee.clip, children: /* @__PURE__ */ f("div", { css: s ? Ee.shown : Ee.hidden, children: [
|
|
2228
|
-
|
|
2229
|
-
|
|
2229
|
+
m(e, r),
|
|
2230
|
+
m(o, a)
|
|
2230
2231
|
] }) }) });
|
|
2231
2232
|
}, pt = t({ display: "block", margin: 0, lineHeight: 1.5 }), Oo = t(pt, {
|
|
2232
2233
|
fontFamily: n.fontPrimary,
|
|
@@ -2300,7 +2301,7 @@ const Zn = (e) => {
|
|
|
2300
2301
|
justifyContent: "center",
|
|
2301
2302
|
marginTop: "0.375em"
|
|
2302
2303
|
})
|
|
2303
|
-
},
|
|
2304
|
+
}, al = ({
|
|
2304
2305
|
event: e,
|
|
2305
2306
|
language: o,
|
|
2306
2307
|
labels: r,
|
|
@@ -2309,7 +2310,7 @@ const Zn = (e) => {
|
|
|
2309
2310
|
predictions: l = null,
|
|
2310
2311
|
detail: d = null
|
|
2311
2312
|
}) => {
|
|
2312
|
-
const { colors: c } = _e(), [
|
|
2313
|
+
const { colors: c } = _e(), [m, p] = z(!1), b = Un(e), g = e.isTennis && Math.max(e.homeSets.length, e.awaySets.length) > 0, h = Vn(e.startsAt, o), E = jn(
|
|
2313
2314
|
e.startsAt,
|
|
2314
2315
|
o,
|
|
2315
2316
|
r.today,
|
|
@@ -2372,8 +2373,8 @@ const Zn = (e) => {
|
|
|
2372
2373
|
{
|
|
2373
2374
|
homeSets: e.homeSets,
|
|
2374
2375
|
awaySets: e.awaySets,
|
|
2375
|
-
expanded:
|
|
2376
|
-
onToggle: () =>
|
|
2376
|
+
expanded: m,
|
|
2377
|
+
onToggle: () => p((x) => !x),
|
|
2377
2378
|
label: r.sets
|
|
2378
2379
|
}
|
|
2379
2380
|
) }),
|
|
@@ -2384,7 +2385,7 @@ const Zn = (e) => {
|
|
|
2384
2385
|
away: e.away,
|
|
2385
2386
|
homeSets: e.homeSets,
|
|
2386
2387
|
awaySets: e.awaySets,
|
|
2387
|
-
expanded:
|
|
2388
|
+
expanded: m
|
|
2388
2389
|
}
|
|
2389
2390
|
)
|
|
2390
2391
|
] }),
|
|
@@ -2477,7 +2478,7 @@ const Zn = (e) => {
|
|
|
2477
2478
|
fullSlot: t(on, {
|
|
2478
2479
|
height: `${$n + nn + No}em`
|
|
2479
2480
|
})
|
|
2480
|
-
},
|
|
2481
|
+
}, sl = ({
|
|
2481
2482
|
event: e,
|
|
2482
2483
|
language: o,
|
|
2483
2484
|
labels: r,
|
|
@@ -2486,7 +2487,7 @@ const Zn = (e) => {
|
|
|
2486
2487
|
predictions: l = null,
|
|
2487
2488
|
detail: d = null
|
|
2488
2489
|
}) => {
|
|
2489
|
-
const { colors: c } = _e(), [
|
|
2490
|
+
const { colors: c } = _e(), [m, p] = z(!1), b = Un(e), g = e.isTennis && Math.max(e.homeSets.length, e.awaySets.length) > 0, h = Vn(e.startsAt, o), E = jn(
|
|
2490
2491
|
e.startsAt,
|
|
2491
2492
|
o,
|
|
2492
2493
|
r.today,
|
|
@@ -2543,8 +2544,8 @@ const Zn = (e) => {
|
|
|
2543
2544
|
{
|
|
2544
2545
|
homeSets: e.homeSets,
|
|
2545
2546
|
awaySets: e.awaySets,
|
|
2546
|
-
expanded:
|
|
2547
|
-
onToggle: () =>
|
|
2547
|
+
expanded: m,
|
|
2548
|
+
onToggle: () => p((k) => !k),
|
|
2548
2549
|
label: r.sets
|
|
2549
2550
|
}
|
|
2550
2551
|
) })
|
|
@@ -2564,7 +2565,7 @@ const Zn = (e) => {
|
|
|
2564
2565
|
away: e.away,
|
|
2565
2566
|
homeSets: e.homeSets,
|
|
2566
2567
|
awaySets: e.awaySets,
|
|
2567
|
-
expanded:
|
|
2568
|
+
expanded: m
|
|
2568
2569
|
}
|
|
2569
2570
|
)
|
|
2570
2571
|
] }),
|
|
@@ -2633,7 +2634,7 @@ const Zn = (e) => {
|
|
|
2633
2634
|
own: t(an, { color: n.primary }),
|
|
2634
2635
|
plain: t(an, { color: n.text })
|
|
2635
2636
|
}
|
|
2636
|
-
},
|
|
2637
|
+
}, ll = ({
|
|
2637
2638
|
outcomes: e,
|
|
2638
2639
|
legends: o,
|
|
2639
2640
|
thicknessEm: r,
|
|
@@ -2642,12 +2643,12 @@ const Zn = (e) => {
|
|
|
2642
2643
|
actualLabel: l,
|
|
2643
2644
|
ownLabel: d
|
|
2644
2645
|
}) => {
|
|
2645
|
-
const [c,
|
|
2646
|
+
const [c, m] = z(!1);
|
|
2646
2647
|
Ce(() => {
|
|
2647
|
-
const h = setTimeout(() =>
|
|
2648
|
+
const h = setTimeout(() => m(!0), 60);
|
|
2648
2649
|
return () => clearTimeout(h);
|
|
2649
2650
|
}, []);
|
|
2650
|
-
const
|
|
2651
|
+
const p = Ii(e), b = (h) => h.isActual ? "actual" : "other", g = (h) => h.isActual ? 1 : $i(p.get(h.key) ?? 0);
|
|
2651
2652
|
return /* @__PURE__ */ f("div", { css: Ue.root, children: [
|
|
2652
2653
|
/* @__PURE__ */ i("div", { css: Ue.track, style: { height: `${r}em` }, children: e.map((h) => /* @__PURE__ */ i(
|
|
2653
2654
|
"div",
|
|
@@ -2742,7 +2743,7 @@ const Zn = (e) => {
|
|
|
2742
2743
|
correct: t(sn, { color: n.success }),
|
|
2743
2744
|
wrong: t(sn, { color: n.dim })
|
|
2744
2745
|
}
|
|
2745
|
-
},
|
|
2746
|
+
}, cl = ({
|
|
2746
2747
|
outcomes: e,
|
|
2747
2748
|
leaderLabel: o,
|
|
2748
2749
|
leaderPercentage: r,
|
|
@@ -2751,12 +2752,12 @@ const Zn = (e) => {
|
|
|
2751
2752
|
labelEm: l,
|
|
2752
2753
|
widthEm: d
|
|
2753
2754
|
}) => {
|
|
2754
|
-
const [c,
|
|
2755
|
+
const [c, m] = z(!1);
|
|
2755
2756
|
Ce(() => {
|
|
2756
|
-
const g = setTimeout(() =>
|
|
2757
|
+
const g = setTimeout(() => m(!0), 60);
|
|
2757
2758
|
return () => clearTimeout(g);
|
|
2758
2759
|
}, []);
|
|
2759
|
-
const
|
|
2760
|
+
const p = we(() => Ii(e), [e]), b = a === null ? "plain" : a ? "correct" : "wrong";
|
|
2760
2761
|
return /* @__PURE__ */ f("div", { css: Ve.root, children: [
|
|
2761
2762
|
o && /* @__PURE__ */ f("div", { css: Ve.leaderCell, style: { minWidth: `${d}em` }, children: [
|
|
2762
2763
|
a && /* @__PURE__ */ i(Gt, { size: `${l * 1.15}em`, color: n.success }),
|
|
@@ -2780,7 +2781,7 @@ const Zn = (e) => {
|
|
|
2780
2781
|
css: g.isActual ? Ve.actual : Ve.other,
|
|
2781
2782
|
style: {
|
|
2782
2783
|
flex: c ? `0 0 ${g.percentage}%` : "0 0 0%",
|
|
2783
|
-
opacity: $i(
|
|
2784
|
+
opacity: $i(p.get(g.key) ?? 0)
|
|
2784
2785
|
}
|
|
2785
2786
|
},
|
|
2786
2787
|
g.key
|
|
@@ -2915,7 +2916,7 @@ const Zn = (e) => {
|
|
|
2915
2916
|
},
|
|
2916
2917
|
chevron: t(Bo, { transform: "none" }),
|
|
2917
2918
|
chevronOpen: t(Bo, { transform: "rotate(180deg)" })
|
|
2918
|
-
},
|
|
2919
|
+
}, dl = ({
|
|
2919
2920
|
outcomes: e,
|
|
2920
2921
|
labels: o,
|
|
2921
2922
|
hiddenOutcomes: r,
|
|
@@ -2924,8 +2925,8 @@ const Zn = (e) => {
|
|
|
2924
2925
|
labelEm: l,
|
|
2925
2926
|
graded: d,
|
|
2926
2927
|
actualLabel: c,
|
|
2927
|
-
ownLabel:
|
|
2928
|
-
moreLabel:
|
|
2928
|
+
ownLabel: m,
|
|
2929
|
+
moreLabel: p,
|
|
2929
2930
|
lessLabel: b
|
|
2930
2931
|
}) => {
|
|
2931
2932
|
const { colors: g, tint: h } = _e(), [E, S] = z(!1);
|
|
@@ -2938,7 +2939,7 @@ const Zn = (e) => {
|
|
|
2938
2939
|
return /* @__PURE__ */ f(
|
|
2939
2940
|
"div",
|
|
2940
2941
|
{
|
|
2941
|
-
title: v.isOwn ?
|
|
2942
|
+
title: v.isOwn ? m : void 0,
|
|
2942
2943
|
css: x ? ce.rowSpaced : ce.row,
|
|
2943
2944
|
style: {
|
|
2944
2945
|
// The highlight is the own-pick marker, so it only appears there — but it follows the row's
|
|
@@ -2985,13 +2986,13 @@ const Zn = (e) => {
|
|
|
2985
2986
|
r.length > 0 && /* @__PURE__ */ i("div", { css: y ? ce.tailOpen : ce.tail, children: /* @__PURE__ */ i("div", { css: ce.clip, children: /* @__PURE__ */ i("div", { css: ce.list, children: r.map(
|
|
2986
2987
|
(v, T) => u(v, a[T], !0)
|
|
2987
2988
|
) }) }) }),
|
|
2988
|
-
|
|
2989
|
+
p && /* @__PURE__ */ f(
|
|
2989
2990
|
"button",
|
|
2990
2991
|
{
|
|
2991
2992
|
type: "button",
|
|
2992
2993
|
onClick: () => w((v) => !v),
|
|
2993
2994
|
"aria-expanded": y,
|
|
2994
|
-
title: _ && !y ?
|
|
2995
|
+
title: _ && !y ? m : void 0,
|
|
2995
2996
|
css: ce.toggle,
|
|
2996
2997
|
children: [
|
|
2997
2998
|
C && !y && /* @__PURE__ */ i(
|
|
@@ -3010,7 +3011,7 @@ const Zn = (e) => {
|
|
|
3010
3011
|
{
|
|
3011
3012
|
css: ce.toggleLabel[y ? "plain" : k],
|
|
3012
3013
|
style: { fontSize: `${l * 0.9}em` },
|
|
3013
|
-
children: y ? b :
|
|
3014
|
+
children: y ? b : p
|
|
3014
3015
|
}
|
|
3015
3016
|
),
|
|
3016
3017
|
/* @__PURE__ */ i(
|
|
@@ -3024,7 +3025,7 @@ const Zn = (e) => {
|
|
|
3024
3025
|
}
|
|
3025
3026
|
)
|
|
3026
3027
|
] });
|
|
3027
|
-
},
|
|
3028
|
+
}, ul = ({
|
|
3028
3029
|
summary: e,
|
|
3029
3030
|
labels: o,
|
|
3030
3031
|
spec: r
|
|
@@ -3035,7 +3036,7 @@ const Zn = (e) => {
|
|
|
3035
3036
|
(l) => l.key === e.leaderKey
|
|
3036
3037
|
) ?? null : null;
|
|
3037
3038
|
return /* @__PURE__ */ i(
|
|
3038
|
-
|
|
3039
|
+
cl,
|
|
3039
3040
|
{
|
|
3040
3041
|
outcomes: e.outcomes,
|
|
3041
3042
|
leaderLabel: s ? a(s.key) : null,
|
|
@@ -3047,12 +3048,12 @@ const Zn = (e) => {
|
|
|
3047
3048
|
}
|
|
3048
3049
|
);
|
|
3049
3050
|
}
|
|
3050
|
-
if (
|
|
3051
|
+
if (Gs(e.kind)) {
|
|
3051
3052
|
const s = e.outcomes.map((l) => ({
|
|
3052
3053
|
label: a(l.key)
|
|
3053
3054
|
}));
|
|
3054
3055
|
return /* @__PURE__ */ i(
|
|
3055
|
-
|
|
3056
|
+
ll,
|
|
3056
3057
|
{
|
|
3057
3058
|
outcomes: e.outcomes,
|
|
3058
3059
|
legends: s,
|
|
@@ -3065,7 +3066,7 @@ const Zn = (e) => {
|
|
|
3065
3066
|
);
|
|
3066
3067
|
}
|
|
3067
3068
|
return /* @__PURE__ */ i(
|
|
3068
|
-
|
|
3069
|
+
dl,
|
|
3069
3070
|
{
|
|
3070
3071
|
outcomes: e.outcomes,
|
|
3071
3072
|
labels: e.outcomes.map((s) => a(s.key)),
|
|
@@ -3114,7 +3115,7 @@ const Zn = (e) => {
|
|
|
3114
3115
|
}),
|
|
3115
3116
|
total: t(Uo, { fontWeight: 600, color: n.dim }),
|
|
3116
3117
|
share: t(Uo, { fontWeight: 700, color: n.success })
|
|
3117
|
-
},
|
|
3118
|
+
}, ml = ({
|
|
3118
3119
|
summary: e,
|
|
3119
3120
|
labels: o,
|
|
3120
3121
|
spec: r
|
|
@@ -3135,7 +3136,7 @@ const Zn = (e) => {
|
|
|
3135
3136
|
o.correctShare(e.actualShare)
|
|
3136
3137
|
] })
|
|
3137
3138
|
] }),
|
|
3138
|
-
/* @__PURE__ */ i(
|
|
3139
|
+
/* @__PURE__ */ i(ul, { summary: e, labels: o, spec: r })
|
|
3139
3140
|
] });
|
|
3140
3141
|
}, Vo = t({
|
|
3141
3142
|
flexShrink: 0,
|
|
@@ -3204,13 +3205,13 @@ const Zn = (e) => {
|
|
|
3204
3205
|
warning: t(pn, { color: n.warning }),
|
|
3205
3206
|
danger: t(pn, { color: n.danger })
|
|
3206
3207
|
}
|
|
3207
|
-
},
|
|
3208
|
+
}, pl = ({
|
|
3208
3209
|
prediction: e,
|
|
3209
3210
|
pointsLabel: o
|
|
3210
3211
|
}) => {
|
|
3211
3212
|
const { colors: r, tint: a } = _e();
|
|
3212
3213
|
if (e.status !== "SETTLED") return null;
|
|
3213
|
-
const s = e.outcome === "CORRECT", l = e.outcome === "PARTIALLY_CORRECT", d = s ? "success" : l ? "warning" : "danger", c = r[d],
|
|
3214
|
+
const s = e.outcome === "CORRECT", l = e.outcome === "PARTIALLY_CORRECT", d = s ? "success" : l ? "warning" : "danger", c = r[d], m = e.points ?? 0, p = s ? /* @__PURE__ */ i(
|
|
3214
3215
|
"svg",
|
|
3215
3216
|
{
|
|
3216
3217
|
width: "1em",
|
|
@@ -3263,16 +3264,16 @@ const Zn = (e) => {
|
|
|
3263
3264
|
css: Xo[d],
|
|
3264
3265
|
style: { borderColor: a(c, 0.38), backgroundColor: a(c, 0.12) },
|
|
3265
3266
|
children: [
|
|
3266
|
-
|
|
3267
|
+
p,
|
|
3267
3268
|
/* @__PURE__ */ f("p", { css: Xo.points[d], children: [
|
|
3268
|
-
|
|
3269
|
+
m > 0 ? Bt(`+${m}`) : Bt(m),
|
|
3269
3270
|
" ",
|
|
3270
3271
|
o
|
|
3271
3272
|
] })
|
|
3272
3273
|
]
|
|
3273
3274
|
}
|
|
3274
3275
|
);
|
|
3275
|
-
}, Pi = 1.75, Wi = 2.5,
|
|
3276
|
+
}, Pi = 1.75, Wi = 2.5, hl = t({
|
|
3276
3277
|
display: "flex",
|
|
3277
3278
|
alignItems: "center",
|
|
3278
3279
|
justifyContent: "center",
|
|
@@ -3288,7 +3289,7 @@ const Zn = (e) => {
|
|
|
3288
3289
|
"&:focus-visible": { outline: `2px solid ${n.primary}`, outlineOffset: "0.0625em" }
|
|
3289
3290
|
}), Rt = (e) => {
|
|
3290
3291
|
const o = e ? 1 : 1.2;
|
|
3291
|
-
return t(
|
|
3292
|
+
return t(hl, {
|
|
3292
3293
|
width: `${Pi * o}em`,
|
|
3293
3294
|
"@media (hover: none)": { width: `${Wi * o}em` }
|
|
3294
3295
|
});
|
|
@@ -3321,8 +3322,8 @@ const Zn = (e) => {
|
|
|
3321
3322
|
orientation: d = "vertical",
|
|
3322
3323
|
numberEm: c = 1.375
|
|
3323
3324
|
}) => {
|
|
3324
|
-
const
|
|
3325
|
-
const E =
|
|
3325
|
+
const m = d === "horizontal", p = (h) => Math.max(r, Math.min(a, h)), b = (h) => {
|
|
3326
|
+
const E = p(e + (h === "increment" ? 1 : -1)), S = E === e, y = m ? h === "increment" ? ga : ya : h === "increment" ? ba : lt;
|
|
3326
3327
|
return /* @__PURE__ */ i(
|
|
3327
3328
|
"button",
|
|
3328
3329
|
{
|
|
@@ -3331,11 +3332,11 @@ const Zn = (e) => {
|
|
|
3331
3332
|
disabled: s || S,
|
|
3332
3333
|
"aria-label": `${h === "increment" ? "+1" : "-1"} ${l}`,
|
|
3333
3334
|
css: Lt.arrow[d][s || S ? "off" : "on"],
|
|
3334
|
-
children: /* @__PURE__ */ i(y, { size: "1.5em" })
|
|
3335
|
+
children: m ? /* @__PURE__ */ i(ca, { children: /* @__PURE__ */ i(y, { size: "1.5em" }) }) : /* @__PURE__ */ i(y, { size: "1.5em" })
|
|
3335
3336
|
}
|
|
3336
3337
|
);
|
|
3337
3338
|
}, g = /* @__PURE__ */ i("p", { css: Lt.number, style: { fontSize: `${c}em` }, children: e });
|
|
3338
|
-
return /* @__PURE__ */ i("div", { css:
|
|
3339
|
+
return /* @__PURE__ */ i("div", { css: m ? Lt.line : Lt.stack, children: m ? /* @__PURE__ */ f(B, { children: [
|
|
3339
3340
|
b("decrement"),
|
|
3340
3341
|
g,
|
|
3341
3342
|
b("increment")
|
|
@@ -3344,30 +3345,30 @@ const Zn = (e) => {
|
|
|
3344
3345
|
g,
|
|
3345
3346
|
b("decrement")
|
|
3346
3347
|
] }) });
|
|
3347
|
-
},
|
|
3348
|
+
}, fl = 0, gl = 30, yl = t({
|
|
3348
3349
|
display: "flex",
|
|
3349
3350
|
alignItems: "center",
|
|
3350
3351
|
justifyContent: "center",
|
|
3351
3352
|
gap: n.spaceSm
|
|
3352
|
-
}),
|
|
3353
|
+
}), bl = ({
|
|
3353
3354
|
value: e,
|
|
3354
3355
|
onChange: o,
|
|
3355
3356
|
disabled: r = !1,
|
|
3356
3357
|
ariaLabel: a,
|
|
3357
3358
|
spec: s
|
|
3358
|
-
}) => /* @__PURE__ */ i("div", { css:
|
|
3359
|
+
}) => /* @__PURE__ */ i("div", { css: yl, children: /* @__PURE__ */ i(
|
|
3359
3360
|
Nn,
|
|
3360
3361
|
{
|
|
3361
3362
|
value: e ?? 0,
|
|
3362
3363
|
onChange: o,
|
|
3363
|
-
min:
|
|
3364
|
-
max:
|
|
3364
|
+
min: fl,
|
|
3365
|
+
max: gl,
|
|
3365
3366
|
disabled: r,
|
|
3366
3367
|
ariaLabel: a,
|
|
3367
3368
|
orientation: s.stepperOrientation,
|
|
3368
3369
|
numberEm: s.numberEm
|
|
3369
3370
|
}
|
|
3370
|
-
) }),
|
|
3371
|
+
) }), wl = t({
|
|
3371
3372
|
display: "flex",
|
|
3372
3373
|
alignItems: "center",
|
|
3373
3374
|
gap: "0.25em",
|
|
@@ -3383,7 +3384,7 @@ const Zn = (e) => {
|
|
|
3383
3384
|
for (const e of [!0, !1])
|
|
3384
3385
|
for (const o of [!0, !1])
|
|
3385
3386
|
for (const r of [!0, !1])
|
|
3386
|
-
zi[`${e}|${o}|${r}`] = t(
|
|
3387
|
+
zi[`${e}|${o}|${r}`] = t(wl, {
|
|
3387
3388
|
borderColor: e ? n.primary : o ? "transparent" : n.border,
|
|
3388
3389
|
backgroundColor: e ? n.primary10 : "transparent",
|
|
3389
3390
|
color: e ? n.primary : n.text,
|
|
@@ -3405,7 +3406,7 @@ const gt = ({
|
|
|
3405
3406
|
fixedWidth: l = !1,
|
|
3406
3407
|
frameless: d = !1,
|
|
3407
3408
|
alignTop: c = !1,
|
|
3408
|
-
children:
|
|
3409
|
+
children: m
|
|
3409
3410
|
}) => /* @__PURE__ */ i(
|
|
3410
3411
|
"button",
|
|
3411
3412
|
{
|
|
@@ -3422,9 +3423,9 @@ const gt = ({
|
|
|
3422
3423
|
justifyContent: c ? "flex-start" : "center",
|
|
3423
3424
|
padding: s ? "0.3em 0.5em" : "0.5em 0.375em"
|
|
3424
3425
|
},
|
|
3425
|
-
children:
|
|
3426
|
+
children: m
|
|
3426
3427
|
}
|
|
3427
|
-
),
|
|
3428
|
+
), xl = 0.25, Qo = t({
|
|
3428
3429
|
// Spans the row so the tiles below it read as its group.
|
|
3429
3430
|
gridColumn: "1 / -1",
|
|
3430
3431
|
display: "flex",
|
|
@@ -3438,7 +3439,7 @@ const gt = ({
|
|
|
3438
3439
|
textAlign: "center",
|
|
3439
3440
|
overflowWrap: "break-word",
|
|
3440
3441
|
maxWidth: "100%"
|
|
3441
|
-
}),
|
|
3442
|
+
}), Te = {
|
|
3442
3443
|
root: t({ display: "flex", flexDirection: "column", gap: n.spaceXs }),
|
|
3443
3444
|
search: t({
|
|
3444
3445
|
display: "flex",
|
|
@@ -3470,7 +3471,7 @@ const gt = ({
|
|
|
3470
3471
|
color: n.dim,
|
|
3471
3472
|
textAlign: "center"
|
|
3472
3473
|
}),
|
|
3473
|
-
heading: t(Qo, { marginTop: `${
|
|
3474
|
+
heading: t(Qo, { marginTop: `${xl}em` }),
|
|
3474
3475
|
// The first heading normally sits flush, but a search box above it is something to separate from
|
|
3475
3476
|
// — so it takes the same gap the next team's heading gets.
|
|
3476
3477
|
headingFlush: t(Qo, { marginTop: 0 }),
|
|
@@ -3496,8 +3497,8 @@ const gt = ({
|
|
|
3496
3497
|
minTileEm: l,
|
|
3497
3498
|
searchable: d = !1,
|
|
3498
3499
|
searchPlaceholder: c,
|
|
3499
|
-
noResultsLabel:
|
|
3500
|
-
maxHeightEm:
|
|
3500
|
+
noResultsLabel: m,
|
|
3501
|
+
maxHeightEm: p,
|
|
3501
3502
|
plainTiles: b = !1,
|
|
3502
3503
|
alignTop: g = !1
|
|
3503
3504
|
}) => {
|
|
@@ -3505,8 +3506,8 @@ const gt = ({
|
|
|
3505
3506
|
const y = h.trim().toLowerCase();
|
|
3506
3507
|
return y ? e.filter((w) => w.label.toLowerCase().includes(y)) : e;
|
|
3507
3508
|
}, [e, h]);
|
|
3508
|
-
return /* @__PURE__ */ f("div", { css:
|
|
3509
|
-
d && /* @__PURE__ */ f("div", { css:
|
|
3509
|
+
return /* @__PURE__ */ f("div", { css: Te.root, children: [
|
|
3510
|
+
d && /* @__PURE__ */ f("div", { css: Te.search, children: [
|
|
3510
3511
|
/* @__PURE__ */ i(si, { size: "1em", color: n.dim }),
|
|
3511
3512
|
/* @__PURE__ */ i(
|
|
3512
3513
|
"input",
|
|
@@ -3515,7 +3516,7 @@ const gt = ({
|
|
|
3515
3516
|
onChange: (y) => E(y.target.value),
|
|
3516
3517
|
placeholder: c,
|
|
3517
3518
|
"aria-label": c,
|
|
3518
|
-
css:
|
|
3519
|
+
css: Te.input,
|
|
3519
3520
|
style: { fontSize: `${s}em` }
|
|
3520
3521
|
}
|
|
3521
3522
|
)
|
|
@@ -3523,20 +3524,20 @@ const gt = ({
|
|
|
3523
3524
|
/* @__PURE__ */ f(
|
|
3524
3525
|
"div",
|
|
3525
3526
|
{
|
|
3526
|
-
css:
|
|
3527
|
+
css: Te.grid,
|
|
3527
3528
|
style: {
|
|
3528
3529
|
gridTemplateColumns: `repeat(auto-fit, minmax(${l}em, 1fr))`,
|
|
3529
|
-
...
|
|
3530
|
+
...p ? { maxHeight: `${p}em`, overflowY: "auto" } : {}
|
|
3530
3531
|
},
|
|
3531
3532
|
children: [
|
|
3532
|
-
S.length === 0 && /* @__PURE__ */ i("p", { css:
|
|
3533
|
+
S.length === 0 && /* @__PURE__ */ i("p", { css: Te.empty, children: m }),
|
|
3533
3534
|
S.map((y, w) => {
|
|
3534
3535
|
var _;
|
|
3535
3536
|
const u = y.group && y.group !== ((_ = S[w - 1]) == null ? void 0 : _.group) ? y.group : null, C = y.value === o;
|
|
3536
3537
|
return /* @__PURE__ */ f(Q.Fragment, { children: [
|
|
3537
|
-
u && /* @__PURE__ */ f("div", { css: w === 0 && !d ?
|
|
3538
|
+
u && /* @__PURE__ */ f("div", { css: w === 0 && !d ? Te.headingFlush : Te.heading, children: [
|
|
3538
3539
|
y.groupAdornment,
|
|
3539
|
-
/* @__PURE__ */ i("p", { css:
|
|
3540
|
+
/* @__PURE__ */ i("p", { css: Te.headingText, children: u })
|
|
3540
3541
|
] }),
|
|
3541
3542
|
/* @__PURE__ */ f(
|
|
3542
3543
|
gt,
|
|
@@ -3552,7 +3553,7 @@ const gt = ({
|
|
|
3552
3553
|
/* @__PURE__ */ i(
|
|
3553
3554
|
"p",
|
|
3554
3555
|
{
|
|
3555
|
-
css: C ?
|
|
3556
|
+
css: C ? Te.tileLabelSelected : Te.tileLabel,
|
|
3556
3557
|
style: { fontSize: `${s}em` },
|
|
3557
3558
|
children: y.label
|
|
3558
3559
|
}
|
|
@@ -3665,7 +3666,7 @@ const gt = ({
|
|
|
3665
3666
|
optionSelected: t(or, { backgroundColor: n.primary12 }),
|
|
3666
3667
|
optionLabel: t(rr, { fontWeight: 500, color: n.text }),
|
|
3667
3668
|
optionLabelSelected: t(rr, { fontWeight: 700, color: n.primary })
|
|
3668
|
-
},
|
|
3669
|
+
}, Sl = {
|
|
3669
3670
|
picked: {
|
|
3670
3671
|
on: t(te.trigger.picked, te.triggerOn),
|
|
3671
3672
|
off: t(te.trigger.picked, { cursor: "default", opacity: 0.5 })
|
|
@@ -3683,10 +3684,10 @@ const gt = ({
|
|
|
3683
3684
|
labelEm: l,
|
|
3684
3685
|
optionEm: d = l,
|
|
3685
3686
|
align: c = "left",
|
|
3686
|
-
searchable:
|
|
3687
|
-
noResultsLabel:
|
|
3687
|
+
searchable: m = !1,
|
|
3688
|
+
noResultsLabel: p
|
|
3688
3689
|
}) => {
|
|
3689
|
-
const b = fi(), { shadowRootElement: g } = Ji(
|
|
3690
|
+
const b = fi(), { shadowRootElement: g } = Ji(da), [h, E] = z(!1), [S, y] = z(""), [w, u] = z(null), C = Ae(null), _ = Ae(null), k = Ae(null), v = Ae(null), T = Fe(() => {
|
|
3690
3691
|
const O = _.current;
|
|
3691
3692
|
O && u(O.getBoundingClientRect());
|
|
3692
3693
|
}, []);
|
|
@@ -3724,7 +3725,7 @@ const gt = ({
|
|
|
3724
3725
|
disabled: a,
|
|
3725
3726
|
"aria-haspopup": "listbox",
|
|
3726
3727
|
"aria-expanded": h,
|
|
3727
|
-
css:
|
|
3728
|
+
css: Sl[x ? "picked" : "empty"][a ? "off" : "on"],
|
|
3728
3729
|
children: [
|
|
3729
3730
|
x == null ? void 0 : x.adornment,
|
|
3730
3731
|
/* @__PURE__ */ i(
|
|
@@ -3746,7 +3747,7 @@ const gt = ({
|
|
|
3746
3747
|
]
|
|
3747
3748
|
}
|
|
3748
3749
|
),
|
|
3749
|
-
h && w &&
|
|
3750
|
+
h && w && ka(
|
|
3750
3751
|
/* @__PURE__ */ f(
|
|
3751
3752
|
"div",
|
|
3752
3753
|
{
|
|
@@ -3760,7 +3761,7 @@ const gt = ({
|
|
|
3760
3761
|
minWidth: `${Math.max(w.width, 176)}px`
|
|
3761
3762
|
},
|
|
3762
3763
|
children: [
|
|
3763
|
-
|
|
3764
|
+
m && /* @__PURE__ */ f("div", { css: te.search, children: [
|
|
3764
3765
|
/* @__PURE__ */ i(si, { size: "1em", color: n.dim }),
|
|
3765
3766
|
/* @__PURE__ */ i(
|
|
3766
3767
|
"input",
|
|
@@ -3776,7 +3777,7 @@ const gt = ({
|
|
|
3776
3777
|
)
|
|
3777
3778
|
] }),
|
|
3778
3779
|
/* @__PURE__ */ f("div", { role: "listbox", css: te.list, children: [
|
|
3779
|
-
I.length === 0 && /* @__PURE__ */ i("p", { css: te.empty, children:
|
|
3780
|
+
I.length === 0 && /* @__PURE__ */ i("p", { css: te.empty, children: p }),
|
|
3780
3781
|
I.map((O, $) => {
|
|
3781
3782
|
var A;
|
|
3782
3783
|
const V = O.group && O.group !== ((A = I[$ - 1]) == null ? void 0 : A.group) ? O.group : null, R = O.value === o;
|
|
@@ -3818,7 +3819,7 @@ const gt = ({
|
|
|
3818
3819
|
g ?? C.current
|
|
3819
3820
|
)
|
|
3820
3821
|
] });
|
|
3821
|
-
},
|
|
3822
|
+
}, vl = ["1x", "12", "x2"], El = ({
|
|
3822
3823
|
home: e,
|
|
3823
3824
|
away: o,
|
|
3824
3825
|
value: r,
|
|
@@ -3827,16 +3828,16 @@ const gt = ({
|
|
|
3827
3828
|
drawLabel: l,
|
|
3828
3829
|
orLabel: d,
|
|
3829
3830
|
placeholder: c,
|
|
3830
|
-
spec:
|
|
3831
|
+
spec: m
|
|
3831
3832
|
}) => {
|
|
3832
|
-
const
|
|
3833
|
+
const p = (g) => {
|
|
3833
3834
|
const h = (y) => y === "1" ? e.name : y === "2" ? o.name : l, [E, S] = g.split("");
|
|
3834
3835
|
return `${h(E)} ${d} ${h(S)}`;
|
|
3835
|
-
}, b =
|
|
3836
|
+
}, b = vl.map((g) => ({
|
|
3836
3837
|
value: g,
|
|
3837
|
-
label:
|
|
3838
|
+
label: p(g)
|
|
3838
3839
|
}));
|
|
3839
|
-
return
|
|
3840
|
+
return m.inlineRow ? /* @__PURE__ */ i(
|
|
3840
3841
|
Qn,
|
|
3841
3842
|
{
|
|
3842
3843
|
options: b,
|
|
@@ -3844,8 +3845,8 @@ const gt = ({
|
|
|
3844
3845
|
onChange: (g) => a(g),
|
|
3845
3846
|
disabled: s,
|
|
3846
3847
|
placeholder: c,
|
|
3847
|
-
labelEm:
|
|
3848
|
-
optionEm:
|
|
3848
|
+
labelEm: m.optionLabelEm,
|
|
3849
|
+
optionEm: m.valueEm,
|
|
3849
3850
|
align: "right"
|
|
3850
3851
|
}
|
|
3851
3852
|
) : /* @__PURE__ */ i(
|
|
@@ -3855,11 +3856,11 @@ const gt = ({
|
|
|
3855
3856
|
value: r,
|
|
3856
3857
|
onChange: (g) => a(g),
|
|
3857
3858
|
disabled: s,
|
|
3858
|
-
optionEm:
|
|
3859
|
+
optionEm: m.optionLabelEm,
|
|
3859
3860
|
minTileEm: 8
|
|
3860
3861
|
}
|
|
3861
3862
|
);
|
|
3862
|
-
}, ar = ["1", "x", "2"],
|
|
3863
|
+
}, ar = ["1", "x", "2"], Cl = ({
|
|
3863
3864
|
home: e,
|
|
3864
3865
|
away: o,
|
|
3865
3866
|
value: r,
|
|
@@ -3869,16 +3870,16 @@ const gt = ({
|
|
|
3869
3870
|
placeholder: d,
|
|
3870
3871
|
spec: c
|
|
3871
3872
|
}) => {
|
|
3872
|
-
const
|
|
3873
|
+
const m = (b) => b === "1" ? e.name : b === "2" ? o.name : l, p = ar.flatMap(
|
|
3873
3874
|
(b) => ar.map((g) => ({
|
|
3874
3875
|
value: `${b}/${g}`,
|
|
3875
|
-
label: `${
|
|
3876
|
+
label: `${m(b)} / ${m(g)}`
|
|
3876
3877
|
}))
|
|
3877
3878
|
);
|
|
3878
3879
|
return c.inlineRow ? /* @__PURE__ */ i(
|
|
3879
3880
|
Qn,
|
|
3880
3881
|
{
|
|
3881
|
-
options:
|
|
3882
|
+
options: p,
|
|
3882
3883
|
value: r,
|
|
3883
3884
|
onChange: (b) => a(b),
|
|
3884
3885
|
disabled: s,
|
|
@@ -3890,7 +3891,7 @@ const gt = ({
|
|
|
3890
3891
|
) : /* @__PURE__ */ i(
|
|
3891
3892
|
Yn,
|
|
3892
3893
|
{
|
|
3893
|
-
options:
|
|
3894
|
+
options: p,
|
|
3894
3895
|
value: r,
|
|
3895
3896
|
onChange: (b) => a(b),
|
|
3896
3897
|
disabled: s,
|
|
@@ -3927,7 +3928,7 @@ const gt = ({
|
|
|
3927
3928
|
extras: t({ display: "flex", gap: n.spaceXs, alignItems: "stretch" }),
|
|
3928
3929
|
extraLabel: t(sr, { fontWeight: 500, color: n.text }),
|
|
3929
3930
|
extraLabelSelected: t(sr, { fontWeight: 700, color: n.primary })
|
|
3930
|
-
},
|
|
3931
|
+
}, _l = (e, o) => /* @__PURE__ */ i("div", { css: Ze.headshot, style: { width: `${o}em`, height: `${o}em` }, children: e.headshotUrl ? /* @__PURE__ */ i("img", { src: e.headshotUrl, alt: e.name, css: Ze.photo }) : /* @__PURE__ */ i(wa, { size: `${o * 0.6}em`, color: n.dim }) }), kl = ({
|
|
3931
3932
|
players: e,
|
|
3932
3933
|
loading: o,
|
|
3933
3934
|
home: r,
|
|
@@ -3936,12 +3937,12 @@ const gt = ({
|
|
|
3936
3937
|
onChange: l,
|
|
3937
3938
|
disabled: d = !1,
|
|
3938
3939
|
allowNobody: c,
|
|
3939
|
-
labels:
|
|
3940
|
-
spec:
|
|
3940
|
+
labels: m,
|
|
3941
|
+
spec: p
|
|
3941
3942
|
}) => {
|
|
3942
|
-
const b = !
|
|
3943
|
-
{ value: Pn, label:
|
|
3944
|
-
{ value: Qt, label:
|
|
3943
|
+
const b = !p.inlineRow, g = b ? p.crestEm * 1.75 : p.crestEm, h = c ? [
|
|
3944
|
+
{ value: Pn, label: m.noGoal },
|
|
3945
|
+
{ value: Qt, label: m.ownGoal }
|
|
3945
3946
|
] : [], E = [];
|
|
3946
3947
|
return ["home", "away"].forEach((S) => {
|
|
3947
3948
|
const y = S === "home" ? r : a, w = e.filter((C) => C.side === S), u = /* @__PURE__ */ i(at, { competitor: y, sizeEm: 1.25 });
|
|
@@ -3951,10 +3952,10 @@ const gt = ({
|
|
|
3951
3952
|
label: C.shirtNumber ? `${C.shirtNumber}. ${C.name}` : C.name,
|
|
3952
3953
|
group: y.name,
|
|
3953
3954
|
groupAdornment: u,
|
|
3954
|
-
adornment:
|
|
3955
|
+
adornment: _l(C, g)
|
|
3955
3956
|
});
|
|
3956
3957
|
});
|
|
3957
|
-
}), o && e.length === 0 ? /* @__PURE__ */ i("p", { css: Ze.loading, style: { fontSize: `${
|
|
3958
|
+
}), o && e.length === 0 ? /* @__PURE__ */ i("p", { css: Ze.loading, style: { fontSize: `${p.optionLabelEm}em` }, children: m.placeholder }) : b ? /* @__PURE__ */ f("div", { css: Ze.stack, children: [
|
|
3958
3959
|
h.length > 0 && /* @__PURE__ */ i("div", { css: Ze.extras, children: h.map((S) => {
|
|
3959
3960
|
const y = s === S.value;
|
|
3960
3961
|
return /* @__PURE__ */ i(
|
|
@@ -3967,7 +3968,7 @@ const gt = ({
|
|
|
3967
3968
|
"p",
|
|
3968
3969
|
{
|
|
3969
3970
|
css: y ? Ze.extraLabelSelected : Ze.extraLabel,
|
|
3970
|
-
style: { fontSize: `${
|
|
3971
|
+
style: { fontSize: `${p.optionLabelEm}em` },
|
|
3971
3972
|
children: S.label
|
|
3972
3973
|
}
|
|
3973
3974
|
)
|
|
@@ -3982,11 +3983,11 @@ const gt = ({
|
|
|
3982
3983
|
value: s,
|
|
3983
3984
|
onChange: l,
|
|
3984
3985
|
disabled: d || E.length === 0,
|
|
3985
|
-
optionEm:
|
|
3986
|
-
minTileEm:
|
|
3986
|
+
optionEm: p.optionLabelEm,
|
|
3987
|
+
minTileEm: p.crestEm * 3.5,
|
|
3987
3988
|
searchable: !0,
|
|
3988
|
-
searchPlaceholder:
|
|
3989
|
-
noResultsLabel:
|
|
3989
|
+
searchPlaceholder: m.placeholder,
|
|
3990
|
+
noResultsLabel: m.noResults,
|
|
3990
3991
|
maxHeightEm: 22,
|
|
3991
3992
|
plainTiles: !0,
|
|
3992
3993
|
alignTop: !0
|
|
@@ -3999,12 +4000,12 @@ const gt = ({
|
|
|
3999
4000
|
value: s,
|
|
4000
4001
|
onChange: l,
|
|
4001
4002
|
disabled: d || E.length === 0,
|
|
4002
|
-
placeholder:
|
|
4003
|
-
labelEm:
|
|
4004
|
-
optionEm:
|
|
4005
|
-
align:
|
|
4003
|
+
placeholder: m.placeholder,
|
|
4004
|
+
labelEm: p.optionLabelEm,
|
|
4005
|
+
optionEm: p.valueEm,
|
|
4006
|
+
align: p.inlineRow ? "right" : "left",
|
|
4006
4007
|
searchable: !0,
|
|
4007
|
-
noResultsLabel:
|
|
4008
|
+
noResultsLabel: m.noResults
|
|
4008
4009
|
}
|
|
4009
4010
|
);
|
|
4010
4011
|
}, lr = t({
|
|
@@ -4021,7 +4022,7 @@ const gt = ({
|
|
|
4021
4022
|
row: t({ display: "flex", gap: n.spaceXs, alignItems: "stretch" }),
|
|
4022
4023
|
label: t(lr, { color: n.text }),
|
|
4023
4024
|
labelSelected: t(lr, { color: n.primary })
|
|
4024
|
-
},
|
|
4025
|
+
}, Rl = ({
|
|
4025
4026
|
home: e,
|
|
4026
4027
|
away: o,
|
|
4027
4028
|
value: r,
|
|
@@ -4030,14 +4031,14 @@ const gt = ({
|
|
|
4030
4031
|
drawLabel: l,
|
|
4031
4032
|
spec: d
|
|
4032
4033
|
}) => {
|
|
4033
|
-
const c = d.inlineRow,
|
|
4034
|
+
const c = d.inlineRow, m = (b, g) => /* @__PURE__ */ i(
|
|
4034
4035
|
"p",
|
|
4035
4036
|
{
|
|
4036
4037
|
css: g ? hn.labelSelected : hn.label,
|
|
4037
4038
|
style: { fontSize: `${d.optionLabelEm}em` },
|
|
4038
4039
|
children: b
|
|
4039
4040
|
}
|
|
4040
|
-
),
|
|
4041
|
+
), p = (b, g) => {
|
|
4041
4042
|
const h = r === g;
|
|
4042
4043
|
return /* @__PURE__ */ f(
|
|
4043
4044
|
gt,
|
|
@@ -4050,13 +4051,13 @@ const gt = ({
|
|
|
4050
4051
|
fixedWidth: c,
|
|
4051
4052
|
children: [
|
|
4052
4053
|
/* @__PURE__ */ i(at, { competitor: b, sizeEm: d.crestEm }),
|
|
4053
|
-
d.showOptionNames &&
|
|
4054
|
+
d.showOptionNames && m(b.name, h)
|
|
4054
4055
|
]
|
|
4055
4056
|
}
|
|
4056
4057
|
);
|
|
4057
4058
|
};
|
|
4058
4059
|
return /* @__PURE__ */ f("div", { css: hn.row, children: [
|
|
4059
|
-
|
|
4060
|
+
p(e, "1"),
|
|
4060
4061
|
/* @__PURE__ */ f(
|
|
4061
4062
|
gt,
|
|
4062
4063
|
{
|
|
@@ -4076,11 +4077,11 @@ const gt = ({
|
|
|
4076
4077
|
highlighted: r === "x"
|
|
4077
4078
|
}
|
|
4078
4079
|
),
|
|
4079
|
-
d.showOptionNames &&
|
|
4080
|
+
d.showOptionNames && m(l, r === "x")
|
|
4080
4081
|
]
|
|
4081
4082
|
}
|
|
4082
4083
|
),
|
|
4083
|
-
|
|
4084
|
+
p(o, "2")
|
|
4084
4085
|
] });
|
|
4085
4086
|
}, cr = 0, dr = 20, ur = t({ display: "flex", alignItems: "center", justifyContent: "center" }), fn = {
|
|
4086
4087
|
// Two crests plus four arrows is a lot for one compact line — tighten the rhythm there.
|
|
@@ -4092,13 +4093,13 @@ const gt = ({
|
|
|
4092
4093
|
lineHeight: 1,
|
|
4093
4094
|
color: n.dim
|
|
4094
4095
|
})
|
|
4095
|
-
},
|
|
4096
|
+
}, Ll = (e) => {
|
|
4096
4097
|
const [o, r] = (e ?? "").split(":"), a = (s) => {
|
|
4097
4098
|
const l = Number.parseInt(s ?? "", 10);
|
|
4098
4099
|
return Number.isNaN(l) ? 0 : l;
|
|
4099
4100
|
};
|
|
4100
4101
|
return [a(o), a(r)];
|
|
4101
|
-
},
|
|
4102
|
+
}, Tl = ({
|
|
4102
4103
|
home: e,
|
|
4103
4104
|
away: o,
|
|
4104
4105
|
value: r,
|
|
@@ -4106,7 +4107,7 @@ const gt = ({
|
|
|
4106
4107
|
disabled: s = !1,
|
|
4107
4108
|
spec: l
|
|
4108
4109
|
}) => {
|
|
4109
|
-
const { colors: d } = _e(), [c,
|
|
4110
|
+
const { colors: d } = _e(), [c, m] = Ll(r), p = (b) => /* @__PURE__ */ i(
|
|
4110
4111
|
Ie,
|
|
4111
4112
|
{
|
|
4112
4113
|
logoUrl: b.logoUrl,
|
|
@@ -4122,12 +4123,12 @@ const gt = ({
|
|
|
4122
4123
|
}
|
|
4123
4124
|
);
|
|
4124
4125
|
return /* @__PURE__ */ f("div", { css: l.inlineRow ? fn.rowInline : fn.row, children: [
|
|
4125
|
-
|
|
4126
|
+
p(e),
|
|
4126
4127
|
/* @__PURE__ */ i(
|
|
4127
4128
|
Nn,
|
|
4128
4129
|
{
|
|
4129
4130
|
value: c,
|
|
4130
|
-
onChange: (b) => a(`${b}:${
|
|
4131
|
+
onChange: (b) => a(`${b}:${m}`),
|
|
4131
4132
|
min: cr,
|
|
4132
4133
|
max: dr,
|
|
4133
4134
|
disabled: s,
|
|
@@ -4140,7 +4141,7 @@ const gt = ({
|
|
|
4140
4141
|
/* @__PURE__ */ i(
|
|
4141
4142
|
Nn,
|
|
4142
4143
|
{
|
|
4143
|
-
value:
|
|
4144
|
+
value: m,
|
|
4144
4145
|
onChange: (b) => a(`${c}:${b}`),
|
|
4145
4146
|
min: cr,
|
|
4146
4147
|
max: dr,
|
|
@@ -4150,7 +4151,7 @@ const gt = ({
|
|
|
4150
4151
|
numberEm: l.numberEm
|
|
4151
4152
|
}
|
|
4152
4153
|
),
|
|
4153
|
-
|
|
4154
|
+
p(o)
|
|
4154
4155
|
] });
|
|
4155
4156
|
}, mr = t({
|
|
4156
4157
|
display: "block",
|
|
@@ -4163,7 +4164,7 @@ const gt = ({
|
|
|
4163
4164
|
row: t({ display: "flex", gap: n.spaceXs, alignItems: "stretch" }),
|
|
4164
4165
|
label: t(mr, { color: n.text }),
|
|
4165
4166
|
labelSelected: t(mr, { color: n.primary })
|
|
4166
|
-
},
|
|
4167
|
+
}, Ol = ({
|
|
4167
4168
|
value: e,
|
|
4168
4169
|
onChange: o,
|
|
4169
4170
|
disabled: r = !1,
|
|
@@ -4171,13 +4172,13 @@ const gt = ({
|
|
|
4171
4172
|
noLabel: s,
|
|
4172
4173
|
spec: l
|
|
4173
4174
|
}) => {
|
|
4174
|
-
const d = l.inlineRow, c = (
|
|
4175
|
-
const b = e ===
|
|
4175
|
+
const d = l.inlineRow, c = (m, p) => {
|
|
4176
|
+
const b = e === m;
|
|
4176
4177
|
return /* @__PURE__ */ i(
|
|
4177
4178
|
gt,
|
|
4178
4179
|
{
|
|
4179
4180
|
selected: b,
|
|
4180
|
-
onClick: () => o(
|
|
4181
|
+
onClick: () => o(m),
|
|
4181
4182
|
disabled: r,
|
|
4182
4183
|
inline: d,
|
|
4183
4184
|
fixedWidth: d,
|
|
@@ -4186,7 +4187,7 @@ const gt = ({
|
|
|
4186
4187
|
{
|
|
4187
4188
|
css: b ? gn.labelSelected : gn.label,
|
|
4188
4189
|
style: { fontSize: `${l.optionLabelEm}em` },
|
|
4189
|
-
children:
|
|
4190
|
+
children: p
|
|
4190
4191
|
}
|
|
4191
4192
|
)
|
|
4192
4193
|
}
|
|
@@ -4236,7 +4237,7 @@ const gt = ({
|
|
|
4236
4237
|
// and this is exactly the contrast role it exists for.
|
|
4237
4238
|
color: n.onPrimary,
|
|
4238
4239
|
"&:focus-visible": { outline: `2px solid ${n.danger}`, outlineOffset: "0.125em" }
|
|
4239
|
-
}), br = { cursor: "default", opacity: 0.7 },
|
|
4240
|
+
}), br = { cursor: "default", opacity: 0.7 }, Al = t({ display: "flex", alignItems: "center", gap: n.spaceXs, minWidth: 0 }), U = {
|
|
4240
4241
|
iconButton: t({
|
|
4241
4242
|
display: "inline-flex",
|
|
4242
4243
|
alignItems: "center",
|
|
@@ -4290,7 +4291,7 @@ const gt = ({
|
|
|
4290
4291
|
questionInline: t(hr, { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }),
|
|
4291
4292
|
value: t(fr, { color: n.text }),
|
|
4292
4293
|
valueEmpty: t(fr, { color: n.dim }),
|
|
4293
|
-
markRow:
|
|
4294
|
+
markRow: Al,
|
|
4294
4295
|
headshot: t({
|
|
4295
4296
|
flexShrink: 0,
|
|
4296
4297
|
borderRadius: "50%",
|
|
@@ -4390,7 +4391,7 @@ const gt = ({
|
|
|
4390
4391
|
flexShrink: 0,
|
|
4391
4392
|
marginLeft: "auto"
|
|
4392
4393
|
})
|
|
4393
|
-
},
|
|
4394
|
+
}, Il = ({
|
|
4394
4395
|
market: e,
|
|
4395
4396
|
title: o,
|
|
4396
4397
|
home: r,
|
|
@@ -4399,8 +4400,8 @@ const gt = ({
|
|
|
4399
4400
|
draft: l,
|
|
4400
4401
|
locked: d,
|
|
4401
4402
|
canDelete: c,
|
|
4402
|
-
onChange:
|
|
4403
|
-
players:
|
|
4403
|
+
onChange: m,
|
|
4404
|
+
players: p,
|
|
4404
4405
|
playersLoading: b,
|
|
4405
4406
|
playerName: g,
|
|
4406
4407
|
onEdit: h,
|
|
@@ -4423,7 +4424,7 @@ const gt = ({
|
|
|
4423
4424
|
ownGoal: y.ownGoal,
|
|
4424
4425
|
noGoal: y.noGoal,
|
|
4425
4426
|
playerName: g
|
|
4426
|
-
}, A = N === "player" ?
|
|
4427
|
+
}, A = N === "player" ? Ps(l.touched ? l.playerId : s == null ? void 0 : s.playerId, R) : gi(e, $, R), q = (() => {
|
|
4427
4428
|
const ee = l.touched ? l.playerId : s == null ? void 0 : s.playerId;
|
|
4428
4429
|
return ee === void 0 ? null : ee === null ? Pn : ee;
|
|
4429
4430
|
})(), K = async () => {
|
|
@@ -4434,12 +4435,12 @@ const gt = ({
|
|
|
4434
4435
|
switch (N) {
|
|
4435
4436
|
case "oneXTwo":
|
|
4436
4437
|
return /* @__PURE__ */ i(
|
|
4437
|
-
|
|
4438
|
+
Rl,
|
|
4438
4439
|
{
|
|
4439
4440
|
home: r,
|
|
4440
4441
|
away: a,
|
|
4441
4442
|
value: $ ?? null,
|
|
4442
|
-
onChange:
|
|
4443
|
+
onChange: m,
|
|
4443
4444
|
disabled: l.saving,
|
|
4444
4445
|
drawLabel: y.draw,
|
|
4445
4446
|
spec: w
|
|
@@ -4447,22 +4448,22 @@ const gt = ({
|
|
|
4447
4448
|
);
|
|
4448
4449
|
case "correctScore":
|
|
4449
4450
|
return /* @__PURE__ */ i(
|
|
4450
|
-
|
|
4451
|
+
Tl,
|
|
4451
4452
|
{
|
|
4452
4453
|
home: r,
|
|
4453
4454
|
away: a,
|
|
4454
4455
|
value: $ ?? null,
|
|
4455
|
-
onChange:
|
|
4456
|
+
onChange: m,
|
|
4456
4457
|
disabled: l.saving,
|
|
4457
4458
|
spec: w
|
|
4458
4459
|
}
|
|
4459
4460
|
);
|
|
4460
4461
|
case "corners":
|
|
4461
4462
|
return /* @__PURE__ */ i(
|
|
4462
|
-
|
|
4463
|
+
bl,
|
|
4463
4464
|
{
|
|
4464
4465
|
value: $ ?? null,
|
|
4465
|
-
onChange:
|
|
4466
|
+
onChange: m,
|
|
4466
4467
|
disabled: l.saving,
|
|
4467
4468
|
ariaLabel: o,
|
|
4468
4469
|
spec: w
|
|
@@ -4470,10 +4471,10 @@ const gt = ({
|
|
|
4470
4471
|
);
|
|
4471
4472
|
case "yesNo":
|
|
4472
4473
|
return /* @__PURE__ */ i(
|
|
4473
|
-
|
|
4474
|
+
Ol,
|
|
4474
4475
|
{
|
|
4475
4476
|
value: $ ?? null,
|
|
4476
|
-
onChange:
|
|
4477
|
+
onChange: m,
|
|
4477
4478
|
disabled: l.saving,
|
|
4478
4479
|
yesLabel: y.yes,
|
|
4479
4480
|
noLabel: y.no,
|
|
@@ -4482,12 +4483,12 @@ const gt = ({
|
|
|
4482
4483
|
);
|
|
4483
4484
|
case "doubleChance":
|
|
4484
4485
|
return /* @__PURE__ */ i(
|
|
4485
|
-
|
|
4486
|
+
El,
|
|
4486
4487
|
{
|
|
4487
4488
|
home: r,
|
|
4488
4489
|
away: a,
|
|
4489
4490
|
value: $ ?? null,
|
|
4490
|
-
onChange:
|
|
4491
|
+
onChange: m,
|
|
4491
4492
|
disabled: l.saving,
|
|
4492
4493
|
drawLabel: y.draw,
|
|
4493
4494
|
orLabel: y.or,
|
|
@@ -4497,12 +4498,12 @@ const gt = ({
|
|
|
4497
4498
|
);
|
|
4498
4499
|
case "htFt":
|
|
4499
4500
|
return /* @__PURE__ */ i(
|
|
4500
|
-
|
|
4501
|
+
Cl,
|
|
4501
4502
|
{
|
|
4502
4503
|
home: r,
|
|
4503
4504
|
away: a,
|
|
4504
4505
|
value: $ ?? null,
|
|
4505
|
-
onChange:
|
|
4506
|
+
onChange: m,
|
|
4506
4507
|
disabled: l.saving,
|
|
4507
4508
|
drawLabel: y.draw,
|
|
4508
4509
|
placeholder: y.pickOutcome,
|
|
@@ -4511,16 +4512,16 @@ const gt = ({
|
|
|
4511
4512
|
);
|
|
4512
4513
|
case "player":
|
|
4513
4514
|
return /* @__PURE__ */ i(
|
|
4514
|
-
|
|
4515
|
+
kl,
|
|
4515
4516
|
{
|
|
4516
|
-
players:
|
|
4517
|
+
players: p,
|
|
4517
4518
|
loading: b,
|
|
4518
4519
|
home: r,
|
|
4519
4520
|
away: a,
|
|
4520
4521
|
value: q,
|
|
4521
|
-
onChange: (ee) =>
|
|
4522
|
+
onChange: (ee) => m(!0, ee === Pn ? null : ee),
|
|
4522
4523
|
disabled: l.saving,
|
|
4523
|
-
allowNobody: e ===
|
|
4524
|
+
allowNobody: e === Os,
|
|
4524
4525
|
labels: {
|
|
4525
4526
|
ownGoal: y.ownGoal,
|
|
4526
4527
|
noGoal: y.noGoal,
|
|
@@ -4532,7 +4533,7 @@ const gt = ({
|
|
|
4532
4533
|
);
|
|
4533
4534
|
}
|
|
4534
4535
|
})(), Z = _ && k ? /* @__PURE__ */ f("div", { css: U.result, children: [
|
|
4535
|
-
/* @__PURE__ */ i(
|
|
4536
|
+
/* @__PURE__ */ i(xa, { size: `${w.titleEm * 1.15}em`, color: n.success }),
|
|
4536
4537
|
/* @__PURE__ */ i("p", { css: U.resultLabel, style: { fontSize: `${w.titleEm}em` }, children: k }),
|
|
4537
4538
|
/* @__PURE__ */ i("p", { css: U.resultValue, style: { fontSize: `${w.titleEm}em` }, children: _ })
|
|
4538
4539
|
] }) : null, J = /* @__PURE__ */ i(
|
|
@@ -4555,7 +4556,7 @@ const gt = ({
|
|
|
4555
4556
|
);
|
|
4556
4557
|
}
|
|
4557
4558
|
if (N === "player") {
|
|
4558
|
-
const fe = s.playerId, se = fe && fe !== Qt ?
|
|
4559
|
+
const fe = s.playerId, se = fe && fe !== Qt ? p.find((We) => We.id === fe) : void 0;
|
|
4559
4560
|
return ee(
|
|
4560
4561
|
/* @__PURE__ */ f(B, { children: [
|
|
4561
4562
|
(se == null ? void 0 : se.headshotUrl) && /* @__PURE__ */ i(
|
|
@@ -4587,7 +4588,7 @@ const gt = ({
|
|
|
4587
4588
|
"aria-label": y.edit,
|
|
4588
4589
|
title: y.edit,
|
|
4589
4590
|
css: U.iconButton,
|
|
4590
|
-
children: /* @__PURE__ */ i(
|
|
4591
|
+
children: /* @__PURE__ */ i(Sa, { size: "0.9375em" })
|
|
4591
4592
|
}
|
|
4592
4593
|
),
|
|
4593
4594
|
c && /* @__PURE__ */ i(
|
|
@@ -4604,7 +4605,7 @@ const gt = ({
|
|
|
4604
4605
|
] }) : null, G = l.editing && s ? (
|
|
4605
4606
|
// Cancelling an edit restores the saved value rather than leaving a half-changed row.
|
|
4606
4607
|
/* @__PURE__ */ i("button", { type: "button", onClick: E, css: U.cancelEdit, children: y.cancel })
|
|
4607
|
-
) : null, oe = s ? /* @__PURE__ */ i(
|
|
4608
|
+
) : null, oe = s ? /* @__PURE__ */ i(pl, { prediction: s, pointsLabel: y.pts }) : null, ke = /* @__PURE__ */ f("div", { css: U.inline, children: [
|
|
4608
4609
|
/* @__PURE__ */ i("div", { css: U.inlineQuestion, children: J }),
|
|
4609
4610
|
/* @__PURE__ */ f("div", { css: U.inlineControl, children: [
|
|
4610
4611
|
O || d ? ae : ie,
|
|
@@ -4629,7 +4630,7 @@ const gt = ({
|
|
|
4629
4630
|
return /* @__PURE__ */ f("div", { css: U.root, style: { opacity: l.saving ? 0.6 : 1 }, children: [
|
|
4630
4631
|
w.inlineRow ? ke : Xe,
|
|
4631
4632
|
w.inlineRow && Z,
|
|
4632
|
-
V && u && C && /* @__PURE__ */ i(
|
|
4633
|
+
V && u && C && /* @__PURE__ */ i(ml, { summary: u, labels: C, spec: w }),
|
|
4633
4634
|
v && /* @__PURE__ */ f("div", { "aria-busy": x, css: U.confirm, children: [
|
|
4634
4635
|
/* @__PURE__ */ i("div", { css: U.accent }),
|
|
4635
4636
|
/* @__PURE__ */ f("div", { css: U.confirmQuestion, children: [
|
|
@@ -4670,7 +4671,7 @@ const gt = ({
|
|
|
4670
4671
|
empty: t(yn, { backgroundColor: n.text22 }),
|
|
4671
4672
|
done: t(yn, { backgroundColor: n.primary }),
|
|
4672
4673
|
complete: t(yn, { backgroundColor: n.success })
|
|
4673
|
-
},
|
|
4674
|
+
}, $l = ({
|
|
4674
4675
|
total: e,
|
|
4675
4676
|
done: o,
|
|
4676
4677
|
label: r
|
|
@@ -4695,7 +4696,7 @@ const gt = ({
|
|
|
4695
4696
|
summaryBarEm: 0.5,
|
|
4696
4697
|
summaryLabelEm: 0.75,
|
|
4697
4698
|
summaryMiniWidthEm: 0
|
|
4698
|
-
},
|
|
4699
|
+
}, Nl = {
|
|
4699
4700
|
compact: {
|
|
4700
4701
|
inlineRow: !0,
|
|
4701
4702
|
crestEm: 1.25,
|
|
@@ -4716,7 +4717,7 @@ const gt = ({
|
|
|
4716
4717
|
},
|
|
4717
4718
|
standard: wr,
|
|
4718
4719
|
hero: wr
|
|
4719
|
-
},
|
|
4720
|
+
}, Fl = (e) => Nl[e], xr = {
|
|
4720
4721
|
xs: n.spaceXs,
|
|
4721
4722
|
sm: n.spaceSm,
|
|
4722
4723
|
md: n.spaceMd,
|
|
@@ -4859,7 +4860,7 @@ const gt = ({
|
|
|
4859
4860
|
saving: !1,
|
|
4860
4861
|
failed: !1,
|
|
4861
4862
|
editing: !1
|
|
4862
|
-
},
|
|
4863
|
+
}, Pl = ({
|
|
4863
4864
|
markets: e,
|
|
4864
4865
|
home: o,
|
|
4865
4866
|
away: r,
|
|
@@ -4868,8 +4869,8 @@ const gt = ({
|
|
|
4868
4869
|
locked: l,
|
|
4869
4870
|
canDelete: d,
|
|
4870
4871
|
defaultExpanded: c,
|
|
4871
|
-
display:
|
|
4872
|
-
variant:
|
|
4872
|
+
display: m,
|
|
4873
|
+
variant: p,
|
|
4873
4874
|
players: b,
|
|
4874
4875
|
playersLoading: g,
|
|
4875
4876
|
playerName: h,
|
|
@@ -4881,7 +4882,7 @@ const gt = ({
|
|
|
4881
4882
|
results: C,
|
|
4882
4883
|
resultLabel: _
|
|
4883
4884
|
}) => {
|
|
4884
|
-
const { t: k } = Se("common"), v =
|
|
4885
|
+
const { t: k } = Se("common"), v = ua(), T = Fl(p), x = m === "drawer", [I, N] = z(c), O = x ? I : !0, [$, V] = z({}), [R, A] = z(!1), [q, K] = z({
|
|
4885
4886
|
open: !1,
|
|
4886
4887
|
variant: "error",
|
|
4887
4888
|
title: "",
|
|
@@ -4926,7 +4927,7 @@ const gt = ({
|
|
|
4926
4927
|
}),
|
|
4927
4928
|
[k]
|
|
4928
4929
|
), ae = we(
|
|
4929
|
-
() => e.map((L) => ({ market: L, draft: Z(L) })).filter(({ draft: L }) => L.touched &&
|
|
4930
|
+
() => e.map((L) => ({ market: L, draft: Z(L) })).filter(({ draft: L }) => L.touched && Ws(L.value)).map(({ market: L, draft: M }) => ({
|
|
4930
4931
|
market: L,
|
|
4931
4932
|
value: M.value,
|
|
4932
4933
|
playerId: M.playerId
|
|
@@ -4983,11 +4984,11 @@ const gt = ({
|
|
|
4983
4984
|
/* @__PURE__ */ i("p", { css: ue.crowdCount, style: { fontSize: `${T.summaryLabelEm}em` }, children: se.toLocaleString(v) })
|
|
4984
4985
|
] }) : null, ze = pe > 0 && pe === e.length, Re = !l && ze, De = l ? pe > 1 : e.length > 1, nt = k(
|
|
4985
4986
|
l ? De ? "eventCard.predictions.yoursPlural" : "eventCard.predictions.yours" : Re ? "predictor.play.allPredicted" : De ? "eventCard.predictions.ctaPlural" : "eventCard.predictions.cta"
|
|
4986
|
-
), Ke = l || Re ?
|
|
4987
|
+
), Ke = l || Re ? va : Ea, Me = Re ? n.success : n.primary, $e = Array.from(a.values()).filter(
|
|
4987
4988
|
(L) => L.status === "SETTLED"
|
|
4988
4989
|
), He = $e.filter(
|
|
4989
4990
|
(L) => L.outcome === "CORRECT" || L.outcome === "PARTIALLY_CORRECT"
|
|
4990
|
-
).length,
|
|
4991
|
+
).length, Le = Array.from(a.values()).filter((L) => L.status === "SETTLED").reduce((L, M) => L + (M.points ?? 0), 0), Ye = Array.from(a.values()).some(
|
|
4991
4992
|
(L) => L.status === "SETTLED"
|
|
4992
4993
|
), Be = x ? "button" : "div";
|
|
4993
4994
|
return /* @__PURE__ */ f(B, { children: [
|
|
@@ -4998,7 +4999,7 @@ const gt = ({
|
|
|
4998
4999
|
onClose: () => K((L) => ({ ...L, open: !1 }))
|
|
4999
5000
|
}
|
|
5000
5001
|
),
|
|
5001
|
-
/* @__PURE__ */ f("div", { css: ue.chrome[
|
|
5002
|
+
/* @__PURE__ */ f("div", { css: ue.chrome[p], children: [
|
|
5002
5003
|
/* @__PURE__ */ f(
|
|
5003
5004
|
Be,
|
|
5004
5005
|
{
|
|
@@ -5042,10 +5043,10 @@ const gt = ({
|
|
|
5042
5043
|
/* @__PURE__ */ f(
|
|
5043
5044
|
"p",
|
|
5044
5045
|
{
|
|
5045
|
-
css:
|
|
5046
|
+
css: Le > 0 ? ue.points : ue.pointsNone,
|
|
5046
5047
|
style: { fontSize: `${T.ctaEm}em` },
|
|
5047
5048
|
children: [
|
|
5048
|
-
|
|
5049
|
+
Le > 0 ? Bt(`+${Le}`) : Bt(Le),
|
|
5049
5050
|
" ",
|
|
5050
5051
|
k("predictor.play.pts")
|
|
5051
5052
|
]
|
|
@@ -5053,7 +5054,7 @@ const gt = ({
|
|
|
5053
5054
|
)
|
|
5054
5055
|
] })
|
|
5055
5056
|
) : /* @__PURE__ */ i(
|
|
5056
|
-
|
|
5057
|
+
$l,
|
|
5057
5058
|
{
|
|
5058
5059
|
total: e.length,
|
|
5059
5060
|
done: pe,
|
|
@@ -5090,14 +5091,14 @@ const gt = ({
|
|
|
5090
5091
|
gap: xr[T.rowGap],
|
|
5091
5092
|
// Matches each template's own bottom inset: standard's Sheet padding (which the
|
|
5092
5093
|
// full-bleed chrome cancelled), compact's match-row padding, hero's panel padding.
|
|
5093
|
-
paddingBottom:
|
|
5094
|
+
paddingBottom: p === "standard" ? n.spaceLg : n.spaceMd
|
|
5094
5095
|
},
|
|
5095
5096
|
children: [
|
|
5096
5097
|
/* @__PURE__ */ i("div", { css: ue.rows[T.rowGap], children: G.map((L) => /* @__PURE__ */ i(
|
|
5097
|
-
|
|
5098
|
+
Il,
|
|
5098
5099
|
{
|
|
5099
5100
|
market: L,
|
|
5100
|
-
title:
|
|
5101
|
+
title: Fs(L, k),
|
|
5101
5102
|
home: o,
|
|
5102
5103
|
away: r,
|
|
5103
5104
|
existing: a.get(L) ?? null,
|
|
@@ -5147,7 +5148,7 @@ const gt = ({
|
|
|
5147
5148
|
type: "button",
|
|
5148
5149
|
onClick: Xe,
|
|
5149
5150
|
disabled: ke,
|
|
5150
|
-
css: ue.submit[
|
|
5151
|
+
css: ue.submit[p === "compact" ? "compact" : "stacked"][ke ? "off" : "on"],
|
|
5151
5152
|
style: { fontSize: `${T.submitEm}em` },
|
|
5152
5153
|
children: k("predictor.play.submit")
|
|
5153
5154
|
}
|
|
@@ -5159,7 +5160,7 @@ const gt = ({
|
|
|
5159
5160
|
)
|
|
5160
5161
|
] })
|
|
5161
5162
|
] });
|
|
5162
|
-
},
|
|
5163
|
+
}, Wl = {
|
|
5163
5164
|
compact: {
|
|
5164
5165
|
indicator: "underline",
|
|
5165
5166
|
underlineWidth: "2px",
|
|
@@ -5216,7 +5217,7 @@ const gt = ({
|
|
|
5216
5217
|
bodyPadding: "0.875em 1em 1em",
|
|
5217
5218
|
bodyGap: "0.875em"
|
|
5218
5219
|
}
|
|
5219
|
-
}, Hi = (e) =>
|
|
5220
|
+
}, Hi = (e) => Wl[e], zl = ["compact", "standard", "hero"], kr = (e, o) => t({
|
|
5220
5221
|
// `1 0 auto`, not `1`: the tabs share the strip's full width when there's room, but
|
|
5221
5222
|
// never shrink below their label, so a narrow card scrolls instead of ellipsizing a
|
|
5222
5223
|
// tab name down to "Прек…".
|
|
@@ -5248,7 +5249,7 @@ const gt = ({
|
|
|
5248
5249
|
// since there's no pill background to light up.
|
|
5249
5250
|
"&:hover": { color: n.text }
|
|
5250
5251
|
}
|
|
5251
|
-
}),
|
|
5252
|
+
}), Dl = (e) => e.indicator === "pill" ? t({
|
|
5252
5253
|
display: "flex",
|
|
5253
5254
|
overflowX: "auto",
|
|
5254
5255
|
gap: e.pillTrackGap,
|
|
@@ -5261,14 +5262,14 @@ const gt = ({
|
|
|
5261
5262
|
padding: `0 ${e.stripPaddingX}`,
|
|
5262
5263
|
...e.stripDivider === "top" ? { borderTop: `1px solid ${n.border}` } : { borderBottom: `1px solid ${n.border}` }
|
|
5263
5264
|
}), xn = Object.fromEntries(
|
|
5264
|
-
|
|
5265
|
+
zl.map((e) => {
|
|
5265
5266
|
const o = Hi(e);
|
|
5266
5267
|
return [
|
|
5267
5268
|
e,
|
|
5268
|
-
{ on: kr(o, !0), off: kr(o, !1), strip:
|
|
5269
|
+
{ on: kr(o, !0), off: kr(o, !1), strip: Dl(o) }
|
|
5269
5270
|
];
|
|
5270
5271
|
})
|
|
5271
|
-
),
|
|
5272
|
+
), Ml = ({
|
|
5272
5273
|
tabs: e,
|
|
5273
5274
|
active: o,
|
|
5274
5275
|
onChange: r,
|
|
@@ -5307,14 +5308,14 @@ const gt = ({
|
|
|
5307
5308
|
homeTrack: t(Rr, { justifyContent: "flex-end" }),
|
|
5308
5309
|
awayTrack: Rr,
|
|
5309
5310
|
bar: { lead: t(Lr, { background: n.primary }), trail: t(Lr, { background: n.text30 }) }
|
|
5310
|
-
},
|
|
5311
|
+
}, Hl = ({ event: e, status: o, variant: r }) => {
|
|
5311
5312
|
const { t: a } = Se("common"), s = o === "UPCOMING" ? e.seasonStats : e.matchStats;
|
|
5312
5313
|
return /* @__PURE__ */ i("div", { css: ge.list, children: s.map((l) => {
|
|
5313
5314
|
const d = l.leader === "home", c = l.leader === "away";
|
|
5314
5315
|
return /* @__PURE__ */ f("div", { css: ge.row, children: [
|
|
5315
5316
|
/* @__PURE__ */ f("div", { css: ge.labels, children: [
|
|
5316
5317
|
/* @__PURE__ */ i("p", { css: d ? ge.home.lead : ge.home.trail, children: l.home }),
|
|
5317
|
-
/* @__PURE__ */ i("p", { css: ge.label, children: a(
|
|
5318
|
+
/* @__PURE__ */ i("p", { css: ge.label, children: a(es(l.key, e.sport)) }),
|
|
5318
5319
|
/* @__PURE__ */ i("p", { css: c ? ge.away.lead : ge.away.trail, children: l.away })
|
|
5319
5320
|
] }),
|
|
5320
5321
|
/* @__PURE__ */ f("div", { css: ge.bars, children: [
|
|
@@ -5355,7 +5356,7 @@ const gt = ({
|
|
|
5355
5356
|
fallbackIcon: (
|
|
5356
5357
|
// An individual gets a person, not a club shield — a tennis player with neither headshot
|
|
5357
5358
|
// nor flag was showing a team badge.
|
|
5358
|
-
a ? /* @__PURE__ */ i(li, { size: `${r * 0.62}em`, color: l.dim }) : /* @__PURE__ */ i(
|
|
5359
|
+
a ? /* @__PURE__ */ i(li, { size: `${r * 0.62}em`, color: l.dim }) : /* @__PURE__ */ i(Ca, { size: `${r * 0.6}em`, color: l.dim })
|
|
5359
5360
|
),
|
|
5360
5361
|
plainLogo: !0,
|
|
5361
5362
|
avatar: a,
|
|
@@ -5367,7 +5368,7 @@ const gt = ({
|
|
|
5367
5368
|
promotion: n.primary,
|
|
5368
5369
|
qualification: n.warning,
|
|
5369
5370
|
relegation: n.danger
|
|
5370
|
-
},
|
|
5371
|
+
}, Bl = "1.125em", vn = { fontSize: "0.6875em" }, Mt = { display: "block", margin: 0, lineHeight: 1.5, fontFamily: n.fontPrimary }, Tr = t(Mt, {
|
|
5371
5372
|
fontSize: "0.875em",
|
|
5372
5373
|
color: n.text,
|
|
5373
5374
|
whiteSpace: "nowrap",
|
|
@@ -5414,7 +5415,7 @@ const gt = ({
|
|
|
5414
5415
|
name: { involved: t(Tr, { fontWeight: 700 }), other: t(Tr, { fontWeight: 500 }) },
|
|
5415
5416
|
points: t(Mt, { fontSize: "0.875em", fontWeight: 700, color: n.text, textAlign: "end" }),
|
|
5416
5417
|
number: t(Mt, { fontSize: "0.875em", color: n.dim, textAlign: "center" })
|
|
5417
|
-
},
|
|
5418
|
+
}, Gl = [
|
|
5418
5419
|
{ field: "played", label: "played", short: "playedShort", width: "1.375em", narrow: !0 },
|
|
5419
5420
|
{ field: "won", label: "won", short: "wonShort", width: "1.25em", narrow: !1 },
|
|
5420
5421
|
{ field: "drawn", label: "drawn", short: "drawnShort", width: "1.25em", narrow: !1 },
|
|
@@ -5442,17 +5443,17 @@ const gt = ({
|
|
|
5442
5443
|
narrow: !0,
|
|
5443
5444
|
align: "end"
|
|
5444
5445
|
}
|
|
5445
|
-
],
|
|
5446
|
-
const { t: r } = Se("common"), { colors: a, tint: s } = _e(), l =
|
|
5446
|
+
], Ul = ({ event: e, hero: o }) => {
|
|
5447
|
+
const { t: r } = Se("common"), { colors: a, tint: s } = _e(), l = ma(), d = !Mn(), c = l === "dark" ? 0.22 : 0.1, m = e.standings, p = Gl.filter(
|
|
5447
5448
|
(g) => e.standingsColumns.includes(g.field) && (d || g.narrow)
|
|
5448
|
-
), b = [
|
|
5449
|
+
), b = [Bl, "1fr", ...p.map((g) => g.width)].join(" ");
|
|
5449
5450
|
return /* @__PURE__ */ f("div", { css: xe.table, children: [
|
|
5450
5451
|
/* @__PURE__ */ f("div", { css: xe.head, style: { gridTemplateColumns: b }, children: [
|
|
5451
5452
|
/* @__PURE__ */ i("span", { css: xe.headCell, children: "#" }),
|
|
5452
5453
|
/* @__PURE__ */ i("span", { css: xe.headCell, children: r("standings.columns.team") }),
|
|
5453
|
-
|
|
5454
|
+
p.map((g) => /* @__PURE__ */ i(Kt, { title: r(`standings.columns.${g.label}`), children: /* @__PURE__ */ i("span", { css: "align" in g ? xe.headStat.end : xe.headStat.center, children: r(`standings.columns.${g.short}`) }) }, g.field))
|
|
5454
5455
|
] }),
|
|
5455
|
-
|
|
5456
|
+
m.map((g) => {
|
|
5456
5457
|
const h = o ? a.surface : s(a.primary, c);
|
|
5457
5458
|
return /* @__PURE__ */ f(
|
|
5458
5459
|
"div",
|
|
@@ -5475,7 +5476,7 @@ const gt = ({
|
|
|
5475
5476
|
),
|
|
5476
5477
|
/* @__PURE__ */ i("p", { css: g.isInvolved ? xe.name.involved : xe.name.other, children: g.competitor.name })
|
|
5477
5478
|
] }),
|
|
5478
|
-
|
|
5479
|
+
p.map(
|
|
5479
5480
|
(E) => E.field === "points" ? /* @__PURE__ */ i("p", { css: xe.points, children: g.points }, E.field) : /* @__PURE__ */ i("p", { css: xe.number, children: g[E.field] }, E.field)
|
|
5480
5481
|
)
|
|
5481
5482
|
]
|
|
@@ -5484,7 +5485,7 @@ const gt = ({
|
|
|
5484
5485
|
);
|
|
5485
5486
|
})
|
|
5486
5487
|
] });
|
|
5487
|
-
},
|
|
5488
|
+
}, Vl = 14, Ne = { display: "block", margin: 0, lineHeight: 1.5 }, En = t(Ne, { fontFamily: n.fontPrimary, fontSize: "1.25em", fontWeight: 800, lineHeight: 1 }), Cn = t({
|
|
5488
5489
|
display: "flex",
|
|
5489
5490
|
alignItems: "center",
|
|
5490
5491
|
justifyContent: "center",
|
|
@@ -5648,16 +5649,16 @@ const gt = ({
|
|
|
5648
5649
|
textAlign: "right",
|
|
5649
5650
|
whiteSpace: "nowrap"
|
|
5650
5651
|
})
|
|
5651
|
-
},
|
|
5652
|
+
}, jl = ({ event: e, hero: o }) => {
|
|
5652
5653
|
const { t: r } = Se("common"), { colors: a } = _e(), s = Mn(), l = e.headToHead;
|
|
5653
5654
|
if (!l) return null;
|
|
5654
5655
|
const d = (u) => {
|
|
5655
5656
|
const C = `eventCard.detail.h2h.${u}`, _ = (e.sport ?? "").toLowerCase().replace(/[^a-z]/g, "");
|
|
5656
5657
|
return _ ? [`eventCard.detail.h2h.${_}.${u}`, C] : [C];
|
|
5657
|
-
}, c = (u) => /* @__PURE__ */ i("p", { css: F.caption, children: u }),
|
|
5658
|
+
}, c = (u) => /* @__PURE__ */ i("p", { css: F.caption, children: u }), m = (u, C, _) => /* @__PURE__ */ f("div", { css: F.tally, children: [
|
|
5658
5659
|
/* @__PURE__ */ i("p", { css: F.tallyValue[_], children: u }),
|
|
5659
5660
|
/* @__PURE__ */ i("p", { css: F.tallyLabel, children: C })
|
|
5660
|
-
] }),
|
|
5661
|
+
] }), p = (u, C, _, k = !1) => /* @__PURE__ */ f("div", { css: k ? F.sideReverse : F.side, children: [
|
|
5661
5662
|
/* @__PURE__ */ i(
|
|
5662
5663
|
je,
|
|
5663
5664
|
{
|
|
@@ -5668,8 +5669,8 @@ const gt = ({
|
|
|
5668
5669
|
flagUrl: u.flagUrl
|
|
5669
5670
|
}
|
|
5670
5671
|
),
|
|
5671
|
-
|
|
5672
|
-
] }), b = (u, C) => /* @__PURE__ */ i("div", { css: F.segment[C], style: { width: `${u}%` }, children: u >=
|
|
5672
|
+
m(C, r("eventCard.detail.h2h.wins"), _)
|
|
5673
|
+
] }), b = (u, C) => /* @__PURE__ */ i("div", { css: F.segment[C], style: { width: `${u}%` }, children: u >= Vl && /* @__PURE__ */ f("p", { css: F.segmentLabel[C], children: [
|
|
5673
5674
|
u,
|
|
5674
5675
|
"%"
|
|
5675
5676
|
] }) }), g = (u, C, _, k, v, T) => /* @__PURE__ */ f("div", { css: F.goalsRow, children: [
|
|
@@ -5686,9 +5687,9 @@ const gt = ({
|
|
|
5686
5687
|
return /* @__PURE__ */ f("div", { css: F.root, children: [
|
|
5687
5688
|
/* @__PURE__ */ f("div", { css: F.record, children: [
|
|
5688
5689
|
/* @__PURE__ */ f("div", { css: F.tallies, children: [
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5690
|
+
p(e.home, l.homeWins, "primary"),
|
|
5691
|
+
m(l.draws, r("eventCard.detail.h2h.drawsLabel"), "text"),
|
|
5692
|
+
p(e.away, l.awayWins, "danger", !0)
|
|
5692
5693
|
] }),
|
|
5693
5694
|
/* @__PURE__ */ f("div", { css: F.shareBar, children: [
|
|
5694
5695
|
b(l.homeSharePct, "home"),
|
|
@@ -5775,12 +5776,12 @@ const gt = ({
|
|
|
5775
5776
|
}) })
|
|
5776
5777
|
] })
|
|
5777
5778
|
] });
|
|
5778
|
-
}, Ft = 5,
|
|
5779
|
+
}, Ft = 5, Xl = ["overall", "home", "away", "inCompetition"], Kl = {
|
|
5779
5780
|
overall: "eventCard.detail.form.filterOverall",
|
|
5780
5781
|
home: "eventCard.detail.form.filterHome",
|
|
5781
5782
|
away: "eventCard.detail.form.filterAway",
|
|
5782
5783
|
inCompetition: "eventCard.detail.form.filterCompetition"
|
|
5783
|
-
}, yt = { display: "block", margin: 0, lineHeight: 1.5 },
|
|
5784
|
+
}, yt = { display: "block", margin: 0, lineHeight: 1.5 }, Yl = t(yt, {
|
|
5784
5785
|
fontFamily: n.fontSecondary,
|
|
5785
5786
|
fontSize: "0.8125em",
|
|
5786
5787
|
fontWeight: 700,
|
|
@@ -5798,7 +5799,7 @@ const gt = ({
|
|
|
5798
5799
|
display: "flex",
|
|
5799
5800
|
alignItems: "center",
|
|
5800
5801
|
justifyContent: "center"
|
|
5801
|
-
}),
|
|
5802
|
+
}), Ql = t(yt, {
|
|
5802
5803
|
fontFamily: "var(--fu-ucrc-font-body)",
|
|
5803
5804
|
minWidth: 0,
|
|
5804
5805
|
fontSize: "0.8125em",
|
|
@@ -5834,14 +5835,14 @@ const gt = ({
|
|
|
5834
5835
|
overflow: "hidden",
|
|
5835
5836
|
textOverflow: "ellipsis",
|
|
5836
5837
|
unicodeBidi: "plaintext"
|
|
5837
|
-
},
|
|
5838
|
+
}, ql = t({
|
|
5838
5839
|
display: "flex",
|
|
5839
5840
|
flexDirection: "column",
|
|
5840
5841
|
gap: "0.5em",
|
|
5841
5842
|
borderTop: `1px solid ${n.border}`,
|
|
5842
5843
|
paddingTop: "0.75em"
|
|
5843
5844
|
}), H = {
|
|
5844
|
-
sectionLabel:
|
|
5845
|
+
sectionLabel: Yl,
|
|
5845
5846
|
formRow: t({ display: "flex", alignItems: "center", gap: "0.625em" }),
|
|
5846
5847
|
formName: t(yt, {
|
|
5847
5848
|
flex: 1,
|
|
@@ -5879,7 +5880,7 @@ const gt = ({
|
|
|
5879
5880
|
rowGap: 0,
|
|
5880
5881
|
textAlign: "left"
|
|
5881
5882
|
}),
|
|
5882
|
-
resultName:
|
|
5883
|
+
resultName: Ql,
|
|
5883
5884
|
score: t({
|
|
5884
5885
|
// The score column is as wide as the widest score in the set, and a stretched chip
|
|
5885
5886
|
// inherits the column's text-align — which left the slack inside the chip, on the right in
|
|
@@ -5913,7 +5914,7 @@ const gt = ({
|
|
|
5913
5914
|
},
|
|
5914
5915
|
root: t({ display: "flex", flexDirection: "column", gap: "0.625em" }),
|
|
5915
5916
|
form: t({ display: "flex", flexDirection: "column", gap: "0.625em" }),
|
|
5916
|
-
section:
|
|
5917
|
+
section: ql,
|
|
5917
5918
|
streakHead: t({
|
|
5918
5919
|
display: "grid",
|
|
5919
5920
|
gridTemplateColumns: "1fr auto 1fr",
|
|
@@ -5948,11 +5949,11 @@ const gt = ({
|
|
|
5948
5949
|
textOverflow: "ellipsis",
|
|
5949
5950
|
unicodeBidi: "plaintext"
|
|
5950
5951
|
})
|
|
5951
|
-
},
|
|
5952
|
-
const { t: o } = Se("common"), [r, a] = z("overall"), s = Mn(), l = (S, y) => s && y ? y : S, d = (S) => `${S.date} · ${S.opponent.name} · ${S.score.own}–${S.score.opp}`, c = (S) => /* @__PURE__ */ i("p", { css: H.sectionLabel, children: S }),
|
|
5952
|
+
}, Zl = ({ event: e }) => {
|
|
5953
|
+
const { t: o } = Se("common"), [r, a] = z("overall"), s = Mn(), l = (S, y) => s && y ? y : S, d = (S) => `${S.date} · ${S.opponent.name} · ${S.score.own}–${S.score.opp}`, c = (S) => /* @__PURE__ */ i("p", { css: H.sectionLabel, children: S }), m = (S, y) => /* @__PURE__ */ f("div", { css: H.formRow, children: [
|
|
5953
5954
|
/* @__PURE__ */ i("p", { css: H.formName, children: S }),
|
|
5954
5955
|
/* @__PURE__ */ i("div", { css: H.formDots, children: y.slice(0, Ft).map((w, u) => /* @__PURE__ */ i("div", { title: d(w), css: H.formDot[w.outcome], children: w.outcome }, w.eventId || u)) })
|
|
5955
|
-
] }),
|
|
5956
|
+
] }), p = (S, y) => {
|
|
5956
5957
|
const w = y.slice(0, Ft);
|
|
5957
5958
|
return /* @__PURE__ */ i("div", { css: H.results, children: w.map((u, C) => {
|
|
5958
5959
|
const _ = d(u);
|
|
@@ -5987,13 +5988,13 @@ const gt = ({
|
|
|
5987
5988
|
/* @__PURE__ */ i("p", { css: C === w.length - 1 ? H.date.last : H.date.other, children: u.date })
|
|
5988
5989
|
] }, u.eventId || C);
|
|
5989
5990
|
}) });
|
|
5990
|
-
}, b = /* @__PURE__ */ i("div", { css: H.filters, children:
|
|
5991
|
+
}, b = /* @__PURE__ */ i("div", { css: H.filters, children: Xl.map((S) => /* @__PURE__ */ i(
|
|
5991
5992
|
"button",
|
|
5992
5993
|
{
|
|
5993
5994
|
type: "button",
|
|
5994
5995
|
onClick: () => a(S),
|
|
5995
5996
|
css: r === S ? H.filter.on : H.filter.off,
|
|
5996
|
-
children: o(
|
|
5997
|
+
children: o(Kl[S])
|
|
5997
5998
|
},
|
|
5998
5999
|
S
|
|
5999
6000
|
)) }), g = e.form.home[r], h = e.form.away[r], E = e.streaks[r];
|
|
@@ -6001,8 +6002,8 @@ const gt = ({
|
|
|
6001
6002
|
/* @__PURE__ */ f("div", { css: H.form, children: [
|
|
6002
6003
|
b,
|
|
6003
6004
|
c(o("eventCard.detail.form.title", { count: Ft })),
|
|
6004
|
-
|
|
6005
|
-
|
|
6005
|
+
m(e.home.name, g),
|
|
6006
|
+
m(e.away.name, h)
|
|
6006
6007
|
] }),
|
|
6007
6008
|
E.length > 0 && /* @__PURE__ */ f("div", { css: H.section, children: [
|
|
6008
6009
|
/* @__PURE__ */ f("div", { css: H.streakHead, children: [
|
|
@@ -6016,7 +6017,7 @@ const gt = ({
|
|
|
6016
6017
|
css: y < E.length - 1 ? H.streakRow.ruled : H.streakRow.last,
|
|
6017
6018
|
children: [
|
|
6018
6019
|
/* @__PURE__ */ i("span", { css: H.streakValue, children: S.home }),
|
|
6019
|
-
/* @__PURE__ */ i("span", { css: H.streakLabel, children: o(
|
|
6020
|
+
/* @__PURE__ */ i("span", { css: H.streakLabel, children: o(ts(S.key, e.sport)) }),
|
|
6020
6021
|
/* @__PURE__ */ i("span", { css: H.streakAwayValue, children: S.away })
|
|
6021
6022
|
]
|
|
6022
6023
|
},
|
|
@@ -6028,8 +6029,8 @@ const gt = ({
|
|
|
6028
6029
|
/* @__PURE__ */ f("div", { css: H.columns, children: [
|
|
6029
6030
|
/* @__PURE__ */ i("p", { css: H.columnName, children: e.home.name }),
|
|
6030
6031
|
/* @__PURE__ */ i("p", { css: H.columnName, children: e.away.name }),
|
|
6031
|
-
|
|
6032
|
-
|
|
6032
|
+
p(e.home, g),
|
|
6033
|
+
p(e.away, h)
|
|
6033
6034
|
] })
|
|
6034
6035
|
] })
|
|
6035
6036
|
] });
|
|
@@ -6046,13 +6047,13 @@ const gt = ({
|
|
|
6046
6047
|
const { colors: a } = _e(), s = { width: `${r}em`, height: `${r}em` };
|
|
6047
6048
|
if (e === "goal" || e === "var")
|
|
6048
6049
|
return /* @__PURE__ */ i(
|
|
6049
|
-
|
|
6050
|
+
_a,
|
|
6050
6051
|
{
|
|
6051
6052
|
style: {
|
|
6052
6053
|
...s,
|
|
6053
6054
|
fontSize: `${r}em`,
|
|
6054
6055
|
opacity: e === "var" ? 0.55 : 1,
|
|
6055
|
-
color: "var(--fu-ucrc-
|
|
6056
|
+
color: "var(--fu-ucrc-palette-text-icon)"
|
|
6056
6057
|
}
|
|
6057
6058
|
}
|
|
6058
6059
|
);
|
|
@@ -6108,7 +6109,7 @@ const gt = ({
|
|
|
6108
6109
|
] });
|
|
6109
6110
|
}
|
|
6110
6111
|
return /* @__PURE__ */ i("div", { css: it.chipBox, style: s, children: /* @__PURE__ */ i("div", { css: e === "red" ? it.red : it.yellow }) });
|
|
6111
|
-
},
|
|
6112
|
+
}, Jl = 45, ec = "2.75em 1fr 3.25em 1fr", st = { display: "block", margin: 0, lineHeight: 1.5 }, Xt = { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, ut = t(st, Xt, {
|
|
6112
6113
|
minWidth: 0,
|
|
6113
6114
|
fontFamily: n.fontPrimary,
|
|
6114
6115
|
fontSize: "0.9375em",
|
|
@@ -6142,7 +6143,7 @@ const gt = ({
|
|
|
6142
6143
|
whiteSpace: "nowrap"
|
|
6143
6144
|
}), Wn = t({
|
|
6144
6145
|
display: "grid",
|
|
6145
|
-
gridTemplateColumns:
|
|
6146
|
+
gridTemplateColumns: ec,
|
|
6146
6147
|
alignItems: "center",
|
|
6147
6148
|
gap: "0.4375em",
|
|
6148
6149
|
padding: "0.4375em"
|
|
@@ -6243,12 +6244,12 @@ const gt = ({
|
|
|
6243
6244
|
whiteSpace: "nowrap"
|
|
6244
6245
|
}),
|
|
6245
6246
|
cell: t({ minWidth: 0 })
|
|
6246
|
-
},
|
|
6247
|
+
}, tc = ({ event: e, hero: o }) => {
|
|
6247
6248
|
const { t: r } = Se("common"), a = (u) => parseInt(u.minute, 10) || 0, s = (() => {
|
|
6248
6249
|
const u = [], C = [...e.timeline].sort((v, T) => a(v) - a(T)), _ = e.halfTime;
|
|
6249
6250
|
let k = !_;
|
|
6250
6251
|
return C.forEach((v) => {
|
|
6251
|
-
!k && a(v) >
|
|
6252
|
+
!k && a(v) > Jl && (u.push({
|
|
6252
6253
|
divider: !0,
|
|
6253
6254
|
label: r("eventCard.detail.summary.halfTimeLabel"),
|
|
6254
6255
|
score: `${_.home} - ${_.away}`
|
|
@@ -6262,7 +6263,7 @@ const gt = ({
|
|
|
6262
6263
|
label: r("eventCard.detail.summary.fullTimeLabel"),
|
|
6263
6264
|
score: `${e.home.score} - ${e.away.score}`
|
|
6264
6265
|
})), u;
|
|
6265
|
-
})(), l = (u) => u.kind === "sub" ? u.secondary ?? u.player : u.player, d = (u) => u.kind === "var" ? r("eventCard.detail.summary.tagVar") : u.kind !== "goal" ? null : u.isOwnGoal ? r("eventCard.detail.summary.tagOwnGoal") : u.isPenalty ? r("eventCard.detail.summary.tagPenalty") : null, c = (u) => u.kind === "sub" ? u.player ? r("eventCard.detail.summary.substitutedFor", { name: u.player }) : null : u.kind === "var" ? r("eventCard.detail.summary.goalDisallowed") : u.kind === "miss" ? r("eventCard.detail.summary.penaltyMissed") : null,
|
|
6266
|
+
})(), l = (u) => u.kind === "sub" ? u.secondary ?? u.player : u.player, d = (u) => u.kind === "var" ? r("eventCard.detail.summary.tagVar") : u.kind !== "goal" ? null : u.isOwnGoal ? r("eventCard.detail.summary.tagOwnGoal") : u.isPenalty ? r("eventCard.detail.summary.tagPenalty") : null, c = (u) => u.kind === "sub" ? u.player ? r("eventCard.detail.summary.substitutedFor", { name: pa(u.player) }) : null : u.kind === "var" ? r("eventCard.detail.summary.goalDisallowed") : u.kind === "miss" ? r("eventCard.detail.summary.penaltyMissed") : null, m = (u) => u.kind === "goal" && !!u.secondary && !u.isOwnGoal, p = (u) => u.kind === "goal" && !u.isOwnGoal ? n.text : u.kind === "miss" ? n.danger : n.dim, b = (u) => u.kind === "var" ? "var" : u.kind === "goal" ? u.isOwnGoal ? "ownGoal" : "goal" : u.kind === "sub" ? "sub" : "plain", g = (u) => {
|
|
6266
6267
|
switch (u) {
|
|
6267
6268
|
case "goal":
|
|
6268
6269
|
case "var":
|
|
@@ -6288,7 +6289,7 @@ const gt = ({
|
|
|
6288
6289
|
children: C
|
|
6289
6290
|
}
|
|
6290
6291
|
),
|
|
6291
|
-
|
|
6292
|
+
m(u) && // Badge instead of the spelled-out word: "Асистенция · Мак Алистър" is wider than the
|
|
6292
6293
|
// scorer's own name above it, which made the assist read as the headline. The full word
|
|
6293
6294
|
// stays one hover (or tap) away.
|
|
6294
6295
|
/* @__PURE__ */ i(Kt, { title: r("eventCard.detail.summary.assistLabel"), children: /* @__PURE__ */ f("div", { css: j.assist, children: [
|
|
@@ -6300,7 +6301,7 @@ const gt = ({
|
|
|
6300
6301
|
"div",
|
|
6301
6302
|
{
|
|
6302
6303
|
css: u.kind === "sub" || u.kind === "miss" ? j.icon.ringed : j.icon.bare,
|
|
6303
|
-
style: { color:
|
|
6304
|
+
style: { color: p(u) },
|
|
6304
6305
|
children: /* @__PURE__ */ i(Je, { kind: u.kind, sizeEm: g(u.kind) })
|
|
6305
6306
|
}
|
|
6306
6307
|
), y = (u) => /* @__PURE__ */ i("div", { css: j.side[u.side], children: u.side === "home" ? /* @__PURE__ */ f(B, { children: [
|
|
@@ -6332,7 +6333,7 @@ const gt = ({
|
|
|
6332
6333
|
`e-${C}`
|
|
6333
6334
|
);
|
|
6334
6335
|
}) });
|
|
6335
|
-
},
|
|
6336
|
+
}, nc = "rgba(255, 255, 255, 0.9)", Xr = t({
|
|
6336
6337
|
width: "100%",
|
|
6337
6338
|
height: "100%",
|
|
6338
6339
|
borderRadius: "50%",
|
|
@@ -6345,7 +6346,7 @@ const gt = ({
|
|
|
6345
6346
|
}), Pt = {
|
|
6346
6347
|
root: t({ position: "relative", flexShrink: 0 }),
|
|
6347
6348
|
disc: {
|
|
6348
|
-
pitch: t(Xr, { border: `2px solid ${
|
|
6349
|
+
pitch: t(Xr, { border: `2px solid ${nc}`, boxShadow: "0 2px 6px rgba(0, 0, 0, 0.3)" }),
|
|
6349
6350
|
list: t(Xr, { border: `1px solid ${n.border}`, boxShadow: "none" })
|
|
6350
6351
|
},
|
|
6351
6352
|
photo: t({ width: "100%", height: "100%", objectFit: "cover" })
|
|
@@ -6362,7 +6363,7 @@ const gt = ({
|
|
|
6362
6363
|
style: { width: `${r}em`, height: `${r}em`, opacity: s ? 0.72 : 1 },
|
|
6363
6364
|
children: /* @__PURE__ */ i("div", { css: a ? Pt.disc.pitch : Pt.disc.list, children: e ? /* @__PURE__ */ i("img", { src: e, alt: o ?? "", css: Pt.photo }) : /* @__PURE__ */ i(li, { size: `${r * 0.55}em`, color: n.dim }) })
|
|
6364
6365
|
}
|
|
6365
|
-
), Ui = ["#3E8C5C", "#37814F"],
|
|
6366
|
+
), Ui = ["#3E8C5C", "#37814F"], oc = (e) => /* @__PURE__ */ f(B, { children: [
|
|
6366
6367
|
/* @__PURE__ */ i("rect", { x: "5", y: "5", width: "90", height: "123", rx: "1" }),
|
|
6367
6368
|
/* @__PURE__ */ i("line", { x1: "5", y1: "66.5", x2: "95", y2: "66.5" }),
|
|
6368
6369
|
/* @__PURE__ */ i("circle", { cx: "50", cy: "66.5", r: "12" }),
|
|
@@ -6372,7 +6373,7 @@ const gt = ({
|
|
|
6372
6373
|
/* @__PURE__ */ i("rect", { x: "37", y: "120.7", width: "26", height: "7.3" }),
|
|
6373
6374
|
/* @__PURE__ */ i("circle", { cx: "50", cy: "20", r: "1", fill: e, stroke: "none" }),
|
|
6374
6375
|
/* @__PURE__ */ i("circle", { cx: "50", cy: "113", r: "1", fill: e, stroke: "none" })
|
|
6375
|
-
] }),
|
|
6376
|
+
] }), rc = () => /* @__PURE__ */ f(B, { children: [
|
|
6376
6377
|
/* @__PURE__ */ i("rect", { x: "5", y: "5", width: "90", height: "123", rx: "1" }),
|
|
6377
6378
|
/* @__PURE__ */ i("line", { x1: "5", y1: "66.5", x2: "95", y2: "66.5" }),
|
|
6378
6379
|
/* @__PURE__ */ i("circle", { cx: "50", cy: "66.5", r: "11" }),
|
|
@@ -6382,7 +6383,7 @@ const gt = ({
|
|
|
6382
6383
|
/* @__PURE__ */ i("rect", { x: "35", y: "101", width: "30", height: "27" }),
|
|
6383
6384
|
/* @__PURE__ */ i("circle", { cx: "50", cy: "101", r: "9" }),
|
|
6384
6385
|
/* @__PURE__ */ i("path", { d: "M12 128 V111 A38 38 0 0 1 88 111 V128" })
|
|
6385
|
-
] }),
|
|
6386
|
+
] }), ic = (e) => /* @__PURE__ */ f(B, { children: [
|
|
6386
6387
|
/* @__PURE__ */ i("rect", { x: "5", y: "5", width: "90", height: "123", rx: "14" }),
|
|
6387
6388
|
/* @__PURE__ */ i("line", { x1: "5", y1: "66.5", x2: "95", y2: "66.5", stroke: "#C8382F" }),
|
|
6388
6389
|
/* @__PURE__ */ i("circle", { cx: "50", cy: "66.5", r: "11" }),
|
|
@@ -6397,12 +6398,12 @@ const gt = ({
|
|
|
6397
6398
|
/* @__PURE__ */ i("circle", { cx: "26", cy: "103", r: "8", stroke: "#C8382F" }),
|
|
6398
6399
|
/* @__PURE__ */ i("circle", { cx: "74", cy: "103", r: "8", stroke: "#C8382F" }),
|
|
6399
6400
|
/* @__PURE__ */ i("circle", { cx: "50", cy: "66.5", r: "1.2", fill: e, stroke: "none" })
|
|
6400
|
-
] }),
|
|
6401
|
+
] }), ac = () => /* @__PURE__ */ f(B, { children: [
|
|
6401
6402
|
/* @__PURE__ */ i("rect", { x: "5", y: "5", width: "90", height: "123", rx: "1" }),
|
|
6402
6403
|
/* @__PURE__ */ i("line", { x1: "5", y1: "17", x2: "95", y2: "17" }),
|
|
6403
6404
|
/* @__PURE__ */ i("line", { x1: "5", y1: "116", x2: "95", y2: "116" }),
|
|
6404
6405
|
[27, 37, 47, 57, 66.5, 76, 86, 96, 106].map((e) => /* @__PURE__ */ i("line", { x1: "5", y1: e, x2: "95", y2: e, strokeOpacity: e === 66.5 ? 1 : 0.55 }, e))
|
|
6405
|
-
] }),
|
|
6406
|
+
] }), sc = (e) => /* @__PURE__ */ f(B, { children: [
|
|
6406
6407
|
/* @__PURE__ */ i("rect", { x: "5", y: "5", width: "90", height: "123" }),
|
|
6407
6408
|
/* @__PURE__ */ i("line", { x1: "17", y1: "5", x2: "17", y2: "128" }),
|
|
6408
6409
|
/* @__PURE__ */ i("line", { x1: "83", y1: "5", x2: "83", y2: "128" }),
|
|
@@ -6416,8 +6417,8 @@ const gt = ({
|
|
|
6416
6417
|
onLight: !1,
|
|
6417
6418
|
hasKeeper: !0,
|
|
6418
6419
|
defaultShape: [4, 4, 2],
|
|
6419
|
-
markings:
|
|
6420
|
-
},
|
|
6420
|
+
markings: oc
|
|
6421
|
+
}, lc = {
|
|
6421
6422
|
football: Vi,
|
|
6422
6423
|
basketball: {
|
|
6423
6424
|
turf: ["#C1803F", "#B87739"],
|
|
@@ -6426,7 +6427,7 @@ const gt = ({
|
|
|
6426
6427
|
// No keeper, and five starters: two guards, a forward, two bigs.
|
|
6427
6428
|
hasKeeper: !1,
|
|
6428
6429
|
defaultShape: [2, 1, 2],
|
|
6429
|
-
markings:
|
|
6430
|
+
markings: rc
|
|
6430
6431
|
},
|
|
6431
6432
|
hockey: {
|
|
6432
6433
|
turf: ["#EDF4FA", "#E3EDF6"],
|
|
@@ -6435,7 +6436,7 @@ const gt = ({
|
|
|
6435
6436
|
onLight: !0,
|
|
6436
6437
|
hasKeeper: !0,
|
|
6437
6438
|
defaultShape: [2, 3],
|
|
6438
|
-
markings:
|
|
6439
|
+
markings: ic
|
|
6439
6440
|
},
|
|
6440
6441
|
americanfootball: {
|
|
6441
6442
|
turf: Ui,
|
|
@@ -6443,7 +6444,7 @@ const gt = ({
|
|
|
6443
6444
|
hasKeeper: !1,
|
|
6444
6445
|
onLight: !1,
|
|
6445
6446
|
defaultShape: [5, 3, 3],
|
|
6446
|
-
markings:
|
|
6447
|
+
markings: ac
|
|
6447
6448
|
},
|
|
6448
6449
|
tennis: {
|
|
6449
6450
|
turf: ["#2F6BA8", "#2B639C"],
|
|
@@ -6452,11 +6453,11 @@ const gt = ({
|
|
|
6452
6453
|
hasKeeper: !1,
|
|
6453
6454
|
// One per side in singles; a doubles pair still fits on one row.
|
|
6454
6455
|
defaultShape: [2],
|
|
6455
|
-
markings:
|
|
6456
|
+
markings: sc
|
|
6456
6457
|
}
|
|
6457
|
-
},
|
|
6458
|
+
}, cc = ["basketball", "hockey", "americanfootball"], dc = (e) => !cc.includes(
|
|
6458
6459
|
(e ?? "").toLowerCase().replace(/[^a-z]/g, "")
|
|
6459
|
-
),
|
|
6460
|
+
), uc = (e) => lc[(e ?? "").toLowerCase().replace(/[^a-z]/g, "")] ?? Vi, mc = ({ spec: e }) => /* @__PURE__ */ f(B, { children: [
|
|
6460
6461
|
/* @__PURE__ */ i(
|
|
6461
6462
|
"div",
|
|
6462
6463
|
{
|
|
@@ -6479,17 +6480,17 @@ const gt = ({
|
|
|
6479
6480
|
children: e.markings(e.line)
|
|
6480
6481
|
}
|
|
6481
6482
|
)
|
|
6482
|
-
] }),
|
|
6483
|
+
] }), pc = "rgba(255, 255, 255, 0.9)", Oe = "#fff", Ln = "#111", Wt = t({
|
|
6483
6484
|
height: "1.3em",
|
|
6484
6485
|
borderRadius: "0.4375em",
|
|
6485
6486
|
fontSize: "0.68em",
|
|
6486
6487
|
fontWeight: 800,
|
|
6487
6488
|
display: "inline-flex",
|
|
6488
6489
|
alignItems: "center",
|
|
6489
|
-
border: `1.5px solid ${
|
|
6490
|
+
border: `1.5px solid ${Oe}`,
|
|
6490
6491
|
boxShadow: "0 1px 3px rgba(0, 0, 0, 0.35)",
|
|
6491
6492
|
whiteSpace: "nowrap"
|
|
6492
|
-
}),
|
|
6493
|
+
}), hc = t({
|
|
6493
6494
|
display: "flex",
|
|
6494
6495
|
flexDirection: "column",
|
|
6495
6496
|
alignItems: "center",
|
|
@@ -6517,25 +6518,44 @@ const gt = ({
|
|
|
6517
6518
|
width: "0.6em",
|
|
6518
6519
|
height: "0.85em",
|
|
6519
6520
|
borderRadius: "0.125em",
|
|
6520
|
-
border: `1px solid ${
|
|
6521
|
+
border: `1px solid ${Oe}`
|
|
6521
6522
|
}), Qr = t({
|
|
6522
6523
|
width: "2.375em",
|
|
6523
6524
|
height: "2.375em",
|
|
6524
6525
|
borderRadius: "50%",
|
|
6525
6526
|
boxSizing: "border-box"
|
|
6526
6527
|
}), Y = {
|
|
6527
|
-
goal: t(Wt, {
|
|
6528
|
-
|
|
6529
|
-
|
|
6528
|
+
goal: t(Wt, {
|
|
6529
|
+
padding: "0 0.1875em",
|
|
6530
|
+
gap: "0.0625em",
|
|
6531
|
+
background: Oe,
|
|
6532
|
+
color: Ln
|
|
6533
|
+
}),
|
|
6534
|
+
ownGoal: t(Wt, {
|
|
6535
|
+
padding: "0 0.25em 0 0.1875em",
|
|
6536
|
+
gap: "0.125em",
|
|
6537
|
+
background: n.danger,
|
|
6538
|
+
color: Oe
|
|
6539
|
+
}),
|
|
6540
|
+
assist: t(Wt, {
|
|
6541
|
+
padding: "0 0.25em",
|
|
6542
|
+
gap: "0.0625em",
|
|
6543
|
+
background: Oe,
|
|
6544
|
+
color: Ln
|
|
6545
|
+
}),
|
|
6530
6546
|
subOff: t(Wt, {
|
|
6531
6547
|
padding: "0 0.25em 0 0.125em",
|
|
6532
6548
|
gap: "0.0625em",
|
|
6533
6549
|
background: n.danger,
|
|
6534
|
-
color:
|
|
6550
|
+
color: Oe,
|
|
6535
6551
|
fontFamily: n.fontSecondary
|
|
6536
6552
|
}),
|
|
6537
|
-
column:
|
|
6538
|
-
avatarWrap: t({
|
|
6553
|
+
column: hc,
|
|
6554
|
+
avatarWrap: t({
|
|
6555
|
+
position: "relative",
|
|
6556
|
+
display: "inline-flex",
|
|
6557
|
+
fontSize: "0.8125em"
|
|
6558
|
+
}),
|
|
6539
6559
|
badges: t({
|
|
6540
6560
|
position: "absolute",
|
|
6541
6561
|
insetInlineStart: "-0.625em",
|
|
@@ -6549,7 +6569,12 @@ const gt = ({
|
|
|
6549
6569
|
red: t(Yr, { background: n.danger }),
|
|
6550
6570
|
yellow: t(Yr, { background: bt })
|
|
6551
6571
|
},
|
|
6552
|
-
captainPin: t({
|
|
6572
|
+
captainPin: t({
|
|
6573
|
+
position: "absolute",
|
|
6574
|
+
insetInlineEnd: "-0.3125em",
|
|
6575
|
+
top: "-0.3125em",
|
|
6576
|
+
display: "flex"
|
|
6577
|
+
}),
|
|
6553
6578
|
captain: t({
|
|
6554
6579
|
width: "1.3em",
|
|
6555
6580
|
height: "1.3em",
|
|
@@ -6561,19 +6586,40 @@ const gt = ({
|
|
|
6561
6586
|
display: "inline-flex",
|
|
6562
6587
|
alignItems: "center",
|
|
6563
6588
|
justifyContent: "center",
|
|
6564
|
-
border: `1.5px solid ${
|
|
6589
|
+
border: `1.5px solid ${Oe}`
|
|
6590
|
+
}),
|
|
6591
|
+
subPin: t({
|
|
6592
|
+
position: "absolute",
|
|
6593
|
+
insetInlineStart: "-0.375em",
|
|
6594
|
+
bottom: "-0.4375em",
|
|
6595
|
+
display: "flex"
|
|
6565
6596
|
}),
|
|
6566
|
-
subPin: t({ position: "absolute", insetInlineStart: "-0.375em", bottom: "-0.4375em", display: "flex" }),
|
|
6567
6597
|
name: {
|
|
6568
|
-
light: t(Kr, {
|
|
6569
|
-
|
|
6598
|
+
light: t(Kr, {
|
|
6599
|
+
color: Ln,
|
|
6600
|
+
textShadow: "0 1px 2px rgba(255, 255, 255, 0.7)"
|
|
6601
|
+
}),
|
|
6602
|
+
dark: t(Kr, {
|
|
6603
|
+
color: Oe,
|
|
6604
|
+
textShadow: "0 1px 2px rgba(0, 0, 0, 0.7)"
|
|
6605
|
+
})
|
|
6570
6606
|
},
|
|
6571
6607
|
shirt: t({ opacity: 0.75, marginInlineEnd: "0.3125em" }),
|
|
6572
6608
|
empty: {
|
|
6573
|
-
light: t(Qr, {
|
|
6574
|
-
|
|
6609
|
+
light: t(Qr, {
|
|
6610
|
+
background: "rgba(0, 0, 0, 0.06)",
|
|
6611
|
+
border: "2px dashed rgba(35, 60, 90, 0.35)"
|
|
6612
|
+
}),
|
|
6613
|
+
dark: t(Qr, {
|
|
6614
|
+
background: "rgba(255, 255, 255, 0.12)",
|
|
6615
|
+
border: `2px dashed ${pc}`
|
|
6616
|
+
})
|
|
6575
6617
|
},
|
|
6576
|
-
emptyLabel: t(ji, {
|
|
6618
|
+
emptyLabel: t(ji, {
|
|
6619
|
+
color: Oe,
|
|
6620
|
+
opacity: 0.55,
|
|
6621
|
+
textShadow: "0 1px 2px rgba(0, 0, 0, 0.7)"
|
|
6622
|
+
}),
|
|
6577
6623
|
pitch: t({
|
|
6578
6624
|
position: "relative",
|
|
6579
6625
|
aspectRatio: "3 / 4",
|
|
@@ -6604,9 +6650,10 @@ const gt = ({
|
|
|
6604
6650
|
background: "rgba(0, 0, 0, 0.38)",
|
|
6605
6651
|
borderRadius: "0.5em",
|
|
6606
6652
|
padding: "0.25em 0.5em 0.25em 0.3125em",
|
|
6607
|
-
color:
|
|
6653
|
+
color: Oe
|
|
6608
6654
|
}),
|
|
6609
|
-
|
|
6655
|
+
// No disc: a crest shows in its own shape.
|
|
6656
|
+
formationLogo: t({ width: "1.25em", height: "1.25em", flexShrink: 0 }),
|
|
6610
6657
|
formationText: t({
|
|
6611
6658
|
fontFamily: n.fontPrimary,
|
|
6612
6659
|
fontWeight: 800,
|
|
@@ -6620,26 +6667,30 @@ const gt = ({
|
|
|
6620
6667
|
flexDirection: "column",
|
|
6621
6668
|
justifyContent: "space-between"
|
|
6622
6669
|
}),
|
|
6623
|
-
row: t({
|
|
6624
|
-
|
|
6670
|
+
row: t({
|
|
6671
|
+
display: "flex",
|
|
6672
|
+
justifyContent: "space-evenly",
|
|
6673
|
+
alignItems: "flex-start"
|
|
6674
|
+
})
|
|
6675
|
+
}, fc = (e, o, r) => {
|
|
6625
6676
|
if (e.starting.length === 0) return [];
|
|
6626
|
-
const a = [...e.starting], s = (
|
|
6627
|
-
const
|
|
6628
|
-
for (;
|
|
6629
|
-
return
|
|
6630
|
-
}, l = (e.formation ?? "").split("-").map((
|
|
6631
|
-
return d.forEach((
|
|
6632
|
-
},
|
|
6633
|
-
const { t: a } = Se("common"), s =
|
|
6677
|
+
const a = [...e.starting], s = (m) => {
|
|
6678
|
+
const p = a.splice(0, m);
|
|
6679
|
+
for (; p.length < m; ) p.push(null);
|
|
6680
|
+
return p;
|
|
6681
|
+
}, l = (e.formation ?? "").split("-").map((m) => Number(m)).filter((m) => Number.isFinite(m) && m > 0), d = l.length > 0 ? l : r, c = o ? [s(1)] : [];
|
|
6682
|
+
return d.forEach((m) => c.push(s(m))), a.length && c.push(s(a.length)), c;
|
|
6683
|
+
}, gc = ({ team: e, lineup: o, sport: r }) => {
|
|
6684
|
+
const { t: a } = Se("common"), s = uc(r), l = fc(o, s.hasKeeper, s.defaultShape), d = (h) => /* @__PURE__ */ f("span", { css: Y.goal, children: [
|
|
6634
6685
|
/* @__PURE__ */ i(Je, { kind: "goal", sizeEm: 1 }),
|
|
6635
6686
|
h > 1 ? h : ""
|
|
6636
6687
|
] }), c = () => /* @__PURE__ */ f("span", { css: Y.ownGoal, children: [
|
|
6637
6688
|
/* @__PURE__ */ i(Je, { kind: "goal", sizeEm: 1 }),
|
|
6638
6689
|
"OG"
|
|
6639
|
-
] }),
|
|
6690
|
+
] }), m = (h) => /* @__PURE__ */ f("span", { css: Y.assist, children: [
|
|
6640
6691
|
a("eventCard.detail.summary.assistShort"),
|
|
6641
6692
|
h > 1 ? h : ""
|
|
6642
|
-
] }),
|
|
6693
|
+
] }), p = s.onLight ? "light" : "dark", b = (h) => /* @__PURE__ */ f("div", { css: Y.column, children: [
|
|
6643
6694
|
/* @__PURE__ */ f("span", { css: Y.avatarWrap, children: [
|
|
6644
6695
|
/* @__PURE__ */ i(
|
|
6645
6696
|
Gi,
|
|
@@ -6654,7 +6705,7 @@ const gt = ({
|
|
|
6654
6705
|
/* @__PURE__ */ f("span", { css: Y.badges, children: [
|
|
6655
6706
|
h.goals > 0 && d(h.goals),
|
|
6656
6707
|
h.ownGoals > 0 && c(),
|
|
6657
|
-
h.assists > 0 &&
|
|
6708
|
+
h.assists > 0 && m(h.assists)
|
|
6658
6709
|
] }),
|
|
6659
6710
|
h.card && /* @__PURE__ */ i("span", { css: Y.card[h.card] }),
|
|
6660
6711
|
h.captain && /* @__PURE__ */ i("div", { css: Y.captainPin, children: /* @__PURE__ */ i("span", { css: Y.captain, children: "C" }) }),
|
|
@@ -6663,21 +6714,23 @@ const gt = ({
|
|
|
6663
6714
|
h.subbedOffMinute
|
|
6664
6715
|
] }) })
|
|
6665
6716
|
] }),
|
|
6666
|
-
/* @__PURE__ */ f("p", { css: Y.name[
|
|
6717
|
+
/* @__PURE__ */ f("p", { css: Y.name[p], children: [
|
|
6667
6718
|
h.shirt && /* @__PURE__ */ i("span", { css: Y.shirt, children: h.shirt }),
|
|
6668
6719
|
h.name
|
|
6669
6720
|
] })
|
|
6670
6721
|
] }), g = () => /* @__PURE__ */ f("div", { css: Y.column, children: [
|
|
6671
|
-
/* @__PURE__ */ i("span", { css: Y.empty[
|
|
6722
|
+
/* @__PURE__ */ i("span", { css: Y.empty[p] }),
|
|
6672
6723
|
/* @__PURE__ */ i("p", { css: Y.emptyLabel, children: "—" })
|
|
6673
6724
|
] });
|
|
6674
6725
|
return /* @__PURE__ */ f("div", { css: Y.pitch, children: [
|
|
6675
|
-
/* @__PURE__ */ i(
|
|
6726
|
+
/* @__PURE__ */ i(mc, { spec: s }),
|
|
6676
6727
|
e.logoUrl && /* @__PURE__ */ i(
|
|
6677
6728
|
"div",
|
|
6678
6729
|
{
|
|
6679
6730
|
css: Y.watermark,
|
|
6680
|
-
style: {
|
|
6731
|
+
style: {
|
|
6732
|
+
background: `url(${e.logoUrl}) center / contain no-repeat`
|
|
6733
|
+
}
|
|
6681
6734
|
}
|
|
6682
6735
|
),
|
|
6683
6736
|
o.formation && /* @__PURE__ */ f("div", { css: Y.formation, children: [
|
|
@@ -6685,7 +6738,9 @@ const gt = ({
|
|
|
6685
6738
|
"span",
|
|
6686
6739
|
{
|
|
6687
6740
|
css: Y.formationLogo,
|
|
6688
|
-
style: {
|
|
6741
|
+
style: {
|
|
6742
|
+
background: `url(${e.logoUrl}) center / contain no-repeat`
|
|
6743
|
+
}
|
|
6689
6744
|
}
|
|
6690
6745
|
),
|
|
6691
6746
|
/* @__PURE__ */ i("span", { css: Y.formationText, children: o.formation })
|
|
@@ -6726,7 +6781,7 @@ const gt = ({
|
|
|
6726
6781
|
color: n.dim,
|
|
6727
6782
|
textTransform: "uppercase",
|
|
6728
6783
|
letterSpacing: "0.06em"
|
|
6729
|
-
}, oi = t({ display: "grid", gridTemplateColumns: "1fr 1fr", columnGap: "1.25em" }), ri = t({ transition: "transform 0.2s", color: "var(--fu-ucrc-
|
|
6784
|
+
}, oi = t({ display: "grid", gridTemplateColumns: "1fr 1fr", columnGap: "1.25em" }), ri = t({ transition: "transform 0.2s", color: "var(--fu-ucrc-palette-text-icon)" }), W = {
|
|
6730
6785
|
seg: {
|
|
6731
6786
|
overview: { on: t(Jr, qr), off: t(Jr, Zr) },
|
|
6732
6787
|
team: { on: t(ei, qr), off: t(ei, Zr) }
|
|
@@ -6898,10 +6953,10 @@ const gt = ({
|
|
|
6898
6953
|
}),
|
|
6899
6954
|
playerGrid: t(oi, { rowGap: "0.125em", alignItems: "center" }),
|
|
6900
6955
|
coachGrid: oi
|
|
6901
|
-
},
|
|
6902
|
-
const { t: o } = Se("common"), [r, a] = z("list"), s = !
|
|
6956
|
+
}, yc = ({ event: e }) => {
|
|
6957
|
+
const { t: o } = Se("common"), [r, a] = z("list"), s = !dc(e.sport), l = s ? "list" : r, [d, c] = z(!1);
|
|
6903
6958
|
if (!e.lineups) return null;
|
|
6904
|
-
const { home:
|
|
6959
|
+
const { home: m, away: p } = e.lineups, b = (R) => R === "home" ? e.home.name : e.away.name, g = () => /* @__PURE__ */ i(
|
|
6905
6960
|
"button",
|
|
6906
6961
|
{
|
|
6907
6962
|
type: "button",
|
|
@@ -6943,7 +6998,7 @@ const gt = ({
|
|
|
6943
6998
|
}
|
|
6944
6999
|
)
|
|
6945
7000
|
] }), S = () => /* @__PURE__ */ i("span", { css: W.captain, children: "C" }), y = (R) => {
|
|
6946
|
-
const A = R === "home" ?
|
|
7001
|
+
const A = R === "home" ? m : p, q = R === "home" ? e.home : e.away;
|
|
6947
7002
|
return /* @__PURE__ */ f("div", { css: W.overviewHeader, children: [
|
|
6948
7003
|
/* @__PURE__ */ i(
|
|
6949
7004
|
je,
|
|
@@ -7015,9 +7070,9 @@ const gt = ({
|
|
|
7015
7070
|
]
|
|
7016
7071
|
}
|
|
7017
7072
|
), O = (R) => {
|
|
7018
|
-
const A = R === "home" ?
|
|
7073
|
+
const A = R === "home" ? m : p, q = R === "home" ? e.home : e.away;
|
|
7019
7074
|
return /* @__PURE__ */ f(B, { children: [
|
|
7020
|
-
/* @__PURE__ */ i(
|
|
7075
|
+
/* @__PURE__ */ i(gc, { team: q, lineup: A, sport: e.sport }),
|
|
7021
7076
|
A.coach && /* @__PURE__ */ f("div", { css: W.teamCoach, children: [
|
|
7022
7077
|
/* @__PURE__ */ i("span", { css: W.teamCoachLabel, children: o("eventCard.detail.lineups.coach") }),
|
|
7023
7078
|
/* @__PURE__ */ i("span", { css: W.teamCoachName, children: A.coach })
|
|
@@ -7027,7 +7082,7 @@ const gt = ({
|
|
|
7027
7082
|
d && /* @__PURE__ */ i("div", { css: W.benchGrid, children: A.bench.map(I) })
|
|
7028
7083
|
] })
|
|
7029
7084
|
] });
|
|
7030
|
-
}, $ = Math.max(
|
|
7085
|
+
}, $ = Math.max(m.starting.length, p.starting.length), V = Math.max(m.bench.length, p.bench.length);
|
|
7031
7086
|
return /* @__PURE__ */ f("div", { css: W.root, children: [
|
|
7032
7087
|
!s && /* @__PURE__ */ f("div", { css: W.switcher, children: [
|
|
7033
7088
|
g(),
|
|
@@ -7039,19 +7094,19 @@ const gt = ({
|
|
|
7039
7094
|
y("home"),
|
|
7040
7095
|
y("away"),
|
|
7041
7096
|
Array.from({ length: $ }).map((R, A) => /* @__PURE__ */ f(Q.Fragment, { children: [
|
|
7042
|
-
w(
|
|
7043
|
-
w(
|
|
7097
|
+
w(m.starting[A]),
|
|
7098
|
+
w(p.starting[A])
|
|
7044
7099
|
] }, A))
|
|
7045
7100
|
] }),
|
|
7046
|
-
(
|
|
7047
|
-
u(
|
|
7048
|
-
u(
|
|
7101
|
+
(m.coach || p.coach) && /* @__PURE__ */ f("div", { css: W.coachGrid, children: [
|
|
7102
|
+
u(m),
|
|
7103
|
+
u(p)
|
|
7049
7104
|
] }),
|
|
7050
7105
|
V > 0 && /* @__PURE__ */ f(B, { children: [
|
|
7051
7106
|
N(d),
|
|
7052
7107
|
d && /* @__PURE__ */ i("div", { css: W.playerGrid, children: Array.from({ length: V }).map((R, A) => /* @__PURE__ */ f(Q.Fragment, { children: [
|
|
7053
|
-
w(
|
|
7054
|
-
w(
|
|
7108
|
+
w(m.bench[A]),
|
|
7109
|
+
w(p.bench[A])
|
|
7055
7110
|
] }, A)) })
|
|
7056
7111
|
] })
|
|
7057
7112
|
] })
|
|
@@ -7071,18 +7126,18 @@ const gt = ({
|
|
|
7071
7126
|
} : {},
|
|
7072
7127
|
...e === "compact" ? { borderTop: `1px solid ${n.border}` } : {}
|
|
7073
7128
|
});
|
|
7074
|
-
},
|
|
7129
|
+
}, bc = {
|
|
7075
7130
|
compact: Tn("compact"),
|
|
7076
7131
|
standard: Tn("standard"),
|
|
7077
7132
|
hero: Tn("hero")
|
|
7078
|
-
},
|
|
7133
|
+
}, wc = ({
|
|
7079
7134
|
event: e,
|
|
7080
7135
|
status: o,
|
|
7081
7136
|
variant: r,
|
|
7082
7137
|
visible: a,
|
|
7083
7138
|
defaultSection: s
|
|
7084
7139
|
}) => {
|
|
7085
|
-
const { t: l } = Se("common"), [d, c] = z(() => a.length === 0 ? null : s && a.includes(s) ? s : a[0]),
|
|
7140
|
+
const { t: l } = Se("common"), [d, c] = z(() => a.length === 0 ? null : s && a.includes(s) ? s : a[0]), m = d && a.includes(d) ? d : a[0] ?? null, p = we(
|
|
7086
7141
|
() => Object.fromEntries(
|
|
7087
7142
|
a.map((S) => [
|
|
7088
7143
|
S,
|
|
@@ -7091,39 +7146,39 @@ const gt = ({
|
|
|
7091
7146
|
),
|
|
7092
7147
|
[a, l]
|
|
7093
7148
|
);
|
|
7094
|
-
if (!
|
|
7149
|
+
if (!m) return null;
|
|
7095
7150
|
const b = r === "hero", g = () => {
|
|
7096
|
-
switch (
|
|
7151
|
+
switch (m) {
|
|
7097
7152
|
case "preview":
|
|
7098
|
-
return /* @__PURE__ */ i(
|
|
7153
|
+
return /* @__PURE__ */ i(Zl, { event: e });
|
|
7099
7154
|
case "summary":
|
|
7100
|
-
return /* @__PURE__ */ i(
|
|
7155
|
+
return /* @__PURE__ */ i(tc, { event: e, hero: b });
|
|
7101
7156
|
case "stats":
|
|
7102
|
-
return /* @__PURE__ */ i(
|
|
7157
|
+
return /* @__PURE__ */ i(Hl, { event: e, status: o, variant: r });
|
|
7103
7158
|
case "lineups":
|
|
7104
|
-
return /* @__PURE__ */ i(
|
|
7159
|
+
return /* @__PURE__ */ i(yc, { event: e });
|
|
7105
7160
|
case "table":
|
|
7106
|
-
return /* @__PURE__ */ i(Bl, { event: e, hero: b });
|
|
7107
|
-
case "h2h":
|
|
7108
7161
|
return /* @__PURE__ */ i(Ul, { event: e, hero: b });
|
|
7162
|
+
case "h2h":
|
|
7163
|
+
return /* @__PURE__ */ i(jl, { event: e, hero: b });
|
|
7109
7164
|
default:
|
|
7110
7165
|
return null;
|
|
7111
7166
|
}
|
|
7112
7167
|
}, h = /* @__PURE__ */ i(
|
|
7113
|
-
|
|
7168
|
+
Ml,
|
|
7114
7169
|
{
|
|
7115
7170
|
tabs: a,
|
|
7116
|
-
active:
|
|
7171
|
+
active: m,
|
|
7117
7172
|
onChange: c,
|
|
7118
7173
|
variant: r,
|
|
7119
|
-
labels:
|
|
7174
|
+
labels: p
|
|
7120
7175
|
}
|
|
7121
|
-
), E = /* @__PURE__ */ i("div", { css:
|
|
7176
|
+
), E = /* @__PURE__ */ i("div", { css: bc[r], children: g() });
|
|
7122
7177
|
return /* @__PURE__ */ f(B, { children: [
|
|
7123
7178
|
h,
|
|
7124
7179
|
E
|
|
7125
7180
|
] });
|
|
7126
|
-
},
|
|
7181
|
+
}, xc = t({
|
|
7127
7182
|
display: "block",
|
|
7128
7183
|
margin: 0,
|
|
7129
7184
|
fontFamily: n.fontSecondary,
|
|
@@ -7132,7 +7187,7 @@ const gt = ({
|
|
|
7132
7187
|
color: n.dim,
|
|
7133
7188
|
textAlign: "center",
|
|
7134
7189
|
padding: n.spaceLg
|
|
7135
|
-
}),
|
|
7190
|
+
}), Sc = ({
|
|
7136
7191
|
eventId: e,
|
|
7137
7192
|
sdk: o,
|
|
7138
7193
|
language: r,
|
|
@@ -7141,8 +7196,8 @@ const gt = ({
|
|
|
7141
7196
|
showCompetition: l = !0,
|
|
7142
7197
|
liveRefresh: d = !0,
|
|
7143
7198
|
refreshInterval: c = 3e4,
|
|
7144
|
-
userIsLoggedIn:
|
|
7145
|
-
predictions:
|
|
7199
|
+
userIsLoggedIn: m = !1,
|
|
7200
|
+
predictions: p,
|
|
7146
7201
|
showOdds: b = !1,
|
|
7147
7202
|
odds: g,
|
|
7148
7203
|
operatorId: h,
|
|
@@ -7155,13 +7210,13 @@ const gt = ({
|
|
|
7155
7210
|
showHeadToHead: _,
|
|
7156
7211
|
defaultSection: k
|
|
7157
7212
|
}) => {
|
|
7158
|
-
const { t: v } = Se("common"), T = a === "detailed", { data: x, loading: I, error: N } =
|
|
7213
|
+
const { t: v } = Se("common"), T = a === "detailed", { data: x, loading: I, error: N } = xs(
|
|
7159
7214
|
o,
|
|
7160
7215
|
e,
|
|
7161
7216
|
r,
|
|
7162
7217
|
d,
|
|
7163
7218
|
c
|
|
7164
|
-
), O = (g == null ? void 0 : g.market) ?? "FT_1X2", $ = (x == null ? void 0 : x.status) === "UPCOMING" || (x == null ? void 0 : x.status) === "LIVE" ? e : null, { odds: V } =
|
|
7219
|
+
), O = (g == null ? void 0 : g.market) ?? "FT_1X2", $ = (x == null ? void 0 : x.status) === "UPCOMING" || (x == null ? void 0 : x.status) === "LIVE" ? e : null, { odds: V } = ha(o, $ ? [$] : [], {
|
|
7165
7220
|
enabled: b && !!$,
|
|
7166
7221
|
markets: [O],
|
|
7167
7222
|
sport: (x == null ? void 0 : x.sport) ?? null,
|
|
@@ -7170,20 +7225,20 @@ const gt = ({
|
|
|
7170
7225
|
affiliateId: g == null ? void 0 : g.affiliateId,
|
|
7171
7226
|
affiliateIds: g == null ? void 0 : g.affiliateIds
|
|
7172
7227
|
}), R = $ && V.get($) || null, A = we(
|
|
7173
|
-
() =>
|
|
7174
|
-
[
|
|
7175
|
-
), q =
|
|
7228
|
+
() => $s(p == null ? void 0 : p.markets),
|
|
7229
|
+
[p == null ? void 0 : p.markets]
|
|
7230
|
+
), q = m && A.length > 0 && (x == null ? void 0 : x.sport) === "football", { matchId: K, availableMarkets: ie } = Rs(
|
|
7176
7231
|
o,
|
|
7177
7232
|
x,
|
|
7178
7233
|
!!q
|
|
7179
7234
|
), Z = we(
|
|
7180
|
-
() =>
|
|
7235
|
+
() => Ns(A, ie, K),
|
|
7181
7236
|
[A, ie, K]
|
|
7182
|
-
), J = q && Z.length > 0, he = !!(
|
|
7237
|
+
), J = q && Z.length > 0, he = !!(p != null && p.showSummary) && !!J, ae = Z.some((P) => Pe(P) === "player"), {
|
|
7183
7238
|
players: pe,
|
|
7184
7239
|
loading: ve,
|
|
7185
7240
|
playerName: G
|
|
7186
|
-
} =
|
|
7241
|
+
} = Ls(
|
|
7187
7242
|
o,
|
|
7188
7243
|
(x == null ? void 0 : x.home.id) ?? null,
|
|
7189
7244
|
(x == null ? void 0 : x.away.id) ?? null,
|
|
@@ -7193,7 +7248,7 @@ const gt = ({
|
|
|
7193
7248
|
loading: ke,
|
|
7194
7249
|
submit: Xe,
|
|
7195
7250
|
remove: ee
|
|
7196
|
-
} =
|
|
7251
|
+
} = Es(
|
|
7197
7252
|
o,
|
|
7198
7253
|
K,
|
|
7199
7254
|
Z,
|
|
@@ -7204,7 +7259,7 @@ const gt = ({
|
|
|
7204
7259
|
// predictions, and the crowd count simply appears when its data lands.
|
|
7205
7260
|
error: se,
|
|
7206
7261
|
recordOwnVote: We
|
|
7207
|
-
} =
|
|
7262
|
+
} = Qs(o, K, !!he && !!K), { results: ze } = Ts(
|
|
7208
7263
|
o,
|
|
7209
7264
|
K,
|
|
7210
7265
|
!!J && !!K && (x == null ? void 0 : x.status) === "FINISHED"
|
|
@@ -7218,7 +7273,7 @@ const gt = ({
|
|
|
7218
7273
|
);
|
|
7219
7274
|
}), P;
|
|
7220
7275
|
}, [oe]), De = we(
|
|
7221
|
-
() =>
|
|
7276
|
+
() => Ks(fe, Z, {
|
|
7222
7277
|
results: ze,
|
|
7223
7278
|
ownKeys: Re
|
|
7224
7279
|
}),
|
|
@@ -7231,20 +7286,20 @@ const gt = ({
|
|
|
7231
7286
|
);
|
|
7232
7287
|
if (I)
|
|
7233
7288
|
return /* @__PURE__ */ i(ft, { variant: "state", children: /* @__PURE__ */ i(qi, { marginBlock: "3em" }) });
|
|
7234
|
-
const Ke = (P) => /* @__PURE__ */ i(ft, { variant: "state", children: /* @__PURE__ */ i("p", { css:
|
|
7289
|
+
const Ke = (P) => /* @__PURE__ */ i(ft, { variant: "state", children: /* @__PURE__ */ i("p", { css: xc, children: P }) });
|
|
7235
7290
|
if (N) return Ke(v("eventCard.loadFailed"));
|
|
7236
7291
|
if (!x) return Ke(v("eventCard.notAvailable"));
|
|
7237
|
-
const Me = l ? /* @__PURE__ */ i(
|
|
7292
|
+
const Me = l ? /* @__PURE__ */ i(Zs, { competition: x.competition, template: s }) : null, $e = {
|
|
7238
7293
|
today: v("eventCard.today"),
|
|
7239
7294
|
tomorrow: v("eventCard.tomorrow"),
|
|
7240
7295
|
sets: v("eventCard.sets"),
|
|
7241
7296
|
// Short caption for the penalty shootout score line (reuses the "Pen." status abbreviation).
|
|
7242
7297
|
penalties: v("eventCard.status.pen")
|
|
7243
|
-
}, He =
|
|
7298
|
+
}, He = Ds(
|
|
7244
7299
|
x.status,
|
|
7245
7300
|
x.startsAt,
|
|
7246
|
-
|
|
7247
|
-
),
|
|
7301
|
+
p == null ? void 0 : p.cutoffMinutes
|
|
7302
|
+
), Le = {
|
|
7248
7303
|
homeName: x.home.name,
|
|
7249
7304
|
awayName: x.away.name,
|
|
7250
7305
|
draw: v("matchQuiz.fixtures.draw"),
|
|
@@ -7262,11 +7317,11 @@ const gt = ({
|
|
|
7262
7317
|
correctShare: (P) => v("eventCard.summary.correctShare", { percentage: P })
|
|
7263
7318
|
}, Ye = /* @__PURE__ */ new Map();
|
|
7264
7319
|
Z.forEach((P) => {
|
|
7265
|
-
const X =
|
|
7320
|
+
const X = Us(P, ze, Le);
|
|
7266
7321
|
X && Ye.set(P, X);
|
|
7267
7322
|
});
|
|
7268
7323
|
const Be = J && K && (He || oe.size > 0) ? /* @__PURE__ */ i(
|
|
7269
|
-
|
|
7324
|
+
Pl,
|
|
7270
7325
|
{
|
|
7271
7326
|
markets: Z,
|
|
7272
7327
|
home: x.home,
|
|
@@ -7274,11 +7329,11 @@ const gt = ({
|
|
|
7274
7329
|
predictions: oe,
|
|
7275
7330
|
predictionsLoading: ke,
|
|
7276
7331
|
locked: !He,
|
|
7277
|
-
canDelete: ((
|
|
7332
|
+
canDelete: ((p == null ? void 0 : p.allowDelete) ?? !0) && // Withdrawing stays possible while the match is in play, but a finished result is graded —
|
|
7278
7333
|
// there's nothing left to withdraw from.
|
|
7279
7334
|
x.status !== "FINISHED" && x.status !== "CANCELLED",
|
|
7280
|
-
defaultExpanded: (
|
|
7281
|
-
display: (
|
|
7335
|
+
defaultExpanded: (p == null ? void 0 : p.defaultExpanded) ?? !1,
|
|
7336
|
+
display: (p == null ? void 0 : p.display) ?? "drawer",
|
|
7282
7337
|
variant: s,
|
|
7283
7338
|
players: pe,
|
|
7284
7339
|
playersLoading: ve,
|
|
@@ -7286,13 +7341,13 @@ const gt = ({
|
|
|
7286
7341
|
submit: Xe,
|
|
7287
7342
|
remove: ee,
|
|
7288
7343
|
crowd: se ? void 0 : nt,
|
|
7289
|
-
crowdLabels: se ? void 0 :
|
|
7344
|
+
crowdLabels: se ? void 0 : Le,
|
|
7290
7345
|
results: Ye,
|
|
7291
7346
|
resultLabel: v("eventCard.predictions.actualResult"),
|
|
7292
7347
|
onOwnVoteChanged: We
|
|
7293
7348
|
}
|
|
7294
7349
|
) : null, L = R ? /* @__PURE__ */ i(
|
|
7295
|
-
|
|
7350
|
+
fa,
|
|
7296
7351
|
{
|
|
7297
7352
|
odds: R,
|
|
7298
7353
|
market: O,
|
|
@@ -7302,12 +7357,12 @@ const gt = ({
|
|
|
7302
7357
|
onSelect: E == null ? void 0 : E.onAddToBetslip
|
|
7303
7358
|
}
|
|
7304
7359
|
) : null, M = T ? /* @__PURE__ */ i(
|
|
7305
|
-
|
|
7360
|
+
wc,
|
|
7306
7361
|
{
|
|
7307
7362
|
event: x,
|
|
7308
7363
|
status: x.status,
|
|
7309
7364
|
variant: s,
|
|
7310
|
-
visible:
|
|
7365
|
+
visible: fs(x.status, x, {
|
|
7311
7366
|
showForm: S,
|
|
7312
7367
|
showStats: y,
|
|
7313
7368
|
showLineups: w,
|
|
@@ -7319,7 +7374,7 @@ const gt = ({
|
|
|
7319
7374
|
}
|
|
7320
7375
|
) : null;
|
|
7321
7376
|
return s === "standard" ? /* @__PURE__ */ i(
|
|
7322
|
-
|
|
7377
|
+
al,
|
|
7323
7378
|
{
|
|
7324
7379
|
event: x,
|
|
7325
7380
|
language: r,
|
|
@@ -7330,7 +7385,7 @@ const gt = ({
|
|
|
7330
7385
|
detail: M
|
|
7331
7386
|
}
|
|
7332
7387
|
) : s === "hero" ? /* @__PURE__ */ i(
|
|
7333
|
-
|
|
7388
|
+
sl,
|
|
7334
7389
|
{
|
|
7335
7390
|
event: x,
|
|
7336
7391
|
language: r,
|
|
@@ -7341,7 +7396,7 @@ const gt = ({
|
|
|
7341
7396
|
detail: M
|
|
7342
7397
|
}
|
|
7343
7398
|
) : /* @__PURE__ */ i(
|
|
7344
|
-
|
|
7399
|
+
il,
|
|
7345
7400
|
{
|
|
7346
7401
|
event: x,
|
|
7347
7402
|
showHeaderBorder: l,
|
|
@@ -7353,7 +7408,7 @@ const gt = ({
|
|
|
7353
7408
|
detail: M
|
|
7354
7409
|
}
|
|
7355
7410
|
);
|
|
7356
|
-
},
|
|
7411
|
+
}, vc = (e) => /* @__PURE__ */ i(
|
|
7357
7412
|
Zi,
|
|
7358
7413
|
{
|
|
7359
7414
|
packageName: "event-card",
|
|
@@ -7361,9 +7416,9 @@ const gt = ({
|
|
|
7361
7416
|
themeOptions: e.themeOptions,
|
|
7362
7417
|
disableCache: e.disableCache,
|
|
7363
7418
|
fillHeight: !0,
|
|
7364
|
-
children: /* @__PURE__ */ i(
|
|
7419
|
+
children: /* @__PURE__ */ i(Sc, { ...e })
|
|
7365
7420
|
}
|
|
7366
|
-
),
|
|
7421
|
+
), $c = Ra(vc);
|
|
7367
7422
|
export {
|
|
7368
|
-
|
|
7423
|
+
$c as EventCard
|
|
7369
7424
|
};
|