fansunited-frontend-components 0.0.91 → 0.0.93
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 +1 -1
- package/ChanceGame.js +139 -146
- package/ClassicQuizPlay.js +1 -1
- package/CollectLead.js +14 -20
- package/CompetitionStatistics.js +27 -27
- package/CompetitorCard.js +895 -891
- package/Discussion.js +1 -1
- package/EitherOrPlay.js +1 -1
- package/EventCard.js +1496 -1572
- package/EventGamePlay.js +1 -1
- package/Leaderboard.js +249 -257
- package/List.js +319 -436
- package/MatchQuizPlay.js +1 -1
- package/Odds.js +30 -30
- package/PersonalityQuizPlay.js +1 -1
- package/PickThePair.js +627 -693
- package/PlayerOfTheMatch.js +256 -279
- package/PollVote.js +1 -1
- package/Predictor.js +19443 -2
- package/README.md +59 -2
- package/Standings.js +94 -99
- package/TopX.js +5871 -6987
- package/chunks/ChanceGameEmbedVariant-C3NGwvTF.js +21 -0
- package/chunks/OddsSkeleton-Bav8FHHN.js +26 -0
- package/chunks/{OddsStrip-c9Y8VgmW.js → OddsStrip-CviVfQI4.js} +51 -53
- package/chunks/{PickOneOfX-DbBYeZnU.js → PickOneOfX-a6Dv0-rR.js} +210 -212
- package/chunks/index-0ezhEUTz.js +4 -0
- package/chunks/index-B1d9q8fX.js +4 -0
- package/chunks/index-BP0pvFJ4.js +4 -0
- package/chunks/index-CSrBHonD.js +4 -0
- package/chunks/index-Ckyyw-I8.js +4 -0
- package/chunks/index-DAu5SkP8.js +4 -0
- package/chunks/index-yjMVOgwO.js +4 -0
- package/chunks/{main-BgDvdmc8.js → main-CFwRpvUi.js} +219 -238
- package/chunks/{main-bAzdlcP_.js → main-D9tFZv2q.js} +272 -308
- package/chunks/{main-BV-r09In.js → main-DPWm9Ema.js} +419 -434
- package/chunks/{main-DSQ1vaFe.js → main-Dj4Manb5.js} +386 -406
- package/chunks/{main-DcPlB4Wk.js → main-Dmc68oMQ.js} +730 -1093
- package/chunks/{main-D_Rq1xVm.js → main-DsAnwwP4.js} +1677 -2002
- package/chunks/{main-CA5G2ZQX.js → main-dwV_55lz.js} +409 -432
- package/chunks/main-eAQMCxQ7.js +1949 -0
- package/index.js +40 -44
- package/package.json +13 -5
- package/chunks/AccessTime-BVP1qnmC.js +0 -10
- package/chunks/AlertMessage-aNev3ob9.js +0 -318
- package/chunks/Avatar-Ck9sDlUF.js +0 -353
- package/chunks/Button-C5sVDXUr.js +0 -665
- package/chunks/Card-DMO0MtFg.js +0 -196
- package/chunks/CardActions-CniskUBs.js +0 -140
- package/chunks/CardContent-DSmkIh5e.js +0 -106
- package/chunks/ChanceGameEmbedVariant-C9U7q27r.js +0 -913
- package/chunks/CheckCircle-BLQUgEFO.js +0 -8
- package/chunks/Chip-CbmpDsTx.js +0 -365
- package/chunks/CircularProgress-BCucLg2A.js +0 -317
- package/chunks/Close-BJaeWPmO.js +0 -9
- package/chunks/Close-Bn_Gk4s2.js +0 -8
- package/chunks/CollectLeadForm-e59gRdao.js +0 -3419
- package/chunks/ConsentsList-ByAN0_kp.js +0 -339
- package/chunks/DirectionScope-Ty03Pl0K.js +0 -36
- package/chunks/Divider-D-SATYZX.js +0 -166
- package/chunks/Edit-uzcXQ0W4.js +0 -99
- package/chunks/EmojiEvents-DzZMpyj0.js +0 -8
- package/chunks/FavoriteBorder-Dz8YRmah.js +0 -11
- package/chunks/FormControl-CApGuvy1.js +0 -656
- package/chunks/FormControlContext-Ct0huDDM.js +0 -6
- package/chunks/FormLabel-BhUVGv0u.js +0 -130
- package/chunks/GlobalStyles-BiXuRSRs.js +0 -12
- package/chunks/InlineSpinner-BIQuuKyA.js +0 -28
- package/chunks/Input-C1c9bTgf.js +0 -391
- package/chunks/KeyboardArrowDown-BBL6SAyg.js +0 -11
- package/chunks/KeyboardArrowRight-DQMFvDqL.js +0 -11
- package/chunks/Link-IhyfKeZX.js +0 -319
- package/chunks/ListItemButton-C6H1ykg-.js +0 -1151
- package/chunks/ModalClose-COLCM3hQ.js +0 -153
- package/chunks/ModalDialog-19Yt0pTv.js +0 -880
- package/chunks/NotFoundSkeleton-B7aXpJX0.js +0 -83
- package/chunks/Notification-DPPIzFpw.js +0 -614
- package/chunks/OddsSkeleton-BdKCmc4R.js +0 -137
- package/chunks/OverlayScoreStateSkeleton-CGiMhlGz.js +0 -154
- package/chunks/OverlayScoreStateWrapperSkeleton-mzBPgf_P.js +0 -81
- package/chunks/OverlaySignInSkeleton-DnxRxCfU.js +0 -518
- package/chunks/OverlaySkeleton-bXtFE1Y6.js +0 -1193
- package/chunks/Person-CuxlprBB.js +0 -8
- package/chunks/PersonOutline-BViWQgNV.js +0 -8
- package/chunks/Popper-B-W5OzQt.js +0 -1263
- package/chunks/Portal-C1ku1V2Y.js +0 -74
- package/chunks/Portal-C49jCyHC.js +0 -66
- package/chunks/Predictor-DGjo_dOB.js +0 -19512
- package/chunks/PrizeCard-BIJVHmYW.js +0 -36064
- package/chunks/Search-RBBj-3Z1.js +0 -14
- package/chunks/Select-Be-2TLJx.js +0 -1165
- package/chunks/Sheet-DHMJRANx.js +0 -132
- package/chunks/SignInCta-Bz6nl2c-.js +0 -79
- package/chunks/Spinner-DQytYdCL.js +0 -39
- package/chunks/SportsSoccer-Dwp9CkcQ.js +0 -20
- package/chunks/Stack-Dx-77BoB.js +0 -169
- package/chunks/StandardContentSkeleton-DV_CkaNl.js +0 -57
- package/chunks/Table-D3ou_zxz.js +0 -394
- package/chunks/Tabs-D32XKc8G.js +0 -1084
- package/chunks/Textarea-HrQcjIXY.js +0 -475
- package/chunks/TimerOutlined-mHIHDBDv.js +0 -8
- package/chunks/Tooltip-iozKqko2.js +0 -535
- package/chunks/Typography-CHHyHOvn.js +0 -775
- package/chunks/areArraysEqual-B3mXtHvh.js +0 -6
- package/chunks/colorInversionUtils-CJrDu9ZF.js +0 -347
- package/chunks/createSvgIcon-D7NSIoD-.js +0 -2813
- package/chunks/createSvgIcon-DVhK14Wp.js +0 -206
- package/chunks/dividerClasses-CpWiK9X3.js +0 -9
- package/chunks/elementAcceptingRef-B8Ay5UA0.js +0 -25
- package/chunks/enums-B1lTCQvC.js +0 -15
- package/chunks/formLabelClasses-Bb77PWNt.js +0 -9
- package/chunks/getReactElementRef-B3MFPBbS.js +0 -21
- package/chunks/helpers-BjZ558HQ.js +0 -558
- package/chunks/index-BKdbemPX.js +0 -4
- package/chunks/index-BL8osWuT.js +0 -4
- package/chunks/index-BXktLXqU.js +0 -4
- package/chunks/index-BoKBAjSl.js +0 -4
- package/chunks/index-DhEpZQT8.js +0 -4
- package/chunks/index-DzjRMnaE.js +0 -11
- package/chunks/index-WsrzdqEQ.js +0 -4
- package/chunks/index-ibZpQ0KD.js +0 -4
- package/chunks/index-qjOOEhVr.js +0 -1040
- package/chunks/main-Ig2neK0P.js +0 -2759
- package/chunks/ownerWindow-PI509BpA.js +0 -7
- package/chunks/searchEntities-SJcoznz0.js +0 -38
- package/chunks/sportsEvents-CGX-WkNB.js +0 -27
- package/chunks/useButton-BdGcfaoz.js +0 -106
- package/chunks/useConsents-6ZATswQ4.js +0 -1168
- package/chunks/useControlled-BYdyS7Pn.js +0 -31
- package/chunks/useEmbedCode-DCWnWGak.js +0 -31
- package/chunks/useEventCallback-D-FE-RIP.js +0 -14
- package/chunks/useForwardedInput-DFaOgtZp.js +0 -180
- package/chunks/useImageVariant-B_dj28Qx.js +0 -15
- package/chunks/useInfoPage-BHdgKdme.js +0 -50
- package/chunks/useParticipationDraft-BO1gUTVy.js +0 -307
- package/chunks/useSwitch-DeOFp4Ck.js +0 -66
- package/chunks/variantColorInheritance-DZr7CNx6.js +0 -30
- package/chunks/visuallyHidden-B8J7BVSJ.js +0 -14
package/ClassicQuizPlay.js
CHANGED
package/CollectLead.js
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import { jsx as n, jsxs as s, Fragment as r } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import "react-
|
|
5
|
-
import {
|
|
6
|
-
import { W as w } from "./chunks/enums-B1lTCQvC.js";
|
|
7
|
-
import { d as le, a as ae } from "./chunks/index-DzjRMnaE.js";
|
|
8
|
-
import { g as fe, s as ye, h as re } from "./chunks/helpers-BjZ558HQ.js";
|
|
9
|
-
import { T as y } from "./chunks/Typography-CHHyHOvn.js";
|
|
10
|
-
import { C as ue } from "./chunks/CollectLeadForm-e59gRdao.js";
|
|
11
|
-
import { u as ee } from "./chunks/useImageVariant-B_dj28Qx.js";
|
|
2
|
+
import { useFontFamily as Y, isMobile as Q, getBrandingClickUrl as de, useConstantContext as J, CollectLeadForm as me, useInternalTheme as K, useSpacingScale as X, useImageBackgroundGradient as Z, WidgetTemplate as w, defaultBgVertical as le, defaultBg as ae, useImageVariant as ee, sanitizeBackgroundUrl as se, useCornerRadius as q, useColors as u, useBorderSize as ge, usePhysicalImagePosition as xe, hexToRgb as re, Portal as fe } from "fansunited-frontend-core";
|
|
3
|
+
import { Box as o, Typography as y } from "@mui/joy";
|
|
4
|
+
import { useTranslation as ye } from "react-i18next";
|
|
5
|
+
import { createContext as ue } from "react";
|
|
12
6
|
const te = (e) => {
|
|
13
|
-
const i = Y().secondary, m = Q(), a =
|
|
7
|
+
const i = Y().secondary, m = Q(), a = de(e.primaryUrl, e.secondaryUrl, "logo");
|
|
14
8
|
if (!e.brandingLogo)
|
|
15
9
|
return null;
|
|
16
10
|
const d = () => {
|
|
@@ -114,7 +108,7 @@ const te = (e) => {
|
|
|
114
108
|
]
|
|
115
109
|
}
|
|
116
110
|
);
|
|
117
|
-
}, _ =
|
|
111
|
+
}, _ = ue({
|
|
118
112
|
shadowRootElement: null,
|
|
119
113
|
language: null,
|
|
120
114
|
sdk: null
|
|
@@ -158,7 +152,7 @@ const te = (e) => {
|
|
|
158
152
|
children: p
|
|
159
153
|
}
|
|
160
154
|
), ne = () => {
|
|
161
|
-
const { t: e } =
|
|
155
|
+
const { t: e } = ye(), {
|
|
162
156
|
sdk: i,
|
|
163
157
|
content: m,
|
|
164
158
|
branding: a,
|
|
@@ -192,7 +186,7 @@ const te = (e) => {
|
|
|
192
186
|
termsAndConditionsUrlLabel: t == null ? void 0 : t.termsAndConditionsUrlLabel
|
|
193
187
|
};
|
|
194
188
|
return /* @__PURE__ */ n(
|
|
195
|
-
|
|
189
|
+
me,
|
|
196
190
|
{
|
|
197
191
|
sdk: i,
|
|
198
192
|
content: m,
|
|
@@ -404,7 +398,7 @@ const te = (e) => {
|
|
|
404
398
|
imagePlaceholder: f
|
|
405
399
|
},
|
|
406
400
|
w.OVERLAY
|
|
407
|
-
), S =
|
|
401
|
+
), S = se(b), p = i.colorSchemes.dark.textColor, T = i.customFontFamily.dark.primary, k = i.customFontFamily.dark.secondary, j = i.customRadius.dark.md, N = (l = i.border) == null ? void 0 : l.dark.size, F = (M = (U = i.colorSchemes) == null ? void 0 : U.dark) == null ? void 0 : M.surfaceVariant, P = (L = (I = i.customRadius) == null ? void 0 : I.light) == null ? void 0 : L.xl, V = (v = (H = (z = (D = i.colorSchemes) == null ? void 0 : D.light) == null ? void 0 : z.palette) == null ? void 0 : H.primary) == null ? void 0 : v.plainColor, $ = (x = (C = (W = (B = i.colorSchemes) == null ? void 0 : B.light) == null ? void 0 : W.palette) == null ? void 0 : C.primary) == null ? void 0 : x.onPrimary, c = be({
|
|
408
402
|
spacingScale: m,
|
|
409
403
|
secondaryColor: p,
|
|
410
404
|
fontFamilyPrimary: T,
|
|
@@ -440,7 +434,7 @@ const te = (e) => {
|
|
|
440
434
|
] })
|
|
441
435
|
] });
|
|
442
436
|
}, ce = ({ children: e }) => {
|
|
443
|
-
const i = q().md, m = u().surface, a = u().secondaryContainer, t =
|
|
437
|
+
const i = q().md, m = u().surface, a = u().secondaryContainer, t = ge().size + " solid " + a;
|
|
444
438
|
return /* @__PURE__ */ n(
|
|
445
439
|
o,
|
|
446
440
|
{
|
|
@@ -777,7 +771,7 @@ const te = (e) => {
|
|
|
777
771
|
w.STANDARD
|
|
778
772
|
), t = Q(), f = t ? ((L = (I = i.branding) == null ? void 0 : I.images) == null ? void 0 : L.mobileLogo) || ((z = (D = i.branding) == null ? void 0 : D.images) == null ? void 0 : z.mainLogo) || "" : ((v = (H = i.branding) == null ? void 0 : H.images) == null ? void 0 : v.mainLogo) || "", b = u().textColor, S = u().textSecondary, p = Y().secondary, T = "60%", k = Y().primary, j = u().surfaceVariant, N = q().md, F = q().sm, P = u().palette.primary.plainColor, V = u().palette.primary.onPrimary, $ = q().xl, c = X(), g = Z(
|
|
779
773
|
w.STANDARD
|
|
780
|
-
), R =
|
|
774
|
+
), R = xe(a), l = pe({
|
|
781
775
|
finalImage: d,
|
|
782
776
|
spacingScale: c,
|
|
783
777
|
borderRadius: q(),
|
|
@@ -1227,7 +1221,7 @@ function Pe(e) {
|
|
|
1227
1221
|
const Re = (e) => e.template === w.OVERLAY ? /* @__PURE__ */ n(Se, {}) : Pe(e) ? /* @__PURE__ */ n(Te, { imagePosition: e.imagePosition || "left" }) : /* @__PURE__ */ n(Fe, {}), Ie = (e) => {
|
|
1228
1222
|
var i;
|
|
1229
1223
|
return /* @__PURE__ */ n(
|
|
1230
|
-
|
|
1224
|
+
fe,
|
|
1231
1225
|
{
|
|
1232
1226
|
packageName: "collect-lead",
|
|
1233
1227
|
entityId: ((i = e.content) == null ? void 0 : i.id) || "",
|
|
@@ -1255,7 +1249,7 @@ const Re = (e) => e.template === w.OVERLAY ? /* @__PURE__ */ n(Se, {}) : Pe(e) ?
|
|
|
1255
1249
|
)
|
|
1256
1250
|
}
|
|
1257
1251
|
);
|
|
1258
|
-
},
|
|
1252
|
+
}, Be = Ie;
|
|
1259
1253
|
export {
|
|
1260
|
-
|
|
1254
|
+
Be as CollectLead
|
|
1261
1255
|
};
|
package/CompetitionStatistics.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as r, jsxs as y, Fragment as ye } from "react/jsx-runtime";
|
|
2
2
|
import A, { useState as ee, useEffect as pe, useMemo as le } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
3
|
+
import { Box as m, GlobalStyles as tt } from "@mui/joy";
|
|
4
|
+
import { fetchSearchEntitiesByIds as ot, useColors as nt, useFontFamily as rt, useCornerRadius as st, useCurrentThemeMode as it, hexToRgb as at, toIntlLocale as lt, isMobile as xe, isExtraSmall as dt, Spinner as ct, getLanguageDirection as ut, initializeI18n as pt, applyDirectionToMount as mt, widgetCacheKey as ht, createWidgetCache as gt, ContainerProvider as ft, ThemeProvider as yt, ConstantsProvider as xt } from "fansunited-frontend-core";
|
|
5
|
+
import { useTranslation as bt } from "react-i18next";
|
|
6
|
+
import { O as wt, u as Ct } from "./chunks/OddsStrip-CviVfQI4.js";
|
|
7
|
+
import "fansunited-sdk-esm";
|
|
8
|
+
import { c as St } from "./chunks/createLucideIcon-YBRjY5Kl.js";
|
|
9
|
+
import { CacheProvider as vt } from "@emotion/react";
|
|
10
|
+
import { createPortal as It } from "react-dom";
|
|
11
11
|
/**
|
|
12
12
|
* @license lucide-react v0.454.0 - ISC
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
16
|
*/
|
|
17
|
-
const $t =
|
|
17
|
+
const $t = St("Tv", [
|
|
18
18
|
["rect", { width: "20", height: "15", x: "2", y: "7", rx: "2", ry: "2", key: "10ag99" }],
|
|
19
19
|
["polyline", { points: "17 2 12 7 7 2", key: "11pgbg" }]
|
|
20
20
|
]), Oe = "https://sports.fansunitedapi.com/v1", Fe = (e) => {
|
|
@@ -56,7 +56,7 @@ const $t = vt("Tv", [
|
|
|
56
56
|
}
|
|
57
57
|
}, _t = async (e, t, o) => {
|
|
58
58
|
const s = /* @__PURE__ */ new Map(), i = Fe(e);
|
|
59
|
-
return !i || t.length === 0 || (await
|
|
59
|
+
return !i || t.length === 0 || (await ot(i, t, {
|
|
60
60
|
signal: o,
|
|
61
61
|
partial: !0
|
|
62
62
|
})).forEach((d) => s.set(d.id, d)), s;
|
|
@@ -342,7 +342,7 @@ const $t = vt("Tv", [
|
|
|
342
342
|
);
|
|
343
343
|
return { data: M, competitionId: (u == null ? void 0 : u.id) ?? t, entities: E, loading: T, error: P };
|
|
344
344
|
}, n = (e, t = 16) => `${Math.round(e / t * 1e4) / 1e4}em`, O = () => {
|
|
345
|
-
const e =
|
|
345
|
+
const e = nt(), t = rt(), o = st(), s = it() === "dark", i = (d, l) => `rgba(${at(d)}, ${l})`, a = e.palette.primary.plainColor;
|
|
346
346
|
return {
|
|
347
347
|
fonts: t,
|
|
348
348
|
radius: o,
|
|
@@ -425,7 +425,7 @@ const $t = vt("Tv", [
|
|
|
425
425
|
return { ...i, rank: c ? `${l}=` : `${l}` };
|
|
426
426
|
});
|
|
427
427
|
}, V = (e, t, o = 1) => [...e].sort((s, i) => o * (t(i) - t(s)))[0], qt = (e) => Array.from(e.values()), Jt = (e) => {
|
|
428
|
-
const t =
|
|
428
|
+
const t = lt(e), o = /* @__PURE__ */ new Map();
|
|
429
429
|
return {
|
|
430
430
|
date: (s, i) => {
|
|
431
431
|
const a = new Date(s);
|
|
@@ -447,7 +447,7 @@ const $t = vt("Tv", [
|
|
|
447
447
|
/\{\{\s*(\w+)\s*\}\}/g,
|
|
448
448
|
(o, s) => s in t ? String(t[s]) : o
|
|
449
449
|
) : e, Zt = (e) => {
|
|
450
|
-
const { t } =
|
|
450
|
+
const { t } = bt("common");
|
|
451
451
|
return le(
|
|
452
452
|
() => (o, s) => {
|
|
453
453
|
const i = e == null ? void 0 : e[o];
|
|
@@ -1462,7 +1462,7 @@ const $t = vt("Tv", [
|
|
|
1462
1462
|
}, mo = ({ match: e, odds: t, open: o, onToggle: s }) => {
|
|
1463
1463
|
var H, U, p, I, S;
|
|
1464
1464
|
const { colors: i, radius: a } = O(), { entities: d, label: l, fmt: c, props: u } = Y(), h = (H = u.callbacks) == null ? void 0 : H.onBroadcastClick, f = e.status === "FINISHED", C = e.status === "LIVE", [b, g] = e.fullTime ?? [0, 0], T = f && b > g, v = f && g > b, P = f && b === g, _ = e.status === "CANCELLED", z = !_, D = !f && !_, R = C ? e.liveMinute !== null ? l("liveMinute", { minute: e.liveMinute }) : e.isHalfTime ? l("halfTimeShort") : l("live") : c.time(e.start), M = xe(), E = (u.showOdds ?? !1) && !M && (e.status === "UPCOMING" || C), $ = t ? /* @__PURE__ */ r(
|
|
1465
|
-
|
|
1465
|
+
wt,
|
|
1466
1466
|
{
|
|
1467
1467
|
odds: t,
|
|
1468
1468
|
market: ((U = u.odds) == null ? void 0 : U.market) ?? "FT_1X2",
|
|
@@ -1736,7 +1736,7 @@ const $t = vt("Tv", [
|
|
|
1736
1736
|
).sort((x, L) => x - L), W = R ? S : [...S].reverse(), K = R ? T : P, ne = K !== null && S.includes(K) ? K : R ? S[0] : S[S.length - 1], X = i.matches.filter((x) => x.round === ne && I(x)).sort(Pe), re = X.filter(M), Ve = A.useMemo(
|
|
1737
1737
|
() => re.filter((x) => x.status === "UPCOMING" || x.status === "LIVE").map((x) => x.id),
|
|
1738
1738
|
[re]
|
|
1739
|
-
), { odds: Ye } =
|
|
1739
|
+
), { odds: Ye } = Ct(s, Ve, {
|
|
1740
1740
|
enabled: c.showOdds ?? !1,
|
|
1741
1741
|
markets: [((Ie = c.odds) == null ? void 0 : Ie.market) ?? "FT_1X2"],
|
|
1742
1742
|
sport: i.sport,
|
|
@@ -2038,7 +2038,7 @@ const $t = vt("Tv", [
|
|
|
2038
2038
|
const i = Math.min(t, fo), a = e < i ? i : t - i;
|
|
2039
2039
|
return Math.floor(12 / a);
|
|
2040
2040
|
}, xo = () => {
|
|
2041
|
-
const { colors: e, radius: t } = O(), o = xe(), s =
|
|
2041
|
+
const { colors: e, radius: t } = O(), o = xe(), s = dt(), { data: i, entities: a, tally: d, label: l, fmt: c, props: u } = Y(), h = A.useMemo(() => Vt(i.matches), [i.matches]), f = h.played, C = (p) => l("ofMatches", { value: p, matches: l("matchesCount", { count: f }) }), b = (p) => c.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 }), T = [
|
|
2042
2042
|
{
|
|
2043
2043
|
label: l("matchesPlayed"),
|
|
2044
2044
|
value: f,
|
|
@@ -2477,7 +2477,7 @@ const $t = vt("Tv", [
|
|
|
2477
2477
|
{ seasonId: i, stageId: a, liveRefresh: l, refreshInterval: c }
|
|
2478
2478
|
), z = A.useMemo(() => g ? g.matches.filter(we) : [], [g]), D = A.useMemo(() => Ut(z), [z]), R = Array.from(new Set(d)), M = ($) => /* @__PURE__ */ r(Z, { sx: { padding: n(24) }, children: /* @__PURE__ */ r(w, { component: "div", size: 14, font: "secondary", color: h.dim, sx: { textAlign: "center" }, children: $ }) });
|
|
2479
2479
|
let E;
|
|
2480
|
-
return P ? E = /* @__PURE__ */ r(
|
|
2480
|
+
return P ? E = /* @__PURE__ */ r(ct, { my: 10 }) : _ ? E = M(C("loadFailed")) : !g || g.matches.length === 0 ? E = M(C("noData")) : E = /* @__PURE__ */ r(
|
|
2481
2481
|
eo,
|
|
2482
2482
|
{
|
|
2483
2483
|
value: { sdk: o, data: g, competitionId: T, entities: v, finished: z, tally: D, label: C, fmt: b, props: e },
|
|
@@ -2499,19 +2499,19 @@ const $t = vt("Tv", [
|
|
|
2499
2499
|
}
|
|
2500
2500
|
);
|
|
2501
2501
|
}, So = (e) => {
|
|
2502
|
-
const [t, o] = A.useState(!1), [s, i] = A.useState(!1), a =
|
|
2502
|
+
const [t, o] = A.useState(!1), [s, i] = A.useState(!1), a = ut(e.language), d = A.useRef(
|
|
2503
2503
|
`competition-statistics-shadow-root-${Math.random().toString(36).substring(2, 11)}`
|
|
2504
2504
|
), l = A.useRef(null), c = A.useRef(null), u = A.useRef(null), [h, f] = A.useState(null);
|
|
2505
2505
|
A.useEffect(() => {
|
|
2506
|
-
|
|
2506
|
+
pt(e.language || "en").finally(() => i(!0));
|
|
2507
2507
|
}, [e.language]), A.useEffect(() => {
|
|
2508
2508
|
if (!l.current) return;
|
|
2509
2509
|
l.current.shadowRoot ? (c.current = l.current.shadowRoot, u.current = c.current.getElementById(
|
|
2510
2510
|
d.current
|
|
2511
|
-
), u.current || (u.current = document.createElement("div"), u.current.id = d.current, u.current.style.height = "100%", c.current.appendChild(u.current))) : (c.current = l.current.attachShadow({ mode: "open" }), u.current = document.createElement("div"), u.current.id = d.current, u.current.style.height = "100%", c.current.appendChild(u.current)),
|
|
2512
|
-
const T =
|
|
2511
|
+
), u.current || (u.current = document.createElement("div"), u.current.id = d.current, u.current.style.height = "100%", c.current.appendChild(u.current))) : (c.current = l.current.attachShadow({ mode: "open" }), u.current = document.createElement("div"), u.current.id = d.current, u.current.style.height = "100%", c.current.appendChild(u.current)), mt(u.current, a);
|
|
2512
|
+
const T = ht("competition-statistics", a);
|
|
2513
2513
|
return f(
|
|
2514
|
-
(v) => (v == null ? void 0 : v.key) === T ? v :
|
|
2514
|
+
(v) => (v == null ? void 0 : v.key) === T ? v : gt(
|
|
2515
2515
|
"competition-statistics",
|
|
2516
2516
|
c.current,
|
|
2517
2517
|
a
|
|
@@ -2527,19 +2527,19 @@ const $t = vt("Tv", [
|
|
|
2527
2527
|
lang: e.language || "en",
|
|
2528
2528
|
sx: { height: "100%", display: "block" }
|
|
2529
2529
|
}
|
|
2530
|
-
), g = t && s && u.current && h ?
|
|
2530
|
+
), g = t && s && u.current && h ? It(
|
|
2531
2531
|
// Keyed on the cache, not on `direction`: it must change in the same render that adopts
|
|
2532
2532
|
// the new cache, or CssVarsProvider writes its CSS variables into the outgoing cache and
|
|
2533
2533
|
// never repeats.
|
|
2534
|
-
/* @__PURE__ */ r(
|
|
2535
|
-
|
|
2534
|
+
/* @__PURE__ */ r(vt, { value: h, children: /* @__PURE__ */ r(ft, { containerRef: l, children: /* @__PURE__ */ r(
|
|
2535
|
+
yt,
|
|
2536
2536
|
{
|
|
2537
2537
|
customTheme: C,
|
|
2538
2538
|
mode: C == null ? void 0 : C.mode,
|
|
2539
2539
|
shadowRootElement: u.current,
|
|
2540
2540
|
direction: a,
|
|
2541
2541
|
children: /* @__PURE__ */ y(
|
|
2542
|
-
|
|
2542
|
+
xt,
|
|
2543
2543
|
{
|
|
2544
2544
|
shadowRootElement: u.current,
|
|
2545
2545
|
leadPhoneCountryCode: null,
|
|
@@ -2548,7 +2548,7 @@ const $t = vt("Tv", [
|
|
|
2548
2548
|
direction: a,
|
|
2549
2549
|
children: [
|
|
2550
2550
|
/* @__PURE__ */ r(
|
|
2551
|
-
|
|
2551
|
+
tt,
|
|
2552
2552
|
{
|
|
2553
2553
|
styles: {
|
|
2554
2554
|
"@keyframes cs-pulse": {
|