fansunited-frontend-components 0.0.97 → 0.0.99

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.
Files changed (69) hide show
  1. package/Betslip.js +2 -2
  2. package/ChanceGame.js +958 -1464
  3. package/ClassicQuizPlay.js +2 -2
  4. package/CollectLead.js +1 -1
  5. package/CompetitionStatistics.js +2042 -2215
  6. package/CompetitorCard.js +4281 -4919
  7. package/Discussion.js +2 -2
  8. package/EitherOrPlay.js +2 -2
  9. package/EventCard.js +6010 -7547
  10. package/EventGamePlay.js +2 -2
  11. package/Leaderboard.js +546 -849
  12. package/List.js +227 -218
  13. package/MatchQuizPlay.js +2 -2
  14. package/Odds.js +50 -42
  15. package/PersonalityQuizPlay.js +2 -2
  16. package/PickThePair.js +2 -2
  17. package/PlayerOfTheMatch.js +285 -269
  18. package/PollVote.js +2 -2
  19. package/Predictor.js +80 -127
  20. package/README.md +1 -1
  21. package/Standings.js +991 -1324
  22. package/TopX.js +1120 -1167
  23. package/chunks/{ChanceGameEmbedVariant-CVys-3Zh.js → ChanceGameEmbedVariant-DM9eLG5s.js} +2 -2
  24. package/chunks/CheckCircle-I1FktW5Y.js +13 -0
  25. package/chunks/OddsSkeleton-DP5Yfqpr.js +522 -0
  26. package/chunks/Person-CXRqyF4E.js +11 -0
  27. package/chunks/PickOneOfX-DET4ZhjV.js +3117 -0
  28. package/chunks/Search-CIXthh0D.js +17 -0
  29. package/chunks/TimerOutlined-D-WA_vpE.js +8 -0
  30. package/chunks/WorkspacePremiumOutlined-DUXVgJlF.js +136 -0
  31. package/chunks/{chevrons-right-CXSpQt9w.js → chevrons-right-HWKW2c4I.js} +24 -4
  32. package/chunks/index-BENM3N_w.js +4 -0
  33. package/chunks/index-BRxAV693.js +4 -0
  34. package/chunks/index-BXYTsvIX.js +4 -0
  35. package/chunks/index-C0ilols1.js +4 -0
  36. package/chunks/index-D7VhczXH.js +4 -0
  37. package/chunks/index-DKwvdw9t.js +4 -0
  38. package/chunks/index-DZN-AITW.js +4 -0
  39. package/chunks/main-B2sDRFF4.js +2184 -0
  40. package/chunks/main-CzfWaEQP.js +4869 -0
  41. package/chunks/main-DFNl3g_U.js +4910 -0
  42. package/chunks/{main-65WcUqAl.js → main-DLwnvntz.js} +600 -593
  43. package/chunks/main-DiBlJBNb.js +1956 -0
  44. package/chunks/main-DxvBjXsd.js +1775 -0
  45. package/chunks/main-S8_NDSiY.js +3209 -0
  46. package/chunks/main-lBgr8Liq.js +6571 -0
  47. package/chunks/{withVersionStamp-BkiEu_79.js → withVersionStamp-BsLyhvNA.js} +1 -1
  48. package/package.json +2 -2
  49. package/chunks/OddsSkeleton-ClJE2xhR.js +0 -26
  50. package/chunks/OddsStrip-BnSp5TXa.js +0 -383
  51. package/chunks/PickOneOfX-DaJtkbCw.js +0 -4206
  52. package/chunks/chevron-left-CxfCSZcr.js +0 -13
  53. package/chunks/chevron-right-BEQMacFn.js +0 -13
  54. package/chunks/index-Aq5MbUB9.js +0 -4
  55. package/chunks/index-BBQm_8LD.js +0 -4
  56. package/chunks/index-BC_sWWgc.js +0 -4
  57. package/chunks/index-DXKDJ1Vp.js +0 -4
  58. package/chunks/index-DjT5NrbA.js +0 -4
  59. package/chunks/index-DvLRehH6.js +0 -4
  60. package/chunks/index-aIMaxR-p.js +0 -4
  61. package/chunks/main-52Wff7qC.js +0 -11441
  62. package/chunks/main-B58mi9jx.js +0 -5622
  63. package/chunks/main-BIdXUTZS.js +0 -7308
  64. package/chunks/main-DD-NEzC7.js +0 -8241
  65. package/chunks/main-DUnfJPzY.js +0 -3608
  66. package/chunks/main-DpCBqqg_.js +0 -1950
  67. package/chunks/main-Drznt1ak.js +0 -1790
  68. package/chunks/users-wbJRbqW8.js +0 -16
  69. package/chunks/x-CK4GYo7T.js +0 -14
