@mblinkov/whats-missing 20.0.56 → 21.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/audio/playSound.d.ts +4 -0
- package/dist/themes.d.ts +1 -1
- package/dist/whats-missing.cjs.js +4 -8
- package/dist/whats-missing.es.js +565 -772
- package/package.json +1 -1
package/dist/whats-missing.es.js
CHANGED
|
@@ -1,157 +1,40 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as P, useEffect as L, useState as a, useMemo as ye } from "react";
|
|
3
|
+
function Ve(s, c = 0.45) {
|
|
4
|
+
if (!(typeof window > "u"))
|
|
5
|
+
try {
|
|
6
|
+
const n = new Audio(s);
|
|
7
|
+
n.volume = c;
|
|
8
|
+
const l = () => {
|
|
9
|
+
n.currentTime = 0, n.play().catch(() => {
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
if (n.readyState >= HTMLMediaElement.HAVE_ENOUGH_DATA) {
|
|
13
|
+
l();
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
n.addEventListener("canplaythrough", l, { once: !0 }), n.addEventListener(
|
|
17
|
+
"error",
|
|
18
|
+
() => {
|
|
19
|
+
},
|
|
20
|
+
{ once: !0 }
|
|
21
|
+
), n.load();
|
|
22
|
+
} catch {
|
|
23
|
+
}
|
|
12
24
|
}
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
minHeight: "100%",
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
alignItems: "center",
|
|
27
|
-
textAlign: "center",
|
|
28
|
-
color: "#1f2937",
|
|
29
|
-
padding: "24px 16px",
|
|
30
|
-
boxSizing: "border-box",
|
|
31
|
-
transform: "translateY(20px)"
|
|
32
|
-
// чуть вниз, чтобы компенсировать логотип
|
|
33
|
-
},
|
|
34
|
-
gmHeadline1: {
|
|
35
|
-
fontWeight: 700,
|
|
36
|
-
fontSize: "clamp(28px, 4vw, 40px)",
|
|
37
|
-
lineHeight: "110%"
|
|
38
|
-
},
|
|
39
|
-
gmHeadline3: {
|
|
40
|
-
fontWeight: 600,
|
|
41
|
-
fontSize: "18px",
|
|
42
|
-
lineHeight: "130%"
|
|
43
|
-
},
|
|
44
|
-
gmBodyM: {
|
|
45
|
-
fontWeight: 400,
|
|
46
|
-
fontSize: "16px",
|
|
47
|
-
lineHeight: "140%"
|
|
48
|
-
},
|
|
49
|
-
gmBodyS: {
|
|
50
|
-
fontWeight: 400,
|
|
51
|
-
fontSize: "14px",
|
|
52
|
-
lineHeight: "140%",
|
|
53
|
-
color: "#6b7280"
|
|
54
|
-
},
|
|
55
|
-
gmButton: {
|
|
56
|
-
fontFamily: '"Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans"',
|
|
57
|
-
fontWeight: 600,
|
|
58
|
-
fontSize: "16px",
|
|
59
|
-
padding: "10px 16px",
|
|
60
|
-
borderRadius: "12px",
|
|
61
|
-
border: "1px solid #e5e7eb",
|
|
62
|
-
background: "#ec4c44",
|
|
63
|
-
color: "#ffffff",
|
|
64
|
-
cursor: "pointer",
|
|
65
|
-
boxShadow: "0 6px 18px rgba(236, 76, 68, .18)",
|
|
66
|
-
transition: "transform .06s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease"
|
|
67
|
-
},
|
|
68
|
-
gmButtonActive: {
|
|
69
|
-
background: "#333",
|
|
70
|
-
color: "#fff"
|
|
71
|
-
},
|
|
72
|
-
gmGameLayout: {
|
|
73
|
-
position: "relative",
|
|
74
|
-
width: "100%",
|
|
75
|
-
// allow the layout to expand within the square container for tablets/laptops
|
|
76
|
-
maxWidth: "none",
|
|
77
|
-
// should fill the parent square, not the full viewport
|
|
78
|
-
minHeight: "100%",
|
|
79
|
-
display: "flex",
|
|
80
|
-
flexDirection: "column",
|
|
81
|
-
alignItems: "center",
|
|
82
|
-
justifyContent: "center",
|
|
83
|
-
textAlign: "center",
|
|
84
|
-
color: "#1f2937",
|
|
85
|
-
padding: "16px 8px",
|
|
86
|
-
margin: "0 auto"
|
|
87
|
-
},
|
|
88
|
-
gmGrid: {
|
|
89
|
-
width: "100%",
|
|
90
|
-
// let the grid use all available space; sizing is controlled in Game.tsx
|
|
91
|
-
maxWidth: "none",
|
|
92
|
-
margin: "0 auto",
|
|
93
|
-
display: "grid",
|
|
94
|
-
// defaults; overridden responsively in Game.tsx
|
|
95
|
-
gridTemplateColumns: "repeat(3, 210px)",
|
|
96
|
-
gridAutoRows: "210px",
|
|
97
|
-
gap: "20px",
|
|
98
|
-
justifyContent: "center"
|
|
99
|
-
},
|
|
100
|
-
gmInput: {
|
|
101
|
-
padding: "6px 10px",
|
|
102
|
-
borderRadius: "6px",
|
|
103
|
-
border: "1px solid #ccc",
|
|
104
|
-
fontSize: "16px",
|
|
105
|
-
fontFamily: '"Geist", system-ui',
|
|
106
|
-
width: "160px"
|
|
107
|
-
},
|
|
108
|
-
gmTable: {
|
|
109
|
-
marginTop: "20px",
|
|
110
|
-
marginBottom: "32px",
|
|
111
|
-
borderCollapse: "collapse",
|
|
112
|
-
width: "100%",
|
|
113
|
-
maxWidth: "520px",
|
|
114
|
-
tableLayout: "fixed",
|
|
115
|
-
textAlign: "center"
|
|
116
|
-
},
|
|
117
|
-
gmTableCell: {
|
|
118
|
-
padding: "8px 12px",
|
|
119
|
-
borderBottom: "1px solid #e5e7eb",
|
|
120
|
-
whiteSpace: "nowrap",
|
|
121
|
-
overflow: "hidden",
|
|
122
|
-
textOverflow: "ellipsis"
|
|
123
|
-
},
|
|
124
|
-
// ✅ Обновлено только для качества логотипа
|
|
125
|
-
gmLogoFixed: {
|
|
126
|
-
position: "absolute",
|
|
127
|
-
top: "28px",
|
|
128
|
-
left: "16px",
|
|
129
|
-
width: "120px",
|
|
130
|
-
zIndex: 10,
|
|
131
|
-
pointerEvents: "none",
|
|
132
|
-
background: "transparent",
|
|
133
|
-
transform: "none",
|
|
134
|
-
willChange: "auto"
|
|
135
|
-
},
|
|
136
|
-
gmLogoImg: {
|
|
137
|
-
height: "clamp(28px, 5vw, 40px)",
|
|
138
|
-
width: "auto",
|
|
139
|
-
background: "transparent",
|
|
140
|
-
objectFit: "contain",
|
|
141
|
-
imageRendering: "auto",
|
|
142
|
-
transform: "translateZ(0)",
|
|
143
|
-
backfaceVisibility: "hidden",
|
|
144
|
-
WebkitFontSmoothing: "antialiased"
|
|
145
|
-
},
|
|
146
|
-
gmHourglass: {
|
|
147
|
-
fontSize: "42px",
|
|
148
|
-
...hi
|
|
149
|
-
}
|
|
150
|
-
}, si = window.origin + "/cloud/speakid/games/whatsmissing/", C = (w, a) => w.map(([g, s, ...p]) => ({
|
|
151
|
-
src: `${si}${a}/${s.replace(/\s/g, "%20")}.png`,
|
|
152
|
-
name: s,
|
|
153
|
-
aliases: p?.length ? p : void 0
|
|
154
|
-
})), ai = [
|
|
25
|
+
const qe = "/cloud/speakid/games/critter-quiz/sounds/";
|
|
26
|
+
function Ze() {
|
|
27
|
+
return typeof import.meta < "u" && !1 ? `${window.origin}/sounds/` : `${window.origin}${qe}`;
|
|
28
|
+
}
|
|
29
|
+
function ie(s) {
|
|
30
|
+
const c = s === "correct" ? "correct.wav" : "wrong.wav";
|
|
31
|
+
Ve(`${Ze()}${c}`);
|
|
32
|
+
}
|
|
33
|
+
const Ke = '@import"https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800;900&display=swap";#whats-missing-root{font-family:Nunito,Fredoka,system-ui,-apple-system,Segoe UI,sans-serif;color:#1f2937;-webkit-font-smoothing:antialiased}#whats-missing-root h1,#whats-missing-root h2,#whats-missing-root p{margin:0}#whats-missing-root button{font:inherit;color:inherit;cursor:pointer}#whats-missing-root .wm-logo{position:absolute;top:28px;left:16px;z-index:30;pointer-events:none}#whats-missing-root .wm-logo img{display:block;height:28px;width:auto;object-fit:contain}#whats-missing-root .wm-lobby{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;gap:24px;padding:40px 48px;box-sizing:border-box}#whats-missing-root .wm-lobbyHero{display:flex;align-items:center;justify-content:center;gap:20px}#whats-missing-root .wm-heroGrid{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:168px;padding:10px;border-radius:18px;overflow:hidden;border:4px solid #fff;box-shadow:0 10px 28px #ec4c442e;background:#fff}#whats-missing-root .wm-heroTile{aspect-ratio:1;border-radius:10px;background:linear-gradient(180deg,#dbeafe,#93c5fd);border:2px solid #f2c4be}#whats-missing-root .wm-heroTile:nth-child(2){background:linear-gradient(180deg,#ffe8e2,#fecaca)}#whats-missing-root .wm-heroTile:nth-child(3){background:linear-gradient(180deg,#d1fae5,#86efac)}#whats-missing-root .wm-heroTileMissing{display:flex;align-items:center;justify-content:center;background:repeating-linear-gradient(45deg,#fff7f5,#fff7f5 6px,#ffe8e2 6px 12px);color:#ec4c44;font-size:28px;font-weight:900;line-height:1}#whats-missing-root .wm-lobbyArrow{width:36px;height:36px;flex-shrink:0;border-radius:50%;background:#ffffffd9;border:2px solid #f2c4be;position:relative}#whats-missing-root .wm-lobbyArrow:after{content:"";position:absolute;top:50%;left:50%;width:10px;height:10px;border-top:3px solid #ec4c44;border-right:3px solid #ec4c44;transform:translate(-60%,-50%) rotate(45deg)}#whats-missing-root .wm-lobbyGuess{display:flex;flex-direction:column;align-items:center;gap:8px}#whats-missing-root .wm-guessCard{min-width:148px;padding:18px 20px 14px;border-radius:18px;background:#ffffffeb;border:3px solid #f2c4be;box-shadow:0 6px 16px #1f29370f;text-align:center}#whats-missing-root .wm-guessPrompt{font-size:13px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#ec4c44}#whats-missing-root .wm-guessLine{margin-top:10px;height:28px;border-bottom:3px dashed #f2c4be;font-size:22px;font-weight:900;color:#1f2937;letter-spacing:.12em}#whats-missing-root .wm-lobbyHead{display:flex;flex-direction:column;align-items:center;gap:12px}#whats-missing-root .wm-brandTitle{font-size:48px;font-weight:900;letter-spacing:-.02em;color:#1f2937;text-align:center;line-height:1.05}#whats-missing-root .wm-brandAccent{color:#ec4c44}#whats-missing-root .wm-lobbySteps{display:flex;align-items:center;gap:20px;margin:0;padding:0;list-style:none}#whats-missing-root .wm-lobbySteps li{display:flex;align-items:center;gap:8px;font-size:18px;font-weight:700;color:#4b5563}#whats-missing-root .wm-stepIcon{width:28px;height:28px;border-radius:8px;flex-shrink:0;border:2px solid #f2c4be;background:#fff;position:relative}#whats-missing-root .wm-stepIconLook{background:linear-gradient(180deg,#dbeafe,#93c5fd)}#whats-missing-root .wm-stepIconLook:after{content:"";position:absolute;inset:6px;border-radius:3px;border:2px solid #fff;box-shadow:inset 0 0 0 1px #1f293726}#whats-missing-root .wm-stepIconGuess{background:#fff7f5}#whats-missing-root .wm-stepIconGuess:after{content:"?";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:900;color:#ec4c44;line-height:1}#whats-missing-root .wm-stepIconWin{background:linear-gradient(180deg,#ffe8e2,#fecaca)}#whats-missing-root .wm-stepIconWin:after{content:"";position:absolute;left:50%;top:50%;width:10px;height:10px;border-radius:50%;background:#ec4c44;transform:translate(-50%,-50%);box-shadow:-6px 0 0 -2px #f9a8a4,6px 0 0 -2px #f9a8a4}#whats-missing-root .wm-roundsRow{display:flex;flex-direction:column;align-items:center;gap:8px}#whats-missing-root .wm-roundsLabel{font-size:14px;font-weight:800;color:#6b7280}#whats-missing-root .wm-roundsPills{display:flex;gap:10px}#whats-missing-root .wm-roundPill{min-width:56px;min-height:44px;padding:0 16px;border-radius:999px;border:3px solid #f2c4be;background:#ffffffe6;color:#4b5563;font-size:20px;font-weight:800;transition:border-color .15s,background .15s,transform .12s,color .15s}#whats-missing-root .wm-roundPill:hover{border-color:#ec4c44;transform:translateY(-1px)}#whats-missing-root .wm-roundPillActive{background:#ec4c44;border-color:#ec4c44;color:#fff;box-shadow:0 4px #c73a34}#whats-missing-root .wm-playBtn,#whats-missing-root .wm-againBtn{min-width:240px;min-height:72px;padding:0 48px;border:none;border-radius:999px;background:#ec4c44;color:#fff;font-size:32px;font-weight:800;letter-spacing:.04em;box-shadow:0 10px #c73a34;transition:transform .12s ease,box-shadow .12s ease}#whats-missing-root .wm-playBtn:hover,#whats-missing-root .wm-againBtn:hover{transform:translateY(-2px);box-shadow:0 12px #c73a34}#whats-missing-root .wm-playBtn:active,#whats-missing-root .wm-againBtn:active{transform:translateY(4px);box-shadow:0 4px #c73a34}#whats-missing-root .wm-topics{display:flex;flex-direction:column;height:100%;padding:28px 48px 32px;gap:14px;box-sizing:border-box}#whats-missing-root .wm-topicsHeader{display:flex;align-items:center;gap:16px;padding-top:44px;flex-shrink:0}#whats-missing-root .wm-topicsBack,#whats-missing-root .wm-ghostBtn{flex-shrink:0;min-height:44px;padding:0 18px;border:3px solid #f2c4be;border-radius:999px;background:#ffffffe6;color:#4b5563;font-size:16px;font-weight:700;transition:border-color .15s,transform .12s,background .15s}#whats-missing-root .wm-topicsBack:hover,#whats-missing-root .wm-ghostBtn:hover{border-color:#ec4c44;background:#fff;transform:translateY(-1px)}#whats-missing-root .wm-topicsTitle{font-size:36px;font-weight:800;color:#1f2937}#whats-missing-root .wm-topicsMeta{margin-left:auto;font-size:16px;font-weight:800;color:#ec4c44;padding:4px 12px;border-radius:999px;background:#ffffffeb;border:2px solid #f2c4be}#whats-missing-root .wm-topicsGrid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;flex:1;align-content:start;overflow:auto;padding-bottom:4px}#whats-missing-root .wm-topicCard{display:flex;flex-direction:row;align-items:stretch;gap:14px;min-height:88px;padding:0 16px 0 0;overflow:hidden;border:3px solid #f2c4be;border-radius:18px;background:#ffffffd9;text-align:left;transition:border-color .15s,transform .12s,background .15s}#whats-missing-root .wm-topicCardRandom{align-items:center;padding:10px 14px;background:linear-gradient(135deg,#fff7f5,#ffe8e2);border-color:#ec4c44;border-style:dashed}#whats-missing-root .wm-topicCard:hover{border-color:#ec4c44;transform:translateY(-2px);background:#fff}#whats-missing-root .wm-topicPreview{width:110px;flex-shrink:0;align-self:stretch;object-fit:cover;object-position:center;border:none;border-radius:15px 0 0 15px;background:#fff7f5}#whats-missing-root .wm-topicRandomIcon{width:52px;height:52px;flex-shrink:0;border-radius:12px;border:2px solid #f2c4be;background:#fff;position:relative}#whats-missing-root .wm-topicRandomIcon:before,#whats-missing-root .wm-topicRandomIcon:after{content:"";position:absolute;left:50%;top:50%;width:22px;height:4px;border-radius:2px;background:#ec4c44;transform:translate(-50%,-50%)}#whats-missing-root .wm-topicRandomIcon:after{transform:translate(-50%,-50%) rotate(90deg)}#whats-missing-root .wm-topicBody{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:2px;min-width:0}#whats-missing-root .wm-topicLabel{font-size:18px;font-weight:800;color:#1f2937;line-height:1.2}#whats-missing-root .wm-topicExample{font-size:13px;color:#6b7280;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}#whats-missing-root .wm-final{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;gap:14px;padding:48px;box-sizing:border-box}#whats-missing-root .wm-finalTitle{font-size:52px;font-weight:900;color:#ec4c44}#whats-missing-root .wm-finalScore{font-size:26px;font-weight:700;color:#4b5563}#whats-missing-root .wm-finalTeamLabel{font-size:22px;font-weight:800;color:#1f2937;margin-top:4px}#whats-missing-root .wm-trophyRow{display:flex;flex-wrap:wrap;justify-content:center;gap:16px;max-width:960px;margin:8px 0 12px;min-height:140px}#whats-missing-root .wm-trophyCard{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:120px}#whats-missing-root .wm-trophy{width:112px;height:112px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:#ffffffd9;border-radius:24px;border:4px solid #f2c4be;padding:8px}#whats-missing-root .wm-trophy.correct{border-color:#10b981;background:#ecfdf5}#whats-missing-root .wm-trophy.almost{border-color:#f59e0b;background:#fffbeb}#whats-missing-root .wm-trophy.wrong{border-color:#ef4444;background:#fef2f2}#whats-missing-root .wm-trophyMark{font-size:28px;font-weight:900;line-height:1}#whats-missing-root .wm-trophy.correct .wm-trophyMark{color:#059669}#whats-missing-root .wm-trophy.almost .wm-trophyMark{color:#d97706}#whats-missing-root .wm-trophy.wrong .wm-trophyMark{color:#dc2626}#whats-missing-root .wm-trophyWord{font-size:13px;font-weight:800;color:#1f2937;text-align:center;max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#whats-missing-root .wm-trophyEmpty{font-size:20px;color:#9ca3af;align-self:center}#whats-missing-root .wm-finalActions{display:flex;align-items:center;gap:14px;margin-top:8px}#whats-missing-root .wm-againBtn{font-size:26px;min-width:260px}#whats-missing-root .wm-play{display:flex;flex-direction:column;height:100%;min-height:0;padding:56px 40px 16px;box-sizing:border-box;gap:10px;position:relative}#whats-missing-root .wm-play--ready{justify-content:center;align-items:center;padding:0;gap:0}#whats-missing-root .wm-play--ready .wm-playStatus{min-height:0}#whats-missing-root .wm-play--ready .wm-playControls{display:none}#whats-missing-root .wm-playStatus{flex-shrink:0;text-align:center;font-size:22px;font-weight:800;color:#4b5563;min-height:32px;line-height:1.2}#whats-missing-root .wm-playStatusReady{color:#ec4c44;font-size:48px;font-weight:900;letter-spacing:.04em}#whats-missing-root .wm-readyBlock{display:flex;flex-direction:column;align-items:center;gap:28px}#whats-missing-root .wm-readyLoad{display:flex;flex-direction:column;align-items:center;gap:18px}#whats-missing-root .wm-readyTiles{display:grid;grid-template-columns:1fr 1fr;gap:6px;width:120px;padding:8px;border-radius:16px;overflow:hidden;border:4px solid #fff;box-shadow:0 10px 28px #ec4c442e;background:#fff}#whats-missing-root .wm-readyTiles .wm-heroTile{border-radius:8px}#whats-missing-root .wm-play--ready .wm-heroTileMissing{animation:wm-ready-pulse .9s ease-in-out infinite}#whats-missing-root .wm-readyBar{width:220px;height:14px;border-radius:999px;background:#fff;border:3px solid #f2c4be;box-shadow:0 4px #f2c4be;overflow:hidden;box-sizing:border-box}#whats-missing-root .wm-readyBarFill{display:block;height:100%;width:0;border-radius:inherit;background:#ec4c44;animation:wm-ready-fill var(--wm-ready-s, 5s) linear forwards}@keyframes wm-ready-fill{0%{width:0}to{width:100%}}@keyframes wm-ready-pulse{0%,to{transform:scale(1)}50%{transform:scale(.92)}}#whats-missing-root .wm-playStatusMemorize{color:#10b981}#whats-missing-root .wm-playSlot{flex:1 1 0;min-height:0;width:100%;display:flex;align-items:center;justify-content:center}#whats-missing-root .wm-playGrid{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:16px;width:min(100%,580px);aspect-ratio:1 / 1;max-height:100%}#whats-missing-root .wm-playCard{min-width:0;min-height:0;border-radius:18px;overflow:hidden;background:#fff;border:3px solid #f2c4be;box-shadow:0 8px 22px #ec4c441a;display:flex;align-items:center;justify-content:center}#whats-missing-root .wm-playCard img{width:100%;height:100%;object-fit:cover;object-position:center}#whats-missing-root .wm-playCardCorrect{border-color:#10b981;background:#ecfdf5;box-shadow:0 0 18px #10b98173}#whats-missing-root .wm-playCardWrong{border-color:#ec4c44;background:#fef2f2;box-shadow:0 0 18px #ec4c4459}#whats-missing-root .wm-playControls{flex-shrink:0;min-height:72px;display:flex;align-items:center;justify-content:center}#whats-missing-root .wm-guessRow{display:flex;align-items:center;justify-content:center;gap:12px}#whats-missing-root .wm-guessInput{width:280px;min-height:52px;padding:0 18px;border:3px solid #f2c4be;border-radius:16px;background:#fff;color:#1f2937;font-size:20px;font-weight:700;outline:none;box-sizing:border-box}#whats-missing-root .wm-guessInput:focus{border-color:#ec4c44}#whats-missing-root .wm-guessInput::placeholder{color:#9ca3af;font-weight:600}#whats-missing-root .wm-actionBtn{min-height:52px;min-width:140px;padding:0 28px;border:none;border-radius:999px;background:#ec4c44;color:#fff;font-size:20px;font-weight:800;letter-spacing:.02em;box-shadow:0 6px #c73a34;transition:transform .12s ease,box-shadow .12s ease}#whats-missing-root .wm-actionBtn:hover{transform:translateY(-2px);box-shadow:0 8px #c73a34}#whats-missing-root .wm-actionBtn:active{transform:translateY(3px);box-shadow:0 3px #c73a34}#whats-missing-root .wm-actionBtn:disabled{opacity:.7;cursor:default;transform:none;box-shadow:0 6px #c73a34}@media(prefers-reduced-motion:reduce){#whats-missing-root .wm-playBtn,#whats-missing-root .wm-againBtn,#whats-missing-root .wm-topicCard,#whats-missing-root .wm-roundPill,#whats-missing-root .wm-topicsBack,#whats-missing-root .wm-ghostBtn,#whats-missing-root .wm-actionBtn{transition:none}#whats-missing-root .wm-play--ready .wm-heroTileMissing{animation:none}#whats-missing-root .wm-readyBarFill{animation:none;width:100%}}', Qe = window.origin + "/cloud/speakid/games/whatsmissing/", Xe = (s) => Qe, f = (s, c) => s.map(([n, l, ...m]) => ({
|
|
34
|
+
src: `${Xe()}${c}/${l.replace(/\s/g, "%20")}.png`,
|
|
35
|
+
name: l,
|
|
36
|
+
aliases: m?.length ? m : void 0
|
|
37
|
+
})), Je = [
|
|
155
38
|
["apple", "apple"],
|
|
156
39
|
["banana", "banana"],
|
|
157
40
|
["bread", "bread"],
|
|
@@ -177,7 +60,7 @@ const hi = {
|
|
|
177
60
|
["strawberry", "strawberry"],
|
|
178
61
|
["tomato", "tomato"],
|
|
179
62
|
["watermelon", "watermelon"]
|
|
180
|
-
],
|
|
63
|
+
], et = [
|
|
181
64
|
["bear", "bear"],
|
|
182
65
|
["cat", "cat"],
|
|
183
66
|
["crocodile", "crocodile", "alligator"],
|
|
@@ -197,14 +80,14 @@ const hi = {
|
|
|
197
80
|
["tortoise", "tortoise", "turtle"],
|
|
198
81
|
["wolf", "wolf"],
|
|
199
82
|
["zebra", "zebra"]
|
|
200
|
-
],
|
|
83
|
+
], tt = [
|
|
201
84
|
["ball", "ball"],
|
|
202
85
|
["balloon", "balloon"],
|
|
203
86
|
["blocks", "blocks"],
|
|
204
87
|
["car", "car"],
|
|
205
88
|
["doll", "doll"],
|
|
206
89
|
["drum", "drum"],
|
|
207
|
-
["
|
|
90
|
+
["robot", "robot"],
|
|
208
91
|
["jump_rope", "jump rope"],
|
|
209
92
|
["kite", "kite"],
|
|
210
93
|
["paints", "paints"],
|
|
@@ -217,7 +100,7 @@ const hi = {
|
|
|
217
100
|
["teddy_bear", "teddy bear"],
|
|
218
101
|
["yo-yo", "yo-yo"],
|
|
219
102
|
["crayons", "crayons"]
|
|
220
|
-
],
|
|
103
|
+
], ot = [
|
|
221
104
|
["t-shirt", "T-shirt"],
|
|
222
105
|
["dress", "dress"],
|
|
223
106
|
["hat", "hat"],
|
|
@@ -233,7 +116,7 @@ const hi = {
|
|
|
233
116
|
["cap", "cap"],
|
|
234
117
|
["boots", "boots"],
|
|
235
118
|
["pyjamas", "pyjamas"]
|
|
236
|
-
],
|
|
119
|
+
], st = [
|
|
237
120
|
["car", "car"],
|
|
238
121
|
["bus", "bus"],
|
|
239
122
|
["bike", "bike"],
|
|
@@ -249,7 +132,7 @@ const hi = {
|
|
|
249
132
|
["motorbike", "motorbike"],
|
|
250
133
|
["tram", "tram"],
|
|
251
134
|
["submarine", "submarine"]
|
|
252
|
-
],
|
|
135
|
+
], it = [
|
|
253
136
|
["sun", "sun"],
|
|
254
137
|
["cloud", "cloud"],
|
|
255
138
|
["rain", "rain"],
|
|
@@ -265,7 +148,7 @@ const hi = {
|
|
|
265
148
|
["snow", "snow"],
|
|
266
149
|
["butterfly", "butterfly"],
|
|
267
150
|
["bird", "bird"]
|
|
268
|
-
],
|
|
151
|
+
], nt = [
|
|
269
152
|
["bed", "bed"],
|
|
270
153
|
["table", "table"],
|
|
271
154
|
["chair", "chair"],
|
|
@@ -281,7 +164,7 @@ const hi = {
|
|
|
281
164
|
["plate", "plate"],
|
|
282
165
|
["mirror", "mirror"],
|
|
283
166
|
["book", "book"]
|
|
284
|
-
],
|
|
167
|
+
], rt = [
|
|
285
168
|
["book", "book"],
|
|
286
169
|
["pen", "pen"],
|
|
287
170
|
["pencil", "pencil"],
|
|
@@ -297,16 +180,81 @@ const hi = {
|
|
|
297
180
|
["pencil_case", "pencil case"],
|
|
298
181
|
["paintbrush", "paintbrush"],
|
|
299
182
|
["backpack", "backpack"]
|
|
300
|
-
],
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
183
|
+
], at = [
|
|
184
|
+
["piano", "piano"],
|
|
185
|
+
["bell", "bell", "bells"],
|
|
186
|
+
["radio", "radio"],
|
|
187
|
+
["cd", "CD", "disc"],
|
|
188
|
+
["mic", "mic", "microphone"],
|
|
189
|
+
["singer", "singer"],
|
|
190
|
+
["dancer", "dancer"],
|
|
191
|
+
["stage", "stage"],
|
|
192
|
+
["band", "band"],
|
|
193
|
+
["ticket", "ticket"],
|
|
194
|
+
["karaoke", "karaoke"],
|
|
195
|
+
["guitar", "guitar"],
|
|
196
|
+
["fan", "fan"]
|
|
197
|
+
], lt = [
|
|
198
|
+
["football", "football", "soccer"],
|
|
199
|
+
["basketball", "basketball"],
|
|
200
|
+
["tennis", "tennis"],
|
|
201
|
+
["skiing", "skiing", "ski"],
|
|
202
|
+
["swimming", "swimming", "swim"],
|
|
203
|
+
["skating", "skating", "ice skating"],
|
|
204
|
+
["hockey", "hockey", "ice hockey"],
|
|
205
|
+
["volleyball", "volleyball"],
|
|
206
|
+
["golf", "golf"],
|
|
207
|
+
["boxing", "boxing"],
|
|
208
|
+
["running", "running", "run"],
|
|
209
|
+
["medal", "medal"],
|
|
210
|
+
["trophy", "trophy"],
|
|
211
|
+
["whistle", "whistle"],
|
|
212
|
+
["helmet", "helmet"]
|
|
213
|
+
], ct = [
|
|
214
|
+
["head", "head"],
|
|
215
|
+
["eye", "eye", "eyes"],
|
|
216
|
+
["ear", "ear", "ears"],
|
|
217
|
+
["nose", "nose"],
|
|
218
|
+
["mouth", "mouth"],
|
|
219
|
+
["hand", "hand", "hands"],
|
|
220
|
+
["finger", "finger", "fingers"],
|
|
221
|
+
["arm", "arm", "arms"],
|
|
222
|
+
["leg", "leg", "legs"],
|
|
223
|
+
["foot", "foot", "feet"],
|
|
224
|
+
["knee", "knee", "knees"],
|
|
225
|
+
["hair", "hair"],
|
|
226
|
+
["tooth", "tooth", "teeth"],
|
|
227
|
+
["tongue", "tongue"],
|
|
228
|
+
["shoulder", "shoulder", "shoulders"]
|
|
229
|
+
], dt = [
|
|
230
|
+
["umbrella", "umbrella"],
|
|
231
|
+
["lightning", "lightning", "thunder"],
|
|
232
|
+
["wind", "wind"],
|
|
233
|
+
["storm", "storm"],
|
|
234
|
+
["fog", "fog", "mist"],
|
|
235
|
+
["ice", "ice"],
|
|
236
|
+
["raincoat", "raincoat"],
|
|
237
|
+
["puddle", "puddle"],
|
|
238
|
+
["snowflake", "snowflake"],
|
|
239
|
+
["icicle", "icicle"],
|
|
240
|
+
["thermometer", "thermometer"],
|
|
241
|
+
["tornado", "tornado"],
|
|
242
|
+
["raindrop", "raindrop", "drop"],
|
|
243
|
+
["frost", "frost"]
|
|
244
|
+
], M = {
|
|
245
|
+
food: f(Je, "food"),
|
|
246
|
+
animals: f(et, "animals"),
|
|
247
|
+
toys: f(tt, "toys"),
|
|
248
|
+
clothes: f(ot, "clothes"),
|
|
249
|
+
transport: f(st, "transport"),
|
|
250
|
+
nature: f(it, "nature"),
|
|
251
|
+
home: f(nt, "home"),
|
|
252
|
+
school: f(rt, "school"),
|
|
253
|
+
music: f(at, "music"),
|
|
254
|
+
sports: f(lt, "sports"),
|
|
255
|
+
body: f(ct, "body"),
|
|
256
|
+
weather: f(dt, "weather")
|
|
257
|
+
}, ne = [
|
|
310
258
|
"animals",
|
|
311
259
|
"food",
|
|
312
260
|
"toys",
|
|
@@ -314,22 +262,43 @@ const hi = {
|
|
|
314
262
|
"transport",
|
|
315
263
|
"nature",
|
|
316
264
|
"home",
|
|
317
|
-
"school"
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
265
|
+
"school",
|
|
266
|
+
"music",
|
|
267
|
+
"sports",
|
|
268
|
+
"body",
|
|
269
|
+
"weather"
|
|
270
|
+
], mt = {
|
|
271
|
+
animals: "Animals",
|
|
272
|
+
food: "Food",
|
|
273
|
+
toys: "Toys",
|
|
274
|
+
clothes: "Clothes",
|
|
275
|
+
transport: "Transport",
|
|
276
|
+
nature: "Nature",
|
|
277
|
+
home: "Home",
|
|
278
|
+
school: "School",
|
|
279
|
+
music: "Music",
|
|
280
|
+
sports: "Sports",
|
|
281
|
+
body: "Body",
|
|
282
|
+
weather: "Weather"
|
|
283
|
+
}, pt = {
|
|
284
|
+
animals: "cat, dog, bear…",
|
|
285
|
+
food: "apple, pizza, cake…",
|
|
286
|
+
toys: "ball, doll, robot…",
|
|
287
|
+
clothes: "T-shirt, hat, shoes…",
|
|
288
|
+
transport: "car, bus, plane…",
|
|
289
|
+
nature: "sun, tree, flower…",
|
|
290
|
+
home: "bed, table, lamp…",
|
|
291
|
+
school: "book, pen, bag…",
|
|
292
|
+
music: "piano, guitar, singer…",
|
|
293
|
+
sports: "football, skiing, medal…",
|
|
294
|
+
body: "head, hand, eye…",
|
|
295
|
+
weather: "umbrella, storm, snowflake…"
|
|
296
|
+
}, ht = () => {
|
|
297
|
+
const s = document.createElement("style");
|
|
298
|
+
s.id = "whats-missing-reset", s.textContent = `
|
|
330
299
|
#whats-missing-root, #whats-missing-root * {
|
|
331
300
|
box-sizing: border-box;
|
|
332
|
-
font-family: "
|
|
301
|
+
font-family: "Nunito", "Fredoka", system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
333
302
|
}
|
|
334
303
|
#whats-missing-root img {
|
|
335
304
|
max-width: 100%;
|
|
@@ -352,13 +321,14 @@ const hi = {
|
|
|
352
321
|
height: 100% !important;
|
|
353
322
|
overflow: hidden !important;
|
|
354
323
|
}
|
|
324
|
+
${Ke}
|
|
355
325
|
`;
|
|
356
|
-
const
|
|
357
|
-
|
|
326
|
+
const c = document.getElementById("whats-missing-reset");
|
|
327
|
+
c && c.remove(), document.head.appendChild(s);
|
|
358
328
|
};
|
|
359
|
-
class
|
|
360
|
-
constructor(
|
|
361
|
-
this.seed =
|
|
329
|
+
class wt {
|
|
330
|
+
constructor(c) {
|
|
331
|
+
this.seed = c;
|
|
362
332
|
}
|
|
363
333
|
// Linear Congruential Generator (LCG)
|
|
364
334
|
// Используем параметры из Numerical Recipes
|
|
@@ -366,184 +336,183 @@ class yi {
|
|
|
366
336
|
return this.seed = (this.seed * 1664525 + 1013904223) % Math.pow(2, 32), this.seed / Math.pow(2, 32);
|
|
367
337
|
}
|
|
368
338
|
// Генерирует случайное число от 0 до max (не включая max)
|
|
369
|
-
nextInt(
|
|
370
|
-
return Math.floor(this.next() *
|
|
339
|
+
nextInt(c) {
|
|
340
|
+
return Math.floor(this.next() * c);
|
|
371
341
|
}
|
|
372
342
|
}
|
|
373
|
-
const
|
|
374
|
-
const
|
|
375
|
-
for (let
|
|
376
|
-
for (let
|
|
377
|
-
for (let
|
|
378
|
-
for (let
|
|
379
|
-
|
|
380
|
-
return
|
|
381
|
-
},
|
|
382
|
-
const
|
|
383
|
-
|
|
384
|
-
}),
|
|
385
|
-
const
|
|
386
|
-
const
|
|
387
|
-
|
|
343
|
+
const gt = (s, c) => {
|
|
344
|
+
const n = Array.from({ length: s.length + 1 }, () => Array(c.length + 1).fill(0));
|
|
345
|
+
for (let l = 0; l <= s.length; l++) n[l][0] = l;
|
|
346
|
+
for (let l = 0; l <= c.length; l++) n[0][l] = l;
|
|
347
|
+
for (let l = 1; l <= s.length; l++)
|
|
348
|
+
for (let m = 1; m <= c.length; m++)
|
|
349
|
+
n[l][m] = s[l - 1] === c[m - 1] ? n[l - 1][m - 1] : Math.min(n[l - 1][m - 1], n[l][m - 1], n[l - 1][m]) + 1;
|
|
350
|
+
return n[s.length][c.length];
|
|
351
|
+
}, ft = (s) => new Promise((c) => {
|
|
352
|
+
const n = new Image();
|
|
353
|
+
n.onload = () => c(n), n.onerror = () => c(n), n.src = s;
|
|
354
|
+
}), re = async (s, c) => {
|
|
355
|
+
const n = /* @__PURE__ */ new Map(), l = s.map(async (m) => {
|
|
356
|
+
const b = await ft(m);
|
|
357
|
+
n.set(m, b);
|
|
388
358
|
});
|
|
389
|
-
return await Promise.allSettled(
|
|
359
|
+
return await Promise.allSettled(l), n;
|
|
390
360
|
};
|
|
391
|
-
function
|
|
392
|
-
gameCubeSize:
|
|
393
|
-
screenHeight:
|
|
394
|
-
screenWidth:
|
|
395
|
-
seed:
|
|
361
|
+
function ut({
|
|
362
|
+
gameCubeSize: s,
|
|
363
|
+
screenHeight: c,
|
|
364
|
+
screenWidth: n,
|
|
365
|
+
seed: l
|
|
396
366
|
}) {
|
|
397
|
-
const
|
|
398
|
-
|
|
367
|
+
const m = P(null);
|
|
368
|
+
L(() => (ht(), () => {
|
|
399
369
|
document.documentElement.style.overflow = "", document.body.style.overflow = "";
|
|
400
|
-
const
|
|
401
|
-
|
|
370
|
+
const e = document.getElementById("whats-missing-reset");
|
|
371
|
+
e && e.remove(), x.current && x.current.abort();
|
|
402
372
|
}), []);
|
|
403
|
-
const [
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
}, [
|
|
407
|
-
const
|
|
408
|
-
|
|
409
|
-
const
|
|
410
|
-
const o =
|
|
411
|
-
if (
|
|
412
|
-
|
|
413
|
-
else if (
|
|
414
|
-
|
|
415
|
-
else if (
|
|
416
|
-
const
|
|
417
|
-
|
|
373
|
+
const [b, B] = a(null), [w, z] = a([]), [E, ke] = a(4), [ae, U] = a(1), [T, le] = a(!1), [C, ce] = a(1), [y, ve] = a(null), [u, R] = a("ready"), [F, de] = a(5), [O, V] = a(6), [q, me] = a(20), [Ie, Z] = a(0), [A, K] = a(!1), [j, pe] = a(""), [v, Q] = a(!1), [G, he] = a(!1), [we, S] = a(null), [ge, X] = a([]), [Ne, fe] = a([]), [xt, ze] = a(!1), [yt, H] = a(1), [kt, D] = a(null), [vt, Te] = a(!1), [It, Se] = a(!1), [Nt, Pe] = a(!1), [zt, Me] = a(!1), [Tt, Le] = a(!1), [St, Be] = a(!1), [Pt, Ee] = a(!1), [Mt, Ce] = a(!1), [Lt, Re] = a(!1), [Bt, Ae] = a(!1), J = P(/* @__PURE__ */ new Set()), $ = P(/* @__PURE__ */ new Map()), x = P(null), I = P(null);
|
|
374
|
+
L(() => {
|
|
375
|
+
l !== void 0 ? I.current = new wt(l) : I.current = null;
|
|
376
|
+
}, [l]);
|
|
377
|
+
const je = () => I.current ? I.current.next() : Math.random(), ee = (e) => I.current ? I.current.nextInt(e) : Math.floor(Math.random() * e);
|
|
378
|
+
L(() => {
|
|
379
|
+
const e = () => {
|
|
380
|
+
const o = n ?? window.innerWidth, r = c ?? window.innerHeight, d = o < 768 || o === 926 && r === 428 || o === 932 && r === 430, p = r < 700, h = o / r > 1.8, g = o === 768 && r === 1024, xe = o === 1024 && r === 768, W = o === 820 && r === 1180, k = o === 1180 && r === 820, N = o === 540 && r === 720, We = o === 720 && r === 540, _e = o === 1024 && r === 1366, Ye = o === 1366 && r === 1024, Ue = o >= 1200 && r >= 600 && !d;
|
|
381
|
+
if (Te(Ue), Se(g), Pe(xe), Me(W), Le(k), Be(N), Ee(We), Ce(_e), Re(Ye), Ae(h), ze(d), d)
|
|
382
|
+
D(s && s >= 320 ? s : null), H(1);
|
|
383
|
+
else if (p)
|
|
384
|
+
D(s && s >= 400 ? s : null), H(1);
|
|
385
|
+
else if (h) {
|
|
386
|
+
const se = s ? Math.max(400, Math.min(1200, s)) : Math.min(1e3, Math.min(o, r) * 0.9);
|
|
387
|
+
D(se), H(1);
|
|
418
388
|
} else {
|
|
419
|
-
const
|
|
420
|
-
|
|
389
|
+
const se = s ? Math.max(400, Math.min(1200, s)) : Math.min(1e3, Math.min(o, r) * 0.9);
|
|
390
|
+
D(se), H(1);
|
|
421
391
|
}
|
|
422
392
|
};
|
|
423
|
-
return
|
|
424
|
-
}, [
|
|
425
|
-
const
|
|
426
|
-
|
|
427
|
-
const
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
393
|
+
return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
394
|
+
}, [n, c, s]);
|
|
395
|
+
const te = (e) => [...e].sort(() => je() - 0.5).slice(0, 4), Ge = (e) => {
|
|
396
|
+
x.current && x.current.abort(), x.current = new AbortController();
|
|
397
|
+
const r = M[e].map((d) => d.src);
|
|
398
|
+
re(r, x.current.signal).then((d) => {
|
|
399
|
+
r.forEach((p) => {
|
|
400
|
+
J.current.add(p), d.has(p) && $.current.set(p, d.get(p));
|
|
431
401
|
});
|
|
432
402
|
}).catch(() => {
|
|
433
403
|
});
|
|
434
|
-
},
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
const
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
404
|
+
}, oe = (e) => {
|
|
405
|
+
const o = e ?? b;
|
|
406
|
+
if (!o) return;
|
|
407
|
+
e && B(e), Ge(o);
|
|
408
|
+
const r = te(M[o]);
|
|
409
|
+
z(r), le(!0), K(!1), ce(1), Z(0), X([]), fe([]);
|
|
410
|
+
const d = r.map((p) => p.src);
|
|
411
|
+
re(d, x.current?.signal).then((p) => {
|
|
412
|
+
d.forEach((h) => {
|
|
413
|
+
J.current.add(h), p.has(h) && $.current.set(h, p.get(h));
|
|
442
414
|
});
|
|
443
415
|
}).catch(() => {
|
|
444
|
-
}),
|
|
445
|
-
},
|
|
446
|
-
const
|
|
447
|
-
let
|
|
448
|
-
for (; o.includes(
|
|
449
|
-
|
|
450
|
-
if (
|
|
451
|
-
const
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
416
|
+
}), ue(r, [], !0);
|
|
417
|
+
}, ue = (e = w, o = Ne, r = !1) => {
|
|
418
|
+
const d = te(e.length ? e : M[b]);
|
|
419
|
+
let p = ee(d.length), h = d[p].name, g = 0;
|
|
420
|
+
for (; o.includes(h) && g < 20; )
|
|
421
|
+
p = ee(d.length), h = d[p].name, g++;
|
|
422
|
+
if (z(d), ve(p), fe([...o, h]), Q(!1), pe(""), me(20), S(null), b && !r) {
|
|
423
|
+
const W = te(M[b].filter((k) => !o.includes(k.name))).map((k) => k.src);
|
|
424
|
+
re(W, x.current?.signal).then((k) => {
|
|
425
|
+
W.forEach((N) => {
|
|
426
|
+
J.current.add(N), k.has(N) && $.current.set(N, k.get(N));
|
|
455
427
|
});
|
|
456
428
|
}).catch(() => {
|
|
457
429
|
});
|
|
458
430
|
}
|
|
459
|
-
|
|
431
|
+
r ? (R("ready"), de(5), V(6)) : (R("memorize"), V(6));
|
|
460
432
|
};
|
|
461
|
-
|
|
462
|
-
if (!(!
|
|
463
|
-
if (
|
|
464
|
-
if (
|
|
433
|
+
L(() => {
|
|
434
|
+
if (!(!T || A || v)) {
|
|
435
|
+
if (u === "ready")
|
|
436
|
+
if (F <= 0) R("memorize");
|
|
465
437
|
else {
|
|
466
|
-
const
|
|
467
|
-
return () => clearTimeout(
|
|
438
|
+
const e = setTimeout(() => de((o) => o - 1), 1e3);
|
|
439
|
+
return () => clearTimeout(e);
|
|
468
440
|
}
|
|
469
|
-
if (
|
|
470
|
-
if (
|
|
441
|
+
if (u === "memorize")
|
|
442
|
+
if (O <= 0) R("guess");
|
|
471
443
|
else {
|
|
472
|
-
const
|
|
473
|
-
return () => clearTimeout(
|
|
444
|
+
const e = setTimeout(() => V((o) => o - 1), 1e3);
|
|
445
|
+
return () => clearTimeout(e);
|
|
474
446
|
}
|
|
475
|
-
if (
|
|
476
|
-
if (
|
|
477
|
-
|
|
478
|
-
const o =
|
|
479
|
-
|
|
480
|
-
...
|
|
481
|
-
{ round:
|
|
447
|
+
if (u === "guess") {
|
|
448
|
+
if (q <= 0) {
|
|
449
|
+
Q(!0), S("wrong");
|
|
450
|
+
const o = w[y].name, r = w[y].aliases, d = [o, ...r || []].join(", ");
|
|
451
|
+
X((p) => [
|
|
452
|
+
...p,
|
|
453
|
+
{ round: C, answer: j, correct: d, result: "wrong" }
|
|
482
454
|
]);
|
|
483
455
|
return;
|
|
484
456
|
}
|
|
485
|
-
const
|
|
486
|
-
return () => clearTimeout(
|
|
457
|
+
const e = setTimeout(() => me((o) => o - 1), 1e3);
|
|
458
|
+
return () => clearTimeout(e);
|
|
487
459
|
}
|
|
488
460
|
}
|
|
489
461
|
}, [
|
|
462
|
+
u,
|
|
463
|
+
F,
|
|
464
|
+
O,
|
|
465
|
+
q,
|
|
490
466
|
T,
|
|
491
|
-
mn,
|
|
492
|
-
tn,
|
|
493
|
-
wn,
|
|
494
|
-
B,
|
|
495
|
-
V,
|
|
496
467
|
A,
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
468
|
+
v,
|
|
469
|
+
w,
|
|
470
|
+
y,
|
|
471
|
+
C,
|
|
472
|
+
j
|
|
501
473
|
]);
|
|
502
|
-
const
|
|
503
|
-
if (
|
|
504
|
-
const
|
|
505
|
-
let
|
|
506
|
-
const
|
|
507
|
-
|
|
508
|
-
...
|
|
509
|
-
{ round:
|
|
510
|
-
]),
|
|
511
|
-
|
|
474
|
+
const be = () => {
|
|
475
|
+
if (y === null || G) return;
|
|
476
|
+
const e = w[y].name, o = w[y].aliases, r = j.toLowerCase().trim();
|
|
477
|
+
let d = "wrong";
|
|
478
|
+
const p = [e, ...o || []].map((g) => g.toLowerCase()), h = [e, ...o || []].join(", ");
|
|
479
|
+
p.includes(r) ? (Z((g) => g + 1), S("correct"), d = "correct", ie("correct")) : p.some((g) => gt(r, g) === 1) ? (Z((g) => g + 0.5), S("almost"), d = "almost", ie("correct")) : (S("wrong"), d = "wrong", ie("wrong")), X((g) => [
|
|
480
|
+
...g,
|
|
481
|
+
{ round: C, answer: r, correct: h, result: d }
|
|
482
|
+
]), he(!0), setTimeout(() => {
|
|
483
|
+
he(!1), Q(!0);
|
|
512
484
|
}, 600);
|
|
513
|
-
},
|
|
514
|
-
|
|
515
|
-
},
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
"
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
"
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
] }) })
|
|
535
|
-
), []);
|
|
536
|
-
return /* @__PURE__ */ l(
|
|
485
|
+
}, He = () => C < E ? (ce((e) => e + 1), ue()) : K(!0), De = () => {
|
|
486
|
+
x.current && x.current.abort(), le(!1), K(!1), B(null), U(2);
|
|
487
|
+
}, $e = ye(() => /* @__PURE__ */ t("div", { className: "wm-logo", children: /* @__PURE__ */ i("picture", { children: [
|
|
488
|
+
/* @__PURE__ */ t(
|
|
489
|
+
"source",
|
|
490
|
+
{
|
|
491
|
+
srcSet: window.origin + "/cloud/speakid/games/whatsmissing/logo.svg",
|
|
492
|
+
type: "image/svg+xml"
|
|
493
|
+
}
|
|
494
|
+
),
|
|
495
|
+
/* @__PURE__ */ t(
|
|
496
|
+
"img",
|
|
497
|
+
{
|
|
498
|
+
src: window.origin + "/cloud/speakid/games/whatsmissing/logo.png",
|
|
499
|
+
alt: "SPEAKID",
|
|
500
|
+
loading: "lazy",
|
|
501
|
+
draggable: !1
|
|
502
|
+
}
|
|
503
|
+
)
|
|
504
|
+
] }) }), []);
|
|
505
|
+
return /* @__PURE__ */ t(
|
|
537
506
|
"div",
|
|
538
507
|
{
|
|
539
|
-
ref:
|
|
508
|
+
ref: m,
|
|
540
509
|
style: {
|
|
541
510
|
width: "100%",
|
|
542
511
|
height: "100%",
|
|
543
512
|
display: "flex",
|
|
544
513
|
justifyContent: "center",
|
|
545
514
|
alignItems: "center",
|
|
546
|
-
background: "
|
|
515
|
+
background: "radial-gradient(ellipse 80% 60% at 20% 10%, rgba(236, 76, 68, 0.12), transparent 55%), radial-gradient(ellipse 70% 50% at 90% 80%, rgba(123, 200, 164, 0.18), transparent 50%), linear-gradient(160deg, #fff7f5 0%, #ffe8e2 45%, #fff4ec 100%)",
|
|
547
516
|
transition: "background 0.3s ease",
|
|
548
517
|
overflow: "hidden",
|
|
549
518
|
position: "absolute",
|
|
@@ -552,468 +521,292 @@ function vi({
|
|
|
552
521
|
right: 0,
|
|
553
522
|
bottom: 0
|
|
554
523
|
},
|
|
555
|
-
children:
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
/* @__PURE__ */
|
|
591
|
-
/* @__PURE__ */
|
|
592
|
-
/* @__PURE__ */ t(
|
|
524
|
+
children: /* @__PURE__ */ t(
|
|
525
|
+
"div",
|
|
526
|
+
{
|
|
527
|
+
style: {
|
|
528
|
+
width: "100%",
|
|
529
|
+
height: "100%",
|
|
530
|
+
display: "flex",
|
|
531
|
+
justifyContent: "center",
|
|
532
|
+
alignItems: "center",
|
|
533
|
+
overflow: "hidden",
|
|
534
|
+
borderRadius: 0,
|
|
535
|
+
background: "transparent",
|
|
536
|
+
boxShadow: "none",
|
|
537
|
+
margin: "0 auto",
|
|
538
|
+
position: "relative",
|
|
539
|
+
transform: "none"
|
|
540
|
+
},
|
|
541
|
+
children: /* @__PURE__ */ t(
|
|
542
|
+
"div",
|
|
543
|
+
{
|
|
544
|
+
style: {
|
|
545
|
+
transform: "translateZ(0)",
|
|
546
|
+
width: "100%",
|
|
547
|
+
height: "100%",
|
|
548
|
+
display: "flex",
|
|
549
|
+
justifyContent: "center",
|
|
550
|
+
alignItems: "center"
|
|
551
|
+
},
|
|
552
|
+
children: /* @__PURE__ */ i(
|
|
553
|
+
"div",
|
|
554
|
+
{
|
|
555
|
+
id: "whats-missing-root",
|
|
556
|
+
style: { position: "relative", width: "100%", height: "100%" },
|
|
557
|
+
children: [
|
|
558
|
+
$e,
|
|
559
|
+
!b && !T && ae === 1 && /* @__PURE__ */ i("div", { className: "wm-lobby", children: [
|
|
560
|
+
/* @__PURE__ */ i(
|
|
593
561
|
"div",
|
|
594
562
|
{
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
onClick: () => Ln(i),
|
|
611
|
-
children: i
|
|
612
|
-
},
|
|
613
|
-
i
|
|
614
|
-
))
|
|
563
|
+
className: "wm-lobbyHero",
|
|
564
|
+
"aria-label": "Look at the pictures, guess what's missing",
|
|
565
|
+
children: [
|
|
566
|
+
/* @__PURE__ */ i("div", { className: "wm-heroGrid", "aria-hidden": !0, children: [
|
|
567
|
+
/* @__PURE__ */ t("span", { className: "wm-heroTile" }),
|
|
568
|
+
/* @__PURE__ */ t("span", { className: "wm-heroTile" }),
|
|
569
|
+
/* @__PURE__ */ t("span", { className: "wm-heroTile" }),
|
|
570
|
+
/* @__PURE__ */ t("span", { className: "wm-heroTile wm-heroTileMissing", children: "?" })
|
|
571
|
+
] }),
|
|
572
|
+
/* @__PURE__ */ t("div", { className: "wm-lobbyArrow", "aria-hidden": !0 }),
|
|
573
|
+
/* @__PURE__ */ t("div", { className: "wm-lobbyGuess", children: /* @__PURE__ */ i("div", { className: "wm-guessCard", children: [
|
|
574
|
+
/* @__PURE__ */ t("div", { className: "wm-guessPrompt", children: "Guess" }),
|
|
575
|
+
/* @__PURE__ */ t("div", { className: "wm-guessLine", children: "cat" })
|
|
576
|
+
] }) })
|
|
577
|
+
]
|
|
615
578
|
}
|
|
616
|
-
)
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
{
|
|
642
|
-
style: {
|
|
643
|
-
display: "grid",
|
|
644
|
-
gridTemplateColumns: n ? "repeat(2, 1fr)" : "repeat(4, 1fr)",
|
|
645
|
-
gap: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "8px" : "12px",
|
|
646
|
-
maxWidth: n ? 280 : 420,
|
|
647
|
-
margin: "0 auto"
|
|
648
|
-
},
|
|
649
|
-
children: mi.map((i) => /* @__PURE__ */ t(
|
|
579
|
+
),
|
|
580
|
+
/* @__PURE__ */ i("div", { className: "wm-lobbyHead", children: [
|
|
581
|
+
/* @__PURE__ */ i("h1", { className: "wm-brandTitle", children: [
|
|
582
|
+
"What's ",
|
|
583
|
+
/* @__PURE__ */ t("span", { className: "wm-brandAccent", children: "Missing" }),
|
|
584
|
+
"?"
|
|
585
|
+
] }),
|
|
586
|
+
/* @__PURE__ */ i("ol", { className: "wm-lobbySteps", children: [
|
|
587
|
+
/* @__PURE__ */ i("li", { children: [
|
|
588
|
+
/* @__PURE__ */ t("span", { className: "wm-stepIcon wm-stepIconLook", "aria-hidden": !0 }),
|
|
589
|
+
"Look"
|
|
590
|
+
] }),
|
|
591
|
+
/* @__PURE__ */ i("li", { children: [
|
|
592
|
+
/* @__PURE__ */ t("span", { className: "wm-stepIcon wm-stepIconGuess", "aria-hidden": !0 }),
|
|
593
|
+
"Guess"
|
|
594
|
+
] }),
|
|
595
|
+
/* @__PURE__ */ i("li", { children: [
|
|
596
|
+
/* @__PURE__ */ t("span", { className: "wm-stepIcon wm-stepIconWin", "aria-hidden": !0 }),
|
|
597
|
+
"Win"
|
|
598
|
+
] })
|
|
599
|
+
] })
|
|
600
|
+
] }),
|
|
601
|
+
/* @__PURE__ */ i("div", { className: "wm-roundsRow", children: [
|
|
602
|
+
/* @__PURE__ */ t("p", { className: "wm-roundsLabel", children: "Rounds" }),
|
|
603
|
+
/* @__PURE__ */ t("div", { className: "wm-roundsPills", children: [3, 4, 5].map((e) => /* @__PURE__ */ t(
|
|
650
604
|
"button",
|
|
651
605
|
{
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
},
|
|
657
|
-
onClick: () => {
|
|
658
|
-
U(i), Kn(i);
|
|
659
|
-
},
|
|
660
|
-
children: ui[i]
|
|
606
|
+
type: "button",
|
|
607
|
+
className: `wm-roundPill${E === e ? " wm-roundPillActive" : ""}`,
|
|
608
|
+
onClick: () => ke(e),
|
|
609
|
+
children: e
|
|
661
610
|
},
|
|
662
|
-
|
|
663
|
-
))
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
{
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
611
|
+
e
|
|
612
|
+
)) })
|
|
613
|
+
] }),
|
|
614
|
+
/* @__PURE__ */ t("button", { type: "button", className: "wm-playBtn", onClick: () => U(2), children: "PLAY" })
|
|
615
|
+
] }),
|
|
616
|
+
!b && !T && ae === 2 && /* @__PURE__ */ i("div", { className: "wm-topics", children: [
|
|
617
|
+
/* @__PURE__ */ i("div", { className: "wm-topicsHeader", children: [
|
|
618
|
+
/* @__PURE__ */ t("button", { type: "button", className: "wm-topicsBack", onClick: () => U(1), children: "Back" }),
|
|
619
|
+
/* @__PURE__ */ t("h2", { className: "wm-topicsTitle", children: "Choose a theme" }),
|
|
620
|
+
/* @__PURE__ */ i("span", { className: "wm-topicsMeta", children: [
|
|
621
|
+
E,
|
|
622
|
+
" rounds"
|
|
623
|
+
] })
|
|
624
|
+
] }),
|
|
625
|
+
/* @__PURE__ */ i(
|
|
626
|
+
"button",
|
|
627
|
+
{
|
|
628
|
+
type: "button",
|
|
629
|
+
className: "wm-topicCard wm-topicCardRandom",
|
|
630
|
+
onClick: () => oe(ne[ee(ne.length)]),
|
|
631
|
+
children: [
|
|
632
|
+
/* @__PURE__ */ t("span", { className: "wm-topicRandomIcon", "aria-hidden": !0 }),
|
|
633
|
+
/* @__PURE__ */ i("div", { className: "wm-topicBody", children: [
|
|
634
|
+
/* @__PURE__ */ t("span", { className: "wm-topicLabel", children: "Random theme" }),
|
|
635
|
+
/* @__PURE__ */ t("span", { className: "wm-topicExample", children: "Surprise me!" })
|
|
636
|
+
] })
|
|
637
|
+
]
|
|
638
|
+
}
|
|
639
|
+
),
|
|
640
|
+
/* @__PURE__ */ t("div", { className: "wm-topicsGrid", children: ne.map((e) => /* @__PURE__ */ i(
|
|
641
|
+
"button",
|
|
642
|
+
{
|
|
643
|
+
type: "button",
|
|
644
|
+
className: "wm-topicCard",
|
|
645
|
+
onClick: () => oe(e),
|
|
646
|
+
children: [
|
|
647
|
+
/* @__PURE__ */ t(
|
|
648
|
+
"img",
|
|
649
|
+
{
|
|
650
|
+
className: "wm-topicPreview",
|
|
651
|
+
src: M[e][0]?.src,
|
|
652
|
+
alt: "",
|
|
653
|
+
draggable: !1,
|
|
654
|
+
onError: (o) => {
|
|
655
|
+
o.currentTarget.style.visibility = "hidden";
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
),
|
|
659
|
+
/* @__PURE__ */ i("div", { className: "wm-topicBody", children: [
|
|
660
|
+
/* @__PURE__ */ t("span", { className: "wm-topicLabel", children: mt[e] }),
|
|
661
|
+
/* @__PURE__ */ t("span", { className: "wm-topicExample", children: pt[e] })
|
|
662
|
+
] })
|
|
663
|
+
]
|
|
675
664
|
},
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
}
|
|
679
|
-
)
|
|
680
|
-
] }),
|
|
681
|
-
S && !B && /* @__PURE__ */ l("div", { style: e.gmCenterScreen, children: [
|
|
682
|
-
/* @__PURE__ */ l("h1", { style: e.gmHeadline1, children: [
|
|
683
|
-
"Theme selected: ",
|
|
684
|
-
S
|
|
665
|
+
e
|
|
666
|
+
)) })
|
|
685
667
|
] }),
|
|
686
|
-
/* @__PURE__ */
|
|
687
|
-
"
|
|
688
|
-
|
|
668
|
+
A && /* @__PURE__ */ i("div", { className: "wm-final", children: [
|
|
669
|
+
/* @__PURE__ */ t("h2", { className: "wm-finalTitle", children: "Great job!" }),
|
|
670
|
+
/* @__PURE__ */ i("p", { className: "wm-finalScore", children: [
|
|
671
|
+
Ie,
|
|
672
|
+
" / ",
|
|
673
|
+
E,
|
|
674
|
+
" correct"
|
|
675
|
+
] }),
|
|
676
|
+
/* @__PURE__ */ t("p", { className: "wm-finalTeamLabel", children: "Your round" }),
|
|
677
|
+
/* @__PURE__ */ t("div", { className: "wm-trophyRow", children: ge.length === 0 ? /* @__PURE__ */ t("p", { className: "wm-trophyEmpty", children: "Play a round to see results" }) : ge.map((e) => /* @__PURE__ */ i("div", { className: "wm-trophyCard", children: [
|
|
678
|
+
/* @__PURE__ */ i("div", { className: `wm-trophy ${e.result}`, children: [
|
|
679
|
+
/* @__PURE__ */ t("span", { className: "wm-trophyMark", children: e.result === "correct" ? "✔" : e.result === "almost" ? "◐" : "✘" }),
|
|
680
|
+
/* @__PURE__ */ t("span", { className: "wm-trophyWord", children: e.correct.split(",")[0] })
|
|
681
|
+
] }),
|
|
682
|
+
/* @__PURE__ */ i("span", { className: "wm-trophyName", children: [
|
|
683
|
+
"Round ",
|
|
684
|
+
e.round
|
|
685
|
+
] })
|
|
686
|
+
] }, e.round)) }),
|
|
687
|
+
/* @__PURE__ */ i("div", { className: "wm-finalActions", children: [
|
|
688
|
+
/* @__PURE__ */ t("button", { type: "button", className: "wm-againBtn", onClick: () => oe(), children: "Play again" }),
|
|
689
|
+
/* @__PURE__ */ t("button", { type: "button", className: "wm-ghostBtn", onClick: De, children: "Choose theme" })
|
|
690
|
+
] })
|
|
689
691
|
] }),
|
|
690
|
-
/* @__PURE__ */
|
|
691
|
-
"
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
"
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
}
|
|
743
|
-
),
|
|
744
|
-
/* @__PURE__ */ l(
|
|
745
|
-
"table",
|
|
746
|
-
{
|
|
747
|
-
style: {
|
|
748
|
-
...e.gmTable,
|
|
749
|
-
marginTop: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || c || x || H || W || m || u || f || y ? "0px" : "20px",
|
|
750
|
-
marginBottom: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || c || x || H || W || m || u || f || y ? "4px" : "32px"
|
|
751
|
-
},
|
|
752
|
-
children: [
|
|
753
|
-
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ l("tr", { children: [
|
|
754
|
-
/* @__PURE__ */ t("th", { children: "Round" }),
|
|
755
|
-
/* @__PURE__ */ t("th", { children: "Your Answer" }),
|
|
756
|
-
/* @__PURE__ */ t("th", { children: "Correct" }),
|
|
757
|
-
/* @__PURE__ */ t("th", { children: "Result" })
|
|
758
|
-
] }) }),
|
|
759
|
-
/* @__PURE__ */ t("tbody", { children: An.map((i, o) => /* @__PURE__ */ l("tr", { children: [
|
|
760
|
-
/* @__PURE__ */ t("td", { style: e.gmTableCell, children: i.round }),
|
|
761
|
-
/* @__PURE__ */ t("td", { style: e.gmTableCell, children: i.answer || "—" }),
|
|
762
|
-
/* @__PURE__ */ t("td", { style: e.gmTableCell, children: i.correct }),
|
|
763
|
-
/* @__PURE__ */ t("td", { style: e.gmTableCell, children: i.result === "correct" ? "✔ Correct" : i.result === "almost" ? "◐ Almost (0.5)" : "✘ Wrong" })
|
|
764
|
-
] }, o)) })
|
|
765
|
-
]
|
|
766
|
-
}
|
|
767
|
-
),
|
|
768
|
-
/* @__PURE__ */ l(
|
|
769
|
-
"div",
|
|
770
|
-
{
|
|
771
|
-
style: {
|
|
772
|
-
display: "flex",
|
|
773
|
-
gap: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "6px" : "12px",
|
|
774
|
-
marginTop: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "2px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I ? "12px" : "24px"
|
|
775
|
-
},
|
|
776
|
-
children: [
|
|
692
|
+
T && !A && /* @__PURE__ */ i("div", { className: `wm-play${u === "ready" ? " wm-play--ready" : ""}`, children: [
|
|
693
|
+
/* @__PURE__ */ i("div", { className: "wm-playStatus", children: [
|
|
694
|
+
u === "ready" && /* @__PURE__ */ i(
|
|
695
|
+
"div",
|
|
696
|
+
{
|
|
697
|
+
className: "wm-readyBlock",
|
|
698
|
+
style: { "--wm-ready-s": `${F}s` },
|
|
699
|
+
children: [
|
|
700
|
+
/* @__PURE__ */ t("p", { className: "wm-playStatusReady", children: "GET READY" }),
|
|
701
|
+
/* @__PURE__ */ i("div", { className: "wm-readyLoad", "aria-hidden": !0, children: [
|
|
702
|
+
/* @__PURE__ */ i("div", { className: "wm-readyTiles", children: [
|
|
703
|
+
/* @__PURE__ */ t("span", { className: "wm-heroTile" }),
|
|
704
|
+
/* @__PURE__ */ t("span", { className: "wm-heroTile" }),
|
|
705
|
+
/* @__PURE__ */ t("span", { className: "wm-heroTile" }),
|
|
706
|
+
/* @__PURE__ */ t("span", { className: "wm-heroTile wm-heroTileMissing", children: "?" })
|
|
707
|
+
] }),
|
|
708
|
+
/* @__PURE__ */ t("div", { className: "wm-readyBar", children: /* @__PURE__ */ t("span", { className: "wm-readyBarFill" }) })
|
|
709
|
+
] })
|
|
710
|
+
]
|
|
711
|
+
}
|
|
712
|
+
),
|
|
713
|
+
u === "memorize" && /* @__PURE__ */ i("p", { className: "wm-playStatusMemorize", children: [
|
|
714
|
+
"MEMORIZE ",
|
|
715
|
+
O
|
|
716
|
+
] }),
|
|
717
|
+
u === "guess" && !v && /* @__PURE__ */ i("p", { children: [
|
|
718
|
+
"Time left: ",
|
|
719
|
+
q,
|
|
720
|
+
"s"
|
|
721
|
+
] })
|
|
722
|
+
] }),
|
|
723
|
+
u !== "ready" && /* @__PURE__ */ t("div", { className: "wm-playSlot", children: /* @__PURE__ */ t("div", { className: "wm-playGrid", children: w.map((e, o) => {
|
|
724
|
+
const r = y === o && u === "guess" && !v, d = $.current.get(e.src), p = d?.complete && d.src ? d.src : e.src, h = [
|
|
725
|
+
"wm-playCard",
|
|
726
|
+
we === "correct" && y === o ? "wm-playCardCorrect" : "",
|
|
727
|
+
we === "wrong" && y === o ? "wm-playCardWrong" : ""
|
|
728
|
+
].filter(Boolean).join(" ");
|
|
729
|
+
return /* @__PURE__ */ t("div", { className: h, children: !r && /* @__PURE__ */ t(
|
|
730
|
+
"img",
|
|
731
|
+
{
|
|
732
|
+
src: p,
|
|
733
|
+
alt: e.name,
|
|
734
|
+
fetchPriority: "high",
|
|
735
|
+
loading: "eager",
|
|
736
|
+
decoding: "async",
|
|
737
|
+
draggable: !1
|
|
738
|
+
},
|
|
739
|
+
`${e.src}-${d?.complete ? "loaded" : "pending"}`
|
|
740
|
+
) }, o);
|
|
741
|
+
}) }) }),
|
|
742
|
+
/* @__PURE__ */ i("div", { className: "wm-playControls", children: [
|
|
743
|
+
u === "guess" && !v && /* @__PURE__ */ i("div", { className: "wm-guessRow", children: [
|
|
777
744
|
/* @__PURE__ */ t(
|
|
778
|
-
"
|
|
745
|
+
"input",
|
|
779
746
|
{
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
747
|
+
className: "wm-guessInput",
|
|
748
|
+
type: "text",
|
|
749
|
+
placeholder: "Type the missing word",
|
|
750
|
+
value: j,
|
|
751
|
+
onChange: (e) => pe(e.target.value),
|
|
752
|
+
onKeyDown: (e) => {
|
|
753
|
+
e.key === "Enter" && !G && be();
|
|
754
|
+
}
|
|
788
755
|
}
|
|
789
756
|
),
|
|
790
757
|
/* @__PURE__ */ t(
|
|
791
758
|
"button",
|
|
792
759
|
{
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
},
|
|
799
|
-
onClick: Xn,
|
|
800
|
-
children: "⬅️ Choose theme"
|
|
760
|
+
type: "button",
|
|
761
|
+
className: "wm-actionBtn",
|
|
762
|
+
onClick: be,
|
|
763
|
+
disabled: G,
|
|
764
|
+
children: G ? "..." : "Check"
|
|
801
765
|
}
|
|
802
766
|
)
|
|
803
|
-
]
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
flexDirection: "column",
|
|
815
|
-
justifyContent: "center",
|
|
816
|
-
alignItems: "center",
|
|
817
|
-
paddingTop: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || M || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "8px" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "15px" : "40px"
|
|
818
|
-
},
|
|
819
|
-
children: [
|
|
820
|
-
T === "ready" && /* @__PURE__ */ l(Mn, { children: [
|
|
821
|
-
/* @__PURE__ */ t("h1", { style: { ...e.gmHeadline1, color: "#ec4c44" }, children: "GET READY" }),
|
|
822
|
-
/* @__PURE__ */ t("div", { style: e.gmHourglass, children: "⏳" })
|
|
823
|
-
] }),
|
|
824
|
-
T === "memorize" && /* @__PURE__ */ l("p", { style: { ...e.gmBodyM, color: "#10b981" }, children: [
|
|
825
|
-
"MEMORIZE (",
|
|
826
|
-
tn,
|
|
827
|
-
")"
|
|
828
|
-
] }),
|
|
829
|
-
T === "guess" && !A && /* @__PURE__ */ l("p", { style: e.gmBodyM, children: [
|
|
830
|
-
"⏳ Time left: ",
|
|
831
|
-
wn,
|
|
832
|
-
"s"
|
|
833
|
-
] })
|
|
834
|
-
]
|
|
835
|
-
}
|
|
836
|
-
),
|
|
837
|
-
T !== "ready" && /* @__PURE__ */ t(
|
|
838
|
-
"div",
|
|
839
|
-
{
|
|
840
|
-
style: {
|
|
841
|
-
...e.gmGrid,
|
|
842
|
-
...M || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? { width: "100%" } : {},
|
|
843
|
-
// ✅ Широкие экраны: полная ширина грида
|
|
844
|
-
gridTemplateColumns: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "repeat(3, 1fr)" : n ? "repeat(2, 1fr)" : window.innerHeight < 700 ? "repeat(3, 1fr)" : typeof window < "u" && window.innerWidth === 1280 && window.innerHeight === 720 ? "repeat(3, 130px)" : M || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "repeat(3, 150px)" : "repeat(3, 210px)",
|
|
845
|
-
// desktop: 3 колонки фиксированного размера
|
|
846
|
-
gridAutoRows: n && window.innerWidth > window.innerHeight ? "120px" : n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "100px" : n ? "150px" : window.innerHeight < 700 ? "140px" : typeof window < "u" && window.devicePixelRatio >= 1.25 && window.devicePixelRatio <= 1.5 ? "240px" : typeof window < "u" && window.innerWidth === 1280 && window.innerHeight === 720 ? "130px" : M || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "150px" : "210px",
|
|
847
|
-
// desktop: стандартная высота
|
|
848
|
-
gap: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "12px" : n || window.innerHeight < 700 ? "8px" : typeof window < "u" && window.devicePixelRatio >= 1.25 && window.devicePixelRatio <= 1.5 ? "24px" : M || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "12px" : "20px",
|
|
849
|
-
justifyItems: "center",
|
|
850
|
-
maxWidth: n && window.innerWidth > window.innerHeight ? "90%" : n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "95%" : "100%",
|
|
851
|
-
padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "8px" : typeof window < "u" && window.devicePixelRatio >= 1.25 && window.devicePixelRatio <= 1.5 ? "20px" : M || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "10px" : "16px"
|
|
852
|
-
},
|
|
853
|
-
children: k.map((i, o) => {
|
|
854
|
-
const d = z === o && T === "guess" && !A;
|
|
855
|
-
return /* @__PURE__ */ t(
|
|
856
|
-
"div",
|
|
857
|
-
{
|
|
858
|
-
style: {
|
|
859
|
-
width: "100%",
|
|
860
|
-
height: "100%",
|
|
861
|
-
borderRadius: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "6px" : "12px",
|
|
862
|
-
overflow: "hidden",
|
|
863
|
-
backgroundColor: "#ffffff",
|
|
864
|
-
boxShadow: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "0 1px 4px rgba(0,0,0,0.1)" : "0 4px 12px rgba(0,0,0,0.15)",
|
|
865
|
-
transition: "all 0.3s ease",
|
|
866
|
-
cursor: "pointer",
|
|
867
|
-
...kn === "correct" && z === o ? {
|
|
868
|
-
boxShadow: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "0 0 15px #10b981" : "0 0 20px #10b981",
|
|
869
|
-
transform: "scale(1.03)"
|
|
870
|
-
} : {},
|
|
871
|
-
...kn === "wrong" && z === o ? {
|
|
872
|
-
boxShadow: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "0 0 15px #ef4444" : "0 0 20px #ef4444",
|
|
873
|
-
transform: "scale(1.03)"
|
|
874
|
-
} : {}
|
|
875
|
-
},
|
|
876
|
-
children: !d && (() => {
|
|
877
|
-
const h = K.current.get(i.src), b = h?.complete && h.src ? h.src : i.src;
|
|
878
|
-
return /* @__PURE__ */ t(
|
|
879
|
-
"img",
|
|
880
|
-
{
|
|
881
|
-
src: b,
|
|
882
|
-
alt: i.name,
|
|
883
|
-
fetchPriority: "high",
|
|
884
|
-
loading: "eager",
|
|
885
|
-
decoding: "async",
|
|
886
|
-
style: {
|
|
887
|
-
width: "100%",
|
|
888
|
-
height: "100%",
|
|
889
|
-
objectFit: "contain",
|
|
890
|
-
objectPosition: "center"
|
|
891
|
-
}
|
|
892
|
-
},
|
|
893
|
-
`${i.src}-${h?.complete ? "loaded" : "pending"}`
|
|
894
|
-
);
|
|
895
|
-
})()
|
|
896
|
-
},
|
|
897
|
-
o
|
|
898
|
-
);
|
|
899
|
-
})
|
|
900
|
-
}
|
|
901
|
-
),
|
|
902
|
-
/* @__PURE__ */ l(
|
|
903
|
-
"div",
|
|
904
|
-
{
|
|
905
|
-
style: {
|
|
906
|
-
marginTop: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "1px" : M || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "4px" : "16px",
|
|
907
|
-
height: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "40px" : M || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "50px" : "80px"
|
|
908
|
-
},
|
|
909
|
-
children: [
|
|
910
|
-
T === "guess" && !A && /* @__PURE__ */ t(
|
|
911
|
-
"div",
|
|
912
|
-
{
|
|
913
|
-
style: {
|
|
914
|
-
display: "flex",
|
|
915
|
-
flexDirection: "row",
|
|
916
|
-
flexWrap: "nowrap",
|
|
917
|
-
alignItems: "center",
|
|
918
|
-
justifyContent: "center",
|
|
919
|
-
minWidth: 0,
|
|
920
|
-
gap: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "3px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || c || x || H || W || m || u || f || y ? "8px" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "6px" : "12px",
|
|
921
|
-
width: "100%",
|
|
922
|
-
maxWidth: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "270px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || c || x || H || W || m || u || f || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "400px" : "300px"
|
|
923
|
-
},
|
|
924
|
-
children: /* @__PURE__ */ l(Mn, { children: [
|
|
925
|
-
/* @__PURE__ */ t(
|
|
926
|
-
"input",
|
|
927
|
-
{
|
|
928
|
-
type: "text",
|
|
929
|
-
placeholder: "Type the missing word",
|
|
930
|
-
value: N,
|
|
931
|
-
onChange: (i) => yn(i.target.value),
|
|
932
|
-
style: {
|
|
933
|
-
...e.gmInput,
|
|
934
|
-
flex: "1 1 0",
|
|
935
|
-
minWidth: 0,
|
|
936
|
-
width: "auto",
|
|
937
|
-
maxWidth: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "170px" : (window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || c || x || H || W || m || u || f || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700, "250px"),
|
|
938
|
-
padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "5px 6px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || c || x || H || W || m || u || f || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 12px" : "12px 16px",
|
|
939
|
-
boxSizing: "border-box",
|
|
940
|
-
fontSize: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 ? "10px" : window.innerWidth === 896 && window.innerHeight === 414 ? "11px" : window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "10px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || c || x || H || W || m || u || f || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px"
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
),
|
|
944
|
-
/* @__PURE__ */ t(
|
|
945
|
-
"button",
|
|
946
|
-
{
|
|
947
|
-
style: {
|
|
948
|
-
...e.gmButton,
|
|
949
|
-
marginLeft: 0,
|
|
950
|
-
padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "5px 8px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "6px 10px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || c || x || H || W || m || u || f || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 16px" : "12px 24px",
|
|
951
|
-
fontSize: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "10px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "11px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || c || x || H || W || m || u || f || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px",
|
|
952
|
-
minWidth: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "45px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "55px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || c || x || H || W || m || u || f || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "80px" : "100px",
|
|
953
|
-
flexShrink: 0
|
|
954
|
-
},
|
|
955
|
-
onClick: Jn,
|
|
956
|
-
disabled: sn,
|
|
957
|
-
children: sn ? "..." : "Check"
|
|
958
|
-
}
|
|
959
|
-
)
|
|
960
|
-
] })
|
|
961
|
-
}
|
|
962
|
-
),
|
|
963
|
-
A && /* @__PURE__ */ t(
|
|
964
|
-
"button",
|
|
965
|
-
{
|
|
966
|
-
style: {
|
|
967
|
-
...e.gmButton,
|
|
968
|
-
padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "5px 8px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "6px 10px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || c || x || H || W || m || u || f || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 16px" : "12px 24px",
|
|
969
|
-
fontSize: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "10px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "11px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || c || x || H || W || m || u || f || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px"
|
|
970
|
-
},
|
|
971
|
-
onClick: Qn,
|
|
972
|
-
children: "Next round"
|
|
973
|
-
}
|
|
974
|
-
)
|
|
975
|
-
]
|
|
976
|
-
}
|
|
977
|
-
)
|
|
978
|
-
] })
|
|
979
|
-
] })
|
|
980
|
-
}
|
|
981
|
-
)
|
|
982
|
-
}
|
|
983
|
-
)
|
|
984
|
-
]
|
|
767
|
+
] }),
|
|
768
|
+
v && /* @__PURE__ */ t("button", { type: "button", className: "wm-actionBtn", onClick: He, children: "Next round" })
|
|
769
|
+
] })
|
|
770
|
+
] })
|
|
771
|
+
]
|
|
772
|
+
}
|
|
773
|
+
)
|
|
774
|
+
}
|
|
775
|
+
)
|
|
776
|
+
}
|
|
777
|
+
)
|
|
985
778
|
}
|
|
986
779
|
);
|
|
987
780
|
}
|
|
988
|
-
const
|
|
989
|
-
function
|
|
990
|
-
const
|
|
991
|
-
return
|
|
781
|
+
const _ = 1280, Y = 720;
|
|
782
|
+
function bt(s, c) {
|
|
783
|
+
const n = Math.min(s, c);
|
|
784
|
+
return s <= 768 ? Math.max(280, s - 20) : Math.max(400, Math.min(1200, n - 40));
|
|
992
785
|
}
|
|
993
|
-
function
|
|
994
|
-
gameCubeSize:
|
|
995
|
-
screenHeight:
|
|
996
|
-
screenWidth:
|
|
997
|
-
seed:
|
|
786
|
+
function Rt({
|
|
787
|
+
gameCubeSize: s,
|
|
788
|
+
screenHeight: c,
|
|
789
|
+
screenWidth: n,
|
|
790
|
+
seed: l
|
|
998
791
|
}) {
|
|
999
|
-
const [
|
|
1000
|
-
width: typeof window < "u" ? window.innerWidth :
|
|
1001
|
-
height: typeof window < "u" ? window.innerHeight :
|
|
792
|
+
const [m, b] = a(() => ({
|
|
793
|
+
width: typeof window < "u" ? window.innerWidth : _,
|
|
794
|
+
height: typeof window < "u" ? window.innerHeight : Y
|
|
1002
795
|
}));
|
|
1003
|
-
|
|
1004
|
-
const
|
|
1005
|
-
|
|
796
|
+
L(() => {
|
|
797
|
+
const w = () => {
|
|
798
|
+
b({
|
|
1006
799
|
width: window.innerWidth,
|
|
1007
800
|
height: window.innerHeight
|
|
1008
801
|
});
|
|
1009
802
|
};
|
|
1010
|
-
|
|
1011
|
-
const
|
|
1012
|
-
return
|
|
1013
|
-
window.removeEventListener("resize",
|
|
803
|
+
w(), window.addEventListener("resize", w), window.addEventListener("orientationchange", w);
|
|
804
|
+
const z = new ResizeObserver(w);
|
|
805
|
+
return z.observe(document.documentElement), () => {
|
|
806
|
+
window.removeEventListener("resize", w), window.removeEventListener("orientationchange", w), z.disconnect();
|
|
1014
807
|
};
|
|
1015
808
|
}, []);
|
|
1016
|
-
const
|
|
809
|
+
const B = ye(() => Math.min(m.width / _, m.height / Y), [m.width, m.height]);
|
|
1017
810
|
return /* @__PURE__ */ t(
|
|
1018
811
|
"div",
|
|
1019
812
|
{
|
|
@@ -1030,27 +823,27 @@ function Pi({
|
|
|
1030
823
|
position: "absolute",
|
|
1031
824
|
left: "50%",
|
|
1032
825
|
top: "50%",
|
|
1033
|
-
width: `${
|
|
1034
|
-
height: `${
|
|
1035
|
-
transform: `translate(-50%, -50%) scale(${
|
|
826
|
+
width: `${_}px`,
|
|
827
|
+
height: `${Y}px`,
|
|
828
|
+
transform: `translate(-50%, -50%) scale(${B})`,
|
|
1036
829
|
transformOrigin: "center center"
|
|
1037
830
|
},
|
|
1038
831
|
children: /* @__PURE__ */ t(
|
|
1039
832
|
"div",
|
|
1040
833
|
{
|
|
1041
834
|
style: {
|
|
1042
|
-
width: `${
|
|
1043
|
-
height: `${
|
|
835
|
+
width: `${_}px`,
|
|
836
|
+
height: `${Y}px`,
|
|
1044
837
|
position: "relative",
|
|
1045
838
|
overflow: "hidden"
|
|
1046
839
|
},
|
|
1047
840
|
children: /* @__PURE__ */ t(
|
|
1048
|
-
|
|
841
|
+
ut,
|
|
1049
842
|
{
|
|
1050
|
-
gameCubeSize:
|
|
1051
|
-
screenWidth:
|
|
1052
|
-
screenHeight:
|
|
1053
|
-
seed:
|
|
843
|
+
gameCubeSize: s ?? bt(m.width, m.height),
|
|
844
|
+
screenWidth: n ?? m.width,
|
|
845
|
+
screenHeight: c ?? m.height,
|
|
846
|
+
seed: l
|
|
1054
847
|
}
|
|
1055
848
|
)
|
|
1056
849
|
}
|
|
@@ -1061,8 +854,8 @@ function Pi({
|
|
|
1061
854
|
);
|
|
1062
855
|
}
|
|
1063
856
|
export {
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
857
|
+
Rt as AdaptiveGameShell,
|
|
858
|
+
Rt as Game,
|
|
859
|
+
ut as RawGame,
|
|
860
|
+
M as themes
|
|
1068
861
|
};
|