@sensiblestats/widget-react 0.81.1 → 0.82.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 +15 -0
- package/dist/index.cjs +891 -764
- 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 +891 -764
- package/dist/index.js.map +1 -1
- package/dist/styles.css +18 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -118,6 +118,7 @@ var STRINGS = {
|
|
|
118
118
|
topLeagues: "Top leagues",
|
|
119
119
|
topLeaguesSub: "Popular today.",
|
|
120
120
|
allLeagues: "All leagues",
|
|
121
|
+
seeAllFixturesLabel: (n) => `All fixtures (${n})`,
|
|
121
122
|
searchLeaguesPlaceholder: "Search leagues or teams",
|
|
122
123
|
noLeagueResults: "No league or team matches that search.",
|
|
123
124
|
clearSearchLabel: "Clear search",
|
|
@@ -484,6 +485,7 @@ var STRINGS = {
|
|
|
484
485
|
topLeagues: "\xD6ne \xE7\u0131kan ligler",
|
|
485
486
|
topLeaguesSub: "Bug\xFCn pop\xFCler.",
|
|
486
487
|
allLeagues: "T\xFCm ligler",
|
|
488
|
+
seeAllFixturesLabel: (n) => `T\xFCm ma\xE7lar (${n})`,
|
|
487
489
|
searchLeaguesPlaceholder: "Lig veya tak\u0131m ara",
|
|
488
490
|
noLeagueResults: "Aramana uyan lig veya tak\u0131m yok.",
|
|
489
491
|
clearSearchLabel: "Aramay\u0131 temizle",
|
|
@@ -847,6 +849,7 @@ function normalizeUi(cfg) {
|
|
|
847
849
|
topLeagues: strings.topLeagues,
|
|
848
850
|
topLeaguesSub: strings.topLeaguesSub,
|
|
849
851
|
allLeagues: strings.allLeagues,
|
|
852
|
+
seeAllFixturesLabel: strings.seeAllFixturesLabel,
|
|
850
853
|
searchLeaguesPlaceholder: strings.searchLeaguesPlaceholder,
|
|
851
854
|
noLeagueResults: strings.noLeagueResults,
|
|
852
855
|
clearSearchLabel: strings.clearSearchLabel,
|
|
@@ -5966,15 +5969,25 @@ function starClickable(group, pinnedCompetitionId) {
|
|
|
5966
5969
|
function foldSearchText(s) {
|
|
5967
5970
|
return s.replace(/İ/g, "I").replace(/ı/g, "i").normalize("NFD").replace(/[̀-ͯ]/g, "").toLowerCase();
|
|
5968
5971
|
}
|
|
5972
|
+
function competitionMatchesQuery(group, q) {
|
|
5973
|
+
if (foldSearchText(group.competitionName).includes(q)) return true;
|
|
5974
|
+
return !!group.competitionCountry && foldSearchText(group.competitionCountry).includes(q);
|
|
5975
|
+
}
|
|
5969
5976
|
function matchesQuery(group, query) {
|
|
5970
5977
|
const q = foldSearchText(query.trim());
|
|
5971
5978
|
if (!q) return true;
|
|
5972
|
-
if (
|
|
5973
|
-
if (group.competitionCountry && foldSearchText(group.competitionCountry).includes(q)) return true;
|
|
5979
|
+
if (competitionMatchesQuery(group, q)) return true;
|
|
5974
5980
|
return group.matches.some(
|
|
5975
5981
|
(m) => foldSearchText(m.homeTeamName).includes(q) || foldSearchText(m.awayTeamName).includes(q)
|
|
5976
5982
|
);
|
|
5977
5983
|
}
|
|
5984
|
+
function matchingFixtures(group, query) {
|
|
5985
|
+
const q = foldSearchText(query.trim());
|
|
5986
|
+
if (!q || competitionMatchesQuery(group, q)) return group.matches;
|
|
5987
|
+
return group.matches.filter(
|
|
5988
|
+
(m) => foldSearchText(m.homeTeamName).includes(q) || foldSearchText(m.awayTeamName).includes(q)
|
|
5989
|
+
);
|
|
5990
|
+
}
|
|
5978
5991
|
|
|
5979
5992
|
// src/useStarTap.ts
|
|
5980
5993
|
import { useCallback as useCallback13, useRef as useRef17, useState as useState27 } from "react";
|
|
@@ -6152,12 +6165,70 @@ function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, on
|
|
|
6152
6165
|
] });
|
|
6153
6166
|
}
|
|
6154
6167
|
|
|
6168
|
+
// src/components/LeagueRowGroup.tsx
|
|
6169
|
+
import { jsx as jsx58, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
6170
|
+
var ROW_CAP_PER_LEAGUE = 3;
|
|
6171
|
+
var SECTION_ROW_BUDGET = 12;
|
|
6172
|
+
function rowsFor(group, states, stale) {
|
|
6173
|
+
const nonLive = group.matches.filter((m) => !isTreatedLive(states[m.matchId], stale)).length;
|
|
6174
|
+
return Math.min(nonLive, ROW_CAP_PER_LEAGUE);
|
|
6175
|
+
}
|
|
6176
|
+
var STAR_PATH3 = "M12 2.5l2.9 5.9 6.5.95-4.7 4.58 1.1 6.47L12 17.35 6.1 20.4l1.1-6.47L2.5 9.35l6.5-.95z";
|
|
6177
|
+
function LeagueRowGroup({ group, states, stale, cap, starClickable: starClickable2, disambiguate, onOpen, starTap, ui, monitor }) {
|
|
6178
|
+
const sorted = group.matches.filter((m) => !isTreatedLive(states[m.matchId], stale)).sort((a, b) => a.kickoffUnix - b.kickoffUnix);
|
|
6179
|
+
if (sorted.length === 0) return null;
|
|
6180
|
+
const shown = sorted.slice(0, cap);
|
|
6181
|
+
const overflow = sorted.length - shown.length;
|
|
6182
|
+
const onStarClick = () => {
|
|
6183
|
+
void starTap.tap(group.competitionId, !group.isStarred);
|
|
6184
|
+
};
|
|
6185
|
+
return /* @__PURE__ */ jsxs53("div", { className: "ss-w-today-rowgroup", children: [
|
|
6186
|
+
/* @__PURE__ */ jsxs53("div", { className: "ss-w-today-rowgroup-head", children: [
|
|
6187
|
+
/* @__PURE__ */ jsxs53("button", { type: "button", className: "ss-w-today-rowgroup-head-body", onClick: onOpen, children: [
|
|
6188
|
+
/* @__PURE__ */ jsx58(Crest2, { url: group.competitionImagePath ?? void 0, name: group.competitionName, kind: "comp" }),
|
|
6189
|
+
/* @__PURE__ */ jsxs53("span", { className: "ss-w-today-rowgroup-name", children: [
|
|
6190
|
+
group.competitionName,
|
|
6191
|
+
disambiguate && group.competitionCountry ? /* @__PURE__ */ jsxs53("span", { className: "ss-w-today-tile-country", children: [
|
|
6192
|
+
" (",
|
|
6193
|
+
group.competitionCountry,
|
|
6194
|
+
")"
|
|
6195
|
+
] }) : null
|
|
6196
|
+
] })
|
|
6197
|
+
] }),
|
|
6198
|
+
/* @__PURE__ */ jsx58(
|
|
6199
|
+
"button",
|
|
6200
|
+
{
|
|
6201
|
+
type: "button",
|
|
6202
|
+
className: "ss-w-today-rowgroup-star",
|
|
6203
|
+
"aria-pressed": group.isStarred,
|
|
6204
|
+
"aria-label": group.isStarred ? ui.starOffLabel : ui.starOnLabel,
|
|
6205
|
+
disabled: !starClickable2 || starTap.pendingId !== null,
|
|
6206
|
+
onClick: onStarClick,
|
|
6207
|
+
children: /* @__PURE__ */ jsx58("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx58(
|
|
6208
|
+
"path",
|
|
6209
|
+
{
|
|
6210
|
+
d: STAR_PATH3,
|
|
6211
|
+
fill: group.isStarred ? "currentColor" : "none",
|
|
6212
|
+
stroke: group.isStarred ? "none" : "currentColor",
|
|
6213
|
+
strokeWidth: 2,
|
|
6214
|
+
strokeLinejoin: "round",
|
|
6215
|
+
strokeLinecap: "round"
|
|
6216
|
+
}
|
|
6217
|
+
) })
|
|
6218
|
+
}
|
|
6219
|
+
)
|
|
6220
|
+
] }),
|
|
6221
|
+
/* @__PURE__ */ jsx58("div", { className: "ss-w-today-rowgroup-rows", children: shown.map((m) => /* @__PURE__ */ jsx58(FixtureRow, { match: m, state: states[m.matchId], stale, ui, monitor }, m.matchId)) }),
|
|
6222
|
+
overflow > 0 && /* @__PURE__ */ jsx58("button", { type: "button", className: "ss-w-today-rowgroup-seeall", onClick: onOpen, children: ui.seeAllFixturesLabel(sorted.length) })
|
|
6223
|
+
] });
|
|
6224
|
+
}
|
|
6225
|
+
|
|
6155
6226
|
// src/components/games/ui/SearchField.tsx
|
|
6156
6227
|
import { useCallback as useCallback14, useRef as useRef18 } from "react";
|
|
6157
6228
|
|
|
6158
6229
|
// src/components/games/ui/icons.tsx
|
|
6159
|
-
import { jsx as
|
|
6160
|
-
var svg = (size, children, fill = false) => /* @__PURE__ */
|
|
6230
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
6231
|
+
var svg = (size, children, fill = false) => /* @__PURE__ */ jsx59(
|
|
6161
6232
|
"svg",
|
|
6162
6233
|
{
|
|
6163
6234
|
width: size,
|
|
@@ -6172,25 +6243,25 @@ var svg = (size, children, fill = false) => /* @__PURE__ */ jsx58(
|
|
|
6172
6243
|
children
|
|
6173
6244
|
}
|
|
6174
6245
|
);
|
|
6175
|
-
var IconChevronLeft = ({ size = 20 }) => svg(size, /* @__PURE__ */
|
|
6176
|
-
var IconLock = ({ size = 14 }) => svg(size, [/* @__PURE__ */
|
|
6177
|
-
var IconCheck = ({ size = 14 }) => svg(size, /* @__PURE__ */
|
|
6178
|
-
var IconClose = ({ size = 16 }) => svg(size, /* @__PURE__ */
|
|
6179
|
-
var IconSearch = ({ size = 18 }) => svg(size, [/* @__PURE__ */
|
|
6180
|
-
var IconPlus = ({ size = 20 }) => svg(size, /* @__PURE__ */
|
|
6181
|
-
var IconBulb = ({ size = 16 }) => svg(size, [/* @__PURE__ */
|
|
6182
|
-
var IconArrowUp = ({ size = 12 }) => svg(size, /* @__PURE__ */
|
|
6183
|
-
var IconArrowDown = ({ size = 12 }) => svg(size, /* @__PURE__ */
|
|
6184
|
-
var IconCalendar = ({ size = 18 }) => svg(size, [/* @__PURE__ */
|
|
6185
|
-
var IconShield = ({ size = 18 }) => svg(size, /* @__PURE__ */
|
|
6186
|
-
var IconFlag = ({ size = 18 }) => svg(size, /* @__PURE__ */
|
|
6187
|
-
var IconBall = ({ size = 18 }) => svg(size, [/* @__PURE__ */
|
|
6188
|
-
var IconBoot = ({ size = 18 }) => svg(size, /* @__PURE__ */
|
|
6189
|
-
var IconGloves = ({ size = 18 }) => svg(size, /* @__PURE__ */
|
|
6190
|
-
var IconFlame = ({ size = 16 }) => svg(size, /* @__PURE__ */
|
|
6246
|
+
var IconChevronLeft = ({ size = 20 }) => svg(size, /* @__PURE__ */ jsx59("path", { d: "M15 18l-6-6 6-6" }));
|
|
6247
|
+
var IconLock = ({ size = 14 }) => svg(size, [/* @__PURE__ */ jsx59("rect", { x: "5", y: "11", width: "14", height: "10", rx: "2" }, "a"), /* @__PURE__ */ jsx59("path", { d: "M8 11V7a4 4 0 0 1 8 0v4" }, "b")]);
|
|
6248
|
+
var IconCheck = ({ size = 14 }) => svg(size, /* @__PURE__ */ jsx59("path", { d: "M5 12l5 5 9-10" }));
|
|
6249
|
+
var IconClose = ({ size = 16 }) => svg(size, /* @__PURE__ */ jsx59("path", { d: "M6 6l12 12M18 6L6 18" }));
|
|
6250
|
+
var IconSearch = ({ size = 18 }) => svg(size, [/* @__PURE__ */ jsx59("circle", { cx: "11", cy: "11", r: "7" }, "a"), /* @__PURE__ */ jsx59("path", { d: "M20 20l-3.5-3.5" }, "b")]);
|
|
6251
|
+
var IconPlus = ({ size = 20 }) => svg(size, /* @__PURE__ */ jsx59("path", { d: "M12 5v14M5 12h14" }));
|
|
6252
|
+
var IconBulb = ({ size = 16 }) => svg(size, [/* @__PURE__ */ jsx59("path", { d: "M9 18h6M10 21h4" }, "a"), /* @__PURE__ */ jsx59("path", { d: "M12 3a6 6 0 0 0-3.5 10.9V16h7v-2.1A6 6 0 0 0 12 3z" }, "b")]);
|
|
6253
|
+
var IconArrowUp = ({ size = 12 }) => svg(size, /* @__PURE__ */ jsx59("path", { d: "M12 19V5M5 12l7-7 7 7" }));
|
|
6254
|
+
var IconArrowDown = ({ size = 12 }) => svg(size, /* @__PURE__ */ jsx59("path", { d: "M12 5v14M19 12l-7 7-7-7" }));
|
|
6255
|
+
var IconCalendar = ({ size = 18 }) => svg(size, [/* @__PURE__ */ jsx59("rect", { x: "4", y: "5", width: "16", height: "15", rx: "2" }, "a"), /* @__PURE__ */ jsx59("path", { d: "M4 10h16M9 3v4M15 3v4" }, "b")]);
|
|
6256
|
+
var IconShield = ({ size = 18 }) => svg(size, /* @__PURE__ */ jsx59("path", { d: "M12 3l7 3v6c0 5-3 8-7 9-4-1-7-4-7-9V6z" }));
|
|
6257
|
+
var IconFlag = ({ size = 18 }) => svg(size, /* @__PURE__ */ jsx59("path", { d: "M5 21V4M5 4h12l-2 4 2 4H5" }));
|
|
6258
|
+
var IconBall = ({ size = 18 }) => svg(size, [/* @__PURE__ */ jsx59("circle", { cx: "12", cy: "12", r: "9" }, "a"), /* @__PURE__ */ jsx59("path", { d: "M12 7l4 3-1.5 4.5h-5L8 10z" }, "b")]);
|
|
6259
|
+
var IconBoot = ({ size = 18 }) => svg(size, /* @__PURE__ */ jsx59("path", { d: "M4 6h6l1 6 8 3v3H4z" }));
|
|
6260
|
+
var IconGloves = ({ size = 18 }) => svg(size, /* @__PURE__ */ jsx59("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" }));
|
|
6261
|
+
var IconFlame = ({ size = 16 }) => svg(size, /* @__PURE__ */ jsx59("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);
|
|
6191
6262
|
|
|
6192
6263
|
// src/components/games/ui/SearchField.tsx
|
|
6193
|
-
import { jsx as
|
|
6264
|
+
import { jsx as jsx60, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
6194
6265
|
function SearchField({ id, label, labelHidden = false, placeholder, value, onChange, disabled, inputRef, onKeyDown, clearLabel }) {
|
|
6195
6266
|
const localRef = useRef18(null);
|
|
6196
6267
|
const setInputRef = useCallback14((node) => {
|
|
@@ -6198,11 +6269,11 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
6198
6269
|
if (typeof inputRef === "function") inputRef(node);
|
|
6199
6270
|
else if (inputRef) inputRef.current = node;
|
|
6200
6271
|
}, [inputRef]);
|
|
6201
|
-
return /* @__PURE__ */
|
|
6202
|
-
/* @__PURE__ */
|
|
6203
|
-
/* @__PURE__ */
|
|
6204
|
-
/* @__PURE__ */
|
|
6205
|
-
/* @__PURE__ */
|
|
6272
|
+
return /* @__PURE__ */ jsxs54("div", { className: "ss-g-search", children: [
|
|
6273
|
+
/* @__PURE__ */ jsx60("label", { htmlFor: id, className: labelHidden ? "ss-g-sr" : "ss-g-search-label", children: label }),
|
|
6274
|
+
/* @__PURE__ */ jsxs54("div", { className: "ss-g-search-box", children: [
|
|
6275
|
+
/* @__PURE__ */ jsx60(IconSearch, {}),
|
|
6276
|
+
/* @__PURE__ */ jsx60(
|
|
6206
6277
|
"input",
|
|
6207
6278
|
{
|
|
6208
6279
|
id,
|
|
@@ -6216,7 +6287,7 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
6216
6287
|
onChange: (e) => onChange(e.target.value)
|
|
6217
6288
|
}
|
|
6218
6289
|
),
|
|
6219
|
-
clearLabel && value.length > 0 ? /* @__PURE__ */
|
|
6290
|
+
clearLabel && value.length > 0 ? /* @__PURE__ */ jsx60(
|
|
6220
6291
|
"button",
|
|
6221
6292
|
{
|
|
6222
6293
|
type: "button",
|
|
@@ -6226,7 +6297,7 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
6226
6297
|
onChange("");
|
|
6227
6298
|
localRef.current?.focus();
|
|
6228
6299
|
},
|
|
6229
|
-
children: /* @__PURE__ */
|
|
6300
|
+
children: /* @__PURE__ */ jsx60(IconClose, { size: 11 })
|
|
6230
6301
|
}
|
|
6231
6302
|
) : null
|
|
6232
6303
|
] })
|
|
@@ -6234,7 +6305,7 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
6234
6305
|
}
|
|
6235
6306
|
|
|
6236
6307
|
// src/components/TodayPanel.tsx
|
|
6237
|
-
import { Fragment as Fragment7, jsx as
|
|
6308
|
+
import { Fragment as Fragment7, jsx as jsx61, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
6238
6309
|
function TodayPanel({ discovery, ui, monitor }) {
|
|
6239
6310
|
const { groups, states, stale, starLeague } = discovery;
|
|
6240
6311
|
const searchId = useId2();
|
|
@@ -6265,18 +6336,38 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6265
6336
|
acc[g.competitionName] = (acc[g.competitionName] ?? 0) + 1;
|
|
6266
6337
|
return acc;
|
|
6267
6338
|
}, {});
|
|
6339
|
+
const rowedCandidates = [];
|
|
6340
|
+
const tiledCandidates = [];
|
|
6341
|
+
{
|
|
6342
|
+
let budget = SECTION_ROW_BUDGET;
|
|
6343
|
+
let overBudget = false;
|
|
6344
|
+
for (const group of placement.candidates) {
|
|
6345
|
+
const rows = rowsFor(group, states, stale);
|
|
6346
|
+
if (rows === 0) {
|
|
6347
|
+
tiledCandidates.push(group);
|
|
6348
|
+
continue;
|
|
6349
|
+
}
|
|
6350
|
+
if (!overBudget && rows <= budget) {
|
|
6351
|
+
rowedCandidates.push(group);
|
|
6352
|
+
budget -= rows;
|
|
6353
|
+
} else {
|
|
6354
|
+
overBudget = true;
|
|
6355
|
+
tiledCandidates.push(group);
|
|
6356
|
+
}
|
|
6357
|
+
}
|
|
6358
|
+
}
|
|
6268
6359
|
const openIndex = selectedCompetitionId === null ? -1 : placement.order.findIndex((g) => g.competitionId === selectedCompetitionId);
|
|
6269
6360
|
const openGroup = openIndex === -1 ? void 0 : placement.order[openIndex];
|
|
6270
6361
|
useEffect21(() => {
|
|
6271
6362
|
if (selectedCompetitionId !== null && openGroup === void 0) setSelectedCompetitionId(null);
|
|
6272
6363
|
}, [selectedCompetitionId, openGroup]);
|
|
6273
6364
|
const liveRows = stale ? [] : visibleGroups.flatMap((group) => group.matches.filter((m) => isTreatedLive(states[m.matchId], stale)).map((match) => ({ match, rank: group.rank }))).sort((a, b) => a.rank - b.rank);
|
|
6274
|
-
const liveBand = liveRows.length > 0 && /* @__PURE__ */
|
|
6275
|
-
/* @__PURE__ */
|
|
6276
|
-
/* @__PURE__ */
|
|
6365
|
+
const liveBand = liveRows.length > 0 && /* @__PURE__ */ jsxs55(Fragment7, { children: [
|
|
6366
|
+
/* @__PURE__ */ jsxs55("div", { className: "ss-w-sec-head", children: [
|
|
6367
|
+
/* @__PURE__ */ jsx61("span", { className: "ss-w-sec-dot", "aria-hidden": "true" }),
|
|
6277
6368
|
ui.sectionLive
|
|
6278
6369
|
] }),
|
|
6279
|
-
/* @__PURE__ */
|
|
6370
|
+
/* @__PURE__ */ jsx61("div", { className: "ss-w-today-live", children: liveRows.map(({ match }) => /* @__PURE__ */ jsx61(
|
|
6280
6371
|
FixtureRow,
|
|
6281
6372
|
{
|
|
6282
6373
|
match,
|
|
@@ -6289,10 +6380,10 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6289
6380
|
)) })
|
|
6290
6381
|
] });
|
|
6291
6382
|
if (openGroup !== void 0) {
|
|
6292
|
-
return /* @__PURE__ */
|
|
6293
|
-
stale && /* @__PURE__ */
|
|
6383
|
+
return /* @__PURE__ */ jsx61("div", { className: "ss-w-today-root", children: /* @__PURE__ */ jsxs55("div", { className: "ss-w-mon-list", children: [
|
|
6384
|
+
stale && /* @__PURE__ */ jsx61("div", { className: "ss-w-stale", children: ui.staleStates }),
|
|
6294
6385
|
liveBand,
|
|
6295
|
-
/* @__PURE__ */
|
|
6386
|
+
/* @__PURE__ */ jsx61(
|
|
6296
6387
|
LeagueDetail,
|
|
6297
6388
|
{
|
|
6298
6389
|
group: openGroup,
|
|
@@ -6313,11 +6404,11 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6313
6404
|
}
|
|
6314
6405
|
const searching = query.trim().length > 0;
|
|
6315
6406
|
const searchResults = searching ? placement.order.filter((g) => matchesQuery(g, query)) : [];
|
|
6316
|
-
return /* @__PURE__ */
|
|
6317
|
-
/* @__PURE__ */
|
|
6318
|
-
stale && /* @__PURE__ */
|
|
6407
|
+
return /* @__PURE__ */ jsxs55("div", { className: "ss-w-today-root", children: [
|
|
6408
|
+
/* @__PURE__ */ jsxs55("div", { className: "ss-w-mon-list", children: [
|
|
6409
|
+
stale && /* @__PURE__ */ jsx61("div", { className: "ss-w-stale", children: ui.staleStates }),
|
|
6319
6410
|
!searching && liveBand,
|
|
6320
|
-
/* @__PURE__ */
|
|
6411
|
+
/* @__PURE__ */ jsx61(
|
|
6321
6412
|
SearchField,
|
|
6322
6413
|
{
|
|
6323
6414
|
id: searchId,
|
|
@@ -6329,19 +6420,19 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6329
6420
|
clearLabel: ui.clearSearchLabel
|
|
6330
6421
|
}
|
|
6331
6422
|
),
|
|
6332
|
-
searching ? searchResults.length === 0 ? /* @__PURE__ */
|
|
6333
|
-
/* @__PURE__ */
|
|
6334
|
-
/* @__PURE__ */
|
|
6335
|
-
/* @__PURE__ */
|
|
6423
|
+
searching ? searchResults.length === 0 ? /* @__PURE__ */ jsx61("div", { className: "ss-w-today-empty", children: ui.noLeagueResults }) : /* @__PURE__ */ jsx61(Fragment7, { children: searchResults.map((group) => /* @__PURE__ */ jsxs55("div", { className: "ss-w-today-search-block", children: [
|
|
6424
|
+
/* @__PURE__ */ jsxs55("div", { className: "ss-w-today-search-group", children: [
|
|
6425
|
+
/* @__PURE__ */ jsx61(Crest2, { url: group.competitionImagePath ?? void 0, name: group.competitionName, kind: "comp" }),
|
|
6426
|
+
/* @__PURE__ */ jsxs55("span", { className: "ss-w-today-search-group-name", children: [
|
|
6336
6427
|
group.competitionName,
|
|
6337
|
-
(nameCounts[group.competitionName] ?? 0) > 1 && group.competitionCountry ? /* @__PURE__ */
|
|
6428
|
+
(nameCounts[group.competitionName] ?? 0) > 1 && group.competitionCountry ? /* @__PURE__ */ jsxs55("span", { className: "ss-w-today-tile-country", children: [
|
|
6338
6429
|
" (",
|
|
6339
6430
|
group.competitionCountry,
|
|
6340
6431
|
")"
|
|
6341
6432
|
] }) : null
|
|
6342
6433
|
] })
|
|
6343
6434
|
] }),
|
|
6344
|
-
group.
|
|
6435
|
+
matchingFixtures(group, query).map((match) => /* @__PURE__ */ jsx61(
|
|
6345
6436
|
"div",
|
|
6346
6437
|
{
|
|
6347
6438
|
role: "button",
|
|
@@ -6355,29 +6446,47 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6355
6446
|
setSelectedCompetitionId(group.competitionId);
|
|
6356
6447
|
}
|
|
6357
6448
|
},
|
|
6358
|
-
children: /* @__PURE__ */
|
|
6449
|
+
children: /* @__PURE__ */ jsx61(FixtureRow, { match, state: states[match.matchId], stale, ui, monitor })
|
|
6359
6450
|
},
|
|
6360
6451
|
match.matchId
|
|
6361
6452
|
))
|
|
6362
|
-
] }, group.competitionId)) }) : /* @__PURE__ */
|
|
6363
|
-
/* @__PURE__ */
|
|
6453
|
+
] }, group.competitionId)) }) : /* @__PURE__ */ jsxs55(Fragment7, { children: [
|
|
6454
|
+
/* @__PURE__ */ jsxs55("div", { className: "ss-w-today-sec", children: [
|
|
6364
6455
|
placement.personal ? ui.yourLeagues : ui.topLeagues,
|
|
6365
|
-
!placement.personal && /* @__PURE__ */
|
|
6456
|
+
!placement.personal && /* @__PURE__ */ jsx61("span", { className: "ss-w-today-sec-sub", children: ui.topLeaguesSub })
|
|
6366
6457
|
] }),
|
|
6367
|
-
/* @__PURE__ */
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6458
|
+
/* @__PURE__ */ jsxs55("div", { className: "ss-w-today-rowsection", children: [
|
|
6459
|
+
rowedCandidates.map((group) => /* @__PURE__ */ jsx61(
|
|
6460
|
+
LeagueRowGroup,
|
|
6461
|
+
{
|
|
6462
|
+
group,
|
|
6463
|
+
states,
|
|
6464
|
+
stale,
|
|
6465
|
+
cap: ROW_CAP_PER_LEAGUE,
|
|
6466
|
+
starClickable: starClickable(group, placement.pinnedCompetitionId),
|
|
6467
|
+
disambiguate: (nameCounts[group.competitionName] ?? 0) > 1,
|
|
6468
|
+
onOpen: () => setSelectedCompetitionId(group.competitionId),
|
|
6469
|
+
starTap: gridStarTap,
|
|
6470
|
+
ui,
|
|
6471
|
+
monitor
|
|
6472
|
+
},
|
|
6473
|
+
group.competitionId
|
|
6474
|
+
)),
|
|
6475
|
+
tiledCandidates.length > 0 && /* @__PURE__ */ jsx61("div", { className: "ss-w-today-tiles", children: tiledCandidates.map((group) => /* @__PURE__ */ jsx61(
|
|
6476
|
+
LeagueTile,
|
|
6477
|
+
{
|
|
6478
|
+
group,
|
|
6479
|
+
starClickable: starClickable(group, placement.pinnedCompetitionId),
|
|
6480
|
+
disambiguate: (nameCounts[group.competitionName] ?? 0) > 1,
|
|
6481
|
+
onOpen: () => setSelectedCompetitionId(group.competitionId),
|
|
6482
|
+
starTap: gridStarTap,
|
|
6483
|
+
ui
|
|
6484
|
+
},
|
|
6485
|
+
group.competitionId
|
|
6486
|
+
)) })
|
|
6487
|
+
] }),
|
|
6488
|
+
/* @__PURE__ */ jsx61("div", { className: "ss-w-today-sec", children: ui.allLeagues }),
|
|
6489
|
+
/* @__PURE__ */ jsx61("div", { className: "ss-w-today-tiles", children: placement.others.map((group) => /* @__PURE__ */ jsx61(
|
|
6381
6490
|
LeagueTile,
|
|
6382
6491
|
{
|
|
6383
6492
|
group,
|
|
@@ -6391,7 +6500,7 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6391
6500
|
)) })
|
|
6392
6501
|
] })
|
|
6393
6502
|
] }),
|
|
6394
|
-
toast !== null && /* @__PURE__ */
|
|
6503
|
+
toast !== null && /* @__PURE__ */ jsx61("p", { className: "ss-w-today-toast", role: "status", "aria-live": "polite", children: toast === "starred" ? ui.starredToast : ui.unstarredToast })
|
|
6395
6504
|
] });
|
|
6396
6505
|
}
|
|
6397
6506
|
|
|
@@ -6399,9 +6508,9 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6399
6508
|
import { useEffect as useEffect25, useState as useState43 } from "react";
|
|
6400
6509
|
|
|
6401
6510
|
// src/components/GamesLoginWall.tsx
|
|
6402
|
-
import { jsx as
|
|
6511
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
6403
6512
|
function GamesLoginWall({ ui }) {
|
|
6404
|
-
return /* @__PURE__ */
|
|
6513
|
+
return /* @__PURE__ */ jsx62("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ jsx62("div", { className: "ss-w-games-wall", children: /* @__PURE__ */ jsx62("p", { children: ui.gamesLoginRequired }) }) });
|
|
6405
6514
|
}
|
|
6406
6515
|
|
|
6407
6516
|
// src/components/GamesHub.tsx
|
|
@@ -6421,74 +6530,74 @@ function splitName(full) {
|
|
|
6421
6530
|
}
|
|
6422
6531
|
|
|
6423
6532
|
// src/components/GameTileArt.tsx
|
|
6424
|
-
import { Fragment as Fragment8, jsx as
|
|
6533
|
+
import { Fragment as Fragment8, jsx as jsx63, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
6425
6534
|
function GameTileArt({ gameId }) {
|
|
6426
|
-
return /* @__PURE__ */
|
|
6535
|
+
return /* @__PURE__ */ jsx63("svg", { className: "ss-g-art", viewBox: "0 0 120 74", "aria-hidden": "true", children: ART[gameId] ?? ART.default });
|
|
6427
6536
|
}
|
|
6428
|
-
var head = (cx, cy, r, cls = "ss-g-art-fg") => /* @__PURE__ */
|
|
6429
|
-
/* @__PURE__ */
|
|
6430
|
-
/* @__PURE__ */
|
|
6537
|
+
var head = (cx, cy, r, cls = "ss-g-art-fg") => /* @__PURE__ */ jsxs56("g", { className: cls, children: [
|
|
6538
|
+
/* @__PURE__ */ jsx63("circle", { cx, cy: cy - r * 0.3, r: r * 0.45 }),
|
|
6539
|
+
/* @__PURE__ */ jsx63("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` })
|
|
6431
6540
|
] });
|
|
6432
6541
|
var ART = {
|
|
6433
|
-
"mystery-tiger": /* @__PURE__ */
|
|
6542
|
+
"mystery-tiger": /* @__PURE__ */ jsxs56(Fragment8, { children: [
|
|
6434
6543
|
head(60, 38, 26, "ss-g-art-fg"),
|
|
6435
|
-
/* @__PURE__ */
|
|
6544
|
+
/* @__PURE__ */ jsx63("text", { x: "60", y: "36", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
|
|
6436
6545
|
] }),
|
|
6437
|
-
"higher-or-lower": /* @__PURE__ */
|
|
6546
|
+
"higher-or-lower": /* @__PURE__ */ jsxs56(Fragment8, { children: [
|
|
6438
6547
|
head(32, 38, 20),
|
|
6439
6548
|
head(88, 38, 20),
|
|
6440
|
-
/* @__PURE__ */
|
|
6441
|
-
/* @__PURE__ */
|
|
6549
|
+
/* @__PURE__ */ jsx63("circle", { cx: "60", cy: "37", r: "11", className: "ss-g-art-accent" }),
|
|
6550
|
+
/* @__PURE__ */ jsx63("path", { d: "M57 33l3-3 3 3M57 41l3 3 3-3", className: "ss-g-art-ink" })
|
|
6442
6551
|
] }),
|
|
6443
|
-
"guess-the-xi": /* @__PURE__ */
|
|
6444
|
-
/* @__PURE__ */
|
|
6445
|
-
[[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__ */
|
|
6552
|
+
"guess-the-xi": /* @__PURE__ */ jsxs56(Fragment8, { children: [
|
|
6553
|
+
/* @__PURE__ */ jsx63("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
|
|
6554
|
+
[[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__ */ jsx63("circle", { cx: x, cy: y, r: "4", className: a ? "ss-g-art-accent" : "ss-g-art-dot" }, i))
|
|
6446
6555
|
] }),
|
|
6447
|
-
"daily-quiz": /* @__PURE__ */
|
|
6448
|
-
"career-path": /* @__PURE__ */
|
|
6449
|
-
/* @__PURE__ */
|
|
6450
|
-
/* @__PURE__ */
|
|
6451
|
-
/* @__PURE__ */
|
|
6452
|
-
/* @__PURE__ */
|
|
6453
|
-
/* @__PURE__ */
|
|
6556
|
+
"daily-quiz": /* @__PURE__ */ jsx63(Fragment8, { children: [[14, 8], [62, 8], [14, 40], [62, 40]].map(([x, y], i) => /* @__PURE__ */ jsx63("rect", { x, y, width: "44", height: "26", rx: "5", className: i === 1 ? "ss-g-art-correct" : "ss-g-art-block" }, i)) }),
|
|
6557
|
+
"career-path": /* @__PURE__ */ jsxs56(Fragment8, { children: [
|
|
6558
|
+
/* @__PURE__ */ jsx63("path", { d: "M18 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z", className: "ss-g-art-fg" }),
|
|
6559
|
+
/* @__PURE__ */ jsx63("path", { d: "M48 37h8M84 37h8", className: "ss-g-art-line" }),
|
|
6560
|
+
/* @__PURE__ */ jsx63("path", { d: "M60 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z", className: "ss-g-art-fg" }),
|
|
6561
|
+
/* @__PURE__ */ jsx63("rect", { x: "96", y: "22", width: "18", height: "26", rx: "4", className: "ss-g-art-dash" }),
|
|
6562
|
+
/* @__PURE__ */ jsx63("text", { x: "105", y: "40", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
|
|
6454
6563
|
] }),
|
|
6455
|
-
"beat-the-grid": /* @__PURE__ */
|
|
6456
|
-
"matchday-predictor": /* @__PURE__ */
|
|
6457
|
-
/* @__PURE__ */
|
|
6458
|
-
/* @__PURE__ */
|
|
6459
|
-
/* @__PURE__ */
|
|
6460
|
-
/* @__PURE__ */
|
|
6564
|
+
"beat-the-grid": /* @__PURE__ */ jsx63(Fragment8, { children: [0, 1, 2].flatMap((r) => [0, 1, 2].map((c) => /* @__PURE__ */ jsx63("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}`))) }),
|
|
6565
|
+
"matchday-predictor": /* @__PURE__ */ jsxs56(Fragment8, { children: [
|
|
6566
|
+
/* @__PURE__ */ jsx63("path", { d: "M10 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z", className: "ss-g-art-fg" }),
|
|
6567
|
+
/* @__PURE__ */ jsx63("rect", { x: "38", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-accent-stroke" }),
|
|
6568
|
+
/* @__PURE__ */ jsx63("rect", { x: "64", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-dash" }),
|
|
6569
|
+
/* @__PURE__ */ jsx63("path", { d: "M90 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z", className: "ss-g-art-fg" })
|
|
6461
6570
|
] }),
|
|
6462
|
-
"starting-xi": /* @__PURE__ */
|
|
6463
|
-
/* @__PURE__ */
|
|
6464
|
-
[[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__ */
|
|
6571
|
+
"starting-xi": /* @__PURE__ */ jsxs56(Fragment8, { children: [
|
|
6572
|
+
/* @__PURE__ */ jsx63("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
|
|
6573
|
+
[[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__ */ jsx63("circle", { cx: x, cy: y, r: "5", className: i < 7 ? "ss-g-art-accent" : "ss-g-art-dash" }, i))
|
|
6465
6574
|
] }),
|
|
6466
|
-
"stat-ladder": /* @__PURE__ */
|
|
6467
|
-
"fan-motm": /* @__PURE__ */
|
|
6468
|
-
/* @__PURE__ */
|
|
6575
|
+
"stat-ladder": /* @__PURE__ */ jsx63(Fragment8, { children: [[20, 70], [34, 52], [48, 34]].map(([y, w], i) => /* @__PURE__ */ jsx63("rect", { x: "24", y, width: w, height: "12", rx: "3", className: i === 1 ? "ss-g-art-accent" : "ss-g-art-block" }, i)) }),
|
|
6576
|
+
"fan-motm": /* @__PURE__ */ jsxs56(Fragment8, { children: [
|
|
6577
|
+
/* @__PURE__ */ jsx63("circle", { cx: "60", cy: "37", r: "26", className: "ss-g-art-accent-stroke" }),
|
|
6469
6578
|
head(60, 40, 18),
|
|
6470
|
-
/* @__PURE__ */
|
|
6579
|
+
/* @__PURE__ */ jsx63("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" })
|
|
6471
6580
|
] }),
|
|
6472
|
-
default: /* @__PURE__ */
|
|
6581
|
+
default: /* @__PURE__ */ jsx63("circle", { cx: "60", cy: "37", r: "22", className: "ss-g-art-fg" })
|
|
6473
6582
|
};
|
|
6474
6583
|
|
|
6475
6584
|
// src/components/games/ui/Chip.tsx
|
|
6476
|
-
import { jsx as
|
|
6585
|
+
import { jsx as jsx64, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
6477
6586
|
function Chip({ variant = "neutral", icon, children, className }) {
|
|
6478
|
-
return /* @__PURE__ */
|
|
6587
|
+
return /* @__PURE__ */ jsxs57("span", { className: `ss-g-chip ss-g-chip--${variant}${className ? ` ${className}` : ""}`, children: [
|
|
6479
6588
|
icon,
|
|
6480
6589
|
children
|
|
6481
6590
|
] });
|
|
6482
6591
|
}
|
|
6483
6592
|
function StatStack({ value, label }) {
|
|
6484
|
-
return /* @__PURE__ */
|
|
6485
|
-
/* @__PURE__ */
|
|
6486
|
-
/* @__PURE__ */
|
|
6593
|
+
return /* @__PURE__ */ jsxs57("span", { className: "ss-g-statstack", children: [
|
|
6594
|
+
/* @__PURE__ */ jsx64("span", { className: "ss-g-statstack-v", children: value }),
|
|
6595
|
+
/* @__PURE__ */ jsx64("span", { className: "ss-g-statstack-l", children: label })
|
|
6487
6596
|
] });
|
|
6488
6597
|
}
|
|
6489
6598
|
|
|
6490
6599
|
// src/components/GameTile.tsx
|
|
6491
|
-
import { Fragment as Fragment9, jsx as
|
|
6600
|
+
import { Fragment as Fragment9, jsx as jsx65, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
6492
6601
|
function tileStatus(game, ui) {
|
|
6493
6602
|
switch (game.status) {
|
|
6494
6603
|
case "locked":
|
|
@@ -6512,38 +6621,38 @@ function GameTile({ game, onOpen, ui, variant = "tile" }) {
|
|
|
6512
6621
|
const status = tileStatus(game, ui);
|
|
6513
6622
|
const disabled = DISABLED.has(game.status);
|
|
6514
6623
|
const title = gameTitle(game, ui.games.titles);
|
|
6515
|
-
const body = variant === "hero" ? /* @__PURE__ */
|
|
6516
|
-
/* @__PURE__ */
|
|
6517
|
-
/* @__PURE__ */
|
|
6518
|
-
status.tone === "new" && /* @__PURE__ */
|
|
6519
|
-
/* @__PURE__ */
|
|
6520
|
-
/* @__PURE__ */
|
|
6521
|
-
status.tone === "success" ? /* @__PURE__ */
|
|
6624
|
+
const body = variant === "hero" ? /* @__PURE__ */ jsxs58(Fragment9, { children: [
|
|
6625
|
+
/* @__PURE__ */ jsxs58("span", { className: "ss-g-hero-text", children: [
|
|
6626
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-hero-eyebrow", children: ui.games.dailyChallenge }),
|
|
6627
|
+
status.tone === "new" && /* @__PURE__ */ jsx65(Chip, { variant: "badge", children: ui.games.newToday }),
|
|
6628
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-hero-title", children: title }),
|
|
6629
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-hero-sub", children: ui.games.taglines[game.gameId] ?? "" }),
|
|
6630
|
+
status.tone === "success" ? /* @__PURE__ */ jsx65("span", { className: "ss-g-tile-status", "data-tone": "success", children: status.text }) : /* @__PURE__ */ jsxs58("span", { className: "ss-g-hero-cta", children: [
|
|
6522
6631
|
status.tone === "accent" ? ui.games.resume : ui.games.playNow,
|
|
6523
6632
|
" \u2192"
|
|
6524
6633
|
] })
|
|
6525
6634
|
] }),
|
|
6526
|
-
/* @__PURE__ */
|
|
6527
|
-
] }) : variant === "wide" ? /* @__PURE__ */
|
|
6528
|
-
/* @__PURE__ */
|
|
6529
|
-
/* @__PURE__ */
|
|
6530
|
-
/* @__PURE__ */
|
|
6531
|
-
/* @__PURE__ */
|
|
6532
|
-
status.tone === "new" && /* @__PURE__ */
|
|
6635
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-hero-art", children: /* @__PURE__ */ jsx65(GameTileArt, { gameId: game.gameId }) })
|
|
6636
|
+
] }) : variant === "wide" ? /* @__PURE__ */ jsxs58(Fragment9, { children: [
|
|
6637
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-wide-art", children: /* @__PURE__ */ jsx65(GameTileArt, { gameId: game.gameId }) }),
|
|
6638
|
+
/* @__PURE__ */ jsxs58("span", { className: "ss-g-wide-text", children: [
|
|
6639
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-tile-title", children: title }),
|
|
6640
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-tile-status", "data-tone": status.tone, children: status.text }),
|
|
6641
|
+
status.tone === "new" && /* @__PURE__ */ jsx65(Chip, { variant: "badge", children: ui.games.newToday })
|
|
6533
6642
|
] }),
|
|
6534
|
-
/* @__PURE__ */
|
|
6535
|
-
] }) : /* @__PURE__ */
|
|
6536
|
-
/* @__PURE__ */
|
|
6537
|
-
/* @__PURE__ */
|
|
6538
|
-
/* @__PURE__ */
|
|
6643
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-wide-chev", children: /* @__PURE__ */ jsx65(IconChevronLeft, { size: 18 }) })
|
|
6644
|
+
] }) : /* @__PURE__ */ jsxs58(Fragment9, { children: [
|
|
6645
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-tile-art", children: /* @__PURE__ */ jsx65(GameTileArt, { gameId: game.gameId }) }),
|
|
6646
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-tile-title", children: title }),
|
|
6647
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-tile-status", "data-tone": status.tone, children: status.text })
|
|
6539
6648
|
] });
|
|
6540
6649
|
const cls = `ss-g-tile ss-g-tile--${variant}`;
|
|
6541
|
-
if (disabled) return /* @__PURE__ */
|
|
6542
|
-
return /* @__PURE__ */
|
|
6650
|
+
if (disabled) return /* @__PURE__ */ jsx65("div", { className: cls, "data-disabled": true, "aria-disabled": "true", children: body });
|
|
6651
|
+
return /* @__PURE__ */ jsx65("button", { type: "button", className: cls, "aria-label": `${title} \u2014 ${status.text}`, onClick: () => onOpen(game), children: body });
|
|
6543
6652
|
}
|
|
6544
6653
|
|
|
6545
6654
|
// src/components/GamesHub.tsx
|
|
6546
|
-
import { Fragment as Fragment10, jsx as
|
|
6655
|
+
import { Fragment as Fragment10, jsx as jsx66, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
6547
6656
|
var PLAYABLE = /* @__PURE__ */ new Set(["available", "in_progress"]);
|
|
6548
6657
|
var DONE = /* @__PURE__ */ new Set(["played", "graded"]);
|
|
6549
6658
|
function pickHeroGame(games) {
|
|
@@ -6569,49 +6678,49 @@ function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
|
|
|
6569
6678
|
const kickoffs = fixtures.map((g) => g.kickoffUtc).filter((k) => !!k).sort();
|
|
6570
6679
|
const todayPts = games.filter((g) => DONE.has(g.status)).reduce((s, g) => s + (g.score ?? 0), 0);
|
|
6571
6680
|
const dash = "\u2014";
|
|
6572
|
-
return /* @__PURE__ */
|
|
6573
|
-
/* @__PURE__ */
|
|
6574
|
-
/* @__PURE__ */
|
|
6575
|
-
/* @__PURE__ */
|
|
6576
|
-
/* @__PURE__ */
|
|
6577
|
-
myWeeklyRow ? /* @__PURE__ */
|
|
6578
|
-
/* @__PURE__ */
|
|
6681
|
+
return /* @__PURE__ */ jsxs59("div", { className: "ss-g-hub", children: [
|
|
6682
|
+
/* @__PURE__ */ jsxs59("div", { className: "ss-g-stats", children: [
|
|
6683
|
+
/* @__PURE__ */ jsxs59("div", { className: "ss-g-stat", children: [
|
|
6684
|
+
/* @__PURE__ */ jsx66("span", { className: "ss-g-stat-l", children: ui.games.statStreak }),
|
|
6685
|
+
/* @__PURE__ */ jsxs59("span", { className: "ss-g-stat-v", "data-testid": "stat-streak", children: [
|
|
6686
|
+
myWeeklyRow ? /* @__PURE__ */ jsxs59(Fragment10, { children: [
|
|
6687
|
+
/* @__PURE__ */ jsx66(IconFlame, {}),
|
|
6579
6688
|
myWeeklyRow.currentStreak
|
|
6580
6689
|
] }) : dash,
|
|
6581
|
-
myWeeklyRow && /* @__PURE__ */
|
|
6690
|
+
myWeeklyRow && /* @__PURE__ */ jsx66("small", { children: ui.games.unitDays })
|
|
6582
6691
|
] })
|
|
6583
6692
|
] }),
|
|
6584
|
-
/* @__PURE__ */
|
|
6585
|
-
/* @__PURE__ */
|
|
6586
|
-
/* @__PURE__ */
|
|
6693
|
+
/* @__PURE__ */ jsxs59("div", { className: "ss-g-stat", children: [
|
|
6694
|
+
/* @__PURE__ */ jsx66("span", { className: "ss-g-stat-l", children: ui.games.statToday }),
|
|
6695
|
+
/* @__PURE__ */ jsxs59("span", { className: "ss-g-stat-v ss-g-stat-v--accent", "data-testid": "stat-today", children: [
|
|
6587
6696
|
ui.games.formatPts(todayPts),
|
|
6588
|
-
/* @__PURE__ */
|
|
6697
|
+
/* @__PURE__ */ jsx66("small", { children: ui.games.unitPts })
|
|
6589
6698
|
] })
|
|
6590
6699
|
] }),
|
|
6591
|
-
/* @__PURE__ */
|
|
6592
|
-
/* @__PURE__ */
|
|
6593
|
-
/* @__PURE__ */
|
|
6700
|
+
/* @__PURE__ */ jsxs59("div", { className: "ss-g-stat", children: [
|
|
6701
|
+
/* @__PURE__ */ jsx66("span", { className: "ss-g-stat-l", children: ui.games.statRank }),
|
|
6702
|
+
/* @__PURE__ */ jsxs59("span", { className: "ss-g-stat-v", "data-testid": "stat-rank", children: [
|
|
6594
6703
|
myWeeklyRow ? `#${myWeeklyRow.rank}` : dash,
|
|
6595
|
-
myWeeklyRow && /* @__PURE__ */
|
|
6704
|
+
myWeeklyRow && /* @__PURE__ */ jsx66("small", { children: ui.games.thisWeek })
|
|
6596
6705
|
] })
|
|
6597
6706
|
] })
|
|
6598
6707
|
] }),
|
|
6599
|
-
weeklyPrize && /* @__PURE__ */
|
|
6600
|
-
hero && /* @__PURE__ */
|
|
6601
|
-
(grid.length > 0 || wide) && /* @__PURE__ */
|
|
6602
|
-
/* @__PURE__ */
|
|
6603
|
-
/* @__PURE__ */
|
|
6604
|
-
/* @__PURE__ */
|
|
6708
|
+
weeklyPrize && /* @__PURE__ */ jsx66(Chip, { variant: "accent", className: "ss-g-prize", children: weeklyPrize }),
|
|
6709
|
+
hero && /* @__PURE__ */ jsx66(GameTile, { game: hero, onOpen, ui, variant: "hero" }),
|
|
6710
|
+
(grid.length > 0 || wide) && /* @__PURE__ */ jsxs59("section", { className: "ss-g-sec", children: [
|
|
6711
|
+
/* @__PURE__ */ jsxs59("div", { className: "ss-g-sec-head", children: [
|
|
6712
|
+
/* @__PURE__ */ jsx66("h3", { children: ui.games.dailyGames }),
|
|
6713
|
+
/* @__PURE__ */ jsx66("span", { children: ui.games.newSetAtMidnight })
|
|
6605
6714
|
] }),
|
|
6606
|
-
grid.length > 0 && /* @__PURE__ */
|
|
6607
|
-
wide && /* @__PURE__ */
|
|
6715
|
+
grid.length > 0 && /* @__PURE__ */ jsx66("div", { className: "ss-g-grid", children: grid.map((g) => /* @__PURE__ */ jsx66(GameTile, { game: g, onOpen, ui }, tileKey(g))) }),
|
|
6716
|
+
wide && /* @__PURE__ */ jsx66(GameTile, { game: wide, onOpen, ui, variant: "wide" })
|
|
6608
6717
|
] }),
|
|
6609
|
-
fixtures.length > 0 && /* @__PURE__ */
|
|
6610
|
-
/* @__PURE__ */
|
|
6611
|
-
/* @__PURE__ */
|
|
6612
|
-
kickoffs[0] && /* @__PURE__ */
|
|
6718
|
+
fixtures.length > 0 && /* @__PURE__ */ jsxs59("section", { className: "ss-g-sec", children: [
|
|
6719
|
+
/* @__PURE__ */ jsxs59("div", { className: "ss-g-sec-head", children: [
|
|
6720
|
+
/* @__PURE__ */ jsx66("h3", { children: ui.games.matchdayGames }),
|
|
6721
|
+
kickoffs[0] && /* @__PURE__ */ jsx66("span", { children: ui.games.kickoffAt(ui.games.formatDayTime(kickoffs[0])) })
|
|
6613
6722
|
] }),
|
|
6614
|
-
/* @__PURE__ */
|
|
6723
|
+
/* @__PURE__ */ jsx66("div", { className: "ss-g-grid", children: fixtures.map((g) => /* @__PURE__ */ jsx66(GameTile, { game: g, onOpen, ui }, tileKey(g))) })
|
|
6615
6724
|
] })
|
|
6616
6725
|
] });
|
|
6617
6726
|
}
|
|
@@ -6904,7 +7013,7 @@ function isNationCode(flag) {
|
|
|
6904
7013
|
|
|
6905
7014
|
// src/components/games/PlayerAvatar.tsx
|
|
6906
7015
|
import { useState as useState32 } from "react";
|
|
6907
|
-
import { jsx as
|
|
7016
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
6908
7017
|
function initialsOf(name) {
|
|
6909
7018
|
const parts = name.trim().split(/\s+/).filter(Boolean);
|
|
6910
7019
|
const first = parts[0];
|
|
@@ -6923,39 +7032,39 @@ function PlayerAvatar({
|
|
|
6923
7032
|
}) {
|
|
6924
7033
|
const [failed, setFailed] = useState32(false);
|
|
6925
7034
|
const showImage = Boolean(imagePath) && !isPlaceholderImage(imagePath) && !failed;
|
|
6926
|
-
return /* @__PURE__ */
|
|
7035
|
+
return /* @__PURE__ */ jsx67("div", { className, "aria-hidden": "true", children: showImage ? /* @__PURE__ */ jsx67("img", { src: imagePath, alt: "", loading: "lazy", onError: () => setFailed(true) }) : /* @__PURE__ */ jsx67("span", { className: "ss-w-av-initials", children: initialsOf(name) }) });
|
|
6927
7036
|
}
|
|
6928
7037
|
|
|
6929
7038
|
// src/components/games/ui/GameHeader.tsx
|
|
6930
|
-
import { jsx as
|
|
7039
|
+
import { jsx as jsx68, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
6931
7040
|
function GameHeader({ title, eyebrow, right, onBack, backLabel }) {
|
|
6932
|
-
return /* @__PURE__ */
|
|
6933
|
-
onBack && /* @__PURE__ */
|
|
6934
|
-
/* @__PURE__ */
|
|
6935
|
-
eyebrow && /* @__PURE__ */
|
|
6936
|
-
/* @__PURE__ */
|
|
7041
|
+
return /* @__PURE__ */ jsxs60("div", { className: "ss-g-head", children: [
|
|
7042
|
+
onBack && /* @__PURE__ */ jsx68("button", { type: "button", className: "ss-g-back", "aria-label": backLabel, onClick: onBack, children: /* @__PURE__ */ jsx68(IconChevronLeft, {}) }),
|
|
7043
|
+
/* @__PURE__ */ jsxs60("div", { className: "ss-g-head-text", children: [
|
|
7044
|
+
eyebrow && /* @__PURE__ */ jsx68("span", { className: "ss-g-eyebrow", children: eyebrow }),
|
|
7045
|
+
/* @__PURE__ */ jsx68("h2", { className: "ss-g-title", children: title })
|
|
6937
7046
|
] }),
|
|
6938
|
-
right && /* @__PURE__ */
|
|
7047
|
+
right && /* @__PURE__ */ jsx68("div", { className: "ss-g-head-right", children: right })
|
|
6939
7048
|
] });
|
|
6940
7049
|
}
|
|
6941
7050
|
|
|
6942
7051
|
// src/components/games/ui/SegmentProgress.tsx
|
|
6943
|
-
import { jsx as
|
|
7052
|
+
import { jsx as jsx69, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
6944
7053
|
function SegmentProgress({ segments, ariaLabel, leftLabel, rightLabel, right }) {
|
|
6945
|
-
return /* @__PURE__ */
|
|
6946
|
-
/* @__PURE__ */
|
|
6947
|
-
(leftLabel || rightLabel) && /* @__PURE__ */
|
|
6948
|
-
/* @__PURE__ */
|
|
6949
|
-
/* @__PURE__ */
|
|
7054
|
+
return /* @__PURE__ */ jsxs61("div", { className: "ss-g-progress", children: [
|
|
7055
|
+
/* @__PURE__ */ jsxs61("div", { className: "ss-g-progress-main", children: [
|
|
7056
|
+
(leftLabel || rightLabel) && /* @__PURE__ */ jsxs61("div", { className: "ss-g-progress-labels", children: [
|
|
7057
|
+
/* @__PURE__ */ jsx69("span", { children: leftLabel }),
|
|
7058
|
+
/* @__PURE__ */ jsx69("span", { className: "ss-g-progress-rl", children: rightLabel })
|
|
6950
7059
|
] }),
|
|
6951
|
-
/* @__PURE__ */
|
|
7060
|
+
/* @__PURE__ */ jsx69(
|
|
6952
7061
|
"div",
|
|
6953
7062
|
{
|
|
6954
7063
|
className: "ss-g-segs",
|
|
6955
7064
|
role: "img",
|
|
6956
7065
|
"aria-label": ariaLabel,
|
|
6957
7066
|
style: { gridTemplateColumns: `repeat(${segments.length}, minmax(0, 1fr))` },
|
|
6958
|
-
children: segments.map((s, i) => /* @__PURE__ */
|
|
7067
|
+
children: segments.map((s, i) => /* @__PURE__ */ jsx69("span", { className: "ss-g-seg", "data-state": s }, i))
|
|
6959
7068
|
}
|
|
6960
7069
|
)
|
|
6961
7070
|
] }),
|
|
@@ -6964,12 +7073,12 @@ function SegmentProgress({ segments, ariaLabel, leftLabel, rightLabel, right })
|
|
|
6964
7073
|
}
|
|
6965
7074
|
|
|
6966
7075
|
// src/components/games/ui/AnswerTray.tsx
|
|
6967
|
-
import { Fragment as Fragment11, jsx as
|
|
7076
|
+
import { Fragment as Fragment11, jsx as jsx70, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
6968
7077
|
function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQuery, onPick, disabled, minQuery = 0 }) {
|
|
6969
7078
|
const needle = query.trim().toLowerCase();
|
|
6970
7079
|
const shown = needle.length < minQuery ? [] : needle ? options.filter((o) => o.name.toLowerCase().includes(needle)) : options;
|
|
6971
|
-
return /* @__PURE__ */
|
|
6972
|
-
/* @__PURE__ */
|
|
7080
|
+
return /* @__PURE__ */ jsxs62(Fragment11, { children: [
|
|
7081
|
+
/* @__PURE__ */ jsx70(
|
|
6973
7082
|
SearchField,
|
|
6974
7083
|
{
|
|
6975
7084
|
id,
|
|
@@ -6981,9 +7090,9 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
|
|
|
6981
7090
|
disabled
|
|
6982
7091
|
}
|
|
6983
7092
|
),
|
|
6984
|
-
shown.length > 0 && /* @__PURE__ */
|
|
7093
|
+
shown.length > 0 && /* @__PURE__ */ jsx70("div", { className: "ss-g-tray", role: "listbox", "aria-label": optionsLabel, children: shown.map((o) => {
|
|
6985
7094
|
const { first, last } = splitName(o.name);
|
|
6986
|
-
return /* @__PURE__ */
|
|
7095
|
+
return /* @__PURE__ */ jsxs62(
|
|
6987
7096
|
"button",
|
|
6988
7097
|
{
|
|
6989
7098
|
type: "button",
|
|
@@ -6994,10 +7103,10 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
|
|
|
6994
7103
|
disabled,
|
|
6995
7104
|
onClick: () => onPick(o.id),
|
|
6996
7105
|
children: [
|
|
6997
|
-
/* @__PURE__ */
|
|
6998
|
-
/* @__PURE__ */
|
|
6999
|
-
first && /* @__PURE__ */
|
|
7000
|
-
/* @__PURE__ */
|
|
7106
|
+
/* @__PURE__ */ jsx70(PlayerAvatar, { className: "ss-g-tray-av", name: o.name, imagePath: o.imagePath }),
|
|
7107
|
+
/* @__PURE__ */ jsxs62("span", { className: "ss-g-tray-name", "aria-hidden": "true", children: [
|
|
7108
|
+
first && /* @__PURE__ */ jsx70("span", { className: "ss-g-tray-first", children: first }),
|
|
7109
|
+
/* @__PURE__ */ jsx70("span", { className: "ss-g-tray-last", children: last })
|
|
7001
7110
|
] })
|
|
7002
7111
|
]
|
|
7003
7112
|
},
|
|
@@ -7008,59 +7117,59 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
|
|
|
7008
7117
|
}
|
|
7009
7118
|
|
|
7010
7119
|
// src/components/games/ui/FooterBar.tsx
|
|
7011
|
-
import { jsx as
|
|
7120
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
7012
7121
|
function FooterBar({ children }) {
|
|
7013
|
-
return /* @__PURE__ */
|
|
7122
|
+
return /* @__PURE__ */ jsx71("div", { className: "ss-g-footer", children });
|
|
7014
7123
|
}
|
|
7015
7124
|
|
|
7016
7125
|
// src/components/games/ui/Silhouette.tsx
|
|
7017
|
-
import { jsx as
|
|
7126
|
+
import { jsx as jsx72, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
7018
7127
|
function Silhouette({ size, variant = "default" }) {
|
|
7019
|
-
return /* @__PURE__ */
|
|
7020
|
-
/* @__PURE__ */
|
|
7021
|
-
/* @__PURE__ */
|
|
7022
|
-
/* @__PURE__ */
|
|
7128
|
+
return /* @__PURE__ */ jsxs63("span", { className: `ss-g-sil ss-g-sil--${variant}`, style: { width: size, height: size }, "aria-hidden": "true", children: [
|
|
7129
|
+
/* @__PURE__ */ jsxs63("svg", { width: size * 0.86, height: size * 0.86, viewBox: "0 0 100 100", children: [
|
|
7130
|
+
/* @__PURE__ */ jsx72("circle", { cx: "50", cy: "40", r: "19", fill: "currentColor" }),
|
|
7131
|
+
/* @__PURE__ */ jsx72("path", { d: "M12 100c0-23 17-38 38-38s38 15 38 38z", fill: "currentColor" })
|
|
7023
7132
|
] }),
|
|
7024
|
-
variant === "mystery" && /* @__PURE__ */
|
|
7133
|
+
variant === "mystery" && /* @__PURE__ */ jsx72("span", { className: "ss-g-sil-q", children: "?" })
|
|
7025
7134
|
] });
|
|
7026
7135
|
}
|
|
7027
7136
|
|
|
7028
7137
|
// src/components/games/ui/GameButton.tsx
|
|
7029
|
-
import { jsx as
|
|
7138
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
7030
7139
|
function GameButton({ variant = "primary", block = false, className, type = "button", ...rest }) {
|
|
7031
7140
|
const cls = `ss-g-btn ss-g-btn--${variant}${block ? " ss-g-btn--block" : ""}${className ? ` ${className}` : ""}`;
|
|
7032
|
-
return /* @__PURE__ */
|
|
7141
|
+
return /* @__PURE__ */ jsx73("button", { type, className: cls, ...rest });
|
|
7033
7142
|
}
|
|
7034
7143
|
|
|
7035
7144
|
// src/components/games/ui/ResultCard.tsx
|
|
7036
|
-
import { jsx as
|
|
7145
|
+
import { jsx as jsx74, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
7037
7146
|
function ResultCard({ tone, title, score, detail, onBack, ui }) {
|
|
7038
|
-
return /* @__PURE__ */
|
|
7039
|
-
/* @__PURE__ */
|
|
7040
|
-
score !== void 0 && /* @__PURE__ */
|
|
7041
|
-
/* @__PURE__ */
|
|
7147
|
+
return /* @__PURE__ */ jsxs64("div", { className: "ss-g-result", "data-tone": tone, role: "status", children: [
|
|
7148
|
+
/* @__PURE__ */ jsx74("span", { className: "ss-g-result-title", children: title }),
|
|
7149
|
+
score !== void 0 && /* @__PURE__ */ jsxs64("span", { className: "ss-g-result-score", children: [
|
|
7150
|
+
/* @__PURE__ */ jsx74("span", { className: "ss-g-result-num", children: score }),
|
|
7042
7151
|
ui.games.unitPts
|
|
7043
7152
|
] }),
|
|
7044
|
-
detail && /* @__PURE__ */
|
|
7045
|
-
onBack && /* @__PURE__ */
|
|
7153
|
+
detail && /* @__PURE__ */ jsx74("span", { className: "ss-g-result-detail", children: detail }),
|
|
7154
|
+
onBack && /* @__PURE__ */ jsx74(GameButton, { variant: "outline", onClick: onBack, children: ui.games.backToGames })
|
|
7046
7155
|
] });
|
|
7047
7156
|
}
|
|
7048
7157
|
|
|
7049
7158
|
// src/components/games/ui/PointsLadderRow.tsx
|
|
7050
|
-
import { jsx as
|
|
7159
|
+
import { jsx as jsx75, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
7051
7160
|
function PointsLadderRow({ ladder, guessesUsed, ui }) {
|
|
7052
7161
|
if (!ladder || ladder.length === 0) return null;
|
|
7053
7162
|
const now = ladder[Math.min(guessesUsed, ladder.length - 1)];
|
|
7054
7163
|
const next = ladder[guessesUsed + 1];
|
|
7055
7164
|
if (now === void 0) return null;
|
|
7056
|
-
return /* @__PURE__ */
|
|
7057
|
-
/* @__PURE__ */
|
|
7058
|
-
next !== void 0 && next !== now && /* @__PURE__ */
|
|
7165
|
+
return /* @__PURE__ */ jsxs65("div", { className: "ss-g-worth", "data-testid": "points-ladder", children: [
|
|
7166
|
+
/* @__PURE__ */ jsx75("span", { className: "ss-g-worth-now", children: ui.games.worthNow(now) }),
|
|
7167
|
+
next !== void 0 && next !== now && /* @__PURE__ */ jsx75("span", { className: "ss-g-worth-next", children: ui.games.worthAfterMiss(next) })
|
|
7059
7168
|
] });
|
|
7060
7169
|
}
|
|
7061
7170
|
|
|
7062
7171
|
// src/components/games/MysteryTigerGame.tsx
|
|
7063
|
-
import { Fragment as Fragment12, jsx as
|
|
7172
|
+
import { Fragment as Fragment12, jsx as jsx76, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
7064
7173
|
function parseClientState(json) {
|
|
7065
7174
|
if (!json) return null;
|
|
7066
7175
|
try {
|
|
@@ -7182,22 +7291,22 @@ function MysteryTigerGame({
|
|
|
7182
7291
|
setQuery("");
|
|
7183
7292
|
onSubmit(JSON.stringify({ guesses: newGuesses }));
|
|
7184
7293
|
}
|
|
7185
|
-
const headerRight = !config ? void 0 : isOver ? /* @__PURE__ */
|
|
7294
|
+
const headerRight = !config ? void 0 : isOver ? /* @__PURE__ */ jsxs66(Chip, { variant: "accent", children: [
|
|
7186
7295
|
score,
|
|
7187
7296
|
" ",
|
|
7188
7297
|
ui.games.unitPts
|
|
7189
|
-
] }) : /* @__PURE__ */
|
|
7298
|
+
] }) : /* @__PURE__ */ jsx76("span", { "data-testid": "mt-chip", children: /* @__PURE__ */ jsxs66(Chip, { children: [
|
|
7190
7299
|
ui.games.guess,
|
|
7191
7300
|
" ",
|
|
7192
|
-
/* @__PURE__ */
|
|
7301
|
+
/* @__PURE__ */ jsx76("span", { className: "ss-g-num", children: guessesUsed + 1 }),
|
|
7193
7302
|
" / ",
|
|
7194
7303
|
totalGuesses
|
|
7195
7304
|
] }) });
|
|
7196
7305
|
const segments = Array.from({ length: totalGuesses }, (_, i) => i < guessesUsed ? "done" : i === guessesUsed ? "current" : "todo");
|
|
7197
7306
|
const cols = { gridTemplateColumns: `minmax(0, 1fr) repeat(${keys.length}, 42px)` };
|
|
7198
7307
|
const known = deriveKnownAttributes(guessResults, keys);
|
|
7199
|
-
return /* @__PURE__ */
|
|
7200
|
-
/* @__PURE__ */
|
|
7308
|
+
return /* @__PURE__ */ jsxs66("div", { className: "ss-g-screen ss-g-mt", "data-game": "mystery-tiger", "data-testid": "game-screen-mystery-tiger", children: [
|
|
7309
|
+
/* @__PURE__ */ jsx76(
|
|
7201
7310
|
GameHeader,
|
|
7202
7311
|
{
|
|
7203
7312
|
title: gameTitle({ gameId: "mystery-tiger" }, ui.games.titles),
|
|
@@ -7207,41 +7316,41 @@ function MysteryTigerGame({
|
|
|
7207
7316
|
backLabel: ui.back
|
|
7208
7317
|
}
|
|
7209
7318
|
),
|
|
7210
|
-
!config && /* @__PURE__ */
|
|
7211
|
-
config && /* @__PURE__ */
|
|
7212
|
-
/* @__PURE__ */
|
|
7213
|
-
!isOver && /* @__PURE__ */
|
|
7214
|
-
/* @__PURE__ */
|
|
7215
|
-
/* @__PURE__ */
|
|
7216
|
-
revealName ? /* @__PURE__ */
|
|
7217
|
-
revealName && /* @__PURE__ */
|
|
7319
|
+
!config && /* @__PURE__ */ jsx76("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
7320
|
+
config && /* @__PURE__ */ jsxs66(Fragment12, { children: [
|
|
7321
|
+
/* @__PURE__ */ jsxs66("div", { className: "ss-g-body", children: [
|
|
7322
|
+
!isOver && /* @__PURE__ */ jsx76(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed, ui }),
|
|
7323
|
+
/* @__PURE__ */ jsxs66("div", { className: `ss-g-mt-card${isOver ? " ss-g-mt-card--reveal" : ""}`, children: [
|
|
7324
|
+
/* @__PURE__ */ jsxs66("div", { className: "ss-g-mt-portrait", children: [
|
|
7325
|
+
revealName ? /* @__PURE__ */ jsx76(PlayerAvatar, { className: "ss-g-mt-photo", name: revealName, imagePath: clientState?.revealedPlayerImagePath }) : /* @__PURE__ */ jsx76(Silhouette, { size: 150, variant: "mystery" }),
|
|
7326
|
+
revealName && /* @__PURE__ */ jsx76("span", { className: "ss-g-mt-reveal-name", children: revealName })
|
|
7218
7327
|
] }),
|
|
7219
|
-
/* @__PURE__ */
|
|
7220
|
-
/* @__PURE__ */
|
|
7221
|
-
/* @__PURE__ */
|
|
7328
|
+
/* @__PURE__ */ jsx76("div", { className: "ss-g-mt-known", style: { gridTemplateColumns: `repeat(${keys.length}, minmax(0, 1fr))` }, children: known.map((k) => /* @__PURE__ */ jsxs66("div", { className: "ss-g-mt-known-cell", children: [
|
|
7329
|
+
/* @__PURE__ */ jsx76("span", { className: "ss-g-mt-lab", children: t.labels[k.key] }),
|
|
7330
|
+
/* @__PURE__ */ jsx76("span", { className: "ss-g-mt-known-v", "data-state": k.state, "data-testid": `known-${k.key}`, children: k.text })
|
|
7222
7331
|
] }, k.key)) })
|
|
7223
7332
|
] }),
|
|
7224
|
-
!isOver && /* @__PURE__ */
|
|
7225
|
-
guessResults.length > 0 && /* @__PURE__ */
|
|
7226
|
-
/* @__PURE__ */
|
|
7227
|
-
/* @__PURE__ */
|
|
7228
|
-
keys.map((k) => /* @__PURE__ */
|
|
7333
|
+
!isOver && /* @__PURE__ */ jsx76(SegmentProgress, { segments, ariaLabel: t.progress(guessesUsed, totalGuesses) }),
|
|
7334
|
+
guessResults.length > 0 && /* @__PURE__ */ jsxs66("div", { className: "ss-g-mt-table", children: [
|
|
7335
|
+
/* @__PURE__ */ jsxs66("div", { className: "ss-g-mt-thead", style: cols, children: [
|
|
7336
|
+
/* @__PURE__ */ jsx76("span", { children: t.yourGuesses }),
|
|
7337
|
+
keys.map((k) => /* @__PURE__ */ jsx76("span", { children: t.labels[k] }, k))
|
|
7229
7338
|
] }),
|
|
7230
7339
|
guessResults.map((gr, i) => {
|
|
7231
7340
|
const name = config.squadPlayers.find((p) => p.id === gr.playerId)?.name ?? `#${gr.playerId}`;
|
|
7232
7341
|
const { first, last } = splitName(name);
|
|
7233
|
-
return /* @__PURE__ */
|
|
7234
|
-
/* @__PURE__ */
|
|
7235
|
-
/* @__PURE__ */
|
|
7236
|
-
/* @__PURE__ */
|
|
7237
|
-
first && /* @__PURE__ */
|
|
7238
|
-
/* @__PURE__ */
|
|
7342
|
+
return /* @__PURE__ */ jsxs66("div", { className: "ss-g-mt-row", style: cols, children: [
|
|
7343
|
+
/* @__PURE__ */ jsxs66("div", { className: "ss-g-mt-who", children: [
|
|
7344
|
+
/* @__PURE__ */ jsx76(PlayerAvatar, { className: "ss-g-mt-av", name }),
|
|
7345
|
+
/* @__PURE__ */ jsxs66("span", { className: "ss-g-mt-names", children: [
|
|
7346
|
+
first && /* @__PURE__ */ jsx76("span", { className: "ss-g-mt-first", children: first }),
|
|
7347
|
+
/* @__PURE__ */ jsx76("span", { className: "ss-g-mt-last", children: last })
|
|
7239
7348
|
] })
|
|
7240
7349
|
] }),
|
|
7241
7350
|
keys.map((key) => {
|
|
7242
7351
|
const v = gr[key];
|
|
7243
7352
|
const arrow = directionArrow(v);
|
|
7244
|
-
return /* @__PURE__ */
|
|
7353
|
+
return /* @__PURE__ */ jsxs66(
|
|
7245
7354
|
"div",
|
|
7246
7355
|
{
|
|
7247
7356
|
className: "ss-g-mt-cell",
|
|
@@ -7249,8 +7358,8 @@ function MysteryTigerGame({
|
|
|
7249
7358
|
"data-verdict": v.verdict,
|
|
7250
7359
|
"aria-label": `${t.labels[key]}: ${v.value ?? v.verdict}${v.direction ? ` ${v.direction}` : ""}`,
|
|
7251
7360
|
children: [
|
|
7252
|
-
/* @__PURE__ */
|
|
7253
|
-
arrow && /* @__PURE__ */
|
|
7361
|
+
/* @__PURE__ */ jsx76("span", { className: "ss-g-mt-cell-v", "aria-hidden": "true", children: tileFace(key, v) }),
|
|
7362
|
+
arrow && /* @__PURE__ */ jsx76("span", { className: "ss-g-mt-cell-dir", "aria-hidden": "true", children: arrow })
|
|
7254
7363
|
]
|
|
7255
7364
|
},
|
|
7256
7365
|
key
|
|
@@ -7259,25 +7368,25 @@ function MysteryTigerGame({
|
|
|
7259
7368
|
] }, gr.playerId);
|
|
7260
7369
|
})
|
|
7261
7370
|
] }),
|
|
7262
|
-
!isOver && /* @__PURE__ */
|
|
7263
|
-
/* @__PURE__ */
|
|
7264
|
-
/* @__PURE__ */
|
|
7371
|
+
!isOver && /* @__PURE__ */ jsxs66("div", { className: "ss-g-mt-legend", children: [
|
|
7372
|
+
/* @__PURE__ */ jsxs66("span", { children: [
|
|
7373
|
+
/* @__PURE__ */ jsx76("i", { className: "ss-g-mt-sw", "data-verdict": "exact" }),
|
|
7265
7374
|
t.legendMatch
|
|
7266
7375
|
] }),
|
|
7267
|
-
/* @__PURE__ */
|
|
7268
|
-
/* @__PURE__ */
|
|
7376
|
+
/* @__PURE__ */ jsxs66("span", { children: [
|
|
7377
|
+
/* @__PURE__ */ jsx76("i", { className: "ss-g-mt-sw", "data-verdict": "near" }),
|
|
7269
7378
|
t.legendClose
|
|
7270
7379
|
] }),
|
|
7271
|
-
/* @__PURE__ */
|
|
7380
|
+
/* @__PURE__ */ jsxs66("span", { children: [
|
|
7272
7381
|
"\u25B2 ",
|
|
7273
7382
|
t.legendHigher
|
|
7274
7383
|
] })
|
|
7275
7384
|
] }),
|
|
7276
|
-
clientState?.hintLine && !isOver && /* @__PURE__ */
|
|
7277
|
-
/* @__PURE__ */
|
|
7278
|
-
/* @__PURE__ */
|
|
7385
|
+
clientState?.hintLine && !isOver && /* @__PURE__ */ jsxs66("div", { className: "ss-g-mt-hint", children: [
|
|
7386
|
+
/* @__PURE__ */ jsx76(IconBulb, {}),
|
|
7387
|
+
/* @__PURE__ */ jsx76("span", { children: clientState.hintLine })
|
|
7279
7388
|
] }),
|
|
7280
|
-
isOver && /* @__PURE__ */
|
|
7389
|
+
isOver && /* @__PURE__ */ jsx76(
|
|
7281
7390
|
ResultCard,
|
|
7282
7391
|
{
|
|
7283
7392
|
tone: clientState?.solved ? "win" : clientState?.failed ? "lose" : "neutral",
|
|
@@ -7289,7 +7398,7 @@ function MysteryTigerGame({
|
|
|
7289
7398
|
}
|
|
7290
7399
|
)
|
|
7291
7400
|
] }),
|
|
7292
|
-
!isOver && /* @__PURE__ */
|
|
7401
|
+
!isOver && /* @__PURE__ */ jsx76(FooterBar, { children: /* @__PURE__ */ jsx76(
|
|
7293
7402
|
AnswerTray,
|
|
7294
7403
|
{
|
|
7295
7404
|
id: inputId,
|
|
@@ -7308,7 +7417,7 @@ function MysteryTigerGame({
|
|
|
7308
7417
|
}
|
|
7309
7418
|
|
|
7310
7419
|
// src/components/games/HigherOrLowerGame.tsx
|
|
7311
|
-
import { Fragment as Fragment13, jsx as
|
|
7420
|
+
import { Fragment as Fragment13, jsx as jsx77, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
7312
7421
|
var POINTS_PER_CORRECT = 10;
|
|
7313
7422
|
function parseClientState2(json) {
|
|
7314
7423
|
if (!json) return null;
|
|
@@ -7320,11 +7429,11 @@ function parseClientState2(json) {
|
|
|
7320
7429
|
}
|
|
7321
7430
|
function PlayerCard({ name, imagePath, highlight, children }) {
|
|
7322
7431
|
const { first, last } = splitName(name);
|
|
7323
|
-
return /* @__PURE__ */
|
|
7324
|
-
/* @__PURE__ */
|
|
7325
|
-
/* @__PURE__ */
|
|
7326
|
-
first && /* @__PURE__ */
|
|
7327
|
-
/* @__PURE__ */
|
|
7432
|
+
return /* @__PURE__ */ jsxs67("div", { className: `ss-g-hl-card${highlight ? " ss-g-hl-card--b" : ""}`, children: [
|
|
7433
|
+
/* @__PURE__ */ jsx77("div", { className: "ss-g-hl-photo-wrap", children: imagePath ? /* @__PURE__ */ jsx77(PlayerAvatar, { className: "ss-g-hl-photo", name, imagePath }) : /* @__PURE__ */ jsx77(Silhouette, { size: 150 }) }),
|
|
7434
|
+
/* @__PURE__ */ jsxs67("div", { className: "ss-g-hl-info", children: [
|
|
7435
|
+
first && /* @__PURE__ */ jsx77("span", { className: "ss-g-hl-first", children: first }),
|
|
7436
|
+
/* @__PURE__ */ jsx77("span", { className: "ss-g-hl-surname", children: last }),
|
|
7328
7437
|
children
|
|
7329
7438
|
] })
|
|
7330
7439
|
] });
|
|
@@ -7356,47 +7465,47 @@ function HigherOrLowerGame({
|
|
|
7356
7465
|
const newAnswers = [...prevAnswers, { pairIndex: currentPair.pairIndex, pick }];
|
|
7357
7466
|
onSubmit(JSON.stringify({ answers: newAnswers }));
|
|
7358
7467
|
}
|
|
7359
|
-
return /* @__PURE__ */
|
|
7360
|
-
/* @__PURE__ */
|
|
7468
|
+
return /* @__PURE__ */ jsxs67("div", { className: "ss-g-screen ss-g-hl", "data-game": "higher-or-lower", "data-testid": "game-screen-higher-or-lower", children: [
|
|
7469
|
+
/* @__PURE__ */ jsx77(
|
|
7361
7470
|
GameHeader,
|
|
7362
7471
|
{
|
|
7363
7472
|
title: gameTitle({ gameId: "higher-or-lower" }, ui.games.titles),
|
|
7364
7473
|
eyebrow: t.eyebrow(POINTS_PER_CORRECT),
|
|
7365
|
-
right: config ? /* @__PURE__ */
|
|
7474
|
+
right: config ? /* @__PURE__ */ jsx77(StatStack, { value: runLength, label: t.streak }) : void 0,
|
|
7366
7475
|
onBack,
|
|
7367
7476
|
backLabel: ui.back
|
|
7368
7477
|
}
|
|
7369
7478
|
),
|
|
7370
|
-
!config && /* @__PURE__ */
|
|
7371
|
-
config && /* @__PURE__ */
|
|
7372
|
-
/* @__PURE__ */
|
|
7373
|
-
/* @__PURE__ */
|
|
7374
|
-
/* @__PURE__ */
|
|
7375
|
-
/* @__PURE__ */
|
|
7376
|
-
/* @__PURE__ */
|
|
7479
|
+
!config && /* @__PURE__ */ jsx77("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
7480
|
+
config && /* @__PURE__ */ jsxs67(Fragment13, { children: [
|
|
7481
|
+
/* @__PURE__ */ jsxs67("div", { className: "ss-g-body", children: [
|
|
7482
|
+
/* @__PURE__ */ jsxs67("div", { className: "ss-g-hl-prompt", "data-testid": "hol-prompt", children: [
|
|
7483
|
+
/* @__PURE__ */ jsx77("span", { className: "ss-g-hl-prompt-q", children: t.whoHadMore }),
|
|
7484
|
+
/* @__PURE__ */ jsx77("span", { className: "ss-g-hl-prompt-stat", children: config.statLabel }),
|
|
7485
|
+
/* @__PURE__ */ jsx77("span", { className: "ss-g-hl-prompt-season", children: t.season(config.seasonLabel) })
|
|
7377
7486
|
] }),
|
|
7378
|
-
currentPair && /* @__PURE__ */
|
|
7379
|
-
/* @__PURE__ */
|
|
7380
|
-
/* @__PURE__ */
|
|
7381
|
-
/* @__PURE__ */
|
|
7487
|
+
currentPair && /* @__PURE__ */ jsxs67("div", { className: "ss-g-hl-pair", children: [
|
|
7488
|
+
/* @__PURE__ */ jsxs67(PlayerCard, { name: currentPair.playerAName, imagePath: currentPair.playerAImagePath, children: [
|
|
7489
|
+
/* @__PURE__ */ jsx77("span", { className: "ss-g-hl-value", children: currentPair.playerAValue }),
|
|
7490
|
+
/* @__PURE__ */ jsx77("span", { className: "ss-g-hl-stat", children: config.statLabel })
|
|
7382
7491
|
] }),
|
|
7383
|
-
/* @__PURE__ */
|
|
7384
|
-
/* @__PURE__ */
|
|
7385
|
-
/* @__PURE__ */
|
|
7386
|
-
/* @__PURE__ */
|
|
7492
|
+
/* @__PURE__ */ jsx77("span", { className: "ss-g-hl-vs", "aria-hidden": "true", children: t.vs }),
|
|
7493
|
+
/* @__PURE__ */ jsx77(PlayerCard, { name: currentPair.playerBName, imagePath: currentPair.playerBImagePath, highlight: true, children: /* @__PURE__ */ jsxs67("div", { className: "ss-g-hl-btns", children: [
|
|
7494
|
+
/* @__PURE__ */ jsxs67(GameButton, { variant: "primary", disabled: submitting, onClick: () => handlePick("higher"), children: [
|
|
7495
|
+
/* @__PURE__ */ jsx77(IconArrowUp, { size: 16 }),
|
|
7387
7496
|
t.higher
|
|
7388
7497
|
] }),
|
|
7389
|
-
/* @__PURE__ */
|
|
7390
|
-
/* @__PURE__ */
|
|
7498
|
+
/* @__PURE__ */ jsxs67(GameButton, { variant: "outline", disabled: submitting, onClick: () => handlePick("lower"), children: [
|
|
7499
|
+
/* @__PURE__ */ jsx77(IconArrowDown, { size: 16 }),
|
|
7391
7500
|
t.lower
|
|
7392
7501
|
] })
|
|
7393
7502
|
] }) })
|
|
7394
7503
|
] }),
|
|
7395
|
-
lastAnswer && lastAnswerPair && /* @__PURE__ */
|
|
7396
|
-
lastAnswer.wasCorrect ? /* @__PURE__ */
|
|
7504
|
+
lastAnswer && lastAnswerPair && /* @__PURE__ */ jsxs67("p", { className: "ss-g-hl-feedback", "data-testid": "hol-last", "data-correct": lastAnswer.wasCorrect ? "true" : "false", children: [
|
|
7505
|
+
lastAnswer.wasCorrect ? /* @__PURE__ */ jsx77(IconCheck, {}) : /* @__PURE__ */ jsx77(IconClose, {}),
|
|
7397
7506
|
t.lastAnswer(splitName(lastAnswerPair.playerBName).last, lastAnswer.playerBValue)
|
|
7398
7507
|
] }),
|
|
7399
|
-
isOver && /* @__PURE__ */
|
|
7508
|
+
isOver && /* @__PURE__ */ jsx77(
|
|
7400
7509
|
ResultCard,
|
|
7401
7510
|
{
|
|
7402
7511
|
tone: runEndedWrong ? "lose" : allPairsAnswered ? "win" : "neutral",
|
|
@@ -7408,15 +7517,15 @@ function HigherOrLowerGame({
|
|
|
7408
7517
|
}
|
|
7409
7518
|
)
|
|
7410
7519
|
] }),
|
|
7411
|
-
!isOver && /* @__PURE__ */
|
|
7412
|
-
/* @__PURE__ */
|
|
7520
|
+
!isOver && /* @__PURE__ */ jsx77(FooterBar, { children: /* @__PURE__ */ jsxs67("div", { className: "ss-g-hl-foot", children: [
|
|
7521
|
+
/* @__PURE__ */ jsx77("div", { className: "ss-g-hl-dots", role: "img", "aria-label": t.answersSoFar(answeredCount, config.pairs.length), children: config.pairs.map((p, i) => {
|
|
7413
7522
|
const a = answeredPairs[i];
|
|
7414
|
-
return /* @__PURE__ */
|
|
7523
|
+
return /* @__PURE__ */ jsx77("span", { className: "ss-g-hl-dot", "data-state": a ? a.wasCorrect ? "correct" : "wrong" : "todo" }, p.pairIndex);
|
|
7415
7524
|
}) }),
|
|
7416
|
-
/* @__PURE__ */
|
|
7417
|
-
/* @__PURE__ */
|
|
7525
|
+
/* @__PURE__ */ jsxs67("span", { className: "ss-g-hl-pts", children: [
|
|
7526
|
+
/* @__PURE__ */ jsx77("span", { "data-testid": "hol-score", children: score }),
|
|
7418
7527
|
" ",
|
|
7419
|
-
/* @__PURE__ */
|
|
7528
|
+
/* @__PURE__ */ jsx77("span", { className: "ss-g-hl-pts-unit", children: ui.games.unitPts })
|
|
7420
7529
|
] })
|
|
7421
7530
|
] }) })
|
|
7422
7531
|
] })
|
|
@@ -7428,17 +7537,17 @@ import { useState as useState35, useId as useId4 } from "react";
|
|
|
7428
7537
|
|
|
7429
7538
|
// src/components/games/ui/CrestShield.tsx
|
|
7430
7539
|
import { useState as useState34 } from "react";
|
|
7431
|
-
import { jsx as
|
|
7540
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
7432
7541
|
function CrestShield({ src, name, size = 28 }) {
|
|
7433
7542
|
const [failed, setFailed] = useState34(false);
|
|
7434
7543
|
if (src && !isPlaceholderImage(src) && !failed) {
|
|
7435
|
-
return /* @__PURE__ */
|
|
7544
|
+
return /* @__PURE__ */ jsx78("img", { className: "ss-g-crest", src, alt: name, width: size, height: size, loading: "lazy", onError: () => setFailed(true) });
|
|
7436
7545
|
}
|
|
7437
|
-
return /* @__PURE__ */
|
|
7546
|
+
return /* @__PURE__ */ jsx78("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__ */ jsx78("path", { d: "M2 3h24v12c0 9-6 14-12 17C8 29 2 24 2 15z", fill: "currentColor" }) });
|
|
7438
7547
|
}
|
|
7439
7548
|
|
|
7440
7549
|
// src/components/games/CareerPathGame.tsx
|
|
7441
|
-
import { Fragment as Fragment14, jsx as
|
|
7550
|
+
import { Fragment as Fragment14, jsx as jsx79, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
7442
7551
|
function parseClientState3(json) {
|
|
7443
7552
|
if (!json) return null;
|
|
7444
7553
|
try {
|
|
@@ -7468,9 +7577,9 @@ function CareerPathGame({
|
|
|
7468
7577
|
const alreadyGuessedIds = new Set(clientState?.guessResults.map((g) => g.playerId) ?? []);
|
|
7469
7578
|
const isOver = result?.alreadyPlayed === true || clientState?.solved === true || clientState?.failed === true;
|
|
7470
7579
|
if (!config) {
|
|
7471
|
-
return /* @__PURE__ */
|
|
7472
|
-
/* @__PURE__ */
|
|
7473
|
-
/* @__PURE__ */
|
|
7580
|
+
return /* @__PURE__ */ jsxs68("div", { className: "ss-g-screen", "data-game": "career-path", "data-testid": "game-screen-career-path", children: [
|
|
7581
|
+
/* @__PURE__ */ jsx79(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
|
|
7582
|
+
/* @__PURE__ */ jsx79("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
7474
7583
|
] });
|
|
7475
7584
|
}
|
|
7476
7585
|
const visiblePath = clientState?.visiblePath ?? config.initialPath;
|
|
@@ -7484,61 +7593,61 @@ function CareerPathGame({
|
|
|
7484
7593
|
setQuery("");
|
|
7485
7594
|
onSubmit(JSON.stringify({ guesses: newGuesses }));
|
|
7486
7595
|
}
|
|
7487
|
-
const right = !isOver && clientState ? /* @__PURE__ */
|
|
7596
|
+
const right = !isOver && clientState ? /* @__PURE__ */ jsx79("span", { "data-testid": "cp-guess-chip", children: /* @__PURE__ */ jsxs68(Chip, { variant: "neutral", children: [
|
|
7488
7597
|
ui.games.guess,
|
|
7489
7598
|
" ",
|
|
7490
|
-
/* @__PURE__ */
|
|
7599
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-g-num", children: clientState.guessesUsed + 1 }),
|
|
7491
7600
|
" / ",
|
|
7492
7601
|
clientState.guessesUsed + clientState.guessesRemaining
|
|
7493
7602
|
] }) }) : void 0;
|
|
7494
7603
|
const outcome = clientState?.solved ? s.solved : clientState?.failed ? s.failed : ui.games.done;
|
|
7495
|
-
return /* @__PURE__ */
|
|
7496
|
-
/* @__PURE__ */
|
|
7497
|
-
/* @__PURE__ */
|
|
7498
|
-
!isOver && /* @__PURE__ */
|
|
7499
|
-
/* @__PURE__ */
|
|
7500
|
-
isOver && clientState?.revealedPlayerName ? /* @__PURE__ */
|
|
7501
|
-
/* @__PURE__ */
|
|
7502
|
-
/* @__PURE__ */
|
|
7503
|
-
clientState?.hintLine ? /* @__PURE__ */
|
|
7504
|
-
/* @__PURE__ */
|
|
7505
|
-
/* @__PURE__ */
|
|
7604
|
+
return /* @__PURE__ */ jsxs68("div", { className: "ss-g-screen", "data-game": "career-path", "data-testid": "game-screen-career-path", children: [
|
|
7605
|
+
/* @__PURE__ */ jsx79(GameHeader, { title, eyebrow: s.eyebrow, right, onBack, backLabel: ui.back }),
|
|
7606
|
+
/* @__PURE__ */ jsxs68("div", { className: "ss-g-body", children: [
|
|
7607
|
+
!isOver && /* @__PURE__ */ jsx79(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: clientState?.guessesUsed ?? 0, ui }),
|
|
7608
|
+
/* @__PURE__ */ jsxs68("div", { className: "ss-g-cp-card", children: [
|
|
7609
|
+
isOver && clientState?.revealedPlayerName ? /* @__PURE__ */ jsx79(PlayerAvatar, { className: "ss-g-cp-photo", name: clientState.revealedPlayerName, imagePath: clientState.revealedPlayerImagePath }) : /* @__PURE__ */ jsx79(Silhouette, { size: 64, variant: isOver ? "default" : "mystery" }),
|
|
7610
|
+
/* @__PURE__ */ jsxs68("div", { className: "ss-g-cp-card-text", children: [
|
|
7611
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-g-cp-card-title", children: isOver && clientState?.revealedPlayerName ? clientState.revealedPlayerName : s.mysteryPlayer }),
|
|
7612
|
+
clientState?.hintLine ? /* @__PURE__ */ jsx79("span", { className: "ss-g-cp-hint", children: clientState.hintLine }) : !isOver ? /* @__PURE__ */ jsxs68("span", { className: "ss-g-cp-locks", children: [
|
|
7613
|
+
/* @__PURE__ */ jsx79(Chip, { variant: "lock", icon: /* @__PURE__ */ jsx79(IconLock, { size: 11 }), children: s.lockPosition }),
|
|
7614
|
+
/* @__PURE__ */ jsx79(Chip, { variant: "lock", icon: /* @__PURE__ */ jsx79(IconLock, { size: 11 }), children: s.lockNationality })
|
|
7506
7615
|
] }) : null
|
|
7507
7616
|
] })
|
|
7508
7617
|
] }),
|
|
7509
|
-
/* @__PURE__ */
|
|
7618
|
+
/* @__PURE__ */ jsxs68("ol", { className: "ss-g-cp-line", children: [
|
|
7510
7619
|
visiblePath.map((spell, i) => {
|
|
7511
7620
|
const years = i === 0 ? s.firstClub : spellYears(spell);
|
|
7512
|
-
return /* @__PURE__ */
|
|
7513
|
-
/* @__PURE__ */
|
|
7514
|
-
/* @__PURE__ */
|
|
7515
|
-
/* @__PURE__ */
|
|
7621
|
+
return /* @__PURE__ */ jsxs68("li", { className: "ss-g-cp-step", children: [
|
|
7622
|
+
/* @__PURE__ */ jsxs68("span", { className: "ss-g-cp-rail", children: [
|
|
7623
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-g-cp-tile", children: /* @__PURE__ */ jsx79(CrestShield, { src: spell.crestUrl, name: spell.clubName, size: 30 }) }),
|
|
7624
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-g-cp-conn", "aria-hidden": "true" })
|
|
7516
7625
|
] }),
|
|
7517
|
-
/* @__PURE__ */
|
|
7518
|
-
/* @__PURE__ */
|
|
7519
|
-
/* @__PURE__ */
|
|
7520
|
-
/* @__PURE__ */
|
|
7521
|
-
spell.isLoan && /* @__PURE__ */
|
|
7626
|
+
/* @__PURE__ */ jsxs68("span", { className: "ss-g-cp-step-text", children: [
|
|
7627
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-g-cp-club", children: spell.clubName }),
|
|
7628
|
+
/* @__PURE__ */ jsxs68("span", { className: "ss-g-cp-sub", children: [
|
|
7629
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-g-cp-years", children: years }),
|
|
7630
|
+
spell.isLoan && /* @__PURE__ */ jsxs68(Fragment14, { children: [
|
|
7522
7631
|
years ? " \xB7 " : "",
|
|
7523
|
-
/* @__PURE__ */
|
|
7632
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-g-cp-loan", children: s.loan })
|
|
7524
7633
|
] })
|
|
7525
7634
|
] })
|
|
7526
7635
|
] })
|
|
7527
7636
|
] }, `${spell.clubName}-${i}`);
|
|
7528
7637
|
}),
|
|
7529
|
-
hidden > 0 && /* @__PURE__ */
|
|
7530
|
-
/* @__PURE__ */
|
|
7531
|
-
/* @__PURE__ */
|
|
7532
|
-
hidden > 1 && /* @__PURE__ */
|
|
7638
|
+
hidden > 0 && /* @__PURE__ */ jsxs68("li", { className: "ss-g-cp-step ss-g-cp-step--hidden", children: [
|
|
7639
|
+
/* @__PURE__ */ jsxs68("span", { className: "ss-g-cp-rail", children: [
|
|
7640
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-g-cp-tile ss-g-cp-tile--locked", children: /* @__PURE__ */ jsx79(IconLock, { size: 18 }) }),
|
|
7641
|
+
hidden > 1 && /* @__PURE__ */ jsx79("span", { className: "ss-g-cp-conn ss-g-cp-conn--faint", "aria-hidden": "true" })
|
|
7533
7642
|
] }),
|
|
7534
|
-
/* @__PURE__ */
|
|
7643
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-g-cp-step-text", children: /* @__PURE__ */ jsx79("span", { className: "ss-g-cp-sub", children: s.nextClubHidden }) })
|
|
7535
7644
|
] }),
|
|
7536
|
-
hidden > 1 && /* @__PURE__ */
|
|
7537
|
-
/* @__PURE__ */
|
|
7538
|
-
/* @__PURE__ */
|
|
7645
|
+
hidden > 1 && /* @__PURE__ */ jsxs68("li", { className: "ss-g-cp-step ss-g-cp-step--more", children: [
|
|
7646
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-g-cp-rail", children: /* @__PURE__ */ jsx79("span", { className: "ss-g-cp-tile ss-g-cp-tile--faint", children: /* @__PURE__ */ jsx79(IconLock, { size: 18 }) }) }),
|
|
7647
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-g-cp-step-text", children: /* @__PURE__ */ jsx79("span", { className: "ss-g-cp-sub", children: s.moreClubs(hidden - 1) }) })
|
|
7539
7648
|
] })
|
|
7540
7649
|
] }),
|
|
7541
|
-
isOver && /* @__PURE__ */
|
|
7650
|
+
isOver && /* @__PURE__ */ jsx79(
|
|
7542
7651
|
ResultCard,
|
|
7543
7652
|
{
|
|
7544
7653
|
tone: clientState?.solved ? "win" : clientState?.failed ? "lose" : "neutral",
|
|
@@ -7550,7 +7659,7 @@ function CareerPathGame({
|
|
|
7550
7659
|
}
|
|
7551
7660
|
)
|
|
7552
7661
|
] }),
|
|
7553
|
-
!isOver && /* @__PURE__ */
|
|
7662
|
+
!isOver && /* @__PURE__ */ jsx79(FooterBar, { children: /* @__PURE__ */ jsx79(
|
|
7554
7663
|
AnswerTray,
|
|
7555
7664
|
{
|
|
7556
7665
|
id: inputId,
|
|
@@ -7572,13 +7681,13 @@ function CareerPathGame({
|
|
|
7572
7681
|
import React, { useEffect as useEffect23, useId as useId5, useRef as useRef20, useState as useState36 } from "react";
|
|
7573
7682
|
|
|
7574
7683
|
// src/components/games/ui/OptionList.tsx
|
|
7575
|
-
import { jsx as
|
|
7684
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
7576
7685
|
function OptionList({ label, options, onPick }) {
|
|
7577
|
-
return /* @__PURE__ */
|
|
7686
|
+
return /* @__PURE__ */ jsx80("div", { className: "ss-g-opts", role: "listbox", "aria-label": label, children: options.map((o) => /* @__PURE__ */ jsx80("button", { type: "button", role: "option", "aria-selected": false, className: "ss-g-opt", onClick: () => onPick(o.key), children: o.content }, o.key)) });
|
|
7578
7687
|
}
|
|
7579
7688
|
|
|
7580
7689
|
// src/components/games/BeatTheGridGame.tsx
|
|
7581
|
-
import { Fragment as Fragment15, jsx as
|
|
7690
|
+
import { Fragment as Fragment15, jsx as jsx81, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
7582
7691
|
function criterionIconKind(label, key) {
|
|
7583
7692
|
const l = (key ?? label).toLowerCase();
|
|
7584
7693
|
if (l.includes("app")) return "calendar";
|
|
@@ -7596,34 +7705,34 @@ function rowAbbrev(label, map, key) {
|
|
|
7596
7705
|
function CriterionIcon({ kind }) {
|
|
7597
7706
|
switch (kind) {
|
|
7598
7707
|
case "calendar":
|
|
7599
|
-
return /* @__PURE__ */
|
|
7708
|
+
return /* @__PURE__ */ jsx81(IconCalendar, {});
|
|
7600
7709
|
case "ball":
|
|
7601
|
-
return /* @__PURE__ */
|
|
7710
|
+
return /* @__PURE__ */ jsx81(IconBall, {});
|
|
7602
7711
|
case "boot":
|
|
7603
|
-
return /* @__PURE__ */
|
|
7712
|
+
return /* @__PURE__ */ jsx81(IconBoot, {});
|
|
7604
7713
|
case "gloves":
|
|
7605
|
-
return /* @__PURE__ */
|
|
7714
|
+
return /* @__PURE__ */ jsx81(IconGloves, {});
|
|
7606
7715
|
case "shield":
|
|
7607
|
-
return /* @__PURE__ */
|
|
7716
|
+
return /* @__PURE__ */ jsx81(IconShield, {});
|
|
7608
7717
|
default:
|
|
7609
|
-
return /* @__PURE__ */
|
|
7718
|
+
return /* @__PURE__ */ jsx81(IconFlag, {});
|
|
7610
7719
|
}
|
|
7611
7720
|
}
|
|
7612
7721
|
function HeaderVisual({ label, textKey: iKey, meta }) {
|
|
7613
7722
|
if (!meta) {
|
|
7614
|
-
return /* @__PURE__ */
|
|
7723
|
+
return /* @__PURE__ */ jsx81(CriterionIcon, { kind: criterionIconKind(label, iKey) });
|
|
7615
7724
|
}
|
|
7616
7725
|
switch (meta.kind) {
|
|
7617
7726
|
case "club":
|
|
7618
|
-
return /* @__PURE__ */
|
|
7727
|
+
return /* @__PURE__ */ jsx81(CrestShield, { src: meta.imageUrl, name: label, size: 24 });
|
|
7619
7728
|
case "coach":
|
|
7620
|
-
return /* @__PURE__ */
|
|
7729
|
+
return /* @__PURE__ */ jsx81(PlayerAvatar, { name: label, imagePath: meta.imageUrl, className: "ss-g-btg-coach-av" });
|
|
7621
7730
|
case "country":
|
|
7622
|
-
return /* @__PURE__ */
|
|
7731
|
+
return /* @__PURE__ */ jsx81("span", { className: "ss-g-btg-hdr-flag", "aria-hidden": "true", children: nationalityFlag(meta.country ?? label) });
|
|
7623
7732
|
case "position":
|
|
7624
|
-
return /* @__PURE__ */
|
|
7733
|
+
return /* @__PURE__ */ jsx81(Fragment15, {});
|
|
7625
7734
|
default:
|
|
7626
|
-
return /* @__PURE__ */
|
|
7735
|
+
return /* @__PURE__ */ jsx81(CriterionIcon, { kind: criterionIconKind(label, iKey) });
|
|
7627
7736
|
}
|
|
7628
7737
|
}
|
|
7629
7738
|
function parseClientState4(json) {
|
|
@@ -7667,12 +7776,12 @@ function SearchSheet({
|
|
|
7667
7776
|
const filtered = playerPool.filter(
|
|
7668
7777
|
(p) => !alreadyFilledIds.has(p.id) && p.name.toLowerCase().includes(query.toLowerCase())
|
|
7669
7778
|
);
|
|
7670
|
-
return /* @__PURE__ */
|
|
7671
|
-
/* @__PURE__ */
|
|
7672
|
-
/* @__PURE__ */
|
|
7673
|
-
/* @__PURE__ */
|
|
7674
|
-
/* @__PURE__ */
|
|
7675
|
-
/* @__PURE__ */
|
|
7779
|
+
return /* @__PURE__ */ jsxs69("div", { className: "ss-g-btg-sheet", "data-testid": "btg-search-sheet", children: [
|
|
7780
|
+
/* @__PURE__ */ jsxs69("div", { className: "ss-g-btg-sheet-hdr", children: [
|
|
7781
|
+
/* @__PURE__ */ jsx81(Chip, { variant: "neutral", children: rowLabel }),
|
|
7782
|
+
/* @__PURE__ */ jsx81("span", { className: "ss-g-btg-sheet-x", "aria-hidden": "true", children: /* @__PURE__ */ jsx81(IconClose, { size: 12 }) }),
|
|
7783
|
+
/* @__PURE__ */ jsx81(Chip, { variant: "accent", children: colLabel }),
|
|
7784
|
+
/* @__PURE__ */ jsx81(
|
|
7676
7785
|
"button",
|
|
7677
7786
|
{
|
|
7678
7787
|
type: "button",
|
|
@@ -7680,12 +7789,12 @@ function SearchSheet({
|
|
|
7680
7789
|
"data-testid": "btg-sheet-dismiss",
|
|
7681
7790
|
"aria-label": s.closeSearch,
|
|
7682
7791
|
onClick: onDismiss,
|
|
7683
|
-
children: /* @__PURE__ */
|
|
7792
|
+
children: /* @__PURE__ */ jsx81(IconClose, {})
|
|
7684
7793
|
}
|
|
7685
7794
|
)
|
|
7686
7795
|
] }),
|
|
7687
|
-
playerPool.length === 0 ? /* @__PURE__ */
|
|
7688
|
-
/* @__PURE__ */
|
|
7796
|
+
playerPool.length === 0 ? /* @__PURE__ */ jsx81("div", { className: "ss-g-btg-sheet-empty", children: s.emptyPool }) : /* @__PURE__ */ jsxs69(Fragment15, { children: [
|
|
7797
|
+
/* @__PURE__ */ jsx81(
|
|
7689
7798
|
SearchField,
|
|
7690
7799
|
{
|
|
7691
7800
|
id: inputId,
|
|
@@ -7697,16 +7806,16 @@ function SearchSheet({
|
|
|
7697
7806
|
inputRef
|
|
7698
7807
|
}
|
|
7699
7808
|
),
|
|
7700
|
-
query.length > 0 && filtered.length > 0 && /* @__PURE__ */
|
|
7809
|
+
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ jsx81(
|
|
7701
7810
|
OptionList,
|
|
7702
7811
|
{
|
|
7703
7812
|
label: s.searchLabel(rowLabel, colLabel),
|
|
7704
7813
|
options: filtered.map((p) => ({
|
|
7705
7814
|
key: p.id,
|
|
7706
|
-
content: /* @__PURE__ */
|
|
7707
|
-
/* @__PURE__ */
|
|
7708
|
-
/* @__PURE__ */
|
|
7709
|
-
/* @__PURE__ */
|
|
7815
|
+
content: /* @__PURE__ */ jsxs69(Fragment15, { children: [
|
|
7816
|
+
/* @__PURE__ */ jsx81(PlayerAvatar, { name: p.name, imagePath: p.imagePath, className: "ss-g-opt-av" }),
|
|
7817
|
+
/* @__PURE__ */ jsx81("span", { className: "ss-g-btg-result-name", children: p.name }),
|
|
7818
|
+
/* @__PURE__ */ jsx81("span", { className: "ss-g-btg-result-plus", "aria-hidden": "true", children: /* @__PURE__ */ jsx81(IconPlus, { size: 18 }) })
|
|
7710
7819
|
] })
|
|
7711
7820
|
})),
|
|
7712
7821
|
onPick: (k) => onPick(row, col, Number(k))
|
|
@@ -7744,9 +7853,9 @@ function BeatTheGridGame({
|
|
|
7744
7853
|
onSubmit(JSON.stringify({ cells: newCells }));
|
|
7745
7854
|
}
|
|
7746
7855
|
if (!config) {
|
|
7747
|
-
return /* @__PURE__ */
|
|
7748
|
-
/* @__PURE__ */
|
|
7749
|
-
/* @__PURE__ */
|
|
7856
|
+
return /* @__PURE__ */ jsxs69("div", { className: "ss-g-screen", "data-game": "beat-the-grid", "data-testid": "game-screen-beat-the-grid", children: [
|
|
7857
|
+
/* @__PURE__ */ jsx81(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
|
|
7858
|
+
/* @__PURE__ */ jsx81("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
7750
7859
|
] });
|
|
7751
7860
|
}
|
|
7752
7861
|
const rows = config.rows;
|
|
@@ -7759,20 +7868,20 @@ function BeatTheGridGame({
|
|
|
7759
7868
|
(_, i) => i < correctCount ? "correct" : i < correctCount + wrongCount ? "wrong" : "todo"
|
|
7760
7869
|
);
|
|
7761
7870
|
const totalScore = clientState?.totalScore ?? result?.score ?? 0;
|
|
7762
|
-
return /* @__PURE__ */
|
|
7763
|
-
/* @__PURE__ */
|
|
7764
|
-
/* @__PURE__ */
|
|
7871
|
+
return /* @__PURE__ */ jsxs69("div", { className: "ss-g-screen", "data-game": "beat-the-grid", "data-testid": "game-screen-beat-the-grid", children: [
|
|
7872
|
+
/* @__PURE__ */ jsx81(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
|
|
7873
|
+
/* @__PURE__ */ jsx81(
|
|
7765
7874
|
SegmentProgress,
|
|
7766
7875
|
{
|
|
7767
7876
|
segments,
|
|
7768
7877
|
ariaLabel: s.progressAria(filledCells.length, total),
|
|
7769
7878
|
leftLabel: s.filled(filledCells.length, total),
|
|
7770
7879
|
rightLabel: s.toGo(Math.max(0, total - filledCells.length)),
|
|
7771
|
-
right: /* @__PURE__ */
|
|
7880
|
+
right: /* @__PURE__ */ jsx81(Chip, { variant: "accent", children: `${totalScore} ${ui.games.unitPts}` })
|
|
7772
7881
|
}
|
|
7773
7882
|
),
|
|
7774
|
-
/* @__PURE__ */
|
|
7775
|
-
/* @__PURE__ */
|
|
7883
|
+
/* @__PURE__ */ jsxs69("div", { className: "ss-g-body", children: [
|
|
7884
|
+
/* @__PURE__ */ jsxs69(
|
|
7776
7885
|
"div",
|
|
7777
7886
|
{
|
|
7778
7887
|
className: activeCell !== null ? "ss-g-btg-grid ss-g-btg-grid--fit" : "ss-g-btg-grid",
|
|
@@ -7782,31 +7891,31 @@ function BeatTheGridGame({
|
|
|
7782
7891
|
},
|
|
7783
7892
|
role: "grid",
|
|
7784
7893
|
children: [
|
|
7785
|
-
/* @__PURE__ */
|
|
7894
|
+
/* @__PURE__ */ jsx81("div", { className: "ss-g-btg-corner" }),
|
|
7786
7895
|
cols.map((col, colIdx) => {
|
|
7787
7896
|
const colMeta = config.colsMeta?.[colIdx];
|
|
7788
|
-
return /* @__PURE__ */
|
|
7789
|
-
/* @__PURE__ */
|
|
7790
|
-
/* @__PURE__ */
|
|
7897
|
+
return /* @__PURE__ */ jsxs69("div", { className: "ss-g-btg-colhdr", "data-meta": colMeta ? "true" : void 0, children: [
|
|
7898
|
+
/* @__PURE__ */ jsx81(HeaderVisual, { label: col, textKey: config.colsI18n?.[colIdx]?.key, meta: colMeta }),
|
|
7899
|
+
/* @__PURE__ */ jsx81("span", { children: col })
|
|
7791
7900
|
] }, col);
|
|
7792
7901
|
}),
|
|
7793
7902
|
rows.map((rowLabel, rowIdx) => {
|
|
7794
7903
|
const rowMeta = config.rowsMeta?.[rowIdx];
|
|
7795
7904
|
const abbr = rowAbbrev(rowLabel, s.rowAbbrev, config.rowsI18n?.[rowIdx]?.key);
|
|
7796
|
-
const rowHeaderContent = rowMeta ? /* @__PURE__ */
|
|
7797
|
-
/* @__PURE__ */
|
|
7798
|
-
/* @__PURE__ */
|
|
7799
|
-
] }) : abbr === rowLabel ? /* @__PURE__ */
|
|
7800
|
-
/* @__PURE__ */
|
|
7801
|
-
/* @__PURE__ */
|
|
7905
|
+
const rowHeaderContent = rowMeta ? /* @__PURE__ */ jsxs69(Fragment15, { children: [
|
|
7906
|
+
/* @__PURE__ */ jsx81(HeaderVisual, { label: rowLabel, textKey: config.rowsI18n?.[rowIdx]?.key, meta: rowMeta }),
|
|
7907
|
+
/* @__PURE__ */ jsx81("span", { children: rowLabel })
|
|
7908
|
+
] }) : abbr === rowLabel ? /* @__PURE__ */ jsx81("span", { children: rowLabel }) : /* @__PURE__ */ jsxs69(Fragment15, { children: [
|
|
7909
|
+
/* @__PURE__ */ jsx81("span", { "aria-hidden": "true", children: abbr }),
|
|
7910
|
+
/* @__PURE__ */ jsx81("span", { className: "ss-g-sr", children: rowLabel })
|
|
7802
7911
|
] });
|
|
7803
|
-
return /* @__PURE__ */
|
|
7804
|
-
/* @__PURE__ */
|
|
7912
|
+
return /* @__PURE__ */ jsxs69(React.Fragment, { children: [
|
|
7913
|
+
/* @__PURE__ */ jsx81("div", { className: "ss-g-btg-rowhdr", "data-meta": rowMeta ? "true" : void 0, children: rowHeaderContent }),
|
|
7805
7914
|
cols.map((colLabel, colIdx) => {
|
|
7806
7915
|
const filled = findCellResult(filledCells, rowIdx, colIdx);
|
|
7807
7916
|
const isActive = activeCell?.row === rowIdx && activeCell?.col === colIdx;
|
|
7808
7917
|
const state = filled ? filled.isCorrect ? "correct" : "wrong" : isActive ? "active" : "empty";
|
|
7809
|
-
return /* @__PURE__ */
|
|
7918
|
+
return /* @__PURE__ */ jsx81(
|
|
7810
7919
|
"button",
|
|
7811
7920
|
{
|
|
7812
7921
|
type: "button",
|
|
@@ -7817,20 +7926,20 @@ function BeatTheGridGame({
|
|
|
7817
7926
|
className: "ss-g-btg-cell",
|
|
7818
7927
|
disabled: isLocked2 || submitting,
|
|
7819
7928
|
onClick: () => handleCellClick(rowIdx, colIdx),
|
|
7820
|
-
children: filled ? /* @__PURE__ */
|
|
7821
|
-
/* @__PURE__ */
|
|
7929
|
+
children: filled ? /* @__PURE__ */ jsxs69(Fragment15, { children: [
|
|
7930
|
+
/* @__PURE__ */ jsx81(
|
|
7822
7931
|
"span",
|
|
7823
7932
|
{
|
|
7824
7933
|
className: `ss-g-btg-badge ss-g-btg-badge--${filled.isCorrect ? "correct" : "wrong"}`,
|
|
7825
7934
|
role: "img",
|
|
7826
7935
|
"aria-label": filled.isCorrect ? s.correct : s.wrong,
|
|
7827
|
-
children: filled.isCorrect ? /* @__PURE__ */
|
|
7936
|
+
children: filled.isCorrect ? /* @__PURE__ */ jsx81(IconCheck, { size: 11 }) : /* @__PURE__ */ jsx81(IconClose, { size: 11 })
|
|
7828
7937
|
}
|
|
7829
7938
|
),
|
|
7830
|
-
/* @__PURE__ */
|
|
7939
|
+
/* @__PURE__ */ jsx81("span", { className: "ss-g-btg-rarity", children: filled.rarityScore }),
|
|
7831
7940
|
(() => {
|
|
7832
7941
|
const entry = playerPool.find((p) => p.id === filled.playerId);
|
|
7833
|
-
return /* @__PURE__ */
|
|
7942
|
+
return /* @__PURE__ */ jsx81(
|
|
7834
7943
|
PlayerAvatar,
|
|
7835
7944
|
{
|
|
7836
7945
|
name: entry?.name ?? "",
|
|
@@ -7839,8 +7948,8 @@ function BeatTheGridGame({
|
|
|
7839
7948
|
}
|
|
7840
7949
|
);
|
|
7841
7950
|
})(),
|
|
7842
|
-
/* @__PURE__ */
|
|
7843
|
-
] }) : /* @__PURE__ */
|
|
7951
|
+
/* @__PURE__ */ jsx81("span", { className: "ss-g-btg-name", children: shortName(playerPool.find((p) => p.id === filled.playerId)?.name) })
|
|
7952
|
+
] }) : /* @__PURE__ */ jsx81("span", { className: "ss-g-btg-plus", "aria-hidden": "true", children: /* @__PURE__ */ jsx81(IconPlus, { size: 22 }) })
|
|
7844
7953
|
},
|
|
7845
7954
|
`cell-${rowIdx}-${colIdx}`
|
|
7846
7955
|
);
|
|
@@ -7850,7 +7959,7 @@ function BeatTheGridGame({
|
|
|
7850
7959
|
]
|
|
7851
7960
|
}
|
|
7852
7961
|
),
|
|
7853
|
-
isLocked2 && /* @__PURE__ */
|
|
7962
|
+
isLocked2 && /* @__PURE__ */ jsx81(
|
|
7854
7963
|
ResultCard,
|
|
7855
7964
|
{
|
|
7856
7965
|
tone: "neutral",
|
|
@@ -7862,7 +7971,7 @@ function BeatTheGridGame({
|
|
|
7862
7971
|
}
|
|
7863
7972
|
)
|
|
7864
7973
|
] }),
|
|
7865
|
-
activeCell !== null && /* @__PURE__ */
|
|
7974
|
+
activeCell !== null && /* @__PURE__ */ jsx81("div", { className: "ss-g-btg-pin", children: /* @__PURE__ */ jsx81(
|
|
7866
7975
|
SearchSheet,
|
|
7867
7976
|
{
|
|
7868
7977
|
row: activeCell.row,
|
|
@@ -7884,18 +7993,18 @@ function BeatTheGridGame({
|
|
|
7884
7993
|
import { useState as useState37, useId as useId6 } from "react";
|
|
7885
7994
|
|
|
7886
7995
|
// src/components/games/ui/PitchSvg.tsx
|
|
7887
|
-
import { Fragment as Fragment16, jsx as
|
|
7996
|
+
import { Fragment as Fragment16, jsx as jsx82, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
7888
7997
|
function PitchSvg({ variant }) {
|
|
7889
|
-
return /* @__PURE__ */
|
|
7890
|
-
/* @__PURE__ */
|
|
7891
|
-
variant === "full" ? /* @__PURE__ */
|
|
7892
|
-
/* @__PURE__ */
|
|
7893
|
-
/* @__PURE__ */
|
|
7894
|
-
/* @__PURE__ */
|
|
7895
|
-
/* @__PURE__ */
|
|
7896
|
-
] }) : /* @__PURE__ */
|
|
7897
|
-
/* @__PURE__ */
|
|
7898
|
-
/* @__PURE__ */
|
|
7998
|
+
return /* @__PURE__ */ jsxs70("svg", { className: "ss-g-pitch-svg", viewBox: variant === "full" ? "0 0 100 150" : "0 0 100 100", preserveAspectRatio: "none", "aria-hidden": "true", children: [
|
|
7999
|
+
/* @__PURE__ */ jsx82("rect", { x: "4", y: "4", width: "92", height: variant === "full" ? 142 : 92, fill: "none" }),
|
|
8000
|
+
variant === "full" ? /* @__PURE__ */ jsxs70(Fragment16, { children: [
|
|
8001
|
+
/* @__PURE__ */ jsx82("line", { x1: "4", y1: "75", x2: "96", y2: "75" }),
|
|
8002
|
+
/* @__PURE__ */ jsx82("circle", { cx: "50", cy: "75", r: "12", fill: "none" }),
|
|
8003
|
+
/* @__PURE__ */ jsx82("rect", { x: "26", y: "4", width: "48", height: "20", fill: "none" }),
|
|
8004
|
+
/* @__PURE__ */ jsx82("rect", { x: "26", y: "126", width: "48", height: "20", fill: "none" })
|
|
8005
|
+
] }) : /* @__PURE__ */ jsxs70(Fragment16, { children: [
|
|
8006
|
+
/* @__PURE__ */ jsx82("path", { d: "M38 4a12 12 0 0 0 24 0", fill: "none" }),
|
|
8007
|
+
/* @__PURE__ */ jsx82("rect", { x: "26", y: "76", width: "48", height: "20", fill: "none" })
|
|
7899
8008
|
] })
|
|
7900
8009
|
] });
|
|
7901
8010
|
}
|
|
@@ -7951,7 +8060,7 @@ function positionsBySlot(formation, rowsAttackFirst) {
|
|
|
7951
8060
|
}
|
|
7952
8061
|
|
|
7953
8062
|
// src/components/games/GuessTheXiGame.tsx
|
|
7954
|
-
import { Fragment as Fragment17, jsx as
|
|
8063
|
+
import { Fragment as Fragment17, jsx as jsx83, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
7955
8064
|
var MAX_GUESSES2 = 3;
|
|
7956
8065
|
function parseClientState5(json) {
|
|
7957
8066
|
if (!json) return null;
|
|
@@ -8001,31 +8110,31 @@ function GuessTheXiGame({
|
|
|
8001
8110
|
const wrongGuesses = (clientState?.guessHistory ?? []).filter((g) => !g.wasCorrect);
|
|
8002
8111
|
const guessesLeft = Math.max(0, MAX_GUESSES2 - (clientState?.guessesUsed ?? 0));
|
|
8003
8112
|
const teamName = (id) => config?.teamPool.find((tm) => tm.teamId === id)?.teamName ?? `#${id}`;
|
|
8004
|
-
return /* @__PURE__ */
|
|
8005
|
-
/* @__PURE__ */
|
|
8113
|
+
return /* @__PURE__ */ jsxs71("div", { className: "ss-g-screen ss-g-gxi", "data-game": "guess-the-xi", "data-testid": "game-screen-guess-the-xi", children: [
|
|
8114
|
+
/* @__PURE__ */ jsx83(
|
|
8006
8115
|
GameHeader,
|
|
8007
8116
|
{
|
|
8008
8117
|
title: gameTitle({ gameId: "guess-the-xi" }, ui.games.titles),
|
|
8009
8118
|
eyebrow: config?.poolLabel,
|
|
8010
|
-
right: formation ? /* @__PURE__ */
|
|
8119
|
+
right: formation ? /* @__PURE__ */ jsx83(Chip, { variant: "accent", children: formation }) : void 0,
|
|
8011
8120
|
onBack,
|
|
8012
8121
|
backLabel: ui.back
|
|
8013
8122
|
}
|
|
8014
8123
|
),
|
|
8015
|
-
!config && /* @__PURE__ */
|
|
8016
|
-
config && /* @__PURE__ */
|
|
8017
|
-
/* @__PURE__ */
|
|
8018
|
-
!isOver && /* @__PURE__ */
|
|
8019
|
-
rows.length > 0 && /* @__PURE__ */
|
|
8020
|
-
/* @__PURE__ */
|
|
8021
|
-
/* @__PURE__ */
|
|
8124
|
+
!config && /* @__PURE__ */ jsx83("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
8125
|
+
config && /* @__PURE__ */ jsxs71(Fragment17, { children: [
|
|
8126
|
+
/* @__PURE__ */ jsxs71("div", { className: "ss-g-body", children: [
|
|
8127
|
+
!isOver && /* @__PURE__ */ jsx83(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: clientState?.guessHistory.length ?? 0, ui }),
|
|
8128
|
+
rows.length > 0 && /* @__PURE__ */ jsxs71("div", { className: "ss-g-gxi-pitch", role: "group", "aria-label": t.pitchLabel, children: [
|
|
8129
|
+
/* @__PURE__ */ jsx83(PitchSvg, { variant: "full" }),
|
|
8130
|
+
/* @__PURE__ */ jsx83("div", { className: "ss-g-gxi-rows", children: rows.map((row, r) => /* @__PURE__ */ jsx83("div", { className: "ss-g-gxi-row", children: row.map((pos, c) => {
|
|
8022
8131
|
const posLabel = pos.slot ? posBySlot.get(pos.slot) ?? "" : "";
|
|
8023
8132
|
const name = pos.slot ? nameBySlot.get(pos.slot) : void 0;
|
|
8024
8133
|
const lineupEntry = pos.slot ? lineupBySlot.get(pos.slot) : void 0;
|
|
8025
8134
|
const flag = nationalityFlag(pos.nationality);
|
|
8026
8135
|
if (lineupEntry) {
|
|
8027
|
-
return /* @__PURE__ */
|
|
8028
|
-
/* @__PURE__ */
|
|
8136
|
+
return /* @__PURE__ */ jsxs71("div", { className: "ss-g-gxi-node", "data-revealed": "true", children: [
|
|
8137
|
+
/* @__PURE__ */ jsx83(
|
|
8029
8138
|
PlayerAvatar,
|
|
8030
8139
|
{
|
|
8031
8140
|
name: lineupEntry.name,
|
|
@@ -8033,11 +8142,11 @@ function GuessTheXiGame({
|
|
|
8033
8142
|
className: "ss-g-gxi-disc ss-g-gxi-disc--photo"
|
|
8034
8143
|
}
|
|
8035
8144
|
),
|
|
8036
|
-
/* @__PURE__ */
|
|
8145
|
+
/* @__PURE__ */ jsx83("span", { className: "ss-g-gxi-pos ss-g-gxi-pos--name", children: splitName(lineupEntry.name).last })
|
|
8037
8146
|
] }, `${pos.slot}-${c}`);
|
|
8038
8147
|
}
|
|
8039
|
-
return /* @__PURE__ */
|
|
8040
|
-
/* @__PURE__ */
|
|
8148
|
+
return /* @__PURE__ */ jsxs71("div", { className: "ss-g-gxi-node", "data-revealed": name ? "true" : void 0, children: [
|
|
8149
|
+
/* @__PURE__ */ jsx83(
|
|
8041
8150
|
"span",
|
|
8042
8151
|
{
|
|
8043
8152
|
className: "ss-g-gxi-disc",
|
|
@@ -8048,22 +8157,22 @@ function GuessTheXiGame({
|
|
|
8048
8157
|
children: flag
|
|
8049
8158
|
}
|
|
8050
8159
|
),
|
|
8051
|
-
name ? /* @__PURE__ */
|
|
8160
|
+
name ? /* @__PURE__ */ jsx83("span", { className: "ss-g-gxi-pos ss-g-gxi-pos--name", children: splitName(name).last }) : posLabel && /* @__PURE__ */ jsx83("span", { className: "ss-g-gxi-pos", children: posLabel })
|
|
8052
8161
|
] }, `${pos.slot}-${c}`);
|
|
8053
8162
|
}) }, r)) })
|
|
8054
8163
|
] }),
|
|
8055
|
-
!isOver && wrongGuesses.length > 0 && /* @__PURE__ */
|
|
8056
|
-
/* @__PURE__ */
|
|
8164
|
+
!isOver && wrongGuesses.length > 0 && /* @__PURE__ */ jsxs71("div", { className: "ss-g-gxi-wrong", children: [
|
|
8165
|
+
/* @__PURE__ */ jsx83("span", { className: "ss-g-gxi-wrong-l", children: t.notThem }),
|
|
8057
8166
|
wrongGuesses.map((g) => {
|
|
8058
8167
|
const crestUrl = config?.teamPool.find((tm) => tm.teamId === g.teamId)?.crestUrl;
|
|
8059
|
-
return /* @__PURE__ */
|
|
8060
|
-
/* @__PURE__ */
|
|
8061
|
-
/* @__PURE__ */
|
|
8168
|
+
return /* @__PURE__ */ jsxs71("span", { className: "ss-g-gxi-wrong-chip", children: [
|
|
8169
|
+
/* @__PURE__ */ jsx83(CrestShield, { src: crestUrl, name: teamName(g.teamId), size: 18 }),
|
|
8170
|
+
/* @__PURE__ */ jsx83("s", { children: teamName(g.teamId) })
|
|
8062
8171
|
] }, g.teamId);
|
|
8063
8172
|
})
|
|
8064
8173
|
] }),
|
|
8065
|
-
isOver && /* @__PURE__ */
|
|
8066
|
-
/* @__PURE__ */
|
|
8174
|
+
isOver && /* @__PURE__ */ jsxs71(Fragment17, { children: [
|
|
8175
|
+
/* @__PURE__ */ jsx83(
|
|
8067
8176
|
ResultCard,
|
|
8068
8177
|
{
|
|
8069
8178
|
tone: solved ? "win" : failed ? "lose" : "neutral",
|
|
@@ -8074,29 +8183,29 @@ function GuessTheXiGame({
|
|
|
8074
8183
|
ui
|
|
8075
8184
|
}
|
|
8076
8185
|
),
|
|
8077
|
-
(solved || failed) && clientState?.answer && /* @__PURE__ */
|
|
8078
|
-
/* @__PURE__ */
|
|
8079
|
-
/* @__PURE__ */
|
|
8080
|
-
/* @__PURE__ */
|
|
8186
|
+
(solved || failed) && clientState?.answer && /* @__PURE__ */ jsxs71("div", { className: "ss-g-gxi-answer", "data-testid": "gxi-answer-reveal", children: [
|
|
8187
|
+
/* @__PURE__ */ jsx83("span", { className: "ss-g-gxi-answer-label", children: t.theAnswer }),
|
|
8188
|
+
/* @__PURE__ */ jsx83(CrestShield, { src: clientState.answer.crestUrl, name: clientState.answer.teamName, size: 32 }),
|
|
8189
|
+
/* @__PURE__ */ jsx83("span", { className: "ss-g-gxi-answer-name", children: clientState.answer.teamName })
|
|
8081
8190
|
] })
|
|
8082
8191
|
] })
|
|
8083
8192
|
] }),
|
|
8084
|
-
!isOver && /* @__PURE__ */
|
|
8085
|
-
query.length > 0 && filtered.length > 0 && /* @__PURE__ */
|
|
8193
|
+
!isOver && /* @__PURE__ */ jsxs71(FooterBar, { children: [
|
|
8194
|
+
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ jsx83(
|
|
8086
8195
|
OptionList,
|
|
8087
8196
|
{
|
|
8088
8197
|
label: t.optionsLabel,
|
|
8089
8198
|
options: filtered.map((tm) => ({
|
|
8090
8199
|
key: tm.teamId,
|
|
8091
|
-
content: /* @__PURE__ */
|
|
8092
|
-
/* @__PURE__ */
|
|
8093
|
-
/* @__PURE__ */
|
|
8200
|
+
content: /* @__PURE__ */ jsxs71(Fragment17, { children: [
|
|
8201
|
+
/* @__PURE__ */ jsx83(CrestShield, { src: tm.crestUrl, name: tm.teamName, size: 28 }),
|
|
8202
|
+
/* @__PURE__ */ jsx83("span", { children: tm.teamName })
|
|
8094
8203
|
] })
|
|
8095
8204
|
})),
|
|
8096
8205
|
onPick: (k) => handlePick(Number(k))
|
|
8097
8206
|
}
|
|
8098
8207
|
),
|
|
8099
|
-
/* @__PURE__ */
|
|
8208
|
+
/* @__PURE__ */ jsx83(
|
|
8100
8209
|
SearchField,
|
|
8101
8210
|
{
|
|
8102
8211
|
id: inputId,
|
|
@@ -8114,7 +8223,7 @@ function GuessTheXiGame({
|
|
|
8114
8223
|
|
|
8115
8224
|
// src/components/games/DailyQuizGame.tsx
|
|
8116
8225
|
import { useState as useState38 } from "react";
|
|
8117
|
-
import { Fragment as Fragment18, jsx as
|
|
8226
|
+
import { Fragment as Fragment18, jsx as jsx84, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
8118
8227
|
function parseClientState6(json) {
|
|
8119
8228
|
if (!json) return null;
|
|
8120
8229
|
try {
|
|
@@ -8135,13 +8244,13 @@ function OptionName({ text }) {
|
|
|
8135
8244
|
const tokens = base.split(/\s+/).filter(Boolean);
|
|
8136
8245
|
const isPlainName = tokens.length >= 1 && tokens.length <= 4 && tokens.every((t) => NAME_TOKEN.test(t));
|
|
8137
8246
|
if (!isPlainName || base === "") {
|
|
8138
|
-
return /* @__PURE__ */
|
|
8247
|
+
return /* @__PURE__ */ jsx84("span", { className: "ss-g-dq-opt-name", children: /* @__PURE__ */ jsx84("span", { className: "ss-g-dq-opt-full", children: text }) });
|
|
8139
8248
|
}
|
|
8140
8249
|
const { first, last } = splitName(base);
|
|
8141
|
-
return /* @__PURE__ */
|
|
8142
|
-
first && /* @__PURE__ */
|
|
8143
|
-
/* @__PURE__ */
|
|
8144
|
-
suffix && /* @__PURE__ */
|
|
8250
|
+
return /* @__PURE__ */ jsxs72("span", { className: "ss-g-dq-opt-name", children: [
|
|
8251
|
+
first && /* @__PURE__ */ jsx84("span", { className: "ss-g-dq-opt-first", children: first }),
|
|
8252
|
+
/* @__PURE__ */ jsx84("span", { className: "ss-g-dq-opt-last", children: last }),
|
|
8253
|
+
suffix && /* @__PURE__ */ jsx84("span", { className: "ss-g-dq-opt-suffix", children: suffix })
|
|
8145
8254
|
] });
|
|
8146
8255
|
}
|
|
8147
8256
|
function DailyQuizGame({
|
|
@@ -8160,9 +8269,9 @@ function DailyQuizGame({
|
|
|
8160
8269
|
const results = clientState?.results ?? [];
|
|
8161
8270
|
const isRevealed = results.length > 0 || result?.alreadyPlayed === true;
|
|
8162
8271
|
if (!config) {
|
|
8163
|
-
return /* @__PURE__ */
|
|
8164
|
-
/* @__PURE__ */
|
|
8165
|
-
/* @__PURE__ */
|
|
8272
|
+
return /* @__PURE__ */ jsxs72("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
|
|
8273
|
+
/* @__PURE__ */ jsx84(GameHeader, { title, onBack, backLabel: ui.back }),
|
|
8274
|
+
/* @__PURE__ */ jsx84("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
8166
8275
|
] });
|
|
8167
8276
|
}
|
|
8168
8277
|
const questions = config.questions;
|
|
@@ -8197,11 +8306,11 @@ function DailyQuizGame({
|
|
|
8197
8306
|
return r.isCorrect ? "correct" : "wrong";
|
|
8198
8307
|
});
|
|
8199
8308
|
const correctCount = results.filter((r) => r.isCorrect).length;
|
|
8200
|
-
return /* @__PURE__ */
|
|
8201
|
-
/* @__PURE__ */
|
|
8202
|
-
/* @__PURE__ */
|
|
8203
|
-
/* @__PURE__ */
|
|
8204
|
-
/* @__PURE__ */
|
|
8309
|
+
return /* @__PURE__ */ jsxs72("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
|
|
8310
|
+
/* @__PURE__ */ jsx84(GameHeader, { title, eyebrow: s.results, onBack, backLabel: ui.back }),
|
|
8311
|
+
/* @__PURE__ */ jsx84(SegmentProgress, { segments: segments2, ariaLabel: s.results }),
|
|
8312
|
+
/* @__PURE__ */ jsxs72("div", { className: "ss-g-body", children: [
|
|
8313
|
+
/* @__PURE__ */ jsx84(
|
|
8205
8314
|
ResultCard,
|
|
8206
8315
|
{
|
|
8207
8316
|
tone: "neutral",
|
|
@@ -8214,15 +8323,15 @@ function DailyQuizGame({
|
|
|
8214
8323
|
questions.map((q) => {
|
|
8215
8324
|
const r = findResult(results, q.index);
|
|
8216
8325
|
const picked = selections.get(q.index);
|
|
8217
|
-
return /* @__PURE__ */
|
|
8218
|
-
/* @__PURE__ */
|
|
8219
|
-
r && /* @__PURE__ */
|
|
8326
|
+
return /* @__PURE__ */ jsxs72("div", { className: "ss-g-dq-rq", children: [
|
|
8327
|
+
/* @__PURE__ */ jsx84("div", { className: "ss-g-dq-rq-stem", children: q.stem }),
|
|
8328
|
+
r && /* @__PURE__ */ jsx84("div", { className: "ss-g-dq-rq-opts", children: q.options.map((opt, optIdx) => {
|
|
8220
8329
|
let cls = "ss-g-dq-rq-opt";
|
|
8221
8330
|
if (optIdx === r.correctOptionIndex) cls += " ss-g-dq-rq-opt--correct";
|
|
8222
8331
|
else if (optIdx === picked && !r.isCorrect) cls += " ss-g-dq-rq-opt--wrong";
|
|
8223
|
-
return /* @__PURE__ */
|
|
8332
|
+
return /* @__PURE__ */ jsx84("span", { className: cls, children: opt }, optIdx);
|
|
8224
8333
|
}) }),
|
|
8225
|
-
r?.revealText && /* @__PURE__ */
|
|
8334
|
+
r?.revealText && /* @__PURE__ */ jsx84("div", { className: "ss-g-dq-why", children: r.revealText })
|
|
8226
8335
|
] }, q.index);
|
|
8227
8336
|
})
|
|
8228
8337
|
] })
|
|
@@ -8230,16 +8339,16 @@ function DailyQuizGame({
|
|
|
8230
8339
|
}
|
|
8231
8340
|
const segments = questions.map((_, i) => i < page ? "done" : i === page ? "current" : "todo");
|
|
8232
8341
|
const selectedIdx = current ? selections.get(current.index) : void 0;
|
|
8233
|
-
return /* @__PURE__ */
|
|
8234
|
-
/* @__PURE__ */
|
|
8235
|
-
/* @__PURE__ */
|
|
8236
|
-
/* @__PURE__ */
|
|
8237
|
-
/* @__PURE__ */
|
|
8238
|
-
/* @__PURE__ */
|
|
8342
|
+
return /* @__PURE__ */ jsxs72("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
|
|
8343
|
+
/* @__PURE__ */ jsx84(GameHeader, { title, eyebrow: s.questionOf(page + 1, total), onBack, backLabel: ui.back }),
|
|
8344
|
+
/* @__PURE__ */ jsx84(SegmentProgress, { segments, ariaLabel: s.progressAria(page + 1, total) }),
|
|
8345
|
+
/* @__PURE__ */ jsx84("div", { className: "ss-g-body", children: current && /* @__PURE__ */ jsxs72(Fragment18, { children: [
|
|
8346
|
+
/* @__PURE__ */ jsx84("h3", { className: "ss-g-dq-stem", children: current.stem }),
|
|
8347
|
+
/* @__PURE__ */ jsx84("div", { className: "ss-g-dq-opts", children: current.options.map((opt, optIdx) => {
|
|
8239
8348
|
const selected = optIdx === selectedIdx;
|
|
8240
8349
|
const imagePath = current.optionImagePaths?.[optIdx] ?? void 0;
|
|
8241
8350
|
const playerName = opt;
|
|
8242
|
-
return /* @__PURE__ */
|
|
8351
|
+
return /* @__PURE__ */ jsxs72(
|
|
8243
8352
|
"button",
|
|
8244
8353
|
{
|
|
8245
8354
|
type: "button",
|
|
@@ -8248,25 +8357,25 @@ function DailyQuizGame({
|
|
|
8248
8357
|
disabled: submitting,
|
|
8249
8358
|
onClick: () => handleSelect(current.index, optIdx),
|
|
8250
8359
|
children: [
|
|
8251
|
-
current.optionImagePaths && /* @__PURE__ */
|
|
8252
|
-
/* @__PURE__ */
|
|
8253
|
-
/* @__PURE__ */
|
|
8360
|
+
current.optionImagePaths && /* @__PURE__ */ jsx84(PlayerAvatar, { name: playerName, imagePath, className: "ss-g-dq-opt-av" }),
|
|
8361
|
+
/* @__PURE__ */ jsx84("span", { className: "ss-g-dq-badge", "aria-hidden": "true", children: selected ? /* @__PURE__ */ jsx84(IconCheck, {}) : String.fromCharCode(65 + optIdx) }),
|
|
8362
|
+
/* @__PURE__ */ jsx84(OptionName, { text: opt })
|
|
8254
8363
|
]
|
|
8255
8364
|
},
|
|
8256
8365
|
optIdx
|
|
8257
8366
|
);
|
|
8258
8367
|
}) })
|
|
8259
8368
|
] }) }),
|
|
8260
|
-
/* @__PURE__ */
|
|
8261
|
-
page > 0 && /* @__PURE__ */
|
|
8262
|
-
isLast ? /* @__PURE__ */
|
|
8369
|
+
/* @__PURE__ */ jsx84(FooterBar, { children: /* @__PURE__ */ jsxs72("div", { className: "ss-g-dq-nav", children: [
|
|
8370
|
+
page > 0 && /* @__PURE__ */ jsx84(GameButton, { variant: "outline", onClick: goPrev, disabled: submitting, children: s.previous }),
|
|
8371
|
+
isLast ? /* @__PURE__ */ jsx84(GameButton, { variant: "primary", block: true, onClick: handleSubmit, disabled: !currentAnswered || !allAnswered || submitting, children: submitting ? s.submitting : s.submit }) : /* @__PURE__ */ jsx84(GameButton, { variant: "primary", block: true, onClick: goNext, disabled: !currentAnswered || submitting, children: s.next })
|
|
8263
8372
|
] }) })
|
|
8264
8373
|
] });
|
|
8265
8374
|
}
|
|
8266
8375
|
|
|
8267
8376
|
// src/components/games/MatchdayPredictorGame.tsx
|
|
8268
8377
|
import { useId as useId7, useState as useState39 } from "react";
|
|
8269
|
-
import { jsx as
|
|
8378
|
+
import { jsx as jsx85, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
8270
8379
|
var SCORER_SEARCH_THRESHOLD = 9;
|
|
8271
8380
|
function parseClientState7(json) {
|
|
8272
8381
|
if (!json) return null;
|
|
@@ -8284,7 +8393,7 @@ function isLocked(kickoffUtc) {
|
|
|
8284
8393
|
}
|
|
8285
8394
|
}
|
|
8286
8395
|
function IconMinus() {
|
|
8287
|
-
return /* @__PURE__ */
|
|
8396
|
+
return /* @__PURE__ */ jsx85(
|
|
8288
8397
|
"svg",
|
|
8289
8398
|
{
|
|
8290
8399
|
width: 18,
|
|
@@ -8295,20 +8404,20 @@ function IconMinus() {
|
|
|
8295
8404
|
strokeWidth: 2.2,
|
|
8296
8405
|
strokeLinecap: "round",
|
|
8297
8406
|
"aria-hidden": "true",
|
|
8298
|
-
children: /* @__PURE__ */
|
|
8407
|
+
children: /* @__PURE__ */ jsx85("path", { d: "M5 12h14" })
|
|
8299
8408
|
}
|
|
8300
8409
|
);
|
|
8301
8410
|
}
|
|
8302
8411
|
function TeamBadge({ team, label }) {
|
|
8303
|
-
return /* @__PURE__ */
|
|
8304
|
-
/* @__PURE__ */
|
|
8305
|
-
/* @__PURE__ */
|
|
8306
|
-
/* @__PURE__ */
|
|
8412
|
+
return /* @__PURE__ */ jsxs73("div", { className: "ss-g-mp-team", children: [
|
|
8413
|
+
/* @__PURE__ */ jsx85(CrestShield, { name: team.name, size: 44 }),
|
|
8414
|
+
/* @__PURE__ */ jsx85("span", { className: "ss-g-mp-team-name", children: team.name }),
|
|
8415
|
+
/* @__PURE__ */ jsx85("span", { className: "ss-g-mp-team-side", children: label })
|
|
8307
8416
|
] });
|
|
8308
8417
|
}
|
|
8309
8418
|
function ScoreCard({ home, away, h, a, t, edit }) {
|
|
8310
|
-
const col = (side, team, value) => /* @__PURE__ */
|
|
8311
|
-
edit && /* @__PURE__ */
|
|
8419
|
+
const col = (side, team, value) => /* @__PURE__ */ jsxs73("div", { className: "ss-g-mp-col", children: [
|
|
8420
|
+
edit && /* @__PURE__ */ jsx85(
|
|
8312
8421
|
"button",
|
|
8313
8422
|
{
|
|
8314
8423
|
type: "button",
|
|
@@ -8316,11 +8425,11 @@ function ScoreCard({ home, away, h, a, t, edit }) {
|
|
|
8316
8425
|
"aria-label": t.goalsUp(team.name),
|
|
8317
8426
|
disabled: edit.disabled,
|
|
8318
8427
|
onClick: () => edit.onStep(side, 1),
|
|
8319
|
-
children: /* @__PURE__ */
|
|
8428
|
+
children: /* @__PURE__ */ jsx85(IconPlus, { size: 18 })
|
|
8320
8429
|
}
|
|
8321
8430
|
),
|
|
8322
|
-
/* @__PURE__ */
|
|
8323
|
-
edit && /* @__PURE__ */
|
|
8431
|
+
/* @__PURE__ */ jsx85("span", { className: "ss-g-mp-digit", "data-testid": "mp-digit", "data-active": edit ? String(edit.active === side) : "false", children: value }),
|
|
8432
|
+
edit && /* @__PURE__ */ jsx85(
|
|
8324
8433
|
"button",
|
|
8325
8434
|
{
|
|
8326
8435
|
type: "button",
|
|
@@ -8328,27 +8437,27 @@ function ScoreCard({ home, away, h, a, t, edit }) {
|
|
|
8328
8437
|
"aria-label": t.goalsDown(team.name),
|
|
8329
8438
|
disabled: edit.disabled || value <= 0,
|
|
8330
8439
|
onClick: () => edit.onStep(side, -1),
|
|
8331
|
-
children: /* @__PURE__ */
|
|
8440
|
+
children: /* @__PURE__ */ jsx85(IconMinus, {})
|
|
8332
8441
|
}
|
|
8333
8442
|
)
|
|
8334
8443
|
] });
|
|
8335
|
-
return /* @__PURE__ */
|
|
8336
|
-
/* @__PURE__ */
|
|
8337
|
-
/* @__PURE__ */
|
|
8444
|
+
return /* @__PURE__ */ jsxs73("div", { className: "ss-g-mp-card", children: [
|
|
8445
|
+
/* @__PURE__ */ jsx85(TeamBadge, { team: home, label: t.home }),
|
|
8446
|
+
/* @__PURE__ */ jsxs73("div", { className: "ss-g-mp-scores", children: [
|
|
8338
8447
|
col("home", home, h),
|
|
8339
|
-
/* @__PURE__ */
|
|
8448
|
+
/* @__PURE__ */ jsx85("span", { className: "ss-g-mp-dash", "aria-hidden": "true", children: "\u2013" }),
|
|
8340
8449
|
col("away", away, a)
|
|
8341
8450
|
] }),
|
|
8342
|
-
/* @__PURE__ */
|
|
8451
|
+
/* @__PURE__ */ jsx85(TeamBadge, { team: away, label: t.away })
|
|
8343
8452
|
] });
|
|
8344
8453
|
}
|
|
8345
8454
|
function OutcomeRow({ label, ok, detail, t }) {
|
|
8346
|
-
return /* @__PURE__ */
|
|
8347
|
-
/* @__PURE__ */
|
|
8348
|
-
/* @__PURE__ */
|
|
8349
|
-
ok ? /* @__PURE__ */
|
|
8350
|
-
/* @__PURE__ */
|
|
8351
|
-
detail ? /* @__PURE__ */
|
|
8455
|
+
return /* @__PURE__ */ jsxs73("li", { className: "ss-g-mp-row", "data-testid": "mp-row", "data-ok": String(ok), children: [
|
|
8456
|
+
/* @__PURE__ */ jsx85("span", { className: "ss-g-mp-row-k", children: label }),
|
|
8457
|
+
/* @__PURE__ */ jsxs73("span", { className: "ss-g-mp-row-v", children: [
|
|
8458
|
+
ok ? /* @__PURE__ */ jsx85(IconCheck, {}) : /* @__PURE__ */ jsx85(IconClose, { size: 14 }),
|
|
8459
|
+
/* @__PURE__ */ jsx85("span", { className: "ss-g-sr", children: ok ? t.correct : t.incorrect }),
|
|
8460
|
+
detail ? /* @__PURE__ */ jsx85("span", { className: "ss-g-mp-row-d", children: detail }) : null
|
|
8352
8461
|
] })
|
|
8353
8462
|
] });
|
|
8354
8463
|
}
|
|
@@ -8369,12 +8478,12 @@ function MatchdayPredictorGame({
|
|
|
8369
8478
|
const searchId = useId7();
|
|
8370
8479
|
const clientState = parseClientState7(result?.clientStateJson);
|
|
8371
8480
|
const alreadyPlayed = result?.alreadyPlayed === true;
|
|
8372
|
-
const header = /* @__PURE__ */
|
|
8481
|
+
const header = /* @__PURE__ */ jsx85(
|
|
8373
8482
|
GameHeader,
|
|
8374
8483
|
{
|
|
8375
8484
|
title: gameTitle({ gameId: "matchday-predictor" }, ui.games.titles),
|
|
8376
8485
|
eyebrow: config ? t.eyebrow(config.homeTeam.name, config.awayTeam.name) : void 0,
|
|
8377
|
-
right: config ? /* @__PURE__ */
|
|
8486
|
+
right: config ? /* @__PURE__ */ jsx85(Chip, { icon: /* @__PURE__ */ jsx85(IconLock, {}), children: ui.games.formatDayTime(config.kickoffUtc) }) : void 0,
|
|
8378
8487
|
onBack,
|
|
8379
8488
|
backLabel: ui.back
|
|
8380
8489
|
}
|
|
@@ -8382,10 +8491,10 @@ function MatchdayPredictorGame({
|
|
|
8382
8491
|
if (alreadyPlayed && clientState) {
|
|
8383
8492
|
if (!clientState.graded) {
|
|
8384
8493
|
const scorer = config?.scorerPool.find((p) => p.playerId === clientState.predictedFirstScorerPlayerId) ?? null;
|
|
8385
|
-
return /* @__PURE__ */
|
|
8494
|
+
return /* @__PURE__ */ jsxs73("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
8386
8495
|
header,
|
|
8387
|
-
/* @__PURE__ */
|
|
8388
|
-
config && /* @__PURE__ */
|
|
8496
|
+
/* @__PURE__ */ jsxs73("div", { className: "ss-g-body", children: [
|
|
8497
|
+
config && /* @__PURE__ */ jsx85(
|
|
8389
8498
|
ScoreCard,
|
|
8390
8499
|
{
|
|
8391
8500
|
home: config.homeTeam,
|
|
@@ -8395,7 +8504,7 @@ function MatchdayPredictorGame({
|
|
|
8395
8504
|
t
|
|
8396
8505
|
}
|
|
8397
8506
|
),
|
|
8398
|
-
/* @__PURE__ */
|
|
8507
|
+
/* @__PURE__ */ jsx85(
|
|
8399
8508
|
ResultCard,
|
|
8400
8509
|
{
|
|
8401
8510
|
tone: "neutral",
|
|
@@ -8412,28 +8521,28 @@ function MatchdayPredictorGame({
|
|
|
8412
8521
|
}
|
|
8413
8522
|
)
|
|
8414
8523
|
] }),
|
|
8415
|
-
/* @__PURE__ */
|
|
8524
|
+
/* @__PURE__ */ jsx85(FooterBar, { children: /* @__PURE__ */ jsx85("p", { className: "ss-g-mp-fun", children: t.forFun }) })
|
|
8416
8525
|
] });
|
|
8417
8526
|
}
|
|
8418
8527
|
const r = clientState.result;
|
|
8419
|
-
return /* @__PURE__ */
|
|
8528
|
+
return /* @__PURE__ */ jsxs73("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
8420
8529
|
header,
|
|
8421
|
-
/* @__PURE__ */
|
|
8422
|
-
config && /* @__PURE__ */
|
|
8423
|
-
/* @__PURE__ */
|
|
8424
|
-
/* @__PURE__ */
|
|
8425
|
-
/* @__PURE__ */
|
|
8426
|
-
/* @__PURE__ */
|
|
8427
|
-
!clientState.firstScorerVoid && /* @__PURE__ */
|
|
8530
|
+
/* @__PURE__ */ jsxs73("div", { className: "ss-g-body", children: [
|
|
8531
|
+
config && /* @__PURE__ */ jsx85(ScoreCard, { home: config.homeTeam, away: config.awayTeam, h: r.homeScore, a: r.awayScore, t }),
|
|
8532
|
+
/* @__PURE__ */ jsx85(ResultCard, { tone: "neutral", title: t.fullTime(r.homeScore, r.awayScore), onBack, ui }),
|
|
8533
|
+
/* @__PURE__ */ jsxs73("ul", { className: "ss-g-mp-rows", children: [
|
|
8534
|
+
/* @__PURE__ */ jsx85(OutcomeRow, { label: t.exactScore, ok: clientState.exactScoreCorrect, t }),
|
|
8535
|
+
/* @__PURE__ */ jsx85(OutcomeRow, { label: t.outcome, ok: clientState.outcomeCorrect, t }),
|
|
8536
|
+
!clientState.firstScorerVoid && /* @__PURE__ */ jsx85(OutcomeRow, { label: t.firstScorerRow, ok: clientState.firstScorerCorrect, detail: r.firstScorerName, t })
|
|
8428
8537
|
] })
|
|
8429
8538
|
] }),
|
|
8430
|
-
/* @__PURE__ */
|
|
8539
|
+
/* @__PURE__ */ jsx85(FooterBar, { children: /* @__PURE__ */ jsx85("p", { className: "ss-g-mp-fun", children: t.forFun }) })
|
|
8431
8540
|
] });
|
|
8432
8541
|
}
|
|
8433
8542
|
if (!config) {
|
|
8434
|
-
return /* @__PURE__ */
|
|
8543
|
+
return /* @__PURE__ */ jsxs73("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
8435
8544
|
header,
|
|
8436
|
-
/* @__PURE__ */
|
|
8545
|
+
/* @__PURE__ */ jsx85("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
8437
8546
|
] });
|
|
8438
8547
|
}
|
|
8439
8548
|
const locked = isLocked(config.kickoffUtc);
|
|
@@ -8457,10 +8566,10 @@ function MatchdayPredictorGame({
|
|
|
8457
8566
|
const showSearch = pool.length > SCORER_SEARCH_THRESHOLD;
|
|
8458
8567
|
const q = query.trim().toLowerCase();
|
|
8459
8568
|
const visible = showSearch && q ? pool.filter((p) => p.playerName.toLowerCase().includes(q)) : pool;
|
|
8460
|
-
return /* @__PURE__ */
|
|
8569
|
+
return /* @__PURE__ */ jsxs73("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
8461
8570
|
header,
|
|
8462
|
-
/* @__PURE__ */
|
|
8463
|
-
/* @__PURE__ */
|
|
8571
|
+
/* @__PURE__ */ jsxs73("div", { className: "ss-g-body", children: [
|
|
8572
|
+
/* @__PURE__ */ jsx85(
|
|
8464
8573
|
ScoreCard,
|
|
8465
8574
|
{
|
|
8466
8575
|
home: config.homeTeam,
|
|
@@ -8471,12 +8580,12 @@ function MatchdayPredictorGame({
|
|
|
8471
8580
|
edit: { disabled, active: lastEdited, onStep: step }
|
|
8472
8581
|
}
|
|
8473
8582
|
),
|
|
8474
|
-
pool.length > 0 && /* @__PURE__ */
|
|
8475
|
-
/* @__PURE__ */
|
|
8476
|
-
/* @__PURE__ */
|
|
8477
|
-
/* @__PURE__ */
|
|
8583
|
+
pool.length > 0 && /* @__PURE__ */ jsxs73("section", { className: "ss-g-mp-scorer", children: [
|
|
8584
|
+
/* @__PURE__ */ jsxs73("div", { className: "ss-g-mp-sec-head", children: [
|
|
8585
|
+
/* @__PURE__ */ jsx85("h3", { children: t.firstScorer }),
|
|
8586
|
+
/* @__PURE__ */ jsx85("span", { children: t.optional })
|
|
8478
8587
|
] }),
|
|
8479
|
-
showSearch && /* @__PURE__ */
|
|
8588
|
+
showSearch && /* @__PURE__ */ jsx85(
|
|
8480
8589
|
SearchField,
|
|
8481
8590
|
{
|
|
8482
8591
|
id: searchId,
|
|
@@ -8488,9 +8597,9 @@ function MatchdayPredictorGame({
|
|
|
8488
8597
|
disabled
|
|
8489
8598
|
}
|
|
8490
8599
|
),
|
|
8491
|
-
/* @__PURE__ */
|
|
8600
|
+
/* @__PURE__ */ jsx85("div", { className: "ss-g-mp-grid", children: visible.map((p) => {
|
|
8492
8601
|
const selected = firstScorerPlayerId === p.playerId;
|
|
8493
|
-
return /* @__PURE__ */
|
|
8602
|
+
return /* @__PURE__ */ jsxs73(
|
|
8494
8603
|
"button",
|
|
8495
8604
|
{
|
|
8496
8605
|
type: "button",
|
|
@@ -8500,15 +8609,15 @@ function MatchdayPredictorGame({
|
|
|
8500
8609
|
disabled,
|
|
8501
8610
|
onClick: () => setFirstScorerPlayerId((id) => id === p.playerId ? null : p.playerId),
|
|
8502
8611
|
children: [
|
|
8503
|
-
selected && /* @__PURE__ */
|
|
8504
|
-
/* @__PURE__ */
|
|
8505
|
-
/* @__PURE__ */
|
|
8612
|
+
selected && /* @__PURE__ */ jsx85("span", { className: "ss-g-mp-pcheck", children: /* @__PURE__ */ jsx85(IconCheck, { size: 12 }) }),
|
|
8613
|
+
/* @__PURE__ */ jsx85(Silhouette, { size: 52, variant: selected ? "selected" : "default" }),
|
|
8614
|
+
/* @__PURE__ */ jsx85("span", { className: "ss-g-mp-pname", children: splitName(p.playerName).last })
|
|
8506
8615
|
]
|
|
8507
8616
|
},
|
|
8508
8617
|
p.playerId
|
|
8509
8618
|
);
|
|
8510
8619
|
}) }),
|
|
8511
|
-
/* @__PURE__ */
|
|
8620
|
+
/* @__PURE__ */ jsxs73(
|
|
8512
8621
|
"button",
|
|
8513
8622
|
{
|
|
8514
8623
|
type: "button",
|
|
@@ -8517,24 +8626,24 @@ function MatchdayPredictorGame({
|
|
|
8517
8626
|
disabled,
|
|
8518
8627
|
onClick: () => setFirstScorerPlayerId(null),
|
|
8519
8628
|
children: [
|
|
8520
|
-
/* @__PURE__ */
|
|
8629
|
+
/* @__PURE__ */ jsx85("span", { className: "ss-g-mp-radio", "aria-hidden": "true" }),
|
|
8521
8630
|
t.noScorer
|
|
8522
8631
|
]
|
|
8523
8632
|
}
|
|
8524
8633
|
)
|
|
8525
8634
|
] }),
|
|
8526
|
-
locked && /* @__PURE__ */
|
|
8635
|
+
locked && /* @__PURE__ */ jsx85("p", { className: "ss-g-mp-closed", children: t.closed })
|
|
8527
8636
|
] }),
|
|
8528
|
-
/* @__PURE__ */
|
|
8529
|
-
/* @__PURE__ */
|
|
8530
|
-
/* @__PURE__ */
|
|
8637
|
+
/* @__PURE__ */ jsxs73(FooterBar, { children: [
|
|
8638
|
+
/* @__PURE__ */ jsx85(GameButton, { variant: "primary", block: true, disabled, onClick: handleSubmit, children: submitting ? t.saving : t.save }),
|
|
8639
|
+
/* @__PURE__ */ jsx85("p", { className: "ss-g-mp-fun", children: t.forFun })
|
|
8531
8640
|
] })
|
|
8532
8641
|
] });
|
|
8533
8642
|
}
|
|
8534
8643
|
|
|
8535
8644
|
// src/components/games/StartingXiGame.tsx
|
|
8536
8645
|
import { useId as useId8, useState as useState40 } from "react";
|
|
8537
|
-
import { Fragment as Fragment19, jsx as
|
|
8646
|
+
import { Fragment as Fragment19, jsx as jsx86, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
8538
8647
|
var POINTS_PER_STARTER = 8;
|
|
8539
8648
|
var XI_SIZE = 11;
|
|
8540
8649
|
var DEFAULT_FORMATION = "4-3-3";
|
|
@@ -8583,20 +8692,20 @@ function StartingXiGame({
|
|
|
8583
8692
|
const searchId = useId8();
|
|
8584
8693
|
const clientState = parseClientState8(result?.clientStateJson);
|
|
8585
8694
|
const alreadyPlayed = result?.alreadyPlayed === true;
|
|
8586
|
-
const header = /* @__PURE__ */
|
|
8695
|
+
const header = /* @__PURE__ */ jsx86(
|
|
8587
8696
|
GameHeader,
|
|
8588
8697
|
{
|
|
8589
8698
|
title: gameTitle({ gameId: "starting-xi" }, ui.games.titles),
|
|
8590
8699
|
eyebrow: t.eyebrow,
|
|
8591
|
-
right: /* @__PURE__ */
|
|
8700
|
+
right: /* @__PURE__ */ jsx86(Chip, { variant: "accent", children: t.perStarter(POINTS_PER_STARTER) }),
|
|
8592
8701
|
onBack,
|
|
8593
8702
|
backLabel: ui.back
|
|
8594
8703
|
}
|
|
8595
8704
|
);
|
|
8596
8705
|
function statusScreen(title, score) {
|
|
8597
|
-
return /* @__PURE__ */
|
|
8706
|
+
return /* @__PURE__ */ jsxs74("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
|
|
8598
8707
|
header,
|
|
8599
|
-
/* @__PURE__ */
|
|
8708
|
+
/* @__PURE__ */ jsx86("div", { className: "ss-g-body", children: /* @__PURE__ */ jsx86(ResultCard, { tone: "neutral", title, score, onBack, ui }) })
|
|
8600
8709
|
] });
|
|
8601
8710
|
}
|
|
8602
8711
|
if (alreadyPlayed) {
|
|
@@ -8605,9 +8714,9 @@ function StartingXiGame({
|
|
|
8605
8714
|
if (clientState.status === "graded") return statusScreen(t.gradedLine(clientState.correctCount), clientState.score);
|
|
8606
8715
|
}
|
|
8607
8716
|
if (!config) {
|
|
8608
|
-
return /* @__PURE__ */
|
|
8717
|
+
return /* @__PURE__ */ jsxs74("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
|
|
8609
8718
|
header,
|
|
8610
|
-
/* @__PURE__ */
|
|
8719
|
+
/* @__PURE__ */ jsx86("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
8611
8720
|
] });
|
|
8612
8721
|
}
|
|
8613
8722
|
const { formation, slots } = formationSlots(config.formation);
|
|
@@ -8642,27 +8751,27 @@ function StartingXiGame({
|
|
|
8642
8751
|
onSubmit(JSON.stringify({ predictedPlayerIds: slotPlayers }));
|
|
8643
8752
|
}
|
|
8644
8753
|
const segments = slotPlayers.map((p) => p !== null ? "current" : "todo");
|
|
8645
|
-
return /* @__PURE__ */
|
|
8754
|
+
return /* @__PURE__ */ jsxs74("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
|
|
8646
8755
|
header,
|
|
8647
|
-
/* @__PURE__ */
|
|
8756
|
+
/* @__PURE__ */ jsx86(
|
|
8648
8757
|
SegmentProgress,
|
|
8649
8758
|
{
|
|
8650
8759
|
segments,
|
|
8651
8760
|
ariaLabel: t.picked(pickedCount),
|
|
8652
8761
|
leftLabel: t.picked(pickedCount),
|
|
8653
8762
|
rightLabel: t.toGo(XI_SIZE - pickedCount),
|
|
8654
|
-
right: /* @__PURE__ */
|
|
8763
|
+
right: /* @__PURE__ */ jsx86(Chip, { children: formation })
|
|
8655
8764
|
}
|
|
8656
8765
|
),
|
|
8657
|
-
/* @__PURE__ */
|
|
8658
|
-
/* @__PURE__ */
|
|
8659
|
-
/* @__PURE__ */
|
|
8766
|
+
/* @__PURE__ */ jsxs74("div", { className: "ss-g-body", children: [
|
|
8767
|
+
/* @__PURE__ */ jsxs74("div", { className: "ss-g-xi-pitch", children: [
|
|
8768
|
+
/* @__PURE__ */ jsx86(PitchSvg, { variant: "half" }),
|
|
8660
8769
|
slots.map((s) => {
|
|
8661
8770
|
const playerId = slotPlayers[s.index] ?? null;
|
|
8662
8771
|
const player = playerId !== null ? byId.get(playerId) ?? null : null;
|
|
8663
8772
|
const name = player?.playerName ?? "";
|
|
8664
8773
|
const state = player ? "filled" : active === s.index ? "active" : "empty";
|
|
8665
|
-
return /* @__PURE__ */
|
|
8774
|
+
return /* @__PURE__ */ jsxs74(
|
|
8666
8775
|
"button",
|
|
8667
8776
|
{
|
|
8668
8777
|
type: "button",
|
|
@@ -8674,21 +8783,21 @@ function StartingXiGame({
|
|
|
8674
8783
|
disabled: submitting,
|
|
8675
8784
|
onClick: () => tapSlot(s.index),
|
|
8676
8785
|
children: [
|
|
8677
|
-
/* @__PURE__ */
|
|
8678
|
-
/* @__PURE__ */
|
|
8786
|
+
/* @__PURE__ */ jsx86("span", { className: "ss-g-xi-ring", "aria-hidden": "true", children: player ? player.jerseyNumber ?? "" : /* @__PURE__ */ jsx86(IconPlus, { size: 18 }) }),
|
|
8787
|
+
/* @__PURE__ */ jsx86("span", { className: "ss-g-xi-tag", "aria-hidden": "true", children: player ? splitName(name).last : s.label })
|
|
8679
8788
|
]
|
|
8680
8789
|
},
|
|
8681
8790
|
s.index
|
|
8682
8791
|
);
|
|
8683
8792
|
})
|
|
8684
8793
|
] }),
|
|
8685
|
-
/* @__PURE__ */
|
|
8686
|
-
/* @__PURE__ */
|
|
8687
|
-
/* @__PURE__ */
|
|
8688
|
-
/* @__PURE__ */
|
|
8689
|
-
] }) : /* @__PURE__ */
|
|
8690
|
-
activeSlot && /* @__PURE__ */
|
|
8691
|
-
/* @__PURE__ */
|
|
8794
|
+
/* @__PURE__ */ jsxs74("div", { className: "ss-g-xi-picker", children: [
|
|
8795
|
+
/* @__PURE__ */ jsx86("div", { className: "ss-g-xi-picker-head", children: activeSlot ? /* @__PURE__ */ jsxs74(Fragment19, { children: [
|
|
8796
|
+
/* @__PURE__ */ jsx86(Chip, { variant: "badge", children: activeSlot.label }),
|
|
8797
|
+
/* @__PURE__ */ jsx86("strong", { children: t.pickFor(activeSlot.label) })
|
|
8798
|
+
] }) : /* @__PURE__ */ jsx86("strong", { children: t.allPicked }) }),
|
|
8799
|
+
activeSlot && /* @__PURE__ */ jsxs74(Fragment19, { children: [
|
|
8800
|
+
/* @__PURE__ */ jsx86(
|
|
8692
8801
|
SearchField,
|
|
8693
8802
|
{
|
|
8694
8803
|
id: searchId,
|
|
@@ -8700,18 +8809,18 @@ function StartingXiGame({
|
|
|
8700
8809
|
disabled: submitting
|
|
8701
8810
|
}
|
|
8702
8811
|
),
|
|
8703
|
-
/* @__PURE__ */
|
|
8704
|
-
/* @__PURE__ */
|
|
8705
|
-
/* @__PURE__ */
|
|
8706
|
-
/* @__PURE__ */
|
|
8812
|
+
/* @__PURE__ */ jsx86("ul", { className: "ss-g-xi-list", children: available.map((p) => /* @__PURE__ */ jsx86("li", { children: /* @__PURE__ */ jsxs74("button", { type: "button", className: "ss-g-xi-opt", disabled: submitting, onClick: () => pick(p.playerId), children: [
|
|
8813
|
+
/* @__PURE__ */ jsx86("span", { className: "ss-g-xi-opt-no", "aria-hidden": "true", children: p.jerseyNumber ?? "" }),
|
|
8814
|
+
/* @__PURE__ */ jsx86("span", { className: "ss-g-xi-opt-name", children: p.playerName }),
|
|
8815
|
+
/* @__PURE__ */ jsx86("span", { className: "ss-g-xi-opt-pos", children: p.positionName })
|
|
8707
8816
|
] }) }, p.playerId)) })
|
|
8708
8817
|
] })
|
|
8709
8818
|
] })
|
|
8710
8819
|
] }),
|
|
8711
|
-
/* @__PURE__ */
|
|
8712
|
-
/* @__PURE__ */
|
|
8713
|
-
/* @__PURE__ */
|
|
8714
|
-
/* @__PURE__ */
|
|
8820
|
+
/* @__PURE__ */ jsxs74(FooterBar, { children: [
|
|
8821
|
+
/* @__PURE__ */ jsx86(GameButton, { variant: "primary", block: true, disabled: !canSubmit, onClick: handleSubmit, children: submitting ? t.submitting : t.submit }),
|
|
8822
|
+
/* @__PURE__ */ jsxs74("p", { className: "ss-g-xi-lock", children: [
|
|
8823
|
+
/* @__PURE__ */ jsx86(IconLock, {}),
|
|
8715
8824
|
lockAtUtc ? t.locksAt(ui.games.formatDayTime(lockAtUtc)) : t.locksSoon
|
|
8716
8825
|
] })
|
|
8717
8826
|
] })
|
|
@@ -8720,7 +8829,7 @@ function StartingXiGame({
|
|
|
8720
8829
|
|
|
8721
8830
|
// src/components/games/StatLadderGame.tsx
|
|
8722
8831
|
import { useId as useId9, useState as useState41 } from "react";
|
|
8723
|
-
import { jsx as
|
|
8832
|
+
import { jsx as jsx87, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
8724
8833
|
function ladderClue(ladder) {
|
|
8725
8834
|
const mystery = ladder.find((r) => r.rank === 2);
|
|
8726
8835
|
if (!mystery) return null;
|
|
@@ -8742,9 +8851,9 @@ function parseClientState9(json) {
|
|
|
8742
8851
|
}
|
|
8743
8852
|
function NameStack({ name }) {
|
|
8744
8853
|
const { first, last } = splitName(name);
|
|
8745
|
-
return /* @__PURE__ */
|
|
8746
|
-
first && /* @__PURE__ */
|
|
8747
|
-
/* @__PURE__ */
|
|
8854
|
+
return /* @__PURE__ */ jsxs75("span", { className: "ss-g-sl-name", children: [
|
|
8855
|
+
first && /* @__PURE__ */ jsx87("small", { children: `${first[0]}.` }),
|
|
8856
|
+
/* @__PURE__ */ jsx87("b", { children: last })
|
|
8748
8857
|
] });
|
|
8749
8858
|
}
|
|
8750
8859
|
function StatLadderGame({
|
|
@@ -8761,11 +8870,11 @@ function StatLadderGame({
|
|
|
8761
8870
|
const searchId = useId9();
|
|
8762
8871
|
const clientState = parseClientState9(result?.clientStateJson);
|
|
8763
8872
|
const revealed = clientState != null;
|
|
8764
|
-
const header = /* @__PURE__ */
|
|
8873
|
+
const header = /* @__PURE__ */ jsx87(GameHeader, { title: gameTitle({ gameId: "stat-ladder" }, ui.games.titles), eyebrow: t.eyebrow, onBack, backLabel: ui.back });
|
|
8765
8874
|
if (!config) {
|
|
8766
|
-
return /* @__PURE__ */
|
|
8875
|
+
return /* @__PURE__ */ jsxs75("div", { className: "ss-g-screen", "data-game": "stat-ladder", "data-testid": "game-screen-stat-ladder", children: [
|
|
8767
8876
|
header,
|
|
8768
|
-
/* @__PURE__ */
|
|
8877
|
+
/* @__PURE__ */ jsx87("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
8769
8878
|
] });
|
|
8770
8879
|
}
|
|
8771
8880
|
const question = t.question(config.statLabel);
|
|
@@ -8777,45 +8886,45 @@ function StatLadderGame({
|
|
|
8777
8886
|
if (selectedId === null || submitting || revealed) return;
|
|
8778
8887
|
onSubmit(JSON.stringify({ guessedPlayerId: selectedId }));
|
|
8779
8888
|
}
|
|
8780
|
-
return /* @__PURE__ */
|
|
8889
|
+
return /* @__PURE__ */ jsxs75("div", { className: "ss-g-screen", "data-game": "stat-ladder", "data-testid": "game-screen-stat-ladder", children: [
|
|
8781
8890
|
header,
|
|
8782
|
-
/* @__PURE__ */
|
|
8783
|
-
!revealed && /* @__PURE__ */
|
|
8784
|
-
/* @__PURE__ */
|
|
8785
|
-
/* @__PURE__ */
|
|
8786
|
-
/* @__PURE__ */
|
|
8891
|
+
/* @__PURE__ */ jsxs75("div", { className: "ss-g-body", children: [
|
|
8892
|
+
!revealed && /* @__PURE__ */ jsx87(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: 0, ui }),
|
|
8893
|
+
/* @__PURE__ */ jsxs75("div", { className: "ss-g-sl-prompt", children: [
|
|
8894
|
+
/* @__PURE__ */ jsx87(Chip, { variant: "accent", icon: /* @__PURE__ */ jsx87(IconShield, { size: 14 }), className: "ss-g-sl-stat", children: config.statLabel }),
|
|
8895
|
+
/* @__PURE__ */ jsxs75("h3", { className: "ss-g-sl-q", children: [
|
|
8787
8896
|
question.pre,
|
|
8788
|
-
/* @__PURE__ */
|
|
8897
|
+
/* @__PURE__ */ jsx87("em", { children: question.emph }),
|
|
8789
8898
|
question.post
|
|
8790
8899
|
] })
|
|
8791
8900
|
] }),
|
|
8792
|
-
/* @__PURE__ */
|
|
8793
|
-
(rung) => rung.rank === 2 ? /* @__PURE__ */
|
|
8901
|
+
/* @__PURE__ */ jsx87("ol", { className: "ss-g-sl-rungs", children: rungs.map(
|
|
8902
|
+
(rung) => rung.rank === 2 ? /* @__PURE__ */ jsxs75(
|
|
8794
8903
|
"li",
|
|
8795
8904
|
{
|
|
8796
8905
|
className: "ss-g-sl-rung ss-g-sl-rung--mystery",
|
|
8797
8906
|
"data-testid": "sl-mystery-rung",
|
|
8798
8907
|
"data-result": revealed ? clientState.isCorrect ? "correct" : "wrong" : void 0,
|
|
8799
8908
|
children: [
|
|
8800
|
-
/* @__PURE__ */
|
|
8801
|
-
revealed ? /* @__PURE__ */
|
|
8802
|
-
revealed ? /* @__PURE__ */
|
|
8803
|
-
/* @__PURE__ */
|
|
8909
|
+
/* @__PURE__ */ jsx87("span", { className: "ss-g-sl-rank", children: "2" }),
|
|
8910
|
+
revealed ? /* @__PURE__ */ jsx87(PlayerAvatar, { name: clientState.revealedRank2.playerName, className: "ss-g-sl-av" }) : /* @__PURE__ */ jsx87(Silhouette, { size: 52, variant: "mystery" }),
|
|
8911
|
+
revealed ? /* @__PURE__ */ jsx87(NameStack, { name: clientState.revealedRank2.playerName }) : /* @__PURE__ */ jsx87("span", { className: "ss-g-sl-who", children: t.whoSecond }),
|
|
8912
|
+
/* @__PURE__ */ jsx87("span", { className: "ss-g-sl-val ss-g-sl-val--mystery", children: rung.statValue })
|
|
8804
8913
|
]
|
|
8805
8914
|
},
|
|
8806
8915
|
rung.rank
|
|
8807
|
-
) : /* @__PURE__ */
|
|
8808
|
-
/* @__PURE__ */
|
|
8809
|
-
/* @__PURE__ */
|
|
8810
|
-
/* @__PURE__ */
|
|
8811
|
-
/* @__PURE__ */
|
|
8916
|
+
) : /* @__PURE__ */ jsxs75("li", { className: "ss-g-sl-rung", children: [
|
|
8917
|
+
/* @__PURE__ */ jsx87("span", { className: "ss-g-sl-rank", children: rung.rank }),
|
|
8918
|
+
/* @__PURE__ */ jsx87(PlayerAvatar, { name: rung.playerName ?? "?", className: "ss-g-sl-av" }),
|
|
8919
|
+
/* @__PURE__ */ jsx87(NameStack, { name: rung.playerName ?? "?" }),
|
|
8920
|
+
/* @__PURE__ */ jsx87("span", { className: "ss-g-sl-val", children: rung.statValue })
|
|
8812
8921
|
] }, rung.rank)
|
|
8813
8922
|
) }),
|
|
8814
|
-
clue && /* @__PURE__ */
|
|
8815
|
-
/* @__PURE__ */
|
|
8816
|
-
/* @__PURE__ */
|
|
8923
|
+
clue && /* @__PURE__ */ jsxs75("p", { className: "ss-g-sl-clue", children: [
|
|
8924
|
+
/* @__PURE__ */ jsx87(IconBulb, {}),
|
|
8925
|
+
/* @__PURE__ */ jsx87("span", { children: t.clue(clue, config.statLabel) })
|
|
8817
8926
|
] }),
|
|
8818
|
-
!revealed && /* @__PURE__ */
|
|
8927
|
+
!revealed && /* @__PURE__ */ jsx87("ul", { className: "ss-g-sl-pool", children: pool.map((p) => /* @__PURE__ */ jsx87("li", { children: /* @__PURE__ */ jsxs75(
|
|
8819
8928
|
"button",
|
|
8820
8929
|
{
|
|
8821
8930
|
type: "button",
|
|
@@ -8828,13 +8937,13 @@ function StatLadderGame({
|
|
|
8828
8937
|
setQuery(p.playerName);
|
|
8829
8938
|
},
|
|
8830
8939
|
children: [
|
|
8831
|
-
/* @__PURE__ */
|
|
8832
|
-
/* @__PURE__ */
|
|
8833
|
-
selectedId === p.playerId && /* @__PURE__ */
|
|
8940
|
+
/* @__PURE__ */ jsx87(PlayerAvatar, { name: p.playerName, className: "ss-g-sl-opt-av" }),
|
|
8941
|
+
/* @__PURE__ */ jsx87("span", { className: "ss-g-sl-opt-name", children: p.playerName }),
|
|
8942
|
+
selectedId === p.playerId && /* @__PURE__ */ jsx87(IconCheck, {})
|
|
8834
8943
|
]
|
|
8835
8944
|
}
|
|
8836
8945
|
) }, p.playerId)) }),
|
|
8837
|
-
revealed && /* @__PURE__ */
|
|
8946
|
+
revealed && /* @__PURE__ */ jsx87(
|
|
8838
8947
|
ResultCard,
|
|
8839
8948
|
{
|
|
8840
8949
|
tone: clientState.isCorrect ? "win" : "lose",
|
|
@@ -8845,8 +8954,8 @@ function StatLadderGame({
|
|
|
8845
8954
|
}
|
|
8846
8955
|
)
|
|
8847
8956
|
] }),
|
|
8848
|
-
!revealed && /* @__PURE__ */
|
|
8849
|
-
/* @__PURE__ */
|
|
8957
|
+
!revealed && /* @__PURE__ */ jsx87(FooterBar, { children: /* @__PURE__ */ jsxs75("div", { className: "ss-g-sl-guess", children: [
|
|
8958
|
+
/* @__PURE__ */ jsx87(
|
|
8850
8959
|
SearchField,
|
|
8851
8960
|
{
|
|
8852
8961
|
id: searchId,
|
|
@@ -8861,13 +8970,13 @@ function StatLadderGame({
|
|
|
8861
8970
|
disabled: submitting
|
|
8862
8971
|
}
|
|
8863
8972
|
),
|
|
8864
|
-
/* @__PURE__ */
|
|
8973
|
+
/* @__PURE__ */ jsx87(GameButton, { variant: "primary", disabled: selectedId === null || submitting, onClick: guess, children: t.guess })
|
|
8865
8974
|
] }) })
|
|
8866
8975
|
] });
|
|
8867
8976
|
}
|
|
8868
8977
|
|
|
8869
8978
|
// src/components/games/FanMotmGame.tsx
|
|
8870
|
-
import { jsx as
|
|
8979
|
+
import { jsx as jsx88, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
8871
8980
|
function parseClientState10(json) {
|
|
8872
8981
|
if (!json) return null;
|
|
8873
8982
|
try {
|
|
@@ -8888,20 +8997,20 @@ function FanMotmGame({
|
|
|
8888
8997
|
const clientState = parseClientState10(result?.clientStateJson);
|
|
8889
8998
|
const alreadyVoted = result?.alreadyPlayed === true;
|
|
8890
8999
|
const pickedId = clientState?.pickedPlayerId ?? null;
|
|
8891
|
-
const header = /* @__PURE__ */
|
|
9000
|
+
const header = /* @__PURE__ */ jsx88(
|
|
8892
9001
|
GameHeader,
|
|
8893
9002
|
{
|
|
8894
9003
|
title: t.title,
|
|
8895
9004
|
eyebrow: t.eyebrow,
|
|
8896
|
-
right: alreadyVoted ? /* @__PURE__ */
|
|
9005
|
+
right: alreadyVoted ? /* @__PURE__ */ jsx88(Chip, { variant: "success", icon: /* @__PURE__ */ jsx88(IconCheck, {}), children: t.voted }) : void 0,
|
|
8897
9006
|
onBack,
|
|
8898
9007
|
backLabel: ui.back
|
|
8899
9008
|
}
|
|
8900
9009
|
);
|
|
8901
9010
|
if (!config) {
|
|
8902
|
-
return /* @__PURE__ */
|
|
9011
|
+
return /* @__PURE__ */ jsxs76("div", { className: "ss-g-screen", "data-game": "fan-motm", "data-testid": "game-screen-fan-motm", children: [
|
|
8903
9012
|
header,
|
|
8904
|
-
/* @__PURE__ */
|
|
9013
|
+
/* @__PURE__ */ jsx88("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
8905
9014
|
] });
|
|
8906
9015
|
}
|
|
8907
9016
|
const picked = config.candidates.find((c) => c.playerId === pickedId) ?? null;
|
|
@@ -8909,12 +9018,12 @@ function FanMotmGame({
|
|
|
8909
9018
|
if (alreadyVoted || submitting) return;
|
|
8910
9019
|
onSubmit(JSON.stringify({ pickedPlayerId: candidateId }));
|
|
8911
9020
|
}
|
|
8912
|
-
return /* @__PURE__ */
|
|
9021
|
+
return /* @__PURE__ */ jsxs76("div", { className: "ss-g-screen", "data-game": "fan-motm", "data-testid": "game-screen-fan-motm", children: [
|
|
8913
9022
|
header,
|
|
8914
|
-
/* @__PURE__ */
|
|
8915
|
-
/* @__PURE__ */
|
|
9023
|
+
/* @__PURE__ */ jsxs76("div", { className: "ss-g-body", children: [
|
|
9024
|
+
/* @__PURE__ */ jsx88("ul", { className: "ss-g-motm-list", children: config.candidates.map((c) => {
|
|
8916
9025
|
const isVoted = alreadyVoted && pickedId === c.playerId;
|
|
8917
|
-
return /* @__PURE__ */
|
|
9026
|
+
return /* @__PURE__ */ jsx88("li", { children: /* @__PURE__ */ jsxs76(
|
|
8918
9027
|
"button",
|
|
8919
9028
|
{
|
|
8920
9029
|
type: "button",
|
|
@@ -8923,24 +9032,24 @@ function FanMotmGame({
|
|
|
8923
9032
|
disabled: alreadyVoted || submitting,
|
|
8924
9033
|
onClick: () => handleVote(c.playerId),
|
|
8925
9034
|
children: [
|
|
8926
|
-
/* @__PURE__ */
|
|
8927
|
-
/* @__PURE__ */
|
|
8928
|
-
isVoted && /* @__PURE__ */
|
|
9035
|
+
/* @__PURE__ */ jsx88(PlayerAvatar, { name: c.playerName, className: "ss-g-motm-av" }),
|
|
9036
|
+
/* @__PURE__ */ jsx88("span", { className: "ss-g-motm-name", children: c.playerName }),
|
|
9037
|
+
isVoted && /* @__PURE__ */ jsx88(Chip, { variant: "accent", className: "ss-g-motm-pill", children: t.yourVote })
|
|
8929
9038
|
]
|
|
8930
9039
|
}
|
|
8931
9040
|
) }, c.playerId);
|
|
8932
9041
|
}) }),
|
|
8933
|
-
alreadyVoted && picked && /* @__PURE__ */
|
|
9042
|
+
alreadyVoted && picked && /* @__PURE__ */ jsx88(ResultCard, { tone: "neutral", title: t.youVoted(picked.playerName), detail: t.thanks, onBack, ui })
|
|
8934
9043
|
] }),
|
|
8935
|
-
/* @__PURE__ */
|
|
8936
|
-
!alreadyVoted && /* @__PURE__ */
|
|
8937
|
-
/* @__PURE__ */
|
|
9044
|
+
/* @__PURE__ */ jsxs76(FooterBar, { children: [
|
|
9045
|
+
!alreadyVoted && /* @__PURE__ */ jsx88("p", { className: "ss-g-motm-foot", children: t.tapToVote }),
|
|
9046
|
+
/* @__PURE__ */ jsx88("p", { className: "ss-g-motm-fun", children: t.forFun })
|
|
8938
9047
|
] })
|
|
8939
9048
|
] });
|
|
8940
9049
|
}
|
|
8941
9050
|
|
|
8942
9051
|
// src/components/GameScreenHost.tsx
|
|
8943
|
-
import { jsx as
|
|
9052
|
+
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
8944
9053
|
var FIXTURE_GAME_IDS = /* @__PURE__ */ new Set([
|
|
8945
9054
|
"matchday-predictor",
|
|
8946
9055
|
"starting-xi",
|
|
@@ -9016,7 +9125,7 @@ function GameScreenHost({
|
|
|
9016
9125
|
function renderScreen() {
|
|
9017
9126
|
switch (gameId) {
|
|
9018
9127
|
case "mystery-tiger":
|
|
9019
|
-
return /* @__PURE__ */
|
|
9128
|
+
return /* @__PURE__ */ jsx89(
|
|
9020
9129
|
MysteryTigerGame,
|
|
9021
9130
|
{
|
|
9022
9131
|
...sharedProps,
|
|
@@ -9024,7 +9133,7 @@ function GameScreenHost({
|
|
|
9024
9133
|
}
|
|
9025
9134
|
);
|
|
9026
9135
|
case "higher-or-lower":
|
|
9027
|
-
return /* @__PURE__ */
|
|
9136
|
+
return /* @__PURE__ */ jsx89(
|
|
9028
9137
|
HigherOrLowerGame,
|
|
9029
9138
|
{
|
|
9030
9139
|
...sharedProps,
|
|
@@ -9032,7 +9141,7 @@ function GameScreenHost({
|
|
|
9032
9141
|
}
|
|
9033
9142
|
);
|
|
9034
9143
|
case "career-path":
|
|
9035
|
-
return /* @__PURE__ */
|
|
9144
|
+
return /* @__PURE__ */ jsx89(
|
|
9036
9145
|
CareerPathGame,
|
|
9037
9146
|
{
|
|
9038
9147
|
...sharedProps,
|
|
@@ -9041,7 +9150,7 @@ function GameScreenHost({
|
|
|
9041
9150
|
);
|
|
9042
9151
|
case "beat-the-grid": {
|
|
9043
9152
|
const btgConfig = safeParseConfig(configJson);
|
|
9044
|
-
return /* @__PURE__ */
|
|
9153
|
+
return /* @__PURE__ */ jsx89(
|
|
9045
9154
|
BeatTheGridGame,
|
|
9046
9155
|
{
|
|
9047
9156
|
...sharedProps,
|
|
@@ -9051,7 +9160,7 @@ function GameScreenHost({
|
|
|
9051
9160
|
);
|
|
9052
9161
|
}
|
|
9053
9162
|
case "guess-the-xi":
|
|
9054
|
-
return /* @__PURE__ */
|
|
9163
|
+
return /* @__PURE__ */ jsx89(
|
|
9055
9164
|
GuessTheXiGame,
|
|
9056
9165
|
{
|
|
9057
9166
|
...sharedProps,
|
|
@@ -9059,7 +9168,7 @@ function GameScreenHost({
|
|
|
9059
9168
|
}
|
|
9060
9169
|
);
|
|
9061
9170
|
case "daily-quiz":
|
|
9062
|
-
return /* @__PURE__ */
|
|
9171
|
+
return /* @__PURE__ */ jsx89(
|
|
9063
9172
|
DailyQuizGame,
|
|
9064
9173
|
{
|
|
9065
9174
|
...sharedProps,
|
|
@@ -9067,7 +9176,7 @@ function GameScreenHost({
|
|
|
9067
9176
|
}
|
|
9068
9177
|
);
|
|
9069
9178
|
case "matchday-predictor":
|
|
9070
|
-
return /* @__PURE__ */
|
|
9179
|
+
return /* @__PURE__ */ jsx89(
|
|
9071
9180
|
MatchdayPredictorGame,
|
|
9072
9181
|
{
|
|
9073
9182
|
...sharedProps,
|
|
@@ -9075,7 +9184,7 @@ function GameScreenHost({
|
|
|
9075
9184
|
}
|
|
9076
9185
|
);
|
|
9077
9186
|
case "starting-xi":
|
|
9078
|
-
return /* @__PURE__ */
|
|
9187
|
+
return /* @__PURE__ */ jsx89(
|
|
9079
9188
|
StartingXiGame,
|
|
9080
9189
|
{
|
|
9081
9190
|
...sharedProps,
|
|
@@ -9083,7 +9192,7 @@ function GameScreenHost({
|
|
|
9083
9192
|
}
|
|
9084
9193
|
);
|
|
9085
9194
|
case "stat-ladder":
|
|
9086
|
-
return /* @__PURE__ */
|
|
9195
|
+
return /* @__PURE__ */ jsx89(
|
|
9087
9196
|
StatLadderGame,
|
|
9088
9197
|
{
|
|
9089
9198
|
...sharedProps,
|
|
@@ -9091,7 +9200,7 @@ function GameScreenHost({
|
|
|
9091
9200
|
}
|
|
9092
9201
|
);
|
|
9093
9202
|
case "fan-motm":
|
|
9094
|
-
return /* @__PURE__ */
|
|
9203
|
+
return /* @__PURE__ */ jsx89(
|
|
9095
9204
|
FanMotmGame,
|
|
9096
9205
|
{
|
|
9097
9206
|
...sharedProps,
|
|
@@ -9099,10 +9208,10 @@ function GameScreenHost({
|
|
|
9099
9208
|
}
|
|
9100
9209
|
);
|
|
9101
9210
|
default:
|
|
9102
|
-
return /* @__PURE__ */
|
|
9211
|
+
return /* @__PURE__ */ jsx89("div", { className: "ss-g-screen", "data-testid": `game-screen-${gameId}`, children: /* @__PURE__ */ jsx89(GameHeader, { title: gameTitle({ gameId }, ui.games.titles), onBack, backLabel: ui.back }) });
|
|
9103
9212
|
}
|
|
9104
9213
|
}
|
|
9105
|
-
return /* @__PURE__ */
|
|
9214
|
+
return /* @__PURE__ */ jsx89("div", { className: "ss-w-gscreen", "data-testid": "gscreen", "data-lock-at": lockAtUtc ?? void 0, children: renderScreen() });
|
|
9106
9215
|
}
|
|
9107
9216
|
|
|
9108
9217
|
// src/components/games/ui/fonts.ts
|
|
@@ -9119,7 +9228,7 @@ function ensureGamesFonts(doc = document) {
|
|
|
9119
9228
|
}
|
|
9120
9229
|
|
|
9121
9230
|
// src/components/GamesPanel.tsx
|
|
9122
|
-
import { jsx as
|
|
9231
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
9123
9232
|
function GamesPanel({
|
|
9124
9233
|
loggedIn,
|
|
9125
9234
|
games,
|
|
@@ -9132,9 +9241,9 @@ function GamesPanel({
|
|
|
9132
9241
|
useEffect25(() => {
|
|
9133
9242
|
ensureGamesFonts();
|
|
9134
9243
|
}, []);
|
|
9135
|
-
if (!loggedIn) return /* @__PURE__ */
|
|
9244
|
+
if (!loggedIn) return /* @__PURE__ */ jsx90(GamesLoginWall, { ui });
|
|
9136
9245
|
if (selected !== null) {
|
|
9137
|
-
return /* @__PURE__ */
|
|
9246
|
+
return /* @__PURE__ */ jsx90("div", { className: "ss-w-gscreen-wrap", lang: ui.games.lang, children: /* @__PURE__ */ jsx90(
|
|
9138
9247
|
GameScreenHost,
|
|
9139
9248
|
{
|
|
9140
9249
|
selected,
|
|
@@ -9148,7 +9257,7 @@ function GamesPanel({
|
|
|
9148
9257
|
}
|
|
9149
9258
|
) });
|
|
9150
9259
|
}
|
|
9151
|
-
return /* @__PURE__ */
|
|
9260
|
+
return /* @__PURE__ */ jsx90("div", { className: "ss-g-hub-wrap", "data-testid": "games-hub", lang: ui.games.lang, children: /* @__PURE__ */ jsx90(
|
|
9152
9261
|
GamesHub,
|
|
9153
9262
|
{
|
|
9154
9263
|
games,
|
|
@@ -9163,7 +9272,7 @@ function GamesPanel({
|
|
|
9163
9272
|
import { useState as useState44 } from "react";
|
|
9164
9273
|
|
|
9165
9274
|
// src/components/LeaderboardRow.tsx
|
|
9166
|
-
import { jsx as
|
|
9275
|
+
import { jsx as jsx91, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
9167
9276
|
function formatPoints(n) {
|
|
9168
9277
|
return n.toLocaleString("en");
|
|
9169
9278
|
}
|
|
@@ -9172,14 +9281,14 @@ function LeaderboardWeeklyRow({
|
|
|
9172
9281
|
isMe
|
|
9173
9282
|
}) {
|
|
9174
9283
|
const rankClass = `ss-w-lb2-rank${row.rank <= 3 ? " ss-w-lb2-rank--top3" : ""}`;
|
|
9175
|
-
return /* @__PURE__ */
|
|
9176
|
-
/* @__PURE__ */
|
|
9284
|
+
return /* @__PURE__ */ jsxs77("div", { className: `ss-w-lb2-row${isMe ? " ss-w-lb2-row--you" : ""}`, children: [
|
|
9285
|
+
/* @__PURE__ */ jsxs77("span", { className: rankClass, children: [
|
|
9177
9286
|
"#",
|
|
9178
9287
|
row.rank
|
|
9179
9288
|
] }),
|
|
9180
|
-
/* @__PURE__ */
|
|
9181
|
-
/* @__PURE__ */
|
|
9182
|
-
row.currentStreak > 0 && /* @__PURE__ */
|
|
9289
|
+
/* @__PURE__ */ jsx91("span", { className: "ss-w-lb2-handle", children: row.handle }),
|
|
9290
|
+
/* @__PURE__ */ jsx91("span", { className: "ss-w-lb2-points", children: formatPoints(row.points) }),
|
|
9291
|
+
row.currentStreak > 0 && /* @__PURE__ */ jsxs77("span", { className: "ss-w-lb2-streak", children: [
|
|
9183
9292
|
"\u{1F525} ",
|
|
9184
9293
|
row.currentStreak
|
|
9185
9294
|
] })
|
|
@@ -9190,18 +9299,18 @@ function LeaderboardAllTimeRow({
|
|
|
9190
9299
|
isMe
|
|
9191
9300
|
}) {
|
|
9192
9301
|
const rankClass = `ss-w-lb2-rank${row.rank <= 3 ? " ss-w-lb2-rank--top3" : ""}`;
|
|
9193
|
-
return /* @__PURE__ */
|
|
9194
|
-
/* @__PURE__ */
|
|
9302
|
+
return /* @__PURE__ */ jsxs77("div", { className: `ss-w-lb2-row${isMe ? " ss-w-lb2-row--you" : ""}`, children: [
|
|
9303
|
+
/* @__PURE__ */ jsxs77("span", { className: rankClass, children: [
|
|
9195
9304
|
"#",
|
|
9196
9305
|
row.rank
|
|
9197
9306
|
] }),
|
|
9198
|
-
/* @__PURE__ */
|
|
9199
|
-
/* @__PURE__ */
|
|
9307
|
+
/* @__PURE__ */ jsx91("span", { className: "ss-w-lb2-handle", children: row.handle }),
|
|
9308
|
+
/* @__PURE__ */ jsx91("span", { className: "ss-w-lb2-points", children: formatPoints(row.allTimePoints) })
|
|
9200
9309
|
] });
|
|
9201
9310
|
}
|
|
9202
9311
|
|
|
9203
9312
|
// src/components/LeaderboardEmpty.tsx
|
|
9204
|
-
import { jsx as
|
|
9313
|
+
import { jsx as jsx92, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
9205
9314
|
function LeaderboardEmpty({
|
|
9206
9315
|
segment,
|
|
9207
9316
|
lastWeek,
|
|
@@ -9210,36 +9319,36 @@ function LeaderboardEmpty({
|
|
|
9210
9319
|
ui
|
|
9211
9320
|
}) {
|
|
9212
9321
|
if (segment === "alltime") {
|
|
9213
|
-
return /* @__PURE__ */
|
|
9214
|
-
/* @__PURE__ */
|
|
9215
|
-
/* @__PURE__ */
|
|
9322
|
+
return /* @__PURE__ */ jsxs78("div", { className: "ss-w-lb-empty ss-w-lb-empty--alltime", children: [
|
|
9323
|
+
/* @__PURE__ */ jsx92("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: "\u{1F4CA}" }),
|
|
9324
|
+
/* @__PURE__ */ jsx92("p", { className: "ss-w-lb-empty-body", children: ui.leaderboardAllTimeEmpty })
|
|
9216
9325
|
] });
|
|
9217
9326
|
}
|
|
9218
9327
|
const fresh = lastWeek != null;
|
|
9219
9328
|
const title = fresh ? ui.leaderboardEmptyFreshTitle : ui.leaderboardEmptyColdTitle;
|
|
9220
9329
|
const body = fresh ? ui.leaderboardEmptyFreshBody : ui.leaderboardEmptyColdBody;
|
|
9221
|
-
return /* @__PURE__ */
|
|
9222
|
-
weeklyPrize && /* @__PURE__ */
|
|
9223
|
-
/* @__PURE__ */
|
|
9224
|
-
/* @__PURE__ */
|
|
9330
|
+
return /* @__PURE__ */ jsxs78("div", { className: "ss-w-lb-empty", children: [
|
|
9331
|
+
weeklyPrize && /* @__PURE__ */ jsxs78("div", { className: "ss-w-prize", children: [
|
|
9332
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-w-prize-icon", "aria-hidden": "true", children: "\u{1F3C6}" }),
|
|
9333
|
+
/* @__PURE__ */ jsx92("div", { className: "ss-w-prize-body", children: /* @__PURE__ */ jsx92("span", { className: "ss-w-prize-text", children: weeklyPrize }) })
|
|
9225
9334
|
] }),
|
|
9226
|
-
/* @__PURE__ */
|
|
9227
|
-
/* @__PURE__ */
|
|
9228
|
-
/* @__PURE__ */
|
|
9229
|
-
/* @__PURE__ */
|
|
9230
|
-
onPlay && /* @__PURE__ */
|
|
9335
|
+
/* @__PURE__ */ jsxs78("div", { className: "ss-w-lb-empty-hero", children: [
|
|
9336
|
+
/* @__PURE__ */ jsx92("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: fresh ? "\u{1F3C6}" : "\u{1F3AE}" }),
|
|
9337
|
+
/* @__PURE__ */ jsx92("h4", { className: "ss-w-lb-empty-title", children: title }),
|
|
9338
|
+
/* @__PURE__ */ jsx92("p", { className: "ss-w-lb-empty-body", children: body }),
|
|
9339
|
+
onPlay && /* @__PURE__ */ jsx92("button", { type: "button", className: "ss-w-lb-empty-cta", onClick: onPlay, children: ui.leaderboardEmptyCta })
|
|
9231
9340
|
] }),
|
|
9232
|
-
fresh && lastWeek && /* @__PURE__ */
|
|
9233
|
-
/* @__PURE__ */
|
|
9234
|
-
/* @__PURE__ */
|
|
9235
|
-
/* @__PURE__ */
|
|
9236
|
-
/* @__PURE__ */
|
|
9341
|
+
fresh && lastWeek && /* @__PURE__ */ jsxs78("div", { className: "ss-w-lb-last", children: [
|
|
9342
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-w-lb-last-label", children: ui.leaderboardLastWeekLabel }),
|
|
9343
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-w-lb-last-champ", "aria-hidden": "true", children: "\u{1F947}" }),
|
|
9344
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-w-lb-last-handle", children: lastWeek.handle }),
|
|
9345
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-w-lb-last-points", children: formatPoints(lastWeek.points) })
|
|
9237
9346
|
] })
|
|
9238
9347
|
] });
|
|
9239
9348
|
}
|
|
9240
9349
|
|
|
9241
9350
|
// src/components/Leaderboard.tsx
|
|
9242
|
-
import { Fragment as Fragment20, jsx as
|
|
9351
|
+
import { Fragment as Fragment20, jsx as jsx93, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
9243
9352
|
function Leaderboard({
|
|
9244
9353
|
data,
|
|
9245
9354
|
ui,
|
|
@@ -9249,9 +9358,9 @@ function Leaderboard({
|
|
|
9249
9358
|
const myRow = segment === "weekly" ? data.myWeeklyRow : data.myAllTimeRow;
|
|
9250
9359
|
const offBoard = myRow !== null && myRow !== void 0 && myRow.rank === -1;
|
|
9251
9360
|
const isEmpty = segment === "weekly" ? data.weeklyTop.length === 0 : data.allTimeTop.length === 0;
|
|
9252
|
-
return /* @__PURE__ */
|
|
9253
|
-
/* @__PURE__ */
|
|
9254
|
-
/* @__PURE__ */
|
|
9361
|
+
return /* @__PURE__ */ jsxs79("div", { className: "ss-w-lb2", children: [
|
|
9362
|
+
/* @__PURE__ */ jsxs79("div", { className: "ss-w-seg", children: [
|
|
9363
|
+
/* @__PURE__ */ jsx93(
|
|
9255
9364
|
"button",
|
|
9256
9365
|
{
|
|
9257
9366
|
type: "button",
|
|
@@ -9261,7 +9370,7 @@ function Leaderboard({
|
|
|
9261
9370
|
children: ui.leaderboardThisWeek
|
|
9262
9371
|
}
|
|
9263
9372
|
),
|
|
9264
|
-
/* @__PURE__ */
|
|
9373
|
+
/* @__PURE__ */ jsx93(
|
|
9265
9374
|
"button",
|
|
9266
9375
|
{
|
|
9267
9376
|
type: "button",
|
|
@@ -9272,7 +9381,7 @@ function Leaderboard({
|
|
|
9272
9381
|
}
|
|
9273
9382
|
)
|
|
9274
9383
|
] }),
|
|
9275
|
-
isEmpty ? /* @__PURE__ */
|
|
9384
|
+
isEmpty ? /* @__PURE__ */ jsx93(
|
|
9276
9385
|
LeaderboardEmpty,
|
|
9277
9386
|
{
|
|
9278
9387
|
segment,
|
|
@@ -9281,15 +9390,15 @@ function Leaderboard({
|
|
|
9281
9390
|
onPlay,
|
|
9282
9391
|
ui
|
|
9283
9392
|
}
|
|
9284
|
-
) : /* @__PURE__ */
|
|
9285
|
-
/* @__PURE__ */
|
|
9393
|
+
) : /* @__PURE__ */ jsxs79(Fragment20, { children: [
|
|
9394
|
+
/* @__PURE__ */ jsx93("div", { className: "ss-w-lb2-rows", children: segment === "weekly" ? data.weeklyTop.map((row) => /* @__PURE__ */ jsx93(
|
|
9286
9395
|
LeaderboardWeeklyRow,
|
|
9287
9396
|
{
|
|
9288
9397
|
row,
|
|
9289
9398
|
isMe: row.operatorUserId === data.myWeeklyRow?.operatorUserId
|
|
9290
9399
|
},
|
|
9291
9400
|
row.operatorUserId
|
|
9292
|
-
)) : data.allTimeTop.map((row) => /* @__PURE__ */
|
|
9401
|
+
)) : data.allTimeTop.map((row) => /* @__PURE__ */ jsx93(
|
|
9293
9402
|
LeaderboardAllTimeRow,
|
|
9294
9403
|
{
|
|
9295
9404
|
row,
|
|
@@ -9297,18 +9406,18 @@ function Leaderboard({
|
|
|
9297
9406
|
},
|
|
9298
9407
|
row.operatorUserId
|
|
9299
9408
|
)) }),
|
|
9300
|
-
/* @__PURE__ */
|
|
9301
|
-
myRow != null && (offBoard ? /* @__PURE__ */
|
|
9302
|
-
segment === "weekly" && data.myWeeklyRow && /* @__PURE__ */
|
|
9303
|
-
segment === "alltime" && data.myAllTimeRow && /* @__PURE__ */
|
|
9409
|
+
/* @__PURE__ */ jsx93("div", { className: "ss-w-kitline", children: "\u{1F3BD}" }),
|
|
9410
|
+
myRow != null && (offBoard ? /* @__PURE__ */ jsx93("div", { className: "ss-w-lbgap", children: ui.leaderboardOffBoard }) : /* @__PURE__ */ jsxs79("div", { className: "ss-w-lb2-rows", children: [
|
|
9411
|
+
segment === "weekly" && data.myWeeklyRow && /* @__PURE__ */ jsx93(LeaderboardWeeklyRow, { row: data.myWeeklyRow, isMe: true }),
|
|
9412
|
+
segment === "alltime" && data.myAllTimeRow && /* @__PURE__ */ jsx93(LeaderboardAllTimeRow, { row: data.myAllTimeRow, isMe: true })
|
|
9304
9413
|
] })),
|
|
9305
|
-
segment === "alltime" && data.myAllTimeRow && !offBoard && /* @__PURE__ */
|
|
9414
|
+
segment === "alltime" && data.myAllTimeRow && !offBoard && /* @__PURE__ */ jsx93("div", { className: "ss-w-lb2-rows", children: /* @__PURE__ */ jsx93("div", { className: "ss-w-lb2-row", children: /* @__PURE__ */ jsx93("span", { className: "ss-w-lb2-handle", children: formatPoints(data.allTimeTop.reduce((s, r) => s + r.allTimePoints, 0)) }) }) })
|
|
9306
9415
|
] })
|
|
9307
9416
|
] });
|
|
9308
9417
|
}
|
|
9309
9418
|
|
|
9310
9419
|
// src/components/LeaderboardPanel.tsx
|
|
9311
|
-
import { jsx as
|
|
9420
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
9312
9421
|
var EMPTY_PAYLOAD = {
|
|
9313
9422
|
week: "",
|
|
9314
9423
|
weeklyTop: [],
|
|
@@ -9319,19 +9428,19 @@ var EMPTY_PAYLOAD = {
|
|
|
9319
9428
|
lastWeek: null
|
|
9320
9429
|
};
|
|
9321
9430
|
function LeaderboardPanel({ loggedIn, data, loading, onPlay, ui }) {
|
|
9322
|
-
if (!loggedIn) return /* @__PURE__ */
|
|
9323
|
-
if (data === null && loading) return /* @__PURE__ */
|
|
9324
|
-
return /* @__PURE__ */
|
|
9431
|
+
if (!loggedIn) return /* @__PURE__ */ jsx94(GamesLoginWall, { ui });
|
|
9432
|
+
if (data === null && loading) return /* @__PURE__ */ jsx94("div", { className: "ss-w-mon-list" });
|
|
9433
|
+
return /* @__PURE__ */ jsx94("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ jsx94(Leaderboard, { data: data ?? EMPTY_PAYLOAD, ui, onPlay }) });
|
|
9325
9434
|
}
|
|
9326
9435
|
|
|
9327
9436
|
// src/components/PresetSpeedDial.tsx
|
|
9328
9437
|
import { useId as useId10 } from "react";
|
|
9329
|
-
import { jsx as
|
|
9438
|
+
import { jsx as jsx95, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
9330
9439
|
function PresetSpeedDial({ expanded, showDot, strings, onToggle, onOpen, rootRef, buttonRef }) {
|
|
9331
9440
|
const pillsId = useId10();
|
|
9332
9441
|
const tabIndex = expanded ? 0 : -1;
|
|
9333
|
-
return /* @__PURE__ */
|
|
9334
|
-
/* @__PURE__ */
|
|
9442
|
+
return /* @__PURE__ */ jsxs80("div", { ref: rootRef, className: "ss-w-dial", children: [
|
|
9443
|
+
/* @__PURE__ */ jsxs80(
|
|
9335
9444
|
"button",
|
|
9336
9445
|
{
|
|
9337
9446
|
ref: buttonRef,
|
|
@@ -9342,20 +9451,20 @@ function PresetSpeedDial({ expanded, showDot, strings, onToggle, onOpen, rootRef
|
|
|
9342
9451
|
"aria-label": strings.dialName,
|
|
9343
9452
|
onClick: onToggle,
|
|
9344
9453
|
children: [
|
|
9345
|
-
/* @__PURE__ */
|
|
9346
|
-
/* @__PURE__ */
|
|
9347
|
-
showDot && !expanded ? /* @__PURE__ */
|
|
9454
|
+
/* @__PURE__ */ jsx95("span", { className: "ss-w-dial-icon ss-w-dial-icon--open", children: /* @__PURE__ */ jsx95(SlidersIcon, {}) }),
|
|
9455
|
+
/* @__PURE__ */ jsx95("span", { className: "ss-w-dial-icon ss-w-dial-icon--close", children: /* @__PURE__ */ jsx95(CloseIcon, {}) }),
|
|
9456
|
+
showDot && !expanded ? /* @__PURE__ */ jsx95("span", { className: "ss-w-dial-dot", "aria-hidden": "true" }) : null
|
|
9348
9457
|
]
|
|
9349
9458
|
}
|
|
9350
9459
|
),
|
|
9351
|
-
/* @__PURE__ */
|
|
9352
|
-
/* @__PURE__ */
|
|
9353
|
-
/* @__PURE__ */
|
|
9354
|
-
/* @__PURE__ */
|
|
9460
|
+
/* @__PURE__ */ jsxs80("div", { id: pillsId, className: "ss-w-dial-pills", "data-open": expanded ? "" : void 0, children: [
|
|
9461
|
+
/* @__PURE__ */ jsxs80("button", { type: "button", className: "ss-w-dial-pill", tabIndex, onClick: () => onOpen("numbers"), children: [
|
|
9462
|
+
/* @__PURE__ */ jsx95(SlidersIcon, {}),
|
|
9463
|
+
/* @__PURE__ */ jsx95("span", { className: "ss-w-dial-pill-label", children: strings.setNumbers })
|
|
9355
9464
|
] }),
|
|
9356
|
-
/* @__PURE__ */
|
|
9357
|
-
/* @__PURE__ */
|
|
9358
|
-
/* @__PURE__ */
|
|
9465
|
+
/* @__PURE__ */ jsxs80("button", { type: "button", className: "ss-w-dial-pill", tabIndex, onClick: () => onOpen("combo"), children: [
|
|
9466
|
+
/* @__PURE__ */ jsx95(ComboIcon, {}),
|
|
9467
|
+
/* @__PURE__ */ jsx95("span", { className: "ss-w-dial-pill-label", children: strings.buildCombo })
|
|
9359
9468
|
] })
|
|
9360
9469
|
] })
|
|
9361
9470
|
] });
|
|
@@ -9363,7 +9472,7 @@ function PresetSpeedDial({ expanded, showDot, strings, onToggle, onOpen, rootRef
|
|
|
9363
9472
|
|
|
9364
9473
|
// src/components/PresetTools.tsx
|
|
9365
9474
|
import { Fragment as Fragment21, useEffect as useEffect26, useId as useId11, useRef as useRef22, useState as useState45 } from "react";
|
|
9366
|
-
import { Fragment as Fragment22, jsx as
|
|
9475
|
+
import { Fragment as Fragment22, jsx as jsx96, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
9367
9476
|
var FOCUSABLE = 'button:not([disabled]), [href], input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
9368
9477
|
function PresetToolModal({ title, closeLabel, onClose, children, footer }) {
|
|
9369
9478
|
const dialogRef = useRef22(null);
|
|
@@ -9401,79 +9510,79 @@ function PresetToolModal({ title, closeLabel, onClose, children, footer }) {
|
|
|
9401
9510
|
first.focus();
|
|
9402
9511
|
}
|
|
9403
9512
|
};
|
|
9404
|
-
return /* @__PURE__ */
|
|
9405
|
-
/* @__PURE__ */
|
|
9406
|
-
/* @__PURE__ */
|
|
9407
|
-
/* @__PURE__ */
|
|
9513
|
+
return /* @__PURE__ */ jsx96("div", { className: "ss-w-tool-backdrop", children: /* @__PURE__ */ jsxs81("div", { ref: dialogRef, className: "ss-w-tool", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, tabIndex: -1, onKeyDown: trapTab, children: [
|
|
9514
|
+
/* @__PURE__ */ jsxs81("div", { className: "ss-w-tool-head", children: [
|
|
9515
|
+
/* @__PURE__ */ jsx96("h2", { id: titleId, className: "ss-w-tool-title", children: title }),
|
|
9516
|
+
/* @__PURE__ */ jsx96("button", { type: "button", className: "ss-w-tool-close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx96(CloseIcon, {}) })
|
|
9408
9517
|
] }),
|
|
9409
|
-
/* @__PURE__ */
|
|
9410
|
-
footer ? /* @__PURE__ */
|
|
9518
|
+
/* @__PURE__ */ jsx96("div", { className: "ss-w-tool-body", children }),
|
|
9519
|
+
footer ? /* @__PURE__ */ jsx96("div", { className: "ss-w-tool-foot", children: footer }) : null
|
|
9411
9520
|
] }) });
|
|
9412
9521
|
}
|
|
9413
9522
|
function fillTemplate(template, slots) {
|
|
9414
9523
|
return template.split(/(\{[a-z]+\})/).filter((part) => part !== "").map((part, i) => {
|
|
9415
9524
|
const key = /^\{([a-z]+)\}$/.exec(part)?.[1];
|
|
9416
|
-
return /* @__PURE__ */
|
|
9525
|
+
return /* @__PURE__ */ jsx96(Fragment21, { children: key !== void 0 && key in slots ? slots[key] : part }, i);
|
|
9417
9526
|
});
|
|
9418
9527
|
}
|
|
9419
9528
|
function NumberSelect({ current, choices: choices2, label, notToday, lockEmpty = true, onChoose }) {
|
|
9420
9529
|
const selected = Math.max(0, choices2.findIndex((c) => c.text === current));
|
|
9421
|
-
return /* @__PURE__ */
|
|
9422
|
-
/* @__PURE__ */
|
|
9423
|
-
/* @__PURE__ */
|
|
9530
|
+
return /* @__PURE__ */ jsxs81("span", { className: "ss-w-tool-num", children: [
|
|
9531
|
+
/* @__PURE__ */ jsx96("span", { className: "ss-w-tool-num-size", "aria-hidden": "true", children: current }),
|
|
9532
|
+
/* @__PURE__ */ jsx96("select", { className: "ss-w-tool-num-select", "aria-label": label, value: String(selected), onChange: (e) => {
|
|
9424
9533
|
const c = choices2[Number(e.target.value)];
|
|
9425
9534
|
if (c) onChoose(c.value);
|
|
9426
|
-
}, children: choices2.map((c, i) => /* @__PURE__ */
|
|
9535
|
+
}, children: choices2.map((c, i) => /* @__PURE__ */ jsx96("option", { value: String(i), disabled: lockEmpty && !c.available && i !== selected, children: c.available ? c.text : `${c.text}${notToday}` }, i)) })
|
|
9427
9536
|
] });
|
|
9428
9537
|
}
|
|
9429
9538
|
function ChoiceSelect({ currentIdx, sizeLabels, optionLabels, label, onChoose }) {
|
|
9430
9539
|
const sizeText = sizeLabels[currentIdx] ?? "";
|
|
9431
|
-
return /* @__PURE__ */
|
|
9432
|
-
/* @__PURE__ */
|
|
9433
|
-
/* @__PURE__ */
|
|
9540
|
+
return /* @__PURE__ */ jsxs81("span", { className: "ss-w-tool-num", children: [
|
|
9541
|
+
/* @__PURE__ */ jsx96("span", { className: "ss-w-tool-num-size", "aria-hidden": "true", children: sizeText }),
|
|
9542
|
+
/* @__PURE__ */ jsx96("select", { className: "ss-w-tool-num-select", "aria-label": label, value: String(currentIdx), onChange: (e) => onChoose(Number(e.target.value)), children: optionLabels.map((opt, i) => /* @__PURE__ */ jsx96("option", { value: String(i), children: opt }, i)) })
|
|
9434
9543
|
] });
|
|
9435
9544
|
}
|
|
9436
9545
|
function SendButton({ label, display, disabled, onClick }) {
|
|
9437
|
-
return /* @__PURE__ */
|
|
9546
|
+
return /* @__PURE__ */ jsx96("button", { type: "button", className: "ss-w-tool-send", "aria-label": `${label}: ${display}`, disabled, onClick, children: label });
|
|
9438
9547
|
}
|
|
9439
9548
|
function PickList({ picks, formatKickoff }) {
|
|
9440
|
-
return /* @__PURE__ */
|
|
9441
|
-
/* @__PURE__ */
|
|
9549
|
+
return /* @__PURE__ */ jsx96("ul", { className: "ss-w-tool-picks", role: "list", children: picks.map((p) => /* @__PURE__ */ jsxs81("li", { className: "ss-w-tool-pick", children: [
|
|
9550
|
+
/* @__PURE__ */ jsxs81("span", { className: "ss-w-tool-pick-match", children: [
|
|
9442
9551
|
p.homeTeamName,
|
|
9443
9552
|
" \u2013 ",
|
|
9444
9553
|
p.awayTeamName
|
|
9445
9554
|
] }),
|
|
9446
|
-
/* @__PURE__ */
|
|
9555
|
+
/* @__PURE__ */ jsxs81("span", { className: "ss-w-tool-pick-sel", children: [
|
|
9447
9556
|
p.marketLabel,
|
|
9448
9557
|
": ",
|
|
9449
9558
|
p.selectionLabel,
|
|
9450
9559
|
p.line ? ` ${p.line}` : ""
|
|
9451
9560
|
] }),
|
|
9452
|
-
/* @__PURE__ */
|
|
9453
|
-
/* @__PURE__ */
|
|
9561
|
+
/* @__PURE__ */ jsx96("span", { className: "ss-w-tool-pick-kick", children: formatKickoff(p.kickoffUtc) }),
|
|
9562
|
+
/* @__PURE__ */ jsx96("span", { className: "ss-w-tool-pick-price", children: p.price.toFixed(2) })
|
|
9454
9563
|
] }, p.matchOddsId)) });
|
|
9455
9564
|
}
|
|
9456
9565
|
function ComboPreview({ cell, formatKickoff }) {
|
|
9457
|
-
return /* @__PURE__ */
|
|
9458
|
-
/* @__PURE__ */
|
|
9459
|
-
/* @__PURE__ */
|
|
9566
|
+
return /* @__PURE__ */ jsxs81(Fragment22, { children: [
|
|
9567
|
+
/* @__PURE__ */ jsx96(PickList, { picks: cell.combo.legs, formatKickoff }),
|
|
9568
|
+
/* @__PURE__ */ jsx96("div", { className: "ss-w-tool-math", children: cell.combo.multiplication })
|
|
9460
9569
|
] });
|
|
9461
9570
|
}
|
|
9462
9571
|
function Unavailable({ text }) {
|
|
9463
|
-
return /* @__PURE__ */
|
|
9572
|
+
return /* @__PURE__ */ jsx96("p", { className: "ss-w-tool-unavailable", children: text });
|
|
9464
9573
|
}
|
|
9465
9574
|
function AskRow({ icon, ask, ready, send }) {
|
|
9466
|
-
return /* @__PURE__ */
|
|
9467
|
-
/* @__PURE__ */
|
|
9468
|
-
/* @__PURE__ */
|
|
9469
|
-
/* @__PURE__ */
|
|
9470
|
-
ready ? /* @__PURE__ */
|
|
9575
|
+
return /* @__PURE__ */ jsxs81("section", { className: "ss-w-tool-row ss-w-tool-row--ask", children: [
|
|
9576
|
+
/* @__PURE__ */ jsx96("span", { className: "ss-w-tool-icon", "aria-hidden": "true", children: icon }),
|
|
9577
|
+
/* @__PURE__ */ jsxs81("div", { className: "ss-w-tool-main", children: [
|
|
9578
|
+
/* @__PURE__ */ jsx96("p", { className: "ss-w-tool-ask", children: ask }),
|
|
9579
|
+
ready ? /* @__PURE__ */ jsx96("span", { className: "ss-w-tool-ready", children: ready }) : null
|
|
9471
9580
|
] }),
|
|
9472
9581
|
send
|
|
9473
9582
|
] });
|
|
9474
9583
|
}
|
|
9475
9584
|
function RoundSend({ label, display, disabled, onClick }) {
|
|
9476
|
-
return /* @__PURE__ */
|
|
9585
|
+
return /* @__PURE__ */ jsx96("button", { type: "button", className: "ss-w-tool-go", "aria-label": `${label}: ${display}`, disabled, onClick, children: /* @__PURE__ */ jsx96(SendIcon, {}) });
|
|
9477
9586
|
}
|
|
9478
9587
|
var BIG_COMBO = { total: 50, legs: 6 };
|
|
9479
9588
|
function SetNumbersTool({ grid, strings, streaming, onSend, onClose }) {
|
|
@@ -9539,77 +9648,77 @@ function SetNumbersTool({ grid, strings, streaming, onSend, onClose }) {
|
|
|
9539
9648
|
const marketLabels = markets.map((c) => strings.marketShort(c.marketDeveloperName, c.marketLabel, c.selectionLabel ?? null));
|
|
9540
9649
|
const singlesReady = (cell) => cell ? strings.readyCount(cell.picks.length) : strings.unavailable;
|
|
9541
9650
|
const comboReady = (cell) => cell ? strings.readyAt(cell.combo.total) : strings.unavailable;
|
|
9542
|
-
return /* @__PURE__ */
|
|
9543
|
-
/* @__PURE__ */
|
|
9651
|
+
return /* @__PURE__ */ jsxs81(PresetToolModal, { title: strings.setNumbers, closeLabel: strings.close, onClose, children: [
|
|
9652
|
+
/* @__PURE__ */ jsx96(
|
|
9544
9653
|
AskRow,
|
|
9545
9654
|
{
|
|
9546
9655
|
icon: "\u{1F3AF}",
|
|
9547
9656
|
ask: fillTemplate(strings.maxPriceRow, {
|
|
9548
9657
|
count: String(count),
|
|
9549
|
-
price: /* @__PURE__ */
|
|
9658
|
+
price: /* @__PURE__ */ jsx96(NumberSelect, { current: maxPrice.toFixed(2), choices: maxChoices, label: strings.maxPriceName, notToday: strings.notToday, onChoose: chooseMax })
|
|
9550
9659
|
}),
|
|
9551
9660
|
ready: singlesReady(maxCell),
|
|
9552
|
-
send: /* @__PURE__ */
|
|
9661
|
+
send: /* @__PURE__ */ jsx96(RoundSend, { label: strings.send, display: strings.maxPriceDisplay(count, maxPrice), disabled: !maxCell || streaming, onClick: () => {
|
|
9553
9662
|
if (maxCell) onSend(maxPriceAsk(maxCell, strings));
|
|
9554
9663
|
} })
|
|
9555
9664
|
}
|
|
9556
9665
|
),
|
|
9557
|
-
/* @__PURE__ */
|
|
9666
|
+
/* @__PURE__ */ jsx96(
|
|
9558
9667
|
AskRow,
|
|
9559
9668
|
{
|
|
9560
9669
|
icon: "\u{1F4C8}",
|
|
9561
9670
|
ask: fillTemplate(strings.minPriceRow, {
|
|
9562
9671
|
count: String(count),
|
|
9563
|
-
price: /* @__PURE__ */
|
|
9672
|
+
price: /* @__PURE__ */ jsx96(NumberSelect, { current: minPrice.toFixed(2), choices: minChoices, label: strings.minPriceName, notToday: strings.notToday, onChoose: chooseMin })
|
|
9564
9673
|
}),
|
|
9565
9674
|
ready: singlesReady(minCell),
|
|
9566
|
-
send: /* @__PURE__ */
|
|
9675
|
+
send: /* @__PURE__ */ jsx96(RoundSend, { label: strings.send, display: strings.minPriceDisplay(count, minPrice), disabled: !minCell || streaming, onClick: () => {
|
|
9567
9676
|
if (minCell) onSend(minPriceAsk(minCell, strings));
|
|
9568
9677
|
} })
|
|
9569
9678
|
}
|
|
9570
9679
|
),
|
|
9571
|
-
/* @__PURE__ */
|
|
9680
|
+
/* @__PURE__ */ jsx96(
|
|
9572
9681
|
AskRow,
|
|
9573
9682
|
{
|
|
9574
9683
|
icon: "\u2728",
|
|
9575
9684
|
ask: fillTemplate(strings.comboRow, {
|
|
9576
|
-
legs: /* @__PURE__ */
|
|
9577
|
-
total: /* @__PURE__ */
|
|
9685
|
+
legs: /* @__PURE__ */ jsx96(NumberSelect, { current: String(legs), choices: legChoicesFor(total), label: strings.matchesLabel, notToday: strings.notToday, lockEmpty: false, onChoose: chooseLegs }),
|
|
9686
|
+
total: /* @__PURE__ */ jsx96(NumberSelect, { current: total.toFixed(1), choices: totalChoices, label: strings.totalLabel, notToday: strings.notToday, onChoose: chooseTotal })
|
|
9578
9687
|
}),
|
|
9579
9688
|
ready: comboReady(comboCell),
|
|
9580
|
-
send: /* @__PURE__ */
|
|
9689
|
+
send: /* @__PURE__ */ jsx96(RoundSend, { label: strings.send, display: strings.comboDisplay(legs, total), disabled: !comboCell || streaming, onClick: () => {
|
|
9581
9690
|
if (comboCell) onSend(comboAsk(comboCell, strings));
|
|
9582
9691
|
} })
|
|
9583
9692
|
}
|
|
9584
9693
|
),
|
|
9585
|
-
/* @__PURE__ */
|
|
9694
|
+
/* @__PURE__ */ jsx96(
|
|
9586
9695
|
AskRow,
|
|
9587
9696
|
{
|
|
9588
9697
|
icon: "\u{1F3C6}",
|
|
9589
9698
|
ask: fillTemplate(strings.bigComboRow, {
|
|
9590
|
-
legs: /* @__PURE__ */
|
|
9591
|
-
total: /* @__PURE__ */
|
|
9699
|
+
legs: /* @__PURE__ */ jsx96(NumberSelect, { current: String(bigLegs), choices: legChoicesFor(bigTotal), label: strings.matchesLabel, notToday: strings.notToday, lockEmpty: false, onChoose: chooseBigLegs }),
|
|
9700
|
+
total: /* @__PURE__ */ jsx96(NumberSelect, { current: bigTotal.toFixed(1), choices: totalChoices, label: strings.totalLabel, notToday: strings.notToday, onChoose: chooseBigTotal })
|
|
9592
9701
|
}),
|
|
9593
9702
|
ready: comboReady(bigCell),
|
|
9594
|
-
send: /* @__PURE__ */
|
|
9703
|
+
send: /* @__PURE__ */ jsx96(RoundSend, { label: strings.send, display: strings.comboDisplay(bigLegs, bigTotal), disabled: !bigCell || streaming, onClick: () => {
|
|
9595
9704
|
if (bigCell) onSend(comboAsk(bigCell, strings));
|
|
9596
9705
|
} })
|
|
9597
9706
|
}
|
|
9598
9707
|
),
|
|
9599
|
-
markets.length > 0 && /* @__PURE__ */
|
|
9708
|
+
markets.length > 0 && /* @__PURE__ */ jsx96(
|
|
9600
9709
|
AskRow,
|
|
9601
9710
|
{
|
|
9602
9711
|
icon: "\u26BD",
|
|
9603
9712
|
ask: fillTemplate(strings.marketRow, {
|
|
9604
|
-
market: /* @__PURE__ */
|
|
9713
|
+
market: /* @__PURE__ */ jsx96(ChoiceSelect, { currentIdx: marketIdx, sizeLabels: marketLabels, optionLabels: marketLabels, label: strings.marketName, onChoose: chooseMarket })
|
|
9605
9714
|
}),
|
|
9606
9715
|
ready: marketCell ? strings.readyCount(marketCell.count) : null,
|
|
9607
|
-
send: /* @__PURE__ */
|
|
9716
|
+
send: /* @__PURE__ */ jsx96(RoundSend, { label: strings.send, display: marketCell ? marketDisplay(marketCell, strings) : "", disabled: !marketCell || streaming, onClick: () => {
|
|
9608
9717
|
if (marketCell) onSend(marketAsk(marketCell, strings));
|
|
9609
9718
|
} })
|
|
9610
9719
|
}
|
|
9611
9720
|
),
|
|
9612
|
-
/* @__PURE__ */
|
|
9721
|
+
/* @__PURE__ */ jsx96("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
|
|
9613
9722
|
] });
|
|
9614
9723
|
}
|
|
9615
9724
|
function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal, initialLegs, onSend, onClose }) {
|
|
@@ -9633,24 +9742,24 @@ function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal,
|
|
|
9633
9742
|
const d = strings.comboDisplay(nextLegs, nextTotal);
|
|
9634
9743
|
setAnnouncement(findCombo(grid, nextTotal, nextLegs) ? d : `${d}. ${strings.unavailable}`);
|
|
9635
9744
|
};
|
|
9636
|
-
const footer = /* @__PURE__ */
|
|
9745
|
+
const footer = /* @__PURE__ */ jsx96(SendButton, { label: strings.send, display, disabled: !cell || streaming, onClick: () => {
|
|
9637
9746
|
if (cell) onSend(comboAsk(cell, strings));
|
|
9638
9747
|
} });
|
|
9639
|
-
return /* @__PURE__ */
|
|
9640
|
-
/* @__PURE__ */
|
|
9641
|
-
/* @__PURE__ */
|
|
9642
|
-
/* @__PURE__ */
|
|
9748
|
+
return /* @__PURE__ */ jsxs81(PresetToolModal, { title: strings.buildCombo, closeLabel: strings.close, onClose, footer, children: [
|
|
9749
|
+
/* @__PURE__ */ jsxs81("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.totalLabel, children: [
|
|
9750
|
+
/* @__PURE__ */ jsx96("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.totalLabel }),
|
|
9751
|
+
/* @__PURE__ */ jsx96("div", { className: "ss-w-tool-chips", children: totals.map((t) => /* @__PURE__ */ jsx96("button", { type: "button", className: "ss-w-tool-chip", "aria-pressed": samePrice(t, total), onClick: () => choose(t, samePrice(t, total) ? legs : legsForTotal(grid, t, legs)), children: t.toFixed(1) }, t)) })
|
|
9643
9752
|
] }),
|
|
9644
|
-
/* @__PURE__ */
|
|
9645
|
-
/* @__PURE__ */
|
|
9646
|
-
/* @__PURE__ */
|
|
9647
|
-
/* @__PURE__ */
|
|
9648
|
-
/* @__PURE__ */
|
|
9649
|
-
/* @__PURE__ */
|
|
9753
|
+
/* @__PURE__ */ jsxs81("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.matchesLabel, children: [
|
|
9754
|
+
/* @__PURE__ */ jsx96("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.matchesLabel }),
|
|
9755
|
+
/* @__PURE__ */ jsxs81("div", { className: "ss-w-tool-stepper", children: [
|
|
9756
|
+
/* @__PURE__ */ jsx96("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.fewerMatches, disabled: legs <= minLegs, onClick: () => choose(total, legs - 1), children: "\u2212" }),
|
|
9757
|
+
/* @__PURE__ */ jsx96("span", { className: "ss-w-tool-count", children: legs }),
|
|
9758
|
+
/* @__PURE__ */ jsx96("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.moreMatches, disabled: legs >= maxLegs, onClick: () => choose(total, legs + 1), children: "+" })
|
|
9650
9759
|
] })
|
|
9651
9760
|
] }),
|
|
9652
|
-
cell ? /* @__PURE__ */
|
|
9653
|
-
/* @__PURE__ */
|
|
9761
|
+
cell ? /* @__PURE__ */ jsx96(ComboPreview, { cell, formatKickoff }) : /* @__PURE__ */ jsx96(Unavailable, { text: strings.unavailable }),
|
|
9762
|
+
/* @__PURE__ */ jsx96("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
|
|
9654
9763
|
] });
|
|
9655
9764
|
}
|
|
9656
9765
|
|
|
@@ -9752,7 +9861,7 @@ function markToolSeen() {
|
|
|
9752
9861
|
}
|
|
9753
9862
|
|
|
9754
9863
|
// src/components/ChatPanel.tsx
|
|
9755
|
-
import { Fragment as Fragment23, jsx as
|
|
9864
|
+
import { Fragment as Fragment23, jsx as jsx97, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
9756
9865
|
var FULLSCREEN_QUERY = "(max-width: 639px)";
|
|
9757
9866
|
function useIsModal() {
|
|
9758
9867
|
const [modal, setModal] = useState47(false);
|
|
@@ -9855,8 +9964,8 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9855
9964
|
focusAfterCloseRef.current = "composer";
|
|
9856
9965
|
setTool(null);
|
|
9857
9966
|
}, [tool, onChatTab, presetGrid]);
|
|
9858
|
-
return /* @__PURE__ */
|
|
9859
|
-
/* @__PURE__ */
|
|
9967
|
+
return /* @__PURE__ */ jsxs82("div", { className: "ss-w-panel", role: "dialog", "aria-modal": isModal, "aria-label": ui.chatDialogLabel, children: [
|
|
9968
|
+
/* @__PURE__ */ jsx97(
|
|
9860
9969
|
ChatHeader,
|
|
9861
9970
|
{
|
|
9862
9971
|
onClose: close,
|
|
@@ -9869,7 +9978,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9869
9978
|
moreOptionsLabel: ui.moreOptions
|
|
9870
9979
|
}
|
|
9871
9980
|
),
|
|
9872
|
-
monitor && /* @__PURE__ */
|
|
9981
|
+
monitor && /* @__PURE__ */ jsx97(
|
|
9873
9982
|
TabBar,
|
|
9874
9983
|
{
|
|
9875
9984
|
monitor,
|
|
@@ -9881,9 +9990,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9881
9990
|
gamesEnabled: gamesResult?.enabled ?? false
|
|
9882
9991
|
}
|
|
9883
9992
|
),
|
|
9884
|
-
/* @__PURE__ */
|
|
9885
|
-
/* @__PURE__ */
|
|
9886
|
-
showDial ? /* @__PURE__ */
|
|
9993
|
+
/* @__PURE__ */ jsxs82("div", { ref: layerRef, className: "ss-w-chat-layer", "data-dial": presetGrid ? "" : void 0, style: onChatTab ? void 0 : HIDDEN_LAYER_STYLE, children: [
|
|
9994
|
+
/* @__PURE__ */ jsx97(PresetToolsContext.Provider, { value: toolsValue, children: /* @__PURE__ */ jsx97(MessageList, { controller, ui, slip, onDashboardTap, monitor }) }),
|
|
9995
|
+
showDial ? /* @__PURE__ */ jsx97(
|
|
9887
9996
|
PresetSpeedDial,
|
|
9888
9997
|
{
|
|
9889
9998
|
expanded: dial.expanded,
|
|
@@ -9895,12 +10004,12 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9895
10004
|
buttonRef: dialButtonRef
|
|
9896
10005
|
}
|
|
9897
10006
|
) : null,
|
|
9898
|
-
tool && presetGrid && onChatTab && !paused ? tool.kind === "numbers" ? /* @__PURE__ */
|
|
10007
|
+
tool && presetGrid && onChatTab && !paused ? tool.kind === "numbers" ? /* @__PURE__ */ jsx97(SetNumbersTool, { grid: presetGrid, strings: ui.presets, streaming: state.isStreaming, onSend: sendAsk, onClose: closeTool }) : /* @__PURE__ */ jsx97(BuildComboTool, { grid: presetGrid, strings: ui.presets, streaming: state.isStreaming, formatKickoff, initialTotal: tool.total, initialLegs: tool.legs, onSend: sendAsk, onClose: closeTool }) : null
|
|
9899
10008
|
] }),
|
|
9900
|
-
monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */
|
|
9901
|
-
monitor && monitor.activeTab === "following" && /* @__PURE__ */
|
|
9902
|
-
monitor && monitor.activeTab === "odds" && /* @__PURE__ */
|
|
9903
|
-
monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */
|
|
10009
|
+
monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */ jsx97(TodayPanel, { discovery, ui, monitor }),
|
|
10010
|
+
monitor && monitor.activeTab === "following" && /* @__PURE__ */ jsx97(MatchesPanel, { monitor, ui, slip, onAsk: paused ? void 0 : handleAsk }),
|
|
10011
|
+
monitor && monitor.activeTab === "odds" && /* @__PURE__ */ jsx97(OddsPanel, { monitor, ui, slip }),
|
|
10012
|
+
monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */ jsx97(
|
|
9904
10013
|
GamesPanel,
|
|
9905
10014
|
{
|
|
9906
10015
|
loggedIn: !!loggedIn,
|
|
@@ -9914,7 +10023,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9914
10023
|
}
|
|
9915
10024
|
}
|
|
9916
10025
|
),
|
|
9917
|
-
monitor && monitor.activeTab === "leaderboard" && leaderboardResult && /* @__PURE__ */
|
|
10026
|
+
monitor && monitor.activeTab === "leaderboard" && leaderboardResult && /* @__PURE__ */ jsx97(
|
|
9918
10027
|
LeaderboardPanel,
|
|
9919
10028
|
{
|
|
9920
10029
|
loggedIn: !!loggedIn,
|
|
@@ -9924,9 +10033,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9924
10033
|
ui
|
|
9925
10034
|
}
|
|
9926
10035
|
),
|
|
9927
|
-
(!monitor || monitor.activeTab !== "games" && monitor.activeTab !== "leaderboard") && /* @__PURE__ */
|
|
9928
|
-
/* @__PURE__ */
|
|
9929
|
-
paused ? null : /* @__PURE__ */
|
|
10036
|
+
(!monitor || monitor.activeTab !== "games" && monitor.activeTab !== "leaderboard") && /* @__PURE__ */ jsxs82(Fragment23, { children: [
|
|
10037
|
+
/* @__PURE__ */ jsx97("div", { ref: limitRef, className: "ss-w-limit", role: "status", tabIndex: -1, children: state.limit ? limitText(state.limit, ui) : null }),
|
|
10038
|
+
paused ? null : /* @__PURE__ */ jsx97(
|
|
9930
10039
|
ChatInput,
|
|
9931
10040
|
{
|
|
9932
10041
|
ref: inputRef,
|
|
@@ -9945,9 +10054,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9945
10054
|
}
|
|
9946
10055
|
|
|
9947
10056
|
// src/components/HostEventsProvider.tsx
|
|
9948
|
-
import { jsx as
|
|
10057
|
+
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
9949
10058
|
function HostEventsProvider({ value, children }) {
|
|
9950
|
-
return /* @__PURE__ */
|
|
10059
|
+
return /* @__PURE__ */ jsx98(SlipStateContext.Provider, { value: value.slipState, children });
|
|
9951
10060
|
}
|
|
9952
10061
|
|
|
9953
10062
|
// src/styles/css.generated.ts
|
|
@@ -11182,6 +11291,24 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
11182
11291
|
.ss-w-today-tile-star:disabled { cursor: default; opacity: .4; }
|
|
11183
11292
|
.ss-w-today-tile-star svg { width: 18px; height: 18px; }
|
|
11184
11293
|
|
|
11294
|
+
/* Capped row groups (variant B of u521): one league's section-header plus up to
|
|
11295
|
+
ROW_CAP_PER_LEAGUE inline fixture rows, used in place of a tile when the section row budget
|
|
11296
|
+
allows it. Mirrors LeagueTile's button-body + sibling-star-button shape. */
|
|
11297
|
+
.ss-w-today-rowsection { display: flex; flex-direction: column; gap: 12px; }
|
|
11298
|
+
.ss-w-today-rowgroup { display: flex; flex-direction: column; }
|
|
11299
|
+
.ss-w-today-rowgroup-head { display: flex; align-items: center; gap: 4px; }
|
|
11300
|
+
.ss-w-today-rowgroup-head-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 2px; background: none; border: none; font: inherit; color: var(--ss-w-ink); cursor: pointer; text-align: left; }
|
|
11301
|
+
.ss-w-today-rowgroup-head-body:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
|
|
11302
|
+
.ss-w-today-rowgroup-name { font-size: 11px; font-weight: 800; letter-spacing: .02em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
11303
|
+
.ss-w-today-rowgroup-star { flex: none; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: none; border: none; border-radius: 8px; color: var(--ss-w-faint); cursor: pointer; }
|
|
11304
|
+
.ss-w-today-rowgroup-star:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
|
|
11305
|
+
.ss-w-today-rowgroup-star[aria-pressed="true"] { color: var(--ss-w-accent); }
|
|
11306
|
+
.ss-w-today-rowgroup-star:disabled { cursor: default; opacity: .4; }
|
|
11307
|
+
.ss-w-today-rowgroup-star svg { width: 16px; height: 16px; }
|
|
11308
|
+
.ss-w-today-rowgroup-rows { display: flex; flex-direction: column; }
|
|
11309
|
+
.ss-w-today-rowgroup-seeall { align-self: flex-start; background: none; border: none; font: inherit; font-size: 11px; font-weight: 700; color: var(--ss-w-faint); cursor: pointer; padding: 4px 2px 0; }
|
|
11310
|
+
.ss-w-today-rowgroup-seeall:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
|
|
11311
|
+
|
|
11185
11312
|
/* League detail (Task 6): the drill-in view opened from a tile. Its header star is always
|
|
11186
11313
|
enabled (spec \xA73/\xA77's one exception to the tile rule), so it carries no :disabled styling. */
|
|
11187
11314
|
.ss-w-today-detail { position: relative; display: flex; flex-direction: column; gap: 10px; }
|
|
@@ -11688,7 +11815,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
11688
11815
|
`;
|
|
11689
11816
|
|
|
11690
11817
|
// src/StatsWidget.tsx
|
|
11691
|
-
import { jsx as
|
|
11818
|
+
import { jsx as jsx99 } from "react/jsx-runtime";
|
|
11692
11819
|
function buildClient(props) {
|
|
11693
11820
|
try {
|
|
11694
11821
|
if ("client" in props && props.client) {
|
|
@@ -11907,7 +12034,7 @@ function StatsWidget(props) {
|
|
|
11907
12034
|
}, [built, ui.injectStyles]);
|
|
11908
12035
|
if (!built) return null;
|
|
11909
12036
|
const attrs = themeAttrs(ui);
|
|
11910
|
-
return /* @__PURE__ */
|
|
12037
|
+
return /* @__PURE__ */ jsx99(EventLogContext.Provider, { value: logger, children: /* @__PURE__ */ jsx99(HostEventsProvider, { value: hostEvents, children: /* @__PURE__ */ jsx99("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__ */ jsx99(
|
|
11911
12038
|
ChatPanel,
|
|
11912
12039
|
{
|
|
11913
12040
|
controller,
|
|
@@ -11922,7 +12049,7 @@ function StatsWidget(props) {
|
|
|
11922
12049
|
conversation: built?.conversation ?? null,
|
|
11923
12050
|
presetGrid
|
|
11924
12051
|
}
|
|
11925
|
-
) : /* @__PURE__ */
|
|
12052
|
+
) : /* @__PURE__ */ jsx99(
|
|
11926
12053
|
ChatFab,
|
|
11927
12054
|
{
|
|
11928
12055
|
label: ui.launcherLabel,
|