@hydralms/components 0.2.0 → 0.3.1

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