@mblinkov/whats-missing 20.0.43 → 20.0.45

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.
@@ -1,10 +1,9 @@
1
- import { jsx as n, jsxs as d, Fragment as ve } from "react/jsx-runtime";
2
- import { useRef as V, useState as a, useLayoutEffect as _, useEffect as F, useMemo as Z } from "react";
3
- import { createPortal as ze } from "react-dom";
4
- const Ce = window.origin + "/cloud/speakid/games/whatsmissing/", U = (c, h) => c.map(([r, i]) => ({
5
- src: `${Ce}${h}/${i.replace(/\s/g, "%20")}.png`,
6
- name: i
7
- })), ke = [
1
+ import { jsx as w, jsxs as c, Fragment as pn } from "react/jsx-runtime";
2
+ import { useRef as Fn, useEffect as q, useState as d, useMemo as Yn } from "react";
3
+ const Un = window.origin + "/cloud/speakid/games/whatsmissing/", K = (o, b) => o.map(([y, h]) => ({
4
+ src: `${Un}${b}/${h.replace(/\s/g, "%20")}.png`,
5
+ name: h
6
+ })), Nn = [
8
7
  ["apple", "apple"],
9
8
  ["banana", "banana"],
10
9
  ["bread", "bread"],
@@ -30,7 +29,7 @@ const Ce = window.origin + "/cloud/speakid/games/whatsmissing/", U = (c, h) => c
30
29
  ["strawberry", "strawberry"],
31
30
  ["tomato", "tomato"],
32
31
  ["watermelon", "watermelon"]
33
- ], Se = [
32
+ ], Vn = [
34
33
  ["bear", "bear"],
35
34
  ["cat", "cat"],
36
35
  ["crocodile", "crocodile"],
@@ -50,7 +49,7 @@ const Ce = window.origin + "/cloud/speakid/games/whatsmissing/", U = (c, h) => c
50
49
  ["tortoise", "tortoise"],
51
50
  ["wolf", "wolf"],
52
51
  ["zebra", "zebra"]
53
- ], Te = [
52
+ ], _n = [
54
53
  ["ball", "ball"],
55
54
  ["balloon", "balloon"],
56
55
  ["blocks", "blocks"],
@@ -70,23 +69,23 @@ const Ce = window.origin + "/cloud/speakid/games/whatsmissing/", U = (c, h) => c
70
69
  ["teddy_bear", "teddy bear"],
71
70
  ["yo-yo", "yo-yo"],
72
71
  ["crayons", "crayons"]
73
- ], ce = {
74
- food: U(ke, "food"),
75
- animals: U(Se, "animals"),
76
- toys: U(Te, "toys")
77
- }, Re = `
72
+ ], an = {
73
+ food: K(Nn, "food"),
74
+ animals: K(Vn, "animals"),
75
+ toys: K(_n, "toys")
76
+ }, $n = `
78
77
  @keyframes spin {
79
78
  from { transform: rotate(0deg); }
80
79
  to { transform: rotate(360deg); }
81
80
  }
82
81
  `;
83
82
  if (typeof document < "u" && !document.getElementById("spin-keyframes")) {
84
- const c = document.createElement("style");
85
- c.id = "spin-keyframes", c.innerHTML = Re, document.head.appendChild(c);
83
+ const o = document.createElement("style");
84
+ o.id = "spin-keyframes", o.innerHTML = $n, document.head.appendChild(o);
86
85
  }
87
- const Me = {
86
+ const qn = {
88
87
  animation: "spin 1.4s linear infinite"
89
- }, o = {
88
+ }, e = {
90
89
  gmCenterScreen: {
91
90
  position: "relative",
92
91
  zIndex: 1,
@@ -171,27 +170,6 @@ const Me = {
171
170
  gap: "20px",
172
171
  justifyContent: "center"
173
172
  },
174
- gmCard: {
175
- border: "1px solid #e5e7eb",
176
- borderRadius: "16px",
177
- background: "#f9f9f9",
178
- aspectRatio: "1 / 1",
179
- display: "flex",
180
- alignItems: "center",
181
- justifyContent: "center",
182
- overflow: "hidden",
183
- transition: "transform .2s ease, box-shadow .2s ease, border-color .2s ease"
184
- },
185
- gmCorrect: {
186
- border: "2px solid #10b981",
187
- boxShadow: "0 0 18px rgba(16,185,129,.45)",
188
- background: "#ecfdf5"
189
- },
190
- gmWrong: {
191
- border: "2px solid #ec4c44",
192
- boxShadow: "0 0 18px rgba(236,76,68,.35)",
193
- background: "#fef2f2"
194
- },
195
173
  gmInput: {
196
174
  padding: "6px 10px",
197
175
  borderRadius: "6px",
@@ -240,440 +218,441 @@ const Me = {
240
218
  },
241
219
  gmHourglass: {
242
220
  fontSize: "42px",
243
- ...Me
221
+ ...qn
244
222
  }
245
- }, He = (c, h) => {
246
- const r = Array.from({ length: c.length + 1 }, () => Array(h.length + 1).fill(0));
247
- for (let i = 0; i <= c.length; i++) r[i][0] = i;
248
- for (let i = 0; i <= h.length; i++) r[0][i] = i;
249
- for (let i = 1; i <= c.length; i++)
250
- for (let f = 1; f <= h.length; f++)
251
- r[i][f] = c[i - 1] === h[f - 1] ? r[i - 1][f - 1] : Math.min(r[i - 1][f - 1], r[i][f - 1], r[i - 1][f]) + 1;
252
- return r[c.length][h.length];
223
+ }, Kn = () => {
224
+ const o = document.createElement("style");
225
+ o.textContent = `
226
+ #whats-missing-root, #whats-missing-root * {
227
+ box-sizing: border-box;
228
+ font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
229
+ }
230
+ #whats-missing-root img {
231
+ max-width: 100%;
232
+ height: auto;
233
+ display: block;
234
+ user-select: none;
235
+ }
236
+ html, body {
237
+ margin: 0 !important;
238
+ padding: 0 !important;
239
+ width: 100% !important;
240
+ height: 100% !important;
241
+ overflow: hidden !important;
242
+ zoom: 1 !important; /* ✅ защита от подзума */
243
+ }
244
+ #root {
245
+ margin: 0 !important;
246
+ padding: 0 !important;
247
+ width: 100% !important;
248
+ height: 100% !important;
249
+ overflow: hidden !important;
250
+ }
251
+ `, document.head.appendChild(o);
252
+ }, On = (o, b) => {
253
+ const y = Array.from({ length: o.length + 1 }, () => Array(b.length + 1).fill(0));
254
+ for (let h = 0; h <= o.length; h++) y[h][0] = h;
255
+ for (let h = 0; h <= b.length; h++) y[0][h] = h;
256
+ for (let h = 1; h <= o.length; h++)
257
+ for (let m = 1; m <= b.length; m++)
258
+ y[h][m] = o[h - 1] === b[m - 1] ? y[h - 1][m - 1] : Math.min(y[h - 1][m - 1], y[h][m - 1], y[h - 1][m]) + 1;
259
+ return y[o.length][b.length];
253
260
  };
254
- function Ie(c, h = { minDesktopWidth: 1200, forceResize: !1 }) {
255
- const r = V(null), i = h.minDesktopWidth ?? 1200, f = !!h.forceResize;
256
- _(() => {
257
- if (typeof window > "u" || !c || !c.current) return;
258
- const m = c.current, M = () => {
259
- try {
260
- const s = document.body, w = getComputedStyle(s), x = parseFloat(s.style && s.style.zoom || "");
261
- if (x && !isNaN(x) && x > 0) return x;
262
- const S = parseFloat(w.zoom || "");
263
- if (S && !isNaN(S) && S > 0) return S;
264
- const u = document.createElement("div");
265
- u.style.position = "absolute", u.style.left = "0", u.style.top = "0", u.style.width = "100px", u.style.height = "1px", u.style.visibility = "hidden", document.documentElement.appendChild(u);
266
- const T = u.getBoundingClientRect();
267
- if (document.documentElement.removeChild(u), T && T.width > 0) {
268
- const z = T.width / 100;
269
- if (!isNaN(z) && z > 0) return z;
270
- }
271
- } catch {
272
- }
273
- return 1;
274
- }, A = () => {
275
- if (i && window.innerWidth < i) {
276
- H();
277
- return;
278
- }
279
- const s = M();
280
- if (!s || s === 1) {
281
- H();
282
- return;
283
- }
284
- r.current || (r.current = {
285
- transform: m.style.transform || null,
286
- transformOrigin: m.style.transformOrigin || null,
287
- width: m.style.width || null,
288
- height: m.style.height || null,
289
- willChange: m.style.willChange || null
290
- });
291
- const w = 1 / s;
292
- f && (m.style.width = `${s * 100}%`, m.style.height = `${s * 100}%`), m.style.transformOrigin = "50% 50%", m.style.transform = `scale(${w})`, m.style.willChange = "transform";
293
- }, H = () => {
294
- if (!r.current) return;
295
- const s = r.current;
296
- m.style.transform = s.transform ?? "", m.style.transformOrigin = s.transformOrigin ?? "", m.style.width = s.width ?? "", m.style.height = s.height ?? "", m.style.willChange = s.willChange ?? "", r.current = null;
297
- };
298
- let k = 0;
299
- const y = () => {
300
- cancelAnimationFrame(k), k = requestAnimationFrame(A);
301
- }, I = new MutationObserver((s) => {
302
- for (const w of s)
303
- if (w.type === "attributes" && (w.attributeName === "style" || w.attributeName === "class")) {
304
- y();
305
- break;
306
- }
307
- });
308
- return I.observe(document.body, { attributes: !0, attributeFilter: ["style", "class"] }), window.addEventListener("resize", y), y(), () => {
309
- cancelAnimationFrame(k), I.disconnect(), window.removeEventListener("resize", y), H();
310
- };
311
- }, [c, i, f]);
312
- }
313
- function Ee({
314
- gameCubeSize: c,
315
- screenHeight: h,
316
- screenWidth: r
261
+ function ii({
262
+ gameCubeSize: o,
263
+ screenHeight: b,
264
+ screenWidth: y
317
265
  }) {
318
- const i = V(null), f = V(null), [m, M] = a(null), [A, H] = a(null);
319
- Ie(i, { minDesktopWidth: 1024, forceResize: !1 }), _(() => {
320
- const e = i.current;
321
- if (!e) return;
322
- let t = e.shadowRoot;
323
- t || (t = e.attachShadow({ mode: "open" })), e.style.position = "fixed", e.style.top = "0", e.style.left = "0", e.style.width = "100vw", e.style.height = "100vh", e.style.zIndex = "9999", e.style.background = "linear-gradient(to bottom, #fff8f8, #f9fafb)", e.style.margin = "0", e.style.padding = "0", e.style.transform = "none", e.style.zoom = "1", t.innerHTML = "";
324
- const l = document.createElement("style");
325
- l.textContent = `
326
- :host {
327
- display: flex;
328
- justify-content: center;
329
- align-items: center;
330
- overflow: hidden;
331
- }
332
-
333
- #whats-missing-root, #whats-missing-root * {
334
- box-sizing: border-box;
335
- }
336
-
337
- #whats-missing-root img {
338
- max-width: 100%;
339
- height: auto;
340
- display: block;
341
- user-select: none;
342
- }
343
-
344
- #whats-missing-root {
345
- position: relative;
346
- width: 100%;
347
- height: 100%;
348
- max-width: 1200px;
349
- display: flex;
350
- justify-content: center;
351
- align-items: center;
352
- }
353
- `, t.appendChild(l), H(t);
354
- }, []), F(() => {
355
- const e = document.body, t = document.documentElement, l = e.style.zoom, g = e.style.transform, v = t.style.zoom, L = t.style.transform;
356
- return e.style.zoom = "1", e.style.transform = "none", t.style.zoom = "1", t.style.transform = "none", () => {
357
- e.style.zoom = l, e.style.transform = g, t.style.zoom = v, t.style.transform = L;
358
- };
359
- }, []);
360
- const k = Z(() => {
361
- const e = c ?? Math.min(r ?? 1e3, h ?? 1e3), t = r ?? (typeof window < "u" ? window.innerWidth : 1e3);
362
- return e < 600 && t > 768 ? 600 : t <= 768 ? Math.min(e, t - 20) : e;
363
- }, [c, r, h]);
364
- F(() => () => {
266
+ const h = Fn(null);
267
+ q(() => (Kn(), () => {
365
268
  document.body.style.overflow = "";
366
- }, []);
367
- const [y, I] = a(null), [s, w] = a([]), [x, S] = a(4), [u, T] = a(!1), [z, K] = a(1), [C, me] = a(null), [b, E] = a("ready"), [J, Q] = a(3), [G, N] = a(10), [$, X] = a(20), [he, D] = a(0), [W, O] = a(!1), [j, ee] = a(""), [R, q] = a(!1), [Y, te] = a(!1), [ne, B] = a(null), [ue, P] = a([]), [ge, oe] = a([]), [p, fe] = a(!1);
368
- F(() => {
369
- if (typeof window > "u") return;
370
- const e = () => {
371
- const t = r ?? window.innerWidth, l = window.matchMedia && window.matchMedia("(pointer: coarse)").matches;
372
- fe(t <= 768 || l);
373
- };
374
- return e(), window.addEventListener("resize", e), window.addEventListener("orientationchange", e), () => {
375
- window.removeEventListener("resize", e), window.removeEventListener("orientationchange", e);
269
+ }), []);
270
+ const [m, O] = d(null), [T, Z] = d([]), [M, ln] = d(4), [z, J] = d(!1), [C, Q] = d(1), [S, xn] = d(null), [I, B] = d("ready"), [X, nn] = d(3), [D, E] = d(10), [G, en] = d(20), [Hn, F] = d(0), [R, Y] = d(!1), [A, wn] = d(""), [k, U] = d(!1), [N, tn] = d(!1), [dn, P] = d(null), [Wn, V] = d([]), [cn, on] = d([]), [n, mn] = d(!1), [Zn, _] = d(1), [rn, $] = d(null), [f, un] = d(!1), [g, fn] = d(!1), [s, yn] = d(!1), [p, bn] = d(!1), [a, In] = d(!1), [l, Sn] = d(!1), [x, kn] = d(!1), [H, vn] = d(!1), [W, Tn] = d(!1);
271
+ q(() => {
272
+ const i = () => {
273
+ const t = y ?? window.innerWidth, r = b ?? window.innerHeight, u = t < 768 || t === 926 && r === 428 || t === 932 && r === 430, v = r < 700, L = t === 768 && r === 1024, j = t === 1024 && r === 768, Cn = t === 820 && r === 1180, Bn = t === 1180 && r === 820, Rn = t === 540 && r === 720, An = t === 720 && r === 540, jn = t === 1024 && r === 1366, Dn = t === 1366 && r === 1024, En = t >= 1200 && r >= 600 && !u;
274
+ if (un(En), fn(L), yn(j), bn(Cn), In(Bn), Sn(Rn), kn(An), vn(jn), Tn(Dn), mn(u), u)
275
+ $(o && o >= 320 ? o : null), _(1);
276
+ else if (v)
277
+ $(o && o >= 400 ? o : null), _(1);
278
+ else {
279
+ const Gn = o ? Math.max(400, Math.min(1200, o)) : Math.min(1e3, Math.min(t, r) * 0.9);
280
+ $(Gn), _(1);
281
+ }
376
282
  };
377
- }, [r]), _(() => {
378
- const e = f.current;
379
- if (!e || typeof window > "u") return;
380
- let t = null;
381
- try {
382
- t = new ResizeObserver((l) => {
383
- for (const g of l) {
384
- const v = g.contentRect;
385
- M(Math.round(Math.min(v.width, v.height)));
386
- }
387
- }), t.observe(e), M(Math.round(Math.min(e.clientWidth, e.clientHeight)));
388
- } catch {
389
- M(Math.round(Math.min(e.clientWidth, e.clientHeight)));
390
- }
391
- return () => t?.disconnect();
392
- }, [p]);
393
- const ie = (e) => [...e].sort(() => Math.random() - 0.5).slice(0, 6), re = () => {
394
- if (!y) return;
395
- const e = ie(ce[y]);
396
- w(e), T(!0), O(!1), K(1), D(0), P([]), oe([]), se(e, [], !0);
397
- }, se = (e = s, t = ge, l = !1) => {
398
- const g = ie(e.length ? e : ce[y]);
399
- let v = Math.floor(Math.random() * g.length), L = g[v].name, de = 0;
400
- for (; t.includes(L) && de < 20; )
401
- v = Math.floor(Math.random() * g.length), L = g[v].name, de++;
402
- w(g), me(v), oe([...t, L]), q(!1), ee(""), X(20), B(null), l ? (E("ready"), Q(3), N(10)) : (E("memorize"), N(10));
283
+ return i(), window.addEventListener("resize", i), () => window.removeEventListener("resize", i);
284
+ }, [y, b, o]);
285
+ const hn = (i) => [...i].sort(() => Math.random() - 0.5).slice(0, 6), gn = () => {
286
+ if (!m) return;
287
+ const i = hn(an[m]);
288
+ Z(i), J(!0), Y(!1), Q(1), F(0), V([]), on([]), sn(i, [], !0);
289
+ }, sn = (i = T, t = cn, r = !1) => {
290
+ const u = hn(i.length ? i : an[m]);
291
+ let v = Math.floor(Math.random() * u.length), L = u[v].name, j = 0;
292
+ for (; t.includes(L) && j < 20; )
293
+ v = Math.floor(Math.random() * u.length), L = u[v].name, j++;
294
+ Z(u), xn(v), on([...t, L]), U(!1), wn(""), en(20), P(null), r ? (B("ready"), nn(3), E(10)) : (B("memorize"), E(10));
403
295
  };
404
- F(() => {
405
- if (!(!u || W || R)) {
406
- if (b === "ready")
407
- if (J <= 0) E("memorize");
296
+ q(() => {
297
+ if (!(!z || R || k)) {
298
+ if (I === "ready")
299
+ if (X <= 0) B("memorize");
408
300
  else {
409
- const e = setTimeout(() => Q((t) => t - 1), 1e3);
410
- return () => clearTimeout(e);
301
+ const i = setTimeout(() => nn((t) => t - 1), 1e3);
302
+ return () => clearTimeout(i);
411
303
  }
412
- if (b === "memorize")
413
- if (G <= 0) E("guess");
304
+ if (I === "memorize")
305
+ if (D <= 0) B("guess");
414
306
  else {
415
- const e = setTimeout(() => N((t) => t - 1), 1e3);
416
- return () => clearTimeout(e);
307
+ const i = setTimeout(() => E((t) => t - 1), 1e3);
308
+ return () => clearTimeout(i);
417
309
  }
418
- if (b === "guess") {
419
- if ($ <= 0) {
420
- q(!0), B("wrong");
421
- const t = s[C].name;
422
- P((l) => [
423
- ...l,
424
- { round: z, answer: j, correct: t, result: "wrong" }
310
+ if (I === "guess") {
311
+ if (G <= 0) {
312
+ U(!0), P("wrong");
313
+ const t = T[S].name;
314
+ V((r) => [
315
+ ...r,
316
+ { round: C, answer: A, correct: t, result: "wrong" }
425
317
  ]);
426
318
  return;
427
319
  }
428
- const e = setTimeout(() => X((t) => t - 1), 1e3);
429
- return () => clearTimeout(e);
320
+ const i = setTimeout(() => en((t) => t - 1), 1e3);
321
+ return () => clearTimeout(i);
430
322
  }
431
323
  }
432
- }, [b, J, G, $, u, W, R, s, C, z, j]);
433
- const pe = () => {
434
- if (C === null || Y) return;
435
- const e = s[C].name, t = j.toLowerCase().trim();
436
- let l = "wrong";
437
- t === e ? (D((g) => g + 1), B("correct"), l = "correct") : He(t, e) === 1 ? (D((g) => g + 0.5), B("almost"), l = "almost") : (B("wrong"), l = "wrong"), P((g) => [...g, { round: z, answer: t, correct: e, result: l }]), te(!0), setTimeout(() => {
438
- te(!1), q(!0);
324
+ }, [I, X, D, G, z, R, k, T, S, C, A]);
325
+ const zn = () => {
326
+ if (S === null || N) return;
327
+ const i = T[S].name, t = A.toLowerCase().trim();
328
+ let r = "wrong";
329
+ t === i ? (F((u) => u + 1), P("correct"), r = "correct") : On(t, i) === 1 ? (F((u) => u + 0.5), P("almost"), r = "almost") : (P("wrong"), r = "wrong"), V((u) => [...u, { round: C, answer: t, correct: i, result: r }]), tn(!0), setTimeout(() => {
330
+ tn(!1), U(!0);
439
331
  }, 600);
440
- }, ye = () => z < x ? (K((e) => e + 1), se()) : O(!0), we = () => {
441
- T(!1), O(!1), I(null);
442
- }, be = Z(
443
- () => /* @__PURE__ */ n("div", { style: { ...o.gmLogoFixed, position: "absolute", top: 16, left: 16, zIndex: 30 }, children: /* @__PURE__ */ d("picture", { children: [
444
- /* @__PURE__ */ n(
445
- "source",
446
- {
447
- srcSet: window.origin + "/cloud/speakid/games/whatsmissing/logo.svg",
448
- type: "image/svg+xml"
449
- }
450
- ),
451
- /* @__PURE__ */ n(
452
- "img",
453
- {
454
- src: window.origin + "/cloud/speakid/games/whatsmissing/logo.png",
455
- alt: "SPEAKID Logo",
456
- style: o.gmLogoImg,
457
- loading: "lazy"
458
- }
459
- )
460
- ] }) }),
461
- []
462
- ), le = 1200, ae = 700, xe = Z(() => {
463
- const e = r ?? (typeof window < "u" ? window.innerWidth : le), t = h ?? (typeof window < "u" ? window.innerHeight : ae), l = Math.min(e / le, t / ae);
464
- return Math.min(1.35, Math.max(1, l));
465
- }, [r, h, p]);
466
- return /* @__PURE__ */ n("div", { ref: i, style: { width: "100%", height: "100%" }, children: A && ze(
467
- /* @__PURE__ */ n(
468
- "div",
469
- {
470
- id: "whats-missing-root",
471
- style: { all: "unset" },
472
- children: /* @__PURE__ */ n(
473
- "div",
332
+ }, Pn = () => C < M ? (Q((i) => i + 1), sn()) : Y(!0), Ln = () => {
333
+ J(!1), Y(!1), O(null);
334
+ }, Mn = Yn(
335
+ () => n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? null : (
336
+ // ensure logo is positioned inside the square container
337
+ /* @__PURE__ */ w("div", { style: { ...e.gmLogoFixed, position: "absolute", top: 16, left: 16, zIndex: 30 }, children: /* @__PURE__ */ c("picture", { children: [
338
+ /* @__PURE__ */ w(
339
+ "source",
474
340
  {
475
- ref: f,
476
- style: {
477
- width: p ? "100%" : `${k}px`,
478
- height: p ? "100%" : `${k}px`,
479
- borderRadius: p ? 0 : "20px",
480
- background: "linear-gradient(to bottom, #fff8f8 0%, #f9fafb 100%)",
481
- position: "relative",
482
- overflow: "hidden",
483
- boxShadow: p ? "none" : "0 0 40px rgba(0,0,0,0.08)",
484
- display: "flex",
485
- justifyContent: "center",
486
- alignItems: "center"
487
- },
488
- children: /* @__PURE__ */ d(
489
- "div",
490
- {
491
- style: {
492
- transform: `scale(${xe})`,
493
- transformOrigin: "center center",
494
- transition: "transform 0.2s ease-out",
495
- width: "100%",
496
- height: "100%",
497
- display: "flex",
498
- flexDirection: "column",
499
- justifyContent: "center",
500
- alignItems: "center"
501
- },
502
- children: [
503
- !p && be,
504
- !y && !u && /* @__PURE__ */ d("div", { style: o.gmCenterScreen, children: [
505
- /* @__PURE__ */ n("h1", { style: o.gmHeadline1, children: "WHAT'S MISSING?" }),
506
- /* @__PURE__ */ n("p", { style: o.gmBodyM, children: "Select a theme:" }),
507
- /* @__PURE__ */ n("div", { style: { display: "flex", gap: 16 }, children: ["animals", "food", "toys"].map((e) => /* @__PURE__ */ n("button", { style: o.gmButton, onClick: () => I(e), children: e === "animals" ? "🐶 Animals" : e === "food" ? "🍎 Food" : "🧸 Toys" }, e)) }),
508
- /* @__PURE__ */ d("div", { style: { marginTop: 24 }, children: [
509
- /* @__PURE__ */ n("p", { style: o.gmBodyS, children: "Choose number of rounds:" }),
510
- /* @__PURE__ */ n("div", { style: { display: "flex", gap: 12, marginTop: 8 }, children: [3, 4, 5].map((e) => /* @__PURE__ */ n(
511
- "button",
512
- {
513
- style: {
514
- ...o.gmButton,
515
- ...x === e ? o.gmButtonActive : {}
516
- },
517
- onClick: () => S(e),
518
- children: e
341
+ srcSet: window.origin + "/cloud/speakid/games/whatsmissing/logo.svg",
342
+ type: "image/svg+xml"
343
+ }
344
+ ),
345
+ /* @__PURE__ */ w(
346
+ "img",
347
+ {
348
+ src: window.origin + "/cloud/speakid/games/whatsmissing/logo.png",
349
+ alt: "SPEAKID Logo",
350
+ style: e.gmLogoImg,
351
+ loading: "lazy"
352
+ }
353
+ )
354
+ ] }) })
355
+ ),
356
+ [n]
357
+ );
358
+ return /* @__PURE__ */ w(
359
+ "div",
360
+ {
361
+ ref: h,
362
+ style: {
363
+ width: "100%",
364
+ height: "100%",
365
+ display: "flex",
366
+ justifyContent: "center",
367
+ alignItems: "center",
368
+ background: "linear-gradient(to bottom, #fff8f8 0%, #f9fafb 100%)",
369
+ transition: "background 0.3s ease",
370
+ overflow: "hidden",
371
+ position: "absolute",
372
+ top: 0,
373
+ left: 0,
374
+ right: 0,
375
+ bottom: 0
376
+ },
377
+ children: /* @__PURE__ */ w(
378
+ "div",
379
+ {
380
+ style: {
381
+ width: n ? "100%" : rn || o || 1e3,
382
+ height: n ? "100%" : rn || o || 1e3,
383
+ display: "flex",
384
+ justifyContent: "center",
385
+ alignItems: "center",
386
+ overflow: "hidden",
387
+ borderRadius: n ? 0 : "20px",
388
+ background: "linear-gradient(to bottom, #fff8f8 0%, #f9fafb 100%)",
389
+ boxShadow: n ? "none" : "0 0 40px rgba(0,0,0,0.1)",
390
+ margin: n ? "0 auto" : "unset",
391
+ position: "relative"
392
+ // needed so absolute logo is inside the square
393
+ },
394
+ children: /* @__PURE__ */ w(
395
+ "div",
396
+ {
397
+ style: {
398
+ transform: "none",
399
+ width: "100%",
400
+ height: "100%",
401
+ display: "flex",
402
+ justifyContent: "center",
403
+ alignItems: "center"
404
+ },
405
+ children: /* @__PURE__ */ c("div", { id: "whats-missing-root", children: [
406
+ !n && Mn,
407
+ !m && !z && /* @__PURE__ */ c("div", { style: e.gmCenterScreen, children: [
408
+ /* @__PURE__ */ w("h1", { style: e.gmHeadline1, children: "WHAT'S MISSING?" }),
409
+ /* @__PURE__ */ w("p", { style: e.gmBodyM, children: "Select a theme:" }),
410
+ /* @__PURE__ */ w("div", { style: { display: "flex", 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" : "16px" }, children: ["animals", "food", "toys"].map((i) => /* @__PURE__ */ w("button", { style: {
411
+ ...e.gmButton,
412
+ padding: 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" : "12px 24px",
413
+ fontSize: 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 ? "12px" : "16px",
414
+ minWidth: 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 ? "70px" : "auto"
415
+ }, onClick: () => O(i), children: i === "animals" ? "🐶 Animals" : i === "food" ? "🍎 Food" : "🧸 Toys" }, i)) }),
416
+ /* @__PURE__ */ c("div", { style: { marginTop: 24 }, children: [
417
+ /* @__PURE__ */ w("p", { style: e.gmBodyS, children: "Choose number of rounds:" }),
418
+ /* @__PURE__ */ w("div", { style: { display: "flex", 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", marginTop: 8 }, children: [3, 4, 5].map((i) => /* @__PURE__ */ w(
419
+ "button",
420
+ {
421
+ style: {
422
+ ...e.gmButton,
423
+ ...M === i ? e.gmButtonActive : {},
424
+ padding: 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 10px" : "12px 24px",
425
+ fontSize: 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 ? "12px" : "16px",
426
+ minWidth: 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 ? "40px" : "auto"
519
427
  },
520
- e
521
- )) })
522
- ] })
428
+ onClick: () => ln(i),
429
+ children: i
430
+ },
431
+ i
432
+ )) })
433
+ ] })
434
+ ] }),
435
+ m && !z && /* @__PURE__ */ c("div", { style: e.gmCenterScreen, children: [
436
+ /* @__PURE__ */ c("h1", { style: e.gmHeadline1, children: [
437
+ "Theme selected: ",
438
+ m
523
439
  ] }),
524
- y && !u && /* @__PURE__ */ d("div", { style: o.gmCenterScreen, children: [
525
- /* @__PURE__ */ d("h1", { style: o.gmHeadline1, children: [
526
- "Theme selected: ",
527
- y
528
- ] }),
529
- /* @__PURE__ */ d("p", { style: o.gmBodyM, children: [
530
- "Rounds: ",
531
- x
532
- ] }),
533
- /* @__PURE__ */ n("button", { style: o.gmButton, onClick: re, children: "▶ Start game" })
440
+ /* @__PURE__ */ c("p", { style: e.gmBodyM, children: [
441
+ "Rounds: ",
442
+ M
534
443
  ] }),
535
- W && /* @__PURE__ */ d("div", { style: o.gmCenterScreen, children: [
536
- /* @__PURE__ */ n("h1", { style: o.gmHeadline1, children: "Results" }),
537
- /* @__PURE__ */ d("h2", { style: o.gmHeadline3, children: [
538
- "Your score: ",
539
- he,
540
- " / ",
541
- x
542
- ] }),
543
- /* @__PURE__ */ n("p", { style: { ...o.gmBodyM, color: "#10b981", marginTop: 12 }, children: "Yahoo! You did it! 🍬✨" }),
544
- /* @__PURE__ */ d("table", { style: o.gmTable, children: [
545
- /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ d("tr", { children: [
546
- /* @__PURE__ */ n("th", { children: "Round" }),
547
- /* @__PURE__ */ n("th", { children: "Your Answer" }),
548
- /* @__PURE__ */ n("th", { children: "Correct" }),
549
- /* @__PURE__ */ n("th", { children: "Result" })
550
- ] }) }),
551
- /* @__PURE__ */ n("tbody", { children: ue.map((e, t) => /* @__PURE__ */ d("tr", { children: [
552
- /* @__PURE__ */ n("td", { style: o.gmTableCell, children: e.round }),
553
- /* @__PURE__ */ n("td", { style: o.gmTableCell, children: e.answer || "—" }),
554
- /* @__PURE__ */ n("td", { style: o.gmTableCell, children: e.correct }),
555
- /* @__PURE__ */ n("td", { style: o.gmTableCell, children: e.result === "correct" ? "✔ Correct" : e.result === "almost" ? "◐ Almost (0.5)" : "✘ Wrong" })
556
- ] }, t)) })
557
- ] }),
558
- /* @__PURE__ */ d("div", { style: { display: "flex", gap: 12, marginTop: 24 }, children: [
559
- /* @__PURE__ */ n("button", { style: o.gmButton, onClick: re, children: "🔁 Play again" }),
560
- /* @__PURE__ */ n("button", { style: o.gmButton, onClick: we, children: "⬅️ Choose theme" })
561
- ] })
444
+ /* @__PURE__ */ w("button", { style: {
445
+ ...e.gmButton,
446
+ padding: 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 16px" : "12px 24px",
447
+ fontSize: 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 ? "14px" : "16px",
448
+ minWidth: 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 ? "120px" : "auto"
449
+ }, onClick: gn, children: " Start game" })
450
+ ] }),
451
+ R && /* @__PURE__ */ c("div", { style: e.gmCenterScreen, children: [
452
+ /* @__PURE__ */ w("h1", { style: {
453
+ ...e.gmHeadline1,
454
+ 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 || g || s || p || a || l || x || H || W ? "0px" : e.gmHeadline1.marginTop,
455
+ 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 || g || s || p || a || l || x || H || W ? "2px" : e.gmHeadline1.marginBottom
456
+ }, children: "Results" }),
457
+ /* @__PURE__ */ c("h2", { style: {
458
+ ...e.gmHeadline3,
459
+ 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 || g || s || p || a || l || x || H || W ? "0px" : e.gmHeadline3.marginTop,
460
+ 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 || g || s || p || a || l || x || H || W ? "2px" : e.gmHeadline3.marginBottom
461
+ }, children: [
462
+ "Your score: ",
463
+ Hn,
464
+ " / ",
465
+ M
562
466
  ] }),
563
- u && !W && /* @__PURE__ */ d("div", { style: o.gmGameLayout, children: [
564
- /* @__PURE__ */ d(
565
- "div",
566
- {
567
- style: {
568
- minHeight: 160,
569
- display: "flex",
570
- flexDirection: "column",
571
- justifyContent: "center",
572
- alignItems: "center"
573
- },
574
- children: [
575
- b === "ready" && /* @__PURE__ */ d(ve, { children: [
576
- /* @__PURE__ */ n("h1", { style: { ...o.gmHeadline1, color: "#ec4c44" }, children: "GET READY" }),
577
- /* @__PURE__ */ n("div", { style: o.gmHourglass, children: "" })
578
- ] }),
579
- b === "memorize" && /* @__PURE__ */ d("p", { style: { ...o.gmBodyM, color: "#10b981" }, children: [
580
- "MEMORIZE (",
581
- G,
582
- ")"
583
- ] }),
584
- b === "guess" && !R && /* @__PURE__ */ d("p", { style: o.gmBodyM, children: [
585
- "⏳ Time left: ",
586
- $,
587
- "s"
588
- ] })
589
- ]
590
- }
591
- ),
592
- b !== "ready" && /* @__PURE__ */ n(
593
- "div",
594
- {
595
- style: {
596
- ...o.gmGrid,
597
- display: "grid",
598
- gridTemplateColumns: `repeat(${p ? 2 : 3}, 1fr)`,
599
- gridTemplateRows: `repeat(${p ? 3 : 2}, 1fr)`,
600
- gap: p ? 12 : 20,
601
- justifyContent: "center",
602
- alignContent: "center",
603
- padding: p ? 8 : 16,
604
- width: "100%",
605
- height: "100%",
606
- maxWidth: p ? "100%" : 600,
607
- maxHeight: p ? "100%" : 400,
608
- boxSizing: "border-box"
609
- },
610
- children: s.map((e, t) => {
611
- const l = C === t && b === "guess" && !R;
612
- return /* @__PURE__ */ n(
613
- "div",
614
- {
615
- style: {
616
- ...o.gmCard,
617
- width: "100%",
618
- height: "100%",
619
- ...ne === "correct" && C === t ? o.gmCorrect : {},
620
- ...ne === "wrong" && C === t ? o.gmWrong : {}
621
- },
622
- children: !l && /* @__PURE__ */ n(
623
- "img",
624
- {
625
- src: e.src,
626
- alt: e.name,
627
- style: {
628
- width: "100%",
629
- height: "100%",
630
- objectFit: "cover",
631
- display: "block"
632
- }
633
- }
634
- )
635
- },
636
- t
637
- );
638
- })
639
- }
640
- ),
641
- /* @__PURE__ */ d("div", { style: { marginTop: 16, height: 80 }, children: [
642
- b === "guess" && !R && /* @__PURE__ */ d("div", { children: [
643
- /* @__PURE__ */ n(
644
- "input",
645
- {
646
- type: "text",
647
- placeholder: "Type the missing word",
648
- value: j,
649
- onChange: (e) => ee(e.target.value),
650
- style: o.gmInput
651
- }
652
- ),
653
- /* @__PURE__ */ n(
654
- "button",
467
+ /* @__PURE__ */ w("p", { style: {
468
+ ...e.gmBodyM,
469
+ color: "#10b981",
470
+ 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 || g || s || p || a || l || x || H || W ? "0px" : "12px",
471
+ 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 || g || s || p || a || l || x || H || W ? "2px" : e.gmBodyM.marginBottom
472
+ }, children: "Yahoo! You did it! 🍬✨" }),
473
+ /* @__PURE__ */ c("table", { style: {
474
+ ...e.gmTable,
475
+ 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 || g || s || p || a || l || x || H || W ? "0px" : "20px",
476
+ 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 || g || s || p || a || l || x || H || W ? "4px" : "32px"
477
+ }, children: [
478
+ /* @__PURE__ */ w("thead", { children: /* @__PURE__ */ c("tr", { children: [
479
+ /* @__PURE__ */ w("th", { children: "Round" }),
480
+ /* @__PURE__ */ w("th", { children: "Your Answer" }),
481
+ /* @__PURE__ */ w("th", { children: "Correct" }),
482
+ /* @__PURE__ */ w("th", { children: "Result" })
483
+ ] }) }),
484
+ /* @__PURE__ */ w("tbody", { children: Wn.map((i, t) => /* @__PURE__ */ c("tr", { children: [
485
+ /* @__PURE__ */ w("td", { style: e.gmTableCell, children: i.round }),
486
+ /* @__PURE__ */ w("td", { style: e.gmTableCell, children: i.answer || "—" }),
487
+ /* @__PURE__ */ w("td", { style: e.gmTableCell, children: i.correct }),
488
+ /* @__PURE__ */ w("td", { style: e.gmTableCell, children: i.result === "correct" ? "✔ Correct" : i.result === "almost" ? "◐ Almost (0.5)" : "✘ Wrong" })
489
+ ] }, t)) })
490
+ ] }),
491
+ /* @__PURE__ */ c("div", { style: {
492
+ display: "flex",
493
+ 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",
494
+ 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 || f ? "12px" : "24px"
495
+ }, children: [
496
+ /* @__PURE__ */ w("button", { style: {
497
+ ...e.gmButton,
498
+ padding: 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 10px" : "12px 24px",
499
+ fontSize: 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 ? "12px" : "16px",
500
+ minWidth: 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 ? "80px" : "auto"
501
+ }, onClick: gn, children: "🔁 Play again" }),
502
+ /* @__PURE__ */ w("button", { style: {
503
+ ...e.gmButton,
504
+ padding: 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 10px" : "12px 24px",
505
+ fontSize: 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 ? "12px" : "16px",
506
+ minWidth: 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 ? "80px" : "auto"
507
+ }, onClick: Ln, children: "⬅️ Choose theme" })
508
+ ] })
509
+ ] }),
510
+ z && !R && /* @__PURE__ */ c("div", { style: e.gmGameLayout, children: [
511
+ /* @__PURE__ */ c(
512
+ "div",
513
+ {
514
+ style: {
515
+ minHeight: 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 ? "45px" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "60px" : "160px",
516
+ display: "flex",
517
+ flexDirection: "column",
518
+ justifyContent: "center",
519
+ alignItems: "center",
520
+ 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 ? "8px" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "15px" : "40px"
521
+ },
522
+ children: [
523
+ I === "ready" && /* @__PURE__ */ c(pn, { children: [
524
+ /* @__PURE__ */ w("h1", { style: { ...e.gmHeadline1, color: "#ec4c44" }, children: "GET READY" }),
525
+ /* @__PURE__ */ w("div", { style: e.gmHourglass, children: "⏳" })
526
+ ] }),
527
+ I === "memorize" && /* @__PURE__ */ c("p", { style: { ...e.gmBodyM, color: "#10b981" }, children: [
528
+ "MEMORIZE (",
529
+ D,
530
+ ")"
531
+ ] }),
532
+ I === "guess" && !k && /* @__PURE__ */ c("p", { style: e.gmBodyM, children: [
533
+ "⏳ Time left: ",
534
+ G,
535
+ "s"
536
+ ] })
537
+ ]
538
+ }
539
+ ),
540
+ I !== "ready" && /* @__PURE__ */ w(
541
+ "div",
542
+ {
543
+ style: {
544
+ ...e.gmGrid,
545
+ 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)" : "repeat(3, 210px)",
546
+ // desktop: 3 колонки фиксированного размера
547
+ 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" : "210px",
548
+ // desktop: стандартная высота
549
+ 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" : "20px",
550
+ justifyItems: "center",
551
+ 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%",
552
+ 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" : "16px"
553
+ },
554
+ children: T.map((i, t) => {
555
+ const r = S === t && I === "guess" && !k;
556
+ return /* @__PURE__ */ w(
557
+ "div",
655
558
  {
656
- style: { ...o.gmButton, marginLeft: 8 },
657
- onClick: pe,
658
- disabled: Y,
659
- children: Y ? "..." : "Check"
559
+ style: {
560
+ width: "100%",
561
+ height: "100%",
562
+ 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",
563
+ overflow: "hidden",
564
+ 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)",
565
+ transition: "all 0.3s ease",
566
+ cursor: "pointer",
567
+ ...dn === "correct" && S === t ? {
568
+ 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",
569
+ transform: "scale(1.03)"
570
+ } : {},
571
+ ...dn === "wrong" && S === t ? {
572
+ 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",
573
+ transform: "scale(1.03)"
574
+ } : {}
575
+ },
576
+ children: !r && /* @__PURE__ */ w(
577
+ "img",
578
+ {
579
+ src: i.src,
580
+ alt: i.name,
581
+ style: {
582
+ width: "100%",
583
+ height: "100%",
584
+ objectFit: "cover"
585
+ }
586
+ }
587
+ )
588
+ },
589
+ t
590
+ );
591
+ })
592
+ }
593
+ ),
594
+ /* @__PURE__ */ c("div", { style: {
595
+ 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" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "4px" : "16px",
596
+ 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" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "50px" : "80px"
597
+ }, children: [
598
+ I === "guess" && !k && /* @__PURE__ */ w("div", { style: {
599
+ display: "flex",
600
+ flexDirection: n && window.innerWidth > window.innerHeight || window.innerHeight < 700 || window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || g || s || p || a || l || x || H || W || f ? "row" : "column",
601
+ 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 || f || g || s || p || a || l || x || H || W ? "8px" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "6px" : "12px",
602
+ alignItems: "center",
603
+ justifyContent: "center",
604
+ width: "100%",
605
+ 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 || f || g || s || p || a || l || x || H || W || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "400px" : "300px"
606
+ }, children: /* @__PURE__ */ c(pn, { children: [
607
+ /* @__PURE__ */ w(
608
+ "input",
609
+ {
610
+ type: "text",
611
+ placeholder: "Type the missing word",
612
+ value: A,
613
+ onChange: (i) => wn(i.target.value),
614
+ style: {
615
+ ...e.gmInput,
616
+ width: 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 || f || g || s || p || a || l || x || H || W || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "250px" : "auto",
617
+ 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 || f || g || s || p || a || l || x || H || W || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 12px" : "12px 16px",
618
+ 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 || f || g || s || p || a || l || x || H || W || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px",
619
+ flex: n && window.innerWidth > window.innerHeight || window.innerHeight < 700 || window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || g || s || p || a || l || x || H || W || f ? "1" : "none"
660
620
  }
661
- )
662
- ] }),
663
- R && /* @__PURE__ */ n("button", { type: "button", style: o.gmButton, onClick: ye, children: "Next round" })
664
- ] })
621
+ }
622
+ ),
623
+ /* @__PURE__ */ w(
624
+ "button",
625
+ {
626
+ style: {
627
+ ...e.gmButton,
628
+ marginLeft: n && window.innerWidth > window.innerHeight || window.innerHeight < 700 || window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || g || s || p || a || l || x || H || W || f ? "8px" : "0",
629
+ 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 || f || g || s || p || a || l || x || H || W || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 16px" : "12px 24px",
630
+ 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 || f || g || s || p || a || l || x || H || W || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px",
631
+ 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 || f || g || s || p || a || l || x || H || W || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "80px" : "100px",
632
+ flexShrink: 0
633
+ },
634
+ onClick: zn,
635
+ disabled: N,
636
+ children: N ? "..." : "Check"
637
+ }
638
+ )
639
+ ] }) }),
640
+ k && /* @__PURE__ */ w("button", { style: {
641
+ ...e.gmButton,
642
+ 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 || f || g || s || p || a || l || x || H || W || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 16px" : "12px 24px",
643
+ 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 || f || g || s || p || a || l || x || H || W || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px"
644
+ }, onClick: Pn, children: "Next round" })
665
645
  ] })
666
- ]
667
- }
668
- )
669
- }
670
- )
671
- }
672
- ),
673
- A
674
- ) });
646
+ ] })
647
+ ] })
648
+ }
649
+ )
650
+ }
651
+ )
652
+ }
653
+ );
675
654
  }
676
655
  export {
677
- Ee as Game,
678
- ce as themes
656
+ ii as Game,
657
+ an as themes
679
658
  };