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
|
|
2
|
-
import { useState as m, useMemo as
|
|
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
|
|
205
|
+
function Fe({
|
|
206
206
|
mistakes: r,
|
|
207
|
-
maxMistakes:
|
|
208
|
-
size:
|
|
207
|
+
maxMistakes: J,
|
|
208
|
+
size: _ = 200
|
|
209
209
|
}) {
|
|
210
|
-
const l =
|
|
211
|
-
return /* @__PURE__ */
|
|
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:
|
|
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__ */
|
|
228
|
+
r > 0 && /* @__PURE__ */ o(
|
|
229
229
|
"line",
|
|
230
230
|
{
|
|
231
|
-
x1:
|
|
231
|
+
x1: W,
|
|
232
232
|
y1: f,
|
|
233
233
|
x2: x,
|
|
234
234
|
y2: f,
|
|
235
|
-
stroke:
|
|
236
|
-
strokeWidth:
|
|
235
|
+
stroke: b,
|
|
236
|
+
strokeWidth: w
|
|
237
237
|
}
|
|
238
238
|
),
|
|
239
|
-
r > 1 && /* @__PURE__ */
|
|
239
|
+
r > 1 && /* @__PURE__ */ o(
|
|
240
240
|
"line",
|
|
241
241
|
{
|
|
242
242
|
x1: y,
|
|
243
|
-
y1:
|
|
243
|
+
y1: ee,
|
|
244
244
|
x2: y,
|
|
245
|
-
y2:
|
|
246
|
-
stroke:
|
|
247
|
-
strokeWidth:
|
|
245
|
+
y2: N,
|
|
246
|
+
stroke: b,
|
|
247
|
+
strokeWidth: w
|
|
248
248
|
}
|
|
249
249
|
),
|
|
250
|
-
r > 2 && /* @__PURE__ */
|
|
250
|
+
r > 2 && /* @__PURE__ */ o(
|
|
251
251
|
"line",
|
|
252
252
|
{
|
|
253
|
-
x1:
|
|
254
|
-
y1:
|
|
255
|
-
x2:
|
|
256
|
-
y2:
|
|
257
|
-
stroke:
|
|
258
|
-
strokeWidth:
|
|
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__ */
|
|
261
|
+
r > 3 && /* @__PURE__ */ o(
|
|
262
262
|
"line",
|
|
263
263
|
{
|
|
264
|
-
x1:
|
|
265
|
-
y1:
|
|
266
|
-
x2:
|
|
267
|
-
y2:
|
|
268
|
-
stroke:
|
|
269
|
-
strokeWidth:
|
|
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__ */
|
|
272
|
+
r > 4 && /* @__PURE__ */ o(
|
|
273
273
|
"circle",
|
|
274
274
|
{
|
|
275
|
-
cx:
|
|
276
|
-
cy:
|
|
277
|
-
r:
|
|
278
|
-
stroke:
|
|
275
|
+
cx: S,
|
|
276
|
+
cy: I,
|
|
277
|
+
r: V,
|
|
278
|
+
stroke: b,
|
|
279
279
|
fill: "none",
|
|
280
|
-
strokeWidth:
|
|
280
|
+
strokeWidth: w
|
|
281
281
|
}
|
|
282
282
|
),
|
|
283
|
-
r > 5 && /* @__PURE__ */
|
|
283
|
+
r > 5 && /* @__PURE__ */ o(
|
|
284
284
|
"line",
|
|
285
285
|
{
|
|
286
|
-
x1:
|
|
287
|
-
y1:
|
|
288
|
-
x2:
|
|
289
|
-
y2:
|
|
290
|
-
stroke:
|
|
291
|
-
strokeWidth:
|
|
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__ */
|
|
294
|
+
r > 6 && /* @__PURE__ */ o(
|
|
295
295
|
"line",
|
|
296
296
|
{
|
|
297
|
-
x1:
|
|
297
|
+
x1: u,
|
|
298
298
|
y1: F,
|
|
299
|
-
x2:
|
|
300
|
-
y2:
|
|
301
|
-
stroke:
|
|
302
|
-
strokeWidth:
|
|
299
|
+
x2: g,
|
|
300
|
+
y2: R,
|
|
301
|
+
stroke: b,
|
|
302
|
+
strokeWidth: w
|
|
303
303
|
}
|
|
304
304
|
),
|
|
305
|
-
r > 7 && /* @__PURE__ */
|
|
305
|
+
r > 7 && /* @__PURE__ */ o(
|
|
306
306
|
"line",
|
|
307
307
|
{
|
|
308
|
-
x1:
|
|
309
|
-
y1:
|
|
310
|
-
x2:
|
|
311
|
-
y2:
|
|
312
|
-
stroke:
|
|
313
|
-
strokeWidth:
|
|
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__ */
|
|
316
|
+
r > 8 && /* @__PURE__ */ o(
|
|
317
317
|
"line",
|
|
318
318
|
{
|
|
319
|
-
x1:
|
|
320
|
-
y1:
|
|
319
|
+
x1: oe,
|
|
320
|
+
y1: Z,
|
|
321
321
|
x2: d,
|
|
322
|
-
y2:
|
|
323
|
-
stroke:
|
|
324
|
-
strokeWidth:
|
|
322
|
+
y2: re,
|
|
323
|
+
stroke: b,
|
|
324
|
+
strokeWidth: w
|
|
325
325
|
}
|
|
326
326
|
),
|
|
327
|
-
r > 9 && /* @__PURE__ */
|
|
327
|
+
r > 9 && /* @__PURE__ */ o(
|
|
328
328
|
"line",
|
|
329
329
|
{
|
|
330
|
-
x1:
|
|
331
|
-
y1:
|
|
332
|
-
x2:
|
|
333
|
-
y2:
|
|
334
|
-
stroke:
|
|
335
|
-
strokeWidth:
|
|
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
|
|
342
|
+
function We({
|
|
343
343
|
gameCubeSize: r = 400,
|
|
344
|
-
screenHeight:
|
|
345
|
-
screenWidth:
|
|
344
|
+
screenHeight: J = 800,
|
|
345
|
+
screenWidth: _ = 800,
|
|
346
346
|
logoUrl: l,
|
|
347
|
-
showLogo:
|
|
348
|
-
baseURL:
|
|
347
|
+
showLogo: c = !0,
|
|
348
|
+
baseURL: w
|
|
349
349
|
} = {}) {
|
|
350
|
-
const
|
|
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,
|
|
369
|
-
const e = (
|
|
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,
|
|
389
|
-
const e = (
|
|
390
|
-
return
|
|
391
|
-
}, [
|
|
392
|
-
const e = (
|
|
393
|
-
return
|
|
394
|
-
}, [
|
|
395
|
-
const e = (
|
|
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
|
-
}, [
|
|
398
|
-
var
|
|
399
|
-
if (!e || !
|
|
400
|
-
const
|
|
401
|
-
return ((
|
|
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 =
|
|
403
|
+
const i = W[e];
|
|
404
404
|
if (!i || i.length === 0)
|
|
405
405
|
return "";
|
|
406
|
-
const
|
|
407
|
-
if (
|
|
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
|
|
409
|
+
let D;
|
|
410
410
|
if (typeof crypto < "u" && crypto.getRandomValues) {
|
|
411
|
-
const
|
|
412
|
-
crypto.getRandomValues(
|
|
413
|
-
const
|
|
414
|
-
|
|
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
|
-
|
|
417
|
-
return
|
|
418
|
-
},
|
|
416
|
+
D = Math.floor(Math.random() * Y.length);
|
|
417
|
+
return Y[D];
|
|
418
|
+
}, be = () => {
|
|
419
419
|
if (!y) return;
|
|
420
|
-
|
|
421
|
-
const e =
|
|
420
|
+
T([]);
|
|
421
|
+
const e = U(y, []);
|
|
422
422
|
if (!e) {
|
|
423
423
|
x("category");
|
|
424
424
|
return;
|
|
425
425
|
}
|
|
426
|
-
|
|
427
|
-
},
|
|
428
|
-
if (f !== "game" ||
|
|
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) && (
|
|
431
|
-
}, [f,
|
|
432
|
-
|
|
433
|
-
}, [
|
|
434
|
-
|
|
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",
|
|
437
|
-
}, [f,
|
|
438
|
-
const
|
|
439
|
-
if (!y ||
|
|
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
|
-
|
|
444
|
-
const t =
|
|
445
|
-
return t ? (
|
|
446
|
-
}),
|
|
447
|
-
}, [y,
|
|
448
|
-
|
|
449
|
-
if (
|
|
450
|
-
F("win"),
|
|
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
|
-
|
|
452
|
+
de();
|
|
453
453
|
}, 2e3);
|
|
454
454
|
return () => clearTimeout(e);
|
|
455
455
|
}
|
|
456
|
-
if (
|
|
456
|
+
if (me && u === null) {
|
|
457
457
|
F("lose");
|
|
458
458
|
const e = setTimeout(() => {
|
|
459
|
-
|
|
459
|
+
de();
|
|
460
460
|
}, 2e3);
|
|
461
461
|
return () => clearTimeout(e);
|
|
462
462
|
}
|
|
463
|
-
}, [
|
|
464
|
-
const
|
|
465
|
-
if (!y ||
|
|
463
|
+
}, [ue, me, u, de]);
|
|
464
|
+
const Me = () => {
|
|
465
|
+
if (!y || v >= k) {
|
|
466
466
|
x("result");
|
|
467
467
|
return;
|
|
468
468
|
}
|
|
469
|
-
|
|
470
|
-
const t =
|
|
471
|
-
return t ? (
|
|
472
|
-
}),
|
|
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
|
-
|
|
474
|
+
pe(() => {
|
|
475
475
|
const e = () => {
|
|
476
|
-
const t = window.innerWidth, i = window.innerHeight,
|
|
477
|
-
if (
|
|
478
|
-
const
|
|
479
|
-
|
|
480
|
-
} else if (
|
|
481
|
-
|
|
482
|
-
else if (
|
|
483
|
-
|
|
484
|
-
else if (
|
|
485
|
-
const
|
|
486
|
-
|
|
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
|
|
489
|
-
|
|
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
|
|
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
|
-
`,
|
|
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: `${
|
|
543
|
-
paddingTop:
|
|
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
|
-
},
|
|
549
|
+
}, X = Q(
|
|
550
550
|
() => {
|
|
551
551
|
const e = window.innerWidth, t = window.innerHeight;
|
|
552
|
-
if (d && e > t || t < 700 || !
|
|
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__ */
|
|
556
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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,
|
|
575
|
-
),
|
|
576
|
-
|
|
577
|
-
/* @__PURE__ */
|
|
578
|
-
/* @__PURE__ */
|
|
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: `${
|
|
581
|
+
marginBottom: `${n * 3}px`,
|
|
582
582
|
position: "relative",
|
|
583
583
|
zIndex: 1
|
|
584
584
|
}, children: "HANGMAN" }),
|
|
585
|
-
/* @__PURE__ */
|
|
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: `${
|
|
595
|
-
borderRadius: `${
|
|
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__ */
|
|
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: `${
|
|
628
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
638
|
+
/* @__PURE__ */ o("span", { style: { fontWeight: 500 }, children: "PLAY" })
|
|
639
639
|
]
|
|
640
640
|
}
|
|
641
641
|
),
|
|
642
|
-
/* @__PURE__ */
|
|
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__ */
|
|
652
|
+
/* @__PURE__ */ o(
|
|
653
653
|
"img",
|
|
654
654
|
{
|
|
655
|
-
src: `${
|
|
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((
|
|
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__ */
|
|
669
|
+
/* @__PURE__ */ o(
|
|
670
670
|
"img",
|
|
671
671
|
{
|
|
672
|
-
src: `${
|
|
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((
|
|
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__ */
|
|
688
|
-
|
|
689
|
-
/* @__PURE__ */
|
|
690
|
-
/* @__PURE__ */
|
|
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: `${
|
|
705
|
-
borderRadius: `${
|
|
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__ */
|
|
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
|
-
|
|
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: `${
|
|
733
|
-
borderRadius: `${
|
|
732
|
+
padding: `${n * 1.2}px ${n * 2}px`,
|
|
733
|
+
borderRadius: `${M * 2}px`,
|
|
734
734
|
// Более округлые для облачков
|
|
735
|
-
margin: `${
|
|
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__ */
|
|
748
|
-
|
|
749
|
-
/* @__PURE__ */
|
|
750
|
-
/* @__PURE__ */
|
|
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: `${
|
|
765
|
-
borderRadius: `${
|
|
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__ */
|
|
777
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
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: `${
|
|
794
|
-
borderRadius: `${
|
|
793
|
+
padding: `${n * 1.2}px ${n * 2}px`,
|
|
794
|
+
borderRadius: `${M * 2}px`,
|
|
795
795
|
// Более округлые для облачков
|
|
796
|
-
margin: `${
|
|
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__ */
|
|
809
|
-
|
|
810
|
-
/* @__PURE__ */
|
|
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: `${
|
|
813
|
-
|
|
814
|
-
|
|
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__ */
|
|
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__ */
|
|
824
|
+
/* @__PURE__ */ h("p", { style: { ...a.gmBodyM, fontSize: `${s.bodyM}px`, marginBottom: "0px" }, children: [
|
|
821
825
|
"Round ",
|
|
822
|
-
|
|
826
|
+
v,
|
|
823
827
|
" of ",
|
|
824
|
-
|
|
828
|
+
k
|
|
825
829
|
] })
|
|
826
830
|
] }),
|
|
827
|
-
|
|
831
|
+
$ && /* @__PURE__ */ h("p", { style: {
|
|
828
832
|
...a.gmBodyS,
|
|
829
833
|
fontSize: `${s.bodyS}px`,
|
|
830
|
-
marginTop: `${
|
|
831
|
-
|
|
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__ */
|
|
840
|
+
/* @__PURE__ */ o("strong", { children: $.length }),
|
|
835
841
|
" letters long"
|
|
836
842
|
] }),
|
|
837
|
-
/* @__PURE__ */
|
|
838
|
-
margin: `${
|
|
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__ */
|
|
843
|
-
|
|
849
|
+
}, children: /* @__PURE__ */ o(
|
|
850
|
+
Fe,
|
|
844
851
|
{
|
|
845
|
-
mistakes:
|
|
846
|
-
maxMistakes:
|
|
847
|
-
size:
|
|
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__ */
|
|
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: `${
|
|
854
|
-
|
|
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:
|
|
857
|
-
/* @__PURE__ */
|
|
864
|
+
}, children: we || "Loading..." }),
|
|
865
|
+
/* @__PURE__ */ h("div", { style: {
|
|
858
866
|
...a.gmInfoBox,
|
|
859
|
-
padding: `${
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
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__ */
|
|
875
|
+
/* @__PURE__ */ o("p", { style: {
|
|
865
876
|
...a.gmBodyS,
|
|
866
877
|
fontSize: `${s.bodyS}px`,
|
|
867
|
-
marginBottom: `${
|
|
878
|
+
marginBottom: `${n}px`,
|
|
868
879
|
fontWeight: 500
|
|
869
880
|
// Medium
|
|
870
881
|
}, children: "Available letters:" }),
|
|
871
|
-
/* @__PURE__ */
|
|
882
|
+
/* @__PURE__ */ o("div", { style: {
|
|
872
883
|
display: "flex",
|
|
873
884
|
flexWrap: "wrap",
|
|
874
|
-
gap: `${
|
|
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:
|
|
889
|
+
}, children: ke.map((e) => /* @__PURE__ */ o(
|
|
879
890
|
"button",
|
|
880
891
|
{
|
|
881
|
-
onClick: () =>
|
|
882
|
-
disabled:
|
|
892
|
+
onClick: () => se(e),
|
|
893
|
+
disabled: u !== null,
|
|
883
894
|
onMouseEnter: (t) => {
|
|
884
|
-
|
|
895
|
+
u === null && (t.currentTarget.style.backgroundColor = "#e5e7eb", t.currentTarget.style.cursor = "pointer");
|
|
885
896
|
},
|
|
886
897
|
onMouseLeave: (t) => {
|
|
887
|
-
|
|
898
|
+
u === null && (t.currentTarget.style.backgroundColor = "#f9f9f9", t.currentTarget.style.cursor = "pointer");
|
|
888
899
|
},
|
|
889
900
|
style: {
|
|
890
|
-
padding: `${
|
|
891
|
-
borderRadius: `${
|
|
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(
|
|
906
|
+
minWidth: `${Math.max(n * 1.5, (g || r) * 0.04)}px`,
|
|
896
907
|
textAlign: "center",
|
|
897
908
|
display: "inline-block",
|
|
898
|
-
cursor:
|
|
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
|
-
|
|
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: `${
|
|
922
|
+
marginTop: `${n * 0.5}px`,
|
|
912
923
|
marginBottom: "2px"
|
|
913
|
-
}, children: /* @__PURE__ */
|
|
924
|
+
}, children: /* @__PURE__ */ h("span", { style: { color: "#6b7280" }, children: [
|
|
914
925
|
"Guessed letters: ",
|
|
915
|
-
/* @__PURE__ */
|
|
926
|
+
/* @__PURE__ */ o("strong", { children: S.join(", ") })
|
|
916
927
|
] }) }),
|
|
917
|
-
|
|
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
|
-
|
|
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__ */
|
|
939
|
+
/* @__PURE__ */ o("strong", { children: $ })
|
|
929
940
|
] }),
|
|
930
|
-
|
|
941
|
+
u !== null && v < k && /* @__PURE__ */ o("div", { style: { marginTop: "2px", marginBottom: `${n}px` }, children: /* @__PURE__ */ o(
|
|
931
942
|
"button",
|
|
932
943
|
{
|
|
933
|
-
onClick:
|
|
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: `${
|
|
944
|
-
borderRadius: `${
|
|
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
|
-
|
|
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: `${
|
|
963
|
-
borderRadius: `${
|
|
973
|
+
padding: `${n}px ${n * 1.5}px`,
|
|
974
|
+
borderRadius: `${M}px`
|
|
964
975
|
},
|
|
965
976
|
children: "View results"
|
|
966
977
|
}
|
|
967
978
|
) }),
|
|
968
|
-
|
|
979
|
+
u === null && S.length === 0 && /* @__PURE__ */ o("p", { style: {
|
|
969
980
|
...a.gmBodyS,
|
|
970
981
|
fontSize: `${s.bodyS}px`,
|
|
971
|
-
marginTop: `${
|
|
972
|
-
marginBottom: `${
|
|
982
|
+
marginTop: `${n}px`,
|
|
983
|
+
marginBottom: `${n}px`
|
|
973
984
|
}, children: "Type a letter on your keyboard" })
|
|
974
|
-
] }) : f === "result" ? /* @__PURE__ */
|
|
975
|
-
|
|
976
|
-
/* @__PURE__ */
|
|
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: `${
|
|
990
|
+
marginBottom: `${n * 2}px`
|
|
980
991
|
}, children: "🎊 Game Finished!" }),
|
|
981
|
-
/* @__PURE__ */
|
|
992
|
+
/* @__PURE__ */ h("p", { style: {
|
|
982
993
|
...a.gmBodyL,
|
|
983
994
|
fontSize: `${s.bodyL}px`,
|
|
984
|
-
marginBottom: `${
|
|
995
|
+
marginBottom: `${n * 2}px`
|
|
985
996
|
}, children: [
|
|
986
997
|
"You guessed ",
|
|
987
|
-
/* @__PURE__ */
|
|
998
|
+
/* @__PURE__ */ o("strong", { children: te }),
|
|
988
999
|
" out of ",
|
|
989
|
-
/* @__PURE__ */
|
|
1000
|
+
/* @__PURE__ */ o("strong", { children: k }),
|
|
990
1001
|
" words correctly."
|
|
991
1002
|
] }),
|
|
992
|
-
/* @__PURE__ */
|
|
1003
|
+
/* @__PURE__ */ h("div", { style: {
|
|
993
1004
|
display: "flex",
|
|
994
1005
|
flexDirection: "column",
|
|
995
|
-
gap: `${
|
|
1006
|
+
gap: `${n}px`,
|
|
996
1007
|
alignItems: "center"
|
|
997
1008
|
}, children: [
|
|
998
|
-
/* @__PURE__ */
|
|
1009
|
+
/* @__PURE__ */ o(
|
|
999
1010
|
"button",
|
|
1000
1011
|
{
|
|
1001
1012
|
onClick: () => {
|
|
1002
|
-
if (!y ||
|
|
1013
|
+
if (!y || k === 0) {
|
|
1003
1014
|
x("lobby");
|
|
1004
1015
|
return;
|
|
1005
1016
|
}
|
|
1006
|
-
|
|
1007
|
-
const e =
|
|
1008
|
-
e && (
|
|
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: `${
|
|
1020
|
-
borderRadius: `${
|
|
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__ */
|
|
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: `${
|
|
1041
|
-
borderRadius: `${
|
|
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__ */
|
|
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__ */
|
|
1077
|
+
children: /* @__PURE__ */ o(
|
|
1067
1078
|
"div",
|
|
1068
1079
|
{
|
|
1069
1080
|
style: {
|
|
1070
|
-
width: d ? "100%" :
|
|
1071
|
-
height: d ? "100%" :
|
|
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(${
|
|
1093
|
+
transform: `scale(${ne})`
|
|
1083
1094
|
},
|
|
1084
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
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
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1115
|
+
We as Game,
|
|
1116
|
+
We as HangmanLobbyGame,
|
|
1117
|
+
We as default
|
|
1107
1118
|
};
|
|
1108
1119
|
//# sourceMappingURL=speakid-hangman.es.js.map
|