@hydralms/components 0.1.3 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/dist/ForumBoard-CHXU3mjC.js +2207 -0
  2. package/dist/ForumBoard-d1w5-r6n.cjs +1 -0
  3. package/dist/assessment-toolbar/assessment-toolbar.d.ts +1 -1
  4. package/dist/assessment-toolbar/index.d.ts +5 -1
  5. package/dist/assessment-toolbar/question-header-bar.d.ts +2 -0
  6. package/dist/assessment-toolbar/question-materials-drawer.d.ts +2 -0
  7. package/dist/assessment-toolbar/question-navigator.d.ts +1 -1
  8. package/dist/assessment-toolbar/types.d.ts +52 -4
  9. package/dist/assessment-toolbar/use-countdown.d.ts +43 -0
  10. package/dist/common/index.d.ts +2 -1
  11. package/dist/common/stepper.d.ts +6 -0
  12. package/dist/common/types.d.ts +37 -0
  13. package/dist/components.css +1 -1
  14. package/dist/content/attachment-list.d.ts +6 -0
  15. package/dist/content/content-block.d.ts +1 -1
  16. package/dist/content/index.d.ts +2 -1
  17. package/dist/content/types.d.ts +39 -0
  18. package/dist/curriculum/curriculum-item.d.ts +1 -1
  19. package/dist/index.cjs +1 -1
  20. package/dist/index.js +551 -312
  21. package/dist/modules/AssignmentModule/AssignmentModule.d.ts +8 -0
  22. package/dist/modules/AssignmentModule/types.d.ts +65 -0
  23. package/dist/modules/CertificateModule/CertificateModule.d.ts +9 -0
  24. package/dist/modules/CertificateModule/types.d.ts +49 -0
  25. package/dist/modules/DiscussionModule/DiscussionModule.d.ts +8 -0
  26. package/dist/modules/DiscussionModule/types.d.ts +47 -0
  27. package/dist/modules/ExamModule/ExamModule.d.ts +8 -0
  28. package/dist/modules/ExamModule/types.d.ts +64 -0
  29. package/dist/modules/GradeCenterModule/GradeCenterModule.d.ts +9 -0
  30. package/dist/modules/GradeCenterModule/types.d.ts +54 -0
  31. package/dist/modules/QuizModule/QuizModule.d.ts +1 -1
  32. package/dist/modules/QuizModule/types.d.ts +6 -1
  33. package/dist/modules/SurveyModule/SurveyModule.d.ts +7 -0
  34. package/dist/modules/SurveyModule/types.d.ts +49 -0
  35. package/dist/modules/index.d.ts +12 -0
  36. package/dist/modules.cjs +1 -0
  37. package/dist/modules.js +1422 -0
  38. package/dist/progress/achievement-badge.d.ts +6 -0
  39. package/dist/progress/activity-timeline.d.ts +6 -0
  40. package/dist/progress/index.d.ts +4 -1
  41. package/dist/progress/stat-card.d.ts +1 -1
  42. package/dist/progress/streak-badge.d.ts +6 -0
  43. package/dist/progress/types.d.ts +97 -0
  44. package/dist/questions/essay.d.ts +1 -1
  45. package/dist/questions/hotspot.d.ts +21 -0
  46. package/dist/questions/index.d.ts +9 -1
  47. package/dist/questions/inline-choice.d.ts +21 -0
  48. package/dist/questions/matching.d.ts +22 -0
  49. package/dist/questions/numeric.d.ts +11 -0
  50. package/dist/questions/ordering.d.ts +12 -0
  51. package/dist/questions/scenario.d.ts +23 -0
  52. package/dist/questions/scoring.d.ts +22 -0
  53. package/dist/questions/spreadsheet.d.ts +29 -0
  54. package/dist/questions/types.d.ts +106 -1
  55. package/dist/questions/use-drag-reorder.d.ts +17 -0
  56. package/dist/sections/CertificateViewer/types.d.ts +7 -5
  57. package/dist/sections/ExamSession/ExamSession.d.ts +1 -1
  58. package/dist/sections/ExamSession/types.d.ts +6 -1
  59. package/dist/sections/ForumBoard/ForumBoard.d.ts +8 -0
  60. package/dist/sections/ForumBoard/types.d.ts +64 -0
  61. package/dist/sections/QuizSession/QuizSession.d.ts +1 -1
  62. package/dist/sections/QuizSession/types.d.ts +6 -1
  63. package/dist/sections/RequirementsChecklist/RequirementsChecklist.d.ts +8 -0
  64. package/dist/sections/RequirementsChecklist/types.d.ts +37 -0
  65. package/dist/sections/RubricView/RubricView.d.ts +9 -0
  66. package/dist/sections/RubricView/types.d.ts +50 -0
  67. package/dist/sections/index.d.ts +7 -1
  68. package/dist/sections.cjs +1 -1
  69. package/dist/sections.js +250 -1715
  70. package/dist/social/post-card.d.ts +1 -1
  71. package/dist/tabs-DRM2Iq_J.cjs +172 -0
  72. package/dist/tabs-Wf3h_Cx3.js +21580 -0
  73. package/dist/ui/alert.d.ts +1 -1
  74. package/dist/ui/badge.d.ts +1 -1
  75. package/dist/ui/button.d.ts +1 -1
  76. package/dist/ui/drawer.d.ts +84 -0
  77. package/dist/ui/index.d.ts +3 -0
  78. package/dist/ui/progress.d.ts +1 -1
  79. package/dist/ui/rich-text-editor.d.ts +30 -0
  80. package/dist/ui/rich-text-toolbar.d.ts +8 -0
  81. package/dist/utils/array-utils.d.ts +4 -0
  82. package/dist/utils/flatten-leaves.d.ts +6 -0
  83. package/dist/utils/format-file-size.d.ts +1 -0
  84. package/dist/utils/format-timestamp.d.ts +1 -0
  85. package/dist/utils/is-empty-html.d.ts +5 -0
  86. package/dist/utils/shuffle.d.ts +1 -0
  87. package/dist/utils/string-utils.d.ts +12 -0
  88. package/dist/video/video-bookmark.d.ts +1 -1
  89. package/dist/video/video-playlist-item.d.ts +1 -1
  90. package/package.json +92 -3
  91. package/src/assessment-toolbar/assessment-toolbar.tsx +54 -49
  92. package/src/assessment-toolbar/index.ts +6 -0
  93. package/src/assessment-toolbar/question-header-bar.tsx +61 -0
  94. package/src/assessment-toolbar/question-materials-drawer.tsx +55 -0
  95. package/src/assessment-toolbar/question-navigator.tsx +3 -31
  96. package/src/assessment-toolbar/timer-display.tsx +2 -2
  97. package/src/assessment-toolbar/types.ts +54 -4
  98. package/src/assessment-toolbar/use-countdown.ts +153 -0
  99. package/src/common/index.ts +3 -0
  100. package/src/common/search-input.tsx +7 -6
  101. package/src/common/stepper.tsx +100 -0
  102. package/src/common/types.ts +39 -0
  103. package/src/content/attachment-list.tsx +90 -0
  104. package/src/content/content-block.tsx +4 -2
  105. package/src/content/file-upload-zone.tsx +1 -6
  106. package/src/content/index.ts +3 -0
  107. package/src/content/types.ts +41 -0
  108. package/src/curriculum/curriculum-item.tsx +7 -3
  109. package/src/feedback/feedback-banner.tsx +12 -14
  110. package/src/flashcards/flashcard-deck.tsx +1 -9
  111. package/src/flashcards/flashcard.tsx +1 -1
  112. package/src/modules/AssignmentModule/AssignmentModule.tsx +305 -0
  113. package/src/modules/AssignmentModule/types.ts +73 -0
  114. package/src/modules/CertificateModule/CertificateModule.tsx +161 -0
  115. package/src/modules/CertificateModule/types.ts +47 -0
  116. package/src/modules/CoursePlayer/CoursePlayer.tsx +44 -48
  117. package/src/modules/DiscussionModule/DiscussionModule.tsx +110 -0
  118. package/src/modules/DiscussionModule/types.ts +54 -0
  119. package/src/modules/ExamModule/ExamModule.tsx +285 -0
  120. package/src/modules/ExamModule/types.ts +66 -0
  121. package/src/modules/FlashcardLab/FlashcardLab.tsx +29 -16
  122. package/src/modules/GradeCenterModule/GradeCenterModule.tsx +169 -0
  123. package/src/modules/GradeCenterModule/types.ts +63 -0
  124. package/src/modules/QuizModule/QuizModule.tsx +88 -88
  125. package/src/modules/QuizModule/types.ts +6 -1
  126. package/src/modules/SurveyModule/SurveyModule.tsx +180 -0
  127. package/src/modules/SurveyModule/types.ts +51 -0
  128. package/src/modules/index.ts +24 -0
  129. package/src/progress/achievement-badge.tsx +52 -0
  130. package/src/progress/activity-timeline.tsx +84 -0
  131. package/src/progress/index.ts +7 -0
  132. package/src/progress/stat-card.tsx +30 -18
  133. package/src/progress/streak-badge.tsx +35 -0
  134. package/src/progress/types.ts +101 -0
  135. package/src/questions/choice.tsx +7 -9
  136. package/src/questions/essay.tsx +23 -25
  137. package/src/questions/fill-in-the-blank.tsx +13 -16
  138. package/src/questions/hotspot.tsx +154 -0
  139. package/src/questions/index.ts +16 -0
  140. package/src/questions/inline-choice.tsx +151 -0
  141. package/src/questions/matching.tsx +228 -0
  142. package/src/questions/multiple-choice.tsx +7 -9
  143. package/src/questions/numeric.tsx +102 -0
  144. package/src/questions/ordering.tsx +159 -0
  145. package/src/questions/question-renderer.tsx +21 -0
  146. package/src/questions/scenario.tsx +140 -0
  147. package/src/questions/scoring.ts +201 -0
  148. package/src/questions/spreadsheet.tsx +259 -0
  149. package/src/questions/true-false.tsx +7 -9
  150. package/src/questions/types.ts +123 -1
  151. package/src/questions/use-drag-reorder.ts +80 -0
  152. package/src/sections/AnnouncementFeed/AnnouncementFeed.tsx +2 -15
  153. package/src/sections/AssessmentReview/AssessmentReview.tsx +13 -2
  154. package/src/sections/AssignmentSubmission/AssignmentSubmission.tsx +7 -5
  155. package/src/sections/CertificateViewer/CertificateViewer.tsx +409 -56
  156. package/src/sections/CertificateViewer/types.ts +13 -5
  157. package/src/sections/CourseOutline/CourseOutline.tsx +4 -14
  158. package/src/sections/DiscussionThread/DiscussionThread.tsx +13 -10
  159. package/src/sections/ExamSession/ExamSession.tsx +44 -7
  160. package/src/sections/ExamSession/types.ts +6 -1
  161. package/src/sections/ForumBoard/ForumBoard.tsx +284 -0
  162. package/src/sections/ForumBoard/types.ts +67 -0
  163. package/src/sections/GradebookTable/GradebookTable.tsx +1 -1
  164. package/src/sections/LecturePlayer/LecturePlayer.tsx +1 -1
  165. package/src/sections/LessonPage/LessonPage.tsx +5 -9
  166. package/src/sections/PracticeQuiz/PracticeQuiz.tsx +15 -26
  167. package/src/sections/ProgressDashboard/ProgressDashboard.tsx +65 -65
  168. package/src/sections/QuizSession/QuizSession.tsx +67 -8
  169. package/src/sections/QuizSession/types.ts +6 -1
  170. package/src/sections/RequirementsChecklist/RequirementsChecklist.tsx +107 -0
  171. package/src/sections/RequirementsChecklist/types.ts +38 -0
  172. package/src/sections/ResourceLibrary/ResourceLibrary.tsx +4 -9
  173. package/src/sections/RubricView/RubricView.tsx +138 -0
  174. package/src/sections/RubricView/types.ts +52 -0
  175. package/src/sections/ScrollableQuiz/ScrollableQuiz.tsx +23 -9
  176. package/src/sections/SurveyForm/SurveyForm.tsx +8 -5
  177. package/src/sections/index.ts +20 -1
  178. package/src/social/post-card.tsx +8 -19
  179. package/src/social/user-avatar.tsx +1 -0
  180. package/src/styles/globals.css +13 -0
  181. package/src/ui/drawer.tsx +600 -0
  182. package/src/ui/index.ts +19 -0
  183. package/src/ui/rich-text-editor.tsx +109 -0
  184. package/src/ui/rich-text-toolbar.tsx +156 -0
  185. package/src/utils/array-utils.ts +17 -0
  186. package/src/utils/flatten-leaves.ts +17 -0
  187. package/src/utils/format-file-size.ts +5 -0
  188. package/src/utils/format-timestamp.ts +13 -0
  189. package/src/utils/is-empty-html.ts +7 -0
  190. package/src/utils/shuffle.ts +8 -0
  191. package/src/utils/string-utils.ts +30 -0
  192. package/src/video/video-bookmark.tsx +4 -3
  193. package/src/video/video-chapter-list.tsx +9 -4
  194. package/src/video/video-player.tsx +11 -4
  195. package/src/video/video-playlist-item.tsx +8 -3
  196. package/src/video/video-thumbnail-card.tsx +4 -0
  197. package/src/video/video-transcript.tsx +8 -5
  198. package/dist/table-BrS5cDQu.js +0 -2510
  199. package/dist/table-D6AkBBEo.cjs +0 -1
