@hydralms/components 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/dist/StudentProfile-BVfZMbnV.cjs +1 -0
  2. package/dist/StudentProfile-DeMxdrL3.js +3275 -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 +494 -444
  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 +3 -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 +1266 -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/AnnouncementFeed/AnnouncementFeed.d.ts +1 -1
  74. package/dist/sections/AnnouncementFeed/types.d.ts +15 -1
  75. package/dist/sections/AssessmentReview/AssessmentReview.d.ts +1 -1
  76. package/dist/sections/AssessmentReview/types.d.ts +6 -0
  77. package/dist/sections/AssignmentSubmission/AssignmentSubmission.d.ts +1 -1
  78. package/dist/sections/AssignmentSubmission/types.d.ts +6 -0
  79. package/dist/sections/CertificateViewer/CertificateViewer.d.ts +1 -1
  80. package/dist/sections/CertificateViewer/certificate-variants.d.ts +42 -0
  81. package/dist/sections/CertificateViewer/types.d.ts +6 -0
  82. package/dist/sections/CourseCatalog/CourseCatalog.d.ts +2 -0
  83. package/dist/sections/CourseCatalog/types.d.ts +80 -0
  84. package/dist/sections/CourseOutline/CourseOutline.d.ts +1 -1
  85. package/dist/sections/CourseOutline/types.d.ts +6 -0
  86. package/dist/sections/DiscussionThread/DiscussionThread.d.ts +1 -1
  87. package/dist/sections/DiscussionThread/types.d.ts +6 -0
  88. package/dist/sections/EnrollmentWizard/EnrollmentWizard.d.ts +2 -0
  89. package/dist/sections/EnrollmentWizard/types.d.ts +66 -0
  90. package/dist/sections/ExamSession/ExamSession.d.ts +1 -1
  91. package/dist/sections/ExamSession/types.d.ts +6 -0
  92. package/dist/sections/FlashcardStudySession/FlashcardStudySession.d.ts +1 -1
  93. package/dist/sections/FlashcardStudySession/types.d.ts +6 -0
  94. package/dist/sections/ForumBoard/ForumBoard.d.ts +1 -1
  95. package/dist/sections/ForumBoard/types.d.ts +14 -0
  96. package/dist/sections/GradebookTable/GradebookTable.d.ts +1 -1
  97. package/dist/sections/GradebookTable/types.d.ts +14 -0
  98. package/dist/sections/LecturePlayer/LecturePlayer.d.ts +1 -1
  99. package/dist/sections/LecturePlayer/types.d.ts +8 -0
  100. package/dist/sections/LessonPage/LessonPage.d.ts +1 -1
  101. package/dist/sections/LessonPage/types.d.ts +6 -0
  102. package/dist/sections/PracticeQuiz/PracticeQuiz.d.ts +1 -1
  103. package/dist/sections/PracticeQuiz/types.d.ts +6 -0
  104. package/dist/sections/ProgressDashboard/ProgressDashboard.d.ts +1 -1
  105. package/dist/sections/ProgressDashboard/types.d.ts +6 -0
  106. package/dist/sections/QuizSession/QuizSession.d.ts +1 -1
  107. package/dist/sections/QuizSession/types.d.ts +6 -0
  108. package/dist/sections/RequirementsChecklist/RequirementsChecklist.d.ts +1 -1
  109. package/dist/sections/RequirementsChecklist/types.d.ts +6 -0
  110. package/dist/sections/ResourceLibrary/ResourceLibrary.d.ts +1 -1
  111. package/dist/sections/ResourceLibrary/types.d.ts +15 -1
  112. package/dist/sections/RubricView/RubricView.d.ts +1 -1
  113. package/dist/sections/RubricView/types.d.ts +6 -0
  114. package/dist/sections/ScrollableQuiz/ScrollableQuiz.d.ts +1 -1
  115. package/dist/sections/ScrollableQuiz/types.d.ts +6 -0
  116. package/dist/sections/StudentProfile/StudentProfile.d.ts +2 -0
  117. package/dist/sections/StudentProfile/types.d.ts +98 -0
  118. package/dist/sections/SurveyForm/SurveyForm.d.ts +1 -1
  119. package/dist/sections/SurveyForm/types.d.ts +6 -0
  120. package/dist/sections/_shared/merge-answers.d.ts +9 -0
  121. package/dist/sections/_shared/section-shell.d.ts +20 -0
  122. package/dist/sections/_shared/use-assessment-session.d.ts +30 -0
  123. package/dist/sections/index.d.ts +6 -0
  124. package/dist/sections.cjs +1 -1
  125. package/dist/sections.js +268 -307
  126. package/dist/tabs-BsfVo2Bl.cjs +173 -0
  127. package/dist/{tabs-Wf3h_Cx3.js → tabs-BuY1iNJE.js} +7532 -6807
  128. package/dist/ui/badge.d.ts +1 -1
  129. package/dist/ui/index.d.ts +2 -0
  130. package/dist/ui/progress.d.ts +1 -1
  131. package/dist/ui/rich-text-editor.d.ts +3 -1
  132. package/dist/ui/toast.d.ts +43 -0
  133. package/dist/utils/debounce.d.ts +5 -1
  134. package/dist/utils/pick-palette-color.d.ts +19 -0
  135. package/dist/video/types.d.ts +15 -0
  136. package/dist/video/video-player.d.ts +1 -1
  137. package/dist/withProGate-BWqcKdPM.js +137 -0
  138. package/dist/withProGate-DX6XqKLp.cjs +1 -0
  139. package/package.json +34 -220
  140. package/src/assessment-toolbar/question-navigator.tsx +10 -5
  141. package/src/assessment-toolbar/timer-display.tsx +4 -3
  142. package/src/assessment-toolbar/use-countdown.ts +1 -1
  143. package/src/common/empty-state.tsx +1 -0
  144. package/src/common/index.ts +2 -0
  145. package/src/common/pagination.tsx +135 -0
  146. package/src/common/search-input.tsx +2 -1
  147. package/src/common/types.ts +2 -0
  148. package/src/content/attachment-list.tsx +2 -0
  149. package/src/content/audio-player.tsx +196 -0
  150. package/src/content/code-block.tsx +113 -0
  151. package/src/content/content-block.tsx +64 -0
  152. package/src/content/embed-block.tsx +78 -0
  153. package/src/content/file-upload-zone.tsx +10 -0
  154. package/src/content/index.ts +6 -0
  155. package/src/content/types.ts +5 -0
  156. package/src/curriculum/course-card.tsx +199 -0
  157. package/src/curriculum/curriculum-item.tsx +3 -3
  158. package/src/curriculum/curriculum-tree.tsx +20 -13
  159. package/src/curriculum/index.ts +2 -0
  160. package/src/curriculum/types.ts +2 -2
  161. package/src/flashcards/flashcard.tsx +28 -8
  162. package/src/index.ts +3 -0
  163. package/src/license/HydraContext.tsx +62 -0
  164. package/src/license/ProBadge.tsx +43 -0
  165. package/src/license/index.ts +7 -0
  166. package/src/license/tiers.ts +24 -0
  167. package/src/license/useHydraLicense.ts +10 -0
  168. package/src/license/validate.ts +90 -0
  169. package/src/license/withProGate.tsx +21 -0
  170. package/src/modules/AssignmentModule/AssignmentModule.tsx +17 -8
  171. package/src/modules/AssignmentModule/types.ts +5 -1
  172. package/src/modules/CertificateModule/CertificateModule.tsx +21 -9
  173. package/src/modules/CertificateModule/types.ts +6 -4
  174. package/src/modules/CourseCatalogModule/CourseCatalogModule.tsx +126 -0
  175. package/src/modules/CourseCatalogModule/types.ts +47 -0
  176. package/src/modules/CoursePlayer/CoursePlayer.tsx +37 -22
  177. package/src/modules/DiscussionModule/DiscussionModule.tsx +57 -22
  178. package/src/modules/ExamModule/ExamModule.tsx +64 -198
  179. package/src/modules/ExamModule/types.ts +5 -14
  180. package/src/modules/FlashcardLab/FlashcardLab.tsx +10 -5
  181. package/src/modules/FlashcardLab/types.ts +2 -0
  182. package/src/modules/GradeCenterModule/GradeCenterModule.tsx +7 -2
  183. package/src/modules/GradeCenterModule/types.ts +2 -0
  184. package/src/modules/QuizModule/QuizModule.tsx +49 -169
  185. package/src/modules/QuizModule/types.ts +5 -15
  186. package/src/modules/StudentDashboardModule/StudentDashboardModule.tsx +117 -0
  187. package/src/modules/StudentDashboardModule/types.ts +56 -0
  188. package/src/modules/StudentProfileModule/StudentProfileModule.tsx +289 -0
  189. package/src/modules/StudentProfileModule/types.ts +45 -0
  190. package/src/modules/SurveyModule/SurveyModule.tsx +9 -4
  191. package/src/modules/SurveyModule/types.ts +2 -0
  192. package/src/modules/_shared/assessment-intro.tsx +75 -0
  193. package/src/modules/_shared/assessment-results.tsx +133 -0
  194. package/src/modules/_shared/types.ts +11 -0
  195. package/src/modules/_shared/use-timer.ts +49 -0
  196. package/src/modules/index.ts +9 -0
  197. package/src/progress/achievement-badge.tsx +3 -3
  198. package/src/progress/grade-indicator.tsx +9 -1
  199. package/src/progress/progress-ring.tsx +2 -1
  200. package/src/progress/stat-card.tsx +8 -1
  201. package/src/progress/types.ts +2 -0
  202. package/src/provider/HydraProvider.tsx +15 -6
  203. package/src/questions/choice.tsx +13 -6
  204. package/src/questions/confidence-indicator.tsx +107 -0
  205. package/src/questions/essay.tsx +6 -4
  206. package/src/questions/fill-in-the-blank.tsx +8 -4
  207. package/src/questions/hotspot.tsx +4 -4
  208. package/src/questions/index.ts +2 -0
  209. package/src/questions/inline-choice.tsx +5 -4
  210. package/src/questions/matching.tsx +5 -4
  211. package/src/questions/multiple-choice.tsx +13 -6
  212. package/src/questions/numeric.tsx +8 -4
  213. package/src/questions/ordering.tsx +12 -4
  214. package/src/questions/question-renderer.tsx +3 -2
  215. package/src/questions/scenario.tsx +4 -4
  216. package/src/questions/spreadsheet.tsx +5 -4
  217. package/src/questions/true-false.tsx +13 -6
  218. package/src/sections/AnnouncementFeed/AnnouncementFeed.tsx +64 -8
  219. package/src/sections/AnnouncementFeed/types.ts +15 -1
  220. package/src/sections/AssessmentReview/AssessmentReview.tsx +37 -0
  221. package/src/sections/AssessmentReview/types.ts +6 -0
  222. package/src/sections/AssignmentSubmission/AssignmentSubmission.tsx +37 -1
  223. package/src/sections/AssignmentSubmission/types.ts +6 -0
  224. package/src/sections/CertificateViewer/CertificateViewer.tsx +29 -227
  225. package/src/sections/CertificateViewer/certificate-variants.tsx +170 -0
  226. package/src/sections/CertificateViewer/types.ts +6 -0
  227. package/src/sections/CourseCatalog/CourseCatalog.tsx +220 -0
  228. package/src/sections/CourseCatalog/types.ts +76 -0
  229. package/src/sections/CourseOutline/CourseOutline.tsx +41 -0
  230. package/src/sections/CourseOutline/types.ts +6 -0
  231. package/src/sections/DiscussionThread/DiscussionThread.tsx +42 -1
  232. package/src/sections/DiscussionThread/types.ts +6 -0
  233. package/src/sections/EnrollmentWizard/EnrollmentWizard.tsx +343 -0
  234. package/src/sections/EnrollmentWizard/types.ts +65 -0
  235. package/src/sections/ExamSession/ExamSession.tsx +100 -94
  236. package/src/sections/ExamSession/types.ts +6 -0
  237. package/src/sections/FlashcardStudySession/FlashcardStudySession.tsx +53 -36
  238. package/src/sections/FlashcardStudySession/types.ts +6 -0
  239. package/src/sections/ForumBoard/ForumBoard.tsx +59 -1
  240. package/src/sections/ForumBoard/types.ts +14 -0
  241. package/src/sections/GradebookTable/GradebookTable.tsx +54 -1
  242. package/src/sections/GradebookTable/types.ts +14 -0
  243. package/src/sections/LecturePlayer/LecturePlayer.tsx +63 -37
  244. package/src/sections/LecturePlayer/types.ts +8 -0
  245. package/src/sections/LessonPage/LessonPage.tsx +36 -5
  246. package/src/sections/LessonPage/types.ts +6 -0
  247. package/src/sections/PracticeQuiz/PracticeQuiz.tsx +106 -74
  248. package/src/sections/PracticeQuiz/types.ts +6 -0
  249. package/src/sections/ProgressDashboard/ProgressDashboard.tsx +64 -10
  250. package/src/sections/ProgressDashboard/types.ts +6 -0
  251. package/src/sections/QuizSession/QuizSession.tsx +71 -82
  252. package/src/sections/QuizSession/types.ts +6 -0
  253. package/src/sections/RequirementsChecklist/RequirementsChecklist.tsx +41 -1
  254. package/src/sections/RequirementsChecklist/types.ts +6 -0
  255. package/src/sections/ResourceLibrary/ResourceLibrary.tsx +64 -8
  256. package/src/sections/ResourceLibrary/types.ts +15 -1
  257. package/src/sections/RubricView/RubricView.tsx +37 -1
  258. package/src/sections/RubricView/types.ts +6 -0
  259. package/src/sections/ScrollableQuiz/ScrollableQuiz.tsx +36 -15
  260. package/src/sections/ScrollableQuiz/types.ts +6 -0
  261. package/src/sections/StudentProfile/StudentProfile.tsx +279 -0
  262. package/src/sections/StudentProfile/types.ts +99 -0
  263. package/src/sections/SurveyForm/SurveyForm.tsx +32 -5
  264. package/src/sections/SurveyForm/types.ts +6 -0
  265. package/src/sections/_shared/merge-answers.ts +22 -0
  266. package/src/sections/_shared/section-shell.tsx +64 -0
  267. package/src/sections/_shared/use-assessment-session.ts +125 -0
  268. package/src/sections/index.ts +22 -0
  269. package/src/social/user-avatar.tsx +9 -5
  270. package/src/styles/globals.css +39 -41
  271. package/src/ui/badge.tsx +8 -0
  272. package/src/ui/index.ts +2 -0
  273. package/src/ui/progress.tsx +4 -0
  274. package/src/ui/rich-text-editor.tsx +10 -0
  275. package/src/ui/rich-text-toolbar.tsx +2 -1
  276. package/src/ui/toast.tsx +170 -0
  277. package/src/utils/debounce.ts +8 -2
  278. package/src/utils/pick-palette-color.ts +33 -0
  279. package/src/video/types.ts +16 -0
  280. package/src/video/video-player.tsx +13 -1
  281. package/dist/ForumBoard-CHXU3mjC.js +0 -2207
  282. package/dist/ForumBoard-d1w5-r6n.cjs +0 -1
  283. package/dist/tabs-DRM2Iq_J.cjs +0 -172
