@hydralms/components 0.1.3 → 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 (344) hide show
  1. package/dist/StudentProfile-BVfZMbnV.cjs +1 -0
  2. package/dist/StudentProfile-DeMxdrL3.js +3275 -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/timer-display.d.ts +1 -1
  9. package/dist/assessment-toolbar/types.d.ts +52 -4
  10. package/dist/assessment-toolbar/use-countdown.d.ts +43 -0
  11. package/dist/common/index.d.ts +3 -1
  12. package/dist/common/pagination.d.ts +26 -0
  13. package/dist/common/stepper.d.ts +6 -0
  14. package/dist/common/types.d.ts +38 -0
  15. package/dist/components.css +1 -1
  16. package/dist/content/attachment-list.d.ts +6 -0
  17. package/dist/content/audio-player.d.ts +22 -0
  18. package/dist/content/code-block.d.ts +30 -0
  19. package/dist/content/content-block.d.ts +1 -1
  20. package/dist/content/embed-block.d.ts +28 -0
  21. package/dist/content/index.d.ts +8 -1
  22. package/dist/content/types.d.ts +63 -0
  23. package/dist/curriculum/course-card.d.ts +51 -0
  24. package/dist/curriculum/curriculum-item.d.ts +1 -1
  25. package/dist/curriculum/index.d.ts +2 -0
  26. package/dist/curriculum/types.d.ts +2 -2
  27. package/dist/index.cjs +1 -1
  28. package/dist/index.d.ts +1 -0
  29. package/dist/index.js +597 -308
  30. package/dist/license/HydraContext.d.ts +16 -0
  31. package/dist/license/ProBadge.d.ts +6 -0
  32. package/dist/license/index.d.ts +7 -0
  33. package/dist/license/tiers.d.ts +3 -0
  34. package/dist/license/useHydraLicense.d.ts +6 -0
  35. package/dist/license/validate.d.ts +13 -0
  36. package/dist/license/withProGate.d.ts +6 -0
  37. package/dist/modules/AssignmentModule/AssignmentModule.d.ts +5 -0
  38. package/dist/modules/AssignmentModule/types.d.ts +69 -0
  39. package/dist/modules/CertificateModule/CertificateModule.d.ts +5 -0
  40. package/dist/modules/CertificateModule/types.d.ts +51 -0
  41. package/dist/modules/CourseCatalogModule/CourseCatalogModule.d.ts +5 -0
  42. package/dist/modules/CourseCatalogModule/types.d.ts +43 -0
  43. package/dist/modules/CoursePlayer/CoursePlayer.d.ts +4 -1
  44. package/dist/modules/DiscussionModule/DiscussionModule.d.ts +5 -0
  45. package/dist/modules/DiscussionModule/types.d.ts +47 -0
  46. package/dist/modules/ExamModule/ExamModule.d.ts +5 -0
  47. package/dist/modules/ExamModule/types.d.ts +55 -0
  48. package/dist/modules/FlashcardLab/FlashcardLab.d.ts +4 -1
  49. package/dist/modules/FlashcardLab/types.d.ts +2 -0
  50. package/dist/modules/GradeCenterModule/GradeCenterModule.d.ts +5 -0
  51. package/dist/modules/GradeCenterModule/types.d.ts +56 -0
  52. package/dist/modules/QuizModule/QuizModule.d.ts +4 -1
  53. package/dist/modules/QuizModule/types.d.ts +10 -14
  54. package/dist/modules/StudentDashboardModule/StudentDashboardModule.d.ts +5 -0
  55. package/dist/modules/StudentDashboardModule/types.d.ts +54 -0
  56. package/dist/modules/StudentProfileModule/StudentProfileModule.d.ts +5 -0
  57. package/dist/modules/StudentProfileModule/types.d.ts +43 -0
  58. package/dist/modules/SurveyModule/SurveyModule.d.ts +5 -0
  59. package/dist/modules/SurveyModule/types.d.ts +51 -0
  60. package/dist/modules/_shared/assessment-intro.d.ts +16 -0
  61. package/dist/modules/_shared/assessment-results.d.ts +23 -0
  62. package/dist/modules/_shared/types.d.ts +10 -0
  63. package/dist/modules/_shared/use-timer.d.ts +9 -0
  64. package/dist/modules/index.d.ts +18 -0
  65. package/dist/modules.cjs +1 -0
  66. package/dist/modules.js +1834 -0
  67. package/dist/progress/achievement-badge.d.ts +6 -0
  68. package/dist/progress/activity-timeline.d.ts +6 -0
  69. package/dist/progress/index.d.ts +4 -1
  70. package/dist/progress/stat-card.d.ts +1 -1
  71. package/dist/progress/streak-badge.d.ts +6 -0
  72. package/dist/progress/types.d.ts +99 -0
  73. package/dist/provider/HydraProvider.d.ts +5 -1
  74. package/dist/questions/choice.d.ts +1 -1
  75. package/dist/questions/confidence-indicator.d.ts +37 -0
  76. package/dist/questions/essay.d.ts +2 -2
  77. package/dist/questions/fill-in-the-blank.d.ts +1 -1
  78. package/dist/questions/hotspot.d.ts +21 -0
  79. package/dist/questions/index.d.ts +11 -1
  80. package/dist/questions/inline-choice.d.ts +21 -0
  81. package/dist/questions/matching.d.ts +22 -0
  82. package/dist/questions/multiple-choice.d.ts +1 -1
  83. package/dist/questions/numeric.d.ts +11 -0
  84. package/dist/questions/ordering.d.ts +12 -0
  85. package/dist/questions/question-renderer.d.ts +1 -1
  86. package/dist/questions/scenario.d.ts +23 -0
  87. package/dist/questions/scoring.d.ts +22 -0
  88. package/dist/questions/spreadsheet.d.ts +29 -0
  89. package/dist/questions/true-false.d.ts +1 -1
  90. package/dist/questions/types.d.ts +106 -1
  91. package/dist/questions/use-drag-reorder.d.ts +17 -0
  92. package/dist/sections/AnnouncementFeed/AnnouncementFeed.d.ts +1 -1
  93. package/dist/sections/AnnouncementFeed/types.d.ts +15 -1
  94. package/dist/sections/AssessmentReview/AssessmentReview.d.ts +1 -1
  95. package/dist/sections/AssessmentReview/types.d.ts +6 -0
  96. package/dist/sections/AssignmentSubmission/AssignmentSubmission.d.ts +1 -1
  97. package/dist/sections/AssignmentSubmission/types.d.ts +6 -0
  98. package/dist/sections/CertificateViewer/CertificateViewer.d.ts +1 -1
  99. package/dist/sections/CertificateViewer/certificate-variants.d.ts +42 -0
  100. package/dist/sections/CertificateViewer/types.d.ts +13 -5
  101. package/dist/sections/CourseCatalog/CourseCatalog.d.ts +2 -0
  102. package/dist/sections/CourseCatalog/types.d.ts +80 -0
  103. package/dist/sections/CourseOutline/CourseOutline.d.ts +1 -1
  104. package/dist/sections/CourseOutline/types.d.ts +6 -0
  105. package/dist/sections/DiscussionThread/DiscussionThread.d.ts +1 -1
  106. package/dist/sections/DiscussionThread/types.d.ts +6 -0
  107. package/dist/sections/EnrollmentWizard/EnrollmentWizard.d.ts +2 -0
  108. package/dist/sections/EnrollmentWizard/types.d.ts +66 -0
  109. package/dist/sections/ExamSession/ExamSession.d.ts +1 -1
  110. package/dist/sections/ExamSession/types.d.ts +12 -1
  111. package/dist/sections/FlashcardStudySession/FlashcardStudySession.d.ts +1 -1
  112. package/dist/sections/FlashcardStudySession/types.d.ts +6 -0
  113. package/dist/sections/ForumBoard/ForumBoard.d.ts +8 -0
  114. package/dist/sections/ForumBoard/types.d.ts +78 -0
  115. package/dist/sections/GradebookTable/GradebookTable.d.ts +1 -1
  116. package/dist/sections/GradebookTable/types.d.ts +14 -0
  117. package/dist/sections/LecturePlayer/LecturePlayer.d.ts +1 -1
  118. package/dist/sections/LecturePlayer/types.d.ts +8 -0
  119. package/dist/sections/LessonPage/LessonPage.d.ts +1 -1
  120. package/dist/sections/LessonPage/types.d.ts +6 -0
  121. package/dist/sections/PracticeQuiz/PracticeQuiz.d.ts +1 -1
  122. package/dist/sections/PracticeQuiz/types.d.ts +6 -0
  123. package/dist/sections/ProgressDashboard/ProgressDashboard.d.ts +1 -1
  124. package/dist/sections/ProgressDashboard/types.d.ts +6 -0
  125. package/dist/sections/QuizSession/QuizSession.d.ts +1 -1
  126. package/dist/sections/QuizSession/types.d.ts +12 -1
  127. package/dist/sections/RequirementsChecklist/RequirementsChecklist.d.ts +8 -0
  128. package/dist/sections/RequirementsChecklist/types.d.ts +43 -0
  129. package/dist/sections/ResourceLibrary/ResourceLibrary.d.ts +1 -1
  130. package/dist/sections/ResourceLibrary/types.d.ts +15 -1
  131. package/dist/sections/RubricView/RubricView.d.ts +9 -0
  132. package/dist/sections/RubricView/types.d.ts +56 -0
  133. package/dist/sections/ScrollableQuiz/ScrollableQuiz.d.ts +1 -1
  134. package/dist/sections/ScrollableQuiz/types.d.ts +6 -0
  135. package/dist/sections/StudentProfile/StudentProfile.d.ts +2 -0
  136. package/dist/sections/StudentProfile/types.d.ts +98 -0
  137. package/dist/sections/SurveyForm/SurveyForm.d.ts +1 -1
  138. package/dist/sections/SurveyForm/types.d.ts +6 -0
  139. package/dist/sections/_shared/merge-answers.d.ts +9 -0
  140. package/dist/sections/_shared/section-shell.d.ts +20 -0
  141. package/dist/sections/_shared/use-assessment-session.d.ts +30 -0
  142. package/dist/sections/index.d.ts +13 -1
  143. package/dist/sections.cjs +1 -1
  144. package/dist/sections.js +282 -1786
  145. package/dist/social/post-card.d.ts +1 -1
  146. package/dist/tabs-BsfVo2Bl.cjs +173 -0
  147. package/dist/tabs-BuY1iNJE.js +22305 -0
  148. package/dist/ui/alert.d.ts +1 -1
  149. package/dist/ui/badge.d.ts +1 -1
  150. package/dist/ui/button.d.ts +1 -1
  151. package/dist/ui/drawer.d.ts +84 -0
  152. package/dist/ui/index.d.ts +5 -0
  153. package/dist/ui/progress.d.ts +1 -1
  154. package/dist/ui/rich-text-editor.d.ts +32 -0
  155. package/dist/ui/rich-text-toolbar.d.ts +8 -0
  156. package/dist/ui/toast.d.ts +43 -0
  157. package/dist/utils/array-utils.d.ts +4 -0
  158. package/dist/utils/debounce.d.ts +5 -1
  159. package/dist/utils/flatten-leaves.d.ts +6 -0
  160. package/dist/utils/format-file-size.d.ts +1 -0
  161. package/dist/utils/format-timestamp.d.ts +1 -0
  162. package/dist/utils/is-empty-html.d.ts +5 -0
  163. package/dist/utils/pick-palette-color.d.ts +19 -0
  164. package/dist/utils/shuffle.d.ts +1 -0
  165. package/dist/utils/string-utils.d.ts +12 -0
  166. package/dist/video/types.d.ts +15 -0
  167. package/dist/video/video-bookmark.d.ts +1 -1
  168. package/dist/video/video-player.d.ts +1 -1
  169. package/dist/video/video-playlist-item.d.ts +1 -1
  170. package/dist/withProGate-BWqcKdPM.js +137 -0
  171. package/dist/withProGate-DX6XqKLp.cjs +1 -0
  172. package/package.json +40 -137
  173. package/src/assessment-toolbar/assessment-toolbar.tsx +54 -49
  174. package/src/assessment-toolbar/index.ts +6 -0
  175. package/src/assessment-toolbar/question-header-bar.tsx +61 -0
  176. package/src/assessment-toolbar/question-materials-drawer.tsx +55 -0
  177. package/src/assessment-toolbar/question-navigator.tsx +13 -36
  178. package/src/assessment-toolbar/timer-display.tsx +6 -5
  179. package/src/assessment-toolbar/types.ts +54 -4
  180. package/src/assessment-toolbar/use-countdown.ts +153 -0
  181. package/src/common/empty-state.tsx +1 -0
  182. package/src/common/index.ts +5 -0
  183. package/src/common/pagination.tsx +135 -0
  184. package/src/common/search-input.tsx +8 -6
  185. package/src/common/stepper.tsx +100 -0
  186. package/src/common/types.ts +41 -0
  187. package/src/content/attachment-list.tsx +92 -0
  188. package/src/content/audio-player.tsx +196 -0
  189. package/src/content/code-block.tsx +113 -0
  190. package/src/content/content-block.tsx +68 -2
  191. package/src/content/embed-block.tsx +78 -0
  192. package/src/content/file-upload-zone.tsx +11 -6
  193. package/src/content/index.ts +9 -0
  194. package/src/content/types.ts +46 -0
  195. package/src/curriculum/course-card.tsx +199 -0
  196. package/src/curriculum/curriculum-item.tsx +9 -5
  197. package/src/curriculum/curriculum-tree.tsx +20 -13
  198. package/src/curriculum/index.ts +2 -0
  199. package/src/curriculum/types.ts +2 -2
  200. package/src/feedback/feedback-banner.tsx +12 -14
  201. package/src/flashcards/flashcard-deck.tsx +1 -9
  202. package/src/flashcards/flashcard.tsx +29 -9
  203. package/src/index.ts +3 -0
  204. package/src/license/HydraContext.tsx +62 -0
  205. package/src/license/ProBadge.tsx +43 -0
  206. package/src/license/index.ts +7 -0
  207. package/src/license/tiers.ts +24 -0
  208. package/src/license/useHydraLicense.ts +10 -0
  209. package/src/license/validate.ts +90 -0
  210. package/src/license/withProGate.tsx +21 -0
  211. package/src/modules/AssignmentModule/AssignmentModule.tsx +314 -0
  212. package/src/modules/AssignmentModule/types.ts +77 -0
  213. package/src/modules/CertificateModule/CertificateModule.tsx +173 -0
  214. package/src/modules/CertificateModule/types.ts +49 -0
  215. package/src/modules/CourseCatalogModule/CourseCatalogModule.tsx +126 -0
  216. package/src/modules/CourseCatalogModule/types.ts +47 -0
  217. package/src/modules/CoursePlayer/CoursePlayer.tsx +80 -69
  218. package/src/modules/DiscussionModule/DiscussionModule.tsx +145 -0
  219. package/src/modules/DiscussionModule/types.ts +54 -0
  220. package/src/modules/ExamModule/ExamModule.tsx +151 -0
  221. package/src/modules/ExamModule/types.ts +57 -0
  222. package/src/modules/FlashcardLab/FlashcardLab.tsx +39 -21
  223. package/src/modules/FlashcardLab/types.ts +2 -0
  224. package/src/modules/GradeCenterModule/GradeCenterModule.tsx +174 -0
  225. package/src/modules/GradeCenterModule/types.ts +65 -0
  226. package/src/modules/QuizModule/QuizModule.tsx +58 -178
  227. package/src/modules/QuizModule/types.ts +10 -15
  228. package/src/modules/StudentDashboardModule/StudentDashboardModule.tsx +117 -0
  229. package/src/modules/StudentDashboardModule/types.ts +56 -0
  230. package/src/modules/StudentProfileModule/StudentProfileModule.tsx +289 -0
  231. package/src/modules/StudentProfileModule/types.ts +45 -0
  232. package/src/modules/SurveyModule/SurveyModule.tsx +185 -0
  233. package/src/modules/SurveyModule/types.ts +53 -0
  234. package/src/modules/_shared/assessment-intro.tsx +75 -0
  235. package/src/modules/_shared/assessment-results.tsx +133 -0
  236. package/src/modules/_shared/types.ts +11 -0
  237. package/src/modules/_shared/use-timer.ts +49 -0
  238. package/src/modules/index.ts +33 -0
  239. package/src/progress/achievement-badge.tsx +52 -0
  240. package/src/progress/activity-timeline.tsx +84 -0
  241. package/src/progress/grade-indicator.tsx +9 -1
  242. package/src/progress/index.ts +7 -0
  243. package/src/progress/progress-ring.tsx +2 -1
  244. package/src/progress/stat-card.tsx +37 -18
  245. package/src/progress/streak-badge.tsx +35 -0
  246. package/src/progress/types.ts +103 -0
  247. package/src/provider/HydraProvider.tsx +15 -6
  248. package/src/questions/choice.tsx +19 -14
  249. package/src/questions/confidence-indicator.tsx +107 -0
  250. package/src/questions/essay.tsx +28 -28
  251. package/src/questions/fill-in-the-blank.tsx +20 -19
  252. package/src/questions/hotspot.tsx +154 -0
  253. package/src/questions/index.ts +18 -0
  254. package/src/questions/inline-choice.tsx +152 -0
  255. package/src/questions/matching.tsx +229 -0
  256. package/src/questions/multiple-choice.tsx +19 -14
  257. package/src/questions/numeric.tsx +106 -0
  258. package/src/questions/ordering.tsx +167 -0
  259. package/src/questions/question-renderer.tsx +24 -2
  260. package/src/questions/scenario.tsx +140 -0
  261. package/src/questions/scoring.ts +201 -0
  262. package/src/questions/spreadsheet.tsx +260 -0
  263. package/src/questions/true-false.tsx +19 -14
  264. package/src/questions/types.ts +123 -1
  265. package/src/questions/use-drag-reorder.ts +80 -0
  266. package/src/sections/AnnouncementFeed/AnnouncementFeed.tsx +66 -23
  267. package/src/sections/AnnouncementFeed/types.ts +15 -1
  268. package/src/sections/AssessmentReview/AssessmentReview.tsx +50 -2
  269. package/src/sections/AssessmentReview/types.ts +6 -0
  270. package/src/sections/AssignmentSubmission/AssignmentSubmission.tsx +44 -6
  271. package/src/sections/AssignmentSubmission/types.ts +6 -0
  272. package/src/sections/CertificateViewer/CertificateViewer.tsx +215 -60
  273. package/src/sections/CertificateViewer/certificate-variants.tsx +170 -0
  274. package/src/sections/CertificateViewer/types.ts +19 -5
  275. package/src/sections/CourseCatalog/CourseCatalog.tsx +220 -0
  276. package/src/sections/CourseCatalog/types.ts +76 -0
  277. package/src/sections/CourseOutline/CourseOutline.tsx +45 -14
  278. package/src/sections/CourseOutline/types.ts +6 -0
  279. package/src/sections/DiscussionThread/DiscussionThread.tsx +55 -11
  280. package/src/sections/DiscussionThread/types.ts +6 -0
  281. package/src/sections/EnrollmentWizard/EnrollmentWizard.tsx +343 -0
  282. package/src/sections/EnrollmentWizard/types.ts +65 -0
  283. package/src/sections/ExamSession/ExamSession.tsx +125 -82
  284. package/src/sections/ExamSession/types.ts +12 -1
  285. package/src/sections/FlashcardStudySession/FlashcardStudySession.tsx +53 -36
  286. package/src/sections/FlashcardStudySession/types.ts +6 -0
  287. package/src/sections/ForumBoard/ForumBoard.tsx +342 -0
  288. package/src/sections/ForumBoard/types.ts +81 -0
  289. package/src/sections/GradebookTable/GradebookTable.tsx +55 -2
  290. package/src/sections/GradebookTable/types.ts +14 -0
  291. package/src/sections/LecturePlayer/LecturePlayer.tsx +63 -37
  292. package/src/sections/LecturePlayer/types.ts +8 -0
  293. package/src/sections/LessonPage/LessonPage.tsx +40 -13
  294. package/src/sections/LessonPage/types.ts +6 -0
  295. package/src/sections/PracticeQuiz/PracticeQuiz.tsx +119 -98
  296. package/src/sections/PracticeQuiz/types.ts +6 -0
  297. package/src/sections/ProgressDashboard/ProgressDashboard.tsx +121 -67
  298. package/src/sections/ProgressDashboard/types.ts +6 -0
  299. package/src/sections/QuizSession/QuizSession.tsx +115 -67
  300. package/src/sections/QuizSession/types.ts +12 -1
  301. package/src/sections/RequirementsChecklist/RequirementsChecklist.tsx +147 -0
  302. package/src/sections/RequirementsChecklist/types.ts +44 -0
  303. package/src/sections/ResourceLibrary/ResourceLibrary.tsx +68 -17
  304. package/src/sections/ResourceLibrary/types.ts +15 -1
  305. package/src/sections/RubricView/RubricView.tsx +174 -0
  306. package/src/sections/RubricView/types.ts +58 -0
  307. package/src/sections/ScrollableQuiz/ScrollableQuiz.tsx +58 -23
  308. package/src/sections/ScrollableQuiz/types.ts +6 -0
  309. package/src/sections/StudentProfile/StudentProfile.tsx +279 -0
  310. package/src/sections/StudentProfile/types.ts +99 -0
  311. package/src/sections/SurveyForm/SurveyForm.tsx +40 -10
  312. package/src/sections/SurveyForm/types.ts +6 -0
  313. package/src/sections/_shared/merge-answers.ts +22 -0
  314. package/src/sections/_shared/section-shell.tsx +64 -0
  315. package/src/sections/_shared/use-assessment-session.ts +125 -0
  316. package/src/sections/index.ts +42 -1
  317. package/src/social/post-card.tsx +8 -19
  318. package/src/social/user-avatar.tsx +10 -5
  319. package/src/styles/globals.css +52 -41
  320. package/src/ui/badge.tsx +8 -0
  321. package/src/ui/drawer.tsx +600 -0
  322. package/src/ui/index.ts +21 -0
  323. package/src/ui/progress.tsx +4 -0
  324. package/src/ui/rich-text-editor.tsx +119 -0
  325. package/src/ui/rich-text-toolbar.tsx +157 -0
  326. package/src/ui/toast.tsx +170 -0
  327. package/src/utils/array-utils.ts +17 -0
  328. package/src/utils/debounce.ts +8 -2
  329. package/src/utils/flatten-leaves.ts +17 -0
  330. package/src/utils/format-file-size.ts +5 -0
  331. package/src/utils/format-timestamp.ts +13 -0
  332. package/src/utils/is-empty-html.ts +7 -0
  333. package/src/utils/pick-palette-color.ts +33 -0
  334. package/src/utils/shuffle.ts +8 -0
  335. package/src/utils/string-utils.ts +30 -0
  336. package/src/video/types.ts +16 -0
  337. package/src/video/video-bookmark.tsx +4 -3
  338. package/src/video/video-chapter-list.tsx +9 -4
  339. package/src/video/video-player.tsx +24 -5
  340. package/src/video/video-playlist-item.tsx +8 -3
  341. package/src/video/video-thumbnail-card.tsx +4 -0
  342. package/src/video/video-transcript.tsx +8 -5
  343. package/dist/table-BrS5cDQu.js +0 -2510
  344. package/dist/table-D6AkBBEo.cjs +0 -1
