{"id":1407,"date":"2026-03-22T19:28:59","date_gmt":"2026-03-22T19:28:59","guid":{"rendered":"https:\/\/entrenacalculo.com\/?page_id=1407"},"modified":"2026-03-23T18:55:12","modified_gmt":"2026-03-23T18:55:12","slug":"familia-numerica-del-3","status":"publish","type":"page","link":"https:\/\/entrenacalculo.com\/en\/familia-numerica-del-3\/","title":{"rendered":"Familia num\u00e9rica del 3"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"1407\" class=\"elementor elementor-1407\">\n\t\t\t\t<div class=\"elementor-element elementor-element-a522284 e-flex e-con-boxed e-con e-parent\" data-id=\"a522284\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-9dbae72 elementor-widget elementor-widget-html\" data-id=\"9dbae72\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/jspdf\/2.5.1\/jspdf.umd.min.js\"><\/script>\r\n<style>\r\n    .juego-fiel-tabla-F3-container {\r\n        font-family: Arial, sans-serif;\r\n        background-color: #f0f0f0;\r\n        margin: 0;\r\n        padding: 5px;\r\n        border-radius: 10px;\r\n    }\r\n    .juego-fiel-tabla-F3-container .container {\r\n        max-width: 800px; margin: 0 auto; padding: 10px 15px; background-color: #fff; border-radius: 10px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); text-align: center;\r\n    }\r\n    .juego-fiel-tabla-F3-container h2 { color: #333; }\r\n    .juego-fiel-tabla-F3-container .lesson { font-style: italic; color: #666;\r\n        margin: 0 0 10px 0; \/* CAMBIO: margen ajustado *\/\r\n    font-size: 0.9em; \/* CAMBIO: texto ligeramente m\u00e1s peque\u00f1o *\/\r\n    line-height: 1.2; \/* CAMBIO: interlineado m\u00e1s compacto *\/ }\r\n    .juego-fiel-tabla-F3-container button { margin: 10px; padding: 5px 10px; font-size: 16px; border: none; border-radius: 5px; cursor: pointer; background-color: #007bff; color: #fff; transition: background-color 0.3s ease; }\r\n    .juego-fiel-tabla-F3-container button:hover { background-color: #0056b3; }\r\n    \r\n    \/* --- ESTILOS VISUALES CORREGIDOS --- *\/\r\n    .juego-fiel-tabla-F3-container .questions-container {\r\n        display: grid;\r\n        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));\r\n        grid-gap: 5px;\r\n        margin-bottom: 10px;\r\n    }\r\n    .juego-fiel-tabla-F3-container .question {\r\n        padding: 8px;\r\n        background-color: #f9f9f9;\r\n        border-radius: 5px;\r\n    }\r\n    .juego-fiel-tabla-F3-container .question p {\r\n    margin: 2px 0;\r\n}\r\n\r\n    \/* --- FIN DE LA CORRECCI\u00d3N --- *\/\r\n\r\n    .juego-fiel-tabla-F3-container .correct-answer { color: green; font-weight: bold; }\r\n    .juego-fiel-tabla-F3-container .incorrect-answer { color: red; font-weight: bold; }\r\n    .juego-fiel-tabla-F3-container .hidden { display: none; }\r\n    .juego-fiel-tabla-F3-container .error-blink { animation: blink-animation-fiel-F3 0.5s infinite alternate; }\r\n    @keyframes blink-animation-fiel-F3 { from { background-color: #ff9999; } to { background-color: inherit; } }\r\n    @keyframes destello-fiel-F3 { 10% { text-shadow: 0 0 10px gold; } 50% { text-shadow: 0 0 10px rgb(85, 0, 255); } 100% { text-shadow: 0 0 10px rgb(211, 9, 9); } }\r\n    .juego-fiel-tabla-F3-container .destello { animation: destello-fiel-F3 1s infinite alternate; }\r\n    .juego-fiel-tabla-F3-container .modal { display: none; position: fixed; z-index: 10000; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 90%; max-width: 600px; background-color: rgba(0, 0, 0, 0.5); border-radius: 10px; }\r\n    .juego-fiel-tabla-F3-container .modal-content { background-color: #fefefe; margin: 20px auto; padding: 20px; border: 1px solid #888; border-radius: 10px; text-align: center;\r\n    }\r\n    .juego-fiel-tabla-F3-container .close { color: #aaa; float: right; font-size: 28px; font-weight: bold; }\r\n    .juego-fiel-tabla-F3-container .close:hover, .juego-fiel-tabla-F3-container .close:focus { color: black; text-decoration: none; cursor: pointer; }\r\n    .juego-fiel-tabla-F3-container .titulo-division { color: #ffc107; }\r\n    .juego-fiel-tabla-F3-container .userAnswer {\r\n     width: 65px;\r\n            padding: 2px 5px;\r\n            height: 30px;\r\n            text-align: center;\r\n            border: 2px solid #cccccc !important;\r\n            border-radius: 5px;\r\n            background-color: #ffffff !important;\r\n            font-size: 18px;\r\n            color: #333;\r\n            display: block;\r\n            margin: 5px auto;\r\n}\r\n\r\n.juego-fiel-tabla-F3-container .userAnswer:focus {\r\n     border-color: #ffc107 !important;\r\n            outline: none;\r\n            box-shadow: 0 0 5px rgba(255, 193, 7, 0.6);\r\n}\r\n\/* Barra de progreso *\/\r\n.progress-wrapper-F3{ \r\n    background-color: #eee; border-radius: 10px; height: 20px; \r\n    width: 100%; margin: 15px 0; position: relative; \r\n    border: 1px solid #ccc; overflow: hidden; \r\n}\r\n#progressBar-fiel-F3 { \r\n    background: #4caf50; height: 100%; width: 0%; transition: width 0.3s; \r\n}\r\n.progress-text-F3{ \r\n    position: absolute; width: 100%; text-align: center; top: 0; \r\n    font-size: 12px; font-weight: bold; color: #000; line-height: 20px; \r\n}\r\n\r\n\/* Ajuste al modal para que no crezca m\u00e1s que la pantalla *\/\r\n.juego-fiel-tabla-F3-container .modal-content { \r\n    max-height: 85vh; \/* Evita que salga de la pantalla *\/\r\n    display: flex; \r\n    flex-direction: column; \r\n    position: relative; \r\n}\r\n\/* Permite scroll solo en el contenido *\/\r\n#errorContent-fiel-F3 { \r\n    overflow-y: auto; \r\n    margin: 15px 0; \r\n    padding-right: 10px; \r\n}\r\n\/* Fija la X de cerrar arriba a la derecha *\/\r\n.juego-fiel-tabla-F3-container .close { \r\n    position: absolute; top: 5px; right: 15px; \r\n}\r\n<\/style>\r\n\r\n<!-- ESTRUCTURA HTML -->\r\n<div class=\"juego-fiel-tabla-F3-container\">\r\n    <div class=\"container\">\r\n        <p class=\"lesson titulo-division\">\"Si sabes que 3 \u00d7 4 = 12, entonces 12 \u00f7 3 = 4 y 12 \u00f7 4 = 3. \r\n            Est\u00e1s aprendiendo a conectar multiplicaci\u00f3n y divisi\u00f3n.\"<\/p>\r\n        <div class=\"questions-container\" id=\"exercise-fiel-F3\"><\/div>\r\n        <div id=\"roundResult-fiel-F3\" class=\"hidden\"><\/div>\r\n        <div class=\"progress-wrapper-F3\">\r\n    <div id=\"progressBar-fiel-F3\"><\/div>\r\n    <div class=\"progress-text-F3\" id=\"progressText-fiel-F3\">Racha: 0 \/ 27<\/div>\r\n<\/div>\r\n        <div id=\"consecutiveCorrect-fiel-F3\" class=\"hidden\"><\/div>\r\n        <button id=\"verify-btn-fiel-F3\">Verificar respuestas<\/button>\r\n        <button id=\"continue-btn-fiel-F3\">Continuar reto<\/button>\r\n        <button id=\"finish-btn-fiel-F3\">An\u00e1lisis de errores<\/button>\r\n        <button id=\"restart-btn-fiel-F3\">Reiniciar reto<\/button>\r\n        <div id=\"finishMessage-fiel-F3\" class=\"hidden\"><\/div>\r\n\r\n        <div id=\"errorModal-fiel-F3\" class=\"modal\">\r\n            <div class=\"modal-content\">\r\n                <span id=\"closeError-fiel-F3\" class=\"close\">&times;<\/span>\r\n                <div id=\"errorContent-fiel-F3\"><\/div>\r\n                <button id=\"download-txt-btn-fiel-F3\">Descargar ejercicios a partir de los errores, en PDF<\/button>\r\n            <\/div>\r\n        <\/div>\r\n        <div id=\"winModal-fiel-F3\" class=\"modal\">\r\n            <div class=\"modal-content\">\r\n                <span id=\"closeWin-fiel-F3\" class=\"close\">&times;<\/span>\r\n                <div id=\"winContent-fiel-F3\"><\/div>\r\n            <\/div>\r\n        <\/div>\r\n    <\/div>\r\n\r\n   <audio id=\"audio-9-fiel-F3\" src=\"https:\/\/entrenacalculo.com\/wp-content\/uploads\/2026\/03\/ronda_9.mp3.mp3\"><\/audio>\r\n<audio id=\"audio-18-fiel-F3\" src=\"https:\/\/entrenacalculo.com\/wp-content\/uploads\/2026\/03\/ronda_18.mp3.mp3\"><\/audio>\r\n<audio id=\"audio-victoria-fiel-F3\" src=\"https:\/\/entrenacalculo.com\/wp-content\/uploads\/2026\/03\/victoria_27.mp3.mp3\"><\/audio>\r\n<audio id=\"audio-reintento-leve-fiel-F3\" src=\"https:\/\/entrenacalculo.com\/wp-content\/uploads\/2026\/03\/error_leve.mp3.mp3\"><\/audio>\r\n<audio id=\"audio-reintento-grave-fiel-F3\" src=\"https:\/\/entrenacalculo.com\/wp-content\/uploads\/2026\/03\/error_grave.mp3.mp3\"><\/audio>\r\n<\/div>\r\n\r\n<!-- C\u00d3DIGO JAVASCRIPT -->\r\n<script>\r\n(function() {\r\n    const suffix = '-fiel-F3';\r\n    const consecutiveCorrectKey = 'consecutiveCorrect_fiel_F3';\r\n    const allErrorsKey = 'allErrors_fiel_F3';\r\n    const exercisesKey = 'exercises_fiel_F3';\r\n\r\n    const exerciseDiv = document.getElementById('exercise' + suffix);\r\n    const roundResult = document.getElementById('roundResult' + suffix);\r\n    const consecutiveCorrectPara = document.getElementById('consecutiveCorrect' + suffix);\r\n    const errorModal = document.getElementById('errorModal' + suffix);\r\n    const winModal = document.getElementById('winModal' + suffix);\r\n    const errorContent = document.getElementById('errorContent' + suffix);\r\n    const winContent = document.getElementById('winContent' + suffix);\r\n    \/\/const successAudio = document.getElementById('success-audio' + suffix);\r\n    \/\/const errorAudio = document.getElementById('error-audio' + suffix);\r\n\r\n    let consecutiveCorrect = parseInt(localStorage.getItem(consecutiveCorrectKey)) || 0;\r\n    let allErrors = JSON.parse(localStorage.getItem(allErrorsKey)) || [];\r\n    let startTime;\r\n    let verifyButtonClicked = false;\r\n    \r\n    \/\/ --- ACTUALIZACI\u00d3N DE BARRA ---\r\n    function updateProgressBar() {\r\n        const perc = Math.min((consecutiveCorrect \/ 27) * 100, 100);\r\n        document.getElementById('progressBar-fiel-F3').style.width = perc + '%';\r\n        document.getElementById('progressText-fiel-F3').innerHTML = `Racha: ${consecutiveCorrect} \/ 27`;\r\n    }\r\n\r\n    \/*function generateExercise() {\r\n        const factor = Math.random() < 0.5 ? 3 : Math.floor(Math.random() * 10) + 1;\r\n        const num = 3;\r\n        const correctAnswer = factor * num;\r\n        return { factor, num, correctAnswer };\r\n    }*\/\r\n\r\n    function generateExercise(familyNumber) {\r\n    const num = familyNumber;\r\n    const factor = Math.floor(Math.random() * 10) + 1;\r\n    const product = num * factor;\r\n\r\n    const tipo = Math.floor(Math.random() * 3);\r\n\r\n    if (tipo === 0) {\r\n        return { \r\n            factor: factor, \r\n            num: num, \r\n            correctAnswer: product, \r\n            operator: 'x',\r\n            family: num\r\n        };\r\n    } \r\n    else if (tipo === 1) {\r\n        return { \r\n            factor: product, \r\n            num: num, \r\n            correctAnswer: factor, \r\n            operator: '\u00f7',\r\n            family: num\r\n        };\r\n    } \r\n    else {\r\n        return { \r\n            factor: product, \r\n            num: factor, \r\n            correctAnswer: num, \r\n            operator: '\u00f7',\r\n            family: num\r\n        };\r\n    }\r\n}\r\n\r\nfunction generateExercises() {\r\n    const FAMILY_NUMBER = 3; \/\/ \ud83d\udd25 SOLO CAMBIAS ESTE N\u00daMERO\r\n\r\n    const exercises = [];\r\n    let previousExercises = JSON.parse(localStorage.getItem(exercisesKey));\r\n    let newExercises;\r\n\r\n    do {\r\n        exercises.length = 0;\r\n\r\n        while (exercises.length < 9) {\r\n            const exercise = generateExercise(FAMILY_NUMBER);\r\n\r\n            const isUnique = !exercises.some(e => \r\n                e.factor === exercise.factor && \r\n                e.num === exercise.num && \r\n                e.operator === exercise.operator\r\n            );\r\n\r\n            if (isUnique) exercises.push(exercise);\r\n        }\r\n\r\n        newExercises = JSON.stringify(exercises);\r\n\r\n    } while (previousExercises && newExercises === previousExercises);\r\n\r\n    localStorage.setItem(exercisesKey, newExercises);\r\n    return exercises;\r\n}\r\n\r\n    function showExercises(exercises) {\r\n        if (!exerciseDiv) return;\r\n        exerciseDiv.innerHTML = '';\r\n        exercises.forEach((exercise, index) => {\r\n            \/\/ -- CORRECCI\u00d3N APLICADA AQU\u00cd --\r\n            exerciseDiv.innerHTML += `\r\n            <div class=\"question\">\r\n                <p>Pregunta ${index + 1}: \u00bfCu\u00e1nto es ${exercise.factor} ${exercise.operator} ${exercise.num}?<\/p>\r\n                <input type=\"number\" id=\"userAnswer${index}${suffix}\" class=\"userAnswer\">\r\n                <p id=\"feedback${index}${suffix}\" class=\"feedback\"><\/p>\r\n            <\/div>`;\r\n        });\r\n        updateProgressBar(); \/\/ --- AGREGAR ESTO: Actualiza la barra al mostrar ejercicios ---\r\n    }\r\n\r\n    function verifyAnswers() {\r\n        if (verifyButtonClicked) return;\r\n        verifyButtonClicked = true;\r\n        let correctAnswers = 0;\r\n        const exercises = JSON.parse(localStorage.getItem(exercisesKey));\r\n        const errors = [];\r\n        if (!exercises) return;\r\n        exercises.forEach((exercise, index) => {\r\n            const userAnswer = parseInt(document.getElementById(`userAnswer${index}${suffix}`).value);\r\n            const feedbackPara = document.getElementById(`feedback${index}${suffix}`);\r\n            if (!isNaN(userAnswer) && userAnswer === exercise.correctAnswer) {\r\n                feedbackPara.innerHTML = '\u00a1Correcto!';\r\n                feedbackPara.classList.add('correct-answer');\r\n                correctAnswers++;\r\n                consecutiveCorrect++;\r\n               \/\/ playSuccessSound();\r\n            } else {\r\n                feedbackPara.innerHTML = `\u00a1Lo correcto es ${exercise.correctAnswer}!`;\r\n                feedbackPara.classList.add('incorrect-answer');\r\n                feedbackPara.classList.add('error-blink');\r\n                consecutiveCorrect = 0;\r\n                errors.push(exercise);\r\n               \/\/ playErrorSound();\r\n            }\r\n        });\r\n        \/\/ --- INICIO DE L\u00d3GICA DE AUDIOS POR PRIORIDAD Y RACHA ---\r\n        let huboFallo = errors.length > 0;\r\n\r\n        if (consecutiveCorrect >= 27) {\r\n            \/\/ PRIORIDAD 1: VICTORIA FINAL\r\n            playAudio('audio-victoria' + suffix);\r\n        } \r\n        else if (huboFallo) {\r\n            \/\/ PRIORIDAD 2: ERRORES (REINTENTOS)\r\n            let totalErrores = errors.length;\r\n            if (totalErrores <= 2) {\r\n                playAudio('audio-reintento-leve' + suffix);\r\n            } else {\r\n                playAudio('audio-reintento-grave' + suffix);\r\n            }\r\n        } \r\n        else {\r\n            \/\/ PRIORIDAD 3: RONDAS PERFECTAS (9 o 18)\r\n            if (consecutiveCorrect === 9) {\r\n                playAudio('audio-9' + suffix);\r\n            } \r\n            else if (consecutiveCorrect === 18) {\r\n                playAudio('audio-18' + suffix);\r\n            }\r\n        }\r\n        \/\/ --- FIN DE L\u00d3GICA DE AUDIOS ---\r\n        localStorage.setItem(consecutiveCorrectKey, consecutiveCorrect);\r\n        allErrors.push(...errors);\r\n        localStorage.setItem(allErrorsKey, JSON.stringify(allErrors));\r\n        updateProgressBar(); \/\/ --- AGREGAR ESTO: La barra se mueve justo despu\u00e9s de verificar ---\r\n        showRoundResult(correctAnswers);\r\n        showConsecutiveCorrect();\r\n    }\r\n\r\n    function showRoundResult(correctAnswers) {\r\n        if(roundResult) {\r\n            roundResult.innerHTML = `Lograste ${correctAnswers} respuestas correctas de 9, en esta ronda.`;\r\n            roundResult.style.color = 'blue';\r\n            roundResult.classList.remove('hidden');\r\n        }\r\n    }\r\n\r\n    function showConsecutiveCorrect() {\r\n        if(consecutiveCorrectPara) {\r\n            consecutiveCorrectPara.innerHTML = `Has alcanzado ${consecutiveCorrect} respuestas correctas seguidas.`;\r\n            consecutiveCorrectPara.style.color = 'green';\r\n            consecutiveCorrectPara.classList.remove('hidden');\r\n            if (consecutiveCorrect >= 27) {\r\n                const finishTime = new Date() - startTime;\r\n                const minutes = Math.floor((finishTime % (1000 * 60 * 60)) \/ (1000 * 60));\r\n                const seconds = Math.floor((finishTime % (1000 * 60)) \/ 1000);\r\n                const totalErrors = allErrors.length;\r\n                const totalTimeForPoints = Math.floor(finishTime \/ 1000);\r\n                const totalPoints = calculatePoints(consecutiveCorrect, totalTimeForPoints, totalErrors);\r\n                \r\n                winContent.innerHTML = `<h2 style=\"color: blue;\" class=\"destello\">\u00a1Ganaste el juego!<br>familia del 3<\/h2> <span style=\"font-size: 56px;\" class=\"destello\">&#x1F3C6;<\/span>`;\r\n                winContent.innerHTML += `<p><b>\u00a1Felicidades!<\/b> Has logrado <b> 27 respuestas correctas consecutivas.<\/b><\/p>`;\r\n                winContent.innerHTML += `<p>Tiempo de finalizaci\u00f3n: <b>${minutes} minutos ${seconds} segundos<\/b><\/p>`;\r\n                winContent.innerHTML += `<p>Puntaje total: <b>${totalPoints} Puntos<\/b><\/p>`;\r\n                winContent.style.color = 'blue';\r\n                if(winModal) winModal.style.display = \"block\";\r\n                \r\n                \/\/localStorage.removeItem(consecutiveCorrectKey);\r\n                \/\/localStorage.removeItem(allErrorsKey);\r\n                \/\/localStorage.removeItem(exercisesKey);\r\n            } else {\r\n                consecutiveCorrectPara.innerHTML += ` \u00a1Necesitas llegar a 27 para ganar!`;\r\n            }\r\n        }\r\n    }\r\n\r\n    function calculatePoints(finalConsecutive, totalTimeSeconds, totalErrors) {\r\n        const basePoints = finalConsecutive * 10;\r\n        const errorPenalty = totalErrors * 5;\r\n        const timePenalty = totalTimeSeconds * 0.5;\r\n        let streakBonus = 0;\r\n        if (finalConsecutive >= 27) { streakBonus += 300; } \r\n        else if (finalConsecutive >= 18) { streakBonus += 150; } \r\n        else if (finalConsecutive >= 9) { streakBonus += 50; }\r\n        const totalPoints = basePoints - errorPenalty - timePenalty + streakBonus;\r\n        return Math.max(0, Math.floor(totalPoints));\r\n    }\r\n\r\n    function showErrors() {\r\n        const currentAllErrors = JSON.parse(localStorage.getItem(allErrorsKey)) || [];\r\n        if(errorContent) {\r\n            errorContent.innerHTML = '<h2>Errores en el juego. <br> Pero corregidos.<\/h2>';\r\n            if (currentAllErrors.length > 0) {\r\n                 currentAllErrors.forEach((error, index) => {\r\n                    errorContent.innerHTML += `<p>${index + 1}. <span style=\"color: red;\">${error.factor} x ${error.num} = ${error.correctAnswer}<\/span><\/p>`;\r\n                });\r\n            } else {\r\n                errorContent.innerHTML += '<p>\u00a1No has cometido errores!<\/p>';\r\n            }\r\n        }\r\n        if(errorModal) errorModal.style.display = \"block\";\r\n    }\r\n\r\n    function refreshGame() {\r\n        verifyButtonClicked = false;\r\n        if (roundResult) roundResult.classList.add('hidden');\r\n        const exercises = generateExercises();\r\n        showExercises(exercises);\r\n    }\r\n\r\n    function restartGame() {\r\n        startTime = new Date(); \r\n        consecutiveCorrect = 0; \r\n        allErrors = [];\r\n        \r\n        \/\/ --- ESTAS SON LAS L\u00cdNEAS QUIR\u00daRGICAS A AGREGAR ---\r\n    localStorage.setItem(consecutiveCorrectKey, '0');\r\n    localStorage.setItem(allErrorsKey, JSON.stringify([])); \/\/ Limpia el historial para el nuevo juego\r\n    localStorage.removeItem(exercisesKey); \/\/ Obliga a generar ejercicios nuevos\r\n    \/\/ --------------------------------------------------\r\n \r\n        if (roundResult) roundResult.classList.add('hidden');\r\n        if (consecutiveCorrectPara) consecutiveCorrectPara.classList.add('hidden');\r\n        verifyButtonClicked = false; \r\n        updateProgressBar(); \/\/ --- AGREGAR ESTO: La barra vuelve a cero visualmente ---\r\n        refreshGame(); \r\n    }\r\n            \r\n    \/*function playSuccessSound() { if(successAudio) successAudio.play().catch(e => {}); }*\/\r\n   \/* function playErrorSound() { if(errorAudio) errorAudio.play().catch(e => {}); }*\/\r\n\r\n    function closeErrorModal() { if(errorModal) errorModal.style.display = \"none\"; }\r\n    function closeWinModal() { if(winModal) winModal.style.display = \"none\"; }\r\n\r\n  function generateTextFile() {\r\n    const allErrors = JSON.parse(localStorage.getItem(allErrorsKey)) || [];\r\n    \r\n    \/\/ \ud83c\udf0d DETECTAR IDIOMA (Busca si la URL tiene \"\/en\/\" o si el sitio est\u00e1 en ingl\u00e9s)\r\n    const isEn = document.documentElement.lang.includes('en') || window.location.pathname.includes('\/en\/');\r\n\r\n    \/\/ \ud83d\udcda DICCIONARIO DE TEXTOS\r\n    const labels = {\r\n        title: isEn ? `TRAINING REPORT: FACT FAMILY OF ${allErrors?.family || 3}` : `INFORME DE ENTRENAMIENTO: FAMILIA DEL ${allErrors?.family || 3}`,\r\n        noErrors: isEn ? \"Excellent! The student completed the training without errors.\" : \"\u00a1Excelente! El estudiante complet\u00f3 el entrenamiento sin errores.\",\r\n        summary: isEn ? \"Performance Summary:\" : \"Resumen del desempe\u00f1o:\",\r\n        errorsFound: isEn ? `Found ${allErrors.length} errors.` : `Se detectaron ${allErrors.length} errores.`,\r\n        mult: isEn ? \"Multiplication:\" : \"Multiplicaci\u00f3n:\",\r\n        div: isEn ? \"Division:\" : \"Divisi\u00f3n:\",\r\n        diag: isEn ? \"Diagnosis:\" : \"Diagn\u00f3stico:\",\r\n        diag1: isEn ? \"Difficulty in the relationship between multiplication and division.\" : \"Dificultad en la relaci\u00f3n entre multiplicaci\u00f3n y divisi\u00f3n.\",\r\n        diag2: isEn ? \"Difficulty memorizing the table.\" : \"Dificultad en la memorizaci\u00f3n de la tabla.\",\r\n        diag3: isEn ? \"Needs to reinforce the connection between operations.\" : \"Necesita reforzar la conexi\u00f3n entre operaciones.\",\r\n        explanation: isEn ? \"Key Explanation:\" : \"Explicaci\u00f3n clave:\",\r\n        multExp: isEn ? `Multiplying by ${allErrors?.family || 3} is adding that number several times.` : `Multiplicar por ${allErrors?.family || 3} es sumar ese n\u00famero varias veces.`,\r\n        example: isEn ? \"Example:\" : \"Ejemplo:\",\r\n        remember: isEn ? \"Remember:\" : \"Recuerda:\",\r\n        ifYouKnow: isEn ? `If you know that ` : `Si sabes que `,\r\n        then: isEn ? `, then:` : `, entonces:`,\r\n        recommended: isEn ? \"Recommended Exercises:\" : \"Ejercicios recomendados:\",\r\n        smart: isEn ? \"Smart Reinforcement:\" : \"Refuerzo inteligente:\",\r\n        adultGuide: isEn ? \"Guide for Adults:\" : \"Gu\u00eda para el adulto:\",\r\n        guide1: isEn ? \"- Do not correct immediately.\" : \"- No corrija inmediatamente.\",\r\n        guide2: isEn ? \"- Reinforce the relationship between operations.\" : \"- Refuerce la relaci\u00f3n entre operaciones.\",\r\n        guide3: isEn ? \"- Practice 5 to 10 minutes daily.\" : \"- Practique 5 a 10 minutos diarios.\",\r\n        guide4: isEn ? \"- Praise successes.\" : \"- Refuerce los aciertos.\",\r\n        freq: isEn ? \"Error Frequency:\" : \"Frecuencia de errores:\",\r\n        filename: isEn ? \"Family_Report\" : \"Informe_Familia\"\r\n    };\r\n\r\n    const { jsPDF } = window.jspdf;\r\n    const doc = new jsPDF();\r\n    let y = 15;\r\n\r\n    function checkPageSpace(extra = 10) {\r\n        if (y + extra > 280) { doc.addPage(); y = 15; }\r\n    }\r\n\r\n    function writeLine(text, space = 7) {\r\n        checkPageSpace(space);\r\n        const lines = doc.splitTextToSize(text, 180);\r\n        lines.forEach(line => {\r\n            doc.text(line, 15, y);\r\n            y += space;\r\n            checkPageSpace(space);\r\n        });\r\n    }\r\n\r\n    const family = allErrors?.family || 3;\r\n\r\n    \/\/ --- T\u00cdTULO ---\r\n    doc.setFont(\"helvetica\", \"bold\");\r\n    doc.setFontSize(16);\r\n    doc.setTextColor(0, 102, 204);\r\n    writeLine(labels.title, 10);\r\n\r\n    doc.setDrawColor(0);\r\n    doc.line(15, y, 195, y);\r\n    y += 10;\r\n\r\n    doc.setFontSize(11);\r\n    doc.setFont(\"helvetica\", \"normal\");\r\n    doc.setTextColor(0, 0, 0);\r\n\r\n    if (allErrors.length === 0) {\r\n        writeLine(labels.noErrors);\r\n        doc.save(`${labels.filename}_${family}.pdf`);\r\n        return;\r\n    }\r\n\r\n    let multErrors = 0; let divErrors = 0;\r\n    allErrors.forEach(e => { if (e.operator === 'x') multErrors++; else if (e.operator === '\u00f7') divErrors++; });\r\n\r\n    \/\/ --- RESUMEN ---\r\n    doc.setFont(\"helvetica\", \"bold\");\r\n    writeLine(labels.summary);\r\n    doc.setFont(\"helvetica\", \"normal\");\r\n    writeLine(labels.errorsFound);\r\n    writeLine(`${labels.mult} ${multErrors}`);\r\n    writeLine(`${labels.div} ${divErrors}`);\r\n\r\n    \/\/ --- DIAGN\u00d3STICO ---\r\n    doc.setFont(\"helvetica\", \"bold\");\r\n    writeLine(labels.diag);\r\n    doc.setFont(\"helvetica\", \"normal\");\r\n    if (divErrors > multErrors) writeLine(labels.diag1);\r\n    else if (multErrors > divErrors) writeLine(labels.diag2);\r\n    else writeLine(labels.diag3);\r\n\r\n    \/\/ --- EXPLICACI\u00d3N ---\r\n    doc.setFont(\"helvetica\", \"bold\");\r\n    writeLine(labels.explanation);\r\n    doc.setFont(\"helvetica\", \"normal\");\r\n    writeLine(labels.multExp);\r\n    writeLine(`${labels.example} ${family} x 4 = ${family * 4}`);\r\n\r\n    doc.setFont(\"helvetica\", \"bold\");\r\n    writeLine(labels.remember);\r\n    doc.setFont(\"helvetica\", \"normal\");\r\n    writeLine(`${labels.ifYouKnow} ${family} x 4 = ${family * 4}${labels.then}`);\r\n    writeLine(`${family * 4} \u00f7 ${family} = 4`);\r\n\r\n    \/\/ --- EJERCICIOS ---\r\n    doc.setFont(\"helvetica\", \"bold\");\r\n    writeLine(labels.recommended);\r\n    doc.setFont(\"helvetica\", \"normal\");\r\n    allErrors.forEach((e, i) => { writeLine(`${i + 1}. ${e.factor} ${e.operator} ${e.num} = ______`); });\r\n\r\n    \/\/ --- REFUERZO ---\r\n    doc.setFont(\"helvetica\", \"bold\");\r\n    writeLine(labels.smart);\r\n    doc.setFont(\"helvetica\", \"normal\");\r\n    let refuerzoSet = new Set();\r\n    allErrors.forEach(e => {\r\n        let a = e.factor; let b = e.num;\r\n        let producto = (e.operator === 'x') ? a * b : a;\r\n        refuerzoSet.add(`${producto} \u00f7 ${family}`);\r\n        refuerzoSet.add(`${family} x ${producto \/ family}`);\r\n    });\r\n    let index = 1;\r\n    refuerzoSet.forEach(f => { writeLine(`${index}. ${f} = ______`); index++; });\r\n\r\n    \/\/ --- GU\u00cdA ADULTO ---\r\n    doc.setFont(\"helvetica\", \"bold\");\r\n    writeLine(labels.adultGuide);\r\n    doc.setFont(\"helvetica\", \"normal\");\r\n    writeLine(labels.guide1);\r\n    writeLine(labels.guide2);\r\n    writeLine(labels.guide3);\r\n    writeLine(labels.guide4);\r\n\r\n    \/\/ --- GR\u00c1FICO ---\r\n    doc.setFont(\"helvetica\", \"bold\");\r\n    writeLine(labels.freq);\r\n    doc.setFont(\"helvetica\", \"normal\");\r\n    const conteo = {};\r\n    allErrors.forEach(e => {\r\n        const pregunta = `${e.factor} ${e.operator} ${e.num}`;\r\n        conteo[pregunta] = (conteo[pregunta] || 0) + 1;\r\n    });\r\n    Object.entries(conteo).forEach(([op, count]) => {\r\n        checkPageSpace(10);\r\n        doc.text(op, 15, y);\r\n        doc.setFillColor(255, 193, 7);\r\n        doc.rect(50, y - 4, count * 10, 6, 'F');\r\n        doc.text(`${count}`, 55 + (count * 10), y);\r\n        y += 10;\r\n    });\r\n\r\n    doc.save(`${labels.filename}_${family}.pdf`);\r\n}\r\n    \/\/ Event Listeners\r\n    document.getElementById('restart-btn' + suffix)?.addEventListener('click', restartGame);\r\n    document.getElementById('verify-btn' + suffix)?.addEventListener('click', verifyAnswers);\r\n    document.getElementById('continue-btn' + suffix)?.addEventListener('click', refreshGame);\r\n    document.getElementById('finish-btn' + suffix)?.addEventListener('click', showErrors);\r\n    document.getElementById('download-txt-btn' + suffix)?.addEventListener('click', generateTextFile);\r\n    document.getElementById('closeError' + suffix)?.addEventListener('click', closeErrorModal);\r\n    document.getElementById('closeWin' + suffix)?.addEventListener('click', closeWinModal);\r\n\r\n    \/\/ Inicializaci\u00f3n\r\n    const initialExercises = JSON.parse(localStorage.getItem(exercisesKey)) || generateExercises();\r\n    showExercises(initialExercises);\r\n    startTime = new Date();\r\n})();\r\nfunction playAudio(id) {\r\n    const audio = document.getElementById(id);\r\n    if (audio) {\r\n        audio.currentTime = 0; \/\/ Reinicia el audio si se llama r\u00e1pido\r\n        audio.volume = 0.6;    \/\/ Volumen equilibrado para el ni\u00f1o\r\n        audio.play().catch(e => console.log(\"Audio pendiente de carga\"));\r\n    }\r\n}\r\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>\u00abSi sabes que 3 \u00d7 4 = 12, entonces 12 \u00f7 3 = 4 y 12 \u00f7 4 = 3. Est\u00e1s aprendiendo a conectar multiplicaci\u00f3n y divisi\u00f3n.\u00bb Racha: 0 \/ 27 Verificar respuestas Continuar reto An\u00e1lisis de errores Reiniciar reto &times; Descargar ejercicios a partir de los errores, en PDF &times;<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1407","page","type-page","status-publish","hentry"],"blocksy_meta":[],"_hostinger_reach_plugin_has_subscription_block":false,"_hostinger_reach_plugin_is_elementor":false,"_links":{"self":[{"href":"https:\/\/entrenacalculo.com\/en\/wp-json\/wp\/v2\/pages\/1407","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/entrenacalculo.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/entrenacalculo.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/entrenacalculo.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/entrenacalculo.com\/en\/wp-json\/wp\/v2\/comments?post=1407"}],"version-history":[{"count":7,"href":"https:\/\/entrenacalculo.com\/en\/wp-json\/wp\/v2\/pages\/1407\/revisions"}],"predecessor-version":[{"id":1471,"href":"https:\/\/entrenacalculo.com\/en\/wp-json\/wp\/v2\/pages\/1407\/revisions\/1471"}],"wp:attachment":[{"href":"https:\/\/entrenacalculo.com\/en\/wp-json\/wp\/v2\/media?parent=1407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}