wrong-notebook 2026.11.5-2 → 2026.11.6-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (940) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +5 -0
  3. package/.next/build-manifest.json +64 -53
  4. package/.next/prerender-manifest.json +4 -4
  5. package/.next/required-server-files.json +6 -3
  6. package/.next/routes-manifest.json +30 -0
  7. package/.next/server/app/_global-error/page/build-manifest.json +3 -3
  8. package/.next/server/app/_global-error/page.js +7 -7
  9. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  10. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  11. package/.next/server/app/_global-error.html +1 -1
  12. package/.next/server/app/_global-error.rsc +3 -3
  13. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
  14. package/.next/server/app/_global-error.segments/_full.segment.rsc +3 -3
  15. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  16. package/.next/server/app/_not-found/page/build-manifest.json +3 -3
  17. package/.next/server/app/_not-found/page.js +5 -4
  18. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  19. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  20. package/.next/server/app/admin/page/build-manifest.json +3 -3
  21. package/.next/server/app/admin/page.js +7 -6
  22. package/.next/server/app/admin/page.js.nft.json +1 -1
  23. package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  24. package/.next/server/app/admin/user/[id]/page/build-manifest.json +3 -3
  25. package/.next/server/app/admin/user/[id]/page.js +7 -6
  26. package/.next/server/app/admin/user/[id]/page.js.nft.json +1 -1
  27. package/.next/server/app/admin/user/[id]/page_client-reference-manifest.js +1 -1
  28. package/.next/server/app/api/admin/cnm-tags/route.js +10 -7
  29. package/.next/server/app/api/admin/cnm-tags/route.js.nft.json +1 -1
  30. package/.next/server/app/api/admin/dashboard/route.js +17 -16
  31. package/.next/server/app/api/admin/dashboard/route.js.nft.json +1 -1
  32. package/.next/server/app/api/admin/debug-logs/export/route.js +10 -8
  33. package/.next/server/app/api/admin/debug-logs/export/route.js.nft.json +1 -1
  34. package/.next/server/app/api/admin/debug-logs/route.js +9 -6
  35. package/.next/server/app/api/admin/debug-logs/route.js.nft.json +1 -1
  36. package/.next/server/app/api/admin/eula/accept/route/app-paths-manifest.json +3 -0
  37. package/.next/server/app/api/admin/eula/accept/route/build-manifest.json +12 -0
  38. package/.next/server/app/api/admin/eula/accept/route/server-reference-manifest.json +4 -0
  39. package/.next/server/app/api/admin/eula/accept/route.js +17 -0
  40. package/.next/server/app/api/admin/eula/accept/route.js.map +5 -0
  41. package/.next/server/app/api/admin/eula/accept/route.js.nft.json +1 -0
  42. package/.next/server/app/api/admin/eula/accept/route_client-reference-manifest.js +3 -0
  43. package/.next/server/app/api/admin/migrate-tags/route.js +6 -5
  44. package/.next/server/app/api/admin/migrate-tags/route.js.nft.json +1 -1
  45. package/.next/server/app/api/admin/system-reset/route.js +9 -3
  46. package/.next/server/app/api/admin/system-reset/route.js.nft.json +1 -1
  47. package/.next/server/app/api/admin/telemetry/route/app-paths-manifest.json +3 -0
  48. package/.next/server/app/api/admin/telemetry/route/build-manifest.json +12 -0
  49. package/.next/server/app/api/admin/telemetry/route/server-reference-manifest.json +4 -0
  50. package/.next/server/app/api/admin/telemetry/route.js +17 -0
  51. package/.next/server/app/api/admin/telemetry/route.js.map +5 -0
  52. package/.next/server/app/api/admin/telemetry/route.js.nft.json +1 -0
  53. package/.next/server/app/api/admin/telemetry/route_client-reference-manifest.js +3 -0
  54. package/.next/server/app/api/admin/users/[id]/detail/route.js +17 -16
  55. package/.next/server/app/api/admin/users/[id]/detail/route.js.nft.json +1 -1
  56. package/.next/server/app/api/admin/users/[id]/route.js +10 -6
  57. package/.next/server/app/api/admin/users/[id]/route.js.nft.json +1 -1
  58. package/.next/server/app/api/admin/users/route.js +10 -8
  59. package/.next/server/app/api/admin/users/route.js.nft.json +1 -1
  60. package/.next/server/app/api/ai/models/route.js +13 -14
  61. package/.next/server/app/api/ai/models/route.js.nft.json +1 -1
  62. package/.next/server/app/api/ai/test/route.js +15 -15
  63. package/.next/server/app/api/ai/test/route.js.nft.json +1 -1
  64. package/.next/server/app/api/analytics/route.js +21 -19
  65. package/.next/server/app/api/analytics/route.js.nft.json +1 -1
  66. package/.next/server/app/api/analyze/route.js +21 -19
  67. package/.next/server/app/api/analyze/route.js.nft.json +1 -1
  68. package/.next/server/app/api/auth/[...nextauth]/route.js +3 -3
  69. package/.next/server/app/api/auth/[...nextauth]/route.js.nft.json +1 -1
  70. package/.next/server/app/api/error-items/[id]/delete/route.js +10 -5
  71. package/.next/server/app/api/error-items/[id]/delete/route.js.nft.json +1 -1
  72. package/.next/server/app/api/error-items/[id]/figure/route.js +18 -17
  73. package/.next/server/app/api/error-items/[id]/figure/route.js.nft.json +1 -1
  74. package/.next/server/app/api/error-items/[id]/fix-latex/route.js +18 -17
  75. package/.next/server/app/api/error-items/[id]/fix-latex/route.js.nft.json +1 -1
  76. package/.next/server/app/api/error-items/[id]/geogebra/route.js +19 -18
  77. package/.next/server/app/api/error-items/[id]/geogebra/route.js.nft.json +1 -1
  78. package/.next/server/app/api/error-items/[id]/image/route.js +10 -7
  79. package/.next/server/app/api/error-items/[id]/image/route.js.nft.json +1 -1
  80. package/.next/server/app/api/error-items/[id]/notes/route.js +7 -4
  81. package/.next/server/app/api/error-items/[id]/notes/route.js.nft.json +1 -1
  82. package/.next/server/app/api/error-items/[id]/practice-records/route.js +10 -6
  83. package/.next/server/app/api/error-items/[id]/practice-records/route.js.nft.json +1 -1
  84. package/.next/server/app/api/error-items/[id]/reanswer/route.js +16 -15
  85. package/.next/server/app/api/error-items/[id]/reanswer/route.js.nft.json +1 -1
  86. package/.next/server/app/api/error-items/[id]/retag/route.js +18 -17
  87. package/.next/server/app/api/error-items/[id]/retag/route.js.nft.json +1 -1
  88. package/.next/server/app/api/error-items/[id]/route.js +12 -10
  89. package/.next/server/app/api/error-items/[id]/route.js.nft.json +1 -1
  90. package/.next/server/app/api/error-items/[id]/svg-animation/narration/route.js +18 -17
  91. package/.next/server/app/api/error-items/[id]/svg-animation/narration/route.js.nft.json +1 -1
  92. package/.next/server/app/api/error-items/[id]/svg-animation/route.js +18 -17
  93. package/.next/server/app/api/error-items/[id]/svg-animation/route.js.nft.json +1 -1
  94. package/.next/server/app/api/error-items/answer-space/route.js +8 -5
  95. package/.next/server/app/api/error-items/answer-space/route.js.nft.json +1 -1
  96. package/.next/server/app/api/error-items/batch-delete/route.js +7 -4
  97. package/.next/server/app/api/error-items/batch-delete/route.js.nft.json +1 -1
  98. package/.next/server/app/api/error-items/clear/route.js +10 -5
  99. package/.next/server/app/api/error-items/clear/route.js.nft.json +1 -1
  100. package/.next/server/app/api/error-items/export-questions/route.js +10 -9
  101. package/.next/server/app/api/error-items/export-questions/route.js.nft.json +1 -1
  102. package/.next/server/app/api/error-items/list/route.js +12 -10
  103. package/.next/server/app/api/error-items/list/route.js.nft.json +1 -1
  104. package/.next/server/app/api/error-items/route.js +23 -22
  105. package/.next/server/app/api/error-items/route.js.nft.json +1 -1
  106. package/.next/server/app/api/error-items/short/[shortId]/route.js +10 -6
  107. package/.next/server/app/api/error-items/short/[shortId]/route.js.nft.json +1 -1
  108. package/.next/server/app/api/error-items/similarity/route.js +10 -7
  109. package/.next/server/app/api/error-items/similarity/route.js.nft.json +1 -1
  110. package/.next/server/app/api/eula/status/route/app-paths-manifest.json +3 -0
  111. package/.next/server/app/api/eula/status/route/build-manifest.json +12 -0
  112. package/.next/server/app/api/eula/status/route/server-reference-manifest.json +4 -0
  113. package/.next/server/app/api/eula/status/route.js +17 -0
  114. package/.next/server/app/api/eula/status/route.js.map +5 -0
  115. package/.next/server/app/api/eula/status/route.js.nft.json +1 -0
  116. package/.next/server/app/api/eula/status/route_client-reference-manifest.js +3 -0
  117. package/.next/server/app/api/exams/[id]/questions/[questionId]/regenerate/route.js +19 -18
  118. package/.next/server/app/api/exams/[id]/questions/[questionId]/regenerate/route.js.nft.json +1 -1
  119. package/.next/server/app/api/exams/[id]/results/route.js +20 -19
  120. package/.next/server/app/api/exams/[id]/results/route.js.nft.json +1 -1
  121. package/.next/server/app/api/exams/[id]/retry/route.js +21 -19
  122. package/.next/server/app/api/exams/[id]/retry/route.js.nft.json +1 -1
  123. package/.next/server/app/api/exams/[id]/route.js +21 -20
  124. package/.next/server/app/api/exams/[id]/route.js.nft.json +1 -1
  125. package/.next/server/app/api/exams/route.js +20 -18
  126. package/.next/server/app/api/exams/route.js.nft.json +1 -1
  127. package/.next/server/app/api/export/route.js +11 -11
  128. package/.next/server/app/api/export/route.js.nft.json +1 -1
  129. package/.next/server/app/api/geogebra-analyze/route.js +20 -19
  130. package/.next/server/app/api/geogebra-analyze/route.js.nft.json +1 -1
  131. package/.next/server/app/api/health/route.js +2 -2
  132. package/.next/server/app/api/health/route.js.nft.json +1 -1
  133. package/.next/server/app/api/import/route.js +22 -21
  134. package/.next/server/app/api/import/route.js.nft.json +1 -1
  135. package/.next/server/app/api/import-batches/[id]/confirm-all/route.js +26 -25
  136. package/.next/server/app/api/import-batches/[id]/confirm-all/route.js.nft.json +1 -1
  137. package/.next/server/app/api/import-batches/[id]/fix-text/route.js +18 -17
  138. package/.next/server/app/api/import-batches/[id]/fix-text/route.js.nft.json +1 -1
  139. package/.next/server/app/api/import-batches/[id]/read/route.js +27 -26
  140. package/.next/server/app/api/import-batches/[id]/read/route.js.nft.json +1 -1
  141. package/.next/server/app/api/import-batches/[id]/retry/route.js +26 -25
  142. package/.next/server/app/api/import-batches/[id]/retry/route.js.nft.json +1 -1
  143. package/.next/server/app/api/import-batches/[id]/route.js +27 -26
  144. package/.next/server/app/api/import-batches/[id]/route.js.nft.json +1 -1
  145. package/.next/server/app/api/import-batches/[id]/start/route.js +27 -26
  146. package/.next/server/app/api/import-batches/[id]/start/route.js.nft.json +1 -1
  147. package/.next/server/app/api/import-batches/route.js +27 -26
  148. package/.next/server/app/api/import-batches/route.js.nft.json +1 -1
  149. package/.next/server/app/api/import-tasks/[id]/confirm/route.js +24 -23
  150. package/.next/server/app/api/import-tasks/[id]/confirm/route.js.nft.json +1 -1
  151. package/.next/server/app/api/import-tasks/[id]/read/route.js +24 -23
  152. package/.next/server/app/api/import-tasks/[id]/read/route.js.nft.json +1 -1
  153. package/.next/server/app/api/import-tasks/[id]/retry/route.js +26 -25
  154. package/.next/server/app/api/import-tasks/[id]/retry/route.js.nft.json +1 -1
  155. package/.next/server/app/api/import-tasks/[id]/route.js +24 -23
  156. package/.next/server/app/api/import-tasks/[id]/route.js.nft.json +1 -1
  157. package/.next/server/app/api/import-tasks/route.js +27 -26
  158. package/.next/server/app/api/import-tasks/route.js.nft.json +1 -1
  159. package/.next/server/app/api/initialize/route.js +9 -6
  160. package/.next/server/app/api/initialize/route.js.nft.json +1 -1
  161. package/.next/server/app/api/logs/frontend/route.js +9 -6
  162. package/.next/server/app/api/logs/frontend/route.js.nft.json +1 -1
  163. package/.next/server/app/api/minimax-code/checkin/route.js +10 -8
  164. package/.next/server/app/api/minimax-code/checkin/route.js.nft.json +1 -1
  165. package/.next/server/app/api/minimax-code/login/route.js +11 -7
  166. package/.next/server/app/api/minimax-code/login/route.js.nft.json +1 -1
  167. package/.next/server/app/api/minimax-code/route.js +8 -6
  168. package/.next/server/app/api/minimax-code/route.js.nft.json +1 -1
  169. package/.next/server/app/api/notebooks/[id]/retag/route.js +18 -16
  170. package/.next/server/app/api/notebooks/[id]/retag/route.js.nft.json +1 -1
  171. package/.next/server/app/api/notebooks/[id]/route.js +7 -5
  172. package/.next/server/app/api/notebooks/[id]/route.js.nft.json +1 -1
  173. package/.next/server/app/api/notebooks/route.js +7 -5
  174. package/.next/server/app/api/notebooks/route.js.nft.json +1 -1
  175. package/.next/server/app/api/openclaw/batch-upload/route.js +20 -20
  176. package/.next/server/app/api/openclaw/batch-upload/route.js.nft.json +1 -1
  177. package/.next/server/app/api/paper-groups/[id]/route.js +10 -7
  178. package/.next/server/app/api/paper-groups/[id]/route.js.nft.json +1 -1
  179. package/.next/server/app/api/paper-groups/route.js +11 -8
  180. package/.next/server/app/api/paper-groups/route.js.nft.json +1 -1
  181. package/.next/server/app/api/practice/generate/route.js +18 -17
  182. package/.next/server/app/api/practice/generate/route.js.nft.json +1 -1
  183. package/.next/server/app/api/practice/grade/route.js +18 -16
  184. package/.next/server/app/api/practice/grade/route.js.nft.json +1 -1
  185. package/.next/server/app/api/practice/record/[id]/route.js +19 -18
  186. package/.next/server/app/api/practice/record/[id]/route.js.nft.json +1 -1
  187. package/.next/server/app/api/practice/record/route.js +20 -19
  188. package/.next/server/app/api/practice/record/route.js.nft.json +1 -1
  189. package/.next/server/app/api/reanswer/route.js +19 -17
  190. package/.next/server/app/api/reanswer/route.js.nft.json +1 -1
  191. package/.next/server/app/api/register/route.js +5 -6
  192. package/.next/server/app/api/register/route.js.nft.json +1 -1
  193. package/.next/server/app/api/register/status/route.js +8 -7
  194. package/.next/server/app/api/register/status/route.js.nft.json +1 -1
  195. package/.next/server/app/api/requests/[id]/route.js +10 -6
  196. package/.next/server/app/api/requests/[id]/route.js.nft.json +1 -1
  197. package/.next/server/app/api/review/due/route.js +18 -17
  198. package/.next/server/app/api/review/due/route.js.nft.json +1 -1
  199. package/.next/server/app/api/settings/route.js +9 -8
  200. package/.next/server/app/api/settings/route.js.nft.json +1 -1
  201. package/.next/server/app/api/setup/route.js +10 -8
  202. package/.next/server/app/api/setup/route.js.nft.json +1 -1
  203. package/.next/server/app/api/stats/activity/route.js +11 -9
  204. package/.next/server/app/api/stats/activity/route.js.nft.json +1 -1
  205. package/.next/server/app/api/stats/practice/clear/route.js +9 -4
  206. package/.next/server/app/api/stats/practice/clear/route.js.nft.json +1 -1
  207. package/.next/server/app/api/stats/practice/route.js +9 -8
  208. package/.next/server/app/api/stats/practice/route.js.nft.json +1 -1
  209. package/.next/server/app/api/stats/repeated-mistakes/route.js +19 -17
  210. package/.next/server/app/api/stats/repeated-mistakes/route.js.nft.json +1 -1
  211. package/.next/server/app/api/stats/weak-tags/route.js +19 -17
  212. package/.next/server/app/api/stats/weak-tags/route.js.nft.json +1 -1
  213. package/.next/server/app/api/tags/route.js +9 -6
  214. package/.next/server/app/api/tags/route.js.nft.json +1 -1
  215. package/.next/server/app/api/tags/stats/route.js +9 -4
  216. package/.next/server/app/api/tags/stats/route.js.nft.json +1 -1
  217. package/.next/server/app/api/tags/suggestions/route.js +3 -3
  218. package/.next/server/app/api/tags/suggestions/route.js.nft.json +1 -1
  219. package/.next/server/app/api/tasks/route.js +11 -7
  220. package/.next/server/app/api/tasks/route.js.nft.json +1 -1
  221. package/.next/server/app/api/telemetry/route/app-paths-manifest.json +3 -0
  222. package/.next/server/app/api/telemetry/route/build-manifest.json +12 -0
  223. package/.next/server/app/api/telemetry/route/server-reference-manifest.json +4 -0
  224. package/.next/server/app/api/telemetry/route.js +15 -0
  225. package/.next/server/app/api/telemetry/route.js.map +5 -0
  226. package/.next/server/app/api/telemetry/route.js.nft.json +1 -0
  227. package/.next/server/app/api/telemetry/route_client-reference-manifest.js +3 -0
  228. package/.next/server/app/api/tts/[id]/route.js +10 -8
  229. package/.next/server/app/api/tts/[id]/route.js.nft.json +1 -1
  230. package/.next/server/app/api/tts/batch/route.js +14 -12
  231. package/.next/server/app/api/tts/batch/route.js.nft.json +1 -1
  232. package/.next/server/app/api/tts/route.js +12 -11
  233. package/.next/server/app/api/tts/route.js.nft.json +1 -1
  234. package/.next/server/app/api/tts/status/route.js +12 -11
  235. package/.next/server/app/api/tts/status/route.js.nft.json +1 -1
  236. package/.next/server/app/api/user/ai-consent/route.js +10 -5
  237. package/.next/server/app/api/user/ai-consent/route.js.nft.json +1 -1
  238. package/.next/server/app/api/user/route.js +18 -17
  239. package/.next/server/app/api/user/route.js.nft.json +1 -1
  240. package/.next/server/app/api/version/route.js +3 -3
  241. package/.next/server/app/api/version/route.js.nft.json +1 -1
  242. package/.next/server/app/error-items/[id]/page/build-manifest.json +3 -3
  243. package/.next/server/app/error-items/[id]/page.js +7 -6
  244. package/.next/server/app/error-items/[id]/page.js.nft.json +1 -1
  245. package/.next/server/app/error-items/[id]/page_client-reference-manifest.js +1 -1
  246. package/.next/server/app/eula/page/app-paths-manifest.json +3 -0
  247. package/.next/server/app/eula/page/build-manifest.json +22 -0
  248. package/.next/server/app/eula/page/next-font-manifest.json +11 -0
  249. package/.next/server/app/eula/page/react-loadable-manifest.json +1 -0
  250. package/.next/server/app/eula/page/server-reference-manifest.json +4 -0
  251. package/.next/server/app/eula/page.js +15 -0
  252. package/.next/server/app/eula/page.js.map +5 -0
  253. package/.next/server/app/eula/page.js.nft.json +1 -0
  254. package/.next/server/app/eula/page_client-reference-manifest.js +3 -0
  255. package/.next/server/app/exams/[id]/page/build-manifest.json +3 -3
  256. package/.next/server/app/exams/[id]/page.js +7 -6
  257. package/.next/server/app/exams/[id]/page.js.nft.json +1 -1
  258. package/.next/server/app/exams/[id]/page_client-reference-manifest.js +1 -1
  259. package/.next/server/app/exams/[id]/print/page/build-manifest.json +3 -3
  260. package/.next/server/app/exams/[id]/print/page.js +7 -6
  261. package/.next/server/app/exams/[id]/print/page.js.nft.json +1 -1
  262. package/.next/server/app/exams/[id]/print/page_client-reference-manifest.js +1 -1
  263. package/.next/server/app/exams/page/build-manifest.json +3 -3
  264. package/.next/server/app/exams/page.js +7 -6
  265. package/.next/server/app/exams/page.js.nft.json +1 -1
  266. package/.next/server/app/exams/page_client-reference-manifest.js +1 -1
  267. package/.next/server/app/favicon.ico/route.js +2 -2
  268. package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  269. package/.next/server/app/import-batches/[id]/page/build-manifest.json +3 -3
  270. package/.next/server/app/import-batches/[id]/page.js +7 -6
  271. package/.next/server/app/import-batches/[id]/page.js.nft.json +1 -1
  272. package/.next/server/app/import-batches/[id]/page_client-reference-manifest.js +1 -1
  273. package/.next/server/app/import-tasks/[id]/page/build-manifest.json +3 -3
  274. package/.next/server/app/import-tasks/[id]/page.js +7 -6
  275. package/.next/server/app/import-tasks/[id]/page.js.nft.json +1 -1
  276. package/.next/server/app/import-tasks/[id]/page_client-reference-manifest.js +1 -1
  277. package/.next/server/app/import-tasks/page/build-manifest.json +3 -3
  278. package/.next/server/app/import-tasks/page.js +7 -6
  279. package/.next/server/app/import-tasks/page.js.nft.json +1 -1
  280. package/.next/server/app/import-tasks/page_client-reference-manifest.js +1 -1
  281. package/.next/server/app/initialize/page/build-manifest.json +3 -3
  282. package/.next/server/app/initialize/page.js +7 -6
  283. package/.next/server/app/initialize/page.js.nft.json +1 -1
  284. package/.next/server/app/initialize/page_client-reference-manifest.js +1 -1
  285. package/.next/server/app/login/page/build-manifest.json +3 -3
  286. package/.next/server/app/login/page.js +7 -6
  287. package/.next/server/app/login/page.js.nft.json +1 -1
  288. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  289. package/.next/server/app/manifest.webmanifest/route.js +2 -2
  290. package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  291. package/.next/server/app/notebooks/[id]/add/page/build-manifest.json +3 -3
  292. package/.next/server/app/notebooks/[id]/add/page.js +7 -6
  293. package/.next/server/app/notebooks/[id]/add/page.js.nft.json +1 -1
  294. package/.next/server/app/notebooks/[id]/add/page_client-reference-manifest.js +1 -1
  295. package/.next/server/app/notebooks/[id]/page/build-manifest.json +3 -3
  296. package/.next/server/app/notebooks/[id]/page.js +7 -6
  297. package/.next/server/app/notebooks/[id]/page.js.nft.json +1 -1
  298. package/.next/server/app/notebooks/[id]/page_client-reference-manifest.js +1 -1
  299. package/.next/server/app/notebooks/page/build-manifest.json +3 -3
  300. package/.next/server/app/notebooks/page.js +7 -6
  301. package/.next/server/app/notebooks/page.js.nft.json +1 -1
  302. package/.next/server/app/notebooks/page_client-reference-manifest.js +1 -1
  303. package/.next/server/app/page/build-manifest.json +3 -3
  304. package/.next/server/app/page.js +7 -6
  305. package/.next/server/app/page.js.nft.json +1 -1
  306. package/.next/server/app/page_client-reference-manifest.js +1 -1
  307. package/.next/server/app/practice/page/build-manifest.json +3 -3
  308. package/.next/server/app/practice/page.js +7 -6
  309. package/.next/server/app/practice/page.js.nft.json +1 -1
  310. package/.next/server/app/practice/page_client-reference-manifest.js +1 -1
  311. package/.next/server/app/print-preview/page/build-manifest.json +3 -3
  312. package/.next/server/app/print-preview/page.js +7 -6
  313. package/.next/server/app/print-preview/page.js.nft.json +1 -1
  314. package/.next/server/app/print-preview/page_client-reference-manifest.js +1 -1
  315. package/.next/server/app/register/page/build-manifest.json +3 -3
  316. package/.next/server/app/register/page.js +7 -6
  317. package/.next/server/app/register/page.js.nft.json +1 -1
  318. package/.next/server/app/register/page_client-reference-manifest.js +1 -1
  319. package/.next/server/app/review/page/build-manifest.json +3 -3
  320. package/.next/server/app/review/page.js +7 -6
  321. package/.next/server/app/review/page.js.nft.json +1 -1
  322. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  323. package/.next/server/app/setup/page/build-manifest.json +3 -3
  324. package/.next/server/app/setup/page.js +7 -6
  325. package/.next/server/app/setup/page.js.nft.json +1 -1
  326. package/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  327. package/.next/server/app/stats/page/build-manifest.json +3 -3
  328. package/.next/server/app/stats/page.js +7 -6
  329. package/.next/server/app/stats/page.js.nft.json +1 -1
  330. package/.next/server/app/stats/page_client-reference-manifest.js +1 -1
  331. package/.next/server/app/tags/page/build-manifest.json +3 -3
  332. package/.next/server/app/tags/page.js +6 -5
  333. package/.next/server/app/tags/page.js.nft.json +1 -1
  334. package/.next/server/app/tags/page_client-reference-manifest.js +1 -1
  335. package/.next/server/app-paths-manifest.json +5 -0
  336. package/.next/server/chunks/[externals]__0474k1hipw6rt._.js +3 -0
  337. package/.next/server/chunks/{[externals]__1_ij0r5wb4t30._.js → [externals]__0bh0f5epkjz_a._.js} +1 -1
  338. package/.next/server/chunks/[externals]__0ojjzq4kzrq1o._.js +3 -0
  339. package/.next/server/chunks/{[externals]__1i7c9m3y35e80._.js → [externals]__13nx5i-mvmw8a._.js} +1 -1
  340. package/.next/server/chunks/{[externals]__0fgpzedhhntg9._.js → [externals]__1_vx733h4gtoh._.js} +1 -1
  341. package/.next/server/chunks/{[externals]__0t1do1irr2px5._.js → [externals]__1egv8vt0vbzl9._.js} +1 -1
  342. package/.next/server/chunks/[externals]__1rtk9r0kf_2k2._.js +3 -0
  343. package/.next/server/chunks/{[root-of-the-server]__06-v15r8ror-q._.js → [root-of-the-server]__0-fpl-4ce-iyj._.js} +1 -1
  344. package/.next/server/chunks/[root-of-the-server]__017-5vo1u87jc._.js +3 -0
  345. package/.next/server/chunks/[root-of-the-server]__0191d7zm1bh5y._.js +3 -0
  346. package/.next/server/chunks/{[root-of-the-server]__0hcbw1sliw973._.js → [root-of-the-server]__04g1e8vi5hfmd._.js} +1 -1
  347. package/.next/server/chunks/[root-of-the-server]__063yyz_9kliuv._.js +3 -0
  348. package/.next/server/chunks/{[root-of-the-server]__05pxdy586nh8a._.js → [root-of-the-server]__06p98x_tv1foa._.js} +1 -1
  349. package/.next/server/chunks/[root-of-the-server]__06zr2kkbkdddm._.js +3 -0
  350. package/.next/server/chunks/{[root-of-the-server]__0-zi_nkxp9dof._.js → [root-of-the-server]__07fsx1y8aa-7l._.js} +1 -1
  351. package/.next/server/chunks/{[root-of-the-server]__0ef-17j7yp2n5._.js → [root-of-the-server]__07tka5n0kbed7._.js} +1 -1
  352. package/.next/server/chunks/[root-of-the-server]__09jqnx_673l93._.js +1 -1
  353. package/.next/server/chunks/{[root-of-the-server]__05wem-_dvlzug._.js → [root-of-the-server]__09re9q5tsyprr._.js} +1 -1
  354. package/.next/server/chunks/{[root-of-the-server]__032tjseth76z3._.js → [root-of-the-server]__09tf4b1-063yn._.js} +1 -1
  355. package/.next/server/chunks/[root-of-the-server]__0abb0_151j5sb._.js +3 -0
  356. package/.next/server/chunks/[root-of-the-server]__0c7btjinzvmj3._.js +3 -0
  357. package/.next/server/chunks/[root-of-the-server]__0dpk56pxg3xh0._.js +3 -0
  358. package/.next/server/chunks/{[root-of-the-server]__02kuxxv4mod1v._.js → [root-of-the-server]__0dqk6jms3f_58._.js} +2 -2
  359. package/.next/server/chunks/{[root-of-the-server]__0_e69dt7jrpui._.js → [root-of-the-server]__0e6jc57nsnwz0._.js} +2 -2
  360. package/.next/server/chunks/[root-of-the-server]__0ehmpofr_lag1._.js +3 -0
  361. package/.next/server/chunks/[root-of-the-server]__0eksw09qkfp-z._.js +3 -0
  362. package/.next/server/chunks/[root-of-the-server]__0euaxkmzk9kv8._.js +3 -0
  363. package/.next/server/chunks/[root-of-the-server]__0evv12a34qcy6._.js +2 -2
  364. package/.next/server/chunks/[root-of-the-server]__0g-4jw7pw15nc._.js +3 -0
  365. package/.next/server/chunks/[root-of-the-server]__0h82l-5c5x36d._.js +3 -0
  366. package/.next/server/chunks/{[root-of-the-server]__08iizowhy6p3l._.js → [root-of-the-server]__0haqb2u-0wd6e._.js} +2 -2
  367. package/.next/server/chunks/{[root-of-the-server]__094ybs6y_fmt5._.js → [root-of-the-server]__0hiv6ho-1ced7._.js} +2 -2
  368. package/.next/server/chunks/[root-of-the-server]__0hypc-hsxhr5m._.js +3 -0
  369. package/.next/server/chunks/{[root-of-the-server]__0eyqs-2hri164._.js → [root-of-the-server]__0hzh1vkuuv1uk._.js} +2 -2
  370. package/.next/server/chunks/[root-of-the-server]__0k0-c4brxlw-a._.js +3 -0
  371. package/.next/server/chunks/[root-of-the-server]__0k_gflpw7m236._.js +3 -0
  372. package/.next/server/chunks/[root-of-the-server]__0km5gt590jg97._.js +3 -0
  373. package/.next/server/chunks/[root-of-the-server]__0llcnfms-yrs4._.js +3 -0
  374. package/.next/server/chunks/[root-of-the-server]__0mgpyw67pdn1h._.js +3 -0
  375. package/.next/server/chunks/[root-of-the-server]__0mztg1mhr7xw2._.js +3 -0
  376. package/.next/server/chunks/[root-of-the-server]__0n9xugvjq0zol._.js +3 -0
  377. package/.next/server/chunks/[root-of-the-server]__0ni89i2lbtpir._.js +3 -0
  378. package/.next/server/chunks/[root-of-the-server]__0nqc3uu_4-moq._.js +3 -0
  379. package/.next/server/chunks/[root-of-the-server]__0nu-b-ap5ix-i._.js +3 -0
  380. package/.next/server/chunks/[root-of-the-server]__0o72hu-jqh_kc._.js +3 -0
  381. package/.next/server/chunks/[root-of-the-server]__0obmdl7r6pt9d._.js +3 -0
  382. package/.next/server/chunks/[root-of-the-server]__0q6of-nw_4lh-._.js +3 -0
  383. package/.next/server/chunks/[root-of-the-server]__0qyqo6m38w5z7._.js +3 -0
  384. package/.next/server/chunks/{[root-of-the-server]__0v3y7_fc4q7mu._.js → [root-of-the-server]__0rxdei7la2kkf._.js} +1 -1
  385. package/.next/server/chunks/[root-of-the-server]__0s1-3vrrlq54r._.js +3 -0
  386. package/.next/server/chunks/[root-of-the-server]__0shmk9rqg_zs_._.js +3 -0
  387. package/.next/server/chunks/[root-of-the-server]__0sr8vnpwvch60._.js +3 -0
  388. package/.next/server/chunks/[root-of-the-server]__0szw35uwpyccm._.js +3 -0
  389. package/.next/server/chunks/[root-of-the-server]__0u2_7w3b4f_c1._.js +3 -0
  390. package/.next/server/chunks/{[root-of-the-server]__0g3w0_9__ljck._.js → [root-of-the-server]__0u_jxskyhdl4l._.js} +1 -1
  391. package/.next/server/chunks/[root-of-the-server]__0v1-d_ribj2jd._.js +3 -0
  392. package/.next/server/chunks/[root-of-the-server]__0w_dr_s2zzqcd._.js +3 -0
  393. package/.next/server/chunks/[root-of-the-server]__0wpt1mx3kryp7._.js +3 -0
  394. package/.next/server/chunks/[root-of-the-server]__0wug5gswjt2zt._.js +3 -0
  395. package/.next/server/chunks/[root-of-the-server]__0xj4u1plpkmot._.js +3 -0
  396. package/.next/server/chunks/{[root-of-the-server]__1ve60byz8pq4j._.js → [root-of-the-server]__0y0v79zd4u8g0._.js} +2 -2
  397. package/.next/server/chunks/[root-of-the-server]__0y82146_dftio._.js +3 -0
  398. package/.next/server/chunks/{[root-of-the-server]__1edbiu94nqqym._.js → [root-of-the-server]__0yf1e2v3dwhh5._.js} +2 -2
  399. package/.next/server/chunks/{[root-of-the-server]__1w_yq12h-kxx0._.js → [root-of-the-server]__0yxdic8niq68m._.js} +2 -2
  400. package/.next/server/chunks/[root-of-the-server]__0z6act451-e8y._.js +3 -0
  401. package/.next/server/chunks/[root-of-the-server]__0zqnlrgdhvyvb._.js +3 -0
  402. package/.next/server/chunks/[root-of-the-server]__1-4kz5lwzu127._.js +3 -0
  403. package/.next/server/chunks/{[root-of-the-server]__0llbkrw8l2ib9._.js → [root-of-the-server]__1-gpls663uhw2._.js} +1 -1
  404. package/.next/server/chunks/[root-of-the-server]__1-ityr2iq9e-w._.js +3 -0
  405. package/.next/server/chunks/[root-of-the-server]__1-sow_jqu0ca5._.js +3 -0
  406. package/.next/server/chunks/[root-of-the-server]__1-uyaylss8lu0._.js +3 -0
  407. package/.next/server/chunks/[root-of-the-server]__1-w4-6dnik6p3._.js +3 -0
  408. package/.next/server/chunks/[root-of-the-server]__1027cegzwspbv._.js +3 -0
  409. package/.next/server/chunks/[root-of-the-server]__106c17t6fe2s5._.js +3 -0
  410. package/.next/server/chunks/[root-of-the-server]__11jqvp7ydid38._.js +3 -0
  411. package/.next/server/chunks/[root-of-the-server]__11qp83z3-uyy2._.js +3 -0
  412. package/.next/server/chunks/[root-of-the-server]__11r530r-p2-n1._.js +3 -0
  413. package/.next/server/chunks/[root-of-the-server]__11vx3bv6nef_u._.js +3 -0
  414. package/.next/server/chunks/[root-of-the-server]__123mmhkfg7y-y._.js +3 -0
  415. package/.next/server/chunks/[root-of-the-server]__128lq-3z36850._.js +3 -0
  416. package/.next/server/chunks/[root-of-the-server]__14g_ger_h73lc._.js +3 -0
  417. package/.next/server/chunks/[root-of-the-server]__15auml0twano9._.js +3 -0
  418. package/.next/server/chunks/[root-of-the-server]__1752yqg4c8167._.js +3 -0
  419. package/.next/server/chunks/[root-of-the-server]__189bp--__jedg._.js +3 -0
  420. package/.next/server/chunks/[root-of-the-server]__19iyo44u41f6y._.js +3 -0
  421. package/.next/server/chunks/[root-of-the-server]__1a6hu09up7_co._.js +3 -0
  422. package/.next/server/chunks/[root-of-the-server]__1a_qtu7129ho6._.js +3 -0
  423. package/.next/server/chunks/[root-of-the-server]__1add4tef8riya._.js +3 -0
  424. package/.next/server/chunks/[root-of-the-server]__1assq-8cgzn69._.js +3 -0
  425. package/.next/server/chunks/[root-of-the-server]__1bdwqmj_bolrp._.js +3 -0
  426. package/.next/server/chunks/[root-of-the-server]__1c6ti0495jkvs._.js +3 -0
  427. package/.next/server/chunks/[root-of-the-server]__1c7b35-fdxgfn._.js +3 -0
  428. package/.next/server/chunks/[root-of-the-server]__1cda8yccka8pg._.js +3 -0
  429. package/.next/server/chunks/[root-of-the-server]__1d7_aw9ogigrd._.js +3 -0
  430. package/.next/server/chunks/[root-of-the-server]__1drgctbrp51zt._.js +3 -0
  431. package/.next/server/chunks/[root-of-the-server]__1dxi3-rtvg91t._.js +3 -0
  432. package/.next/server/chunks/[root-of-the-server]__1e8_j43j1t1m3._.js +2 -2
  433. package/.next/server/chunks/[root-of-the-server]__1edl3mpo9urp-._.js +3 -0
  434. package/.next/server/chunks/[root-of-the-server]__1g-_sfdjkcyjn._.js +3 -0
  435. package/.next/server/chunks/{[root-of-the-server]__0kehix4ojdnhw._.js → [root-of-the-server]__1goozrpjh5dhf._.js} +1 -1
  436. package/.next/server/chunks/[root-of-the-server]__1hdm1t67mdd4k._.js +3 -0
  437. package/.next/server/chunks/[root-of-the-server]__1iy2ggxzd3waf._.js +3 -0
  438. package/.next/server/chunks/[root-of-the-server]__1j749v4z8i78u._.js +3 -0
  439. package/.next/server/chunks/[root-of-the-server]__1jxcq-zd_xo0q._.js +3 -0
  440. package/.next/server/chunks/[root-of-the-server]__1kucx2jgzzdfv._.js +3 -0
  441. package/.next/server/chunks/[root-of-the-server]__1kwxq6h_s1nw5._.js +3 -0
  442. package/.next/server/chunks/[root-of-the-server]__1l63lc79i6lzk._.js +3 -0
  443. package/.next/server/chunks/[root-of-the-server]__1lvrzjzsadms_._.js +3 -0
  444. package/.next/server/chunks/[root-of-the-server]__1m6lbueple6ww._.js +3 -0
  445. package/.next/server/chunks/[root-of-the-server]__1o2w0n3t390ih._.js +3 -0
  446. package/.next/server/chunks/[root-of-the-server]__1oynoaepf6enj._.js +3 -0
  447. package/.next/server/chunks/[root-of-the-server]__1p1k9cmts3crw._.js +3 -0
  448. package/.next/server/chunks/[root-of-the-server]__1purwqhaw584e._.js +3 -0
  449. package/.next/server/chunks/[root-of-the-server]__1pvdepfrlr1-e._.js +3 -0
  450. package/.next/server/chunks/[root-of-the-server]__1qe3_j74hbt45._.js +3 -0
  451. package/.next/server/chunks/[root-of-the-server]__1qmbbudn1-e1n._.js +3 -0
  452. package/.next/server/chunks/[root-of-the-server]__1qp07f8m-pjqu._.js +3 -0
  453. package/.next/server/chunks/[root-of-the-server]__1qr9n5maimy60._.js +3 -0
  454. package/.next/server/chunks/[root-of-the-server]__1qzw098fzq6r4._.js +3 -0
  455. package/.next/server/chunks/[root-of-the-server]__1r2swm8swgb8u._.js +3 -0
  456. package/.next/server/chunks/[root-of-the-server]__1s4kh7tqvbssy._.js +3 -0
  457. package/.next/server/chunks/[root-of-the-server]__1socdh68x-_68._.js +3 -0
  458. package/.next/server/chunks/[root-of-the-server]__1t9nlkh7u11c9._.js +3 -0
  459. package/.next/server/chunks/[root-of-the-server]__1th48iu_ygy4m._.js +3 -0
  460. package/.next/server/chunks/[root-of-the-server]__1tznn8iry7lns._.js +3 -0
  461. package/.next/server/chunks/[root-of-the-server]__1u64nidrg-gwq._.js +3 -0
  462. package/.next/server/chunks/[root-of-the-server]__1uxhodktwnw08._.js +3 -0
  463. package/.next/server/chunks/[root-of-the-server]__1uxxzcdw7avod._.js +3 -0
  464. package/.next/server/chunks/[root-of-the-server]__1v6k289his7kx._.js +3 -0
  465. package/.next/server/chunks/[root-of-the-server]__1y-867werf6-u._.js +3 -0
  466. package/.next/server/chunks/[root-of-the-server]__20an2fcjw_r3_._.js +3 -0
  467. package/.next/server/chunks/[root-of-the-server]__20vr6ko8apn2_._.js +3 -0
  468. package/.next/server/chunks/[root-of-the-server]__2113u3fu2bhjr._.js +3 -0
  469. package/.next/server/chunks/_0-cbnx3g3djb0._.js +3 -0
  470. package/.next/server/chunks/_00vu1-junzbq-._.js +3 -0
  471. package/.next/server/chunks/_011-ll5i30j2e._.js +1 -1
  472. package/.next/server/chunks/_029zt0rilrwvt._.js +1 -1
  473. package/.next/server/chunks/_02h2mvtyvz-d4._.js +3 -0
  474. package/.next/server/chunks/{_0tkov27xr068i._.js → _02qwqg9i39x4_._.js} +3 -3
  475. package/.next/server/chunks/_03ovgh1-4xf3f._.js +1 -1
  476. package/.next/server/chunks/_04yszb9aq_8-5._.js +3 -0
  477. package/.next/server/chunks/_06pseal2zu-71._.js +1 -1
  478. package/.next/server/chunks/_07_mi9-a9cp01._.js +3 -0
  479. package/.next/server/chunks/_08i9pskmlafnp._.js +1 -1
  480. package/.next/server/chunks/_0_3_65z6ak-5i._.js +1 -1
  481. package/.next/server/chunks/_0_5s2mrhxb3-u._.js +1 -1
  482. package/.next/server/chunks/_0b2q7l141kz7e._.js +3 -0
  483. package/.next/server/chunks/_0d66myj_8567o._.js +1 -1
  484. package/.next/server/chunks/_0dnqbyfo7_68d._.js +3 -0
  485. package/.next/server/chunks/_0fvn09pm56f5c._.js +3 -0
  486. package/.next/server/chunks/_0h1rbua_hqkox._.js +1 -1
  487. package/.next/server/chunks/_0i58-g30ox5-8._.js +1 -1
  488. package/.next/server/chunks/_0ji5ibtw-dxaz._.js +3 -0
  489. package/.next/server/chunks/_0l_1b3meaox2k._.js +3 -0
  490. package/.next/server/chunks/_0ljzic33s4u5j._.js +3 -0
  491. package/.next/server/chunks/_0mq_6jxyfb22z._.js +3 -0
  492. package/.next/server/chunks/_0msz759j3_j49._.js +3 -0
  493. package/.next/server/chunks/_0mt2ctbvzfero._.js +1 -1
  494. package/.next/server/chunks/_0oppr1mpoh25l._.js +3 -0
  495. package/.next/server/chunks/_0pthtmszsqkbw._.js +3 -0
  496. package/.next/server/chunks/_0qabe5g22z5te._.js +3 -0
  497. package/.next/server/chunks/_0qsv4bj01yqql._.js +3 -0
  498. package/.next/server/chunks/_0r8u30vd4lix4._.js +1 -1
  499. package/.next/server/chunks/_0t2z6hqe_64cx._.js +3 -0
  500. package/.next/server/chunks/_0tl0cy5j96d7h._.js +1 -1
  501. package/.next/server/chunks/_0vl9yb309ero1._.js +3 -0
  502. package/.next/server/chunks/_0xrmor_-l-mb7._.js +3 -0
  503. package/.next/server/chunks/_0zs7jfzzshbfq._.js +1 -1
  504. package/.next/server/chunks/_12dxzk9gyci2a._.js +3 -0
  505. package/.next/server/chunks/_12i51zlq-xxrl._.js +1 -1
  506. package/.next/server/chunks/_12w5k19rc45j_._.js +1 -1
  507. package/.next/server/chunks/_12xi_xqvtrn3k._.js +1 -1
  508. package/.next/server/chunks/_14l8uqb__fhx_._.js +3 -0
  509. package/.next/server/chunks/_18hm5aaxkr500._.js +1 -1
  510. package/.next/server/chunks/_1a1aqmie1d3u_._.js +1 -1
  511. package/.next/server/chunks/_1a1udq0c4_6ad._.js +1 -1
  512. package/.next/server/chunks/_1ahi8466v1b3l._.js +1 -1
  513. package/.next/server/chunks/_1b0269xt-c8f7._.js +1 -1
  514. package/.next/server/chunks/{_1638xaazsmf2m._.js → _1csx8ckltgali._.js} +3 -3
  515. package/.next/server/chunks/_1cydcmia78z15._.js +1 -1
  516. package/.next/server/chunks/_1ds1oiznivdbk._.js +3 -0
  517. package/.next/server/chunks/_1e8w9uuebtrcb._.js +1 -1
  518. package/.next/server/chunks/_1eixvuh0vryjo._.js +3 -0
  519. package/.next/server/chunks/_1eqnx6dcz6a03._.js +57 -0
  520. package/.next/server/chunks/{_1vddun9dxzaqo._.js → _1gtuhmdu6udof._.js} +3 -3
  521. package/.next/server/chunks/_1h650rc49jtvn._.js +3 -0
  522. package/.next/server/chunks/_1hj7iit2u6xez._.js +1 -1
  523. package/.next/server/chunks/_1iqu8im2_w245._.js +3 -0
  524. package/.next/server/chunks/_1llkon9veg476._.js +3 -0
  525. package/.next/server/chunks/_1muwmr6j76v3m._.js +1 -1
  526. package/.next/server/chunks/_1ooq1_fguyb4w._.js +57 -0
  527. package/.next/server/chunks/_1op7hx6zu6ybj._.js +3 -0
  528. package/.next/server/chunks/_1pvqo-qnv-nqm._.js +1 -1
  529. package/.next/server/chunks/_1pzo4q3yg5f57._.js +3 -0
  530. package/.next/server/chunks/_1q65ai1_dwgjp._.js +1 -1
  531. package/.next/server/chunks/_1q6syu3thw-it._.js +3 -0
  532. package/.next/server/chunks/_1s5-ldt8xhtpp._.js +1 -1
  533. package/.next/server/chunks/_1sp0xk1c5jx5r._.js +1 -1
  534. package/.next/server/chunks/_1u9u2jcj407s4._.js +3 -0
  535. package/.next/server/chunks/_1yk4m2dpf3g7z._.js +3 -0
  536. package/.next/server/chunks/_1yvd01woddaxt._.js +16 -0
  537. package/.next/server/chunks/_1z1uutzmdk81m._.js +3 -0
  538. package/.next/server/chunks/_1z_ujac_e_65s._.js +1 -1
  539. package/.next/server/chunks/_next-internal_server_app_api_admin_eula_accept_route_actions_20oa2r1dtaq8b.js +3 -0
  540. package/.next/server/chunks/_next-internal_server_app_api_admin_telemetry_route_actions_0tkd4wktkie81.js +3 -0
  541. package/.next/server/chunks/_next-internal_server_app_api_eula_status_route_actions_1aquilgqufvjg.js +3 -0
  542. package/.next/server/chunks/_next-internal_server_app_api_telemetry_route_actions_1w3amzmkajq41.js +3 -0
  543. package/.next/server/chunks/node_modules_zod_v4_classic_external_0yua5dbpvcjkf.js +57 -0
  544. package/.next/server/chunks/src_1m8nu0emt57j7._.js +3 -0
  545. package/.next/server/chunks/src_lib_01gngn1m9i35_._.js +3 -0
  546. package/.next/server/chunks/src_lib_02gzfin88m7_c._.js +3 -0
  547. package/.next/server/chunks/src_lib_02ktrqkdh6_xt._.js +1 -1
  548. package/.next/server/chunks/src_lib_0iplyaedosuse._.js +3 -0
  549. package/.next/server/chunks/src_lib_0uv8inw48qq9_._.js +3 -0
  550. package/.next/server/chunks/src_lib_1-tyfr__vw2-e._.js +3 -0
  551. package/.next/server/chunks/src_lib_112p9x7kbw8a7._.js +3 -0
  552. package/.next/server/chunks/src_lib_11y241q--pwf_._.js +3 -0
  553. package/.next/server/chunks/src_lib_152-vqegmmtew._.js +3 -0
  554. package/.next/server/chunks/src_lib_17vggusj2wk07._.js +3 -0
  555. package/.next/server/chunks/src_lib_17ww8fw26k_5c._.js +3 -0
  556. package/.next/server/chunks/{src_lib_mastery-status_ts_0e9jnp-14tby5._.js → src_lib_19wyrgsqc6869._.js} +2 -2
  557. package/.next/server/chunks/src_lib_1bzw3hjm_9u2p._.js +3 -0
  558. package/.next/server/chunks/src_lib_1je9q_qxmd-z0._.js +3 -0
  559. package/.next/server/chunks/src_lib_1x_55q3hwt0z5._.js +3 -0
  560. package/.next/server/chunks/src_lib_1yw_vc01va60_._.js +3 -0
  561. package/.next/server/chunks/src_lib_1z24jdjfkbdxm._.js +3 -0
  562. package/.next/server/chunks/src_lib_ai_index_ts_0m0hlq4d9zy9i._.js +1 -1
  563. package/.next/server/chunks/src_lib_config_index_ts_14-9cq9wn5r30._.js +3 -0
  564. package/.next/server/chunks/src_lib_exam_exam_ts_18c3t7bnr1z5k._.js +1 -1
  565. package/.next/server/chunks/src_lib_import_import-batches_ts_0nq3mn0v5uj28._.js +1 -1
  566. package/.next/server/chunks/src_lib_import_import-tasks_ts_01f-g_upv7llt._.js +1 -1
  567. package/.next/server/chunks/src_lib_initialization_ts_0uk331d512nu-._.js +1 -55
  568. package/.next/server/chunks/src_lib_mastery_ts_0ybi94uxn8ut6._.js +1 -1
  569. package/.next/server/chunks/src_lib_minimax-code_checkin_ts_1j1mpuxc1vgoz._.js +1 -1
  570. package/.next/server/chunks/src_lib_question_0uw17e6at-i_h._.js +1 -1
  571. package/.next/server/chunks/src_lib_question_question-analysis_ts_1-3x2cfxlr3fs._.js +1 -1
  572. package/.next/server/chunks/src_lib_question_question-deduplication_ts_0gumctesi3szc._.js +1 -1
  573. package/.next/server/chunks/src_lib_tags_retag_ts_09s5xwrzcy144._.js +1 -1
  574. package/.next/server/chunks/src_lib_telemetry_scheduler_ts_1tjvqtggkqnd3._.js +3 -0
  575. package/.next/server/chunks/src_lib_telemetry_server_ts_03e7c8dt4slbj._.js +3 -0
  576. package/.next/server/chunks/src_lib_telemetry_server_ts_04s9gvl8y_-5j._.js +3 -0
  577. package/.next/server/chunks/src_lib_telemetry_server_ts_0f78qhte267bg._.js +3 -0
  578. package/.next/server/chunks/src_lib_telemetry_server_ts_0hbu8_zacpzfj._.js +3 -0
  579. package/.next/server/chunks/src_lib_telemetry_server_ts_0k44kaxm3s7b7._.js +3 -0
  580. package/.next/server/chunks/src_lib_telemetry_server_ts_0mdq-bx1yd8hn._.js +3 -0
  581. package/.next/server/chunks/src_lib_telemetry_server_ts_0ptn-gkeht1dg._.js +3 -0
  582. package/.next/server/chunks/src_lib_telemetry_server_ts_0rul_098wmjn7._.js +3 -0
  583. package/.next/server/chunks/src_lib_telemetry_server_ts_10dl7t48m7u9e._.js +3 -0
  584. package/.next/server/chunks/src_lib_telemetry_server_ts_12x72t_dxd7w6._.js +3 -0
  585. package/.next/server/chunks/src_lib_telemetry_server_ts_15p258rq4wt4n._.js +3 -0
  586. package/.next/server/chunks/src_lib_telemetry_server_ts_15u7_y30fkz4t._.js +3 -0
  587. package/.next/server/chunks/src_lib_telemetry_server_ts_19h24quae1zdn._.js +3 -0
  588. package/.next/server/chunks/src_lib_telemetry_server_ts_1gl12ssni1itx._.js +3 -0
  589. package/.next/server/chunks/src_lib_telemetry_server_ts_20_hb8la0053f._.js +3 -0
  590. package/.next/server/chunks/ssr/{[root-of-the-server]__1ynp6nm1gttsf._.js → [root-of-the-server]__07r0cyk2wiaod._.js} +1 -1
  591. package/.next/server/chunks/ssr/[root-of-the-server]__09g6pf6gfjb-i._.js +3 -0
  592. package/.next/server/chunks/ssr/{[root-of-the-server]__0u9zu26bwv2sw._.js → [root-of-the-server]__09gavo7zzj_er._.js} +1 -1
  593. package/.next/server/chunks/ssr/{[root-of-the-server]__1y--gqu4r-u7n._.js → [root-of-the-server]__0_9dwjra-hhyw._.js} +1 -1
  594. package/.next/server/chunks/ssr/{[root-of-the-server]__11oag3aoydip3._.js → [root-of-the-server]__0fu4zixj0-za9._.js} +1 -1
  595. package/.next/server/chunks/ssr/[root-of-the-server]__0hwe448u3jb_t._.js +3 -0
  596. package/.next/server/chunks/ssr/{[root-of-the-server]__1u0_l34j65qiv._.js → [root-of-the-server]__0jbcpiby6tjob._.js} +1 -1
  597. package/.next/server/chunks/ssr/{[root-of-the-server]__0p9ee02rz9njl._.js → [root-of-the-server]__0r3n71d2cj4e3._.js} +1 -1
  598. package/.next/server/chunks/ssr/{[root-of-the-server]__1zupg0zigit-2._.js → [root-of-the-server]__0wggrh44x0vrr._.js} +1 -1
  599. package/.next/server/chunks/ssr/{[root-of-the-server]__09gkts39mwkt7._.js → [root-of-the-server]__0xdwwljmlu85-._.js} +1 -1
  600. package/.next/server/chunks/ssr/[root-of-the-server]__0xqrflqcz8t4j._.js +3 -0
  601. package/.next/server/chunks/ssr/[root-of-the-server]__0yizeg1yyhfse._.js +3 -0
  602. package/.next/server/chunks/ssr/{[root-of-the-server]__0qtqn7_slrnax._.js → [root-of-the-server]__0yr8no1v_1u-s._.js} +1 -1
  603. package/.next/server/chunks/ssr/{[root-of-the-server]__0oytrwzt_5qpb._.js → [root-of-the-server]__134g2tnpaqb56._.js} +1 -1
  604. package/.next/server/chunks/ssr/{[root-of-the-server]__0g3m2_o67ezes._.js → [root-of-the-server]__14--hf0oqh14t._.js} +1 -1
  605. package/.next/server/chunks/ssr/{[root-of-the-server]__1l68oxzjvj18_._.js → [root-of-the-server]__14_jos-hb89g5._.js} +1 -1
  606. package/.next/server/chunks/ssr/[root-of-the-server]__15pyhznlctw50._.js +3 -0
  607. package/.next/server/chunks/ssr/{[root-of-the-server]__09nzl4il765_h._.js → [root-of-the-server]__16l14wrfwv1gc._.js} +1 -1
  608. package/.next/server/chunks/ssr/{[root-of-the-server]__1ojkbjq8khldj._.js → [root-of-the-server]__17dyox02mhv1s._.js} +1 -1
  609. package/.next/server/chunks/ssr/{[root-of-the-server]__06epb5zt8i9nl._.js → [root-of-the-server]__17i6rp91oy5vo._.js} +1 -1
  610. package/.next/server/chunks/ssr/{[root-of-the-server]__1upuqpqeyi3o6._.js → [root-of-the-server]__18fxrwlkwgqei._.js} +1 -1
  611. package/.next/server/chunks/ssr/{[root-of-the-server]__0imb483i37k9-._.js → [root-of-the-server]__1am3lapew6zvw._.js} +1 -1
  612. package/.next/server/chunks/ssr/{[root-of-the-server]__0l_a_z149v59o._.js → [root-of-the-server]__1d9g9805jzj0h._.js} +1 -1
  613. package/.next/server/chunks/ssr/[root-of-the-server]__1de5zmmw9_i_0._.js +3 -0
  614. package/.next/server/chunks/ssr/{[root-of-the-server]__19q4cpy9jtu0k._.js → [root-of-the-server]__1ee8a1_v1nc_2._.js} +1 -1
  615. package/.next/server/chunks/ssr/{[root-of-the-server]__0gpba1ifag5cz._.js → [root-of-the-server]__1fc1plx5cvx-o._.js} +1 -1
  616. package/.next/server/chunks/ssr/{[root-of-the-server]__0lhmylur63dzg._.js → [root-of-the-server]__1hwfsg__jf-6s._.js} +1 -1
  617. package/.next/server/chunks/ssr/{[root-of-the-server]__12upjtzbfyt0p._.js → [root-of-the-server]__1lvng26o_-n10._.js} +1 -1
  618. package/.next/server/chunks/ssr/{[root-of-the-server]__1exslx8xrlonp._.js → [root-of-the-server]__1r7wmu7cq9bc5._.js} +1 -1
  619. package/.next/server/chunks/ssr/{[root-of-the-server]__0te5kr0_7nmrv._.js → [root-of-the-server]__1t2h6rz1x-gwk._.js} +2 -2
  620. package/.next/server/chunks/ssr/[root-of-the-server]__1vj6th0gehszy._.js +3 -0
  621. package/.next/server/chunks/ssr/{[root-of-the-server]__1qkpcqb6ewk9r._.js → [root-of-the-server]__212x4ujehvgfr._.js} +1 -1
  622. package/.next/server/chunks/ssr/_05k02824g2tpo._.js +1 -1
  623. package/.next/server/chunks/ssr/_0oo8k-upgx7hb._.js +3 -0
  624. package/.next/server/chunks/ssr/_0xlbgtld9_r3o._.js +1 -1
  625. package/.next/server/chunks/ssr/_0znwyf0_b8ia6._.js +3 -0
  626. package/.next/server/chunks/ssr/_117fl8dk5qci2._.js +4 -0
  627. package/.next/server/chunks/ssr/_18c4g09vqhp-3._.js +3 -0
  628. package/.next/server/chunks/ssr/_1dx7u1_w4db4k._.js +3 -0
  629. package/.next/server/chunks/ssr/_1dzto-s5j-b6b._.js +3 -0
  630. package/.next/server/chunks/ssr/_1fx20-rihohax._.js +3 -0
  631. package/.next/server/chunks/ssr/{_0j-r3zhz2ucmg._.js → _1h4fhwg03wbzm._.js} +2 -2
  632. package/.next/server/chunks/ssr/{_0fp_p60hb9ex8._.js → _1qft_czd2ss62._.js} +2 -2
  633. package/.next/server/chunks/ssr/_1x-_hs_sw5z1x._.js +3 -0
  634. package/.next/server/chunks/ssr/_next-internal_server_app_eula_page_actions_18tq_576rljb3.js +3 -0
  635. package/.next/server/chunks/ssr/{node_modules_0v4btraw_y7x2._.js → node_modules_0fzknrrqq1bjz._.js} +2 -2
  636. package/.next/server/chunks/ssr/node_modules_1fwhuynv-5kcg._.js +3 -0
  637. package/.next/server/chunks/ssr/{node_modules_next_dist_1gey_lsf9b_wo._.js → node_modules_1nyc7rcdp-qyz._.js} +2 -2
  638. package/.next/server/chunks/ssr/{node_modules_1im5by828hg3r._.js → node_modules_1rxrrb2v6tutq._.js} +1 -1
  639. package/.next/server/chunks/ssr/{node_modules_heic-to_dist_csp_heic-to_064ewwu8t3acv.js → node_modules_heic-to_dist_csp_heic-to_1klwivk06jo8p.js} +1 -1
  640. package/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_play_mjs_1al5hft92dlrg._.js +2 -2
  641. package/.next/server/chunks/ssr/node_modules_next_1uutai47hzn8q._.js +32 -0
  642. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_03wom3p0uk-9v.js +3 -0
  643. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_06g_36yw1w8hx.js +3 -0
  644. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0_e9pmhugyjn5.js +3 -0
  645. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0_sqodejj4l1-.js +3 -0
  646. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0ab3lk0549xld.js +3 -0
  647. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0ea7gndnxen5c.js +3 -0
  648. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0loue6y_0xsqm.js +3 -0
  649. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0srx187o85d67.js +3 -0
  650. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0zs2ei_cj_z60.js +3 -0
  651. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19g6es93ste47.js +3 -0
  652. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1aqwesdat2m1c.js +3 -0
  653. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1f4rp6x19w0vu.js +3 -0
  654. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1gap3wxqz0gtc.js +3 -0
  655. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1hmcb0hk2i14y.js +3 -0
  656. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1jhcfycewcquz.js +3 -0
  657. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1k7tflkgmqhi6.js +3 -0
  658. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1kb_ff04m4p78.js +3 -0
  659. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1kxecu5ukdyhb.js +3 -0
  660. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1lr4m6vwu8-gh.js +3 -0
  661. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1rw8e8leurt4c.js +3 -0
  662. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1w0trita-felf.js +3 -0
  663. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1whku467x2as5.js +3 -0
  664. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1wxysr9vu7w8g.js +3 -0
  665. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_20dal1y611l3i.js +3 -0
  666. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_20yzxgilgne8r.js +3 -0
  667. package/.next/server/chunks/ssr/node_modules_zod_v4_classic_external_0veaboc415l0m.js +1 -1
  668. package/.next/server/chunks/ssr/src_0atwwo6buvs3b._.js +3 -0
  669. package/.next/server/chunks/ssr/src_1gayunqs8u2e2._.js +1 -1
  670. package/.next/server/chunks/ssr/src_app_error-items_[id]_page_tsx_04xwwdmyh7_9q._.js +1 -1
  671. package/.next/server/chunks/ssr/src_app_error_tsx_0ac07bj196djj._.js +3 -0
  672. package/.next/server/chunks/ssr/src_app_error_tsx_1gs2ol2a9g-a6._.js +3 -0
  673. package/.next/server/chunks/ssr/src_app_eula_page_tsx_1_xs2xki0wk_k._.js +113 -0
  674. package/.next/server/chunks/ssr/src_app_exams_page_tsx_17_d4_gy2i1ds._.js +1 -1
  675. package/.next/server/chunks/ssr/src_app_global-error_tsx_009xrx8nk64k0._.js +3 -0
  676. package/.next/server/chunks/ssr/src_app_global-error_tsx_0w4-lfw52j65b._.js +3 -0
  677. package/.next/server/chunks/ssr/src_app_import-batches_[id]_page_tsx_0mhg_vriwmkkw._.js +1 -1
  678. package/.next/server/chunks/ssr/src_app_initialize_page_tsx_0v79s64spkms8._.js +1 -1
  679. package/.next/server/chunks/ssr/src_app_notebooks_[id]_add_page_tsx_179tow1ql6vc_._.js +1 -1
  680. package/.next/server/chunks/ssr/src_app_page_tsx_1chiuahujsxm1._.js +1 -1
  681. package/.next/server/chunks/ssr/src_components_correction-editor_tsx_1p7z02t66tndx._.js +3 -3
  682. package/.next/server/chunks/ssr/src_components_image-cropper_tsx_0pcp8-ifruyx-._.js +1 -1
  683. package/.next/server/chunks/ssr/src_components_providers_tsx_09kw-mv3nb6xs._.js +12 -12
  684. package/.next/server/chunks/ssr/src_components_ui_dialog_tsx_1tn-i_6d3rhzt._.js +1 -1
  685. package/.next/server/chunks/ssr/src_contexts_LanguageContext_tsx_0r6xucmeu1k5z._.js +3 -0
  686. package/.next/server/chunks/ssr/src_lib_api-client_ts_04r2_ex-gua5i._.js +1 -1
  687. package/.next/server/chunks/ssr/src_lib_i18n_en_ts_08zkpwnoqey5s._.js +1 -1
  688. package/.next/server/instrumentation.js +1 -1
  689. package/.next/server/middleware-build-manifest.js +64 -53
  690. package/.next/server/middleware.js +1 -1
  691. package/.next/server/next-font-manifest.js +1 -1
  692. package/.next/server/next-font-manifest.json +4 -0
  693. package/.next/server/pages/500.html +1 -1
  694. package/.next/server/preview-props.json +3 -3
  695. package/.next/server/server-reference-manifest.js +1 -1
  696. package/.next/server/server-reference-manifest.json +1 -1
  697. package/.next/static/chunks/04d8bsqt1kisy.js +1 -0
  698. package/.next/static/chunks/059tntkmkgtf4.js +1 -0
  699. package/.next/static/chunks/05ag8rqhwn73b.js +31 -0
  700. package/.next/static/chunks/05o2so3pmerou.js +38 -0
  701. package/.next/static/chunks/06-rkidj4bq0l.js +1 -0
  702. package/.next/static/chunks/08s9mla4gkon2.js +1 -0
  703. package/.next/static/chunks/0b49hpru2gjb1.js +111 -0
  704. package/.next/static/chunks/{0ddn90rrjkr7y.js → 0bufg6cl_1x2h.js} +4 -4
  705. package/.next/static/chunks/0li0d9ufsgsk-.js +1 -0
  706. package/.next/static/chunks/0xze-7xwdgel2.js +8 -0
  707. package/.next/static/chunks/{01zokrwums-fz.js → 0zesew8nd2ekz.js} +1 -1
  708. package/.next/static/chunks/16c0c5ykflqpn.js +1 -0
  709. package/.next/static/chunks/1797q5c62e7um.js +1 -0
  710. package/.next/static/chunks/1qb_yt4hvopfn.js +8 -0
  711. package/.next/static/chunks/{2eieglv-e8e1j.js → 1ti8akix3yalf.js} +1 -1
  712. package/.next/static/chunks/{3gdidqib5e1mw.js → 1u6m54j807_cw.js} +1 -1
  713. package/.next/static/chunks/1ziwji7xw98fj.js +9 -0
  714. package/.next/static/chunks/25jnmrgxyy1tx.js +1 -0
  715. package/.next/static/chunks/26r74vzqszcs5.js +2 -0
  716. package/.next/static/chunks/{07a3zn8uvj2i0.js → 2aifo9g5v8kaq.js} +1 -1
  717. package/.next/static/chunks/{1bcso9y60vl1j.js → 2da48dkivw_8a.js} +1 -1
  718. package/.next/static/chunks/2e4y6sq3k0g-g.js +1 -0
  719. package/.next/static/chunks/2fkobtei061tq.js +1 -0
  720. package/.next/static/chunks/2hroxfe_3_b0q.js +1 -0
  721. package/.next/static/chunks/{1-qu_z3i5b8ul.js → 34wzp7ret_83-.js} +1 -1
  722. package/.next/static/chunks/3_wki8y0qb28v.js +1 -0
  723. package/.next/static/chunks/3bq587l754kfc.js +198 -0
  724. package/.next/static/chunks/3bv2u8mcme1z4.css +3 -0
  725. package/.next/static/chunks/3g-l81pwd4ggm.js +1 -0
  726. package/.next/static/chunks/{1q3saz647fqri.js → 3ios-g8cm_1vz.js} +1 -1
  727. package/.next/static/chunks/3m5wl0uzrt4sz.js +2 -0
  728. package/.next/static/chunks/3x6gp12gnmsl2.js +1 -0
  729. package/.next/static/chunks/446h22_i8bm1_.js +1 -0
  730. package/launcher.js +2 -0
  731. package/package.json +1 -1
  732. package/prisma/migrations/20261105060458_ai_completion/migration.sql +23 -0
  733. package/prisma/migrations/20261105065127_external_account/migration.sql +17 -0
  734. package/prisma/migrations/20261105135634_add_telemetry_tables/migration.sql +45 -0
  735. package/prisma/schema.prisma +75 -0
  736. package/prisma/seed.db +0 -0
  737. package/server.js +1 -1
  738. package/.next/server/chunks/[externals]__1anmfgb7av8ou._.js +0 -3
  739. package/.next/server/chunks/[externals]__1j5vgk-wr4vpe._.js +0 -3
  740. package/.next/server/chunks/[externals]_fs_0pplqgcyv2l7l._.js +0 -3
  741. package/.next/server/chunks/[root-of-the-server]__0-d_vh1kcmw7g._.js +0 -3
  742. package/.next/server/chunks/[root-of-the-server]__00cl_lnn-40t3._.js +0 -3
  743. package/.next/server/chunks/[root-of-the-server]__00x5ad3w5zwfp._.js +0 -3
  744. package/.next/server/chunks/[root-of-the-server]__06i2kswg2zb80._.js +0 -3
  745. package/.next/server/chunks/[root-of-the-server]__06irm2njvcb2a._.js +0 -3
  746. package/.next/server/chunks/[root-of-the-server]__07twbtie04xx6._.js +0 -3
  747. package/.next/server/chunks/[root-of-the-server]__08wrx5aay9znc._.js +0 -3
  748. package/.next/server/chunks/[root-of-the-server]__092b1e081ocu6._.js +0 -3
  749. package/.next/server/chunks/[root-of-the-server]__092h03ec6f_1u._.js +0 -3
  750. package/.next/server/chunks/[root-of-the-server]__09aolocrwucnt._.js +0 -3
  751. package/.next/server/chunks/[root-of-the-server]__0_icvdlc-nqy_._.js +0 -3
  752. package/.next/server/chunks/[root-of-the-server]__0_uup9ppknahw._.js +0 -3
  753. package/.next/server/chunks/[root-of-the-server]__0aynxvfd9wp_r._.js +0 -3
  754. package/.next/server/chunks/[root-of-the-server]__0cgpuhmu87blm._.js +0 -3
  755. package/.next/server/chunks/[root-of-the-server]__0dv_e-7ip1wts._.js +0 -3
  756. package/.next/server/chunks/[root-of-the-server]__0ej9lsrmus5m4._.js +0 -3
  757. package/.next/server/chunks/[root-of-the-server]__0f8kzoc_gaf8y._.js +0 -3
  758. package/.next/server/chunks/[root-of-the-server]__0fembrq8pciz5._.js +0 -3
  759. package/.next/server/chunks/[root-of-the-server]__0g0van70ibkrj._.js +0 -3
  760. package/.next/server/chunks/[root-of-the-server]__0g2s86ce159k0._.js +0 -3
  761. package/.next/server/chunks/[root-of-the-server]__0g848ha1gy56h._.js +0 -3
  762. package/.next/server/chunks/[root-of-the-server]__0gankrx12ee4n._.js +0 -3
  763. package/.next/server/chunks/[root-of-the-server]__0hxujtysw2kwx._.js +0 -3
  764. package/.next/server/chunks/[root-of-the-server]__0ilrqq68_5wg5._.js +0 -3
  765. package/.next/server/chunks/[root-of-the-server]__0jh610iscvrmp._.js +0 -3
  766. package/.next/server/chunks/[root-of-the-server]__0ky9-3kyba1lu._.js +0 -3
  767. package/.next/server/chunks/[root-of-the-server]__0l3io0vyav4if._.js +0 -3
  768. package/.next/server/chunks/[root-of-the-server]__0lgbdth9-z6qg._.js +0 -3
  769. package/.next/server/chunks/[root-of-the-server]__0lwuci8tnhggb._.js +0 -3
  770. package/.next/server/chunks/[root-of-the-server]__0m4dmn-gj2fnm._.js +0 -3
  771. package/.next/server/chunks/[root-of-the-server]__0mfr1ne23y4yo._.js +0 -3
  772. package/.next/server/chunks/[root-of-the-server]__0mslax132s9jp._.js +0 -3
  773. package/.next/server/chunks/[root-of-the-server]__0ntfbtwf-s7a6._.js +0 -3
  774. package/.next/server/chunks/[root-of-the-server]__0of02idkcau3l._.js +0 -3
  775. package/.next/server/chunks/[root-of-the-server]__0ohg2cyilt44e._.js +0 -3
  776. package/.next/server/chunks/[root-of-the-server]__0p8cwd_go8pid._.js +0 -3
  777. package/.next/server/chunks/[root-of-the-server]__0rsgnrk2qy8wo._.js +0 -3
  778. package/.next/server/chunks/[root-of-the-server]__0si2-m5an9zl7._.js +0 -3
  779. package/.next/server/chunks/[root-of-the-server]__0svdqovwfpro2._.js +0 -3
  780. package/.next/server/chunks/[root-of-the-server]__0tsi6_qmtro9q._.js +0 -3
  781. package/.next/server/chunks/[root-of-the-server]__0tvp4sm4zx3wt._.js +0 -3
  782. package/.next/server/chunks/[root-of-the-server]__0u1fu9dvxmlxd._.js +0 -3
  783. package/.next/server/chunks/[root-of-the-server]__0ukr4xnposhv9._.js +0 -3
  784. package/.next/server/chunks/[root-of-the-server]__0v0tr1bn12xyu._.js +0 -3
  785. package/.next/server/chunks/[root-of-the-server]__0vazs1dmyut7b._.js +0 -3
  786. package/.next/server/chunks/[root-of-the-server]__0vrag-4p6eznc._.js +0 -3
  787. package/.next/server/chunks/[root-of-the-server]__0w9f5-xtpane-._.js +0 -3
  788. package/.next/server/chunks/[root-of-the-server]__0w9x80vsjqsbt._.js +0 -3
  789. package/.next/server/chunks/[root-of-the-server]__0x76w78-o6bfn._.js +0 -3
  790. package/.next/server/chunks/[root-of-the-server]__0xobqdj2u2s67._.js +0 -3
  791. package/.next/server/chunks/[root-of-the-server]__0xwm-4fhj8j--._.js +0 -3
  792. package/.next/server/chunks/[root-of-the-server]__0y3ui5-k9baec._.js +0 -3
  793. package/.next/server/chunks/[root-of-the-server]__1-6r_3pmgkz13._.js +0 -3
  794. package/.next/server/chunks/[root-of-the-server]__10ngcci8pf29l._.js +0 -3
  795. package/.next/server/chunks/[root-of-the-server]__13u9cd4f8_gva._.js +0 -3
  796. package/.next/server/chunks/[root-of-the-server]__14e45mqzb1vjt._.js +0 -3
  797. package/.next/server/chunks/[root-of-the-server]__14jf33wwjqbw1._.js +0 -3
  798. package/.next/server/chunks/[root-of-the-server]__15dipxocczlvx._.js +0 -3
  799. package/.next/server/chunks/[root-of-the-server]__16j73gw0vaw81._.js +0 -3
  800. package/.next/server/chunks/[root-of-the-server]__176zyagwjex4i._.js +0 -3
  801. package/.next/server/chunks/[root-of-the-server]__17_lgezg_8k4-._.js +0 -3
  802. package/.next/server/chunks/[root-of-the-server]__17ed9rw-rhun-._.js +0 -3
  803. package/.next/server/chunks/[root-of-the-server]__17qr9lkc0h9ta._.js +0 -3
  804. package/.next/server/chunks/[root-of-the-server]__18axi_zdc2uzr._.js +0 -3
  805. package/.next/server/chunks/[root-of-the-server]__19kic_glbz32b._.js +0 -3
  806. package/.next/server/chunks/[root-of-the-server]__19larrqj6rokv._.js +0 -3
  807. package/.next/server/chunks/[root-of-the-server]__1ae5zzeo8_c2s._.js +0 -3
  808. package/.next/server/chunks/[root-of-the-server]__1cno0cu053una._.js +0 -3
  809. package/.next/server/chunks/[root-of-the-server]__1cowc49z-6tny._.js +0 -3
  810. package/.next/server/chunks/[root-of-the-server]__1dqb3qtykno2z._.js +0 -3
  811. package/.next/server/chunks/[root-of-the-server]__1drs4rr5x286d._.js +0 -3
  812. package/.next/server/chunks/[root-of-the-server]__1f-ve8idsq57l._.js +0 -3
  813. package/.next/server/chunks/[root-of-the-server]__1f_ztllkdhd1g._.js +0 -3
  814. package/.next/server/chunks/[root-of-the-server]__1g_f4opcfnwwl._.js +0 -3
  815. package/.next/server/chunks/[root-of-the-server]__1h0tye6lfskvl._.js +0 -3
  816. package/.next/server/chunks/[root-of-the-server]__1hnyj47zdzrxo._.js +0 -3
  817. package/.next/server/chunks/[root-of-the-server]__1iysogl93kyqq._.js +0 -3
  818. package/.next/server/chunks/[root-of-the-server]__1k0fuhrt1iiad._.js +0 -3
  819. package/.next/server/chunks/[root-of-the-server]__1ka1feeszq3gt._.js +0 -3
  820. package/.next/server/chunks/[root-of-the-server]__1ke-yb4v9knf4._.js +0 -3
  821. package/.next/server/chunks/[root-of-the-server]__1kp5acqtrdysf._.js +0 -3
  822. package/.next/server/chunks/[root-of-the-server]__1kxewr0hve3xs._.js +0 -3
  823. package/.next/server/chunks/[root-of-the-server]__1l47_6jece7bq._.js +0 -3
  824. package/.next/server/chunks/[root-of-the-server]__1m8m5io-tr21e._.js +0 -3
  825. package/.next/server/chunks/[root-of-the-server]__1nb3q3vglx569._.js +0 -3
  826. package/.next/server/chunks/[root-of-the-server]__1o42aqttqc3b8._.js +0 -3
  827. package/.next/server/chunks/[root-of-the-server]__1o9pbkx7ejxu0._.js +0 -3
  828. package/.next/server/chunks/[root-of-the-server]__1pw5kygb6kibs._.js +0 -3
  829. package/.next/server/chunks/[root-of-the-server]__1qy_fxhx5yu1t._.js +0 -3
  830. package/.next/server/chunks/[root-of-the-server]__1s-y00c3-nc_-._.js +0 -3
  831. package/.next/server/chunks/[root-of-the-server]__1sokwptzp3b3m._.js +0 -3
  832. package/.next/server/chunks/[root-of-the-server]__1vg8sj020j9pp._.js +0 -3
  833. package/.next/server/chunks/[root-of-the-server]__1vwlmzqz2r0yr._.js +0 -3
  834. package/.next/server/chunks/[root-of-the-server]__1x6r0_9_fqoy-._.js +0 -3
  835. package/.next/server/chunks/[root-of-the-server]__1xx-czpwd_ny7._.js +0 -3
  836. package/.next/server/chunks/[root-of-the-server]__1yyezurgy7e3k._.js +0 -3
  837. package/.next/server/chunks/[root-of-the-server]__1z9hl9qdokxpu._.js +0 -3
  838. package/.next/server/chunks/[root-of-the-server]__1zkrlusy_cbtj._.js +0 -3
  839. package/.next/server/chunks/[root-of-the-server]__20bo6axxlug5q._.js +0 -3
  840. package/.next/server/chunks/_04vbgvl2gl5bc._.js +0 -3
  841. package/.next/server/chunks/_05-ouasholjra._.js +0 -3
  842. package/.next/server/chunks/_0lepv-j_r8kfv._.js +0 -3
  843. package/.next/server/chunks/_0lo1_vwfiel-b._.js +0 -3
  844. package/.next/server/chunks/_0s8v0xiwcw6od._.js +0 -3
  845. package/.next/server/chunks/_1ab7h8-how0le._.js +0 -3
  846. package/.next/server/chunks/_1ad8i3ukisj99._.js +0 -3
  847. package/.next/server/chunks/_1lz-5f4_92l2u._.js +0 -3
  848. package/.next/server/chunks/_1qcv4muwnx82-._.js +0 -3
  849. package/.next/server/chunks/_1t632kndbc0tj._.js +0 -3
  850. package/.next/server/chunks/_1xx5l4x084brt._.js +0 -3
  851. package/.next/server/chunks/_1zbkha-v5mkk0._.js +0 -3
  852. package/.next/server/chunks/node_modules_zod_v4_classic_external_0qoqh-q5drsgn.js +0 -57
  853. package/.next/server/chunks/node_modules_zod_v4_classic_external_14kwlambv9opd.js +0 -3
  854. package/.next/server/chunks/node_modules_zod_v4_classic_external_17gmk506tz413.js +0 -3
  855. package/.next/server/chunks/node_modules_zod_v4_classic_external_1b_q1zc0x8d76.js +0 -3
  856. package/.next/server/chunks/node_modules_zod_v4_classic_external_1exeae-p81c94.js +0 -3
  857. package/.next/server/chunks/node_modules_zod_v4_classic_external_1giv406od1whf.js +0 -3
  858. package/.next/server/chunks/node_modules_zod_v4_classic_external_1wq100x5o7-hi.js +0 -3
  859. package/.next/server/chunks/node_modules_zod_v4_classic_external_1x8fhte3frhrw.js +0 -3
  860. package/.next/server/chunks/src_0bhf345rd7jho._.js +0 -3
  861. package/.next/server/chunks/src_lib_0dxltm34zaclb._.js +0 -3
  862. package/.next/server/chunks/src_lib_0g4wu08m-gibu._.js +0 -3
  863. package/.next/server/chunks/src_lib_0l0j89xrerf8m._.js +0 -3
  864. package/.next/server/chunks/src_lib_0n6nhl7_avcme._.js +0 -3
  865. package/.next/server/chunks/src_lib_0so-2topfosjo._.js +0 -3
  866. package/.next/server/chunks/src_lib_0z4je8wchtdws._.js +0 -3
  867. package/.next/server/chunks/src_lib_15op6xa369-51._.js +0 -3
  868. package/.next/server/chunks/src_lib_1_p9kz6i8to9n._.js +0 -3
  869. package/.next/server/chunks/src_lib_1d0nldjpxxl8t._.js +0 -3
  870. package/.next/server/chunks/src_lib_1oc3awtm80lqn._.js +0 -3
  871. package/.next/server/chunks/src_lib_1t_-lm7x_gu08._.js +0 -3
  872. package/.next/server/chunks/src_lib_constants_pagination_ts_0tz3fg9ib3b-w._.js +0 -3
  873. package/.next/server/chunks/src_lib_recoverable-response_ts_00y54idhlj_0e._.js +0 -3
  874. package/.next/server/chunks/src_lib_short-id_0adg7-htn2dq_._.js +0 -3
  875. package/.next/server/chunks/ssr/[root-of-the-server]__0py1t7q9ntzgc._.js +0 -3
  876. package/.next/server/chunks/ssr/[root-of-the-server]__0uezowk-9l0x4._.js +0 -3
  877. package/.next/server/chunks/ssr/[root-of-the-server]__12_3pzn1_i3p7._.js +0 -3
  878. package/.next/server/chunks/ssr/[root-of-the-server]__12jk2bmesr4gc._.js +0 -3
  879. package/.next/server/chunks/ssr/[root-of-the-server]__1vwegr-t8j6qe._.js +0 -3
  880. package/.next/server/chunks/ssr/_0_m51opjnip8x._.js +0 -32
  881. package/.next/server/chunks/ssr/_0qs44fqs7b5wd._.js +0 -3
  882. package/.next/server/chunks/ssr/_127aw5h992s9d._.js +0 -4
  883. package/.next/server/chunks/ssr/_1cpvkaqiyve6g._.js +0 -3
  884. package/.next/server/chunks/ssr/_1d3pxsso6zv_w._.js +0 -3
  885. package/.next/server/chunks/ssr/_1ore70w45768b._.js +0 -3
  886. package/.next/server/chunks/ssr/_1sztendo5e5tf._.js +0 -3
  887. package/.next/server/chunks/ssr/_1t-o815u40ng2._.js +0 -3
  888. package/.next/server/chunks/ssr/node_modules_1cm5684hz1o51._.js +0 -3
  889. package/.next/server/chunks/ssr/node_modules_heic-to_dist_csp_heic-to_1xp1ys7qrz7uh.js +0 -3
  890. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0bew68i643j53._.js +0 -33
  891. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0q-w892nagajq.js +0 -3
  892. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0-4c5fuxx178f.js +0 -3
  893. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0-620erc29b8l.js +0 -3
  894. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_02t4jbzz34_x5.js +0 -3
  895. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_06zp_1r4dyujd.js +0 -3
  896. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_07zpyh6_aix9e.js +0 -3
  897. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_08b8vpe4ydv2l.js +0 -3
  898. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0927yli_zsjiv.js +0 -3
  899. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0ab39qicq17ku.js +0 -3
  900. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0d5g5-w_y282q.js +0 -3
  901. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0dq5iwc4xesq1.js +0 -3
  902. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0g591s5nyuj20.js +0 -3
  903. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0mfa8uq-ofoud.js +0 -3
  904. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0pdc0gl8iqtfa.js +0 -3
  905. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0tz1eth8tnoyx.js +0 -3
  906. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_14rvnul2svrv8.js +0 -3
  907. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_15yshykizhy_t.js +0 -3
  908. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_17vx074zs1h7f.js +0 -3
  909. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_18uzvmzy5tpu_.js +0 -3
  910. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_196bmtjcgr159.js +0 -3
  911. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1a9z9hjfg293y.js +0 -3
  912. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1aq9r3iw9g7qi.js +0 -3
  913. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1e1odqisoi2pv.js +0 -3
  914. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1l6unubiwsg9f.js +0 -3
  915. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1ya73f4o4_7mr.js +0 -3
  916. package/.next/server/chunks/ssr/src_1nbi4yrww3r1m._.js +0 -3
  917. package/.next/static/chunks/0a-rekt06v0sv.js +0 -1
  918. package/.next/static/chunks/0gu34v572tj7o.js +0 -1
  919. package/.next/static/chunks/0mnb66hvp3czv.js +0 -2
  920. package/.next/static/chunks/0mun2h4uaj4eh.js +0 -1
  921. package/.next/static/chunks/0qb4cgf04m6y_.js +0 -1
  922. package/.next/static/chunks/0ykhi6pk49so-.js +0 -1
  923. package/.next/static/chunks/0zx49lemqph3o.js +0 -1
  924. package/.next/static/chunks/185736qwog1ar.js +0 -1
  925. package/.next/static/chunks/1jsd1qdcjh3ht.js +0 -198
  926. package/.next/static/chunks/1k2m_f0nu22fb.js +0 -1
  927. package/.next/static/chunks/1nef598mkxf9g.js +0 -1
  928. package/.next/static/chunks/1ogj95u4nfqgm.js +0 -16
  929. package/.next/static/chunks/2-m8at3d9m9fl.js +0 -38
  930. package/.next/static/chunks/21jkvmvb2mzaa.js +0 -1
  931. package/.next/static/chunks/21qaa-gzvurvc.js +0 -1
  932. package/.next/static/chunks/263d57goy87o4.js +0 -31
  933. package/.next/static/chunks/2lhxk-8dpncxq.js +0 -1
  934. package/.next/static/chunks/343yopry-myz8.js +0 -2
  935. package/.next/static/chunks/3_5fscrh8uxav.css +0 -3
  936. package/.next/static/chunks/3_w-p8241f5rv.js +0 -1
  937. package/.next/static/chunks/3lvul9moygg-1.js +0 -16
  938. /package/.next/static/{oMYEAS-Ug2KhwHuve1br9 → lc14jjgFDXj3oP9VZNb21}/_buildManifest.js +0 -0
  939. /package/.next/static/{oMYEAS-Ug2KhwHuve1br9 → lc14jjgFDXj3oP9VZNb21}/_clientMiddlewareManifest.js +0 -0
  940. /package/.next/static/{oMYEAS-Ug2KhwHuve1br9 → lc14jjgFDXj3oP9VZNb21}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,714073,e=>{var t=e.i(843476),s=e.i(271645),i=e.i(522016),a=e.i(618566),l=e.i(632781),r=e.i(480342),n=e.i(217255),d=e.i(999593),c=e.i(519455),o=e.i(793479),m=e.i(111110),u=e.i(553753),h=e.i(201276);function x({token:e,onAlreadyInitialized:i}){let{t:r}=(0,m.b)(),f=r.auth.initialize,p=(0,a.useRouter)(),[j,g]=(0,s.useState)(f.defaultName),[v,b]=(0,s.useState)(u.J),[N,y]=(0,s.useState)(""),[w,k]=(0,s.useState)(""),[S,z]=(0,s.useState)(!1),[C,T]=(0,s.useState)(""),[F,I]=(0,s.useState)(!1),P=async t=>{if(t.preventDefault(),T(""),!S)return void T(r.eula.consentRequired);if(N!==w)return void T(f.passwordMismatch);if(N.length<6||N===u.v)return void T(f.passwordHint);I(!0);try{let t=await fetch("/api/initialize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:e,name:j,email:v,password:N,eulaAccepted:S})});if(!t.ok){let e=await t.json().catch(()=>({}));409===t.status&&"ALREADY_EXISTS"===e.code?T(f.emailExists):409===t.status?i():403===t.status?T(f.invalidLink):T(f.failed);return}let s=await (0,n.signIn)("credentials",{redirect:!1,email:v.trim(),password:N});if(s?.error)return void T(f.signInFailed);p.replace("/setup"),p.refresh()}catch(e){h.V.error("[Initialize]","Failed to create admin",{error:e}),T(f.failed)}finally{I(!1)}};return(0,t.jsxs)("form",{onSubmit:P,className:"space-y-4",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:f.desc}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{htmlFor:"name",className:"text-sm font-medium",children:f.name}),(0,t.jsx)(o.f,{id:"name",value:j,onChange:e=>g(e.target.value),maxLength:50,required:!0})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{htmlFor:"email",className:"text-sm font-medium",children:r.auth.email}),(0,t.jsx)(o.f,{id:"email",type:"email",autoComplete:"username",value:v,onChange:e=>b(e.target.value),required:!0})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{htmlFor:"password",className:"text-sm font-medium",children:r.auth.password}),(0,t.jsx)(o.f,{id:"password",type:"password",autoComplete:"new-password",value:N,onChange:e=>y(e.target.value),minLength:6,required:!0}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:f.passwordHint})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{htmlFor:"confirmPassword",className:"text-sm font-medium",children:r.auth.confirmPassword}),(0,t.jsx)(o.f,{id:"confirmPassword",type:"password",autoComplete:"new-password",value:w,onChange:e=>k(e.target.value),minLength:6,required:!0})]}),(0,t.jsx)(d.f,{checked:S,onCheckedChange:z,disabled:F}),C&&(0,t.jsx)("div",{className:"rounded-lg bg-destructive/10 px-3 py-2 text-center text-sm text-destructive",children:C}),(0,t.jsxs)(c.f,{type:"submit",size:"lg",className:"w-full",disabled:F||!S,children:[F&&(0,t.jsx)(l.f,{className:"mr-2 h-4 w-4 animate-spin"}),F?f.submitting:f.submit]})]})}var f=e.i(465822),p=e.i(515288),j=e.i(35209);function g(){let{t:e}=(0,m.b)(),r=e.auth.initialize,n=(0,a.useSearchParams)().get("token")||"",[d,c]=(0,s.useState)(null);return((0,s.useEffect)(()=>{fetch("/api/register/status").then(e=>e.json()).then(e=>c(!0===e.initialized)).catch(e=>{h.V.error("[Initialize]","Failed to check initialization status",{error:e}),c(!1)})},[]),null===d)?(0,t.jsx)("div",{className:"flex justify-center py-8",children:(0,t.jsx)(l.f,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):d?(0,t.jsxs)("div",{className:"space-y-4 py-2 text-center",children:[(0,t.jsx)("p",{className:"text-muted-foreground",children:r.alreadyInitialized}),(0,t.jsx)(i.default,{href:"/login",className:"text-primary hover:underline",children:r.goLogin})]}):n?(0,t.jsx)(x,{token:n,onAlreadyInitialized:()=>c(!0)}):(0,t.jsx)(f.f,{})}e.s(["default",0,function(){let{t:e}=(0,m.b)();return(0,j.f)(e.auth.initialize.pageTitle),(0,t.jsx)(r.f,{children:(0,t.jsxs)(p.N,{className:"w-full rounded-2xl border-0 shadow-xl shadow-indigo-500/5 ring-1 ring-border",children:[(0,t.jsx)(p.Y,{children:(0,t.jsx)(p.v,{className:"text-2xl text-center",children:e.auth.initialize.title})}),(0,t.jsx)(p.O,{children:(0,t.jsx)(s.Suspense,{fallback:(0,t.jsx)("div",{className:"flex justify-center py-8",children:(0,t.jsx)(l.f,{className:"h-6 w-6 animate-spin text-muted-foreground"})}),children:(0,t.jsx)(g,{})})})]})})}],714073)},480342,e=>{var t=e.i(843476),s=e.i(325164),i=e.i(111110);e.s(["f",0,function({children:e,wide:a=!1}){let{t:l}=(0,i.b)();return(0,t.jsxs)("div",{className:"relative flex min-h-screen items-center justify-center overflow-hidden bg-background p-4",children:[(0,t.jsx)("div",{className:"pointer-events-none absolute -left-32 -top-32 h-96 w-96 rounded-full bg-indigo-400/25 blur-3xl"}),(0,t.jsx)("div",{className:"pointer-events-none absolute -bottom-40 -right-24 h-[28rem] w-[28rem] rounded-full bg-violet-400/20 blur-3xl"}),(0,t.jsxs)("div",{className:`relative w-full space-y-6 py-8 ${a?"max-w-xl":"max-w-md"}`,children:[(0,t.jsxs)("div",{className:"flex flex-col items-center gap-3 text-center",children:[(0,t.jsx)(s.default,{src:"/icons/icon.png",alt:"",width:64,height:64,className:"rounded-2xl shadow-lg shadow-indigo-500/30",priority:!0,unoptimized:!0}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("p",{className:"text-xl font-bold tracking-tight",children:l.pageTitle.base}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:l.app.subtitle})]})]}),e]})]})}])},465822,e=>{var t=e.i(843476),s=e.i(482022),i=e.i(456420);let a={name:"key-round",size:24,node:[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]};a.node;let l=(0,i.f)(a);var r=e.i(111110),n=e.i(637691);e.s(["f",0,function(){let{t:e,language:i}=(0,r.b)(),a=e.auth.setupGuide,d=`${n.f}/wiki/${"en"===i?"Deployment-en":"Deployment"}`;return(0,t.jsxs)("div",{className:"space-y-2 rounded-lg border border-amber-300 bg-amber-50 p-4 text-sm text-amber-950 dark:border-amber-700 dark:bg-amber-950/40 dark:text-amber-100",children:[(0,t.jsxs)("p",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(l,{className:"h-4 w-4 shrink-0"}),a.title]}),(0,t.jsx)("p",{children:a.intro}),(0,t.jsxs)("ul",{className:"list-disc space-y-1 pl-5",children:[(0,t.jsx)("li",{children:a.desktop}),(0,t.jsx)("li",{children:a.docker}),(0,t.jsx)("li",{children:a.npm}),(0,t.jsx)("li",{children:a.tokenFile})]}),(0,t.jsxs)("a",{href:d,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 font-medium underline-offset-2 hover:underline",children:[a.docs,(0,t.jsx)(s.f,{className:"h-3.5 w-3.5"})]})]})}],465822)},553753,e=>{e.s(["J",0,"admin@localhost","v",0,"123456"])},35209,e=>{var t=e.i(271645),s=e.i(111110);e.s(["f",0,function(...e){let{t:i}=(0,s.b)(),a=[i.pageTitle.base,...e.map(e=>"string"==typeof e?e.trim():"").filter(e=>e.length>0)].join("-");(0,t.useEffect)(()=>{document.title=a},[a])}])}])})();
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,[711241,e=>{var s=e.i(456420);let t={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};t.node;let i=(0,s.f)(t);e.s(["f",0,i],711241)},508734,e=>{var s=e.i(456420);let t={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};t.node;let i=(0,s.f)(t);e.s(["f",0,i],508734)},590546,e=>{var s=e.i(843476),t=e.i(618566),i=e.i(519455),a=e.i(711241);e.s(["f",0,function({fallbackUrl:e,className:n}){let r=(0,t.useRouter)();return(0,s.jsx)(i.f,{variant:"ghost",size:"icon",onClick:()=>{r.push(e)},className:n,children:(0,s.jsx)(a.f,{className:"h-5 w-5"})})}])},912505,e=>{var s=e.i(843476),t=e.i(975157);e.s(["f",0,function({icon:e,title:i,description:a,action:n,className:r}){return(0,s.jsxs)("div",{className:(0,t.f)("flex flex-col items-center justify-center rounded-2xl border border-dashed bg-card/50 px-6 py-14 text-center",r),children:[(0,s.jsx)("div",{className:"mb-4 flex h-14 w-14 items-center justify-center rounded-2xl bg-accent text-accent-foreground",children:(0,s.jsx)(e,{className:"h-7 w-7"})}),(0,s.jsx)("p",{className:"font-medium",children:i}),a&&(0,s.jsx)("p",{className:"mt-1 max-w-sm text-sm text-muted-foreground",children:a}),n&&(0,s.jsx)("div",{className:"mt-5",children:n})]})}])},393842,e=>{var s=e.i(843476),t=e.i(590546),i=e.i(975157);e.s(["f",0,function({title:e,description:a,backHref:n,actions:r,titleAddon:c,className:l}){return(0,s.jsxs)("div",{className:(0,i.f)("flex items-start gap-3",l),children:[n&&(0,s.jsx)(t.f,{fallbackUrl:n,className:"-ml-2 shrink-0"}),(0,s.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)("h1",{className:"truncate text-2xl font-bold tracking-tight sm:text-3xl",children:e}),c]}),a&&(0,s.jsx)("p",{className:"text-sm text-muted-foreground sm:text-base",children:a})]}),r&&(0,s.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:r})]})}])},86963,e=>{var s=e.i(843476),t=e.i(632781);e.s(["f",0,function({label:e}){return(0,s.jsxs)("div",{className:"flex min-h-[50vh] flex-col items-center justify-center gap-3 text-muted-foreground",children:[(0,s.jsx)(t.f,{className:"h-7 w-7 animate-spin text-primary"}),e&&(0,s.jsx)("p",{className:"text-sm",children:e})]})}])},35209,e=>{var s=e.i(271645),t=e.i(111110);e.s(["f",0,function(...e){let{t:i}=(0,t.b)(),a=[i.pageTitle.base,...e.map(e=>"string"==typeof e?e.trim():"").filter(e=>e.length>0)].join("-");(0,s.useEffect)(()=>{document.title=a},[a])}])}],462684,e=>{e.v(s=>Promise.all(["static/chunks/2hh64gi4pmlk2.js"].map(s=>e.l(s))).then(()=>s(506175)))}]);
@@ -1 +1 @@
1
- (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,711241,e=>{var t=e.i(456420);let n={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};n.node;let a=(0,t.f)(n);e.s(["f",0,a],711241)},399847,e=>{var t=e.i(456420);let n={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};n.node;let a=(0,t.f)(n);e.s(["f",0,a],399847)},474544,e=>{var t=e.i(456420);let n={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};n.node;let a=(0,t.f)(n);e.s(["f",0,a],474544)},444594,e=>{var t=e.i(456420);let n={name:"inbox",size:24,node:[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]};n.node;let a=(0,t.f)(n);e.s(["f",0,a],444594)},786563,e=>{var t=e.i(456420);let n={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};n.node;let a=(0,t.f)(n);e.s(["f",0,a],786563)},697886,e=>{var t=e.i(456420);let n={name:"target",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]};n.node;let a=(0,t.f)(n);e.s(["f",0,a],697886)},7219,e=>{var t=e.i(456420);let n={name:"trending-up",size:24,node:[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]};n.node;let a=(0,t.f)(n);e.s(["f",0,a],7219)},282492,e=>{var t=e.i(722219);e.s(["z",0,t])},590546,e=>{var t=e.i(843476),n=e.i(618566),a=e.i(519455),l=e.i(711241);e.s(["f",0,function({fallbackUrl:e,className:i}){let s=(0,n.useRouter)();return(0,t.jsx)(a.f,{variant:"ghost",size:"icon",onClick:()=>{s.push(e)},className:i,children:(0,t.jsx)(l.f,{className:"h-5 w-5"})})}])},393842,e=>{var t=e.i(843476),n=e.i(590546),a=e.i(975157);e.s(["f",0,function({title:e,description:l,backHref:i,actions:s,titleAddon:r,className:c}){return(0,t.jsxs)("div",{className:(0,a.f)("flex items-start gap-3",c),children:[i&&(0,t.jsx)(n.f,{fallbackUrl:i,className:"-ml-2 shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("h1",{className:"truncate text-2xl font-bold tracking-tight sm:text-3xl",children:e}),r]}),l&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground sm:text-base",children:l})]}),s&&(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:s})]})}])},35209,e=>{var t=e.i(271645),n=e.i(111110);e.s(["f",0,function(...e){let{t:a}=(0,n.b)(),l=[a.pageTitle.base,...e.map(e=>"string"==typeof e?e.trim():"").filter(e=>e.length>0)].join("-");(0,t.useEffect)(()=>{document.title=l},[l])}])},991722,e=>{function t(e){return"not_attempted"===e||"wrong_attempt"===e||"unknown"===e?e:"unknown"}e.s(["i",0,function(e,n="zh"){return("en"===n?{not_attempted:"Not attempted",wrong_attempt:"Wrong attempt",unknown:"Unknown"}:{not_attempted:"不会做",wrong_attempt:"做错了",unknown:"未判断"})[t(e)]},"h",0,t,"x",0,function(e,n){return(n||"").trim()?"wrong_attempt":t(e)}])}])})();
1
+ (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,711241,e=>{var t=e.i(456420);let n={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};n.node;let a=(0,t.f)(n);e.s(["f",0,a],711241)},399847,e=>{var t=e.i(456420);let n={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};n.node;let a=(0,t.f)(n);e.s(["f",0,a],399847)},474544,e=>{var t=e.i(456420);let n={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};n.node;let a=(0,t.f)(n);e.s(["f",0,a],474544)},444594,e=>{var t=e.i(456420);let n={name:"inbox",size:24,node:[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]};n.node;let a=(0,t.f)(n);e.s(["f",0,a],444594)},786563,e=>{var t=e.i(456420);let n={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};n.node;let a=(0,t.f)(n);e.s(["f",0,a],786563)},697886,e=>{var t=e.i(456420);let n={name:"target",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]};n.node;let a=(0,t.f)(n);e.s(["f",0,a],697886)},7219,e=>{var t=e.i(456420);let n={name:"trending-up",size:24,node:[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]};n.node;let a=(0,t.f)(n);e.s(["f",0,a],7219)},590546,e=>{var t=e.i(843476),n=e.i(618566),a=e.i(519455),l=e.i(711241);e.s(["f",0,function({fallbackUrl:e,className:i}){let s=(0,n.useRouter)();return(0,t.jsx)(a.f,{variant:"ghost",size:"icon",onClick:()=>{s.push(e)},className:i,children:(0,t.jsx)(l.f,{className:"h-5 w-5"})})}])},393842,e=>{var t=e.i(843476),n=e.i(590546),a=e.i(975157);e.s(["f",0,function({title:e,description:l,backHref:i,actions:s,titleAddon:r,className:c}){return(0,t.jsxs)("div",{className:(0,a.f)("flex items-start gap-3",c),children:[i&&(0,t.jsx)(n.f,{fallbackUrl:i,className:"-ml-2 shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("h1",{className:"truncate text-2xl font-bold tracking-tight sm:text-3xl",children:e}),r]}),l&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground sm:text-base",children:l})]}),s&&(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:s})]})}])},35209,e=>{var t=e.i(271645),n=e.i(111110);e.s(["f",0,function(...e){let{t:a}=(0,n.b)(),l=[a.pageTitle.base,...e.map(e=>"string"==typeof e?e.trim():"").filter(e=>e.length>0)].join("-");(0,t.useEffect)(()=>{document.title=l},[l])}])},991722,e=>{function t(e){return"not_attempted"===e||"wrong_attempt"===e||"unknown"===e?e:"unknown"}e.s(["i",0,function(e,n="zh"){return("en"===n?{not_attempted:"Not attempted",wrong_attempt:"Wrong attempt",unknown:"Unknown"}:{not_attempted:"不会做",wrong_attempt:"做错了",unknown:"未判断"})[t(e)]},"h",0,t,"x",0,function(e,n){return(n||"").trim()?"wrong_attempt":t(e)}])}])})();
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,[711241,e=>{var a=e.i(456420);let s={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};s.node;let t=(0,a.f)(s);e.s(["f",0,t],711241)},399847,e=>{var a=e.i(456420);let s={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};s.node;let t=(0,a.f)(s);e.s(["f",0,t],399847)},13285,e=>{var a=e.i(456420);let s={name:"layers",size:24,node:[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],aliases:["layers-3"]};s.node;let t=(0,a.f)(s);e.s(["f",0,t],13285)},813572,e=>{var a=e.i(843476),s=e.i(271645),t=e.i(618566),i=e.i(518515),n=e.i(328623),l=e.i(747819),r=e.i(866531),o=e.i(12130),c=e.i(430634),d=e.i(576019),m=e.i(847483),p=e.i(497346),u=e.i(717448),f=e.i(798469),x=e.i(393842),h=e.i(956738),g=e.i(185592),j=e.i(111110),k=e.i(41931),v=e.i(201276),y=e.i(35209),b=e.i(598053),I=e.i(315092),N=e.i(804536),S=e.i(271945);e.s(["default",0,function(){let e=(0,t.useParams)(),T=(0,t.useRouter)(),w=e.id,{t:P}=(0,j.b)(),[C,z]=(0,s.useState)(null);(0,y.f)(P.notebooks.title,C?.name,P.pageTitle.addError);let[A,B]=(0,N.y)(S.c,S.k,"image"),R=(0,b.f)({logPrefix:"[AddErrorItem]",analyzeSubjectId:w,importSubjectId:w,textNotebook:{id:w,name:C?.name||""},fixedSubjectId:w});return((0,s.useEffect)(()=>{k.k.get(`/api/notebooks/${w}`).then(e=>z(e)).catch(e=>{v.V.error("[AddErrorItem]","Failed to fetch notebook",{error:e}),T.push("/notebooks")})},[w,T]),C)?(0,a.jsxs)("main",{className:"min-h-screen",children:[(0,a.jsx)(h.f,{status:R.analysisStep,completed:R.completedStages}),(0,a.jsxs)("div",{className:`mx-auto space-y-6 px-4 py-6 md:px-8 md:py-8 ${"review"===R.step?"max-w-6xl":"max-w-4xl"}`,children:[(0,a.jsx)(p.f,{message:R.saveError,onDismiss:R.dismissSaveError}),(0,a.jsx)(x.f,{backHref:`/notebooks/${w}`,title:P.app.addError,description:C.name}),"upload"===R.step&&(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(g.f,{options:[{value:"image",icon:i.f,label:P.app?.uploadImage||"Take Photo"},{value:"text",icon:n.f,label:P.app?.manualInput||"Manual Input"}],value:A,onChange:B}),R.pendingTask&&(0,a.jsx)(d.f,{task:R.pendingTask,onRefresh:R.refreshPendingTask,onDismiss:R.dismissPendingTask}),R.lastImported&&(0,a.jsx)(c.f,{imported:R.lastImported,onDismiss:R.dismissImported}),R.batchImages?(0,a.jsx)(l.f,{images:R.batchImages,subjectId:w,onClose:R.closeBatch}):"image"===A?(0,a.jsxs)(a.Fragment,{children:[R.parts.length>0&&(0,a.jsx)(m.f,{parts:R.parts.map(e=>e.dataUrl),busy:R.isBusy,onFinish:()=>void R.finishParts(),onDiscard:R.discardParts}),(0,a.jsx)(f.f,{onImageSelect:R.selectImage,isAnalyzing:R.isBusy})]}):(0,a.jsx)(u.f,{onSubmit:R.submitText,isAnalyzing:R.isBusy,defaultNotebookName:C.name,onCreateBatch:R.createTextBatch,creatingBatch:R.creatingBatch})]}),"review"===R.step&&R.parsedData&&(0,a.jsx)(r.f,{initialData:R.parsedData,imagePreview:R.currentImage,onSave:R.saveReviewed,onCancel:R.cancelReview,initialSubjectId:w,aiTimeout:R.aiTimeout})]}),(0,a.jsx)(o.f,{imageSrc:R.croppingImage||"",open:R.isCropperOpen,onClose:R.closeCropper,onRegionsSelected:R.cropRegions,allowMulti:0===R.parts.length,onAutoSplit:0===R.parts.length?R.autoSplitImage:void 0,onAddPart:R.parts.length<I.u-1?R.addPart:void 0,partCount:R.parts.length})]}):(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center",children:(0,a.jsx)("p",{className:"text-muted-foreground",children:P.common.loading})})}])},590546,e=>{var a=e.i(843476),s=e.i(618566),t=e.i(519455),i=e.i(711241);e.s(["f",0,function({fallbackUrl:e,className:n}){let l=(0,s.useRouter)();return(0,a.jsx)(t.f,{variant:"ghost",size:"icon",onClick:()=>{l.push(e)},className:n,children:(0,a.jsx)(i.f,{className:"h-5 w-5"})})}])},393842,e=>{var a=e.i(843476),s=e.i(590546),t=e.i(975157);e.s(["f",0,function({title:e,description:i,backHref:n,actions:l,titleAddon:r,className:o}){return(0,a.jsxs)("div",{className:(0,t.f)("flex items-start gap-3",o),children:[n&&(0,a.jsx)(s.f,{fallbackUrl:n,className:"-ml-2 shrink-0"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-bold tracking-tight sm:text-3xl",children:e}),r]}),i&&(0,a.jsx)("p",{className:"text-sm text-muted-foreground sm:text-base",children:i})]}),l&&(0,a.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:l})]})}])},35209,e=>{var a=e.i(271645),s=e.i(111110);e.s(["f",0,function(...e){let{t}=(0,s.b)(),i=[t.pageTitle.base,...e.map(e=>"string"==typeof e?e.trim():"").filter(e=>e.length>0)].join("-");(0,a.useEffect)(()=>{document.title=i},[i])}])}],462684,e=>{e.v(a=>Promise.all(["static/chunks/2hh64gi4pmlk2.js"].map(a=>e.l(a))).then(()=>a(506175)))}]);
@@ -0,0 +1,198 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,1661,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(111110),r=e.i(217255),i=e.i(41931),n=e.i(303163),l=e.i(201276);let c=["system","light","dark"],d="system",o="app-theme";function m(e){return"string"==typeof e&&c.includes(e)}let u=(0,s.createContext)({preference:d,theme:"light",setPreference:()=>void 0}),x="(prefers-color-scheme: dark)",p=new Set;function h(e){return p.add(e),window.addEventListener("storage",e),()=>{p.delete(e),window.removeEventListener("storage",e)}}function g(){try{let e=localStorage.getItem(o);return m(e)?e:d}catch{return d}}function f(e){try{localStorage.setItem(o,e)}catch{}p.forEach(e=>e())}function j(e){let t=window.matchMedia(x);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}let b=()=>window.matchMedia(x).matches;function y({children:e}){let{data:a,status:c}=(0,r.useSession)(),o="authenticated"===c,x=a?.user?.email,p=(0,s.useSyncExternalStore)(h,g,()=>d),v=(0,s.useSyncExternalStore)(j,b,()=>!1),w="system"===p?v?"dark":"light":p;(0,s.useEffect)(()=>{let e=document.documentElement,t=t=>{e.classList.toggle("dark","dark"===t),e.style.colorScheme=t};t(w);let s=()=>t("light"),a=()=>t(w);return window.addEventListener("beforeprint",s),window.addEventListener("afterprint",a),()=>{window.removeEventListener("beforeprint",s),window.removeEventListener("afterprint",a)}},[w]),(0,s.useEffect)(()=>{if(!o||!x)return;let e=!1;return i.k.get("/api/user").then(t=>{!e&&m(t.themePreference)&&t.themePreference!==g()&&f(t.themePreference)}).catch(e=>{l.V.warn("[Theme]","Failed to load theme preference",{error:(0,n.Z)(e)})}),()=>{e=!0}},[o,x]);let N=(0,s.useCallback)(e=>{f(e),o&&i.k.patch("/api/user",{themePreference:e}).catch(e=>{l.V.warn("[Theme]","Failed to save theme preference",{error:(0,n.Z)(e)})})},[o]),k=(0,s.useMemo)(()=>({preference:p,theme:w,setPreference:N}),[p,w,N]);return(0,t.jsx)(u.Provider,{value:k,children:e})}var v=e.i(215519),w=e.i(618566),N=e.i(632781),k=e.i(519455),S=e.i(776639),C=e.i(923512),T=e.i(749803),z=e.i(856423),A=e.i(975153),E=e.i(226091),_=e.i(456420);let D={name:"circle-plus",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],aliases:["plus-circle"]};D.node;let F=(0,_.f)(D),M=[/^\/login/,/^\/register/,/^\/setup/,/^\/print-preview/,/^\/exams\/[^/]+\/print/],L=[{key:"home",href:"/",icon:F,match:e=>"/"===e},{key:"notebooks",href:"/notebooks",icon:z.f,match:e=>e.startsWith("/notebooks")||e.startsWith("/error-items")||e.startsWith("/practice")},{key:"review",href:"/review",icon:A.f,match:e=>e.startsWith("/review")},{key:"stats",href:"/stats",icon:T.f,match:e=>e.startsWith("/stats")||e.startsWith("/tags")},{key:"exams",href:"/exams",icon:E.f,match:e=>e.startsWith("/exams")}];function $(e){return M.some(t=>t.test(e))}var R=e.i(294114);let I="ai-consent-dismissed:";function V(){let{t:e,language:n}=(0,a.b)(),c=e.aiConsent,{data:d,status:o}=(0,r.useSession)(),m=(0,w.usePathname)()||"/",u="authenticated"===o?d?.user?.email??null:null,[x,p]=(0,s.useState)(null),[h,g]=(0,s.useState)(null),[f,j]=(0,s.useState)(!1);(0,s.useEffect)(()=>(0,C.y)(e=>p(t=>t??e)),[]);let b=$(m);(0,s.useEffect)(()=>{if(!u||b||function(e){try{return"1"===sessionStorage.getItem(e)}catch{return!1}}(I+u))return;let e=!1;return i.k.get("/api/user").then(t=>{e||!t||t.aiDataConsentAt||p(e=>e??"prompt")}).catch(e=>l.V.error("[AiConsentDialog]","load consent failed",{error:e})),()=>{e=!0}},[u,b]);let y=null!==x&&!!u;(0,s.useEffect)(()=>{if(!y)return;let e=!1;return i.k.get("/api/settings").then(t=>{e||g(t?.aiProvider??null)}).catch(()=>void 0),()=>{e=!0}},[y]);let v=()=>{p(null),j(!1)},T=async()=>{j(!0);try{await i.k.post("/api/user/ai-consent",{}),R.c.success("blocked"===x?c.agreedRetry:c.agreed),v()}catch(e){l.V.error("[AiConsentDialog]","save consent failed",{error:e}),R.c.error(c.failed),j(!1)}},z=()=>{u&&function(e){try{sessionStorage.setItem(e,"1")}catch{}}(I+u),R.c.info(c.declined),v()},A=(0,C.K)(h,n);return(0,t.jsx)(S.N,{open:y,onOpenChange:e=>{e||f||z()},children:(0,t.jsxs)(S.d,{className:"sm:max-w-lg",children:[(0,t.jsxs)(S.s,{children:[(0,t.jsx)(S.F,{children:c.title}),(0,t.jsx)(S.C,{children:"blocked"===x?c.blocked:c.intro})]}),(0,t.jsxs)("div",{className:"space-y-3 text-sm",children:["blocked"===x&&(0,t.jsx)("p",{children:c.intro}),(0,t.jsx)("ul",{className:"list-disc space-y-1 pl-5",children:c.items.map(e=>(0,t.jsx)("li",{children:e},e))}),(0,t.jsx)("p",{children:A?c.providerKnown.replace("{provider}",A):c.providerUnknown}),(0,t.jsxs)("p",{children:[c.policy,"en"===n?" ":"",(0,t.jsx)("a",{className:"underline underline-offset-2",href:(0,C.L)(n),target:"_blank",rel:"noopener noreferrer",children:c.policyLink}),"en"===n?".":"。"]}),(0,t.jsx)("p",{className:"text-muted-foreground",children:c.declineNote})]}),(0,t.jsxs)(S.c,{className:"gap-2",children:[(0,t.jsx)(k.f,{type:"button",variant:"outline",onClick:z,disabled:f,children:c.decline}),(0,t.jsxs)(k.f,{type:"button",onClick:T,disabled:f,children:[f&&(0,t.jsx)(N.f,{className:"h-4 w-4 animate-spin"}),c.agree]})]})]})})}var G=e.i(325164),P=e.i(522016),O=e.i(367784);let U={name:"shield",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]};U.node;let q=(0,_.f)(U);var H=e.i(424553);function K({status:e,onAccept:i}){let{t:n,language:c}=(0,a.b)(),[d,o]=(0,s.useState)(!1),m="en"===c?e.changes.en:e.changes.zh,u=async()=>{o(!0);try{await i()}catch(e){l.V.error("[EulaGate]","Failed to accept EULA",{error:e}),R.c.error(n.eula.acceptFailed)}finally{o(!1)}};return(0,t.jsx)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"eula-upgrade-title",children:(0,t.jsxs)("div",{className:"max-h-[90vh] w-full max-w-lg space-y-4 overflow-y-auto rounded-lg border bg-background p-5 shadow-lg",children:[(0,t.jsx)("h2",{id:"eula-upgrade-title",className:"text-lg font-semibold",children:n.eula.upgradeTitle}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:n.eula.upgradeDesc.replace("{accepted}",e.accepted??"-").replace("{current}",e.current)}),m.length>0&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:n.eula.changesTitle}),(0,t.jsx)("ul",{className:"list-disc space-y-1 pl-5 text-sm",children:m.map(e=>(0,t.jsx)("li",{children:e},e))})]}),(0,t.jsx)(H.f,{}),(0,t.jsxs)("div",{className:"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",children:[(0,t.jsx)(k.f,{variant:"outline",onClick:()=>(0,r.signOut)({callbackUrl:"/login"}),disabled:d,children:n.eula.logout}),(0,t.jsxs)(k.f,{onClick:u,disabled:d,children:[d&&(0,t.jsx)(N.f,{className:"mr-2 h-4 w-4 animate-spin"}),n.eula.accept]})]})]})})}var B=e.i(980105),Y=e.i(901219),W=e.i(975157);function J({className:e}){let{t:r}=(0,a.b)(),{data:i}=(0,Y.b)(),n=(0,s.useRef)(null);if((0,s.useEffect)(()=>{if(!i)return;let e=new Set([...i.tasks.filter(e=>"analyzing"===e.status||"saving"===e.status).map(e=>e.id),...(i.batches??[]).filter(e=>"splitting"===e.phase||"processing"===e.phase).map(e=>`batch:${e.id}`)]),t=new Set([...i.tasks.filter(e=>e.unread).map(e=>e.id),...(i.batches??[]).filter(e=>e.unread).map(e=>`batch:${e.id}`)]),s=n.current;s&&[...s].some(s=>!e.has(s)&&t.has(s))&&R.c.info(r.importTasks.finishedToast),n.current=e},[i,r.importTasks.finishedToast]),!i||0===i.tasks.length&&!i.batches?.length)return null;let{activeCount:l,unreadCount:c}=i,d=l>0?r.importTasks.entryActive.replace("{count}",String(l)):r.importTasks.entry;return(0,t.jsxs)(P.default,{href:"/import-tasks",className:(0,W.f)("relative flex h-9 items-center gap-1.5 rounded-full border px-3 text-sm font-medium transition-colors hover:bg-muted",c>0?"border-primary/50 text-primary":"text-muted-foreground",e),"data-testid":"import-tasks-entry","aria-label":c>0?`${d} \xb7 ${r.importTasks.entryUnread.replace("{count}",String(c))}`:d,children:[l>0?(0,t.jsx)(N.f,{className:"h-4 w-4 animate-spin"}):(0,t.jsx)(B.f,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"whitespace-nowrap",children:d}),c>0&&(0,t.jsx)("span",{className:"flex h-5 min-w-5 items-center justify-center rounded-full bg-destructive px-1 text-xs text-white","data-testid":"import-tasks-unread",children:c})]})}var X=e.i(853138);let Z={name:"bot",size:24,node:[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]};Z.node;let Q=(0,_.f)(Z),ee={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};ee.node;let et=(0,_.f)(ee);var es=e.i(999092);let ea={name:"message-square-text",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]]};ea.node;let er=(0,_.f)(ea),ei={name:"settings",size:24,node:[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};ei.node;let en=(0,_.f)(ei);var el=e.i(901279),ec=e.i(994533),ed=e.i(677572),eo=e.i(306831),em=e.i(487486),eu=e.i(699375),ex=e.i(793479),ep=e.i(110204);let eh=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)("div",{className:"relative w-full overflow-auto",children:(0,t.jsx)("table",{ref:a,className:(0,W.f)("w-full caption-bottom text-sm",e),...s})}));eh.displayName="Table";let eg=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)("thead",{ref:a,className:(0,W.f)("[&_tr]:border-b",e),...s}));eg.displayName="TableHeader";let ef=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)("tbody",{ref:a,className:(0,W.f)("[&_tr:last-child]:border-0",e),...s}));ef.displayName="TableBody",(s.forwardRef(({className:e,...s},a)=>(0,t.jsx)("tfoot",{ref:a,className:(0,W.f)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...s}))).displayName="TableFooter";let ej=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)("tr",{ref:a,className:(0,W.f)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...s}));ej.displayName="TableRow";let eb=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)("th",{ref:a,className:(0,W.f)("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...s}));eb.displayName="TableHead";let ey=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)("td",{ref:a,className:(0,W.f)("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...s}));ey.displayName="TableCell",(s.forwardRef(({className:e,...s},a)=>(0,t.jsx)("caption",{ref:a,className:(0,W.f)("mt-4 text-sm text-muted-foreground",e),...s}))).displayName="TableCaption";var ev=e.i(759659);let ew={name:"ban",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]]};ew.node;let eN=(0,_.f)(ew);var ek=e.i(548161);function eS(){var e;let{t:r}=(0,a.b)(),[n,c]=(0,s.useState)(String(5)),[d,o]=(0,s.useState)(!1),m=(0,s.useCallback)(async()=>{try{let e=await i.k.get("/api/settings");c(String(e.aiConcurrencyLimit??5))}catch(e){l.V.error("[AiConcurrencyLimitSetting]","Failed to fetch config",{error:e})}},[]);(0,s.useEffect)(()=>{m()},[m]);let u=Number(n),x=""!==n.trim()&&"number"==typeof(e=u)&&Number.isInteger(e)&&e>=1&&e<=100,p=async()=>{if(x){o(!0);try{await i.k.post("/api/settings",{aiConcurrencyLimit:u}),R.c.success(r.admin.aiConcurrencyLimitSaved)}catch(e){l.V.error("[AiConcurrencyLimitSetting]","Failed to update AI concurrency limit",{error:e}),R.c.error(r.common.error)}finally{o(!1)}}};return(0,t.jsxs)("div",{className:"flex flex-col gap-3 p-4 border rounded-lg bg-muted/30 sm:flex-row sm:items-center sm:justify-between",children:[(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsx)(ep.f,{htmlFor:"ai-concurrency-limit",className:"text-base",children:r.admin.aiConcurrencyLimit}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:r.admin.aiConcurrencyLimitDesc})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,t.jsx)(ex.f,{id:"ai-concurrency-limit",type:"number",min:1,max:100,step:1,inputMode:"numeric",value:n,onChange:e=>c(e.target.value),"aria-invalid":!x,className:"w-24"}),(0,t.jsxs)(k.f,{size:"sm",onClick:p,disabled:d||!x,children:[d&&(0,t.jsx)(N.f,{className:"mr-2 h-4 w-4 animate-spin"}),r.common.save]})]})]})}function eC(e,t){return new Intl.NumberFormat("zh"===t?"zh-CN":"en-US",{notation:"compact",maximumFractionDigits:1}).format(Math.max(0,e))}function eT({user:e}){let{t:s,language:r}=(0,a.b)(),i=s.admin.aiTokensDetail.replace("{input}",eC(e.aiTokensToday.input,r)).replace("{output}",eC(e.aiTokensToday.output,r));return(0,t.jsxs)(t.Fragment,{children:[s.admin.aiUsageToday,": ",e.aiUsageToday," | ",s.admin.aiTokensToday,": ",i]})}function ez(){let{timeZone:e}=(0,v.M)(),{data:c}=(0,r.useSession)(),{t:d}=(0,a.b)(),[o,m]=(0,s.useState)([]),[u,x]=(0,s.useState)(!0),[p,h]=(0,s.useState)(!1),[g,f]=(0,s.useState)(!1),[j,b]=(0,s.useState)("0"),[y,w]=(0,s.useState)(!1),S=(0,s.useCallback)(async()=>{x(!0);try{let e=await i.k.get("/api/admin/users");m(e)}catch(e){l.V.error("[UserManagement]","Failed to fetch users",{error:e})}finally{x(!1)}},[]),C=(0,s.useCallback)(async()=>{try{let e=await i.k.get("/api/settings");h(!0===e.allowRegistration),b(String(e.aiDailyLimit??0))}catch(e){l.V.error("[UserManagement]","Failed to fetch config",{error:e})}},[]);(0,s.useEffect)(()=>{S(),C()},[S,C]);let T=async e=>{f(!0);try{await i.k.post("/api/settings",{allowRegistration:e}),h(e)}catch(e){l.V.error("[UserManagement]","Failed to update registration setting",{error:e}),R.c.error(d.common.error)}finally{f(!1)}},z=Number(j),A=""!==j.trim()&&Number.isInteger(z)&&z>=0,E=async()=>{if(A){w(!0);try{await i.k.post("/api/settings",{aiDailyLimit:z}),R.c.success(d.admin.aiDailyLimitSaved)}catch(e){l.V.error("[UserManagement]","Failed to update AI daily limit",{error:e}),R.c.error(d.common.error)}finally{w(!1)}}},_=async e=>{let t=e.isActive?d.admin.confirmDisable:d.admin.confirmEnable;if(await (0,R.u)(t))try{await i.k.patch(`/api/admin/users/${e.id}`,{isActive:!e.isActive}),S()}catch(e){l.V.error("[UserManagement]","Failed to update user status",{error:e}),R.c.error(d.common.error)}},D=async e=>{if(await (0,R.u)(d.admin.confirmDelete,{destructive:!0}))try{await i.k.delete(`/api/admin/users/${e.id}`),S()}catch(t){l.V.error("[UserManagement]","Failed to delete user",{error:t});let e=(0,n.d)(t)||d.common.error;R.c.error(e)}};return u?(0,t.jsx)("div",{className:"flex justify-center py-8",children:(0,t.jsx)(N.f,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border rounded-lg bg-muted/30",children:[(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsx)(ep.f,{className:"text-base",children:d.admin?.allowRegistration||"Allow New Registrations"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:d.admin?.allowRegistrationDesc||"When disabled, new users cannot register"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[g&&(0,t.jsx)(N.f,{className:"h-4 w-4 animate-spin"}),(0,t.jsx)(eu.f,{checked:p,onCheckedChange:T,disabled:g})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 p-4 border rounded-lg bg-muted/30 sm:flex-row sm:items-center sm:justify-between",children:[(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsx)(ep.f,{htmlFor:"ai-daily-limit",className:"text-base",children:d.admin.aiDailyLimit}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:d.admin.aiDailyLimitDesc})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,t.jsx)(ex.f,{id:"ai-daily-limit",type:"number",min:0,step:1,inputMode:"numeric",value:j,onChange:e=>b(e.target.value),"aria-invalid":!A,className:"w-24"}),(0,t.jsxs)(k.f,{size:"sm",onClick:E,disabled:y||!A,children:[y&&(0,t.jsx)(N.f,{className:"mr-2 h-4 w-4 animate-spin"}),d.common.save]})]})]}),(0,t.jsx)(eS,{}),(0,t.jsx)("div",{className:"sm:hidden space-y-3",children:o.map(s=>(0,t.jsxs)("div",{className:"border rounded-lg p-4 bg-card space-y-3",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium",children:s.name||"N/A"}),(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:s.email})]}),(0,t.jsx)(em.f,{variant:"admin"===s.role?"default":"secondary",children:"admin"===s.role?d.admin.admin:d.admin.user})]}),(0,t.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,t.jsxs)("div",{className:"text-muted-foreground",children:[d.admin.errors,": ",s._count.errorItems," | ",d.admin.practiceCount,": ",s._count.practiceRecords," | ",(0,t.jsx)(eT,{user:s})]}),(0,t.jsx)(em.f,{variant:s.isActive?"default":"destructive",className:"text-xs",children:s.isActive?d.admin.active:d.admin.disabled})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center pt-2 border-t",children:[(0,t.jsx)("div",{className:"text-xs text-muted-foreground",children:(0,eo.r)(s.createdAt,"yyyy-MM-dd",e)}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(k.f,{variant:"ghost",size:"sm",onClick:()=>_(s),disabled:s.id===c?.user?.id,children:s.isActive?(0,t.jsx)(eN,{className:"h-4 w-4 text-orange-500"}):(0,t.jsx)(ek.f,{className:"h-4 w-4 text-green-500"})}),(0,t.jsx)(k.f,{variant:"ghost",size:"sm",onClick:()=>D(s),disabled:s.id===c?.user?.id,children:(0,t.jsx)(ev.f,{className:"h-4 w-4 text-destructive"})})]})]})]},s.id))}),(0,t.jsx)("div",{className:"hidden sm:block border rounded-lg overflow-hidden",children:(0,t.jsxs)(eh,{children:[(0,t.jsx)(eg,{children:(0,t.jsxs)(ej,{children:[(0,t.jsx)(eb,{children:d.admin.nameEmail}),(0,t.jsx)(eb,{children:d.admin.role}),(0,t.jsx)(eb,{children:d.admin.stats}),(0,t.jsx)(eb,{children:d.admin.createdAt}),(0,t.jsx)(eb,{children:d.admin.status}),(0,t.jsx)(eb,{className:"text-right",children:d.admin.actions})]})}),(0,t.jsx)(ef,{children:o.map(s=>(0,t.jsxs)(ej,{children:[(0,t.jsxs)(ey,{children:[(0,t.jsx)("div",{className:"font-medium",children:s.name||"N/A"}),(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:s.email})]}),(0,t.jsx)(ey,{children:(0,t.jsx)(em.f,{variant:"admin"===s.role?"default":"secondary",children:"admin"===s.role?d.admin.admin:d.admin.user})}),(0,t.jsxs)(ey,{children:[(0,t.jsxs)("div",{className:"text-sm",children:[d.admin.errors,": ",s._count.errorItems]}),(0,t.jsxs)("div",{className:"text-sm",children:[d.admin.practiceCount,": ",s._count.practiceRecords]}),(0,t.jsx)("div",{className:"text-sm",children:(0,t.jsx)(eT,{user:s})})]}),(0,t.jsx)(ey,{children:(0,eo.r)(s.createdAt,"yyyy-MM-dd",e)}),(0,t.jsx)(ey,{children:(0,t.jsx)(em.f,{variant:s.isActive?"default":"destructive",children:s.isActive?d.admin.active:d.admin.disabled})}),(0,t.jsxs)(ey,{className:"text-right space-x-2",children:[(0,t.jsx)(k.f,{variant:"ghost",size:"sm",onClick:()=>_(s),disabled:s.id===c?.user?.id,title:s.isActive?d.admin.disable:d.admin.enable,children:s.isActive?(0,t.jsx)(eN,{className:"h-4 w-4 text-orange-500"}):(0,t.jsx)(ek.f,{className:"h-4 w-4 text-green-500"})}),(0,t.jsx)(k.f,{variant:"ghost",size:"sm",onClick:()=>D(s),disabled:s.id===c?.user?.id,title:d.admin.delete,children:(0,t.jsx)(ev.f,{className:"h-4 w-4 text-destructive"})})]})]},s.id))})]})})]})}var eA=e.i(482022);let eE={name:"scroll-text",size:24,node:[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]};eE.node;let e_=(0,_.f)(eE);function eD(e){return(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[(0,t.jsx)("path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"}),(0,t.jsx)("path",{d:"M9 18c-4.51 2-5-2-7-2"})]})}let eF={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};eF.node;let eM=(0,_.f)(eF);var eL=e.i(81968);let e$=()=>()=>void 0;function eR(){let{t:e}=(0,a.b)(),r=(0,s.useSyncExternalStore)(e$,eL.f,()=>null);return r?r.isStandalone?.()?(0,t.jsx)("p",{className:"text-center text-sm text-muted-foreground",children:e.settings?.about?.androidStandalone||"Running on this device. Data is stored only on this device."}):(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsxs)("span",{className:"break-all",children:[e.settings?.about?.androidServer||"Server",": ",r.getServerUrl()]}),(0,t.jsxs)(k.f,{variant:"outline",className:"gap-2",onClick:()=>r.changeServer(),children:[(0,t.jsx)(eM,{className:"h-4 w-4"}),e.settings?.about?.changeServer||"Change server"]})]}):null}var eI=e.i(637691);function eV(){let{t:e}=(0,a.b)(),[r,i]=(0,s.useState)("");(0,s.useEffect)(()=>{fetch("/api/version").then(e=>e.json()).then(e=>i(e.version)).catch(()=>{})},[]);let n=[{href:eI.f,icon:eD,label:e.settings?.about?.github||"GitHub Repository"},{href:`${eI.f}/releases`,icon:e_,label:e.settings?.about?.releaseNotes||"Release Notes"},{href:`${eI.f}/issues`,icon:er,label:e.settings?.about?.feedback||"Feedback"}];return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center space-y-6 py-8 text-center bg-muted/30 rounded-lg border",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("h3",{className:"text-2xl font-bold",children:e.app?.title||"Smart Error Notebook"}),(0,t.jsx)("p",{className:"text-muted-foreground",children:e.settings?.about?.desc||"AI-powered learning assistant"})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 text-sm text-muted-foreground border px-4 py-2 rounded-full bg-background",children:[(0,t.jsx)(et,{className:"h-4 w-4"}),(0,t.jsxs)("span",{children:[e.settings?.about?.version||"Version",": v",r||"unknown"]})]}),(0,t.jsx)(eR,{}),(0,t.jsx)("div",{className:"flex flex-col sm:flex-row flex-wrap justify-center gap-4 w-full sm:w-auto px-4 sm:px-0",children:n.map(({href:e,icon:s,label:a})=>(0,t.jsx)(k.f,{variant:"outline",asChild:!0,className:"gap-2 w-full sm:w-auto",children:(0,t.jsxs)("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:[(0,t.jsx)(s,{className:"h-4 w-4"}),a,(0,t.jsx)(eA.f,{className:"h-3 w-3 ml-1 opacity-50"})]})},e))}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-8",children:e.settings?.about?.copyright||"© 2026 margrop · Based on wttwins/wrong-notebook · MIT License"})]})}var eG=e.i(37038),eP=e.i(967489),eO=e.i(676167);let eU={name:"",email:"",educationStage:"",enrollmentYear:"",currentGrade:"",currentSemester:"",password:""};function eq(){let{t:e}=(0,a.b)(),[r,c]=(0,s.useState)(eU),[d,o]=(0,s.useState)(""),[m,u]=(0,s.useState)(!0),[x,p]=(0,s.useState)(!1),h=(0,s.useCallback)(async()=>{try{let e=await i.k.get("/api/user"),t=e.fixedGradeSemester?(0,eO.p)(e.fixedGradeSemester):null;c({name:e.name||"",email:e.email||"",educationStage:e.educationStage||"",enrollmentYear:e.enrollmentYear||"",currentGrade:t?.grade||"",currentSemester:t?.semester||"",password:""})}catch(e){l.V.error("[AccountSettings]","Failed to fetch profile",{error:e})}finally{u(!1)}},[]);(0,s.useEffect)(()=>{h()},[h]);let g=async()=>{if(r.password&&r.password!==d)return void R.c.error(e.settings?.messages?.passwordMismatch||"Passwords do not match");p(!0);try{let t={name:r.name,email:r.email,educationStage:r.educationStage};r.enrollmentYear&&(t.enrollmentYear=parseInt(r.enrollmentYear.toString())),r.password&&(t.password=r.password),r.currentGrade&&r.currentSemester?t.fixedGradeSemester=`${r.currentGrade}${r.currentSemester}`:r.currentGrade||(t.fixedGradeSemester=null),await i.k.patch("/api/user",t),R.c.success(e.settings?.messages?.profileUpdated||"Profile updated"),c(e=>({...e,password:""})),o(""),window.location.reload()}catch(t){l.V.error("[AccountSettings]","Failed to update profile",{error:(0,n.d)(t)??(0,n.Z)(t)}),R.c.error((0,n.d)(t)||e.settings?.messages?.updateFailed||"Update failed")}finally{p(!1)}};return m?(0,t.jsx)("div",{className:"flex justify-center py-8",children:(0,t.jsx)(N.f,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):(0,t.jsxs)("div",{className:"space-y-4 border rounded-lg p-4 bg-muted/30",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ep.f,{children:e.auth?.name||"Name"}),(0,t.jsx)(ex.f,{value:r.name||"",onChange:e=>c({...r,name:e.target.value})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ep.f,{children:e.auth?.email||"Email"}),(0,t.jsx)(ex.f,{value:r.email||"",onChange:e=>c({...r,email:e.target.value}),type:"email"})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ep.f,{children:e.auth?.educationStage||"Education Stage"}),(0,t.jsxs)(eP.d,{value:r.educationStage||"",onValueChange:e=>c({...r,educationStage:e,currentGrade:(0,eO.c)(e).includes(r.currentGrade)?r.currentGrade:"",currentSemester:(0,eO.c)(e).includes(r.currentGrade)?r.currentSemester:""}),children:[(0,t.jsx)(eP.P,{children:(0,t.jsx)(eP.U,{placeholder:e.auth?.selectStage||"Select Stage"})}),(0,t.jsxs)(eP.r,{children:[(0,t.jsx)(eP.T,{value:"primary",children:e.auth?.primary||"Primary School"}),(0,t.jsx)(eP.T,{value:"junior_high",children:e.auth?.juniorHigh||"Junior High"}),(0,t.jsx)(eP.T,{value:"senior_high",children:e.auth?.seniorHigh||"Senior High"}),(0,t.jsx)(eP.T,{value:"university",children:e.auth?.university||"University"})]})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ep.f,{children:e.auth?.enrollmentYear||"Enrollment Year"}),(0,t.jsx)(ex.f,{type:"number",value:r.enrollmentYear||"",onChange:e=>c({...r,enrollmentYear:e.target.value}),placeholder:"YYYY"})]})]}),r.educationStage&&(0,eO.c)(r.educationStage).length>0&&(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ep.f,{children:e.settings?.account?.currentGrade||"Current Grade & Semester"}),(0,t.jsxs)(eP.d,{value:r.currentGrade||"",onValueChange:e=>c({...r,currentGrade:e,currentSemester:e?r.currentSemester||"上":""}),children:[(0,t.jsx)(eP.P,{children:(0,t.jsx)(eP.U,{placeholder:e.settings?.account?.selectGrade||"Select Grade"})}),(0,t.jsx)(eP.r,{children:(0,eO.c)(r.educationStage).map(e=>(0,t.jsx)(eP.T,{value:e,children:e},e))})]})]}),r.currentGrade&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ep.f,{children:e.settings?.account?.selectSemester||"Select Semester"}),(0,t.jsxs)(eP.d,{value:r.currentSemester||"",onValueChange:e=>c({...r,currentSemester:e}),children:[(0,t.jsx)(eP.P,{children:(0,t.jsx)(eP.U,{placeholder:e.settings?.account?.selectSemester||"Select Semester"})}),(0,t.jsxs)(eP.r,{children:[(0,t.jsx)(eP.T,{value:"上",children:e.settings?.account?.firstSemester||"1st Semester"}),(0,t.jsx)(eP.T,{value:"下",children:e.settings?.account?.secondSemester||"2nd Semester"})]})]})]})]}),r.currentGrade&&r.currentSemester&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground -mt-2",children:e.settings?.account?.gradeAppliedHint||"New questions will default to this grade. You can also configure AI grade recognition in General Settings."}),(0,t.jsxs)("div",{className:"space-y-3 pt-2 border-t",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ep.f,{children:e.settings?.account?.changePassword||"Change Password (Leave empty to keep)"}),(0,t.jsx)(eG.f,{value:r.password,onChange:e=>c({...r,password:e.target.value}),placeholder:"******",minLength:6})]}),r.password&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ep.f,{children:e.auth?.confirmPassword||"Confirm Password"}),(0,t.jsx)(eG.f,{value:d,onChange:e=>o(e.target.value),placeholder:"******",minLength:6})]})]}),(0,t.jsxs)(k.f,{onClick:g,disabled:x,className:"w-full",children:[x&&(0,t.jsx)(N.f,{className:"mr-2 h-4 w-4 animate-spin"}),e.settings?.account?.update||"Update Profile"]})]})}var eH=e.i(10038),eK=e.i(725981),eB=e.i(411382),eY=e.i(54105),eW=e.i(978056),eJ=e.i(772325);let eX="https://github.com/xiaoyang111222/cn-math-taxonomy",eZ="https://raw.githubusercontent.com/xiaoyang111222/cn-math-taxonomy/HEAD/data/topics.json",eQ=eB.z.object({id:eY.z.string().optional(),name:eY.z.string().trim().min(1),subject:eY.z.string().nullish(),grade:eW.z.number().int(),semester:eY.z.string().nullish(),chapter:eY.z.string().nullish()}).passthrough();eJ.z.array(eQ).min(1);let e0="/api/admin/cnm-tags";function e1(){let{t:e}=(0,a.b)(),r=e.admin.cnmTags,[n,c]=(0,s.useState)(null),[d,o]=(0,s.useState)(!1),m=(0,s.useRef)(null),u=(0,s.useCallback)(async()=>{try{c(await i.k.get(e0))}catch(e){l.V.warn("[CnmTagImportSettings]","Failed to load status",{error:e})}},[]);(0,s.useEffect)(()=>{u()},[u]);let x=async e=>{if(e){o(!0);try{let t;try{t=JSON.parse(await e.text())}catch{R.c.error(r.invalidFile);return}let s=await i.k.post(e0,{topics:t},{timeout:3e5});c(s.status),R.c.success(r.imported.replace("{created}",String(s.result.created)).replace("{skipped}",String(s.result.skipped)))}catch(t){l.V.error("[CnmTagImportSettings]","Import failed",{error:t});let e=t instanceof i.a&&400===t.status;R.c.error(e?r.invalidFile:r.failed)}finally{o(!1),m.current&&(m.current.value="")}}},p=n?.knowledgePoints??0;return(0,t.jsxs)("div",{className:"space-y-3 rounded-lg border p-4",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("p",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,t.jsx)(z.f,{className:"h-4 w-4"}),r.title]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:r.desc})]}),(0,t.jsxs)("div",{className:"space-y-1 rounded-md bg-muted/50 p-3 text-xs text-muted-foreground",children:[(0,t.jsx)("p",{children:r.downloadHint}),(0,t.jsx)("a",{href:eZ,target:"_blank",rel:"noopener noreferrer",className:"block break-all text-primary underline",children:eZ}),(0,t.jsxs)("p",{children:[r.sourceLabel," ",(0,t.jsx)("a",{href:eX,target:"_blank",rel:"noopener noreferrer",className:"break-all text-primary underline",children:eX})]})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:n?p>0?r.status.replace("{count}",String(p)):r.notImported:""}),(0,t.jsx)("input",{ref:m,type:"file",accept:".json,application/json",className:"hidden",onChange:e=>x(e.target.files?.[0]),disabled:d}),(0,t.jsxs)(k.f,{variant:"outline",size:"sm",className:"w-full sm:w-auto",onClick:()=>m.current?.click(),disabled:d,children:[d?(0,t.jsx)(N.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,t.jsx)(eK.f,{className:"mr-2 h-4 w-4"}),d?r.importing:r.select]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:r.note})]})}var e2=e.i(741120);let e4={info:{card:"border-blue-200 dark:border-blue-900 bg-blue-50 dark:bg-blue-950/40",title:"text-blue-900 dark:text-blue-200 font-bold",desc:"text-blue-800 dark:text-blue-200 font-medium",button:"bg-blue-100 dark:bg-blue-900/40 hover:bg-blue-200 dark:hover:bg-blue-900/60 text-blue-900 dark:text-blue-200 border-blue-300 dark:border-blue-800"},danger:{card:"border-red-200 dark:border-red-900 bg-red-50 dark:bg-red-950/40",title:"text-red-700 dark:text-red-300 font-medium",desc:"text-red-600 dark:text-red-400",button:""},critical:{card:"border-red-600/50 bg-red-100/50 dark:bg-red-900/40",title:"text-red-900 dark:text-red-200 font-bold",desc:"text-red-800 dark:text-red-200 font-medium",button:"bg-red-700 hover:bg-red-800"}};function e3({title:e,description:s,tone:a,busy:r,icon:i,onClick:n}){let l=e4[a];return(0,t.jsxs)("div",{className:`p-4 border rounded-lg ${l.card}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:`text-sm flex items-center gap-2 ${l.title}`,children:e}),(0,t.jsx)(k.f,{variant:"info"===a?"outline":"destructive",size:"sm",onClick:n,disabled:r,className:l.button,children:r?(0,t.jsx)(N.f,{className:"h-4 w-4 animate-spin"}):i})]}),(0,t.jsx)("p",{className:`text-xs mt-2 ${l.desc}`,children:s})]})}function e5({isAdmin:e}){let{t:r}=(0,a.b)(),[n,c]=(0,s.useState)(null),d=async(e,t,s,a)=>{c(e);try{R.c.success(await t()),a&&window.location.reload()}catch(t){l.V.error("[DangerZoneSettings]",`${e} failed`,{error:t}),R.c.error(s)}finally{c(null)}},o=r.settings?.clearSuccess||"Success",m=r.settings?.clearError||"Failed",u=async()=>{await (0,R.u)(r.settings?.migrateTagsConfirm||"This will reset system tags. Confirm?",{destructive:!0})&&await d("migrateTags",async()=>{let e=await i.k.post("/api/admin/migrate-tags",{});return`${o}: ${e.count||0} tags migrated.`},r.settings?.clearError||"Failed to migrate tags",!1)},x=async()=>{await (0,R.u)(r.settings?.clearDataConfirm||"Are you sure?",{destructive:!0})&&await d("clearPractice",async()=>(await i.k.delete("/api/stats/practice/clear"),o),m,!0)},p=async()=>{await (0,R.u)(r.settings?.clearErrorDataConfirm||"Are you sure?",{destructive:!0})&&await d("clearErrors",async()=>(await i.k.delete("/api/error-items/clear"),o),m,!0)},h=async()=>{if(!await (0,R.u)(r.settings?.systemResetConfirm||"WARNING: Deleting ALL data. Undoing is impossible. Are you sure?",{destructive:!0}))return;let e=prompt(r.settings?.systemResetPrompt||"Type 'RESET' to confirm system initialization:","");if("RESET"!==e){null!==e&&R.c.error(r.common?.error||"Confirmation failed");return}await d("systemReset",async()=>(await i.k.post("/api/admin/system-reset",{}),r.settings?.clearSuccess||"Success - System Reset Complete"),r.settings?.clearError||"Failed to reset system",!0)};return(0,t.jsxs)(t.Fragment,{children:[e&&(0,t.jsx)(e3,{tone:"info",title:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e2.f,{className:"h-4 w-4"}),r.settings?.migrateTags||"Migrate Tags"]}),description:r.settings?.migrateTagsDesc||"Re-populates standard tags from file",busy:"migrateTags"===n,icon:(0,t.jsx)(e2.f,{className:"h-4 w-4"}),onClick:u}),(0,t.jsx)(e3,{tone:"danger",title:r.settings?.clearData||"Clear Practice Data",description:r.settings?.clearDataDesc||"This will permanently delete all practice history. Irreversible.",busy:"clearPractice"===n,icon:(0,t.jsx)(ev.f,{className:"h-4 w-4"}),onClick:x}),(0,t.jsx)(e3,{tone:"danger",title:r.settings?.clearErrorData||"Clear Error Data",description:r.settings?.clearErrorDataDesc||"This will permanently delete all error items. Irreversible.",busy:"clearErrors"===n,icon:(0,t.jsx)(ev.f,{className:"h-4 w-4"}),onClick:p}),e&&(0,t.jsx)(e3,{tone:"critical",title:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(X.f,{className:"h-4 w-4"}),r.settings?.systemReset||"System Initialization"]}),description:r.settings?.systemResetDesc||"Resets the system to factory state. Deletes ALL data.",busy:"systemReset"===n,icon:(0,t.jsx)(ev.f,{className:"h-4 w-4"}),onClick:h})]})}let e6={name:"user-x",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]};e6.node;let e8=(0,_.f)(e6);function e9({isAdmin:e}){let{t:n}=(0,a.b)(),c=n.settings.deleteAccount,[d,o]=(0,s.useState)(!1),[m,u]=(0,s.useState)(""),[x,p]=(0,s.useState)(!1),h=e=>{!x&&(o(e),e||u(""))},g=async e=>{if(e.preventDefault(),m){p(!0);try{await i.k.delete("/api/user",{body:JSON.stringify({password:m})}),R.c.success(c.success),await (0,r.signOut)({callbackUrl:"/login"})}catch(t){let e=t instanceof i.a&&400===t.status;e||l.V.error("[DeleteAccountSettings]","delete account failed",{error:t}),R.c.error(e?c.wrongPassword:c.failed),p(!1)}}};return(0,t.jsxs)("div",{className:"p-4 border rounded-lg border-red-600/50 bg-red-100/50 dark:bg-red-900/40",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsxs)("span",{className:"text-sm flex items-center gap-2 text-red-900 dark:text-red-200 font-bold",children:[(0,t.jsx)(e8,{className:"h-4 w-4"}),c.title]}),(0,t.jsx)(k.f,{variant:"destructive",size:"sm",className:"bg-red-700 hover:bg-red-800",disabled:e,onClick:()=>o(!0),"aria-label":c.title,children:(0,t.jsx)(e8,{className:"h-4 w-4"})})]}),(0,t.jsx)("p",{className:"text-xs mt-2 text-red-800 dark:text-red-200 font-medium",children:e?c.adminDisabled:c.desc}),(0,t.jsx)(S.N,{open:d,onOpenChange:h,children:(0,t.jsx)(S.d,{className:"sm:max-w-md",children:(0,t.jsxs)("form",{onSubmit:g,className:"space-y-4",children:[(0,t.jsxs)(S.s,{children:[(0,t.jsx)(S.F,{children:c.confirmTitle}),(0,t.jsx)(S.C,{children:c.confirmDesc})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ep.f,{htmlFor:"delete-account-password",children:c.passwordLabel}),(0,t.jsx)(eG.f,{id:"delete-account-password",autoComplete:"current-password",value:m,onChange:e=>u(e.target.value),disabled:x})]}),(0,t.jsxs)(S.c,{className:"gap-2",children:[(0,t.jsx)(k.f,{type:"button",variant:"outline",onClick:()=>h(!1),disabled:x,children:c.cancel}),(0,t.jsxs)(k.f,{type:"submit",variant:"destructive",disabled:!m||x,children:[x&&(0,t.jsx)(N.f,{className:"h-4 w-4 animate-spin"}),c.confirm]})]})]})})})]})}let e7={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};e7.node;let te=(0,_.f)(e7);function tt(){let{t:e,language:r}=(0,a.b)(),n=e.aiConsent,[c,d]=(0,s.useState)(void 0),[o,m]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=!1;return i.k.get("/api/user").then(t=>{e||d(t?.aiDataConsentAt??null)}).catch(e=>l.V.error("[AiConsentSetting]","load consent failed",{error:e})),()=>{e=!0}},[]);let u=async e=>{if(e||await (0,R.u)(n.revokeConfirm,{destructive:!0})){m(!0);try{let t=e?await i.k.post("/api/user/ai-consent",{}):await i.k.delete("/api/user/ai-consent");d(t.aiDataConsentAt),R.c.success(e?n.agreed:n.revoked)}catch(e){l.V.error("[AiConsentSetting]","update consent failed",{error:e}),R.c.error(n.failed)}finally{m(!1)}}};if(void 0===c)return null;let x=null!==c,p=x?new Date(c).toLocaleDateString("en"===r?"en-US":"zh-CN"):"";return(0,t.jsxs)("div",{className:"space-y-2 rounded-lg border p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,t.jsx)(te,{className:"h-4 w-4"}),n.settingTitle]}),(0,t.jsxs)(k.f,{type:"button",size:"sm",variant:x?"outline":"default",onClick:()=>u(!x),disabled:o,children:[o&&(0,t.jsx)(N.f,{className:"h-4 w-4 animate-spin"}),x?n.revoke:n.grant]})]}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[x?n.settingGranted.replace("{date}",p):n.settingNotGranted," ",(0,t.jsx)("a",{className:"underline underline-offset-2",href:(0,C.L)(r),target:"_blank",rel:"noopener noreferrer",children:n.policyLink})]})]})}var ts=e.i(551757),ta=e.i(762368),tr=e.i(132411);async function ti(e,t){let s=await fetch(e);if(!s.ok)throw Error((await s.json().catch(()=>({}))).message||"Download failed");let a=await s.blob(),r=window.URL.createObjectURL(a),i=document.createElement("a");i.href=r;let n=s.headers.get("Content-Disposition")?.match(/filename="(.+)"/);i.download=n?n[1]:t,document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(r)}function tn({isAdmin:e,userId:r}){let{t:n}=(0,a.b)(),[c,d]=(0,s.useState)(!1),[o,m]=(0,s.useState)(!1),[u,x]=(0,s.useState)(null),p=`user:${r}:data-import`,{running:h,refresh:g}=(0,tr.f)(p),f=(0,s.useRef)(!1);(0,s.useEffect)(()=>{if(h){f.current=!0;return}f.current&&(f.current=!1,window.location.reload())},[h]);let j=async e=>{if(!e||await (0,R.u)(n.settings?.exportAllConfirm||"Export all users' data? This may take a while.")){d(!0);try{await ti(e?"/api/export?all=true":"/api/export",e?"wrong-notebook-export-all.json":"wrong-notebook-export.json"),R.c.success(n.settings?.exportSuccess||"Export successful")}catch(t){l.V.error("[DataBackupSettings]",e?"Export all failed":"Export failed",{error:t}),R.c.error(n.settings?.exportFailed||"Export failed")}finally{d(!1)}}},b=async e=>{if(!u)return;let t=e?n.settings?.importAllConfirm||"Import all users' data? This will restore data for all users from the export file.":n.settings?.importConfirm||"Are you sure you want to import?";if(await (0,R.u)(t)){m(!0);try{let t=JSON.parse(await u.text()),{stats:s}=await i.k.post(e?"/api/import?all=true":"/api/import",t);R.c.success((n.settings?.importResultDesc||"Imported {subjects} notebooks, {tags} tags, {items} error items, {schedules} review schedules, {records} practice records, {papers} exam papers and {voices} cloud voice clips.").replace("{subjects}",String(s.subjectsCreated)).replace("{tags}",String(s.tagsCreated)).replace("{items}",String(s.errorItemsCreated)).replace("{schedules}",String(s.reviewSchedulesCreated)).replace("{records}",String(s.practiceRecordsCreated)).replace("{papers}",String(s.examPapersCreated??0)).replace("{voices}",String(s.ttsSpeechesImported??0)).replace("{duplicates}",String(s.duplicateErrorItems??0))),x(null),window.location.reload()}catch(t){t instanceof i.a&&409===t.status&&t.data?.code==="TASK_ALREADY_RUNNING"?(R.c.info(n.errors.TASK_ALREADY_RUNNING),await g()):(l.V.error("[DataBackupSettings]",e?"Import all failed":"Import failed",{error:t}),R.c.error(n.settings?.importFailed||"Import failed"))}finally{m(!1)}}},y=(e,s)=>e?(0,t.jsx)(N.f,{className:"mr-2 h-4 w-4 animate-spin"}):s,v=o||!!h;return(0,t.jsxs)("div",{className:"p-4 border border-blue-200 dark:border-blue-900 rounded-lg bg-blue-50 dark:bg-blue-950/40",children:[(0,t.jsx)("h4",{className:"text-sm font-bold text-blue-900 dark:text-blue-200 mb-3",children:n.settings?.dataManagement||"Data Management"}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)("span",{className:"text-sm text-blue-800 dark:text-blue-200 font-medium",children:n.settings?.exportData||"Export Data"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)(k.f,{variant:"outline",size:"sm",onClick:()=>j(!1),disabled:c,className:"bg-blue-100 dark:bg-blue-900/40 hover:bg-blue-200 dark:hover:bg-blue-900/60 text-blue-900 dark:text-blue-200 border-blue-300 dark:border-blue-800",children:[y(c,(0,t.jsx)(ta.f,{className:"mr-2 h-4 w-4"})),n.settings?.exportData||"Export"]}),e&&(0,t.jsxs)(k.f,{variant:"outline",size:"sm",onClick:()=>j(!0),disabled:c,className:"bg-orange-100 dark:bg-orange-900/40 hover:bg-orange-200 dark:hover:bg-orange-900/60 text-orange-900 dark:text-orange-200 border-orange-300 dark:border-orange-800",children:[y(c,(0,t.jsx)(ta.f,{className:"mr-2 h-4 w-4"})),n.settings?.exportAllData||"Export All"]})]})]}),(0,t.jsx)("p",{className:"text-xs text-blue-700 dark:text-blue-300",children:n.settings?.exportDataDesc||"Export all data as JSON file."})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)("span",{className:"text-sm text-blue-800 dark:text-blue-200 font-medium",children:n.settings?.importData||"Import Data"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"file",accept:".json",onChange:e=>x(e.target.files?.[0]??u),className:"hidden",id:"import-file-input",disabled:v}),(0,t.jsxs)(k.f,{variant:"outline",size:"sm",onClick:()=>document.getElementById("import-file-input")?.click(),disabled:v,className:"bg-blue-100 dark:bg-blue-900/40 hover:bg-blue-200 dark:hover:bg-blue-900/60 text-blue-900 dark:text-blue-200 border-blue-300 dark:border-blue-800",children:[y(v,(0,t.jsx)(eK.f,{className:"mr-2 h-4 w-4"})),u?.name||n.settings?.selectFile||"Select File"]}),u&&(0,t.jsxs)(k.f,{variant:"outline",size:"sm",onClick:()=>b(!1),disabled:v,className:"bg-green-100 dark:bg-green-900/40 hover:bg-green-200 dark:hover:bg-green-900/60 text-green-900 dark:text-green-200 border-green-300 dark:border-green-800",children:[y(v,(0,t.jsx)(ts.f,{className:"mr-2 h-4 w-4"})),n.settings?.importData||"Import"]}),u&&e&&(0,t.jsxs)(k.f,{variant:"outline",size:"sm",onClick:()=>b(!0),disabled:v,className:"bg-orange-100 dark:bg-orange-900/40 hover:bg-orange-200 dark:hover:bg-orange-900/60 text-orange-900 dark:text-orange-200 border-orange-300 dark:border-orange-800",children:[y(v,(0,t.jsx)(ts.f,{className:"mr-2 h-4 w-4"})),n.settings?.importAllData||"Import All"]})]})]}),(0,t.jsx)("p",{className:"text-xs text-blue-700 dark:text-blue-300",children:n.settings?.importDataDesc||"Import data from JSON file. Existing data will be skipped."})]})]})}let tl={name:"bug",size:24,node:[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]};tl.node;let tc=(0,_.f)(tl),td="/api/admin/debug-logs";function to(){let{t:e}=(0,a.b)(),{timeZone:r}=(0,v.M)(),n=e.admin.debugLog,[c,d]=(0,s.useState)(null),[o,m]=(0,s.useState)(!1),u=(0,s.useCallback)(async()=>{try{d(await i.k.get(td))}catch(e){l.V.warn("[DebugLogSettings]","Failed to load debug status",{error:e})}},[]);(0,s.useEffect)(()=>{u()},[u]),(0,s.useEffect)(()=>{if(!c?.enabled)return;let e=setInterval(u,5e3);return()=>clearInterval(e)},[c?.enabled,u]);let x=async(e,t)=>{m(!0);try{await e(),R.c.success(t)}catch(e){l.V.error("[DebugLogSettings]","Debug log action failed",{error:e}),R.c.error(n.failed)}finally{m(!1)}},p=e=>e?(0,eo.r)(e,"yyyy-MM-dd HH:mm",r):"",h=c?.enabled?n.enabledHint.replace("{since}",p(c.enabledAt)).replace("{until}",p(c.expiresAt)):n.disabledHint,g=(c?.entryCount??0)>0;return(0,t.jsxs)("div",{className:"space-y-3 rounded-lg border p-4",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)(ep.f,{htmlFor:"debug-mode-switch",className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(tc,{className:"h-4 w-4"}),n.title]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:n.desc})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:n.enable}),(0,t.jsx)(eu.f,{id:"debug-mode-switch",checked:!!c?.enabled,onCheckedChange:e=>x(async()=>{d(await i.k.post(td,{enabled:e}))},e?n.enabled:n.disabled),disabled:o||!c})]})]}),(0,t.jsxs)("p",{className:`text-xs ${c?.enabled?"text-orange-600":"text-muted-foreground"}`,children:[h,c&&(0,t.jsxs)(t.Fragment,{children:[" ",n.entries.replace("{count}",String(c.entryCount)),c.droppedCount>0&&n.dropped.replace("{count}",String(c.droppedCount))]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,t.jsxs)(k.f,{variant:"outline",size:"sm",onClick:()=>x(async()=>{await ti(`${td}/export`,"wrong-notebook-debug.json"),await u()},n.exported),disabled:o||!g,className:"sm:flex-1",children:[o?(0,t.jsx)(N.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,t.jsx)(ta.f,{className:"mr-2 h-4 w-4"}),n.export]}),(0,t.jsxs)(k.f,{variant:"outline",size:"sm",onClick:()=>x(async()=>{d(await i.k.delete(td))},n.cleared),disabled:o||!g,children:[(0,t.jsx)(ev.f,{className:"mr-2 h-4 w-4"}),n.clear]})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:n.privacyNote})]})}var tm=e.i(307364);function tu({field:e,label:r,description:n}){let{t:c}=(0,a.b)(),[d,o]=(0,s.useState)(!1),[m,u]=(0,s.useState)(!1),[x,p]=(0,s.useState)(!1),[h,g]=(0,s.useState)(null),f=`preference-${e}`;(0,s.useEffect)(()=>{i.k.get("/api/user").then(t=>o(!!t[e])).catch(()=>void 0).finally(()=>u(!0))},[e]);let j=async t=>{o(t),p(!0);try{await i.k.patch("/api/user",{[e]:t}),g(c.importFlow.preferenceSaved)}catch(s){o(!t),g(c.importFlow.preferenceSaveFailed),l.V.error("[Settings]","Failed to save user preference",{field:e,error:s instanceof Error?s.message:String(s)})}finally{p(!1)}};return(0,t.jsxs)("div",{className:"space-y-2 pt-4 border-t",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,t.jsx)(ep.f,{htmlFor:f,children:r}),(0,t.jsx)(eu.f,{id:f,checked:d,onCheckedChange:j,disabled:!m||x})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:n}),h&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:h})]})}function tx(){let{t:e}=(0,a.b)();return(0,t.jsx)(tu,{field:"enableGeogebra",label:e.importFlow.enableGeogebra,description:e.importFlow.enableGeogebraDesc})}function tp(){let{t:e}=(0,a.b)();return(0,t.jsx)(tu,{field:"confirmBeforeImport",label:e.importFlow.confirmBeforeImport,description:e.importFlow.confirmBeforeImportDesc})}var th=e.i(905110);function tg(){let{t:e}=(0,a.b)(),[r,n]=(0,s.useState)(String(th.z)),[c,d]=(0,s.useState)(null),[o,m]=(0,s.useState)(!0),[u,x]=(0,s.useState)(!1),[p,h]=(0,s.useState)(null),g=Number(r),f=""!==r.trim()&&Number.isInteger(g)&&g>=th.P&&g<=th.o,j=(0,s.useCallback)(async()=>{m(!0),h(null);try{let e=(await i.k.get("/api/user")).masteryThreshold??th.z;n(String(e)),d(e)}catch(t){h(e.mastery.thresholdLoadFailed),l.V.error("[Settings]","加载已掌握阈值失败",{error:t instanceof Error?t.message:String(t)})}finally{m(!1)}},[e.mastery.thresholdLoadFailed]);(0,s.useEffect)(()=>{j()},[j]);let b=async()=>{if(f&&null!==c){x(!0),h(null);try{let t=(await i.k.patch("/api/user",{masteryThreshold:g})).masteryThreshold??g;d(t),n(String(t)),h(e.importFlow.preferenceSaved)}catch(t){h(e.importFlow.preferenceSaveFailed),l.V.error("[Settings]","保存已掌握阈值失败",{error:t instanceof Error?t.message:String(t)})}finally{x(!1)}}};return(0,t.jsxs)("div",{className:"space-y-2 border-t pt-4",children:[(0,t.jsx)(ep.f,{htmlFor:"mastery-threshold",children:e.mastery.thresholdLabel}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(ex.f,{id:"mastery-threshold",type:"number",min:th.P,max:th.o,step:1,value:r,onChange:e=>{n(e.target.value),h(null)},disabled:o||u||null===c,className:"w-28","aria-describedby":"mastery-threshold-hint"}),(0,t.jsx)("span",{"aria-hidden":"true",children:"%"}),(0,t.jsxs)(k.f,{type:"button",size:"sm",variant:"outline",onClick:b,disabled:o||u||null===c||!f||g===c,children:[(o||u)&&(0,t.jsx)(N.f,{className:"mr-2 h-4 w-4 animate-spin"}),e.importFlow.saveThreshold]}),!o&&null===c&&(0,t.jsx)(k.f,{type:"button",size:"sm",variant:"outline",onClick:j,children:e.importFlow.retryLoad})]}),(0,t.jsx)("p",{id:"mastery-threshold-hint",className:"text-xs text-muted-foreground",children:e.mastery.thresholdDescription}),null!==c&&!f&&(0,t.jsx)("p",{className:"text-xs text-destructive",role:"alert",children:e.mastery.thresholdInvalid}),p&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",role:"status",children:p})]})}var tf=e.i(28342);function tj(){let{t:e}=(0,a.b)(),[r,c]=(0,s.useState)({gradeRecognitionMode:"fixed",fixedGradeSemester:null}),[d,o]=(0,s.useState)(null),[m,u]=(0,s.useState)(!0),[x,p]=(0,s.useState)(!1),[h,g]=(0,s.useState)(null),f=(0,s.useRef)(0),j=(0,s.useCallback)(async()=>{let t=++f.current;u(!0),g(null);try{let e=await i.k.get("/api/user");if(t!==f.current)return;let s={gradeRecognitionMode:e.gradeRecognitionMode??"fixed",fixedGradeSemester:e.fixedGradeSemester??null};c(s),o(s)}catch(s){if(t!==f.current)return;g(e.questionGrade.loadFailed),l.V.error("[QuestionGradeSetting]","加载录入年级规则失败",{error:(0,n.Z)(s)})}finally{t===f.current&&u(!1)}},[e.questionGrade.loadFailed]);(0,s.useEffect)(()=>{j()},[j]);let b=async()=>{p(!0),g(null);try{let t=await i.k.patch("/api/user",r),s={gradeRecognitionMode:t.gradeRecognitionMode??r.gradeRecognitionMode,fixedGradeSemester:t.fixedGradeSemester??null};c(s),o(s),g(e.importFlow.preferenceSaved)}catch(t){g(e.importFlow.preferenceSaveFailed),l.V.error("[QuestionGradeSetting]","保存录入年级规则失败",{error:(0,n.Z)(t)})}finally{p(!1)}},y=m||x||null===d,v=d?.gradeRecognitionMode===r.gradeRecognitionMode&&d?.fixedGradeSemester===r.fixedGradeSemester;return(0,t.jsxs)("div",{className:"space-y-3 border-t pt-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ep.f,{htmlFor:"question-grade-mode",children:e.questionGrade.label}),(0,t.jsxs)("select",{id:"question-grade-mode",value:r.gradeRecognitionMode,disabled:y,onChange:e=>{c({...r,gradeRecognitionMode:e.target.value}),g(null)},className:"h-10 w-full rounded-md border border-input bg-background px-3 text-sm disabled:opacity-50",children:[(0,t.jsx)("option",{value:"fixed",children:e.questionGrade.fixed}),(0,t.jsx)("option",{value:"ai",children:e.questionGrade.ai})]})]}),"fixed"===r.gradeRecognitionMode&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ep.f,{htmlFor:"question-fixed-grade",children:e.editor.gradeSemester}),(0,t.jsx)(tf.f,{id:"question-fixed-grade",value:r.fixedGradeSemester??"",disabled:y,onChange:e=>{c({...r,fixedGradeSemester:e||null}),g(null)}})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"fixed"===r.gradeRecognitionMode?e.questionGrade.fixedDescription:e.questionGrade.aiDescription}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e.questionGrade.description}),(0,t.jsxs)(k.f,{type:"button",variant:"outline",size:"sm",disabled:y||v,onClick:b,children:[(m||x)&&(0,t.jsx)(N.f,{className:"mr-2 h-4 w-4 animate-spin"}),e.questionGrade.save]}),!m&&null===d&&(0,t.jsx)(k.f,{type:"button",variant:"outline",size:"sm",onClick:j,children:e.importFlow.retryLoad}),h&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",role:"status",children:h})]})}function tb(){let{t:e}=(0,a.b)();return(0,t.jsx)(tu,{field:"enableSvgAnimation",label:e.importFlow.enableSvgAnimation,description:e.importFlow.enableSvgAnimationDesc})}function ty({value:e,onChange:s,disabled:r}){let{t:i}=(0,a.b)();return(0,t.jsxs)("div",{className:"space-y-2 pt-4 border-t",children:[(0,t.jsx)(ep.f,{htmlFor:"app-time-zone",children:i.settings.general.timeZoneLabel}),(0,t.jsx)(ex.f,{id:"app-time-zone",value:e,onChange:e=>s(e.target.value),disabled:r,list:"app-time-zones",placeholder:"Asia/Shanghai"}),(0,t.jsx)("datalist",{id:"app-time-zones",children:["Asia/Shanghai","Asia/Hong_Kong","Asia/Tokyo","Asia/Singapore","Europe/London","America/New_York","America/Los_Angeles","UTC"].map(e=>(0,t.jsx)("option",{value:e},e))}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i.settings.general.timeZoneDesc})]})}function tv({config:e,setConfig:s,isAdmin:r,disabled:i}){let{t:n,language:l,setLanguage:c}=(0,a.b)(),{timeZone:d}=(0,v.M)(),o=e=>s(t=>({...t,timeouts:{...t.timeouts,analyze:1e3*e}}));return(0,t.jsxs)("div",{className:"space-y-4 border rounded-lg p-4 bg-muted/30",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ep.f,{children:n.settings?.language||"Language"}),(0,t.jsxs)(eP.d,{value:l,onValueChange:e=>c(e),children:[(0,t.jsx)(eP.P,{children:(0,t.jsx)(eP.U,{})}),(0,t.jsxs)(eP.r,{children:[(0,t.jsx)(eP.T,{value:"zh",children:"中文 (Chinese)"}),(0,t.jsx)(eP.T,{value:"en",children:"English"})]})]})]}),(0,t.jsx)(ty,{value:e.timeZone??d,onChange:e=>s(t=>({...t,timeZone:e})),disabled:!r||i}),r&&(0,t.jsxs)("div",{className:"space-y-2 pt-4 border-t",children:[(0,t.jsx)(ep.f,{children:n.settings?.general?.timeoutLabel||"AI Analysis Timeout (Seconds)"}),(0,t.jsx)(ex.f,{type:"number",value:e.timeouts?.analyze?e.timeouts.analyze/1e3:"",onChange:e=>{let t=""===e.target.value?0:parseInt(e.target.value);o(isNaN(t)?0:t)},onBlur:()=>{let t=(e.timeouts?.analyze||0)/1e3,s=Math.min(600,Math.max(120,t));s!==t&&o(s)},min:120,max:600}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:n.settings?.general?.timeoutDesc||"Increase this value if you experience frequent timeouts during AI analysis."})]}),(0,t.jsx)(tp,{}),(0,t.jsx)(tj,{}),(0,t.jsx)(tb,{}),(0,t.jsx)(tx,{}),(0,t.jsx)(tm.f,{}),(0,t.jsx)(tg,{})]})}var tw=e.i(77071),tN=e.i(515288),tk=e.i(470279);function tS(){let{t:e}=(0,a.b)(),{groups:r,loading:n,refetch:c}=(0,tk.f)(),[d,o]=(0,s.useState)(""),[m,u]=(0,s.useState)(!1),x=async()=>{let t=d.trim();if(t){u(!0);try{await i.k.post("/api/paper-groups",{name:t}),o(""),R.c.success(e.common?.messages?.saveSuccess||"Saved"),c()}catch(t){l.V.error("[PaperGroupSettings]","Failed to add group",{error:t}),R.c.error(e.common?.messages?.saveFailed||"Failed to save")}finally{u(!1)}}},p=async(t,s)=>{let a=window.prompt(e.settings?.paperGroups?.renamePrompt||"Rename group",s);if(a&&a.trim()!==s)try{await i.k.patch(`/api/paper-groups/${t}`,{name:a.trim()}),R.c.success(e.common?.messages?.saveSuccess||"Saved"),c()}catch(t){l.V.error("[PaperGroupSettings]","Failed to rename group",{error:t}),R.c.error(e.common?.messages?.saveFailed||"Failed to save")}},h=async(t,s)=>{try{await i.k.patch(`/api/paper-groups/${t}`,{isActive:!s}),R.c.success(e.common?.messages?.saveSuccess||"Saved"),c()}catch(t){l.V.error("[PaperGroupSettings]","Failed to toggle group",{error:t}),R.c.error(e.common?.messages?.saveFailed||"Failed to save")}},g=async(t,s,a)=>{if(a>0){let r=(e.settings?.paperGroups?.deleteConfirmWithItems||'Group "{name}" has {count} questions. Deleting will clear their group assignment. Continue?').replace("{name}",s).replace("{count}",String(a));if(!await (0,R.u)(r,{destructive:!0}))return;try{await i.k.delete(`/api/paper-groups/${t}?clear=true`),R.c.success(e.common?.messages?.deleteSuccess||"Deleted"),c()}catch(t){l.V.error("[PaperGroupSettings]","Failed to delete group",{error:t}),R.c.error(e.common?.messages?.deleteFailed||"Delete failed")}return}let r=(e.settings?.paperGroups?.deleteConfirm||'Delete group "{name}"?').replace("{name}",s);if(await (0,R.u)(r,{destructive:!0}))try{await i.k.delete(`/api/paper-groups/${t}`),R.c.success(e.common?.messages?.deleteSuccess||"Deleted"),c()}catch(t){l.V.error("[PaperGroupSettings]","Failed to delete group",{error:t}),R.c.error(e.common?.messages?.deleteFailed||"Delete failed")}};return n?(0,t.jsx)(tN.N,{children:(0,t.jsx)(tN.O,{className:"py-12 flex items-center justify-center",children:(0,t.jsx)(N.f,{className:"h-6 w-6 animate-spin text-muted-foreground"})})}):(0,t.jsxs)(tN.N,{children:[(0,t.jsxs)(tN.Y,{children:[(0,t.jsxs)(tN.v,{className:"flex items-center gap-2 text-lg",children:[(0,t.jsx)(E.f,{className:"h-5 w-5"}),e.settings?.paperGroups?.title||"Paper Groups"]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e.settings?.paperGroups?.desc||"Customize paper groups like Unit Test, Midterm, Final. Default groups A/B/Other can be renamed but not deleted."})]}),(0,t.jsxs)(tN.O,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(ex.f,{value:d,onChange:e=>o(e.target.value),placeholder:e.settings?.paperGroups?.addPlaceholder||"e.g. Unit Test",onKeyDown:e=>{"Enter"===e.key&&x()}}),(0,t.jsxs)(k.f,{onClick:x,disabled:m||!d.trim(),children:[m?(0,t.jsx)(N.f,{className:"h-4 w-4 animate-spin"}):(0,t.jsx)(tw.f,{className:"h-4 w-4 mr-1"}),e.common?.add||"Add"]})]}),(0,t.jsx)("div",{className:"space-y-2",children:r.map(s=>(0,t.jsxs)("div",{className:`flex items-center justify-between rounded-lg border p-3 ${!s.isActive?"opacity-50":""}`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("span",{className:"font-medium",children:s.name}),s.key&&(0,t.jsx)(em.f,{variant:"secondary",className:"text-xs",children:e.settings?.paperGroups?.systemBadge||"Default"}),!s.isActive&&(0,t.jsx)(em.f,{variant:"outline",className:"text-xs",children:e.common?.inactive||"Inactive"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(k.f,{variant:"ghost",size:"sm",onClick:()=>p(s.id,s.name),children:e.common?.rename||"Rename"}),(0,t.jsx)(k.f,{variant:"ghost",size:"sm",onClick:()=>h(s.id,s.isActive),children:s.isActive?e.common?.deactivate||"Deactivate":e.common?.activate||"Activate"}),!s.key&&(0,t.jsx)(k.f,{variant:"ghost",size:"sm",className:"text-destructive hover:text-destructive",onClick:()=>g(s.id,s.name,s._count?.errorItems||0),children:(0,t.jsx)(ev.f,{className:"h-4 w-4"})})]})]},s.id))})]})]})}var tC=e.i(624687),tT=e.i(247167);let tz="[REDACTED]",tA=/api[-_]?key|password|passwd|secret|authorization|cookie|credential|private[-_]?key|^(access|refresh|id|auth|api|bearer|session|csrf|setup)?[-_]?token$/i,tE=Symbol.for("wrong-notebook.debug-log");function t_(){let e=globalThis,t=e[tE];return t||(t={enabledAt:null,entries:[],totalSize:0,dropped:0},e[tE]=t),t}function tD(e){let t=e.replace(/data:([\w.+-]+\/[\w.+-]+);base64,[A-Za-z0-9+/=]+/g,(e,t)=>`[data:${t}, ${e.length} chars]`).replace(/(Bearer\s+)[\w\-.~+/]+=*/gi,`$1${tz}`).replace(/\bsk-[A-Za-z0-9_-]{8,}/g,tz).replace(/([?&](?:key|api_key|apikey|token|access_token)=)[^&\s"']+/gi,`$1${tz}`);return t.length>1e4&&(t=`${t.slice(0,1e4)}…[truncated ${t.length-1e4} chars]`),t}function tF(e,t,s,a=new Date){if(function(e=Date.now()){let t=t_();return null!==t.enabledAt&&(!(e-t.enabledAt>=864e5)||(t.enabledAt=null,!1))}(a.getTime()))try{let r={...function e(t,s=0,a=new WeakSet){if(null==t)return t;if("string"==typeof t)return tD(t);if("number"==typeof t||"boolean"==typeof t)return t;if("bigint"==typeof t)return t.toString();if("function"==typeof t||"symbol"==typeof t)return String(t);if(t instanceof Date)return t.toISOString();if(t instanceof Error){let r={name:t.name,message:tD(t.message)};return t.stack&&(r.stack=tD(t.stack)),void 0!==t.code&&(r.code=e(t.code,s+1,a)),void 0!==t.status&&(r.status=e(t.status,s+1,a)),void 0!==t.cause&&s<8&&(r.cause=e(t.cause,s+1,a)),r}if("object"!=typeof t)return String(t);if(a.has(t))return"[Circular]";if(s>=8)return"[Object]";if(a.add(t),Array.isArray(t)){let r=t.slice(0,100).map(t=>e(t,s+1,a));return t.length>100&&r.push(`…[${t.length-100} more items]`),r}return ArrayBuffer.isView(t)||t instanceof ArrayBuffer?`[Binary ${t.byteLength} bytes]`:Object.fromEntries(Object.entries(t).map(([t,r])=>[t,tA.test(t)&&null!=r&&""!==r?tz:e(r,s+1,a)]))}(t),time:a.toISOString(),level:e,msg:tD(s)},i=JSON.stringify(r).length,n=t_();for(n.entries.push({entry:r,size:i}),n.totalSize+=i;n.entries.length>5e3||n.totalSize>0x1400000&&n.entries.length>1;){let e=n.entries.shift();if(!e)break;n.totalSize-=e.size,n.dropped+=1}}catch{}}let tM={trace:10,debug:20,info:30,warn:40,error:50,fatal:60};function tL(e,t={}){let s,a=tM[e],r=(s=tT.default.env.LOG_LEVEL?.toLowerCase())&&void 0!==tM[s]?tM[s]:tM.info;return(s,i)=>{let n,l,c=new Date;if("string"==typeof s?(n={},l=s):(n=s,l=i||""),tF(e,{...t,...n},l,c),!(a<r)){let s=JSON.stringify({level:e,time:c.toISOString(),...t,...n,msg:l});switch(e){case"error":case"fatal":console.error(s);break;case"warn":console.warn(s);break;default:console.log(s)}}}}(function e(t={}){return t.module,{trace:tL("trace",t),debug:tL("debug",t),info:tL("info",t),warn:tL("warn",t),error:tL("error",t),fatal:tL("fatal",t),child:s=>e({...t,...s}),box:(e,s,a="📋")=>{tF("info",{...t,..."string"==typeof s?{content:s}:s},e);{let a="string"==typeof s?{content:s}:s||{};console.log(JSON.stringify({level:"info",time:new Date().toISOString(),...t,title:e,...a,msg:e}));return}},divider:(e="-")=>{}}})({env:"production"}).child({module:"ai:prompts"});let t$=`填写题目类型,只能是以下 key 之一:single_choice(单选题)、multiple_choice(多选题)、true_false(判断题)、fill_blank(填空题)、calculation(计算题)、solution(解答题)、reading(阅读理解)、cloze(完形填空)、writing(写作)、other(其他)。
2
+ 若题型不明确,填 other。`,tR=`请参考《高思学校竞赛数学导引》(每讲分兴趣篇、拓展篇、超越篇,题目左侧标 1~5 颗星)的星级标准,结合题目所在年级评定难度:
3
+ - 1 星:课本基础题,直接套用概念、公式或简单计算即可(相当于兴趣篇前几题)。
4
+ - 2 星:校内拔高题,需要两三步推理或简单综合(相当于兴趣篇后几题)。
5
+ - 3 星:常规奥数题,小升初、杯赛常见难度,需要掌握该专题的典型方法(相当于拓展篇)。
6
+ - 4 星:较难奥数题,需要构造、分类讨论、转化或多种方法综合(相当于拓展篇末题、超越篇前几题)。
7
+ - 5 星:竞赛压轴题,集训队水平,思路巧妙、步骤长(相当于超越篇难题)。
8
+ 非数学学科按同样的 1~5 级划分:1 星为基础识记,3 星为综合应用,5 星为竞赛或压轴难度。`,tI=`- 输出一个完整的 <svg> 元素,包含 xmlns="http://www.w3.org/2000/svg" 和 viewBox(建议宽 400~600),不要用 Markdown 代码块包裹。
9
+ - 白色背景、黑色线条(stroke="#000",线宽 1.5~2),需要区分的区域可用浅灰填充;不要使用彩色装饰。
10
+ - 按原图比例和相对位置绘制,保留原题印刷标注:顶点字母、数字、长度、角度、单位、箭头和虚线等,文字用 <text>(font-size 14~18);必须过滤掉人在图上手写的草稿、演算、思考批注、圈画和涂改痕迹。
11
+ - 只使用基本图形元素:line、polyline、polygon、rect、circle、ellipse、path、text、g、defs、marker。
12
+ - 严禁使用 <image>、<script>、<foreignObject>、外部链接、外部字体或事件属性。`,tV=String.raw`- 行内公式用 $...$,独立公式用 $$...$$;不要用 \(...\) 或 \[...\],每个 $ 必须成对出现。
13
+ - 所有 LaTeX 命令(如 \frac、\sqrt、\times、\angle)都必须写在 $...$ 内,公式外不能出现反斜杠命令。
14
+ - 只使用 KaTeX 支持的命令和环境:方程组用 \begin{cases}...\end{cases},多行推导用 \begin{aligned}...\end{aligned}(放在 $$...$$ 中),不要用 align、eqnarray、\newcommand、\usepackage、\label、\tag 等。
15
+ - 大括号 {} 必须成对,\left 与 \right 必须成对,\begin{...} 与 \end{...} 必须对应。
16
+ - 公式中的中文写在 \text{...} 里,或放到公式外;百分号写成 \%,美元符号写成 \$。
17
+ - 反斜杠只写一个(\frac),不要写成 \\frac;换行符 \\ 只能用在 cases、aligned 等环境里。`,tG=`【角色与核心任务 (ROLE AND CORE TASK)】
18
+ 你是一位世界顶尖的、经验丰富的、专业的跨学科考试分析专家(Interdisciplinary Exam Analysis Expert)。你的核心任务是极致准确地分析用户提供的考试题目图片,全面理解所有文本、图表和隐含约束,并提供一个完整、高度结构化且专业的解决方案。
19
+
20
+ {{language_instruction}}
21
+
22
+ 【核心输出要求 (OUTPUT REQUIREMENTS)】
23
+ 你的响应输出**必须严格遵循以下自定义标签格式**。**严禁**使用 JSON 或 Markdown 代码块。**严禁**对 LaTeX 公式中的反斜杠进行二次转义(如 "\\\\frac" 是错误的,必须是 "\\frac")。
24
+
25
+ 请严格按照以下结构输出内容:
26
+
27
+ <subject>
28
+ 在此处填写学科,必须是以下之一:"数学", "物理", "化学", "生物", "英语", "语文", "历史", "地理", "政治", "其他"。
29
+ </subject>
30
+
31
+ <knowledge_points>
32
+ 在此处填写知识点,使用逗号分隔,例如:知识点1, 知识点2, 知识点3
33
+ </knowledge_points>
34
+
35
+ <requires_image>
36
+ 判断这道题是否需要依赖图片才能正确解答。如果题目包含几何图形、函数图像、实验装置图、电路图等必须看图才能理解的内容,填写 true;如果只需要文字描述即可理解(如英语题、纯文字数学题),填写 false。
37
+ </requires_image>
38
+
39
+ <has_figure>
40
+ 判断题目本身是否带有配图(几何图形、函数图像、示意图、统计图、实验装置图、电路图等;不含学生的作答痕迹和纯文字表格)。有配图填 true,否则填 false。
41
+ </has_figure>
42
+
43
+ <figure_svg>
44
+ 如果 has_figure 为 true,用 SVG 重新绘制题目配图:
45
+ ${tI}
46
+ 如果 has_figure 为 false,请留空。
47
+ </figure_svg>
48
+
49
+ <wrong_answer_text>
50
+ 如果图片中包含学生针对本题提交的正式错误答案或正式解题步骤,请按原样摘录;必须过滤掉空白处或题干旁的草稿、竖式演算、试算数字、涂改痕迹、审题圈画以及人的思考过程批注。如果图片中只有草稿/思考痕迹或没有看到正式错误解答,请留空。
51
+ </wrong_answer_text>
52
+
53
+ <mistake_status>
54
+ 填写以下值之一:wrong_attempt(图片中有明确的正式错误答案或正式错误步骤;仅有草稿、涂改或思考批注不算作答)、not_attempted(没有正式错误解答,像是不会做、未作答或仅有草稿/思考痕迹)、unknown(无法判断)。
55
+ </mistake_status>
56
+
57
+ <difficulty_stars>
58
+ 只填写 1 到 5 之间的一个整数,表示题目难度星级。
59
+ ${tR}
60
+ </difficulty_stars>
61
+
62
+ <question_type>
63
+ ${t$}
64
+ </question_type>
65
+
66
+ <mistake_analysis>
67
+ 如果图片中包含学生的正式错误解答,请分析错误可能发生在哪一步、为什么错、导致了什么后果;必须忽略零散草稿和人的思考过程,如果没有正式错误解答,请留空。
68
+ </mistake_analysis>
69
+
70
+ <question_text>
71
+ 在此处填写题目的完整文本。使用 Markdown 格式。所有数学公式使用 LaTeX 符号(行内 $...$,块级 $$...$$)。
72
+
73
+ 【题干转录规则】
74
+ 1. **逐字照录**:只按图片原题转录题干(含题号、分值和标点),不要改写、概括、增删字词或调整语序;看不清的字用 [?] 标注。
75
+ 2. **过滤草稿与思考过程**:必须过滤掉图片中人的手写草稿、竖式演算、试算算式、思考过程批注、审题圈画、涂改痕迹以及学生在横线或括号中填入的答案,严禁将草稿或人的思考过程记录进 question_text。
76
+ 3. **填空统一**:所有填空处(含已被学生手写填入答案的横线)统一还原写作 ____(4 个下划线),不论原图横线长短。
77
+ 4. **选择题选项另起一行**:如果题目是选择题,题干与选项必须分行,选项必须在题干下方另起新行书写(不要将选项紧接在题干同一行后面)。
78
+ 5. **图形描述**:如果题目依赖图形,在题干原文之后空一行,单独写**一段**以「图示:」开头的图形描述;只能使用「图示:」这一种写法(不要写「图示信息」「图示说明」等),描述中不要重复题干已有的文字,且不要包含学生的手写草稿或作答痕迹。题目不依赖图形时不要写图示段落。
79
+
80
+ 【表格处理规则】
81
+ 如果图片中包含表格,必须完整转录表格内容,遵循以下原则:
82
+
83
+ 1. **标准表格**:使用 Markdown 表格语法
84
+ | 列标题1 | 列标题2 | 列标题3 |
85
+ |---------|---------|---------|
86
+ | 数据1 | 数据2 | 数据3 |
87
+
88
+ 2. **复杂表格**(合并单元格/多级表头/不规则布局):
89
+ - 优先尝试用 Markdown 表格近似表示
90
+ - 如果 Markdown 无法准确表达,在表格前用文字说明结构,然后用简化的 Markdown 表格 + 注释
91
+ - 示例:
92
+ > 注:第1行为主标题,横跨3列;第2-3行为数据行
93
+
94
+ | 项目 | 数值A | 数值B |
95
+ |------|-------|-------|
96
+ | 测试1 | 10 | 20 |
97
+ | 测试2 | 15 | 25 |
98
+
99
+ 3. **表格完整性要求**:
100
+ - 必须转录所有单元格内容(包括空单元格用 - 或空格表示)
101
+ - 保留表格标题、单位、注释
102
+ - 保留数据的对齐关系和分组信息
103
+ - 表格中的数学公式使用 LaTeX 语法
104
+
105
+ 4. **表格上下文**:
106
+ - 如果表格有标题或编号(如"表1"),保留在表格前
107
+ - 如果表格后有注释或说明,保留在表格后
108
+ - 保持表格在题目中的位置关系
109
+
110
+ 5. **特殊情况处理**:
111
+ - 图表混合:如果表格旁边有图形,用文字说明位置关系
112
+ - 手写表格:尽力识别手写内容,不确定的用 [?] 标注
113
+ - 模糊表格:如果表格不清晰,在表格前注明"(表格内容可能不完整)"
114
+ </question_text>
115
+
116
+ <answer_text>
117
+ 在此处填写正确答案。使用 Markdown 和 LaTeX 符号。如果答案包含表格,遵循上述【表格处理规则】。
118
+ </answer_text>
119
+
120
+ <analysis>
121
+ 在此处填写详细的步骤解析。
122
+ * 解析语言遵循字段语言规则。
123
+ * **直接使用标准的 LaTeX 符号**(如 $\\frac{1}{2}$),**不要**进行 JSON 转义(不要写成 \\\\frac)。
124
+ * 如果解析过程需要表格(如列表对比、分步计算表),遵循上述【表格处理规则】。
125
+ </analysis>
126
+
127
+ 【知识点标签列表(KNOWLEDGE POINT LIST)】
128
+ {{knowledge_points_list}}
129
+
130
+ 【标签使用规则 (TAG RULES)】
131
+ - 标签必须与题目实际考查的知识点精准匹配。
132
+ - 每题最多 5 个标签。
133
+
134
+ 【!!! 关键格式与内容约束 (CRITICAL RULES) !!!】
135
+ 1. **格式严格**:必须包含输出协议规定的全部 XML 标签,包括 grade_semester 年级标签,不要输出任何“开场白”或“结束语”。
136
+ 2. **纯文本**:内容作为纯文本处理,**不要转义反斜杠**。
137
+ 3. **内容完整**:如果包含子问题,请在 question_text 中完整列出。
138
+ 4. **禁止图片**:严禁包含任何图片链接或 markdown 图片语法。
139
+ 5. **LaTeX 规范**:
140
+ ${tV}
141
+
142
+ {{grade_instruction}}
143
+ {{provider_hints}}`,tP=`你是一位资深的K12教育题目生成专家,具备跨学科的题目创作能力。你的核心任务是**根据以下原题和知识点,举一反三生成高质量教学题目**,帮助学生巩固知识并拓展解题思路。
144
+ ### 角色定义
145
+ 1. **学科全能专家**
146
+ - 精通K12阶段所有学科(数学/语文/英语/物理/化学/生物/历史/地理/政治)
147
+ - 熟悉各年级课程标准与知识点分布
148
+ - 能准确识别题目考察的核心能力点(计算/推理/分析/应用/创新)
149
+ 2. **题目变异大师**
150
+ - 掌握12种变式技法:条件替换/情境迁移/问题转化/数据重构/图形变形/角色反转/跨学科融合/难度阶梯/开放拓展/陷阱设计/逆向思维/生活应用
151
+ - 确保变式题目保持原题核心考点,改变题目表现形式
152
+ 3. **学情分析师**
153
+ - 预判学生易错点(认知盲区/概念混淆/计算失误/审题偏差)
154
+ - 在变式题目中针对性强化易错点训练
155
+ ### 执行流程
156
+ 1. **接收任务**
157
+ 原题: "{{original_question}}"
158
+ {{language_instruction}}
159
+ DIFFICULTY LEVEL: {{difficulty_level}}
160
+ {{difficulty_instruction}}
161
+ Knowledge Points: {{knowledge_points}}
162
+ 2. **解构分析**
163
+ - 提取核心考点与能力要求
164
+ - 分析题目陷阱与解题路径
165
+ 3. **质量管控**
166
+ - 确保每道题:
167
+ ✓ 覆盖相同核心知识点
168
+ ✓ 保持解题逻辑一致性
169
+ ✓ 答案唯一且可验证
170
+ ✓ 无知识性错误
171
+ ### 输出规范
172
+ 你的响应输出**必须严格遵循以下自定义标签格式**。**严禁**使用 JSON 或 Markdown 代码块。**严禁**返回 \`\`\`json ... \`\`\`。
173
+
174
+ 请严格按照以下结构输出内容(不要包含任何其他文字):
175
+
176
+ <question_text>
177
+ 在此处填写新生成的填空题或解答题。不要包含题号、分值或选择题选项。
178
+ </question_text>
179
+
180
+ <answer_text>
181
+ 在此处填写新题目的正确答案。
182
+ </answer_text>
183
+
184
+ <analysis>
185
+ 在此处填写新题目的详细解析。
186
+ * 解析语言遵循字段语言规则。
187
+ * **直接使用标准的 LaTeX 符号**(如 $\\frac{1}{2}$),**不要**进行 JSON 转义。
188
+ </analysis>
189
+
190
+ {{figure_instruction}}
191
+
192
+ ###关键格式与内容约束 (CRITICAL RULES) !!!
193
+ 1. **纯文本**:内容作为纯文本处理,**不要转义反斜杠**。
194
+ 2. **LaTeX 规范**:
195
+ ${tV}
196
+
197
+ {{grade_instruction}}
198
+ {{provider_hints}}`;var tO=e.i(113381);tO.I.join("、"),tO.r.join("、");var tU=e.i(395925);function tq({name:e,description:s}){return(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-start gap-1 sm:gap-2 text-xs py-1",children:[(0,t.jsx)("code",{className:"bg-muted px-1.5 py-0.5 rounded font-mono text-primary shrink-0 w-fit",children:`{{${e}}}`}),(0,t.jsx)("span",{className:"text-muted-foreground",children:s})]})}function tH(){let{t:e}=(0,a.b)();return(0,t.jsxs)("div",{className:"bg-amber-50 dark:bg-amber-950/40 border border-amber-200 dark:border-amber-900 rounded-md p-3 flex items-start gap-3 text-amber-900 dark:text-amber-200 text-sm mb-4",children:[(0,t.jsx)(X.f,{className:"h-5 w-5 shrink-0 text-amber-600"}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("p",{className:"font-medium",children:e.settings?.prompts?.caution||"Modify with Caution"}),(0,t.jsx)("p",{className:"text-amber-800/90 dark:text-amber-200 text-xs",children:e.settings?.prompts?.warning||"Variables in {{brackets}} are used to inject dynamic content. Please preserve these variables, otherwise the AI providing may fail to get question context or return invalid formats."})]})]})}function tK({config:e,onUpdate:s}){let{t:r}=(0,a.b)(),i=e.prompts?.analyze||tG,n=e.prompts?.similar||tP,l=async e=>{await (0,R.u)(r.settings?.prompts?.resetConfirm||"Are you sure you want to reset to default?",{destructive:!0})&&s(e,"analyze"===e?tG:tP)},c=(e,t)=>{s(e,t)};return(0,t.jsx)("div",{className:"space-y-4 border rounded-lg p-4 bg-muted/30",children:(0,t.jsxs)(ed.i,{defaultValue:"analyze",className:"w-full",children:[(0,t.jsxs)(ed.U,{className:"grid w-full grid-cols-2",children:[(0,t.jsx)(ed.k,{value:"analyze",children:r.settings?.prompts?.analysisTab||"Analysis Prompt"}),(0,t.jsx)(ed.k,{value:"similar",children:r.settings?.prompts?.similarTab||"Similar Question Prompt"})]}),(0,t.jsx)(ed.S,{value:"analyze",className:"space-y-4 py-4",children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(ep.f,{className:"text-base font-semibold",children:r.settings?.prompts?.customAnalysis||"Custom Analysis Template"}),(0,t.jsxs)(k.f,{variant:"outline",size:"sm",onClick:()=>l("analyze"),children:[(0,t.jsx)(tU.f,{className:"w-4 h-4 mr-2"}),r.settings?.prompts?.reset||"Reset Default"]})]}),(0,t.jsx)(tH,{}),(0,t.jsxs)("div",{className:"space-y-2 border rounded-md p-3 bg-background",children:[(0,t.jsxs)("h4",{className:"text-xs font-medium flex items-center gap-1.5 mb-2",children:[(0,t.jsx)(et,{className:"h-3.5 w-3.5"}),r.settings?.prompts?.variables||"Available Variables"]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(tq,{name:"language_instruction",description:r.settings?.prompts?.vars?.languageInstruction||"Injects instructions based on target language (e.g., keep English questions in English but analysis in Chinese)."}),(0,t.jsx)(tq,{name:"knowledge_points_list",description:r.settings?.prompts?.vars?.knowledgePointsList||"Injects the standard list of knowledge point tags for the specific subject."}),(0,t.jsx)(tq,{name:"provider_hints",description:r.settings?.prompts?.vars?.providerHints||"Provider compatibility hints that follow the application output contract."})]})]}),(0,t.jsx)(tC.f,{value:i,onChange:e=>c("analyze",e.target.value),className:"font-mono text-xs min-h-[400px]",placeholder:tG})]})}),(0,t.jsx)(ed.S,{value:"similar",className:"space-y-4 py-4",children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(ep.f,{className:"text-base font-semibold",children:r.settings?.prompts?.customSimilar||"Custom Similar Question Template"}),(0,t.jsxs)(k.f,{variant:"outline",size:"sm",onClick:()=>l("similar"),children:[(0,t.jsx)(tU.f,{className:"w-4 h-4 mr-2"}),r.settings?.prompts?.reset||"Reset Default"]})]}),(0,t.jsx)(tH,{}),(0,t.jsxs)("div",{className:"space-y-2 border rounded-md p-3 bg-background",children:[(0,t.jsxs)("h4",{className:"text-xs font-medium flex items-center gap-1.5 mb-2",children:[(0,t.jsx)(et,{className:"h-3.5 w-3.5"}),r.settings?.prompts?.variables||"Available Variables"]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(tq,{name:"difficulty_level",description:r.settings?.prompts?.vars?.difficultyLevel||"Target difficulty level."}),(0,t.jsx)(tq,{name:"difficulty_instruction",description:r.settings?.prompts?.vars?.difficultyInstruction||"Specific writing instructions for the target difficulty."}),(0,t.jsx)(tq,{name:"original_question",description:r.settings?.prompts?.vars?.originalQuestion||"The full text of the original question."}),(0,t.jsx)(tq,{name:"knowledge_points",description:r.settings?.prompts?.vars?.knowledgePoints||"List of knowledge points to test."}),(0,t.jsx)(tq,{name:"language_instruction",description:r.settings?.prompts?.vars?.languageInstructionShort||"Language formatting instructions."})]})]}),(0,t.jsx)(tC.f,{value:n,onChange:e=>c("similar",e.target.value),className:"font-mono text-xs min-h-[400px]",placeholder:tP})]})})]})})}var tB=e.i(999593);function tY({open:e,onOpenChange:r,onConfirm:i}){let{t:n}=(0,a.b)(),[l,c]=(0,s.useState)(!1),[d,o]=(0,s.useState)(!1),m=async()=>{o(!0);try{await i(),c(!1),r(!1)}catch{}finally{o(!1)}};return(0,t.jsx)(S.N,{open:e,onOpenChange:e=>!d&&r(e),children:(0,t.jsxs)(S.d,{className:"w-[calc(100vw-2rem)] sm:max-w-lg",children:[(0,t.jsxs)(S.s,{children:[(0,t.jsx)(S.F,{children:n.eula.dialogTitle}),(0,t.jsx)(S.C,{children:n.eula.dialogDesc})]}),(0,t.jsx)(tB.f,{checked:l,onCheckedChange:c,disabled:d}),(0,t.jsxs)("div",{className:"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",children:[(0,t.jsx)(k.f,{variant:"outline",onClick:()=>r(!1),disabled:d,children:n.eula.cancel}),(0,t.jsxs)(k.f,{onClick:m,disabled:!l||d,children:[d&&(0,t.jsx)(N.f,{className:"mr-2 h-4 w-4 animate-spin"}),n.eula.accept]})]})]})})}function tW({endpoint:e,retentionDays:r,disabled:i,onSave:n}){let{t:l}=(0,a.b)(),c=l.telemetrySettings,[d,o]=(0,s.useState)(""!==e),[m,u]=(0,s.useState)(e),[x,p]=(0,s.useState)(String(r)),h=Number(x),g=Number.isInteger(h)&&h>=1&&h<=365;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(ep.f,{htmlFor:"telemetry-endpoint",children:c.endpoint}),d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ex.f,{id:"telemetry-endpoint",value:m,placeholder:c.endpointPlaceholder,disabled:i,onChange:e=>u(e.target.value)}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:c.endpointHint})]}):(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:c.endpointDefault}),(0,t.jsx)(k.f,{variant:"link",size:"sm",className:"h-auto p-0",disabled:i,onClick:()=>o(!0),children:c.endpointCustomize})]})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(ep.f,{htmlFor:"telemetry-retention",children:c.retentionDays}),(0,t.jsx)(ex.f,{id:"telemetry-retention",type:"number",min:1,max:365,className:"w-32",value:x,disabled:i,onChange:e=>p(e.target.value)})]}),(0,t.jsx)(k.f,{size:"sm",variant:"outline",disabled:i||!g,onClick:()=>n({endpoint:m.trim(),retentionDays:h}),children:c.save})]})}function tJ({events:e,errors:s,disabled:r,onClear:i}){let{t:n}=(0,a.b)(),{timeZone:l}=(0,v.M)(),c=n.telemetrySettings,d=e=>(0,eo.r)(e,"MM-dd HH:mm",l),o=e=>e?c.forwarded:c.notForwarded,m=0===e.length&&0===s.length;return(0,t.jsxs)("details",{className:"rounded-md border p-3 text-sm",children:[(0,t.jsx)("summary",{className:"cursor-pointer font-medium",children:c.recentTitle}),(0,t.jsxs)("div",{className:"mt-3 space-y-3",children:[m&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:c.recentEmpty}),e.length>0&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:c.recentEvents}),(0,t.jsx)("ul",{className:"space-y-1 font-mono text-xs",children:e.map(e=>(0,t.jsxs)("li",{className:"break-all",children:[d(e.createdAt)," ",e.name," ",e.payload??""," · ",o(e.forwardedAt)]},e.id))})]}),s.length>0&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:c.recentErrors}),(0,t.jsx)("ul",{className:"space-y-1 font-mono text-xs",children:s.map(e=>(0,t.jsxs)("li",{className:"break-all",children:[d(e.createdAt)," ",e.kind," ",e.scope," ",e.name," #",e.fingerprint,e.path?` ${e.path}`:"",e.message?` — ${e.message}`:""," · ",o(e.forwardedAt)]},e.id))})]}),(0,t.jsxs)(k.f,{variant:"outline",size:"sm",onClick:i,disabled:r||m,children:[(0,t.jsx)(ev.f,{className:"mr-2 h-4 w-4"}),c.clear]})]})]})}function tX({id:e,label:s,description:a,checked:r,disabled:i,onCheckedChange:n}){return(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(ep.f,{htmlFor:e,className:"font-medium",children:s}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:a})]}),(0,t.jsx)(eu.f,{id:e,checked:r,disabled:i,onCheckedChange:n,className:"shrink-0"})]})}let tZ="/api/admin/telemetry";async function tQ(e){return await i.k.post("/api/admin/eula/accept",{version:e}),i.k.post(tZ,{forwarding:!0})}function t0(e){return i.k.post(tZ,e)}var t1=e.i(983761);function t2(){let{t:e}=(0,a.b)(),{timeZone:r}=(0,v.M)(),c=e.telemetrySettings,{data:d,update:o,enableWithConsent:m,clear:u}=function(){let[e,t]=(0,s.useState)(null),a=(0,s.useCallback)(async()=>{try{t(await i.k.get(tZ))}catch(e){l.V.warn("[TelemetrySettings]","Failed to load telemetry status",{error:e})}},[]);return(0,s.useEffect)(()=>{a()},[a]),{data:e,update:async e=>t(await t0(e)),enableWithConsent:async e=>t(await tQ(e)),clear:async()=>t(await i.k.delete(tZ))}}(),[x,p]=(0,s.useState)(!1),[h,g]=(0,s.useState)(!1),f=async(e,t)=>{p(!0);try{await e(),R.c.success(t)}catch(e){throw l.V.error("[TelemetrySettings]","Telemetry action failed",{error:e}),R.c.error("INVALID_TELEMETRY_ENDPOINT"===(0,n.d)(e)?c.invalidEndpoint:c.failed),e}finally{p(!1)}},j=e=>f(async()=>{await o(e),(0,t1.z)("settings_changed",{section:"telemetry"})},c.saved).catch(()=>void 0);if(!d)return null;let b=d.lockedByEnv,y=x||b,w=e=>(0,eo.r)(e,"yyyy-MM-dd HH:mm",r),N=async()=>{await (0,R.u)(c.clearConfirm)&&f(u,c.cleared).catch(()=>void 0)},k=d.lastFlushAt?c.lastFlush.replace("{time}",w(d.lastFlushAt)):c.neverFlushed;return d.lastAttempt?.status==="failed"&&(k=c.lastAttemptFailed.replace("{status}",String(d.lastAttempt.httpStatus??"network"))),d.lastAttempt?.status==="stopped"&&(k=c.lastAttemptStopped),(0,t.jsxs)("div",{className:"space-y-4 rounded-lg border p-4",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("p",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(te,{className:"h-4 w-4"}),c.title]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:c.desc})]}),b&&(0,t.jsx)("p",{className:"text-xs text-orange-600",children:c.lockedByEnv}),d.consentPending&&(0,t.jsx)("p",{className:"text-xs text-orange-600",children:c.consentPending}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[d.eula.acceptedVersion?c.eulaStatus.replace("{version}",d.eula.acceptedVersion).replace("{time}",d.eula.acceptedAt?w(d.eula.acceptedAt):"-"):c.eulaNotAccepted," ",(0,t.jsx)("a",{href:"/eula",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:c.viewEula})]}),(0,t.jsx)(tX,{id:"telemetry-forwarding",label:c.forwarding,description:c.forwardingDesc,checked:d.forwarding,disabled:y,onCheckedChange:e=>{e&&(!d.eula.acceptedVersion||d.consentPending)?g(!0):j({forwarding:e})}}),d.forwarding&&(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[c.pending.replace("{count}",String(d.pending))," · ",k]}),(0,t.jsx)(tX,{id:"telemetry-recording",label:c.recording,description:c.recordingDesc,checked:d.recording,disabled:y,onCheckedChange:e=>j({recording:e})}),(0,t.jsx)(tX,{id:"telemetry-errors",label:c.errors,description:c.errorsDesc,checked:d.errors,disabled:y,onCheckedChange:e=>j({errors:e})}),(0,t.jsx)(tW,{endpoint:d.endpoint,retentionDays:d.retentionDays,disabled:y,onSave:j}),(0,t.jsx)(tJ,{events:d.events,errors:d.errorRecords,disabled:x,onClear:N}),(0,t.jsx)(tY,{open:h,onOpenChange:g,onConfirm:()=>f(()=>m(d.eula.current),c.enabled)})]})}var t4=e.i(21357),t3=e.i(434901),t5=e.i(753817),t6=e.i(128093),t8=e.i(79058),t9=e.i(495178);function t7({config:e,setConfig:r,saving:c,onSave:d}){let{t:o,language:m}=(0,a.b)(),u=o.settings.tts,[x,p]=(0,s.useState)(!1),[h,g]=(0,s.useState)(null),f=e.tts?.mode??"browser",j=(0,t9.y)(f)?f:null,b=j?e.tts?.[j]:void 0,y=(e,t)=>{j&&r(s=>({...s,tts:{...s.tts,[j]:{...s.tts?.[j],[e]:t}}}))},v=!!j&&(0,t9.S)(j),w=j?(0,t9.L)(e,j):void 0,S=v?b?.apiKey:w?.apiKey,C=async()=>{(0,t8.p)(),p(!0),g(null);try{await d();let{id:e,version:t}=await i.k.post("/api/tts",{text:u.previewText,language:m},{timeout:12e4,recoverable:!0}),s=(0,t8.l)();if(!s)return;s.src=`/api/tts/${e}?v=${t}`,s.playbackRate=1,await s.play()}catch(t){l.V.error("[TtsSettings]","Preview failed",{error:t});let e=(0,n.d)(t);R.c.error("TTS_NOT_CONFIGURED"===e?u.notConfigured:"TTS_PROVIDER_ERROR"===e?u.providerError:u.previewFailed),g((0,n.L)(t)??null)}finally{p(!1)}};return(0,t.jsxs)("div",{className:"space-y-4 border rounded-lg p-4 bg-muted/30",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ep.f,{children:u.title}),(0,t.jsxs)(eP.d,{value:f,onValueChange:e=>r(t=>({...t,tts:{...t.tts,mode:e}})),children:[(0,t.jsx)(eP.P,{children:(0,t.jsx)(eP.U,{})}),(0,t.jsx)(eP.r,{children:t9.l.map(e=>(0,t.jsx)(eP.T,{value:e,children:u.modes[e]},e))})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:j?u.cloudHint:u.browserHint})]}),j&&(0,t.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[t9.D[j]&&(0,t.jsxs)("div",{className:"rounded-md border border-green-200 bg-green-50 p-3 text-xs text-green-800 dark:border-green-900 dark:bg-green-950/40 dark:text-green-300",children:[u.freeTrial," ",(0,t.jsx)("a",{href:t9.D[j],target:"_blank",rel:"noopener noreferrer",className:"underline",children:u.freeTrialLink})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(t3.f,{label:"openai"===j?"OpenAI API Key":v?u.speechApiKey:`${(0,t6.z)(j,m)} API Key`,href:t9.r[j].apiKey,linkText:o.settings.ai.docLinks.apiKey}),(0,t.jsx)(eG.f,{value:S||"",onChange:e=>{var t;return t=e.target.value,void(j&&(v?y("apiKey",t):r(e=>({...e,[j]:{...e[j],apiKey:t}}))))},placeholder:"qwen"===j?"sk-sp-...":v?"":"sk-..."}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:u.apiKeyHint[j]})]}),(0,t.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(t3.f,{label:u.model,href:t9.r[j].model,linkText:u.docs}),(0,t.jsx)(ex.f,{value:b?.model||"",onChange:e=>y("model",e.target.value),placeholder:t9.C[j].model})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(t3.f,{label:u.voice,href:t9.r[j].voice,linkText:u.voiceList}),(0,t.jsx)(ex.f,{value:b?.voice||"",onChange:e=>y("voice",e.target.value),placeholder:t9.C[j].voice})]})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:u.voiceHint[j]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(t3.f,{label:u.endpoint,href:t9.r[j].endpoint,linkText:u.docs}),(0,t.jsx)(ex.f,{value:b?.endpoint||"",onChange:e=>y("endpoint",e.target.value),placeholder:(0,t9.E)(j,w)}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:u.endpointHint})]})]},j),(0,t.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[j&&(0,t.jsxs)(k.f,{variant:"outline",onClick:C,disabled:c||x,className:"sm:w-auto",children:[x?(0,t.jsx)(N.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,t.jsx)(t4.f,{className:"mr-2 h-4 w-4"}),u.preview]}),(0,t.jsxs)(k.f,{onClick:()=>void d(),disabled:c||x,className:"flex-1",children:[c&&(0,t.jsx)(N.f,{className:"mr-2 h-4 w-4 animate-spin"}),u.save]})]}),j&&h&&(0,t.jsx)("div",{className:"rounded-md border border-red-200 bg-red-50 p-2 dark:border-red-900 dark:bg-red-950/40",children:(0,t.jsx)(t5.f,{detail:h})})]})}var se=e.i(835467);function st({value:e,icon:s,label:a}){return(0,t.jsxs)(ed.k,{value:e,className:"px-2 sm:px-3",children:[s,(0,t.jsx)("span",{className:"hidden sm:inline",children:a})]})}function ss(){let{setTimeZone:e}=(0,v.M)(),{data:n}=(0,r.useSession)(),c=n?.user?.role==="admin",d=n?.user?.id??"",{t:o}=(0,a.b)(),m=(0,w.useRouter)(),[u,x]=(0,s.useState)(!1),p=(0,s.useRef)(null),[h,g]=(0,s.useState)(!1),[f,j]=(0,s.useState)(!1),[b,y]=(0,s.useState)({aiProvider:"minimax"}),C=(0,s.useCallback)(async()=>{j(!0);try{y(await i.k.get("/api/settings"))}catch(e){l.V.error("[SettingsDialog]","Failed to fetch settings",{error:e})}finally{j(!1)}},[]);(0,s.useEffect)(()=>{u&&C()},[u,C]);let z=async t=>{let s=(0,se.f)(b,o);if(s)return void R.c.error(s);g(!0);try{let s=await i.k.post("/api/settings",b);y(s),e(s.timeZone||eo.J),R.c.success(o.settings?.messages?.saved||"Settings saved"),(0,t1.z)("settings_changed",{section:t}),p.current?.scrollTo({top:0,behavior:"smooth"})}catch(e){l.V.error("[SettingsDialog]","Failed to save settings",{error:e}),R.c.error(o.settings?.messages?.saveFailed||"Failed to save")}finally{g(!1)}},A=(e,s)=>(0,t.jsxs)(k.f,{onClick:()=>z(s),disabled:h,className:"w-full",children:[h&&(0,t.jsx)(N.f,{className:"mr-2 h-4 w-4 animate-spin"}),e]});return(0,t.jsxs)(S.N,{open:u,onOpenChange:x,children:[(0,t.jsx)(S.a,{asChild:!0,children:(0,t.jsxs)(k.f,{variant:"ghost",size:"icon",className:"rounded-full",children:[(0,t.jsx)(en,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"sr-only",children:o.settings?.title||"Settings"})]})}),(0,t.jsxs)(S.d,{ref:p,className:"w-[calc(100vw-2rem)] sm:max-w-[900px] max-h-[85vh] overflow-y-auto",children:[(0,t.jsxs)(S.s,{children:[(0,t.jsx)(S.F,{children:o.settings?.title||"Settings"}),(0,t.jsx)(S.C,{children:o.settings?.desc||"Manage your preferences and data."})]}),(0,t.jsxs)(ed.i,{defaultValue:"general",className:"w-full",children:[(0,t.jsxs)(ed.U,{className:`grid w-full grid-cols-4 ${c?"sm:grid-cols-7":"sm:grid-cols-4"} gap-1 h-auto`,children:[(0,t.jsx)(st,{value:"general",icon:(0,t.jsx)(es.f,{className:"h-4 w-4 sm:mr-2"}),label:o.settings?.tabs?.general||"General"}),(0,t.jsx)(st,{value:"account",icon:(0,t.jsx)(el.f,{className:"h-4 w-4 sm:mr-2"}),label:o.settings?.tabs?.account||"Account"}),c&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(st,{value:"ai",icon:(0,t.jsx)(Q,{className:"h-4 w-4 sm:mr-2"}),label:o.settings?.tabs?.ai||"AI Provider"}),(0,t.jsx)(st,{value:"prompts",icon:(0,t.jsx)(er,{className:"h-4 w-4 sm:mr-2"}),label:o.settings?.tabs?.prompts||"Prompts"}),(0,t.jsx)(st,{value:"admin",icon:(0,t.jsx)(q,{className:"h-4 w-4 sm:mr-2"}),label:o.settings?.tabs?.admin||"User Management"})]}),(0,t.jsx)(st,{value:"danger",icon:(0,t.jsx)(X.f,{className:"h-4 w-4 sm:mr-2"}),label:o.settings?.tabs?.danger||"Danger"}),(0,t.jsx)(st,{value:"about",icon:(0,t.jsx)(et,{className:"h-4 w-4 sm:mr-2"}),label:o.settings?.tabs?.about||"About"})]}),(0,t.jsxs)(ed.S,{value:"general",className:"space-y-4 py-4",children:[(0,t.jsx)(tv,{config:b,setConfig:y,isAdmin:c,disabled:f||h}),(0,t.jsx)(tS,{}),c&&A(o.settings?.save||"Save Settings","general")]}),(0,t.jsxs)(ed.S,{value:"account",className:"space-y-4 py-4",children:[(0,t.jsx)(eq,{}),(0,t.jsx)(tt,{})]}),(0,t.jsxs)(ed.S,{value:"ai",className:"space-y-4 py-4",children:[(0,t.jsx)(eH.f,{config:b,setConfig:y,loading:f,saving:h,onSave:()=>z("ai")}),!f&&(0,t.jsx)(t7,{config:b,setConfig:y,saving:h,onSave:()=>z("tts")})]}),(0,t.jsxs)(ed.S,{value:"prompts",className:"space-y-4 py-4",children:[(0,t.jsx)(tK,{config:b,onUpdate:(e,t)=>y(s=>({...s,prompts:{...s.prompts,[e]:t}}))}),A(o.settings?.prompts?.save||"Save Prompt Settings","prompts")]}),c&&(0,t.jsxs)(ed.S,{value:"admin",className:"space-y-4 py-4",children:[(0,t.jsxs)(k.f,{variant:"outline",className:"w-full justify-start gap-2",onClick:()=>{x(!1),m.push("/admin")},children:[(0,t.jsx)(T.f,{className:"h-4 w-4"}),o.admin?.dashboard?.title||"Admin Dashboard"]}),(0,t.jsxs)(k.f,{variant:"outline",className:"w-full justify-start gap-2",onClick:()=>{x(!1),m.push("/setup")},children:[(0,t.jsx)(ec.f,{className:"h-4 w-4"}),o.setup.rerun]}),(0,t.jsx)(t2,{}),(0,t.jsx)(to,{}),(0,t.jsx)(e1,{}),(0,t.jsx)("div",{className:"border-t pt-4",children:(0,t.jsx)(ez,{})})]}),(0,t.jsx)(ed.S,{value:"danger",className:"space-y-4 py-4",children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(tn,{isAdmin:c,userId:d}),(0,t.jsx)(e5,{isAdmin:c}),(0,t.jsx)(e9,{isAdmin:c})]})}),(0,t.jsx)(ed.S,{value:"about",className:"space-y-4 py-4",children:(0,t.jsx)(eV,{})})]})]})]})}var sa=e.i(263676);function sr({enabled:e}){let{t:r}=(0,a.b)(),n=r.telemetrySettings,[c,d]=(0,s.useState)(!1),[o,m]=(0,s.useState)(""),[u,x]=(0,s.useState)(!1);if((0,s.useEffect)(()=>{if(!e)return;let t=!1;return i.k.get(`${tZ}?view=notice`).then(e=>{t||(m(e.eula.current),d(e.showNotice))}).catch(e=>l.V.warn("[TelemetryNotice]","Failed to load telemetry notice",{error:e})),()=>{t=!0}},[e]),!e||!c)return null;let p=async()=>{try{await tQ(o),d(!1),R.c.success(n.enabled)}catch(e){throw l.V.error("[TelemetryNotice]","Failed to enable forwarding",{error:e}),R.c.error(n.failed),e}};return(0,t.jsxs)("div",{className:"border-b bg-primary/5 print:hidden",children:[(0,t.jsxs)("div",{className:"mx-auto flex max-w-6xl flex-col gap-2 px-4 py-2 text-sm sm:flex-row sm:items-center md:px-8",children:[(0,t.jsx)("p",{className:"flex-1 text-muted-foreground",children:n.noticeText}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,t.jsx)(k.f,{size:"sm",onClick:()=>x(!0),children:n.noticeEnable}),(0,t.jsxs)(k.f,{size:"sm",variant:"ghost",onClick:()=>{d(!1),t0({noticeDismissed:!0}).catch(e=>l.V.warn("[TelemetryNotice]","Failed to dismiss notice",{error:e}))},children:[(0,t.jsx)(sa.X,{className:"mr-1 h-4 w-4"}),n.noticeDismiss]})]})]}),(0,t.jsx)(tY,{open:u,onOpenChange:x,onConfirm:p})]})}var si=e.i(446513);let sn={name:"moon",size:24,node:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]};sn.node;let sl=(0,_.f)(sn),sc={name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]};sc.node;let sd=(0,_.f)(sc);var so=e.i(755146);let sm={system:si.f,light:sd,dark:sl};function su(){let{t:e}=(0,a.b)(),{preference:r,setPreference:i}=(0,s.useContext)(u),n=sm[r],l=`${e.theme.toggle}: ${e.theme[r]}`;return(0,t.jsxs)(so.G,{children:[(0,t.jsx)(so.X,{asChild:!0,children:(0,t.jsx)(k.f,{variant:"ghost",size:"icon",className:"rounded-full",title:l,"aria-label":l,children:(0,t.jsx)(n,{className:"h-5 w-5"})})}),(0,t.jsx)(so.L,{align:"end",children:(0,t.jsx)(so.O,{value:r,onValueChange:e=>{m(e)&&i(e)},children:c.map(s=>{let a=sm[s];return(0,t.jsxs)(so.T,{value:s,className:"gap-2",children:[(0,t.jsx)(a,{className:"h-4 w-4"}),e.theme[s]]},s)})})})]})}var sx=e.i(282492),sp=e.i(213056),sh=e.i(722219),sh=sh;let sg=["gemini","openai","azure","anthropic","minimax-code",...t6.U],sf=["1","2-5","6-20",">20"],sj=["0","1-50","51-500",">500"],sb=sx.z.enum(sg),sy=sp.z.boolean();Object.keys({app_installed:sh.strictObject({method:sx.z.enum(["setup-token","preset-admin"])}),eula_accepted:sh.strictObject({version:eY.z.string().regex(/^v\d{1,4}$/),trigger:sx.z.enum(["install","upgrade","settings"])}),instance_alive:sh.strictObject({platform:sx.z.enum(["docker","npm","desktop","fnos","android","other"]),aiConfigured:sp.z.boolean()}),app_opened:sh.strictObject({client:sx.z.enum(["browser","pwa","desktop","android"])}),page_viewed:sh.strictObject({page:sx.z.enum(["home","notebooks","error_detail","practice","review","stats","tags","exams","settings","admin","other"])}),ai_analyze_started:sh.strictObject({provider:sb}),ai_analyze_result:sh.strictObject({ok:sy,provider:sb,duration:sx.z.enum(["<3s","3-10s","10-30s",">30s"])}),ai_reanswer:sh.strictObject({ok:sy,provider:sb}),ai_practice_grading:sh.strictObject({ok:sy,count:sx.z.enum(sf)}),exam_paper_generation:sh.strictObject({ok:sy,count:sx.z.enum(sf)}),data_exported:sh.strictObject({scope:sx.z.enum(["user","all"]),rows:sx.z.enum(sj)}),data_imported:sh.strictObject({rows:sx.z.enum(sj)}),tts_used:sh.strictObject({mode:sx.z.enum(t9.l)}),settings_changed:sh.strictObject({section:sx.z.enum(["general","ai","tts","prompts","telemetry"])})});let sv=[[/^\/$/,"home"],[/^\/notebooks?(\/|$)/,"notebooks"],[/^\/error-items?\/[^/]+/,"error_detail"],[/^\/practice(\/|$)/,"practice"],[/^\/review(\/|$)/,"review"],[/^\/stats(\/|$)/,"stats"],[/^\/tags(\/|$)/,"tags"],[/^\/exams?(\/|$)/,"exams"],[/^\/(settings|setup)(\/|$)/,"settings"],[/^\/admin(\/|$)/,"admin"]];function sw({children:e}){var n,c;let d,o,m,u=(0,w.usePathname)()||"/",{t:x}=(0,a.b)(),{data:p,status:h}=(0,r.useSession)(),g=p?.user?.role==="admin",f=$(u);n=g&&!f,d=(0,w.useRouter)(),o=(0,s.useRef)(!1),(0,s.useEffect)(()=>{n&&!o.current&&(o.current=!0,i.k.get("/api/setup").then(e=>{e.needsSetup&&d.replace("/setup")}).catch(e=>l.V.warn("[Setup]","Failed to check setup status",{error:e})))},[n,d]),c="authenticated"===h,m=(0,s.useRef)(null),(0,s.useEffect)(()=>{(0,t1.J)()},[]),(0,s.useEffect)(()=>{let e;if(!c)return;let t=(e=u.split(/[?#]/)[0]||"/",sv.find(([t])=>t.test(e))?.[1]??"other");t!==m.current&&(m.current=t,(0,t1.z)("page_viewed",{page:t}))},[u,c]);let j=function(e){let[t,a]=(0,s.useState)(null);(0,s.useEffect)(()=>{if(!e)return;let t=!1;return i.k.get("/api/eula/status").then(e=>{t||a(e)}).catch(e=>l.V.warn("[EulaGate]","Failed to check EULA status",{error:e})),()=>{t=!0}},[e]);let r=(0,s.useCallback)(async()=>{t&&a(await i.k.post("/api/admin/eula/accept",{version:t.current}))},[t]);return{pending:e&&!!t?.pending,status:t,accept:r}}(g&&"authenticated"===h),b=j.pending&&j.status?(0,t.jsx)(K,{status:j.status,onAccept:j.accept}):null;if(f||"unauthenticated"===h)return(0,t.jsxs)(t.Fragment,{children:[e,b]});let y=p?.user?.name||p?.user?.email||"";return(0,t.jsxs)("div",{className:"min-h-screen",children:[(0,t.jsx)("header",{className:"sticky top-0 z-40 border-b bg-card/80 backdrop-blur-md supports-[backdrop-filter]:bg-card/70 print:hidden",children:(0,t.jsxs)("div",{className:"mx-auto flex h-14 max-w-6xl items-center gap-3 px-4 md:h-16 md:px-8",children:[(0,t.jsxs)(P.default,{href:"/",className:"flex shrink-0 items-center gap-2",children:[(0,t.jsx)(G.default,{src:"/icons/icon.png",alt:"",width:32,height:32,className:"rounded-lg",priority:!0,unoptimized:!0}),(0,t.jsx)("span",{className:"hidden text-base font-semibold tracking-tight sm:inline",children:x.pageTitle.base})]}),(0,t.jsx)("nav",{className:"ml-4 hidden items-center gap-1 md:flex",children:L.map(e=>{let s=e.match(u),a=e.icon;return(0,t.jsxs)(P.default,{href:e.href,className:(0,W.f)("flex items-center gap-1.5 rounded-lg px-3 py-2 text-sm font-medium transition-colors",s?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground"),"aria-current":s?"page":void 0,children:[(0,t.jsx)(a,{className:"h-4 w-4"}),x.nav[e.key]]},e.key)})}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[y&&(0,t.jsxs)("span",{className:"mr-2 hidden max-w-40 items-center gap-2 truncate text-sm text-muted-foreground lg:flex",children:[(0,t.jsx)("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-primary/10 text-xs font-semibold text-primary",children:y.slice(0,1).toUpperCase()}),(0,t.jsx)("span",{className:"truncate",children:y})]}),g&&(0,t.jsx)(P.default,{href:"/admin",title:x.nav.admin,children:(0,t.jsxs)(k.f,{variant:"ghost",size:"icon",className:"rounded-full",children:[(0,t.jsx)(q,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"sr-only",children:x.nav.admin})]})}),(0,t.jsx)(J,{className:"mr-1"}),(0,t.jsx)(su,{}),(0,t.jsx)(ss,{}),(0,t.jsx)(k.f,{variant:"ghost",size:"icon",className:"rounded-full text-muted-foreground hover:text-destructive",onClick:()=>(0,r.signOut)({callbackUrl:"/login"}),title:x.app.logout,children:(0,t.jsx)(O.f,{className:"h-5 w-5"})})]})]})}),(0,t.jsx)(sr,{enabled:g&&"authenticated"===h&&!j.pending}),(0,t.jsx)("div",{className:"pb-20 md:pb-0",children:e}),b,(0,t.jsx)("nav",{className:"pb-safe fixed inset-x-0 bottom-0 z-40 border-t bg-card/90 backdrop-blur-md md:hidden print:hidden",children:(0,t.jsx)("div",{className:"grid h-16",style:{gridTemplateColumns:`repeat(${L.length}, minmax(0, 1fr))`},children:L.map(e=>{let s=e.match(u),a=e.icon;return(0,t.jsxs)(P.default,{href:e.href,className:(0,W.f)("flex flex-col items-center justify-center gap-1 text-[11px] font-medium transition-colors",s?"text-primary":"text-muted-foreground"),"aria-current":s?"page":void 0,children:[(0,t.jsx)("span",{className:(0,W.f)("flex h-7 w-12 items-center justify-center rounded-full transition-colors",s&&"bg-accent"),children:(0,t.jsx)(a,{className:"h-5 w-5"})}),x.nav[e.key]]},e.key)})})})]})}let sN={name:"list-todo",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]]};sN.node;let sk=(0,_.f)(sN);var sS=e.i(583967),sC=e.i(954846);let sT=[/^\/login/,/^\/register/,/^\/print-preview/,/^\/exams\/[^/]+\/print/];function sz(){let{t:e}=(0,a.b)(),{timeZone:n}=(0,v.M)(),{status:l}=(0,r.useSession)(),c=(0,w.usePathname)(),[d,o]=(0,s.useState)(!1),[m,u]=(0,s.useState)(()=>sC.f.getSnapshot()),[x,p]=(0,s.useState)(()=>Date.now()),h="authenticated"!==l||sT.some(e=>e.test(c||""));if((0,s.useEffect)(()=>{if(!h)return sC.f.subscribe(e=>{u(e),p(Date.now())})},[h]),h)return null;let g=m.filter(e=>"running"===e.status).length,f=m.some(e=>"running"!==e.status),j=async()=>{try{await i.k.delete("/api/tasks"),await sC.f.refresh()}catch{}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(k.f,{variant:"outline",size:"icon",className:"fixed bottom-20 right-4 z-40 h-11 w-11 rounded-full shadow-lg md:bottom-6 md:right-6 print:hidden",onClick:()=>o(!0),"aria-label":e.backgroundTasks.title,title:e.backgroundTasks.title,children:[g>0?(0,t.jsx)(N.f,{className:"h-5 w-5 animate-spin"}):(0,t.jsx)(sk,{className:"h-5 w-5"}),g>0&&(0,t.jsx)("span",{className:"absolute -right-1 -top-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-xs text-primary-foreground",children:g})]}),(0,t.jsx)(S.N,{open:d,onOpenChange:o,children:(0,t.jsxs)(S.d,{className:"max-h-[85vh] overflow-y-auto sm:max-w-lg",children:[(0,t.jsxs)(S.s,{children:[(0,t.jsx)(S.F,{children:e.backgroundTasks.title}),(0,t.jsx)(S.C,{children:e.backgroundTasks.description})]}),0===m.length?(0,t.jsx)("p",{className:"py-6 text-center text-sm text-muted-foreground",children:e.backgroundTasks.empty}):(0,t.jsx)("ul",{className:"space-y-2",children:m.map(s=>{var a,r;let i;return(0,t.jsx)("li",{className:"rounded-md border p-3 text-sm",children:(0,t.jsxs)("div",{className:"flex items-start gap-2",children:["running"===s.status&&(0,t.jsx)(N.f,{className:"mt-0.5 h-4 w-4 shrink-0 animate-spin text-primary"}),"succeeded"===s.status&&(0,t.jsx)(ts.f,{className:"mt-0.5 h-4 w-4 shrink-0 text-green-600"}),"failed"===s.status&&(0,t.jsx)(sS.f,{className:"mt-0.5 h-4 w-4 shrink-0 text-destructive"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsxs)("div",{className:"font-medium",children:[e.backgroundTasks.kinds[s.kind],(0,t.jsxs)("span",{className:"font-normal text-muted-foreground",children:[" · ",e.backgroundTasks.status[s.status]]})]}),s.subject&&(0,t.jsx)("div",{className:"break-words text-muted-foreground",children:s.subject}),s.progress&&s.progress.total>0&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:"h-1.5 overflow-hidden rounded bg-muted",children:(0,t.jsx)("div",{className:"h-full bg-primary transition-all",style:{width:`${Math.round(s.progress.done/s.progress.total*100)}%`}})}),(0,t.jsxs)("div",{className:"text-xs text-muted-foreground",children:[e.backgroundTasks.progress.replace("{done}",String(s.progress.done)).replace("{total}",String(s.progress.total)),s.progress.failed>0&&` \xb7 ${e.backgroundTasks.failedCount.replace("{count}",String(s.progress.failed))}`]})]}),s.error&&(0,t.jsx)("div",{className:"text-xs text-destructive",children:(t=>{if(!t)return null;let s=e.backgroundTasks.errors[t]??e.errors[t];return"string"==typeof s?s:t})(s.error)}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 text-xs text-muted-foreground",children:[(0,t.jsx)("span",{children:e.backgroundTasks.startedAt.replace("{time}",(0,eo.r)(s.startedAt,"HH:mm:ss",n))}),(0,t.jsx)("span",{children:e.backgroundTasks.elapsed.replace("{time}",(a=s.startedAt,r=s.finishedAt,i=Math.max(0,Math.round(((r?Date.parse(r):x)-Date.parse(a))/1e3)),`${Math.floor(i/60)}:${String(i%60).padStart(2,"0")}`))}),s.link&&(0,t.jsx)(P.default,{href:s.link,className:"text-primary hover:underline",onClick:()=>o(!1),children:e.backgroundTasks.view})]})]})]})},s.id)})}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2 pt-1",children:[(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e.backgroundTasks.retentionHint}),f&&(0,t.jsx)(k.f,{variant:"ghost",size:"sm",onClick:j,children:e.backgroundTasks.clearFinished})]})]})})]})}var sA=e.i(145447);function sE(){let{t:e}=(0,a.b)(),r=(0,sA.f)(),[i,n]=(0,s.useState)(!1),l=r?function(e){let t=/\bChrome\/(\d+)\./.exec(e);if(!t)return null;let s=Number(t[1]);return s>=111?null:{kind:/; wv\)/.test(e)||e.includes("WrongNotebookAndroid/")?"webview":"browser",version:s}}(navigator.userAgent):null;if(!l||i)return null;let c="webview"===l.kind?e.browserSupport.outdatedWebView:e.browserSupport.outdatedBrowser;return(0,t.jsxs)("div",{role:"alert","data-testid":"outdated-browser-notice",className:"flex items-start gap-3 border-b border-amber-300 bg-amber-100 px-4 py-2 text-sm text-amber-900",children:[(0,t.jsx)("p",{className:"flex-1",children:c.replace("{version}",String(l.version))}),(0,t.jsx)("button",{type:"button",onClick:()=>n(!0),className:"shrink-0 font-medium underline",children:e.common.close})]})}let s_={success:{icon:ts.f,className:"text-success"},error:{icon:sS.f,className:"text-destructive"},warning:{icon:X.f,className:"text-warning"},info:{icon:et,className:"text-primary"}};function sD(){let{t:e}=(0,a.b)(),[r,i]=(0,s.useState)([]),[n,l]=(0,s.useState)(null);return(0,s.useEffect)(()=>(0,R.M)(e=>{i(e.toasts),l(e.confirm)}),[]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"pointer-events-none fixed inset-x-0 top-3 z-[100] flex flex-col items-center gap-2 px-4 print:hidden",role:"status","aria-live":"polite",children:r.map(s=>{let{icon:a,className:r}=s_[s.type];return(0,t.jsxs)("div",{className:"pointer-events-auto flex w-full max-w-sm items-start gap-3 rounded-xl border bg-card/95 px-4 py-3 text-sm shadow-lg backdrop-blur animate-in fade-in slide-in-from-top-2 duration-200",children:[(0,t.jsx)(a,{className:(0,W.f)("mt-0.5 h-4 w-4 shrink-0",r)}),(0,t.jsx)("p",{className:"min-w-0 flex-1 whitespace-pre-line break-words leading-relaxed",children:s.message}),(0,t.jsx)("button",{type:"button",className:"shrink-0 rounded p-0.5 text-muted-foreground transition-colors hover:text-foreground",onClick:()=>(0,R.p)(s.id),"aria-label":e.common.close,children:(0,t.jsx)(sa.X,{className:"h-3.5 w-3.5"})})]},s.id)})}),(0,t.jsx)(S.N,{open:!!n,onOpenChange:e=>{e||n?.resolve(!1)},children:(0,t.jsxs)(S.d,{className:"sm:max-w-md",children:[(0,t.jsxs)(S.s,{children:[(0,t.jsxs)(S.F,{className:"flex items-center gap-2",children:[n?.destructive&&(0,t.jsx)(X.f,{className:"h-5 w-5 text-destructive"}),n?.title||e.common.confirmTitle]}),(0,t.jsx)(S.C,{className:"whitespace-pre-line pt-1 text-left leading-relaxed",children:n?.message})]}),(0,t.jsxs)(S.c,{className:"gap-2",children:[(0,t.jsx)(k.f,{variant:"outline",onClick:()=>n?.resolve(!1),children:n?.cancelText||e.common.cancel}),(0,t.jsx)(k.f,{variant:n?.destructive?"destructive":"default",onClick:()=>n?.resolve(!0),autoFocus:!0,children:n?.confirmText||e.common.confirm})]})]})})]})}function sF(){return(0,s.useEffect)(()=>{"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js",{scope:"/"}).catch(e=>{l.V.warn("[PWA]","Service worker registration failed",{error:String(e)})})},[]),null}e.s(["Providers",0,function({children:e,timeZone:i}){return(0,s.useEffect)(()=>(0,l.m)(),[]),(0,t.jsx)(r.SessionProvider,{children:(0,t.jsx)(y,{children:(0,t.jsx)(a.w,{children:(0,t.jsxs)(v.n,{initialTimeZone:i,children:[(0,t.jsx)(sE,{}),(0,t.jsx)(sw,{children:e}),(0,t.jsx)(sz,{}),(0,t.jsx)(V,{}),(0,t.jsx)(sD,{}),(0,t.jsx)(sF,{})]})})})})}],1661)}]);