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.
Files changed (62) hide show
  1. package/Betslip.js +2 -2
  2. package/ChanceGame.js +496 -505
  3. package/ClassicQuizPlay.js +2 -2
  4. package/CollectLead.js +405 -1163
  5. package/CompetitionStatistics.js +2 -2
  6. package/CompetitorCard.js +445 -425
  7. package/Discussion.js +2 -2
  8. package/EitherOrPlay.js +2 -2
  9. package/EventCard.js +648 -593
  10. package/EventGamePlay.js +2 -2
  11. package/Leaderboard.js +142 -132
  12. package/List.js +675 -713
  13. package/MatchQuizPlay.js +2 -2
  14. package/Odds.js +1 -1
  15. package/PersonalityQuizPlay.js +2 -2
  16. package/PickThePair.js +925 -1824
  17. package/PlayerOfTheMatch.js +2106 -2223
  18. package/PollVote.js +2 -2
  19. package/Predictor.js +4209 -18629
  20. package/Standings.js +497 -486
  21. package/TopX.js +3223 -16958
  22. package/chunks/{ChanceGameEmbedVariant-DM9eLG5s.js → ChanceGameEmbedVariant-z8XYzgDW.js} +1 -1
  23. package/chunks/PickOneOfX-IvE4OvyT.js +3146 -0
  24. package/chunks/index-BNl8scz6.js +4 -0
  25. package/chunks/index-CSa2JU4m.js +4 -0
  26. package/chunks/index-CVRI82Gb.js +4 -0
  27. package/chunks/index-Cd1dg0KI.js +4 -0
  28. package/chunks/index-Cei2fzi7.js +4 -0
  29. package/chunks/index-Cxb4wEJU.js +4 -0
  30. package/chunks/index-w1LGN5dz.js +4 -0
  31. package/chunks/main-07vzblS8.js +2091 -0
  32. package/chunks/main-C7X4dM_P.js +4827 -0
  33. package/chunks/main-D_QDfmAw.js +6417 -0
  34. package/chunks/{main-CzfWaEQP.js → main-DdL0UekL.js} +1931 -2025
  35. package/chunks/main-DmBfwyb4.js +2992 -0
  36. package/chunks/main-LEE8n2cG.js +3117 -0
  37. package/chunks/{main-DxvBjXsd.js → main-P2WNvBZE.js} +473 -444
  38. package/chunks/{main-DiBlJBNb.js → main-gV165E-A.js} +629 -657
  39. package/chunks/predictionsHelpers-fwXaMadu.js +10063 -0
  40. package/chunks/{withVersionStamp-BsLyhvNA.js → withVersionStamp-CPDfSE5H.js} +1 -1
  41. package/package.json +2 -6
  42. package/withVersionStamp.d.ts.map +1 -1
  43. package/chunks/CheckCircle-I1FktW5Y.js +0 -13
  44. package/chunks/Person-CXRqyF4E.js +0 -11
  45. package/chunks/PickOneOfX-DET4ZhjV.js +0 -3117
  46. package/chunks/Search-CIXthh0D.js +0 -17
  47. package/chunks/TimerOutlined-D-WA_vpE.js +0 -8
  48. package/chunks/WorkspacePremiumOutlined-DUXVgJlF.js +0 -136
  49. package/chunks/chevrons-right-HWKW2c4I.js +0 -45
  50. package/chunks/createLucideIcon-YBRjY5Kl.js +0 -79
  51. package/chunks/index-BENM3N_w.js +0 -4
  52. package/chunks/index-BRxAV693.js +0 -4
  53. package/chunks/index-BXYTsvIX.js +0 -4
  54. package/chunks/index-C0ilols1.js +0 -4
  55. package/chunks/index-D7VhczXH.js +0 -4
  56. package/chunks/index-DKwvdw9t.js +0 -4
  57. package/chunks/index-DZN-AITW.js +0 -4
  58. package/chunks/main-B2sDRFF4.js +0 -2184
  59. package/chunks/main-DFNl3g_U.js +0 -4910
  60. package/chunks/main-DLwnvntz.js +0 -4020
  61. package/chunks/main-S8_NDSiY.js +0 -3209
  62. package/chunks/main-lBgr8Liq.js +0 -6571