package/dist/index.js CHANGED
@@ -1,74 +1,139 @@
1
- import { c as l, f as D, a as z, P, b as H, B as A } from "./tabs-Wf3h_Cx3.js";
2
- import { A as ye, d as we, e as De, g as ze, h as Ce, i as Te, j as Ae, k as Ie, l as je, m as ke, n as Fe, o as Be, p as Re, q as Ve, r as Pe, s as He, t as Me, u as Ee, C as Le, v as Qe, w as $e, x as Ke, y as qe, z as Ge, D as Ue, E as We, F as Je, G as Xe, H as Ze, I as Ye, J as _e, K as Oe, L as Se, M as et, N as tt, O as rt, Q as at, R as st, S as it, T as nt, U as lt, V as ot, W as dt, X as ct, Y as ut, Z as mt, _ as ft, $ as xt, a0 as pt, a1 as gt, a2 as ht, a3 as bt, a4 as vt, a5 as Nt, a6 as yt, a7 as wt, a8 as Dt, a9 as zt, aa as Ct, ab as Tt, ac as At, ad as It, ae as jt, af as kt, ag as Ft, ah as Bt, ai as Rt, aj as Vt, ak as Pt, al as Ht, am as Mt, an as Et, ao as Lt, ap as Qt, aq as $t, ar as Kt, as as qt, at as Gt, au as Ut, av as Wt, aw as Jt, ax as Xt, ay as Zt, az as Yt, aA as _t, aB as Ot, aC as St, aD as er, aE as tr, aF as rr, aG as ar, aH as sr, aI as ir, aJ as nr, aK as lr, aL as or, aM as dr, aN as cr, aO as ur, aP as mr, aQ as fr, aR as xr, aS as pr } from "./tabs-Wf3h_Cx3.js";
3
- import { jsxs as f, jsx as e } from "react/jsx-runtime";
4
- import { Clock as M, Play as N, Video as E, Bookmark as L, Pencil as Q, Trash2 as $, CheckCircle2 as K, Circle as q, Download as G, X as U, Image as W, Film as J, Music as X, FileText as Z, Archive as Y, File as _, Check as O } from "lucide-react";
5
- import { useRef as h, useMemo as I, useEffect as j, memo as k, useState as S, useCallback as b } from "react";
6
- const ie = ({
7
- entries: t,
8
- currentTime: a = 0,
9
- onSeek: r,
10
- readOnly: n = !1,
1
+ import { c, f as C, a as D, P as F } from "./tabs-BuY1iNJE.js";
2
+ import { A as Me, b as Re, d as ke, e as Le, g as Fe, h as Ee, i as He, j as Qe, k as $e, l as Ge, m as Ke, n as Ue, o as _e, p as qe, q as Oe, r as Xe, s as Ze, t as Je, u as Ye, B as We, v as Se, C as ea, w as aa, x as ta, y as ra, z as sa, D as ia, E as na, F as oa, G as la, H as da, I as ca, J as ua, K as ma, L as fa, M as pa, N as ga, O as ba, Q as xa, R as va, S as ha, T as ya, U as Na, V as wa, W as Ca, X as Da, Y as Ta, Z as za, _ as Aa, $ as Ia, a0 as Pa, a1 as Ba, a2 as Va, a3 as ja, a4 as Ma, a5 as Ra, a6 as ka, a7 as La, a8 as Fa, a9 as Ea, aa as Ha, ab as Qa, ac as $a, ad as Ga, ae as Ka, af as Ua, ag as _a, ah as qa, ai as Oa, aj as Xa, ak as Za, al as Ja, am as Ya, an as Wa, ao as Sa, ap as et, aq as at, ar as tt, as as rt, at as st, au as it, av as nt, aw as ot, ax as lt, ay as dt, az as ct, aA as ut, aB as mt, aC as ft, aD as pt, aE as gt, aF as bt, aG as xt, aH as vt, aI as ht, aJ as yt, aK as Nt, aL as wt, aM as Ct, aN as Dt, aO as Tt, aP as zt, aQ as At, aR as It, aS as Pt, aT as Bt, aU as Vt, aV as jt, aW as Mt, aX as Rt, aY as kt, aZ as Lt } from "./tabs-BuY1iNJE.js";
3
+ import { jsx as e, jsxs as f } from "react/jsx-runtime";
4
+ import { memo as T, useRef as v, useMemo as P, useEffect as z, useState as B, useCallback as x, useContext as E, createContext as H } from "react";
5
+ import { HelpCircle as Q, Brain as $, Lightbulb as G, Clock as K, Play as y, Video as U, Bookmark as _, Pencil as q, Trash2 as O, CheckCircle2 as V, Circle as X, Info as Z, AlertTriangle as J, AlertCircle as Y, X as W } from "lucide-react";
6
+ import { H as S } from "./withProGate-BWqcKdPM.js";
7
+ import { a as Et, P as Ht, u as Qt, w as $t } from "./withProGate-BWqcKdPM.js";
8
+ import { createPortal as ee } from "react-dom";
9
+ import { cva as ae } from "class-variance-authority";
10
+ const te = [
11
+ {
12
+ value: "low",
13
+ label: "Guessing",
14
+ icon: /* @__PURE__ */ e(Q, { className: "size-3.5" })
15
+ },
16
+ {
17
+ value: "medium",
18
+ label: "Somewhat sure",
19
+ icon: /* @__PURE__ */ e($, { className: "size-3.5" })
20
+ },
21
+ {
22
+ value: "high",
23
+ label: "Confident",
24
+ icon: /* @__PURE__ */ e(G, { className: "size-3.5" })
25
+ }
26
+ ], be = T(function({
27
+ value: r,
28
+ onChange: t,
29
+ levels: i = te,
30
+ disabled: o = !1,
31
+ readOnly: l = !1,
32
+ className: s,
33
+ style: n
34
+ }) {
35
+ const u = o || l;
36
+ return /* @__PURE__ */ e(
37
+ "div",
38
+ {
39
+ "data-slot": "confidence-indicator",
40
+ className: c("flex items-center gap-1", s),
41
+ style: n,
42
+ role: "radiogroup",
43
+ "aria-label": "Confidence level",
44
+ children: i.map((m) => {
45
+ const d = r === m.value;
46
+ return /* @__PURE__ */ f(
47
+ "button",
48
+ {
49
+ type: "button",
50
+ role: "radio",
51
+ "aria-checked": d,
52
+ "aria-label": m.label,
53
+ disabled: u,
54
+ onClick: () => t(m.value),
55
+ className: c(
56
+ "inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium transition-all",
57
+ "border outline-none focus-visible:ring-2 focus-visible:ring-ring/50",
58
+ d ? "border-primary bg-primary/10 text-primary" : "border-transparent bg-muted text-muted-foreground hover:bg-muted/80",
59
+ u && "opacity-50 pointer-events-none"
60
+ ),
61
+ children: [
62
+ m.icon,
63
+ m.label
64
+ ]
65
+ },
66
+ m.value
67
+ );
68
+ })
69
+ }
70
+ );
71
+ }), xe = ({
72
+ entries: a,
73
+ currentTime: r = 0,
74
+ onSeek: t,
75
+ readOnly: i = !1,
11
76
  maxHeight: o = "400px",
12
- className: c,
77
+ className: l,
13
78
  style: s
14
79
  }) => {
15
- const i = h(null), u = h(null), x = I(
16
- () => t.reduce((d, p, m) => p.time <= a ? m : d, -1),
17
- [t, a]
80
+ const n = v(null), u = v(null), m = P(
81
+ () => a.reduce((d, b, p) => b.time <= r ? p : d, -1),
82
+ [a, r]
18
83
  );
19
- return j(() => {
20
- u.current && i.current && u.current.scrollIntoView({
84
+ return z(() => {
85
+ u.current && n.current && u.current.scrollIntoView({
21
86
  behavior: "smooth",
22
87
  block: "nearest"
23
88
  });
24
- }, [x]), t.length === 0 ? /* @__PURE__ */ f(
89
+ }, [m]), a.length === 0 ? /* @__PURE__ */ f(
25
90
  "div",
26
91
  {
27
- className: l(
92
+ className: c(
28
93
  "flex flex-col items-center justify-center gap-2 rounded-md border border-border bg-muted p-6",
29
- c
94
+ l
30
95
  ),
31
96
  style: s,
32
97
  children: [
33
- /* @__PURE__ */ e(M, { size: 20, className: "text-muted-foreground" }),
98
+ /* @__PURE__ */ e(K, { size: 20, className: "text-muted-foreground" }),
34
99
  /* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground", children: "No transcript available" })
35
100
  ]
36
101
  }
37
102
  ) : /* @__PURE__ */ e(
38
103
  "div",
39
104
  {
40
- ref: i,
41
- className: l(
105
+ ref: n,
106
+ className: c(
42
107
  "overflow-y-auto rounded-md border border-border",
43
- c
108
+ l
44
109
  ),
45
110
  style: { maxHeight: o, ...s },
46
- children: t.map((d, p) => {
47
- const m = p === x;
111
+ children: a.map((d, b) => {
112
+ const p = b === m;
48
113
  return /* @__PURE__ */ f(
49
114
  "div",
50
115
  {
51
- ref: m ? u : void 0,
52
- className: l(
116
+ ref: p ? u : void 0,
117
+ className: c(
53
118
  "flex gap-3 px-3 py-2 text-sm transition-colors",
54
- m && "bg-primary/10",
55
- !n && r && "cursor-pointer hover:bg-muted"
119
+ p && "bg-primary/10",
120
+ !i && t && "cursor-pointer hover:bg-muted"
56
121
  ),
57
- onClick: () => !n && (r == null ? void 0 : r(d.time)),
58
- role: !n && r ? "button" : void 0,
59
- tabIndex: !n && r ? 0 : void 0,
60
- onKeyDown: !n && r ? (g) => {
61
- (g.key === "Enter" || g.key === " ") && (g.preventDefault(), r(d.time));
122
+ onClick: () => !i && (t == null ? void 0 : t(d.time)),
123
+ role: !i && t ? "button" : void 0,
124
+ tabIndex: !i && t ? 0 : void 0,
125
+ onKeyDown: !i && t ? (g) => {
126
+ (g.key === "Enter" || g.key === " ") && (g.preventDefault(), t(d.time));
62
127
  } : void 0,
63
128
  children: [
64
129
  /* @__PURE__ */ e(
65
130
  "span",
66
131
  {
67
- className: l(
132
+ className: c(
68
133
  "shrink-0 font-mono text-xs tabular-nums pt-0.5",
69
- m ? "text-primary font-medium" : "text-muted-foreground"
134
+ p ? "text-primary font-medium" : "text-muted-foreground"
70
135
  ),
71
- children: D(Math.floor(d.time))
136
+ children: C(Math.floor(d.time))
72
137
  }
73
138
  ),
74
139
  /* @__PURE__ */ f("div", { className: "min-w-0", children: [
@@ -79,7 +144,7 @@ const ie = ({
79
144
  /* @__PURE__ */ e(
80
145
  "span",
81
146
  {
82
- className: m ? "text-foreground" : "text-muted-foreground",
147
+ className: p ? "text-foreground" : "text-muted-foreground",
83
148
  children: d.text
84
149
  }
85
150
  )
@@ -91,40 +156,40 @@ const ie = ({
91
156
  })
92
157
  }
93
158
  );
94
- }, ne = ({
95
- chapters: t,
96
- currentTime: a = 0,
97
- onSeek: r,
98
- className: n,
159
+ }, ve = ({
160
+ chapters: a,
161
+ currentTime: r = 0,
162
+ onSeek: t,
163
+ className: i,
99
164
  style: o
100
165
  }) => {
101
- const c = I(
102
- () => t.reduce((s, i, u) => i.time <= a ? u : s, -1),
103
- [t, a]
166
+ const l = P(
167
+ () => a.reduce((s, n, u) => n.time <= r ? u : s, -1),
168
+ [a, r]
104
169
  );
105
170
  return /* @__PURE__ */ e(
106
171
  "div",
107
172
  {
108
- className: l(
173
+ className: c(
109
174
  "divide-y divide-border rounded-md border border-border",
110
- n
175
+ i
111
176
  ),
112
177
  style: o,
113
- children: t.map((s, i) => {
114
- const u = i === c;
178
+ children: a.map((s, n) => {
179
+ const u = n === l;
115
180
  return /* @__PURE__ */ f(
116
181
  "div",
117
182
  {
118
- className: l(
183
+ className: c(
119
184
  "flex items-center gap-3 p-3 transition-colors",
120
185
  u && "bg-primary/10",
121
- r && "cursor-pointer hover:bg-muted"
186
+ t && "cursor-pointer hover:bg-muted"
122
187
  ),
123
- onClick: () => r == null ? void 0 : r(s.time),
124
- role: r ? "button" : void 0,
125
- tabIndex: r ? 0 : void 0,
126
- onKeyDown: r ? (x) => {
127
- (x.key === "Enter" || x.key === " ") && (x.preventDefault(), r(s.time));
188
+ onClick: () => t == null ? void 0 : t(s.time),
189
+ role: t ? "button" : void 0,
190
+ tabIndex: t ? 0 : void 0,
191
+ onKeyDown: t ? (m) => {
192
+ (m.key === "Enter" || m.key === " ") && (m.preventDefault(), t(s.time));
128
193
  } : void 0,
129
194
  children: [
130
195
  s.thumbnail ? /* @__PURE__ */ f(
@@ -142,24 +207,24 @@ const ie = ({
142
207
  className: "size-full object-cover"
143
208
  }
144
209
  ),
145
- u && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center bg-black/40", children: /* @__PURE__ */ e(N, { size: 14, className: "ml-px text-white" }) })
210
+ u && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center bg-black/40", children: /* @__PURE__ */ e(y, { size: 14, className: "ml-px text-white" }) })
146
211
  ]
147
212
  }
148
213
  ) : /* @__PURE__ */ e(
149
214
  "div",
150
215
  {
151
- className: l(
216
+ className: c(
152
217
  "flex shrink-0 items-center justify-center size-8 rounded-full",
153
218
  u ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground"
154
219
  ),
155
- children: /* @__PURE__ */ e("span", { className: "text-xs font-semibold", children: i + 1 })
220
+ children: /* @__PURE__ */ e("span", { className: "text-xs font-semibold", children: n + 1 })
156
221
  }
157
222
  ),
158
223
  /* @__PURE__ */ f("div", { className: "min-w-0 flex-1", children: [
159
224
  /* @__PURE__ */ e(
160
225
  "div",
161
226
  {
162
- className: l(
227
+ className: c(
163
228
  "truncate text-sm font-medium",
164
229
  u ? "text-primary" : "text-foreground"
165
230
  ),
@@ -167,8 +232,8 @@ const ie = ({
167
232
  }
168
233
  ),
169
234
  /* @__PURE__ */ f("div", { className: "mt-0.5 flex items-center gap-2", children: [
170
- /* @__PURE__ */ e("span", { className: "font-mono text-xs tabular-nums text-muted-foreground", children: D(Math.floor(s.time)) }),
171
- s.duration != null && s.duration > 0 && /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: z(s.duration) })
235
+ /* @__PURE__ */ e("span", { className: "font-mono text-xs tabular-nums text-muted-foreground", children: C(Math.floor(s.time)) }),
236
+ s.duration != null && s.duration > 0 && /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: D(s.duration) })
172
237
  ] })
173
238
  ] })
174
239
  ]
@@ -178,144 +243,144 @@ const ie = ({
178
243
  })
179
244
  }
180
245
  );
181
- }, le = ({
182
- poster: t,
183
- title: a,
184
- duration: r,
185
- progress: n,
246
+ }, he = ({
247
+ poster: a,
248
+ title: r,
249
+ duration: t,
250
+ progress: i,
186
251
  onClick: o,
187
- className: c,
252
+ className: l,
188
253
  style: s
189
254
  }) => /* @__PURE__ */ f(
190
255
  "div",
191
256
  {
192
- className: l(
257
+ className: c(
193
258
  "group overflow-hidden rounded-lg border border-border transition-colors",
194
259
  o && "cursor-pointer hover:border-primary/50 hover:shadow-sm",
195
- c
260
+ l
196
261
  ),
197
262
  style: s,
198
263
  onClick: o,
199
264
  role: o ? "button" : void 0,
200
265
  tabIndex: o ? 0 : void 0,
201
- onKeyDown: o ? (i) => {
202
- (i.key === "Enter" || i.key === " ") && (i.preventDefault(), o());
266
+ onKeyDown: o ? (n) => {
267
+ (n.key === "Enter" || n.key === " ") && (n.preventDefault(), o());
203
268
  } : void 0,
204
269
  children: [
205
270
  /* @__PURE__ */ f("div", { className: "relative overflow-hidden", style: { aspectRatio: "16/9" }, children: [
206
- t ? /* @__PURE__ */ e(
271
+ a ? /* @__PURE__ */ e(
207
272
  "img",
208
273
  {
209
- src: t,
210
- alt: a,
274
+ src: a,
275
+ alt: r,
211
276
  loading: "lazy",
212
277
  className: "size-full object-cover transition-transform duration-300 group-hover:scale-105"
213
278
  }
214
- ) : /* @__PURE__ */ e("div", { className: "flex size-full items-center justify-center bg-muted", children: /* @__PURE__ */ e(E, { size: 32, className: "text-muted-foreground" }) }),
215
- /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center bg-black/0 transition-colors group-hover:bg-black/20", children: /* @__PURE__ */ e("div", { className: "flex size-10 items-center justify-center rounded-full bg-black/60 opacity-0 transition-opacity group-hover:opacity-100", children: /* @__PURE__ */ e(N, { size: 20, className: "ml-0.5 text-white" }) }) }),
216
- r != null && r > 0 && /* @__PURE__ */ e("span", { className: "absolute bottom-2 right-2 rounded bg-black/75 px-1.5 py-0.5 text-xs font-medium tabular-nums text-white", children: z(r) })
279
+ ) : /* @__PURE__ */ e("div", { className: "flex size-full items-center justify-center bg-muted", children: /* @__PURE__ */ e(U, { size: 32, className: "text-muted-foreground" }) }),
280
+ /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center bg-black/0 transition-colors group-hover:bg-black/20", children: /* @__PURE__ */ e("div", { className: "flex size-10 items-center justify-center rounded-full bg-black/60 opacity-0 transition-opacity group-hover:opacity-100", children: /* @__PURE__ */ e(y, { size: 20, className: "ml-0.5 text-white" }) }) }),
281
+ t != null && t > 0 && /* @__PURE__ */ e("span", { className: "absolute bottom-2 right-2 rounded bg-black/75 px-1.5 py-0.5 text-xs font-medium tabular-nums text-white", children: D(t) })
217
282
  ] }),
218
- /* @__PURE__ */ e("div", { className: "p-3", children: /* @__PURE__ */ e("h4", { className: "truncate text-sm font-medium text-foreground", children: a }) }),
219
- n != null && n >= 0 && /* @__PURE__ */ e("div", { className: "px-3 pb-3", children: /* @__PURE__ */ e(
220
- P,
283
+ /* @__PURE__ */ e("div", { className: "p-3", children: /* @__PURE__ */ e("h4", { className: "truncate text-sm font-medium text-foreground", children: r }) }),
284
+ i != null && i >= 0 && /* @__PURE__ */ e("div", { className: "px-3 pb-3", children: /* @__PURE__ */ e(
285
+ F,
221
286
  {
222
- value: n,
287
+ value: i,
223
288
  size: "sm",
224
- variant: n >= 100 ? "success" : "default"
289
+ variant: i >= 100 ? "success" : "default"
225
290
  }
226
291
  ) })
227
292
  ]
228
293
  }
229
- ), oe = k(function({
230
- bookmark: a,
231
- onSeek: r,
232
- onDelete: n,
294
+ ), ye = T(function({
295
+ bookmark: r,
296
+ onSeek: t,
297
+ onDelete: i,
233
298
  onEdit: o,
234
- className: c,
299
+ className: l,
235
300
  style: s
236
301
  }) {
237
302
  return /* @__PURE__ */ f(
238
303
  "div",
239
304
  {
240
- className: l(
305
+ className: c(
241
306
  "flex items-start gap-3 rounded-md border border-border p-3",
242
- c
307
+ l
243
308
  ),
244
309
  style: s,
245
310
  children: [
246
- /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center justify-center size-8 rounded-full bg-primary/10 text-primary", children: /* @__PURE__ */ e(L, { size: 16 }) }),
311
+ /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center justify-center size-8 rounded-full bg-primary/10 text-primary", children: /* @__PURE__ */ e(_, { size: 16 }) }),
247
312
  /* @__PURE__ */ f("div", { className: "min-w-0 flex-1", children: [
248
313
  /* @__PURE__ */ e(
249
314
  "button",
250
315
  {
251
316
  type: "button",
252
- className: l(
317
+ className: c(
253
318
  "font-mono text-xs font-medium tabular-nums",
254
- r ? "cursor-pointer text-primary hover:underline" : "text-muted-foreground"
319
+ t ? "cursor-pointer text-primary hover:underline" : "text-muted-foreground"
255
320
  ),
256
- onClick: () => r == null ? void 0 : r(a.time),
257
- disabled: !r,
258
- children: D(Math.floor(a.time))
321
+ onClick: () => t == null ? void 0 : t(r.time),
322
+ disabled: !t,
323
+ children: C(Math.floor(r.time))
259
324
  }
260
325
  ),
261
- a.note && /* @__PURE__ */ e("p", { className: "mt-0.5 text-sm text-foreground", children: a.note }),
262
- a.createdAt && /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: new Date(a.createdAt).toLocaleDateString() })
326
+ r.note && /* @__PURE__ */ e("p", { className: "mt-0.5 text-sm text-foreground", children: r.note }),
327
+ r.createdAt && /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: new Date(r.createdAt).toLocaleDateString() })
263
328
  ] }),
264
- (o || n) && /* @__PURE__ */ f("div", { className: "flex shrink-0 items-center gap-1", children: [
329
+ (o || i) && /* @__PURE__ */ f("div", { className: "flex shrink-0 items-center gap-1", children: [
265
330
  o && /* @__PURE__ */ e(
266
331
  "button",
267
332
  {
268
333
  type: "button",
269
334
  className: "inline-flex items-center justify-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
270
335
  "aria-label": "Edit bookmark",
271
- onClick: () => o(a.id),
272
- children: /* @__PURE__ */ e(Q, { size: 14 })
336
+ onClick: () => o(r.id),
337
+ children: /* @__PURE__ */ e(q, { size: 14 })
273
338
  }
274
339
  ),
275
- n && /* @__PURE__ */ e(
340
+ i && /* @__PURE__ */ e(
276
341
  "button",
277
342
  {
278
343
  type: "button",
279
344
  className: "inline-flex items-center justify-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive",
280
345
  "aria-label": "Delete bookmark",
281
- onClick: () => n(a.id),
282
- children: /* @__PURE__ */ e($, { size: 14 })
346
+ onClick: () => i(r.id),
347
+ children: /* @__PURE__ */ e(O, { size: 14 })
283
348
  }
284
349
  )
285
350
  ] })
286
351
  ]
287
352
  }
288
353
  );
289
- }), de = k(function({
290
- thumbnail: a,
291
- title: r,
292
- duration: n,
354
+ }), Ne = T(function({
355
+ thumbnail: r,
356
+ title: t,
357
+ duration: i,
293
358
  status: o = "unwatched",
294
- isActive: c = !1,
359
+ isActive: l = !1,
295
360
  index: s,
296
- onClick: i,
361
+ onClick: n,
297
362
  className: u,
298
- style: x
363
+ style: m
299
364
  }) {
300
365
  return /* @__PURE__ */ f(
301
366
  "div",
302
367
  {
303
- className: l(
368
+ className: c(
304
369
  "flex items-center gap-3 rounded-md px-3 py-2 transition-colors",
305
- c && "bg-primary/10",
306
- i && "cursor-pointer hover:bg-muted",
370
+ l && "bg-primary/10",
371
+ n && "cursor-pointer hover:bg-muted",
307
372
  u
308
373
  ),
309
- style: x,
310
- onClick: i,
311
- role: i ? "button" : void 0,
312
- tabIndex: i ? 0 : void 0,
313
- onKeyDown: i ? (d) => {
314
- (d.key === "Enter" || d.key === " ") && (d.preventDefault(), i());
374
+ style: m,
375
+ onClick: n,
376
+ role: n ? "button" : void 0,
377
+ tabIndex: n ? 0 : void 0,
378
+ onKeyDown: n ? (d) => {
379
+ (d.key === "Enter" || d.key === " ") && (d.preventDefault(), n());
315
380
  } : void 0,
316
381
  children: [
317
- /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center justify-center size-6", children: o === "completed" ? /* @__PURE__ */ e("span", { className: "text-success", children: /* @__PURE__ */ e(K, { size: 18 }) }) : c ? /* @__PURE__ */ e("span", { className: "text-primary", children: /* @__PURE__ */ e(N, { size: 16, className: "ml-px" }) }) : s != null ? /* @__PURE__ */ e("span", { className: "text-xs font-medium tabular-nums text-muted-foreground", children: s }) : /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: /* @__PURE__ */ e(q, { size: 16 }) }) }),
318
- a && /* @__PURE__ */ f(
382
+ /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center justify-center size-6", children: o === "completed" ? /* @__PURE__ */ e("span", { className: "text-success", children: /* @__PURE__ */ e(V, { size: 18 }) }) : l ? /* @__PURE__ */ e("span", { className: "text-primary", children: /* @__PURE__ */ e(y, { size: 16, className: "ml-px" }) }) : s != null ? /* @__PURE__ */ e("span", { className: "text-xs font-medium tabular-nums text-muted-foreground", children: s }) : /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: /* @__PURE__ */ e(X, { size: 16 }) }) }),
383
+ r && /* @__PURE__ */ f(
319
384
  "div",
320
385
  {
321
386
  className: "relative shrink-0 w-16 overflow-hidden rounded",
@@ -324,16 +389,16 @@ const ie = ({
324
389
  /* @__PURE__ */ e(
325
390
  "img",
326
391
  {
327
- src: a,
328
- alt: r,
392
+ src: r,
393
+ alt: t,
329
394
  loading: "lazy",
330
- className: l(
395
+ className: c(
331
396
  "size-full object-cover",
332
397
  o === "completed" && "opacity-60"
333
398
  )
334
399
  }
335
400
  ),
336
- c && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center bg-black/40", children: /* @__PURE__ */ e(N, { size: 12, className: "ml-px text-white" }) })
401
+ l && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center bg-black/40", children: /* @__PURE__ */ e(y, { size: 12, className: "ml-px text-white" }) })
337
402
  ]
338
403
  }
339
404
  ),
@@ -341,390 +406,375 @@ const ie = ({
341
406
  /* @__PURE__ */ e(
342
407
  "div",
343
408
  {
344
- className: l(
409
+ className: c(
345
410
  "truncate text-sm",
346
- c ? "font-medium text-primary" : "text-foreground",
347
- o === "completed" && !c && "text-muted-foreground"
411
+ l ? "font-medium text-primary" : "text-foreground",
412
+ o === "completed" && !l && "text-muted-foreground"
348
413
  ),
349
- children: r
414
+ children: t
350
415
  }
351
416
  ),
352
- n != null && n > 0 && /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: z(n) })
417
+ i != null && i > 0 && /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: D(i) })
353
418
  ] })
354
419
  ]
355
420
  }
356
421
  );
357
422
  });
358
- function ee(t) {
359
- return t.startsWith("image/") ? W : t.startsWith("video/") ? J : t.startsWith("audio/") ? X : t === "application/pdf" ? Z : t === "application/zip" || t === "application/x-rar-compressed" || t === "application/gzip" ? Y : _;
360
- }
361
- function ce({
362
- files: t,
363
- onDownload: a,
364
- onRemove: r,
365
- readOnly: n = !0,
366
- className: o,
367
- style: c
368
- }) {
369
- return t.length === 0 ? null : /* @__PURE__ */ e("div", { className: l("flex flex-col gap-1", o), style: c, children: t.map((s, i) => {
370
- const u = ee(s.type);
371
- return /* @__PURE__ */ f(
372
- "div",
373
- {
374
- className: "flex items-center gap-3 rounded-md px-2 py-1.5 hover:bg-muted/50 transition-colors",
375
- children: [
376
- /* @__PURE__ */ e("span", { className: "shrink-0 text-muted-foreground", children: /* @__PURE__ */ e(u, { size: 18 }) }),
377
- /* @__PURE__ */ f("div", { className: "flex-1 min-w-0", children: [
378
- /* @__PURE__ */ e("span", { className: "text-sm text-foreground block truncate", children: s.name }),
379
- /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: H(s.size) })
380
- ] }),
381
- a && s.url && /* @__PURE__ */ e(
382
- A,
383
- {
384
- variant: "ghost",
385
- size: "sm",
386
- className: "shrink-0 h-7 w-7 p-0",
387
- onClick: () => a(s),
388
- children: /* @__PURE__ */ e(G, { size: 14 })
389
- }
390
- ),
391
- !n && r && /* @__PURE__ */ e(
392
- A,
393
- {
394
- variant: "ghost",
395
- size: "sm",
396
- className: "shrink-0 h-7 w-7 p-0 text-muted-foreground hover:text-destructive",
397
- onClick: () => r(s),
398
- children: /* @__PURE__ */ e(U, { size: 14 })
399
- }
400
- )
401
- ]
402
- },
403
- `${s.name}-${i}`
404
- );
405
- }) });
406
- }
407
- function ue({
408
- durationSeconds: t,
409
- warningThresholdSeconds: a = 60,
410
- onExpire: r,
411
- onWarning: n,
423
+ function we({
424
+ durationSeconds: a,
425
+ warningThresholdSeconds: r = 60,
426
+ onExpire: t,
427
+ onWarning: i,
412
428
  autoStart: o = !1
413
429
  }) {
414
- const [c, s] = S(t), i = h(o ? "running" : "idle"), u = h(null), x = h(r), d = h(n), p = h(!1);
415
- x.current = r, d.current = n;
416
- const m = b(() => {
430
+ const [l, s] = B(a), n = v(o ? "running" : "idle"), u = v(null), m = v(t), d = v(i), b = v(!1);
431
+ m.current = t, d.current = i;
432
+ const p = x(() => {
417
433
  u.current != null && (clearInterval(u.current), u.current = null);
418
- }, []), g = b(() => {
419
- m(), u.current = setInterval(() => {
434
+ }, []), g = x(() => {
435
+ p(), u.current = setInterval(() => {
420
436
  s((w) => {
421
- var C, T;
422
- const v = w - 1;
423
- return !p.current && v <= a && v > 0 && (p.current = !0, (C = d.current) == null || C.call(d)), v <= 0 ? (m(), i.current = "expired", (T = x.current) == null || T.call(x), 0) : v;
437
+ var A, I;
438
+ const h = w - 1;
439
+ return !b.current && h <= r && h > 0 && (b.current = !0, (A = d.current) == null || A.call(d)), h <= 0 ? (p(), n.current = "expired", (I = m.current) == null || I.call(m), 0) : h;
424
440
  });
425
441
  }, 1e3);
426
- }, [m, a]), F = b(() => {
427
- s(t), p.current = !1, i.current = "running", g();
428
- }, [t, g]), B = b(() => {
429
- i.current === "running" && (m(), i.current = "paused", s((w) => w));
430
- }, [m]), R = b(() => {
431
- i.current === "paused" && (i.current = "running", g());
432
- }, [g]), V = b(() => {
433
- m(), i.current = "idle", p.current = !1, s(t);
434
- }, [m, t]);
435
- j(() => (o && g(), m), []);
436
- const y = i.current;
442
+ }, [p, r]), M = x(() => {
443
+ s(a), b.current = !1, n.current = "running", g();
444
+ }, [a, g]), R = x(() => {
445
+ n.current === "running" && (p(), n.current = "paused", s((w) => w));
446
+ }, [p]), k = x(() => {
447
+ n.current === "paused" && (n.current = "running", g());
448
+ }, [g]), L = x(() => {
449
+ p(), n.current = "idle", b.current = !1, s(a);
450
+ }, [p, a]);
451
+ z(() => (o && g(), p), [o, g, p]);
452
+ const N = n.current;
437
453
  return {
438
- timeRemaining: c,
439
- isRunning: y === "running",
440
- isPaused: y === "paused",
441
- isExpired: y === "expired",
442
- isWarning: c <= a && c > 0,
443
- start: F,
444
- pause: B,
445
- resume: R,
446
- reset: V
454
+ timeRemaining: l,
455
+ isRunning: N === "running",
456
+ isPaused: N === "paused",
457
+ isExpired: N === "expired",
458
+ isWarning: l <= r && l > 0,
459
+ start: M,
460
+ pause: R,
461
+ resume: k,
462
+ reset: L
447
463
  };
448
464
  }
449
- function me({
450
- steps: t,
451
- currentStep: a,
452
- orientation: r = "horizontal",
453
- variant: n = "default",
465
+ function Ce({
466
+ children: a,
467
+ colorMode: r = "dark",
468
+ licenseKey: t,
469
+ validateUrl: i,
454
470
  className: o,
455
- style: c
456
- }) {
457
- const s = r === "horizontal", i = n === "compact", u = i ? "w-6 h-6 text-xs" : "w-8 h-8 text-sm", x = i ? 12 : 16;
458
- return /* @__PURE__ */ e(
459
- "div",
460
- {
461
- className: l(
462
- "flex",
463
- s ? "flex-row items-start" : "flex-col",
464
- o
465
- ),
466
- style: c,
467
- children: t.map((d, p) => {
468
- const m = p < a, g = p === a;
469
- return /* @__PURE__ */ f("div", { className: l("flex", s ? "flex-1 flex-row items-start" : "flex-row items-start"), children: [
470
- /* @__PURE__ */ f("div", { className: l("flex", s ? "flex-col items-center" : "flex-row items-start gap-3"), children: [
471
- /* @__PURE__ */ e(
472
- "div",
473
- {
474
- className: l(
475
- "rounded-full flex items-center justify-center shrink-0 font-semibold transition-colors",
476
- u,
477
- m && "bg-primary text-primary-foreground",
478
- g && "border-2 border-primary bg-primary/10 text-primary",
479
- !m && !g && "border-2 border-border bg-muted text-muted-foreground"
480
- ),
481
- children: m ? /* @__PURE__ */ e(O, { size: x }) : /* @__PURE__ */ e("span", { children: p + 1 })
482
- }
483
- ),
484
- /* @__PURE__ */ f("div", { className: l(s ? "mt-1.5 text-center" : "pt-0.5"), children: [
485
- /* @__PURE__ */ e(
486
- "p",
487
- {
488
- className: l(
489
- "text-sm font-medium leading-tight",
490
- g ? "text-foreground" : "text-muted-foreground"
491
- ),
492
- children: d.label
493
- }
494
- ),
495
- !i && d.description && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground mt-0.5", children: d.description })
496
- ] })
497
- ] }),
498
- p < t.length - 1 && (s ? /* @__PURE__ */ e(
499
- "div",
500
- {
501
- className: l(
502
- "flex-1 h-0.5 self-center mt-0 mx-2",
503
- i ? "mt-3" : "mt-4",
504
- m ? "bg-primary" : "bg-border"
505
- )
506
- }
507
- ) : /* @__PURE__ */ e(
508
- "div",
509
- {
510
- className: l(
511
- "w-0.5 h-6 ml-3.5",
512
- i && "ml-2.5",
513
- m ? "bg-primary" : "bg-border"
514
- )
515
- }
516
- ))
517
- ] }, p);
518
- })
519
- }
520
- );
521
- }
522
- function fe({
523
- children: t,
524
- colorMode: a = "dark",
525
- className: r,
526
- style: n
471
+ style: l
527
472
  }) {
528
- return /* @__PURE__ */ e(
473
+ return /* @__PURE__ */ e(S, { licenseKey: t, validateUrl: i, children: /* @__PURE__ */ e(
529
474
  "div",
530
475
  {
531
- className: `hydra-root${a === "dark" ? " dark" : ""}${r ? ` ${r}` : ""}`,
532
- style: n,
533
- children: t
476
+ className: `hydra-root${r === "dark" ? " dark" : ""}${o ? ` ${o}` : ""}`,
477
+ style: l,
478
+ children: a
534
479
  }
535
- );
480
+ ) });
536
481
  }
537
- function xe({ className: t, ...a }) {
482
+ function De({ className: a, ...r }) {
538
483
  return /* @__PURE__ */ e(
539
484
  "textarea",
540
485
  {
541
486
  "data-slot": "textarea",
542
- className: l(
487
+ className: c(
543
488
  "placeholder:text-muted-foreground border-input flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-xs outline-none transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50",
544
489
  "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
545
490
  "aria-invalid:ring-destructive/20 aria-invalid:border-destructive",
546
- t
491
+ a
547
492
  ),
548
- ...a
493
+ ...r
549
494
  }
550
495
  );
551
496
  }
552
- function pe({
553
- className: t,
554
- ...a
497
+ function Te({
498
+ className: a,
499
+ ...r
555
500
  }) {
556
501
  return /* @__PURE__ */ e(
557
502
  "span",
558
503
  {
559
504
  "data-slot": "avatar",
560
- className: l(
505
+ className: c(
561
506
  "relative flex size-9 shrink-0 overflow-hidden rounded-full",
562
- t
507
+ a
563
508
  ),
564
- ...a
509
+ ...r
565
510
  }
566
511
  );
567
512
  }
568
- function ge({
569
- className: t,
570
- onError: a,
571
- ...r
513
+ function ze({
514
+ className: a,
515
+ onError: r,
516
+ ...t
572
517
  }) {
573
518
  return /* @__PURE__ */ e(
574
519
  "img",
575
520
  {
576
521
  "data-slot": "avatar-image",
577
- className: l("aspect-square size-full object-cover", t),
578
- onError: a,
579
- ...r
522
+ className: c("aspect-square size-full object-cover", a),
523
+ onError: r,
524
+ ...t
580
525
  }
581
526
  );
582
527
  }
583
- function he({
584
- className: t,
585
- ...a
528
+ function Ae({
529
+ className: a,
530
+ ...r
586
531
  }) {
587
532
  return /* @__PURE__ */ e(
588
533
  "span",
589
534
  {
590
535
  "data-slot": "avatar-fallback",
591
- className: l(
536
+ className: c(
592
537
  "bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-xs font-medium",
593
- t
538
+ a
594
539
  ),
595
- ...a
540
+ ...r
596
541
  }
597
542
  );
598
543
  }
599
- function be({ className: t, ...a }) {
600
- return /* @__PURE__ */ e(
544
+ const re = ae(
545
+ "pointer-events-auto relative flex w-full items-start gap-3 rounded-lg border p-4 pr-8 shadow-lg text-sm transition-all",
546
+ {
547
+ variants: {
548
+ variant: {
549
+ success: "border-success/50 bg-success/5 text-success [&>svg]:text-success",
550
+ error: "border-destructive/50 bg-destructive/5 text-destructive [&>svg]:text-destructive",
551
+ warning: "border-warning/50 bg-warning/5 text-warning [&>svg]:text-warning",
552
+ info: "border-info/50 bg-info/5 text-info [&>svg]:text-info"
553
+ }
554
+ },
555
+ defaultVariants: {
556
+ variant: "info"
557
+ }
558
+ }
559
+ ), j = H(null), se = {
560
+ success: V,
561
+ error: Y,
562
+ warning: J,
563
+ info: Z
564
+ };
565
+ function ie({
566
+ item: a,
567
+ onDismiss: r
568
+ }) {
569
+ const t = v(void 0), i = a.duration ?? 5e3, o = se[a.variant ?? "info"];
570
+ return z(() => (i > 0 && (t.current = setTimeout(() => r(a.id), i)), () => clearTimeout(t.current)), [i, a.id, r]), /* @__PURE__ */ f(
601
571
  "div",
602
572
  {
603
- "data-slot": "skeleton",
604
- className: l("bg-muted animate-pulse rounded-md", t),
605
- ...a
573
+ "data-slot": "toast",
574
+ role: "status",
575
+ "aria-live": "polite",
576
+ className: c(re({ variant: a.variant ?? "info" })),
577
+ children: [
578
+ /* @__PURE__ */ e(o, { className: "size-4 shrink-0 translate-y-0.5" }),
579
+ /* @__PURE__ */ f("div", { className: "flex-1 space-y-1", children: [
580
+ a.title && /* @__PURE__ */ e("p", { className: "font-medium leading-none", children: a.title }),
581
+ /* @__PURE__ */ e("p", { className: "text-sm opacity-90", children: a.message })
582
+ ] }),
583
+ /* @__PURE__ */ e(
584
+ "button",
585
+ {
586
+ type: "button",
587
+ onClick: () => r(a.id),
588
+ "aria-label": "Dismiss notification",
589
+ className: "absolute right-2 top-2 rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity",
590
+ children: /* @__PURE__ */ e(W, { className: "size-3.5" })
591
+ }
592
+ )
593
+ ]
606
594
  }
607
595
  );
608
596
  }
597
+ let ne = 0;
598
+ function oe({ children: a }) {
599
+ const [r, t] = B([]), i = x((l) => {
600
+ const s = `toast-${++ne}`;
601
+ t((n) => [...n.slice(-2), { ...l, id: s }]);
602
+ }, []), o = x((l) => {
603
+ t((s) => s.filter((n) => n.id !== l));
604
+ }, []);
605
+ return /* @__PURE__ */ f(j.Provider, { value: { toast: i }, children: [
606
+ a,
607
+ typeof document < "u" && ee(
608
+ /* @__PURE__ */ e(
609
+ "div",
610
+ {
611
+ "data-slot": "toaster",
612
+ className: "fixed top-4 right-4 z-50 flex flex-col gap-2 w-80 pointer-events-none",
613
+ children: r.map((l) => /* @__PURE__ */ e(ie, { item: l, onDismiss: o }, l.id))
614
+ }
615
+ ),
616
+ document.body
617
+ )
618
+ ] });
619
+ }
620
+ function Ie() {
621
+ const a = E(j);
622
+ if (!a) throw new Error("useToast must be used within a ToastProvider");
623
+ return a;
624
+ }
625
+ const Pe = oe, le = /* @__PURE__ */ new Set([
626
+ "QuizModule",
627
+ "FlashcardLab",
628
+ "CoursePlayer",
629
+ "ExamModule",
630
+ "SurveyModule",
631
+ "GradeCenterModule",
632
+ "AssignmentModule",
633
+ "CertificateModule",
634
+ "DiscussionModule",
635
+ "StudentDashboardModule",
636
+ "CourseCatalogModule",
637
+ "StudentProfileModule"
638
+ ]);
639
+ function Be(a) {
640
+ return le.has(a);
641
+ }
609
642
  export {
610
- ye as AchievementBadge,
611
- we as ActivityTimeline,
612
- De as Alert,
613
- ze as AlertDescription,
614
- Ce as AlertDialog,
615
- Te as AlertDialogAction,
616
- Ae as AlertDialogBackdrop,
617
- Ie as AlertDialogCancel,
618
- je as AlertDialogContent,
619
- ke as AlertDialogDescription,
620
- Fe as AlertDialogFooter,
621
- Be as AlertDialogHeader,
622
- Re as AlertDialogPortal,
623
- Ve as AlertDialogTitle,
624
- Pe as AlertDialogTrigger,
625
- He as AlertTitle,
626
- Me as AssessmentToolbar,
627
- ce as AttachmentList,
628
- pe as Avatar,
629
- he as AvatarFallback,
630
- ge as AvatarImage,
631
- Ee as Badge,
632
- A as Button,
633
- Le as Card,
634
- Qe as CardAction,
635
- $e as CardContent,
636
- Ke as CardDescription,
637
- qe as CardFooter,
638
- Ge as CardHeader,
639
- Ue as CardTitle,
640
- We as Choice,
641
- Je as ConfirmDialog,
642
- Xe as ContentBlock,
643
- Ze as CurriculumItemRow,
644
- Ye as CurriculumTree,
645
- _e as Drawer,
646
- Oe as DrawerBackdrop,
647
- Se as DrawerBody,
648
- et as DrawerClose,
649
- tt as DrawerContent,
650
- rt as DrawerDescription,
651
- at as DrawerFooter,
652
- st as DrawerHeader,
653
- it as DrawerNav,
654
- nt as DrawerNavItem,
655
- lt as DrawerPortal,
656
- ot as DrawerTitle,
657
- dt as DrawerTrigger,
658
- ct as DrawerViewport,
659
- ut as DueDateDisplay,
660
- mt as EmptyState,
661
- ft as Essay,
662
- xt as FeedbackBanner,
663
- pt as FileUploadZone,
664
- gt as FillInTheBlank,
665
- ht as Flashcard,
666
- bt as FlashcardDeck,
667
- vt as GradeIndicator,
668
- Nt as Hotspot,
669
- fe as HydraProvider,
670
- yt as InlineChoice,
671
- wt as Input,
672
- Dt as LearningObjectIcon,
673
- zt as LikertScale,
674
- Ct as Matching,
675
- Tt as MultipleChoice,
676
- At as Numeric,
677
- It as Ordering,
678
- jt as PostCard,
679
- P as Progress,
680
- kt as ProgressRing,
681
- Ft as QuestionHeaderBar,
682
- Bt as QuestionMaterialsDrawer,
683
- Rt as QuestionNavigator,
684
- Vt as QuestionRenderer,
685
- Pt as RichTextEditor,
686
- Ht as Scenario,
687
- Mt as SearchInput,
688
- Et as Separator,
689
- be as Skeleton,
690
- Lt as Spreadsheet,
691
- Qt as StarRating,
692
- $t as StatCard,
693
- Kt as StatusBadge,
694
- me as Stepper,
695
- qt as StreakBadge,
696
- Gt as Table,
697
- Ut as TableBody,
698
- Wt as TableCaption,
699
- Jt as TableCell,
700
- Xt as TableFooter,
701
- Zt as TableHead,
702
- Yt as TableHeader,
703
- _t as TableRow,
704
- Ot as Tabs,
705
- St as TabsContent,
706
- er as TabsList,
707
- tr as TabsTrigger,
708
- xe as Textarea,
709
- rr as TimerDisplay,
710
- ar as Tooltip,
711
- sr as TooltipContent,
712
- ir as TooltipTrigger,
713
- nr as TrueFalse,
714
- lr as UserAvatar,
715
- oe as VideoBookmark,
716
- ne as VideoChapterList,
717
- or as VideoPlayer,
718
- de as VideoPlaylistItem,
719
- le as VideoThumbnailCard,
720
- ie as VideoTranscript,
721
- dr as alertVariants,
722
- cr as badgeVariants,
723
- ur as buttonVariants,
724
- l as cn,
725
- mr as drawerContentVariants,
726
- fr as progressVariants,
727
- xr as scoreQuestion,
728
- pr as scoreScenarioSubQuestions,
729
- ue as useCountdown
643
+ Me as AchievementBadge,
644
+ Re as ActivityTimeline,
645
+ ke as Alert,
646
+ Le as AlertDescription,
647
+ Fe as AlertDialog,
648
+ Ee as AlertDialogAction,
649
+ He as AlertDialogBackdrop,
650
+ Qe as AlertDialogCancel,
651
+ $e as AlertDialogContent,
652
+ Ge as AlertDialogDescription,
653
+ Ke as AlertDialogFooter,
654
+ Ue as AlertDialogHeader,
655
+ _e as AlertDialogPortal,
656
+ qe as AlertDialogTitle,
657
+ Oe as AlertDialogTrigger,
658
+ Xe as AlertTitle,
659
+ Ze as AssessmentToolbar,
660
+ Je as AttachmentList,
661
+ Ye as AudioPlayer,
662
+ Te as Avatar,
663
+ Ae as AvatarFallback,
664
+ ze as AvatarImage,
665
+ We as Badge,
666
+ Se as Button,
667
+ ea as Card,
668
+ aa as CardAction,
669
+ ta as CardContent,
670
+ ra as CardDescription,
671
+ sa as CardFooter,
672
+ ia as CardHeader,
673
+ na as CardTitle,
674
+ oa as Choice,
675
+ la as CodeBlock,
676
+ be as ConfidenceIndicator,
677
+ da as ConfirmDialog,
678
+ ca as ContentBlock,
679
+ ua as CourseCard,
680
+ ma as CurriculumItemRow,
681
+ fa as CurriculumTree,
682
+ pa as Drawer,
683
+ ga as DrawerBackdrop,
684
+ ba as DrawerBody,
685
+ xa as DrawerClose,
686
+ va as DrawerContent,
687
+ ha as DrawerDescription,
688
+ ya as DrawerFooter,
689
+ Na as DrawerHeader,
690
+ wa as DrawerNav,
691
+ Ca as DrawerNavItem,
692
+ Da as DrawerPortal,
693
+ Ta as DrawerTitle,
694
+ za as DrawerTrigger,
695
+ Aa as DrawerViewport,
696
+ Ia as DueDateDisplay,
697
+ Pa as EmbedBlock,
698
+ Ba as EmptyState,
699
+ Va as Essay,
700
+ ja as FeedbackBanner,
701
+ Ma as FileUploadZone,
702
+ Ra as FillInTheBlank,
703
+ ka as Flashcard,
704
+ La as FlashcardDeck,
705
+ Fa as GradeIndicator,
706
+ Ea as Hotspot,
707
+ Et as HydraLicenseContext,
708
+ S as HydraLicenseProvider,
709
+ Ce as HydraProvider,
710
+ Ha as InlineChoice,
711
+ Qa as Input,
712
+ $a as LearningObjectIcon,
713
+ Ga as LikertScale,
714
+ Ka as Matching,
715
+ Ua as MultipleChoice,
716
+ _a as Numeric,
717
+ qa as Ordering,
718
+ le as PRO_MODULES,
719
+ Oa as Pagination,
720
+ Xa as PostCard,
721
+ Ht as ProBadge,
722
+ F as Progress,
723
+ Za as ProgressRing,
724
+ Ja as QuestionHeaderBar,
725
+ Ya as QuestionMaterialsDrawer,
726
+ Wa as QuestionNavigator,
727
+ Sa as QuestionRenderer,
728
+ et as RichTextEditor,
729
+ at as Scenario,
730
+ tt as SearchInput,
731
+ rt as Separator,
732
+ st as Skeleton,
733
+ it as Spreadsheet,
734
+ nt as StarRating,
735
+ ot as StatCard,
736
+ lt as StatusBadge,
737
+ dt as Stepper,
738
+ ct as StreakBadge,
739
+ ut as Table,
740
+ mt as TableBody,
741
+ ft as TableCaption,
742
+ pt as TableCell,
743
+ gt as TableFooter,
744
+ bt as TableHead,
745
+ xt as TableHeader,
746
+ vt as TableRow,
747
+ ht as Tabs,
748
+ yt as TabsContent,
749
+ Nt as TabsList,
750
+ wt as TabsTrigger,
751
+ De as Textarea,
752
+ Ct as TimerDisplay,
753
+ oe as ToastProvider,
754
+ Pe as Toaster,
755
+ Dt as Tooltip,
756
+ Tt as TooltipContent,
757
+ zt as TooltipTrigger,
758
+ At as TrueFalse,
759
+ It as UserAvatar,
760
+ ye as VideoBookmark,
761
+ ve as VideoChapterList,
762
+ Pt as VideoPlayer,
763
+ Ne as VideoPlaylistItem,
764
+ he as VideoThumbnailCard,
765
+ xe as VideoTranscript,
766
+ Bt as alertVariants,
767
+ Vt as badgeVariants,
768
+ jt as buttonVariants,
769
+ c as cn,
770
+ Mt as drawerContentVariants,
771
+ Be as isProModule,
772
+ Rt as progressVariants,
773
+ kt as scoreQuestion,
774
+ Lt as scoreScenarioSubQuestions,
775
+ re as toastVariants,
776
+ we as useCountdown,
777
+ Qt as useHydraLicense,
778
+ Ie as useToast,
779
+ $t as withProGate
730
780
  };