speakid-hangman 1.0.5 → 1.0.6

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,5 +1,5 @@
1
- import { jsx as n, jsxs as u, Fragment as O } from "react/jsx-runtime";
2
- import { useState as m, useMemo as X, useCallback as le, useEffect as de } from "react";
1
+ import { jsx as o, jsxs as h, Fragment as G } from "react/jsx-runtime";
2
+ import { useState as m, useMemo as Q, useCallback as ge, useEffect as pe } from "react";
3
3
  const a = {
4
4
  gmCenterScreen: {
5
5
  position: "relative",
@@ -202,17 +202,17 @@ const a = {
202
202
  display: "block"
203
203
  }
204
204
  };
205
- function Se({
205
+ function Fe({
206
206
  mistakes: r,
207
- maxMistakes: U,
208
- size: D = 200
207
+ maxMistakes: J,
208
+ size: _ = 200
209
209
  }) {
210
- const l = D, g = D * 1.25, b = Math.max(3, D / 100), T = 10 * (l / 200), f = 240 * (g / 250), x = 150 * (l / 200), y = 80 * (l / 200), K = 20 * (g / 250), G = 240 * (g / 250), w = 80 * (l / 200), Q = 20 * (g / 250), $ = 150 * (l / 200), B = 150 * (l / 200), M = 20 * (g / 250), z = 50 * (g / 250), v = 150 * (l / 200), W = 70 * (g / 250), N = 20 * (l / 200), S = 150 * (l / 200), q = 90 * (g / 250), E = 150 * (g / 250), h = 150 * (l / 200), F = 110 * (g / 250), p = 130 * (l / 200), C = 130 * (g / 250), J = 150 * (l / 200), H = 110 * (g / 250), ce = 170 * (l / 200), L = 130 * (g / 250), ee = 150 * (l / 200), _ = 150 * (g / 250), d = 130 * (l / 200), te = 190 * (g / 250), I = 150 * (l / 200), ne = 150 * (g / 250), s = 170 * (l / 200), V = 190 * (g / 250), c = r === 0 || r <= U * 0.5 ? "#1f2937" : r <= U * 0.75 ? "#f59e0b" : "#ec4c44";
211
- return /* @__PURE__ */ u(
210
+ const l = _, c = _ * 1.25, w = Math.max(3, _ / 100), W = 10 * (l / 200), f = 240 * (c / 250), x = 150 * (l / 200), y = 80 * (l / 200), ee = 20 * (c / 250), N = 240 * (c / 250), k = 80 * (l / 200), P = 20 * (c / 250), v = 150 * (l / 200), C = 150 * (l / 200), $ = 20 * (c / 250), H = 50 * (c / 250), S = 150 * (l / 200), I = 70 * (c / 250), V = 20 * (l / 200), L = 150 * (l / 200), te = 90 * (c / 250), O = 150 * (c / 250), u = 150 * (l / 200), F = 110 * (c / 250), g = 130 * (l / 200), R = 130 * (c / 250), ne = 150 * (l / 200), j = 110 * (c / 250), he = 170 * (l / 200), T = 130 * (c / 250), oe = 150 * (l / 200), Z = 150 * (c / 250), d = 130 * (l / 200), re = 190 * (c / 250), E = 150 * (l / 200), ie = 150 * (c / 250), p = 170 * (l / 200), ae = 190 * (c / 250), b = r === 0 || r <= J * 0.5 ? "#1f2937" : r <= J * 0.75 ? "#f59e0b" : "#ec4c44";
211
+ return /* @__PURE__ */ h(
212
212
  "svg",
213
213
  {
214
214
  width: l,
215
- height: g,
215
+ height: c,
216
216
  viewBox: "0 0 200 250",
217
217
  style: {
218
218
  display: "block",
@@ -225,129 +225,129 @@ function Se({
225
225
  // ✅ Включение аппаратного ускорения на iOS
226
226
  },
227
227
  children: [
228
- r > 0 && /* @__PURE__ */ n(
228
+ r > 0 && /* @__PURE__ */ o(
229
229
  "line",
230
230
  {
231
- x1: T,
231
+ x1: W,
232
232
  y1: f,
233
233
  x2: x,
234
234
  y2: f,
235
- stroke: c,
236
- strokeWidth: b
235
+ stroke: b,
236
+ strokeWidth: w
237
237
  }
238
238
  ),
239
- r > 1 && /* @__PURE__ */ n(
239
+ r > 1 && /* @__PURE__ */ o(
240
240
  "line",
241
241
  {
242
242
  x1: y,
243
- y1: K,
243
+ y1: ee,
244
244
  x2: y,
245
- y2: G,
246
- stroke: c,
247
- strokeWidth: b
245
+ y2: N,
246
+ stroke: b,
247
+ strokeWidth: w
248
248
  }
249
249
  ),
250
- r > 2 && /* @__PURE__ */ n(
250
+ r > 2 && /* @__PURE__ */ o(
251
251
  "line",
252
252
  {
253
- x1: w,
254
- y1: Q,
255
- x2: $,
256
- y2: Q,
257
- stroke: c,
258
- strokeWidth: b
253
+ x1: k,
254
+ y1: P,
255
+ x2: v,
256
+ y2: P,
257
+ stroke: b,
258
+ strokeWidth: w
259
259
  }
260
260
  ),
261
- r > 3 && /* @__PURE__ */ n(
261
+ r > 3 && /* @__PURE__ */ o(
262
262
  "line",
263
263
  {
264
- x1: B,
265
- y1: M,
266
- x2: B,
267
- y2: z,
268
- stroke: c,
269
- strokeWidth: b
264
+ x1: C,
265
+ y1: $,
266
+ x2: C,
267
+ y2: H,
268
+ stroke: b,
269
+ strokeWidth: w
270
270
  }
271
271
  ),
272
- r > 4 && /* @__PURE__ */ n(
272
+ r > 4 && /* @__PURE__ */ o(
273
273
  "circle",
274
274
  {
275
- cx: v,
276
- cy: W,
277
- r: N,
278
- stroke: c,
275
+ cx: S,
276
+ cy: I,
277
+ r: V,
278
+ stroke: b,
279
279
  fill: "none",
280
- strokeWidth: b
280
+ strokeWidth: w
281
281
  }
282
282
  ),
283
- r > 5 && /* @__PURE__ */ n(
283
+ r > 5 && /* @__PURE__ */ o(
284
284
  "line",
285
285
  {
286
- x1: S,
287
- y1: q,
288
- x2: S,
289
- y2: E,
290
- stroke: c,
291
- strokeWidth: b
286
+ x1: L,
287
+ y1: te,
288
+ x2: L,
289
+ y2: O,
290
+ stroke: b,
291
+ strokeWidth: w
292
292
  }
293
293
  ),
294
- r > 6 && /* @__PURE__ */ n(
294
+ r > 6 && /* @__PURE__ */ o(
295
295
  "line",
296
296
  {
297
- x1: h,
297
+ x1: u,
298
298
  y1: F,
299
- x2: p,
300
- y2: C,
301
- stroke: c,
302
- strokeWidth: b
299
+ x2: g,
300
+ y2: R,
301
+ stroke: b,
302
+ strokeWidth: w
303
303
  }
304
304
  ),
305
- r > 7 && /* @__PURE__ */ n(
305
+ r > 7 && /* @__PURE__ */ o(
306
306
  "line",
307
307
  {
308
- x1: J,
309
- y1: H,
310
- x2: ce,
311
- y2: L,
312
- stroke: c,
313
- strokeWidth: b
308
+ x1: ne,
309
+ y1: j,
310
+ x2: he,
311
+ y2: T,
312
+ stroke: b,
313
+ strokeWidth: w
314
314
  }
315
315
  ),
316
- r > 8 && /* @__PURE__ */ n(
316
+ r > 8 && /* @__PURE__ */ o(
317
317
  "line",
318
318
  {
319
- x1: ee,
320
- y1: _,
319
+ x1: oe,
320
+ y1: Z,
321
321
  x2: d,
322
- y2: te,
323
- stroke: c,
324
- strokeWidth: b
322
+ y2: re,
323
+ stroke: b,
324
+ strokeWidth: w
325
325
  }
326
326
  ),
327
- r > 9 && /* @__PURE__ */ n(
327
+ r > 9 && /* @__PURE__ */ o(
328
328
  "line",
329
329
  {
330
- x1: I,
331
- y1: ne,
332
- x2: s,
333
- y2: V,
334
- stroke: c,
335
- strokeWidth: b
330
+ x1: E,
331
+ y1: ie,
332
+ x2: p,
333
+ y2: ae,
334
+ stroke: b,
335
+ strokeWidth: w
336
336
  }
337
337
  )
338
338
  ]
339
339
  }
340
340
  );
341
341
  }
342
- function Te({
342
+ function We({
343
343
  gameCubeSize: r = 400,
344
- screenHeight: U = 800,
345
- screenWidth: D = 800,
344
+ screenHeight: J = 800,
345
+ screenWidth: _ = 800,
346
346
  logoUrl: l,
347
- showLogo: g = !0,
348
- baseURL: b
347
+ showLogo: c = !0,
348
+ baseURL: w
349
349
  } = {}) {
350
- const T = {
350
+ const W = {
351
351
  Professions: ["teacher", "doctor", "nurse", "driver", "police", "firefighter", "cook", "waiter", "farmer", "builder", "singer", "actor", "dentist", "pilot", "vet", "artist", "cleaner", "student", "baker", "mechanic"],
352
352
  Family: ["mother", "father", "sister", "brother", "grandmother", "grandfather", "aunt", "uncle", "cousin", "baby", "parents", "children", "wife", "husband", "son", "daughter", "family", "twins", "relatives"],
353
353
  "Farm animals": ["cow", "pig", "horse", "sheep", "goat", "duck", "chicken", "rooster", "turkey", "goose", "rabbit", "mouse", "donkey", "bee", "hen", "lamb", "bull", "pony"],
@@ -365,133 +365,133 @@ function Te({
365
365
  Environment: ["tree", "forest", "air", "water", "pollution", "recycle", "nature", "clean", "waste", "plastic", "energy", "animal", "climate", "earth", "ocean", "river", "planet", "save", "green", "environment", "litter", "organic"],
366
366
  Space: ["planet", "star", "sun", "moon", "astronaut", "rocket", "space", "galaxy", "universe", "telescope", "comet", "asteroid", "orbit", "gravity", "alien", "spaceship", "mars", "satellite", "sky", "eclipse"],
367
367
  Devices: ["computer", "laptop", "phone", "tablet", "tv", "keyboard", "mouse", "printer", "camera", "headphones", "charger", "screen", "watch", "microphone", "speaker", "console", "router", "battery", "cable", "remote"]
368
- }, [f, x] = m("lobby"), [y, K] = m(""), [G] = m("Normal"), [w, Q] = m(0), [$, B] = m(1), [M, z] = m(""), [v, W] = m([]), [N, S] = m(0), [q, E] = m(0), [h, F] = m(null), [p, C] = m(null), [J, H] = m(1), [ce, L] = m([]), ee = G === "Easy" ? 8 : G === "Normal" ? 6 : 4, _ = b || (typeof window < "u" && window.origin ? `${window.origin}/cloud/speakid/games/hangman` : "/cloud/speakid/games/hangman"), [d, te] = m(!1), [I, ne] = m(!1), s = X(() => {
369
- const e = (p || r || 1e3) / 400;
368
+ }, [f, x] = m("lobby"), [y, ee] = m(""), [N] = m("Normal"), [k, P] = m(0), [v, C] = m(1), [$, H] = m(""), [S, I] = m([]), [V, L] = m(0), [te, O] = m(0), [u, F] = m(null), [g, R] = m(null), [ne, j] = m(1), [he, T] = m([]), oe = N === "Easy" ? 8 : N === "Normal" ? 6 : 4, Z = w || (typeof window < "u" && window.origin ? `${window.origin}/cloud/speakid/games/hangman` : "/cloud/speakid/games/hangman"), [d, re] = m(!1), [E, ie] = m(!1), [p, ae] = m(!1), s = Q(() => {
369
+ const e = (g || r || 1e3) / 400, t = p ? 0.8 : 1;
370
370
  return {
371
- headline1: d ? Math.max(24, Math.min(30, 30 * e)) : Math.max(28, Math.min(32, 32 * e)),
371
+ headline1: d ? Math.max(24, Math.min(30, 30 * e * t)) : Math.max(28, Math.min(32, 32 * e)),
372
372
  // Desktop: 32px
373
- headline2: Math.max(20, Math.min(28, 24 * e)),
373
+ headline2: Math.max(20, Math.min(28, 24 * e * t)),
374
374
  // Desktop: 24px
375
- headline3: d ? Math.max(14, Math.min(18, 16 * e)) : Math.max(20, Math.min(26, 24 * e)),
375
+ headline3: d ? Math.max(14, Math.min(18, 16 * e * t)) : Math.max(20, Math.min(26, 24 * e * t)),
376
376
  // Desktop: 24px
377
- bodyL: Math.max(14, Math.min(20, 18 * e)),
377
+ bodyL: Math.max(14, Math.min(20, 18 * e * t)),
378
378
  // Desktop: 18px
379
- bodyM: d ? Math.max(12, Math.min(16, 14 * e)) : Math.max(14, Math.min(18, 16 * e)),
379
+ bodyM: d ? Math.max(12, Math.min(16, 14 * e * t)) : Math.max(14, Math.min(18, 16 * e * t)),
380
380
  // Desktop: 16px
381
- bodyS: d ? Math.max(10, Math.min(14, 12 * e)) : Math.max(12, Math.min(16, 14 * e)),
381
+ bodyS: d ? Math.max(10, Math.min(14, 12 * e * t)) : Math.max(12, Math.min(16, 14 * e * t)),
382
382
  // Desktop: 14px
383
- wordDisplay: Math.max(18, Math.min(32, 26 * e)),
383
+ wordDisplay: Math.max(18, Math.min(32, 26 * e * t)),
384
384
  // Адаптивный размер
385
- button: Math.max(12, Math.min(18, 16 * e))
385
+ button: Math.max(12, Math.min(18, 16 * e * t))
386
386
  // Desktop: 16px
387
387
  };
388
- }, [d, p, r]), V = X(() => {
389
- const e = (p || r || 1e3) / 400;
390
- return I ? Math.max(8, Math.min(12, 10 * e)) : Math.max(12, Math.min(24, 16 * e));
391
- }, [I, p, r]), o = X(() => {
392
- const e = (p || r || 1e3) / 400;
393
- return I ? Math.max(3, Math.min(6, 5 * e)) : Math.max(4, Math.min(12, 8 * e));
394
- }, [I, p, r]), c = X(() => {
395
- const e = (p || r || 1e3) / 400;
388
+ }, [d, g, r, p]), b = Q(() => {
389
+ const e = (g || r || 1e3) / 400, t = p ? 0.65 : 1;
390
+ return E ? Math.max(8, Math.min(12, 10 * e)) : Math.max(12, Math.min(24, 16 * e)) * t;
391
+ }, [E, g, r, p]), n = Q(() => {
392
+ const e = (g || r || 1e3) / 400, t = p ? 0.65 : 1;
393
+ return E ? Math.max(3, Math.min(6, 5 * e)) : Math.max(4, Math.min(12, 8 * e)) * t;
394
+ }, [E, g, r, p]), M = Q(() => {
395
+ const e = (g || r || 1e3) / 400;
396
396
  return Math.max(6, Math.min(10, 8 * e));
397
- }, [p, r]), he = (e, t) => e.split("").every((i) => t.includes(i)), me = (e, t) => e.split("").map((i) => t.includes(i) ? i : "_").join(" "), fe = (e) => "abcdefghijklmnopqrstuvwxyz".split("").filter((i) => !e.includes(i)), Z = (e, t = []) => {
398
- var P;
399
- if (!e || !T[e]) {
400
- const k = Object.keys(T)[0];
401
- return ((P = T[k]) == null ? void 0 : P[0]) || "";
397
+ }, [g, r]), fe = (e, t) => e.split("").every((i) => t.includes(i)), xe = (e, t) => e.split("").map((i) => t.includes(i) ? i : "_").join(" "), ye = (e) => "abcdefghijklmnopqrstuvwxyz".split("").filter((i) => !e.includes(i)), U = (e, t = []) => {
398
+ var q;
399
+ if (!e || !W[e]) {
400
+ const z = Object.keys(W)[0];
401
+ return ((q = W[z]) == null ? void 0 : q[0]) || "";
402
402
  }
403
- const i = T[e];
403
+ const i = W[e];
404
404
  if (!i || i.length === 0)
405
405
  return "";
406
- const R = i.filter((k) => !t.includes(k)), j = R.length > 0 ? R : i;
407
- if (j.length === 0)
406
+ const B = i.filter((z) => !t.includes(z)), Y = B.length > 0 ? B : i;
407
+ if (Y.length === 0)
408
408
  return "";
409
- let A;
409
+ let D;
410
410
  if (typeof crypto < "u" && crypto.getRandomValues) {
411
- const k = new Uint32Array(1);
412
- crypto.getRandomValues(k);
413
- const ue = k[0] / 4294967295;
414
- A = Math.floor(ue * j.length);
411
+ const z = new Uint32Array(1);
412
+ crypto.getRandomValues(z);
413
+ const A = z[0] / 4294967295;
414
+ D = Math.floor(A * Y.length);
415
415
  } else
416
- A = Math.floor(Math.random() * j.length);
417
- return j[A];
418
- }, xe = () => {
416
+ D = Math.floor(Math.random() * Y.length);
417
+ return Y[D];
418
+ }, be = () => {
419
419
  if (!y) return;
420
- L([]);
421
- const e = Z(y, []);
420
+ T([]);
421
+ const e = U(y, []);
422
422
  if (!e) {
423
423
  x("category");
424
424
  return;
425
425
  }
426
- z(e), L([e]), W([]), S(0), B(1), E(0), F(null), x("game");
427
- }, oe = le((e) => {
428
- if (f !== "game" || h !== null) return;
426
+ H(e), T([e]), I([]), L(0), C(1), O(0), F(null), x("game");
427
+ }, se = ge((e) => {
428
+ if (f !== "game" || u !== null) return;
429
429
  const t = e.toLowerCase();
430
- /^[a-z]$/.test(t) && (W((i) => i.includes(t) ? i : [...i, t]), z((i) => (i && !i.includes(t) && S((R) => R + 1), i)));
431
- }, [f, h]), re = le((e) => {
432
- oe(e.key);
433
- }, [oe]);
434
- de(() => {
430
+ /^[a-z]$/.test(t) && (I((i) => i.includes(t) ? i : [...i, t]), H((i) => (i && !i.includes(t) && L((B) => B + 1), i)));
431
+ }, [f, u]), le = ge((e) => {
432
+ se(e.key);
433
+ }, [se]);
434
+ pe(() => {
435
435
  if (f === "game")
436
- return window.addEventListener("keydown", re), () => window.removeEventListener("keydown", re);
437
- }, [f, re]);
438
- const ye = M ? me(M, v) : "", ge = M ? he(M, v) : !1, pe = N >= 10, be = fe(v), ie = le(() => {
439
- if (!y || $ >= w) {
436
+ return window.addEventListener("keydown", le), () => window.removeEventListener("keydown", le);
437
+ }, [f, le]);
438
+ const we = $ ? xe($, S) : "", ue = $ ? fe($, S) : !1, me = V >= 10, ke = ye(S), de = ge(() => {
439
+ if (!y || v >= k) {
440
440
  x("result");
441
441
  return;
442
442
  }
443
- B((e) => e + 1), L((e) => {
444
- const t = Z(y, e);
445
- return t ? (z(t), [...e, t]) : e;
446
- }), W([]), S(0), F(null);
447
- }, [y, $, w]);
448
- de(() => {
449
- if (ge && h === null) {
450
- F("win"), E((t) => t + 1);
443
+ C((e) => e + 1), T((e) => {
444
+ const t = U(y, e);
445
+ return t ? (H(t), [...e, t]) : e;
446
+ }), I([]), L(0), F(null);
447
+ }, [y, v, k]);
448
+ pe(() => {
449
+ if (ue && u === null) {
450
+ F("win"), O((t) => t + 1);
451
451
  const e = setTimeout(() => {
452
- ie();
452
+ de();
453
453
  }, 2e3);
454
454
  return () => clearTimeout(e);
455
455
  }
456
- if (pe && h === null) {
456
+ if (me && u === null) {
457
457
  F("lose");
458
458
  const e = setTimeout(() => {
459
- ie();
459
+ de();
460
460
  }, 2e3);
461
461
  return () => clearTimeout(e);
462
462
  }
463
- }, [ge, pe, h, ie]);
464
- const ke = () => {
465
- if (!y || $ >= w) {
463
+ }, [ue, me, u, de]);
464
+ const Me = () => {
465
+ if (!y || v >= k) {
466
466
  x("result");
467
467
  return;
468
468
  }
469
- B((e) => e + 1), L((e) => {
470
- const t = Z(y, e);
471
- return t ? (z(t), [...e, t]) : e;
472
- }), W([]), S(0), F(null);
469
+ C((e) => e + 1), T((e) => {
470
+ const t = U(y, e);
471
+ return t ? (H(t), [...e, t]) : e;
472
+ }), I([]), L(0), F(null);
473
473
  };
474
- de(() => {
474
+ pe(() => {
475
475
  const e = () => {
476
- const t = window.innerWidth, i = window.innerHeight, R = t < 768 || t === 926 && i === 428 || t === 932 && i === 430, j = i < 700, A = t / i > 1.8, P = t === 1024 && i === 600;
477
- if (te(R), ne(P), r && r >= 320) {
478
- const ve = Math.max(320, Math.min(1200, r));
479
- C(ve), H(1);
480
- } else if (R)
481
- C(null), H(1);
482
- else if (j)
483
- C(null), H(1);
484
- else if (A) {
485
- const k = Math.min(1e3, Math.min(t, i) * 0.9);
486
- C(k), H(0.85);
476
+ const t = window.innerWidth, i = window.innerHeight, B = t < 768 || t === 926 && i === 428 || t === 932 && i === 430, Y = i < 700, D = t / i > 1.8, q = t === 1024 && i === 600, z = B && t > i;
477
+ if (re(B), ie(q), ae(z), r && r >= 320) {
478
+ const Le = Math.max(320, Math.min(1200, r));
479
+ R(Le), j(1);
480
+ } else if (B)
481
+ R(null), j(1);
482
+ else if (Y)
483
+ R(null), j(1);
484
+ else if (D) {
485
+ const A = Math.min(1e3, Math.min(t, i) * 0.9);
486
+ R(A), j(0.85);
487
487
  } else {
488
- const k = Math.min(1e3, Math.min(t, i) * 0.9);
489
- C(k), H(1);
488
+ const A = Math.min(1e3, Math.min(t, i) * 0.9);
489
+ R(A), j(1);
490
490
  }
491
491
  };
492
492
  return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
493
493
  }, [r]);
494
- const se = `
494
+ const K = `
495
495
  <svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" style="position: absolute; top: 0; left: 0; pointer-events: none; opacity: 0.2;">
496
496
  <!-- Каракули мелками и фломастерами -->
497
497
 
@@ -535,32 +535,32 @@ function Te({
535
535
  <path d="M 35% 85% Q 37% 83%, 39% 85% T 43% 85% T 47% 85%"
536
536
  fill="none" stroke="#FF4500" stroke-width="3.5" stroke-linecap="round"/>
537
537
  </svg>
538
- `, we = !d && typeof window < "u" && window.innerWidth >= 768 && window.innerWidth < 1024, ae = !d && g && (f !== "game" || we), Me = {
538
+ `, $e = !d && typeof window < "u" && window.innerWidth >= 768 && window.innerWidth < 1024, ce = !d && c && (f !== "game" || $e), ve = {
539
539
  ...a.gmCenterScreen,
540
540
  width: "100%",
541
541
  height: "100%",
542
- padding: `${V}px`,
543
- paddingTop: ae ? "60px" : `${V}px`,
542
+ padding: `${b}px`,
543
+ paddingTop: ce ? "60px" : `${b}px`,
544
544
  // ✅ Резервируем место под логотип (16px top + 28px высота + 16px отступ)
545
545
  overflow: "auto",
546
546
  position: "relative",
547
547
  boxSizing: "border-box",
548
548
  background: "transparent"
549
- }, Y = X(
549
+ }, X = Q(
550
550
  () => {
551
551
  const e = window.innerWidth, t = window.innerHeight;
552
- if (d && e > t || t < 700 || !ae)
552
+ if (d && e > t || t < 700 || !ce)
553
553
  return null;
554
554
  const i = l || (typeof window < "u" && window.origin ? `${window.origin}/cloud/speakid/games/hangman/logo` : "/cloud/speakid/games/hangman/logo");
555
- return /* @__PURE__ */ n("div", { style: a.gmLogoFixed, children: /* @__PURE__ */ u("picture", { children: [
556
- /* @__PURE__ */ n(
555
+ return /* @__PURE__ */ o("div", { style: a.gmLogoFixed, children: /* @__PURE__ */ h("picture", { children: [
556
+ /* @__PURE__ */ o(
557
557
  "source",
558
558
  {
559
559
  srcSet: `${i}.svg`,
560
560
  type: "image/svg+xml"
561
561
  }
562
562
  ),
563
- /* @__PURE__ */ n(
563
+ /* @__PURE__ */ o(
564
564
  "img",
565
565
  {
566
566
  src: `${i}.png`,
@@ -571,18 +571,18 @@ function Te({
571
571
  )
572
572
  ] }) });
573
573
  },
574
- [d, ae, l, f]
575
- ), $e = () => f === "lobby" ? /* @__PURE__ */ u(O, { children: [
576
- Y,
577
- /* @__PURE__ */ n("div", { dangerouslySetInnerHTML: { __html: se } }),
578
- /* @__PURE__ */ n("h1", { style: {
574
+ [d, ce, l, f]
575
+ ), Se = () => f === "lobby" ? /* @__PURE__ */ h(G, { children: [
576
+ X,
577
+ /* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: K } }),
578
+ /* @__PURE__ */ o("h1", { style: {
579
579
  ...a.gmHeadline1,
580
580
  fontSize: `${s.headline1}px`,
581
- marginBottom: `${o * 3}px`,
581
+ marginBottom: `${n * 3}px`,
582
582
  position: "relative",
583
583
  zIndex: 1
584
584
  }, children: "HANGMAN" }),
585
- /* @__PURE__ */ u(
585
+ /* @__PURE__ */ h(
586
586
  "button",
587
587
  {
588
588
  onClick: () => x("category"),
@@ -591,8 +591,8 @@ function Te({
591
591
  fontWeight: 500,
592
592
  // Medium для более заметности
593
593
  fontSize: `${s.button}px`,
594
- padding: `${o * 1.2}px ${o * 3}px`,
595
- borderRadius: `${c * 1.5}px`,
594
+ padding: `${n * 1.2}px ${n * 3}px`,
595
+ borderRadius: `${M * 1.5}px`,
596
596
  position: "relative",
597
597
  zIndex: 1,
598
598
  display: "flex",
@@ -616,7 +616,7 @@ function Te({
616
616
  e.currentTarget.style.transform = "translateY(0)";
617
617
  },
618
618
  children: [
619
- /* @__PURE__ */ n(
619
+ /* @__PURE__ */ o(
620
620
  "svg",
621
621
  {
622
622
  width: `${s.button * 1.3}px`,
@@ -624,8 +624,8 @@ function Te({
624
624
  viewBox: "0 0 24 24",
625
625
  fill: "none",
626
626
  xmlns: "http://www.w3.org/2000/svg",
627
- style: { display: "block", marginRight: `${o}px` },
628
- children: /* @__PURE__ */ n(
627
+ style: { display: "block", marginRight: `${n}px` },
628
+ children: /* @__PURE__ */ o(
629
629
  "path",
630
630
  {
631
631
  d: "M8 5V19L19 12L8 5Z",
@@ -635,11 +635,11 @@ function Te({
635
635
  )
636
636
  }
637
637
  ),
638
- /* @__PURE__ */ n("span", { style: { fontWeight: 500 }, children: "PLAY" })
638
+ /* @__PURE__ */ o("span", { style: { fontWeight: 500 }, children: "PLAY" })
639
639
  ]
640
640
  }
641
641
  ),
642
- /* @__PURE__ */ u("div", { style: {
642
+ /* @__PURE__ */ h("div", { style: {
643
643
  position: "absolute",
644
644
  top: "50%",
645
645
  left: "50%",
@@ -649,34 +649,34 @@ function Te({
649
649
  pointerEvents: "none",
650
650
  zIndex: 0
651
651
  }, children: [
652
- /* @__PURE__ */ n(
652
+ /* @__PURE__ */ o(
653
653
  "img",
654
654
  {
655
- src: `${_}/sun.png`,
655
+ src: `${Z}/sun.png`,
656
656
  alt: "Sun",
657
657
  style: {
658
658
  position: "absolute",
659
659
  left: d ? "-10%" : "5%",
660
660
  top: "20%",
661
661
  width: "auto",
662
- height: d ? `${Math.min(window.innerHeight * 0.33, 200)}px` : `${Math.min((p || r || 1e3) * 0.33, 300)}px`,
662
+ height: d ? `${Math.min(window.innerHeight * 0.33, 200)}px` : `${Math.min((g || r || 1e3) * 0.33, 300)}px`,
663
663
  maxHeight: "33vh",
664
664
  objectFit: "contain",
665
665
  opacity: 0.6
666
666
  }
667
667
  }
668
668
  ),
669
- /* @__PURE__ */ n(
669
+ /* @__PURE__ */ o(
670
670
  "img",
671
671
  {
672
- src: `${_}/character.png`,
672
+ src: `${Z}/character.png`,
673
673
  alt: "Hangman character",
674
674
  style: {
675
675
  position: "absolute",
676
676
  right: d ? "5%" : "10%",
677
677
  bottom: "10%",
678
678
  width: "auto",
679
- height: d ? `${Math.min(window.innerHeight * 0.33, 200)}px` : `${Math.min((p || r || 1e3) * 0.33, 300)}px`,
679
+ height: d ? `${Math.min(window.innerHeight * 0.33, 200)}px` : `${Math.min((g || r || 1e3) * 0.33, 300)}px`,
680
680
  maxHeight: "33vh",
681
681
  objectFit: "contain",
682
682
  opacity: 0.6
@@ -684,10 +684,10 @@ function Te({
684
684
  }
685
685
  )
686
686
  ] })
687
- ] }) : f === "category" ? /* @__PURE__ */ u(O, { children: [
688
- Y,
689
- /* @__PURE__ */ n("div", { dangerouslySetInnerHTML: { __html: se } }),
690
- /* @__PURE__ */ n(
687
+ ] }) : f === "category" ? /* @__PURE__ */ h(G, { children: [
688
+ X,
689
+ /* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: K } }),
690
+ /* @__PURE__ */ o(
691
691
  "button",
692
692
  {
693
693
  onClick: () => x("lobby"),
@@ -701,8 +701,8 @@ function Te({
701
701
  ...a.gmButton,
702
702
  ...a.gmButtonSecondary,
703
703
  fontSize: `${s.button}px`,
704
- padding: `${o}px ${o * 1.5}px`,
705
- borderRadius: `${c}px`,
704
+ padding: `${n}px ${n * 1.5}px`,
705
+ borderRadius: `${M}px`,
706
706
  position: "absolute",
707
707
  top: "52px",
708
708
  // ✅ Под логотипом (16px top логотипа + 28px высота логотипа + 8px отступ)
@@ -713,11 +713,11 @@ function Te({
713
713
  children: "←"
714
714
  }
715
715
  ),
716
- /* @__PURE__ */ n("div", { style: { ...a.gmButtonGroup, gap: `${o}px`, marginBottom: `${o * 3}px`, marginTop: `${o * 4}px`, position: "relative", zIndex: 1 }, children: Object.keys(T).map((e) => /* @__PURE__ */ n(
716
+ /* @__PURE__ */ o("div", { style: { ...a.gmButtonGroup, gap: `${n}px`, marginBottom: `${n * 3}px`, marginTop: `${n * 4}px`, position: "relative", zIndex: 1 }, children: Object.keys(W).map((e) => /* @__PURE__ */ o(
717
717
  "button",
718
718
  {
719
719
  onClick: () => {
720
- K(e), x("rounds");
720
+ ee(e), x("rounds");
721
721
  },
722
722
  onMouseEnter: (t) => {
723
723
  t.currentTarget.style.backgroundColor = "#f0f0f0", t.currentTarget.style.borderColor = "#1f2937", t.currentTarget.style.transform = "scale(1.05)";
@@ -729,10 +729,10 @@ function Te({
729
729
  fontFamily: '"Onest", system-ui, sans-serif',
730
730
  fontWeight: 500,
731
731
  fontSize: `${s.button}px`,
732
- padding: `${o * 1.2}px ${o * 2}px`,
733
- borderRadius: `${c * 2}px`,
732
+ padding: `${n * 1.2}px ${n * 2}px`,
733
+ borderRadius: `${M * 2}px`,
734
734
  // Более округлые для облачков
735
- margin: `${o / 2}px`,
735
+ margin: `${n / 2}px`,
736
736
  background: "transparent",
737
737
  border: "2px solid #e5e7eb",
738
738
  color: "#1f2937",
@@ -744,10 +744,10 @@ function Te({
744
744
  },
745
745
  e
746
746
  )) })
747
- ] }) : f === "rounds" ? /* @__PURE__ */ u(O, { children: [
748
- Y,
749
- /* @__PURE__ */ n("div", { dangerouslySetInnerHTML: { __html: se } }),
750
- /* @__PURE__ */ n(
747
+ ] }) : f === "rounds" ? /* @__PURE__ */ h(G, { children: [
748
+ X,
749
+ /* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: K } }),
750
+ /* @__PURE__ */ o(
751
751
  "button",
752
752
  {
753
753
  onClick: () => x("category"),
@@ -761,8 +761,8 @@ function Te({
761
761
  ...a.gmButton,
762
762
  ...a.gmButtonSecondary,
763
763
  fontSize: `${s.button}px`,
764
- padding: `${o}px ${o * 1.5}px`,
765
- borderRadius: `${c}px`,
764
+ padding: `${n}px ${n * 1.5}px`,
765
+ borderRadius: `${M}px`,
766
766
  position: "absolute",
767
767
  top: "52px",
768
768
  // ✅ Под логотипом (16px top логотипа + 28px высота логотипа + 8px отступ)
@@ -773,12 +773,12 @@ function Te({
773
773
  children: "←"
774
774
  }
775
775
  ),
776
- /* @__PURE__ */ n("h1", { style: { ...a.gmHeadline1, fontSize: `${s.headline1}px`, marginBottom: `${o * 2}px`, position: "relative", zIndex: 1 }, children: "Choose rounds" }),
777
- /* @__PURE__ */ n("div", { style: { ...a.gmButtonGroup, gap: `${o}px`, marginBottom: `${o * 3}px`, position: "relative", zIndex: 1 }, children: [1, 3, 5].map((e) => /* @__PURE__ */ n(
776
+ /* @__PURE__ */ o("h1", { style: { ...a.gmHeadline1, fontSize: `${s.headline1}px`, marginBottom: `${n * 2}px`, position: "relative", zIndex: 1 }, children: "Choose rounds" }),
777
+ /* @__PURE__ */ o("div", { style: { ...a.gmButtonGroup, gap: `${n}px`, marginBottom: `${n * 3}px`, position: "relative", zIndex: 1 }, children: [1, 3, 5].map((e) => /* @__PURE__ */ o(
778
778
  "button",
779
779
  {
780
780
  onClick: () => {
781
- Q(e), xe();
781
+ P(e), be();
782
782
  },
783
783
  onMouseEnter: (t) => {
784
784
  t.currentTarget.style.backgroundColor = "#f0f0f0", t.currentTarget.style.borderColor = "#1f2937", t.currentTarget.style.transform = "scale(1.05)";
@@ -790,10 +790,10 @@ function Te({
790
790
  fontFamily: '"Onest", system-ui, sans-serif',
791
791
  fontWeight: 500,
792
792
  fontSize: `${s.button}px`,
793
- padding: `${o * 1.2}px ${o * 2}px`,
794
- borderRadius: `${c * 2}px`,
793
+ padding: `${n * 1.2}px ${n * 2}px`,
794
+ borderRadius: `${M * 2}px`,
795
795
  // Более округлые для облачков
796
- margin: `${o / 2}px`,
796
+ margin: `${n / 2}px`,
797
797
  background: "transparent",
798
798
  border: "2px solid #e5e7eb",
799
799
  color: "#1f2937",
@@ -805,97 +805,108 @@ function Te({
805
805
  },
806
806
  e
807
807
  )) })
808
- ] }) : f === "game" ? /* @__PURE__ */ u(O, { children: [
809
- Y,
810
- /* @__PURE__ */ u("div", { style: {
808
+ ] }) : f === "game" ? /* @__PURE__ */ h(G, { children: [
809
+ X,
810
+ !p && /* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: K } }),
811
+ " ",
812
+ /* @__PURE__ */ h("div", { style: {
811
813
  ...a.gmInfoBox,
812
- padding: `${o * 0.8}px`,
813
- marginBottom: `${o * 0.5}px`,
814
- maxWidth: `${(p || r) * 0.9}px`
814
+ padding: `${p ? n * 0.6 : n * 0.8}px`,
815
+ // Уменьшаем padding в landscape
816
+ marginBottom: `${p ? n * 0.3 : n * 0.5}px`,
817
+ // ✅ Уменьшаем margin в landscape
818
+ maxWidth: `${(g || r) * 0.9}px`
815
819
  }, children: [
816
- /* @__PURE__ */ u("h3", { style: { ...a.gmHeadline3, fontSize: `${s.headline3}px`, marginBottom: `${o * 0.5}px` }, children: [
820
+ /* @__PURE__ */ h("h3", { style: { ...a.gmHeadline3, fontSize: `${s.headline3}px`, marginBottom: `${n * 0.5}px` }, children: [
817
821
  "Category: ",
818
822
  y
819
823
  ] }),
820
- /* @__PURE__ */ u("p", { style: { ...a.gmBodyM, fontSize: `${s.bodyM}px`, marginBottom: "0px" }, children: [
824
+ /* @__PURE__ */ h("p", { style: { ...a.gmBodyM, fontSize: `${s.bodyM}px`, marginBottom: "0px" }, children: [
821
825
  "Round ",
822
- $,
826
+ v,
823
827
  " of ",
824
- w
828
+ k
825
829
  ] })
826
830
  ] }),
827
- M && /* @__PURE__ */ u("p", { style: {
831
+ $ && /* @__PURE__ */ h("p", { style: {
828
832
  ...a.gmBodyS,
829
833
  fontSize: `${s.bodyS}px`,
830
- marginTop: `${o * 0.5}px`,
831
- marginBottom: `${o}px`
834
+ marginTop: `${p ? n * 0.3 : n * 0.5}px`,
835
+ // ✅ Уменьшаем margin в landscape
836
+ marginBottom: `${p ? n * 0.5 : n}px`
837
+ // ✅ Уменьшаем margin в landscape
832
838
  }, children: [
833
839
  "I am thinking of a word that is ",
834
- /* @__PURE__ */ n("strong", { children: M.length }),
840
+ /* @__PURE__ */ o("strong", { children: $.length }),
835
841
  " letters long"
836
842
  ] }),
837
- /* @__PURE__ */ n("div", { style: {
838
- margin: `${o}px 0`,
843
+ /* @__PURE__ */ o("div", { style: {
844
+ margin: `${p ? n * 0.5 : n}px 0`,
845
+ // ✅ Уменьшаем margin в landscape
839
846
  display: "flex",
840
847
  justifyContent: "center",
841
848
  alignItems: "center"
842
- }, children: /* @__PURE__ */ n(
843
- Se,
849
+ }, children: /* @__PURE__ */ o(
850
+ Fe,
844
851
  {
845
- mistakes: N,
846
- maxMistakes: ee,
847
- size: I ? Math.max(80, Math.min(110, (p || r) * 0.16)) : d ? Math.max(100, Math.min(150, Math.min(window.innerWidth * 0.3, window.innerHeight * 0.2))) : Math.max(100, Math.min(150, (p || r) * 0.2))
852
+ mistakes: V,
853
+ maxMistakes: oe,
854
+ size: E ? Math.max(80, Math.min(110, (g || r) * 0.16)) : d ? p ? Math.max(70, Math.min(120, Math.min(window.innerWidth * 0.25, window.innerHeight * 0.15))) : Math.max(100, Math.min(150, Math.min(window.innerWidth * 0.3, window.innerHeight * 0.2))) : Math.max(100, Math.min(150, (g || r) * 0.2))
848
855
  }
849
856
  ) }),
850
- /* @__PURE__ */ n("div", { style: {
857
+ /* @__PURE__ */ o("div", { style: {
851
858
  ...a.gmWordDisplay,
852
859
  fontSize: `${Math.max(16, Math.min(24, s.wordDisplay * 0.9))}px`,
853
- margin: `${o}px 0`,
854
- letterSpacing: `${o * 0.8}px`,
860
+ margin: `${p ? n * 0.5 : n}px 0`,
861
+ // Уменьшаем margin в landscape
862
+ letterSpacing: `${n * 0.8}px`,
855
863
  minHeight: `${Math.max(16, Math.min(24, s.wordDisplay * 0.9)) * 1.2}px`
856
- }, children: ye || "Loading..." }),
857
- /* @__PURE__ */ u("div", { style: {
864
+ }, children: we || "Loading..." }),
865
+ /* @__PURE__ */ h("div", { style: {
858
866
  ...a.gmInfoBox,
859
- padding: `${o}px`,
860
- marginTop: `${o}px`,
861
- marginBottom: `${o}px`,
862
- maxWidth: `${(p || r) * 0.95}px`
867
+ padding: `${p ? n * 0.6 : n}px`,
868
+ // ✅ Уменьшаем padding в landscape
869
+ marginTop: `${p ? n * 0.5 : n}px`,
870
+ // Уменьшаем margin в landscape
871
+ marginBottom: `${p ? n * 0.5 : n}px`,
872
+ // ✅ Уменьшаем margin в landscape
873
+ maxWidth: `${(g || r) * 0.95}px`
863
874
  }, children: [
864
- /* @__PURE__ */ n("p", { style: {
875
+ /* @__PURE__ */ o("p", { style: {
865
876
  ...a.gmBodyS,
866
877
  fontSize: `${s.bodyS}px`,
867
- marginBottom: `${o}px`,
878
+ marginBottom: `${n}px`,
868
879
  fontWeight: 500
869
880
  // Medium
870
881
  }, children: "Available letters:" }),
871
- /* @__PURE__ */ n("div", { style: {
882
+ /* @__PURE__ */ o("div", { style: {
872
883
  display: "flex",
873
884
  flexWrap: "wrap",
874
- gap: `${o / 3}px`,
885
+ gap: `${n / 3}px`,
875
886
  justifyContent: "center",
876
887
  fontSize: `${Math.max(9, Math.min(12, s.bodyS * 0.75))}px`,
877
888
  fontFamily: '"Onest", system-ui, sans-serif'
878
- }, children: be.map((e) => /* @__PURE__ */ n(
889
+ }, children: ke.map((e) => /* @__PURE__ */ o(
879
890
  "button",
880
891
  {
881
- onClick: () => oe(e),
882
- disabled: h !== null,
892
+ onClick: () => se(e),
893
+ disabled: u !== null,
883
894
  onMouseEnter: (t) => {
884
- h === null && (t.currentTarget.style.backgroundColor = "#e5e7eb", t.currentTarget.style.cursor = "pointer");
895
+ u === null && (t.currentTarget.style.backgroundColor = "#e5e7eb", t.currentTarget.style.cursor = "pointer");
885
896
  },
886
897
  onMouseLeave: (t) => {
887
- h === null && (t.currentTarget.style.backgroundColor = "#f9f9f9", t.currentTarget.style.cursor = "pointer");
898
+ u === null && (t.currentTarget.style.backgroundColor = "#f9f9f9", t.currentTarget.style.cursor = "pointer");
888
899
  },
889
900
  style: {
890
- padding: `${o / 4}px ${o / 3}px`,
891
- borderRadius: `${c * 0.5}px`,
901
+ padding: `${n / 4}px ${n / 3}px`,
902
+ borderRadius: `${M * 0.5}px`,
892
903
  background: "#f9f9f9",
893
904
  color: "#1f2937",
894
905
  border: "1px solid #e5e7eb",
895
- minWidth: `${Math.max(o * 1.5, (p || r) * 0.04)}px`,
906
+ minWidth: `${Math.max(n * 1.5, (g || r) * 0.04)}px`,
896
907
  textAlign: "center",
897
908
  display: "inline-block",
898
- cursor: h === null ? "pointer" : "default",
909
+ cursor: u === null ? "pointer" : "default",
899
910
  fontFamily: '"Onest", system-ui, sans-serif',
900
911
  fontSize: `${Math.max(9, Math.min(12, s.bodyS * 0.75))}px`,
901
912
  transition: "background-color 0.2s ease"
@@ -905,32 +916,32 @@ function Te({
905
916
  e
906
917
  )) })
907
918
  ] }),
908
- v.length > 0 && /* @__PURE__ */ n("div", { style: {
919
+ S.length > 0 && /* @__PURE__ */ o("div", { style: {
909
920
  ...a.gmGuessedLetters,
910
921
  fontSize: `${Math.max(10, Math.min(12, s.bodyS * 0.85))}px`,
911
- marginTop: `${o * 0.5}px`,
922
+ marginTop: `${n * 0.5}px`,
912
923
  marginBottom: "2px"
913
- }, children: /* @__PURE__ */ u("span", { style: { color: "#6b7280" }, children: [
924
+ }, children: /* @__PURE__ */ h("span", { style: { color: "#6b7280" }, children: [
914
925
  "Guessed letters: ",
915
- /* @__PURE__ */ n("strong", { children: v.join(", ") })
926
+ /* @__PURE__ */ o("strong", { children: S.join(", ") })
916
927
  ] }) }),
917
- h === "win" && /* @__PURE__ */ n("div", { style: {
928
+ u === "win" && /* @__PURE__ */ o("div", { style: {
918
929
  ...a.gmStatusWin,
919
930
  fontSize: `${s.bodyL}px`,
920
931
  margin: "2px 0"
921
932
  }, children: "🎉 You won this round!" }),
922
- h === "lose" && /* @__PURE__ */ u("div", { style: {
933
+ u === "lose" && /* @__PURE__ */ h("div", { style: {
923
934
  ...a.gmStatusLose,
924
935
  fontSize: `${s.bodyL}px`,
925
936
  margin: "2px 0"
926
937
  }, children: [
927
938
  "The hangman is complete! The word was: ",
928
- /* @__PURE__ */ n("strong", { children: M })
939
+ /* @__PURE__ */ o("strong", { children: $ })
929
940
  ] }),
930
- h !== null && $ < w && /* @__PURE__ */ n("div", { style: { marginTop: "2px", marginBottom: `${o}px` }, children: /* @__PURE__ */ n(
941
+ u !== null && v < k && /* @__PURE__ */ o("div", { style: { marginTop: "2px", marginBottom: `${n}px` }, children: /* @__PURE__ */ o(
931
942
  "button",
932
943
  {
933
- onClick: ke,
944
+ onClick: Me,
934
945
  onMouseEnter: (e) => {
935
946
  e.currentTarget.style.backgroundColor = "#d43a32";
936
947
  },
@@ -940,13 +951,13 @@ function Te({
940
951
  style: {
941
952
  ...a.gmButton,
942
953
  fontSize: `${Math.max(11, Math.min(14, s.button * 0.85))}px`,
943
- padding: `${o * 0.6}px ${o * 1.2}px`,
944
- borderRadius: `${c}px`
954
+ padding: `${n * 0.6}px ${n * 1.2}px`,
955
+ borderRadius: `${M}px`
945
956
  },
946
957
  children: "NEXT"
947
958
  }
948
959
  ) }),
949
- h !== null && $ >= w && /* @__PURE__ */ n("div", { style: { marginTop: "2px", marginBottom: `${o}px` }, children: /* @__PURE__ */ n(
960
+ u !== null && v >= k && /* @__PURE__ */ o("div", { style: { marginTop: "2px", marginBottom: `${n}px` }, children: /* @__PURE__ */ o(
950
961
  "button",
951
962
  {
952
963
  onClick: () => x("result"),
@@ -959,53 +970,53 @@ function Te({
959
970
  style: {
960
971
  ...a.gmButton,
961
972
  fontSize: `${s.button}px`,
962
- padding: `${o}px ${o * 1.5}px`,
963
- borderRadius: `${c}px`
973
+ padding: `${n}px ${n * 1.5}px`,
974
+ borderRadius: `${M}px`
964
975
  },
965
976
  children: "View results"
966
977
  }
967
978
  ) }),
968
- h === null && v.length === 0 && /* @__PURE__ */ n("p", { style: {
979
+ u === null && S.length === 0 && /* @__PURE__ */ o("p", { style: {
969
980
  ...a.gmBodyS,
970
981
  fontSize: `${s.bodyS}px`,
971
- marginTop: `${o}px`,
972
- marginBottom: `${o}px`
982
+ marginTop: `${n}px`,
983
+ marginBottom: `${n}px`
973
984
  }, children: "Type a letter on your keyboard" })
974
- ] }) : f === "result" ? /* @__PURE__ */ u(O, { children: [
975
- Y,
976
- /* @__PURE__ */ n("h1", { style: {
985
+ ] }) : f === "result" ? /* @__PURE__ */ h(G, { children: [
986
+ X,
987
+ /* @__PURE__ */ o("h1", { style: {
977
988
  ...a.gmHeadline1,
978
989
  fontSize: `${s.headline1}px`,
979
- marginBottom: `${o * 2}px`
990
+ marginBottom: `${n * 2}px`
980
991
  }, children: "🎊 Game Finished!" }),
981
- /* @__PURE__ */ u("p", { style: {
992
+ /* @__PURE__ */ h("p", { style: {
982
993
  ...a.gmBodyL,
983
994
  fontSize: `${s.bodyL}px`,
984
- marginBottom: `${o * 2}px`
995
+ marginBottom: `${n * 2}px`
985
996
  }, children: [
986
997
  "You guessed ",
987
- /* @__PURE__ */ n("strong", { children: q }),
998
+ /* @__PURE__ */ o("strong", { children: te }),
988
999
  " out of ",
989
- /* @__PURE__ */ n("strong", { children: w }),
1000
+ /* @__PURE__ */ o("strong", { children: k }),
990
1001
  " words correctly."
991
1002
  ] }),
992
- /* @__PURE__ */ u("div", { style: {
1003
+ /* @__PURE__ */ h("div", { style: {
993
1004
  display: "flex",
994
1005
  flexDirection: "column",
995
- gap: `${o}px`,
1006
+ gap: `${n}px`,
996
1007
  alignItems: "center"
997
1008
  }, children: [
998
- /* @__PURE__ */ n(
1009
+ /* @__PURE__ */ o(
999
1010
  "button",
1000
1011
  {
1001
1012
  onClick: () => {
1002
- if (!y || w === 0) {
1013
+ if (!y || k === 0) {
1003
1014
  x("lobby");
1004
1015
  return;
1005
1016
  }
1006
- L([]);
1007
- const e = Z(y, []);
1008
- e && (z(e), L([e]), W([]), S(0), B(1), E(0), F(null), x("game"));
1017
+ T([]);
1018
+ const e = U(y, []);
1019
+ e && (H(e), T([e]), I([]), L(0), C(1), O(0), F(null), x("game"));
1009
1020
  },
1010
1021
  onMouseEnter: (e) => {
1011
1022
  e.currentTarget.style.backgroundColor = "#d43a32";
@@ -1016,14 +1027,14 @@ function Te({
1016
1027
  style: {
1017
1028
  ...a.gmButton,
1018
1029
  fontSize: `${s.button}px`,
1019
- padding: `${o}px ${o * 1.5}px`,
1020
- borderRadius: `${c}px`,
1030
+ padding: `${n}px ${n * 1.5}px`,
1031
+ borderRadius: `${M}px`,
1021
1032
  minWidth: "200px"
1022
1033
  },
1023
1034
  children: "Play again"
1024
1035
  }
1025
1036
  ),
1026
- /* @__PURE__ */ n(
1037
+ /* @__PURE__ */ o(
1027
1038
  "button",
1028
1039
  {
1029
1040
  onClick: () => x("lobby"),
@@ -1037,8 +1048,8 @@ function Te({
1037
1048
  ...a.gmButton,
1038
1049
  ...a.gmButtonSecondary,
1039
1050
  fontSize: `${s.button}px`,
1040
- padding: `${o}px ${o * 1.5}px`,
1041
- borderRadius: `${c}px`,
1051
+ padding: `${n}px ${n * 1.5}px`,
1052
+ borderRadius: `${M}px`,
1042
1053
  minWidth: "200px"
1043
1054
  },
1044
1055
  children: "Exit"
@@ -1046,7 +1057,7 @@ function Te({
1046
1057
  )
1047
1058
  ] })
1048
1059
  ] }) : null;
1049
- return /* @__PURE__ */ n(
1060
+ return /* @__PURE__ */ o(
1050
1061
  "div",
1051
1062
  {
1052
1063
  style: {
@@ -1063,12 +1074,12 @@ function Te({
1063
1074
  right: 0,
1064
1075
  bottom: 0
1065
1076
  },
1066
- children: /* @__PURE__ */ n(
1077
+ children: /* @__PURE__ */ o(
1067
1078
  "div",
1068
1079
  {
1069
1080
  style: {
1070
- width: d ? "100%" : p || r || 1e3,
1071
- height: d ? "100%" : p || r || 1e3,
1081
+ width: d ? "100%" : g || r || 1e3,
1082
+ height: d ? "100%" : g || r || 1e3,
1072
1083
  display: "flex",
1073
1084
  justifyContent: "center",
1074
1085
  alignItems: "center",
@@ -1079,9 +1090,9 @@ function Te({
1079
1090
  margin: d ? "0 auto" : "unset",
1080
1091
  position: "relative",
1081
1092
  // needed so absolute logo is inside the square
1082
- transform: `scale(${J})`
1093
+ transform: `scale(${ne})`
1083
1094
  },
1084
- children: /* @__PURE__ */ n(
1095
+ children: /* @__PURE__ */ o(
1085
1096
  "div",
1086
1097
  {
1087
1098
  style: {
@@ -1092,7 +1103,7 @@ function Te({
1092
1103
  justifyContent: "center",
1093
1104
  alignItems: "center"
1094
1105
  },
1095
- children: /* @__PURE__ */ n("div", { style: Me, children: $e() })
1106
+ children: /* @__PURE__ */ o("div", { style: ve, children: Se() })
1096
1107
  }
1097
1108
  )
1098
1109
  }
@@ -1101,8 +1112,8 @@ function Te({
1101
1112
  );
1102
1113
  }
1103
1114
  export {
1104
- Te as Game,
1105
- Te as HangmanLobbyGame,
1106
- Te as default
1115
+ We as Game,
1116
+ We as HangmanLobbyGame,
1117
+ We as default
1107
1118
  };
1108
1119
  //# sourceMappingURL=speakid-hangman.es.js.map