@sensiblestats/widget-react 0.152.0 → 0.153.1

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.cjs CHANGED
@@ -39,7 +39,7 @@ module.exports = __toCommonJS(index_exports);
39
39
 
40
40
  // src/StatsWidget.tsx
41
41
  var import_react123 = require("react");
42
- var import_widget_sdk40 = require("@sensiblestats/widget-sdk");
42
+ var import_widget_sdk39 = require("@sensiblestats/widget-sdk");
43
43
 
44
44
  // src/strings/tag.ts
45
45
  function familyOf(tag2) {
@@ -574,6 +574,8 @@ var BUNDLED_EN_GB = {
574
574
  "widget.addAllPriceMoved": "All {count} added. A price changed, so the total changed too.",
575
575
  "widget.addAllPartial": "{added} of {total} added. Not added: {notAdded}",
576
576
  "widget.addAllPartial.pair": "{home} vs {away}",
577
+ "widget.v2GameTitle": "{home} v {away}",
578
+ "widget.v2GameTitle.away": "{away} at {home}",
577
579
  "widget.asOf": "Prices as of {time}",
578
580
  "widget.liveFactEarlier": "Earlier facts ({count})",
579
581
  "widget.liveFactKickoff": "Kick-off {price}",
@@ -609,7 +611,12 @@ var BUNDLED_EN_GB = {
609
611
  "widget.v2ChipBuildCombo": "Build a combo",
610
612
  "widget.v2AnotherMarketTitle": "Markets on this game",
611
613
  "widget.v2PriceGone": "This price is no longer on the board",
612
- "widget.v2CardLabel": "{home} v {away}, {market}",
614
+ "widget.v2CardLabel": "{game}, {market}",
615
+ "widget.v2PriceHint": "Tap a price to add it to your slip.",
616
+ "widget.v2KickoffLine": "{date}, {time}",
617
+ "widget.v2GameLine": "{game} \xB7 {time}",
618
+ "widget.v2ChangeMarket": "{market}, change market",
619
+ "widget.v2AddLabel": "Add to slip: {label}, {price}",
613
620
  "widget.v8PricesAsOf": "Prices as of {time}",
614
621
  "widget.v8InjuryAsOf": "as of {time}",
615
622
  "widget.v8PausedNext": "No priced games in this sport right now. Next games: {when}. Stats and questions still work.",
@@ -1089,6 +1096,15 @@ function legsLabel(table, n) {
1089
1096
  const key = LEG_COUNTS.includes(n) ? `widget.v8BuilderLegs.${n}` : "widget.v8BuilderLegs.other";
1090
1097
  return fill(text(table, key) ?? key, { n }, "und");
1091
1098
  }
1099
+ var UNFILLED = /\{\w+\}/;
1100
+ function translate(table, key, tokens, tag2) {
1101
+ const row = table[key];
1102
+ const own = row === void 0 ? void 0 : fill(row, tokens, tag2);
1103
+ if (own !== void 0 && !UNFILLED.test(own)) return own;
1104
+ const bundled = BUNDLED_EN_GB[key];
1105
+ if (bundled !== void 0) return fill(bundled, tokens, tag2);
1106
+ return own ?? key;
1107
+ }
1092
1108
  var nbsp = (s) => s.replace(/\s/g, "\xA0");
1093
1109
  var shortDate = (tag2, ms, opts) => nbsp(formatDate(ms, tag2, opts).replace("Sept", "Sep"));
1094
1110
  var signed = (line) => line.replace(/^-/, "\u2212");
@@ -1101,6 +1117,16 @@ var INTL_LEAVES = {
1101
1117
  "nba.lineText": (c) => (line) => signed(line).replace(".", decimalMark(c.tag)),
1102
1118
  "nba.formDay": (c) => (etDate, anchorEtDate) => formDay(etDate, anchorEtDate, c.tag),
1103
1119
  bettingKickoff: (c) => (kickoffUtc, now) => formatBettingKickoff(kickoffUtc, { today: c.t("widget.today"), tomorrow: c.t("widget.tomorrow") }, c.tag, c.clock, now, c.timeZone),
1120
+ v2KickoffLine: (c) => (kickoffUtc) => {
1121
+ const at2 = new Date(kickoffUtc);
1122
+ return c.t("widget.v2KickoffLine", {
1123
+ date: formatDate(at2, c.tag, { weekday: "short", day: "numeric", month: "short", timeZone: c.timeZone }),
1124
+ time: formatTime(at2, c.tag, c.clock, { timeZone: c.timeZone })
1125
+ });
1126
+ },
1127
+ v2GameLine: (c) => (game, kickoffUtc) => c.t("widget.v2GameLine", { game, time: formatTime(new Date(kickoffUtc), c.tag, c.clock, { timeZone: c.timeZone }) }),
1128
+ // The matchup the server words when it sends no title (a 0.152 server): an NBA game reads away at home, every other sport home v away.
1129
+ v2GameTitle: (c) => (home, away, sport) => c.t(sport === "nba" ? "widget.v2GameTitle.away" : "widget.v2GameTitle", { home, away }),
1104
1130
  v8FormResult: (c) => (result) => codeLabel(c.table, "result", result) ?? result
1105
1131
  };
1106
1132
  var pairs = (c, key, list) => list.map(([home, away]) => c.t(key, { home, away })).join(", ");
@@ -1171,7 +1197,9 @@ var ROW_LEAVES = {
1171
1197
  v8BuilderSwapLeg: (c) => (pair, market) => c.t("widget.v8BuilderSwapLeg", { pair, market }),
1172
1198
  v8BuilderSwap: (c) => (leg) => c.t("widget.v8BuilderSwap", { leg }),
1173
1199
  v8Follow: (c) => (name) => c.t("widget.v8Follow", { name }),
1174
- v2CardLabel: (c) => (home, away, market) => c.t("widget.v2CardLabel", { home, away, market }),
1200
+ v2CardLabel: (c) => (game, market) => c.t("widget.v2CardLabel", { game, market }),
1201
+ v2ChangeMarket: (c) => (market) => c.t("widget.v2ChangeMarket", { market }),
1202
+ v2AddLabel: (c) => (label, price) => c.t("widget.v2AddLabel", { label, price }),
1175
1203
  v8PricesAsOf: (c) => (time) => c.t("widget.v8PricesAsOf", { time }),
1176
1204
  v8InjuryAsOf: (c) => (time) => c.t("widget.v8InjuryAsOf", { time }),
1177
1205
  v8PausedNext: (c) => (when) => c.t("widget.v8PausedNext", { when }),
@@ -1317,18 +1345,21 @@ function setPath(root, path, value) {
1317
1345
  }
1318
1346
  node[parts2[parts2.length - 1]] = value;
1319
1347
  }
1320
- var ownedByLeaf = (key) => key.startsWith("widget.code.") || Object.keys(LEAVES).some((path) => key === `widget.${path}` || key.startsWith(`widget.${path}.`));
1348
+ var RETIRED_ROWS = /* @__PURE__ */ new Set(["widget.v2ChipAnotherMarket", "widget.v2ChipBuildCombo", "widget.v2AnotherMarketTitle"]);
1349
+ var ownedByLeaf = (key) => RETIRED_ROWS.has(key) || key.startsWith("widget.code.") || Object.keys(LEAVES).some((path) => key === `widget.${path}` || key.startsWith(`widget.${path}.`));
1321
1350
  function buildLocaleStrings(table, tag2, clock3 = "24h", timeZone) {
1322
1351
  const root = {};
1323
- for (const [key, row] of Object.entries(table)) {
1324
- if (key.startsWith("widget.") && typeof row === "string" && !ownedByLeaf(key)) setPath(root, key.slice("widget.".length), row);
1352
+ for (const rows of [BUNDLED_EN_GB, table]) {
1353
+ for (const [key, row] of Object.entries(rows)) {
1354
+ if (key.startsWith("widget.") && typeof row === "string" && !ownedByLeaf(key)) setPath(root, key.slice("widget.".length), row);
1355
+ }
1325
1356
  }
1326
1357
  const ctx = {
1327
1358
  tag: tag2,
1328
1359
  clock: clock3,
1329
1360
  timeZone,
1330
1361
  table,
1331
- t: (key, tokens = {}) => fill(table[key] ?? key, tokens, tag2)
1362
+ t: (key, tokens = {}) => translate(table, key, tokens, tag2)
1332
1363
  };
1333
1364
  for (const [path, make] of Object.entries(LEAVES)) setPath(root, path, make(ctx));
1334
1365
  for (const [path, set, codes] of CODE_LEAVES) {
@@ -1386,7 +1417,7 @@ function parseCustomTotal(text2, format2) {
1386
1417
  }
1387
1418
 
1388
1419
  // src/version.generated.ts
1389
- var WIDGET_REACT_VERSION = "0.152.0";
1420
+ var WIDGET_REACT_VERSION = "0.153.1";
1390
1421
 
1391
1422
  // src/config.ts
1392
1423
  function hostTag(cfg) {
@@ -1679,10 +1710,13 @@ function normalizeUi(cfg, loaded) {
1679
1710
  favError: strings.favError,
1680
1711
  v8Follow: strings.v8Follow,
1681
1712
  v2ChipLive: strings.v2ChipLive,
1682
- v2ChipAnotherMarket: strings.v2ChipAnotherMarket,
1683
- v2ChipBuildCombo: strings.v2ChipBuildCombo,
1684
- v2AnotherMarketTitle: strings.v2AnotherMarketTitle,
1685
1713
  v2PriceGone: strings.v2PriceGone,
1714
+ v2PriceHint: strings.v2PriceHint,
1715
+ v2KickoffLine: strings.v2KickoffLine,
1716
+ v2GameLine: strings.v2GameLine,
1717
+ v2GameTitle: strings.v2GameTitle,
1718
+ v2ChangeMarket: strings.v2ChangeMarket,
1719
+ v2AddLabel: strings.v2AddLabel,
1686
1720
  v2CardLabel: strings.v2CardLabel,
1687
1721
  v8NotForMe: strings.v8NotForMe,
1688
1722
  v8Since: strings.v8Since,
@@ -2636,6 +2670,10 @@ function slipKey(ref) {
2636
2670
  function sameLeg(a, b) {
2637
2671
  return a.matchOddsId === b.matchOddsId && (0, import_widget_sdk2.sportOf)(a.sport) === (0, import_widget_sdk2.sportOf)(b.sport);
2638
2672
  }
2673
+ function slipSportOfWire(sport) {
2674
+ const hit = Object.entries(import_widget_sdk2.SPORTS).find(([, spec]) => spec.wireKey === sport);
2675
+ return hit ? hit[0] : void 0;
2676
+ }
2639
2677
 
2640
2678
  // src/monitorMatch.ts
2641
2679
  var import_widget_sdk3 = require("@sensiblestats/widget-sdk");
@@ -3198,6 +3236,42 @@ function createDashboardTapSignal(sendSignal, log) {
3198
3236
  }
3199
3237
 
3200
3238
  // src/theme.ts
3239
+ var PILL_MIX = 72;
3240
+ var LIGHT_PANEL = "#ffffff";
3241
+ var DARK_PANEL = "#141b24";
3242
+ var DARK_INK = "#06231a";
3243
+ var DEFAULT_ACCENT = { light: "#17936a", dark: "#37c891" };
3244
+ function rgb(hex) {
3245
+ const m = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(hex.trim());
3246
+ if (!m) return null;
3247
+ const raw = m[1] ?? "";
3248
+ const h = raw.length === 3 ? raw.replace(/./g, (c) => c + c) : raw;
3249
+ return [0, 2, 4].map((i) => parseInt(h.slice(i, i + 2), 16));
3250
+ }
3251
+ function luminance(c) {
3252
+ const [r, g, b] = c.map((v) => {
3253
+ const x = v / 255;
3254
+ return x <= 0.03928 ? x / 12.92 : ((x + 0.055) / 1.055) ** 2.4;
3255
+ });
3256
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b;
3257
+ }
3258
+ function contrast(a, b) {
3259
+ const la = luminance(rgb(a) ?? [0, 0, 0]);
3260
+ const lb = luminance(rgb(b) ?? [0, 0, 0]);
3261
+ return (Math.max(la, lb) + 0.05) / (Math.min(la, lb) + 0.05);
3262
+ }
3263
+ var toHex = (c) => "#" + c.map((v) => Math.round(v).toString(16).padStart(2, "0")).join("");
3264
+ function pillFor(accent, panel, theme) {
3265
+ const base = rgb(accent ?? "") ?? rgb(DEFAULT_ACCENT[theme]);
3266
+ const lightPanel = luminance(rgb(panel) ?? [255, 255, 255]) >= 0.18;
3267
+ const ink = lightPanel ? "#ffffff" : DARK_INK;
3268
+ for (let pct2 = lightPanel ? PILL_MIX : 100; pct2 > 0; pct2 -= 5) {
3269
+ const k = pct2 / 100;
3270
+ const pill = toHex(base.map((v) => lightPanel ? v * k : v * k + 255 * (1 - k)));
3271
+ if (contrast(pill, ink) >= 4.5 && contrast(pill, panel) >= 3) return { pill, ink };
3272
+ }
3273
+ return { pill: lightPanel ? "#000000" : "#ffffff", ink };
3274
+ }
3201
3275
  function themeAttrs(ui, userTheme) {
3202
3276
  const style = {
3203
3277
  "--ss-w-offset-x": `${ui.offset.x}px`,
@@ -3213,6 +3287,15 @@ function themeAttrs(ui, userTheme) {
3213
3287
  style["--ss-w-line"] = "color-mix(in srgb, var(--ss-w-ink) 12%, var(--ss-w-panel))";
3214
3288
  style["--ss-w-faint"] = "color-mix(in srgb, var(--ss-w-ink) 55%, var(--ss-w-panel))";
3215
3289
  }
3290
+ if (ui.accent || ui.surface) {
3291
+ const surface = ui.surface && rgb(ui.surface) ? ui.surface : void 0;
3292
+ const light = pillFor(ui.accent, surface ?? LIGHT_PANEL, "light");
3293
+ const dark = pillFor(ui.accent, surface ?? DARK_PANEL, "dark");
3294
+ style["--ss-w-pill-light"] = light.pill;
3295
+ style["--ss-w-on-pill-light"] = light.ink;
3296
+ style["--ss-w-pill-dark"] = dark.pill;
3297
+ style["--ss-w-on-pill-dark"] = dark.ink;
3298
+ }
3216
3299
  const theme = ui.surface || ui.ink ? ui.theme : userTheme ?? ui.theme;
3217
3300
  return { "data-ss-w-theme": theme, "data-ss-w-pos": ui.position, style };
3218
3301
  }
@@ -5716,7 +5799,7 @@ function useFavourites({ conversation, sport, operatorUserId, anonymousUserId, e
5716
5799
  }
5717
5800
 
5718
5801
  // src/components/dashboard/GreetingDashboard.tsx
5719
- var import_react50 = require("react");
5802
+ var import_react51 = require("react");
5720
5803
 
5721
5804
  // src/eventLogContext.ts
5722
5805
  var import_react18 = require("react");
@@ -5763,7 +5846,8 @@ function sendGreetingOnce(log, owner, meta, surface) {
5763
5846
  matchStep: meta.matchStep,
5764
5847
  matchId: meta.matchId ?? null,
5765
5848
  competitionId: meta.competitionId ?? null,
5766
- chooserShown: meta.chooserShown
5849
+ // The canvas greeting draws no chooser, whatever an older server reports.
5850
+ chooserShown: false
5767
5851
  }
5768
5852
  });
5769
5853
  log({
@@ -5973,7 +6057,7 @@ function SportSwitch({ sports, selected, onSelect, liveLabel: liveLabel3, groupL
5973
6057
  }
5974
6058
 
5975
6059
  // src/components/dashboard/v2/MarketFirstGreeting.tsx
5976
- var import_react34 = require("react");
6060
+ var import_react36 = require("react");
5977
6061
 
5978
6062
  // src/useFeaturedHighlight.ts
5979
6063
  var import_react22 = require("react");
@@ -6034,7 +6118,102 @@ function SinceLines({ since, ui }) {
6034
6118
  }
6035
6119
 
6036
6120
  // src/components/dashboard/v2/FeaturedCard.tsx
6037
- var import_react27 = require("react");
6121
+ var import_react31 = require("react");
6122
+
6123
+ // src/components/PinToggle.tsx
6124
+ var import_react26 = require("react");
6125
+ var import_widget_sdk16 = require("@sensiblestats/widget-sdk");
6126
+
6127
+ // src/components/Toast.tsx
6128
+ var import_react25 = require("react");
6129
+ var import_jsx_runtime6 = require("react/jsx-runtime");
6130
+ var DISMISS_MS = 4e3;
6131
+ function Toast({ toast, onDismiss }) {
6132
+ (0, import_react25.useEffect)(() => {
6133
+ if (!toast) return;
6134
+ const timer = setTimeout(onDismiss, DISMISS_MS);
6135
+ return () => clearTimeout(timer);
6136
+ }, [toast, onDismiss]);
6137
+ if (!toast) return null;
6138
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: `ss-w-toast ss-w-toast-${toast.kind}`, role: "status", "aria-live": "polite", children: toast.text });
6139
+ }
6140
+
6141
+ // src/components/PinToggle.tsx
6142
+ var import_jsx_runtime7 = require("react/jsx-runtime");
6143
+ var PIN_GLYPHS = {
6144
+ pin: { viewBox: "0 0 24 24", strokeWidth: 1.4, transform: "scale(1.5)", d: "M9.5 1.5 14.5 6.5 13 8l-.5-.5-3 3 .3 2.2-1.4 1.4L5.6 11.3l-3.3 3.3-1-1 3.3-3.3L1.9 7.5l1.4-1.4 2.2.3 3-3L8 2.9z" },
6145
+ star: { viewBox: "0 0 24 24", strokeWidth: 2, d: "M12 2.5l2.9 5.9 6.5.95-4.7 4.58 1.1 6.47L12 17.35 6.1 20.4l1.1-6.47L2.5 9.35l6.5-.95z" },
6146
+ bookmark: { viewBox: "0 0 24 24", strokeWidth: 2, d: "M7 3h10a1.5 1.5 0 0 1 1.5 1.5V21l-6.5-3.6L5.5 21V4.5A1.5 1.5 0 0 1 7 3z" }
6147
+ };
6148
+ function PinToggle({ pin, monitor, ui, market }) {
6149
+ const [toast, setToast] = (0, import_react26.useState)(null);
6150
+ const dismiss = (0, import_react26.useCallback)(() => setToast(null), []);
6151
+ const log = useEventLog();
6152
+ if (!monitor || !monitor.enabled) return null;
6153
+ const key = pinKey(pin);
6154
+ const wireSport = (0, import_widget_sdk16.toWireSport)(pin.sport);
6155
+ const sportField = wireSport ? { sport: wireSport } : {};
6156
+ const pinned = monitor.isPinned(key);
6157
+ const labels = pin.kind === "match" ? { pin: ui.matchPinLabel, unpin: ui.matchUnpinLabel } : { pin: ui.pinLabel, unpin: ui.unpinLabel };
6158
+ const onClick = (e) => {
6159
+ e.stopPropagation();
6160
+ if (pin.kind === "match" && !monitor.isPinned(key)) {
6161
+ const result2 = monitor.pinMatch({ matchId: pin.matchId, marketDeveloperName: market, sport: pin.sport, ...pin.tour ? { tour: pin.tour } : {} });
6162
+ if (result2 === "added") {
6163
+ log?.log({
6164
+ name: "pin_add",
6165
+ entityType: "match",
6166
+ entityId: (0, import_widget_sdk16.qualifiedId)(pin.sport, "game", (0, import_widget_sdk16.localIdOf)(pin.sport, pin.matchId, pin.tour)),
6167
+ marketDeveloperName: pin.marketDeveloperName,
6168
+ ...sportField
6169
+ });
6170
+ } else if (result2 === "match_limit") {
6171
+ setToast({ kind: "error", text: ui.matchLimitToast });
6172
+ }
6173
+ return;
6174
+ }
6175
+ const result = monitor.togglePin({ ...pin, key });
6176
+ if ((result === "added" || result === "removed") && (pin.kind === "match" || pin.marketDeveloperName !== void 0)) {
6177
+ log?.log({
6178
+ name: result === "added" ? "pin_add" : "pin_remove",
6179
+ entityType: pin.kind === "match" ? "match" : "market",
6180
+ entityId: pin.kind === "match" ? (0, import_widget_sdk16.qualifiedId)(pin.sport, "game", (0, import_widget_sdk16.localIdOf)(pin.sport, pin.matchId, pin.tour)) : (0, import_widget_sdk16.qualifiedId)(pin.sport, "market", pin.marketDeveloperName),
6181
+ marketDeveloperName: pin.marketDeveloperName,
6182
+ ...sportField
6183
+ });
6184
+ } else if (result === "market_limit") {
6185
+ setToast({ kind: "error", text: ui.marketLimitToast });
6186
+ }
6187
+ };
6188
+ const glyph = PIN_GLYPHS[ui.pinIcon];
6189
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "ss-w-pin-wrap", children: [
6190
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
6191
+ "button",
6192
+ {
6193
+ type: "button",
6194
+ className: "ss-w-pin",
6195
+ "data-on": pinned || void 0,
6196
+ "data-icon": ui.pinIcon,
6197
+ "aria-pressed": pinned,
6198
+ "aria-label": pinned ? labels.unpin : labels.pin,
6199
+ onClick,
6200
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("svg", { viewBox: glyph.viewBox, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
6201
+ "path",
6202
+ {
6203
+ transform: glyph.transform,
6204
+ d: glyph.d,
6205
+ fill: pinned ? "currentColor" : "none",
6206
+ stroke: pinned ? "none" : "currentColor",
6207
+ strokeWidth: glyph.strokeWidth,
6208
+ strokeLinejoin: "round",
6209
+ strokeLinecap: "round"
6210
+ }
6211
+ ) })
6212
+ }
6213
+ ),
6214
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Toast, { toast, onDismiss: dismiss })
6215
+ ] });
6216
+ }
6038
6217
 
6039
6218
  // src/components/dashboard/v8/kickoffText.ts
6040
6219
  var ISO_INSTANT = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:?\d{2})$/;
@@ -6052,40 +6231,68 @@ function kickoffText(ui, iso) {
6052
6231
  return `${k.dayLabel} ${k.time}`;
6053
6232
  }
6054
6233
 
6234
+ // src/components/dashboard/v2/MarketPicker.tsx
6235
+ var import_jsx_runtime8 = require("react/jsx-runtime");
6236
+ function MarketMenu({ markets, current, label, onPick }) {
6237
+ if (markets.length === 0) return null;
6238
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("ul", { className: "ss-w-v2-menu ss-w-v2-picker-list", "aria-label": label, children: markets.map((m) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "ss-w-v2-picker-row", "aria-current": m.market === current ? "true" : void 0, onClick: () => onPick(m), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "ss-w-v2-market", children: m.marketLabel }) }) }, m.market)) });
6239
+ }
6240
+
6241
+ // src/components/dashboard/v2/MarketRows.tsx
6242
+ var import_react30 = require("react");
6243
+
6055
6244
  // src/components/dashboard/v2/Price.tsx
6056
- var import_react26 = require("react");
6245
+ var import_react29 = require("react");
6057
6246
 
6058
- // src/components/Toast.tsx
6059
- var import_react25 = require("react");
6060
- var import_jsx_runtime6 = require("react/jsx-runtime");
6061
- var DISMISS_MS = 4e3;
6062
- function Toast({ toast, onDismiss }) {
6063
- (0, import_react25.useEffect)(() => {
6064
- if (!toast) return;
6065
- const timer = setTimeout(onDismiss, DISMISS_MS);
6066
- return () => clearTimeout(timer);
6067
- }, [toast, onDismiss]);
6068
- if (!toast) return null;
6069
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: `ss-w-toast ss-w-toast-${toast.kind}`, role: "status", "aria-live": "polite", children: toast.text });
6247
+ // src/slipSettled.ts
6248
+ var import_react28 = require("react");
6249
+
6250
+ // src/slipStateContext.ts
6251
+ var import_react27 = require("react");
6252
+ var SlipStateContext = (0, import_react27.createContext)(null);
6253
+ function useSlipState() {
6254
+ return (0, import_react27.useContext)(SlipStateContext);
6255
+ }
6256
+
6257
+ // src/slipSettled.ts
6258
+ function useSettledMarks() {
6259
+ const slipState = useSlipState();
6260
+ const [local, setLocal] = (0, import_react28.useState)({});
6261
+ const localSettle = (0, import_react28.useCallback)((key) => setLocal((prev) => prev[key] ? prev : { ...prev, [key]: true }), []);
6262
+ return slipState ? { isSettled: (key) => !!slipState.settled[key], settle: slipState.settle } : { isSettled: (key) => !!local[key], settle: localSettle };
6070
6263
  }
6071
6264
 
6072
6265
  // src/components/dashboard/v2/Price.tsx
6073
- var import_jsx_runtime7 = require("react/jsx-runtime");
6266
+ var import_jsx_runtime9 = require("react/jsx-runtime");
6074
6267
  function logRowTap(events, slot) {
6075
6268
  return (e) => {
6076
- if (e.target instanceof Element && e.target.closest(".ss-w-v2-star")) return;
6269
+ if (e.target instanceof Element && e.target.closest(".ss-w-pin, .ss-w-v2-mkt, .ss-w-v2-menu")) return;
6077
6270
  events?.cardTap(slot);
6078
6271
  };
6079
6272
  }
6080
- function PriceButtons({ selections, ui, onAdd }) {
6273
+ function DonePill({ text: text2 }) {
6274
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "ss-w-pill ss-w-pill--done", children: [
6275
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M5 12.5l4.5 4.5L19 7.5" }) }),
6276
+ text2
6277
+ ] });
6278
+ }
6279
+ function Pill({ price }) {
6280
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "ss-w-pill", children: [
6281
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M12 5v14M5 12h14" }) }),
6282
+ price
6283
+ ] });
6284
+ }
6285
+ function PriceButtons({ selections, ui, onAdd, rowLabel, sport }) {
6081
6286
  const { oddsFormat } = useOddsSettings();
6082
- const [busy, setBusy] = (0, import_react26.useState)(/* @__PURE__ */ new Set());
6083
- const [goneFor, setGoneFor] = (0, import_react26.useState)(null);
6084
- const [toast, setToast] = (0, import_react26.useState)(null);
6085
- const dismiss = (0, import_react26.useCallback)(() => setToast(null), []);
6086
- const inFlight2 = (0, import_react26.useRef)(/* @__PURE__ */ new Set());
6287
+ const marks = useSettledMarks();
6288
+ const keyOf4 = (s) => slipKey({ matchOddsId: s.matchOddsId, sport: slipSportOfWire(sport) });
6289
+ const [busy, setBusy] = (0, import_react29.useState)(/* @__PURE__ */ new Set());
6290
+ const [goneFor, setGoneFor] = (0, import_react29.useState)(null);
6291
+ const [toast, setToast] = (0, import_react29.useState)(null);
6292
+ const dismiss = (0, import_react29.useCallback)(() => setToast(null), []);
6293
+ const inFlight2 = (0, import_react29.useRef)(/* @__PURE__ */ new Set());
6087
6294
  const tap = async (s) => {
6088
- if (!onAdd || inFlight2.current.has(s.matchOddsId)) return;
6295
+ if (!onAdd || inFlight2.current.has(s.matchOddsId) || marks.isSettled(keyOf4(s))) return;
6089
6296
  inFlight2.current.add(s.matchOddsId);
6090
6297
  setBusy(new Set(inFlight2.current));
6091
6298
  setGoneFor(null);
@@ -6097,138 +6304,110 @@ function PriceButtons({ selections, ui, onAdd }) {
6097
6304
  inFlight2.current.delete(s.matchOddsId);
6098
6305
  setBusy(new Set(inFlight2.current));
6099
6306
  }
6307
+ if (result.outcome === "added") marks.settle(keyOf4(s));
6100
6308
  if (result.outcome === "gone") setGoneFor(selections);
6101
6309
  if (result.toast) setToast({ toast: result.toast, for: selections });
6102
6310
  };
6103
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
6104
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "ss-w-v2-prices", children: selections.map((s) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "ss-w-slip-btn ss-w-slip-btn--price", disabled: busy.has(s.matchOddsId), onClick: onAdd ? () => {
6105
- void tap(s);
6106
- } : void 0, children: [
6107
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "ss-w-mol-lab", children: s.label }),
6108
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "ss-w-mol-tick", children: formatOdds(s.formats, oddsFormat) })
6109
- ] }, s.matchOddsId)) }),
6110
- goneFor === selections ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "ss-w-v2-gone", role: "status", children: ui.v2PriceGone }) : null,
6111
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Toast, { toast: toast?.for === selections ? toast.toast : null, onDismiss: dismiss })
6311
+ const asRow = selections.length === 1 || rowLabel !== void 0;
6312
+ const buttons = selections.map((s) => {
6313
+ const label = asRow ? rowLabel ?? s.label : s.label;
6314
+ const price = formatOdds(s.formats, oddsFormat);
6315
+ const done = marks.isSettled(keyOf4(s));
6316
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
6317
+ "button",
6318
+ {
6319
+ type: "button",
6320
+ className: asRow ? "ss-w-v2-row" : "ss-w-v2-tile",
6321
+ "aria-label": done ? `${label}, ${ui.inSlip}` : ui.v2AddLabel(label, price),
6322
+ "data-settled": done || void 0,
6323
+ "aria-disabled": done || void 0,
6324
+ disabled: busy.has(s.matchOddsId) || done,
6325
+ onClick: onAdd && !done ? () => {
6326
+ void tap(s);
6327
+ } : void 0,
6328
+ children: [
6329
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: label }),
6330
+ done ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DonePill, { text: ui.inSlip }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Pill, { price })
6331
+ ]
6332
+ },
6333
+ s.matchOddsId
6334
+ );
6335
+ });
6336
+ if (selections.length === 0) return null;
6337
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
6338
+ asRow ? buttons : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "ss-w-v2-tiles", "data-count": Math.min(selections.length, 3), children: buttons }),
6339
+ goneFor === selections ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "ss-w-v2-gone", role: "status", children: ui.v2PriceGone }) : null,
6340
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Toast, { toast: toast?.for === selections ? toast.toast : null, onDismiss: dismiss })
6112
6341
  ] });
6113
6342
  }
6114
6343
 
6344
+ // src/components/dashboard/v2/MarketRows.tsx
6345
+ var import_jsx_runtime10 = require("react/jsx-runtime");
6346
+ var FACT_KEY = { GOALS_OVER_UNDER: "goals", BOTH_TEAMS_TO_SCORE: "btts", FULLTIME_RESULT: "result" };
6347
+ function FactRowView({ row, ui, matchId, add, lead, sport }) {
6348
+ const events = (0, import_react30.useContext)(GreetingEventsContext);
6349
+ const hook = lead ? events?.hook : { kind: "fact", factKey: FACT_KEY[row.market] ?? row.market };
6350
+ const selections = (0, import_react30.useMemo)(() => [row.selection], [row.selection]);
6351
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "ss-w-v2-fact", children: [
6352
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { children: row.stat }),
6353
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PriceButtons, { selections, ui, rowLabel: row.label, sport, onAdd: add ? (s) => add(matchId, row.market, s, hook) : void 0 })
6354
+ ] });
6355
+ }
6356
+ function FactRows({ rows, hide, ui, matchId, add, lead = false, sport }) {
6357
+ const shown2 = rows.filter((r) => r.market !== hide);
6358
+ if (shown2.length === 0) return null;
6359
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children: shown2.map((r) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FactRowView, { row: r, ui, matchId, add, lead, sport }, `${r.market}:${r.selection.matchOddsId}`)) });
6360
+ }
6361
+
6115
6362
  // src/components/dashboard/v2/FeaturedCard.tsx
