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kB,sBAChCD,EAAAA,cAACoF,EAAAA,EAAmB,CAACC,MAAM,OAAOrC,OAAQ,KACxChD,EAAAA,cAAC2G,EAAAA,EAAQ,KACP3G,EAAAA,cAAC4G,EAAAA,EAAG,CACFjE,KAAMw1B,EAAOa,YAAY96B,KAAI85B,IAAQ,IAChCA,EACHj3B,KAAMk3B,EAAaD,EAASA,WAAaA,EAASA,SAClD1xB,KAAMyxB,EAAiBC,EAASA,cAElCryB,QAAQ,eACRuB,QAAQ,OACRJ,GAAG,MACHC,GAAG,MACHE,YAAa,IACbE,MAAOA,EACLL,KACAC,KACAmyB,WACAC,cACAlyB,cACA7G,QACA2E,YAEA,MAAMq0B,EAAS94B,KAAK6yB,GAAK,IACnBkG,EAAS,GAAKF,GAAelyB,EAAckyB,GAC3CG,EAAIxyB,EAAKuyB,EAAS/4B,KAAKi5B,KAAKL,EAAWE,GACvCI,EAAIzyB,EAAKsyB,EAAS/4B,KAAKm5B,KAAKP,EAAWE,GAE7C,OACEp5B,EAAAA,cAAA,QACEs5B,EAAGA,EACHE,EAAGA,EACHv5B,UAAU,UACVqG,KAAK,UACLozB,WAAYJ,EAAIxyB,EAAK,QAAU,MAC/B6yB,iBAAiB,WAEf,GAAEv5B,EAAMw5B,0BACL,IAIb55B,EAAAA,cAACmG,EAAAA,EAAM,CACLyB,UAAWA,CAACxH,EAAOiH,IACjBrH,EAAAA,cAAA,QAAMC,UAAU,wBAAwBG,GAE1CuM,OAAO,WACPktB,MAAM,QACNC,cAAc,iB,oFC1P3B,MAAM5hB,EAAiBA,KAC5B,MAAM6hB,EAAW93B,SAASC,cAAc,yBACxC,GAAI63B,EAAU,CACX,MAAMC,EAAYD,EAAS53B,QAC3BC,EAAAA,EAAMC,SAASC,QAAQC,OAAO,gBAAkBy3B,CACnD,E","sources":["webpack://app/./app/javascript/components/ sync ^\\.\\/.*$","webpack://app/./app/javascript/components/CommissionCalculator.jsx","webpack://app/./app/javascript/components/analytics/MetricsDashboard.jsx","webpack://app/./app/javascript/components/analytics/StudentPerformance.jsx","webpack://app/./app/javascript/components/challenges/ChallengeInterface.jsx","webpack://app/./app/javascript/components/chat/AppLayout.jsx","webpack://app/./app/javascript/components/chat/ChatHistory.jsx","webpack://app/./app/javascript/components/chat/ChatInterface.jsx","webpack://app/./app/javascript/components/chat/ChatModal.jsx","webpack://app/./app/javascript/components/chat/ConversationContext.jsx","webpack://app/./app/javascript/components/chat/ConversationHeader.jsx","webpack://app/./app/javascript/components/chat/EmptyConversation.jsx","webpack://app/./app/javascript/components/chat/ErrorAlert.jsx","webpack://app/./app/javascript/components/chat/FileDisplay.jsx","webpack://app/./app/javascript/components/chat/FileStatusPoller.jsx","webpack://app/./app/javascript/components/chat/FileUpload.jsx","webpack://app/./app/javascript/components/chat/FooterInput.jsx","webpack://app/./app/javascript/components/chat/MainContent.jsx","webpack://app/./app/javascript/components/chat/Message.jsx","webpack://app/./app/javascript/components/chat/MessageList.jsx","webpack://app/./app/javascript/components/chat/MessageSkeleton.jsx","webpack://app/./app/javascript/components/chat/ModelSelector.jsx","webpack://app/./app/javascript/components/chat/ModelSettingsScreen.jsx","webpack://app/./app/javascript/components/chat/Sidebar.jsx","webpack://app/./app/javascript/components/chat/StudyAssistantInterface.jsx","webpack://app/./app/javascript/components/exam_materials/FileUploader.jsx","webpack://app/./app/javascript/components/quiz_generators/AnswerEditor.jsx","webpack://app/./app/javascript/components/quiz_generators/InspirationalQuote.jsx","webpack://app/./app/javascript/components/quiz_generators/QuestionEditor.jsx","webpack://app/./app/javascript/components/quiz_generators/QuizEditor.jsx","webpack://app/./app/javascript/components/quiz_generators/QuizProgress.jsx","webpack://app/./app/javascript/components/quizzes/AnswerOptions.jsx","webpack://app/./app/javascript/components/quizzes/QuizAttempt.jsx","webpack://app/./app/javascript/components/quizzes/QuizCompletionSummary.jsx","webpack://app/./app/javascript/components/quizzes/QuizTakingInterface.jsx","webpack://app/./app/javascript/components/study_plan/StudyPlanStatus.jsx","webpack://app/./app/javascript/components/token_usage/TokenUsageDisplay.jsx","webpack://app/./app/javascript/helpers.js"],"sourcesContent":["var map = {\n\t\"./CommissionCalculator\": 80232,\n\t\"./CommissionCalculator.jsx\": 80232,\n\t\"./analytics/MetricsDashboard\": 64656,\n\t\"./analytics/MetricsDashboard.jsx\": 64656,\n\t\"./analytics/StudentPerformance\": 23924,\n\t\"./analytics/StudentPerformance.jsx\": 23924,\n\t\"./challenges/ChallengeInterface\": 85020,\n\t\"./challenges/ChallengeInterface.jsx\": 85020,\n\t\"./chat/AppLayout\": 28268,\n\t\"./chat/AppLayout.jsx\": 28268,\n\t\"./chat/ChatHistory\": 70533,\n\t\"./chat/ChatHistory.jsx\": 70533,\n\t\"./chat/ChatInterface\": 62915,\n\t\"./chat/ChatInterface.jsx\": 62915,\n\t\"./chat/ChatModal\": 89479,\n\t\"./chat/ChatModal.jsx\": 89479,\n\t\"./chat/ConversationContext\": 15873,\n\t\"./chat/ConversationContext.jsx\": 15873,\n\t\"./chat/ConversationHeader\": 43005,\n\t\"./chat/ConversationHeader.jsx\": 43005,\n\t\"./chat/EmptyConversation\": 28474,\n\t\"./chat/EmptyConversation.jsx\": 28474,\n\t\"./chat/ErrorAlert\": 22191,\n\t\"./chat/ErrorAlert.jsx\": 22191,\n\t\"./chat/FileDisplay\": 8502,\n\t\"./chat/FileDisplay.jsx\": 8502,\n\t\"./chat/FileStatusPoller\": 27227,\n\t\"./chat/FileStatusPoller.jsx\": 27227,\n\t\"./chat/FileUpload\": 69755,\n\t\"./chat/FileUpload.jsx\": 69755,\n\t\"./chat/FooterInput\": 59220,\n\t\"./chat/FooterInput.jsx\": 59220,\n\t\"./chat/MainContent\": 24697,\n\t\"./chat/MainContent.jsx\": 24697,\n\t\"./chat/Message\": 62222,\n\t\"./chat/Message.jsx\": 62222,\n\t\"./chat/MessageList\": 41453,\n\t\"./chat/MessageList.jsx\": 41453,\n\t\"./chat/MessageSkeleton\": 78857,\n\t\"./chat/MessageSkeleton.jsx\": 78857,\n\t\"./chat/ModelSelector\": 4178,\n\t\"./chat/ModelSelector.jsx\": 4178,\n\t\"./chat/ModelSettingsScreen\": 20331,\n\t\"./chat/ModelSettingsScreen.jsx\": 20331,\n\t\"./chat/Sidebar\": 27994,\n\t\"./chat/Sidebar.jsx\": 27994,\n\t\"./chat/StudyAssistantInterface\": 89818,\n\t\"./chat/StudyAssistantInterface.jsx\": 89818,\n\t\"./exam_materials/FileUploader\": 24134,\n\t\"./exam_materials/FileUploader.jsx\": 24134,\n\t\"./quiz_generators/AnswerEditor\": 93548,\n\t\"./quiz_generators/AnswerEditor.jsx\": 93548,\n\t\"./quiz_generators/InspirationalQuote\": 80962,\n\t\"./quiz_generators/InspirationalQuote.jsx\": 80962,\n\t\"./quiz_generators/QuestionEditor\": 72398,\n\t\"./quiz_generators/QuestionEditor.jsx\": 72398,\n\t\"./quiz_generators/QuizEditor\": 39032,\n\t\"./quiz_generators/QuizEditor.jsx\": 39032,\n\t\"./quiz_generators/QuizProgress\": 73770,\n\t\"./quiz_generators/QuizProgress.jsx\": 73770,\n\t\"./quizzes/AnswerOptions\": 86723,\n\t\"./quizzes/AnswerOptions.jsx\": 86723,\n\t\"./quizzes/QuizAttempt\": 27375,\n\t\"./quizzes/QuizAttempt.jsx\": 27375,\n\t\"./quizzes/QuizCompletionSummary\": 20227,\n\t\"./quizzes/QuizCompletionSummary.jsx\": 20227,\n\t\"./quizzes/QuizTakingInterface\": 79146,\n\t\"./quizzes/QuizTakingInterface.jsx\": 79146,\n\t\"./study_plan/StudyPlanStatus\": 51907,\n\t\"./study_plan/StudyPlanStatus.jsx\": 51907,\n\t\"./token_usage/TokenUsageDisplay\": 55303,\n\t\"./token_usage/TokenUsageDisplay.jsx\": 55303\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 982;","import React, { useState, useEffect } from 'react';\n\nconst CommissionCalculator = ({ bundles }) => {\n const [referralCount, setReferralCount] = useState(1);\n const [selectedBundle, setSelectedBundle] = useState(null);\n const [purchaseFrequency, setPurchaseFrequency] = useState('once'); // once, monthly, quarterly\n const [estimatedEarnings, setEstimatedEarnings] = useState(0);\n\n const COMMISSION_RATE = 0.20; // 20%\n const MONTHS = 12;\n\n useEffect(() => {\n calculateEarnings();\n }, [referralCount, selectedBundle, purchaseFrequency]);\n\n const calculateEarnings = () => {\n if (!selectedBundle) return;\n\n const bundlePrice = selectedBundle.price / 100; // Convert from cents to GHS\n let totalPurchases = bundlePrice;\n\n // Calculate based on frequency\n switch (purchaseFrequency) {\n case 'monthly':\n totalPurchases *= MONTHS;\n break;\n case 'quarterly':\n totalPurchases *= 4; // 4 purchases per year\n break;\n default: // once\n break;\n }\n\n const commission = totalPurchases * COMMISSION_RATE * referralCount;\n setEstimatedEarnings(commission);\n };\n\n return (\n
\n
\n

\n \n Commission Calculator\n

\n\n
\n \n setReferralCount(Math.max(1, parseInt(e.target.value) || 1))}\n />\n
\n\n
\n \n setSelectedBundle(bundles[e.target.value])}\n defaultValue=\"\"\n >\n \n {Object.entries(bundles).map(([key, bundle]) => (\n \n ))}\n \n
\n\n
\n \n setPurchaseFrequency(e.target.value)}\n >\n \n \n \n \n
\n\n
\n

Estimated Earnings

\n
\n GHS {estimatedEarnings.toFixed(2)}\n
\n

\n Over 12 months period\n

\n
\n
\n
\n );\n};\n\nexport default CommissionCalculator;\n","import React, { useState, useEffect } from 'react';\nimport { LineChart, Line, BarChart, Bar, PieChart, Pie, Cell, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts';\nimport axios from 'axios';\n\n// We're assuming axios is already available in the global scope\n// If you need a direct import, uncomment: import axios from 'axios';\n\nconst MetricsDashboard = ({ userId, timeRange }) => {\n const [metrics, setMetrics] = useState(null);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState(null);\n const [activeTimeRange, setActiveTimeRange] = useState(timeRange || 'week');\n\n // Colors for charts - using PremioQuest theme colors\n const COLORS = {\n primary: '#4F46E5',\n success: '#22C55E',\n info: '#0EA5E9',\n warning: '#F59E0B',\n danger: '#EF4444',\n secondary: '#94A3B8'\n };\n\n const CHART_COLORS = [\n COLORS.primary,\n COLORS.success,\n COLORS.info,\n COLORS.warning,\n COLORS.danger,\n COLORS.secondary\n ];\n\n useEffect(() => {\n fetchMetrics(activeTimeRange);\n }, [activeTimeRange]);\n\n const fetchMetrics = async (range) => {\n setLoading(true);\n try {\n // Setup CSRF token for Axios\n const token = document.querySelector('meta[name=\"csrf-token\"]').content;\n axios.defaults.headers.common['X-CSRF-Token'] = token;\n\n const response = await axios.get(`/metrics/data?time_range=${range}`);\n setMetrics(response.data);\n setError(null);\n } catch (err) {\n console.error('Error fetching metrics:', err);\n setError('Failed to load metrics. Please try again.');\n } finally {\n setLoading(false);\n }\n };\n\n const handleTimeRangeChange = (range) => {\n setActiveTimeRange(range);\n };\n\n if (loading) {\n return (\n
\n
\n Loading...\n
\n
\n );\n }\n\n if (error) {\n return (\n
\n {error}\n
\n );\n }\n\n if (!metrics) {\n return (\n
\n No metrics data available.\n
\n );\n }\n\n // Check if the API returned an error\n if (metrics.error) {\n return (\n
\n
\n
Metrics Issue
\n

{metrics.error}

\n
\n

You can still view available information below.

\n
\n\n {/* Display summary cards with the basic data we have */}\n
\n
\n
\n
\n
\n
\n
\n Quizzes Taken\n
\n
\n {metrics.summary.total_quizzes_taken || 0}\n
\n
\n
\n \n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n
\n
\n Study Blocks Completed\n
\n
\n {metrics.summary.study_blocks_completed || 0}\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n );\n }\n\n // Create a formatter for dates\n const formatDate = (dateString) => {\n const date = new Date(dateString);\n return date.toLocaleDateString('en-US', { month: 'short', day: 'numeric' });\n };\n\n // Safely get data, handling possible undefined properties\n const safeGetData = (obj, path, defaultValue = {}) => {\n if (!obj) return defaultValue;\n\n const keys = path.split('.');\n const result = keys.reduce((acc, key) =>\n (acc && acc[key] !== undefined) ? acc[key] : null, obj);\n\n // Return the default value if result is null, undefined, or an empty object\n if (result === null || result === undefined ||\n (typeof result === 'object' && Object.keys(result).length === 0)) {\n return defaultValue;\n }\n\n return result;\n };\n\n // For data that should be an array when empty\n const safeGetArray = (obj, path) => {\n const result = safeGetData(obj, path, null);\n if (!result || Object.keys(result).length === 0) return [];\n return result;\n };\n\n const attemptsByDayData = Object.entries(safeGetData(metrics, 'quiz_metrics.attempt_metrics.attempts_by_day', {})).map(([date, count]) => ({\n date: formatDate(date),\n attempts: count\n }));\n\n // Parse token usage trend data for chart\n const tokenUsageTrendData = Object.entries(safeGetData(metrics, 'token_metrics.usage_trend', {})).map(([date, tokens]) => ({\n date: formatDate(date),\n tokens\n }));\n\n return (\n
\n {/* Time Range Selector */}\n
\n
\n
\n
\n
Metrics Dashboard
\n
\n handleTimeRangeChange('week')}\n >\n Week\n \n handleTimeRangeChange('month')}\n >\n Month\n \n handleTimeRangeChange('all_time')}\n >\n All Time\n \n
\n {/* \n Export\n */}\n
\n
\n
\n
\n\n {/* Summary Cards */}\n
\n
\n
\n
\n
\n
\n
\n Quizzes Taken\n
\n
\n {metrics.summary.total_quizzes_taken}\n
\n
\n
\n \n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n
\n
\n Study Blocks Completed\n
\n
\n {metrics.summary.study_blocks_completed}\n
\n
\n
\n \n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n
\n
\n Active Days\n
\n
\n {metrics.summary.active_days}\n
\n
\n
\n \n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n
\n
\n Current Streak\n
\n
\n {metrics.summary.current_streak} days\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n\n {/* Insights Section */}\n {metrics.insights && metrics.insights.length > 0 && (\n
\n
\n
\n
\n
Personalized Insights
\n
\n
\n
\n {metrics.insights.map((insight, index) => (\n
\n
\n
\n
{insight.category.replace(/_/g, ' ').toUpperCase()}
\n

{insight.message}

\n
\n
\n
\n ))}\n
\n
\n
\n
\n
\n )}\n\n {/* Charts Row */}\n
\n {/* Quiz Attempts Chart */}\n
\n
\n
\n
Quiz Activity
\n
\n
\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n\n {/* Token Usage Chart */}\n
\n
\n
\n
Token Usage
\n
\n
\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n
\n\n
\n {/* Question Type Distribution */}\n
\n
\n
\n
Question Types
\n
\n
\n \n \n type && count !== undefined)\n .map(([type, count]) => ({\n name: type.replace(/_/g, ' '),\n value: count || 0\n }))}\n cx=\"50%\"\n cy=\"50%\"\n labelLine={false}\n outerRadius={80}\n fill=\"#8884d8\"\n dataKey=\"value\"\n nameKey=\"name\"\n label={({ name, percent }) => `${name}: ${(percent * 100).toFixed(0)}%`}\n >\n {Object.entries(safeGetData(metrics, 'quiz_metrics.question_type_distribution', {}))\n .filter(([type, count]) => type && count !== undefined)\n .map((entry, index) => (\n \n ))}\n \n \n \n \n
\n
\n
\n\n {/* Performance by Time of Day */}\n
\n
\n
\n
Performance by Time of Day
\n
\n
\n \n time && score !== undefined)\n .map(([time, score]) => ({\n time: time.charAt(0).toUpperCase() + time.slice(1),\n score: score || 0\n }))}\n >\n \n \n \n [`${value}%`, 'Average Score']}\n contentStyle={{ backgroundColor: '#0F172A', borderColor: 'rgba(255,255,255,0.1)', color: '#CBD5E1' }}\n labelStyle={{ color: '#CBD5E1' }}\n />\n \n \n \n \n
\n
\n
\n
\n\n {/* Study Plan Section */}\n
\n
\n
\n
\n
Study Plan Progress
\n
\n
\n
\n {/* Study Plan Adherence */}\n
\n
Study Plan Adherence
\n
\n \n {safeGetData(metrics, 'study_plan_metrics.study_plan_adherence.completion_rate') || 0}%\n
\n
\n\n
\n \n Completed\n \n \n Past Due: {safeGetData(metrics, 'study_plan_metrics.study_plan_adherence.past_due_count') || 0}\n \n
\n
\n\n {/* Most Studied Topics */}\n
\n
Most Studied Topics
\n
    \n {Object.entries(safeGetData(metrics, 'study_plan_metrics.most_studied_topics', {}))\n .filter(([topic, count]) => topic && count !== undefined)\n .slice(0, 5)\n .map(([topic, count], index) => (\n
  • \n {topic}\n {count}\n
  • \n ))}\n {Object.entries(safeGetData(metrics, 'study_plan_metrics.most_studied_topics', {})).length === 0 && (\n
  • \n No topic data available\n
  • \n )}\n
