fansunited-frontend-components 0.0.99 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Betslip.js +2 -2
- package/ChanceGame.js +496 -505
- package/ClassicQuizPlay.js +2 -2
- package/CollectLead.js +405 -1163
- package/CompetitionStatistics.js +2 -2
- package/CompetitorCard.js +445 -425
- package/Discussion.js +2 -2
- package/EitherOrPlay.js +2 -2
- package/EventCard.js +648 -593
- package/EventGamePlay.js +2 -2
- package/Leaderboard.js +142 -132
- package/List.js +675 -713
- package/MatchQuizPlay.js +2 -2
- package/Odds.js +1 -1
- package/PersonalityQuizPlay.js +2 -2
- package/PickThePair.js +925 -1824
- package/PlayerOfTheMatch.js +2106 -2223
- package/PollVote.js +2 -2
- package/Predictor.js +4209 -18629
- package/Standings.js +497 -486
- package/TopX.js +3223 -16958
- package/chunks/{ChanceGameEmbedVariant-DM9eLG5s.js → ChanceGameEmbedVariant-z8XYzgDW.js} +1 -1
- package/chunks/PickOneOfX-IvE4OvyT.js +3146 -0
- package/chunks/index-BNl8scz6.js +4 -0
- package/chunks/index-CSa2JU4m.js +4 -0
- package/chunks/index-CVRI82Gb.js +4 -0
- package/chunks/index-Cd1dg0KI.js +4 -0
- package/chunks/index-Cei2fzi7.js +4 -0
- package/chunks/index-Cxb4wEJU.js +4 -0
- package/chunks/index-w1LGN5dz.js +4 -0
- package/chunks/main-07vzblS8.js +2091 -0
- package/chunks/main-C7X4dM_P.js +4827 -0
- package/chunks/main-D_QDfmAw.js +6417 -0
- package/chunks/{main-CzfWaEQP.js → main-DdL0UekL.js} +1931 -2025
- package/chunks/main-DmBfwyb4.js +2992 -0
- package/chunks/main-LEE8n2cG.js +3117 -0
- package/chunks/{main-DxvBjXsd.js → main-P2WNvBZE.js} +473 -444
- package/chunks/{main-DiBlJBNb.js → main-gV165E-A.js} +629 -657
- package/chunks/predictionsHelpers-fwXaMadu.js +10063 -0
- package/chunks/{withVersionStamp-BsLyhvNA.js → withVersionStamp-CPDfSE5H.js} +1 -1
- package/package.json +2 -6
- package/withVersionStamp.d.ts.map +1 -1
- package/chunks/CheckCircle-I1FktW5Y.js +0 -13
- package/chunks/Person-CXRqyF4E.js +0 -11
- package/chunks/PickOneOfX-DET4ZhjV.js +0 -3117
- package/chunks/Search-CIXthh0D.js +0 -17
- package/chunks/TimerOutlined-D-WA_vpE.js +0 -8
- package/chunks/WorkspacePremiumOutlined-DUXVgJlF.js +0 -136
- package/chunks/chevrons-right-HWKW2c4I.js +0 -45
- package/chunks/createLucideIcon-YBRjY5Kl.js +0 -79
- package/chunks/index-BENM3N_w.js +0 -4
- package/chunks/index-BRxAV693.js +0 -4
- package/chunks/index-BXYTsvIX.js +0 -4
- package/chunks/index-C0ilols1.js +0 -4
- package/chunks/index-D7VhczXH.js +0 -4
- package/chunks/index-DKwvdw9t.js +0 -4
- package/chunks/index-DZN-AITW.js +0 -4
- package/chunks/main-B2sDRFF4.js +0 -2184
- package/chunks/main-DFNl3g_U.js +0 -4910
- package/chunks/main-DLwnvntz.js +0 -4020
- package/chunks/main-S8_NDSiY.js +0 -3209
- package/chunks/main-lBgr8Liq.js +0 -6571
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { jsx as s, jsxs as S, Fragment as
|
|
2
|
-
import { WidgetPortal as
|
|
3
|
-
import
|
|
4
|
-
import { css as
|
|
5
|
-
import {
|
|
6
|
-
import { useTranslation as
|
|
7
|
-
import { MatchOddsFilters as
|
|
8
|
-
import { KeyboardArrowDownIcon as zt, KeyboardArrowUpIcon as
|
|
9
|
-
function
|
|
10
|
-
const l = o ?? "Away",
|
|
1
|
+
import { jsx as s, jsxs as S, Fragment as wt } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { WidgetPortal as Ct } from "fansunited-frontend-core/ui/emotion";
|
|
3
|
+
import F, { useState as I, useRef as V, useEffect as T, createContext as Rt, useMemo as tt, useCallback as J, useContext as kt } from "react";
|
|
4
|
+
import { css as k, keyframes as H } from "@emotion/react";
|
|
5
|
+
import { useIsMobile as _t, useColors as It, useFontFamily as Et, useCurrentThemeMode as Lt, useSpacingScale as A, useCornerRadius as B, useBorderSize as q, toIntlLocale as et, useDisableCache as Tt, fetchEventsByIds as $t, getSportsApiCredentials as Ot, fetchSearchEntitiesByIds as At, betslipApi as G } from "fansunited-frontend-core";
|
|
6
|
+
import { useTranslation as E } from "react-i18next";
|
|
7
|
+
import { MatchOddsFilters as Bt } from "fansunited-sdk-esm/models";
|
|
8
|
+
import { KeyboardArrowDownIcon as zt, KeyboardArrowUpIcon as Dt } from "fansunited-frontend-core/ui/icons";
|
|
9
|
+
function Wt(t, e, n, o, a, r) {
|
|
10
|
+
const l = o ?? "Away", i = e.toLowerCase(), u = (r == null ? void 0 : r.draw) || a("betslip.outcomes.draw"), y = (r == null ? void 0 : r.yes) || a("betslip.outcomes.yes"), g = (r == null ? void 0 : r.no) || a("betslip.outcomes.no"), c = (r == null ? void 0 : r.over) || a("betslip.outcomes.over"), p = (r == null ? void 0 : r.under) || a("betslip.outcomes.under"), d = (r == null ? void 0 : r.noGoal) || a("betslip.outcomes.noGoal"), h = (r == null ? void 0 : r.nobody) || a("betslip.outcomes.nobody"), f = (r == null ? void 0 : r.or) || a("betslip.outcomes.or");
|
|
11
11
|
switch (t) {
|
|
12
12
|
case "FT_1X2":
|
|
13
13
|
case "HT_1X2":
|
|
14
14
|
if (e === "1") return n;
|
|
15
|
-
if (
|
|
15
|
+
if (i === "x") return u;
|
|
16
16
|
if (e === "2") return l;
|
|
17
17
|
break;
|
|
18
18
|
case "DOUBLE_CHANCE": {
|
|
19
|
-
const
|
|
20
|
-
if (
|
|
21
|
-
if (
|
|
22
|
-
if (
|
|
19
|
+
const m = e.toUpperCase();
|
|
20
|
+
if (m === "1X") return `${n} ${f} ${u}`;
|
|
21
|
+
if (m === "12") return `${n} ${f} ${l}`;
|
|
22
|
+
if (m === "X2") return `${u} ${f} ${l}`;
|
|
23
23
|
break;
|
|
24
24
|
}
|
|
25
25
|
case "BOTH_TEAMS_SCORE":
|
|
26
26
|
case "RED_CARD_MATCH":
|
|
27
27
|
case "PENALTY_MATCH":
|
|
28
|
-
if (
|
|
29
|
-
if (
|
|
28
|
+
if (i === "yes") return y;
|
|
29
|
+
if (i === "no") return g;
|
|
30
30
|
break;
|
|
31
31
|
case "CORRECT_SCORE":
|
|
32
32
|
case "CORRECT_SCORE_ADVANCED":
|
|
33
33
|
case "CORRECT_SCORE_HT": {
|
|
34
|
-
const
|
|
35
|
-
return
|
|
34
|
+
const m = e.split(/[-:]/).map(Number);
|
|
35
|
+
return m.length === 2 && !isNaN(m[0]) && !isNaN(m[1]) ? m[0] > m[1] ? n : m[1] > m[0] ? l : u : e;
|
|
36
36
|
}
|
|
37
37
|
case "HT_FT": {
|
|
38
|
-
const
|
|
39
|
-
return (
|
|
38
|
+
const m = e.toUpperCase();
|
|
39
|
+
return (m.includes("/") ? m.split("/") : m.split("")).map((w) => w === "1" ? n : w === "2" ? l : u).join(" / ");
|
|
40
40
|
}
|
|
41
41
|
case "DRAW_NO_BET":
|
|
42
42
|
if (e === "1") return n;
|
|
@@ -46,7 +46,7 @@ function Dt(t, e, n, o, a, i) {
|
|
|
46
46
|
case "LAST_TEAM_TO_SCORE":
|
|
47
47
|
if (e === "1") return n;
|
|
48
48
|
if (e === "2") return l;
|
|
49
|
-
if (
|
|
49
|
+
if (i === "none" || i === "no goal") return d;
|
|
50
50
|
break;
|
|
51
51
|
case "PLAYER_SCORE_FIRST_GOAL":
|
|
52
52
|
case "PLAYER_SCORE":
|
|
@@ -54,11 +54,11 @@ function Dt(t, e, n, o, a, i) {
|
|
|
54
54
|
case "PLAYER_SCORE_HATTRICK":
|
|
55
55
|
case "PLAYER_RED_CARD":
|
|
56
56
|
case "PLAYER_YELLOW_CARD":
|
|
57
|
-
return
|
|
57
|
+
return i === "none" || i === "no goal" || i === "nobody" ? h : e;
|
|
58
58
|
}
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
61
|
-
const w =
|
|
59
|
+
const b = t.match(/^(OVER|UNDER)_(GOALS|CORNERS)_(\d+)_(\d+)$/i);
|
|
60
|
+
if (b) {
|
|
61
|
+
const w = b[1].toUpperCase() === "OVER" !== (i === "no" || i === "under") ? c : p, C = `${b[3]}.${b[4]}`;
|
|
62
62
|
return `${w} ${C}`;
|
|
63
63
|
}
|
|
64
64
|
return e;
|
|
@@ -66,21 +66,21 @@ function Dt(t, e, n, o, a, i) {
|
|
|
66
66
|
function Ut(t) {
|
|
67
67
|
return `${t.eventId}:${t.market}:${t.outcome}`;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function Ft(t) {
|
|
70
70
|
var n;
|
|
71
71
|
const e = (n = t.participantTwo) == null ? void 0 : n.name;
|
|
72
72
|
return e ? `${t.participantOne.name} vs ${e}` : t.participantOne.name;
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function Ht(t, e, n) {
|
|
75
75
|
return t.map((o) => {
|
|
76
|
-
var a,
|
|
76
|
+
var a, r, l;
|
|
77
77
|
return {
|
|
78
78
|
id: Ut(o),
|
|
79
79
|
eventId: o.eventId,
|
|
80
80
|
marketId: o.market,
|
|
81
|
-
event:
|
|
81
|
+
event: Ft(o),
|
|
82
82
|
market: o.market,
|
|
83
|
-
name:
|
|
83
|
+
name: Wt(
|
|
84
84
|
o.market,
|
|
85
85
|
o.outcome,
|
|
86
86
|
o.participantOne.name,
|
|
@@ -93,7 +93,7 @@ function Ft(t, e, n) {
|
|
|
93
93
|
startAt: o.startAt,
|
|
94
94
|
matchStatus: o.matchStatus,
|
|
95
95
|
participantOne: o.participantOne.name,
|
|
96
|
-
participantTwo: (
|
|
96
|
+
participantTwo: (r = o.participantTwo) == null ? void 0 : r.name,
|
|
97
97
|
participantOneLogo: o.participantOne.logo,
|
|
98
98
|
participantTwoLogo: (l = o.participantTwo) == null ? void 0 : l.logo,
|
|
99
99
|
source: o.source,
|
|
@@ -102,7 +102,7 @@ function Ft(t, e, n) {
|
|
|
102
102
|
};
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
|
-
const
|
|
105
|
+
const Pt = {
|
|
106
106
|
HT_FT: ["first_half_and_final_result", "htft", "ht_ft"],
|
|
107
107
|
BOTH_TEAMS_SCORE: ["both_to_score", "btts", "gg"],
|
|
108
108
|
DOUBLE_CHANCE: ["double_chance", "dc"],
|
|
@@ -112,45 +112,45 @@ const Ht = {
|
|
|
112
112
|
PLAYER_RED_CARD: ["player_red_card", "red_card"],
|
|
113
113
|
PLAYER_YELLOW_CARD: ["player_yellow_card", "yellow_card"]
|
|
114
114
|
};
|
|
115
|
-
function
|
|
115
|
+
function Nt(t) {
|
|
116
116
|
return t.replace(/^FT_/i, "").toLowerCase();
|
|
117
117
|
}
|
|
118
|
-
const
|
|
119
|
-
function
|
|
118
|
+
const ht = /^(OVER|UNDER)_(GOALS|CORNERS)_(\d+)_(\d+)$/i;
|
|
119
|
+
function Mt(t, e) {
|
|
120
120
|
const n = t.toLowerCase();
|
|
121
|
-
if (n === e.toLowerCase() || n ===
|
|
122
|
-
const o =
|
|
123
|
-
return !!(o !== void 0 && o.includes(n) ||
|
|
121
|
+
if (n === e.toLowerCase() || n === Nt(e)) return !0;
|
|
122
|
+
const o = Pt[e];
|
|
123
|
+
return !!(o !== void 0 && o.includes(n) || ht.test(e) && n === "over_under");
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function jt(t) {
|
|
126
126
|
const e = t.split(":");
|
|
127
127
|
return e[e.length - 1];
|
|
128
128
|
}
|
|
129
129
|
function gt(t, e, n) {
|
|
130
|
-
var
|
|
130
|
+
var u, y, g, c, p, d;
|
|
131
131
|
if (!t) return null;
|
|
132
|
-
const o =
|
|
133
|
-
for (const
|
|
134
|
-
const
|
|
135
|
-
if (!
|
|
136
|
-
const
|
|
137
|
-
for (const
|
|
138
|
-
if (
|
|
139
|
-
const x = ((
|
|
140
|
-
if (x && w) return
|
|
141
|
-
} else if (((p =
|
|
142
|
-
return
|
|
132
|
+
const o = jt(n), a = e.match(ht), r = a !== null, l = r ? o.toLowerCase() === "no" ? "under" : o.toLowerCase() === "yes" ? "over" : o.toLowerCase() : null, i = r ? `${a[3]}.${a[4]}` : null;
|
|
133
|
+
for (const h of t.markets ?? []) {
|
|
134
|
+
const f = ((u = h == null ? void 0 : h.type) == null ? void 0 : u.code) ?? "";
|
|
135
|
+
if (!Mt(f, e)) continue;
|
|
136
|
+
const b = f.toLowerCase() !== "over_under";
|
|
137
|
+
for (const m of h.selections ?? [])
|
|
138
|
+
if (r) {
|
|
139
|
+
const x = ((y = m.code) == null ? void 0 : y.toLowerCase()) === l || ((g = m.name) == null ? void 0 : g.toLowerCase()) === l, w = b || i === null || ((c = m.value) == null ? void 0 : c.toString()) === i;
|
|
140
|
+
if (x && w) return m;
|
|
141
|
+
} else if (((p = m.code) == null ? void 0 : p.toLowerCase()) === o.toLowerCase() || ((d = m.name) == null ? void 0 : d.toLowerCase()) === o.toLowerCase())
|
|
142
|
+
return m;
|
|
143
143
|
}
|
|
144
144
|
return null;
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function Yt(t, e, n, o, a) {
|
|
147
147
|
if (!t || !e.includes(o) || !t.has(n)) return !1;
|
|
148
|
-
const
|
|
149
|
-
return gt(
|
|
148
|
+
const r = (t.get(n) ?? [])[0];
|
|
149
|
+
return gt(r, o, a) === null;
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function Vt(t, e) {
|
|
152
152
|
return t.map((n) => {
|
|
153
|
-
var
|
|
153
|
+
var r, l, i;
|
|
154
154
|
const o = (e.get(n.eventId) ?? [])[0], a = gt(o, n.marketId, n.id);
|
|
155
155
|
return a ? {
|
|
156
156
|
...n,
|
|
@@ -158,141 +158,141 @@ function Yt(t, e) {
|
|
|
158
158
|
movement: a.movement === "UP" || a.movement === "DOWN" ? a.movement : void 0,
|
|
159
159
|
// providerInfo.selectionId is the operator's own id, which is what the CTA
|
|
160
160
|
// deep link needs. selection.id is only the outcome code ("1") now.
|
|
161
|
-
selectionId: ((
|
|
162
|
-
selectionUrl: ((
|
|
161
|
+
selectionId: ((r = a.providerInfo) == null ? void 0 : r.selectionId) ?? a.id ?? void 0,
|
|
162
|
+
selectionUrl: ((i = (l = a.urls) == null ? void 0 : l[0]) == null ? void 0 : i.url) ?? void 0
|
|
163
163
|
} : n;
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
|
-
function
|
|
167
|
-
const { operatorId: a, affiliateId:
|
|
168
|
-
if (!t ||
|
|
169
|
-
const
|
|
170
|
-
...new Set(
|
|
171
|
-
],
|
|
172
|
-
marketTypes:
|
|
166
|
+
function Gt(t, e, n, o = {}) {
|
|
167
|
+
const { operatorId: a, affiliateId: r } = o, [l, i] = I(null), [u, y] = I([]), [g, c] = I(!1), p = V(null), d = async (h) => {
|
|
168
|
+
if (!t || h.length === 0) return;
|
|
169
|
+
const f = [...new Set(h.map((x) => x.eventId))], b = [
|
|
170
|
+
...new Set(h.map((x) => x.market))
|
|
171
|
+
], m = new Bt({
|
|
172
|
+
marketTypes: b,
|
|
173
173
|
...a ? { operators: [a] } : {},
|
|
174
|
-
...
|
|
174
|
+
...r ? { affiliateId: r } : {}
|
|
175
175
|
});
|
|
176
176
|
c(!0);
|
|
177
177
|
try {
|
|
178
|
-
const x = await t.odds.getByMatchIds(
|
|
179
|
-
|
|
178
|
+
const x = await t.odds.getByMatchIds(f, m);
|
|
179
|
+
i(x), y(b);
|
|
180
180
|
} catch {
|
|
181
181
|
} finally {
|
|
182
182
|
c(!1);
|
|
183
183
|
}
|
|
184
184
|
};
|
|
185
|
-
return
|
|
185
|
+
return T(() => (d(e), p.current && clearInterval(p.current), t && n > 0 && e.length > 0 && (p.current = setInterval(() => d(e), n)), () => {
|
|
186
186
|
p.current && clearInterval(p.current);
|
|
187
|
-
}), [JSON.stringify(e), n, a,
|
|
187
|
+
}), [JSON.stringify(e), n, a, r]), { oddsMap: l, oddsLoading: g, oddsMarkets: u };
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function Xt(t) {
|
|
190
190
|
var e, n, o;
|
|
191
191
|
for (const a of t.values()) {
|
|
192
|
-
const
|
|
193
|
-
if (!
|
|
194
|
-
const l = (o = (n = (e =
|
|
192
|
+
const r = a[0];
|
|
193
|
+
if (!r) continue;
|
|
194
|
+
const l = (o = (n = (e = r.bookmaker) == null ? void 0 : e.assets) == null ? void 0 : n[0]) == null ? void 0 : o.transparentBackgroundUrl;
|
|
195
195
|
if (l) return l;
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function Kt(t, e) {
|
|
199
199
|
var o;
|
|
200
200
|
const n = e ? "mobile" : "desktop";
|
|
201
201
|
for (const a of t.values()) {
|
|
202
|
-
const
|
|
203
|
-
if (!
|
|
204
|
-
const l = ((o =
|
|
205
|
-
if (
|
|
202
|
+
const r = a[0];
|
|
203
|
+
if (!r) continue;
|
|
204
|
+
const l = ((o = r.bookmaker) == null ? void 0 : o.links) ?? [], i = l.find((u) => u.appType === n) ?? l[0];
|
|
205
|
+
if (i != null && i.homepageUrl) return i.homepageUrl;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function Jt(t, e) {
|
|
209
209
|
var o, a;
|
|
210
210
|
const n = e ? "mobile" : "desktop";
|
|
211
|
-
for (const
|
|
212
|
-
const l = ((a = (o =
|
|
213
|
-
if (
|
|
211
|
+
for (const r of t.values()) {
|
|
212
|
+
const l = ((a = (o = r[0]) == null ? void 0 : o.bookmaker) == null ? void 0 : a.betslipUrlTemplate) ?? [], i = l.find((u) => u.appType === n) ?? l[0];
|
|
213
|
+
if (i != null && i.url) return i.url;
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function qt(t) {
|
|
217
217
|
var e, n;
|
|
218
218
|
for (const o of t.values()) {
|
|
219
219
|
const a = (n = (e = o[0]) == null ? void 0 : e.bookmaker) == null ? void 0 : n.betslipIdSeparator;
|
|
220
220
|
if (a) return a;
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
var e, n, o, a,
|
|
223
|
+
function Qt(t) {
|
|
224
|
+
var e, n, o, a, r;
|
|
225
225
|
for (const l of t.values()) {
|
|
226
|
-
const
|
|
227
|
-
if (!
|
|
228
|
-
const
|
|
229
|
-
if (
|
|
226
|
+
const i = l[0];
|
|
227
|
+
if (!i) continue;
|
|
228
|
+
const u = ((n = (e = i.bookmaker) == null ? void 0 : e.branding) == null ? void 0 : n.backgroundColor) ?? ((r = (a = (o = i.bookmaker) == null ? void 0 : o.assets) == null ? void 0 : a[0]) == null ? void 0 : r.backgroundColor);
|
|
229
|
+
if (u) return u;
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
|
-
const
|
|
232
|
+
const bt = Rt(null), Zt = ({
|
|
233
233
|
labels: t = {},
|
|
234
234
|
initialSelections: e = [],
|
|
235
235
|
maxSelections: n,
|
|
236
236
|
currency: o = "€",
|
|
237
237
|
stakePresets: a = [5, 10, 20],
|
|
238
|
-
ctaUrlTemplate:
|
|
238
|
+
ctaUrlTemplate: r,
|
|
239
239
|
onExternalRemove: l,
|
|
240
|
-
sharedOddsMap:
|
|
241
|
-
children:
|
|
240
|
+
sharedOddsMap: i,
|
|
241
|
+
children: u
|
|
242
242
|
}) => {
|
|
243
|
-
const { t:
|
|
244
|
-
|
|
243
|
+
const { t: y } = E(), [g, c] = I(e), [p, d] = I(""), [h, f] = I(!0), b = _t(), m = JSON.stringify(e);
|
|
244
|
+
T(() => {
|
|
245
245
|
c(e);
|
|
246
|
-
}, [
|
|
247
|
-
const
|
|
248
|
-
if (!
|
|
249
|
-
const R =
|
|
246
|
+
}, [m]);
|
|
247
|
+
const x = tt(() => {
|
|
248
|
+
if (!i) return !1;
|
|
249
|
+
const R = i.values().next().value;
|
|
250
250
|
return Array.isArray(R) && R[0] !== void 0;
|
|
251
|
-
}, [
|
|
252
|
-
const R =
|
|
253
|
-
return
|
|
254
|
-
}, [
|
|
251
|
+
}, [i]), w = tt(() => {
|
|
252
|
+
const R = Ht(g, y, t.outcomeLabels);
|
|
253
|
+
return i ? Vt(R, i) : R;
|
|
254
|
+
}, [g, i, y, t.outcomeLabels]), C = i ? Xt(i) : void 0, v = i ? Kt(i, b) : void 0, $ = i ? Qt(i) : void 0, P = i ? Jt(i, b) : void 0, N = i ? qt(i) : void 0, M = J(
|
|
255
255
|
(R) => {
|
|
256
256
|
c(
|
|
257
|
-
(
|
|
257
|
+
(j) => j.filter((z) => `${z.eventId}:${z.market}:${z.outcome}` !== R)
|
|
258
258
|
), l == null || l(R);
|
|
259
259
|
},
|
|
260
260
|
[l]
|
|
261
261
|
);
|
|
262
262
|
return /* @__PURE__ */ s(
|
|
263
|
-
|
|
263
|
+
bt.Provider,
|
|
264
264
|
{
|
|
265
265
|
value: {
|
|
266
266
|
labels: t,
|
|
267
|
-
selectionInputs:
|
|
268
|
-
selections:
|
|
267
|
+
selectionInputs: g,
|
|
268
|
+
selections: w,
|
|
269
269
|
combStake: p,
|
|
270
|
-
open:
|
|
270
|
+
open: h,
|
|
271
271
|
oddsLoading: !1,
|
|
272
|
-
oddsReady:
|
|
272
|
+
oddsReady: x,
|
|
273
273
|
currency: o,
|
|
274
274
|
stakePresets: a,
|
|
275
|
-
ctaUrlTemplate:
|
|
275
|
+
ctaUrlTemplate: r,
|
|
276
276
|
maxSelections: n,
|
|
277
|
-
bookmakerLogoUrl:
|
|
278
|
-
bookmakerHomepageUrl:
|
|
279
|
-
bookmakerBackgroundColor:
|
|
280
|
-
bookmakerBetslipTemplate:
|
|
281
|
-
bookmakerIdSeparator:
|
|
282
|
-
onRemove:
|
|
277
|
+
bookmakerLogoUrl: C,
|
|
278
|
+
bookmakerHomepageUrl: v,
|
|
279
|
+
bookmakerBackgroundColor: $,
|
|
280
|
+
bookmakerBetslipTemplate: P,
|
|
281
|
+
bookmakerIdSeparator: N,
|
|
282
|
+
onRemove: M,
|
|
283
283
|
setCombStake: d,
|
|
284
|
-
setOpen:
|
|
284
|
+
setOpen: f
|
|
285
285
|
},
|
|
286
|
-
children:
|
|
286
|
+
children: u
|
|
287
287
|
}
|
|
288
288
|
);
|
|
289
|
-
},
|
|
290
|
-
const t =
|
|
289
|
+
}, L = () => {
|
|
290
|
+
const t = kt(bt);
|
|
291
291
|
if (!t) throw new Error("useBetslip must be used within BetslipProvider");
|
|
292
292
|
return t;
|
|
293
293
|
};
|
|
294
|
-
function
|
|
295
|
-
const e =
|
|
294
|
+
function te(t) {
|
|
295
|
+
const e = It(), n = Et(), a = Lt() === "light";
|
|
296
296
|
return {
|
|
297
297
|
primary: t || e.palette.primary.plainColor,
|
|
298
298
|
primaryHover: e.palette.primary.primaryContainer || t || e.palette.primary.plainColor,
|
|
@@ -309,12 +309,12 @@ function Zt(t) {
|
|
|
309
309
|
font: n.primary
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
-
const
|
|
312
|
+
const D = {
|
|
313
313
|
primary: "var(--fu-ucrc-bs-primary)",
|
|
314
314
|
primaryHover: "var(--fu-ucrc-bs-primary-hover)",
|
|
315
315
|
s3: "var(--fu-ucrc-bs-s3)",
|
|
316
316
|
t3: "var(--fu-ucrc-bs-t3)"
|
|
317
|
-
},
|
|
317
|
+
}, ee = (t) => F.useMemo(
|
|
318
318
|
() => ({
|
|
319
319
|
"--fu-ucrc-bs-primary": t.primary,
|
|
320
320
|
"--fu-ucrc-bs-primary-hover": t.primaryHover,
|
|
@@ -328,7 +328,7 @@ const B = {
|
|
|
328
328
|
position: n,
|
|
329
329
|
brandingLogoUrl: o
|
|
330
330
|
}) => {
|
|
331
|
-
const { labels: a, selections:
|
|
331
|
+
const { labels: a, selections: r, open: l, setOpen: i, maxSelections: u, bookmakerLogoUrl: y } = L(), { t: g } = E(), c = A(), p = B(), f = e ? "0" : n === "bottom-right" || n === "bottom-left" ? `${p.md} ${p.md} 0 0` : n === "top-right" || n === "top-left" ? `0 0 ${p.md} ${p.md}` : "0", b = o || y, m = {
|
|
332
332
|
background: "none",
|
|
333
333
|
border: "none",
|
|
334
334
|
cursor: "pointer",
|
|
@@ -349,22 +349,22 @@ const B = {
|
|
|
349
349
|
paddingTop: c.sm,
|
|
350
350
|
paddingBottom: c.sm,
|
|
351
351
|
paddingInlineEnd: c.xs,
|
|
352
|
-
paddingInlineStart:
|
|
352
|
+
paddingInlineStart: b ? c["2xs"] : c.xs,
|
|
353
353
|
background: t.primary,
|
|
354
354
|
display: "flex",
|
|
355
355
|
alignItems: "center",
|
|
356
356
|
justifyContent: "space-between",
|
|
357
357
|
flexShrink: 0,
|
|
358
358
|
color: "#fff",
|
|
359
|
-
borderRadius:
|
|
359
|
+
borderRadius: f,
|
|
360
360
|
fontFamily: t.font
|
|
361
361
|
},
|
|
362
362
|
children: [
|
|
363
363
|
/* @__PURE__ */ S("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
364
|
-
|
|
364
|
+
b ? /* @__PURE__ */ s(
|
|
365
365
|
"img",
|
|
366
366
|
{
|
|
367
|
-
src:
|
|
367
|
+
src: b,
|
|
368
368
|
alt: "brand",
|
|
369
369
|
style: {
|
|
370
370
|
height: "24px",
|
|
@@ -386,22 +386,22 @@ const B = {
|
|
|
386
386
|
letterSpacing: "-0.5px",
|
|
387
387
|
color: "#fff"
|
|
388
388
|
},
|
|
389
|
-
children: a.title ||
|
|
389
|
+
children: a.title || g("betslip.title")
|
|
390
390
|
}
|
|
391
391
|
),
|
|
392
|
-
|
|
392
|
+
r.length > 0 && u != null && /* @__PURE__ */ S(
|
|
393
393
|
"span",
|
|
394
394
|
{
|
|
395
395
|
style: {
|
|
396
396
|
fontSize: "0.875em",
|
|
397
397
|
fontWeight: 600,
|
|
398
398
|
color: "#fff",
|
|
399
|
-
marginInlineStart:
|
|
399
|
+
marginInlineStart: b ? 0 : c.sm
|
|
400
400
|
},
|
|
401
401
|
children: [
|
|
402
|
-
|
|
402
|
+
r.length,
|
|
403
403
|
"/",
|
|
404
|
-
|
|
404
|
+
u
|
|
405
405
|
]
|
|
406
406
|
}
|
|
407
407
|
)
|
|
@@ -409,33 +409,33 @@ const B = {
|
|
|
409
409
|
!e && /* @__PURE__ */ s(
|
|
410
410
|
"button",
|
|
411
411
|
{
|
|
412
|
-
style:
|
|
413
|
-
onClick: () =>
|
|
412
|
+
style: m,
|
|
413
|
+
onClick: () => i(!l),
|
|
414
414
|
title: l ? "Collapse" : "Expand",
|
|
415
415
|
onMouseEnter: (x) => x.currentTarget.style.background = "rgba(255,255,255,.18)",
|
|
416
416
|
onMouseLeave: (x) => x.currentTarget.style.background = "none",
|
|
417
|
-
children: l ? /* @__PURE__ */ s(zt, { size: "1.125em" }) : /* @__PURE__ */ s(
|
|
417
|
+
children: l ? /* @__PURE__ */ s(zt, { size: "1.125em" }) : /* @__PURE__ */ s(Dt, { size: "1.125em" })
|
|
418
418
|
}
|
|
419
419
|
)
|
|
420
420
|
]
|
|
421
421
|
}
|
|
422
422
|
);
|
|
423
423
|
};
|
|
424
|
-
function
|
|
424
|
+
function yt(t) {
|
|
425
425
|
return t.filter((e) => e.status === "active" || !e.status).reduce((e, n) => e * n.odds, 1);
|
|
426
426
|
}
|
|
427
|
-
function
|
|
428
|
-
const a = e.map((
|
|
427
|
+
function ne(t, e, n, o = ",") {
|
|
428
|
+
const a = e.map((g) => g.selectionId).filter((g) => !!g), r = a.join(","), l = a.map(encodeURIComponent).join(o), i = e[0], u = encodeURIComponent(
|
|
429
429
|
typeof window < "u" ? window.location.href : ""
|
|
430
|
-
),
|
|
431
|
-
return t.replace(/\{betslip_ids\}/g, l).replace(/\{selectionIds\}/g, encodeURIComponent(
|
|
430
|
+
), y = String(n);
|
|
431
|
+
return t.replace(/\{betslip_ids\}/g, l).replace(/\{selectionIds\}/g, encodeURIComponent(r)).replace(/\{currentUrl\}/g, u).replace(/\{stake\}/g, y).replace(/\{eventId\}/g, (i == null ? void 0 : i.eventId) ?? "").replace(/\{oddsDecimal\}/g, i ? String(i.odds) : "").replace(/\{market\}/g, (i == null ? void 0 : i.marketId) ?? "").replace(/\{outcome\}/g, (i == null ? void 0 : i.name) ?? "");
|
|
432
432
|
}
|
|
433
|
-
const ot = (t) =>
|
|
433
|
+
const ot = (t) => k({
|
|
434
434
|
display: "flex",
|
|
435
435
|
alignItems: "center",
|
|
436
436
|
justifyContent: "center",
|
|
437
437
|
width: "100%",
|
|
438
|
-
background:
|
|
438
|
+
background: D.primary,
|
|
439
439
|
color: "#fff",
|
|
440
440
|
border: "none",
|
|
441
441
|
fontWeight: 600,
|
|
@@ -444,8 +444,8 @@ const ot = (t) => _({
|
|
|
444
444
|
cursor: t ? "not-allowed" : "pointer",
|
|
445
445
|
pointerEvents: t ? "none" : "auto",
|
|
446
446
|
opacity: t ? 0.4 : 1,
|
|
447
|
-
"&:hover": { background:
|
|
448
|
-
}), rt = { enabled: ot(!1), disabled: ot(!0) },
|
|
447
|
+
"&:hover": { background: D.primaryHover }
|
|
448
|
+
}), rt = { enabled: ot(!1), disabled: ot(!0) }, St = ({
|
|
449
449
|
tokens: t,
|
|
450
450
|
brandingLogoUrl: e
|
|
451
451
|
}) => {
|
|
@@ -453,24 +453,24 @@ const ot = (t) => _({
|
|
|
453
453
|
labels: n,
|
|
454
454
|
ctaUrlTemplate: o,
|
|
455
455
|
selections: a,
|
|
456
|
-
combStake:
|
|
456
|
+
combStake: r,
|
|
457
457
|
bookmakerLogoUrl: l,
|
|
458
|
-
bookmakerHomepageUrl:
|
|
459
|
-
bookmakerBetslipTemplate:
|
|
460
|
-
bookmakerIdSeparator:
|
|
461
|
-
} =
|
|
462
|
-
const
|
|
458
|
+
bookmakerHomepageUrl: i,
|
|
459
|
+
bookmakerBetslipTemplate: u,
|
|
460
|
+
bookmakerIdSeparator: y
|
|
461
|
+
} = L(), { t: g } = E(), c = e || l, p = A(), d = B(), h = n.continueLabel || g("betslip.continueLabel"), f = (() => {
|
|
462
|
+
const m = parseFloat(r) || 0, x = o || u;
|
|
463
463
|
if (x)
|
|
464
|
-
return
|
|
465
|
-
if (
|
|
466
|
-
})(),
|
|
464
|
+
return ne(x, a, m, y);
|
|
465
|
+
if (i) return i;
|
|
466
|
+
})(), b = !f;
|
|
467
467
|
return /* @__PURE__ */ s("div", { children: /* @__PURE__ */ S(
|
|
468
468
|
"a",
|
|
469
469
|
{
|
|
470
|
-
href:
|
|
471
|
-
target:
|
|
472
|
-
rel:
|
|
473
|
-
css:
|
|
470
|
+
href: b ? void 0 : f,
|
|
471
|
+
target: f ? "_blank" : void 0,
|
|
472
|
+
rel: f ? "noopener noreferrer" : void 0,
|
|
473
|
+
css: b ? rt.disabled : rt.enabled,
|
|
474
474
|
style: {
|
|
475
475
|
padding: `${p.xs} ${p.md}`,
|
|
476
476
|
borderRadius: d.full,
|
|
@@ -478,7 +478,7 @@ const ot = (t) => _({
|
|
|
478
478
|
fontFamily: t.font
|
|
479
479
|
},
|
|
480
480
|
children: [
|
|
481
|
-
/* @__PURE__ */ s("span", { children:
|
|
481
|
+
/* @__PURE__ */ s("span", { children: h }),
|
|
482
482
|
c && /* @__PURE__ */ s(
|
|
483
483
|
"img",
|
|
484
484
|
{
|
|
@@ -499,15 +499,15 @@ const ot = (t) => _({
|
|
|
499
499
|
}
|
|
500
500
|
) });
|
|
501
501
|
}, it = ({ color: t }) => {
|
|
502
|
-
const e =
|
|
502
|
+
const e = q();
|
|
503
503
|
return /* @__PURE__ */ s("div", { style: { borderBottom: `${e.size} solid ${t}` } });
|
|
504
|
-
},
|
|
504
|
+
}, oe = ({
|
|
505
505
|
tokens: t,
|
|
506
506
|
brandingLogoUrl: e
|
|
507
507
|
}) => {
|
|
508
|
-
const { labels: n, selections: o, combStake: a, currency:
|
|
508
|
+
const { labels: n, selections: o, combStake: a, currency: r } = L(), { t: l } = E(), i = A(), u = o.filter(
|
|
509
509
|
(d) => d.status === "active" || !d.status
|
|
510
|
-
),
|
|
510
|
+
), y = yt(u), g = parseFloat(a) || 0, c = g * y, p = {
|
|
511
511
|
display: "flex",
|
|
512
512
|
justifyContent: "space-between",
|
|
513
513
|
alignItems: "center",
|
|
@@ -518,7 +518,7 @@ const ot = (t) => _({
|
|
|
518
518
|
{
|
|
519
519
|
style: {
|
|
520
520
|
background: t.s1,
|
|
521
|
-
padding: `10px 14px ${
|
|
521
|
+
padding: `10px 14px ${i.sm}`,
|
|
522
522
|
fontFamily: t.font
|
|
523
523
|
},
|
|
524
524
|
children: [
|
|
@@ -537,7 +537,7 @@ const ot = (t) => _({
|
|
|
537
537
|
},
|
|
538
538
|
children: [
|
|
539
539
|
/* @__PURE__ */ s("span", { style: { fontSize: "0.5em", color: t.ok }, children: "▲" }),
|
|
540
|
-
|
|
540
|
+
y.toFixed(2)
|
|
541
541
|
]
|
|
542
542
|
}
|
|
543
543
|
)
|
|
@@ -545,7 +545,7 @@ const ot = (t) => _({
|
|
|
545
545
|
/* @__PURE__ */ s(it, { color: t.bdr }),
|
|
546
546
|
/* @__PURE__ */ S("div", { style: p, children: [
|
|
547
547
|
/* @__PURE__ */ s("span", { style: { fontSize: "0.8125em", fontWeight: 700, color: t.t1 }, children: n.totalStakeLabel || l("betslip.totalStakeLabel") }),
|
|
548
|
-
/* @__PURE__ */ s("span", { style: { fontSize: "0.8125em", fontWeight: 700, color: t.t1 }, children:
|
|
548
|
+
/* @__PURE__ */ s("span", { style: { fontSize: "0.8125em", fontWeight: 700, color: t.t1 }, children: g > 0 ? `${g.toFixed(2)}${r}` : "—" })
|
|
549
549
|
] }),
|
|
550
550
|
/* @__PURE__ */ s(it, { color: t.bdr }),
|
|
551
551
|
/* @__PURE__ */ S("div", { style: { ...p, borderBottom: "none", marginBottom: 10 }, children: [
|
|
@@ -563,7 +563,7 @@ const ot = (t) => _({
|
|
|
563
563
|
)
|
|
564
564
|
] }),
|
|
565
565
|
/* @__PURE__ */ s(
|
|
566
|
-
|
|
566
|
+
St,
|
|
567
567
|
{
|
|
568
568
|
tokens: t,
|
|
569
569
|
brandingLogoUrl: e
|
|
@@ -573,55 +573,57 @@ const ot = (t) => _({
|
|
|
573
573
|
}
|
|
574
574
|
);
|
|
575
575
|
};
|
|
576
|
-
function
|
|
576
|
+
function re(t, e, n) {
|
|
577
577
|
if (n != null && n[t]) return n[t];
|
|
578
578
|
const o = `betslip.markets.${t}`, a = e(o);
|
|
579
579
|
if (a !== o) return a;
|
|
580
|
-
const
|
|
581
|
-
if (
|
|
582
|
-
const l =
|
|
583
|
-
if (
|
|
580
|
+
const r = t.match(/^(OVER|UNDER)_(GOALS|CORNERS)_(\d+)_(\d+)$/i);
|
|
581
|
+
if (r) {
|
|
582
|
+
const l = r[2].charAt(0) + r[2].slice(1).toLowerCase(), i = `betslip.markets.${r[1].toUpperCase() === "OVER" ? "over" : "under"}${l}`, u = `${r[3]}.${r[4]}`, y = e(i, { line: u });
|
|
583
|
+
if (y !== i) return y;
|
|
584
584
|
}
|
|
585
585
|
return t.replace(/_/g, " ").toLowerCase().replace(/\b\w/g, (l) => l.toUpperCase());
|
|
586
586
|
}
|
|
587
|
-
const
|
|
587
|
+
const ie = H`
|
|
588
588
|
from { opacity: 0; transform: translateX(8px); }
|
|
589
589
|
to { opacity: 1; transform: translateX(0); }
|
|
590
|
-
`,
|
|
590
|
+
`, ae = H`
|
|
591
591
|
from { transform: rotate(0deg); }
|
|
592
592
|
to { transform: rotate(360deg); }
|
|
593
|
-
`,
|
|
593
|
+
`, se = () => /* @__PURE__ */ s("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ s("path", { d: "M7 4a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v1h3a1 1 0 1 1 0 2h-1l-1.4 13.2A2 2 0 0 1 16.6 22H7.4a2 2 0 0 1-2-1.8L4 7H3a1 1 0 1 1 0-2h3V4zm2 0v1h6V4H9zm-3 3 1.4 12h9.2L18 7H6zm4 2a1 1 0 0 1 1 1v7a1 1 0 1 1-2 0v-7a1 1 0 0 1 1-1zm4 0a1 1 0 0 1 1 1v7a1 1 0 1 1-2 0v-7a1 1 0 0 1 1-1z" }) }), le = H`
|
|
594
594
|
0%, 100% { opacity: 1; }
|
|
595
595
|
50% { opacity: 0.2; }
|
|
596
|
-
`,
|
|
597
|
-
card:
|
|
598
|
-
|
|
596
|
+
`, _ = {
|
|
597
|
+
card: k({ animation: `${ie} 0.18s ease` }),
|
|
598
|
+
// Selection, market, team and competition names from the API or client config.
|
|
599
|
+
cms: k({ unicodeBidi: "plaintext" }),
|
|
600
|
+
spinner: k({
|
|
599
601
|
width: "12px",
|
|
600
602
|
height: "12px",
|
|
601
603
|
borderRadius: "50%",
|
|
602
604
|
border: "2px solid transparent",
|
|
603
|
-
borderTopColor:
|
|
604
|
-
animation: `${
|
|
605
|
+
borderTopColor: D.t3,
|
|
606
|
+
animation: `${ae} 0.7s linear infinite`,
|
|
605
607
|
flexShrink: 0
|
|
606
608
|
}),
|
|
607
|
-
pulseDot:
|
|
609
|
+
pulseDot: k({
|
|
608
610
|
width: "5px",
|
|
609
611
|
height: "5px",
|
|
610
612
|
borderRadius: "50%",
|
|
611
613
|
background: "#fff",
|
|
612
614
|
flexShrink: 0,
|
|
613
|
-
animation: `${
|
|
615
|
+
animation: `${le} 1s ease-in-out infinite`
|
|
614
616
|
})
|
|
615
617
|
};
|
|
616
|
-
function
|
|
618
|
+
function ce(t, e, n) {
|
|
617
619
|
if (!t) return "";
|
|
618
620
|
const o = new Date(t);
|
|
619
621
|
if (isNaN(o.getTime())) return "";
|
|
620
|
-
const a = /* @__PURE__ */ new Date(),
|
|
622
|
+
const a = /* @__PURE__ */ new Date(), r = a.toDateString(), l = new Date(a.getTime() + 864e5).toDateString(), i = o.toLocaleTimeString(et(e), {
|
|
621
623
|
hour: "2-digit",
|
|
622
624
|
minute: "2-digit"
|
|
623
625
|
});
|
|
624
|
-
return o.toDateString() ===
|
|
626
|
+
return o.toDateString() === r ? `${n("betslip.today")} ${i}` : o.toDateString() === l ? `${n("betslip.tomorrow")} ${i}` : `${o.toLocaleDateString(et(e), { month: "short", day: "numeric" })} ${i}`;
|
|
625
627
|
}
|
|
626
628
|
const at = ({
|
|
627
629
|
logo: t,
|
|
@@ -634,14 +636,13 @@ const at = ({
|
|
|
634
636
|
style: {
|
|
635
637
|
width: o,
|
|
636
638
|
height: o,
|
|
637
|
-
borderRadius: "50%",
|
|
638
|
-
background: n.s2,
|
|
639
639
|
flexShrink: 0,
|
|
640
640
|
display: "flex",
|
|
641
641
|
alignItems: "center",
|
|
642
642
|
justifyContent: "center",
|
|
643
643
|
fontSize: o * 0.55,
|
|
644
|
-
|
|
644
|
+
// A crest shows in its own shape; only the initial fallback sits on a disc.
|
|
645
|
+
...!t && { borderRadius: "50%", background: n.s2, overflow: "hidden" }
|
|
645
646
|
},
|
|
646
647
|
children: t ? /* @__PURE__ */ s(
|
|
647
648
|
"img",
|
|
@@ -652,7 +653,7 @@ const at = ({
|
|
|
652
653
|
}
|
|
653
654
|
) : /* @__PURE__ */ s("span", { style: { color: n.t2, fontWeight: 700 }, children: e.charAt(0) })
|
|
654
655
|
}
|
|
655
|
-
),
|
|
656
|
+
), de = ({ avatar: t, name: e, tokens: n }) => /* @__PURE__ */ s(
|
|
656
657
|
"div",
|
|
657
658
|
{
|
|
658
659
|
style: {
|
|
@@ -677,71 +678,87 @@ const at = ({
|
|
|
677
678
|
}
|
|
678
679
|
) : /* @__PURE__ */ s("span", { style: { color: n.t2 }, children: e.charAt(0) })
|
|
679
680
|
}
|
|
680
|
-
),
|
|
681
|
-
const
|
|
681
|
+
), st = ({ name: t }) => {
|
|
682
|
+
const e = A(), n = B();
|
|
683
|
+
return /* @__PURE__ */ s(
|
|
684
|
+
"div",
|
|
685
|
+
{
|
|
686
|
+
style: {
|
|
687
|
+
position: "absolute",
|
|
688
|
+
top: "calc(100% + 5px)",
|
|
689
|
+
insetInlineEnd: 0,
|
|
690
|
+
background: "#1e293b",
|
|
691
|
+
color: "#fff",
|
|
692
|
+
fontSize: "0.6875em",
|
|
693
|
+
fontWeight: 500,
|
|
694
|
+
padding: `${e["2xs"]} ${e.xs}`,
|
|
695
|
+
borderRadius: n.xs,
|
|
696
|
+
// max-content, or it would wrap to the 20px logo wrapper's width.
|
|
697
|
+
width: "max-content",
|
|
698
|
+
maxWidth: "16em",
|
|
699
|
+
zIndex: 10,
|
|
700
|
+
pointerEvents: "none",
|
|
701
|
+
boxShadow: "0 2px 8px rgba(0,0,0,.25)"
|
|
702
|
+
},
|
|
703
|
+
css: _.cms,
|
|
704
|
+
children: t
|
|
705
|
+
}
|
|
706
|
+
);
|
|
707
|
+
}, pe = ({ name: t, logo: e, tokens: n }) => {
|
|
708
|
+
const [o, a] = F.useState(!1), r = F.useRef(null);
|
|
682
709
|
return e ? /* @__PURE__ */ S(
|
|
683
710
|
"div",
|
|
684
711
|
{
|
|
685
712
|
style: { position: "relative", display: "inline-flex" },
|
|
686
|
-
onMouseEnter: () =>
|
|
687
|
-
onMouseLeave: () =>
|
|
713
|
+
onMouseEnter: () => a(!0),
|
|
714
|
+
onMouseLeave: () => a(!1),
|
|
688
715
|
children: [
|
|
689
|
-
/* @__PURE__ */ s(
|
|
690
|
-
"
|
|
716
|
+
/* @__PURE__ */ s("div", { style: { width: 20, height: 20, flexShrink: 0 }, children: /* @__PURE__ */ s(
|
|
717
|
+
"img",
|
|
691
718
|
{
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
borderRadius: "50%",
|
|
696
|
-
overflow: "hidden",
|
|
697
|
-
background: n.s2,
|
|
698
|
-
flexShrink: 0
|
|
699
|
-
},
|
|
700
|
-
children: /* @__PURE__ */ s(
|
|
701
|
-
"img",
|
|
702
|
-
{
|
|
703
|
-
src: e,
|
|
704
|
-
alt: t,
|
|
705
|
-
style: { width: "100%", height: "100%", objectFit: "contain" }
|
|
706
|
-
}
|
|
707
|
-
)
|
|
719
|
+
src: e,
|
|
720
|
+
alt: t,
|
|
721
|
+
style: { width: "100%", height: "100%", objectFit: "contain" }
|
|
708
722
|
}
|
|
709
|
-
),
|
|
710
|
-
|
|
711
|
-
|
|
723
|
+
) }),
|
|
724
|
+
o && /* @__PURE__ */ s(st, { name: t })
|
|
725
|
+
]
|
|
726
|
+
}
|
|
727
|
+
) : /* @__PURE__ */ S(
|
|
728
|
+
"div",
|
|
729
|
+
{
|
|
730
|
+
style: { position: "relative", maxWidth: "100%", minWidth: 0 },
|
|
731
|
+
onMouseEnter: () => {
|
|
732
|
+
const l = r.current;
|
|
733
|
+
a(!!l && l.scrollWidth > l.clientWidth);
|
|
734
|
+
},
|
|
735
|
+
onMouseLeave: () => a(!1),
|
|
736
|
+
children: [
|
|
737
|
+
/* @__PURE__ */ s(
|
|
738
|
+
"span",
|
|
712
739
|
{
|
|
740
|
+
ref: r,
|
|
713
741
|
style: {
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
background: "#1e293b",
|
|
718
|
-
color: "#fff",
|
|
719
|
-
fontSize: "0.6875em",
|
|
720
|
-
fontWeight: 500,
|
|
721
|
-
padding: `${o["2xs"]} ${o.xs}`,
|
|
722
|
-
borderRadius: a.xs,
|
|
742
|
+
display: "block",
|
|
743
|
+
fontSize: "0.625em",
|
|
744
|
+
color: n.t3,
|
|
723
745
|
whiteSpace: "nowrap",
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
boxShadow: "0 2px 8px rgba(0,0,0,.25)"
|
|
746
|
+
overflow: "hidden",
|
|
747
|
+
textOverflow: "ellipsis"
|
|
727
748
|
},
|
|
749
|
+
css: _.cms,
|
|
728
750
|
children: t
|
|
729
751
|
}
|
|
730
|
-
)
|
|
752
|
+
),
|
|
753
|
+
o && /* @__PURE__ */ s(st, { name: t })
|
|
731
754
|
]
|
|
732
755
|
}
|
|
733
|
-
) : /* @__PURE__ */ s(
|
|
734
|
-
"span",
|
|
735
|
-
{
|
|
736
|
-
style: { fontSize: "0.625em", color: n.t3, whiteSpace: "nowrap" },
|
|
737
|
-
children: t
|
|
738
|
-
}
|
|
739
756
|
);
|
|
740
|
-
},
|
|
757
|
+
}, lt = ({
|
|
741
758
|
score: t,
|
|
742
759
|
tokens: e
|
|
743
760
|
}) => {
|
|
744
|
-
const n =
|
|
761
|
+
const n = A(), o = B();
|
|
745
762
|
return /* @__PURE__ */ s(
|
|
746
763
|
"span",
|
|
747
764
|
{
|
|
@@ -762,15 +779,15 @@ const at = ({
|
|
|
762
779
|
children: t
|
|
763
780
|
}
|
|
764
781
|
);
|
|
765
|
-
},
|
|
782
|
+
}, me = ({
|
|
766
783
|
sel: t,
|
|
767
784
|
tokens: e
|
|
768
785
|
}) => {
|
|
769
|
-
const { labels: n, oddsLoading: o } =
|
|
770
|
-
return
|
|
786
|
+
const { labels: n, oddsLoading: o } = L(), { t: a } = E(), { status: r, odds: l, movement: i } = t;
|
|
787
|
+
return r === "settled_won" ? /* @__PURE__ */ S("span", { style: { color: e.ok, fontSize: "0.8125em", fontWeight: 700 }, children: [
|
|
771
788
|
"✓ ",
|
|
772
789
|
a("betslip.settledWon")
|
|
773
|
-
] }) :
|
|
790
|
+
] }) : r === "settled_lost" ? /* @__PURE__ */ S(
|
|
774
791
|
"span",
|
|
775
792
|
{
|
|
776
793
|
style: { color: e.bad, fontSize: "0.8125em", fontWeight: 700 },
|
|
@@ -779,26 +796,26 @@ const at = ({
|
|
|
779
796
|
a("betslip.settledLost")
|
|
780
797
|
]
|
|
781
798
|
}
|
|
782
|
-
) :
|
|
783
|
-
|
|
799
|
+
) : r === "settled_void" ? /* @__PURE__ */ s("span", { style: { fontSize: "0.8125em", fontWeight: 700, color: e.t3 }, children: a("betslip.settledVoid") }) : r === "suspended" ? /* @__PURE__ */ s("span", { style: { fontSize: "0.75em", fontWeight: 600, color: e.warn }, children: n.suspendedLabel || a("betslip.suspendedLabel") }) : o ? /* @__PURE__ */ s("div", { css: _.spinner }) : l === 0 ? /* @__PURE__ */ s("span", { style: { fontSize: "0.8125em", fontWeight: 600, color: e.t3 }, children: n.oddsUnavailableLabel || a("betslip.oddsUnavailableLabel") }) : /* @__PURE__ */ S("div", { style: { display: "flex", alignItems: "center", gap: 3 }, children: [
|
|
800
|
+
i && /* @__PURE__ */ s(
|
|
784
801
|
"span",
|
|
785
802
|
{
|
|
786
803
|
style: {
|
|
787
804
|
fontSize: "0.5625em",
|
|
788
|
-
color:
|
|
805
|
+
color: i === "UP" ? e.ok : e.bad,
|
|
789
806
|
lineHeight: 1
|
|
790
807
|
},
|
|
791
|
-
children:
|
|
808
|
+
children: i === "UP" ? "▲" : "▼"
|
|
792
809
|
}
|
|
793
810
|
),
|
|
794
811
|
/* @__PURE__ */ s("span", { style: { fontSize: "0.875em", fontWeight: 700, color: e.t1 }, children: l.toFixed(2) })
|
|
795
812
|
] });
|
|
796
813
|
}, ue = ({ sel: t, tokens: e }) => {
|
|
797
|
-
const { onRemove: n, labels: o } =
|
|
814
|
+
const { onRemove: n, labels: o } = L(), { t: a, i18n: r } = E(), l = A(), i = B(), [u, y] = F.useState(!1), g = ce(t.startAt, r.language, a), c = t.marketId === "CORRECT_SCORE" || t.marketId === "CORRECT_SCORE_ADVANCED" || t.marketId === "CORRECT_SCORE_HT", p = c && t.outcome ? t.outcome.split(/[-:]/) : null, d = p == null ? void 0 : p[0], h = p == null ? void 0 : p[1], f = t.matchStatus === "inprogress" || !!g || !!t.competition;
|
|
798
815
|
return /* @__PURE__ */ S(
|
|
799
816
|
"div",
|
|
800
817
|
{
|
|
801
|
-
css:
|
|
818
|
+
css: _.card,
|
|
802
819
|
style: {
|
|
803
820
|
fontFamily: e.font,
|
|
804
821
|
padding: "14px 12px"
|
|
@@ -817,7 +834,7 @@ const at = ({
|
|
|
817
834
|
children: [
|
|
818
835
|
/* @__PURE__ */ S("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
|
|
819
836
|
t.athlete && /* @__PURE__ */ s(
|
|
820
|
-
|
|
837
|
+
de,
|
|
821
838
|
{
|
|
822
839
|
avatar: t.athlete.avatar,
|
|
823
840
|
name: t.athlete.name,
|
|
@@ -832,6 +849,7 @@ const at = ({
|
|
|
832
849
|
fontWeight: 700,
|
|
833
850
|
color: e.t1
|
|
834
851
|
},
|
|
852
|
+
css: _.cms,
|
|
835
853
|
children: t.name
|
|
836
854
|
}
|
|
837
855
|
)
|
|
@@ -846,28 +864,28 @@ const at = ({
|
|
|
846
864
|
flexShrink: 0
|
|
847
865
|
},
|
|
848
866
|
children: [
|
|
849
|
-
/* @__PURE__ */ s(
|
|
867
|
+
/* @__PURE__ */ s(me, { sel: t, tokens: e }),
|
|
850
868
|
/* @__PURE__ */ s(
|
|
851
869
|
"button",
|
|
852
870
|
{
|
|
853
871
|
onClick: () => n(t.id),
|
|
854
|
-
onMouseEnter: () =>
|
|
855
|
-
onMouseLeave: () =>
|
|
872
|
+
onMouseEnter: () => y(!0),
|
|
873
|
+
onMouseLeave: () => y(!1),
|
|
856
874
|
title: "Remove",
|
|
857
875
|
style: {
|
|
858
|
-
background:
|
|
876
|
+
background: u ? "rgba(239,68,68,.08)" : "none",
|
|
859
877
|
border: "none",
|
|
860
878
|
cursor: "pointer",
|
|
861
|
-
color:
|
|
879
|
+
color: u ? e.bad : e.t2,
|
|
862
880
|
fontSize: "0.8125em",
|
|
863
881
|
padding: "3px 5px",
|
|
864
|
-
borderRadius:
|
|
882
|
+
borderRadius: i.xs,
|
|
865
883
|
transition: "color .15s, background .15s",
|
|
866
884
|
lineHeight: 1,
|
|
867
885
|
display: "flex",
|
|
868
886
|
alignItems: "center"
|
|
869
887
|
},
|
|
870
|
-
children: /* @__PURE__ */ s(
|
|
888
|
+
children: /* @__PURE__ */ s(se, {})
|
|
871
889
|
}
|
|
872
890
|
)
|
|
873
891
|
]
|
|
@@ -884,7 +902,8 @@ const at = ({
|
|
|
884
902
|
color: e.t3,
|
|
885
903
|
marginBottom: 6
|
|
886
904
|
},
|
|
887
|
-
|
|
905
|
+
css: _.cms,
|
|
906
|
+
children: re(t.marketId, a, o.marketLabels)
|
|
888
907
|
}
|
|
889
908
|
),
|
|
890
909
|
/* @__PURE__ */ s(
|
|
@@ -892,7 +911,7 @@ const at = ({
|
|
|
892
911
|
{
|
|
893
912
|
style: {
|
|
894
913
|
background: e.s3,
|
|
895
|
-
borderRadius:
|
|
914
|
+
borderRadius: i.sm,
|
|
896
915
|
padding: "7px 10px",
|
|
897
916
|
marginTop: 6
|
|
898
917
|
},
|
|
@@ -909,7 +928,9 @@ const at = ({
|
|
|
909
928
|
"div",
|
|
910
929
|
{
|
|
911
930
|
style: {
|
|
912
|
-
|
|
931
|
+
// Teams keep their width; the competition truncates instead.
|
|
932
|
+
flex: f ? "0 0 auto" : "0 1 auto",
|
|
933
|
+
maxWidth: f ? "65%" : void 0,
|
|
913
934
|
minWidth: 0,
|
|
914
935
|
display: "flex",
|
|
915
936
|
alignItems: "center"
|
|
@@ -943,10 +964,11 @@ const at = ({
|
|
|
943
964
|
textOverflow: "ellipsis",
|
|
944
965
|
whiteSpace: "nowrap"
|
|
945
966
|
},
|
|
967
|
+
css: _.cms,
|
|
946
968
|
children: t.participantOne
|
|
947
969
|
}
|
|
948
970
|
),
|
|
949
|
-
c && (d !== void 0 ? /* @__PURE__ */ s(
|
|
971
|
+
c && (d !== void 0 ? /* @__PURE__ */ s(lt, { score: d, tokens: e }) : /* @__PURE__ */ s("span", {})),
|
|
950
972
|
t.participantTwo && /* @__PURE__ */ s(
|
|
951
973
|
at,
|
|
952
974
|
{
|
|
@@ -965,21 +987,23 @@ const at = ({
|
|
|
965
987
|
textOverflow: "ellipsis",
|
|
966
988
|
whiteSpace: "nowrap"
|
|
967
989
|
},
|
|
990
|
+
css: _.cms,
|
|
968
991
|
children: t.participantTwo
|
|
969
992
|
}
|
|
970
993
|
),
|
|
971
|
-
t.participantTwo && c && (
|
|
994
|
+
t.participantTwo && c && (h !== void 0 ? /* @__PURE__ */ s(lt, { score: h, tokens: e }) : /* @__PURE__ */ s("span", {}))
|
|
972
995
|
]
|
|
973
996
|
}
|
|
974
997
|
)
|
|
975
998
|
}
|
|
976
999
|
),
|
|
977
|
-
|
|
1000
|
+
f && /* @__PURE__ */ S(
|
|
978
1001
|
"div",
|
|
979
1002
|
{
|
|
980
1003
|
style: {
|
|
981
|
-
|
|
982
|
-
|
|
1004
|
+
marginInlineStart: "auto",
|
|
1005
|
+
flex: "1 1 0",
|
|
1006
|
+
minWidth: 0,
|
|
983
1007
|
display: "flex",
|
|
984
1008
|
flexDirection: "column",
|
|
985
1009
|
justifyContent: "space-between",
|
|
@@ -1005,11 +1029,11 @@ const at = ({
|
|
|
1005
1029
|
fontFamily: e.font
|
|
1006
1030
|
},
|
|
1007
1031
|
children: [
|
|
1008
|
-
/* @__PURE__ */ s("span", { css:
|
|
1032
|
+
/* @__PURE__ */ s("span", { css: _.pulseDot }),
|
|
1009
1033
|
a("betslip.live")
|
|
1010
1034
|
]
|
|
1011
1035
|
}
|
|
1012
|
-
) :
|
|
1036
|
+
) : g ? /* @__PURE__ */ s(
|
|
1013
1037
|
"span",
|
|
1014
1038
|
{
|
|
1015
1039
|
style: {
|
|
@@ -1017,11 +1041,11 @@ const at = ({
|
|
|
1017
1041
|
color: e.t3,
|
|
1018
1042
|
whiteSpace: "nowrap"
|
|
1019
1043
|
},
|
|
1020
|
-
children:
|
|
1044
|
+
children: g
|
|
1021
1045
|
}
|
|
1022
1046
|
) : null,
|
|
1023
1047
|
t.competition && /* @__PURE__ */ s(
|
|
1024
|
-
|
|
1048
|
+
pe,
|
|
1025
1049
|
{
|
|
1026
1050
|
name: t.competition.name,
|
|
1027
1051
|
logo: t.competition.logo,
|
|
@@ -1039,26 +1063,26 @@ const at = ({
|
|
|
1039
1063
|
]
|
|
1040
1064
|
}
|
|
1041
1065
|
);
|
|
1042
|
-
},
|
|
1043
|
-
scrollBody:
|
|
1066
|
+
}, fe = {
|
|
1067
|
+
scrollBody: k({
|
|
1044
1068
|
"&::-webkit-scrollbar": { width: "8px" },
|
|
1045
1069
|
"&::-webkit-scrollbar-track": { background: "transparent", margin: "6px 0" },
|
|
1046
1070
|
"&::-webkit-scrollbar-thumb": {
|
|
1047
|
-
background:
|
|
1071
|
+
background: D.s3,
|
|
1048
1072
|
borderRadius: "6px",
|
|
1049
1073
|
borderRight: "4px solid transparent",
|
|
1050
1074
|
backgroundClip: "padding-box"
|
|
1051
1075
|
}
|
|
1052
1076
|
})
|
|
1053
|
-
},
|
|
1077
|
+
}, ct = ({
|
|
1054
1078
|
tokens: t,
|
|
1055
1079
|
isSide: e
|
|
1056
1080
|
}) => {
|
|
1057
|
-
const { labels: n, selections: o } =
|
|
1081
|
+
const { labels: n, selections: o } = L(), { t: a } = E();
|
|
1058
1082
|
return /* @__PURE__ */ s(
|
|
1059
1083
|
"div",
|
|
1060
1084
|
{
|
|
1061
|
-
css:
|
|
1085
|
+
css: fe.scrollBody,
|
|
1062
1086
|
style: {
|
|
1063
1087
|
overflowY: "auto",
|
|
1064
1088
|
flex: 1,
|
|
@@ -1091,57 +1115,59 @@ const at = ({
|
|
|
1091
1115
|
/* @__PURE__ */ s("div", { style: { fontSize: "0.75em", color: t.t2, lineHeight: 1.5 }, children: n.emptyDescription || a("betslip.emptyDescription") })
|
|
1092
1116
|
]
|
|
1093
1117
|
}
|
|
1094
|
-
) : o.map((
|
|
1118
|
+
) : o.map((r) => /* @__PURE__ */ s(
|
|
1095
1119
|
ue,
|
|
1096
1120
|
{
|
|
1097
|
-
sel:
|
|
1121
|
+
sel: r,
|
|
1098
1122
|
tokens: t
|
|
1099
1123
|
},
|
|
1100
|
-
|
|
1124
|
+
r.id
|
|
1101
1125
|
))
|
|
1102
1126
|
}
|
|
1103
1127
|
);
|
|
1104
|
-
},
|
|
1105
|
-
background:
|
|
1128
|
+
}, he = 3, ge = 5, dt = (t) => k({
|
|
1129
|
+
background: D.primary,
|
|
1106
1130
|
color: "#fff",
|
|
1107
1131
|
border: "none",
|
|
1108
1132
|
width: t,
|
|
1109
1133
|
cursor: "pointer",
|
|
1110
1134
|
flexShrink: 0,
|
|
1111
|
-
"&:hover": { background:
|
|
1112
|
-
}),
|
|
1113
|
-
stakeInput:
|
|
1135
|
+
"&:hover": { background: D.primary, opacity: 0.88 }
|
|
1136
|
+
}), W = {
|
|
1137
|
+
stakeInput: k({
|
|
1114
1138
|
"&::-webkit-outer-spin-button, &::-webkit-inner-spin-button": {
|
|
1115
1139
|
WebkitAppearance: "none",
|
|
1116
1140
|
margin: 0
|
|
1117
1141
|
},
|
|
1118
1142
|
MozAppearance: "textfield"
|
|
1119
1143
|
}),
|
|
1120
|
-
preset:
|
|
1121
|
-
presetCell:
|
|
1122
|
-
presetGrid:
|
|
1123
|
-
|
|
1144
|
+
preset: dt("44px"),
|
|
1145
|
+
presetCell: dt("auto"),
|
|
1146
|
+
presetGrid: k({ display: "grid", gap: "6px", marginBottom: "10px" }),
|
|
1147
|
+
// Client config text.
|
|
1148
|
+
disclaimer: k({ unicodeBidi: "plaintext" })
|
|
1149
|
+
}, pt = ({ tokens: t, brandingLogoUrl: e }) => {
|
|
1124
1150
|
const {
|
|
1125
1151
|
labels: n,
|
|
1126
1152
|
selections: o,
|
|
1127
1153
|
combStake: a,
|
|
1128
|
-
setCombStake:
|
|
1154
|
+
setCombStake: r,
|
|
1129
1155
|
currency: l,
|
|
1130
|
-
stakePresets:
|
|
1131
|
-
} =
|
|
1156
|
+
stakePresets: i
|
|
1157
|
+
} = L(), { t: u } = E(), y = A(), g = B(), c = q(), p = o.filter(
|
|
1132
1158
|
(v) => v.status === "active" || !v.status
|
|
1133
|
-
), d =
|
|
1134
|
-
|
|
1135
|
-
},
|
|
1136
|
-
|
|
1137
|
-
), C =
|
|
1159
|
+
), d = yt(p), h = parseFloat(a) || 0, f = h * d, b = (v) => {
|
|
1160
|
+
r(String(v));
|
|
1161
|
+
}, m = F.useRef(null), x = i.length <= he, w = Math.ceil(
|
|
1162
|
+
i.length / Math.ceil(i.length / ge)
|
|
1163
|
+
), C = i.map((v) => /* @__PURE__ */ s(
|
|
1138
1164
|
"button",
|
|
1139
1165
|
{
|
|
1140
|
-
css: x ?
|
|
1141
|
-
onClick: () =>
|
|
1166
|
+
css: x ? W.preset : W.presetCell,
|
|
1167
|
+
onClick: () => b(v),
|
|
1142
1168
|
style: {
|
|
1143
1169
|
padding: "10px 0",
|
|
1144
|
-
borderRadius:
|
|
1170
|
+
borderRadius: g.sm,
|
|
1145
1171
|
fontSize: "0.8125em",
|
|
1146
1172
|
fontWeight: 700,
|
|
1147
1173
|
fontFamily: t.font,
|
|
@@ -1155,13 +1181,13 @@ const at = ({
|
|
|
1155
1181
|
"div",
|
|
1156
1182
|
{
|
|
1157
1183
|
style: {
|
|
1158
|
-
padding: `${
|
|
1184
|
+
padding: `${y.sm} 14px`,
|
|
1159
1185
|
flexShrink: 0,
|
|
1160
1186
|
borderTop: `${c.size} solid ${t.bdr}`,
|
|
1161
1187
|
background: t.s3,
|
|
1162
1188
|
fontFamily: t.font
|
|
1163
1189
|
},
|
|
1164
|
-
children: /* @__PURE__ */ S(
|
|
1190
|
+
children: /* @__PURE__ */ S(wt, { children: [
|
|
1165
1191
|
p.length > 0 && /* @__PURE__ */ S(
|
|
1166
1192
|
"div",
|
|
1167
1193
|
{
|
|
@@ -1171,17 +1197,17 @@ const at = ({
|
|
|
1171
1197
|
fontSize: "0.75em",
|
|
1172
1198
|
color: t.t2,
|
|
1173
1199
|
padding: "3px 0",
|
|
1174
|
-
paddingBottom:
|
|
1200
|
+
paddingBottom: y.xs
|
|
1175
1201
|
},
|
|
1176
1202
|
children: [
|
|
1177
|
-
/* @__PURE__ */ s("span", { children: n.combinedOddsLabel ||
|
|
1203
|
+
/* @__PURE__ */ s("span", { children: n.combinedOddsLabel || u("betslip.combinedOddsLabel") }),
|
|
1178
1204
|
/* @__PURE__ */ S(
|
|
1179
1205
|
"span",
|
|
1180
1206
|
{
|
|
1181
1207
|
style: {
|
|
1182
1208
|
display: "flex",
|
|
1183
1209
|
alignItems: "center",
|
|
1184
|
-
gap:
|
|
1210
|
+
gap: y["2xs"],
|
|
1185
1211
|
fontSize: "0.8125em",
|
|
1186
1212
|
fontWeight: 600,
|
|
1187
1213
|
color: t.t1
|
|
@@ -1209,19 +1235,19 @@ const at = ({
|
|
|
1209
1235
|
"span",
|
|
1210
1236
|
{
|
|
1211
1237
|
style: { fontSize: "0.75em", color: t.t2, flexShrink: 0 },
|
|
1212
|
-
children: n.stakeLabel ||
|
|
1238
|
+
children: n.stakeLabel || u("betslip.stakeLabel")
|
|
1213
1239
|
}
|
|
1214
1240
|
),
|
|
1215
1241
|
/* @__PURE__ */ s("div", { style: { flex: 1, position: "relative", marginBottom: 0 }, children: /* @__PURE__ */ s(
|
|
1216
1242
|
"input",
|
|
1217
1243
|
{
|
|
1218
|
-
ref:
|
|
1219
|
-
css:
|
|
1244
|
+
ref: m,
|
|
1245
|
+
css: W.stakeInput,
|
|
1220
1246
|
type: "number",
|
|
1221
1247
|
min: "0",
|
|
1222
1248
|
step: "1",
|
|
1223
1249
|
value: a,
|
|
1224
|
-
onChange: (v) =>
|
|
1250
|
+
onChange: (v) => r(v.target.value),
|
|
1225
1251
|
placeholder: "0",
|
|
1226
1252
|
onFocus: (v) => v.currentTarget.style.borderColor = t.primary,
|
|
1227
1253
|
onBlur: (v) => v.currentTarget.style.borderColor = t.bdr,
|
|
@@ -1231,7 +1257,7 @@ const at = ({
|
|
|
1231
1257
|
border: `${c.size} solid ${t.bdr}`,
|
|
1232
1258
|
color: t.t1,
|
|
1233
1259
|
padding: "10px",
|
|
1234
|
-
borderRadius:
|
|
1260
|
+
borderRadius: g.sm,
|
|
1235
1261
|
fontSize: "0.875em",
|
|
1236
1262
|
fontFamily: t.font,
|
|
1237
1263
|
outline: "none",
|
|
@@ -1247,7 +1273,7 @@ const at = ({
|
|
|
1247
1273
|
!x && /* @__PURE__ */ s(
|
|
1248
1274
|
"div",
|
|
1249
1275
|
{
|
|
1250
|
-
css:
|
|
1276
|
+
css: W.presetGrid,
|
|
1251
1277
|
style: { gridTemplateColumns: `repeat(${w}, 1fr)` },
|
|
1252
1278
|
children: C
|
|
1253
1279
|
}
|
|
@@ -1265,8 +1291,8 @@ const at = ({
|
|
|
1265
1291
|
padding: "3px 0"
|
|
1266
1292
|
},
|
|
1267
1293
|
children: [
|
|
1268
|
-
/* @__PURE__ */ s("span", { children: n.totalStakeLabel ||
|
|
1269
|
-
/* @__PURE__ */ s("span", { children:
|
|
1294
|
+
/* @__PURE__ */ s("span", { children: n.totalStakeLabel || u("betslip.totalStakeLabel") }),
|
|
1295
|
+
/* @__PURE__ */ s("span", { children: h > 0 ? `${h.toFixed(2)}${l}` : "—" })
|
|
1270
1296
|
]
|
|
1271
1297
|
}
|
|
1272
1298
|
),
|
|
@@ -1283,14 +1309,14 @@ const at = ({
|
|
|
1283
1309
|
borderTop: `${c.size} solid ${t.bdr}`
|
|
1284
1310
|
},
|
|
1285
1311
|
children: [
|
|
1286
|
-
/* @__PURE__ */ s("span", { children: n.potentialWinLabel ||
|
|
1312
|
+
/* @__PURE__ */ s("span", { children: n.potentialWinLabel || u("betslip.potentialWinLabel") }),
|
|
1287
1313
|
/* @__PURE__ */ s(
|
|
1288
1314
|
"span",
|
|
1289
1315
|
{
|
|
1290
1316
|
style: {
|
|
1291
|
-
color:
|
|
1317
|
+
color: f > 0 ? t.primary : void 0
|
|
1292
1318
|
},
|
|
1293
|
-
children:
|
|
1319
|
+
children: f > 0 ? f.toFixed(2) : "—"
|
|
1294
1320
|
}
|
|
1295
1321
|
)
|
|
1296
1322
|
]
|
|
@@ -1298,7 +1324,7 @@ const at = ({
|
|
|
1298
1324
|
)
|
|
1299
1325
|
] }),
|
|
1300
1326
|
/* @__PURE__ */ s(
|
|
1301
|
-
|
|
1327
|
+
St,
|
|
1302
1328
|
{
|
|
1303
1329
|
tokens: t,
|
|
1304
1330
|
brandingLogoUrl: e
|
|
@@ -1311,153 +1337,154 @@ const at = ({
|
|
|
1311
1337
|
fontSize: "0.625em",
|
|
1312
1338
|
color: t.t3,
|
|
1313
1339
|
textAlign: "center",
|
|
1314
|
-
marginTop:
|
|
1340
|
+
marginTop: y.xs,
|
|
1315
1341
|
lineHeight: 1.5,
|
|
1316
|
-
padding: `0 ${
|
|
1342
|
+
padding: `0 ${y["3xs"]}`
|
|
1317
1343
|
},
|
|
1344
|
+
css: W.disclaimer,
|
|
1318
1345
|
children: n.disclaimer
|
|
1319
1346
|
}
|
|
1320
1347
|
)
|
|
1321
1348
|
] })
|
|
1322
1349
|
}
|
|
1323
1350
|
);
|
|
1324
|
-
},
|
|
1351
|
+
}, X = (t, e) => {
|
|
1325
1352
|
var o, a;
|
|
1326
1353
|
const n = e.split("-")[0].toUpperCase();
|
|
1327
|
-
return ((a = (o = t == null ? void 0 : t.translations) == null ? void 0 : o.find((
|
|
1354
|
+
return ((a = (o = t == null ? void 0 : t.translations) == null ? void 0 : o.find((r) => {
|
|
1328
1355
|
var l;
|
|
1329
|
-
return ((l =
|
|
1356
|
+
return ((l = r.language) == null ? void 0 : l.toUpperCase()) === n;
|
|
1330
1357
|
})) == null ? void 0 : a.name) ?? (t == null ? void 0 : t.name) ?? void 0;
|
|
1331
|
-
},
|
|
1358
|
+
}, K = (t) => {
|
|
1332
1359
|
var e, n;
|
|
1333
1360
|
return (n = (e = t == null ? void 0 : t.assets) == null ? void 0 : e.find((o) => o.key === "LOGO")) == null ? void 0 : n.value;
|
|
1334
|
-
},
|
|
1361
|
+
}, be = (t) => {
|
|
1335
1362
|
const e = (t ?? "").toUpperCase();
|
|
1336
1363
|
return /CANCEL/.test(e) ? "cancelled" : /POSTPON|INTERRUPT|ABANDON|SUSPEND/.test(e) ? "interrupted" : /FINISH|ENDED/.test(e) ? "finished" : /LIVE|PROGRESS|HALF/.test(e) ? "inprogress" : "notstarted";
|
|
1337
1364
|
};
|
|
1338
|
-
async function
|
|
1365
|
+
async function ye(t, e, n, o) {
|
|
1339
1366
|
var p;
|
|
1340
|
-
const a = /* @__PURE__ */ new Map(),
|
|
1341
|
-
if (
|
|
1367
|
+
const a = /* @__PURE__ */ new Map(), r = (p = t.helpers.getSDKConfiguration()) == null ? void 0 : p.idSchema, l = /* @__PURE__ */ new Map();
|
|
1368
|
+
if (r && r !== "native") {
|
|
1342
1369
|
const d = await t.idMapping.getMappedFootballMatchIds(
|
|
1343
1370
|
e,
|
|
1344
|
-
|
|
1371
|
+
r,
|
|
1345
1372
|
"native"
|
|
1346
1373
|
);
|
|
1347
|
-
((d == null ? void 0 : d.data) ?? []).forEach((
|
|
1348
|
-
|
|
1374
|
+
((d == null ? void 0 : d.data) ?? []).forEach((h) => {
|
|
1375
|
+
h.input && h.output && l.set(h.output, h.input);
|
|
1349
1376
|
});
|
|
1350
1377
|
} else
|
|
1351
1378
|
e.forEach((d) => l.set(d, d));
|
|
1352
|
-
const
|
|
1379
|
+
const i = await $t(
|
|
1353
1380
|
t,
|
|
1354
1381
|
[...l.keys()],
|
|
1355
1382
|
o
|
|
1356
1383
|
);
|
|
1357
|
-
if (!
|
|
1358
|
-
const
|
|
1384
|
+
if (!i.length) return a;
|
|
1385
|
+
const u = Ot(t), y = i.flatMap((d) => [
|
|
1359
1386
|
d.competitor_one,
|
|
1360
1387
|
d.competitor_two,
|
|
1361
1388
|
d.competition_id
|
|
1362
|
-
]),
|
|
1389
|
+
]), g = u ? await At(u, y, {
|
|
1363
1390
|
partial: !0,
|
|
1364
1391
|
disableCache: o
|
|
1365
|
-
}) : [], c = new Map(
|
|
1366
|
-
return
|
|
1367
|
-
var v,
|
|
1368
|
-
const
|
|
1369
|
-
if (!
|
|
1392
|
+
}) : [], c = new Map(g.map((d) => [d.id, d]));
|
|
1393
|
+
return i.forEach((d) => {
|
|
1394
|
+
var v, $;
|
|
1395
|
+
const h = c.get(d.competitor_one), f = c.get(d.competitor_two), b = X(h, n), m = X(f, n);
|
|
1396
|
+
if (!b || d.competitor_two && !m) {
|
|
1370
1397
|
console.warn(
|
|
1371
1398
|
`[betslip] Event ${d.id} has no competitor names in the Search API.`
|
|
1372
1399
|
);
|
|
1373
1400
|
return;
|
|
1374
1401
|
}
|
|
1375
|
-
const x = c.get(d.competition_id), w =
|
|
1402
|
+
const x = c.get(d.competition_id), w = X(x, n), C = l.get(d.id) ?? d.id;
|
|
1376
1403
|
a.set(C, {
|
|
1377
1404
|
eventId: C,
|
|
1378
|
-
participantOne: { name:
|
|
1379
|
-
participantTwo:
|
|
1405
|
+
participantOne: { name: b, logo: K(h) },
|
|
1406
|
+
participantTwo: m ? { name: m, logo: K(f) } : void 0,
|
|
1380
1407
|
startAt: ((v = d.timing) == null ? void 0 : v.start_time) ?? d.start_time,
|
|
1381
|
-
matchStatus:
|
|
1382
|
-
competition: w ? { name: w, logo:
|
|
1408
|
+
matchStatus: be(($ = d.status) == null ? void 0 : $.type),
|
|
1409
|
+
competition: w ? { name: w, logo: K(x) } : void 0
|
|
1383
1410
|
});
|
|
1384
1411
|
}), a;
|
|
1385
1412
|
}
|
|
1386
|
-
function
|
|
1387
|
-
const [o, a] =
|
|
1388
|
-
return
|
|
1413
|
+
function Se(t, e, n) {
|
|
1414
|
+
const [o, a] = I([]), [r, l] = I((e == null ? void 0 : e.length) > 0), i = Tt(), u = V(/* @__PURE__ */ new Map()), y = V(/* @__PURE__ */ new Set()), g = JSON.stringify(e);
|
|
1415
|
+
return T(() => {
|
|
1389
1416
|
if (!(e != null && e.length)) {
|
|
1390
1417
|
a([]), l(!1);
|
|
1391
1418
|
return;
|
|
1392
1419
|
}
|
|
1393
|
-
let
|
|
1394
|
-
const
|
|
1395
|
-
const f =
|
|
1396
|
-
return { id:
|
|
1397
|
-
}),
|
|
1420
|
+
let c = !1;
|
|
1421
|
+
const p = e.map((h) => {
|
|
1422
|
+
const f = h.split(":"), b = f[f.length - 1], m = f[f.length - 2], x = f.slice(0, f.length - 2).join(":");
|
|
1423
|
+
return { id: h, eventId: x, market: m, outcome: b };
|
|
1424
|
+
}), d = [...new Set(p.map((h) => h.eventId))];
|
|
1398
1425
|
return l(!0), (async () => {
|
|
1399
|
-
let
|
|
1426
|
+
let h = /* @__PURE__ */ new Map();
|
|
1400
1427
|
try {
|
|
1401
|
-
|
|
1428
|
+
h = await ye(
|
|
1402
1429
|
t,
|
|
1403
|
-
|
|
1430
|
+
d,
|
|
1404
1431
|
n,
|
|
1405
|
-
|
|
1432
|
+
i
|
|
1406
1433
|
);
|
|
1407
|
-
} catch (
|
|
1408
|
-
console.warn("[betslip] Sports API event lookup failed:",
|
|
1434
|
+
} catch (b) {
|
|
1435
|
+
console.warn("[betslip] Sports API event lookup failed:", b);
|
|
1409
1436
|
}
|
|
1410
|
-
if (
|
|
1411
|
-
|
|
1412
|
-
const f =
|
|
1413
|
-
const
|
|
1414
|
-
return
|
|
1415
|
-
`[betslip] Dropping "${
|
|
1437
|
+
if (c) return;
|
|
1438
|
+
h.forEach((b, m) => u.current.set(m, b));
|
|
1439
|
+
const f = p.flatMap(({ id: b, eventId: m, market: x, outcome: w }) => {
|
|
1440
|
+
const C = h.get(m) ?? u.current.get(m);
|
|
1441
|
+
return C ? (y.current.delete(b), [{ ...C, market: x, outcome: w }]) : (y.current.has(b) || (y.current.add(b), console.warn(
|
|
1442
|
+
`[betslip] Dropping "${b}": event ${m} was not found in the Sports API.`
|
|
1416
1443
|
)), []);
|
|
1417
1444
|
});
|
|
1418
1445
|
a(f), l(!1);
|
|
1419
1446
|
})(), () => {
|
|
1420
|
-
|
|
1447
|
+
c = !0;
|
|
1421
1448
|
};
|
|
1422
|
-
}, [
|
|
1449
|
+
}, [g, i, n]), { selectionInputs: o, loading: r };
|
|
1423
1450
|
}
|
|
1424
|
-
const
|
|
1451
|
+
const xe = H`
|
|
1425
1452
|
from { transform: translateY(100%); opacity: 0; }
|
|
1426
1453
|
to { transform: translateY(0); opacity: 1; }
|
|
1427
|
-
`,
|
|
1454
|
+
`, ve = H`
|
|
1428
1455
|
from { transform: translateY(-100%); opacity: 0; }
|
|
1429
1456
|
to { transform: translateY(0); opacity: 1; }
|
|
1430
|
-
`,
|
|
1457
|
+
`, mt = (t) => k({
|
|
1431
1458
|
position: "fixed",
|
|
1432
1459
|
zIndex: 999,
|
|
1433
1460
|
animation: `${t} 0.22s ease`
|
|
1434
1461
|
}), ut = {
|
|
1435
|
-
wrapper: { top:
|
|
1436
|
-
},
|
|
1437
|
-
function
|
|
1438
|
-
return t === "bottom-right" ? { bottom: 16, right: 16, width:
|
|
1462
|
+
wrapper: { top: mt(ve), bottom: mt(xe) }
|
|
1463
|
+
}, U = 320, ft = 340;
|
|
1464
|
+
function we(t) {
|
|
1465
|
+
return t === "bottom-right" ? { bottom: 16, right: 16, width: U } : t === "bottom-left" ? { bottom: 16, left: 16, width: U } : t === "top-right" ? { top: 16, right: 16, width: U } : t === "top-left" ? { top: 16, left: 16, width: U } : { bottom: 16, right: 16, width: U };
|
|
1439
1466
|
}
|
|
1440
|
-
const
|
|
1441
|
-
const { selectionInputs: t, combStake: e, selections: n } =
|
|
1442
|
-
return
|
|
1443
|
-
|
|
1444
|
-
}, [t, o, a]),
|
|
1445
|
-
},
|
|
1446
|
-
var C, v,
|
|
1467
|
+
const Ce = () => {
|
|
1468
|
+
const { selectionInputs: t, combStake: e, selections: n } = L(), o = parseFloat(e) || 0, a = n.length ? n.reduce((r, l) => r * l.odds, 1) : 0;
|
|
1469
|
+
return T(() => {
|
|
1470
|
+
G._notify({ selections: t, stake: o, totalOdds: a });
|
|
1471
|
+
}, [t, o, a]), T(() => () => G._notify({ selections: [], stake: 0, totalOdds: 0 }), []), null;
|
|
1472
|
+
}, Re = ({ props: t }) => {
|
|
1473
|
+
var C, v, $, P, N, M, R, j, z, Q;
|
|
1447
1474
|
const { position: e = "bottom-right", brandingLogoUrl: n } = t, {
|
|
1448
1475
|
open: o,
|
|
1449
1476
|
setOpen: a,
|
|
1450
|
-
selections:
|
|
1477
|
+
selections: r,
|
|
1451
1478
|
maxSelections: l,
|
|
1452
|
-
bookmakerLogoUrl:
|
|
1453
|
-
bookmakerBackgroundColor:
|
|
1454
|
-
oddsReady:
|
|
1455
|
-
} =
|
|
1456
|
-
|
|
1457
|
-
), p =
|
|
1458
|
-
if (!
|
|
1459
|
-
if (
|
|
1460
|
-
const
|
|
1479
|
+
bookmakerLogoUrl: i,
|
|
1480
|
+
bookmakerBackgroundColor: u,
|
|
1481
|
+
oddsReady: y
|
|
1482
|
+
} = L(), g = ((N = (P = ($ = (v = (C = t.themeOptions) == null ? void 0 : C.colorSchemes) == null ? void 0 : v.light) == null ? void 0 : $.palette) == null ? void 0 : P.primary) == null ? void 0 : N.plainColor) != null || ((Q = (z = (j = (R = (M = t.themeOptions) == null ? void 0 : M.colorSchemes) == null ? void 0 : R.dark) == null ? void 0 : j.palette) == null ? void 0 : z.primary) == null ? void 0 : Q.plainColor) != null, c = te(
|
|
1483
|
+
g ? void 0 : u
|
|
1484
|
+
), p = ee(c), d = B(), h = q(), f = e.startsWith("side"), b = e === "top-right" || e === "top-left", { t: m } = E();
|
|
1485
|
+
if (!y) return null;
|
|
1486
|
+
if (f) {
|
|
1487
|
+
const O = e === "side-right", Y = O ? "right" : "left", Z = n || i, xt = o ? ft : 0, vt = o ? "translateX(0)" : `translateX(${O ? "100%" : "-100%"})`;
|
|
1461
1488
|
return /* @__PURE__ */ S(
|
|
1462
1489
|
"div",
|
|
1463
1490
|
{
|
|
@@ -1465,7 +1492,7 @@ const we = () => {
|
|
|
1465
1492
|
...p,
|
|
1466
1493
|
position: "fixed",
|
|
1467
1494
|
top: 0,
|
|
1468
|
-
[
|
|
1495
|
+
[Y]: 0,
|
|
1469
1496
|
zIndex: 999,
|
|
1470
1497
|
height: "100vh",
|
|
1471
1498
|
width: 0,
|
|
@@ -1478,11 +1505,11 @@ const we = () => {
|
|
|
1478
1505
|
{
|
|
1479
1506
|
style: {
|
|
1480
1507
|
position: "absolute",
|
|
1481
|
-
[
|
|
1508
|
+
[Y]: xt,
|
|
1482
1509
|
top: "33%",
|
|
1483
1510
|
transform: "translateY(-50%)",
|
|
1484
1511
|
pointerEvents: "all",
|
|
1485
|
-
transition: `${
|
|
1512
|
+
transition: `${Y} 0.3s ease`,
|
|
1486
1513
|
display: "flex",
|
|
1487
1514
|
flexDirection: "column",
|
|
1488
1515
|
alignItems: "center",
|
|
@@ -1493,7 +1520,7 @@ const we = () => {
|
|
|
1493
1520
|
"button",
|
|
1494
1521
|
{
|
|
1495
1522
|
onClick: () => a(!o),
|
|
1496
|
-
title:
|
|
1523
|
+
title: m(o ? "betslip.hide" : "betslip.show"),
|
|
1497
1524
|
style: {
|
|
1498
1525
|
position: "relative",
|
|
1499
1526
|
display: "flex",
|
|
@@ -1504,8 +1531,8 @@ const we = () => {
|
|
|
1504
1531
|
background: c.primary,
|
|
1505
1532
|
border: "none",
|
|
1506
1533
|
cursor: "pointer",
|
|
1507
|
-
borderRadius:
|
|
1508
|
-
boxShadow:
|
|
1534
|
+
borderRadius: O ? "8px 0 0 8px" : "0 8px 8px 0",
|
|
1535
|
+
boxShadow: O ? "-4px 0 12px rgba(0,0,0,.22)" : "4px 0 12px rgba(0,0,0,.22)",
|
|
1509
1536
|
overflow: "hidden",
|
|
1510
1537
|
padding: 0
|
|
1511
1538
|
},
|
|
@@ -1517,11 +1544,12 @@ const we = () => {
|
|
|
1517
1544
|
style: {
|
|
1518
1545
|
position: "absolute",
|
|
1519
1546
|
top: "50%",
|
|
1547
|
+
// eslint-disable-next-line no-restricted-syntax -- centred with translate(-50%): symmetric
|
|
1520
1548
|
left: "50%",
|
|
1521
1549
|
width: 52,
|
|
1522
1550
|
height: 22,
|
|
1523
1551
|
objectFit: "contain",
|
|
1524
|
-
transform: `translate(-50%, -50%) rotate(${
|
|
1552
|
+
transform: `translate(-50%, -50%) rotate(${O ? "-90" : "90"}deg)`
|
|
1525
1553
|
}
|
|
1526
1554
|
}
|
|
1527
1555
|
) : /* @__PURE__ */ S("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
|
|
@@ -1565,6 +1593,7 @@ const we = () => {
|
|
|
1565
1593
|
"div",
|
|
1566
1594
|
{
|
|
1567
1595
|
style: {
|
|
1596
|
+
// eslint-disable-next-line no-restricted-syntax -- known rem; left as is (2026-11-16)
|
|
1568
1597
|
fontSize: "0.625rem",
|
|
1569
1598
|
fontWeight: 700,
|
|
1570
1599
|
color: "#fff",
|
|
@@ -1573,10 +1602,10 @@ const we = () => {
|
|
|
1573
1602
|
borderRadius: 4,
|
|
1574
1603
|
padding: "2px 5px",
|
|
1575
1604
|
whiteSpace: "nowrap",
|
|
1576
|
-
boxShadow:
|
|
1605
|
+
boxShadow: O ? "-2px 2px 6px rgba(0,0,0,.2)" : "2px 2px 6px rgba(0,0,0,.2)"
|
|
1577
1606
|
},
|
|
1578
1607
|
children: [
|
|
1579
|
-
|
|
1608
|
+
r.length,
|
|
1580
1609
|
"/",
|
|
1581
1610
|
l
|
|
1582
1611
|
]
|
|
@@ -1591,24 +1620,24 @@ const we = () => {
|
|
|
1591
1620
|
style: {
|
|
1592
1621
|
position: "absolute",
|
|
1593
1622
|
top: 0,
|
|
1594
|
-
[
|
|
1595
|
-
width:
|
|
1623
|
+
[Y]: 0,
|
|
1624
|
+
width: ft,
|
|
1596
1625
|
height: "100%",
|
|
1597
|
-
transform:
|
|
1626
|
+
transform: vt,
|
|
1598
1627
|
transition: "transform 0.3s ease",
|
|
1599
1628
|
pointerEvents: o ? "all" : "none",
|
|
1600
1629
|
display: "flex",
|
|
1601
1630
|
flexDirection: "column",
|
|
1602
1631
|
background: c.s1,
|
|
1603
|
-
boxShadow:
|
|
1604
|
-
outline: `${
|
|
1632
|
+
boxShadow: O ? "-6px 0 24px rgba(0,0,0,.18)" : "6px 0 24px rgba(0,0,0,.18)",
|
|
1633
|
+
outline: `${h.size} solid ${c.bdr}`
|
|
1605
1634
|
},
|
|
1606
1635
|
children: [
|
|
1607
1636
|
/* @__PURE__ */ s(
|
|
1608
1637
|
nt,
|
|
1609
1638
|
{
|
|
1610
1639
|
tokens: c,
|
|
1611
|
-
isSide:
|
|
1640
|
+
isSide: f,
|
|
1612
1641
|
position: e,
|
|
1613
1642
|
brandingLogoUrl: n
|
|
1614
1643
|
}
|
|
@@ -1624,8 +1653,8 @@ const we = () => {
|
|
|
1624
1653
|
overflow: "hidden"
|
|
1625
1654
|
},
|
|
1626
1655
|
children: [
|
|
1627
|
-
/* @__PURE__ */ s(
|
|
1628
|
-
/* @__PURE__ */ s(
|
|
1656
|
+
/* @__PURE__ */ s(ct, { tokens: c, isSide: f }),
|
|
1657
|
+
/* @__PURE__ */ s(pt, { tokens: c, brandingLogoUrl: n })
|
|
1629
1658
|
]
|
|
1630
1659
|
}
|
|
1631
1660
|
)
|
|
@@ -1636,7 +1665,7 @@ const we = () => {
|
|
|
1636
1665
|
}
|
|
1637
1666
|
);
|
|
1638
1667
|
}
|
|
1639
|
-
const x =
|
|
1668
|
+
const x = b ? `0 0 ${d.md} ${d.md}` : `${d.md} ${d.md} 0 0`, w = we(e);
|
|
1640
1669
|
return /* @__PURE__ */ s(
|
|
1641
1670
|
"div",
|
|
1642
1671
|
{
|
|
@@ -1646,8 +1675,8 @@ const we = () => {
|
|
|
1646
1675
|
fontFamily: c.font,
|
|
1647
1676
|
borderRadius: x,
|
|
1648
1677
|
overflow: "hidden",
|
|
1649
|
-
boxShadow:
|
|
1650
|
-
outline: `${
|
|
1678
|
+
boxShadow: b ? "0 4px 16px rgba(0,0,0,.2)" : "0 -4px 16px rgba(0,0,0,.2)",
|
|
1679
|
+
outline: `${h.size} solid ${c.primary}`,
|
|
1651
1680
|
...w
|
|
1652
1681
|
},
|
|
1653
1682
|
children: /* @__PURE__ */ S(
|
|
@@ -1664,13 +1693,13 @@ const we = () => {
|
|
|
1664
1693
|
nt,
|
|
1665
1694
|
{
|
|
1666
1695
|
tokens: c,
|
|
1667
|
-
isSide:
|
|
1696
|
+
isSide: f,
|
|
1668
1697
|
position: e,
|
|
1669
1698
|
brandingLogoUrl: n
|
|
1670
1699
|
}
|
|
1671
1700
|
),
|
|
1672
|
-
!o &&
|
|
1673
|
-
|
|
1701
|
+
!o && r.length > 0 && /* @__PURE__ */ s(
|
|
1702
|
+
oe,
|
|
1674
1703
|
{
|
|
1675
1704
|
tokens: c,
|
|
1676
1705
|
brandingLogoUrl: n
|
|
@@ -1687,8 +1716,8 @@ const we = () => {
|
|
|
1687
1716
|
overflow: "hidden"
|
|
1688
1717
|
},
|
|
1689
1718
|
children: [
|
|
1690
|
-
/* @__PURE__ */ s(
|
|
1691
|
-
/* @__PURE__ */ s(
|
|
1719
|
+
/* @__PURE__ */ s(ct, { tokens: c, isSide: f }),
|
|
1720
|
+
/* @__PURE__ */ s(pt, { tokens: c, brandingLogoUrl: n })
|
|
1692
1721
|
]
|
|
1693
1722
|
}
|
|
1694
1723
|
)
|
|
@@ -1697,54 +1726,54 @@ const we = () => {
|
|
|
1697
1726
|
)
|
|
1698
1727
|
}
|
|
1699
1728
|
);
|
|
1700
|
-
},
|
|
1701
|
-
const [e, n] =
|
|
1729
|
+
}, ke = (t) => {
|
|
1730
|
+
const [e, n] = I([]), o = V(/* @__PURE__ */ new Set()), { selectionInputs: a, loading: r } = Se(
|
|
1702
1731
|
t.sdk,
|
|
1703
1732
|
e,
|
|
1704
1733
|
t.language
|
|
1705
1734
|
), l = a.filter(
|
|
1706
1735
|
(c) => c.matchStatus !== "finished"
|
|
1707
|
-
), { oddsMap:
|
|
1736
|
+
), { oddsMap: i, oddsMarkets: u } = Gt(
|
|
1708
1737
|
t.sdk,
|
|
1709
1738
|
l,
|
|
1710
1739
|
t.oddsPollingInterval || 3e4,
|
|
1711
1740
|
{ operatorId: t.operatorId, affiliateId: t.affiliateId }
|
|
1712
|
-
),
|
|
1741
|
+
), y = J((c) => {
|
|
1713
1742
|
o.current.delete(c);
|
|
1714
|
-
const p = c.split(":"), d = p[p.length - 2],
|
|
1715
|
-
n((
|
|
1716
|
-
const
|
|
1717
|
-
const x =
|
|
1718
|
-
return x.slice(0, x.length - 2).join(":") ===
|
|
1743
|
+
const p = c.split(":"), d = p[p.length - 2], h = p.slice(0, p.length - 2).join(":");
|
|
1744
|
+
n((f) => {
|
|
1745
|
+
const b = f.findIndex((m) => {
|
|
1746
|
+
const x = m.split(":");
|
|
1747
|
+
return x.slice(0, x.length - 2).join(":") === h && x[x.length - 2] === d;
|
|
1719
1748
|
});
|
|
1720
|
-
if (
|
|
1721
|
-
const
|
|
1722
|
-
return
|
|
1749
|
+
if (b !== -1) {
|
|
1750
|
+
const m = [...f];
|
|
1751
|
+
return m[b] = c, m;
|
|
1723
1752
|
}
|
|
1724
|
-
return [...
|
|
1753
|
+
return [...f, c];
|
|
1725
1754
|
});
|
|
1726
|
-
}, []),
|
|
1755
|
+
}, []), g = J((c) => {
|
|
1727
1756
|
n((p) => p.filter((d) => d !== c));
|
|
1728
1757
|
}, []);
|
|
1729
|
-
return
|
|
1730
|
-
a.filter((c) => c.matchStatus === "finished").forEach((c) =>
|
|
1731
|
-
}, [a,
|
|
1758
|
+
return T(() => {
|
|
1759
|
+
a.filter((c) => c.matchStatus === "finished").forEach((c) => g(`${c.eventId}:${c.market}:${c.outcome}`));
|
|
1760
|
+
}, [a, g]), T(() => {
|
|
1732
1761
|
l.forEach((c) => {
|
|
1733
|
-
var d,
|
|
1762
|
+
var d, h;
|
|
1734
1763
|
const p = `${c.eventId}:${c.market}:${c.outcome}`;
|
|
1735
|
-
if (
|
|
1764
|
+
if (Yt(i, u, c.eventId, c.market, p)) {
|
|
1736
1765
|
if (!o.current.has(p)) {
|
|
1737
1766
|
o.current.add(p);
|
|
1738
|
-
const
|
|
1767
|
+
const f = ((h = (d = ((i == null ? void 0 : i.get(c.eventId)) ?? [])[0]) == null ? void 0 : d.bookmaker) == null ? void 0 : h.name) ?? "the bookmaker";
|
|
1739
1768
|
console.warn(
|
|
1740
|
-
`[betslip] Removing "${p}": ${
|
|
1769
|
+
`[betslip] Removing "${p}": ${f} returned no ${c.market} odds for this event.`
|
|
1741
1770
|
);
|
|
1742
1771
|
}
|
|
1743
|
-
|
|
1772
|
+
g(p);
|
|
1744
1773
|
}
|
|
1745
1774
|
});
|
|
1746
|
-
}, [
|
|
1747
|
-
|
|
1775
|
+
}, [i, u, l, g]), T(() => (G._mount({ setSelection: y, removeSelection: g }), () => G._unmount()), [y, g]), !e.length || !l.length && r ? null : /* @__PURE__ */ S(
|
|
1776
|
+
Zt,
|
|
1748
1777
|
{
|
|
1749
1778
|
labels: t.labels,
|
|
1750
1779
|
initialSelections: l,
|
|
@@ -1752,24 +1781,24 @@ const we = () => {
|
|
|
1752
1781
|
currency: t.currency,
|
|
1753
1782
|
stakePresets: t.stakePresets,
|
|
1754
1783
|
ctaUrlTemplate: t.ctaUrlTemplate,
|
|
1755
|
-
onExternalRemove:
|
|
1756
|
-
sharedOddsMap:
|
|
1784
|
+
onExternalRemove: g,
|
|
1785
|
+
sharedOddsMap: i,
|
|
1757
1786
|
children: [
|
|
1758
|
-
/* @__PURE__ */ s(
|
|
1759
|
-
/* @__PURE__ */ s(
|
|
1787
|
+
/* @__PURE__ */ s(Ce, {}),
|
|
1788
|
+
/* @__PURE__ */ s(Re, { props: t })
|
|
1760
1789
|
]
|
|
1761
1790
|
}
|
|
1762
1791
|
);
|
|
1763
|
-
},
|
|
1764
|
-
|
|
1792
|
+
}, Be = (t) => /* @__PURE__ */ s(
|
|
1793
|
+
Ct,
|
|
1765
1794
|
{
|
|
1766
1795
|
packageName: "betslip",
|
|
1767
1796
|
language: t.language,
|
|
1768
1797
|
themeOptions: t.themeOptions,
|
|
1769
1798
|
disableCache: t.disableCache,
|
|
1770
|
-
children: /* @__PURE__ */ s(
|
|
1799
|
+
children: /* @__PURE__ */ s(ke, { ...t })
|
|
1771
1800
|
}
|
|
1772
1801
|
);
|
|
1773
1802
|
export {
|
|
1774
|
-
|
|
1803
|
+
Be as M
|
|
1775
1804
|
};
|