6116
- var import_jsx_runtime8 = require("react/jsx-runtime");
6117
- function Star({ team, ui }) {
6118
- const controller = usePersonalGreeting()?.favourites;
6119
- if (!controller || controller.status !== "ready") return null;
6120
- const on = controller.isStarred("team", team.id);
6121
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "ss-w-v2-star", "aria-label": ui.v8Follow(team.label), "aria-pressed": on, onClick: () => {
6122
- void controller.toggle("team", team.id);
6123
- }, children: on ? "\u2605" : "\u2606" });
6124
- }
6125
- function FeaturedCard({ card, ui, tag: tag2, highlighted = false, add }) {
6126
- const events = (0, import_react27.useContext)(GreetingEventsContext);
6127
- const sub = [kickoffText(ui, card.startsAtUtc), card.competition].filter(Boolean).join(" \xB7 ");
6128
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
6363
+ var import_jsx_runtime11 = require("react/jsx-runtime");
6364
+ function FeaturedCard({ card, ui, tag: tag2, sport, open, onToggleMenu, onPick, picked, highlighted = false, add }) {
6365
+ const events = (0, import_react31.useContext)(GreetingEventsContext);
6366
+ const monitor = usePersonalGreeting()?.monitor;
6367
+ const title = card.title ?? ui.v2GameTitle(card.home.label, card.away.label, sport);
6368
+ const meta = [instantMs(card.startsAtUtc) === null ? null : ui.v2KickoffLine(card.startsAtUtc), card.competition].filter(Boolean).join(" \xB7 ");
6369
+ const markets = card.markets ?? [];
6370
+ const label = ui.v2CardLabel(title, card.marketLabel);
6371
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
6129
6372
  "article",
6130
6373
  {
6131
6374
  className: "ss-w-v8-card ss-w-v2-featured",
6132
6375
  "data-match-id": card.matchId,
6133
6376
  "data-highlight": highlighted ? "true" : void 0,
6134
- "aria-label": ui.v2CardLabel(card.home.label, card.away.label, card.marketLabel),
6377
+ "aria-label": label,
6135
6378
  onClickCapture: logRowTap(events, 0),
6136
6379
  children: [
6137
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("header", { className: "ss-w-v8-card-head", children: [
6138
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("b", { className: "ss-w-v8-card-name ss-w-v2-teams", children: [
6139
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "ss-w-v2-team", children: [
6140
- card.home.label,
6141
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Star, { team: card.home, ui })
6142
- ] }),
6143
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "ss-w-v2-team", children: [
6144
- card.away.label,
6145
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Star, { team: card.away, ui })
6146
- ] })
6147
- ] }),
6148
- sub ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "ss-w-v8-card-sub", children: sub }) : null
6380
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "ss-w-v2-head", children: [
6381
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h3", { className: "ss-w-v2-title", children: title }),
6382
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PinToggle, { ui, monitor, market: card.market, pin: { kind: "match", matchId: Number(card.matchId), ...sport === "nba" ? { sport: "basketball" } : {} } })
6149
6383
  ] }),
6150
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "ss-w-v2-head", children: [
6151
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "ss-w-v2-market", children: card.marketLabel }),
6152
- card.yourMarket ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "ss-w-v2-tag", children: tag2 }) : null
6384
+ meta ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "ss-w-v2-meta", children: meta }) : null,
6385
+ card.hook ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FactRows, { rows: [card.hook], hide: picked, ui, matchId: card.matchId, add, lead: true, sport }) : null,
6386
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "ss-w-v2-head", children: [
6387
+ markets.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("button", { type: "button", className: "ss-w-v2-mkt", "aria-label": ui.v2ChangeMarket(card.marketLabel), "aria-expanded": open, onClick: onToggleMenu, children: [
6388
+ card.marketLabel,
6389
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { viewBox: "0 0 24 24", width: "14", height: "14", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M6 9l6 6 6-6", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
6390
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ss-w-v2-mkt", children: card.marketLabel }),
6391
+ card.yourMarket ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ss-w-v2-tag", children: tag2 }) : null
6153
6392
  ] }),
6154
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PriceButtons, { selections: card.selections, ui, onAdd: add ? (s) => add(card.matchId, card.market, s, events?.hook) : void 0 }),
6155
- card.stat ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "ss-w-v2-stat", children: card.stat }) : null
6393
+ open ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(MarketMenu, { markets, current: card.market, label: ui.v2ChangeMarket(card.marketLabel), onPick }) : null,
6394
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PriceButtons, { selections: card.selections, ui, sport, onAdd: add ? (s) => add(card.matchId, card.market, s, events?.hook) : void 0 }),
6395
+ add ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "ss-w-v2-hint", children: ui.v2PriceHint }) : null,
6396
+ card.stat ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "ss-w-v2-stat", children: card.stat }) : null,
6397
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FactRows, { rows: card.facts ?? [], hide: picked, ui, matchId: card.matchId, add, sport })
6156
6398
  ]
6157
6399
  }
6158
6400
  );
6159
6401
  }
6160
6402
 
6161
- // src/components/dashboard/v2/MarketPicker.tsx
6162
- var import_jsx_runtime9 = require("react/jsx-runtime");
6163
- function MarketPicker({ markets, current, title, onPick }) {
6164
- const { oddsFormat } = useOddsSettings();
6165
- if (markets.length === 0) return null;
6166
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: "ss-w-v8-sec ss-w-v2-picker", "aria-label": title, children: [
6167
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h3", { className: "ss-w-v2-picker-title", children: title }),
6168
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("ul", { className: "ss-w-v2-picker-list", children: markets.map((m) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { type: "button", className: "ss-w-v2-picker-row", "aria-current": m.market === current ? "true" : void 0, onClick: () => onPick(m), children: [
6169
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "ss-w-v2-market", children: m.marketLabel }),
6170
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "ss-w-v2-picker-prices", children: m.selections.map((s) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "ss-w-v2-picker-price", children: [
6171
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "ss-w-mol-lab", children: s.label }),
6172
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "ss-w-mol-tick", children: formatOdds(s.formats, oddsFormat) })
6173
- ] }, s.matchOddsId)) })
6174
- ] }) }, m.market)) })
6175
- ] });
6176
- }
6177
-
6178
- // src/components/dashboard/v2/MarketRows.tsx
6179
- var import_react28 = require("react");
6180
- var import_jsx_runtime10 = require("react/jsx-runtime");
6181
- function StripRows({ rows, tag: tag2, ui, slotBase, matchId, hide, add }) {
6182
- const events = (0, import_react28.useContext)(GreetingEventsContext);
6183
- if (rows.length === 0) return null;
6184
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("section", { className: "ss-w-v8-sec ss-w-v2-strip", children: rows.map((r, i) => r.market === hide ? null : /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("article", { className: "ss-w-v8-card ss-w-v2-strip-row", onClickCapture: logRowTap(events, slotBase + i), children: [
6185
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "ss-w-v2-head", children: [
6186
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "ss-w-v2-market", children: r.marketLabel }),
6187
- r.yourMarket ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "ss-w-v2-tag", children: tag2 }) : null
6188
- ] }),
6189
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PriceButtons, { selections: r.selections, ui, onAdd: add ? (s) => add(matchId, r.market, s) : void 0 }),
6190
- r.stat ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "ss-w-v2-stat", children: r.stat }) : null
6191
- ] }, `${r.market}:${i}`)) });
6192
- }
6193
- function AlternativeRows({ rows, market, marketLabel, ui, slotBase, add }) {
6194
- const events = (0, import_react28.useContext)(GreetingEventsContext);
6195
- if (rows.length === 0) return null;
6196
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("section", { className: "ss-w-v8-sec ss-w-v2-alts", children: rows.map((r, i) => {
6197
- const sub = [kickoffText(ui, r.startsAtUtc), r.competition].filter(Boolean).join(" \xB7 ");
6198
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
6199
- "article",
6200
- {
6201
- className: "ss-w-v8-card ss-w-v2-alt-row",
6202
- "data-match-id": r.matchId,
6203
- "aria-label": ui.v2CardLabel(r.home, r.away, r.marketLabel ?? marketLabel),
6204
- onClickCapture: logRowTap(events, slotBase + i),
6205
- children: [
6206
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("header", { className: "ss-w-v8-card-head", children: [
6207
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("b", { className: "ss-w-v8-card-name", children: [
6208
- r.home,
6209
- " - ",
6210
- r.away
6211
- ] }),
6212
- sub ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "ss-w-v8-card-sub", children: sub }) : null
6213
- ] }),
6214
- r.marketLabel ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "ss-w-v2-head", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "ss-w-v2-market", children: r.marketLabel }) }) : null,
6215
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PriceButtons, { selections: r.selections, ui, onAdd: add ? (s) => add(r.matchId, market, s) : void 0 }),
6216
- r.stat ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "ss-w-v2-stat", children: r.stat }) : null
6217
- ]
6218
- },
6219
- `${r.matchId}:${i}`
6220
- );
6221
- }) });
6222
- }
6223
-
6224
6403
  // src/components/dashboard/v2/useRepriceAdd.ts
6225
- var import_react33 = require("react");
6404
+ var import_react35 = require("react");
6226
6405
 
6227
6406
  // src/nflKickoff.ts
6228
- var import_react29 = require("react");
6229
- var import_widget_sdk16 = require("@sensiblestats/widget-sdk");
6407
+ var import_react32 = require("react");
6408
+ var import_widget_sdk17 = require("@sensiblestats/widget-sdk");
6230
6409
  var MAX_TIMEOUT_MS = 2147483647;
6231
- var isNfl = (sport) => (0, import_widget_sdk16.sportOf)(sport) === "americanfootball";
6410
+ var isNfl = (sport) => (0, import_widget_sdk17.sportOf)(sport) === "americanfootball";
6232
6411
  var nflStarted = (vm, nowMs) => isNfl(vm.sport) && !(vm.kickoffUtc != null && Date.parse(vm.kickoffUtc) > nowMs);
6233
6412
  function guardNflKickoff(slip, vm, ui) {
6234
6413
  const host = slip.onAddToSlip;
@@ -6253,9 +6432,9 @@ function guardLegsPreMatch(slip, legs, ui) {
6253
6432
  };
6254
6433
  }
