fansunited-frontend-components 0.0.95 → 0.0.96
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.d.ts +1 -2
- package/Betslip.d.ts.map +1 -1
- package/Betslip.js +4 -3
- package/ChanceGame.js +165 -163
- package/ChanceGameComponent.d.ts +1 -1
- package/ChanceGameComponent.d.ts.map +1 -1
- package/ClassicQuizPlay.d.ts +1 -1
- package/ClassicQuizPlay.d.ts.map +1 -1
- package/ClassicQuizPlay.js +4 -3
- package/CollectLead.d.ts +1 -1
- package/CollectLead.d.ts.map +1 -1
- package/CollectLead.js +37 -36
- package/CompetitionStatistics.d.ts +1 -2
- package/CompetitionStatistics.d.ts.map +1 -1
- package/CompetitionStatistics.js +458 -451
- package/CompetitorCard.d.ts +1 -2
- package/CompetitorCard.d.ts.map +1 -1
- package/CompetitorCard.js +1235 -1226
- package/Discussion.d.ts +1 -1
- package/Discussion.d.ts.map +1 -1
- package/Discussion.js +4 -3
- package/EitherOrPlay.d.ts +1 -1
- package/EitherOrPlay.d.ts.map +1 -1
- package/EitherOrPlay.js +4 -3
- package/EventCard.d.ts +1 -2
- package/EventCard.d.ts.map +1 -1
- package/EventCard.js +1249 -1244
- package/EventGamePlay.d.ts +1 -1
- package/EventGamePlay.d.ts.map +1 -1
- package/EventGamePlay.js +4 -3
- package/Leaderboard.d.ts +1 -1
- package/Leaderboard.d.ts.map +1 -1
- package/Leaderboard.js +482 -449
- package/List.d.ts +1 -2
- package/List.d.ts.map +1 -1
- package/List.js +258 -254
- package/MatchQuizPlay.d.ts +1 -1
- package/MatchQuizPlay.d.ts.map +1 -1
- package/MatchQuizPlay.js +4 -3
- package/Odds.d.ts +1 -2
- package/Odds.d.ts.map +1 -1
- package/Odds.js +35 -34
- package/PersonalityQuizPlay.d.ts +1 -1
- package/PersonalityQuizPlay.d.ts.map +1 -1
- package/PersonalityQuizPlay.js +4 -3
- package/PickThePair.js +102 -100
- package/PickThePairComponent.d.ts +1 -1
- package/PickThePairComponent.d.ts.map +1 -1
- package/PlayerOfTheMatch.d.ts +1 -2
- package/PlayerOfTheMatch.d.ts.map +1 -1
- package/PlayerOfTheMatch.js +1096 -1085
- package/PollVote.d.ts +1 -1
- package/PollVote.d.ts.map +1 -1
- package/PollVote.js +4 -3
- package/Predictor.d.ts +1 -2
- package/Predictor.d.ts.map +1 -1
- package/Predictor.js +4553 -4525
- package/README.md +1 -1
- package/Standings.d.ts +1 -2
- package/Standings.d.ts.map +1 -1
- package/Standings.js +404 -394
- package/TopX.d.ts +1 -2
- package/TopX.d.ts.map +1 -1
- package/TopX.js +5296 -5286
- package/chunks/{ChanceGameEmbedVariant-C3NGwvTF.js → ChanceGameEmbedVariant-CVys-3Zh.js} +1 -1
- package/chunks/{OddsSkeleton-Bav8FHHN.js → OddsSkeleton-ClJE2xhR.js} +5 -5
- package/chunks/{OddsStrip-CviVfQI4.js → OddsStrip-BnSp5TXa.js} +3 -3
- package/chunks/{PickOneOfX-a6Dv0-rR.js → PickOneOfX-DaJtkbCw.js} +6 -6
- package/chunks/index-Aq5MbUB9.js +4 -0
- package/chunks/index-BBQm_8LD.js +4 -0
- package/chunks/index-BC_sWWgc.js +4 -0
- package/chunks/index-DXKDJ1Vp.js +4 -0
- package/chunks/index-DjT5NrbA.js +4 -0
- package/chunks/index-DvLRehH6.js +4 -0
- package/chunks/index-aIMaxR-p.js +4 -0
- package/chunks/{main-Dj4Manb5.js → main-52Wff7qC.js} +1763 -1757
- package/chunks/{main-dwV_55lz.js → main-65WcUqAl.js} +615 -615
- package/chunks/{main-gexg6lc-.js → main-B58mi9jx.js} +349 -334
- package/chunks/{main-Dys2_Jt2.js → main-BIdXUTZS.js} +842 -827
- package/chunks/{main-CFwRpvUi.js → main-DD-NEzC7.js} +818 -817
- package/chunks/{main-DjiQz1dv.js → main-DUnfJPzY.js} +311 -311
- package/chunks/{main-eAQMCxQ7.js → main-DpCBqqg_.js} +322 -321
- package/chunks/{main-D9tFZv2q.js → main-Drznt1ak.js} +283 -282
- package/chunks/withVersionStamp-B6nArAj4.js +16 -0
- package/index.d.ts.map +1 -1
- package/index.js +45 -50
- package/package.json +57 -49
- package/withVersionStamp.d.ts +4 -0
- package/withVersionStamp.d.ts.map +1 -0
- package/chunks/3dicons-bookmark-fav-dynamic-color-BkMV51tL.js +0 -4
- package/chunks/3dicons-crow-dynamic-color-BnvCj9i8.js +0 -4
- package/chunks/3dicons-fire-dynamic-color-rNRL0kAe.js +0 -4
- package/chunks/3dicons-flag-dynamic-color-BscQxNXn.js +0 -4
- package/chunks/3dicons-medal-dynamic-color-CsR036OL.js +0 -4
- package/chunks/3dicons-rocket-dynamic-color-EiHCJ2rb.js +0 -4
- package/chunks/3dicons-target-dynamic-color-ChQzHpwv.js +0 -4
- package/chunks/3dicons-thumb-down-dynamic-color-NQLnsNFt.js +0 -4
- package/chunks/index-B1d9q8fX.js +0 -4
- package/chunks/index-BP0pvFJ4.js +0 -4
- package/chunks/index-CHZyL_g_.js +0 -4
- package/chunks/index-CeCUdRmF.js +0 -4
- package/chunks/index-Ckyyw-I8.js +0 -4
- package/chunks/index-DGvCP5G8.js +0 -4
- package/chunks/index-yjMVOgwO.js +0 -4
package/CompetitionStatistics.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { jsx as r, jsxs as y, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import L, { useState as ee, useEffect as pe, useMemo as le } from "react";
|
|
3
3
|
import { Box as m, GlobalStyles as tt } from "@mui/joy";
|
|
4
|
-
import { fetchSearchEntitiesByIds as ot,
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
import { O as
|
|
7
|
-
import "fansunited-sdk-esm";
|
|
8
|
-
import { c as
|
|
9
|
-
import { CacheProvider as
|
|
10
|
-
import { createPortal as
|
|
4
|
+
import { fetchSearchEntitiesByIds as ot, useDisableCache as nt, useColors as rt, useFontFamily as st, useCornerRadius as it, useCurrentThemeMode as at, hexToRgb as lt, toIntlLocale as dt, isMobile as xe, isExtraSmall as ct, Spinner as ut, getLanguageDirection as pt, initializeI18n as mt, applyDirectionToMount as ht, widgetCacheKey as gt, createWidgetCache as ft, ContainerProvider as yt, ThemeProvider as xt, ConstantsProvider as bt } from "fansunited-frontend-core";
|
|
5
|
+
import { useTranslation as wt } from "react-i18next";
|
|
6
|
+
import { O as Ct, a as St } from "./chunks/OddsStrip-BnSp5TXa.js";
|
|
7
|
+
import "fansunited-sdk-esm/enums";
|
|
8
|
+
import { c as vt } from "./chunks/createLucideIcon-YBRjY5Kl.js";
|
|
9
|
+
import { CacheProvider as It } from "@emotion/react";
|
|
10
|
+
import { createPortal as $t } from "react-dom";
|
|
11
|
+
import { w as Tt } from "./chunks/withVersionStamp-B6nArAj4.js";
|
|
11
12
|
/**
|
|
12
13
|
* @license lucide-react v0.454.0 - ISC
|
|
13
14
|
*
|
|
14
15
|
* This source code is licensed under the ISC license.
|
|
15
16
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
17
|
*/
|
|
17
|
-
const
|
|
18
|
+
const kt = vt("Tv", [
|
|
18
19
|
["rect", { width: "20", height: "15", x: "2", y: "7", rx: "2", ry: "2", key: "10ag99" }],
|
|
19
20
|
["polyline", { points: "17 2 12 7 7 2", key: "11pgbg" }]
|
|
20
21
|
]), Oe = "https://sports.fansunitedapi.com/v1", Fe = (e) => {
|
|
@@ -27,40 +28,41 @@ const $t = St("Tv", [
|
|
|
27
28
|
}, Ne = (e) => {
|
|
28
29
|
const t = Fe(e);
|
|
29
30
|
return t ? new URLSearchParams({ key: t.apiKey, client_id: t.clientId }) : null;
|
|
30
|
-
},
|
|
31
|
-
const
|
|
32
|
-
if (!
|
|
33
|
-
o &&
|
|
34
|
-
const
|
|
35
|
-
`${Oe}/competitions/${encodeURIComponent(t)}?${
|
|
31
|
+
}, _t = async (e, t, o, s, i = !1) => {
|
|
32
|
+
const a = Ne(e);
|
|
33
|
+
if (!a || !t) return null;
|
|
34
|
+
o && a.set("season_id", o), i && a.set("disable_cache", String(Date.now()));
|
|
35
|
+
const c = await fetch(
|
|
36
|
+
`${Oe}/competitions/${encodeURIComponent(t)}?${a.toString()}`,
|
|
36
37
|
{ signal: s }
|
|
37
38
|
);
|
|
38
|
-
if (!
|
|
39
|
-
const
|
|
40
|
-
return
|
|
41
|
-
},
|
|
42
|
-
var
|
|
43
|
-
const
|
|
44
|
-
if (!
|
|
45
|
-
s.set("disable_cache", String(Date.now()));
|
|
39
|
+
if (!c.ok) throw new Error(`Sports API responded ${c.status}`);
|
|
40
|
+
const l = await c.json(), d = (l == null ? void 0 : l.data) ?? l;
|
|
41
|
+
return d != null && d.id ? d : null;
|
|
42
|
+
}, Rt = async (e, t, o, s = !1) => {
|
|
43
|
+
var a;
|
|
44
|
+
const i = Ne(e);
|
|
45
|
+
if (!i) return null;
|
|
46
|
+
s && i.set("disable_cache", String(Date.now()));
|
|
46
47
|
try {
|
|
47
|
-
const
|
|
48
|
-
`${Oe}/events/${encodeURIComponent(t)}?${
|
|
48
|
+
const c = await fetch(
|
|
49
|
+
`${Oe}/events/${encodeURIComponent(t)}?${i.toString()}`,
|
|
49
50
|
{ signal: o }
|
|
50
51
|
);
|
|
51
|
-
if (!
|
|
52
|
-
const
|
|
53
|
-
return
|
|
52
|
+
if (!c.ok) return null;
|
|
53
|
+
const l = await c.json(), d = (a = (l == null ? void 0 : l.data) ?? l) == null ? void 0 : a.event;
|
|
54
|
+
return d != null && d.id ? d : null;
|
|
54
55
|
} catch {
|
|
55
56
|
return null;
|
|
56
57
|
}
|
|
57
|
-
},
|
|
58
|
-
const
|
|
59
|
-
return !
|
|
58
|
+
}, Et = async (e, t, o, s = !1) => {
|
|
59
|
+
const i = /* @__PURE__ */ new Map(), a = Fe(e);
|
|
60
|
+
return !a || t.length === 0 || (await ot(a, t, {
|
|
60
61
|
signal: o,
|
|
61
|
-
partial: !0
|
|
62
|
-
|
|
63
|
-
}
|
|
62
|
+
partial: !0,
|
|
63
|
+
disableCache: s
|
|
64
|
+
})).forEach((l) => i.set(l.id, l)), i;
|
|
65
|
+
}, Mt = ["1_15", "16_30", "31_45", "46_60", "61_75", "76_90"], be = (e) => {
|
|
64
66
|
const t = /* @__PURE__ */ new Map();
|
|
65
67
|
return (e ?? []).forEach((o) => {
|
|
66
68
|
o.key && o.value != null && t.set(o.key.toLowerCase(), o.value);
|
|
@@ -70,7 +72,7 @@ const $t = St("Tv", [
|
|
|
70
72
|
if (o == null || o === "") return null;
|
|
71
73
|
const s = Number(o);
|
|
72
74
|
return Number.isFinite(s) ? s : null;
|
|
73
|
-
}, N = (e, t) => Q(e, t) ?? 0,
|
|
75
|
+
}, N = (e, t) => Q(e, t) ?? 0, zt = [
|
|
74
76
|
[/POSTPON/, "postponed"],
|
|
75
77
|
[/CANCEL/, "cancelled"],
|
|
76
78
|
[/INTERRUPT|SUSPEND/, "interrupted"],
|
|
@@ -78,20 +80,20 @@ const $t = St("Tv", [
|
|
|
78
80
|
], Be = (e) => {
|
|
79
81
|
var o;
|
|
80
82
|
const t = `${(e == null ? void 0 : e.type) ?? ""} ${(e == null ? void 0 : e.code) ?? ""} ${(e == null ? void 0 : e.sub_type) ?? ""}`.toUpperCase();
|
|
81
|
-
return ((o =
|
|
83
|
+
return ((o = zt.find(([s]) => s.test(t))) == null ? void 0 : o[1]) ?? null;
|
|
82
84
|
}, Ge = (e) => {
|
|
83
85
|
if (Be(e)) return "CANCELLED";
|
|
84
86
|
const t = `${(e == null ? void 0 : e.type) ?? ""} ${(e == null ? void 0 : e.code) ?? ""}`.toUpperCase();
|
|
85
87
|
return /(FINISH|ENDED|CLOSED|AFTER_)/.test(t) ? "FINISHED" : /(LIVE|PROGRESS|INPLAY|IN_PLAY|HALF|PERIOD)/.test(t) ? "LIVE" : "UPCOMING";
|
|
86
|
-
},
|
|
88
|
+
}, At = {
|
|
87
89
|
"1st_half": 0,
|
|
88
90
|
"2nd_half": 45,
|
|
89
91
|
extra_time: 90,
|
|
90
92
|
extra_time_1: 90,
|
|
91
93
|
extra_time_2: 105
|
|
92
|
-
},
|
|
94
|
+
}, Lt = (e) => {
|
|
93
95
|
var i, a;
|
|
94
|
-
const t = (((i = e.status) == null ? void 0 : i.sub_type) ?? "").toLowerCase(), o =
|
|
96
|
+
const t = (((i = e.status) == null ? void 0 : i.sub_type) ?? "").toLowerCase(), o = At[t], s = ((a = e.timing) == null ? void 0 : a.current_minute) ?? 0;
|
|
95
97
|
return o === void 0 || s <= 0 ? null : o + s;
|
|
96
98
|
}, me = (e, t) => {
|
|
97
99
|
const o = (e.score ?? []).find((a) => a.key === t);
|
|
@@ -108,19 +110,19 @@ const $t = St("Tv", [
|
|
|
108
110
|
shotsOnTarget: Q(t, "shots_on_target"),
|
|
109
111
|
possession: Q(t, "ball_possession_percentage"),
|
|
110
112
|
corners: Q(t, "corners"),
|
|
111
|
-
goalsByPeriod:
|
|
113
|
+
goalsByPeriod: Mt.map((o) => N(t, `goals_${o}`))
|
|
112
114
|
};
|
|
113
|
-
},
|
|
115
|
+
}, Pt = 3 * 24 * 60 * 60 * 1e3, Dt = (e, t) => {
|
|
114
116
|
const o = t.filter((a) => !!a.id).map((a) => {
|
|
115
|
-
const
|
|
117
|
+
const c = /* @__PURE__ */ new Set();
|
|
116
118
|
(a.groups ?? []).forEach(
|
|
117
|
-
(u) => (u.standings ?? []).forEach((h) => h.competitor_id &&
|
|
119
|
+
(u) => (u.standings ?? []).forEach((h) => h.competitor_id && c.add(h.competitor_id))
|
|
118
120
|
);
|
|
119
|
-
const l = Date.parse(a.start_date ?? ""),
|
|
120
|
-
return { id: a.id, teams:
|
|
121
|
-
}), s = (a,
|
|
121
|
+
const l = Date.parse(a.start_date ?? ""), d = Date.parse(a.end_date ?? "") + 24 * 60 * 60 * 1e3;
|
|
122
|
+
return { id: a.id, teams: c, from: l, to: d };
|
|
123
|
+
}), s = (a, c) => !Number.isFinite(a.from) || !Number.isFinite(a.to) ? 1 / 0 : c < a.from ? a.from - c : c > a.to ? c - a.to : 0, i = /* @__PURE__ */ new Map();
|
|
122
124
|
return e.forEach((a) => {
|
|
123
|
-
var b, g,
|
|
125
|
+
var b, g, $, S, W;
|
|
124
126
|
if ((b = a.round) != null && b.stage_id) {
|
|
125
127
|
i.set(a, a.round.stage_id);
|
|
126
128
|
return;
|
|
@@ -129,16 +131,16 @@ const $t = St("Tv", [
|
|
|
129
131
|
i.set(a, ((g = o[0]) == null ? void 0 : g.id) ?? null);
|
|
130
132
|
return;
|
|
131
133
|
}
|
|
132
|
-
const
|
|
134
|
+
const c = Date.parse((($ = a.timing) == null ? void 0 : $.start_time) ?? ""), l = ((S = a.competitor_one) == null ? void 0 : S.id) ?? "", d = ((W = a.competitor_two) == null ? void 0 : W.id) ?? "", u = (k) => s(k, c) <= Pt, h = o.filter((k) => k.teams.has(l) && k.teams.has(d) && u(k)).sort((k, M) => k.teams.size - M.teams.size)[0];
|
|
133
135
|
if (h) {
|
|
134
136
|
i.set(a, h.id);
|
|
135
137
|
return;
|
|
136
138
|
}
|
|
137
|
-
const f = (
|
|
139
|
+
const f = (k) => [...k].sort((M, O) => s(M, c) - s(O, c))[0], C = f(o.filter((k) => k.teams.size === 0 || u(k))) ?? f(o);
|
|
138
140
|
i.set(a, (C == null ? void 0 : C.id) ?? null);
|
|
139
141
|
}), i;
|
|
140
|
-
},
|
|
141
|
-
var a,
|
|
142
|
+
}, Wt = (e, t, o) => {
|
|
143
|
+
var a, c;
|
|
142
144
|
const s = Ge(e.status), i = s === "FINISHED" || s === "LIVE";
|
|
143
145
|
return {
|
|
144
146
|
id: e.id ?? "",
|
|
@@ -150,16 +152,16 @@ const $t = St("Tv", [
|
|
|
150
152
|
away: Ee(e.competitor_two),
|
|
151
153
|
fullTime: i ? me(e, "result") ?? me(e, "full_time") ?? [0, 0] : null,
|
|
152
154
|
halfTime: i ? me(e, "half_time") : null,
|
|
153
|
-
liveMinute: s === "LIVE" ?
|
|
155
|
+
liveMinute: s === "LIVE" ? Lt(e) : null,
|
|
154
156
|
notPlayedReason: Be(e.status),
|
|
155
|
-
isHalfTime: s === "LIVE" && (((
|
|
157
|
+
isHalfTime: s === "LIVE" && (((c = e.status) == null ? void 0 : c.sub_type) ?? "").toLowerCase() === "halftime"
|
|
156
158
|
};
|
|
157
|
-
},
|
|
159
|
+
}, Ot = (e) => {
|
|
158
160
|
const t = /* @__PURE__ */ new Map();
|
|
159
161
|
e.forEach((s) => {
|
|
160
|
-
var l,
|
|
161
|
-
const i = ((l = s.round) == null ? void 0 : l.id) ?? "", a = ((
|
|
162
|
-
(
|
|
162
|
+
var l, d;
|
|
163
|
+
const i = ((l = s.round) == null ? void 0 : l.id) ?? "", a = ((d = s.timing) == null ? void 0 : d.start_time) ?? "", c = t.get(i);
|
|
164
|
+
(c === void 0 || a < c) && t.set(i, a);
|
|
163
165
|
});
|
|
164
166
|
const o = new Map(
|
|
165
167
|
Array.from(t.entries()).sort((s, i) => s[1].localeCompare(i[1])).map(([s], i) => [s, i + 1])
|
|
@@ -187,7 +189,7 @@ const $t = St("Tv", [
|
|
|
187
189
|
goalsAllowed: N(t, "goals_allowed"),
|
|
188
190
|
avgTotalGoals: Q(t, "avg_total_goals")
|
|
189
191
|
};
|
|
190
|
-
},
|
|
192
|
+
}, Ft = (e) => {
|
|
191
193
|
const t = be(e.statistics);
|
|
192
194
|
return {
|
|
193
195
|
athleteId: e.athlete_id ?? "",
|
|
@@ -200,23 +202,23 @@ const $t = St("Tv", [
|
|
|
200
202
|
redCards: N(t, "red_cards"),
|
|
201
203
|
cleanSheets: N(t, "clean_sheets")
|
|
202
204
|
};
|
|
203
|
-
},
|
|
205
|
+
}, Nt = (e, t, o) => {
|
|
204
206
|
const s = e.season, i = ((s == null ? void 0 : s.events) ?? []).filter((g) => !!g.id).map((g) => {
|
|
205
|
-
const
|
|
206
|
-
if (
|
|
207
|
-
const
|
|
207
|
+
const $ = o.get(g.id);
|
|
208
|
+
if (!$) return g;
|
|
209
|
+
const S = (W, k) => W && typeof W == "object" ? W : k;
|
|
208
210
|
return {
|
|
209
211
|
...g,
|
|
210
|
-
|
|
211
|
-
round: g.round ??
|
|
212
|
-
competitor_one:
|
|
213
|
-
competitor_two:
|
|
212
|
+
...$,
|
|
213
|
+
round: g.round ?? $.round,
|
|
214
|
+
competitor_one: S($.competitor_one, g.competitor_one),
|
|
215
|
+
competitor_two: S($.competitor_two, g.competitor_two)
|
|
214
216
|
};
|
|
215
|
-
}), a = (s == null ? void 0 : s.stages) ?? [],
|
|
217
|
+
}), a = (s == null ? void 0 : s.stages) ?? [], c = Dt(i, a), l = t ? i.filter((g) => c.get(g) === t) : i, d = Ot(l), u = new Set(l.map((g) => c.get(g))), h = a.filter((g) => !!g.id && u.has(g.id)).map((g) => ({
|
|
216
218
|
id: g.id,
|
|
217
219
|
nameId: g.stage_name_id || null,
|
|
218
220
|
order: g.order ?? 0
|
|
219
|
-
})).sort((g,
|
|
221
|
+
})).sort((g, $) => g.order - $.order), f = /* @__PURE__ */ new Map(), C = (s == null ? void 0 : s.team_stats) ?? [], b = t || null;
|
|
220
222
|
return C.filter((g) => (g.stage_id ?? null) === b).forEach((g) => g.team_id && f.set(g.team_id, Me(g))), t && f.size === 0 && C.filter((g) => g.stage_id == null).forEach((g) => g.team_id && f.set(g.team_id, Me(g))), {
|
|
221
223
|
id: e.id ?? "",
|
|
222
224
|
sport: e.sport ?? null,
|
|
@@ -226,123 +228,127 @@ const $t = St("Tv", [
|
|
|
226
228
|
startDate: (s == null ? void 0 : s.start_date) ?? null,
|
|
227
229
|
endDate: (s == null ? void 0 : s.end_date) ?? null
|
|
228
230
|
},
|
|
229
|
-
matches: l.map((g) =>
|
|
231
|
+
matches: l.map((g) => Wt(g, d.get(g) ?? 1, c.get(g) ?? null)),
|
|
230
232
|
stages: h,
|
|
231
233
|
teamStats: f,
|
|
232
|
-
athletes: ((s == null ? void 0 : s.athlete_stats) ?? []).filter((g) => !!g.athlete_id && (g.statistics ?? []).length > 0).map(
|
|
234
|
+
athletes: ((s == null ? void 0 : s.athlete_stats) ?? []).filter((g) => !!g.athlete_id && (g.statistics ?? []).length > 0).map(Ft)
|
|
233
235
|
};
|
|
234
|
-
},
|
|
235
|
-
const s =
|
|
236
|
-
var l,
|
|
237
|
-
return ((u = (
|
|
236
|
+
}, Bt = (e) => (e ?? "").split("-")[0].toUpperCase(), Gt = (e, t, o) => {
|
|
237
|
+
const s = Bt(t), i = (a, c) => {
|
|
238
|
+
var l, d, u;
|
|
239
|
+
return ((u = (d = (l = e.get(a)) == null ? void 0 : l.assets) == null ? void 0 : d.find((h) => h.key === c)) == null ? void 0 : u.value) ?? null;
|
|
238
240
|
};
|
|
239
241
|
return {
|
|
240
242
|
has: (a) => e.has(a),
|
|
241
243
|
name: (a) => {
|
|
242
|
-
var
|
|
243
|
-
const
|
|
244
|
-
return
|
|
244
|
+
var d, u;
|
|
245
|
+
const c = e.get(a);
|
|
246
|
+
return c && (((u = (d = c.translations) == null ? void 0 : d.find(
|
|
245
247
|
(h) => {
|
|
246
248
|
var f;
|
|
247
249
|
return ((f = h.language) == null ? void 0 : f.toUpperCase()) === s;
|
|
248
250
|
}
|
|
249
|
-
)) == null ? void 0 : u.name) ||
|
|
251
|
+
)) == null ? void 0 : u.name) || c.name) || o;
|
|
250
252
|
},
|
|
251
253
|
logo: (a) => i(a, "LOGO"),
|
|
252
254
|
photo: (a) => i(a, "HEADSHOT"),
|
|
253
255
|
position: (a) => {
|
|
254
|
-
var
|
|
255
|
-
return ((
|
|
256
|
+
var c;
|
|
257
|
+
return ((c = e.get(a)) == null ? void 0 : c.position) ?? null;
|
|
256
258
|
}
|
|
257
259
|
};
|
|
258
|
-
},
|
|
259
|
-
var o, s, i, a,
|
|
260
|
+
}, jt = 4 * 60 * 60 * 1e3, Ht = (e) => {
|
|
261
|
+
var o, s, i, a, c, l, d, u, h;
|
|
260
262
|
const t = new Set(((o = e.meta) == null ? void 0 : o.entity_ids) ?? []);
|
|
261
|
-
return e.id && t.add(e.id), (i = (s = e.season) == null ? void 0 : s.stages) == null || i.forEach((f) => f.stage_name_id && t.add(f.stage_name_id)), (
|
|
263
|
+
return e.id && t.add(e.id), (i = (s = e.season) == null ? void 0 : s.stages) == null || i.forEach((f) => f.stage_name_id && t.add(f.stage_name_id)), (c = (a = e.season) == null ? void 0 : a.events) == null || c.forEach((f) => {
|
|
262
264
|
var C, b;
|
|
263
265
|
(C = f.competitor_one) != null && C.id && t.add(f.competitor_one.id), (b = f.competitor_two) != null && b.id && t.add(f.competitor_two.id);
|
|
264
|
-
}), (
|
|
266
|
+
}), (d = (l = e.season) == null ? void 0 : l.team_stats) == null || d.forEach((f) => f.team_id && t.add(f.team_id)), (h = (u = e.season) == null ? void 0 : u.athlete_stats) == null || h.forEach((f) => {
|
|
265
267
|
f.athlete_id && t.add(f.athlete_id), f.team_id && t.add(f.team_id);
|
|
266
268
|
}), Array.from(t);
|
|
267
|
-
},
|
|
269
|
+
}, Ut = (e, t) => {
|
|
268
270
|
var i;
|
|
269
271
|
const o = Ge(e.status);
|
|
270
272
|
if (o === "LIVE") return !0;
|
|
271
273
|
if (o !== "UPCOMING") return !1;
|
|
272
274
|
const s = Date.parse(((i = e.timing) == null ? void 0 : i.start_time) ?? "");
|
|
273
|
-
return Number.isFinite(s) && s <= t && t - s <
|
|
274
|
-
},
|
|
275
|
-
const { seasonId: a, stageId:
|
|
275
|
+
return Number.isFinite(s) && s <= t && t - s < jt;
|
|
276
|
+
}, Kt = (e, t, o, s, i) => {
|
|
277
|
+
const { seasonId: a, stageId: c, liveRefresh: l, refreshInterval: d } = i, [u, h] = ee(null), [f, C] = ee(
|
|
276
278
|
() => /* @__PURE__ */ new Map()
|
|
277
279
|
), [b, g] = ee(
|
|
278
280
|
() => /* @__PURE__ */ new Map()
|
|
279
|
-
), [
|
|
281
|
+
), [$, S] = ee(!0), [W, k] = ee(!1), M = nt();
|
|
280
282
|
pe(() => {
|
|
281
283
|
if (!e || !t) {
|
|
282
|
-
|
|
284
|
+
S(!1);
|
|
283
285
|
return;
|
|
284
286
|
}
|
|
285
|
-
const
|
|
286
|
-
return
|
|
287
|
+
const z = new AbortController();
|
|
288
|
+
return S(!0), k(!1), g(/* @__PURE__ */ new Map()), (async () => {
|
|
287
289
|
try {
|
|
288
|
-
const
|
|
290
|
+
const T = await _t(
|
|
289
291
|
e,
|
|
290
292
|
t,
|
|
291
293
|
a,
|
|
292
|
-
|
|
294
|
+
z.signal,
|
|
295
|
+
M
|
|
293
296
|
);
|
|
294
|
-
if (
|
|
295
|
-
const
|
|
297
|
+
if (z.signal.aborted) return;
|
|
298
|
+
const j = T ? await Et(
|
|
296
299
|
e,
|
|
297
|
-
|
|
298
|
-
|
|
300
|
+
Ht(T),
|
|
301
|
+
z.signal,
|
|
302
|
+
M
|
|
299
303
|
) : /* @__PURE__ */ new Map();
|
|
300
|
-
if (
|
|
301
|
-
h(
|
|
302
|
-
} catch (
|
|
303
|
-
if (
|
|
304
|
+
if (z.signal.aborted) return;
|
|
305
|
+
h(T), C(j);
|
|
306
|
+
} catch (T) {
|
|
307
|
+
if (z.signal.aborted || (T == null ? void 0 : T.name) === "AbortError")
|
|
304
308
|
return;
|
|
305
|
-
h(null),
|
|
309
|
+
h(null), k(!0);
|
|
306
310
|
} finally {
|
|
307
|
-
|
|
311
|
+
z.signal.aborted || S(!1);
|
|
308
312
|
}
|
|
309
|
-
})(), () =>
|
|
310
|
-
}, [e, t, a]);
|
|
311
|
-
const [
|
|
313
|
+
})(), () => z.abort();
|
|
314
|
+
}, [e, t, a, M]);
|
|
315
|
+
const [O, _] = ee(() => Date.now());
|
|
312
316
|
pe(() => {
|
|
313
317
|
if (!u || !l) return;
|
|
314
|
-
const
|
|
315
|
-
return () => clearInterval(
|
|
318
|
+
const z = setInterval(() => _(Date.now()), 6e4);
|
|
319
|
+
return () => clearInterval(z);
|
|
316
320
|
}, [u, l]);
|
|
317
321
|
const R = le(() => {
|
|
318
|
-
var
|
|
319
|
-
return !u || !l ||
|
|
320
|
-
}, [u, b, l,
|
|
322
|
+
var z;
|
|
323
|
+
return !u || !l || d <= 0 ? "" : (((z = u.season) == null ? void 0 : z.events) ?? []).map((T) => T.id ? b.get(T.id) ?? T : T).filter((T) => T.id && Ut(T, O)).map((T) => T.id).join(",");
|
|
324
|
+
}, [u, b, l, d, O]);
|
|
321
325
|
pe(() => {
|
|
322
326
|
if (!R) return;
|
|
323
|
-
const
|
|
324
|
-
const
|
|
325
|
-
|
|
327
|
+
const z = R.split(","), T = new AbortController(), U = setInterval(async () => {
|
|
328
|
+
const p = await Promise.all(
|
|
329
|
+
z.map(
|
|
330
|
+
(I) => Rt(e, I, T.signal, M)
|
|
331
|
+
)
|
|
326
332
|
);
|
|
327
|
-
|
|
328
|
-
const
|
|
329
|
-
return
|
|
333
|
+
T.signal.aborted || g((I) => {
|
|
334
|
+
const v = new Map(I);
|
|
335
|
+
return p.forEach((P) => (P == null ? void 0 : P.id) && v.set(P.id, P)), v;
|
|
330
336
|
});
|
|
331
|
-
},
|
|
337
|
+
}, d);
|
|
332
338
|
return () => {
|
|
333
|
-
|
|
339
|
+
T.abort(), clearInterval(U);
|
|
334
340
|
};
|
|
335
|
-
}, [e, R,
|
|
336
|
-
const
|
|
337
|
-
() => u ?
|
|
338
|
-
[u,
|
|
339
|
-
),
|
|
340
|
-
() =>
|
|
341
|
+
}, [e, R, d, M]);
|
|
342
|
+
const E = le(
|
|
343
|
+
() => u ? Nt(u, c, b) : null,
|
|
344
|
+
[u, c, b]
|
|
345
|
+
), A = le(
|
|
346
|
+
() => Gt(f, o, s),
|
|
341
347
|
[f, o, s]
|
|
342
348
|
);
|
|
343
|
-
return { data:
|
|
344
|
-
}, n = (e, t = 16) => `${Math.round(e / t * 1e4) / 1e4}em`,
|
|
345
|
-
const e =
|
|
349
|
+
return { data: E, competitionId: (u == null ? void 0 : u.id) ?? t, entities: A, loading: $, error: W };
|
|
350
|
+
}, n = (e, t = 16) => `${Math.round(e / t * 1e4) / 1e4}em`, F = () => {
|
|
351
|
+
const e = rt(), t = st(), o = it(), s = at() === "dark", i = (c, l) => `rgba(${lt(c)}, ${l})`, a = e.palette.primary.plainColor;
|
|
346
352
|
return {
|
|
347
353
|
fonts: t,
|
|
348
354
|
radius: o,
|
|
@@ -369,25 +375,25 @@ const $t = St("Tv", [
|
|
|
369
375
|
}, we = (e) => e.status === "FINISHED" && !!e.fullTime, de = (e) => e.fullTime ? e.fullTime[0] + e.fullTime[1] : 0, ze = (e, t, o) => e.filter(
|
|
370
376
|
(s) => (s.home.id === t || s.away.id === t) && s.start < o
|
|
371
377
|
).sort((s, i) => i.start.localeCompare(s.start)).slice(0, 5).reverse().map((s) => {
|
|
372
|
-
const i = s.home.id === t, [a,
|
|
373
|
-
return { match: s, isHome: i, result: l >
|
|
374
|
-
}),
|
|
378
|
+
const i = s.home.id === t, [a, c] = s.fullTime, l = i ? a : c, d = i ? c : a;
|
|
379
|
+
return { match: s, isHome: i, result: l > d ? "W" : l < d ? "L" : "D" };
|
|
380
|
+
}), Vt = (e) => {
|
|
375
381
|
const t = /* @__PURE__ */ new Map();
|
|
376
382
|
return e.forEach((o) => {
|
|
377
383
|
const [s, i] = o.fullTime;
|
|
378
384
|
[
|
|
379
385
|
{ side: o.home, conceded: i },
|
|
380
386
|
{ side: o.away, conceded: s }
|
|
381
|
-
].forEach(({ side: a, conceded:
|
|
387
|
+
].forEach(({ side: a, conceded: c }) => {
|
|
382
388
|
const l = t.get(a.id) ?? { cleanSheets: 0, yellowCards: 0, redCards: 0 };
|
|
383
|
-
|
|
389
|
+
c === 0 && (l.cleanSheets += 1), l.yellowCards += a.yellowCards ?? 0, l.redCards += a.redCards ?? 0, t.set(a.id, l);
|
|
384
390
|
});
|
|
385
391
|
}), t;
|
|
386
|
-
},
|
|
392
|
+
}, Yt = (e, t) => e.find(
|
|
387
393
|
(o) => o.id !== t.id && (o.home.id === t.home.id && o.away.id === t.away.id || o.home.id === t.away.id && o.away.id === t.home.id)
|
|
388
|
-
) ?? null, G = (e, t) => t ? Math.round(e / t * 100) : 0,
|
|
389
|
-
const t = e.filter(we), o = (
|
|
390
|
-
(
|
|
394
|
+
) ?? null, G = (e, t) => t ? Math.round(e / t * 100) : 0, Xt = (e) => {
|
|
395
|
+
const t = e.filter(we), o = (d) => t.reduce((u, h) => u + d(h), 0), s = o(de), i = t.filter((d) => d.fullTime[0] > d.fullTime[1]).length, a = t.filter((d) => d.fullTime[1] > d.fullTime[0]).length, c = o((d) => d.halfTime ? d.halfTime[0] + d.halfTime[1] : 0), l = [0, 1, 2, 3, 4, 5].map(
|
|
396
|
+
(d) => o((u) => (u.home.goalsByPeriod[d] ?? 0) + (u.away.goalsByPeriod[d] ?? 0))
|
|
391
397
|
);
|
|
392
398
|
return {
|
|
393
399
|
total: e.length,
|
|
@@ -396,36 +402,36 @@ const $t = St("Tv", [
|
|
|
396
402
|
homeWins: i,
|
|
397
403
|
awayWins: a,
|
|
398
404
|
draws: t.length - i - a,
|
|
399
|
-
firstHalfGoals:
|
|
400
|
-
secondHalfGoals: s -
|
|
405
|
+
firstHalfGoals: c,
|
|
406
|
+
secondHalfGoals: s - c,
|
|
401
407
|
goalsByPeriod: l,
|
|
402
|
-
yellowCards: o((
|
|
403
|
-
redCards: o((
|
|
404
|
-
shotsOnTarget: o((
|
|
405
|
-
corners: o((
|
|
406
|
-
bothScored: t.filter((
|
|
407
|
-
goalless: t.filter((
|
|
408
|
-
over: (
|
|
408
|
+
yellowCards: o((d) => (d.home.yellowCards ?? 0) + (d.away.yellowCards ?? 0)),
|
|
409
|
+
redCards: o((d) => (d.home.redCards ?? 0) + (d.away.redCards ?? 0)),
|
|
410
|
+
shotsOnTarget: o((d) => (d.home.shotsOnTarget ?? 0) + (d.away.shotsOnTarget ?? 0)),
|
|
411
|
+
corners: o((d) => (d.home.corners ?? 0) + (d.away.corners ?? 0)),
|
|
412
|
+
bothScored: t.filter((d) => d.fullTime[0] > 0 && d.fullTime[1] > 0).length,
|
|
413
|
+
goalless: t.filter((d) => de(d) === 0).length,
|
|
414
|
+
over: (d) => t.filter((u) => de(u) > d).length
|
|
409
415
|
};
|
|
410
|
-
},
|
|
416
|
+
}, qt = 10, je = {
|
|
411
417
|
scorers: (e) => e.goals,
|
|
412
418
|
assists: (e) => e.assists,
|
|
413
419
|
contributions: (e) => e.goals + e.assists,
|
|
414
420
|
cleanSheets: (e) => e.cleanSheets,
|
|
415
421
|
minutes: (e) => e.minutes,
|
|
416
422
|
cards: (e) => e.yellowCards + e.redCards
|
|
417
|
-
}, he = Object.keys(je),
|
|
423
|
+
}, he = Object.keys(je), Jt = (e, t) => {
|
|
418
424
|
const o = je[t];
|
|
419
425
|
return e.map((i) => ({ athlete: i, value: o(i) })).filter((i) => i.value > 0).sort(
|
|
420
426
|
(i, a) => a.value - i.value || (t === "cards" ? a.athlete.redCards - i.athlete.redCards : t === "minutes" ? 0 : i.athlete.minutes - a.athlete.minutes)
|
|
421
|
-
).slice(0,
|
|
427
|
+
).slice(0, qt).map((i, a, c) => {
|
|
422
428
|
let l = a + 1;
|
|
423
|
-
for (; l > 1 &&
|
|
424
|
-
const
|
|
425
|
-
return { ...i, rank:
|
|
429
|
+
for (; l > 1 && c[l - 2].value === i.value; ) l -= 1;
|
|
430
|
+
const d = a > 0 && c[a - 1].value === i.value || a < c.length - 1 && c[a + 1].value === i.value;
|
|
431
|
+
return { ...i, rank: d ? `${l}=` : `${l}` };
|
|
426
432
|
});
|
|
427
|
-
}, V = (e, t, o = 1) => [...e].sort((s, i) => o * (t(i) - t(s)))[0],
|
|
428
|
-
const t =
|
|
433
|
+
}, V = (e, t, o = 1) => [...e].sort((s, i) => o * (t(i) - t(s)))[0], Qt = (e) => Array.from(e.values()), Zt = (e) => {
|
|
434
|
+
const t = dt(e), o = /* @__PURE__ */ new Map();
|
|
429
435
|
return {
|
|
430
436
|
date: (s, i) => {
|
|
431
437
|
const a = new Date(s);
|
|
@@ -443,15 +449,15 @@ const $t = St("Tv", [
|
|
|
443
449
|
}), o.set(i, a)), a.format(Number.isFinite(s) ? s : 0);
|
|
444
450
|
}
|
|
445
451
|
};
|
|
446
|
-
},
|
|
452
|
+
}, eo = (e, t) => t ? e.replace(
|
|
447
453
|
/\{\{\s*(\w+)\s*\}\}/g,
|
|
448
454
|
(o, s) => s in t ? String(t[s]) : o
|
|
449
|
-
) : e,
|
|
450
|
-
const { t } =
|
|
455
|
+
) : e, to = (e) => {
|
|
456
|
+
const { t } = wt("common");
|
|
451
457
|
return le(
|
|
452
458
|
() => (o, s) => {
|
|
453
459
|
const i = e == null ? void 0 : e[o];
|
|
454
|
-
return typeof i == "string" && i.trim() ?
|
|
460
|
+
return typeof i == "string" && i.trim() ? eo(i, s) : t(`competitionStatistics.${o}`, s ?? {});
|
|
455
461
|
},
|
|
456
462
|
[e, t]
|
|
457
463
|
);
|
|
@@ -462,17 +468,17 @@ const $t = St("Tv", [
|
|
|
462
468
|
color: s,
|
|
463
469
|
upper: i,
|
|
464
470
|
cms: a,
|
|
465
|
-
ellipsis:
|
|
471
|
+
ellipsis: c,
|
|
466
472
|
parentSize: l = 16,
|
|
467
|
-
component:
|
|
473
|
+
component: d = "span",
|
|
468
474
|
sx: u,
|
|
469
475
|
children: h
|
|
470
476
|
}) => {
|
|
471
|
-
const { fonts: f } =
|
|
477
|
+
const { fonts: f } = F();
|
|
472
478
|
return /* @__PURE__ */ r(
|
|
473
479
|
m,
|
|
474
480
|
{
|
|
475
|
-
component:
|
|
481
|
+
component: d,
|
|
476
482
|
sx: [
|
|
477
483
|
{
|
|
478
484
|
fontSize: n(e, l),
|
|
@@ -481,14 +487,14 @@ const $t = St("Tv", [
|
|
|
481
487
|
...s ? { color: s } : {},
|
|
482
488
|
...i ? { textTransform: "uppercase", letterSpacing: n(0.5, e) } : {},
|
|
483
489
|
...a ? { unicodeBidi: "plaintext" } : {},
|
|
484
|
-
...
|
|
490
|
+
...c ? { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" } : {}
|
|
485
491
|
},
|
|
486
492
|
...Array.isArray(u) ? u : [u]
|
|
487
493
|
],
|
|
488
494
|
children: h
|
|
489
495
|
}
|
|
490
496
|
);
|
|
491
|
-
},
|
|
497
|
+
}, H = ({
|
|
492
498
|
url: e,
|
|
493
499
|
size: t,
|
|
494
500
|
sx: o
|
|
@@ -509,7 +515,7 @@ const $t = St("Tv", [
|
|
|
509
515
|
]
|
|
510
516
|
}
|
|
511
517
|
) : null, Z = ({ sx: e, ...t }) => {
|
|
512
|
-
const { colors: o, radius: s } =
|
|
518
|
+
const { colors: o, radius: s } = F();
|
|
513
519
|
return /* @__PURE__ */ r(
|
|
514
520
|
m,
|
|
515
521
|
{
|
|
@@ -525,22 +531,22 @@ const $t = St("Tv", [
|
|
|
525
531
|
}
|
|
526
532
|
);
|
|
527
533
|
}, He = ({ children: e }) => {
|
|
528
|
-
const { colors: t } =
|
|
534
|
+
const { colors: t } = F();
|
|
529
535
|
return /* @__PURE__ */ r(w, { size: 13, weight: 700, upper: !0, color: t.text, sx: { padding: `0 ${n(2, 13)}` }, children: e });
|
|
530
536
|
}, q = ({
|
|
531
537
|
size: e = 11,
|
|
532
538
|
children: t,
|
|
533
539
|
sx: o
|
|
534
540
|
}) => {
|
|
535
|
-
const { colors: s } =
|
|
541
|
+
const { colors: s } = F();
|
|
536
542
|
return /* @__PURE__ */ r(w, { size: e, font: "secondary", weight: 700, upper: !0, color: s.dim, sx: o, children: t });
|
|
537
|
-
}, Ue =
|
|
538
|
-
const e =
|
|
543
|
+
}, Ue = L.createContext(null), oo = Ue.Provider, Y = () => {
|
|
544
|
+
const e = L.useContext(Ue);
|
|
539
545
|
if (!e) throw new Error("useWidget must be used inside WidgetProvider");
|
|
540
546
|
return e;
|
|
541
|
-
},
|
|
547
|
+
}, no = () => {
|
|
542
548
|
var g;
|
|
543
|
-
const { colors: e, radius: t } =
|
|
549
|
+
const { colors: e, radius: t } = F(), { data: o, competitionId: s, entities: i, finished: a, label: c, fmt: l } = Y(), d = a.length, u = o.matches.length, h = G(d, u), f = (g = o.matches.filter(($) => $.status === "UPCOMING" || $.status === "LIVE").sort(($, S) => $.round - S.round)[0]) == null ? void 0 : g.round, C = {
|
|
544
550
|
day: "numeric",
|
|
545
551
|
month: "short",
|
|
546
552
|
year: "numeric"
|
|
@@ -556,7 +562,7 @@ const $t = St("Tv", [
|
|
|
556
562
|
flexWrap: "wrap"
|
|
557
563
|
},
|
|
558
564
|
children: [
|
|
559
|
-
/* @__PURE__ */ r(
|
|
565
|
+
/* @__PURE__ */ r(H, { url: i.logo(s), size: 40 }),
|
|
560
566
|
/* @__PURE__ */ y(m, { sx: { minWidth: 0, flex: `1 1 ${n(200)}` }, children: [
|
|
561
567
|
/* @__PURE__ */ y(m, { sx: { display: "flex", alignItems: "center", gap: n(8), flexWrap: "wrap" }, children: [
|
|
562
568
|
/* @__PURE__ */ r(w, { size: 17, weight: 700, color: e.text, cms: !0, children: i.name(s) }),
|
|
@@ -601,12 +607,12 @@ const $t = St("Tv", [
|
|
|
601
607
|
marginBottom: n(5, 11)
|
|
602
608
|
},
|
|
603
609
|
children: [
|
|
604
|
-
/* @__PURE__ */ r("span", { children: f !== void 0 ?
|
|
610
|
+
/* @__PURE__ */ r("span", { children: f !== void 0 ? c("upcomingRound", { round: f }) : c("seasonFinished") }),
|
|
605
611
|
/* @__PURE__ */ y("span", { children: [
|
|
606
|
-
/* @__PURE__ */ r(m, { component: "b", sx: { color: e.text }, children:
|
|
612
|
+
/* @__PURE__ */ r(m, { component: "b", sx: { color: e.text }, children: d }),
|
|
607
613
|
" ",
|
|
608
|
-
|
|
609
|
-
matches:
|
|
614
|
+
c("seasonProgress", {
|
|
615
|
+
matches: c("matchesCount", { count: u }),
|
|
610
616
|
pct: h
|
|
611
617
|
})
|
|
612
618
|
] })
|
|
@@ -639,7 +645,7 @@ const $t = St("Tv", [
|
|
|
639
645
|
]
|
|
640
646
|
}
|
|
641
647
|
);
|
|
642
|
-
},
|
|
648
|
+
}, ro = {
|
|
643
649
|
match: "matchId",
|
|
644
650
|
team: "competitorId",
|
|
645
651
|
player: "athleteId"
|
|
@@ -647,18 +653,18 @@ const $t = St("Tv", [
|
|
|
647
653
|
var t;
|
|
648
654
|
return !!(e != null && e.onClick || (t = e == null ? void 0 : e.url) != null && t.trim());
|
|
649
655
|
}, fe = (e, t, o) => {
|
|
650
|
-
var
|
|
656
|
+
var c;
|
|
651
657
|
if (!ce(e)) return null;
|
|
652
|
-
const s = ((
|
|
658
|
+
const s = ((c = e == null ? void 0 : e.url) == null ? void 0 : c.trim()) ?? "", i = encodeURIComponent(o);
|
|
653
659
|
return {
|
|
654
660
|
href: s ? s.replace(
|
|
655
661
|
/\{(\w+)\}/g,
|
|
656
|
-
(l,
|
|
662
|
+
(l, d) => d === "id" || d === ro[t] ? i : l
|
|
657
663
|
) : null,
|
|
658
664
|
target: (e == null ? void 0 : e.target) ?? void 0,
|
|
659
665
|
onClick: e != null && e.onClick ? (l) => {
|
|
660
|
-
var
|
|
661
|
-
l.stopPropagation(), l.preventDefault(), (
|
|
666
|
+
var d;
|
|
667
|
+
l.stopPropagation(), l.preventDefault(), (d = e.onClick) == null || d.call(e, o);
|
|
662
668
|
} : (l) => l.stopPropagation()
|
|
663
669
|
};
|
|
664
670
|
}, te = (e, t) => Math.round(e.minutes / t), J = (e, t) => t("matchesCount", { count: e.appearances }), oe = (e, t) => t("minutesCount", { count: e.minutes }), Ke = {
|
|
@@ -718,13 +724,13 @@ const $t = St("Tv", [
|
|
|
718
724
|
o("redCount", { count: e.redCards })
|
|
719
725
|
]
|
|
720
726
|
}
|
|
721
|
-
},
|
|
727
|
+
}, so = {
|
|
722
728
|
goalkeeper: "goalkeeper",
|
|
723
729
|
defender: "defender",
|
|
724
730
|
midfielder: "midfielder",
|
|
725
731
|
forward: "forward"
|
|
726
732
|
}, Ae = ({ photo: e, initial: t, size: o, badge: s, teamLogo: i, hero: a }) => {
|
|
727
|
-
const { colors:
|
|
733
|
+
const { colors: c } = F(), l = a ? 22 : 12;
|
|
728
734
|
return /* @__PURE__ */ y(
|
|
729
735
|
m,
|
|
730
736
|
{
|
|
@@ -740,13 +746,13 @@ const $t = St("Tv", [
|
|
|
740
746
|
component: "div",
|
|
741
747
|
size: l,
|
|
742
748
|
weight: 700,
|
|
743
|
-
color:
|
|
749
|
+
color: c.dim,
|
|
744
750
|
sx: {
|
|
745
751
|
width: n(o, l),
|
|
746
752
|
height: n(o, l),
|
|
747
753
|
borderRadius: "50%",
|
|
748
|
-
backgroundColor: a ?
|
|
749
|
-
...a ? { border: `2px solid ${
|
|
754
|
+
backgroundColor: a ? c.surface : c.variant,
|
|
755
|
+
...a ? { border: `2px solid ${c.primary}` } : {},
|
|
750
756
|
display: "flex",
|
|
751
757
|
alignItems: "center",
|
|
752
758
|
justifyContent: "center",
|
|
@@ -770,8 +776,8 @@ const $t = St("Tv", [
|
|
|
770
776
|
width: n(s),
|
|
771
777
|
height: n(s),
|
|
772
778
|
borderRadius: "50%",
|
|
773
|
-
backgroundColor:
|
|
774
|
-
border: `1px solid ${
|
|
779
|
+
backgroundColor: c.surface,
|
|
780
|
+
border: `1px solid ${c.border}`,
|
|
775
781
|
backgroundImage: `url("${i}")`,
|
|
776
782
|
backgroundSize: "70%",
|
|
777
783
|
backgroundRepeat: "no-repeat",
|
|
@@ -782,21 +788,21 @@ const $t = St("Tv", [
|
|
|
782
788
|
]
|
|
783
789
|
}
|
|
784
790
|
);
|
|
785
|
-
},
|
|
786
|
-
var
|
|
787
|
-
const { colors: t, radius: o, fonts: s } =
|
|
788
|
-
const
|
|
791
|
+
}, io = ({ category: e }) => {
|
|
792
|
+
var W, k, M, O;
|
|
793
|
+
const { colors: t, radius: o, fonts: s } = F(), { data: i, entities: a, label: c, props: l } = Y(), [d, u] = L.useState(!1), h = Ke[e], f = L.useMemo(() => Jt(i.athletes, e), [i.athletes, e]), C = Math.min(10, Math.max(1, Math.round(l.playerRankingsRows ?? 5))), b = f.slice(0, d ? 10 : C), g = ce(l.playerCTA), $ = (_) => {
|
|
794
|
+
const R = _.athlete.athleteId, E = a.name(R), A = so[a.position(R) ?? ""];
|
|
789
795
|
return {
|
|
790
|
-
id:
|
|
796
|
+
id: R,
|
|
791
797
|
name: E,
|
|
792
|
-
photo: a.photo(
|
|
798
|
+
photo: a.photo(R),
|
|
793
799
|
initial: E.trim().charAt(0),
|
|
794
|
-
team: a.name(
|
|
795
|
-
teamLogo: a.logo(
|
|
796
|
-
position:
|
|
797
|
-
cta: fe(l.playerCTA, "player",
|
|
800
|
+
team: a.name(_.athlete.teamId),
|
|
801
|
+
teamLogo: a.logo(_.athlete.teamId),
|
|
802
|
+
position: A ? c(A) : "",
|
|
803
|
+
cta: fe(l.playerCTA, "player", R)
|
|
798
804
|
};
|
|
799
|
-
},
|
|
805
|
+
}, S = b[0] ? $(b[0]) : null;
|
|
800
806
|
return /* @__PURE__ */ y(
|
|
801
807
|
m,
|
|
802
808
|
{
|
|
@@ -819,16 +825,16 @@ const $t = St("Tv", [
|
|
|
819
825
|
upper: !0,
|
|
820
826
|
color: t.dim,
|
|
821
827
|
sx: { padding: `${n(10, 11)} ${n(14, 11)} 0` },
|
|
822
|
-
children:
|
|
828
|
+
children: c(h.title)
|
|
823
829
|
}
|
|
824
830
|
),
|
|
825
|
-
|
|
831
|
+
S && b[0] ? /* @__PURE__ */ y(
|
|
826
832
|
m,
|
|
827
833
|
{
|
|
828
|
-
component: (
|
|
829
|
-
href: ((
|
|
830
|
-
target: (
|
|
831
|
-
onClick: (
|
|
834
|
+
component: (W = S.cta) != null && W.href ? "a" : "div",
|
|
835
|
+
href: ((k = S.cta) == null ? void 0 : k.href) ?? void 0,
|
|
836
|
+
target: (M = S.cta) == null ? void 0 : M.target,
|
|
837
|
+
onClick: (O = S.cta) == null ? void 0 : O.onClick,
|
|
832
838
|
sx: {
|
|
833
839
|
margin: n(10),
|
|
834
840
|
padding: n(12),
|
|
@@ -845,16 +851,16 @@ const $t = St("Tv", [
|
|
|
845
851
|
/* @__PURE__ */ r(
|
|
846
852
|
Ae,
|
|
847
853
|
{
|
|
848
|
-
photo:
|
|
849
|
-
initial:
|
|
854
|
+
photo: S.photo,
|
|
855
|
+
initial: S.initial,
|
|
850
856
|
size: 60,
|
|
851
857
|
badge: 24,
|
|
852
|
-
teamLogo:
|
|
858
|
+
teamLogo: S.teamLogo,
|
|
853
859
|
hero: !0
|
|
854
860
|
}
|
|
855
861
|
),
|
|
856
862
|
/* @__PURE__ */ y(m, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
857
|
-
/* @__PURE__ */ r(w, { component: "div", size: 15, weight: 700, color: t.text, ellipsis: !0, cms: !0, children:
|
|
863
|
+
/* @__PURE__ */ r(w, { component: "div", size: 15, weight: 700, color: t.text, ellipsis: !0, cms: !0, children: S.name }),
|
|
858
864
|
/* @__PURE__ */ r(
|
|
859
865
|
w,
|
|
860
866
|
{
|
|
@@ -865,10 +871,10 @@ const $t = St("Tv", [
|
|
|
865
871
|
ellipsis: !0,
|
|
866
872
|
cms: !0,
|
|
867
873
|
sx: { marginTop: n(2, 11) },
|
|
868
|
-
children: [
|
|
874
|
+
children: [S.team, S.position].filter(Boolean).join(" · ")
|
|
869
875
|
}
|
|
870
876
|
),
|
|
871
|
-
/* @__PURE__ */ r(m, { sx: { display: "flex", gap: n(4), flexWrap: "wrap", marginTop: n(6) }, children: h.chips(b[0].athlete, b[0].value,
|
|
877
|
+
/* @__PURE__ */ r(m, { sx: { display: "flex", gap: n(4), flexWrap: "wrap", marginTop: n(6) }, children: h.chips(b[0].athlete, b[0].value, c).map((_) => /* @__PURE__ */ r(
|
|
872
878
|
w,
|
|
873
879
|
{
|
|
874
880
|
size: 10,
|
|
@@ -880,9 +886,9 @@ const $t = St("Tv", [
|
|
|
880
886
|
borderRadius: o.full,
|
|
881
887
|
padding: `${n(2, 10)} ${n(7, 10)}`
|
|
882
888
|
},
|
|
883
|
-
children:
|
|
889
|
+
children: _
|
|
884
890
|
},
|
|
885
|
-
|
|
891
|
+
_
|
|
886
892
|
)) })
|
|
887
893
|
] }),
|
|
888
894
|
/* @__PURE__ */ y(m, { sx: { textAlign: "right", flexShrink: 0 }, children: [
|
|
@@ -896,23 +902,23 @@ const $t = St("Tv", [
|
|
|
896
902
|
upper: !0,
|
|
897
903
|
color: t.dim,
|
|
898
904
|
sx: { marginTop: n(3, 10) },
|
|
899
|
-
children:
|
|
905
|
+
children: c(h.unit)
|
|
900
906
|
}
|
|
901
907
|
)
|
|
902
908
|
] })
|
|
903
909
|
]
|
|
904
910
|
}
|
|
905
911
|
) : null,
|
|
906
|
-
b.slice(1).map((
|
|
907
|
-
var E,
|
|
908
|
-
const
|
|
912
|
+
b.slice(1).map((_) => {
|
|
913
|
+
var E, A, z, T;
|
|
914
|
+
const R = $(_);
|
|
909
915
|
return /* @__PURE__ */ y(
|
|
910
916
|
m,
|
|
911
917
|
{
|
|
912
|
-
component: (E =
|
|
913
|
-
href: ((
|
|
914
|
-
target: (
|
|
915
|
-
onClick: (
|
|
918
|
+
component: (E = R.cta) != null && E.href ? "a" : "div",
|
|
919
|
+
href: ((A = R.cta) == null ? void 0 : A.href) ?? void 0,
|
|
920
|
+
target: (z = R.cta) == null ? void 0 : z.target,
|
|
921
|
+
onClick: (T = R.cta) == null ? void 0 : T.onClick,
|
|
916
922
|
sx: {
|
|
917
923
|
display: "grid",
|
|
918
924
|
gridTemplateColumns: `${n(28)} ${n(32)} minmax(0,1fr) auto`,
|
|
@@ -926,16 +932,16 @@ const $t = St("Tv", [
|
|
|
926
932
|
"&:hover": { backgroundColor: g ? t.onSurface : "transparent" }
|
|
927
933
|
},
|
|
928
934
|
children: [
|
|
929
|
-
/* @__PURE__ */ r(w, { size: 12, font: "secondary", weight: 700, color: t.dim, children:
|
|
930
|
-
/* @__PURE__ */ r(Ae, { photo:
|
|
935
|
+
/* @__PURE__ */ r(w, { size: 12, font: "secondary", weight: 700, color: t.dim, children: _.rank }),
|
|
936
|
+
/* @__PURE__ */ r(Ae, { photo: R.photo, initial: R.initial, size: 32, badge: 16, teamLogo: R.teamLogo }),
|
|
931
937
|
/* @__PURE__ */ y(m, { sx: { minWidth: 0 }, children: [
|
|
932
|
-
/* @__PURE__ */ r(w, { component: "div", size: 13, weight: 600, color: t.text, ellipsis: !0, cms: !0, children:
|
|
933
|
-
/* @__PURE__ */ r(w, { component: "div", size: 11, font: "secondary", color: t.dim, ellipsis: !0, children: h.secondary(
|
|
938
|
+
/* @__PURE__ */ r(w, { component: "div", size: 13, weight: 600, color: t.text, ellipsis: !0, cms: !0, children: R.name }),
|
|
939
|
+
/* @__PURE__ */ r(w, { component: "div", size: 11, font: "secondary", color: t.dim, ellipsis: !0, children: h.secondary(_.athlete, _.value, c).join(" · ") })
|
|
934
940
|
] }),
|
|
935
|
-
/* @__PURE__ */ r(w, { size: 16, weight: 700, color: t.primary, children:
|
|
941
|
+
/* @__PURE__ */ r(w, { size: 16, weight: 700, color: t.primary, children: _.value })
|
|
936
942
|
]
|
|
937
943
|
},
|
|
938
|
-
|
|
944
|
+
R.id
|
|
939
945
|
);
|
|
940
946
|
}),
|
|
941
947
|
f.length > C ? /* @__PURE__ */ r(
|
|
@@ -943,7 +949,7 @@ const $t = St("Tv", [
|
|
|
943
949
|
{
|
|
944
950
|
component: "button",
|
|
945
951
|
type: "button",
|
|
946
|
-
onClick: () => u(!
|
|
952
|
+
onClick: () => u(!d),
|
|
947
953
|
sx: {
|
|
948
954
|
border: "none",
|
|
949
955
|
borderTop: `1px solid ${t.border}`,
|
|
@@ -955,14 +961,14 @@ const $t = St("Tv", [
|
|
|
955
961
|
fontWeight: 700,
|
|
956
962
|
color: t.primary
|
|
957
963
|
},
|
|
958
|
-
children:
|
|
964
|
+
children: d ? c("showLess") : c("showAll", { count: f.length })
|
|
959
965
|
}
|
|
960
966
|
) : null
|
|
961
967
|
]
|
|
962
968
|
}
|
|
963
969
|
);
|
|
964
|
-
},
|
|
965
|
-
const { colors: e, radius: t, fonts: o } =
|
|
970
|
+
}, ao = () => {
|
|
971
|
+
const { colors: e, radius: t, fonts: o } = F(), { label: s, props: i } = Y(), a = xe(), [c, l] = L.useState(0), d = i.playerRankingsLayout ?? "auto", u = d === "tabs" || d === "auto" && a, h = u ? [he[c]] : he;
|
|
966
972
|
return /* @__PURE__ */ y(m, { sx: { display: "flex", flexDirection: "column", gap: n(10) }, children: [
|
|
967
973
|
/* @__PURE__ */ r(He, { children: s("leadersTitle") }),
|
|
968
974
|
u ? /* @__PURE__ */ r(
|
|
@@ -978,7 +984,7 @@ const $t = St("Tv", [
|
|
|
978
984
|
borderRadius: t.full
|
|
979
985
|
},
|
|
980
986
|
children: he.map((f, C) => {
|
|
981
|
-
const b = C ===
|
|
987
|
+
const b = C === c;
|
|
982
988
|
return /* @__PURE__ */ r(
|
|
983
989
|
m,
|
|
984
990
|
{
|
|
@@ -1013,12 +1019,12 @@ const $t = St("Tv", [
|
|
|
1013
1019
|
gridTemplateColumns: u ? "1fr" : `repeat(auto-fit,minmax(${n(300)},1fr))`,
|
|
1014
1020
|
gap: n(12)
|
|
1015
1021
|
},
|
|
1016
|
-
children: h.map((f) => /* @__PURE__ */ r(
|
|
1022
|
+
children: h.map((f) => /* @__PURE__ */ r(io, { category: f }, f))
|
|
1017
1023
|
}
|
|
1018
1024
|
)
|
|
1019
1025
|
] });
|
|
1020
1026
|
}, B = ({ label: e, home: t, away: o, percent: s, format: i }) => {
|
|
1021
|
-
const { colors: a, radius:
|
|
1027
|
+
const { colors: a, radius: c } = F(), l = t ?? 0, d = o ?? 0, u = l + d || 1, h = s ? Math.round(l) : l, f = s ? Math.round(d) : d, C = (b) => b == null ? "–" : s ? `${Math.round(b)}%` : i ? i(b) : String(b);
|
|
1022
1028
|
return /* @__PURE__ */ y(
|
|
1023
1029
|
m,
|
|
1024
1030
|
{
|
|
@@ -1051,7 +1057,7 @@ const $t = St("Tv", [
|
|
|
1051
1057
|
display: "flex",
|
|
1052
1058
|
justifyContent: "flex-end",
|
|
1053
1059
|
backgroundColor: a.variant,
|
|
1054
|
-
borderRadius: `${
|
|
1060
|
+
borderRadius: `${c.full} 0 0 ${c.full}`,
|
|
1055
1061
|
overflow: "hidden"
|
|
1056
1062
|
},
|
|
1057
1063
|
children: /* @__PURE__ */ r(m, { sx: { width: `${G(l, u)}%`, backgroundColor: a.primary } })
|
|
@@ -1063,14 +1069,14 @@ const $t = St("Tv", [
|
|
|
1063
1069
|
sx: {
|
|
1064
1070
|
flex: 1,
|
|
1065
1071
|
backgroundColor: a.variant,
|
|
1066
|
-
borderRadius: `0 ${
|
|
1072
|
+
borderRadius: `0 ${c.full} ${c.full} 0`,
|
|
1067
1073
|
overflow: "hidden"
|
|
1068
1074
|
},
|
|
1069
1075
|
children: /* @__PURE__ */ r(
|
|
1070
1076
|
m,
|
|
1071
1077
|
{
|
|
1072
1078
|
sx: {
|
|
1073
|
-
width: `${G(
|
|
1079
|
+
width: `${G(d, u)}%`,
|
|
1074
1080
|
height: "100%",
|
|
1075
1081
|
backgroundColor: a.primaryContainer
|
|
1076
1082
|
}
|
|
@@ -1084,13 +1090,13 @@ const $t = St("Tv", [
|
|
|
1084
1090
|
]
|
|
1085
1091
|
}
|
|
1086
1092
|
);
|
|
1087
|
-
},
|
|
1093
|
+
}, lo = [0, 15, 30, 45, 60, 75, 90], co = 5.5, uo = ({
|
|
1088
1094
|
x: e,
|
|
1089
1095
|
top: t,
|
|
1090
1096
|
logo: o,
|
|
1091
1097
|
color: s
|
|
1092
1098
|
}) => {
|
|
1093
|
-
const { colors: i } =
|
|
1099
|
+
const { colors: i } = F();
|
|
1094
1100
|
return /* @__PURE__ */ r(
|
|
1095
1101
|
m,
|
|
1096
1102
|
{
|
|
@@ -1167,12 +1173,12 @@ const $t = St("Tv", [
|
|
|
1167
1173
|
)
|
|
1168
1174
|
}
|
|
1169
1175
|
);
|
|
1170
|
-
},
|
|
1171
|
-
const { colors: t } =
|
|
1176
|
+
}, po = ({ match: e }) => {
|
|
1177
|
+
const { colors: t } = F(), { entities: o, label: s } = Y(), i = o.logo(e.home.id), a = o.logo(e.away.id), [c, l] = e.fullTime ?? [0, 0], d = [];
|
|
1172
1178
|
return e.home.goalsByPeriod.forEach((u, h) => {
|
|
1173
|
-
const f = (g,
|
|
1174
|
-
for (let g = 0; g < C; g += 1)
|
|
1175
|
-
for (let g = 0; g < b; g += 1)
|
|
1179
|
+
const f = (g, $) => (h * 15 + 7.5 + ($ - (g - 1) / 2) * co) / 90 * 100, C = e.home.goalsByPeriod[h] ?? 0, b = e.away.goalsByPeriod[h] ?? 0;
|
|
1180
|
+
for (let g = 0; g < C; g += 1) d.push({ x: f(C, g), top: !0, key: `h${h}-${g}` });
|
|
1181
|
+
for (let g = 0; g < b; g += 1) d.push({ x: f(b, g), top: !1, key: `a${h}-${g}` });
|
|
1176
1182
|
}), /* @__PURE__ */ y(ye, { children: [
|
|
1177
1183
|
/* @__PURE__ */ r(B, { label: s("possession"), home: e.home.possession, away: e.away.possession, percent: !0 }),
|
|
1178
1184
|
/* @__PURE__ */ r(B, { label: s("shotsOnTarget"), home: e.home.shotsOnTarget, away: e.away.shotsOnTarget }),
|
|
@@ -1190,7 +1196,7 @@ const $t = St("Tv", [
|
|
|
1190
1196
|
marginTop: n(4)
|
|
1191
1197
|
},
|
|
1192
1198
|
children: [
|
|
1193
|
-
/* @__PURE__ */ r(
|
|
1199
|
+
/* @__PURE__ */ r(H, { url: i, size: 30, sx: { justifySelf: "end" } }),
|
|
1194
1200
|
/* @__PURE__ */ y(m, { sx: { position: "relative", height: n(84), gridColumn: 2 }, children: [
|
|
1195
1201
|
/* @__PURE__ */ r(
|
|
1196
1202
|
m,
|
|
@@ -1206,9 +1212,9 @@ const $t = St("Tv", [
|
|
|
1206
1212
|
}
|
|
1207
1213
|
}
|
|
1208
1214
|
),
|
|
1209
|
-
|
|
1215
|
+
lo.map((u) => {
|
|
1210
1216
|
const h = u === 45, f = h ? t.text : t.dim;
|
|
1211
|
-
return /* @__PURE__ */ y(
|
|
1217
|
+
return /* @__PURE__ */ y(L.Fragment, { children: [
|
|
1212
1218
|
/* @__PURE__ */ r(
|
|
1213
1219
|
m,
|
|
1214
1220
|
{
|
|
@@ -1243,8 +1249,8 @@ const $t = St("Tv", [
|
|
|
1243
1249
|
)
|
|
1244
1250
|
] }, u);
|
|
1245
1251
|
}),
|
|
1246
|
-
|
|
1247
|
-
|
|
1252
|
+
d.map((u) => /* @__PURE__ */ r(
|
|
1253
|
+
uo,
|
|
1248
1254
|
{
|
|
1249
1255
|
x: u.x,
|
|
1250
1256
|
top: u.top,
|
|
@@ -1253,7 +1259,7 @@ const $t = St("Tv", [
|
|
|
1253
1259
|
},
|
|
1254
1260
|
u.key
|
|
1255
1261
|
)),
|
|
1256
|
-
|
|
1262
|
+
c + l === 0 ? /* @__PURE__ */ r(
|
|
1257
1263
|
w,
|
|
1258
1264
|
{
|
|
1259
1265
|
size: 11,
|
|
@@ -1269,13 +1275,13 @@ const $t = St("Tv", [
|
|
|
1269
1275
|
}
|
|
1270
1276
|
) : null
|
|
1271
1277
|
] }),
|
|
1272
|
-
/* @__PURE__ */ r(
|
|
1278
|
+
/* @__PURE__ */ r(H, { url: a, size: 30, sx: { justifySelf: "start", gridColumn: 3 } })
|
|
1273
1279
|
]
|
|
1274
1280
|
}
|
|
1275
1281
|
)
|
|
1276
1282
|
] });
|
|
1277
|
-
},
|
|
1278
|
-
const { colors: o, radius: s } =
|
|
1283
|
+
}, mo = { W: "formWin", D: "formDraw", L: "formLoss" }, Le = ({ entry: e, side: t }) => {
|
|
1284
|
+
const { colors: o, radius: s } = F(), { entities: i, label: a, fmt: c } = Y(), [l, d] = L.useState(!1), { match: u, result: h } = e, f = { W: o.success, D: o.variant, L: o.danger }[h], C = t === "away" ? { right: n(-4) } : { left: n(-4) }, b = t === "away" ? { right: n(10) } : { left: n(10) }, [g, $] = u.fullTime ?? [0, 0], S = (W, k) => /* @__PURE__ */ y(
|
|
1279
1285
|
m,
|
|
1280
1286
|
{
|
|
1281
1287
|
sx: {
|
|
@@ -1283,19 +1289,19 @@ const $t = St("Tv", [
|
|
|
1283
1289
|
alignItems: "center",
|
|
1284
1290
|
gap: n(6),
|
|
1285
1291
|
minWidth: 0,
|
|
1286
|
-
...
|
|
1292
|
+
...k ? { flexDirection: "row-reverse" } : {}
|
|
1287
1293
|
},
|
|
1288
1294
|
children: [
|
|
1289
|
-
/* @__PURE__ */ r(
|
|
1290
|
-
/* @__PURE__ */ r(w, { size: 12, weight: 600, ellipsis: !0, cms: !0, sx:
|
|
1295
|
+
/* @__PURE__ */ r(H, { url: i.logo(W), size: 22 }),
|
|
1296
|
+
/* @__PURE__ */ r(w, { size: 12, weight: 600, ellipsis: !0, cms: !0, sx: k ? { textAlign: "end" } : void 0, children: i.name(W) })
|
|
1291
1297
|
]
|
|
1292
1298
|
}
|
|
1293
1299
|
);
|
|
1294
1300
|
return /* @__PURE__ */ y(
|
|
1295
1301
|
m,
|
|
1296
1302
|
{
|
|
1297
|
-
onMouseEnter: () =>
|
|
1298
|
-
onMouseLeave: () =>
|
|
1303
|
+
onMouseEnter: () => d(!0),
|
|
1304
|
+
onMouseLeave: () => d(!1),
|
|
1299
1305
|
sx: { position: "relative", display: "flex" },
|
|
1300
1306
|
children: [
|
|
1301
1307
|
/* @__PURE__ */ r(
|
|
@@ -1317,7 +1323,7 @@ const $t = St("Tv", [
|
|
|
1317
1323
|
outline: `2px solid ${l ? o.primary : "transparent"}`,
|
|
1318
1324
|
outlineOffset: "1px"
|
|
1319
1325
|
},
|
|
1320
|
-
children: a(
|
|
1326
|
+
children: a(mo[h])
|
|
1321
1327
|
}
|
|
1322
1328
|
),
|
|
1323
1329
|
l ? /* @__PURE__ */ y(
|
|
@@ -1342,7 +1348,7 @@ const $t = St("Tv", [
|
|
|
1342
1348
|
children: [
|
|
1343
1349
|
/* @__PURE__ */ r(w, { size: 11, font: "secondary", weight: 500, color: o.dim, sx: { textAlign: "center" }, children: a("formMeta", {
|
|
1344
1350
|
round: u.round,
|
|
1345
|
-
date:
|
|
1351
|
+
date: c.date(u.start, { day: "numeric", month: "long", year: "numeric" })
|
|
1346
1352
|
}) }),
|
|
1347
1353
|
/* @__PURE__ */ y(
|
|
1348
1354
|
m,
|
|
@@ -1354,9 +1360,9 @@ const $t = St("Tv", [
|
|
|
1354
1360
|
gap: n(8)
|
|
1355
1361
|
},
|
|
1356
1362
|
children: [
|
|
1357
|
-
|
|
1358
|
-
/* @__PURE__ */ r(w, { size: 15, weight: 700, sx: { whiteSpace: "nowrap", fontVariantNumeric: "tabular-nums" }, children: `${g} – ${
|
|
1359
|
-
|
|
1363
|
+
S(u.home.id, !1),
|
|
1364
|
+
/* @__PURE__ */ r(w, { size: 15, weight: 700, sx: { whiteSpace: "nowrap", fontVariantNumeric: "tabular-nums" }, children: `${g} – ${$}` }),
|
|
1365
|
+
S(u.away.id, !0)
|
|
1360
1366
|
]
|
|
1361
1367
|
}
|
|
1362
1368
|
),
|
|
@@ -1379,9 +1385,9 @@ const $t = St("Tv", [
|
|
|
1379
1385
|
]
|
|
1380
1386
|
}
|
|
1381
1387
|
);
|
|
1382
|
-
},
|
|
1383
|
-
var g,
|
|
1384
|
-
const { colors: t } =
|
|
1388
|
+
}, ho = ({ match: e }) => {
|
|
1389
|
+
var g, $;
|
|
1390
|
+
const { colors: t } = F(), { data: o, entities: s, finished: i, tally: a, label: c, fmt: l } = Y(), d = o.teamStats.get(e.home.id), u = o.teamStats.get(e.away.id), h = Yt(i, e), f = ze(i, e.home.id, e.start), C = ze(i, e.away.id, e.start), b = (S) => l.decimal(S, 1);
|
|
1385
1391
|
return /* @__PURE__ */ y(ye, { children: [
|
|
1386
1392
|
/* @__PURE__ */ y(
|
|
1387
1393
|
m,
|
|
@@ -1393,7 +1399,7 @@ const $t = St("Tv", [
|
|
|
1393
1399
|
gap: n(12)
|
|
1394
1400
|
},
|
|
1395
1401
|
children: [
|
|
1396
|
-
/* @__PURE__ */ r(
|
|
1402
|
+
/* @__PURE__ */ r(H, { url: s.logo(e.home.id), size: 30, sx: { justifySelf: "end" } }),
|
|
1397
1403
|
/* @__PURE__ */ y(
|
|
1398
1404
|
m,
|
|
1399
1405
|
{
|
|
@@ -1405,14 +1411,14 @@ const $t = St("Tv", [
|
|
|
1405
1411
|
gap: n(12)
|
|
1406
1412
|
},
|
|
1407
1413
|
children: [
|
|
1408
|
-
/* @__PURE__ */ r(m, { sx: { display: "flex", gap: n(4) }, children: f.map((
|
|
1409
|
-
/* @__PURE__ */ r(w, { size: 10, font: "secondary", upper: !0, color: t.dim, sx: { textAlign: "center" }, children:
|
|
1410
|
-
/* @__PURE__ */ r(m, { sx: { display: "flex", gap: n(4) }, children: C.map((
|
|
1414
|
+
/* @__PURE__ */ r(m, { sx: { display: "flex", gap: n(4) }, children: f.map((S) => /* @__PURE__ */ r(Le, { entry: S, side: "home" }, S.match.id)) }),
|
|
1415
|
+
/* @__PURE__ */ r(w, { size: 10, font: "secondary", upper: !0, color: t.dim, sx: { textAlign: "center" }, children: c("formLast5") }),
|
|
1416
|
+
/* @__PURE__ */ r(m, { sx: { display: "flex", gap: n(4) }, children: C.map((S) => /* @__PURE__ */ r(Le, { entry: S, side: "away" }, S.match.id)) })
|
|
1411
1417
|
]
|
|
1412
1418
|
}
|
|
1413
1419
|
),
|
|
1414
1420
|
/* @__PURE__ */ r(
|
|
1415
|
-
|
|
1421
|
+
H,
|
|
1416
1422
|
{
|
|
1417
1423
|
url: s.logo(e.away.id),
|
|
1418
1424
|
size: 30,
|
|
@@ -1422,31 +1428,31 @@ const $t = St("Tv", [
|
|
|
1422
1428
|
]
|
|
1423
1429
|
}
|
|
1424
1430
|
),
|
|
1425
|
-
/* @__PURE__ */ r(B, { label:
|
|
1426
|
-
/* @__PURE__ */ r(B, { label:
|
|
1427
|
-
/* @__PURE__ */ r(B, { label:
|
|
1428
|
-
/* @__PURE__ */ r(B, { label:
|
|
1429
|
-
/* @__PURE__ */ r(B, { label:
|
|
1431
|
+
/* @__PURE__ */ r(B, { label: c("wins"), home: (d == null ? void 0 : d.won) ?? null, away: (u == null ? void 0 : u.won) ?? null }),
|
|
1432
|
+
/* @__PURE__ */ r(B, { label: c("draws"), home: (d == null ? void 0 : d.draw) ?? null, away: (u == null ? void 0 : u.draw) ?? null }),
|
|
1433
|
+
/* @__PURE__ */ r(B, { label: c("losses"), home: (d == null ? void 0 : d.lost) ?? null, away: (u == null ? void 0 : u.lost) ?? null }),
|
|
1434
|
+
/* @__PURE__ */ r(B, { label: c("goalsScored"), home: (d == null ? void 0 : d.goalsScored) ?? null, away: (u == null ? void 0 : u.goalsScored) ?? null }),
|
|
1435
|
+
/* @__PURE__ */ r(B, { label: c("goalsConceded"), home: (d == null ? void 0 : d.goalsAllowed) ?? null, away: (u == null ? void 0 : u.goalsAllowed) ?? null }),
|
|
1430
1436
|
/* @__PURE__ */ r(
|
|
1431
1437
|
B,
|
|
1432
1438
|
{
|
|
1433
|
-
label:
|
|
1434
|
-
home: (
|
|
1439
|
+
label: c("goalsPerMatch"),
|
|
1440
|
+
home: (d == null ? void 0 : d.avgTotalGoals) != null ? Number(d.avgTotalGoals.toFixed(1)) : null,
|
|
1435
1441
|
away: (u == null ? void 0 : u.avgTotalGoals) != null ? Number(u.avgTotalGoals.toFixed(1)) : null,
|
|
1436
1442
|
format: b
|
|
1437
1443
|
}
|
|
1438
1444
|
),
|
|
1439
|
-
/* @__PURE__ */ r(B, { label:
|
|
1445
|
+
/* @__PURE__ */ r(B, { label: c("homeAwayWins"), home: (d == null ? void 0 : d.homeWon) ?? null, away: (u == null ? void 0 : u.awayWon) ?? null }),
|
|
1440
1446
|
/* @__PURE__ */ r(
|
|
1441
1447
|
B,
|
|
1442
1448
|
{
|
|
1443
|
-
label:
|
|
1449
|
+
label: c("cleanSheets"),
|
|
1444
1450
|
home: ((g = a.get(e.home.id)) == null ? void 0 : g.cleanSheets) ?? 0,
|
|
1445
|
-
away: ((
|
|
1451
|
+
away: (($ = a.get(e.away.id)) == null ? void 0 : $.cleanSheets) ?? 0
|
|
1446
1452
|
}
|
|
1447
1453
|
),
|
|
1448
1454
|
h != null && h.fullTime ? /* @__PURE__ */ y(w, { component: "div", size: 11, font: "secondary", color: t.dim, children: [
|
|
1449
|
-
|
|
1455
|
+
c("previousMeeting"),
|
|
1450
1456
|
" ",
|
|
1451
1457
|
/* @__PURE__ */ y(m, { component: "b", sx: { color: t.text }, children: [
|
|
1452
1458
|
/* @__PURE__ */ r(m, { component: "span", sx: { unicodeBidi: "plaintext" }, children: s.name(h.home.id) }),
|
|
@@ -1455,14 +1461,14 @@ const $t = St("Tv", [
|
|
|
1455
1461
|
" ",
|
|
1456
1462
|
/* @__PURE__ */ r(m, { component: "span", sx: { unicodeBidi: "plaintext" }, children: s.name(h.away.id) }),
|
|
1457
1463
|
" ",
|
|
1458
|
-
|
|
1464
|
+
c("previousMeetingRound", { round: h.round })
|
|
1459
1465
|
] })
|
|
1460
1466
|
] }) : null
|
|
1461
1467
|
] });
|
|
1462
|
-
},
|
|
1463
|
-
var
|
|
1464
|
-
const { colors: i, radius: a } =
|
|
1465
|
-
|
|
1468
|
+
}, go = ({ match: e, odds: t, open: o, onToggle: s }) => {
|
|
1469
|
+
var j, U, p, I, v;
|
|
1470
|
+
const { colors: i, radius: a } = F(), { entities: c, label: l, fmt: d, props: u } = Y(), h = (j = u.callbacks) == null ? void 0 : j.onBroadcastClick, f = e.status === "FINISHED", C = e.status === "LIVE", [b, g] = e.fullTime ?? [0, 0], $ = f && b > g, S = f && g > b, W = f && b === g, k = e.status === "CANCELLED", M = !k, O = !f && !k, _ = C ? e.liveMinute !== null ? l("liveMinute", { minute: e.liveMinute }) : e.isHalfTime ? l("halfTimeShort") : l("live") : d.time(e.start), R = xe(), E = (u.showOdds ?? !1) && !R && (e.status === "UPCOMING" || C), A = t ? /* @__PURE__ */ r(
|
|
1471
|
+
Ct,
|
|
1466
1472
|
{
|
|
1467
1473
|
odds: t,
|
|
1468
1474
|
market: ((U = u.odds) == null ? void 0 : U.market) ?? "FT_1X2",
|
|
@@ -1470,41 +1476,41 @@ const $t = St("Tv", [
|
|
|
1470
1476
|
bare: !0,
|
|
1471
1477
|
mode: ((p = u.odds) == null ? void 0 : p.mode) ?? "default",
|
|
1472
1478
|
flashInterval: (I = u.odds) == null ? void 0 : I.flashInterval,
|
|
1473
|
-
onSelect: (
|
|
1479
|
+
onSelect: (v = u.callbacks) == null ? void 0 : v.onAddToBetslip
|
|
1474
1480
|
}
|
|
1475
|
-
) : null,
|
|
1481
|
+
) : null, z = {
|
|
1476
1482
|
// A price click must not toggle the row.
|
|
1477
|
-
onClick: (
|
|
1478
|
-
onKeyDown: (
|
|
1479
|
-
},
|
|
1483
|
+
onClick: (P) => P.stopPropagation(),
|
|
1484
|
+
onKeyDown: (P) => P.stopPropagation()
|
|
1485
|
+
}, T = (P, K, ne, X) => /* @__PURE__ */ r(
|
|
1480
1486
|
w,
|
|
1481
1487
|
{
|
|
1482
1488
|
size: 14,
|
|
1483
1489
|
weight: K ? 700 : 500,
|
|
1484
|
-
color: ne && !
|
|
1490
|
+
color: ne && !W ? i.dim : i.text,
|
|
1485
1491
|
ellipsis: !0,
|
|
1486
1492
|
cms: !0,
|
|
1487
1493
|
sx: X ? { textAlign: "right" } : void 0,
|
|
1488
|
-
children:
|
|
1494
|
+
children: c.name(P)
|
|
1489
1495
|
}
|
|
1490
1496
|
);
|
|
1491
1497
|
return /* @__PURE__ */ y(m, { sx: { borderBottom: `1px solid ${i.border}` }, children: [
|
|
1492
1498
|
/* @__PURE__ */ y(
|
|
1493
1499
|
m,
|
|
1494
1500
|
{
|
|
1495
|
-
...
|
|
1501
|
+
...M ? {
|
|
1496
1502
|
role: "button",
|
|
1497
1503
|
"aria-expanded": o,
|
|
1498
1504
|
tabIndex: 0,
|
|
1499
1505
|
onClick: s,
|
|
1500
|
-
onKeyDown: (
|
|
1501
|
-
(
|
|
1506
|
+
onKeyDown: (P) => {
|
|
1507
|
+
(P.key === "Enter" || P.key === " ") && (P.preventDefault(), s());
|
|
1502
1508
|
}
|
|
1503
1509
|
} : {},
|
|
1504
1510
|
sx: {
|
|
1505
1511
|
display: "grid",
|
|
1506
1512
|
gridTemplateColumns: [
|
|
1507
|
-
|
|
1513
|
+
O ? n(h ? 80 : 60) : null,
|
|
1508
1514
|
"minmax(0,1fr) auto minmax(0,1fr)",
|
|
1509
1515
|
E ? n(300) : null,
|
|
1510
1516
|
n(20)
|
|
@@ -1514,18 +1520,18 @@ const $t = St("Tv", [
|
|
|
1514
1520
|
rowGap: n(6),
|
|
1515
1521
|
// Minus the 3px accent border, so the rail lines up with the day header's text.
|
|
1516
1522
|
padding: `${n(6)} ${n(16)} ${n(6)} calc(${n(16)} - 3px)`,
|
|
1517
|
-
cursor:
|
|
1523
|
+
cursor: M ? "pointer" : "default",
|
|
1518
1524
|
backgroundColor: o ? i.onSurface : "transparent",
|
|
1519
1525
|
borderLeft: `3px solid ${C ? i.danger : "transparent"}`,
|
|
1520
1526
|
// Not onSurface: that is the day-header fill, so a hovered row would merge into it.
|
|
1521
|
-
...
|
|
1527
|
+
...M ? {
|
|
1522
1528
|
"&:hover": {
|
|
1523
1529
|
backgroundColor: o ? i.onSurface : i.tint
|
|
1524
1530
|
}
|
|
1525
1531
|
} : {}
|
|
1526
1532
|
},
|
|
1527
1533
|
children: [
|
|
1528
|
-
|
|
1534
|
+
O ? /* @__PURE__ */ y(
|
|
1529
1535
|
m,
|
|
1530
1536
|
{
|
|
1531
1537
|
sx: {
|
|
@@ -1555,7 +1561,7 @@ const $t = St("Tv", [
|
|
|
1555
1561
|
font: "secondary",
|
|
1556
1562
|
weight: 700,
|
|
1557
1563
|
color: C ? i.danger : i.text,
|
|
1558
|
-
children:
|
|
1564
|
+
children: _
|
|
1559
1565
|
}
|
|
1560
1566
|
),
|
|
1561
1567
|
h && e.status === "UPCOMING" ? /* @__PURE__ */ r(
|
|
@@ -1565,10 +1571,10 @@ const $t = St("Tv", [
|
|
|
1565
1571
|
type: "button",
|
|
1566
1572
|
"aria-label": l("watchOnTv"),
|
|
1567
1573
|
title: l("watchOnTv"),
|
|
1568
|
-
onClick: (
|
|
1569
|
-
|
|
1574
|
+
onClick: (P) => {
|
|
1575
|
+
P.stopPropagation(), h(e.id);
|
|
1570
1576
|
},
|
|
1571
|
-
onKeyDown: (
|
|
1577
|
+
onKeyDown: (P) => P.stopPropagation(),
|
|
1572
1578
|
sx: {
|
|
1573
1579
|
display: "inline-flex",
|
|
1574
1580
|
alignItems: "center",
|
|
@@ -1581,7 +1587,7 @@ const $t = St("Tv", [
|
|
|
1581
1587
|
color: i.dim,
|
|
1582
1588
|
"&:hover": { color: i.primary }
|
|
1583
1589
|
},
|
|
1584
|
-
children: /* @__PURE__ */ r(
|
|
1590
|
+
children: /* @__PURE__ */ r(kt, { size: "1em", "aria-hidden": !0 })
|
|
1585
1591
|
}
|
|
1586
1592
|
) : null
|
|
1587
1593
|
]
|
|
@@ -1598,8 +1604,8 @@ const $t = St("Tv", [
|
|
|
1598
1604
|
minWidth: 0
|
|
1599
1605
|
},
|
|
1600
1606
|
children: [
|
|
1601
|
-
|
|
1602
|
-
/* @__PURE__ */ r(
|
|
1607
|
+
T(e.home.id, $, S, !0),
|
|
1608
|
+
/* @__PURE__ */ r(H, { url: c.logo(e.home.id), size: 24 })
|
|
1603
1609
|
]
|
|
1604
1610
|
}
|
|
1605
1611
|
),
|
|
@@ -1613,7 +1619,7 @@ const $t = St("Tv", [
|
|
|
1613
1619
|
minWidth: n(56)
|
|
1614
1620
|
},
|
|
1615
1621
|
children: [
|
|
1616
|
-
|
|
1622
|
+
k && e.notPlayedReason ? /* @__PURE__ */ r(
|
|
1617
1623
|
w,
|
|
1618
1624
|
{
|
|
1619
1625
|
size: 11,
|
|
@@ -1668,12 +1674,12 @@ const $t = St("Tv", [
|
|
|
1668
1674
|
minWidth: 0
|
|
1669
1675
|
},
|
|
1670
1676
|
children: [
|
|
1671
|
-
/* @__PURE__ */ r(
|
|
1672
|
-
|
|
1677
|
+
/* @__PURE__ */ r(H, { url: c.logo(e.away.id), size: 24 }),
|
|
1678
|
+
T(e.away.id, S, $, !1)
|
|
1673
1679
|
]
|
|
1674
1680
|
}
|
|
1675
1681
|
),
|
|
1676
|
-
E ? /* @__PURE__ */ r(m, { ...
|
|
1682
|
+
E ? /* @__PURE__ */ r(m, { ...z, sx: { minWidth: 0, cursor: "default" }, children: A }) : null,
|
|
1677
1683
|
/* @__PURE__ */ r(
|
|
1678
1684
|
m,
|
|
1679
1685
|
{
|
|
@@ -1689,30 +1695,30 @@ const $t = St("Tv", [
|
|
|
1689
1695
|
height: n(16),
|
|
1690
1696
|
color: i.dim,
|
|
1691
1697
|
// Hidden, not removed, so the teams stay aligned with the expandable rows.
|
|
1692
|
-
visibility:
|
|
1698
|
+
visibility: M ? "visible" : "hidden",
|
|
1693
1699
|
transform: o ? "rotate(180deg)" : "rotate(0)",
|
|
1694
1700
|
transition: "transform .2s"
|
|
1695
1701
|
},
|
|
1696
1702
|
children: /* @__PURE__ */ r("path", { d: "m6 9 6 6 6-6" })
|
|
1697
1703
|
}
|
|
1698
1704
|
),
|
|
1699
|
-
|
|
1705
|
+
A && !E ? /* @__PURE__ */ r(
|
|
1700
1706
|
m,
|
|
1701
1707
|
{
|
|
1702
|
-
...
|
|
1708
|
+
...z,
|
|
1703
1709
|
sx: {
|
|
1704
|
-
gridColumn:
|
|
1710
|
+
gridColumn: O ? "2 / 5" : "1 / 4",
|
|
1705
1711
|
display: "flex",
|
|
1706
1712
|
justifyContent: "center",
|
|
1707
1713
|
cursor: "default"
|
|
1708
1714
|
},
|
|
1709
|
-
children: /* @__PURE__ */ r(m, { sx: { width: "100%", maxWidth: n(300) }, children:
|
|
1715
|
+
children: /* @__PURE__ */ r(m, { sx: { width: "100%", maxWidth: n(300) }, children: A })
|
|
1710
1716
|
}
|
|
1711
1717
|
) : null
|
|
1712
1718
|
]
|
|
1713
1719
|
}
|
|
1714
1720
|
),
|
|
1715
|
-
o &&
|
|
1721
|
+
o && M ? /* @__PURE__ */ r(
|
|
1716
1722
|
m,
|
|
1717
1723
|
{
|
|
1718
1724
|
sx: {
|
|
@@ -1723,48 +1729,48 @@ const $t = St("Tv", [
|
|
|
1723
1729
|
backgroundColor: i.onSurface,
|
|
1724
1730
|
borderTop: `1px solid ${i.border}`
|
|
1725
1731
|
},
|
|
1726
|
-
children: f || C ? /* @__PURE__ */ r(
|
|
1732
|
+
children: f || C ? /* @__PURE__ */ r(po, { match: e }) : /* @__PURE__ */ r(ho, { match: e })
|
|
1727
1733
|
}
|
|
1728
1734
|
) : null
|
|
1729
1735
|
] });
|
|
1730
|
-
}, Pe = (e, t) => e.start.localeCompare(t.start),
|
|
1736
|
+
}, Pe = (e, t) => e.start.localeCompare(t.start), fo = (e) => e.status === "UPCOMING" || e.status === "LIVE", yo = () => {
|
|
1731
1737
|
var ve, Ie, $e, Te, ke, _e;
|
|
1732
|
-
const { colors: e, radius: t, fonts: o } =
|
|
1733
|
-
(x) => E.some((
|
|
1734
|
-
),
|
|
1738
|
+
const { colors: e, radius: t, fonts: o } = F(), { sdk: s, data: i, entities: a, label: c, fmt: l, props: d } = Y(), [u, h] = L.useState("upcoming"), [f, C] = L.useState(null), [b, g] = L.useState(null), [$, S] = L.useState(null), [W, k] = L.useState(null), [M, O] = L.useState(null), _ = u === "upcoming", R = (x) => fo(x) === _, E = i.matches.filter(R).sort(Pe), A = i.stages.filter(
|
|
1739
|
+
(x) => E.some((D) => D.stageId === x.id)
|
|
1740
|
+
), z = _ ? A : [...A].reverse(), T = z.length > 1, j = _ ? f : b, U = (ve = _ ? E[0] : E[E.length - 1]) == null ? void 0 : ve.stageId, p = T ? z.some((x) => x.id === j) ? j : U ?? z[0].id : null, I = (x) => !T || x.stageId === p, v = Array.from(
|
|
1735
1741
|
new Set(E.filter(I).map((x) => x.round))
|
|
1736
|
-
).sort((x,
|
|
1742
|
+
).sort((x, D) => x - D), P = _ ? v : [...v].reverse(), K = _ ? $ : W, ne = K !== null && v.includes(K) ? K : _ ? v[0] : v[v.length - 1], X = i.matches.filter((x) => x.round === ne && I(x)).sort(Pe), re = X.filter(R), Ve = L.useMemo(
|
|
1737
1743
|
() => re.filter((x) => x.status === "UPCOMING" || x.status === "LIVE").map((x) => x.id),
|
|
1738
1744
|
[re]
|
|
1739
|
-
), { odds: Ye } =
|
|
1740
|
-
enabled:
|
|
1741
|
-
markets: [((Ie =
|
|
1745
|
+
), { odds: Ye } = St(s, Ve, {
|
|
1746
|
+
enabled: d.showOdds ?? !1,
|
|
1747
|
+
markets: [((Ie = d.odds) == null ? void 0 : Ie.market) ?? "FT_1X2"],
|
|
1742
1748
|
sport: i.sport,
|
|
1743
|
-
pollingIntervalMs: ($e =
|
|
1744
|
-
operators: (Te =
|
|
1745
|
-
affiliateId: (ke =
|
|
1746
|
-
affiliateIds: (_e =
|
|
1747
|
-
}), Ce = (x) => l.date(x, { day: "numeric", month: "short" }), Xe = X.length ?
|
|
1749
|
+
pollingIntervalMs: ($e = d.odds) == null ? void 0 : $e.pollingInterval,
|
|
1750
|
+
operators: (Te = d.odds) == null ? void 0 : Te.operators,
|
|
1751
|
+
affiliateId: (ke = d.odds) == null ? void 0 : ke.affiliateId,
|
|
1752
|
+
affiliateIds: (_e = d.odds) == null ? void 0 : _e.affiliateIds
|
|
1753
|
+
}), Ce = (x) => l.date(x, { day: "numeric", month: "short" }), Xe = X.length ? c("roundSummary", {
|
|
1748
1754
|
from: Ce(X[0].start),
|
|
1749
1755
|
to: Ce(X[X.length - 1].start),
|
|
1750
|
-
matches:
|
|
1756
|
+
matches: c("matchesCount", { count: X.length })
|
|
1751
1757
|
}) : "", ue = [];
|
|
1752
1758
|
re.forEach((x) => {
|
|
1753
|
-
const
|
|
1759
|
+
const D = l.date(x.start, {
|
|
1754
1760
|
weekday: "long",
|
|
1755
1761
|
day: "numeric",
|
|
1756
1762
|
month: "long"
|
|
1757
|
-
}), Re = ue.find((et) => et.label ===
|
|
1758
|
-
Re ? Re.rows.push(x) : ue.push({ label:
|
|
1763
|
+
}), Re = ue.find((et) => et.label === D);
|
|
1764
|
+
Re ? Re.rows.push(x) : ue.push({ label: D, rows: [x] });
|
|
1759
1765
|
});
|
|
1760
1766
|
const qe = (x) => {
|
|
1761
|
-
h(x),
|
|
1767
|
+
h(x), O(null);
|
|
1762
1768
|
}, Je = (x) => {
|
|
1763
|
-
|
|
1769
|
+
_ ? S(x) : k(x), O(null);
|
|
1764
1770
|
}, Qe = (x) => {
|
|
1765
|
-
|
|
1766
|
-
}, Ze = (x) => x.nameId && a.has(x.nameId) ? a.name(x.nameId) :
|
|
1767
|
-
const
|
|
1771
|
+
_ ? (C(x), S(null)) : (g(x), k(null)), O(null);
|
|
1772
|
+
}, Ze = (x) => x.nameId && a.has(x.nameId) ? a.name(x.nameId) : c("stage", { number: i.stages.indexOf(x) + 1 }), Se = (x) => {
|
|
1773
|
+
const D = u === x;
|
|
1768
1774
|
return /* @__PURE__ */ r(
|
|
1769
1775
|
m,
|
|
1770
1776
|
{
|
|
@@ -1779,11 +1785,11 @@ const $t = St("Tv", [
|
|
|
1779
1785
|
fontFamily: o.primary,
|
|
1780
1786
|
fontSize: n(13),
|
|
1781
1787
|
fontWeight: 700,
|
|
1782
|
-
backgroundColor:
|
|
1783
|
-
color:
|
|
1784
|
-
boxShadow:
|
|
1788
|
+
backgroundColor: D ? e.surface : "transparent",
|
|
1789
|
+
color: D ? e.text : e.dim,
|
|
1790
|
+
boxShadow: D ? "0 1px 2px rgba(0,0,0,.12)" : "none"
|
|
1785
1791
|
},
|
|
1786
|
-
children:
|
|
1792
|
+
children: c(x)
|
|
1787
1793
|
}
|
|
1788
1794
|
);
|
|
1789
1795
|
};
|
|
@@ -1821,7 +1827,7 @@ const $t = St("Tv", [
|
|
|
1821
1827
|
]
|
|
1822
1828
|
}
|
|
1823
1829
|
),
|
|
1824
|
-
|
|
1830
|
+
T ? (
|
|
1825
1831
|
// Pills styled like the Standings stage tabs.
|
|
1826
1832
|
/* @__PURE__ */ r(
|
|
1827
1833
|
m,
|
|
@@ -1836,15 +1842,15 @@ const $t = St("Tv", [
|
|
|
1836
1842
|
scrollbarWidth: "none",
|
|
1837
1843
|
"&::-webkit-scrollbar": { display: "none" }
|
|
1838
1844
|
},
|
|
1839
|
-
children:
|
|
1840
|
-
const
|
|
1845
|
+
children: z.map((x) => {
|
|
1846
|
+
const D = x.id === p;
|
|
1841
1847
|
return /* @__PURE__ */ r(
|
|
1842
1848
|
m,
|
|
1843
1849
|
{
|
|
1844
1850
|
component: "button",
|
|
1845
1851
|
type: "button",
|
|
1846
1852
|
role: "tab",
|
|
1847
|
-
"aria-selected":
|
|
1853
|
+
"aria-selected": D,
|
|
1848
1854
|
onClick: () => Qe(x.id),
|
|
1849
1855
|
sx: {
|
|
1850
1856
|
flexShrink: 0,
|
|
@@ -1860,9 +1866,9 @@ const $t = St("Tv", [
|
|
|
1860
1866
|
letterSpacing: "0.025em",
|
|
1861
1867
|
whiteSpace: "nowrap",
|
|
1862
1868
|
unicodeBidi: "plaintext",
|
|
1863
|
-
backgroundColor:
|
|
1864
|
-
color:
|
|
1865
|
-
"&:hover":
|
|
1869
|
+
backgroundColor: D ? e.primary : "transparent",
|
|
1870
|
+
color: D ? e.onPrimary : e.dim,
|
|
1871
|
+
"&:hover": D ? {} : { backgroundColor: e.variant, color: e.primary }
|
|
1866
1872
|
},
|
|
1867
1873
|
children: Ze(x)
|
|
1868
1874
|
},
|
|
@@ -1872,7 +1878,7 @@ const $t = St("Tv", [
|
|
|
1872
1878
|
}
|
|
1873
1879
|
)
|
|
1874
1880
|
) : null,
|
|
1875
|
-
|
|
1881
|
+
P.length > (T ? 1 : 0) ? /* @__PURE__ */ r(
|
|
1876
1882
|
m,
|
|
1877
1883
|
{
|
|
1878
1884
|
sx: {
|
|
@@ -1884,8 +1890,8 @@ const $t = St("Tv", [
|
|
|
1884
1890
|
scrollbarWidth: "none",
|
|
1885
1891
|
"&::-webkit-scrollbar": { display: "none" }
|
|
1886
1892
|
},
|
|
1887
|
-
children:
|
|
1888
|
-
const
|
|
1893
|
+
children: P.map((x) => {
|
|
1894
|
+
const D = x === ne;
|
|
1889
1895
|
return /* @__PURE__ */ r(
|
|
1890
1896
|
m,
|
|
1891
1897
|
{
|
|
@@ -1894,25 +1900,25 @@ const $t = St("Tv", [
|
|
|
1894
1900
|
onClick: () => Je(x),
|
|
1895
1901
|
sx: {
|
|
1896
1902
|
flexShrink: 0,
|
|
1897
|
-
border: `1px solid ${
|
|
1903
|
+
border: `1px solid ${D ? e.primary : e.border}`,
|
|
1898
1904
|
cursor: "pointer",
|
|
1899
1905
|
borderRadius: t.full,
|
|
1900
1906
|
padding: `${n(5, 12)} ${n(12, 12)}`,
|
|
1901
1907
|
fontFamily: o.secondary,
|
|
1902
1908
|
fontSize: n(12),
|
|
1903
1909
|
fontWeight: 700,
|
|
1904
|
-
backgroundColor:
|
|
1905
|
-
color:
|
|
1910
|
+
backgroundColor: D ? e.primary : e.surface,
|
|
1911
|
+
color: D ? e.onPrimary : e.body,
|
|
1906
1912
|
whiteSpace: "nowrap"
|
|
1907
1913
|
},
|
|
1908
|
-
children:
|
|
1914
|
+
children: c("round", { round: x })
|
|
1909
1915
|
},
|
|
1910
1916
|
x
|
|
1911
1917
|
);
|
|
1912
1918
|
})
|
|
1913
1919
|
}
|
|
1914
1920
|
) : null,
|
|
1915
|
-
ue.map((x) => /* @__PURE__ */ y(
|
|
1921
|
+
ue.map((x) => /* @__PURE__ */ y(L.Fragment, { children: [
|
|
1916
1922
|
/* @__PURE__ */ r(
|
|
1917
1923
|
w,
|
|
1918
1924
|
{
|
|
@@ -1929,15 +1935,15 @@ const $t = St("Tv", [
|
|
|
1929
1935
|
children: x.label
|
|
1930
1936
|
}
|
|
1931
1937
|
),
|
|
1932
|
-
x.rows.map((
|
|
1933
|
-
|
|
1938
|
+
x.rows.map((D) => /* @__PURE__ */ r(
|
|
1939
|
+
go,
|
|
1934
1940
|
{
|
|
1935
|
-
match:
|
|
1936
|
-
odds: Ye.get(
|
|
1937
|
-
open:
|
|
1938
|
-
onToggle: () =>
|
|
1941
|
+
match: D,
|
|
1942
|
+
odds: Ye.get(D.id) ?? null,
|
|
1943
|
+
open: M === D.id,
|
|
1944
|
+
onToggle: () => O(M === D.id ? null : D.id)
|
|
1939
1945
|
},
|
|
1940
|
-
|
|
1946
|
+
D.id
|
|
1941
1947
|
))
|
|
1942
1948
|
] }, x.label)),
|
|
1943
1949
|
re.length === 0 ? /* @__PURE__ */ r(
|
|
@@ -1948,7 +1954,7 @@ const $t = St("Tv", [
|
|
|
1948
1954
|
font: "secondary",
|
|
1949
1955
|
color: e.dim,
|
|
1950
1956
|
sx: { padding: n(24, 14), textAlign: "center" },
|
|
1951
|
-
children: E.length > 0 ?
|
|
1957
|
+
children: E.length > 0 ? c("noMatches") : c(_ ? "noUpcomingMatches" : "noResultsYet")
|
|
1952
1958
|
}
|
|
1953
1959
|
) : null
|
|
1954
1960
|
] });
|
|
@@ -1967,7 +1973,7 @@ const $t = St("Tv", [
|
|
|
1967
1973
|
widths: e,
|
|
1968
1974
|
height: t
|
|
1969
1975
|
}) => {
|
|
1970
|
-
const { radius: o } =
|
|
1976
|
+
const { radius: o } = F();
|
|
1971
1977
|
return /* @__PURE__ */ r(
|
|
1972
1978
|
m,
|
|
1973
1979
|
{
|
|
@@ -1986,7 +1992,7 @@ const $t = St("Tv", [
|
|
|
1986
1992
|
caption: t,
|
|
1987
1993
|
children: o
|
|
1988
1994
|
}) => {
|
|
1989
|
-
const { colors: s, radius: i } =
|
|
1995
|
+
const { colors: s, radius: i } = F();
|
|
1990
1996
|
return /* @__PURE__ */ y(
|
|
1991
1997
|
m,
|
|
1992
1998
|
{
|
|
@@ -2032,13 +2038,13 @@ const $t = St("Tv", [
|
|
|
2032
2038
|
strokeWidth: 2,
|
|
2033
2039
|
strokeLinecap: "round",
|
|
2034
2040
|
strokeLinejoin: "round"
|
|
2035
|
-
},
|
|
2041
|
+
}, xo = 4, bo = (e, t, o, s) => {
|
|
2036
2042
|
if (s) return 12;
|
|
2037
2043
|
if (o) return e === t - 1 && t % 2 === 1 ? 12 : 6;
|
|
2038
|
-
const i = Math.min(t,
|
|
2044
|
+
const i = Math.min(t, xo), a = e < i ? i : t - i;
|
|
2039
2045
|
return Math.floor(12 / a);
|
|
2040
|
-
},
|
|
2041
|
-
const { colors: e, radius: t } =
|
|
2046
|
+
}, wo = () => {
|
|
2047
|
+
const { colors: e, radius: t } = F(), o = xe(), s = ct(), { data: i, entities: a, tally: c, label: l, fmt: d, props: u } = Y(), h = L.useMemo(() => Xt(i.matches), [i.matches]), f = h.played, C = (p) => l("ofMatches", { value: p, matches: l("matchesCount", { count: f }) }), b = (p) => d.decimal(f ? p / f : 0, 1), g = (p, I = 22) => /* @__PURE__ */ r(w, { size: I, weight: 700, color: e.text, sx: { lineHeight: 1 }, children: p }), $ = [
|
|
2042
2048
|
{
|
|
2043
2049
|
label: l("matchesPlayed"),
|
|
2044
2050
|
value: f,
|
|
@@ -2047,7 +2053,7 @@ const $t = St("Tv", [
|
|
|
2047
2053
|
{
|
|
2048
2054
|
label: l("totalGoals"),
|
|
2049
2055
|
value: h.goals,
|
|
2050
|
-
sub: l("goalsPerMatchValue", { value:
|
|
2056
|
+
sub: l("goalsPerMatchValue", { value: d.decimal(f ? h.goals / f : 0, 2) })
|
|
2051
2057
|
},
|
|
2052
2058
|
{ label: l("homeWins"), value: `${G(h.homeWins, f)}%`, sub: C(h.homeWins) },
|
|
2053
2059
|
{
|
|
@@ -2058,11 +2064,11 @@ const $t = St("Tv", [
|
|
|
2058
2064
|
goalless: h.goalless
|
|
2059
2065
|
})
|
|
2060
2066
|
}
|
|
2061
|
-
],
|
|
2067
|
+
], S = [
|
|
2062
2068
|
{ label: l("homeWin"), n: h.homeWins, color: e.primary },
|
|
2063
2069
|
{ label: l("draw"), n: h.draws, color: e.border },
|
|
2064
2070
|
{ label: l("awayWin"), n: h.awayWins, color: e.primaryContainer }
|
|
2065
|
-
],
|
|
2071
|
+
], W = Math.max(...h.goalsByPeriod, 1), k = [
|
|
2066
2072
|
...[1.5, 2.5, 3.5].map((p) => ({
|
|
2067
2073
|
// "Over 1.5" reads better as the whole number it means: 2+.
|
|
2068
2074
|
label: l("goalsOrMore", { count: Math.ceil(p) }),
|
|
@@ -2070,45 +2076,45 @@ const $t = St("Tv", [
|
|
|
2070
2076
|
})),
|
|
2071
2077
|
{ label: l("bothTeamsScored"), pct: G(h.bothScored, f) },
|
|
2072
2078
|
{ label: l("goallessDraw"), pct: G(h.goalless, f) }
|
|
2073
|
-
],
|
|
2074
|
-
I !== void 0 &&
|
|
2079
|
+
], M = Qt(i.teamStats), O = Array.from(c.keys()), _ = ce(u.teamCTA), R = [], E = (p, I, v, P, K) => {
|
|
2080
|
+
I !== void 0 && R.push({ label: l(p), teamId: v(I), value: P(I), unit: K(I) });
|
|
2075
2081
|
};
|
|
2076
|
-
E("mostWins", V(
|
|
2082
|
+
E("mostWins", V(M, (p) => p.won), (p) => p.teamId, (p) => p.won, (p) => l("unitWins", { count: p.won })), E("bestAttack", V(M, (p) => p.goalsScored), (p) => p.teamId, (p) => p.goalsScored, () => l("unitGoals")), E("bestDefence", V(M, (p) => p.goalsAllowed, -1), (p) => p.teamId, (p) => p.goalsAllowed, (p) => l("unitConceded", { count: p.goalsAllowed })), E(
|
|
2077
2083
|
"cleanSheets",
|
|
2078
|
-
V(
|
|
2084
|
+
V(O, (p) => {
|
|
2079
2085
|
var I;
|
|
2080
|
-
return ((I =
|
|
2086
|
+
return ((I = c.get(p)) == null ? void 0 : I.cleanSheets) ?? 0;
|
|
2081
2087
|
}),
|
|
2082
2088
|
(p) => p,
|
|
2083
2089
|
(p) => {
|
|
2084
2090
|
var I;
|
|
2085
|
-
return ((I =
|
|
2091
|
+
return ((I = c.get(p)) == null ? void 0 : I.cleanSheets) ?? 0;
|
|
2086
2092
|
},
|
|
2087
2093
|
() => l("unitMatches")
|
|
2088
|
-
), E("bestHome", V(
|
|
2094
|
+
), E("bestHome", V(M, (p) => p.homeWon), (p) => p.teamId, (p) => p.homeWon, (p) => l("unitWins", { count: p.homeWon })), E("bestAway", V(M, (p) => p.awayWon), (p) => p.teamId, (p) => p.awayWon, (p) => l("unitWins", { count: p.awayWon })), E(
|
|
2089
2095
|
"mostCards",
|
|
2090
|
-
V(
|
|
2091
|
-
var I,
|
|
2092
|
-
return (((I =
|
|
2096
|
+
V(O, (p) => {
|
|
2097
|
+
var I, v;
|
|
2098
|
+
return (((I = c.get(p)) == null ? void 0 : I.yellowCards) ?? 0) + (((v = c.get(p)) == null ? void 0 : v.redCards) ?? 0);
|
|
2093
2099
|
}),
|
|
2094
2100
|
(p) => p,
|
|
2095
2101
|
(p) => {
|
|
2096
|
-
var I,
|
|
2097
|
-
return (((I =
|
|
2102
|
+
var I, v;
|
|
2103
|
+
return (((I = c.get(p)) == null ? void 0 : I.yellowCards) ?? 0) + (((v = c.get(p)) == null ? void 0 : v.redCards) ?? 0);
|
|
2098
2104
|
},
|
|
2099
2105
|
(p) => {
|
|
2100
|
-
var I,
|
|
2101
|
-
return `${l("yellowCount", { count: ((I =
|
|
2102
|
-
count: ((
|
|
2106
|
+
var I, v;
|
|
2107
|
+
return `${l("yellowCount", { count: ((I = c.get(p)) == null ? void 0 : I.yellowCards) ?? 0 })} · ${l("redCount", {
|
|
2108
|
+
count: ((v = c.get(p)) == null ? void 0 : v.redCards) ?? 0
|
|
2103
2109
|
})}`;
|
|
2104
2110
|
}
|
|
2105
2111
|
);
|
|
2106
|
-
const
|
|
2107
|
-
|
|
2112
|
+
const A = i.matches.filter(we), z = [], T = V(A, de), j = V(A, (p) => Math.abs(p.fullTime[0] - p.fullTime[1]));
|
|
2113
|
+
T && z.push({ label: l("highestScoring"), match: T }), j && z.push({ label: l("biggestWin"), match: j });
|
|
2108
2114
|
const U = ce(u.matchCTA);
|
|
2109
2115
|
return /* @__PURE__ */ y(m, { sx: { display: "flex", flexDirection: "column", gap: n(12) }, children: [
|
|
2110
2116
|
/* @__PURE__ */ r(He, { children: l("seasonTitle") }),
|
|
2111
|
-
/* @__PURE__ */ r(m, { sx: { display: "grid", gridTemplateColumns: `repeat(auto-fit,minmax(${n(150)},1fr))`, gap: n(12) }, children:
|
|
2117
|
+
/* @__PURE__ */ r(m, { sx: { display: "grid", gridTemplateColumns: `repeat(auto-fit,minmax(${n(150)},1fr))`, gap: n(12) }, children: $.map((p) => /* @__PURE__ */ y(
|
|
2112
2118
|
Z,
|
|
2113
2119
|
{
|
|
2114
2120
|
sx: { padding: `${n(14)} ${n(16)}`, display: "flex", flexDirection: "column", gap: n(4) },
|
|
@@ -2123,8 +2129,8 @@ const $t = St("Tv", [
|
|
|
2123
2129
|
/* @__PURE__ */ y(m, { sx: { display: "grid", gridTemplateColumns: ge, gap: n(12) }, children: [
|
|
2124
2130
|
/* @__PURE__ */ y(se, { children: [
|
|
2125
2131
|
/* @__PURE__ */ r(q, { children: l("outcomeTitle") }),
|
|
2126
|
-
/* @__PURE__ */ r(We, { height: 14, widths:
|
|
2127
|
-
/* @__PURE__ */ r(m, { sx: { display: "grid", gridTemplateColumns: "repeat(3,1fr)", gap: n(8) }, children:
|
|
2132
|
+
/* @__PURE__ */ r(We, { height: 14, widths: S.map((p) => ({ w: G(p.n, f), color: p.color })) }),
|
|
2133
|
+
/* @__PURE__ */ r(m, { sx: { display: "grid", gridTemplateColumns: "repeat(3,1fr)", gap: n(8) }, children: S.map((p) => /* @__PURE__ */ y(
|
|
2128
2134
|
m,
|
|
2129
2135
|
{
|
|
2130
2136
|
sx: {
|
|
@@ -2196,9 +2202,9 @@ const $t = St("Tv", [
|
|
|
2196
2202
|
{
|
|
2197
2203
|
sx: {
|
|
2198
2204
|
width: "100%",
|
|
2199
|
-
height: n(Math.max(6, Math.round(p /
|
|
2205
|
+
height: n(Math.max(6, Math.round(p / W * 56))),
|
|
2200
2206
|
borderRadius: `${t.xs} ${t.xs} 0 0`,
|
|
2201
|
-
backgroundColor: p ===
|
|
2207
|
+
backgroundColor: p === W ? e.primary : e.tint2
|
|
2202
2208
|
}
|
|
2203
2209
|
}
|
|
2204
2210
|
)
|
|
@@ -2214,7 +2220,7 @@ const $t = St("Tv", [
|
|
|
2214
2220
|
/* @__PURE__ */ y(m, { sx: { display: "grid", gridTemplateColumns: ge, gap: n(12) }, children: [
|
|
2215
2221
|
/* @__PURE__ */ y(se, { children: [
|
|
2216
2222
|
/* @__PURE__ */ r(q, { children: l("scoringTitle") }),
|
|
2217
|
-
|
|
2223
|
+
k.map((p) => /* @__PURE__ */ y(
|
|
2218
2224
|
m,
|
|
2219
2225
|
{
|
|
2220
2226
|
sx: {
|
|
@@ -2344,7 +2350,7 @@ const $t = St("Tv", [
|
|
|
2344
2350
|
)
|
|
2345
2351
|
] })
|
|
2346
2352
|
] }),
|
|
2347
|
-
|
|
2353
|
+
R.length ? /* @__PURE__ */ r(
|
|
2348
2354
|
m,
|
|
2349
2355
|
{
|
|
2350
2356
|
sx: {
|
|
@@ -2352,28 +2358,28 @@ const $t = St("Tv", [
|
|
|
2352
2358
|
gridTemplateColumns: "repeat(12, minmax(0, 1fr))",
|
|
2353
2359
|
gap: n(12)
|
|
2354
2360
|
},
|
|
2355
|
-
children:
|
|
2356
|
-
const
|
|
2361
|
+
children: R.map((p, I) => {
|
|
2362
|
+
const v = fe(u.teamCTA, "team", p.teamId);
|
|
2357
2363
|
return /* @__PURE__ */ y(
|
|
2358
2364
|
Z,
|
|
2359
2365
|
{
|
|
2360
|
-
component:
|
|
2361
|
-
href: (
|
|
2362
|
-
target:
|
|
2363
|
-
onClick:
|
|
2366
|
+
component: v != null && v.href ? "a" : "div",
|
|
2367
|
+
href: (v == null ? void 0 : v.href) ?? void 0,
|
|
2368
|
+
target: v == null ? void 0 : v.target,
|
|
2369
|
+
onClick: v == null ? void 0 : v.onClick,
|
|
2364
2370
|
sx: {
|
|
2365
2371
|
padding: `${n(12)} ${n(14)}`,
|
|
2366
2372
|
display: "flex",
|
|
2367
2373
|
alignItems: "center",
|
|
2368
2374
|
gap: n(10),
|
|
2369
|
-
cursor:
|
|
2370
|
-
gridColumn: `span ${
|
|
2375
|
+
cursor: _ ? "pointer" : "default",
|
|
2376
|
+
gridColumn: `span ${bo(I, R.length, o, s)}`,
|
|
2371
2377
|
textDecoration: "none",
|
|
2372
2378
|
color: "inherit",
|
|
2373
|
-
"&:hover": { backgroundColor:
|
|
2379
|
+
"&:hover": { backgroundColor: _ ? e.onSurface : e.surface }
|
|
2374
2380
|
},
|
|
2375
2381
|
children: [
|
|
2376
|
-
/* @__PURE__ */ r(
|
|
2382
|
+
/* @__PURE__ */ r(H, { url: a.logo(p.teamId), size: 36 }),
|
|
2377
2383
|
/* @__PURE__ */ y(m, { sx: { minWidth: 0, flex: 1 }, children: [
|
|
2378
2384
|
/* @__PURE__ */ r(q, { size: 10, sx: { display: "block" }, children: p.label }),
|
|
2379
2385
|
/* @__PURE__ */ r(w, { component: "div", size: 13, weight: 700, color: e.text, ellipsis: !0, cms: !0, children: a.name(p.teamId) })
|
|
@@ -2389,15 +2395,15 @@ const $t = St("Tv", [
|
|
|
2389
2395
|
})
|
|
2390
2396
|
}
|
|
2391
2397
|
) : null,
|
|
2392
|
-
|
|
2393
|
-
const
|
|
2398
|
+
z.length ? /* @__PURE__ */ r(m, { sx: { display: "grid", gridTemplateColumns: ge, gap: n(12) }, children: z.map(({ label: p, match: I }) => {
|
|
2399
|
+
const v = fe(u.matchCTA, "match", I.id), [P, K] = I.fullTime ?? [0, 0];
|
|
2394
2400
|
return /* @__PURE__ */ y(
|
|
2395
2401
|
Z,
|
|
2396
2402
|
{
|
|
2397
|
-
component:
|
|
2398
|
-
href: (
|
|
2399
|
-
target:
|
|
2400
|
-
onClick:
|
|
2403
|
+
component: v != null && v.href ? "a" : "div",
|
|
2404
|
+
href: (v == null ? void 0 : v.href) ?? void 0,
|
|
2405
|
+
target: v == null ? void 0 : v.target,
|
|
2406
|
+
onClick: v == null ? void 0 : v.onClick,
|
|
2401
2407
|
sx: {
|
|
2402
2408
|
padding: `${n(12)} ${n(16)}`,
|
|
2403
2409
|
display: "flex",
|
|
@@ -2413,7 +2419,7 @@ const $t = St("Tv", [
|
|
|
2413
2419
|
/* @__PURE__ */ r("span", { children: p }),
|
|
2414
2420
|
/* @__PURE__ */ r("span", { children: l("recordRound", {
|
|
2415
2421
|
round: I.round,
|
|
2416
|
-
date:
|
|
2422
|
+
date: d.date(I.start, { day: "2-digit", month: "2-digit" })
|
|
2417
2423
|
}) })
|
|
2418
2424
|
] }),
|
|
2419
2425
|
/* @__PURE__ */ y(
|
|
@@ -2428,7 +2434,7 @@ const $t = St("Tv", [
|
|
|
2428
2434
|
children: [
|
|
2429
2435
|
/* @__PURE__ */ y(m, { sx: { display: "flex", alignItems: "center", justifyContent: "flex-end", gap: n(8), minWidth: 0 }, children: [
|
|
2430
2436
|
/* @__PURE__ */ r(w, { size: 13, weight: 600, color: e.text, ellipsis: !0, cms: !0, children: a.name(I.home.id) }),
|
|
2431
|
-
/* @__PURE__ */ r(
|
|
2437
|
+
/* @__PURE__ */ r(H, { url: a.logo(I.home.id), size: 28 })
|
|
2432
2438
|
] }),
|
|
2433
2439
|
/* @__PURE__ */ r(
|
|
2434
2440
|
w,
|
|
@@ -2442,11 +2448,11 @@ const $t = St("Tv", [
|
|
|
2442
2448
|
borderRadius: t.sm,
|
|
2443
2449
|
padding: `${n(4, 18)} ${n(10, 18)}`
|
|
2444
2450
|
},
|
|
2445
|
-
children: `${
|
|
2451
|
+
children: `${P} : ${K}`
|
|
2446
2452
|
}
|
|
2447
2453
|
),
|
|
2448
2454
|
/* @__PURE__ */ y(m, { sx: { display: "flex", alignItems: "center", gap: n(8), minWidth: 0 }, children: [
|
|
2449
|
-
/* @__PURE__ */ r(
|
|
2455
|
+
/* @__PURE__ */ r(H, { url: a.logo(I.away.id), size: 28 }),
|
|
2450
2456
|
/* @__PURE__ */ r(w, { size: 13, weight: 600, color: e.text, ellipsis: !0, cms: !0, children: a.name(I.away.id) })
|
|
2451
2457
|
] })
|
|
2452
2458
|
]
|
|
@@ -2458,30 +2464,30 @@ const $t = St("Tv", [
|
|
|
2458
2464
|
);
|
|
2459
2465
|
}) }) : null
|
|
2460
2466
|
] });
|
|
2461
|
-
},
|
|
2467
|
+
}, Co = ["header", "matches", "players", "season"], So = 3e4, vo = (e) => {
|
|
2462
2468
|
const {
|
|
2463
2469
|
entityId: t,
|
|
2464
2470
|
sdk: o,
|
|
2465
2471
|
language: s,
|
|
2466
2472
|
seasonId: i,
|
|
2467
2473
|
stageId: a,
|
|
2468
|
-
sections:
|
|
2474
|
+
sections: c = Co,
|
|
2469
2475
|
liveRefresh: l = !0,
|
|
2470
|
-
refreshInterval:
|
|
2476
|
+
refreshInterval: d = So,
|
|
2471
2477
|
labels: u
|
|
2472
|
-
} = e, { colors: h, fonts: f } =
|
|
2478
|
+
} = e, { colors: h, fonts: f } = F(), C = to(u), b = L.useMemo(() => Zt(s), [s]), { data: g, competitionId: $, entities: S, loading: W, error: k } = Kt(
|
|
2473
2479
|
o,
|
|
2474
2480
|
t,
|
|
2475
2481
|
s,
|
|
2476
2482
|
"–",
|
|
2477
|
-
{ seasonId: i, stageId: a, liveRefresh: l, refreshInterval:
|
|
2478
|
-
),
|
|
2483
|
+
{ seasonId: i, stageId: a, liveRefresh: l, refreshInterval: d }
|
|
2484
|
+
), M = L.useMemo(() => g ? g.matches.filter(we) : [], [g]), O = L.useMemo(() => Vt(M), [M]), _ = Array.from(new Set(c)), R = (A) => /* @__PURE__ */ r(Z, { sx: { padding: n(24) }, children: /* @__PURE__ */ r(w, { component: "div", size: 14, font: "secondary", color: h.dim, sx: { textAlign: "center" }, children: A }) });
|
|
2479
2485
|
let E;
|
|
2480
|
-
return
|
|
2481
|
-
|
|
2486
|
+
return W ? E = /* @__PURE__ */ r(ut, { my: 10 }) : k ? E = R(C("loadFailed")) : !g || g.matches.length === 0 ? E = R(C("noData")) : E = /* @__PURE__ */ r(
|
|
2487
|
+
oo,
|
|
2482
2488
|
{
|
|
2483
|
-
value: { sdk: o, data: g, competitionId:
|
|
2484
|
-
children:
|
|
2489
|
+
value: { sdk: o, data: g, competitionId: $, entities: S, finished: M, tally: O, label: C, fmt: b, props: e },
|
|
2490
|
+
children: _.map((A) => A === "header" ? /* @__PURE__ */ r(no, {}, A) : A === "matches" ? /* @__PURE__ */ r(yo, {}, A) : A === "players" ? g.athletes.length ? /* @__PURE__ */ r(ao, {}, A) : null : A === "season" ? /* @__PURE__ */ r(wo, {}, A) : null)
|
|
2485
2491
|
}
|
|
2486
2492
|
), /* @__PURE__ */ r(
|
|
2487
2493
|
m,
|
|
@@ -2498,22 +2504,22 @@ const $t = St("Tv", [
|
|
|
2498
2504
|
children: E
|
|
2499
2505
|
}
|
|
2500
2506
|
);
|
|
2501
|
-
},
|
|
2502
|
-
const [t, o] =
|
|
2507
|
+
}, Io = (e) => {
|
|
2508
|
+
const [t, o] = L.useState(!1), [s, i] = L.useState(!1), a = pt(e.language), c = L.useRef(
|
|
2503
2509
|
`competition-statistics-shadow-root-${Math.random().toString(36).substring(2, 11)}`
|
|
2504
|
-
), l =
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
}, [e.language]),
|
|
2510
|
+
), l = L.useRef(null), d = L.useRef(null), u = L.useRef(null), [h, f] = L.useState(null);
|
|
2511
|
+
L.useEffect(() => {
|
|
2512
|
+
mt(e.language || "en").finally(() => i(!0));
|
|
2513
|
+
}, [e.language]), L.useEffect(() => {
|
|
2508
2514
|
if (!l.current) return;
|
|
2509
|
-
l.current.shadowRoot ? (
|
|
2510
|
-
|
|
2511
|
-
), u.current || (u.current = document.createElement("div"), u.current.id =
|
|
2512
|
-
const
|
|
2515
|
+
l.current.shadowRoot ? (d.current = l.current.shadowRoot, u.current = d.current.getElementById(
|
|
2516
|
+
c.current
|
|
2517
|
+
), u.current || (u.current = document.createElement("div"), u.current.id = c.current, u.current.style.height = "100%", d.current.appendChild(u.current))) : (d.current = l.current.attachShadow({ mode: "open" }), u.current = document.createElement("div"), u.current.id = c.current, u.current.style.height = "100%", d.current.appendChild(u.current)), ht(u.current, a);
|
|
2518
|
+
const $ = gt("competition-statistics", a);
|
|
2513
2519
|
return f(
|
|
2514
|
-
(
|
|
2520
|
+
(S) => (S == null ? void 0 : S.key) === $ ? S : ft(
|
|
2515
2521
|
"competition-statistics",
|
|
2516
|
-
|
|
2522
|
+
d.current,
|
|
2517
2523
|
a
|
|
2518
2524
|
)
|
|
2519
2525
|
), o(!0), () => {
|
|
@@ -2527,25 +2533,26 @@ const $t = St("Tv", [
|
|
|
2527
2533
|
lang: e.language || "en",
|
|
2528
2534
|
sx: { height: "100%", display: "block" }
|
|
2529
2535
|
}
|
|
2530
|
-
), g = t && s && u.current && h ?
|
|
2536
|
+
), g = t && s && u.current && h ? $t(
|
|
2531
2537
|
// Keyed on the cache, not on `direction`: it must change in the same render that adopts
|
|
2532
2538
|
// the new cache, or CssVarsProvider writes its CSS variables into the outgoing cache and
|
|
2533
2539
|
// never repeats.
|
|
2534
|
-
/* @__PURE__ */ r(
|
|
2535
|
-
|
|
2540
|
+
/* @__PURE__ */ r(It, { value: h, children: /* @__PURE__ */ r(yt, { containerRef: l, children: /* @__PURE__ */ r(
|
|
2541
|
+
xt,
|
|
2536
2542
|
{
|
|
2537
2543
|
customTheme: C,
|
|
2538
2544
|
mode: C == null ? void 0 : C.mode,
|
|
2539
2545
|
shadowRootElement: u.current,
|
|
2540
2546
|
direction: a,
|
|
2541
2547
|
children: /* @__PURE__ */ y(
|
|
2542
|
-
|
|
2548
|
+
bt,
|
|
2543
2549
|
{
|
|
2544
2550
|
shadowRootElement: u.current,
|
|
2545
2551
|
leadPhoneCountryCode: null,
|
|
2546
2552
|
language: e.language,
|
|
2547
2553
|
optionsLayout: null,
|
|
2548
2554
|
direction: a,
|
|
2555
|
+
disableCache: e.disableCache ?? !1,
|
|
2549
2556
|
children: [
|
|
2550
2557
|
/* @__PURE__ */ r(
|
|
2551
2558
|
tt,
|
|
@@ -2570,7 +2577,7 @@ const $t = St("Tv", [
|
|
|
2570
2577
|
b,
|
|
2571
2578
|
g
|
|
2572
2579
|
] });
|
|
2573
|
-
},
|
|
2580
|
+
}, $o = (e) => /* @__PURE__ */ r(Io, { ...e, children: /* @__PURE__ */ r(vo, { ...e }) }), Wo = Tt($o);
|
|
2574
2581
|
export {
|
|
2575
|
-
|
|
2582
|
+
Wo as CompetitionStatistics
|
|
2576
2583
|
};
|