@sensiblestats/widget-react 0.61.3 → 0.63.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 +1135 -907
- 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 +1089 -861
- package/dist/index.js.map +1 -1
- package/dist/styles.css +68 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -36,7 +36,7 @@ __export(index_exports, {
|
|
|
36
36
|
module.exports = __toCommonJS(index_exports);
|
|
37
37
|
|
|
38
38
|
// src/StatsWidget.tsx
|
|
39
|
-
var
|
|
39
|
+
var import_react46 = require("react");
|
|
40
40
|
var import_widget_sdk5 = require("@sensiblestats/widget-sdk");
|
|
41
41
|
|
|
42
42
|
// src/kickoff.ts
|
|
@@ -126,6 +126,10 @@ var STRINGS = {
|
|
|
126
126
|
inSlipLabel: "In slip",
|
|
127
127
|
oddsUnavailable: "Odds unavailable right now",
|
|
128
128
|
momentumLabel: "Momentum",
|
|
129
|
+
liveFactLabel: "Live fact",
|
|
130
|
+
liveFactAsk: "Ask about this",
|
|
131
|
+
liveFactEarlier: (n) => `Earlier facts (${n})`,
|
|
132
|
+
liveFactHideEarlier: "Hide earlier facts",
|
|
129
133
|
accordionValueLabel: "Value",
|
|
130
134
|
accordionRetry: "Couldn't load odds \u2014 tap to retry",
|
|
131
135
|
accordionSuspended: "Suspended",
|
|
@@ -422,6 +426,10 @@ var STRINGS = {
|
|
|
422
426
|
inSlipLabel: "Kuponda",
|
|
423
427
|
oddsUnavailable: "Oranlar \u015Fu anda kullan\u0131lam\u0131yor",
|
|
424
428
|
momentumLabel: "Momentum",
|
|
429
|
+
liveFactLabel: "Canl\u0131 bilgi",
|
|
430
|
+
liveFactAsk: "Bunu sor",
|
|
431
|
+
liveFactEarlier: (n) => `\xD6nceki bilgiler (${n})`,
|
|
432
|
+
liveFactHideEarlier: "\xD6nceki bilgileri gizle",
|
|
425
433
|
accordionValueLabel: "De\u011Fer",
|
|
426
434
|
accordionRetry: "Oranlar y\xFCklenemedi \u2014 yeniden dene",
|
|
427
435
|
accordionSuspended: "Ask\u0131da",
|
|
@@ -651,6 +659,10 @@ var STRINGS = {
|
|
|
651
659
|
function resolveLocaleStrings(locale) {
|
|
652
660
|
return STRINGS[locale] ?? STRINGS.en;
|
|
653
661
|
}
|
|
662
|
+
function isEnglishLocale(locale) {
|
|
663
|
+
const lang = (locale ?? "").trim().toLowerCase().split(/[-_]/)[0] ?? "";
|
|
664
|
+
return lang === "en" || !Object.prototype.hasOwnProperty.call(STRINGS, lang);
|
|
665
|
+
}
|
|
654
666
|
|
|
655
667
|
// src/config.ts
|
|
656
668
|
function normalizeUi(cfg) {
|
|
@@ -660,6 +672,7 @@ function normalizeUi(cfg) {
|
|
|
660
672
|
accent: cfg.accent,
|
|
661
673
|
logoUrl: cfg.logoUrl,
|
|
662
674
|
headerTitle: cfg.headerTitle,
|
|
675
|
+
rawBettingLabels: isEnglishLocale(cfg.locale),
|
|
663
676
|
cta: cfg.cta,
|
|
664
677
|
surface: cfg.surface,
|
|
665
678
|
ink: cfg.ink,
|
|
@@ -741,6 +754,10 @@ function normalizeUi(cfg) {
|
|
|
741
754
|
inSlipLabel: strings.inSlipLabel,
|
|
742
755
|
oddsUnavailable: strings.oddsUnavailable,
|
|
743
756
|
momentumLabel: strings.momentumLabel,
|
|
757
|
+
liveFactLabel: strings.liveFactLabel,
|
|
758
|
+
liveFactAsk: strings.liveFactAsk,
|
|
759
|
+
liveFactEarlier: strings.liveFactEarlier,
|
|
760
|
+
liveFactHideEarlier: strings.liveFactHideEarlier,
|
|
744
761
|
accordionValueLabel: strings.accordionValueLabel,
|
|
745
762
|
accordionRetry: strings.accordionRetry,
|
|
746
763
|
accordionSuspended: strings.accordionSuspended,
|
|
@@ -775,6 +792,24 @@ function toUserContext(cfg) {
|
|
|
775
792
|
|
|
776
793
|
// src/slip.ts
|
|
777
794
|
var ADD_TO_SLIP_TIMEOUT_MS = 1e4;
|
|
795
|
+
var MAX_SELECTION = 64;
|
|
796
|
+
var MAX_LINE = 32;
|
|
797
|
+
var MAX_ODDS = 1e4;
|
|
798
|
+
function slipPickFields(selection, label, line) {
|
|
799
|
+
const fields = {};
|
|
800
|
+
if (Number.isSafeInteger(selection.matchId) && selection.matchId > 0) fields.matchId = selection.matchId;
|
|
801
|
+
if (label && label.trim() && label.length <= MAX_SELECTION) fields.selection = label;
|
|
802
|
+
if (line && line.trim() && line.length <= MAX_LINE) fields.line = line;
|
|
803
|
+
const odds = selection.oddsDecimal;
|
|
804
|
+
if (Number.isFinite(odds) && odds > 1 && odds <= MAX_ODDS) fields.odds = odds;
|
|
805
|
+
return fields;
|
|
806
|
+
}
|
|
807
|
+
function chipSelection(market, matchId, conversationId) {
|
|
808
|
+
if (!market || !market.addToSlipEnabled || typeof market.matchOddsId !== "number" || typeof market.price !== "number") return null;
|
|
809
|
+
const selection = { matchOddsId: market.matchOddsId, matchId, oddsDecimal: market.price };
|
|
810
|
+
if (conversationId !== void 0) selection.conversationId = conversationId;
|
|
811
|
+
return selection;
|
|
812
|
+
}
|
|
778
813
|
function wasAdded(result) {
|
|
779
814
|
if (!result) return true;
|
|
780
815
|
if (result.status === "price_changed") return result.accepted;
|
|
@@ -1061,6 +1096,8 @@ function toMarketOddsVM(card) {
|
|
|
1061
1096
|
return {
|
|
1062
1097
|
key: `${selection}:${str(r.line) ?? ""}:${i}`,
|
|
1063
1098
|
selection,
|
|
1099
|
+
selectionLabel: str(r.selectionLabel),
|
|
1100
|
+
line: str(r.line),
|
|
1064
1101
|
odds: price !== void 0 ? price.toFixed(2) : "",
|
|
1065
1102
|
oddsDecimal: price,
|
|
1066
1103
|
matchOddsId: typeof r.matchOddsId === "number" ? r.matchOddsId : void 0,
|
|
@@ -1491,7 +1528,7 @@ function useChatStream(conversation, starterTexts, greetingMessage, storageKey)
|
|
|
1491
1528
|
const send = (0, import_react2.useCallback)((text, opts) => {
|
|
1492
1529
|
const trimmed = text.trim();
|
|
1493
1530
|
if (!trimmed) return;
|
|
1494
|
-
run({ message: trimmed, actionId: opts?.actionId, actionRef: opts?.actionRef }, opts?.displayText);
|
|
1531
|
+
run({ message: trimmed, actionId: opts?.actionId, actionRef: opts?.actionRef, grounding: opts?.grounding }, opts?.displayText);
|
|
1495
1532
|
}, [run]);
|
|
1496
1533
|
const retry = (0, import_react2.useCallback)(() => {
|
|
1497
1534
|
const last = stateRef.current.lastUserInput;
|
|
@@ -1814,6 +1851,7 @@ function useLiveMonitor(opts) {
|
|
|
1814
1851
|
const inFlightRef = (0, import_react4.useRef)(false);
|
|
1815
1852
|
const timerRef = (0, import_react4.useRef)(void 0);
|
|
1816
1853
|
const disabledRef = (0, import_react4.useRef)(false);
|
|
1854
|
+
const mountedRef = (0, import_react4.useRef)(false);
|
|
1817
1855
|
const getLiveMonitorRef = (0, import_react4.useRef)(opts.getLiveMonitor);
|
|
1818
1856
|
getLiveMonitorRef.current = opts.getLiveMonitor;
|
|
1819
1857
|
const tick = (0, import_react4.useCallback)(async () => {
|
|
@@ -1821,6 +1859,7 @@ function useLiveMonitor(opts) {
|
|
|
1821
1859
|
inFlightRef.current = true;
|
|
1822
1860
|
try {
|
|
1823
1861
|
const snap = await getLiveMonitorRef.current(pinsRef.current);
|
|
1862
|
+
if (!mountedRef.current) return;
|
|
1824
1863
|
if (snap === null) {
|
|
1825
1864
|
disabledRef.current = true;
|
|
1826
1865
|
applySnapshot(null);
|
|
@@ -1842,10 +1881,16 @@ function useLiveMonitor(opts) {
|
|
|
1842
1881
|
});
|
|
1843
1882
|
scheduleRef.current = () => {
|
|
1844
1883
|
window.clearTimeout(timerRef.current);
|
|
1845
|
-
if (disabledRef.current || pinsRef.current.length === 0 || document.visibilityState === "hidden") return;
|
|
1884
|
+
if (!mountedRef.current || disabledRef.current || pinsRef.current.length === 0 || document.visibilityState === "hidden") return;
|
|
1846
1885
|
const hinted = (snapshotRef.current?.nextPollSeconds ?? DEFAULT_POLL_MS / 1e3) * 1e3;
|
|
1847
1886
|
timerRef.current = window.setTimeout(() => void tick(), Math.max(MIN_POLL_MS, hinted));
|
|
1848
1887
|
};
|
|
1888
|
+
(0, import_react4.useEffect)(() => {
|
|
1889
|
+
mountedRef.current = true;
|
|
1890
|
+
return () => {
|
|
1891
|
+
mountedRef.current = false;
|
|
1892
|
+
};
|
|
1893
|
+
}, []);
|
|
1849
1894
|
const prevPinsLengthRef = (0, import_react4.useRef)(0);
|
|
1850
1895
|
(0, import_react4.useEffect)(() => {
|
|
1851
1896
|
const wasEmpty = prevPinsLengthRef.current === 0;
|
|
@@ -2240,11 +2285,34 @@ function useEventLog() {
|
|
|
2240
2285
|
return (0, import_react8.useContext)(EventLogContext);
|
|
2241
2286
|
}
|
|
2242
2287
|
|
|
2288
|
+
// src/popupTelemetry.ts
|
|
2289
|
+
var import_react9 = require("react");
|
|
2290
|
+
function usePopupTelemetry(log, isOpen, popupText, dismissPopup) {
|
|
2291
|
+
const shownRef = (0, import_react9.useRef)(/* @__PURE__ */ new Set());
|
|
2292
|
+
const closedTextRef = (0, import_react9.useRef)(null);
|
|
2293
|
+
(0, import_react9.useEffect)(() => {
|
|
2294
|
+
if (isOpen) {
|
|
2295
|
+
if (closedTextRef.current) log?.log({ name: "popup_opened" });
|
|
2296
|
+
closedTextRef.current = null;
|
|
2297
|
+
return;
|
|
2298
|
+
}
|
|
2299
|
+
closedTextRef.current = popupText;
|
|
2300
|
+
if (popupText && !shownRef.current.has(popupText)) {
|
|
2301
|
+
shownRef.current.add(popupText);
|
|
2302
|
+
log?.log({ name: "popup_shown" });
|
|
2303
|
+
}
|
|
2304
|
+
}, [log, isOpen, popupText]);
|
|
2305
|
+
return (0, import_react9.useCallback)(() => {
|
|
2306
|
+
log?.log({ name: "popup_dismissed" });
|
|
2307
|
+
dismissPopup();
|
|
2308
|
+
}, [log, dismissPopup]);
|
|
2309
|
+
}
|
|
2310
|
+
|
|
2243
2311
|
// src/components/ChatFab.tsx
|
|
2244
|
-
var
|
|
2312
|
+
var import_react11 = require("react");
|
|
2245
2313
|
|
|
2246
2314
|
// src/components/BrandMark.tsx
|
|
2247
|
-
var
|
|
2315
|
+
var import_react10 = require("react");
|
|
2248
2316
|
|
|
2249
2317
|
// src/assets/logo.ts
|
|
2250
2318
|
var SS_LOGO_DATA_URI = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAjoAAAI6CAYAAAAuSOLAAAAAAXNSR0IArs4c6QAAAJplWElmTU0AKgAAAAgAAwESAAMAAAABAAEAAAExAAIAAAA9AAAAModpAAQAAAABAAAAcAAAAABBZG9iZSBQaG90b3Nob3AgMjYuMTAgKDIwMjUwNzMwLm0uMzE2NiAwN2IxMjM0KSAgKE1hY2ludG9zaCkAAAADoAEAAwAAAAEAAQAAoAIABAAAAAEAAAI6oAMABAAAAAEAAAI6AAAAACwGtVwAAAQwaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA2LjAuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIgogICAgICAgICAgICB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLy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qvAhyAAAQgUCKB9kroB0nsHKFSWAm9RNSY9kkAoeOzXvAKAhCAQLEERu0zMhhWQr+sWMNYg4BvAggd3/WDdxCAAASKI9BeCf0RMnhccUaxBAHfBBA6vusH7yAAAQgUS6C9EvpLZPTF2ieKNY41CPgjgNDxVyd4BAEIQKB8AiP2dZs0VkIvnzQl1EwAoVNzBVA8BCAAgdoI3L0S+qdr84GCIVAyAYROyYAxDwEIQMA1gfZK6EdqYdBnyU9WQnddWTjXCwGETi/UyAMBCEAgNQLD9n0b1Jw7mZ2bWmjE02wCCJ1m1z/RQwACELibQHsl9H005877dZCV0O8mwzsIQAACEIAABJIiMG772bgdk1RMBAMBCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIBAqgT+PwQUc6J1VOHQAAAAAElFTkSuQmCC";
|
|
@@ -2293,7 +2361,7 @@ function DashboardIcon({ name }) {
|
|
|
2293
2361
|
// src/components/BrandMark.tsx
|
|
2294
2362
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
2295
2363
|
function BrandMark({ logoUrl, className }) {
|
|
2296
|
-
const [failed, setFailed] = (0,
|
|
2364
|
+
const [failed, setFailed] = (0, import_react10.useState)(false);
|
|
2297
2365
|
if (!logoUrl || failed) return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SsMark, { className });
|
|
2298
2366
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("img", { className, src: logoUrl, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
2299
2367
|
}
|
|
@@ -2318,9 +2386,9 @@ function GreetingBubble({ text, onOpen, onDismiss, dismissLabel = "Dismiss" }) {
|
|
|
2318
2386
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
2319
2387
|
function ChatFab({ label, greeting, popupText, logoUrl, onOpen, onDismissPopup, dismissLabel = "Dismiss", introAllowed = false, onIntroStart }) {
|
|
2320
2388
|
const bubble = popupText ?? greeting;
|
|
2321
|
-
const [intro, setIntro] = (0,
|
|
2322
|
-
const armedRef = (0,
|
|
2323
|
-
(0,
|
|
2389
|
+
const [intro, setIntro] = (0, import_react11.useState)(false);
|
|
2390
|
+
const armedRef = (0, import_react11.useRef)(introAllowed);
|
|
2391
|
+
(0, import_react11.useEffect)(() => {
|
|
2324
2392
|
if (armedRef.current && bubble) {
|
|
2325
2393
|
armedRef.current = false;
|
|
2326
2394
|
setIntro(true);
|
|
@@ -2334,10 +2402,10 @@ function ChatFab({ label, greeting, popupText, logoUrl, onOpen, onDismissPopup,
|
|
|
2334
2402
|
}
|
|
2335
2403
|
|
|
2336
2404
|
// src/components/ChatPanel.tsx
|
|
2337
|
-
var
|
|
2405
|
+
var import_react45 = require("react");
|
|
2338
2406
|
|
|
2339
2407
|
// src/components/ChatHeader.tsx
|
|
2340
|
-
var
|
|
2408
|
+
var import_react12 = require("react");
|
|
2341
2409
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
2342
2410
|
function ChatHeader({
|
|
2343
2411
|
onClose,
|
|
@@ -2349,15 +2417,15 @@ function ChatHeader({
|
|
|
2349
2417
|
newConversationLabel = "New conversation",
|
|
2350
2418
|
moreOptionsLabel = "More options"
|
|
2351
2419
|
}) {
|
|
2352
|
-
const [menuOpen, setMenuOpen] = (0,
|
|
2353
|
-
const wrapRef = (0,
|
|
2354
|
-
const kebabRef = (0,
|
|
2355
|
-
const firstItemRef = (0,
|
|
2420
|
+
const [menuOpen, setMenuOpen] = (0, import_react12.useState)(false);
|
|
2421
|
+
const wrapRef = (0, import_react12.useRef)(null);
|
|
2422
|
+
const kebabRef = (0, import_react12.useRef)(null);
|
|
2423
|
+
const firstItemRef = (0, import_react12.useRef)(null);
|
|
2356
2424
|
const hasMenu = !!(canReset && onNewConversation);
|
|
2357
|
-
(0,
|
|
2425
|
+
(0, import_react12.useEffect)(() => {
|
|
2358
2426
|
if (menuOpen) firstItemRef.current?.focus();
|
|
2359
2427
|
}, [menuOpen]);
|
|
2360
|
-
(0,
|
|
2428
|
+
(0, import_react12.useEffect)(() => {
|
|
2361
2429
|
if (!menuOpen) return;
|
|
2362
2430
|
const onPointer = (e) => {
|
|
2363
2431
|
if (!wrapRef.current?.contains(e.target)) setMenuOpen(false);
|
|
@@ -2413,7 +2481,7 @@ function ChatHeader({
|
|
|
2413
2481
|
}
|
|
2414
2482
|
|
|
2415
2483
|
// src/components/MessageList.tsx
|
|
2416
|
-
var
|
|
2484
|
+
var import_react27 = require("react");
|
|
2417
2485
|
|
|
2418
2486
|
// src/components/Markdown.tsx
|
|
2419
2487
|
var import_react_markdown = __toESM(require("react-markdown"), 1);
|
|
@@ -2431,7 +2499,7 @@ function Markdown({ text }) {
|
|
|
2431
2499
|
}
|
|
2432
2500
|
|
|
2433
2501
|
// src/components/EntityCardList.tsx
|
|
2434
|
-
var
|
|
2502
|
+
var import_react13 = require("react");
|
|
2435
2503
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
2436
2504
|
var MAX_VISIBLE = 3;
|
|
2437
2505
|
var RECORD_RE = /^(\d+)-(\d+)-(\d+)$/;
|
|
@@ -2515,7 +2583,7 @@ function ScopeTabs({ scopes, active, onSelect }) {
|
|
|
2515
2583
|
)) });
|
|
2516
2584
|
}
|
|
2517
2585
|
function EntityCardItem({ c }) {
|
|
2518
|
-
const [active, setActive] = (0,
|
|
2586
|
+
const [active, setActive] = (0, import_react13.useState)(0);
|
|
2519
2587
|
const hasBody = c.scopes.length > 0;
|
|
2520
2588
|
if (!hasBody) {
|
|
2521
2589
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "ss-w-ecard ss-w-ecard-bare", "data-kind": c.kind, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardHeader, { c, showScopeCrest: false }) });
|
|
@@ -2529,7 +2597,7 @@ function EntityCardItem({ c }) {
|
|
|
2529
2597
|
] });
|
|
2530
2598
|
}
|
|
2531
2599
|
function EntityCardList({ cards, disabled, showLessLabel = "Show less", showMoreLabel = (n) => `Show ${n} more` }) {
|
|
2532
|
-
const [expanded, setExpanded] = (0,
|
|
2600
|
+
const [expanded, setExpanded] = (0, import_react13.useState)(false);
|
|
2533
2601
|
if (cards.length === 0) return null;
|
|
2534
2602
|
const visible = expanded ? cards : cards.slice(0, MAX_VISIBLE);
|
|
2535
2603
|
const overflow = cards.length - MAX_VISIBLE;
|
|
@@ -2540,18 +2608,18 @@ function EntityCardList({ cards, disabled, showLessLabel = "Show less", showMore
|
|
|
2540
2608
|
}
|
|
2541
2609
|
|
|
2542
2610
|
// src/components/BettingInsightList.tsx
|
|
2543
|
-
var
|
|
2611
|
+
var import_react18 = require("react");
|
|
2544
2612
|
|
|
2545
2613
|
// src/components/AddToSlipButton.tsx
|
|
2546
|
-
var
|
|
2614
|
+
var import_react15 = require("react");
|
|
2547
2615
|
var import_widget_sdk4 = require("@sensiblestats/widget-sdk");
|
|
2548
2616
|
|
|
2549
2617
|
// src/components/Toast.tsx
|
|
2550
|
-
var
|
|
2618
|
+
var import_react14 = require("react");
|
|
2551
2619
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
2552
2620
|
var DISMISS_MS = 4e3;
|
|
2553
2621
|
function Toast({ toast, onDismiss }) {
|
|
2554
|
-
(0,
|
|
2622
|
+
(0, import_react14.useEffect)(() => {
|
|
2555
2623
|
if (!toast) return;
|
|
2556
2624
|
const timer = setTimeout(onDismiss, DISMISS_MS);
|
|
2557
2625
|
return () => clearTimeout(timer);
|
|
@@ -2568,18 +2636,19 @@ function withTimeout(value) {
|
|
|
2568
2636
|
new Promise((_, reject) => setTimeout(() => reject(new Error("add-to-slip timed out")), ADD_TO_SLIP_TIMEOUT_MS))
|
|
2569
2637
|
]);
|
|
2570
2638
|
}
|
|
2571
|
-
function SlipButton({ selection, shownOdds,
|
|
2572
|
-
const [pending, setPending] = (0,
|
|
2573
|
-
const [settled, setSettled] = (0,
|
|
2574
|
-
const [toast, setToast] = (0,
|
|
2575
|
-
const dismiss = (0,
|
|
2639
|
+
function SlipButton({ selection, shownOdds, marketDeveloperName, selectionLabel, line, slip, ui }) {
|
|
2640
|
+
const [pending, setPending] = (0, import_react15.useState)(false);
|
|
2641
|
+
const [settled, setSettled] = (0, import_react15.useState)(false);
|
|
2642
|
+
const [toast, setToast] = (0, import_react15.useState)(null);
|
|
2643
|
+
const dismiss = (0, import_react15.useCallback)(() => setToast(null), []);
|
|
2576
2644
|
const log = useEventLog();
|
|
2577
2645
|
const handler = slip.onAddToSlip;
|
|
2578
2646
|
if (!ui || !handler || !selection) return null;
|
|
2579
2647
|
const onClick = async () => {
|
|
2580
2648
|
setPending(true);
|
|
2649
|
+
const pick = slipPickFields(selection, ui.rawBettingLabels ? selectionLabel : void 0, line);
|
|
2581
2650
|
if (marketDeveloperName !== void 0) {
|
|
2582
|
-
log?.log({ name: "slip_click", entityType: "market", marketDeveloperName, entityId: marketDeveloperName });
|
|
2651
|
+
log?.log({ name: "slip_click", entityType: "market", marketDeveloperName, entityId: marketDeveloperName, ...pick });
|
|
2583
2652
|
}
|
|
2584
2653
|
try {
|
|
2585
2654
|
const raw = await withTimeout(Promise.resolve(handler(selection)));
|
|
@@ -2591,20 +2660,15 @@ function SlipButton({ selection, shownOdds, marketName, marketDeveloperName, sli
|
|
|
2591
2660
|
entityType: "market",
|
|
2592
2661
|
marketDeveloperName,
|
|
2593
2662
|
entityId: marketDeveloperName,
|
|
2594
|
-
outcome: slipOutcome(result)
|
|
2663
|
+
outcome: slipOutcome(result),
|
|
2664
|
+
...pick
|
|
2595
2665
|
});
|
|
2596
2666
|
}
|
|
2597
2667
|
setToast(resultToToast(result, shownOdds || selection.oddsDecimal.toFixed(2), ui));
|
|
2598
2668
|
setSettled(isTerminal(result));
|
|
2599
|
-
if (wasAdded(result) && slip.onMarketClicked) {
|
|
2600
|
-
try {
|
|
2601
|
-
slip.onMarketClicked(marketName);
|
|
2602
|
-
} catch {
|
|
2603
|
-
}
|
|
2604
|
-
}
|
|
2605
2669
|
} catch {
|
|
2606
2670
|
if (marketDeveloperName !== void 0) {
|
|
2607
|
-
log?.log({ name: "slip_result", entityType: "market", marketDeveloperName, entityId: marketDeveloperName, outcome: "timeout" });
|
|
2671
|
+
log?.log({ name: "slip_result", entityType: "market", marketDeveloperName, entityId: marketDeveloperName, outcome: "timeout", ...pick });
|
|
2608
2672
|
}
|
|
2609
2673
|
setToast({ kind: "error", text: ui.slipFailed });
|
|
2610
2674
|
} finally {
|
|
@@ -2632,8 +2696,9 @@ function AddToSlipButton({ it, slip, ui }) {
|
|
|
2632
2696
|
{
|
|
2633
2697
|
selection,
|
|
2634
2698
|
shownOdds: it.odds ?? "",
|
|
2635
|
-
marketName: it.market,
|
|
2636
2699
|
marketDeveloperName: it.marketDeveloperName,
|
|
2700
|
+
selectionLabel: it.selectionLabel,
|
|
2701
|
+
line: it.line,
|
|
2637
2702
|
slip,
|
|
2638
2703
|
ui
|
|
2639
2704
|
}
|
|
@@ -2662,14 +2727,14 @@ function OddsMovementBadge({
|
|
|
2662
2727
|
}
|
|
2663
2728
|
|
|
2664
2729
|
// src/components/Crest.tsx
|
|
2665
|
-
var
|
|
2730
|
+
var import_react16 = require("react");
|
|
2666
2731
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2667
2732
|
function initials2(name) {
|
|
2668
2733
|
return (name ?? "").trim().slice(0, 1).toUpperCase() || "?";
|
|
2669
2734
|
}
|
|
2670
2735
|
function Crest2({ url, name, kind }) {
|
|
2671
2736
|
const cls = kind === "comp" ? "ss-w-bi-comp-logo" : "ss-w-bi-crest";
|
|
2672
|
-
const [failed, setFailed] = (0,
|
|
2737
|
+
const [failed, setFailed] = (0, import_react16.useState)(false);
|
|
2673
2738
|
if (url && !failed) {
|
|
2674
2739
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("img", { className: cls, src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
2675
2740
|
}
|
|
@@ -2677,7 +2742,7 @@ function Crest2({ url, name, kind }) {
|
|
|
2677
2742
|
}
|
|
2678
2743
|
|
|
2679
2744
|
// src/components/PinToggle.tsx
|
|
2680
|
-
var
|
|
2745
|
+
var import_react17 = require("react");
|
|
2681
2746
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2682
2747
|
var PIN_GLYPHS = {
|
|
2683
2748
|
pin: { viewBox: "0 0 24 24", strokeWidth: 1.4, transform: "scale(1.5)", d: "M9.5 1.5 14.5 6.5 13 8l-.5-.5-3 3 .3 2.2-1.4 1.4L5.6 11.3l-3.3 3.3-1-1 3.3-3.3L1.9 7.5l1.4-1.4 2.2.3 3-3L8 2.9z" },
|
|
@@ -2685,8 +2750,8 @@ var PIN_GLYPHS = {
|
|
|
2685
2750
|
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" }
|
|
2686
2751
|
};
|
|
2687
2752
|
function PinToggle({ pin, monitor, ui }) {
|
|
2688
|
-
const [toast, setToast] = (0,
|
|
2689
|
-
const dismiss = (0,
|
|
2753
|
+
const [toast, setToast] = (0, import_react17.useState)(null);
|
|
2754
|
+
const dismiss = (0, import_react17.useCallback)(() => setToast(null), []);
|
|
2690
2755
|
const log = useEventLog();
|
|
2691
2756
|
if (!monitor || !monitor.enabled) return null;
|
|
2692
2757
|
const key = pinKey(pin);
|
|
@@ -2746,7 +2811,7 @@ function StatRows({ stats }) {
|
|
|
2746
2811
|
] }, `${s.label}:${s.value}`)) });
|
|
2747
2812
|
}
|
|
2748
2813
|
function ScopedStats({ scopes }) {
|
|
2749
|
-
const [active, setActive] = (0,
|
|
2814
|
+
const [active, setActive] = (0, import_react18.useState)(0);
|
|
2750
2815
|
const current = scopes[active] ?? scopes[0] ?? { key: "", label: "", stats: [] };
|
|
2751
2816
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "ss-w-bi-scoped", children: [
|
|
2752
2817
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "ss-w-bi-scopes", role: "group", children: scopes.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", className: "ss-w-bi-chip", "aria-pressed": i === active, onClick: () => setActive(i), children: s.label }, s.key)) }),
|
|
@@ -2757,7 +2822,7 @@ function hasStatsContent(it) {
|
|
|
2757
2822
|
return !!it.scopes && it.scopes.length >= 2 || it.stats.length > 0;
|
|
2758
2823
|
}
|
|
2759
2824
|
function ReasonStrip({ it, ui }) {
|
|
2760
|
-
const [open, setOpen] = (0,
|
|
2825
|
+
const [open, setOpen] = (0, import_react18.useState)(false);
|
|
2761
2826
|
const log = useEventLog();
|
|
2762
2827
|
const hasScopes = !!it.scopes && it.scopes.length >= 2;
|
|
2763
2828
|
const hasStats = hasStatsContent(it);
|
|
@@ -2877,7 +2942,7 @@ function BettingInsightList({ insights, ui, slip, monitor }) {
|
|
|
2877
2942
|
}
|
|
2878
2943
|
|
|
2879
2944
|
// src/components/MarketOddsCardList.tsx
|
|
2880
|
-
var
|
|
2945
|
+
var import_react19 = require("react");
|
|
2881
2946
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2882
2947
|
function OddsRow({ vm, row, ui, slip, inSlipIds }) {
|
|
2883
2948
|
const selection = vm.addToSlipEnabled ? marketOddsRowToSlipSelection(vm, row, slip.conversationId) : null;
|
|
@@ -2890,11 +2955,11 @@ function OddsRow({ vm, row, ui, slip, inSlipIds }) {
|
|
|
2890
2955
|
"\u2713 ",
|
|
2891
2956
|
ui.inSlipLabel
|
|
2892
2957
|
] }) : null,
|
|
2893
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SlipButton, { selection, shownOdds: row.odds,
|
|
2958
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SlipButton, { selection, shownOdds: row.odds, marketDeveloperName: vm.marketDeveloperName, selectionLabel: row.selectionLabel, line: row.line, slip, ui })
|
|
2894
2959
|
] });
|
|
2895
2960
|
}
|
|
2896
2961
|
function MarketOddsCard({ vm, ui, slip, monitor, inSlipIds, hideHeader, pinRef }) {
|
|
2897
|
-
const [open, setOpen] = (0,
|
|
2962
|
+
const [open, setOpen] = (0, import_react19.useState)(false);
|
|
2898
2963
|
const kickoffFallback = vm.kickoffUtc && ui?.bettingKickoff ? ui.bettingKickoff(vm.kickoffUtc) : void 0;
|
|
2899
2964
|
const kickoff = vm.kickoffLabel ?? (kickoffFallback ? `${kickoffFallback.dayLabel} ${kickoffFallback.time}` : void 0);
|
|
2900
2965
|
const hasNamedTeams = !!vm.homeTeamName && !!vm.awayTeamName;
|
|
@@ -3062,7 +3127,37 @@ function ActionButtons({ actions, loading, disabled, onAct }) {
|
|
|
3062
3127
|
// src/components/dashboard/DashboardTile.tsx
|
|
3063
3128
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
3064
3129
|
var MAX_CRESTS = 3;
|
|
3065
|
-
|
|
3130
|
+
var ODDS_TAIL = /\s*·\s*@(\d+(?:\.\d+)?)\s*$/;
|
|
3131
|
+
function splitOdds(subtitle) {
|
|
3132
|
+
const m = ODDS_TAIL.exec(subtitle);
|
|
3133
|
+
return m ? { text: subtitle.slice(0, m.index), odds: m[1] } : { text: subtitle };
|
|
3134
|
+
}
|
|
3135
|
+
function HeroTile({ tile, onTap, oddsLabel }) {
|
|
3136
|
+
const crests = (tile.imageUrls ?? []).filter(Boolean).slice(0, 2);
|
|
3137
|
+
const sub = tile.subtitle ? splitOdds(tile.subtitle) : null;
|
|
3138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", className: "ss-w-dash-tile ss-w-dash-tile--full ss-w-dash-hero", onClick: onTap, children: [
|
|
3139
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "ss-w-dash-hero-top", children: [
|
|
3140
|
+
tile.badgeText ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-dash-hero-badge", children: tile.badgeText }) : null,
|
|
3141
|
+
sub?.odds ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "ss-w-dash-hero-price", children: [
|
|
3142
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "ss-g-sr", children: [
|
|
3143
|
+
oddsLabel,
|
|
3144
|
+
" "
|
|
3145
|
+
] }),
|
|
3146
|
+
sub.odds
|
|
3147
|
+
] }) : null,
|
|
3148
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-dash-hero-chevron", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ChevronIcon, {}) })
|
|
3149
|
+
] }),
|
|
3150
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "ss-w-dash-hero-main", children: [
|
|
3151
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-dash-hero-visual", "aria-hidden": "true", children: crests.length > 0 ? crests.map((url, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-dash-hero-crest", style: { backgroundImage: `url(${url})` } }, `${url}-${i}`)) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-dash-hero-icon", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DashboardIcon, { name: tile.icon }) }) }),
|
|
3152
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "ss-w-dash-hero-body", children: [
|
|
3153
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-dash-hero-title", children: tile.title }),
|
|
3154
|
+
sub?.text ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-dash-hero-subtitle", children: sub.text }) : null
|
|
3155
|
+
] })
|
|
3156
|
+
] })
|
|
3157
|
+
] });
|
|
3158
|
+
}
|
|
3159
|
+
function DashboardTile({ tile, onTap, oddsLabel = "Odds" }) {
|
|
3160
|
+
if (tile.emphasis === "hero") return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(HeroTile, { tile, onTap, oddsLabel });
|
|
3066
3161
|
const spanClass = tile.span === "full" ? "ss-w-dash-tile--full" : "ss-w-dash-tile--half";
|
|
3067
3162
|
const crests = (tile.imageUrls ?? []).slice(0, MAX_CRESTS);
|
|
3068
3163
|
const hasMeta = Boolean(tile.badgeText) || crests.length > 0;
|
|
@@ -3095,13 +3190,13 @@ var LAYOUT_CLASSES = {
|
|
|
3095
3190
|
function layoutClass(layout) {
|
|
3096
3191
|
return Object.prototype.hasOwnProperty.call(LAYOUT_CLASSES, layout) ? LAYOUT_CLASSES[layout] : LAYOUT_CLASSES.goal;
|
|
3097
3192
|
}
|
|
3098
|
-
function GreetingDashboard({ dashboard, onTap }) {
|
|
3193
|
+
function GreetingDashboard({ dashboard, onTap, oddsLabel }) {
|
|
3099
3194
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: `ss-w-dash ${layoutClass(dashboard.layout)}`, children: [
|
|
3100
3195
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "ss-w-dash-head", children: [
|
|
3101
3196
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "ss-w-dash-title", children: dashboard.title }),
|
|
3102
3197
|
dashboard.subtitle ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "ss-w-dash-subtitle", children: dashboard.subtitle }) : null
|
|
3103
3198
|
] }),
|
|
3104
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "ss-w-dash-grid", children: dashboard.tiles.map((t, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DashboardTile, { tile: t, onTap: () => onTap(t, i) }, `${t.title}-${i}`)) }),
|
|
3199
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "ss-w-dash-grid", children: dashboard.tiles.map((t, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DashboardTile, { tile: t, onTap: () => onTap(t, i), oddsLabel }, `${t.title}-${i}`)) }),
|
|
3105
3200
|
dashboard.footerTip ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "ss-w-dash-foot", children: dashboard.footerTip }) : null
|
|
3106
3201
|
] });
|
|
3107
3202
|
}
|
|
@@ -3197,7 +3292,7 @@ function FixtureCard({ card }) {
|
|
|
3197
3292
|
}
|
|
3198
3293
|
|
|
3199
3294
|
// src/components/dashboard/CountdownCard.tsx
|
|
3200
|
-
var
|
|
3295
|
+
var import_react20 = require("react");
|
|
3201
3296
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
3202
3297
|
var DAY_MS = 864e5;
|
|
3203
3298
|
function remainingSegments(kickoffUnix, nowMs, withSeconds) {
|
|
@@ -3216,12 +3311,12 @@ function remainingSegments(kickoffUnix, nowMs, withSeconds) {
|
|
|
3216
3311
|
function CountdownCard({ card }) {
|
|
3217
3312
|
const { data } = card;
|
|
3218
3313
|
const unitLabel = { d: data.daysUnit, h: data.hoursUnit, m: data.minutesUnit, s: data.secondsUnit };
|
|
3219
|
-
const [nowMs, setNowMs] = (0,
|
|
3220
|
-
const [reduced] = (0,
|
|
3314
|
+
const [nowMs, setNowMs] = (0, import_react20.useState)(() => Date.now());
|
|
3315
|
+
const [reduced] = (0, import_react20.useState)(
|
|
3221
3316
|
() => typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches
|
|
3222
3317
|
);
|
|
3223
3318
|
const withinDay = data.kickoffUnix * 1e3 - nowMs < DAY_MS;
|
|
3224
|
-
(0,
|
|
3319
|
+
(0, import_react20.useEffect)(() => {
|
|
3225
3320
|
if (reduced) return;
|
|
3226
3321
|
const id = window.setInterval(() => setNowMs(Date.now()), withinDay ? 1e3 : 6e4);
|
|
3227
3322
|
return () => window.clearInterval(id);
|
|
@@ -3229,7 +3324,7 @@ function CountdownCard({ card }) {
|
|
|
3229
3324
|
const segments = remainingSegments(data.kickoffUnix, nowMs, withinDay && !reduced);
|
|
3230
3325
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "ss-w-fandash-card ss-w-fandash-countdown", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "ss-w-fandash-countdown-top", children: [
|
|
3231
3326
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "ss-w-fandash-eyebrow", children: card.title ?? "Kick-off in" }),
|
|
3232
|
-
segments ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "ss-w-fandash-countdown-clock", children: segments.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3327
|
+
segments ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "ss-w-fandash-countdown-clock", children: segments.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react20.Fragment, { children: [
|
|
3233
3328
|
i > 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "ss-w-fandash-countdown-colon", children: ":" }) : null,
|
|
3234
3329
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "ss-w-fandash-countdown-seg", children: [
|
|
3235
3330
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "ss-w-fandash-countdown-value", children: s.value }),
|
|
@@ -3240,7 +3335,7 @@ function CountdownCard({ card }) {
|
|
|
3240
3335
|
}
|
|
3241
3336
|
|
|
3242
3337
|
// src/components/dashboard/InjuriesCard.tsx
|
|
3243
|
-
var
|
|
3338
|
+
var import_react21 = require("react");
|
|
3244
3339
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
3245
3340
|
var SHOWN = 3;
|
|
3246
3341
|
function ColHead({ name, crestUrl }) {
|
|
@@ -3263,7 +3358,7 @@ function InjuryList({ rows, emptyLabel, limit }) {
|
|
|
3263
3358
|
}
|
|
3264
3359
|
function InjuriesCard({ card, ui }) {
|
|
3265
3360
|
const { data } = card;
|
|
3266
|
-
const [expanded, setExpanded] = (0,
|
|
3361
|
+
const [expanded, setExpanded] = (0, import_react21.useState)(false);
|
|
3267
3362
|
const hidden = Math.max(0, data.ours.length - SHOWN) + Math.max(0, data.theirs.length - SHOWN);
|
|
3268
3363
|
const limit = expanded ? void 0 : SHOWN;
|
|
3269
3364
|
const showMore = ui?.showMore ?? ((n) => `Show ${n} more`);
|
|
@@ -3369,7 +3464,7 @@ function LinksCard({ card }) {
|
|
|
3369
3464
|
}
|
|
3370
3465
|
|
|
3371
3466
|
// src/components/dashboard/PostMatchResultCard.tsx
|
|
3372
|
-
var
|
|
3467
|
+
var import_react22 = require("react");
|
|
3373
3468
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3374
3469
|
function initials3(name) {
|
|
3375
3470
|
return name.trim().slice(0, 3).toUpperCase();
|
|
@@ -3379,7 +3474,7 @@ function PostMatchCrest({
|
|
|
3379
3474
|
name,
|
|
3380
3475
|
side
|
|
3381
3476
|
}) {
|
|
3382
|
-
const [failed, setFailed] = (0,
|
|
3477
|
+
const [failed, setFailed] = (0, import_react22.useState)(false);
|
|
3383
3478
|
const cls = `ss-w-fandash-postmatch-crest ss-w-fandash-postmatch-crest--${side}`;
|
|
3384
3479
|
if (url && !failed) {
|
|
3385
3480
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("img", { className: cls, src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
@@ -3578,10 +3673,10 @@ function RestingFormCard({ card }) {
|
|
|
3578
3673
|
}
|
|
3579
3674
|
|
|
3580
3675
|
// src/components/dashboard/LiveScoreCard.tsx
|
|
3581
|
-
var
|
|
3676
|
+
var import_react24 = require("react");
|
|
3582
3677
|
|
|
3583
3678
|
// src/useLiveClock.ts
|
|
3584
|
-
var
|
|
3679
|
+
var import_react23 = require("react");
|
|
3585
3680
|
var TICK_MS = 6e4;
|
|
3586
3681
|
var MAX_LIVE_TICK_MINUTES = 15;
|
|
3587
3682
|
function computeDisplayMinute(minute, clockRunning, receivedAtMs) {
|
|
@@ -3590,10 +3685,10 @@ function computeDisplayMinute(minute, clockRunning, receivedAtMs) {
|
|
|
3590
3685
|
return minute + Math.min(Math.max(0, elapsedMinutes), MAX_LIVE_TICK_MINUTES);
|
|
3591
3686
|
}
|
|
3592
3687
|
function useLiveClock(minute, clockRunning, receivedAtMs) {
|
|
3593
|
-
const [displayMinute, setDisplayMinute] = (0,
|
|
3688
|
+
const [displayMinute, setDisplayMinute] = (0, import_react23.useState)(
|
|
3594
3689
|
() => computeDisplayMinute(minute, clockRunning, receivedAtMs)
|
|
3595
3690
|
);
|
|
3596
|
-
(0,
|
|
3691
|
+
(0, import_react23.useEffect)(() => {
|
|
3597
3692
|
setDisplayMinute(computeDisplayMinute(minute, clockRunning, receivedAtMs));
|
|
3598
3693
|
if (!clockRunning) return;
|
|
3599
3694
|
const id = window.setInterval(() => {
|
|
@@ -3610,7 +3705,7 @@ function initials5(name) {
|
|
|
3610
3705
|
return name.trim().slice(0, 3).toUpperCase();
|
|
3611
3706
|
}
|
|
3612
3707
|
function LiveCrest({ url, name, side }) {
|
|
3613
|
-
const [failed, setFailed] = (0,
|
|
3708
|
+
const [failed, setFailed] = (0, import_react24.useState)(false);
|
|
3614
3709
|
const cls = `ss-w-fandash-live-crest ss-w-fandash-live-crest--${side}`;
|
|
3615
3710
|
if (url && !failed) {
|
|
3616
3711
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("img", { className: cls, src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
@@ -3629,7 +3724,7 @@ function LiveScoreCard({
|
|
|
3629
3724
|
}) {
|
|
3630
3725
|
const { data } = card;
|
|
3631
3726
|
const seedKey = `${data.minute}:${data.homeScore}:${data.awayScore}`;
|
|
3632
|
-
const seedRef = (0,
|
|
3727
|
+
const seedRef = (0, import_react24.useRef)(null);
|
|
3633
3728
|
if (!seedRef.current || seedRef.current.key !== seedKey) {
|
|
3634
3729
|
seedRef.current = { key: seedKey, receivedAtMs: Date.now() };
|
|
3635
3730
|
}
|
|
@@ -3669,7 +3764,7 @@ function LiveScoreCard({
|
|
|
3669
3764
|
}
|
|
3670
3765
|
|
|
3671
3766
|
// src/components/dashboard/LiveTimelineCard.tsx
|
|
3672
|
-
var
|
|
3767
|
+
var import_react25 = require("react");
|
|
3673
3768
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3674
3769
|
var SHOWN2 = 3;
|
|
3675
3770
|
function EventIcon({ type }) {
|
|
@@ -3711,7 +3806,7 @@ function EventRow({ e }) {
|
|
|
3711
3806
|
] });
|
|
3712
3807
|
}
|
|
3713
3808
|
function LiveTimelineCard({ card, ui }) {
|
|
3714
|
-
const [expanded, setExpanded] = (0,
|
|
3809
|
+
const [expanded, setExpanded] = (0, import_react25.useState)(false);
|
|
3715
3810
|
const events = card.data.events;
|
|
3716
3811
|
if (!events || events.length === 0) return null;
|
|
3717
3812
|
const sorted = [...events].sort((a, b) => b.minute - a.minute);
|
|
@@ -3736,7 +3831,7 @@ function LiveTimelineCard({ card, ui }) {
|
|
|
3736
3831
|
}
|
|
3737
3832
|
|
|
3738
3833
|
// src/components/dashboard/MomentumWave.tsx
|
|
3739
|
-
var
|
|
3834
|
+
var import_react26 = require("react");
|
|
3740
3835
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3741
3836
|
var WIDTH = 270;
|
|
3742
3837
|
var HEIGHT = 56;
|
|
@@ -3760,7 +3855,7 @@ function MomentumWave({
|
|
|
3760
3855
|
}) {
|
|
3761
3856
|
if (points.length === 0) return null;
|
|
3762
3857
|
const { area, line, lastLeftPct, lastTopPx } = buildPaths(points);
|
|
3763
|
-
const clipId = (0,
|
|
3858
|
+
const clipId = (0, import_react26.useId)();
|
|
3764
3859
|
const topClipId = `${clipId}-top`;
|
|
3765
3860
|
const bottomClipId = `${clipId}-bottom`;
|
|
3766
3861
|
const topClass = clubIsHome ? "ss-w-fandash-live-mom-home" : "ss-w-fandash-live-mom-away";
|
|
@@ -3918,7 +4013,7 @@ function ChatMessage({ message, disabled, onAct, onTap, ui, slip, monitor }) {
|
|
|
3918
4013
|
};
|
|
3919
4014
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "ss-w-msg ss-w-bot", "data-msg-id": message.id, children: [
|
|
3920
4015
|
message.text && !message.greetingDashboard && !message.clubFanDashboard ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Markdown, { text: message.text }) : null,
|
|
3921
|
-
message.greetingDashboard && !message.clubFanDashboard ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(GreetingDashboard, { dashboard: message.greetingDashboard, onTap }) : null,
|
|
4016
|
+
message.greetingDashboard && !message.clubFanDashboard ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(GreetingDashboard, { dashboard: message.greetingDashboard, onTap, oddsLabel: ui?.oddsLabel }) : null,
|
|
3922
4017
|
message.clubFanDashboard ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ClubFanDashboard, { dashboard: message.clubFanDashboard, onTap: onFanDashboardTap, ui }) : null,
|
|
3923
4018
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(EntityCardList, { cards: message.cards, disabled, showLessLabel: ui?.showLess, showMoreLabel: ui?.showMore }),
|
|
3924
4019
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(BettingInsightList, { insights: message.insights, ui, slip, monitor }),
|
|
@@ -3951,11 +4046,11 @@ function turnAnchor(messages) {
|
|
|
3951
4046
|
}
|
|
3952
4047
|
function MessageList({ controller, ui, slip, onDashboardTap, monitor }) {
|
|
3953
4048
|
const { state, send } = controller;
|
|
3954
|
-
const listRef = (0,
|
|
3955
|
-
const endRef = (0,
|
|
3956
|
-
const pinnedRef = (0,
|
|
3957
|
-
const anchoredTurnRef = (0,
|
|
3958
|
-
(0,
|
|
4049
|
+
const listRef = (0, import_react27.useRef)(null);
|
|
4050
|
+
const endRef = (0, import_react27.useRef)(null);
|
|
4051
|
+
const pinnedRef = (0, import_react27.useRef)(true);
|
|
4052
|
+
const anchoredTurnRef = (0, import_react27.useRef)(null);
|
|
4053
|
+
(0, import_react27.useEffect)(() => {
|
|
3959
4054
|
const anchor = turnAnchor(state.messages);
|
|
3960
4055
|
const list = listRef.current;
|
|
3961
4056
|
if (anchor && anchor.turnId !== anchoredTurnRef.current) {
|
|
@@ -4011,10 +4106,10 @@ function MessageList({ controller, ui, slip, onDashboardTap, monitor }) {
|
|
|
4011
4106
|
}
|
|
4012
4107
|
|
|
4013
4108
|
// src/components/ChatInput.tsx
|
|
4014
|
-
var
|
|
4109
|
+
var import_react28 = require("react");
|
|
4015
4110
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
4016
4111
|
function ChatInput({ placeholder, streaming, onSend, onStop, stopLabel = "Stop response", sendLabel = "Send message" }) {
|
|
4017
|
-
const [value, setValue] = (0,
|
|
4112
|
+
const [value, setValue] = (0, import_react28.useState)("");
|
|
4018
4113
|
const submit = () => {
|
|
4019
4114
|
const t = value.trim();
|
|
4020
4115
|
if (!t) return;
|
|
@@ -4136,15 +4231,79 @@ function MarketAccordion({ match, monitor, ui, slip }) {
|
|
|
4136
4231
|
}) });
|
|
4137
4232
|
}
|
|
4138
4233
|
|
|
4139
|
-
// src/components/
|
|
4234
|
+
// src/components/LiveFactBlock.tsx
|
|
4235
|
+
var import_react29 = require("react");
|
|
4140
4236
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
4141
|
-
function
|
|
4142
|
-
const
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
return
|
|
4237
|
+
function LiveFactBlock({ facts, matchId, ui, slip, onAsk }) {
|
|
4238
|
+
const [expanded, setExpanded] = (0, import_react29.useState)(false);
|
|
4239
|
+
const [current, ...earlier] = facts;
|
|
4240
|
+
if (!current) return null;
|
|
4241
|
+
const m = current.market;
|
|
4242
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("section", { className: "ss-w-fact", "aria-label": ui.liveFactLabel, children: [
|
|
4243
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "ss-w-fact-k", children: [
|
|
4244
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { children: ui.liveFactLabel }),
|
|
4245
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "ss-w-fact-min", children: [
|
|
4246
|
+
"\xB7 ",
|
|
4247
|
+
current.minuteLabel
|
|
4248
|
+
] }),
|
|
4249
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "ss-w-fact-subj", children: current.subjectLabel })
|
|
4250
|
+
] }),
|
|
4251
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "ss-w-fact-text", children: current.text }),
|
|
4252
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "ss-w-fact-basis", children: current.basis }),
|
|
4253
|
+
m && !m.isSuspended && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "ss-w-fact-mkt", children: [
|
|
4254
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { children: [
|
|
4255
|
+
m.marketLabel,
|
|
4256
|
+
" \xB7 ",
|
|
4257
|
+
m.selectionLabel
|
|
4258
|
+
] }),
|
|
4259
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "ss-w-mon-stat-mkt-right", children: [
|
|
4260
|
+
typeof m.price === "number" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "ss-w-mon-price", children: m.price.toFixed(2) }),
|
|
4261
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4262
|
+
SlipButton,
|
|
4263
|
+
{
|
|
4264
|
+
selection: chipSelection(m, matchId, slip.conversationId),
|
|
4265
|
+
shownOdds: typeof m.price === "number" ? m.price.toFixed(2) : "",
|
|
4266
|
+
marketDeveloperName: m.marketDeveloperName,
|
|
4267
|
+
selectionLabel: m.selectionLabel,
|
|
4268
|
+
slip,
|
|
4269
|
+
ui
|
|
4270
|
+
}
|
|
4271
|
+
)
|
|
4272
|
+
] })
|
|
4273
|
+
] }),
|
|
4274
|
+
expanded && earlier.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("ul", { className: "ss-w-fact-hist", children: earlier.map((f) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("li", { children: [
|
|
4275
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "ss-w-fact-hmin", children: f.minuteLabel }),
|
|
4276
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { children: [
|
|
4277
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "ss-w-fact-htext", children: f.text }),
|
|
4278
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "ss-w-fact-basis", children: f.basis })
|
|
4279
|
+
] })
|
|
4280
|
+
] }, f.id)) }),
|
|
4281
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "ss-w-fact-foot", children: [
|
|
4282
|
+
onAsk && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4283
|
+
"button",
|
|
4284
|
+
{
|
|
4285
|
+
type: "button",
|
|
4286
|
+
className: "ss-w-fact-link",
|
|
4287
|
+
onClick: () => onAsk(current.text, { kind: "liveFact", matchId, subject: current.text.slice(0, 400) }),
|
|
4288
|
+
children: ui.liveFactAsk
|
|
4289
|
+
}
|
|
4290
|
+
),
|
|
4291
|
+
earlier.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4292
|
+
"button",
|
|
4293
|
+
{
|
|
4294
|
+
type: "button",
|
|
4295
|
+
className: "ss-w-fact-link ss-w-fact-link--muted",
|
|
4296
|
+
"aria-expanded": expanded,
|
|
4297
|
+
onClick: () => setExpanded((v) => !v),
|
|
4298
|
+
children: expanded ? ui.liveFactHideEarlier : ui.liveFactEarlier(earlier.length)
|
|
4299
|
+
}
|
|
4300
|
+
)
|
|
4301
|
+
] })
|
|
4302
|
+
] });
|
|
4147
4303
|
}
|
|
4304
|
+
|
|
4305
|
+
// src/components/MonitorMatchCard.tsx
|
|
4306
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4148
4307
|
function isPromoted(row, promotedPins) {
|
|
4149
4308
|
const chip = row.market;
|
|
4150
4309
|
if (!chip) return false;
|
|
@@ -4170,7 +4329,7 @@ function groupScorers(goals, ownGoalLabel) {
|
|
|
4170
4329
|
return { player: name, label: name ? `${name} ${minutes}` : minutes };
|
|
4171
4330
|
});
|
|
4172
4331
|
}
|
|
4173
|
-
function MonitorMatchCard({ match, promotedPins, monitor, ui, slip }) {
|
|
4332
|
+
function MonitorMatchCard({ match, promotedPins, monitor, ui, slip, onAsk }) {
|
|
4174
4333
|
const live = match.phase === "live";
|
|
4175
4334
|
const goals = match.events.filter((e) => e.type === "goal");
|
|
4176
4335
|
const homeScorers = groupScorers(goals.filter((e) => e.side === "home"), ui.ownGoalLabel);
|
|
@@ -4179,73 +4338,74 @@ function MonitorMatchCard({ match, promotedPins, monitor, ui, slip }) {
|
|
|
4179
4338
|
const otherRows = match.statRows.filter((row) => !isPromoted(row, promotedPins));
|
|
4180
4339
|
const orderedRows = [...promotedRows, ...otherRows];
|
|
4181
4340
|
const kickoff = match.phase === "preMatch" && match.kickoffUtc ? ui.bettingKickoff(match.kickoffUtc) : void 0;
|
|
4182
|
-
return /* @__PURE__ */ (0,
|
|
4183
|
-
/* @__PURE__ */ (0,
|
|
4184
|
-
live && /* @__PURE__ */ (0,
|
|
4185
|
-
/* @__PURE__ */ (0,
|
|
4341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "ss-w-mon", children: [
|
|
4342
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "ss-w-mon-top", children: [
|
|
4343
|
+
live && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "ss-w-fandash-live-pill", children: [
|
|
4344
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "ss-w-fandash-live-dot", "aria-hidden": "true" }),
|
|
4186
4345
|
ui.liveLabel
|
|
4187
4346
|
] }),
|
|
4188
|
-
match.phase === "fullTime" && /* @__PURE__ */ (0,
|
|
4189
|
-
kickoff && /* @__PURE__ */ (0,
|
|
4347
|
+
match.phase === "fullTime" && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "ss-w-mon-pill", children: ui.fullTimeLabel }),
|
|
4348
|
+
kickoff && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "ss-w-mon-pill", children: [
|
|
4190
4349
|
kickoff.dayLabel,
|
|
4191
4350
|
" \xB7 ",
|
|
4192
4351
|
kickoff.time
|
|
4193
4352
|
] }),
|
|
4194
|
-
live && match.minuteLabel && /* @__PURE__ */ (0,
|
|
4195
|
-
match.competitionName && /* @__PURE__ */ (0,
|
|
4196
|
-
/* @__PURE__ */ (0,
|
|
4353
|
+
live && match.minuteLabel && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "ss-w-mon-min", children: match.minuteLabel }),
|
|
4354
|
+
match.competitionName && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "ss-w-mon-comp", children: match.competitionName }),
|
|
4355
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PinToggle, { ui, monitor, pin: { kind: "match", matchId: match.matchId } })
|
|
4197
4356
|
] }),
|
|
4198
|
-
/* @__PURE__ */ (0,
|
|
4199
|
-
/* @__PURE__ */ (0,
|
|
4200
|
-
/* @__PURE__ */ (0,
|
|
4201
|
-
/* @__PURE__ */ (0,
|
|
4357
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "ss-w-mon-main", children: [
|
|
4358
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "ss-w-mon-side", children: [
|
|
4359
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Crest2, { kind: "team", url: match.homeCrestUrl ?? void 0, name: match.homeTeamName ?? void 0 }),
|
|
4360
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "ss-w-mon-name", children: match.homeTeamName })
|
|
4202
4361
|
] }),
|
|
4203
|
-
match.phase === "preMatch" ? /* @__PURE__ */ (0,
|
|
4362
|
+
match.phase === "preMatch" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "ss-w-mon-vs", children: "vs" }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "ss-w-mon-score", children: [
|
|
4204
4363
|
match.homeScore,
|
|
4205
|
-
/* @__PURE__ */ (0,
|
|
4364
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("i", { children: "\u2013" }),
|
|
4206
4365
|
match.awayScore
|
|
4207
4366
|
] }),
|
|
4208
|
-
/* @__PURE__ */ (0,
|
|
4209
|
-
/* @__PURE__ */ (0,
|
|
4210
|
-
/* @__PURE__ */ (0,
|
|
4367
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "ss-w-mon-side ss-w-mon-side--away", children: [
|
|
4368
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Crest2, { kind: "team", url: match.awayCrestUrl ?? void 0, name: match.awayTeamName ?? void 0 }),
|
|
4369
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "ss-w-mon-name", children: match.awayTeamName })
|
|
4211
4370
|
] })
|
|
4212
4371
|
] }),
|
|
4213
|
-
(homeScorers.length > 0 || awayScorers.length > 0) && /* @__PURE__ */ (0,
|
|
4214
|
-
/* @__PURE__ */ (0,
|
|
4215
|
-
/* @__PURE__ */ (0,
|
|
4216
|
-
/* @__PURE__ */ (0,
|
|
4372
|
+
(homeScorers.length > 0 || awayScorers.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "ss-w-mon-scorers", children: [
|
|
4373
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("ul", { className: "ss-w-mon-scorers-col ss-w-mon-scorers-home", children: homeScorers.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("li", { children: s.label }, `${s.player}-${i}`)) }),
|
|
4374
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "ss-w-mon-scorers-ball", "aria-hidden": "true", children: "\u26BD" }),
|
|
4375
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("ul", { className: "ss-w-mon-scorers-col ss-w-mon-scorers-away", children: awayScorers.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("li", { children: s.label }, `${s.player}-${i}`)) })
|
|
4217
4376
|
] }),
|
|
4218
|
-
/* @__PURE__ */ (0,
|
|
4377
|
+
live && match.facts && match.facts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(LiveFactBlock, { facts: match.facts, matchId: match.matchId, ui, slip, onAsk }),
|
|
4378
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "ss-w-mon-stats", children: orderedRows.map((row) => {
|
|
4219
4379
|
const total = row.homeNum + row.awayNum;
|
|
4220
4380
|
const homePct = total > 0 ? row.homeNum / total * 75 : 0;
|
|
4221
4381
|
const awayPct = total > 0 ? row.awayNum / total * 75 : 0;
|
|
4222
4382
|
const promoted = isPromoted(row, promotedPins);
|
|
4223
|
-
const selection = chipSelection(row, match.matchId, slip.conversationId);
|
|
4224
|
-
return /* @__PURE__ */ (0,
|
|
4225
|
-
/* @__PURE__ */ (0,
|
|
4226
|
-
/* @__PURE__ */ (0,
|
|
4227
|
-
/* @__PURE__ */ (0,
|
|
4228
|
-
/* @__PURE__ */ (0,
|
|
4383
|
+
const selection = chipSelection(row.market, match.matchId, slip.conversationId);
|
|
4384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: promoted ? "ss-w-mon-stat ss-w-mon-pstrip" : "ss-w-mon-stat", children: [
|
|
4385
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "ss-w-mon-stat-row", children: [
|
|
4386
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "ss-w-mon-stat-v ss-w-mon-stat-v--home", children: row.homeValue }),
|
|
4387
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "ss-w-mon-stat-l", children: row.label }),
|
|
4388
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "ss-w-mon-stat-v ss-w-mon-stat-v--away", children: row.awayValue })
|
|
4229
4389
|
] }),
|
|
4230
|
-
/* @__PURE__ */ (0,
|
|
4231
|
-
/* @__PURE__ */ (0,
|
|
4232
|
-
/* @__PURE__ */ (0,
|
|
4390
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "ss-w-mon-bar", children: [
|
|
4391
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("b", { className: "ss-w-mon-bar-home", style: { width: `${homePct}%` } }),
|
|
4392
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("i", { className: "ss-w-mon-bar-away", style: { width: `${awayPct}%` } })
|
|
4233
4393
|
] }),
|
|
4234
|
-
row.market && !row.market.isSuspended && /* @__PURE__ */ (0,
|
|
4235
|
-
/* @__PURE__ */ (0,
|
|
4394
|
+
row.market && !row.market.isSuspended && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: promoted ? "ss-w-mon-stat-mkt ss-w-mon-mkt" : "ss-w-mon-stat-mkt", children: [
|
|
4395
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { children: [
|
|
4236
4396
|
row.market.marketLabel,
|
|
4237
4397
|
" \xB7 ",
|
|
4238
4398
|
row.market.selectionLabel
|
|
4239
4399
|
] }),
|
|
4240
|
-
/* @__PURE__ */ (0,
|
|
4241
|
-
typeof row.market.price === "number" && /* @__PURE__ */ (0,
|
|
4242
|
-
/* @__PURE__ */ (0,
|
|
4400
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "ss-w-mon-stat-mkt-right", children: [
|
|
4401
|
+
typeof row.market.price === "number" && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "ss-w-mon-price", children: row.market.price.toFixed(2) }),
|
|
4402
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4243
4403
|
SlipButton,
|
|
4244
4404
|
{
|
|
4245
4405
|
selection,
|
|
4246
4406
|
shownOdds: typeof row.market.price === "number" ? row.market.price.toFixed(2) : "",
|
|
4247
|
-
marketName: row.market.marketLabel,
|
|
4248
4407
|
marketDeveloperName: row.market.marketDeveloperName,
|
|
4408
|
+
selectionLabel: row.market.selectionLabel,
|
|
4249
4409
|
slip,
|
|
4250
4410
|
ui
|
|
4251
4411
|
}
|
|
@@ -4254,23 +4414,23 @@ function MonitorMatchCard({ match, promotedPins, monitor, ui, slip }) {
|
|
|
4254
4414
|
] })
|
|
4255
4415
|
] }, row.label);
|
|
4256
4416
|
}) }),
|
|
4257
|
-
match.status === "stale" && /* @__PURE__ */ (0,
|
|
4258
|
-
match.momentum.length > 0 && /* @__PURE__ */ (0,
|
|
4259
|
-
/* @__PURE__ */ (0,
|
|
4260
|
-
/* @__PURE__ */ (0,
|
|
4417
|
+
match.status === "stale" && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "ss-w-mon-asof", children: ui.asOf(formatTime(match.asOfUtc)) }),
|
|
4418
|
+
match.momentum.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "ss-w-mon-mom", children: [
|
|
4419
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "ss-w-mon-stat-l", children: ui.momentumLabel }),
|
|
4420
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(MomentumWave, { points: match.momentum, clubIsHome: true })
|
|
4261
4421
|
] }),
|
|
4262
|
-
match.phase === "fullTime" && /* @__PURE__ */ (0,
|
|
4422
|
+
match.phase === "fullTime" && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "ss-w-mon-grace", children: ui.graceNote })
|
|
4263
4423
|
] });
|
|
4264
4424
|
}
|
|
4265
4425
|
|
|
4266
4426
|
// src/components/MonitorTabs.tsx
|
|
4267
|
-
var
|
|
4427
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4268
4428
|
function OddsLiveStrip({ m, ui }) {
|
|
4269
4429
|
const showScore = m.phase !== "preMatch" && typeof m.homeScore === "number";
|
|
4270
4430
|
const stale = m.status === "stale";
|
|
4271
4431
|
if (!showScore && !m.minuteLabel && !(m.isSuspended && !m.isSettled) && !m.isSettled && !stale) return null;
|
|
4272
|
-
return /* @__PURE__ */ (0,
|
|
4273
|
-
showScore && /* @__PURE__ */ (0,
|
|
4432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "ss-w-mk-live", children: [
|
|
4433
|
+
showScore && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("b", { className: "ss-w-mk-live-score", children: [
|
|
4274
4434
|
m.homeTeamName,
|
|
4275
4435
|
" ",
|
|
4276
4436
|
m.homeScore,
|
|
@@ -4279,27 +4439,28 @@ function OddsLiveStrip({ m, ui }) {
|
|
|
4279
4439
|
" ",
|
|
4280
4440
|
m.awayTeamName
|
|
4281
4441
|
] }),
|
|
4282
|
-
m.minuteLabel && /* @__PURE__ */ (0,
|
|
4283
|
-
m.isSuspended && !m.isSettled && /* @__PURE__ */ (0,
|
|
4284
|
-
m.isSettled && /* @__PURE__ */ (0,
|
|
4285
|
-
stale && /* @__PURE__ */ (0,
|
|
4442
|
+
m.minuteLabel && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "ss-w-mon-min", children: m.minuteLabel }),
|
|
4443
|
+
m.isSuspended && !m.isSettled && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "ss-w-mon-susp", children: ui.suspendedLabel }),
|
|
4444
|
+
m.isSettled && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "ss-w-mon-pill", children: ui.fullTimeLabel }),
|
|
4445
|
+
stale && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "ss-w-mon-asof", children: ui.asOf(new Date(m.asOfUtc).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })) })
|
|
4286
4446
|
] });
|
|
4287
4447
|
}
|
|
4288
|
-
function MatchesPanel({ monitor, ui, slip }) {
|
|
4448
|
+
function MatchesPanel({ monitor, ui, slip, onAsk }) {
|
|
4289
4449
|
const matches = (monitor.snapshot?.matches ?? []).filter((m) => monitor.pins.some((p) => p.kind === "match" && p.matchId === m.matchId));
|
|
4290
|
-
if (matches.length === 0) return /* @__PURE__ */ (0,
|
|
4291
|
-
return /* @__PURE__ */ (0,
|
|
4292
|
-
/* @__PURE__ */ (0,
|
|
4450
|
+
if (matches.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "ss-w-mon-empty", children: ui.emptyMatchesTab });
|
|
4451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "ss-w-mon-list", children: matches.map((m) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "ss-w-mon-item", children: [
|
|
4452
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4293
4453
|
MonitorMatchCard,
|
|
4294
4454
|
{
|
|
4295
4455
|
match: m,
|
|
4296
4456
|
promotedPins: monitor.pins.filter((p) => p.kind !== "match" && p.matchId === m.matchId),
|
|
4297
4457
|
monitor,
|
|
4298
4458
|
ui,
|
|
4299
|
-
slip
|
|
4459
|
+
slip,
|
|
4460
|
+
onAsk
|
|
4300
4461
|
}
|
|
4301
4462
|
),
|
|
4302
|
-
/* @__PURE__ */ (0,
|
|
4463
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(MarketAccordion, { match: m, monitor, ui, slip })
|
|
4303
4464
|
] }, m.matchId)) });
|
|
4304
4465
|
}
|
|
4305
4466
|
function withSinceViewMovement(vm, prev) {
|
|
@@ -4314,12 +4475,12 @@ function withSinceViewMovement(vm, prev) {
|
|
|
4314
4475
|
}
|
|
4315
4476
|
function OddsPanel({ monitor, ui, slip }) {
|
|
4316
4477
|
const markets = (monitor.snapshot?.markets ?? []).filter((m) => monitor.pins.some((p) => p.key === m.key));
|
|
4317
|
-
if (markets.length === 0) return /* @__PURE__ */ (0,
|
|
4318
|
-
return /* @__PURE__ */ (0,
|
|
4478
|
+
if (markets.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "ss-w-mon-empty", children: ui.emptyOddsTab });
|
|
4479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "ss-w-mon-list", children: markets.map((m) => {
|
|
4319
4480
|
const pin = monitor.pins.find((p) => p.key === m.key);
|
|
4320
|
-
return /* @__PURE__ */ (0,
|
|
4321
|
-
/* @__PURE__ */ (0,
|
|
4322
|
-
m.card && /* @__PURE__ */ (0,
|
|
4481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "ss-w-mon-oddspin", "data-settled": m.isSettled || void 0, children: [
|
|
4482
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(OddsLiveStrip, { m, ui }),
|
|
4483
|
+
m.card && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4323
4484
|
MarketOddsCardList,
|
|
4324
4485
|
{
|
|
4325
4486
|
cards: [withSinceViewMovement(toMarketOddsVM(m.card), monitor.lastViewedPrices[m.key])],
|
|
@@ -4330,22 +4491,22 @@ function OddsPanel({ monitor, ui, slip }) {
|
|
|
4330
4491
|
inSlipIds: monitor.inSlip
|
|
4331
4492
|
}
|
|
4332
4493
|
),
|
|
4333
|
-
m.history && /* @__PURE__ */ (0,
|
|
4334
|
-
!m.card && !m.history && /* @__PURE__ */ (0,
|
|
4494
|
+
m.history && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(OddsMovementCardList, { cards: [toOddsMovementVM(m.history)], ui }),
|
|
4495
|
+
!m.card && !m.history && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "ss-w-mon-empty-card", children: ui.oddsUnavailable })
|
|
4335
4496
|
] }, m.key);
|
|
4336
4497
|
}) });
|
|
4337
4498
|
}
|
|
4338
4499
|
|
|
4339
4500
|
// src/components/FixtureRow.tsx
|
|
4340
|
-
var
|
|
4501
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4341
4502
|
function kickoffLabel(kickoffUnix) {
|
|
4342
4503
|
const d = new Date(kickoffUnix * 1e3);
|
|
4343
4504
|
return `${`${d.getHours()}`.padStart(2, "0")}:${`${d.getMinutes()}`.padStart(2, "0")}`;
|
|
4344
4505
|
}
|
|
4345
4506
|
function Side({ name, crest, away = false }) {
|
|
4346
|
-
return /* @__PURE__ */ (0,
|
|
4347
|
-
crest ? /* @__PURE__ */ (0,
|
|
4348
|
-
/* @__PURE__ */ (0,
|
|
4507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("span", { className: away ? "ss-w-drow-side ss-w-drow-side--away" : "ss-w-drow-side", children: [
|
|
4508
|
+
crest ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("img", { className: "ss-w-drow-crest", src: crest, alt: "" }) : null,
|
|
4509
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "ss-w-drow-nm", children: name })
|
|
4349
4510
|
] });
|
|
4350
4511
|
}
|
|
4351
4512
|
function FixtureRow({ match, state, stale, ui, monitor }) {
|
|
@@ -4353,45 +4514,45 @@ function FixtureRow({ match, state, stale, ui, monitor }) {
|
|
|
4353
4514
|
const hasScore = (state?.phase === "live" || state?.phase === "fullTime") && typeof state.homeScore === "number" && typeof state.awayScore === "number";
|
|
4354
4515
|
const ticked = state?.phase === "live" ? state.minuteLabel ?? null : null;
|
|
4355
4516
|
const when = state?.isHalfTime && !stale ? ui.halfTime : isLive ? ticked ?? "\u2014" : state?.phase === "live" ? "\u2014" : kickoffLabel(match.kickoffUnix);
|
|
4356
|
-
return /* @__PURE__ */ (0,
|
|
4357
|
-
/* @__PURE__ */ (0,
|
|
4358
|
-
/* @__PURE__ */ (0,
|
|
4359
|
-
/* @__PURE__ */ (0,
|
|
4360
|
-
/* @__PURE__ */ (0,
|
|
4361
|
-
/* @__PURE__ */ (0,
|
|
4517
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: isLive || state?.isHalfTime ? "ss-w-drow ss-w-drow--live" : "ss-w-drow", children: [
|
|
4518
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: isLive || state?.isHalfTime ? "ss-w-drow-when ss-w-drow-when--live" : "ss-w-drow-when", children: when }),
|
|
4519
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("span", { className: "ss-w-drow-fx", children: [
|
|
4520
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Side, { name: match.homeTeamName, crest: match.homeTeamImagePath }),
|
|
4521
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: hasScore ? "ss-w-drow-sc" : "ss-w-drow-sc ss-w-drow-sc--idle", children: hasScore ? `${state.homeScore}\u2013${state.awayScore}` : "\u2013" }),
|
|
4522
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Side, { name: match.awayTeamName, crest: match.awayTeamImagePath, away: true })
|
|
4362
4523
|
] }),
|
|
4363
|
-
/* @__PURE__ */ (0,
|
|
4524
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PinToggle, { ui, monitor, pin: { kind: "match", matchId: match.matchId } })
|
|
4364
4525
|
] });
|
|
4365
4526
|
}
|
|
4366
4527
|
|
|
4367
4528
|
// src/components/CompetitionGroup.tsx
|
|
4368
|
-
var
|
|
4529
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4369
4530
|
function CompetitionGroup({ group, open, onToggle, states, stale, ui, monitor, disambiguate = false }) {
|
|
4370
4531
|
const own = group.matches.filter((m) => !isTreatedLive(states[m.matchId], stale));
|
|
4371
4532
|
const hasLive = own.length !== group.matches.length;
|
|
4372
4533
|
if (own.length === 0) {
|
|
4373
4534
|
return null;
|
|
4374
4535
|
}
|
|
4375
|
-
return /* @__PURE__ */ (0,
|
|
4376
|
-
/* @__PURE__ */ (0,
|
|
4377
|
-
/* @__PURE__ */ (0,
|
|
4378
|
-
hasLive && /* @__PURE__ */ (0,
|
|
4379
|
-
/* @__PURE__ */ (0,
|
|
4536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "ss-w-grp", children: [
|
|
4537
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("button", { type: "button", className: "ss-w-grp-head", "aria-expanded": open, onClick: onToggle, children: [
|
|
4538
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "ss-w-grp-chev", children: open ? "\u25BE" : "\u25B8" }),
|
|
4539
|
+
hasLive && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "ss-w-sec-dot", "aria-hidden": "true" }),
|
|
4540
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: "ss-w-grp-name", children: [
|
|
4380
4541
|
group.competitionName,
|
|
4381
|
-
disambiguate && group.competitionCountry ? /* @__PURE__ */ (0,
|
|
4542
|
+
disambiguate && group.competitionCountry ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: "ss-w-grp-country", children: [
|
|
4382
4543
|
" (",
|
|
4383
4544
|
group.competitionCountry,
|
|
4384
4545
|
")"
|
|
4385
4546
|
] }) : null
|
|
4386
4547
|
] }),
|
|
4387
|
-
/* @__PURE__ */ (0,
|
|
4548
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "ss-w-grp-count", children: own.length })
|
|
4388
4549
|
] }),
|
|
4389
|
-
open && /* @__PURE__ */ (0,
|
|
4550
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "ss-w-grp-body", children: own.map((m) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(FixtureRow, { match: m, state: states[m.matchId], stale, ui, monitor }, m.matchId)) })
|
|
4390
4551
|
] });
|
|
4391
4552
|
}
|
|
4392
4553
|
|
|
4393
4554
|
// src/components/TodayPanel.tsx
|
|
4394
|
-
var
|
|
4555
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
4395
4556
|
function TodayPanel({ discovery, ui, monitor }) {
|
|
4396
4557
|
const { groups, states, stale, expanded, toggleGroup } = discovery;
|
|
4397
4558
|
const visibleGroups = visibleGroupsOf(groups, states);
|
|
@@ -4400,14 +4561,14 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
4400
4561
|
acc[g.competitionName] = (acc[g.competitionName] ?? 0) + 1;
|
|
4401
4562
|
return acc;
|
|
4402
4563
|
}, {});
|
|
4403
|
-
return /* @__PURE__ */ (0,
|
|
4404
|
-
stale && /* @__PURE__ */ (0,
|
|
4405
|
-
liveRows.length > 0 && /* @__PURE__ */ (0,
|
|
4406
|
-
/* @__PURE__ */ (0,
|
|
4407
|
-
/* @__PURE__ */ (0,
|
|
4564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "ss-w-mon-list", children: [
|
|
4565
|
+
stale && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "ss-w-stale", children: ui.staleStates }),
|
|
4566
|
+
liveRows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
4567
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "ss-w-sec-head", children: [
|
|
4568
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "ss-w-sec-dot", "aria-hidden": "true" }),
|
|
4408
4569
|
ui.sectionLive
|
|
4409
4570
|
] }),
|
|
4410
|
-
/* @__PURE__ */ (0,
|
|
4571
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "ss-w-today-live", children: liveRows.map(({ match }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4411
4572
|
FixtureRow,
|
|
4412
4573
|
{
|
|
4413
4574
|
match,
|
|
@@ -4419,7 +4580,7 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
4419
4580
|
match.matchId
|
|
4420
4581
|
)) })
|
|
4421
4582
|
] }),
|
|
4422
|
-
visibleGroups.map((group) => /* @__PURE__ */ (0,
|
|
4583
|
+
visibleGroups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4423
4584
|
CompetitionGroup,
|
|
4424
4585
|
{
|
|
4425
4586
|
group,
|
|
@@ -4437,16 +4598,16 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
4437
4598
|
}
|
|
4438
4599
|
|
|
4439
4600
|
// src/components/GamesPanel.tsx
|
|
4440
|
-
var
|
|
4601
|
+
var import_react43 = require("react");
|
|
4441
4602
|
|
|
4442
4603
|
// src/components/GamesLoginWall.tsx
|
|
4443
|
-
var
|
|
4604
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
4444
4605
|
function GamesLoginWall({ ui }) {
|
|
4445
|
-
return /* @__PURE__ */ (0,
|
|
4606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "ss-w-games-wall", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { children: ui.gamesLoginRequired }) }) });
|
|
4446
4607
|
}
|
|
4447
4608
|
|
|
4448
4609
|
// src/components/GamesHub.tsx
|
|
4449
|
-
var
|
|
4610
|
+
var import_react30 = require("react");
|
|
4450
4611
|
|
|
4451
4612
|
// src/components/games/ui/gameMeta.ts
|
|
4452
4613
|
function prettifyGameId(gameId) {
|
|
@@ -4462,75 +4623,75 @@ function splitName(full) {
|
|
|
4462
4623
|
}
|
|
4463
4624
|
|
|
4464
4625
|
// src/components/GameTileArt.tsx
|
|
4465
|
-
var
|
|
4626
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
4466
4627
|
function GameTileArt({ gameId }) {
|
|
4467
|
-
return /* @__PURE__ */ (0,
|
|
4628
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("svg", { className: "ss-g-art", viewBox: "0 0 120 74", "aria-hidden": "true", children: ART[gameId] ?? ART.default });
|
|
4468
4629
|
}
|
|
4469
|
-
var head = (cx, cy, r, cls = "ss-g-art-fg") => /* @__PURE__ */ (0,
|
|
4470
|
-
/* @__PURE__ */ (0,
|
|
4471
|
-
/* @__PURE__ */ (0,
|
|
4630
|
+
var head = (cx, cy, r, cls = "ss-g-art-fg") => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("g", { className: cls, children: [
|
|
4631
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("circle", { cx, cy: cy - r * 0.3, r: r * 0.45 }),
|
|
4632
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("path", { d: `M${cx - r} ${cy + r}c0-${r * 0.8} ${r * 0.45}-${r * 1.1} ${r}-${r * 1.1}s${r} ${r * 0.3} ${r} ${r * 1.1}z` })
|
|
4472
4633
|
] });
|
|
4473
4634
|
var ART = {
|
|
4474
|
-
"mystery-tiger": /* @__PURE__ */ (0,
|
|
4635
|
+
"mystery-tiger": /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
4475
4636
|
head(60, 38, 26, "ss-g-art-fg"),
|
|
4476
|
-
/* @__PURE__ */ (0,
|
|
4637
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("text", { x: "60", y: "36", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
|
|
4477
4638
|
] }),
|
|
4478
|
-
"higher-or-lower": /* @__PURE__ */ (0,
|
|
4639
|
+
"higher-or-lower": /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
4479
4640
|
head(32, 38, 20),
|
|
4480
4641
|
head(88, 38, 20),
|
|
4481
|
-
/* @__PURE__ */ (0,
|
|
4482
|
-
/* @__PURE__ */ (0,
|
|
4642
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("circle", { cx: "60", cy: "37", r: "11", className: "ss-g-art-accent" }),
|
|
4643
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("path", { d: "M57 33l3-3 3 3M57 41l3 3 3-3", className: "ss-g-art-ink" })
|
|
4483
4644
|
] }),
|
|
4484
|
-
"guess-the-xi": /* @__PURE__ */ (0,
|
|
4485
|
-
/* @__PURE__ */ (0,
|
|
4486
|
-
[[60, 60, "a"], [24, 46], [48, 46], [72, 46], [96, 46], [36, 30], [60, 30], [84, 30], [40, 14], [60, 14], [80, 14]].map(([x, y, a], i) => /* @__PURE__ */ (0,
|
|
4645
|
+
"guess-the-xi": /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
4646
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
|
|
4647
|
+
[[60, 60, "a"], [24, 46], [48, 46], [72, 46], [96, 46], [36, 30], [60, 30], [84, 30], [40, 14], [60, 14], [80, 14]].map(([x, y, a], i) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("circle", { cx: x, cy: y, r: "4", className: a ? "ss-g-art-accent" : "ss-g-art-dot" }, i))
|
|
4487
4648
|
] }),
|
|
4488
|
-
"daily-quiz": /* @__PURE__ */ (0,
|
|
4489
|
-
"career-path": /* @__PURE__ */ (0,
|
|
4490
|
-
/* @__PURE__ */ (0,
|
|
4491
|
-
/* @__PURE__ */ (0,
|
|
4492
|
-
/* @__PURE__ */ (0,
|
|
4493
|
-
/* @__PURE__ */ (0,
|
|
4494
|
-
/* @__PURE__ */ (0,
|
|
4649
|
+
"daily-quiz": /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_jsx_runtime54.Fragment, { children: [[14, 8], [62, 8], [14, 40], [62, 40]].map(([x, y], i) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("rect", { x, y, width: "44", height: "26", rx: "5", className: i === 1 ? "ss-g-art-correct" : "ss-g-art-block" }, i)) }),
|
|
4650
|
+
"career-path": /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
4651
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("path", { d: "M18 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z", className: "ss-g-art-fg" }),
|
|
4652
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("path", { d: "M48 37h8M84 37h8", className: "ss-g-art-line" }),
|
|
4653
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("path", { d: "M60 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z", className: "ss-g-art-fg" }),
|
|
4654
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("rect", { x: "96", y: "22", width: "18", height: "26", rx: "4", className: "ss-g-art-dash" }),
|
|
4655
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("text", { x: "105", y: "40", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
|
|
4495
4656
|
] }),
|
|
4496
|
-
"beat-the-grid": /* @__PURE__ */ (0,
|
|
4497
|
-
"matchday-predictor": /* @__PURE__ */ (0,
|
|
4498
|
-
/* @__PURE__ */ (0,
|
|
4499
|
-
/* @__PURE__ */ (0,
|
|
4500
|
-
/* @__PURE__ */ (0,
|
|
4501
|
-
/* @__PURE__ */ (0,
|
|
4657
|
+
"beat-the-grid": /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_jsx_runtime54.Fragment, { children: [0, 1, 2].flatMap((r) => [0, 1, 2].map((c) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("rect", { x: 33 + c * 19, y: 10 + r * 19, width: "16", height: "16", rx: "3", className: (r + c) % 3 === 0 ? "ss-g-art-accent" : "ss-g-art-block" }, `${r}${c}`))) }),
|
|
4658
|
+
"matchday-predictor": /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
4659
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("path", { d: "M10 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z", className: "ss-g-art-fg" }),
|
|
4660
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("rect", { x: "38", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-accent-stroke" }),
|
|
4661
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("rect", { x: "64", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-dash" }),
|
|
4662
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("path", { d: "M90 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z", className: "ss-g-art-fg" })
|
|
4502
4663
|
] }),
|
|
4503
|
-
"starting-xi": /* @__PURE__ */ (0,
|
|
4504
|
-
/* @__PURE__ */ (0,
|
|
4505
|
-
[[60, 60], [30, 46], [50, 46], [70, 46], [90, 46], [45, 30], [75, 30], [30, 16], [60, 16], [90, 16]].map(([x, y], i) => /* @__PURE__ */ (0,
|
|
4664
|
+
"starting-xi": /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
4665
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
|
|
4666
|
+
[[60, 60], [30, 46], [50, 46], [70, 46], [90, 46], [45, 30], [75, 30], [30, 16], [60, 16], [90, 16]].map(([x, y], i) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("circle", { cx: x, cy: y, r: "5", className: i < 7 ? "ss-g-art-accent" : "ss-g-art-dash" }, i))
|
|
4506
4667
|
] }),
|
|
4507
|
-
"stat-ladder": /* @__PURE__ */ (0,
|
|
4508
|
-
"fan-motm": /* @__PURE__ */ (0,
|
|
4509
|
-
/* @__PURE__ */ (0,
|
|
4668
|
+
"stat-ladder": /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_jsx_runtime54.Fragment, { children: [[20, 70], [34, 52], [48, 34]].map(([y, w], i) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("rect", { x: "24", y, width: w, height: "12", rx: "3", className: i === 1 ? "ss-g-art-accent" : "ss-g-art-block" }, i)) }),
|
|
4669
|
+
"fan-motm": /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
4670
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("circle", { cx: "60", cy: "37", r: "26", className: "ss-g-art-accent-stroke" }),
|
|
4510
4671
|
head(60, 40, 18),
|
|
4511
|
-
/* @__PURE__ */ (0,
|
|
4672
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("path", { d: "M84 8l2.4 5 5.4.6-4 3.7 1.1 5.4-4.9-2.7-4.9 2.7 1.1-5.4-4-3.7 5.4-.6z", className: "ss-g-art-accent" })
|
|
4512
4673
|
] }),
|
|
4513
|
-
default: /* @__PURE__ */ (0,
|
|
4674
|
+
default: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("circle", { cx: "60", cy: "37", r: "22", className: "ss-g-art-fg" })
|
|
4514
4675
|
};
|
|
4515
4676
|
|
|
4516
4677
|
// src/components/games/ui/Chip.tsx
|
|
4517
|
-
var
|
|
4678
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4518
4679
|
function Chip({ variant = "neutral", icon, children, className }) {
|
|
4519
|
-
return /* @__PURE__ */ (0,
|
|
4680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { className: `ss-g-chip ss-g-chip--${variant}${className ? ` ${className}` : ""}`, children: [
|
|
4520
4681
|
icon,
|
|
4521
4682
|
children
|
|
4522
4683
|
] });
|
|
4523
4684
|
}
|
|
4524
4685
|
function StatStack({ value, label }) {
|
|
4525
|
-
return /* @__PURE__ */ (0,
|
|
4526
|
-
/* @__PURE__ */ (0,
|
|
4527
|
-
/* @__PURE__ */ (0,
|
|
4686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { className: "ss-g-statstack", children: [
|
|
4687
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "ss-g-statstack-v", children: value }),
|
|
4688
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "ss-g-statstack-l", children: label })
|
|
4528
4689
|
] });
|
|
4529
4690
|
}
|
|
4530
4691
|
|
|
4531
4692
|
// src/components/games/ui/icons.tsx
|
|
4532
|
-
var
|
|
4533
|
-
var svg = (size, children, fill = false) => /* @__PURE__ */ (0,
|
|
4693
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
4694
|
+
var svg = (size, children, fill = false) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
4534
4695
|
"svg",
|
|
4535
4696
|
{
|
|
4536
4697
|
width: size,
|
|
@@ -4545,25 +4706,25 @@ var svg = (size, children, fill = false) => /* @__PURE__ */ (0, import_jsx_runti
|
|
|
4545
4706
|
children
|
|
4546
4707
|
}
|
|
4547
4708
|
);
|
|
4548
|
-
var IconChevronLeft = ({ size = 20 }) => svg(size, /* @__PURE__ */ (0,
|
|
4549
|
-
var IconLock = ({ size = 14 }) => svg(size, [/* @__PURE__ */ (0,
|
|
4550
|
-
var IconCheck = ({ size = 14 }) => svg(size, /* @__PURE__ */ (0,
|
|
4551
|
-
var IconClose = ({ size = 16 }) => svg(size, /* @__PURE__ */ (0,
|
|
4552
|
-
var IconSearch = ({ size = 18 }) => svg(size, [/* @__PURE__ */ (0,
|
|
4553
|
-
var IconPlus = ({ size = 20 }) => svg(size, /* @__PURE__ */ (0,
|
|
4554
|
-
var IconBulb = ({ size = 16 }) => svg(size, [/* @__PURE__ */ (0,
|
|
4555
|
-
var IconArrowUp = ({ size = 12 }) => svg(size, /* @__PURE__ */ (0,
|
|
4556
|
-
var IconArrowDown = ({ size = 12 }) => svg(size, /* @__PURE__ */ (0,
|
|
4557
|
-
var IconCalendar = ({ size = 18 }) => svg(size, [/* @__PURE__ */ (0,
|
|
4558
|
-
var IconShield = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0,
|
|
4559
|
-
var IconFlag = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0,
|
|
4560
|
-
var IconBall = ({ size = 18 }) => svg(size, [/* @__PURE__ */ (0,
|
|
4561
|
-
var IconBoot = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0,
|
|
4562
|
-
var IconGloves = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0,
|
|
4563
|
-
var IconFlame = ({ size = 16 }) => svg(size, /* @__PURE__ */ (0,
|
|
4709
|
+
var IconChevronLeft = ({ size = 20 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M15 18l-6-6 6-6" }));
|
|
4710
|
+
var IconLock = ({ size = 14 }) => svg(size, [/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("rect", { x: "5", y: "11", width: "14", height: "10", rx: "2" }, "a"), /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M8 11V7a4 4 0 0 1 8 0v4" }, "b")]);
|
|
4711
|
+
var IconCheck = ({ size = 14 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M5 12l5 5 9-10" }));
|
|
4712
|
+
var IconClose = ({ size = 16 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M6 6l12 12M18 6L6 18" }));
|
|
4713
|
+
var IconSearch = ({ size = 18 }) => svg(size, [/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("circle", { cx: "11", cy: "11", r: "7" }, "a"), /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M20 20l-3.5-3.5" }, "b")]);
|
|
4714
|
+
var IconPlus = ({ size = 20 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M12 5v14M5 12h14" }));
|
|
4715
|
+
var IconBulb = ({ size = 16 }) => svg(size, [/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M9 18h6M10 21h4" }, "a"), /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M12 3a6 6 0 0 0-3.5 10.9V16h7v-2.1A6 6 0 0 0 12 3z" }, "b")]);
|
|
4716
|
+
var IconArrowUp = ({ size = 12 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M12 19V5M5 12l7-7 7 7" }));
|
|
4717
|
+
var IconArrowDown = ({ size = 12 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M12 5v14M19 12l-7 7-7-7" }));
|
|
4718
|
+
var IconCalendar = ({ size = 18 }) => svg(size, [/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("rect", { x: "4", y: "5", width: "16", height: "15", rx: "2" }, "a"), /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M4 10h16M9 3v4M15 3v4" }, "b")]);
|
|
4719
|
+
var IconShield = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M12 3l7 3v6c0 5-3 8-7 9-4-1-7-4-7-9V6z" }));
|
|
4720
|
+
var IconFlag = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M5 21V4M5 4h12l-2 4 2 4H5" }));
|
|
4721
|
+
var IconBall = ({ size = 18 }) => svg(size, [/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("circle", { cx: "12", cy: "12", r: "9" }, "a"), /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M12 7l4 3-1.5 4.5h-5L8 10z" }, "b")]);
|
|
4722
|
+
var IconBoot = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M4 6h6l1 6 8 3v3H4z" }));
|
|
4723
|
+
var IconGloves = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M7 21v-8l-2-3V6a1.5 1.5 0 0 1 3 0v3V4a1.5 1.5 0 0 1 3 0v5V3.5a1.5 1.5 0 0 1 3 0V9V5a1.5 1.5 0 0 1 3 0v9l-2 3v4z" }));
|
|
4724
|
+
var IconFlame = ({ size = 16 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M12 3c1 4 5 5 5 10a5 5 0 0 1-10 0c0-3 2-4 2-7 1.5 1 2 2 2 3 1-2 1-4 1-6z" }), true);
|
|
4564
4725
|
|
|
4565
4726
|
// src/components/GameTile.tsx
|
|
4566
|
-
var
|
|
4727
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
4567
4728
|
function tileStatus(game, ui) {
|
|
4568
4729
|
switch (game.status) {
|
|
4569
4730
|
case "locked":
|
|
@@ -4587,38 +4748,38 @@ function GameTile({ game, onOpen, ui, variant = "tile" }) {
|
|
|
4587
4748
|
const status = tileStatus(game, ui);
|
|
4588
4749
|
const disabled = DISABLED.has(game.status);
|
|
4589
4750
|
const title = gameTitle(game, ui.games.titles);
|
|
4590
|
-
const body = variant === "hero" ? /* @__PURE__ */ (0,
|
|
4591
|
-
/* @__PURE__ */ (0,
|
|
4592
|
-
/* @__PURE__ */ (0,
|
|
4593
|
-
status.tone === "new" && /* @__PURE__ */ (0,
|
|
4594
|
-
/* @__PURE__ */ (0,
|
|
4595
|
-
/* @__PURE__ */ (0,
|
|
4596
|
-
status.tone === "success" ? /* @__PURE__ */ (0,
|
|
4751
|
+
const body = variant === "hero" ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
|
|
4752
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "ss-g-hero-text", children: [
|
|
4753
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-g-hero-eyebrow", children: ui.games.dailyChallenge }),
|
|
4754
|
+
status.tone === "new" && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Chip, { variant: "badge", children: ui.games.newToday }),
|
|
4755
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-g-hero-title", children: title }),
|
|
4756
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-g-hero-sub", children: ui.games.taglines[game.gameId] ?? "" }),
|
|
4757
|
+
status.tone === "success" ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-g-tile-status", "data-tone": "success", children: status.text }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "ss-g-hero-cta", children: [
|
|
4597
4758
|
status.tone === "accent" ? ui.games.resume : ui.games.playNow,
|
|
4598
4759
|
" \u2192"
|
|
4599
4760
|
] })
|
|
4600
4761
|
] }),
|
|
4601
|
-
/* @__PURE__ */ (0,
|
|
4602
|
-
] }) : variant === "wide" ? /* @__PURE__ */ (0,
|
|
4603
|
-
/* @__PURE__ */ (0,
|
|
4604
|
-
/* @__PURE__ */ (0,
|
|
4605
|
-
/* @__PURE__ */ (0,
|
|
4606
|
-
/* @__PURE__ */ (0,
|
|
4607
|
-
status.tone === "new" && /* @__PURE__ */ (0,
|
|
4762
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-g-hero-art", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(GameTileArt, { gameId: game.gameId }) })
|
|
4763
|
+
] }) : variant === "wide" ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
|
|
4764
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-g-wide-art", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(GameTileArt, { gameId: game.gameId }) }),
|
|
4765
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "ss-g-wide-text", children: [
|
|
4766
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-g-tile-title", children: title }),
|
|
4767
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-g-tile-status", "data-tone": status.tone, children: status.text }),
|
|
4768
|
+
status.tone === "new" && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Chip, { variant: "badge", children: ui.games.newToday })
|
|
4608
4769
|
] }),
|
|
4609
|
-
/* @__PURE__ */ (0,
|
|
4610
|
-
] }) : /* @__PURE__ */ (0,
|
|
4611
|
-
/* @__PURE__ */ (0,
|
|
4612
|
-
/* @__PURE__ */ (0,
|
|
4613
|
-
/* @__PURE__ */ (0,
|
|
4770
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-g-wide-chev", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(IconChevronLeft, { size: 18 }) })
|
|
4771
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
|
|
4772
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-g-tile-art", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(GameTileArt, { gameId: game.gameId }) }),
|
|
4773
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-g-tile-title", children: title }),
|
|
4774
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-g-tile-status", "data-tone": status.tone, children: status.text })
|
|
4614
4775
|
] });
|
|
4615
4776
|
const cls = `ss-g-tile ss-g-tile--${variant}`;
|
|
4616
|
-
if (disabled) return /* @__PURE__ */ (0,
|
|
4617
|
-
return /* @__PURE__ */ (0,
|
|
4777
|
+
if (disabled) return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: cls, "data-disabled": true, "aria-disabled": "true", children: body });
|
|
4778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("button", { type: "button", className: cls, "aria-label": `${title} \u2014 ${status.text}`, onClick: () => onOpen(game), children: body });
|
|
4618
4779
|
}
|
|
4619
4780
|
|
|
4620
4781
|
// src/components/GamesHub.tsx
|
|
4621
|
-
var
|
|
4782
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
4622
4783
|
var PLAYABLE = /* @__PURE__ */ new Set(["available", "in_progress"]);
|
|
4623
4784
|
var DONE = /* @__PURE__ */ new Set(["played", "graded"]);
|
|
4624
4785
|
function pickHeroGame(games) {
|
|
@@ -4631,8 +4792,8 @@ function pickHeroGame(games) {
|
|
|
4631
4792
|
}
|
|
4632
4793
|
var tileKey = (g) => `${g.gameId}-${g.gameDay}-${g.fixtureId}`;
|
|
4633
4794
|
function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
|
|
4634
|
-
const [, setTick] = (0,
|
|
4635
|
-
(0,
|
|
4795
|
+
const [, setTick] = (0, import_react30.useState)(0);
|
|
4796
|
+
(0, import_react30.useEffect)(() => {
|
|
4636
4797
|
const id = setInterval(() => setTick((t) => t + 1), 6e4);
|
|
4637
4798
|
return () => clearInterval(id);
|
|
4638
4799
|
}, []);
|
|
@@ -4644,58 +4805,58 @@ function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
|
|
|
4644
4805
|
const kickoffs = fixtures.map((g) => g.kickoffUtc).filter((k) => !!k).sort();
|
|
4645
4806
|
const todayPts = games.filter((g) => DONE.has(g.status)).reduce((s, g) => s + (g.score ?? 0), 0);
|
|
4646
4807
|
const dash = "\u2014";
|
|
4647
|
-
return /* @__PURE__ */ (0,
|
|
4648
|
-
/* @__PURE__ */ (0,
|
|
4649
|
-
/* @__PURE__ */ (0,
|
|
4650
|
-
/* @__PURE__ */ (0,
|
|
4651
|
-
/* @__PURE__ */ (0,
|
|
4652
|
-
myWeeklyRow ? /* @__PURE__ */ (0,
|
|
4653
|
-
/* @__PURE__ */ (0,
|
|
4808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "ss-g-hub", children: [
|
|
4809
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "ss-g-stats", children: [
|
|
4810
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "ss-g-stat", children: [
|
|
4811
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "ss-g-stat-l", children: ui.games.statStreak }),
|
|
4812
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className: "ss-g-stat-v", "data-testid": "stat-streak", children: [
|
|
4813
|
+
myWeeklyRow ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
|
|
4814
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(IconFlame, {}),
|
|
4654
4815
|
myWeeklyRow.currentStreak
|
|
4655
4816
|
] }) : dash,
|
|
4656
|
-
myWeeklyRow && /* @__PURE__ */ (0,
|
|
4817
|
+
myWeeklyRow && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("small", { children: ui.games.unitDays })
|
|
4657
4818
|
] })
|
|
4658
4819
|
] }),
|
|
4659
|
-
/* @__PURE__ */ (0,
|
|
4660
|
-
/* @__PURE__ */ (0,
|
|
4661
|
-
/* @__PURE__ */ (0,
|
|
4820
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "ss-g-stat", children: [
|
|
4821
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "ss-g-stat-l", children: ui.games.statToday }),
|
|
4822
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className: "ss-g-stat-v ss-g-stat-v--accent", "data-testid": "stat-today", children: [
|
|
4662
4823
|
ui.games.formatPts(todayPts),
|
|
4663
|
-
/* @__PURE__ */ (0,
|
|
4824
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("small", { children: ui.games.unitPts })
|
|
4664
4825
|
] })
|
|
4665
4826
|
] }),
|
|
4666
|
-
/* @__PURE__ */ (0,
|
|
4667
|
-
/* @__PURE__ */ (0,
|
|
4668
|
-
/* @__PURE__ */ (0,
|
|
4827
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "ss-g-stat", children: [
|
|
4828
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "ss-g-stat-l", children: ui.games.statRank }),
|
|
4829
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className: "ss-g-stat-v", "data-testid": "stat-rank", children: [
|
|
4669
4830
|
myWeeklyRow ? `#${myWeeklyRow.rank}` : dash,
|
|
4670
|
-
myWeeklyRow && /* @__PURE__ */ (0,
|
|
4831
|
+
myWeeklyRow && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("small", { children: ui.games.thisWeek })
|
|
4671
4832
|
] })
|
|
4672
4833
|
] })
|
|
4673
4834
|
] }),
|
|
4674
|
-
weeklyPrize && /* @__PURE__ */ (0,
|
|
4675
|
-
hero && /* @__PURE__ */ (0,
|
|
4676
|
-
(grid.length > 0 || wide) && /* @__PURE__ */ (0,
|
|
4677
|
-
/* @__PURE__ */ (0,
|
|
4678
|
-
/* @__PURE__ */ (0,
|
|
4679
|
-
/* @__PURE__ */ (0,
|
|
4835
|
+
weeklyPrize && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Chip, { variant: "accent", className: "ss-g-prize", children: weeklyPrize }),
|
|
4836
|
+
hero && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(GameTile, { game: hero, onOpen, ui, variant: "hero" }),
|
|
4837
|
+
(grid.length > 0 || wide) && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("section", { className: "ss-g-sec", children: [
|
|
4838
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "ss-g-sec-head", children: [
|
|
4839
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h3", { children: ui.games.dailyGames }),
|
|
4840
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { children: ui.games.newSetAtMidnight })
|
|
4680
4841
|
] }),
|
|
4681
|
-
grid.length > 0 && /* @__PURE__ */ (0,
|
|
4682
|
-
wide && /* @__PURE__ */ (0,
|
|
4842
|
+
grid.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "ss-g-grid", children: grid.map((g) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(GameTile, { game: g, onOpen, ui }, tileKey(g))) }),
|
|
4843
|
+
wide && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(GameTile, { game: wide, onOpen, ui, variant: "wide" })
|
|
4683
4844
|
] }),
|
|
4684
|
-
fixtures.length > 0 && /* @__PURE__ */ (0,
|
|
4685
|
-
/* @__PURE__ */ (0,
|
|
4686
|
-
/* @__PURE__ */ (0,
|
|
4687
|
-
kickoffs[0] && /* @__PURE__ */ (0,
|
|
4845
|
+
fixtures.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("section", { className: "ss-g-sec", children: [
|
|
4846
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "ss-g-sec-head", children: [
|
|
4847
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h3", { children: ui.games.matchdayGames }),
|
|
4848
|
+
kickoffs[0] && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { children: ui.games.kickoffAt(ui.games.formatDayTime(kickoffs[0])) })
|
|
4688
4849
|
] }),
|
|
4689
|
-
/* @__PURE__ */ (0,
|
|
4850
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "ss-g-grid", children: fixtures.map((g) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(GameTile, { game: g, onOpen, ui }, tileKey(g))) })
|
|
4690
4851
|
] })
|
|
4691
4852
|
] });
|
|
4692
4853
|
}
|
|
4693
4854
|
|
|
4694
4855
|
// src/components/GameScreenHost.tsx
|
|
4695
|
-
var
|
|
4856
|
+
var import_react42 = require("react");
|
|
4696
4857
|
|
|
4697
4858
|
// src/useGamePlay.ts
|
|
4698
|
-
var
|
|
4859
|
+
var import_react31 = require("react");
|
|
4699
4860
|
function toSubmitResult(payload) {
|
|
4700
4861
|
return {
|
|
4701
4862
|
// 'pending' means the play is recorded but awaiting resolution (fixture games)
|
|
@@ -4707,17 +4868,17 @@ function toSubmitResult(payload) {
|
|
|
4707
4868
|
};
|
|
4708
4869
|
}
|
|
4709
4870
|
function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh }) {
|
|
4710
|
-
const [result, setResult] = (0,
|
|
4711
|
-
const [submitting, setSubmitting] = (0,
|
|
4712
|
-
const [rawStatus, setRawStatus] = (0,
|
|
4713
|
-
const inFlightRef = (0,
|
|
4714
|
-
const convRef = (0,
|
|
4871
|
+
const [result, setResult] = (0, import_react31.useState)(null);
|
|
4872
|
+
const [submitting, setSubmitting] = (0, import_react31.useState)(false);
|
|
4873
|
+
const [rawStatus, setRawStatus] = (0, import_react31.useState)(null);
|
|
4874
|
+
const inFlightRef = (0, import_react31.useRef)(false);
|
|
4875
|
+
const convRef = (0, import_react31.useRef)(conversation);
|
|
4715
4876
|
convRef.current = conversation;
|
|
4716
|
-
const optsRef = (0,
|
|
4877
|
+
const optsRef = (0, import_react31.useRef)({ gameId, gameDay, fixtureId, locale, refresh });
|
|
4717
4878
|
optsRef.current = { gameId, gameDay, fixtureId, locale, refresh };
|
|
4718
|
-
const resultRef = (0,
|
|
4879
|
+
const resultRef = (0, import_react31.useRef)(null);
|
|
4719
4880
|
resultRef.current = result;
|
|
4720
|
-
const refetch = (0,
|
|
4881
|
+
const refetch = (0, import_react31.useCallback)(async () => {
|
|
4721
4882
|
const conv = convRef.current;
|
|
4722
4883
|
if (!conv) return;
|
|
4723
4884
|
const opts = optsRef.current;
|
|
@@ -4733,7 +4894,7 @@ function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh
|
|
|
4733
4894
|
} catch {
|
|
4734
4895
|
}
|
|
4735
4896
|
}, []);
|
|
4736
|
-
const submit = (0,
|
|
4897
|
+
const submit = (0, import_react31.useCallback)(async (answerJson) => {
|
|
4737
4898
|
const conv = convRef.current;
|
|
4738
4899
|
if (!conv || inFlightRef.current) return;
|
|
4739
4900
|
inFlightRef.current = true;
|
|
@@ -4760,14 +4921,14 @@ function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh
|
|
|
4760
4921
|
setSubmitting(false);
|
|
4761
4922
|
}
|
|
4762
4923
|
}, [refetch]);
|
|
4763
|
-
const hydrate = (0,
|
|
4924
|
+
const hydrate = (0, import_react31.useCallback)(() => {
|
|
4764
4925
|
void refetch();
|
|
4765
4926
|
}, [refetch]);
|
|
4766
4927
|
return { result, submitting, submit, hydrate, rawStatus };
|
|
4767
4928
|
}
|
|
4768
4929
|
|
|
4769
4930
|
// src/components/games/MysteryTigerGame.tsx
|
|
4770
|
-
var
|
|
4931
|
+
var import_react33 = require("react");
|
|
4771
4932
|
|
|
4772
4933
|
// src/components/games/nationFlags.ts
|
|
4773
4934
|
var FLAGS = {
|
|
@@ -4978,8 +5139,8 @@ function isNationCode(flag) {
|
|
|
4978
5139
|
}
|
|
4979
5140
|
|
|
4980
5141
|
// src/components/games/PlayerAvatar.tsx
|
|
4981
|
-
var
|
|
4982
|
-
var
|
|
5142
|
+
var import_react32 = require("react");
|
|
5143
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4983
5144
|
function initialsOf(name) {
|
|
4984
5145
|
const parts = name.trim().split(/\s+/).filter(Boolean);
|
|
4985
5146
|
const first = parts[0];
|
|
@@ -4996,41 +5157,41 @@ function PlayerAvatar({
|
|
|
4996
5157
|
imagePath,
|
|
4997
5158
|
className
|
|
4998
5159
|
}) {
|
|
4999
|
-
const [failed, setFailed] = (0,
|
|
5160
|
+
const [failed, setFailed] = (0, import_react32.useState)(false);
|
|
5000
5161
|
const showImage = Boolean(imagePath) && !isPlaceholderImage(imagePath) && !failed;
|
|
5001
|
-
return /* @__PURE__ */ (0,
|
|
5162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className, "aria-hidden": "true", children: showImage ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("img", { src: imagePath, alt: "", loading: "lazy", onError: () => setFailed(true) }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "ss-w-av-initials", children: initialsOf(name) }) });
|
|
5002
5163
|
}
|
|
5003
5164
|
|
|
5004
5165
|
// src/components/games/ui/GameHeader.tsx
|
|
5005
|
-
var
|
|
5166
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5006
5167
|
function GameHeader({ title, eyebrow, right, onBack, backLabel }) {
|
|
5007
|
-
return /* @__PURE__ */ (0,
|
|
5008
|
-
onBack && /* @__PURE__ */ (0,
|
|
5009
|
-
/* @__PURE__ */ (0,
|
|
5010
|
-
eyebrow && /* @__PURE__ */ (0,
|
|
5011
|
-
/* @__PURE__ */ (0,
|
|
5168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "ss-g-head", children: [
|
|
5169
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("button", { type: "button", className: "ss-g-back", "aria-label": backLabel, onClick: onBack, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(IconChevronLeft, {}) }),
|
|
5170
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "ss-g-head-text", children: [
|
|
5171
|
+
eyebrow && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "ss-g-eyebrow", children: eyebrow }),
|
|
5172
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("h2", { className: "ss-g-title", children: title })
|
|
5012
5173
|
] }),
|
|
5013
|
-
right && /* @__PURE__ */ (0,
|
|
5174
|
+
right && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "ss-g-head-right", children: right })
|
|
5014
5175
|
] });
|
|
5015
5176
|
}
|
|
5016
5177
|
|
|
5017
5178
|
// src/components/games/ui/SegmentProgress.tsx
|
|
5018
|
-
var
|
|
5179
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
5019
5180
|
function SegmentProgress({ segments, ariaLabel, leftLabel, rightLabel, right }) {
|
|
5020
|
-
return /* @__PURE__ */ (0,
|
|
5021
|
-
/* @__PURE__ */ (0,
|
|
5022
|
-
(leftLabel || rightLabel) && /* @__PURE__ */ (0,
|
|
5023
|
-
/* @__PURE__ */ (0,
|
|
5024
|
-
/* @__PURE__ */ (0,
|
|
5181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "ss-g-progress", children: [
|
|
5182
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "ss-g-progress-main", children: [
|
|
5183
|
+
(leftLabel || rightLabel) && /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "ss-g-progress-labels", children: [
|
|
5184
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { children: leftLabel }),
|
|
5185
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "ss-g-progress-rl", children: rightLabel })
|
|
5025
5186
|
] }),
|
|
5026
|
-
/* @__PURE__ */ (0,
|
|
5187
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5027
5188
|
"div",
|
|
5028
5189
|
{
|
|
5029
5190
|
className: "ss-g-segs",
|
|
5030
5191
|
role: "img",
|
|
5031
5192
|
"aria-label": ariaLabel,
|
|
5032
5193
|
style: { gridTemplateColumns: `repeat(${segments.length}, minmax(0, 1fr))` },
|
|
5033
|
-
children: segments.map((s, i) => /* @__PURE__ */ (0,
|
|
5194
|
+
children: segments.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "ss-g-seg", "data-state": s }, i))
|
|
5034
5195
|
}
|
|
5035
5196
|
)
|
|
5036
5197
|
] }),
|
|
@@ -5039,13 +5200,13 @@ function SegmentProgress({ segments, ariaLabel, leftLabel, rightLabel, right })
|
|
|
5039
5200
|
}
|
|
5040
5201
|
|
|
5041
5202
|
// src/components/games/ui/SearchField.tsx
|
|
5042
|
-
var
|
|
5203
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
5043
5204
|
function SearchField({ id, label, labelHidden = false, placeholder, value, onChange, disabled, inputRef, onKeyDown }) {
|
|
5044
|
-
return /* @__PURE__ */ (0,
|
|
5045
|
-
/* @__PURE__ */ (0,
|
|
5046
|
-
/* @__PURE__ */ (0,
|
|
5047
|
-
/* @__PURE__ */ (0,
|
|
5048
|
-
/* @__PURE__ */ (0,
|
|
5205
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "ss-g-search", children: [
|
|
5206
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("label", { htmlFor: id, className: labelHidden ? "ss-g-sr" : "ss-g-search-label", children: label }),
|
|
5207
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "ss-g-search-box", children: [
|
|
5208
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(IconSearch, {}),
|
|
5209
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5049
5210
|
"input",
|
|
5050
5211
|
{
|
|
5051
5212
|
id,
|
|
@@ -5064,52 +5225,52 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
5064
5225
|
}
|
|
5065
5226
|
|
|
5066
5227
|
// src/components/games/ui/FooterBar.tsx
|
|
5067
|
-
var
|
|
5228
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
5068
5229
|
function FooterBar({ children }) {
|
|
5069
|
-
return /* @__PURE__ */ (0,
|
|
5230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "ss-g-footer", children });
|
|
5070
5231
|
}
|
|
5071
5232
|
|
|
5072
5233
|
// src/components/games/ui/Silhouette.tsx
|
|
5073
|
-
var
|
|
5234
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
5074
5235
|
function Silhouette({ size, variant = "default" }) {
|
|
5075
|
-
return /* @__PURE__ */ (0,
|
|
5076
|
-
/* @__PURE__ */ (0,
|
|
5077
|
-
/* @__PURE__ */ (0,
|
|
5078
|
-
/* @__PURE__ */ (0,
|
|
5236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("span", { className: `ss-g-sil ss-g-sil--${variant}`, style: { width: size, height: size }, "aria-hidden": "true", children: [
|
|
5237
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("svg", { width: size * 0.86, height: size * 0.86, viewBox: "0 0 100 100", children: [
|
|
5238
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("circle", { cx: "50", cy: "40", r: "19", fill: "currentColor" }),
|
|
5239
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("path", { d: "M12 100c0-23 17-38 38-38s38 15 38 38z", fill: "currentColor" })
|
|
5079
5240
|
] }),
|
|
5080
|
-
variant === "mystery" && /* @__PURE__ */ (0,
|
|
5241
|
+
variant === "mystery" && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-sil-q", children: "?" })
|
|
5081
5242
|
] });
|
|
5082
5243
|
}
|
|
5083
5244
|
|
|
5084
5245
|
// src/components/games/ui/GameButton.tsx
|
|
5085
|
-
var
|
|
5246
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
5086
5247
|
function GameButton({ variant = "primary", block = false, className, type = "button", ...rest }) {
|
|
5087
5248
|
const cls = `ss-g-btn ss-g-btn--${variant}${block ? " ss-g-btn--block" : ""}${className ? ` ${className}` : ""}`;
|
|
5088
|
-
return /* @__PURE__ */ (0,
|
|
5249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("button", { type, className: cls, ...rest });
|
|
5089
5250
|
}
|
|
5090
5251
|
|
|
5091
5252
|
// src/components/games/ui/ResultCard.tsx
|
|
5092
|
-
var
|
|
5253
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
5093
5254
|
function ResultCard({ tone, title, score, detail, onBack, ui }) {
|
|
5094
|
-
return /* @__PURE__ */ (0,
|
|
5095
|
-
/* @__PURE__ */ (0,
|
|
5096
|
-
score !== void 0 && /* @__PURE__ */ (0,
|
|
5097
|
-
/* @__PURE__ */ (0,
|
|
5255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "ss-g-result", "data-tone": tone, role: "status", children: [
|
|
5256
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "ss-g-result-title", children: title }),
|
|
5257
|
+
score !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("span", { className: "ss-g-result-score", children: [
|
|
5258
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "ss-g-result-num", children: score }),
|
|
5098
5259
|
ui.games.unitPts
|
|
5099
5260
|
] }),
|
|
5100
|
-
detail && /* @__PURE__ */ (0,
|
|
5101
|
-
onBack && /* @__PURE__ */ (0,
|
|
5261
|
+
detail && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "ss-g-result-detail", children: detail }),
|
|
5262
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(GameButton, { variant: "outline", onClick: onBack, children: ui.games.backToGames })
|
|
5102
5263
|
] });
|
|
5103
5264
|
}
|
|
5104
5265
|
|
|
5105
5266
|
// src/components/games/ui/OptionList.tsx
|
|
5106
|
-
var
|
|
5267
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
5107
5268
|
function OptionList({ label, options, onPick }) {
|
|
5108
|
-
return /* @__PURE__ */ (0,
|
|
5269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "ss-g-opts", role: "listbox", "aria-label": label, children: options.map((o) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("button", { type: "button", role: "option", "aria-selected": false, className: "ss-g-opt", onClick: () => onPick(o.key), children: o.content }, o.key)) });
|
|
5109
5270
|
}
|
|
5110
5271
|
|
|
5111
5272
|
// src/components/games/MysteryTigerGame.tsx
|
|
5112
|
-
var
|
|
5273
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
5113
5274
|
function parseClientState(json) {
|
|
5114
5275
|
if (!json) return null;
|
|
5115
5276
|
try {
|
|
@@ -5211,8 +5372,8 @@ function MysteryTigerGame({
|
|
|
5211
5372
|
onBack
|
|
5212
5373
|
}) {
|
|
5213
5374
|
const t = ui.games.mysteryTiger;
|
|
5214
|
-
const [query, setQuery] = (0,
|
|
5215
|
-
const inputId = (0,
|
|
5375
|
+
const [query, setQuery] = (0, import_react33.useState)("");
|
|
5376
|
+
const inputId = (0, import_react33.useId)();
|
|
5216
5377
|
const clientState = parseClientState(result?.clientStateJson);
|
|
5217
5378
|
const guessResults = clientState?.guessResults ?? [];
|
|
5218
5379
|
const alreadyGuessedIds = new Set(guessResults.map((g) => g.playerId));
|
|
@@ -5233,22 +5394,22 @@ function MysteryTigerGame({
|
|
|
5233
5394
|
setQuery("");
|
|
5234
5395
|
onSubmit(JSON.stringify({ guesses: newGuesses }));
|
|
5235
5396
|
}
|
|
5236
|
-
const headerRight = !config ? void 0 : isOver ? /* @__PURE__ */ (0,
|
|
5397
|
+
const headerRight = !config ? void 0 : isOver ? /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(Chip, { variant: "accent", children: [
|
|
5237
5398
|
score,
|
|
5238
5399
|
" ",
|
|
5239
5400
|
ui.games.unitPts
|
|
5240
|
-
] }) : /* @__PURE__ */ (0,
|
|
5401
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { "data-testid": "mt-chip", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(Chip, { children: [
|
|
5241
5402
|
ui.games.guess,
|
|
5242
5403
|
" ",
|
|
5243
|
-
/* @__PURE__ */ (0,
|
|
5404
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "ss-g-num", children: guessesUsed + 1 }),
|
|
5244
5405
|
" / ",
|
|
5245
5406
|
totalGuesses
|
|
5246
5407
|
] }) });
|
|
5247
5408
|
const segments = Array.from({ length: totalGuesses }, (_, i) => i < guessesUsed ? "done" : i === guessesUsed ? "current" : "todo");
|
|
5248
5409
|
const cols = { gridTemplateColumns: `minmax(0, 1fr) repeat(${keys.length}, 42px)` };
|
|
5249
5410
|
const known = deriveKnownAttributes(guessResults, keys);
|
|
5250
|
-
return /* @__PURE__ */ (0,
|
|
5251
|
-
/* @__PURE__ */ (0,
|
|
5411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "ss-g-screen ss-g-mt", "data-testid": "game-screen-mystery-tiger", children: [
|
|
5412
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5252
5413
|
GameHeader,
|
|
5253
5414
|
{
|
|
5254
5415
|
title: gameTitle({ gameId: "mystery-tiger" }, ui.games.titles),
|
|
@@ -5258,40 +5419,40 @@ function MysteryTigerGame({
|
|
|
5258
5419
|
backLabel: ui.back
|
|
5259
5420
|
}
|
|
5260
5421
|
),
|
|
5261
|
-
!config && /* @__PURE__ */ (0,
|
|
5262
|
-
config && /* @__PURE__ */ (0,
|
|
5263
|
-
/* @__PURE__ */ (0,
|
|
5264
|
-
/* @__PURE__ */ (0,
|
|
5265
|
-
/* @__PURE__ */ (0,
|
|
5266
|
-
revealName ? /* @__PURE__ */ (0,
|
|
5267
|
-
revealName && /* @__PURE__ */ (0,
|
|
5422
|
+
!config && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
5423
|
+
config && /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
|
|
5424
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "ss-g-body", children: [
|
|
5425
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: `ss-g-mt-card${isOver ? " ss-g-mt-card--reveal" : ""}`, children: [
|
|
5426
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "ss-g-mt-portrait", children: [
|
|
5427
|
+
revealName ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(PlayerAvatar, { className: "ss-g-mt-photo", name: revealName, imagePath: clientState?.revealedPlayerImagePath }) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Silhouette, { size: 150, variant: "mystery" }),
|
|
5428
|
+
revealName && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "ss-g-mt-reveal-name", children: revealName })
|
|
5268
5429
|
] }),
|
|
5269
|
-
/* @__PURE__ */ (0,
|
|
5270
|
-
/* @__PURE__ */ (0,
|
|
5271
|
-
/* @__PURE__ */ (0,
|
|
5430
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "ss-g-mt-known", style: { gridTemplateColumns: `repeat(${keys.length}, minmax(0, 1fr))` }, children: known.map((k) => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "ss-g-mt-known-cell", children: [
|
|
5431
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "ss-g-mt-lab", children: t.labels[k.key] }),
|
|
5432
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "ss-g-mt-known-v", "data-state": k.state, "data-testid": `known-${k.key}`, children: k.text })
|
|
5272
5433
|
] }, k.key)) })
|
|
5273
5434
|
] }),
|
|
5274
|
-
!isOver && /* @__PURE__ */ (0,
|
|
5275
|
-
guessResults.length > 0 && /* @__PURE__ */ (0,
|
|
5276
|
-
/* @__PURE__ */ (0,
|
|
5277
|
-
/* @__PURE__ */ (0,
|
|
5278
|
-
keys.map((k) => /* @__PURE__ */ (0,
|
|
5435
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(SegmentProgress, { segments, ariaLabel: t.progress(guessesUsed, totalGuesses) }),
|
|
5436
|
+
guessResults.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "ss-g-mt-table", children: [
|
|
5437
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "ss-g-mt-thead", style: cols, children: [
|
|
5438
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { children: t.yourGuesses }),
|
|
5439
|
+
keys.map((k) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { children: t.labels[k] }, k))
|
|
5279
5440
|
] }),
|
|
5280
5441
|
guessResults.map((gr, i) => {
|
|
5281
5442
|
const name = config.squadPlayers.find((p) => p.id === gr.playerId)?.name ?? `#${gr.playerId}`;
|
|
5282
5443
|
const { first, last } = splitName(name);
|
|
5283
|
-
return /* @__PURE__ */ (0,
|
|
5284
|
-
/* @__PURE__ */ (0,
|
|
5285
|
-
/* @__PURE__ */ (0,
|
|
5286
|
-
/* @__PURE__ */ (0,
|
|
5287
|
-
first && /* @__PURE__ */ (0,
|
|
5288
|
-
/* @__PURE__ */ (0,
|
|
5444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "ss-g-mt-row", style: cols, children: [
|
|
5445
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "ss-g-mt-who", children: [
|
|
5446
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(PlayerAvatar, { className: "ss-g-mt-av", name }),
|
|
5447
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("span", { className: "ss-g-mt-names", children: [
|
|
5448
|
+
first && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "ss-g-mt-first", children: first }),
|
|
5449
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "ss-g-mt-last", children: last })
|
|
5289
5450
|
] })
|
|
5290
5451
|
] }),
|
|
5291
5452
|
keys.map((key) => {
|
|
5292
5453
|
const v = gr[key];
|
|
5293
5454
|
const arrow = directionArrow(v);
|
|
5294
|
-
return /* @__PURE__ */ (0,
|
|
5455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
5295
5456
|
"div",
|
|
5296
5457
|
{
|
|
5297
5458
|
className: "ss-g-mt-cell",
|
|
@@ -5299,8 +5460,8 @@ function MysteryTigerGame({
|
|
|
5299
5460
|
"data-verdict": v.verdict,
|
|
5300
5461
|
"aria-label": `${t.labels[key]}: ${v.value ?? v.verdict}${v.direction ? ` ${v.direction}` : ""}`,
|
|
5301
5462
|
children: [
|
|
5302
|
-
/* @__PURE__ */ (0,
|
|
5303
|
-
arrow && /* @__PURE__ */ (0,
|
|
5463
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "ss-g-mt-cell-v", "aria-hidden": "true", children: tileFace(key, v) }),
|
|
5464
|
+
arrow && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "ss-g-mt-cell-dir", "aria-hidden": "true", children: arrow })
|
|
5304
5465
|
]
|
|
5305
5466
|
},
|
|
5306
5467
|
key
|
|
@@ -5309,25 +5470,25 @@ function MysteryTigerGame({
|
|
|
5309
5470
|
] }, gr.playerId);
|
|
5310
5471
|
})
|
|
5311
5472
|
] }),
|
|
5312
|
-
!isOver && /* @__PURE__ */ (0,
|
|
5313
|
-
/* @__PURE__ */ (0,
|
|
5314
|
-
/* @__PURE__ */ (0,
|
|
5473
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "ss-g-mt-legend", children: [
|
|
5474
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("span", { children: [
|
|
5475
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("i", { className: "ss-g-mt-sw", "data-verdict": "exact" }),
|
|
5315
5476
|
t.legendMatch
|
|
5316
5477
|
] }),
|
|
5317
|
-
/* @__PURE__ */ (0,
|
|
5318
|
-
/* @__PURE__ */ (0,
|
|
5478
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("span", { children: [
|
|
5479
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("i", { className: "ss-g-mt-sw", "data-verdict": "near" }),
|
|
5319
5480
|
t.legendClose
|
|
5320
5481
|
] }),
|
|
5321
|
-
/* @__PURE__ */ (0,
|
|
5482
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("span", { children: [
|
|
5322
5483
|
"\u25B2 ",
|
|
5323
5484
|
t.legendHigher
|
|
5324
5485
|
] })
|
|
5325
5486
|
] }),
|
|
5326
|
-
clientState?.hintLine && !isOver && /* @__PURE__ */ (0,
|
|
5327
|
-
/* @__PURE__ */ (0,
|
|
5328
|
-
/* @__PURE__ */ (0,
|
|
5487
|
+
clientState?.hintLine && !isOver && /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "ss-g-mt-hint", children: [
|
|
5488
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(IconBulb, {}),
|
|
5489
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { children: clientState.hintLine })
|
|
5329
5490
|
] }),
|
|
5330
|
-
isOver && /* @__PURE__ */ (0,
|
|
5491
|
+
isOver && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5331
5492
|
ResultCard,
|
|
5332
5493
|
{
|
|
5333
5494
|
tone: clientState?.solved ? "win" : clientState?.failed ? "lose" : "neutral",
|
|
@@ -5339,22 +5500,22 @@ function MysteryTigerGame({
|
|
|
5339
5500
|
}
|
|
5340
5501
|
)
|
|
5341
5502
|
] }),
|
|
5342
|
-
!isOver && /* @__PURE__ */ (0,
|
|
5343
|
-
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0,
|
|
5503
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(FooterBar, { children: [
|
|
5504
|
+
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5344
5505
|
OptionList,
|
|
5345
5506
|
{
|
|
5346
5507
|
label: t.optionsLabel,
|
|
5347
5508
|
options: filtered.map((p) => ({
|
|
5348
5509
|
key: p.id,
|
|
5349
|
-
content: /* @__PURE__ */ (0,
|
|
5350
|
-
/* @__PURE__ */ (0,
|
|
5351
|
-
/* @__PURE__ */ (0,
|
|
5510
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
|
|
5511
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(PlayerAvatar, { className: "ss-g-opt-av", name: p.name }),
|
|
5512
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { children: p.name })
|
|
5352
5513
|
] })
|
|
5353
5514
|
})),
|
|
5354
5515
|
onPick: (k) => handleSelect(Number(k))
|
|
5355
5516
|
}
|
|
5356
5517
|
),
|
|
5357
|
-
/* @__PURE__ */ (0,
|
|
5518
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5358
5519
|
SearchField,
|
|
5359
5520
|
{
|
|
5360
5521
|
id: inputId,
|
|
@@ -5371,7 +5532,7 @@ function MysteryTigerGame({
|
|
|
5371
5532
|
}
|
|
5372
5533
|
|
|
5373
5534
|
// src/components/games/HigherOrLowerGame.tsx
|
|
5374
|
-
var
|
|
5535
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
5375
5536
|
var POINTS_PER_CORRECT = 10;
|
|
5376
5537
|
function parseClientState2(json) {
|
|
5377
5538
|
if (!json) return null;
|
|
@@ -5383,11 +5544,11 @@ function parseClientState2(json) {
|
|
|
5383
5544
|
}
|
|
5384
5545
|
function PlayerCard({ name, imagePath, highlight, children }) {
|
|
5385
5546
|
const { first, last } = splitName(name);
|
|
5386
|
-
return /* @__PURE__ */ (0,
|
|
5387
|
-
/* @__PURE__ */ (0,
|
|
5388
|
-
/* @__PURE__ */ (0,
|
|
5389
|
-
first && /* @__PURE__ */ (0,
|
|
5390
|
-
/* @__PURE__ */ (0,
|
|
5547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: `ss-g-hl-card${highlight ? " ss-g-hl-card--b" : ""}`, children: [
|
|
5548
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "ss-g-hl-photo-wrap", children: imagePath ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(PlayerAvatar, { className: "ss-g-hl-photo", name, imagePath }) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Silhouette, { size: 150 }) }),
|
|
5549
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ss-g-hl-info", children: [
|
|
5550
|
+
first && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ss-g-hl-first", children: first }),
|
|
5551
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ss-g-hl-surname", children: last }),
|
|
5391
5552
|
children
|
|
5392
5553
|
] })
|
|
5393
5554
|
] });
|
|
@@ -5419,47 +5580,47 @@ function HigherOrLowerGame({
|
|
|
5419
5580
|
const newAnswers = [...prevAnswers, { pairIndex: currentPair.pairIndex, pick }];
|
|
5420
5581
|
onSubmit(JSON.stringify({ answers: newAnswers }));
|
|
5421
5582
|
}
|
|
5422
|
-
return /* @__PURE__ */ (0,
|
|
5423
|
-
/* @__PURE__ */ (0,
|
|
5583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ss-g-screen ss-g-hl", "data-testid": "game-screen-higher-or-lower", children: [
|
|
5584
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5424
5585
|
GameHeader,
|
|
5425
5586
|
{
|
|
5426
5587
|
title: gameTitle({ gameId: "higher-or-lower" }, ui.games.titles),
|
|
5427
5588
|
eyebrow: t.eyebrow(POINTS_PER_CORRECT),
|
|
5428
|
-
right: config ? /* @__PURE__ */ (0,
|
|
5589
|
+
right: config ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(StatStack, { value: runLength, label: t.streak }) : void 0,
|
|
5429
5590
|
onBack,
|
|
5430
5591
|
backLabel: ui.back
|
|
5431
5592
|
}
|
|
5432
5593
|
),
|
|
5433
|
-
!config && /* @__PURE__ */ (0,
|
|
5434
|
-
config && /* @__PURE__ */ (0,
|
|
5435
|
-
/* @__PURE__ */ (0,
|
|
5436
|
-
/* @__PURE__ */ (0,
|
|
5437
|
-
/* @__PURE__ */ (0,
|
|
5438
|
-
/* @__PURE__ */ (0,
|
|
5439
|
-
/* @__PURE__ */ (0,
|
|
5594
|
+
!config && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
5595
|
+
config && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
|
|
5596
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ss-g-body", children: [
|
|
5597
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ss-g-hl-prompt", "data-testid": "hol-prompt", children: [
|
|
5598
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ss-g-hl-prompt-q", children: t.whoHadMore }),
|
|
5599
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ss-g-hl-prompt-stat", children: config.statLabel }),
|
|
5600
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ss-g-hl-prompt-season", children: t.season(config.seasonLabel) })
|
|
5440
5601
|
] }),
|
|
5441
|
-
currentPair && /* @__PURE__ */ (0,
|
|
5442
|
-
/* @__PURE__ */ (0,
|
|
5443
|
-
/* @__PURE__ */ (0,
|
|
5444
|
-
/* @__PURE__ */ (0,
|
|
5602
|
+
currentPair && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ss-g-hl-pair", children: [
|
|
5603
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(PlayerCard, { name: currentPair.playerAName, imagePath: currentPair.playerAImagePath, children: [
|
|
5604
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ss-g-hl-value", children: currentPair.playerAValue }),
|
|
5605
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ss-g-hl-stat", children: config.statLabel })
|
|
5445
5606
|
] }),
|
|
5446
|
-
/* @__PURE__ */ (0,
|
|
5447
|
-
/* @__PURE__ */ (0,
|
|
5448
|
-
/* @__PURE__ */ (0,
|
|
5449
|
-
/* @__PURE__ */ (0,
|
|
5607
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ss-g-hl-vs", "aria-hidden": "true", children: t.vs }),
|
|
5608
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(PlayerCard, { name: currentPair.playerBName, imagePath: currentPair.playerBImagePath, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ss-g-hl-btns", children: [
|
|
5609
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(GameButton, { variant: "primary", disabled: submitting, onClick: () => handlePick("higher"), children: [
|
|
5610
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(IconArrowUp, { size: 16 }),
|
|
5450
5611
|
t.higher
|
|
5451
5612
|
] }),
|
|
5452
|
-
/* @__PURE__ */ (0,
|
|
5453
|
-
/* @__PURE__ */ (0,
|
|
5613
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(GameButton, { variant: "outline", disabled: submitting, onClick: () => handlePick("lower"), children: [
|
|
5614
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(IconArrowDown, { size: 16 }),
|
|
5454
5615
|
t.lower
|
|
5455
5616
|
] })
|
|
5456
5617
|
] }) })
|
|
5457
5618
|
] }),
|
|
5458
|
-
lastAnswer && lastAnswerPair && /* @__PURE__ */ (0,
|
|
5459
|
-
lastAnswer.wasCorrect ? /* @__PURE__ */ (0,
|
|
5619
|
+
lastAnswer && lastAnswerPair && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("p", { className: "ss-g-hl-feedback", "data-testid": "hol-last", "data-correct": lastAnswer.wasCorrect ? "true" : "false", children: [
|
|
5620
|
+
lastAnswer.wasCorrect ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(IconCheck, {}) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(IconClose, {}),
|
|
5460
5621
|
t.lastAnswer(splitName(lastAnswerPair.playerBName).last, lastAnswer.playerBValue)
|
|
5461
5622
|
] }),
|
|
5462
|
-
isOver && /* @__PURE__ */ (0,
|
|
5623
|
+
isOver && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5463
5624
|
ResultCard,
|
|
5464
5625
|
{
|
|
5465
5626
|
tone: runEndedWrong ? "lose" : allPairsAnswered ? "win" : "neutral",
|
|
@@ -5471,15 +5632,15 @@ function HigherOrLowerGame({
|
|
|
5471
5632
|
}
|
|
5472
5633
|
)
|
|
5473
5634
|
] }),
|
|
5474
|
-
!isOver && /* @__PURE__ */ (0,
|
|
5475
|
-
/* @__PURE__ */ (0,
|
|
5635
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ss-g-hl-foot", children: [
|
|
5636
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "ss-g-hl-dots", role: "img", "aria-label": t.answersSoFar(answeredCount, config.pairs.length), children: config.pairs.map((p, i) => {
|
|
5476
5637
|
const a = answeredPairs[i];
|
|
5477
|
-
return /* @__PURE__ */ (0,
|
|
5638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ss-g-hl-dot", "data-state": a ? a.wasCorrect ? "correct" : "wrong" : "todo" }, p.pairIndex);
|
|
5478
5639
|
}) }),
|
|
5479
|
-
/* @__PURE__ */ (0,
|
|
5480
|
-
/* @__PURE__ */ (0,
|
|
5640
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("span", { className: "ss-g-hl-pts", children: [
|
|
5641
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { "data-testid": "hol-score", children: score }),
|
|
5481
5642
|
" ",
|
|
5482
|
-
/* @__PURE__ */ (0,
|
|
5643
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ss-g-hl-pts-unit", children: ui.games.unitPts })
|
|
5483
5644
|
] })
|
|
5484
5645
|
] }) })
|
|
5485
5646
|
] })
|
|
@@ -5487,21 +5648,21 @@ function HigherOrLowerGame({
|
|
|
5487
5648
|
}
|
|
5488
5649
|
|
|
5489
5650
|
// src/components/games/CareerPathGame.tsx
|
|
5490
|
-
var
|
|
5651
|
+
var import_react35 = require("react");
|
|
5491
5652
|
|
|
5492
5653
|
// src/components/games/ui/CrestShield.tsx
|
|
5493
|
-
var
|
|
5494
|
-
var
|
|
5654
|
+
var import_react34 = require("react");
|
|
5655
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
5495
5656
|
function CrestShield({ src, name, size = 28 }) {
|
|
5496
|
-
const [failed, setFailed] = (0,
|
|
5657
|
+
const [failed, setFailed] = (0, import_react34.useState)(false);
|
|
5497
5658
|
if (src && !isPlaceholderImage(src) && !failed) {
|
|
5498
|
-
return /* @__PURE__ */ (0,
|
|
5659
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("img", { className: "ss-g-crest", src, alt: name, width: size, height: size, loading: "lazy", onError: () => setFailed(true) });
|
|
5499
5660
|
}
|
|
5500
|
-
return /* @__PURE__ */ (0,
|
|
5661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("svg", { className: "ss-g-crest ss-g-crest--ph", width: size, height: size * 32 / 28, viewBox: "0 0 28 32", role: "img", "aria-label": name, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("path", { d: "M2 3h24v12c0 9-6 14-12 17C8 29 2 24 2 15z", fill: "currentColor" }) });
|
|
5501
5662
|
}
|
|
5502
5663
|
|
|
5503
5664
|
// src/components/games/CareerPathGame.tsx
|
|
5504
|
-
var
|
|
5665
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
5505
5666
|
function parseClientState3(json) {
|
|
5506
5667
|
if (!json) return null;
|
|
5507
5668
|
try {
|
|
@@ -5525,15 +5686,15 @@ function CareerPathGame({
|
|
|
5525
5686
|
}) {
|
|
5526
5687
|
const s = ui.games.careerPath;
|
|
5527
5688
|
const title = gameTitle({ gameId: "career-path" }, ui.games.titles);
|
|
5528
|
-
const [query, setQuery] = (0,
|
|
5529
|
-
const inputId = (0,
|
|
5689
|
+
const [query, setQuery] = (0, import_react35.useState)("");
|
|
5690
|
+
const inputId = (0, import_react35.useId)();
|
|
5530
5691
|
const clientState = parseClientState3(result?.clientStateJson);
|
|
5531
5692
|
const alreadyGuessedIds = new Set(clientState?.guessResults.map((g) => g.playerId) ?? []);
|
|
5532
5693
|
const isOver = result?.alreadyPlayed === true || clientState?.solved === true || clientState?.failed === true;
|
|
5533
5694
|
if (!config) {
|
|
5534
|
-
return /* @__PURE__ */ (0,
|
|
5535
|
-
/* @__PURE__ */ (0,
|
|
5536
|
-
/* @__PURE__ */ (0,
|
|
5695
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "ss-g-screen", "data-testid": "game-screen-career-path", children: [
|
|
5696
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
|
|
5697
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
5537
5698
|
] });
|
|
5538
5699
|
}
|
|
5539
5700
|
const visiblePath = clientState?.visiblePath ?? config.initialPath;
|
|
@@ -5549,60 +5710,60 @@ function CareerPathGame({
|
|
|
5549
5710
|
setQuery("");
|
|
5550
5711
|
onSubmit(JSON.stringify({ guesses: newGuesses }));
|
|
5551
5712
|
}
|
|
5552
|
-
const right = !isOver && clientState ? /* @__PURE__ */ (0,
|
|
5713
|
+
const right = !isOver && clientState ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { "data-testid": "cp-guess-chip", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(Chip, { variant: "neutral", children: [
|
|
5553
5714
|
ui.games.guess,
|
|
5554
5715
|
" ",
|
|
5555
|
-
/* @__PURE__ */ (0,
|
|
5716
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-num", children: clientState.guessesUsed + 1 }),
|
|
5556
5717
|
" / ",
|
|
5557
5718
|
clientState.guessesUsed + clientState.guessesRemaining
|
|
5558
5719
|
] }) }) : void 0;
|
|
5559
5720
|
const outcome = clientState?.solved ? s.solved : clientState?.failed ? s.failed : ui.games.done;
|
|
5560
|
-
return /* @__PURE__ */ (0,
|
|
5561
|
-
/* @__PURE__ */ (0,
|
|
5562
|
-
/* @__PURE__ */ (0,
|
|
5563
|
-
/* @__PURE__ */ (0,
|
|
5564
|
-
isOver && clientState?.revealedPlayerName ? /* @__PURE__ */ (0,
|
|
5565
|
-
/* @__PURE__ */ (0,
|
|
5566
|
-
/* @__PURE__ */ (0,
|
|
5567
|
-
clientState?.hintLine ? /* @__PURE__ */ (0,
|
|
5568
|
-
/* @__PURE__ */ (0,
|
|
5569
|
-
/* @__PURE__ */ (0,
|
|
5721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "ss-g-screen", "data-testid": "game-screen-career-path", children: [
|
|
5722
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(GameHeader, { title, eyebrow: s.eyebrow, right, onBack, backLabel: ui.back }),
|
|
5723
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "ss-g-body", children: [
|
|
5724
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "ss-g-cp-card", children: [
|
|
5725
|
+
isOver && clientState?.revealedPlayerName ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(PlayerAvatar, { className: "ss-g-cp-photo", name: clientState.revealedPlayerName, imagePath: clientState.revealedPlayerImagePath }) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Silhouette, { size: 64, variant: isOver ? "default" : "mystery" }),
|
|
5726
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "ss-g-cp-card-text", children: [
|
|
5727
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-cp-card-title", children: isOver && clientState?.revealedPlayerName ? clientState.revealedPlayerName : s.mysteryPlayer }),
|
|
5728
|
+
clientState?.hintLine ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-cp-hint", children: clientState.hintLine }) : !isOver ? /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("span", { className: "ss-g-cp-locks", children: [
|
|
5729
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Chip, { variant: "lock", icon: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(IconLock, { size: 11 }), children: s.lockPosition }),
|
|
5730
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Chip, { variant: "lock", icon: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(IconLock, { size: 11 }), children: s.lockNationality })
|
|
5570
5731
|
] }) : null
|
|
5571
5732
|
] })
|
|
5572
5733
|
] }),
|
|
5573
|
-
/* @__PURE__ */ (0,
|
|
5734
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("ol", { className: "ss-g-cp-line", children: [
|
|
5574
5735
|
visiblePath.map((spell, i) => {
|
|
5575
5736
|
const years = i === 0 ? s.firstClub : spellYears(spell);
|
|
5576
|
-
return /* @__PURE__ */ (0,
|
|
5577
|
-
/* @__PURE__ */ (0,
|
|
5578
|
-
/* @__PURE__ */ (0,
|
|
5579
|
-
/* @__PURE__ */ (0,
|
|
5737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("li", { className: "ss-g-cp-step", children: [
|
|
5738
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("span", { className: "ss-g-cp-rail", children: [
|
|
5739
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-cp-tile", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(CrestShield, { src: spell.crestUrl, name: spell.clubName, size: 30 }) }),
|
|
5740
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-cp-conn", "aria-hidden": "true" })
|
|
5580
5741
|
] }),
|
|
5581
|
-
/* @__PURE__ */ (0,
|
|
5582
|
-
/* @__PURE__ */ (0,
|
|
5583
|
-
/* @__PURE__ */ (0,
|
|
5584
|
-
/* @__PURE__ */ (0,
|
|
5585
|
-
spell.isLoan && /* @__PURE__ */ (0,
|
|
5742
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("span", { className: "ss-g-cp-step-text", children: [
|
|
5743
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-cp-club", children: spell.clubName }),
|
|
5744
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("span", { className: "ss-g-cp-sub", children: [
|
|
5745
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-cp-years", children: years }),
|
|
5746
|
+
spell.isLoan && /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
|
|
5586
5747
|
years ? " \xB7 " : "",
|
|
5587
|
-
/* @__PURE__ */ (0,
|
|
5748
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-cp-loan", children: s.loan })
|
|
5588
5749
|
] })
|
|
5589
5750
|
] })
|
|
5590
5751
|
] })
|
|
5591
5752
|
] }, `${spell.clubName}-${i}`);
|
|
5592
5753
|
}),
|
|
5593
|
-
hidden > 0 && /* @__PURE__ */ (0,
|
|
5594
|
-
/* @__PURE__ */ (0,
|
|
5595
|
-
/* @__PURE__ */ (0,
|
|
5596
|
-
hidden > 1 && /* @__PURE__ */ (0,
|
|
5754
|
+
hidden > 0 && /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("li", { className: "ss-g-cp-step ss-g-cp-step--hidden", children: [
|
|
5755
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("span", { className: "ss-g-cp-rail", children: [
|
|
5756
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-cp-tile ss-g-cp-tile--locked", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(IconLock, { size: 18 }) }),
|
|
5757
|
+
hidden > 1 && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-cp-conn ss-g-cp-conn--faint", "aria-hidden": "true" })
|
|
5597
5758
|
] }),
|
|
5598
|
-
/* @__PURE__ */ (0,
|
|
5759
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-cp-step-text", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-cp-sub", children: s.nextClubHidden }) })
|
|
5599
5760
|
] }),
|
|
5600
|
-
hidden > 1 && /* @__PURE__ */ (0,
|
|
5601
|
-
/* @__PURE__ */ (0,
|
|
5602
|
-
/* @__PURE__ */ (0,
|
|
5761
|
+
hidden > 1 && /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("li", { className: "ss-g-cp-step ss-g-cp-step--more", children: [
|
|
5762
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-cp-rail", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-cp-tile ss-g-cp-tile--faint", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(IconLock, { size: 18 }) }) }),
|
|
5763
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-cp-step-text", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-cp-sub", children: s.moreClubs(hidden - 1) }) })
|
|
5603
5764
|
] })
|
|
5604
5765
|
] }),
|
|
5605
|
-
isOver && /* @__PURE__ */ (0,
|
|
5766
|
+
isOver && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
5606
5767
|
ResultCard,
|
|
5607
5768
|
{
|
|
5608
5769
|
tone: clientState?.solved ? "win" : clientState?.failed ? "lose" : "neutral",
|
|
@@ -5614,22 +5775,22 @@ function CareerPathGame({
|
|
|
5614
5775
|
}
|
|
5615
5776
|
)
|
|
5616
5777
|
] }),
|
|
5617
|
-
!isOver && /* @__PURE__ */ (0,
|
|
5618
|
-
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0,
|
|
5778
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(FooterBar, { children: [
|
|
5779
|
+
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
5619
5780
|
OptionList,
|
|
5620
5781
|
{
|
|
5621
5782
|
label: s.searchLabel,
|
|
5622
5783
|
options: filtered.map((p) => ({
|
|
5623
5784
|
key: p.id,
|
|
5624
|
-
content: /* @__PURE__ */ (0,
|
|
5625
|
-
/* @__PURE__ */ (0,
|
|
5626
|
-
/* @__PURE__ */ (0,
|
|
5785
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
|
|
5786
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(PlayerAvatar, { className: "ss-g-opt-av", name: p.name }),
|
|
5787
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { children: p.name })
|
|
5627
5788
|
] })
|
|
5628
5789
|
})),
|
|
5629
5790
|
onPick: (k) => handleSelect(Number(k))
|
|
5630
5791
|
}
|
|
5631
5792
|
),
|
|
5632
|
-
/* @__PURE__ */ (0,
|
|
5793
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
5633
5794
|
SearchField,
|
|
5634
5795
|
{
|
|
5635
5796
|
id: inputId,
|
|
@@ -5645,8 +5806,8 @@ function CareerPathGame({
|
|
|
5645
5806
|
}
|
|
5646
5807
|
|
|
5647
5808
|
// src/components/games/BeatTheGridGame.tsx
|
|
5648
|
-
var
|
|
5649
|
-
var
|
|
5809
|
+
var import_react36 = __toESM(require("react"), 1);
|
|
5810
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
5650
5811
|
function criterionIconKind(label, key) {
|
|
5651
5812
|
const l = (key ?? label).toLowerCase();
|
|
5652
5813
|
if (l.includes("app")) return "calendar";
|
|
@@ -5664,34 +5825,34 @@ function rowAbbrev(label, map, key) {
|
|
|
5664
5825
|
function CriterionIcon({ kind }) {
|
|
5665
5826
|
switch (kind) {
|
|
5666
5827
|
case "calendar":
|
|
5667
|
-
return /* @__PURE__ */ (0,
|
|
5828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(IconCalendar, {});
|
|
5668
5829
|
case "ball":
|
|
5669
|
-
return /* @__PURE__ */ (0,
|
|
5830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(IconBall, {});
|
|
5670
5831
|
case "boot":
|
|
5671
|
-
return /* @__PURE__ */ (0,
|
|
5832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(IconBoot, {});
|
|
5672
5833
|
case "gloves":
|
|
5673
|
-
return /* @__PURE__ */ (0,
|
|
5834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(IconGloves, {});
|
|
5674
5835
|
case "shield":
|
|
5675
|
-
return /* @__PURE__ */ (0,
|
|
5836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(IconShield, {});
|
|
5676
5837
|
default:
|
|
5677
|
-
return /* @__PURE__ */ (0,
|
|
5838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(IconFlag, {});
|
|
5678
5839
|
}
|
|
5679
5840
|
}
|
|
5680
5841
|
function HeaderVisual({ label, textKey: iKey, meta }) {
|
|
5681
5842
|
if (!meta) {
|
|
5682
|
-
return /* @__PURE__ */ (0,
|
|
5843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(CriterionIcon, { kind: criterionIconKind(label, iKey) });
|
|
5683
5844
|
}
|
|
5684
5845
|
switch (meta.kind) {
|
|
5685
5846
|
case "club":
|
|
5686
|
-
return /* @__PURE__ */ (0,
|
|
5847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(CrestShield, { src: meta.imageUrl, name: label, size: 24 });
|
|
5687
5848
|
case "coach":
|
|
5688
|
-
return /* @__PURE__ */ (0,
|
|
5849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(PlayerAvatar, { name: label, imagePath: meta.imageUrl, className: "ss-g-btg-coach-av" });
|
|
5689
5850
|
case "country":
|
|
5690
|
-
return /* @__PURE__ */ (0,
|
|
5851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "ss-g-btg-hdr-flag", "aria-hidden": "true", children: nationalityFlag(meta.country ?? label) });
|
|
5691
5852
|
case "position":
|
|
5692
|
-
return /* @__PURE__ */ (0,
|
|
5853
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_jsx_runtime72.Fragment, {});
|
|
5693
5854
|
default:
|
|
5694
|
-
return /* @__PURE__ */ (0,
|
|
5855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(CriterionIcon, { kind: criterionIconKind(label, iKey) });
|
|
5695
5856
|
}
|
|
5696
5857
|
}
|
|
5697
5858
|
function parseClientState4(json) {
|
|
@@ -5726,21 +5887,21 @@ function SearchSheet({
|
|
|
5726
5887
|
ui
|
|
5727
5888
|
}) {
|
|
5728
5889
|
const s = ui.games.beatTheGrid;
|
|
5729
|
-
const [query, setQuery] = (0,
|
|
5730
|
-
const inputId = (0,
|
|
5731
|
-
const inputRef = (0,
|
|
5732
|
-
(0,
|
|
5890
|
+
const [query, setQuery] = (0, import_react36.useState)("");
|
|
5891
|
+
const inputId = (0, import_react36.useId)();
|
|
5892
|
+
const inputRef = (0, import_react36.useRef)(null);
|
|
5893
|
+
(0, import_react36.useEffect)(() => {
|
|
5733
5894
|
inputRef.current?.focus();
|
|
5734
5895
|
}, [row, col]);
|
|
5735
5896
|
const filtered = playerPool.filter(
|
|
5736
5897
|
(p) => !alreadyFilledIds.has(p.id) && p.name.toLowerCase().includes(query.toLowerCase())
|
|
5737
5898
|
);
|
|
5738
|
-
return /* @__PURE__ */ (0,
|
|
5739
|
-
/* @__PURE__ */ (0,
|
|
5740
|
-
/* @__PURE__ */ (0,
|
|
5741
|
-
/* @__PURE__ */ (0,
|
|
5742
|
-
/* @__PURE__ */ (0,
|
|
5743
|
-
/* @__PURE__ */ (0,
|
|
5899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "ss-g-btg-sheet", "data-testid": "btg-search-sheet", children: [
|
|
5900
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "ss-g-btg-sheet-hdr", children: [
|
|
5901
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Chip, { variant: "neutral", children: rowLabel }),
|
|
5902
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "ss-g-btg-sheet-x", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(IconClose, { size: 12 }) }),
|
|
5903
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Chip, { variant: "accent", children: colLabel }),
|
|
5904
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
5744
5905
|
"button",
|
|
5745
5906
|
{
|
|
5746
5907
|
type: "button",
|
|
@@ -5748,12 +5909,12 @@ function SearchSheet({
|
|
|
5748
5909
|
"data-testid": "btg-sheet-dismiss",
|
|
5749
5910
|
"aria-label": s.closeSearch,
|
|
5750
5911
|
onClick: onDismiss,
|
|
5751
|
-
children: /* @__PURE__ */ (0,
|
|
5912
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(IconClose, {})
|
|
5752
5913
|
}
|
|
5753
5914
|
)
|
|
5754
5915
|
] }),
|
|
5755
|
-
playerPool.length === 0 ? /* @__PURE__ */ (0,
|
|
5756
|
-
/* @__PURE__ */ (0,
|
|
5916
|
+
playerPool.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "ss-g-btg-sheet-empty", children: s.emptyPool }) : /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_jsx_runtime72.Fragment, { children: [
|
|
5917
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
5757
5918
|
SearchField,
|
|
5758
5919
|
{
|
|
5759
5920
|
id: inputId,
|
|
@@ -5765,16 +5926,16 @@ function SearchSheet({
|
|
|
5765
5926
|
inputRef
|
|
5766
5927
|
}
|
|
5767
5928
|
),
|
|
5768
|
-
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0,
|
|
5929
|
+
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
5769
5930
|
OptionList,
|
|
5770
5931
|
{
|
|
5771
5932
|
label: s.searchLabel(rowLabel, colLabel),
|
|
5772
5933
|
options: filtered.map((p) => ({
|
|
5773
5934
|
key: p.id,
|
|
5774
|
-
content: /* @__PURE__ */ (0,
|
|
5775
|
-
/* @__PURE__ */ (0,
|
|
5776
|
-
/* @__PURE__ */ (0,
|
|
5777
|
-
/* @__PURE__ */ (0,
|
|
5935
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_jsx_runtime72.Fragment, { children: [
|
|
5936
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(PlayerAvatar, { name: p.name, imagePath: p.imagePath, className: "ss-g-opt-av" }),
|
|
5937
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "ss-g-btg-result-name", children: p.name }),
|
|
5938
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "ss-g-btg-result-plus", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(IconPlus, { size: 18 }) })
|
|
5778
5939
|
] })
|
|
5779
5940
|
})),
|
|
5780
5941
|
onPick: (k) => onPick(row, col, Number(k))
|
|
@@ -5794,7 +5955,7 @@ function BeatTheGridGame({
|
|
|
5794
5955
|
}) {
|
|
5795
5956
|
const s = ui.games.beatTheGrid;
|
|
5796
5957
|
const title = gameTitle({ gameId: "beat-the-grid" }, ui.games.titles);
|
|
5797
|
-
const [activeCell, setActiveCell] = (0,
|
|
5958
|
+
const [activeCell, setActiveCell] = (0, import_react36.useState)(null);
|
|
5798
5959
|
const clientState = parseClientState4(result?.clientStateJson);
|
|
5799
5960
|
const filledCells = clientState?.cells ?? [];
|
|
5800
5961
|
const isLocked2 = result?.alreadyPlayed === true || clientState?.isComplete === true;
|
|
@@ -5812,9 +5973,9 @@ function BeatTheGridGame({
|
|
|
5812
5973
|
onSubmit(JSON.stringify({ cells: newCells }));
|
|
5813
5974
|
}
|
|
5814
5975
|
if (!config) {
|
|
5815
|
-
return /* @__PURE__ */ (0,
|
|
5816
|
-
/* @__PURE__ */ (0,
|
|
5817
|
-
/* @__PURE__ */ (0,
|
|
5976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "ss-g-screen", "data-testid": "game-screen-beat-the-grid", children: [
|
|
5977
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
|
|
5978
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
5818
5979
|
] });
|
|
5819
5980
|
}
|
|
5820
5981
|
const rows = config.rows;
|
|
@@ -5827,20 +5988,20 @@ function BeatTheGridGame({
|
|
|
5827
5988
|
(_, i) => i < correctCount ? "correct" : i < correctCount + wrongCount ? "wrong" : "todo"
|
|
5828
5989
|
);
|
|
5829
5990
|
const totalScore = clientState?.totalScore ?? result?.score ?? 0;
|
|
5830
|
-
return /* @__PURE__ */ (0,
|
|
5831
|
-
/* @__PURE__ */ (0,
|
|
5832
|
-
/* @__PURE__ */ (0,
|
|
5991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "ss-g-screen", "data-testid": "game-screen-beat-the-grid", children: [
|
|
5992
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
|
|
5993
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
5833
5994
|
SegmentProgress,
|
|
5834
5995
|
{
|
|
5835
5996
|
segments,
|
|
5836
5997
|
ariaLabel: s.progressAria(filledCells.length, total),
|
|
5837
5998
|
leftLabel: s.filled(filledCells.length, total),
|
|
5838
5999
|
rightLabel: s.toGo(Math.max(0, total - filledCells.length)),
|
|
5839
|
-
right: /* @__PURE__ */ (0,
|
|
6000
|
+
right: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Chip, { variant: "accent", children: `${totalScore} ${ui.games.unitPts}` })
|
|
5840
6001
|
}
|
|
5841
6002
|
),
|
|
5842
|
-
/* @__PURE__ */ (0,
|
|
5843
|
-
/* @__PURE__ */ (0,
|
|
6003
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "ss-g-body", children: [
|
|
6004
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
5844
6005
|
"div",
|
|
5845
6006
|
{
|
|
5846
6007
|
className: activeCell !== null ? "ss-g-btg-grid ss-g-btg-grid--fit" : "ss-g-btg-grid",
|
|
@@ -5850,31 +6011,31 @@ function BeatTheGridGame({
|
|
|
5850
6011
|
},
|
|
5851
6012
|
role: "grid",
|
|
5852
6013
|
children: [
|
|
5853
|
-
/* @__PURE__ */ (0,
|
|
6014
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "ss-g-btg-corner" }),
|
|
5854
6015
|
cols.map((col, colIdx) => {
|
|
5855
6016
|
const colMeta = config.colsMeta?.[colIdx];
|
|
5856
|
-
return /* @__PURE__ */ (0,
|
|
5857
|
-
/* @__PURE__ */ (0,
|
|
5858
|
-
/* @__PURE__ */ (0,
|
|
6017
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "ss-g-btg-colhdr", "data-meta": colMeta ? "true" : void 0, children: [
|
|
6018
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(HeaderVisual, { label: col, textKey: config.colsI18n?.[colIdx]?.key, meta: colMeta }),
|
|
6019
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { children: col })
|
|
5859
6020
|
] }, col);
|
|
5860
6021
|
}),
|
|
5861
6022
|
rows.map((rowLabel, rowIdx) => {
|
|
5862
6023
|
const rowMeta = config.rowsMeta?.[rowIdx];
|
|
5863
6024
|
const abbr = rowAbbrev(rowLabel, s.rowAbbrev, config.rowsI18n?.[rowIdx]?.key);
|
|
5864
|
-
const rowHeaderContent = rowMeta ? /* @__PURE__ */ (0,
|
|
5865
|
-
/* @__PURE__ */ (0,
|
|
5866
|
-
/* @__PURE__ */ (0,
|
|
5867
|
-
] }) : abbr === rowLabel ? /* @__PURE__ */ (0,
|
|
5868
|
-
/* @__PURE__ */ (0,
|
|
5869
|
-
/* @__PURE__ */ (0,
|
|
6025
|
+
const rowHeaderContent = rowMeta ? /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_jsx_runtime72.Fragment, { children: [
|
|
6026
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(HeaderVisual, { label: rowLabel, textKey: config.rowsI18n?.[rowIdx]?.key, meta: rowMeta }),
|
|
6027
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { children: rowLabel })
|
|
6028
|
+
] }) : abbr === rowLabel ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { children: rowLabel }) : /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_jsx_runtime72.Fragment, { children: [
|
|
6029
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { "aria-hidden": "true", children: abbr }),
|
|
6030
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "ss-g-sr", children: rowLabel })
|
|
5870
6031
|
] });
|
|
5871
|
-
return /* @__PURE__ */ (0,
|
|
5872
|
-
/* @__PURE__ */ (0,
|
|
6032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_react36.default.Fragment, { children: [
|
|
6033
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "ss-g-btg-rowhdr", "data-meta": rowMeta ? "true" : void 0, children: rowHeaderContent }),
|
|
5873
6034
|
cols.map((colLabel, colIdx) => {
|
|
5874
6035
|
const filled = findCellResult(filledCells, rowIdx, colIdx);
|
|
5875
6036
|
const isActive = activeCell?.row === rowIdx && activeCell?.col === colIdx;
|
|
5876
6037
|
const state = filled ? filled.isCorrect ? "correct" : "wrong" : isActive ? "active" : "empty";
|
|
5877
|
-
return /* @__PURE__ */ (0,
|
|
6038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
5878
6039
|
"button",
|
|
5879
6040
|
{
|
|
5880
6041
|
type: "button",
|
|
@@ -5885,20 +6046,20 @@ function BeatTheGridGame({
|
|
|
5885
6046
|
className: "ss-g-btg-cell",
|
|
5886
6047
|
disabled: isLocked2 || submitting,
|
|
5887
6048
|
onClick: () => handleCellClick(rowIdx, colIdx),
|
|
5888
|
-
children: filled ? /* @__PURE__ */ (0,
|
|
5889
|
-
/* @__PURE__ */ (0,
|
|
6049
|
+
children: filled ? /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_jsx_runtime72.Fragment, { children: [
|
|
6050
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
5890
6051
|
"span",
|
|
5891
6052
|
{
|
|
5892
6053
|
className: `ss-g-btg-badge ss-g-btg-badge--${filled.isCorrect ? "correct" : "wrong"}`,
|
|
5893
6054
|
role: "img",
|
|
5894
6055
|
"aria-label": filled.isCorrect ? s.correct : s.wrong,
|
|
5895
|
-
children: filled.isCorrect ? /* @__PURE__ */ (0,
|
|
6056
|
+
children: filled.isCorrect ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(IconCheck, { size: 11 }) : /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(IconClose, { size: 11 })
|
|
5896
6057
|
}
|
|
5897
6058
|
),
|
|
5898
|
-
/* @__PURE__ */ (0,
|
|
6059
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "ss-g-btg-rarity", children: filled.rarityScore }),
|
|
5899
6060
|
(() => {
|
|
5900
6061
|
const entry = playerPool.find((p) => p.id === filled.playerId);
|
|
5901
|
-
return /* @__PURE__ */ (0,
|
|
6062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
5902
6063
|
PlayerAvatar,
|
|
5903
6064
|
{
|
|
5904
6065
|
name: entry?.name ?? "",
|
|
@@ -5907,8 +6068,8 @@ function BeatTheGridGame({
|
|
|
5907
6068
|
}
|
|
5908
6069
|
);
|
|
5909
6070
|
})(),
|
|
5910
|
-
/* @__PURE__ */ (0,
|
|
5911
|
-
] }) : /* @__PURE__ */ (0,
|
|
6071
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "ss-g-btg-name", children: shortName(playerPool.find((p) => p.id === filled.playerId)?.name) })
|
|
6072
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "ss-g-btg-plus", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(IconPlus, { size: 22 }) })
|
|
5912
6073
|
},
|
|
5913
6074
|
`cell-${rowIdx}-${colIdx}`
|
|
5914
6075
|
);
|
|
@@ -5918,7 +6079,7 @@ function BeatTheGridGame({
|
|
|
5918
6079
|
]
|
|
5919
6080
|
}
|
|
5920
6081
|
),
|
|
5921
|
-
isLocked2 && /* @__PURE__ */ (0,
|
|
6082
|
+
isLocked2 && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
5922
6083
|
ResultCard,
|
|
5923
6084
|
{
|
|
5924
6085
|
tone: "neutral",
|
|
@@ -5930,7 +6091,7 @@ function BeatTheGridGame({
|
|
|
5930
6091
|
}
|
|
5931
6092
|
)
|
|
5932
6093
|
] }),
|
|
5933
|
-
activeCell !== null && /* @__PURE__ */ (0,
|
|
6094
|
+
activeCell !== null && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "ss-g-btg-pin", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
5934
6095
|
SearchSheet,
|
|
5935
6096
|
{
|
|
5936
6097
|
row: activeCell.row,
|
|
@@ -5949,21 +6110,21 @@ function BeatTheGridGame({
|
|
|
5949
6110
|
}
|
|
5950
6111
|
|
|
5951
6112
|
// src/components/games/GuessTheXiGame.tsx
|
|
5952
|
-
var
|
|
6113
|
+
var import_react37 = require("react");
|
|
5953
6114
|
|
|
5954
6115
|
// src/components/games/ui/PitchSvg.tsx
|
|
5955
|
-
var
|
|
6116
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
5956
6117
|
function PitchSvg({ variant }) {
|
|
5957
|
-
return /* @__PURE__ */ (0,
|
|
5958
|
-
/* @__PURE__ */ (0,
|
|
5959
|
-
variant === "full" ? /* @__PURE__ */ (0,
|
|
5960
|
-
/* @__PURE__ */ (0,
|
|
5961
|
-
/* @__PURE__ */ (0,
|
|
5962
|
-
/* @__PURE__ */ (0,
|
|
5963
|
-
/* @__PURE__ */ (0,
|
|
5964
|
-
] }) : /* @__PURE__ */ (0,
|
|
5965
|
-
/* @__PURE__ */ (0,
|
|
5966
|
-
/* @__PURE__ */ (0,
|
|
6118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("svg", { className: "ss-g-pitch-svg", viewBox: variant === "full" ? "0 0 100 150" : "0 0 100 100", preserveAspectRatio: "none", "aria-hidden": "true", children: [
|
|
6119
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("rect", { x: "4", y: "4", width: "92", height: variant === "full" ? 142 : 92, fill: "none" }),
|
|
6120
|
+
variant === "full" ? /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
|
|
6121
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("line", { x1: "4", y1: "75", x2: "96", y2: "75" }),
|
|
6122
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("circle", { cx: "50", cy: "75", r: "12", fill: "none" }),
|
|
6123
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("rect", { x: "26", y: "4", width: "48", height: "20", fill: "none" }),
|
|
6124
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("rect", { x: "26", y: "126", width: "48", height: "20", fill: "none" })
|
|
6125
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
|
|
6126
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("path", { d: "M38 4a12 12 0 0 0 24 0", fill: "none" }),
|
|
6127
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("rect", { x: "26", y: "76", width: "48", height: "20", fill: "none" })
|
|
5967
6128
|
] })
|
|
5968
6129
|
] });
|
|
5969
6130
|
}
|
|
@@ -6019,7 +6180,7 @@ function positionsBySlot(formation, rowsAttackFirst) {
|
|
|
6019
6180
|
}
|
|
6020
6181
|
|
|
6021
6182
|
// src/components/games/GuessTheXiGame.tsx
|
|
6022
|
-
var
|
|
6183
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
6023
6184
|
var MAX_GUESSES2 = 3;
|
|
6024
6185
|
function parseClientState5(json) {
|
|
6025
6186
|
if (!json) return null;
|
|
@@ -6038,8 +6199,8 @@ function GuessTheXiGame({
|
|
|
6038
6199
|
onBack
|
|
6039
6200
|
}) {
|
|
6040
6201
|
const t = ui.games.guessTheXi;
|
|
6041
|
-
const [query, setQuery] = (0,
|
|
6042
|
-
const inputId = (0,
|
|
6202
|
+
const [query, setQuery] = (0, import_react37.useState)("");
|
|
6203
|
+
const inputId = (0, import_react37.useId)();
|
|
6043
6204
|
const clientState = parseClientState5(result?.clientStateJson);
|
|
6044
6205
|
const isOver = result?.alreadyPlayed === true || clientState?.status === "solved" || clientState?.status === "failed";
|
|
6045
6206
|
const solved = clientState?.status === "solved";
|
|
@@ -6069,30 +6230,30 @@ function GuessTheXiGame({
|
|
|
6069
6230
|
const wrongGuesses = (clientState?.guessHistory ?? []).filter((g) => !g.wasCorrect);
|
|
6070
6231
|
const guessesLeft = Math.max(0, MAX_GUESSES2 - (clientState?.guessesUsed ?? 0));
|
|
6071
6232
|
const teamName = (id) => config?.teamPool.find((tm) => tm.teamId === id)?.teamName ?? `#${id}`;
|
|
6072
|
-
return /* @__PURE__ */ (0,
|
|
6073
|
-
/* @__PURE__ */ (0,
|
|
6233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-screen ss-g-gxi", "data-testid": "game-screen-guess-the-xi", children: [
|
|
6234
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6074
6235
|
GameHeader,
|
|
6075
6236
|
{
|
|
6076
6237
|
title: gameTitle({ gameId: "guess-the-xi" }, ui.games.titles),
|
|
6077
6238
|
eyebrow: config?.poolLabel,
|
|
6078
|
-
right: formation ? /* @__PURE__ */ (0,
|
|
6239
|
+
right: formation ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Chip, { variant: "accent", children: formation }) : void 0,
|
|
6079
6240
|
onBack,
|
|
6080
6241
|
backLabel: ui.back
|
|
6081
6242
|
}
|
|
6082
6243
|
),
|
|
6083
|
-
!config && /* @__PURE__ */ (0,
|
|
6084
|
-
config && /* @__PURE__ */ (0,
|
|
6085
|
-
/* @__PURE__ */ (0,
|
|
6086
|
-
rows.length > 0 && /* @__PURE__ */ (0,
|
|
6087
|
-
/* @__PURE__ */ (0,
|
|
6088
|
-
/* @__PURE__ */ (0,
|
|
6244
|
+
!config && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
6245
|
+
config && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
|
|
6246
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-body", children: [
|
|
6247
|
+
rows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-gxi-pitch", role: "group", "aria-label": t.pitchLabel, children: [
|
|
6248
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(PitchSvg, { variant: "full" }),
|
|
6249
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "ss-g-gxi-rows", children: rows.map((row, r) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "ss-g-gxi-row", children: row.map((pos, c) => {
|
|
6089
6250
|
const posLabel = pos.slot ? posBySlot.get(pos.slot) ?? "" : "";
|
|
6090
6251
|
const name = pos.slot ? nameBySlot.get(pos.slot) : void 0;
|
|
6091
6252
|
const lineupEntry = pos.slot ? lineupBySlot.get(pos.slot) : void 0;
|
|
6092
6253
|
const flag = nationalityFlag(pos.nationality);
|
|
6093
6254
|
if (lineupEntry) {
|
|
6094
|
-
return /* @__PURE__ */ (0,
|
|
6095
|
-
/* @__PURE__ */ (0,
|
|
6255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-gxi-node", "data-revealed": "true", children: [
|
|
6256
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6096
6257
|
PlayerAvatar,
|
|
6097
6258
|
{
|
|
6098
6259
|
name: lineupEntry.name,
|
|
@@ -6100,11 +6261,11 @@ function GuessTheXiGame({
|
|
|
6100
6261
|
className: "ss-g-gxi-disc ss-g-gxi-disc--photo"
|
|
6101
6262
|
}
|
|
6102
6263
|
),
|
|
6103
|
-
/* @__PURE__ */ (0,
|
|
6264
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-gxi-pos ss-g-gxi-pos--name", children: splitName(lineupEntry.name).last })
|
|
6104
6265
|
] }, `${pos.slot}-${c}`);
|
|
6105
6266
|
}
|
|
6106
|
-
return /* @__PURE__ */ (0,
|
|
6107
|
-
/* @__PURE__ */ (0,
|
|
6267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-gxi-node", "data-revealed": name ? "true" : void 0, children: [
|
|
6268
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6108
6269
|
"span",
|
|
6109
6270
|
{
|
|
6110
6271
|
className: "ss-g-gxi-disc",
|
|
@@ -6115,22 +6276,22 @@ function GuessTheXiGame({
|
|
|
6115
6276
|
children: flag
|
|
6116
6277
|
}
|
|
6117
6278
|
),
|
|
6118
|
-
name ? /* @__PURE__ */ (0,
|
|
6279
|
+
name ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-gxi-pos ss-g-gxi-pos--name", children: splitName(name).last }) : posLabel && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-gxi-pos", children: posLabel })
|
|
6119
6280
|
] }, `${pos.slot}-${c}`);
|
|
6120
6281
|
}) }, r)) })
|
|
6121
6282
|
] }),
|
|
6122
|
-
!isOver && wrongGuesses.length > 0 && /* @__PURE__ */ (0,
|
|
6123
|
-
/* @__PURE__ */ (0,
|
|
6283
|
+
!isOver && wrongGuesses.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-gxi-wrong", children: [
|
|
6284
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-gxi-wrong-l", children: t.notThem }),
|
|
6124
6285
|
wrongGuesses.map((g) => {
|
|
6125
6286
|
const crestUrl = config?.teamPool.find((tm) => tm.teamId === g.teamId)?.crestUrl;
|
|
6126
|
-
return /* @__PURE__ */ (0,
|
|
6127
|
-
/* @__PURE__ */ (0,
|
|
6128
|
-
/* @__PURE__ */ (0,
|
|
6287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("span", { className: "ss-g-gxi-wrong-chip", children: [
|
|
6288
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(CrestShield, { src: crestUrl, name: teamName(g.teamId), size: 18 }),
|
|
6289
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("s", { children: teamName(g.teamId) })
|
|
6129
6290
|
] }, g.teamId);
|
|
6130
6291
|
})
|
|
6131
6292
|
] }),
|
|
6132
|
-
isOver && /* @__PURE__ */ (0,
|
|
6133
|
-
/* @__PURE__ */ (0,
|
|
6293
|
+
isOver && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
|
|
6294
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6134
6295
|
ResultCard,
|
|
6135
6296
|
{
|
|
6136
6297
|
tone: solved ? "win" : failed ? "lose" : "neutral",
|
|
@@ -6141,29 +6302,29 @@ function GuessTheXiGame({
|
|
|
6141
6302
|
ui
|
|
6142
6303
|
}
|
|
6143
6304
|
),
|
|
6144
|
-
(solved || failed) && clientState?.answer && /* @__PURE__ */ (0,
|
|
6145
|
-
/* @__PURE__ */ (0,
|
|
6146
|
-
/* @__PURE__ */ (0,
|
|
6147
|
-
/* @__PURE__ */ (0,
|
|
6305
|
+
(solved || failed) && clientState?.answer && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-gxi-answer", "data-testid": "gxi-answer-reveal", children: [
|
|
6306
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-gxi-answer-label", children: t.theAnswer }),
|
|
6307
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(CrestShield, { src: clientState.answer.crestUrl, name: clientState.answer.teamName, size: 32 }),
|
|
6308
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-gxi-answer-name", children: clientState.answer.teamName })
|
|
6148
6309
|
] })
|
|
6149
6310
|
] })
|
|
6150
6311
|
] }),
|
|
6151
|
-
!isOver && /* @__PURE__ */ (0,
|
|
6152
|
-
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0,
|
|
6312
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(FooterBar, { children: [
|
|
6313
|
+
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6153
6314
|
OptionList,
|
|
6154
6315
|
{
|
|
6155
6316
|
label: t.optionsLabel,
|
|
6156
6317
|
options: filtered.map((tm) => ({
|
|
6157
6318
|
key: tm.teamId,
|
|
6158
|
-
content: /* @__PURE__ */ (0,
|
|
6159
|
-
/* @__PURE__ */ (0,
|
|
6160
|
-
/* @__PURE__ */ (0,
|
|
6319
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
|
|
6320
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(CrestShield, { src: tm.crestUrl, name: tm.teamName, size: 28 }),
|
|
6321
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { children: tm.teamName })
|
|
6161
6322
|
] })
|
|
6162
6323
|
})),
|
|
6163
6324
|
onPick: (k) => handlePick(Number(k))
|
|
6164
6325
|
}
|
|
6165
6326
|
),
|
|
6166
|
-
/* @__PURE__ */ (0,
|
|
6327
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6167
6328
|
SearchField,
|
|
6168
6329
|
{
|
|
6169
6330
|
id: inputId,
|
|
@@ -6180,8 +6341,8 @@ function GuessTheXiGame({
|
|
|
6180
6341
|
}
|
|
6181
6342
|
|
|
6182
6343
|
// src/components/games/DailyQuizGame.tsx
|
|
6183
|
-
var
|
|
6184
|
-
var
|
|
6344
|
+
var import_react38 = require("react");
|
|
6345
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
6185
6346
|
function parseClientState6(json) {
|
|
6186
6347
|
if (!json) return null;
|
|
6187
6348
|
try {
|
|
@@ -6202,13 +6363,13 @@ function OptionName({ text }) {
|
|
|
6202
6363
|
const tokens = base.split(/\s+/).filter(Boolean);
|
|
6203
6364
|
const isPlainName = tokens.length >= 1 && tokens.length <= 4 && tokens.every((t) => NAME_TOKEN.test(t));
|
|
6204
6365
|
if (!isPlainName || base === "") {
|
|
6205
|
-
return /* @__PURE__ */ (0,
|
|
6366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-dq-opt-name", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-dq-opt-full", children: text }) });
|
|
6206
6367
|
}
|
|
6207
6368
|
const { first, last } = splitName(base);
|
|
6208
|
-
return /* @__PURE__ */ (0,
|
|
6209
|
-
first && /* @__PURE__ */ (0,
|
|
6210
|
-
/* @__PURE__ */ (0,
|
|
6211
|
-
suffix && /* @__PURE__ */ (0,
|
|
6369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("span", { className: "ss-g-dq-opt-name", children: [
|
|
6370
|
+
first && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-dq-opt-first", children: first }),
|
|
6371
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-dq-opt-last", children: last }),
|
|
6372
|
+
suffix && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-dq-opt-suffix", children: suffix })
|
|
6212
6373
|
] });
|
|
6213
6374
|
}
|
|
6214
6375
|
function DailyQuizGame({
|
|
@@ -6221,15 +6382,15 @@ function DailyQuizGame({
|
|
|
6221
6382
|
}) {
|
|
6222
6383
|
const s = ui.games.dailyQuiz;
|
|
6223
6384
|
const title = gameTitle({ gameId: "daily-quiz" }, ui.games.titles);
|
|
6224
|
-
const [selections, setSelections] = (0,
|
|
6225
|
-
const [page, setPage] = (0,
|
|
6385
|
+
const [selections, setSelections] = (0, import_react38.useState)(/* @__PURE__ */ new Map());
|
|
6386
|
+
const [page, setPage] = (0, import_react38.useState)(0);
|
|
6226
6387
|
const clientState = parseClientState6(result?.clientStateJson);
|
|
6227
6388
|
const results = clientState?.results ?? [];
|
|
6228
6389
|
const isRevealed = results.length > 0 || result?.alreadyPlayed === true;
|
|
6229
6390
|
if (!config) {
|
|
6230
|
-
return /* @__PURE__ */ (0,
|
|
6231
|
-
/* @__PURE__ */ (0,
|
|
6232
|
-
/* @__PURE__ */ (0,
|
|
6391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-screen", "data-testid": "game-screen-daily-quiz", children: [
|
|
6392
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(GameHeader, { title, onBack, backLabel: ui.back }),
|
|
6393
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
6233
6394
|
] });
|
|
6234
6395
|
}
|
|
6235
6396
|
const questions = config.questions;
|
|
@@ -6264,11 +6425,11 @@ function DailyQuizGame({
|
|
|
6264
6425
|
return r.isCorrect ? "correct" : "wrong";
|
|
6265
6426
|
});
|
|
6266
6427
|
const correctCount = results.filter((r) => r.isCorrect).length;
|
|
6267
|
-
return /* @__PURE__ */ (0,
|
|
6268
|
-
/* @__PURE__ */ (0,
|
|
6269
|
-
/* @__PURE__ */ (0,
|
|
6270
|
-
/* @__PURE__ */ (0,
|
|
6271
|
-
/* @__PURE__ */ (0,
|
|
6428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-screen", "data-testid": "game-screen-daily-quiz", children: [
|
|
6429
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(GameHeader, { title, eyebrow: s.results, onBack, backLabel: ui.back }),
|
|
6430
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(SegmentProgress, { segments: segments2, ariaLabel: s.results }),
|
|
6431
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-body", children: [
|
|
6432
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6272
6433
|
ResultCard,
|
|
6273
6434
|
{
|
|
6274
6435
|
tone: "neutral",
|
|
@@ -6281,15 +6442,15 @@ function DailyQuizGame({
|
|
|
6281
6442
|
questions.map((q) => {
|
|
6282
6443
|
const r = findResult(results, q.index);
|
|
6283
6444
|
const picked = selections.get(q.index);
|
|
6284
|
-
return /* @__PURE__ */ (0,
|
|
6285
|
-
/* @__PURE__ */ (0,
|
|
6286
|
-
r && /* @__PURE__ */ (0,
|
|
6445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-dq-rq", children: [
|
|
6446
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "ss-g-dq-rq-stem", children: q.stem }),
|
|
6447
|
+
r && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "ss-g-dq-rq-opts", children: q.options.map((opt, optIdx) => {
|
|
6287
6448
|
let cls = "ss-g-dq-rq-opt";
|
|
6288
6449
|
if (optIdx === r.correctOptionIndex) cls += " ss-g-dq-rq-opt--correct";
|
|
6289
6450
|
else if (optIdx === picked && !r.isCorrect) cls += " ss-g-dq-rq-opt--wrong";
|
|
6290
|
-
return /* @__PURE__ */ (0,
|
|
6451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: cls, children: opt }, optIdx);
|
|
6291
6452
|
}) }),
|
|
6292
|
-
r?.revealText && /* @__PURE__ */ (0,
|
|
6453
|
+
r?.revealText && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "ss-g-dq-why", children: r.revealText })
|
|
6293
6454
|
] }, q.index);
|
|
6294
6455
|
})
|
|
6295
6456
|
] })
|
|
@@ -6297,16 +6458,16 @@ function DailyQuizGame({
|
|
|
6297
6458
|
}
|
|
6298
6459
|
const segments = questions.map((_, i) => i < page ? "done" : i === page ? "current" : "todo");
|
|
6299
6460
|
const selectedIdx = current ? selections.get(current.index) : void 0;
|
|
6300
|
-
return /* @__PURE__ */ (0,
|
|
6301
|
-
/* @__PURE__ */ (0,
|
|
6302
|
-
/* @__PURE__ */ (0,
|
|
6303
|
-
/* @__PURE__ */ (0,
|
|
6304
|
-
/* @__PURE__ */ (0,
|
|
6305
|
-
/* @__PURE__ */ (0,
|
|
6461
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-screen", "data-testid": "game-screen-daily-quiz", children: [
|
|
6462
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(GameHeader, { title, eyebrow: s.questionOf(page + 1, total), onBack, backLabel: ui.back }),
|
|
6463
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(SegmentProgress, { segments, ariaLabel: s.progressAria(page + 1, total) }),
|
|
6464
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "ss-g-body", children: current && /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_jsx_runtime75.Fragment, { children: [
|
|
6465
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("h3", { className: "ss-g-dq-stem", children: current.stem }),
|
|
6466
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "ss-g-dq-opts", children: current.options.map((opt, optIdx) => {
|
|
6306
6467
|
const selected = optIdx === selectedIdx;
|
|
6307
6468
|
const imagePath = current.optionImagePaths?.[optIdx] ?? void 0;
|
|
6308
6469
|
const playerName = opt;
|
|
6309
|
-
return /* @__PURE__ */ (0,
|
|
6470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
|
|
6310
6471
|
"button",
|
|
6311
6472
|
{
|
|
6312
6473
|
type: "button",
|
|
@@ -6315,25 +6476,25 @@ function DailyQuizGame({
|
|
|
6315
6476
|
disabled: submitting,
|
|
6316
6477
|
onClick: () => handleSelect(current.index, optIdx),
|
|
6317
6478
|
children: [
|
|
6318
|
-
current.optionImagePaths && /* @__PURE__ */ (0,
|
|
6319
|
-
/* @__PURE__ */ (0,
|
|
6320
|
-
/* @__PURE__ */ (0,
|
|
6479
|
+
current.optionImagePaths && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(PlayerAvatar, { name: playerName, imagePath, className: "ss-g-dq-opt-av" }),
|
|
6480
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-dq-badge", "aria-hidden": "true", children: selected ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(IconCheck, {}) : String.fromCharCode(65 + optIdx) }),
|
|
6481
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(OptionName, { text: opt })
|
|
6321
6482
|
]
|
|
6322
6483
|
},
|
|
6323
6484
|
optIdx
|
|
6324
6485
|
);
|
|
6325
6486
|
}) })
|
|
6326
6487
|
] }) }),
|
|
6327
|
-
/* @__PURE__ */ (0,
|
|
6328
|
-
page > 0 && /* @__PURE__ */ (0,
|
|
6329
|
-
isLast ? /* @__PURE__ */ (0,
|
|
6488
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-dq-nav", children: [
|
|
6489
|
+
page > 0 && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(GameButton, { variant: "outline", onClick: goPrev, disabled: submitting, children: s.previous }),
|
|
6490
|
+
isLast ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(GameButton, { variant: "primary", block: true, onClick: handleSubmit, disabled: !currentAnswered || !allAnswered || submitting, children: submitting ? s.submitting : s.submit }) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(GameButton, { variant: "primary", block: true, onClick: goNext, disabled: !currentAnswered || submitting, children: s.next })
|
|
6330
6491
|
] }) })
|
|
6331
6492
|
] });
|
|
6332
6493
|
}
|
|
6333
6494
|
|
|
6334
6495
|
// src/components/games/MatchdayPredictorGame.tsx
|
|
6335
|
-
var
|
|
6336
|
-
var
|
|
6496
|
+
var import_react39 = require("react");
|
|
6497
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
6337
6498
|
var SCORER_SEARCH_THRESHOLD = 9;
|
|
6338
6499
|
function parseClientState7(json) {
|
|
6339
6500
|
if (!json) return null;
|
|
@@ -6351,7 +6512,7 @@ function isLocked(kickoffUtc) {
|
|
|
6351
6512
|
}
|
|
6352
6513
|
}
|
|
6353
6514
|
function IconMinus() {
|
|
6354
|
-
return /* @__PURE__ */ (0,
|
|
6515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6355
6516
|
"svg",
|
|
6356
6517
|
{
|
|
6357
6518
|
width: 18,
|
|
@@ -6362,20 +6523,20 @@ function IconMinus() {
|
|
|
6362
6523
|
strokeWidth: 2.2,
|
|
6363
6524
|
strokeLinecap: "round",
|
|
6364
6525
|
"aria-hidden": "true",
|
|
6365
|
-
children: /* @__PURE__ */ (0,
|
|
6526
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("path", { d: "M5 12h14" })
|
|
6366
6527
|
}
|
|
6367
6528
|
);
|
|
6368
6529
|
}
|
|
6369
6530
|
function TeamBadge({ team, label }) {
|
|
6370
|
-
return /* @__PURE__ */ (0,
|
|
6371
|
-
/* @__PURE__ */ (0,
|
|
6372
|
-
/* @__PURE__ */ (0,
|
|
6373
|
-
/* @__PURE__ */ (0,
|
|
6531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-mp-team", children: [
|
|
6532
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(CrestShield, { name: team.name, size: 44 }),
|
|
6533
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-mp-team-name", children: team.name }),
|
|
6534
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-mp-team-side", children: label })
|
|
6374
6535
|
] });
|
|
6375
6536
|
}
|
|
6376
6537
|
function ScoreCard({ home, away, h, a, t, edit }) {
|
|
6377
|
-
const col = (side, team, value) => /* @__PURE__ */ (0,
|
|
6378
|
-
edit && /* @__PURE__ */ (0,
|
|
6538
|
+
const col = (side, team, value) => /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-mp-col", children: [
|
|
6539
|
+
edit && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6379
6540
|
"button",
|
|
6380
6541
|
{
|
|
6381
6542
|
type: "button",
|
|
@@ -6383,11 +6544,11 @@ function ScoreCard({ home, away, h, a, t, edit }) {
|
|
|
6383
6544
|
"aria-label": t.goalsUp(team.name),
|
|
6384
6545
|
disabled: edit.disabled,
|
|
6385
6546
|
onClick: () => edit.onStep(side, 1),
|
|
6386
|
-
children: /* @__PURE__ */ (0,
|
|
6547
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(IconPlus, { size: 18 })
|
|
6387
6548
|
}
|
|
6388
6549
|
),
|
|
6389
|
-
/* @__PURE__ */ (0,
|
|
6390
|
-
edit && /* @__PURE__ */ (0,
|
|
6550
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-mp-digit", "data-testid": "mp-digit", "data-active": edit ? String(edit.active === side) : "false", children: value }),
|
|
6551
|
+
edit && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6391
6552
|
"button",
|
|
6392
6553
|
{
|
|
6393
6554
|
type: "button",
|
|
@@ -6395,27 +6556,27 @@ function ScoreCard({ home, away, h, a, t, edit }) {
|
|
|
6395
6556
|
"aria-label": t.goalsDown(team.name),
|
|
6396
6557
|
disabled: edit.disabled || value <= 0,
|
|
6397
6558
|
onClick: () => edit.onStep(side, -1),
|
|
6398
|
-
children: /* @__PURE__ */ (0,
|
|
6559
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(IconMinus, {})
|
|
6399
6560
|
}
|
|
6400
6561
|
)
|
|
6401
6562
|
] });
|
|
6402
|
-
return /* @__PURE__ */ (0,
|
|
6403
|
-
/* @__PURE__ */ (0,
|
|
6404
|
-
/* @__PURE__ */ (0,
|
|
6563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-mp-card", children: [
|
|
6564
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(TeamBadge, { team: home, label: t.home }),
|
|
6565
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-mp-scores", children: [
|
|
6405
6566
|
col("home", home, h),
|
|
6406
|
-
/* @__PURE__ */ (0,
|
|
6567
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-mp-dash", "aria-hidden": "true", children: "\u2013" }),
|
|
6407
6568
|
col("away", away, a)
|
|
6408
6569
|
] }),
|
|
6409
|
-
/* @__PURE__ */ (0,
|
|
6570
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(TeamBadge, { team: away, label: t.away })
|
|
6410
6571
|
] });
|
|
6411
6572
|
}
|
|
6412
6573
|
function OutcomeRow({ label, ok, detail, t }) {
|
|
6413
|
-
return /* @__PURE__ */ (0,
|
|
6414
|
-
/* @__PURE__ */ (0,
|
|
6415
|
-
/* @__PURE__ */ (0,
|
|
6416
|
-
ok ? /* @__PURE__ */ (0,
|
|
6417
|
-
/* @__PURE__ */ (0,
|
|
6418
|
-
detail ? /* @__PURE__ */ (0,
|
|
6574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("li", { className: "ss-g-mp-row", "data-testid": "mp-row", "data-ok": String(ok), children: [
|
|
6575
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-mp-row-k", children: label }),
|
|
6576
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { className: "ss-g-mp-row-v", children: [
|
|
6577
|
+
ok ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(IconCheck, {}) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(IconClose, { size: 14 }),
|
|
6578
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-sr", children: ok ? t.correct : t.incorrect }),
|
|
6579
|
+
detail ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-mp-row-d", children: detail }) : null
|
|
6419
6580
|
] })
|
|
6420
6581
|
] });
|
|
6421
6582
|
}
|
|
@@ -6428,20 +6589,20 @@ function MatchdayPredictorGame({
|
|
|
6428
6589
|
onBack
|
|
6429
6590
|
}) {
|
|
6430
6591
|
const t = ui.games.predictor;
|
|
6431
|
-
const [homeScore, setHomeScore] = (0,
|
|
6432
|
-
const [awayScore, setAwayScore] = (0,
|
|
6433
|
-
const [firstScorerPlayerId, setFirstScorerPlayerId] = (0,
|
|
6434
|
-
const [lastEdited, setLastEdited] = (0,
|
|
6435
|
-
const [query, setQuery] = (0,
|
|
6436
|
-
const searchId = (0,
|
|
6592
|
+
const [homeScore, setHomeScore] = (0, import_react39.useState)(0);
|
|
6593
|
+
const [awayScore, setAwayScore] = (0, import_react39.useState)(0);
|
|
6594
|
+
const [firstScorerPlayerId, setFirstScorerPlayerId] = (0, import_react39.useState)(null);
|
|
6595
|
+
const [lastEdited, setLastEdited] = (0, import_react39.useState)("home");
|
|
6596
|
+
const [query, setQuery] = (0, import_react39.useState)("");
|
|
6597
|
+
const searchId = (0, import_react39.useId)();
|
|
6437
6598
|
const clientState = parseClientState7(result?.clientStateJson);
|
|
6438
6599
|
const alreadyPlayed = result?.alreadyPlayed === true;
|
|
6439
|
-
const header = /* @__PURE__ */ (0,
|
|
6600
|
+
const header = /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6440
6601
|
GameHeader,
|
|
6441
6602
|
{
|
|
6442
6603
|
title: gameTitle({ gameId: "matchday-predictor" }, ui.games.titles),
|
|
6443
6604
|
eyebrow: config ? t.eyebrow(config.homeTeam.name, config.awayTeam.name) : void 0,
|
|
6444
|
-
right: config ? /* @__PURE__ */ (0,
|
|
6605
|
+
right: config ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Chip, { icon: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(IconLock, {}), children: ui.games.formatDayTime(config.kickoffUtc) }) : void 0,
|
|
6445
6606
|
onBack,
|
|
6446
6607
|
backLabel: ui.back
|
|
6447
6608
|
}
|
|
@@ -6449,10 +6610,10 @@ function MatchdayPredictorGame({
|
|
|
6449
6610
|
if (alreadyPlayed && clientState) {
|
|
6450
6611
|
if (!clientState.graded) {
|
|
6451
6612
|
const scorer = config?.scorerPool.find((p) => p.playerId === clientState.predictedFirstScorerPlayerId) ?? null;
|
|
6452
|
-
return /* @__PURE__ */ (0,
|
|
6613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-screen", "data-testid": "game-screen-matchday-predictor", children: [
|
|
6453
6614
|
header,
|
|
6454
|
-
/* @__PURE__ */ (0,
|
|
6455
|
-
config && /* @__PURE__ */ (0,
|
|
6615
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-body", children: [
|
|
6616
|
+
config && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6456
6617
|
ScoreCard,
|
|
6457
6618
|
{
|
|
6458
6619
|
home: config.homeTeam,
|
|
@@ -6462,7 +6623,7 @@ function MatchdayPredictorGame({
|
|
|
6462
6623
|
t
|
|
6463
6624
|
}
|
|
6464
6625
|
),
|
|
6465
|
-
/* @__PURE__ */ (0,
|
|
6626
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6466
6627
|
ResultCard,
|
|
6467
6628
|
{
|
|
6468
6629
|
tone: "neutral",
|
|
@@ -6479,28 +6640,28 @@ function MatchdayPredictorGame({
|
|
|
6479
6640
|
}
|
|
6480
6641
|
)
|
|
6481
6642
|
] }),
|
|
6482
|
-
/* @__PURE__ */ (0,
|
|
6643
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("p", { className: "ss-g-mp-fun", children: t.forFun }) })
|
|
6483
6644
|
] });
|
|
6484
6645
|
}
|
|
6485
6646
|
const r = clientState.result;
|
|
6486
|
-
return /* @__PURE__ */ (0,
|
|
6647
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-screen", "data-testid": "game-screen-matchday-predictor", children: [
|
|
6487
6648
|
header,
|
|
6488
|
-
/* @__PURE__ */ (0,
|
|
6489
|
-
config && /* @__PURE__ */ (0,
|
|
6490
|
-
/* @__PURE__ */ (0,
|
|
6491
|
-
/* @__PURE__ */ (0,
|
|
6492
|
-
/* @__PURE__ */ (0,
|
|
6493
|
-
/* @__PURE__ */ (0,
|
|
6494
|
-
!clientState.firstScorerVoid && /* @__PURE__ */ (0,
|
|
6649
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-body", children: [
|
|
6650
|
+
config && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(ScoreCard, { home: config.homeTeam, away: config.awayTeam, h: r.homeScore, a: r.awayScore, t }),
|
|
6651
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(ResultCard, { tone: "neutral", title: t.fullTime(r.homeScore, r.awayScore), onBack, ui }),
|
|
6652
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("ul", { className: "ss-g-mp-rows", children: [
|
|
6653
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(OutcomeRow, { label: t.exactScore, ok: clientState.exactScoreCorrect, t }),
|
|
6654
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(OutcomeRow, { label: t.outcome, ok: clientState.outcomeCorrect, t }),
|
|
6655
|
+
!clientState.firstScorerVoid && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(OutcomeRow, { label: t.firstScorerRow, ok: clientState.firstScorerCorrect, detail: r.firstScorerName, t })
|
|
6495
6656
|
] })
|
|
6496
6657
|
] }),
|
|
6497
|
-
/* @__PURE__ */ (0,
|
|
6658
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("p", { className: "ss-g-mp-fun", children: t.forFun }) })
|
|
6498
6659
|
] });
|
|
6499
6660
|
}
|
|
6500
6661
|
if (!config) {
|
|
6501
|
-
return /* @__PURE__ */ (0,
|
|
6662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-screen", "data-testid": "game-screen-matchday-predictor", children: [
|
|
6502
6663
|
header,
|
|
6503
|
-
/* @__PURE__ */ (0,
|
|
6664
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
6504
6665
|
] });
|
|
6505
6666
|
}
|
|
6506
6667
|
const locked = isLocked(config.kickoffUtc);
|
|
@@ -6524,10 +6685,10 @@ function MatchdayPredictorGame({
|
|
|
6524
6685
|
const showSearch = pool.length > SCORER_SEARCH_THRESHOLD;
|
|
6525
6686
|
const q = query.trim().toLowerCase();
|
|
6526
6687
|
const visible = showSearch && q ? pool.filter((p) => p.playerName.toLowerCase().includes(q)) : pool;
|
|
6527
|
-
return /* @__PURE__ */ (0,
|
|
6688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-screen", "data-testid": "game-screen-matchday-predictor", children: [
|
|
6528
6689
|
header,
|
|
6529
|
-
/* @__PURE__ */ (0,
|
|
6530
|
-
/* @__PURE__ */ (0,
|
|
6690
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-body", children: [
|
|
6691
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6531
6692
|
ScoreCard,
|
|
6532
6693
|
{
|
|
6533
6694
|
home: config.homeTeam,
|
|
@@ -6538,12 +6699,12 @@ function MatchdayPredictorGame({
|
|
|
6538
6699
|
edit: { disabled, active: lastEdited, onStep: step }
|
|
6539
6700
|
}
|
|
6540
6701
|
),
|
|
6541
|
-
pool.length > 0 && /* @__PURE__ */ (0,
|
|
6542
|
-
/* @__PURE__ */ (0,
|
|
6543
|
-
/* @__PURE__ */ (0,
|
|
6544
|
-
/* @__PURE__ */ (0,
|
|
6702
|
+
pool.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("section", { className: "ss-g-mp-scorer", children: [
|
|
6703
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-mp-sec-head", children: [
|
|
6704
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("h3", { children: t.firstScorer }),
|
|
6705
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { children: t.optional })
|
|
6545
6706
|
] }),
|
|
6546
|
-
showSearch && /* @__PURE__ */ (0,
|
|
6707
|
+
showSearch && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6547
6708
|
SearchField,
|
|
6548
6709
|
{
|
|
6549
6710
|
id: searchId,
|
|
@@ -6555,9 +6716,9 @@ function MatchdayPredictorGame({
|
|
|
6555
6716
|
disabled
|
|
6556
6717
|
}
|
|
6557
6718
|
),
|
|
6558
|
-
/* @__PURE__ */ (0,
|
|
6719
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "ss-g-mp-grid", children: visible.map((p) => {
|
|
6559
6720
|
const selected = firstScorerPlayerId === p.playerId;
|
|
6560
|
-
return /* @__PURE__ */ (0,
|
|
6721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
6561
6722
|
"button",
|
|
6562
6723
|
{
|
|
6563
6724
|
type: "button",
|
|
@@ -6567,15 +6728,15 @@ function MatchdayPredictorGame({
|
|
|
6567
6728
|
disabled,
|
|
6568
6729
|
onClick: () => setFirstScorerPlayerId((id) => id === p.playerId ? null : p.playerId),
|
|
6569
6730
|
children: [
|
|
6570
|
-
selected && /* @__PURE__ */ (0,
|
|
6571
|
-
/* @__PURE__ */ (0,
|
|
6572
|
-
/* @__PURE__ */ (0,
|
|
6731
|
+
selected && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-mp-pcheck", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(IconCheck, { size: 12 }) }),
|
|
6732
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Silhouette, { size: 52, variant: selected ? "selected" : "default" }),
|
|
6733
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-mp-pname", children: splitName(p.playerName).last })
|
|
6573
6734
|
]
|
|
6574
6735
|
},
|
|
6575
6736
|
p.playerId
|
|
6576
6737
|
);
|
|
6577
6738
|
}) }),
|
|
6578
|
-
/* @__PURE__ */ (0,
|
|
6739
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
6579
6740
|
"button",
|
|
6580
6741
|
{
|
|
6581
6742
|
type: "button",
|
|
@@ -6584,24 +6745,24 @@ function MatchdayPredictorGame({
|
|
|
6584
6745
|
disabled,
|
|
6585
6746
|
onClick: () => setFirstScorerPlayerId(null),
|
|
6586
6747
|
children: [
|
|
6587
|
-
/* @__PURE__ */ (0,
|
|
6748
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-mp-radio", "aria-hidden": "true" }),
|
|
6588
6749
|
t.noScorer
|
|
6589
6750
|
]
|
|
6590
6751
|
}
|
|
6591
6752
|
)
|
|
6592
6753
|
] }),
|
|
6593
|
-
locked && /* @__PURE__ */ (0,
|
|
6754
|
+
locked && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("p", { className: "ss-g-mp-closed", children: t.closed })
|
|
6594
6755
|
] }),
|
|
6595
|
-
/* @__PURE__ */ (0,
|
|
6596
|
-
/* @__PURE__ */ (0,
|
|
6597
|
-
/* @__PURE__ */ (0,
|
|
6756
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(FooterBar, { children: [
|
|
6757
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(GameButton, { variant: "primary", block: true, disabled, onClick: handleSubmit, children: submitting ? t.saving : t.save }),
|
|
6758
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("p", { className: "ss-g-mp-fun", children: t.forFun })
|
|
6598
6759
|
] })
|
|
6599
6760
|
] });
|
|
6600
6761
|
}
|
|
6601
6762
|
|
|
6602
6763
|
// src/components/games/StartingXiGame.tsx
|
|
6603
|
-
var
|
|
6604
|
-
var
|
|
6764
|
+
var import_react40 = require("react");
|
|
6765
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
6605
6766
|
var POINTS_PER_STARTER = 8;
|
|
6606
6767
|
var XI_SIZE = 11;
|
|
6607
6768
|
var DEFAULT_FORMATION = "4-3-3";
|
|
@@ -6644,26 +6805,26 @@ function StartingXiGame({
|
|
|
6644
6805
|
lockAtUtc
|
|
6645
6806
|
}) {
|
|
6646
6807
|
const t = ui.games.startingXi;
|
|
6647
|
-
const [slotPlayers, setSlotPlayers] = (0,
|
|
6648
|
-
const [active, setActive] = (0,
|
|
6649
|
-
const [query, setQuery] = (0,
|
|
6650
|
-
const searchId = (0,
|
|
6808
|
+
const [slotPlayers, setSlotPlayers] = (0, import_react40.useState)(() => Array(XI_SIZE).fill(null));
|
|
6809
|
+
const [active, setActive] = (0, import_react40.useState)(0);
|
|
6810
|
+
const [query, setQuery] = (0, import_react40.useState)("");
|
|
6811
|
+
const searchId = (0, import_react40.useId)();
|
|
6651
6812
|
const clientState = parseClientState8(result?.clientStateJson);
|
|
6652
6813
|
const alreadyPlayed = result?.alreadyPlayed === true;
|
|
6653
|
-
const header = /* @__PURE__ */ (0,
|
|
6814
|
+
const header = /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6654
6815
|
GameHeader,
|
|
6655
6816
|
{
|
|
6656
6817
|
title: gameTitle({ gameId: "starting-xi" }, ui.games.titles),
|
|
6657
6818
|
eyebrow: t.eyebrow,
|
|
6658
|
-
right: /* @__PURE__ */ (0,
|
|
6819
|
+
right: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Chip, { variant: "accent", children: t.perStarter(POINTS_PER_STARTER) }),
|
|
6659
6820
|
onBack,
|
|
6660
6821
|
backLabel: ui.back
|
|
6661
6822
|
}
|
|
6662
6823
|
);
|
|
6663
6824
|
function statusScreen(title, score) {
|
|
6664
|
-
return /* @__PURE__ */ (0,
|
|
6825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ss-g-screen", "data-testid": "game-screen-starting-xi", children: [
|
|
6665
6826
|
header,
|
|
6666
|
-
/* @__PURE__ */ (0,
|
|
6827
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "ss-g-body", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(ResultCard, { tone: "neutral", title, score, onBack, ui }) })
|
|
6667
6828
|
] });
|
|
6668
6829
|
}
|
|
6669
6830
|
if (alreadyPlayed) {
|
|
@@ -6672,9 +6833,9 @@ function StartingXiGame({
|
|
|
6672
6833
|
if (clientState.status === "graded") return statusScreen(t.gradedLine(clientState.correctCount), clientState.score);
|
|
6673
6834
|
}
|
|
6674
6835
|
if (!config) {
|
|
6675
|
-
return /* @__PURE__ */ (0,
|
|
6836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ss-g-screen", "data-testid": "game-screen-starting-xi", children: [
|
|
6676
6837
|
header,
|
|
6677
|
-
/* @__PURE__ */ (0,
|
|
6838
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
6678
6839
|
] });
|
|
6679
6840
|
}
|
|
6680
6841
|
const { formation, slots } = formationSlots(config.formation);
|
|
@@ -6709,27 +6870,27 @@ function StartingXiGame({
|
|
|
6709
6870
|
onSubmit(JSON.stringify({ predictedPlayerIds: slotPlayers }));
|
|
6710
6871
|
}
|
|
6711
6872
|
const segments = slotPlayers.map((p) => p !== null ? "current" : "todo");
|
|
6712
|
-
return /* @__PURE__ */ (0,
|
|
6873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ss-g-screen", "data-testid": "game-screen-starting-xi", children: [
|
|
6713
6874
|
header,
|
|
6714
|
-
/* @__PURE__ */ (0,
|
|
6875
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6715
6876
|
SegmentProgress,
|
|
6716
6877
|
{
|
|
6717
6878
|
segments,
|
|
6718
6879
|
ariaLabel: t.picked(pickedCount),
|
|
6719
6880
|
leftLabel: t.picked(pickedCount),
|
|
6720
6881
|
rightLabel: t.toGo(XI_SIZE - pickedCount),
|
|
6721
|
-
right: /* @__PURE__ */ (0,
|
|
6882
|
+
right: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Chip, { children: formation })
|
|
6722
6883
|
}
|
|
6723
6884
|
),
|
|
6724
|
-
/* @__PURE__ */ (0,
|
|
6725
|
-
/* @__PURE__ */ (0,
|
|
6726
|
-
/* @__PURE__ */ (0,
|
|
6885
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ss-g-body", children: [
|
|
6886
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ss-g-xi-pitch", children: [
|
|
6887
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(PitchSvg, { variant: "half" }),
|
|
6727
6888
|
slots.map((s) => {
|
|
6728
6889
|
const playerId = slotPlayers[s.index] ?? null;
|
|
6729
6890
|
const player = playerId !== null ? byId.get(playerId) ?? null : null;
|
|
6730
6891
|
const name = player?.playerName ?? "";
|
|
6731
6892
|
const state = player ? "filled" : active === s.index ? "active" : "empty";
|
|
6732
|
-
return /* @__PURE__ */ (0,
|
|
6893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
6733
6894
|
"button",
|
|
6734
6895
|
{
|
|
6735
6896
|
type: "button",
|
|
@@ -6741,21 +6902,21 @@ function StartingXiGame({
|
|
|
6741
6902
|
disabled: submitting,
|
|
6742
6903
|
onClick: () => tapSlot(s.index),
|
|
6743
6904
|
children: [
|
|
6744
|
-
/* @__PURE__ */ (0,
|
|
6745
|
-
/* @__PURE__ */ (0,
|
|
6905
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-xi-ring", "aria-hidden": "true", children: player ? player.jerseyNumber ?? "" : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(IconPlus, { size: 18 }) }),
|
|
6906
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-xi-tag", "aria-hidden": "true", children: player ? splitName(name).last : s.label })
|
|
6746
6907
|
]
|
|
6747
6908
|
},
|
|
6748
6909
|
s.index
|
|
6749
6910
|
);
|
|
6750
6911
|
})
|
|
6751
6912
|
] }),
|
|
6752
|
-
/* @__PURE__ */ (0,
|
|
6753
|
-
/* @__PURE__ */ (0,
|
|
6754
|
-
/* @__PURE__ */ (0,
|
|
6755
|
-
/* @__PURE__ */ (0,
|
|
6756
|
-
] }) : /* @__PURE__ */ (0,
|
|
6757
|
-
activeSlot && /* @__PURE__ */ (0,
|
|
6758
|
-
/* @__PURE__ */ (0,
|
|
6913
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ss-g-xi-picker", children: [
|
|
6914
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "ss-g-xi-picker-head", children: activeSlot ? /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
|
|
6915
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Chip, { variant: "badge", children: activeSlot.label }),
|
|
6916
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("strong", { children: t.pickFor(activeSlot.label) })
|
|
6917
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("strong", { children: t.allPicked }) }),
|
|
6918
|
+
activeSlot && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
|
|
6919
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6759
6920
|
SearchField,
|
|
6760
6921
|
{
|
|
6761
6922
|
id: searchId,
|
|
@@ -6767,18 +6928,18 @@ function StartingXiGame({
|
|
|
6767
6928
|
disabled: submitting
|
|
6768
6929
|
}
|
|
6769
6930
|
),
|
|
6770
|
-
/* @__PURE__ */ (0,
|
|
6771
|
-
/* @__PURE__ */ (0,
|
|
6772
|
-
/* @__PURE__ */ (0,
|
|
6773
|
-
/* @__PURE__ */ (0,
|
|
6931
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("ul", { className: "ss-g-xi-list", children: available.map((p) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("button", { type: "button", className: "ss-g-xi-opt", disabled: submitting, onClick: () => pick(p.playerId), children: [
|
|
6932
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-xi-opt-no", "aria-hidden": "true", children: p.jerseyNumber ?? "" }),
|
|
6933
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-xi-opt-name", children: p.playerName }),
|
|
6934
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-xi-opt-pos", children: p.positionName })
|
|
6774
6935
|
] }) }, p.playerId)) })
|
|
6775
6936
|
] })
|
|
6776
6937
|
] })
|
|
6777
6938
|
] }),
|
|
6778
|
-
/* @__PURE__ */ (0,
|
|
6779
|
-
/* @__PURE__ */ (0,
|
|
6780
|
-
/* @__PURE__ */ (0,
|
|
6781
|
-
/* @__PURE__ */ (0,
|
|
6939
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(FooterBar, { children: [
|
|
6940
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(GameButton, { variant: "primary", block: true, disabled: !canSubmit, onClick: handleSubmit, children: submitting ? t.submitting : t.submit }),
|
|
6941
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("p", { className: "ss-g-xi-lock", children: [
|
|
6942
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(IconLock, {}),
|
|
6782
6943
|
lockAtUtc ? t.locksAt(ui.games.formatDayTime(lockAtUtc)) : t.locksSoon
|
|
6783
6944
|
] })
|
|
6784
6945
|
] })
|
|
@@ -6786,8 +6947,8 @@ function StartingXiGame({
|
|
|
6786
6947
|
}
|
|
6787
6948
|
|
|
6788
6949
|
// src/components/games/StatLadderGame.tsx
|
|
6789
|
-
var
|
|
6790
|
-
var
|
|
6950
|
+
var import_react41 = require("react");
|
|
6951
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
6791
6952
|
function ladderClue(ladder) {
|
|
6792
6953
|
const mystery = ladder.find((r) => r.rank === 2);
|
|
6793
6954
|
if (!mystery) return null;
|
|
@@ -6809,9 +6970,9 @@ function parseClientState9(json) {
|
|
|
6809
6970
|
}
|
|
6810
6971
|
function NameStack({ name }) {
|
|
6811
6972
|
const { first, last } = splitName(name);
|
|
6812
|
-
return /* @__PURE__ */ (0,
|
|
6813
|
-
first && /* @__PURE__ */ (0,
|
|
6814
|
-
/* @__PURE__ */ (0,
|
|
6973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: "ss-g-sl-name", children: [
|
|
6974
|
+
first && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("small", { children: `${first[0]}.` }),
|
|
6975
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("b", { children: last })
|
|
6815
6976
|
] });
|
|
6816
6977
|
}
|
|
6817
6978
|
function StatLadderGame({
|
|
@@ -6823,16 +6984,16 @@ function StatLadderGame({
|
|
|
6823
6984
|
onBack
|
|
6824
6985
|
}) {
|
|
6825
6986
|
const t = ui.games.statLadder;
|
|
6826
|
-
const [query, setQuery] = (0,
|
|
6827
|
-
const [selectedId, setSelectedId] = (0,
|
|
6828
|
-
const searchId = (0,
|
|
6987
|
+
const [query, setQuery] = (0, import_react41.useState)("");
|
|
6988
|
+
const [selectedId, setSelectedId] = (0, import_react41.useState)(null);
|
|
6989
|
+
const searchId = (0, import_react41.useId)();
|
|
6829
6990
|
const clientState = parseClientState9(result?.clientStateJson);
|
|
6830
6991
|
const revealed = clientState != null;
|
|
6831
|
-
const header = /* @__PURE__ */ (0,
|
|
6992
|
+
const header = /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(GameHeader, { title: gameTitle({ gameId: "stat-ladder" }, ui.games.titles), eyebrow: t.eyebrow, onBack, backLabel: ui.back });
|
|
6832
6993
|
if (!config) {
|
|
6833
|
-
return /* @__PURE__ */ (0,
|
|
6994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ss-g-screen", "data-testid": "game-screen-stat-ladder", children: [
|
|
6834
6995
|
header,
|
|
6835
|
-
/* @__PURE__ */ (0,
|
|
6996
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
6836
6997
|
] });
|
|
6837
6998
|
}
|
|
6838
6999
|
const question = t.question(config.statLabel);
|
|
@@ -6844,44 +7005,44 @@ function StatLadderGame({
|
|
|
6844
7005
|
if (selectedId === null || submitting || revealed) return;
|
|
6845
7006
|
onSubmit(JSON.stringify({ guessedPlayerId: selectedId }));
|
|
6846
7007
|
}
|
|
6847
|
-
return /* @__PURE__ */ (0,
|
|
7008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ss-g-screen", "data-testid": "game-screen-stat-ladder", children: [
|
|
6848
7009
|
header,
|
|
6849
|
-
/* @__PURE__ */ (0,
|
|
6850
|
-
/* @__PURE__ */ (0,
|
|
6851
|
-
/* @__PURE__ */ (0,
|
|
6852
|
-
/* @__PURE__ */ (0,
|
|
7010
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ss-g-body", children: [
|
|
7011
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ss-g-sl-prompt", children: [
|
|
7012
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Chip, { variant: "accent", icon: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(IconShield, { size: 14 }), className: "ss-g-sl-stat", children: config.statLabel }),
|
|
7013
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("h3", { className: "ss-g-sl-q", children: [
|
|
6853
7014
|
question.pre,
|
|
6854
|
-
/* @__PURE__ */ (0,
|
|
7015
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("em", { children: question.emph }),
|
|
6855
7016
|
question.post
|
|
6856
7017
|
] })
|
|
6857
7018
|
] }),
|
|
6858
|
-
/* @__PURE__ */ (0,
|
|
6859
|
-
(rung) => rung.rank === 2 ? /* @__PURE__ */ (0,
|
|
7019
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("ol", { className: "ss-g-sl-rungs", children: rungs.map(
|
|
7020
|
+
(rung) => rung.rank === 2 ? /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
6860
7021
|
"li",
|
|
6861
7022
|
{
|
|
6862
7023
|
className: "ss-g-sl-rung ss-g-sl-rung--mystery",
|
|
6863
7024
|
"data-testid": "sl-mystery-rung",
|
|
6864
7025
|
"data-result": revealed ? clientState.isCorrect ? "correct" : "wrong" : void 0,
|
|
6865
7026
|
children: [
|
|
6866
|
-
/* @__PURE__ */ (0,
|
|
6867
|
-
revealed ? /* @__PURE__ */ (0,
|
|
6868
|
-
revealed ? /* @__PURE__ */ (0,
|
|
6869
|
-
/* @__PURE__ */ (0,
|
|
7027
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-sl-rank", children: "2" }),
|
|
7028
|
+
revealed ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(PlayerAvatar, { name: clientState.revealedRank2.playerName, className: "ss-g-sl-av" }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Silhouette, { size: 52, variant: "mystery" }),
|
|
7029
|
+
revealed ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(NameStack, { name: clientState.revealedRank2.playerName }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-sl-who", children: t.whoSecond }),
|
|
7030
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-sl-val ss-g-sl-val--mystery", children: rung.statValue })
|
|
6870
7031
|
]
|
|
6871
7032
|
},
|
|
6872
7033
|
rung.rank
|
|
6873
|
-
) : /* @__PURE__ */ (0,
|
|
6874
|
-
/* @__PURE__ */ (0,
|
|
6875
|
-
/* @__PURE__ */ (0,
|
|
6876
|
-
/* @__PURE__ */ (0,
|
|
6877
|
-
/* @__PURE__ */ (0,
|
|
7034
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("li", { className: "ss-g-sl-rung", children: [
|
|
7035
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-sl-rank", children: rung.rank }),
|
|
7036
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(PlayerAvatar, { name: rung.playerName ?? "?", className: "ss-g-sl-av" }),
|
|
7037
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(NameStack, { name: rung.playerName ?? "?" }),
|
|
7038
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-sl-val", children: rung.statValue })
|
|
6878
7039
|
] }, rung.rank)
|
|
6879
7040
|
) }),
|
|
6880
|
-
clue && /* @__PURE__ */ (0,
|
|
6881
|
-
/* @__PURE__ */ (0,
|
|
6882
|
-
/* @__PURE__ */ (0,
|
|
7041
|
+
clue && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("p", { className: "ss-g-sl-clue", children: [
|
|
7042
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(IconBulb, {}),
|
|
7043
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { children: t.clue(clue, config.statLabel) })
|
|
6883
7044
|
] }),
|
|
6884
|
-
!revealed && /* @__PURE__ */ (0,
|
|
7045
|
+
!revealed && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("ul", { className: "ss-g-sl-pool", children: pool.map((p) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
6885
7046
|
"button",
|
|
6886
7047
|
{
|
|
6887
7048
|
type: "button",
|
|
@@ -6894,13 +7055,13 @@ function StatLadderGame({
|
|
|
6894
7055
|
setQuery(p.playerName);
|
|
6895
7056
|
},
|
|
6896
7057
|
children: [
|
|
6897
|
-
/* @__PURE__ */ (0,
|
|
6898
|
-
/* @__PURE__ */ (0,
|
|
6899
|
-
selectedId === p.playerId && /* @__PURE__ */ (0,
|
|
7058
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(PlayerAvatar, { name: p.playerName, className: "ss-g-sl-opt-av" }),
|
|
7059
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-sl-opt-name", children: p.playerName }),
|
|
7060
|
+
selectedId === p.playerId && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(IconCheck, {})
|
|
6900
7061
|
]
|
|
6901
7062
|
}
|
|
6902
7063
|
) }, p.playerId)) }),
|
|
6903
|
-
revealed && /* @__PURE__ */ (0,
|
|
7064
|
+
revealed && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
6904
7065
|
ResultCard,
|
|
6905
7066
|
{
|
|
6906
7067
|
tone: clientState.isCorrect ? "win" : "lose",
|
|
@@ -6911,8 +7072,8 @@ function StatLadderGame({
|
|
|
6911
7072
|
}
|
|
6912
7073
|
)
|
|
6913
7074
|
] }),
|
|
6914
|
-
!revealed && /* @__PURE__ */ (0,
|
|
6915
|
-
/* @__PURE__ */ (0,
|
|
7075
|
+
!revealed && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ss-g-sl-guess", children: [
|
|
7076
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
6916
7077
|
SearchField,
|
|
6917
7078
|
{
|
|
6918
7079
|
id: searchId,
|
|
@@ -6927,13 +7088,13 @@ function StatLadderGame({
|
|
|
6927
7088
|
disabled: submitting
|
|
6928
7089
|
}
|
|
6929
7090
|
),
|
|
6930
|
-
/* @__PURE__ */ (0,
|
|
7091
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(GameButton, { variant: "primary", disabled: selectedId === null || submitting, onClick: guess, children: t.guess })
|
|
6931
7092
|
] }) })
|
|
6932
7093
|
] });
|
|
6933
7094
|
}
|
|
6934
7095
|
|
|
6935
7096
|
// src/components/games/FanMotmGame.tsx
|
|
6936
|
-
var
|
|
7097
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
6937
7098
|
function parseClientState10(json) {
|
|
6938
7099
|
if (!json) return null;
|
|
6939
7100
|
try {
|
|
@@ -6954,20 +7115,20 @@ function FanMotmGame({
|
|
|
6954
7115
|
const clientState = parseClientState10(result?.clientStateJson);
|
|
6955
7116
|
const alreadyVoted = result?.alreadyPlayed === true;
|
|
6956
7117
|
const pickedId = clientState?.pickedPlayerId ?? null;
|
|
6957
|
-
const header = /* @__PURE__ */ (0,
|
|
7118
|
+
const header = /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
6958
7119
|
GameHeader,
|
|
6959
7120
|
{
|
|
6960
7121
|
title: t.title,
|
|
6961
7122
|
eyebrow: t.eyebrow,
|
|
6962
|
-
right: alreadyVoted ? /* @__PURE__ */ (0,
|
|
7123
|
+
right: alreadyVoted ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Chip, { variant: "success", icon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconCheck, {}), children: t.voted }) : void 0,
|
|
6963
7124
|
onBack,
|
|
6964
7125
|
backLabel: ui.back
|
|
6965
7126
|
}
|
|
6966
7127
|
);
|
|
6967
7128
|
if (!config) {
|
|
6968
|
-
return /* @__PURE__ */ (0,
|
|
7129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "ss-g-screen", "data-testid": "game-screen-fan-motm", children: [
|
|
6969
7130
|
header,
|
|
6970
|
-
/* @__PURE__ */ (0,
|
|
7131
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
6971
7132
|
] });
|
|
6972
7133
|
}
|
|
6973
7134
|
const picked = config.candidates.find((c) => c.playerId === pickedId) ?? null;
|
|
@@ -6975,12 +7136,12 @@ function FanMotmGame({
|
|
|
6975
7136
|
if (alreadyVoted || submitting) return;
|
|
6976
7137
|
onSubmit(JSON.stringify({ pickedPlayerId: candidateId }));
|
|
6977
7138
|
}
|
|
6978
|
-
return /* @__PURE__ */ (0,
|
|
7139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "ss-g-screen", "data-testid": "game-screen-fan-motm", children: [
|
|
6979
7140
|
header,
|
|
6980
|
-
/* @__PURE__ */ (0,
|
|
6981
|
-
/* @__PURE__ */ (0,
|
|
7141
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "ss-g-body", children: [
|
|
7142
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("ul", { className: "ss-g-motm-list", children: config.candidates.map((c) => {
|
|
6982
7143
|
const isVoted = alreadyVoted && pickedId === c.playerId;
|
|
6983
|
-
return /* @__PURE__ */ (0,
|
|
7144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
6984
7145
|
"button",
|
|
6985
7146
|
{
|
|
6986
7147
|
type: "button",
|
|
@@ -6989,24 +7150,24 @@ function FanMotmGame({
|
|
|
6989
7150
|
disabled: alreadyVoted || submitting,
|
|
6990
7151
|
onClick: () => handleVote(c.playerId),
|
|
6991
7152
|
children: [
|
|
6992
|
-
/* @__PURE__ */ (0,
|
|
6993
|
-
/* @__PURE__ */ (0,
|
|
6994
|
-
isVoted && /* @__PURE__ */ (0,
|
|
7153
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(PlayerAvatar, { name: c.playerName, className: "ss-g-motm-av" }),
|
|
7154
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-motm-name", children: c.playerName }),
|
|
7155
|
+
isVoted && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Chip, { variant: "accent", className: "ss-g-motm-pill", children: t.yourVote })
|
|
6995
7156
|
]
|
|
6996
7157
|
}
|
|
6997
7158
|
) }, c.playerId);
|
|
6998
7159
|
}) }),
|
|
6999
|
-
alreadyVoted && picked && /* @__PURE__ */ (0,
|
|
7160
|
+
alreadyVoted && picked && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(ResultCard, { tone: "neutral", title: t.youVoted(picked.playerName), detail: t.thanks, onBack, ui })
|
|
7000
7161
|
] }),
|
|
7001
|
-
/* @__PURE__ */ (0,
|
|
7002
|
-
!alreadyVoted && /* @__PURE__ */ (0,
|
|
7003
|
-
/* @__PURE__ */ (0,
|
|
7162
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(FooterBar, { children: [
|
|
7163
|
+
!alreadyVoted && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("p", { className: "ss-g-motm-foot", children: t.tapToVote }),
|
|
7164
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("p", { className: "ss-g-motm-fun", children: t.forFun })
|
|
7004
7165
|
] })
|
|
7005
7166
|
] });
|
|
7006
7167
|
}
|
|
7007
7168
|
|
|
7008
7169
|
// src/components/GameScreenHost.tsx
|
|
7009
|
-
var
|
|
7170
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
7010
7171
|
var FIXTURE_GAME_IDS = /* @__PURE__ */ new Set([
|
|
7011
7172
|
"matchday-predictor",
|
|
7012
7173
|
"starting-xi",
|
|
@@ -7030,8 +7191,8 @@ function GameScreenHost({
|
|
|
7030
7191
|
ui
|
|
7031
7192
|
}) {
|
|
7032
7193
|
const { gameId, fixtureId, gameDay = "", lockAtUtc = null } = selected;
|
|
7033
|
-
const [configJson, setConfigJson] = (0,
|
|
7034
|
-
(0,
|
|
7194
|
+
const [configJson, setConfigJson] = (0, import_react42.useState)(null);
|
|
7195
|
+
(0, import_react42.useEffect)(() => {
|
|
7035
7196
|
setConfigJson(null);
|
|
7036
7197
|
if (!conversation) return;
|
|
7037
7198
|
let cancelled = false;
|
|
@@ -7054,12 +7215,12 @@ function GameScreenHost({
|
|
|
7054
7215
|
fixtureId: fixtureId || void 0,
|
|
7055
7216
|
locale: ui.games.lang
|
|
7056
7217
|
});
|
|
7057
|
-
(0,
|
|
7218
|
+
(0, import_react42.useEffect)(() => {
|
|
7058
7219
|
if (conversation) hydrate();
|
|
7059
7220
|
}, [conversation, gameId]);
|
|
7060
|
-
const hydrateRef = (0,
|
|
7221
|
+
const hydrateRef = (0, import_react42.useRef)(hydrate);
|
|
7061
7222
|
hydrateRef.current = hydrate;
|
|
7062
|
-
(0,
|
|
7223
|
+
(0, import_react42.useEffect)(() => {
|
|
7063
7224
|
if (!FIXTURE_GAME_IDS.has(gameId)) return;
|
|
7064
7225
|
if (rawStatus !== "pending") return;
|
|
7065
7226
|
const timerId = setInterval(() => {
|
|
@@ -7082,7 +7243,7 @@ function GameScreenHost({
|
|
|
7082
7243
|
function renderScreen() {
|
|
7083
7244
|
switch (gameId) {
|
|
7084
7245
|
case "mystery-tiger":
|
|
7085
|
-
return /* @__PURE__ */ (0,
|
|
7246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7086
7247
|
MysteryTigerGame,
|
|
7087
7248
|
{
|
|
7088
7249
|
...sharedProps,
|
|
@@ -7090,7 +7251,7 @@ function GameScreenHost({
|
|
|
7090
7251
|
}
|
|
7091
7252
|
);
|
|
7092
7253
|
case "higher-or-lower":
|
|
7093
|
-
return /* @__PURE__ */ (0,
|
|
7254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7094
7255
|
HigherOrLowerGame,
|
|
7095
7256
|
{
|
|
7096
7257
|
...sharedProps,
|
|
@@ -7098,7 +7259,7 @@ function GameScreenHost({
|
|
|
7098
7259
|
}
|
|
7099
7260
|
);
|
|
7100
7261
|
case "career-path":
|
|
7101
|
-
return /* @__PURE__ */ (0,
|
|
7262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7102
7263
|
CareerPathGame,
|
|
7103
7264
|
{
|
|
7104
7265
|
...sharedProps,
|
|
@@ -7107,7 +7268,7 @@ function GameScreenHost({
|
|
|
7107
7268
|
);
|
|
7108
7269
|
case "beat-the-grid": {
|
|
7109
7270
|
const btgConfig = safeParseConfig(configJson);
|
|
7110
|
-
return /* @__PURE__ */ (0,
|
|
7271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7111
7272
|
BeatTheGridGame,
|
|
7112
7273
|
{
|
|
7113
7274
|
...sharedProps,
|
|
@@ -7117,7 +7278,7 @@ function GameScreenHost({
|
|
|
7117
7278
|
);
|
|
7118
7279
|
}
|
|
7119
7280
|
case "guess-the-xi":
|
|
7120
|
-
return /* @__PURE__ */ (0,
|
|
7281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7121
7282
|
GuessTheXiGame,
|
|
7122
7283
|
{
|
|
7123
7284
|
...sharedProps,
|
|
@@ -7125,7 +7286,7 @@ function GameScreenHost({
|
|
|
7125
7286
|
}
|
|
7126
7287
|
);
|
|
7127
7288
|
case "daily-quiz":
|
|
7128
|
-
return /* @__PURE__ */ (0,
|
|
7289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7129
7290
|
DailyQuizGame,
|
|
7130
7291
|
{
|
|
7131
7292
|
...sharedProps,
|
|
@@ -7133,7 +7294,7 @@ function GameScreenHost({
|
|
|
7133
7294
|
}
|
|
7134
7295
|
);
|
|
7135
7296
|
case "matchday-predictor":
|
|
7136
|
-
return /* @__PURE__ */ (0,
|
|
7297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7137
7298
|
MatchdayPredictorGame,
|
|
7138
7299
|
{
|
|
7139
7300
|
...sharedProps,
|
|
@@ -7141,7 +7302,7 @@ function GameScreenHost({
|
|
|
7141
7302
|
}
|
|
7142
7303
|
);
|
|
7143
7304
|
case "starting-xi":
|
|
7144
|
-
return /* @__PURE__ */ (0,
|
|
7305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7145
7306
|
StartingXiGame,
|
|
7146
7307
|
{
|
|
7147
7308
|
...sharedProps,
|
|
@@ -7149,7 +7310,7 @@ function GameScreenHost({
|
|
|
7149
7310
|
}
|
|
7150
7311
|
);
|
|
7151
7312
|
case "stat-ladder":
|
|
7152
|
-
return /* @__PURE__ */ (0,
|
|
7313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7153
7314
|
StatLadderGame,
|
|
7154
7315
|
{
|
|
7155
7316
|
...sharedProps,
|
|
@@ -7157,7 +7318,7 @@ function GameScreenHost({
|
|
|
7157
7318
|
}
|
|
7158
7319
|
);
|
|
7159
7320
|
case "fan-motm":
|
|
7160
|
-
return /* @__PURE__ */ (0,
|
|
7321
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7161
7322
|
FanMotmGame,
|
|
7162
7323
|
{
|
|
7163
7324
|
...sharedProps,
|
|
@@ -7165,10 +7326,10 @@ function GameScreenHost({
|
|
|
7165
7326
|
}
|
|
7166
7327
|
);
|
|
7167
7328
|
default:
|
|
7168
|
-
return /* @__PURE__ */ (0,
|
|
7329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "ss-g-screen", "data-testid": `game-screen-${gameId}`, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(GameHeader, { title: gameTitle({ gameId }, ui.games.titles), onBack, backLabel: ui.back }) });
|
|
7169
7330
|
}
|
|
7170
7331
|
}
|
|
7171
|
-
return /* @__PURE__ */ (0,
|
|
7332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "ss-w-gscreen", "data-testid": "gscreen", "data-lock-at": lockAtUtc ?? void 0, children: renderScreen() });
|
|
7172
7333
|
}
|
|
7173
7334
|
|
|
7174
7335
|
// src/components/games/ui/fonts.ts
|
|
@@ -7185,7 +7346,7 @@ function ensureGamesFonts(doc = document) {
|
|
|
7185
7346
|
}
|
|
7186
7347
|
|
|
7187
7348
|
// src/components/GamesPanel.tsx
|
|
7188
|
-
var
|
|
7349
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
7189
7350
|
function GamesPanel({
|
|
7190
7351
|
loggedIn,
|
|
7191
7352
|
games,
|
|
@@ -7194,13 +7355,13 @@ function GamesPanel({
|
|
|
7194
7355
|
leaderboard,
|
|
7195
7356
|
refreshHub
|
|
7196
7357
|
}) {
|
|
7197
|
-
const [selected, setSelected] = (0,
|
|
7198
|
-
(0,
|
|
7358
|
+
const [selected, setSelected] = (0, import_react43.useState)(null);
|
|
7359
|
+
(0, import_react43.useEffect)(() => {
|
|
7199
7360
|
ensureGamesFonts();
|
|
7200
7361
|
}, []);
|
|
7201
|
-
if (!loggedIn) return /* @__PURE__ */ (0,
|
|
7362
|
+
if (!loggedIn) return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(GamesLoginWall, { ui });
|
|
7202
7363
|
if (selected !== null) {
|
|
7203
|
-
return /* @__PURE__ */ (0,
|
|
7364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "ss-w-gscreen-wrap", lang: ui.games.lang, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7204
7365
|
GameScreenHost,
|
|
7205
7366
|
{
|
|
7206
7367
|
selected,
|
|
@@ -7214,7 +7375,7 @@ function GamesPanel({
|
|
|
7214
7375
|
}
|
|
7215
7376
|
) });
|
|
7216
7377
|
}
|
|
7217
|
-
return /* @__PURE__ */ (0,
|
|
7378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "ss-g-hub-wrap", "data-testid": "games-hub", lang: ui.games.lang, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7218
7379
|
GamesHub,
|
|
7219
7380
|
{
|
|
7220
7381
|
games,
|
|
@@ -7226,10 +7387,10 @@ function GamesPanel({
|
|
|
7226
7387
|
}
|
|
7227
7388
|
|
|
7228
7389
|
// src/components/Leaderboard.tsx
|
|
7229
|
-
var
|
|
7390
|
+
var import_react44 = require("react");
|
|
7230
7391
|
|
|
7231
7392
|
// src/components/LeaderboardRow.tsx
|
|
7232
|
-
var
|
|
7393
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
7233
7394
|
function formatPoints(n) {
|
|
7234
7395
|
return n.toLocaleString("en");
|
|
7235
7396
|
}
|
|
@@ -7238,14 +7399,14 @@ function LeaderboardWeeklyRow({
|
|
|
7238
7399
|
isMe
|
|
7239
7400
|
}) {
|
|
7240
7401
|
const rankClass = `ss-w-lb2-rank${row.rank <= 3 ? " ss-w-lb2-rank--top3" : ""}`;
|
|
7241
|
-
return /* @__PURE__ */ (0,
|
|
7242
|
-
/* @__PURE__ */ (0,
|
|
7402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: `ss-w-lb2-row${isMe ? " ss-w-lb2-row--you" : ""}`, children: [
|
|
7403
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("span", { className: rankClass, children: [
|
|
7243
7404
|
"#",
|
|
7244
7405
|
row.rank
|
|
7245
7406
|
] }),
|
|
7246
|
-
/* @__PURE__ */ (0,
|
|
7247
|
-
/* @__PURE__ */ (0,
|
|
7248
|
-
row.currentStreak > 0 && /* @__PURE__ */ (0,
|
|
7407
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-w-lb2-handle", children: row.handle }),
|
|
7408
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-w-lb2-points", children: formatPoints(row.points) }),
|
|
7409
|
+
row.currentStreak > 0 && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("span", { className: "ss-w-lb2-streak", children: [
|
|
7249
7410
|
"\u{1F525} ",
|
|
7250
7411
|
row.currentStreak
|
|
7251
7412
|
] })
|
|
@@ -7256,18 +7417,18 @@ function LeaderboardAllTimeRow({
|
|
|
7256
7417
|
isMe
|
|
7257
7418
|
}) {
|
|
7258
7419
|
const rankClass = `ss-w-lb2-rank${row.rank <= 3 ? " ss-w-lb2-rank--top3" : ""}`;
|
|
7259
|
-
return /* @__PURE__ */ (0,
|
|
7260
|
-
/* @__PURE__ */ (0,
|
|
7420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: `ss-w-lb2-row${isMe ? " ss-w-lb2-row--you" : ""}`, children: [
|
|
7421
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("span", { className: rankClass, children: [
|
|
7261
7422
|
"#",
|
|
7262
7423
|
row.rank
|
|
7263
7424
|
] }),
|
|
7264
|
-
/* @__PURE__ */ (0,
|
|
7265
|
-
/* @__PURE__ */ (0,
|
|
7425
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-w-lb2-handle", children: row.handle }),
|
|
7426
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-w-lb2-points", children: formatPoints(row.allTimePoints) })
|
|
7266
7427
|
] });
|
|
7267
7428
|
}
|
|
7268
7429
|
|
|
7269
7430
|
// src/components/LeaderboardEmpty.tsx
|
|
7270
|
-
var
|
|
7431
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
7271
7432
|
function LeaderboardEmpty({
|
|
7272
7433
|
segment,
|
|
7273
7434
|
lastWeek,
|
|
@@ -7276,48 +7437,48 @@ function LeaderboardEmpty({
|
|
|
7276
7437
|
ui
|
|
7277
7438
|
}) {
|
|
7278
7439
|
if (segment === "alltime") {
|
|
7279
|
-
return /* @__PURE__ */ (0,
|
|
7280
|
-
/* @__PURE__ */ (0,
|
|
7281
|
-
/* @__PURE__ */ (0,
|
|
7440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-w-lb-empty ss-w-lb-empty--alltime", children: [
|
|
7441
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: "\u{1F4CA}" }),
|
|
7442
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "ss-w-lb-empty-body", children: ui.leaderboardAllTimeEmpty })
|
|
7282
7443
|
] });
|
|
7283
7444
|
}
|
|
7284
7445
|
const fresh = lastWeek != null;
|
|
7285
7446
|
const title = fresh ? ui.leaderboardEmptyFreshTitle : ui.leaderboardEmptyColdTitle;
|
|
7286
7447
|
const body = fresh ? ui.leaderboardEmptyFreshBody : ui.leaderboardEmptyColdBody;
|
|
7287
|
-
return /* @__PURE__ */ (0,
|
|
7288
|
-
weeklyPrize && /* @__PURE__ */ (0,
|
|
7289
|
-
/* @__PURE__ */ (0,
|
|
7290
|
-
/* @__PURE__ */ (0,
|
|
7448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-w-lb-empty", children: [
|
|
7449
|
+
weeklyPrize && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-w-prize", children: [
|
|
7450
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-w-prize-icon", "aria-hidden": "true", children: "\u{1F3C6}" }),
|
|
7451
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-w-prize-body", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-w-prize-text", children: weeklyPrize }) })
|
|
7291
7452
|
] }),
|
|
7292
|
-
/* @__PURE__ */ (0,
|
|
7293
|
-
/* @__PURE__ */ (0,
|
|
7294
|
-
/* @__PURE__ */ (0,
|
|
7295
|
-
/* @__PURE__ */ (0,
|
|
7296
|
-
onPlay && /* @__PURE__ */ (0,
|
|
7453
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-w-lb-empty-hero", children: [
|
|
7454
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: fresh ? "\u{1F3C6}" : "\u{1F3AE}" }),
|
|
7455
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("h4", { className: "ss-w-lb-empty-title", children: title }),
|
|
7456
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "ss-w-lb-empty-body", children: body }),
|
|
7457
|
+
onPlay && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("button", { type: "button", className: "ss-w-lb-empty-cta", onClick: onPlay, children: ui.leaderboardEmptyCta })
|
|
7297
7458
|
] }),
|
|
7298
|
-
fresh && lastWeek && /* @__PURE__ */ (0,
|
|
7299
|
-
/* @__PURE__ */ (0,
|
|
7300
|
-
/* @__PURE__ */ (0,
|
|
7301
|
-
/* @__PURE__ */ (0,
|
|
7302
|
-
/* @__PURE__ */ (0,
|
|
7459
|
+
fresh && lastWeek && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-w-lb-last", children: [
|
|
7460
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-w-lb-last-label", children: ui.leaderboardLastWeekLabel }),
|
|
7461
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-w-lb-last-champ", "aria-hidden": "true", children: "\u{1F947}" }),
|
|
7462
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-w-lb-last-handle", children: lastWeek.handle }),
|
|
7463
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-w-lb-last-points", children: formatPoints(lastWeek.points) })
|
|
7303
7464
|
] })
|
|
7304
7465
|
] });
|
|
7305
7466
|
}
|
|
7306
7467
|
|
|
7307
7468
|
// src/components/Leaderboard.tsx
|
|
7308
|
-
var
|
|
7469
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
7309
7470
|
function Leaderboard({
|
|
7310
7471
|
data,
|
|
7311
7472
|
ui,
|
|
7312
7473
|
onPlay
|
|
7313
7474
|
}) {
|
|
7314
|
-
const [segment, setSegment] = (0,
|
|
7475
|
+
const [segment, setSegment] = (0, import_react44.useState)("weekly");
|
|
7315
7476
|
const myRow = segment === "weekly" ? data.myWeeklyRow : data.myAllTimeRow;
|
|
7316
7477
|
const offBoard = myRow !== null && myRow !== void 0 && myRow.rank === -1;
|
|
7317
7478
|
const isEmpty = segment === "weekly" ? data.weeklyTop.length === 0 : data.allTimeTop.length === 0;
|
|
7318
|
-
return /* @__PURE__ */ (0,
|
|
7319
|
-
/* @__PURE__ */ (0,
|
|
7320
|
-
/* @__PURE__ */ (0,
|
|
7479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-w-lb2", children: [
|
|
7480
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-w-seg", children: [
|
|
7481
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
7321
7482
|
"button",
|
|
7322
7483
|
{
|
|
7323
7484
|
type: "button",
|
|
@@ -7327,7 +7488,7 @@ function Leaderboard({
|
|
|
7327
7488
|
children: ui.leaderboardThisWeek
|
|
7328
7489
|
}
|
|
7329
7490
|
),
|
|
7330
|
-
/* @__PURE__ */ (0,
|
|
7491
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
7331
7492
|
"button",
|
|
7332
7493
|
{
|
|
7333
7494
|
type: "button",
|
|
@@ -7338,7 +7499,7 @@ function Leaderboard({
|
|
|
7338
7499
|
}
|
|
7339
7500
|
)
|
|
7340
7501
|
] }),
|
|
7341
|
-
isEmpty ? /* @__PURE__ */ (0,
|
|
7502
|
+
isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
7342
7503
|
LeaderboardEmpty,
|
|
7343
7504
|
{
|
|
7344
7505
|
segment,
|
|
@@ -7347,15 +7508,15 @@ function Leaderboard({
|
|
|
7347
7508
|
onPlay,
|
|
7348
7509
|
ui
|
|
7349
7510
|
}
|
|
7350
|
-
) : /* @__PURE__ */ (0,
|
|
7351
|
-
/* @__PURE__ */ (0,
|
|
7511
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_jsx_runtime84.Fragment, { children: [
|
|
7512
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "ss-w-lb2-rows", children: segment === "weekly" ? data.weeklyTop.map((row) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
7352
7513
|
LeaderboardWeeklyRow,
|
|
7353
7514
|
{
|
|
7354
7515
|
row,
|
|
7355
7516
|
isMe: row.operatorUserId === data.myWeeklyRow?.operatorUserId
|
|
7356
7517
|
},
|
|
7357
7518
|
row.operatorUserId
|
|
7358
|
-
)) : data.allTimeTop.map((row) => /* @__PURE__ */ (0,
|
|
7519
|
+
)) : data.allTimeTop.map((row) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
7359
7520
|
LeaderboardAllTimeRow,
|
|
7360
7521
|
{
|
|
7361
7522
|
row,
|
|
@@ -7363,18 +7524,18 @@ function Leaderboard({
|
|
|
7363
7524
|
},
|
|
7364
7525
|
row.operatorUserId
|
|
7365
7526
|
)) }),
|
|
7366
|
-
/* @__PURE__ */ (0,
|
|
7367
|
-
myRow != null && (offBoard ? /* @__PURE__ */ (0,
|
|
7368
|
-
segment === "weekly" && data.myWeeklyRow && /* @__PURE__ */ (0,
|
|
7369
|
-
segment === "alltime" && data.myAllTimeRow && /* @__PURE__ */ (0,
|
|
7527
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "ss-w-kitline", children: "\u{1F3BD}" }),
|
|
7528
|
+
myRow != null && (offBoard ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "ss-w-lbgap", children: ui.leaderboardOffBoard }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-w-lb2-rows", children: [
|
|
7529
|
+
segment === "weekly" && data.myWeeklyRow && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(LeaderboardWeeklyRow, { row: data.myWeeklyRow, isMe: true }),
|
|
7530
|
+
segment === "alltime" && data.myAllTimeRow && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(LeaderboardAllTimeRow, { row: data.myAllTimeRow, isMe: true })
|
|
7370
7531
|
] })),
|
|
7371
|
-
segment === "alltime" && data.myAllTimeRow && !offBoard && /* @__PURE__ */ (0,
|
|
7532
|
+
segment === "alltime" && data.myAllTimeRow && !offBoard && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "ss-w-lb2-rows", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "ss-w-lb2-row", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-w-lb2-handle", children: formatPoints(data.allTimeTop.reduce((s, r) => s + r.allTimePoints, 0)) }) }) })
|
|
7372
7533
|
] })
|
|
7373
7534
|
] });
|
|
7374
7535
|
}
|
|
7375
7536
|
|
|
7376
7537
|
// src/components/LeaderboardPanel.tsx
|
|
7377
|
-
var
|
|
7538
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
7378
7539
|
var EMPTY_PAYLOAD = {
|
|
7379
7540
|
week: "",
|
|
7380
7541
|
weeklyTop: [],
|
|
@@ -7385,17 +7546,17 @@ var EMPTY_PAYLOAD = {
|
|
|
7385
7546
|
lastWeek: null
|
|
7386
7547
|
};
|
|
7387
7548
|
function LeaderboardPanel({ loggedIn, data, loading, onPlay, ui }) {
|
|
7388
|
-
if (!loggedIn) return /* @__PURE__ */ (0,
|
|
7389
|
-
if (data === null && loading) return /* @__PURE__ */ (0,
|
|
7390
|
-
return /* @__PURE__ */ (0,
|
|
7549
|
+
if (!loggedIn) return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(GamesLoginWall, { ui });
|
|
7550
|
+
if (data === null && loading) return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "ss-w-mon-list" });
|
|
7551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Leaderboard, { data: data ?? EMPTY_PAYLOAD, ui, onPlay }) });
|
|
7391
7552
|
}
|
|
7392
7553
|
|
|
7393
7554
|
// src/components/ChatPanel.tsx
|
|
7394
|
-
var
|
|
7555
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
7395
7556
|
var FULLSCREEN_QUERY = "(max-width: 639px)";
|
|
7396
7557
|
function useIsModal() {
|
|
7397
|
-
const [modal, setModal] = (0,
|
|
7398
|
-
(0,
|
|
7558
|
+
const [modal, setModal] = (0, import_react45.useState)(false);
|
|
7559
|
+
(0, import_react45.useEffect)(() => {
|
|
7399
7560
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
|
|
7400
7561
|
const mql = window.matchMedia(FULLSCREEN_QUERY);
|
|
7401
7562
|
const sync = () => setModal(mql.matches);
|
|
@@ -7408,7 +7569,7 @@ function useIsModal() {
|
|
|
7408
7569
|
function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, gamesResult, leaderboardResult, loggedIn, conversation }) {
|
|
7409
7570
|
const { state, close, stop, send, reset } = controller;
|
|
7410
7571
|
const isModal = useIsModal();
|
|
7411
|
-
(0,
|
|
7572
|
+
(0, import_react45.useEffect)(() => {
|
|
7412
7573
|
const onKey = (e) => {
|
|
7413
7574
|
if (e.key === "Escape") close();
|
|
7414
7575
|
};
|
|
@@ -7419,11 +7580,15 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
7419
7580
|
monitor?.setActiveTab("chat");
|
|
7420
7581
|
send(text);
|
|
7421
7582
|
};
|
|
7422
|
-
(
|
|
7583
|
+
const handleAsk = (text, grounding) => {
|
|
7584
|
+
monitor?.setActiveTab("chat");
|
|
7585
|
+
send(text, { grounding });
|
|
7586
|
+
};
|
|
7587
|
+
(0, import_react45.useEffect)(() => {
|
|
7423
7588
|
if (monitor && monitor.activeTab !== "chat" && state.isStreaming) monitor.markChatActivity();
|
|
7424
7589
|
}, [monitor, state.isStreaming, state.messages.length]);
|
|
7425
|
-
return /* @__PURE__ */ (0,
|
|
7426
|
-
/* @__PURE__ */ (0,
|
|
7590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "ss-w-panel", role: "dialog", "aria-modal": isModal, "aria-label": ui.chatDialogLabel, children: [
|
|
7591
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
7427
7592
|
ChatHeader,
|
|
7428
7593
|
{
|
|
7429
7594
|
onClose: close,
|
|
@@ -7436,7 +7601,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
7436
7601
|
moreOptionsLabel: ui.moreOptions
|
|
7437
7602
|
}
|
|
7438
7603
|
),
|
|
7439
|
-
monitor && /* @__PURE__ */ (0,
|
|
7604
|
+
monitor && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
7440
7605
|
TabBar,
|
|
7441
7606
|
{
|
|
7442
7607
|
monitor,
|
|
@@ -7448,17 +7613,17 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
7448
7613
|
gamesEnabled: gamesResult?.enabled ?? false
|
|
7449
7614
|
}
|
|
7450
7615
|
),
|
|
7451
|
-
/* @__PURE__ */ (0,
|
|
7616
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
7452
7617
|
"div",
|
|
7453
7618
|
{
|
|
7454
7619
|
style: !monitor || monitor.activeTab === "chat" ? { display: "contents" } : { position: "absolute", inset: 0, visibility: "hidden", display: "flex", flexDirection: "column" },
|
|
7455
|
-
children: /* @__PURE__ */ (0,
|
|
7620
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(MessageList, { controller, ui, slip, onDashboardTap, monitor })
|
|
7456
7621
|
}
|
|
7457
7622
|
),
|
|
7458
|
-
monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */ (0,
|
|
7459
|
-
monitor && monitor.activeTab === "following" && /* @__PURE__ */ (0,
|
|
7460
|
-
monitor && monitor.activeTab === "odds" && /* @__PURE__ */ (0,
|
|
7461
|
-
monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */ (0,
|
|
7623
|
+
monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(TodayPanel, { discovery, ui, monitor }),
|
|
7624
|
+
monitor && monitor.activeTab === "following" && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(MatchesPanel, { monitor, ui, slip, onAsk: handleAsk }),
|
|
7625
|
+
monitor && monitor.activeTab === "odds" && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(OddsPanel, { monitor, ui, slip }),
|
|
7626
|
+
monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
7462
7627
|
GamesPanel,
|
|
7463
7628
|
{
|
|
7464
7629
|
loggedIn: !!loggedIn,
|
|
@@ -7472,7 +7637,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
7472
7637
|
}
|
|
7473
7638
|
}
|
|
7474
7639
|
),
|
|
7475
|
-
monitor && monitor.activeTab === "leaderboard" && leaderboardResult && /* @__PURE__ */ (0,
|
|
7640
|
+
monitor && monitor.activeTab === "leaderboard" && leaderboardResult && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
7476
7641
|
LeaderboardPanel,
|
|
7477
7642
|
{
|
|
7478
7643
|
loggedIn: !!loggedIn,
|
|
@@ -7482,7 +7647,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
7482
7647
|
ui
|
|
7483
7648
|
}
|
|
7484
7649
|
),
|
|
7485
|
-
(!monitor || monitor.activeTab !== "games" && monitor.activeTab !== "leaderboard") && /* @__PURE__ */ (0,
|
|
7650
|
+
(!monitor || monitor.activeTab !== "games" && monitor.activeTab !== "leaderboard") && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ChatInput, { placeholder: ui.placeholder, streaming: state.isStreaming, onSend: handleSend, onStop: stop, stopLabel: ui.stopResponse, sendLabel: ui.sendMessage })
|
|
7486
7651
|
] });
|
|
7487
7652
|
}
|
|
7488
7653
|
|
|
@@ -8030,6 +8195,59 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
8030
8195
|
.ss-w-dash--discovery .ss-w-dash-tile:nth-child(2) { background: color-mix(in srgb, #3a82f6 10%, var(--ss-w-panel)); }
|
|
8031
8196
|
.ss-w-dash--discovery .ss-w-dash-tile:nth-child(3) { background: color-mix(in srgb, #f5a623 10%, var(--ss-w-panel)); }
|
|
8032
8197
|
.ss-w-dash--discovery .ss-w-dash-tile:nth-child(4) { background: color-mix(in srgb, #a855f7 10%, var(--ss-w-panel)); }
|
|
8198
|
+
/* A hero tile would take the first tint position; count only regular tiles where \`of S\` parses. */
|
|
8199
|
+
.ss-w-dash--discovery .ss-w-dash-tile:nth-child(1 of :not(.ss-w-dash-hero)) { background: color-mix(in srgb, #34c759 10%, var(--ss-w-panel)); }
|
|
8200
|
+
.ss-w-dash--discovery .ss-w-dash-tile:nth-child(2 of :not(.ss-w-dash-hero)) { background: color-mix(in srgb, #3a82f6 10%, var(--ss-w-panel)); }
|
|
8201
|
+
.ss-w-dash--discovery .ss-w-dash-tile:nth-child(3 of :not(.ss-w-dash-hero)) { background: color-mix(in srgb, #f5a623 10%, var(--ss-w-panel)); }
|
|
8202
|
+
.ss-w-dash--discovery .ss-w-dash-tile:nth-child(4 of :not(.ss-w-dash-hero)) { background: color-mix(in srgb, #a855f7 10%, var(--ss-w-panel)); }
|
|
8203
|
+
|
|
8204
|
+
/* Hero: the personalized lead tile. Declared after the layout rules and at three-class
|
|
8205
|
+
specificity so it keeps one look in every layout -- no market rail, no goal pill, no
|
|
8206
|
+
discovery tint or stacking. Colours derive from accent/panel/ink so an operator surface
|
|
8207
|
+
and dark mode both work without their own rules. */
|
|
8208
|
+
.ss-w-dash .ss-w-dash-grid .ss-w-dash-hero {
|
|
8209
|
+
display: flex; flex-direction: column; align-items: stretch; gap: 10px;
|
|
8210
|
+
padding: 12px 14px 14px; border-radius: 16px;
|
|
8211
|
+
border: 1px solid color-mix(in srgb, var(--ss-w-accent) 38%, var(--ss-w-line));
|
|
8212
|
+
background:
|
|
8213
|
+
radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--ss-w-accent) 18%, transparent) 0%, transparent 60%),
|
|
8214
|
+
var(--ss-w-panel);
|
|
8215
|
+
box-shadow: 0 10px 24px -18px color-mix(in srgb, var(--ss-w-accent) 80%, transparent);
|
|
8216
|
+
}
|
|
8217
|
+
.ss-w-dash .ss-w-dash-grid .ss-w-dash-hero:hover { border-color: var(--ss-w-accent); }
|
|
8218
|
+
.ss-w-dash .ss-w-dash-grid .ss-w-dash-hero:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: 2px; }
|
|
8219
|
+
.ss-w-dash-hero-top { display: flex; align-items: center; gap: 8px; min-height: 20px; }
|
|
8220
|
+
.ss-w-dash-hero-badge {
|
|
8221
|
+
font-size: 10.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase;
|
|
8222
|
+
color: var(--ss-w-panel); background: color-mix(in srgb, var(--ss-w-accent) 45%, var(--ss-w-ink)); border-radius: 999px; padding: 3px 10px;
|
|
8223
|
+
white-space: nowrap;
|
|
8224
|
+
}
|
|
8225
|
+
.ss-w-dash-hero-chevron { flex: none; width: 14px; height: 14px; color: var(--ss-w-faint); }
|
|
8226
|
+
.ss-w-dash-hero-badge { margin-right: auto; }
|
|
8227
|
+
.ss-w-dash-hero-chevron:only-child { margin-left: auto; }
|
|
8228
|
+
.ss-w-dash-hero-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
|
|
8229
|
+
.ss-w-dash-hero-visual { flex: none; display: flex; align-items: center; }
|
|
8230
|
+
.ss-w-dash-hero-crest {
|
|
8231
|
+
width: 40px; height: 40px; border-radius: 50%;
|
|
8232
|
+
background-color: color-mix(in srgb, var(--ss-w-ink) 4%, var(--ss-w-panel));
|
|
8233
|
+
background-size: 72%; background-position: center; background-repeat: no-repeat;
|
|
8234
|
+
box-shadow: 0 0 0 2px var(--ss-w-panel), 0 0 0 3px color-mix(in srgb, var(--ss-w-ink) 10%, var(--ss-w-panel));
|
|
8235
|
+
}
|
|
8236
|
+
.ss-w-dash-hero-crest + .ss-w-dash-hero-crest { margin-left: -8px; }
|
|
8237
|
+
.ss-w-dash-hero-icon {
|
|
8238
|
+
display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-size: 22px;
|
|
8239
|
+
background: color-mix(in srgb, var(--ss-w-accent) 14%, var(--ss-w-panel));
|
|
8240
|
+
}
|
|
8241
|
+
.ss-w-dash-hero-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
|
|
8242
|
+
.ss-w-dash-hero-title { font-size: 15.5px; font-weight: 700; line-height: 1.25; color: var(--ss-w-ink); overflow-wrap: anywhere; }
|
|
8243
|
+
.ss-w-dash-hero-subtitle { font-size: 12px; color: var(--ss-w-faint); overflow-wrap: anywhere; }
|
|
8244
|
+
.ss-w-dash-hero-price {
|
|
8245
|
+
flex: none; margin-left: auto;
|
|
8246
|
+
font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 750; line-height: 1;
|
|
8247
|
+
color: color-mix(in srgb, var(--ss-w-accent) 45%, var(--ss-w-ink)); padding: 5px 9px; border-radius: 8px;
|
|
8248
|
+
background: color-mix(in srgb, var(--ss-w-accent) 12%, var(--ss-w-panel));
|
|
8249
|
+
border: 1px solid color-mix(in srgb, var(--ss-w-accent) 30%, var(--ss-w-panel));
|
|
8250
|
+
}
|
|
8033
8251
|
|
|
8034
8252
|
/* club fan pre-match dashboard */
|
|
8035
8253
|
.ss-w-fandash { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
|
|
@@ -8370,6 +8588,21 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
8370
8588
|
.ss-w-mon-scorers-home { text-align: right; }
|
|
8371
8589
|
.ss-w-mon-scorers-away { text-align: left; }
|
|
8372
8590
|
.ss-w-mon-scorers-ball { flex: none; align-self: start; line-height: 1.35; }
|
|
8591
|
+
.ss-w-fact { display: flex; flex-direction: column; gap: 7px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--ss-w-accent) 9%, transparent); border: 1px solid color-mix(in srgb, var(--ss-w-accent) 22%, transparent); }
|
|
8592
|
+
.ss-w-fact-k { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ss-w-accent); }
|
|
8593
|
+
.ss-w-fact-min { color: var(--ss-w-ink); letter-spacing: 0; }
|
|
8594
|
+
.ss-w-fact-subj { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 650; color: var(--ss-w-faint); }
|
|
8595
|
+
.ss-w-fact-text { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ss-w-ink); }
|
|
8596
|
+
.ss-w-fact-basis { font-size: 10.5px; color: var(--ss-w-faint); }
|
|
8597
|
+
.ss-w-fact-mkt { display: flex; align-items: center; gap: 8px; font-size: 11.5px; border: 1px solid var(--ss-w-line); border-radius: 8px; padding: 6px 8px; }
|
|
8598
|
+
.ss-w-fact-foot { display: flex; align-items: center; gap: 14px; }
|
|
8599
|
+
.ss-w-fact-link { font: inherit; font-size: 11.5px; font-weight: 700; color: var(--ss-w-accent); background: none; border: none; padding: 4px 0; min-height: 32px; cursor: pointer; }
|
|
8600
|
+
.ss-w-fact-link--muted { color: var(--ss-w-faint); margin-left: auto; }
|
|
8601
|
+
.ss-w-fact-hist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ss-w-line); }
|
|
8602
|
+
.ss-w-fact-hist li { display: grid; grid-template-columns: 34px 1fr; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--ss-w-line); }
|
|
8603
|
+
.ss-w-fact-hist li:last-child { border-bottom: none; }
|
|
8604
|
+
.ss-w-fact-hmin { font-size: 11px; font-weight: 800; color: var(--ss-w-faint); font-variant-numeric: tabular-nums; }
|
|
8605
|
+
.ss-w-fact-htext { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--ss-w-ink); }
|
|
8373
8606
|
.ss-w-mon-stats { display: flex; flex-direction: column; gap: 10px; }
|
|
8374
8607
|
.ss-w-mon-stat { display: flex; flex-direction: column; gap: 5px; }
|
|
8375
8608
|
.ss-w-mon-pstrip { padding: 6px 8px; border-radius: 8px; background: color-mix(in srgb, var(--ss-w-accent) 8%, transparent); }
|
|
@@ -8903,7 +9136,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
8903
9136
|
`;
|
|
8904
9137
|
|
|
8905
9138
|
// src/StatsWidget.tsx
|
|
8906
|
-
var
|
|
9139
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
8907
9140
|
function buildClient(props) {
|
|
8908
9141
|
try {
|
|
8909
9142
|
if ("client" in props && props.client) {
|
|
@@ -8928,23 +9161,23 @@ function injectStyles(root) {
|
|
|
8928
9161
|
function StatsWidget(props) {
|
|
8929
9162
|
const injectedClient = "client" in props ? props.client : void 0;
|
|
8930
9163
|
const cfg = props.config;
|
|
8931
|
-
const built = (0,
|
|
8932
|
-
const logger = (0,
|
|
9164
|
+
const built = (0, import_react46.useMemo)(() => buildClient(props), [injectedClient, cfg?.operatorId, cfg?.publicKey, cfg?.baseUrl]);
|
|
9165
|
+
const logger = (0, import_react46.useMemo)(
|
|
8933
9166
|
() => built ? built.client.createEventLogger({
|
|
8934
9167
|
operatorUserId: cfg?.userContext?.operatorUserId,
|
|
8935
9168
|
anonymousUserId: cfg?.userContext?.anonymousUserId
|
|
8936
9169
|
}) : null,
|
|
8937
9170
|
[built?.client]
|
|
8938
9171
|
);
|
|
8939
|
-
const ui = (0,
|
|
8940
|
-
const rootRef = (0,
|
|
8941
|
-
const introDoneRef = (0,
|
|
8942
|
-
const markIntroDone = (0,
|
|
9172
|
+
const ui = (0, import_react46.useMemo)(() => normalizeUi(props.config ?? { operatorId: "", publicKey: "" }), [props.config]);
|
|
9173
|
+
const rootRef = (0, import_react46.useRef)(null);
|
|
9174
|
+
const introDoneRef = (0, import_react46.useRef)(false);
|
|
9175
|
+
const markIntroDone = (0, import_react46.useCallback)(() => {
|
|
8943
9176
|
introDoneRef.current = true;
|
|
8944
9177
|
}, []);
|
|
8945
9178
|
const convStorageKey = `ss-w-conv:${cfg?.operatorId ?? ""}:${cfg?.userContext?.operatorUserId ?? "anon"}`;
|
|
8946
9179
|
const controller = useChatStream(built?.conversation ?? emptyConversation(), ui.starters, built ? ui.greetingMessage : void 0, convStorageKey);
|
|
8947
|
-
const [hasToday, setHasToday] = (0,
|
|
9180
|
+
const [hasToday, setHasToday] = (0, import_react46.useState)(false);
|
|
8948
9181
|
const monitor = useLiveMonitor({
|
|
8949
9182
|
getLiveMonitor: (pins) => built ? built.conversation.getLiveMonitor(pins) : Promise.resolve(null),
|
|
8950
9183
|
getMarketOdds: (matchId, dev) => built ? built.conversation.getMarketOdds(matchId, dev) : Promise.resolve(null),
|
|
@@ -8952,15 +9185,15 @@ function StatsWidget(props) {
|
|
|
8952
9185
|
isOpen: controller.state.isOpen,
|
|
8953
9186
|
hasToday
|
|
8954
9187
|
});
|
|
8955
|
-
const getSchedule = (0,
|
|
9188
|
+
const getSchedule = (0, import_react46.useCallback)(
|
|
8956
9189
|
(localDate, utcOffsetMinutes) => built ? built.conversation.getSchedule(localDate, utcOffsetMinutes) : Promise.resolve(null),
|
|
8957
9190
|
[built]
|
|
8958
9191
|
);
|
|
8959
|
-
const getStates = (0,
|
|
9192
|
+
const getStates = (0, import_react46.useCallback)(
|
|
8960
9193
|
(matchIds) => built ? built.conversation.getStates(matchIds) : Promise.resolve(null),
|
|
8961
9194
|
[built]
|
|
8962
9195
|
);
|
|
8963
|
-
const pinnedMatchIds = (0,
|
|
9196
|
+
const pinnedMatchIds = (0, import_react46.useMemo)(
|
|
8964
9197
|
() => monitor.pins.filter((p) => p.kind === "match").map((p) => p.matchId),
|
|
8965
9198
|
[monitor.pins]
|
|
8966
9199
|
);
|
|
@@ -8972,19 +9205,19 @@ function StatsWidget(props) {
|
|
|
8972
9205
|
pinnedMatchIds
|
|
8973
9206
|
});
|
|
8974
9207
|
const todayHasContent = visibleGroupsOf(discovery.groups, discovery.states).length > 0;
|
|
8975
|
-
(0,
|
|
9208
|
+
(0, import_react46.useEffect)(() => {
|
|
8976
9209
|
setHasToday(todayHasContent);
|
|
8977
9210
|
}, [todayHasContent]);
|
|
8978
9211
|
const gamesResult = useGames(built?.conversation ?? null, { activeTab: monitor.activeTab });
|
|
8979
9212
|
const leaderboardResult = useLeaderboard(built?.conversation ?? null, { activeTab: monitor.activeTab });
|
|
8980
9213
|
const markTodayActivity = monitor.markTodayActivity;
|
|
8981
|
-
const prevLiveCountRef = (0,
|
|
8982
|
-
(0,
|
|
9214
|
+
const prevLiveCountRef = (0, import_react46.useRef)(0);
|
|
9215
|
+
(0, import_react46.useEffect)(() => {
|
|
8983
9216
|
const rose = prevLiveCountRef.current === 0 && discovery.liveCount > 0;
|
|
8984
9217
|
prevLiveCountRef.current = discovery.liveCount;
|
|
8985
9218
|
if (rose) markTodayActivity();
|
|
8986
9219
|
}, [discovery.liveCount, markTodayActivity]);
|
|
8987
|
-
const slip = (0,
|
|
9220
|
+
const slip = (0, import_react46.useMemo)(
|
|
8988
9221
|
() => {
|
|
8989
9222
|
const handler = props.config?.onAddToSlip;
|
|
8990
9223
|
return {
|
|
@@ -8996,29 +9229,24 @@ function StatsWidget(props) {
|
|
|
8996
9229
|
if (wasAdded(result)) monitor.markInSlip(sel.matchOddsId);
|
|
8997
9230
|
return result;
|
|
8998
9231
|
}),
|
|
8999
|
-
conversationId: controller.state.conversationId ?? void 0
|
|
9000
|
-
onMarketClicked: (marketName) => {
|
|
9001
|
-
try {
|
|
9002
|
-
void built?.conversation.sendSignal({ signalType: "InsightMarketClicked", entityType: "Market", entityName: marketName }).catch(() => void 0);
|
|
9003
|
-
} catch {
|
|
9004
|
-
}
|
|
9005
|
-
}
|
|
9232
|
+
conversationId: controller.state.conversationId ?? void 0
|
|
9006
9233
|
};
|
|
9007
9234
|
},
|
|
9008
|
-
[props.config?.onAddToSlip, controller.state.conversationId,
|
|
9235
|
+
[props.config?.onAddToSlip, controller.state.conversationId, monitor.markInSlip]
|
|
9009
9236
|
);
|
|
9010
|
-
const onDashboardTap = (0,
|
|
9237
|
+
const onDashboardTap = (0, import_react46.useMemo)(
|
|
9011
9238
|
() => built ? createDashboardTapSignal((input) => built.conversation.sendSignal(input), logger) : void 0,
|
|
9012
9239
|
[built, logger]
|
|
9013
9240
|
);
|
|
9241
|
+
const dismissPopup = usePopupTelemetry(logger, controller.state.isOpen, controller.state.popupText, controller.dismissPopup);
|
|
9014
9242
|
const operatorUserId = cfg?.userContext?.operatorUserId;
|
|
9015
9243
|
const anonymousUserId = cfg?.userContext?.anonymousUserId;
|
|
9016
9244
|
const conversationId = controller.state.conversationId ?? void 0;
|
|
9017
|
-
(0,
|
|
9245
|
+
(0, import_react46.useEffect)(() => {
|
|
9018
9246
|
if (!logger) return;
|
|
9019
9247
|
logger.setIdentity({ operatorUserId, anonymousUserId, conversationId });
|
|
9020
9248
|
}, [logger, operatorUserId, anonymousUserId, conversationId]);
|
|
9021
|
-
(0,
|
|
9249
|
+
(0, import_react46.useEffect)(() => {
|
|
9022
9250
|
if (!logger) return;
|
|
9023
9251
|
const onHide = () => {
|
|
9024
9252
|
logger.flushOnHide();
|
|
@@ -9035,14 +9263,14 @@ function StatsWidget(props) {
|
|
|
9035
9263
|
logger.dispose();
|
|
9036
9264
|
};
|
|
9037
9265
|
}, [logger]);
|
|
9038
|
-
(0,
|
|
9266
|
+
(0, import_react46.useEffect)(() => {
|
|
9039
9267
|
if (!built || !ui.injectStyles) return;
|
|
9040
9268
|
const node = rootRef.current?.getRootNode();
|
|
9041
9269
|
if (node) injectStyles(node);
|
|
9042
9270
|
}, [built, ui.injectStyles]);
|
|
9043
9271
|
if (!built) return null;
|
|
9044
9272
|
const attrs = themeAttrs(ui);
|
|
9045
|
-
return /* @__PURE__ */ (0,
|
|
9273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(EventLogContext.Provider, { value: logger, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { ref: rootRef, className: "ss-w-root", "data-ss-w-theme": attrs["data-ss-w-theme"], "data-ss-w-pos": attrs["data-ss-w-pos"], style: attrs.style, children: controller.state.isOpen ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
9046
9274
|
ChatPanel,
|
|
9047
9275
|
{
|
|
9048
9276
|
controller,
|
|
@@ -9056,7 +9284,7 @@ function StatsWidget(props) {
|
|
|
9056
9284
|
loggedIn: !!operatorUserId,
|
|
9057
9285
|
conversation: built?.conversation ?? null
|
|
9058
9286
|
}
|
|
9059
|
-
) : /* @__PURE__ */ (0,
|
|
9287
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
9060
9288
|
ChatFab,
|
|
9061
9289
|
{
|
|
9062
9290
|
label: ui.launcherLabel,
|
|
@@ -9064,7 +9292,7 @@ function StatsWidget(props) {
|
|
|
9064
9292
|
popupText: controller.state.popupText,
|
|
9065
9293
|
logoUrl: ui.logoUrl,
|
|
9066
9294
|
onOpen: controller.open,
|
|
9067
|
-
onDismissPopup:
|
|
9295
|
+
onDismissPopup: dismissPopup,
|
|
9068
9296
|
dismissLabel: ui.dismissGreeting,
|
|
9069
9297
|
introAllowed: !introDoneRef.current,
|
|
9070
9298
|
onIntroStart: markIntroDone
|