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