@hydralms/components 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/StudentProfile-BPsZBaJj.cjs +1 -0
- package/dist/StudentProfile-Cw2p-RZn.js +3273 -0
- package/dist/assessment-toolbar/question-navigator.d.ts +1 -1
- package/dist/assessment-toolbar/timer-display.d.ts +1 -1
- package/dist/common/index.d.ts +2 -1
- package/dist/common/pagination.d.ts +26 -0
- package/dist/common/types.d.ts +1 -0
- package/dist/components.css +1 -1
- package/dist/content/audio-player.d.ts +22 -0
- package/dist/content/code-block.d.ts +30 -0
- package/dist/content/embed-block.d.ts +28 -0
- package/dist/content/index.d.ts +6 -0
- package/dist/content/types.d.ts +24 -0
- package/dist/curriculum/course-card.d.ts +51 -0
- package/dist/curriculum/index.d.ts +2 -0
- package/dist/curriculum/types.d.ts +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +495 -439
- package/dist/license/HydraContext.d.ts +16 -0
- package/dist/license/ProBadge.d.ts +6 -0
- package/dist/license/index.d.ts +7 -0
- package/dist/license/tiers.d.ts +6 -0
- package/dist/license/useHydraLicense.d.ts +6 -0
- package/dist/license/validate.d.ts +13 -0
- package/dist/license/withProGate.d.ts +6 -0
- package/dist/modules/AssignmentModule/AssignmentModule.d.ts +4 -7
- package/dist/modules/AssignmentModule/types.d.ts +5 -1
- package/dist/modules/CertificateModule/CertificateModule.d.ts +4 -8
- package/dist/modules/CertificateModule/types.d.ts +6 -4
- package/dist/modules/CourseCatalogModule/CourseCatalogModule.d.ts +5 -0
- package/dist/modules/CourseCatalogModule/types.d.ts +43 -0
- package/dist/modules/CoursePlayer/CoursePlayer.d.ts +4 -1
- package/dist/modules/DiscussionModule/DiscussionModule.d.ts +4 -7
- package/dist/modules/ExamModule/ExamModule.d.ts +4 -7
- package/dist/modules/ExamModule/types.d.ts +5 -14
- package/dist/modules/FlashcardLab/FlashcardLab.d.ts +4 -1
- package/dist/modules/FlashcardLab/types.d.ts +2 -0
- package/dist/modules/GradeCenterModule/GradeCenterModule.d.ts +4 -8
- package/dist/modules/GradeCenterModule/types.d.ts +2 -0
- package/dist/modules/QuizModule/QuizModule.d.ts +4 -1
- package/dist/modules/QuizModule/types.d.ts +5 -14
- package/dist/modules/StudentDashboardModule/StudentDashboardModule.d.ts +5 -0
- package/dist/modules/StudentDashboardModule/types.d.ts +54 -0
- package/dist/modules/StudentProfileModule/StudentProfileModule.d.ts +5 -0
- package/dist/modules/StudentProfileModule/types.d.ts +43 -0
- package/dist/modules/SurveyModule/SurveyModule.d.ts +4 -6
- package/dist/modules/SurveyModule/types.d.ts +2 -0
- package/dist/modules/_shared/assessment-intro.d.ts +16 -0
- package/dist/modules/_shared/assessment-results.d.ts +23 -0
- package/dist/modules/_shared/types.d.ts +10 -0
- package/dist/modules/_shared/use-timer.d.ts +9 -0
- package/dist/modules/index.d.ts +6 -0
- package/dist/modules.cjs +1 -1
- package/dist/modules.js +1267 -854
- package/dist/progress/types.d.ts +2 -0
- package/dist/provider/HydraProvider.d.ts +5 -1
- package/dist/questions/choice.d.ts +1 -1
- package/dist/questions/confidence-indicator.d.ts +37 -0
- package/dist/questions/essay.d.ts +1 -1
- package/dist/questions/fill-in-the-blank.d.ts +1 -1
- package/dist/questions/hotspot.d.ts +1 -1
- package/dist/questions/index.d.ts +2 -0
- package/dist/questions/inline-choice.d.ts +1 -1
- package/dist/questions/matching.d.ts +1 -1
- package/dist/questions/multiple-choice.d.ts +1 -1
- package/dist/questions/numeric.d.ts +1 -1
- package/dist/questions/ordering.d.ts +1 -1
- package/dist/questions/question-renderer.d.ts +1 -1
- package/dist/questions/scenario.d.ts +1 -1
- package/dist/questions/spreadsheet.d.ts +1 -1
- package/dist/questions/true-false.d.ts +1 -1
- package/dist/sections/AdaptiveLearningPath/AdaptiveLearningPath.d.ts +5 -0
- package/dist/sections/AdaptiveLearningPath/path-connector.d.ts +8 -0
- package/dist/sections/AdaptiveLearningPath/path-milestone-marker.d.ts +7 -0
- package/dist/sections/AdaptiveLearningPath/path-node-card.d.ts +10 -0
- package/dist/sections/AdaptiveLearningPath/path-skill-bar.d.ts +8 -0
- package/dist/sections/AdaptiveLearningPath/types.d.ts +136 -0
- package/dist/sections/AnnouncementFeed/AnnouncementFeed.d.ts +1 -1
- package/dist/sections/AnnouncementFeed/types.d.ts +15 -1
- package/dist/sections/AssessmentReview/AssessmentReview.d.ts +1 -1
- package/dist/sections/AssessmentReview/types.d.ts +6 -0
- package/dist/sections/AssignmentSubmission/AssignmentSubmission.d.ts +1 -1
- package/dist/sections/AssignmentSubmission/types.d.ts +6 -0
- package/dist/sections/CertificateViewer/CertificateViewer.d.ts +1 -1
- package/dist/sections/CertificateViewer/certificate-variants.d.ts +42 -0
- package/dist/sections/CertificateViewer/types.d.ts +6 -0
- package/dist/sections/ContentAuthoringStudio/ContentAuthoringStudio.d.ts +5 -0
- package/dist/sections/ContentAuthoringStudio/block-editor-item.d.ts +14 -0
- package/dist/sections/ContentAuthoringStudio/block-type-picker.d.ts +12 -0
- package/dist/sections/ContentAuthoringStudio/types.d.ts +67 -0
- package/dist/sections/CourseCatalog/CourseCatalog.d.ts +2 -0
- package/dist/sections/CourseCatalog/types.d.ts +80 -0
- package/dist/sections/CourseOutline/CourseOutline.d.ts +1 -1
- package/dist/sections/CourseOutline/types.d.ts +6 -0
- package/dist/sections/DiscussionThread/DiscussionThread.d.ts +1 -1
- package/dist/sections/DiscussionThread/types.d.ts +6 -0
- package/dist/sections/EnrollmentWizard/EnrollmentWizard.d.ts +2 -0
- package/dist/sections/EnrollmentWizard/types.d.ts +66 -0
- package/dist/sections/ExamSession/ExamSession.d.ts +1 -1
- package/dist/sections/ExamSession/types.d.ts +6 -0
- package/dist/sections/FlashcardStudySession/FlashcardStudySession.d.ts +1 -1
- package/dist/sections/FlashcardStudySession/types.d.ts +6 -0
- package/dist/sections/ForumBoard/ForumBoard.d.ts +1 -1
- package/dist/sections/ForumBoard/types.d.ts +14 -0
- package/dist/sections/GradebookTable/GradebookTable.d.ts +1 -1
- package/dist/sections/GradebookTable/types.d.ts +14 -0
- package/dist/sections/LecturePlayer/LecturePlayer.d.ts +1 -1
- package/dist/sections/LecturePlayer/types.d.ts +8 -0
- package/dist/sections/LessonPage/LessonPage.d.ts +1 -1
- package/dist/sections/LessonPage/types.d.ts +6 -0
- package/dist/sections/PracticeQuiz/PracticeQuiz.d.ts +1 -1
- package/dist/sections/PracticeQuiz/types.d.ts +6 -0
- package/dist/sections/ProgressDashboard/ProgressDashboard.d.ts +1 -1
- package/dist/sections/ProgressDashboard/types.d.ts +6 -0
- package/dist/sections/QuizSession/QuizSession.d.ts +1 -1
- package/dist/sections/QuizSession/types.d.ts +6 -0
- package/dist/sections/RequirementsChecklist/RequirementsChecklist.d.ts +1 -1
- package/dist/sections/RequirementsChecklist/types.d.ts +6 -0
- package/dist/sections/ResourceLibrary/ResourceLibrary.d.ts +1 -1
- package/dist/sections/ResourceLibrary/types.d.ts +15 -1
- package/dist/sections/RubricView/RubricView.d.ts +1 -1
- package/dist/sections/RubricView/types.d.ts +6 -0
- package/dist/sections/ScrollableQuiz/ScrollableQuiz.d.ts +1 -1
- package/dist/sections/ScrollableQuiz/types.d.ts +6 -0
- package/dist/sections/StudentProfile/StudentProfile.d.ts +2 -0
- package/dist/sections/StudentProfile/types.d.ts +98 -0
- package/dist/sections/SurveyForm/SurveyForm.d.ts +1 -1
- package/dist/sections/SurveyForm/types.d.ts +6 -0
- package/dist/sections/_shared/merge-answers.d.ts +9 -0
- package/dist/sections/_shared/section-shell.d.ts +20 -0
- package/dist/sections/_shared/use-assessment-session.d.ts +30 -0
- package/dist/sections/index.d.ts +10 -0
- package/dist/sections.cjs +1 -1
- package/dist/sections.js +1361 -307
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/progress.d.ts +1 -1
- package/dist/ui/rich-text-editor.d.ts +3 -1
- package/dist/ui/toast.d.ts +43 -0
- package/dist/utils/debounce.d.ts +5 -1
- package/dist/utils/pick-palette-color.d.ts +19 -0
- package/dist/video/types.d.ts +15 -0
- package/dist/video/video-player.d.ts +1 -1
- package/dist/withProGate-BJdu1T9Y.cjs +2 -0
- package/dist/withProGate-BvFc7Jwy.js +4975 -0
- package/package.json +57 -226
- package/src/assessment-toolbar/question-navigator.tsx +10 -5
- package/src/assessment-toolbar/timer-display.tsx +4 -3
- package/src/assessment-toolbar/use-countdown.ts +1 -1
- package/src/common/empty-state.tsx +1 -0
- package/src/common/index.ts +2 -0
- package/src/common/pagination.tsx +135 -0
- package/src/common/search-input.tsx +2 -1
- package/src/common/types.ts +2 -0
- package/src/content/attachment-list.tsx +2 -0
- package/src/content/audio-player.tsx +196 -0
- package/src/content/code-block.tsx +113 -0
- package/src/content/content-block.tsx +64 -0
- package/src/content/embed-block.tsx +78 -0
- package/src/content/file-upload-zone.tsx +10 -0
- package/src/content/index.ts +6 -0
- package/src/content/types.ts +5 -0
- package/src/curriculum/course-card.tsx +199 -0
- package/src/curriculum/curriculum-item.tsx +3 -3
- package/src/curriculum/curriculum-tree.tsx +20 -13
- package/src/curriculum/index.ts +2 -0
- package/src/curriculum/types.ts +2 -2
- package/src/flashcards/flashcard.tsx +28 -8
- package/src/index.ts +3 -0
- package/src/license/HydraContext.tsx +62 -0
- package/src/license/ProBadge.tsx +43 -0
- package/src/license/index.ts +7 -0
- package/src/license/tiers.ts +34 -0
- package/src/license/useHydraLicense.ts +10 -0
- package/src/license/validate.ts +90 -0
- package/src/license/withProGate.tsx +21 -0
- package/src/modules/AssignmentModule/AssignmentModule.tsx +17 -8
- package/src/modules/AssignmentModule/types.ts +5 -1
- package/src/modules/CertificateModule/CertificateModule.tsx +21 -9
- package/src/modules/CertificateModule/types.ts +6 -4
- package/src/modules/CourseCatalogModule/CourseCatalogModule.tsx +126 -0
- package/src/modules/CourseCatalogModule/types.ts +47 -0
- package/src/modules/CoursePlayer/CoursePlayer.tsx +39 -22
- package/src/modules/DiscussionModule/DiscussionModule.tsx +57 -22
- package/src/modules/ExamModule/ExamModule.tsx +64 -198
- package/src/modules/ExamModule/types.ts +5 -14
- package/src/modules/FlashcardLab/FlashcardLab.tsx +10 -5
- package/src/modules/FlashcardLab/types.ts +2 -0
- package/src/modules/GradeCenterModule/GradeCenterModule.tsx +7 -2
- package/src/modules/GradeCenterModule/types.ts +2 -0
- package/src/modules/QuizModule/QuizModule.tsx +49 -169
- package/src/modules/QuizModule/types.ts +5 -15
- package/src/modules/StudentDashboardModule/StudentDashboardModule.tsx +117 -0
- package/src/modules/StudentDashboardModule/types.ts +56 -0
- package/src/modules/StudentProfileModule/StudentProfileModule.tsx +289 -0
- package/src/modules/StudentProfileModule/types.ts +45 -0
- package/src/modules/SurveyModule/SurveyModule.tsx +9 -4
- package/src/modules/SurveyModule/types.ts +2 -0
- package/src/modules/_shared/assessment-intro.tsx +75 -0
- package/src/modules/_shared/assessment-results.tsx +133 -0
- package/src/modules/_shared/types.ts +11 -0
- package/src/modules/_shared/use-timer.ts +49 -0
- package/src/modules/index.ts +9 -0
- package/src/progress/achievement-badge.tsx +3 -3
- package/src/progress/grade-indicator.tsx +9 -1
- package/src/progress/progress-ring.tsx +2 -1
- package/src/progress/stat-card.tsx +14 -2
- package/src/progress/types.ts +2 -0
- package/src/provider/HydraProvider.tsx +15 -6
- package/src/questions/choice.tsx +13 -6
- package/src/questions/confidence-indicator.tsx +107 -0
- package/src/questions/essay.tsx +6 -4
- package/src/questions/fill-in-the-blank.tsx +8 -4
- package/src/questions/hotspot.tsx +4 -4
- package/src/questions/index.ts +2 -0
- package/src/questions/inline-choice.tsx +5 -4
- package/src/questions/matching.tsx +5 -4
- package/src/questions/multiple-choice.tsx +13 -6
- package/src/questions/numeric.tsx +8 -4
- package/src/questions/ordering.tsx +12 -4
- package/src/questions/question-renderer.tsx +3 -2
- package/src/questions/scenario.tsx +4 -4
- package/src/questions/spreadsheet.tsx +5 -4
- package/src/questions/true-false.tsx +13 -6
- package/src/sections/AdaptiveLearningPath/AdaptiveLearningPath.tsx +251 -0
- package/src/sections/AdaptiveLearningPath/path-connector.tsx +27 -0
- package/src/sections/AdaptiveLearningPath/path-milestone-marker.tsx +50 -0
- package/src/sections/AdaptiveLearningPath/path-node-card.tsx +166 -0
- package/src/sections/AdaptiveLearningPath/path-skill-bar.tsx +49 -0
- package/src/sections/AdaptiveLearningPath/types.ts +159 -0
- package/src/sections/AnnouncementFeed/AnnouncementFeed.tsx +64 -8
- package/src/sections/AnnouncementFeed/types.ts +15 -1
- package/src/sections/AssessmentReview/AssessmentReview.tsx +37 -0
- package/src/sections/AssessmentReview/types.ts +6 -0
- package/src/sections/AssignmentSubmission/AssignmentSubmission.tsx +37 -1
- package/src/sections/AssignmentSubmission/types.ts +6 -0
- package/src/sections/CertificateViewer/CertificateViewer.tsx +29 -227
- package/src/sections/CertificateViewer/certificate-variants.tsx +170 -0
- package/src/sections/CertificateViewer/types.ts +6 -0
- package/src/sections/ContentAuthoringStudio/ContentAuthoringStudio.tsx +289 -0
- package/src/sections/ContentAuthoringStudio/block-editor-item.tsx +487 -0
- package/src/sections/ContentAuthoringStudio/block-type-picker.tsx +123 -0
- package/src/sections/ContentAuthoringStudio/types.ts +67 -0
- package/src/sections/CourseCatalog/CourseCatalog.tsx +220 -0
- package/src/sections/CourseCatalog/types.ts +76 -0
- package/src/sections/CourseOutline/CourseOutline.tsx +41 -0
- package/src/sections/CourseOutline/types.ts +6 -0
- package/src/sections/DiscussionThread/DiscussionThread.tsx +42 -1
- package/src/sections/DiscussionThread/types.ts +6 -0
- package/src/sections/EnrollmentWizard/EnrollmentWizard.tsx +343 -0
- package/src/sections/EnrollmentWizard/types.ts +65 -0
- package/src/sections/ExamSession/ExamSession.tsx +100 -94
- package/src/sections/ExamSession/types.ts +6 -0
- package/src/sections/FlashcardStudySession/FlashcardStudySession.tsx +53 -36
- package/src/sections/FlashcardStudySession/types.ts +6 -0
- package/src/sections/ForumBoard/ForumBoard.tsx +67 -7
- package/src/sections/ForumBoard/types.ts +14 -0
- package/src/sections/GradebookTable/GradebookTable.tsx +54 -1
- package/src/sections/GradebookTable/types.ts +14 -0
- package/src/sections/LecturePlayer/LecturePlayer.tsx +63 -37
- package/src/sections/LecturePlayer/types.ts +8 -0
- package/src/sections/LessonPage/LessonPage.tsx +34 -6
- package/src/sections/LessonPage/types.ts +6 -0
- package/src/sections/PracticeQuiz/PracticeQuiz.tsx +106 -74
- package/src/sections/PracticeQuiz/types.ts +6 -0
- package/src/sections/ProgressDashboard/ProgressDashboard.tsx +64 -10
- package/src/sections/ProgressDashboard/types.ts +6 -0
- package/src/sections/QuizSession/QuizSession.tsx +71 -82
- package/src/sections/QuizSession/types.ts +6 -0
- package/src/sections/RequirementsChecklist/RequirementsChecklist.tsx +41 -1
- package/src/sections/RequirementsChecklist/types.ts +6 -0
- package/src/sections/ResourceLibrary/ResourceLibrary.tsx +64 -8
- package/src/sections/ResourceLibrary/types.ts +15 -1
- package/src/sections/RubricView/RubricView.tsx +37 -1
- package/src/sections/RubricView/types.ts +6 -0
- package/src/sections/ScrollableQuiz/ScrollableQuiz.tsx +36 -15
- package/src/sections/ScrollableQuiz/types.ts +6 -0
- package/src/sections/StudentProfile/StudentProfile.tsx +279 -0
- package/src/sections/StudentProfile/types.ts +99 -0
- package/src/sections/SurveyForm/SurveyForm.tsx +32 -5
- package/src/sections/SurveyForm/types.ts +6 -0
- package/src/sections/_shared/merge-answers.ts +22 -0
- package/src/sections/_shared/section-shell.tsx +64 -0
- package/src/sections/_shared/use-assessment-session.ts +125 -0
- package/src/sections/index.ts +40 -0
- package/src/social/user-avatar.tsx +9 -5
- package/src/styles/globals.css +39 -41
- package/src/ui/badge.tsx +8 -0
- package/src/ui/index.ts +2 -0
- package/src/ui/progress.tsx +4 -0
- package/src/ui/rich-text-editor.tsx +10 -0
- package/src/ui/rich-text-toolbar.tsx +2 -1
- package/src/ui/toast.tsx +170 -0
- package/src/utils/debounce.ts +8 -2
- package/src/utils/pick-palette-color.ts +33 -0
- package/src/video/types.ts +16 -0
- package/src/video/video-player.tsx +27 -6
- package/dist/ForumBoard-CHXU3mjC.js +0 -2207
- package/dist/ForumBoard-d1w5-r6n.cjs +0 -1
- package/dist/tabs-DRM2Iq_J.cjs +0 -172
- package/dist/tabs-Wf3h_Cx3.js +0 -21580
package/dist/modules.js
CHANGED
|
@@ -1,300 +1,380 @@
|
|
|
1
|
-
import { jsx as e, jsxs as t, Fragment as
|
|
2
|
-
import { useState as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { C as
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { jsx as e, jsxs as t, Fragment as te } from "react/jsx-runtime";
|
|
2
|
+
import { useState as R, useRef as U, useEffect as L, useCallback as T, useMemo as Z } from "react";
|
|
3
|
+
import { HelpCircle as le, Clock as re, CheckCircle2 as J, Play as ae, XCircle as Te, Trophy as se, RotateCcw as ie, BookOpen as K, Shuffle as he, Layers as Ie, ArrowLeft as X, PanelLeft as je, Check as Le, ChevronLeft as Fe, ChevronRight as Qe, ShieldCheck as qe, ClipboardList as Ge, BarChart3 as ve, FileEdit as fe, Paperclip as xe, FileText as Ye, Link as $e, Award as ee, PartyPopper as Ve, Bell as We, User as He } from "lucide-react";
|
|
4
|
+
import { a as be, Q as _e, F as Xe, l as Ze, d as Je, P as Ke, L as De, g as Oe, e as et, k as tt, G as st, h as we, i as pe, b as rt, R as nt, C as Se, D as lt, f as at, c as ke, A as it, E as ct, j as dt } from "./StudentProfile-Cw2p-RZn.js";
|
|
5
|
+
import { C as I, x as j, B as Y, a as ne, v as P, an as D, az as $, av as _, b2 as G, b5 as ze, c as A, N as ot, S as ut, V as mt, Z as ht, R as ft, Q as xt, a2 as ce, P as pt, d as Ce, e as ye, a9 as Ae, aL as de, aN as oe, aO as W, aM as H, a0 as ge, aA as Ne, aU as gt, b6 as Nt, A as vt } from "./withProGate-BvFc7Jwy.js";
|
|
6
|
+
function Me(c) {
|
|
7
|
+
const [N, o] = R(0), l = U(null), f = U(null), i = U(0);
|
|
8
|
+
L(() => (c ? (l.current = Date.now(), f.current = setInterval(() => {
|
|
9
|
+
if (l.current) {
|
|
10
|
+
const a = Math.floor((Date.now() - l.current) / 1e3);
|
|
11
|
+
a !== i.current && (i.current = a, o(a));
|
|
12
|
+
}
|
|
13
|
+
}, 1e3)) : f.current && (clearInterval(f.current), f.current = null), () => {
|
|
14
|
+
f.current && clearInterval(f.current);
|
|
15
|
+
}), [c]);
|
|
16
|
+
const n = T(() => l.current ? Math.floor((Date.now() - l.current) / 1e3) : i.current, []), h = T(() => {
|
|
17
|
+
i.current = 0, o(0), l.current = null;
|
|
18
|
+
}, []);
|
|
19
|
+
return { timeElapsed: N, getFinalElapsed: n, reset: h };
|
|
20
|
+
}
|
|
21
|
+
function Ee({
|
|
22
|
+
icon: c,
|
|
23
|
+
title: N,
|
|
24
|
+
description: o,
|
|
25
|
+
questionCount: l,
|
|
26
|
+
timeLimitSeconds: f,
|
|
27
|
+
passingScore: i,
|
|
28
|
+
startLabel: n,
|
|
29
|
+
onStart: h,
|
|
30
|
+
children: a,
|
|
31
|
+
readOnly: u = !1
|
|
18
32
|
}) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const { correct: A, total: I, percentage: M } = he(h, r), Q = p.current ? Math.floor((Date.now() - p.current) / 1e3) : g;
|
|
30
|
-
return {
|
|
31
|
-
answers: r,
|
|
32
|
-
correct: A,
|
|
33
|
-
total: I,
|
|
34
|
-
percentage: M,
|
|
35
|
-
passed: k !== void 0 ? M >= k : !0,
|
|
36
|
-
timeElapsedSeconds: Q
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
function w(r) {
|
|
40
|
-
const A = S(r);
|
|
41
|
-
n({ tag: "results", result: A }), l == null || l(A);
|
|
42
|
-
}
|
|
43
|
-
function z() {
|
|
44
|
-
a(0), p.current = null, n({ tag: "intro" });
|
|
45
|
-
}
|
|
46
|
-
if (x.tag === "intro")
|
|
47
|
-
return /* @__PURE__ */ e("div", { ref: C, tabIndex: -1, className: T("max-w-2xl mx-auto outline-none", d), style: v, children: /* @__PURE__ */ e(B, { children: /* @__PURE__ */ t(L, { className: "pt-8 pb-8 text-center", children: [
|
|
48
|
-
/* @__PURE__ */ e("div", { className: "mx-auto mb-4 w-14 h-14 rounded-full bg-primary/10 flex items-center justify-center", children: /* @__PURE__ */ e(te, { className: "size-7 text-primary" }) }),
|
|
49
|
-
/* @__PURE__ */ e("h2", { className: "text-2xl font-bold text-foreground mb-2", children: u }),
|
|
50
|
-
b && /* @__PURE__ */ e("p", { className: "text-muted-foreground mb-6 max-w-md mx-auto", children: b }),
|
|
51
|
-
/* @__PURE__ */ t("div", { className: "flex flex-wrap justify-center gap-2 mb-8", children: [
|
|
52
|
-
/* @__PURE__ */ t(j, { variant: "outline", className: "gap-1.5", children: [
|
|
53
|
-
/* @__PURE__ */ e(X, { className: "size-3.5" }),
|
|
54
|
-
h.length,
|
|
55
|
-
" questions"
|
|
56
|
-
] }),
|
|
57
|
-
o && /* @__PURE__ */ t(j, { variant: "outline", className: "gap-1.5", children: [
|
|
58
|
-
/* @__PURE__ */ e(G, { className: "size-3.5" }),
|
|
59
|
-
V(o),
|
|
60
|
-
" time limit"
|
|
61
|
-
] }),
|
|
62
|
-
k !== void 0 && /* @__PURE__ */ t(j, { variant: "outline", className: "gap-1.5", children: [
|
|
63
|
-
/* @__PURE__ */ e(F, { className: "size-3.5" }),
|
|
64
|
-
k,
|
|
65
|
-
"% to pass"
|
|
66
|
-
] })
|
|
33
|
+
return /* @__PURE__ */ e(I, { children: /* @__PURE__ */ t(j, { className: "pt-8 pb-8 text-center", children: [
|
|
34
|
+
/* @__PURE__ */ e("div", { className: "mx-auto mb-4 w-14 h-14 rounded-full bg-primary/10 flex items-center justify-center", children: c }),
|
|
35
|
+
/* @__PURE__ */ e("h2", { className: "text-2xl font-bold text-foreground mb-2", children: N }),
|
|
36
|
+
o && /* @__PURE__ */ e("p", { className: "text-muted-foreground mb-6 max-w-md mx-auto", children: o }),
|
|
37
|
+
a,
|
|
38
|
+
/* @__PURE__ */ t("div", { className: "flex flex-wrap justify-center gap-2 mb-8", children: [
|
|
39
|
+
/* @__PURE__ */ t(Y, { variant: "outline", className: "gap-1.5", children: [
|
|
40
|
+
/* @__PURE__ */ e(le, { className: "size-3.5" }),
|
|
41
|
+
l,
|
|
42
|
+
" questions"
|
|
67
43
|
] }),
|
|
68
|
-
/* @__PURE__ */ t(
|
|
69
|
-
/* @__PURE__ */ e(
|
|
70
|
-
|
|
44
|
+
f != null && /* @__PURE__ */ t(Y, { variant: "outline", className: "gap-1.5", children: [
|
|
45
|
+
/* @__PURE__ */ e(re, { className: "size-3.5" }),
|
|
46
|
+
ne(f),
|
|
47
|
+
" time limit"
|
|
48
|
+
] }),
|
|
49
|
+
i !== void 0 && /* @__PURE__ */ t(Y, { variant: "outline", className: "gap-1.5", children: [
|
|
50
|
+
/* @__PURE__ */ e(J, { className: "size-3.5" }),
|
|
51
|
+
i,
|
|
52
|
+
"% to pass"
|
|
71
53
|
] })
|
|
72
|
-
] })
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ t(P, { size: "lg", onClick: h, disabled: u, children: [
|
|
56
|
+
/* @__PURE__ */ e(ae, { className: "size-4 mr-2" }),
|
|
57
|
+
n
|
|
58
|
+
] })
|
|
59
|
+
] }) });
|
|
60
|
+
}
|
|
61
|
+
function Be({
|
|
62
|
+
title: c,
|
|
63
|
+
percentage: N,
|
|
64
|
+
passed: o,
|
|
65
|
+
correct: l,
|
|
66
|
+
total: f,
|
|
67
|
+
timeElapsedSeconds: i,
|
|
68
|
+
answers: n,
|
|
69
|
+
questions: h,
|
|
70
|
+
allowRetake: a,
|
|
71
|
+
onRetake: u,
|
|
72
|
+
retakeLabel: x = "Retake",
|
|
73
|
+
showReview: b = !0,
|
|
74
|
+
extraBadges: s,
|
|
75
|
+
readOnly: S = !1
|
|
76
|
+
}) {
|
|
77
|
+
return /* @__PURE__ */ t(te, { children: [
|
|
78
|
+
/* @__PURE__ */ e(I, { children: /* @__PURE__ */ t(j, { className: "pt-8 pb-8", children: [
|
|
87
79
|
/* @__PURE__ */ t("div", { className: "text-center mb-8", children: [
|
|
88
80
|
/* @__PURE__ */ e(
|
|
89
|
-
|
|
81
|
+
D,
|
|
90
82
|
{
|
|
91
|
-
value:
|
|
83
|
+
value: N,
|
|
92
84
|
size: 140,
|
|
93
85
|
strokeWidth: 10,
|
|
94
|
-
color:
|
|
86
|
+
color: o ? "var(--success)" : "var(--destructive)",
|
|
95
87
|
className: "mx-auto mb-4 text-foreground"
|
|
96
88
|
}
|
|
97
89
|
),
|
|
98
90
|
/* @__PURE__ */ e(
|
|
99
|
-
|
|
91
|
+
Y,
|
|
100
92
|
{
|
|
101
|
-
variant:
|
|
93
|
+
variant: o ? "success" : "destructive",
|
|
102
94
|
className: "text-sm px-3 py-1 mb-2",
|
|
103
|
-
children:
|
|
95
|
+
children: o ? "Passed" : "Failed"
|
|
104
96
|
}
|
|
105
97
|
),
|
|
106
|
-
|
|
98
|
+
s,
|
|
99
|
+
/* @__PURE__ */ e("h2", { className: "text-xl font-bold text-foreground", children: c })
|
|
107
100
|
] }),
|
|
108
101
|
/* @__PURE__ */ t("div", { className: "grid grid-cols-2 sm:grid-cols-4 gap-3 mb-8", children: [
|
|
109
102
|
/* @__PURE__ */ e(
|
|
110
|
-
|
|
103
|
+
$,
|
|
111
104
|
{
|
|
112
|
-
icon: /* @__PURE__ */ e(
|
|
105
|
+
icon: /* @__PURE__ */ e(J, {}),
|
|
113
106
|
label: "Correct",
|
|
114
107
|
description: "Questions answered right",
|
|
115
|
-
value: `${
|
|
108
|
+
value: `${l}/${f}`,
|
|
109
|
+
accent: "var(--success)"
|
|
116
110
|
}
|
|
117
111
|
),
|
|
118
112
|
/* @__PURE__ */ e(
|
|
119
|
-
|
|
113
|
+
$,
|
|
120
114
|
{
|
|
121
|
-
icon: /* @__PURE__ */ e(
|
|
115
|
+
icon: /* @__PURE__ */ e(Te, {}),
|
|
122
116
|
label: "Incorrect",
|
|
123
117
|
description: "Questions to review",
|
|
124
|
-
value: `${
|
|
118
|
+
value: `${f - l}/${f}`,
|
|
119
|
+
accent: "var(--destructive)"
|
|
125
120
|
}
|
|
126
121
|
),
|
|
127
122
|
/* @__PURE__ */ e(
|
|
128
|
-
|
|
123
|
+
$,
|
|
129
124
|
{
|
|
130
|
-
icon: /* @__PURE__ */ e(
|
|
125
|
+
icon: /* @__PURE__ */ e(se, {}),
|
|
131
126
|
label: "Score",
|
|
132
127
|
description: "Overall percentage",
|
|
133
|
-
value: `${
|
|
128
|
+
value: `${N}%`,
|
|
129
|
+
accent: "var(--palette-3)"
|
|
134
130
|
}
|
|
135
131
|
),
|
|
136
132
|
/* @__PURE__ */ e(
|
|
137
|
-
|
|
133
|
+
$,
|
|
138
134
|
{
|
|
139
|
-
icon: /* @__PURE__ */ e(
|
|
135
|
+
icon: /* @__PURE__ */ e(re, {}),
|
|
140
136
|
label: "Time",
|
|
141
137
|
description: "Total elapsed",
|
|
142
|
-
value:
|
|
138
|
+
value: ne(i),
|
|
139
|
+
accent: "var(--palette-1)"
|
|
143
140
|
}
|
|
144
141
|
)
|
|
145
142
|
] }),
|
|
146
|
-
|
|
147
|
-
/* @__PURE__ */ e(
|
|
148
|
-
|
|
143
|
+
a && u && !S && /* @__PURE__ */ e("div", { className: "flex justify-center mb-8", children: /* @__PURE__ */ t(P, { variant: "outline", onClick: u, children: [
|
|
144
|
+
/* @__PURE__ */ e(ie, { className: "size-4 mr-2" }),
|
|
145
|
+
x
|
|
149
146
|
] }) })
|
|
150
147
|
] }) }),
|
|
151
|
-
|
|
152
|
-
/* @__PURE__ */ e(
|
|
148
|
+
b && /* @__PURE__ */ t(te, { children: [
|
|
149
|
+
/* @__PURE__ */ e(_, { className: "my-6" }),
|
|
153
150
|
/* @__PURE__ */ e("h3", { className: "text-lg font-semibold text-foreground mb-4", children: "Question Review" }),
|
|
154
151
|
/* @__PURE__ */ e(
|
|
155
|
-
|
|
152
|
+
be,
|
|
156
153
|
{
|
|
157
154
|
questions: h,
|
|
158
|
-
sessionAnswers:
|
|
155
|
+
sessionAnswers: n,
|
|
159
156
|
showCorrectAnswers: !0
|
|
160
157
|
}
|
|
161
158
|
)
|
|
162
159
|
] })
|
|
163
160
|
] });
|
|
164
161
|
}
|
|
165
|
-
function
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
162
|
+
function bt({
|
|
163
|
+
title: c,
|
|
164
|
+
description: N,
|
|
165
|
+
questions: o,
|
|
166
|
+
timeLimitSeconds: l,
|
|
167
|
+
passingScore: f,
|
|
168
|
+
allowRetake: i = !0,
|
|
169
|
+
onComplete: n,
|
|
170
|
+
showReview: h = !0,
|
|
171
|
+
questionMaterials: a,
|
|
172
|
+
readOnly: u = !1,
|
|
173
|
+
className: x,
|
|
174
|
+
style: b
|
|
173
175
|
}) {
|
|
174
|
-
const [
|
|
175
|
-
|
|
176
|
-
var
|
|
177
|
-
(
|
|
178
|
-
}, [
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
176
|
+
const [s, S] = R({ tag: "intro" }), m = U(null), { timeElapsed: g, getFinalElapsed: v, reset: r } = Me(s.tag === "quiz"), C = U(n);
|
|
177
|
+
C.current = n, L(() => {
|
|
178
|
+
var d;
|
|
179
|
+
(d = m.current) == null || d.focus({ preventScroll: !0 });
|
|
180
|
+
}, [s.tag]);
|
|
181
|
+
const M = T((d) => {
|
|
182
|
+
var B;
|
|
183
|
+
const { correct: p, total: w, percentage: k } = ze(o, d), Q = {
|
|
184
|
+
answers: d,
|
|
185
|
+
correct: p,
|
|
186
|
+
total: w,
|
|
187
|
+
percentage: k,
|
|
188
|
+
passed: f !== void 0 ? k >= f : !0,
|
|
189
|
+
timeElapsedSeconds: v()
|
|
190
|
+
};
|
|
191
|
+
S({ tag: "results", result: Q }), (B = C.current) == null || B.call(C, Q);
|
|
192
|
+
}, [o, f, v]), y = T(() => {
|
|
193
|
+
r(), S({ tag: "intro" });
|
|
194
|
+
}, [r]);
|
|
195
|
+
if (s.tag === "intro")
|
|
196
|
+
return /* @__PURE__ */ e("div", { ref: m, tabIndex: -1, className: A("max-w-2xl mx-auto outline-none", x), style: b, children: /* @__PURE__ */ e(
|
|
197
|
+
Ee,
|
|
198
|
+
{
|
|
199
|
+
icon: /* @__PURE__ */ e(se, { className: "size-7 text-primary" }),
|
|
200
|
+
title: c,
|
|
201
|
+
description: N,
|
|
202
|
+
questionCount: o.length,
|
|
203
|
+
timeLimitSeconds: l,
|
|
204
|
+
passingScore: f,
|
|
205
|
+
startLabel: "Start Quiz",
|
|
206
|
+
onStart: () => S({ tag: "quiz" }),
|
|
207
|
+
readOnly: u
|
|
208
|
+
}
|
|
209
|
+
) });
|
|
210
|
+
if (s.tag === "quiz")
|
|
211
|
+
return /* @__PURE__ */ e("div", { ref: m, tabIndex: -1, className: A("outline-none", x), style: b, children: /* @__PURE__ */ e(
|
|
212
|
+
_e,
|
|
213
|
+
{
|
|
214
|
+
questions: o,
|
|
215
|
+
onSubmit: M,
|
|
216
|
+
timeElapsedSeconds: g,
|
|
217
|
+
timeLimitSeconds: l,
|
|
218
|
+
questionMaterials: a,
|
|
219
|
+
readOnly: u
|
|
220
|
+
}
|
|
221
|
+
) });
|
|
222
|
+
const { result: E } = s;
|
|
223
|
+
return /* @__PURE__ */ e("div", { ref: m, tabIndex: -1, className: A("max-w-2xl mx-auto outline-none", x), style: b, children: /* @__PURE__ */ e(
|
|
224
|
+
Be,
|
|
225
|
+
{
|
|
226
|
+
title: c,
|
|
227
|
+
percentage: E.percentage,
|
|
228
|
+
passed: E.passed,
|
|
229
|
+
correct: E.correct,
|
|
230
|
+
total: E.total,
|
|
231
|
+
timeElapsedSeconds: E.timeElapsedSeconds,
|
|
232
|
+
answers: E.answers,
|
|
233
|
+
questions: o,
|
|
234
|
+
allowRetake: i,
|
|
235
|
+
onRetake: y,
|
|
236
|
+
retakeLabel: "Retake Quiz",
|
|
237
|
+
showReview: h,
|
|
238
|
+
readOnly: u
|
|
239
|
+
}
|
|
240
|
+
) });
|
|
241
|
+
}
|
|
242
|
+
const Qt = G(bt, "QuizModule");
|
|
243
|
+
function wt({
|
|
244
|
+
decks: c = [],
|
|
245
|
+
showShuffleToggle: N = !0,
|
|
246
|
+
defaultShuffled: o = !1,
|
|
247
|
+
allowMultiSelect: l = !0,
|
|
248
|
+
onComplete: f,
|
|
249
|
+
readOnly: i = !1,
|
|
250
|
+
className: n,
|
|
251
|
+
style: h
|
|
252
|
+
}) {
|
|
253
|
+
const [a, u] = R({ tag: "setup" }), [x, b] = R(/* @__PURE__ */ new Set()), [s, S] = R(o), m = U(null), g = U(null);
|
|
254
|
+
L(() => {
|
|
255
|
+
var d;
|
|
256
|
+
(d = g.current) == null || d.focus({ preventScroll: !0 });
|
|
257
|
+
}, [a.tag]);
|
|
258
|
+
function v(d) {
|
|
259
|
+
b((p) => {
|
|
260
|
+
const w = new Set(p);
|
|
261
|
+
return w.has(d) ? w.delete(d) : (l || w.clear(), w.add(d)), w;
|
|
183
262
|
});
|
|
184
263
|
}
|
|
185
|
-
function
|
|
186
|
-
const
|
|
187
|
-
|
|
264
|
+
function r() {
|
|
265
|
+
const d = c.filter((w) => x.has(w.uid)), p = d.flatMap((w) => w.cards);
|
|
266
|
+
m.current = Date.now(), u({
|
|
188
267
|
tag: "study",
|
|
189
|
-
cards:
|
|
190
|
-
deckUids:
|
|
191
|
-
shuffled:
|
|
268
|
+
cards: p,
|
|
269
|
+
deckUids: d.map((w) => w.uid),
|
|
270
|
+
shuffled: s
|
|
192
271
|
});
|
|
193
272
|
}
|
|
194
273
|
function C() {
|
|
195
|
-
if (
|
|
196
|
-
const
|
|
197
|
-
totalCards:
|
|
198
|
-
decksStudied:
|
|
199
|
-
deckUids:
|
|
200
|
-
wasShuffled:
|
|
201
|
-
timeElapsedSeconds:
|
|
274
|
+
if (a.tag !== "study") return;
|
|
275
|
+
const d = m.current ? Math.floor((Date.now() - m.current) / 1e3) : 0, p = {
|
|
276
|
+
totalCards: a.cards.length,
|
|
277
|
+
decksStudied: a.deckUids.length,
|
|
278
|
+
deckUids: a.deckUids,
|
|
279
|
+
wasShuffled: a.shuffled,
|
|
280
|
+
timeElapsedSeconds: d
|
|
202
281
|
};
|
|
203
|
-
|
|
282
|
+
u({ tag: "completion", result: p }), f == null || f(p);
|
|
204
283
|
}
|
|
205
|
-
function
|
|
206
|
-
if (
|
|
207
|
-
const
|
|
208
|
-
|
|
284
|
+
function M() {
|
|
285
|
+
if (a.tag !== "completion") return;
|
|
286
|
+
const p = c.filter((w) => a.result.deckUids.includes(w.uid)).flatMap((w) => w.cards);
|
|
287
|
+
m.current = Date.now(), u({
|
|
209
288
|
tag: "study",
|
|
210
|
-
cards:
|
|
211
|
-
deckUids:
|
|
212
|
-
shuffled:
|
|
289
|
+
cards: p,
|
|
290
|
+
deckUids: a.result.deckUids,
|
|
291
|
+
shuffled: a.result.wasShuffled
|
|
213
292
|
});
|
|
214
293
|
}
|
|
215
|
-
function
|
|
216
|
-
|
|
294
|
+
function y() {
|
|
295
|
+
b(/* @__PURE__ */ new Set()), S(o), u({ tag: "setup" });
|
|
217
296
|
}
|
|
218
|
-
if (
|
|
219
|
-
return /* @__PURE__ */ e("div", { ref:
|
|
297
|
+
if (a.tag === "setup")
|
|
298
|
+
return /* @__PURE__ */ e("div", { ref: g, tabIndex: -1, className: A("max-w-2xl mx-auto outline-none", n), style: h, children: /* @__PURE__ */ e(I, { children: /* @__PURE__ */ t(j, { className: "pt-8 pb-8", children: [
|
|
220
299
|
/* @__PURE__ */ t("div", { className: "text-center mb-6", children: [
|
|
221
|
-
/* @__PURE__ */ e("div", { className: "mx-auto mb-4 w-14 h-14 rounded-full bg-primary/10 flex items-center justify-center", children: /* @__PURE__ */ e(
|
|
300
|
+
/* @__PURE__ */ e("div", { className: "mx-auto mb-4 w-14 h-14 rounded-full bg-primary/10 flex items-center justify-center", children: /* @__PURE__ */ e(K, { className: "size-7 text-primary" }) }),
|
|
222
301
|
/* @__PURE__ */ e("h2", { className: "text-2xl font-bold text-foreground mb-2", children: "Choose Your Decks" }),
|
|
223
|
-
/* @__PURE__ */ e("p", { className: "text-muted-foreground text-sm", children:
|
|
302
|
+
/* @__PURE__ */ e("p", { className: "text-muted-foreground text-sm", children: l ? "Select one or more decks to study" : "Select a deck to study" })
|
|
224
303
|
] }),
|
|
225
|
-
/* @__PURE__ */ e("div", { className: "grid sm:grid-cols-2 lg:grid-cols-3 gap-3 mb-6", children:
|
|
226
|
-
const
|
|
304
|
+
/* @__PURE__ */ e("div", { className: "grid sm:grid-cols-2 lg:grid-cols-3 gap-3 mb-6", children: c.map((d) => {
|
|
305
|
+
const p = x.has(d.uid);
|
|
227
306
|
return /* @__PURE__ */ e(
|
|
228
|
-
|
|
307
|
+
I,
|
|
229
308
|
{
|
|
230
|
-
className:
|
|
309
|
+
className: A(
|
|
231
310
|
"cursor-pointer transition-all py-0",
|
|
232
|
-
|
|
311
|
+
p ? "border-primary ring-1 ring-primary" : "hover:border-muted-foreground/30"
|
|
233
312
|
),
|
|
234
|
-
onClick: () =>
|
|
235
|
-
children: /* @__PURE__ */ t(
|
|
313
|
+
onClick: () => v(d.uid),
|
|
314
|
+
children: /* @__PURE__ */ t(j, { className: "py-4", children: [
|
|
236
315
|
/* @__PURE__ */ t("div", { className: "flex items-start justify-between mb-2", children: [
|
|
237
|
-
/* @__PURE__ */ e("h3", { className: "font-semibold text-foreground text-sm", children:
|
|
238
|
-
/* @__PURE__ */ t(
|
|
239
|
-
|
|
316
|
+
/* @__PURE__ */ e("h3", { className: "font-semibold text-foreground text-sm", children: d.title }),
|
|
317
|
+
/* @__PURE__ */ t(Y, { variant: "secondary", className: "text-xs shrink-0", children: [
|
|
318
|
+
d.cards.length,
|
|
240
319
|
" cards"
|
|
241
320
|
] })
|
|
242
321
|
] }),
|
|
243
|
-
|
|
322
|
+
d.description && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground line-clamp-2", children: d.description })
|
|
244
323
|
] })
|
|
245
324
|
},
|
|
246
|
-
|
|
325
|
+
d.uid
|
|
247
326
|
);
|
|
248
327
|
}) }),
|
|
249
328
|
/* @__PURE__ */ t("div", { className: "flex items-center justify-between", children: [
|
|
250
329
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
|
|
251
|
-
|
|
252
|
-
|
|
330
|
+
N && /* @__PURE__ */ t(
|
|
331
|
+
P,
|
|
253
332
|
{
|
|
254
|
-
variant:
|
|
333
|
+
variant: s ? "secondary" : "outline",
|
|
255
334
|
size: "sm",
|
|
256
335
|
className: "gap-1.5",
|
|
257
|
-
onClick: () =>
|
|
336
|
+
onClick: () => S((d) => !d),
|
|
258
337
|
children: [
|
|
259
|
-
/* @__PURE__ */ e(
|
|
338
|
+
/* @__PURE__ */ e(he, { className: "size-3.5" }),
|
|
260
339
|
"Shuffle"
|
|
261
340
|
]
|
|
262
341
|
}
|
|
263
342
|
),
|
|
264
|
-
|
|
265
|
-
|
|
343
|
+
x.size > 0 && /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children: [
|
|
344
|
+
c.filter((d) => x.has(d.uid)).reduce((d, p) => d + p.cards.length, 0),
|
|
266
345
|
" ",
|
|
267
346
|
"cards selected"
|
|
268
347
|
] })
|
|
269
348
|
] }),
|
|
270
349
|
/* @__PURE__ */ e(
|
|
271
|
-
|
|
350
|
+
P,
|
|
272
351
|
{
|
|
273
|
-
onClick:
|
|
274
|
-
disabled:
|
|
352
|
+
onClick: r,
|
|
353
|
+
disabled: x.size === 0 || i,
|
|
275
354
|
children: "Start Studying"
|
|
276
355
|
}
|
|
277
356
|
)
|
|
278
357
|
] })
|
|
279
358
|
] }) }) });
|
|
280
|
-
if (
|
|
281
|
-
const
|
|
282
|
-
return /* @__PURE__ */ e("div", { ref:
|
|
283
|
-
|
|
359
|
+
if (a.tag === "study") {
|
|
360
|
+
const d = c.filter((p) => a.deckUids.includes(p.uid)).map((p) => p.title).join(", ");
|
|
361
|
+
return /* @__PURE__ */ e("div", { ref: g, tabIndex: -1, className: A("outline-none", n), style: h, children: /* @__PURE__ */ e(
|
|
362
|
+
Xe,
|
|
284
363
|
{
|
|
285
|
-
cards:
|
|
286
|
-
title:
|
|
287
|
-
shuffled:
|
|
288
|
-
onComplete: C
|
|
364
|
+
cards: a.cards,
|
|
365
|
+
title: d,
|
|
366
|
+
shuffled: a.shuffled,
|
|
367
|
+
onComplete: C,
|
|
368
|
+
readOnly: i
|
|
289
369
|
}
|
|
290
370
|
) });
|
|
291
371
|
}
|
|
292
|
-
const { result:
|
|
293
|
-
return /* @__PURE__ */ e("div", { ref:
|
|
372
|
+
const { result: E } = a;
|
|
373
|
+
return /* @__PURE__ */ e("div", { ref: g, tabIndex: -1, className: A("max-w-2xl mx-auto outline-none", n), style: h, children: /* @__PURE__ */ e(I, { children: /* @__PURE__ */ t(j, { className: "pt-8 pb-8", children: [
|
|
294
374
|
/* @__PURE__ */ t("div", { className: "text-center mb-8", children: [
|
|
295
375
|
/* @__PURE__ */ t("div", { className: "relative mx-auto mb-4", children: [
|
|
296
376
|
/* @__PURE__ */ e(
|
|
297
|
-
|
|
377
|
+
D,
|
|
298
378
|
{
|
|
299
379
|
value: 100,
|
|
300
380
|
size: 120,
|
|
@@ -304,155 +384,164 @@ function ut({
|
|
|
304
384
|
label: ""
|
|
305
385
|
}
|
|
306
386
|
),
|
|
307
|
-
/* @__PURE__ */ e(
|
|
387
|
+
/* @__PURE__ */ e(J, { className: "size-8 text-success absolute inset-0 m-auto" })
|
|
308
388
|
] }),
|
|
309
389
|
/* @__PURE__ */ e("h2", { className: "text-xl font-bold text-foreground mb-2", children: "Study Session Complete" }),
|
|
310
390
|
/* @__PURE__ */ e("p", { className: "text-muted-foreground text-sm", children: "Great work! Here's your session summary." })
|
|
311
391
|
] }),
|
|
312
392
|
/* @__PURE__ */ t("div", { className: "grid grid-cols-2 sm:grid-cols-4 gap-3 mb-8", children: [
|
|
313
393
|
/* @__PURE__ */ e(
|
|
314
|
-
|
|
394
|
+
$,
|
|
315
395
|
{
|
|
316
|
-
icon: /* @__PURE__ */ e(
|
|
396
|
+
icon: /* @__PURE__ */ e(Ie, {}),
|
|
317
397
|
label: "Cards Studied",
|
|
318
398
|
description: "Total cards reviewed",
|
|
319
|
-
value: String(
|
|
399
|
+
value: String(E.totalCards)
|
|
320
400
|
}
|
|
321
401
|
),
|
|
322
402
|
/* @__PURE__ */ e(
|
|
323
|
-
|
|
403
|
+
$,
|
|
324
404
|
{
|
|
325
|
-
icon: /* @__PURE__ */ e(
|
|
405
|
+
icon: /* @__PURE__ */ e(K, {}),
|
|
326
406
|
label: "Decks",
|
|
327
407
|
description: "Decks completed",
|
|
328
|
-
value: String(
|
|
408
|
+
value: String(E.decksStudied)
|
|
329
409
|
}
|
|
330
410
|
),
|
|
331
411
|
/* @__PURE__ */ e(
|
|
332
|
-
|
|
412
|
+
$,
|
|
333
413
|
{
|
|
334
|
-
icon: /* @__PURE__ */ e(
|
|
414
|
+
icon: /* @__PURE__ */ e(re, {}),
|
|
335
415
|
label: "Time Spent",
|
|
336
416
|
description: "Session duration",
|
|
337
|
-
value:
|
|
417
|
+
value: ne(E.timeElapsedSeconds)
|
|
338
418
|
}
|
|
339
419
|
),
|
|
340
420
|
/* @__PURE__ */ e(
|
|
341
|
-
|
|
421
|
+
$,
|
|
342
422
|
{
|
|
343
|
-
icon: /* @__PURE__ */ e(
|
|
423
|
+
icon: /* @__PURE__ */ e(he, {}),
|
|
344
424
|
label: "Shuffled",
|
|
345
425
|
description: "Card order randomized",
|
|
346
|
-
value:
|
|
426
|
+
value: E.wasShuffled ? "Yes" : "No"
|
|
347
427
|
}
|
|
348
428
|
)
|
|
349
429
|
] }),
|
|
350
430
|
/* @__PURE__ */ t("div", { className: "flex justify-center gap-3", children: [
|
|
351
|
-
/* @__PURE__ */ t(
|
|
352
|
-
/* @__PURE__ */ e(
|
|
431
|
+
/* @__PURE__ */ t(P, { variant: "outline", onClick: y, disabled: i, children: [
|
|
432
|
+
/* @__PURE__ */ e(X, { className: "size-4 mr-2" }),
|
|
353
433
|
"Pick New Deck"
|
|
354
434
|
] }),
|
|
355
|
-
/* @__PURE__ */ t(
|
|
356
|
-
/* @__PURE__ */ e(
|
|
435
|
+
/* @__PURE__ */ t(P, { onClick: M, disabled: i, children: [
|
|
436
|
+
/* @__PURE__ */ e(ie, { className: "size-4 mr-2" }),
|
|
357
437
|
"Study Again"
|
|
358
438
|
] })
|
|
359
439
|
] })
|
|
360
440
|
] }) }) });
|
|
361
441
|
}
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
442
|
+
const qt = G(wt, "FlashcardLab");
|
|
443
|
+
function St({
|
|
444
|
+
courseTitle: c,
|
|
445
|
+
curriculum: N,
|
|
446
|
+
progress: o,
|
|
447
|
+
items: l,
|
|
448
|
+
initialItemUid: f,
|
|
449
|
+
onItemComplete: i,
|
|
450
|
+
onItemChange: n,
|
|
451
|
+
sidebarCollapsed: h = !1,
|
|
452
|
+
readOnly: a = !1,
|
|
453
|
+
className: u,
|
|
454
|
+
style: x
|
|
374
455
|
}) {
|
|
375
|
-
const
|
|
376
|
-
() => new Map(
|
|
377
|
-
[
|
|
378
|
-
), [
|
|
379
|
-
|
|
380
|
-
), [
|
|
381
|
-
|
|
382
|
-
) : /* @__PURE__ */ new Set()),
|
|
383
|
-
|
|
384
|
-
) : 0,
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
456
|
+
const b = U(null), s = Z(() => Ze(N), [N]), S = Z(
|
|
457
|
+
() => new Map(l.map((z) => [z.uid, z])),
|
|
458
|
+
[l]
|
|
459
|
+
), [m, g] = R(
|
|
460
|
+
f ?? s[0] ?? ""
|
|
461
|
+
), [v, r] = R(!h), [C, M] = R(() => o ? new Set(
|
|
462
|
+
o.filter((z) => z.isCompleted).map((z) => z.resourceUid)
|
|
463
|
+
) : /* @__PURE__ */ new Set()), y = s.indexOf(m), E = y > 0, d = y < s.length - 1, p = C.has(m), w = s.length > 0 ? Math.round(
|
|
464
|
+
s.filter((z) => C.has(z)).length / s.length * 100
|
|
465
|
+
) : 0, k = S.get(m), Q = Z(
|
|
466
|
+
() => (k == null ? void 0 : k.type) === "video" ? { src: k.src, poster: k.poster, title: k.title } : null,
|
|
467
|
+
// activeItem is looked up from a stable Map — uid change means new item
|
|
468
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
469
|
+
[k == null ? void 0 : k.uid]
|
|
470
|
+
);
|
|
471
|
+
L(() => {
|
|
472
|
+
var z;
|
|
473
|
+
(z = b.current) == null || z.focus({ preventScroll: !0 });
|
|
474
|
+
}, [m]);
|
|
475
|
+
const B = U(n);
|
|
476
|
+
B.current = n;
|
|
477
|
+
const q = U(i);
|
|
478
|
+
q.current = i;
|
|
479
|
+
const V = T((z) => {
|
|
480
|
+
var F;
|
|
481
|
+
g(z), (F = B.current) == null || F.call(B, z);
|
|
482
|
+
}, []), O = T((z) => {
|
|
483
|
+
(!z.children || z.children.length === 0) && V(z.uid);
|
|
484
|
+
}, [V]), ue = T(() => {
|
|
485
|
+
var z;
|
|
486
|
+
M((F) => new Set(F).add(m)), (z = q.current) == null || z.call(q, m);
|
|
487
|
+
}, [m]), me = T(() => {
|
|
488
|
+
const z = s.indexOf(m);
|
|
489
|
+
z < s.length - 1 && V(s[z + 1]);
|
|
490
|
+
}, [s, m, V]), Pe = T(() => {
|
|
491
|
+
const z = s.indexOf(m);
|
|
492
|
+
z > 0 && V(s[z - 1]);
|
|
493
|
+
}, [s, m, V]), Ue = Z(() => {
|
|
494
|
+
const z = new Map(
|
|
495
|
+
(o ?? []).map((F) => [F.resourceUid, F])
|
|
407
496
|
);
|
|
408
|
-
for (const
|
|
409
|
-
|
|
410
|
-
return Array.from(
|
|
411
|
-
}, [
|
|
497
|
+
for (const F of C)
|
|
498
|
+
z.has(F) ? z.set(F, { ...z.get(F), isCompleted: !0 }) : z.set(F, { resourceUid: F, isCompleted: !0 });
|
|
499
|
+
return Array.from(z.values());
|
|
500
|
+
}, [o, C]), Re = d ? S.get(s[y + 1]) : null;
|
|
412
501
|
return /* @__PURE__ */ t(
|
|
413
502
|
"div",
|
|
414
503
|
{
|
|
415
|
-
className:
|
|
416
|
-
style:
|
|
504
|
+
className: A("flex h-full overflow-hidden", u),
|
|
505
|
+
style: x,
|
|
417
506
|
children: [
|
|
418
|
-
/* @__PURE__ */ e(
|
|
419
|
-
/* @__PURE__ */ t(
|
|
420
|
-
/* @__PURE__ */ e(
|
|
421
|
-
/* @__PURE__ */ e(
|
|
507
|
+
/* @__PURE__ */ e(ot, { open: v, onOpenChange: r, side: "left", children: /* @__PURE__ */ t(ut, { size: "sm", scrollLock: !1, children: [
|
|
508
|
+
/* @__PURE__ */ t(mt, { className: "flex-row items-center justify-between", children: [
|
|
509
|
+
/* @__PURE__ */ e(ht, { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wide", children: "Course" }),
|
|
510
|
+
/* @__PURE__ */ e(ft, {})
|
|
422
511
|
] }),
|
|
423
|
-
/* @__PURE__ */ e(
|
|
424
|
-
|
|
512
|
+
/* @__PURE__ */ e(xt, { className: "px-2 pb-2", children: /* @__PURE__ */ e(
|
|
513
|
+
Je,
|
|
425
514
|
{
|
|
426
|
-
items:
|
|
427
|
-
progress:
|
|
428
|
-
courseTitle:
|
|
429
|
-
activeItemUid:
|
|
430
|
-
onItemClick:
|
|
431
|
-
readOnly:
|
|
515
|
+
items: N,
|
|
516
|
+
progress: Ue,
|
|
517
|
+
courseTitle: c,
|
|
518
|
+
activeItemUid: m,
|
|
519
|
+
onItemClick: O,
|
|
520
|
+
readOnly: a
|
|
432
521
|
}
|
|
433
522
|
) })
|
|
434
523
|
] }) }),
|
|
435
524
|
/* @__PURE__ */ t("div", { className: "flex-1 flex flex-col min-w-0 overflow-hidden", children: [
|
|
436
525
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2 px-4 py-2 border-b border-border bg-background shrink-0", children: [
|
|
437
526
|
/* @__PURE__ */ e(
|
|
438
|
-
|
|
527
|
+
P,
|
|
439
528
|
{
|
|
440
529
|
variant: "ghost",
|
|
441
530
|
size: "sm",
|
|
442
531
|
className: "size-7 p-0 mr-1",
|
|
443
|
-
onClick: () =>
|
|
444
|
-
children: /* @__PURE__ */ e(
|
|
532
|
+
onClick: () => r(!0),
|
|
533
|
+
children: /* @__PURE__ */ e(je, { className: "size-4" })
|
|
445
534
|
}
|
|
446
535
|
),
|
|
447
|
-
/* @__PURE__ */ e("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ e("span", { className: "text-sm font-semibold text-foreground truncate block", children: (
|
|
536
|
+
/* @__PURE__ */ e("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ e("span", { className: "text-sm font-semibold text-foreground truncate block", children: (k == null ? void 0 : k.title) ?? "Select an item" }) }),
|
|
448
537
|
/* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground shrink-0", children: [
|
|
449
|
-
|
|
538
|
+
y + 1,
|
|
450
539
|
" / ",
|
|
451
|
-
|
|
540
|
+
s.length
|
|
452
541
|
] })
|
|
453
542
|
] }),
|
|
454
|
-
/* @__PURE__ */ e("div", { ref:
|
|
455
|
-
|
|
543
|
+
/* @__PURE__ */ e("div", { ref: b, tabIndex: -1, className: "flex-1 overflow-y-auto p-6 outline-none", children: k ? kt(k, a, ue, p, me, d, Re, Q) : /* @__PURE__ */ e(
|
|
544
|
+
ce,
|
|
456
545
|
{
|
|
457
546
|
title: "No content selected",
|
|
458
547
|
description: "Select an item from the course outline to get started."
|
|
@@ -461,43 +550,43 @@ function mt({
|
|
|
461
550
|
/* @__PURE__ */ e("div", { className: "shrink-0 border-t border-border bg-background px-4 py-3", children: /* @__PURE__ */ t("div", { className: "flex items-center gap-4", children: [
|
|
462
551
|
/* @__PURE__ */ t("div", { className: "flex-1 min-w-0", children: [
|
|
463
552
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 mb-1", children: /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children: [
|
|
464
|
-
|
|
553
|
+
w,
|
|
465
554
|
"% complete"
|
|
466
555
|
] }) }),
|
|
467
|
-
/* @__PURE__ */ e(
|
|
556
|
+
/* @__PURE__ */ e(pt, { value: w, size: "sm" })
|
|
468
557
|
] }),
|
|
469
558
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
470
|
-
!
|
|
471
|
-
|
|
559
|
+
!p && k && /* @__PURE__ */ t(
|
|
560
|
+
P,
|
|
472
561
|
{
|
|
473
562
|
size: "sm",
|
|
474
563
|
variant: "outline",
|
|
475
|
-
onClick:
|
|
476
|
-
disabled:
|
|
564
|
+
onClick: ue,
|
|
565
|
+
disabled: a,
|
|
477
566
|
children: [
|
|
478
|
-
/* @__PURE__ */ e(
|
|
567
|
+
/* @__PURE__ */ e(Le, { className: "size-3.5 mr-1" }),
|
|
479
568
|
"Complete"
|
|
480
569
|
]
|
|
481
570
|
}
|
|
482
571
|
),
|
|
483
572
|
/* @__PURE__ */ e(
|
|
484
|
-
|
|
573
|
+
P,
|
|
485
574
|
{
|
|
486
575
|
size: "sm",
|
|
487
576
|
variant: "ghost",
|
|
488
|
-
onClick:
|
|
489
|
-
disabled: !
|
|
490
|
-
children: /* @__PURE__ */ e(
|
|
577
|
+
onClick: Pe,
|
|
578
|
+
disabled: !E,
|
|
579
|
+
children: /* @__PURE__ */ e(Fe, { className: "size-4" })
|
|
491
580
|
}
|
|
492
581
|
),
|
|
493
582
|
/* @__PURE__ */ e(
|
|
494
|
-
|
|
583
|
+
P,
|
|
495
584
|
{
|
|
496
585
|
size: "sm",
|
|
497
586
|
variant: "ghost",
|
|
498
|
-
onClick:
|
|
499
|
-
disabled: !
|
|
500
|
-
children: /* @__PURE__ */ e(
|
|
587
|
+
onClick: me,
|
|
588
|
+
disabled: !d,
|
|
589
|
+
children: /* @__PURE__ */ e(Qe, { className: "size-4" })
|
|
501
590
|
}
|
|
502
591
|
)
|
|
503
592
|
] })
|
|
@@ -507,45 +596,42 @@ function mt({
|
|
|
507
596
|
}
|
|
508
597
|
);
|
|
509
598
|
}
|
|
510
|
-
function
|
|
511
|
-
switch (
|
|
599
|
+
function kt(c, N, o, l, f, i, n, h) {
|
|
600
|
+
switch (c.type) {
|
|
512
601
|
case "lesson":
|
|
513
602
|
return /* @__PURE__ */ e(
|
|
514
|
-
|
|
603
|
+
Oe,
|
|
515
604
|
{
|
|
516
|
-
title:
|
|
517
|
-
blocks:
|
|
518
|
-
isCompleted:
|
|
519
|
-
onMarkComplete:
|
|
520
|
-
onNextLesson:
|
|
521
|
-
nextLessonTitle:
|
|
522
|
-
readOnly:
|
|
605
|
+
title: c.title,
|
|
606
|
+
blocks: c.blocks,
|
|
607
|
+
isCompleted: l,
|
|
608
|
+
onMarkComplete: o,
|
|
609
|
+
onNextLesson: i ? f : void 0,
|
|
610
|
+
nextLessonTitle: n == null ? void 0 : n.title,
|
|
611
|
+
readOnly: N
|
|
523
612
|
}
|
|
524
613
|
);
|
|
525
614
|
case "video":
|
|
526
615
|
return /* @__PURE__ */ e(
|
|
527
|
-
|
|
616
|
+
De,
|
|
528
617
|
{
|
|
529
|
-
video: {
|
|
530
|
-
|
|
531
|
-
poster: u.poster,
|
|
532
|
-
title: u.title
|
|
533
|
-
}
|
|
618
|
+
video: h ?? { src: "", title: c.title },
|
|
619
|
+
onComplete: l ? void 0 : o
|
|
534
620
|
}
|
|
535
621
|
);
|
|
536
622
|
case "quiz":
|
|
537
623
|
return /* @__PURE__ */ e(
|
|
538
|
-
|
|
624
|
+
Ke,
|
|
539
625
|
{
|
|
540
|
-
questions:
|
|
626
|
+
questions: c.questions,
|
|
541
627
|
instantFeedback: !0,
|
|
542
628
|
allowRetry: !0,
|
|
543
|
-
readOnly:
|
|
629
|
+
readOnly: N
|
|
544
630
|
}
|
|
545
631
|
);
|
|
546
632
|
default:
|
|
547
633
|
return /* @__PURE__ */ e(
|
|
548
|
-
|
|
634
|
+
ce,
|
|
549
635
|
{
|
|
550
636
|
title: "Unknown content type",
|
|
551
637
|
description: "This content type is not supported."
|
|
@@ -553,443 +639,344 @@ function rt(u, b, h, o, k, m, l) {
|
|
|
553
639
|
);
|
|
554
640
|
}
|
|
555
641
|
}
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
642
|
+
const Gt = G(St, "CoursePlayer");
|
|
643
|
+
function zt({
|
|
644
|
+
title: c,
|
|
645
|
+
description: N,
|
|
646
|
+
instructions: o,
|
|
647
|
+
questions: l = [],
|
|
648
|
+
timeLimitSeconds: f,
|
|
649
|
+
passingScore: i,
|
|
650
|
+
allowBackNavigation: n = !0,
|
|
651
|
+
autoSubmitOnTimeout: h = !0,
|
|
652
|
+
timeWarningThreshold: a,
|
|
653
|
+
allowRetake: u = !1,
|
|
654
|
+
showReview: x = !0,
|
|
655
|
+
onComplete: b,
|
|
656
|
+
readOnly: s = !1,
|
|
657
|
+
className: S,
|
|
658
|
+
style: m
|
|
571
659
|
}) {
|
|
572
|
-
const [
|
|
573
|
-
|
|
574
|
-
var
|
|
575
|
-
(
|
|
576
|
-
}, [
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
percentage: _,
|
|
588
|
-
passed: m !== void 0 ? _ >= m : !0,
|
|
589
|
-
timeElapsedSeconds: Q.timeElapsedSeconds,
|
|
590
|
-
wasAutoSubmitted: Q.wasAutoSubmitted
|
|
660
|
+
const [g, v] = R({ tag: "intro" }), r = U(null), { timeElapsed: C, reset: M } = Me(g.tag === "exam"), y = U(b);
|
|
661
|
+
y.current = b, L(() => {
|
|
662
|
+
var w;
|
|
663
|
+
(w = r.current) == null || w.focus({ preventScroll: !0 });
|
|
664
|
+
}, [g.tag]);
|
|
665
|
+
const E = T((w, k) => {
|
|
666
|
+
var O;
|
|
667
|
+
const { correct: Q, total: B, percentage: q } = ze(l, w), V = {
|
|
668
|
+
answers: w,
|
|
669
|
+
correct: Q,
|
|
670
|
+
total: B,
|
|
671
|
+
percentage: q,
|
|
672
|
+
passed: i !== void 0 ? q >= i : !0,
|
|
673
|
+
timeElapsedSeconds: k.timeElapsedSeconds,
|
|
674
|
+
wasAutoSubmitted: k.wasAutoSubmitted
|
|
591
675
|
};
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
}
|
|
600
|
-
if (a.tag === "intro")
|
|
601
|
-
return /* @__PURE__ */ e(
|
|
602
|
-
"div",
|
|
676
|
+
v({ tag: "results", result: V }), (O = y.current) == null || O.call(y, V);
|
|
677
|
+
}, [l, i]), d = T(() => {
|
|
678
|
+
M(), v({ tag: "intro" });
|
|
679
|
+
}, [M]);
|
|
680
|
+
if (g.tag === "intro")
|
|
681
|
+
return /* @__PURE__ */ e("div", { ref: r, tabIndex: -1, className: A("max-w-2xl mx-auto outline-none", S), style: m, children: /* @__PURE__ */ e(
|
|
682
|
+
Ee,
|
|
603
683
|
{
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
/* @__PURE__ */ t(j, { variant: "outline", className: "gap-1.5", children: [
|
|
615
|
-
/* @__PURE__ */ e(X, { className: "size-3.5" }),
|
|
616
|
-
o.length,
|
|
617
|
-
" questions"
|
|
618
|
-
] }),
|
|
619
|
-
/* @__PURE__ */ t(j, { variant: "outline", className: "gap-1.5", children: [
|
|
620
|
-
/* @__PURE__ */ e(G, { className: "size-3.5" }),
|
|
621
|
-
V(k),
|
|
622
|
-
" time limit"
|
|
623
|
-
] }),
|
|
624
|
-
m !== void 0 && /* @__PURE__ */ t(j, { variant: "outline", className: "gap-1.5", children: [
|
|
625
|
-
/* @__PURE__ */ e(F, { className: "size-3.5" }),
|
|
626
|
-
m,
|
|
627
|
-
"% to pass"
|
|
628
|
-
] })
|
|
629
|
-
] }),
|
|
630
|
-
/* @__PURE__ */ t(R, { size: "lg", onClick: () => p({ tag: "exam" }), children: [
|
|
631
|
-
/* @__PURE__ */ e(Z, { className: "size-4 mr-2" }),
|
|
632
|
-
"Begin Exam"
|
|
633
|
-
] })
|
|
634
|
-
] }) })
|
|
684
|
+
icon: /* @__PURE__ */ e(qe, { className: "size-7 text-primary" }),
|
|
685
|
+
title: c,
|
|
686
|
+
description: N,
|
|
687
|
+
questionCount: l.length,
|
|
688
|
+
timeLimitSeconds: f,
|
|
689
|
+
passingScore: i,
|
|
690
|
+
startLabel: "Begin Exam",
|
|
691
|
+
onStart: () => v({ tag: "exam" }),
|
|
692
|
+
readOnly: s,
|
|
693
|
+
children: o && /* @__PURE__ */ e(Ce, { className: "text-left mb-6", children: /* @__PURE__ */ e(ye, { children: o }) })
|
|
635
694
|
}
|
|
636
|
-
);
|
|
637
|
-
if (
|
|
638
|
-
return /* @__PURE__ */ e(
|
|
639
|
-
|
|
695
|
+
) });
|
|
696
|
+
if (g.tag === "exam")
|
|
697
|
+
return /* @__PURE__ */ e("div", { ref: r, tabIndex: -1, className: A("outline-none", S), style: m, children: /* @__PURE__ */ e(
|
|
698
|
+
et,
|
|
640
699
|
{
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
autoSubmitOnTimeout: i,
|
|
652
|
-
timeWarningThreshold: f,
|
|
653
|
-
allowBackNavigation: l,
|
|
654
|
-
confirmBeforeSubmit: !0,
|
|
655
|
-
examTitle: u,
|
|
656
|
-
onSubmit: c
|
|
657
|
-
}
|
|
658
|
-
)
|
|
700
|
+
questions: l,
|
|
701
|
+
timeLimitSeconds: f,
|
|
702
|
+
timeElapsedSeconds: C,
|
|
703
|
+
autoSubmitOnTimeout: h,
|
|
704
|
+
timeWarningThreshold: a,
|
|
705
|
+
allowBackNavigation: n,
|
|
706
|
+
confirmBeforeSubmit: !0,
|
|
707
|
+
examTitle: c,
|
|
708
|
+
onSubmit: E,
|
|
709
|
+
readOnly: s
|
|
659
710
|
}
|
|
660
|
-
);
|
|
661
|
-
const { result:
|
|
662
|
-
return /* @__PURE__ */
|
|
663
|
-
|
|
711
|
+
) });
|
|
712
|
+
const { result: p } = g;
|
|
713
|
+
return /* @__PURE__ */ e("div", { ref: r, tabIndex: -1, className: A("max-w-2xl mx-auto outline-none", S), style: m, children: /* @__PURE__ */ e(
|
|
714
|
+
Be,
|
|
664
715
|
{
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
className: "mx-auto mb-4 text-foreground"
|
|
680
|
-
}
|
|
681
|
-
),
|
|
682
|
-
/* @__PURE__ */ e(
|
|
683
|
-
j,
|
|
684
|
-
{
|
|
685
|
-
variant: I ? "success" : "destructive",
|
|
686
|
-
className: "text-sm px-3 py-1 mb-2",
|
|
687
|
-
children: I ? "Passed" : "Failed"
|
|
688
|
-
}
|
|
689
|
-
),
|
|
690
|
-
A.wasAutoSubmitted && /* @__PURE__ */ e(j, { variant: "outline", className: "text-sm px-3 py-1 mb-2 ml-2", children: "Auto-submitted" }),
|
|
691
|
-
/* @__PURE__ */ e("h2", { className: "text-xl font-bold text-foreground", children: u })
|
|
692
|
-
] }),
|
|
693
|
-
/* @__PURE__ */ t("div", { className: "grid grid-cols-2 sm:grid-cols-4 gap-3 mb-8", children: [
|
|
694
|
-
/* @__PURE__ */ e(
|
|
695
|
-
U,
|
|
696
|
-
{
|
|
697
|
-
icon: /* @__PURE__ */ e(F, {}),
|
|
698
|
-
label: "Correct",
|
|
699
|
-
description: "Questions answered right",
|
|
700
|
-
value: `${A.correct}/${A.total}`
|
|
701
|
-
}
|
|
702
|
-
),
|
|
703
|
-
/* @__PURE__ */ e(
|
|
704
|
-
U,
|
|
705
|
-
{
|
|
706
|
-
icon: /* @__PURE__ */ e(me, {}),
|
|
707
|
-
label: "Incorrect",
|
|
708
|
-
description: "Questions to review",
|
|
709
|
-
value: `${A.total - A.correct}/${A.total}`
|
|
710
|
-
}
|
|
711
|
-
),
|
|
712
|
-
/* @__PURE__ */ e(
|
|
713
|
-
U,
|
|
714
|
-
{
|
|
715
|
-
icon: /* @__PURE__ */ e(te, {}),
|
|
716
|
-
label: "Score",
|
|
717
|
-
description: "Overall percentage",
|
|
718
|
-
value: `${A.percentage}%`
|
|
719
|
-
}
|
|
720
|
-
),
|
|
721
|
-
/* @__PURE__ */ e(
|
|
722
|
-
U,
|
|
723
|
-
{
|
|
724
|
-
icon: /* @__PURE__ */ e(G, {}),
|
|
725
|
-
label: "Time",
|
|
726
|
-
description: "Total elapsed",
|
|
727
|
-
value: V(A.timeElapsedSeconds)
|
|
728
|
-
}
|
|
729
|
-
)
|
|
730
|
-
] }),
|
|
731
|
-
d && /* @__PURE__ */ e("div", { className: "flex justify-center mb-8", children: /* @__PURE__ */ t(R, { variant: "outline", onClick: r, children: [
|
|
732
|
-
/* @__PURE__ */ e(K, { className: "size-4 mr-2" }),
|
|
733
|
-
"Retake Exam"
|
|
734
|
-
] }) })
|
|
735
|
-
] }) }),
|
|
736
|
-
v && /* @__PURE__ */ t(J, { children: [
|
|
737
|
-
/* @__PURE__ */ e(q, { className: "my-6" }),
|
|
738
|
-
/* @__PURE__ */ e("h3", { className: "text-lg font-semibold text-foreground mb-4", children: "Question Review" }),
|
|
739
|
-
/* @__PURE__ */ e(
|
|
740
|
-
re,
|
|
741
|
-
{
|
|
742
|
-
questions: o,
|
|
743
|
-
sessionAnswers: A.answers,
|
|
744
|
-
showCorrectAnswers: !0
|
|
745
|
-
}
|
|
746
|
-
)
|
|
747
|
-
] })
|
|
748
|
-
]
|
|
716
|
+
title: c,
|
|
717
|
+
percentage: p.percentage,
|
|
718
|
+
passed: p.passed,
|
|
719
|
+
correct: p.correct,
|
|
720
|
+
total: p.total,
|
|
721
|
+
timeElapsedSeconds: p.timeElapsedSeconds,
|
|
722
|
+
answers: p.answers,
|
|
723
|
+
questions: l,
|
|
724
|
+
allowRetake: u,
|
|
725
|
+
onRetake: d,
|
|
726
|
+
retakeLabel: "Retake Exam",
|
|
727
|
+
showReview: x,
|
|
728
|
+
readOnly: s,
|
|
729
|
+
extraBadges: p.wasAutoSubmitted ? /* @__PURE__ */ e(Y, { variant: "outline", className: "text-sm px-3 py-1 mb-2 ml-2", children: "Auto-submitted" }) : null
|
|
749
730
|
}
|
|
750
|
-
);
|
|
731
|
+
) });
|
|
751
732
|
}
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
733
|
+
const Yt = G(zt, "ExamModule");
|
|
734
|
+
function Ct({
|
|
735
|
+
title: c,
|
|
736
|
+
description: N,
|
|
737
|
+
questions: o = [],
|
|
738
|
+
requireAll: l = !1,
|
|
739
|
+
showProgress: f = !0,
|
|
740
|
+
thankYouTitle: i = "Thank You!",
|
|
741
|
+
thankYouMessage: n,
|
|
742
|
+
onComplete: h,
|
|
743
|
+
allowRestart: a = !1,
|
|
744
|
+
readOnly: u = !1,
|
|
745
|
+
className: x,
|
|
746
|
+
style: b
|
|
764
747
|
}) {
|
|
765
|
-
const [
|
|
766
|
-
|
|
767
|
-
var
|
|
768
|
-
(
|
|
769
|
-
}, [
|
|
770
|
-
function
|
|
771
|
-
const
|
|
772
|
-
answers:
|
|
773
|
-
totalQuestions:
|
|
774
|
-
answeredCount:
|
|
775
|
-
timeElapsedSeconds:
|
|
748
|
+
const [s, S] = R({ tag: "intro" }), m = U(null), g = U(null);
|
|
749
|
+
L(() => {
|
|
750
|
+
var y;
|
|
751
|
+
(y = g.current) == null || y.focus({ preventScroll: !0 });
|
|
752
|
+
}, [s.tag]);
|
|
753
|
+
function v(y) {
|
|
754
|
+
const E = m.current ? Math.floor((Date.now() - m.current) / 1e3) : 0, d = {
|
|
755
|
+
answers: y,
|
|
756
|
+
totalQuestions: o.length,
|
|
757
|
+
answeredCount: y.length,
|
|
758
|
+
timeElapsedSeconds: E
|
|
776
759
|
};
|
|
777
|
-
|
|
760
|
+
S({ tag: "thankYou", result: d }), h == null || h(d);
|
|
778
761
|
}
|
|
779
|
-
function
|
|
780
|
-
|
|
762
|
+
function r() {
|
|
763
|
+
m.current = null, S({ tag: "intro" });
|
|
781
764
|
}
|
|
782
765
|
function C() {
|
|
783
|
-
|
|
766
|
+
m.current = Date.now(), S({ tag: "survey" });
|
|
784
767
|
}
|
|
785
|
-
if (
|
|
768
|
+
if (s.tag === "intro")
|
|
786
769
|
return /* @__PURE__ */ e(
|
|
787
770
|
"div",
|
|
788
771
|
{
|
|
789
|
-
ref:
|
|
772
|
+
ref: g,
|
|
790
773
|
tabIndex: -1,
|
|
791
|
-
className:
|
|
792
|
-
style:
|
|
793
|
-
children: /* @__PURE__ */ e(
|
|
794
|
-
/* @__PURE__ */ e("div", { className: "mx-auto mb-4 w-14 h-14 rounded-full bg-primary/10 flex items-center justify-center", children: /* @__PURE__ */ e(
|
|
795
|
-
/* @__PURE__ */ e("h2", { className: "text-2xl font-bold text-foreground mb-2", children:
|
|
796
|
-
|
|
797
|
-
/* @__PURE__ */ e("div", { className: "flex flex-wrap justify-center gap-2 mb-8", children: /* @__PURE__ */ t(
|
|
798
|
-
/* @__PURE__ */ e(
|
|
799
|
-
|
|
774
|
+
className: A("max-w-2xl mx-auto outline-none", x),
|
|
775
|
+
style: b,
|
|
776
|
+
children: /* @__PURE__ */ e(I, { children: /* @__PURE__ */ t(j, { className: "pt-8 pb-8 text-center", children: [
|
|
777
|
+
/* @__PURE__ */ e("div", { className: "mx-auto mb-4 w-14 h-14 rounded-full bg-primary/10 flex items-center justify-center", children: /* @__PURE__ */ e(Ge, { className: "size-7 text-primary" }) }),
|
|
778
|
+
/* @__PURE__ */ e("h2", { className: "text-2xl font-bold text-foreground mb-2", children: c }),
|
|
779
|
+
N && /* @__PURE__ */ e("p", { className: "text-muted-foreground mb-6 max-w-md mx-auto", children: N }),
|
|
780
|
+
/* @__PURE__ */ e("div", { className: "flex flex-wrap justify-center gap-2 mb-8", children: /* @__PURE__ */ t(Y, { variant: "outline", className: "gap-1.5", children: [
|
|
781
|
+
/* @__PURE__ */ e(le, { className: "size-3.5" }),
|
|
782
|
+
o.length,
|
|
800
783
|
" questions"
|
|
801
784
|
] }) }),
|
|
802
|
-
/* @__PURE__ */ t(
|
|
803
|
-
/* @__PURE__ */ e(
|
|
785
|
+
/* @__PURE__ */ t(P, { size: "lg", onClick: C, disabled: u, children: [
|
|
786
|
+
/* @__PURE__ */ e(ae, { className: "size-4 mr-2" }),
|
|
804
787
|
"Begin Survey"
|
|
805
788
|
] })
|
|
806
789
|
] }) })
|
|
807
790
|
}
|
|
808
791
|
);
|
|
809
|
-
if (
|
|
792
|
+
if (s.tag === "survey")
|
|
810
793
|
return /* @__PURE__ */ e(
|
|
811
794
|
"div",
|
|
812
795
|
{
|
|
813
|
-
ref:
|
|
796
|
+
ref: g,
|
|
814
797
|
tabIndex: -1,
|
|
815
|
-
className:
|
|
816
|
-
style:
|
|
798
|
+
className: A("outline-none", x),
|
|
799
|
+
style: b,
|
|
817
800
|
children: /* @__PURE__ */ e(
|
|
818
|
-
|
|
801
|
+
tt,
|
|
819
802
|
{
|
|
820
|
-
title:
|
|
821
|
-
questions:
|
|
822
|
-
requireAll:
|
|
823
|
-
showProgress:
|
|
824
|
-
onSubmit:
|
|
803
|
+
title: c,
|
|
804
|
+
questions: o,
|
|
805
|
+
requireAll: l,
|
|
806
|
+
showProgress: f,
|
|
807
|
+
onSubmit: v,
|
|
808
|
+
readOnly: u
|
|
825
809
|
}
|
|
826
810
|
)
|
|
827
811
|
}
|
|
828
812
|
);
|
|
829
|
-
const { result:
|
|
813
|
+
const { result: M } = s;
|
|
830
814
|
return /* @__PURE__ */ e(
|
|
831
815
|
"div",
|
|
832
816
|
{
|
|
833
|
-
ref:
|
|
817
|
+
ref: g,
|
|
834
818
|
tabIndex: -1,
|
|
835
|
-
className:
|
|
836
|
-
style:
|
|
837
|
-
children: /* @__PURE__ */ e(
|
|
838
|
-
/* @__PURE__ */ e("div", { className: "mx-auto mb-4 w-14 h-14 rounded-full bg-success/10 flex items-center justify-center", children: /* @__PURE__ */ e(
|
|
839
|
-
/* @__PURE__ */ e("h2", { className: "text-2xl font-bold text-foreground mb-2", children:
|
|
840
|
-
/* @__PURE__ */ e("p", { className: "text-muted-foreground mb-6 max-w-md mx-auto", children:
|
|
819
|
+
className: A("max-w-2xl mx-auto outline-none", x),
|
|
820
|
+
style: b,
|
|
821
|
+
children: /* @__PURE__ */ e(I, { children: /* @__PURE__ */ t(j, { className: "pt-8 pb-8 text-center", children: [
|
|
822
|
+
/* @__PURE__ */ e("div", { className: "mx-auto mb-4 w-14 h-14 rounded-full bg-success/10 flex items-center justify-center", children: /* @__PURE__ */ e(J, { className: "size-7 text-success" }) }),
|
|
823
|
+
/* @__PURE__ */ e("h2", { className: "text-2xl font-bold text-foreground mb-2", children: i }),
|
|
824
|
+
/* @__PURE__ */ e("p", { className: "text-muted-foreground mb-6 max-w-md mx-auto", children: n ?? "Your responses have been recorded. Thank you for your feedback!" }),
|
|
841
825
|
/* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-3 max-w-sm mx-auto mb-6", children: [
|
|
842
826
|
/* @__PURE__ */ e(
|
|
843
|
-
|
|
827
|
+
$,
|
|
844
828
|
{
|
|
845
|
-
icon: /* @__PURE__ */ e(
|
|
829
|
+
icon: /* @__PURE__ */ e(le, {}),
|
|
846
830
|
label: "Answered",
|
|
847
831
|
description: "Questions completed",
|
|
848
|
-
value: `${
|
|
832
|
+
value: `${M.answeredCount}/${M.totalQuestions}`
|
|
849
833
|
}
|
|
850
834
|
),
|
|
851
835
|
/* @__PURE__ */ e(
|
|
852
|
-
|
|
836
|
+
$,
|
|
853
837
|
{
|
|
854
|
-
icon: /* @__PURE__ */ e(
|
|
838
|
+
icon: /* @__PURE__ */ e(re, {}),
|
|
855
839
|
label: "Time",
|
|
856
840
|
description: "Total elapsed",
|
|
857
|
-
value:
|
|
841
|
+
value: ne(M.timeElapsedSeconds)
|
|
858
842
|
}
|
|
859
843
|
)
|
|
860
844
|
] }),
|
|
861
|
-
|
|
862
|
-
/* @__PURE__ */ e(
|
|
845
|
+
a && /* @__PURE__ */ t(P, { variant: "outline", onClick: r, disabled: u, children: [
|
|
846
|
+
/* @__PURE__ */ e(ie, { className: "size-4 mr-2" }),
|
|
863
847
|
"Take Again"
|
|
864
848
|
] })
|
|
865
849
|
] }) })
|
|
866
850
|
}
|
|
867
851
|
);
|
|
868
852
|
}
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
853
|
+
const $t = G(Ct, "SurveyModule");
|
|
854
|
+
function yt({
|
|
855
|
+
courseTitle: c,
|
|
856
|
+
gradeItems: N = [],
|
|
857
|
+
categories: o,
|
|
858
|
+
overallGrade: l,
|
|
859
|
+
showWeights: f,
|
|
860
|
+
progressData: i,
|
|
861
|
+
reviewData: n,
|
|
862
|
+
readOnly: h = !1,
|
|
863
|
+
className: a,
|
|
864
|
+
style: u
|
|
879
865
|
}) {
|
|
880
|
-
const [
|
|
881
|
-
|
|
882
|
-
var
|
|
883
|
-
(
|
|
884
|
-
}, [
|
|
885
|
-
function
|
|
886
|
-
|
|
866
|
+
const [x, b] = R(null), s = U(null);
|
|
867
|
+
L(() => {
|
|
868
|
+
var r;
|
|
869
|
+
(r = s.current) == null || r.focus({ preventScroll: !0 });
|
|
870
|
+
}, [x]);
|
|
871
|
+
function S(r) {
|
|
872
|
+
n != null && n[r.uid] && b(r.uid);
|
|
887
873
|
}
|
|
888
|
-
function
|
|
889
|
-
|
|
874
|
+
function m() {
|
|
875
|
+
b(null);
|
|
890
876
|
}
|
|
891
|
-
const
|
|
877
|
+
const g = x ? N.find((r) => r.uid === x) : null, v = x ? n == null ? void 0 : n[x] : null;
|
|
892
878
|
return /* @__PURE__ */ t(
|
|
893
879
|
"div",
|
|
894
880
|
{
|
|
895
|
-
ref:
|
|
881
|
+
ref: s,
|
|
896
882
|
tabIndex: -1,
|
|
897
|
-
className:
|
|
898
|
-
style:
|
|
883
|
+
className: A("outline-none", a),
|
|
884
|
+
style: u,
|
|
899
885
|
children: [
|
|
900
886
|
/* @__PURE__ */ t("div", { className: "flex items-center justify-between mb-6", children: [
|
|
901
887
|
/* @__PURE__ */ t("div", { children: [
|
|
902
|
-
|
|
888
|
+
c && /* @__PURE__ */ e("h2", { className: "text-xl font-bold text-foreground", children: c }),
|
|
903
889
|
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Grade Center" })
|
|
904
890
|
] }),
|
|
905
|
-
|
|
891
|
+
l && /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
|
|
906
892
|
/* @__PURE__ */ e(
|
|
907
|
-
|
|
893
|
+
Ae,
|
|
908
894
|
{
|
|
909
|
-
percentage:
|
|
910
|
-
letterGrade:
|
|
895
|
+
percentage: l.percentage,
|
|
896
|
+
letterGrade: l.letterGrade,
|
|
911
897
|
size: "medium"
|
|
912
898
|
}
|
|
913
899
|
),
|
|
914
900
|
/* @__PURE__ */ t("div", { className: "text-right", children: [
|
|
915
901
|
/* @__PURE__ */ t("div", { className: "text-sm font-medium text-foreground", children: [
|
|
916
|
-
|
|
902
|
+
l.pointsEarned,
|
|
917
903
|
"/",
|
|
918
|
-
|
|
904
|
+
l.pointsPossible,
|
|
919
905
|
" pts"
|
|
920
906
|
] }),
|
|
921
|
-
|
|
907
|
+
l.letterGrade && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: l.letterGrade })
|
|
922
908
|
] })
|
|
923
909
|
] })
|
|
924
910
|
] }),
|
|
925
|
-
/* @__PURE__ */ e(
|
|
926
|
-
|
|
911
|
+
/* @__PURE__ */ e(_, { className: "mb-6" }),
|
|
912
|
+
g && v ? /* @__PURE__ */ t("div", { children: [
|
|
927
913
|
/* @__PURE__ */ t(
|
|
928
|
-
|
|
914
|
+
P,
|
|
929
915
|
{
|
|
930
916
|
variant: "ghost",
|
|
931
917
|
size: "sm",
|
|
932
|
-
onClick:
|
|
918
|
+
onClick: m,
|
|
933
919
|
className: "mb-4",
|
|
934
920
|
children: [
|
|
935
|
-
/* @__PURE__ */ e(
|
|
921
|
+
/* @__PURE__ */ e(X, { className: "size-4 mr-1.5" }),
|
|
936
922
|
"Back to Grades"
|
|
937
923
|
]
|
|
938
924
|
}
|
|
939
925
|
),
|
|
940
|
-
/* @__PURE__ */ e(
|
|
941
|
-
/* @__PURE__ */ e("h3", { className: "font-semibold text-foreground", children:
|
|
942
|
-
|
|
926
|
+
/* @__PURE__ */ e(I, { className: "mb-4", children: /* @__PURE__ */ t(j, { className: "py-3 px-4", children: [
|
|
927
|
+
/* @__PURE__ */ e("h3", { className: "font-semibold text-foreground", children: g.name }),
|
|
928
|
+
g.score !== null && /* @__PURE__ */ t("p", { className: "text-sm text-muted-foreground", children: [
|
|
943
929
|
"Score: ",
|
|
944
|
-
|
|
930
|
+
g.score,
|
|
945
931
|
"/",
|
|
946
|
-
|
|
932
|
+
g.maxScore,
|
|
947
933
|
" (",
|
|
948
934
|
Math.round(
|
|
949
|
-
|
|
935
|
+
g.score / g.maxScore * 100
|
|
950
936
|
),
|
|
951
937
|
"%)"
|
|
952
938
|
] })
|
|
953
939
|
] }) }),
|
|
954
940
|
/* @__PURE__ */ e(
|
|
955
|
-
|
|
941
|
+
be,
|
|
956
942
|
{
|
|
957
|
-
questions:
|
|
958
|
-
sessionAnswers:
|
|
959
|
-
score:
|
|
943
|
+
questions: v.questions,
|
|
944
|
+
sessionAnswers: v.sessionAnswers,
|
|
945
|
+
score: v.score,
|
|
960
946
|
showCorrectAnswers: !0
|
|
961
947
|
}
|
|
962
948
|
)
|
|
963
|
-
] }) : /* @__PURE__ */ t(
|
|
964
|
-
|
|
965
|
-
/* @__PURE__ */ t(
|
|
966
|
-
/* @__PURE__ */ e(
|
|
949
|
+
] }) : /* @__PURE__ */ t(de, { defaultValue: "grades", children: [
|
|
950
|
+
i && /* @__PURE__ */ t(oe, { className: "mb-6", children: [
|
|
951
|
+
/* @__PURE__ */ t(W, { value: "grades", children: [
|
|
952
|
+
/* @__PURE__ */ e(K, { className: "size-4 mr-1.5" }),
|
|
967
953
|
"Grades"
|
|
968
954
|
] }),
|
|
969
|
-
/* @__PURE__ */ t(
|
|
970
|
-
/* @__PURE__ */ e(
|
|
955
|
+
/* @__PURE__ */ t(W, { value: "progress", children: [
|
|
956
|
+
/* @__PURE__ */ e(ve, { className: "size-4 mr-1.5" }),
|
|
971
957
|
"Progress"
|
|
972
958
|
] })
|
|
973
959
|
] }),
|
|
974
|
-
/* @__PURE__ */ e(
|
|
975
|
-
|
|
960
|
+
/* @__PURE__ */ e(H, { value: "grades", children: /* @__PURE__ */ e(
|
|
961
|
+
st,
|
|
976
962
|
{
|
|
977
|
-
items:
|
|
978
|
-
categories:
|
|
979
|
-
overallGrade:
|
|
980
|
-
showWeights:
|
|
981
|
-
onItemClick:
|
|
963
|
+
items: N,
|
|
964
|
+
categories: o,
|
|
965
|
+
overallGrade: l,
|
|
966
|
+
showWeights: f,
|
|
967
|
+
onItemClick: S,
|
|
968
|
+
readOnly: h
|
|
982
969
|
}
|
|
983
970
|
) }),
|
|
984
|
-
|
|
985
|
-
|
|
971
|
+
i && /* @__PURE__ */ e(H, { value: "progress", children: /* @__PURE__ */ e(
|
|
972
|
+
we,
|
|
986
973
|
{
|
|
987
|
-
overallProgress:
|
|
988
|
-
totalTimeSpent:
|
|
989
|
-
modules:
|
|
990
|
-
recentActivity:
|
|
991
|
-
streak:
|
|
992
|
-
achievements:
|
|
974
|
+
overallProgress: i.overallProgress,
|
|
975
|
+
totalTimeSpent: i.totalTimeSpent,
|
|
976
|
+
modules: i.modules,
|
|
977
|
+
recentActivity: i.recentActivity,
|
|
978
|
+
streak: i.streak,
|
|
979
|
+
achievements: i.achievements
|
|
993
980
|
}
|
|
994
981
|
) })
|
|
995
982
|
] })
|
|
@@ -997,91 +984,94 @@ function xt({
|
|
|
997
984
|
}
|
|
998
985
|
);
|
|
999
986
|
}
|
|
1000
|
-
const
|
|
987
|
+
const Vt = G(yt, "GradeCenterModule"), At = {
|
|
1001
988
|
text: "Text Entry",
|
|
1002
989
|
file: "File Upload",
|
|
1003
990
|
url: "URL Submission"
|
|
1004
991
|
};
|
|
1005
|
-
function
|
|
1006
|
-
title:
|
|
1007
|
-
instructions:
|
|
1008
|
-
dueDate:
|
|
1009
|
-
maxScore:
|
|
1010
|
-
submissionTypes:
|
|
1011
|
-
fileConstraints:
|
|
1012
|
-
rubric:
|
|
1013
|
-
existingSubmission:
|
|
1014
|
-
status:
|
|
1015
|
-
grade:
|
|
1016
|
-
onSubmit:
|
|
1017
|
-
|
|
1018
|
-
|
|
992
|
+
function Mt({
|
|
993
|
+
title: c,
|
|
994
|
+
instructions: N,
|
|
995
|
+
dueDate: o,
|
|
996
|
+
maxScore: l,
|
|
997
|
+
submissionTypes: f = ["text", "file"],
|
|
998
|
+
fileConstraints: i,
|
|
999
|
+
rubric: n,
|
|
1000
|
+
existingSubmission: h,
|
|
1001
|
+
status: a = "not_started",
|
|
1002
|
+
grade: u,
|
|
1003
|
+
onSubmit: x,
|
|
1004
|
+
onComplete: b,
|
|
1005
|
+
onSaveDraft: s,
|
|
1006
|
+
readOnly: S = !1,
|
|
1007
|
+
className: m,
|
|
1019
1008
|
style: g
|
|
1020
1009
|
}) {
|
|
1021
|
-
const
|
|
1010
|
+
const v = a === "submitted" || a === "graded" ? {
|
|
1022
1011
|
tag: "confirmation",
|
|
1023
|
-
submission:
|
|
1024
|
-
} : { tag: "instructions" }, [
|
|
1025
|
-
|
|
1026
|
-
var
|
|
1027
|
-
(
|
|
1028
|
-
}, [
|
|
1029
|
-
const
|
|
1030
|
-
(
|
|
1012
|
+
submission: h ?? {}
|
|
1013
|
+
} : { tag: "instructions" }, [r, C] = R(v), M = U(null);
|
|
1014
|
+
L(() => {
|
|
1015
|
+
var k;
|
|
1016
|
+
(k = M.current) == null || k.focus({ preventScroll: !0 });
|
|
1017
|
+
}, [r.tag]);
|
|
1018
|
+
const y = Z(() => Array.isArray(n) ? n.reduce(
|
|
1019
|
+
(k, Q) => k + Math.max(...Q.levels.map((B) => B.points)),
|
|
1031
1020
|
0
|
|
1032
|
-
) : 0, [
|
|
1033
|
-
function
|
|
1034
|
-
|
|
1021
|
+
) : 0, [n]);
|
|
1022
|
+
function E(k) {
|
|
1023
|
+
x == null || x(k), b == null || b({ submission: k, status: "submitted" }), C({ tag: "confirmation", submission: k });
|
|
1035
1024
|
}
|
|
1036
|
-
function
|
|
1037
|
-
|
|
1025
|
+
function d(k) {
|
|
1026
|
+
s == null || s(k), b == null || b({ submission: k, status: "draft" });
|
|
1038
1027
|
}
|
|
1039
|
-
const
|
|
1040
|
-
if (
|
|
1028
|
+
const p = a === "not_started" || a === "draft" || a === "resubmit";
|
|
1029
|
+
if (r.tag === "instructions")
|
|
1041
1030
|
return /* @__PURE__ */ e(
|
|
1042
1031
|
"div",
|
|
1043
1032
|
{
|
|
1044
|
-
ref:
|
|
1033
|
+
ref: M,
|
|
1045
1034
|
tabIndex: -1,
|
|
1046
|
-
className:
|
|
1035
|
+
className: A("max-w-2xl mx-auto outline-none", m),
|
|
1047
1036
|
style: g,
|
|
1048
|
-
children: /* @__PURE__ */ e(
|
|
1037
|
+
children: /* @__PURE__ */ e(I, { children: /* @__PURE__ */ t(j, { className: "pt-8 pb-8", children: [
|
|
1049
1038
|
/* @__PURE__ */ t("div", { className: "text-center mb-6", children: [
|
|
1050
|
-
/* @__PURE__ */ e("div", { className: "mx-auto mb-4 w-14 h-14 rounded-full bg-primary/10 flex items-center justify-center", children: /* @__PURE__ */ e(
|
|
1051
|
-
/* @__PURE__ */ e("h2", { className: "text-2xl font-bold text-foreground mb-2", children:
|
|
1039
|
+
/* @__PURE__ */ e("div", { className: "mx-auto mb-4 w-14 h-14 rounded-full bg-primary/10 flex items-center justify-center", children: /* @__PURE__ */ e(fe, { className: "size-7 text-primary" }) }),
|
|
1040
|
+
/* @__PURE__ */ e("h2", { className: "text-2xl font-bold text-foreground mb-2", children: c })
|
|
1052
1041
|
] }),
|
|
1053
1042
|
/* @__PURE__ */ t("div", { className: "flex flex-wrap justify-center gap-2 mb-6", children: [
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
/* @__PURE__ */ e(
|
|
1057
|
-
|
|
1043
|
+
o && /* @__PURE__ */ e(ge, { dueDate: o, size: "small" }),
|
|
1044
|
+
l !== void 0 && /* @__PURE__ */ t(Y, { variant: "outline", className: "gap-1.5", children: [
|
|
1045
|
+
/* @__PURE__ */ e(J, { className: "size-3.5" }),
|
|
1046
|
+
l,
|
|
1058
1047
|
" points"
|
|
1059
1048
|
] }),
|
|
1060
|
-
/* @__PURE__ */ t(
|
|
1061
|
-
/* @__PURE__ */ e(
|
|
1062
|
-
|
|
1049
|
+
/* @__PURE__ */ t(Y, { variant: "outline", className: "gap-1.5", children: [
|
|
1050
|
+
/* @__PURE__ */ e(xe, { className: "size-3.5" }),
|
|
1051
|
+
f.map((k) => At[k]).join(", ")
|
|
1063
1052
|
] }),
|
|
1064
|
-
/* @__PURE__ */ e(
|
|
1053
|
+
/* @__PURE__ */ e(Ne, { status: a })
|
|
1065
1054
|
] }),
|
|
1066
|
-
/* @__PURE__ */ e(
|
|
1067
|
-
/* @__PURE__ */ e("div", { className: "prose prose-sm text-foreground mb-6", children:
|
|
1068
|
-
|
|
1069
|
-
/* @__PURE__ */ e(
|
|
1055
|
+
/* @__PURE__ */ e(_, { className: "my-6" }),
|
|
1056
|
+
/* @__PURE__ */ e("div", { className: "prose prose-sm text-foreground mb-6", children: N }),
|
|
1057
|
+
Array.isArray(n) && n.length > 0 && /* @__PURE__ */ t(te, { children: [
|
|
1058
|
+
/* @__PURE__ */ e(_, { className: "my-6" }),
|
|
1070
1059
|
/* @__PURE__ */ e(
|
|
1071
|
-
|
|
1060
|
+
pe,
|
|
1072
1061
|
{
|
|
1073
|
-
criteria:
|
|
1074
|
-
maxScore:
|
|
1062
|
+
criteria: n,
|
|
1063
|
+
maxScore: y
|
|
1075
1064
|
}
|
|
1076
1065
|
)
|
|
1077
1066
|
] }),
|
|
1078
|
-
|
|
1079
|
-
|
|
1067
|
+
p && !S && /* @__PURE__ */ e("div", { className: "text-center mt-8", children: /* @__PURE__ */ t(
|
|
1068
|
+
P,
|
|
1080
1069
|
{
|
|
1081
1070
|
size: "lg",
|
|
1082
|
-
onClick: () =>
|
|
1071
|
+
onClick: () => C({ tag: "work" }),
|
|
1072
|
+
disabled: S,
|
|
1083
1073
|
children: [
|
|
1084
|
-
/* @__PURE__ */ e(
|
|
1074
|
+
/* @__PURE__ */ e(ae, { className: "size-4 mr-2" }),
|
|
1085
1075
|
"Start Assignment"
|
|
1086
1076
|
]
|
|
1087
1077
|
}
|
|
@@ -1089,120 +1079,121 @@ function pt({
|
|
|
1089
1079
|
] }) })
|
|
1090
1080
|
}
|
|
1091
1081
|
);
|
|
1092
|
-
if (
|
|
1082
|
+
if (r.tag === "work")
|
|
1093
1083
|
return /* @__PURE__ */ t(
|
|
1094
1084
|
"div",
|
|
1095
1085
|
{
|
|
1096
|
-
ref:
|
|
1086
|
+
ref: M,
|
|
1097
1087
|
tabIndex: -1,
|
|
1098
|
-
className:
|
|
1088
|
+
className: A("outline-none", m),
|
|
1099
1089
|
style: g,
|
|
1100
1090
|
children: [
|
|
1101
1091
|
/* @__PURE__ */ t(
|
|
1102
|
-
|
|
1092
|
+
P,
|
|
1103
1093
|
{
|
|
1104
1094
|
variant: "ghost",
|
|
1105
1095
|
size: "sm",
|
|
1106
|
-
onClick: () =>
|
|
1096
|
+
onClick: () => C({ tag: "instructions" }),
|
|
1107
1097
|
className: "mb-4",
|
|
1108
1098
|
children: [
|
|
1109
|
-
/* @__PURE__ */ e(
|
|
1099
|
+
/* @__PURE__ */ e(X, { className: "size-4 mr-1.5" }),
|
|
1110
1100
|
"Back to Instructions"
|
|
1111
1101
|
]
|
|
1112
1102
|
}
|
|
1113
1103
|
),
|
|
1114
1104
|
/* @__PURE__ */ e(
|
|
1115
|
-
|
|
1105
|
+
rt,
|
|
1116
1106
|
{
|
|
1117
|
-
title:
|
|
1118
|
-
instructions:
|
|
1119
|
-
dueDate:
|
|
1120
|
-
maxScore:
|
|
1121
|
-
status:
|
|
1122
|
-
submissionTypes:
|
|
1123
|
-
existingSubmission:
|
|
1124
|
-
fileConstraints:
|
|
1125
|
-
grade:
|
|
1126
|
-
onSubmit:
|
|
1127
|
-
onSaveDraft:
|
|
1107
|
+
title: c,
|
|
1108
|
+
instructions: N,
|
|
1109
|
+
dueDate: o,
|
|
1110
|
+
maxScore: l,
|
|
1111
|
+
status: a,
|
|
1112
|
+
submissionTypes: f,
|
|
1113
|
+
existingSubmission: h,
|
|
1114
|
+
fileConstraints: i,
|
|
1115
|
+
grade: u,
|
|
1116
|
+
onSubmit: E,
|
|
1117
|
+
onSaveDraft: d,
|
|
1118
|
+
readOnly: S
|
|
1128
1119
|
}
|
|
1129
1120
|
)
|
|
1130
1121
|
]
|
|
1131
1122
|
}
|
|
1132
1123
|
);
|
|
1133
|
-
const { submission:
|
|
1124
|
+
const { submission: w } = r;
|
|
1134
1125
|
return /* @__PURE__ */ e(
|
|
1135
1126
|
"div",
|
|
1136
1127
|
{
|
|
1137
|
-
ref:
|
|
1128
|
+
ref: M,
|
|
1138
1129
|
tabIndex: -1,
|
|
1139
|
-
className:
|
|
1130
|
+
className: A("max-w-2xl mx-auto outline-none", m),
|
|
1140
1131
|
style: g,
|
|
1141
|
-
children: /* @__PURE__ */ e(
|
|
1132
|
+
children: /* @__PURE__ */ e(I, { children: /* @__PURE__ */ t(j, { className: "pt-8 pb-8", children: [
|
|
1142
1133
|
/* @__PURE__ */ t("div", { className: "text-center mb-6", children: [
|
|
1143
|
-
/* @__PURE__ */ e("div", { className: "mx-auto mb-4 w-14 h-14 rounded-full bg-success/10 flex items-center justify-center", children: /* @__PURE__ */ e(
|
|
1144
|
-
/* @__PURE__ */ e("h2", { className: "text-xl font-bold text-foreground mb-2", children:
|
|
1134
|
+
/* @__PURE__ */ e("div", { className: "mx-auto mb-4 w-14 h-14 rounded-full bg-success/10 flex items-center justify-center", children: /* @__PURE__ */ e(J, { className: "size-7 text-success" }) }),
|
|
1135
|
+
/* @__PURE__ */ e("h2", { className: "text-xl font-bold text-foreground mb-2", children: a === "graded" ? "Assignment Graded" : "Submission Received" }),
|
|
1145
1136
|
/* @__PURE__ */ t("div", { className: "flex justify-center gap-2 mb-4", children: [
|
|
1146
|
-
/* @__PURE__ */ e(
|
|
1147
|
-
|
|
1137
|
+
/* @__PURE__ */ e(Ne, { status: a }),
|
|
1138
|
+
o && /* @__PURE__ */ e(ge, { dueDate: o, size: "small" })
|
|
1148
1139
|
] })
|
|
1149
1140
|
] }),
|
|
1150
|
-
|
|
1141
|
+
a === "graded" && u && /* @__PURE__ */ t("div", { className: "text-center mb-6", children: [
|
|
1151
1142
|
/* @__PURE__ */ e(
|
|
1152
|
-
|
|
1143
|
+
Ae,
|
|
1153
1144
|
{
|
|
1154
|
-
percentage:
|
|
1145
|
+
percentage: l ? Math.round(u.score / l * 100) : 0,
|
|
1155
1146
|
size: "large"
|
|
1156
1147
|
}
|
|
1157
1148
|
),
|
|
1158
1149
|
/* @__PURE__ */ t("p", { className: "text-sm text-muted-foreground mt-2", children: [
|
|
1159
|
-
|
|
1150
|
+
u.score,
|
|
1160
1151
|
"/",
|
|
1161
|
-
|
|
1152
|
+
l,
|
|
1162
1153
|
" points"
|
|
1163
1154
|
] }),
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
/* @__PURE__ */ e(
|
|
1155
|
+
u.feedback && /* @__PURE__ */ e(Ce, { className: "text-left mt-4", children: /* @__PURE__ */ e(ye, { children: u.feedback }) }),
|
|
1156
|
+
Array.isArray(n) && u.rubricLevels && /* @__PURE__ */ t(te, { children: [
|
|
1157
|
+
/* @__PURE__ */ e(_, { className: "my-6" }),
|
|
1167
1158
|
/* @__PURE__ */ e(
|
|
1168
|
-
|
|
1159
|
+
pe,
|
|
1169
1160
|
{
|
|
1170
|
-
criteria:
|
|
1171
|
-
selectedLevels:
|
|
1172
|
-
totalScore:
|
|
1173
|
-
maxScore:
|
|
1161
|
+
criteria: n,
|
|
1162
|
+
selectedLevels: u.rubricLevels,
|
|
1163
|
+
totalScore: u.score,
|
|
1164
|
+
maxScore: y
|
|
1174
1165
|
}
|
|
1175
1166
|
)
|
|
1176
1167
|
] })
|
|
1177
1168
|
] }),
|
|
1178
|
-
/* @__PURE__ */ e(
|
|
1169
|
+
/* @__PURE__ */ e(_, { className: "my-6" }),
|
|
1179
1170
|
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-foreground mb-3", children: "What You Submitted" }),
|
|
1180
1171
|
/* @__PURE__ */ t("div", { className: "space-y-2 text-sm text-muted-foreground", children: [
|
|
1181
|
-
|
|
1182
|
-
/* @__PURE__ */ e(
|
|
1183
|
-
/* @__PURE__ */ e("span", { className: "line-clamp-2", children:
|
|
1172
|
+
w.textContent && /* @__PURE__ */ t("div", { className: "flex items-start gap-2", children: [
|
|
1173
|
+
/* @__PURE__ */ e(Ye, { className: "size-4 mt-0.5 shrink-0" }),
|
|
1174
|
+
/* @__PURE__ */ e("span", { className: "line-clamp-2", children: w.textContent.replace(/<[^>]*>/g, "") })
|
|
1184
1175
|
] }),
|
|
1185
|
-
|
|
1186
|
-
/* @__PURE__ */ e(
|
|
1176
|
+
w.files && w.files.length > 0 && /* @__PURE__ */ t("div", { className: "flex items-start gap-2", children: [
|
|
1177
|
+
/* @__PURE__ */ e(xe, { className: "size-4 mt-0.5 shrink-0" }),
|
|
1187
1178
|
/* @__PURE__ */ t("span", { children: [
|
|
1188
|
-
|
|
1179
|
+
w.files.length,
|
|
1189
1180
|
" file",
|
|
1190
|
-
|
|
1181
|
+
w.files.length !== 1 ? "s" : "",
|
|
1191
1182
|
" uploaded"
|
|
1192
1183
|
] })
|
|
1193
1184
|
] }),
|
|
1194
|
-
|
|
1195
|
-
/* @__PURE__ */ e(
|
|
1196
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
1185
|
+
w.url && /* @__PURE__ */ t("div", { className: "flex items-start gap-2", children: [
|
|
1186
|
+
/* @__PURE__ */ e($e, { className: "size-4 mt-0.5 shrink-0" }),
|
|
1187
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: w.url })
|
|
1197
1188
|
] })
|
|
1198
1189
|
] }),
|
|
1199
|
-
|
|
1200
|
-
|
|
1190
|
+
p && !S && /* @__PURE__ */ e("div", { className: "text-center mt-8", children: /* @__PURE__ */ t(
|
|
1191
|
+
P,
|
|
1201
1192
|
{
|
|
1202
1193
|
variant: "outline",
|
|
1203
|
-
onClick: () =>
|
|
1194
|
+
onClick: () => C({ tag: "work" }),
|
|
1204
1195
|
children: [
|
|
1205
|
-
/* @__PURE__ */ e(
|
|
1196
|
+
/* @__PURE__ */ e(fe, { className: "size-4 mr-2" }),
|
|
1206
1197
|
"Edit Submission"
|
|
1207
1198
|
]
|
|
1208
1199
|
}
|
|
@@ -1211,67 +1202,73 @@ function pt({
|
|
|
1211
1202
|
}
|
|
1212
1203
|
);
|
|
1213
1204
|
}
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1205
|
+
const Wt = G(Mt, "AssignmentModule");
|
|
1206
|
+
function Et({
|
|
1207
|
+
courseTitle: c,
|
|
1208
|
+
recipientName: N,
|
|
1209
|
+
organizationName: o,
|
|
1210
|
+
organizationLogo: l,
|
|
1211
|
+
signatory: f,
|
|
1212
|
+
completionDate: i,
|
|
1213
|
+
certificateVariant: n = "modern",
|
|
1214
|
+
requirements: h,
|
|
1215
|
+
overallProgress: a,
|
|
1216
|
+
onRequirementClick: u,
|
|
1217
|
+
onComplete: x,
|
|
1218
|
+
readOnly: b = !1,
|
|
1219
|
+
className: s,
|
|
1220
|
+
style: S
|
|
1228
1221
|
}) {
|
|
1229
|
-
const { allComplete:
|
|
1230
|
-
const
|
|
1231
|
-
return { allComplete:
|
|
1232
|
-
}, [
|
|
1233
|
-
|
|
1234
|
-
var
|
|
1235
|
-
(
|
|
1236
|
-
}, [
|
|
1237
|
-
|
|
1238
|
-
|
|
1222
|
+
const { allComplete: m, completedCount: g, derivedProgress: v } = Z(() => {
|
|
1223
|
+
const p = h.filter((Q) => Q.completed).length, w = h.length, k = w > 0 ? Math.round(p / w * 100) : 0;
|
|
1224
|
+
return { allComplete: p === w, completedCount: p, derivedProgress: k };
|
|
1225
|
+
}, [h]), r = a ?? v, [C, M] = R({ tag: "requirements" }), y = U(null), E = U(!1);
|
|
1226
|
+
L(() => {
|
|
1227
|
+
var p;
|
|
1228
|
+
(p = y.current) == null || p.focus({ preventScroll: !0 });
|
|
1229
|
+
}, [C.tag]);
|
|
1230
|
+
const d = U(x);
|
|
1231
|
+
return d.current = x, L(() => {
|
|
1232
|
+
var p;
|
|
1233
|
+
C.tag === "certificate" && !E.current && (E.current = !0, (p = d.current) == null || p.call(d));
|
|
1234
|
+
}, [C.tag]), C.tag === "requirements" ? /* @__PURE__ */ e(
|
|
1239
1235
|
"div",
|
|
1240
1236
|
{
|
|
1241
|
-
ref:
|
|
1237
|
+
ref: y,
|
|
1242
1238
|
tabIndex: -1,
|
|
1243
|
-
className:
|
|
1244
|
-
style:
|
|
1245
|
-
children: /* @__PURE__ */ e(
|
|
1239
|
+
className: A("max-w-2xl mx-auto outline-none", s),
|
|
1240
|
+
style: S,
|
|
1241
|
+
children: /* @__PURE__ */ e(I, { children: /* @__PURE__ */ t(j, { className: "pt-8 pb-8", children: [
|
|
1246
1242
|
/* @__PURE__ */ t("div", { className: "text-center mb-6", children: [
|
|
1247
1243
|
/* @__PURE__ */ e(
|
|
1248
|
-
|
|
1244
|
+
D,
|
|
1249
1245
|
{
|
|
1250
|
-
value:
|
|
1246
|
+
value: r,
|
|
1251
1247
|
size: 100,
|
|
1252
1248
|
strokeWidth: 8,
|
|
1253
|
-
color:
|
|
1249
|
+
color: m ? "var(--success)" : "var(--primary)",
|
|
1254
1250
|
className: "mx-auto mb-4 text-foreground"
|
|
1255
1251
|
}
|
|
1256
1252
|
),
|
|
1257
|
-
/* @__PURE__ */ e("h2", { className: "text-xl font-bold text-foreground mb-2", children:
|
|
1258
|
-
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children:
|
|
1253
|
+
/* @__PURE__ */ e("h2", { className: "text-xl font-bold text-foreground mb-2", children: c }),
|
|
1254
|
+
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: m ? "All requirements met — your certificate is ready!" : `${g} of ${h.length} requirements complete` })
|
|
1259
1255
|
] }),
|
|
1260
1256
|
/* @__PURE__ */ e(
|
|
1261
|
-
|
|
1257
|
+
nt,
|
|
1262
1258
|
{
|
|
1263
|
-
requirements:
|
|
1264
|
-
onRequirementClick:
|
|
1259
|
+
requirements: h,
|
|
1260
|
+
onRequirementClick: b ? void 0 : u,
|
|
1265
1261
|
className: "mb-6"
|
|
1266
1262
|
}
|
|
1267
1263
|
),
|
|
1268
|
-
|
|
1269
|
-
|
|
1264
|
+
m && /* @__PURE__ */ e("div", { className: "text-center mt-6", children: /* @__PURE__ */ t(
|
|
1265
|
+
P,
|
|
1270
1266
|
{
|
|
1271
1267
|
size: "lg",
|
|
1272
|
-
onClick: () =>
|
|
1268
|
+
onClick: () => M({ tag: "certificate" }),
|
|
1269
|
+
disabled: b,
|
|
1273
1270
|
children: [
|
|
1274
|
-
/* @__PURE__ */ e(
|
|
1271
|
+
/* @__PURE__ */ e(ee, { className: "size-4 mr-2" }),
|
|
1275
1272
|
"View Certificate"
|
|
1276
1273
|
]
|
|
1277
1274
|
}
|
|
@@ -1281,43 +1278,43 @@ function gt({
|
|
|
1281
1278
|
) : /* @__PURE__ */ t(
|
|
1282
1279
|
"div",
|
|
1283
1280
|
{
|
|
1284
|
-
ref:
|
|
1281
|
+
ref: y,
|
|
1285
1282
|
tabIndex: -1,
|
|
1286
|
-
className:
|
|
1287
|
-
style:
|
|
1283
|
+
className: A("outline-none", s),
|
|
1284
|
+
style: S,
|
|
1288
1285
|
children: [
|
|
1289
1286
|
/* @__PURE__ */ t(
|
|
1290
|
-
|
|
1287
|
+
P,
|
|
1291
1288
|
{
|
|
1292
1289
|
variant: "ghost",
|
|
1293
1290
|
size: "sm",
|
|
1294
|
-
onClick: () =>
|
|
1291
|
+
onClick: () => M({ tag: "requirements" }),
|
|
1295
1292
|
className: "mb-4",
|
|
1296
1293
|
children: [
|
|
1297
|
-
/* @__PURE__ */ e(
|
|
1294
|
+
/* @__PURE__ */ e(X, { className: "size-4 mr-1.5" }),
|
|
1298
1295
|
"Back to Requirements"
|
|
1299
1296
|
]
|
|
1300
1297
|
}
|
|
1301
1298
|
),
|
|
1302
1299
|
/* @__PURE__ */ t("div", { className: "text-center mb-8", children: [
|
|
1303
|
-
/* @__PURE__ */ e("div", { className: "mx-auto mb-4 w-14 h-14 rounded-full bg-success/10 flex items-center justify-center", children: /* @__PURE__ */ e(
|
|
1300
|
+
/* @__PURE__ */ e("div", { className: "mx-auto mb-4 w-14 h-14 rounded-full bg-success/10 flex items-center justify-center", children: /* @__PURE__ */ e(Ve, { className: "size-7 text-success" }) }),
|
|
1304
1301
|
/* @__PURE__ */ e("h2", { className: "text-2xl font-bold text-foreground mb-2", children: "Congratulations!" }),
|
|
1305
1302
|
/* @__PURE__ */ t("p", { className: "text-muted-foreground", children: [
|
|
1306
1303
|
"You've completed all requirements for",
|
|
1307
1304
|
" ",
|
|
1308
|
-
/* @__PURE__ */ e("span", { className: "font-medium text-foreground", children:
|
|
1305
|
+
/* @__PURE__ */ e("span", { className: "font-medium text-foreground", children: c })
|
|
1309
1306
|
] })
|
|
1310
1307
|
] }),
|
|
1311
1308
|
/* @__PURE__ */ e(
|
|
1312
|
-
|
|
1309
|
+
Se,
|
|
1313
1310
|
{
|
|
1314
|
-
recipientName:
|
|
1315
|
-
courseTitle:
|
|
1316
|
-
completionDate:
|
|
1317
|
-
organizationName:
|
|
1318
|
-
organizationLogo:
|
|
1319
|
-
signatory:
|
|
1320
|
-
variant:
|
|
1311
|
+
recipientName: N,
|
|
1312
|
+
courseTitle: c,
|
|
1313
|
+
completionDate: i ?? (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
|
|
1314
|
+
organizationName: o,
|
|
1315
|
+
organizationLogo: l,
|
|
1316
|
+
signatory: f,
|
|
1317
|
+
variant: n,
|
|
1321
1318
|
showActions: !0
|
|
1322
1319
|
}
|
|
1323
1320
|
)
|
|
@@ -1325,98 +1322,514 @@ function gt({
|
|
|
1325
1322
|
}
|
|
1326
1323
|
);
|
|
1327
1324
|
}
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1325
|
+
const Ht = G(Et, "CertificateModule");
|
|
1326
|
+
function Bt({
|
|
1327
|
+
forumTitle: c,
|
|
1328
|
+
topics: N = [],
|
|
1329
|
+
currentUser: o,
|
|
1330
|
+
threads: l = {},
|
|
1331
|
+
onCreateTopic: f,
|
|
1332
|
+
onReply: i,
|
|
1333
|
+
onToggleLike: n,
|
|
1334
|
+
onMarkAnswer: h,
|
|
1335
|
+
onTopicOpen: a,
|
|
1336
|
+
readOnly: u,
|
|
1337
|
+
className: x,
|
|
1338
|
+
style: b
|
|
1341
1339
|
}) {
|
|
1342
|
-
const [
|
|
1343
|
-
|
|
1344
|
-
var
|
|
1345
|
-
(
|
|
1346
|
-
}, [
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
}
|
|
1353
|
-
|
|
1340
|
+
const [s, S] = R(null), [m, g] = R(""), [v, r] = R("newest"), C = U(null);
|
|
1341
|
+
L(() => {
|
|
1342
|
+
var B;
|
|
1343
|
+
(B = C.current) == null || B.focus({ preventScroll: !0 });
|
|
1344
|
+
}, [s]);
|
|
1345
|
+
const M = U(a);
|
|
1346
|
+
M.current = a;
|
|
1347
|
+
const y = T((B) => {
|
|
1348
|
+
var q;
|
|
1349
|
+
S(B), (q = M.current) == null || q.call(M, B);
|
|
1350
|
+
}, []), E = T(() => {
|
|
1351
|
+
S(null);
|
|
1352
|
+
}, []), d = s ? l[s] : null, p = s ? N.find((B) => B.uid === s) : null, w = T(
|
|
1353
|
+
(B, q) => {
|
|
1354
|
+
s && (i == null || i(s, B, q));
|
|
1355
|
+
},
|
|
1356
|
+
[s, i]
|
|
1357
|
+
), k = T(
|
|
1358
|
+
(B) => {
|
|
1359
|
+
s && (n == null || n(s, B));
|
|
1360
|
+
},
|
|
1361
|
+
[s, n]
|
|
1362
|
+
), Q = T(
|
|
1363
|
+
(B) => {
|
|
1364
|
+
s && (h == null || h(s, B));
|
|
1365
|
+
},
|
|
1366
|
+
[s, h]
|
|
1367
|
+
);
|
|
1354
1368
|
return /* @__PURE__ */ e(
|
|
1355
1369
|
"div",
|
|
1356
1370
|
{
|
|
1357
|
-
ref:
|
|
1371
|
+
ref: C,
|
|
1358
1372
|
tabIndex: -1,
|
|
1359
|
-
className:
|
|
1360
|
-
style:
|
|
1361
|
-
children:
|
|
1373
|
+
className: A("outline-none", x),
|
|
1374
|
+
style: b,
|
|
1375
|
+
children: s && d ? (
|
|
1362
1376
|
/* ─── Thread View ─── */
|
|
1363
1377
|
/* @__PURE__ */ t("div", { children: [
|
|
1364
1378
|
/* @__PURE__ */ t(
|
|
1365
|
-
|
|
1379
|
+
P,
|
|
1380
|
+
{
|
|
1381
|
+
variant: "ghost",
|
|
1382
|
+
size: "sm",
|
|
1383
|
+
onClick: E,
|
|
1384
|
+
className: "mb-4",
|
|
1385
|
+
children: [
|
|
1386
|
+
/* @__PURE__ */ e(X, { className: "size-4 mr-1.5" }),
|
|
1387
|
+
"Back to Topics"
|
|
1388
|
+
]
|
|
1389
|
+
}
|
|
1390
|
+
),
|
|
1391
|
+
/* @__PURE__ */ e(
|
|
1392
|
+
lt,
|
|
1393
|
+
{
|
|
1394
|
+
title: (p == null ? void 0 : p.title) ?? "",
|
|
1395
|
+
rootPost: d.rootPost,
|
|
1396
|
+
replies: d.replies,
|
|
1397
|
+
currentUser: o,
|
|
1398
|
+
onReply: w,
|
|
1399
|
+
onToggleLike: n ? k : void 0,
|
|
1400
|
+
onMarkAnswer: h ? Q : void 0,
|
|
1401
|
+
readOnly: u
|
|
1402
|
+
}
|
|
1403
|
+
)
|
|
1404
|
+
] })
|
|
1405
|
+
) : s && !d ? (
|
|
1406
|
+
/* ─── Empty Thread State ─── */
|
|
1407
|
+
/* @__PURE__ */ t("div", { children: [
|
|
1408
|
+
/* @__PURE__ */ t(
|
|
1409
|
+
P,
|
|
1366
1410
|
{
|
|
1367
1411
|
variant: "ghost",
|
|
1368
1412
|
size: "sm",
|
|
1369
|
-
onClick:
|
|
1413
|
+
onClick: E,
|
|
1370
1414
|
className: "mb-4",
|
|
1371
1415
|
children: [
|
|
1372
|
-
/* @__PURE__ */ e(
|
|
1416
|
+
/* @__PURE__ */ e(X, { className: "size-4 mr-1.5" }),
|
|
1373
1417
|
"Back to Topics"
|
|
1374
1418
|
]
|
|
1375
1419
|
}
|
|
1376
1420
|
),
|
|
1377
1421
|
/* @__PURE__ */ e(
|
|
1378
|
-
|
|
1422
|
+
ce,
|
|
1379
1423
|
{
|
|
1380
|
-
title:
|
|
1381
|
-
|
|
1382
|
-
replies: s.replies,
|
|
1383
|
-
currentUser: h,
|
|
1384
|
-
onReply: (r, A) => m == null ? void 0 : m(n, r, A),
|
|
1385
|
-
onToggleLike: l ? (r) => l(n, r) : void 0,
|
|
1386
|
-
onMarkAnswer: i ? (r) => i(n, r) : void 0,
|
|
1387
|
-
readOnly: d
|
|
1424
|
+
title: "No discussion yet",
|
|
1425
|
+
description: "Be the first to start this conversation."
|
|
1388
1426
|
}
|
|
1389
1427
|
)
|
|
1390
1428
|
] })
|
|
1391
1429
|
) : (
|
|
1392
1430
|
/* ─── Forum Board View ─── */
|
|
1393
1431
|
/* @__PURE__ */ e(
|
|
1394
|
-
|
|
1432
|
+
at,
|
|
1395
1433
|
{
|
|
1396
|
-
title:
|
|
1397
|
-
topics:
|
|
1398
|
-
currentUser:
|
|
1399
|
-
onTopicClick:
|
|
1400
|
-
onCreateTopic:
|
|
1401
|
-
sortOrder:
|
|
1402
|
-
onSortChange:
|
|
1403
|
-
searchQuery:
|
|
1404
|
-
onSearchChange:
|
|
1405
|
-
readOnly:
|
|
1434
|
+
title: c,
|
|
1435
|
+
topics: N,
|
|
1436
|
+
currentUser: o,
|
|
1437
|
+
onTopicClick: y,
|
|
1438
|
+
onCreateTopic: f,
|
|
1439
|
+
sortOrder: v,
|
|
1440
|
+
onSortChange: r,
|
|
1441
|
+
searchQuery: m,
|
|
1442
|
+
onSearchChange: g,
|
|
1443
|
+
readOnly: u
|
|
1406
1444
|
}
|
|
1407
1445
|
)
|
|
1408
1446
|
)
|
|
1409
1447
|
}
|
|
1410
1448
|
);
|
|
1411
1449
|
}
|
|
1450
|
+
const _t = G(Bt, "DiscussionModule");
|
|
1451
|
+
function Pt({
|
|
1452
|
+
studentName: c,
|
|
1453
|
+
overallProgress: N,
|
|
1454
|
+
totalTimeSpent: o,
|
|
1455
|
+
modules: l,
|
|
1456
|
+
recentActivity: f,
|
|
1457
|
+
streak: i,
|
|
1458
|
+
achievements: n,
|
|
1459
|
+
enrolledCourses: h,
|
|
1460
|
+
onCourseClick: a,
|
|
1461
|
+
announcements: u = [],
|
|
1462
|
+
onAnnouncementSelect: x,
|
|
1463
|
+
onMarkRead: b,
|
|
1464
|
+
readOnly: s = !1,
|
|
1465
|
+
className: S,
|
|
1466
|
+
style: m
|
|
1467
|
+
}) {
|
|
1468
|
+
const g = U(null);
|
|
1469
|
+
L(() => {
|
|
1470
|
+
var r;
|
|
1471
|
+
(r = g.current) == null || r.focus({ preventScroll: !0 });
|
|
1472
|
+
}, []);
|
|
1473
|
+
const v = u.filter((r) => !r.isRead).length;
|
|
1474
|
+
return /* @__PURE__ */ t(
|
|
1475
|
+
"div",
|
|
1476
|
+
{
|
|
1477
|
+
ref: g,
|
|
1478
|
+
tabIndex: -1,
|
|
1479
|
+
className: A("outline-none", S),
|
|
1480
|
+
style: m,
|
|
1481
|
+
children: [
|
|
1482
|
+
/* @__PURE__ */ t("div", { className: "flex items-center justify-between mb-6", children: [
|
|
1483
|
+
/* @__PURE__ */ t("h2", { className: "text-xl font-bold text-foreground", children: [
|
|
1484
|
+
"Welcome back, ",
|
|
1485
|
+
c
|
|
1486
|
+
] }),
|
|
1487
|
+
/* @__PURE__ */ e(D, { value: N, size: 48, strokeWidth: 4 })
|
|
1488
|
+
] }),
|
|
1489
|
+
/* @__PURE__ */ e(_, { className: "mb-6" }),
|
|
1490
|
+
/* @__PURE__ */ t(de, { defaultValue: "overview", children: [
|
|
1491
|
+
/* @__PURE__ */ t(oe, { className: "mb-6", children: [
|
|
1492
|
+
/* @__PURE__ */ t(W, { value: "overview", children: [
|
|
1493
|
+
/* @__PURE__ */ e(ve, { className: "size-4 mr-1.5" }),
|
|
1494
|
+
"Overview"
|
|
1495
|
+
] }),
|
|
1496
|
+
/* @__PURE__ */ t(W, { value: "courses", children: [
|
|
1497
|
+
/* @__PURE__ */ e(K, { className: "size-4 mr-1.5" }),
|
|
1498
|
+
"My Courses"
|
|
1499
|
+
] }),
|
|
1500
|
+
/* @__PURE__ */ t(W, { value: "announcements", children: [
|
|
1501
|
+
/* @__PURE__ */ e(We, { className: "size-4 mr-1.5" }),
|
|
1502
|
+
"Announcements",
|
|
1503
|
+
v > 0 && /* @__PURE__ */ e("span", { className: "ml-1.5 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground text-xs font-medium min-w-5 h-5 px-1.5", children: v })
|
|
1504
|
+
] })
|
|
1505
|
+
] }),
|
|
1506
|
+
/* @__PURE__ */ e(H, { value: "overview", children: /* @__PURE__ */ e(
|
|
1507
|
+
we,
|
|
1508
|
+
{
|
|
1509
|
+
overallProgress: N,
|
|
1510
|
+
totalTimeSpent: o,
|
|
1511
|
+
modules: l,
|
|
1512
|
+
recentActivity: f,
|
|
1513
|
+
streak: i,
|
|
1514
|
+
achievements: n
|
|
1515
|
+
}
|
|
1516
|
+
) }),
|
|
1517
|
+
/* @__PURE__ */ e(H, { value: "courses", children: /* @__PURE__ */ e(
|
|
1518
|
+
ke,
|
|
1519
|
+
{
|
|
1520
|
+
courses: h,
|
|
1521
|
+
onCourseClick: (r) => !s && a(r.uid),
|
|
1522
|
+
showSearch: !0,
|
|
1523
|
+
viewMode: "grid",
|
|
1524
|
+
readOnly: s
|
|
1525
|
+
}
|
|
1526
|
+
) }),
|
|
1527
|
+
/* @__PURE__ */ e(H, { value: "announcements", children: /* @__PURE__ */ e(
|
|
1528
|
+
it,
|
|
1529
|
+
{
|
|
1530
|
+
announcements: u,
|
|
1531
|
+
onSelect: x,
|
|
1532
|
+
onMarkRead: b,
|
|
1533
|
+
readOnly: s
|
|
1534
|
+
}
|
|
1535
|
+
) })
|
|
1536
|
+
] })
|
|
1537
|
+
]
|
|
1538
|
+
}
|
|
1539
|
+
);
|
|
1540
|
+
}
|
|
1541
|
+
const Xt = G(Pt, "StudentDashboardModule");
|
|
1542
|
+
function Ut({
|
|
1543
|
+
title: c,
|
|
1544
|
+
courses: N = [],
|
|
1545
|
+
categories: o = [],
|
|
1546
|
+
enrollmentData: l,
|
|
1547
|
+
onEnroll: f,
|
|
1548
|
+
onCourseOpen: i,
|
|
1549
|
+
readOnly: n = !1,
|
|
1550
|
+
className: h,
|
|
1551
|
+
style: a
|
|
1552
|
+
}) {
|
|
1553
|
+
var g;
|
|
1554
|
+
const [u, x] = R({ tag: "browse" }), b = U(null);
|
|
1555
|
+
L(() => {
|
|
1556
|
+
var v;
|
|
1557
|
+
(v = b.current) == null || v.focus({ preventScroll: !0 });
|
|
1558
|
+
}, [u.tag]);
|
|
1559
|
+
function s(v) {
|
|
1560
|
+
l != null && l[v] ? x({ tag: "enroll", courseUid: v }) : i == null || i(v);
|
|
1561
|
+
}
|
|
1562
|
+
function S() {
|
|
1563
|
+
x({ tag: "browse" });
|
|
1564
|
+
}
|
|
1565
|
+
function m(v) {
|
|
1566
|
+
f(v), x({ tag: "browse" });
|
|
1567
|
+
}
|
|
1568
|
+
return /* @__PURE__ */ t(
|
|
1569
|
+
"div",
|
|
1570
|
+
{
|
|
1571
|
+
ref: b,
|
|
1572
|
+
tabIndex: -1,
|
|
1573
|
+
className: A("outline-none", h),
|
|
1574
|
+
style: a,
|
|
1575
|
+
children: [
|
|
1576
|
+
c && u.tag === "browse" && /* @__PURE__ */ e("h2", { className: "text-xl font-bold text-foreground mb-4", children: c }),
|
|
1577
|
+
u.tag === "enroll" ? (
|
|
1578
|
+
/* --- Enrollment View --- */
|
|
1579
|
+
/* @__PURE__ */ t("div", { children: [
|
|
1580
|
+
/* @__PURE__ */ t(
|
|
1581
|
+
P,
|
|
1582
|
+
{
|
|
1583
|
+
variant: "ghost",
|
|
1584
|
+
size: "sm",
|
|
1585
|
+
onClick: S,
|
|
1586
|
+
className: "mb-4",
|
|
1587
|
+
children: [
|
|
1588
|
+
/* @__PURE__ */ e(X, { className: "size-4 mr-1.5" }),
|
|
1589
|
+
"Back to Catalog"
|
|
1590
|
+
]
|
|
1591
|
+
}
|
|
1592
|
+
),
|
|
1593
|
+
l != null && l[u.courseUid] ? /* @__PURE__ */ e(
|
|
1594
|
+
ct,
|
|
1595
|
+
{
|
|
1596
|
+
course: l[u.courseUid].course,
|
|
1597
|
+
prerequisites: l[u.courseUid].prerequisites,
|
|
1598
|
+
onEnroll: m,
|
|
1599
|
+
onCancel: S
|
|
1600
|
+
}
|
|
1601
|
+
) : (
|
|
1602
|
+
/* Fallback when enrollment data is not yet available */
|
|
1603
|
+
/* @__PURE__ */ e(I, { children: /* @__PURE__ */ t(j, { className: "pt-6", children: [
|
|
1604
|
+
/* @__PURE__ */ e("h3", { className: "text-lg font-semibold text-foreground mb-2", children: ((g = N.find((v) => v.uid === u.courseUid)) == null ? void 0 : g.title) ?? "Course" }),
|
|
1605
|
+
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground mb-4", children: "Enrollment details are loading. You can enroll directly below." }),
|
|
1606
|
+
/* @__PURE__ */ t("div", { className: "flex gap-2", children: [
|
|
1607
|
+
/* @__PURE__ */ e(P, { variant: "outline", onClick: S, children: "Cancel" }),
|
|
1608
|
+
/* @__PURE__ */ e(
|
|
1609
|
+
P,
|
|
1610
|
+
{
|
|
1611
|
+
onClick: () => m(u.courseUid),
|
|
1612
|
+
disabled: n,
|
|
1613
|
+
children: "Enroll Now"
|
|
1614
|
+
}
|
|
1615
|
+
)
|
|
1616
|
+
] })
|
|
1617
|
+
] }) })
|
|
1618
|
+
)
|
|
1619
|
+
] })
|
|
1620
|
+
) : (
|
|
1621
|
+
/* --- Browse View --- */
|
|
1622
|
+
/* @__PURE__ */ e(
|
|
1623
|
+
ke,
|
|
1624
|
+
{
|
|
1625
|
+
courses: N,
|
|
1626
|
+
categories: o,
|
|
1627
|
+
onCourseClick: (v) => s(v.uid),
|
|
1628
|
+
onEnroll: (v) => s(v.uid),
|
|
1629
|
+
readOnly: n
|
|
1630
|
+
}
|
|
1631
|
+
)
|
|
1632
|
+
)
|
|
1633
|
+
]
|
|
1634
|
+
}
|
|
1635
|
+
);
|
|
1636
|
+
}
|
|
1637
|
+
const Zt = G(Ut, "CourseCatalogModule");
|
|
1638
|
+
function Rt({
|
|
1639
|
+
student: c,
|
|
1640
|
+
enrolledCourses: N = [],
|
|
1641
|
+
achievements: o = [],
|
|
1642
|
+
certificates: l = [],
|
|
1643
|
+
stats: f,
|
|
1644
|
+
onCourseClick: i,
|
|
1645
|
+
certificateData: n,
|
|
1646
|
+
readOnly: h = !1,
|
|
1647
|
+
className: a,
|
|
1648
|
+
style: u
|
|
1649
|
+
}) {
|
|
1650
|
+
const [x, b] = R(null), s = U(null);
|
|
1651
|
+
L(() => {
|
|
1652
|
+
var r;
|
|
1653
|
+
(r = s.current) == null || r.focus({ preventScroll: !0 });
|
|
1654
|
+
}, [x]);
|
|
1655
|
+
function S(r) {
|
|
1656
|
+
h || n != null && n[r] && b(r);
|
|
1657
|
+
}
|
|
1658
|
+
function m() {
|
|
1659
|
+
b(null);
|
|
1660
|
+
}
|
|
1661
|
+
const g = x ? n == null ? void 0 : n[x] : null, v = x ? l.find((r) => r.uid === x) : null;
|
|
1662
|
+
return /* @__PURE__ */ t(
|
|
1663
|
+
"div",
|
|
1664
|
+
{
|
|
1665
|
+
ref: s,
|
|
1666
|
+
tabIndex: -1,
|
|
1667
|
+
className: A("outline-none", a),
|
|
1668
|
+
style: u,
|
|
1669
|
+
children: [
|
|
1670
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-4 mb-6", children: [
|
|
1671
|
+
/* @__PURE__ */ e(
|
|
1672
|
+
gt,
|
|
1673
|
+
{
|
|
1674
|
+
displayName: c.displayName,
|
|
1675
|
+
avatarUrl: c.avatarUrl,
|
|
1676
|
+
size: "medium"
|
|
1677
|
+
}
|
|
1678
|
+
),
|
|
1679
|
+
/* @__PURE__ */ t("div", { className: "flex-1 min-w-0", children: [
|
|
1680
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
1681
|
+
/* @__PURE__ */ e("h2", { className: "text-xl font-bold text-foreground", children: c.displayName }),
|
|
1682
|
+
c.role && /* @__PURE__ */ e(Y, { variant: "secondary", children: c.role })
|
|
1683
|
+
] }),
|
|
1684
|
+
c.email && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: c.email })
|
|
1685
|
+
] })
|
|
1686
|
+
] }),
|
|
1687
|
+
/* @__PURE__ */ e(_, { className: "mb-6" }),
|
|
1688
|
+
v && g ? /* @__PURE__ */ t("div", { children: [
|
|
1689
|
+
/* @__PURE__ */ t(
|
|
1690
|
+
P,
|
|
1691
|
+
{
|
|
1692
|
+
variant: "ghost",
|
|
1693
|
+
size: "sm",
|
|
1694
|
+
onClick: m,
|
|
1695
|
+
className: "mb-4",
|
|
1696
|
+
children: [
|
|
1697
|
+
/* @__PURE__ */ e(X, { className: "size-4 mr-1.5" }),
|
|
1698
|
+
"Back to Profile"
|
|
1699
|
+
]
|
|
1700
|
+
}
|
|
1701
|
+
),
|
|
1702
|
+
/* @__PURE__ */ e(Se, { ...g, showActions: !0 })
|
|
1703
|
+
] }) : /* @__PURE__ */ t(de, { defaultValue: "profile", children: [
|
|
1704
|
+
/* @__PURE__ */ t(oe, { className: "mb-6", children: [
|
|
1705
|
+
/* @__PURE__ */ t(W, { value: "profile", children: [
|
|
1706
|
+
/* @__PURE__ */ e(He, { className: "size-4 mr-1.5" }),
|
|
1707
|
+
"Profile"
|
|
1708
|
+
] }),
|
|
1709
|
+
/* @__PURE__ */ t(W, { value: "courses", children: [
|
|
1710
|
+
/* @__PURE__ */ e(K, { className: "size-4 mr-1.5" }),
|
|
1711
|
+
"Courses"
|
|
1712
|
+
] }),
|
|
1713
|
+
/* @__PURE__ */ t(W, { value: "achievements", children: [
|
|
1714
|
+
/* @__PURE__ */ e(se, { className: "size-4 mr-1.5" }),
|
|
1715
|
+
"Achievements"
|
|
1716
|
+
] }),
|
|
1717
|
+
/* @__PURE__ */ t(W, { value: "certificates", children: [
|
|
1718
|
+
/* @__PURE__ */ e(ee, { className: "size-4 mr-1.5" }),
|
|
1719
|
+
"Certificates"
|
|
1720
|
+
] })
|
|
1721
|
+
] }),
|
|
1722
|
+
/* @__PURE__ */ e(H, { value: "profile", children: /* @__PURE__ */ e(
|
|
1723
|
+
dt,
|
|
1724
|
+
{
|
|
1725
|
+
student: c,
|
|
1726
|
+
enrolledCourses: N,
|
|
1727
|
+
achievements: o,
|
|
1728
|
+
stats: f,
|
|
1729
|
+
onCourseClick: i,
|
|
1730
|
+
showCourses: !1,
|
|
1731
|
+
showAchievements: !1,
|
|
1732
|
+
readOnly: !0
|
|
1733
|
+
}
|
|
1734
|
+
) }),
|
|
1735
|
+
/* @__PURE__ */ e(H, { value: "courses", children: N.length > 0 ? /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(j, { className: "p-0 divide-y divide-border", children: N.map((r) => /* @__PURE__ */ t(
|
|
1736
|
+
"div",
|
|
1737
|
+
{
|
|
1738
|
+
className: A(
|
|
1739
|
+
"flex items-center gap-3 px-4 py-3 transition-colors",
|
|
1740
|
+
i && !h && "cursor-pointer hover:bg-muted/50"
|
|
1741
|
+
),
|
|
1742
|
+
onClick: i && !h ? () => i(r.uid) : void 0,
|
|
1743
|
+
children: [
|
|
1744
|
+
/* @__PURE__ */ e(
|
|
1745
|
+
D,
|
|
1746
|
+
{
|
|
1747
|
+
value: r.progress,
|
|
1748
|
+
size: 32,
|
|
1749
|
+
strokeWidth: 3
|
|
1750
|
+
}
|
|
1751
|
+
),
|
|
1752
|
+
/* @__PURE__ */ t("div", { className: "flex-1 min-w-0", children: [
|
|
1753
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-foreground truncate", children: r.title }),
|
|
1754
|
+
r.lastAccessedAt && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: Nt(r.lastAccessedAt) })
|
|
1755
|
+
] }),
|
|
1756
|
+
/* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground whitespace-nowrap", children: [
|
|
1757
|
+
Math.round(r.progress),
|
|
1758
|
+
"%"
|
|
1759
|
+
] })
|
|
1760
|
+
]
|
|
1761
|
+
},
|
|
1762
|
+
r.uid
|
|
1763
|
+
)) }) }) : /* @__PURE__ */ t("div", { className: "py-12 text-center", children: [
|
|
1764
|
+
/* @__PURE__ */ e(K, { className: "size-10 text-muted-foreground mx-auto mb-3" }),
|
|
1765
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-foreground", children: "No courses yet" }),
|
|
1766
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground mt-1", children: "Enrolled courses will appear here." })
|
|
1767
|
+
] }) }),
|
|
1768
|
+
/* @__PURE__ */ e(H, { value: "achievements", children: o.length > 0 ? /* @__PURE__ */ e("div", { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-2", children: o.map((r) => /* @__PURE__ */ e(
|
|
1769
|
+
vt,
|
|
1770
|
+
{
|
|
1771
|
+
title: r.name,
|
|
1772
|
+
description: r.description,
|
|
1773
|
+
icon: r.iconUrl ? /* @__PURE__ */ e(
|
|
1774
|
+
"img",
|
|
1775
|
+
{
|
|
1776
|
+
src: r.iconUrl,
|
|
1777
|
+
alt: r.name,
|
|
1778
|
+
className: "w-12 h-12"
|
|
1779
|
+
}
|
|
1780
|
+
) : void 0,
|
|
1781
|
+
earnedDate: r.earnedAt
|
|
1782
|
+
},
|
|
1783
|
+
r.uid
|
|
1784
|
+
)) }) : /* @__PURE__ */ t("div", { className: "py-12 text-center", children: [
|
|
1785
|
+
/* @__PURE__ */ e(se, { className: "size-10 text-muted-foreground mx-auto mb-3" }),
|
|
1786
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-foreground", children: "No achievements yet" }),
|
|
1787
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground mt-1", children: "Achievements will appear here as they are earned." })
|
|
1788
|
+
] }) }),
|
|
1789
|
+
/* @__PURE__ */ e(H, { value: "certificates", children: l.length > 0 ? /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(j, { className: "p-0 divide-y divide-border", children: l.map((r) => /* @__PURE__ */ t(
|
|
1790
|
+
"div",
|
|
1791
|
+
{
|
|
1792
|
+
className: A(
|
|
1793
|
+
"flex items-center gap-3 px-4 py-3 transition-colors",
|
|
1794
|
+
(n == null ? void 0 : n[r.uid]) && !h && "cursor-pointer hover:bg-muted/50"
|
|
1795
|
+
),
|
|
1796
|
+
onClick: n != null && n[r.uid] && !h ? () => S(r.uid) : void 0,
|
|
1797
|
+
children: [
|
|
1798
|
+
/* @__PURE__ */ e("div", { className: "w-9 h-9 rounded-lg bg-primary/10 flex items-center justify-center text-primary", children: /* @__PURE__ */ e(ee, { size: 20 }) }),
|
|
1799
|
+
/* @__PURE__ */ t("div", { className: "flex-1 min-w-0", children: [
|
|
1800
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-foreground truncate", children: r.courseName }),
|
|
1801
|
+
/* @__PURE__ */ t("p", { className: "text-xs text-muted-foreground", children: [
|
|
1802
|
+
"Issued",
|
|
1803
|
+
" ",
|
|
1804
|
+
new Date(r.issuedAt).toLocaleDateString()
|
|
1805
|
+
] })
|
|
1806
|
+
] }),
|
|
1807
|
+
(n == null ? void 0 : n[r.uid]) && /* @__PURE__ */ e(Y, { variant: "secondary", className: "text-xs", children: "View" })
|
|
1808
|
+
]
|
|
1809
|
+
},
|
|
1810
|
+
r.uid
|
|
1811
|
+
)) }) }) : /* @__PURE__ */ t("div", { className: "py-12 text-center", children: [
|
|
1812
|
+
/* @__PURE__ */ e(ee, { className: "size-10 text-muted-foreground mx-auto mb-3" }),
|
|
1813
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-foreground", children: "No certificates yet" }),
|
|
1814
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground mt-1", children: "Certificates will appear here once courses are completed." })
|
|
1815
|
+
] }) })
|
|
1816
|
+
] })
|
|
1817
|
+
]
|
|
1818
|
+
}
|
|
1819
|
+
);
|
|
1820
|
+
}
|
|
1821
|
+
const Jt = G(Rt, "StudentProfileModule");
|
|
1412
1822
|
export {
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1823
|
+
Wt as AssignmentModule,
|
|
1824
|
+
Ht as CertificateModule,
|
|
1825
|
+
Zt as CourseCatalogModule,
|
|
1826
|
+
Gt as CoursePlayer,
|
|
1827
|
+
_t as DiscussionModule,
|
|
1828
|
+
Yt as ExamModule,
|
|
1829
|
+
qt as FlashcardLab,
|
|
1830
|
+
Vt as GradeCenterModule,
|
|
1831
|
+
Qt as QuizModule,
|
|
1832
|
+
Xt as StudentDashboardModule,
|
|
1833
|
+
Jt as StudentProfileModule,
|
|
1834
|
+
$t as SurveyModule
|
|
1422
1835
|
};
|