speakid-build-a-sentence 1.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/README.md +67 -0
- package/dist/Game.d.ts +7 -0
- package/dist/Game.d.ts.map +1 -0
- package/dist/Game.styles.d.ts +3 -0
- package/dist/Game.styles.d.ts.map +1 -0
- package/dist/components/ErrorBoundary.d.ts +19 -0
- package/dist/components/ErrorBoundary.d.ts.map +1 -0
- package/dist/hooks/useValidation.d.ts +15 -0
- package/dist/hooks/useValidation.d.ts.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/logo.png +0 -0
- package/dist/speakid-build-a-sentence.es.js +1232 -0
- package/dist/speakid-build-a-sentence.es.js.map +1 -0
- package/dist/speakid-build-a-sentence.umd.js +82 -0
- package/dist/speakid-build-a-sentence.umd.js.map +1 -0
- package/dist/utils/accessibility.d.ts +7 -0
- package/dist/utils/accessibility.d.ts.map +1 -0
- package/package.json +40 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"speakid-build-a-sentence.es.js","sources":["../node_modules/react/cjs/react-jsx-runtime.production.js","../node_modules/react/cjs/react-jsx-runtime.development.js","../node_modules/react/jsx-runtime.js","../src/Game.styles.ts","../src/hooks/useValidation.ts","../src/utils/accessibility.ts","../src/Game.tsx","../src/components/ErrorBoundary.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import { CSSProperties } from \"react\";\n\n// ===== Добавляем анимации в <head> с уникальным ID =====\nconst keyframes = `\n @keyframes magic-sentence-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n \n @keyframes magic-sentence-pulse {\n 0%, 100% { transform: scale(1); }\n 50% { transform: scale(1.05); }\n }\n \n @keyframes magic-sentence-shake {\n 0%, 100% { transform: translateX(0); }\n 25% { transform: translateX(-5px); }\n 75% { transform: translateX(5px); }\n }\n \n @keyframes magic-sentence-slideIn {\n from { transform: translateY(-20px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n }\n \n @keyframes magic-sentence-bounce {\n 0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }\n 40%, 43% { transform: translate3d(0, -8px, 0); }\n 70% { transform: translate3d(0, -4px, 0); }\n 90% { transform: translate3d(0, -2px, 0); }\n }\n \n @keyframes magic-sentence-glow {\n 0%, 100% { box-shadow: 0 0 5px rgba(76, 175, 80, 0.5); }\n 50% { box-shadow: 0 0 20px rgba(76, 175, 80, 0.8), 0 0 30px rgba(76, 175, 80, 0.6); }\n }\n`;\n\nif (typeof document !== \"undefined\" && !document.getElementById(\"magic-sentence-keyframes\")) {\n const styleTag = document.createElement(\"style\");\n styleTag.id = \"magic-sentence-keyframes\";\n styleTag.innerHTML = keyframes;\n document.head.appendChild(styleTag);\n}\n\n// ===== Анимации =====\nconst animations = {\n spin: {\n animation: \"magic-sentence-spin 1.4s linear infinite\",\n },\n pulse: {\n animation: \"magic-sentence-pulse 0.6s ease-in-out\",\n },\n shake: {\n animation: \"magic-sentence-shake 0.4s ease-in-out\",\n },\n slideIn: {\n animation: \"magic-sentence-slideIn 0.3s ease-out\",\n },\n bounce: {\n animation: \"magic-sentence-bounce 0.6s ease-in-out\",\n },\n glow: {\n animation: \"magic-sentence-glow 1s ease-in-out infinite\",\n },\n};\n\n// ===== Основные стили =====\nexport const styles: Record<string, CSSProperties> = {\n gmCenterScreen: {\n position: \"relative\",\n zIndex: 1,\n // use percent so the component fits inside the centered square container\n // (100vh caused overflow on tablets because it measured the viewport, not the container)\n minHeight: \"100%\",\n width: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"center\",\n alignItems: \"center\",\n textAlign: \"center\",\n color: \"#1f2937\",\n padding: \"24px 16px\",\n boxSizing: \"border-box\",\n transform: \"translateY(20px)\", // чуть вниз, чтобы компенсировать логотип\n },\n\n gmHeadline1: {\n fontWeight: 700,\n fontSize: \"clamp(28px, 4vw, 40px)\",\n lineHeight: \"110%\",\n },\n\n gmHeadline2: {\n fontWeight: 600,\n fontSize: \"24px\",\n lineHeight: \"120%\",\n },\n\n gmHeadline3: {\n fontWeight: 600,\n fontSize: \"18px\",\n lineHeight: \"130%\",\n },\n\n gmBodyL: {\n fontWeight: 400,\n fontSize: \"18px\",\n lineHeight: \"140%\",\n },\n\n gmBodyM: {\n fontWeight: 400,\n fontSize: \"16px\",\n lineHeight: \"140%\",\n },\n\n gmBodyS: {\n fontWeight: 400,\n fontSize: \"14px\",\n lineHeight: \"140%\",\n color: \"#6b7280\",\n },\n\n gmButton: {\n fontFamily:\n '\"Geist\", system-ui, -apple-system, \"Segoe UI\", Roboto, Arial, \"Noto Sans\"',\n fontWeight: 600,\n fontSize: \"16px\",\n padding: \"10px 16px\",\n borderRadius: \"12px\",\n border: \"1px solid #e5e7eb\",\n background: \"#ec4c44\",\n color: \"#ffffff\",\n cursor: \"pointer\",\n boxShadow: \"0 6px 18px rgba(236, 76, 68, .18)\",\n transition:\n \"transform .06s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease\",\n },\n\n gmButtonActive: {\n background: \"#333\",\n color: \"#fff\",\n },\n\n gmGameLayout: {\n position: \"relative\",\n width: \"100%\",\n // allow the layout to expand within the square container for tablets/laptops\n maxWidth: \"none\",\n // should fill the parent square, not the full viewport\n minHeight: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n textAlign: \"center\",\n color: \"#1f2937\",\n padding: \"16px 8px\",\n margin: \"0 auto\",\n },\n\n gmGrid: {\n width: \"100%\",\n // let the grid use all available space; sizing is controlled in Game.tsx\n maxWidth: \"none\",\n margin: \"0 auto\",\n display: \"grid\",\n // defaults; overridden responsively in Game.tsx\n gridTemplateColumns: \"repeat(3, 210px)\",\n gridAutoRows: \"210px\",\n gap: \"20px\",\n justifyContent: \"center\",\n },\n\n gmCard: {\n border: \"1px solid #e5e7eb\",\n borderRadius: \"16px\",\n background: \"#f9f9f9\",\n aspectRatio: \"1 / 1\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n overflow: \"hidden\",\n transition:\n \"transform .2s ease, box-shadow .2s ease, border-color .2s ease\",\n },\n\n gmCorrect: {\n border: \"2px solid #10b981\",\n boxShadow: \"0 0 18px rgba(16,185,129,.45)\",\n background: \"#ecfdf5\",\n },\n\n gmWrong: {\n border: \"2px solid #ec4c44\",\n boxShadow: \"0 0 18px rgba(236,76,68,.35)\",\n background: \"#fef2f2\",\n },\n\n gmInput: {\n padding: \"6px 10px\",\n borderRadius: \"6px\",\n border: \"1px solid #ccc\",\n fontSize: \"16px\",\n fontFamily: '\"Geist\", system-ui',\n width: \"160px\",\n },\n\n gmTable: {\n marginTop: \"20px\",\n marginBottom: \"32px\",\n borderCollapse: \"collapse\",\n width: \"100%\",\n maxWidth: \"520px\",\n tableLayout: \"fixed\",\n textAlign: \"center\",\n },\n\n gmTableCell: {\n padding: \"8px 12px\",\n borderBottom: \"1px solid #e5e7eb\",\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n },\n\n // ✅ Обновлено только для качества логотипа\n gmLogoFixed: {\n position: \"absolute\",\n top: \"16px\",\n left: \"24px\",\n width: \"120px\",\n zIndex: 10,\n pointerEvents: \"none\",\n background: \"transparent\",\n transform: \"none\",\n willChange: \"auto\",\n },\n\n gmLogoImg: {\n height: \"clamp(28px, 5vw, 40px)\",\n width: \"auto\",\n background: \"transparent\",\n backgroundImage: \"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjQwIiB2aWV3Qm94PSIwIDAgMTAwIDQwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8dGV4dCB4PSI1MCIgeT0iMjUiIGZvbnQtZmFtaWx5PSJBcmlhbCwgc2Fucy1zZXJpZiIgZm9udC1zaXplPSIyMCIgZm9udC13ZWlnaHQ9ImJvbGQiIGZpbGw9IiNlYzRjNDQiIHRleHQtYW5jaG9yPSJtaWRkbGUiPlNQRUFLSUQ8L3RleHQ+Cjwvc3ZnPgo=')\",\n backgroundSize: \"contain\",\n backgroundRepeat: \"no-repeat\",\n backgroundPosition: \"center\",\n transform: \"translateZ(0)\",\n backfaceVisibility: \"hidden\",\n WebkitFontSmoothing: \"antialiased\",\n objectFit: \"contain\",\n imageRendering: \"auto\",\n },\n\n gmReadyWrapper: {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n // use percent so the wrapper scales with the container square\n height: \"60%\",\n gap: \"16px\",\n },\n\n gmHourglass: {\n fontSize: \"42px\",\n ...animations.spin,\n },\n\n // ===== Анимационные стили =====\n ...animations,\n};","import { useState, useCallback } from 'react';\n\nexport interface ValidationError {\n type: 'length' | 'characters' | 'empty' | 'duplicate';\n message: string;\n}\n\nexport interface ValidationResult {\n isValid: boolean;\n errors: ValidationError[];\n}\n\nexport const useValidation = () => {\n const [errors, setErrors] = useState<ValidationError[]>([]);\n\n const validateSentence = useCallback((sentence: string, index: number, allSentences: string[]): ValidationResult => {\n const newErrors: ValidationError[] = [];\n\n // Проверка на пустоту\n if (!sentence.trim()) {\n newErrors.push({\n type: 'empty',\n message: 'Sentence cannot be empty'\n });\n }\n\n // Проверка длины\n if (sentence.length > 41) {\n newErrors.push({\n type: 'length',\n message: `Sentence is too long (${sentence.length}/41 characters)`\n });\n }\n\n // Проверка символов (только латиница)\n const latinRegex = /^[a-zA-Z0-9\\s.,!?;:'\"-]*$/;\n if (sentence && !latinRegex.test(sentence)) {\n newErrors.push({\n type: 'characters',\n message: 'Only Latin characters, numbers, spaces and punctuation are allowed'\n });\n }\n\n // Проверка на дубликаты\n const duplicateIndex = allSentences.findIndex((s, i) => i !== index && s.toLowerCase().trim() === sentence.toLowerCase().trim());\n if (duplicateIndex !== -1) {\n newErrors.push({\n type: 'duplicate',\n message: `Duplicate sentence (same as sentence ${duplicateIndex + 1})`\n });\n }\n\n setErrors(newErrors);\n return {\n isValid: newErrors.length === 0,\n errors: newErrors\n };\n }, []);\n\n const validateAllSentences = useCallback((sentences: string[]): ValidationResult => {\n const allErrors: ValidationError[] = [];\n \n sentences.forEach((sentence, index) => {\n const result = validateSentence(sentence, index, sentences);\n allErrors.push(...result.errors.map(error => ({\n ...error,\n message: `Sentence ${index + 1}: ${error.message}`\n })));\n });\n\n return {\n isValid: allErrors.length === 0,\n errors: allErrors\n };\n }, [validateSentence]);\n\n const clearErrors = useCallback(() => {\n setErrors([]);\n }, []);\n\n return {\n errors,\n validateSentence,\n validateAllSentences,\n clearErrors,\n };\n};\n\n","// Утилиты для улучшения доступности\n\nexport const createAriaLabel = (action: string, word?: string, context?: string): string => {\n if (word && context) {\n return `${action} word \"${word}\" ${context}`;\n }\n if (word) {\n return `${action} word \"${word}\"`;\n }\n return action;\n};\n\nexport const getRoleForElement = (type: 'button' | 'draggable' | 'droppable' | 'input'): string => {\n const roles = {\n button: 'button',\n draggable: 'button',\n droppable: 'region',\n input: 'textbox'\n };\n return roles[type];\n};\n\nexport const handleKeyDown = (\n event: React.KeyboardEvent,\n action: () => void,\n allowedKeys: string[] = ['Enter', ' ']\n) => {\n if (allowedKeys.includes(event.key)) {\n event.preventDefault();\n action();\n }\n};\n\nexport const announceToScreenReader = (message: string) => {\n // Создаем временный элемент для объявления\n const announcement = document.createElement('div');\n announcement.setAttribute('aria-live', 'polite');\n announcement.setAttribute('aria-atomic', 'true');\n announcement.style.position = 'absolute';\n announcement.style.left = '-10000px';\n announcement.style.width = '1px';\n announcement.style.height = '1px';\n announcement.style.overflow = 'hidden';\n \n document.body.appendChild(announcement);\n announcement.textContent = message;\n \n // Удаляем элемент после объявления\n setTimeout(() => {\n document.body.removeChild(announcement);\n }, 1000);\n};\n\nexport const getFocusableElements = (container: HTMLElement): HTMLElement[] => {\n const focusableSelectors = [\n 'button:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n '[role=\"button\"]:not([disabled])'\n ].join(', ');\n \n return Array.from(container.querySelectorAll(focusableSelectors));\n};\n\nexport const trapFocus = (container: HTMLElement) => {\n const focusableElements = getFocusableElements(container);\n \n if (focusableElements.length === 0) return;\n \n const firstElement = focusableElements[0];\n const lastElement = focusableElements[focusableElements.length - 1];\n \n const handleTabKey = (e: KeyboardEvent) => {\n if (e.key === 'Tab') {\n if (e.shiftKey) {\n if (document.activeElement === firstElement) {\n lastElement.focus();\n e.preventDefault();\n }\n } else {\n if (document.activeElement === lastElement) {\n firstElement.focus();\n e.preventDefault();\n }\n }\n }\n };\n \n container.addEventListener('keydown', handleTabKey);\n \n // Фокусируем первый элемент\n firstElement.focus();\n \n // Возвращаем функцию для очистки\n return () => {\n container.removeEventListener('keydown', handleTabKey);\n };\n};\n\n","// ======================\n// MAGIC SENTENCE GAME (SPEAKID)\n// React 18 + TypeScript + Vite\n// Адаптивная верстка для всех устройств\n// ======================\n\nimport React, { useState, useEffect, useMemo, useRef } from \"react\";\nimport { styles } from \"./Game.styles\";\nimport { ErrorBoundary } from \"./components/ErrorBoundary\";\nimport { useValidation } from \"./hooks/useValidation\";\nimport { createAriaLabel, handleKeyDown, announceToScreenReader } from \"./utils/accessibility\";\n\ntype Stage = \"select\" | \"time\" | \"type\" | \"getready\" | \"play\" | \"results\";\ntype Token = { id: string; text: string };\n\n// ✅ базовый reset\nconst globalReset = () => {\n const style = document.createElement(\"style\");\n style.textContent = `\n #magic-sentence-root, #magic-sentence-root * {\n box-sizing: border-box;\n font-family: \"Geist\", system-ui, -apple-system, \"Segoe UI\", Roboto, Arial, sans-serif;\n }\n #magic-sentence-root img {\n max-width: 100%;\n height: auto;\n display: block;\n user-select: none;\n }\n html, body {\n margin: 0 !important;\n padding: 0 !important;\n width: 100% !important;\n height: 100% !important;\n overflow: hidden !important;\n zoom: 1 !important;\n }\n #root {\n margin: 0 !important;\n padding: 0 !important;\n width: 100% !important;\n height: 100% !important;\n overflow: hidden !important;\n }\n `;\n document.head.appendChild(style);\n};\n\nconst shuffle = (arr: string[]) => [...arr].sort(() => Math.random() - 0.5);\n\nexport interface GameProps {\n logoUrl?: string;\n showLogo?: boolean;\n baseURL?: string;\n}\n\nexport default function Game({ logoUrl, showLogo = true, baseURL }: GameProps = {}) {\n const containerRef = useRef<HTMLDivElement>(null);\n \n // Новые хуки\n const { validateAllSentences, errors: validationErrors } = useValidation();\n\n // Функция для определения нужно ли переносить слова\n const shouldWrapWords = () => {\n // Переносим слова на всех мобильных устройствах\n return isMobile || window.innerWidth < 768;\n };\n\n // Универсальная функция для определения мобильных устройств\n const isMobileDevice = () => {\n return isMobile || \n window.innerWidth < 768 || \n (window.innerWidth >= 320 && window.innerWidth <= 932 && window.innerHeight >= 390 && window.innerHeight <= 932);\n };\n\n // Вспомогательная функция для мобильных размеров кнопок\n const getMobileButtonStyles = (type: 'small' | 'medium' | 'large' = 'medium') => {\n if (!isMobileDevice()) {\n return {\n padding: \"12px 24px\",\n fontSize: \"16px\",\n minWidth: \"auto\"\n };\n }\n\n switch (type) {\n case 'small':\n return {\n padding: \"4px 6px\",\n fontSize: \"9px\",\n minWidth: \"40px\"\n };\n case 'medium':\n return {\n padding: \"5px 8px\",\n fontSize: \"10px\",\n minWidth: \"50px\"\n };\n case 'large':\n return {\n padding: \"6px 10px\",\n fontSize: \"11px\",\n minWidth: \"60px\"\n };\n }\n };\n\n useEffect(() => {\n globalReset();\n return () => {\n document.body.style.overflow = \"\";\n };\n }, []);\n\n const [stage, setStage] = useState<Stage>(\"select\");\n const [rounds, setRounds] = useState<number | null>(null);\n const [timePerRound, setTimePerRound] = useState<number | null>(null);\n const [sentences, setSentences] = useState<string[]>([]);\n const [currentRound, setCurrentRound] = useState(0);\n const [words, setWords] = useState<Token[]>([]);\n const [selected, setSelected] = useState<Token[]>([]);\n const [timeLeft, setTimeLeft] = useState(20);\n const [score, setScore] = useState(0);\n const [countdown, setCountdown] = useState<number | null>(null);\n const [resultType, setResultType] = useState<\"correct\" | \"almost\" | \"wrong\" | null>(null);\n const [timeExpired, setTimeExpired] = useState(false);\n const [bestScore, setBestScore] = useState<number>(\n Number(localStorage.getItem(\"magicSentenceBest\")) || 0\n );\n const timerRef = useRef<number | null>(null);\n const [hover, setHover] = useState<{ list: ListName | null; index: number | null; side: \"left\" | \"right\" | null }>({ list: null, index: null, side: null });\n\n // Адаптивность\n const [isMobile, setIsMobile] = useState(false);\n const [scale, setScale] = useState(1);\n const [containerSize, setContainerSize] = useState<number | null>(null);\n const [isDesktopLayout, setIsDesktopLayout] = useState(false);\n const [isIPadMiniPortrait, setIsIPadMiniPortrait] = useState(false);\n const [isIPadMiniLandscape, setIsIPadMiniLandscape] = useState(false);\n const [isIPadAirPortrait, setIsIPadAirPortrait] = useState(false);\n const [isIPadAirLandscape, setIsIPadAirLandscape] = useState(false);\n const [isSurfaceDuoPortrait, setIsSurfaceDuoPortrait] = useState(false);\n const [isSurfaceDuoLandscape, setIsSurfaceDuoLandscape] = useState(false);\n const [isIPadProPortrait, setIsIPadProPortrait] = useState(false);\n const [isIPadProLandscape, setIsIPadProLandscape] = useState(false);\n\n // ✅ адаптив под мобилки, планшеты и десктоп\n useEffect(() => {\n const resize = () => {\n const width = window.innerWidth;\n const height = window.innerHeight;\n const mobile = width < 768 || (width === 926 && height === 428) || (width === 932 && height === 430);\n const isLandscape = (width > height && mobile) || (width === 926 && height === 428) || (width === 932 && height === 430);\n const isSmallHeight = height < 700;\n \n // iPad размеры\n const isIPadMiniPortrait = width === 768 && height === 1024;\n const isIPadMiniLandscape = width === 1024 && height === 768;\n const isIPadAirPortrait = width === 820 && height === 1180;\n const isIPadAirLandscape = width === 1180 && height === 820;\n \n // Surface DUO размеры\n const isSurfaceDuoPortrait = width === 540 && height === 720;\n const isSurfaceDuoLandscape = width === 720 && height === 540;\n \n // iPad Pro размеры\n const isIPadProPortrait = width === 1024 && height === 1366;\n const isIPadProLandscape = width === 1366 && height === 1024;\n \n // Десктопные разрешения\n const desktopLayout = width >= 1200 && height >= 600 && !mobile;\n setIsDesktopLayout(desktopLayout);\n \n // Установка состояний для iPad и Surface DUO\n setIsIPadMiniPortrait(isIPadMiniPortrait);\n setIsIPadMiniLandscape(isIPadMiniLandscape);\n setIsIPadAirPortrait(isIPadAirPortrait);\n setIsIPadAirLandscape(isIPadAirLandscape);\n setIsSurfaceDuoPortrait(isSurfaceDuoPortrait);\n setIsSurfaceDuoLandscape(isSurfaceDuoLandscape);\n setIsIPadProPortrait(isIPadProPortrait);\n setIsIPadProLandscape(isIPadProLandscape);\n \n setIsMobile(mobile);\n\n // ✅ Адаптивные размеры контейнера\n if (mobile) {\n setContainerSize(null);\n setScale(1);\n } else if (isSmallHeight) {\n setContainerSize(null);\n setScale(1);\n } else {\n const minSize = 400;\n const maxSize = 1200;\n const finalSize = Math.min(1000, Math.min(width, height) * 0.9);\n setContainerSize(finalSize);\n setScale(1);\n }\n };\n resize();\n window.addEventListener(\"resize\", resize);\n return () => window.removeEventListener(\"resize\", resize);\n }, []);\n\n // =========================\n // DND HELPERS\n // =========================\n type ListName = \"bank\" | \"selected\";\n type DragPayload = { from: ListName; id: string };\n\n const moveToken = (\n from: ListName,\n to: ListName,\n id: string,\n insertIndex: number | null\n ) => {\n // Блокируем перемещение если время истекло\n if (timeExpired) return;\n\n let nextWords = [...words];\n let nextSelected = [...selected];\n\n const takeFrom = from === \"bank\" ? nextWords : nextSelected;\n const putTo = to === \"bank\" ? nextWords : nextSelected;\n\n const idx = takeFrom.findIndex((t) => t.id === id);\n if (idx === -1) return;\n const [token] = takeFrom.splice(idx, 1);\n\n let targetIndex = insertIndex;\n if (\n from === to &&\n targetIndex !== null &&\n targetIndex !== undefined\n ) {\n if (targetIndex > idx) targetIndex = targetIndex - 1;\n }\n\n if (\n targetIndex === null ||\n targetIndex === undefined ||\n targetIndex < 0 ||\n targetIndex > putTo.length\n ) {\n putTo.push(token);\n } else {\n putTo.splice(targetIndex, 0, token);\n }\n\n if (from === \"bank\") nextWords = takeFrom; else nextSelected = takeFrom;\n if (to === \"bank\") nextWords = putTo; else nextSelected = putTo;\n\n setWords(nextWords);\n setSelected(nextSelected);\n };\n\n const handleDropTo = (\n e: React.DragEvent,\n to: ListName,\n insertIndex: number | null\n ) => {\n e.preventDefault();\n \n // Блокируем drop если время истекло\n if (timeExpired) {\n setHover({ list: null, index: null, side: null });\n return;\n }\n\n const raw = e.dataTransfer.getData(\"application/x-token\") ||\n (() => {\n const fallbackId = e.dataTransfer.getData(\"text/plain\");\n if (!fallbackId) return \"\";\n const inBank = words.some((t) => t.id === fallbackId);\n const inSelected = selected.some((t) => t.id === fallbackId);\n const from: ListName | null = inBank ? \"bank\" : inSelected ? \"selected\" : null;\n return from ? JSON.stringify({ from, id: fallbackId }) : \"\";\n })();\n if (!raw) return;\n try {\n const payload = JSON.parse(raw) as DragPayload;\n if (!payload || !payload.id || !payload.from) return;\n moveToken(payload.from, to, payload.id, insertIndex);\n } catch {\n // ignore bad payload\n }\n setHover({ list: null, index: null, side: null });\n };\n\n // =========================\n // START / SETUP\n // =========================\n const handleSelect = (num: number) => {\n setRounds(num);\n setSentences(Array(num).fill(\"\"));\n setStage(\"time\");\n };\n\n const handleTimeSelect = (time: number) => {\n setTimePerRound(time);\n setStage(\"type\");\n };\n\n const handleChange = (index: number, value: string) => {\n // Ограничение на 41 символ (включая пробелы и точку)\n if (value.length > 41) {\n return;\n }\n \n // Проверка на латинские символы (a-z, A-Z, пробелы, цифры, знаки препинания)\n const latinRegex = /^[a-zA-Z0-9\\s.,!?;:'\"-]*$/;\n if (value && !latinRegex.test(value)) {\n return; // Не сохраняем, если есть нелатинские символы\n }\n \n const updated = [...sentences];\n updated[index] = value;\n setSentences(updated);\n \n // Валидация при вводе\n const validation = validateAllSentences(updated);\n if (!validation.isValid) {\n console.warn('Validation errors:', validation.errors);\n }\n };\n\n const normalizeSentence = (s: string) => s.trim().replace(/\\s+/g, \" \");\n\n // Адаптивный размер шрифта в зависимости от количества слов\n const getAdaptiveFontSize = (wordCount: number) => {\n if (wordCount <= 3) return 20;\n if (wordCount <= 5) return 18;\n if (wordCount <= 7) return 16;\n if (wordCount <= 9) return 14;\n return 12;\n };\n\n const startGame = () => {\n const hasEmpty = sentences.some((s) => s.trim().length === 0);\n if (hasEmpty) {\n return;\n }\n setSentences((prev) => prev.map((s) => normalizeSentence(s)));\n setScore(0);\n setCurrentRound(0);\n setCountdown(null); // Убираем цифровой отсчет\n setStage(\"getready\");\n };\n\n // GET READY с 3-секундной задержкой\n useEffect(() => {\n if (stage === \"getready\") {\n const t = setTimeout(() => startRound(0), 3000); // 3 секунды задержки\n return () => clearTimeout(t);\n }\n }, [stage]);\n\n const startRound = (index: number) => {\n const target = sentences[index];\n if (!target) return;\n const shuffled = shuffle(target\n .trim()\n .split(/\\s+/)\n .filter(Boolean)\n );\n const tokens: Token[] = shuffled.map((w, i) => ({\n id: `${Date.now()}-${index}-${i}-${Math.random().toString(36).slice(2)}`,\n text: w,\n }));\n setWords(tokens);\n setSelected([]);\n setCurrentRound(index);\n setTimeLeft(timePerRound || 20); // Используем выбранное время\n setResultType(null); // Сбрасываем результат\n setTimeExpired(false); // Сбрасываем состояние истечения времени\n setStage(\"play\");\n };\n\n // TIMER\n useEffect(() => {\n if (stage === \"play\" && !timeExpired) {\n if (timerRef.current !== null) window.clearTimeout(timerRef.current);\n if (timeLeft > 0) {\n timerRef.current = window.setTimeout(() => setTimeLeft((t) => t - 1), 1000);\n } else {\n // Время истекло - показываем результат и кнопку NEXT\n setTimeExpired(true);\n // Вызываем handleNext с manual=false для подсчета результата\n const correct = sentences[currentRound];\n const correctWords = correct.trim().split(/\\s+/);\n const selectedTexts = selected.map((t) => t.text);\n \n // Считаем ошибки: недостающие слова + лишние слова + неправильный порядок\n const missingWords = correctWords.filter(word => !selectedTexts.includes(word)).length;\n const extraWords = selectedTexts.filter(word => !correctWords.includes(word)).length;\n const wrongOrder = correctWords.filter((w, i) => w !== selectedTexts[i]).length;\n \n // Общее количество ошибок = недостающие + лишние + неправильный порядок\n const errors = missingWords + extraWords + wrongOrder;\n\n // Показываем результат\n if (errors === 0) {\n setResultType(\"correct\");\n playSound(\"correct\");\n announceToScreenReader(\"Correct! Well done!\");\n } else if (errors === 1) {\n setResultType(\"almost\");\n playSound(\"half\");\n announceToScreenReader(\"Almost correct! Just one mistake.\");\n } else {\n setResultType(\"wrong\");\n playSound(\"wrong\");\n announceToScreenReader(\"Not quite right. Keep trying!\");\n }\n }\n }\n return () => {\n if (timerRef.current !== null) window.clearTimeout(timerRef.current);\n };\n }, [stage, timeLeft, timeExpired, sentences, currentRound, selected]);\n\n // =========================\n // SCORING / NEXT ROUND\n // =========================\n const handleNext = (manual = true) => {\n // Если время истекло и это ручное нажатие NEXT, переходим к следующему раунду\n if (timeExpired && manual) {\n if (currentRound + 1 < (rounds || 0)) {\n startRound(currentRound + 1);\n } else {\n setStage(\"results\");\n setTimeout(() => triggerConfetti(), 600);\n }\n return;\n }\n\n // Если время не истекло, обрабатываем ручное нажатие\n if (manual && !timeExpired) {\n const correct = sentences[currentRound];\n const correctWords = correct.trim().split(/\\s+/);\n const selectedTexts = selected.map((t) => t.text);\n \n // Считаем ошибки: недостающие слова + лишние слова + неправильный порядок\n const missingWords = correctWords.filter(word => !selectedTexts.includes(word)).length;\n const extraWords = selectedTexts.filter(word => !correctWords.includes(word)).length;\n const wrongOrder = correctWords.filter((w, i) => w !== selectedTexts[i]).length;\n \n // Общее количество ошибок = недостающие + лишние + неправильный порядок\n const errors = missingWords + extraWords + wrongOrder;\n\n if (errors === 0 && timeLeft > 0) {\n setScore((s) => s + 1);\n setResultType(\"correct\");\n playSound(\"correct\");\n announceToScreenReader(\"Correct! Well done!\");\n } else if (errors === 1) {\n setScore((s) => s + 0.5);\n setResultType(\"almost\");\n playSound(\"half\");\n announceToScreenReader(\"Almost correct! Just one mistake.\");\n } else {\n setResultType(\"wrong\");\n playSound(\"wrong\");\n announceToScreenReader(\"Not quite right. Keep trying!\");\n }\n\n // Переходим к следующему раунду\n if (currentRound + 1 < (rounds || 0)) {\n setTimeout(() => startRound(currentRound + 1), 800);\n } else {\n setStage(\"results\");\n setTimeout(() => triggerConfetti(), 600);\n }\n }\n };\n\n // =========================\n // SAVE BEST SCORE\n // =========================\n useEffect(() => {\n if (stage === \"results\" && score > bestScore) {\n setBestScore(score);\n localStorage.setItem(\"magicSentenceBest\", String(score));\n }\n }, [stage, score, bestScore]);\n\n // =========================\n // SOUND EFFECTS\n // =========================\n const playSound = (type: \"start\" | \"click\" | \"correct\" | \"half\" | \"wrong\") => {\n const ctx = new (window.AudioContext || (window as any).webkitAudioContext)();\n const osc = ctx.createOscillator();\n const gain = ctx.createGain();\n osc.connect(gain);\n gain.connect(ctx.destination);\n\n switch (type) {\n case \"start\": osc.frequency.value = 500; break;\n case \"click\": osc.frequency.value = 800; break;\n case \"correct\": osc.frequency.value = 1000; break;\n case \"half\": osc.frequency.value = 700; break;\n case \"wrong\": osc.frequency.value = 200; break;\n }\n gain.gain.setValueAtTime(0.1, ctx.currentTime);\n osc.start();\n osc.stop(ctx.currentTime + 0.2);\n };\n\n // =========================\n // CONFETTI EFFECT\n // =========================\n const triggerConfetti = () => {\n const duration = 2500;\n const end = Date.now() + duration;\n const colors = [\"#ec4c44\", \"#f7c948\", \"#6fcf97\", \"#56ccf2\", \"#bb6bd9\"];\n\n const canvas = document.createElement(\"canvas\");\n const ctx = canvas.getContext(\"2d\")!;\n canvas.width = window.innerWidth;\n canvas.height = window.innerHeight;\n canvas.style.position = \"fixed\";\n canvas.style.top = \"0\";\n canvas.style.left = \"0\";\n canvas.style.pointerEvents = \"none\";\n document.body.appendChild(canvas);\n\n const pieces = Array.from({ length: 100 }).map(() => ({\n x: Math.random() * canvas.width,\n y: Math.random() * canvas.height - canvas.height,\n size: 6 + Math.random() * 6,\n color: colors[Math.floor(Math.random() * colors.length)],\n speed: 2 + Math.random() * 4,\n tilt: Math.random() * 2 * Math.PI,\n }));\n\n const draw = () => {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n pieces.forEach((p) => {\n ctx.fillStyle = p.color;\n ctx.beginPath();\n ctx.ellipse(p.x, p.y, p.size, p.size / 2, p.tilt, 0, 2 * Math.PI);\n ctx.fill();\n p.y += p.speed;\n p.x += Math.sin(p.tilt);\n });\n if (Date.now() < end) requestAnimationFrame(draw);\n else document.body.removeChild(canvas);\n };\n draw();\n };\n\n // =========================\n // RENDER SCREENS\n // =========================\n const renderSelect = () => (\n <div style={styles.gmCenterScreen}>\n <h1 style={styles.gmHeadline1}>MAGIC SENTENCE</h1>\n <p style={styles.gmBodyM}>Select number of rounds</p>\n <div style={{ \n display: \"flex\", \n gap: isMobileDevice() ? \"8px\" : \"16px\",\n justifyContent: \"center\" \n }}>\n {[3, 4, 5].map((num) => (\n <button \n key={num} \n onClick={() => handleSelect(num)} \n style={{\n ...styles.gmButton,\n ...getMobileButtonStyles('medium')\n }}\n >\n {num} ROUNDS\n </button>\n ))}\n </div>\n </div>\n );\n\n const renderTime = () => (\n <div style={styles.gmCenterScreen}>\n <h1 style={styles.gmHeadline1}>MAGIC SENTENCE</h1>\n <p style={styles.gmBodyM}>Select time per round</p>\n <div style={{ \n display: \"flex\", \n gap: isMobileDevice() ? \"8px\" : \"16px\",\n justifyContent: \"center\" \n }}>\n {[15, 20, 30].map((time) => (\n <button \n key={time} \n onClick={() => handleTimeSelect(time)} \n style={{\n ...styles.gmButton,\n ...getMobileButtonStyles('medium')\n }}\n >\n {time}s\n </button>\n ))}\n </div>\n </div>\n );\n\n const renderType = () => (\n <div style={styles.gmCenterScreen}>\n <h2 style={{...styles.gmBodyM, marginBottom: \"0px\"}}>\n Type down {rounds} sentence{rounds && rounds > 1 ? \"s\" : \"\"} for your student\n </h2>\n <p style={{...styles.gmBodyS, marginBottom: \"16px\", marginTop: \"0px\", color: \"#6b7280\"}}>\n Maximum 41 characters per sentence\n </p>\n <div style={{ \n display: \"flex\", \n flexDirection: \"column\", \n gap: 12, \n width: \"auto\", // Автоматическая ширина по содержимому\n minWidth: \"fit-content\", // Минимальная ширина по содержимому\n maxWidth: \"600px\" // Ограничиваем максимальную ширину\n }}>\n {sentences.map((text, i) => (\n <input\n key={i}\n value={text}\n placeholder={`Sentence ${i + 1}`}\n onChange={(e) => handleChange(i, e.target.value)}\n style={{\n ...styles.gmInput,\n padding: isMobileDevice() ? \"8px 12px\" : \"12px 16px\",\n fontSize: isMobileDevice() ? \"14px\" : \"16px\",\n width: \"100%\", // Поля теперь будут шире благодаря увеличенной ширине контейнера\n textAlign: \"center\" // Центрируем placeholder текст\n }}\n />\n ))}\n </div>\n <button\n onClick={startGame}\n disabled={sentences.some((s) => s.trim().length === 0)}\n style={{\n ...styles.gmButton,\n marginTop: 30,\n background: sentences.some((s) => s.trim().length === 0) ? \"#ccc\" : \"#ec4c44\",\n cursor: sentences.some((s) => s.trim().length === 0) ? \"not-allowed\" : \"pointer\",\n ...getMobileButtonStyles('large')\n }}\n >\n PLAY\n </button>\n </div>\n );\n\n const renderGetReady = () => (\n <div style={styles.gmReadyWrapper}>\n <h1 style={{ \n ...styles.gmHeadline1,\n fontSize: isMobileDevice() ? \"36px\" : \"72px\", \n color: \"#ec4c44\", \n marginBottom: \"20px\",\n animation: \"pulse 1s ease-in-out infinite\"\n }}>\n GET READY\n </h1>\n <div style={styles.gmHourglass}>⏳</div>\n </div>\n );\n\n const renderPlay = () => (\n <div style={styles.gmGameLayout}>\n <h2 style={{ \n marginBottom: isMobileDevice() ? \"5px\" : \"10px\",\n fontSize: isMobileDevice() ? \"16px\" : \"20px\"\n }}>\n Round {currentRound + 1}/{rounds} — {timeExpired ? \"TIME'S UP!\" : `Time: ${timeLeft}s`}\n </h2>\n\n {/* Progress bar */}\n <div\n style={{\n width: \"60%\",\n height: isMobileDevice() ? \"8px\" : \"14px\",\n borderRadius: 8,\n background: \"#eee\",\n overflow: \"hidden\",\n marginBottom: isMobileDevice() ? \"10px\" : \"20px\",\n }}\n >\n <div\n style={{\n height: \"100%\",\n width: `${(timeLeft / (timePerRound || 20)) * 100}%`,\n background: timeLeft <= 5 ? \"#ec4c44\" : \"#4caf50\",\n transition: \"width 1s linear\",\n }}\n ></div>\n </div>\n\n {/* Word bank */}\n <div\n onDragOver={(e) => e.preventDefault()}\n onDrop={(e) => handleDropTo(e, \"bank\", null)}\n style={{\n display: \"flex\",\n flexWrap: shouldWrapWords() ? \"wrap\" : \"nowrap\",\n gap: isMobile || window.innerWidth < 768 ? \"6px\" : \"10px\",\n justifyContent: \"center\",\n marginBottom: isMobile || window.innerWidth < 768 ? \"15px\" : \"30px\",\n padding: isMobile || window.innerWidth < 768 ? \"5px\" : \"10px\",\n width: \"100%\",\n boxSizing: \"border-box\"\n }}\n >\n {words.map((t, idx) => (\n <div\n key={t.id}\n draggable={!timeExpired}\n role=\"button\"\n tabIndex={timeExpired ? -1 : 0}\n aria-label={timeExpired ? `Word: ${t.text} (time expired)` : createAriaLabel(\"Drag word\", t.text, \"to build sentence\")}\n onDragStart={(e) => {\n if (timeExpired) {\n e.preventDefault();\n return;\n }\n e.dataTransfer.setData(\n \"application/x-token\",\n JSON.stringify({ from: \"bank\", id: t.id })\n );\n e.dataTransfer.setData(\"text/plain\", t.id);\n announceToScreenReader(`Dragging word: ${t.text}`);\n }}\n onKeyDown={(e) => {\n if (timeExpired) return;\n handleKeyDown(e, () => moveToken(\"bank\", \"selected\", t.id, null));\n }}\n onDragOver={(e) => e.preventDefault()}\n onDrop={(e) => {\n const rect = (e.currentTarget as HTMLDivElement).getBoundingClientRect();\n const mid = rect.left + rect.width / 2;\n const insertIndex = e.clientX > mid ? idx + 1 : idx;\n setHover({ list: null, index: null, side: null });\n e.stopPropagation();\n handleDropTo(e, \"bank\", insertIndex);\n }}\n onDragEnter={(e) => {\n if (timeExpired) return;\n const rect = (e.currentTarget as HTMLDivElement).getBoundingClientRect();\n const mid = rect.left + rect.width / 2;\n setHover({ list: \"bank\", index: idx, side: e.clientX > mid ? \"right\" : \"left\" });\n }}\n onDragLeave={() => setHover({ list: null, index: null, side: null })}\n onClick={() => {\n if (timeExpired) return;\n moveToken(\"bank\", \"selected\", t.id, null);\n }}\n style={{\n padding: isMobile || window.innerWidth < 768 ? \"6px 10px\" : \"10px 16px\",\n borderRadius: isMobile || window.innerWidth < 768 ? \"6px\" : \"10px\",\n border: \"1px solid #ccc\",\n background: timeExpired ? \"#f0f0f0\" : \"#f9f9f9\",\n cursor: timeExpired ? \"not-allowed\" : \"pointer\",\n fontSize: isMobile || window.innerWidth < 768 ? \"12px\" : \"18px\",\n borderLeft: hover.list === \"bank\" && hover.index === idx && hover.side === \"left\" ? \"3px solid #3b82f6\" : \"1px solid #ccc\",\n borderRight: hover.list === \"bank\" && hover.index === idx && hover.side === \"right\" ? \"3px solid #3b82f6\" : \"1px solid #ccc\",\n flexShrink: 0,\n flexBasis: \"auto\",\n opacity: timeExpired ? 0.6 : 1,\n transition: \"opacity 0.3s ease\",\n }}\n >\n {t.text}\n </div>\n ))}\n </div>\n\n {/* Selected sentence */}\n <div\n onDragOver={(e) => e.preventDefault()}\n onDrop={(e) => handleDropTo(e, \"selected\", null)}\n style={{\n minHeight: isMobile || window.innerWidth < 768 ? \"50px\" : \"70px\",\n width: \"auto\", // Автоматическая ширина в зависимости от содержимого\n maxWidth: \"none\", // Убираем ограничение максимальной ширины\n minWidth: \"245px\", // Минимальная ширина для растягивания\n border: resultType === \"correct\" ? \"2px dashed #4caf50\" : \n resultType === \"almost\" ? \"2px dashed #ff9800\" : \n resultType === \"wrong\" ? \"2px dashed #f44336\" : \"2px dashed #ccc\",\n borderRadius: isMobile || window.innerWidth < 768 ? \"8px\" : \"12px\",\n padding: isMobile || window.innerWidth < 768 ? \"8px\" : \"12px\",\n display: \"flex\",\n flexWrap: shouldWrapWords() ? \"wrap\" : \"nowrap\",\n alignItems: \"center\",\n justifyContent: \"center\",\n fontSize: `${getAdaptiveFontSize(selected.length)}px`,\n background: resultType === \"correct\" ? \"#e8f5e8\" : \n resultType === \"almost\" ? \"#fff3e0\" : \n resultType === \"wrong\" ? \"#ffebee\" : \"#fafafa\",\n overflowX: shouldWrapWords() ? \"hidden\" : \"auto\",\n whiteSpace: shouldWrapWords() ? \"normal\" : \"nowrap\",\n }}\n >\n {selected.map((t, idx) => (\n <span\n key={t.id}\n draggable={!timeExpired}\n onDragStart={(e) => {\n if (timeExpired) {\n e.preventDefault();\n return;\n }\n e.dataTransfer.setData(\n \"application/x-token\",\n JSON.stringify({ from: \"selected\", id: t.id })\n );\n e.dataTransfer.setData(\"text/plain\", t.id);\n }}\n onDragOver={(e) => e.preventDefault()}\n onDrop={(e) => {\n const rect = (e.currentTarget as HTMLSpanElement).getBoundingClientRect();\n const mid = rect.left + rect.width / 2;\n const insertIndex = e.clientX > mid ? idx + 1 : idx;\n setHover({ list: null, index: null, side: null });\n e.stopPropagation();\n handleDropTo(e, \"selected\", insertIndex);\n }}\n onDragEnter={(e) => {\n if (timeExpired) return;\n const rect = (e.currentTarget as HTMLSpanElement).getBoundingClientRect();\n const mid = rect.left + rect.width / 2;\n setHover({ list: \"selected\", index: idx, side: e.clientX > mid ? \"right\" : \"left\" });\n }}\n onDragLeave={() => setHover({ list: null, index: null, side: null })}\n onClick={() => {\n if (timeExpired) return;\n moveToken(\"selected\", \"bank\", t.id, null);\n }}\n title={timeExpired ? \"Time expired\" : \"Click to remove back to bank\"}\n style={{\n padding: isMobileDevice() ? \"4px 6px\" : \"6px 10px\",\n margin: isMobileDevice() ? \"2px\" : \"4px\",\n borderRadius: isMobileDevice() ? \"4px\" : \"8px\",\n background: timeExpired ? \"#f0f0f0\" : \"#ffe9e7\",\n border: timeExpired ? \"1px solid #ccc\" : \"1px solid #ec4c44\",\n borderLeft: hover.list === \"selected\" && hover.index === idx && hover.side === \"left\" ? \"3px solid #3b82f6\" : undefined,\n borderRight: hover.list === \"selected\" && hover.index === idx && hover.side === \"right\" ? \"3px solid #3b82f6\" : undefined,\n cursor: timeExpired ? \"not-allowed\" : \"pointer\",\n userSelect: \"none\",\n fontSize: `${getAdaptiveFontSize(selected.length)}px`, // Адаптивный размер шрифта для слов\n fontFamily: '\"Roboto\", system-ui, -apple-system, \"Segoe UI\", Roboto, Arial, sans-serif', // Более плотный шрифт\n whiteSpace: \"nowrap\", // Запрещаем перенос слов\n opacity: timeExpired ? 0.6 : 1,\n transition: \"opacity 0.3s ease\",\n }}\n >\n {t.text}\n </span>\n ))}\n </div>\n\n <button\n onClick={() => handleNext(true)}\n disabled={!timeExpired && selected.length === 0}\n style={{\n marginTop: isMobileDevice() ? \"15px\" : \"30px\",\n fontSize: isMobileDevice() ? \"14px\" : \"20px\",\n padding: isMobileDevice() ? \"6px 12px\" : \"10px 24px\",\n borderRadius: isMobileDevice() ? \"8px\" : \"12px\",\n background: (timeExpired || selected.length > 0) ? \"#ec4c44\" : \"#ccc\",\n color: \"white\",\n border: \"none\",\n cursor: (timeExpired || selected.length > 0) ? \"pointer\" : \"not-allowed\",\n }}\n >\n {timeExpired ? \"NEXT\" : \"NEXT\"}\n </button>\n </div>\n );\n\n const renderResults = () => (\n <div style={styles.gmCenterScreen}>\n <h1 style={{\n ...styles.gmHeadline1,\n marginTop: (isMobile && 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) || isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape ? \"0px\" : \"0px\",\n marginBottom: (isMobile && 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) || isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape ? \"2px\" : \"10px\",\n fontSize: (isMobile && 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) ? \"32px\" : \"clamp(28px, 4vw, 40px)\"\n }}>\n Game Over 🎯\n </h1>\n <h2 style={{\n ...styles.gmHeadline2,\n marginTop: (isMobile && 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) || isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape ? \"0px\" : \"0px\",\n marginBottom: (isMobile && 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) || isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape ? \"2px\" : \"16px\",\n fontSize: (isMobile && 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) ? \"18px\" : \"24px\"\n }}>\n Your score: {score} out of {rounds}\n </h2>\n <p style={{ \n ...styles.gmBodyM, \n color: \"#10b981\", \n marginTop: (isMobile && 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) || isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape ? \"0px\" : \"12px\",\n marginBottom: (isMobile && 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) || isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape ? \"2px\" : \"16px\",\n fontSize: (isMobile && 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\"\n }}>\n Best score: {bestScore}\n </p>\n\n <div style={{ \n display: \"flex\", \n gap: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && 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\", \n marginTop: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && 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) || isDesktopLayout ? \"12px\" : \"24px\"\n }}>\n <button\n onClick={() => {\n triggerConfetti();\n playSound(\"start\");\n setTimeout(() => {\n setStage(\"getready\");\n setCountdown(null);\n setTimeExpired(false);\n }, 800);\n }}\n style={{\n ...styles.gmButton,\n ...getMobileButtonStyles('medium')\n }}\n >\n 🔁 Play again\n </button>\n\n <button\n onClick={() => {\n playSound(\"click\");\n setStage(\"select\");\n setRounds(null);\n setTimePerRound(null);\n setSentences([]);\n setScore(0);\n setSelected([]);\n setTimeExpired(false);\n }}\n style={{\n ...styles.gmButton,\n ...getMobileButtonStyles('medium')\n }}\n >\n ⬅️ Exit\n </button>\n </div>\n </div>\n );\n\n const MemoizedLogo = useMemo(\n () => {\n // Определяем URL логотипа\n let logoSrc = logoUrl;\n if (!logoSrc && baseURL) {\n // Убираем trailing slash если есть и добавляем правильный путь\n const cleanBaseURL = baseURL.endsWith('/') ? baseURL.slice(0, -1) : baseURL;\n logoSrc = `${cleanBaseURL}/logo.svg`;\n }\n \n return (\n <div style={{\n ...styles.gmLogoFixed,\n display: (!showLogo || (isMobile && window.innerWidth > window.innerHeight) || window.innerHeight < 700) ? 'none' : 'block'\n }}>\n {logoSrc ? (\n <img\n src={logoSrc}\n alt=\"SPEAKID Logo\"\n style={styles.gmLogoImg}\n loading=\"lazy\"\n />\n ) : (\n <div style={styles.gmLogoImg}>\n SPEAKID\n </div>\n )}\n </div>\n );\n },\n [isMobile, showLogo, logoUrl, baseURL]\n );\n\n return (\n <div\n ref={containerRef}\n style={{\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n background: \"linear-gradient(to bottom, #fff8f8 0%, #f9fafb 100%)\",\n transition: \"background 0.3s ease\",\n overflow: \"hidden\",\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0\n }}\n >\n <div\n style={{\n width: isMobile ? \"100%\" : (containerSize || 1000),\n height: isMobile ? \"100%\" : (containerSize || 1000),\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n overflow: \"hidden\",\n borderRadius: isMobile ? 0 : \"20px\",\n background: \"linear-gradient(to bottom, #fff8f8 0%, #f9fafb 100%)\",\n boxShadow: isMobile ? \"none\" : \"0 0 40px rgba(0,0,0,0.1)\",\n margin: isMobile ? \"0 auto\" : \"unset\",\n position: \"relative\",\n }}\n >\n <div\n style={{\n transform: \"none\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n }}\n >\n <div id=\"magic-sentence-root\">\n {!isMobile && MemoizedLogo}\n {stage === \"select\" && renderSelect()}\n {stage === \"time\" && renderTime()}\n {stage === \"type\" && renderType()}\n {stage === \"getready\" && renderGetReady()}\n {stage === \"play\" && renderPlay()}\n {stage === \"results\" && renderResults()}\n </div>\n </div>\n </div>\n </div>\n );\n}","import React, { Component, ErrorInfo, ReactNode } from 'react';\n\ninterface Props {\n children: ReactNode;\n fallback?: ReactNode;\n}\n\ninterface State {\n hasError: boolean;\n error?: Error;\n errorInfo?: ErrorInfo;\n}\n\nexport class ErrorBoundary extends Component<Props, State> {\n constructor(props: Props) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError(error: Error): State {\n return {\n hasError: true,\n error,\n };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n console.error('Game Error:', error, errorInfo);\n \n // В реальном приложении здесь можно отправить ошибку в аналитику\n // analytics.track('game_error', { error: error.message, stack: error.stack });\n \n this.setState({\n error,\n errorInfo,\n });\n }\n\n handleReset = () => {\n this.setState({ hasError: false, error: undefined, errorInfo: undefined });\n };\n\n render() {\n if (this.state.hasError) {\n if (this.props.fallback) {\n return this.props.fallback;\n }\n\n return (\n <div style={{\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: '100vh',\n padding: '20px',\n textAlign: 'center',\n backgroundColor: '#fef2f2',\n color: '#dc2626',\n fontFamily: 'system-ui, sans-serif'\n }}>\n <h1 style={{ fontSize: '24px', marginBottom: '16px' }}>\n 🚨 Oops! Something went wrong\n </h1>\n <p style={{ fontSize: '16px', marginBottom: '24px', maxWidth: '500px' }}>\n The game encountered an unexpected error. Don't worry, your progress is saved!\n </p>\n \n <button\n onClick={this.handleReset}\n style={{\n padding: '12px 24px',\n fontSize: '16px',\n backgroundColor: '#dc2626',\n color: 'white',\n border: 'none',\n borderRadius: '8px',\n cursor: 'pointer',\n transition: 'background-color 0.2s'\n }}\n onMouseOver={(e) => e.currentTarget.style.backgroundColor = '#b91c1c'}\n onMouseOut={(e) => e.currentTarget.style.backgroundColor = '#dc2626'}\n >\n 🔄 Restart Game\n </button>\n \n {typeof process !== 'undefined' && process.env.NODE_ENV === 'development' && this.state.error && (\n <details style={{ marginTop: '20px', textAlign: 'left', maxWidth: '600px' }}>\n <summary style={{ cursor: 'pointer', fontSize: '14px' }}>\n Technical Details (Development Only)\n </summary>\n <pre style={{\n backgroundColor: '#f3f4f6',\n padding: '12px',\n borderRadius: '4px',\n fontSize: '12px',\n overflow: 'auto',\n marginTop: '8px'\n }}>\n {this.state.error.toString()}\n {this.state.errorInfo?.componentStack}\n </pre>\n </details>\n )}\n </div>\n );\n }\n\n return this.props.children;\n }\n}\n\n"],"names":["REACT_ELEMENT_TYPE","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","reactJsxRuntime_production","getComponentNameFromType","REACT_CLIENT_REFERENCE","REACT_PROFILER_TYPE","REACT_STRICT_MODE_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_ACTIVITY_TYPE","REACT_PORTAL_TYPE","REACT_CONTEXT_TYPE","REACT_CONSUMER_TYPE","REACT_FORWARD_REF_TYPE","innerType","REACT_MEMO_TYPE","REACT_LAZY_TYPE","testStringCoercion","value","checkKeyStringCoercion","JSCompiler_inline_result","JSCompiler_temp_const","JSCompiler_inline_result$jscomp$0","getTaskName","name","getOwner","dispatcher","ReactSharedInternals","UnknownOwner","hasValidKey","hasOwnProperty","getter","defineKeyPropWarningGetter","props","displayName","warnAboutAccessingKey","specialPropKeyWarningShown","elementRefGetterWithDeprecationWarning","componentName","didWarnAboutElementRef","ReactElement","owner","debugStack","debugTask","refProp","jsxDEVImpl","isStaticChildren","children","isArrayImpl","validateChildKeys","keys","k","didWarnAboutKeySpread","node","isValidElement","object","React","require$$0","createTask","callStackForError","unknownOwnerDebugStack","unknownOwnerDebugTask","reactJsxRuntime_development","trackActualOwner","jsxRuntimeModule","require$$1","keyframes","styleTag","animations","styles","useValidation","errors","setErrors","useState","validateSentence","useCallback","sentence","index","allSentences","newErrors","duplicateIndex","s","i","validateAllSentences","sentences","allErrors","result","error","clearErrors","createAriaLabel","action","word","context","handleKeyDown","event","allowedKeys","announceToScreenReader","message","announcement","globalReset","style","shuffle","arr","Game","logoUrl","showLogo","baseURL","containerRef","useRef","validationErrors","shouldWrapWords","isMobile","isMobileDevice","getMobileButtonStyles","useEffect","stage","setStage","rounds","setRounds","timePerRound","setTimePerRound","setSentences","currentRound","setCurrentRound","words","setWords","selected","setSelected","timeLeft","setTimeLeft","score","setScore","countdown","setCountdown","resultType","setResultType","timeExpired","setTimeExpired","bestScore","setBestScore","timerRef","hover","setHover","setIsMobile","scale","setScale","containerSize","setContainerSize","isDesktopLayout","setIsDesktopLayout","isIPadMiniPortrait","setIsIPadMiniPortrait","isIPadMiniLandscape","setIsIPadMiniLandscape","isIPadAirPortrait","setIsIPadAirPortrait","isIPadAirLandscape","setIsIPadAirLandscape","isSurfaceDuoPortrait","setIsSurfaceDuoPortrait","isSurfaceDuoLandscape","setIsSurfaceDuoLandscape","isIPadProPortrait","setIsIPadProPortrait","isIPadProLandscape","setIsIPadProLandscape","resize","width","height","mobile","isSmallHeight","desktopLayout","finalSize","moveToken","from","to","id","insertIndex","nextWords","nextSelected","takeFrom","putTo","idx","t","token","targetIndex","handleDropTo","e","raw","fallbackId","inBank","inSelected","payload","handleSelect","num","handleTimeSelect","time","handleChange","updated","validation","normalizeSentence","getAdaptiveFontSize","wordCount","startGame","prev","startRound","target","tokens","w","correctWords","selectedTexts","missingWords","extraWords","wrongOrder","playSound","handleNext","manual","triggerConfetti","ctx","osc","gain","end","colors","canvas","pieces","draw","p","renderSelect","jsxs","jsx","renderTime","renderType","text","renderGetReady","renderPlay","rect","mid","renderResults","MemoizedLogo","useMemo","logoSrc","ErrorBoundary","Component","errorInfo"],"mappings":";;;;;;;;;;;;;;;AAWA,MAAIA,IAAqB,OAAO,IAAI,4BAA4B,GAC9DC,IAAsB,OAAO,IAAI,gBAAgB;AACnD,WAASC,EAAQC,GAAMC,GAAQC,GAAU;AACvC,QAAIC,IAAM;AAGV,QAFWD,MAAX,WAAwBC,IAAM,KAAKD,IACxBD,EAAO,QAAlB,WAA0BE,IAAM,KAAKF,EAAO,MACxC,SAASA,GAAQ;AACnB,MAAAC,IAAW,CAAA;AACX,eAASE,KAAYH;AACnB,QAAUG,MAAV,UAAuBF,EAAS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AAA,QAAA,EAAA,CACzB;AAAA,MAAA,EAAA,CACF;AAAA,IAAA,GAEJ,IAIG,KAAK,MAAM;AAAA,EACpB;AACF;","x_google_ignoreList":[0,1,2]}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
(function(I,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],a):(I=typeof globalThis<"u"?globalThis:I||self,a(I.SpeakidBuildASentence={},I.React))})(this,(function(I,a){"use strict";var he={exports:{}},de={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var We;function De(){if(We)return de;We=1;var p=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function m(_,R,y){var E=null;if(y!==void 0&&(E=""+y),R.key!==void 0&&(E=""+R.key),"key"in R){y={};for(var f in R)f!=="key"&&(y[f]=R[f])}else y=R;return R=y.ref,{$$typeof:p,type:_,key:E,ref:R!==void 0?R:null,props:y}}return de.Fragment=l,de.jsx=m,de.jsxs=m,de}var le={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Ee;function _e(){return Ee||(Ee=1,process.env.NODE_ENV!=="production"&&(function(){function p(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ce?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case ge:return"Profiler";case D:return"StrictMode";case pe:return"Suspense";case L:return"SuspenseList";case Q:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case C:return"Portal";case me:return e.displayName||"Context";case ue:return(e._context.displayName||"Context")+".Consumer";case P:var i=e.render;return e=e.displayName,e||(e=i.displayName||i.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case we:return i=e.displayName||null,i!==null?i:p(e.type)||"Memo";case O:i=e._payload,e=e._init;try{return p(e(i))}catch{}}return null}function l(e){return""+e}function m(e){try{l(e);var i=!1}catch{i=!0}if(i){i=console;var g=i.error,S=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return g.call(i,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",S),l(e)}}function _(e){if(e===N)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===O)return"<...>";try{var i=p(e);return i?"<"+i+">":"<...>"}catch{return"<...>"}}function R(){var e=K.A;return e===null?null:e.getOwner()}function y(){return Error("react-stack-top-frame")}function E(e){if(z.call(e,"key")){var i=Object.getOwnPropertyDescriptor(e,"key").get;if(i&&i.isReactWarning)return!1}return e.key!==void 0}function f(e,i){function g(){Z||(Z=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",i))}g.isReactWarning=!0,Object.defineProperty(e,"key",{get:g,configurable:!0})}function v(){var e=p(this.type);return q[e]||(q[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function k(e,i,g,S,G,$){var w=g.ref;return e={$$typeof:ce,type:e,key:i,props:g,_owner:S},(w!==void 0?w:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:v}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:G}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:$}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function W(e,i,g,S,G,$){var w=i.children;if(w!==void 0)if(S)if(M(w)){for(S=0;S<w.length;S++)H(w[S]);Object.freeze&&Object.freeze(w)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else H(w);if(z.call(i,"key")){w=p(e);var Y=Object.keys(i).filter(function(J){return J!=="key"});S=0<Y.length?"{key: someKey, "+Y.join(": ..., ")+": ...}":"{key: someKey}",j[w+S]||(Y=0<Y.length?"{"+Y.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
+
let props = %s;
|
|
19
|
+
<%s {...props} />
|
|
20
|
+
React keys must be passed directly to JSX without using spread:
|
|
21
|
+
let props = %s;
|
|
22
|
+
<%s key={someKey} {...props} />`,S,w,Y,w),j[w+S]=!0)}if(w=null,g!==void 0&&(m(g),w=""+g),E(i)&&(m(i.key),w=""+i.key),"key"in i){g={};for(var fe in i)fe!=="key"&&(g[fe]=i[fe])}else g=i;return w&&f(g,typeof e=="function"?e.displayName||e.name||"Unknown":e),k(e,w,g,R(),G,$)}function H(e){X(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===O&&(e._payload.status==="fulfilled"?X(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function X(e){return typeof e=="object"&&e!==null&&e.$$typeof===ce}var U=a,ce=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),ge=Symbol.for("react.profiler"),ue=Symbol.for("react.consumer"),me=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),pe=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),we=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),Ce=Symbol.for("react.client.reference"),K=U.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=Object.prototype.hasOwnProperty,M=Array.isArray,c=console.createTask?console.createTask:function(){return null};U={react_stack_bottom_frame:function(e){return e()}};var Z,q={},xe=U.react_stack_bottom_frame.bind(U,y)(),F=c(_(y)),j={};le.Fragment=N,le.jsx=function(e,i,g){var S=1e4>K.recentlyCreatedOwnerStacks++;return W(e,i,g,!1,S?Error("react-stack-top-frame"):xe,S?c(_(e)):F)},le.jsxs=function(e,i,g){var S=1e4>K.recentlyCreatedOwnerStacks++;return W(e,i,g,!0,S?Error("react-stack-top-frame"):xe,S?c(_(e)):F)}})()),le}var Te;function Oe(){return Te||(Te=1,process.env.NODE_ENV==="production"?he.exports=De():he.exports=_e()),he.exports}var s=Oe();const ze=`
|
|
23
|
+
@keyframes magic-sentence-spin {
|
|
24
|
+
from { transform: rotate(0deg); }
|
|
25
|
+
to { transform: rotate(360deg); }
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@keyframes magic-sentence-pulse {
|
|
29
|
+
0%, 100% { transform: scale(1); }
|
|
30
|
+
50% { transform: scale(1.05); }
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@keyframes magic-sentence-shake {
|
|
34
|
+
0%, 100% { transform: translateX(0); }
|
|
35
|
+
25% { transform: translateX(-5px); }
|
|
36
|
+
75% { transform: translateX(5px); }
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@keyframes magic-sentence-slideIn {
|
|
40
|
+
from { transform: translateY(-20px); opacity: 0; }
|
|
41
|
+
to { transform: translateY(0); opacity: 1; }
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@keyframes magic-sentence-bounce {
|
|
45
|
+
0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }
|
|
46
|
+
40%, 43% { transform: translate3d(0, -8px, 0); }
|
|
47
|
+
70% { transform: translate3d(0, -4px, 0); }
|
|
48
|
+
90% { transform: translate3d(0, -2px, 0); }
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@keyframes magic-sentence-glow {
|
|
52
|
+
0%, 100% { box-shadow: 0 0 5px rgba(76, 175, 80, 0.5); }
|
|
53
|
+
50% { box-shadow: 0 0 20px rgba(76, 175, 80, 0.8), 0 0 30px rgba(76, 175, 80, 0.6); }
|
|
54
|
+
}
|
|
55
|
+
`;if(typeof document<"u"&&!document.getElementById("magic-sentence-keyframes")){const p=document.createElement("style");p.id="magic-sentence-keyframes",p.innerHTML=ze,document.head.appendChild(p)}const Re={spin:{animation:"magic-sentence-spin 1.4s linear infinite"},pulse:{animation:"magic-sentence-pulse 0.6s ease-in-out"},shake:{animation:"magic-sentence-shake 0.4s ease-in-out"},slideIn:{animation:"magic-sentence-slideIn 0.3s ease-out"},bounce:{animation:"magic-sentence-bounce 0.6s ease-in-out"},glow:{animation:"magic-sentence-glow 1s ease-in-out infinite"}},h={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%"},gmHeadline2:{fontWeight:600,fontSize:"24px",lineHeight:"120%"},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"},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"},gmInput:{padding:"6px 10px",borderRadius:"6px",border:"1px solid #ccc",fontSize:"16px",fontFamily:'"Geist", system-ui',width:"160px"},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",backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjQwIiB2aWV3Qm94PSIwIDAgMTAwIDQwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8dGV4dCB4PSI1MCIgeT0iMjUiIGZvbnQtZmFtaWx5PSJBcmlhbCwgc2Fucy1zZXJpZiIgZm9udC1zaXplPSIyMCIgZm9udC13ZWlnaHQ9ImJvbGQiIGZpbGw9IiNlYzRjNDQiIHRleHQtYW5jaG9yPSJtaWRkbGUiPlNQRUFLSUQ8L3RleHQ+Cjwvc3ZnPgo=')",backgroundSize:"contain",backgroundRepeat:"no-repeat",backgroundPosition:"center",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitFontSmoothing:"antialiased",objectFit:"contain",imageRendering:"auto"},gmReadyWrapper:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"60%",gap:"16px"},gmHourglass:{fontSize:"42px",...Re.spin},...Re},je=()=>{const[p,l]=a.useState([]),m=a.useCallback((y,E,f)=>{const v=[];y.trim()||v.push({type:"empty",message:"Sentence cannot be empty"}),y.length>41&&v.push({type:"length",message:`Sentence is too long (${y.length}/41 characters)`}),y&&!/^[a-zA-Z0-9\s.,!?;:'"-]*$/.test(y)&&v.push({type:"characters",message:"Only Latin characters, numbers, spaces and punctuation are allowed"});const W=f.findIndex((H,X)=>X!==E&&H.toLowerCase().trim()===y.toLowerCase().trim());return W!==-1&&v.push({type:"duplicate",message:`Duplicate sentence (same as sentence ${W+1})`}),l(v),{isValid:v.length===0,errors:v}},[]),_=a.useCallback(y=>{const E=[];return y.forEach((f,v)=>{const k=m(f,v,y);E.push(...k.errors.map(W=>({...W,message:`Sentence ${v+1}: ${W.message}`})))}),{isValid:E.length===0,errors:E}},[m]),R=a.useCallback(()=>{l([])},[]);return{errors:p,validateSentence:m,validateAllSentences:_,clearErrors:R}},Ie=(p,l,m)=>l&&m?`${p} word "${l}" ${m}`:l?`${p} word "${l}"`:p,Pe=(p,l,m=["Enter"," "])=>{m.includes(p.key)&&(p.preventDefault(),l())},B=p=>{const l=document.createElement("div");l.setAttribute("aria-live","polite"),l.setAttribute("aria-atomic","true"),l.style.position="absolute",l.style.left="-10000px",l.style.width="1px",l.style.height="1px",l.style.overflow="hidden",document.body.appendChild(l),l.textContent=p,setTimeout(()=>{document.body.removeChild(l)},1e3)},Me=()=>{const p=document.createElement("style");p.textContent=`
|
|
56
|
+
#magic-sentence-root, #magic-sentence-root * {
|
|
57
|
+
box-sizing: border-box;
|
|
58
|
+
font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
|
|
59
|
+
}
|
|
60
|
+
#magic-sentence-root img {
|
|
61
|
+
max-width: 100%;
|
|
62
|
+
height: auto;
|
|
63
|
+
display: block;
|
|
64
|
+
user-select: none;
|
|
65
|
+
}
|
|
66
|
+
html, body {
|
|
67
|
+
margin: 0 !important;
|
|
68
|
+
padding: 0 !important;
|
|
69
|
+
width: 100% !important;
|
|
70
|
+
height: 100% !important;
|
|
71
|
+
overflow: hidden !important;
|
|
72
|
+
zoom: 1 !important;
|
|
73
|
+
}
|
|
74
|
+
#root {
|
|
75
|
+
margin: 0 !important;
|
|
76
|
+
padding: 0 !important;
|
|
77
|
+
width: 100% !important;
|
|
78
|
+
height: 100% !important;
|
|
79
|
+
overflow: hidden !important;
|
|
80
|
+
}
|
|
81
|
+
`,document.head.appendChild(p)},Be=p=>[...p].sort(()=>Math.random()-.5);function He({logoUrl:p,showLogo:l=!0,baseURL:m}={}){const _=a.useRef(null),{validateAllSentences:R,errors:y}=je(),E=()=>i||window.innerWidth<768,f=()=>i||window.innerWidth<768||window.innerWidth>=320&&window.innerWidth<=932&&window.innerHeight>=390&&window.innerHeight<=932,v=(t="medium")=>{if(!f())return{padding:"12px 24px",fontSize:"16px",minWidth:"auto"};switch(t){case"small":return{padding:"4px 6px",fontSize:"9px",minWidth:"40px"};case"medium":return{padding:"5px 8px",fontSize:"10px",minWidth:"50px"};case"large":return{padding:"6px 10px",fontSize:"11px",minWidth:"60px"}}};a.useEffect(()=>(Me(),()=>{document.body.style.overflow=""}),[]);const[k,W]=a.useState("select"),[H,X]=a.useState(null),[U,ce]=a.useState(null),[C,N]=a.useState([]),[D,ge]=a.useState(0),[ue,me]=a.useState([]),[P,pe]=a.useState([]),[L,we]=a.useState(20),[O,Q]=a.useState(0),[Ce,K]=a.useState(null),[z,M]=a.useState(null),[c,Z]=a.useState(!1),[q,xe]=a.useState(Number(localStorage.getItem("magicSentenceBest"))||0),F=a.useRef(null),[j,e]=a.useState({list:null,index:null,side:null}),[i,g]=a.useState(!1),[S,G]=a.useState(1),[$,w]=a.useState(null),[Y,fe]=a.useState(!1),[J,Le]=a.useState(!1),[ee,Fe]=a.useState(!1),[te,Ge]=a.useState(!1),[ne,Ye]=a.useState(!1),[ie,Je]=a.useState(!1),[re,Ve]=a.useState(!1),[oe,Xe]=a.useState(!1),[se,Ue]=a.useState(!1);a.useEffect(()=>{const t=()=>{const r=window.innerWidth,n=window.innerHeight,o=r<768||r===926&&n===428||r===932&&n===430,d=n<700,b=r===768&&n===1024,T=r===1024&&n===768,u=r===820&&n===1180,x=r===1180&&n===820,ae=r===540&&n===720,A=r===720&&n===540,ke=r===1024&&n===1366,dt=r===1366&&n===1024,lt=r>=1200&&n>=600&&!o;if(fe(lt),Le(b),Fe(T),Ge(u),Ye(x),Je(ae),Ve(A),Xe(ke),Ue(dt),g(o),o)w(null),G(1);else if(d)w(null),G(1);else{const ct=Math.min(1e3,Math.min(r,n)*.9);w(ct),G(1)}};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]);const ye=(t,r,n,o)=>{if(c)return;let d=[...ue],b=[...P];const T=t==="bank"?d:b,u=r==="bank"?d:b,x=T.findIndex(ke=>ke.id===n);if(x===-1)return;const[ae]=T.splice(x,1);let A=o;t===r&&A!==null&&A!==void 0&&A>x&&(A=A-1),A==null||A<0||A>u.length?u.push(ae):u.splice(A,0,ae),t==="bank"?d=T:b=T,r==="bank"?d=u:b=u,me(d),pe(b)},be=(t,r,n)=>{if(t.preventDefault(),c){e({list:null,index:null,side:null});return}const o=t.dataTransfer.getData("application/x-token")||(()=>{const d=t.dataTransfer.getData("text/plain");if(!d)return"";const b=ue.some(x=>x.id===d),T=P.some(x=>x.id===d),u=b?"bank":T?"selected":null;return u?JSON.stringify({from:u,id:d}):""})();if(o){try{const d=JSON.parse(o);if(!d||!d.id||!d.from)return;ye(d.from,r,d.id,n)}catch{}e({list:null,index:null,side:null})}},Ze=t=>{X(t),N(Array(t).fill("")),W("time")},Qe=t=>{ce(t),W("type")},Ke=(t,r)=>{if(r.length>41||r&&!/^[a-zA-Z0-9\s.,!?;:'"-]*$/.test(r))return;const o=[...C];o[t]=r,N(o);const d=R(o);d.isValid||console.warn("Validation errors:",d.errors)},qe=t=>t.trim().replace(/\s+/g," "),Ae=t=>t<=3?20:t<=5?18:t<=7?16:t<=9?14:12,$e=()=>{C.some(r=>r.trim().length===0)||(N(r=>r.map(n=>qe(n))),Q(0),ge(0),K(null),W("getready"))};a.useEffect(()=>{if(k==="getready"){const t=setTimeout(()=>Se(0),3e3);return()=>clearTimeout(t)}},[k]);const Se=t=>{const r=C[t];if(!r)return;const o=Be(r.trim().split(/\s+/).filter(Boolean)).map((d,b)=>({id:`${Date.now()}-${t}-${b}-${Math.random().toString(36).slice(2)}`,text:d}));me(o),pe([]),ge(t),we(U||20),M(null),Z(!1),W("play")};a.useEffect(()=>{if(k==="play"&&!c)if(F.current!==null&&window.clearTimeout(F.current),L>0)F.current=window.setTimeout(()=>we(t=>t-1),1e3);else{Z(!0);const r=C[D].trim().split(/\s+/),n=P.map(u=>u.text),o=r.filter(u=>!n.includes(u)).length,d=n.filter(u=>!r.includes(u)).length,b=r.filter((u,x)=>u!==n[x]).length,T=o+d+b;T===0?(M("correct"),V("correct"),B("Correct! Well done!")):T===1?(M("almost"),V("half"),B("Almost correct! Just one mistake.")):(M("wrong"),V("wrong"),B("Not quite right. Keep trying!"))}return()=>{F.current!==null&&window.clearTimeout(F.current)}},[k,L,c,C,D,P]);const et=(t=!0)=>{if(c&&t){D+1<(H||0)?Se(D+1):(W("results"),setTimeout(()=>ve(),600));return}if(t&&!c){const n=C[D].trim().split(/\s+/),o=P.map(x=>x.text),d=n.filter(x=>!o.includes(x)).length,b=o.filter(x=>!n.includes(x)).length,T=n.filter((x,ae)=>x!==o[ae]).length,u=d+b+T;u===0&&L>0?(Q(x=>x+1),M("correct"),V("correct"),B("Correct! Well done!")):u===1?(Q(x=>x+.5),M("almost"),V("half"),B("Almost correct! Just one mistake.")):(M("wrong"),V("wrong"),B("Not quite right. Keep trying!")),D+1<(H||0)?setTimeout(()=>Se(D+1),800):(W("results"),setTimeout(()=>ve(),600))}};a.useEffect(()=>{k==="results"&&O>q&&(xe(O),localStorage.setItem("magicSentenceBest",String(O)))},[k,O,q]);const V=t=>{const r=new(window.AudioContext||window.webkitAudioContext),n=r.createOscillator(),o=r.createGain();switch(n.connect(o),o.connect(r.destination),t){case"start":n.frequency.value=500;break;case"click":n.frequency.value=800;break;case"correct":n.frequency.value=1e3;break;case"half":n.frequency.value=700;break;case"wrong":n.frequency.value=200;break}o.gain.setValueAtTime(.1,r.currentTime),n.start(),n.stop(r.currentTime+.2)},ve=()=>{const r=Date.now()+2500,n=["#ec4c44","#f7c948","#6fcf97","#56ccf2","#bb6bd9"],o=document.createElement("canvas"),d=o.getContext("2d");o.width=window.innerWidth,o.height=window.innerHeight,o.style.position="fixed",o.style.top="0",o.style.left="0",o.style.pointerEvents="none",document.body.appendChild(o);const b=Array.from({length:100}).map(()=>({x:Math.random()*o.width,y:Math.random()*o.height-o.height,size:6+Math.random()*6,color:n[Math.floor(Math.random()*n.length)],speed:2+Math.random()*4,tilt:Math.random()*2*Math.PI})),T=()=>{d.clearRect(0,0,o.width,o.height),b.forEach(u=>{d.fillStyle=u.color,d.beginPath(),d.ellipse(u.x,u.y,u.size,u.size/2,u.tilt,0,2*Math.PI),d.fill(),u.y+=u.speed,u.x+=Math.sin(u.tilt)}),Date.now()<r?requestAnimationFrame(T):document.body.removeChild(o)};T()},tt=()=>s.jsxs("div",{style:h.gmCenterScreen,children:[s.jsx("h1",{style:h.gmHeadline1,children:"MAGIC SENTENCE"}),s.jsx("p",{style:h.gmBodyM,children:"Select number of rounds"}),s.jsx("div",{style:{display:"flex",gap:f()?"8px":"16px",justifyContent:"center"},children:[3,4,5].map(t=>s.jsxs("button",{onClick:()=>Ze(t),style:{...h.gmButton,...v("medium")},children:[t," ROUNDS"]},t))})]}),nt=()=>s.jsxs("div",{style:h.gmCenterScreen,children:[s.jsx("h1",{style:h.gmHeadline1,children:"MAGIC SENTENCE"}),s.jsx("p",{style:h.gmBodyM,children:"Select time per round"}),s.jsx("div",{style:{display:"flex",gap:f()?"8px":"16px",justifyContent:"center"},children:[15,20,30].map(t=>s.jsxs("button",{onClick:()=>Qe(t),style:{...h.gmButton,...v("medium")},children:[t,"s"]},t))})]}),it=()=>s.jsxs("div",{style:h.gmCenterScreen,children:[s.jsxs("h2",{style:{...h.gmBodyM,marginBottom:"0px"},children:["Type down ",H," sentence",H&&H>1?"s":""," for your student"]}),s.jsx("p",{style:{...h.gmBodyS,marginBottom:"16px",marginTop:"0px",color:"#6b7280"},children:"Maximum 41 characters per sentence"}),s.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12,width:"auto",minWidth:"fit-content",maxWidth:"600px"},children:C.map((t,r)=>s.jsx("input",{value:t,placeholder:`Sentence ${r+1}`,onChange:n=>Ke(r,n.target.value),style:{...h.gmInput,padding:f()?"8px 12px":"12px 16px",fontSize:f()?"14px":"16px",width:"100%",textAlign:"center"}},r))}),s.jsx("button",{onClick:$e,disabled:C.some(t=>t.trim().length===0),style:{...h.gmButton,marginTop:30,background:C.some(t=>t.trim().length===0)?"#ccc":"#ec4c44",cursor:C.some(t=>t.trim().length===0)?"not-allowed":"pointer",...v("large")},children:"PLAY"})]}),rt=()=>s.jsxs("div",{style:h.gmReadyWrapper,children:[s.jsx("h1",{style:{...h.gmHeadline1,fontSize:f()?"36px":"72px",color:"#ec4c44",marginBottom:"20px",animation:"pulse 1s ease-in-out infinite"},children:"GET READY"}),s.jsx("div",{style:h.gmHourglass,children:"⏳"})]}),ot=()=>s.jsxs("div",{style:h.gmGameLayout,children:[s.jsxs("h2",{style:{marginBottom:f()?"5px":"10px",fontSize:f()?"16px":"20px"},children:["Round ",D+1,"/",H," — ",c?"TIME'S UP!":`Time: ${L}s`]}),s.jsx("div",{style:{width:"60%",height:f()?"8px":"14px",borderRadius:8,background:"#eee",overflow:"hidden",marginBottom:f()?"10px":"20px"},children:s.jsx("div",{style:{height:"100%",width:`${L/(U||20)*100}%`,background:L<=5?"#ec4c44":"#4caf50",transition:"width 1s linear"}})}),s.jsx("div",{onDragOver:t=>t.preventDefault(),onDrop:t=>be(t,"bank",null),style:{display:"flex",flexWrap:E()?"wrap":"nowrap",gap:i||window.innerWidth<768?"6px":"10px",justifyContent:"center",marginBottom:i||window.innerWidth<768?"15px":"30px",padding:i||window.innerWidth<768?"5px":"10px",width:"100%",boxSizing:"border-box"},children:ue.map((t,r)=>s.jsx("div",{draggable:!c,role:"button",tabIndex:c?-1:0,"aria-label":c?`Word: ${t.text} (time expired)`:Ie("Drag word",t.text,"to build sentence"),onDragStart:n=>{if(c){n.preventDefault();return}n.dataTransfer.setData("application/x-token",JSON.stringify({from:"bank",id:t.id})),n.dataTransfer.setData("text/plain",t.id),B(`Dragging word: ${t.text}`)},onKeyDown:n=>{c||Pe(n,()=>ye("bank","selected",t.id,null))},onDragOver:n=>n.preventDefault(),onDrop:n=>{const o=n.currentTarget.getBoundingClientRect(),d=o.left+o.width/2,b=n.clientX>d?r+1:r;e({list:null,index:null,side:null}),n.stopPropagation(),be(n,"bank",b)},onDragEnter:n=>{if(c)return;const o=n.currentTarget.getBoundingClientRect(),d=o.left+o.width/2;e({list:"bank",index:r,side:n.clientX>d?"right":"left"})},onDragLeave:()=>e({list:null,index:null,side:null}),onClick:()=>{c||ye("bank","selected",t.id,null)},style:{padding:i||window.innerWidth<768?"6px 10px":"10px 16px",borderRadius:i||window.innerWidth<768?"6px":"10px",border:"1px solid #ccc",background:c?"#f0f0f0":"#f9f9f9",cursor:c?"not-allowed":"pointer",fontSize:i||window.innerWidth<768?"12px":"18px",borderLeft:j.list==="bank"&&j.index===r&&j.side==="left"?"3px solid #3b82f6":"1px solid #ccc",borderRight:j.list==="bank"&&j.index===r&&j.side==="right"?"3px solid #3b82f6":"1px solid #ccc",flexShrink:0,flexBasis:"auto",opacity:c?.6:1,transition:"opacity 0.3s ease"},children:t.text},t.id))}),s.jsx("div",{onDragOver:t=>t.preventDefault(),onDrop:t=>be(t,"selected",null),style:{minHeight:i||window.innerWidth<768?"50px":"70px",width:"auto",maxWidth:"none",minWidth:"245px",border:z==="correct"?"2px dashed #4caf50":z==="almost"?"2px dashed #ff9800":z==="wrong"?"2px dashed #f44336":"2px dashed #ccc",borderRadius:i||window.innerWidth<768?"8px":"12px",padding:i||window.innerWidth<768?"8px":"12px",display:"flex",flexWrap:E()?"wrap":"nowrap",alignItems:"center",justifyContent:"center",fontSize:`${Ae(P.length)}px`,background:z==="correct"?"#e8f5e8":z==="almost"?"#fff3e0":z==="wrong"?"#ffebee":"#fafafa",overflowX:E()?"hidden":"auto",whiteSpace:E()?"normal":"nowrap"},children:P.map((t,r)=>s.jsx("span",{draggable:!c,onDragStart:n=>{if(c){n.preventDefault();return}n.dataTransfer.setData("application/x-token",JSON.stringify({from:"selected",id:t.id})),n.dataTransfer.setData("text/plain",t.id)},onDragOver:n=>n.preventDefault(),onDrop:n=>{const o=n.currentTarget.getBoundingClientRect(),d=o.left+o.width/2,b=n.clientX>d?r+1:r;e({list:null,index:null,side:null}),n.stopPropagation(),be(n,"selected",b)},onDragEnter:n=>{if(c)return;const o=n.currentTarget.getBoundingClientRect(),d=o.left+o.width/2;e({list:"selected",index:r,side:n.clientX>d?"right":"left"})},onDragLeave:()=>e({list:null,index:null,side:null}),onClick:()=>{c||ye("selected","bank",t.id,null)},title:c?"Time expired":"Click to remove back to bank",style:{padding:f()?"4px 6px":"6px 10px",margin:f()?"2px":"4px",borderRadius:f()?"4px":"8px",background:c?"#f0f0f0":"#ffe9e7",border:c?"1px solid #ccc":"1px solid #ec4c44",borderLeft:j.list==="selected"&&j.index===r&&j.side==="left"?"3px solid #3b82f6":void 0,borderRight:j.list==="selected"&&j.index===r&&j.side==="right"?"3px solid #3b82f6":void 0,cursor:c?"not-allowed":"pointer",userSelect:"none",fontSize:`${Ae(P.length)}px`,fontFamily:'"Roboto", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif',whiteSpace:"nowrap",opacity:c?.6:1,transition:"opacity 0.3s ease"},children:t.text},t.id))}),s.jsx("button",{onClick:()=>et(!0),disabled:!c&&P.length===0,style:{marginTop:f()?"15px":"30px",fontSize:f()?"14px":"20px",padding:f()?"6px 12px":"10px 24px",borderRadius:f()?"8px":"12px",background:c||P.length>0?"#ec4c44":"#ccc",color:"white",border:"none",cursor:c||P.length>0?"pointer":"not-allowed"},children:"NEXT"})]}),st=()=>s.jsxs("div",{style:h.gmCenterScreen,children:[s.jsx("h1",{style:{...h.gmHeadline1,marginTop:(i&&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||J||ee||te||ne||ie||re||oe||se,"0px"),marginBottom:i&&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||J||ee||te||ne||ie||re||oe||se?"2px":"10px",fontSize:i&&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?"32px":"clamp(28px, 4vw, 40px)"},children:"Game Over 🎯"}),s.jsxs("h2",{style:{...h.gmHeadline2,marginTop:(i&&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||J||ee||te||ne||ie||re||oe||se,"0px"),marginBottom:i&&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||J||ee||te||ne||ie||re||oe||se?"2px":"16px",fontSize:i&&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?"18px":"24px"},children:["Your score: ",O," out of ",H]}),s.jsxs("p",{style:{...h.gmBodyM,color:"#10b981",marginTop:i&&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||J||ee||te||ne||ie||re||oe||se?"0px":"12px",marginBottom:i&&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||J||ee||te||ne||ie||re||oe||se?"2px":"16px",fontSize:i&&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"},children:["Best score: ",q]}),s.jsxs("div",{style:{display:"flex",gap:i&&window.innerWidth>window.innerHeight||i&&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:i&&window.innerWidth>window.innerHeight||i&&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||Y?"12px":"24px"},children:[s.jsx("button",{onClick:()=>{ve(),V("start"),setTimeout(()=>{W("getready"),K(null),Z(!1)},800)},style:{...h.gmButton,...v("medium")},children:"🔁 Play again"}),s.jsx("button",{onClick:()=>{V("click"),W("select"),X(null),ce(null),N([]),Q(0),pe([]),Z(!1)},style:{...h.gmButton,...v("medium")},children:"⬅️ Exit"})]})]}),at=a.useMemo(()=>{let t=p;return!t&&m&&(t=`${m.endsWith("/")?m.slice(0,-1):m}/logo.svg`),s.jsx("div",{style:{...h.gmLogoFixed,display:!l||i&&window.innerWidth>window.innerHeight||window.innerHeight<700?"none":"block"},children:t?s.jsx("img",{src:t,alt:"SPEAKID Logo",style:h.gmLogoImg,loading:"lazy"}):s.jsx("div",{style:h.gmLogoImg,children:"SPEAKID"})})},[i,l,p,m]);return s.jsx("div",{ref:_,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:s.jsx("div",{style:{width:i?"100%":$||1e3,height:i?"100%":$||1e3,display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",borderRadius:i?0:"20px",background:"linear-gradient(to bottom, #fff8f8 0%, #f9fafb 100%)",boxShadow:i?"none":"0 0 40px rgba(0,0,0,0.1)",margin:i?"0 auto":"unset",position:"relative"},children:s.jsx("div",{style:{transform:"none",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:s.jsxs("div",{id:"magic-sentence-root",children:[!i&&at,k==="select"&&tt(),k==="time"&&nt(),k==="type"&&it(),k==="getready"&&rt(),k==="play"&&ot(),k==="results"&&st()]})})})})}class Ne extends a.Component{constructor(l){super(l),this.state={hasError:!1}}static getDerivedStateFromError(l){return{hasError:!0,error:l}}componentDidCatch(l,m){console.error("Game Error:",l,m),this.setState({error:l,errorInfo:m})}handleReset=()=>{this.setState({hasError:!1,error:void 0,errorInfo:void 0})};render(){return this.state.hasError?this.props.fallback?this.props.fallback:s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100vh",padding:"20px",textAlign:"center",backgroundColor:"#fef2f2",color:"#dc2626",fontFamily:"system-ui, sans-serif"},children:[s.jsx("h1",{style:{fontSize:"24px",marginBottom:"16px"},children:"🚨 Oops! Something went wrong"}),s.jsx("p",{style:{fontSize:"16px",marginBottom:"24px",maxWidth:"500px"},children:"The game encountered an unexpected error. Don't worry, your progress is saved!"}),s.jsx("button",{onClick:this.handleReset,style:{padding:"12px 24px",fontSize:"16px",backgroundColor:"#dc2626",color:"white",border:"none",borderRadius:"8px",cursor:"pointer",transition:"background-color 0.2s"},onMouseOver:l=>l.currentTarget.style.backgroundColor="#b91c1c",onMouseOut:l=>l.currentTarget.style.backgroundColor="#dc2626",children:"🔄 Restart Game"}),typeof process<"u"&&process.env.NODE_ENV==="development"&&this.state.error&&s.jsxs("details",{style:{marginTop:"20px",textAlign:"left",maxWidth:"600px"},children:[s.jsx("summary",{style:{cursor:"pointer",fontSize:"14px"},children:"Technical Details (Development Only)"}),s.jsxs("pre",{style:{backgroundColor:"#f3f4f6",padding:"12px",borderRadius:"4px",fontSize:"12px",overflow:"auto",marginTop:"8px"},children:[this.state.error.toString(),this.state.errorInfo?.componentStack]})]})]}):this.props.children}}I.ErrorBoundary=Ne,I.Game=He,I.announceToScreenReader=B,I.createAriaLabel=Ie,I.default=He,I.handleKeyDown=Pe,I.useValidation=je,Object.defineProperties(I,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
82
|
+
//# sourceMappingURL=speakid-build-a-sentence.umd.js.map
|