\n
\n
\n
\n
\n
\n
\n\n {/* Miss Odarl Section */}\n
\n
\n
\n
\n
Miss Odarl Activity
\n
\n
\n
\n
\n
Model Usage
\n \n \n model && count !== undefined)\n .map(([model, count]) => ({\n name: model.split('/').pop(), // Extract just the model name part\n value: count || 0\n }))}\n cx=\"50%\"\n cy=\"50%\"\n outerRadius={60}\n fill=\"#8884d8\"\n dataKey=\"value\"\n >\n {Object.entries(safeGetData(metrics, 'assistant_metrics.model_usage', {}))\n .filter(([model, count]) => model && count !== undefined)\n .map((entry, index) => (\n \n ))}\n \n \n \n \n \n
\n\n
\n
Usage Statistics
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Total Conversations{metrics.assistant_metrics.total_conversations}
Total Messages{metrics.assistant_metrics.total_messages}
File Uploads{metrics.assistant_metrics.file_uploads.total_files}
\n
\n
\n
\n
\n
\n
\n\n {/* Achievements Section */}\n {metrics.achievements && metrics.achievements.length > 0 && (\n
\n
\n
\n
\n
Achievements
\n
\n
\n
\n {metrics.achievements.map((achievement, index) => (\n
\n
\n
\n
\n
\n \n
\n
\n
{achievement.title}
\n

{achievement.description}

\n
\n
\n
\n
\n
\n ))}\n
\n
\n
\n
\n
\n )}\n \n );\n};\n\nexport default MetricsDashboard;\n","import React, { useState, useEffect } from 'react';\nimport {\n LineChart, Line, BarChart, Bar, PieChart, Pie, RadarChart, Radar,\n ResponsiveContainer, XAxis, YAxis, CartesianGrid, Tooltip, Legend,\n PolarGrid, PolarAngleAxis, PolarRadiusAxis, Cell\n} from 'recharts';\nimport { Tab, Tabs, Card, Alert, ProgressBar, Spinner } from 'react-bootstrap';\n\nconst COLORS = ['#0088FE', '#00C49F', '#FFBB28', '#FF8042', '#8884d8', '#82ca9d'];\n\nconst StudentPerformance = ({ user }) => {\n const [activeTab, setActiveTab] = useState('overview');\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState(null);\n const [data, setData] = useState({\n overview: null,\n performance: null,\n skills: null,\n comparison: null,\n timeAnalytics: null,\n examPrep: null\n });\n\n useEffect(() => {\n const fetchAllData = async () => {\n setLoading(true);\n try {\n // Fetch overview data initially\n const overviewRes = await fetch('/api/v1/analytics/student_performance/overview');\n const overviewData = await overviewRes.json();\n setData(prev => ({ ...prev, overview: overviewData.data }));\n\n // Load other data as needed based on tab\n setLoading(false);\n } catch (err) {\n console.error('Error fetching data:', err);\n setError('Failed to load performance data. Please try again later.');\n setLoading(false);\n }\n };\n\n fetchAllData();\n }, []);\n\n // Load tab data when tab changes\n useEffect(() => {\n const loadTabData = async () => {\n // Skip if we already have the data or if it's the overview tab (loaded initially)\n if (activeTab === 'overview' || data[activeTab]) return;\n\n setLoading(true);\n\n try {\n let endpoint;\n switch(activeTab) {\n case 'performance':\n endpoint = '/api/v1/analytics/student_performance/performance_metrics';\n break;\n case 'skills':\n endpoint = '/api/v1/analytics/student_performance/skill_analysis';\n break;\n case 'comparison':\n endpoint = '/api/v1/analytics/student_performance/comparison_metrics';\n break;\n case 'timeAnalytics':\n endpoint = '/api/v1/analytics/student_performance/time_analytics';\n break;\n case 'examPrep':\n endpoint = '/api/v1/analytics/student_performance/exam_preparation';\n break;\n default:\n return;\n }\n\n const response = await fetch(endpoint);\n const result = await response.json();\n\n if (result.error) {\n throw new Error(result.message || result.error);\n }\n\n setData(prev => ({\n ...prev,\n [activeTab]: result.data\n }));\n } catch (err) {\n console.error(`Error loading ${activeTab} data:`, err);\n setError(`Failed to load ${activeTab} data. Please try again.`);\n } finally {\n setLoading(false);\n }\n };\n\n loadTabData();\n }, [activeTab, data]);\n\n // Overview tab content\n const renderOverview = () => {\n if (!data.overview) return ;\n\n const {\n total_attempts, completed_attempts, average_score, average_time,\n completion_rate, recent_trend, weekly_activity, streak_data\n } = data.overview;\n\n return (\n
\n {/* Key Stats */}\n
\n \n \n
Total Attempts
\n

{total_attempts}

\n

\n {completed_attempts} completed ({completion_rate}%)\n

\n
\n
\n
\n\n
\n \n \n
Average Score
\n

{average_score && average_score.toFixed(1) || 0}%

\n

\n {recent_trend.change_percentage > 0 ? '↑' : '↓'}\n {Math.abs(recent_trend.change_percentage || 0)}% from previous\n

\n
\n
\n
\n\n
\n \n \n
Average Time
\n

\n {Math.floor((average_time || 0) / 60)}m {Math.round((average_time || 0) % 60)}s\n

\n

Per quiz attempt

\n
\n
\n
\n\n
\n \n \n
Learning Streak
\n

{streak_data.current_streak || 0}

\n

\n Longest: {streak_data.longest_streak || 0} days\n

\n
\n
\n
\n\n {/* Weekly Activity Chart */}\n
\n \n \n
Weekly Activity
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n
\n );\n };\n\n // Performance tab content\n const renderPerformance = () => {\n if (!data.performance) return ;\n\n const {\n score_distribution, pass_rate, best_scores,\n quiz_type_performance, performance_by_time, improvement_trend\n } = data.performance;\n\n // Transform score distribution for chart\n const scoreDistData = Object.entries(score_distribution || {}).map(([bucket, count]) => {\n const minScore = bucket * 10;\n const maxScore = (parseInt(bucket) + 1) * 10;\n return {\n range: `${minScore}-${maxScore}%`,\n count\n };\n });\n\n return (\n
\n {/* Score Distribution */}\n
\n \n \n
Score Distribution
\n \n \n \n \n \n \n \n {scoreDistData.map((entry, index) => (\n \n ))}\n \n \n \n
\n
\n
\n\n {/* Performance by Time of Day */}\n
\n \n \n
Performance by Time of Day
\n \n \n \n \n \n \n \n {performance_by_time.map((entry, index) => (\n \n ))}\n \n \n \n
\n
\n
\n\n {/* Improvement Trend */}\n
\n \n \n
Score Improvement Trend
\n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n\n {/* Quiz Type Performance */}\n
\n \n \n
Quiz Type Performance
\n \n \n `${quiz_type_label}: ${avg_score.toFixed(1)}%`}\n >\n {quiz_type_performance.map((entry, index) => (\n \n ))}\n \n \n \n \n \n
\n
\n
\n\n {/* Best Scores */}\n
\n \n \n
Top Scores (Pass Rate: {pass_rate}%)
\n \n \n \n \n \n \n \n {best_scores.slice(0, 5).map((entry, index) => (\n \n ))}\n \n \n \n
\n
\n
\n
\n );\n };\n\n // Skills Analysis tab content\n const renderSkills = () => {\n if (!data.skills) return ;\n\n const {\n subject_performance, question_type_analysis,\n topic_weakness, recommended_topics\n } = data.skills;\n\n // Transform subject performance for radar chart\n const subjectData = subject_performance.map(subject => ({\n subject: subject.name,\n score: subject.average_score,\n attempts: subject.attempt_count\n }));\n\n return (\n
\n {/* Subject Performance Radar */}\n
\n \n \n
Subject Performance
\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n\n {/* Question Type Analysis */}\n
\n \n \n
Question Type Performance
\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n\n {/* Topic Weaknesses */}\n
\n \n \n
Areas for Improvement
\n
\n \n \n \n \n \n \n \n \n \n {topic_weakness.map((topic, idx) => (\n \n \n \n \n \n ))}\n \n
TopicScoreBelow Avg
{topic.name}{topic.score}%-{topic.below_avg_by}%
\n
\n
\n
\n
\n\n {/* Recommendations */}\n
\n \n \n
Recommended Focus Areas
\n \n Study Recommendations\n

Based on your performance data, consider focusing on these areas:

\n
\n\n
Weak Areas:
\n
    \n {recommended_topics.weak_areas.map((topic, idx) => (\n
  • \n {topic.name} - {topic.score}% (below avg by {topic.below_avg_by}%)\n
  • \n ))}\n
\n\n
Under-practiced Areas:
\n
    \n {recommended_topics.under_practiced.map((topic, idx) => (\n
  • \n {topic.name} - Only {topic.attempts} attempts\n
  • \n ))}\n
\n
\n
\n
\n
\n );\n };\n\n // Time Analytics tab content\n const renderTimeAnalytics = () => {\n if (!data.timeAnalytics) return ;\n\n const {\n daily_activity, performance_trend,\n study_consistency, average_session_duration\n } = data.timeAnalytics;\n\n return (\n
\n {/* Performance Trend */}\n
\n \n \n
30-Day Performance Trend
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n\n {/* Study Consistency */}\n
\n \n \n
Study Consistency
\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n\n {/* Session Duration */}\n
\n \n \n
Study Sessions
\n
\n
\n
Average Session Duration
\n

{average_session_duration.average_minutes} min

\n
\n\n
\n
Total Study Sessions
\n

{average_session_duration.session_count}

\n
\n\n
\n
Longest Session
\n

{average_session_duration.longest_session_minutes} min

\n
\n
\n
\n
\n
\n
\n );\n };\n\n // Comparison tab content\n const renderComparison = () => {\n if (!data.comparison) return ;\n\n const {\n subject_comparison, difficulty_comparison,\n score_percentile, time_efficiency_percentile\n } = data.comparison;\n\n return (\n
\n {/* Percentile Rankings */}\n
\n \n \n
Your Performance Ranking
\n
\n
Score Percentile
\n

You score better than {score_percentile.percentile}% of users

\n 75 ? \"success\" : score_percentile.percentile > 50 ? \"info\" : \"warning\"}\n className=\"mb-3\"\n />\n\n
\n Your Avg: {score_percentile && score_percentile.user_average.toFixed(1)}%\n Platform Avg: {score_percentile && score_percentile.class_average.toFixed(1)}%\n
\n
\n\n
\n
Time Efficiency Percentile
\n

You complete quizzes faster than {time_efficiency_percentile.percentile}% of users

\n 75 ? \"success\" : time_efficiency_percentile.percentile > 50 ? \"info\" : \"warning\"}\n className=\"mb-3\"\n />\n\n
\n Your Avg: {Math.floor(time_efficiency_percentile.user_average_seconds / 60)}m {Math.round(time_efficiency_percentile.user_average_seconds % 60)}s\n Platform Avg: {Math.floor(time_efficiency_percentile.class_average_seconds / 60)}m {Math.round(time_efficiency_percentile.class_average_seconds % 60)}s\n
\n
\n
\n
\n
\n\n {/* Subject Comparison */}\n
\n \n \n
Subject Comparison
\n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n\n {/* Difficulty Comparison */}\n
\n \n \n
Performance by Difficulty Level
\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n
\n );\n };\n\n // Exam Preparation tab content\n const renderExamPrep = () => {\n if (!data.examPrep) return ;\n\n const {\n exam_success_rate, practice_to_exam_correlation,\n study_plan_impact, recent_progress\n } = data.examPrep;\n\n return (\n
\n {/* Exam Success Rate */}\n
\n \n \n
Exam Performance
\n
\n

{exam_success_rate.success_rate}%

\n

Success Rate

\n
\n\n
\n
\n

{exam_success_rate.total_exams}

\n

Total Exams

\n
\n\n
\n

{exam_success_rate.passed_exams}

\n

Passed

\n
\n
\n
\n
\n
\n\n {/* Practice to Exam Correlation */}\n
\n \n \n
Practice vs. Exam Performance
\n
\n
\n
Practice Quiz Average
\n

{practice_to_exam_correlation.practice_avg}%

\n
\n\n
\n
Exam Average
\n

{practice_to_exam_correlation.exam_avg}%

\n
\n\n
\n
Difference
\n

= 0 ? \"text-success\" : \"text-danger\"}>\n {practice_to_exam_correlation.difference >= 0 ? \"+\" : \"\"}{practice_to_exam_correlation.difference}%\n

\n