6255
6434
  function useNextKickoffRender(kickoffs) {
6256
- const [tick, setTick] = (0, import_react29.useState)(0);
6435
+ const [tick, setTick] = (0, import_react32.useState)(0);
6257
6436
  const key = kickoffs.map((k) => k ?? "").join("|");
6258
- (0, import_react29.useEffect)(() => {
6437
+ (0, import_react32.useEffect)(() => {
6259
6438
  const now = Date.now();
6260
6439
  const upcoming = key.split("|").map((k) => k ? Date.parse(k) : NaN).filter((ms) => ms > now);
6261
6440
  if (upcoming.length === 0) return;
@@ -6267,23 +6446,16 @@ function useNextKickoffRender(kickoffs) {
6267
6446
  }
6268
6447
 
6269
6448
  // src/slipAdd.ts
6270
- var import_react32 = require("react");
6271
- var import_widget_sdk17 = require("@sensiblestats/widget-sdk");
6449
+ var import_react34 = require("react");
6450
+ var import_widget_sdk18 = require("@sensiblestats/widget-sdk");
6272
6451
 
6273
6452
  // src/trackingContext.ts
6274
- var import_react30 = require("react");
6453
+ var import_react33 = require("react");
6275
6454
  var noop = () => {
6276
6455
  };
6277
- var TrackingContext = (0, import_react30.createContext)(noop);
6456
+ var TrackingContext = (0, import_react33.createContext)(noop);
6278
6457
  function useTrack() {
6279
- return (0, import_react30.useContext)(TrackingContext);
6280
- }
6281
-
6282
- // src/slipStateContext.ts
6283
- var import_react31 = require("react");
6284
- var SlipStateContext = (0, import_react31.createContext)(null);
6285
- function useSlipState() {
6286
- return (0, import_react31.useContext)(SlipStateContext);
6458
+ return (0, import_react33.useContext)(TrackingContext);
6287
6459
  }
6288
6460
 
6289
6461
  // src/slipAdd.ts
@@ -6315,12 +6487,12 @@ function useSlipAdd(slip, ui) {
6315
6487
  const handler = slip.onAddToSlip;
6316
6488
  const rawLabels = !!ui?.rawBettingLabels;
6317
6489
  const operatorFormat = ui?.oddsFormat ?? "decimal";
6318
- return (0, import_react32.useCallback)(async (selection, { marketDeveloperName, selectionLabel, line, fact, hook }) => {
6490
+ return (0, import_react34.useCallback)(async (selection, { marketDeveloperName, selectionLabel, line, fact, hook }) => {
6319
6491
  if (!handler) return { kind: "failed" };
6320
6492
  const display = slipDisplay({ ...selection.display, market: marketDeveloperName, selection: selectionLabel, line });
6321
6493
  const out = toHostSelection(display ? { ...selection, display } : selection, operatorFormat);
6322
6494
  const pick = slipPickFields(out, rawLabels ? selectionLabel : void 0, line);
6323
- const wireSport = (0, import_widget_sdk17.toWireSport)(out.sport);
6495
+ const wireSport = (0, import_widget_sdk18.toWireSport)(out.sport);
6324
6496
  const sportField = {
6325
6497
  ...wireSport ? { sport: wireSport } : {},
6326
6498
  ...wireSport === "tennis" && out.tour ? { tour: out.tour } : {}
@@ -6343,7 +6515,7 @@ function useSlipAdd(slip, ui) {
6343
6515
  }
6344
6516
  try {
6345
6517
  const raw = await withTimeout(Promise.resolve(handler(out)));
6346
- if (raw != null && !(0, import_widget_sdk17.isAddToSlipResult)(raw)) throw new Error("malformed add-to-slip result");
6518
+ if (raw != null && !(0, import_widget_sdk18.isAddToSlipResult)(raw)) throw new Error("malformed add-to-slip result");
6347
6519
  const result = withSafeMessage(raw ?? void 0);
6348
6520
  track({ name: "add_to_slip_result", outcome: slipOutcome(result), ...clickFields });
6349
6521
  if (marketDeveloperName !== void 0) {
@@ -6376,11 +6548,6 @@ function useSlipAdd(slip, ui) {
6376
6548
  }
6377
6549
 
6378
6550
  // src/components/dashboard/v8/builderLegs.ts
6379
- var import_widget_sdk18 = require("@sensiblestats/widget-sdk");
6380
- function slipSportOfWire(sport) {
6381
- const hit = Object.entries(import_widget_sdk18.SPORTS).find(([, spec]) => spec.wireKey === sport);
6382
- return hit ? hit[0] : void 0;
6383
- }
6384
6551
  function readLeg(raw, sport) {
6385
6552
  const vm = toComboLegVM(raw);
6386
6553
  const slipSport = slipSportOfWire(sport);
@@ -6418,8 +6585,8 @@ function useRepriceAdd({ conversation, locale, slip, ui, sport = "football" }) {
6418
6585
  const operatorUserId = scope?.operatorUserId;
6419
6586
  const anonymousUserId = scope?.anonymousUserId;
6420
6587
  const host = slip?.onAddToSlip;
6421
- const kickoffs = (0, import_react33.useRef)(/* @__PURE__ */ new Map());
6422
- const guarded = (0, import_react33.useMemo)(() => {
6588
+ const kickoffs = (0, import_react35.useRef)(/* @__PURE__ */ new Map());
6589
+ const guarded = (0, import_react35.useMemo)(() => {
6423
6590
  if (!slip || !host) return NO_SLIP;
6424
6591
  return {
6425
6592
  ...slip,
@@ -6428,7 +6595,7 @@ function useRepriceAdd({ conversation, locale, slip, ui, sport = "football" }) {
6428
6595
  }, [slip, host, ui]);
6429
6596
  const addToSlip = useSlipAdd(guarded, ui);
6430
6597
  const canAdd2 = !!conversation && !!host;
6431
- const add = (0, import_react33.useCallback)(async (matchId, market, selection, hook) => {
6598
+ const add = (0, import_react35.useCallback)(async (matchId, market, selection, hook) => {
6432
6599
  if (!conversation || !slip) return { outcome: "failed" };
6433
6600
  try {
6434
6601
  const grid = await conversation.getBuilderGrid(locale, {
@@ -6463,13 +6630,9 @@ function useRepriceAdd({ conversation, locale, slip, ui, sport = "football" }) {
6463
6630
  }
6464
6631
 
6465
6632
  // src/components/dashboard/v2/MarketFirstGreeting.tsx
6466
- var import_jsx_runtime11 = require("react/jsx-runtime");
6467
- var STRIP_SLOT = 1;
6468
- var ALT_SLOT = 4;
6633
+ var import_jsx_runtime12 = require("react/jsx-runtime");
6469
6634
  var CHIP_LABEL = {
6470
- live_games: (ui) => ui.v2ChipLive,
6471
- another_market: (ui) => ui.v2ChipAnotherMarket,
6472
- build_combo: (ui) => ui.v2ChipBuildCombo
6635
+ live_games: (ui) => ui.v2ChipLive
6473
6636
  };
6474
6637
  var chipsFor = (section2) => section2.chips.filter((c) => Object.prototype.hasOwnProperty.call(CHIP_LABEL, c) && (!section2.coolOff || c === "live_games"));
6475
6638
  function MarketFirstGreeting({ section: section2, ui, slip, sport, onAct }) {
@@ -6477,17 +6640,17 @@ function MarketFirstGreeting({ section: section2, ui, slip, sport, onAct }) {
6477
6640
  const personal = usePersonalGreeting();
6478
6641
  const openTab = personal?.openTab;
6479
6642
  const add = useRepriceAdd({ conversation: personal?.conversation ?? null, locale: ui.hostTag, slip, ui, sport });
6480
- const [chosen, setChosen] = (0, import_react34.useState)(null);
6481
- const [open, setOpen] = (0, import_react34.useState)(false);
6643
+ const [chosen, setChosen] = (0, import_react36.useState)(null);
6644
+ const [open, setOpen] = (0, import_react36.useState)(false);
6482
6645
  const base = section2.coolOff ? void 0 : section2.featured;
6483
6646
  const pickedRow = base && chosen && chosen.matchId === base.matchId ? chosen.row : null;
6484
- const card = base && pickedRow ? { ...base, market: pickedRow.market, marketLabel: pickedRow.marketLabel, selections: pickedRow.selections, stat: pickedRow.stat, yourMarket: true } : base;
6485
- const chooser = !!card && card.chooser && pickedRow === null;
6486
- const rootRef = (0, import_react34.useRef)(null);
6487
- const [pickCount, setPickCount] = (0, import_react34.useState)(0);
6488
- (0, import_react34.useEffect)(() => {
6647
+ const card = base && pickedRow ? { ...base, market: pickedRow.market, marketLabel: pickedRow.marketLabel, selections: pickedRow.selections, stat: pickedRow.stat, yourMarket: pickedRow.yourMarket } : base;
6648
+ const menu = base && pickedRow ? [{ market: base.market, marketLabel: base.marketLabel, yourMarket: base.yourMarket, selections: base.selections, stat: base.stat }, ...base.markets ?? []] : base?.markets ?? [];
6649
+ const rootRef = (0, import_react36.useRef)(null);
6650
+ const [pickCount, setPickCount] = (0, import_react36.useState)(0);
6651
+ (0, import_react36.useEffect)(() => {
6489
6652
  if (pickCount === 0) return;
6490
- rootRef.current?.querySelector(".ss-w-v2-featured .ss-w-slip-btn, .ss-w-v2-chips button")?.focus();
6653
+ rootRef.current?.querySelector(".ss-w-v2-featured .ss-w-v2-tile, .ss-w-v2-featured > .ss-w-v2-row, .ss-w-v2-chips button")?.focus();
6491
6654
  }, [pickCount]);
6492
6655
  const pick = (row) => {
6493
6656
  setPickCount((n) => n + 1);
@@ -6500,36 +6663,37 @@ function MarketFirstGreeting({ section: section2, ui, slip, sport, onAct }) {
6500
6663
  setChosen({ matchId: card.matchId, row });
6501
6664
  log?.log({ name: "market_choose", entityType: "market", entityId: row.market });
6502
6665
  };
6503
- const request = (0, import_react34.useContext)(GreetingHighlightContext);
6666
+ const request = (0, import_react36.useContext)(GreetingHighlightContext);
6504
6667
  const highlighted = useFeaturedHighlight(card && request?.matchId === card.matchId ? card.matchId : null, request?.token, request?.clear);
6505
- const onChip = (c) => {
6506
- if (c === "another_market") setOpen(true);
6507
- else openTab?.(c === "live_games" ? "live" : "builder");
6508
- };
6509
- const chips = chipsFor(section2).filter((c) => {
6510
- if (c === "another_market") return (base?.otherMarkets.length ?? 0) > 0;
6511
- if (!openTab) return false;
6512
- return c !== "build_combo" || !!section2.builder;
6513
- });
6514
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "ss-w-v2", ref: rootRef, children: [
6515
- card && (chooser || open) ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
6516
- chooser && section2.chooserPrompt ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "ss-w-v2-chooser", children: section2.chooserPrompt }) : null,
6517
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(MarketPicker, { markets: base?.otherMarkets ?? [], current: card.market, title: ui.v2AnotherMarketTitle, onPick: pick })
6518
- ] }) : null,
6519
- card ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FeaturedCard, { card, ui, tag: section2.yourMarketLabel, highlighted, add }) : null,
6520
- card ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(StripRows, { rows: card.strip, hide: pickedRow?.market, tag: section2.yourMarketLabel, ui, slotBase: STRIP_SLOT, matchId: card.matchId, add }) : null,
6521
- card && !section2.coolOff && pickedRow === null ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(AlternativeRows, { rows: section2.alternatives, market: card.market, add, marketLabel: card.marketLabel, ui, slotBase: ALT_SLOT }) : null,
6522
- section2.asks.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(AskCards, { asks: section2.asks, ui, ofYours: false, onAct }) : null,
6523
- section2.since.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SinceLines, { since: section2.since, ui }) : null,
6524
- chips.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "ss-w-v8-chips ss-w-v2-chips", children: chips.map((c) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { type: "button", className: "ss-w-v8-chip", onClick: () => onChip(c), children: CHIP_LABEL[c](ui) }, c)) }) : null
6668
+ const chips = openTab ? chipsFor(section2) : [];
6669
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "ss-w-v2", ref: rootRef, children: [
6670
+ section2.hello ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "ss-w-v2-hello", children: section2.hello }) : null,
6671
+ card ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
6672
+ FeaturedCard,
6673
+ {
6674
+ card: { ...card, markets: menu },
6675
+ ui,
6676
+ tag: section2.yourMarketLabel,
6677
+ sport,
6678
+ open,
6679
+ onToggleMenu: () => setOpen((o) => !o),
6680
+ onPick: pick,
6681
+ picked: pickedRow?.market,
6682
+ highlighted,
6683
+ add
6684
+ }
6685
+ ) : null,
6686
+ section2.asks.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AskCards, { asks: section2.asks, ui, ofYours: false, onAct }) : null,
6687
+ section2.since.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SinceLines, { since: section2.since, ui }) : null,
6688
+ chips.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "ss-w-v8-chips ss-w-v2-chips", children: chips.map((c) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", className: "ss-w-v8-chip", onClick: () => openTab?.("live"), children: CHIP_LABEL[c](ui) }, c)) }) : null
6525
6689
  ] });
6526
6690
  }
6527
6691
 
6528
6692
  // src/components/dashboard/v8/CardLine.tsx
6529
- var import_react44 = require("react");
6693
+ var import_react45 = require("react");
6530
6694
 
6531
6695
  // src/useBuilderGrid.ts
6532
- var import_react35 = require("react");
6696
+ var import_react37 = require("react");
6533
6697
 
6534
6698
  // src/builderMemory.ts
6535
6699
  var GRID_TTL_MS = 5 * 6e4;
@@ -6625,18 +6789,18 @@ function forget(memory3, key, flight) {
6625
6789
  if (flights?.get(key) === flight) flights.delete(key);
6626
6790
  }
6627
6791
  function useBuilderGrid({ conversation, locale, memory: memory3, initial: initial2 }) {
6628
- const [seed] = (0, import_react35.useState)(() => memory3 && conversation && initial2 ? memory3.cachedGrid(gridKey(locale, initial2)) : void 0);
6629
- const [grid, setGrid] = (0, import_react35.useState)(seed ?? null);
6630
- const [status2, setStatus] = (0, import_react35.useState)(seed ? "ready" : "idle");
6631
- const [confirmed, setConfirmed] = (0, import_react35.useState)(false);
6632
- const [answered, setAnswered] = (0, import_react35.useState)(seed && initial2 ? { req: initial2, locale } : null);
6633
- const seq = (0, import_react35.useRef)(0);
6634
- const mounted = (0, import_react35.useRef)(true);
6635
- const hung = (0, import_react35.useRef)(void 0);
6636
- const waiting = (0, import_react35.useRef)(null);
6637
- const memoryRef = (0, import_react35.useRef)(memory3);
6792
+ const [seed] = (0, import_react37.useState)(() => memory3 && conversation && initial2 ? memory3.cachedGrid(gridKey(locale, initial2)) : void 0);
6793
+ const [grid, setGrid] = (0, import_react37.useState)(seed ?? null);
6794
+ const [status2, setStatus] = (0, import_react37.useState)(seed ? "ready" : "idle");
6795
+ const [confirmed, setConfirmed] = (0, import_react37.useState)(false);
6796
+ const [answered, setAnswered] = (0, import_react37.useState)(seed && initial2 ? { req: initial2, locale } : null);
6797
+ const seq = (0, import_react37.useRef)(0);
6798
+ const mounted = (0, import_react37.useRef)(true);
6799
+ const hung = (0, import_react37.useRef)(void 0);
6800
+ const waiting = (0, import_react37.useRef)(null);
6801
+ const memoryRef = (0, import_react37.useRef)(memory3);
6638
6802
  memoryRef.current = memory3;
6639
- const stopWaiting = (0, import_react35.useCallback)((release, keep) => {
6803
+ const stopWaiting = (0, import_react37.useCallback)((release, keep) => {
6640
6804
  window.clearTimeout(hung.current);
6641
6805
  const w = waiting.current;
6642
6806
  waiting.current = null;
@@ -6644,14 +6808,14 @@ function useBuilderGrid({ conversation, locale, memory: memory3, initial: initia
6644
6808
  w.flight.waiters -= 1;
6645
6809
  if (release && w.key !== keep && w.flight.waiters <= 0 && memoryRef.current) forget(memoryRef.current, w.key, w.flight);
6646
6810
  }, []);
6647
- (0, import_react35.useEffect)(() => {
6811
+ (0, import_react37.useEffect)(() => {
6648
6812
  mounted.current = true;
6649
6813
  return () => {
6650
6814
  mounted.current = false;
6651
6815
  stopWaiting(true);
6652
6816
  };
6653
6817
  }, [stopWaiting]);
6654
- const request = (0, import_react35.useCallback)(async (req) => {
6818
+ const request = (0, import_react37.useCallback)(async (req) => {
6655
6819
  if (!conversation) return;
6656
6820
  const mine = ++seq.current;
6657
6821
  const key = memory3 ? gridKey(locale, req) : null;
@@ -6727,13 +6891,13 @@ function useBuilderGrid({ conversation, locale, memory: memory3, initial: initia
6727
6891
  }
6728
6892
 
6729
6893
  // src/components/AddToSlipButton.tsx
6730
- var import_react36 = require("react");
6731
- var import_jsx_runtime12 = require("react/jsx-runtime");
6894
+ var import_react38 = require("react");
6895
+ var import_jsx_runtime13 = require("react/jsx-runtime");
6732
6896
  function SlipButton({ selection, marketDeveloperName, selectionLabel, line, slip, ui, price, ariaLabel, hold, fact }) {
6733
- const [pending, setPending] = (0, import_react36.useState)(false);
6734
- const [settledLocal, setSettledLocal] = (0, import_react36.useState)(false);
6735
- const [toast, setToast] = (0, import_react36.useState)(null);
6736
- const dismiss = (0, import_react36.useCallback)(() => setToast(null), []);
6897
+ const [pending, setPending] = (0, import_react38.useState)(false);
6898
+ const [settledLocal, setSettledLocal] = (0, import_react38.useState)(false);
6899
+ const [toast, setToast] = (0, import_react38.useState)(null);
6900
+ const dismiss = (0, import_react38.useCallback)(() => setToast(null), []);
6737
6901
  const add = useSlipAdd(slip, ui);
6738
6902
  const slipState = useSlipState();
6739
6903
  const { oddsFormat } = useOddsSettings();
@@ -6754,26 +6918,27 @@ function SlipButton({ selection, marketDeveloperName, selectionLabel, line, slip
6754
6918
  setPending(false);
6755
6919
  }
6756
6920
  };
6757
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "ss-w-slip", children: [
6758
- price ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
6921
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "ss-w-slip", children: [
6922
+ price ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
6759
6923
  "button",
6760
6924
  {
6761
6925
  type: "button",
6762
6926
  className: "ss-w-slip-btn ss-w-slip-btn--price",
6763
6927
  "data-settled": settled || void 0,
6928
+ "aria-disabled": settled || void 0,
6764
6929
  "aria-label": `${price.ariaLabel}, ${settled ? ui.inSlip : ui.addToSlip}`,
6765
6930
  disabled: pending || settled || hold,
6766
6931
  onClick,
6767
6932
  children: [
6768
- settled ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "ss-w-mol-tick", "aria-hidden": "true", children: "\u2713" }) : null,
6769
- price.label ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "ss-w-mol-lab", children: price.label }) : null,
6770
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: price.valueClass, children: [
6933
+ settled ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "ss-w-mol-tick", "aria-hidden": "true", children: "\u2713" }) : null,
6934
+ price.label ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "ss-w-mol-lab", children: price.label }) : null,
6935
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: price.valueClass, children: [
6771
6936
  price.lead,
6772
6937
  formatOdds(selection.forms, oddsFormat)
6773
6938
  ] })
6774
6939
  ]
6775
6940
  }
6776
- ) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
6941
+ ) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
6777
6942
  "button",
6778
6943
  {
6779
6944
  type: "button",
@@ -6784,12 +6949,12 @@ function SlipButton({ selection, marketDeveloperName, selectionLabel, line, slip
6784
6949
  children: settled ? ui.inSlip : ui.addToSlip
6785
6950
  }
6786
6951
  ),
6787
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Toast, { toast, onDismiss: dismiss })
6952
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Toast, { toast, onDismiss: dismiss })
6788
6953
  ] });
6789
6954
  }
6790
6955
  function AddToSlipButton({ it, slip, ui }) {
6791
6956
  const selection = it.addToSlipEnabled ? toSlipSelection(it, slip.conversationId) : null;
6792
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
6957
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
6793
6958
  SlipButton,
6794
6959
  {
6795
6960
  selection,
@@ -6803,11 +6968,11 @@ function AddToSlipButton({ it, slip, ui }) {
6803
6968
  }
6804
6969
 
6805
6970
  // src/components/MarketOddsCardList.tsx
6806
- var import_react43 = require("react");
6807
- var import_widget_sdk22 = require("@sensiblestats/widget-sdk");
6971
+ var import_react44 = require("react");
6972
+ var import_widget_sdk21 = require("@sensiblestats/widget-sdk");
6808
6973
 
6809
6974
  // src/components/OddsMovementBadge.tsx
6810
- var import_jsx_runtime13 = (
6975
+ var import_jsx_runtime14 = (
6811
6976
  // Strikethrough is invisible to screen readers, so the whole was/now/direction sentence rides
6812
6977
  // on one aria-label and the visual glyphs are hidden from the accessibility tree.
6813
6978
  require("react/jsx-runtime")
@@ -6824,113 +6989,34 @@ function OddsMovementBadge({
6824
6989
  if (previous === void 0 || direction2 === void 0) return null;
6825
6990
  const directionWord2 = direction2 === "shortened" ? ui.oddsShortened : ui.oddsDrifted;
6826
6991
  const label = ui.oddsMoved(previous, current, directionWord2);
6827
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "ss-w-move", role: "img", "aria-label": label, children: [
6828
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "ss-w-move-prev", "aria-hidden": "true", children: previous }),
6829
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "ss-w-move-arrow", "aria-hidden": "true", children: direction2 === "shortened" ? "\u25BC" : "\u25B2" })
6992
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "ss-w-move", role: "img", "aria-label": label, children: [
6993
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "ss-w-move-prev", "aria-hidden": "true", children: previous }),
6994
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "ss-w-move-arrow", "aria-hidden": "true", children: direction2 === "shortened" ? "\u25BC" : "\u25B2" })
6830
6995
  ] });
6831
6996
  }
6832
6997
 
6833
6998
  // src/components/Crest.tsx
6834
- var import_react37 = require("react");
6835
- var import_jsx_runtime14 = require("react/jsx-runtime");
6999
+ var import_react39 = require("react");
7000
+ var import_jsx_runtime15 = require("react/jsx-runtime");
6836
7001
  function initials(name) {
6837
7002
  return (name ?? "").trim().slice(0, 1).toUpperCase() || "?";
6838
7003
  }
6839
7004
  function Crest({ url, name, kind, abbr }) {
6840
7005
  const cls = kind === "comp" ? "ss-w-bi-comp-logo" : kind === "player" ? "ss-w-bi-crest ss-w-bi-crest--player" : "ss-w-bi-crest";
6841
- const [failed, setFailed] = (0, import_react37.useState)(false);
7006
+ const [failed, setFailed] = (0, import_react39.useState)(false);
6842
7007
  if (url && !failed) {
6843
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("img", { className: cls, src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
7008
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("img", { className: cls, src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
6844
7009
  }
6845
- if (abbr) return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: `${cls} ss-w-bi-crest-mono ss-w-bi-crest--abbr`, "aria-hidden": "true", children: abbr });
6846
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: `${cls} ss-w-bi-crest-mono`, "aria-hidden": "true", children: initials(name) });
6847
- }
6848
-
6849
- // src/components/PinToggle.tsx
6850
- var import_react38 = require("react");
6851
- var import_widget_sdk19 = require("@sensiblestats/widget-sdk");
6852
- var import_jsx_runtime15 = require("react/jsx-runtime");
6853
- var PIN_GLYPHS = {
6854
- pin: { viewBox: "0 0 24 24", strokeWidth: 1.4, transform: "scale(1.5)", d: "M9.5 1.5 14.5 6.5 13 8l-.5-.5-3 3 .3 2.2-1.4 1.4L5.6 11.3l-3.3 3.3-1-1 3.3-3.3L1.9 7.5l1.4-1.4 2.2.3 3-3L8 2.9z" },
6855
- star: { viewBox: "0 0 24 24", strokeWidth: 2, d: "M12 2.5l2.9 5.9 6.5.95-4.7 4.58 1.1 6.47L12 17.35 6.1 20.4l1.1-6.47L2.5 9.35l6.5-.95z" },
6856
- bookmark: { viewBox: "0 0 24 24", strokeWidth: 2, d: "M7 3h10a1.5 1.5 0 0 1 1.5 1.5V21l-6.5-3.6L5.5 21V4.5A1.5 1.5 0 0 1 7 3z" }
6857
- };
6858
- function PinToggle({ pin, monitor, ui, market }) {
6859
- const [toast, setToast] = (0, import_react38.useState)(null);
6860
- const dismiss = (0, import_react38.useCallback)(() => setToast(null), []);
6861
- const log = useEventLog();
6862
- if (!monitor || !monitor.enabled) return null;
6863
- const key = pinKey(pin);
6864
- const wireSport = (0, import_widget_sdk19.toWireSport)(pin.sport);
6865
- const sportField = wireSport ? { sport: wireSport } : {};
6866
- const pinned = monitor.isPinned(key);
6867
- const labels = pin.kind === "match" ? { pin: ui.matchPinLabel, unpin: ui.matchUnpinLabel } : { pin: ui.pinLabel, unpin: ui.unpinLabel };
6868
- const onClick = (e) => {
6869
- e.stopPropagation();
6870
- if (pin.kind === "match" && !monitor.isPinned(key)) {
6871
- const result2 = monitor.pinMatch({ matchId: pin.matchId, marketDeveloperName: market, sport: pin.sport, ...pin.tour ? { tour: pin.tour } : {} });
6872
- if (result2 === "added") {
6873
- log?.log({
6874
- name: "pin_add",
6875
- entityType: "match",
6876
- entityId: (0, import_widget_sdk19.qualifiedId)(pin.sport, "game", (0, import_widget_sdk19.localIdOf)(pin.sport, pin.matchId, pin.tour)),
6877
- marketDeveloperName: pin.marketDeveloperName,
6878
- ...sportField
6879
- });
6880
- } else if (result2 === "match_limit") {
6881
- setToast({ kind: "error", text: ui.matchLimitToast });
6882
- }
6883
- return;
6884
- }
6885
- const result = monitor.togglePin({ ...pin, key });
6886
- if ((result === "added" || result === "removed") && (pin.kind === "match" || pin.marketDeveloperName !== void 0)) {
6887
- log?.log({
6888
- name: result === "added" ? "pin_add" : "pin_remove",
6889
- entityType: pin.kind === "match" ? "match" : "market",
6890
- entityId: pin.kind === "match" ? (0, import_widget_sdk19.qualifiedId)(pin.sport, "game", (0, import_widget_sdk19.localIdOf)(pin.sport, pin.matchId, pin.tour)) : (0, import_widget_sdk19.qualifiedId)(pin.sport, "market", pin.marketDeveloperName),
6891
- marketDeveloperName: pin.marketDeveloperName,
6892
- ...sportField
6893
- });
6894
- } else if (result === "market_limit") {
6895
- setToast({ kind: "error", text: ui.marketLimitToast });
6896
- }
6897
- };
6898
- const glyph = PIN_GLYPHS[ui.pinIcon];
6899
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "ss-w-pin-wrap", children: [
6900
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
6901
- "button",
6902
- {
6903
- type: "button",
6904
- className: "ss-w-pin",
6905
- "data-on": pinned || void 0,
6906
- "data-icon": ui.pinIcon,
6907
- "aria-pressed": pinned,
6908
- "aria-label": pinned ? labels.unpin : labels.pin,
6909
- onClick,
6910
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("svg", { viewBox: glyph.viewBox, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
6911
- "path",
6912
- {
6913
- transform: glyph.transform,
6914
- d: glyph.d,
6915
- fill: pinned ? "currentColor" : "none",
6916
- stroke: pinned ? "none" : "currentColor",
6917
- strokeWidth: glyph.strokeWidth,
6918
- strokeLinejoin: "round",
6919
- strokeLinecap: "round"
6920
- }
6921
- ) })
6922
- }
6923
- ),
6924
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Toast, { toast, onDismiss: dismiss })
6925
- ] });
7010
+ if (abbr) return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: `${cls} ss-w-bi-crest-mono ss-w-bi-crest--abbr`, "aria-hidden": "true", children: abbr });
7011
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: `${cls} ss-w-bi-crest-mono`, "aria-hidden": "true", children: initials(name) });
6926
7012
  }
6927
7013
 
6928
7014
  // src/components/PriceHistoryButton.tsx
6929
- var import_react39 = require("react");
7015
+ var import_react40 = require("react");
6930
7016
  var import_jsx_runtime16 = require("react/jsx-runtime");
6931
7017
  function PriceHistoryButton({ selection, monitor, ui, displayLabel }) {
6932
- const [toast, setToast] = (0, import_react39.useState)(null);
6933
- const dismiss = (0, import_react39.useCallback)(() => setToast(null), []);
7018
+ const [toast, setToast] = (0, import_react40.useState)(null);
7019
+ const dismiss = (0, import_react40.useCallback)(() => setToast(null), []);
6934
7020
  const log = useEventLog();
6935
7021
  if (!monitor || !monitor.enabled) return null;
6936
7022
  const name = displayLabel ?? joinSelection(selection.selectionLabel ?? void 0, selection.line ?? void 0);
@@ -6957,20 +7043,20 @@ function PriceHistoryButton({ selection, monitor, ui, displayLabel }) {
6957
7043
  }
6958
7044
 
6959
7045
  // src/components/LiveFactBlock.tsx
6960
- var import_react41 = require("react");
6961
- var import_widget_sdk20 = require("@sensiblestats/widget-sdk");
7046
+ var import_react42 = require("react");
7047
+ var import_widget_sdk19 = require("@sensiblestats/widget-sdk");
6962
7048
 
6963
7049
  // src/useFactView.ts
6964
- var import_react40 = require("react");
7050
+ var import_react41 = require("react");
6965
7051
  var DWELL_MS = 1e3;
6966
7052
  var seen = /* @__PURE__ */ new Set();
6967
7053
  function useFactView(ref, fact, entity2) {
6968
7054
  const log = useEventLog();
6969
- const entityRef = (0, import_react40.useRef)(entity2);
7055
+ const entityRef = (0, import_react41.useRef)(entity2);
6970
7056
  entityRef.current = entity2;
6971
7057
  const id = fact?.id;
6972
7058
  const factKey = fact?.factKey;
6973
- (0, import_react40.useEffect)(() => {
7059
+ (0, import_react41.useEffect)(() => {
6974
7060
  if (id === void 0 || factKey === void 0 || seen.has(id) || !log) return;
6975
7061
  const el = ref.current;
6976
7062
  if (!el) return;
@@ -7018,18 +7104,18 @@ function evidenceText(f, ui) {
7018
7104
  return parts2.length > 0 ? parts2.join(" \xB7 ") : void 0;
7019
7105
  }
7020
7106
  function LiveFactBlock({ facts, match, ui, slip, onAsk, scope }) {
7021
- const [expanded, setExpanded] = (0, import_react41.useState)(false);
7107
+ const [expanded, setExpanded] = (0, import_react42.useState)(false);
7022
7108
  const { oddsFormat } = useOddsSettings();
7023
7109
  const log = useEventLog();
7024
- const sectionRef = (0, import_react41.useRef)(null);
7110
+ const sectionRef = (0, import_react42.useRef)(null);
7025
7111
  const current = facts.find((f) => f.marketState);
7026
7112
  const earlier = facts.filter((f) => f.marketState && f !== current);
7027
7113
  const background = facts.filter((f) => !f.marketState).slice(0, BACKGROUND_MAX);
7028
7114
  const m = current?.market;
7029
7115
  const sport = scope?.sport;
7030
- const wire = (0, import_widget_sdk20.toWireSport)(sport);
7116
+ const wire = (0, import_widget_sdk19.toWireSport)(sport);
7031
7117
  const sportFields = wire ? { sport: wire, ...scope?.tour ? { tour: scope.tour } : {} } : {};
7032
- const entity2 = current?.marketState && m ? { entityType: "market", entityId: (0, import_widget_sdk20.qualifiedId)(sport, "market", m.marketDeveloperName), ...sportFields } : { entityType: "match", entityId: (0, import_widget_sdk20.qualifiedId)(sport, "game", (0, import_widget_sdk20.localIdOf)(sport, match.matchId, scope?.tour)), ...sportFields };
7118
+ const entity2 = current?.marketState && m ? { entityType: "market", entityId: (0, import_widget_sdk19.qualifiedId)(sport, "market", m.marketDeveloperName), ...sportFields } : { entityType: "match", entityId: (0, import_widget_sdk19.qualifiedId)(sport, "game", (0, import_widget_sdk19.localIdOf)(sport, match.matchId, scope?.tour)), ...sportFields };
7033
7119
  useFactView(sectionRef, current, entity2);
7034
7120
  if (facts.length === 0) return null;
7035
7121
  const open = current?.marketState === "open" && !!m && !m.isSuspended;
@@ -7109,17 +7195,17 @@ function LiveFactBlock({ facts, match, ui, slip, onAsk, scope }) {
7109
7195
  }
7110
7196
 
7111
7197
  // src/components/AllMarketsButton.tsx
7112
- var import_react42 = require("react");
7113
- var import_widget_sdk21 = require("@sensiblestats/widget-sdk");
7198
+ var import_react43 = require("react");
7199
+ var import_widget_sdk20 = require("@sensiblestats/widget-sdk");
7114
7200
  var import_jsx_runtime18 = require("react/jsx-runtime");
7115
7201
  function allMarketsCount(vm, monitor) {
7116
- if (!monitor?.enabled || !vm.pinEnabled || (0, import_widget_sdk21.sportOf)(vm.sport) !== void 0) return null;
7202
+ if (!monitor?.enabled || !vm.pinEnabled || (0, import_widget_sdk20.sportOf)(vm.sport) !== void 0) return null;
7117
7203
  return vm.marketCount !== void 0 && vm.marketCount >= 2 ? vm.marketCount : null;
7118
7204
  }
7119
7205
  function AllMarketsButton({ vm, count: count2, monitor, ui, surface }) {
7120
7206
  const log = useEventLog();
7121
- const [toast, setToast] = (0, import_react42.useState)(null);
7122
- const dismiss = (0, import_react42.useCallback)(() => setToast(null), []);
7207
+ const [toast, setToast] = (0, import_react43.useState)(null);
7208
+ const dismiss = (0, import_react43.useCallback)(() => setToast(null), []);
7123
7209
  const onClick = () => {
7124
7210
  if (monitor.pinMatch({ matchId: vm.matchId, marketDeveloperName: vm.marketDeveloperName }) === "match_limit") {
7125
7211
  setToast({ kind: "error", text: ui.matchLimitToast });
@@ -7158,7 +7244,7 @@ function OddsRow({ vm, row, ui, slip, inSlipIds, history, suppressSlip }) {
7158
7244
  const previousOdds = row.previousPriceForms ? formatOdds(row.previousPriceForms, oddsFormat) : void 0;
7159
7245
  const slipAllowed = vm.addToSlipEnabled && !suppressSlip && slipOpenFor(slip, vm.sport) && !nflStarted(vm, Date.now());
7160
7246
  const selection = slipAllowed ? marketOddsRowToSlipSelection(vm, row, slip.conversationId) : null;
7161
- const inSlip = !!inSlipIds && row.matchOddsId != null && !!inSlipIds[slipKey({ matchOddsId: row.matchOddsId, sport: (0, import_widget_sdk22.slipSportOf)(vm.sport) })];
7247
+ const inSlip = !!inSlipIds && row.matchOddsId != null && !!inSlipIds[slipKey({ matchOddsId: row.matchOddsId, sport: (0, import_widget_sdk21.slipSportOf)(vm.sport) })];
7162
7248
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "ss-w-mo-row", children: [
7163
7249
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "ss-w-mo-sel", children: row.selection }),
7164
7250
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(OddsMovementBadge, { previous: previousOdds, current: odds, direction: row.movementDirection, ui }),
@@ -7184,7 +7270,7 @@ function fmtHhMm(iso, tag2, clock3, timeZone) {
7184
7270
  return formatTime(iso, tag2, clock3, { timeZone });
7185
7271
  }
7186
7272
  function MarketOddsCard({ vm, ui, slip, monitor, inSlipIds, hideHeader, pinRef }) {
7187
- const [open, setOpen] = (0, import_react43.useState)(false);
7273
+ const [open, setOpen] = (0, import_react44.useState)(false);
7188
7274
  useNextKickoffRender(isNfl(vm.sport) ? [vm.kickoffUtc] : []);
7189
7275
  const kickoffFallback = vm.kickoffUtc ? ui.bettingKickoff(vm.kickoffUtc) : void 0;
7190
7276
  const kickoff = vm.kickoffLabel ?? (kickoffFallback ? `${kickoffFallback.dayLabel} ${kickoffFallback.time}` : void 0);
@@ -7195,15 +7281,15 @@ function MarketOddsCard({ vm, ui, slip, monitor, inSlipIds, hideHeader, pinRef }
7195
7281
  const asOfMs = live ? new Date(live.asOfUtc).getTime() : NaN;
7196
7282
  const isStale = live != null && !isClosed && (vm.awaitingLiveUpdate === true || Date.now() - asOfMs > STALE_AFTER_MS);
7197
7283
  const staleTime = isStale && live ? fmtHhMm(live.asOfUtc, ui.locale, clockOf(ui), ui.timeZone) : null;
7198
- const [, setStaleTick] = (0, import_react43.useState)(0);
7284
+ const [, setStaleTick] = (0, import_react44.useState)(0);
7199
7285
  const watchStale = live != null && !isClosed && !isStale;
7200
- (0, import_react43.useEffect)(() => {
7286
+ (0, import_react44.useEffect)(() => {
7201
7287
  if (!watchStale) return;
7202
7288
  const id = window.setTimeout(() => setStaleTick((n) => n + 1), Math.max(0, asOfMs + STALE_AFTER_MS - Date.now()) + 1);
7203
7289
  return () => window.clearTimeout(id);
7204
7290
  }, [watchStale, asOfMs]);
7205
- const showPin = !!monitor && (0, import_widget_sdk22.mayPinOrSlip)(vm.sport) && (vm.pinEnabled || (0, import_widget_sdk22.slipSportOf)(vm.sport) !== void 0) && !live && (!!pinRef || !vm.isLive);
7206
- const history = showPin && !pinRef && !hideHeader && (0, import_widget_sdk22.sportOf)(vm.sport) === void 0 ? monitor : void 0;
7291
+ const showPin = !!monitor && (0, import_widget_sdk21.mayPinOrSlip)(vm.sport) && (vm.pinEnabled || (0, import_widget_sdk21.slipSportOf)(vm.sport) !== void 0) && !live && (!!pinRef || !vm.isLive);
7292
+ const history = showPin && !pinRef && !hideHeader && (0, import_widget_sdk21.sportOf)(vm.sport) === void 0 ? monitor : void 0;
7207
7293
  const allMarkets = !hideHeader && !pinRef && !live && !vm.isLive ? allMarketsCount(vm, monitor) : null;
7208
7294
  const showHeader = !!vm.competition || vm.isLive || !!kickoff || showPin || !!live;
7209
7295
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: hideHeader ? "ss-w-mocard ss-w-mocard--bare" : "ss-w-mocard", children: [
@@ -7231,7 +7317,7 @@ function MarketOddsCard({ vm, ui, slip, monitor, inSlipIds, hideHeader, pinRef }
7231
7317
  {
7232
7318
  ui,
7233
7319
  monitor,
7234
- pin: pinRef ?? { kind: "match", matchId: vm.matchId, sport: (0, import_widget_sdk22.slipSportOf)(vm.sport) },
7320
+ pin: pinRef ?? { kind: "match", matchId: vm.matchId, sport: (0, import_widget_sdk21.slipSportOf)(vm.sport) },
7235
7321
  market: pinRef ? void 0 : vm.marketDeveloperName
7236
7322
  }
7237
7323
  ) : null
@@ -7336,7 +7422,7 @@ var asOf = (iso, ui) => {
7336
7422
  function CardLine({ card, ui, slip, sport, marketKey, conversation, operatorUserId, anonymousUserId }) {
7337
7423
  const matchId = card.matchId;
7338
7424
  const canAdd2 = !!slip.onAddToSlip;
7339
- const ask = (0, import_react44.useMemo)(() => canAdd2 && marketKey && matchId ? {
7425
+ const ask = (0, import_react45.useMemo)(() => canAdd2 && marketKey && matchId ? {
7340
7426
  sport,
7341
7427
  marketKey,
7342
7428
  matchIds: [matchId],
@@ -7347,7 +7433,7 @@ function CardLine({ card, ui, slip, sport, marketKey, conversation, operatorUser
7347
7433
  ...anonymousUserId ? { anonymousUserId } : {}
7348
7434
  } : null, [canAdd2, sport, marketKey, matchId, operatorUserId, anonymousUserId]);
7349
7435
  const { grid, answeredFor, request } = useBuilderGrid({ conversation, locale: ui.hostTag, initial: ask });
7350
- (0, import_react44.useEffect)(() => {
7436
+ (0, import_react45.useEffect)(() => {
7351
7437
  if (ask) void request(ask);
7352
7438
  }, [request, ask]);
7353
7439
  useNextKickoffRender([card.startsAtUtc]);
@@ -7386,16 +7472,16 @@ function CardLine({ card, ui, slip, sport, marketKey, conversation, operatorUser
7386
7472
  }
7387
7473
 
7388
7474
  // src/components/dashboard/v8/Pic.tsx
7389
- var import_react45 = require("react");
7475
+ var import_react46 = require("react");
7390
7476
  var import_jsx_runtime21 = require("react/jsx-runtime");
7391
7477
  function Pic({ src, kind = "team" }) {
7392
- const [failed, setFailed] = (0, import_react45.useState)(null);
7478
+ const [failed, setFailed] = (0, import_react46.useState)(null);
7393
7479
  if (!src || failed === src) return null;
7394
7480
  return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("img", { className: kind === "player" ? "ss-w-v8-pic ss-w-v8-pic--player" : "ss-w-v8-pic", src, alt: "", "aria-hidden": "true", onError: () => setFailed(src) });
7395
7481
  }
7396
7482
 
7397
7483
  // src/components/dashboard/v8/FactPrice.tsx
7398
- var import_react46 = require("react");
7484
+ var import_react47 = require("react");
7399
7485
 
7400
7486
  // src/components/dashboard/v8/factLeg.ts
7401
7487
  var isProp = (key) => key.toLowerCase().startsWith("prop_");
@@ -7426,7 +7512,7 @@ var import_jsx_runtime22 = require("react/jsx-runtime");
7426
7512
  function FactPrice({ reference, ui, slip, conversation, memory: memory3, stars, enabled, operatorUserId, anonymousUserId }) {
7427
7513
  const { sport, marketKey, matchId } = reference;
7428
7514
  const canAdd2 = !!slip.onAddToSlip;
7429
- const ask = (0, import_react46.useMemo)(() => enabled && canAdd2 && marketKey && matchId ? {
7515
+ const ask = (0, import_react47.useMemo)(() => enabled && canAdd2 && marketKey && matchId ? {
7430
7516
  sport,
7431
7517
  marketKey,
7432
7518
  matchIds: [matchId],
@@ -7438,7 +7524,7 @@ function FactPrice({ reference, ui, slip, conversation, memory: memory3, stars,
7438
7524
  ...anonymousUserId ? { anonymousUserId } : {}
7439
7525
  } : null, [enabled, canAdd2, sport, marketKey, matchId, operatorUserId, anonymousUserId]);
7440
7526
  const { grid, answeredFor, confirmed, request } = useBuilderGrid({ conversation, locale: ui.hostTag, memory: memory3, initial: ask });
7441
- (0, import_react46.useEffect)(() => {
7527
+ (0, import_react47.useEffect)(() => {
7442
7528
  if (ask) void request(ask);
7443
7529
  }, [request, ask]);
7444
7530
  const settled = answeredFor === ask;
@@ -7507,7 +7593,7 @@ function FavouritesInvite({ ui, sport, onOpen }) {
7507
7593
  }
7508
7594
 
7509
7595
  // src/components/dashboard/v8/useFollow.ts
7510
- var import_react47 = require("react");
7596
+ var import_react48 = require("react");
7511
7597
 
7512
7598
  // src/favouriteKinds.ts
7513
7599
  function favouriteKinds(sport) {
@@ -7526,7 +7612,7 @@ function favouriteKindLabel(ui, sport, kind) {
7526
7612
  var isFavouriteKind = (kind) => kind === "team" || kind === "player" || kind === "competition";
7527
7613
  var keyOf2 = (sport, t) => `${sport}:${t.kind}:${t.id}`;
7528
7614
  function useFollow(controller, ui, holds, sport) {
7529
- const [notice, setNotice] = (0, import_react47.useState)(null);
7615
+ const [notice, setNotice] = (0, import_react48.useState)(null);
7530
7616
  const isOpen = (t) => isFavouriteKind(t.kind) && !holds.followed.has(keyOf2(sport, t)) && !controller.isStarred(t.kind, t.id);
7531
7617
  const follow = async (t) => {
7532
7618
  if (!isFavouriteKind(t.kind)) return;
@@ -7560,7 +7646,7 @@ function FollowSuggestions({ chips, ui, controller, holds, sport }) {
7560
7646
  }
7561
7647
 
7562
7648
  // src/components/dashboard/v8/TeamStats.tsx
7563
- var import_widget_sdk23 = require("@sensiblestats/widget-sdk");
7649
+ var import_widget_sdk22 = require("@sensiblestats/widget-sdk");
7564
7650
  var import_jsx_runtime26 = require("react/jsx-runtime");
7565
7651
  var RESULTS = ["W", "D", "L"];
7566
7652
  var results = (form) => (form ?? []).filter((r) => RESULTS.includes(r));
@@ -7575,7 +7661,7 @@ function teamCardHasContent(card) {
7575
7661
  if (card.homeLabel && card.awayLabel) return true;
7576
7662
  return results(card.form).length > 0 || results(card.homeForm).length > 0 || results(card.awayForm).length > 0 || !!card.h2h || !!card.fact;
7577
7663
  }
7578
- var drawsShown = (sport, draws) => draws > 0 || (0, import_widget_sdk23.sportOf)(sport) === void 0 && (0, import_widget_sdk23.fromWireSport)(sport) === void 0;
7664
+ var drawsShown = (sport, draws) => draws > 0 || (0, import_widget_sdk22.sportOf)(sport) === void 0 && (0, import_widget_sdk22.fromWireSport)(sport) === void 0;
7579
7665
  function TeamStats({ card, ui, sport }) {
7580
7666
  const pair = named2(card);
7581
7667
  const h2h = card.h2h;
@@ -7677,10 +7763,10 @@ function GuessCard({ guess, ui, controller, holds, sport, conversation, operator
7677
7763
  }
7678
7764
 
7679
7765
  // src/components/dashboard/v8/IdleTeams.tsx
7680
- var import_react48 = require("react");
7766
+ var import_react49 = require("react");
7681
7767
  var import_jsx_runtime28 = require("react/jsx-runtime");
7682
7768
  function IdleTeams({ teams, ui, onAct, slotBase }) {
7683
- const events = (0, import_react48.useContext)(GreetingEventsContext);
7769
+ const events = (0, import_react49.useContext)(GreetingEventsContext);
7684
7770
  return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_jsx_runtime28.Fragment, { children: teams.map((t, i) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "ss-w-v8-idle", children: [
7685
7771
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Pic, { src: t.imagePath }),
7686
7772
  /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "ss-w-v8-idle-text", children: [
@@ -7698,10 +7784,10 @@ function IdleTeams({ teams, ui, onAct, slotBase }) {
7698
7784
  }
7699
7785
 
7700
7786
  // src/components/dashboard/v8/MatchCard.tsx
7701
- var import_react49 = require("react");
7787
+ var import_react50 = require("react");
7702
7788
  var import_jsx_runtime29 = require("react/jsx-runtime");
7703
7789
  function MatchCard({ card, ui, slip, sport, marketKey, conversation, operatorUserId, anonymousUserId, slot }) {
7704
- const events = (0, import_react49.useContext)(GreetingEventsContext);
7790
+ const events = (0, import_react50.useContext)(GreetingEventsContext);
7705
7791
  if (!teamCardHasContent(card)) return null;
7706
7792
  const pair = !!(card.homeLabel && card.awayLabel);
7707
7793
  const title = card.homeLabel && card.awayLabel ? `${card.homeLabel} - ${card.awayLabel}` : card.label;
@@ -7968,16 +8054,16 @@ function GreetingDashboard({ dashboard, dashboards, defaultSport, greeting, onTa
7968
8054
  const { oddsFormat } = useOddsSettings();
7969
8055
  const scope = useSportScope();
7970
8056
  const sets = switchSets(dashboards);
7971
- const [selected, setSelected] = (0, import_react50.useState)(() => initialSport(sets, defaultSport));
8057
+ const [selected, setSelected] = (0, import_react51.useState)(() => initialSport(sets, defaultSport));
7972
8058
  const active = sets?.find((s) => s.sport === selected) ?? null;
7973
8059
  const shown2 = active ? active.dashboard : dashboard;
7974
8060
  const personal = shown2.personal;
7975
8061
  const starsElsewhere = (sets ?? []).some((s) => (s.dashboard.personal?.ribbon?.stars.length ?? 0) > 0);
7976
8062
  const meta = active ? active.greeting ?? (greeting?.sport === active.sport ? greeting : void 0) : greeting;
7977
- (0, import_react50.useEffect)(() => {
8063
+ (0, import_react51.useEffect)(() => {
7978
8064
  if (log && meta) sendGreetingOnce((e) => log.log(e), log, meta, "panel");
7979
8065
  }, [log, meta]);
7980
- const events = (0, import_react50.useMemo)(() => {
8066
+ const events = (0, import_react51.useMemo)(() => {
7981
8067
  if (!log || !meta) return null;
7982
8068
  const send = (name, slot) => {
7983
8069
  if (!Number.isInteger(slot) || slot < 0 || slot > 19) return;
@@ -7997,9 +8083,9 @@ function GreetingDashboard({ dashboard, dashboards, defaultSport, greeting, onTa
7997
8083
  const badgePlacement = layout === LAYOUT_CLASSES.goal ? "end" : "meta";
7998
8084
  return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(GreetingEventsContext.Provider, { value: events, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: `ss-w-dash ${layout}`, children: [
7999
8085
  sets ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SportSwitch, { sports: sets, selected, onSelect: select, liveLabel: ui.liveLabel, groupLabel: ui.sportGroupLabel, tag: ui.locale }) : null,
8000
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "ss-w-dash-head", children: [
8086
+ shown2.marketFirst ? null : /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "ss-w-dash-head", children: [
8001
8087
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "ss-w-dash-title", children: shown2.title }),
8002
- shown2.subtitle && !shown2.marketFirst ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "ss-w-dash-subtitle", children: shown2.subtitle }) : null
8088
+ shown2.subtitle ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "ss-w-dash-subtitle", children: shown2.subtitle }) : null
8003
8089
  ] }),
8004
8090
  shown2.marketFirst ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(MarketFirstGreeting, { section: shown2.marketFirst, ui, slip, sport: active?.sport ?? (defaultSport || greeting?.sport || "football"), onAct }, active?.sport ?? "") : personal && slip ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PersonalGreeting, { personal, ui, slip, sport: active?.sport ?? (defaultSport || greeting?.sport || "football"), starsElsewhere, onAct }, active?.sport ?? "") : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "ss-w-dash-grid", children: shown2.tiles.map((t, i) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
8005
8091
  DashboardTile,
@@ -8016,33 +8102,33 @@ function GreetingDashboard({ dashboard, dashboards, defaultSport, greeting, onTa
8016
8102
  }
8017
8103
 
8018
8104
  // src/useScheduleSport.ts
8019
- var import_react51 = require("react");
8105
+ var import_react52 = require("react");
8020
8106
  function useScheduleSport(offered) {
8021
- const [chosen, setChosen] = (0, import_react51.useState)("all");
8107
+ const [chosen, setChosen] = (0, import_react52.useState)("all");
8022
8108
  const sport = chosen === "all" || offered.includes(chosen) ? chosen : "all";
8023
- (0, import_react51.useEffect)(() => {
8109
+ (0, import_react52.useEffect)(() => {
8024
8110
  if (sport !== chosen) setChosen("all");
8025
8111
  }, [sport, chosen]);
8026
- const setSport = (0, import_react51.useCallback)((s) => setChosen(s), []);
8112
+ const setSport = (0, import_react52.useCallback)((s) => setChosen(s), []);
8027
8113
  return { sport, setSport, offered };
8028
8114
  }
8029
8115
 
8030
8116
  // src/useMatchesDay.ts
8031
- var import_react53 = require("react");
8117
+ var import_react54 = require("react");
8032
8118
 
8033
8119
  // src/useScheduleDay.ts
8034
- var import_react52 = require("react");
8120
+ var import_react53 = require("react");
8035
8121
  var EMPTY = [];
8036
8122
  function useScheduleDay(opts) {
8037
8123
  const { localDate, today, todayGroups, enabled, resetKey, timeZone } = opts;
8038
- const getRef = (0, import_react52.useRef)(opts.getSchedule);
8124
+ const getRef = (0, import_react53.useRef)(opts.getSchedule);
8039
8125
  getRef.current = opts.getSchedule;
8040
- const daysRef = (0, import_react52.useRef)(/* @__PURE__ */ new Map());
8041
- const [fetched, setFetched] = (0, import_react52.useState)({ status: "idle", groups: EMPTY });
8042
- const [retryKey, setRetryKey] = (0, import_react52.useState)(0);
8043
- const [seenDate, setSeenDate] = (0, import_react52.useState)(localDate);
8044
- const [seenReset, setSeenReset] = (0, import_react52.useState)(resetKey);
8045
- const [seenZone, setSeenZone] = (0, import_react52.useState)(timeZone);
8126
+ const daysRef = (0, import_react53.useRef)(/* @__PURE__ */ new Map());
8127
+ const [fetched, setFetched] = (0, import_react53.useState)({ status: "idle", groups: EMPTY });
8128
+ const [retryKey, setRetryKey] = (0, import_react53.useState)(0);
8129
+ const [seenDate, setSeenDate] = (0, import_react53.useState)(localDate);
8130
+ const [seenReset, setSeenReset] = (0, import_react53.useState)(resetKey);
8131
+ const [seenZone, setSeenZone] = (0, import_react53.useState)(timeZone);
8046
8132
  if (seenDate !== localDate) {
8047
8133
  setSeenDate(localDate);
8048
8134
  setFetched({ status: "idle", groups: EMPTY });
@@ -8054,7 +8140,7 @@ function useScheduleDay(opts) {
8054
8140
  setFetched({ status: "idle", groups: EMPTY });
8055
8141
  }
8056
8142
  const isToday = localDate === today;
8057
- (0, import_react52.useEffect)(() => {
8143
+ (0, import_react53.useEffect)(() => {
8058
8144
  if (!enabled || isToday || daysRef.current.has(localDate)) return;
8059
8145
  let cancelled = false;
8060
8146
  setFetched({ status: "loading", groups: EMPTY });
@@ -8076,7 +8162,7 @@ function useScheduleDay(opts) {
8076
8162
  cancelled = true;
8077
8163
  };
8078
8164
  }, [localDate, isToday, enabled, retryKey, resetKey, timeZone]);
8079
- const retry = (0, import_react52.useCallback)(() => {
8165
+ const retry = (0, import_react53.useCallback)(() => {
8080
8166
  setRetryKey((k) => k + 1);
8081
8167
  }, []);
8082
8168
  if (isToday) return { status: "ready", groups: todayGroups, retry };
@@ -8089,7 +8175,7 @@ function useScheduleDay(opts) {
8089
8175
  // src/useMatchesDay.ts
8090
8176
  function useMatchesDay({ discovery, day, sport, getSchedule, enabled, timeZone }) {
8091
8177
  const { localDate: today, matchDays } = discovery;
8092
- const chips = (0, import_react53.useMemo)(() => buildDayChips(today, matchDays, sport), [today, matchDays, sport]);
8178
+ const chips = (0, import_react54.useMemo)(() => buildDayChips(today, matchDays, sport), [today, matchDays, sport]);
8093
8179
  const selected = chips.some((c) => c.date === day) ? day : today;
8094
8180
  const loaded = useScheduleDay({
8095
8181
  localDate: selected,
@@ -8103,8 +8189,8 @@ function useMatchesDay({ discovery, day, sport, getSchedule, enabled, timeZone }
8103
8189
  return { ...loaded, chips, selected };
8104
8190
  }
8105
8191
  function useMatchesDayPick(today) {
8106
- const [pick, setPick] = (0, import_react53.useState)(null);
8107
- const setDay = (0, import_react53.useCallback)((d) => setPick({ day: d, madeOn: today }), [today]);
8192
+ const [pick, setPick] = (0, import_react54.useState)(null);
8193
+ const setDay = (0, import_react54.useCallback)((d) => setPick({ day: d, madeOn: today }), [today]);
8108
8194
  return [pick !== null && pick.madeOn === today ? pick.day : today, setDay];
8109
8195
  }
8110
8196
 
@@ -8201,11 +8287,11 @@ var WIRE_TO_PUBLIC = {
8201
8287
  };
8202
8288
 
8203
8289
  // src/popupTelemetry.ts
8204
- var import_react54 = require("react");
8290
+ var import_react55 = require("react");
8205
8291
  function usePopupTelemetry(log, isOpen, popupText, dismissPopup, confirmedShown) {
8206
- const shownRef = (0, import_react54.useRef)(/* @__PURE__ */ new Set());
8207
- const closedTextRef = (0, import_react54.useRef)(null);
8208
- (0, import_react54.useEffect)(() => {
8292
+ const shownRef = (0, import_react55.useRef)(/* @__PURE__ */ new Set());
8293
+ const closedTextRef = (0, import_react55.useRef)(null);
8294
+ (0, import_react55.useEffect)(() => {
8209
8295
  if (isOpen) {
8210
8296
  if (closedTextRef.current) log?.log({ name: "popup_opened" });
8211
8297
  closedTextRef.current = null;
@@ -8218,28 +8304,28 @@ function usePopupTelemetry(log, isOpen, popupText, dismissPopup, confirmedShown)
8218
8304
  log?.log({ name: "popup_shown" });
8219
8305
  }
8220
8306
  }, [log, isOpen, popupText, confirmedShown]);
8221
- return (0, import_react54.useCallback)(() => {
8307
+ return (0, import_react55.useCallback)(() => {
8222
8308
  log?.log({ name: "popup_dismissed" });
8223
8309
  dismissPopup();
8224
8310
  }, [log, dismissPopup]);
8225
8311
  }
8226
8312
 
8227
8313
  // src/mobileBinding.ts
8228
- var import_react55 = require("react");
8314
+ var import_react56 = require("react");
8229
8315
  var CLEARED = { text: null, asks: [] };
8230
8316
  function useMobileBinding(args) {
8231
8317
  const { binding, panelOpen, popupText, asks, cta, price } = args;
8232
- const latest = (0, import_react55.useRef)(args);
8318
+ const latest = (0, import_react56.useRef)(args);
8233
8319
  latest.current = args;
8234
- const bindingRef = (0, import_react55.useRef)(binding);
8320
+ const bindingRef = (0, import_react56.useRef)(binding);
8235
8321
  bindingRef.current = binding;
8236
- const backRef = (0, import_react55.useRef)(null);
8237
- const priceRef = (0, import_react55.useRef)(null);
8238
- const priceInFlight = (0, import_react55.useRef)(/* @__PURE__ */ new Set()).current;
8239
- const [confirmedShown, setConfirmedShown] = (0, import_react55.useState)(null);
8322
+ const backRef = (0, import_react56.useRef)(null);
8323
+ const priceRef = (0, import_react56.useRef)(null);
8324
+ const priceInFlight = (0, import_react56.useRef)(/* @__PURE__ */ new Set()).current;
8325
+ const [confirmedShown, setConfirmedShown] = (0, import_react56.useState)(null);
8240
8326
  const teaserKey = panelOpen || !popupText ? "" : JSON.stringify([popupText, asks.map((a) => a.label), cta, price]);
8241
- const reported = (0, import_react55.useRef)({ binding: void 0, key: "" });
8242
- (0, import_react55.useEffect)(() => {
8327
+ const reported = (0, import_react56.useRef)({ binding: void 0, key: "" });
8328
+ (0, import_react56.useEffect)(() => {
8243
8329
  if (!binding) return;
8244
8330
  const prev = reported.current;
8245
8331
  if (prev.binding === binding && prev.key === teaserKey) return;
@@ -8247,7 +8333,7 @@ function useMobileBinding(args) {
8247
8333
  if (teaserKey === "" && prev.binding !== binding) return;
8248
8334
  binding.onTeaser(teaserKey === "" ? CLEARED : { text: popupText, asks: asks.map((a, index) => ({ index, label: a.label })), ...cta ? { cta } : {}, ...price ? { price } : {} });
8249
8335
  }, [binding, teaserKey]);
8250
- (0, import_react55.useEffect)(() => {
8336
+ (0, import_react56.useEffect)(() => {
8251
8337
  if (!binding) return;
8252
8338
  binding.onHandle({
8253
8339
  open: () => latest.current.open(),
@@ -8273,23 +8359,23 @@ function useMobileBinding(args) {
8273
8359
  });
8274
8360
  return () => binding.onHandle(null);
8275
8361
  }, [binding]);
8276
- const onCloseRequested = (0, import_react55.useCallback)(() => bindingRef.current?.onCloseRequested(), []);
8277
- const onRegisterBack = (0, import_react55.useCallback)((fn) => {
8362
+ const onCloseRequested = (0, import_react56.useCallback)(() => bindingRef.current?.onCloseRequested(), []);
8363
+ const onRegisterBack = (0, import_react56.useCallback)((fn) => {
8278
8364
  backRef.current = fn;
8279
8365
  }, []);
8280
- const onRegisterPrice = (0, import_react55.useCallback)((fn) => {
8366
+ const onRegisterPrice = (0, import_react56.useCallback)((fn) => {
8281
8367
  priceRef.current = fn;
8282
8368
  }, []);
8283
- const onPriceResult = (0, import_react55.useCallback)((result) => bindingRef.current?.onPriceResult(result), []);
8369
+ const onPriceResult = (0, import_react56.useCallback)((result) => bindingRef.current?.onPriceResult(result), []);
8284
8370
  if (!binding) return { confirmedShown: void 0, onCloseRequested: void 0, onRegisterBack: void 0, onRegisterPrice: void 0, onPriceResult: void 0, priceInFlight: void 0 };
8285
8371
  return { confirmedShown, onCloseRequested, onRegisterBack, onRegisterPrice, onPriceResult, priceInFlight };
8286
8372
  }
8287
8373
 
8288
8374
  // src/openTelemetry.ts
8289
- var import_react56 = require("react");
8375
+ var import_react57 = require("react");
8290
8376
  function useOpenTelemetry(log, isOpen) {
8291
- const openLoggedRef = (0, import_react56.useRef)(false);
8292
- (0, import_react56.useEffect)(() => {
8377
+ const openLoggedRef = (0, import_react57.useRef)(false);
8378
+ (0, import_react57.useEffect)(() => {
8293
8379
  if (!isOpen) {
8294
8380
  openLoggedRef.current = false;
8295
8381
  return;
@@ -8301,26 +8387,27 @@ function useOpenTelemetry(log, isOpen) {
8301
8387
  }
8302
8388
 
8303
8389
  // src/components/ChatFab.tsx
8304
- var import_react58 = require("react");
8390
+ var import_react59 = require("react");
8305
8391
 
8306
8392
  // src/components/BrandMark.tsx
8307
- var import_react57 = require("react");
8393
+ var import_react58 = require("react");
8308
8394
  var import_jsx_runtime34 = require("react/jsx-runtime");
8309
8395
  function BrandMark({ logoUrl, className }) {
8310
- const [failed, setFailed] = (0, import_react57.useState)(false);
8396
+ const [failed, setFailed] = (0, import_react58.useState)(false);
8311
8397
  if (!logoUrl || failed) return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SsMark, { className });
8312
8398
  return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("img", { className, src: logoUrl, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
8313
8399
  }
8314
8400
 
8315
8401
  // src/components/GreetingBubble.tsx
8316
8402
  var import_jsx_runtime35 = require("react/jsx-runtime");
8317
- function GreetingBubble({ text: text2, onOpen, onDismiss, dismissLabel, asks, cta, onCta, price }) {
8403
+ function GreetingBubble({ text: text2, game, onOpen, onDismiss, dismissLabel, asks, cta, onCta, price }) {
8318
8404
  const body = /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("button", { type: "button", className: "ss-w-greeting-body", onClick: onOpen, children: [
8319
8405
  /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "ss-w-greeting-dots", "aria-hidden": "true", children: [
8320
8406
  /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("i", {}),
8321
8407
  /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("i", {}),
8322
8408
  /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("i", {})
8323
8409
  ] }),
8410
+ game ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "ss-w-greeting-game", children: game }) : null,
8324
8411
  /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "ss-w-greeting-text", children: text2 })
8325
8412
  ] });
8326
8413
  const dismiss = onDismiss ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("button", { type: "button", className: "ss-w-greeting-x", "aria-label": dismissLabel, onClick: onDismiss, children: "\xD7" }) : null;
@@ -8346,13 +8433,13 @@ function GreetingBubble({ text: text2, onOpen, onDismiss, dismissLabel, asks, ct
8346
8433
 
8347
8434
  // src/components/ChatFab.tsx
8348
8435
  var import_jsx_runtime36 = require("react/jsx-runtime");
8349
- function ChatFab({ label, busy = false, greeting, popupText, logoUrl, onOpen, onDismissPopup, dismissLabel, introAllowed = false, onIntroStart, asks, cta, onCta, onBubbleClick, price }) {
8436
+ function ChatFab({ label, busy = false, greeting, popupText, logoUrl, onOpen, onDismissPopup, dismissLabel, introAllowed = false, onIntroStart, asks, cta, onCta, onBubbleClick, price, game }) {
8350
8437
  const bubble = popupText ?? greeting;
8351
8438
  const hidden = busy && !label;
8352
8439
  const track = useTrack();
8353
- const [intro, setIntro] = (0, import_react58.useState)(false);
8354
- const armedRef = (0, import_react58.useRef)(introAllowed);
8355
- (0, import_react58.useEffect)(() => {
8440
+ const [intro, setIntro] = (0, import_react59.useState)(false);
8441
+ const armedRef = (0, import_react59.useRef)(introAllowed);
8442
+ (0, import_react59.useEffect)(() => {
8356
8443
  if (armedRef.current && bubble) {
8357
8444
  armedRef.current = false;
8358
8445
  setIntro(true);
@@ -8360,7 +8447,7 @@ function ChatFab({ label, busy = false, greeting, popupText, logoUrl, onOpen, on
8360
8447
  }
8361
8448
  }, [bubble, onIntroStart]);
8362
8449
  return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: intro ? "ss-w-fab-wrap ss-w-intro" : "ss-w-fab-wrap", children: [
8363
- bubble ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(GreetingBubble, { text: bubble, onOpen: () => {
8450
+ bubble ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(GreetingBubble, { text: bubble, game: popupText ? game : void 0, onOpen: () => {
8364
8451
  track({ name: "bubble_click" });
8365
8452
  if (popupText && !cta) onBubbleClick?.();
8366
8453
  onOpen();
@@ -8373,30 +8460,37 @@ function ChatFab({ label, busy = false, greeting, popupText, logoUrl, onOpen, on
8373
8460
  }
8374
8461
 
8375
8462
  // src/components/BubblePrice.tsx
8376
- var import_react59 = require("react");
8463
+ var import_react60 = require("react");
8377
8464
  var import_jsx_runtime37 = require("react/jsx-runtime");
8378
8465
  function BubblePrice({ matchId, price, conversation, slip, ui, hook, sport }) {
8379
- const selections = (0, import_react59.useMemo)(() => [price.selection], [price.selection]);
8466
+ const selections = (0, import_react60.useMemo)(() => [price.selection], [price.selection]);
8380
8467
  const add = useRepriceAdd({ conversation, locale: ui.hostTag, slip, ui, sport });
8381
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "ss-w-greeting-price", children: [
8382
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ss-w-v2-market", children: price.marketLabel }),
8383
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(PriceButtons, { selections, ui, onAdd: add ? (s) => add(matchId, price.market, s, hook) : void 0 })
8384
- ] });
8468
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "ss-w-greeting-pick", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(PriceButtons, { selections, ui, rowLabel: price.label || price.selection.label, sport, onAdd: add ? (s) => add(matchId, price.market, s, hook) : void 0 }) });
8385
8469
  }
8386
8470
 
8387
8471
  // src/components/MobileBubblePrice.tsx
8388
- var import_react60 = require("react");
8472
+ var import_react61 = require("react");
8389
8473
  function MobileBubblePrice(props) {
8390
8474
  const add = useRepriceAdd({ conversation: props.conversation, locale: props.ui.hostTag, slip: props.slip, ui: props.ui, sport: props.sport });
8391
- const latest = (0, import_react60.useRef)({ props, add });
8392
- latest.current = { props, add };
8475
+ const marks = useSettledMarks();
8476
+ const latest = (0, import_react61.useRef)({ props, add, marks });
8477
+ latest.current = { props, add, marks };
8393
8478
  const { onRegister, inFlight: inFlight2 } = props;
8394
- (0, import_react60.useEffect)(() => {
8479
+ (0, import_react61.useEffect)(() => {
8395
8480
  onRegister(() => {
8396
- const { props: p, add: run } = latest.current;
8481
+ const { props: p, add: run, marks: m } = latest.current;
8397
8482
  const id = p.price.selection.matchOddsId;
8398
8483
  if (inFlight2.has(id)) return;
8484
+ const key = slipKey({ matchOddsId: id, sport: slipSportOfWire(p.sport) });
8485
+ if (m.isSettled(key)) {
8486
+ try {
8487
+ p.onResult({ matchOddsId: id, outcome: "added", text: null });
8488
+ } catch {
8489
+ }
8490
+ return;
8491
+ }
8399
8492
  const report = (r) => {
8493
+ if (r.outcome === "added") latest.current.marks.settle(key);
8400
8494
  const now = latest.current.props;
8401
8495
  try {
8402
8496
  now.onResult({ matchOddsId: id, outcome: r.outcome, text: r.toast?.text ?? (r.outcome === "gone" ? now.ui.v2PriceGone : null) });
@@ -8421,7 +8515,7 @@ function MobileBubblePrice(props) {
8421
8515
  var import_react122 = require("react");
8422
8516
 
8423
8517
  // src/components/ChatHeader.tsx
8424
- var import_react61 = require("react");
8518
+ var import_react62 = require("react");
8425
8519
  var import_jsx_runtime38 = require("react/jsx-runtime");
8426
8520
  function ChatHeader({
8427
8521
  onClose,
@@ -8437,18 +8531,18 @@ function ChatHeader({
8437
8531
  onOpenFavourites,
8438
8532
  favouritesLabel
8439
8533
  }) {
8440
- const [menuOpen, setMenuOpen] = (0, import_react61.useState)(false);
8441
- const wrapRef = (0, import_react61.useRef)(null);
8442
- const kebabRef = (0, import_react61.useRef)(null);
8443
- const firstItemRef = (0, import_react61.useRef)(null);
8534
+ const [menuOpen, setMenuOpen] = (0, import_react62.useState)(false);
8535
+ const wrapRef = (0, import_react62.useRef)(null);
8536
+ const kebabRef = (0, import_react62.useRef)(null);
8537
+ const firstItemRef = (0, import_react62.useRef)(null);
8444
8538
  const hasNew = !!(canReset && onNewConversation);
8445
8539
  const hasSettings = !!onOpenSettings;
8446
8540
  const hasFavourites = !!onOpenFavourites;
8447
8541
  const hasMenu = hasFavourites || hasNew || hasSettings;
8448
- (0, import_react61.useEffect)(() => {
8542
+ (0, import_react62.useEffect)(() => {
8449
8543
  if (menuOpen) firstItemRef.current?.focus();
8450
8544
  }, [menuOpen]);
8451
- (0, import_react61.useEffect)(() => {
8545
+ (0, import_react62.useEffect)(() => {
8452
8546
  if (!menuOpen) return;
8453
8547
  const onPointer = (e) => {
8454
8548
  if (!(wrapRef.current && e.composedPath().includes(wrapRef.current))) setMenuOpen(false);
@@ -8536,10 +8630,10 @@ function ChatHeader({
8536
8630
  }
8537
8631
 
8538
8632
  // src/components/MessageList.tsx
8539
- var import_react76 = require("react");
8633
+ var import_react77 = require("react");
8540
8634
 
8541
8635
  // src/components/ChatMessage.tsx
8542
- var import_react75 = require("react");
8636
+ var import_react76 = require("react");
8543
8637
 
8544
8638
  // src/components/Markdown.tsx
8545
8639
  var import_react_markdown = __toESM(require("react-markdown"), 1);
@@ -8557,7 +8651,7 @@ function Markdown({ text: text2 }) {
8557
8651
  }
8558
8652
 
8559
8653
  // src/components/EntityCardList.tsx
8560
- var import_react62 = require("react");
8654
+ var import_react63 = require("react");
8561
8655
  var import_jsx_runtime40 = require("react/jsx-runtime");
8562
8656
  var MAX_VISIBLE = 3;
8563
8657
  var RECORD_RE = /^(\d+)-(\d+)-(\d+)$/;
@@ -8660,7 +8754,7 @@ function ScopeTabs({ scopes, active, onSelect }) {
8660
8754
  )) });
8661
8755
  }
8662
8756
  function EntityCardItem({ c }) {
8663
- const [active, setActive] = (0, import_react62.useState)(0);
8757
+ const [active, setActive] = (0, import_react63.useState)(0);
8664
8758
  const hasBody = c.scopes.length > 0;
8665
8759
  if (!hasBody) {
8666
8760
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "ss-w-ecard ss-w-ecard-bare", "data-kind": c.kind, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CardHeader, { c, showScopeCrest: false }) });
@@ -8675,7 +8769,7 @@ function EntityCardItem({ c }) {
8675
8769
  ] });
8676
8770
  }
8677
8771
  function EntityCardList({ cards, disabled, showLessLabel, showMoreLabel }) {
8678
- const [expanded, setExpanded] = (0, import_react62.useState)(false);
8772
+ const [expanded, setExpanded] = (0, import_react63.useState)(false);
8679
8773
  if (cards.length === 0) return null;
8680
8774
  const visible = expanded ? cards : cards.slice(0, MAX_VISIBLE);
8681
8775
  const overflow = cards.length - MAX_VISIBLE;
@@ -8824,20 +8918,20 @@ function BettingInsightList({ insights, ui, slip, monitor }) {
8824
8918
  }
8825
8919
 
8826
8920
  // src/components/ComboCardList.tsx
8827
- var import_react65 = require("react");
8921
+ var import_react66 = require("react");
8828
8922
 
8829
8923
  // src/components/AddAllToSlipButton.tsx
8830
- var import_react63 = require("react");
8924
+ var import_react64 = require("react");
8831
8925
  var import_jsx_runtime43 = require("react/jsx-runtime");
8832
8926
  function AddAllToSlipButton({ legs, slip, ui, labels, combo, chatCombo, sizeless, hold, onStartedGame }) {
8833
8927
  const add = useSlipAdd(slip, ui);
8834
8928
  const slipState = useSlipState();
8835
8929
  const log = useEventLog();
8836
8930
  const track = useTrack();
8837
- const [pending, setPending] = (0, import_react63.useState)(false);
8838
- const [settledLocal, setSettledLocal] = (0, import_react63.useState)({});
8839
- const [toast, setToast] = (0, import_react63.useState)(null);
8840
- const dismiss = (0, import_react63.useCallback)(() => setToast(null), []);
8931
+ const [pending, setPending] = (0, import_react64.useState)(false);
8932
+ const [settledLocal, setSettledLocal] = (0, import_react64.useState)({});
8933
+ const [toast, setToast] = (0, import_react64.useState)(null);
8934
+ const dismiss = (0, import_react64.useCallback)(() => setToast(null), []);
8841
8935
  if (!slip.onAddToSlip || legs.length < 2) return null;
8842
8936
  const settled = slipState ? slipState.settled : settledLocal;
8843
8937
  const open = legs.filter((leg) => !settled[slipKey(leg)]);
@@ -8910,10 +9004,10 @@ function AddAllToSlipButton({ legs, slip, ui, labels, combo, chatCombo, sizeless
8910
9004
  }
8911
9005
 
8912
9006
  // src/presetToolsContext.ts
8913
- var import_react64 = require("react");
8914
- var PresetToolsContext = (0, import_react64.createContext)(null);
9007
+ var import_react65 = require("react");
9008
+ var PresetToolsContext = (0, import_react65.createContext)(null);
8915
9009
  function usePresetTools() {
8916
- return (0, import_react64.useContext)(PresetToolsContext);
9010
+ return (0, import_react65.useContext)(PresetToolsContext);
8917
9011
  }
8918
9012
 
8919
9013
  // src/components/ComboCardList.tsx
@@ -8927,7 +9021,7 @@ function ComboLegRow({ leg, addToSlipEnabled, ui, slip, monitor, hold, closed, s
8927
9021
  const showPin = !!monitor && leg.pinEnabled;
8928
9022
  const factText = leg.fact ? (leg.fact.direction === "over" ? ui.presets.legFactOver : ui.presets.legFactUnder)(leg.fact.hits, leg.fact.games) : void 0;
8929
9023
  const line = leg.statText ?? factText;
8930
- const noteId = (0, import_react65.useId)();
9024
+ const noteId = (0, import_react66.useId)();
8931
9025
  return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("li", { className: "ss-w-combo-leg", children: [
8932
9026
  leg.competition || kickoff || showPin ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "ss-w-combo-leg-meta", children: [
8933
9027
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "ss-w-bi-comp", children: leg.competition ?? "" }),
@@ -9551,7 +9645,7 @@ function NbaInsightList({ insights, ui, slip, monitor }) {
9551
9645
  }
9552
9646
 
9553
9647
  // src/components/NflInsightList.tsx
9554
- var import_react66 = require("react");
9648
+ var import_react67 = require("react");
9555
9649
 
9556
9650
  // src/strings/types.ts
9557
9651
  var fillNfl = (template, values) => template.replace(/\{(\w+)\}/g, (whole, key) => key in values ? String(values[key]) : whole);
@@ -9568,7 +9662,7 @@ function teamImage(vm, abbr) {
9568
9662
  return void 0;
9569
9663
  }
9570
9664
  function Badge({ abbr, url }) {
9571
- const [failed, setFailed] = (0, import_react66.useState)(false);
9665
+ const [failed, setFailed] = (0, import_react67.useState)(false);
9572
9666
  if (url && !failed) {
9573
9667
  return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("img", { className: "ss-w-nfl-badge ss-w-nfl-badge--img", src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
9574
9668
  }
@@ -10179,8 +10273,8 @@ function TennisInsightList({ insights, ui }) {
10179
10273
  }
10180
10274
 
10181
10275
  // src/components/CompactOddsList.tsx
10182
- var import_react67 = require("react");
10183
- var import_widget_sdk24 = require("@sensiblestats/widget-sdk");
10276
+ var import_react68 = require("react");
10277
+ var import_widget_sdk23 = require("@sensiblestats/widget-sdk");
10184
10278
 
10185
10279
  // src/compactList.ts
10186
10280
  var COMPACT_MIN_CARDS = 3;
@@ -10278,7 +10372,7 @@ function Row2({ row, columns, ui, slip, monitor, rowRef }) {
10278
10372
  const vm = row.card;
10279
10373
  useNextKickoffRender(isNfl(vm.sport) ? [vm.kickoffUtc] : []);
10280
10374
  const count2 = allMarketsCount(vm, monitor);
10281
- const nflPin = (0, import_widget_sdk24.sportOf)(vm.sport) === "americanfootball" && !vm.isLive;
10375
+ const nflPin = (0, import_widget_sdk23.sportOf)(vm.sport) === "americanfootball" && !vm.isLive;
10282
10376
  const kickoffFallback = vm.kickoffUtc ? ui.bettingKickoff(vm.kickoffUtc) : void 0;
10283
10377
  const when = vm.isLive ? ui.liveLabel : vm.kickoffLabel ?? (kickoffFallback ? `${kickoffFallback.dayLabel} ${kickoffFallback.time}` : void 0);
10284
10378
  return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "ss-w-mol-row", ref: rowRef, tabIndex: rowRef ? -1 : void 0, children: [
@@ -10296,16 +10390,16 @@ function Row2({ row, columns, ui, slip, monitor, rowRef }) {
10296
10390
  /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "ss-w-mol-cells", style: { gridTemplateColumns: `repeat(${row.cells.length || columns}, minmax(0, 1fr))` }, children: row.cells.map((cell2) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Cell2, { row, cell: cell2, ui, slip }, cell2.row.key)) }),
10297
10391
  /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: vm.isLive ? "ss-w-mol-side ss-w-mol-side--live" : "ss-w-mol-side", children: [
10298
10392
  when ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "ss-w-mol-when", children: when }) : null,
10299
- count2 !== null && monitor && ui ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(AllMarketsButton, { vm, count: count2, monitor, ui, surface: "list" }) : monitor && (vm.pinEnabled && vm.isLive || nflPin) && (0, import_widget_sdk24.mayPinOrSlip)(vm.sport) ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PinToggle, { ui, monitor, pin: { kind: "match", matchId: vm.matchId, sport: (0, import_widget_sdk24.slipSportOf)(vm.sport) } }) : null
10393
+ count2 !== null && monitor && ui ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(AllMarketsButton, { vm, count: count2, monitor, ui, surface: "list" }) : monitor && (vm.pinEnabled && vm.isLive || nflPin) && (0, import_widget_sdk23.mayPinOrSlip)(vm.sport) ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PinToggle, { ui, monitor, pin: { kind: "match", matchId: vm.matchId, sport: (0, import_widget_sdk23.slipSportOf)(vm.sport) } }) : null
10300
10394
  ] })
10301
10395
  ] });
10302
10396
  }
10303
10397
  function CompactOddsList({ list, ui, slip, monitor }) {
10304
- const [shown2, setShown] = (0, import_react67.useState)(COMPACT_PAGE);
10398
+ const [shown2, setShown] = (0, import_react68.useState)(COMPACT_PAGE);
10305
10399
  const hidden = list.rowCount - shown2;
10306
- const [focusIndex, setFocusIndex] = (0, import_react67.useState)(null);
10307
- const focusRef = (0, import_react67.useRef)(null);
10308
- (0, import_react67.useEffect)(() => {
10400
+ const [focusIndex, setFocusIndex] = (0, import_react68.useState)(null);
10401
+ const focusRef = (0, import_react68.useRef)(null);
10402
+ (0, import_react68.useEffect)(() => {
10309
10403
  if (focusIndex !== null) focusRef.current?.focus();
10310
10404
  }, [focusIndex]);
10311
10405
  let left = shown2;
@@ -10540,7 +10634,7 @@ function FixtureCard({ card, ui }) {
10540
10634
  }
10541
10635
 
10542
10636
  // src/components/dashboard/CountdownCard.tsx
10543
- var import_react68 = require("react");
10637
+ var import_react69 = require("react");
10544
10638
  var import_jsx_runtime52 = require("react/jsx-runtime");
10545
10639
  var DAY_MS3 = 864e5;
10546
10640
  function remainingSegments(kickoffUnix, nowMs, withSeconds) {
@@ -10559,12 +10653,12 @@ function remainingSegments(kickoffUnix, nowMs, withSeconds) {
10559
10653
  function CountdownCard({ card, ui }) {
10560
10654
  const { data } = card;
10561
10655
  const unitLabel = { d: data.daysUnit, h: data.hoursUnit, m: data.minutesUnit, s: data.secondsUnit };
10562
- const [nowMs, setNowMs] = (0, import_react68.useState)(() => Date.now());
10563
- const [reduced] = (0, import_react68.useState)(
10656
+ const [nowMs, setNowMs] = (0, import_react69.useState)(() => Date.now());
10657
+ const [reduced] = (0, import_react69.useState)(
10564
10658
  () => typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches
10565
10659
  );
10566
10660
  const withinDay = data.kickoffUnix * 1e3 - nowMs < DAY_MS3;
10567
- (0, import_react68.useEffect)(() => {
10661
+ (0, import_react69.useEffect)(() => {
10568
10662
  if (reduced) return;
10569
10663
  const id = window.setInterval(() => setNowMs(Date.now()), withinDay ? 1e3 : 6e4);
10570
10664
  return () => window.clearInterval(id);
@@ -10572,7 +10666,7 @@ function CountdownCard({ card, ui }) {
10572
10666
  const segments = remainingSegments(data.kickoffUnix, nowMs, withinDay && !reduced);
10573
10667
  return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "ss-w-fandash-card ss-w-fandash-countdown", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "ss-w-fandash-countdown-top", children: [
10574
10668
  /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "ss-w-fandash-eyebrow", children: card.title ?? ui.countdownTitle }),
10575
- segments ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "ss-w-fandash-countdown-clock", children: segments.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_react68.Fragment, { children: [
10669
+ segments ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "ss-w-fandash-countdown-clock", children: segments.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_react69.Fragment, { children: [
10576
10670
  i > 0 ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "ss-w-fandash-countdown-colon", children: ":" }) : null,
10577
10671
  /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: "ss-w-fandash-countdown-seg", children: [
10578
10672
  /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "ss-w-fandash-countdown-value", children: s.value }),
@@ -10583,7 +10677,7 @@ function CountdownCard({ card, ui }) {
10583
10677
  }
10584
10678
 
10585
10679
  // src/components/dashboard/InjuriesCard.tsx
10586
- var import_react69 = require("react");
10680
+ var import_react70 = require("react");
10587
10681
  var import_jsx_runtime53 = require("react/jsx-runtime");
10588
10682
  var SHOWN = 3;
10589
10683
  function ColHead({ name, crestUrl }) {
@@ -10606,7 +10700,7 @@ function InjuryList({ rows, emptyLabel, limit }) {
10606
10700
  }
10607
10701
  function InjuriesCard({ card, ui }) {
10608
10702
  const { data } = card;
10609
- const [expanded, setExpanded] = (0, import_react69.useState)(false);
10703
+ const [expanded, setExpanded] = (0, import_react70.useState)(false);
10610
10704
  const hidden = Math.max(0, data.ours.length - SHOWN) + Math.max(0, data.theirs.length - SHOWN);
10611
10705
  const limit = expanded ? void 0 : SHOWN;
10612
10706
  const { showMore, showLess } = ui;
@@ -10711,7 +10805,7 @@ function LinksCard({ card }) {
10711
10805
  }
10712
10806
 
10713
10807
  // src/components/dashboard/PostMatchResultCard.tsx
10714
- var import_react70 = require("react");
10808
+ var import_react71 = require("react");
10715
10809
  var import_jsx_runtime59 = require("react/jsx-runtime");
10716
10810
  function initials3(name) {
10717
10811
  return name.trim().slice(0, 3).toUpperCase();
@@ -10721,7 +10815,7 @@ function PostMatchCrest({
10721
10815
  name,
10722
10816
  side
10723
10817
  }) {
10724
- const [failed, setFailed] = (0, import_react70.useState)(false);
10818
+ const [failed, setFailed] = (0, import_react71.useState)(false);
10725
10819
  const cls = `ss-w-fandash-postmatch-crest ss-w-fandash-postmatch-crest--${side}`;
10726
10820
  if (url && !failed) {
10727
10821
  return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("img", { className: cls, src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
@@ -10920,10 +11014,10 @@ function RestingFormCard({ card }) {
10920
11014
  }
10921
11015
 
10922
11016
  // src/components/dashboard/LiveScoreCard.tsx
10923
- var import_react72 = require("react");
11017
+ var import_react73 = require("react");
10924
11018
 
10925
11019
  // src/useLiveClock.ts
10926
- var import_react71 = require("react");
11020
+ var import_react72 = require("react");
10927
11021
  var TICK_MS = 6e4;
10928
11022
  var MAX_LIVE_TICK_MINUTES = 15;
10929
11023
  function computeDisplayMinute(minute, clockRunning, receivedAtMs) {
@@ -10932,10 +11026,10 @@ function computeDisplayMinute(minute, clockRunning, receivedAtMs) {
10932
11026
  return minute + Math.min(Math.max(0, elapsedMinutes), MAX_LIVE_TICK_MINUTES);
10933
11027
  }
10934
11028
  function useLiveClock(minute, clockRunning, receivedAtMs) {
10935
- const [displayMinute, setDisplayMinute] = (0, import_react71.useState)(
11029
+ const [displayMinute, setDisplayMinute] = (0, import_react72.useState)(
10936
11030
  () => computeDisplayMinute(minute, clockRunning, receivedAtMs)
10937
11031
  );
10938
- (0, import_react71.useEffect)(() => {
11032
+ (0, import_react72.useEffect)(() => {
10939
11033
  setDisplayMinute(computeDisplayMinute(minute, clockRunning, receivedAtMs));
10940
11034
  if (!clockRunning) return;
10941
11035
  const id = window.setInterval(() => {
@@ -10952,7 +11046,7 @@ function initials5(name) {
10952
11046
  return name.trim().slice(0, 3).toUpperCase();
10953
11047
  }
10954
11048
  function LiveCrest({ url, name, side }) {
10955
- const [failed, setFailed] = (0, import_react72.useState)(false);
11049
+ const [failed, setFailed] = (0, import_react73.useState)(false);
10956
11050
  const cls = `ss-w-fandash-live-crest ss-w-fandash-live-crest--${side}`;
10957
11051
  if (url && !failed) {
10958
11052
  return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("img", { className: cls, src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
@@ -10974,7 +11068,7 @@ function LiveScoreCard({
10974
11068
  }) {
10975
11069
  const { data } = card;
10976
11070
  const seedKey = `${data.minute}:${data.homeScore}:${data.awayScore}`;
10977
- const seedRef = (0, import_react72.useRef)(null);
11071
+ const seedRef = (0, import_react73.useRef)(null);
10978
11072
  if (!seedRef.current || seedRef.current.key !== seedKey) {
10979
11073
  seedRef.current = { key: seedKey, receivedAtMs: Date.now() };
10980
11074
  }
@@ -11020,7 +11114,7 @@ function LiveScoreCard({
11020
11114
  }
11021
11115
 
11022
11116
  // src/components/dashboard/LiveTimelineCard.tsx
11023
- var import_react73 = require("react");
11117
+ var import_react74 = require("react");
11024
11118
  var import_jsx_runtime69 = require("react/jsx-runtime");
11025
11119
  var SHOWN2 = 3;
11026
11120
  function EventIcon({ type }) {
@@ -11062,7 +11156,7 @@ function EventRow({ e }) {
11062
11156
  ] });
11063
11157
  }
11064
11158
  function LiveTimelineCard({ card, ui }) {
11065
- const [expanded, setExpanded] = (0, import_react73.useState)(false);
11159
+ const [expanded, setExpanded] = (0, import_react74.useState)(false);
11066
11160
  const events = card.data.events;
11067
11161
  if (!events || events.length === 0) return null;
11068
11162
  const sorted2 = [...events].sort((a, b) => b.minute - a.minute);
@@ -11086,7 +11180,7 @@ function LiveTimelineCard({ card, ui }) {
11086
11180
  }
11087
11181
 
11088
11182
  // src/components/dashboard/MomentumWave.tsx
11089
- var import_react74 = require("react");
11183
+ var import_react75 = require("react");
11090
11184
  var import_jsx_runtime70 = require("react/jsx-runtime");
11091
11185
  var WIDTH = 270;
11092
11186
  var HEIGHT = 56;
@@ -11111,7 +11205,7 @@ function MomentumWave({
11111
11205
  }) {
11112
11206
  if (points.length === 0) return null;
11113
11207
  const { area, line, lastLeftPct, lastTopPx } = buildPaths(points);
11114
- const clipId = (0, import_react74.useId)();
11208
+ const clipId = (0, import_react75.useId)();
11115
11209
  const topClipId = `${clipId}-top`;
11116
11210
  const bottomClipId = `${clipId}-bottom`;
11117
11211
  const topClass = clubIsHome ? "ss-w-fandash-live-mom-home" : "ss-w-fandash-live-mom-away";
@@ -11261,7 +11355,7 @@ function FanDashboardCard({ card, onTap, ui, goalEvents }) {
11261
11355
  // src/components/ChatMessage.tsx
11262
11356
  var import_jsx_runtime73 = require("react/jsx-runtime");
11263
11357
  function ChatMessage({ message, disabled, onAct, onTap, ui, slip, monitor, onGreetingSport }) {
11264
- const [sport, setSport] = (0, import_react75.useState)(null);
11358
+ const [sport, setSport] = (0, import_react76.useState)(null);
11265
11359
  if (message.role === "user") {
11266
11360
  return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "ss-w-msg ss-w-user", "data-msg-id": message.id, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "ss-w-bubble", children: message.text }) });
11267
11361
  }
@@ -11316,11 +11410,11 @@ function turnAnchor(messages) {
11316
11410
  function MessageList({ controller, ui, slip, onDashboardTap, monitor, onGreetingSport }) {
11317
11411
  const { state, send } = controller;
11318
11412
  const { oddsFormat } = useOddsSettings();
11319
- const listRef = (0, import_react76.useRef)(null);
11320
- const endRef = (0, import_react76.useRef)(null);
11321
- const pinnedRef = (0, import_react76.useRef)(true);
11322
- const anchoredTurnRef = (0, import_react76.useRef)(null);
11323
- (0, import_react76.useEffect)(() => {
11413
+ const listRef = (0, import_react77.useRef)(null);
11414
+ const endRef = (0, import_react77.useRef)(null);
11415
+ const pinnedRef = (0, import_react77.useRef)(true);
11416
+ const anchoredTurnRef = (0, import_react77.useRef)(null);
11417
+ (0, import_react77.useEffect)(() => {
11324
11418
  const anchor = turnAnchor(state.messages);
11325
11419
  const list = listRef.current;
11326
11420
  if (anchor && anchor.turnId !== anchoredTurnRef.current) {
@@ -11379,13 +11473,13 @@ function MessageList({ controller, ui, slip, onDashboardTap, monitor, onGreeting
11379
11473
  }
11380
11474
 
11381
11475
  // src/components/ChatInput.tsx
11382
- var import_react77 = require("react");
11476
+ var import_react78 = require("react");
11383
11477
  var import_jsx_runtime76 = require("react/jsx-runtime");
11384
- var ChatInput = (0, import_react77.forwardRef)(function ChatInput2({ placeholder, streaming, onSend, onStop, stopLabel, sendLabel, disabled = false }, ref) {
11385
- const [value, setValue] = (0, import_react77.useState)("");
11386
- const textareaRef = (0, import_react77.useRef)(null);
11387
- const stopRef = (0, import_react77.useRef)(null);
11388
- const textBoxWantsFocusRef = (0, import_react77.useRef)(false);
11478
+ var ChatInput = (0, import_react78.forwardRef)(function ChatInput2({ placeholder, streaming, onSend, onStop, stopLabel, sendLabel, disabled = false }, ref) {
11479
+ const [value, setValue] = (0, import_react78.useState)("");
11480
+ const textareaRef = (0, import_react78.useRef)(null);
11481
+ const stopRef = (0, import_react78.useRef)(null);
11482
+ const textBoxWantsFocusRef = (0, import_react78.useRef)(false);
11389
11483
  const submit = () => {
11390
11484
  if (disabled) return;
11391
11485
  const t = value.trim();
@@ -11399,7 +11493,7 @@ var ChatInput = (0, import_react77.forwardRef)(function ChatInput2({ placeholder
11399
11493
  submit();
11400
11494
  }
11401
11495
  };
11402
- (0, import_react77.useImperativeHandle)(ref, () => ({
11496
+ (0, import_react78.useImperativeHandle)(ref, () => ({
11403
11497
  focus() {
11404
11498
  const box = textareaRef.current;
11405
11499
  if (box && !box.disabled) {
@@ -11411,7 +11505,7 @@ var ChatInput = (0, import_react77.forwardRef)(function ChatInput2({ placeholder
11411
11505
  stopRef.current?.focus();
11412
11506
  }
11413
11507
  }), []);
11414
- (0, import_react77.useEffect)(() => {
11508
+ (0, import_react78.useEffect)(() => {
11415
11509
  if (streaming || disabled || !textBoxWantsFocusRef.current) return;
11416
11510
  textBoxWantsFocusRef.current = false;
11417
11511
  const box = textareaRef.current;
@@ -11442,7 +11536,7 @@ var ChatInput = (0, import_react77.forwardRef)(function ChatInput2({ placeholder
11442
11536
  });
11443
11537
 
11444
11538
  // src/components/TabBar.tsx
11445
- var import_react78 = require("react");
11539
+ var import_react79 = require("react");
11446
11540
  var import_jsx_runtime77 = require("react/jsx-runtime");
11447
11541
  var TIGHT_LEVELS = [0, 1, 2, 3, 4, 5, 6, 7];
11448
11542
  var FOCUS_EDGE = 24;
@@ -11465,16 +11559,16 @@ function TabBar({ monitor, ui, matchCount, trendsCount, liveCount, hasSchedule,
11465
11559
  ...gamesEnabled ? [{ tab: "games", label: ui.tabGames, count: 0, dot: false }] : []
11466
11560
  ];
11467
11561
  const track = useTrack();
11468
- const listRef = (0, import_react78.useRef)(null);
11562
+ const listRef = (0, import_react79.useRef)(null);
11469
11563
  const activeTab = monitor.activeTab;
11470
- (0, import_react78.useEffect)(() => {
11564
+ (0, import_react79.useEffect)(() => {
11471
11565
  const el = listRef.current?.querySelector("[data-on]");
11472
11566
  if (!el || typeof el.scrollIntoView !== "function") return;
11473
11567
  const reduce = typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
11474
11568
  el.scrollIntoView({ block: "nearest", inline: "nearest", behavior: reduce ? "auto" : "smooth" });
11475
11569
  }, [activeTab]);
11476
11570
  const labelSignature = tabs.map((t) => `${t.tab}:${t.label}:${t.count}`).join("|");
11477
- (0, import_react78.useLayoutEffect)(() => {
11571
+ (0, import_react79.useLayoutEffect)(() => {
11478
11572
  const strip = listRef.current;
11479
11573
  if (!strip) return;
11480
11574
  const measure = () => {
@@ -11498,7 +11592,7 @@ function TabBar({ monitor, ui, matchCount, trendsCount, liveCount, hasSchedule,
11498
11592
  fonts?.removeEventListener?.("loadingdone", measure);
11499
11593
  };
11500
11594
  }, [labelSignature]);
11501
- const pointerDown = (0, import_react78.useRef)(false);
11595
+ const pointerDown = (0, import_react79.useRef)(false);
11502
11596
  const keepFocusedTabInView = (e) => {
11503
11597
  const strip = e.currentTarget;
11504
11598
  const tab = e.target;
@@ -11558,10 +11652,10 @@ function TabBar({ monitor, ui, matchCount, trendsCount, liveCount, hasSchedule,
11558
11652
  }
11559
11653
 
11560
11654
  // src/components/MonitorTabs.tsx
11561
- var import_react91 = require("react");
11655
+ var import_react92 = require("react");
11562
11656
 
11563
11657
  // src/components/MarketAccordion.tsx
11564
- var import_widget_sdk25 = require("@sensiblestats/widget-sdk");
11658
+ var import_widget_sdk24 = require("@sensiblestats/widget-sdk");
11565
11659
  var import_jsx_runtime78 = require("react/jsx-runtime");
11566
11660
  function MarketAccordion({ match, monitor, ui, slip }) {
11567
11661
  const slipState = useSlipState();
@@ -11569,7 +11663,7 @@ function MarketAccordion({ match, monitor, ui, slip }) {
11569
11663
  if (markets.length === 0) return null;
11570
11664
  const mk = monitorMatchKey(match.sport, match.matchId);
11571
11665
  const open = monitor.openMarket[mk] ?? null;
11572
- const sport = (0, import_widget_sdk25.slipSportOf)(match.sport);
11666
+ const sport = (0, import_widget_sdk24.slipSportOf)(match.sport);
11573
11667
  return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "ss-w-acc", children: markets.map((m) => {
11574
11668
  const isOpen = open === m.marketDeveloperName && !m.suspended;
11575
11669
  const key = `${mk}:${m.marketDeveloperName}`;
@@ -11620,7 +11714,7 @@ function MarketAccordion({ match, monitor, ui, slip }) {
11620
11714
  }
11621
11715
 
11622
11716
  // src/components/MonitorFormH2H.tsx
11623
- var import_react79 = require("react");
11717
+ var import_react80 = require("react");
11624
11718
  var import_jsx_runtime79 = require("react/jsx-runtime");
11625
11719
  function resultClass2(result) {
11626
11720
  if (result === "W") return "ss-w-h2h-result--win";
@@ -11636,7 +11730,7 @@ function FormDots({ form, ui }) {
11636
11730
  return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "ss-w-h2h-dots", children: form.map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: `ss-w-h2h-result ${resultClass2(m.result)}`, children: resultLabel(m.result, ui) }, i)) });
11637
11731
  }
11638
11732
  function MonitorFormH2H({ formAndH2H, homeTeamName, awayTeamName, ui }) {
11639
- const [expanded, setExpanded] = (0, import_react79.useState)(false);
11733
+ const [expanded, setExpanded] = (0, import_react80.useState)(false);
11640
11734
  const { homeForm, awayForm, h2h, homeShortCode, awayShortCode } = formAndH2H;
11641
11735
  if (homeForm.length === 0 && awayForm.length === 0 && !h2h) {
11642
11736
  return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_jsx_runtime79.Fragment, {});
@@ -11714,10 +11808,10 @@ function MonitorFormH2H({ formAndH2H, homeTeamName, awayTeamName, ui }) {
11714
11808
  }
11715
11809
 
11716
11810
  // src/components/CompLogo.tsx
11717
- var import_react80 = require("react");
11811
+ var import_react81 = require("react");
11718
11812
  var import_jsx_runtime80 = require("react/jsx-runtime");
11719
11813
  function CompLogo({ url }) {
11720
- const [failed, setFailed] = (0, import_react80.useState)(null);
11814
+ const [failed, setFailed] = (0, import_react81.useState)(null);
11721
11815
  if (!url || failed === url) return null;
11722
11816
  return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("img", { className: "ss-w-mon-comp-logo", src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(url) });
11723
11817
  }
@@ -11875,7 +11969,7 @@ function MonitorSkeleton({ pin, monitor, ui }) {
11875
11969
  }
11876
11970
 
11877
11971
  // src/components/NbaMonitorCard.tsx
11878
- var import_react84 = require("react");
11972
+ var import_react85 = require("react");
11879
11973
 
11880
11974
  // src/sportLabel.ts
11881
11975
  var CODE = { football: "football", basketball: "nba", nba: "nba", americanfootball: "nfl", nfl: "nfl", tennis: "tennis" };
@@ -11885,7 +11979,7 @@ var sportLabel = (ui, sport) => {
11885
11979
  };
11886
11980
 
11887
11981
  // src/components/NbaFormSection.tsx
11888
- var import_react81 = require("react");
11982
+ var import_react82 = require("react");
11889
11983
 
11890
11984
  // src/components/NbaFormRest.tsx
11891
11985
  var import_jsx_runtime83 = require("react/jsx-runtime");
@@ -11985,8 +12079,8 @@ function Row3({ game, abbr, tonight, ui }) {
11985
12079
  ] });
11986
12080
  }
11987
12081
  function NbaFormSection({ match, monitor, ui }) {
11988
- const [open, setOpen] = (0, import_react81.useState)(false);
11989
- const [side, setSide] = (0, import_react81.useState)("away");
12082
+ const [open, setOpen] = (0, import_react82.useState)(false);
12083
+ const [side, setSide] = (0, import_react82.useState)("away");
11990
12084
  const form = useNbaForm(match, monitor);
11991
12085
  const b = match.basketball;
11992
12086
  if (!form || !b || !form.home && !form.away) return null;
@@ -12031,10 +12125,10 @@ function NbaFormSection({ match, monitor, ui }) {
12031
12125
  }
12032
12126
 
12033
12127
  // src/components/NbaPropsSection.tsx
12034
- var import_react83 = require("react");
12128
+ var import_react84 = require("react");
12035
12129
 
12036
12130
  // src/components/PropsPieces.tsx
12037
- var import_react82 = require("react");
12131
+ var import_react83 = require("react");
12038
12132
  var import_jsx_runtime85 = require("react/jsx-runtime");
12039
12133
  var livePlayer = (bundle, p) => bundle.live === true || !p.live && !p.nflLive ? p : { ...p, live: null, nflLive: null };
12040
12134
  var hasLiveLine = (p) => p.live != null || p.nflLive != null;
@@ -12047,9 +12141,9 @@ function preKickoff(match) {
12047
12141
  return Number.isFinite(kickoff) && Date.now() < kickoff;
12048
12142
  }
12049
12143
  function usePreKickoff(match) {
12050
- const [, setTick] = (0, import_react82.useState)(0);
12144
+ const [, setTick] = (0, import_react83.useState)(0);
12051
12145
  const pre = preKickoff(match);
12052
- (0, import_react82.useEffect)(() => {
12146
+ (0, import_react83.useEffect)(() => {
12053
12147
  if (!pre || !match.kickoffUtc) return;
12054
12148
  const wait = Math.min(Math.max(Date.parse(match.kickoffUtc) - Date.now(), 0), MAX_TIMER_MS);
12055
12149
  const id = setTimeout(() => setTick((t) => t + 1), wait);
@@ -12063,7 +12157,7 @@ function usePropsOpen(match, monitor, descriptor) {
12063
12157
  const pre = descriptor.sport === "basketball" ? match.phase === "preMatch" : beforeKickoff;
12064
12158
  const live = match.phase === "live";
12065
12159
  const open = pre || live;
12066
- (0, import_react82.useEffect)(() => {
12160
+ (0, import_react83.useEffect)(() => {
12067
12161
  if (!open) return;
12068
12162
  if (sport) monitor.loadPlayerProps?.(match.matchId, sport);
12069
12163
  else monitor.loadPlayerProps?.(match.matchId);
@@ -12141,7 +12235,7 @@ function PropBars({ bars, line, title, wide, ui, note }) {
12141
12235
  function PropPlayerPanel({ player: given, bundle, descriptor, ui, slip }) {
12142
12236
  const player = livePlayer(bundle, given);
12143
12237
  const stats = descriptor.stats.map((k) => player.stats.find((s) => s.stat === k)).filter((s) => s != null);
12144
- const [picked, setPicked] = (0, import_react82.useState)(null);
12238
+ const [picked, setPicked] = (0, import_react83.useState)(null);
12145
12239
  const active = stats.find((s) => s.stat === picked) ?? stats[0];
12146
12240
  const sample = active?.games?.length ?? 0;
12147
12241
  const hitsOf = (price, text2) => descriptor.showHits && sample > 0 && price.hits != null ? text2(price.hits) : null;
@@ -12190,8 +12284,8 @@ function PropPlayerPanel({ player: given, bundle, descriptor, ui, slip }) {
12190
12284
  ] });
12191
12285
  }
12192
12286
  function PropRoster({ bundle, players, side, descriptor, ui, slip }) {
12193
- const [openId, setOpenId] = (0, import_react82.useState)(null);
12194
- const [brokenShots, setBrokenShots] = (0, import_react82.useState)(/* @__PURE__ */ new Set());
12287
+ const [openId, setOpenId] = (0, import_react83.useState)(null);
12288
+ const [brokenShots, setBrokenShots] = (0, import_react83.useState)(/* @__PURE__ */ new Set());
12195
12289
  return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "ss-w-props-list", children: players.map((given) => {
12196
12290
  const p = livePlayer(bundle, given);
12197
12291
  const isOpen = openId === p.playerId;
@@ -12237,12 +12331,12 @@ function PropRoster({ bundle, players, side, descriptor, ui, slip }) {
12237
12331
  }
12238
12332
  var BOX_QUIET_MS = 12e4;
12239
12333
  function StatsClock({ boxAsOfUtc, match, live, atBreak: atBreak2, ago, ui }) {
12240
- const [tick, setTick] = (0, import_react82.useState)(0);
12334
+ const [tick, setTick] = (0, import_react83.useState)(0);
12241
12335
  const time = clock2(boxAsOfUtc, ui);
12242
12336
  const at2 = time === "" ? Number.NaN : Date.parse(boxAsOfUtc);
12243
12337
  const valid = !Number.isNaN(at2);
12244
12338
  const onBreak = atBreak(match);
12245
- (0, import_react82.useEffect)(() => {
12339
+ (0, import_react83.useEffect)(() => {
12246
12340
  if (!valid || onBreak) return;
12247
12341
  const age2 = Date.now() - at2;
12248
12342
  const wait = age2 < BOX_QUIET_MS ? BOX_QUIET_MS - age2 : 6e4 - age2 % 6e4;
@@ -12303,12 +12397,12 @@ var nbaDescriptor = (ui, match) => ({
12303
12397
  tenGameBars: false
12304
12398
  });
12305
12399
  function StatsClock2({ bundle, match, ui }) {
12306
- const [tick, setTick] = (0, import_react83.useState)(0);
12400
+ const [tick, setTick] = (0, import_react84.useState)(0);
12307
12401
  const at2 = bundle.live === true && bundle.boxAsOfUtc ? Date.parse(bundle.boxAsOfUtc) : Number.NaN;
12308
12402
  const time = clock2(bundle.boxAsOfUtc, ui);
12309
12403
  const valid = !Number.isNaN(at2) && time !== "";
12310
12404
  const onBreak = atBreak(match);
12311
- (0, import_react83.useEffect)(() => {
12405
+ (0, import_react84.useEffect)(() => {
12312
12406
  if (!valid || onBreak) return;
12313
12407
  const age2 = Date.now() - at2;
12314
12408
  const wait = age2 < BOX_QUIET_MS2 ? BOX_QUIET_MS2 - age2 : 6e4 - age2 % 6e4;
@@ -12322,7 +12416,7 @@ function StatsClock2({ bundle, match, ui }) {
12322
12416
  return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "ss-w-props-asof ss-w-props-asof--live", children: ui.nba.propsStatsLive(time) });
12323
12417
  }
12324
12418
  function NbaPropsSection({ match, monitor, ui, slip }) {
12325
- const [side, setSide] = (0, import_react83.useState)("home");
12419
+ const [side, setSide] = (0, import_react84.useState)("home");
12326
12420
  const descriptor = nbaDescriptor(ui, match);
12327
12421
  const { bundle, live, open } = usePropsOpen(match, monitor, descriptor);
12328
12422
  if (!open || !bundle || bundle.players.length === 0 || (bundle.live ?? false) !== live) return null;
@@ -12360,7 +12454,7 @@ function city(teamName, nickname) {
12360
12454
  return name.slice(0, name.length - nickname.length).trim() || null;
12361
12455
  }
12362
12456
  function BadgeCrest({ url, abbreviation }) {
12363
- const [failed, setFailed] = (0, import_react84.useState)(false);
12457
+ const [failed, setFailed] = (0, import_react85.useState)(false);
12364
12458
  if (url && !failed) {
12365
12459
  return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("img", { className: "ss-w-nbamon-badge ss-w-nbamon-badge--img", src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
12366
12460
  }
@@ -12495,7 +12589,7 @@ function NbaMonitorCard({ match, monitor, ui, slip, onAsk }) {
12495
12589
  }
12496
12590
 
12497
12591
  // src/components/NflFormSection.tsx
12498
- var import_react85 = require("react");
12592
+ var import_react86 = require("react");
12499
12593
  var import_jsx_runtime88 = require("react/jsx-runtime");
12500
12594
  var outcomeOf = (g) => g.teamScore > g.opponentScore ? "win" : g.teamScore < g.opponentScore ? "loss" : "tie";
12501
12595
  var signedSpread2 = (v) => v > 0 ? `+${v}` : String(v);
@@ -12548,7 +12642,7 @@ function H2hRow({ game, home, ui }) {
12548
12642
  ] });
12549
12643
  }
12550
12644
  function NflFormSection({ match, monitor, ui }) {
12551
- const [segment, setSegment] = (0, import_react85.useState)("away");
12645
+ const [segment, setSegment] = (0, import_react86.useState)("away");
12552
12646
  const { live, open } = usePropsOpen(match, monitor, { sport: "americanfootball" });
12553
12647
  const bundle = monitor.playerProps?.[monitorMatchKey("americanfootball", match.matchId)]?.bundle;
12554
12648
  const form = bundle?.form;
@@ -12581,7 +12675,7 @@ function NflFormSection({ match, monitor, ui }) {
12581
12675
  }
12582
12676
 
12583
12677
  // src/components/NflPropsSection.tsx
12584
- var import_react86 = require("react");
12678
+ var import_react87 = require("react");
12585
12679
  var import_jsx_runtime89 = require("react/jsx-runtime");
12586
12680
  var TRENDS_SHOWN = 3;
12587
12681
  var SCORERS_SHOWN = 8;
@@ -12654,7 +12748,7 @@ function ShowMore({ label, onClick }) {
12654
12748
  return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("button", { type: "button", className: "ss-w-props-more", onClick, children: label });
12655
12749
  }
12656
12750
  function Trends({ bundle, facts, descriptor, ui, slip }) {
12657
- const [all, setAll] = (0, import_react86.useState)(false);
12751
+ const [all, setAll] = (0, import_react87.useState)(false);
12658
12752
  const shown2 = all ? facts : facts.slice(0, TRENDS_SHOWN);
12659
12753
  return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("section", { className: "ss-w-props ss-w-props-trends", lang: ui.locale, children: [
12660
12754
  /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "ss-w-props-head", children: ui.nfl.propsTrends }),
@@ -12687,7 +12781,7 @@ function Trends({ bundle, facts, descriptor, ui, slip }) {
12687
12781
  ] });
12688
12782
  }
12689
12783
  function Scorers({ bundle, scorers, abbreviations, descriptor, ui, slip }) {
12690
- const [all, setAll] = (0, import_react86.useState)(false);
12784
+ const [all, setAll] = (0, import_react87.useState)(false);
12691
12785
  const shown2 = all ? scorers : scorers.slice(0, SCORERS_SHOWN);
12692
12786
  const cell2 = (name, column, price, stat) => price && stat ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(PropPrice, { price, label: "", ariaName: `${name}, ${column}`, player: name, stat, bundle, descriptor, ui, slip }) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "ss-w-props-scorer-none", children: "\u2014" });
12693
12787
  return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "ss-w-props-scorers", children: [
@@ -12717,7 +12811,7 @@ function Scorers({ bundle, scorers, abbreviations, descriptor, ui, slip }) {
12717
12811
  ] });
12718
12812
  }
12719
12813
  function NflPropsSection({ match, monitor, ui, slip }) {
12720
- const [tab, setTab] = (0, import_react86.useState)(null);
12814
+ const [tab, setTab] = (0, import_react87.useState)(null);
12721
12815
  const descriptor = nflDescriptor(ui);
12722
12816
  const { bundle, live, open } = usePropsOpen(match, monitor, descriptor);
12723
12817
  if (!open || !bundle || bundle.players.length === 0 || (bundle.live ?? false) !== live) return null;
@@ -12917,15 +13011,15 @@ function NflMonitorCard({ match, monitor, ui, slip, onAsk }) {
12917
13011
  }
12918
13012
 
12919
13013
  // src/components/TennisMonitorCard.tsx
12920
- var import_react89 = require("react");
12921
- var import_widget_sdk28 = require("@sensiblestats/widget-sdk");
13014
+ var import_react90 = require("react");
13015
+ var import_widget_sdk27 = require("@sensiblestats/widget-sdk");
12922
13016
 
12923
13017
  // src/components/TennisFixtureRow.tsx
12924
- var import_widget_sdk27 = require("@sensiblestats/widget-sdk");
13018
+ var import_widget_sdk26 = require("@sensiblestats/widget-sdk");
12925
13019
 
12926
13020
  // src/components/FixtureRow.tsx
12927
- var import_react87 = require("react");
12928
- var import_widget_sdk26 = require("@sensiblestats/widget-sdk");
13021
+ var import_react88 = require("react");
13022
+ var import_widget_sdk25 = require("@sensiblestats/widget-sdk");
12929
13023
  var import_jsx_runtime93 = require("react/jsx-runtime");
12930
13024
  function splitAtFirstSpace(label) {
12931
13025
  const i = label.indexOf(" ");
@@ -12938,7 +13032,7 @@ function kickoffLabel(kickoffUnix, tag2, clock3, timeZone) {
12938
13032
  return formatTime(kickoffUnix * 1e3, tag2, clock3, { timeZone });
12939
13033
  }
12940
13034
  function Side2({ name, crest, abbr, away = false }) {
12941
- const [failed, setFailed] = (0, import_react87.useState)(false);
13035
+ const [failed, setFailed] = (0, import_react88.useState)(false);
12942
13036
  return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("span", { className: away ? "ss-w-drow-side ss-w-drow-side--away" : "ss-w-drow-side", children: [
12943
13037
  crest && !failed ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("img", { className: abbr ? "ss-w-drow-crest ss-w-drow-crest--wide" : "ss-w-drow-crest", src: crest, alt: "", onError: () => setFailed(true) }) : abbr ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "ss-w-drow-crest ss-w-drow-crest--abbr", children: abbr }) : null,
12944
13038
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "ss-w-drow-nm", children: name })
@@ -12956,7 +13050,7 @@ function FixtureRow({ match, state, stale, ui, monitor, onOpen }) {
12956
13050
  const { isLive, hasScore, score, ticked, when: clock3 } = rowStatusOf(state, stale, ui);
12957
13051
  const when = clock3 ?? kickoffLabel(match.kickoffUnix, ui.locale, clockOf(ui), ui.timeZone);
12958
13052
  const isUsSport = sportKeyOf(match.sport) !== "football";
12959
- const pinSport = (0, import_widget_sdk26.slipSportOf)(match.sport);
13053
+ const pinSport = (0, import_widget_sdk25.slipSportOf)(match.sport);
12960
13054
  const liveTone = isLive || state?.isHalfTime;
12961
13055
  const clockParts = isUsSport && isLive && ticked !== null && !state?.isHalfTime ? splitAtFirstSpace(ticked) : null;
12962
13056
  const dayMarker = isUsSport && !liveTone && state?.phase !== "live" && isOtherLocalDay(match.kickoffUnix, /* @__PURE__ */ new Date(), ui.timeZone) ? formatDate(match.kickoffUnix * 1e3, ui.locale, { weekday: "short", timeZone: ui.timeZone }) : null;
@@ -13107,7 +13201,7 @@ function TennisFixtureRow({ match, state, stale, ui, prices, slip, monitor }) {
13107
13201
  const live = isTreatedLive(state, stale);
13108
13202
  const round = match.round ? ui.tennis.round[match.round] ?? match.round : null;
13109
13203
  const showPrices = !live && prices !== void 0 && prices.byId !== null && !prices.stale;
13110
- const entry = showPrices ? isKnownTour(match.tour) ? prices.byId.get((0, import_widget_sdk27.matchKey)("tennis", match.matchId, match.tour)) : void 0 : void 0;
13204
+ const entry = showPrices ? isKnownTour(match.tour) ? prices.byId.get((0, import_widget_sdk26.matchKey)("tennis", match.matchId, match.tour)) : void 0 : void 0;
13111
13205
  const pin = isKnownTour(match.tour) ? { kind: "match", matchId: match.matchId, sport: "tennis", tour: match.tour } : null;
13112
13206
  const pinned = !!monitor && !!pin && monitor.isPinned(pinKey(pin));
13113
13207
  const pinnable = !!monitor?.enabled && !!pin;
@@ -13180,7 +13274,7 @@ function TennisLiveScoreboard({ t, score, live, ui }) {
13180
13274
  }
13181
13275
 
13182
13276
  // src/components/TennisStatsTables.tsx
13183
- var import_react88 = require("react");
13277
+ var import_react89 = require("react");
13184
13278
  var import_jsx_runtime96 = require("react/jsx-runtime");
13185
13279
  function formatStat(row, value, locale) {
13186
13280
  if (value == null) return "\u2013";
@@ -13218,8 +13312,8 @@ function Tables({ table, labels, names, locale }) {
13218
13312
  ] });
13219
13313
  }
13220
13314
  function TennisStatsTables({ serveReturn, today, labels, names, ui, resetKey }) {
13221
- const [tab, setTab] = (0, import_react88.useState)("match");
13222
- (0, import_react88.useEffect)(() => {
13315
+ const [tab, setTab] = (0, import_react89.useState)("match");
13316
+ (0, import_react89.useEffect)(() => {
13223
13317
  setTab("match");
13224
13318
  }, [resetKey]);
13225
13319
  const sets = serveReturn.sets.filter((s) => s.table.serve.length + s.table.return.length > 0);
@@ -13250,7 +13344,7 @@ function TennisStatsTables({ serveReturn, today, labels, names, ui, resetKey })
13250
13344
  ] }),
13251
13345
  today.rows.map((r) => {
13252
13346
  const f = (v) => formatStat({ kind: "pct" }, v, locale);
13253
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_react88.Fragment, { children: [
13347
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_react89.Fragment, { children: [
13254
13348
  /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "ss-w-ts-l", children: r.label }),
13255
13349
  /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("span", { className: "ss-w-ts-today-v ss-w-ts-today-v--a", children: [
13256
13350
  f(r.p1Today),
@@ -13385,7 +13479,7 @@ function HeadToHead({ t, ui }) {
13385
13479
  ] });
13386
13480
  }
13387
13481
  function TennisMonitorCard({ match, monitor, ui, slip, onAsk }) {
13388
- const lastTables = (0, import_react89.useRef)(null);
13482
+ const lastTables = (0, import_react90.useRef)(null);
13389
13483
  const t = match.tennis;
13390
13484
  if (!t) return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(UnavailableCard, { match, monitor, ui, sport: "tennis" });
13391
13485
  const preMatch = match.phase === "preMatch";
@@ -13407,7 +13501,7 @@ function TennisMonitorCard({ match, monitor, ui, slip, onAsk }) {
13407
13501
  const surface = t.header.surface ? surfaceLabel(ui, t.header.surface) : null;
13408
13502
  const ask = () => {
13409
13503
  if (!onAsk) return;
13410
- const wire = (0, import_widget_sdk28.toWireSport)("tennis");
13504
+ const wire = (0, import_widget_sdk27.toWireSport)("tennis");
13411
13505
  const grounding = {
13412
13506
  kind: "match",
13413
13507
  subject: `${t.p1.name} ${ui.tennis.vs} ${t.p2.name}`,
@@ -13465,8 +13559,8 @@ function TennisMonitorCard({ match, monitor, ui, slip, onAsk }) {
13465
13559
  }
13466
13560
 
13467
13561
  // src/components/ScoreboardStrip.tsx
13468
- var import_react90 = require("react");
13469
- var import_widget_sdk29 = require("@sensiblestats/widget-sdk");
13562
+ var import_react91 = require("react");
13563
+ var import_widget_sdk28 = require("@sensiblestats/widget-sdk");
13470
13564
  var import_jsx_runtime98 = require("react/jsx-runtime");
13471
13565
  function nbaStatus(m, ui) {
13472
13566
  const b = m.basketball;
@@ -13560,8 +13654,8 @@ function rowsFor(m) {
13560
13654
  ];
13561
13655
  }
13562
13656
  function useStripScroll(selectedKey) {
13563
- const stripRef = (0, import_react90.useRef)(null);
13564
- (0, import_react90.useEffect)(() => {
13657
+ const stripRef = (0, import_react91.useRef)(null);
13658
+ (0, import_react91.useEffect)(() => {
13565
13659
  const strip = stripRef.current;
13566
13660
  const pressed = strip?.querySelector('[aria-pressed="true"]');
13567
13661
  if (!strip || !pressed) return;
@@ -13578,7 +13672,7 @@ function ScoreboardStrip({ tiles, selectedKey, onSelect, ui }) {
13578
13672
  const m = tile.match;
13579
13673
  if (!m) return null;
13580
13674
  const nba = isBasketball(m);
13581
- const sport = (0, import_widget_sdk29.sportOf)(m.sport);
13675
+ const sport = (0, import_widget_sdk28.sportOf)(m.sport);
13582
13676
  const inPlay = m.phase === "live" && !atBreak(m) && !(isAmericanFootball(m) && m.americanFootball?.period == null);
13583
13677
  const status2 = nba ? nbaStatus(m, ui) : isTennis(m) ? tennisStatus(m, ui) : isAmericanFootball(m) ? nflStatus(m, ui) : footballStatus(m, ui);
13584
13678
  const selected = tile.pin.key === selectedKey;
@@ -13608,7 +13702,7 @@ function ScoreboardStrip({ tiles, selectedKey, onSelect, ui }) {
13608
13702
  }
13609
13703
 
13610
13704
  // src/components/TrendsStrip.tsx
13611
- var import_widget_sdk30 = require("@sensiblestats/widget-sdk");
13705
+ var import_widget_sdk29 = require("@sensiblestats/widget-sdk");
13612
13706
  var import_jsx_runtime99 = require("react/jsx-runtime");
13613
13707
  function status(m, ui) {
13614
13708
  if (m.isSettled || m.phase === "fullTime") return ui.fullTimeLabel;
@@ -13624,7 +13718,7 @@ function TrendTileButton({ tile, selected, onSelect, ui }) {
13624
13718
  const { oddsFormat } = useOddsSettings();
13625
13719
  const { market: m, vm } = tile;
13626
13720
  const inPlay = m.phase === "live" && !m.isSuspended && !m.isSettled;
13627
- const sport = (0, import_widget_sdk30.sportOf)(m.card?.sport ?? void 0);
13721
+ const sport = (0, import_widget_sdk29.sportOf)(m.card?.sport ?? void 0);
13628
13722
  const home = vm?.homeTeamName ?? m.homeTeamName ?? "";
13629
13723
  const away = vm?.awayTeamName ?? m.awayTeamName ?? "";
13630
13724
  const score = m.phase !== "preMatch" && typeof m.homeScore === "number" ? `${m.homeScore}\u2013${m.awayScore ?? 0}` : null;
@@ -13666,21 +13760,21 @@ function TrendsStrip({ tiles, selectedKey, onSelect, ui }) {
13666
13760
  }
13667
13761
 
13668
13762
  // src/monitorSeed.ts
13669
- var import_widget_sdk31 = require("@sensiblestats/widget-sdk");
13763
+ var import_widget_sdk30 = require("@sensiblestats/widget-sdk");
13670
13764
  function buildSeedIndex(groups) {
13671
13765
  const index = /* @__PURE__ */ new Map();
13672
13766
  for (const group of groups) {
13673
13767
  for (const match of group.matches) {
13674
13768
  const sport = match.sport ?? group.sport ?? "football";
13675
13769
  if (sport !== "football") continue;
13676
- index.set((0, import_widget_sdk31.matchKey)("football", match.matchId), { match, competitionName: group.competitionName });
13770
+ index.set((0, import_widget_sdk30.matchKey)("football", match.matchId), { match, competitionName: group.competitionName });
13677
13771
  }
13678
13772
  }
13679
13773
  return index;
13680
13774
  }
13681
13775
  function seedFor(pin, index, states, stale, now) {
13682
13776
  if (pin.kind !== "match" || pin.sport !== void 0) return void 0;
13683
- const key = (0, import_widget_sdk31.matchKey)("football", pin.matchId);
13777
+ const key = (0, import_widget_sdk30.matchKey)("football", pin.matchId);
13684
13778
  const hit = index.get(key);
13685
13779
  if (!hit) return void 0;
13686
13780
  const { match, competitionName } = hit;
@@ -13735,7 +13829,7 @@ function OddsLiveStrip({ m, ui }) {
13735
13829
  ] });
13736
13830
  }
13737
13831
  function MatchesPanel({ monitor, ui, slip, onAsk, discovery }) {
13738
- const seedIndex = (0, import_react91.useMemo)(() => buildSeedIndex(discovery?.groups ?? []), [discovery?.groups]);
13832
+ const seedIndex = (0, import_react92.useMemo)(() => buildSeedIndex(discovery?.groups ?? []), [discovery?.groups]);
13739
13833
  const tiles = orderTiles(
13740
13834
  monitor.pins,
13741
13835
  monitor.snapshot,
@@ -13807,11 +13901,11 @@ function TrendsPanel({ monitor, ui, slip }) {
13807
13901
  }
13808
13902
 
13809
13903
  // src/components/LivePanel.tsx
13810
- var import_react94 = require("react");
13811
- var import_widget_sdk36 = require("@sensiblestats/widget-sdk");
13904
+ var import_react95 = require("react");
13905
+ var import_widget_sdk35 = require("@sensiblestats/widget-sdk");
13812
13906
 
13813
13907
  // src/scheduleView.ts
13814
- var import_widget_sdk32 = require("@sensiblestats/widget-sdk");
13908
+ var import_widget_sdk31 = require("@sensiblestats/widget-sdk");
13815
13909
 
13816
13910
  // src/search.ts
13817
13911
  function foldSearchText(s) {
@@ -13831,7 +13925,7 @@ function matchingFixtures(group, query) {
13831
13925
 
13832
13926
  // src/scheduleView.ts
13833
13927
  var TOP_COUNT = 3;
13834
- var keyOf3 = (m) => (0, import_widget_sdk32.matchKey)(m.sport, m.matchId, m.tour);
13928
+ var keyOf3 = (m) => (0, import_widget_sdk31.matchKey)(m.sport, m.matchId, m.tour);
13835
13929
  var sportOf13 = (g) => g.sport ?? "football";
13836
13930
  function isMember(group, pinnedKeys) {
13837
13931
  return group.isStarred || group.isLearned || group.matches.some((m) => pinnedKeys.has(keyOf3(m)));
@@ -13901,7 +13995,7 @@ function liveCountsBySport(groups, states, stale) {
13901
13995
  }
13902
13996
 
13903
13997
  // src/components/LeagueGroup.tsx
13904
- var import_widget_sdk33 = require("@sensiblestats/widget-sdk");
13998
+ var import_widget_sdk32 = require("@sensiblestats/widget-sdk");
13905
13999
 
13906
14000
  // src/components/ScheduleRow.tsx
13907
14001
  var import_jsx_runtime101 = require("react/jsx-runtime");
@@ -13966,7 +14060,7 @@ function LeagueGroup({ view, open, onToggle, disambiguate, rowCap, onShowAll, on
13966
14060
  ScheduleRow,
13967
14061
  {
13968
14062
  match: m,
13969
- state: states.get((0, import_widget_sdk33.matchKey)(m.sport, m.matchId, m.tour)),
14063
+ state: states.get((0, import_widget_sdk32.matchKey)(m.sport, m.matchId, m.tour)),
13970
14064
  stale,
13971
14065
  ui,
13972
14066
  monitor,
@@ -13974,7 +14068,7 @@ function LeagueGroup({ view, open, onToggle, disambiguate, rowCap, onShowAll, on
13974
14068
  slip,
13975
14069
  onOpen: (el) => onOpenMatch(m, group.competitionName, el)
13976
14070
  },
13977
- (0, import_widget_sdk33.matchKey)(m.sport, m.matchId, m.tour)
14071
+ (0, import_widget_sdk32.matchKey)(m.sport, m.matchId, m.tour)
13978
14072
  )),
13979
14073
  hidden > 0 && onShowAll && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("button", { type: "button", className: "ss-w-lg-showall", onClick: onShowAll, children: ui.showAllN(rows.length) })
13980
14074
  ] })
@@ -13982,20 +14076,20 @@ function LeagueGroup({ view, open, onToggle, disambiguate, rowCap, onShowAll, on
13982
14076
  }
13983
14077
 
13984
14078
  // src/components/MatchSheet.tsx
13985
- var import_react93 = require("react");
13986
- var import_widget_sdk34 = require("@sensiblestats/widget-sdk");
14079
+ var import_react94 = require("react");
14080
+ var import_widget_sdk33 = require("@sensiblestats/widget-sdk");
13987
14081
 
13988
14082
  // src/useModalDialog.ts
13989
- var import_react92 = require("react");
14083
+ var import_react93 = require("react");
13990
14084
  var FOCUSABLE = 'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
13991
14085
  function useModalDialog(onClose, opts = {}) {
13992
- const dialogRef = (0, import_react92.useRef)(null);
13993
- const onCloseRef = (0, import_react92.useRef)(onClose);
14086
+ const dialogRef = (0, import_react93.useRef)(null);
14087
+ const onCloseRef = (0, import_react93.useRef)(onClose);
13994
14088
  onCloseRef.current = onClose;
13995
- const openerRef = (0, import_react92.useRef)(opts.opener);
14089
+ const openerRef = (0, import_react93.useRef)(opts.opener);
13996
14090
  openerRef.current = opts.opener;
13997
14091
  const restore = opts.restoreFocus ?? true;
13998
- (0, import_react92.useEffect)(() => {
14092
+ (0, import_react93.useEffect)(() => {
13999
14093
  const dialog = dialogRef.current;
14000
14094
  const root = dialog?.getRootNode();
14001
14095
  const focusedAtMount = root?.activeElement ?? null;
@@ -14006,7 +14100,7 @@ function useModalDialog(onClose, opts = {}) {
14006
14100
  if (target instanceof HTMLElement) target.focus({ preventScroll: true });
14007
14101
  };
14008
14102
  }, []);
14009
- (0, import_react92.useEffect)(() => {
14103
+ (0, import_react93.useEffect)(() => {
14010
14104
  const onKey = (e) => {
14011
14105
  if (e.key !== "Escape") return;
14012
14106
  e.stopPropagation();
@@ -14047,9 +14141,9 @@ function kickoffDate(kickoffUnix, lang, timeZone) {
14047
14141
  function MatchSheet({ match, league, state, stale, ui, monitor, onAsk, onClose, opener }) {
14048
14142
  const { dialogRef, onKeyDown } = useModalDialog(onClose, { opener });
14049
14143
  const log = useEventLog();
14050
- const titleId = (0, import_react93.useId)();
14051
- const [limitHit, setLimitHit] = (0, import_react93.useState)(false);
14052
- const pinSport = (0, import_widget_sdk34.slipSportOf)(match.sport);
14144
+ const titleId = (0, import_react94.useId)();
14145
+ const [limitHit, setLimitHit] = (0, import_react94.useState)(false);
14146
+ const pinSport = (0, import_widget_sdk33.slipSportOf)(match.sport);
14053
14147
  const tour = pinSport === "tennis" && isKnownTour(match.tour) ? match.tour : void 0;
14054
14148
  const followable = pinSport !== "tennis" || tour !== void 0;
14055
14149
  const pinned = followable && monitor.isPinned(pinKey(pinSport ? { kind: "match", matchId: match.matchId, sport: pinSport, ...tour ? { tour } : {} } : { kind: "match", matchId: match.matchId }));
@@ -14070,11 +14164,11 @@ function MatchSheet({ match, league, state, stale, ui, monitor, onAsk, onClose,
14070
14164
  return;
14071
14165
  }
14072
14166
  if (result === "added") {
14073
- const wireSport = (0, import_widget_sdk34.toWireSport)(pinSport);
14167
+ const wireSport = (0, import_widget_sdk33.toWireSport)(pinSport);
14074
14168
  log?.log({
14075
14169
  name: "pin_add",
14076
14170
  entityType: "match",
14077
- entityId: (0, import_widget_sdk34.qualifiedId)(pinSport, "game", (0, import_widget_sdk34.localIdOf)(pinSport, match.matchId, tour)),
14171
+ entityId: (0, import_widget_sdk33.qualifiedId)(pinSport, "game", (0, import_widget_sdk33.localIdOf)(pinSport, match.matchId, tour)),
14078
14172
  ...wireSport ? { sport: wireSport } : {}
14079
14173
  });
14080
14174
  }
@@ -14082,7 +14176,7 @@ function MatchSheet({ match, league, state, stale, ui, monitor, onAsk, onClose,
14082
14176
  };
14083
14177
  const ask = () => {
14084
14178
  if (!onAsk) return;
14085
- const wire = (0, import_widget_sdk34.toWireSport)(match.sport);
14179
+ const wire = (0, import_widget_sdk33.toWireSport)(match.sport);
14086
14180
  const grounding = {
14087
14181
  kind: treatedLive ? "liveFact" : "match",
14088
14182
  ...pinSport === "tennis" ? {} : { matchId: match.matchId },
@@ -14118,7 +14212,7 @@ function MatchSheet({ match, league, state, stale, ui, monitor, onAsk, onClose,
14118
14212
  }
14119
14213
 
14120
14214
  // src/components/SportChips.tsx
14121
- var import_widget_sdk35 = require("@sensiblestats/widget-sdk");
14215
+ var import_widget_sdk34 = require("@sensiblestats/widget-sdk");
14122
14216
  var import_jsx_runtime105 = require("react/jsx-runtime");
14123
14217
  var ORDER2 = ["football", "basketball", "americanfootball", "tennis"];
14124
14218
  function SportChips({ offered, value, onChange, counts, ui }) {
@@ -14149,11 +14243,11 @@ var OPEN_TOP_GROUPS = 2;
14149
14243
  var QUIET_ROWS = 4;
14150
14244
  function LivePanel({ discovery, ui, monitor, sport, offered, onSport, league, onLeague, onSeeAll, onAsk }) {
14151
14245
  const { groups, states, stale } = discovery;
14152
- const [mine, setMine] = (0, import_react94.useState)(false);
14153
- const [toggled, setToggled] = (0, import_react94.useState)(/* @__PURE__ */ new Map());
14154
- const [sheet, setSheet] = (0, import_react94.useState)(null);
14155
- const pinnedKeys = (0, import_react94.useMemo)(
14156
- () => new Set(monitor.pins.filter((p) => p.kind === "match").map((p) => (0, import_widget_sdk36.matchKey)(p.sport, p.matchId, p.tour))),
14246
+ const [mine, setMine] = (0, import_react95.useState)(false);
14247
+ const [toggled, setToggled] = (0, import_react95.useState)(/* @__PURE__ */ new Map());
14248
+ const [sheet, setSheet] = (0, import_react95.useState)(null);
14249
+ const pinnedKeys = (0, import_react95.useMemo)(
14250
+ () => new Set(monitor.pins.filter((p) => p.kind === "match").map((p) => (0, import_widget_sdk35.matchKey)(p.sport, p.matchId, p.tour))),
14157
14251
  [monitor.pins]
14158
14252
  );
14159
14253
  const counts = liveCountsBySport(groups, states, stale);
@@ -14229,14 +14323,14 @@ function LivePanel({ discovery, ui, monitor, sport, offered, onSport, league, on
14229
14323
  ScheduleRow,
14230
14324
  {
14231
14325
  match,
14232
- state: states.get((0, import_widget_sdk36.matchKey)(match.sport, match.matchId, match.tour)),
14326
+ state: states.get((0, import_widget_sdk35.matchKey)(match.sport, match.matchId, match.tour)),
14233
14327
  stale,
14234
14328
  ui,
14235
14329
  monitor,
14236
14330
  onOpen: (el) => openMatch(match, group.competitionName, el)
14237
14331
  }
14238
14332
  )
14239
- ] }, (0, import_widget_sdk36.matchKey)(match.sport, match.matchId, match.tour))),
14333
+ ] }, (0, import_widget_sdk35.matchKey)(match.sport, match.matchId, match.tour))),
14240
14334
  /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("button", { type: "button", className: "ss-w-lp-seeall", onClick: onSeeAll, children: ui.seeAllMatches })
14241
14335
  ] })
14242
14336
  ] }),
@@ -14245,7 +14339,7 @@ function LivePanel({ discovery, ui, monitor, sport, offered, onSport, league, on
14245
14339
  {
14246
14340
  match: sheet.match,
14247
14341
  league: sheet.league,
14248
- state: states.get((0, import_widget_sdk36.matchKey)(sheet.match.sport, sheet.match.matchId, sheet.match.tour)),
14342
+ state: states.get((0, import_widget_sdk35.matchKey)(sheet.match.sport, sheet.match.matchId, sheet.match.tour)),
14249
14343
  stale,
14250
14344
  ui,
14251
14345
  monitor,
@@ -14258,20 +14352,20 @@ function LivePanel({ discovery, ui, monitor, sport, offered, onSport, league, on
14258
14352
  }
14259
14353
 
14260
14354
  // src/components/ScheduleMatchesPanel.tsx
14261
- var import_react98 = require("react");
14262
- var import_widget_sdk38 = require("@sensiblestats/widget-sdk");
14355
+ var import_react99 = require("react");
14356
+ var import_widget_sdk37 = require("@sensiblestats/widget-sdk");
14263
14357
 
14264
14358
  // src/useTennisRowPrices.ts
14265
- var import_react95 = require("react");
14266
- var import_widget_sdk37 = require("@sensiblestats/widget-sdk");
14359
+ var import_react96 = require("react");
14360
+ var import_widget_sdk36 = require("@sensiblestats/widget-sdk");
14267
14361
  var TENNIS_PRICE_POLL_MS = 6e4;
14268
14362
  function useTennisRowPrices(a) {
14269
- const [state, setState] = (0, import_react95.useState)({ byId: null, stale: false });
14270
- const getPricesRef = (0, import_react95.useRef)(a.getPrices);
14363
+ const [state, setState] = (0, import_react96.useState)({ byId: null, stale: false });
14364
+ const getPricesRef = (0, import_react96.useRef)(a.getPrices);
14271
14365
  getPricesRef.current = a.getPrices;
14272
- const latest = (0, import_react95.useRef)(0);
14366
+ const latest = (0, import_react96.useRef)(0);
14273
14367
  const idsKey = a.keys.filter((k) => isKnownTour(k.tour)).slice(0, MAX_TENNIS_KEYS).map((k) => `${k.tour}:${k.matchId}`).sort().join(",");
14274
- (0, import_react95.useEffect)(() => {
14368
+ (0, import_react96.useEffect)(() => {
14275
14369
  if (!a.enabled || idsKey === "") {
14276
14370
  latest.current++;
14277
14371
  setState((prev) => prev.byId === null && !prev.stale ? prev : { byId: null, stale: false });
@@ -14290,7 +14384,7 @@ function useTennisRowPrices(a) {
14290
14384
  setState({ byId: null, stale: false });
14291
14385
  return;
14292
14386
  }
14293
- setState({ byId: new Map(rows.map((r) => [(0, import_widget_sdk37.matchKey)("tennis", r.matchId, r.tour), r.price ?? null])), stale: false });
14387
+ setState({ byId: new Map(rows.map((r) => [(0, import_widget_sdk36.matchKey)("tennis", r.matchId, r.tour), r.price ?? null])), stale: false });
14294
14388
  },
14295
14389
  () => {
14296
14390
  if (mine !== latest.current) return;
@@ -14309,11 +14403,11 @@ function useTennisRowPrices(a) {
14309
14403
  }
14310
14404
 
14311
14405
  // src/components/DayStrip.tsx
14312
- var import_react96 = require("react");
14406
+ var import_react97 = require("react");
14313
14407
  var import_jsx_runtime107 = require("react/jsx-runtime");
14314
14408
  function DayStrip({ chips, selected, onSelect, ui, locale }) {
14315
- const listRef = (0, import_react96.useRef)(null);
14316
- (0, import_react96.useEffect)(() => {
14409
+ const listRef = (0, import_react97.useRef)(null);
14410
+ (0, import_react97.useEffect)(() => {
14317
14411
  const el = listRef.current?.querySelector('[aria-pressed="true"]');
14318
14412
  if (!el || typeof el.scrollIntoView !== "function") return;
14319
14413
  const reduce = typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
@@ -14342,7 +14436,7 @@ function DayStrip({ chips, selected, onSelect, ui, locale }) {
14342
14436
  }
14343
14437
 
14344
14438
  // src/components/games/ui/SearchField.tsx
14345
- var import_react97 = require("react");
14439
+ var import_react98 = require("react");
14346
14440
 
14347
14441
  // src/components/games/ui/icons.tsx
14348
14442
  var import_jsx_runtime108 = require("react/jsx-runtime");
@@ -14381,8 +14475,8 @@ var IconFlame = ({ size = 16 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runt
14381
14475
  // src/components/games/ui/SearchField.tsx
14382
14476
  var import_jsx_runtime109 = require("react/jsx-runtime");
14383
14477
  function SearchField({ id, label, labelHidden = false, placeholder, value, onChange, disabled, inputRef, onKeyDown, clearLabel }) {
14384
- const localRef = (0, import_react97.useRef)(null);
14385
- const setInputRef = (0, import_react97.useCallback)((node) => {
14478
+ const localRef = (0, import_react98.useRef)(null);
14479
+ const setInputRef = (0, import_react98.useCallback)((node) => {
14386
14480
  localRef.current = node;
14387
14481
  if (typeof inputRef === "function") inputRef(node);
14388
14482
  else if (inputRef) inputRef.current = node;
@@ -14428,19 +14522,19 @@ var TOP_ROW_CAP = 3;
14428
14522
  var SKELETON_ROWS = 3;
14429
14523
  function ScheduleMatchesPanel({ discovery, ui, monitor, sport, offered, onSport, day, onDay, loaded, onOpenLive, onAsk, locale, getTennisPrices, slip }) {
14430
14524
  const { localDate: today, states, stale } = discovery;
14431
- const searchId = (0, import_react98.useId)();
14432
- const [query, setQuery] = (0, import_react98.useState)("");
14433
- const [toggled, setToggled] = (0, import_react98.useState)(/* @__PURE__ */ new Map());
14434
- const [expanded, setExpanded] = (0, import_react98.useState)(/* @__PURE__ */ new Set());
14435
- const listRef = (0, import_react98.useRef)(null);
14436
- const [sheet, setSheet] = (0, import_react98.useState)(null);
14525
+ const searchId = (0, import_react99.useId)();
14526
+ const [query, setQuery] = (0, import_react99.useState)("");
14527
+ const [toggled, setToggled] = (0, import_react99.useState)(/* @__PURE__ */ new Map());
14528
+ const [expanded, setExpanded] = (0, import_react99.useState)(/* @__PURE__ */ new Set());
14529
+ const listRef = (0, import_react99.useRef)(null);
14530
+ const [sheet, setSheet] = (0, import_react99.useState)(null);
14437
14531
  const { chips, selected } = loaded;
14438
- (0, import_react98.useEffect)(() => {
14532
+ (0, import_react99.useEffect)(() => {
14439
14533
  if (selected !== day) onDay(selected);
14440
14534
  }, [day, selected, onDay]);
14441
14535
  const isToday = selected === today;
14442
- const pinnedKeys = (0, import_react98.useMemo)(
14443
- () => new Set(monitor.pins.filter((p) => p.kind === "match").map((p) => (0, import_widget_sdk38.matchKey)(p.sport, p.matchId, p.tour))),
14536
+ const pinnedKeys = (0, import_react99.useMemo)(
14537
+ () => new Set(monitor.pins.filter((p) => p.kind === "match").map((p) => (0, import_widget_sdk37.matchKey)(p.sport, p.matchId, p.tour))),
14444
14538
  [monitor.pins]
14445
14539
  );
14446
14540
  const searching = query.trim().length > 0;
@@ -14460,7 +14554,7 @@ function ScheduleMatchesPanel({ discovery, ui, monitor, sport, offered, onSport,
14460
14554
  const { oddsOffered } = useOddsSettings();
14461
14555
  const tennisKeys = /* @__PURE__ */ new Map();
14462
14556
  const addTennis = (m) => {
14463
- if (m.sport === "tennis" && isKnownTour(m.tour)) tennisKeys.set((0, import_widget_sdk38.matchKey)("tennis", m.matchId, m.tour), { tour: m.tour, matchId: m.matchId });
14557
+ if (m.sport === "tennis" && isKnownTour(m.tour)) tennisKeys.set((0, import_widget_sdk37.matchKey)("tennis", m.matchId, m.tour), { tour: m.tour, matchId: m.matchId });
14464
14558
  };
14465
14559
  for (const s of priced.sections) for (const v of s.groups) for (const m of v.rows) addTennis(m);
14466
14560
  for (const { match } of priced.afterMidnight) addTennis(match);
@@ -14546,7 +14640,7 @@ function ScheduleMatchesPanel({ discovery, ui, monitor, sport, offered, onSport,
14546
14640
  ScheduleRow,
14547
14641
  {
14548
14642
  match,
14549
- state: states.get((0, import_widget_sdk38.matchKey)(match.sport, match.matchId, match.tour)),
14643
+ state: states.get((0, import_widget_sdk37.matchKey)(match.sport, match.matchId, match.tour)),
14550
14644
  stale,
14551
14645
  ui,
14552
14646
  monitor,
@@ -14555,7 +14649,7 @@ function ScheduleMatchesPanel({ discovery, ui, monitor, sport, offered, onSport,
14555
14649
  onOpen: (el) => openMatch(match, group.competitionName, el)
14556
14650
  }
14557
14651
  )
14558
- ] }, (0, import_widget_sdk38.matchKey)(match.sport, match.matchId, match.tour)))
14652
+ ] }, (0, import_widget_sdk37.matchKey)(match.sport, match.matchId, match.tour)))
14559
14653
  ] }),
14560
14654
  empty2 && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "ss-w-today-empty", children: searching ? ui.noLeagueResults : ui.noMatchesDay })
14561
14655
  ] }),
@@ -14564,7 +14658,7 @@ function ScheduleMatchesPanel({ discovery, ui, monitor, sport, offered, onSport,
14564
14658
  {
14565
14659
  match: sheet.match,
14566
14660
  league: sheet.league,
14567
- state: states.get((0, import_widget_sdk38.matchKey)(sheet.match.sport, sheet.match.matchId, sheet.match.tour)),
14661
+ state: states.get((0, import_widget_sdk37.matchKey)(sheet.match.sport, sheet.match.matchId, sheet.match.tour)),
14568
14662
  stale,
14569
14663
  ui,
14570
14664
  monitor,
@@ -14577,7 +14671,7 @@ function ScheduleMatchesPanel({ discovery, ui, monitor, sport, offered, onSport,
14577
14671
  }
14578
14672
 
14579
14673
  // src/components/GamesPanel.tsx
14580
- var import_react113 = require("react");
14674
+ var import_react114 = require("react");
14581
14675
 
14582
14676
  // src/components/GamesLoginWall.tsx
14583
14677
  var import_jsx_runtime111 = require("react/jsx-runtime");
@@ -14586,7 +14680,7 @@ function GamesLoginWall({ ui }) {
14586
14680
  }
14587
14681
 
14588
14682
  // src/components/GamesHub.tsx
14589
- var import_react99 = require("react");
14683
+ var import_react100 = require("react");
14590
14684
 
14591
14685
  // src/components/games/ui/gameMeta.ts
14592
14686
  function prettifyGameId(gameId) {
@@ -14737,8 +14831,8 @@ function pickHeroGame(games) {
14737
14831
  }
14738
14832
  var tileKey = (g) => `${g.gameId}-${g.gameDay}-${g.fixtureId}`;
14739
14833
  function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
14740
- const [, setTick] = (0, import_react99.useState)(0);
14741
- (0, import_react99.useEffect)(() => {
14834
+ const [, setTick] = (0, import_react100.useState)(0);
14835
+ (0, import_react100.useEffect)(() => {
14742
14836
  const id = setInterval(() => setTick((t) => t + 1), 6e4);
14743
14837
  return () => clearInterval(id);
14744
14838
  }, []);
@@ -14798,10 +14892,10 @@ function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
14798
14892
  }
14799
14893
 
14800
14894
  // src/components/GameScreenHost.tsx
14801
- var import_react111 = require("react");
14895
+ var import_react112 = require("react");
14802
14896
 
14803
14897
  // src/useGamePlay.ts
14804
- var import_react100 = require("react");
14898
+ var import_react101 = require("react");
14805
14899
  function toSubmitResult(payload) {
14806
14900
  return {
14807
14901
  // 'pending' means the play is recorded but awaiting resolution (fixture games)
@@ -14813,17 +14907,17 @@ function toSubmitResult(payload) {
14813
14907
  };
14814
14908
  }
14815
14909
  function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh }) {
14816
- const [result, setResult] = (0, import_react100.useState)(null);
14817
- const [submitting, setSubmitting] = (0, import_react100.useState)(false);
14818
- const [rawStatus, setRawStatus] = (0, import_react100.useState)(null);
14819
- const inFlightRef = (0, import_react100.useRef)(false);
14820
- const convRef = (0, import_react100.useRef)(conversation);
14910
+ const [result, setResult] = (0, import_react101.useState)(null);
14911
+ const [submitting, setSubmitting] = (0, import_react101.useState)(false);
14912
+ const [rawStatus, setRawStatus] = (0, import_react101.useState)(null);
14913
+ const inFlightRef = (0, import_react101.useRef)(false);
14914
+ const convRef = (0, import_react101.useRef)(conversation);
14821
14915
  convRef.current = conversation;
14822
- const optsRef = (0, import_react100.useRef)({ gameId, gameDay, fixtureId, locale, refresh });
14916
+ const optsRef = (0, import_react101.useRef)({ gameId, gameDay, fixtureId, locale, refresh });
14823
14917
  optsRef.current = { gameId, gameDay, fixtureId, locale, refresh };
14824
- const resultRef = (0, import_react100.useRef)(null);
14918
+ const resultRef = (0, import_react101.useRef)(null);
14825
14919
  resultRef.current = result;
14826
- const refetch = (0, import_react100.useCallback)(async () => {
14920
+ const refetch = (0, import_react101.useCallback)(async () => {
14827
14921
  const conv = convRef.current;
14828
14922
  if (!conv) return;
14829
14923
  const opts = optsRef.current;
@@ -14839,7 +14933,7 @@ function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh
14839
14933
  } catch {
14840
14934
  }
14841
14935
  }, []);
14842
- const submit = (0, import_react100.useCallback)(async (answerJson) => {
14936
+ const submit = (0, import_react101.useCallback)(async (answerJson) => {
14843
14937
  const conv = convRef.current;
14844
14938
  if (!conv || inFlightRef.current) return;
14845
14939
  inFlightRef.current = true;
@@ -14866,14 +14960,14 @@ function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh
14866
14960
  setSubmitting(false);
14867
14961
  }
14868
14962
  }, [refetch]);
14869
- const hydrate = (0, import_react100.useCallback)(() => {
14963
+ const hydrate = (0, import_react101.useCallback)(() => {
14870
14964
  void refetch();
14871
14965
  }, [refetch]);
14872
14966
  return { result, submitting, submit, hydrate, rawStatus };
14873
14967
  }
14874
14968
 
14875
14969
  // src/components/games/MysteryTigerGame.tsx
14876
- var import_react102 = require("react");
14970
+ var import_react103 = require("react");
14877
14971
 
14878
14972
  // src/components/games/nationFlags.ts
14879
14973
  var FLAGS = {
@@ -15084,7 +15178,7 @@ function isNationCode(flag) {
15084
15178
  }
15085
15179
 
15086
15180
  // src/components/games/PlayerAvatar.tsx
15087
- var import_react101 = require("react");
15181
+ var import_react102 = require("react");
15088
15182
  var import_jsx_runtime116 = require("react/jsx-runtime");
15089
15183
  function initialsOf(name) {
15090
15184
  const parts2 = name.trim().split(/\s+/).filter(Boolean);
@@ -15102,7 +15196,7 @@ function PlayerAvatar({
15102
15196
  imagePath,
15103
15197
  className
15104
15198
  }) {
15105
- const [failed, setFailed] = (0, import_react101.useState)(false);
15199
+ const [failed, setFailed] = (0, import_react102.useState)(false);
15106
15200
  const showImage = Boolean(imagePath) && !isPlaceholderImage(imagePath) && !failed;
15107
15201
  return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("div", { className, "aria-hidden": "true", children: showImage ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("img", { src: imagePath, alt: "", loading: "lazy", onError: () => setFailed(true) }) : /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "ss-w-av-initials", children: initialsOf(name) }) });
15108
15202
  }
@@ -15346,8 +15440,8 @@ function MysteryTigerGame({
15346
15440
  onBack
15347
15441
  }) {
15348
15442
  const t = ui.games.mysteryTiger;
15349
- const [query, setQuery] = (0, import_react102.useState)("");
15350
- const inputId = (0, import_react102.useId)();
15443
+ const [query, setQuery] = (0, import_react103.useState)("");
15444
+ const inputId = (0, import_react103.useId)();
15351
15445
  const clientState = parseClientState(result?.clientStateJson);
15352
15446
  const guessResults = clientState?.guessResults ?? [];
15353
15447
  const alreadyGuessedIds = new Set(guessResults.map((g) => g.playerId));
@@ -15608,13 +15702,13 @@ function HigherOrLowerGame({
15608
15702
  }
15609
15703
 
15610
15704
  // src/components/games/CareerPathGame.tsx
15611
- var import_react104 = require("react");
15705
+ var import_react105 = require("react");
15612
15706
 
15613
15707
  // src/components/games/ui/CrestShield.tsx
15614
- var import_react103 = require("react");
15708
+ var import_react104 = require("react");
15615
15709
  var import_jsx_runtime127 = require("react/jsx-runtime");
15616
15710
  function CrestShield({ src, name, size = 28 }) {
15617
- const [failed, setFailed] = (0, import_react103.useState)(false);
15711
+ const [failed, setFailed] = (0, import_react104.useState)(false);
15618
15712
  if (src && !isPlaceholderImage(src) && !failed) {
15619
15713
  return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("img", { className: "ss-g-crest", src, alt: name, width: size, height: size, loading: "lazy", onError: () => setFailed(true) });
15620
15714
  }
@@ -15646,8 +15740,8 @@ function CareerPathGame({
15646
15740
  }) {
15647
15741
  const s = ui.games.careerPath;
15648
15742
  const title = gameTitle({ gameId: "career-path" }, ui.games.titles);
15649
- const [query, setQuery] = (0, import_react104.useState)("");
15650
- const inputId = (0, import_react104.useId)();
15743
+ const [query, setQuery] = (0, import_react105.useState)("");
15744
+ const inputId = (0, import_react105.useId)();
15651
15745
  const clientState = parseClientState3(result?.clientStateJson);
15652
15746
  const alreadyGuessedIds = new Set(clientState?.guessResults.map((g) => g.playerId) ?? []);
15653
15747
  const isOver = result?.alreadyPlayed === true || clientState?.solved === true || clientState?.failed === true;
@@ -15753,7 +15847,7 @@ function CareerPathGame({
15753
15847
  }
15754
15848
 
15755
15849
  // src/components/games/BeatTheGridGame.tsx
15756
- var import_react105 = __toESM(require("react"), 1);
15850
+ var import_react106 = __toESM(require("react"), 1);
15757
15851
 
15758
15852
  // src/components/games/ui/OptionList.tsx
15759
15853
  var import_jsx_runtime129 = require("react/jsx-runtime");
@@ -15842,10 +15936,10 @@ function SearchSheet({
15842
15936
  ui
15843
15937
  }) {
15844
15938
  const s = ui.games.beatTheGrid;
15845
- const [query, setQuery] = (0, import_react105.useState)("");
15846
- const inputId = (0, import_react105.useId)();
15847
- const inputRef = (0, import_react105.useRef)(null);
15848
- (0, import_react105.useEffect)(() => {
15939
+ const [query, setQuery] = (0, import_react106.useState)("");
15940
+ const inputId = (0, import_react106.useId)();
15941
+ const inputRef = (0, import_react106.useRef)(null);
15942
+ (0, import_react106.useEffect)(() => {
15849
15943
  inputRef.current?.focus();
15850
15944
  }, [row, col]);
15851
15945
  const filtered = playerPool.filter(
@@ -15910,7 +16004,7 @@ function BeatTheGridGame({
15910
16004
  }) {
15911
16005
  const s = ui.games.beatTheGrid;
15912
16006
  const title = gameTitle({ gameId: "beat-the-grid" }, ui.games.titles);
15913
- const [activeCell, setActiveCell] = (0, import_react105.useState)(null);
16007
+ const [activeCell, setActiveCell] = (0, import_react106.useState)(null);
15914
16008
  const clientState = parseClientState4(result?.clientStateJson);
15915
16009
  const filledCells = clientState?.cells ?? [];
15916
16010
  const isLocked2 = result?.alreadyPlayed === true || clientState?.isComplete === true;
@@ -15984,7 +16078,7 @@ function BeatTheGridGame({
15984
16078
  /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { "aria-hidden": "true", children: abbr }),
15985
16079
  /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "ss-g-sr", children: rowLabel })
15986
16080
  ] });
15987
- return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_react105.default.Fragment, { children: [
16081
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_react106.default.Fragment, { children: [
15988
16082
  /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "ss-g-btg-rowhdr", "data-meta": rowMeta ? "true" : void 0, children: rowHeaderContent }),
15989
16083
  cols.map((colLabel, colIdx) => {
15990
16084
  const filled = findCellResult(filledCells, rowIdx, colIdx);
@@ -16065,7 +16159,7 @@ function BeatTheGridGame({
16065
16159
  }
16066
16160
 
16067
16161
  // src/components/games/GuessTheXiGame.tsx
16068
- var import_react106 = require("react");
16162
+ var import_react107 = require("react");
16069
16163
 
16070
16164
  // src/components/games/ui/PitchSvg.tsx
16071
16165
  var import_jsx_runtime131 = require("react/jsx-runtime");
@@ -16154,8 +16248,8 @@ function GuessTheXiGame({
16154
16248
  onBack
16155
16249
  }) {
16156
16250
  const t = ui.games.guessTheXi;
16157
- const [query, setQuery] = (0, import_react106.useState)("");
16158
- const inputId = (0, import_react106.useId)();
16251
+ const [query, setQuery] = (0, import_react107.useState)("");
16252
+ const inputId = (0, import_react107.useId)();
16159
16253
  const clientState = parseClientState5(result?.clientStateJson);
16160
16254
  const isOver = result?.alreadyPlayed === true || clientState?.status === "solved" || clientState?.status === "failed";
16161
16255
  const solved = clientState?.status === "solved";
@@ -16297,7 +16391,7 @@ function GuessTheXiGame({
16297
16391
  }
16298
16392
 
16299
16393
  // src/components/games/DailyQuizGame.tsx
16300
- var import_react107 = require("react");
16394
+ var import_react108 = require("react");
16301
16395
  var import_jsx_runtime133 = require("react/jsx-runtime");
16302
16396
  function parseClientState6(json) {
16303
16397
  if (!json) return null;
@@ -16338,8 +16432,8 @@ function DailyQuizGame({
16338
16432
  }) {
16339
16433
  const s = ui.games.dailyQuiz;
16340
16434
  const title = gameTitle({ gameId: "daily-quiz" }, ui.games.titles);
16341
- const [selections, setSelections] = (0, import_react107.useState)(/* @__PURE__ */ new Map());
16342
- const [page, setPage] = (0, import_react107.useState)(0);
16435
+ const [selections, setSelections] = (0, import_react108.useState)(/* @__PURE__ */ new Map());
16436
+ const [page, setPage] = (0, import_react108.useState)(0);
16343
16437
  const clientState = parseClientState6(result?.clientStateJson);
16344
16438
  const results2 = clientState?.results ?? [];
16345
16439
  const isRevealed = results2.length > 0 || result?.alreadyPlayed === true;
@@ -16449,7 +16543,7 @@ function DailyQuizGame({
16449
16543
  }
16450
16544
 
16451
16545
  // src/components/games/MatchdayPredictorGame.tsx
16452
- var import_react108 = require("react");
16546
+ var import_react109 = require("react");
16453
16547
  var import_jsx_runtime134 = require("react/jsx-runtime");
16454
16548
  var SCORER_SEARCH_THRESHOLD = 9;
16455
16549
  function parseClientState7(json) {
@@ -16545,12 +16639,12 @@ function MatchdayPredictorGame({
16545
16639
  onBack
16546
16640
  }) {
16547
16641
  const t = ui.games.predictor;
16548
- const [homeScore, setHomeScore] = (0, import_react108.useState)(0);
16549
- const [awayScore, setAwayScore] = (0, import_react108.useState)(0);
16550
- const [firstScorerPlayerId, setFirstScorerPlayerId] = (0, import_react108.useState)(null);
16551
- const [lastEdited, setLastEdited] = (0, import_react108.useState)("home");
16552
- const [query, setQuery] = (0, import_react108.useState)("");
16553
- const searchId = (0, import_react108.useId)();
16642
+ const [homeScore, setHomeScore] = (0, import_react109.useState)(0);
16643
+ const [awayScore, setAwayScore] = (0, import_react109.useState)(0);
16644
+ const [firstScorerPlayerId, setFirstScorerPlayerId] = (0, import_react109.useState)(null);
16645
+ const [lastEdited, setLastEdited] = (0, import_react109.useState)("home");
16646
+ const [query, setQuery] = (0, import_react109.useState)("");
16647
+ const searchId = (0, import_react109.useId)();
16554
16648
  const clientState = parseClientState7(result?.clientStateJson);
16555
16649
  const alreadyPlayed = result?.alreadyPlayed === true;
16556
16650
  const header = /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
@@ -16717,7 +16811,7 @@ function MatchdayPredictorGame({
16717
16811
  }
16718
16812
 
16719
16813
  // src/components/games/StartingXiGame.tsx
16720
- var import_react109 = require("react");
16814
+ var import_react110 = require("react");
16721
16815
  var import_jsx_runtime135 = require("react/jsx-runtime");
16722
16816
  var POINTS_PER_STARTER = 8;
16723
16817
  var XI_SIZE = 11;
@@ -16761,10 +16855,10 @@ function StartingXiGame({
16761
16855
  lockAtUtc
16762
16856
  }) {
16763
16857
  const t = ui.games.startingXi;
16764
- const [slotPlayers, setSlotPlayers] = (0, import_react109.useState)(() => Array(XI_SIZE).fill(null));
16765
- const [active, setActive] = (0, import_react109.useState)(0);
16766
- const [query, setQuery] = (0, import_react109.useState)("");
16767
- const searchId = (0, import_react109.useId)();
16858
+ const [slotPlayers, setSlotPlayers] = (0, import_react110.useState)(() => Array(XI_SIZE).fill(null));
16859
+ const [active, setActive] = (0, import_react110.useState)(0);
16860
+ const [query, setQuery] = (0, import_react110.useState)("");
16861
+ const searchId = (0, import_react110.useId)();
16768
16862
  const clientState = parseClientState8(result?.clientStateJson);
16769
16863
  const alreadyPlayed = result?.alreadyPlayed === true;
16770
16864
  const header = /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
@@ -16903,7 +16997,7 @@ function StartingXiGame({
16903
16997
  }
16904
16998
 
16905
16999
  // src/components/games/StatLadderGame.tsx
16906
- var import_react110 = require("react");
17000
+ var import_react111 = require("react");
16907
17001
  var import_jsx_runtime136 = require("react/jsx-runtime");
16908
17002
  function ladderClue(ladder) {
16909
17003
  const mystery = ladder.find((r) => r.rank === 2);
@@ -16940,9 +17034,9 @@ function StatLadderGame({
16940
17034
  onBack
16941
17035
  }) {
16942
17036
  const t = ui.games.statLadder;
16943
- const [query, setQuery] = (0, import_react110.useState)("");
16944
- const [selectedId, setSelectedId] = (0, import_react110.useState)(null);
16945
- const searchId = (0, import_react110.useId)();
17037
+ const [query, setQuery] = (0, import_react111.useState)("");
17038
+ const [selectedId, setSelectedId] = (0, import_react111.useState)(null);
17039
+ const searchId = (0, import_react111.useId)();
16946
17040
  const clientState = parseClientState9(result?.clientStateJson);
16947
17041
  const revealed = clientState != null;
16948
17042
  const header = /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(GameHeader, { title: gameTitle({ gameId: "stat-ladder" }, ui.games.titles), eyebrow: t.eyebrow, onBack, backLabel: ui.back });
@@ -17148,8 +17242,8 @@ function GameScreenHost({
17148
17242
  ui
17149
17243
  }) {
17150
17244
  const { gameId, fixtureId, gameDay = "", lockAtUtc = null } = selected;
17151
- const [configJson, setConfigJson] = (0, import_react111.useState)(null);
17152
- (0, import_react111.useEffect)(() => {
17245
+ const [configJson, setConfigJson] = (0, import_react112.useState)(null);
17246
+ (0, import_react112.useEffect)(() => {
17153
17247
  setConfigJson(null);
17154
17248
  if (!conversation) return;
17155
17249
  let cancelled = false;
@@ -17172,12 +17266,12 @@ function GameScreenHost({
17172
17266
  fixtureId: fixtureId || void 0,
17173
17267
  locale: ui.hostTag
17174
17268
  });
17175
- (0, import_react111.useEffect)(() => {
17269
+ (0, import_react112.useEffect)(() => {
17176
17270
  if (conversation) hydrate();
17177
17271
  }, [conversation, gameId]);
17178
- const hydrateRef = (0, import_react111.useRef)(hydrate);
17272
+ const hydrateRef = (0, import_react112.useRef)(hydrate);
17179
17273
  hydrateRef.current = hydrate;
17180
- (0, import_react111.useEffect)(() => {
17274
+ (0, import_react112.useEffect)(() => {
17181
17275
  if (!FIXTURE_GAME_IDS.has(gameId)) return;
17182
17276
  if (rawStatus !== "pending") return;
17183
17277
  const timerId = setInterval(() => {
@@ -17290,7 +17384,7 @@ function GameScreenHost({
17290
17384
  }
17291
17385
 
17292
17386
  // src/components/Leaderboard.tsx
17293
- var import_react112 = require("react");
17387
+ var import_react113 = require("react");
17294
17388
 
17295
17389
  // src/components/LeaderboardRow.tsx
17296
17390
  var import_jsx_runtime139 = require("react/jsx-runtime");
@@ -17377,7 +17471,7 @@ function Leaderboard({
17377
17471
  ui,
17378
17472
  onPlay
17379
17473
  }) {
17380
- const [segment, setSegment] = (0, import_react112.useState)("weekly");
17474
+ const [segment, setSegment] = (0, import_react113.useState)("weekly");
17381
17475
  const myRow = segment === "weekly" ? data.myWeeklyRow : data.myAllTimeRow;
17382
17476
  const offBoard = myRow !== null && myRow !== void 0 && myRow.rank === -1;
17383
17477
  const isEmpty = segment === "weekly" ? data.weeklyTop.length === 0 : data.allTimeTop.length === 0;
@@ -17482,9 +17576,9 @@ function GamesPanel({
17482
17576
  leaderboardLoading,
17483
17577
  refreshHub
17484
17578
  }) {
17485
- const [selected, setSelected] = (0, import_react113.useState)(null);
17486
- const [segment, setSegment] = (0, import_react113.useState)("play");
17487
- (0, import_react113.useEffect)(() => {
17579
+ const [selected, setSelected] = (0, import_react114.useState)(null);
17580
+ const [segment, setSegment] = (0, import_react114.useState)("play");
17581
+ (0, import_react114.useEffect)(() => {
17488
17582
  ensureGamesFonts();
17489
17583
  }, []);
17490
17584
  if (!loggedIn) return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(GamesLoginWall, { ui });
@@ -17548,10 +17642,10 @@ function GamesPanel({
17548
17642
  }
17549
17643
 
17550
17644
  // src/components/FavouritesPanel.tsx
17551
- var import_react116 = require("react");
17645
+ var import_react117 = require("react");
17552
17646
 
17553
17647
  // src/components/FavouriteChips.tsx
17554
- var import_react114 = require("react");
17648
+ var import_react115 = require("react");
17555
17649
  var import_jsx_runtime144 = require("react/jsx-runtime");
17556
17650
  async function toggleWithNotice(controller, kind, id, onNotice) {
17557
17651
  const outcome = await controller.toggle(kind, id);
@@ -17597,12 +17691,12 @@ function Group({ title, entities, sport, ui, controller, onNotice }) {
17597
17691
  ] });
17598
17692
  }
17599
17693
  function FavouriteChips({ controller, ui, sport, sportLabel: sportLabel2, onNotice }) {
17600
- const [confirming, setConfirming] = (0, import_react114.useState)(false);
17694
+ const [confirming, setConfirming] = (0, import_react115.useState)(false);
17601
17695
  const data = controller.data;
17602
- (0, import_react114.useEffect)(() => {
17696
+ (0, import_react115.useEffect)(() => {
17603
17697
  setConfirming(false);
17604
17698
  }, [sport]);
17605
- (0, import_react114.useEffect)(() => {
17699
+ (0, import_react115.useEffect)(() => {
17606
17700
  if (!confirming) return;
17607
17701
  const onPointerDown = (e) => {
17608
17702
  if (!(e.target instanceof Element) || !e.target.closest("[data-fav-confirm]")) setConfirming(false);
@@ -17656,21 +17750,21 @@ function FavouriteChips({ controller, ui, sport, sportLabel: sportLabel2, onNoti
17656
17750
  }
17657
17751
 
17658
17752
  // src/components/FavouritesSearch.tsx
17659
- var import_react115 = require("react");
17753
+ var import_react116 = require("react");
17660
17754
  var import_jsx_runtime145 = require("react/jsx-runtime");
17661
17755
  var MIN_LETTERS = 2;
17662
17756
  var MAX_LENGTH = 64;
17663
17757
  var DEBOUNCE_MS = 250;
17664
17758
  function FavouritesSearch({ controller, ui, sport, onNotice }) {
17665
- const [query, setQuery] = (0, import_react115.useState)("");
17666
- const [answer, setAnswer] = (0, import_react115.useState)(null);
17667
- const controllerRef = (0, import_react115.useRef)(controller);
17759
+ const [query, setQuery] = (0, import_react116.useState)("");
17760
+ const [answer, setAnswer] = (0, import_react116.useState)(null);
17761
+ const controllerRef = (0, import_react116.useRef)(controller);
17668
17762
  controllerRef.current = controller;
17669
17763
  const trimmed = query.trim();
17670
17764
  const queryKey = `${sport}|${trimmed}`;
17671
17765
  const results2 = answer?.key === queryKey ? answer.rows : [];
17672
17766
  const settled = answer?.key === queryKey;
17673
- (0, import_react115.useEffect)(() => {
17767
+ (0, import_react116.useEffect)(() => {
17674
17768
  setAnswer(null);
17675
17769
  if (trimmed.length < MIN_LETTERS) return;
17676
17770
  let cancelled = false;
@@ -17733,13 +17827,13 @@ function FavouritesSearch({ controller, ui, sport, onNotice }) {
17733
17827
  // src/components/FavouritesPanel.tsx
17734
17828
  var import_jsx_runtime146 = require("react/jsx-runtime");
17735
17829
  function FavouritesPanel({ controller, ui, sport, sports, onSportChange }) {
17736
- const [notice, setNotice] = (0, import_react116.useState)(null);
17737
- const refreshRef = (0, import_react116.useRef)(controller.refresh);
17830
+ const [notice, setNotice] = (0, import_react117.useState)(null);
17831
+ const refreshRef = (0, import_react117.useRef)(controller.refresh);
17738
17832
  refreshRef.current = controller.refresh;
17739
- (0, import_react116.useEffect)(() => {
17833
+ (0, import_react117.useEffect)(() => {
17740
17834
  void refreshRef.current();
17741
17835
  }, []);
17742
- (0, import_react116.useEffect)(() => {
17836
+ (0, import_react117.useEffect)(() => {
17743
17837
  setNotice(null);
17744
17838
  }, [sport]);
17745
17839
  const sportLabel2 = sports.find((s) => s.sport === sport)?.label ?? sportLabel(ui, sport);
@@ -17765,11 +17859,11 @@ function FavouritesPanel({ controller, ui, sport, sports, onSportChange }) {
17765
17859
  }
17766
17860
 
17767
17861
  // src/components/PresetTools.tsx
17768
- var import_react117 = require("react");
17862
+ var import_react118 = require("react");
17769
17863
  var import_jsx_runtime147 = require("react/jsx-runtime");
17770
17864
  function PresetToolModal({ title, closeLabel, onClose, children, footer, className }) {
17771
17865
  const { dialogRef, onKeyDown } = useModalDialog(onClose, { restoreFocus: false });
17772
- const titleId = (0, import_react117.useId)();
17866
+ const titleId = (0, import_react118.useId)();
17773
17867
  return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("div", { className: className ? `ss-w-tool-backdrop ${className}` : "ss-w-tool-backdrop", children: /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("div", { ref: dialogRef, className: "ss-w-tool", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, tabIndex: -1, onKeyDown, children: [
17774
17868
  /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("div", { className: "ss-w-tool-head", children: [
17775
17869
  /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("h2", { id: titleId, className: "ss-w-tool-title", children: title }),
@@ -17819,9 +17913,9 @@ function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal,
17819
17913
  const totalOptions = comboTotals(grid);
17820
17914
  const totals = totalOptions.map((o) => o.value);
17821
17915
  const legChoices = comboLegChoices(grid);
17822
- const [total, setTotal] = (0, import_react117.useState)(() => nearest(totals, initialTotal));
17823
- const [legs, setLegs] = (0, import_react117.useState)(() => legsForTotal(grid, nearest(totals, initialTotal), clampLegs(legChoices, initialLegs)));
17824
- const [announcement, setAnnouncement] = (0, import_react117.useState)("");
17916
+ const [total, setTotal] = (0, import_react118.useState)(() => nearest(totals, initialTotal));
17917
+ const [legs, setLegs] = (0, import_react118.useState)(() => legsForTotal(grid, nearest(totals, initialTotal), clampLegs(legChoices, initialLegs)));
17918
+ const [announcement, setAnnouncement] = (0, import_react118.useState)("");
17825
17919
  const cell2 = findCombo(grid, total, legs);
17826
17920
  const minLegs = legChoices[0] ?? legs;
17827
17921
  const maxLegs = legChoices[legChoices.length - 1] ?? legs;
@@ -17859,12 +17953,9 @@ function FavouritesSheet({ ui, controller, sport, sports, onSportChange, onClose
17859
17953
  return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(PresetToolModal, { title: ui.tabFavourites, closeLabel: ui.closeSheetLabel, onClose, className: "ss-w-set-backdrop-in ss-w-fav-sheet", children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(FavouritesPanel, { controller, ui, sport, sports, onSportChange }) });
17860
17954
  }
17861
17955
 
17862
- // src/components/BuilderPanel.tsx
17863
- var import_react119 = require("react");
17864
-
17865
17956
  // src/components/dashboard/v8/SentenceBuilder.tsx
17866
- var import_react118 = require("react");
17867
- var import_widget_sdk39 = require("@sensiblestats/widget-sdk");
17957
+ var import_react119 = require("react");
17958
+ var import_widget_sdk38 = require("@sensiblestats/widget-sdk");
17868
17959
  var import_jsx_runtime149 = require("react/jsx-runtime");
17869
17960
  var TOTALS = ["any", "3", "5", "10", "20", "50"];
17870
17961
  var BASE_LEGS = [1, 2, 3, 4];
@@ -17898,16 +17989,15 @@ function openingGames(preset) {
17898
17989
  }
17899
17990
  var ALL_MARKETS = "*";
17900
17991
  var usableMarkets = (preset) => preset.marketOptions && preset.marketOptions.some((m) => m.key === preset.marketKey) ? preset.marketOptions : null;
17901
- function SentenceBuilder({ preset, ui, conversation, memory: memory3, keepMarket = false, slip, sport, operatorUserId, anonymousUserId, onCoolOff }) {
17992
+ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, sport, operatorUserId, anonymousUserId, onCoolOff }) {
17902
17993
  const { oddsFormat } = useOddsSettings();
17903
17994
  const totals = totalKeys(preset);
17904
17995
  const opening = openingGames(preset);
17905
17996
  const gamesOptions = opening.options;
17906
17997
  const marketOptions = usableMarkets(preset);
17907
- const [fingerprint] = (0, import_react118.useState)(() => JSON.stringify(preset));
17908
- const [keepsMarket] = (0, import_react118.useState)(keepMarket);
17909
- const [saved] = (0, import_react118.useState)(() => {
17910
- const kept = keepsMarket ? void 0 : memory3?.savedView(sport);
17998
+ const [fingerprint] = (0, import_react119.useState)(() => JSON.stringify(preset));
17999
+ const [saved] = (0, import_react119.useState)(() => {
18000
+ const kept = memory3?.savedView(sport);
17911
18001
  return kept && kept.fingerprint === fingerprint ? kept : null;
17912
18002
  });
17913
18003
  const openingView = {
@@ -17915,15 +18005,15 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, keepMarket
17915
18005
  total: asTotal(preset.totalTarget, totals),
17916
18006
  custom: null,
17917
18007
  // All markets opens unless the visitor has a usual market, which is never beaten.
17918
- marketKey: marketOptions && !keepsMarket && !marketOptions.some((m) => m.usual) ? null : preset.marketKey,
18008
+ marketKey: marketOptions && !marketOptions.some((m) => m.usual) ? null : preset.marketKey,
17919
18009
  gamesId: opening.option?.id ?? null,
17920
18010
  matchIds: opening.option ? opening.option.matchIds : preset.matchIds,
17921
18011
  // The server never widens by itself: an all-games preset with no ids asks for it.
17922
18012
  widen: opening.option ? opening.option.matchIds.length === 0 : preset.gamesScope === "all" && preset.matchIds.length === 0
17923
18013
  };
17924
- const [view, setView] = (0, import_react118.useState)(() => saved?.view ?? openingView);
17925
- const autoWidened = (0, import_react118.useRef)(false);
17926
- const [widenedNote, setWidenedNote] = (0, import_react118.useState)(saved?.widenedNote ?? false);
18014
+ const [view, setView] = (0, import_react119.useState)(() => saved?.view ?? openingView);
18015
+ const autoWidened = (0, import_react119.useRef)(false);
18016
+ const [widenedNote, setWidenedNote] = (0, import_react119.useState)(saved?.widenedNote ?? false);
17927
18017
  const track = useTrack();
17928
18018
  const requestFor = (v, extra) => ({
17929
18019
  sport,
@@ -17935,22 +18025,22 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, keepMarket
17935
18025
  widen: v.widen,
17936
18026
  ...extra?.variant ? { variant: extra.variant } : {},
17937
18027
  ...extra?.keep?.length ? { keep: sorted(extra.keep) } : {},
17938
- ...extra?.swapped?.length ? { swapped: [...new Set(extra.swapped)].slice(-import_widget_sdk39.MAX_SWAPPED_IDS) } : {},
18028
+ ...extra?.swapped?.length ? { swapped: [...new Set(extra.swapped)].slice(-import_widget_sdk38.MAX_SWAPPED_IDS) } : {},
17939
18029
  ...operatorUserId ? { operatorUserId } : {},
17940
18030
  ...anonymousUserId ? { anonymousUserId } : {}
17941
18031
  });
17942
- const [editing, setEditing] = (0, import_react118.useState)(false);
17943
- const [draft, setDraft] = (0, import_react118.useState)("");
17944
- const [invalid, setInvalid] = (0, import_react118.useState)(null);
17945
- const inputRef = (0, import_react118.useRef)(null);
17946
- const pencilRef = (0, import_react118.useRef)(null);
17947
- const noteId = (0, import_react118.useId)();
17948
- const customId = (0, import_react118.useId)();
17949
- (0, import_react118.useEffect)(() => {
18032
+ const [editing, setEditing] = (0, import_react119.useState)(false);
18033
+ const [draft, setDraft] = (0, import_react119.useState)("");
18034
+ const [invalid, setInvalid] = (0, import_react119.useState)(null);
18035
+ const inputRef = (0, import_react119.useRef)(null);
18036
+ const pencilRef = (0, import_react119.useRef)(null);
18037
+ const noteId = (0, import_react119.useId)();
18038
+ const customId = (0, import_react119.useId)();
18039
+ (0, import_react119.useEffect)(() => {
17950
18040
  if (editing) inputRef.current?.focus();
17951
18041
  }, [editing]);
17952
18042
  const customLabel = (c) => c.format === oddsFormat ? c.text : c.decimal;
17953
- (0, import_react118.useEffect)(() => {
18043
+ (0, import_react119.useEffect)(() => {
17954
18044
  if (view.legs === 1) {
17955
18045
  setEditing(false);
17956
18046
  setDraft("");
@@ -17966,16 +18056,16 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, keepMarket
17966
18056
  setEditing(false);
17967
18057
  pencilRef.current?.focus();
17968
18058
  };
17969
- const [first] = (0, import_react118.useState)(() => requestFor(view));
18059
+ const [first] = (0, import_react119.useState)(() => requestFor(view));
17970
18060
  const { grid, answeredFor, status: status2, confirmed, request } = useBuilderGrid({ conversation, locale: ui.hostTag, memory: memory3, initial: first });
17971
- const [shown2, setShown] = (0, import_react118.useState)(null);
18061
+ const [shown2, setShown] = (0, import_react119.useState)(null);
17972
18062
  if (grid === null) {
17973
18063
  if (shown2 !== null && status2 === "ready") setShown(null);
17974
18064
  } else if (answeredFor && (shown2?.seen !== grid || shown2.seenReq !== answeredFor)) {
17975
18065
  setShown(shownAfter(shown2, grid, answeredFor));
17976
18066
  }
17977
- const lastRequest = (0, import_react118.useRef)(first);
17978
- (0, import_react118.useEffect)(() => {
18067
+ const lastRequest = (0, import_react119.useRef)(first);
18068
+ (0, import_react119.useEffect)(() => {
17979
18069
  void request(lastRequest.current);
17980
18070
  }, [request]);
17981
18071
  const send = (req) => {
@@ -18013,7 +18103,7 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, keepMarket
18013
18103
  };
18014
18104
  const canNarrow = preset.matchIds.length > 0;
18015
18105
  const ready = status2 === "ready" && grid !== null;
18016
- const [tapped, setTapped] = (0, import_react118.useState)(null);
18106
+ const [tapped, setTapped] = (0, import_react119.useState)(null);
18017
18107
  const busy = tapped !== null && status2 === "loading" && shown2 !== null;
18018
18108
  const g = ready ? shown2?.grid ?? grid : busy ? shown2.grid : null;
18019
18109
  const suggested = g?.status === "miss" || g?.nearest === true ? g.legCountThatLands : null;
@@ -18022,8 +18112,8 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, keepMarket
18022
18112
  ...[preset.legs, suggested].filter((n) => n !== null && n > 4)
18023
18113
  ])).sort((a, b) => a - b);
18024
18114
  const rows = g && g.status === "ok" ? legsOf(g, sport) : null;
18025
- const sectionRef = (0, import_react118.useRef)(null);
18026
- (0, import_react118.useEffect)(() => {
18115
+ const sectionRef = (0, import_react119.useRef)(null);
18116
+ (0, import_react119.useEffect)(() => {
18027
18117
  if (tapped === null || status2 !== "ready") return;
18028
18118
  setTapped(null);
18029
18119
  const root = sectionRef.current;
@@ -18040,14 +18130,14 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, keepMarket
18040
18130
  }, [tapped, status2]);
18041
18131
  const rowSlip = rows ? guardLegsPreMatch(slip, rows, ui) : slip;
18042
18132
  useNextKickoffRender(rows ? rows.map((l) => l.kickoffUtc) : []);
18043
- const [startedNote, setStartedNote] = (0, import_react118.useState)(false);
18133
+ const [startedNote, setStartedNote] = (0, import_react119.useState)(false);
18044
18134
  const anyStarted = rows !== null && rows.some((l) => !preMatchOpen(l.kickoffUtc, Date.now()));
18045
- (0, import_react118.useEffect)(() => {
18135
+ (0, import_react119.useEffect)(() => {
18046
18136
  if (startedNote && status2 === "ready" && !anyStarted) setStartedNote(false);
18047
18137
  }, [startedNote, status2, anyStarted]);
18048
18138
  const market = rows?.[0]?.market;
18049
- const [seen2, setSeen] = (0, import_react118.useState)(null);
18050
- (0, import_react118.useEffect)(() => {
18139
+ const [seen2, setSeen] = (0, import_react119.useState)(null);
18140
+ (0, import_react119.useEffect)(() => {
18051
18141
  if (market) setSeen(market);
18052
18142
  }, [market]);
18053
18143
  const marketName = view.marketKey === null ? null : marketOptions?.find((m) => m.key === view.marketKey)?.label ?? market ?? seen2;
@@ -18091,14 +18181,14 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, keepMarket
18091
18181
  };
18092
18182
  };
18093
18183
  const canWiden = gamesOptions === null || allGames !== null;
18094
- (0, import_react118.useEffect)(() => {
18184
+ (0, import_react119.useEffect)(() => {
18095
18185
  if (!empty2 || !singles || widened || !canWiden || autoWidened.current) return;
18096
18186
  autoWidened.current = true;
18097
18187
  const next = { ...view, widen: true, matchIds: [], gamesId: allGames ? allGames.id : view.gamesId };
18098
18188
  commit(next, true);
18099
18189
  send(requestFor(next));
18100
18190
  }, [empty2, singles, widened, canWiden, view]);
18101
- (0, import_react118.useEffect)(() => {
18191
+ (0, import_react119.useEffect)(() => {
18102
18192
  if (coolOff) onCoolOff?.(sport);
18103
18193
  }, [coolOff, onCoolOff, sport]);
18104
18194
  if (coolOff) return null;
@@ -18293,14 +18383,10 @@ function GamesOptions({ options, ui }) {
18293
18383
 
18294
18384
  // src/components/BuilderPanel.tsx
18295
18385
  var import_jsx_runtime150 = require("react/jsx-runtime");
18296
- function BuilderPanel({ options, sport, onSportChange, ui, slip, onCoolOff, onHandOffMounted }) {
18386
+ function BuilderPanel({ options, sport, onSportChange, ui, slip, onCoolOff }) {
18297
18387
  const ctx = usePersonalGreeting();
18298
18388
  const scope = useSportScope();
18299
18389
  const active = options.find((o) => o.sport === sport) ?? options[0];
18300
- const handingOff = active?.keepMarket === true;
18301
- (0, import_react119.useEffect)(() => {
18302
- if (handingOff) onHandOffMounted?.();
18303
- }, [handingOff]);
18304
18390
  if (!active) return null;
18305
18391
  return /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)("div", { className: "ss-w-mon-list ss-w-builder-tab", children: [
18306
18392
  options.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime150.jsx)("div", { className: "ss-w-dash-sports", role: "group", "aria-label": ui.sportGroupLabel, children: options.map((o) => /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
@@ -18321,7 +18407,6 @@ function BuilderPanel({ options, sport, onSportChange, ui, slip, onCoolOff, onHa
18321
18407
  ui,
18322
18408
  conversation: ctx?.conversation ?? null,
18323
18409
  memory: ctx?.memory,
18324
- keepMarket: active.keepMarket,
18325
18410
  slip,
18326
18411
  sport: active.sport,
18327
18412
  operatorUserId: scope?.operatorUserId,
@@ -19127,7 +19212,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
19127
19212
  }
19128
19213
  }
19129
19214
  ),
19130
- tabs && tabs.activeTab === "builder" && hasBuilder && builder && /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(BuilderPanel, { options: builder.options, sport: builder.sport, onSportChange: builder.onSportChange, ui, slip, onCoolOff: builder.onCoolOff, onHandOffMounted: builder.onHandOffMounted }),
19215
+ tabs && tabs.activeTab === "builder" && hasBuilder && builder && /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(BuilderPanel, { options: builder.options, sport: builder.sport, onSportChange: builder.onSportChange, ui, slip, onCoolOff: builder.onCoolOff }),
19131
19216
  monitor && monitor.activeTab === "following" && /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(MatchesPanel, { monitor, ui, slip, onAsk: paused ? void 0 : handleAsk, discovery }),
19132
19217
  monitor && monitor.activeTab === "trends" && /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(TrendsPanel, { monitor, ui, slip }),
19133
19218
  monitor && monitor.activeTab === "fixtures" && /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(Fixtures, { fixtures: clubFixturesResult?.fixtures ?? [], loading: clubFixturesResult?.loading ?? false, ui }),
@@ -19206,6 +19291,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
19206
19291
  .ss-w-root, .ss-w-root * { box-sizing: border-box; margin: 0; padding: 0; }
19207
19292
  .ss-w-root {
19208
19293
  --ss-w-accent: #17936a;
19294
+ --ss-w-pill: var(--ss-w-pill-light, color-mix(in srgb, var(--ss-w-accent) 72%, #000)); --ss-w-on-accent: var(--ss-w-on-pill-light, #fff);
19209
19295
  --ss-w-cta: #f5a623; --ss-w-cta-ink: #1b1300;
19210
19296
  --ss-w-ink: #14181d; --ss-w-faint: #6b7580; --ss-w-line: #e4e8ec;
19211
19297
  --ss-w-panel: #ffffff; --ss-w-bubble: #f3f5f7; --ss-w-nav: #0e1622;
@@ -19219,6 +19305,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
19219
19305
  @media (prefers-color-scheme: dark) {
19220
19306
  .ss-w-root[data-ss-w-theme="auto"] {
19221
19307
  --ss-w-accent: #37c891; --ss-w-cta: #ffb638; --ss-w-cta-ink: #1b1300;
19308
+ --ss-w-pill: var(--ss-w-pill-dark, var(--ss-w-accent)); --ss-w-on-accent: var(--ss-w-on-pill-dark, #06231a);
19222
19309
  --ss-w-ink: #e8edf2; --ss-w-faint: #8b95a1;
19223
19310
  --ss-w-line: #2a3441; --ss-w-panel: #141b24; --ss-w-bubble: #1e2732; --ss-w-nav: #0a0f16;
19224
19311
  --ss-w-pos: #37c891; --ss-w-neg: #f0655d; --ss-w-warn: #e0a030;
@@ -19228,6 +19315,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
19228
19315
  }
19229
19316
  .ss-w-root[data-ss-w-theme="dark"] {
19230
19317
  --ss-w-accent: #37c891; --ss-w-cta: #ffb638; --ss-w-cta-ink: #1b1300;
19318
+ --ss-w-pill: var(--ss-w-pill-dark, var(--ss-w-accent)); --ss-w-on-accent: var(--ss-w-on-pill-dark, #06231a);
19231
19319
  --ss-w-ink: #e8edf2; --ss-w-faint: #8b95a1;
19232
19320
  --ss-w-line: #2a3441; --ss-w-panel: #141b24; --ss-w-bubble: #1e2732; --ss-w-nav: #0a0f16;
19233
19321
  --ss-w-pos: #37c891; --ss-w-neg: #f0655d; --ss-w-warn: #e0a030;
@@ -19236,6 +19324,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
19236
19324
  }
19237
19325
  .ss-w-root[data-ss-w-theme="light"] {
19238
19326
  --ss-w-accent: #17936a; --ss-w-cta: #f5a623; --ss-w-cta-ink: #1b1300;
19327
+ --ss-w-pill: var(--ss-w-pill-light, color-mix(in srgb, var(--ss-w-accent) 72%, #000)); --ss-w-on-accent: var(--ss-w-on-pill-light, #fff);
19239
19328
  --ss-w-ink: #14181d; --ss-w-faint: #6b7580;
19240
19329
  --ss-w-line: #e4e8ec; --ss-w-panel: #ffffff; --ss-w-bubble: #f3f5f7; --ss-w-nav: #0e1622;
19241
19330
  --ss-w-home: #3a63a8; --ss-w-away: #c8102e; --ss-w-track: #e9edf1;
@@ -19356,20 +19445,20 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
19356
19445
  .ss-w-root[data-ss-w-pos="left"] .ss-w-fab-wrap { left: var(--ss-w-offset-x); align-items: flex-start; }
19357
19446
  .ss-w-fab { width: 56px; height: 56px; border: none; border-radius: 50%; background: var(--ss-w-nav); color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.28); }
19358
19447
  .ss-w-fab-mark { width: 30px; height: 30px; display: block; object-fit: contain; }
19359
- .ss-w-greeting { max-width: 240px; display: flex; align-items: flex-start; background: var(--ss-w-panel); color: var(--ss-w-ink); border: 1px solid var(--ss-w-line); border-radius: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.14); }
19448
+ .ss-w-greeting { max-width: 300px; display: flex; align-items: flex-start; background: var(--ss-w-panel); color: var(--ss-w-ink); border: 1px solid var(--ss-w-line); border-radius: 18px; box-shadow: 0 4px 14px rgba(0,0,0,.14); }
19360
19449
  .ss-w-greeting-body { position: relative; flex: 1; min-width: 0; text-align: left; background: none; border: none; color: inherit; font: inherit; cursor: pointer; padding: 9px 4px 9px 12px; }
19361
19450
  .ss-w-greeting-x { flex: none; background: none; border: none; color: var(--ss-w-faint); cursor: pointer; font-size: 17px; line-height: 1; padding: 7px 9px 0 2px; }
19362
- .ss-w-greeting-text { display: block; }
19451
+ .ss-w-greeting-text { display: block; font-size: 14px; line-height: 1.45; }
19452
+ .ss-w-greeting-game { display: block; font-size: 13px; font-weight: 600; color: var(--ss-w-faint); }
19453
+ .ss-w-greeting-pick .ss-w-v2-row { border: 0; padding: 0; min-height: 44px; font-size: 15px; font-weight: 600; background: none; }
19363
19454
  /* Bubble asks (onboarding presets, spec C6): the line stays one button, the asks stack under it as
19364
- sibling buttons. 240 px bubble: 196 px of text room per ask; widest contract ask 167 px (EN),
19365
- 153 px (TR) at 12px/600, measured 2026-10-04. A longer label wraps, never an ellipsis. */
19455
+ sibling buttons. A longer label wraps, never an ellipsis. */
19366
19456
  .ss-w-greeting--asks { flex-direction: column; align-items: stretch; }
19367
19457
  .ss-w-greeting-top { display: flex; align-items: flex-start; }
19368
19458
  .ss-w-greeting-asks { display: flex; flex-direction: column; gap: 6px; padding: 0 10px 10px; }
19369
19459
  .ss-w-greeting-ask { min-height: 44px; width: 100%; text-align: left; font: inherit; font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--ss-w-accent); background: color-mix(in srgb, var(--ss-w-accent) 8%, var(--ss-w-panel)); border: 1px solid color-mix(in srgb, var(--ss-w-accent) 35%, var(--ss-w-line)); border-radius: 10px; padding: 6px 10px; cursor: pointer; white-space: normal; overflow-wrap: anywhere; }
19370
- .ss-w-greeting-cta { min-height: 44px; width: 100%; text-align: center; font: inherit; font-size: 12.5px; font-weight: 700; line-height: 1.3; color: var(--ss-g-on-accent, #fff); background: var(--ss-w-accent); border: 0; border-radius: 10px; padding: 6px 10px; cursor: pointer; white-space: normal; overflow-wrap: anywhere; }
19460
+ .ss-w-greeting-cta { min-height: 44px; width: 100%; text-align: center; font: inherit; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--ss-w-on-accent); background: var(--ss-w-pill); border: 0; border-radius: 12px; padding: 6px 10px; cursor: pointer; white-space: normal; overflow-wrap: anywhere; }
19371
19461
  .ss-w-greeting-cta:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: 2px; }
19372
- .ss-w-greeting-price { display: flex; flex-direction: column; gap: 4px; }
19373
19462
  .ss-w-greeting-ask:hover { border-color: var(--ss-w-accent); }
19374
19463
  .ss-w-greeting-ask:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: 2px; }
19375
19464
  /* Typing indicator: overlays the text area so bubble height stays put; hidden at
@@ -20852,38 +20941,38 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
20852
20941
  .ss-w-v8-since-line { margin: 0; font-size: 13px; line-height: 1.35; color: var(--ss-w-ink); overflow-wrap: anywhere; }
20853
20942
  .ss-w-v8-since-line::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--ss-w-accent); vertical-align: 2px; }
20854
20943
  .ss-w-v2 { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
20855
- .ss-w-v2-featured { border-color: color-mix(in srgb, var(--ss-w-accent) 40%, var(--ss-w-line)); }
20856
20944
  .ss-w-v2-featured[data-highlight="true"] { box-shadow: 0 0 0 2px var(--ss-w-accent); animation: ss-w-v2-pulse 1s ease-in-out 2; }
20857
20945
  @keyframes ss-w-v2-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--ss-w-accent) 35%, transparent); } }
20858
- .ss-w-v2-teams { display: flex; flex-direction: column; gap: 2px; }
20859
- .ss-w-v2-team { display: flex; align-items: center; gap: 4px; min-width: 0; }
20860
- .ss-w-v2-star { flex: none; min-width: 32px; min-height: 32px; padding: 0; border: 0; background: transparent; font: inherit; font-size: 16px; line-height: 1; color: var(--ss-w-accent); cursor: pointer; }
20861
- .ss-w-v2-star:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: 2px; border-radius: 8px; }
20862
20946
  .ss-w-v2-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; min-width: 0; }
20863
20947
  .ss-w-v2-market { min-width: 0; font-size: 12px; font-weight: 600; line-height: 1.25; color: var(--ss-w-faint); overflow-wrap: anywhere; }
20864
20948
  .ss-w-v2-tag { flex: 0 1 auto; padding: 2px 7px; border-radius: 6px; background: color-mix(in srgb, var(--ss-w-accent) 14%, var(--ss-w-panel)); color: var(--ss-w-ink); font-size: 11px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
20865
- .ss-w-v2-prices { display: flex; gap: 6px; min-width: 0; }
20866
- .ss-w-v2-prices .ss-w-slip-btn.ss-w-slip-btn--price { flex: 1 1 0; width: auto; min-width: 0; min-height: 40px; padding: 5px 8px; white-space: normal; }
20867
- .ss-w-v2-prices .ss-w-slip-btn--price .ss-w-mol-lab { text-wrap: balance; }
20868
- .ss-w-v2-stat { margin: 0; font-size: 12.5px; line-height: 1.35; color: var(--ss-w-ink); overflow-wrap: anywhere; }
20949
+ .ss-w-v2-stat { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ss-w-ink); overflow-wrap: anywhere; }
20950
+ .ss-w-pill { display: inline-flex; align-items: center; gap: 4px; background: var(--ss-w-pill); color: var(--ss-w-on-accent); border-radius: 999px; padding: 4px 11px 4px 7px; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
20951
+ .ss-w-pill svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 3; fill: none; }
20952
+ .ss-w-v2-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
20953
+ .ss-w-v2-tiles[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
20954
+ .ss-w-v2-tile { min-height: 66px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 8px 4px; border: 1.5px solid var(--ss-w-pill); border-radius: 12px; background: var(--ss-w-panel); box-shadow: 0 2px 0 color-mix(in srgb, var(--ss-w-pill) 25%, var(--ss-w-panel)); font: inherit; font-size: 13px; font-weight: 500; color: var(--ss-w-ink); text-align: center; overflow-wrap: anywhere; cursor: pointer; }
20955
+ .ss-w-v2-row { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px 6px 12px; border: 1px solid var(--ss-w-line); border-radius: 10px; background: var(--ss-w-panel); font: inherit; font-size: 14px; font-weight: 500; color: var(--ss-w-ink); text-align: start; overflow-wrap: anywhere; cursor: pointer; }
20956
+ .ss-w-v2-tile:disabled, .ss-w-v2-row:disabled { opacity: 0.6; cursor: default; }
20957
+ .ss-w-v2-tile:focus-visible, .ss-w-v2-row:focus-visible, .ss-w-v2-mkt:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: 2px; }
20958
+ .ss-w-v2-fact { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--ss-w-bubble); }
20959
+ .ss-w-v2-fact p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ss-w-ink); overflow-wrap: anywhere; }
20960
+ .ss-w-v2-title { margin: 0; flex: 1 1 0; min-width: 0; font-size: 19px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
20961
+ .ss-w-v2-meta { margin: -6px 0 0; font-size: 13px; color: var(--ss-w-faint); overflow-wrap: anywhere; }
20962
+ .ss-w-v2-mkt { min-height: 36px; display: inline-flex; align-items: center; gap: 4px; padding: 0 10px 0 12px; border: 1px solid var(--ss-w-line); border-radius: 999px; background: var(--ss-w-panel); font: inherit; font-size: 14px; font-weight: 600; color: var(--ss-w-ink); cursor: pointer; }
20963
+ .ss-w-v2-hint { margin: 0; font-size: 12px; color: var(--ss-w-faint); }
20964
+ .ss-w-v2-hello { margin: 0; padding: 10px 13px; border-radius: 4px 16px 16px 16px; background: color-mix(in srgb, var(--ss-w-accent) 8%, var(--ss-w-panel)); font-size: 15px; line-height: 1.5; color: var(--ss-w-ink); overflow-wrap: anywhere; }
20869
20965
  .ss-w-v2 .ss-w-toast { position: static; width: auto; max-width: none; box-shadow: none; }
20870
20966
  .ss-w-v2-gone { margin: 0; font-size: 12.5px; line-height: 1.35; color: var(--ss-w-ink); overflow-wrap: anywhere; }
20871
- .ss-w-v2-prices .ss-w-slip-btn--price:disabled { opacity: 0.6; cursor: default; }
20872
- .ss-w-v2-strip, .ss-w-v2-alts { gap: 6px; }
20873
- .ss-w-v2-strip-row, .ss-w-v2-alt-row { gap: 6px; padding: 8px 12px; }
20967
+ .ss-w-v2-alts { gap: 6px; }
20968
+ .ss-w-v2-alt-row { gap: 6px; padding: 8px 12px; }
20874
20969
  .ss-w-v2-chips .ss-w-v8-chip { font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
20875
20970
  .ss-w-v2-chips .ss-w-v8-chip:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: 2px; }
20876
- .ss-w-v2-chooser { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--ss-w-ink); overflow-wrap: anywhere; }
20877
20971
  .ss-w-v2-picker { gap: 6px; }
20878
- .ss-w-v2-picker-title { margin: 0; font-size: 11.5px; font-weight: 600; color: var(--ss-w-faint); }
20879
20972
  .ss-w-v2-picker-list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
20880
20973
  .ss-w-v2-picker-row { display: flex; flex-direction: column; align-items: stretch; gap: 4px; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--ss-w-line); border-radius: 12px; background: var(--ss-w-panel); font: inherit; text-align: start; color: var(--ss-w-ink); cursor: pointer; }
20881
20974
  .ss-w-v2-picker-row[aria-current="true"] { border-color: var(--ss-w-accent); }
20882
20975
  .ss-w-v2-picker-row:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: 2px; }
20883
- .ss-w-v2-picker-prices { display: flex; flex-wrap: wrap; gap: 4px 12px; min-width: 0; font-size: 12.5px; }
20884
- .ss-w-v2-picker-price { display: inline-flex; gap: 6px; min-width: 0; }
20885
- .ss-w-v2-picker-price .ss-w-mol-lab, .ss-w-v2-picker-price .ss-w-mol-tick { font-size: 12.5px; }
20886
- .ss-w-v2-picker-price .ss-w-mol-lab { color: var(--ss-w-ink); }
20887
20976
  @media (prefers-reduced-motion: no-preference) { .ss-w-v2-picker-row { transition: border-color 120ms ease; } }
20888
20977
 
20889
20978
  /* guess */
@@ -20899,6 +20988,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
20899
20988
  /* team and player cards */
20900
20989
  .ss-w-v8-cards { gap: 8px; }
20901
20990
  .ss-w-v8-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 10px 12px; border: 1px solid var(--ss-w-line); border-radius: 14px; background: var(--ss-w-panel); }
20991
+ .ss-w-v2-featured.ss-w-v8-card { border-color: color-mix(in srgb, var(--ss-w-accent) 40%, var(--ss-w-line)); gap: 10px; padding: 14px 16px; border-radius: 16px; }
20902
20992
  .ss-w-v8-team { border-color: color-mix(in srgb, var(--ss-w-accent) 40%, var(--ss-w-line)); }
20903
20993
  .ss-w-v8-card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 2px 8px; min-width: 0; }
20904
20994
  .ss-w-v8-card-name { flex: 1 1 0; min-width: 0; font-size: 14.5px; font-weight: 650; line-height: 1.2; color: var(--ss-w-ink); overflow-wrap: anywhere; }
@@ -20931,8 +21021,10 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
20931
21021
  .ss-w-v8-card-lead { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
20932
21022
  .ss-w-v8-card-mkt { min-width: 0; font-size: 11.5px; font-weight: 600; line-height: 1.25; color: var(--ss-w-faint); overflow-wrap: anywhere; }
20933
21023
  .ss-w-v8-card-row .ss-w-slip { flex: none; max-width: 70%; }
20934
- .ss-w-v8-card-row .ss-w-slip-btn.ss-w-slip-btn--price { padding: 5px 8px; white-space: normal; }
20935
- .ss-w-v8-card-row .ss-w-slip-btn--price .ss-w-mol-lab { text-wrap: balance; }
21024
+ .ss-w-v8-card-row .ss-w-slip-btn.ss-w-slip-btn--price { padding: 5px 8px; white-space: normal; background: var(--ss-w-pill); color: var(--ss-w-on-accent); border-color: transparent; border-radius: 999px; }
21025
+ .ss-w-v8-card-row .ss-w-slip-btn--price .ss-w-mol-lab { text-wrap: balance; color: var(--ss-w-on-accent); }
21026
+ .ss-w-v8-card-row .ss-w-slip-btn.ss-w-slip-btn--price[data-settled] { background: var(--ss-w-panel); color: var(--ss-w-faint); border-color: var(--ss-w-line); }
21027
+ .ss-w-v8-card-row .ss-w-slip-btn--price[data-settled] .ss-w-mol-lab { color: var(--ss-w-faint); }
20936
21028
  .ss-w-v8-card-asof { min-width: 0; font-size: 10.5px; line-height: 1.25; color: var(--ss-w-faint); overflow-wrap: anywhere; }
20937
21029
  .ss-w-v8-card-line--pending { min-height: 39.5px; border-radius: 10px; background: color-mix(in srgb, var(--ss-w-faint) 12%, var(--ss-w-panel)); }
20938
21030
  .ss-w-v8-hit-row { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
@@ -22087,6 +22179,8 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
22087
22179
  .ss-w-tni-price-lab { color: var(--ss-w-faint); font-weight: 600; }
22088
22180
  .ss-w-tni-price-val { color: var(--ss-w-ink); font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
22089
22181
  .ss-w-tni-price-sep { color: var(--ss-w-faint); font-weight: 400; }
22182
+ .ss-w-v2-row[data-settled], .ss-w-v2-tile[data-settled] { cursor: default; }
22183
+ .ss-w-pill--done { background: var(--ss-w-panel); color: var(--ss-w-faint); box-shadow: inset 0 0 0 1.5px var(--ss-w-line); font-size: 13px; }
22090
22184
  `;
22091
22185
 
22092
22186
  // src/StatsWidget.tsx
@@ -22098,7 +22192,7 @@ function buildClient(props) {
22098
22192
  return { client: props.client, conversation: props.client.conversation() };
22099
22193
  }
22100
22194
  const cfg = props.config;
22101
- const client = new import_widget_sdk40.StatsWidgetClient(toClientOptions(cfg));
22195
+ const client = new import_widget_sdk39.StatsWidgetClient(toClientOptions(cfg));
22102
22196
  return { client, conversation: client.conversation(toUserContext(cfg)) };
22103
22197
  } catch (err) {
22104
22198
  console.error("[StatsWidget] failed to initialize:", err instanceof Error ? err.message : err);
@@ -22289,12 +22383,6 @@ function StatsWidget(props) {
22289
22383
  return sports.includes(sport) ? prev : { greeting: builderGreeting, sports: [...sports, sport] };
22290
22384
  });
22291
22385
  }, [builderGreeting]);
22292
- const [handOffPending, setHandOffPending] = (0, import_react123.useState)(false);
22293
- const consumeHandOff = (0, import_react123.useCallback)(() => setHandOffPending(false), []);
22294
- const openTabFromChip = (0, import_react123.useCallback)((tab) => {
22295
- if (tab === "builder") setHandOffPending(true);
22296
- monitor.setActiveTab(tab);
22297
- }, [monitor.setActiveTab]);
22298
22386
  const builderOptions = (0, import_react123.useMemo)(() => {
22299
22387
  const greeting = builderGreeting;
22300
22388
  if (!greeting) return [];
@@ -22302,7 +22390,7 @@ function StatsWidget(props) {
22302
22390
  const sets = switchSets(greeting.greetingDashboards);
22303
22391
  const optionFor = (sport, label, d) => {
22304
22392
  const handOff = d?.marketFirst?.builder;
22305
- if (handOff) return [{ sport, label, preset: handOff, keepMarket: handOffPending }];
22393
+ if (handOff) return [{ sport, label, preset: handOff }];
22306
22394
  return d?.personal?.builder ? [{ sport, label, preset: d.personal.builder }] : [];
22307
22395
  };
22308
22396
  const options = sets ? sets.flatMap((s) => optionFor(s.sport, s.label, s.dashboard)) : (() => {
@@ -22310,7 +22398,7 @@ function StatsWidget(props) {
22310
22398
  return optionFor(sport, sportLabel(ui, sport), greeting.greetingDashboard);
22311
22399
  })();
22312
22400
  return options.filter((o) => !cooled.includes(o.sport));
22313
- }, [builderGreeting, coolOff, ui, handOffPending]);
22401
+ }, [builderGreeting, coolOff, ui]);
22314
22402
  const builderSport = [builderSportPick, rememberedSport, latestGreeting?.defaultSport].find((s) => !!s && builderOptions.some((o) => o.sport === s)) ?? builderOptions[0]?.sport ?? "";
22315
22403
  const [panelEverOpened, setPanelEverOpened] = (0, import_react123.useState)(panelOpen);
22316
22404
  if (panelOpen && !panelEverOpened) setPanelEverOpened(true);
@@ -22389,6 +22477,7 @@ function StatsWidget(props) {
22389
22477
  });
22390
22478
  const bubble = controller.state.greetingBubble;
22391
22479
  const bubblePrice = !stringsPending && controller.state.popupText && bubble?.price && bubble.matchId ? { matchId: bubble.matchId, price: bubble.price, sport: bubble.sport } : null;
22480
+ const bubbleGame = !stringsPending && controller.state.popupText && bubble?.game ? instantMs(bubble.startsAtUtc) === null ? bubble.game : ui.v2GameLine(bubble.game, bubble.startsAtUtc) : void 0;
22392
22481
  const bubbleCta = controller.state.popupText ? controller.state.greetingBubble?.cta ?? null : null;
22393
22482
  const mobile = useMobileBinding({
22394
22483
  binding: props.mobile,
@@ -22493,14 +22582,15 @@ function StatsWidget(props) {
22493
22582
  favourites: favouritesEnabled && monitor.enabled ? favourites : null,
22494
22583
  conversation: built?.conversation ?? null,
22495
22584
  openFavourites: () => setFavouritesOpen(true),
22496
- openTab: openTabFromChip,
22585
+ openTab: monitor.setActiveTab,
22497
22586
  // Not before the club probe has answered: a club brand has no Favourites sheet, and the invite must not appear and then go.
22498
22587
  favouritesOffered: favouritesEnabled && monitor.enabled && clubFixturesResult.settled && !clubFixturesResult.enabled,
22499
22588
  // 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.
22500
22589
  favouritesReady: favouritesEnabled && monitor.enabled && clubFixturesResult.tabReady && !clubFixturesResult.enabled,
22501
22590
  holds,
22502
- memory: builderMemory
22503
- }), [favouritesEnabled, monitor.enabled, openTabFromChip, clubFixturesResult.settled, clubFixturesResult.tabReady, clubFixturesResult.enabled, favourites, built, holds, builderMemory]);
22591
+ memory: builderMemory,
22592
+ monitor: monitor.enabled ? monitor : void 0
22593
+ }), [monitor, favouritesEnabled, monitor.enabled, monitor.setActiveTab, clubFixturesResult.settled, clubFixturesResult.tabReady, clubFixturesResult.enabled, favourites, built, holds, builderMemory]);
22504
22594
  if (!built || widgetStrings.state === "unavailable") return null;
22505
22595
  const attrs = themeAttrs(ui, oddsSettings.userTheme);
22506
22596
  return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(EventLogContext.Provider, { value: logger, children: /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(TrackingContext.Provider, { value: track, children: /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(SportScopeContext.Provider, { value: sportScope, children: /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(OddsSettingsContext.Provider, { value: oddsSettings, children: /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(HostEventsProvider, { value: hostEvents, children: /* @__PURE__ */ (0, import_jsx_runtime162.jsx)("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__ */ (0, import_jsx_runtime162.jsx)(PersonalGreetingContext.Provider, { value: personalGreeting, children: /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(GreetingHighlightContext.Provider, { value: highlightRequest, children: /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
@@ -22535,7 +22625,7 @@ function StatsWidget(props) {
22535
22625
  presetGrid,
22536
22626
  favouritesEnabled: favouritesEnabled && clubFixturesResult.tabReady && !clubFixturesResult.enabled,
22537
22627
  favourites: { controller: favourites, sport: favSport, sports: favSports, onSportChange: setFavSportPick, open: favouritesOpen, onOpenChange: setFavouritesOpen },
22538
- builder: { options: builderOptions, sport: builderSport, onSportChange: setBuilderSportPick, onCoolOff: onBuilderCoolOff, onHandOffMounted: consumeHandOff, tabs: monitor },
22628
+ builder: { options: builderOptions, sport: builderSport, onSportChange: setBuilderSportPick, onCoolOff: onBuilderCoolOff, tabs: monitor },
22539
22629
  onCloseRequested: mobile.onCloseRequested,
22540
22630
  onRegisterBack: mobile.onRegisterBack
22541
22631
  }
@@ -22568,6 +22658,7 @@ function StatsWidget(props) {
22568
22658
  onIntroStart: markIntroDone,
22569
22659
  asks,
22570
22660
  cta: bubbleCta ?? void 0,
22661
+ game: bubbleGame,
22571
22662
  onCta,
22572
22663
  onBubbleClick: logCtaClick,
22573
22664
  price: bubblePrice ? /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(