@@ -0,0 +1,1422 @@
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
18
+ }) {
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
+ ] })
67
+ ] }),
68
+ /* @__PURE__ */ t(R, { size: "lg", onClick: () => n({ tag: "quiz" }), children: [
69
+ /* @__PURE__ */ e(Z, { className: "size-4 mr-2" }),
70
+ "Start Quiz"
71
+ ] })
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: [
87
+ /* @__PURE__ */ t("div", { className: "text-center mb-8", children: [
88
+ /* @__PURE__ */ e(
89
+ ee,
90
+ {
91
+ value: s.percentage,
92
+ size: 140,
93
+ strokeWidth: 10,
94
+ color: c ? "var(--success)" : "var(--destructive)",
95
+ className: "mx-auto mb-4 text-foreground"
96
+ }
97
+ ),
98
+ /* @__PURE__ */ e(
99
+ j,
100
+ {
101
+ variant: c ? "success" : "destructive",
102
+ className: "text-sm px-3 py-1 mb-2",
103
+ children: c ? "Passed" : "Failed"
104
+ }
105
+ ),
106
+ /* @__PURE__ */ e("h2", { className: "text-xl font-bold text-foreground", children: u })
107
+ ] }),
108
+ /* @__PURE__ */ t("div", { className: "grid grid-cols-2 sm:grid-cols-4 gap-3 mb-8", children: [
109
+ /* @__PURE__ */ e(
110
+ U,
111
+ {
112
+ icon: /* @__PURE__ */ e(F, {}),
113
+ label: "Correct",
114
+ description: "Questions answered right",
115
+ value: `${s.correct}/${s.total}`
116
+ }
117
+ ),
118
+ /* @__PURE__ */ e(
119
+ U,
120
+ {
121
+ icon: /* @__PURE__ */ e(me, {}),
122
+ label: "Incorrect",
123
+ description: "Questions to review",
124
+ value: `${s.total - s.correct}/${s.total}`
125
+ }
126
+ ),
127
+ /* @__PURE__ */ e(
128
+ U,
129
+ {
130
+ icon: /* @__PURE__ */ e(te, {}),
131
+ label: "Score",
132
+ description: "Overall percentage",
133
+ value: `${s.percentage}%`
134
+ }
135
+ ),
136
+ /* @__PURE__ */ e(
137
+ U,
138
+ {
139
+ icon: /* @__PURE__ */ e(G, {}),
140
+ label: "Time",
141
+ description: "Total elapsed",
142
+ value: V(s.timeElapsedSeconds)
143
+ }
144
+ )
145
+ ] }),
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"
149
+ ] }) })
150
+ ] }) }),
151
+ i && /* @__PURE__ */ t(J, { children: [
152
+ /* @__PURE__ */ e(q, { className: "my-6" }),
153
+ /* @__PURE__ */ e("h3", { className: "text-lg font-semibold text-foreground mb-4", children: "Question Review" }),
154
+ /* @__PURE__ */ e(
155
+ re,
156
+ {
157
+ questions: h,
158
+ sessionAnswers: s.answers,
159
+ showCorrectAnswers: !0
160
+ }
161
+ )
162
+ ] })
163
+ ] });
164
+ }
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
173
+ }) {
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;
183
+ });
184
+ }
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({
188
+ tag: "study",
189
+ cards: c,
190
+ deckUids: s.map((r) => r.uid),
191
+ shuffled: x
192
+ });
193
+ }
194
+ 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
202
+ };
203
+ f({ tag: "completion", result: c }), k == null || k(c);
204
+ }
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({
209
+ tag: "study",
210
+ cards: c,
211
+ deckUids: i.result.deckUids,
212
+ shuffled: i.result.wasShuffled
213
+ });
214
+ }
215
+ function w() {
216
+ v(/* @__PURE__ */ new Set()), n(h), f({ tag: "setup" });
217
+ }
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: [
220
+ /* @__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" }) }),
222
+ /* @__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" })
224
+ ] }),
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);
227
+ return /* @__PURE__ */ e(
228
+ B,
229
+ {
230
+ className: T(
231
+ "cursor-pointer transition-all py-0",
232
+ c ? "border-primary ring-1 ring-primary" : "hover:border-muted-foreground/30"
233
+ ),
234
+ onClick: () => p(s.uid),
235
+ children: /* @__PURE__ */ t(L, { className: "py-4", children: [
236
+ /* @__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,
240
+ " cards"
241
+ ] })
242
+ ] }),
243
+ s.description && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground line-clamp-2", children: s.description })
244
+ ] })
245
+ },
246
+ s.uid
247
+ );
248
+ }) }),
249
+ /* @__PURE__ */ t("div", { className: "flex items-center justify-between", children: [
250
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
251
+ b && /* @__PURE__ */ t(
252
+ R,
253
+ {
254
+ variant: x ? "secondary" : "outline",
255
+ size: "sm",
256
+ className: "gap-1.5",
257
+ onClick: () => n((s) => !s),
258
+ children: [
259
+ /* @__PURE__ */ e(ne, { className: "size-3.5" }),
260
+ "Shuffle"
261
+ ]
262
+ }
263
+ ),
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),
266
+ " ",
267
+ "cards selected"
268
+ ] })
269
+ ] }),
270
+ /* @__PURE__ */ e(
271
+ R,
272
+ {
273
+ onClick: N,
274
+ disabled: d.size === 0,
275
+ children: "Start Studying"
276
+ }
277
+ )
278
+ ] })
279
+ ] }) }) });
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,
284
+ {
285
+ cards: i.cards,
286
+ title: s,
287
+ shuffled: i.shuffled,
288
+ onComplete: C
289
+ }
290
+ ) });
291
+ }
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: [
294
+ /* @__PURE__ */ t("div", { className: "text-center mb-8", children: [
295
+ /* @__PURE__ */ t("div", { className: "relative mx-auto mb-4", children: [
296
+ /* @__PURE__ */ e(
297
+ ee,
298
+ {
299
+ value: 100,
300
+ size: 120,
301
+ strokeWidth: 10,
302
+ color: "var(--success)",
303
+ className: "text-foreground",
304
+ label: ""
305
+ }
306
+ ),
307
+ /* @__PURE__ */ e(F, { className: "size-8 text-success absolute inset-0 m-auto" })
308
+ ] }),
309
+ /* @__PURE__ */ e("h2", { className: "text-xl font-bold text-foreground mb-2", children: "Study Session Complete" }),
310
+ /* @__PURE__ */ e("p", { className: "text-muted-foreground text-sm", children: "Great work! Here's your session summary." })
311
+ ] }),
312
+ /* @__PURE__ */ t("div", { className: "grid grid-cols-2 sm:grid-cols-4 gap-3 mb-8", children: [
313
+ /* @__PURE__ */ e(
314
+ U,
315
+ {
316
+ icon: /* @__PURE__ */ e(ve, {}),
317
+ label: "Cards Studied",
318
+ description: "Total cards reviewed",
319
+ value: String(z.totalCards)
320
+ }
321
+ ),
322
+ /* @__PURE__ */ e(
323
+ U,
324
+ {
325
+ icon: /* @__PURE__ */ e(se, {}),
326
+ label: "Decks",
327
+ description: "Decks completed",
328
+ value: String(z.decksStudied)
329
+ }
330
+ ),
331
+ /* @__PURE__ */ e(
332
+ U,
333
+ {
334
+ icon: /* @__PURE__ */ e(G, {}),
335
+ label: "Time Spent",
336
+ description: "Session duration",
337
+ value: V(z.timeElapsedSeconds)
338
+ }
339
+ ),
340
+ /* @__PURE__ */ e(
341
+ U,
342
+ {
343
+ icon: /* @__PURE__ */ e(ne, {}),
344
+ label: "Shuffled",
345
+ description: "Card order randomized",
346
+ value: z.wasShuffled ? "Yes" : "No"
347
+ }
348
+ )
349
+ ] }),
350
+ /* @__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" }),
353
+ "Pick New Deck"
354
+ ] }),
355
+ /* @__PURE__ */ t(R, { onClick: S, children: [
356
+ /* @__PURE__ */ e(K, { className: "size-4 mr-2" }),
357
+ "Study Again"
358
+ ] })
359
+ ] })
360
+ ] }) }) });
361
+ }
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
374
+ }) {
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, $])
407
+ );
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;
412
+ return /* @__PURE__ */ t(
413
+ "div",
414
+ {
415
+ className: T("flex h-full overflow-hidden", d),
416
+ style: v,
417
+ 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, {})
422
+ ] }),
423
+ /* @__PURE__ */ e(Ke, { className: "px-2 pb-2", children: /* @__PURE__ */ e(
424
+ je,
425
+ {
426
+ items: b,
427
+ progress: Ne,
428
+ courseTitle: u,
429
+ activeItemUid: a,
430
+ onItemClick: Q,
431
+ readOnly: f
432
+ }
433
+ ) })
434
+ ] }) }),
435
+ /* @__PURE__ */ t("div", { className: "flex-1 flex flex-col min-w-0 overflow-hidden", children: [
436
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-2 px-4 py-2 border-b border-border bg-background shrink-0", children: [
437
+ /* @__PURE__ */ e(
438
+ R,
439
+ {
440
+ variant: "ghost",
441
+ size: "sm",
442
+ className: "size-7 p-0 mr-1",
443
+ onClick: () => C(!0),
444
+ children: /* @__PURE__ */ e(we, { className: "size-4" })
445
+ }
446
+ ),
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" }) }),
448
+ /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground shrink-0", children: [
449
+ z + 1,
450
+ " / ",
451
+ n.length
452
+ ] })
453
+ ] }),
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,
456
+ {
457
+ title: "No content selected",
458
+ description: "Select an item from the course outline to get started."
459
+ }
460
+ ) }),
461
+ /* @__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
+ /* @__PURE__ */ t("div", { className: "flex-1 min-w-0", children: [
463
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-2 mb-1", children: /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children: [
464
+ A,
465
+ "% complete"
466
+ ] }) }),
467
+ /* @__PURE__ */ e(et, { value: A, size: "sm" })
468
+ ] }),
469
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-2 shrink-0", children: [
470
+ !r && I && /* @__PURE__ */ t(
471
+ R,
472
+ {
473
+ size: "sm",
474
+ variant: "outline",
475
+ onClick: Y,
476
+ disabled: f,
477
+ children: [
478
+ /* @__PURE__ */ e(ke, { className: "size-3.5 mr-1" }),
479
+ "Complete"
480
+ ]
481
+ }
482
+ ),
483
+ /* @__PURE__ */ e(
484
+ R,
485
+ {
486
+ size: "sm",
487
+ variant: "ghost",
488
+ onClick: _,
489
+ disabled: !s,
490
+ children: /* @__PURE__ */ e(Se, { className: "size-4" })
491
+ }
492
+ ),
493
+ /* @__PURE__ */ e(
494
+ R,
495
+ {
496
+ size: "sm",
497
+ variant: "ghost",
498
+ onClick: O,
499
+ disabled: !c,
500
+ children: /* @__PURE__ */ e(ze, { className: "size-4" })
501
+ }
502
+ )
503
+ ] })
504
+ ] }) })
505
+ ] })
506
+ ]
507
+ }
508
+ );
509
+ }
510
+ function rt(u, b, h, o, k, m, l) {
511
+ switch (u.type) {
512
+ case "lesson":
513
+ return /* @__PURE__ */ e(
514
+ De,
515
+ {
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
523
+ }
524
+ );
525
+ case "video":
526
+ return /* @__PURE__ */ e(
527
+ Le,
528
+ {
529
+ video: {
530
+ src: u.src,
531
+ poster: u.poster,
532
+ title: u.title
533
+ }
534
+ }
535
+ );
536
+ case "quiz":
537
+ return /* @__PURE__ */ e(
538
+ Be,
539
+ {
540
+ questions: u.questions,
541
+ instantFeedback: !0,
542
+ allowRetry: !0,
543
+ readOnly: b
544
+ }
545
+ );
546
+ default:
547
+ return /* @__PURE__ */ e(
548
+ fe,
549
+ {
550
+ title: "Unknown content type",
551
+ description: "This content type is not supported."
552
+ }
553
+ );
554
+ }
555
+ }
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
571
+ }) {
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
591
+ };
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",
603
+ {
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
+ ] }) })
635
+ }
636
+ );
637
+ if (a.tag === "exam")
638
+ return /* @__PURE__ */ e(
639
+ "div",
640
+ {
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
+ )
659
+ }
660
+ );
661
+ const { result: A } = a, I = A.passed;
662
+ return /* @__PURE__ */ t(
663
+ "div",
664
+ {
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
+ ]
749
+ }
750
+ );
751
+ }
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
764
+ }) {
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
776
+ };
777
+ n({ tag: "thankYou", result: s }), i == null || i(s);
778
+ }
779
+ function N() {
780
+ g.current = null, n({ tag: "intro" });
781
+ }
782
+ function C() {
783
+ g.current = Date.now(), n({ tag: "survey" });
784
+ }
785
+ if (x.tag === "intro")
786
+ return /* @__PURE__ */ e(
787
+ "div",
788
+ {
789
+ ref: a,
790
+ 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,
800
+ " questions"
801
+ ] }) }),
802
+ /* @__PURE__ */ t(R, { size: "lg", onClick: C, children: [
803
+ /* @__PURE__ */ e(Z, { className: "size-4 mr-2" }),
804
+ "Begin Survey"
805
+ ] })
806
+ ] }) })
807
+ }
808
+ );
809
+ if (x.tag === "survey")
810
+ return /* @__PURE__ */ e(
811
+ "div",
812
+ {
813
+ ref: a,
814
+ tabIndex: -1,
815
+ className: T("outline-none", d),
816
+ style: v,
817
+ children: /* @__PURE__ */ e(
818
+ $e,
819
+ {
820
+ title: u,
821
+ questions: h,
822
+ requireAll: o,
823
+ showProgress: k,
824
+ onSubmit: p
825
+ }
826
+ )
827
+ }
828
+ );
829
+ const { result: S } = x;
830
+ return /* @__PURE__ */ e(
831
+ "div",
832
+ {
833
+ ref: a,
834
+ 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!" }),
841
+ /* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-3 max-w-sm mx-auto mb-6", children: [
842
+ /* @__PURE__ */ e(
843
+ U,
844
+ {
845
+ icon: /* @__PURE__ */ e(X, {}),
846
+ label: "Answered",
847
+ description: "Questions completed",
848
+ value: `${S.answeredCount}/${S.totalQuestions}`
849
+ }
850
+ ),
851
+ /* @__PURE__ */ e(
852
+ U,
853
+ {
854
+ icon: /* @__PURE__ */ e(G, {}),
855
+ label: "Time",
856
+ description: "Total elapsed",
857
+ value: V(S.timeElapsedSeconds)
858
+ }
859
+ )
860
+ ] }),
861
+ f && /* @__PURE__ */ t(R, { variant: "outline", onClick: N, children: [
862
+ /* @__PURE__ */ e(K, { className: "size-4 mr-2" }),
863
+ "Take Again"
864
+ ] })
865
+ ] }) })
866
+ }
867
+ );
868
+ }
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
879
+ }) {
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);
887
+ }
888
+ function g() {
889
+ v(null);
890
+ }
891
+ const a = d ? b.find((N) => N.uid === d) : null, p = d ? l == null ? void 0 : l[d] : null;
892
+ return /* @__PURE__ */ t(
893
+ "div",
894
+ {
895
+ ref: x,
896
+ tabIndex: -1,
897
+ className: T("outline-none", i),
898
+ style: f,
899
+ children: [
900
+ /* @__PURE__ */ t("div", { className: "flex items-center justify-between mb-6", children: [
901
+ /* @__PURE__ */ t("div", { children: [
902
+ u && /* @__PURE__ */ e("h2", { className: "text-xl font-bold text-foreground", children: u }),
903
+ /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Grade Center" })
904
+ ] }),
905
+ o && /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
906
+ /* @__PURE__ */ e(
907
+ ge,
908
+ {
909
+ percentage: o.percentage,
910
+ letterGrade: o.letterGrade,
911
+ size: "medium"
912
+ }
913
+ ),
914
+ /* @__PURE__ */ t("div", { className: "text-right", children: [
915
+ /* @__PURE__ */ t("div", { className: "text-sm font-medium text-foreground", children: [
916
+ o.pointsEarned,
917
+ "/",
918
+ o.pointsPossible,
919
+ " pts"
920
+ ] }),
921
+ o.letterGrade && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: o.letterGrade })
922
+ ] })
923
+ ] })
924
+ ] }),
925
+ /* @__PURE__ */ e(q, { className: "mb-6" }),
926
+ a && p ? /* @__PURE__ */ t("div", { children: [
927
+ /* @__PURE__ */ t(
928
+ R,
929
+ {
930
+ variant: "ghost",
931
+ size: "sm",
932
+ onClick: g,
933
+ className: "mb-4",
934
+ children: [
935
+ /* @__PURE__ */ e(H, { className: "size-4 mr-1.5" }),
936
+ "Back to Grades"
937
+ ]
938
+ }
939
+ ),
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: [
943
+ "Score: ",
944
+ a.score,
945
+ "/",
946
+ a.maxScore,
947
+ " (",
948
+ Math.round(
949
+ a.score / a.maxScore * 100
950
+ ),
951
+ "%)"
952
+ ] })
953
+ ] }) }),
954
+ /* @__PURE__ */ e(
955
+ re,
956
+ {
957
+ questions: p.questions,
958
+ sessionAnswers: p.sessionAnswers,
959
+ score: p.score,
960
+ showCorrectAnswers: !0
961
+ }
962
+ )
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" }),
967
+ "Grades"
968
+ ] }),
969
+ /* @__PURE__ */ t(ce, { value: "progress", children: [
970
+ /* @__PURE__ */ e(Ae, { className: "size-4 mr-1.5" }),
971
+ "Progress"
972
+ ] })
973
+ ] }),
974
+ /* @__PURE__ */ e(oe, { value: "grades", children: /* @__PURE__ */ e(
975
+ Fe,
976
+ {
977
+ items: b,
978
+ categories: h,
979
+ overallGrade: o,
980
+ showWeights: k,
981
+ onItemClick: n
982
+ }
983
+ ) }),
984
+ m && /* @__PURE__ */ e(oe, { value: "progress", children: /* @__PURE__ */ e(
985
+ Ye,
986
+ {
987
+ overallProgress: m.overallProgress,
988
+ totalTimeSpent: m.totalTimeSpent,
989
+ modules: m.modules,
990
+ recentActivity: m.recentActivity,
991
+ streak: m.streak,
992
+ achievements: m.achievements
993
+ }
994
+ ) })
995
+ ] })
996
+ ]
997
+ }
998
+ );
999
+ }
1000
+ const nt = {
1001
+ text: "Text Entry",
1002
+ file: "File Upload",
1003
+ url: "URL Submission"
1004
+ };
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,
1019
+ style: g
1020
+ }) {
1021
+ const a = f === "submitted" || f === "graded" ? {
1022
+ 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)),
1031
+ 0
1032
+ ) : 0, [l]);
1033
+ function w(r) {
1034
+ v == null || v(r), N({ tag: "confirmation", submission: r });
1035
+ }
1036
+ function z(r) {
1037
+ x == null || x(r);
1038
+ }
1039
+ const s = f === "not_started" || f === "draft" || f === "resubmit";
1040
+ if (p.tag === "instructions")
1041
+ return /* @__PURE__ */ e(
1042
+ "div",
1043
+ {
1044
+ ref: C,
1045
+ tabIndex: -1,
1046
+ className: T("max-w-2xl mx-auto outline-none", n),
1047
+ style: g,
1048
+ children: /* @__PURE__ */ e(B, { children: /* @__PURE__ */ t(L, { className: "pt-8 pb-8", children: [
1049
+ /* @__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 })
1052
+ ] }),
1053
+ /* @__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,
1058
+ " points"
1059
+ ] }),
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(", ")
1063
+ ] }),
1064
+ /* @__PURE__ */ e(ue, { status: f })
1065
+ ] }),
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" }),
1070
+ /* @__PURE__ */ e(
1071
+ ie,
1072
+ {
1073
+ criteria: l,
1074
+ maxScore: S
1075
+ }
1076
+ )
1077
+ ] }),
1078
+ s && /* @__PURE__ */ e("div", { className: "text-center mt-8", children: /* @__PURE__ */ t(
1079
+ R,
1080
+ {
1081
+ size: "lg",
1082
+ onClick: () => N({ tag: "work" }),
1083
+ children: [
1084
+ /* @__PURE__ */ e(Z, { className: "size-4 mr-2" }),
1085
+ "Start Assignment"
1086
+ ]
1087
+ }
1088
+ ) })
1089
+ ] }) })
1090
+ }
1091
+ );
1092
+ if (p.tag === "work")
1093
+ return /* @__PURE__ */ t(
1094
+ "div",
1095
+ {
1096
+ ref: C,
1097
+ tabIndex: -1,
1098
+ className: T("outline-none", n),
1099
+ style: g,
1100
+ children: [
1101
+ /* @__PURE__ */ t(
1102
+ R,
1103
+ {
1104
+ variant: "ghost",
1105
+ size: "sm",
1106
+ onClick: () => N({ tag: "instructions" }),
1107
+ className: "mb-4",
1108
+ children: [
1109
+ /* @__PURE__ */ e(H, { className: "size-4 mr-1.5" }),
1110
+ "Back to Instructions"
1111
+ ]
1112
+ }
1113
+ ),
1114
+ /* @__PURE__ */ e(
1115
+ qe,
1116
+ {
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
1128
+ }
1129
+ )
1130
+ ]
1131
+ }
1132
+ );
1133
+ const { submission: c } = p;
1134
+ return /* @__PURE__ */ e(
1135
+ "div",
1136
+ {
1137
+ ref: C,
1138
+ tabIndex: -1,
1139
+ className: T("max-w-2xl mx-auto outline-none", n),
1140
+ style: g,
1141
+ children: /* @__PURE__ */ e(B, { children: /* @__PURE__ */ t(L, { className: "pt-8 pb-8", children: [
1142
+ /* @__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" }),
1145
+ /* @__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" })
1148
+ ] })
1149
+ ] }),
1150
+ f === "graded" && d && /* @__PURE__ */ t("div", { className: "text-center mb-6", children: [
1151
+ /* @__PURE__ */ e(
1152
+ ge,
1153
+ {
1154
+ percentage: o ? Math.round(d.score / o * 100) : 0,
1155
+ size: "large"
1156
+ }
1157
+ ),
1158
+ /* @__PURE__ */ t("p", { className: "text-sm text-muted-foreground mt-2", children: [
1159
+ d.score,
1160
+ "/",
1161
+ o,
1162
+ " points"
1163
+ ] }),
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" }),
1167
+ /* @__PURE__ */ e(
1168
+ ie,
1169
+ {
1170
+ criteria: l,
1171
+ selectedLevels: d.rubricLevels,
1172
+ totalScore: d.score,
1173
+ maxScore: S
1174
+ }
1175
+ )
1176
+ ] })
1177
+ ] }),
1178
+ /* @__PURE__ */ e(q, { className: "my-6" }),
1179
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-foreground mb-3", children: "What You Submitted" }),
1180
+ /* @__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 })
1184
+ ] }),
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" }),
1187
+ /* @__PURE__ */ t("span", { children: [
1188
+ c.files.length,
1189
+ " file",
1190
+ c.files.length !== 1 ? "s" : "",
1191
+ " uploaded"
1192
+ ] })
1193
+ ] }),
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 })
1197
+ ] })
1198
+ ] }),
1199
+ s && /* @__PURE__ */ e("div", { className: "text-center mt-8", children: /* @__PURE__ */ t(
1200
+ R,
1201
+ {
1202
+ variant: "outline",
1203
+ onClick: () => N({ tag: "work" }),
1204
+ children: [
1205
+ /* @__PURE__ */ e(ae, { className: "size-4 mr-2" }),
1206
+ "Edit Submission"
1207
+ ]
1208
+ }
1209
+ ) })
1210
+ ] }) })
1211
+ }
1212
+ );
1213
+ }
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
1228
+ }) {
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(
1239
+ "div",
1240
+ {
1241
+ ref: C,
1242
+ 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: [
1246
+ /* @__PURE__ */ t("div", { className: "text-center mb-6", children: [
1247
+ /* @__PURE__ */ e(
1248
+ ee,
1249
+ {
1250
+ value: f,
1251
+ size: 100,
1252
+ strokeWidth: 8,
1253
+ color: g ? "var(--success)" : "var(--primary)",
1254
+ className: "mx-auto mb-4 text-foreground"
1255
+ }
1256
+ ),
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` })
1259
+ ] }),
1260
+ /* @__PURE__ */ e(
1261
+ Ge,
1262
+ {
1263
+ requirements: i,
1264
+ onRequirementClick: d,
1265
+ className: "mb-6"
1266
+ }
1267
+ ),
1268
+ g && /* @__PURE__ */ e("div", { className: "text-center mt-6", children: /* @__PURE__ */ t(
1269
+ R,
1270
+ {
1271
+ size: "lg",
1272
+ onClick: () => N({ tag: "certificate" }),
1273
+ children: [
1274
+ /* @__PURE__ */ e(Pe, { className: "size-4 mr-2" }),
1275
+ "View Certificate"
1276
+ ]
1277
+ }
1278
+ ) })
1279
+ ] }) })
1280
+ }
1281
+ ) : /* @__PURE__ */ t(
1282
+ "div",
1283
+ {
1284
+ ref: C,
1285
+ tabIndex: -1,
1286
+ className: T("outline-none", x),
1287
+ style: n,
1288
+ children: [
1289
+ /* @__PURE__ */ t(
1290
+ R,
1291
+ {
1292
+ variant: "ghost",
1293
+ size: "sm",
1294
+ onClick: () => N({ tag: "requirements" }),
1295
+ className: "mb-4",
1296
+ children: [
1297
+ /* @__PURE__ */ e(H, { className: "size-4 mr-1.5" }),
1298
+ "Back to Requirements"
1299
+ ]
1300
+ }
1301
+ ),
1302
+ /* @__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" }) }),
1304
+ /* @__PURE__ */ e("h2", { className: "text-2xl font-bold text-foreground mb-2", children: "Congratulations!" }),
1305
+ /* @__PURE__ */ t("p", { className: "text-muted-foreground", children: [
1306
+ "You've completed all requirements for",
1307
+ " ",
1308
+ /* @__PURE__ */ e("span", { className: "font-medium text-foreground", children: u })
1309
+ ] })
1310
+ ] }),
1311
+ /* @__PURE__ */ e(
1312
+ Ve,
1313
+ {
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,
1321
+ showActions: !0
1322
+ }
1323
+ )
1324
+ ]
1325
+ }
1326
+ );
1327
+ }
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
1341
+ }) {
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;
1354
+ return /* @__PURE__ */ e(
1355
+ "div",
1356
+ {
1357
+ ref: S,
1358
+ tabIndex: -1,
1359
+ className: T("outline-none", v),
1360
+ style: x,
1361
+ children: n && s ? (
1362
+ /* ─── Thread View ─── */
1363
+ /* @__PURE__ */ t("div", { children: [
1364
+ /* @__PURE__ */ t(
1365
+ R,
1366
+ {
1367
+ variant: "ghost",
1368
+ size: "sm",
1369
+ onClick: z,
1370
+ className: "mb-4",
1371
+ children: [
1372
+ /* @__PURE__ */ e(H, { className: "size-4 mr-1.5" }),
1373
+ "Back to Topics"
1374
+ ]
1375
+ }
1376
+ ),
1377
+ /* @__PURE__ */ e(
1378
+ We,
1379
+ {
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
1388
+ }
1389
+ )
1390
+ ] })
1391
+ ) : (
1392
+ /* ─── Forum Board View ─── */
1393
+ /* @__PURE__ */ e(
1394
+ He,
1395
+ {
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
1406
+ }
1407
+ )
1408
+ )
1409
+ }
1410
+ );
1411
+ }
1412
+ 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
1422
+ };