@mblinkov/whats-missing 20.0.55 → 21.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mblinkov/whats-missing",
3
- "version": "20.0.55",
3
+ "version": "21.0.0",
4
4
  "description": "A memory game component for React - Guess what's missing from a collection of images",
5
5
  "main": "dist/whats-missing.cjs.js",
6
6
  "module": "dist/whats-missing.es.js",
package/dist/Game.d.ts DELETED
@@ -1,7 +0,0 @@
1
- export default function Game({ gameCubeSize, screenHeight, screenWidth, seed, }: {
2
- gameCubeSize?: number;
3
- screenHeight?: number;
4
- screenWidth?: number;
5
- seed?: number;
6
- }): import("react/jsx-runtime").JSX.Element;
7
- export { Game };
@@ -1,2 +0,0 @@
1
- import { CSSProperties } from 'react';
2
- export declare const styles: Record<string, CSSProperties>;
package/dist/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export { default as Game } from './Game';
2
- export { themes } from './themes';
3
- export type { Theme } from './themes';
package/dist/themes.d.ts DELETED
@@ -1,7 +0,0 @@
1
- export type Theme = "animals" | "food" | "toys" | "clothes" | "transport" | "nature" | "home" | "school";
2
- export type ImageItem = {
3
- src: string;
4
- name: string;
5
- aliases?: string[];
6
- };
7
- export declare const themes: Record<Theme, ImageItem[]>;
@@ -1,32 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),o=require("react"),ti=`
2
- @keyframes spin {
3
- from { transform: rotate(0deg); }
4
- to { transform: rotate(360deg); }
5
- }
6
- `;if(typeof document<"u"&&!document.getElementById("spin-keyframes")){const r=document.createElement("style");r.id="spin-keyframes",r.innerHTML=ti,document.head.appendChild(r)}const oi={animation:"spin 1.4s linear infinite"},d={gmCenterScreen:{position:"relative",zIndex:1,minHeight:"100%",width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center",color:"#1f2937",padding:"24px 16px",boxSizing:"border-box",transform:"translateY(20px)"},gmHeadline1:{fontWeight:700,fontSize:"clamp(28px, 4vw, 40px)",lineHeight:"110%"},gmHeadline3:{fontWeight:600,fontSize:"18px",lineHeight:"130%"},gmBodyM:{fontWeight:400,fontSize:"16px",lineHeight:"140%"},gmBodyS:{fontWeight:400,fontSize:"14px",lineHeight:"140%",color:"#6b7280"},gmButton:{fontFamily:'"Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans"',fontWeight:600,fontSize:"16px",padding:"10px 16px",borderRadius:"12px",border:"1px solid #e5e7eb",background:"#ec4c44",color:"#ffffff",cursor:"pointer",boxShadow:"0 6px 18px rgba(236, 76, 68, .18)",transition:"transform .06s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease"},gmButtonActive:{background:"#333",color:"#fff"},gmGameLayout:{position:"relative",width:"100%",maxWidth:"none",minHeight:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",color:"#1f2937",padding:"16px 8px",margin:"0 auto"},gmGrid:{width:"100%",maxWidth:"none",margin:"0 auto",display:"grid",gridTemplateColumns:"repeat(3, 210px)",gridAutoRows:"210px",gap:"20px",justifyContent:"center"},gmInput:{padding:"6px 10px",borderRadius:"6px",border:"1px solid #ccc",fontSize:"16px",fontFamily:'"Geist", system-ui',width:"160px"},gmTable:{marginTop:"20px",marginBottom:"32px",borderCollapse:"collapse",width:"100%",maxWidth:"520px",tableLayout:"fixed",textAlign:"center"},gmTableCell:{padding:"8px 12px",borderBottom:"1px solid #e5e7eb",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},gmLogoFixed:{position:"absolute",top:"16px",left:"24px",width:"120px",zIndex:10,pointerEvents:"none",background:"transparent",transform:"none",willChange:"auto"},gmLogoImg:{height:"clamp(28px, 5vw, 40px)",width:"auto",background:"transparent",objectFit:"contain",imageRendering:"auto",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitFontSmoothing:"antialiased"},gmHourglass:{fontSize:"42px",...oi}},wi=window.origin+"/cloud/speakid/games/whatsmissing/",R=(r,a)=>r.map(([g,s,...y])=>({src:`${wi}${a}/${s.replace(/\s/g,"%20")}.png`,name:s,aliases:y?.length?y:void 0})),di=[["apple","apple"],["banana","banana"],["bread","bread"],["burger","burger"],["cake","cake"],["carrot","carrot"],["cheese","cheese"],["chicken","chicken"],["chocolate","chocolate"],["corn","corn"],["donut","donut"],["fish","fish"],["fries","fries"],["grapes","grapes"],["ice_cream","ice cream"],["milk","milk"],["orange","orange"],["pear","pear"],["pizza","pizza"],["rice","rice"],["sandwich","sandwich"],["soup","soup"],["strawberry","strawberry"],["tomato","tomato"],["watermelon","watermelon"]],ri=[["bear","bear"],["cat","cat"],["crocodile","crocodile","alligator"],["dolphin","dolphin"],["elephant","elephant"],["fox","fox"],["giraffe","giraffe"],["horse","horse"],["kangaroo","kangaroo"],["lion","lion"],["monkey","monkey"],["owl","owl"],["panda","panda"],["penguin","penguin"],["squirrel","squirrel"],["tiger","tiger"],["tortoise","tortoise","turtle"],["wolf","wolf"],["zebra","zebra"]],hi=[["ball","ball"],["balloon","balloon"],["blocks","blocks"],["car","car"],["doll","doll"],["drum","drum"],["guitar","guitar"],["jump_rope","jump rope"],["kite","kite"],["paints","paints"],["plane","plane"],["puzzle","puzzle"],["rocket","rocket"],["scooter","scooter"],["skateboard","skateboard"],["slide","slide"],["teddy_bear","teddy bear"],["yo-yo","yo-yo"],["crayons","crayons"]],si=[["t-shirt","T-shirt"],["dress","dress"],["hat","hat"],["shoes","shoes"],["socks","socks"],["coat","coat"],["skirt","skirt"],["trousers","trousers"],["jacket","jacket"],["scarf","scarf"],["gloves","gloves"],["shorts","shorts"],["cap","cap"],["boots","boots"],["pyjamas","pyjamas"]],ai=[["car","car"],["bus","bus"],["bike","bike"],["train","train"],["plane","plane"],["boat","boat"],["ship","ship"],["helicopter","helicopter"],["lorry","lorry","truck"],["taxi","taxi"],["rocket","rocket"],["van","van"],["motorbike","motorbike"],["tram","tram"],["submarine","submarine"]],gi=[["sun","sun"],["cloud","cloud"],["rain","rain"],["tree","tree"],["flower","flower"],["grass","grass"],["star","star"],["moon","moon"],["mountain","mountain"],["river","river"],["rainbow","rainbow"],["snowman","snowman"],["snow","snow"],["butterfly","butterfly"],["bird","bird"]],pi=[["bed","bed"],["table","table"],["chair","chair"],["door","door"],["window","window"],["lamp","lamp"],["sofa","sofa"],["clock","clock"],["key","key"],["phone","phone"],["tv","TV"],["cup","cup"],["plate","plate"],["mirror","mirror"],["book","book"]],li=[["book","book"],["pen","pen"],["pencil","pencil"],["bag","bag"],["ruler","ruler"],["rubber","rubber","eraser"],["desk","desk"],["board","board"],["crayon","crayon"],["glue","glue"],["scissors","scissors"],["notebook","notebook"],["pencil_case","pencil case"],["paintbrush","paintbrush"],["backpack","backpack"]],F={food:R(di,"food"),animals:R(ri,"animals"),toys:R(hi,"toys"),clothes:R(si,"clothes"),transport:R(ai,"transport"),nature:R(gi,"nature"),home:R(pi,"home"),school:R(li,"school")},ci=["animals","food","toys","clothes","transport","nature","home","school"],xi={animals:"🐶 Animals",food:"🍎 Food",toys:"🧸 Toys",clothes:"👕 Clothes",transport:"🚗 Transport",nature:"🌳 Nature",home:"🏠 Home",school:"📚 School"},Hi=()=>{const r=document.createElement("style");r.id="whats-missing-reset",r.textContent=`
7
- #whats-missing-root, #whats-missing-root * {
8
- box-sizing: border-box;
9
- font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
10
- }
11
- #whats-missing-root img {
12
- max-width: 100%;
13
- height: auto;
14
- display: block;
15
- user-select: none;
16
- }
17
- html, body {
18
- margin: 0 !important;
19
- padding: 0 !important;
20
- width: 100% !important;
21
- height: 100% !important;
22
- overflow: hidden !important;
23
- zoom: 1 !important; /* ✅ защита от подзума */
24
- }
25
- #root {
26
- margin: 0 !important;
27
- padding: 0 !important;
28
- width: 100% !important;
29
- height: 100% !important;
30
- overflow: hidden !important;
31
- }
32
- `;const a=document.getElementById("whats-missing-reset");a&&a.remove(),document.head.appendChild(r)};class Wi{constructor(a){this.seed=a}next(){return this.seed=(this.seed*1664525+1013904223)%Math.pow(2,32),this.seed/Math.pow(2,32)}nextInt(a){return Math.floor(this.next()*a)}}const mi=(r,a)=>{const g=Array.from({length:r.length+1},()=>Array(a.length+1).fill(0));for(let s=0;s<=r.length;s++)g[s][0]=s;for(let s=0;s<=a.length;s++)g[0][s]=s;for(let s=1;s<=r.length;s++)for(let y=1;y<=a.length;y++)g[s][y]=r[s-1]===a[y-1]?g[s-1][y-1]:Math.min(g[s-1][y-1],g[s][y-1],g[s-1][y])+1;return g[r.length][a.length]},ui=r=>new Promise(a=>{const g=new Image;g.onload=()=>a(g),g.onerror=()=>a(g),g.src=r}),sn=async(r,a)=>{const g=new Map,s=r.map(async y=>{const j=await ui(y);g.set(y,j)});return await Promise.allSettled(s),g};function fi({gameCubeSize:r,screenHeight:a,screenWidth:g,seed:s}){const y=o.useRef(null);o.useEffect(()=>(Hi(),()=>{document.documentElement.style.overflow="",document.body.style.overflow="";const e=document.getElementById("whats-missing-reset");e&&e.remove(),I.current&&I.current.abort()}),[]);const[j,an]=o.useState(null),[M,gn]=o.useState([]),[E,Pn]=o.useState(4),[pn,V]=o.useState(1),[B,ln]=o.useState(!1),[U,cn]=o.useState(1),[v,zn]=o.useState(null),[k,Y]=o.useState("ready"),[xn,Hn]=o.useState(10),[Z,K]=o.useState(10),[J,Wn]=o.useState(20),[Rn,Q]=o.useState(0),[_,X]=o.useState(!1),[$,mn]=o.useState(""),[C,nn]=o.useState(!1),[en,un]=o.useState(!1),[fn,D]=o.useState(null),[Mn,tn]=o.useState([]),[Ln,yn]=o.useState([]),[n,Bn]=o.useState(!1),[Cn,q]=o.useState(1),[bn,N]=o.useState(null),[S,An]=o.useState(!1),[p,En]=o.useState(!1),[l,Dn]=o.useState(!1),[c,Gn]=o.useState(!1),[x,Fn]=o.useState(!1),[H,Un]=o.useState(!1),[W,Yn]=o.useState(!1),[m,_n]=o.useState(!1),[u,$n]=o.useState(!1),[on,qn]=o.useState(!1),[T,Nn]=o.useState(!1),wn=o.useRef(new Set),O=o.useRef(new Map),I=o.useRef(null),A=o.useRef(null);o.useEffect(()=>{s!==void 0?A.current=new Wi(s):A.current=null},[s]);const On=()=>A.current?A.current.next():Math.random(),Sn=e=>A.current?A.current.nextInt(e):Math.floor(Math.random()*e);o.useEffect(()=>{const e=()=>{const t=g??window.innerWidth,w=a??window.innerHeight,h=t<768||t===926&&w===428||t===932&&w===430,f=w<700,P=t/w>1.8,b=t===768&&w===1024,rn=t===1024&&w===768,G=t===820&&w===1180,z=t===1180&&w===820,L=t===540&&w===720,In=t===720&&w===540,vn=t===1024&&w===1366,Tn=t===1366&&w===1024,Xn=t>=1200&&w>=600&&!h;An(Xn),En(b),Dn(rn),Gn(G),Fn(z),Un(L),Yn(In),_n(vn),$n(Tn),Nn(P);const ni=h&&t>w||h||w<700||P||t===1366&&w===766||t===1366&&w===768||t===1280&&w===720||t===1440&&w===900||b||rn||G||z||L||In||vn||Tn||S;if(qn(ni),Bn(h),h)N(r&&r>=320?r:null),q(1);else if(f)N(r&&r>=400?r:null),q(1);else if(P){const hn=r?Math.max(400,Math.min(1200,r)):Math.min(1e3,Math.min(t,w)*.9);N(hn),q(.85)}else{const hn=r?Math.max(400,Math.min(1200,r)):Math.min(1e3,Math.min(t,w)*.9);N(hn),q(1)}};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[g,a,r]);const dn=e=>[...e].sort(()=>On()-.5).slice(0,6),Vn=e=>{I.current&&I.current.abort(),I.current=new AbortController;const w=F[e].map(h=>h.src);sn(w,I.current.signal).then(h=>{w.forEach(f=>{wn.current.add(f),h.has(f)&&O.current.set(f,h.get(f))})}).catch(()=>{})},jn=()=>{if(!j)return;const e=dn(F[j]);gn(e),ln(!0),X(!1),cn(1),Q(0),tn([]),yn([]);const t=e.map(w=>w.src);sn(t,I.current?.signal).then(w=>{t.forEach(h=>{wn.current.add(h),w.has(h)&&O.current.set(h,w.get(h))})}).catch(()=>{}),kn(e,[],!0)},kn=(e=M,t=Ln,w=!1)=>{const h=dn(e.length?e:F[j]);let f=Sn(h.length),P=h[f].name,b=0;for(;t.includes(P)&&b<20;)f=Sn(h.length),P=h[f].name,b++;if(gn(h),zn(f),yn([...t,P]),nn(!1),mn(""),Wn(20),D(null),j&&!w){const G=dn(F[j].filter(z=>!t.includes(z.name))).map(z=>z.src);sn(G,I.current?.signal).then(z=>{G.forEach(L=>{wn.current.add(L),z.has(L)&&O.current.set(L,z.get(L))})}).catch(()=>{})}w?(Y("ready"),Hn(10),K(10)):(Y("memorize"),K(10))};o.useEffect(()=>{if(!(!B||_||C)){if(k==="ready")if(xn<=0)Y("memorize");else{const e=setTimeout(()=>Hn(t=>t-1),1e3);return()=>clearTimeout(e)}if(k==="memorize")if(Z<=0)Y("guess");else{const e=setTimeout(()=>K(t=>t-1),1e3);return()=>clearTimeout(e)}if(k==="guess"){if(J<=0){nn(!0),D("wrong");const t=M[v].name,w=M[v].aliases,h=[t,...w||[]].join(", ");tn(f=>[...f,{round:U,answer:$,correct:h,result:"wrong"}]);return}const e=setTimeout(()=>Wn(t=>t-1),1e3);return()=>clearTimeout(e)}}},[k,xn,Z,J,B,_,C,M,v,U,$]);const Zn=()=>{if(v===null||en)return;const e=M[v].name,t=M[v].aliases,w=$.toLowerCase().trim();let h="wrong";const f=[e,...t||[]].map(b=>b.toLowerCase()),P=[e,...t||[]].join(", ");f.includes(w)?(Q(b=>b+1),D("correct"),h="correct"):f.some(b=>mi(w,b)===1)?(Q(b=>b+.5),D("almost"),h="almost"):(D("wrong"),h="wrong"),tn(b=>[...b,{round:U,answer:w,correct:P,result:h}]),un(!0),setTimeout(()=>{un(!1),nn(!0)},600)},Kn=()=>U<E?(cn(e=>e+1),kn()):X(!0),Jn=()=>{I.current&&I.current.abort(),ln(!1),X(!1),an(null),V(2)},Qn=o.useMemo(()=>{const e=g??window.innerWidth,t=a??window.innerHeight,w=!n&&e>=1200&&e<=1400;return n&&e>t||t<700&&!w?null:i.jsx("div",{style:{...d.gmLogoFixed,position:"absolute",top:16,left:16,zIndex:30},children:i.jsxs("picture",{children:[i.jsx("source",{srcSet:window.origin+"/cloud/speakid/games/whatsmissing/logo.svg",type:"image/svg+xml"}),i.jsx("img",{src:window.origin+"/cloud/speakid/games/whatsmissing/logo.png",alt:"SPEAKID Logo",style:d.gmLogoImg,loading:"lazy"})]})})},[n,g,a]);return i.jsx("div",{ref:y,style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",background:"linear-gradient(to bottom, #fff8f8 0%, #f9fafb 100%)",transition:"background 0.3s ease",overflow:"hidden",position:"absolute",top:0,left:0,right:0,bottom:0},children:i.jsx("div",{style:{width:n?"100%":bn||r||1e3,height:n?"100%":bn||r||1e3,display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",borderRadius:n?0:"20px",background:"linear-gradient(to bottom, #fff8f8 0%, #f9fafb 100%)",boxShadow:n?"none":"0 0 40px rgba(0,0,0,0.1)",margin:n?"0 auto":"unset",position:"relative",transform:`scale(${Cn})`},children:i.jsx("div",{style:{transform:"translateZ(0)",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:i.jsxs("div",{id:"whats-missing-root",children:[!n&&Qn,!j&&!B&&pn===1&&i.jsxs("div",{style:d.gmCenterScreen,children:[i.jsx("h1",{style:d.gmHeadline1,children:"WHAT'S MISSING?"}),i.jsxs("div",{style:{marginTop:24},children:[i.jsx("p",{style:d.gmBodyS,children:"Choose number of rounds:"}),i.jsx("div",{style:{display:"flex",gap:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"6px":"12px",marginTop:8},children:[3,4,5].map(e=>i.jsx("button",{style:{...d.gmButton,...E===e?d.gmButtonActive:{},padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"6px 10px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"12px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"40px":"auto"},onClick:()=>Pn(e),children:e},e))})]}),i.jsx("button",{style:{...d.gmButton,marginTop:24,padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"8px 16px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"14px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"120px":"auto"},onClick:()=>V(2),children:"Play"})]}),!j&&!B&&pn===2&&i.jsxs("div",{style:d.gmCenterScreen,children:[i.jsx("p",{style:d.gmBodyM,children:"Select a theme:"}),i.jsxs("p",{style:d.gmBodyS,children:["Rounds: ",E]}),i.jsx("div",{style:{display:"grid",gridTemplateColumns:n?"repeat(2, 1fr)":"repeat(4, 1fr)",gap:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"8px":"12px",maxWidth:n?280:420,margin:"0 auto"},children:ci.map(e=>i.jsx("button",{style:{...d.gmButton,padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"8px 12px":"10px 16px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"12px":"14px"},onClick:()=>{an(e),Vn(e)},children:xi[e]},e))}),i.jsx("button",{style:{...d.gmButton,marginTop:24,padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"8px 16px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"14px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"120px":"auto"},onClick:()=>V(1),children:"Back"})]}),j&&!B&&i.jsxs("div",{style:d.gmCenterScreen,children:[i.jsxs("h1",{style:d.gmHeadline1,children:["Theme selected: ",j]}),i.jsxs("p",{style:d.gmBodyM,children:["Rounds: ",E]}),i.jsx("button",{style:{...d.gmButton,padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"8px 16px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"14px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"120px":"auto"},onClick:jn,children:"▶ Start game"})]}),_&&i.jsxs("div",{style:d.gmCenterScreen,children:[i.jsx("h1",{style:{...d.gmHeadline1,marginTop:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||p||l||c||x||H||W||m||u?"0px":d.gmHeadline1.marginTop,marginBottom:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||p||l||c||x||H||W||m||u?"2px":d.gmHeadline1.marginBottom},children:"Results"}),i.jsxs("h2",{style:{...d.gmHeadline3,marginTop:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||p||l||c||x||H||W||m||u?"0px":d.gmHeadline3.marginTop,marginBottom:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||p||l||c||x||H||W||m||u?"2px":d.gmHeadline3.marginBottom},children:["Your score: ",Rn," / ",E]}),i.jsx("p",{style:{...d.gmBodyM,color:"#10b981",marginTop:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||p||l||c||x||H||W||m||u?"0px":"12px",marginBottom:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||p||l||c||x||H||W||m||u?"2px":d.gmBodyM.marginBottom},children:"Yahoo! You did it! 🍬✨"}),i.jsxs("table",{style:{...d.gmTable,marginTop:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||p||l||c||x||H||W||m||u?"0px":"20px",marginBottom:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||p||l||c||x||H||W||m||u?"4px":"32px"},children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Round"}),i.jsx("th",{children:"Your Answer"}),i.jsx("th",{children:"Correct"}),i.jsx("th",{children:"Result"})]})}),i.jsx("tbody",{children:Mn.map((e,t)=>i.jsxs("tr",{children:[i.jsx("td",{style:d.gmTableCell,children:e.round}),i.jsx("td",{style:d.gmTableCell,children:e.answer||"—"}),i.jsx("td",{style:d.gmTableCell,children:e.correct}),i.jsx("td",{style:d.gmTableCell,children:e.result==="correct"?"✔ Correct":e.result==="almost"?"◐ Almost (0.5)":"✘ Wrong"})]},t))})]}),i.jsxs("div",{style:{display:"flex",gap:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"6px":"12px",marginTop:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"2px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||S?"12px":"24px"},children:[i.jsx("button",{style:{...d.gmButton,padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"6px 10px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"12px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"80px":"auto"},onClick:jn,children:"🔁 Play again"}),i.jsx("button",{style:{...d.gmButton,padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"6px 10px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"12px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"80px":"auto"},onClick:Jn,children:"⬅️ Choose theme"})]})]}),B&&!_&&i.jsxs("div",{style:d.gmGameLayout,children:[i.jsxs("div",{style:{minHeight:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"45px":T||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"50px":n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"60px":"160px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",paddingTop:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||T||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"8px":n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"15px":"40px"},children:[k==="ready"&&i.jsxs(i.Fragment,{children:[i.jsx("h1",{style:{...d.gmHeadline1,color:"#ec4c44"},children:"GET READY"}),i.jsx("div",{style:d.gmHourglass,children:"⏳"})]}),k==="memorize"&&i.jsxs("p",{style:{...d.gmBodyM,color:"#10b981"},children:["MEMORIZE (",Z,")"]}),k==="guess"&&!C&&i.jsxs("p",{style:d.gmBodyM,children:["⏳ Time left: ",J,"s"]})]}),k!=="ready"&&i.jsx("div",{style:{...d.gmGrid,...T||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?{width:"100%"}:{},gridTemplateColumns:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"repeat(3, 1fr)":n?"repeat(2, 1fr)":window.innerHeight<700?"repeat(3, 1fr)":typeof window<"u"&&window.innerWidth===1280&&window.innerHeight===720?"repeat(3, 130px)":T||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"repeat(3, 150px)":"repeat(3, 210px)",gridAutoRows:n&&window.innerWidth>window.innerHeight?"120px":n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"100px":n?"150px":window.innerHeight<700?"140px":typeof window<"u"&&window.devicePixelRatio>=1.25&&window.devicePixelRatio<=1.5?"240px":typeof window<"u"&&window.innerWidth===1280&&window.innerHeight===720?"130px":T||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"150px":"210px",gap:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"12px":n||window.innerHeight<700?"8px":typeof window<"u"&&window.devicePixelRatio>=1.25&&window.devicePixelRatio<=1.5?"24px":T||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"12px":"20px",justifyItems:"center",maxWidth:n&&window.innerWidth>window.innerHeight?"90%":n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"95%":"100%",padding:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"8px":typeof window<"u"&&window.devicePixelRatio>=1.25&&window.devicePixelRatio<=1.5?"20px":T||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"10px":"16px"},children:M.map((e,t)=>{const w=v===t&&k==="guess"&&!C;return i.jsx("div",{style:{width:"100%",height:"100%",borderRadius:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"6px":"12px",overflow:"hidden",boxShadow:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"0 1px 4px rgba(0,0,0,0.1)":"0 4px 12px rgba(0,0,0,0.15)",transition:"all 0.3s ease",cursor:"pointer",...fn==="correct"&&v===t?{boxShadow:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"0 0 15px #10b981":"0 0 20px #10b981",transform:"scale(1.03)"}:{},...fn==="wrong"&&v===t?{boxShadow:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"0 0 15px #ef4444":"0 0 20px #ef4444",transform:"scale(1.03)"}:{}},children:!w&&(()=>{const h=O.current.get(e.src),f=h?.complete&&h.src?h.src:e.src;return i.jsx("img",{src:f,alt:e.name,fetchPriority:"high",loading:"eager",decoding:"async",style:{width:"100%",height:"100%",objectFit:"cover"}},`${e.src}-${h?.complete?"loaded":"pending"}`)})()},t)})}),i.jsxs("div",{style:{marginTop:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"1px":T||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"4px":"16px",height:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"40px":T||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"50px":"80px"},children:[k==="guess"&&!C&&i.jsx("div",{style:{display:"flex",flexDirection:on?"row":"column",gap:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"3px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||S||p||l||c||x||H||W||m||u?"8px":n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"6px":"12px",alignItems:"center",justifyContent:"center",width:"100%",maxWidth:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"270px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||S||p||l||c||x||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"400px":"300px"},children:i.jsxs(i.Fragment,{children:[i.jsx("input",{type:"text",placeholder:"Type the missing word",value:$,onChange:e=>mn(e.target.value),style:{...d.gmInput,width:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"170px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||S||p||l||c||x||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"250px":"auto",padding:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"5px 6px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||S||p||l||c||x||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"10px 12px":"12px 16px",fontSize:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428?"10px":window.innerWidth===896&&window.innerHeight===414?"11px":window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"10px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||S||p||l||c||x||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"14px":"16px",flex:on?"1":"none"}}),i.jsx("button",{style:{...d.gmButton,marginLeft:on?"8px":"0",padding:n&&window.innerWidth<=375&&window.innerHeight<=667?"5px 8px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"6px 10px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||S||p||l||c||x||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"10px 16px":"12px 24px",fontSize:n&&window.innerWidth<=375&&window.innerHeight<=667?"10px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"11px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||S||p||l||c||x||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"14px":"16px",minWidth:n&&window.innerWidth<=375&&window.innerHeight<=667?"45px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"55px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||S||p||l||c||x||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"80px":"100px",flexShrink:0},onClick:Zn,disabled:en,children:en?"...":"Check"})]})}),C&&i.jsx("button",{style:{...d.gmButton,padding:n&&window.innerWidth<=375&&window.innerHeight<=667?"5px 8px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"6px 10px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||S||p||l||c||x||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"10px 16px":"12px 24px",fontSize:n&&window.innerWidth<=375&&window.innerHeight<=667?"10px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"11px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||S||p||l||c||x||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"14px":"16px"},onClick:Kn,children:"Next round"})]})]})]})})})})}exports.Game=fi;exports.themes=F;
@@ -1,989 +0,0 @@
1
- import { jsx as w, jsxs as p, Fragment as Ln } from "react/jsx-runtime";
2
- import { useRef as U, useEffect as q, useState as h, useMemo as ri } from "react";
3
- const hi = `
4
- @keyframes spin {
5
- from { transform: rotate(0deg); }
6
- to { transform: rotate(360deg); }
7
- }
8
- `;
9
- if (typeof document < "u" && !document.getElementById("spin-keyframes")) {
10
- const d = document.createElement("style");
11
- d.id = "spin-keyframes", d.innerHTML = hi, document.head.appendChild(d);
12
- }
13
- const si = {
14
- animation: "spin 1.4s linear infinite"
15
- }, o = {
16
- gmCenterScreen: {
17
- position: "relative",
18
- zIndex: 1,
19
- // use percent so the component fits inside the centered square container
20
- // (100vh caused overflow on tablets because it measured the viewport, not the container)
21
- minHeight: "100%",
22
- width: "100%",
23
- display: "flex",
24
- flexDirection: "column",
25
- justifyContent: "center",
26
- alignItems: "center",
27
- textAlign: "center",
28
- color: "#1f2937",
29
- padding: "24px 16px",
30
- boxSizing: "border-box",
31
- transform: "translateY(20px)"
32
- // чуть вниз, чтобы компенсировать логотип
33
- },
34
- gmHeadline1: {
35
- fontWeight: 700,
36
- fontSize: "clamp(28px, 4vw, 40px)",
37
- lineHeight: "110%"
38
- },
39
- gmHeadline3: {
40
- fontWeight: 600,
41
- fontSize: "18px",
42
- lineHeight: "130%"
43
- },
44
- gmBodyM: {
45
- fontWeight: 400,
46
- fontSize: "16px",
47
- lineHeight: "140%"
48
- },
49
- gmBodyS: {
50
- fontWeight: 400,
51
- fontSize: "14px",
52
- lineHeight: "140%",
53
- color: "#6b7280"
54
- },
55
- gmButton: {
56
- fontFamily: '"Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans"',
57
- fontWeight: 600,
58
- fontSize: "16px",
59
- padding: "10px 16px",
60
- borderRadius: "12px",
61
- border: "1px solid #e5e7eb",
62
- background: "#ec4c44",
63
- color: "#ffffff",
64
- cursor: "pointer",
65
- boxShadow: "0 6px 18px rgba(236, 76, 68, .18)",
66
- transition: "transform .06s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease"
67
- },
68
- gmButtonActive: {
69
- background: "#333",
70
- color: "#fff"
71
- },
72
- gmGameLayout: {
73
- position: "relative",
74
- width: "100%",
75
- // allow the layout to expand within the square container for tablets/laptops
76
- maxWidth: "none",
77
- // should fill the parent square, not the full viewport
78
- minHeight: "100%",
79
- display: "flex",
80
- flexDirection: "column",
81
- alignItems: "center",
82
- justifyContent: "center",
83
- textAlign: "center",
84
- color: "#1f2937",
85
- padding: "16px 8px",
86
- margin: "0 auto"
87
- },
88
- gmGrid: {
89
- width: "100%",
90
- // let the grid use all available space; sizing is controlled in Game.tsx
91
- maxWidth: "none",
92
- margin: "0 auto",
93
- display: "grid",
94
- // defaults; overridden responsively in Game.tsx
95
- gridTemplateColumns: "repeat(3, 210px)",
96
- gridAutoRows: "210px",
97
- gap: "20px",
98
- justifyContent: "center"
99
- },
100
- gmInput: {
101
- padding: "6px 10px",
102
- borderRadius: "6px",
103
- border: "1px solid #ccc",
104
- fontSize: "16px",
105
- fontFamily: '"Geist", system-ui',
106
- width: "160px"
107
- },
108
- gmTable: {
109
- marginTop: "20px",
110
- marginBottom: "32px",
111
- borderCollapse: "collapse",
112
- width: "100%",
113
- maxWidth: "520px",
114
- tableLayout: "fixed",
115
- textAlign: "center"
116
- },
117
- gmTableCell: {
118
- padding: "8px 12px",
119
- borderBottom: "1px solid #e5e7eb",
120
- whiteSpace: "nowrap",
121
- overflow: "hidden",
122
- textOverflow: "ellipsis"
123
- },
124
- // ✅ Обновлено только для качества логотипа
125
- gmLogoFixed: {
126
- position: "absolute",
127
- top: "16px",
128
- left: "24px",
129
- width: "120px",
130
- zIndex: 10,
131
- pointerEvents: "none",
132
- background: "transparent",
133
- transform: "none",
134
- willChange: "auto"
135
- },
136
- gmLogoImg: {
137
- height: "clamp(28px, 5vw, 40px)",
138
- width: "auto",
139
- background: "transparent",
140
- objectFit: "contain",
141
- imageRendering: "auto",
142
- transform: "translateZ(0)",
143
- backfaceVisibility: "hidden",
144
- WebkitFontSmoothing: "antialiased"
145
- },
146
- gmHourglass: {
147
- fontSize: "42px",
148
- ...si
149
- }
150
- }, ai = window.origin + "/cloud/speakid/games/whatsmissing/", L = (d, a) => d.map(([g, s, ...b]) => ({
151
- src: `${ai}${a}/${s.replace(/\s/g, "%20")}.png`,
152
- name: s,
153
- aliases: b?.length ? b : void 0
154
- })), gi = [
155
- ["apple", "apple"],
156
- ["banana", "banana"],
157
- ["bread", "bread"],
158
- ["burger", "burger"],
159
- ["cake", "cake"],
160
- ["carrot", "carrot"],
161
- ["cheese", "cheese"],
162
- ["chicken", "chicken"],
163
- ["chocolate", "chocolate"],
164
- ["corn", "corn"],
165
- ["donut", "donut"],
166
- ["fish", "fish"],
167
- ["fries", "fries"],
168
- ["grapes", "grapes"],
169
- ["ice_cream", "ice cream"],
170
- ["milk", "milk"],
171
- ["orange", "orange"],
172
- ["pear", "pear"],
173
- ["pizza", "pizza"],
174
- ["rice", "rice"],
175
- ["sandwich", "sandwich"],
176
- ["soup", "soup"],
177
- ["strawberry", "strawberry"],
178
- ["tomato", "tomato"],
179
- ["watermelon", "watermelon"]
180
- ], pi = [
181
- ["bear", "bear"],
182
- ["cat", "cat"],
183
- ["crocodile", "crocodile", "alligator"],
184
- ["dolphin", "dolphin"],
185
- ["elephant", "elephant"],
186
- ["fox", "fox"],
187
- ["giraffe", "giraffe"],
188
- ["horse", "horse"],
189
- ["kangaroo", "kangaroo"],
190
- ["lion", "lion"],
191
- ["monkey", "monkey"],
192
- ["owl", "owl"],
193
- ["panda", "panda"],
194
- ["penguin", "penguin"],
195
- ["squirrel", "squirrel"],
196
- ["tiger", "tiger"],
197
- ["tortoise", "tortoise", "turtle"],
198
- ["wolf", "wolf"],
199
- ["zebra", "zebra"]
200
- ], li = [
201
- ["ball", "ball"],
202
- ["balloon", "balloon"],
203
- ["blocks", "blocks"],
204
- ["car", "car"],
205
- ["doll", "doll"],
206
- ["drum", "drum"],
207
- ["guitar", "guitar"],
208
- ["jump_rope", "jump rope"],
209
- ["kite", "kite"],
210
- ["paints", "paints"],
211
- ["plane", "plane"],
212
- ["puzzle", "puzzle"],
213
- ["rocket", "rocket"],
214
- ["scooter", "scooter"],
215
- ["skateboard", "skateboard"],
216
- ["slide", "slide"],
217
- ["teddy_bear", "teddy bear"],
218
- ["yo-yo", "yo-yo"],
219
- ["crayons", "crayons"]
220
- ], ci = [
221
- ["t-shirt", "T-shirt"],
222
- ["dress", "dress"],
223
- ["hat", "hat"],
224
- ["shoes", "shoes"],
225
- ["socks", "socks"],
226
- ["coat", "coat"],
227
- ["skirt", "skirt"],
228
- ["trousers", "trousers"],
229
- ["jacket", "jacket"],
230
- ["scarf", "scarf"],
231
- ["gloves", "gloves"],
232
- ["shorts", "shorts"],
233
- ["cap", "cap"],
234
- ["boots", "boots"],
235
- ["pyjamas", "pyjamas"]
236
- ], xi = [
237
- ["car", "car"],
238
- ["bus", "bus"],
239
- ["bike", "bike"],
240
- ["train", "train"],
241
- ["plane", "plane"],
242
- ["boat", "boat"],
243
- ["ship", "ship"],
244
- ["helicopter", "helicopter"],
245
- ["lorry", "lorry", "truck"],
246
- ["taxi", "taxi"],
247
- ["rocket", "rocket"],
248
- ["van", "van"],
249
- ["motorbike", "motorbike"],
250
- ["tram", "tram"],
251
- ["submarine", "submarine"]
252
- ], Hi = [
253
- ["sun", "sun"],
254
- ["cloud", "cloud"],
255
- ["rain", "rain"],
256
- ["tree", "tree"],
257
- ["flower", "flower"],
258
- ["grass", "grass"],
259
- ["star", "star"],
260
- ["moon", "moon"],
261
- ["mountain", "mountain"],
262
- ["river", "river"],
263
- ["rainbow", "rainbow"],
264
- ["snowman", "snowman"],
265
- ["snow", "snow"],
266
- ["butterfly", "butterfly"],
267
- ["bird", "bird"]
268
- ], Wi = [
269
- ["bed", "bed"],
270
- ["table", "table"],
271
- ["chair", "chair"],
272
- ["door", "door"],
273
- ["window", "window"],
274
- ["lamp", "lamp"],
275
- ["sofa", "sofa"],
276
- ["clock", "clock"],
277
- ["key", "key"],
278
- ["phone", "phone"],
279
- ["tv", "TV"],
280
- ["cup", "cup"],
281
- ["plate", "plate"],
282
- ["mirror", "mirror"],
283
- ["book", "book"]
284
- ], mi = [
285
- ["book", "book"],
286
- ["pen", "pen"],
287
- ["pencil", "pencil"],
288
- ["bag", "bag"],
289
- ["ruler", "ruler"],
290
- ["rubber", "rubber", "eraser"],
291
- ["desk", "desk"],
292
- ["board", "board"],
293
- ["crayon", "crayon"],
294
- ["glue", "glue"],
295
- ["scissors", "scissors"],
296
- ["notebook", "notebook"],
297
- ["pencil_case", "pencil case"],
298
- ["paintbrush", "paintbrush"],
299
- ["backpack", "backpack"]
300
- ], K = {
301
- food: L(gi, "food"),
302
- animals: L(pi, "animals"),
303
- toys: L(li, "toys"),
304
- clothes: L(ci, "clothes"),
305
- transport: L(xi, "transport"),
306
- nature: L(Hi, "nature"),
307
- home: L(Wi, "home"),
308
- school: L(mi, "school")
309
- }, ui = [
310
- "animals",
311
- "food",
312
- "toys",
313
- "clothes",
314
- "transport",
315
- "nature",
316
- "home",
317
- "school"
318
- ], fi = {
319
- animals: "🐶 Animals",
320
- food: "🍎 Food",
321
- toys: "🧸 Toys",
322
- clothes: "👕 Clothes",
323
- transport: "🚗 Transport",
324
- nature: "🌳 Nature",
325
- home: "🏠 Home",
326
- school: "📚 School"
327
- }, yi = () => {
328
- const d = document.createElement("style");
329
- d.id = "whats-missing-reset", d.textContent = `
330
- #whats-missing-root, #whats-missing-root * {
331
- box-sizing: border-box;
332
- font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
333
- }
334
- #whats-missing-root img {
335
- max-width: 100%;
336
- height: auto;
337
- display: block;
338
- user-select: none;
339
- }
340
- html, body {
341
- margin: 0 !important;
342
- padding: 0 !important;
343
- width: 100% !important;
344
- height: 100% !important;
345
- overflow: hidden !important;
346
- zoom: 1 !important; /* ✅ защита от подзума */
347
- }
348
- #root {
349
- margin: 0 !important;
350
- padding: 0 !important;
351
- width: 100% !important;
352
- height: 100% !important;
353
- overflow: hidden !important;
354
- }
355
- `;
356
- const a = document.getElementById("whats-missing-reset");
357
- a && a.remove(), document.head.appendChild(d);
358
- };
359
- class bi {
360
- constructor(a) {
361
- this.seed = a;
362
- }
363
- // Linear Congruential Generator (LCG)
364
- // Используем параметры из Numerical Recipes
365
- next() {
366
- return this.seed = (this.seed * 1664525 + 1013904223) % Math.pow(2, 32), this.seed / Math.pow(2, 32);
367
- }
368
- // Генерирует случайное число от 0 до max (не включая max)
369
- nextInt(a) {
370
- return Math.floor(this.next() * a);
371
- }
372
- }
373
- const ki = (d, a) => {
374
- const g = Array.from({ length: d.length + 1 }, () => Array(a.length + 1).fill(0));
375
- for (let s = 0; s <= d.length; s++) g[s][0] = s;
376
- for (let s = 0; s <= a.length; s++) g[0][s] = s;
377
- for (let s = 1; s <= d.length; s++)
378
- for (let b = 1; b <= a.length; b++)
379
- g[s][b] = d[s - 1] === a[b - 1] ? g[s - 1][b - 1] : Math.min(g[s - 1][b - 1], g[s][b - 1], g[s - 1][b]) + 1;
380
- return g[d.length][a.length];
381
- }, Ii = (d) => new Promise((a) => {
382
- const g = new Image();
383
- g.onload = () => a(g), g.onerror = () => a(g), g.src = d;
384
- }), pn = async (d, a) => {
385
- const g = /* @__PURE__ */ new Map(), s = d.map(async (b) => {
386
- const S = await Ii(b);
387
- g.set(b, S);
388
- });
389
- return await Promise.allSettled(s), g;
390
- };
391
- function Ti({
392
- gameCubeSize: d,
393
- screenHeight: a,
394
- screenWidth: g,
395
- seed: s
396
- }) {
397
- const b = U(null);
398
- q(() => (yi(), () => {
399
- document.documentElement.style.overflow = "", document.body.style.overflow = "";
400
- const i = document.getElementById("whats-missing-reset");
401
- i && i.remove(), T.current && T.current.abort();
402
- }), []);
403
- const [S, ln] = h(null), [B, cn] = h([]), [D, Bn] = h(4), [xn, J] = h(1), [A, Hn] = h(!1), [Y, Wn] = h(1), [P, Cn] = h(null), [v, _] = h("ready"), [mn, un] = h(10), [Q, X] = h(10), [nn, fn] = h(20), [An, en] = h(0), [$, tn] = h(!1), [N, yn] = h(""), [E, on] = h(!1), [wn, bn] = h(!1), [kn, G] = h(null), [En, dn] = h([]), [jn, In] = h([]), [n, Dn] = h(!1), [Gn, V] = h(1), [Sn, O] = h(null), [I, Fn] = h(!1), [l, Un] = h(!1), [c, Yn] = h(!1), [x, _n] = h(!1), [H, $n] = h(!1), [W, Nn] = h(!1), [m, Vn] = h(!1), [u, On] = h(!1), [f, Zn] = h(!1), [rn, qn] = h(!1), [z, Kn] = h(!1), hn = U(/* @__PURE__ */ new Set()), Z = U(/* @__PURE__ */ new Map()), T = U(null), j = U(null);
404
- q(() => {
405
- s !== void 0 ? j.current = new bi(s) : j.current = null;
406
- }, [s]);
407
- const Jn = () => j.current ? j.current.next() : Math.random(), vn = (i) => j.current ? j.current.nextInt(i) : Math.floor(Math.random() * i);
408
- q(() => {
409
- const i = () => {
410
- const e = g ?? window.innerWidth, t = a ?? window.innerHeight, r = e < 768 || e === 926 && t === 428 || e === 932 && t === 430, y = t < 700, R = e / t > 1.8, k = e === 768 && t === 1024, an = e === 1024 && t === 768, F = e === 820 && t === 1180, M = e === 1180 && t === 820, C = e === 540 && t === 720, zn = e === 720 && t === 540, Rn = e === 1024 && t === 1366, Mn = e === 1366 && t === 1024, ti = e >= 1200 && t >= 600 && !r;
411
- Fn(ti), Un(k), Yn(an), _n(F), $n(M), Nn(C), Vn(zn), On(Rn), Zn(Mn), Kn(R);
412
- const oi = r && e > t || r || // ✅ ВСЕ мобильные устройства (включая portrait)
413
- t < 700 || R || // ✅ Широкие экраны
414
- e === 1366 && t === 766 || e === 1366 && t === 768 || e === 1280 && t === 720 || e === 1440 && t === 900 || k || an || F || M || C || zn || Rn || Mn || I;
415
- if (qn(oi), Dn(r), r)
416
- O(d && d >= 320 ? d : null), V(1);
417
- else if (y)
418
- O(d && d >= 400 ? d : null), V(1);
419
- else if (R) {
420
- const gn = d ? Math.max(400, Math.min(1200, d)) : Math.min(1e3, Math.min(e, t) * 0.9);
421
- O(gn), V(0.85);
422
- } else {
423
- const gn = d ? Math.max(400, Math.min(1200, d)) : Math.min(1e3, Math.min(e, t) * 0.9);
424
- O(gn), V(1);
425
- }
426
- };
427
- return i(), window.addEventListener("resize", i), () => window.removeEventListener("resize", i);
428
- }, [g, a, d]);
429
- const sn = (i) => [...i].sort(() => Jn() - 0.5).slice(0, 6), Qn = (i) => {
430
- T.current && T.current.abort(), T.current = new AbortController();
431
- const t = K[i].map((r) => r.src);
432
- pn(t, T.current.signal).then((r) => {
433
- t.forEach((y) => {
434
- hn.current.add(y), r.has(y) && Z.current.set(y, r.get(y));
435
- });
436
- }).catch(() => {
437
- });
438
- }, Tn = () => {
439
- if (!S) return;
440
- const i = sn(K[S]);
441
- cn(i), Hn(!0), tn(!1), Wn(1), en(0), dn([]), In([]);
442
- const e = i.map((t) => t.src);
443
- pn(e, T.current?.signal).then((t) => {
444
- e.forEach((r) => {
445
- hn.current.add(r), t.has(r) && Z.current.set(r, t.get(r));
446
- });
447
- }).catch(() => {
448
- }), Pn(i, [], !0);
449
- }, Pn = (i = B, e = jn, t = !1) => {
450
- const r = sn(i.length ? i : K[S]);
451
- let y = vn(r.length), R = r[y].name, k = 0;
452
- for (; e.includes(R) && k < 20; )
453
- y = vn(r.length), R = r[y].name, k++;
454
- if (cn(r), Cn(y), In([...e, R]), on(!1), yn(""), fn(20), G(null), S && !t) {
455
- const F = sn(K[S].filter((M) => !e.includes(M.name))).map((M) => M.src);
456
- pn(F, T.current?.signal).then((M) => {
457
- F.forEach((C) => {
458
- hn.current.add(C), M.has(C) && Z.current.set(C, M.get(C));
459
- });
460
- }).catch(() => {
461
- });
462
- }
463
- t ? (_("ready"), un(10), X(10)) : (_("memorize"), X(10));
464
- };
465
- q(() => {
466
- if (!(!A || $ || E)) {
467
- if (v === "ready")
468
- if (mn <= 0) _("memorize");
469
- else {
470
- const i = setTimeout(() => un((e) => e - 1), 1e3);
471
- return () => clearTimeout(i);
472
- }
473
- if (v === "memorize")
474
- if (Q <= 0) _("guess");
475
- else {
476
- const i = setTimeout(() => X((e) => e - 1), 1e3);
477
- return () => clearTimeout(i);
478
- }
479
- if (v === "guess") {
480
- if (nn <= 0) {
481
- on(!0), G("wrong");
482
- const e = B[P].name, t = B[P].aliases, r = [e, ...t || []].join(", ");
483
- dn((y) => [
484
- ...y,
485
- { round: Y, answer: N, correct: r, result: "wrong" }
486
- ]);
487
- return;
488
- }
489
- const i = setTimeout(() => fn((e) => e - 1), 1e3);
490
- return () => clearTimeout(i);
491
- }
492
- }
493
- }, [
494
- v,
495
- mn,
496
- Q,
497
- nn,
498
- A,
499
- $,
500
- E,
501
- B,
502
- P,
503
- Y,
504
- N
505
- ]);
506
- const Xn = () => {
507
- if (P === null || wn) return;
508
- const i = B[P].name, e = B[P].aliases, t = N.toLowerCase().trim();
509
- let r = "wrong";
510
- const y = [i, ...e || []].map((k) => k.toLowerCase()), R = [i, ...e || []].join(", ");
511
- y.includes(t) ? (en((k) => k + 1), G("correct"), r = "correct") : y.some((k) => ki(t, k) === 1) ? (en((k) => k + 0.5), G("almost"), r = "almost") : (G("wrong"), r = "wrong"), dn((k) => [
512
- ...k,
513
- { round: Y, answer: t, correct: R, result: r }
514
- ]), bn(!0), setTimeout(() => {
515
- bn(!1), on(!0);
516
- }, 600);
517
- }, ni = () => Y < D ? (Wn((i) => i + 1), Pn()) : tn(!0), ii = () => {
518
- T.current && T.current.abort(), Hn(!1), tn(!1), ln(null), J(2);
519
- }, ei = ri(() => {
520
- const i = g ?? window.innerWidth, e = a ?? window.innerHeight, t = !n && i >= 1200 && i <= 1400;
521
- return n && i > e || e < 700 && !t ? null : (
522
- // ensure logo is positioned inside the square container
523
- /* @__PURE__ */ w("div", { style: { ...o.gmLogoFixed, position: "absolute", top: 16, left: 16, zIndex: 30 }, children: /* @__PURE__ */ p("picture", { children: [
524
- /* @__PURE__ */ w(
525
- "source",
526
- {
527
- srcSet: window.origin + "/cloud/speakid/games/whatsmissing/logo.svg",
528
- type: "image/svg+xml"
529
- }
530
- ),
531
- /* @__PURE__ */ w(
532
- "img",
533
- {
534
- src: window.origin + "/cloud/speakid/games/whatsmissing/logo.png",
535
- alt: "SPEAKID Logo",
536
- style: o.gmLogoImg,
537
- loading: "lazy"
538
- }
539
- )
540
- ] }) })
541
- );
542
- }, [n, g, a]);
543
- return /* @__PURE__ */ w(
544
- "div",
545
- {
546
- ref: b,
547
- style: {
548
- width: "100%",
549
- height: "100%",
550
- display: "flex",
551
- justifyContent: "center",
552
- alignItems: "center",
553
- background: "linear-gradient(to bottom, #fff8f8 0%, #f9fafb 100%)",
554
- transition: "background 0.3s ease",
555
- overflow: "hidden",
556
- position: "absolute",
557
- top: 0,
558
- left: 0,
559
- right: 0,
560
- bottom: 0
561
- },
562
- children: /* @__PURE__ */ w(
563
- "div",
564
- {
565
- style: {
566
- width: n ? "100%" : Sn || d || 1e3,
567
- height: n ? "100%" : Sn || d || 1e3,
568
- display: "flex",
569
- justifyContent: "center",
570
- alignItems: "center",
571
- overflow: "hidden",
572
- borderRadius: n ? 0 : "20px",
573
- background: "linear-gradient(to bottom, #fff8f8 0%, #f9fafb 100%)",
574
- boxShadow: n ? "none" : "0 0 40px rgba(0,0,0,0.1)",
575
- margin: n ? "0 auto" : "unset",
576
- position: "relative",
577
- // needed so absolute logo is inside the square
578
- transform: `scale(${Gn})`
579
- // ✅ Применяем масштаб для широких экранов
580
- },
581
- children: /* @__PURE__ */ w(
582
- "div",
583
- {
584
- style: {
585
- transform: "translateZ(0)",
586
- width: "100%",
587
- height: "100%",
588
- display: "flex",
589
- justifyContent: "center",
590
- alignItems: "center"
591
- },
592
- children: /* @__PURE__ */ p("div", { id: "whats-missing-root", children: [
593
- !n && ei,
594
- !S && !A && xn === 1 && /* @__PURE__ */ p("div", { style: o.gmCenterScreen, children: [
595
- /* @__PURE__ */ w("h1", { style: o.gmHeadline1, children: "WHAT'S MISSING?" }),
596
- /* @__PURE__ */ p("div", { style: { marginTop: 24 }, children: [
597
- /* @__PURE__ */ w("p", { style: o.gmBodyS, children: "Choose number of rounds:" }),
598
- /* @__PURE__ */ w(
599
- "div",
600
- {
601
- style: {
602
- display: "flex",
603
- gap: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "6px" : "12px",
604
- marginTop: 8
605
- },
606
- children: [3, 4, 5].map((i) => /* @__PURE__ */ w(
607
- "button",
608
- {
609
- style: {
610
- ...o.gmButton,
611
- ...D === i ? o.gmButtonActive : {},
612
- padding: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "6px 10px" : "12px 24px",
613
- fontSize: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "12px" : "16px",
614
- minWidth: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "40px" : "auto"
615
- },
616
- onClick: () => Bn(i),
617
- children: i
618
- },
619
- i
620
- ))
621
- }
622
- )
623
- ] }),
624
- /* @__PURE__ */ w(
625
- "button",
626
- {
627
- style: {
628
- ...o.gmButton,
629
- marginTop: 24,
630
- padding: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "8px 16px" : "12px 24px",
631
- fontSize: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "14px" : "16px",
632
- minWidth: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "120px" : "auto"
633
- },
634
- onClick: () => J(2),
635
- children: "Play"
636
- }
637
- )
638
- ] }),
639
- !S && !A && xn === 2 && /* @__PURE__ */ p("div", { style: o.gmCenterScreen, children: [
640
- /* @__PURE__ */ w("p", { style: o.gmBodyM, children: "Select a theme:" }),
641
- /* @__PURE__ */ p("p", { style: o.gmBodyS, children: [
642
- "Rounds: ",
643
- D
644
- ] }),
645
- /* @__PURE__ */ w(
646
- "div",
647
- {
648
- style: {
649
- display: "grid",
650
- gridTemplateColumns: n ? "repeat(2, 1fr)" : "repeat(4, 1fr)",
651
- gap: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "8px" : "12px",
652
- maxWidth: n ? 280 : 420,
653
- margin: "0 auto"
654
- },
655
- children: ui.map((i) => /* @__PURE__ */ w(
656
- "button",
657
- {
658
- style: {
659
- ...o.gmButton,
660
- padding: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "8px 12px" : "10px 16px",
661
- fontSize: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "12px" : "14px"
662
- },
663
- onClick: () => {
664
- ln(i), Qn(i);
665
- },
666
- children: fi[i]
667
- },
668
- i
669
- ))
670
- }
671
- ),
672
- /* @__PURE__ */ w(
673
- "button",
674
- {
675
- style: {
676
- ...o.gmButton,
677
- marginTop: 24,
678
- padding: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "8px 16px" : "12px 24px",
679
- fontSize: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "14px" : "16px",
680
- minWidth: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "120px" : "auto"
681
- },
682
- onClick: () => J(1),
683
- children: "Back"
684
- }
685
- )
686
- ] }),
687
- S && !A && /* @__PURE__ */ p("div", { style: o.gmCenterScreen, children: [
688
- /* @__PURE__ */ p("h1", { style: o.gmHeadline1, children: [
689
- "Theme selected: ",
690
- S
691
- ] }),
692
- /* @__PURE__ */ p("p", { style: o.gmBodyM, children: [
693
- "Rounds: ",
694
- D
695
- ] }),
696
- /* @__PURE__ */ w(
697
- "button",
698
- {
699
- style: {
700
- ...o.gmButton,
701
- padding: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "8px 16px" : "12px 24px",
702
- fontSize: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "14px" : "16px",
703
- minWidth: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "120px" : "auto"
704
- },
705
- onClick: Tn,
706
- children: "▶ Start game"
707
- }
708
- )
709
- ] }),
710
- $ && /* @__PURE__ */ p("div", { style: o.gmCenterScreen, children: [
711
- /* @__PURE__ */ w(
712
- "h1",
713
- {
714
- style: {
715
- ...o.gmHeadline1,
716
- marginTop: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || l || c || x || H || W || m || u || f ? "0px" : o.gmHeadline1.marginTop,
717
- marginBottom: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || l || c || x || H || W || m || u || f ? "2px" : o.gmHeadline1.marginBottom
718
- },
719
- children: "Results"
720
- }
721
- ),
722
- /* @__PURE__ */ p(
723
- "h2",
724
- {
725
- style: {
726
- ...o.gmHeadline3,
727
- marginTop: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || l || c || x || H || W || m || u || f ? "0px" : o.gmHeadline3.marginTop,
728
- marginBottom: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || l || c || x || H || W || m || u || f ? "2px" : o.gmHeadline3.marginBottom
729
- },
730
- children: [
731
- "Your score: ",
732
- An,
733
- " / ",
734
- D
735
- ]
736
- }
737
- ),
738
- /* @__PURE__ */ w(
739
- "p",
740
- {
741
- style: {
742
- ...o.gmBodyM,
743
- color: "#10b981",
744
- marginTop: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || l || c || x || H || W || m || u || f ? "0px" : "12px",
745
- marginBottom: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || l || c || x || H || W || m || u || f ? "2px" : o.gmBodyM.marginBottom
746
- },
747
- children: "Yahoo! You did it! 🍬✨"
748
- }
749
- ),
750
- /* @__PURE__ */ p(
751
- "table",
752
- {
753
- style: {
754
- ...o.gmTable,
755
- marginTop: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || l || c || x || H || W || m || u || f ? "0px" : "20px",
756
- marginBottom: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || l || c || x || H || W || m || u || f ? "4px" : "32px"
757
- },
758
- children: [
759
- /* @__PURE__ */ w("thead", { children: /* @__PURE__ */ p("tr", { children: [
760
- /* @__PURE__ */ w("th", { children: "Round" }),
761
- /* @__PURE__ */ w("th", { children: "Your Answer" }),
762
- /* @__PURE__ */ w("th", { children: "Correct" }),
763
- /* @__PURE__ */ w("th", { children: "Result" })
764
- ] }) }),
765
- /* @__PURE__ */ w("tbody", { children: En.map((i, e) => /* @__PURE__ */ p("tr", { children: [
766
- /* @__PURE__ */ w("td", { style: o.gmTableCell, children: i.round }),
767
- /* @__PURE__ */ w("td", { style: o.gmTableCell, children: i.answer || "—" }),
768
- /* @__PURE__ */ w("td", { style: o.gmTableCell, children: i.correct }),
769
- /* @__PURE__ */ w("td", { style: o.gmTableCell, children: i.result === "correct" ? "✔ Correct" : i.result === "almost" ? "◐ Almost (0.5)" : "✘ Wrong" })
770
- ] }, e)) })
771
- ]
772
- }
773
- ),
774
- /* @__PURE__ */ p(
775
- "div",
776
- {
777
- style: {
778
- display: "flex",
779
- gap: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "6px" : "12px",
780
- marginTop: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "2px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I ? "12px" : "24px"
781
- },
782
- children: [
783
- /* @__PURE__ */ w(
784
- "button",
785
- {
786
- style: {
787
- ...o.gmButton,
788
- padding: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "6px 10px" : "12px 24px",
789
- fontSize: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "12px" : "16px",
790
- minWidth: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "80px" : "auto"
791
- },
792
- onClick: Tn,
793
- children: "🔁 Play again"
794
- }
795
- ),
796
- /* @__PURE__ */ w(
797
- "button",
798
- {
799
- style: {
800
- ...o.gmButton,
801
- padding: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "6px 10px" : "12px 24px",
802
- fontSize: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "12px" : "16px",
803
- minWidth: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "80px" : "auto"
804
- },
805
- onClick: ii,
806
- children: "⬅️ Choose theme"
807
- }
808
- )
809
- ]
810
- }
811
- )
812
- ] }),
813
- A && !$ && /* @__PURE__ */ p("div", { style: o.gmGameLayout, children: [
814
- /* @__PURE__ */ p(
815
- "div",
816
- {
817
- style: {
818
- minHeight: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "45px" : z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "50px" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "60px" : "160px",
819
- display: "flex",
820
- flexDirection: "column",
821
- justifyContent: "center",
822
- alignItems: "center",
823
- paddingTop: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "8px" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "15px" : "40px"
824
- },
825
- children: [
826
- v === "ready" && /* @__PURE__ */ p(Ln, { children: [
827
- /* @__PURE__ */ w("h1", { style: { ...o.gmHeadline1, color: "#ec4c44" }, children: "GET READY" }),
828
- /* @__PURE__ */ w("div", { style: o.gmHourglass, children: "⏳" })
829
- ] }),
830
- v === "memorize" && /* @__PURE__ */ p("p", { style: { ...o.gmBodyM, color: "#10b981" }, children: [
831
- "MEMORIZE (",
832
- Q,
833
- ")"
834
- ] }),
835
- v === "guess" && !E && /* @__PURE__ */ p("p", { style: o.gmBodyM, children: [
836
- "⏳ Time left: ",
837
- nn,
838
- "s"
839
- ] })
840
- ]
841
- }
842
- ),
843
- v !== "ready" && /* @__PURE__ */ w(
844
- "div",
845
- {
846
- style: {
847
- ...o.gmGrid,
848
- ...z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? { width: "100%" } : {},
849
- // ✅ Широкие экраны: полная ширина грида
850
- gridTemplateColumns: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "repeat(3, 1fr)" : n ? "repeat(2, 1fr)" : window.innerHeight < 700 ? "repeat(3, 1fr)" : typeof window < "u" && window.innerWidth === 1280 && window.innerHeight === 720 ? "repeat(3, 130px)" : z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "repeat(3, 150px)" : "repeat(3, 210px)",
851
- // desktop: 3 колонки фиксированного размера
852
- gridAutoRows: n && window.innerWidth > window.innerHeight ? "120px" : n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "100px" : n ? "150px" : window.innerHeight < 700 ? "140px" : typeof window < "u" && window.devicePixelRatio >= 1.25 && window.devicePixelRatio <= 1.5 ? "240px" : typeof window < "u" && window.innerWidth === 1280 && window.innerHeight === 720 ? "130px" : z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "150px" : "210px",
853
- // desktop: стандартная высота
854
- gap: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "12px" : n || window.innerHeight < 700 ? "8px" : typeof window < "u" && window.devicePixelRatio >= 1.25 && window.devicePixelRatio <= 1.5 ? "24px" : z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "12px" : "20px",
855
- justifyItems: "center",
856
- maxWidth: n && window.innerWidth > window.innerHeight ? "90%" : n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "95%" : "100%",
857
- padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "8px" : typeof window < "u" && window.devicePixelRatio >= 1.25 && window.devicePixelRatio <= 1.5 ? "20px" : z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "10px" : "16px"
858
- },
859
- children: B.map((i, e) => {
860
- const t = P === e && v === "guess" && !E;
861
- return /* @__PURE__ */ w(
862
- "div",
863
- {
864
- style: {
865
- width: "100%",
866
- height: "100%",
867
- borderRadius: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "6px" : "12px",
868
- overflow: "hidden",
869
- boxShadow: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "0 1px 4px rgba(0,0,0,0.1)" : "0 4px 12px rgba(0,0,0,0.15)",
870
- transition: "all 0.3s ease",
871
- cursor: "pointer",
872
- ...kn === "correct" && P === e ? {
873
- boxShadow: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "0 0 15px #10b981" : "0 0 20px #10b981",
874
- transform: "scale(1.03)"
875
- } : {},
876
- ...kn === "wrong" && P === e ? {
877
- boxShadow: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "0 0 15px #ef4444" : "0 0 20px #ef4444",
878
- transform: "scale(1.03)"
879
- } : {}
880
- },
881
- children: !t && (() => {
882
- const r = Z.current.get(i.src), y = r?.complete && r.src ? r.src : i.src;
883
- return /* @__PURE__ */ w(
884
- "img",
885
- {
886
- src: y,
887
- alt: i.name,
888
- fetchPriority: "high",
889
- loading: "eager",
890
- decoding: "async",
891
- style: {
892
- width: "100%",
893
- height: "100%",
894
- objectFit: "cover"
895
- }
896
- },
897
- `${i.src}-${r?.complete ? "loaded" : "pending"}`
898
- );
899
- })()
900
- },
901
- e
902
- );
903
- })
904
- }
905
- ),
906
- /* @__PURE__ */ p(
907
- "div",
908
- {
909
- style: {
910
- marginTop: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "1px" : z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "4px" : "16px",
911
- height: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "40px" : z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "50px" : "80px"
912
- },
913
- children: [
914
- v === "guess" && !E && /* @__PURE__ */ w(
915
- "div",
916
- {
917
- style: {
918
- display: "flex",
919
- flexDirection: rn ? "row" : "column",
920
- gap: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "3px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || l || c || x || H || W || m || u || f ? "8px" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "6px" : "12px",
921
- alignItems: "center",
922
- justifyContent: "center",
923
- width: "100%",
924
- maxWidth: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "270px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "400px" : "300px"
925
- },
926
- children: /* @__PURE__ */ p(Ln, { children: [
927
- /* @__PURE__ */ w(
928
- "input",
929
- {
930
- type: "text",
931
- placeholder: "Type the missing word",
932
- value: N,
933
- onChange: (i) => yn(i.target.value),
934
- style: {
935
- ...o.gmInput,
936
- width: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "170px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "250px" : "auto",
937
- padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "5px 6px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 12px" : "12px 16px",
938
- fontSize: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 ? "10px" : window.innerWidth === 896 && window.innerHeight === 414 ? "11px" : window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "10px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px",
939
- flex: rn ? "1" : "none"
940
- }
941
- }
942
- ),
943
- /* @__PURE__ */ w(
944
- "button",
945
- {
946
- style: {
947
- ...o.gmButton,
948
- marginLeft: rn ? "8px" : "0",
949
- padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "5px 8px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "6px 10px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 16px" : "12px 24px",
950
- fontSize: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "10px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "11px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px",
951
- minWidth: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "45px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "55px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "80px" : "100px",
952
- flexShrink: 0
953
- },
954
- onClick: Xn,
955
- disabled: wn,
956
- children: wn ? "..." : "Check"
957
- }
958
- )
959
- ] })
960
- }
961
- ),
962
- E && /* @__PURE__ */ w(
963
- "button",
964
- {
965
- style: {
966
- ...o.gmButton,
967
- padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "5px 8px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "6px 10px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 16px" : "12px 24px",
968
- fontSize: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "10px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "11px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px"
969
- },
970
- onClick: ni,
971
- children: "Next round"
972
- }
973
- )
974
- ]
975
- }
976
- )
977
- ] })
978
- ] })
979
- }
980
- )
981
- }
982
- )
983
- }
984
- );
985
- }
986
- export {
987
- Ti as Game,
988
- K as themes
989
- };