fansunited-frontend-components 1.2.0 → 1.3.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/BattleOfFans.js +1 -1
- package/Betslip.js +2 -2
- package/ChanceGame.js +1 -1
- package/ClassicQuizPlay.js +1 -1
- package/CollectLead.js +1 -1
- package/CompetitionStatistics.js +1 -1
- package/CompetitorCard.js +1 -1
- package/Discussion.js +1 -1
- package/EitherOrPlay.js +1 -1
- package/EventCard.js +1 -1
- package/EventGamePlay.js +1 -1
- package/Leaderboard.js +1 -1
- package/List.js +1 -1
- package/MatchQuizPlay.js +1 -1
- package/Odds.js +1 -1
- package/PersonalityQuizPlay.js +1 -1
- package/PickThePair.js +1 -1
- package/PlayerOfTheMatch.js +1 -1
- package/PollVote.js +1 -1
- package/Predictor.js +1576 -1569
- package/ProfileStats.js +1 -1
- package/README.md +40 -0
- package/Standings.js +1 -1
- package/TopX.js +722 -715
- package/chunks/{main-P2WNvBZE.js → main-8Yt_jn04.js} +402 -392
- package/chunks/{withVersionStamp-C1gbpK3-.js → withVersionStamp-BOktiTgW.js} +1 -1
- package/package.json +2 -2
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
1
|
+
import { jsx as s, jsxs as y, Fragment as wt } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import { WidgetPortal as Ct } from "fansunited-frontend-core/ui/emotion";
|
|
3
|
-
import
|
|
4
|
-
import { css as k, keyframes as
|
|
5
|
-
import { useIsMobile as
|
|
3
|
+
import H, { useState as I, useRef as D, useEffect as T, createContext as Rt, useMemo as tt, useCallback as J, useContext as kt } from "react";
|
|
4
|
+
import { css as k, keyframes as P } from "@emotion/react";
|
|
5
|
+
import { useIsMobile as It, useColors as _t, 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
6
|
import { useTranslation as E } from "react-i18next";
|
|
7
7
|
import { MatchOddsFilters as Bt } from "fansunited-sdk-esm/models";
|
|
8
8
|
import { KeyboardArrowDownIcon as zt, KeyboardArrowUpIcon as Dt } from "fansunited-frontend-core/ui/icons";
|
|
9
|
-
function Wt(t, e, n, o,
|
|
10
|
-
const l = o ?? "Away",
|
|
9
|
+
function Wt(t, e, n, o, i, r) {
|
|
10
|
+
const l = o ?? "Away", a = e.toLowerCase(), h = (r == null ? void 0 : r.draw) || i("betslip.outcomes.draw"), b = (r == null ? void 0 : r.yes) || i("betslip.outcomes.yes"), S = (r == null ? void 0 : r.no) || i("betslip.outcomes.no"), d = (r == null ? void 0 : r.over) || i("betslip.outcomes.over"), f = (r == null ? void 0 : r.under) || i("betslip.outcomes.under"), p = (r == null ? void 0 : r.noGoal) || i("betslip.outcomes.noGoal"), c = (r == null ? void 0 : r.nobody) || i("betslip.outcomes.nobody"), m = (r == null ? void 0 : r.or) || i("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 (a === "x") return h;
|
|
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 u = e.toUpperCase();
|
|
20
|
+
if (u === "1X") return `${n} ${m} ${h}`;
|
|
21
|
+
if (u === "12") return `${n} ${m} ${l}`;
|
|
22
|
+
if (u === "X2") return `${h} ${m} ${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 (a === "yes") return b;
|
|
29
|
+
if (a === "no") return S;
|
|
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 u = e.split(/[-:]/).map(Number);
|
|
35
|
+
return u.length === 2 && !isNaN(u[0]) && !isNaN(u[1]) ? u[0] > u[1] ? n : u[1] > u[0] ? l : h : e;
|
|
36
36
|
}
|
|
37
37
|
case "HT_FT": {
|
|
38
|
-
const
|
|
39
|
-
return (
|
|
38
|
+
const u = e.toUpperCase();
|
|
39
|
+
return (u.includes("/") ? u.split("/") : u.split("")).map((w) => w === "1" ? n : w === "2" ? l : h).join(" / ");
|
|
40
40
|
}
|
|
41
41
|
case "DRAW_NO_BET":
|
|
42
42
|
if (e === "1") return n;
|
|
@@ -46,7 +46,7 @@ function Wt(t, e, n, o, a, r) {
|
|
|
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 (a === "none" || a === "no goal") return p;
|
|
50
50
|
break;
|
|
51
51
|
case "PLAYER_SCORE_FIRST_GOAL":
|
|
52
52
|
case "PLAYER_SCORE":
|
|
@@ -54,11 +54,11 @@ function Wt(t, e, n, o, a, r) {
|
|
|
54
54
|
case "PLAYER_SCORE_HATTRICK":
|
|
55
55
|
case "PLAYER_RED_CARD":
|
|
56
56
|
case "PLAYER_YELLOW_CARD":
|
|
57
|
-
return
|
|
57
|
+
return a === "none" || a === "no goal" || a === "nobody" ? c : e;
|
|
58
58
|
}
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
61
|
-
const w =
|
|
59
|
+
const g = t.match(/^(OVER|UNDER)_(GOALS|CORNERS)_(\d+)_(\d+)$/i);
|
|
60
|
+
if (g) {
|
|
61
|
+
const w = g[1].toUpperCase() === "OVER" !== (a === "no" || a === "under") ? d : f, C = `${g[3]}.${g[4]}`;
|
|
62
62
|
return `${w} ${C}`;
|
|
63
63
|
}
|
|
64
64
|
return e;
|
|
@@ -73,7 +73,7 @@ function Ft(t) {
|
|
|
73
73
|
}
|
|
74
74
|
function Ht(t, e, n) {
|
|
75
75
|
return t.map((o) => {
|
|
76
|
-
var
|
|
76
|
+
var i, r, l;
|
|
77
77
|
return {
|
|
78
78
|
id: Ut(o),
|
|
79
79
|
eventId: o.eventId,
|
|
@@ -84,7 +84,7 @@ function Ht(t, e, n) {
|
|
|
84
84
|
o.market,
|
|
85
85
|
o.outcome,
|
|
86
86
|
o.participantOne.name,
|
|
87
|
-
(
|
|
87
|
+
(i = o.participantTwo) == null ? void 0 : i.name,
|
|
88
88
|
e,
|
|
89
89
|
n
|
|
90
90
|
),
|
|
@@ -127,69 +127,69 @@ function jt(t) {
|
|
|
127
127
|
return e[e.length - 1];
|
|
128
128
|
}
|
|
129
129
|
function gt(t, e, n) {
|
|
130
|
-
var
|
|
130
|
+
var h, b, S, d, f, p;
|
|
131
131
|
if (!t) return null;
|
|
132
|
-
const o = jt(n),
|
|
133
|
-
for (const
|
|
134
|
-
const
|
|
135
|
-
if (!Mt(
|
|
136
|
-
const
|
|
137
|
-
for (const
|
|
132
|
+
const o = jt(n), i = e.match(ht), r = i !== null, l = r ? o.toLowerCase() === "no" ? "under" : o.toLowerCase() === "yes" ? "over" : o.toLowerCase() : null, a = r ? `${i[3]}.${i[4]}` : null;
|
|
133
|
+
for (const c of t.markets ?? []) {
|
|
134
|
+
const m = ((h = c == null ? void 0 : c.type) == null ? void 0 : h.code) ?? "";
|
|
135
|
+
if (!Mt(m, e)) continue;
|
|
136
|
+
const g = m.toLowerCase() !== "over_under";
|
|
137
|
+
for (const u of c.selections ?? [])
|
|
138
138
|
if (r) {
|
|
139
|
-
const x = ((
|
|
140
|
-
if (x && w) return
|
|
141
|
-
} else if (((
|
|
142
|
-
return
|
|
139
|
+
const x = ((b = u.code) == null ? void 0 : b.toLowerCase()) === l || ((S = u.name) == null ? void 0 : S.toLowerCase()) === l, w = g || a === null || ((d = u.value) == null ? void 0 : d.toString()) === a;
|
|
140
|
+
if (x && w) return u;
|
|
141
|
+
} else if (((f = u.code) == null ? void 0 : f.toLowerCase()) === o.toLowerCase() || ((p = u.name) == null ? void 0 : p.toLowerCase()) === o.toLowerCase())
|
|
142
|
+
return u;
|
|
143
143
|
}
|
|
144
144
|
return null;
|
|
145
145
|
}
|
|
146
|
-
function Yt(t, e, n, o,
|
|
146
|
+
function Yt(t, e, n, o, i) {
|
|
147
147
|
if (!t || !e.includes(o) || !t.has(n)) return !1;
|
|
148
148
|
const r = (t.get(n) ?? [])[0];
|
|
149
|
-
return gt(r, o,
|
|
149
|
+
return gt(r, o, i) === null;
|
|
150
150
|
}
|
|
151
151
|
function Vt(t, e) {
|
|
152
152
|
return t.map((n) => {
|
|
153
|
-
var r, l,
|
|
154
|
-
const o = (e.get(n.eventId) ?? [])[0],
|
|
155
|
-
return
|
|
153
|
+
var r, l, a;
|
|
154
|
+
const o = (e.get(n.eventId) ?? [])[0], i = gt(o, n.marketId, n.id);
|
|
155
|
+
return i ? {
|
|
156
156
|
...n,
|
|
157
|
-
odds: parseFloat(
|
|
158
|
-
movement:
|
|
157
|
+
odds: parseFloat(i.odds ?? "0") || 0,
|
|
158
|
+
movement: i.movement === "UP" || i.movement === "DOWN" ? i.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: ((r =
|
|
162
|
-
selectionUrl: ((
|
|
161
|
+
selectionId: ((r = i.providerInfo) == null ? void 0 : r.selectionId) ?? i.id ?? void 0,
|
|
162
|
+
selectionUrl: ((a = (l = i.urls) == null ? void 0 : l[0]) == null ? void 0 : a.url) ?? void 0
|
|
163
163
|
} : n;
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
166
|
function Gt(t, e, n, o = {}) {
|
|
167
|
-
const { operatorId:
|
|
168
|
-
if (!t ||
|
|
169
|
-
const
|
|
170
|
-
...new Set(
|
|
171
|
-
],
|
|
172
|
-
marketTypes:
|
|
173
|
-
...
|
|
167
|
+
const { operatorId: i, affiliateId: r } = o, [l, a] = I(null), [h, b] = I([]), [S, d] = I(!1), f = D(null), p = async (c) => {
|
|
168
|
+
if (!t || c.length === 0) return;
|
|
169
|
+
const m = [...new Set(c.map((x) => x.eventId))], g = [
|
|
170
|
+
...new Set(c.map((x) => x.market))
|
|
171
|
+
], u = new Bt({
|
|
172
|
+
marketTypes: g,
|
|
173
|
+
...i ? { operators: [i] } : {},
|
|
174
174
|
...r ? { affiliateId: r } : {}
|
|
175
175
|
});
|
|
176
|
-
|
|
176
|
+
d(!0);
|
|
177
177
|
try {
|
|
178
|
-
const x = await t.odds.getByMatchIds(
|
|
179
|
-
|
|
178
|
+
const x = await t.odds.getByMatchIds(m, u);
|
|
179
|
+
a(x), b(g);
|
|
180
180
|
} catch {
|
|
181
181
|
} finally {
|
|
182
|
-
|
|
182
|
+
d(!1);
|
|
183
183
|
}
|
|
184
184
|
};
|
|
185
|
-
return T(() => (
|
|
186
|
-
|
|
187
|
-
}), [JSON.stringify(e), n,
|
|
185
|
+
return T(() => (p(e), f.current && clearInterval(f.current), t && n > 0 && e.length > 0 && (f.current = setInterval(() => p(e), n)), () => {
|
|
186
|
+
f.current && clearInterval(f.current);
|
|
187
|
+
}), [JSON.stringify(e), n, i, r]), { oddsMap: l, oddsLoading: S, oddsMarkets: h };
|
|
188
188
|
}
|
|
189
189
|
function Xt(t) {
|
|
190
190
|
var e, n, o;
|
|
191
|
-
for (const
|
|
192
|
-
const r =
|
|
191
|
+
for (const i of t.values()) {
|
|
192
|
+
const r = i[0];
|
|
193
193
|
if (!r) continue;
|
|
194
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;
|
|
@@ -198,35 +198,35 @@ function Xt(t) {
|
|
|
198
198
|
function Kt(t, e) {
|
|
199
199
|
var o;
|
|
200
200
|
const n = e ? "mobile" : "desktop";
|
|
201
|
-
for (const
|
|
202
|
-
const r =
|
|
201
|
+
for (const i of t.values()) {
|
|
202
|
+
const r = i[0];
|
|
203
203
|
if (!r) continue;
|
|
204
|
-
const l = ((o = r.bookmaker) == null ? void 0 : o.links) ?? [],
|
|
205
|
-
if (
|
|
204
|
+
const l = ((o = r.bookmaker) == null ? void 0 : o.links) ?? [], a = l.find((h) => h.appType === n) ?? l[0];
|
|
205
|
+
if (a != null && a.homepageUrl) return a.homepageUrl;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
function Jt(t, e) {
|
|
209
|
-
var o,
|
|
209
|
+
var o, i;
|
|
210
210
|
const n = e ? "mobile" : "desktop";
|
|
211
211
|
for (const r of t.values()) {
|
|
212
|
-
const l = ((
|
|
213
|
-
if (
|
|
212
|
+
const l = ((i = (o = r[0]) == null ? void 0 : o.bookmaker) == null ? void 0 : i.betslipUrlTemplate) ?? [], a = l.find((h) => h.appType === n) ?? l[0];
|
|
213
|
+
if (a != null && a.url) return a.url;
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
function qt(t) {
|
|
217
217
|
var e, n;
|
|
218
218
|
for (const o of t.values()) {
|
|
219
|
-
const
|
|
220
|
-
if (
|
|
219
|
+
const i = (n = (e = o[0]) == null ? void 0 : e.bookmaker) == null ? void 0 : n.betslipIdSeparator;
|
|
220
|
+
if (i) return i;
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
function Qt(t) {
|
|
224
|
-
var e, n, o,
|
|
224
|
+
var e, n, o, i, r;
|
|
225
225
|
for (const l of t.values()) {
|
|
226
|
-
const
|
|
227
|
-
if (!
|
|
228
|
-
const
|
|
229
|
-
if (
|
|
226
|
+
const a = l[0];
|
|
227
|
+
if (!a) continue;
|
|
228
|
+
const h = ((n = (e = a.bookmaker) == null ? void 0 : e.branding) == null ? void 0 : n.backgroundColor) ?? ((r = (i = (o = a.bookmaker) == null ? void 0 : o.assets) == null ? void 0 : i[0]) == null ? void 0 : r.backgroundColor);
|
|
229
|
+
if (h) return h;
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
const bt = Rt(null), Zt = ({
|
|
@@ -234,27 +234,27 @@ const bt = Rt(null), Zt = ({
|
|
|
234
234
|
initialSelections: e = [],
|
|
235
235
|
maxSelections: n,
|
|
236
236
|
currency: o = "€",
|
|
237
|
-
stakePresets:
|
|
237
|
+
stakePresets: i = [5, 10, 20],
|
|
238
238
|
ctaUrlTemplate: r,
|
|
239
239
|
onExternalRemove: l,
|
|
240
|
-
sharedOddsMap:
|
|
241
|
-
children:
|
|
240
|
+
sharedOddsMap: a,
|
|
241
|
+
children: h
|
|
242
242
|
}) => {
|
|
243
|
-
const { t:
|
|
243
|
+
const { t: b } = E(), [S, d] = I(e), [f, p] = I(""), [c, m] = I(!0), g = It(), u = JSON.stringify(e);
|
|
244
244
|
T(() => {
|
|
245
|
-
|
|
246
|
-
}, [
|
|
245
|
+
d(e);
|
|
246
|
+
}, [u]);
|
|
247
247
|
const x = tt(() => {
|
|
248
|
-
if (!
|
|
249
|
-
const R =
|
|
248
|
+
if (!a) return !1;
|
|
249
|
+
const R = a.values().next().value;
|
|
250
250
|
return Array.isArray(R) && R[0] !== void 0;
|
|
251
|
-
}, [
|
|
252
|
-
const R = Ht(
|
|
253
|
-
return
|
|
254
|
-
}, [
|
|
251
|
+
}, [a]), w = tt(() => {
|
|
252
|
+
const R = Ht(S, b, t.outcomeLabels);
|
|
253
|
+
return a ? Vt(R, a) : R;
|
|
254
|
+
}, [S, a, b, t.outcomeLabels]), C = a ? Xt(a) : void 0, v = a ? Kt(a, g) : void 0, $ = a ? Qt(a) : void 0, N = a ? Jt(a, g) : void 0, M = a ? qt(a) : void 0, j = J(
|
|
255
255
|
(R) => {
|
|
256
|
-
|
|
257
|
-
(
|
|
256
|
+
d(
|
|
257
|
+
(Y) => Y.filter((z) => `${z.eventId}:${z.market}:${z.outcome}` !== R)
|
|
258
258
|
), l == null || l(R);
|
|
259
259
|
},
|
|
260
260
|
[l]
|
|
@@ -264,26 +264,26 @@ const bt = Rt(null), Zt = ({
|
|
|
264
264
|
{
|
|
265
265
|
value: {
|
|
266
266
|
labels: t,
|
|
267
|
-
selectionInputs:
|
|
267
|
+
selectionInputs: S,
|
|
268
268
|
selections: w,
|
|
269
|
-
combStake:
|
|
270
|
-
open:
|
|
269
|
+
combStake: f,
|
|
270
|
+
open: c,
|
|
271
271
|
oddsLoading: !1,
|
|
272
272
|
oddsReady: x,
|
|
273
273
|
currency: o,
|
|
274
|
-
stakePresets:
|
|
274
|
+
stakePresets: i,
|
|
275
275
|
ctaUrlTemplate: r,
|
|
276
276
|
maxSelections: n,
|
|
277
277
|
bookmakerLogoUrl: C,
|
|
278
278
|
bookmakerHomepageUrl: v,
|
|
279
279
|
bookmakerBackgroundColor: $,
|
|
280
|
-
bookmakerBetslipTemplate:
|
|
281
|
-
bookmakerIdSeparator:
|
|
282
|
-
onRemove:
|
|
283
|
-
setCombStake:
|
|
284
|
-
setOpen:
|
|
280
|
+
bookmakerBetslipTemplate: N,
|
|
281
|
+
bookmakerIdSeparator: M,
|
|
282
|
+
onRemove: j,
|
|
283
|
+
setCombStake: p,
|
|
284
|
+
setOpen: m
|
|
285
285
|
},
|
|
286
|
-
children:
|
|
286
|
+
children: h
|
|
287
287
|
}
|
|
288
288
|
);
|
|
289
289
|
}, L = () => {
|
|
@@ -292,13 +292,13 @@ const bt = Rt(null), Zt = ({
|
|
|
292
292
|
return t;
|
|
293
293
|
};
|
|
294
294
|
function te(t) {
|
|
295
|
-
const e =
|
|
295
|
+
const e = _t(), n = Et(), i = 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,
|
|
299
299
|
s1: e.surface,
|
|
300
300
|
s2: e.onSurface,
|
|
301
|
-
s3:
|
|
301
|
+
s3: i ? e.surfaceVariant : e.onSurface,
|
|
302
302
|
bdr: e.outlineEnabledBorder,
|
|
303
303
|
t1: e.textPrimary,
|
|
304
304
|
t2: e.textSecondary,
|
|
@@ -309,12 +309,12 @@ function te(t) {
|
|
|
309
309
|
font: n.primary
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
-
const
|
|
312
|
+
const W = {
|
|
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
|
-
}, ee = (t) =>
|
|
317
|
+
}, ee = (t) => H.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 D = {
|
|
|
328
328
|
position: n,
|
|
329
329
|
brandingLogoUrl: o
|
|
330
330
|
}) => {
|
|
331
|
-
const { labels:
|
|
331
|
+
const { labels: i, selections: r, open: l, setOpen: a, maxSelections: h, bookmakerLogoUrl: b } = L(), { t: S } = E(), d = A(), f = B(), m = e ? "0" : n === "bottom-right" || n === "bottom-left" ? `${f.md} ${f.md} 0 0` : n === "top-right" || n === "top-left" ? `0 0 ${f.md} ${f.md}` : "0", g = o || b, u = {
|
|
332
332
|
background: "none",
|
|
333
333
|
border: "none",
|
|
334
334
|
cursor: "pointer",
|
|
@@ -336,35 +336,35 @@ const D = {
|
|
|
336
336
|
padding: "5px 7px",
|
|
337
337
|
fontSize: "1em",
|
|
338
338
|
lineHeight: 1,
|
|
339
|
-
borderRadius:
|
|
339
|
+
borderRadius: f.xs,
|
|
340
340
|
display: "flex",
|
|
341
341
|
alignItems: "center",
|
|
342
342
|
justifyContent: "center",
|
|
343
343
|
transition: "background .15s"
|
|
344
344
|
};
|
|
345
|
-
return /* @__PURE__ */
|
|
345
|
+
return /* @__PURE__ */ y(
|
|
346
346
|
"div",
|
|
347
347
|
{
|
|
348
348
|
style: {
|
|
349
|
-
paddingTop:
|
|
350
|
-
paddingBottom:
|
|
351
|
-
paddingInlineEnd:
|
|
352
|
-
paddingInlineStart:
|
|
349
|
+
paddingTop: d.sm,
|
|
350
|
+
paddingBottom: d.sm,
|
|
351
|
+
paddingInlineEnd: d.xs,
|
|
352
|
+
paddingInlineStart: g ? d["2xs"] : d.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: m,
|
|
360
360
|
fontFamily: t.font
|
|
361
361
|
},
|
|
362
362
|
children: [
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
-
|
|
363
|
+
/* @__PURE__ */ y("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
364
|
+
g ? /* @__PURE__ */ s(
|
|
365
365
|
"img",
|
|
366
366
|
{
|
|
367
|
-
src:
|
|
367
|
+
src: g,
|
|
368
368
|
alt: "brand",
|
|
369
369
|
style: {
|
|
370
370
|
height: "24px",
|
|
@@ -386,22 +386,22 @@ const D = {
|
|
|
386
386
|
letterSpacing: "-0.5px",
|
|
387
387
|
color: "#fff"
|
|
388
388
|
},
|
|
389
|
-
children:
|
|
389
|
+
children: i.title || S("betslip.title")
|
|
390
390
|
}
|
|
391
391
|
),
|
|
392
|
-
r.length > 0 &&
|
|
392
|
+
r.length > 0 && h != null && /* @__PURE__ */ y(
|
|
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: g ? 0 : d.sm
|
|
400
400
|
},
|
|
401
401
|
children: [
|
|
402
402
|
r.length,
|
|
403
403
|
"/",
|
|
404
|
-
|
|
404
|
+
h
|
|
405
405
|
]
|
|
406
406
|
}
|
|
407
407
|
)
|
|
@@ -409,8 +409,8 @@ const D = {
|
|
|
409
409
|
!e && /* @__PURE__ */ s(
|
|
410
410
|
"button",
|
|
411
411
|
{
|
|
412
|
-
style:
|
|
413
|
-
onClick: () =>
|
|
412
|
+
style: u,
|
|
413
|
+
onClick: () => a(!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",
|
|
@@ -425,17 +425,17 @@ function yt(t) {
|
|
|
425
425
|
return t.filter((e) => e.status === "active" || !e.status).reduce((e, n) => e * n.odds, 1);
|
|
426
426
|
}
|
|
427
427
|
function ne(t, e, n, o = ",") {
|
|
428
|
-
const
|
|
428
|
+
const i = e.map((S) => S.selectionId).filter((S) => !!S), r = i.join(","), l = i.map(encodeURIComponent).join(o), a = e[0], h = encodeURIComponent(
|
|
429
429
|
typeof window < "u" ? window.location.href : ""
|
|
430
|
-
),
|
|
431
|
-
return t.replace(/\{betslip_ids\}/g, l).replace(/\{selectionIds\}/g, encodeURIComponent(r)).replace(/\{currentUrl\}/g,
|
|
430
|
+
), b = String(n);
|
|
431
|
+
return t.replace(/\{betslip_ids\}/g, l).replace(/\{selectionIds\}/g, encodeURIComponent(r)).replace(/\{currentUrl\}/g, h).replace(/\{stake\}/g, b).replace(/\{eventId\}/g, (a == null ? void 0 : a.eventId) ?? "").replace(/\{oddsDecimal\}/g, a ? String(a.odds) : "").replace(/\{market\}/g, (a == null ? void 0 : a.marketId) ?? "").replace(/\{outcome\}/g, (a == null ? void 0 : a.name) ?? "");
|
|
432
432
|
}
|
|
433
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: W.primary,
|
|
439
439
|
color: "#fff",
|
|
440
440
|
border: "none",
|
|
441
441
|
fontWeight: 600,
|
|
@@ -444,7 +444,7 @@ const ot = (t) => k({
|
|
|
444
444
|
cursor: t ? "not-allowed" : "pointer",
|
|
445
445
|
pointerEvents: t ? "none" : "auto",
|
|
446
446
|
opacity: t ? 0.4 : 1,
|
|
447
|
-
"&:hover": { background:
|
|
447
|
+
"&:hover": { background: W.primaryHover }
|
|
448
448
|
}), rt = { enabled: ot(!1), disabled: ot(!0) }, St = ({
|
|
449
449
|
tokens: t,
|
|
450
450
|
brandingLogoUrl: e
|
|
@@ -452,37 +452,37 @@ const ot = (t) => k({
|
|
|
452
452
|
const {
|
|
453
453
|
labels: n,
|
|
454
454
|
ctaUrlTemplate: o,
|
|
455
|
-
selections:
|
|
455
|
+
selections: i,
|
|
456
456
|
combStake: r,
|
|
457
457
|
bookmakerLogoUrl: l,
|
|
458
|
-
bookmakerHomepageUrl:
|
|
459
|
-
bookmakerBetslipTemplate:
|
|
460
|
-
bookmakerIdSeparator:
|
|
461
|
-
} = L(), { t:
|
|
462
|
-
const
|
|
458
|
+
bookmakerHomepageUrl: a,
|
|
459
|
+
bookmakerBetslipTemplate: h,
|
|
460
|
+
bookmakerIdSeparator: b
|
|
461
|
+
} = L(), { t: S } = E(), d = e || l, f = A(), p = B(), c = n.continueLabel || S("betslip.continueLabel"), m = (() => {
|
|
462
|
+
const u = parseFloat(r) || 0, x = o || h;
|
|
463
463
|
if (x)
|
|
464
|
-
return ne(x,
|
|
465
|
-
if (
|
|
466
|
-
})(),
|
|
467
|
-
return /* @__PURE__ */ s("div", { children: /* @__PURE__ */
|
|
464
|
+
return ne(x, i, u, b);
|
|
465
|
+
if (a) return a;
|
|
466
|
+
})(), g = !m;
|
|
467
|
+
return /* @__PURE__ */ s("div", { children: /* @__PURE__ */ y(
|
|
468
468
|
"a",
|
|
469
469
|
{
|
|
470
|
-
href:
|
|
471
|
-
target:
|
|
472
|
-
rel:
|
|
473
|
-
css:
|
|
470
|
+
href: g ? void 0 : m,
|
|
471
|
+
target: m ? "_blank" : void 0,
|
|
472
|
+
rel: m ? "noopener noreferrer" : void 0,
|
|
473
|
+
css: g ? rt.disabled : rt.enabled,
|
|
474
474
|
style: {
|
|
475
|
-
padding: `${
|
|
476
|
-
borderRadius:
|
|
475
|
+
padding: `${f.xs} ${f.md}`,
|
|
476
|
+
borderRadius: p.full,
|
|
477
477
|
fontSize: "0.875em",
|
|
478
478
|
fontFamily: t.font
|
|
479
479
|
},
|
|
480
480
|
children: [
|
|
481
|
-
/* @__PURE__ */ s("span", { children:
|
|
482
|
-
|
|
481
|
+
/* @__PURE__ */ s("span", { children: c }),
|
|
482
|
+
d && /* @__PURE__ */ s(
|
|
483
483
|
"img",
|
|
484
484
|
{
|
|
485
|
-
src:
|
|
485
|
+
src: d,
|
|
486
486
|
alt: "",
|
|
487
487
|
style: {
|
|
488
488
|
height: "20px",
|
|
@@ -490,7 +490,7 @@ const ot = (t) => k({
|
|
|
490
490
|
width: "auto",
|
|
491
491
|
objectFit: "contain",
|
|
492
492
|
verticalAlign: "middle",
|
|
493
|
-
marginInlineStart:
|
|
493
|
+
marginInlineStart: f.sm,
|
|
494
494
|
flexShrink: 0
|
|
495
495
|
}
|
|
496
496
|
}
|
|
@@ -505,26 +505,26 @@ const ot = (t) => k({
|
|
|
505
505
|
tokens: t,
|
|
506
506
|
brandingLogoUrl: e
|
|
507
507
|
}) => {
|
|
508
|
-
const { labels: n, selections: o, combStake:
|
|
509
|
-
(
|
|
510
|
-
),
|
|
508
|
+
const { labels: n, selections: o, combStake: i, currency: r } = L(), { t: l } = E(), a = A(), h = o.filter(
|
|
509
|
+
(p) => p.status === "active" || !p.status
|
|
510
|
+
), b = yt(h), S = parseFloat(i) || 0, d = S * b, f = {
|
|
511
511
|
display: "flex",
|
|
512
512
|
justifyContent: "space-between",
|
|
513
513
|
alignItems: "center",
|
|
514
514
|
padding: "6px 0"
|
|
515
515
|
};
|
|
516
|
-
return /* @__PURE__ */
|
|
516
|
+
return /* @__PURE__ */ y(
|
|
517
517
|
"div",
|
|
518
518
|
{
|
|
519
519
|
style: {
|
|
520
520
|
background: t.s1,
|
|
521
|
-
padding: `10px 14px ${
|
|
521
|
+
padding: `10px 14px ${a.sm}`,
|
|
522
522
|
fontFamily: t.font
|
|
523
523
|
},
|
|
524
524
|
children: [
|
|
525
|
-
/* @__PURE__ */
|
|
525
|
+
/* @__PURE__ */ y("div", { style: f, children: [
|
|
526
526
|
/* @__PURE__ */ s("span", { style: { fontSize: "0.6875em", color: t.t3 }, children: n.combinedOddsLabel || l("betslip.combinedOddsLabel") }),
|
|
527
|
-
/* @__PURE__ */
|
|
527
|
+
/* @__PURE__ */ y(
|
|
528
528
|
"span",
|
|
529
529
|
{
|
|
530
530
|
style: {
|
|
@@ -537,18 +537,18 @@ const ot = (t) => k({
|
|
|
537
537
|
},
|
|
538
538
|
children: [
|
|
539
539
|
/* @__PURE__ */ s("span", { style: { fontSize: "0.5em", color: t.ok }, children: "▲" }),
|
|
540
|
-
|
|
540
|
+
b.toFixed(2)
|
|
541
541
|
]
|
|
542
542
|
}
|
|
543
543
|
)
|
|
544
544
|
] }),
|
|
545
545
|
/* @__PURE__ */ s(it, { color: t.bdr }),
|
|
546
|
-
/* @__PURE__ */
|
|
546
|
+
/* @__PURE__ */ y("div", { style: f, 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: S > 0 ? `${S.toFixed(2)}${r}` : "—" })
|
|
549
549
|
] }),
|
|
550
550
|
/* @__PURE__ */ s(it, { color: t.bdr }),
|
|
551
|
-
/* @__PURE__ */
|
|
551
|
+
/* @__PURE__ */ y("div", { style: { ...f, borderBottom: "none", marginBottom: 10 }, children: [
|
|
552
552
|
/* @__PURE__ */ s("span", { style: { fontSize: "0.8125em", fontWeight: 700, color: t.t1 }, children: n.potentialWinLabel || l("betslip.potentialWinLabel") }),
|
|
553
553
|
/* @__PURE__ */ s(
|
|
554
554
|
"span",
|
|
@@ -556,9 +556,9 @@ const ot = (t) => k({
|
|
|
556
556
|
style: {
|
|
557
557
|
fontSize: "0.8125em",
|
|
558
558
|
fontWeight: 700,
|
|
559
|
-
color:
|
|
559
|
+
color: d > 0 ? t.primary : t.t1
|
|
560
560
|
},
|
|
561
|
-
children:
|
|
561
|
+
children: d > 0 ? d.toFixed(2) : "—"
|
|
562
562
|
}
|
|
563
563
|
)
|
|
564
564
|
] }),
|
|
@@ -575,22 +575,22 @@ const ot = (t) => k({
|
|
|
575
575
|
};
|
|
576
576
|
function re(t, e, n) {
|
|
577
577
|
if (n != null && n[t]) return n[t];
|
|
578
|
-
const o = `betslip.markets.${t}`,
|
|
579
|
-
if (
|
|
578
|
+
const o = `betslip.markets.${t}`, i = e(o);
|
|
579
|
+
if (i !== o) return i;
|
|
580
580
|
const r = t.match(/^(OVER|UNDER)_(GOALS|CORNERS)_(\d+)_(\d+)$/i);
|
|
581
581
|
if (r) {
|
|
582
|
-
const l = r[2].charAt(0) + r[2].slice(1).toLowerCase(),
|
|
583
|
-
if (
|
|
582
|
+
const l = r[2].charAt(0) + r[2].slice(1).toLowerCase(), a = `betslip.markets.${r[1].toUpperCase() === "OVER" ? "over" : "under"}${l}`, h = `${r[3]}.${r[4]}`, b = e(a, { line: h });
|
|
583
|
+
if (b !== a) return b;
|
|
584
584
|
}
|
|
585
585
|
return t.replace(/_/g, " ").toLowerCase().replace(/\b\w/g, (l) => l.toUpperCase());
|
|
586
586
|
}
|
|
587
|
-
const ie =
|
|
587
|
+
const ie = P`
|
|
588
588
|
from { opacity: 0; transform: translateX(8px); }
|
|
589
589
|
to { opacity: 1; transform: translateX(0); }
|
|
590
|
-
`, ae =
|
|
590
|
+
`, ae = P`
|
|
591
591
|
from { transform: rotate(0deg); }
|
|
592
592
|
to { transform: rotate(360deg); }
|
|
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 =
|
|
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 = P`
|
|
594
594
|
0%, 100% { opacity: 1; }
|
|
595
595
|
50% { opacity: 0.2; }
|
|
596
596
|
`, _ = {
|
|
@@ -602,7 +602,7 @@ const ie = H`
|
|
|
602
602
|
height: "12px",
|
|
603
603
|
borderRadius: "50%",
|
|
604
604
|
border: "2px solid transparent",
|
|
605
|
-
borderTopColor:
|
|
605
|
+
borderTopColor: W.t3,
|
|
606
606
|
animation: `${ae} 0.7s linear infinite`,
|
|
607
607
|
flexShrink: 0
|
|
608
608
|
}),
|
|
@@ -619,11 +619,11 @@ function ce(t, e, n) {
|
|
|
619
619
|
if (!t) return "";
|
|
620
620
|
const o = new Date(t);
|
|
621
621
|
if (isNaN(o.getTime())) return "";
|
|
622
|
-
const
|
|
622
|
+
const i = /* @__PURE__ */ new Date(), r = i.toDateString(), l = new Date(i.getTime() + 864e5).toDateString(), a = o.toLocaleTimeString(et(e), {
|
|
623
623
|
hour: "2-digit",
|
|
624
624
|
minute: "2-digit"
|
|
625
625
|
});
|
|
626
|
-
return o.toDateString() === r ? `${n("betslip.today")} ${
|
|
626
|
+
return o.toDateString() === r ? `${n("betslip.today")} ${a}` : o.toDateString() === l ? `${n("betslip.tomorrow")} ${a}` : `${o.toLocaleDateString(et(e), { month: "short", day: "numeric" })} ${a}`;
|
|
627
627
|
}
|
|
628
628
|
const at = ({
|
|
629
629
|
logo: t,
|
|
@@ -705,13 +705,13 @@ const at = ({
|
|
|
705
705
|
}
|
|
706
706
|
);
|
|
707
707
|
}, pe = ({ name: t, logo: e, tokens: n }) => {
|
|
708
|
-
const [o,
|
|
709
|
-
return e ? /* @__PURE__ */
|
|
708
|
+
const [o, i] = H.useState(!1), r = H.useRef(null);
|
|
709
|
+
return e ? /* @__PURE__ */ y(
|
|
710
710
|
"div",
|
|
711
711
|
{
|
|
712
712
|
style: { position: "relative", display: "inline-flex" },
|
|
713
|
-
onMouseEnter: () =>
|
|
714
|
-
onMouseLeave: () =>
|
|
713
|
+
onMouseEnter: () => i(!0),
|
|
714
|
+
onMouseLeave: () => i(!1),
|
|
715
715
|
children: [
|
|
716
716
|
/* @__PURE__ */ s("div", { style: { width: 20, height: 20, flexShrink: 0 }, children: /* @__PURE__ */ s(
|
|
717
717
|
"img",
|
|
@@ -724,15 +724,15 @@ const at = ({
|
|
|
724
724
|
o && /* @__PURE__ */ s(st, { name: t })
|
|
725
725
|
]
|
|
726
726
|
}
|
|
727
|
-
) : /* @__PURE__ */
|
|
727
|
+
) : /* @__PURE__ */ y(
|
|
728
728
|
"div",
|
|
729
729
|
{
|
|
730
730
|
style: { position: "relative", maxWidth: "100%", minWidth: 0 },
|
|
731
731
|
onMouseEnter: () => {
|
|
732
732
|
const l = r.current;
|
|
733
|
-
|
|
733
|
+
i(!!l && l.scrollWidth > l.clientWidth);
|
|
734
734
|
},
|
|
735
|
-
onMouseLeave: () =>
|
|
735
|
+
onMouseLeave: () => i(!1),
|
|
736
736
|
children: [
|
|
737
737
|
/* @__PURE__ */ s(
|
|
738
738
|
"span",
|
|
@@ -783,36 +783,36 @@ const at = ({
|
|
|
783
783
|
sel: t,
|
|
784
784
|
tokens: e
|
|
785
785
|
}) => {
|
|
786
|
-
const { labels: n, oddsLoading: o } = L(), { t:
|
|
787
|
-
return r === "settled_won" ? /* @__PURE__ */
|
|
786
|
+
const { labels: n, oddsLoading: o } = L(), { t: i } = E(), { status: r, odds: l, movement: a } = t;
|
|
787
|
+
return r === "settled_won" ? /* @__PURE__ */ y("span", { style: { color: e.ok, fontSize: "0.8125em", fontWeight: 700 }, children: [
|
|
788
788
|
"✓ ",
|
|
789
|
-
|
|
790
|
-
] }) : r === "settled_lost" ? /* @__PURE__ */
|
|
789
|
+
i("betslip.settledWon")
|
|
790
|
+
] }) : r === "settled_lost" ? /* @__PURE__ */ y(
|
|
791
791
|
"span",
|
|
792
792
|
{
|
|
793
793
|
style: { color: e.bad, fontSize: "0.8125em", fontWeight: 700 },
|
|
794
794
|
children: [
|
|
795
795
|
"✗ ",
|
|
796
|
-
|
|
796
|
+
i("betslip.settledLost")
|
|
797
797
|
]
|
|
798
798
|
}
|
|
799
|
-
) : r === "settled_void" ? /* @__PURE__ */ s("span", { style: { fontSize: "0.8125em", fontWeight: 700, color: e.t3 }, children:
|
|
800
|
-
|
|
799
|
+
) : r === "settled_void" ? /* @__PURE__ */ s("span", { style: { fontSize: "0.8125em", fontWeight: 700, color: e.t3 }, children: i("betslip.settledVoid") }) : r === "suspended" ? /* @__PURE__ */ s("span", { style: { fontSize: "0.75em", fontWeight: 600, color: e.warn }, children: n.suspendedLabel || i("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 || i("betslip.oddsUnavailableLabel") }) : /* @__PURE__ */ y("div", { style: { display: "flex", alignItems: "center", gap: 3 }, children: [
|
|
800
|
+
a && /* @__PURE__ */ s(
|
|
801
801
|
"span",
|
|
802
802
|
{
|
|
803
803
|
style: {
|
|
804
804
|
fontSize: "0.5625em",
|
|
805
|
-
color:
|
|
805
|
+
color: a === "UP" ? e.ok : e.bad,
|
|
806
806
|
lineHeight: 1
|
|
807
807
|
},
|
|
808
|
-
children:
|
|
808
|
+
children: a === "UP" ? "▲" : "▼"
|
|
809
809
|
}
|
|
810
810
|
),
|
|
811
811
|
/* @__PURE__ */ s("span", { style: { fontSize: "0.875em", fontWeight: 700, color: e.t1 }, children: l.toFixed(2) })
|
|
812
812
|
] });
|
|
813
813
|
}, ue = ({ sel: t, tokens: e }) => {
|
|
814
|
-
const { onRemove: n, labels: o } = L(), { t:
|
|
815
|
-
return /* @__PURE__ */
|
|
814
|
+
const { onRemove: n, labels: o } = L(), { t: i, i18n: r } = E(), l = A(), a = B(), [h, b] = H.useState(!1), S = ce(t.startAt, r.language, i), d = t.marketId === "CORRECT_SCORE" || t.marketId === "CORRECT_SCORE_ADVANCED" || t.marketId === "CORRECT_SCORE_HT", f = d && t.outcome ? t.outcome.split(/[-:]/) : null, p = f == null ? void 0 : f[0], c = f == null ? void 0 : f[1], m = t.matchStatus === "inprogress" || !!S || !!t.competition;
|
|
815
|
+
return /* @__PURE__ */ y(
|
|
816
816
|
"div",
|
|
817
817
|
{
|
|
818
818
|
css: _.card,
|
|
@@ -821,7 +821,7 @@ const at = ({
|
|
|
821
821
|
padding: "14px 12px"
|
|
822
822
|
},
|
|
823
823
|
children: [
|
|
824
|
-
/* @__PURE__ */
|
|
824
|
+
/* @__PURE__ */ y(
|
|
825
825
|
"div",
|
|
826
826
|
{
|
|
827
827
|
style: {
|
|
@@ -832,7 +832,7 @@ const at = ({
|
|
|
832
832
|
marginBottom: l["3xs"]
|
|
833
833
|
},
|
|
834
834
|
children: [
|
|
835
|
-
/* @__PURE__ */
|
|
835
|
+
/* @__PURE__ */ y("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
|
|
836
836
|
t.athlete && /* @__PURE__ */ s(
|
|
837
837
|
de,
|
|
838
838
|
{
|
|
@@ -854,7 +854,7 @@ const at = ({
|
|
|
854
854
|
}
|
|
855
855
|
)
|
|
856
856
|
] }),
|
|
857
|
-
/* @__PURE__ */
|
|
857
|
+
/* @__PURE__ */ y(
|
|
858
858
|
"div",
|
|
859
859
|
{
|
|
860
860
|
style: {
|
|
@@ -869,17 +869,17 @@ const at = ({
|
|
|
869
869
|
"button",
|
|
870
870
|
{
|
|
871
871
|
onClick: () => n(t.id),
|
|
872
|
-
onMouseEnter: () =>
|
|
873
|
-
onMouseLeave: () =>
|
|
872
|
+
onMouseEnter: () => b(!0),
|
|
873
|
+
onMouseLeave: () => b(!1),
|
|
874
874
|
title: "Remove",
|
|
875
875
|
style: {
|
|
876
|
-
background:
|
|
876
|
+
background: h ? "rgba(239,68,68,.08)" : "none",
|
|
877
877
|
border: "none",
|
|
878
878
|
cursor: "pointer",
|
|
879
|
-
color:
|
|
879
|
+
color: h ? e.bad : e.t2,
|
|
880
880
|
fontSize: "0.8125em",
|
|
881
881
|
padding: "3px 5px",
|
|
882
|
-
borderRadius:
|
|
882
|
+
borderRadius: a.xs,
|
|
883
883
|
transition: "color .15s, background .15s",
|
|
884
884
|
lineHeight: 1,
|
|
885
885
|
display: "flex",
|
|
@@ -903,7 +903,7 @@ const at = ({
|
|
|
903
903
|
marginBottom: 6
|
|
904
904
|
},
|
|
905
905
|
css: _.cms,
|
|
906
|
-
children: re(t.marketId,
|
|
906
|
+
children: re(t.marketId, i, o.marketLabels)
|
|
907
907
|
}
|
|
908
908
|
),
|
|
909
909
|
/* @__PURE__ */ s(
|
|
@@ -911,11 +911,11 @@ const at = ({
|
|
|
911
911
|
{
|
|
912
912
|
style: {
|
|
913
913
|
background: e.s3,
|
|
914
|
-
borderRadius:
|
|
914
|
+
borderRadius: a.sm,
|
|
915
915
|
padding: "7px 10px",
|
|
916
916
|
marginTop: 6
|
|
917
917
|
},
|
|
918
|
-
children: /* @__PURE__ */
|
|
918
|
+
children: /* @__PURE__ */ y(
|
|
919
919
|
"div",
|
|
920
920
|
{
|
|
921
921
|
style: {
|
|
@@ -929,18 +929,18 @@ const at = ({
|
|
|
929
929
|
{
|
|
930
930
|
style: {
|
|
931
931
|
// Teams keep their width; the competition truncates instead.
|
|
932
|
-
flex:
|
|
933
|
-
maxWidth:
|
|
932
|
+
flex: m ? "0 0 auto" : "0 1 auto",
|
|
933
|
+
maxWidth: m ? "65%" : void 0,
|
|
934
934
|
minWidth: 0,
|
|
935
935
|
display: "flex",
|
|
936
936
|
alignItems: "center"
|
|
937
937
|
},
|
|
938
|
-
children: /* @__PURE__ */
|
|
938
|
+
children: /* @__PURE__ */ y(
|
|
939
939
|
"div",
|
|
940
940
|
{
|
|
941
941
|
style: {
|
|
942
942
|
display: "grid",
|
|
943
|
-
gridTemplateColumns:
|
|
943
|
+
gridTemplateColumns: d ? "auto minmax(0, auto) auto" : "auto minmax(0, auto)",
|
|
944
944
|
columnGap: 6,
|
|
945
945
|
rowGap: l["2xs"],
|
|
946
946
|
alignItems: "center"
|
|
@@ -968,7 +968,7 @@ const at = ({
|
|
|
968
968
|
children: t.participantOne
|
|
969
969
|
}
|
|
970
970
|
),
|
|
971
|
-
|
|
971
|
+
d && (p !== void 0 ? /* @__PURE__ */ s(lt, { score: p, tokens: e }) : /* @__PURE__ */ s("span", {})),
|
|
972
972
|
t.participantTwo && /* @__PURE__ */ s(
|
|
973
973
|
at,
|
|
974
974
|
{
|
|
@@ -991,13 +991,13 @@ const at = ({
|
|
|
991
991
|
children: t.participantTwo
|
|
992
992
|
}
|
|
993
993
|
),
|
|
994
|
-
t.participantTwo &&
|
|
994
|
+
t.participantTwo && d && (c !== void 0 ? /* @__PURE__ */ s(lt, { score: c, tokens: e }) : /* @__PURE__ */ s("span", {}))
|
|
995
995
|
]
|
|
996
996
|
}
|
|
997
997
|
)
|
|
998
998
|
}
|
|
999
999
|
),
|
|
1000
|
-
|
|
1000
|
+
m && /* @__PURE__ */ y(
|
|
1001
1001
|
"div",
|
|
1002
1002
|
{
|
|
1003
1003
|
style: {
|
|
@@ -1010,7 +1010,7 @@ const at = ({
|
|
|
1010
1010
|
alignItems: "flex-end"
|
|
1011
1011
|
},
|
|
1012
1012
|
children: [
|
|
1013
|
-
t.matchStatus === "inprogress" ? /* @__PURE__ */
|
|
1013
|
+
t.matchStatus === "inprogress" ? /* @__PURE__ */ y(
|
|
1014
1014
|
"span",
|
|
1015
1015
|
{
|
|
1016
1016
|
style: {
|
|
@@ -1030,10 +1030,10 @@ const at = ({
|
|
|
1030
1030
|
},
|
|
1031
1031
|
children: [
|
|
1032
1032
|
/* @__PURE__ */ s("span", { css: _.pulseDot }),
|
|
1033
|
-
|
|
1033
|
+
i("betslip.live")
|
|
1034
1034
|
]
|
|
1035
1035
|
}
|
|
1036
|
-
) :
|
|
1036
|
+
) : S ? /* @__PURE__ */ s(
|
|
1037
1037
|
"span",
|
|
1038
1038
|
{
|
|
1039
1039
|
style: {
|
|
@@ -1041,7 +1041,7 @@ const at = ({
|
|
|
1041
1041
|
color: e.t3,
|
|
1042
1042
|
whiteSpace: "nowrap"
|
|
1043
1043
|
},
|
|
1044
|
-
children:
|
|
1044
|
+
children: S
|
|
1045
1045
|
}
|
|
1046
1046
|
) : null,
|
|
1047
1047
|
t.competition && /* @__PURE__ */ s(
|
|
@@ -1068,7 +1068,7 @@ const at = ({
|
|
|
1068
1068
|
"&::-webkit-scrollbar": { width: "8px" },
|
|
1069
1069
|
"&::-webkit-scrollbar-track": { background: "transparent", margin: "6px 0" },
|
|
1070
1070
|
"&::-webkit-scrollbar-thumb": {
|
|
1071
|
-
background:
|
|
1071
|
+
background: W.s3,
|
|
1072
1072
|
borderRadius: "6px",
|
|
1073
1073
|
borderRight: "4px solid transparent",
|
|
1074
1074
|
backgroundClip: "padding-box"
|
|
@@ -1078,7 +1078,7 @@ const at = ({
|
|
|
1078
1078
|
tokens: t,
|
|
1079
1079
|
isSide: e
|
|
1080
1080
|
}) => {
|
|
1081
|
-
const { labels: n, selections: o } = L(), { t:
|
|
1081
|
+
const { labels: n, selections: o } = L(), { t: i } = E();
|
|
1082
1082
|
return /* @__PURE__ */ s(
|
|
1083
1083
|
"div",
|
|
1084
1084
|
{
|
|
@@ -1090,7 +1090,7 @@ const at = ({
|
|
|
1090
1090
|
maxHeight: e ? "none" : 300,
|
|
1091
1091
|
background: t.s1
|
|
1092
1092
|
},
|
|
1093
|
-
children: o.length === 0 ? /* @__PURE__ */
|
|
1093
|
+
children: o.length === 0 ? /* @__PURE__ */ y(
|
|
1094
1094
|
"div",
|
|
1095
1095
|
{
|
|
1096
1096
|
style: {
|
|
@@ -1109,10 +1109,10 @@ const at = ({
|
|
|
1109
1109
|
color: t.t1,
|
|
1110
1110
|
marginBottom: 6
|
|
1111
1111
|
},
|
|
1112
|
-
children: n.emptyTitle ||
|
|
1112
|
+
children: n.emptyTitle || i("betslip.emptyTitle")
|
|
1113
1113
|
}
|
|
1114
1114
|
),
|
|
1115
|
-
/* @__PURE__ */ s("div", { style: { fontSize: "0.75em", color: t.t2, lineHeight: 1.5 }, children: n.emptyDescription ||
|
|
1115
|
+
/* @__PURE__ */ s("div", { style: { fontSize: "0.75em", color: t.t2, lineHeight: 1.5 }, children: n.emptyDescription || i("betslip.emptyDescription") })
|
|
1116
1116
|
]
|
|
1117
1117
|
}
|
|
1118
1118
|
) : o.map((r) => /* @__PURE__ */ s(
|
|
@@ -1126,14 +1126,14 @@ const at = ({
|
|
|
1126
1126
|
}
|
|
1127
1127
|
);
|
|
1128
1128
|
}, he = 3, ge = 5, dt = (t) => k({
|
|
1129
|
-
background:
|
|
1129
|
+
background: W.primary,
|
|
1130
1130
|
color: "#fff",
|
|
1131
1131
|
border: "none",
|
|
1132
1132
|
width: t,
|
|
1133
1133
|
cursor: "pointer",
|
|
1134
1134
|
flexShrink: 0,
|
|
1135
|
-
"&:hover": { background:
|
|
1136
|
-
}),
|
|
1135
|
+
"&:hover": { background: W.primary, opacity: 0.88 }
|
|
1136
|
+
}), U = {
|
|
1137
1137
|
stakeInput: k({
|
|
1138
1138
|
"&::-webkit-outer-spin-button, &::-webkit-inner-spin-button": {
|
|
1139
1139
|
WebkitAppearance: "none",
|
|
@@ -1150,24 +1150,24 @@ const at = ({
|
|
|
1150
1150
|
const {
|
|
1151
1151
|
labels: n,
|
|
1152
1152
|
selections: o,
|
|
1153
|
-
combStake:
|
|
1153
|
+
combStake: i,
|
|
1154
1154
|
setCombStake: r,
|
|
1155
1155
|
currency: l,
|
|
1156
|
-
stakePresets:
|
|
1157
|
-
} = L(), { t:
|
|
1156
|
+
stakePresets: a
|
|
1157
|
+
} = L(), { t: h } = E(), b = A(), S = B(), d = q(), f = o.filter(
|
|
1158
1158
|
(v) => v.status === "active" || !v.status
|
|
1159
|
-
),
|
|
1159
|
+
), p = yt(f), c = parseFloat(i) || 0, m = c * p, g = (v) => {
|
|
1160
1160
|
r(String(v));
|
|
1161
|
-
},
|
|
1162
|
-
|
|
1163
|
-
), C =
|
|
1161
|
+
}, u = H.useRef(null), x = a.length <= he, w = Math.ceil(
|
|
1162
|
+
a.length / Math.ceil(a.length / ge)
|
|
1163
|
+
), C = a.map((v) => /* @__PURE__ */ s(
|
|
1164
1164
|
"button",
|
|
1165
1165
|
{
|
|
1166
|
-
css: x ?
|
|
1167
|
-
onClick: () =>
|
|
1166
|
+
css: x ? U.preset : U.presetCell,
|
|
1167
|
+
onClick: () => g(v),
|
|
1168
1168
|
style: {
|
|
1169
1169
|
padding: "10px 0",
|
|
1170
|
-
borderRadius:
|
|
1170
|
+
borderRadius: S.sm,
|
|
1171
1171
|
fontSize: "0.8125em",
|
|
1172
1172
|
fontWeight: 700,
|
|
1173
1173
|
fontFamily: t.font,
|
|
@@ -1181,14 +1181,14 @@ const at = ({
|
|
|
1181
1181
|
"div",
|
|
1182
1182
|
{
|
|
1183
1183
|
style: {
|
|
1184
|
-
padding: `${
|
|
1184
|
+
padding: `${b.sm} 14px`,
|
|
1185
1185
|
flexShrink: 0,
|
|
1186
|
-
borderTop: `${
|
|
1186
|
+
borderTop: `${d.size} solid ${t.bdr}`,
|
|
1187
1187
|
background: t.s3,
|
|
1188
1188
|
fontFamily: t.font
|
|
1189
1189
|
},
|
|
1190
|
-
children: /* @__PURE__ */
|
|
1191
|
-
|
|
1190
|
+
children: /* @__PURE__ */ y(wt, { children: [
|
|
1191
|
+
f.length > 0 && /* @__PURE__ */ y(
|
|
1192
1192
|
"div",
|
|
1193
1193
|
{
|
|
1194
1194
|
style: {
|
|
@@ -1197,31 +1197,31 @@ const at = ({
|
|
|
1197
1197
|
fontSize: "0.75em",
|
|
1198
1198
|
color: t.t2,
|
|
1199
1199
|
padding: "3px 0",
|
|
1200
|
-
paddingBottom:
|
|
1200
|
+
paddingBottom: b.xs
|
|
1201
1201
|
},
|
|
1202
1202
|
children: [
|
|
1203
|
-
/* @__PURE__ */ s("span", { children: n.combinedOddsLabel ||
|
|
1204
|
-
/* @__PURE__ */
|
|
1203
|
+
/* @__PURE__ */ s("span", { children: n.combinedOddsLabel || h("betslip.combinedOddsLabel") }),
|
|
1204
|
+
/* @__PURE__ */ y(
|
|
1205
1205
|
"span",
|
|
1206
1206
|
{
|
|
1207
1207
|
style: {
|
|
1208
1208
|
display: "flex",
|
|
1209
1209
|
alignItems: "center",
|
|
1210
|
-
gap:
|
|
1210
|
+
gap: b["2xs"],
|
|
1211
1211
|
fontSize: "0.8125em",
|
|
1212
1212
|
fontWeight: 600,
|
|
1213
1213
|
color: t.t1
|
|
1214
1214
|
},
|
|
1215
1215
|
children: [
|
|
1216
1216
|
/* @__PURE__ */ s("span", { style: { fontSize: "0.5625em", color: t.ok }, children: "▲" }),
|
|
1217
|
-
|
|
1217
|
+
p.toFixed(2)
|
|
1218
1218
|
]
|
|
1219
1219
|
}
|
|
1220
1220
|
)
|
|
1221
1221
|
]
|
|
1222
1222
|
}
|
|
1223
1223
|
),
|
|
1224
|
-
/* @__PURE__ */
|
|
1224
|
+
/* @__PURE__ */ y(
|
|
1225
1225
|
"div",
|
|
1226
1226
|
{
|
|
1227
1227
|
style: {
|
|
@@ -1235,18 +1235,18 @@ const at = ({
|
|
|
1235
1235
|
"span",
|
|
1236
1236
|
{
|
|
1237
1237
|
style: { fontSize: "0.75em", color: t.t2, flexShrink: 0 },
|
|
1238
|
-
children: n.stakeLabel ||
|
|
1238
|
+
children: n.stakeLabel || h("betslip.stakeLabel")
|
|
1239
1239
|
}
|
|
1240
1240
|
),
|
|
1241
1241
|
/* @__PURE__ */ s("div", { style: { flex: 1, position: "relative", marginBottom: 0 }, children: /* @__PURE__ */ s(
|
|
1242
1242
|
"input",
|
|
1243
1243
|
{
|
|
1244
|
-
ref:
|
|
1245
|
-
css:
|
|
1244
|
+
ref: u,
|
|
1245
|
+
css: U.stakeInput,
|
|
1246
1246
|
type: "number",
|
|
1247
1247
|
min: "0",
|
|
1248
1248
|
step: "1",
|
|
1249
|
-
value:
|
|
1249
|
+
value: i,
|
|
1250
1250
|
onChange: (v) => r(v.target.value),
|
|
1251
1251
|
placeholder: "0",
|
|
1252
1252
|
onFocus: (v) => v.currentTarget.style.borderColor = t.primary,
|
|
@@ -1254,10 +1254,10 @@ const at = ({
|
|
|
1254
1254
|
style: {
|
|
1255
1255
|
width: "100%",
|
|
1256
1256
|
background: t.s1,
|
|
1257
|
-
border: `${
|
|
1257
|
+
border: `${d.size} solid ${t.bdr}`,
|
|
1258
1258
|
color: t.t1,
|
|
1259
1259
|
padding: "10px",
|
|
1260
|
-
borderRadius:
|
|
1260
|
+
borderRadius: S.sm,
|
|
1261
1261
|
fontSize: "0.875em",
|
|
1262
1262
|
fontFamily: t.font,
|
|
1263
1263
|
outline: "none",
|
|
@@ -1273,13 +1273,13 @@ const at = ({
|
|
|
1273
1273
|
!x && /* @__PURE__ */ s(
|
|
1274
1274
|
"div",
|
|
1275
1275
|
{
|
|
1276
|
-
css:
|
|
1276
|
+
css: U.presetGrid,
|
|
1277
1277
|
style: { gridTemplateColumns: `repeat(${w}, 1fr)` },
|
|
1278
1278
|
children: C
|
|
1279
1279
|
}
|
|
1280
1280
|
),
|
|
1281
|
-
/* @__PURE__ */
|
|
1282
|
-
/* @__PURE__ */
|
|
1281
|
+
/* @__PURE__ */ y("div", { style: { marginBottom: 10 }, children: [
|
|
1282
|
+
/* @__PURE__ */ y(
|
|
1283
1283
|
"div",
|
|
1284
1284
|
{
|
|
1285
1285
|
style: {
|
|
@@ -1291,12 +1291,12 @@ const at = ({
|
|
|
1291
1291
|
padding: "3px 0"
|
|
1292
1292
|
},
|
|
1293
1293
|
children: [
|
|
1294
|
-
/* @__PURE__ */ s("span", { children: n.totalStakeLabel ||
|
|
1295
|
-
/* @__PURE__ */ s("span", { children:
|
|
1294
|
+
/* @__PURE__ */ s("span", { children: n.totalStakeLabel || h("betslip.totalStakeLabel") }),
|
|
1295
|
+
/* @__PURE__ */ s("span", { children: c > 0 ? `${c.toFixed(2)}${l}` : "—" })
|
|
1296
1296
|
]
|
|
1297
1297
|
}
|
|
1298
1298
|
),
|
|
1299
|
-
/* @__PURE__ */
|
|
1299
|
+
/* @__PURE__ */ y(
|
|
1300
1300
|
"div",
|
|
1301
1301
|
{
|
|
1302
1302
|
style: {
|
|
@@ -1306,17 +1306,17 @@ const at = ({
|
|
|
1306
1306
|
color: t.t1,
|
|
1307
1307
|
fontWeight: 600,
|
|
1308
1308
|
padding: "3px 0",
|
|
1309
|
-
borderTop: `${
|
|
1309
|
+
borderTop: `${d.size} solid ${t.bdr}`
|
|
1310
1310
|
},
|
|
1311
1311
|
children: [
|
|
1312
|
-
/* @__PURE__ */ s("span", { children: n.potentialWinLabel ||
|
|
1312
|
+
/* @__PURE__ */ s("span", { children: n.potentialWinLabel || h("betslip.potentialWinLabel") }),
|
|
1313
1313
|
/* @__PURE__ */ s(
|
|
1314
1314
|
"span",
|
|
1315
1315
|
{
|
|
1316
1316
|
style: {
|
|
1317
|
-
color:
|
|
1317
|
+
color: m > 0 ? t.primary : void 0
|
|
1318
1318
|
},
|
|
1319
|
-
children:
|
|
1319
|
+
children: m > 0 ? m.toFixed(2) : "—"
|
|
1320
1320
|
}
|
|
1321
1321
|
)
|
|
1322
1322
|
]
|
|
@@ -1337,11 +1337,11 @@ const at = ({
|
|
|
1337
1337
|
fontSize: "0.625em",
|
|
1338
1338
|
color: t.t3,
|
|
1339
1339
|
textAlign: "center",
|
|
1340
|
-
marginTop:
|
|
1340
|
+
marginTop: b.xs,
|
|
1341
1341
|
lineHeight: 1.5,
|
|
1342
|
-
padding: `0 ${
|
|
1342
|
+
padding: `0 ${b["3xs"]}`
|
|
1343
1343
|
},
|
|
1344
|
-
css:
|
|
1344
|
+
css: U.disclaimer,
|
|
1345
1345
|
children: n.disclaimer
|
|
1346
1346
|
}
|
|
1347
1347
|
)
|
|
@@ -1349,12 +1349,12 @@ const at = ({
|
|
|
1349
1349
|
}
|
|
1350
1350
|
);
|
|
1351
1351
|
}, X = (t, e) => {
|
|
1352
|
-
var o,
|
|
1352
|
+
var o, i;
|
|
1353
1353
|
const n = e.split("-")[0].toUpperCase();
|
|
1354
|
-
return ((
|
|
1354
|
+
return ((i = (o = t == null ? void 0 : t.translations) == null ? void 0 : o.find((r) => {
|
|
1355
1355
|
var l;
|
|
1356
1356
|
return ((l = r.language) == null ? void 0 : l.toUpperCase()) === n;
|
|
1357
|
-
})) == null ? void 0 :
|
|
1357
|
+
})) == null ? void 0 : i.name) ?? (t == null ? void 0 : t.name) ?? void 0;
|
|
1358
1358
|
}, K = (t) => {
|
|
1359
1359
|
var e, n;
|
|
1360
1360
|
return (n = (e = t == null ? void 0 : t.assets) == null ? void 0 : e.find((o) => o.key === "LOGO")) == null ? void 0 : n.value;
|
|
@@ -1363,95 +1363,95 @@ const at = ({
|
|
|
1363
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";
|
|
1364
1364
|
};
|
|
1365
1365
|
async function ye(t, e, n, o) {
|
|
1366
|
-
var
|
|
1367
|
-
const
|
|
1366
|
+
var f;
|
|
1367
|
+
const i = /* @__PURE__ */ new Map(), r = (f = t.helpers.getSDKConfiguration()) == null ? void 0 : f.idSchema, l = /* @__PURE__ */ new Map();
|
|
1368
1368
|
if (r && r !== "native") {
|
|
1369
|
-
const
|
|
1369
|
+
const p = await t.idMapping.getMappedFootballMatchIds(
|
|
1370
1370
|
e,
|
|
1371
1371
|
r,
|
|
1372
1372
|
"native"
|
|
1373
1373
|
);
|
|
1374
|
-
((
|
|
1375
|
-
|
|
1374
|
+
((p == null ? void 0 : p.data) ?? []).forEach((c) => {
|
|
1375
|
+
c.input && c.output && l.set(c.output, c.input);
|
|
1376
1376
|
});
|
|
1377
1377
|
} else
|
|
1378
|
-
e.forEach((
|
|
1379
|
-
const
|
|
1378
|
+
e.forEach((p) => l.set(p, p));
|
|
1379
|
+
const a = await $t(
|
|
1380
1380
|
t,
|
|
1381
1381
|
[...l.keys()],
|
|
1382
1382
|
o
|
|
1383
1383
|
);
|
|
1384
|
-
if (!
|
|
1385
|
-
const
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
]),
|
|
1384
|
+
if (!a.length) return i;
|
|
1385
|
+
const h = Ot(t), b = a.flatMap((p) => [
|
|
1386
|
+
p.competitor_one,
|
|
1387
|
+
p.competitor_two,
|
|
1388
|
+
p.competition_id
|
|
1389
|
+
]), S = h ? await At(h, b, {
|
|
1390
1390
|
partial: !0,
|
|
1391
1391
|
disableCache: o
|
|
1392
|
-
}) : [],
|
|
1393
|
-
return
|
|
1392
|
+
}) : [], d = new Map(S.map((p) => [p.id, p]));
|
|
1393
|
+
return a.forEach((p) => {
|
|
1394
1394
|
var v, $;
|
|
1395
|
-
const
|
|
1396
|
-
if (!
|
|
1395
|
+
const c = d.get(p.competitor_one), m = d.get(p.competitor_two), g = X(c, n), u = X(m, n);
|
|
1396
|
+
if (!g || p.competitor_two && !u) {
|
|
1397
1397
|
console.warn(
|
|
1398
|
-
`[betslip] Event ${
|
|
1398
|
+
`[betslip] Event ${p.id} has no competitor names in the Search API.`
|
|
1399
1399
|
);
|
|
1400
1400
|
return;
|
|
1401
1401
|
}
|
|
1402
|
-
const x =
|
|
1403
|
-
|
|
1402
|
+
const x = d.get(p.competition_id), w = X(x, n), C = l.get(p.id) ?? p.id;
|
|
1403
|
+
i.set(C, {
|
|
1404
1404
|
eventId: C,
|
|
1405
|
-
participantOne: { name:
|
|
1406
|
-
participantTwo:
|
|
1407
|
-
startAt: ((v =
|
|
1408
|
-
matchStatus: be(($ =
|
|
1405
|
+
participantOne: { name: g, logo: K(c) },
|
|
1406
|
+
participantTwo: u ? { name: u, logo: K(m) } : void 0,
|
|
1407
|
+
startAt: ((v = p.timing) == null ? void 0 : v.start_time) ?? p.start_time,
|
|
1408
|
+
matchStatus: be(($ = p.status) == null ? void 0 : $.type),
|
|
1409
1409
|
competition: w ? { name: w, logo: K(x) } : void 0
|
|
1410
1410
|
});
|
|
1411
|
-
}),
|
|
1411
|
+
}), i;
|
|
1412
1412
|
}
|
|
1413
1413
|
function Se(t, e, n) {
|
|
1414
|
-
const [o,
|
|
1414
|
+
const [o, i] = I([]), [r, l] = I((e == null ? void 0 : e.length) > 0), a = Tt(), h = D(/* @__PURE__ */ new Map()), b = D(/* @__PURE__ */ new Set()), S = JSON.stringify(e);
|
|
1415
1415
|
return T(() => {
|
|
1416
1416
|
if (!(e != null && e.length)) {
|
|
1417
|
-
|
|
1417
|
+
i([]), l(!1);
|
|
1418
1418
|
return;
|
|
1419
1419
|
}
|
|
1420
|
-
let
|
|
1421
|
-
const
|
|
1422
|
-
const
|
|
1423
|
-
return { id:
|
|
1424
|
-
}),
|
|
1420
|
+
let d = !1;
|
|
1421
|
+
const f = e.map((c) => {
|
|
1422
|
+
const m = c.split(":"), g = m[m.length - 1], u = m[m.length - 2], x = m.slice(0, m.length - 2).join(":");
|
|
1423
|
+
return { id: c, eventId: x, market: u, outcome: g };
|
|
1424
|
+
}), p = [...new Set(f.map((c) => c.eventId))];
|
|
1425
1425
|
return l(!0), (async () => {
|
|
1426
|
-
let
|
|
1426
|
+
let c = /* @__PURE__ */ new Map();
|
|
1427
1427
|
try {
|
|
1428
|
-
|
|
1428
|
+
c = await ye(
|
|
1429
1429
|
t,
|
|
1430
|
-
|
|
1430
|
+
p,
|
|
1431
1431
|
n,
|
|
1432
|
-
|
|
1432
|
+
a
|
|
1433
1433
|
);
|
|
1434
|
-
} catch (
|
|
1435
|
-
console.warn("[betslip] Sports API event lookup failed:",
|
|
1434
|
+
} catch (g) {
|
|
1435
|
+
console.warn("[betslip] Sports API event lookup failed:", g);
|
|
1436
1436
|
}
|
|
1437
|
-
if (
|
|
1438
|
-
|
|
1439
|
-
const
|
|
1440
|
-
const C =
|
|
1441
|
-
return C ? (
|
|
1442
|
-
`[betslip] Dropping "${
|
|
1437
|
+
if (d) return;
|
|
1438
|
+
c.forEach((g, u) => h.current.set(u, g));
|
|
1439
|
+
const m = f.flatMap(({ id: g, eventId: u, market: x, outcome: w }) => {
|
|
1440
|
+
const C = c.get(u) ?? h.current.get(u);
|
|
1441
|
+
return C ? (b.current.delete(g), [{ ...C, market: x, outcome: w }]) : (b.current.has(g) || (b.current.add(g), console.warn(
|
|
1442
|
+
`[betslip] Dropping "${g}": event ${u} was not found in the Sports API.`
|
|
1443
1443
|
)), []);
|
|
1444
1444
|
});
|
|
1445
|
-
|
|
1445
|
+
i(m), l(!1);
|
|
1446
1446
|
})(), () => {
|
|
1447
|
-
|
|
1447
|
+
d = !0;
|
|
1448
1448
|
};
|
|
1449
|
-
}, [
|
|
1449
|
+
}, [S, a, n]), { selectionInputs: o, loading: r };
|
|
1450
1450
|
}
|
|
1451
|
-
const xe =
|
|
1451
|
+
const xe = P`
|
|
1452
1452
|
from { transform: translateY(100%); opacity: 0; }
|
|
1453
1453
|
to { transform: translateY(0); opacity: 1; }
|
|
1454
|
-
`, ve =
|
|
1454
|
+
`, ve = P`
|
|
1455
1455
|
from { transform: translateY(-100%); opacity: 0; }
|
|
1456
1456
|
to { transform: translateY(0); opacity: 1; }
|
|
1457
1457
|
`, mt = (t) => k({
|
|
@@ -1460,39 +1460,39 @@ const xe = H`
|
|
|
1460
1460
|
animation: `${t} 0.22s ease`
|
|
1461
1461
|
}), ut = {
|
|
1462
1462
|
wrapper: { top: mt(ve), bottom: mt(xe) }
|
|
1463
|
-
},
|
|
1463
|
+
}, F = 320, ft = 340;
|
|
1464
1464
|
function we(t) {
|
|
1465
|
-
return t === "bottom-right" ? { bottom: 16, right: 16, width:
|
|
1465
|
+
return t === "bottom-right" ? { bottom: 16, right: 16, width: F } : t === "bottom-left" ? { bottom: 16, left: 16, width: F } : t === "top-right" ? { top: 16, right: 16, width: F } : t === "top-left" ? { top: 16, left: 16, width: F } : { bottom: 16, right: 16, width: F };
|
|
1466
1466
|
}
|
|
1467
|
-
const Ce = () => {
|
|
1468
|
-
const { selectionInputs:
|
|
1467
|
+
const Ce = ({ owner: t }) => {
|
|
1468
|
+
const { selectionInputs: e, combStake: n, selections: o } = L(), i = parseFloat(n) || 0, r = o.length ? o.reduce((l, a) => l * a.odds, 1) : 0;
|
|
1469
1469
|
return T(() => {
|
|
1470
|
-
G._notify({ selections:
|
|
1471
|
-
}, [
|
|
1470
|
+
G._notify({ selections: e, stake: i, totalOdds: r }, t);
|
|
1471
|
+
}, [e, i, r, t]), null;
|
|
1472
1472
|
}, Re = ({ props: t }) => {
|
|
1473
|
-
var C, v, $,
|
|
1473
|
+
var C, v, $, N, M, j, R, Y, z, Q;
|
|
1474
1474
|
const { position: e = "bottom-right", brandingLogoUrl: n } = t, {
|
|
1475
1475
|
open: o,
|
|
1476
|
-
setOpen:
|
|
1476
|
+
setOpen: i,
|
|
1477
1477
|
selections: r,
|
|
1478
1478
|
maxSelections: l,
|
|
1479
|
-
bookmakerLogoUrl:
|
|
1480
|
-
bookmakerBackgroundColor:
|
|
1481
|
-
oddsReady:
|
|
1482
|
-
} = L(),
|
|
1483
|
-
|
|
1484
|
-
),
|
|
1485
|
-
if (!
|
|
1486
|
-
if (
|
|
1487
|
-
const O = e === "side-right",
|
|
1488
|
-
return /* @__PURE__ */
|
|
1479
|
+
bookmakerLogoUrl: a,
|
|
1480
|
+
bookmakerBackgroundColor: h,
|
|
1481
|
+
oddsReady: b
|
|
1482
|
+
} = L(), S = ((M = (N = ($ = (v = (C = t.themeOptions) == null ? void 0 : C.colorSchemes) == null ? void 0 : v.light) == null ? void 0 : $.palette) == null ? void 0 : N.primary) == null ? void 0 : M.plainColor) != null || ((Q = (z = (Y = (R = (j = t.themeOptions) == null ? void 0 : j.colorSchemes) == null ? void 0 : R.dark) == null ? void 0 : Y.palette) == null ? void 0 : z.primary) == null ? void 0 : Q.plainColor) != null, d = te(
|
|
1483
|
+
S ? void 0 : h
|
|
1484
|
+
), f = ee(d), p = B(), c = q(), m = e.startsWith("side"), g = e === "top-right" || e === "top-left", { t: u } = E();
|
|
1485
|
+
if (!b) return null;
|
|
1486
|
+
if (m) {
|
|
1487
|
+
const O = e === "side-right", V = O ? "right" : "left", Z = n || a, xt = o ? ft : 0, vt = o ? "translateX(0)" : `translateX(${O ? "100%" : "-100%"})`;
|
|
1488
|
+
return /* @__PURE__ */ y(
|
|
1489
1489
|
"div",
|
|
1490
1490
|
{
|
|
1491
1491
|
style: {
|
|
1492
|
-
...
|
|
1492
|
+
...f,
|
|
1493
1493
|
position: "fixed",
|
|
1494
1494
|
top: 0,
|
|
1495
|
-
[
|
|
1495
|
+
[V]: 0,
|
|
1496
1496
|
zIndex: 999,
|
|
1497
1497
|
height: "100vh",
|
|
1498
1498
|
width: 0,
|
|
@@ -1500,16 +1500,16 @@ const Ce = () => {
|
|
|
1500
1500
|
overflow: "visible"
|
|
1501
1501
|
},
|
|
1502
1502
|
children: [
|
|
1503
|
-
/* @__PURE__ */
|
|
1503
|
+
/* @__PURE__ */ y(
|
|
1504
1504
|
"div",
|
|
1505
1505
|
{
|
|
1506
1506
|
style: {
|
|
1507
1507
|
position: "absolute",
|
|
1508
|
-
[
|
|
1508
|
+
[V]: xt,
|
|
1509
1509
|
top: "33%",
|
|
1510
1510
|
transform: "translateY(-50%)",
|
|
1511
1511
|
pointerEvents: "all",
|
|
1512
|
-
transition: `${
|
|
1512
|
+
transition: `${V} 0.3s ease`,
|
|
1513
1513
|
display: "flex",
|
|
1514
1514
|
flexDirection: "column",
|
|
1515
1515
|
alignItems: "center",
|
|
@@ -1519,8 +1519,8 @@ const Ce = () => {
|
|
|
1519
1519
|
/* @__PURE__ */ s(
|
|
1520
1520
|
"button",
|
|
1521
1521
|
{
|
|
1522
|
-
onClick: () =>
|
|
1523
|
-
title:
|
|
1522
|
+
onClick: () => i(!o),
|
|
1523
|
+
title: u(o ? "betslip.hide" : "betslip.show"),
|
|
1524
1524
|
style: {
|
|
1525
1525
|
position: "relative",
|
|
1526
1526
|
display: "flex",
|
|
@@ -1528,7 +1528,7 @@ const Ce = () => {
|
|
|
1528
1528
|
justifyContent: "center",
|
|
1529
1529
|
width: 32,
|
|
1530
1530
|
height: 64,
|
|
1531
|
-
background:
|
|
1531
|
+
background: d.primary,
|
|
1532
1532
|
border: "none",
|
|
1533
1533
|
cursor: "pointer",
|
|
1534
1534
|
borderRadius: O ? "8px 0 0 8px" : "0 8px 8px 0",
|
|
@@ -1552,7 +1552,7 @@ const Ce = () => {
|
|
|
1552
1552
|
transform: `translate(-50%, -50%) rotate(${O ? "-90" : "90"}deg)`
|
|
1553
1553
|
}
|
|
1554
1554
|
}
|
|
1555
|
-
) : /* @__PURE__ */
|
|
1555
|
+
) : /* @__PURE__ */ y("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
|
|
1556
1556
|
/* @__PURE__ */ s(
|
|
1557
1557
|
"div",
|
|
1558
1558
|
{
|
|
@@ -1589,7 +1589,7 @@ const Ce = () => {
|
|
|
1589
1589
|
] })
|
|
1590
1590
|
}
|
|
1591
1591
|
),
|
|
1592
|
-
!o && l != null && /* @__PURE__ */
|
|
1592
|
+
!o && l != null && /* @__PURE__ */ y(
|
|
1593
1593
|
"div",
|
|
1594
1594
|
{
|
|
1595
1595
|
style: {
|
|
@@ -1597,8 +1597,8 @@ const Ce = () => {
|
|
|
1597
1597
|
fontSize: "0.625rem",
|
|
1598
1598
|
fontWeight: 700,
|
|
1599
1599
|
color: "#fff",
|
|
1600
|
-
fontFamily:
|
|
1601
|
-
background:
|
|
1600
|
+
fontFamily: d.font,
|
|
1601
|
+
background: d.primary,
|
|
1602
1602
|
borderRadius: 4,
|
|
1603
1603
|
padding: "2px 5px",
|
|
1604
1604
|
whiteSpace: "nowrap",
|
|
@@ -1614,13 +1614,13 @@ const Ce = () => {
|
|
|
1614
1614
|
]
|
|
1615
1615
|
}
|
|
1616
1616
|
),
|
|
1617
|
-
/* @__PURE__ */
|
|
1617
|
+
/* @__PURE__ */ y(
|
|
1618
1618
|
"div",
|
|
1619
1619
|
{
|
|
1620
1620
|
style: {
|
|
1621
1621
|
position: "absolute",
|
|
1622
1622
|
top: 0,
|
|
1623
|
-
[
|
|
1623
|
+
[V]: 0,
|
|
1624
1624
|
width: ft,
|
|
1625
1625
|
height: "100%",
|
|
1626
1626
|
transform: vt,
|
|
@@ -1628,21 +1628,21 @@ const Ce = () => {
|
|
|
1628
1628
|
pointerEvents: o ? "all" : "none",
|
|
1629
1629
|
display: "flex",
|
|
1630
1630
|
flexDirection: "column",
|
|
1631
|
-
background:
|
|
1631
|
+
background: d.s1,
|
|
1632
1632
|
boxShadow: O ? "-6px 0 24px rgba(0,0,0,.18)" : "6px 0 24px rgba(0,0,0,.18)",
|
|
1633
|
-
outline: `${
|
|
1633
|
+
outline: `${c.size} solid ${d.bdr}`
|
|
1634
1634
|
},
|
|
1635
1635
|
children: [
|
|
1636
1636
|
/* @__PURE__ */ s(
|
|
1637
1637
|
nt,
|
|
1638
1638
|
{
|
|
1639
|
-
tokens:
|
|
1640
|
-
isSide:
|
|
1639
|
+
tokens: d,
|
|
1640
|
+
isSide: m,
|
|
1641
1641
|
position: e,
|
|
1642
1642
|
brandingLogoUrl: n
|
|
1643
1643
|
}
|
|
1644
1644
|
),
|
|
1645
|
-
/* @__PURE__ */
|
|
1645
|
+
/* @__PURE__ */ y(
|
|
1646
1646
|
"div",
|
|
1647
1647
|
{
|
|
1648
1648
|
style: {
|
|
@@ -1653,8 +1653,8 @@ const Ce = () => {
|
|
|
1653
1653
|
overflow: "hidden"
|
|
1654
1654
|
},
|
|
1655
1655
|
children: [
|
|
1656
|
-
/* @__PURE__ */ s(ct, { tokens:
|
|
1657
|
-
/* @__PURE__ */ s(pt, { tokens:
|
|
1656
|
+
/* @__PURE__ */ s(ct, { tokens: d, isSide: m }),
|
|
1657
|
+
/* @__PURE__ */ s(pt, { tokens: d, brandingLogoUrl: n })
|
|
1658
1658
|
]
|
|
1659
1659
|
}
|
|
1660
1660
|
)
|
|
@@ -1665,35 +1665,35 @@ const Ce = () => {
|
|
|
1665
1665
|
}
|
|
1666
1666
|
);
|
|
1667
1667
|
}
|
|
1668
|
-
const x =
|
|
1668
|
+
const x = g ? `0 0 ${p.md} ${p.md}` : `${p.md} ${p.md} 0 0`, w = we(e);
|
|
1669
1669
|
return /* @__PURE__ */ s(
|
|
1670
1670
|
"div",
|
|
1671
1671
|
{
|
|
1672
1672
|
css: e.startsWith("top") ? ut.wrapper.top : ut.wrapper.bottom,
|
|
1673
1673
|
style: {
|
|
1674
|
-
...
|
|
1675
|
-
fontFamily:
|
|
1674
|
+
...f,
|
|
1675
|
+
fontFamily: d.font,
|
|
1676
1676
|
borderRadius: x,
|
|
1677
1677
|
overflow: "hidden",
|
|
1678
|
-
boxShadow:
|
|
1679
|
-
outline: `${
|
|
1678
|
+
boxShadow: g ? "0 4px 16px rgba(0,0,0,.2)" : "0 -4px 16px rgba(0,0,0,.2)",
|
|
1679
|
+
outline: `${c.size} solid ${d.primary}`,
|
|
1680
1680
|
...w
|
|
1681
1681
|
},
|
|
1682
|
-
children: /* @__PURE__ */
|
|
1682
|
+
children: /* @__PURE__ */ y(
|
|
1683
1683
|
"div",
|
|
1684
1684
|
{
|
|
1685
1685
|
style: {
|
|
1686
1686
|
display: "flex",
|
|
1687
1687
|
flexDirection: "column",
|
|
1688
1688
|
maxHeight: "calc(100vh - 64px)",
|
|
1689
|
-
background:
|
|
1689
|
+
background: d.s1
|
|
1690
1690
|
},
|
|
1691
1691
|
children: [
|
|
1692
1692
|
/* @__PURE__ */ s(
|
|
1693
1693
|
nt,
|
|
1694
1694
|
{
|
|
1695
|
-
tokens:
|
|
1696
|
-
isSide:
|
|
1695
|
+
tokens: d,
|
|
1696
|
+
isSide: m,
|
|
1697
1697
|
position: e,
|
|
1698
1698
|
brandingLogoUrl: n
|
|
1699
1699
|
}
|
|
@@ -1701,11 +1701,11 @@ const Ce = () => {
|
|
|
1701
1701
|
!o && r.length > 0 && /* @__PURE__ */ s(
|
|
1702
1702
|
oe,
|
|
1703
1703
|
{
|
|
1704
|
-
tokens:
|
|
1704
|
+
tokens: d,
|
|
1705
1705
|
brandingLogoUrl: n
|
|
1706
1706
|
}
|
|
1707
1707
|
),
|
|
1708
|
-
o && /* @__PURE__ */
|
|
1708
|
+
o && /* @__PURE__ */ y(
|
|
1709
1709
|
"div",
|
|
1710
1710
|
{
|
|
1711
1711
|
style: {
|
|
@@ -1716,8 +1716,8 @@ const Ce = () => {
|
|
|
1716
1716
|
overflow: "hidden"
|
|
1717
1717
|
},
|
|
1718
1718
|
children: [
|
|
1719
|
-
/* @__PURE__ */ s(ct, { tokens:
|
|
1720
|
-
/* @__PURE__ */ s(pt, { tokens:
|
|
1719
|
+
/* @__PURE__ */ s(ct, { tokens: d, isSide: m }),
|
|
1720
|
+
/* @__PURE__ */ s(pt, { tokens: d, brandingLogoUrl: n })
|
|
1721
1721
|
]
|
|
1722
1722
|
}
|
|
1723
1723
|
)
|
|
@@ -1727,64 +1727,74 @@ const Ce = () => {
|
|
|
1727
1727
|
}
|
|
1728
1728
|
);
|
|
1729
1729
|
}, ke = (t) => {
|
|
1730
|
-
const [e, n] = I([]), o =
|
|
1730
|
+
const [e, n] = I([]), [o] = I(() => ({})), i = D(e);
|
|
1731
|
+
i.current = e;
|
|
1732
|
+
const r = D(/* @__PURE__ */ new Set()), { selectionInputs: l, loading: a } = Se(
|
|
1731
1733
|
t.sdk,
|
|
1732
1734
|
e,
|
|
1733
1735
|
t.language
|
|
1734
|
-
),
|
|
1736
|
+
), h = l.filter(
|
|
1735
1737
|
(c) => c.matchStatus !== "finished"
|
|
1736
|
-
), { oddsMap:
|
|
1738
|
+
), { oddsMap: b, oddsMarkets: S } = Gt(
|
|
1737
1739
|
t.sdk,
|
|
1738
|
-
|
|
1740
|
+
h,
|
|
1739
1741
|
t.oddsPollingInterval || 3e4,
|
|
1740
1742
|
{ operatorId: t.operatorId, affiliateId: t.affiliateId }
|
|
1741
|
-
),
|
|
1742
|
-
|
|
1743
|
-
const
|
|
1744
|
-
n((
|
|
1745
|
-
const
|
|
1746
|
-
const
|
|
1747
|
-
return
|
|
1743
|
+
), d = J((c) => {
|
|
1744
|
+
r.current.delete(c);
|
|
1745
|
+
const m = c.split(":"), g = m[m.length - 2], u = m.slice(0, m.length - 2).join(":");
|
|
1746
|
+
n((x) => {
|
|
1747
|
+
const w = x.findIndex((C) => {
|
|
1748
|
+
const v = C.split(":");
|
|
1749
|
+
return v.slice(0, v.length - 2).join(":") === u && v[v.length - 2] === g;
|
|
1748
1750
|
});
|
|
1749
|
-
if (
|
|
1750
|
-
const
|
|
1751
|
-
return
|
|
1751
|
+
if (w !== -1) {
|
|
1752
|
+
const C = [...x];
|
|
1753
|
+
return C[w] = c, C;
|
|
1752
1754
|
}
|
|
1753
|
-
return [...
|
|
1755
|
+
return [...x, c];
|
|
1754
1756
|
});
|
|
1755
|
-
}, []),
|
|
1756
|
-
n((
|
|
1757
|
+
}, []), f = J((c) => {
|
|
1758
|
+
n((m) => m.filter((g) => g !== c));
|
|
1757
1759
|
}, []);
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
}, [
|
|
1761
|
-
|
|
1762
|
-
var
|
|
1763
|
-
const
|
|
1764
|
-
if (Yt(
|
|
1765
|
-
if (!
|
|
1766
|
-
|
|
1767
|
-
const
|
|
1760
|
+
T(() => {
|
|
1761
|
+
l.filter((c) => c.matchStatus === "finished").forEach((c) => f(`${c.eventId}:${c.market}:${c.outcome}`));
|
|
1762
|
+
}, [l, f]), T(() => {
|
|
1763
|
+
h.forEach((c) => {
|
|
1764
|
+
var g, u;
|
|
1765
|
+
const m = `${c.eventId}:${c.market}:${c.outcome}`;
|
|
1766
|
+
if (Yt(b, S, c.eventId, c.market, m)) {
|
|
1767
|
+
if (!r.current.has(m)) {
|
|
1768
|
+
r.current.add(m);
|
|
1769
|
+
const x = ((u = (g = ((b == null ? void 0 : b.get(c.eventId)) ?? [])[0]) == null ? void 0 : g.bookmaker) == null ? void 0 : u.name) ?? "the bookmaker";
|
|
1768
1770
|
console.warn(
|
|
1769
|
-
`[betslip] Removing "${
|
|
1771
|
+
`[betslip] Removing "${m}": ${x} returned no ${c.market} odds for this event.`
|
|
1770
1772
|
);
|
|
1771
1773
|
}
|
|
1772
|
-
|
|
1774
|
+
f(m);
|
|
1773
1775
|
}
|
|
1774
1776
|
});
|
|
1775
|
-
}, [
|
|
1777
|
+
}, [b, S, h, f]), T(() => (G._mount(
|
|
1778
|
+
{ setSelection: d, removeSelection: f, getSelectionIds: () => i.current },
|
|
1779
|
+
o,
|
|
1780
|
+
{ embedded: t.embedded }
|
|
1781
|
+
), () => G._unmount(o)), [d, f, o, t.embedded]);
|
|
1782
|
+
const p = D(!1);
|
|
1783
|
+
return T(() => {
|
|
1784
|
+
e.length ? p.current = !0 : p.current && (p.current = !1, G._notify({ selections: [], stake: 0, totalOdds: 0 }, o));
|
|
1785
|
+
}, [e.length, o]), !e.length || !h.length && a ? null : /* @__PURE__ */ y(
|
|
1776
1786
|
Zt,
|
|
1777
1787
|
{
|
|
1778
1788
|
labels: t.labels,
|
|
1779
|
-
initialSelections:
|
|
1789
|
+
initialSelections: h,
|
|
1780
1790
|
maxSelections: t.maxSelections,
|
|
1781
1791
|
currency: t.currency,
|
|
1782
1792
|
stakePresets: t.stakePresets,
|
|
1783
1793
|
ctaUrlTemplate: t.ctaUrlTemplate,
|
|
1784
|
-
onExternalRemove:
|
|
1785
|
-
sharedOddsMap:
|
|
1794
|
+
onExternalRemove: f,
|
|
1795
|
+
sharedOddsMap: b,
|
|
1786
1796
|
children: [
|
|
1787
|
-
/* @__PURE__ */ s(Ce, {}),
|
|
1797
|
+
/* @__PURE__ */ s(Ce, { owner: o }),
|
|
1788
1798
|
/* @__PURE__ */ s(Re, { props: t })
|
|
1789
1799
|
]
|
|
1790
1800
|
}
|