@sensiblestats/widget-react 0.138.2 → 0.140.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/index.cjs +540 -451
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +246 -157
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -38,7 +38,7 @@ __export(index_exports, {
|
|
|
38
38
|
module.exports = __toCommonJS(index_exports);
|
|
39
39
|
|
|
40
40
|
// src/StatsWidget.tsx
|
|
41
|
-
var
|
|
41
|
+
var import_react112 = require("react");
|
|
42
42
|
var import_widget_sdk38 = require("@sensiblestats/widget-sdk");
|
|
43
43
|
|
|
44
44
|
// src/strings/tag.ts
|
|
@@ -246,6 +246,7 @@ var BUNDLED_EN_GB = {
|
|
|
246
246
|
"widget.v8Paused": "No priced games in this sport right now. Stats and questions still work.",
|
|
247
247
|
"widget.v8NoGamesToday": "No games today",
|
|
248
248
|
"widget.v8Miss": "No combo comes near that total in these games.",
|
|
249
|
+
"widget.v8Nearest": "No combo lands on that total in these games. This is the closest.",
|
|
249
250
|
"widget.v8UseAllGames": "Use all games",
|
|
250
251
|
"widget.v8BuilderShow": "Show me",
|
|
251
252
|
"widget.v8BuilderIn": "in",
|
|
@@ -1337,7 +1338,7 @@ function parseOddsFormat(value) {
|
|
|
1337
1338
|
}
|
|
1338
1339
|
|
|
1339
1340
|
// src/version.generated.ts
|
|
1340
|
-
var WIDGET_REACT_VERSION = "0.
|
|
1341
|
+
var WIDGET_REACT_VERSION = "0.140.0";
|
|
1341
1342
|
|
|
1342
1343
|
// src/config.ts
|
|
1343
1344
|
function hostTag(cfg) {
|
|
@@ -1637,6 +1638,7 @@ function normalizeUi(cfg, loaded) {
|
|
|
1637
1638
|
v8PausedNext: strings.v8PausedNext,
|
|
1638
1639
|
v8NoGamesToday: strings.v8NoGamesToday,
|
|
1639
1640
|
v8Miss: strings.v8Miss,
|
|
1641
|
+
v8Nearest: strings.v8Nearest,
|
|
1640
1642
|
v8UseAllGames: strings.v8UseAllGames,
|
|
1641
1643
|
v8Out: strings.v8Out,
|
|
1642
1644
|
v8More: strings.v8More,
|
|
@@ -2587,6 +2589,7 @@ var MAX_ODDS = 1e4;
|
|
|
2587
2589
|
function slipPickFields(selection, label, line) {
|
|
2588
2590
|
const fields = {};
|
|
2589
2591
|
if (((0, import_widget_sdk4.sportOf)(selection.sport) === void 0 || (0, import_widget_sdk4.toWireSport)(selection.sport) !== void 0) && Number.isSafeInteger(selection.matchId) && selection.matchId > 0) fields.matchId = selection.matchId;
|
|
2592
|
+
if (Number.isSafeInteger(selection.matchOddsId) && selection.matchOddsId > 0) fields.matchOddsId = selection.matchOddsId;
|
|
2590
2593
|
if (label && label.trim() && label.length <= MAX_SELECTION) fields.selection = label;
|
|
2591
2594
|
if (line && line.trim() && line.length <= MAX_LINE) fields.line = line;
|
|
2592
2595
|
const odds = selection.oddsDecimal;
|
|
@@ -2964,6 +2967,7 @@ function toSlipEvent(name, entry) {
|
|
|
2964
2967
|
entityId: entry.market,
|
|
2965
2968
|
marketDeveloperName: entry.market,
|
|
2966
2969
|
matchId: entry.matchId,
|
|
2970
|
+
matchOddsId: entry.id,
|
|
2967
2971
|
selection: entry.selection,
|
|
2968
2972
|
line: entry.line,
|
|
2969
2973
|
odds: entry.odds,
|
|
@@ -3376,6 +3380,7 @@ function applyEvent(state, event) {
|
|
|
3376
3380
|
greetingDashboard: event.data.dashboard ?? void 0,
|
|
3377
3381
|
greetingDashboards: event.data.dashboards ?? void 0,
|
|
3378
3382
|
defaultSport: event.data.defaultSport ?? void 0,
|
|
3383
|
+
greeting: event.data.greeting,
|
|
3379
3384
|
clubFanDashboard: event.data.clubFanDashboard ?? void 0
|
|
3380
3385
|
}))
|
|
3381
3386
|
};
|
|
@@ -5615,7 +5620,7 @@ function useFavourites({ conversation, sport, operatorUserId, anonymousUserId, e
|
|
|
5615
5620
|
}
|
|
5616
5621
|
|
|
5617
5622
|
// src/components/dashboard/GreetingDashboard.tsx
|
|
5618
|
-
var
|
|
5623
|
+
var import_react44 = require("react");
|
|
5619
5624
|
|
|
5620
5625
|
// src/eventLogContext.ts
|
|
5621
5626
|
var import_react18 = require("react");
|
|
@@ -5631,6 +5636,50 @@ function useSportScope() {
|
|
|
5631
5636
|
return (0, import_react19.useContext)(SportScopeContext);
|
|
5632
5637
|
}
|
|
5633
5638
|
|
|
5639
|
+
// src/greetingEvents.ts
|
|
5640
|
+
var import_react20 = require("react");
|
|
5641
|
+
function latestGreetingMeta(messages) {
|
|
5642
|
+
for (let i = messages.length - 1; i >= 0; i--) {
|
|
5643
|
+
const m = messages[i];
|
|
5644
|
+
if (m && m.role === "assistant" && m.isGreeting) return m.greeting;
|
|
5645
|
+
}
|
|
5646
|
+
return void 0;
|
|
5647
|
+
}
|
|
5648
|
+
var sentByOwner = /* @__PURE__ */ new WeakMap();
|
|
5649
|
+
function sendGreetingOnce(log, owner, meta, surface) {
|
|
5650
|
+
let sent = sentByOwner.get(owner);
|
|
5651
|
+
if (!sent) {
|
|
5652
|
+
sent = /* @__PURE__ */ new Set();
|
|
5653
|
+
sentByOwner.set(owner, sent);
|
|
5654
|
+
}
|
|
5655
|
+
const key = `${meta.greetingId}:${surface}:${meta.sport}`;
|
|
5656
|
+
if (sent.has(key)) return;
|
|
5657
|
+
sent.add(key);
|
|
5658
|
+
log({
|
|
5659
|
+
name: "greeting_shown",
|
|
5660
|
+
greeting: {
|
|
5661
|
+
greetingId: meta.greetingId,
|
|
5662
|
+
surface,
|
|
5663
|
+
case: meta.case,
|
|
5664
|
+
sport: meta.sport,
|
|
5665
|
+
market: meta.market ?? null,
|
|
5666
|
+
marketStep: meta.marketStep,
|
|
5667
|
+
matchStep: meta.matchStep,
|
|
5668
|
+
matchId: meta.matchId ?? null,
|
|
5669
|
+
competitionId: meta.competitionId ?? null,
|
|
5670
|
+
chooserShown: meta.chooserShown
|
|
5671
|
+
}
|
|
5672
|
+
});
|
|
5673
|
+
}
|
|
5674
|
+
function useBubbleGreetingShown(log, owner, popupText, meta, confirmedShown) {
|
|
5675
|
+
(0, import_react20.useEffect)(() => {
|
|
5676
|
+
const text2 = confirmedShown === void 0 || confirmedShown === popupText ? popupText : null;
|
|
5677
|
+
if (!log || !text2 || !meta) return;
|
|
5678
|
+
sendGreetingOnce((e) => log.log(e), owner, meta, "bubble");
|
|
5679
|
+
}, [log, owner, popupText, meta, confirmedShown]);
|
|
5680
|
+
}
|
|
5681
|
+
var GreetingEventsContext = (0, import_react20.createContext)(null);
|
|
5682
|
+
|
|
5634
5683
|
// src/assets/logo.ts
|
|
5635
5684
|
var SS_LOGO_DATA_URI = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAjoAAAI6CAYAAAAuSOLAAAAAAXNSR0IArs4c6QAAAJplWElmTU0AKgAAAAgAAwESAAMAAAABAAEAAAExAAIAAAA9AAAAModpAAQAAAABAAAAcAAAAABBZG9iZSBQaG90b3Nob3AgMjYuMTAgKDIwMjUwNzMwLm0uMzE2NiAwN2IxMjM0KSAgKE1hY2ludG9zaCkAAAADoAEAAwAAAAEAAQAAoAIABAAAAAEAAAI6oAMABAAAAAEAAAI6AAAAACwGtVwAAAQwaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA2LjAuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIgogICAgICAgICAgICB4bWxuczpzdF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robuuLJyrgwBCpw7qlAkBCECgSALtldDDOllP1s5K6EWyxVb0BBA60VchAUAAAhBYQ2CktQL6LvrESuhcFBBYQwChw6UAAQhAICUCI2rRGbawEvpbtbMSekp1Syw9EUDo9ISNTBCAAAQcE2ivhH6MDdi/ycurHXuKaxAonQBCp3TEFAABCECgJgJDdr5WQn+4uiifVJMHFAuB2gkgdGqvAhyAAAQgUCKB9kroB0nsHKFSWAm9RNSY9kkAoeOzXvAKAhCAQLEERu0zMhhWQr+sWMNYg4BvAggd3/WDdxCAAASKI9BeCf0RMnhccUaxBAHfBBA6vusH7yAAAQgUS6C9EvpLZPTF2ieKNY41CPgjgNDxVyd4BAEIQKB8AiP2dZs0VkIvnzQl1EwAoVNzBVA8BCAAgdoI3L0S+qdr84GCIVAyAYROyYAxDwEIQMA1gfZK6EdqYdBnyU9WQnddWTjXCwGETi/UyAMBCEAgNQLD9n0b1Jw7mZ2bWmjE02wCCJ1m1z/RQwACELibQHsl9H005877dZCV0O8mwzsIQAACEIAABJIiMG772bgdk1RMBAMBCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIBAqgT+PwQUc6J1VOHQAAAAAElFTkSuQmCC";
|
|
5636
5685
|
|
|
@@ -5764,10 +5813,10 @@ function DashboardTile({ tile, onTap, oddsLabel, badgePlacement = "meta" }) {
|
|
|
5764
5813
|
}
|
|
5765
5814
|
|
|
5766
5815
|
// src/components/dashboard/SportSwitch.tsx
|
|
5767
|
-
var
|
|
5816
|
+
var import_react21 = require("react");
|
|
5768
5817
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
5769
5818
|
function SportSwitch({ sports, selected, onSelect, liveLabel: liveLabel3, groupLabel, tag: tag2 }) {
|
|
5770
|
-
const refs = (0,
|
|
5819
|
+
const refs = (0, import_react21.useRef)([]);
|
|
5771
5820
|
if (sports.length < 2) return null;
|
|
5772
5821
|
const focusAt = (i) => refs.current[(i + sports.length) % sports.length]?.focus();
|
|
5773
5822
|
const onKeyDown = (e, i) => {
|
|
@@ -5816,36 +5865,41 @@ function SportSwitch({ sports, selected, onSelect, liveLabel: liveLabel3, groupL
|
|
|
5816
5865
|
}
|
|
5817
5866
|
|
|
5818
5867
|
// src/personalGreetingContext.ts
|
|
5819
|
-
var
|
|
5868
|
+
var import_react22 = require("react");
|
|
5820
5869
|
function useSessionHolds() {
|
|
5821
|
-
const [dismissed, setDismissed] = (0,
|
|
5822
|
-
const [followed, setFollowed] = (0,
|
|
5823
|
-
return (0,
|
|
5870
|
+
const [dismissed, setDismissed] = (0, import_react22.useState)(/* @__PURE__ */ new Set());
|
|
5871
|
+
const [followed, setFollowed] = (0, import_react22.useState)(/* @__PURE__ */ new Set());
|
|
5872
|
+
return (0, import_react22.useMemo)(() => ({
|
|
5824
5873
|
dismissed,
|
|
5825
5874
|
followed,
|
|
5826
5875
|
dismiss: (key) => setDismissed((prev) => prev.has(key) ? prev : new Set(prev).add(key)),
|
|
5827
5876
|
follow: (key) => setFollowed((prev) => prev.has(key) ? prev : new Set(prev).add(key))
|
|
5828
5877
|
}), [dismissed, followed]);
|
|
5829
5878
|
}
|
|
5830
|
-
var PersonalGreetingContext = (0,
|
|
5879
|
+
var PersonalGreetingContext = (0, import_react22.createContext)(null);
|
|
5831
5880
|
function usePersonalGreeting() {
|
|
5832
|
-
return (0,
|
|
5881
|
+
return (0, import_react22.useContext)(PersonalGreetingContext);
|
|
5833
5882
|
}
|
|
5834
5883
|
|
|
5835
5884
|
// src/components/dashboard/v8/AskCards.tsx
|
|
5885
|
+
var import_react23 = require("react");
|
|
5836
5886
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
5837
5887
|
function AskCards({ asks, ui, ofYours, onAct }) {
|
|
5888
|
+
const events = (0, import_react23.useContext)(GreetingEventsContext);
|
|
5838
5889
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { className: "ss-w-v8-sec ss-w-v8-asks", children: [
|
|
5839
5890
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h3", { className: "ss-w-v8-sec-title", children: ofYours ? ui.v8AskYours : ui.v8AskOr }),
|
|
5840
|
-
asks.map((ask, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", className: "ss-w-v8-ask", onClick: () =>
|
|
5891
|
+
asks.map((ask, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", className: "ss-w-v8-ask", onClick: () => {
|
|
5892
|
+
events?.askTap(i);
|
|
5893
|
+
onAct?.(toActionVM({ ...ask }));
|
|
5894
|
+
}, children: ask.actionLabel }, `${ask.actionLabel}:${i}`))
|
|
5841
5895
|
] });
|
|
5842
5896
|
}
|
|
5843
5897
|
|
|
5844
5898
|
// src/components/dashboard/v8/CardLine.tsx
|
|
5845
|
-
var
|
|
5899
|
+
var import_react38 = require("react");
|
|
5846
5900
|
|
|
5847
5901
|
// src/useBuilderGrid.ts
|
|
5848
|
-
var
|
|
5902
|
+
var import_react24 = require("react");
|
|
5849
5903
|
|
|
5850
5904
|
// src/builderMemory.ts
|
|
5851
5905
|
var GRID_TTL_MS = 5 * 6e4;
|
|
@@ -5935,18 +5989,18 @@ function forget(memory3, key, flight) {
|
|
|
5935
5989
|
if (flights?.get(key) === flight) flights.delete(key);
|
|
5936
5990
|
}
|
|
5937
5991
|
function useBuilderGrid({ conversation, locale, memory: memory3, initial: initial2 }) {
|
|
5938
|
-
const [seed] = (0,
|
|
5939
|
-
const [grid, setGrid] = (0,
|
|
5940
|
-
const [status2, setStatus] = (0,
|
|
5941
|
-
const [confirmed, setConfirmed] = (0,
|
|
5942
|
-
const [answered, setAnswered] = (0,
|
|
5943
|
-
const seq = (0,
|
|
5944
|
-
const mounted = (0,
|
|
5945
|
-
const hung = (0,
|
|
5946
|
-
const waiting = (0,
|
|
5947
|
-
const memoryRef = (0,
|
|
5992
|
+
const [seed] = (0, import_react24.useState)(() => memory3 && conversation && initial2 ? memory3.cachedGrid(gridKey(locale, initial2)) : void 0);
|
|
5993
|
+
const [grid, setGrid] = (0, import_react24.useState)(seed ?? null);
|
|
5994
|
+
const [status2, setStatus] = (0, import_react24.useState)(seed ? "ready" : "idle");
|
|
5995
|
+
const [confirmed, setConfirmed] = (0, import_react24.useState)(false);
|
|
5996
|
+
const [answered, setAnswered] = (0, import_react24.useState)(seed && initial2 ? { req: initial2, locale } : null);
|
|
5997
|
+
const seq = (0, import_react24.useRef)(0);
|
|
5998
|
+
const mounted = (0, import_react24.useRef)(true);
|
|
5999
|
+
const hung = (0, import_react24.useRef)(void 0);
|
|
6000
|
+
const waiting = (0, import_react24.useRef)(null);
|
|
6001
|
+
const memoryRef = (0, import_react24.useRef)(memory3);
|
|
5948
6002
|
memoryRef.current = memory3;
|
|
5949
|
-
const stopWaiting = (0,
|
|
6003
|
+
const stopWaiting = (0, import_react24.useCallback)((release, keep) => {
|
|
5950
6004
|
window.clearTimeout(hung.current);
|
|
5951
6005
|
const w = waiting.current;
|
|
5952
6006
|
waiting.current = null;
|
|
@@ -5954,14 +6008,14 @@ function useBuilderGrid({ conversation, locale, memory: memory3, initial: initia
|
|
|
5954
6008
|
w.flight.waiters -= 1;
|
|
5955
6009
|
if (release && w.key !== keep && w.flight.waiters <= 0 && memoryRef.current) forget(memoryRef.current, w.key, w.flight);
|
|
5956
6010
|
}, []);
|
|
5957
|
-
(0,
|
|
6011
|
+
(0, import_react24.useEffect)(() => {
|
|
5958
6012
|
mounted.current = true;
|
|
5959
6013
|
return () => {
|
|
5960
6014
|
mounted.current = false;
|
|
5961
6015
|
stopWaiting(true);
|
|
5962
6016
|
};
|
|
5963
6017
|
}, [stopWaiting]);
|
|
5964
|
-
const request = (0,
|
|
6018
|
+
const request = (0, import_react24.useCallback)(async (req) => {
|
|
5965
6019
|
if (!conversation) return;
|
|
5966
6020
|
const mine = ++seq.current;
|
|
5967
6021
|
const key = memory3 ? gridKey(locale, req) : null;
|
|
@@ -6037,26 +6091,26 @@ function useBuilderGrid({ conversation, locale, memory: memory3, initial: initia
|
|
|
6037
6091
|
}
|
|
6038
6092
|
|
|
6039
6093
|
// src/components/AddToSlipButton.tsx
|
|
6040
|
-
var
|
|
6094
|
+
var import_react29 = require("react");
|
|
6041
6095
|
|
|
6042
6096
|
// src/slipAdd.ts
|
|
6043
|
-
var
|
|
6097
|
+
var import_react27 = require("react");
|
|
6044
6098
|
var import_widget_sdk16 = require("@sensiblestats/widget-sdk");
|
|
6045
6099
|
|
|
6046
6100
|
// src/trackingContext.ts
|
|
6047
|
-
var
|
|
6101
|
+
var import_react25 = require("react");
|
|
6048
6102
|
var noop = () => {
|
|
6049
6103
|
};
|
|
6050
|
-
var TrackingContext = (0,
|
|
6104
|
+
var TrackingContext = (0, import_react25.createContext)(noop);
|
|
6051
6105
|
function useTrack() {
|
|
6052
|
-
return (0,
|
|
6106
|
+
return (0, import_react25.useContext)(TrackingContext);
|
|
6053
6107
|
}
|
|
6054
6108
|
|
|
6055
6109
|
// src/slipStateContext.ts
|
|
6056
|
-
var
|
|
6057
|
-
var SlipStateContext = (0,
|
|
6110
|
+
var import_react26 = require("react");
|
|
6111
|
+
var SlipStateContext = (0, import_react26.createContext)(null);
|
|
6058
6112
|
function useSlipState() {
|
|
6059
|
-
return (0,
|
|
6113
|
+
return (0, import_react26.useContext)(SlipStateContext);
|
|
6060
6114
|
}
|
|
6061
6115
|
|
|
6062
6116
|
// src/slipAdd.ts
|
|
@@ -6088,7 +6142,7 @@ function useSlipAdd(slip, ui) {
|
|
|
6088
6142
|
const handler = slip.onAddToSlip;
|
|
6089
6143
|
const rawLabels = !!ui?.rawBettingLabels;
|
|
6090
6144
|
const operatorFormat = ui?.oddsFormat ?? "decimal";
|
|
6091
|
-
return (0,
|
|
6145
|
+
return (0, import_react27.useCallback)(async (selection, { marketDeveloperName, selectionLabel, line, fact }) => {
|
|
6092
6146
|
if (!handler) return { kind: "failed" };
|
|
6093
6147
|
const display = slipDisplay({ ...selection.display, market: marketDeveloperName, selection: selectionLabel, line });
|
|
6094
6148
|
const out = toHostSelection(display ? { ...selection, display } : selection, operatorFormat);
|
|
@@ -6146,11 +6200,11 @@ function useSlipAdd(slip, ui) {
|
|
|
6146
6200
|
}
|
|
6147
6201
|
|
|
6148
6202
|
// src/components/Toast.tsx
|
|
6149
|
-
var
|
|
6203
|
+
var import_react28 = require("react");
|
|
6150
6204
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
6151
6205
|
var DISMISS_MS = 4e3;
|
|
6152
6206
|
function Toast({ toast, onDismiss }) {
|
|
6153
|
-
(0,
|
|
6207
|
+
(0, import_react28.useEffect)(() => {
|
|
6154
6208
|
if (!toast) return;
|
|
6155
6209
|
const timer = setTimeout(onDismiss, DISMISS_MS);
|
|
6156
6210
|
return () => clearTimeout(timer);
|
|
@@ -6162,10 +6216,10 @@ function Toast({ toast, onDismiss }) {
|
|
|
6162
6216
|
// src/components/AddToSlipButton.tsx
|
|
6163
6217
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
6164
6218
|
function SlipButton({ selection, marketDeveloperName, selectionLabel, line, slip, ui, price, ariaLabel, hold, fact }) {
|
|
6165
|
-
const [pending, setPending] = (0,
|
|
6166
|
-
const [settledLocal, setSettledLocal] = (0,
|
|
6167
|
-
const [toast, setToast] = (0,
|
|
6168
|
-
const dismiss = (0,
|
|
6219
|
+
const [pending, setPending] = (0, import_react29.useState)(false);
|
|
6220
|
+
const [settledLocal, setSettledLocal] = (0, import_react29.useState)(false);
|
|
6221
|
+
const [toast, setToast] = (0, import_react29.useState)(null);
|
|
6222
|
+
const dismiss = (0, import_react29.useCallback)(() => setToast(null), []);
|
|
6169
6223
|
const add = useSlipAdd(slip, ui);
|
|
6170
6224
|
const slipState = useSlipState();
|
|
6171
6225
|
const { oddsFormat } = useOddsSettings();
|
|
@@ -6271,11 +6325,11 @@ function oldestQuote(legs) {
|
|
|
6271
6325
|
}
|
|
6272
6326
|
|
|
6273
6327
|
// src/components/MarketOddsCardList.tsx
|
|
6274
|
-
var
|
|
6328
|
+
var import_react37 = require("react");
|
|
6275
6329
|
var import_widget_sdk21 = require("@sensiblestats/widget-sdk");
|
|
6276
6330
|
|
|
6277
6331
|
// src/nflKickoff.ts
|
|
6278
|
-
var
|
|
6332
|
+
var import_react30 = require("react");
|
|
6279
6333
|
var import_widget_sdk18 = require("@sensiblestats/widget-sdk");
|
|
6280
6334
|
var MAX_TIMEOUT_MS = 2147483647;
|
|
6281
6335
|
var isNfl = (sport) => (0, import_widget_sdk18.sportOf)(sport) === "americanfootball";
|
|
@@ -6303,9 +6357,9 @@ function guardLegsPreMatch(slip, legs, ui) {
|
|
|
6303
6357
|
};
|
|
6304
6358
|
}
|
|
6305
6359
|
function useNextKickoffRender(kickoffs) {
|
|
6306
|
-
const [tick, setTick] = (0,
|
|
6360
|
+
const [tick, setTick] = (0, import_react30.useState)(0);
|
|
6307
6361
|
const key = kickoffs.map((k) => k ?? "").join("|");
|
|
6308
|
-
(0,
|
|
6362
|
+
(0, import_react30.useEffect)(() => {
|
|
6309
6363
|
const now = Date.now();
|
|
6310
6364
|
const upcoming = key.split("|").map((k) => k ? Date.parse(k) : NaN).filter((ms) => ms > now);
|
|
6311
6365
|
if (upcoming.length === 0) return;
|
|
@@ -6341,14 +6395,14 @@ function OddsMovementBadge({
|
|
|
6341
6395
|
}
|
|
6342
6396
|
|
|
6343
6397
|
// src/components/Crest.tsx
|
|
6344
|
-
var
|
|
6398
|
+
var import_react31 = require("react");
|
|
6345
6399
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
6346
6400
|
function initials(name) {
|
|
6347
6401
|
return (name ?? "").trim().slice(0, 1).toUpperCase() || "?";
|
|
6348
6402
|
}
|
|
6349
6403
|
function Crest({ url, name, kind, abbr }) {
|
|
6350
6404
|
const cls = kind === "comp" ? "ss-w-bi-comp-logo" : "ss-w-bi-crest";
|
|
6351
|
-
const [failed, setFailed] = (0,
|
|
6405
|
+
const [failed, setFailed] = (0, import_react31.useState)(false);
|
|
6352
6406
|
if (url && !failed) {
|
|
6353
6407
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("img", { className: cls, src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
6354
6408
|
}
|
|
@@ -6357,7 +6411,7 @@ function Crest({ url, name, kind, abbr }) {
|
|
|
6357
6411
|
}
|
|
6358
6412
|
|
|
6359
6413
|
// src/components/PinToggle.tsx
|
|
6360
|
-
var
|
|
6414
|
+
var import_react32 = require("react");
|
|
6361
6415
|
var import_widget_sdk19 = require("@sensiblestats/widget-sdk");
|
|
6362
6416
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
6363
6417
|
var PIN_GLYPHS = {
|
|
@@ -6366,8 +6420,8 @@ var PIN_GLYPHS = {
|
|
|
6366
6420
|
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" }
|
|
6367
6421
|
};
|
|
6368
6422
|
function PinToggle({ pin, monitor, ui, market }) {
|
|
6369
|
-
const [toast, setToast] = (0,
|
|
6370
|
-
const dismiss = (0,
|
|
6423
|
+
const [toast, setToast] = (0, import_react32.useState)(null);
|
|
6424
|
+
const dismiss = (0, import_react32.useCallback)(() => setToast(null), []);
|
|
6371
6425
|
const log = useEventLog();
|
|
6372
6426
|
if (!monitor || !monitor.enabled) return null;
|
|
6373
6427
|
const key = pinKey(pin);
|
|
@@ -6436,11 +6490,11 @@ function PinToggle({ pin, monitor, ui, market }) {
|
|
|
6436
6490
|
}
|
|
6437
6491
|
|
|
6438
6492
|
// src/components/PriceHistoryButton.tsx
|
|
6439
|
-
var
|
|
6493
|
+
var import_react33 = require("react");
|
|
6440
6494
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
6441
6495
|
function PriceHistoryButton({ selection, monitor, ui, displayLabel }) {
|
|
6442
|
-
const [toast, setToast] = (0,
|
|
6443
|
-
const dismiss = (0,
|
|
6496
|
+
const [toast, setToast] = (0, import_react33.useState)(null);
|
|
6497
|
+
const dismiss = (0, import_react33.useCallback)(() => setToast(null), []);
|
|
6444
6498
|
const log = useEventLog();
|
|
6445
6499
|
if (!monitor || !monitor.enabled) return null;
|
|
6446
6500
|
const name = displayLabel ?? joinSelection(selection.selectionLabel ?? void 0, selection.line ?? void 0);
|
|
@@ -6467,19 +6521,19 @@ function PriceHistoryButton({ selection, monitor, ui, displayLabel }) {
|
|
|
6467
6521
|
}
|
|
6468
6522
|
|
|
6469
6523
|
// src/components/LiveFactBlock.tsx
|
|
6470
|
-
var
|
|
6524
|
+
var import_react35 = require("react");
|
|
6471
6525
|
|
|
6472
6526
|
// src/useFactView.ts
|
|
6473
|
-
var
|
|
6527
|
+
var import_react34 = require("react");
|
|
6474
6528
|
var DWELL_MS = 1e3;
|
|
6475
6529
|
var seen = /* @__PURE__ */ new Set();
|
|
6476
6530
|
function useFactView(ref, fact, entity2) {
|
|
6477
6531
|
const log = useEventLog();
|
|
6478
|
-
const entityRef = (0,
|
|
6532
|
+
const entityRef = (0, import_react34.useRef)(entity2);
|
|
6479
6533
|
entityRef.current = entity2;
|
|
6480
6534
|
const id = fact?.id;
|
|
6481
6535
|
const factKey = fact?.factKey;
|
|
6482
|
-
(0,
|
|
6536
|
+
(0, import_react34.useEffect)(() => {
|
|
6483
6537
|
if (id === void 0 || factKey === void 0 || seen.has(id) || !log) return;
|
|
6484
6538
|
const el = ref.current;
|
|
6485
6539
|
if (!el) return;
|
|
@@ -6527,10 +6581,10 @@ function evidenceText(f, ui) {
|
|
|
6527
6581
|
return parts2.length > 0 ? parts2.join(" \xB7 ") : void 0;
|
|
6528
6582
|
}
|
|
6529
6583
|
function LiveFactBlock({ facts, match, ui, slip, onAsk }) {
|
|
6530
|
-
const [expanded, setExpanded] = (0,
|
|
6584
|
+
const [expanded, setExpanded] = (0, import_react35.useState)(false);
|
|
6531
6585
|
const { oddsFormat } = useOddsSettings();
|
|
6532
6586
|
const log = useEventLog();
|
|
6533
|
-
const sectionRef = (0,
|
|
6587
|
+
const sectionRef = (0, import_react35.useRef)(null);
|
|
6534
6588
|
const current = facts.find((f) => f.marketState);
|
|
6535
6589
|
const earlier = facts.filter((f) => f.marketState && f !== current);
|
|
6536
6590
|
const background = facts.filter((f) => !f.marketState).slice(0, BACKGROUND_MAX);
|
|
@@ -6615,7 +6669,7 @@ function LiveFactBlock({ facts, match, ui, slip, onAsk }) {
|
|
|
6615
6669
|
}
|
|
6616
6670
|
|
|
6617
6671
|
// src/components/AllMarketsButton.tsx
|
|
6618
|
-
var
|
|
6672
|
+
var import_react36 = require("react");
|
|
6619
6673
|
var import_widget_sdk20 = require("@sensiblestats/widget-sdk");
|
|
6620
6674
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
6621
6675
|
function allMarketsCount(vm, monitor) {
|
|
@@ -6624,8 +6678,8 @@ function allMarketsCount(vm, monitor) {
|
|
|
6624
6678
|
}
|
|
6625
6679
|
function AllMarketsButton({ vm, count: count2, monitor, ui, surface }) {
|
|
6626
6680
|
const log = useEventLog();
|
|
6627
|
-
const [toast, setToast] = (0,
|
|
6628
|
-
const dismiss = (0,
|
|
6681
|
+
const [toast, setToast] = (0, import_react36.useState)(null);
|
|
6682
|
+
const dismiss = (0, import_react36.useCallback)(() => setToast(null), []);
|
|
6629
6683
|
const onClick = () => {
|
|
6630
6684
|
if (monitor.pinMatch({ matchId: vm.matchId, marketDeveloperName: vm.marketDeveloperName }) === "match_limit") {
|
|
6631
6685
|
setToast({ kind: "error", text: ui.matchLimitToast });
|
|
@@ -6690,7 +6744,7 @@ function fmtHhMm(iso, tag2, clock3, timeZone) {
|
|
|
6690
6744
|
return formatTime(iso, tag2, clock3, { timeZone });
|
|
6691
6745
|
}
|
|
6692
6746
|
function MarketOddsCard({ vm, ui, slip, monitor, inSlipIds, hideHeader, pinRef }) {
|
|
6693
|
-
const [open, setOpen] = (0,
|
|
6747
|
+
const [open, setOpen] = (0, import_react37.useState)(false);
|
|
6694
6748
|
useNextKickoffRender(isNfl(vm.sport) ? [vm.kickoffUtc] : []);
|
|
6695
6749
|
const kickoffFallback = vm.kickoffUtc ? ui.bettingKickoff(vm.kickoffUtc) : void 0;
|
|
6696
6750
|
const kickoff = vm.kickoffLabel ?? (kickoffFallback ? `${kickoffFallback.dayLabel} ${kickoffFallback.time}` : void 0);
|
|
@@ -6701,9 +6755,9 @@ function MarketOddsCard({ vm, ui, slip, monitor, inSlipIds, hideHeader, pinRef }
|
|
|
6701
6755
|
const asOfMs = live ? new Date(live.asOfUtc).getTime() : NaN;
|
|
6702
6756
|
const isStale = live != null && !isClosed && (vm.awaitingLiveUpdate === true || Date.now() - asOfMs > STALE_AFTER_MS);
|
|
6703
6757
|
const staleTime = isStale && live ? fmtHhMm(live.asOfUtc, ui.locale, clockOf(ui), ui.timeZone) : null;
|
|
6704
|
-
const [, setStaleTick] = (0,
|
|
6758
|
+
const [, setStaleTick] = (0, import_react37.useState)(0);
|
|
6705
6759
|
const watchStale = live != null && !isClosed && !isStale;
|
|
6706
|
-
(0,
|
|
6760
|
+
(0, import_react37.useEffect)(() => {
|
|
6707
6761
|
if (!watchStale) return;
|
|
6708
6762
|
const id = window.setTimeout(() => setStaleTick((n) => n + 1), Math.max(0, asOfMs + STALE_AFTER_MS - Date.now()) + 1);
|
|
6709
6763
|
return () => window.clearTimeout(id);
|
|
@@ -6842,7 +6896,7 @@ var asOf = (iso, ui) => {
|
|
|
6842
6896
|
function CardLine({ card, ui, slip, sport, marketKey, conversation, operatorUserId, anonymousUserId }) {
|
|
6843
6897
|
const matchId = card.matchId;
|
|
6844
6898
|
const canAdd2 = !!slip.onAddToSlip;
|
|
6845
|
-
const ask = (0,
|
|
6899
|
+
const ask = (0, import_react38.useMemo)(() => canAdd2 && marketKey && matchId ? {
|
|
6846
6900
|
sport,
|
|
6847
6901
|
marketKey,
|
|
6848
6902
|
matchIds: [matchId],
|
|
@@ -6853,7 +6907,7 @@ function CardLine({ card, ui, slip, sport, marketKey, conversation, operatorUser
|
|
|
6853
6907
|
...anonymousUserId ? { anonymousUserId } : {}
|
|
6854
6908
|
} : null, [canAdd2, sport, marketKey, matchId, operatorUserId, anonymousUserId]);
|
|
6855
6909
|
const { grid, answeredFor, request } = useBuilderGrid({ conversation, locale: ui.hostTag, initial: ask });
|
|
6856
|
-
(0,
|
|
6910
|
+
(0, import_react38.useEffect)(() => {
|
|
6857
6911
|
if (ask) void request(ask);
|
|
6858
6912
|
}, [request, ask]);
|
|
6859
6913
|
useNextKickoffRender([card.startsAtUtc]);
|
|
@@ -6892,16 +6946,16 @@ function CardLine({ card, ui, slip, sport, marketKey, conversation, operatorUser
|
|
|
6892
6946
|
}
|
|
6893
6947
|
|
|
6894
6948
|
// src/components/dashboard/v8/Pic.tsx
|
|
6895
|
-
var
|
|
6949
|
+
var import_react39 = require("react");
|
|
6896
6950
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
6897
6951
|
function Pic({ src, kind = "team" }) {
|
|
6898
|
-
const [failed, setFailed] = (0,
|
|
6952
|
+
const [failed, setFailed] = (0, import_react39.useState)(null);
|
|
6899
6953
|
if (!src || failed === src) return null;
|
|
6900
6954
|
return /* @__PURE__ */ (0, import_jsx_runtime15.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) });
|
|
6901
6955
|
}
|
|
6902
6956
|
|
|
6903
6957
|
// src/components/dashboard/v8/FactPrice.tsx
|
|
6904
|
-
var
|
|
6958
|
+
var import_react40 = require("react");
|
|
6905
6959
|
|
|
6906
6960
|
// src/components/dashboard/v8/factLeg.ts
|
|
6907
6961
|
var isProp = (key) => key.toLowerCase().startsWith("prop_");
|
|
@@ -6932,7 +6986,7 @@ var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
|
6932
6986
|
function FactPrice({ reference, ui, slip, conversation, memory: memory3, stars, enabled, operatorUserId, anonymousUserId }) {
|
|
6933
6987
|
const { sport, marketKey, matchId } = reference;
|
|
6934
6988
|
const canAdd2 = !!slip.onAddToSlip;
|
|
6935
|
-
const ask = (0,
|
|
6989
|
+
const ask = (0, import_react40.useMemo)(() => enabled && canAdd2 && marketKey && matchId ? {
|
|
6936
6990
|
sport,
|
|
6937
6991
|
marketKey,
|
|
6938
6992
|
matchIds: [matchId],
|
|
@@ -6944,7 +6998,7 @@ function FactPrice({ reference, ui, slip, conversation, memory: memory3, stars,
|
|
|
6944
6998
|
...anonymousUserId ? { anonymousUserId } : {}
|
|
6945
6999
|
} : null, [enabled, canAdd2, sport, marketKey, matchId, operatorUserId, anonymousUserId]);
|
|
6946
7000
|
const { grid, answeredFor, confirmed, request } = useBuilderGrid({ conversation, locale: ui.hostTag, memory: memory3, initial: ask });
|
|
6947
|
-
(0,
|
|
7001
|
+
(0, import_react40.useEffect)(() => {
|
|
6948
7002
|
if (ask) void request(ask);
|
|
6949
7003
|
}, [request, ask]);
|
|
6950
7004
|
const settled = answeredFor === ask;
|
|
@@ -7013,7 +7067,7 @@ function FavouritesInvite({ ui, sport, onOpen }) {
|
|
|
7013
7067
|
}
|
|
7014
7068
|
|
|
7015
7069
|
// src/components/dashboard/v8/useFollow.ts
|
|
7016
|
-
var
|
|
7070
|
+
var import_react41 = require("react");
|
|
7017
7071
|
|
|
7018
7072
|
// src/favouriteKinds.ts
|
|
7019
7073
|
function favouriteKinds(sport) {
|
|
@@ -7032,7 +7086,7 @@ function favouriteKindLabel(ui, sport, kind) {
|
|
|
7032
7086
|
var isFavouriteKind = (kind) => kind === "team" || kind === "player" || kind === "competition";
|
|
7033
7087
|
var keyOf2 = (sport, t) => `${sport}:${t.kind}:${t.id}`;
|
|
7034
7088
|
function useFollow(controller, ui, holds, sport) {
|
|
7035
|
-
const [notice, setNotice] = (0,
|
|
7089
|
+
const [notice, setNotice] = (0, import_react41.useState)(null);
|
|
7036
7090
|
const isOpen = (t) => isFavouriteKind(t.kind) && !holds.followed.has(keyOf2(sport, t)) && !controller.isStarred(t.kind, t.id);
|
|
7037
7091
|
const follow = async (t) => {
|
|
7038
7092
|
if (!isFavouriteKind(t.kind)) return;
|
|
@@ -7199,15 +7253,20 @@ function GuessCard({ guess, ui, controller, holds, sport, conversation, operator
|
|
|
7199
7253
|
}
|
|
7200
7254
|
|
|
7201
7255
|
// src/components/dashboard/v8/IdleTeams.tsx
|
|
7256
|
+
var import_react42 = require("react");
|
|
7202
7257
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
7203
|
-
function IdleTeams({ teams, ui, onAct }) {
|
|
7258
|
+
function IdleTeams({ teams, ui, onAct, slotBase }) {
|
|
7259
|
+
const events = (0, import_react42.useContext)(GreetingEventsContext);
|
|
7204
7260
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_jsx_runtime22.Fragment, { children: teams.map((t, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "ss-w-v8-idle", children: [
|
|
7205
7261
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Pic, { src: t.imagePath }),
|
|
7206
7262
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "ss-w-v8-idle-text", children: [
|
|
7207
7263
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("b", { children: t.label }),
|
|
7208
7264
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: ui.v8NoGame })
|
|
7209
7265
|
] }),
|
|
7210
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("button", { type: "button", className: "ss-w-v8-idle-ask", "aria-label": `${ui.v8Ask}: ${t.label}`, onClick: () =>
|
|
7266
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("button", { type: "button", className: "ss-w-v8-idle-ask", "aria-label": `${ui.v8Ask}: ${t.label}`, onClick: () => {
|
|
7267
|
+
if (slotBase !== void 0) events?.cardTap(slotBase + i);
|
|
7268
|
+
onAct?.(toActionVM({ actionLabel: t.actionLabel, actionValue: t.actionValue }));
|
|
7269
|
+
}, children: [
|
|
7211
7270
|
ui.v8Ask,
|
|
7212
7271
|
" \u2192"
|
|
7213
7272
|
] })
|
|
@@ -7215,13 +7274,15 @@ function IdleTeams({ teams, ui, onAct }) {
|
|
|
7215
7274
|
}
|
|
7216
7275
|
|
|
7217
7276
|
// src/components/dashboard/v8/MatchCard.tsx
|
|
7277
|
+
var import_react43 = require("react");
|
|
7218
7278
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
7219
|
-
function MatchCard({ card, ui, slip, sport, marketKey, conversation, operatorUserId, anonymousUserId }) {
|
|
7279
|
+
function MatchCard({ card, ui, slip, sport, marketKey, conversation, operatorUserId, anonymousUserId, slot }) {
|
|
7280
|
+
const events = (0, import_react43.useContext)(GreetingEventsContext);
|
|
7220
7281
|
if (!teamCardHasContent(card)) return null;
|
|
7221
7282
|
const pair = !!(card.homeLabel && card.awayLabel);
|
|
7222
7283
|
const title = card.homeLabel && card.awayLabel ? `${card.homeLabel} - ${card.awayLabel}` : card.label;
|
|
7223
7284
|
const sub = [kickoffText(ui, card.startsAtUtc), card.competitionLabel].filter(Boolean).join(" \xB7 ");
|
|
7224
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("article", { className: "ss-w-v8-card ss-w-v8-team", children: [
|
|
7285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("article", { className: "ss-w-v8-card ss-w-v8-team", onClickCapture: slot === void 0 ? void 0 : () => events?.cardTap(slot), children: [
|
|
7225
7286
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("header", { className: "ss-w-v8-card-head", children: [
|
|
7226
7287
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("b", { className: "ss-w-v8-card-name", children: [
|
|
7227
7288
|
pair ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Pic, { src: card.homeTeamImagePath }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Pic, { src: card.imagePath }),
|
|
@@ -7393,6 +7454,7 @@ function PersonalGreeting({ personal, ui, slip, sport, starsElsewhere = false, o
|
|
|
7393
7454
|
teamCards.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
7394
7455
|
MatchCard,
|
|
7395
7456
|
{
|
|
7457
|
+
slot: i,
|
|
7396
7458
|
card: c,
|
|
7397
7459
|
ui,
|
|
7398
7460
|
slip,
|
|
@@ -7404,7 +7466,7 @@ function PersonalGreeting({ personal, ui, slip, sport, starsElsewhere = false, o
|
|
|
7404
7466
|
},
|
|
7405
7467
|
`t:${c.teamId}:${i}`
|
|
7406
7468
|
)),
|
|
7407
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IdleTeams, { teams: idleTeams, ui, onAct }),
|
|
7469
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IdleTeams, { teams: idleTeams, ui, onAct, slotBase: teamCards.length }),
|
|
7408
7470
|
playerCards.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h3", { className: "ss-w-v8-sec-title", children: ui.v8YourPlayers }) : null,
|
|
7409
7471
|
playerCards.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(PlayerCard, { card: c, ui }, `p:${c.playerId}:${i}`))
|
|
7410
7472
|
] }, "cards") : null;
|
|
@@ -7486,16 +7548,28 @@ function switchSets(dashboards) {
|
|
|
7486
7548
|
function initialSport(sets, defaultSport) {
|
|
7487
7549
|
return (sets?.some((s) => s.sport === defaultSport) ? defaultSport : sets?.[0]?.sport) ?? "";
|
|
7488
7550
|
}
|
|
7489
|
-
function GreetingDashboard({ dashboard, dashboards, defaultSport, onTap, onSportChange, ui, slip, onAct }) {
|
|
7551
|
+
function GreetingDashboard({ dashboard, dashboards, defaultSport, greeting, onTap, onSportChange, ui, slip, onAct }) {
|
|
7490
7552
|
const log = useEventLog();
|
|
7491
7553
|
const { oddsFormat } = useOddsSettings();
|
|
7492
7554
|
const scope = useSportScope();
|
|
7493
7555
|
const sets = switchSets(dashboards);
|
|
7494
|
-
const [selected, setSelected] = (0,
|
|
7556
|
+
const [selected, setSelected] = (0, import_react44.useState)(() => initialSport(sets, defaultSport));
|
|
7495
7557
|
const active = sets?.find((s) => s.sport === selected) ?? null;
|
|
7496
7558
|
const shown2 = active ? active.dashboard : dashboard;
|
|
7497
7559
|
const personal = shown2.personal;
|
|
7498
7560
|
const starsElsewhere = (sets ?? []).some((s) => (s.dashboard.personal?.ribbon?.stars.length ?? 0) > 0);
|
|
7561
|
+
const meta = active ? active.greeting ?? (greeting?.sport === active.sport ? greeting : void 0) : greeting;
|
|
7562
|
+
(0, import_react44.useEffect)(() => {
|
|
7563
|
+
if (log && meta) sendGreetingOnce((e) => log.log(e), log, meta, "panel");
|
|
7564
|
+
}, [log, meta]);
|
|
7565
|
+
const events = (0, import_react44.useMemo)(() => {
|
|
7566
|
+
if (!log || !meta) return null;
|
|
7567
|
+
const send = (name, slot) => {
|
|
7568
|
+
if (!Number.isInteger(slot) || slot < 0 || slot > 19) return;
|
|
7569
|
+
log.log({ name, greeting: { greetingId: meta.greetingId, case: meta.case, sport: meta.sport, market: meta.market ?? null, slot } });
|
|
7570
|
+
};
|
|
7571
|
+
return { cardTap: (slot) => send("greeting_card_tap", slot), askTap: (slot) => send("greeting_ask_tap", slot) };
|
|
7572
|
+
}, [log, meta]);
|
|
7499
7573
|
const select = (sport) => {
|
|
7500
7574
|
if (sport === selected) return;
|
|
7501
7575
|
setSelected(sport);
|
|
@@ -7505,7 +7579,7 @@ function GreetingDashboard({ dashboard, dashboards, defaultSport, onTap, onSport
|
|
|
7505
7579
|
};
|
|
7506
7580
|
const layout = layoutClass(shown2.layout);
|
|
7507
7581
|
const badgePlacement = layout === LAYOUT_CLASSES.goal ? "end" : "meta";
|
|
7508
|
-
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: `ss-w-dash ${layout}`, children: [
|
|
7582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GreetingEventsContext.Provider, { value: events, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: `ss-w-dash ${layout}`, children: [
|
|
7509
7583
|
sets ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SportSwitch, { sports: sets, selected, onSelect: select, liveLabel: ui.liveLabel, groupLabel: ui.sportGroupLabel, tag: ui.locale }) : null,
|
|
7510
7584
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "ss-w-dash-head", children: [
|
|
7511
7585
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "ss-w-dash-title", children: shown2.title }),
|
|
@@ -7522,37 +7596,37 @@ function GreetingDashboard({ dashboard, dashboards, defaultSport, onTap, onSport
|
|
|
7522
7596
|
`${t.title}-${i}`
|
|
7523
7597
|
)) }),
|
|
7524
7598
|
shown2.footerTip ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "ss-w-dash-foot", children: shown2.footerTip }) : null
|
|
7525
|
-
] });
|
|
7599
|
+
] }) });
|
|
7526
7600
|
}
|
|
7527
7601
|
|
|
7528
7602
|
// src/useScheduleSport.ts
|
|
7529
|
-
var
|
|
7603
|
+
var import_react45 = require("react");
|
|
7530
7604
|
function useScheduleSport(offered) {
|
|
7531
|
-
const [chosen, setChosen] = (0,
|
|
7605
|
+
const [chosen, setChosen] = (0, import_react45.useState)("all");
|
|
7532
7606
|
const sport = chosen === "all" || offered.includes(chosen) ? chosen : "all";
|
|
7533
|
-
(0,
|
|
7607
|
+
(0, import_react45.useEffect)(() => {
|
|
7534
7608
|
if (sport !== chosen) setChosen("all");
|
|
7535
7609
|
}, [sport, chosen]);
|
|
7536
|
-
const setSport = (0,
|
|
7610
|
+
const setSport = (0, import_react45.useCallback)((s) => setChosen(s), []);
|
|
7537
7611
|
return { sport, setSport, offered };
|
|
7538
7612
|
}
|
|
7539
7613
|
|
|
7540
7614
|
// src/useMatchesDay.ts
|
|
7541
|
-
var
|
|
7615
|
+
var import_react47 = require("react");
|
|
7542
7616
|
|
|
7543
7617
|
// src/useScheduleDay.ts
|
|
7544
|
-
var
|
|
7618
|
+
var import_react46 = require("react");
|
|
7545
7619
|
var EMPTY = [];
|
|
7546
7620
|
function useScheduleDay(opts) {
|
|
7547
7621
|
const { localDate, today, todayGroups, enabled, resetKey, timeZone } = opts;
|
|
7548
|
-
const getRef = (0,
|
|
7622
|
+
const getRef = (0, import_react46.useRef)(opts.getSchedule);
|
|
7549
7623
|
getRef.current = opts.getSchedule;
|
|
7550
|
-
const daysRef = (0,
|
|
7551
|
-
const [fetched, setFetched] = (0,
|
|
7552
|
-
const [retryKey, setRetryKey] = (0,
|
|
7553
|
-
const [seenDate, setSeenDate] = (0,
|
|
7554
|
-
const [seenReset, setSeenReset] = (0,
|
|
7555
|
-
const [seenZone, setSeenZone] = (0,
|
|
7624
|
+
const daysRef = (0, import_react46.useRef)(/* @__PURE__ */ new Map());
|
|
7625
|
+
const [fetched, setFetched] = (0, import_react46.useState)({ status: "idle", groups: EMPTY });
|
|
7626
|
+
const [retryKey, setRetryKey] = (0, import_react46.useState)(0);
|
|
7627
|
+
const [seenDate, setSeenDate] = (0, import_react46.useState)(localDate);
|
|
7628
|
+
const [seenReset, setSeenReset] = (0, import_react46.useState)(resetKey);
|
|
7629
|
+
const [seenZone, setSeenZone] = (0, import_react46.useState)(timeZone);
|
|
7556
7630
|
if (seenDate !== localDate) {
|
|
7557
7631
|
setSeenDate(localDate);
|
|
7558
7632
|
setFetched({ status: "idle", groups: EMPTY });
|
|
@@ -7564,7 +7638,7 @@ function useScheduleDay(opts) {
|
|
|
7564
7638
|
setFetched({ status: "idle", groups: EMPTY });
|
|
7565
7639
|
}
|
|
7566
7640
|
const isToday = localDate === today;
|
|
7567
|
-
(0,
|
|
7641
|
+
(0, import_react46.useEffect)(() => {
|
|
7568
7642
|
if (!enabled || isToday || daysRef.current.has(localDate)) return;
|
|
7569
7643
|
let cancelled = false;
|
|
7570
7644
|
setFetched({ status: "loading", groups: EMPTY });
|
|
@@ -7586,7 +7660,7 @@ function useScheduleDay(opts) {
|
|
|
7586
7660
|
cancelled = true;
|
|
7587
7661
|
};
|
|
7588
7662
|
}, [localDate, isToday, enabled, retryKey, resetKey, timeZone]);
|
|
7589
|
-
const retry = (0,
|
|
7663
|
+
const retry = (0, import_react46.useCallback)(() => {
|
|
7590
7664
|
setRetryKey((k) => k + 1);
|
|
7591
7665
|
}, []);
|
|
7592
7666
|
if (isToday) return { status: "ready", groups: todayGroups, retry };
|
|
@@ -7599,7 +7673,7 @@ function useScheduleDay(opts) {
|
|
|
7599
7673
|
// src/useMatchesDay.ts
|
|
7600
7674
|
function useMatchesDay({ discovery, day, sport, getSchedule, enabled, timeZone }) {
|
|
7601
7675
|
const { localDate: today, matchDays } = discovery;
|
|
7602
|
-
const chips = (0,
|
|
7676
|
+
const chips = (0, import_react47.useMemo)(() => buildDayChips(today, matchDays, sport), [today, matchDays, sport]);
|
|
7603
7677
|
const selected = chips.some((c) => c.date === day) ? day : today;
|
|
7604
7678
|
const loaded = useScheduleDay({
|
|
7605
7679
|
localDate: selected,
|
|
@@ -7613,8 +7687,8 @@ function useMatchesDay({ discovery, day, sport, getSchedule, enabled, timeZone }
|
|
|
7613
7687
|
return { ...loaded, chips, selected };
|
|
7614
7688
|
}
|
|
7615
7689
|
function useMatchesDayPick(today) {
|
|
7616
|
-
const [pick, setPick] = (0,
|
|
7617
|
-
const setDay = (0,
|
|
7690
|
+
const [pick, setPick] = (0, import_react47.useState)(null);
|
|
7691
|
+
const setDay = (0, import_react47.useCallback)((d) => setPick({ day: d, madeOn: today }), [today]);
|
|
7618
7692
|
return [pick !== null && pick.madeOn === today ? pick.day : today, setDay];
|
|
7619
7693
|
}
|
|
7620
7694
|
|
|
@@ -7701,15 +7775,19 @@ var WIRE_TO_PUBLIC = {
|
|
|
7701
7775
|
match_view: null,
|
|
7702
7776
|
popup_opened: null,
|
|
7703
7777
|
fact_view: null,
|
|
7704
|
-
fact_ask: null
|
|
7778
|
+
fact_ask: null,
|
|
7779
|
+
greeting_shown: null,
|
|
7780
|
+
greeting_cta_click: null,
|
|
7781
|
+
greeting_card_tap: null,
|
|
7782
|
+
greeting_ask_tap: null
|
|
7705
7783
|
};
|
|
7706
7784
|
|
|
7707
7785
|
// src/popupTelemetry.ts
|
|
7708
|
-
var
|
|
7786
|
+
var import_react48 = require("react");
|
|
7709
7787
|
function usePopupTelemetry(log, isOpen, popupText, dismissPopup, confirmedShown) {
|
|
7710
|
-
const shownRef = (0,
|
|
7711
|
-
const closedTextRef = (0,
|
|
7712
|
-
(0,
|
|
7788
|
+
const shownRef = (0, import_react48.useRef)(/* @__PURE__ */ new Set());
|
|
7789
|
+
const closedTextRef = (0, import_react48.useRef)(null);
|
|
7790
|
+
(0, import_react48.useEffect)(() => {
|
|
7713
7791
|
if (isOpen) {
|
|
7714
7792
|
if (closedTextRef.current) log?.log({ name: "popup_opened" });
|
|
7715
7793
|
closedTextRef.current = null;
|
|
@@ -7722,26 +7800,26 @@ function usePopupTelemetry(log, isOpen, popupText, dismissPopup, confirmedShown)
|
|
|
7722
7800
|
log?.log({ name: "popup_shown" });
|
|
7723
7801
|
}
|
|
7724
7802
|
}, [log, isOpen, popupText, confirmedShown]);
|
|
7725
|
-
return (0,
|
|
7803
|
+
return (0, import_react48.useCallback)(() => {
|
|
7726
7804
|
log?.log({ name: "popup_dismissed" });
|
|
7727
7805
|
dismissPopup();
|
|
7728
7806
|
}, [log, dismissPopup]);
|
|
7729
7807
|
}
|
|
7730
7808
|
|
|
7731
7809
|
// src/mobileBinding.ts
|
|
7732
|
-
var
|
|
7810
|
+
var import_react49 = require("react");
|
|
7733
7811
|
var CLEARED = { text: null, asks: [] };
|
|
7734
7812
|
function useMobileBinding(args) {
|
|
7735
7813
|
const { binding, panelOpen, popupText, asks } = args;
|
|
7736
|
-
const latest = (0,
|
|
7814
|
+
const latest = (0, import_react49.useRef)(args);
|
|
7737
7815
|
latest.current = args;
|
|
7738
|
-
const bindingRef = (0,
|
|
7816
|
+
const bindingRef = (0, import_react49.useRef)(binding);
|
|
7739
7817
|
bindingRef.current = binding;
|
|
7740
|
-
const backRef = (0,
|
|
7741
|
-
const [confirmedShown, setConfirmedShown] = (0,
|
|
7818
|
+
const backRef = (0, import_react49.useRef)(null);
|
|
7819
|
+
const [confirmedShown, setConfirmedShown] = (0, import_react49.useState)(null);
|
|
7742
7820
|
const teaserKey = panelOpen || !popupText ? "" : JSON.stringify([popupText, asks.map((a) => a.label)]);
|
|
7743
|
-
const reported = (0,
|
|
7744
|
-
(0,
|
|
7821
|
+
const reported = (0, import_react49.useRef)({ binding: void 0, key: "" });
|
|
7822
|
+
(0, import_react49.useEffect)(() => {
|
|
7745
7823
|
if (!binding) return;
|
|
7746
7824
|
const prev = reported.current;
|
|
7747
7825
|
if (prev.binding === binding && prev.key === teaserKey) return;
|
|
@@ -7749,7 +7827,7 @@ function useMobileBinding(args) {
|
|
|
7749
7827
|
if (teaserKey === "" && prev.binding !== binding) return;
|
|
7750
7828
|
binding.onTeaser(teaserKey === "" ? CLEARED : { text: popupText, asks: asks.map((a, index) => ({ index, label: a.label })) });
|
|
7751
7829
|
}, [binding, teaserKey]);
|
|
7752
|
-
(0,
|
|
7830
|
+
(0, import_react49.useEffect)(() => {
|
|
7753
7831
|
if (!binding) return;
|
|
7754
7832
|
binding.onHandle({
|
|
7755
7833
|
open: () => latest.current.open(),
|
|
@@ -7766,8 +7844,8 @@ function useMobileBinding(args) {
|
|
|
7766
7844
|
});
|
|
7767
7845
|
return () => binding.onHandle(null);
|
|
7768
7846
|
}, [binding]);
|
|
7769
|
-
const onCloseRequested = (0,
|
|
7770
|
-
const onRegisterBack = (0,
|
|
7847
|
+
const onCloseRequested = (0, import_react49.useCallback)(() => bindingRef.current?.onCloseRequested(), []);
|
|
7848
|
+
const onRegisterBack = (0, import_react49.useCallback)((fn) => {
|
|
7771
7849
|
backRef.current = fn;
|
|
7772
7850
|
}, []);
|
|
7773
7851
|
if (!binding) return { confirmedShown: void 0, onCloseRequested: void 0, onRegisterBack: void 0 };
|
|
@@ -7775,10 +7853,10 @@ function useMobileBinding(args) {
|
|
|
7775
7853
|
}
|
|
7776
7854
|
|
|
7777
7855
|
// src/openTelemetry.ts
|
|
7778
|
-
var
|
|
7856
|
+
var import_react50 = require("react");
|
|
7779
7857
|
function useOpenTelemetry(log, isOpen) {
|
|
7780
|
-
const openLoggedRef = (0,
|
|
7781
|
-
(0,
|
|
7858
|
+
const openLoggedRef = (0, import_react50.useRef)(false);
|
|
7859
|
+
(0, import_react50.useEffect)(() => {
|
|
7782
7860
|
if (!isOpen) {
|
|
7783
7861
|
openLoggedRef.current = false;
|
|
7784
7862
|
return;
|
|
@@ -7790,13 +7868,13 @@ function useOpenTelemetry(log, isOpen) {
|
|
|
7790
7868
|
}
|
|
7791
7869
|
|
|
7792
7870
|
// src/components/ChatFab.tsx
|
|
7793
|
-
var
|
|
7871
|
+
var import_react52 = require("react");
|
|
7794
7872
|
|
|
7795
7873
|
// src/components/BrandMark.tsx
|
|
7796
|
-
var
|
|
7874
|
+
var import_react51 = require("react");
|
|
7797
7875
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
7798
7876
|
function BrandMark({ logoUrl, className }) {
|
|
7799
|
-
const [failed, setFailed] = (0,
|
|
7877
|
+
const [failed, setFailed] = (0, import_react51.useState)(false);
|
|
7800
7878
|
if (!logoUrl || failed) return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SsMark, { className });
|
|
7801
7879
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("img", { className, src: logoUrl, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
7802
7880
|
}
|
|
@@ -7830,13 +7908,13 @@ function GreetingBubble({ text: text2, onOpen, onDismiss, dismissLabel, asks })
|
|
|
7830
7908
|
|
|
7831
7909
|
// src/components/ChatFab.tsx
|
|
7832
7910
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
7833
|
-
function ChatFab({ label, busy = false, greeting, popupText, logoUrl, onOpen, onDismissPopup, dismissLabel, introAllowed = false, onIntroStart, asks }) {
|
|
7911
|
+
function ChatFab({ label, busy = false, greeting, popupText, logoUrl, onOpen, onDismissPopup, dismissLabel, introAllowed = false, onIntroStart, asks, onBubbleClick }) {
|
|
7834
7912
|
const bubble = popupText ?? greeting;
|
|
7835
7913
|
const hidden = busy && !label;
|
|
7836
7914
|
const track = useTrack();
|
|
7837
|
-
const [intro, setIntro] = (0,
|
|
7838
|
-
const armedRef = (0,
|
|
7839
|
-
(0,
|
|
7915
|
+
const [intro, setIntro] = (0, import_react52.useState)(false);
|
|
7916
|
+
const armedRef = (0, import_react52.useRef)(introAllowed);
|
|
7917
|
+
(0, import_react52.useEffect)(() => {
|
|
7840
7918
|
if (armedRef.current && bubble) {
|
|
7841
7919
|
armedRef.current = false;
|
|
7842
7920
|
setIntro(true);
|
|
@@ -7846,6 +7924,7 @@ function ChatFab({ label, busy = false, greeting, popupText, logoUrl, onOpen, on
|
|
|
7846
7924
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: intro ? "ss-w-fab-wrap ss-w-intro" : "ss-w-fab-wrap", children: [
|
|
7847
7925
|
bubble ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(GreetingBubble, { text: bubble, onOpen: () => {
|
|
7848
7926
|
track({ name: "bubble_click" });
|
|
7927
|
+
if (popupText) onBubbleClick?.();
|
|
7849
7928
|
onOpen();
|
|
7850
7929
|
}, onDismiss: popupText ? onDismissPopup : void 0, dismissLabel, asks: popupText ? asks : void 0 }) : null,
|
|
7851
7930
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("button", { type: "button", className: "ss-w-fab", "aria-label": label, "aria-busy": busy || void 0, "aria-hidden": hidden || void 0, tabIndex: hidden ? -1 : void 0, onClick: () => {
|
|
@@ -7856,10 +7935,10 @@ function ChatFab({ label, busy = false, greeting, popupText, logoUrl, onOpen, on
|
|
|
7856
7935
|
}
|
|
7857
7936
|
|
|
7858
7937
|
// src/components/ChatPanel.tsx
|
|
7859
|
-
var
|
|
7938
|
+
var import_react111 = require("react");
|
|
7860
7939
|
|
|
7861
7940
|
// src/components/ChatHeader.tsx
|
|
7862
|
-
var
|
|
7941
|
+
var import_react53 = require("react");
|
|
7863
7942
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
7864
7943
|
function ChatHeader({
|
|
7865
7944
|
onClose,
|
|
@@ -7875,18 +7954,18 @@ function ChatHeader({
|
|
|
7875
7954
|
onOpenFavourites,
|
|
7876
7955
|
favouritesLabel
|
|
7877
7956
|
}) {
|
|
7878
|
-
const [menuOpen, setMenuOpen] = (0,
|
|
7879
|
-
const wrapRef = (0,
|
|
7880
|
-
const kebabRef = (0,
|
|
7881
|
-
const firstItemRef = (0,
|
|
7957
|
+
const [menuOpen, setMenuOpen] = (0, import_react53.useState)(false);
|
|
7958
|
+
const wrapRef = (0, import_react53.useRef)(null);
|
|
7959
|
+
const kebabRef = (0, import_react53.useRef)(null);
|
|
7960
|
+
const firstItemRef = (0, import_react53.useRef)(null);
|
|
7882
7961
|
const hasNew = !!(canReset && onNewConversation);
|
|
7883
7962
|
const hasSettings = !!onOpenSettings;
|
|
7884
7963
|
const hasFavourites = !!onOpenFavourites;
|
|
7885
7964
|
const hasMenu = hasFavourites || hasNew || hasSettings;
|
|
7886
|
-
(0,
|
|
7965
|
+
(0, import_react53.useEffect)(() => {
|
|
7887
7966
|
if (menuOpen) firstItemRef.current?.focus();
|
|
7888
7967
|
}, [menuOpen]);
|
|
7889
|
-
(0,
|
|
7968
|
+
(0, import_react53.useEffect)(() => {
|
|
7890
7969
|
if (!menuOpen) return;
|
|
7891
7970
|
const onPointer = (e) => {
|
|
7892
7971
|
if (!(wrapRef.current && e.composedPath().includes(wrapRef.current))) setMenuOpen(false);
|
|
@@ -7974,10 +8053,10 @@ function ChatHeader({
|
|
|
7974
8053
|
}
|
|
7975
8054
|
|
|
7976
8055
|
// src/components/MessageList.tsx
|
|
7977
|
-
var
|
|
8056
|
+
var import_react67 = require("react");
|
|
7978
8057
|
|
|
7979
8058
|
// src/components/ChatMessage.tsx
|
|
7980
|
-
var
|
|
8059
|
+
var import_react66 = require("react");
|
|
7981
8060
|
|
|
7982
8061
|
// src/components/Markdown.tsx
|
|
7983
8062
|
var import_react_markdown = __toESM(require("react-markdown"), 1);
|
|
@@ -7995,7 +8074,7 @@ function Markdown({ text: text2 }) {
|
|
|
7995
8074
|
}
|
|
7996
8075
|
|
|
7997
8076
|
// src/components/EntityCardList.tsx
|
|
7998
|
-
var
|
|
8077
|
+
var import_react54 = require("react");
|
|
7999
8078
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
8000
8079
|
var MAX_VISIBLE = 3;
|
|
8001
8080
|
var RECORD_RE = /^(\d+)-(\d+)-(\d+)$/;
|
|
@@ -8098,7 +8177,7 @@ function ScopeTabs({ scopes, active, onSelect }) {
|
|
|
8098
8177
|
)) });
|
|
8099
8178
|
}
|
|
8100
8179
|
function EntityCardItem({ c }) {
|
|
8101
|
-
const [active, setActive] = (0,
|
|
8180
|
+
const [active, setActive] = (0, import_react54.useState)(0);
|
|
8102
8181
|
const hasBody = c.scopes.length > 0;
|
|
8103
8182
|
if (!hasBody) {
|
|
8104
8183
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "ss-w-ecard ss-w-ecard-bare", "data-kind": c.kind, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CardHeader, { c, showScopeCrest: false }) });
|
|
@@ -8113,7 +8192,7 @@ function EntityCardItem({ c }) {
|
|
|
8113
8192
|
] });
|
|
8114
8193
|
}
|
|
8115
8194
|
function EntityCardList({ cards, disabled, showLessLabel, showMoreLabel }) {
|
|
8116
|
-
const [expanded, setExpanded] = (0,
|
|
8195
|
+
const [expanded, setExpanded] = (0, import_react54.useState)(false);
|
|
8117
8196
|
if (cards.length === 0) return null;
|
|
8118
8197
|
const visible = expanded ? cards : cards.slice(0, MAX_VISIBLE);
|
|
8119
8198
|
const overflow = cards.length - MAX_VISIBLE;
|
|
@@ -8214,17 +8293,17 @@ function BettingInsightList({ insights, ui, slip, monitor }) {
|
|
|
8214
8293
|
}
|
|
8215
8294
|
|
|
8216
8295
|
// src/components/AddAllToSlipButton.tsx
|
|
8217
|
-
var
|
|
8296
|
+
var import_react55 = require("react");
|
|
8218
8297
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
8219
8298
|
function AddAllToSlipButton({ legs, slip, ui, labels, combo, chatCombo, sizeless, hold, onStartedGame }) {
|
|
8220
8299
|
const add = useSlipAdd(slip, ui);
|
|
8221
8300
|
const slipState = useSlipState();
|
|
8222
8301
|
const log = useEventLog();
|
|
8223
8302
|
const track = useTrack();
|
|
8224
|
-
const [pending, setPending] = (0,
|
|
8225
|
-
const [settledLocal, setSettledLocal] = (0,
|
|
8226
|
-
const [toast, setToast] = (0,
|
|
8227
|
-
const dismiss = (0,
|
|
8303
|
+
const [pending, setPending] = (0, import_react55.useState)(false);
|
|
8304
|
+
const [settledLocal, setSettledLocal] = (0, import_react55.useState)({});
|
|
8305
|
+
const [toast, setToast] = (0, import_react55.useState)(null);
|
|
8306
|
+
const dismiss = (0, import_react55.useCallback)(() => setToast(null), []);
|
|
8228
8307
|
if (!slip.onAddToSlip || legs.length < 2) return null;
|
|
8229
8308
|
const settled = slipState ? slipState.settled : settledLocal;
|
|
8230
8309
|
const open = legs.filter((leg) => !settled[slipKey(leg)]);
|
|
@@ -8297,10 +8376,10 @@ function AddAllToSlipButton({ legs, slip, ui, labels, combo, chatCombo, sizeless
|
|
|
8297
8376
|
}
|
|
8298
8377
|
|
|
8299
8378
|
// src/presetToolsContext.ts
|
|
8300
|
-
var
|
|
8301
|
-
var PresetToolsContext = (0,
|
|
8379
|
+
var import_react56 = require("react");
|
|
8380
|
+
var PresetToolsContext = (0, import_react56.createContext)(null);
|
|
8302
8381
|
function usePresetTools() {
|
|
8303
|
-
return (0,
|
|
8382
|
+
return (0, import_react56.useContext)(PresetToolsContext);
|
|
8304
8383
|
}
|
|
8305
8384
|
|
|
8306
8385
|
// src/components/ComboCardList.tsx
|
|
@@ -8926,7 +9005,7 @@ function NbaInsightList({ insights, ui, slip, monitor }) {
|
|
|
8926
9005
|
}
|
|
8927
9006
|
|
|
8928
9007
|
// src/components/NflInsightList.tsx
|
|
8929
|
-
var
|
|
9008
|
+
var import_react57 = require("react");
|
|
8930
9009
|
|
|
8931
9010
|
// src/strings/types.ts
|
|
8932
9011
|
var fillNfl = (template, values) => template.replace(/\{(\w+)\}/g, (whole, key) => key in values ? String(values[key]) : whole);
|
|
@@ -8937,7 +9016,7 @@ var oneDecimal2 = (n, ui) => formatNumber(n, ui.locale, { minimumFractionDigits:
|
|
|
8937
9016
|
var cap = (text2, ui) => text2 ? upperCase(text2.charAt(0), ui.locale) + text2.slice(1) : text2;
|
|
8938
9017
|
var lineNumber = (line) => Number(line.replace("\u2212", "-").replace(",", "."));
|
|
8939
9018
|
function Badge({ abbr, url }) {
|
|
8940
|
-
const [failed, setFailed] = (0,
|
|
9019
|
+
const [failed, setFailed] = (0, import_react57.useState)(false);
|
|
8941
9020
|
if (url && !failed) {
|
|
8942
9021
|
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("img", { className: "ss-w-nfl-badge ss-w-nfl-badge--img", src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
8943
9022
|
}
|
|
@@ -9548,7 +9627,7 @@ function TennisInsightList({ insights, ui }) {
|
|
|
9548
9627
|
}
|
|
9549
9628
|
|
|
9550
9629
|
// src/components/CompactOddsList.tsx
|
|
9551
|
-
var
|
|
9630
|
+
var import_react58 = require("react");
|
|
9552
9631
|
var import_widget_sdk23 = require("@sensiblestats/widget-sdk");
|
|
9553
9632
|
|
|
9554
9633
|
// src/compactList.ts
|
|
@@ -9670,11 +9749,11 @@ function Row({ row, columns, ui, slip, monitor, rowRef }) {
|
|
|
9670
9749
|
] });
|
|
9671
9750
|
}
|
|
9672
9751
|
function CompactOddsList({ list, ui, slip, monitor }) {
|
|
9673
|
-
const [shown2, setShown] = (0,
|
|
9752
|
+
const [shown2, setShown] = (0, import_react58.useState)(COMPACT_PAGE);
|
|
9674
9753
|
const hidden = list.rowCount - shown2;
|
|
9675
|
-
const [focusIndex, setFocusIndex] = (0,
|
|
9676
|
-
const focusRef = (0,
|
|
9677
|
-
(0,
|
|
9754
|
+
const [focusIndex, setFocusIndex] = (0, import_react58.useState)(null);
|
|
9755
|
+
const focusRef = (0, import_react58.useRef)(null);
|
|
9756
|
+
(0, import_react58.useEffect)(() => {
|
|
9678
9757
|
if (focusIndex !== null) focusRef.current?.focus();
|
|
9679
9758
|
}, [focusIndex]);
|
|
9680
9759
|
let left = shown2;
|
|
@@ -9909,7 +9988,7 @@ function FixtureCard({ card, ui }) {
|
|
|
9909
9988
|
}
|
|
9910
9989
|
|
|
9911
9990
|
// src/components/dashboard/CountdownCard.tsx
|
|
9912
|
-
var
|
|
9991
|
+
var import_react59 = require("react");
|
|
9913
9992
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
9914
9993
|
var DAY_MS3 = 864e5;
|
|
9915
9994
|
function remainingSegments(kickoffUnix, nowMs, withSeconds) {
|
|
@@ -9928,12 +10007,12 @@ function remainingSegments(kickoffUnix, nowMs, withSeconds) {
|
|
|
9928
10007
|
function CountdownCard({ card, ui }) {
|
|
9929
10008
|
const { data } = card;
|
|
9930
10009
|
const unitLabel = { d: data.daysUnit, h: data.hoursUnit, m: data.minutesUnit, s: data.secondsUnit };
|
|
9931
|
-
const [nowMs, setNowMs] = (0,
|
|
9932
|
-
const [reduced] = (0,
|
|
10010
|
+
const [nowMs, setNowMs] = (0, import_react59.useState)(() => Date.now());
|
|
10011
|
+
const [reduced] = (0, import_react59.useState)(
|
|
9933
10012
|
() => typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches
|
|
9934
10013
|
);
|
|
9935
10014
|
const withinDay = data.kickoffUnix * 1e3 - nowMs < DAY_MS3;
|
|
9936
|
-
(0,
|
|
10015
|
+
(0, import_react59.useEffect)(() => {
|
|
9937
10016
|
if (reduced) return;
|
|
9938
10017
|
const id = window.setInterval(() => setNowMs(Date.now()), withinDay ? 1e3 : 6e4);
|
|
9939
10018
|
return () => window.clearInterval(id);
|
|
@@ -9941,7 +10020,7 @@ function CountdownCard({ card, ui }) {
|
|
|
9941
10020
|
const segments = remainingSegments(data.kickoffUnix, nowMs, withinDay && !reduced);
|
|
9942
10021
|
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "ss-w-fandash-card ss-w-fandash-countdown", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "ss-w-fandash-countdown-top", children: [
|
|
9943
10022
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "ss-w-fandash-eyebrow", children: card.title ?? ui.countdownTitle }),
|
|
9944
|
-
segments ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "ss-w-fandash-countdown-clock", children: segments.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
10023
|
+
segments ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "ss-w-fandash-countdown-clock", children: segments.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react59.Fragment, { children: [
|
|
9945
10024
|
i > 0 ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "ss-w-fandash-countdown-colon", children: ":" }) : null,
|
|
9946
10025
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: "ss-w-fandash-countdown-seg", children: [
|
|
9947
10026
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "ss-w-fandash-countdown-value", children: s.value }),
|
|
@@ -9952,7 +10031,7 @@ function CountdownCard({ card, ui }) {
|
|
|
9952
10031
|
}
|
|
9953
10032
|
|
|
9954
10033
|
// src/components/dashboard/InjuriesCard.tsx
|
|
9955
|
-
var
|
|
10034
|
+
var import_react60 = require("react");
|
|
9956
10035
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
9957
10036
|
var SHOWN = 3;
|
|
9958
10037
|
function ColHead({ name, crestUrl }) {
|
|
@@ -9975,7 +10054,7 @@ function InjuryList({ rows, emptyLabel, limit }) {
|
|
|
9975
10054
|
}
|
|
9976
10055
|
function InjuriesCard({ card, ui }) {
|
|
9977
10056
|
const { data } = card;
|
|
9978
|
-
const [expanded, setExpanded] = (0,
|
|
10057
|
+
const [expanded, setExpanded] = (0, import_react60.useState)(false);
|
|
9979
10058
|
const hidden = Math.max(0, data.ours.length - SHOWN) + Math.max(0, data.theirs.length - SHOWN);
|
|
9980
10059
|
const limit = expanded ? void 0 : SHOWN;
|
|
9981
10060
|
const { showMore, showLess } = ui;
|
|
@@ -10080,7 +10159,7 @@ function LinksCard({ card }) {
|
|
|
10080
10159
|
}
|
|
10081
10160
|
|
|
10082
10161
|
// src/components/dashboard/PostMatchResultCard.tsx
|
|
10083
|
-
var
|
|
10162
|
+
var import_react61 = require("react");
|
|
10084
10163
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
10085
10164
|
function initials3(name) {
|
|
10086
10165
|
return name.trim().slice(0, 3).toUpperCase();
|
|
@@ -10090,7 +10169,7 @@ function PostMatchCrest({
|
|
|
10090
10169
|
name,
|
|
10091
10170
|
side
|
|
10092
10171
|
}) {
|
|
10093
|
-
const [failed, setFailed] = (0,
|
|
10172
|
+
const [failed, setFailed] = (0, import_react61.useState)(false);
|
|
10094
10173
|
const cls = `ss-w-fandash-postmatch-crest ss-w-fandash-postmatch-crest--${side}`;
|
|
10095
10174
|
if (url && !failed) {
|
|
10096
10175
|
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("img", { className: cls, src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
@@ -10289,10 +10368,10 @@ function RestingFormCard({ card }) {
|
|
|
10289
10368
|
}
|
|
10290
10369
|
|
|
10291
10370
|
// src/components/dashboard/LiveScoreCard.tsx
|
|
10292
|
-
var
|
|
10371
|
+
var import_react63 = require("react");
|
|
10293
10372
|
|
|
10294
10373
|
// src/useLiveClock.ts
|
|
10295
|
-
var
|
|
10374
|
+
var import_react62 = require("react");
|
|
10296
10375
|
var TICK_MS = 6e4;
|
|
10297
10376
|
var MAX_LIVE_TICK_MINUTES = 15;
|
|
10298
10377
|
function computeDisplayMinute(minute, clockRunning, receivedAtMs) {
|
|
@@ -10301,10 +10380,10 @@ function computeDisplayMinute(minute, clockRunning, receivedAtMs) {
|
|
|
10301
10380
|
return minute + Math.min(Math.max(0, elapsedMinutes), MAX_LIVE_TICK_MINUTES);
|
|
10302
10381
|
}
|
|
10303
10382
|
function useLiveClock(minute, clockRunning, receivedAtMs) {
|
|
10304
|
-
const [displayMinute, setDisplayMinute] = (0,
|
|
10383
|
+
const [displayMinute, setDisplayMinute] = (0, import_react62.useState)(
|
|
10305
10384
|
() => computeDisplayMinute(minute, clockRunning, receivedAtMs)
|
|
10306
10385
|
);
|
|
10307
|
-
(0,
|
|
10386
|
+
(0, import_react62.useEffect)(() => {
|
|
10308
10387
|
setDisplayMinute(computeDisplayMinute(minute, clockRunning, receivedAtMs));
|
|
10309
10388
|
if (!clockRunning) return;
|
|
10310
10389
|
const id = window.setInterval(() => {
|
|
@@ -10321,7 +10400,7 @@ function initials5(name) {
|
|
|
10321
10400
|
return name.trim().slice(0, 3).toUpperCase();
|
|
10322
10401
|
}
|
|
10323
10402
|
function LiveCrest({ url, name, side }) {
|
|
10324
|
-
const [failed, setFailed] = (0,
|
|
10403
|
+
const [failed, setFailed] = (0, import_react63.useState)(false);
|
|
10325
10404
|
const cls = `ss-w-fandash-live-crest ss-w-fandash-live-crest--${side}`;
|
|
10326
10405
|
if (url && !failed) {
|
|
10327
10406
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("img", { className: cls, src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
@@ -10343,7 +10422,7 @@ function LiveScoreCard({
|
|
|
10343
10422
|
}) {
|
|
10344
10423
|
const { data } = card;
|
|
10345
10424
|
const seedKey = `${data.minute}:${data.homeScore}:${data.awayScore}`;
|
|
10346
|
-
const seedRef = (0,
|
|
10425
|
+
const seedRef = (0, import_react63.useRef)(null);
|
|
10347
10426
|
if (!seedRef.current || seedRef.current.key !== seedKey) {
|
|
10348
10427
|
seedRef.current = { key: seedKey, receivedAtMs: Date.now() };
|
|
10349
10428
|
}
|
|
@@ -10389,7 +10468,7 @@ function LiveScoreCard({
|
|
|
10389
10468
|
}
|
|
10390
10469
|
|
|
10391
10470
|
// src/components/dashboard/LiveTimelineCard.tsx
|
|
10392
|
-
var
|
|
10471
|
+
var import_react64 = require("react");
|
|
10393
10472
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
10394
10473
|
var SHOWN2 = 3;
|
|
10395
10474
|
function EventIcon({ type }) {
|
|
@@ -10431,7 +10510,7 @@ function EventRow({ e }) {
|
|
|
10431
10510
|
] });
|
|
10432
10511
|
}
|
|
10433
10512
|
function LiveTimelineCard({ card, ui }) {
|
|
10434
|
-
const [expanded, setExpanded] = (0,
|
|
10513
|
+
const [expanded, setExpanded] = (0, import_react64.useState)(false);
|
|
10435
10514
|
const events = card.data.events;
|
|
10436
10515
|
if (!events || events.length === 0) return null;
|
|
10437
10516
|
const sorted = [...events].sort((a, b) => b.minute - a.minute);
|
|
@@ -10455,7 +10534,7 @@ function LiveTimelineCard({ card, ui }) {
|
|
|
10455
10534
|
}
|
|
10456
10535
|
|
|
10457
10536
|
// src/components/dashboard/MomentumWave.tsx
|
|
10458
|
-
var
|
|
10537
|
+
var import_react65 = require("react");
|
|
10459
10538
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
10460
10539
|
var WIDTH = 270;
|
|
10461
10540
|
var HEIGHT = 56;
|
|
@@ -10480,7 +10559,7 @@ function MomentumWave({
|
|
|
10480
10559
|
}) {
|
|
10481
10560
|
if (points.length === 0) return null;
|
|
10482
10561
|
const { area, line, lastLeftPct, lastTopPx } = buildPaths(points);
|
|
10483
|
-
const clipId = (0,
|
|
10562
|
+
const clipId = (0, import_react65.useId)();
|
|
10484
10563
|
const topClipId = `${clipId}-top`;
|
|
10485
10564
|
const bottomClipId = `${clipId}-bottom`;
|
|
10486
10565
|
const topClass = clubIsHome ? "ss-w-fandash-live-mom-home" : "ss-w-fandash-live-mom-away";
|
|
@@ -10630,7 +10709,7 @@ function FanDashboardCard({ card, onTap, ui, goalEvents }) {
|
|
|
10630
10709
|
// src/components/ChatMessage.tsx
|
|
10631
10710
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
10632
10711
|
function ChatMessage({ message, disabled, onAct, onTap, ui, slip, monitor, onGreetingSport }) {
|
|
10633
|
-
const [sport, setSport] = (0,
|
|
10712
|
+
const [sport, setSport] = (0, import_react66.useState)(null);
|
|
10634
10713
|
if (message.role === "user") {
|
|
10635
10714
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "ss-w-msg ss-w-user", "data-msg-id": message.id, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "ss-w-bubble", children: message.text }) });
|
|
10636
10715
|
}
|
|
@@ -10643,7 +10722,7 @@ function ChatMessage({ message, disabled, onAct, onTap, ui, slip, monitor, onGre
|
|
|
10643
10722
|
const actions = setChips ? setChips.map((c) => toActionVM({ ...c })) : message.actions;
|
|
10644
10723
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "ss-w-msg ss-w-bot", "data-msg-id": message.id, children: [
|
|
10645
10724
|
message.text && !message.greetingDashboard && !message.clubFanDashboard ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Markdown, { text: message.text }) : null,
|
|
10646
|
-
message.greetingDashboard && !message.clubFanDashboard ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(GreetingDashboard, { dashboard: message.greetingDashboard, dashboards: message.greetingDashboards, defaultSport: message.defaultSport, onTap, onSportChange: (s) => {
|
|
10725
|
+
message.greetingDashboard && !message.clubFanDashboard ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(GreetingDashboard, { dashboard: message.greetingDashboard, dashboards: message.greetingDashboards, defaultSport: message.defaultSport, greeting: message.greeting, onTap, onSportChange: (s) => {
|
|
10647
10726
|
setSport(s);
|
|
10648
10727
|
onGreetingSport?.(s);
|
|
10649
10728
|
}, ui, slip, onAct }) : null,
|
|
@@ -10684,11 +10763,11 @@ function turnAnchor(messages) {
|
|
|
10684
10763
|
function MessageList({ controller, ui, slip, onDashboardTap, monitor, onGreetingSport }) {
|
|
10685
10764
|
const { state, send } = controller;
|
|
10686
10765
|
const { oddsFormat } = useOddsSettings();
|
|
10687
|
-
const listRef = (0,
|
|
10688
|
-
const endRef = (0,
|
|
10689
|
-
const pinnedRef = (0,
|
|
10690
|
-
const anchoredTurnRef = (0,
|
|
10691
|
-
(0,
|
|
10766
|
+
const listRef = (0, import_react67.useRef)(null);
|
|
10767
|
+
const endRef = (0, import_react67.useRef)(null);
|
|
10768
|
+
const pinnedRef = (0, import_react67.useRef)(true);
|
|
10769
|
+
const anchoredTurnRef = (0, import_react67.useRef)(null);
|
|
10770
|
+
(0, import_react67.useEffect)(() => {
|
|
10692
10771
|
const anchor = turnAnchor(state.messages);
|
|
10693
10772
|
const list = listRef.current;
|
|
10694
10773
|
if (anchor && anchor.turnId !== anchoredTurnRef.current) {
|
|
@@ -10747,13 +10826,13 @@ function MessageList({ controller, ui, slip, onDashboardTap, monitor, onGreeting
|
|
|
10747
10826
|
}
|
|
10748
10827
|
|
|
10749
10828
|
// src/components/ChatInput.tsx
|
|
10750
|
-
var
|
|
10829
|
+
var import_react68 = require("react");
|
|
10751
10830
|
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
10752
|
-
var ChatInput = (0,
|
|
10753
|
-
const [value, setValue] = (0,
|
|
10754
|
-
const textareaRef = (0,
|
|
10755
|
-
const stopRef = (0,
|
|
10756
|
-
const textBoxWantsFocusRef = (0,
|
|
10831
|
+
var ChatInput = (0, import_react68.forwardRef)(function ChatInput2({ placeholder, streaming, onSend, onStop, stopLabel, sendLabel, disabled = false }, ref) {
|
|
10832
|
+
const [value, setValue] = (0, import_react68.useState)("");
|
|
10833
|
+
const textareaRef = (0, import_react68.useRef)(null);
|
|
10834
|
+
const stopRef = (0, import_react68.useRef)(null);
|
|
10835
|
+
const textBoxWantsFocusRef = (0, import_react68.useRef)(false);
|
|
10757
10836
|
const submit = () => {
|
|
10758
10837
|
if (disabled) return;
|
|
10759
10838
|
const t = value.trim();
|
|
@@ -10767,7 +10846,7 @@ var ChatInput = (0, import_react64.forwardRef)(function ChatInput2({ placeholder
|
|
|
10767
10846
|
submit();
|
|
10768
10847
|
}
|
|
10769
10848
|
};
|
|
10770
|
-
(0,
|
|
10849
|
+
(0, import_react68.useImperativeHandle)(ref, () => ({
|
|
10771
10850
|
focus() {
|
|
10772
10851
|
const box = textareaRef.current;
|
|
10773
10852
|
if (box && !box.disabled) {
|
|
@@ -10779,7 +10858,7 @@ var ChatInput = (0, import_react64.forwardRef)(function ChatInput2({ placeholder
|
|
|
10779
10858
|
stopRef.current?.focus();
|
|
10780
10859
|
}
|
|
10781
10860
|
}), []);
|
|
10782
|
-
(0,
|
|
10861
|
+
(0, import_react68.useEffect)(() => {
|
|
10783
10862
|
if (streaming || disabled || !textBoxWantsFocusRef.current) return;
|
|
10784
10863
|
textBoxWantsFocusRef.current = false;
|
|
10785
10864
|
const box = textareaRef.current;
|
|
@@ -10810,7 +10889,7 @@ var ChatInput = (0, import_react64.forwardRef)(function ChatInput2({ placeholder
|
|
|
10810
10889
|
});
|
|
10811
10890
|
|
|
10812
10891
|
// src/components/TabBar.tsx
|
|
10813
|
-
var
|
|
10892
|
+
var import_react69 = require("react");
|
|
10814
10893
|
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
10815
10894
|
var TIGHT_LEVELS = [0, 1, 2, 3, 4, 5, 6];
|
|
10816
10895
|
function TabBar({ monitor, ui, matchCount, trendsCount, liveCount, hasSchedule, hasBuilder = false, gamesEnabled, clubEnabled }) {
|
|
@@ -10832,16 +10911,16 @@ function TabBar({ monitor, ui, matchCount, trendsCount, liveCount, hasSchedule,
|
|
|
10832
10911
|
...gamesEnabled ? [{ tab: "games", label: ui.tabGames, count: 0, dot: false }] : []
|
|
10833
10912
|
];
|
|
10834
10913
|
const track = useTrack();
|
|
10835
|
-
const listRef = (0,
|
|
10914
|
+
const listRef = (0, import_react69.useRef)(null);
|
|
10836
10915
|
const activeTab = monitor.activeTab;
|
|
10837
|
-
(0,
|
|
10916
|
+
(0, import_react69.useEffect)(() => {
|
|
10838
10917
|
const el = listRef.current?.querySelector("[data-on]");
|
|
10839
10918
|
if (!el || typeof el.scrollIntoView !== "function") return;
|
|
10840
10919
|
const reduce = typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
10841
10920
|
el.scrollIntoView({ block: "nearest", inline: "nearest", behavior: reduce ? "auto" : "smooth" });
|
|
10842
10921
|
}, [activeTab]);
|
|
10843
10922
|
const labelSignature = tabs.map((t) => `${t.tab}:${t.label}:${t.count}`).join("|");
|
|
10844
|
-
(0,
|
|
10923
|
+
(0, import_react69.useLayoutEffect)(() => {
|
|
10845
10924
|
const strip = listRef.current;
|
|
10846
10925
|
if (!strip) return;
|
|
10847
10926
|
const measure = () => {
|
|
@@ -10889,7 +10968,7 @@ function TabBar({ monitor, ui, matchCount, trendsCount, liveCount, hasSchedule,
|
|
|
10889
10968
|
}
|
|
10890
10969
|
|
|
10891
10970
|
// src/components/MonitorTabs.tsx
|
|
10892
|
-
var
|
|
10971
|
+
var import_react81 = require("react");
|
|
10893
10972
|
|
|
10894
10973
|
// src/components/MarketAccordion.tsx
|
|
10895
10974
|
var import_widget_sdk24 = require("@sensiblestats/widget-sdk");
|
|
@@ -10951,7 +11030,7 @@ function MarketAccordion({ match, monitor, ui, slip }) {
|
|
|
10951
11030
|
}
|
|
10952
11031
|
|
|
10953
11032
|
// src/components/MonitorFormH2H.tsx
|
|
10954
|
-
var
|
|
11033
|
+
var import_react70 = require("react");
|
|
10955
11034
|
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
10956
11035
|
function resultClass2(result) {
|
|
10957
11036
|
if (result === "W") return "ss-w-h2h-result--win";
|
|
@@ -10967,7 +11046,7 @@ function FormDots({ form, ui }) {
|
|
|
10967
11046
|
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "ss-w-h2h-dots", children: form.map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: `ss-w-h2h-result ${resultClass2(m.result)}`, children: resultLabel(m.result, ui) }, i)) });
|
|
10968
11047
|
}
|
|
10969
11048
|
function MonitorFormH2H({ formAndH2H, homeTeamName, awayTeamName, ui }) {
|
|
10970
|
-
const [expanded, setExpanded] = (0,
|
|
11049
|
+
const [expanded, setExpanded] = (0, import_react70.useState)(false);
|
|
10971
11050
|
const { homeForm, awayForm, h2h, homeShortCode, awayShortCode } = formAndH2H;
|
|
10972
11051
|
if (homeForm.length === 0 && awayForm.length === 0 && !h2h) {
|
|
10973
11052
|
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_jsx_runtime72.Fragment, {});
|
|
@@ -11194,7 +11273,7 @@ function MonitorSkeleton({ pin, monitor, ui }) {
|
|
|
11194
11273
|
}
|
|
11195
11274
|
|
|
11196
11275
|
// src/components/NbaMonitorCard.tsx
|
|
11197
|
-
var
|
|
11276
|
+
var import_react74 = require("react");
|
|
11198
11277
|
|
|
11199
11278
|
// src/sportLabel.ts
|
|
11200
11279
|
var CODE = { football: "football", basketball: "nba", nba: "nba", americanfootball: "nfl", nfl: "nfl", tennis: "tennis" };
|
|
@@ -11204,7 +11283,7 @@ var sportLabel = (ui, sport) => {
|
|
|
11204
11283
|
};
|
|
11205
11284
|
|
|
11206
11285
|
// src/components/NbaFormSection.tsx
|
|
11207
|
-
var
|
|
11286
|
+
var import_react71 = require("react");
|
|
11208
11287
|
|
|
11209
11288
|
// src/components/NbaFormRest.tsx
|
|
11210
11289
|
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
@@ -11303,8 +11382,8 @@ function Row2({ game, abbr, tonight, ui }) {
|
|
|
11303
11382
|
] });
|
|
11304
11383
|
}
|
|
11305
11384
|
function NbaFormSection({ match, monitor, ui }) {
|
|
11306
|
-
const [open, setOpen] = (0,
|
|
11307
|
-
const [side, setSide] = (0,
|
|
11385
|
+
const [open, setOpen] = (0, import_react71.useState)(false);
|
|
11386
|
+
const [side, setSide] = (0, import_react71.useState)("away");
|
|
11308
11387
|
const form = useNbaForm(match, monitor);
|
|
11309
11388
|
const b = match.basketball;
|
|
11310
11389
|
if (!form || !b || !form.home && !form.away) return null;
|
|
@@ -11346,10 +11425,10 @@ function NbaFormSection({ match, monitor, ui }) {
|
|
|
11346
11425
|
}
|
|
11347
11426
|
|
|
11348
11427
|
// src/components/NbaPropsSection.tsx
|
|
11349
|
-
var
|
|
11428
|
+
var import_react73 = require("react");
|
|
11350
11429
|
|
|
11351
11430
|
// src/components/PropsPieces.tsx
|
|
11352
|
-
var
|
|
11431
|
+
var import_react72 = require("react");
|
|
11353
11432
|
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
11354
11433
|
var livePlayer = (bundle, p) => bundle.live === true || !p.live && !p.nflLive ? p : { ...p, live: null, nflLive: null };
|
|
11355
11434
|
var hasLiveLine = (p) => p.live != null || p.nflLive != null;
|
|
@@ -11362,9 +11441,9 @@ function preKickoff(match) {
|
|
|
11362
11441
|
return Number.isFinite(kickoff) && Date.now() < kickoff;
|
|
11363
11442
|
}
|
|
11364
11443
|
function usePreKickoff(match) {
|
|
11365
|
-
const [, setTick] = (0,
|
|
11444
|
+
const [, setTick] = (0, import_react72.useState)(0);
|
|
11366
11445
|
const pre = preKickoff(match);
|
|
11367
|
-
(0,
|
|
11446
|
+
(0, import_react72.useEffect)(() => {
|
|
11368
11447
|
if (!pre || !match.kickoffUtc) return;
|
|
11369
11448
|
const wait = Math.min(Math.max(Date.parse(match.kickoffUtc) - Date.now(), 0), MAX_TIMER_MS);
|
|
11370
11449
|
const id = setTimeout(() => setTick((t) => t + 1), wait);
|
|
@@ -11378,7 +11457,7 @@ function usePropsOpen(match, monitor, descriptor) {
|
|
|
11378
11457
|
const pre = descriptor.sport === "basketball" ? match.phase === "preMatch" : beforeKickoff;
|
|
11379
11458
|
const live = match.phase === "live";
|
|
11380
11459
|
const open = pre || live;
|
|
11381
|
-
(0,
|
|
11460
|
+
(0, import_react72.useEffect)(() => {
|
|
11382
11461
|
if (!open) return;
|
|
11383
11462
|
if (sport) monitor.loadPlayerProps?.(match.matchId, sport);
|
|
11384
11463
|
else monitor.loadPlayerProps?.(match.matchId);
|
|
@@ -11456,7 +11535,7 @@ function PropBars({ bars, line, title, wide, ui, note }) {
|
|
|
11456
11535
|
function PropPlayerPanel({ player: given, bundle, descriptor, ui, slip }) {
|
|
11457
11536
|
const player = livePlayer(bundle, given);
|
|
11458
11537
|
const stats = descriptor.stats.map((k) => player.stats.find((s) => s.stat === k)).filter((s) => s != null);
|
|
11459
|
-
const [picked, setPicked] = (0,
|
|
11538
|
+
const [picked, setPicked] = (0, import_react72.useState)(null);
|
|
11460
11539
|
const active = stats.find((s) => s.stat === picked) ?? stats[0];
|
|
11461
11540
|
const sample = active?.games?.length ?? 0;
|
|
11462
11541
|
const hitsOf = (price, text2) => descriptor.showHits && sample > 0 && price.hits != null ? text2(price.hits) : null;
|
|
@@ -11505,8 +11584,8 @@ function PropPlayerPanel({ player: given, bundle, descriptor, ui, slip }) {
|
|
|
11505
11584
|
] });
|
|
11506
11585
|
}
|
|
11507
11586
|
function PropRoster({ bundle, players, side, descriptor, ui, slip }) {
|
|
11508
|
-
const [openId, setOpenId] = (0,
|
|
11509
|
-
const [brokenShots, setBrokenShots] = (0,
|
|
11587
|
+
const [openId, setOpenId] = (0, import_react72.useState)(null);
|
|
11588
|
+
const [brokenShots, setBrokenShots] = (0, import_react72.useState)(/* @__PURE__ */ new Set());
|
|
11510
11589
|
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "ss-w-props-list", children: players.map((given) => {
|
|
11511
11590
|
const p = livePlayer(bundle, given);
|
|
11512
11591
|
const isOpen = openId === p.playerId;
|
|
@@ -11552,12 +11631,12 @@ function PropRoster({ bundle, players, side, descriptor, ui, slip }) {
|
|
|
11552
11631
|
}
|
|
11553
11632
|
var BOX_QUIET_MS = 12e4;
|
|
11554
11633
|
function StatsClock({ boxAsOfUtc, match, live, atBreak: atBreak2, ago, ui }) {
|
|
11555
|
-
const [tick, setTick] = (0,
|
|
11634
|
+
const [tick, setTick] = (0, import_react72.useState)(0);
|
|
11556
11635
|
const time = clock2(boxAsOfUtc, ui);
|
|
11557
11636
|
const at2 = time === "" ? Number.NaN : Date.parse(boxAsOfUtc);
|
|
11558
11637
|
const valid = !Number.isNaN(at2);
|
|
11559
11638
|
const onBreak = atBreak(match);
|
|
11560
|
-
(0,
|
|
11639
|
+
(0, import_react72.useEffect)(() => {
|
|
11561
11640
|
if (!valid || onBreak) return;
|
|
11562
11641
|
const age2 = Date.now() - at2;
|
|
11563
11642
|
const wait = age2 < BOX_QUIET_MS ? BOX_QUIET_MS - age2 : 6e4 - age2 % 6e4;
|
|
@@ -11618,12 +11697,12 @@ var nbaDescriptor = (ui, match) => ({
|
|
|
11618
11697
|
tenGameBars: false
|
|
11619
11698
|
});
|
|
11620
11699
|
function StatsClock2({ bundle, match, ui }) {
|
|
11621
|
-
const [tick, setTick] = (0,
|
|
11700
|
+
const [tick, setTick] = (0, import_react73.useState)(0);
|
|
11622
11701
|
const at2 = bundle.live === true && bundle.boxAsOfUtc ? Date.parse(bundle.boxAsOfUtc) : Number.NaN;
|
|
11623
11702
|
const time = clock2(bundle.boxAsOfUtc, ui);
|
|
11624
11703
|
const valid = !Number.isNaN(at2) && time !== "";
|
|
11625
11704
|
const onBreak = atBreak(match);
|
|
11626
|
-
(0,
|
|
11705
|
+
(0, import_react73.useEffect)(() => {
|
|
11627
11706
|
if (!valid || onBreak) return;
|
|
11628
11707
|
const age2 = Date.now() - at2;
|
|
11629
11708
|
const wait = age2 < BOX_QUIET_MS2 ? BOX_QUIET_MS2 - age2 : 6e4 - age2 % 6e4;
|
|
@@ -11637,7 +11716,7 @@ function StatsClock2({ bundle, match, ui }) {
|
|
|
11637
11716
|
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-w-props-asof ss-w-props-asof--live", children: ui.nba.propsStatsLive(time) });
|
|
11638
11717
|
}
|
|
11639
11718
|
function NbaPropsSection({ match, monitor, ui, slip }) {
|
|
11640
|
-
const [side, setSide] = (0,
|
|
11719
|
+
const [side, setSide] = (0, import_react73.useState)("home");
|
|
11641
11720
|
const descriptor = nbaDescriptor(ui, match);
|
|
11642
11721
|
const { bundle, live, open } = usePropsOpen(match, monitor, descriptor);
|
|
11643
11722
|
if (!open || !bundle || bundle.players.length === 0 || (bundle.live ?? false) !== live) return null;
|
|
@@ -11675,7 +11754,7 @@ function city(teamName, nickname) {
|
|
|
11675
11754
|
return name.slice(0, name.length - nickname.length).trim() || null;
|
|
11676
11755
|
}
|
|
11677
11756
|
function BadgeCrest({ url, abbreviation }) {
|
|
11678
|
-
const [failed, setFailed] = (0,
|
|
11757
|
+
const [failed, setFailed] = (0, import_react74.useState)(false);
|
|
11679
11758
|
if (url && !failed) {
|
|
11680
11759
|
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("img", { className: "ss-w-nbamon-badge ss-w-nbamon-badge--img", src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
11681
11760
|
}
|
|
@@ -11793,7 +11872,7 @@ function NbaMonitorCard({ match, monitor, ui, slip }) {
|
|
|
11793
11872
|
}
|
|
11794
11873
|
|
|
11795
11874
|
// src/components/NflFormSection.tsx
|
|
11796
|
-
var
|
|
11875
|
+
var import_react75 = require("react");
|
|
11797
11876
|
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
11798
11877
|
var outcomeOf = (g) => g.teamScore > g.opponentScore ? "win" : g.teamScore < g.opponentScore ? "loss" : "tie";
|
|
11799
11878
|
var signedSpread2 = (v) => v > 0 ? `+${v}` : String(v);
|
|
@@ -11845,7 +11924,7 @@ function H2hRow({ game, home, ui }) {
|
|
|
11845
11924
|
] });
|
|
11846
11925
|
}
|
|
11847
11926
|
function NflFormSection({ match, monitor, ui }) {
|
|
11848
|
-
const [segment, setSegment] = (0,
|
|
11927
|
+
const [segment, setSegment] = (0, import_react75.useState)("away");
|
|
11849
11928
|
const { live, open } = usePropsOpen(match, monitor, { sport: "americanfootball" });
|
|
11850
11929
|
const bundle = monitor.playerProps?.[monitorMatchKey("americanfootball", match.matchId)]?.bundle;
|
|
11851
11930
|
const form = bundle?.form;
|
|
@@ -11878,7 +11957,7 @@ function NflFormSection({ match, monitor, ui }) {
|
|
|
11878
11957
|
}
|
|
11879
11958
|
|
|
11880
11959
|
// src/components/NflPropsSection.tsx
|
|
11881
|
-
var
|
|
11960
|
+
var import_react76 = require("react");
|
|
11882
11961
|
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
11883
11962
|
var TRENDS_SHOWN = 3;
|
|
11884
11963
|
var SCORERS_SHOWN = 8;
|
|
@@ -11951,7 +12030,7 @@ function ShowMore({ label, onClick }) {
|
|
|
11951
12030
|
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("button", { type: "button", className: "ss-w-props-more", onClick, children: label });
|
|
11952
12031
|
}
|
|
11953
12032
|
function Trends({ bundle, facts, descriptor, ui, slip }) {
|
|
11954
|
-
const [all, setAll] = (0,
|
|
12033
|
+
const [all, setAll] = (0, import_react76.useState)(false);
|
|
11955
12034
|
const shown2 = all ? facts : facts.slice(0, TRENDS_SHOWN);
|
|
11956
12035
|
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("section", { className: "ss-w-props ss-w-props-trends", lang: ui.locale, children: [
|
|
11957
12036
|
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "ss-w-props-head", children: ui.nfl.propsTrends }),
|
|
@@ -11984,7 +12063,7 @@ function Trends({ bundle, facts, descriptor, ui, slip }) {
|
|
|
11984
12063
|
] });
|
|
11985
12064
|
}
|
|
11986
12065
|
function Scorers({ bundle, scorers, abbreviations, descriptor, ui, slip }) {
|
|
11987
|
-
const [all, setAll] = (0,
|
|
12066
|
+
const [all, setAll] = (0, import_react76.useState)(false);
|
|
11988
12067
|
const shown2 = all ? scorers : scorers.slice(0, SCORERS_SHOWN);
|
|
11989
12068
|
const cell2 = (name, column, price, stat) => price && stat ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(PropPrice, { price, label: "", ariaName: `${name}, ${column}`, player: name, stat, bundle, descriptor, ui, slip }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "ss-w-props-scorer-none", children: "\u2014" });
|
|
11990
12069
|
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "ss-w-props-scorers", children: [
|
|
@@ -12014,7 +12093,7 @@ function Scorers({ bundle, scorers, abbreviations, descriptor, ui, slip }) {
|
|
|
12014
12093
|
] });
|
|
12015
12094
|
}
|
|
12016
12095
|
function NflPropsSection({ match, monitor, ui, slip }) {
|
|
12017
|
-
const [tab, setTab] = (0,
|
|
12096
|
+
const [tab, setTab] = (0, import_react76.useState)(null);
|
|
12018
12097
|
const descriptor = nflDescriptor(ui);
|
|
12019
12098
|
const { bundle, live, open } = usePropsOpen(match, monitor, descriptor);
|
|
12020
12099
|
if (!open || !bundle || bundle.players.length === 0 || (bundle.live ?? false) !== live) return null;
|
|
@@ -12200,14 +12279,14 @@ function NflMonitorCard({ match, monitor, ui, slip }) {
|
|
|
12200
12279
|
}
|
|
12201
12280
|
|
|
12202
12281
|
// src/components/TennisMonitorCard.tsx
|
|
12203
|
-
var
|
|
12282
|
+
var import_react79 = require("react");
|
|
12204
12283
|
var import_widget_sdk27 = require("@sensiblestats/widget-sdk");
|
|
12205
12284
|
|
|
12206
12285
|
// src/components/TennisFixtureRow.tsx
|
|
12207
12286
|
var import_widget_sdk26 = require("@sensiblestats/widget-sdk");
|
|
12208
12287
|
|
|
12209
12288
|
// src/components/FixtureRow.tsx
|
|
12210
|
-
var
|
|
12289
|
+
var import_react77 = require("react");
|
|
12211
12290
|
var import_widget_sdk25 = require("@sensiblestats/widget-sdk");
|
|
12212
12291
|
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
12213
12292
|
function splitAtFirstSpace(label) {
|
|
@@ -12221,7 +12300,7 @@ function kickoffLabel(kickoffUnix, tag2, clock3, timeZone) {
|
|
|
12221
12300
|
return formatTime(kickoffUnix * 1e3, tag2, clock3, { timeZone });
|
|
12222
12301
|
}
|
|
12223
12302
|
function Side2({ name, crest, abbr, away = false }) {
|
|
12224
|
-
const [failed, setFailed] = (0,
|
|
12303
|
+
const [failed, setFailed] = (0, import_react77.useState)(false);
|
|
12225
12304
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("span", { className: away ? "ss-w-drow-side ss-w-drow-side--away" : "ss-w-drow-side", children: [
|
|
12226
12305
|
crest && !failed ? /* @__PURE__ */ (0, import_jsx_runtime85.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_runtime85.jsx)("span", { className: "ss-w-drow-crest ss-w-drow-crest--abbr", children: abbr }) : null,
|
|
12227
12306
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-w-drow-nm", children: name })
|
|
@@ -12463,7 +12542,7 @@ function TennisLiveScoreboard({ t, score, live, ui }) {
|
|
|
12463
12542
|
}
|
|
12464
12543
|
|
|
12465
12544
|
// src/components/TennisStatsTables.tsx
|
|
12466
|
-
var
|
|
12545
|
+
var import_react78 = require("react");
|
|
12467
12546
|
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
12468
12547
|
function formatStat(row, value, locale) {
|
|
12469
12548
|
if (value == null) return "\u2013";
|
|
@@ -12501,8 +12580,8 @@ function Tables({ table, labels, names, locale }) {
|
|
|
12501
12580
|
] });
|
|
12502
12581
|
}
|
|
12503
12582
|
function TennisStatsTables({ serveReturn, today, labels, names, ui, resetKey }) {
|
|
12504
|
-
const [tab, setTab] = (0,
|
|
12505
|
-
(0,
|
|
12583
|
+
const [tab, setTab] = (0, import_react78.useState)("match");
|
|
12584
|
+
(0, import_react78.useEffect)(() => {
|
|
12506
12585
|
setTab("match");
|
|
12507
12586
|
}, [resetKey]);
|
|
12508
12587
|
const sets = serveReturn.sets.filter((s) => s.table.serve.length + s.table.return.length > 0);
|
|
@@ -12533,7 +12612,7 @@ function TennisStatsTables({ serveReturn, today, labels, names, ui, resetKey })
|
|
|
12533
12612
|
] }),
|
|
12534
12613
|
today.rows.map((r) => {
|
|
12535
12614
|
const f = (v) => formatStat({ kind: "pct" }, v, locale);
|
|
12536
|
-
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
12615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_react78.Fragment, { children: [
|
|
12537
12616
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "ss-w-ts-l", children: r.label }),
|
|
12538
12617
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("span", { className: "ss-w-ts-today-v ss-w-ts-today-v--a", children: [
|
|
12539
12618
|
f(r.p1Today),
|
|
@@ -12668,7 +12747,7 @@ function HeadToHead({ t, ui }) {
|
|
|
12668
12747
|
] });
|
|
12669
12748
|
}
|
|
12670
12749
|
function TennisMonitorCard({ match, monitor, ui, slip, onAsk }) {
|
|
12671
|
-
const lastTables = (0,
|
|
12750
|
+
const lastTables = (0, import_react79.useRef)(null);
|
|
12672
12751
|
const t = match.tennis;
|
|
12673
12752
|
if (!t) return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(UnavailableCard, { match, monitor, ui, sport: "tennis" });
|
|
12674
12753
|
const preMatch = match.phase === "preMatch";
|
|
@@ -12748,7 +12827,7 @@ function TennisMonitorCard({ match, monitor, ui, slip, onAsk }) {
|
|
|
12748
12827
|
}
|
|
12749
12828
|
|
|
12750
12829
|
// src/components/ScoreboardStrip.tsx
|
|
12751
|
-
var
|
|
12830
|
+
var import_react80 = require("react");
|
|
12752
12831
|
var import_widget_sdk28 = require("@sensiblestats/widget-sdk");
|
|
12753
12832
|
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
12754
12833
|
function nbaStatus(m, ui) {
|
|
@@ -12843,8 +12922,8 @@ function rowsFor(m) {
|
|
|
12843
12922
|
];
|
|
12844
12923
|
}
|
|
12845
12924
|
function useStripScroll(selectedKey) {
|
|
12846
|
-
const stripRef = (0,
|
|
12847
|
-
(0,
|
|
12925
|
+
const stripRef = (0, import_react80.useRef)(null);
|
|
12926
|
+
(0, import_react80.useEffect)(() => {
|
|
12848
12927
|
const strip = stripRef.current;
|
|
12849
12928
|
const pressed = strip?.querySelector('[aria-pressed="true"]');
|
|
12850
12929
|
if (!strip || !pressed) return;
|
|
@@ -13018,7 +13097,7 @@ function OddsLiveStrip({ m, ui }) {
|
|
|
13018
13097
|
] });
|
|
13019
13098
|
}
|
|
13020
13099
|
function MatchesPanel({ monitor, ui, slip, onAsk, discovery }) {
|
|
13021
|
-
const seedIndex = (0,
|
|
13100
|
+
const seedIndex = (0, import_react81.useMemo)(() => buildSeedIndex(discovery?.groups ?? []), [discovery?.groups]);
|
|
13022
13101
|
const tiles = orderTiles(
|
|
13023
13102
|
monitor.pins,
|
|
13024
13103
|
monitor.snapshot,
|
|
@@ -13090,7 +13169,7 @@ function TrendsPanel({ monitor, ui, slip }) {
|
|
|
13090
13169
|
}
|
|
13091
13170
|
|
|
13092
13171
|
// src/components/LivePanel.tsx
|
|
13093
|
-
var
|
|
13172
|
+
var import_react84 = require("react");
|
|
13094
13173
|
var import_widget_sdk35 = require("@sensiblestats/widget-sdk");
|
|
13095
13174
|
|
|
13096
13175
|
// src/scheduleView.ts
|
|
@@ -13265,20 +13344,20 @@ function LeagueGroup({ view, open, onToggle, disambiguate, rowCap, onShowAll, on
|
|
|
13265
13344
|
}
|
|
13266
13345
|
|
|
13267
13346
|
// src/components/MatchSheet.tsx
|
|
13268
|
-
var
|
|
13347
|
+
var import_react83 = require("react");
|
|
13269
13348
|
var import_widget_sdk33 = require("@sensiblestats/widget-sdk");
|
|
13270
13349
|
|
|
13271
13350
|
// src/useModalDialog.ts
|
|
13272
|
-
var
|
|
13351
|
+
var import_react82 = require("react");
|
|
13273
13352
|
var FOCUSABLE = 'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
13274
13353
|
function useModalDialog(onClose, opts = {}) {
|
|
13275
|
-
const dialogRef = (0,
|
|
13276
|
-
const onCloseRef = (0,
|
|
13354
|
+
const dialogRef = (0, import_react82.useRef)(null);
|
|
13355
|
+
const onCloseRef = (0, import_react82.useRef)(onClose);
|
|
13277
13356
|
onCloseRef.current = onClose;
|
|
13278
|
-
const openerRef = (0,
|
|
13357
|
+
const openerRef = (0, import_react82.useRef)(opts.opener);
|
|
13279
13358
|
openerRef.current = opts.opener;
|
|
13280
13359
|
const restore = opts.restoreFocus ?? true;
|
|
13281
|
-
(0,
|
|
13360
|
+
(0, import_react82.useEffect)(() => {
|
|
13282
13361
|
const dialog = dialogRef.current;
|
|
13283
13362
|
const root = dialog?.getRootNode();
|
|
13284
13363
|
const focusedAtMount = root?.activeElement ?? null;
|
|
@@ -13289,7 +13368,7 @@ function useModalDialog(onClose, opts = {}) {
|
|
|
13289
13368
|
if (target instanceof HTMLElement) target.focus({ preventScroll: true });
|
|
13290
13369
|
};
|
|
13291
13370
|
}, []);
|
|
13292
|
-
(0,
|
|
13371
|
+
(0, import_react82.useEffect)(() => {
|
|
13293
13372
|
const onKey = (e) => {
|
|
13294
13373
|
if (e.key !== "Escape") return;
|
|
13295
13374
|
e.stopPropagation();
|
|
@@ -13330,8 +13409,8 @@ function kickoffDate(kickoffUnix, lang, timeZone) {
|
|
|
13330
13409
|
function MatchSheet({ match, league, state, stale, ui, monitor, onAsk, onClose, opener }) {
|
|
13331
13410
|
const { dialogRef, onKeyDown } = useModalDialog(onClose, { opener });
|
|
13332
13411
|
const log = useEventLog();
|
|
13333
|
-
const titleId = (0,
|
|
13334
|
-
const [limitHit, setLimitHit] = (0,
|
|
13412
|
+
const titleId = (0, import_react83.useId)();
|
|
13413
|
+
const [limitHit, setLimitHit] = (0, import_react83.useState)(false);
|
|
13335
13414
|
const pinSport = (0, import_widget_sdk33.slipSportOf)(match.sport);
|
|
13336
13415
|
const tour = pinSport === "tennis" && isKnownTour(match.tour) ? match.tour : void 0;
|
|
13337
13416
|
const followable = pinSport !== "tennis" || tour !== void 0;
|
|
@@ -13432,10 +13511,10 @@ var OPEN_TOP_GROUPS = 2;
|
|
|
13432
13511
|
var QUIET_ROWS = 4;
|
|
13433
13512
|
function LivePanel({ discovery, ui, monitor, sport, offered, onSport, league, onLeague, onSeeAll, onAsk }) {
|
|
13434
13513
|
const { groups, states, stale } = discovery;
|
|
13435
|
-
const [mine, setMine] = (0,
|
|
13436
|
-
const [toggled, setToggled] = (0,
|
|
13437
|
-
const [sheet, setSheet] = (0,
|
|
13438
|
-
const pinnedKeys = (0,
|
|
13514
|
+
const [mine, setMine] = (0, import_react84.useState)(false);
|
|
13515
|
+
const [toggled, setToggled] = (0, import_react84.useState)(/* @__PURE__ */ new Map());
|
|
13516
|
+
const [sheet, setSheet] = (0, import_react84.useState)(null);
|
|
13517
|
+
const pinnedKeys = (0, import_react84.useMemo)(
|
|
13439
13518
|
() => new Set(monitor.pins.filter((p) => p.kind === "match").map((p) => (0, import_widget_sdk35.matchKey)(p.sport, p.matchId, p.tour))),
|
|
13440
13519
|
[monitor.pins]
|
|
13441
13520
|
);
|
|
@@ -13541,20 +13620,20 @@ function LivePanel({ discovery, ui, monitor, sport, offered, onSport, league, on
|
|
|
13541
13620
|
}
|
|
13542
13621
|
|
|
13543
13622
|
// src/components/ScheduleMatchesPanel.tsx
|
|
13544
|
-
var
|
|
13623
|
+
var import_react88 = require("react");
|
|
13545
13624
|
var import_widget_sdk37 = require("@sensiblestats/widget-sdk");
|
|
13546
13625
|
|
|
13547
13626
|
// src/useTennisRowPrices.ts
|
|
13548
|
-
var
|
|
13627
|
+
var import_react85 = require("react");
|
|
13549
13628
|
var import_widget_sdk36 = require("@sensiblestats/widget-sdk");
|
|
13550
13629
|
var TENNIS_PRICE_POLL_MS = 6e4;
|
|
13551
13630
|
function useTennisRowPrices(a) {
|
|
13552
|
-
const [state, setState] = (0,
|
|
13553
|
-
const getPricesRef = (0,
|
|
13631
|
+
const [state, setState] = (0, import_react85.useState)({ byId: null, stale: false });
|
|
13632
|
+
const getPricesRef = (0, import_react85.useRef)(a.getPrices);
|
|
13554
13633
|
getPricesRef.current = a.getPrices;
|
|
13555
|
-
const latest = (0,
|
|
13634
|
+
const latest = (0, import_react85.useRef)(0);
|
|
13556
13635
|
const idsKey = a.keys.filter((k) => isKnownTour(k.tour)).slice(0, MAX_TENNIS_KEYS).map((k) => `${k.tour}:${k.matchId}`).sort().join(",");
|
|
13557
|
-
(0,
|
|
13636
|
+
(0, import_react85.useEffect)(() => {
|
|
13558
13637
|
if (!a.enabled || idsKey === "") {
|
|
13559
13638
|
latest.current++;
|
|
13560
13639
|
setState((prev) => prev.byId === null && !prev.stale ? prev : { byId: null, stale: false });
|
|
@@ -13592,11 +13671,11 @@ function useTennisRowPrices(a) {
|
|
|
13592
13671
|
}
|
|
13593
13672
|
|
|
13594
13673
|
// src/components/DayStrip.tsx
|
|
13595
|
-
var
|
|
13674
|
+
var import_react86 = require("react");
|
|
13596
13675
|
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
13597
13676
|
function DayStrip({ chips, selected, onSelect, ui, locale }) {
|
|
13598
|
-
const listRef = (0,
|
|
13599
|
-
(0,
|
|
13677
|
+
const listRef = (0, import_react86.useRef)(null);
|
|
13678
|
+
(0, import_react86.useEffect)(() => {
|
|
13600
13679
|
const el = listRef.current?.querySelector('[aria-pressed="true"]');
|
|
13601
13680
|
if (!el || typeof el.scrollIntoView !== "function") return;
|
|
13602
13681
|
const reduce = typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
@@ -13625,7 +13704,7 @@ function DayStrip({ chips, selected, onSelect, ui, locale }) {
|
|
|
13625
13704
|
}
|
|
13626
13705
|
|
|
13627
13706
|
// src/components/games/ui/SearchField.tsx
|
|
13628
|
-
var
|
|
13707
|
+
var import_react87 = require("react");
|
|
13629
13708
|
|
|
13630
13709
|
// src/components/games/ui/icons.tsx
|
|
13631
13710
|
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
@@ -13664,8 +13743,8 @@ var IconFlame = ({ size = 16 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runt
|
|
|
13664
13743
|
// src/components/games/ui/SearchField.tsx
|
|
13665
13744
|
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
13666
13745
|
function SearchField({ id, label, labelHidden = false, placeholder, value, onChange, disabled, inputRef, onKeyDown, clearLabel }) {
|
|
13667
|
-
const localRef = (0,
|
|
13668
|
-
const setInputRef = (0,
|
|
13746
|
+
const localRef = (0, import_react87.useRef)(null);
|
|
13747
|
+
const setInputRef = (0, import_react87.useCallback)((node) => {
|
|
13669
13748
|
localRef.current = node;
|
|
13670
13749
|
if (typeof inputRef === "function") inputRef(node);
|
|
13671
13750
|
else if (inputRef) inputRef.current = node;
|
|
@@ -13711,18 +13790,18 @@ var TOP_ROW_CAP = 3;
|
|
|
13711
13790
|
var SKELETON_ROWS = 3;
|
|
13712
13791
|
function ScheduleMatchesPanel({ discovery, ui, monitor, sport, offered, onSport, day, onDay, loaded, onOpenLive, onAsk, locale, getTennisPrices, slip }) {
|
|
13713
13792
|
const { localDate: today, states, stale } = discovery;
|
|
13714
|
-
const searchId = (0,
|
|
13715
|
-
const [query, setQuery] = (0,
|
|
13716
|
-
const [toggled, setToggled] = (0,
|
|
13717
|
-
const [expanded, setExpanded] = (0,
|
|
13718
|
-
const listRef = (0,
|
|
13719
|
-
const [sheet, setSheet] = (0,
|
|
13793
|
+
const searchId = (0, import_react88.useId)();
|
|
13794
|
+
const [query, setQuery] = (0, import_react88.useState)("");
|
|
13795
|
+
const [toggled, setToggled] = (0, import_react88.useState)(/* @__PURE__ */ new Map());
|
|
13796
|
+
const [expanded, setExpanded] = (0, import_react88.useState)(/* @__PURE__ */ new Set());
|
|
13797
|
+
const listRef = (0, import_react88.useRef)(null);
|
|
13798
|
+
const [sheet, setSheet] = (0, import_react88.useState)(null);
|
|
13720
13799
|
const { chips, selected } = loaded;
|
|
13721
|
-
(0,
|
|
13800
|
+
(0, import_react88.useEffect)(() => {
|
|
13722
13801
|
if (selected !== day) onDay(selected);
|
|
13723
13802
|
}, [day, selected, onDay]);
|
|
13724
13803
|
const isToday = selected === today;
|
|
13725
|
-
const pinnedKeys = (0,
|
|
13804
|
+
const pinnedKeys = (0, import_react88.useMemo)(
|
|
13726
13805
|
() => new Set(monitor.pins.filter((p) => p.kind === "match").map((p) => (0, import_widget_sdk37.matchKey)(p.sport, p.matchId, p.tour))),
|
|
13727
13806
|
[monitor.pins]
|
|
13728
13807
|
);
|
|
@@ -13860,7 +13939,7 @@ function ScheduleMatchesPanel({ discovery, ui, monitor, sport, offered, onSport,
|
|
|
13860
13939
|
}
|
|
13861
13940
|
|
|
13862
13941
|
// src/components/GamesPanel.tsx
|
|
13863
|
-
var
|
|
13942
|
+
var import_react103 = require("react");
|
|
13864
13943
|
|
|
13865
13944
|
// src/components/GamesLoginWall.tsx
|
|
13866
13945
|
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
@@ -13869,7 +13948,7 @@ function GamesLoginWall({ ui }) {
|
|
|
13869
13948
|
}
|
|
13870
13949
|
|
|
13871
13950
|
// src/components/GamesHub.tsx
|
|
13872
|
-
var
|
|
13951
|
+
var import_react89 = require("react");
|
|
13873
13952
|
|
|
13874
13953
|
// src/components/games/ui/gameMeta.ts
|
|
13875
13954
|
function prettifyGameId(gameId) {
|
|
@@ -14020,8 +14099,8 @@ function pickHeroGame(games) {
|
|
|
14020
14099
|
}
|
|
14021
14100
|
var tileKey = (g) => `${g.gameId}-${g.gameDay}-${g.fixtureId}`;
|
|
14022
14101
|
function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
|
|
14023
|
-
const [, setTick] = (0,
|
|
14024
|
-
(0,
|
|
14102
|
+
const [, setTick] = (0, import_react89.useState)(0);
|
|
14103
|
+
(0, import_react89.useEffect)(() => {
|
|
14025
14104
|
const id = setInterval(() => setTick((t) => t + 1), 6e4);
|
|
14026
14105
|
return () => clearInterval(id);
|
|
14027
14106
|
}, []);
|
|
@@ -14081,10 +14160,10 @@ function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
|
|
|
14081
14160
|
}
|
|
14082
14161
|
|
|
14083
14162
|
// src/components/GameScreenHost.tsx
|
|
14084
|
-
var
|
|
14163
|
+
var import_react101 = require("react");
|
|
14085
14164
|
|
|
14086
14165
|
// src/useGamePlay.ts
|
|
14087
|
-
var
|
|
14166
|
+
var import_react90 = require("react");
|
|
14088
14167
|
function toSubmitResult(payload) {
|
|
14089
14168
|
return {
|
|
14090
14169
|
// 'pending' means the play is recorded but awaiting resolution (fixture games)
|
|
@@ -14096,17 +14175,17 @@ function toSubmitResult(payload) {
|
|
|
14096
14175
|
};
|
|
14097
14176
|
}
|
|
14098
14177
|
function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh }) {
|
|
14099
|
-
const [result, setResult] = (0,
|
|
14100
|
-
const [submitting, setSubmitting] = (0,
|
|
14101
|
-
const [rawStatus, setRawStatus] = (0,
|
|
14102
|
-
const inFlightRef = (0,
|
|
14103
|
-
const convRef = (0,
|
|
14178
|
+
const [result, setResult] = (0, import_react90.useState)(null);
|
|
14179
|
+
const [submitting, setSubmitting] = (0, import_react90.useState)(false);
|
|
14180
|
+
const [rawStatus, setRawStatus] = (0, import_react90.useState)(null);
|
|
14181
|
+
const inFlightRef = (0, import_react90.useRef)(false);
|
|
14182
|
+
const convRef = (0, import_react90.useRef)(conversation);
|
|
14104
14183
|
convRef.current = conversation;
|
|
14105
|
-
const optsRef = (0,
|
|
14184
|
+
const optsRef = (0, import_react90.useRef)({ gameId, gameDay, fixtureId, locale, refresh });
|
|
14106
14185
|
optsRef.current = { gameId, gameDay, fixtureId, locale, refresh };
|
|
14107
|
-
const resultRef = (0,
|
|
14186
|
+
const resultRef = (0, import_react90.useRef)(null);
|
|
14108
14187
|
resultRef.current = result;
|
|
14109
|
-
const refetch = (0,
|
|
14188
|
+
const refetch = (0, import_react90.useCallback)(async () => {
|
|
14110
14189
|
const conv = convRef.current;
|
|
14111
14190
|
if (!conv) return;
|
|
14112
14191
|
const opts = optsRef.current;
|
|
@@ -14122,7 +14201,7 @@ function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh
|
|
|
14122
14201
|
} catch {
|
|
14123
14202
|
}
|
|
14124
14203
|
}, []);
|
|
14125
|
-
const submit = (0,
|
|
14204
|
+
const submit = (0, import_react90.useCallback)(async (answerJson) => {
|
|
14126
14205
|
const conv = convRef.current;
|
|
14127
14206
|
if (!conv || inFlightRef.current) return;
|
|
14128
14207
|
inFlightRef.current = true;
|
|
@@ -14149,14 +14228,14 @@ function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh
|
|
|
14149
14228
|
setSubmitting(false);
|
|
14150
14229
|
}
|
|
14151
14230
|
}, [refetch]);
|
|
14152
|
-
const hydrate = (0,
|
|
14231
|
+
const hydrate = (0, import_react90.useCallback)(() => {
|
|
14153
14232
|
void refetch();
|
|
14154
14233
|
}, [refetch]);
|
|
14155
14234
|
return { result, submitting, submit, hydrate, rawStatus };
|
|
14156
14235
|
}
|
|
14157
14236
|
|
|
14158
14237
|
// src/components/games/MysteryTigerGame.tsx
|
|
14159
|
-
var
|
|
14238
|
+
var import_react92 = require("react");
|
|
14160
14239
|
|
|
14161
14240
|
// src/components/games/nationFlags.ts
|
|
14162
14241
|
var FLAGS = {
|
|
@@ -14367,7 +14446,7 @@ function isNationCode(flag) {
|
|
|
14367
14446
|
}
|
|
14368
14447
|
|
|
14369
14448
|
// src/components/games/PlayerAvatar.tsx
|
|
14370
|
-
var
|
|
14449
|
+
var import_react91 = require("react");
|
|
14371
14450
|
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
14372
14451
|
function initialsOf(name) {
|
|
14373
14452
|
const parts2 = name.trim().split(/\s+/).filter(Boolean);
|
|
@@ -14385,7 +14464,7 @@ function PlayerAvatar({
|
|
|
14385
14464
|
imagePath,
|
|
14386
14465
|
className
|
|
14387
14466
|
}) {
|
|
14388
|
-
const [failed, setFailed] = (0,
|
|
14467
|
+
const [failed, setFailed] = (0, import_react91.useState)(false);
|
|
14389
14468
|
const showImage = Boolean(imagePath) && !isPlaceholderImage(imagePath) && !failed;
|
|
14390
14469
|
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className, "aria-hidden": "true", children: showImage ? /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("img", { src: imagePath, alt: "", loading: "lazy", onError: () => setFailed(true) }) : /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "ss-w-av-initials", children: initialsOf(name) }) });
|
|
14391
14470
|
}
|
|
@@ -14629,8 +14708,8 @@ function MysteryTigerGame({
|
|
|
14629
14708
|
onBack
|
|
14630
14709
|
}) {
|
|
14631
14710
|
const t = ui.games.mysteryTiger;
|
|
14632
|
-
const [query, setQuery] = (0,
|
|
14633
|
-
const inputId = (0,
|
|
14711
|
+
const [query, setQuery] = (0, import_react92.useState)("");
|
|
14712
|
+
const inputId = (0, import_react92.useId)();
|
|
14634
14713
|
const clientState = parseClientState(result?.clientStateJson);
|
|
14635
14714
|
const guessResults = clientState?.guessResults ?? [];
|
|
14636
14715
|
const alreadyGuessedIds = new Set(guessResults.map((g) => g.playerId));
|
|
@@ -14891,13 +14970,13 @@ function HigherOrLowerGame({
|
|
|
14891
14970
|
}
|
|
14892
14971
|
|
|
14893
14972
|
// src/components/games/CareerPathGame.tsx
|
|
14894
|
-
var
|
|
14973
|
+
var import_react94 = require("react");
|
|
14895
14974
|
|
|
14896
14975
|
// src/components/games/ui/CrestShield.tsx
|
|
14897
|
-
var
|
|
14976
|
+
var import_react93 = require("react");
|
|
14898
14977
|
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
14899
14978
|
function CrestShield({ src, name, size = 28 }) {
|
|
14900
|
-
const [failed, setFailed] = (0,
|
|
14979
|
+
const [failed, setFailed] = (0, import_react93.useState)(false);
|
|
14901
14980
|
if (src && !isPlaceholderImage(src) && !failed) {
|
|
14902
14981
|
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("img", { className: "ss-g-crest", src, alt: name, width: size, height: size, loading: "lazy", onError: () => setFailed(true) });
|
|
14903
14982
|
}
|
|
@@ -14929,8 +15008,8 @@ function CareerPathGame({
|
|
|
14929
15008
|
}) {
|
|
14930
15009
|
const s = ui.games.careerPath;
|
|
14931
15010
|
const title = gameTitle({ gameId: "career-path" }, ui.games.titles);
|
|
14932
|
-
const [query, setQuery] = (0,
|
|
14933
|
-
const inputId = (0,
|
|
15011
|
+
const [query, setQuery] = (0, import_react94.useState)("");
|
|
15012
|
+
const inputId = (0, import_react94.useId)();
|
|
14934
15013
|
const clientState = parseClientState3(result?.clientStateJson);
|
|
14935
15014
|
const alreadyGuessedIds = new Set(clientState?.guessResults.map((g) => g.playerId) ?? []);
|
|
14936
15015
|
const isOver = result?.alreadyPlayed === true || clientState?.solved === true || clientState?.failed === true;
|
|
@@ -15036,7 +15115,7 @@ function CareerPathGame({
|
|
|
15036
15115
|
}
|
|
15037
15116
|
|
|
15038
15117
|
// src/components/games/BeatTheGridGame.tsx
|
|
15039
|
-
var
|
|
15118
|
+
var import_react95 = __toESM(require("react"), 1);
|
|
15040
15119
|
|
|
15041
15120
|
// src/components/games/ui/OptionList.tsx
|
|
15042
15121
|
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
@@ -15125,10 +15204,10 @@ function SearchSheet({
|
|
|
15125
15204
|
ui
|
|
15126
15205
|
}) {
|
|
15127
15206
|
const s = ui.games.beatTheGrid;
|
|
15128
|
-
const [query, setQuery] = (0,
|
|
15129
|
-
const inputId = (0,
|
|
15130
|
-
const inputRef = (0,
|
|
15131
|
-
(0,
|
|
15207
|
+
const [query, setQuery] = (0, import_react95.useState)("");
|
|
15208
|
+
const inputId = (0, import_react95.useId)();
|
|
15209
|
+
const inputRef = (0, import_react95.useRef)(null);
|
|
15210
|
+
(0, import_react95.useEffect)(() => {
|
|
15132
15211
|
inputRef.current?.focus();
|
|
15133
15212
|
}, [row, col]);
|
|
15134
15213
|
const filtered = playerPool.filter(
|
|
@@ -15193,7 +15272,7 @@ function BeatTheGridGame({
|
|
|
15193
15272
|
}) {
|
|
15194
15273
|
const s = ui.games.beatTheGrid;
|
|
15195
15274
|
const title = gameTitle({ gameId: "beat-the-grid" }, ui.games.titles);
|
|
15196
|
-
const [activeCell, setActiveCell] = (0,
|
|
15275
|
+
const [activeCell, setActiveCell] = (0, import_react95.useState)(null);
|
|
15197
15276
|
const clientState = parseClientState4(result?.clientStateJson);
|
|
15198
15277
|
const filledCells = clientState?.cells ?? [];
|
|
15199
15278
|
const isLocked2 = result?.alreadyPlayed === true || clientState?.isComplete === true;
|
|
@@ -15267,7 +15346,7 @@ function BeatTheGridGame({
|
|
|
15267
15346
|
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)("span", { "aria-hidden": "true", children: abbr }),
|
|
15268
15347
|
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)("span", { className: "ss-g-sr", children: rowLabel })
|
|
15269
15348
|
] });
|
|
15270
|
-
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
|
|
15349
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(import_react95.default.Fragment, { children: [
|
|
15271
15350
|
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { className: "ss-g-btg-rowhdr", "data-meta": rowMeta ? "true" : void 0, children: rowHeaderContent }),
|
|
15272
15351
|
cols.map((colLabel, colIdx) => {
|
|
15273
15352
|
const filled = findCellResult(filledCells, rowIdx, colIdx);
|
|
@@ -15348,7 +15427,7 @@ function BeatTheGridGame({
|
|
|
15348
15427
|
}
|
|
15349
15428
|
|
|
15350
15429
|
// src/components/games/GuessTheXiGame.tsx
|
|
15351
|
-
var
|
|
15430
|
+
var import_react96 = require("react");
|
|
15352
15431
|
|
|
15353
15432
|
// src/components/games/ui/PitchSvg.tsx
|
|
15354
15433
|
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
@@ -15437,8 +15516,8 @@ function GuessTheXiGame({
|
|
|
15437
15516
|
onBack
|
|
15438
15517
|
}) {
|
|
15439
15518
|
const t = ui.games.guessTheXi;
|
|
15440
|
-
const [query, setQuery] = (0,
|
|
15441
|
-
const inputId = (0,
|
|
15519
|
+
const [query, setQuery] = (0, import_react96.useState)("");
|
|
15520
|
+
const inputId = (0, import_react96.useId)();
|
|
15442
15521
|
const clientState = parseClientState5(result?.clientStateJson);
|
|
15443
15522
|
const isOver = result?.alreadyPlayed === true || clientState?.status === "solved" || clientState?.status === "failed";
|
|
15444
15523
|
const solved = clientState?.status === "solved";
|
|
@@ -15580,7 +15659,7 @@ function GuessTheXiGame({
|
|
|
15580
15659
|
}
|
|
15581
15660
|
|
|
15582
15661
|
// src/components/games/DailyQuizGame.tsx
|
|
15583
|
-
var
|
|
15662
|
+
var import_react97 = require("react");
|
|
15584
15663
|
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
15585
15664
|
function parseClientState6(json) {
|
|
15586
15665
|
if (!json) return null;
|
|
@@ -15621,8 +15700,8 @@ function DailyQuizGame({
|
|
|
15621
15700
|
}) {
|
|
15622
15701
|
const s = ui.games.dailyQuiz;
|
|
15623
15702
|
const title = gameTitle({ gameId: "daily-quiz" }, ui.games.titles);
|
|
15624
|
-
const [selections, setSelections] = (0,
|
|
15625
|
-
const [page, setPage] = (0,
|
|
15703
|
+
const [selections, setSelections] = (0, import_react97.useState)(/* @__PURE__ */ new Map());
|
|
15704
|
+
const [page, setPage] = (0, import_react97.useState)(0);
|
|
15626
15705
|
const clientState = parseClientState6(result?.clientStateJson);
|
|
15627
15706
|
const results2 = clientState?.results ?? [];
|
|
15628
15707
|
const isRevealed = results2.length > 0 || result?.alreadyPlayed === true;
|
|
@@ -15732,7 +15811,7 @@ function DailyQuizGame({
|
|
|
15732
15811
|
}
|
|
15733
15812
|
|
|
15734
15813
|
// src/components/games/MatchdayPredictorGame.tsx
|
|
15735
|
-
var
|
|
15814
|
+
var import_react98 = require("react");
|
|
15736
15815
|
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
15737
15816
|
var SCORER_SEARCH_THRESHOLD = 9;
|
|
15738
15817
|
function parseClientState7(json) {
|
|
@@ -15828,12 +15907,12 @@ function MatchdayPredictorGame({
|
|
|
15828
15907
|
onBack
|
|
15829
15908
|
}) {
|
|
15830
15909
|
const t = ui.games.predictor;
|
|
15831
|
-
const [homeScore, setHomeScore] = (0,
|
|
15832
|
-
const [awayScore, setAwayScore] = (0,
|
|
15833
|
-
const [firstScorerPlayerId, setFirstScorerPlayerId] = (0,
|
|
15834
|
-
const [lastEdited, setLastEdited] = (0,
|
|
15835
|
-
const [query, setQuery] = (0,
|
|
15836
|
-
const searchId = (0,
|
|
15910
|
+
const [homeScore, setHomeScore] = (0, import_react98.useState)(0);
|
|
15911
|
+
const [awayScore, setAwayScore] = (0, import_react98.useState)(0);
|
|
15912
|
+
const [firstScorerPlayerId, setFirstScorerPlayerId] = (0, import_react98.useState)(null);
|
|
15913
|
+
const [lastEdited, setLastEdited] = (0, import_react98.useState)("home");
|
|
15914
|
+
const [query, setQuery] = (0, import_react98.useState)("");
|
|
15915
|
+
const searchId = (0, import_react98.useId)();
|
|
15837
15916
|
const clientState = parseClientState7(result?.clientStateJson);
|
|
15838
15917
|
const alreadyPlayed = result?.alreadyPlayed === true;
|
|
15839
15918
|
const header = /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
@@ -16000,7 +16079,7 @@ function MatchdayPredictorGame({
|
|
|
16000
16079
|
}
|
|
16001
16080
|
|
|
16002
16081
|
// src/components/games/StartingXiGame.tsx
|
|
16003
|
-
var
|
|
16082
|
+
var import_react99 = require("react");
|
|
16004
16083
|
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
16005
16084
|
var POINTS_PER_STARTER = 8;
|
|
16006
16085
|
var XI_SIZE = 11;
|
|
@@ -16044,10 +16123,10 @@ function StartingXiGame({
|
|
|
16044
16123
|
lockAtUtc
|
|
16045
16124
|
}) {
|
|
16046
16125
|
const t = ui.games.startingXi;
|
|
16047
|
-
const [slotPlayers, setSlotPlayers] = (0,
|
|
16048
|
-
const [active, setActive] = (0,
|
|
16049
|
-
const [query, setQuery] = (0,
|
|
16050
|
-
const searchId = (0,
|
|
16126
|
+
const [slotPlayers, setSlotPlayers] = (0, import_react99.useState)(() => Array(XI_SIZE).fill(null));
|
|
16127
|
+
const [active, setActive] = (0, import_react99.useState)(0);
|
|
16128
|
+
const [query, setQuery] = (0, import_react99.useState)("");
|
|
16129
|
+
const searchId = (0, import_react99.useId)();
|
|
16051
16130
|
const clientState = parseClientState8(result?.clientStateJson);
|
|
16052
16131
|
const alreadyPlayed = result?.alreadyPlayed === true;
|
|
16053
16132
|
const header = /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
@@ -16186,7 +16265,7 @@ function StartingXiGame({
|
|
|
16186
16265
|
}
|
|
16187
16266
|
|
|
16188
16267
|
// src/components/games/StatLadderGame.tsx
|
|
16189
|
-
var
|
|
16268
|
+
var import_react100 = require("react");
|
|
16190
16269
|
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
16191
16270
|
function ladderClue(ladder) {
|
|
16192
16271
|
const mystery = ladder.find((r) => r.rank === 2);
|
|
@@ -16223,9 +16302,9 @@ function StatLadderGame({
|
|
|
16223
16302
|
onBack
|
|
16224
16303
|
}) {
|
|
16225
16304
|
const t = ui.games.statLadder;
|
|
16226
|
-
const [query, setQuery] = (0,
|
|
16227
|
-
const [selectedId, setSelectedId] = (0,
|
|
16228
|
-
const searchId = (0,
|
|
16305
|
+
const [query, setQuery] = (0, import_react100.useState)("");
|
|
16306
|
+
const [selectedId, setSelectedId] = (0, import_react100.useState)(null);
|
|
16307
|
+
const searchId = (0, import_react100.useId)();
|
|
16229
16308
|
const clientState = parseClientState9(result?.clientStateJson);
|
|
16230
16309
|
const revealed = clientState != null;
|
|
16231
16310
|
const header = /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(GameHeader, { title: gameTitle({ gameId: "stat-ladder" }, ui.games.titles), eyebrow: t.eyebrow, onBack, backLabel: ui.back });
|
|
@@ -16431,8 +16510,8 @@ function GameScreenHost({
|
|
|
16431
16510
|
ui
|
|
16432
16511
|
}) {
|
|
16433
16512
|
const { gameId, fixtureId, gameDay = "", lockAtUtc = null } = selected;
|
|
16434
|
-
const [configJson, setConfigJson] = (0,
|
|
16435
|
-
(0,
|
|
16513
|
+
const [configJson, setConfigJson] = (0, import_react101.useState)(null);
|
|
16514
|
+
(0, import_react101.useEffect)(() => {
|
|
16436
16515
|
setConfigJson(null);
|
|
16437
16516
|
if (!conversation) return;
|
|
16438
16517
|
let cancelled = false;
|
|
@@ -16455,12 +16534,12 @@ function GameScreenHost({
|
|
|
16455
16534
|
fixtureId: fixtureId || void 0,
|
|
16456
16535
|
locale: ui.hostTag
|
|
16457
16536
|
});
|
|
16458
|
-
(0,
|
|
16537
|
+
(0, import_react101.useEffect)(() => {
|
|
16459
16538
|
if (conversation) hydrate();
|
|
16460
16539
|
}, [conversation, gameId]);
|
|
16461
|
-
const hydrateRef = (0,
|
|
16540
|
+
const hydrateRef = (0, import_react101.useRef)(hydrate);
|
|
16462
16541
|
hydrateRef.current = hydrate;
|
|
16463
|
-
(0,
|
|
16542
|
+
(0, import_react101.useEffect)(() => {
|
|
16464
16543
|
if (!FIXTURE_GAME_IDS.has(gameId)) return;
|
|
16465
16544
|
if (rawStatus !== "pending") return;
|
|
16466
16545
|
const timerId = setInterval(() => {
|
|
@@ -16573,7 +16652,7 @@ function GameScreenHost({
|
|
|
16573
16652
|
}
|
|
16574
16653
|
|
|
16575
16654
|
// src/components/Leaderboard.tsx
|
|
16576
|
-
var
|
|
16655
|
+
var import_react102 = require("react");
|
|
16577
16656
|
|
|
16578
16657
|
// src/components/LeaderboardRow.tsx
|
|
16579
16658
|
var import_jsx_runtime131 = require("react/jsx-runtime");
|
|
@@ -16660,7 +16739,7 @@ function Leaderboard({
|
|
|
16660
16739
|
ui,
|
|
16661
16740
|
onPlay
|
|
16662
16741
|
}) {
|
|
16663
|
-
const [segment, setSegment] = (0,
|
|
16742
|
+
const [segment, setSegment] = (0, import_react102.useState)("weekly");
|
|
16664
16743
|
const myRow = segment === "weekly" ? data.myWeeklyRow : data.myAllTimeRow;
|
|
16665
16744
|
const offBoard = myRow !== null && myRow !== void 0 && myRow.rank === -1;
|
|
16666
16745
|
const isEmpty = segment === "weekly" ? data.weeklyTop.length === 0 : data.allTimeTop.length === 0;
|
|
@@ -16765,9 +16844,9 @@ function GamesPanel({
|
|
|
16765
16844
|
leaderboardLoading,
|
|
16766
16845
|
refreshHub
|
|
16767
16846
|
}) {
|
|
16768
|
-
const [selected, setSelected] = (0,
|
|
16769
|
-
const [segment, setSegment] = (0,
|
|
16770
|
-
(0,
|
|
16847
|
+
const [selected, setSelected] = (0, import_react103.useState)(null);
|
|
16848
|
+
const [segment, setSegment] = (0, import_react103.useState)("play");
|
|
16849
|
+
(0, import_react103.useEffect)(() => {
|
|
16771
16850
|
ensureGamesFonts();
|
|
16772
16851
|
}, []);
|
|
16773
16852
|
if (!loggedIn) return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(GamesLoginWall, { ui });
|
|
@@ -16831,10 +16910,10 @@ function GamesPanel({
|
|
|
16831
16910
|
}
|
|
16832
16911
|
|
|
16833
16912
|
// src/components/FavouritesPanel.tsx
|
|
16834
|
-
var
|
|
16913
|
+
var import_react106 = require("react");
|
|
16835
16914
|
|
|
16836
16915
|
// src/components/FavouriteChips.tsx
|
|
16837
|
-
var
|
|
16916
|
+
var import_react104 = require("react");
|
|
16838
16917
|
var import_jsx_runtime136 = require("react/jsx-runtime");
|
|
16839
16918
|
async function toggleWithNotice(controller, kind, id, onNotice) {
|
|
16840
16919
|
const outcome = await controller.toggle(kind, id);
|
|
@@ -16881,12 +16960,12 @@ function Group({ title, entities, sport, ui, controller, onNotice }) {
|
|
|
16881
16960
|
] });
|
|
16882
16961
|
}
|
|
16883
16962
|
function FavouriteChips({ controller, ui, sport, sportLabel: sportLabel2, onNotice }) {
|
|
16884
|
-
const [confirming, setConfirming] = (0,
|
|
16963
|
+
const [confirming, setConfirming] = (0, import_react104.useState)(false);
|
|
16885
16964
|
const data = controller.data;
|
|
16886
|
-
(0,
|
|
16965
|
+
(0, import_react104.useEffect)(() => {
|
|
16887
16966
|
setConfirming(false);
|
|
16888
16967
|
}, [sport]);
|
|
16889
|
-
(0,
|
|
16968
|
+
(0, import_react104.useEffect)(() => {
|
|
16890
16969
|
if (!confirming) return;
|
|
16891
16970
|
const onPointerDown = (e) => {
|
|
16892
16971
|
if (!(e.target instanceof Element) || !e.target.closest("[data-fav-confirm]")) setConfirming(false);
|
|
@@ -16940,21 +17019,21 @@ function FavouriteChips({ controller, ui, sport, sportLabel: sportLabel2, onNoti
|
|
|
16940
17019
|
}
|
|
16941
17020
|
|
|
16942
17021
|
// src/components/FavouritesSearch.tsx
|
|
16943
|
-
var
|
|
17022
|
+
var import_react105 = require("react");
|
|
16944
17023
|
var import_jsx_runtime137 = require("react/jsx-runtime");
|
|
16945
17024
|
var MIN_LETTERS = 2;
|
|
16946
17025
|
var MAX_LENGTH = 64;
|
|
16947
17026
|
var DEBOUNCE_MS = 250;
|
|
16948
17027
|
function FavouritesSearch({ controller, ui, sport, onNotice }) {
|
|
16949
|
-
const [query, setQuery] = (0,
|
|
16950
|
-
const [answer, setAnswer] = (0,
|
|
16951
|
-
const controllerRef = (0,
|
|
17028
|
+
const [query, setQuery] = (0, import_react105.useState)("");
|
|
17029
|
+
const [answer, setAnswer] = (0, import_react105.useState)(null);
|
|
17030
|
+
const controllerRef = (0, import_react105.useRef)(controller);
|
|
16952
17031
|
controllerRef.current = controller;
|
|
16953
17032
|
const trimmed = query.trim();
|
|
16954
17033
|
const queryKey = `${sport}|${trimmed}`;
|
|
16955
17034
|
const results2 = answer?.key === queryKey ? answer.rows : [];
|
|
16956
17035
|
const settled = answer?.key === queryKey;
|
|
16957
|
-
(0,
|
|
17036
|
+
(0, import_react105.useEffect)(() => {
|
|
16958
17037
|
setAnswer(null);
|
|
16959
17038
|
if (trimmed.length < MIN_LETTERS) return;
|
|
16960
17039
|
let cancelled = false;
|
|
@@ -17017,13 +17096,13 @@ function FavouritesSearch({ controller, ui, sport, onNotice }) {
|
|
|
17017
17096
|
// src/components/FavouritesPanel.tsx
|
|
17018
17097
|
var import_jsx_runtime138 = require("react/jsx-runtime");
|
|
17019
17098
|
function FavouritesPanel({ controller, ui, sport, sports, onSportChange }) {
|
|
17020
|
-
const [notice, setNotice] = (0,
|
|
17021
|
-
const refreshRef = (0,
|
|
17099
|
+
const [notice, setNotice] = (0, import_react106.useState)(null);
|
|
17100
|
+
const refreshRef = (0, import_react106.useRef)(controller.refresh);
|
|
17022
17101
|
refreshRef.current = controller.refresh;
|
|
17023
|
-
(0,
|
|
17102
|
+
(0, import_react106.useEffect)(() => {
|
|
17024
17103
|
void refreshRef.current();
|
|
17025
17104
|
}, []);
|
|
17026
|
-
(0,
|
|
17105
|
+
(0, import_react106.useEffect)(() => {
|
|
17027
17106
|
setNotice(null);
|
|
17028
17107
|
}, [sport]);
|
|
17029
17108
|
const sportLabel2 = sports.find((s) => s.sport === sport)?.label ?? sportLabel(ui, sport);
|
|
@@ -17049,11 +17128,11 @@ function FavouritesPanel({ controller, ui, sport, sports, onSportChange }) {
|
|
|
17049
17128
|
}
|
|
17050
17129
|
|
|
17051
17130
|
// src/components/PresetTools.tsx
|
|
17052
|
-
var
|
|
17131
|
+
var import_react107 = require("react");
|
|
17053
17132
|
var import_jsx_runtime139 = require("react/jsx-runtime");
|
|
17054
17133
|
function PresetToolModal({ title, closeLabel, onClose, children, footer, className }) {
|
|
17055
17134
|
const { dialogRef, onKeyDown } = useModalDialog(onClose, { restoreFocus: false });
|
|
17056
|
-
const titleId = (0,
|
|
17135
|
+
const titleId = (0, import_react107.useId)();
|
|
17057
17136
|
return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: className ? `ss-w-tool-backdrop ${className}` : "ss-w-tool-backdrop", children: /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { ref: dialogRef, className: "ss-w-tool", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, tabIndex: -1, onKeyDown, children: [
|
|
17058
17137
|
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "ss-w-tool-head", children: [
|
|
17059
17138
|
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("h2", { id: titleId, className: "ss-w-tool-title", children: title }),
|
|
@@ -17103,9 +17182,9 @@ function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal,
|
|
|
17103
17182
|
const totalOptions = comboTotals(grid);
|
|
17104
17183
|
const totals = totalOptions.map((o) => o.value);
|
|
17105
17184
|
const legChoices = comboLegChoices(grid);
|
|
17106
|
-
const [total, setTotal] = (0,
|
|
17107
|
-
const [legs, setLegs] = (0,
|
|
17108
|
-
const [announcement, setAnnouncement] = (0,
|
|
17185
|
+
const [total, setTotal] = (0, import_react107.useState)(() => nearest(totals, initialTotal));
|
|
17186
|
+
const [legs, setLegs] = (0, import_react107.useState)(() => legsForTotal(grid, nearest(totals, initialTotal), clampLegs(legChoices, initialLegs)));
|
|
17187
|
+
const [announcement, setAnnouncement] = (0, import_react107.useState)("");
|
|
17109
17188
|
const cell2 = findCombo(grid, total, legs);
|
|
17110
17189
|
const minLegs = legChoices[0] ?? legs;
|
|
17111
17190
|
const maxLegs = legChoices[legChoices.length - 1] ?? legs;
|
|
@@ -17144,7 +17223,7 @@ function FavouritesSheet({ ui, controller, sport, sports, onSportChange, onClose
|
|
|
17144
17223
|
}
|
|
17145
17224
|
|
|
17146
17225
|
// src/components/dashboard/v8/SentenceBuilder.tsx
|
|
17147
|
-
var
|
|
17226
|
+
var import_react108 = require("react");
|
|
17148
17227
|
var import_jsx_runtime141 = require("react/jsx-runtime");
|
|
17149
17228
|
var TOTALS = ["any", "3", "5", "10", "20", "50"];
|
|
17150
17229
|
var BASE_LEGS = [1, 2, 3, 4];
|
|
@@ -17170,8 +17249,8 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
17170
17249
|
const opening = openingGames(preset);
|
|
17171
17250
|
const gamesOptions = opening.options;
|
|
17172
17251
|
const marketOptions = usableMarkets(preset);
|
|
17173
|
-
const [fingerprint] = (0,
|
|
17174
|
-
const [saved] = (0,
|
|
17252
|
+
const [fingerprint] = (0, import_react108.useState)(() => JSON.stringify(preset));
|
|
17253
|
+
const [saved] = (0, import_react108.useState)(() => {
|
|
17175
17254
|
const kept = memory3?.savedView(sport);
|
|
17176
17255
|
return kept && kept.fingerprint === fingerprint ? kept : null;
|
|
17177
17256
|
});
|
|
@@ -17185,9 +17264,9 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
17185
17264
|
// The server never widens by itself: an all-games preset with no ids asks for it.
|
|
17186
17265
|
widen: opening.option ? opening.option.matchIds.length === 0 : preset.gamesScope === "all" && preset.matchIds.length === 0
|
|
17187
17266
|
};
|
|
17188
|
-
const [view, setView] = (0,
|
|
17189
|
-
const autoWidened = (0,
|
|
17190
|
-
const [widenedNote, setWidenedNote] = (0,
|
|
17267
|
+
const [view, setView] = (0, import_react108.useState)(() => saved?.view ?? openingView);
|
|
17268
|
+
const autoWidened = (0, import_react108.useRef)(false);
|
|
17269
|
+
const [widenedNote, setWidenedNote] = (0, import_react108.useState)(saved?.widenedNote ?? false);
|
|
17191
17270
|
const requestFor = (v) => ({
|
|
17192
17271
|
sport,
|
|
17193
17272
|
...v.marketKey !== null ? { marketKey: v.marketKey } : {},
|
|
@@ -17199,10 +17278,10 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
17199
17278
|
...operatorUserId ? { operatorUserId } : {},
|
|
17200
17279
|
...anonymousUserId ? { anonymousUserId } : {}
|
|
17201
17280
|
});
|
|
17202
|
-
const [first] = (0,
|
|
17281
|
+
const [first] = (0, import_react108.useState)(() => requestFor(view));
|
|
17203
17282
|
const { grid, status: status2, confirmed, request } = useBuilderGrid({ conversation, locale: ui.hostTag, memory: memory3, initial: first });
|
|
17204
|
-
const lastRequest = (0,
|
|
17205
|
-
(0,
|
|
17283
|
+
const lastRequest = (0, import_react108.useRef)(first);
|
|
17284
|
+
(0, import_react108.useEffect)(() => {
|
|
17206
17285
|
void request(lastRequest.current);
|
|
17207
17286
|
}, [request]);
|
|
17208
17287
|
const send = (req) => {
|
|
@@ -17226,7 +17305,7 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
17226
17305
|
ask(next);
|
|
17227
17306
|
};
|
|
17228
17307
|
const canNarrow = preset.matchIds.length > 0;
|
|
17229
|
-
const suggested = grid?.status === "miss" ? grid.legCountThatLands : null;
|
|
17308
|
+
const suggested = grid?.status === "miss" || grid?.nearest === true ? grid.legCountThatLands : null;
|
|
17230
17309
|
const legButtons = Array.from(/* @__PURE__ */ new Set([
|
|
17231
17310
|
...BASE_LEGS,
|
|
17232
17311
|
...[preset.legs, suggested].filter((n) => n !== null && n > 4)
|
|
@@ -17235,14 +17314,14 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
17235
17314
|
const rows = ready && grid.status === "ok" ? legsOf(grid, sport) : null;
|
|
17236
17315
|
const rowSlip = rows ? guardLegsPreMatch(slip, rows, ui) : slip;
|
|
17237
17316
|
useNextKickoffRender(rows ? rows.map((l) => l.kickoffUtc) : []);
|
|
17238
|
-
const [startedNote, setStartedNote] = (0,
|
|
17317
|
+
const [startedNote, setStartedNote] = (0, import_react108.useState)(false);
|
|
17239
17318
|
const anyStarted = rows !== null && rows.some((l) => !preMatchOpen(l.kickoffUtc, Date.now()));
|
|
17240
|
-
(0,
|
|
17319
|
+
(0, import_react108.useEffect)(() => {
|
|
17241
17320
|
if (startedNote && status2 === "ready" && !anyStarted) setStartedNote(false);
|
|
17242
17321
|
}, [startedNote, status2, anyStarted]);
|
|
17243
17322
|
const market = rows?.[0]?.market;
|
|
17244
|
-
const [seen2, setSeen] = (0,
|
|
17245
|
-
(0,
|
|
17323
|
+
const [seen2, setSeen] = (0, import_react108.useState)(null);
|
|
17324
|
+
(0, import_react108.useEffect)(() => {
|
|
17246
17325
|
if (market) setSeen(market);
|
|
17247
17326
|
}, [market]);
|
|
17248
17327
|
const marketName = view.marketKey === null ? null : marketOptions?.find((m) => m.key === view.marketKey)?.label ?? market ?? seen2;
|
|
@@ -17255,14 +17334,14 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
17255
17334
|
const quotedAt = rows ? oldestQuote(rows) : null;
|
|
17256
17335
|
const combo = ready && grid.total !== null ? { sport, totalChosen: view.total, totalActual: grid.total } : void 0;
|
|
17257
17336
|
const canWiden = gamesOptions === null || allGames !== null;
|
|
17258
|
-
(0,
|
|
17337
|
+
(0, import_react108.useEffect)(() => {
|
|
17259
17338
|
if (!empty2 || !singles || widened || !canWiden || autoWidened.current) return;
|
|
17260
17339
|
autoWidened.current = true;
|
|
17261
17340
|
const next = { ...view, widen: true, matchIds: [], gamesId: allGames ? allGames.id : view.gamesId };
|
|
17262
17341
|
commit(next, true);
|
|
17263
17342
|
send(requestFor(next));
|
|
17264
17343
|
}, [empty2, singles, widened, canWiden, view]);
|
|
17265
|
-
(0,
|
|
17344
|
+
(0, import_react108.useEffect)(() => {
|
|
17266
17345
|
if (coolOff) onCoolOff?.(sport);
|
|
17267
17346
|
}, [coolOff, onCoolOff, sport]);
|
|
17268
17347
|
if (coolOff) return null;
|
|
@@ -17367,7 +17446,9 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
17367
17446
|
] }) : null,
|
|
17368
17447
|
rows && rows.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_jsx_runtime141.Fragment, { children: [
|
|
17369
17448
|
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "ss-w-v8-builder-rows", children: [
|
|
17449
|
+
grid?.nearest === true ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("p", { className: "ss-w-v8-builder-note", "data-kind": "nearest", children: ui.v8Nearest }) : null,
|
|
17370
17450
|
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)("ol", { className: "ss-w-combo-legs", role: "list", children: rows.map((leg) => /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(ComboLegRow, { leg, addToSlipEnabled: !!slip.onAddToSlip, ui, slip: rowSlip, hold: !confirmed, closed: !preMatchOpen(leg.kickoffUtc, Date.now()) }, leg.key)) }),
|
|
17451
|
+
grid && grid.requestedLegs > 1 && grid.total !== null && grid.totalFormats !== null && grid.multiplication !== null ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", { className: "ss-w-combo-math", children: oddsFormat === "decimal" ? grid.multiplication : formatOdds(grid.totalFormats, oddsFormat) }) : null,
|
|
17371
17452
|
grid && grid.requestedLegs > 1 ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(AddAllToSlipButton, { legs: rows, slip: rowSlip, ui, labels: { add: ui.v8AddAll, done: ui.allInSlip }, combo, sizeless: true, hold: !confirmed, onStartedGame: () => {
|
|
17372
17453
|
setStartedNote(true);
|
|
17373
17454
|
void request(lastRequest.current);
|
|
@@ -17665,10 +17746,10 @@ function Squad({ squad, loading, ui, view, onToggleView, stats, statsLoading, se
|
|
|
17665
17746
|
}
|
|
17666
17747
|
|
|
17667
17748
|
// src/components/PlayerPhoto.tsx
|
|
17668
|
-
var
|
|
17749
|
+
var import_react109 = require("react");
|
|
17669
17750
|
var import_jsx_runtime147 = require("react/jsx-runtime");
|
|
17670
17751
|
function PlayerPhoto({ photoUrl, jerseyNumber, size }) {
|
|
17671
|
-
const [failed, setFailed] = (0,
|
|
17752
|
+
const [failed, setFailed] = (0, import_react109.useState)(false);
|
|
17672
17753
|
const box = { width: size, height: size };
|
|
17673
17754
|
if (photoUrl && !failed) {
|
|
17674
17755
|
return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("img", { className: "ss-w-pd-photo", style: box, src: photoUrl, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
@@ -17703,7 +17784,7 @@ function MiniPitch({ positionCode }) {
|
|
|
17703
17784
|
}
|
|
17704
17785
|
|
|
17705
17786
|
// src/components/PerformanceBars.tsx
|
|
17706
|
-
var
|
|
17787
|
+
var import_react110 = require("react");
|
|
17707
17788
|
var import_jsx_runtime149 = require("react/jsx-runtime");
|
|
17708
17789
|
var GROUPS = ["shooting", "passing", "possession", "defending"];
|
|
17709
17790
|
function finite4(v) {
|
|
@@ -17749,7 +17830,7 @@ function unrankedLine(ui, reason) {
|
|
|
17749
17830
|
}
|
|
17750
17831
|
}
|
|
17751
17832
|
function PerformanceBars({ performance, competitionName, strings }) {
|
|
17752
|
-
const [mode, setMode] = (0,
|
|
17833
|
+
const [mode, setMode] = (0, import_react110.useState)("total");
|
|
17753
17834
|
const labelled = performance.metrics.filter((m) => Object.prototype.hasOwnProperty.call(strings.perfMetric, m.key));
|
|
17754
17835
|
if (!labelled.some((m) => valueOf(m, "total") !== null || valueOf(m, "per90") !== null)) return null;
|
|
17755
17836
|
const subtitle = !performance.ranked ? unrankedLine(strings, performance.unrankedReason) : competitionName ? strings.perfRankedAgainst(competitionName, performance.positionGroup) : null;
|
|
@@ -17958,8 +18039,8 @@ function SettingsSheet({ ui, onClose }) {
|
|
|
17958
18039
|
var import_jsx_runtime152 = require("react/jsx-runtime");
|
|
17959
18040
|
var FULLSCREEN_QUERY = "(max-width: 639px)";
|
|
17960
18041
|
function useIsModal() {
|
|
17961
|
-
const [modal, setModal] = (0,
|
|
17962
|
-
(0,
|
|
18042
|
+
const [modal, setModal] = (0, import_react111.useState)(false);
|
|
18043
|
+
(0, import_react111.useEffect)(() => {
|
|
17963
18044
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
|
|
17964
18045
|
const mql = window.matchMedia(FULLSCREEN_QUERY);
|
|
17965
18046
|
const sync = () => setModal(mql.matches);
|
|
@@ -17973,12 +18054,12 @@ var HIDDEN_LAYER_STYLE = { position: "absolute", inset: 0, visibility: "hidden",
|
|
|
17973
18054
|
var SQUAD_LAYER_STYLE = { display: "flex", flexDirection: "column", flex: 1, minHeight: 0 };
|
|
17974
18055
|
function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, schedule, gamesResult, leaderboardResult, clubFixturesResult, clubStandingsResult, clubSquadResult, clubSquadStatsResult, clubPlayerDetailResult, loggedIn, conversation, presetGrid, favouritesEnabled, favourites, builder, onCloseRequested, onRegisterBack }) {
|
|
17975
18056
|
const { state, close, stop, send, reset } = controller;
|
|
17976
|
-
const [squadView, setSquadView] = (0,
|
|
17977
|
-
const [selectedPlayerId, setSelectedPlayerId] = (0,
|
|
18057
|
+
const [squadView, setSquadView] = (0, import_react111.useState)("roster");
|
|
18058
|
+
const [selectedPlayerId, setSelectedPlayerId] = (0, import_react111.useState)(null);
|
|
17978
18059
|
const clearPlayerDetail = clubPlayerDetailResult?.clear;
|
|
17979
18060
|
const fetchPlayerDetail = clubPlayerDetailResult?.fetch;
|
|
17980
|
-
const squadLayerRef = (0,
|
|
17981
|
-
const squadScrollRef = (0,
|
|
18061
|
+
const squadLayerRef = (0, import_react111.useRef)(null);
|
|
18062
|
+
const squadScrollRef = (0, import_react111.useRef)(null);
|
|
17982
18063
|
const selectPlayer = (playerId) => {
|
|
17983
18064
|
squadScrollRef.current = squadLayerRef.current?.querySelector(".ss-w-mon-list")?.scrollTop ?? null;
|
|
17984
18065
|
setSelectedPlayerId(playerId);
|
|
@@ -17988,7 +18069,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
|
|
|
17988
18069
|
setSelectedPlayerId(null);
|
|
17989
18070
|
clearPlayerDetail?.();
|
|
17990
18071
|
};
|
|
17991
|
-
(0,
|
|
18072
|
+
(0, import_react111.useLayoutEffect)(() => {
|
|
17992
18073
|
if (selectedPlayerId !== null || squadScrollRef.current === null) return;
|
|
17993
18074
|
const list = squadLayerRef.current?.querySelector(".ss-w-mon-list");
|
|
17994
18075
|
if (list) list.scrollTop = squadScrollRef.current;
|
|
@@ -18001,7 +18082,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
|
|
|
18001
18082
|
const hasBuilder = !clubBrand && (builderOptions?.length ?? 0) > 0;
|
|
18002
18083
|
const tabs = monitor ?? (hasBuilder ? tabState : void 0);
|
|
18003
18084
|
const activeTab = tabs?.activeTab;
|
|
18004
|
-
(0,
|
|
18085
|
+
(0, import_react111.useEffect)(() => {
|
|
18005
18086
|
if (activeTab === "squad" || selectedPlayerId === null) return;
|
|
18006
18087
|
setSelectedPlayerId(null);
|
|
18007
18088
|
clearPlayerDetail?.();
|
|
@@ -18010,11 +18091,11 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
|
|
|
18010
18091
|
const favouritesOpen = favouritesOffered && (favourites?.open ?? false);
|
|
18011
18092
|
const favouritesAskedOpen = favourites?.open ?? false;
|
|
18012
18093
|
const setFavouritesOpen = favourites?.onOpenChange;
|
|
18013
|
-
(0,
|
|
18094
|
+
(0, import_react111.useEffect)(() => {
|
|
18014
18095
|
if (favouritesAskedOpen && !favouritesOffered) setFavouritesOpen?.(false);
|
|
18015
18096
|
}, [favouritesAskedOpen, favouritesOffered, setFavouritesOpen]);
|
|
18016
18097
|
const storedTab = tabState?.activeTab;
|
|
18017
|
-
(0,
|
|
18098
|
+
(0, import_react111.useEffect)(() => {
|
|
18018
18099
|
const unreachable = storedTab === "builder" ? !hasBuilder : !monitor && storedTab !== void 0 && storedTab !== "chat";
|
|
18019
18100
|
if (unreachable) setMonitorTab?.("chat");
|
|
18020
18101
|
}, [storedTab, hasBuilder, monitor, setMonitorTab]);
|
|
@@ -18023,12 +18104,12 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
|
|
|
18023
18104
|
const closeTab = tabs?.activeTab ?? "chat";
|
|
18024
18105
|
const lastMessage = state.messages[state.messages.length - 1];
|
|
18025
18106
|
const answering = state.isStreaming && !(lastMessage?.role === "assistant" && lastMessage.isGreeting);
|
|
18026
|
-
const closeWith = (0,
|
|
18107
|
+
const closeWith = (0, import_react111.useCallback)((method) => {
|
|
18027
18108
|
track({ name: "widget_close", method, tab: closeTab, answering });
|
|
18028
18109
|
if (onCloseRequested) onCloseRequested();
|
|
18029
18110
|
else close();
|
|
18030
18111
|
}, [track, closeTab, answering, close, onCloseRequested]);
|
|
18031
|
-
(0,
|
|
18112
|
+
(0, import_react111.useEffect)(() => {
|
|
18032
18113
|
const onKey = (e) => {
|
|
18033
18114
|
if (e.key === "Escape") closeWith("escape");
|
|
18034
18115
|
};
|
|
@@ -18044,80 +18125,80 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
|
|
|
18044
18125
|
tabs?.setActiveTab("chat");
|
|
18045
18126
|
send(text2, { grounding, source });
|
|
18046
18127
|
};
|
|
18047
|
-
(0,
|
|
18128
|
+
(0, import_react111.useEffect)(() => {
|
|
18048
18129
|
if (monitor && monitor.activeTab !== "chat" && state.isStreaming) monitor.markChatActivity();
|
|
18049
18130
|
}, [monitor, state.isStreaming, state.messages.length]);
|
|
18050
18131
|
const onChatTab = !tabs || tabs.activeTab === "chat";
|
|
18051
|
-
const inputRef = (0,
|
|
18052
|
-
const limitRef = (0,
|
|
18053
|
-
const typedSendRef = (0,
|
|
18054
|
-
const focusAfterCloseRef = (0,
|
|
18055
|
-
const [tool, setTool] = (0,
|
|
18056
|
-
const panelRef = (0,
|
|
18132
|
+
const inputRef = (0, import_react111.useRef)(null);
|
|
18133
|
+
const limitRef = (0, import_react111.useRef)(null);
|
|
18134
|
+
const typedSendRef = (0, import_react111.useRef)(false);
|
|
18135
|
+
const focusAfterCloseRef = (0, import_react111.useRef)(null);
|
|
18136
|
+
const [tool, setTool] = (0, import_react111.useState)(null);
|
|
18137
|
+
const panelRef = (0, import_react111.useRef)(null);
|
|
18057
18138
|
const settings = useOddsSettings();
|
|
18058
|
-
const [settingsOpen, setSettingsOpen] = (0,
|
|
18139
|
+
const [settingsOpen, setSettingsOpen] = (0, import_react111.useState)(false);
|
|
18059
18140
|
const hasSettings = settings.oddsOffered || !settings.themeLocked;
|
|
18060
|
-
const openSettings = (0,
|
|
18141
|
+
const openSettings = (0, import_react111.useCallback)(() => {
|
|
18061
18142
|
setTool(null);
|
|
18062
18143
|
setFavouritesOpen?.(false);
|
|
18063
18144
|
setSettingsOpen(true);
|
|
18064
18145
|
}, [setFavouritesOpen]);
|
|
18065
|
-
const closeSettings = (0,
|
|
18146
|
+
const closeSettings = (0, import_react111.useCallback)(() => {
|
|
18066
18147
|
setSettingsOpen(false);
|
|
18067
18148
|
panelRef.current?.querySelector(".ss-w-kebab")?.focus();
|
|
18068
18149
|
}, []);
|
|
18069
|
-
const openFavourites = (0,
|
|
18070
|
-
const closeFavourites = (0,
|
|
18150
|
+
const openFavourites = (0, import_react111.useCallback)(() => setFavouritesOpen?.(true), [setFavouritesOpen]);
|
|
18151
|
+
const closeFavourites = (0, import_react111.useCallback)(() => {
|
|
18071
18152
|
setFavouritesOpen?.(false);
|
|
18072
18153
|
panelRef.current?.querySelector(".ss-w-kebab")?.focus();
|
|
18073
18154
|
}, [setFavouritesOpen]);
|
|
18074
|
-
(0,
|
|
18155
|
+
(0, import_react111.useEffect)(() => {
|
|
18075
18156
|
if (!favouritesOpen) return;
|
|
18076
18157
|
setTool(null);
|
|
18077
18158
|
setSettingsOpen(false);
|
|
18078
18159
|
}, [favouritesOpen]);
|
|
18079
18160
|
const paused = isPaused(state.limit);
|
|
18080
|
-
(0,
|
|
18161
|
+
(0, import_react111.useEffect)(() => {
|
|
18081
18162
|
if (paused) setTool(null);
|
|
18082
18163
|
}, [paused]);
|
|
18083
|
-
(0,
|
|
18164
|
+
(0, import_react111.useEffect)(() => {
|
|
18084
18165
|
if (!paused) return;
|
|
18085
18166
|
if (typedSendRef.current) limitRef.current?.focus();
|
|
18086
18167
|
typedSendRef.current = false;
|
|
18087
18168
|
}, [paused]);
|
|
18088
|
-
const openTool = (0,
|
|
18169
|
+
const openTool = (0, import_react111.useCallback)((next) => {
|
|
18089
18170
|
setTool(next);
|
|
18090
18171
|
}, []);
|
|
18091
|
-
const toolsValue = (0,
|
|
18172
|
+
const toolsValue = (0, import_react111.useMemo)(
|
|
18092
18173
|
() => presetGrid && !paused ? { openBuilder: (total, legs) => openTool({ total, legs }), changeLabel: ui.presets.changeCombo } : null,
|
|
18093
18174
|
[presetGrid, paused, openTool, ui.presets.changeCombo]
|
|
18094
18175
|
);
|
|
18095
|
-
const closeTool = (0,
|
|
18176
|
+
const closeTool = (0, import_react111.useCallback)(() => {
|
|
18096
18177
|
focusAfterCloseRef.current = "composer";
|
|
18097
18178
|
setTool(null);
|
|
18098
18179
|
}, []);
|
|
18099
|
-
const sendAsk = (0,
|
|
18180
|
+
const sendAsk = (0, import_react111.useCallback)((ask) => {
|
|
18100
18181
|
focusAfterCloseRef.current = "composer";
|
|
18101
18182
|
setTool(null);
|
|
18102
18183
|
tabs?.setActiveTab("chat");
|
|
18103
18184
|
send(ask.message, { displayText: ask.displayText, preset: ask.preset, source: "preset" });
|
|
18104
18185
|
}, [tabs, send]);
|
|
18105
|
-
const formatKickoff = (0,
|
|
18186
|
+
const formatKickoff = (0, import_react111.useCallback)((kickoffUtc) => {
|
|
18106
18187
|
const k = ui.bettingKickoff(kickoffUtc);
|
|
18107
18188
|
return `${k.dayLabel} ${k.time}`;
|
|
18108
18189
|
}, [ui]);
|
|
18109
|
-
(0,
|
|
18190
|
+
(0, import_react111.useEffect)(() => {
|
|
18110
18191
|
if (tool) return;
|
|
18111
18192
|
const target = focusAfterCloseRef.current;
|
|
18112
18193
|
focusAfterCloseRef.current = null;
|
|
18113
18194
|
if (target === "composer") inputRef.current?.focus();
|
|
18114
18195
|
}, [tool]);
|
|
18115
|
-
(0,
|
|
18196
|
+
(0, import_react111.useEffect)(() => {
|
|
18116
18197
|
if (!tool || onChatTab && presetGrid) return;
|
|
18117
18198
|
focusAfterCloseRef.current = "composer";
|
|
18118
18199
|
setTool(null);
|
|
18119
18200
|
}, [tool, onChatTab, presetGrid]);
|
|
18120
|
-
const backRef = (0,
|
|
18201
|
+
const backRef = (0, import_react111.useRef)(() => false);
|
|
18121
18202
|
backRef.current = () => {
|
|
18122
18203
|
if (favouritesOpen) {
|
|
18123
18204
|
closeFavourites();
|
|
@@ -18141,7 +18222,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
|
|
|
18141
18222
|
}
|
|
18142
18223
|
return false;
|
|
18143
18224
|
};
|
|
18144
|
-
(0,
|
|
18225
|
+
(0, import_react111.useEffect)(() => {
|
|
18145
18226
|
if (!onRegisterBack) return;
|
|
18146
18227
|
onRegisterBack(() => backRef.current());
|
|
18147
18228
|
return () => onRegisterBack(null);
|
|
@@ -21100,6 +21181,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
21100
21181
|
|
|
21101
21182
|
// src/StatsWidget.tsx
|
|
21102
21183
|
var import_jsx_runtime154 = require("react/jsx-runtime");
|
|
21184
|
+
var NO_OWNER = {};
|
|
21103
21185
|
function buildClient(props) {
|
|
21104
21186
|
try {
|
|
21105
21187
|
if ("client" in props && props.client) {
|
|
@@ -21124,12 +21206,12 @@ function injectStyles(root) {
|
|
|
21124
21206
|
function StatsWidget(props) {
|
|
21125
21207
|
const injectedClient = "client" in props ? props.client : void 0;
|
|
21126
21208
|
const cfg = props.config;
|
|
21127
|
-
const built = (0,
|
|
21128
|
-
const trackingRef = (0,
|
|
21129
|
-
const track = (0,
|
|
21130
|
-
const eventTextRef = (0,
|
|
21209
|
+
const built = (0, import_react112.useMemo)(() => buildClient(props), [injectedClient, cfg?.operatorId, cfg?.publicKey, cfg?.baseUrl]);
|
|
21210
|
+
const trackingRef = (0, import_react112.useRef)({ envelope: { operatorId: "", widgetVersion: WIDGET_REACT_VERSION } });
|
|
21211
|
+
const track = (0, import_react112.useMemo)(() => createTracker(() => trackingRef.current), []);
|
|
21212
|
+
const eventTextRef = (0, import_react112.useRef)(false);
|
|
21131
21213
|
eventTextRef.current = cfg?.eventText === true;
|
|
21132
|
-
const logger = (0,
|
|
21214
|
+
const logger = (0, import_react112.useMemo)(() => {
|
|
21133
21215
|
if (!built) return null;
|
|
21134
21216
|
const raw = built.client.createEventLogger({
|
|
21135
21217
|
operatorUserId: cfg?.userContext?.operatorUserId,
|
|
@@ -21139,27 +21221,27 @@ function StatsWidget(props) {
|
|
|
21139
21221
|
}, [built?.client, track]);
|
|
21140
21222
|
const widgetStrings = useWidgetStrings(cfg, built?.conversation ?? null);
|
|
21141
21223
|
const stringsPending = widgetStrings.strings === void 0;
|
|
21142
|
-
const ui = (0,
|
|
21224
|
+
const ui = (0, import_react112.useMemo)(
|
|
21143
21225
|
() => normalizeUi(props.config ?? { operatorId: "", publicKey: "" }, widgetStrings.strings ?? BUNDLED),
|
|
21144
21226
|
[props.config, widgetStrings.strings]
|
|
21145
21227
|
);
|
|
21146
21228
|
const oddsSettings = useOddsSettingsState(ui, built?.conversation, cfg?.operatorId || "default");
|
|
21147
|
-
const rootRef = (0,
|
|
21148
|
-
const introDoneRef = (0,
|
|
21149
|
-
const markIntroDone = (0,
|
|
21229
|
+
const rootRef = (0, import_react112.useRef)(null);
|
|
21230
|
+
const introDoneRef = (0, import_react112.useRef)(false);
|
|
21231
|
+
const markIntroDone = (0, import_react112.useCallback)(() => {
|
|
21150
21232
|
introDoneRef.current = true;
|
|
21151
21233
|
}, []);
|
|
21152
21234
|
const language = injectedClient ? void 0 : hostTag(cfg);
|
|
21153
21235
|
const threadLanguage = familyOf(language);
|
|
21154
21236
|
const convStorageKey = `ss-w-conv:${cfg?.operatorId ?? ""}:${cfg?.userContext?.operatorUserId ?? "anon"}${threadLanguage ? `:lang=${threadLanguage}` : ""}`;
|
|
21155
|
-
const sportScope = (0,
|
|
21237
|
+
const sportScope = (0, import_react112.useMemo)(
|
|
21156
21238
|
() => ({ operatorId: cfg?.operatorId ?? "", operatorUserId: cfg?.userContext?.operatorUserId, anonymousUserId: cfg?.userContext?.anonymousUserId }),
|
|
21157
21239
|
[cfg?.operatorId, cfg?.userContext?.operatorUserId, cfg?.userContext?.anonymousUserId]
|
|
21158
21240
|
);
|
|
21159
|
-
const chatTracking = (0,
|
|
21241
|
+
const chatTracking = (0, import_react112.useMemo)(() => ({ track, eventText: () => eventTextRef.current }), [track]);
|
|
21160
21242
|
const controller = useChatStream(built?.conversation ?? emptyConversation(), ui.starters, built ? ui.greetingMessage : void 0, convStorageKey, cfg?.page, sportScope, language, chatTracking, injectedClient ? oddsSettings.userOddsFormat : oddsSettings.oddsFormat);
|
|
21161
21243
|
const panelOpen = controller.state.isOpen && !stringsPending;
|
|
21162
|
-
const liveCardWatches = (0,
|
|
21244
|
+
const liveCardWatches = (0, import_react112.useMemo)(() => {
|
|
21163
21245
|
const seen2 = /* @__PURE__ */ new Set();
|
|
21164
21246
|
const out = [];
|
|
21165
21247
|
for (const msg of controller.state.messages) {
|
|
@@ -21185,19 +21267,19 @@ function StatsWidget(props) {
|
|
|
21185
21267
|
});
|
|
21186
21268
|
const operatorUserId = cfg?.userContext?.operatorUserId;
|
|
21187
21269
|
const anonymousUserId = cfg?.userContext?.anonymousUserId;
|
|
21188
|
-
const getSchedule = (0,
|
|
21270
|
+
const getSchedule = (0, import_react112.useCallback)(
|
|
21189
21271
|
(localDate, utcOffsetMinutes) => built ? built.conversation.getSchedule(localDate, utcOffsetMinutes, operatorUserId, anonymousUserId) : Promise.resolve(null),
|
|
21190
21272
|
[built, operatorUserId, anonymousUserId]
|
|
21191
21273
|
);
|
|
21192
|
-
const getStates = (0,
|
|
21274
|
+
const getStates = (0, import_react112.useCallback)(
|
|
21193
21275
|
(matchIds, nbaGameIds, nflGameIds, tennisMatches) => built ? built.conversation.getStates(matchIds, nbaGameIds, nflGameIds, requestTag, tennisMatches) : Promise.resolve(null),
|
|
21194
21276
|
[built, requestTag]
|
|
21195
21277
|
);
|
|
21196
|
-
const getTennisPrices = (0,
|
|
21278
|
+
const getTennisPrices = (0, import_react112.useCallback)(
|
|
21197
21279
|
(keys) => built ? built.conversation.getStates([], [], [], requestTag, [], keys).then((p) => p?.tennisPrices ?? null) : Promise.resolve(null),
|
|
21198
21280
|
[built, requestTag]
|
|
21199
21281
|
);
|
|
21200
|
-
const pinnedMatchIds = (0,
|
|
21282
|
+
const pinnedMatchIds = (0, import_react112.useMemo)(
|
|
21201
21283
|
() => footballMatchPinIds(monitor.pins),
|
|
21202
21284
|
[monitor.pins]
|
|
21203
21285
|
);
|
|
@@ -21211,13 +21293,13 @@ function StatsWidget(props) {
|
|
|
21211
21293
|
pinnedMatchIds,
|
|
21212
21294
|
timeZone: ui.timeZone
|
|
21213
21295
|
});
|
|
21214
|
-
const offeredSports = (0,
|
|
21296
|
+
const offeredSports = (0, import_react112.useMemo)(() => {
|
|
21215
21297
|
const seen2 = new Set(discovery.matchDays.map((d) => d.sport));
|
|
21216
21298
|
for (const g of discovery.groups) seen2.add(g.sport ?? "football");
|
|
21217
21299
|
return [...seen2];
|
|
21218
21300
|
}, [discovery.matchDays, discovery.groups]);
|
|
21219
21301
|
const scheduleSport = useScheduleSport(offeredSports);
|
|
21220
|
-
const [liveLeague, setLiveLeague] = (0,
|
|
21302
|
+
const [liveLeague, setLiveLeague] = (0, import_react112.useState)(null);
|
|
21221
21303
|
const [matchesDay, setMatchesDay] = useMatchesDayPick(discovery.localDate);
|
|
21222
21304
|
const matchesLoaded = useMatchesDay({
|
|
21223
21305
|
discovery,
|
|
@@ -21227,8 +21309,8 @@ function StatsWidget(props) {
|
|
|
21227
21309
|
enabled: panelOpen && monitor.activeTab === "matches",
|
|
21228
21310
|
timeZone: ui.timeZone
|
|
21229
21311
|
});
|
|
21230
|
-
const prevLiveSnapshotRef = (0,
|
|
21231
|
-
(0,
|
|
21312
|
+
const prevLiveSnapshotRef = (0, import_react112.useRef)(monitor.snapshot);
|
|
21313
|
+
(0, import_react112.useEffect)(() => {
|
|
21232
21314
|
const snap = monitor.snapshot;
|
|
21233
21315
|
if (!snap || snap === prevLiveSnapshotRef.current) return;
|
|
21234
21316
|
prevLiveSnapshotRef.current = snap;
|
|
@@ -21268,14 +21350,14 @@ function StatsWidget(props) {
|
|
|
21268
21350
|
const clubSquadResult = useClubSquad(built?.conversation ?? null, { activeTab: monitor.activeTab, enabled: clubFixturesResult.enabled });
|
|
21269
21351
|
const clubSquadStatsResult = useClubSquadStats(built?.conversation ?? null, { activeTab: monitor.activeTab, enabled: clubFixturesResult.enabled });
|
|
21270
21352
|
const clubPlayerDetailResult = useClubPlayerDetail(built?.conversation ?? null);
|
|
21271
|
-
const [favSportPick, setFavSportPick] = (0,
|
|
21272
|
-
const latestGreeting = (0,
|
|
21353
|
+
const [favSportPick, setFavSportPick] = (0, import_react112.useState)(null);
|
|
21354
|
+
const latestGreeting = (0, import_react112.useMemo)(() => {
|
|
21273
21355
|
for (const m of [...controller.state.messages].reverse()) {
|
|
21274
21356
|
if (m.role === "assistant" && m.defaultSport !== void 0) return m;
|
|
21275
21357
|
}
|
|
21276
21358
|
return null;
|
|
21277
21359
|
}, [controller.state.messages]);
|
|
21278
|
-
const favSportOptions = (0,
|
|
21360
|
+
const favSportOptions = (0, import_react112.useMemo)(
|
|
21279
21361
|
() => (switchSets(latestGreeting?.greetingDashboards) ?? []).map((set) => ({ sport: set.sport, label: set.label })),
|
|
21280
21362
|
[latestGreeting]
|
|
21281
21363
|
);
|
|
@@ -21284,20 +21366,20 @@ function StatsWidget(props) {
|
|
|
21284
21366
|
const favSport = [favSportPick, rememberedSport, latestGreeting?.defaultSport].find(offered) ?? "football";
|
|
21285
21367
|
const favSports = favSportOptions.length > 0 ? favSportOptions : [{ sport: favSport, label: sportLabel(ui, favSport) }];
|
|
21286
21368
|
const hasFavouritesIdentity = !!(operatorUserId || anonymousUserId);
|
|
21287
|
-
const [builderSportPick, setBuilderSportPick] = (0,
|
|
21288
|
-
const builderGreeting = (0,
|
|
21369
|
+
const [builderSportPick, setBuilderSportPick] = (0, import_react112.useState)(null);
|
|
21370
|
+
const builderGreeting = (0, import_react112.useMemo)(
|
|
21289
21371
|
() => [...controller.state.messages].reverse().find((m) => m.role === "assistant" && (m.greetingDashboard !== void 0 || m.greetingDashboards !== void 0)) ?? null,
|
|
21290
21372
|
[controller.state.messages]
|
|
21291
21373
|
);
|
|
21292
|
-
const [coolOff, setCoolOff] = (0,
|
|
21293
|
-
const onBuilderCoolOff = (0,
|
|
21374
|
+
const [coolOff, setCoolOff] = (0, import_react112.useState)(null);
|
|
21375
|
+
const onBuilderCoolOff = (0, import_react112.useCallback)((sport) => {
|
|
21294
21376
|
if (!builderGreeting) return;
|
|
21295
21377
|
setCoolOff((prev) => {
|
|
21296
21378
|
const sports = prev?.greeting === builderGreeting ? prev.sports : [];
|
|
21297
21379
|
return sports.includes(sport) ? prev : { greeting: builderGreeting, sports: [...sports, sport] };
|
|
21298
21380
|
});
|
|
21299
21381
|
}, [builderGreeting]);
|
|
21300
|
-
const builderOptions = (0,
|
|
21382
|
+
const builderOptions = (0, import_react112.useMemo)(() => {
|
|
21301
21383
|
const greeting = builderGreeting;
|
|
21302
21384
|
if (!greeting) return [];
|
|
21303
21385
|
const cooled = coolOff?.greeting === greeting ? coolOff.sports : [];
|
|
@@ -21310,7 +21392,7 @@ function StatsWidget(props) {
|
|
|
21310
21392
|
return options.filter((o) => !cooled.includes(o.sport));
|
|
21311
21393
|
}, [builderGreeting, coolOff, ui]);
|
|
21312
21394
|
const builderSport = [builderSportPick, rememberedSport, latestGreeting?.defaultSport].find((s) => !!s && builderOptions.some((o) => o.sport === s)) ?? builderOptions[0]?.sport ?? "";
|
|
21313
|
-
const [panelEverOpened, setPanelEverOpened] = (0,
|
|
21395
|
+
const [panelEverOpened, setPanelEverOpened] = (0, import_react112.useState)(panelOpen);
|
|
21314
21396
|
if (panelOpen && !panelEverOpened) setPanelEverOpened(true);
|
|
21315
21397
|
const favourites = useFavourites({
|
|
21316
21398
|
conversation: built?.conversation ?? null,
|
|
@@ -21322,16 +21404,16 @@ function StatsWidget(props) {
|
|
|
21322
21404
|
onChanged: discovery.refreshSchedule
|
|
21323
21405
|
});
|
|
21324
21406
|
const favouritesEnabled = hasFavouritesIdentity && favourites.status !== "refused";
|
|
21325
|
-
const [favouritesOpen, setFavouritesOpen] = (0,
|
|
21407
|
+
const [favouritesOpen, setFavouritesOpen] = (0, import_react112.useState)(false);
|
|
21326
21408
|
if (!panelOpen && favouritesOpen) setFavouritesOpen(false);
|
|
21327
|
-
const getPricePresets = (0,
|
|
21409
|
+
const getPricePresets = (0, import_react112.useCallback)(
|
|
21328
21410
|
(locale) => built ? built.conversation.getPricePresets(locale, { pool: "open" }) : Promise.resolve(null),
|
|
21329
21411
|
[built]
|
|
21330
21412
|
);
|
|
21331
21413
|
const presetGrid = usePresetGrid({ getPricePresets, isOpen: panelOpen, locale: ui.hostTag });
|
|
21332
21414
|
const markLiveActivity = monitor.markLiveActivity;
|
|
21333
|
-
const prevLiveCountRef = (0,
|
|
21334
|
-
(0,
|
|
21415
|
+
const prevLiveCountRef = (0, import_react112.useRef)(0);
|
|
21416
|
+
(0, import_react112.useEffect)(() => {
|
|
21335
21417
|
const rose = prevLiveCountRef.current === 0 && discovery.liveCount > 0;
|
|
21336
21418
|
prevLiveCountRef.current = discovery.liveCount;
|
|
21337
21419
|
if (rose) markLiveActivity();
|
|
@@ -21345,7 +21427,7 @@ function StatsWidget(props) {
|
|
|
21345
21427
|
closePanel: controller.close
|
|
21346
21428
|
});
|
|
21347
21429
|
const markAdded = hostEvents.markAdded;
|
|
21348
|
-
const slip = (0,
|
|
21430
|
+
const slip = (0, import_react112.useMemo)(
|
|
21349
21431
|
() => {
|
|
21350
21432
|
const handler = props.config?.onAddToSlip;
|
|
21351
21433
|
return {
|
|
@@ -21365,7 +21447,7 @@ function StatsWidget(props) {
|
|
|
21365
21447
|
},
|
|
21366
21448
|
[props.config?.onAddToSlip, props.config?.slipSports, controller.state.conversationId, markAdded]
|
|
21367
21449
|
);
|
|
21368
|
-
const onDashboardTap = (0,
|
|
21450
|
+
const onDashboardTap = (0, import_react112.useMemo)(
|
|
21369
21451
|
() => built ? createDashboardTapSignal((input) => built.conversation.sendSignal(input), logger) : void 0,
|
|
21370
21452
|
[built, logger]
|
|
21371
21453
|
);
|
|
@@ -21379,7 +21461,7 @@ function StatsWidget(props) {
|
|
|
21379
21461
|
log: logger
|
|
21380
21462
|
})
|
|
21381
21463
|
}));
|
|
21382
|
-
const dismissPopupRef = (0,
|
|
21464
|
+
const dismissPopupRef = (0, import_react112.useRef)(() => {
|
|
21383
21465
|
});
|
|
21384
21466
|
const mobile = useMobileBinding({
|
|
21385
21467
|
binding: props.mobile,
|
|
@@ -21392,11 +21474,17 @@ function StatsWidget(props) {
|
|
|
21392
21474
|
});
|
|
21393
21475
|
const dismissPopup = usePopupTelemetry(logger, panelOpen, controller.state.popupText, controller.dismissPopup, mobile.confirmedShown);
|
|
21394
21476
|
dismissPopupRef.current = dismissPopup;
|
|
21477
|
+
const greetingMeta = latestGreetingMeta(controller.state.messages);
|
|
21478
|
+
useBubbleGreetingShown(logger, logger ?? NO_OWNER, controller.state.popupText, props.mobile ? void 0 : greetingMeta, mobile.confirmedShown);
|
|
21479
|
+
const onBubbleClick = (0, import_react112.useCallback)(() => {
|
|
21480
|
+
if (!logger || !greetingMeta) return;
|
|
21481
|
+
logger.log({ name: "greeting_cta_click", greeting: { greetingId: greetingMeta.greetingId, case: greetingMeta.case, sport: greetingMeta.sport, market: greetingMeta.market ?? null } });
|
|
21482
|
+
}, [logger, greetingMeta]);
|
|
21395
21483
|
useOpenTelemetry(logger, panelOpen);
|
|
21396
|
-
const onControlRef = (0,
|
|
21484
|
+
const onControlRef = (0, import_react112.useRef)(props.onControl);
|
|
21397
21485
|
onControlRef.current = props.onControl;
|
|
21398
21486
|
const { open: openPanel, close: closePanel } = controller;
|
|
21399
|
-
(0,
|
|
21487
|
+
(0, import_react112.useEffect)(() => {
|
|
21400
21488
|
onControlRef.current?.({ open: openPanel, close: closePanel });
|
|
21401
21489
|
return () => onControlRef.current?.(null);
|
|
21402
21490
|
}, [openPanel, closePanel]);
|
|
@@ -21413,11 +21501,11 @@ function StatsWidget(props) {
|
|
|
21413
21501
|
page: cfg?.page
|
|
21414
21502
|
}
|
|
21415
21503
|
};
|
|
21416
|
-
(0,
|
|
21504
|
+
(0, import_react112.useEffect)(() => {
|
|
21417
21505
|
if (!logger) return;
|
|
21418
21506
|
logger.setIdentity({ operatorUserId, anonymousUserId, conversationId });
|
|
21419
21507
|
}, [logger, operatorUserId, anonymousUserId, conversationId]);
|
|
21420
|
-
(0,
|
|
21508
|
+
(0, import_react112.useEffect)(() => {
|
|
21421
21509
|
if (!logger) return;
|
|
21422
21510
|
logger.resume();
|
|
21423
21511
|
const onHide = () => {
|
|
@@ -21435,15 +21523,15 @@ function StatsWidget(props) {
|
|
|
21435
21523
|
logger.dispose();
|
|
21436
21524
|
};
|
|
21437
21525
|
}, [logger]);
|
|
21438
|
-
(0,
|
|
21526
|
+
(0, import_react112.useEffect)(() => {
|
|
21439
21527
|
if (!built || !ui.injectStyles || widgetStrings.state === "unavailable") return;
|
|
21440
21528
|
const node = rootRef.current?.getRootNode();
|
|
21441
21529
|
if (node) injectStyles(node);
|
|
21442
21530
|
}, [built, ui.injectStyles, widgetStrings.state]);
|
|
21443
21531
|
const holds = useSessionHolds();
|
|
21444
21532
|
const builderConversation = built?.conversation ?? null;
|
|
21445
|
-
const builderMemory = (0,
|
|
21446
|
-
const personalGreeting = (0,
|
|
21533
|
+
const builderMemory = (0, import_react112.useMemo)(() => createBuilderMemory(), [builderConversation, controller.state.threadEpoch]);
|
|
21534
|
+
const personalGreeting = (0, import_react112.useMemo)(() => ({
|
|
21447
21535
|
favourites: favouritesEnabled && monitor.enabled ? favourites : null,
|
|
21448
21536
|
conversation: built?.conversation ?? null,
|
|
21449
21537
|
openFavourites: () => setFavouritesOpen(true),
|
|
@@ -21505,7 +21593,8 @@ function StatsWidget(props) {
|
|
|
21505
21593
|
dismissLabel: ui.dismissGreeting,
|
|
21506
21594
|
introAllowed: !introDoneRef.current,
|
|
21507
21595
|
onIntroStart: markIntroDone,
|
|
21508
|
-
asks
|
|
21596
|
+
asks,
|
|
21597
|
+
onBubbleClick
|
|
21509
21598
|
}
|
|
21510
21599
|
) }) }) }) }) }) });
|
|
21511
21600
|
}
|