@@ -1,42 +1,42 @@
1
- import { jsx as s, jsxs as S, Fragment as vt } from "@emotion/react/jsx-runtime";
2
- import { WidgetPortal as wt } from "fansunited-frontend-core/ui/emotion";
3
- import Y, { useState as k, useRef as M, useEffect as L, createContext as Ct, useMemo as tt, useCallback as X, useContext as Rt } from "react";
4
- import { css as _, keyframes as U } from "@emotion/react";
5
- import { isMobile as kt, useColors as _t, useFontFamily as It, useCurrentThemeMode as Et, useSpacingScale as O, useCornerRadius as A, useBorderSize as J, toIntlLocale as et, useDisableCache as Lt, fetchEventsByIds as Tt, getSportsApiCredentials as $t, fetchSearchEntitiesByIds as Ot, betslipApi as j } from "fansunited-frontend-core";
6
- import { useTranslation as I } from "react-i18next";
7
- import { MatchOddsFilters as At } from "fansunited-sdk-esm/models";
8
- import { KeyboardArrowDownIcon as zt, KeyboardArrowUpIcon as Bt } from "fansunited-frontend-core/ui/icons";
9
- function Dt(t, e, n, o, a, i) {
10
- const l = o ?? "Away", r = e.toLowerCase(), m = (i == null ? void 0 : i.draw) || a("betslip.outcomes.draw"), b = (i == null ? void 0 : i.yes) || a("betslip.outcomes.yes"), h = (i == null ? void 0 : i.no) || a("betslip.outcomes.no"), c = (i == null ? void 0 : i.over) || a("betslip.outcomes.over"), p = (i == null ? void 0 : i.under) || a("betslip.outcomes.under"), d = (i == null ? void 0 : i.noGoal) || a("betslip.outcomes.noGoal"), f = (i == null ? void 0 : i.nobody) || a("betslip.outcomes.nobody"), g = (i == null ? void 0 : i.or) || a("betslip.outcomes.or");
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 (r === "x") return m;
15
+ if (i === "x") return u;
16
16
  if (e === "2") return l;
17
17
  break;
18
18
  case "DOUBLE_CHANCE": {
19
- const u = e.toUpperCase();
20
- if (u === "1X") return `${n} ${g} ${m}`;
21
- if (u === "12") return `${n} ${g} ${l}`;
22
- if (u === "X2") return `${m} ${g} ${l}`;
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 (r === "yes") return b;
29
- if (r === "no") return h;
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 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 : m : e;
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 u = e.toUpperCase();
39
- return (u.includes("/") ? u.split("/") : u.split("")).map((w) => w === "1" ? n : w === "2" ? l : m).join(" / ");
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 (r === "none" || r === "no goal") return d;
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 r === "none" || r === "no goal" || r === "nobody" ? f : e;
57
+ return i === "none" || i === "no goal" || i === "nobody" ? h : e;
58
58
  }
59
- const y = t.match(/^(OVER|UNDER)_(GOALS|CORNERS)_(\d+)_(\d+)$/i);
60
- if (y) {
61
- const w = y[1].toUpperCase() === "OVER" !== (r === "no" || r === "under") ? c : p, C = `${y[3]}.${y[4]}`;
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 Wt(t) {
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 Ft(t, e, n) {
74
+ function Ht(t, e, n) {
75
75
  return t.map((o) => {
76
- var a, i, l;
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: Wt(o),
81
+ event: Ft(o),
82
82
  market: o.market,
83
- name: Dt(
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: (i = o.participantTwo) == null ? void 0 : i.name,
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 Ht = {
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 Pt(t) {
115
+ function Nt(t) {
116
116
  return t.replace(/^FT_/i, "").toLowerCase();
117
117
  }
118
- const ft = /^(OVER|UNDER)_(GOALS|CORNERS)_(\d+)_(\d+)$/i;
119
- function Nt(t, e) {
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 === Pt(e)) return !0;
122
- const o = Ht[e];
123
- return !!(o !== void 0 && o.includes(n) || ft.test(e) && n === "over_under");
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 Mt(t) {
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 m, b, h, c, p, d;
130
+ var u, y, g, c, p, d;
131
131
  if (!t) return null;
132
- const o = Mt(n), a = e.match(ft), i = a !== null, l = i ? o.toLowerCase() === "no" ? "under" : o.toLowerCase() === "yes" ? "over" : o.toLowerCase() : null, r = i ? `${a[3]}.${a[4]}` : null;
133
- for (const f of t.markets ?? []) {
134
- const g = ((m = f == null ? void 0 : f.type) == null ? void 0 : m.code) ?? "";
135
- if (!Nt(g, e)) continue;
136
- const y = g.toLowerCase() !== "over_under";
137
- for (const u of f.selections ?? [])
138
- if (i) {
139
- const x = ((b = u.code) == null ? void 0 : b.toLowerCase()) === l || ((h = u.name) == null ? void 0 : h.toLowerCase()) === l, w = y || r === null || ((c = u.value) == null ? void 0 : c.toString()) === r;
140
- if (x && w) return u;
141
- } else if (((p = u.code) == null ? void 0 : p.toLowerCase()) === o.toLowerCase() || ((d = u.name) == null ? void 0 : d.toLowerCase()) === o.toLowerCase())
142
- return u;
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 jt(t, e, n, o, a) {
146
+ function Yt(t, e, n, o, a) {
147
147
  if (!t || !e.includes(o) || !t.has(n)) return !1;
148
- const i = (t.get(n) ?? [])[0];
149
- return gt(i, o, a) === null;
148
+ const r = (t.get(n) ?? [])[0];
149
+ return gt(r, o, a) === null;
150
150
  }
151
- function Yt(t, e) {
151
+ function Vt(t, e) {
152
152
  return t.map((n) => {
153
- var i, l, r;
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: ((i = a.providerInfo) == null ? void 0 : i.selectionId) ?? a.id ?? void 0,
162
- selectionUrl: ((r = (l = a.urls) == null ? void 0 : l[0]) == null ? void 0 : r.url) ?? void 0
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 Vt(t, e, n, o = {}) {
167
- const { operatorId: a, affiliateId: i } = o, [l, r] = k(null), [m, b] = k([]), [h, c] = k(!1), p = M(null), d = async (f) => {
168
- if (!t || f.length === 0) return;
169
- const g = [...new Set(f.map((x) => x.eventId))], y = [
170
- ...new Set(f.map((x) => x.market))
171
- ], u = new At({
172
- marketTypes: y,
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
- ...i ? { affiliateId: i } : {}
174
+ ...r ? { affiliateId: r } : {}
175
175
  });
176
176
  c(!0);
177
177
  try {
178
- const x = await t.odds.getByMatchIds(g, u);
179
- r(x), b(y);
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 L(() => (d(e), p.current && clearInterval(p.current), t && n > 0 && e.length > 0 && (p.current = setInterval(() => d(e), n)), () => {
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, i]), { oddsMap: l, oddsLoading: h, oddsMarkets: m };
187
+ }), [JSON.stringify(e), n, a, r]), { oddsMap: l, oddsLoading: g, oddsMarkets: u };
188
188
  }
189
- function Gt(t) {
189
+ function Xt(t) {
190
190
  var e, n, o;
191
191
  for (const a of t.values()) {
192
- const i = a[0];
193
- if (!i) continue;
194
- const l = (o = (n = (e = i.bookmaker) == null ? void 0 : e.assets) == null ? void 0 : n[0]) == null ? void 0 : o.transparentBackgroundUrl;
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 Xt(t, e) {
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 i = a[0];
203
- if (!i) continue;
204
- const l = ((o = i.bookmaker) == null ? void 0 : o.links) ?? [], r = l.find((m) => m.appType === n) ?? l[0];
205
- if (r != null && r.homepageUrl) return r.homepageUrl;
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 Kt(t, e) {
208
+ function Jt(t, e) {
209
209
  var o, a;
210
210
  const n = e ? "mobile" : "desktop";
211
- for (const i of t.values()) {
212
- const l = ((a = (o = i[0]) == null ? void 0 : o.bookmaker) == null ? void 0 : a.betslipUrlTemplate) ?? [], r = l.find((m) => m.appType === n) ?? l[0];
213
- if (r != null && r.url) return r.url;
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 Jt(t) {
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 qt(t) {
224
- var e, n, o, a, i;
223
+ function Qt(t) {
224
+ var e, n, o, a, r;
225
225
  for (const l of t.values()) {
226
- const r = l[0];
227
- if (!r) continue;
228
- const m = ((n = (e = r.bookmaker) == null ? void 0 : e.branding) == null ? void 0 : n.backgroundColor) ?? ((i = (a = (o = r.bookmaker) == null ? void 0 : o.assets) == null ? void 0 : a[0]) == null ? void 0 : i.backgroundColor);
229
- if (m) return m;
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 ht = Ct(null), Qt = ({
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: i,
238
+ ctaUrlTemplate: r,
239
239
  onExternalRemove: l,
240
- sharedOddsMap: r,
241
- children: m
240
+ sharedOddsMap: i,
241
+ children: u
242
242
  }) => {
243
- const { t: b } = I(), [h, c] = k(e), [p, d] = k(""), [f, g] = k(!0), y = kt();
244
- L(() => {
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
- }, [JSON.stringify(e)]);
247
- const u = tt(() => {
248
- if (!r) return !1;
249
- const R = r.values().next().value;
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
- }, [r]), x = tt(() => {
252
- const R = Ft(h, b, t.outcomeLabels);
253
- return r ? Yt(R, r) : R;
254
- }, [h, r, b, t.outcomeLabels]), w = r ? Gt(r) : void 0, C = r ? Xt(r, y) : void 0, v = r ? qt(r) : void 0, T = r ? Kt(r, y) : void 0, W = r ? Jt(r) : void 0, F = X(
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
- (H) => H.filter((z) => `${z.eventId}:${z.market}:${z.outcome}` !== R)
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
- ht.Provider,
263
+ bt.Provider,
264
264
  {
265
265
  value: {
266
266
  labels: t,
267
- selectionInputs: h,
268
- selections: x,
267
+ selectionInputs: g,
268
+ selections: w,
269
269
  combStake: p,
270
- open: f,
270
+ open: h,
271
271
  oddsLoading: !1,
272
- oddsReady: u,
272
+ oddsReady: x,
273
273
  currency: o,
274
274
  stakePresets: a,
275
- ctaUrlTemplate: i,
275
+ ctaUrlTemplate: r,
276
276
  maxSelections: n,
277
- bookmakerLogoUrl: w,
278
- bookmakerHomepageUrl: C,
279
- bookmakerBackgroundColor: v,
280
- bookmakerBetslipTemplate: T,
281
- bookmakerIdSeparator: W,
282
- onRemove: F,
277
+ bookmakerLogoUrl: C,
278
+ bookmakerHomepageUrl: v,
279
+ bookmakerBackgroundColor: $,
280
+ bookmakerBetslipTemplate: P,
281
+ bookmakerIdSeparator: N,
282
+ onRemove: M,
283
283
  setCombStake: d,
284
- setOpen: g
284
+ setOpen: f
285
285
  },
286
- children: m
286
+ children: u
287
287
  }
288
288
  );
289
- }, E = () => {
290
- const t = Rt(ht);
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 Zt(t) {
295
- const e = _t(), n = It(), a = Et() === "light";
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 B = {
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
- }, te = (t) => Y.useMemo(
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: i, open: l, setOpen: r, maxSelections: m, bookmakerLogoUrl: b } = E(), { t: h } = I(), c = O(), p = A(), g = 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", y = o || b, u = {
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: y ? c["2xs"] : c.xs,
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: g,
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
- y ? /* @__PURE__ */ s(
364
+ b ? /* @__PURE__ */ s(
365
365
  "img",
366
366
  {
367
- src: y,
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 || h("betslip.title")
389
+ children: a.title || g("betslip.title")
390
390
  }
391
391
  ),
392
- i.length > 0 && m != null && /* @__PURE__ */ S(
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: y ? 0 : c.sm
399
+ marginInlineStart: b ? 0 : c.sm
400
400
  },
401
401
  children: [
402
- i.length,
402
+ r.length,
403
403
  "/",
404
- m
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: u,
413
- onClick: () => r(!l),
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(Bt, { size: "1.125em" })
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 bt(t) {
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 ee(t, e, n, o = ",") {
428
- const a = e.map((h) => h.selectionId).filter((h) => !!h), i = a.join(","), l = a.map(encodeURIComponent).join(o), r = e[0], m = encodeURIComponent(
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
- ), b = String(n);
431
- return t.replace(/\{betslip_ids\}/g, l).replace(/\{selectionIds\}/g, encodeURIComponent(i)).replace(/\{currentUrl\}/g, m).replace(/\{stake\}/g, b).replace(/\{eventId\}/g, (r == null ? void 0 : r.eventId) ?? "").replace(/\{oddsDecimal\}/g, r ? String(r.odds) : "").replace(/\{market\}/g, (r == null ? void 0 : r.marketId) ?? "").replace(/\{outcome\}/g, (r == null ? void 0 : r.name) ?? "");
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: B.primary,
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: B.primaryHover }
448
- }), rt = { enabled: ot(!1), disabled: ot(!0) }, yt = ({
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: i,
456
+ combStake: r,
457
457
  bookmakerLogoUrl: l,
458
- bookmakerHomepageUrl: r,
459
- bookmakerBetslipTemplate: m,
460
- bookmakerIdSeparator: b
461
- } = E(), { t: h } = I(), c = e || l, p = O(), d = A(), f = n.continueLabel || h("betslip.continueLabel"), g = (() => {
462
- const u = parseFloat(i) || 0, x = o || m;
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 ee(x, a, u, b);
465
- if (r) return r;
466
- })(), y = !g;
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: y ? void 0 : g,
471
- target: g ? "_blank" : void 0,
472
- rel: g ? "noopener noreferrer" : void 0,
473
- css: y ? rt.disabled : rt.enabled,
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: f }),
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 = J();
502
+ const e = q();
503
503
  return /* @__PURE__ */ s("div", { style: { borderBottom: `${e.size} solid ${t}` } });
504
- }, ne = ({
504
+ }, oe = ({
505
505
  tokens: t,
506
506
  brandingLogoUrl: e
507
507
  }) => {
508
- const { labels: n, selections: o, combStake: a, currency: i } = E(), { t: l } = I(), r = O(), m = o.filter(
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
- ), b = bt(m), h = parseFloat(a) || 0, c = h * b, p = {
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 ${r.sm}`,
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
- b.toFixed(2)
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: h > 0 ? `${h.toFixed(2)}${i}` : "—" })
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
- yt,
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 oe(t, e, n) {
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 i = t.match(/^(OVER|UNDER)_(GOALS|CORNERS)_(\d+)_(\d+)$/i);
581
- if (i) {
582
- const l = i[2].charAt(0) + i[2].slice(1).toLowerCase(), r = `betslip.markets.${i[1].toUpperCase() === "OVER" ? "over" : "under"}${l}`, m = `${i[3]}.${i[4]}`, b = e(r, { line: m });
583
- if (b !== r) return b;
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 re = U`
587
+ const ie = H`
588
588
  from { opacity: 0; transform: translateX(8px); }
589
589
  to { opacity: 1; transform: translateX(0); }
590
- `, ie = U`
590
+ `, ae = H`
591
591
  from { transform: rotate(0deg); }
592
592
  to { transform: rotate(360deg); }
593
- `, ae = () => /* @__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" }) }), se = U`
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
- `, K = {
597
- card: _({ animation: `${re} 0.18s ease` }),
598
- spinner: _({
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: B.t3,
604
- animation: `${ie} 0.7s linear infinite`,
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: `${se} 1s ease-in-out infinite`
615
+ animation: `${le} 1s ease-in-out infinite`
614
616
  })
615
617
  };
616
- function le(t, e, n) {
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(), i = a.toDateString(), l = new Date(a.getTime() + 864e5).toDateString(), r = o.toLocaleTimeString(et(e), {
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() === i ? `${n("betslip.today")} ${r}` : o.toDateString() === l ? `${n("betslip.tomorrow")} ${r}` : `${o.toLocaleDateString(et(e), { month: "short", day: "numeric" })} ${r}`;
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
- overflow: "hidden"
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
- ), ce = ({ avatar: t, name: e, tokens: n }) => /* @__PURE__ */ s(
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
- ), de = ({ name: t, logo: e, tokens: n }) => {
681
- const o = O(), a = A(), [i, l] = Y.useState(!1);
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: () => l(!0),
687
- onMouseLeave: () => l(!1),
713
+ onMouseEnter: () => a(!0),
714
+ onMouseLeave: () => a(!1),
688
715
  children: [
689
- /* @__PURE__ */ s(
690
- "div",
716
+ /* @__PURE__ */ s("div", { style: { width: 20, height: 20, flexShrink: 0 }, children: /* @__PURE__ */ s(
717
+ "img",
691
718
  {
692
- style: {
693
- width: 20,
694
- height: 20,
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
- i && /* @__PURE__ */ s(
711
- "div",
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
- position: "absolute",
715
- top: "calc(100% + 5px)",
716
- insetInlineEnd: 0,
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
- zIndex: 10,
725
- pointerEvents: "none",
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
- }, st = ({
757
+ }, lt = ({
741
758
  score: t,
742
759
  tokens: e
743
760
  }) => {
744
- const n = O(), o = A();
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
- }, pe = ({
782
+ }, me = ({
766
783
  sel: t,
767
784
  tokens: e
768
785
  }) => {
769
- const { labels: n, oddsLoading: o } = E(), { t: a } = I(), { status: i, odds: l, movement: r } = t;
770
- return i === "settled_won" ? /* @__PURE__ */ S("span", { style: { color: e.ok, fontSize: "0.8125em", fontWeight: 700 }, children: [
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
- ] }) : i === "settled_lost" ? /* @__PURE__ */ S(
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
- ) : i === "settled_void" ? /* @__PURE__ */ s("span", { style: { fontSize: "0.8125em", fontWeight: 700, color: e.t3 }, children: a("betslip.settledVoid") }) : i === "suspended" ? /* @__PURE__ */ s("span", { style: { fontSize: "0.75em", fontWeight: 600, color: e.warn }, children: n.suspendedLabel || a("betslip.suspendedLabel") }) : o ? /* @__PURE__ */ s("div", { css: K.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: [
783
- r && /* @__PURE__ */ s(
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: r === "UP" ? e.ok : e.bad,
805
+ color: i === "UP" ? e.ok : e.bad,
789
806
  lineHeight: 1
790
807
  },
791
- children: r === "UP" ? "▲" : "▼"
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 } = E(), { t: a, i18n: i } = I(), l = O(), r = A(), [m, b] = Y.useState(!1), h = le(t.startAt, i.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], f = p == null ? void 0 : p[1];
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: K.card,
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
- ce,
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(pe, { sel: t, tokens: e }),
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: () => b(!0),
855
- onMouseLeave: () => b(!1),
872
+ onMouseEnter: () => y(!0),
873
+ onMouseLeave: () => y(!1),
856
874
  title: "Remove",
857
875
  style: {
858
- background: m ? "rgba(239,68,68,.08)" : "none",
876
+ background: u ? "rgba(239,68,68,.08)" : "none",
859
877
  border: "none",
860
878
  cursor: "pointer",
861
- color: m ? e.bad : e.t2,
879
+ color: u ? e.bad : e.t2,
862
880
  fontSize: "0.8125em",
863
881
  padding: "3px 5px",
864
- borderRadius: r.xs,
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(ae, {})
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
- children: oe(t.marketId, a, o.marketLabels)
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: r.sm,
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
- flex: "0 1 auto",
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(st, { score: d, tokens: e }) : /* @__PURE__ */ s("span", {})),
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 && (f !== void 0 ? /* @__PURE__ */ s(st, { score: f, tokens: e }) : /* @__PURE__ */ s("span", {}))
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
- (t.matchStatus === "inprogress" || h || t.competition) && /* @__PURE__ */ S(
1000
+ f && /* @__PURE__ */ S(
978
1001
  "div",
979
1002
  {
980
1003
  style: {
981
- marginLeft: "auto",
982
- flexShrink: 0,
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: K.pulseDot }),
1032
+ /* @__PURE__ */ s("span", { css: _.pulseDot }),
1009
1033
  a("betslip.live")
1010
1034
  ]
1011
1035
  }
1012
- ) : h ? /* @__PURE__ */ s(
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: h
1044
+ children: g
1021
1045
  }
1022
1046
  ) : null,
1023
1047
  t.competition && /* @__PURE__ */ s(
1024
- de,
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
- }, me = {
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: B.s3,
1071
+ background: D.s3,
1048
1072
  borderRadius: "6px",
1049
1073
  borderRight: "4px solid transparent",
1050
1074
  backgroundClip: "padding-box"
1051
1075
  }
1052
1076
  })
1053
- }, lt = ({
1077
+ }, ct = ({
1054
1078
  tokens: t,
1055
1079
  isSide: e
1056
1080
  }) => {
1057
- const { labels: n, selections: o } = E(), { t: a } = I();
1081
+ const { labels: n, selections: o } = L(), { t: a } = E();
1058
1082
  return /* @__PURE__ */ s(
1059
1083
  "div",
1060
1084
  {
1061
- css: me.scrollBody,
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((i) => /* @__PURE__ */ s(
1118
+ ) : o.map((r) => /* @__PURE__ */ s(
1095
1119
  ue,
1096
1120
  {
1097
- sel: i,
1121
+ sel: r,
1098
1122
  tokens: t
1099
1123
  },
1100
- i.id
1124
+ r.id
1101
1125
  ))
1102
1126
  }
1103
1127
  );
1104
- }, fe = 3, ge = 5, ct = (t) => _({
1105
- background: B.primary,
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: B.primary, opacity: 0.88 }
1112
- }), N = {
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: ct("44px"),
1121
- presetCell: ct("auto"),
1122
- presetGrid: _({ display: "grid", gap: "6px", marginBottom: "10px" })
1123
- }, dt = ({ tokens: t, brandingLogoUrl: e }) => {
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: i,
1154
+ setCombStake: r,
1129
1155
  currency: l,
1130
- stakePresets: r
1131
- } = E(), { t: m } = I(), b = O(), h = A(), c = J(), p = o.filter(
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 = bt(p), f = parseFloat(a) || 0, g = f * d, y = (v) => {
1134
- i(String(v));
1135
- }, u = Y.useRef(null), x = r.length <= fe, w = Math.ceil(
1136
- r.length / Math.ceil(r.length / ge)
1137
- ), C = r.map((v) => /* @__PURE__ */ s(
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 ? N.preset : N.presetCell,
1141
- onClick: () => y(v),
1166
+ css: x ? W.preset : W.presetCell,
1167
+ onClick: () => b(v),
1142
1168
  style: {
1143
1169
  padding: "10px 0",
1144
- borderRadius: h.sm,
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: `${b.sm} 14px`,
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(vt, { children: [
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: b.xs
1200
+ paddingBottom: y.xs
1175
1201
  },
1176
1202
  children: [
1177
- /* @__PURE__ */ s("span", { children: n.combinedOddsLabel || m("betslip.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: b["2xs"],
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 || m("betslip.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: u,
1219
- css: N.stakeInput,
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) => i(v.target.value),
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: h.sm,
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: N.presetGrid,
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 || m("betslip.totalStakeLabel") }),
1269
- /* @__PURE__ */ s("span", { children: f > 0 ? `${f.toFixed(2)}${l}` : "—" })
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 || m("betslip.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: g > 0 ? t.primary : void 0
1317
+ color: f > 0 ? t.primary : void 0
1292
1318
  },
1293
- children: g > 0 ? g.toFixed(2) : "—"
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
- yt,
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: b.xs,
1340
+ marginTop: y.xs,
1315
1341
  lineHeight: 1.5,
1316
- padding: `0 ${b["3xs"]}`
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
- }, V = (t, e) => {
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((i) => {
1354
+ return ((a = (o = t == null ? void 0 : t.translations) == null ? void 0 : o.find((r) => {
1328
1355
  var l;
1329
- return ((l = i.language) == null ? void 0 : l.toUpperCase()) === n;
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
- }, G = (t) => {
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
- }, he = (t) => {
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 be(t, e, n, o) {
1365
+ async function ye(t, e, n, o) {
1339
1366
  var p;
1340
- const a = /* @__PURE__ */ new Map(), i = (p = t.helpers.getSDKConfiguration()) == null ? void 0 : p.idSchema, l = /* @__PURE__ */ new Map();
1341
- if (i && i !== "native") {
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
- i,
1371
+ r,
1345
1372
  "native"
1346
1373
  );
1347
- ((d == null ? void 0 : d.data) ?? []).forEach((f) => {
1348
- f.input && f.output && l.set(f.output, f.input);
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 r = await Tt(
1379
+ const i = await $t(
1353
1380
  t,
1354
1381
  [...l.keys()],
1355
1382
  o
1356
1383
  );
1357
- if (!r.length) return a;
1358
- const m = $t(t), b = r.flatMap((d) => [
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
- ]), h = m ? await Ot(m, b, {
1389
+ ]), g = u ? await At(u, y, {
1363
1390
  partial: !0,
1364
1391
  disableCache: o
1365
- }) : [], c = new Map(h.map((d) => [d.id, d]));
1366
- return r.forEach((d) => {
1367
- var v, T;
1368
- const f = c.get(d.competitor_one), g = c.get(d.competitor_two), y = V(f, n), u = V(g, n);
1369
- if (!y || d.competitor_two && !u) {
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 = V(x, n), C = l.get(d.id) ?? d.id;
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: y, logo: G(f) },
1379
- participantTwo: u ? { name: u, logo: G(g) } : void 0,
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: he((T = d.status) == null ? void 0 : T.type),
1382
- competition: w ? { name: w, logo: G(x) } : void 0
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 ye(t, e, n) {
1387
- const [o, a] = k([]), [i, l] = k((e == null ? void 0 : e.length) > 0), r = Lt(), m = M(/* @__PURE__ */ new Map()), b = M(/* @__PURE__ */ new Set());
1388
- return L(() => {
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 h = !1;
1394
- const c = e.map((d) => {
1395
- const f = d.split(":"), g = f[f.length - 1], y = f[f.length - 2], u = f.slice(0, f.length - 2).join(":");
1396
- return { id: d, eventId: u, market: y, outcome: g };
1397
- }), p = [...new Set(c.map((d) => d.eventId))];
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 d = /* @__PURE__ */ new Map();
1426
+ let h = /* @__PURE__ */ new Map();
1400
1427
  try {
1401
- d = await be(
1428
+ h = await ye(
1402
1429
  t,
1403
- p,
1430
+ d,
1404
1431
  n,
1405
- r
1432
+ i
1406
1433
  );
1407
- } catch (g) {
1408
- console.warn("[betslip] Sports API event lookup failed:", g);
1434
+ } catch (b) {
1435
+ console.warn("[betslip] Sports API event lookup failed:", b);
1409
1436
  }
1410
- if (h) return;
1411
- d.forEach((g, y) => m.current.set(y, g));
1412
- const f = c.flatMap(({ id: g, eventId: y, market: u, outcome: x }) => {
1413
- const w = d.get(y) ?? m.current.get(y);
1414
- return w ? (b.current.delete(g), [{ ...w, market: u, outcome: x }]) : (b.current.has(g) || (b.current.add(g), console.warn(
1415
- `[betslip] Dropping "${g}": event ${y} was not found in the Sports API.`
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
- h = !0;
1447
+ c = !0;
1421
1448
  };
1422
- }, [JSON.stringify(e), r, n]), { selectionInputs: o, loading: i };
1449
+ }, [g, i, n]), { selectionInputs: o, loading: r };
1423
1450
  }
1424
- const Se = U`
1451
+ const xe = H`
1425
1452
  from { transform: translateY(100%); opacity: 0; }
1426
1453
  to { transform: translateY(0); opacity: 1; }
1427
- `, xe = U`
1454
+ `, ve = H`
1428
1455
  from { transform: translateY(-100%); opacity: 0; }
1429
1456
  to { transform: translateY(0); opacity: 1; }
1430
- `, pt = (t) => _({
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: pt(xe), bottom: pt(Se) }
1436
- }, D = 320, mt = 340;
1437
- function ve(t) {
1438
- return t === "bottom-right" ? { bottom: 16, right: 16, width: D } : t === "bottom-left" ? { bottom: 16, left: 16, width: D } : t === "top-right" ? { top: 16, right: 16, width: D } : t === "top-left" ? { top: 16, left: 16, width: D } : { bottom: 16, right: 16, width: D };
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 we = () => {
1441
- const { selectionInputs: t, combStake: e, selections: n } = E(), o = parseFloat(e) || 0, a = n.length ? n.reduce((i, l) => i * l.odds, 1) : 0;
1442
- return L(() => {
1443
- j._notify({ selections: t, stake: o, totalOdds: a });
1444
- }, [t, o, a]), L(() => () => j._notify({ selections: [], stake: 0, totalOdds: 0 }), []), null;
1445
- }, Ce = ({ props: t }) => {
1446
- var C, v, T, W, F, R, H, z, q, Q;
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: i,
1477
+ selections: r,
1451
1478
  maxSelections: l,
1452
- bookmakerLogoUrl: r,
1453
- bookmakerBackgroundColor: m,
1454
- oddsReady: b
1455
- } = E(), h = ((F = (W = (T = (v = (C = t.themeOptions) == null ? void 0 : C.colorSchemes) == null ? void 0 : v.light) == null ? void 0 : T.palette) == null ? void 0 : W.primary) == null ? void 0 : F.plainColor) != null || ((Q = (q = (z = (H = (R = t.themeOptions) == null ? void 0 : R.colorSchemes) == null ? void 0 : H.dark) == null ? void 0 : z.palette) == null ? void 0 : q.primary) == null ? void 0 : Q.plainColor) != null, c = Zt(
1456
- h ? void 0 : m
1457
- ), p = te(c), d = A(), f = J(), g = e.startsWith("side"), y = e === "top-right" || e === "top-left", { t: u } = I();
1458
- if (!b) return null;
1459
- if (g) {
1460
- const $ = e === "side-right", P = $ ? "right" : "left", Z = n || r, St = o ? mt : 0, xt = o ? "translateX(0)" : `translateX(${$ ? "100%" : "-100%"})`;
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
- [P]: 0,
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
- [P]: St,
1508
+ [Y]: xt,
1482
1509
  top: "33%",
1483
1510
  transform: "translateY(-50%)",
1484
1511
  pointerEvents: "all",
1485
- transition: `${P} 0.3s ease`,
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: u(o ? "betslip.hide" : "betslip.show"),
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: $ ? "8px 0 0 8px" : "0 8px 8px 0",
1508
- boxShadow: $ ? "-4px 0 12px rgba(0,0,0,.22)" : "4px 0 12px rgba(0,0,0,.22)",
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(${$ ? "-90" : "90"}deg)`
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: $ ? "-2px 2px 6px rgba(0,0,0,.2)" : "2px 2px 6px rgba(0,0,0,.2)"
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
- i.length,
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
- [P]: 0,
1595
- width: mt,
1623
+ [Y]: 0,
1624
+ width: ft,
1596
1625
  height: "100%",
1597
- transform: xt,
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: $ ? "-6px 0 24px rgba(0,0,0,.18)" : "6px 0 24px rgba(0,0,0,.18)",
1604
- outline: `${f.size} solid ${c.bdr}`
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: g,
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(lt, { tokens: c, isSide: g }),
1628
- /* @__PURE__ */ s(dt, { tokens: c, brandingLogoUrl: n })
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 = y ? `0 0 ${d.md} ${d.md}` : `${d.md} ${d.md} 0 0`, w = ve(e);
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: y ? "0 4px 16px rgba(0,0,0,.2)" : "0 -4px 16px rgba(0,0,0,.2)",
1650
- outline: `${f.size} solid ${c.primary}`,
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: g,
1696
+ isSide: f,
1668
1697
  position: e,
1669
1698
  brandingLogoUrl: n
1670
1699
  }
1671
1700
  ),
1672
- !o && i.length > 0 && /* @__PURE__ */ s(
1673
- ne,
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(lt, { tokens: c, isSide: g }),
1691
- /* @__PURE__ */ s(dt, { tokens: c, brandingLogoUrl: n })
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
- }, Re = (t) => {
1701
- const [e, n] = k([]), o = M(/* @__PURE__ */ new Set()), { selectionInputs: a, loading: i } = ye(
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: r, oddsMarkets: m } = Vt(
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
- ), b = X((c) => {
1741
+ ), y = J((c) => {
1713
1742
  o.current.delete(c);
1714
- const p = c.split(":"), d = p[p.length - 2], f = p.slice(0, p.length - 2).join(":");
1715
- n((g) => {
1716
- const y = g.findIndex((u) => {
1717
- const x = u.split(":");
1718
- return x.slice(0, x.length - 2).join(":") === f && x[x.length - 2] === d;
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 (y !== -1) {
1721
- const u = [...g];
1722
- return u[y] = c, u;
1749
+ if (b !== -1) {
1750
+ const m = [...f];
1751
+ return m[b] = c, m;
1723
1752
  }
1724
- return [...g, c];
1753
+ return [...f, c];
1725
1754
  });
1726
- }, []), h = X((c) => {
1755
+ }, []), g = J((c) => {
1727
1756
  n((p) => p.filter((d) => d !== c));
1728
1757
  }, []);
1729
- return L(() => {
1730
- a.filter((c) => c.matchStatus === "finished").forEach((c) => h(`${c.eventId}:${c.market}:${c.outcome}`));
1731
- }, [a, h]), L(() => {
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, f;
1762
+ var d, h;
1734
1763
  const p = `${c.eventId}:${c.market}:${c.outcome}`;
1735
- if (jt(r, m, c.eventId, c.market, p)) {
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 g = ((f = (d = ((r == null ? void 0 : r.get(c.eventId)) ?? [])[0]) == null ? void 0 : d.bookmaker) == null ? void 0 : f.name) ?? "the bookmaker";
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}": ${g} returned no ${c.market} odds for this event.`
1769
+ `[betslip] Removing "${p}": ${f} returned no ${c.market} odds for this event.`
1741
1770
  );
1742
1771
  }
1743
- h(p);
1772
+ g(p);
1744
1773
  }
1745
1774
  });
1746
- }, [r, m, l, h]), L(() => (j._mount({ setSelection: b, removeSelection: h }), () => j._unmount()), [b, h]), !e.length || !l.length && i ? null : /* @__PURE__ */ S(
1747
- Qt,
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: h,
1756
- sharedOddsMap: r,
1784
+ onExternalRemove: g,
1785
+ sharedOddsMap: i,
1757
1786
  children: [
1758
- /* @__PURE__ */ s(we, {}),
1759
- /* @__PURE__ */ s(Ce, { props: t })
1787
+ /* @__PURE__ */ s(Ce, {}),
1788
+ /* @__PURE__ */ s(Re, { props: t })
1760
1789
  ]
1761
1790
  }
1762
1791
  );
1763
- }, Ae = (t) => /* @__PURE__ */ s(
1764
- wt,
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(Re, { ...t })
1799
+ children: /* @__PURE__ */ s(ke, { ...t })
1771
1800
  }
1772
1801
  );
1773
1802
  export {
1774
- Ae as M
1803
+ Be as M
1775
1804
  };