package/dist/index.js CHANGED
@@ -1,123 +1,198 @@
1
- import { c as l, f as g, a as h, P as N } from "./table-BrS5cDQu.js";
2
- import { A as Z, b as J, d as K, e as O, g as W, h as X, i as Y, j as _, k as S, l as ee, m as ae, n as te, o as re, p as se, q as ie, B as le, r as oe, C as ne, s as de, t as ce, u as me, v as ue, w as fe, x as xe, y as pe, z as ge, D as he, E as be, F as ve, G as Ne, H as ye, I as Ce, J as Te, K as ze, L as we, M as De, N as Ae, O as je, Q as ke, R as Ve, S as Ie, T as Re, U as Be, V as Fe, W as Pe, X as He, Y as Le, Z as Me, _ as $e, $ as Ee, a0 as Qe, a1 as Ue, a2 as qe, a3 as Ge, a4 as Ze, a5 as Je, a6 as Ke, a7 as Oe, a8 as We, a9 as Xe, aa as Ye, ab as _e, ac as Se, ad as ea, ae as aa, af as ta, ag as ra, ah as sa, ai as ia, aj as la, ak as oa, al as na, am as da, an as ca, ao as ma } from "./table-BrS5cDQu.js";
3
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
4
- import { Clock as y, Play as p, Video as C, Bookmark as T, Pencil as z, Trash2 as w, CheckCircle2 as D, Circle as A } from "lucide-react";
5
- import { useRef as v, useEffect as j } from "react";
6
- const B = ({
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 = ({
7
72
  entries: a,
8
73
  currentTime: r = 0,
9
74
  onSeek: t,
10
- readOnly: s = !1,
11
- maxHeight: n = "400px",
12
- className: c,
13
- style: i
75
+ readOnly: i = !1,
76
+ maxHeight: o = "400px",
77
+ className: l,
78
+ style: s
14
79
  }) => {
15
- const m = v(null), d = v(null), b = a.reduce(
16
- (u, x, f) => x.time <= r ? f : u,
17
- -1
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
- d.current && m.current && d.current.scrollIntoView({
84
+ return z(() => {
85
+ u.current && n.current && u.current.scrollIntoView({
21
86
  behavior: "smooth",
22
87
  block: "nearest"
23
88
  });
24
- }, [b]), a.length === 0 ? /* @__PURE__ */ o(
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
- style: i,
96
+ style: s,
32
97
  children: [
33
- /* @__PURE__ */ e(y, { 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: m,
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
- style: { maxHeight: n, ...i },
46
- children: a.map((u, x) => {
47
- const f = x === b;
48
- return /* @__PURE__ */ o(
110
+ style: { maxHeight: o, ...s },
111
+ children: a.map((d, b) => {
112
+ const p = b === m;
113
+ return /* @__PURE__ */ f(
49
114
  "div",
50
115
  {
51
- ref: f ? d : 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
- f && "bg-primary/10",
55
- !s && t && "cursor-pointer hover:bg-muted"
119
+ p && "bg-primary/10",
120
+ !i && t && "cursor-pointer hover:bg-muted"
56
121
  ),
57
- onClick: () => !s && (t == null ? void 0 : t(u.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));
127
+ } : void 0,
58
128
  children: [
59
129
  /* @__PURE__ */ e(
60
130
  "span",
61
131
  {
62
- className: l(
132
+ className: c(
63
133
  "shrink-0 font-mono text-xs tabular-nums pt-0.5",
64
- f ? "text-primary font-medium" : "text-muted-foreground"
134
+ p ? "text-primary font-medium" : "text-muted-foreground"
65
135
  ),
66
- children: g(Math.floor(u.time))
136
+ children: C(Math.floor(d.time))
67
137
  }
68
138
  ),
69
- /* @__PURE__ */ o("div", { className: "min-w-0", children: [
70
- u.speaker && /* @__PURE__ */ o("span", { className: "mr-1 font-semibold text-foreground", children: [
71
- u.speaker,
139
+ /* @__PURE__ */ f("div", { className: "min-w-0", children: [
140
+ d.speaker && /* @__PURE__ */ f("span", { className: "mr-1 font-semibold text-foreground", children: [
141
+ d.speaker,
72
142
  ":"
73
143
  ] }),
74
144
  /* @__PURE__ */ e(
75
145
  "span",
76
146
  {
77
- className: f ? "text-foreground" : "text-muted-foreground",
78
- children: u.text
147
+ className: p ? "text-foreground" : "text-muted-foreground",
148
+ children: d.text
79
149
  }
80
150
  )
81
151
  ] })
82
152
  ]
83
153
  },
84
- x
154
+ `${d.time}-${d.text.slice(0, 20)}`
85
155
  );
86
156
  })
87
157
  }
88
158
  );
89
- }, F = ({
159
+ }, ve = ({
90
160
  chapters: a,
91
161
  currentTime: r = 0,
92
162
  onSeek: t,
93
- className: s,
94
- style: n
163
+ className: i,
164
+ style: o
95
165
  }) => {
96
- const c = a.reduce(
97
- (i, m, d) => m.time <= r ? d : i,
98
- -1
166
+ const l = P(
167
+ () => a.reduce((s, n, u) => n.time <= r ? u : s, -1),
168
+ [a, r]
99
169
  );
100
170
  return /* @__PURE__ */ e(
101
171
  "div",
102
172
  {
103
- className: l(
173
+ className: c(
104
174
  "divide-y divide-border rounded-md border border-border",
105
- s
175
+ i
106
176
  ),
107
- style: n,
108
- children: a.map((i, m) => {
109
- const d = m === c;
110
- return /* @__PURE__ */ o(
177
+ style: o,
178
+ children: a.map((s, n) => {
179
+ const u = n === l;
180
+ return /* @__PURE__ */ f(
111
181
  "div",
112
182
  {
113
- className: l(
183
+ className: c(
114
184
  "flex items-center gap-3 p-3 transition-colors",
115
- d && "bg-primary/10",
185
+ u && "bg-primary/10",
116
186
  t && "cursor-pointer hover:bg-muted"
117
187
  ),
118
- onClick: () => t == null ? void 0 : t(i.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));
193
+ } : void 0,
119
194
  children: [
120
- i.thumbnail ? /* @__PURE__ */ o(
195
+ s.thumbnail ? /* @__PURE__ */ f(
121
196
  "div",
122
197
  {
123
198
  className: "relative shrink-0 w-16 overflow-hidden rounded",
@@ -126,224 +201,300 @@ const B = ({
126
201
  /* @__PURE__ */ e(
127
202
  "img",
128
203
  {
129
- src: i.thumbnail,
130
- alt: i.title,
204
+ src: s.thumbnail,
205
+ alt: s.title,
206
+ loading: "lazy",
131
207
  className: "size-full object-cover"
132
208
  }
133
209
  ),
134
- d && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center bg-black/40", children: /* @__PURE__ */ e(p, { 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" }) })
135
211
  ]
136
212
  }
137
213
  ) : /* @__PURE__ */ e(
138
214
  "div",
139
215
  {
140
- className: l(
216
+ className: c(
141
217
  "flex shrink-0 items-center justify-center size-8 rounded-full",
142
- d ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground"
218
+ u ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground"
143
219
  ),
144
- children: /* @__PURE__ */ e("span", { className: "text-xs font-semibold", children: m + 1 })
220
+ children: /* @__PURE__ */ e("span", { className: "text-xs font-semibold", children: n + 1 })
145
221
  }
146
222
  ),
147
- /* @__PURE__ */ o("div", { className: "min-w-0 flex-1", children: [
223
+ /* @__PURE__ */ f("div", { className: "min-w-0 flex-1", children: [
148
224
  /* @__PURE__ */ e(
149
225
  "div",
150
226
  {
151
- className: l(
227
+ className: c(
152
228
  "truncate text-sm font-medium",
153
- d ? "text-primary" : "text-foreground"
229
+ u ? "text-primary" : "text-foreground"
154
230
  ),
155
- children: i.title
231
+ children: s.title
156
232
  }
157
233
  ),
158
- /* @__PURE__ */ o("div", { className: "mt-0.5 flex items-center gap-2", children: [
159
- /* @__PURE__ */ e("span", { className: "font-mono text-xs tabular-nums text-muted-foreground", children: g(Math.floor(i.time)) }),
160
- i.duration != null && i.duration > 0 && /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: h(i.duration) })
234
+ /* @__PURE__ */ f("div", { className: "mt-0.5 flex items-center gap-2", children: [
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) })
161
237
  ] })
162
238
  ] })
163
239
  ]
164
240
  },
165
- m
241
+ s.time
166
242
  );
167
243
  })
168
244
  }
169
245
  );
170
- }, P = ({
246
+ }, he = ({
171
247
  poster: a,
172
248
  title: r,
173
249
  duration: t,
174
- progress: s,
175
- onClick: n,
176
- className: c,
177
- style: i
178
- }) => /* @__PURE__ */ o(
250
+ progress: i,
251
+ onClick: o,
252
+ className: l,
253
+ style: s
254
+ }) => /* @__PURE__ */ f(
179
255
  "div",
180
256
  {
181
- className: l(
257
+ className: c(
182
258
  "group overflow-hidden rounded-lg border border-border transition-colors",
183
- n && "cursor-pointer hover:border-primary/50 hover:shadow-sm",
184
- c
259
+ o && "cursor-pointer hover:border-primary/50 hover:shadow-sm",
260
+ l
185
261
  ),
186
- style: i,
187
- onClick: n,
262
+ style: s,
263
+ onClick: o,
264
+ role: o ? "button" : void 0,
265
+ tabIndex: o ? 0 : void 0,
266
+ onKeyDown: o ? (n) => {
267
+ (n.key === "Enter" || n.key === " ") && (n.preventDefault(), o());
268
+ } : void 0,
188
269
  children: [
189
- /* @__PURE__ */ o("div", { className: "relative overflow-hidden", style: { aspectRatio: "16/9" }, children: [
270
+ /* @__PURE__ */ f("div", { className: "relative overflow-hidden", style: { aspectRatio: "16/9" }, children: [
190
271
  a ? /* @__PURE__ */ e(
191
272
  "img",
192
273
  {
193
274
  src: a,
194
275
  alt: r,
276
+ loading: "lazy",
195
277
  className: "size-full object-cover transition-transform duration-300 group-hover:scale-105"
196
278
  }
197
- ) : /* @__PURE__ */ e("div", { className: "flex size-full items-center justify-center bg-muted", children: /* @__PURE__ */ e(C, { size: 32, className: "text-muted-foreground" }) }),
198
- /* @__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(p, { size: 20, className: "ml-0.5 text-white" }) }) }),
199
- 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: h(t) })
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) })
200
282
  ] }),
201
283
  /* @__PURE__ */ e("div", { className: "p-3", children: /* @__PURE__ */ e("h4", { className: "truncate text-sm font-medium text-foreground", children: r }) }),
202
- s != null && s >= 0 && /* @__PURE__ */ e("div", { className: "px-3 pb-3", children: /* @__PURE__ */ e(
203
- N,
284
+ i != null && i >= 0 && /* @__PURE__ */ e("div", { className: "px-3 pb-3", children: /* @__PURE__ */ e(
285
+ F,
204
286
  {
205
- value: s,
287
+ value: i,
206
288
  size: "sm",
207
- variant: s >= 100 ? "success" : "default"
289
+ variant: i >= 100 ? "success" : "default"
208
290
  }
209
291
  ) })
210
292
  ]
211
293
  }
212
- ), H = ({
213
- bookmark: a,
214
- onSeek: r,
215
- onDelete: t,
216
- onEdit: s,
217
- className: n,
218
- style: c
219
- }) => /* @__PURE__ */ o(
220
- "div",
221
- {
222
- className: l(
223
- "flex items-start gap-3 rounded-md border border-border p-3",
224
- n
225
- ),
226
- style: c,
227
- children: [
228
- /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center justify-center size-8 rounded-full bg-primary/10 text-primary", children: /* @__PURE__ */ e(T, { size: 16 }) }),
229
- /* @__PURE__ */ o("div", { className: "min-w-0 flex-1", children: [
230
- /* @__PURE__ */ e(
231
- "button",
232
- {
233
- type: "button",
234
- className: l(
235
- "font-mono text-xs font-medium tabular-nums",
236
- r ? "cursor-pointer text-primary hover:underline" : "text-muted-foreground"
237
- ),
238
- onClick: () => r == null ? void 0 : r(a.time),
239
- disabled: !r,
240
- children: g(Math.floor(a.time))
241
- }
242
- ),
243
- a.note && /* @__PURE__ */ e("p", { className: "mt-0.5 text-sm text-foreground", children: a.note }),
244
- a.createdAt && /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: new Date(a.createdAt).toLocaleDateString() })
245
- ] }),
246
- (s || t) && /* @__PURE__ */ o("div", { className: "flex shrink-0 items-center gap-1", children: [
247
- s && /* @__PURE__ */ e(
248
- "button",
249
- {
250
- type: "button",
251
- className: "inline-flex items-center justify-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
252
- "aria-label": "Edit bookmark",
253
- onClick: () => s(a.id),
254
- children: /* @__PURE__ */ e(z, { size: 14 })
255
- }
256
- ),
257
- t && /* @__PURE__ */ e(
258
- "button",
259
- {
260
- type: "button",
261
- className: "inline-flex items-center justify-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive",
262
- "aria-label": "Delete bookmark",
263
- onClick: () => t(a.id),
264
- children: /* @__PURE__ */ e(w, { size: 14 })
265
- }
266
- )
267
- ] })
268
- ]
269
- }
270
- ), L = ({
271
- thumbnail: a,
272
- title: r,
273
- duration: t,
274
- status: s = "unwatched",
275
- isActive: n = !1,
276
- index: c,
277
- onClick: i,
278
- className: m,
279
- style: d
280
- }) => /* @__PURE__ */ o(
281
- "div",
282
- {
283
- className: l(
284
- "flex items-center gap-3 rounded-md px-3 py-2 transition-colors",
285
- n && "bg-primary/10",
286
- i && "cursor-pointer hover:bg-muted",
287
- m
288
- ),
289
- style: d,
290
- onClick: i,
291
- children: [
292
- /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center justify-center size-6", children: s === "completed" ? /* @__PURE__ */ e("span", { className: "text-success", children: /* @__PURE__ */ e(D, { size: 18 }) }) : n ? /* @__PURE__ */ e("span", { className: "text-primary", children: /* @__PURE__ */ e(p, { size: 16, className: "ml-px" }) }) : c != null ? /* @__PURE__ */ e("span", { className: "text-xs font-medium tabular-nums text-muted-foreground", children: c }) : /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: /* @__PURE__ */ e(A, { size: 16 }) }) }),
293
- a && /* @__PURE__ */ o(
294
- "div",
295
- {
296
- className: "relative shrink-0 w-16 overflow-hidden rounded",
297
- style: { aspectRatio: "16/9" },
298
- children: [
299
- /* @__PURE__ */ e(
300
- "img",
301
- {
302
- src: a,
303
- alt: r,
304
- className: l(
305
- "size-full object-cover",
306
- s === "completed" && "opacity-60"
307
- )
308
- }
309
- ),
310
- n && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center bg-black/40", children: /* @__PURE__ */ e(p, { size: 12, className: "ml-px text-white" }) })
311
- ]
312
- }
294
+ ), ye = T(function({
295
+ bookmark: r,
296
+ onSeek: t,
297
+ onDelete: i,
298
+ onEdit: o,
299
+ className: l,
300
+ style: s
301
+ }) {
302
+ return /* @__PURE__ */ f(
303
+ "div",
304
+ {
305
+ className: c(
306
+ "flex items-start gap-3 rounded-md border border-border p-3",
307
+ l
313
308
  ),
314
- /* @__PURE__ */ o("div", { className: "min-w-0 flex-1", children: [
315
- /* @__PURE__ */ e(
309
+ style: s,
310
+ children: [
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 }) }),
312
+ /* @__PURE__ */ f("div", { className: "min-w-0 flex-1", children: [
313
+ /* @__PURE__ */ e(
314
+ "button",
315
+ {
316
+ type: "button",
317
+ className: c(
318
+ "font-mono text-xs font-medium tabular-nums",
319
+ t ? "cursor-pointer text-primary hover:underline" : "text-muted-foreground"
320
+ ),
321
+ onClick: () => t == null ? void 0 : t(r.time),
322
+ disabled: !t,
323
+ children: C(Math.floor(r.time))
324
+ }
325
+ ),
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() })
328
+ ] }),
329
+ (o || i) && /* @__PURE__ */ f("div", { className: "flex shrink-0 items-center gap-1", children: [
330
+ o && /* @__PURE__ */ e(
331
+ "button",
332
+ {
333
+ type: "button",
334
+ className: "inline-flex items-center justify-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
335
+ "aria-label": "Edit bookmark",
336
+ onClick: () => o(r.id),
337
+ children: /* @__PURE__ */ e(q, { size: 14 })
338
+ }
339
+ ),
340
+ i && /* @__PURE__ */ e(
341
+ "button",
342
+ {
343
+ type: "button",
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",
345
+ "aria-label": "Delete bookmark",
346
+ onClick: () => i(r.id),
347
+ children: /* @__PURE__ */ e(O, { size: 14 })
348
+ }
349
+ )
350
+ ] })
351
+ ]
352
+ }
353
+ );
354
+ }), Ne = T(function({
355
+ thumbnail: r,
356
+ title: t,
357
+ duration: i,
358
+ status: o = "unwatched",
359
+ isActive: l = !1,
360
+ index: s,
361
+ onClick: n,
362
+ className: u,
363
+ style: m
364
+ }) {
365
+ return /* @__PURE__ */ f(
366
+ "div",
367
+ {
368
+ className: c(
369
+ "flex items-center gap-3 rounded-md px-3 py-2 transition-colors",
370
+ l && "bg-primary/10",
371
+ n && "cursor-pointer hover:bg-muted",
372
+ u
373
+ ),
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());
380
+ } : void 0,
381
+ children: [
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(
316
384
  "div",
317
385
  {
318
- className: l(
319
- "truncate text-sm",
320
- n ? "font-medium text-primary" : "text-foreground",
321
- s === "completed" && !n && "text-muted-foreground"
322
- ),
323
- children: r
386
+ className: "relative shrink-0 w-16 overflow-hidden rounded",
387
+ style: { aspectRatio: "16/9" },
388
+ children: [
389
+ /* @__PURE__ */ e(
390
+ "img",
391
+ {
392
+ src: r,
393
+ alt: t,
394
+ loading: "lazy",
395
+ className: c(
396
+ "size-full object-cover",
397
+ o === "completed" && "opacity-60"
398
+ )
399
+ }
400
+ ),
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" }) })
402
+ ]
324
403
  }
325
404
  ),
326
- t != null && t > 0 && /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: h(t) })
327
- ] })
328
- ]
329
- }
330
- );
331
- function M({
405
+ /* @__PURE__ */ f("div", { className: "min-w-0 flex-1", children: [
406
+ /* @__PURE__ */ e(
407
+ "div",
408
+ {
409
+ className: c(
410
+ "truncate text-sm",
411
+ l ? "font-medium text-primary" : "text-foreground",
412
+ o === "completed" && !l && "text-muted-foreground"
413
+ ),
414
+ children: t
415
+ }
416
+ ),
417
+ i != null && i > 0 && /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: D(i) })
418
+ ] })
419
+ ]
420
+ }
421
+ );
422
+ });
423
+ function we({
424
+ durationSeconds: a,
425
+ warningThresholdSeconds: r = 60,
426
+ onExpire: t,
427
+ onWarning: i,
428
+ autoStart: o = !1
429
+ }) {
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(() => {
433
+ u.current != null && (clearInterval(u.current), u.current = null);
434
+ }, []), g = x(() => {
435
+ p(), u.current = setInterval(() => {
436
+ s((w) => {
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;
440
+ });
441
+ }, 1e3);
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;
453
+ return {
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
463
+ };
464
+ }
465
+ function Ce({
332
466
  children: a,
333
467
  colorMode: r = "dark",
334
- className: t,
335
- style: s
468
+ licenseKey: t,
469
+ validateUrl: i,
470
+ className: o,
471
+ style: l
336
472
  }) {
337
- return /* @__PURE__ */ e(
473
+ return /* @__PURE__ */ e(S, { licenseKey: t, validateUrl: i, children: /* @__PURE__ */ e(
338
474
  "div",
339
475
  {
340
- className: `hydra-root${r === "dark" ? " dark" : ""}${t ? ` ${t}` : ""}`,
341
- style: s,
476
+ className: `hydra-root${r === "dark" ? " dark" : ""}${o ? ` ${o}` : ""}`,
477
+ style: l,
342
478
  children: a
343
479
  }
480
+ ) });
481
+ }
482
+ function De({ className: a, ...r }) {
483
+ return /* @__PURE__ */ e(
484
+ "textarea",
485
+ {
486
+ "data-slot": "textarea",
487
+ className: c(
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",
489
+ "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
490
+ "aria-invalid:ring-destructive/20 aria-invalid:border-destructive",
491
+ a
492
+ ),
493
+ ...r
494
+ }
344
495
  );
345
496
  }
346
- function $({
497
+ function Te({
347
498
  className: a,
348
499
  ...r
349
500
  }) {
@@ -351,7 +502,7 @@ function $({
351
502
  "span",
352
503
  {
353
504
  "data-slot": "avatar",
354
- className: l(
505
+ className: c(
355
506
  "relative flex size-9 shrink-0 overflow-hidden rounded-full",
356
507
  a
357
508
  ),
@@ -359,7 +510,7 @@ function $({
359
510
  }
360
511
  );
361
512
  }
362
- function E({
513
+ function ze({
363
514
  className: a,
364
515
  onError: r,
365
516
  ...t
@@ -368,13 +519,13 @@ function E({
368
519
  "img",
369
520
  {
370
521
  "data-slot": "avatar-image",
371
- className: l("aspect-square size-full object-cover", a),
522
+ className: c("aspect-square size-full object-cover", a),
372
523
  onError: r,
373
524
  ...t
374
525
  }
375
526
  );
376
527
  }
377
- function Q({
528
+ function Ae({
378
529
  className: a,
379
530
  ...r
380
531
  }) {
@@ -382,7 +533,7 @@ function Q({
382
533
  "span",
383
534
  {
384
535
  "data-slot": "avatar-fallback",
385
- className: l(
536
+ className: c(
386
537
  "bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-xs font-medium",
387
538
  a
388
539
  ),
@@ -390,102 +541,240 @@ function Q({
390
541
  }
391
542
  );
392
543
  }
393
- function U({ className: a, ...r }) {
394
- 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(
395
571
  "div",
396
572
  {
397
- "data-slot": "skeleton",
398
- className: l("bg-muted animate-pulse rounded-md", a),
399
- ...r
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
+ ]
400
594
  }
401
595
  );
402
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
+ }
403
642
  export {
404
- Z as Alert,
405
- J as AlertDescription,
406
- K as AlertDialog,
407
- O as AlertDialogAction,
408
- W as AlertDialogBackdrop,
409
- X as AlertDialogCancel,
410
- Y as AlertDialogContent,
411
- _ as AlertDialogDescription,
412
- S as AlertDialogFooter,
413
- ee as AlertDialogHeader,
414
- ae as AlertDialogPortal,
415
- te as AlertDialogTitle,
416
- re as AlertDialogTrigger,
417
- se as AlertTitle,
418
- ie as AssessmentToolbar,
419
- $ as Avatar,
420
- Q as AvatarFallback,
421
- E as AvatarImage,
422
- le as Badge,
423
- oe as Button,
424
- ne as Card,
425
- de as CardAction,
426
- ce as CardContent,
427
- me as CardDescription,
428
- ue as CardFooter,
429
- fe as CardHeader,
430
- xe as CardTitle,
431
- pe as Choice,
432
- ge as ConfirmDialog,
433
- he as ContentBlock,
434
- be as CurriculumItemRow,
435
- ve as CurriculumTree,
436
- Ne as DueDateDisplay,
437
- ye as EmptyState,
438
- Ce as Essay,
439
- Te as FeedbackBanner,
440
- ze as FileUploadZone,
441
- we as FillInTheBlank,
442
- De as Flashcard,
443
- Ae as FlashcardDeck,
444
- je as GradeIndicator,
445
- M as HydraProvider,
446
- ke as Input,
447
- Ve as LearningObjectIcon,
448
- Ie as LikertScale,
449
- Re as MultipleChoice,
450
- Be as PostCard,
451
- N as Progress,
452
- Fe as ProgressRing,
453
- Pe as QuestionNavigator,
454
- He as QuestionRenderer,
455
- Le as SearchInput,
456
- Me as Separator,
457
- U as Skeleton,
458
- $e as StarRating,
459
- Ee as StatCard,
460
- Qe as StatusBadge,
461
- Ue as Table,
462
- qe as TableBody,
463
- Ge as TableCaption,
464
- Ze as TableCell,
465
- Je as TableFooter,
466
- Ke as TableHead,
467
- Oe as TableHeader,
468
- We as TableRow,
469
- Xe as Tabs,
470
- Ye as TabsContent,
471
- _e as TabsList,
472
- Se as TabsTrigger,
473
- ea as Textarea,
474
- aa as TimerDisplay,
475
- ta as Tooltip,
476
- ra as TooltipContent,
477
- sa as TooltipTrigger,
478
- ia as TrueFalse,
479
- la as UserAvatar,
480
- H as VideoBookmark,
481
- F as VideoChapterList,
482
- oa as VideoPlayer,
483
- L as VideoPlaylistItem,
484
- P as VideoThumbnailCard,
485
- B as VideoTranscript,
486
- na as alertVariants,
487
- da as badgeVariants,
488
- ca as buttonVariants,
489
- l as cn,
490
- ma as progressVariants
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
491
780
  };