@sensiblestats/widget-react 0.136.1 → 0.138.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/dist/index.js CHANGED
@@ -869,7 +869,7 @@ var BUNDLED_EN_GB = {
869
869
  };
870
870
 
871
871
  // src/strings/fill.ts
872
- var pickForm = (row, count, tag2) => row[new Intl.PluralRules(tag2).select(count)] ?? row.other;
872
+ var pickForm = (row, count2, tag2) => row[new Intl.PluralRules(tag2).select(count2)] ?? row.other;
873
873
  function fill(template, tokens, tag2) {
874
874
  const text2 = typeof template === "string" ? template : pickForm(template, Number(tokens[template.$count ?? "count"]), tag2);
875
875
  return text2.replace(/\{(\w+)\}/g, (match, name) => Object.prototype.hasOwnProperty.call(tokens, name) ? String(tokens[name]) : match);
@@ -1298,7 +1298,7 @@ function parseOddsFormat(value) {
1298
1298
  }
1299
1299
 
1300
1300
  // src/version.generated.ts
1301
- var WIDGET_REACT_VERSION = "0.136.1";
1301
+ var WIDGET_REACT_VERSION = "0.138.0";
1302
1302
 
1303
1303
  // src/config.ts
1304
1304
  function hostTag(cfg) {
@@ -1863,6 +1863,19 @@ function str(v) {
1863
1863
  function num(v) {
1864
1864
  return typeof v === "number" && Number.isFinite(v) ? String(v) : void 0;
1865
1865
  }
1866
+ function count(v) {
1867
+ return typeof v === "number" && Number.isFinite(v) && v >= 0 ? v : void 0;
1868
+ }
1869
+ function readRecord(raw) {
1870
+ if (typeof raw !== "object" || raw === null) return void 0;
1871
+ const r = raw;
1872
+ const wins = count(r.wins);
1873
+ const losses = count(r.losses);
1874
+ if (wins === void 0 || losses === void 0) return void 0;
1875
+ const draws = count(r.draws);
1876
+ const ties = count(r.ties);
1877
+ return { wins, losses, ...draws !== void 0 ? { draws } : {}, ...ties !== void 0 ? { ties } : {} };
1878
+ }
1866
1879
  function readStatCells(raw) {
1867
1880
  if (!Array.isArray(raw)) return [];
1868
1881
  const cells = [];
@@ -1871,7 +1884,8 @@ function readStatCells(raw) {
1871
1884
  const value = num(entry.value) ?? str(entry.value);
1872
1885
  if (label === void 0 || value === void 0) continue;
1873
1886
  const note = str(entry.note);
1874
- cells.push({ label, value, ...note !== void 0 ? { note } : {}, ...entry.muted === true ? { muted: true } : {} });
1887
+ const record2 = readRecord(entry.record);
1888
+ cells.push({ label, value, ...note !== void 0 ? { note } : {}, ...entry.muted === true ? { muted: true } : {}, ...record2 ? { record: record2 } : {} });
1875
1889
  }
1876
1890
  return cells;
1877
1891
  }
@@ -1890,7 +1904,7 @@ function toCardVM(card) {
1890
1904
  };
1891
1905
  }).filter((s) => s !== null) : [];
1892
1906
  return {
1893
- id: String(card.entityId),
1907
+ id: `${kind}:${card.entityId}`,
1894
1908
  kind,
1895
1909
  name: card.canonicalName,
1896
1910
  image: str(card.imagePath) ?? str(card.imageUrl) ?? str(card.image_url) ?? str(card.logoUrl) ?? str(card.logo),
@@ -6566,7 +6580,7 @@ function allMarketsCount(vm, monitor) {
6566
6580
  if (!monitor?.enabled || !vm.pinEnabled || sportOf7(vm.sport) !== void 0) return null;
6567
6581
  return vm.marketCount !== void 0 && vm.marketCount >= 2 ? vm.marketCount : null;
6568
6582
  }
6569
- function AllMarketsButton({ vm, count, monitor, ui, surface }) {
6583
+ function AllMarketsButton({ vm, count: count2, monitor, ui, surface }) {
6570
6584
  const log = useEventLog();
6571
6585
  const [toast, setToast] = useState24(null);
6572
6586
  const dismiss = useCallback18(() => setToast(null), []);
@@ -6583,9 +6597,9 @@ function AllMarketsButton({ vm, count, monitor, ui, surface }) {
6583
6597
  outcome: surface === "card" ? "all_markets_card" : "all_markets_list"
6584
6598
  });
6585
6599
  };
6586
- const label = vm.homeTeamName && vm.awayTeamName ? ui.allMarketsAria(count, vm.homeTeamName, vm.awayTeamName) : void 0;
6600
+ const label = vm.homeTeamName && vm.awayTeamName ? ui.allMarketsAria(count2, vm.homeTeamName, vm.awayTeamName) : void 0;
6587
6601
  return /* @__PURE__ */ jsxs10("span", { className: surface === "card" ? "ss-w-allmk-wrap" : "ss-w-allmk-wrap ss-w-allmk-wrap--chip", children: [
6588
- /* @__PURE__ */ jsxs10("button", { type: "button", className: surface === "card" ? "ss-w-allmk" : "ss-w-allmk ss-w-allmk--chip", "aria-label": label ?? ui.allMarkets(count), onClick, children: [
6602
+ /* @__PURE__ */ jsxs10("button", { type: "button", className: surface === "card" ? "ss-w-allmk" : "ss-w-allmk ss-w-allmk--chip", "aria-label": label ?? ui.allMarkets(count2), onClick, children: [
6589
6603
  /* @__PURE__ */ jsxs10("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
6590
6604
  /* @__PURE__ */ jsx12("rect", { x: "3", y: "5", width: "5", height: "5", rx: "1.2" }),
6591
6605
  /* @__PURE__ */ jsx12("rect", { x: "9.5", y: "5", width: "5", height: "5", rx: "1.2" }),
@@ -6594,7 +6608,7 @@ function AllMarketsButton({ vm, count, monitor, ui, surface }) {
6594
6608
  /* @__PURE__ */ jsx12("rect", { x: "9.5", y: "14", width: "5", height: "5", rx: "1.2" }),
6595
6609
  /* @__PURE__ */ jsx12("rect", { x: "16", y: "14", width: "5", height: "5", rx: "1.2" })
6596
6610
  ] }),
6597
- surface === "card" ? ui.allMarkets(count) : count
6611
+ surface === "card" ? ui.allMarkets(count2) : count2
6598
6612
  ] }),
6599
6613
  /* @__PURE__ */ jsx12(Toast, { toast, onDismiss: dismiss })
6600
6614
  ] });
@@ -7296,7 +7310,7 @@ function PersonalGreeting({ personal, ui, slip, sport, starsElsewhere = false, o
7296
7310
  const since = personal.since ?? [];
7297
7311
  const asks = personal.asks ?? [];
7298
7312
  const noFavourites = controller?.status === "ready" && controller.data !== null && [controller.data.competitions, controller.data.teams, controller.data.players].every((list) => list.length === 0) && (personal.ribbon?.stars ?? []).length === 0 && !starsElsewhere && personal.hasStarsElsewhere !== true;
7299
- const showInvite = ctx?.favouritesTab === true && noFavourites;
7313
+ const showInvite = ctx?.favouritesOffered === true && noFavourites;
7300
7314
  const cards = hasCards ? /* @__PURE__ */ jsxs24("section", { className: "ss-w-v8-sec ss-w-v8-cards", children: [
7301
7315
  ofYours ? /* @__PURE__ */ jsx26("h3", { className: "ss-w-v8-sec-title", children: ui.v8YourTeams }) : null,
7302
7316
  teamCards.map((c, i) => /* @__PURE__ */ jsx26(
@@ -7780,7 +7794,9 @@ function ChatHeader({
7780
7794
  newConversationLabel,
7781
7795
  moreOptionsLabel,
7782
7796
  onOpenSettings,
7783
- settingsLabel
7797
+ settingsLabel,
7798
+ onOpenFavourites,
7799
+ favouritesLabel
7784
7800
  }) {
7785
7801
  const [menuOpen, setMenuOpen] = useState34(false);
7786
7802
  const wrapRef = useRef25(null);
@@ -7788,7 +7804,8 @@ function ChatHeader({
7788
7804
  const firstItemRef = useRef25(null);
7789
7805
  const hasNew = !!(canReset && onNewConversation);
7790
7806
  const hasSettings = !!onOpenSettings;
7791
- const hasMenu = hasNew || hasSettings;
7807
+ const hasFavourites = !!onOpenFavourites;
7808
+ const hasMenu = hasFavourites || hasNew || hasSettings;
7792
7809
  useEffect29(() => {
7793
7810
  if (menuOpen) firstItemRef.current?.focus();
7794
7811
  }, [menuOpen]);
@@ -7814,6 +7831,10 @@ function ChatHeader({
7814
7831
  setMenuOpen(false);
7815
7832
  onNewConversation?.();
7816
7833
  };
7834
+ const runFavourites = () => {
7835
+ setMenuOpen(false);
7836
+ onOpenFavourites?.();
7837
+ };
7817
7838
  const runSettings = () => {
7818
7839
  setMenuOpen(false);
7819
7840
  onOpenSettings?.();
@@ -7836,13 +7857,24 @@ function ChatHeader({
7836
7857
  }
7837
7858
  ),
7838
7859
  menuOpen ? /* @__PURE__ */ jsxs28("div", { className: "ss-w-menu", role: "menu", "aria-label": moreOptionsLabel, children: [
7839
- hasNew ? /* @__PURE__ */ jsx31(
7860
+ hasFavourites ? /* @__PURE__ */ jsx31(
7840
7861
  "button",
7841
7862
  {
7842
7863
  type: "button",
7843
7864
  className: "ss-w-menu-item",
7844
7865
  role: "menuitem",
7845
7866
  ref: firstItemRef,
7867
+ onClick: runFavourites,
7868
+ children: /* @__PURE__ */ jsx31("span", { children: favouritesLabel })
7869
+ }
7870
+ ) : null,
7871
+ hasNew ? /* @__PURE__ */ jsx31(
7872
+ "button",
7873
+ {
7874
+ type: "button",
7875
+ className: "ss-w-menu-item",
7876
+ role: "menuitem",
7877
+ ref: hasFavourites ? void 0 : firstItemRef,
7846
7878
  onClick: runNewConversation,
7847
7879
  children: /* @__PURE__ */ jsx31("span", { children: newConversationLabel })
7848
7880
  }
@@ -7853,7 +7885,7 @@ function ChatHeader({
7853
7885
  type: "button",
7854
7886
  className: "ss-w-menu-item",
7855
7887
  role: "menuitem",
7856
- ref: hasNew ? void 0 : firstItemRef,
7888
+ ref: hasFavourites || hasNew ? void 0 : firstItemRef,
7857
7889
  onClick: runSettings,
7858
7890
  children: /* @__PURE__ */ jsx31("span", { children: settingsLabel })
7859
7891
  }
@@ -7918,6 +7950,13 @@ function cellClass(s) {
7918
7950
  return s.muted ? "ss-w-ecard-cell ss-w-ecard-cell--muted" : "ss-w-ecard-cell";
7919
7951
  }
7920
7952
  function StatCellView({ s }) {
7953
+ if (s.record) {
7954
+ return /* @__PURE__ */ jsxs29("div", { className: cellClass(s), children: [
7955
+ /* @__PURE__ */ jsx33("span", { className: "ss-w-ecard-cval", children: /* @__PURE__ */ jsx33(FormBar, { w: s.record.wins, d: s.record.draws ?? s.record.ties ?? 0, l: s.record.losses }) }),
7956
+ /* @__PURE__ */ jsx33("span", { className: "ss-w-ecard-clabel", children: `${s.label} ${s.value}` }),
7957
+ s.note ? /* @__PURE__ */ jsx33("span", { className: "ss-w-ecard-note", children: s.note }) : null
7958
+ ] });
7959
+ }
7921
7960
  const m = RECORD_RE.exec(s.value);
7922
7961
  if (m) {
7923
7962
  return /* @__PURE__ */ jsxs29("div", { className: cellClass(s), children: [
@@ -7978,7 +8017,7 @@ function ScopeTabs({ scopes, active, onSelect }) {
7978
8017
  onClick: () => onSelect(i),
7979
8018
  children: s.image ? /* @__PURE__ */ jsx33(Crest2, { image: s.image }) : s.label
7980
8019
  },
7981
- String(s.competitionId ?? "all")
8020
+ s.competitionId == null ? `i${i}` : String(s.competitionId)
7982
8021
  )) });
7983
8022
  }
7984
8023
  function EntityCardItem({ c }) {
@@ -9523,7 +9562,7 @@ function Cell({ row, cell: cell2, ui, slip }) {
9523
9562
  function Row({ row, columns, ui, slip, monitor, rowRef }) {
9524
9563
  const vm = row.card;
9525
9564
  useNextKickoffRender(isNfl(vm.sport) ? [vm.kickoffUtc] : []);
9526
- const count = allMarketsCount(vm, monitor);
9565
+ const count2 = allMarketsCount(vm, monitor);
9527
9566
  const nflPin = sportOf10(vm.sport) === "americanfootball" && !vm.isLive;
9528
9567
  const kickoffFallback = vm.kickoffUtc ? ui.bettingKickoff(vm.kickoffUtc) : void 0;
9529
9568
  const when = vm.isLive ? ui.liveLabel : vm.kickoffLabel ?? (kickoffFallback ? `${kickoffFallback.dayLabel} ${kickoffFallback.time}` : void 0);
@@ -9542,7 +9581,7 @@ function Row({ row, columns, ui, slip, monitor, rowRef }) {
9542
9581
  /* @__PURE__ */ jsx40("span", { className: "ss-w-mol-cells", style: { gridTemplateColumns: `repeat(${row.cells.length || columns}, minmax(0, 1fr))` }, children: row.cells.map((cell2) => /* @__PURE__ */ jsx40(Cell, { row, cell: cell2, ui, slip }, cell2.row.key)) }),
9543
9582
  /* @__PURE__ */ jsxs36("span", { className: vm.isLive ? "ss-w-mol-side ss-w-mol-side--live" : "ss-w-mol-side", children: [
9544
9583
  when ? /* @__PURE__ */ jsx40("span", { className: "ss-w-mol-when", children: when }) : null,
9545
- count !== null && monitor && ui ? /* @__PURE__ */ jsx40(AllMarketsButton, { vm, count, monitor, ui, surface: "list" }) : monitor && (vm.pinEnabled && vm.isLive || nflPin) && mayPinOrSlip5(vm.sport) ? /* @__PURE__ */ jsx40(PinToggle, { ui, monitor, pin: { kind: "match", matchId: vm.matchId, sport: slipSportOf6(vm.sport) } }) : null
9584
+ count2 !== null && monitor && ui ? /* @__PURE__ */ jsx40(AllMarketsButton, { vm, count: count2, monitor, ui, surface: "list" }) : monitor && (vm.pinEnabled && vm.isLive || nflPin) && mayPinOrSlip5(vm.sport) ? /* @__PURE__ */ jsx40(PinToggle, { ui, monitor, pin: { kind: "match", matchId: vm.matchId, sport: slipSportOf6(vm.sport) } }) : null
9546
9585
  ] })
9547
9586
  ] });
9548
9587
  }
@@ -10688,9 +10727,9 @@ var ChatInput = forwardRef(function ChatInput2({ placeholder, streaming, onSend,
10688
10727
 
10689
10728
  // src/components/TabBar.tsx
10690
10729
  import { useEffect as useEffect35, useLayoutEffect, useRef as useRef30 } from "react";
10691
- import { Fragment as Fragment14, jsx as jsx69, jsxs as jsxs64 } from "react/jsx-runtime";
10692
- var FIT_STEPS = [[0, false], [1, false], [1, true], [2, true], [3, true], [4, true], [5, true], [6, true]];
10693
- function TabBar({ monitor, ui, matchCount, trendsCount, liveCount, hasSchedule, hasBuilder = false, gamesEnabled, clubEnabled, favouritesEnabled }) {
10730
+ import { jsx as jsx69, jsxs as jsxs64 } from "react/jsx-runtime";
10731
+ var TIGHT_LEVELS = [0, 1, 2, 3, 4, 5, 6];
10732
+ function TabBar({ monitor, ui, matchCount, trendsCount, liveCount, hasSchedule, hasBuilder = false, gamesEnabled, clubEnabled }) {
10694
10733
  const tabs = [
10695
10734
  { tab: "chat", label: ui.tabChat, count: 0, dot: monitor.chatDot },
10696
10735
  ...clubEnabled ? [
@@ -10706,8 +10745,7 @@ function TabBar({ monitor, ui, matchCount, trendsCount, liveCount, hasSchedule,
10706
10745
  ...matchCount > 0 ? [{ tab: "following", label: ui.tabFollowing, count: matchCount, dot: monitor.matchesDot }] : [],
10707
10746
  ...trendsCount > 0 ? [{ tab: "trends", label: ui.tabTrends, count: trendsCount, dot: monitor.trendsDot }] : []
10708
10747
  ],
10709
- ...gamesEnabled ? [{ tab: "games", label: ui.tabGames, count: 0, dot: false }] : [],
10710
- ...favouritesEnabled && !clubEnabled ? [{ tab: "favourites", label: ui.tabFavourites, count: 0, dot: false }] : []
10748
+ ...gamesEnabled ? [{ tab: "games", label: ui.tabGames, count: 0, dot: false }] : []
10711
10749
  ];
10712
10750
  const track = useTrack();
10713
10751
  const listRef = useRef30(null);
@@ -10722,12 +10760,10 @@ function TabBar({ monitor, ui, matchCount, trendsCount, liveCount, hasSchedule,
10722
10760
  useLayoutEffect(() => {
10723
10761
  const strip = listRef.current;
10724
10762
  if (!strip) return;
10725
- const fav = strip.querySelector("[data-fav-tab]");
10726
10763
  const measure = () => {
10727
- for (const [tight, compact] of FIT_STEPS) {
10764
+ for (const tight of TIGHT_LEVELS) {
10728
10765
  if (tight === 0) strip.removeAttribute("data-tight");
10729
10766
  else strip.setAttribute("data-tight", String(tight));
10730
- fav?.toggleAttribute("data-compact", compact);
10731
10767
  if (strip.scrollWidth <= strip.clientWidth) return;
10732
10768
  }
10733
10769
  };
@@ -10742,7 +10778,7 @@ function TabBar({ monitor, ui, matchCount, trendsCount, liveCount, hasSchedule,
10742
10778
  };
10743
10779
  }, [labelSignature]);
10744
10780
  if (tabs.length < 2) return null;
10745
- return /* @__PURE__ */ jsx69("div", { className: "ss-w-tabs", role: "tablist", ref: listRef, children: tabs.map(({ tab, label, count, dot }) => {
10781
+ return /* @__PURE__ */ jsx69("div", { className: "ss-w-tabs", role: "tablist", ref: listRef, children: tabs.map(({ tab, label, count: count2, dot }) => {
10746
10782
  const active = monitor.activeTab === tab;
10747
10783
  return /* @__PURE__ */ jsxs64(
10748
10784
  "button",
@@ -10751,19 +10787,15 @@ function TabBar({ monitor, ui, matchCount, trendsCount, liveCount, hasSchedule,
10751
10787
  role: "tab",
10752
10788
  "aria-selected": active,
10753
10789
  "data-on": active ? "" : void 0,
10754
- "data-fav-tab": tab === "favourites" ? "" : void 0,
10755
- "aria-label": tab === "favourites" ? label : tab === "live" && count > 0 ? `${label} \xB7 ${ui.liveCountLabel(count)}` : void 0,
10790
+ "aria-label": tab === "live" && count2 > 0 ? `${label} \xB7 ${ui.liveCountLabel(count2)}` : void 0,
10756
10791
  className: "ss-w-tab",
10757
10792
  onClick: () => {
10758
10793
  if (tab !== monitor.activeTab) track({ name: "tab_change", from: monitor.activeTab, to: tab });
10759
10794
  monitor.setActiveTab(tab);
10760
10795
  },
10761
10796
  children: [
10762
- tab === "favourites" ? /* @__PURE__ */ jsxs64(Fragment14, { children: [
10763
- /* @__PURE__ */ jsx69("span", { className: "ss-w-tab-label", children: label }),
10764
- /* @__PURE__ */ jsx69("span", { className: "ss-w-tab-star", "aria-hidden": "true", children: "\u2605" })
10765
- ] }) : label,
10766
- count > 0 && /* @__PURE__ */ jsx69("span", { className: "ss-w-tab-count", "aria-hidden": tab === "live" ? true : void 0, children: count }),
10797
+ label,
10798
+ count2 > 0 && /* @__PURE__ */ jsx69("span", { className: "ss-w-tab-count", "aria-hidden": tab === "live" ? true : void 0, children: count2 }),
10767
10799
  dot && !active && /* @__PURE__ */ jsx69("span", { className: "ss-w-tab-dot", "aria-hidden": "true" })
10768
10800
  ]
10769
10801
  },
@@ -10836,7 +10868,7 @@ function MarketAccordion({ match, monitor, ui, slip }) {
10836
10868
 
10837
10869
  // src/components/MonitorFormH2H.tsx
10838
10870
  import { useState as useState46 } from "react";
10839
- import { Fragment as Fragment15, jsx as jsx71, jsxs as jsxs66 } from "react/jsx-runtime";
10871
+ import { Fragment as Fragment14, jsx as jsx71, jsxs as jsxs66 } from "react/jsx-runtime";
10840
10872
  function resultClass2(result) {
10841
10873
  if (result === "W") return "ss-w-h2h-result--win";
10842
10874
  if (result === "L") return "ss-w-h2h-result--loss";
@@ -10854,7 +10886,7 @@ function MonitorFormH2H({ formAndH2H, homeTeamName, awayTeamName, ui }) {
10854
10886
  const [expanded, setExpanded] = useState46(false);
10855
10887
  const { homeForm, awayForm, h2h, homeShortCode, awayShortCode } = formAndH2H;
10856
10888
  if (homeForm.length === 0 && awayForm.length === 0 && !h2h) {
10857
- return /* @__PURE__ */ jsx71(Fragment15, {});
10889
+ return /* @__PURE__ */ jsx71(Fragment14, {});
10858
10890
  }
10859
10891
  const homeLabel = homeShortCode || homeTeamName;
10860
10892
  const awayLabel = awayShortCode || awayTeamName;
@@ -11234,7 +11266,7 @@ import { useEffect as useEffect37, useState as useState49 } from "react";
11234
11266
 
11235
11267
  // src/components/PropsPieces.tsx
11236
11268
  import { useEffect as useEffect36, useState as useState48 } from "react";
11237
- import { Fragment as Fragment16, jsx as jsx76, jsxs as jsxs71 } from "react/jsx-runtime";
11269
+ import { Fragment as Fragment15, jsx as jsx76, jsxs as jsxs71 } from "react/jsx-runtime";
11238
11270
  var livePlayer = (bundle, p) => bundle.live === true || !p.live && !p.nflLive ? p : { ...p, live: null, nflLive: null };
11239
11271
  var hasLiveLine = (p) => p.live != null || p.nflLive != null;
11240
11272
  var mmss = (seconds) => `${Math.floor(seconds / 60)}:${String(seconds % 60).padStart(2, "0")}`;
@@ -11420,7 +11452,7 @@ function PropRoster({ bundle, players, side, descriptor, ui, slip }) {
11420
11452
  /* @__PURE__ */ jsx76("span", { className: "ss-w-props-name", children: p.name }),
11421
11453
  /* @__PURE__ */ jsx76("span", { className: "ss-w-props-meta", children: meta })
11422
11454
  ] }),
11423
- /* @__PURE__ */ jsx76("span", { className: now !== null ? "ss-w-props-main ss-w-props-main--live" : "ss-w-props-main", children: main?.line != null ? /* @__PURE__ */ jsxs71(Fragment16, { children: [
11455
+ /* @__PURE__ */ jsx76("span", { className: now !== null ? "ss-w-props-main ss-w-props-main--live" : "ss-w-props-main", children: main?.line != null ? /* @__PURE__ */ jsxs71(Fragment15, { children: [
11424
11456
  /* @__PURE__ */ jsx76("span", { className: "ss-w-props-stat", children: descriptor.statShort(main) }),
11425
11457
  now !== null ? /* @__PURE__ */ jsxs71("span", { className: "ss-w-props-nowline", children: [
11426
11458
  /* @__PURE__ */ jsx76("span", { className: "ss-w-props-now", children: now }),
@@ -11543,7 +11575,7 @@ function NbaPropsSection({ match, monitor, ui, slip }) {
11543
11575
  }
11544
11576
 
11545
11577
  // src/components/NbaMonitorCard.tsx
11546
- import { Fragment as Fragment17, jsx as jsx78, jsxs as jsxs73 } from "react/jsx-runtime";
11578
+ import { Fragment as Fragment16, jsx as jsx78, jsxs as jsxs73 } from "react/jsx-runtime";
11547
11579
  var REGULATION_PERIODS = 4;
11548
11580
  function periodLabel(period) {
11549
11581
  if (period <= REGULATION_PERIODS) return `Q${period}`;
@@ -11619,7 +11651,7 @@ function NbaMonitorCard({ match, monitor, ui, slip }) {
11619
11651
  return /* @__PURE__ */ jsxs73("div", { className: "ss-w-mon-item", children: [
11620
11652
  /* @__PURE__ */ jsxs73("div", { className: "ss-w-mon", children: [
11621
11653
  /* @__PURE__ */ jsxs73("div", { className: "ss-w-mon-top", children: [
11622
- inPlay && /* @__PURE__ */ jsxs73(Fragment17, { children: [
11654
+ inPlay && /* @__PURE__ */ jsxs73(Fragment16, { children: [
11623
11655
  /* @__PURE__ */ jsxs73("span", { className: "ss-w-fandash-live-pill", children: [
11624
11656
  /* @__PURE__ */ jsx78("span", { className: "ss-w-fandash-live-dot", "aria-hidden": "true" }),
11625
11657
  ui.liveLabel
@@ -11647,7 +11679,7 @@ function NbaMonitorCard({ match, monitor, ui, slip }) {
11647
11679
  /* @__PURE__ */ jsx78(Side, { abbreviation: b.homeAbbreviation, nickname: b.homeNickname, teamName: match.homeTeamName, crestUrl: match.homeCrestUrl })
11648
11680
  ] }),
11649
11681
  /* @__PURE__ */ jsx78(NbaFormStrip, { match, monitor, ui }),
11650
- scored && /* @__PURE__ */ jsxs73(Fragment17, { children: [
11682
+ scored && /* @__PURE__ */ jsxs73(Fragment16, { children: [
11651
11683
  /* @__PURE__ */ jsxs73("table", { className: "ss-w-nbamon-ls", children: [
11652
11684
  /* @__PURE__ */ jsx78("thead", { children: /* @__PURE__ */ jsxs73("tr", { children: [
11653
11685
  /* @__PURE__ */ jsx78("th", {}),
@@ -11678,7 +11710,7 @@ function NbaMonitorCard({ match, monitor, ui, slip }) {
11678
11710
 
11679
11711
  // src/components/NflFormSection.tsx
11680
11712
  import { useState as useState51 } from "react";
11681
- import { Fragment as Fragment18, jsx as jsx79, jsxs as jsxs74 } from "react/jsx-runtime";
11713
+ import { Fragment as Fragment17, jsx as jsx79, jsxs as jsxs74 } from "react/jsx-runtime";
11682
11714
  var outcomeOf = (g) => g.teamScore > g.opponentScore ? "win" : g.teamScore < g.opponentScore ? "loss" : "tie";
11683
11715
  var signedSpread2 = (v) => v > 0 ? `+${v}` : String(v);
11684
11716
  function SideRow({ game, abbreviation, ui }) {
@@ -11751,10 +11783,10 @@ function NflFormSection({ match, monitor, ui }) {
11751
11783
  return /* @__PURE__ */ jsxs74("section", { className: "ss-w-props", lang: ui.locale, children: [
11752
11784
  /* @__PURE__ */ jsx79("div", { className: "ss-w-props-head", children: ui.nfl.formLast5 }),
11753
11785
  /* @__PURE__ */ jsx79("div", { className: segments.length === 3 ? "ss-w-props-seg ss-w-props-seg--3" : "ss-w-props-seg ss-w-props-seg--3 ss-w-props-seg--2", children: segments.map((s) => /* @__PURE__ */ jsx79("button", { type: "button", className: "ss-w-props-side", "aria-pressed": active === s.key, onClick: () => setSegment(s.key), children: s.label }, s.key)) }),
11754
- active === "h2h" ? /* @__PURE__ */ jsxs74(Fragment18, { children: [
11786
+ active === "h2h" ? /* @__PURE__ */ jsxs74(Fragment17, { children: [
11755
11787
  /* @__PURE__ */ jsx79("div", { className: "ss-w-nflform-h2h-sum", children: `${homeName} ${homeWins} \xB7 ${awayName} ${awayWins}` }),
11756
11788
  form.headToHead.map((g, i) => /* @__PURE__ */ jsx79(H2hRow, { game: g, home, ui }, i))
11757
- ] }) : /* @__PURE__ */ jsxs74(Fragment18, { children: [
11789
+ ] }) : /* @__PURE__ */ jsxs74(Fragment17, { children: [
11758
11790
  rows.map((g, i) => /* @__PURE__ */ jsx79(SideRow, { game: g, abbreviation: active === "home" ? home : away, ui }, i)),
11759
11791
  rows.some((g) => g.ats != null) && /* @__PURE__ */ jsx79("p", { className: "ss-w-nflform-note", children: ui.nfl.formOpening })
11760
11792
  ] })
@@ -11763,7 +11795,7 @@ function NflFormSection({ match, monitor, ui }) {
11763
11795
 
11764
11796
  // src/components/NflPropsSection.tsx
11765
11797
  import { useState as useState52 } from "react";
11766
- import { Fragment as Fragment19, jsx as jsx80, jsxs as jsxs75 } from "react/jsx-runtime";
11798
+ import { Fragment as Fragment18, jsx as jsx80, jsxs as jsxs75 } from "react/jsx-runtime";
11767
11799
  var TRENDS_SHOWN = 3;
11768
11800
  var SCORERS_SHOWN = 8;
11769
11801
  var STAT_ORDER2 = [
@@ -11806,7 +11838,7 @@ var nflDescriptor = (ui) => ({
11806
11838
  statShort: (stat) => stat.shortLabel,
11807
11839
  mainStat: (p) => STAT_ORDER2.map((k) => p.stats.find((s) => s.stat === k)).find((s) => s != null && hasMainLine(s)),
11808
11840
  bars: (stat) => [...stat.games ?? []].reverse().map((g) => ({ label: g.opponent, away: !g.isHome, value: g.value })),
11809
- barsTitle: (count) => count === 1 ? ui.nfl.propsLastOne : fillNfl(ui.nfl.propsLastN, { n: count }),
11841
+ barsTitle: (count2) => count2 === 1 ? ui.nfl.propsLastOne : fillNfl(ui.nfl.propsLastN, { n: count2 }),
11810
11842
  showHits: true,
11811
11843
  live: (stat, player) => {
11812
11844
  const now = LIVE_VALUE2[stat.stat];
@@ -11911,7 +11943,7 @@ function NflPropsSection({ match, monitor, ui, slip }) {
11911
11943
  ];
11912
11944
  const firstWithContent = roster("away").length > 0 ? "away" : roster("home").length > 0 ? "home" : scorers.length > 0 ? "td" : "away";
11913
11945
  const shown2 = tab && tabs.some((t) => t.key === tab) ? tab : firstWithContent;
11914
- return /* @__PURE__ */ jsxs75(Fragment19, { children: [
11946
+ return /* @__PURE__ */ jsxs75(Fragment18, { children: [
11915
11947
  facts.length > 0 && /* @__PURE__ */ jsx80(Trends, { bundle, facts, descriptor, ui, slip }),
11916
11948
  /* @__PURE__ */ jsxs75("section", { className: "ss-w-props", lang: ui.locale, children: [
11917
11949
  !stamped ? /* @__PURE__ */ jsx80("div", { className: "ss-w-props-head", children: ui.nba.propsTitle }) : /* @__PURE__ */ jsxs75("div", { className: "ss-w-props-headrow", children: [
@@ -11989,7 +12021,7 @@ function NflSituation({ situation, homeAbbreviation, awayAbbreviation, strings }
11989
12021
  }
11990
12022
 
11991
12023
  // src/components/NflMonitorCard.tsx
11992
- import { Fragment as Fragment20, jsx as jsx83, jsxs as jsxs78 } from "react/jsx-runtime";
12024
+ import { Fragment as Fragment19, jsx as jsx83, jsxs as jsxs78 } from "react/jsx-runtime";
11993
12025
  var REGULATION_PERIODS2 = 4;
11994
12026
  function liveLabel2(f) {
11995
12027
  if (f.period === null) return null;
@@ -12018,7 +12050,7 @@ function NflMonitorCard({ match, monitor, ui, slip }) {
12018
12050
  return /* @__PURE__ */ jsxs78("div", { className: "ss-w-mon-item ss-w-mon-item--nfl", children: [
12019
12051
  /* @__PURE__ */ jsxs78("div", { className: "ss-w-mon", children: [
12020
12052
  /* @__PURE__ */ jsxs78("div", { className: "ss-w-mon-top", children: [
12021
- status2 && /* @__PURE__ */ jsxs78(Fragment20, { children: [
12053
+ status2 && /* @__PURE__ */ jsxs78(Fragment19, { children: [
12022
12054
  /* @__PURE__ */ jsxs78("span", { className: "ss-w-fandash-live-pill", children: [
12023
12055
  /* @__PURE__ */ jsx83("span", { className: "ss-w-fandash-live-dot", "aria-hidden": "true" }),
12024
12056
  ui.liveLabel
@@ -12089,7 +12121,7 @@ import { matchKey as matchKey4 } from "@sensiblestats/widget-sdk";
12089
12121
 
12090
12122
  // src/components/FixtureRow.tsx
12091
12123
  import { slipSportOf as slipSportOf8 } from "@sensiblestats/widget-sdk";
12092
- import { Fragment as Fragment21, jsx as jsx84, jsxs as jsxs79 } from "react/jsx-runtime";
12124
+ import { Fragment as Fragment20, jsx as jsx84, jsxs as jsxs79 } from "react/jsx-runtime";
12093
12125
  function splitAtFirstSpace(label) {
12094
12126
  const i = label.indexOf(" ");
12095
12127
  return i > 0 && i < label.length - 1 ? [label.slice(0, i), label.slice(i + 1)] : null;
@@ -12128,7 +12160,7 @@ function FixtureRow({ match, state, stale, ui, monitor, onOpen }) {
12128
12160
  liveTone ? "ss-w-drow-when--live" : null,
12129
12161
  twoLines ? "ss-w-drow-when--two" : null
12130
12162
  ].filter(Boolean).join(" ");
12131
- const cells = /* @__PURE__ */ jsxs79(Fragment21, { children: [
12163
+ const cells = /* @__PURE__ */ jsxs79(Fragment20, { children: [
12132
12164
  /* @__PURE__ */ jsx84("span", { className: whenClass, children: twoLines ? twoLines.map((line, i) => /* @__PURE__ */ jsx84("span", { children: line }, i)) : when }),
12133
12165
  /* @__PURE__ */ jsxs79("span", { className: "ss-w-drow-fx", children: [
12134
12166
  /* @__PURE__ */ jsx84(Side2, { name: match.homeTeamName, crest: match.homeTeamImagePath, abbr: isUsSport ? match.homeTeamAbbr ?? void 0 : void 0 }),
@@ -12184,7 +12216,7 @@ function endLabel(s, ui, serverLabel) {
12184
12216
  var hasGames = (s) => s.sets.some((x) => (x.p1Games ?? 0) > 0 || (x.p2Games ?? 0) > 0);
12185
12217
 
12186
12218
  // src/components/TennisFixtureRow.tsx
12187
- import { Fragment as Fragment22, jsx as jsx85, jsxs as jsxs80 } from "react/jsx-runtime";
12219
+ import { Fragment as Fragment21, jsx as jsx85, jsxs as jsxs80 } from "react/jsx-runtime";
12188
12220
  function TennisSidePrice({ matchId, tour, pair, price, forms, value, oddsId, player, ui, slip, name, lead, movedLabel }) {
12189
12221
  const { oddsFormat } = useOddsSettings();
12190
12222
  const added = useSlipState()?.added;
@@ -12289,7 +12321,7 @@ function TennisFixtureRow({ match, state, stale, ui, prices, slip, monitor }) {
12289
12321
  /* @__PURE__ */ jsx85(Player, { name: names[n - 1], code: n === 1 ? match.homeCountryCode : match.awayCountryCode, served: score?.server === n, ui }),
12290
12322
  score && score.sets.length > 0 ? /* @__PURE__ */ jsx85(Games, { sets: score.sets, side: n, live }) : null
12291
12323
  ] });
12292
- const players = /* @__PURE__ */ jsxs80(Fragment22, { children: [
12324
+ const players = /* @__PURE__ */ jsxs80(Fragment21, { children: [
12293
12325
  line(1),
12294
12326
  line(2),
12295
12327
  game ? /* @__PURE__ */ jsx85("span", { className: "ss-w-trow-round ss-w-trow-game", children: game }) : round ? /* @__PURE__ */ jsx85("span", { className: "ss-w-trow-round", children: round }) : null
@@ -12342,8 +12374,8 @@ function TennisLiveScoreboard({ t, score, live, ui }) {
12342
12374
  }
12343
12375
 
12344
12376
  // src/components/TennisStatsTables.tsx
12345
- import { Fragment as Fragment23, useEffect as useEffect38, useState as useState53 } from "react";
12346
- import { Fragment as Fragment24, jsx as jsx87, jsxs as jsxs82 } from "react/jsx-runtime";
12377
+ import { Fragment as Fragment22, useEffect as useEffect38, useState as useState53 } from "react";
12378
+ import { Fragment as Fragment23, jsx as jsx87, jsxs as jsxs82 } from "react/jsx-runtime";
12347
12379
  function formatStat(row, value, locale) {
12348
12380
  if (value == null) return "\u2013";
12349
12381
  if (row.kind === "pct") return new Intl.NumberFormat(locale, { style: "percent", maximumFractionDigits: 0 }).format(value / 100);
@@ -12374,7 +12406,7 @@ function Block({ caption, rows, locale, names }) {
12374
12406
  ] });
12375
12407
  }
12376
12408
  function Tables({ table, labels, names, locale }) {
12377
- return /* @__PURE__ */ jsxs82(Fragment24, { children: [
12409
+ return /* @__PURE__ */ jsxs82(Fragment23, { children: [
12378
12410
  /* @__PURE__ */ jsx87(Block, { caption: labels.serve, rows: table.serve, locale, names }),
12379
12411
  /* @__PURE__ */ jsx87(Block, { caption: labels.return, rows: table.return, locale, names })
12380
12412
  ] });
@@ -12412,7 +12444,7 @@ function TennisStatsTables({ serveReturn, today, labels, names, ui, resetKey })
12412
12444
  ] }),
12413
12445
  today.rows.map((r) => {
12414
12446
  const f = (v) => formatStat({ kind: "pct" }, v, locale);
12415
- return /* @__PURE__ */ jsxs82(Fragment23, { children: [
12447
+ return /* @__PURE__ */ jsxs82(Fragment22, { children: [
12416
12448
  /* @__PURE__ */ jsx87("span", { className: "ss-w-ts-l", children: r.label }),
12417
12449
  /* @__PURE__ */ jsxs82("span", { className: "ss-w-ts-today-v ss-w-ts-today-v--a", children: [
12418
12450
  f(r.p1Today),
@@ -12432,7 +12464,7 @@ function TennisStatsTables({ serveReturn, today, labels, names, ui, resetKey })
12432
12464
  }
12433
12465
 
12434
12466
  // src/components/TennisMonitorCard.tsx
12435
- import { Fragment as Fragment25, jsx as jsx88, jsxs as jsxs83 } from "react/jsx-runtime";
12467
+ import { Fragment as Fragment24, jsx as jsx88, jsxs as jsxs83 } from "react/jsx-runtime";
12436
12468
  var direction = (d) => d === "shortened" || d === "drifted" ? d : void 0;
12437
12469
  var record = (wl) => wl ? `${wl.w}\u2013${wl.l}` : "\u2013";
12438
12470
  var surfaceLabel = (ui, surface) => ui.tennis.surface[surface.toLowerCase()] ?? surface;
@@ -12457,10 +12489,10 @@ function WinnerPrice({ match, t, price, ui, slip }) {
12457
12489
  { player: t.p1, forms: price.p1, value: price.p1Value, oddsId: price.p1OddsId, previous: price.p1Previous, dir: direction(price.p1Direction) },
12458
12490
  { player: t.p2, forms: price.p2, value: price.p2Value, oddsId: price.p2OddsId, previous: price.p2Previous, dir: direction(price.p2Direction) }
12459
12491
  ] : [];
12460
- if (!price && match.phase === "fullTime") return /* @__PURE__ */ jsx88(Fragment25, {});
12492
+ if (!price && match.phase === "fullTime") return /* @__PURE__ */ jsx88(Fragment24, {});
12461
12493
  return /* @__PURE__ */ jsxs83("section", { className: paused ? "ss-w-tn-sec ss-w-tn-paused" : "ss-w-tn-sec", children: [
12462
12494
  /* @__PURE__ */ jsx88("h4", { className: "ss-w-tn-h", children: t.labels.matchWinner }),
12463
- price && common ? /* @__PURE__ */ jsxs83(Fragment25, { children: [
12495
+ price && common ? /* @__PURE__ */ jsxs83(Fragment24, { children: [
12464
12496
  paused && liveBlock && /* @__PURE__ */ jsx88("p", { className: "ss-w-tn-paused-label", children: liveBlock.labels.pricesPaused }),
12465
12497
  /* @__PURE__ */ jsx88("div", { className: "ss-w-tn-prices", children: sides.map((s) => {
12466
12498
  const previous = s.previous ? formatOdds(s.previous, oddsFormat) : void 0;
@@ -12600,7 +12632,7 @@ function TennisMonitorCard({ match, monitor, ui, slip, onAsk }) {
12600
12632
  /* @__PURE__ */ jsx88("span", { className: "ss-w-mon-vs", children: ui.tennis.vs }),
12601
12633
  /* @__PURE__ */ jsx88(Player2, { side: t.p2, rankRace: t.labels.p2RankRace })
12602
12634
  ] }),
12603
- showScore && score && /* @__PURE__ */ jsxs83(Fragment25, { children: [
12635
+ showScore && score && /* @__PURE__ */ jsxs83(Fragment24, { children: [
12604
12636
  (status2 || elapsed || game || endMark && !notPlayed) && /* @__PURE__ */ jsxs83("p", { className: "ss-w-tn-status", children: [
12605
12637
  ended && hasSetScore(ended) && /* @__PURE__ */ jsxs83("span", { className: "ss-w-tn-endscore", children: [
12606
12638
  score.p1Sets,
@@ -12875,7 +12907,7 @@ function seedFor(pin, index, states, stale, now) {
12875
12907
  }
12876
12908
 
12877
12909
  // src/components/MonitorTabs.tsx
12878
- import { Fragment as Fragment26, jsx as jsx91, jsxs as jsxs86 } from "react/jsx-runtime";
12910
+ import { Fragment as Fragment25, jsx as jsx91, jsxs as jsxs86 } from "react/jsx-runtime";
12879
12911
  function OddsLiveStrip({ m, ui }) {
12880
12912
  const showScore = m.phase !== "preMatch" && typeof m.homeScore === "number";
12881
12913
  const stale = m.status === "stale";
@@ -12906,7 +12938,7 @@ function MatchesPanel({ monitor, ui, slip, onAsk, discovery }) {
12906
12938
  if (tiles.length === 0) return /* @__PURE__ */ jsx91("div", { className: "ss-w-mon-empty", children: ui.emptyMatchesTab });
12907
12939
  const selected = tiles.find((t) => t.pin.key === monitor.selectedMatchKey) ?? tiles[0];
12908
12940
  const m = selected.match;
12909
- return /* @__PURE__ */ jsxs86(Fragment26, { children: [
12941
+ return /* @__PURE__ */ jsxs86(Fragment25, { children: [
12910
12942
  tiles.filter((t) => t.match).length >= 2 && /* @__PURE__ */ jsx91(ScoreboardStrip, { tiles, selectedKey: selected.pin.key, onSelect: monitor.selectMatch, ui }),
12911
12943
  /* @__PURE__ */ jsxs86("div", { className: "ss-w-mon-list", children: [
12912
12944
  !m && /* @__PURE__ */ jsx91(MonitorSkeleton, { pin: selected.pin, monitor, ui }),
@@ -12947,7 +12979,7 @@ function TrendsPanel({ monitor, ui, slip }) {
12947
12979
  const selected = tiles.find((t) => t.market.key === monitor.selectedTrendKey) ?? tiles[0];
12948
12980
  const m = selected.market;
12949
12981
  const pin = monitor.pins.find((p) => p.key === m.key);
12950
- return /* @__PURE__ */ jsxs86(Fragment26, { children: [
12982
+ return /* @__PURE__ */ jsxs86(Fragment25, { children: [
12951
12983
  tiles.length >= 2 && monitor.selectTrend && /* @__PURE__ */ jsx91(TrendsStrip, { tiles, selectedKey: m.key, onSelect: monitor.selectTrend, ui }),
12952
12984
  /* @__PURE__ */ jsx91("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ jsxs86("div", { className: "ss-w-mon-oddspin", "data-settled": m.isSettled || void 0, children: [
12953
12985
  /* @__PURE__ */ jsx91(OddsLiveStrip, { m, ui }),
@@ -13073,12 +13105,12 @@ function ScheduleRow(props) {
13073
13105
  }
13074
13106
 
13075
13107
  // src/components/LeagueTitle.tsx
13076
- import { Fragment as Fragment27, jsx as jsx93, jsxs as jsxs87 } from "react/jsx-runtime";
13108
+ import { Fragment as Fragment26, jsx as jsx93, jsxs as jsxs87 } from "react/jsx-runtime";
13077
13109
  function leagueTitleText(group, disambiguate) {
13078
13110
  return disambiguate && group.competitionCountry ? `${group.competitionName} (${group.competitionCountry})` : group.competitionName;
13079
13111
  }
13080
13112
  function LeagueTitle({ group, disambiguate, nameClass }) {
13081
- return /* @__PURE__ */ jsxs87(Fragment27, { children: [
13113
+ return /* @__PURE__ */ jsxs87(Fragment26, { children: [
13082
13114
  /* @__PURE__ */ jsx93(Crest, { url: group.competitionImagePath ?? void 0, name: group.competitionName, kind: "comp" }),
13083
13115
  /* @__PURE__ */ jsxs87("span", { className: nameClass, children: [
13084
13116
  group.competitionName,
@@ -13306,7 +13338,7 @@ function SportChips({ offered, value, onChange, counts, ui }) {
13306
13338
  }
13307
13339
 
13308
13340
  // src/components/LivePanel.tsx
13309
- import { Fragment as Fragment28, jsx as jsx97, jsxs as jsxs91 } from "react/jsx-runtime";
13341
+ import { Fragment as Fragment27, jsx as jsx97, jsxs as jsxs91 } from "react/jsx-runtime";
13310
13342
  var OPEN_TOP_GROUPS = 2;
13311
13343
  var QUIET_ROWS = 4;
13312
13344
  function LivePanel({ discovery, ui, monitor, sport, offered, onSport, league, onLeague, onSeeAll, onAsk }) {
@@ -13383,7 +13415,7 @@ function LivePanel({ discovery, ui, monitor, sport, offered, onSport, league, on
13383
13415
  ] }, section2.kind)),
13384
13416
  sections.some((section2) => section2.groups.some((view) => view.group.sport === "tennis")) && /* @__PURE__ */ jsx97("div", { className: "ss-w-lp-foot", children: ui.tennis.liveTabFooter }),
13385
13417
  !stale && sections.length === 0 && filtered && /* @__PURE__ */ jsx97("div", { className: "ss-w-today-empty", children: ui.nothingLiveForFilter }),
13386
- !stale && sections.length === 0 && !filtered && /* @__PURE__ */ jsxs91(Fragment28, { children: [
13418
+ !stale && sections.length === 0 && !filtered && /* @__PURE__ */ jsxs91(Fragment27, { children: [
13387
13419
  /* @__PURE__ */ jsx97("div", { className: "ss-w-today-empty", children: ui.nothingLive }),
13388
13420
  upcoming.map(({ group, match }) => /* @__PURE__ */ jsxs91("div", { className: "ss-w-lp-next", children: [
13389
13421
  /* @__PURE__ */ jsx97("span", { className: "ss-w-lp-tag", children: group.competitionName }),
@@ -13764,7 +13796,7 @@ function splitName(full) {
13764
13796
  }
13765
13797
 
13766
13798
  // src/components/GameTileArt.tsx
13767
- import { Fragment as Fragment29, jsx as jsx103, jsxs as jsxs95 } from "react/jsx-runtime";
13799
+ import { Fragment as Fragment28, jsx as jsx103, jsxs as jsxs95 } from "react/jsx-runtime";
13768
13800
  function GameTileArt({ gameId }) {
13769
13801
  return /* @__PURE__ */ jsx103("svg", { className: "ss-g-art", viewBox: "0 0 120 74", "aria-hidden": "true", children: ART[gameId] ?? ART.default });
13770
13802
  }
@@ -13773,41 +13805,41 @@ var head = (cx, cy, r, cls = "ss-g-art-fg") => /* @__PURE__ */ jsxs95("g", { cla
13773
13805
  /* @__PURE__ */ jsx103("path", { d: `M${cx - r} ${cy + r}c0-${r * 0.8} ${r * 0.45}-${r * 1.1} ${r}-${r * 1.1}s${r} ${r * 0.3} ${r} ${r * 1.1}z` })
13774
13806
  ] });
13775
13807
  var ART = {
13776
- "mystery-tiger": /* @__PURE__ */ jsxs95(Fragment29, { children: [
13808
+ "mystery-tiger": /* @__PURE__ */ jsxs95(Fragment28, { children: [
13777
13809
  head(60, 38, 26, "ss-g-art-fg"),
13778
13810
  /* @__PURE__ */ jsx103("text", { x: "60", y: "36", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
13779
13811
  ] }),
13780
- "higher-or-lower": /* @__PURE__ */ jsxs95(Fragment29, { children: [
13812
+ "higher-or-lower": /* @__PURE__ */ jsxs95(Fragment28, { children: [
13781
13813
  head(32, 38, 20),
13782
13814
  head(88, 38, 20),
13783
13815
  /* @__PURE__ */ jsx103("circle", { cx: "60", cy: "37", r: "11", className: "ss-g-art-accent" }),
13784
13816
  /* @__PURE__ */ jsx103("path", { d: "M57 33l3-3 3 3M57 41l3 3 3-3", className: "ss-g-art-ink" })
13785
13817
  ] }),
13786
- "guess-the-xi": /* @__PURE__ */ jsxs95(Fragment29, { children: [
13818
+ "guess-the-xi": /* @__PURE__ */ jsxs95(Fragment28, { children: [
13787
13819
  /* @__PURE__ */ jsx103("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
13788
13820
  [[60, 60, "a"], [24, 46], [48, 46], [72, 46], [96, 46], [36, 30], [60, 30], [84, 30], [40, 14], [60, 14], [80, 14]].map(([x, y, a], i) => /* @__PURE__ */ jsx103("circle", { cx: x, cy: y, r: "4", className: a ? "ss-g-art-accent" : "ss-g-art-dot" }, i))
13789
13821
  ] }),
13790
- "daily-quiz": /* @__PURE__ */ jsx103(Fragment29, { children: [[14, 8], [62, 8], [14, 40], [62, 40]].map(([x, y], i) => /* @__PURE__ */ jsx103("rect", { x, y, width: "44", height: "26", rx: "5", className: i === 1 ? "ss-g-art-correct" : "ss-g-art-block" }, i)) }),
13791
- "career-path": /* @__PURE__ */ jsxs95(Fragment29, { children: [
13822
+ "daily-quiz": /* @__PURE__ */ jsx103(Fragment28, { children: [[14, 8], [62, 8], [14, 40], [62, 40]].map(([x, y], i) => /* @__PURE__ */ jsx103("rect", { x, y, width: "44", height: "26", rx: "5", className: i === 1 ? "ss-g-art-correct" : "ss-g-art-block" }, i)) }),
13823
+ "career-path": /* @__PURE__ */ jsxs95(Fragment28, { children: [
13792
13824
  /* @__PURE__ */ jsx103("path", { d: "M18 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z", className: "ss-g-art-fg" }),
13793
13825
  /* @__PURE__ */ jsx103("path", { d: "M48 37h8M84 37h8", className: "ss-g-art-line" }),
13794
13826
  /* @__PURE__ */ jsx103("path", { d: "M60 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z", className: "ss-g-art-fg" }),
13795
13827
  /* @__PURE__ */ jsx103("rect", { x: "96", y: "22", width: "18", height: "26", rx: "4", className: "ss-g-art-dash" }),
13796
13828
  /* @__PURE__ */ jsx103("text", { x: "105", y: "40", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
13797
13829
  ] }),
13798
- "beat-the-grid": /* @__PURE__ */ jsx103(Fragment29, { children: [0, 1, 2].flatMap((r) => [0, 1, 2].map((c) => /* @__PURE__ */ jsx103("rect", { x: 33 + c * 19, y: 10 + r * 19, width: "16", height: "16", rx: "3", className: (r + c) % 3 === 0 ? "ss-g-art-accent" : "ss-g-art-block" }, `${r}${c}`))) }),
13799
- "matchday-predictor": /* @__PURE__ */ jsxs95(Fragment29, { children: [
13830
+ "beat-the-grid": /* @__PURE__ */ jsx103(Fragment28, { children: [0, 1, 2].flatMap((r) => [0, 1, 2].map((c) => /* @__PURE__ */ jsx103("rect", { x: 33 + c * 19, y: 10 + r * 19, width: "16", height: "16", rx: "3", className: (r + c) % 3 === 0 ? "ss-g-art-accent" : "ss-g-art-block" }, `${r}${c}`))) }),
13831
+ "matchday-predictor": /* @__PURE__ */ jsxs95(Fragment28, { children: [
13800
13832
  /* @__PURE__ */ jsx103("path", { d: "M10 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z", className: "ss-g-art-fg" }),
13801
13833
  /* @__PURE__ */ jsx103("rect", { x: "38", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-accent-stroke" }),
13802
13834
  /* @__PURE__ */ jsx103("rect", { x: "64", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-dash" }),
13803
13835
  /* @__PURE__ */ jsx103("path", { d: "M90 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z", className: "ss-g-art-fg" })
13804
13836
  ] }),
13805
- "starting-xi": /* @__PURE__ */ jsxs95(Fragment29, { children: [
13837
+ "starting-xi": /* @__PURE__ */ jsxs95(Fragment28, { children: [
13806
13838
  /* @__PURE__ */ jsx103("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
13807
13839
  [[60, 60], [30, 46], [50, 46], [70, 46], [90, 46], [45, 30], [75, 30], [30, 16], [60, 16], [90, 16]].map(([x, y], i) => /* @__PURE__ */ jsx103("circle", { cx: x, cy: y, r: "5", className: i < 7 ? "ss-g-art-accent" : "ss-g-art-dash" }, i))
13808
13840
  ] }),
13809
- "stat-ladder": /* @__PURE__ */ jsx103(Fragment29, { children: [[20, 70], [34, 52], [48, 34]].map(([y, w], i) => /* @__PURE__ */ jsx103("rect", { x: "24", y, width: w, height: "12", rx: "3", className: i === 1 ? "ss-g-art-accent" : "ss-g-art-block" }, i)) }),
13810
- "fan-motm": /* @__PURE__ */ jsxs95(Fragment29, { children: [
13841
+ "stat-ladder": /* @__PURE__ */ jsx103(Fragment28, { children: [[20, 70], [34, 52], [48, 34]].map(([y, w], i) => /* @__PURE__ */ jsx103("rect", { x: "24", y, width: w, height: "12", rx: "3", className: i === 1 ? "ss-g-art-accent" : "ss-g-art-block" }, i)) }),
13842
+ "fan-motm": /* @__PURE__ */ jsxs95(Fragment28, { children: [
13811
13843
  /* @__PURE__ */ jsx103("circle", { cx: "60", cy: "37", r: "26", className: "ss-g-art-accent-stroke" }),
13812
13844
  head(60, 40, 18),
13813
13845
  /* @__PURE__ */ jsx103("path", { d: "M84 8l2.4 5 5.4.6-4 3.7 1.1 5.4-4.9-2.7-4.9 2.7 1.1-5.4-4-3.7 5.4-.6z", className: "ss-g-art-accent" })
@@ -13831,7 +13863,7 @@ function StatStack({ value, label }) {
13831
13863
  }
13832
13864
 
13833
13865
  // src/components/GameTile.tsx
13834
- import { Fragment as Fragment30, jsx as jsx105, jsxs as jsxs97 } from "react/jsx-runtime";
13866
+ import { Fragment as Fragment29, jsx as jsx105, jsxs as jsxs97 } from "react/jsx-runtime";
13835
13867
  function tileStatus(game, ui) {
13836
13868
  switch (game.status) {
13837
13869
  case "locked":
@@ -13855,7 +13887,7 @@ function GameTile({ game, onOpen, ui, variant = "tile" }) {
13855
13887
  const status2 = tileStatus(game, ui);
13856
13888
  const disabled = DISABLED.has(game.status);
13857
13889
  const title = gameTitle(game, ui.games.titles);
13858
- const body = variant === "hero" ? /* @__PURE__ */ jsxs97(Fragment30, { children: [
13890
+ const body = variant === "hero" ? /* @__PURE__ */ jsxs97(Fragment29, { children: [
13859
13891
  /* @__PURE__ */ jsxs97("span", { className: "ss-g-hero-text", children: [
13860
13892
  /* @__PURE__ */ jsx105("span", { className: "ss-g-hero-eyebrow", children: ui.games.dailyChallenge }),
13861
13893
  status2.tone === "new" && /* @__PURE__ */ jsx105(Chip, { variant: "badge", children: ui.games.newToday }),
@@ -13867,7 +13899,7 @@ function GameTile({ game, onOpen, ui, variant = "tile" }) {
13867
13899
  ] })
13868
13900
  ] }),
13869
13901
  /* @__PURE__ */ jsx105("span", { className: "ss-g-hero-art", children: /* @__PURE__ */ jsx105(GameTileArt, { gameId: game.gameId }) })
13870
- ] }) : variant === "wide" ? /* @__PURE__ */ jsxs97(Fragment30, { children: [
13902
+ ] }) : variant === "wide" ? /* @__PURE__ */ jsxs97(Fragment29, { children: [
13871
13903
  /* @__PURE__ */ jsx105("span", { className: "ss-g-wide-art", children: /* @__PURE__ */ jsx105(GameTileArt, { gameId: game.gameId }) }),
13872
13904
  /* @__PURE__ */ jsxs97("span", { className: "ss-g-wide-text", children: [
13873
13905
  /* @__PURE__ */ jsx105("span", { className: "ss-g-tile-title", children: title }),
@@ -13875,7 +13907,7 @@ function GameTile({ game, onOpen, ui, variant = "tile" }) {
13875
13907
  status2.tone === "new" && /* @__PURE__ */ jsx105(Chip, { variant: "badge", children: ui.games.newToday })
13876
13908
  ] }),
13877
13909
  /* @__PURE__ */ jsx105("span", { className: "ss-g-wide-chev", children: /* @__PURE__ */ jsx105(IconChevronLeft, { size: 18 }) })
13878
- ] }) : /* @__PURE__ */ jsxs97(Fragment30, { children: [
13910
+ ] }) : /* @__PURE__ */ jsxs97(Fragment29, { children: [
13879
13911
  /* @__PURE__ */ jsx105("span", { className: "ss-g-tile-art", children: /* @__PURE__ */ jsx105(GameTileArt, { gameId: game.gameId }) }),
13880
13912
  /* @__PURE__ */ jsx105("span", { className: "ss-g-tile-title", children: title }),
13881
13913
  /* @__PURE__ */ jsx105("span", { className: "ss-g-tile-status", "data-tone": status2.tone, children: status2.text })
@@ -13886,7 +13918,7 @@ function GameTile({ game, onOpen, ui, variant = "tile" }) {
13886
13918
  }
13887
13919
 
13888
13920
  // src/components/GamesHub.tsx
13889
- import { Fragment as Fragment31, jsx as jsx106, jsxs as jsxs98 } from "react/jsx-runtime";
13921
+ import { Fragment as Fragment30, jsx as jsx106, jsxs as jsxs98 } from "react/jsx-runtime";
13890
13922
  var PLAYABLE = /* @__PURE__ */ new Set(["available", "in_progress"]);
13891
13923
  var DONE = /* @__PURE__ */ new Set(["played", "graded"]);
13892
13924
  function pickHeroGame(games) {
@@ -13917,7 +13949,7 @@ function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
13917
13949
  /* @__PURE__ */ jsxs98("div", { className: "ss-g-stat", children: [
13918
13950
  /* @__PURE__ */ jsx106("span", { className: "ss-g-stat-l", children: ui.games.statStreak }),
13919
13951
  /* @__PURE__ */ jsxs98("span", { className: "ss-g-stat-v", "data-testid": "stat-streak", children: [
13920
- myWeeklyRow ? /* @__PURE__ */ jsxs98(Fragment31, { children: [
13952
+ myWeeklyRow ? /* @__PURE__ */ jsxs98(Fragment30, { children: [
13921
13953
  /* @__PURE__ */ jsx106(IconFlame, {}),
13922
13954
  myWeeklyRow.currentStreak
13923
13955
  ] }) : dash,
@@ -14307,11 +14339,11 @@ function SegmentProgress({ segments, ariaLabel, leftLabel, rightLabel, right })
14307
14339
  }
14308
14340
 
14309
14341
  // src/components/games/ui/AnswerTray.tsx
14310
- import { Fragment as Fragment32, jsx as jsx110, jsxs as jsxs101 } from "react/jsx-runtime";
14342
+ import { Fragment as Fragment31, jsx as jsx110, jsxs as jsxs101 } from "react/jsx-runtime";
14311
14343
  function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQuery, onPick, disabled, minQuery = 0 }) {
14312
14344
  const needle = query.trim().toLowerCase();
14313
14345
  const shown2 = needle.length < minQuery ? [] : needle ? options.filter((o) => o.name.toLowerCase().includes(needle)) : options;
14314
- return /* @__PURE__ */ jsxs101(Fragment32, { children: [
14346
+ return /* @__PURE__ */ jsxs101(Fragment31, { children: [
14315
14347
  /* @__PURE__ */ jsx110(
14316
14348
  SearchField,
14317
14349
  {
@@ -14444,7 +14476,7 @@ function PointsLadderRow({ ladder, guessesUsed, ui }) {
14444
14476
  }
14445
14477
 
14446
14478
  // src/components/games/MysteryTigerGame.tsx
14447
- import { Fragment as Fragment33, jsx as jsx116, jsxs as jsxs105 } from "react/jsx-runtime";
14479
+ import { Fragment as Fragment32, jsx as jsx116, jsxs as jsxs105 } from "react/jsx-runtime";
14448
14480
  function parseClientState(json) {
14449
14481
  if (!json) return null;
14450
14482
  try {
@@ -14554,7 +14586,7 @@ function MysteryTigerGame({
14554
14586
  }
14555
14587
  ),
14556
14588
  !config && /* @__PURE__ */ jsx116("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
14557
- config && /* @__PURE__ */ jsxs105(Fragment33, { children: [
14589
+ config && /* @__PURE__ */ jsxs105(Fragment32, { children: [
14558
14590
  /* @__PURE__ */ jsxs105("div", { className: "ss-g-body", children: [
14559
14591
  !isOver && /* @__PURE__ */ jsx116(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed, ui }),
14560
14592
  /* @__PURE__ */ jsxs105("div", { className: `ss-g-mt-card${isOver ? " ss-g-mt-card--reveal" : ""}`, children: [
@@ -14654,7 +14686,7 @@ function MysteryTigerGame({
14654
14686
  }
14655
14687
 
14656
14688
  // src/components/games/HigherOrLowerGame.tsx
14657
- import { Fragment as Fragment34, jsx as jsx117, jsxs as jsxs106 } from "react/jsx-runtime";
14689
+ import { Fragment as Fragment33, jsx as jsx117, jsxs as jsxs106 } from "react/jsx-runtime";
14658
14690
  var POINTS_PER_CORRECT = 10;
14659
14691
  function parseClientState2(json) {
14660
14692
  if (!json) return null;
@@ -14714,7 +14746,7 @@ function HigherOrLowerGame({
14714
14746
  }
14715
14747
  ),
14716
14748
  !config && /* @__PURE__ */ jsx117("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
14717
- config && /* @__PURE__ */ jsxs106(Fragment34, { children: [
14749
+ config && /* @__PURE__ */ jsxs106(Fragment33, { children: [
14718
14750
  /* @__PURE__ */ jsxs106("div", { className: "ss-g-body", children: [
14719
14751
  /* @__PURE__ */ jsxs106("div", { className: "ss-g-hl-prompt", "data-testid": "hol-prompt", children: [
14720
14752
  /* @__PURE__ */ jsx117("span", { className: "ss-g-hl-prompt-q", children: t.whoHadMore }),
@@ -14784,7 +14816,7 @@ function CrestShield({ src, name, size = 28 }) {
14784
14816
  }
14785
14817
 
14786
14818
  // src/components/games/CareerPathGame.tsx
14787
- import { Fragment as Fragment35, jsx as jsx119, jsxs as jsxs107 } from "react/jsx-runtime";
14819
+ import { Fragment as Fragment34, jsx as jsx119, jsxs as jsxs107 } from "react/jsx-runtime";
14788
14820
  function parseClientState3(json) {
14789
14821
  if (!json) return null;
14790
14822
  try {
@@ -14864,7 +14896,7 @@ function CareerPathGame({
14864
14896
  /* @__PURE__ */ jsx119("span", { className: "ss-g-cp-club", children: spell.clubName }),
14865
14897
  /* @__PURE__ */ jsxs107("span", { className: "ss-g-cp-sub", children: [
14866
14898
  /* @__PURE__ */ jsx119("span", { className: "ss-g-cp-years", children: years }),
14867
- spell.isLoan && /* @__PURE__ */ jsxs107(Fragment35, { children: [
14899
+ spell.isLoan && /* @__PURE__ */ jsxs107(Fragment34, { children: [
14868
14900
  years ? " \xB7 " : "",
14869
14901
  /* @__PURE__ */ jsx119("span", { className: "ss-g-cp-loan", children: s.loan })
14870
14902
  ] })
@@ -14924,7 +14956,7 @@ function OptionList({ label, options, onPick }) {
14924
14956
  }
14925
14957
 
14926
14958
  // src/components/games/BeatTheGridGame.tsx
14927
- import { Fragment as Fragment36, jsx as jsx121, jsxs as jsxs108 } from "react/jsx-runtime";
14959
+ import { Fragment as Fragment35, jsx as jsx121, jsxs as jsxs108 } from "react/jsx-runtime";
14928
14960
  function criterionIconKind(label, key) {
14929
14961
  const l = (key ?? label).toLowerCase();
14930
14962
  if (l.includes("app")) return "calendar";
@@ -14967,7 +14999,7 @@ function HeaderVisual({ label, textKey: iKey, meta }) {
14967
14999
  case "country":
14968
15000
  return /* @__PURE__ */ jsx121("span", { className: "ss-g-btg-hdr-flag", "aria-hidden": "true", children: nationalityFlag(meta.country ?? label) });
14969
15001
  case "position":
14970
- return /* @__PURE__ */ jsx121(Fragment36, {});
15002
+ return /* @__PURE__ */ jsx121(Fragment35, {});
14971
15003
  default:
14972
15004
  return /* @__PURE__ */ jsx121(CriterionIcon, { kind: criterionIconKind(label, iKey) });
14973
15005
  }
@@ -15030,7 +15062,7 @@ function SearchSheet({
15030
15062
  }
15031
15063
  )
15032
15064
  ] }),
15033
- playerPool.length === 0 ? /* @__PURE__ */ jsx121("div", { className: "ss-g-btg-sheet-empty", children: s.emptyPool }) : /* @__PURE__ */ jsxs108(Fragment36, { children: [
15065
+ playerPool.length === 0 ? /* @__PURE__ */ jsx121("div", { className: "ss-g-btg-sheet-empty", children: s.emptyPool }) : /* @__PURE__ */ jsxs108(Fragment35, { children: [
15034
15066
  /* @__PURE__ */ jsx121(
15035
15067
  SearchField,
15036
15068
  {
@@ -15049,7 +15081,7 @@ function SearchSheet({
15049
15081
  label: s.searchLabel(rowLabel, colLabel),
15050
15082
  options: filtered.map((p) => ({
15051
15083
  key: p.id,
15052
- content: /* @__PURE__ */ jsxs108(Fragment36, { children: [
15084
+ content: /* @__PURE__ */ jsxs108(Fragment35, { children: [
15053
15085
  /* @__PURE__ */ jsx121(PlayerAvatar, { name: p.name, imagePath: p.imagePath, className: "ss-g-opt-av" }),
15054
15086
  /* @__PURE__ */ jsx121("span", { className: "ss-g-btg-result-name", children: p.name }),
15055
15087
  /* @__PURE__ */ jsx121("span", { className: "ss-g-btg-result-plus", "aria-hidden": "true", children: /* @__PURE__ */ jsx121(IconPlus, { size: 18 }) })
@@ -15139,10 +15171,10 @@ function BeatTheGridGame({
15139
15171
  rows.map((rowLabel, rowIdx) => {
15140
15172
  const rowMeta = config.rowsMeta?.[rowIdx];
15141
15173
  const abbr = rowAbbrev(rowLabel, s.rowAbbrev, config.rowsI18n?.[rowIdx]?.key);
15142
- const rowHeaderContent = rowMeta ? /* @__PURE__ */ jsxs108(Fragment36, { children: [
15174
+ const rowHeaderContent = rowMeta ? /* @__PURE__ */ jsxs108(Fragment35, { children: [
15143
15175
  /* @__PURE__ */ jsx121(HeaderVisual, { label: rowLabel, textKey: config.rowsI18n?.[rowIdx]?.key, meta: rowMeta }),
15144
15176
  /* @__PURE__ */ jsx121("span", { children: rowLabel })
15145
- ] }) : abbr === rowLabel ? /* @__PURE__ */ jsx121("span", { children: rowLabel }) : /* @__PURE__ */ jsxs108(Fragment36, { children: [
15177
+ ] }) : abbr === rowLabel ? /* @__PURE__ */ jsx121("span", { children: rowLabel }) : /* @__PURE__ */ jsxs108(Fragment35, { children: [
15146
15178
  /* @__PURE__ */ jsx121("span", { "aria-hidden": "true", children: abbr }),
15147
15179
  /* @__PURE__ */ jsx121("span", { className: "ss-g-sr", children: rowLabel })
15148
15180
  ] });
@@ -15163,7 +15195,7 @@ function BeatTheGridGame({
15163
15195
  className: "ss-g-btg-cell",
15164
15196
  disabled: isLocked2 || submitting,
15165
15197
  onClick: () => handleCellClick(rowIdx, colIdx),
15166
- children: filled ? /* @__PURE__ */ jsxs108(Fragment36, { children: [
15198
+ children: filled ? /* @__PURE__ */ jsxs108(Fragment35, { children: [
15167
15199
  /* @__PURE__ */ jsx121(
15168
15200
  "span",
15169
15201
  {
@@ -15230,16 +15262,16 @@ function BeatTheGridGame({
15230
15262
  import { useState as useState65, useId as useId7 } from "react";
15231
15263
 
15232
15264
  // src/components/games/ui/PitchSvg.tsx
15233
- import { Fragment as Fragment37, jsx as jsx122, jsxs as jsxs109 } from "react/jsx-runtime";
15265
+ import { Fragment as Fragment36, jsx as jsx122, jsxs as jsxs109 } from "react/jsx-runtime";
15234
15266
  function PitchSvg({ variant }) {
15235
15267
  return /* @__PURE__ */ jsxs109("svg", { className: "ss-g-pitch-svg", viewBox: variant === "full" ? "0 0 100 150" : "0 0 100 100", preserveAspectRatio: "none", "aria-hidden": "true", children: [
15236
15268
  /* @__PURE__ */ jsx122("rect", { x: "4", y: "4", width: "92", height: variant === "full" ? 142 : 92, fill: "none" }),
15237
- variant === "full" ? /* @__PURE__ */ jsxs109(Fragment37, { children: [
15269
+ variant === "full" ? /* @__PURE__ */ jsxs109(Fragment36, { children: [
15238
15270
  /* @__PURE__ */ jsx122("line", { x1: "4", y1: "75", x2: "96", y2: "75" }),
15239
15271
  /* @__PURE__ */ jsx122("circle", { cx: "50", cy: "75", r: "12", fill: "none" }),
15240
15272
  /* @__PURE__ */ jsx122("rect", { x: "26", y: "4", width: "48", height: "20", fill: "none" }),
15241
15273
  /* @__PURE__ */ jsx122("rect", { x: "26", y: "126", width: "48", height: "20", fill: "none" })
15242
- ] }) : /* @__PURE__ */ jsxs109(Fragment37, { children: [
15274
+ ] }) : /* @__PURE__ */ jsxs109(Fragment36, { children: [
15243
15275
  /* @__PURE__ */ jsx122("path", { d: "M38 4a12 12 0 0 0 24 0", fill: "none" }),
15244
15276
  /* @__PURE__ */ jsx122("rect", { x: "26", y: "76", width: "48", height: "20", fill: "none" })
15245
15277
  ] })
@@ -15297,7 +15329,7 @@ function positionsBySlot(formation, rowsAttackFirst) {
15297
15329
  }
15298
15330
 
15299
15331
  // src/components/games/GuessTheXiGame.tsx
15300
- import { Fragment as Fragment38, jsx as jsx123, jsxs as jsxs110 } from "react/jsx-runtime";
15332
+ import { Fragment as Fragment37, jsx as jsx123, jsxs as jsxs110 } from "react/jsx-runtime";
15301
15333
  var MAX_GUESSES2 = 3;
15302
15334
  function parseClientState5(json) {
15303
15335
  if (!json) return null;
@@ -15359,7 +15391,7 @@ function GuessTheXiGame({
15359
15391
  }
15360
15392
  ),
15361
15393
  !config && /* @__PURE__ */ jsx123("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
15362
- config && /* @__PURE__ */ jsxs110(Fragment38, { children: [
15394
+ config && /* @__PURE__ */ jsxs110(Fragment37, { children: [
15363
15395
  /* @__PURE__ */ jsxs110("div", { className: "ss-g-body", children: [
15364
15396
  !isOver && /* @__PURE__ */ jsx123(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: clientState?.guessHistory.length ?? 0, ui }),
15365
15397
  rows.length > 0 && /* @__PURE__ */ jsxs110("div", { className: "ss-g-gxi-pitch", role: "group", "aria-label": t.pitchLabel, children: [
@@ -15408,7 +15440,7 @@ function GuessTheXiGame({
15408
15440
  ] }, g.teamId);
15409
15441
  })
15410
15442
  ] }),
15411
- isOver && /* @__PURE__ */ jsxs110(Fragment38, { children: [
15443
+ isOver && /* @__PURE__ */ jsxs110(Fragment37, { children: [
15412
15444
  /* @__PURE__ */ jsx123(
15413
15445
  ResultCard,
15414
15446
  {
@@ -15434,7 +15466,7 @@ function GuessTheXiGame({
15434
15466
  label: t.optionsLabel,
15435
15467
  options: filtered.map((tm) => ({
15436
15468
  key: tm.teamId,
15437
- content: /* @__PURE__ */ jsxs110(Fragment38, { children: [
15469
+ content: /* @__PURE__ */ jsxs110(Fragment37, { children: [
15438
15470
  /* @__PURE__ */ jsx123(CrestShield, { src: tm.crestUrl, name: tm.teamName, size: 28 }),
15439
15471
  /* @__PURE__ */ jsx123("span", { children: tm.teamName })
15440
15472
  ] })
@@ -15460,7 +15492,7 @@ function GuessTheXiGame({
15460
15492
 
15461
15493
  // src/components/games/DailyQuizGame.tsx
15462
15494
  import { useState as useState66 } from "react";
15463
- import { Fragment as Fragment39, jsx as jsx124, jsxs as jsxs111 } from "react/jsx-runtime";
15495
+ import { Fragment as Fragment38, jsx as jsx124, jsxs as jsxs111 } from "react/jsx-runtime";
15464
15496
  function parseClientState6(json) {
15465
15497
  if (!json) return null;
15466
15498
  try {
@@ -15579,7 +15611,7 @@ function DailyQuizGame({
15579
15611
  return /* @__PURE__ */ jsxs111("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
15580
15612
  /* @__PURE__ */ jsx124(GameHeader, { title, eyebrow: s.questionOf(page + 1, total), onBack, backLabel: ui.back }),
15581
15613
  /* @__PURE__ */ jsx124(SegmentProgress, { segments, ariaLabel: s.progressAria(page + 1, total) }),
15582
- /* @__PURE__ */ jsx124("div", { className: "ss-g-body", children: current && /* @__PURE__ */ jsxs111(Fragment39, { children: [
15614
+ /* @__PURE__ */ jsx124("div", { className: "ss-g-body", children: current && /* @__PURE__ */ jsxs111(Fragment38, { children: [
15583
15615
  /* @__PURE__ */ jsx124("h3", { className: "ss-g-dq-stem", children: current.stem }),
15584
15616
  /* @__PURE__ */ jsx124("div", { className: "ss-g-dq-opts", children: current.options.map((opt, optIdx) => {
15585
15617
  const selected = optIdx === selectedIdx;
@@ -15880,7 +15912,7 @@ function MatchdayPredictorGame({
15880
15912
 
15881
15913
  // src/components/games/StartingXiGame.tsx
15882
15914
  import { useId as useId9, useState as useState68 } from "react";
15883
- import { Fragment as Fragment40, jsx as jsx126, jsxs as jsxs113 } from "react/jsx-runtime";
15915
+ import { Fragment as Fragment39, jsx as jsx126, jsxs as jsxs113 } from "react/jsx-runtime";
15884
15916
  var POINTS_PER_STARTER = 8;
15885
15917
  var XI_SIZE = 11;
15886
15918
  var DEFAULT_FORMATION = "4-3-3";
@@ -15900,10 +15932,10 @@ function formationSlots(formation) {
15900
15932
  const lines = [1, ...outfield];
15901
15933
  const template = FORMATION_POSITIONS[used];
15902
15934
  const slots = [];
15903
- lines.forEach((count, li) => {
15935
+ lines.forEach((count2, li) => {
15904
15936
  const top = 88 - li * (77 / (lines.length - 1));
15905
- for (let ci = 0; ci < count; ci++) {
15906
- const left = count === 1 ? 50 : 12 + ci * (76 / (count - 1));
15937
+ for (let ci = 0; ci < count2; ci++) {
15938
+ const left = count2 === 1 ? 50 : 12 + ci * (76 / (count2 - 1));
15907
15939
  slots.push({ index: slots.length, label: template?.[li]?.[ci] ?? lineFallback(li, lines.length), left, top });
15908
15940
  }
15909
15941
  });
@@ -16029,11 +16061,11 @@ function StartingXiGame({
16029
16061
  })
16030
16062
  ] }),
16031
16063
  /* @__PURE__ */ jsxs113("div", { className: "ss-g-xi-picker", children: [
16032
- /* @__PURE__ */ jsx126("div", { className: "ss-g-xi-picker-head", children: activeSlot ? /* @__PURE__ */ jsxs113(Fragment40, { children: [
16064
+ /* @__PURE__ */ jsx126("div", { className: "ss-g-xi-picker-head", children: activeSlot ? /* @__PURE__ */ jsxs113(Fragment39, { children: [
16033
16065
  /* @__PURE__ */ jsx126(Chip, { variant: "badge", children: activeSlot.label }),
16034
16066
  /* @__PURE__ */ jsx126("strong", { children: t.pickFor(activeSlot.label) })
16035
16067
  ] }) : /* @__PURE__ */ jsx126("strong", { children: t.allPicked }) }),
16036
- activeSlot && /* @__PURE__ */ jsxs113(Fragment40, { children: [
16068
+ activeSlot && /* @__PURE__ */ jsxs113(Fragment39, { children: [
16037
16069
  /* @__PURE__ */ jsx126(
16038
16070
  SearchField,
16039
16071
  {
@@ -16533,7 +16565,7 @@ function LeaderboardEmpty({
16533
16565
  }
16534
16566
 
16535
16567
  // src/components/Leaderboard.tsx
16536
- import { Fragment as Fragment41, jsx as jsx132, jsxs as jsxs118 } from "react/jsx-runtime";
16568
+ import { Fragment as Fragment40, jsx as jsx132, jsxs as jsxs118 } from "react/jsx-runtime";
16537
16569
  function Leaderboard({
16538
16570
  data,
16539
16571
  ui,
@@ -16575,7 +16607,7 @@ function Leaderboard({
16575
16607
  onPlay,
16576
16608
  ui
16577
16609
  }
16578
- ) : /* @__PURE__ */ jsxs118(Fragment41, { children: [
16610
+ ) : /* @__PURE__ */ jsxs118(Fragment40, { children: [
16579
16611
  /* @__PURE__ */ jsx132("div", { className: "ss-w-lb2-rows", children: segment === "weekly" ? data.weeklyTop.map((row) => /* @__PURE__ */ jsx132(
16580
16612
  LeaderboardWeeklyRow,
16581
16613
  {
@@ -16714,7 +16746,7 @@ import { useEffect as useEffect50, useRef as useRef42, useState as useState75 }
16714
16746
 
16715
16747
  // src/components/FavouriteChips.tsx
16716
16748
  import { useEffect as useEffect48, useState as useState73 } from "react";
16717
- import { Fragment as Fragment42, jsx as jsx135, jsxs as jsxs120 } from "react/jsx-runtime";
16749
+ import { Fragment as Fragment41, jsx as jsx135, jsxs as jsxs120 } from "react/jsx-runtime";
16718
16750
  async function toggleWithNotice(controller, kind, id, onNotice) {
16719
16751
  const outcome = await controller.toggle(kind, id);
16720
16752
  if (outcome === "at_cap") onNotice({ type: "cap", kind });
@@ -16780,7 +16812,7 @@ function FavouriteChips({ controller, ui, sport, sportLabel: sportLabel2, onNoti
16780
16812
  if (!await controller.clear()) onNotice({ type: "error" });
16781
16813
  else onNotice(null);
16782
16814
  };
16783
- return /* @__PURE__ */ jsxs120(Fragment42, { children: [
16815
+ return /* @__PURE__ */ jsxs120(Fragment41, { children: [
16784
16816
  total === 0 ? /* @__PURE__ */ jsx135("p", { className: "ss-w-fav-empty", children: sport === "tennis" ? ui.tennis.favEmpty : ui.favEmpty }) : null,
16785
16817
  hasCompetitions(sport) ? /* @__PURE__ */ jsx135(Group, { title: sport === "tennis" ? ui.tennis.favTournaments : ui.favLeagues, entities: data.competitions, sport, ui, controller, onNotice }) : null,
16786
16818
  hasTeams(sport) ? /* @__PURE__ */ jsx135(Group, { title: ui.favTeams, entities: data.teams, sport, ui, controller, onNotice }) : null,
@@ -16907,7 +16939,7 @@ function FavouritesPanel({ controller, ui, sport, sports, onSportChange }) {
16907
16939
  }, [sport]);
16908
16940
  const sportLabel2 = sports.find((s) => s.sport === sport)?.label ?? sportLabel(ui, sport);
16909
16941
  const noticeText = notice === null ? null : notice.type === "cap" ? ui.favAtCap(favouriteKindLabel(ui, sport, notice.kind)) : ui.favError;
16910
- return /* @__PURE__ */ jsxs122("div", { className: "ss-w-mon-list ss-w-fav", children: [
16942
+ return /* @__PURE__ */ jsxs122("div", { className: "ss-w-fav", children: [
16911
16943
  sports.length > 1 ? /* @__PURE__ */ jsx137("div", { className: "ss-w-dash-sports", role: "group", "aria-label": ui.sportGroupLabel, children: sports.map((s) => /* @__PURE__ */ jsx137(
16912
16944
  "button",
16913
16945
  {
@@ -16927,9 +16959,104 @@ function FavouritesPanel({ controller, ui, sport, sports, onSportChange }) {
16927
16959
  ] });
16928
16960
  }
16929
16961
 
16962
+ // src/components/PresetTools.tsx
16963
+ import { useId as useId11, useState as useState76 } from "react";
16964
+ import { Fragment as Fragment42, jsx as jsx138, jsxs as jsxs123 } from "react/jsx-runtime";
16965
+ function PresetToolModal({ title, closeLabel, onClose, children, footer, className }) {
16966
+ const { dialogRef, onKeyDown } = useModalDialog(onClose, { restoreFocus: false });
16967
+ const titleId = useId11();
16968
+ return /* @__PURE__ */ jsx138("div", { className: className ? `ss-w-tool-backdrop ${className}` : "ss-w-tool-backdrop", children: /* @__PURE__ */ jsxs123("div", { ref: dialogRef, className: "ss-w-tool", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, tabIndex: -1, onKeyDown, children: [
16969
+ /* @__PURE__ */ jsxs123("div", { className: "ss-w-tool-head", children: [
16970
+ /* @__PURE__ */ jsx138("h2", { id: titleId, className: "ss-w-tool-title", children: title }),
16971
+ /* @__PURE__ */ jsx138("button", { type: "button", className: "ss-w-tool-close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx138(CloseIcon, {}) })
16972
+ ] }),
16973
+ /* @__PURE__ */ jsx138("div", { className: "ss-w-tool-body", children }),
16974
+ footer ? /* @__PURE__ */ jsx138("div", { className: "ss-w-tool-foot", children: footer }) : null
16975
+ ] }) });
16976
+ }
16977
+ function SendButton({ label, display, disabled, onClick }) {
16978
+ return /* @__PURE__ */ jsx138("button", { type: "button", className: "ss-w-tool-send", "aria-label": `${label}: ${display}`, disabled, onClick, children: label });
16979
+ }
16980
+ function PickList({ picks, formatKickoff }) {
16981
+ const { oddsFormat } = useOddsSettings();
16982
+ return /* @__PURE__ */ jsx138("ul", { className: "ss-w-tool-picks", role: "list", children: picks.map((p) => /* @__PURE__ */ jsxs123("li", { className: "ss-w-tool-pick", children: [
16983
+ /* @__PURE__ */ jsxs123("span", { className: "ss-w-tool-pick-match", children: [
16984
+ p.homeTeamName,
16985
+ " \u2013 ",
16986
+ p.awayTeamName
16987
+ ] }),
16988
+ /* @__PURE__ */ jsxs123("span", { className: "ss-w-tool-pick-sel", children: [
16989
+ p.marketLabel,
16990
+ ": ",
16991
+ p.selectionLabel,
16992
+ p.line ? ` ${p.line}` : ""
16993
+ ] }),
16994
+ /* @__PURE__ */ jsx138("span", { className: "ss-w-tool-pick-kick", children: formatKickoff(p.kickoffUtc) }),
16995
+ /* @__PURE__ */ jsx138("span", { className: "ss-w-tool-pick-price", children: formatOdds(p.priceFormats, oddsFormat) })
16996
+ ] }, p.matchOddsId)) });
16997
+ }
16998
+ function ComboPreview({ cell: cell2, formatKickoff }) {
16999
+ const { oddsFormat } = useOddsSettings();
17000
+ return /* @__PURE__ */ jsxs123(Fragment42, { children: [
17001
+ /* @__PURE__ */ jsx138(PickList, { picks: cell2.combo.legs, formatKickoff }),
17002
+ /* @__PURE__ */ jsx138("div", { className: "ss-w-tool-math", children: oddsFormat === "decimal" ? cell2.combo.multiplication : formatOdds(cell2.combo.totalFormats, oddsFormat) })
17003
+ ] });
17004
+ }
17005
+ function Unavailable({ text: text2 }) {
17006
+ return /* @__PURE__ */ jsx138("p", { className: "ss-w-tool-unavailable", children: text2 });
17007
+ }
17008
+ var textOf = (options, value, format2) => {
17009
+ const o = options.find((x) => samePrice(x.value, value));
17010
+ return o ? formatOdds(o.formats, format2) : "";
17011
+ };
17012
+ function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal, initialLegs, onSend, onClose }) {
17013
+ const { oddsFormat } = useOddsSettings();
17014
+ const totalOptions = comboTotals(grid);
17015
+ const totals = totalOptions.map((o) => o.value);
17016
+ const legChoices = comboLegChoices(grid);
17017
+ const [total, setTotal] = useState76(() => nearest(totals, initialTotal));
17018
+ const [legs, setLegs] = useState76(() => legsForTotal(grid, nearest(totals, initialTotal), clampLegs(legChoices, initialLegs)));
17019
+ const [announcement, setAnnouncement] = useState76("");
17020
+ const cell2 = findCombo(grid, total, legs);
17021
+ const minLegs = legChoices[0] ?? legs;
17022
+ const maxLegs = legChoices[legChoices.length - 1] ?? legs;
17023
+ const display = strings.comboDisplay(legs, textOf(totalOptions, total, oddsFormat));
17024
+ const choose = (nextTotal, nextLegs) => {
17025
+ setTotal(nextTotal);
17026
+ setLegs(nextLegs);
17027
+ const d = strings.comboDisplay(nextLegs, textOf(totalOptions, nextTotal, oddsFormat));
17028
+ setAnnouncement(findCombo(grid, nextTotal, nextLegs) ? d : `${d}. ${strings.unavailable}`);
17029
+ };
17030
+ const footer = /* @__PURE__ */ jsx138(SendButton, { label: strings.send, display, disabled: !cell2 || streaming, onClick: () => {
17031
+ if (cell2) onSend(comboAsk(cell2, strings, oddsFormat));
17032
+ } });
17033
+ return /* @__PURE__ */ jsxs123(PresetToolModal, { title: strings.buildCombo, closeLabel: strings.close, onClose, footer, children: [
17034
+ /* @__PURE__ */ jsxs123("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.totalLabel, children: [
17035
+ /* @__PURE__ */ jsx138("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.totalLabel }),
17036
+ /* @__PURE__ */ jsx138("div", { className: "ss-w-tool-chips", children: totalOptions.map((o) => /* @__PURE__ */ jsx138("button", { type: "button", className: "ss-w-tool-chip", "aria-pressed": samePrice(o.value, total), onClick: () => choose(o.value, samePrice(o.value, total) ? legs : legsForTotal(grid, o.value, legs)), children: formatOdds(o.formats, oddsFormat) }, o.key)) })
17037
+ ] }),
17038
+ /* @__PURE__ */ jsxs123("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.matchesLabel, children: [
17039
+ /* @__PURE__ */ jsx138("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.matchesLabel }),
17040
+ /* @__PURE__ */ jsxs123("div", { className: "ss-w-tool-stepper", children: [
17041
+ /* @__PURE__ */ jsx138("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.fewerMatches, disabled: legs <= minLegs, onClick: () => choose(total, legs - 1), children: "\u2212" }),
17042
+ /* @__PURE__ */ jsx138("span", { className: "ss-w-tool-count", children: legs }),
17043
+ /* @__PURE__ */ jsx138("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.moreMatches, disabled: legs >= maxLegs, onClick: () => choose(total, legs + 1), children: "+" })
17044
+ ] })
17045
+ ] }),
17046
+ cell2 ? /* @__PURE__ */ jsx138(ComboPreview, { cell: cell2, formatKickoff }) : /* @__PURE__ */ jsx138(Unavailable, { text: strings.unavailable }),
17047
+ /* @__PURE__ */ jsx138("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
17048
+ ] });
17049
+ }
17050
+
17051
+ // src/components/FavouritesSheet.tsx
17052
+ import { jsx as jsx139 } from "react/jsx-runtime";
17053
+ function FavouritesSheet({ ui, controller, sport, sports, onSportChange, onClose }) {
17054
+ return /* @__PURE__ */ jsx139(PresetToolModal, { title: ui.tabFavourites, closeLabel: ui.closeSheetLabel, onClose, className: "ss-w-set-backdrop-in ss-w-fav-sheet", children: /* @__PURE__ */ jsx139(FavouritesPanel, { controller, ui, sport, sports, onSportChange }) });
17055
+ }
17056
+
16930
17057
  // src/components/dashboard/v8/SentenceBuilder.tsx
16931
- import { useEffect as useEffect51, useRef as useRef43, useState as useState76 } from "react";
16932
- import { Fragment as Fragment43, jsx as jsx138, jsxs as jsxs123 } from "react/jsx-runtime";
17058
+ import { useEffect as useEffect52, useRef as useRef44, useState as useState77 } from "react";
17059
+ import { Fragment as Fragment43, jsx as jsx140, jsxs as jsxs124 } from "react/jsx-runtime";
16933
17060
  var TOTALS = ["any", "3", "5", "10", "20", "50"];
16934
17061
  var BASE_LEGS = [1, 2, 3, 4];
16935
17062
  var isTotal = (v) => TOTALS.includes(v);
@@ -16954,8 +17081,8 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
16954
17081
  const opening = openingGames(preset);
16955
17082
  const gamesOptions = opening.options;
16956
17083
  const marketOptions = usableMarkets(preset);
16957
- const [fingerprint] = useState76(() => JSON.stringify(preset));
16958
- const [saved] = useState76(() => {
17084
+ const [fingerprint] = useState77(() => JSON.stringify(preset));
17085
+ const [saved] = useState77(() => {
16959
17086
  const kept = memory3?.savedView(sport);
16960
17087
  return kept && kept.fingerprint === fingerprint ? kept : null;
16961
17088
  });
@@ -16969,9 +17096,9 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
16969
17096
  // The server never widens by itself: an all-games preset with no ids asks for it.
16970
17097
  widen: opening.option ? opening.option.matchIds.length === 0 : preset.gamesScope === "all" && preset.matchIds.length === 0
16971
17098
  };
16972
- const [view, setView] = useState76(() => saved?.view ?? openingView);
16973
- const autoWidened = useRef43(false);
16974
- const [widenedNote, setWidenedNote] = useState76(saved?.widenedNote ?? false);
17099
+ const [view, setView] = useState77(() => saved?.view ?? openingView);
17100
+ const autoWidened = useRef44(false);
17101
+ const [widenedNote, setWidenedNote] = useState77(saved?.widenedNote ?? false);
16975
17102
  const requestFor = (v) => ({
16976
17103
  sport,
16977
17104
  ...v.marketKey !== null ? { marketKey: v.marketKey } : {},
@@ -16983,10 +17110,10 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
16983
17110
  ...operatorUserId ? { operatorUserId } : {},
16984
17111
  ...anonymousUserId ? { anonymousUserId } : {}
16985
17112
  });
16986
- const [first] = useState76(() => requestFor(view));
17113
+ const [first] = useState77(() => requestFor(view));
16987
17114
  const { grid, status: status2, confirmed, request } = useBuilderGrid({ conversation, locale: ui.hostTag, memory: memory3, initial: first });
16988
- const lastRequest = useRef43(first);
16989
- useEffect51(() => {
17115
+ const lastRequest = useRef44(first);
17116
+ useEffect52(() => {
16990
17117
  void request(lastRequest.current);
16991
17118
  }, [request]);
16992
17119
  const send = (req) => {
@@ -17019,14 +17146,14 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
17019
17146
  const rows = ready && grid.status === "ok" ? legsOf(grid, sport) : null;
17020
17147
  const rowSlip = rows ? guardLegsPreMatch(slip, rows, ui) : slip;
17021
17148
  useNextKickoffRender(rows ? rows.map((l) => l.kickoffUtc) : []);
17022
- const [startedNote, setStartedNote] = useState76(false);
17149
+ const [startedNote, setStartedNote] = useState77(false);
17023
17150
  const anyStarted = rows !== null && rows.some((l) => !preMatchOpen(l.kickoffUtc, Date.now()));
17024
- useEffect51(() => {
17151
+ useEffect52(() => {
17025
17152
  if (startedNote && status2 === "ready" && !anyStarted) setStartedNote(false);
17026
17153
  }, [startedNote, status2, anyStarted]);
17027
17154
  const market = rows?.[0]?.market;
17028
- const [seen2, setSeen] = useState76(null);
17029
- useEffect51(() => {
17155
+ const [seen2, setSeen] = useState77(null);
17156
+ useEffect52(() => {
17030
17157
  if (market) setSeen(market);
17031
17158
  }, [market]);
17032
17159
  const marketName = view.marketKey === null ? null : marketOptions?.find((m) => m.key === view.marketKey)?.label ?? market ?? seen2;
@@ -17039,14 +17166,14 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
17039
17166
  const quotedAt = rows ? oldestQuote(rows) : null;
17040
17167
  const combo = ready && grid.total !== null ? { sport, totalChosen: view.total, totalActual: grid.total } : void 0;
17041
17168
  const canWiden = gamesOptions === null || allGames !== null;
17042
- useEffect51(() => {
17169
+ useEffect52(() => {
17043
17170
  if (!empty2 || !singles || widened || !canWiden || autoWidened.current) return;
17044
17171
  autoWidened.current = true;
17045
17172
  const next = { ...view, widen: true, matchIds: [], gamesId: allGames ? allGames.id : view.gamesId };
17046
17173
  commit(next, true);
17047
17174
  send(requestFor(next));
17048
17175
  }, [empty2, singles, widened, canWiden, view]);
17049
- useEffect51(() => {
17176
+ useEffect52(() => {
17050
17177
  if (coolOff) onCoolOff?.(sport);
17051
17178
  }, [coolOff, onCoolOff, sport]);
17052
17179
  if (coolOff) return null;
@@ -17055,13 +17182,13 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
17055
17182
  const nextWhen = nextAtMs !== null && nextAtMs > Date.now() ? kickoffText(ui, preset.nextGamesAtUtc) : null;
17056
17183
  const phrase = preset.nextGamesAtUtc == null ? nextGames : null;
17057
17184
  const mineGames = gamesOptions?.find((o) => o.id === view.gamesId)?.mine === true;
17058
- return /* @__PURE__ */ jsx138("section", { className: "ss-w-v8-sec ss-w-v8-builder", "data-testid": "v8-builder", "aria-busy": status2 === "loading" || void 0, children: conversation && paused ? /* @__PURE__ */ jsx138("p", { className: "ss-w-v8-builder-note", "data-kind": "paused", children: nextWhen ? ui.v8PausedNext(nextWhen) : /* @__PURE__ */ jsxs123(Fragment43, { children: [
17185
+ return /* @__PURE__ */ jsx140("section", { className: "ss-w-v8-sec ss-w-v8-builder", "data-testid": "v8-builder", "aria-busy": status2 === "loading" || void 0, children: conversation && paused ? /* @__PURE__ */ jsx140("p", { className: "ss-w-v8-builder-note", "data-kind": "paused", children: nextWhen ? ui.v8PausedNext(nextWhen) : /* @__PURE__ */ jsxs124(Fragment43, { children: [
17059
17186
  ui.v8Paused,
17060
- phrase ? /* @__PURE__ */ jsx138("span", { className: "ss-w-v8-builder-next", "data-testid": "v8-next-games", children: phrase }) : null
17061
- ] }) }) : conversation ? /* @__PURE__ */ jsxs123(Fragment43, { children: [
17062
- marketOptions ? /* @__PURE__ */ jsxs123("div", { className: "ss-w-v8-builder-ln", children: [
17063
- /* @__PURE__ */ jsx138("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderShow }),
17064
- /* @__PURE__ */ jsx138("div", { className: "ss-w-v8-slot", "data-mine": marketOptions.find((m) => m.key === view.marketKey)?.usual || void 0, children: /* @__PURE__ */ jsxs123(
17187
+ phrase ? /* @__PURE__ */ jsx140("span", { className: "ss-w-v8-builder-next", "data-testid": "v8-next-games", children: phrase }) : null
17188
+ ] }) }) : conversation ? /* @__PURE__ */ jsxs124(Fragment43, { children: [
17189
+ marketOptions ? /* @__PURE__ */ jsxs124("div", { className: "ss-w-v8-builder-ln", children: [
17190
+ /* @__PURE__ */ jsx140("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderShow }),
17191
+ /* @__PURE__ */ jsx140("div", { className: "ss-w-v8-slot", "data-mine": marketOptions.find((m) => m.key === view.marketKey)?.usual || void 0, children: /* @__PURE__ */ jsxs124(
17065
17192
  "select",
17066
17193
  {
17067
17194
  className: "ss-w-v8-select",
@@ -17072,18 +17199,18 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
17072
17199
  if (picked !== view.marketKey) ask({ ...view, marketKey: picked });
17073
17200
  },
17074
17201
  children: [
17075
- /* @__PURE__ */ jsx138("option", { value: ALL_MARKETS, children: ui.v8AllMarkets }),
17076
- marketOptions.map((m) => /* @__PURE__ */ jsx138("option", { value: m.key, children: m.usual ? `${ui.v8UsualPrefix}${m.label}` : m.label }, m.key))
17202
+ /* @__PURE__ */ jsx140("option", { value: ALL_MARKETS, children: ui.v8AllMarkets }),
17203
+ marketOptions.map((m) => /* @__PURE__ */ jsx140("option", { value: m.key, children: m.usual ? `${ui.v8UsualPrefix}${m.label}` : m.label }, m.key))
17077
17204
  ]
17078
17205
  }
17079
17206
  ) })
17080
- ] }) : marketName ? /* @__PURE__ */ jsxs123("div", { className: "ss-w-v8-builder-ln", children: [
17081
- /* @__PURE__ */ jsx138("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderShow }),
17082
- /* @__PURE__ */ jsx138("span", { className: "ss-w-v8-builder-market", children: marketName })
17207
+ ] }) : marketName ? /* @__PURE__ */ jsxs124("div", { className: "ss-w-v8-builder-ln", children: [
17208
+ /* @__PURE__ */ jsx140("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderShow }),
17209
+ /* @__PURE__ */ jsx140("span", { className: "ss-w-v8-builder-market", children: marketName })
17083
17210
  ] }) : null,
17084
- /* @__PURE__ */ jsxs123("div", { className: "ss-w-v8-builder-ln", children: [
17085
- /* @__PURE__ */ jsx138("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderIn }),
17086
- gamesOptions ? /* @__PURE__ */ jsx138("div", { className: "ss-w-v8-slot", "data-mine": mineGames || void 0, children: /* @__PURE__ */ jsx138(
17211
+ /* @__PURE__ */ jsxs124("div", { className: "ss-w-v8-builder-ln", children: [
17212
+ /* @__PURE__ */ jsx140("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderIn }),
17213
+ gamesOptions ? /* @__PURE__ */ jsx140("div", { className: "ss-w-v8-slot", "data-mine": mineGames || void 0, children: /* @__PURE__ */ jsx140(
17087
17214
  "select",
17088
17215
  {
17089
17216
  className: "ss-w-v8-select",
@@ -17093,16 +17220,16 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
17093
17220
  const picked = gamesOptions.find((o) => o.id === e.target.value);
17094
17221
  if (picked && picked.id !== view.gamesId) pickGames(picked);
17095
17222
  },
17096
- children: /* @__PURE__ */ jsx138(GamesOptions, { options: gamesOptions, ui })
17223
+ children: /* @__PURE__ */ jsx140(GamesOptions, { options: gamesOptions, ui })
17097
17224
  }
17098
- ) }) : /* @__PURE__ */ jsx138("button", { type: "button", className: "ss-w-v8-builder-btn", "aria-pressed": view.widen, disabled: view.widen && !canNarrow, onClick: () => {
17225
+ ) }) : /* @__PURE__ */ jsx140("button", { type: "button", className: "ss-w-v8-builder-btn", "aria-pressed": view.widen, disabled: view.widen && !canNarrow, onClick: () => {
17099
17226
  const next = { ...view, widen: canNarrow ? !view.widen : true, matchIds: canNarrow && view.widen && view.matchIds.length === 0 ? preset.matchIds : view.matchIds };
17100
17227
  ask(next);
17101
17228
  }, children: ui.v8UseAllGames })
17102
17229
  ] }),
17103
- /* @__PURE__ */ jsxs123("div", { className: "ss-w-v8-builder-ln", children: [
17104
- /* @__PURE__ */ jsx138("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderAs }),
17105
- /* @__PURE__ */ jsx138("div", { className: "ss-w-v8-builder-btns", role: "group", "aria-label": ui.v8BuilderAs, children: legButtons.map((n) => /* @__PURE__ */ jsx138(
17230
+ /* @__PURE__ */ jsxs124("div", { className: "ss-w-v8-builder-ln", children: [
17231
+ /* @__PURE__ */ jsx140("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderAs }),
17232
+ /* @__PURE__ */ jsx140("div", { className: "ss-w-v8-builder-btns", role: "group", "aria-label": ui.v8BuilderAs, children: legButtons.map((n) => /* @__PURE__ */ jsx140(
17106
17233
  "button",
17107
17234
  {
17108
17235
  type: "button",
@@ -17117,9 +17244,9 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
17117
17244
  n
17118
17245
  )) })
17119
17246
  ] }),
17120
- view.legs > 1 ? /* @__PURE__ */ jsxs123("div", { className: "ss-w-v8-builder-ln ss-w-v8-builder-ln--total", children: [
17121
- /* @__PURE__ */ jsx138("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderTotal }),
17122
- /* @__PURE__ */ jsx138("div", { className: "ss-w-v8-builder-btns", role: "group", "aria-label": ui.v8BuilderTotal, children: totals.map((t) => /* @__PURE__ */ jsx138(
17247
+ view.legs > 1 ? /* @__PURE__ */ jsxs124("div", { className: "ss-w-v8-builder-ln ss-w-v8-builder-ln--total", children: [
17248
+ /* @__PURE__ */ jsx140("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderTotal }),
17249
+ /* @__PURE__ */ jsx140("div", { className: "ss-w-v8-builder-btns", role: "group", "aria-label": ui.v8BuilderTotal, children: totals.map((t) => /* @__PURE__ */ jsx140(
17123
17250
  "button",
17124
17251
  {
17125
17252
  type: "button",
@@ -17133,31 +17260,31 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
17133
17260
  t
17134
17261
  )) })
17135
17262
  ] }) : null,
17136
- ready && singles && widenedNote && !empty2 ? /* @__PURE__ */ jsx138("p", { className: "ss-w-v8-builder-note", "data-kind": "widened", children: ui.v8SinglesWidened(marketName) }) : null,
17137
- ready && !widenedNote && !empty2 && preset.widenedForMarket === true && onOpeningChoice && view.marketKey !== null ? /* @__PURE__ */ jsx138("p", { className: "ss-w-v8-builder-note", children: ui.v8Widened }) : null,
17138
- startedNote ? /* @__PURE__ */ jsx138("p", { className: "ss-w-v8-builder-note", "data-kind": "started", role: "status", children: ui.slipStarted }) : null,
17139
- status2 === "loading" ? /* @__PURE__ */ jsx138("p", { className: "ss-w-v8-builder-note", "data-kind": "loading", children: ui.v8BuilderLoading }) : null,
17140
- status2 === "error" ? /* @__PURE__ */ jsxs123(Fragment43, { children: [
17141
- /* @__PURE__ */ jsx138("p", { className: "ss-w-v8-builder-note", "data-kind": "error", children: ui.v8BuilderError }),
17142
- /* @__PURE__ */ jsx138("button", { type: "button", className: "ss-w-v8-builder-btn", onClick: () => {
17263
+ ready && singles && widenedNote && !empty2 ? /* @__PURE__ */ jsx140("p", { className: "ss-w-v8-builder-note", "data-kind": "widened", children: ui.v8SinglesWidened(marketName) }) : null,
17264
+ ready && !widenedNote && !empty2 && preset.widenedForMarket === true && onOpeningChoice && view.marketKey !== null ? /* @__PURE__ */ jsx140("p", { className: "ss-w-v8-builder-note", children: ui.v8Widened }) : null,
17265
+ startedNote ? /* @__PURE__ */ jsx140("p", { className: "ss-w-v8-builder-note", "data-kind": "started", role: "status", children: ui.slipStarted }) : null,
17266
+ status2 === "loading" ? /* @__PURE__ */ jsx140("p", { className: "ss-w-v8-builder-note", "data-kind": "loading", children: ui.v8BuilderLoading }) : null,
17267
+ status2 === "error" ? /* @__PURE__ */ jsxs124(Fragment43, { children: [
17268
+ /* @__PURE__ */ jsx140("p", { className: "ss-w-v8-builder-note", "data-kind": "error", children: ui.v8BuilderError }),
17269
+ /* @__PURE__ */ jsx140("button", { type: "button", className: "ss-w-v8-builder-btn", onClick: () => {
17143
17270
  setStartedNote(false);
17144
17271
  void request(lastRequest.current);
17145
17272
  }, children: ui.v8BuilderRetry })
17146
17273
  ] }) : null,
17147
- empty2 && singles && (widened || !canWiden) ? /* @__PURE__ */ jsx138("p", { className: "ss-w-v8-builder-note", "data-kind": "no-prices", children: ui.v8NoPrices(marketName) }) : null,
17148
- empty2 && !singles ? /* @__PURE__ */ jsxs123(Fragment43, { children: [
17149
- /* @__PURE__ */ jsx138("p", { className: "ss-w-v8-builder-note", "data-kind": "miss", children: ui.v8Miss }),
17150
- gamesOptions && allGames && !widened ? /* @__PURE__ */ jsx138("button", { type: "button", className: "ss-w-v8-builder-btn", onClick: () => pickGames(allGames), children: ui.v8UseAllGames }) : null
17274
+ empty2 && singles && (widened || !canWiden) ? /* @__PURE__ */ jsx140("p", { className: "ss-w-v8-builder-note", "data-kind": "no-prices", children: ui.v8NoPrices(marketName) }) : null,
17275
+ empty2 && !singles ? /* @__PURE__ */ jsxs124(Fragment43, { children: [
17276
+ /* @__PURE__ */ jsx140("p", { className: "ss-w-v8-builder-note", "data-kind": "miss", children: ui.v8Miss }),
17277
+ gamesOptions && allGames && !widened ? /* @__PURE__ */ jsx140("button", { type: "button", className: "ss-w-v8-builder-btn", onClick: () => pickGames(allGames), children: ui.v8UseAllGames }) : null
17151
17278
  ] }) : null,
17152
- rows && rows.length > 0 ? /* @__PURE__ */ jsxs123(Fragment43, { children: [
17153
- /* @__PURE__ */ jsxs123("div", { className: "ss-w-v8-builder-rows", children: [
17154
- /* @__PURE__ */ jsx138("ol", { className: "ss-w-combo-legs", role: "list", children: rows.map((leg) => /* @__PURE__ */ jsx138(ComboLegRow, { leg, addToSlipEnabled: !!slip.onAddToSlip, ui, slip: rowSlip, hold: !confirmed, closed: !preMatchOpen(leg.kickoffUtc, Date.now()) }, leg.key)) }),
17155
- grid && grid.requestedLegs > 1 ? /* @__PURE__ */ jsx138(AddAllToSlipButton, { legs: rows, slip: rowSlip, ui, labels: { add: ui.v8AddAll, done: ui.allInSlip }, combo, sizeless: true, hold: !confirmed, onStartedGame: () => {
17279
+ rows && rows.length > 0 ? /* @__PURE__ */ jsxs124(Fragment43, { children: [
17280
+ /* @__PURE__ */ jsxs124("div", { className: "ss-w-v8-builder-rows", children: [
17281
+ /* @__PURE__ */ jsx140("ol", { className: "ss-w-combo-legs", role: "list", children: rows.map((leg) => /* @__PURE__ */ jsx140(ComboLegRow, { leg, addToSlipEnabled: !!slip.onAddToSlip, ui, slip: rowSlip, hold: !confirmed, closed: !preMatchOpen(leg.kickoffUtc, Date.now()) }, leg.key)) }),
17282
+ grid && grid.requestedLegs > 1 ? /* @__PURE__ */ jsx140(AddAllToSlipButton, { legs: rows, slip: rowSlip, ui, labels: { add: ui.v8AddAll, done: ui.allInSlip }, combo, sizeless: true, hold: !confirmed, onStartedGame: () => {
17156
17283
  setStartedNote(true);
17157
17284
  void request(lastRequest.current);
17158
17285
  } }) : null
17159
17286
  ] }),
17160
- quotedAt ? /* @__PURE__ */ jsx138("p", { className: "ss-w-v8-builder-note", "data-testid": "v8-asof", children: ui.v8PricesAsOf(fmtHhMm(quotedAt, ui.locale, clockOf(ui), ui.timeZone)) }) : null
17287
+ quotedAt ? /* @__PURE__ */ jsx140("p", { className: "ss-w-v8-builder-note", "data-testid": "v8-asof", children: ui.v8PricesAsOf(fmtHhMm(quotedAt, ui.locale, clockOf(ui), ui.timeZone)) }) : null
17161
17288
  ] }) : null
17162
17289
  ] }) : null });
17163
17290
  }
@@ -17165,25 +17292,25 @@ function GamesOptions({ options, ui }) {
17165
17292
  const top = options.filter((o) => o.group !== "league" && o.group !== "game");
17166
17293
  const leagues = options.filter((o) => o.group === "league");
17167
17294
  const games = options.filter((o) => o.group === "game");
17168
- return /* @__PURE__ */ jsxs123(Fragment43, { children: [
17169
- top.map((o) => /* @__PURE__ */ jsx138("option", { value: o.id, children: o.label }, o.id)),
17170
- leagues.length > 0 ? /* @__PURE__ */ jsx138("optgroup", { label: ui.v8LeaguesGroup, children: leagues.map((o) => /* @__PURE__ */ jsx138("option", { value: o.id, children: o.label }, o.id)) }) : null,
17171
- games.length > 0 ? /* @__PURE__ */ jsx138("optgroup", { label: ui.v8GamesGroup, children: games.map((o) => {
17295
+ return /* @__PURE__ */ jsxs124(Fragment43, { children: [
17296
+ top.map((o) => /* @__PURE__ */ jsx140("option", { value: o.id, children: o.label }, o.id)),
17297
+ leagues.length > 0 ? /* @__PURE__ */ jsx140("optgroup", { label: ui.v8LeaguesGroup, children: leagues.map((o) => /* @__PURE__ */ jsx140("option", { value: o.id, children: o.label }, o.id)) }) : null,
17298
+ games.length > 0 ? /* @__PURE__ */ jsx140("optgroup", { label: ui.v8GamesGroup, children: games.map((o) => {
17172
17299
  const at2 = kickoffText(ui, o.startsAtUtc);
17173
- return /* @__PURE__ */ jsx138("option", { value: o.id, children: at2 ? `${o.label} \xB7 ${at2}` : o.label }, o.id);
17300
+ return /* @__PURE__ */ jsx140("option", { value: o.id, children: at2 ? `${o.label} \xB7 ${at2}` : o.label }, o.id);
17174
17301
  }) }) : null
17175
17302
  ] });
17176
17303
  }
17177
17304
 
17178
17305
  // src/components/BuilderPanel.tsx
17179
- import { jsx as jsx139, jsxs as jsxs124 } from "react/jsx-runtime";
17306
+ import { jsx as jsx141, jsxs as jsxs125 } from "react/jsx-runtime";
17180
17307
  function BuilderPanel({ options, sport, onSportChange, ui, slip, onCoolOff }) {
17181
17308
  const ctx = usePersonalGreeting();
17182
17309
  const scope = useSportScope();
17183
17310
  const active = options.find((o) => o.sport === sport) ?? options[0];
17184
17311
  if (!active) return null;
17185
- return /* @__PURE__ */ jsxs124("div", { className: "ss-w-mon-list ss-w-builder-tab", children: [
17186
- options.length > 1 ? /* @__PURE__ */ jsx139("div", { className: "ss-w-dash-sports", role: "group", "aria-label": ui.sportGroupLabel, children: options.map((o) => /* @__PURE__ */ jsx139(
17312
+ return /* @__PURE__ */ jsxs125("div", { className: "ss-w-mon-list ss-w-builder-tab", children: [
17313
+ options.length > 1 ? /* @__PURE__ */ jsx141("div", { className: "ss-w-dash-sports", role: "group", "aria-label": ui.sportGroupLabel, children: options.map((o) => /* @__PURE__ */ jsx141(
17187
17314
  "button",
17188
17315
  {
17189
17316
  type: "button",
@@ -17194,7 +17321,7 @@ function BuilderPanel({ options, sport, onSportChange, ui, slip, onCoolOff }) {
17194
17321
  },
17195
17322
  o.sport
17196
17323
  )) }) : null,
17197
- /* @__PURE__ */ jsx139("div", { className: "ss-w-v8", children: /* @__PURE__ */ jsx139(
17324
+ /* @__PURE__ */ jsx141("div", { className: "ss-w-v8", children: /* @__PURE__ */ jsx141(
17198
17325
  SentenceBuilder,
17199
17326
  {
17200
17327
  preset: active.preset,
@@ -17213,7 +17340,7 @@ function BuilderPanel({ options, sport, onSportChange, ui, slip, onCoolOff }) {
17213
17340
  }
17214
17341
 
17215
17342
  // src/components/Fixtures.tsx
17216
- import { jsx as jsx140, jsxs as jsxs125 } from "react/jsx-runtime";
17343
+ import { jsx as jsx142, jsxs as jsxs126 } from "react/jsx-runtime";
17217
17344
  function groupByRound(fixtures) {
17218
17345
  const groups = [];
17219
17346
  for (const fx of fixtures) {
@@ -17225,31 +17352,31 @@ function groupByRound(fixtures) {
17225
17352
  }
17226
17353
  function Fixtures({ fixtures, loading, ui }) {
17227
17354
  if (fixtures.length === 0) {
17228
- if (loading) return /* @__PURE__ */ jsx140("div", { className: "ss-w-mon-list" });
17229
- return /* @__PURE__ */ jsx140("div", { className: "ss-w-mon-empty", children: ui.clubFixturesEmpty });
17355
+ if (loading) return /* @__PURE__ */ jsx142("div", { className: "ss-w-mon-list" });
17356
+ return /* @__PURE__ */ jsx142("div", { className: "ss-w-mon-empty", children: ui.clubFixturesEmpty });
17230
17357
  }
17231
- return /* @__PURE__ */ jsx140("div", { className: "ss-w-mon-list", children: groupByRound(fixtures).map((group, gi) => /* @__PURE__ */ jsxs125("div", { children: [
17232
- group.round && /* @__PURE__ */ jsx140("div", { className: "ss-w-club-eyebrow", children: group.round }),
17358
+ return /* @__PURE__ */ jsx142("div", { className: "ss-w-mon-list", children: groupByRound(fixtures).map((group, gi) => /* @__PURE__ */ jsxs126("div", { children: [
17359
+ group.round && /* @__PURE__ */ jsx142("div", { className: "ss-w-club-eyebrow", children: group.round }),
17233
17360
  group.items.map((fx) => {
17234
17361
  const played = fx.homeScore !== null && fx.awayScore !== null;
17235
17362
  const kickoff = fx.matchDateTime ? ui.bettingKickoff(fx.matchDateTime) : null;
17236
- return /* @__PURE__ */ jsxs125("div", { className: "ss-w-mon", children: [
17237
- /* @__PURE__ */ jsxs125("div", { className: "ss-w-mon-top", children: [
17238
- fx.competitionName && /* @__PURE__ */ jsx140("span", { className: "ss-w-mon-comp", children: fx.competitionName }),
17239
- !played && kickoff && /* @__PURE__ */ jsxs125("span", { className: "ss-w-mon-pill", children: [
17363
+ return /* @__PURE__ */ jsxs126("div", { className: "ss-w-mon", children: [
17364
+ /* @__PURE__ */ jsxs126("div", { className: "ss-w-mon-top", children: [
17365
+ fx.competitionName && /* @__PURE__ */ jsx142("span", { className: "ss-w-mon-comp", children: fx.competitionName }),
17366
+ !played && kickoff && /* @__PURE__ */ jsxs126("span", { className: "ss-w-mon-pill", children: [
17240
17367
  kickoff.dayLabel,
17241
17368
  " \xB7 ",
17242
17369
  kickoff.time
17243
17370
  ] })
17244
17371
  ] }),
17245
- /* @__PURE__ */ jsxs125("div", { className: "ss-w-mon-main", children: [
17246
- /* @__PURE__ */ jsx140("span", { className: "ss-w-mon-side", children: /* @__PURE__ */ jsx140("span", { className: "ss-w-mon-name", children: fx.homeTeamName }) }),
17247
- played ? /* @__PURE__ */ jsxs125("span", { className: "ss-w-mon-score", children: [
17372
+ /* @__PURE__ */ jsxs126("div", { className: "ss-w-mon-main", children: [
17373
+ /* @__PURE__ */ jsx142("span", { className: "ss-w-mon-side", children: /* @__PURE__ */ jsx142("span", { className: "ss-w-mon-name", children: fx.homeTeamName }) }),
17374
+ played ? /* @__PURE__ */ jsxs126("span", { className: "ss-w-mon-score", children: [
17248
17375
  fx.homeScore,
17249
- /* @__PURE__ */ jsx140("i", { children: "-" }),
17376
+ /* @__PURE__ */ jsx142("i", { children: "-" }),
17250
17377
  fx.awayScore
17251
- ] }) : /* @__PURE__ */ jsx140("span", { className: "ss-w-mon-vs", children: ui.venue.home }),
17252
- /* @__PURE__ */ jsx140("span", { className: "ss-w-mon-side ss-w-mon-side--away", children: /* @__PURE__ */ jsx140("span", { className: "ss-w-mon-name", children: fx.awayTeamName }) })
17378
+ ] }) : /* @__PURE__ */ jsx142("span", { className: "ss-w-mon-vs", children: ui.venue.home }),
17379
+ /* @__PURE__ */ jsx142("span", { className: "ss-w-mon-side ss-w-mon-side--away", children: /* @__PURE__ */ jsx142("span", { className: "ss-w-mon-name", children: fx.awayTeamName }) })
17253
17380
  ] })
17254
17381
  ] }, fx.id);
17255
17382
  })
@@ -17257,7 +17384,7 @@ function Fixtures({ fixtures, loading, ui }) {
17257
17384
  }
17258
17385
 
17259
17386
  // src/components/Standings.tsx
17260
- import { jsx as jsx141, jsxs as jsxs126 } from "react/jsx-runtime";
17387
+ import { jsx as jsx143, jsxs as jsxs127 } from "react/jsx-runtime";
17261
17388
  function groupByTable(rows) {
17262
17389
  const groups = [];
17263
17390
  for (const row of rows) {
@@ -17268,30 +17395,30 @@ function groupByTable(rows) {
17268
17395
  return groups;
17269
17396
  }
17270
17397
  function Standings({ standings, loading, ui }) {
17271
- if (standings === null && loading) return /* @__PURE__ */ jsx141("div", { className: "ss-w-mon-list" });
17272
- if (standings === null || standings.length === 0) return /* @__PURE__ */ jsx141("div", { className: "ss-w-mon-empty", children: ui.clubStandingsEmpty });
17273
- return /* @__PURE__ */ jsx141("div", { className: "ss-w-mon-list", children: groupByTable(standings).map((group, gi) => /* @__PURE__ */ jsxs126("div", { className: "ss-w-table-wrap", children: [
17274
- group.table && /* @__PURE__ */ jsx141("div", { className: "ss-w-club-eyebrow", children: group.table }),
17275
- /* @__PURE__ */ jsxs126("table", { className: "ss-w-md-table", children: [
17276
- /* @__PURE__ */ jsx141("thead", { children: /* @__PURE__ */ jsxs126("tr", { children: [
17277
- /* @__PURE__ */ jsx141("th", { children: "#" }),
17278
- /* @__PURE__ */ jsx141("th", { children: ui.standingsColClub }),
17279
- /* @__PURE__ */ jsx141("th", { children: ui.standingsColPlayed }),
17280
- /* @__PURE__ */ jsx141("th", { children: ui.standingsColWon }),
17281
- /* @__PURE__ */ jsx141("th", { children: ui.standingsColDrawn }),
17282
- /* @__PURE__ */ jsx141("th", { children: ui.standingsColLost }),
17283
- /* @__PURE__ */ jsx141("th", { children: ui.standingsColGoalDiff }),
17284
- /* @__PURE__ */ jsx141("th", { children: ui.standingsColPoints })
17398
+ if (standings === null && loading) return /* @__PURE__ */ jsx143("div", { className: "ss-w-mon-list" });
17399
+ if (standings === null || standings.length === 0) return /* @__PURE__ */ jsx143("div", { className: "ss-w-mon-empty", children: ui.clubStandingsEmpty });
17400
+ return /* @__PURE__ */ jsx143("div", { className: "ss-w-mon-list", children: groupByTable(standings).map((group, gi) => /* @__PURE__ */ jsxs127("div", { className: "ss-w-table-wrap", children: [
17401
+ group.table && /* @__PURE__ */ jsx143("div", { className: "ss-w-club-eyebrow", children: group.table }),
17402
+ /* @__PURE__ */ jsxs127("table", { className: "ss-w-md-table", children: [
17403
+ /* @__PURE__ */ jsx143("thead", { children: /* @__PURE__ */ jsxs127("tr", { children: [
17404
+ /* @__PURE__ */ jsx143("th", { children: "#" }),
17405
+ /* @__PURE__ */ jsx143("th", { children: ui.standingsColClub }),
17406
+ /* @__PURE__ */ jsx143("th", { children: ui.standingsColPlayed }),
17407
+ /* @__PURE__ */ jsx143("th", { children: ui.standingsColWon }),
17408
+ /* @__PURE__ */ jsx143("th", { children: ui.standingsColDrawn }),
17409
+ /* @__PURE__ */ jsx143("th", { children: ui.standingsColLost }),
17410
+ /* @__PURE__ */ jsx143("th", { children: ui.standingsColGoalDiff }),
17411
+ /* @__PURE__ */ jsx143("th", { children: ui.standingsColPoints })
17285
17412
  ] }) }),
17286
- /* @__PURE__ */ jsx141("tbody", { children: group.items.map((row) => /* @__PURE__ */ jsxs126("tr", { children: [
17287
- /* @__PURE__ */ jsx141("td", { children: row.position }),
17288
- /* @__PURE__ */ jsx141("td", { children: row.teamName }),
17289
- /* @__PURE__ */ jsx141("td", { children: row.playedGames }),
17290
- /* @__PURE__ */ jsx141("td", { children: row.wins }),
17291
- /* @__PURE__ */ jsx141("td", { children: row.draws }),
17292
- /* @__PURE__ */ jsx141("td", { children: row.losses }),
17293
- /* @__PURE__ */ jsx141("td", { children: row.goalDifference }),
17294
- /* @__PURE__ */ jsx141("td", { children: row.points })
17413
+ /* @__PURE__ */ jsx143("tbody", { children: group.items.map((row) => /* @__PURE__ */ jsxs127("tr", { children: [
17414
+ /* @__PURE__ */ jsx143("td", { children: row.position }),
17415
+ /* @__PURE__ */ jsx143("td", { children: row.teamName }),
17416
+ /* @__PURE__ */ jsx143("td", { children: row.playedGames }),
17417
+ /* @__PURE__ */ jsx143("td", { children: row.wins }),
17418
+ /* @__PURE__ */ jsx143("td", { children: row.draws }),
17419
+ /* @__PURE__ */ jsx143("td", { children: row.losses }),
17420
+ /* @__PURE__ */ jsx143("td", { children: row.goalDifference }),
17421
+ /* @__PURE__ */ jsx143("td", { children: row.points })
17295
17422
  ] }, row.teamId)) })
17296
17423
  ] })
17297
17424
  ] }, `${gi}-${group.table ?? "none"}`)) });
@@ -17348,7 +17475,7 @@ function statsEyebrow(ui, season, competition, matches) {
17348
17475
  }
17349
17476
 
17350
17477
  // src/components/SquadStats.tsx
17351
- import { jsx as jsx142, jsxs as jsxs127 } from "react/jsx-runtime";
17478
+ import { jsx as jsx144, jsxs as jsxs128 } from "react/jsx-runtime";
17352
17479
  function leader(stats, pick) {
17353
17480
  let best = null;
17354
17481
  for (const p of stats) {
@@ -17362,53 +17489,53 @@ function ratingClass(rating) {
17362
17489
  return Number(rating.toFixed(1)) >= 7 ? "ss-w-sq-c36 ss-w-sq-rtg ss-w-pos-ink" : "ss-w-sq-c36 ss-w-sq-rtg";
17363
17490
  }
17364
17491
  function SquadStats({ stats, loading, ui, onSelectPlayer }) {
17365
- if (stats === null && loading) return /* @__PURE__ */ jsx142("div", { className: "ss-w-mon-list" });
17366
- if (stats === null || stats.length === 0) return /* @__PURE__ */ jsx142("div", { className: "ss-w-mon-empty", children: ui.clubSquadStatsEmpty });
17492
+ if (stats === null && loading) return /* @__PURE__ */ jsx144("div", { className: "ss-w-mon-list" });
17493
+ if (stats === null || stats.length === 0) return /* @__PURE__ */ jsx144("div", { className: "ss-w-mon-empty", children: ui.clubSquadStatsEmpty });
17367
17494
  const scorer = leader(stats, (p) => p.goals);
17368
17495
  const assister = leader(stats, (p) => p.assists);
17369
17496
  const footer = [
17370
17497
  scorer && ui.squadTopScorer(scorer.playerName, scorer.goals),
17371
17498
  assister && ui.squadTopAssists(assister.playerName, assister.assists)
17372
17499
  ].filter((part) => !!part).join(" \xB7 ");
17373
- return /* @__PURE__ */ jsxs127("div", { className: "ss-w-mon-list ss-w-sq-stats", children: [
17374
- /* @__PURE__ */ jsxs127("div", { className: "ss-w-sq-card", children: [
17375
- /* @__PURE__ */ jsxs127("div", { className: "ss-w-sq-row ss-w-sq-head", "aria-hidden": "true", children: [
17376
- /* @__PURE__ */ jsx142("span", { className: "ss-w-sq-name" }),
17377
- /* @__PURE__ */ jsx142("span", { className: "ss-w-sq-pos", children: ui.statHeadPos }),
17378
- /* @__PURE__ */ jsx142("span", { className: "ss-w-sq-c30", children: ui.statColApps }),
17379
- /* @__PURE__ */ jsx142("span", { className: "ss-w-sq-c36", children: ui.statHeadMins }),
17380
- /* @__PURE__ */ jsx142("span", { className: "ss-w-sq-c20", children: ui.statHeadGoals }),
17381
- /* @__PURE__ */ jsx142("span", { className: "ss-w-sq-c20", children: ui.statHeadAssists }),
17382
- /* @__PURE__ */ jsx142("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: ui.statHeadYellow }),
17383
- /* @__PURE__ */ jsx142("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: ui.statHeadRed }),
17384
- /* @__PURE__ */ jsx142("span", { className: "ss-w-sq-c36", children: ui.statHeadRating })
17500
+ return /* @__PURE__ */ jsxs128("div", { className: "ss-w-mon-list ss-w-sq-stats", children: [
17501
+ /* @__PURE__ */ jsxs128("div", { className: "ss-w-sq-card", children: [
17502
+ /* @__PURE__ */ jsxs128("div", { className: "ss-w-sq-row ss-w-sq-head", "aria-hidden": "true", children: [
17503
+ /* @__PURE__ */ jsx144("span", { className: "ss-w-sq-name" }),
17504
+ /* @__PURE__ */ jsx144("span", { className: "ss-w-sq-pos", children: ui.statHeadPos }),
17505
+ /* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c30", children: ui.statColApps }),
17506
+ /* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c36", children: ui.statHeadMins }),
17507
+ /* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c20", children: ui.statHeadGoals }),
17508
+ /* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c20", children: ui.statHeadAssists }),
17509
+ /* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: ui.statHeadYellow }),
17510
+ /* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: ui.statHeadRed }),
17511
+ /* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c36", children: ui.statHeadRating })
17385
17512
  ] }),
17386
- stats.map((p) => /* @__PURE__ */ jsxs127("button", { type: "button", className: "ss-w-sq-row ss-w-sq-tap", onClick: () => onSelectPlayer(p.playerId), children: [
17387
- /* @__PURE__ */ jsxs127("span", { className: "ss-w-sq-player", children: [
17388
- p.jerseyNumber !== null && /* @__PURE__ */ jsx142("span", { className: "ss-w-sq-badge", children: p.jerseyNumber }),
17389
- /* @__PURE__ */ jsx142("span", { className: "ss-w-sq-name ss-w-sq-name-1", children: p.playerName })
17513
+ stats.map((p) => /* @__PURE__ */ jsxs128("button", { type: "button", className: "ss-w-sq-row ss-w-sq-tap", onClick: () => onSelectPlayer(p.playerId), children: [
17514
+ /* @__PURE__ */ jsxs128("span", { className: "ss-w-sq-player", children: [
17515
+ p.jerseyNumber !== null && /* @__PURE__ */ jsx144("span", { className: "ss-w-sq-badge", children: p.jerseyNumber }),
17516
+ /* @__PURE__ */ jsx144("span", { className: "ss-w-sq-name ss-w-sq-name-1", children: p.playerName })
17390
17517
  ] }),
17391
- /* @__PURE__ */ jsx142("span", { className: "ss-w-sq-pos", children: positionShort(ui, p.positionCode, p.positionName) }),
17392
- /* @__PURE__ */ jsx142("span", { className: "ss-w-sq-c30", children: p.appearances }),
17393
- /* @__PURE__ */ jsx142("span", { className: "ss-w-sq-c36", children: p.minutesPlayed }),
17394
- /* @__PURE__ */ jsx142("span", { className: "ss-w-sq-c20", children: p.goals }),
17395
- /* @__PURE__ */ jsx142("span", { className: "ss-w-sq-c20", children: p.assists }),
17396
- /* @__PURE__ */ jsx142("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: p.yellowCards }),
17397
- /* @__PURE__ */ jsx142("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: p.redCards }),
17398
- /* @__PURE__ */ jsx142("span", { className: ratingClass(p.averageRating), children: p.averageRating === null ? "\u2013" : formatFixed(p.averageRating, ui.locale, 1) })
17518
+ /* @__PURE__ */ jsx144("span", { className: "ss-w-sq-pos", children: positionShort(ui, p.positionCode, p.positionName) }),
17519
+ /* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c30", children: p.appearances }),
17520
+ /* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c36", children: p.minutesPlayed }),
17521
+ /* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c20", children: p.goals }),
17522
+ /* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c20", children: p.assists }),
17523
+ /* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: p.yellowCards }),
17524
+ /* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: p.redCards }),
17525
+ /* @__PURE__ */ jsx144("span", { className: ratingClass(p.averageRating), children: p.averageRating === null ? "\u2013" : formatFixed(p.averageRating, ui.locale, 1) })
17399
17526
  ] }, p.playerId))
17400
17527
  ] }),
17401
- footer !== "" && /* @__PURE__ */ jsx142("div", { className: "ss-w-sq-foot", children: footer })
17528
+ footer !== "" && /* @__PURE__ */ jsx144("div", { className: "ss-w-sq-foot", children: footer })
17402
17529
  ] });
17403
17530
  }
17404
17531
 
17405
17532
  // src/components/Squad.tsx
17406
- import { Fragment as Fragment44, jsx as jsx143, jsxs as jsxs128 } from "react/jsx-runtime";
17533
+ import { Fragment as Fragment44, jsx as jsx145, jsxs as jsxs129 } from "react/jsx-runtime";
17407
17534
  function Squad({ squad, loading, ui, view, onToggleView, stats, statsLoading, seasonName = null, competitionName = null, matchesPlayed = null, onSelectPlayer }) {
17408
17535
  const eyebrow = view === "stats" ? statsEyebrow(ui, seasonName, competitionName, matchesPlayed) : null;
17409
- const toggle = /* @__PURE__ */ jsxs128("div", { className: "ss-w-sq-bar", children: [
17410
- eyebrow !== null && /* @__PURE__ */ jsx143("div", { className: "ss-w-sq-eyebrow", children: eyebrow }),
17411
- /* @__PURE__ */ jsx143("div", { className: "ss-w-sq-seg", role: "group", children: ["roster", "stats"].map((v) => /* @__PURE__ */ jsx143(
17536
+ const toggle = /* @__PURE__ */ jsxs129("div", { className: "ss-w-sq-bar", children: [
17537
+ eyebrow !== null && /* @__PURE__ */ jsx145("div", { className: "ss-w-sq-eyebrow", children: eyebrow }),
17538
+ /* @__PURE__ */ jsx145("div", { className: "ss-w-sq-seg", role: "group", children: ["roster", "stats"].map((v) => /* @__PURE__ */ jsx145(
17412
17539
  "button",
17413
17540
  {
17414
17541
  type: "button",
@@ -17423,45 +17550,45 @@ function Squad({ squad, loading, ui, view, onToggleView, stats, statsLoading, se
17423
17550
  )) })
17424
17551
  ] });
17425
17552
  if (view === "stats") {
17426
- return /* @__PURE__ */ jsxs128(Fragment44, { children: [
17553
+ return /* @__PURE__ */ jsxs129(Fragment44, { children: [
17427
17554
  toggle,
17428
- /* @__PURE__ */ jsx143(SquadStats, { stats, loading: statsLoading, ui, onSelectPlayer })
17555
+ /* @__PURE__ */ jsx145(SquadStats, { stats, loading: statsLoading, ui, onSelectPlayer })
17429
17556
  ] });
17430
17557
  }
17431
- if (squad === null && loading) return /* @__PURE__ */ jsxs128(Fragment44, { children: [
17558
+ if (squad === null && loading) return /* @__PURE__ */ jsxs129(Fragment44, { children: [
17432
17559
  toggle,
17433
- /* @__PURE__ */ jsx143("div", { className: "ss-w-mon-list" })
17560
+ /* @__PURE__ */ jsx145("div", { className: "ss-w-mon-list" })
17434
17561
  ] });
17435
- if (squad === null || squad.length === 0) return /* @__PURE__ */ jsxs128(Fragment44, { children: [
17562
+ if (squad === null || squad.length === 0) return /* @__PURE__ */ jsxs129(Fragment44, { children: [
17436
17563
  toggle,
17437
- /* @__PURE__ */ jsx143("div", { className: "ss-w-mon-empty", children: ui.clubSquadEmpty })
17564
+ /* @__PURE__ */ jsx145("div", { className: "ss-w-mon-empty", children: ui.clubSquadEmpty })
17438
17565
  ] });
17439
- return /* @__PURE__ */ jsxs128(Fragment44, { children: [
17566
+ return /* @__PURE__ */ jsxs129(Fragment44, { children: [
17440
17567
  toggle,
17441
- /* @__PURE__ */ jsx143("div", { className: "ss-w-mon-list", children: groupByPosition(squad).map((group, gi) => /* @__PURE__ */ jsxs128("div", { children: [
17442
- group.positionName && /* @__PURE__ */ jsx143("div", { className: "ss-w-club-eyebrow", children: positionLabel(ui, group.positionName) }),
17443
- group.items.map((p) => /* @__PURE__ */ jsxs128("button", { type: "button", className: "ss-w-sq-row ss-w-sq-tap", onClick: () => onSelectPlayer(p.playerId), children: [
17444
- /* @__PURE__ */ jsx143("span", { className: "ss-w-sq-num", children: p.jerseyNumber ?? "" }),
17445
- /* @__PURE__ */ jsx143("span", { className: "ss-w-sq-name", children: p.playerName })
17568
+ /* @__PURE__ */ jsx145("div", { className: "ss-w-mon-list", children: groupByPosition(squad).map((group, gi) => /* @__PURE__ */ jsxs129("div", { children: [
17569
+ group.positionName && /* @__PURE__ */ jsx145("div", { className: "ss-w-club-eyebrow", children: positionLabel(ui, group.positionName) }),
17570
+ group.items.map((p) => /* @__PURE__ */ jsxs129("button", { type: "button", className: "ss-w-sq-row ss-w-sq-tap", onClick: () => onSelectPlayer(p.playerId), children: [
17571
+ /* @__PURE__ */ jsx145("span", { className: "ss-w-sq-num", children: p.jerseyNumber ?? "" }),
17572
+ /* @__PURE__ */ jsx145("span", { className: "ss-w-sq-name", children: p.playerName })
17446
17573
  ] }, p.playerId))
17447
17574
  ] }, `${gi}-${group.positionName ?? "none"}`)) })
17448
17575
  ] });
17449
17576
  }
17450
17577
 
17451
17578
  // src/components/PlayerPhoto.tsx
17452
- import { useState as useState77 } from "react";
17453
- import { jsx as jsx144 } from "react/jsx-runtime";
17579
+ import { useState as useState78 } from "react";
17580
+ import { jsx as jsx146 } from "react/jsx-runtime";
17454
17581
  function PlayerPhoto({ photoUrl, jerseyNumber, size }) {
17455
- const [failed, setFailed] = useState77(false);
17582
+ const [failed, setFailed] = useState78(false);
17456
17583
  const box = { width: size, height: size };
17457
17584
  if (photoUrl && !failed) {
17458
- return /* @__PURE__ */ jsx144("img", { className: "ss-w-pd-photo", style: box, src: photoUrl, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
17585
+ return /* @__PURE__ */ jsx146("img", { className: "ss-w-pd-photo", style: box, src: photoUrl, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
17459
17586
  }
17460
- return /* @__PURE__ */ jsx144("span", { className: "ss-w-pd-photo ss-w-pd-avatar", style: { ...box, fontSize: Math.round(size * 0.35) }, "aria-hidden": "true", children: jerseyNumber ?? "" });
17587
+ return /* @__PURE__ */ jsx146("span", { className: "ss-w-pd-photo ss-w-pd-avatar", style: { ...box, fontSize: Math.round(size * 0.35) }, "aria-hidden": "true", children: jerseyNumber ?? "" });
17461
17588
  }
17462
17589
 
17463
17590
  // src/components/MiniPitch.tsx
17464
- import { jsx as jsx145 } from "react/jsx-runtime";
17591
+ import { jsx as jsx147 } from "react/jsx-runtime";
17465
17592
  var SPOT = {
17466
17593
  GK: [50, 90],
17467
17594
  CB: [50, 75],
@@ -17483,12 +17610,12 @@ var SPOT = {
17483
17610
  function MiniPitch({ positionCode }) {
17484
17611
  const spot = SPOT[positionCode?.trim().toUpperCase() ?? ""];
17485
17612
  if (spot === void 0) return null;
17486
- return /* @__PURE__ */ jsx145("div", { className: "ss-w-pd-pitch", "aria-hidden": "true", children: /* @__PURE__ */ jsx145("div", { className: "ss-w-pd-pitch-dot", style: { left: `${spot[0]}%`, top: `${spot[1]}%` } }) });
17613
+ return /* @__PURE__ */ jsx147("div", { className: "ss-w-pd-pitch", "aria-hidden": "true", children: /* @__PURE__ */ jsx147("div", { className: "ss-w-pd-pitch-dot", style: { left: `${spot[0]}%`, top: `${spot[1]}%` } }) });
17487
17614
  }
17488
17615
 
17489
17616
  // src/components/PerformanceBars.tsx
17490
- import { useState as useState78 } from "react";
17491
- import { jsx as jsx146, jsxs as jsxs129 } from "react/jsx-runtime";
17617
+ import { useState as useState79 } from "react";
17618
+ import { jsx as jsx148, jsxs as jsxs130 } from "react/jsx-runtime";
17492
17619
  var GROUPS = ["shooting", "passing", "possession", "defending"];
17493
17620
  function finite4(v) {
17494
17621
  return typeof v === "number" && Number.isFinite(v) ? v : null;
@@ -17533,40 +17660,40 @@ function unrankedLine(ui, reason) {
17533
17660
  }
17534
17661
  }
17535
17662
  function PerformanceBars({ performance, competitionName, strings }) {
17536
- const [mode, setMode] = useState78("total");
17663
+ const [mode, setMode] = useState79("total");
17537
17664
  const labelled = performance.metrics.filter((m) => Object.prototype.hasOwnProperty.call(strings.perfMetric, m.key));
17538
17665
  if (!labelled.some((m) => valueOf(m, "total") !== null || valueOf(m, "per90") !== null)) return null;
17539
17666
  const subtitle = !performance.ranked ? unrankedLine(strings, performance.unrankedReason) : competitionName ? strings.perfRankedAgainst(competitionName, performance.positionGroup) : null;
17540
17667
  const cards = GROUPS.map((g) => {
17541
17668
  const rows = labelled.filter((m) => m.group === g && valueOf(m, mode) !== null);
17542
17669
  if (rows.length === 0) return null;
17543
- return /* @__PURE__ */ jsxs129("div", { className: "ss-w-pd-card ss-w-pd-perf-card", children: [
17544
- /* @__PURE__ */ jsx146("div", { className: "ss-w-pd-perf-group", children: groupTitle(strings, g) }),
17670
+ return /* @__PURE__ */ jsxs130("div", { className: "ss-w-pd-card ss-w-pd-perf-card", children: [
17671
+ /* @__PURE__ */ jsx148("div", { className: "ss-w-pd-perf-group", children: groupTitle(strings, g) }),
17545
17672
  rows.map((m) => {
17546
17673
  const v = valueOf(m, mode);
17547
17674
  const rank2 = performance.ranked ? rankOf(m, mode) : null;
17548
- return /* @__PURE__ */ jsxs129("div", { className: "ss-w-pd-bar-row", children: [
17549
- /* @__PURE__ */ jsxs129("div", { className: "ss-w-pd-bar-top", children: [
17550
- /* @__PURE__ */ jsx146("span", { className: "ss-w-pd-bar-label", children: strings.perfMetric[m.key] }),
17551
- /* @__PURE__ */ jsx146("span", { className: "ss-w-pd-bar-value", children: format(m, v, mode, strings.locale) })
17675
+ return /* @__PURE__ */ jsxs130("div", { className: "ss-w-pd-bar-row", children: [
17676
+ /* @__PURE__ */ jsxs130("div", { className: "ss-w-pd-bar-top", children: [
17677
+ /* @__PURE__ */ jsx148("span", { className: "ss-w-pd-bar-label", children: strings.perfMetric[m.key] }),
17678
+ /* @__PURE__ */ jsx148("span", { className: "ss-w-pd-bar-value", children: format(m, v, mode, strings.locale) })
17552
17679
  ] }),
17553
- rank2 !== null && /* @__PURE__ */ jsx146("div", { className: "ss-w-pd-track", children: /* @__PURE__ */ jsx146("div", { className: `ss-w-pd-fill ss-w-pd-fill--${band(rank2)}`, style: { width: `${rank2}%` } }) })
17680
+ rank2 !== null && /* @__PURE__ */ jsx148("div", { className: "ss-w-pd-track", children: /* @__PURE__ */ jsx148("div", { className: `ss-w-pd-fill ss-w-pd-fill--${band(rank2)}`, style: { width: `${rank2}%` } }) })
17554
17681
  ] }, m.key);
17555
17682
  })
17556
17683
  ] }, g);
17557
17684
  });
17558
- return /* @__PURE__ */ jsxs129("div", { children: [
17559
- /* @__PURE__ */ jsxs129("div", { className: "ss-w-pd-perf-head", children: [
17560
- /* @__PURE__ */ jsx146("div", { className: "ss-w-pd-eyebrow", children: strings.perfTitle }),
17561
- /* @__PURE__ */ jsx146("div", { className: "ss-w-pd-seg", role: "group", children: ["total", "per90"].map((m) => /* @__PURE__ */ jsx146("button", { type: "button", className: "ss-w-pd-seg-btn", "aria-pressed": mode === m, onClick: () => setMode(m), children: m === "total" ? strings.perfTotal : strings.perfPer90 }, m)) })
17685
+ return /* @__PURE__ */ jsxs130("div", { children: [
17686
+ /* @__PURE__ */ jsxs130("div", { className: "ss-w-pd-perf-head", children: [
17687
+ /* @__PURE__ */ jsx148("div", { className: "ss-w-pd-eyebrow", children: strings.perfTitle }),
17688
+ /* @__PURE__ */ jsx148("div", { className: "ss-w-pd-seg", role: "group", children: ["total", "per90"].map((m) => /* @__PURE__ */ jsx148("button", { type: "button", className: "ss-w-pd-seg-btn", "aria-pressed": mode === m, onClick: () => setMode(m), children: m === "total" ? strings.perfTotal : strings.perfPer90 }, m)) })
17562
17689
  ] }),
17563
- subtitle !== null && /* @__PURE__ */ jsx146("div", { className: "ss-w-pd-perf-sub", children: subtitle }),
17564
- /* @__PURE__ */ jsx146("div", { className: "ss-w-pd-perf-cards", children: cards })
17690
+ subtitle !== null && /* @__PURE__ */ jsx148("div", { className: "ss-w-pd-perf-sub", children: subtitle }),
17691
+ /* @__PURE__ */ jsx148("div", { className: "ss-w-pd-perf-cards", children: cards })
17565
17692
  ] });
17566
17693
  }
17567
17694
 
17568
17695
  // src/components/PlayerDetail.tsx
17569
- import { Fragment as Fragment45, jsx as jsx147, jsxs as jsxs130 } from "react/jsx-runtime";
17696
+ import { Fragment as Fragment45, jsx as jsx149, jsxs as jsxs131 } from "react/jsx-runtime";
17570
17697
  var DASH = "\u2014";
17571
17698
  function ageFrom(dobMs) {
17572
17699
  if (dobMs === null) return DASH;
@@ -17586,16 +17713,16 @@ function ratingTone(rounded) {
17586
17713
  return "neg";
17587
17714
  }
17588
17715
  function Bio({ label, value }) {
17589
- return /* @__PURE__ */ jsxs130("div", { className: "ss-w-pd-bio-item", children: [
17590
- /* @__PURE__ */ jsx147("span", { className: "ss-w-pd-faint", children: label }),
17716
+ return /* @__PURE__ */ jsxs131("div", { className: "ss-w-pd-bio-item", children: [
17717
+ /* @__PURE__ */ jsx149("span", { className: "ss-w-pd-faint", children: label }),
17591
17718
  " ",
17592
- /* @__PURE__ */ jsx147("span", { children: value })
17719
+ /* @__PURE__ */ jsx149("span", { children: value })
17593
17720
  ] });
17594
17721
  }
17595
17722
  function Tile({ label, value, pos }) {
17596
- return /* @__PURE__ */ jsxs130("div", { className: "ss-w-pd-tile", children: [
17597
- /* @__PURE__ */ jsx147("div", { className: "ss-w-pd-tile-label", children: label }),
17598
- /* @__PURE__ */ jsx147("div", { className: pos ? "ss-w-pd-tile-value ss-w-pd-pos-ink" : "ss-w-pd-tile-value", children: value })
17723
+ return /* @__PURE__ */ jsxs131("div", { className: "ss-w-pd-tile", children: [
17724
+ /* @__PURE__ */ jsx149("div", { className: "ss-w-pd-tile-label", children: label }),
17725
+ /* @__PURE__ */ jsx149("div", { className: pos ? "ss-w-pd-tile-value ss-w-pd-pos-ink" : "ss-w-pd-tile-value", children: value })
17599
17726
  ] });
17600
17727
  }
17601
17728
  function AvailabilityCard({ ui, next, availability }) {
@@ -17611,12 +17738,12 @@ function AvailabilityCard({ ui, next, availability }) {
17611
17738
  pill = availability.status === "injured" ? { text: ui.availabilityInjured, tone: "neg" } : availability.status === "suspended" ? { text: ui.availabilitySuspended, tone: "warn" } : { text: ui.availabilityUnavailable, tone: "warn" };
17612
17739
  }
17613
17740
  }
17614
- return /* @__PURE__ */ jsxs130("div", { className: "ss-w-pd-card ss-w-pd-avail", children: [
17615
- /* @__PURE__ */ jsxs130("div", { className: "ss-w-pd-avail-text", children: [
17616
- next !== null && /* @__PURE__ */ jsx147("div", { className: "ss-w-pd-avail-next", children: ui.availabilityNext(next.opponentName, next.isHome, validMs(next.kickoffUnixMs)) }),
17617
- note !== null && /* @__PURE__ */ jsx147("div", { className: "ss-w-pd-avail-note", children: note })
17741
+ return /* @__PURE__ */ jsxs131("div", { className: "ss-w-pd-card ss-w-pd-avail", children: [
17742
+ /* @__PURE__ */ jsxs131("div", { className: "ss-w-pd-avail-text", children: [
17743
+ next !== null && /* @__PURE__ */ jsx149("div", { className: "ss-w-pd-avail-next", children: ui.availabilityNext(next.opponentName, next.isHome, validMs(next.kickoffUnixMs)) }),
17744
+ note !== null && /* @__PURE__ */ jsx149("div", { className: "ss-w-pd-avail-note", children: note })
17618
17745
  ] }),
17619
- pill !== null && /* @__PURE__ */ jsx147("div", { className: `ss-w-pd-pill ss-w-pd-pill--${pill.tone}`, children: pill.text })
17746
+ pill !== null && /* @__PURE__ */ jsx149("div", { className: `ss-w-pd-pill ss-w-pd-pill--${pill.tone}`, children: pill.text })
17620
17747
  ] });
17621
17748
  }
17622
17749
  function MatchRow({ ui, row }) {
@@ -17630,28 +17757,28 @@ function MatchRow({ ui, row }) {
17630
17757
  const sub = [`${ui.resultLetter[row.result]} ${row.goalsFor}\u2013${row.goalsAgainst}`, `${row.minutes}\u2032`, ...extras].join(" \xB7 ");
17631
17758
  const rating = typeof row.rating === "number" && Number.isFinite(row.rating) ? Math.round(row.rating * 10) / 10 : null;
17632
17759
  const pillTone = row.result === "W" ? "pos" : row.result === "L" ? "neg" : "draw";
17633
- return /* @__PURE__ */ jsxs130("div", { className: "ss-w-pd-match", children: [
17634
- /* @__PURE__ */ jsx147("div", { className: "ss-w-pd-match-date", children: date === null ? "" : ui.logShortDate(date) }),
17635
- /* @__PURE__ */ jsxs130("div", { className: "ss-w-pd-match-main", children: [
17636
- /* @__PURE__ */ jsx147("div", { className: "ss-w-pd-match-opp", children: ui.matchLogOpponent(row.opponentName, row.isHome) }),
17637
- /* @__PURE__ */ jsx147("div", { className: "ss-w-pd-match-sub", children: sub })
17760
+ return /* @__PURE__ */ jsxs131("div", { className: "ss-w-pd-match", children: [
17761
+ /* @__PURE__ */ jsx149("div", { className: "ss-w-pd-match-date", children: date === null ? "" : ui.logShortDate(date) }),
17762
+ /* @__PURE__ */ jsxs131("div", { className: "ss-w-pd-match-main", children: [
17763
+ /* @__PURE__ */ jsx149("div", { className: "ss-w-pd-match-opp", children: ui.matchLogOpponent(row.opponentName, row.isHome) }),
17764
+ /* @__PURE__ */ jsx149("div", { className: "ss-w-pd-match-sub", children: sub })
17638
17765
  ] }),
17639
- /* @__PURE__ */ jsx147("div", { className: `ss-w-pd-pill ss-w-pd-pill--${pillTone}`, children: ui.resultLetter[row.result] }),
17640
- rating === null ? /* @__PURE__ */ jsx147("div", { className: "ss-w-pd-chip-empty" }) : /* @__PURE__ */ jsx147("div", { className: `ss-w-pd-chip ss-w-pd-chip--${ratingTone(rating)}`, children: formatFixed(rating, ui.locale, 1) })
17766
+ /* @__PURE__ */ jsx149("div", { className: `ss-w-pd-pill ss-w-pd-pill--${pillTone}`, children: ui.resultLetter[row.result] }),
17767
+ rating === null ? /* @__PURE__ */ jsx149("div", { className: "ss-w-pd-chip-empty" }) : /* @__PURE__ */ jsx149("div", { className: `ss-w-pd-chip ss-w-pd-chip--${ratingTone(rating)}`, children: formatFixed(rating, ui.locale, 1) })
17641
17768
  ] });
17642
17769
  }
17643
17770
  function PlayerDetail({ detail, loading, ui, seasonName, onClose }) {
17644
- const back = /* @__PURE__ */ jsxs130("button", { type: "button", className: "ss-w-pd-back", onClick: onClose, children: [
17645
- /* @__PURE__ */ jsx147("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx147("path", { d: "M15 18l-6-6 6-6" }) }),
17771
+ const back = /* @__PURE__ */ jsxs131("button", { type: "button", className: "ss-w-pd-back", onClick: onClose, children: [
17772
+ /* @__PURE__ */ jsx149("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx149("path", { d: "M15 18l-6-6 6-6" }) }),
17646
17773
  ui.clubPlayerBack
17647
17774
  ] });
17648
17775
  if (detail === null) {
17649
- return loading ? /* @__PURE__ */ jsxs130(Fragment45, { children: [
17650
- /* @__PURE__ */ jsx147("div", { className: "ss-w-pd-bar", children: back }),
17651
- /* @__PURE__ */ jsx147("div", { className: "ss-w-mon-list" })
17652
- ] }) : /* @__PURE__ */ jsxs130(Fragment45, { children: [
17653
- /* @__PURE__ */ jsx147("div", { className: "ss-w-pd-bar", children: back }),
17654
- /* @__PURE__ */ jsx147("div", { className: "ss-w-mon-empty", children: ui.clubPlayerDetailEmpty })
17776
+ return loading ? /* @__PURE__ */ jsxs131(Fragment45, { children: [
17777
+ /* @__PURE__ */ jsx149("div", { className: "ss-w-pd-bar", children: back }),
17778
+ /* @__PURE__ */ jsx149("div", { className: "ss-w-mon-list" })
17779
+ ] }) : /* @__PURE__ */ jsxs131(Fragment45, { children: [
17780
+ /* @__PURE__ */ jsx149("div", { className: "ss-w-pd-bar", children: back }),
17781
+ /* @__PURE__ */ jsx149("div", { className: "ss-w-mon-empty", children: ui.clubPlayerDetailEmpty })
17655
17782
  ] });
17656
17783
  }
17657
17784
  const s = detail.seasonStats;
@@ -17664,137 +17791,48 @@ function PlayerDetail({ detail, loading, ui, seasonName, onClose }) {
17664
17791
  const next = detail.nextFixture ?? null;
17665
17792
  const availability = detail.availability ?? null;
17666
17793
  const log = detail.matchLog ?? [];
17667
- return /* @__PURE__ */ jsxs130(Fragment45, { children: [
17668
- /* @__PURE__ */ jsx147("div", { className: "ss-w-pd-bar", children: back }),
17669
- /* @__PURE__ */ jsxs130("div", { className: "ss-w-mon-list ss-w-pd-list", children: [
17670
- /* @__PURE__ */ jsxs130("div", { className: "ss-w-pd-card ss-w-pd-profile", children: [
17671
- /* @__PURE__ */ jsx147(PlayerPhoto, { photoUrl: detail.photoUrl, jerseyNumber: detail.jerseyNumber, size: 52 }, detail.photoUrl ?? ""),
17672
- /* @__PURE__ */ jsxs130("div", { className: "ss-w-pd-profile-main", children: [
17673
- /* @__PURE__ */ jsx147("div", { className: "ss-w-pd-name", children: detail.playerName }),
17674
- subLine !== "" && /* @__PURE__ */ jsx147("div", { className: "ss-w-pd-sub", children: subLine }),
17675
- /* @__PURE__ */ jsxs130("div", { className: "ss-w-pd-bio", children: [
17676
- /* @__PURE__ */ jsx147(Bio, { label: ui.detailAge, value: ageFrom(detail.dateOfBirthUnixMs) }),
17677
- /* @__PURE__ */ jsx147(Bio, { label: ui.detailHeight, value: detail.heightCm === null ? DASH : `${detail.heightCm} cm` }),
17678
- foot !== null && /* @__PURE__ */ jsx147(Bio, { label: ui.detailFoot, value: foot }),
17679
- /* @__PURE__ */ jsx147(Bio, { label: ui.detailNatShort, value: detail.nationality ?? DASH })
17794
+ return /* @__PURE__ */ jsxs131(Fragment45, { children: [
17795
+ /* @__PURE__ */ jsx149("div", { className: "ss-w-pd-bar", children: back }),
17796
+ /* @__PURE__ */ jsxs131("div", { className: "ss-w-mon-list ss-w-pd-list", children: [
17797
+ /* @__PURE__ */ jsxs131("div", { className: "ss-w-pd-card ss-w-pd-profile", children: [
17798
+ /* @__PURE__ */ jsx149(PlayerPhoto, { photoUrl: detail.photoUrl, jerseyNumber: detail.jerseyNumber, size: 52 }, detail.photoUrl ?? ""),
17799
+ /* @__PURE__ */ jsxs131("div", { className: "ss-w-pd-profile-main", children: [
17800
+ /* @__PURE__ */ jsx149("div", { className: "ss-w-pd-name", children: detail.playerName }),
17801
+ subLine !== "" && /* @__PURE__ */ jsx149("div", { className: "ss-w-pd-sub", children: subLine }),
17802
+ /* @__PURE__ */ jsxs131("div", { className: "ss-w-pd-bio", children: [
17803
+ /* @__PURE__ */ jsx149(Bio, { label: ui.detailAge, value: ageFrom(detail.dateOfBirthUnixMs) }),
17804
+ /* @__PURE__ */ jsx149(Bio, { label: ui.detailHeight, value: detail.heightCm === null ? DASH : `${detail.heightCm} cm` }),
17805
+ foot !== null && /* @__PURE__ */ jsx149(Bio, { label: ui.detailFoot, value: foot }),
17806
+ /* @__PURE__ */ jsx149(Bio, { label: ui.detailNatShort, value: detail.nationality ?? DASH })
17680
17807
  ] })
17681
17808
  ] }),
17682
- /* @__PURE__ */ jsx147(MiniPitch, { positionCode: detail.positionCode })
17809
+ /* @__PURE__ */ jsx149(MiniPitch, { positionCode: detail.positionCode })
17683
17810
  ] }),
17684
- (next !== null || availability !== null) && /* @__PURE__ */ jsx147(AvailabilityCard, { ui, next, availability }),
17685
- /* @__PURE__ */ jsxs130("div", { children: [
17686
- eyebrow !== null && /* @__PURE__ */ jsx147("div", { className: "ss-w-pd-eyebrow ss-w-pd-eyebrow--block", children: eyebrow }),
17687
- /* @__PURE__ */ jsxs130("div", { className: "ss-w-pd-tiles", children: [
17688
- /* @__PURE__ */ jsx147(Tile, { label: ui.statColGoals, value: String(s.goals) }),
17689
- /* @__PURE__ */ jsx147(Tile, { label: ui.statColAssists, value: String(s.assists) }),
17690
- typeof s.starts === "number" && /* @__PURE__ */ jsx147(Tile, { label: ui.detailStarted, value: String(s.starts) }),
17691
- /* @__PURE__ */ jsx147(Tile, { label: ui.detailMatches, value: String(s.appearances) }),
17692
- /* @__PURE__ */ jsx147(Tile, { label: ui.statColMinutes, value: String(s.minutesPlayed) }),
17693
- rating !== null && /* @__PURE__ */ jsx147(Tile, { label: ui.statColRating, value: formatFixed(rating, ui.locale, 2), pos: Math.round(rating * 100) / 100 >= 7 }),
17694
- /* @__PURE__ */ jsx147(Tile, { label: ui.detailYellows, value: String(s.yellowCards) }),
17695
- /* @__PURE__ */ jsx147(Tile, { label: ui.detailReds, value: String(s.redCards) })
17811
+ (next !== null || availability !== null) && /* @__PURE__ */ jsx149(AvailabilityCard, { ui, next, availability }),
17812
+ /* @__PURE__ */ jsxs131("div", { children: [
17813
+ eyebrow !== null && /* @__PURE__ */ jsx149("div", { className: "ss-w-pd-eyebrow ss-w-pd-eyebrow--block", children: eyebrow }),
17814
+ /* @__PURE__ */ jsxs131("div", { className: "ss-w-pd-tiles", children: [
17815
+ /* @__PURE__ */ jsx149(Tile, { label: ui.statColGoals, value: String(s.goals) }),
17816
+ /* @__PURE__ */ jsx149(Tile, { label: ui.statColAssists, value: String(s.assists) }),
17817
+ typeof s.starts === "number" && /* @__PURE__ */ jsx149(Tile, { label: ui.detailStarted, value: String(s.starts) }),
17818
+ /* @__PURE__ */ jsx149(Tile, { label: ui.detailMatches, value: String(s.appearances) }),
17819
+ /* @__PURE__ */ jsx149(Tile, { label: ui.statColMinutes, value: String(s.minutesPlayed) }),
17820
+ rating !== null && /* @__PURE__ */ jsx149(Tile, { label: ui.statColRating, value: formatFixed(rating, ui.locale, 2), pos: Math.round(rating * 100) / 100 >= 7 }),
17821
+ /* @__PURE__ */ jsx149(Tile, { label: ui.detailYellows, value: String(s.yellowCards) }),
17822
+ /* @__PURE__ */ jsx149(Tile, { label: ui.detailReds, value: String(s.redCards) })
17696
17823
  ] })
17697
17824
  ] }),
17698
- detail.performance != null && /* @__PURE__ */ jsx147(PerformanceBars, { performance: detail.performance, competitionName: competition, strings: ui }),
17699
- log.length > 0 && /* @__PURE__ */ jsxs130("div", { children: [
17700
- /* @__PURE__ */ jsx147("div", { className: "ss-w-pd-eyebrow ss-w-pd-eyebrow--block", children: ui.matchLogTitle }),
17701
- /* @__PURE__ */ jsx147("div", { className: "ss-w-pd-card ss-w-pd-log", children: log.map((row) => /* @__PURE__ */ jsx147(MatchRow, { ui, row }, row.matchId)) })
17825
+ detail.performance != null && /* @__PURE__ */ jsx149(PerformanceBars, { performance: detail.performance, competitionName: competition, strings: ui }),
17826
+ log.length > 0 && /* @__PURE__ */ jsxs131("div", { children: [
17827
+ /* @__PURE__ */ jsx149("div", { className: "ss-w-pd-eyebrow ss-w-pd-eyebrow--block", children: ui.matchLogTitle }),
17828
+ /* @__PURE__ */ jsx149("div", { className: "ss-w-pd-card ss-w-pd-log", children: log.map((row) => /* @__PURE__ */ jsx149(MatchRow, { ui, row }, row.matchId)) })
17702
17829
  ] })
17703
17830
  ] })
17704
17831
  ] });
17705
17832
  }
17706
17833
 
17707
- // src/components/PresetTools.tsx
17708
- import { useId as useId11, useState as useState79 } from "react";
17709
- import { Fragment as Fragment46, jsx as jsx148, jsxs as jsxs131 } from "react/jsx-runtime";
17710
- function PresetToolModal({ title, closeLabel, onClose, children, footer, className }) {
17711
- const { dialogRef, onKeyDown } = useModalDialog(onClose, { restoreFocus: false });
17712
- const titleId = useId11();
17713
- return /* @__PURE__ */ jsx148("div", { className: className ? `ss-w-tool-backdrop ${className}` : "ss-w-tool-backdrop", children: /* @__PURE__ */ jsxs131("div", { ref: dialogRef, className: "ss-w-tool", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, tabIndex: -1, onKeyDown, children: [
17714
- /* @__PURE__ */ jsxs131("div", { className: "ss-w-tool-head", children: [
17715
- /* @__PURE__ */ jsx148("h2", { id: titleId, className: "ss-w-tool-title", children: title }),
17716
- /* @__PURE__ */ jsx148("button", { type: "button", className: "ss-w-tool-close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx148(CloseIcon, {}) })
17717
- ] }),
17718
- /* @__PURE__ */ jsx148("div", { className: "ss-w-tool-body", children }),
17719
- footer ? /* @__PURE__ */ jsx148("div", { className: "ss-w-tool-foot", children: footer }) : null
17720
- ] }) });
17721
- }
17722
- function SendButton({ label, display, disabled, onClick }) {
17723
- return /* @__PURE__ */ jsx148("button", { type: "button", className: "ss-w-tool-send", "aria-label": `${label}: ${display}`, disabled, onClick, children: label });
17724
- }
17725
- function PickList({ picks, formatKickoff }) {
17726
- const { oddsFormat } = useOddsSettings();
17727
- return /* @__PURE__ */ jsx148("ul", { className: "ss-w-tool-picks", role: "list", children: picks.map((p) => /* @__PURE__ */ jsxs131("li", { className: "ss-w-tool-pick", children: [
17728
- /* @__PURE__ */ jsxs131("span", { className: "ss-w-tool-pick-match", children: [
17729
- p.homeTeamName,
17730
- " \u2013 ",
17731
- p.awayTeamName
17732
- ] }),
17733
- /* @__PURE__ */ jsxs131("span", { className: "ss-w-tool-pick-sel", children: [
17734
- p.marketLabel,
17735
- ": ",
17736
- p.selectionLabel,
17737
- p.line ? ` ${p.line}` : ""
17738
- ] }),
17739
- /* @__PURE__ */ jsx148("span", { className: "ss-w-tool-pick-kick", children: formatKickoff(p.kickoffUtc) }),
17740
- /* @__PURE__ */ jsx148("span", { className: "ss-w-tool-pick-price", children: formatOdds(p.priceFormats, oddsFormat) })
17741
- ] }, p.matchOddsId)) });
17742
- }
17743
- function ComboPreview({ cell: cell2, formatKickoff }) {
17744
- const { oddsFormat } = useOddsSettings();
17745
- return /* @__PURE__ */ jsxs131(Fragment46, { children: [
17746
- /* @__PURE__ */ jsx148(PickList, { picks: cell2.combo.legs, formatKickoff }),
17747
- /* @__PURE__ */ jsx148("div", { className: "ss-w-tool-math", children: oddsFormat === "decimal" ? cell2.combo.multiplication : formatOdds(cell2.combo.totalFormats, oddsFormat) })
17748
- ] });
17749
- }
17750
- function Unavailable({ text: text2 }) {
17751
- return /* @__PURE__ */ jsx148("p", { className: "ss-w-tool-unavailable", children: text2 });
17752
- }
17753
- var textOf = (options, value, format2) => {
17754
- const o = options.find((x) => samePrice(x.value, value));
17755
- return o ? formatOdds(o.formats, format2) : "";
17756
- };
17757
- function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal, initialLegs, onSend, onClose }) {
17758
- const { oddsFormat } = useOddsSettings();
17759
- const totalOptions = comboTotals(grid);
17760
- const totals = totalOptions.map((o) => o.value);
17761
- const legChoices = comboLegChoices(grid);
17762
- const [total, setTotal] = useState79(() => nearest(totals, initialTotal));
17763
- const [legs, setLegs] = useState79(() => legsForTotal(grid, nearest(totals, initialTotal), clampLegs(legChoices, initialLegs)));
17764
- const [announcement, setAnnouncement] = useState79("");
17765
- const cell2 = findCombo(grid, total, legs);
17766
- const minLegs = legChoices[0] ?? legs;
17767
- const maxLegs = legChoices[legChoices.length - 1] ?? legs;
17768
- const display = strings.comboDisplay(legs, textOf(totalOptions, total, oddsFormat));
17769
- const choose = (nextTotal, nextLegs) => {
17770
- setTotal(nextTotal);
17771
- setLegs(nextLegs);
17772
- const d = strings.comboDisplay(nextLegs, textOf(totalOptions, nextTotal, oddsFormat));
17773
- setAnnouncement(findCombo(grid, nextTotal, nextLegs) ? d : `${d}. ${strings.unavailable}`);
17774
- };
17775
- const footer = /* @__PURE__ */ jsx148(SendButton, { label: strings.send, display, disabled: !cell2 || streaming, onClick: () => {
17776
- if (cell2) onSend(comboAsk(cell2, strings, oddsFormat));
17777
- } });
17778
- return /* @__PURE__ */ jsxs131(PresetToolModal, { title: strings.buildCombo, closeLabel: strings.close, onClose, footer, children: [
17779
- /* @__PURE__ */ jsxs131("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.totalLabel, children: [
17780
- /* @__PURE__ */ jsx148("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.totalLabel }),
17781
- /* @__PURE__ */ jsx148("div", { className: "ss-w-tool-chips", children: totalOptions.map((o) => /* @__PURE__ */ jsx148("button", { type: "button", className: "ss-w-tool-chip", "aria-pressed": samePrice(o.value, total), onClick: () => choose(o.value, samePrice(o.value, total) ? legs : legsForTotal(grid, o.value, legs)), children: formatOdds(o.formats, oddsFormat) }, o.key)) })
17782
- ] }),
17783
- /* @__PURE__ */ jsxs131("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.matchesLabel, children: [
17784
- /* @__PURE__ */ jsx148("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.matchesLabel }),
17785
- /* @__PURE__ */ jsxs131("div", { className: "ss-w-tool-stepper", children: [
17786
- /* @__PURE__ */ jsx148("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.fewerMatches, disabled: legs <= minLegs, onClick: () => choose(total, legs - 1), children: "\u2212" }),
17787
- /* @__PURE__ */ jsx148("span", { className: "ss-w-tool-count", children: legs }),
17788
- /* @__PURE__ */ jsx148("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.moreMatches, disabled: legs >= maxLegs, onClick: () => choose(total, legs + 1), children: "+" })
17789
- ] })
17790
- ] }),
17791
- cell2 ? /* @__PURE__ */ jsx148(ComboPreview, { cell: cell2, formatKickoff }) : /* @__PURE__ */ jsx148(Unavailable, { text: strings.unavailable }),
17792
- /* @__PURE__ */ jsx148("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
17793
- ] });
17794
- }
17795
-
17796
17834
  // src/components/SettingsSheet.tsx
17797
- import { jsx as jsx149, jsxs as jsxs132 } from "react/jsx-runtime";
17835
+ import { jsx as jsx150, jsxs as jsxs132 } from "react/jsx-runtime";
17798
17836
  var SAMPLE = { decimal: "2.50", american: "+150", fractional: "3/2" };
17799
17837
  var ODDS = ["decimal", "fractional", "american"];
17800
17838
  var THEMES2 = ["light", "dark", "auto"];
@@ -17808,19 +17846,19 @@ function SettingsSheet({ ui, onClose }) {
17808
17846
  closeLabel: t.close,
17809
17847
  onClose,
17810
17848
  className: "ss-w-set-backdrop-in",
17811
- footer: /* @__PURE__ */ jsx149("p", { className: "ss-w-set-foot", children: t.foot }),
17849
+ footer: /* @__PURE__ */ jsx150("p", { className: "ss-w-set-foot", children: t.foot }),
17812
17850
  children: [
17813
17851
  s.oddsOffered && /* @__PURE__ */ jsxs132("div", { className: "ss-w-set-row", children: [
17814
- /* @__PURE__ */ jsx149("div", { className: "ss-w-tool-label", id: "ss-w-set-odds", children: t.oddsLabel }),
17852
+ /* @__PURE__ */ jsx150("div", { className: "ss-w-tool-label", id: "ss-w-set-odds", children: t.oddsLabel }),
17815
17853
  /* @__PURE__ */ jsxs132("div", { className: "ss-w-set-sample", children: [
17816
- /* @__PURE__ */ jsx149("span", { children: t.sampleLabel }),
17817
- /* @__PURE__ */ jsx149("b", { children: formatOdds(SAMPLE, s.oddsFormat) })
17854
+ /* @__PURE__ */ jsx150("span", { children: t.sampleLabel }),
17855
+ /* @__PURE__ */ jsx150("b", { children: formatOdds(SAMPLE, s.oddsFormat) })
17818
17856
  ] }),
17819
- /* @__PURE__ */ jsx149("div", { className: "ss-w-set-seg", role: "group", "aria-labelledby": "ss-w-set-odds", children: ODDS.map((f) => /* @__PURE__ */ jsx149("button", { type: "button", "aria-pressed": s.oddsFormat === f, onClick: () => s.setOddsFormat(f), children: t[f] }, f)) })
17857
+ /* @__PURE__ */ jsx150("div", { className: "ss-w-set-seg", role: "group", "aria-labelledby": "ss-w-set-odds", children: ODDS.map((f) => /* @__PURE__ */ jsx150("button", { type: "button", "aria-pressed": s.oddsFormat === f, onClick: () => s.setOddsFormat(f), children: t[f] }, f)) })
17820
17858
  ] }),
17821
17859
  !s.themeLocked && /* @__PURE__ */ jsxs132("div", { className: "ss-w-set-row", children: [
17822
- /* @__PURE__ */ jsx149("div", { className: "ss-w-tool-label", id: "ss-w-set-theme", children: t.themeLabel }),
17823
- /* @__PURE__ */ jsx149("div", { className: "ss-w-set-seg", role: "group", "aria-labelledby": "ss-w-set-theme", children: THEMES2.map((m) => /* @__PURE__ */ jsx149("button", { type: "button", "aria-pressed": s.theme === m, onClick: () => s.setTheme(m), children: t[m] }, m)) })
17860
+ /* @__PURE__ */ jsx150("div", { className: "ss-w-tool-label", id: "ss-w-set-theme", children: t.themeLabel }),
17861
+ /* @__PURE__ */ jsx150("div", { className: "ss-w-set-seg", role: "group", "aria-labelledby": "ss-w-set-theme", children: THEMES2.map((m) => /* @__PURE__ */ jsx150("button", { type: "button", "aria-pressed": s.theme === m, onClick: () => s.setTheme(m), children: t[m] }, m)) })
17824
17862
  ] })
17825
17863
  ]
17826
17864
  }
@@ -17828,7 +17866,7 @@ function SettingsSheet({ ui, onClose }) {
17828
17866
  }
17829
17867
 
17830
17868
  // src/components/ChatPanel.tsx
17831
- import { Fragment as Fragment47, jsx as jsx150, jsxs as jsxs133 } from "react/jsx-runtime";
17869
+ import { Fragment as Fragment46, jsx as jsx151, jsxs as jsxs133 } from "react/jsx-runtime";
17832
17870
  var FULLSCREEN_QUERY = "(max-width: 639px)";
17833
17871
  function useIsModal() {
17834
17872
  const [modal, setModal] = useState80(false);
@@ -17879,9 +17917,13 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
17879
17917
  setSelectedPlayerId(null);
17880
17918
  clearPlayerDetail?.();
17881
17919
  }, [activeTab, selectedPlayerId, clearPlayerDetail]);
17920
+ const favouritesOffered = !!monitor && (favouritesEnabled ?? false) && !!favourites;
17921
+ const favouritesOpen = favouritesOffered && (favourites?.open ?? false);
17922
+ const favouritesAskedOpen = favourites?.open ?? false;
17923
+ const setFavouritesOpen = favourites?.onOpenChange;
17882
17924
  useEffect53(() => {
17883
- if (activeTab === "favourites" && !favouritesEnabled) setMonitorTab?.("chat");
17884
- }, [activeTab, favouritesEnabled, setMonitorTab]);
17925
+ if (favouritesAskedOpen && !favouritesOffered) setFavouritesOpen?.(false);
17926
+ }, [favouritesAskedOpen, favouritesOffered, setFavouritesOpen]);
17885
17927
  const storedTab = tabState?.activeTab;
17886
17928
  useEffect53(() => {
17887
17929
  const unreachable = storedTab === "builder" ? !hasBuilder : !monitor && storedTab !== void 0 && storedTab !== "chat";
@@ -17928,12 +17970,23 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
17928
17970
  const hasSettings = settings.oddsOffered || !settings.themeLocked;
17929
17971
  const openSettings = useCallback27(() => {
17930
17972
  setTool(null);
17973
+ setFavouritesOpen?.(false);
17931
17974
  setSettingsOpen(true);
17932
- }, []);
17975
+ }, [setFavouritesOpen]);
17933
17976
  const closeSettings = useCallback27(() => {
17934
17977
  setSettingsOpen(false);
17935
17978
  panelRef.current?.querySelector(".ss-w-kebab")?.focus();
17936
17979
  }, []);
17980
+ const openFavourites = useCallback27(() => setFavouritesOpen?.(true), [setFavouritesOpen]);
17981
+ const closeFavourites = useCallback27(() => {
17982
+ setFavouritesOpen?.(false);
17983
+ panelRef.current?.querySelector(".ss-w-kebab")?.focus();
17984
+ }, [setFavouritesOpen]);
17985
+ useEffect53(() => {
17986
+ if (!favouritesOpen) return;
17987
+ setTool(null);
17988
+ setSettingsOpen(false);
17989
+ }, [favouritesOpen]);
17937
17990
  const paused = isPaused(state.limit);
17938
17991
  useEffect53(() => {
17939
17992
  if (paused) setTool(null);
@@ -17977,6 +18030,10 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
17977
18030
  }, [tool, onChatTab, presetGrid]);
17978
18031
  const backRef = useRef45(() => false);
17979
18032
  backRef.current = () => {
18033
+ if (favouritesOpen) {
18034
+ closeFavourites();
18035
+ return true;
18036
+ }
17980
18037
  if (settingsOpen && hasSettings) {
17981
18038
  closeSettings();
17982
18039
  return true;
@@ -18001,7 +18058,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
18001
18058
  return () => onRegisterBack(null);
18002
18059
  }, [onRegisterBack]);
18003
18060
  return /* @__PURE__ */ jsxs133("div", { ref: panelRef, className: "ss-w-panel", role: "dialog", "aria-modal": isModal, "aria-label": ui.chatDialogLabel, children: [
18004
- /* @__PURE__ */ jsx150(
18061
+ /* @__PURE__ */ jsx151(
18005
18062
  ChatHeader,
18006
18063
  {
18007
18064
  onClose: () => closeWith("button"),
@@ -18013,10 +18070,12 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
18013
18070
  newConversationLabel: ui.newConversation,
18014
18071
  moreOptionsLabel: ui.moreOptions,
18015
18072
  onOpenSettings: hasSettings ? openSettings : void 0,
18016
- settingsLabel: ui.settings.title
18073
+ settingsLabel: ui.settings.title,
18074
+ onOpenFavourites: favouritesOffered ? openFavourites : void 0,
18075
+ favouritesLabel: ui.tabFavourites
18017
18076
  }
18018
18077
  ),
18019
- tabs && /* @__PURE__ */ jsx150(
18078
+ tabs && /* @__PURE__ */ jsx151(
18020
18079
  TabBar,
18021
18080
  {
18022
18081
  monitor: tabs,
@@ -18027,15 +18086,14 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
18027
18086
  hasSchedule: !!monitor && !!discovery && !!schedule,
18028
18087
  hasBuilder,
18029
18088
  gamesEnabled: !!monitor && (gamesResult?.enabled ?? false),
18030
- clubEnabled: clubFixturesResult?.enabled ?? false,
18031
- favouritesEnabled: !!monitor && (favouritesEnabled ?? false)
18089
+ clubEnabled: clubFixturesResult?.enabled ?? false
18032
18090
  }
18033
18091
  ),
18034
18092
  /* @__PURE__ */ jsxs133("div", { className: "ss-w-chat-layer", style: onChatTab ? void 0 : HIDDEN_LAYER_STYLE, children: [
18035
- /* @__PURE__ */ jsx150(PresetToolsContext.Provider, { value: toolsValue, children: /* @__PURE__ */ jsx150(MessageList, { controller, ui, slip, onDashboardTap, monitor, onGreetingSport: favourites?.onSportChange }) }),
18036
- tool && presetGrid && onChatTab && !paused ? /* @__PURE__ */ jsx150(BuildComboTool, { grid: presetGrid, strings: ui.presets, streaming: state.isStreaming, formatKickoff, initialTotal: tool.total, initialLegs: tool.legs, onSend: sendAsk, onClose: closeTool }) : null
18093
+ /* @__PURE__ */ jsx151(PresetToolsContext.Provider, { value: toolsValue, children: /* @__PURE__ */ jsx151(MessageList, { controller, ui, slip, onDashboardTap, monitor, onGreetingSport: favourites?.onSportChange }) }),
18094
+ tool && presetGrid && onChatTab && !paused ? /* @__PURE__ */ jsx151(BuildComboTool, { grid: presetGrid, strings: ui.presets, streaming: state.isStreaming, formatKickoff, initialTotal: tool.total, initialLegs: tool.legs, onSend: sendAsk, onClose: closeTool }) : null
18037
18095
  ] }),
18038
- monitor && discovery && schedule && monitor.activeTab === "live" && /* @__PURE__ */ jsx150(
18096
+ monitor && discovery && schedule && monitor.activeTab === "live" && /* @__PURE__ */ jsx151(
18039
18097
  LivePanel,
18040
18098
  {
18041
18099
  discovery,
@@ -18053,7 +18111,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
18053
18111
  }
18054
18112
  }
18055
18113
  ),
18056
- monitor && discovery && schedule && monitor.activeTab === "matches" && /* @__PURE__ */ jsx150(
18114
+ monitor && discovery && schedule && monitor.activeTab === "matches" && /* @__PURE__ */ jsx151(
18057
18115
  ScheduleMatchesPanel,
18058
18116
  {
18059
18117
  discovery,
@@ -18075,19 +18133,19 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
18075
18133
  }
18076
18134
  }
18077
18135
  ),
18078
- tabs && tabs.activeTab === "builder" && hasBuilder && builder && /* @__PURE__ */ jsx150(BuilderPanel, { options: builder.options, sport: builder.sport, onSportChange: builder.onSportChange, ui, slip, onCoolOff: builder.onCoolOff }),
18079
- monitor && monitor.activeTab === "following" && /* @__PURE__ */ jsx150(MatchesPanel, { monitor, ui, slip, onAsk: paused ? void 0 : handleAsk, discovery }),
18080
- monitor && monitor.activeTab === "trends" && /* @__PURE__ */ jsx150(TrendsPanel, { monitor, ui, slip }),
18081
- monitor && monitor.activeTab === "fixtures" && /* @__PURE__ */ jsx150(Fixtures, { fixtures: clubFixturesResult?.fixtures ?? [], loading: clubFixturesResult?.loading ?? false, ui }),
18082
- monitor && monitor.activeTab === "standings" && /* @__PURE__ */ jsx150(Standings, { standings: clubStandingsResult?.data ?? null, loading: clubStandingsResult?.loading ?? false, ui }),
18083
- monitor && monitor.activeTab === "squad" && /* @__PURE__ */ jsxs133(Fragment47, { children: [
18084
- /* @__PURE__ */ jsx150(
18136
+ tabs && tabs.activeTab === "builder" && hasBuilder && builder && /* @__PURE__ */ jsx151(BuilderPanel, { options: builder.options, sport: builder.sport, onSportChange: builder.onSportChange, ui, slip, onCoolOff: builder.onCoolOff }),
18137
+ monitor && monitor.activeTab === "following" && /* @__PURE__ */ jsx151(MatchesPanel, { monitor, ui, slip, onAsk: paused ? void 0 : handleAsk, discovery }),
18138
+ monitor && monitor.activeTab === "trends" && /* @__PURE__ */ jsx151(TrendsPanel, { monitor, ui, slip }),
18139
+ monitor && monitor.activeTab === "fixtures" && /* @__PURE__ */ jsx151(Fixtures, { fixtures: clubFixturesResult?.fixtures ?? [], loading: clubFixturesResult?.loading ?? false, ui }),
18140
+ monitor && monitor.activeTab === "standings" && /* @__PURE__ */ jsx151(Standings, { standings: clubStandingsResult?.data ?? null, loading: clubStandingsResult?.loading ?? false, ui }),
18141
+ monitor && monitor.activeTab === "squad" && /* @__PURE__ */ jsxs133(Fragment46, { children: [
18142
+ /* @__PURE__ */ jsx151(
18085
18143
  "div",
18086
18144
  {
18087
18145
  ref: squadLayerRef,
18088
18146
  style: selectedPlayerId === null ? SQUAD_LAYER_STYLE : HIDDEN_LAYER_STYLE,
18089
18147
  "aria-hidden": selectedPlayerId !== null ? true : void 0,
18090
- children: /* @__PURE__ */ jsx150(
18148
+ children: /* @__PURE__ */ jsx151(
18091
18149
  Squad,
18092
18150
  {
18093
18151
  squad: clubSquadResult?.data ?? null,
@@ -18105,9 +18163,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
18105
18163
  )
18106
18164
  }
18107
18165
  ),
18108
- selectedPlayerId !== null && /* @__PURE__ */ jsx150(PlayerDetail, { detail: clubPlayerDetailResult?.data ?? null, loading: clubPlayerDetailResult?.loading ?? false, ui, seasonName: clubSquadStatsResult?.seasonName ?? null, onClose: closePlayer })
18166
+ selectedPlayerId !== null && /* @__PURE__ */ jsx151(PlayerDetail, { detail: clubPlayerDetailResult?.data ?? null, loading: clubPlayerDetailResult?.loading ?? false, ui, seasonName: clubSquadStatsResult?.seasonName ?? null, onClose: closePlayer })
18109
18167
  ] }),
18110
- monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */ jsx150(
18168
+ monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */ jsx151(
18111
18169
  GamesPanel,
18112
18170
  {
18113
18171
  loggedIn: !!loggedIn,
@@ -18122,10 +18180,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
18122
18180
  }
18123
18181
  }
18124
18182
  ),
18125
- monitor && monitor.activeTab === "favourites" && favouritesEnabled && favourites && /* @__PURE__ */ jsx150(FavouritesPanel, { controller: favourites.controller, ui, sport: favourites.sport, sports: favourites.sports, onSportChange: favourites.onSportChange }),
18126
- (!tabs || tabs.activeTab !== "games" && tabs.activeTab !== "favourites" && tabs.activeTab !== "builder") && /* @__PURE__ */ jsxs133(Fragment47, { children: [
18127
- /* @__PURE__ */ jsx150("div", { ref: limitRef, className: "ss-w-limit", role: "status", tabIndex: -1, children: state.limit ? limitText(state.limit, ui) : null }),
18128
- paused ? null : /* @__PURE__ */ jsx150(
18183
+ (!tabs || tabs.activeTab !== "games" && tabs.activeTab !== "builder") && /* @__PURE__ */ jsxs133(Fragment46, { children: [
18184
+ /* @__PURE__ */ jsx151("div", { ref: limitRef, className: "ss-w-limit", role: "status", tabIndex: -1, children: state.limit ? limitText(state.limit, ui) : null }),
18185
+ paused ? null : /* @__PURE__ */ jsx151(
18129
18186
  ChatInput,
18130
18187
  {
18131
18188
  ref: inputRef,
@@ -18139,14 +18196,15 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
18139
18196
  }
18140
18197
  )
18141
18198
  ] }),
18142
- settingsOpen && hasSettings ? /* @__PURE__ */ jsx150(SettingsSheet, { ui, onClose: closeSettings }) : null
18199
+ settingsOpen && hasSettings ? /* @__PURE__ */ jsx151(SettingsSheet, { ui, onClose: closeSettings }) : null,
18200
+ favouritesOpen && favourites ? /* @__PURE__ */ jsx151(FavouritesSheet, { ui, controller: favourites.controller, sport: favourites.sport, sports: favourites.sports, onSportChange: favourites.onSportChange, onClose: closeFavourites }) : null
18143
18201
  ] });
18144
18202
  }
18145
18203
 
18146
18204
  // src/components/HostEventsProvider.tsx
18147
- import { jsx as jsx151 } from "react/jsx-runtime";
18205
+ import { jsx as jsx152 } from "react/jsx-runtime";
18148
18206
  function HostEventsProvider({ value, children }) {
18149
- return /* @__PURE__ */ jsx151(SlipStateContext.Provider, { value: value.slipState, children });
18207
+ return /* @__PURE__ */ jsx152(SlipStateContext.Provider, { value: value.slipState, children });
18150
18208
  }
18151
18209
 
18152
18210
  // src/styles/css.generated.ts
@@ -19485,9 +19543,6 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
19485
19543
  /* The dot sits on the tab's corner and takes no width: a poll landing late must not push the last tab out of a strip that already fits to the pixel */
19486
19544
  .ss-w-tab { position: relative; }
19487
19545
  .ss-w-tab-dot { position: absolute; top: 4px; right: 2px; width: 6px; height: 6px; border-radius: 50%; background: var(--ss-w-neg); }
19488
- .ss-w-tab-star { display: none; font-size: 15px; line-height: 1; }
19489
- .ss-w-tab[data-compact] .ss-w-tab-star { display: inline; }
19490
- .ss-w-tab[data-compact] .ss-w-tab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
19491
19546
  .ss-w-sportchips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 3px; }
19492
19547
  .ss-w-sportchips::-webkit-scrollbar { display: none; }
19493
19548
  .ss-w-sportchip { display: inline-flex; align-items: center; gap: 5px; flex: none; min-height: 32px; padding: 4px 11px; font: inherit; font-size: 12.5px; font-weight: 620; white-space: nowrap; color: var(--ss-w-ink); background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 999px; cursor: pointer; }
@@ -19680,7 +19735,9 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
19680
19735
  }
19681
19736
  .ss-w-lg-showall { align-self: flex-start; min-height: 28px; background: none; border: none; font: inherit; font-size: 11px; font-weight: 700; color: var(--ss-w-faint); cursor: pointer; padding: 4px 2px 0; }
19682
19737
  .ss-w-lg-showall:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
19683
- .ss-w-fav { gap: 14px; }
19738
+ /* The sheet's body scrolls, so the panel inside is a plain column. A set height keeps the sheet still while search results come and go. */
19739
+ .ss-w-fav-sheet > .ss-w-tool { height: 85%; }
19740
+ .ss-w-fav { display: flex; flex-direction: column; gap: 14px; }
19684
19741
  .ss-w-fav-saved { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ss-w-faint); }
19685
19742
  .ss-w-fav-saved::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ss-w-accent); flex: none; }
19686
19743
  .ss-w-fav-saved--browser::before { background: var(--ss-w-warn); }
@@ -20945,7 +21002,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
20945
21002
  `;
20946
21003
 
20947
21004
  // src/StatsWidget.tsx
20948
- import { jsx as jsx152 } from "react/jsx-runtime";
21005
+ import { jsx as jsx153 } from "react/jsx-runtime";
20949
21006
  function buildClient(props) {
20950
21007
  try {
20951
21008
  if ("client" in props && props.client) {
@@ -21168,6 +21225,8 @@ function StatsWidget(props) {
21168
21225
  onChanged: discovery.refreshSchedule
21169
21226
  });
21170
21227
  const favouritesEnabled = hasFavouritesIdentity && favourites.status !== "refused";
21228
+ const [favouritesOpen, setFavouritesOpen] = useState81(false);
21229
+ if (!panelOpen && favouritesOpen) setFavouritesOpen(false);
21171
21230
  const getPricePresets = useCallback28(
21172
21231
  (locale) => built ? built.conversation.getPricePresets(locale, { pool: "open" }) : Promise.resolve(null),
21173
21232
  [built]
@@ -21290,17 +21349,17 @@ function StatsWidget(props) {
21290
21349
  const personalGreeting = useMemo13(() => ({
21291
21350
  favourites: favouritesEnabled && monitor.enabled ? favourites : null,
21292
21351
  conversation: built?.conversation ?? null,
21293
- openFavourites: () => monitor.setActiveTab("favourites"),
21294
- // Not before the club probe has answered: a club brand has no Favourites tab, and the invite must not appear and then go.
21295
- favouritesTab: favouritesEnabled && monitor.enabled && clubFixturesResult.settled && !clubFixturesResult.enabled,
21296
- // The tab is drawn, so a link to it opens it: the probe is out for at most CLUB_TAB_WAIT_MS before the tab shows.
21352
+ openFavourites: () => setFavouritesOpen(true),
21353
+ // Not before the club probe has answered: a club brand has no Favourites sheet, and the invite must not appear and then go.
21354
+ favouritesOffered: favouritesEnabled && monitor.enabled && clubFixturesResult.settled && !clubFixturesResult.enabled,
21355
+ // The sheet is offered, so a link to it opens it: the probe is out for at most CLUB_TAB_WAIT_MS before it is.
21297
21356
  favouritesReady: favouritesEnabled && monitor.enabled && clubFixturesResult.tabReady && !clubFixturesResult.enabled,
21298
21357
  holds,
21299
21358
  memory: builderMemory
21300
- }), [favouritesEnabled, monitor.enabled, clubFixturesResult.settled, clubFixturesResult.tabReady, clubFixturesResult.enabled, monitor.setActiveTab, favourites, built, holds, builderMemory]);
21359
+ }), [favouritesEnabled, monitor.enabled, clubFixturesResult.settled, clubFixturesResult.tabReady, clubFixturesResult.enabled, favourites, built, holds, builderMemory]);
21301
21360
  if (!built || widgetStrings.state === "unavailable") return null;
21302
21361
  const attrs = themeAttrs(ui, oddsSettings.userTheme);
21303
- return /* @__PURE__ */ jsx152(EventLogContext.Provider, { value: logger, children: /* @__PURE__ */ jsx152(TrackingContext.Provider, { value: track, children: /* @__PURE__ */ jsx152(SportScopeContext.Provider, { value: sportScope, children: /* @__PURE__ */ jsx152(OddsSettingsContext.Provider, { value: oddsSettings, children: /* @__PURE__ */ jsx152(HostEventsProvider, { value: hostEvents, children: /* @__PURE__ */ jsx152("div", { ref: rootRef, className: "ss-w-root", "data-ss-w-theme": attrs["data-ss-w-theme"], "data-ss-w-pos": attrs["data-ss-w-pos"], "data-ss-w-mobile": props.mobile ? "" : void 0, style: attrs.style, children: panelOpen ? /* @__PURE__ */ jsx152(PersonalGreetingContext.Provider, { value: personalGreeting, children: /* @__PURE__ */ jsx152(
21362
+ return /* @__PURE__ */ jsx153(EventLogContext.Provider, { value: logger, children: /* @__PURE__ */ jsx153(TrackingContext.Provider, { value: track, children: /* @__PURE__ */ jsx153(SportScopeContext.Provider, { value: sportScope, children: /* @__PURE__ */ jsx153(OddsSettingsContext.Provider, { value: oddsSettings, children: /* @__PURE__ */ jsx153(HostEventsProvider, { value: hostEvents, children: /* @__PURE__ */ jsx153("div", { ref: rootRef, className: "ss-w-root", "data-ss-w-theme": attrs["data-ss-w-theme"], "data-ss-w-pos": attrs["data-ss-w-pos"], "data-ss-w-mobile": props.mobile ? "" : void 0, style: attrs.style, children: panelOpen ? /* @__PURE__ */ jsx153(PersonalGreetingContext.Provider, { value: personalGreeting, children: /* @__PURE__ */ jsx153(
21304
21363
  ChatPanel,
21305
21364
  {
21306
21365
  controller,
@@ -21331,12 +21390,12 @@ function StatsWidget(props) {
21331
21390
  conversation: built?.conversation ?? null,
21332
21391
  presetGrid,
21333
21392
  favouritesEnabled: favouritesEnabled && clubFixturesResult.tabReady && !clubFixturesResult.enabled,
21334
- favourites: { controller: favourites, sport: favSport, sports: favSports, onSportChange: setFavSportPick },
21393
+ favourites: { controller: favourites, sport: favSport, sports: favSports, onSportChange: setFavSportPick, open: favouritesOpen, onOpenChange: setFavouritesOpen },
21335
21394
  builder: { options: builderOptions, sport: builderSport, onSportChange: setBuilderSportPick, onCoolOff: onBuilderCoolOff, tabs: monitor },
21336
21395
  onCloseRequested: mobile.onCloseRequested,
21337
21396
  onRegisterBack: mobile.onRegisterBack
21338
21397
  }
21339
- ) }) : props.mobile ? null : /* @__PURE__ */ jsx152(
21398
+ ) }) : props.mobile ? null : /* @__PURE__ */ jsx153(
21340
21399
  ChatFab,
21341
21400
  {
21342
21401
  label: stringsPending ? cfg?.launcherLabel : ui.launcherLabel,