\n {practice_to_exam_correlation.difference >= 0\n ? \"You perform better on exams than practice\"\n : \"Your exam scores are lower than practice scores\"}\n

\n
\n
\n
\n
\n
\n\n {/* Study Plan Impact */}\n
\n \n \n
Study Plan Impact
\n {study_plan_impact.has_impact_data ? (\n
\n
\n
With Study Plan
\n

{study_plan_impact.with_plan_avg}%

\n
\n\n
\n
Without Study Plan
\n

{study_plan_impact.without_plan_avg}%

\n
\n\n
\n
Improvement
\n

= 0 ? \"text-success\" : \"text-danger\"}>\n {study_plan_impact.improvement >= 0 ? \"+\" : \"\"}{study_plan_impact.improvement}%\n

\n
\n
\n ) : (\n
\n

You haven't generated any study plans yet.

\n \n
\n )}\n
\n
\n
\n\n {/* Upcoming Exams */}\n
\n \n \n
Upcoming Exam Preparation
\n {recent_progress && recent_progress.length > 0 ? (\n
\n \n \n \n \n \n \n \n \n \n {recent_progress.map((exam, idx) => (\n \n \n \n \n \n ))}\n \n
ExamDays LeftProgress
{exam.exam_name}{exam.days_remaining}\n
\n 70 ? \"success\" : \"warning\"}\n className=\"flex-grow-1 me-2\"\n />\n {exam.avg_recent_score}%\n
\n
\n
\n ) : (\n
\n

No upcoming exams found.

\n \n
\n )}\n
\n
\n
\n
\n );\n };\n\n return (\n
\n
\n

Performance Analysis for {user.full_name}

\n
\n\n {error && (\n \n {error}\n \n )}\n\n setActiveTab(key)}\n className=\"mb-4 custom-tabs\"\n >\n \n {loading && activeTab === 'overview' ? : renderOverview()}\n \n \n {loading && activeTab === 'performance' ? : renderPerformance()}\n \n \n {loading && activeTab === 'skills' ? : renderSkills()}\n \n \n {loading && activeTab === 'timeAnalytics' ? : renderTimeAnalytics()}\n \n \n {loading && activeTab === 'comparison' ? : renderComparison()}\n \n \n {loading && activeTab === 'examPrep' ? : renderExamPrep()}\n \n \n
\n );\n};\n\nexport default StudentPerformance;\n","import React, { useState, useEffect, useRef } from 'react';\nimport PropTypes from 'prop-types';\n\nconst ChallengeInterface = ({ challengeId, duration }) => {\n // State variables\n const [questions, setQuestions] = useState([]);\n const [currentIndex, setCurrentIndex] = useState(0);\n const [selectedOption, setSelectedOption] = useState(null);\n const [answered, setAnswered] = useState(false);\n const [score, setScore] = useState(0);\n const [streak, setStreak] = useState(0);\n const [timeLeft, setTimeLeft] = useState(duration);\n const [loading, setLoading] = useState(true);\n const [showHint, setShowHint] = useState(false);\n const [isSubmitting, setIsSubmitting] = useState(false);\n const [usedHint, setUsedHint] = useState(false);\n const [error, setError] = useState(null);\n const [completed, setCompleted] = useState(false);\n\n // Refs\n const timerRef = useRef(null);\n\n // Load questions on component mount\n useEffect(() => {\n fetchQuestions();\n\n return () => {\n clearInterval(timerRef.current);\n };\n }, []);\n\n // Start timer when questions are loaded\n useEffect(() => {\n if (questions.length > 0 && !completed) {\n startTimer();\n }\n }, [questions, completed]);\n\n // Fetch questions from the server\n const fetchQuestions = async () => {\n try {\n setLoading(true);\n const response = await fetch(`/challenges/${challengeId}/challenge_questions`);\n\n if (!response.ok) {\n throw new Error('Failed to load questions');\n }\n\n const data = await response.json();\n setQuestions(data.questions || []);\n setLoading(false);\n } catch (err) {\n console.error('Error fetching questions:', err);\n setError('Failed to load questions. Please refresh the page.');\n setLoading(false);\n }\n };\n\n // Start the countdown timer\n const startTimer = () => {\n timerRef.current = setInterval(() => {\n setTimeLeft(prev => {\n if (prev <= 1) {\n clearInterval(timerRef.current);\n completeChallenge();\n return 0;\n }\n return prev - 1;\n });\n }, 1000);\n };\n\n // Format time as MM:SS\n const formatTime = (seconds) => {\n const mins = Math.floor(seconds / 60);\n const secs = seconds % 60;\n return `${mins.toString().padStart(2, '0')}:${secs.toString().padStart(2, '0')}`;\n };\n\n // Handle answer selection\n const handleSelectOption = (index) => {\n if (answered || isSubmitting) return;\n\n setSelectedOption(index);\n setIsSubmitting(true);\n\n // Submit the answer to the server\n submitAnswer(index);\n };\n\n // Submit answer to the server\n const submitAnswer = async (optionIndex) => {\n try {\n const response = await fetch(`/challenges/${challengeId}/challenge_answer`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': document.querySelector('[name=\"csrf-token\"]').content\n },\n body: JSON.stringify({\n question_id: questions[currentIndex].id,\n selected_option: optionIndex,\n hint_used: usedHint,\n response_time: duration - timeLeft\n })\n });\n\n if (!response.ok) {\n throw new Error('Failed to submit answer');\n }\n\n const data = await response.json();\n\n // Update score and streak\n setScore(prev => prev + (data.points_earned || 0));\n\n if (data.is_correct) {\n setStreak(prev => prev + 1);\n } else {\n setStreak(0);\n }\n\n setAnswered(true);\n setIsSubmitting(false);\n\n // Move to the next question after a delay\n setTimeout(() => {\n if (currentIndex < questions.length - 1) {\n moveToNextQuestion();\n } else {\n completeChallenge();\n }\n }, 2000);\n\n } catch (err) {\n console.error('Error submitting answer:', err);\n setIsSubmitting(false);\n setError('Failed to submit answer. Please try again.');\n }\n };\n\n // Move to the next question\n const moveToNextQuestion = () => {\n setCurrentIndex(prev => prev + 1);\n setSelectedOption(null);\n setAnswered(false);\n setShowHint(false);\n setUsedHint(false);\n };\n\n // Handle hint toggle\n const toggleHint = () => {\n setShowHint(!showHint);\n if (!showHint && !usedHint) {\n setUsedHint(true);\n }\n };\n\n // Complete the challenge\n const completeChallenge = async () => {\n clearInterval(timerRef.current);\n setCompleted(true);\n\n try {\n await fetch(`/challenges/${challengeId}/challenge_complete`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': document.querySelector('[name=\"csrf-token\"]').content\n }\n });\n\n // Redirect to results page\n window.location.href = `/challenges/${challengeId}/challenge_results`;\n } catch (err) {\n console.error('Error completing challenge:', err);\n setError('Failed to save your results. Please try refreshing the page.');\n }\n };\n\n // Calculate progress percentage\n const progressPercentage = questions.length > 0\n ? ((currentIndex + 1) / questions.length) * 100\n : 0;\n\n // Get current question\n const currentQuestion = questions[currentIndex];\n\n // Loading state\n if (loading) {\n return (\n
\n
\n Loading...\n
\n

Loading your challenge...

\n
\n );\n }\n\n // Error state\n if (error) {\n return (\n
\n \n {error}\n
\n );\n }\n\n // No questions state\n if (questions.length === 0) {\n return (\n
\n \n No questions available for this challenge.\n
\n );\n }\n\n return (\n
\n {/* Header */}\n
\n {/* Top row - Timer and Progress */}\n
\n
\n \n \n {formatTime(timeLeft)}\n \n
\n\n
\n
\n
\n
\n\n {/* Bottom row - Streak and Score */}\n
\n
\n Question {currentIndex + 1} of {questions.length}\n
\n\n
\n
\n \n \n Streak: {streak}\n \n
\n\n
\n \n \n Score: {score}\n \n
\n
\n
\n
\n\n {/* Question Card */}\n
\n
\n \n {currentQuestion.topic}\n \n \n {['Easy', 'Medium', 'Hard'][currentQuestion.difficulty - 1] || 'Medium'}\n \n
\n\n
\n
{currentQuestion.question}
\n\n
\n {currentQuestion.options.map((option, index) => (\n handleSelectOption(index)}\n disabled={answered || isSubmitting}\n >\n
\n
\n {String.fromCharCode(65 + index)}\n
\n
{option}
\n
\n \n ))}\n
\n\n {/* Hint Section */}\n {!answered && currentQuestion.hint && (\n
\n \n \n {showHint ? 'Hide Hint' : 'Need a Hint?'}\n \n\n {showHint && (\n
\n \n {currentQuestion.hint}\n
\n )}\n
\n )}\n\n {/* Explanation */}\n {answered && (\n
\n
\n \n {currentQuestion.correct_option === selectedOption\n ? 'Correct!'\n : 'Incorrect!'}\n
\n

{currentQuestion.explanation}

\n
\n )}\n
\n\n
\n
\n \n {currentQuestion.points} points\n
\n
\n
\n\n {/* Navigation Buttons */}\n
\n setCurrentIndex(prev => Math.max(0, prev - 1))}\n disabled={currentIndex === 0 || answered || isSubmitting}\n >\n \n Previous\n \n\n {\n if (answered) {\n if (currentIndex < questions.length - 1) {\n moveToNextQuestion();\n } else {\n completeChallenge();\n }\n } else {\n // Force move to next if not answered\n if (currentIndex < questions.length - 1) {\n moveToNextQuestion();\n } else {\n completeChallenge();\n }\n }\n }}\n disabled={isSubmitting}\n >\n {isSubmitting ? (\n \n \n Processing...\n ...\n \n ) : currentIndex < questions.length - 1 ? (\n \n Next\n \n \n ) : (\n \n Finish\n \n \n )}\n \n
\n \n );\n};\n\nChallengeInterface.propTypes = {\n challengeId: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]).isRequired,\n duration: PropTypes.number.isRequired\n};\n\nexport default ChallengeInterface;\n","// src/components/StudyAssistant/AppLayout.jsx\nimport React from 'react';\nimport { useConversation } from './ConversationContext';\nimport { MessageStyles } from './Message';\nimport ConversationHeader from './ConversationHeader';\nimport MainContent from './MainContent';\nimport FooterInput from './FooterInput';\nimport Sidebar from './Sidebar';\nimport ErrorAlert from './ErrorAlert';\n\n/**\n * Main layout component for the Study Assistant interface\n */\nconst AppLayout = ({ models }) => {\n const { error, setError } = useConversation();\n\n return (\n
\n {/* Sidebar for conversation history */}\n \n\n {/* Main chat area */}\n
\n {/* Header with title and controls */}\n \n\n {/* Main content area */}\n \n\n {/* Error alert */}\n {error && (\n setError(null)} />\n )}\n\n {/* Footer with message input */}\n \n
\n\n {/* Global styles for message components */}\n \n
\n );\n};\n\nexport default AppLayout;\n","import React, { useState, useEffect } from 'react';\nimport axios from 'axios';\nimport { formatDistanceToNow } from 'date-fns';\n\nconst ChatHistory = ({ examTrackerId, onSelectConversation, onNewChat }) => {\n const [conversations, setConversations] = useState([]);\n const [loading, setLoading] = useState(true);\n const [pagination, setPagination] = useState(null);\n const [page, setPage] = useState(1);\n\n useEffect(() => {\n fetchHistory(page);\n }, [examTrackerId, page]);\n\n const fetchHistory = async (pageNumber) => {\n try {\n setLoading(true);\n const response = await axios.get(\n `/exam_trackers/${examTrackerId}/chat/history?page=${pageNumber}`,\n {\n headers: {\n 'Accept': 'application/json'\n }\n }\n );\n\n setConversations(response.data.conversations);\n setPagination(response.data.pagination);\n } catch (error) {\n console.error('Failed to fetch chat history:', error);\n } finally {\n setLoading(false);\n }\n };\n\n const renderPagination = () => {\n if (!pagination) return null;\n\n return (\n
\n
\n setPage(page - 1)}\n disabled={page === 1}\n >\n \n \n\n \n\n setPage(page + 1)}\n disabled={page === pagination.pages}\n >\n \n \n
\n
\n );\n };\n\n if (loading && conversations.length === 0) {\n return (\n
\n
\n
\n );\n }\n\n return (\n
\n {/* Quick Actions */}\n
\n \n \n Start New Conversation\n \n
\n\n
\n {conversations.length === 0 ? (\n
\n \n

No chat history yet. Start a new conversation!

\n
\n ) : (\n conversations.map((conversation) => (\n onSelectConversation(conversation.id)}\n >\n
\n
\n \n \n Conversation #{conversation.id}\n \n
\n \n {conversation.messages_count} messages\n \n
\n\n {conversation.last_message && (\n
\n {truncateText(conversation.last_message.content, 120)}\n
\n )}\n\n
\n \n \n {formatDistanceToNow(new Date(conversation.last_message_at), { addSuffix: true })}\n \n \n \n {conversation.messages_count} messages exchanged\n \n
\n
\n ))\n )}\n\n {renderPagination()}\n
\n \n );\n};\n\nconst truncateText = (text, maxLength) => {\n if (!text) return '';\n if (text.length <= maxLength) return text;\n return text.substring(0, maxLength) + '...';\n};\n\nexport default ChatHistory;\n","import React, { useState, useEffect, useRef } from 'react';\nimport axios from 'axios';\nimport { setupAxiosCSRF } from '../../helpers';\n\nconst ChatInterface = ({ examTrackerId, conversationId }) => {\n const [messages, setMessages] = useState([]);\n const [newMessage, setNewMessage] = useState('');\n const [isLoading, setIsLoading] = useState(false);\n const [error, setError] = useState(null);\n const [isRetrying, setIsRetrying] = useState(false);\n const messagesEndRef = useRef(null);\n const inputRef = useRef(null);\n\n useEffect(() => {\n if (conversationId) {\n loadConversation();\n }\n }, [conversationId]);\n\n useEffect(() => {\n scrollToBottom();\n }, [messages]);\n\n const loadConversation = async () => {\n try {\n setIsLoading(true);\n setError(null);\n setupAxiosCSRF();\n\n const response = await axios.get(\n `/exam_trackers/${examTrackerId}/chat/${conversationId}`,\n {\n headers: {\n 'Accept': 'application/json'\n }\n }\n );\n\n setMessages(response.data.messages.map(msg => ({\n ...msg,\n timestamp: new Date(),\n status: 'delivered'\n })));\n } catch (error) {\n console.error('Failed to load conversation:', error);\n setError('Failed to load conversation. Please try again.');\n } finally {\n setIsLoading(false);\n }\n };\n\n const scrollToBottom = () => {\n messagesEndRef.current.scrollIntoView({ behavior: \"smooth\" });\n };\n\n const handleKeyDown = (e) => {\n if (e.key === 'Enter' && (e.ctrlKey || e.metaKey)) {\n handleSubmit(e);\n }\n };\n\n const handleSubmit = async (e) => {\n e.preventDefault();\n if (!newMessage.trim()) return;\n\n const message = newMessage;\n setNewMessage('');\n setIsLoading(true);\n setError(null);\n\n try {\n setupAxiosCSRF();\n const response = await axios.post(\n `/exam_trackers/${examTrackerId}/chat`,\n {\n message,\n conversation_id: conversationId\n }\n );\n\n setMessages(prev => [...prev,\n {\n role: 'user',\n content: message,\n timestamp: new Date(),\n status: 'sent'\n },\n {\n role: 'assistant',\n content: response.data.message,\n timestamp: new Date(),\n status: 'delivered'\n }\n ]);\n } catch (error) {\n console.error('Chat error:', error);\n setError('Failed to send message. Please try again.');\n setNewMessage(message);\n } finally {\n setIsLoading(false);\n }\n };\n\n const handleRetry = () => {\n setIsRetrying(true);\n loadConversation().finally(() => setIsRetrying(false));\n };\n\n const formatAssistantResponse = (content) => {\n if (!content) return '';\n\n // Process code blocks first to prevent interference with other formatting\n content = content.replace(/```([^`]*?)```/g, '
$1
');\n\n // Process headers\n content = content\n .replace(/^### (.*$)/gm, '

$1

')\n .replace(/^## (.*$)/gm, '

$1

')\n .replace(/^# (.*$)/gm, '

$1

');\n\n // Process lists\n content = content\n .replace(/^\\s*[-+*]\\s+(.+)/gm, '
  • $1
  • ') // Unordered lists\n .replace(/^\\s*(\\d+)\\.\\s+(.+)/gm, '
  • $2
  • '); // Ordered lists\n\n // Wrap consecutive list items in ul/ol tags\n content = content\n .replace(/(
  • .*?<\\/li>)\\s*(
  • .*?<\\/li>)/g, '
      $1$2
    ')\n .replace(/(
  • \\d+\\..*?<\\/li>)\\s*(
  • \\d+\\..*?<\\/li>)/g, '
      $1$2
    ');\n\n // Process inline formatting\n content = content\n .replace(/\\*\\*(.*?)\\*\\*/g, '$1')\n .replace(/\\*(.*?)\\*/g, '$1')\n .replace(/__(.*?)__/g, '$1')\n .replace(/~~(.*?)~~/g, '$1')\n .replace(/`(.*?)`/g, '$1')\n .replace(/\\[(.*?)\\]\\((.*?)\\)/g, '$1'); // Links\n\n // Process blockquotes\n content = content.replace(/^>\\s(.+)/gm, '
    $1
    ');\n\n // Add some basic styling classes\n content = content\n .replace(/

    /g, '

    ')\n .replace(/

    /g, '

    ')\n .replace(/

    /g, '

    ')\n .replace(/
    /g, '
    ')\n      .replace(//g, '')\n      .replace(/
    /g, '
    ');\n\n // Split by newlines and wrap in divs\n return content\n .split('\\n')\n .map((line, i) => line.trim() ? `
    ${line}
    ` : '
    ')\n .join('');\n };\n\n const renderMessage = (message, index) => (\n \n
    \n
    \n \n {message.role === 'user' ? 'You' : 'Assistant'}\n \n \n {message.timestamp.toLocaleTimeString()}\n \n
    \n \n {message.status && (\n
    \n \n \n \n
    \n )}\n
    \n \n );\n\n return (\n
    \n {error && (\n
    \n \n {error}\n setError(null)}\n aria-label=\"Close error message\"\n >\n \n {isRetrying ? 'Retrying...' : 'Retry'}\n \n
    \n )}\n\n \n {messages.length === 0 && !isLoading ? (\n
    \n \n

    Start a conversation with your study assistant

    \n
    \n ) : (\n
    \n {messages.map(renderMessage)}\n
    \n )}\n\n {isLoading && (\n
    \n
    \n \n \n \n
    \n
    \n )}\n
    \n
    \n\n
    \n
    \n
    \n setNewMessage(e.target.value)}\n onKeyDown={handleKeyDown}\n disabled={isLoading}\n aria-label=\"Message input\"\n />\n \n {isLoading ? (\n \n ) : (\n \n )}\n \n
    \n \n
    \n\n \n
    \n );\n};\n\nexport default ChatInterface;\n","import React, { useState, useEffect, useCallback } from 'react';\nimport ChatInterface from './ChatInterface';\nimport ChatHistory from './ChatHistory';\n\nconst ChatModal = ({ examTrackerId, examTitle }) => {\n const [view, setView] = useState('chat');\n const [activeConversation, setActiveConversation] = useState(null);\n const [isLoading, setIsLoading] = useState(false);\n\n const resetModal = useCallback(() => {\n setView('chat');\n setActiveConversation(null);\n }, []);\n\n useEffect(() => {\n const handleModalHidden = () => resetModal();\n\n // Wait for document to be ready\n const modal = document.getElementById('studyAssistantModal');\n if (modal) {\n modal.addEventListener('hidden.bs.modal', handleModalHidden);\n\n // Cleanup listener\n return () => {\n modal.removeEventListener('hidden.bs.modal', handleModalHidden);\n };\n }\n }, [resetModal]);\n\n // Add event listener after component mounts\n useEffect(() => {\n const setupModalListener = () => {\n const modal = document.getElementById('studyAssistantModal');\n if (modal) {\n const modalInstance = new bootstrap.Modal(modal);\n modal.addEventListener('hidden.bs.modal', resetModal);\n return () => {\n modal.removeEventListener('hidden.bs.modal', resetModal);\n modalInstance.dispose();\n };\n }\n };\n\n // Small delay to ensure DOM is ready\n const timer = setTimeout(setupModalListener, 100);\n return () => clearTimeout(timer);\n }, [resetModal]);\n\n const handleConversationSelect = async (conversationId) => {\n setIsLoading(true);\n setActiveConversation(conversationId);\n setView('chat');\n setIsLoading(false);\n };\n\n const handleNewChat = () => {\n setActiveConversation(null);\n setView('chat');\n };\n\n return (\n
    \n
    \n
    \n {/* Modal Header */}\n
    \n
    \n
    \n
    \n \n
    \n
    \n
    Study Assistant
    \n

    {examTitle}

    \n
    \n
    \n\n
    \n {view === 'chat' && activeConversation && (\n setView('history')}\n >\n \n Back to History\n \n )}\n\n {view === 'chat' ? (\n setView('history')}\n >\n \n View History\n \n ) : (\n \n \n New Chat\n \n )}\n\n \n
    \n
    \n
    \n\n {/* Modal Body */}\n
    \n {isLoading ? (\n
    \n
    \n Loading...\n
    \n
    \n ) : (\n view === 'chat' ? (\n setView('history')}\n />\n ) : (\n \n )\n )}\n
    \n
    \n
    \n
    \n );\n};\n\nexport default ChatModal;\n","import React, { createContext, useContext, useState, useEffect, useRef } from 'react';\nimport axios from 'axios';\nimport { setupAxiosCSRF } from '../../helpers';\n\n// Constants\nconst STREAM_TIMEOUT = 30000; // 30 seconds\nconst BUFFER_SIZE = 1000;\nconst DEBOUNCE_MS = 50;\nconst BACKPRESSURE_DELAY_MS = 50;\n\n// Create context\nconst ConversationContext = createContext(null);\n\n// Helper function to process streaming content\nconst processStreamingContent = (data) => {\n if (!data) return '';\n if (typeof data === 'string') return data;\n if (data.content && typeof data.content === 'string') return data.content;\n if (data.content.content && typeof data.content.content === 'string') return data.content.content;\n return '';\n};\n\nexport const ConversationProvider = ({\n children,\n userName,\n preferredModel,\n conversationId,\n initialConversation = null,\n initialMessages = []\n}) => {\n // State\n const [selectedModel, setSelectedModel] = useState(preferredModel);\n const [showSettings, setShowSettings] = useState(false);\n const [message, setMessage] = useState('');\n const [messages, setMessages] = useState(initialMessages);\n const [isLoading, setIsLoading] = useState(false);\n const [error, setError] = useState(null);\n const [activeConversation, setActiveConversation] = useState(initialConversation);\n const [conversations, setConversations] = useState([]);\n const [isLoadingHistory, setIsLoadingHistory] = useState(false);\n const [isStreaming, setIsStreaming] = useState(false);\n const [uploadedFile, setUploadedFile] = useState(null);\n const [fileContent, setFileContent] = useState(null);\n const [isFileProcessing, setIsFileProcessing] = useState(false);\n\n // Refs\n const messagesEndRef = useRef(null);\n const eventSourceRef = useRef(null);\n const abortControllerRef = useRef(null);\n const messageStateRef = useRef({\n retryCount: 0,\n accumulatedContent: '',\n hasAssistantMessage: false,\n aborted: false\n });\n\n // Load conversation on initial render if ID provided\n useEffect(() => {\n if (conversationId && !initialConversation) {\n loadConversation(conversationId);\n }\n fetchChatHistory();\n\n return () => {\n if (abortControllerRef.current) {\n abortControllerRef.current.abort();\n }\n cleanupEventSource();\n };\n }, [conversationId, initialConversation]);\n\n // Auto-scroll messages\n useEffect(() => {\n if (messagesEndRef.current) {\n messagesEndRef.current.scrollIntoView({ behavior: 'smooth' });\n }\n }, [messages]);\n\n // Initialize offcanvas for sidebar\n useEffect(() => {\n if (typeof bootstrap !== 'undefined') {\n const offcanvasElements = document.querySelectorAll('.offcanvas');\n offcanvasElements.forEach(element => {\n new bootstrap.Offcanvas(element);\n });\n }\n }, []);\n\n // Browser history handling\n useEffect(() => {\n const handlePopState = (event) => {\n if (event.state && event.state.conversationId) {\n loadConversation(event.state.conversationId);\n } else {\n // Handle case when going back to new conversation\n setActiveConversation(null);\n setMessages([]);\n setMessage('');\n }\n };\n\n window.addEventListener('popstate', handlePopState);\n return () => window.removeEventListener('popstate', handlePopState);\n }, []);\n\n // Helper to update browser URL\n const updateBrowserHistory = (conversation) => {\n if (!conversation) return;\n\n const newUrl = `/study_assistant/conversations/${conversation.id}`;\n const newState = { conversationId: conversation.id };\n\n if (window.location.pathname !== newUrl) {\n window.history.pushState(newState, '', newUrl);\n }\n };\n\n // Cleanup SSE event source\n const cleanupEventSource = () => {\n if (eventSourceRef.current) {\n eventSourceRef.current.close();\n eventSourceRef.current = null;\n }\n };\n\n // Load conversation by ID\n const loadConversation = async (convId) => {\n try {\n setIsLoading(true);\n setupAxiosCSRF();\n const response = await axios.get(`/study_assistant/conversations/${convId}`, {\n headers: {\n 'Accept': 'application/json'\n }\n });\n\n // Ensure we have messages array\n const conversationMessages = response.data.messages || [];\n\n setActiveConversation(response.data.conversation);\n setMessages(conversationMessages);\n updateBrowserHistory(response.data.conversation);\n\n // Close the sidebar on mobile\n if (typeof bootstrap !== 'undefined') {\n const offcanvasElement = document.getElementById('chatSidebar');\n const offcanvas = bootstrap.Offcanvas.getInstance(offcanvasElement);\n if (offcanvas) offcanvas.hide();\n }\n } catch (error) {\n console.error('Failed to load conversation:', error);\n setError('Failed to load conversation. Please try again.');\n // If conversation not found or error, redirect to new conversation\n window.location.href = '/study_assistant/conversations/new';\n } finally {\n setIsLoading(false);\n }\n };\n\n // Fetch conversation history\n const fetchChatHistory = async () => {\n setIsLoadingHistory(true);\n try {\n setupAxiosCSRF();\n const response = await axios.get('/study_assistant/conversations/history');\n setConversations(response.data.conversations);\n } catch (error) {\n console.error('Failed to fetch chat history:', error);\n } finally {\n setIsLoadingHistory(false);\n }\n };\n\n // Create a new conversation\n const createConversation = async () => {\n try {\n setupAxiosCSRF();\n const response = await axios.post('/study_assistant/conversations', {\n selected_model: selectedModel\n });\n\n const newConversation = response.data.conversation;\n\n // Ensure we have a messages array, even if empty\n const conversationMessages = response.data.messages || [];\n\n // Update conversations list\n setConversations(prev => [\n {\n ...newConversation,\n messages_count: 0,\n title: 'Untitled Conversation'\n },\n ...prev\n ]);\n\n // Set active conversation\n setActiveConversation(newConversation);\n\n // Initialize empty messages array for new conversation\n setMessages(conversationMessages);\n\n // Update URL\n updateBrowserHistory(newConversation);\n\n return newConversation;\n } catch (error) {\n console.error('Conversation creation error:', error);\n setError('Failed to create new conversation. Please try again.');\n throw error;\n }\n };\n\n // Handle new conversation button click\n const handleNewConversation = () => {\n setActiveConversation(null);\n setMessages([]);\n setMessage('');\n setError(null);\n\n // Update URL to new conversation path\n window.history.pushState({}, '', '/study_assistant/conversations/new');\n\n // Close sidebar on mobile\n const offcanvasElement = document.getElementById('chatSidebar');\n if (offcanvasElement) {\n const offcanvas = bootstrap.Offcanvas.getInstance(offcanvasElement);\n if (offcanvas) offcanvas.hide();\n }\n };\n\n // Handle sending a message\n const sendMessage = async () => {\n // Allow sending if there's either text or a file\n if ((!message.trim() && !uploadedFile) || isLoading) return;\n\n const messageContent = message;\n setMessage('');\n setIsLoading(true);\n setIsStreaming(true);\n setError(null);\n\n // Reset message state\n messageStateRef.current = {\n retryCount: 0,\n accumulatedContent: '',\n hasAssistantMessage: false,\n aborted: false,\n lastUpdateTime: Date.now()\n };\n\n // Set timeout for long-running requests\n const timeoutId = setTimeout(() => {\n messageStateRef.current.aborted = true;\n if (abortControllerRef.current) {\n abortControllerRef.current.abort();\n }\n handleSendError(new Error('Request timed out'), messageContent);\n }, STREAM_TIMEOUT);\n\n try {\n const conversation = activeConversation || await createConversation();\n\n // Create temporary user message\n const userMessage = {\n role: 'user',\n content: messageContent,\n created_at: new Date().toISOString(),\n isTemporary: true,\n tempId: Date.now(),\n file: uploadedFile ? {\n name: uploadedFile.name,\n type: uploadedFile.type,\n url: URL.createObjectURL(uploadedFile)\n } : null\n };\n\n // Add user message to chat\n setMessages(prev => [...prev, userMessage]);\n\n // Abort any existing request\n if (abortControllerRef.current) {\n abortControllerRef.current.abort();\n }\n abortControllerRef.current = new AbortController();\n\n // Create request payload\n const requestPayload = {\n content: messageContent\n };\n\n // Add file_id to payload if we have one\n if (fileContent && fileContent.file_id) {\n requestPayload.file_id = fileContent.file_id;\n }\n\n // Send request\n const response = await fetch(\n `/study_assistant/conversations/${conversation.id}/messages`,\n {\n method: 'POST',\n headers: {\n 'Accept': 'text/event-stream',\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': document.querySelector('[name=\"csrf-token\"]').content,\n },\n body: JSON.stringify(requestPayload),\n credentials: 'same-origin',\n signal: abortControllerRef.current.signal,\n }\n );\n\n if (!response.ok) {\n const error = new Error(`HTTP error! status: ${response.status}`);\n error.response = { status: response.status };\n throw error;\n }\n\n // Process streaming response\n await processStreamingResponse(response);\n\n } catch (error) {\n if (error.name === 'AbortError') {\n console.log('Fetch aborted');\n } else if (!messageStateRef.current.aborted) {\n console.error(\"Error in sendMessage:\", error);\n handleSendError(error, messageContent);\n }\n } finally {\n // Clean up\n clearTimeout(timeoutId);\n abortControllerRef.current = null;\n\n // Reset file state after sending\n setUploadedFile(null);\n setFileContent(null);\n\n setIsLoading(false);\n setIsStreaming(false);\n }\n };\n\n // Process streaming response from server\n const processStreamingResponse = async (response) => {\n const reader = response.body.getReader();\n const decoder = new TextDecoder();\n let buffer = '';\n let assistantMessage = null;\n\n // Create debounced updater function\n const debouncedMessageUpdate = (content, tempId) => {\n setMessages(prev => prev.map(msg =>\n msg.tempId === tempId && msg.isTemporary\n ? { ...msg, content }\n : msg\n ));\n };\n\n // Debounce function implementation\n const debounce = (func, wait) => {\n let timeout;\n return (...args) => {\n clearTimeout(timeout);\n timeout = setTimeout(() => func(...args), wait);\n };\n };\n\n // Create debounced update function\n const debouncedUpdate = debounce(debouncedMessageUpdate, DEBOUNCE_MS);\n\n while (true) {\n // Implement backpressure handling\n if (messageStateRef.current.accumulatedContent.length > BUFFER_SIZE) {\n await new Promise(resolve => setTimeout(resolve, BACKPRESSURE_DELAY_MS));\n }\n\n const { done, value } = await reader.read();\n if (done || messageStateRef.current.aborted) break;\n\n buffer += decoder.decode(value, { stream: true });\n const lines = buffer.split(\"\\n\");\n buffer = lines.pop() || '';\n\n for (const line of lines) {\n const trimmedLine = line.trim();\n if (!trimmedLine) continue;\n\n if (trimmedLine.startsWith('event:')) {\n // Process event type if needed\n } else if (trimmedLine.startsWith('data:') && trimmedLine.length > 5) {\n try {\n const data = JSON.parse(trimmedLine.slice(5).trim());\n\n // Handle error events\n if (data.content && data.content.event === 'error' && data.content.data.error) {\n const error = new Error(data.content.data.error);\n error.response = { status: 402 };\n throw error;\n }\n\n // Handle streaming content\n if (data.content) {\n const processedContent = processStreamingContent(data);\n\n if (processedContent) {\n messageStateRef.current.accumulatedContent += processedContent;\n\n if (!messageStateRef.current.hasAssistantMessage) {\n messageStateRef.current.hasAssistantMessage = true;\n assistantMessage = {\n role: 'assistant',\n content: messageStateRef.current.accumulatedContent,\n model_used: selectedModel,\n isTemporary: true,\n tempId: Date.now()\n };\n setMessages(prev => [...prev, assistantMessage]);\n } else {\n // Update the assistant message with accumulated content\n debouncedUpdate(\n messageStateRef.current.accumulatedContent,\n assistantMessage.tempId\n );\n }\n }\n }\n // Handle completion messages\n else if (data.messages && data.messages.length >= 2) {\n const [serverUserMsg, serverAssistantMsg] = data.messages;\n\n setMessages(prev => {\n const filtered = prev.filter(msg => !msg.isTemporary);\n return [\n ...filtered,\n { ...serverUserMsg },\n { ...serverAssistantMsg }\n ];\n });\n break;\n }\n // Handle direct error events\n else if (data.error) {\n const error = new Error(data.error);\n error.response = { status: 402 };\n throw error;\n }\n } catch (e) {\n console.error('Error parsing data:', e);\n const error = e instanceof Error ? e : new Error('Failed to parse server response');\n error.response = error.response || { status: 500 };\n throw error;\n }\n }\n }\n }\n };\n\n // Handle send message errors\n const handleSendError = (error, originalMessage) => {\n // Remove temporary messages on error\n setMessages(prev => prev.filter(msg => !msg.isTemporary));\n setIsStreaming(false);\n setIsLoading(false);\n\n if (error.response) {\n switch (error.response.status) {\n case 402:\n setError('Insufficient tokens. Please purchase more tokens to continue.');\n break;\n case 500:\n setError('Server error. Please try again later.');\n break;\n case 503:\n setError('Service temporarily unavailable. Please try again later.');\n break;\n default:\n setError(`Failed to send message. Status: ${error.response.status}. Please try again.`);\n }\n } else if (error.name === 'AbortError') {\n setError('Message sending was cancelled.');\n } else {\n setError('Failed to send message. Please check your connection and try again.');\n }\n\n setMessage(originalMessage);\n };\n\n // Handle file upload\n const handleFileUpload = async (file) => {\n setIsFileProcessing(true);\n setError(null);\n\n const formData = new FormData();\n formData.append('file', file);\n\n try {\n setupAxiosCSRF();\n const response = await axios.post(\n `/study_assistant/conversations/${activeConversation.id || 'new'}/upload`,\n formData,\n {\n headers: {\n 'Content-Type': 'multipart/form-data'\n }\n }\n );\n\n // If we don't have an active conversation, create one\n if (!activeConversation && response.data.conversation) {\n setActiveConversation(response.data.conversation);\n }\n\n // Store file data including ID\n setFileContent({\n file_id: response.data.file.id,\n name: response.data.file.name,\n type: response.data.file.type,\n url: response.data.file.url,\n processing_status: response.data.file.processing_status\n });\n\n setUploadedFile(file);\n\n // Add a system message to indicate file upload\n const systemMessage = {\n role: 'system',\n content: `File \"${response.data.file.name}\" uploaded and being processed. You can ask questions about it once processing is complete.`,\n created_at: new Date().toISOString(),\n id: `file-upload-${Date.now()}`\n };\n\n setMessages(prev => [...prev, systemMessage]);\n\n } catch (error) {\n console.error('File upload error:', error);\n setError('Failed to upload file. Please try again.');\n setUploadedFile(null);\n setFileContent(null);\n } finally {\n setIsFileProcessing(false);\n }\n\n return Promise.resolve();\n };\n\n // Handle file status changes\n const handleFileStatusChange = (status, fileData) => {\n setFileContent(prev => {\n // If status hasn't changed, don't show new messages\n if (prev && prev.processing_status === status) {\n return prev;\n }\n\n // Store current status before updating\n const previousStatus = prev && prev.processing_status;\n\n // Update the state\n const updatedFileContent = {\n ...prev,\n processing_status: status\n };\n\n // Only show completion message when transitioning from another state to completed\n if (status === 'completed' && previousStatus !== 'completed') {\n const systemMessage = {\n role: 'system',\n content: `File \"${fileData.name}\" is now ready. You can ask questions about it.`,\n created_at: new Date().toISOString(),\n id: `file-ready-${Date.now()}`\n };\n\n // Add system message to notify user\n setTimeout(() => {\n setMessages(msgs => [...msgs, systemMessage]);\n }, 0);\n }\n\n // Only show failure message when transitioning from another state to failed\n if (status === 'failed' && previousStatus !== 'failed') {\n const systemMessage = {\n role: 'system',\n content: `There was an issue processing \"${fileData.name}\". The AI may have limited ability to understand its contents.`,\n created_at: new Date().toISOString(),\n id: `file-failed-${Date.now()}`\n };\n\n // Add system message to notify user\n setTimeout(() => {\n setMessages(msgs => [...msgs, systemMessage]);\n }, 0);\n }\n\n return updatedFileContent;\n });\n };\n\n // Handle model change\n const handleModelChange = async (modelId) => {\n if (!activeConversation) {\n setSelectedModel(modelId);\n setShowSettings(false);\n return;\n }\n\n try {\n setupAxiosCSRF();\n await axios.patch(`/study_assistant/conversations/${activeConversation.id}`, {\n selected_model: modelId\n });\n setSelectedModel(modelId);\n setMessages(prev => [...prev, {\n role: 'system',\n content: `Switched to ${modelId}`\n }]);\n setShowSettings(false);\n } catch (error) {\n setError('Failed to change model');\n }\n };\n\n // Context value\n const contextValue = {\n // State\n userName,\n selectedModel,\n showSettings,\n message,\n messages,\n isLoading,\n error,\n activeConversation,\n conversations,\n isLoadingHistory,\n isStreaming,\n uploadedFile,\n fileContent,\n isFileProcessing,\n messagesEndRef,\n\n // Actions\n setSelectedModel,\n setShowSettings,\n setMessage,\n setError,\n loadConversation,\n handleNewConversation,\n sendMessage,\n handleFileUpload,\n handleFileStatusChange,\n handleModelChange,\n fetchChatHistory,\n\n // Events\n handleKeyDown: (e) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n sendMessage();\n }\n }\n };\n\n return (\n \n {children}\n \n );\n};\n\n// Custom hook to use the conversation context\nexport const useConversation = () => {\n const context = useContext(ConversationContext);\n if (!context) {\n throw new Error('useConversation must be used within a ConversationProvider');\n }\n return context;\n};\n\nexport default ConversationContext;\n","import React from 'react';\nimport { Menu, MessageSquarePlus, Settings, ArrowLeft, X } from 'lucide-react';\nimport { useConversation } from './ConversationContext';\nimport ModelSelector from './ModelSelector';\n\n/**\n * Header component for the conversation interface\n */\nconst ConversationHeader = ({ models }) => {\n const {\n selectedModel,\n showSettings,\n setShowSettings,\n handleNewConversation,\n handleModelChange\n } = useConversation();\n\n return (\n
    \n
    \n \n \n \n\n
    \n
    Miss Odarl
    \n\n {/* Model selector (desktop) */}\n
    \n \n
    \n\n {/* Model indicator (mobile) */}\n
    \n \n Using {models.find(m => m.id === selectedModel).name || selectedModel}\n \n
    \n
    \n
    \n\n
    \n {/* New conversation button */}\n \n \n \n\n {/* Settings toggle button */}\n setShowSettings(!showSettings)}\n className=\"btn btn-link text-secondary p-2 d-flex align-items-center justify-content-center gap-2\"\n aria-label={showSettings ? \"Close settings\" : \"Open settings\"}\n >\n {showSettings ? : }\n \n\n {/* Close button (returns to dashboard) */}\n \n \n \n
    \n
    \n );\n};\n\nexport default ConversationHeader;\n","import React from 'react';\nimport { ArrowUp } from 'lucide-react';\nimport { useConversation } from './ConversationContext';\n\n/**\n * Component displayed when there are no messages in the conversation\n */\nconst EmptyConversation = ({ userName }) => {\n const {\n message,\n setMessage,\n handleKeyDown,\n sendMessage,\n isLoading\n } = useConversation();\n\n // Get time-based greeting\n const getTimeBasedGreeting = () => {\n const hour = new Date().getHours();\n if (hour < 12) return 'Good morning';\n if (hour < 17) return 'Good afternoon';\n return 'Good evening';\n };\n\n return (\n
    \n {/* Avatar */}\n
    \n \n
    \n\n {/* Greeting */}\n

    {getTimeBasedGreeting()}, {userName}

    \n
    How can I help you today?
    \n\n {/* Input area */}\n
    \n
    \n setMessage(e.target.value)}\n onKeyDown={handleKeyDown}\n placeholder=\"What do you want to know?\"\n className=\"form-control form-control-lg bg-form text-secondary border-0 custom-placeholder\"\n disabled={isLoading}\n aria-label=\"Type your message\"\n />\n \n \n \n
    \n \n Miss Odarl can make mistakes. Please double-check responses.\n \n
    \n
    \n );\n};\n\nexport default EmptyConversation;\n","import React from 'react';\n\n/**\n * Component to display error messages\n */\nconst ErrorAlert = ({ message, onClose }) => {\n return (\n \n {message}\n \n \n );\n};\n\nexport default ErrorAlert;\n","import React, { useState, useEffect } from 'react';\nimport { FileText, Image, Download, Maximize, Minimize, FileType } from 'lucide-react';\n\nconst FileDisplay = ({ file }) => {\n const [expanded, setExpanded] = useState(false);\n const [textContent, setTextContent] = useState(null);\n const [isLoadingText, setIsLoadingText] = useState(false);\n\n useEffect(() => {\n // Load text content when a text file is expanded\n if (expanded && file.type === 'text/plain' && !textContent) {\n loadTextContent();\n }\n }, [expanded, file]);\n\n const loadTextContent = async () => {\n if (!file.url) return;\n\n setIsLoadingText(true);\n try {\n const response = await fetch(file.url);\n const text = await response.text();\n setTextContent(text);\n } catch (err) {\n console.error('Error loading text file:', err);\n } finally {\n setIsLoadingText(false);\n }\n };\n\n if (!file) return null;\n\n const toggleExpand = () => setExpanded(!expanded);\n\n const renderFilePreview = () => {\n const { type, url, name } = file;\n\n // hold off on allowing image uploads for now\n // perhaps we can add this feature in the future\n // if (type.startsWith('image/')) {\n // return (\n //
    \n // \n //
    \n // );\n // }\n\n if (type === 'application/pdf') {\n return expanded ? (\n \n ) : (\n
    \n \n {name}\n
    \n );\n }\n\n if (type === 'text/plain') {\n return expanded ? (\n
    \n {isLoadingText ? (\n
    \n
    \n Loading...\n
    \n
    \n ) : (\n
    \n              {textContent || 'No content available'}\n            
    \n )}\n
    \n ) : (\n
    \n \n {name}\n
    \n );\n }\n\n return (\n
    \n \n {name}\n
    \n );\n };\n\n return (\n
    \n
    \n {file.type.startsWith('image/') ? (\n \n ) : file.type === 'text/plain' ? (\n \n ) : (\n \n )}\n {file.name}\n
    \n \n {expanded ? : }\n \n \n \n \n
    \n
    \n\n
    \n {renderFilePreview()}\n
    \n
    \n );\n};\n\nexport default FileDisplay;\n","import React, { useEffect, useState, useRef } from 'react';\nimport { setupAxiosCSRF } from '../../helpers';\nimport axios from 'axios';\nimport { AlertCircle, CheckCircle, Clock, Loader } from 'lucide-react';\n\nconst POLLING_INTERVAL = 1000; // Poll every second\nconst MAX_POLLS = 20; // Maximum number of polls before timing out\n\nconst FileStatusPoller = ({ fileId, conversationId, onStatusChange }) => {\n const [status, setStatus] = useState('pending');\n const [pollCount, setPollCount] = useState(0);\n const [error, setError] = useState(null);\n const isMounted = useRef(true);\n const isPolling = useRef(false);\n const pollTimer = useRef(null);\n\n // Clear polling on unmount\n useEffect(() => {\n return () => {\n isMounted.current = false;\n if (pollTimer.current) {\n clearTimeout(pollTimer.current);\n }\n };\n }, []);\n\n // Handle file ID changes\n useEffect(() => {\n if (!fileId || !conversationId) return;\n\n // Reset state for new file\n setStatus('pending');\n setPollCount(0);\n setError(null);\n\n // Start polling\n startPolling();\n\n return () => {\n // Clean up polling\n if (pollTimer.current) {\n clearTimeout(pollTimer.current);\n }\n };\n }, [fileId, conversationId]);\n\n const startPolling = async () => {\n // Prevent multiple polling loops\n if (isPolling.current) return;\n isPolling.current = true;\n\n try {\n await checkStatus();\n } finally {\n isPolling.current = false;\n }\n };\n\n const checkStatus = async () => {\n if (!isMounted.current) return;\n\n try {\n setupAxiosCSRF();\n const response = await axios.get(`/study_assistant/conversations/${conversationId}/files/${fileId}/status`);\n\n const newStatus = response.data.processing_status;\n\n // Only update if status changed\n if (newStatus !== status) {\n setStatus(newStatus);\n\n // Call the callback with new status\n if (onStatusChange) {\n onStatusChange(newStatus, response.data);\n }\n }\n\n // Only continue polling for non-terminal statuses\n const isTerminalStatus = newStatus === 'completed' || newStatus === 'failed';\n\n if (!isTerminalStatus && isMounted.current) {\n // Continue polling if within max count\n if (pollCount < MAX_POLLS) {\n setPollCount(count => count + 1);\n pollTimer.current = setTimeout(startPolling, POLLING_INTERVAL);\n } else {\n setError('File processing is taking longer than expected.');\n }\n }\n } catch (err) {\n console.error('Error checking file status:', err);\n setError('Could not check file status. Please try again.');\n }\n };\n\n const getStatusDisplay = () => {\n switch (status) {\n case 'pending':\n return (\n
    \n \n Waiting to process...\n
    \n );\n case 'processing':\n return (\n
    \n \n Processing file...\n
    \n );\n case 'completed':\n return (\n
    \n \n Ready to use\n
    \n );\n case 'failed':\n return (\n
    \n \n Processing failed\n
    \n );\n default:\n return null;\n }\n };\n\n // Don't render anything if there's no file ID\n if (!fileId) return null;\n\n return (\n
    \n {getStatusDisplay()}\n {error &&
    {error}
    }\n
    \n );\n};\n\nexport default FileStatusPoller;\n","import React, { useState, useRef } from 'react';\nimport { FileUp, X, FileText, Image, Loader } from 'lucide-react';\n\nconst FileUpload = ({ onFileSelect, allowedFileTypes = 'application/pdf,text/plain' }) => {\n const [file, setFile] = useState(null);\n const [preview, setPreview] = useState(null);\n const [isUploading, setIsUploading] = useState(false);\n const [error, setError] = useState(null);\n const fileInputRef = useRef(null);\n\n const handleFileChange = (e) => {\n const selectedFile = e.target.files[0];\n if (!selectedFile) return;\n\n // Validate file type\n if (!allowedFileTypes.includes(selectedFile.type)) {\n setError('File type not supported. Please upload a PDF or text (.txt) file.');\n return;\n }\n\n // Validate file size (10MB max)\n if (selectedFile.size > 10 * 1024 * 1024) {\n setError('File is too large. Maximum size is 10MB.');\n return;\n }\n\n setError(null);\n setFile(selectedFile);\n };\n\n const handleUpload = () => {\n if (!file) return;\n\n setIsUploading(true);\n onFileSelect(file)\n .then(() => {\n // Reset after successful upload\n setFile(null);\n setPreview(null);\n setIsUploading(false);\n })\n .catch(err => {\n setError('Upload failed. Please try again.');\n setIsUploading(false);\n });\n };\n\n const clearFile = () => {\n setFile(null);\n setPreview(null);\n setError(null);\n if (fileInputRef.current) {\n fileInputRef.current.value = '';\n }\n };\n\n const triggerFileInput = () => {\n fileInputRef.current.click();\n };\n\n const getFileIcon = () => {\n if (!file) return null;\n if (file.type.startsWith('image/')) {\n return ;\n }\n return ;\n };\n\n return (\n
    \n {/* Hidden file input */}\n \n\n {/* Upload button or Selected file display */}\n {!file ? (\n \n \n \n ) : (\n
    \n {/* File preview */}\n
    \n {preview ? (\n \"Preview\"\n ) : (\n getFileIcon()\n )}\n
    \n\n {/* File name */}\n
    \n {file.name}\n
    \n\n {/* Action buttons */}\n
    \n {isUploading ? (\n \n ) : (\n
    \n \n Use\n \n \n \n \n
    \n )}\n
    \n
    \n )}\n\n {/* Error message */}\n {error && (\n
    \n {error}\n
    \n )}\n
    \n );\n};\n\nexport default FileUpload;\n","import React from 'react';\nimport { ArrowUp, X, FileBadge } from 'lucide-react';\nimport { useConversation } from './ConversationContext';\nimport FileUpload from './FileUpload';\nimport FileStatusPoller from './FileStatusPoller';\n\n/**\n * Footer component with message input and file upload\n */\nconst FooterInput = () => {\n const {\n showSettings,\n messages,\n message,\n setMessage,\n sendMessage,\n handleKeyDown,\n isLoading,\n uploadedFile,\n setUploadedFile,\n fileContent,\n activeConversation,\n handleFileUpload,\n handleFileStatusChange\n } = useConversation();\n\n // Don't render if settings are shown or no messages exist yet\n if (showSettings || messages.length === 0) {\n return null;\n }\n\n return (\n
    \n
    \n {/* Display attached file if any */}\n {uploadedFile && (\n
    \n \n {uploadedFile.name}\n setUploadedFile(null)}\n aria-label=\"Remove file\"\n >\n \n \n
    \n )}\n\n {/* File status polling */}\n {uploadedFile && fileContent && (\n \n )}\n\n {/* Message input with file upload */}\n
    \n setMessage(e.target.value)}\n onKeyDown={handleKeyDown}\n placeholder={uploadedFile ? `Ask about \"${uploadedFile.name}\"` : \"Reply to Miss Odarl\"}\n className=\"form-control bg-form text-secondary border-0 custom-placeholder\"\n disabled={isLoading}\n aria-label=\"Type your message\"\n />\n\n {/* File upload button */}\n
    \n \n
    \n\n {/* Send button */}\n \n \n \n
    \n\n {/* Disclaimer */}\n
    \n \n Miss Odarl can make mistakes. Please double-check responses.\n \n
    \n
    \n
    \n );\n};\n\nexport default FooterInput;\n","import React from 'react';\nimport { useConversation } from './ConversationContext';\nimport MessageList from './MessageList';\nimport EmptyConversation from './EmptyConversation';\nimport ModelSettingsScreen from './ModelSettingsScreen';\n\n/**\n * Main content area that shows either the messages, empty state, or model settings\n */\nconst MainContent = ({ models }) => {\n const {\n messages,\n showSettings,\n userName\n } = useConversation();\n\n return (\n
    \n {showSettings ? (\n \n ) : (\n
    \n
    \n {messages.length === 0 ? (\n \n ) : (\n \n )}\n
    \n
    \n )}\n
    \n );\n};\n\nexport default MainContent;\n","import React, { useState } from 'react';\nimport { Copy, Check, Cpu } from 'lucide-react';\nimport ReactMarkdown from 'react-markdown';\nimport remarkMath from 'remark-math';\nimport rehypeKatex from 'rehype-katex';\nimport remarkGfm from 'remark-gfm'\nimport {Prism as SyntaxHighlighter} from 'react-syntax-highlighter'\nimport {vscDarkPlus} from 'react-syntax-highlighter/dist/esm/styles/prism'\nimport FileDisplay from './FileDisplay';\n\nconst CopyButton = ({ content }) => {\n const [copied, setCopied] = useState(false);\n const [showToast, setShowToast] = useState(false);\n\n const handleCopy = async () => {\n try {\n await navigator.clipboard.writeText(content);\n setCopied(true);\n setShowToast(true);\n\n setTimeout(() => {\n setCopied(false);\n }, 2000);\n\n setTimeout(() => {\n setShowToast(false);\n }, 3000);\n } catch (err) {\n console.error('Failed to copy text:', err);\n }\n };\n\n return (\n
    \n \n {copied ? : }\n {copied ? 'Copied!' : 'Copy'}\n \n\n {showToast && (\n \n \n
    \n \n Message copied to clipboard!\n
    \n
    \n \n )}\n \n );\n};\n\nconst Message = ({ msg, models }) => {\n // this system was a fluke?\n if (msg.role === 'system') return null;\n // Find the model details from the models array\n const modelDetails = models.find(m => m.id === msg.model_used) || {\n name: msg.model_used,\n category: 'AI Model'\n };\n\n return (\n
    \n
    \n {msg.role !== 'user' && (\n
    \n \n
    \n )}\n \n {/* Display attached file if present */}\n {msg.file && (\n \n )}\n\n {msg.role === 'user' ? (\n
    {msg.content}
    \n ) : (\n
    \n \n ) : (\n \n {children}\n \n )\n }\n }}\n >\n {msg.content }\n \n\n {/* Footer: Model info and Copy button for assistant messages */}\n {msg.role === 'assistant' && (\n
    \n
    \n \n \n {modelDetails.name}\n \n
    \n \n
    \n )}\n
    \n )}\n {msg.isTemporary && (\n
    \n \n \n \n
    \n )}\n
    \n {msg.role === 'user' && (\n
    \n
    \n \n
    \n
    \n )}\n
    \n \n );\n};\n\n// Add this style to your existing styles\nconst MessageStyles = () => (\n \n);\n\nexport { Message, MessageStyles };\n","import React from 'react';\nimport { useConversation } from './ConversationContext';\nimport { Message } from './Message';\nimport MessageSkeleton from './MessageSkeleton';\n\n/**\n * Component that displays the list of messages in a conversation\n */\nconst MessageList = ({ models }) => {\n const {\n messages,\n isLoading,\n isStreaming,\n messagesEndRef\n } = useConversation();\n\n return (\n
    \n {/* Render all messages */}\n {messages.map((msg, index) => (\n \n ))}\n\n {/* Show loading skeleton if loading or streaming */}\n {(isLoading || isStreaming) && (\n \n )}\n\n {/* Invisible element for auto-scrolling */}\n
    \n
    \n );\n};\n\nexport default MessageList;\n","import React from 'react';\n\nconst MessageSkeleton = ({ streaming }) => {\n return (\n
    \n
    \n
    \n \n
    \n
    \n {streaming ? (\n
    \n \n \n \n
    \n ) : (\n
    \n
    \n
    \n
    \n
    \n )}\n
    \n
    \n
    \n );\n};\n\nexport default MessageSkeleton;\n","import React, { useState } from 'react';\nimport { Zap, Brain, Sparkles } from 'lucide-react';\n\n/**\n * Helper function to get model characteristic for display\n */\nconst getModelCharacteristic = (model) => {\n if (model.id.includes('mini')) {\n return {\n icon: ,\n label: 'Fast',\n className: 'bg-warning bg-opacity-10 text-warning'\n };\n } else if (model.id.includes('gpt-4')) {\n return {\n icon: ,\n label: 'Advanced',\n className: 'bg-primary bg-opacity-10 text-primary'\n };\n } else {\n return {\n icon: ,\n label: 'Balanced',\n className: 'bg-info bg-opacity-10 text-info'\n };\n }\n};\n\n/**\n * Dropdown component for selecting AI models\n */\nconst ModelSelector = ({ selectedModel, onModelSelect, models }) => {\n const [isOpen, setIsOpen] = useState(false);\n const currentModel = models.find(m => m.id === selectedModel) || {\n id: selectedModel,\n name: selectedModel,\n category: 'AI Model'\n };\n const modelCharacteristic = getModelCharacteristic(currentModel);\n\n return (\n
    \n {/* Current Model Button */}\n setIsOpen(!isOpen)}\n type=\"button\"\n data-bs-toggle=\"dropdown\"\n aria-expanded={isOpen}\n aria-label=\"Select AI model\"\n >\n
    \n
    \n {currentModel.name}\n \n {modelCharacteristic.icon}\n {modelCharacteristic.label}\n \n
    \n {currentModel.category}\n
    \n \n \n\n {/* Dropdown Menu */}\n \n
    Select Learning Assistant
    \n

    \n Choose the AI model that best fits your learning style\n

    \n\n
    \n {models.map(model => {\n const characteristic = getModelCharacteristic(model);\n return (\n {\n onModelSelect(model.id);\n setIsOpen(false);\n }}\n aria-pressed={selectedModel === model.id}\n aria-label={`Select ${model.name}`}\n >\n
    \n
    \n
    \n {model.name}\n {model.category}\n
    \n \n {characteristic.icon}\n {characteristic.label}\n \n
    \n
    \n

    \n {model.description}\n

    \n \n );\n })}\n
    \n
    \n\n {/* Dropdown styles */}\n \n
    \n );\n};\n\nexport default ModelSelector;\n","import React from 'react';\nimport { useConversation } from './ConversationContext';\n\n/**\n * Screen for selecting an AI model\n */\nconst ModelSettingsScreen = ({ models }) => {\n const { selectedModel, handleModelChange } = useConversation();\n\n return (\n
    \n

    Choose Your Learning Assistant

    \n\n {models.map(model => (\n handleModelChange(model.id)}\n className={`p-4 rounded cursor-pointer ${\n selectedModel === model.id\n ? 'bg-primary bg-opacity-10 border border-primary'\n : 'bg-darker'\n }`}\n role=\"button\"\n tabIndex=\"0\"\n aria-selected={selectedModel === model.id}\n aria-label={`Select ${model.name}`}\n >\n
    \n

    {model.name}

    \n \n
    \n

    {model.description}

    \n
    \n ))}\n \n );\n};\n\nexport default ModelSettingsScreen;\n","import React from 'react';\nimport { History, CircleGauge } from 'lucide-react';\nimport { useConversation } from './ConversationContext';\n\n/**\n * Sidebar component that displays chat history\n */\nconst Sidebar = ({ models }) => {\n const {\n conversations,\n isLoadingHistory,\n loadConversation\n } = useConversation();\n\n return (\n \n {/* Sidebar Header */}\n
    \n
    \n Chat History\n
    \n \n
    \n\n {/* Dashboard Link */}\n
    \n \n Dashboard\n \n
    \n\n {/* Chat History List */}\n
    \n {isLoadingHistory ? (\n
    \n
    \n Loading...\n
    \n
    \n ) : conversations.length === 0 ? (\n
    \n \n

    No chat history yet

    \n
    \n ) : (\n
    \n {conversations.map((conversation) => (\n loadConversation(conversation.id)}\n className=\"chat-history-item d-flex flex-column p-3 border-bottom border-secondary cursor-pointer hover-bg-dark\"\n role=\"button\"\n tabIndex=\"0\"\n aria-label={`Load conversation: ${conversation.title || 'Untitled'}`}\n >\n
    \n {conversation.title || 'Untitled Conversation'}\n
    \n
    \n {new Date(conversation.created_at).toLocaleDateString()}\n •\n {conversation.messages_count} messages\n
    \n
    \n \n {models.find(m => m.id === conversation.selected_model).name || conversation.selected_model}\n \n
    \n
    \n ))}\n
    \n )}\n \n \n );\n};\n\nexport default Sidebar;\n","import React from 'react';\nimport { ConversationProvider } from './ConversationContext';\nimport AppLayout from './AppLayout';\n\n// MODELS constant defined at the top level for reuse in other components\nexport const MODELS = [\n // OpenAI Models\n {\n id: 'openai/o1-mini',\n name: 'OpenAI: o1-mini',\n description: 'Advanced STEM-focused model with PhD-level accuracy in physics, chemistry, and biology. Optimized for thoughtful responses.',\n category: 'OpenAI'\n },\n {\n id: 'openai/o3-mini',\n name: 'OpenAI: o3 Mini',\n description: 'Cost-efficient model for STEM reasoning with adjustable thinking levels.',\n category: 'OpenAI'\n },\n {\n id: 'openai/gpt-4o-mini',\n name: 'GPT 4.0 Mini',\n description: 'Fast and efficient for general learning assistance',\n category: 'OpenAI'\n },\n // Google Models\n {\n id: 'google/gemini-2.0-flash-001',\n name: 'Gemini 2.0 Flash',\n description: 'Quick responses with excellent accuracy',\n category: 'Google'\n },\n {\n id: 'google/gemini-2.0-flash-lite-001',\n name: 'Gemini 2.0 Flash Lite',\n description: 'Quickest responses with excellent accuracy',\n category: 'Google'\n },\n {\n id: 'google/gemini-flash-1.5',\n name: 'Gemini Flash 1.5',\n description: 'Gemini 1.5 Flash is a foundation model that excels at a variety of multimodal tasks such as visual understanding, classification, summarization, and content creation from images, audio, and video.',\n category: 'Google'\n },\n // Anthropic Models\n {\n id: 'anthropic/claude-3.5-haiku-20241022',\n name: 'Claude 3.5 Haiku',\n description: 'Balanced performance with clear explanations',\n category: 'Anthropic'\n },\n {\n id: 'anthropic/claude-3.5-sonnet',\n name: 'Claude 3.5 Sonnet',\n description: 'Balanced performance with excellent explanations for coding, data science, visual processing and agentic tasks',\n category: 'Anthropic'\n },\n {\n id: 'anthropic/claude-3.7-sonnet',\n name: 'Claude 3.7 Sonnet',\n description: 'An advanced LLM with enhanced reasoning, coding, and problem-solving utilizes a hybrid approach to offer rapid responses or detailed step-by-step processing for complex tasks and workflows.',\n category: 'Anthropic'\n },\n // Mistral Models\n {\n id: 'mistralai/mistral-small-24b-instruct-2501',\n name: 'Mistral Small',\n description: 'Efficient teaching with focused responses',\n category: 'Mistral'\n },\n // DeepSeek Models\n {\n id: 'deepseek/deepseek-r1',\n name: 'Deepseek R1',\n description: 'Deep understanding of complex topics',\n category: 'DeepSeek'\n },\n {\n id: 'deepseek/deepseek-chat',\n name: 'DeepSeek V3',\n description: 'Latest DeepSeek model with advanced instruction following and coding abilities.',\n category: 'DeepSeek'\n },\n // Meta Models\n {\n id: 'meta-llama/llama-3.2-3b-instruct',\n name: 'Llama 3.2',\n description: 'Balanced learning support with clear insights',\n category: 'Meta'\n },\n {\n id: 'meta-llama/llama-3.3-70b-instruct',\n name: 'Llama 3.3',\n description: 'Balanced learning support with clear insights',\n category: 'Meta'\n },\n // xAi Models\n {\n id: 'x-ai/grok-2-1212',\n name: 'Grok 2',\n description: 'A powerful and flexible highly steerable, intelligent model.',\n category: 'xAI'\n },\n];\n\n/**\n * Main StudyAssistant component that serves as the entry point\n */\nconst StudyAssistantInterface = ({\n userName,\n preferredModel,\n conversationId,\n initialConversation = null,\n initialMessages = []\n}) => {\n return (\n \n \n \n );\n};\n\nexport default StudyAssistantInterface;\n","import React, { useState, useCallback } from 'react';\nimport { useDropzone } from 'react-dropzone';\nimport axios from 'axios';\nimport { setupAxiosCSRF } from '../../helpers';\n\nconst FileUploader = ({ examTrackerId }) => {\n const [uploadingFiles, setUploadingFiles] = useState([]);\n const [totalUploaded, setTotalUploaded] = useState(0);\n\n const MAX_FILE_SIZE = 10 * 1024 * 1024; // 10MB\n const MAX_TOTAL_SIZE = 30 * 1024 * 1024; // 30MB\n\n const validateFile = (file) => {\n // Check individual file size\n if (file.size > MAX_FILE_SIZE) {\n return `File ${file.name} is too large (${formatFileSize(file.size)}). Maximum file size is ${formatFileSize(MAX_FILE_SIZE)}.`;\n }\n\n // Check total quota\n if (totalUploaded + file.size > MAX_TOTAL_SIZE) {\n return `Adding this file (${formatFileSize(file.size)}) would exceed the total limit of ${formatFileSize(MAX_TOTAL_SIZE)}. You have ${formatFileSize(MAX_TOTAL_SIZE - totalUploaded)} remaining.`;\n }\n\n return null;\n };\n\n const handleUpload = async (file) => {\n // Validate file before attempting upload\n const validationError = validateFile(file);\n if (validationError) {\n setUploadingFiles(prev => [...prev, {\n file,\n progress: 0,\n status: 'error',\n error: validationError\n }]);\n\n // Remove error message after 5 seconds\n setTimeout(() => {\n setUploadingFiles(prev =>\n prev.filter(item => item.file !== file)\n );\n }, 5000);\n\n return;\n }\n\n setUploadingFiles(prev => [...prev, {\n file,\n progress: 0,\n status: 'uploading',\n error: null\n }]);\n\n const formData = new FormData();\n formData.append('exam_material[file]', file);\n\n try {\n setupAxiosCSRF();\n await axios.post(\n `/exam_trackers/${examTrackerId}/exam_materials`,\n formData,\n {\n headers: {\n 'Content-Type': 'multipart/form-data'\n },\n onUploadProgress: (progressEvent) => {\n const progress = (progressEvent.loaded / progressEvent.total) * 100;\n setUploadingFiles(prev =>\n prev.map(item =>\n item.file === file ? { ...item, progress } : item\n )\n );\n }\n }\n );\n\n // Update total uploaded size\n setTotalUploaded(prev => prev + file.size);\n\n // Set status to completed\n setUploadingFiles(prev =>\n prev.map(item =>\n item.file === file ? { ...item, status: 'completed' } : item\n )\n );\n\n // Remove completed upload after 3 seconds\n setTimeout(() => {\n setUploadingFiles(prev => prev.filter(item => item.file !== file));\n window.location.reload(); // Refresh to show updated list\n }, 3000);\n\n } catch (error) {\n setUploadingFiles(prev =>\n prev.map(item =>\n item.file === file ? {\n ...item,\n status: 'error',\n error: error.response.data.message || 'Upload failed'\n } : item\n )\n );\n }\n };\n\n const onDrop = useCallback(acceptedFiles => {\n acceptedFiles.forEach(handleUpload);\n }, [totalUploaded]);\n\n const { getRootProps, getInputProps, isDragActive, fileRejections } = useDropzone({\n onDrop,\n accept: {\n 'application/pdf': ['.pdf']\n },\n maxSize: MAX_FILE_SIZE,\n validator: validateFile\n });\n\n const formatFileSize = (bytes) => {\n if (bytes === 0) return '0 Bytes';\n const k = 1024;\n const sizes = ['Bytes', 'KB', 'MB', 'GB'];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];\n };\n\n return (\n
    \n {/*
    \n

    \n You can upload various types of study materials in PDF format:\n

    \n
    \n
    \n
    \n \n
    \n
    Lecture Notes
    \n

    Class notes, summaries, and handouts

    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    Past Questions
    \n

    Previous exam papers and practice tests

    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    Scholarly Articles
    \n

    Research papers and academic articles

    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    Textbooks
    \n

    Relevant book chapters or sections

    \n
    \n
    \n
    \n
    \n
    */}\n \n \n
    \n \n
    \n {isDragActive ? 'Drop your files here' : 'Upload Study Materials'}\n
    \n

    \n Drag and drop your files here or click to browse\n

    \n
    \n
    Accepted formats: PDF files only
    \n
    Maximum file size: {formatFileSize(MAX_FILE_SIZE)}
    \n {/*
    Total upload limit: {formatFileSize(MAX_TOTAL_SIZE)}
    */}\n {/*
    Remaining space: {formatFileSize(MAX_TOTAL_SIZE - totalUploaded)}
    */}\n
    \n
    \n
    \n\n {/* Show file rejections from dropzone */}\n {fileRejections.length > 0 && (\n
    \n {fileRejections.map(({ file, errors }) => (\n
    \n {errors.map(error => (\n
    {error.message}
    \n ))}\n
    \n ))}\n
    \n )}\n\n {uploadingFiles.length > 0 && (\n
    \n {uploadingFiles.map(({ file, progress, status, error }, index) => (\n
    \n
    \n \n \n {file.name}\n \n \n {status === 'completed' ? 'Complete' :\n status === 'error' ? 'Failed' :\n `${Math.round(progress)}%`}\n \n
    \n\n {status === 'uploading' && (\n
    \n
    \n
    \n )}\n\n {status === 'error' && (\n

    \n {error}\n

    \n )}\n
    \n ))}\n \n )}\n \n );\n};\n\nexport default FileUploader;\n","import React, { useState } from 'react';\n\nconst AnswerEditor = ({ answer, onAnswerChange, label }) => {\n const [content, setContent] = useState(answer.content);\n const [is_correct, setIsCorrect] = useState(answer.is_correct);\n\n const handleContentChange = (e) => {\n const newContent = e.target.value;\n setContent(newContent);\n onAnswerChange(answer.id, { content: newContent, is_correct });\n };\n\n const handleCorrectChange = (e) => {\n const newCorrect = e.target.checked;\n setIsCorrect(newCorrect);\n onAnswerChange(answer.id, { content, is_correct: newCorrect });\n };\n\n return (\n
    \n
    \n
    \n {/* Answer Label */}\n
    \n {label}\n
    \n\n {/* Answer Input */}\n
    \n \n {content.length}/200\n \n \n
    \n\n {/* Correct Answer Toggle */}\n
    \n \n \n {is_correct ? (\n \n Correct\n \n ) : (\n \n Incorrect\n \n )}\n \n
    \n
    \n\n {/* Correct Answer Indicator */}\n {is_correct && (\n
    \n \n \n \n
    \n )}\n
    \n
    \n );\n};\n\nexport default AnswerEditor;\n","import React, { useState, useEffect } from 'react';\n\nconst InspirationalQuote = () => {\n const [quote, setQuote] = useState('');\n const [fadeIn, setFadeIn] = useState(true);\n\n const quotes = [\n {\n text: \"The best way to predict the future is to create it.\",\n author: \"Peter Drucker\"\n },\n {\n text: \"Education is not preparation for life; education is life itself.\",\n author: \"John Dewey\"\n },\n {\n text: \"The beautiful thing about learning is that no one can take it away from you.\",\n author: \"B.B. King\"\n },\n {\n text: \"The more that you read, the more things you will know, the more that you learn, the more places you'll go.\",\n author: \"Dr. Seuss\"\n },\n {\n text: \"Live as if you were to die tomorrow. Learn as if you were to live forever.\",\n author: \"Mahatma Gandhi\"\n },\n {\n text: \"Knowledge is power. Information is liberating. Education is the premise of progress.\",\n author: \"Kofi Annan\"\n },\n {\n text: \"The best way to predict the future is to create it.\",\n author: \"Peter Drucker\"\n },\n {\n text: \"Success is not the key to happiness. Happiness is the key to success.\",\n author: \"Albert Schweitzer\"\n },\n {\n text: \"Believe you can and you're halfway there.\",\n author: \"Theodore Roosevelt\"\n },\n {\n text: \"The only limit to our realization of tomorrow is our doubts of today.\",\n author: \"Franklin D. Roosevelt\"\n },\n {\n text: \"Your time is limited, don't waste it living someone else's life.\",\n author: \"Steve Jobs\"\n },\n {\n text: \"The most important point is to accept yourself and stand on your two feet.\",\n author: \"Shunryu Suzuki\"\n },\n {\n text: \"The only way to do great work is to love what you do.\",\n author: \"Steve Jobs\"\n },\n {\n text: \"The best preparation for tomorrow is doing your best today.\",\n author: \"H. Jackson Brown Jr.\"\n },\n {\n text: \"Change is inevitable but personal growth is a choice.\",\n author: \"Bob Proctor\"\n },\n {\n text: \"People seldom do what they believe in. They do what is convenient, then repent.\",\n author: \"Bob Dylan\"\n },\n {\n text: \"The only way to achieve the impossible is to believe it is possible.\",\n author: \"Charles Kingsleigh\"\n },\n {\n text: \"The only person you are destined to become is the person you decide to be.\",\n author: \"Ralph Waldo Emerson\"\n },\n {\n text: \"Life can be found only in the present moment. The past is gone, the future is not yet here, and if we do not go back to ourselves in the present moment, we cannot be in touch with life.\",\n author: \"Thich Nhat Hanh\"\n },\n {\n text: \"Success is not final, failure is not fatal: it is the courage to continue that counts.\",\n author: \"Winston Churchill\"\n },\n {\n text: \"Action is the foundational key to all success.\",\n author: \"Pablo Picasso\"\n },\n {\n text: \"Focused, hard work is the real key to success.\",\n author: \"John Carmack\"\n },\n {\n text: \"Work harder on yourself than you do on your job.\",\n author: \"Jim Rohn\"\n },\n {\n text: \"If you don't find the time, if you don't do the work, you don't get the results.\",\n author: \"Arnold Schwarzenegger\"\n }\n ];\n\n useEffect(() => {\n const getRandomQuote = () => {\n setFadeIn(false); // Start fade out\n\n setTimeout(() => {\n const randomIndex = Math.floor(Math.random() * quotes.length);\n setQuote(quotes[randomIndex]);\n setFadeIn(true); // Start fade in\n }, 500); // Half of the transition time\n };\n\n // Display initial quote\n getRandomQuote();\n\n const quoteInterval = setInterval(getRandomQuote, 5000); // Changed to 5 seconds\n\n return () => clearInterval(quoteInterval);\n }, []);\n\n return (\n \n
    \n
    \n \n
    \n\n {quote && (\n
    \n
    \n {quote.text}\n
    \n\n
    \n \n {quote.author}\n
    \n
    \n )}\n
    \n \n );\n};\n\nexport default InspirationalQuote;\n\nconst styles = `\n.quote-container {\n transition: opacity 0.5s ease-in-out;\n}\n\n.fade-in {\n opacity: 1;\n}\n\n.fade-out {\n opacity: 0;\n}\n\n.quote-content {\n position: relative;\n border: 1px solid var(--border-color);\n}\n\n.quote-icon {\n display: flex;\n justify-content: center;\n}\n\nblockquote {\n font-size: 1.125rem;\n line-height: 1.6;\n font-weight: 500;\n text-align: center;\n margin: 0;\n padding: 0;\n}\n\nfigcaption {\n text-align: center;\n font-size: 0.875rem;\n font-weight: 500;\n}\n\n/* Animation for quote icon */\n.quote-icon i {\n transform-origin: center;\n animation: quoteFloat 3s ease-in-out infinite;\n}\n\n@keyframes quoteFloat {\n 0% { transform: translateY(0) rotate(0); }\n 50% { transform: translateY(-5px) rotate(5deg); }\n 100% { transform: translateY(0) rotate(0); }\n}\n\n/* Mobile Optimizations */\n@media (max-width: 768px) {\n blockquote {\n font-size: 1rem;\n }\n\n .quote-icon i {\n font-size: 1.5rem;\n }\n}\n`;\n\n// Add styles to document\nconst styleSheet = document.createElement(\"style\");\nstyleSheet.innerText = styles;\ndocument.head.appendChild(styleSheet);\n","import React, { useState } from 'react';\nimport axios from 'axios';\nimport { setupAxiosCSRF } from '../../helpers';\nimport AnswerEditor from './AnswerEditor';\n\nconst QuestionEditor = ({ question, showAnswer }) => {\n const [isEditing, setIsEditing] = useState(false);\n const [content, setContent] = useState(question.content);\n const [explanation, setExplanation] = useState(question.explanation || '');\n const [answers, setAnswers] = useState(question.answers);\n const [errors, setErrors] = useState(null);\n const [isSaving, setIsSaving] = useState(false);\n const [saveSuccess, setSaveSuccess] = useState(false);\n\n const handleEditClick = () => {\n setIsEditing(true);\n setSaveSuccess(false);\n };\n\n const handleCancelClick = () => {\n setIsEditing(false);\n setContent(question.content);\n setExplanation(question.explanation || '');\n setAnswers(question.answers);\n setSaveSuccess(false);\n };\n\n const handleAnswerChange = (id, updatedAnswer) => {\n setAnswers((prevAnswers) =>\n prevAnswers.map((answer) =>\n answer.id === id ? { ...answer, ...updatedAnswer } : answer\n )\n );\n };\n\n const handleSaveClick = async () => {\n try {\n setIsSaving(true);\n setupAxiosCSRF();\n const response = await axios.patch(`/questions/${question.id}`, {\n question: {\n content,\n explanation,\n answers_attributes: answers.map(({ id, content, is_correct }) => ({\n id,\n content,\n is_correct,\n })),\n },\n });\n\n if (response.status === 200) {\n setContent(response.data.content);\n setExplanation(response.data.explanation);\n setAnswers(response.data.answers);\n setIsEditing(false);\n setErrors(null);\n setSaveSuccess(true);\n setTimeout(() => setSaveSuccess(false), 3000);\n }\n } catch (error) {\n if (error.response.data.errors) {\n setErrors(error.response.data.errors);\n }\n } finally {\n setIsSaving(false);\n }\n };\n\n return (\n
    \n {isEditing ? (\n
    \n {/* Question Content */}\n
    \n \n setContent(e.target.value)}\n className=\"form-control bg-palette text-theme border\"\n rows=\"2\"\n placeholder=\"Enter question text...\"\n />\n
    \n\n {/* Answer Options */}\n
    \n \n
    \n {answers.map((answer, index) => (\n
    \n \n
    \n ))}\n
    \n
    \n\n {/* Explanation */}\n
    \n \n setExplanation(e.target.value)}\n className=\"form-control bg-palette border text-theme\"\n rows=\"3\"\n placeholder=\"Enter explanation...\"\n />\n
    \n\n {/* Error Messages */}\n {errors && (\n
    \n \n {errors.map((error, index) => (\n
    {error}
    \n ))}\n
    \n )}\n\n {/* Action Buttons */}\n
    \n \n Cancel\n \n \n {isSaving ? (\n
    \n \n Saving...\n
    \n ) : (\n
    \n Save\n
    \n )}\n \n
    \n
    \n ) : (\n
    \n
    \n {/* Question Content */}\n
    \n

    {question.content}

    \n
    \n\n {/* Action Buttons */}\n
    \n {saveSuccess && (\n
    \n \n
    \n )}\n \n \n \n
    \n
    \n\n {/* Answer Options */}\n
    \n {answers.map((answer, index) => (\n \n
    \n
    \n {String.fromCharCode(65 + index)}\n
    \n {answer.content}\n {showAnswer && answer.is_correct && (\n \n )}\n
    \n
    \n ))}\n
    \n\n {/* Explanation */}\n {showAnswer && explanation && (\n
    \n
    \n \n
    Explanation
    \n
    \n

    {explanation}

    \n
    \n )}\n
    \n )}\n \n );\n};\n\nexport default QuestionEditor;\n","import React, { useState } from 'react';\nimport QuestionEditor from './QuestionEditor';\n\nconst QuizEditor = ({ quiz, subject, level, quizID }) => {\n const [showAnswer, setShowAnswer] = useState(false);\n const [status] = useState(quiz.status);\n\n return (\n
    \n {/* Header Card */}\n
    \n
    \n
    \n {/* Title and Status */}\n
    \n

    {quiz.title}

    \n \n \n {status === 'hidden' ? 'Private' : 'Public'}\n \n
    \n\n {/* Controls */}\n
    \n {/* Show Answer Toggle */}\n
    \n setShowAnswer(!showAnswer)}\n />\n \n
    \n\n {/* Action Buttons */}\n \n
    \n
    \n\n {/* Stats Row */}\n
    \n
    \n
    \n
    \n
    \n Questions\n
    \n

    {quiz.questions.length}

    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n Subject\n
    \n

    {subject}

    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n Level\n
    \n

    {level}

    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n Status\n
    \n

    \n {status.charAt(0).toUpperCase() + status.slice(1)}\n

    \n
    \n
    \n
    \n
    \n
    \n
    \n\n {/* Questions List */}\n
    \n {quiz.questions.map((question, index) => (\n
    \n
    \n {index + 1}\n
    \n \n
    \n ))}\n
    \n
    \n );\n};\n\nexport default QuizEditor;\n","import React, { useState, useEffect } from 'react';\nimport InspirationalQuote from './InspirationalQuote';\n\nconst QuizProgress = ({ quizGeneratorId, initialStatus, initialProgress }) => {\n const [progress, setProgress] = useState(initialProgress || 0);\n const [status, setStatus] = useState(initialStatus || 'in_progress');\n const [errorMessage, setErrorMessage] = useState(null);\n const [errorData, setErrorData] = useState(null);\n\n useEffect(() => {\n let interval;\n\n const fetchProgress = () => {\n fetch(`/quiz_generators/${quizGeneratorId}/progress.json`, {\n headers: { 'Cache-Control': 'no-cache' },\n })\n .then(response => {\n if (!response.ok) throw new Error('Network response was not ok.');\n return response.json();\n })\n .then(data => {\n // console.log('Fetched progress:', data);\n setProgress(data.progress);\n setStatus(data.status);\n\n if (data.status === 'completed') {\n if (data.redirect_url) {\n window.location.href = data.redirect_url;\n } else {\n setErrorData({\n message: 'Quiz generation completed, but no redirect URL found.',\n suggestions: ['Refresh the page', 'Try accessing your quizzes directly']\n });\n clearInterval(interval);\n }\n } else if (data.status === 'failed') {\n setErrorData(data.error || {\n message: 'Quiz generation failed. Please try again.',\n suggestions: ['Try again', 'Contact support if the problem persists']\n });\n clearInterval(interval);\n }\n })\n .catch(error => {\n console.error('Error fetching progress:', error);\n setErrorData({\n message: 'An error occurred while fetching progress.',\n suggestions: ['Check your internet connection', 'Refresh the page']\n });\n clearInterval(interval);\n });\n };\n\n interval = setInterval(fetchProgress, 1000);\n return () => clearInterval(interval);\n }, [quizGeneratorId]);\n\n const renderFailedState = () => (\n
    \n
    \n \n
    \n

    Generation Failed

    \n

    \n {errorData.details}\n

    \n\n {/* Show retry button */}\n
    \n window.location.href = '/quiz_generators/new?approach=automatic'}\n className=\"btn btn-outline-primary\"\n >\n \n Try Again\n \n
    \n
    \n );\n\n return (\n
    \n
    \n
    \n
    \n
    \n {/* Status Icons and Messages */}\n
    \n {status === 'in_progress' && (\n
    \n
    \n \n
    \n

    Generating Your Quiz

    \n

    \n Our AI is crafting your perfect quiz\n

    \n
    \n )}\n\n {status === 'completed' && (\n
    \n
    \n \n
    \n

    Quiz Ready!

    \n

    \n Redirecting you to your quiz...\n

    \n
    \n )}\n\n { status === 'failed' && renderFailedState() }\n
    \n\n {/* Progress Section */}\n {status === 'in_progress' && (\n
    \n {/* Progress Bar */}\n
    \n
    \n
    \n \n {Math.floor(progress)}%\n \n
    \n
    \n
    \n\n {/* Progress Steps */}\n
    \n
    \n
    = 5 ? 'bg-success bg-opacity-10' : 'bg-darker'}`}>\n = 5 ? 'text-success' : 'text-theme-secondary'}`}>\n
    = 5 ? 'text-theme' : 'text-theme-secondary'}>\n Analyzing Content\n
    \n
    \n
    \n
    \n
    = 10 ? 'bg-success bg-opacity-10' : 'bg-darker'}`}>\n = 10 ? 'text-success' : 'text-theme-secondary'}`}>\n
    = 10 ? 'text-theme' : 'text-theme-secondary'}>\n Generating Questions\n
    \n
    \n
    \n
    \n
    = 90 ? 'bg-success bg-opacity-10' : 'bg-darker'}`}>\n = 90 ? 'text-success' : 'text-theme-secondary'}`}>\n
    = 90 ? 'text-theme' : 'text-theme-secondary'}>\n Finalizing Quiz\n
    \n
    \n
    \n
    \n\n {/* Inspirational Quote */}\n
    \n \n
    \n
    \n )}\n\n {/* Error Message */}\n {errorMessage && status !== 'failed' && (\n
    \n
    \n \n
    \n
    Oops! Something went wrong
    \n

    {errorMessage}

    \n
    \n
    \n
    \n )}\n
    \n
    \n
    \n
    \n
    \n );\n};\n\nexport default QuizProgress;\n","import React from 'react';\n\nconst AnswerOptions = ({\n question,\n selectedAnswer,\n onAnswerSelect,\n submissionStatus\n}) => {\n switch (question.question_type) {\n case 'multiple_choice':\n case 'true_false':\n return (\n
    \n {question.answers.map((answer) => (\n
    \n
    \n onAnswerSelect(answer.id)}\n className=\"visually-hidden\"\n />\n \n {selectedAnswer === answer.id && (\n \n )}\n {answer.content}\n \n
    \n
    \n ))}\n
    \n );\n\n case 'short_answer':\n return (\n
    \n onAnswerSelect(e.target.value)}\n />\n
    \n );\n\n case 'case_study':\n return (\n
    \n
    \n
    Case Study:
    \n

    {question.scenario}

    \n
    \n onAnswerSelect(e.target.value)}\n />\n
    \n );\n\n default:\n return null;\n }\n};\n\nexport default AnswerOptions;\n","import React, { useState, useEffect } from 'react';\nimport axios from 'axios';\nimport { setupAxiosCSRF } from '../../helpers';\nimport AnswerOptions from './AnswerOptions';\n\nconst QuizAttempt = ({ studyBlockId, quizId, title, topic, questionCount }) => {\n // State Management\n const [questions, setQuestions] = useState([]);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState(null);\n const [currentQuestionIndex, setCurrentQuestionIndex] = useState(0);\n const [selectedAnswers, setSelectedAnswers] = useState({});\n const [submissionStatus, setSubmissionStatus] = useState({});\n const [isSubmitting, setIsSubmitting] = useState(false);\n const [showSubmitConfirm, setShowSubmitConfirm] = useState(false);\n const [showMobileNav, setShowMobileNav] = useState(false);\n\n // Calculate progress\n const progress = (Object.keys(selectedAnswers).length / questionCount) * 100;\n const currentProgress = ((currentQuestionIndex + 1) / questionCount) * 100;\n const isQuizComplete = Object.keys(selectedAnswers).length === questionCount;\n\n // Fetch questions when component mounts\n useEffect(() => {\n const fetchQuestions = async () => {\n try {\n setLoading(true);\n setupAxiosCSRF();\n const response = await axios.get(`/study_blocks/${studyBlockId}/quiz/questions`);\n setQuestions(response.data.questions);\n } catch (err) {\n setError('Failed to load quiz questions. Please try again.');\n console.error('Error fetching questions:', err);\n } finally {\n setLoading(false);\n }\n };\n\n fetchQuestions();\n }, [studyBlockId]);\n\n // Handle answer selection\n const handleAnswerSelect = async (answerId) => {\n const currentQuestion = questions[currentQuestionIndex];\n\n // Update local state\n setSelectedAnswers(prev => ({\n ...prev,\n [currentQuestion.id]: answerId\n }));\n\n // Update submission status\n setSubmissionStatus(prev => ({\n ...prev,\n [currentQuestion.id]: 'saving'\n }));\n\n try {\n // Save answer to server\n await axios.post(`/study_blocks/${studyBlockId}/quiz/answer`, {\n question_id: currentQuestion.id,\n answer_id: answerId\n });\n\n // Update status to saved\n setSubmissionStatus(prev => ({\n ...prev,\n [currentQuestion.id]: 'saved'\n }));\n\n // Auto-advance to next question for multiple choice/true-false\n if (\n ['multiple_choice', 'true_false'].includes(currentQuestion.question_type) &&\n currentQuestionIndex < questions.length - 1\n ) {\n setTimeout(() => handleNextQuestion(), 500);\n } else if (currentQuestionIndex === questions.length - 1) {\n // Show submit confirmation if this is the last question and all questions are answered\n if (Object.keys(selectedAnswers).length + 1 === questions.length) {\n setTimeout(() => setShowSubmitConfirm(true), 800);\n }\n }\n } catch (error) {\n console.error('Failed to save answer:', error);\n setSubmissionStatus(prev => ({\n ...prev,\n [currentQuestion.id]: 'error'\n }));\n }\n };\n\n // Navigation handlers\n const handlePreviousQuestion = () => {\n if (currentQuestionIndex > 0) {\n setCurrentQuestionIndex(currentQuestionIndex - 1);\n }\n };\n\n const handleNextQuestion = () => {\n if (currentQuestionIndex < questions.length - 1) {\n setCurrentQuestionIndex(currentQuestionIndex + 1);\n }\n };\n\n const handleQuestionJump = (index) => {\n if (index >= 0 && index < questions.length) {\n setCurrentQuestionIndex(index);\n setShowMobileNav(false); // Close mobile nav after selection\n }\n };\n\n // Quiz submission\n const handleSubmitAttempt = async () => {\n if (!isQuizComplete) {\n alert('Please answer all questions before submitting.');\n return;\n }\n\n setIsSubmitting(true);\n\n try {\n setupAxiosCSRF();\n await axios.post(`/study_blocks/${studyBlockId}/quiz/submit`);\n\n // Redirect to results page\n window.location.href = `/study_blocks/${studyBlockId}/quiz/result`;\n } catch (error) {\n console.error('Failed to submit quiz:', error);\n setIsSubmitting(false);\n alert('Failed to submit quiz. Please try again.');\n }\n };\n\n // Render desktop sidebar navigation\n const renderDesktopNavigation = () => (\n
    \n
    \n
    \n \n
    Questions
    \n
    \n
    \n\n
    \n {/* Question Grid */}\n
    \n {questions.map((question, index) => (\n handleQuestionJump(index)}\n >\n {index + 1}\n {selectedAnswers[question.id] && }\n \n ))}\n
    \n\n {/* Progress Bar */}\n
    \n \n
    \n\n \n {Object.keys(selectedAnswers).length} of {questionCount} answered\n \n\n {/* Submit Button */}\n {isQuizComplete && (\n
    \n setShowSubmitConfirm(true)}\n disabled={isSubmitting}\n >\n \n Submit Quiz\n \n
    \n )}\n
    \n
    \n );\n\n // Render mobile navigation\n const renderMobileNavigation = () => (\n
    \n
    \n {/* Top bar with navigation toggle and progress */}\n
    \n
    \n setShowMobileNav(!showMobileNav)}\n >\n \n Navigate\n \n \n Question {currentQuestionIndex + 1} of {questionCount}\n \n
    \n
    \n \n \n {Object.keys(selectedAnswers).length}/{questionCount}\n \n
    \n
    \n\n {/* Progress bars */}\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n\n {/* Expandable question navigation */}\n {showMobileNav && (\n
    \n
    \n {questions.map((question, index) => (\n handleQuestionJump(index)}\n >\n {index + 1}\n {selectedAnswers[question.id] && }\n \n ))}\n
    \n
    \n )}\n\n {/* Submit button for mobile (when all questions are answered) */}\n {isQuizComplete && (\n
    \n setShowSubmitConfirm(true)}\n disabled={isSubmitting}\n >\n \n Submit Quiz\n \n
    \n )}\n
    \n
    \n );\n\n // Loading state\n if (loading) {\n return (\n
    \n
    \n Loading quiz...\n
    \n
    \n );\n }\n\n // Error state\n if (error) {\n return (\n
    \n \n {error}\n
    \n );\n }\n\n const currentQuestion = questions[currentQuestionIndex];\n\n return (\n
    \n {/* Quiz Header */}\n
    \n
    \n
    \n
    \n

    {title}

    \n

    \n {topic}\n

    \n
    \n
    \n
    \n
    \n\n {/* Mobile Navigation (only visible on small screens) */}\n
    \n
    \n
    \n {renderMobileNavigation()}\n
    \n
    \n
    \n\n {/* Main Content */}\n
    \n {/* Desktop Question Navigation Sidebar (hidden on mobile) */}\n
    \n {renderDesktopNavigation()}\n
    \n\n {/* Main Question Area */}\n
    \n
    \n
    \n
    \n Question {currentQuestionIndex + 1} of {questions.length}\n
    \n

    {currentQuestion.content}

    \n
    \n\n
    \n {/* Answer Options */}\n \n\n {/* Answer Status Indicator */}\n {submissionStatus[currentQuestion.id] && (\n
    \n {submissionStatus[currentQuestion.id] === 'saving' && (\n
    \n \n Saving your answer...\n
    \n )}\n {submissionStatus[currentQuestion.id] === 'saved' && (\n
    \n \n Answer saved\n
    \n )}\n {submissionStatus[currentQuestion.id] === 'error' && (\n
    \n \n Failed to save answer\n
    \n )}\n
    \n )}\n
    \n\n {/* Navigation Footer */}\n
    \n
    \n \n \n Previous\n \n\n \n Next\n \n \n
    \n
    \n
    \n
    \n
    \n\n {/* Submit Confirmation Modal */}\n {showSubmitConfirm && (\n
    \n
    \n
    \n
    \n
    Submit Quiz
    \n setShowSubmitConfirm(false)}\n >\n
    \n
    \n
    \n
    \n \n
    \n

    All Questions Answered!

    \n
    \n

    Are you sure you want to submit your quiz?

    \n

    \n You won't be able to change your answers after submission.\n

    \n
    \n
    \n setShowSubmitConfirm(false)}\n disabled={isSubmitting}\n >\n Review Answers\n \n \n {isSubmitting ? (\n
    \n \n Submitting...\n
    \n ) : (\n
    \n \n Submit Quiz\n
    \n )}\n \n
    \n
    \n
    \n
    \n )}\n\n {/* Styles */}\n \n
    \n );\n};\n\nexport default QuizAttempt;\n","import React from 'react';\n\nconst QuizCompletionSummary = ({\n score,\n totalPoints,\n percentage,\n duration,\n typePerformance,\n quizId,\n canRetake,\n attemptId\n}) => {\n return (\n
    \n
    \n
    \n
    \n
    \n {/* Score Circle */}\n
    \n
    \n
    \n \n \n \n \n
    \n {Math.round(percentage)}%\n
    \n
    \n
    \n
    \n\n {/* Action Cards */}\n
    \n {/* Results Card */}\n
    \n
    \n
    \n \n
    Results
    \n

    \n {score}/{totalPoints} points
    \n Duration: {duration}\n

    \n
    \n
    \n
    \n\n {/* Challenge Friends Card */}\n
    \n
    \n
    \n \n
    Challenge Friends
    \n {\n const url = `${window.location.origin}/quizzes/${quizId}`;\n navigator.clipboard.writeText(url);\n }}\n >\n Copy Quiz Link\n \n
    \n
    \n
    \n\n {/* Retake Card */}\n
    \n
    \n
    \n \n
    Retake Quiz
    \n {canRetake ? (\n window.location.reload()}\n >\n Start Again\n \n ) : (\n

    \n Maximum attempts reached\n

    \n )}\n
    \n
    \n
    \n
    \n\n {/* Performance by Question Type */}\n
    \n
    Performance by Question Type
    \n
    \n {Object.entries(typePerformance).map(([type, data]) => (\n
    \n
    \n
    \n \n {type.replace(/_/g, ' ')\n .split(' ')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ')}\n \n {Math.round(data.percentage)}%\n
    \n
    \n \n
    \n \n {data.correct}/{data.total} correct\n \n
    \n
    \n ))}\n
    \n
    \n\n {/* View Detailed Results Button */}\n
    \n
    \n \n \n View Detailed Results\n \n\n \n \n Get AI-Powered Feedback\n \n
    \n
    \n
    \n
    \n
    \n
    \n {/*
    */}\n\n \n
    \n );\n};\n\nexport default QuizCompletionSummary;\n","import React, { useState, useEffect } from \"react\";\nimport axios from 'axios';\nimport { setupAxiosCSRF } from '../../helpers';\nimport QuizCompletionSummary from './QuizCompletionSummary';\n\nconst QuizTakingInterface = ({ quiz, questions, quiz_id }) => {\n const [selectedAnswer, setSelectedAnswer] = useState({});\n const [currentQuestionIndex, setCurrentQuestionIndex] = useState(0);\n // const [isQuizSubmitted, setIsQuizSubmitted] = useState(false);\n const totalTime = questions.reduce((total, question) => total + question.time_limit, 0);\n const [timeLeft, setTimeLeft] = useState(totalTime);\n const [isSubmitting, setIsSubmitting] = useState(false);\n const [showSubmitDialog, setShowSubmitDialog] = useState(false);\n const [answerSubmissionStatus, setAnswerSubmissionStatus] = useState({});\n const [shuffledAnswers, setShuffledAnswers] = useState([]);\n const [showCompletionSummary, setShowCompletionSummary] = useState(false);\n const [quizSummary, setQuizSummary] = useState(null);\n const [countDownInterval, setCountDownInterval] = useState(null);\n const [showMobileNav, setShowMobileNav] = useState(false);\n const totalQuestions = questions.length;\n const progress = ((currentQuestionIndex + 1) / totalQuestions) * 100;\n const MAX_RETRIES = 3;\n const RETRY_DELAY = 3000;\n\n // Count answered questions\n const answeredCount = Object.keys(selectedAnswer).length;\n const answeredPercentage = (answeredCount / totalQuestions) * 100;\n\n const handleAnswerSelection = (questionId, answerId) => {\n // Update the selected answer in state\n setSelectedAnswer(prevState => {\n const newState = {\n ...prevState,\n [questionId]: answerId\n };\n\n // Check if this was the last unanswered question\n const isLastQuestion = currentQuestionIndex === questions.length - 1;\n const allQuestionsAnswered = questions.every(q => newState[q.id] !== undefined);\n\n // If this is the last question and all questions are now answered, prompt for submission\n if (isLastQuestion && allQuestionsAnswered) {\n // Show submission dialog after a small delay to let the user see their selection\n setTimeout(() => {\n setShowSubmitDialog(true);\n }, 800);\n }\n\n return newState;\n });\n\n // Update submission status\n setAnswerSubmissionStatus(prevStatus => ({\n ...prevStatus,\n [questionId]: 'saving'\n }));\n\n // Save answer to server\n saveAnswerToServer(questionId, answerId);\n\n // Auto-advance to next question after a brief delay\n setTimeout(() => {\n if (currentQuestionIndex < questions.length - 1) {\n setCurrentQuestionIndex(currentQuestionIndex + 1);\n }\n }, 500); // Small delay to show the saving status\n };\n\n const saveAnswerToServer = (questionId, answerId, retryCount = 0) => {\n setupAxiosCSRF();\n axios.post(`/quizzes/${quiz.id}/submit_answer`, {\n question_id: questionId,\n answer_id: answerId,\n })\n .then(response => {\n setAnswerSubmissionStatus(prevStatus => ({\n ...prevStatus,\n [questionId]: 'saved'\n }));\n })\n .catch(error => {\n if (retryCount < MAX_RETRIES) {\n setTimeout(() => {\n saveAnswerToServer(questionId, answerId, retryCount + 1);\n }, RETRY_DELAY);\n } else {\n setAnswerSubmissionStatus(prevStatus => ({\n ...prevStatus,\n [questionId]: 'error'\n }));\n }\n });\n };\n\n const handleQuestionJump = (questionIndex) => {\n if (questionIndex >= 0 && questionIndex < questions.length) {\n setCurrentQuestionIndex(questionIndex);\n // Hide mobile nav after selection on small screens\n setShowMobileNav(false);\n }\n };\n\n const handlePreviousQuestion = () => {\n if (currentQuestionIndex > 0) {\n setCurrentQuestionIndex(currentQuestionIndex - 1);\n }\n };\n\n const handleNextQuestion = () => {\n if (currentQuestionIndex < questions.length - 1) {\n setCurrentQuestionIndex(currentQuestionIndex + 1);\n }\n };\n\n const formatTime = (seconds) => {\n const h = Math.floor(seconds / 3600);\n const m = Math.floor((seconds % 3600) / 60);\n const s = seconds % 60;\n return `${h}:${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;\n };\n\n useEffect(() => {\n const interval = setInterval(() => {\n setTimeLeft(prevTime => {\n if (prevTime <= 1) {\n clearInterval(interval);\n handleSubmit();\n return 0;\n }\n return prevTime - 1;\n });\n }, 1000);\n\n // Store the interval ID\n setCountDownInterval(interval);\n\n // Cleanup function\n return () => {\n if (interval) {\n clearInterval(interval);\n }\n };\n }, []);\n\n useEffect(() => {\n const shuffleArray = array => {\n let currentIndex = array.length;\n let temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n };\n\n if (questions && questions.length > 0 && questions[currentQuestionIndex]) {\n const shuffled = shuffleArray([...questions[currentQuestionIndex].answers]);\n setShuffledAnswers(shuffled);\n }\n }, [questions, currentQuestionIndex]);\n\n const handleSubmitClick = () => {\n setShowSubmitDialog(true);\n };\n\n const handleSubmit = () => {\n if (countDownInterval) {\n clearInterval(countDownInterval);\n setCountDownInterval(null);\n }\n\n setIsSubmitting(true);\n setShowSubmitDialog(false);\n\n setupAxiosCSRF();\n axios.post(`/quizzes/${quiz_id}/finalize_submission`)\n .then(response => {\n setIsSubmitting(false);\n\n // Calculate total points and scored points\n let totalPoints = 0;\n let scoredPoints = 0;\n const typePerformance = {};\n\n questions.forEach(question => {\n const type = question.question_type;\n const questionPoints = question.points; // Get points for this question\n totalPoints += questionPoints;\n\n if (!typePerformance[type]) {\n typePerformance[type] = { total: 0, correct: 0, points: 0, maxPoints: 0, percentage: 0 };\n }\n\n typePerformance[type].total += 1;\n typePerformance[type].maxPoints += questionPoints;\n\n // Check if answer was correct and add points\n if (selectedAnswer[question.id] === question.answers.find(a => a.is_correct).id) {\n typePerformance[type].correct += 1;\n typePerformance[type].points += questionPoints;\n scoredPoints += questionPoints;\n }\n });\n\n // Calculate percentages for each type\n Object.keys(typePerformance).forEach(type => {\n typePerformance[type].percentage =\n (typePerformance[type].points / typePerformance[type].maxPoints) * 100;\n });\n\n // Set quiz summary data with actual points\n setQuizSummary({\n score: scoredPoints,\n totalPoints: totalPoints,\n percentage: (scoredPoints / totalPoints) * 100,\n duration: formatTime(totalTime - timeLeft),\n typePerformance,\n canRetake: response.data.can_retake,\n attemptId: response.data.attempt_id\n });\n\n setShowCompletionSummary(true);\n })\n .catch(error => {\n setIsSubmitting(false);\n console.error(\"Error submitting quiz:\", error);\n });\n };\n\n // Render the desktop sidebar navigation\n const renderDesktopNavigation = () => (\n
    \n
    \n
    \n
    \n \n
    Questions
    \n
    \n
    \n\n
    \n
    \n {questions.map((q, index) => {\n const isAnswered = !!selectedAnswer[q.id];\n let statusClass = isAnswered ? 'answered' :\n (index === currentQuestionIndex ? 'current' : '');\n\n return (\n handleQuestionJump(index)}\n >\n {index + 1}\n {isAnswered && }\n \n );\n })}\n
    \n\n
    \n \n
    \n\n \n {currentQuestionIndex + 1} of {totalQuestions}\n \n
    \n
    \n
    \n );\n\n // Render mobile navigation\n const renderMobileNavigation = () => (\n
    \n
    \n
    \n {/* Compact Progress Indicator */}\n
    \n
    \n setShowMobileNav(!showMobileNav)}\n >\n \n Navigate\n \n
    \n \n Question {currentQuestionIndex + 1} of {totalQuestions}\n \n
    \n
    \n
    \n \n \n {answeredCount}/{totalQuestions}\n \n
    \n
    \n\n {/* Progress Bars */}\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n\n {/* Expandable Question Navigation */}\n {showMobileNav && (\n
    \n
    \n {questions.map((q, index) => {\n const isAnswered = !!selectedAnswer[q.id];\n let statusClass = isAnswered ? 'answered' :\n (index === currentQuestionIndex ? 'current' : '');\n\n return (\n handleQuestionJump(index)}\n >\n {index + 1}\n {isAnswered && }\n \n );\n })}\n
    \n
    \n )}\n
    \n
    \n
    \n );\n\n return (\n
    \n {/* Quiz Header */}\n
    \n
    \n
    \n
    \n
    \n
    \n

    {quiz.title}

    \n

    \n \n {questions.length} Questions\n

    \n
    \n\n
    \n
    \n \n \n {formatTime(timeLeft)}\n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n {/* Mobile Navigation (top) */}\n
    \n
    \n {renderMobileNavigation()}\n
    \n
    \n\n {/* Main Content */}\n
    \n {/* Question Navigation Sidebar (desktop) */}\n
    \n {renderDesktopNavigation()}\n
    \n\n {/* Main Question Area */}\n
    \n
    \n
    \n
    \n
    \n Question {currentQuestionIndex + 1}\n
    \n

    \n {questions[currentQuestionIndex].content}\n

    \n
    \n
    \n\n
    \n
    \n {shuffledAnswers.map(answer => (\n
    \n
    \n handleAnswerSelection(questions[currentQuestionIndex].id, answer.id)}\n className=\"visually-hidden\"\n />\n \n
    \n
    \n ))}\n\n {answerSubmissionStatus[questions[currentQuestionIndex].id] && (\n
    \n {answerSubmissionStatus[questions[currentQuestionIndex].id] === 'saving' && (\n
    \n \n Saving your answer...\n
    \n )}\n {answerSubmissionStatus[questions[currentQuestionIndex].id] === 'saved' && (\n
    \n \n Answer saved successfully\n
    \n )}\n {answerSubmissionStatus[questions[currentQuestionIndex].id] === 'error' && (\n
    \n \n Failed to save answer\n
    \n )}\n
    \n )}\n
    \n
    \n\n
    \n
    \n \n Previous\n \n\n {Object.keys(selectedAnswer).length === questions.length ? (\n \n {isSubmitting ? (\n
    \n \n Submitting...\n
    \n ) : (\n
    \n \n Submit Quiz\n
    \n )}\n \n ) : (\n \n Next\n \n )}\n
    \n
    \n
    \n
    \n
    \n\n {/* Submit Confirmation Modal */}\n {showSubmitDialog && (\n
    \n
    \n
    \n
    \n
    Submit Quiz
    \n setShowSubmitDialog(false)}\n aria-label=\"Close\"\n />\n
    \n
    \n

    Are you sure you want to submit your quiz?

    \n

    \n You won't be able to change your answers after submission.\n

    \n
    \n
    \n setShowSubmitDialog(false)}\n >\n Review Answers\n \n \n {isSubmitting ? (\n
    \n \n Submitting...\n
    \n ) : (\n
    \n \n Submit Quiz\n
    \n )}\n \n
    \n
    \n
    \n
    \n )}\n\n {showCompletionSummary && quizSummary && (\n window.location.href = `/quizzes/${quiz_id}/result`}\n />\n )}\n\n {/* Modal Backdrop */}\n {showSubmitDialog && (\n
    \n )}\n\n {/* Additional Styles */}\n \n
    \n );\n};\n\nexport default QuizTakingInterface;\n","import React, { useState, useEffect } from 'react';\nimport axios from 'axios';\nimport { setupAxiosCSRF } from '../../helpers';\n\nconst StudyPlanStatus = ({ examTrackerId }) => {\n const [status, setStatus] = useState('loading');\n const [data, setData] = useState(null);\n const [error, setError] = useState(null);\n const [lastUpdate, setLastUpdate] = useState(null);\n\n // Polling interval in milliseconds (3 seconds)\n const POLL_INTERVAL = 3000;\n\n const fetchStatus = async () => {\n try {\n setupAxiosCSRF();\n const response = await axios.get(`/exam_trackers/${examTrackerId}/study_plan/generation_status`);\n setStatus(response.data.status);\n setData(response.data.data);\n setError(null);\n } catch (err) {\n setError(err.response.data.error || 'Failed to fetch status');\n }\n };\n\n useEffect(() => {\n let pollTimer;\n let mounted = true;\n\n const startPolling = async () => {\n if (mounted) {\n await fetchStatus();\n pollTimer = setInterval(fetchStatus, POLL_INTERVAL);\n }\n };\n\n startPolling();\n\n return () => {\n mounted = false;\n if (pollTimer) clearInterval(pollTimer);\n };\n }, [examTrackerId]);\n\n const handleStartAnalysis = async () => {\n try {\n setupAxiosCSRF();\n await axios.post(`/exam_trackers/${examTrackerId}/topic_relationship`);\n setStatus('analyzing_materials');\n await fetchStatus();\n } catch (err) {\n setError('Failed to start analysis');\n }\n };\n\n const handleGeneratePlan = async () => {\n try {\n setupAxiosCSRF();\n await axios.post(`/exam_trackers/${examTrackerId}/study_plan`);\n setStatus('generating');\n await fetchStatus();\n } catch (err) {\n setError('Failed to start plan generation');\n }\n };\n\n const handleRegeneratePlan = async () => {\n if (!confirm('This will replace your existing study plan. Are you sure?')) {\n return;\n }\n\n try {\n setupAxiosCSRF();\n await axios.post(`/exam_trackers/${examTrackerId}/study_plan/regenerate`);\n setStatus('analyzing_materials');\n await fetchStatus();\n } catch (err) {\n setError('Failed to start plan regeneration');\n }\n };\n\n const handleRetryAnalysis = async () => {\n try {\n setupAxiosCSRF();\n await axios.post(`/exam_trackers/${examTrackerId}/topic_relationship/retry_analysis`);\n setStatus('analyzing_materials');\n await fetchStatus();\n } catch (err) {\n setError('Failed to restart topic analysis');\n }\n };\n\n if (error) {\n return (\n
    \n
    \n \n
    \n

    Error

    \n

    {error}

    \n window.location.reload()}\n className=\"btn btn-primary\"\n >\n Retry\n \n
    \n );\n }\n\n switch (status) {\n case 'loading':\n return (\n
    \n
    \n Loading...\n
    \n
    \n );\n\n case 'analyzing_materials':\n return (\n
    \n
    \n
    \n Loading...\n
    \n
    \n

    Analyzing Study Materials

    \n

    \n Please wait while we analyze your materials. You can start Study plan generation once analysis is complete.\n

    \n
    \n );\n\n case 'ready_for_analysis':\n return (\n
    \n
    \n \n
    \n

    Materials Ready for Analysis

    \n

    \n Your materials have been processed. Ready to analyze topics and relationships?\n

    \n \n Start Topic Analysis\n \n
    \n );\n\n case 'analysis_failed':\n return (\n
    \n
    \n \n
    \n

    Material Analysis Failed

    \n

    \n {data.error_message || 'An error occurred while analyzing your study materials.'}\n

    \n \n Retry Analysis\n \n
    \n );\n\n case 'ready_to_generate':\n return (\n
    \n
    \n \n
    \n

    Analysis Complete!

    \n

    \n Topic analysis is complete. Ready to generate your personalized study plan?\n

    \n \n Generate Study Plan\n \n
    \n );\n\n case 'materials_changed':\n return (\n
    \n
    \n \n
    \n

    Study Materials Have Changed

    \n

    \n Your study materials have been modified since your last study plan was generated.\n We recommend regenerating your plan to include these changes.\n

    \n \n Regenerate Study Plan\n \n
    \n );\n\n case 'ready_to_generate':\n return (\n
    \n
    \n \n
    \n

    Ready to Create Your Study Plan?

    \n

    \n We'll analyze your study materials and create a personalized study plan\n to help you prepare for your exam.\n

    \n \n Generate Study Plan\n \n
    \n );\n\n case 'generating':\n return (\n
    \n
    \n
    \n Loading...\n
    \n
    \n

    Generating Your Study Plan

    \n

    \n Please wait while we analyze your materials and create your personalized study plan. This may take a few minutes. You will receive an email once your study plan is ready\n

    \n
    \n );\n\n case 'generation_failed':\n return (\n
    \n
    \n \n
    \n

    Generation Failed

    \n

    \n {data.error_message || 'An error occurred while generating your study plan.'}\n

    \n \n Try Again\n \n
    \n );\n\n case 'generated':\n return (\n
    \n
    \n \n
    \n

    Study Plan Generated!

    \n

    \n Your personalized study plan is ready. Start your structured preparation for the exam.\n

    \n \n View Study Plan\n \n
    \n );\n\n case 'awaiting_materials':\n return (\n
    \n
    \n \n
    \n

    Upload Materials First

    \n

    \n Upload and process your study materials to generate a personalized study plan.\n

    \n
    \n );\n\n default:\n return null;\n }\n};\n\nexport default StudyPlanStatus;\n","import React from 'react';\nimport { LineChart, Line, PieChart, Pie, BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts';\n\nconst ActivityLabel = ({ activityType }) => {\n const translations = {\n document_processing: \"Processing Study Materials\",\n study_advice: \"Creating Study Advice\",\n learning_plan_creation: \"Creating Learning Plan\",\n practice_quiz_creation: \"Creating Practice Quiz\",\n exam_quiz_creation: \"Creating Exam Quiz\",\n content_indexing: \"Organizing Content\",\n study_note_creation: \"Creating Study Notes\",\n content_summary: \"Summarizing Content\",\n topic_identification: \"Identifying Topics\",\n topic_connection_analysis: \"Analyzing Topic Connections\",\n assistant_chat: \"Chat with Study Assistant\"\n };\n\n return {translations[activityType] || activityType};\n};\n\n// Activity color mapping\nconst activityColors = {\n study_advice: '#4F46E5', // Indigo\n learning_plan_creation: '#06B6D4', // Cyan\n practice_quiz_creation: '#10B981', // Emerald\n exam_quiz_creation: '#F59E0B', // Amber\n content_indexing: '#EC4899', // Pink\n study_note_creation: '#8B5CF6', // Violet\n content_summary: '#14B8A6', // Teal\n topic_identification: '#6366F1', // Indigo\n topic_connection_analysis: '#8B5CF6', // Violet\n document_processing: '#3B82F6', // Blue\n assistant_chat: '#FFFFFF' // Green\n};\n\n// Function to get color for activity\nconst getActivityColor = (activity) => activityColors[activity] || '#4F46E5';\n\n// Translation mapping (as we discussed earlier)\nconst translations = {\n document_processing: \"Processing Study Materials\",\n study_advice: \"Creating Study Advice\",\n learning_plan_creation: \"Creating Learning Plan\",\n practice_quiz_creation: \"Creating Practice Quiz\",\n exam_quiz_creation: \"Creating Exam Quiz\",\n content_indexing: \"Organizing Content\",\n study_note_creation: \"Creating Study Notes\",\n content_summary: \"Summarizing Content\",\n topic_identification: \"Identifying Topics\",\n topic_connection_analysis: \"Analyzing Topic Connections\",\n assistant_chat: \"Chat with Study Assistant\"\n};\n\nconst TokenUsageDisplay = ({ report, current_user }) => {\n return (\n
    \n {/* Summary Statistics */}\n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    Tokens Remaining
    \n

    \n {new Intl.NumberFormat().format(current_user.tokens_remaining)}\n

    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n {/* Total Usage */}\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    Total Usage
    \n

    \n {new Intl.NumberFormat().format(report.summary.total_tokens_used)}\n

    \n
    \n
    \n
    \n
    \n
    \n\n {/* Daily Average */}\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    Daily Average
    \n

    \n {new Intl.NumberFormat().format(Math.round(report.summary.average_daily_usage))}\n

    \n
    \n
    \n
    \n
    \n
    \n\n {/* Expiry */}\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    Days Until Expiry
    \n

    \n {Math.max(0, Math.ceil((new Date(current_user.tokens_expiry) - new Date()) / (1000 * 60 * 60 * 24)))}\n

    \n
    \n
    \n
    \n
    \n
    \n
    \n\n {/* Usage Trends */}\n
    \n
    \n
    Daily Usage Trends
    \n \n \n \n new Date(date).toLocaleDateString()}\n />\n \n \n \n \n \n \n
    \n
    \n\n {/* Activity Distribution */}\n
    \n {/* Table - Show on all screen sizes */}\n
    \n
    \n
    \n
    Usage by Activity
    \n
    \n \n \n \n \n \n \n \n \n \n {report.by_activity.map((activity, index) => (\n \n \n \n \n \n ))}\n \n
    ActivityTokensPercentage
    \n {new Intl.NumberFormat().format(activity.total_tokens)}\n {activity.percentage}%
    \n
    \n
    \n
    \n
    \n\n {/* Pie Chart - Hide on mobile, show on lg screens and up */}\n
    \n
    \n
    \n
    Distribution Chart
    \n \n \n ({\n ...activity,\n name: translations[activity.activity] || activity.activity,\n fill: getActivityColor(activity.activity)\n }))}\n dataKey=\"total_tokens\"\n nameKey=\"name\"\n cx=\"50%\"\n cy=\"50%\"\n outerRadius={100}\n label={({\n cx,\n cy,\n midAngle,\n innerRadius,\n outerRadius,\n value,\n index\n }) => {\n const RADIAN = Math.PI / 180;\n const radius = 25 + innerRadius + (outerRadius - innerRadius);\n const x = cx + radius * Math.cos(-midAngle * RADIAN);\n const y = cy + radius * Math.sin(-midAngle * RADIAN);\n\n return (\n cx ? 'start' : 'end'}\n dominantBaseline=\"central\"\n >\n {`${value.toLocaleString()} tokens`}\n \n );\n }}\n />\n (\n {value}\n )}\n layout=\"vertical\"\n align=\"right\"\n verticalAlign=\"middle\"\n />\n \n \n
    \n
    \n
    \n
    \n \n );\n};\n\nexport default TokenUsageDisplay;\n","import axios from 'axios'\n\nexport const setupAxiosCSRF = () => {\n const tokenDom = document.querySelector(\"meta[name=csrf-token]\")\n if (tokenDom) {\n const csrfToken = tokenDom.content\n axios.defaults.headers.common['X-CSRF-Token'] = csrfToken\n }\n};\n"],"names":["map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","module","exports","CommissionCalculator","bundles","referralCount","setReferralCount","useState","selectedBundle","setSelectedBundle","purchaseFrequency","setPurchaseFrequency","estimatedEarnings","setEstimatedEarnings","useEffect","calculateEarnings","totalPurchases","price","React","className","type","min","value","onChange","Math","max","parseInt","target","defaultValue","disabled","entries","key","bundle","name","toFixed","MetricsDashboard","userId","timeRange","metrics","setMetrics","loading","setLoading","error","setError","activeTimeRange","setActiveTimeRange","COLORS","CHART_COLORS","fetchMetrics","async","token","document","querySelector","content","axios","defaults","headers","common","response","get","range","data","err","console","handleTimeRangeChange","style","height","role","summary","total_quizzes_taken","study_blocks_completed","formatDate","dateString","Date","toLocaleDateString","month","day","safeGetData","obj","path","result","split","reduce","acc","undefined","length","attemptsByDayData","date","count","attempts","tokenUsageTrendData","tokens","onClick","active_days","current_streak","insights","insight","index","category","replace","toUpperCase","message","ResponsiveContainer","width","BarChart","CartesianGrid","strokeDasharray","stroke","XAxis","dataKey","YAxis","Tooltip","contentStyle","backgroundColor","borderColor","color","labelStyle","Legend","wrapperStyle","Bar","fill","LineChart","Line","activeDot","r","PieChart","Pie","filter","cx","cy","labelLine","outerRadius","nameKey","label","percent","entry","Cell","time","score","charAt","slice","domain","formatter","topic","model","pop","assistant_metrics","total_conversations","total_messages","file_uploads","total_files","achievements","achievement","icon","title","description","StudentPerformance","user","activeTab","setActiveTab","setData","overview","performance","skills","comparison","timeAnalytics","examPrep","overviewRes","fetch","overviewData","json","prev","fetchAllData","endpoint","loadTabData","full_name","Alert","variant","Tabs","activeKey","onSelect","Tab","eventKey","Spinner","animation","renderOverview","total_attempts","completed_attempts","average_score","average_time","completion_rate","recent_trend","weekly_activity","streak_data","Card","Body","improving","change_percentage","abs","floor","round","longest_streak","margin","top","right","left","bottom","yAxisId","orientation","border","renderPerformance","score_distribution","pass_rate","best_scores","quiz_type_performance","performance_by_time","improvement_trend","scoreDistData","bucket","quiz_type_label","avg_score","layout","tick","fontSize","renderSkills","subject_performance","question_type_analysis","topic_weakness","recommended_topics","subjectData","subject","attempt_count","RadarChart","PolarGrid","PolarAngleAxis","PolarRadiusAxis","angle","Radar","fillOpacity","idx","below_avg_by","weak_areas","under_practiced","renderTimeAnalytics","daily_activity","performance_trend","study_consistency","average_session_duration","average_minutes","session_count","longest_session_minutes","renderComparison","subject_comparison","difficulty_comparison","score_percentile","time_efficiency_percentile","percentile","ProgressBar","now","user_average","class_average","user_average_seconds","class_average_seconds","renderExamPrep","exam_success_rate","practice_to_exam_correlation","study_plan_impact","recent_progress","success_rate","total_exams","passed_exams","practice_avg","exam_avg","difference","has_impact_data","with_plan_avg","without_plan_avg","improvement","exam","exam_name","days_remaining","avg_recent_score","ChallengeInterface","challengeId","duration","questions","setQuestions","currentIndex","setCurrentIndex","selectedOption","setSelectedOption","answered","setAnswered","setScore","streak","setStreak","timeLeft","setTimeLeft","showHint","setShowHint","isSubmitting","setIsSubmitting","usedHint","setUsedHint","completed","setCompleted","timerRef","useRef","fetchQuestions","clearInterval","current","startTimer","ok","setInterval","completeChallenge","submitAnswer","method","body","JSON","stringify","question_id","selected_option","optionIndex","hint_used","response_time","points_earned","is_correct","setTimeout","moveToNextQuestion","window","location","href","progressPercentage","currentQuestion","seconds","secs","toString","padStart","formatTime","minWidth","maxWidth","borderRadius","difficulty","question","options","option","correct_option","handleSelectOption","String","fromCharCode","hint","toggleHint","explanation","points","propTypes","PropTypes","isRequired","AppLayout","models","useConversation","Sidebar","ConversationHeader","MainContent","ErrorAlert","onClose","FooterInput","MessageStyles","truncateText","text","maxLength","substring","ChatHistory","examTrackerId","onSelectConversation","onNewChat","conversations","setConversations","pagination","setPagination","page","setPage","fetchHistory","pageNumber","conversation","messages_count","last_message","formatDistanceToNow","last_message_at","addSuffix","pages","ChatInterface","conversationId","messages","setMessages","newMessage","setNewMessage","isLoading","setIsLoading","isRetrying","setIsRetrying","messagesEndRef","inputRef","loadConversation","scrollToBottom","setupAxiosCSRF","msg","timestamp","status","scrollIntoView","behavior","handleSubmit","preventDefault","trim","post","conversation_id","handleRetry","finally","renderMessage","toLocaleTimeString","dangerouslySetInnerHTML","__html","line","i","join","ref","onSubmit","placeholder","onKeyDown","ctrlKey","metaKey","jsx","ChatModal","examTitle","view","setView","activeConversation","setActiveConversation","resetModal","useCallback","handleModalHidden","modal","getElementById","addEventListener","removeEventListener","timer","setupModalListener","modalInstance","bootstrap","Modal","dispose","clearTimeout","handleNewChat","tabIndex","onBackToHistory","ConversationContext","createContext","processStreamingContent","ConversationProvider","children","userName","preferredModel","initialConversation","initialMessages","selectedModel","setSelectedModel","showSettings","setShowSettings","setMessage","isLoadingHistory","setIsLoadingHistory","isStreaming","setIsStreaming","uploadedFile","setUploadedFile","fileContent","setFileContent","isFileProcessing","setIsFileProcessing","eventSourceRef","abortControllerRef","messageStateRef","retryCount","accumulatedContent","hasAssistantMessage","aborted","fetchChatHistory","abort","cleanupEventSource","querySelectorAll","forEach","element","Offcanvas","handlePopState","event","state","updateBrowserHistory","newUrl","newState","pathname","history","pushState","close","convId","conversationMessages","offcanvasElement","offcanvas","getInstance","hide","sendMessage","messageContent","lastUpdateTime","timeoutId","handleSendError","selected_model","newConversation","createConversation","userMessage","created_at","toISOString","isTemporary","tempId","file","url","URL","createObjectURL","AbortController","requestPayload","file_id","credentials","signal","processStreamingResponse","log","reader","getReader","decoder","TextDecoder","buffer","assistantMessage","debouncedUpdate","debounce","func","wait","timeout","args","debouncedMessageUpdate","Promise","done","read","decode","stream","lines","trimmedLine","startsWith","parse","processedContent","model_used","serverUserMsg","serverAssistantMsg","originalMessage","contextValue","handleNewConversation","handleFileUpload","formData","FormData","append","processing_status","systemMessage","handleFileStatusChange","fileData","previousStatus","updatedFileContent","msgs","handleModelChange","modelId","patch","handleKeyDown","shiftKey","Provider","context","useContext","Menu","size","ModelSelector","onModelSelect","find","m","MessageSquarePlus","ArrowLeft","Settings","X","EmptyConversation","src","alt","getTimeBasedGreeting","hour","getHours","rows","ArrowUp","FileDisplay","expanded","setExpanded","textContent","setTextContent","isLoadingText","setIsLoadingText","loadTextContent","Image","FileType","FileText","toggleExpand","Minimize","Maximize","download","Download","renderFilePreview","maxHeight","whiteSpace","FileStatusPoller","fileId","onStatusChange","setStatus","pollCount","setPollCount","isMounted","isPolling","pollTimer","startPolling","checkStatus","newStatus","getStatusDisplay","Clock","Loader","CheckCircle","AlertCircle","FileUpload","onFileSelect","allowedFileTypes","setFile","preview","setPreview","isUploading","setIsUploading","fileInputRef","selectedFile","files","includes","accept","handleUpload","then","catch","clearFile","triggerFileInput","click","FileUp","FileBadge","ModelSettingsScreen","MessageList","CopyButton","copied","setCopied","showToast","setShowToast","navigator","clipboard","writeText","Check","Copy","zIndex","Message","modelDetails","textAlign","ReactMarkdown","remarkPlugins","remarkMath","remarkGfm","rehypePlugins","rehypeKatex","components","props","node","rest","match","exec","SyntaxHighlighter","_extends","PreTag","language","vscDarkPlus","showLineNumbers","wrapLines","Cpu","MessageSkeleton","streaming","getModelCharacteristic","Zap","Brain","Sparkles","isOpen","setIsOpen","currentModel","modelCharacteristic","overflowY","characteristic","CircleGauge","History","MODELS","StudyAssistantInterface","FileUploader","uploadingFiles","setUploadingFiles","totalUploaded","setTotalUploaded","MAX_FILE_SIZE","MAX_TOTAL_SIZE","validateFile","formatFileSize","validationError","progress","item","onUploadProgress","progressEvent","loaded","total","reload","onDrop","acceptedFiles","getRootProps","getInputProps","isDragActive","fileRejections","useDropzone","maxSize","validator","bytes","parseFloat","pow","errors","AnswerEditor","answer","onAnswerChange","setContent","setIsCorrect","newContent","checked","newCorrect","htmlFor","InspirationalQuote","quote","setQuote","fadeIn","setFadeIn","quotes","author","getRandomQuote","randomIndex","random","quoteInterval","styleSheet","createElement","innerText","head","appendChild","QuestionEditor","showAnswer","isEditing","setIsEditing","setExplanation","answers","setAnswers","setErrors","isSaving","setIsSaving","saveSuccess","setSaveSuccess","handleAnswerChange","updatedAnswer","prevAnswers","handleCancelClick","answers_attributes","handleEditClick","QuizEditor","quiz","level","quizID","setShowAnswer","marginLeft","QuizProgress","quizGeneratorId","initialStatus","initialProgress","setProgress","errorMessage","setErrorMessage","errorData","setErrorData","interval","fetchProgress","redirect_url","suggestions","details","transition","AnswerOptions","selectedAnswer","onAnswerSelect","submissionStatus","question_type","scenario","QuizAttempt","studyBlockId","quizId","questionCount","currentQuestionIndex","setCurrentQuestionIndex","selectedAnswers","setSelectedAnswers","setSubmissionStatus","showSubmitConfirm","setShowSubmitConfirm","showMobileNav","setShowMobileNav","currentProgress","isQuizComplete","handleNextQuestion","handleQuestionJump","answerId","answer_id","handlePreviousQuestion","alert","QuizCompletionSummary","totalPoints","percentage","typePerformance","canRetake","attemptId","display","viewBox","strokeWidth","PI","strokeDashoffset","origin","word","correct","QuizTakingInterface","quiz_id","setSelectedAnswer","totalTime","time_limit","showSubmitDialog","setShowSubmitDialog","answerSubmissionStatus","setAnswerSubmissionStatus","shuffledAnswers","setShuffledAnswers","showCompletionSummary","setShowCompletionSummary","quizSummary","setQuizSummary","countDownInterval","setCountDownInterval","totalQuestions","answeredCount","answeredPercentage","saveAnswerToServer","questionId","prevStatus","questionIndex","s","prevTime","shuffled","array","temporaryValue","shuffleArray","scoredPoints","questionPoints","maxPoints","a","can_retake","attempt_id","q","isAnswered","statusClass","handleAnswerSelection","prevState","isLastQuestion","allQuestionsAnswered","every","handleSubmitClick","StudyPlanStatus","lastUpdate","setLastUpdate","fetchStatus","mounted","handleStartAnalysis","handleGeneratePlan","handleRegeneratePlan","confirm","handleRetryAnalysis","error_message","study_plan_url","ActivityLabel","activityType","document_processing","study_advice","learning_plan_creation","practice_quiz_creation","exam_quiz_creation","content_indexing","study_note_creation","content_summary","topic_identification","topic_connection_analysis","assistant_chat","activityColors","getActivityColor","activity","translations","TokenUsageDisplay","report","current_user","Intl","NumberFormat","format","tokens_remaining","tokens_purchased","total_tokens_used","average_daily_usage","ceil","tokens_expiry","daily_usage","tickFormatter","by_activity","total_tokens","midAngle","innerRadius","RADIAN","radius","x","cos","y","sin","textAnchor","dominantBaseline","toLocaleString","align","verticalAlign","tokenDom","csrfToken"],"sourceRoot":""}