@@ -1,6 +1,6 @@
1
- import { jsx as r } from "react/jsx-runtime";
1
+ import { jsx as r } from "@emotion/react/jsx-runtime";
2
2
  import { ChanceGameVariant as e } from "fansunited-frontend-core";
3
- import { P as m, a as n, b as O } from "./PickOneOfX-DaJtkbCw.js";
3
+ import { P as m, a as n, b as O } from "./PickOneOfX-DET4ZhjV.js";
4
4
  const o = ({
5
5
  infoPage: a,
6
6
  variant: s,
@@ -0,0 +1,13 @@
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { createSvgIcon as s } from "@mui/material";
3
+ const o = s([/* @__PURE__ */ c("path", {
4
+ d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"
5
+ }, "0"), /* @__PURE__ */ c("path", {
6
+ d: "M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"
7
+ }, "1")], "AccessTime"), r = s(/* @__PURE__ */ c("path", {
8
+ d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"
9
+ }), "CheckCircle");
10
+ export {
11
+ o as A,
12
+ r as C
13
+ };
@@ -0,0 +1,522 @@
1
+ import P, { useState as Q, useRef as rr, useEffect as er } from "react";
2
+ import { OddFormatEnum as or } from "fansunited-sdk-esm/enums";
3
+ import { jsx as R, jsxs as L, Fragment as tr } from "@emotion/react/jsx-runtime";
4
+ import { css as E, keyframes as nr } from "@emotion/react";
5
+ import { useTranslation as ar } from "react-i18next";
6
+ import { useColors as K, useFontFamily as cr, useCornerRadius as z, hexToRgb as sr, BidiIsolate as dr } from "fansunited-frontend-core";
7
+ const ir = [
8
+ "FT_1X2",
9
+ "HT_1X2",
10
+ "BOTH_TEAMS_SCORE",
11
+ "OVER_GOALS_0_5",
12
+ "OVER_GOALS_1_5",
13
+ "OVER_GOALS_2_5",
14
+ "OVER_GOALS_3_5",
15
+ "OVER_GOALS_4_5",
16
+ "OVER_GOALS_5_5",
17
+ "OVER_GOALS_6_5",
18
+ "OVER_CORNERS_6_5",
19
+ "OVER_CORNERS_7_5",
20
+ "OVER_CORNERS_8_5",
21
+ "OVER_CORNERS_9_5",
22
+ "OVER_CORNERS_10_5",
23
+ "OVER_CORNERS_11_5",
24
+ "OVER_CORNERS_12_5",
25
+ "OVER_CORNERS_13_5"
26
+ ], w = "WINNER_OT", ur = /* @__PURE__ */ new Set(["FOOTBALL", "HOCKEY", "ICE_HOCKEY"]), Y = /^OVER_(GOALS|CORNERS)_(\d+)_(\d+)$/, Mr = (r) => typeof r == "string" && ir.includes(r), W = (r) => r === "FT_1X2" || r === "HT_1X2" ? ["1", "X", "2"] : r === w ? ["1", "2"] : r === "BOTH_TEAMS_SCORE" ? ["YES", "NO"] : Y.test(r) ? ["OVER", "UNDER"] : [], pr = (r) => {
27
+ const e = r.match(Y);
28
+ return e ? `${e[2]}.${e[3]}` : null;
29
+ }, J = (r, e) => r !== "FT_1X2" ? [r] : !!e && !ur.has(e.toUpperCase()) ? [w, "FT_1X2"] : ["FT_1X2", w], lr = (r, e, n) => {
30
+ const t = (e || n || "").trim().toUpperCase();
31
+ return t ? r === "FT_1X2" || r === "HT_1X2" || r === w ? t === "1" || t === "HOME" || t === "HOME_TEAM" ? "1" : t === "X" || t === "DRAW" ? r === w ? null : "X" : t === "2" || t === "AWAY" || t === "AWAY_TEAM" ? "2" : null : W(r).includes(t) ? t : null : null;
32
+ }, wr = (r, e) => {
33
+ if (e == null || e === "") return null;
34
+ const n = W(r);
35
+ if (n.includes("X")) {
36
+ const c = String(e).toUpperCase();
37
+ return n.includes(c) ? c : null;
38
+ }
39
+ const t = typeof e == "boolean" ? e : ["YES", "TRUE"].includes(String(e).toUpperCase()) ? !0 : ["NO", "FALSE"].includes(String(e).toUpperCase()) ? !1 : null;
40
+ return t === null || n.length !== 2 ? null : t ? n[0] : n[1];
41
+ }, Vr = (r) => {
42
+ if (typeof r != "string") return null;
43
+ const [e, n] = r.split(":").map((t) => parseInt(t, 10));
44
+ return Number.isNaN(e) || Number.isNaN(n) ? null : e > n ? "1" : e < n ? "2" : "X";
45
+ }, Z = (r, e) => `${r}:${e}`, q = (r) => {
46
+ var t;
47
+ if (!Array.isArray(r)) return null;
48
+ const e = r.filter((c) => typeof (c == null ? void 0 : c.url) == "string" && c.url);
49
+ return ((t = e.find((c) => `${c.appType ?? ""}`.toUpperCase() === "DESKTOP") ?? e[0]) == null ? void 0 : t.url) ?? null;
50
+ }, fr = (r) => {
51
+ var n, t;
52
+ if (!r) return null;
53
+ const e = (r.assets ?? [])[0];
54
+ return {
55
+ id: r.id ?? "",
56
+ name: r.name ?? "",
57
+ logo: (e == null ? void 0 : e.transparentBackgroundUrl) || (e == null ? void 0 : e.logo) || null,
58
+ url: q(r.eventUrls) ?? r.url ?? null,
59
+ backgroundColor: ((n = r.branding) == null ? void 0 : n.backgroundColor) ?? (e == null ? void 0 : e.backgroundColor) ?? null,
60
+ textColor: ((t = r.branding) == null ? void 0 : t.textColor) ?? null
61
+ };
62
+ }, mr = (r, e, n, t) => {
63
+ const c = W(e), l = [];
64
+ return ((r == null ? void 0 : r.selections) ?? []).forEach((a) => {
65
+ const s = lr(e, a == null ? void 0 : a.code, a == null ? void 0 : a.name);
66
+ if (!s) return;
67
+ const f = Number(a == null ? void 0 : a.odds);
68
+ if (!Number.isFinite(f) || f <= 0 || l.some((h) => h.pick === s)) return;
69
+ const o = t == null ? void 0 : t.get(Z(n, s)), u = `${(a == null ? void 0 : a.movement) ?? ""}`.toUpperCase(), g = u === "UP" || u === "DOWN" ? u.toLowerCase() : o === void 0 || o === f ? "none" : f > o ? "up" : "down";
70
+ l.push({
71
+ pick: s,
72
+ value: f.toFixed(2),
73
+ odd: f,
74
+ change: g,
75
+ url: q(a == null ? void 0 : a.urls)
76
+ });
77
+ }), c.every((a) => l.some((s) => s.pick === a)) ? (l.sort((a, s) => c.indexOf(a.pick) - c.indexOf(s.pick)), { market: e, values: l }) : null;
78
+ }, gr = (r, e) => {
79
+ const n = {};
80
+ return e.markets.forEach((t) => {
81
+ for (const c of J(t, e.sport)) {
82
+ const l = ((r == null ? void 0 : r.markets) ?? []).find(
83
+ (s) => {
84
+ var f, o;
85
+ return `${((f = s == null ? void 0 : s.type) == null ? void 0 : f.code) || ((o = s == null ? void 0 : s.type) == null ? void 0 : o.id) || ""}`.toUpperCase() === c;
86
+ }
87
+ ), a = l ? mr(l, c, t, e.previous) : null;
88
+ if (a) {
89
+ n[t] = a;
90
+ break;
91
+ }
92
+ }
93
+ }), n;
94
+ }, _r = (r, e, n) => {
95
+ var f;
96
+ if (!n.markets.length) return null;
97
+ const t = (o) => {
98
+ var g;
99
+ const u = (n.operators ?? []).indexOf((g = o == null ? void 0 : o.bookmaker) == null ? void 0 : g.id);
100
+ return u === -1 ? Number.MAX_SAFE_INTEGER : u;
101
+ }, l = e.map((o, u) => ({ entry: o, index: u })).sort((o, u) => t(o.entry) - t(u.entry) || o.index - u.index).map(({ entry: o }) => o).map((o) => ({ entry: o, markets: gr(o, n) })), a = n.markets[0], s = l.find((o) => o.markets[a]) ?? l.find((o) => Object.keys(o.markets).length > 0);
102
+ return s ? { eventId: r, operator: fr((f = s.entry) == null ? void 0 : f.bookmaker), markets: s.markets } : null;
103
+ }, Er = (r) => {
104
+ const e = /* @__PURE__ */ new Map();
105
+ return Object.entries(r.markets).forEach(
106
+ ([n, t]) => t.values.forEach((c) => e.set(Z(n, c.pick), c.odd))
107
+ ), e;
108
+ }, Sr = 3e4, hr = ["FT_1X2"], Fr = (r, e, n) => {
109
+ const {
110
+ enabled: t,
111
+ markets: c = hr,
112
+ sport: l,
113
+ pollingIntervalMs: a = Sr,
114
+ operators: s,
115
+ affiliateId: f,
116
+ affiliateIds: o
117
+ } = n, u = [...new Set(e)].filter(Boolean).sort().join(","), g = c.join(","), h = (s ?? []).join(","), A = `${f ?? ""}|${JSON.stringify(o ?? {})}`, O = t && !!r && !!u && !!g, [B, I] = Q({ odds: /* @__PURE__ */ new Map(), loading: O }), k = rr(/* @__PURE__ */ new Map());
118
+ return er(() => {
119
+ if (!O || !r) {
120
+ k.current = /* @__PURE__ */ new Map(), I({ odds: /* @__PURE__ */ new Map(), loading: !1 });
121
+ return;
122
+ }
123
+ const T = u.split(","), x = g.split(","), b = h ? h.split(",") : [];
124
+ k.current = new Map(
125
+ [...k.current].filter(([y]) => T.includes(y))
126
+ );
127
+ let p = !1;
128
+ I((y) => ({ odds: y.odds, loading: !0 }));
129
+ const v = async () => {
130
+ try {
131
+ const y = [
132
+ ...new Set(x.flatMap((i) => J(i, l)))
133
+ ], F = {
134
+ oddFormat: or.DECIMAL,
135
+ marketTypes: y,
136
+ ...b.length ? { operators: b } : {},
137
+ ...f ? { affiliateId: f } : {},
138
+ ...o && Object.keys(o).length ? { affiliateIds: o } : {}
139
+ }, M = await r.odds.getByMatchIds(T, F);
140
+ if (p) return;
141
+ const d = /* @__PURE__ */ new Map();
142
+ T.forEach((i) => {
143
+ const C = _r(i, (M == null ? void 0 : M.get(i)) ?? [], {
144
+ markets: x,
145
+ sport: l,
146
+ operators: b,
147
+ previous: k.current.get(i)
148
+ });
149
+ C && (d.set(i, C), k.current.set(i, Er(C)));
150
+ }), I({ odds: d, loading: !1 });
151
+ } catch {
152
+ p || I({ odds: /* @__PURE__ */ new Map(), loading: !1 });
153
+ }
154
+ };
155
+ v();
156
+ const V = a > 0 ? setInterval(v, a) : null;
157
+ return () => {
158
+ p = !0, V && clearInterval(V);
159
+ };
160
+ }, [O, r, u, g, l, h, A, a]), B;
161
+ }, m = {
162
+ surface: "var(--fu-ucrc-odds-surface)",
163
+ /** Muted fill — the operator box when the operator has no brand colour. */
164
+ inner: "var(--fu-ucrc-odds-inner)",
165
+ text: "var(--fu-ucrc-odds-text)",
166
+ dim: "var(--fu-ucrc-odds-dim)",
167
+ border: "var(--fu-ucrc-odds-border)",
168
+ success: "var(--fu-ucrc-odds-success)",
169
+ danger: "var(--fu-ucrc-odds-danger)",
170
+ fontPrimary: "var(--fu-ucrc-odds-font-primary)",
171
+ fontSecondary: "var(--fu-ucrc-odds-font-secondary)",
172
+ radius: "var(--fu-ucrc-odds-radius)"
173
+ }, Or = () => {
174
+ const r = K(), e = cr(), n = z(), t = r.palette.success.plainColor, c = r.palette.danger.plainColor;
175
+ return P.useMemo(
176
+ () => ({
177
+ "--fu-ucrc-odds-surface": r.surface,
178
+ "--fu-ucrc-odds-inner": r.onSurface,
179
+ "--fu-ucrc-odds-text": r.textPrimary,
180
+ // The theme's textSecondary equals textPrimary, so the muted tone is derived.
181
+ "--fu-ucrc-odds-dim": `rgba(${sr(r.textSecondary)}, 0.62)`,
182
+ "--fu-ucrc-odds-border": r.outlineEnabledBorder,
183
+ "--fu-ucrc-odds-success": t,
184
+ "--fu-ucrc-odds-danger": c,
185
+ "--fu-ucrc-odds-font-primary": e.primary,
186
+ "--fu-ucrc-odds-font-secondary": e.secondary,
187
+ "--fu-ucrc-odds-radius": n.xs
188
+ }),
189
+ [
190
+ r.surface,
191
+ r.onSurface,
192
+ r.textPrimary,
193
+ r.textSecondary,
194
+ r.outlineEnabledBorder,
195
+ t,
196
+ c,
197
+ e.primary,
198
+ e.secondary,
199
+ n.xs
200
+ ]
201
+ );
202
+ }, xr = 3e3, $ = {
203
+ default: {
204
+ box: "2em",
205
+ gap: "0.375em",
206
+ padInline: "0.75em",
207
+ padBlock: "0.625em",
208
+ operatorPad: "0.625em",
209
+ operatorMax: "7em",
210
+ pricePad: "0.625em",
211
+ priceGap: "0.375em"
212
+ },
213
+ dense: {
214
+ box: "1.75em",
215
+ gap: "0.3125em",
216
+ padInline: "0.625em",
217
+ padBlock: "0.625em",
218
+ operatorPad: "0.375em",
219
+ operatorMax: "5.25em",
220
+ pricePad: "0.4375em",
221
+ priceGap: "0.25em"
222
+ },
223
+ compact: {
224
+ box: "1.625em",
225
+ gap: "0.375em",
226
+ padInline: "0.625em",
227
+ padBlock: "0",
228
+ operatorPad: "0.625em",
229
+ operatorMax: "7em",
230
+ pricePad: "0.5em",
231
+ priceGap: "0.375em"
232
+ }
233
+ }, yr = {
234
+ gap: "0.3125em",
235
+ operatorPad: "0.375em",
236
+ operatorMax: "5.25em",
237
+ priceGap: "0.25em"
238
+ }, H = (r) => ({
239
+ "--fu-ucrc-odds-box": r.box,
240
+ "--fu-ucrc-odds-gap": r.gap,
241
+ "--fu-ucrc-odds-pad-inline": r.padInline,
242
+ "--fu-ucrc-odds-pad-block": r.padBlock,
243
+ "--fu-ucrc-odds-operator-pad": r.operatorPad,
244
+ "--fu-ucrc-odds-operator-max": r.operatorMax,
245
+ "--fu-ucrc-odds-price-pad": r.pricePad,
246
+ "--fu-ucrc-odds-price-gap": r.priceGap
247
+ }), U = (r) => ({
248
+ framed: H($[r]),
249
+ bare: H({ ...$[r], ...yr })
250
+ }), Rr = {
251
+ default: U("default"),
252
+ dense: U("dense"),
253
+ compact: U("compact")
254
+ }, S = {
255
+ box: "var(--fu-ucrc-odds-box)",
256
+ gap: "var(--fu-ucrc-odds-gap)",
257
+ padInline: "var(--fu-ucrc-odds-pad-inline)",
258
+ padBlock: "var(--fu-ucrc-odds-pad-block)",
259
+ operatorPad: "var(--fu-ucrc-odds-operator-pad)",
260
+ operatorMax: "var(--fu-ucrc-odds-operator-max)",
261
+ pricePad: "var(--fu-ucrc-odds-price-pad)",
262
+ priceGap: "var(--fu-ucrc-odds-price-gap)"
263
+ }, N = (r, e) => E({
264
+ display: r ? "inline-flex" : "flex",
265
+ alignItems: "center",
266
+ gap: S.gap,
267
+ fontSize: "1em",
268
+ ...e === "bare" ? {} : {
269
+ paddingInline: S.padInline,
270
+ paddingBlock: S.padBlock,
271
+ borderBlockStart: `1px solid ${m.border}`,
272
+ ...e === "compact" ? { height: "2.5em" } : {}
273
+ }
274
+ }), D = (r) => E({
275
+ display: "flex",
276
+ alignItems: "center",
277
+ justifyContent: "center",
278
+ gap: "0.375em",
279
+ height: S.box,
280
+ paddingInline: S.operatorPad,
281
+ borderRadius: m.radius,
282
+ boxSizing: "border-box",
283
+ textDecoration: "none",
284
+ flexShrink: 0,
285
+ whiteSpace: "nowrap",
286
+ // Brand colours are data, not theme: they go in `style` and override these.
287
+ backgroundColor: m.inner,
288
+ color: m.text,
289
+ ...r === "full" ? { flex: 1 } : {
290
+ maxWidth: S.operatorMax,
291
+ width: r === "fixedInline" ? "auto" : "100%"
292
+ }
293
+ }), j = (r) => E({
294
+ flex: r ? "0 0 auto" : 1,
295
+ minWidth: 0,
296
+ height: S.box,
297
+ display: "flex",
298
+ alignItems: "center",
299
+ justifyContent: "space-between",
300
+ gap: S.priceGap,
301
+ paddingInline: S.pricePad,
302
+ borderRadius: m.radius,
303
+ border: `1px solid ${m.border}`,
304
+ boxSizing: "border-box",
305
+ backgroundColor: m.surface,
306
+ color: m.text,
307
+ cursor: "pointer",
308
+ textDecoration: "none",
309
+ fontFamily: m.fontSecondary,
310
+ // A <button> doesn't inherit font-size, and `height` in em resolves against its own.
311
+ fontSize: "1em",
312
+ lineHeight: 1.35,
313
+ "&:hover": { borderColor: m.dim }
314
+ }), G = (r) => E({
315
+ marginInlineStart: "0.25em",
316
+ visibility: r === "none" ? "hidden" : "visible",
317
+ color: r === "up" ? m.success : m.danger
318
+ }), _ = {
319
+ root: {
320
+ block: {
321
+ bare: N(!1, "bare"),
322
+ framed: N(!1, "framed"),
323
+ compact: N(!1, "compact")
324
+ },
325
+ inline: {
326
+ bare: N(!0, "bare"),
327
+ framed: N(!0, "framed"),
328
+ compact: N(!0, "compact")
329
+ }
330
+ },
331
+ operator: {
332
+ full: D("full"),
333
+ fixed: D("fixed"),
334
+ fixedInline: D("fixedInline")
335
+ },
336
+ logo: E({
337
+ height: "100%",
338
+ maxWidth: "100%",
339
+ width: "auto",
340
+ objectFit: "contain"
341
+ }),
342
+ // Both texts keep what Joy's Typography gave them: block, no margin, inherited colour.
343
+ operatorName: E({
344
+ display: "block",
345
+ margin: 0,
346
+ fontFamily: m.fontPrimary,
347
+ fontSize: "0.75em",
348
+ fontWeight: 600,
349
+ lineHeight: 1.35,
350
+ color: "inherit",
351
+ whiteSpace: "nowrap",
352
+ unicodeBidi: "plaintext"
353
+ }),
354
+ title: E({
355
+ display: "block",
356
+ margin: 0,
357
+ fontFamily: m.fontSecondary,
358
+ fontSize: "0.75em",
359
+ fontWeight: 400,
360
+ lineHeight: 1.5,
361
+ color: "inherit",
362
+ opacity: 0.85,
363
+ whiteSpace: "nowrap"
364
+ }),
365
+ price: { block: j(!1), inline: j(!0) },
366
+ pick: E({ color: m.dim, fontSize: "0.75em", whiteSpace: "nowrap" }),
367
+ value: E({
368
+ fontSize: "0.75em",
369
+ fontWeight: 700,
370
+ fontVariantNumeric: "tabular-nums",
371
+ whiteSpace: "nowrap"
372
+ }),
373
+ change: {
374
+ up: G("up"),
375
+ down: G("down"),
376
+ none: G("none")
377
+ }
378
+ }, Lr = ({
379
+ odds: r,
380
+ market: e,
381
+ size: n = "default",
382
+ mode: t,
383
+ flashInterval: c = xr,
384
+ picks: l,
385
+ bare: a = !1,
386
+ inline: s = !1,
387
+ linkPrices: f = !0,
388
+ labels: o,
389
+ onSelect: u
390
+ }) => {
391
+ const { t: g } = ar("common"), h = Or(), A = n === "compact", O = (t ?? (A ? "flash" : "default")) === "flash", B = P.useMemo(
392
+ () => ({
393
+ ...h,
394
+ ...Rr[n][a ? "bare" : "framed"]
395
+ }),
396
+ [h, n, a]
397
+ ), [I, k] = P.useState(!1);
398
+ P.useEffect(() => {
399
+ if (!O) return;
400
+ const d = setInterval(
401
+ () => k((i) => !i),
402
+ c
403
+ );
404
+ return () => clearInterval(d);
405
+ }, [O, c]);
406
+ const T = e ?? Object.keys(r.markets)[0], x = T ? r.markets[T] : void 0;
407
+ if (!x) return null;
408
+ const b = l ? x.values.filter((d) => l.includes(d.pick)) : x.values;
409
+ if (b.length === 0) return null;
410
+ const p = r.operator, v = pr(x.market) ?? "", V = (d) => {
411
+ var i, C;
412
+ switch (d) {
413
+ case "YES":
414
+ return (o == null ? void 0 : o.yes) ?? g("odds.yes");
415
+ case "NO":
416
+ return (o == null ? void 0 : o.no) ?? g("odds.no");
417
+ case "OVER":
418
+ return ((i = o == null ? void 0 : o.over) == null ? void 0 : i.replace("{{line}}", v)) ?? g("odds.over", { line: v });
419
+ case "UNDER":
420
+ return ((C = o == null ? void 0 : o.under) == null ? void 0 : C.replace("{{line}}", v)) ?? g("odds.under", { line: v });
421
+ default:
422
+ return d;
423
+ }
424
+ }, y = (d) => {
425
+ if (!p) return null;
426
+ const i = p.url ? "a" : "div";
427
+ return /* @__PURE__ */ L(
428
+ i,
429
+ {
430
+ href: p.url ?? void 0,
431
+ target: p.url ? "_blank" : void 0,
432
+ rel: p.url ? "noopener noreferrer" : void 0,
433
+ css: d ? _.operator.full : s ? _.operator.fixedInline : _.operator.fixed,
434
+ style: {
435
+ backgroundColor: p.backgroundColor ?? void 0,
436
+ color: p.textColor ?? void 0
437
+ },
438
+ children: [
439
+ p.logo ? /* @__PURE__ */ R(
440
+ "img",
441
+ {
442
+ src: p.logo,
443
+ alt: p.name,
444
+ loading: "lazy",
445
+ css: _.logo
446
+ }
447
+ ) : /* @__PURE__ */ R("span", { css: _.operatorName, children: p.name }),
448
+ A && O ? /* @__PURE__ */ R(
449
+ "span",
450
+ {
451
+ css: _.title,
452
+ children: `· ${(o == null ? void 0 : o.title) ?? g("odds.title")}`
453
+ }
454
+ ) : null
455
+ ]
456
+ }
457
+ );
458
+ }, F = (d) => {
459
+ const i = f && !!d.url;
460
+ return /* @__PURE__ */ L(
461
+ i ? "a" : "button",
462
+ {
463
+ type: i ? void 0 : "button",
464
+ href: i ? d.url ?? void 0 : void 0,
465
+ target: i ? "_blank" : void 0,
466
+ rel: i ? "noopener noreferrer" : void 0,
467
+ onClick: () => u == null ? void 0 : u({
468
+ matchId: r.eventId,
469
+ market: x.market,
470
+ pick: d.pick,
471
+ odd: d.odd,
472
+ operatorId: (p == null ? void 0 : p.id) || void 0
473
+ }),
474
+ css: s ? _.price.inline : _.price.block,
475
+ children: [
476
+ /* @__PURE__ */ R("span", { css: _.pick, children: V(d.pick) }),
477
+ /* @__PURE__ */ L("span", { css: _.value, children: [
478
+ /* @__PURE__ */ R(dr, { children: d.value }),
479
+ /* @__PURE__ */ R("span", { "aria-hidden": !0, css: _.change[d.change], children: d.change === "down" ? "↓" : "↑" })
480
+ ] })
481
+ ]
482
+ },
483
+ d.pick
484
+ );
485
+ }, M = a ? "bare" : A ? "compact" : "framed";
486
+ return /* @__PURE__ */ R("div", { css: _.root[s ? "inline" : "block"][M], style: B, children: O ? I && p ? y(!0) : b.map(F) : /* @__PURE__ */ L(tr, { children: [
487
+ y(!1),
488
+ b.map(F)
489
+ ] }) });
490
+ }, kr = nr({
491
+ "0%, 100%": { opacity: 1 },
492
+ "50%": { opacity: 0.4 }
493
+ }), X = (r) => E({
494
+ fontSize: "1em",
495
+ height: r,
496
+ animation: `${kr} 1.5s ease-in-out infinite`
497
+ }), br = {
498
+ default: X("2em"),
499
+ dense: X("1.75em"),
500
+ compact: X("1.625em")
501
+ }, Pr = ({ size: r = "default" }) => {
502
+ const e = K(), n = z();
503
+ return /* @__PURE__ */ R(
504
+ "div",
505
+ {
506
+ "aria-hidden": !0,
507
+ css: br[r],
508
+ style: {
509
+ borderRadius: n.xs,
510
+ backgroundColor: e.surfaceVariant
511
+ }
512
+ }
513
+ );
514
+ };
515
+ export {
516
+ Lr as O,
517
+ Pr as a,
518
+ Mr as i,
519
+ wr as p,
520
+ Vr as s,
521
+ Fr as u
522
+ };
@@ -0,0 +1,11 @@
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { createSvgIcon as o } from "@mui/material";
3
+ const t = o(/* @__PURE__ */ c("path", {
4
+ d: "M19 5h-2V3H7v2H5c-1.1 0-2 .9-2 2v1c0 2.55 1.92 4.63 4.39 4.94.63 1.5 1.98 2.63 3.61 2.96V19H7v2h10v-2h-4v-3.1c1.63-.33 2.98-1.46 3.61-2.96C19.08 12.63 21 10.55 21 8V7c0-1.1-.9-2-2-2M5 8V7h2v3.82C5.84 10.4 5 9.3 5 8m14 0c0 1.3-.84 2.4-2 2.82V7h2z"
5
+ }), "EmojiEvents"), n = o(/* @__PURE__ */ c("path", {
6
+ d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"
7
+ }), "Person");
8
+ export {
9
+ t as E,
10
+ n as P
11
+ };