speakid-hangman 1.0.3 → 1.0.5

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 X } from "react/jsx-runtime";
2
- import { useState as m, useMemo as D, useCallback as ae, useEffect as le } from "react";
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";
3
3
  const a = {
4
4
  gmCenterScreen: {
5
5
  position: "relative",
@@ -183,7 +183,8 @@ const a = {
183
183
  top: "16px",
184
184
  left: "16px",
185
185
  width: "auto",
186
- zIndex: 10,
186
+ zIndex: 30,
187
+ // ✅ Унифицирован zIndex для консистентности
187
188
  pointerEvents: "none",
188
189
  background: "transparent",
189
190
  transform: "none",
@@ -201,53 +202,60 @@ const a = {
201
202
  display: "block"
202
203
  }
203
204
  };
204
- function ve({
205
+ function Se({
205
206
  mistakes: r,
206
- maxMistakes: Z,
207
- size: G = 200
207
+ maxMistakes: U,
208
+ size: D = 200
208
209
  }) {
209
- const l = G, d = G * 1.25, y = Math.max(2, G / 100), T = 10 * (l / 200), b = 240 * (d / 250), f = 150 * (l / 200), x = 80 * (l / 200), K = 20 * (d / 250), Q = 240 * (d / 250), w = 80 * (l / 200), N = 20 * (d / 250), $ = 150 * (l / 200), B = 150 * (l / 200), M = 20 * (d / 250), z = 50 * (d / 250), v = 150 * (l / 200), C = 70 * (d / 250), _ = 20 * (l / 200), S = 150 * (l / 200), q = 90 * (d / 250), E = 150 * (d / 250), h = 150 * (l / 200), F = 110 * (d / 250), g = 130 * (l / 200), W = 130 * (d / 250), J = 150 * (l / 200), H = 110 * (d / 250), ce = 170 * (l / 200), L = 130 * (d / 250), ee = 150 * (l / 200), V = 150 * (d / 250), p = 130 * (l / 200), te = 190 * (d / 250), I = 150 * (l / 200), ne = 150 * (d / 250), s = 170 * (l / 200), Y = 190 * (d / 250), c = r === 0 || r <= Z * 0.5 ? "#1f2937" : r <= Z * 0.75 ? "#f59e0b" : "#ec4c44";
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";
210
211
  return /* @__PURE__ */ u(
211
212
  "svg",
212
213
  {
213
214
  width: l,
214
- height: d,
215
+ height: g,
216
+ viewBox: "0 0 200 250",
215
217
  style: {
216
218
  display: "block",
217
- margin: "0 auto"
219
+ margin: "0 auto",
220
+ overflow: "visible",
221
+ // ✅ Для корректного отображения линий
222
+ WebkitFontSmoothing: "antialiased",
223
+ // ✅ Для лучшего рендеринга на iOS
224
+ transform: "translateZ(0)"
225
+ // ✅ Включение аппаратного ускорения на iOS
218
226
  },
219
227
  children: [
220
228
  r > 0 && /* @__PURE__ */ n(
221
229
  "line",
222
230
  {
223
231
  x1: T,
224
- y1: b,
225
- x2: f,
226
- y2: b,
232
+ y1: f,
233
+ x2: x,
234
+ y2: f,
227
235
  stroke: c,
228
- strokeWidth: y
236
+ strokeWidth: b
229
237
  }
230
238
  ),
231
239
  r > 1 && /* @__PURE__ */ n(
232
240
  "line",
233
241
  {
234
- x1: x,
242
+ x1: y,
235
243
  y1: K,
236
- x2: x,
237
- y2: Q,
244
+ x2: y,
245
+ y2: G,
238
246
  stroke: c,
239
- strokeWidth: y
247
+ strokeWidth: b
240
248
  }
241
249
  ),
242
250
  r > 2 && /* @__PURE__ */ n(
243
251
  "line",
244
252
  {
245
253
  x1: w,
246
- y1: N,
254
+ y1: Q,
247
255
  x2: $,
248
- y2: N,
256
+ y2: Q,
249
257
  stroke: c,
250
- strokeWidth: y
258
+ strokeWidth: b
251
259
  }
252
260
  ),
253
261
  r > 3 && /* @__PURE__ */ n(
@@ -258,18 +266,18 @@ function ve({
258
266
  x2: B,
259
267
  y2: z,
260
268
  stroke: c,
261
- strokeWidth: y
269
+ strokeWidth: b
262
270
  }
263
271
  ),
264
272
  r > 4 && /* @__PURE__ */ n(
265
273
  "circle",
266
274
  {
267
275
  cx: v,
268
- cy: C,
269
- r: _,
276
+ cy: W,
277
+ r: N,
270
278
  stroke: c,
271
279
  fill: "none",
272
- strokeWidth: y
280
+ strokeWidth: b
273
281
  }
274
282
  ),
275
283
  r > 5 && /* @__PURE__ */ n(
@@ -280,7 +288,7 @@ function ve({
280
288
  x2: S,
281
289
  y2: E,
282
290
  stroke: c,
283
- strokeWidth: y
291
+ strokeWidth: b
284
292
  }
285
293
  ),
286
294
  r > 6 && /* @__PURE__ */ n(
@@ -288,10 +296,10 @@ function ve({
288
296
  {
289
297
  x1: h,
290
298
  y1: F,
291
- x2: g,
292
- y2: W,
299
+ x2: p,
300
+ y2: C,
293
301
  stroke: c,
294
- strokeWidth: y
302
+ strokeWidth: b
295
303
  }
296
304
  ),
297
305
  r > 7 && /* @__PURE__ */ n(
@@ -302,18 +310,18 @@ function ve({
302
310
  x2: ce,
303
311
  y2: L,
304
312
  stroke: c,
305
- strokeWidth: y
313
+ strokeWidth: b
306
314
  }
307
315
  ),
308
316
  r > 8 && /* @__PURE__ */ n(
309
317
  "line",
310
318
  {
311
319
  x1: ee,
312
- y1: V,
313
- x2: p,
320
+ y1: _,
321
+ x2: d,
314
322
  y2: te,
315
323
  stroke: c,
316
- strokeWidth: y
324
+ strokeWidth: b
317
325
  }
318
326
  ),
319
327
  r > 9 && /* @__PURE__ */ n(
@@ -322,22 +330,22 @@ function ve({
322
330
  x1: I,
323
331
  y1: ne,
324
332
  x2: s,
325
- y2: Y,
333
+ y2: V,
326
334
  stroke: c,
327
- strokeWidth: y
335
+ strokeWidth: b
328
336
  }
329
337
  )
330
338
  ]
331
339
  }
332
340
  );
333
341
  }
334
- function Le({
342
+ function Te({
335
343
  gameCubeSize: r = 400,
336
- screenHeight: Z = 800,
337
- screenWidth: G = 800,
344
+ screenHeight: U = 800,
345
+ screenWidth: D = 800,
338
346
  logoUrl: l,
339
- showLogo: d = !0,
340
- baseURL: y
347
+ showLogo: g = !0,
348
+ baseURL: b
341
349
  } = {}) {
342
350
  const T = {
343
351
  Professions: ["teacher", "doctor", "nurse", "driver", "police", "firefighter", "cook", "waiter", "farmer", "builder", "singer", "actor", "dentist", "pilot", "vet", "artist", "cleaner", "student", "baker", "mechanic"],
@@ -357,40 +365,40 @@ function Le({
357
365
  Environment: ["tree", "forest", "air", "water", "pollution", "recycle", "nature", "clean", "waste", "plastic", "energy", "animal", "climate", "earth", "ocean", "river", "planet", "save", "green", "environment", "litter", "organic"],
358
366
  Space: ["planet", "star", "sun", "moon", "astronaut", "rocket", "space", "galaxy", "universe", "telescope", "comet", "asteroid", "orbit", "gravity", "alien", "spaceship", "mars", "satellite", "sky", "eclipse"],
359
367
  Devices: ["computer", "laptop", "phone", "tablet", "tv", "keyboard", "mouse", "printer", "camera", "headphones", "charger", "screen", "watch", "microphone", "speaker", "console", "router", "battery", "cable", "remote"]
360
- }, [b, f] = m("lobby"), [x, K] = m(""), [Q] = m("Normal"), [w, N] = m(0), [$, B] = m(1), [M, z] = m(""), [v, C] = m([]), [_, S] = m(0), [q, E] = m(0), [h, F] = m(null), [g, W] = m(null), [J, H] = m(1), [ce, L] = m([]), ee = Q === "Easy" ? 8 : Q === "Normal" ? 6 : 4, V = y || (typeof window < "u" && window.origin ? `${window.origin}/cloud/speakid/games/hangman` : "/cloud/speakid/games/hangman"), [p, te] = m(!1), [I, ne] = m(!1), s = D(() => {
361
- const e = (g || r || 1e3) / 400;
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;
362
370
  return {
363
- headline1: p ? 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)) : Math.max(28, Math.min(32, 32 * e)),
364
372
  // Desktop: 32px
365
373
  headline2: Math.max(20, Math.min(28, 24 * e)),
366
374
  // Desktop: 24px
367
- headline3: p ? 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)) : Math.max(20, Math.min(26, 24 * e)),
368
376
  // Desktop: 24px
369
377
  bodyL: Math.max(14, Math.min(20, 18 * e)),
370
378
  // Desktop: 18px
371
- bodyM: p ? 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)) : Math.max(14, Math.min(18, 16 * e)),
372
380
  // Desktop: 16px
373
- bodyS: p ? 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)) : Math.max(12, Math.min(16, 14 * e)),
374
382
  // Desktop: 14px
375
383
  wordDisplay: Math.max(18, Math.min(32, 26 * e)),
376
384
  // Адаптивный размер
377
385
  button: Math.max(12, Math.min(18, 16 * e))
378
386
  // Desktop: 16px
379
387
  };
380
- }, [p, g, r]), Y = D(() => {
381
- const e = (g || r || 1e3) / 400;
388
+ }, [d, p, r]), V = X(() => {
389
+ const e = (p || r || 1e3) / 400;
382
390
  return I ? Math.max(8, Math.min(12, 10 * e)) : Math.max(12, Math.min(24, 16 * e));
383
- }, [I, g, r]), o = D(() => {
384
- const e = (g || r || 1e3) / 400;
391
+ }, [I, p, r]), o = X(() => {
392
+ const e = (p || r || 1e3) / 400;
385
393
  return I ? Math.max(3, Math.min(6, 5 * e)) : Math.max(4, Math.min(12, 8 * e));
386
- }, [I, g, r]), c = D(() => {
387
- const e = (g || r || 1e3) / 400;
394
+ }, [I, p, r]), c = X(() => {
395
+ const e = (p || r || 1e3) / 400;
388
396
  return Math.max(6, Math.min(10, 8 * e));
389
- }, [g, 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)), P = (e, t = []) => {
390
- var U;
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;
391
399
  if (!e || !T[e]) {
392
400
  const k = Object.keys(T)[0];
393
- return ((U = T[k]) == null ? void 0 : U[0]) || "";
401
+ return ((P = T[k]) == null ? void 0 : P[0]) || "";
394
402
  }
395
403
  const i = T[e];
396
404
  if (!i || i.length === 0)
@@ -398,87 +406,87 @@ function Le({
398
406
  const R = i.filter((k) => !t.includes(k)), j = R.length > 0 ? R : i;
399
407
  if (j.length === 0)
400
408
  return "";
401
- let O;
409
+ let A;
402
410
  if (typeof crypto < "u" && crypto.getRandomValues) {
403
411
  const k = new Uint32Array(1);
404
412
  crypto.getRandomValues(k);
405
413
  const ue = k[0] / 4294967295;
406
- O = Math.floor(ue * j.length);
414
+ A = Math.floor(ue * j.length);
407
415
  } else
408
- O = Math.floor(Math.random() * j.length);
409
- return j[O];
416
+ A = Math.floor(Math.random() * j.length);
417
+ return j[A];
410
418
  }, xe = () => {
411
- if (!x) return;
419
+ if (!y) return;
412
420
  L([]);
413
- const e = P(x, []);
421
+ const e = Z(y, []);
414
422
  if (!e) {
415
- f("category");
423
+ x("category");
416
424
  return;
417
425
  }
418
- z(e), L([e]), C([]), S(0), B(1), E(0), F(null), f("game");
419
- }, oe = ae((e) => {
420
- if (b !== "game" || h !== null) return;
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;
421
429
  const t = e.toLowerCase();
422
- /^[a-z]$/.test(t) && (C((i) => i.includes(t) ? i : [...i, t]), z((i) => (i && !i.includes(t) && S((R) => R + 1), i)));
423
- }, [b, h]), re = ae((e) => {
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) => {
424
432
  oe(e.key);
425
433
  }, [oe]);
426
- le(() => {
427
- if (b === "game")
434
+ de(() => {
435
+ if (f === "game")
428
436
  return window.addEventListener("keydown", re), () => window.removeEventListener("keydown", re);
429
- }, [b, re]);
430
- const ye = M ? me(M, v) : "", de = M ? he(M, v) : !1, ge = _ >= 10, be = fe(v), ie = ae(() => {
431
- if (!x || $ >= w) {
432
- f("result");
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) {
440
+ x("result");
433
441
  return;
434
442
  }
435
443
  B((e) => e + 1), L((e) => {
436
- const t = P(x, e);
444
+ const t = Z(y, e);
437
445
  return t ? (z(t), [...e, t]) : e;
438
- }), C([]), S(0), F(null);
439
- }, [x, $, w]);
440
- le(() => {
441
- if (de && h === null) {
446
+ }), W([]), S(0), F(null);
447
+ }, [y, $, w]);
448
+ de(() => {
449
+ if (ge && h === null) {
442
450
  F("win"), E((t) => t + 1);
443
451
  const e = setTimeout(() => {
444
452
  ie();
445
453
  }, 2e3);
446
454
  return () => clearTimeout(e);
447
455
  }
448
- if (ge && h === null) {
456
+ if (pe && h === null) {
449
457
  F("lose");
450
458
  const e = setTimeout(() => {
451
459
  ie();
452
460
  }, 2e3);
453
461
  return () => clearTimeout(e);
454
462
  }
455
- }, [de, ge, h, ie]);
463
+ }, [ge, pe, h, ie]);
456
464
  const ke = () => {
457
- if (!x || $ >= w) {
458
- f("result");
465
+ if (!y || $ >= w) {
466
+ x("result");
459
467
  return;
460
468
  }
461
469
  B((e) => e + 1), L((e) => {
462
- const t = P(x, e);
470
+ const t = Z(y, e);
463
471
  return t ? (z(t), [...e, t]) : e;
464
- }), C([]), S(0), F(null);
472
+ }), W([]), S(0), F(null);
465
473
  };
466
- le(() => {
474
+ de(() => {
467
475
  const e = () => {
468
- const t = window.innerWidth, i = window.innerHeight, R = t < 768 || t === 926 && i === 428 || t === 932 && i === 430, j = i < 700, O = t / i > 1.8, U = t === 1024 && i === 600;
469
- if (te(R), ne(U), r && r >= 320) {
470
- const $e = Math.max(320, Math.min(1200, r));
471
- W($e), H(1);
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);
472
480
  } else if (R)
473
- W(null), H(1);
481
+ C(null), H(1);
474
482
  else if (j)
475
- W(null), H(1);
476
- else if (O) {
483
+ C(null), H(1);
484
+ else if (A) {
477
485
  const k = Math.min(1e3, Math.min(t, i) * 0.9);
478
- W(k), H(0.85);
486
+ C(k), H(0.85);
479
487
  } else {
480
488
  const k = Math.min(1e3, Math.min(t, i) * 0.9);
481
- W(k), H(1);
489
+ C(k), H(1);
482
490
  }
483
491
  };
484
492
  return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
@@ -527,22 +535,24 @@ function Le({
527
535
  <path d="M 35% 85% Q 37% 83%, 39% 85% T 43% 85% T 47% 85%"
528
536
  fill="none" stroke="#FF4500" stroke-width="3.5" stroke-linecap="round"/>
529
537
  </svg>
530
- `, we = {
538
+ `, we = !d && typeof window < "u" && window.innerWidth >= 768 && window.innerWidth < 1024, ae = !d && g && (f !== "game" || we), Me = {
531
539
  ...a.gmCenterScreen,
532
540
  width: "100%",
533
541
  height: "100%",
534
- padding: `${Y}px`,
542
+ padding: `${V}px`,
543
+ paddingTop: ae ? "60px" : `${V}px`,
544
+ // ✅ Резервируем место под логотип (16px top + 28px высота + 16px отступ)
535
545
  overflow: "auto",
536
546
  position: "relative",
537
547
  boxSizing: "border-box",
538
548
  background: "transparent"
539
- }, pe = !p && d, A = D(
549
+ }, Y = X(
540
550
  () => {
541
551
  const e = window.innerWidth, t = window.innerHeight;
542
- if (p && e > t || t < 700 || !pe)
552
+ if (d && e > t || t < 700 || !ae)
543
553
  return null;
544
554
  const i = l || (typeof window < "u" && window.origin ? `${window.origin}/cloud/speakid/games/hangman/logo` : "/cloud/speakid/games/hangman/logo");
545
- return /* @__PURE__ */ n("div", { style: { ...a.gmLogoFixed, position: "absolute", top: 16, left: 16, zIndex: 30 }, children: /* @__PURE__ */ u("picture", { children: [
555
+ return /* @__PURE__ */ n("div", { style: a.gmLogoFixed, children: /* @__PURE__ */ u("picture", { children: [
546
556
  /* @__PURE__ */ n(
547
557
  "source",
548
558
  {
@@ -561,9 +571,9 @@ function Le({
561
571
  )
562
572
  ] }) });
563
573
  },
564
- [p, pe, l]
565
- ), Me = () => b === "lobby" ? /* @__PURE__ */ u(X, { children: [
566
- A,
574
+ [d, ae, l, f]
575
+ ), $e = () => f === "lobby" ? /* @__PURE__ */ u(O, { children: [
576
+ Y,
567
577
  /* @__PURE__ */ n("div", { dangerouslySetInnerHTML: { __html: se } }),
568
578
  /* @__PURE__ */ n("h1", { style: {
569
579
  ...a.gmHeadline1,
@@ -575,7 +585,7 @@ function Le({
575
585
  /* @__PURE__ */ u(
576
586
  "button",
577
587
  {
578
- onClick: () => f("category"),
588
+ onClick: () => x("category"),
579
589
  style: {
580
590
  fontFamily: '"Onest", system-ui, sans-serif',
581
591
  fontWeight: 500,
@@ -642,14 +652,14 @@ function Le({
642
652
  /* @__PURE__ */ n(
643
653
  "img",
644
654
  {
645
- src: `${V}/sun.png`,
655
+ src: `${_}/sun.png`,
646
656
  alt: "Sun",
647
657
  style: {
648
658
  position: "absolute",
649
- left: p ? "-10%" : "5%",
659
+ left: d ? "-10%" : "5%",
650
660
  top: "20%",
651
661
  width: "auto",
652
- height: p ? `${Math.min(window.innerHeight * 0.33, 200)}px` : `${Math.min((g || r || 1e3) * 0.33, 300)}px`,
662
+ height: d ? `${Math.min(window.innerHeight * 0.33, 200)}px` : `${Math.min((p || r || 1e3) * 0.33, 300)}px`,
653
663
  maxHeight: "33vh",
654
664
  objectFit: "contain",
655
665
  opacity: 0.6
@@ -659,14 +669,14 @@ function Le({
659
669
  /* @__PURE__ */ n(
660
670
  "img",
661
671
  {
662
- src: `${V}/character.png`,
672
+ src: `${_}/character.png`,
663
673
  alt: "Hangman character",
664
674
  style: {
665
675
  position: "absolute",
666
- right: p ? "5%" : "10%",
676
+ right: d ? "5%" : "10%",
667
677
  bottom: "10%",
668
678
  width: "auto",
669
- height: p ? `${Math.min(window.innerHeight * 0.33, 200)}px` : `${Math.min((g || r || 1e3) * 0.33, 300)}px`,
679
+ height: d ? `${Math.min(window.innerHeight * 0.33, 200)}px` : `${Math.min((p || r || 1e3) * 0.33, 300)}px`,
670
680
  maxHeight: "33vh",
671
681
  objectFit: "contain",
672
682
  opacity: 0.6
@@ -674,13 +684,13 @@ function Le({
674
684
  }
675
685
  )
676
686
  ] })
677
- ] }) : b === "category" ? /* @__PURE__ */ u(X, { children: [
678
- A,
687
+ ] }) : f === "category" ? /* @__PURE__ */ u(O, { children: [
688
+ Y,
679
689
  /* @__PURE__ */ n("div", { dangerouslySetInnerHTML: { __html: se } }),
680
690
  /* @__PURE__ */ n(
681
691
  "button",
682
692
  {
683
- onClick: () => f("lobby"),
693
+ onClick: () => x("lobby"),
684
694
  onMouseEnter: (e) => {
685
695
  e.currentTarget.style.backgroundColor = "#e5e7eb";
686
696
  },
@@ -694,9 +704,10 @@ function Le({
694
704
  padding: `${o}px ${o * 1.5}px`,
695
705
  borderRadius: `${c}px`,
696
706
  position: "absolute",
697
- top: `${Y}px`,
698
- left: "160px",
699
- // ✅ Фиксированное смещение правее логотипа (16px + ~120px логотип + 24px отступ)
707
+ top: "52px",
708
+ // ✅ Под логотипом (16px top логотипа + 28px высота логотипа + 8px отступ)
709
+ left: "16px",
710
+ // ✅ Та же позиция что и логотип
700
711
  zIndex: 10
701
712
  },
702
713
  children: "←"
@@ -706,7 +717,7 @@ function Le({
706
717
  "button",
707
718
  {
708
719
  onClick: () => {
709
- K(e), f("rounds");
720
+ K(e), x("rounds");
710
721
  },
711
722
  onMouseEnter: (t) => {
712
723
  t.currentTarget.style.backgroundColor = "#f0f0f0", t.currentTarget.style.borderColor = "#1f2937", t.currentTarget.style.transform = "scale(1.05)";
@@ -733,13 +744,13 @@ function Le({
733
744
  },
734
745
  e
735
746
  )) })
736
- ] }) : b === "rounds" ? /* @__PURE__ */ u(X, { children: [
737
- A,
747
+ ] }) : f === "rounds" ? /* @__PURE__ */ u(O, { children: [
748
+ Y,
738
749
  /* @__PURE__ */ n("div", { dangerouslySetInnerHTML: { __html: se } }),
739
750
  /* @__PURE__ */ n(
740
751
  "button",
741
752
  {
742
- onClick: () => f("category"),
753
+ onClick: () => x("category"),
743
754
  onMouseEnter: (e) => {
744
755
  e.currentTarget.style.backgroundColor = "#e5e7eb";
745
756
  },
@@ -753,9 +764,10 @@ function Le({
753
764
  padding: `${o}px ${o * 1.5}px`,
754
765
  borderRadius: `${c}px`,
755
766
  position: "absolute",
756
- top: `${Y}px`,
757
- left: "160px",
758
- // ✅ Фиксированное смещение правее логотипа (16px + ~120px логотип + 24px отступ)
767
+ top: "52px",
768
+ // ✅ Под логотипом (16px top логотипа + 28px высота логотипа + 8px отступ)
769
+ left: "16px",
770
+ // ✅ Та же позиция что и логотип
759
771
  zIndex: 10
760
772
  },
761
773
  children: "←"
@@ -766,7 +778,7 @@ function Le({
766
778
  "button",
767
779
  {
768
780
  onClick: () => {
769
- N(e), xe();
781
+ Q(e), xe();
770
782
  },
771
783
  onMouseEnter: (t) => {
772
784
  t.currentTarget.style.backgroundColor = "#f0f0f0", t.currentTarget.style.borderColor = "#1f2937", t.currentTarget.style.transform = "scale(1.05)";
@@ -793,17 +805,17 @@ function Le({
793
805
  },
794
806
  e
795
807
  )) })
796
- ] }) : b === "game" ? /* @__PURE__ */ u(X, { children: [
797
- A,
808
+ ] }) : f === "game" ? /* @__PURE__ */ u(O, { children: [
809
+ Y,
798
810
  /* @__PURE__ */ u("div", { style: {
799
811
  ...a.gmInfoBox,
800
812
  padding: `${o * 0.8}px`,
801
813
  marginBottom: `${o * 0.5}px`,
802
- maxWidth: `${(g || r) * 0.9}px`
814
+ maxWidth: `${(p || r) * 0.9}px`
803
815
  }, children: [
804
816
  /* @__PURE__ */ u("h3", { style: { ...a.gmHeadline3, fontSize: `${s.headline3}px`, marginBottom: `${o * 0.5}px` }, children: [
805
817
  "Category: ",
806
- x
818
+ y
807
819
  ] }),
808
820
  /* @__PURE__ */ u("p", { style: { ...a.gmBodyM, fontSize: `${s.bodyM}px`, marginBottom: "0px" }, children: [
809
821
  "Round ",
@@ -828,11 +840,11 @@ function Le({
828
840
  justifyContent: "center",
829
841
  alignItems: "center"
830
842
  }, children: /* @__PURE__ */ n(
831
- ve,
843
+ Se,
832
844
  {
833
- mistakes: _,
845
+ mistakes: N,
834
846
  maxMistakes: ee,
835
- size: I ? Math.max(80, Math.min(110, (g || r) * 0.16)) : Math.max(100, Math.min(150, (g || r) * 0.2))
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))
836
848
  }
837
849
  ) }),
838
850
  /* @__PURE__ */ n("div", { style: {
@@ -847,7 +859,7 @@ function Le({
847
859
  padding: `${o}px`,
848
860
  marginTop: `${o}px`,
849
861
  marginBottom: `${o}px`,
850
- maxWidth: `${(g || r) * 0.95}px`
862
+ maxWidth: `${(p || r) * 0.95}px`
851
863
  }, children: [
852
864
  /* @__PURE__ */ n("p", { style: {
853
865
  ...a.gmBodyS,
@@ -880,7 +892,7 @@ function Le({
880
892
  background: "#f9f9f9",
881
893
  color: "#1f2937",
882
894
  border: "1px solid #e5e7eb",
883
- minWidth: `${Math.max(o * 1.5, (g || r) * 0.04)}px`,
895
+ minWidth: `${Math.max(o * 1.5, (p || r) * 0.04)}px`,
884
896
  textAlign: "center",
885
897
  display: "inline-block",
886
898
  cursor: h === null ? "pointer" : "default",
@@ -937,7 +949,7 @@ function Le({
937
949
  h !== null && $ >= w && /* @__PURE__ */ n("div", { style: { marginTop: "2px", marginBottom: `${o}px` }, children: /* @__PURE__ */ n(
938
950
  "button",
939
951
  {
940
- onClick: () => f("result"),
952
+ onClick: () => x("result"),
941
953
  onMouseEnter: (e) => {
942
954
  e.currentTarget.style.backgroundColor = "#d43a32";
943
955
  },
@@ -950,7 +962,7 @@ function Le({
950
962
  padding: `${o}px ${o * 1.5}px`,
951
963
  borderRadius: `${c}px`
952
964
  },
953
- children: "View Results →"
965
+ children: "View results"
954
966
  }
955
967
  ) }),
956
968
  h === null && v.length === 0 && /* @__PURE__ */ n("p", { style: {
@@ -959,8 +971,8 @@ function Le({
959
971
  marginTop: `${o}px`,
960
972
  marginBottom: `${o}px`
961
973
  }, children: "Type a letter on your keyboard" })
962
- ] }) : b === "result" ? /* @__PURE__ */ u(X, { children: [
963
- A,
974
+ ] }) : f === "result" ? /* @__PURE__ */ u(O, { children: [
975
+ Y,
964
976
  /* @__PURE__ */ n("h1", { style: {
965
977
  ...a.gmHeadline1,
966
978
  fontSize: `${s.headline1}px`,
@@ -987,13 +999,13 @@ function Le({
987
999
  "button",
988
1000
  {
989
1001
  onClick: () => {
990
- if (!x || w === 0) {
991
- f("lobby");
1002
+ if (!y || w === 0) {
1003
+ x("lobby");
992
1004
  return;
993
1005
  }
994
1006
  L([]);
995
- const e = P(x, []);
996
- e && (z(e), L([e]), C([]), S(0), B(1), E(0), F(null), f("game"));
1007
+ const e = Z(y, []);
1008
+ e && (z(e), L([e]), W([]), S(0), B(1), E(0), F(null), x("game"));
997
1009
  },
998
1010
  onMouseEnter: (e) => {
999
1011
  e.currentTarget.style.backgroundColor = "#d43a32";
@@ -1014,7 +1026,7 @@ function Le({
1014
1026
  /* @__PURE__ */ n(
1015
1027
  "button",
1016
1028
  {
1017
- onClick: () => f("lobby"),
1029
+ onClick: () => x("lobby"),
1018
1030
  onMouseEnter: (e) => {
1019
1031
  e.currentTarget.style.backgroundColor = "#e5e7eb";
1020
1032
  },
@@ -1055,16 +1067,16 @@ function Le({
1055
1067
  "div",
1056
1068
  {
1057
1069
  style: {
1058
- width: p ? "100%" : g || r || 1e3,
1059
- height: p ? "100%" : g || r || 1e3,
1070
+ width: d ? "100%" : p || r || 1e3,
1071
+ height: d ? "100%" : p || r || 1e3,
1060
1072
  display: "flex",
1061
1073
  justifyContent: "center",
1062
1074
  alignItems: "center",
1063
1075
  overflow: "hidden",
1064
- borderRadius: p ? 0 : "20px",
1076
+ borderRadius: d ? 0 : "20px",
1065
1077
  background: "#ffffff",
1066
- boxShadow: p ? "none" : "0 0 40px rgba(0,0,0,0.1)",
1067
- margin: p ? "0 auto" : "unset",
1078
+ boxShadow: d ? "none" : "0 0 40px rgba(0,0,0,0.1)",
1079
+ margin: d ? "0 auto" : "unset",
1068
1080
  position: "relative",
1069
1081
  // needed so absolute logo is inside the square
1070
1082
  transform: `scale(${J})`
@@ -1080,7 +1092,7 @@ function Le({
1080
1092
  justifyContent: "center",
1081
1093
  alignItems: "center"
1082
1094
  },
1083
- children: /* @__PURE__ */ n("div", { style: we, children: Me() })
1095
+ children: /* @__PURE__ */ n("div", { style: Me, children: $e() })
1084
1096
  }
1085
1097
  )
1086
1098
  }
@@ -1089,8 +1101,8 @@ function Le({
1089
1101
  );
1090
1102
  }
1091
1103
  export {
1092
- Le as Game,
1093
- Le as HangmanLobbyGame,
1094
- Le as default
1104
+ Te as Game,
1105
+ Te as HangmanLobbyGame,
1106
+ Te as default
1095
1107
  };
1096
1108
  //# sourceMappingURL=speakid-hangman.es.js.map