لحظة بركة.. جاري التحميل

ربي يوفقك في مراجعتك 📖

CAPES 2026

إعداد: إيهاب سلطاني
AdZilla
! I am AdZilla. Buy my meme coin now
`); doc.close(); } window.onload = () => injectIframeAd('top-banner-ad', 'e73ea63c804e8b51d106101744f3bba7'); function nav(id) { document.querySelectorAll('#main-app > div').forEach(d => { if(d.id && d.id !== 'ad-overlay') d.classList.add('hidden'); }); document.getElementById(id).classList.remove('hidden'); if(id === 'step-4') injectIframeAd('menu-top-ad', 'e73ea63c804e8b51d106101744f3bba7'); if(id === 'quiz-ui') injectIframeAd('quiz-bottom-ad', 'e73ea63c804e8b51d106101744f3bba7'); window.scrollTo(0, 0); } async function fetchFile(fileName) { showAdOverlay("جاري جلب المعلومات.. لحظة بركة ✨"); try { const res = await fetch(`${state.folder}/${fileName}.json`); state.data = await res.json(); buildMenu(); setTimeout(() => { document.getElementById('ad-overlay').style.display = 'none'; nav('step-4'); }, 1000); } catch (e) { document.getElementById('ad-overlay').style.display = 'none'; alert("⚠️ المحتوى قيد التجهيز.."); } } function buildMenu() { const menu = document.getElementById('menu-content'); menu.innerHTML = `

${state.data.title || 'محتوى الدرس'}

`; menu.innerHTML += ``; menu.innerHTML += ``; menu.innerHTML += ``; } function showSummary() { let html = `

${state.data.title}

`; const sections = state.data.pages?.summary_page?.sections || []; if (sections.length > 0) { sections.forEach(sec => { let subs = sec.sub_elements ? `` : ""; html += `
${sec.sub_title}

${sec.content}

${subs}
`; }); } else { html += `
${state.data.summary || "النص غير متوفر."}
`; } html += `
`; document.getElementById('menu-content').innerHTML = html; } function showKeys() { const keys = state.data.pages?.keys_page?.cards || state.data.gold_keys || []; let html = `

🔑 المفاتيح الذهبية

`; keys.forEach(k => { html += `
${k.term || "نقطة:"}${k.logic || k.definition || k}
`; }); html += `
`; document.getElementById('menu-content').innerHTML = html; } function loadLessons(folder) { state.folder = folder; state.isCapes = false; const container = document.getElementById('lessons-container'); container.innerHTML = `

قائمة الدروس:

`; for(let i=1; i<=12; i++) { container.innerHTML += ``; } nav('step-3'); } function loadCapes() { state.folder = 'capes_exams'; state.isCapes = true; const container = document.getElementById('lessons-container'); container.innerHTML = `

مواضيع مناظرة الكباس:

`; // القائمة الكاملة التي طلبتها const exams = ["2008_exam", "2015_exam", "توقع رقم 1", "توقع رقم 2", "توقع رقم 3", "توقع رقم 4", "توقع رقم 5", "توقع رقم 6", "توقع رقم 7", "توقع رقم 8"]; exams.forEach((f, idx) => { if(idx === 3) { const adBox = document.createElement('div'); adBox.className = "ad-slot"; adBox.id = "capes-list-ad"; container.appendChild(adBox); setTimeout(()=>injectIframeAd('capes-list-ad', 'e73ea63c804e8b51d106101744f3bba7'), 100); } const b = document.createElement('button'); b.className = 'btn'; b.innerText = f.includes('exam') ? `📄 مناظرة ${f.split('_')[0]}` : `📄 ${f}`; b.onclick = () => fetchFile(f); container.appendChild(b); }); nav('step-3'); } function navToLevels(sub) { state.subject = sub; const container = document.getElementById('levels-container'); container.innerHTML = `

اختر المستوى:

`; const names = ["السابعة", "الثامنة", "التاسعة", "1 ثانوي", "2 ثانوي", "3 ثانوي", "باكالوريا"]; ["7","8","9","1","2","3","4"].forEach((l, idx) => { container.innerHTML += ``; }); nav('step-2'); } function startQuizWithReward() { showAdOverlay("لحظة بركة.. جاري تجهيز الاختبار 🎁"); setTimeout(() => { document.getElementById('ad-overlay').style.display = 'none'; initQuiz(); }, 2000); } function initQuiz() { let allQ = state.data.pages?.quiz_page?.questions || state.data.questions || []; quiz.questions = [...allQ].sort(() => 0.5 - Math.random()).slice(0, 10); quiz.current = 0; quiz.score = 0; quiz.answers = []; nav('quiz-ui'); showQuestion(); } function showQuestion() { if (quiz.current >= quiz.questions.length) return finishQuiz(); document.getElementById('quiz-progress').innerText = `السؤال ${quiz.current + 1} من ${quiz.questions.length}`; const q = quiz.questions[quiz.current]; document.getElementById('q-text').innerText = q.q || q.question; const box = document.getElementById('options-box'); box.innerHTML = ''; (q.o || q.options).forEach(opt => { const b = document.createElement('button'); b.className = 'option'; b.innerText = opt; b.onclick = () => { quiz.answers.push({q: q.q||q.question, cor: q.a||q.answer}); if(opt === (q.a||q.answer)) quiz.score++; quiz.current++; showQuestion(); }; box.appendChild(b); }); startTimer(); } function startTimer() { clearInterval(quiz.timer); quiz.timeLeft = 20; document.getElementById('timer-val').innerText = quiz.timeLeft; quiz.timer = setInterval(() => { quiz.timeLeft--; document.getElementById('timer-val').innerText = quiz.timeLeft; if(quiz.timeLeft <= 0) { quiz.current++; showQuestion(); } }, 1000); } function finishQuiz() { nav('result-ui'); document.getElementById('res-score').innerText = `${quiz.score} / ${quiz.questions.length}`; let h = "

الإصلاح:

"; quiz.answers.forEach(a => h += `

س: ${a.q}
الصح: ${a.cor}

`); document.getElementById('correction-box').innerHTML = h; } function showAdOverlay(msg) { document.getElementById('ad-msg').innerText = msg; document.getElementById('ad-overlay').style.display = 'flex'; } function triggerIntersAd(target) { showAdOverlay("جاري الحفظ.. أحسنت العمل! 😊"); setTimeout(() => { location.reload(); }, 1500); } function showInfo(type) { alert(type === 'privacy' ? "نستخدم الإعلانات لدعم التطبيق مجاناً. لا نجمع بيانات شخصية." : "تطبيق تعليمي تونسي بإشراف إيهاب سلطاني لدعم مناظرة الكباس."); }