wrong-notebook 2026.11.4 → 2026.11.5-2

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 (391) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +1 -0
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/routes-manifest.json +6 -0
  5. package/.next/server/app/_global-error.html +1 -1
  6. package/.next/server/app/_global-error.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  10. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  11. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/.next/server/app/admin/page.js.nft.json +1 -1
  13. package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  14. package/.next/server/app/admin/user/[id]/page.js.nft.json +1 -1
  15. package/.next/server/app/admin/user/[id]/page_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/admin/cnm-tags/route.js.nft.json +1 -1
  17. package/.next/server/app/api/admin/dashboard/route.js +6 -6
  18. package/.next/server/app/api/admin/dashboard/route.js.nft.json +1 -1
  19. package/.next/server/app/api/admin/debug-logs/export/route.js.nft.json +1 -1
  20. package/.next/server/app/api/admin/debug-logs/route.js.nft.json +1 -1
  21. package/.next/server/app/api/admin/migrate-tags/route.js.nft.json +1 -1
  22. package/.next/server/app/api/admin/system-reset/route.js.nft.json +1 -1
  23. package/.next/server/app/api/admin/users/[id]/detail/route.js +6 -6
  24. package/.next/server/app/api/admin/users/[id]/detail/route.js.nft.json +1 -1
  25. package/.next/server/app/api/admin/users/[id]/route.js.nft.json +1 -1
  26. package/.next/server/app/api/admin/users/route.js.nft.json +1 -1
  27. package/.next/server/app/api/ai/models/route.js.nft.json +1 -1
  28. package/.next/server/app/api/ai/test/route.js.nft.json +1 -1
  29. package/.next/server/app/api/analytics/route.js +2 -2
  30. package/.next/server/app/api/analytics/route.js.nft.json +1 -1
  31. package/.next/server/app/api/analyze/route.js +11 -11
  32. package/.next/server/app/api/analyze/route.js.nft.json +1 -1
  33. package/.next/server/app/api/auth/[...nextauth]/route.js.nft.json +1 -1
  34. package/.next/server/app/api/error-items/[id]/delete/route.js.nft.json +1 -1
  35. package/.next/server/app/api/error-items/[id]/figure/route.js +5 -5
  36. package/.next/server/app/api/error-items/[id]/figure/route.js.nft.json +1 -1
  37. package/.next/server/app/api/error-items/[id]/fix-latex/route.js +2 -2
  38. package/.next/server/app/api/error-items/[id]/fix-latex/route.js.nft.json +1 -1
  39. package/.next/server/app/api/error-items/[id]/geogebra/route.js +7 -7
  40. package/.next/server/app/api/error-items/[id]/geogebra/route.js.nft.json +1 -1
  41. package/.next/server/app/api/error-items/[id]/image/route.js.nft.json +1 -1
  42. package/.next/server/app/api/error-items/[id]/notes/route.js.nft.json +1 -1
  43. package/.next/server/app/api/error-items/[id]/practice-records/route.js.nft.json +1 -1
  44. package/.next/server/app/api/error-items/[id]/reanswer/route.js +7 -7
  45. package/.next/server/app/api/error-items/[id]/reanswer/route.js.nft.json +1 -1
  46. package/.next/server/app/api/error-items/[id]/retag/route.js +1 -1
  47. package/.next/server/app/api/error-items/[id]/retag/route.js.nft.json +1 -1
  48. package/.next/server/app/api/error-items/[id]/route.js.nft.json +1 -1
  49. package/.next/server/app/api/error-items/[id]/svg-animation/narration/route.js +12 -12
  50. package/.next/server/app/api/error-items/[id]/svg-animation/narration/route.js.nft.json +1 -1
  51. package/.next/server/app/api/error-items/[id]/svg-animation/route.js +12 -12
  52. package/.next/server/app/api/error-items/[id]/svg-animation/route.js.nft.json +1 -1
  53. package/.next/server/app/api/error-items/answer-space/route.js.nft.json +1 -1
  54. package/.next/server/app/api/error-items/batch-delete/route.js.nft.json +1 -1
  55. package/.next/server/app/api/error-items/clear/route.js.nft.json +1 -1
  56. package/.next/server/app/api/error-items/export-questions/route.js.nft.json +1 -1
  57. package/.next/server/app/api/error-items/list/route.js.nft.json +1 -1
  58. package/.next/server/app/api/error-items/route.js +8 -8
  59. package/.next/server/app/api/error-items/route.js.nft.json +1 -1
  60. package/.next/server/app/api/error-items/short/[shortId]/route.js.nft.json +1 -1
  61. package/.next/server/app/api/error-items/similarity/route.js.nft.json +1 -1
  62. package/.next/server/app/api/exams/[id]/questions/[questionId]/regenerate/route.js +9 -9
  63. package/.next/server/app/api/exams/[id]/questions/[questionId]/regenerate/route.js.nft.json +1 -1
  64. package/.next/server/app/api/exams/[id]/results/route.js +2 -2
  65. package/.next/server/app/api/exams/[id]/results/route.js.nft.json +1 -1
  66. package/.next/server/app/api/exams/[id]/retry/route.js +7 -7
  67. package/.next/server/app/api/exams/[id]/retry/route.js.nft.json +1 -1
  68. package/.next/server/app/api/exams/[id]/route.js +5 -5
  69. package/.next/server/app/api/exams/[id]/route.js.nft.json +1 -1
  70. package/.next/server/app/api/exams/route.js +6 -6
  71. package/.next/server/app/api/exams/route.js.nft.json +1 -1
  72. package/.next/server/app/api/export/route.js.nft.json +1 -1
  73. package/.next/server/app/api/geogebra-analyze/route.js +2 -2
  74. package/.next/server/app/api/geogebra-analyze/route.js.nft.json +1 -1
  75. package/.next/server/app/api/health/route.js.nft.json +1 -1
  76. package/.next/server/app/api/import/route.js +9 -9
  77. package/.next/server/app/api/import/route.js.nft.json +1 -1
  78. package/.next/server/app/api/import-batches/[id]/confirm-all/route.js +17 -17
  79. package/.next/server/app/api/import-batches/[id]/confirm-all/route.js.nft.json +1 -1
  80. package/.next/server/app/api/import-batches/[id]/fix-text/route.js +4 -4
  81. package/.next/server/app/api/import-batches/[id]/fix-text/route.js.nft.json +1 -1
  82. package/.next/server/app/api/import-batches/[id]/read/route.js +16 -16
  83. package/.next/server/app/api/import-batches/[id]/read/route.js.nft.json +1 -1
  84. package/.next/server/app/api/import-batches/[id]/retry/route.js +17 -17
  85. package/.next/server/app/api/import-batches/[id]/retry/route.js.nft.json +1 -1
  86. package/.next/server/app/api/import-batches/[id]/route.js +16 -16
  87. package/.next/server/app/api/import-batches/[id]/route.js.nft.json +1 -1
  88. package/.next/server/app/api/import-batches/[id]/start/route.js +16 -16
  89. package/.next/server/app/api/import-batches/[id]/start/route.js.nft.json +1 -1
  90. package/.next/server/app/api/import-batches/route.js +16 -16
  91. package/.next/server/app/api/import-batches/route.js.nft.json +1 -1
  92. package/.next/server/app/api/import-tasks/[id]/confirm/route.js +19 -19
  93. package/.next/server/app/api/import-tasks/[id]/confirm/route.js.nft.json +1 -1
  94. package/.next/server/app/api/import-tasks/[id]/read/route.js +19 -19
  95. package/.next/server/app/api/import-tasks/[id]/read/route.js.nft.json +1 -1
  96. package/.next/server/app/api/import-tasks/[id]/retry/route.js +19 -19
  97. package/.next/server/app/api/import-tasks/[id]/retry/route.js.nft.json +1 -1
  98. package/.next/server/app/api/import-tasks/[id]/route.js +19 -19
  99. package/.next/server/app/api/import-tasks/[id]/route.js.nft.json +1 -1
  100. package/.next/server/app/api/import-tasks/route.js +16 -16
  101. package/.next/server/app/api/import-tasks/route.js.nft.json +1 -1
  102. package/.next/server/app/api/initialize/route.js.nft.json +1 -1
  103. package/.next/server/app/api/logs/frontend/route.js.nft.json +1 -1
  104. package/.next/server/app/api/minimax-code/checkin/route.js.nft.json +1 -1
  105. package/.next/server/app/api/minimax-code/login/route.js.nft.json +1 -1
  106. package/.next/server/app/api/minimax-code/route.js.nft.json +1 -1
  107. package/.next/server/app/api/notebooks/[id]/retag/route.js +1 -1
  108. package/.next/server/app/api/notebooks/[id]/retag/route.js.nft.json +1 -1
  109. package/.next/server/app/api/notebooks/[id]/route.js.nft.json +1 -1
  110. package/.next/server/app/api/notebooks/route.js.nft.json +1 -1
  111. package/.next/server/app/api/openclaw/batch-upload/route.js +5 -5
  112. package/.next/server/app/api/openclaw/batch-upload/route.js.nft.json +1 -1
  113. package/.next/server/app/api/paper-groups/[id]/route.js.nft.json +1 -1
  114. package/.next/server/app/api/paper-groups/route.js.nft.json +1 -1
  115. package/.next/server/app/api/practice/generate/route.js +6 -6
  116. package/.next/server/app/api/practice/generate/route.js.nft.json +1 -1
  117. package/.next/server/app/api/practice/grade/route.js +5 -5
  118. package/.next/server/app/api/practice/grade/route.js.nft.json +1 -1
  119. package/.next/server/app/api/practice/record/[id]/route.js +5 -5
  120. package/.next/server/app/api/practice/record/[id]/route.js.nft.json +1 -1
  121. package/.next/server/app/api/practice/record/route.js +4 -4
  122. package/.next/server/app/api/practice/record/route.js.nft.json +1 -1
  123. package/.next/server/app/api/reanswer/route.js +3 -3
  124. package/.next/server/app/api/reanswer/route.js.nft.json +1 -1
  125. package/.next/server/app/api/register/route.js.nft.json +1 -1
  126. package/.next/server/app/api/register/status/route.js.nft.json +1 -1
  127. package/.next/server/app/api/requests/[id]/route.js.nft.json +1 -1
  128. package/.next/server/app/api/review/due/route.js +3 -3
  129. package/.next/server/app/api/review/due/route.js.nft.json +1 -1
  130. package/.next/server/app/api/settings/route.js.nft.json +1 -1
  131. package/.next/server/app/api/setup/route.js.nft.json +1 -1
  132. package/.next/server/app/api/stats/activity/route.js.nft.json +1 -1
  133. package/.next/server/app/api/stats/practice/clear/route.js.nft.json +1 -1
  134. package/.next/server/app/api/stats/practice/route.js.nft.json +1 -1
  135. package/.next/server/app/api/stats/repeated-mistakes/route.js +2 -2
  136. package/.next/server/app/api/stats/repeated-mistakes/route.js.nft.json +1 -1
  137. package/.next/server/app/api/stats/weak-tags/route.js +2 -2
  138. package/.next/server/app/api/stats/weak-tags/route.js.nft.json +1 -1
  139. package/.next/server/app/api/tags/route.js.nft.json +1 -1
  140. package/.next/server/app/api/tags/stats/route.js.nft.json +1 -1
  141. package/.next/server/app/api/tags/suggestions/route.js.nft.json +1 -1
  142. package/.next/server/app/api/tasks/route.js.nft.json +1 -1
  143. package/.next/server/app/api/tts/[id]/route.js.nft.json +1 -1
  144. package/.next/server/app/api/tts/batch/route.js.nft.json +1 -1
  145. package/.next/server/app/api/tts/route.js.nft.json +1 -1
  146. package/.next/server/app/api/tts/status/route.js.nft.json +1 -1
  147. package/.next/server/app/api/user/ai-consent/route/app-paths-manifest.json +3 -0
  148. package/.next/server/app/api/user/ai-consent/route/build-manifest.json +12 -0
  149. package/.next/server/app/api/user/ai-consent/route/server-reference-manifest.json +4 -0
  150. package/.next/server/app/api/user/ai-consent/route.js +12 -0
  151. package/.next/server/app/api/user/ai-consent/route.js.map +5 -0
  152. package/.next/server/app/api/user/ai-consent/route.js.nft.json +1 -0
  153. package/.next/server/app/api/user/ai-consent/route_client-reference-manifest.js +3 -0
  154. package/.next/server/app/api/user/route.js +4 -4
  155. package/.next/server/app/api/user/route.js.nft.json +1 -1
  156. package/.next/server/app/error-items/[id]/page.js.nft.json +1 -1
  157. package/.next/server/app/error-items/[id]/page_client-reference-manifest.js +1 -1
  158. package/.next/server/app/exams/[id]/page.js.nft.json +1 -1
  159. package/.next/server/app/exams/[id]/page_client-reference-manifest.js +1 -1
  160. package/.next/server/app/exams/[id]/print/page.js.nft.json +1 -1
  161. package/.next/server/app/exams/[id]/print/page_client-reference-manifest.js +1 -1
  162. package/.next/server/app/exams/page.js.nft.json +1 -1
  163. package/.next/server/app/exams/page_client-reference-manifest.js +1 -1
  164. package/.next/server/app/import-batches/[id]/page.js.nft.json +1 -1
  165. package/.next/server/app/import-batches/[id]/page_client-reference-manifest.js +1 -1
  166. package/.next/server/app/import-tasks/[id]/page.js.nft.json +1 -1
  167. package/.next/server/app/import-tasks/[id]/page_client-reference-manifest.js +1 -1
  168. package/.next/server/app/import-tasks/page.js.nft.json +1 -1
  169. package/.next/server/app/import-tasks/page_client-reference-manifest.js +1 -1
  170. package/.next/server/app/initialize/page.js.nft.json +1 -1
  171. package/.next/server/app/initialize/page_client-reference-manifest.js +1 -1
  172. package/.next/server/app/login/page.js.nft.json +1 -1
  173. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  174. package/.next/server/app/notebooks/[id]/add/page.js.nft.json +1 -1
  175. package/.next/server/app/notebooks/[id]/add/page_client-reference-manifest.js +1 -1
  176. package/.next/server/app/notebooks/[id]/page.js.nft.json +1 -1
  177. package/.next/server/app/notebooks/[id]/page_client-reference-manifest.js +1 -1
  178. package/.next/server/app/notebooks/page.js.nft.json +1 -1
  179. package/.next/server/app/notebooks/page_client-reference-manifest.js +1 -1
  180. package/.next/server/app/page.js.nft.json +1 -1
  181. package/.next/server/app/page_client-reference-manifest.js +1 -1
  182. package/.next/server/app/practice/page.js.nft.json +1 -1
  183. package/.next/server/app/practice/page_client-reference-manifest.js +1 -1
  184. package/.next/server/app/print-preview/page.js.nft.json +1 -1
  185. package/.next/server/app/print-preview/page_client-reference-manifest.js +1 -1
  186. package/.next/server/app/register/page.js.nft.json +1 -1
  187. package/.next/server/app/register/page_client-reference-manifest.js +1 -1
  188. package/.next/server/app/review/page.js.nft.json +1 -1
  189. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  190. package/.next/server/app/setup/page.js.nft.json +1 -1
  191. package/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  192. package/.next/server/app/stats/page.js.nft.json +1 -1
  193. package/.next/server/app/stats/page_client-reference-manifest.js +1 -1
  194. package/.next/server/app/tags/page.js.nft.json +1 -1
  195. package/.next/server/app/tags/page_client-reference-manifest.js +1 -1
  196. package/.next/server/app-paths-manifest.json +1 -0
  197. package/.next/server/chunks/[root-of-the-server]__0-d_vh1kcmw7g._.js +1 -1
  198. package/.next/server/chunks/{[root-of-the-server]__025dluj5es8w4._.js → [root-of-the-server]__0-zi_nkxp9dof._.js} +1 -1
  199. package/.next/server/chunks/{[root-of-the-server]__0l8sbsrfjhttk._.js → [root-of-the-server]__02kuxxv4mod1v._.js} +2 -2
  200. package/.next/server/chunks/{[root-of-the-server]__01jxyfokd6l4_._.js → [root-of-the-server]__032tjseth76z3._.js} +1 -1
  201. package/.next/server/chunks/{[root-of-the-server]__00w9qhjl8kvr4._.js → [root-of-the-server]__05wem-_dvlzug._.js} +1 -1
  202. package/.next/server/chunks/{[root-of-the-server]__00w_kxg7h-9_p._.js → [root-of-the-server]__06-v15r8ror-q._.js} +1 -1
  203. package/.next/server/chunks/[root-of-the-server]__06irm2njvcb2a._.js +3 -0
  204. package/.next/server/chunks/{[root-of-the-server]__13a3izu1xb4m4._.js → [root-of-the-server]__07twbtie04xx6._.js} +2 -2
  205. package/.next/server/chunks/{[root-of-the-server]__0-ii_w4q2w_78._.js → [root-of-the-server]__08wrx5aay9znc._.js} +2 -2
  206. package/.next/server/chunks/{[root-of-the-server]__1e7_e83zxstdw._.js → [root-of-the-server]__0_e69dt7jrpui._.js} +2 -2
  207. package/.next/server/chunks/[root-of-the-server]__0_icvdlc-nqy_._.js +3 -0
  208. package/.next/server/chunks/[root-of-the-server]__0aynxvfd9wp_r._.js +3 -0
  209. package/.next/server/chunks/[root-of-the-server]__0dv_e-7ip1wts._.js +3 -0
  210. package/.next/server/chunks/{[root-of-the-server]__02fu_lp66613e._.js → [root-of-the-server]__0eyqs-2hri164._.js} +2 -2
  211. package/.next/server/chunks/{[root-of-the-server]__14gc66h_h3i2i._.js → [root-of-the-server]__0f8kzoc_gaf8y._.js} +2 -2
  212. package/.next/server/chunks/{[root-of-the-server]__163ocf8u6v-xl._.js → [root-of-the-server]__0fembrq8pciz5._.js} +2 -2
  213. package/.next/server/chunks/{[root-of-the-server]__04yihz3dovm0z._.js → [root-of-the-server]__0g0van70ibkrj._.js} +2 -2
  214. package/.next/server/chunks/[root-of-the-server]__0g2s86ce159k0._.js +3 -0
  215. package/.next/server/chunks/{[root-of-the-server]__05a4j8yu5_bg1._.js → [root-of-the-server]__0gankrx12ee4n._.js} +2 -2
  216. package/.next/server/chunks/[root-of-the-server]__0hxujtysw2kwx._.js +3 -0
  217. package/.next/server/chunks/[root-of-the-server]__0ilrqq68_5wg5._.js +3 -0
  218. package/.next/server/chunks/[root-of-the-server]__0ky9-3kyba1lu._.js +3 -0
  219. package/.next/server/chunks/[root-of-the-server]__0lgbdth9-z6qg._.js +1 -1
  220. package/.next/server/chunks/[root-of-the-server]__0lwuci8tnhggb._.js +3 -0
  221. package/.next/server/chunks/[root-of-the-server]__0m4dmn-gj2fnm._.js +3 -0
  222. package/.next/server/chunks/[root-of-the-server]__0ntfbtwf-s7a6._.js +3 -0
  223. package/.next/server/chunks/[root-of-the-server]__0of02idkcau3l._.js +3 -0
  224. package/.next/server/chunks/{[root-of-the-server]__0svpy5s3x369z._.js → [root-of-the-server]__0ohg2cyilt44e._.js} +2 -2
  225. package/.next/server/chunks/[root-of-the-server]__0rsgnrk2qy8wo._.js +3 -0
  226. package/.next/server/chunks/[root-of-the-server]__0si2-m5an9zl7._.js +1 -1
  227. package/.next/server/chunks/[root-of-the-server]__0svdqovwfpro2._.js +1 -1
  228. package/.next/server/chunks/[root-of-the-server]__0v0tr1bn12xyu._.js +3 -0
  229. package/.next/server/chunks/[root-of-the-server]__0vazs1dmyut7b._.js +3 -0
  230. package/.next/server/chunks/{[root-of-the-server]__11wpfrrg965mf._.js → [root-of-the-server]__0w9x80vsjqsbt._.js} +2 -2
  231. package/.next/server/chunks/[root-of-the-server]__0x76w78-o6bfn._.js +3 -0
  232. package/.next/server/chunks/[root-of-the-server]__0xwm-4fhj8j--._.js +3 -0
  233. package/.next/server/chunks/{[root-of-the-server]__0rwoy4jm7s8o7._.js → [root-of-the-server]__13u9cd4f8_gva._.js} +2 -2
  234. package/.next/server/chunks/[root-of-the-server]__16j73gw0vaw81._.js +3 -0
  235. package/.next/server/chunks/[root-of-the-server]__17_lgezg_8k4-._.js +3 -0
  236. package/.next/server/chunks/[root-of-the-server]__17qr9lkc0h9ta._.js +3 -0
  237. package/.next/server/chunks/{[root-of-the-server]__1bw1tevy-ufwx._.js → [root-of-the-server]__18axi_zdc2uzr._.js} +2 -2
  238. package/.next/server/chunks/[root-of-the-server]__19larrqj6rokv._.js +3 -0
  239. package/.next/server/chunks/[root-of-the-server]__1cno0cu053una._.js +3 -0
  240. package/.next/server/chunks/[root-of-the-server]__1cowc49z-6tny._.js +3 -0
  241. package/.next/server/chunks/{[root-of-the-server]__001wdwos9fkgg._.js → [root-of-the-server]__1edbiu94nqqym._.js} +2 -2
  242. package/.next/server/chunks/[root-of-the-server]__1f-ve8idsq57l._.js +1 -1
  243. package/.next/server/chunks/[root-of-the-server]__1f_ztllkdhd1g._.js +3 -0
  244. package/.next/server/chunks/[root-of-the-server]__1g_f4opcfnwwl._.js +3 -0
  245. package/.next/server/chunks/[root-of-the-server]__1iysogl93kyqq._.js +3 -0
  246. package/.next/server/chunks/[root-of-the-server]__1ka1feeszq3gt._.js +3 -0
  247. package/.next/server/chunks/[root-of-the-server]__1ke-yb4v9knf4._.js +3 -0
  248. package/.next/server/chunks/[root-of-the-server]__1kp5acqtrdysf._.js +3 -0
  249. package/.next/server/chunks/[root-of-the-server]__1kxewr0hve3xs._.js +3 -0
  250. package/.next/server/chunks/[root-of-the-server]__1l47_6jece7bq._.js +3 -0
  251. package/.next/server/chunks/{[root-of-the-server]__1gc1jsjtvhvls._.js → [root-of-the-server]__1nb3q3vglx569._.js} +2 -2
  252. package/.next/server/chunks/[root-of-the-server]__1o42aqttqc3b8._.js +3 -0
  253. package/.next/server/chunks/[root-of-the-server]__1pw5kygb6kibs._.js +3 -0
  254. package/.next/server/chunks/[root-of-the-server]__1qy_fxhx5yu1t._.js +3 -0
  255. package/.next/server/chunks/[root-of-the-server]__1sokwptzp3b3m._.js +3 -0
  256. package/.next/server/chunks/{[root-of-the-server]__0cizcawcu31he._.js → [root-of-the-server]__1ve60byz8pq4j._.js} +2 -2
  257. package/.next/server/chunks/{[root-of-the-server]__0fhi9g3nqu6k3._.js → [root-of-the-server]__1vwlmzqz2r0yr._.js} +1 -1
  258. package/.next/server/chunks/{[root-of-the-server]__1pfhgjwnx_--j._.js → [root-of-the-server]__1w_yq12h-kxx0._.js} +2 -2
  259. package/.next/server/chunks/[root-of-the-server]__1x6r0_9_fqoy-._.js +3 -0
  260. package/.next/server/chunks/[root-of-the-server]__1xx-czpwd_ny7._.js +3 -0
  261. package/.next/server/chunks/[root-of-the-server]__1zkrlusy_cbtj._.js +3 -0
  262. package/.next/server/chunks/_011-ll5i30j2e._.js +1 -1
  263. package/.next/server/chunks/_03ovgh1-4xf3f._.js +1 -1
  264. package/.next/server/chunks/_05-ouasholjra._.js +1 -1
  265. package/.next/server/chunks/_06pseal2zu-71._.js +1 -1
  266. package/.next/server/chunks/_08i9pskmlafnp._.js +1 -1
  267. package/.next/server/chunks/_0ahfgpo6w1vyz._.js +3 -0
  268. package/.next/server/chunks/_0d66myj_8567o._.js +1 -1
  269. package/.next/server/chunks/_0h1rbua_hqkox._.js +1 -1
  270. package/.next/server/chunks/_0i58-g30ox5-8._.js +1 -1
  271. package/.next/server/chunks/_0mt2ctbvzfero._.js +1 -1
  272. package/.next/server/chunks/_0r8u30vd4lix4._.js +1 -1
  273. package/.next/server/chunks/_0tl0cy5j96d7h._.js +1 -1
  274. package/.next/server/chunks/_0zs7jfzzshbfq._.js +1 -1
  275. package/.next/server/chunks/_12i51zlq-xxrl._.js +1 -1
  276. package/.next/server/chunks/_18hm5aaxkr500._.js +1 -1
  277. package/.next/server/chunks/_1a1aqmie1d3u_._.js +1 -1
  278. package/.next/server/chunks/_1a1udq0c4_6ad._.js +1 -1
  279. package/.next/server/chunks/_1ad8i3ukisj99._.js +1 -1
  280. package/.next/server/chunks/_1b0269xt-c8f7._.js +1 -1
  281. package/.next/server/chunks/_1cydcmia78z15._.js +1 -1
  282. package/.next/server/chunks/_1hj7iit2u6xez._.js +1 -1
  283. package/.next/server/chunks/_1sp0xk1c5jx5r._.js +1 -1
  284. package/.next/server/chunks/_1zbkha-v5mkk0._.js +1 -1
  285. package/.next/server/chunks/_next-internal_server_app_api_user_ai-consent_route_actions_0g-jtv0cc92di.js +3 -0
  286. package/.next/server/chunks/src_lib_0dxltm34zaclb._.js +1 -1
  287. package/.next/server/chunks/src_lib_0g4wu08m-gibu._.js +1 -1
  288. package/.next/server/chunks/src_lib_0l0j89xrerf8m._.js +1 -1
  289. package/.next/server/chunks/src_lib_0n6nhl7_avcme._.js +1 -1
  290. package/.next/server/chunks/src_lib_0so-2topfosjo._.js +1 -1
  291. package/.next/server/chunks/src_lib_1_p9kz6i8to9n._.js +3 -0
  292. package/.next/server/chunks/src_lib_1t_-lm7x_gu08._.js +3 -0
  293. package/.next/server/chunks/src_lib_import_import-batches_ts_0nq3mn0v5uj28._.js +2 -2
  294. package/.next/server/chunks/src_lib_import_import-tasks_ts_01f-g_upv7llt._.js +1 -1
  295. package/.next/server/chunks/src_lib_mastery_ts_0ybi94uxn8ut6._.js +1 -1
  296. package/.next/server/chunks/src_lib_question_0uw17e6at-i_h._.js +1 -1
  297. package/.next/server/chunks/src_lib_question_question-analysis_ts_1-3x2cfxlr3fs._.js +1 -1
  298. package/.next/server/chunks/src_lib_question_question-deduplication_ts_0gumctesi3szc._.js +1 -1
  299. package/.next/server/chunks/ssr/{[root-of-the-server]__1epxx0lrejssz._.js → [root-of-the-server]__1qkpcqb6ewk9r._.js} +1 -1
  300. package/.next/server/chunks/ssr/_09y2uhjubswp4._.js +1 -1
  301. package/.next/server/chunks/ssr/_0_m51opjnip8x._.js +32 -0
  302. package/.next/server/chunks/ssr/_0cmd1ubdlo_by._.js +1 -1
  303. package/.next/server/chunks/ssr/{_05gdkgyyr0suj._.js → _0fp_p60hb9ex8._.js} +1 -1
  304. package/.next/server/chunks/ssr/_0lzeodofsq9pe._.js +1 -1
  305. package/.next/server/chunks/ssr/_0ozptnii2nxuw._.js +1 -1
  306. package/.next/server/chunks/ssr/{_01zv6gqnnj9oy._.js → _0qs44fqs7b5wd._.js} +1 -1
  307. package/.next/server/chunks/ssr/{node_modules_1yz9gg4275g30._.js → node_modules_0v4btraw_y7x2._.js} +1 -1
  308. package/.next/server/chunks/ssr/{node_modules_1-wb4967v48id._.js → node_modules_1cm5684hz1o51._.js} +1 -1
  309. package/.next/server/chunks/ssr/{node_modules_1we6ggthjslzt._.js → node_modules_1im5by828hg3r._.js} +1 -1
  310. package/.next/server/chunks/ssr/{node_modules_heic-to_dist_csp_heic-to_038nbq-p7grtd.js → node_modules_heic-to_dist_csp_heic-to_064ewwu8t3acv.js} +1 -1
  311. package/.next/server/chunks/ssr/{node_modules_heic-to_dist_csp_heic-to_1b61b0i6philz.js → node_modules_heic-to_dist_csp_heic-to_1xp1ys7qrz7uh.js} +1 -1
  312. package/.next/server/chunks/ssr/src_1rmus42s388dk._.js +1 -1
  313. package/.next/server/chunks/ssr/src_1seqsa8jiwu83._.js +1 -1
  314. package/.next/server/chunks/ssr/src_app_exams_[id]_print_page_tsx_1i-xvhk8ul1l1._.js +2 -2
  315. package/.next/server/chunks/ssr/src_app_print-preview_page_tsx_001yt-fzrj7tf._.js +1 -1
  316. package/.next/server/chunks/ssr/src_components_correction-editor_tsx_1p7z02t66tndx._.js +2 -2
  317. package/.next/server/chunks/ssr/src_components_providers_tsx_09kw-mv3nb6xs._.js +12 -12
  318. package/.next/server/chunks/ssr/src_lib_api-client_ts_04r2_ex-gua5i._.js +1 -1
  319. package/.next/server/chunks/ssr/src_lib_i18n_en_ts_08zkpwnoqey5s._.js +1 -1
  320. package/.next/server/middleware-build-manifest.js +3 -3
  321. package/.next/server/pages/500.html +1 -1
  322. package/.next/static/chunks/{16h0nz5l970cx.js → 08pb1_yl7fhsw.js} +1 -1
  323. package/.next/static/chunks/{1-00icoq9w3_i.js → 0c3tf7izst9o8.js} +1 -1
  324. package/.next/static/chunks/{3ldaxwwj8i1r_.js → 0ddn90rrjkr7y.js} +3 -3
  325. package/.next/static/chunks/185736qwog1ar.js +1 -0
  326. package/.next/static/chunks/{0y9dgn85yuuy5.js → 1bcso9y60vl1j.js} +1 -1
  327. package/.next/static/chunks/1jsd1qdcjh3ht.js +198 -0
  328. package/.next/static/chunks/1nef598mkxf9g.js +1 -0
  329. package/.next/static/chunks/{2r3xwds8ivfso.js → 1ogj95u4nfqgm.js} +5 -5
  330. package/.next/static/chunks/2-m8at3d9m9fl.js +38 -0
  331. package/.next/static/chunks/21jkvmvb2mzaa.js +1 -0
  332. package/.next/static/chunks/32c19i38gl4zx.js +1 -0
  333. package/.next/static/chunks/34r6_zyo8ux86.js +1 -0
  334. package/.next/static/chunks/3_5fscrh8uxav.css +3 -0
  335. package/.next/static/chunks/{2gamhj4j8w-tp.js → 3lvul9moygg-1.js} +4 -4
  336. package/package.json +1 -1
  337. package/prisma/migrations/20261105000000_user_ai_data_consent/migration.sql +2 -0
  338. package/prisma/schema.prisma +1 -0
  339. package/prisma/seed.db +0 -0
  340. package/.next/server/chunks/[root-of-the-server]__07i32k2sv285o._.js +0 -3
  341. package/.next/server/chunks/[root-of-the-server]__0_le78e9b2yno._.js +0 -3
  342. package/.next/server/chunks/[root-of-the-server]__0b8rxaox_x2n1._.js +0 -3
  343. package/.next/server/chunks/[root-of-the-server]__0bvf731upd2_w._.js +0 -3
  344. package/.next/server/chunks/[root-of-the-server]__0eqjbieakyy2g._.js +0 -3
  345. package/.next/server/chunks/[root-of-the-server]__0gk6xz_lxrrer._.js +0 -3
  346. package/.next/server/chunks/[root-of-the-server]__0nin5p-dwlpf9._.js +0 -3
  347. package/.next/server/chunks/[root-of-the-server]__0nye-53zadylr._.js +0 -3
  348. package/.next/server/chunks/[root-of-the-server]__0o9oim91bxvxq._.js +0 -3
  349. package/.next/server/chunks/[root-of-the-server]__0pojh2d6n1kp6._.js +0 -3
  350. package/.next/server/chunks/[root-of-the-server]__0wea836zkhvlj._.js +0 -3
  351. package/.next/server/chunks/[root-of-the-server]__0wex3czgya39o._.js +0 -3
  352. package/.next/server/chunks/[root-of-the-server]__0yq7jm5ja3r6t._.js +0 -3
  353. package/.next/server/chunks/[root-of-the-server]__1-1ld657rjip5._.js +0 -3
  354. package/.next/server/chunks/[root-of-the-server]__11-fk0-4iuf_k._.js +0 -3
  355. package/.next/server/chunks/[root-of-the-server]__11x5u4zg5i2c6._.js +0 -3
  356. package/.next/server/chunks/[root-of-the-server]__12f6t_ozjtn42._.js +0 -3
  357. package/.next/server/chunks/[root-of-the-server]__13cos0n0yw_z6._.js +0 -3
  358. package/.next/server/chunks/[root-of-the-server]__15r55xy6cyrg3._.js +0 -3
  359. package/.next/server/chunks/[root-of-the-server]__16_meybuj-s5w._.js +0 -3
  360. package/.next/server/chunks/[root-of-the-server]__17659spbpgn__._.js +0 -3
  361. package/.next/server/chunks/[root-of-the-server]__1f0zocrmsd5p8._.js +0 -3
  362. package/.next/server/chunks/[root-of-the-server]__1fp6mylnljj_6._.js +0 -3
  363. package/.next/server/chunks/[root-of-the-server]__1gf_vv57qtjh0._.js +0 -3
  364. package/.next/server/chunks/[root-of-the-server]__1hn69stngi4kc._.js +0 -3
  365. package/.next/server/chunks/[root-of-the-server]__1ii155nyrptua._.js +0 -3
  366. package/.next/server/chunks/[root-of-the-server]__1kxecl8v-_px5._.js +0 -3
  367. package/.next/server/chunks/[root-of-the-server]__1l6v9x8xm11pl._.js +0 -3
  368. package/.next/server/chunks/[root-of-the-server]__1r5lj-ffov9r0._.js +0 -3
  369. package/.next/server/chunks/[root-of-the-server]__1uqnotrppylmw._.js +0 -3
  370. package/.next/server/chunks/[root-of-the-server]__1utvl-1o6mb8y._.js +0 -3
  371. package/.next/server/chunks/[root-of-the-server]__1vc89u7_xxhyf._.js +0 -3
  372. package/.next/server/chunks/[root-of-the-server]__1vorkvvfkrr39._.js +0 -3
  373. package/.next/server/chunks/[root-of-the-server]__1x_kq-6h3utmo._.js +0 -3
  374. package/.next/server/chunks/[root-of-the-server]__1x_yvd3pxoee7._.js +0 -3
  375. package/.next/server/chunks/[root-of-the-server]__1y9cx1kv17pl_._.js +0 -3
  376. package/.next/server/chunks/[root-of-the-server]__1z4-5hlzq34fw._.js +0 -3
  377. package/.next/server/chunks/[root-of-the-server]__20vfjg0kexwpn._.js +0 -3
  378. package/.next/server/chunks/src_lib_1-8qgpevmw3ew._.js +0 -3
  379. package/.next/server/chunks/src_lib_1w0niu4i8hnaq._.js +0 -3
  380. package/.next/server/chunks/ssr/_0haie2cnycj6w._.js +0 -32
  381. package/.next/static/chunks/15zro21ycjjle.js +0 -1
  382. package/.next/static/chunks/1vtq_er8xir3c.css +0 -3
  383. package/.next/static/chunks/28qmcol3c39_a.js +0 -198
  384. package/.next/static/chunks/3fj_icg91t5ar.js +0 -38
  385. package/.next/static/chunks/3fyp0ya1q-g_k.js +0 -1
  386. package/.next/static/chunks/3g93k83oklg4_.js +0 -1
  387. package/.next/static/chunks/3u-qpv02dkpmu.js +0 -1
  388. package/.next/static/chunks/3x0gnqbvstc69.js +0 -1
  389. /package/.next/static/{afzFj9VsDFOvE5lff98xs → oMYEAS-Ug2KhwHuve1br9}/_buildManifest.js +0 -0
  390. /package/.next/static/{afzFj9VsDFOvE5lff98xs → oMYEAS-Ug2KhwHuve1br9}/_clientMiddlewareManifest.js +0 -0
  391. /package/.next/static/{afzFj9VsDFOvE5lff98xs → oMYEAS-Ug2KhwHuve1br9}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- (()=>{"use strict";module.exports=[557230,a=>{var b=a.i(164831);let c={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],557230)},144952,206194,190622,a=>{var b=a.i(187924),c=a.i(572131),d=a.i(613412),e=a.i(875160),f=a.i(211134),g=a.i(164831);let h={name:"zap",size:24,node:[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",key:"1v7up4"}]]};h.node;let i=(0,g.f)(h);var j=a.i(699570),k=a.i(550194);function l({detail:a}){let{t:c}=(0,k.b)();return a?(0,b.jsxs)("p",{className:"mt-1 rounded bg-background/60 px-2 py-1 font-mono text-[11px] leading-relaxed text-red-700 dark:text-red-300 break-all select-text",children:[(0,b.jsx)("span",{className:"font-sans text-muted-foreground",children:c.settings.ai.providerErrorDetail}),a]}):null}a.s(["f",0,l],206194);let m={minimax:{name:"MiniMax",nameEn:"MiniMax",baseUrl:"https://api.minimax.cn/v1",model:"MiniMax-M3.1-Flash",envPrefix:"MINIMAX",consoleUrl:"https://platform.minimax.cn",docs:{cn:"https://platform.minimax.cn/docs/api-reference/api-overview",intl:"https://platform.minimax.io/docs/api-reference/api-overview",apiKey:"https://platform.minimax.cn/docs/guides/quickstart-preparation",models:"https://platform.minimax.cn/docs/guides/models-intro"}},glm:{name:"智谱 GLM",nameEn:"Zhipu GLM",baseUrl:"https://open.bigmodel.cn/api/paas/v4",model:"glm-5.3-flash",envPrefix:"GLM",consoleUrl:"https://open.bigmodel.cn",docs:{cn:"https://docs.bigmodel.cn/cn/guide/start/quick-start",intl:"https://docs.z.ai/guides/overview/quick-start",apiKey:"https://docs.bigmodel.cn/cn/guide/start/quick-start",models:"https://docs.bigmodel.cn/cn/guide/start/model-overview"}},deepseek:{name:"DeepSeek",nameEn:"DeepSeek",baseUrl:"https://api.deepseek.com",model:"deepseek-v4-flash",envPrefix:"DEEPSEEK",consoleUrl:"https://platform.deepseek.com",docs:{cn:"https://api-docs.deepseek.com/zh-cn/",apiKey:"https://api-docs.deepseek.com/zh-cn/",models:"https://api-docs.deepseek.com/zh-cn/quick_start/pricing"}},kimi:{name:"Kimi",nameEn:"Kimi",baseUrl:"https://api.moonshot.cn/v1",model:"kimi-k3.1-pro",envPrefix:"KIMI",consoleUrl:"https://platform.kimi.com",docs:{cn:"https://platform.moonshot.cn/docs/introduction",intl:"https://platform.moonshot.ai/docs/introduction",apiKey:"https://platform.moonshot.cn/docs/introduction",models:"https://platform.moonshot.cn/docs/pricing/chat"}},qwen:{name:"千问 Qwen",nameEn:"Qwen",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",model:"qwen3.8-max",envPrefix:"QWEN",consoleUrl:"https://bailian.console.aliyun.com",docs:{cn:"https://help.aliyun.com/zh/model-studio/token-plan-personal-quick-start",intl:"https://www.alibabacloud.com/help/en/model-studio/token-plan-personal-quick-start",apiKey:"https://help.aliyun.com/zh/model-studio/token-plan-personal-quick-start",models:"https://help.aliyun.com/zh/model-studio/models"}},stepfun:{name:"阶跃星辰 StepFun",nameEn:"StepFun",baseUrl:"https://api.stepfun.com/step_plan/v1",model:"step-5-preview",envPrefix:"STEPFUN",consoleUrl:"https://platform.stepfun.com",docs:{cn:"https://platform.stepfun.com/docs/zh/guides/developer/openai",intl:"https://platform.stepfun.ai/docs/en/guides/developer/openai",apiKey:"https://platform.stepfun.com/docs/zh/guides/developer/openai",models:"https://platform.stepfun.com/docs/zh/guides/models/list"}},volcengine:{name:"火山引擎 豆包",nameEn:"Volcengine Doubao",baseUrl:"https://ark.cn-beijing.volces.com/api/v3",model:"doubao-seed-evolving",envPrefix:"VOLCENGINE",consoleUrl:"https://console.volcengine.com/ark",docs:{cn:"https://www.volcengine.com/docs/82379/1330626",intl:"https://docs.byteplus.com/en/docs/ModelArk/1330626",apiKey:"https://www.volcengine.com/docs/82379/1541594",models:"https://www.volcengine.com/docs/82379/1330310"}},"volcengine-agent":{name:"火山引擎 Agent Plan",nameEn:"Volcengine Agent Plan",baseUrl:"https://ark.cn-beijing.volces.com/api/plan/v3",model:"doubao-seed-evolving",envPrefix:"VOLCENGINE_AGENT",consoleUrl:"https://console.volcengine.com/ark",docs:{cn:"https://ark.volcengine.com/region:cn-beijing/docs/82379/2160841?lang=zh",apiKey:"https://ark.volcengine.com/region:cn-beijing/docs/82379/2160841?lang=zh",models:"https://www.volcengine.com/docs/82379/2366394"}},"volcengine-coding":{name:"火山引擎 Coding Plan",nameEn:"Volcengine Coding Plan",baseUrl:"https://ark.cn-beijing.volces.com/api/coding/v3",model:"doubao-seed-evolving",envPrefix:"VOLCENGINE_CODING",consoleUrl:"https://console.volcengine.com/ark",docs:{cn:"https://www.volcengine.com/docs/82379/1928261",apiKey:"https://www.volcengine.com/docs/82379/1928261",models:"https://www.volcengine.com/docs/82379/1928261"}},"volcengine-free":{name:"火山引擎(免费试用)",nameEn:"Volcengine (free trial)",baseUrl:"https://ark.cn-beijing.volces.com/api/v3",model:"doubao-seed-evolving",envPrefix:"VOLCENGINE_FREE",consoleUrl:"https://console.volcengine.com/ark",docs:{cn:"https://www.volcengine.com/docs/82379/1399514",apiKey:"https://www.volcengine.com/docs/82379/1541594",models:"https://www.volcengine.com/docs/82379/1330310"}}},n=Object.keys(m);function o(a){return"string"==typeof a&&Object.prototype.hasOwnProperty.call(m,a)}a.s(["$",0,m,"U",0,n,"z",0,function(a,b){let c=m[a];return"zh"===b?c.name:c.nameEn},"j",0,o,"k",0,function(a,b){let c=m[a];return{apiKey:b?.apiKey||"",baseUrl:b?.baseUrl||c.baseUrl,model:b?.model||c.model}}],190622);var p=a.i(291938),q=a.i(960927),r=a.i(630534);a.s(["f",0,function({config:a,saving:g,saveButton:h}){let{t:m,language:n}=(0,k.b)(),[s,t]=(0,c.useState)(!1),[u,v]=(0,c.useState)(null),w=a=>m.settings?.ai?.errors?.[a]||a.replace("UNKNOWN:",""),x=async()=>{let b=function(a,b){let c=a.aiProvider;if("openai"===c){let d=a.openai?.instances?.find(b=>b.id===a.openai?.activeInstanceId);return d?.apiKey?{ok:!0,body:{provider:c,apiKey:d.apiKey,baseUrl:d.baseUrl,model:d.model,language:b}}:{ok:!1,error:"API_KEY_REQUIRED"}}if("azure"===c){let d=a.azure;return d?.apiKey&&d.endpoint&&d.deploymentName?{ok:!0,body:{provider:c,apiKey:d.apiKey,endpoint:d.endpoint,deploymentName:d.deploymentName,apiVersion:d.apiVersion,model:d.model,language:b}}:{ok:!1,error:"AZURE_CONFIG_INCOMPLETE"}}if("minimax-code"===c)return{ok:!0,body:{provider:c,model:a.minimaxCode?.model,language:b}};if("gemini"===c||"anthropic"===c||o(c)){let d=a[c];return d?.apiKey?{ok:!0,body:{provider:c,apiKey:d.apiKey,baseUrl:d.baseUrl,model:d.model,language:b}}:{ok:!1,error:"API_KEY_REQUIRED"}}return{ok:!1,error:"UNSUPPORTED_PROVIDER"}}(a,n);if(!b.ok){if("UNSUPPORTED_PROVIDER"===b.error)return;v({success:!1,textSupport:!1,visionSupport:!1,textError:"AZURE_CONFIG_INCOMPLETE"===b.error?m.settings?.ai?.validationAzureEndpointRequired||"Azure config is incomplete":m.settings?.ai?.validationApiKeyRequired||"API Key is required"});return}t(!0),v(null);try{v(await p.k.post("/api/ai/test",b.body))}catch(a){r.V.error("[AiConnectionTest]","AI connection test failed",{error:a}),v({success:!1,textSupport:!1,visionSupport:!1,textError:(0,q.Z)(a)})}finally{t(!1)}};return(0,b.jsxs)("div",{className:"space-y-3 pt-3 border-t",children:[(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsxs)(j.f,{type:"button",variant:"outline",onClick:x,disabled:s||g,className:"flex-1",children:[s?(0,b.jsx)(e.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,b.jsx)(i,{className:"mr-2 h-4 w-4"}),s?m.settings?.ai?.testing||"Testing...":m.settings?.ai?.testConnection||"Test Connection"]}),h]}),u&&(0,b.jsxs)("div",{className:`p-3 rounded-md text-sm ${u.success?"bg-green-50 dark:bg-green-950/40 border border-green-200 dark:border-green-900":"bg-red-50 dark:bg-red-950/40 border border-red-200 dark:border-red-900"}`,children:[(0,b.jsx)("div",{className:"flex items-center gap-2 font-medium mb-2",children:u.success?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.f,{className:"h-4 w-4 text-green-600"}),(0,b.jsx)("span",{className:"text-green-700 dark:text-green-300",children:m.settings?.ai?.testSuccess||"Connection Successful"}),u.modelInfo&&(0,b.jsxs)("span",{className:"text-green-600 text-xs",children:["(",u.modelInfo,")"]})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.f,{className:"h-4 w-4 text-red-600"}),(0,b.jsx)("span",{className:"text-red-700 dark:text-red-300",children:m.settings?.ai?.testFailed||"Connection Failed"})]})}),u.success&&(0,b.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:[m.settings?.ai?.textSupport||"Text Generation",":"]}),(0,b.jsxs)("span",{className:"text-green-600",children:["✓ ",m.settings?.ai?.supported||"Supported"]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:[m.settings?.ai?.visionSupport||"Vision/Multimodal",":"]}),u.visionSupport?(0,b.jsxs)("span",{className:"text-green-600",children:["✓ ",m.settings?.ai?.supported||"Supported"]}):(0,b.jsxs)("span",{className:"text-amber-600",children:["✗ ",u.visionError?w(u.visionError):m.settings?.ai?.notSupported||"Not Supported"]})]}),!u.visionSupport&&(0,b.jsx)(l,{detail:u.visionErrorDetail}),(0,b.jsx)("p",{className:"text-muted-foreground/60 text-[10px] pl-1",children:m.settings?.ai?.testNetworkNote})]}),!u.success&&u.textError&&(0,b.jsx)("p",{className:"text-red-600 text-xs mt-1",children:w(u.textError)}),!u.success&&(0,b.jsx)(l,{detail:u.textErrorDetail})]})]})}],144952)},151304,439830,a=>{var b=a.i(187924),c=a.i(875160),d=a.i(699570),e=a.i(870430),f=a.i(580701),g=a.i(144952),h=a.i(492710),i=a.i(612416),j=a.i(340898),k=a.i(168370),l=a.i(474896),m=a.i(557230),n=a.i(519783),o=a.i(786304),p=a.i(866718),q=a.i(895605),r=a.i(563658),s=a.i(550194),t=a.i(529759),u=a.i(986705);function v({checkin:a,autoCheckin:f,onAutoCheckinChange:g,busy:h,onCheckin:i}){let j,{t:k}=(0,s.b)(),{timeZone:l}=(0,t.M)(),m=k.settings?.ai?.minimaxCode,{today:n,last:p}=a,w=p&&"failed"!==p.status?p:null,x=!!(n?.checkedToday||w),y=String(w?.points??(n?n.points+n.bonusPoints:0)),z=String(w?.streakDays??n?.streakDays??0);return j=w?.trigger==="auto"&&"checked-in"===w.status?(m?.checkinAuto||"Checked in automatically today at {time} (+{points} credits, day {days} in a row)").replace("{time}",(0,u.r)(w.at,"HH:mm",l)).replace("{points}",y).replace("{days}",z):x?(m?.checkinDone||"Checked in today (+{points} credits, day {days} in a row)").replace("{points}",y).replace("{days}",z):p?.status==="failed"?(m?.checkinFailed||"Check-in failed: {error}").replace("{error}",p.error||""):a.autoCheckin?m?.checkinWillAuto||"Not checked in yet today. The app will check in automatically within the hour.":m?.checkinNotYet||"Not checked in yet today",(0,b.jsxs)("div",{className:"space-y-3 border-t pt-3",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 text-sm",children:[(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:m?.checkinToday||"Today's check-in"}),(0,b.jsxs)(o.f,{variant:x?"default":p?.status==="failed"?"destructive":"secondary",children:[(0,b.jsx)(q.f,{className:"mr-1 h-3 w-3"}),x?m?.checkinSuccess||"Checked in":m?.checkinNotYet||"Not yet"]})]}),!x&&(0,b.jsxs)(d.f,{size:"sm",variant:"outline",onClick:i,disabled:h,children:[h&&(0,b.jsx)(c.f,{className:"mr-2 h-4 w-4 animate-spin"}),m?.checkinNow||"Check in now"]})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground break-words",children:j}),(0,b.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)(e.f,{htmlFor:"minimax-code-auto-checkin",children:m?.autoCheckin||"Daily auto check-in"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:m?.autoCheckinHint})]}),(0,b.jsx)(r.f,{id:"minimax-code-auto-checkin",checked:f,onCheckedChange:g})]})]})}let w=["MiniMax-M3.1-Flash","MiniMax-M3","MiniMax-M2.7-highspeed","MiniMax-M2.7"];var x=a.i(572131),y=a.i(291938),z=a.i(960927),A=a.i(710302),B=a.i(630534);function C({value:a,onChange:f}){let{t:g}=(0,s.b)(),h=g.settings?.ai?.minimaxCode,{status:i,loading:j,pending:q,busy:r,refresh:t,login:u,logout:D,checkin:E}=function(){let{t:a}=(0,s.b)(),b=a.settings?.ai?.minimaxCode,[c,d]=(0,x.useState)(null),[e,f]=(0,x.useState)(!0),[g,h]=(0,x.useState)(null),[i,j]=(0,x.useState)(!1),k=(0,x.useRef)(null),l=(0,x.useCallback)(async()=>{f(!0);try{let a=await y.k.get("/api/minimax-code");d(a),a.pendingLogin&&h(a.pendingLogin)}catch(a){B.V.error("[MiniMaxCode]","Failed to load status",{error:a})}finally{f(!1)}},[]);(0,x.useEffect)(()=>{l()},[l]),(0,x.useEffect)(()=>{if(!g)return;let a=!1,c=async()=>{try{let d=await y.k.get("/api/minimax-code/login");if(a)return;if("pending"===d.status){k.current=setTimeout(c,g.intervalMs);return}h(null),"ok"===d.status?A.c.success(b?.loginSuccess||"Signed in"):"expired"===d.status?A.c.error(b?.loginExpired||"Authorization timed out"):"denied"===d.status&&A.c.error(b?.loginDenied||"Authorization declined"),l()}catch(c){if(a)return;h(null),A.c.error(`${b?.loginFailed||"Sign-in failed"}: ${(0,z.Z)(c)}`)}};return k.current=setTimeout(c,g.intervalMs),()=>{a=!0,k.current&&clearTimeout(k.current)}},[g,l,b]);let m=async()=>{j(!0);try{await y.k.delete("/api/minimax-code"),h(null),await l()}catch(a){A.c.error((0,z.Z)(a))}finally{j(!1)}},n=async()=>{j(!0);try{let a=await y.k.post("/api/minimax-code/checkin",{});"failed"===a.status?A.c.error((b?.checkinFailed||"Check-in failed: {error}").replace("{error}",a.error||"")):A.c.success(b?.checkinSuccess||"Checked in"),await l()}catch(a){A.c.error((0,z.Z)(a))}finally{j(!1)}};return{status:c,loading:e,pending:g,busy:i,refresh:l,login:async()=>{j(!0);try{let a=await y.k.post("/api/minimax-code/login",{});h(a),window.open(a.url,"_blank","noopener,noreferrer")}catch(a){A.c.error(`${b?.loginFailed||"Sign-in failed"}: ${(0,z.Z)(a)}`)}finally{j(!1)}},logout:m,checkin:n}}(),F=i?.login??"none",G=i?.account,H=i?.credits,I={none:h?.statusNone||"Not signed in",active:h?.statusActive||"Signed in",expired:h?.statusExpired||"Login expired"}[F];return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:h?.intro}),(0,b.jsxs)("section",{className:"space-y-3 rounded-md border bg-background p-3","aria-label":h?.title||"MiniMax Code account",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)("h4",{className:"text-sm font-medium",children:h?.title||"MiniMax Code account"}),(0,b.jsx)(d.f,{variant:"ghost",size:"sm",onClick:()=>void t(),disabled:j,"aria-label":h?.refresh||"Refresh",children:(0,b.jsx)(n.f,{className:`h-4 w-4 ${j?"animate-spin":""}`})})]}),(0,b.jsxs)("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-2 text-sm",children:[(0,b.jsx)("dt",{className:"text-muted-foreground",children:h?.loginStatus||"Login status"}),(0,b.jsxs)("dd",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,b.jsx)(o.f,{variant:"active"===F?"default":"expired"===F?"destructive":"secondary",children:I}),G&&(0,b.jsx)("span",{className:"truncate text-muted-foreground",children:G.name||G.email||G.userId})]}),"active"===F&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("dt",{className:"text-muted-foreground",children:h?.credits||"Remaining credits"}),(0,b.jsx)("dd",{children:H?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"font-medium tabular-nums",children:H.total}),(0,b.jsx)("span",{className:"ml-2 text-xs text-muted-foreground",children:(h?.creditsDetail||"Free {free} · Purchased {purchased}").replace("{free}",String(H.free)).replace("{purchased}",String(H.purchased))})]}):(0,b.jsx)("span",{className:"text-muted-foreground",children:h?.creditsUnavailable||"Unavailable"})})]})]}),"active"===F&&i&&(0,b.jsx)(v,{checkin:i.checkin,autoCheckin:a?.autoCheckin!==!1,onAutoCheckinChange:b=>f({...a,autoCheckin:b}),busy:r,onCheckin:()=>void E()}),q?(0,b.jsxs)("div",{className:"space-y-1 rounded-md bg-muted/50 p-3 text-sm",children:[(0,b.jsxs)("p",{className:"flex items-center gap-2",children:[(0,b.jsx)(c.f,{className:"h-4 w-4 animate-spin"}),h?.waiting]}),q.userCode&&(0,b.jsxs)("p",{children:[h?.userCode||"Verification code",": ",(0,b.jsx)("span",{className:"font-mono font-medium",children:q.userCode})]}),(0,b.jsxs)("a",{href:q.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 underline",children:[h?.openLink||"Open the authorization page"," ",(0,b.jsx)(k.f,{className:"h-3 w-3"})]})]}):(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsxs)(d.f,{size:"sm",onClick:()=>void u(),disabled:r,children:[r?(0,b.jsx)(c.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,b.jsx)(l.f,{className:"mr-2 h-4 w-4"}),"none"===F?h?.login||"Sign in with browser":h?.relogin||"Sign in again"]}),"none"!==F&&(0,b.jsxs)(d.f,{size:"sm",variant:"outline",onClick:()=>void D(),disabled:r,children:[(0,b.jsx)(m.f,{className:"mr-2 h-4 w-4"}),h?.logout||"Sign out"]})]})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{htmlFor:"minimax-code-model",children:h?.model||"Model"}),(0,b.jsx)(p.f,{id:"minimax-code-model",list:"minimax-code-models",value:a?.model||"",onChange:b=>f({...a,model:b.target.value}),placeholder:"MiniMax-M3.1-Flash"}),(0,b.jsx)("datalist",{id:"minimax-code-models",children:w.map(a=>(0,b.jsx)("option",{value:a},a))}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:h?.modelHint})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:h?.risk})]})}var D=a.i(403512),E=a.i(951675),F=a.i(175592),G=a.i(676330),H=a.i(152679),I=a.i(148463);function J({value:a,onChange:c}){let{t:g}=(0,s.b)(),h=(0,I.f)("openai"),i=a?.instances||[],j=a?.activeInstanceId,k=i.find(a=>a.id===j),l=(b,d)=>{c({...a,instances:i.map(a=>a.id===j?{...a,[b]:d}:a)})},m=async()=>{if(!j||!await (0,A.u)(g.settings?.ai?.confirmDelete||"Delete this instance?",{destructive:!0}))return;let a=i.filter(a=>a.id!==j);c({instances:a,activeInstanceId:a[0]?.id})};return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)(e.f,{children:g.settings?.ai?.instances||"Instance"}),(0,b.jsxs)(d.f,{type:"button",variant:"outline",size:"sm",onClick:()=>{if(i.length>=10)return;let a={id:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{let b=16*Math.random()|0;return("x"===a?b:3&b|8).toString(16)}),name:`Instance ${i.length+1}`,apiKey:"",baseUrl:"https://api.openai.com/v1",model:"gpt-6.1-sol"};c({instances:[...i,a],activeInstanceId:a.id})},disabled:i.length>=10,className:"h-7 px-2 text-xs",children:[(0,b.jsx)(D.f,{className:"h-3 w-3 mr-1"}),g.settings?.ai?.addInstance||"Add"]})]}),i.length>0?(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsxs)(f.d,{value:j||"",onValueChange:b=>c({...a,activeInstanceId:b}),children:[(0,b.jsx)(f.P,{className:"flex-1",children:(0,b.jsx)(f.U,{placeholder:g.settings?.ai?.selectInstance||"Select Instance"})}),(0,b.jsx)(f.r,{children:i.map(a=>(0,b.jsx)(f.T,{value:a.id,children:a.name},a.id))})]}),i.length>1&&(0,b.jsx)(d.f,{type:"button",variant:"outline",size:"icon",onClick:m,className:"h-10 w-10 text-destructive hover:text-destructive",children:(0,b.jsx)(E.f,{className:"h-4 w-4"})})]}):(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:g.settings?.ai?.noInstances||"No instances configured. Click 'Add' to create one."}),i.length>=10&&(0,b.jsx)("p",{className:"text-xs text-amber-600",children:g.settings?.ai?.maxInstancesReached||"Maximum instances reached (10)"})]}),k&&(0,b.jsxs)("div",{className:"space-y-3 p-3 border rounded-md bg-background",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)(e.f,{children:[g.settings?.ai?.instanceName||"Instance Name"," ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,b.jsx)(p.f,{value:k.name||"",onChange:a=>l("name",a.target.value),placeholder:"e.g. GLM-4V",className:k.name?.trim()?"":"border-destructive"})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(G.f,{label:(0,b.jsxs)(b.Fragment,{children:["API Key ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),href:h?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(H.f,{value:k.apiKey||"",onChange:a=>l("apiKey",a.target.value),placeholder:"sk-...",className:k.apiKey?.trim()?"":"border-destructive"})]}),(0,b.jsxs)("div",{className:"space-y-2 pt-4 border-t",children:[(0,b.jsxs)(e.f,{children:["Base URL ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,b.jsx)(p.f,{value:k.baseUrl||"",onChange:a=>l("baseUrl",a.target.value),placeholder:"https://api.openai.com/v1",className:k.baseUrl?.trim()?"":"border-destructive"})]}),(0,b.jsx)(F.f,{provider:"openai",apiKey:k.apiKey,baseUrl:k.baseUrl,currentModel:k.model,onModelChange:a=>l("model",a),docsHref:h?.models})]})]})}function K({provider:a}){let{t:c}=(0,s.b)(),d=c.settings.ai.providerDocs,e=(0,I.f)(a);if(!e)return null;let f=[e.cn&&{href:e.cn,label:e.intl?d.cn:d.official},e.intl&&{href:e.intl,label:e.cn?d.intl:d.official}].filter(a=>!!a);return(0,b.jsxs)("p",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[(0,b.jsx)("span",{children:d.title}),f.map(a=>(0,b.jsxs)("a",{href:a.href,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 underline",children:[a.label,(0,b.jsx)(k.f,{className:"h-3 w-3"})]},a.href))]})}var L=a.i(190622);function M({provider:a,value:c,onChange:d}){let{t:f}=(0,s.b)(),g=L.$[a],h=(a,b)=>d({...c,[a]:b}),i={qwen:f.settings?.ai?.qwenBaseUrlHint,stepfun:f.settings?.ai?.stepfunBaseUrlHint,volcengine:f.settings?.ai?.volcengineBaseUrlHint,"volcengine-agent":f.settings?.ai?.volcengineAgentBaseUrlHint,"volcengine-coding":f.settings?.ai?.volcengineCodingBaseUrlHint};return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:["volcengine-free"===a&&(0,b.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:[(0,b.jsx)("p",{className:"font-medium",children:f.settings.ai.volcengineFree.title}),(0,b.jsx)("p",{className:"mt-1",children:f.settings.ai.volcengineFree.body})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(G.f,{label:"API Key",href:g.docs.apiKey,linkText:f.settings.ai.docLinks.apiKey}),(0,b.jsx)(H.f,{value:c?.apiKey||"",onChange:a=>h("apiKey",a.target.value),placeholder:"sk-..."}),(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",children:[f.settings?.ai?.vendorApiKeyHint||"Get an API key from the console:"," ",(0,b.jsx)("a",{href:g.consoleUrl,target:"_blank",rel:"noopener noreferrer",className:"underline break-all",children:g.consoleUrl})]})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:"Base URL (Optional)"}),(0,b.jsx)(p.f,{value:c?.baseUrl||"",onChange:a=>h("baseUrl",a.target.value),placeholder:g.baseUrl}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:i[a]??f.settings?.ai?.vendorBaseUrlHint})]}),(0,b.jsx)(F.f,{provider:a,apiKey:c?.apiKey,baseUrl:c?.baseUrl,currentModel:c?.model||g.model,onModelChange:a=>h("model",a),docsHref:g.docs.models})]})}a.s(["f",0,function({config:a,setConfig:k,loading:l,saving:m,onSave:n}){let{t:o,language:p}=(0,s.b)();return l?(0,b.jsx)("div",{className:"flex justify-center py-4",children:(0,b.jsx)(c.f,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):(0,b.jsxs)("div",{className:"space-y-4 border rounded-lg p-4 bg-muted/30",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:o.settings?.tabs?.ai||"AI Provider"}),(0,b.jsxs)(f.d,{value:a.aiProvider,onValueChange:a=>k(b=>({...b,aiProvider:a})),children:[(0,b.jsx)(f.P,{children:(0,b.jsx)(f.U,{})}),(0,b.jsxs)(f.r,{children:[(0,b.jsx)(f.T,{value:"minimax",children:(0,L.z)("minimax",p)}),(0,b.jsx)(f.T,{value:"minimax-code",children:"MiniMax Code OAuth"}),L.U.filter(a=>"minimax"!==a).map(a=>(0,b.jsx)(f.T,{value:a,children:(0,L.z)(a,p)},a)),(0,b.jsx)(f.T,{value:"anthropic",children:"Anthropic / Compatible"}),(0,b.jsx)(f.T,{value:"azure",children:"Azure OpenAI"}),(0,b.jsx)(f.T,{value:"openai",children:"OpenAI / Compatible"}),(0,b.jsx)(f.T,{value:"gemini",children:"Google Gemini"})]})]}),(0,b.jsx)(K,{provider:a.aiProvider})]}),"openai"===a.aiProvider&&(0,b.jsx)(J,{value:a.openai,onChange:a=>k(b=>({...b,openai:a}))}),"gemini"===a.aiProvider&&(0,b.jsx)(j.f,{value:a.gemini,onChange:a=>k(b=>({...b,gemini:a}))}),"minimax-code"===a.aiProvider&&(0,b.jsx)(C,{value:a.minimaxCode,onChange:a=>k(b=>({...b,minimaxCode:a}))}),"anthropic"===a.aiProvider&&(0,b.jsx)(h.f,{value:a.anthropic,onChange:a=>k(b=>({...b,anthropic:a}))}),(0,L.j)(a.aiProvider)&&(0,b.jsx)(M,{provider:a.aiProvider,value:a[a.aiProvider],onChange:a=>k(b=>({...b,[b.aiProvider]:a}))},a.aiProvider),"azure"===a.aiProvider&&(0,b.jsx)(i.f,{value:a.azure,onChange:a=>k(b=>({...b,azure:a}))}),(0,b.jsx)(g.f,{config:a,saving:m,saveButton:(0,b.jsxs)(d.f,{onClick:n,disabled:m,className:"flex-1",children:[m&&(0,b.jsx)(c.f,{className:"mr-2 h-4 w-4 animate-spin"}),o.settings?.ai?.save||"Save AI Settings"]})})]})}],151304),a.s(["f",0,function(a,b){if(!(0,u.L)(a.timeZone??u.J))return b.settings.general.invalidTimeZone;if("openai"===a.aiProvider)for(let c of a.openai?.instances||[]){if(!c.name?.trim())return b.settings?.ai?.validationNameRequired||"Instance name is required";if(!c.apiKey?.trim())return b.settings?.ai?.validationApiKeyRequired||"API Key is required";if(!c.baseUrl?.trim())return b.settings?.ai?.validationBaseUrlRequired||"Base URL is required";if(!c.model?.trim())return b.settings?.ai?.validationModelRequired||"Model name is required"}if("azure"===a.aiProvider){if(!a.azure?.endpoint?.trim())return b.settings?.ai?.validationAzureEndpointRequired||"Azure Endpoint is required";if(!a.azure?.deploymentName?.trim())return b.settings?.ai?.validationAzureDeploymentRequired||"Deployment Name is required";if(!a.azure?.apiKey?.trim())return b.settings?.ai?.validationApiKeyRequired||"API Key is required"}return null}],439830)},492710,175592,676330,148463,612416,340898,474896,a=>{var b=a.i(187924),c=a.i(866718),d=a.i(152679),e=a.i(870430),f=a.i(572131),g=a.i(699570),h=a.i(580701),i=a.i(168370),j=a.i(519783),k=a.i(875160),l=a.i(291938),m=a.i(550194),n=a.i(190622),o=a.i(630534);function p({provider:a,apiKey:d,baseUrl:q,currentModel:r,onModelChange:s,docsHref:t}){let{t:u}=(0,m.b)(),[v,w]=(0,f.useState)([]),[x,y]=(0,f.useState)(!1),[z,A]=(0,f.useState)(null),[B,C]=(0,f.useState)(r||""),[D,E]=(0,f.useState)(!1),[F,G]=(0,f.useState)(r);r!==F&&(G(r),C(r||""));let H=async()=>{if(!d)return void A(u.modelSelector?.enterApiKeyFirst||"Please enter API Key first");y(!0),A(null);try{let b=await l.k.post("/api/ai/models",{provider:a,apiKey:d,...q&&{baseUrl:q}});if("error"in b&&"string"==typeof b.error){A(b.error),E(!0),w([]);return}w(b.models),0===b.models.length&&(A(u.modelSelector?.noVisionModel||"No vision model found, please enter manually"),E(!0))}catch(b){o.V.error("[ModelSelector]","Failed to fetch models",{error:b});let a=b instanceof Error&&b.message||u.modelSelector?.fetchFailed||"Failed to fetch models";A(a+(u.modelSelector?.enterManually||", please enter manually")),E(!0)}finally{y(!1)}};return(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(e.f,{className:"flex-1",children:u.modelSelector?.modelName||"Model Name"}),t&&(0,b.jsxs)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground underline",children:[u.settings.ai.docLinks.models,(0,b.jsx)(i.f,{className:"h-3 w-3"})]}),(0,b.jsx)(g.f,{type:"button",variant:"outline",size:"sm",onClick:H,disabled:x||!d,children:x?(0,b.jsx)(k.f,{className:"h-3 w-3 animate-spin"}):(0,b.jsx)(j.f,{className:"h-3 w-3"})})]}),z&&(0,b.jsx)("p",{className:"text-xs text-yellow-600",children:z}),D||0===v.length?(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(c.f,{value:B,onChange:a=>{var b;C(b=a.target.value),s(b)},placeholder:(0,n.j)(a)?n.$[a].model:"openai"===a?"gpt-6.1-sol":"gemini-1.5-flash"}),v.length>0&&(0,b.jsx)(g.f,{type:"button",variant:"link",size:"sm",className:"h-auto p-0 text-xs",onClick:()=>E(!1),children:u.modelSelector?.selectFromList||"Select from List"})]}):(0,b.jsx)("div",{className:"space-y-2",children:(0,b.jsxs)(h.d,{value:r,onValueChange:a=>{"_custom"===a?E(!0):(E(!1),C(a),s(a))},children:[(0,b.jsx)(h.P,{children:(0,b.jsx)(h.U,{placeholder:u.modelSelector?.selectModel||"Select Model"})}),(0,b.jsxs)(h.r,{children:[v.map(a=>(0,b.jsxs)(h.T,{value:a.id,children:[a.name,a.owned_by&&` (${a.owned_by})`]},a.id)),(0,b.jsx)(h.T,{value:"_custom",children:u.modelSelector?.customInput||"Custom Input..."})]})]})})]})}function q({label:a,href:c,linkText:d}){return c?(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)(e.f,{children:a}),(0,b.jsxs)("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground underline",children:[d,(0,b.jsx)(i.f,{className:"h-3 w-3"})]})]}):(0,b.jsx)(e.f,{children:a})}a.s(["f",0,p],175592),a.s(["f",0,q],676330);let r={openai:{intl:"https://platform.openai.com/docs/api-reference",apiKey:"https://platform.openai.com/docs/quickstart",models:"https://platform.openai.com/docs/models"},anthropic:{intl:"https://docs.anthropic.com/en/api/overview",apiKey:"https://docs.anthropic.com/en/api/getting-started",models:"https://docs.anthropic.com/en/docs/about-claude/models/overview"},azure:{intl:"https://learn.microsoft.com/azure/ai-foundry/openai/reference",apiKey:"https://learn.microsoft.com/azure/ai-foundry/openai/how-to/create-resource",models:"https://learn.microsoft.com/azure/ai-foundry/openai/concepts/models"},gemini:{intl:"https://ai.google.dev/gemini-api/docs",apiKey:"https://ai.google.dev/gemini-api/docs/api-key",models:"https://ai.google.dev/gemini-api/docs/models"}};function s(a){return(0,n.j)(a)?n.$[a].docs:r[a]??null}a.s(["f",0,s],148463),a.s(["f",0,function({value:a,onChange:f}){let{t:g}=(0,m.b)(),h=s("anthropic"),i=(b,c)=>f({...a,[b]:c});return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:"API Key",href:h?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(d.f,{value:a?.apiKey||"",onChange:a=>i("apiKey",a.target.value),placeholder:"sk-ant-..."})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:"Base URL (Optional)"}),(0,b.jsx)(c.f,{value:a?.baseUrl||"",onChange:a=>i("baseUrl",a.target.value),placeholder:"https://api.anthropic.com"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:g.settings?.ai?.anthropicBaseUrlHint})]}),(0,b.jsx)(p,{provider:"anthropic",apiKey:a?.apiKey,baseUrl:a?.baseUrl,currentModel:a?.model,onModelChange:a=>i("model",a),docsHref:h?.models})]})}],492710),a.s(["f",0,function({value:a,onChange:f}){let{t:g}=(0,m.b)(),h=s("azure"),i=(b,c)=>f({...a,[b]:c}),j=a=>a?.trim()?"":"border-destructive";return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)(e.f,{children:[g.settings?.ai?.azureEndpoint||"Azure Endpoint"," ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,b.jsx)(c.f,{value:a?.endpoint||"",onChange:a=>i("endpoint",a.target.value),placeholder:g.settings?.ai?.azureEndpointPlaceholder||"https://your-resource.openai.azure.com",className:j(a?.endpoint)})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:(0,b.jsxs)(b.Fragment,{children:[g.settings?.ai?.azureDeployment||"Deployment Name"," ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),href:h?.models,linkText:g.settings.ai.docLinks.models}),(0,b.jsx)(c.f,{value:a?.deploymentName||"",onChange:a=>i("deploymentName",a.target.value),placeholder:g.settings?.ai?.azureDeploymentPlaceholder||"gpt-4o-deployment",className:j(a?.deploymentName)})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:(0,b.jsxs)(b.Fragment,{children:["API Key ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),href:h?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(d.f,{value:a?.apiKey||"",onChange:a=>i("apiKey",a.target.value),placeholder:"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",className:j(a?.apiKey)})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:g.settings?.ai?.azureApiVersion||"API Version"}),(0,b.jsx)(c.f,{value:a?.apiVersion||"",onChange:a=>i("apiVersion",a.target.value),placeholder:g.settings?.ai?.azureApiVersionPlaceholder||"2024-02-15-preview"})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:g.settings?.ai?.azureModel||"Model Display Name"}),(0,b.jsx)(c.f,{value:a?.model||"",onChange:a=>i("model",a.target.value),placeholder:"gpt-4o"})]})]})}],612416),a.s(["f",0,function({value:a,onChange:f}){let{t:g}=(0,m.b)(),h=s("gemini"),i=(b,c)=>f({...a,[b]:c});return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:"API Key",href:h?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(d.f,{value:a?.apiKey||"",onChange:a=>i("apiKey",a.target.value),placeholder:"AIza..."})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:"Base URL (Optional)"}),(0,b.jsx)(c.f,{value:a?.baseUrl||"",onChange:a=>i("baseUrl",a.target.value),placeholder:"https://generativelanguage.googleapis.com"})]}),(0,b.jsx)(p,{provider:"gemini",apiKey:a?.apiKey,baseUrl:a?.baseUrl,currentModel:a?.model,onModelChange:a=>i("model",a),docsHref:h?.models})]})}],340898);var t=a.i(164831);let u={name:"log-in",size:24,node:[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]]};u.node;let v=(0,t.f)(u);a.s(["f",0,v],474896)},152679,a=>{var b=a.i(187924),c=a.i(572131),d=a.i(755681),e=a.i(777064),f=a.i(699570),g=a.i(866718),h=a.i(550194),i=a.i(368114);a.s(["f",0,function({className:a,...j}){let{t:k}=(0,h.b)(),[l,m]=(0,c.useState)(!1);return(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(g.f,{type:l?"text":"password",className:(0,i.f)("pr-10",a),...j}),(0,b.jsx)(f.f,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",onClick:()=>m(!l),"aria-label":l?k.common.hidePassword:k.common.showPassword,tabIndex:-1,children:l?(0,b.jsx)(e.f,{className:"h-4 w-4 text-muted-foreground"}):(0,b.jsx)(d.f,{className:"h-4 w-4 text-muted-foreground"})})]})}])}]})();
1
+ (()=>{"use strict";module.exports=[557230,a=>{var b=a.i(164831);let c={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],557230)},144952,206194,a=>{var b=a.i(187924),c=a.i(572131),d=a.i(613412),e=a.i(875160),f=a.i(211134),g=a.i(164831);let h={name:"zap",size:24,node:[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",key:"1v7up4"}]]};h.node;let i=(0,g.f)(h);var j=a.i(699570),k=a.i(550194);function l({detail:a}){let{t:c}=(0,k.b)();return a?(0,b.jsxs)("p",{className:"mt-1 rounded bg-background/60 px-2 py-1 font-mono text-[11px] leading-relaxed text-red-700 dark:text-red-300 break-all select-text",children:[(0,b.jsx)("span",{className:"font-sans text-muted-foreground",children:c.settings.ai.providerErrorDetail}),a]}):null}a.s(["f",0,l],206194);var m=a.i(190622),n=a.i(291938),o=a.i(960927),p=a.i(630534);a.s(["f",0,function({config:a,saving:g,saveButton:h}){let{t:q,language:r}=(0,k.b)(),[s,t]=(0,c.useState)(!1),[u,v]=(0,c.useState)(null),w=a=>q.settings?.ai?.errors?.[a]||a.replace("UNKNOWN:",""),x=async()=>{let b=function(a,b){let c=a.aiProvider;if("openai"===c){let d=a.openai?.instances?.find(b=>b.id===a.openai?.activeInstanceId);return d?.apiKey?{ok:!0,body:{provider:c,apiKey:d.apiKey,baseUrl:d.baseUrl,model:d.model,language:b}}:{ok:!1,error:"API_KEY_REQUIRED"}}if("azure"===c){let d=a.azure;return d?.apiKey&&d.endpoint&&d.deploymentName?{ok:!0,body:{provider:c,apiKey:d.apiKey,endpoint:d.endpoint,deploymentName:d.deploymentName,apiVersion:d.apiVersion,model:d.model,language:b}}:{ok:!1,error:"AZURE_CONFIG_INCOMPLETE"}}if("minimax-code"===c)return{ok:!0,body:{provider:c,model:a.minimaxCode?.model,language:b}};if("gemini"===c||"anthropic"===c||(0,m.j)(c)){let d=a[c];return d?.apiKey?{ok:!0,body:{provider:c,apiKey:d.apiKey,baseUrl:d.baseUrl,model:d.model,language:b}}:{ok:!1,error:"API_KEY_REQUIRED"}}return{ok:!1,error:"UNSUPPORTED_PROVIDER"}}(a,r);if(!b.ok){if("UNSUPPORTED_PROVIDER"===b.error)return;v({success:!1,textSupport:!1,visionSupport:!1,textError:"AZURE_CONFIG_INCOMPLETE"===b.error?q.settings?.ai?.validationAzureEndpointRequired||"Azure config is incomplete":q.settings?.ai?.validationApiKeyRequired||"API Key is required"});return}t(!0),v(null);try{v(await n.k.post("/api/ai/test",b.body))}catch(a){p.V.error("[AiConnectionTest]","AI connection test failed",{error:a}),v({success:!1,textSupport:!1,visionSupport:!1,textError:(0,o.Z)(a)})}finally{t(!1)}};return(0,b.jsxs)("div",{className:"space-y-3 pt-3 border-t",children:[(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsxs)(j.f,{type:"button",variant:"outline",onClick:x,disabled:s||g,className:"flex-1",children:[s?(0,b.jsx)(e.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,b.jsx)(i,{className:"mr-2 h-4 w-4"}),s?q.settings?.ai?.testing||"Testing...":q.settings?.ai?.testConnection||"Test Connection"]}),h]}),u&&(0,b.jsxs)("div",{className:`p-3 rounded-md text-sm ${u.success?"bg-green-50 dark:bg-green-950/40 border border-green-200 dark:border-green-900":"bg-red-50 dark:bg-red-950/40 border border-red-200 dark:border-red-900"}`,children:[(0,b.jsx)("div",{className:"flex items-center gap-2 font-medium mb-2",children:u.success?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.f,{className:"h-4 w-4 text-green-600"}),(0,b.jsx)("span",{className:"text-green-700 dark:text-green-300",children:q.settings?.ai?.testSuccess||"Connection Successful"}),u.modelInfo&&(0,b.jsxs)("span",{className:"text-green-600 text-xs",children:["(",u.modelInfo,")"]})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.f,{className:"h-4 w-4 text-red-600"}),(0,b.jsx)("span",{className:"text-red-700 dark:text-red-300",children:q.settings?.ai?.testFailed||"Connection Failed"})]})}),u.success&&(0,b.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:[q.settings?.ai?.textSupport||"Text Generation",":"]}),(0,b.jsxs)("span",{className:"text-green-600",children:["✓ ",q.settings?.ai?.supported||"Supported"]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:[q.settings?.ai?.visionSupport||"Vision/Multimodal",":"]}),u.visionSupport?(0,b.jsxs)("span",{className:"text-green-600",children:["✓ ",q.settings?.ai?.supported||"Supported"]}):(0,b.jsxs)("span",{className:"text-amber-600",children:["✗ ",u.visionError?w(u.visionError):q.settings?.ai?.notSupported||"Not Supported"]})]}),!u.visionSupport&&(0,b.jsx)(l,{detail:u.visionErrorDetail}),(0,b.jsx)("p",{className:"text-muted-foreground/60 text-[10px] pl-1",children:q.settings?.ai?.testNetworkNote})]}),!u.success&&u.textError&&(0,b.jsx)("p",{className:"text-red-600 text-xs mt-1",children:w(u.textError)}),!u.success&&(0,b.jsx)(l,{detail:u.textErrorDetail})]})]})}],144952)},151304,439830,a=>{var b=a.i(187924),c=a.i(875160),d=a.i(699570),e=a.i(870430),f=a.i(580701),g=a.i(144952),h=a.i(492710),i=a.i(612416),j=a.i(340898),k=a.i(168370),l=a.i(474896),m=a.i(557230),n=a.i(519783),o=a.i(786304),p=a.i(866718),q=a.i(895605),r=a.i(563658),s=a.i(550194),t=a.i(529759),u=a.i(986705);function v({checkin:a,autoCheckin:f,onAutoCheckinChange:g,busy:h,onCheckin:i}){let j,{t:k}=(0,s.b)(),{timeZone:l}=(0,t.M)(),m=k.settings?.ai?.minimaxCode,{today:n,last:p}=a,w=p&&"failed"!==p.status?p:null,x=!!(n?.checkedToday||w),y=String(w?.points??(n?n.points+n.bonusPoints:0)),z=String(w?.streakDays??n?.streakDays??0);return j=w?.trigger==="auto"&&"checked-in"===w.status?(m?.checkinAuto||"Checked in automatically today at {time} (+{points} credits, day {days} in a row)").replace("{time}",(0,u.r)(w.at,"HH:mm",l)).replace("{points}",y).replace("{days}",z):x?(m?.checkinDone||"Checked in today (+{points} credits, day {days} in a row)").replace("{points}",y).replace("{days}",z):p?.status==="failed"?(m?.checkinFailed||"Check-in failed: {error}").replace("{error}",p.error||""):a.autoCheckin?m?.checkinWillAuto||"Not checked in yet today. The app will check in automatically within the hour.":m?.checkinNotYet||"Not checked in yet today",(0,b.jsxs)("div",{className:"space-y-3 border-t pt-3",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 text-sm",children:[(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:m?.checkinToday||"Today's check-in"}),(0,b.jsxs)(o.f,{variant:x?"default":p?.status==="failed"?"destructive":"secondary",children:[(0,b.jsx)(q.f,{className:"mr-1 h-3 w-3"}),x?m?.checkinSuccess||"Checked in":m?.checkinNotYet||"Not yet"]})]}),!x&&(0,b.jsxs)(d.f,{size:"sm",variant:"outline",onClick:i,disabled:h,children:[h&&(0,b.jsx)(c.f,{className:"mr-2 h-4 w-4 animate-spin"}),m?.checkinNow||"Check in now"]})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground break-words",children:j}),(0,b.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)(e.f,{htmlFor:"minimax-code-auto-checkin",children:m?.autoCheckin||"Daily auto check-in"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:m?.autoCheckinHint})]}),(0,b.jsx)(r.f,{id:"minimax-code-auto-checkin",checked:f,onCheckedChange:g})]})]})}let w=["MiniMax-M3.1-Flash","MiniMax-M3","MiniMax-M2.7-highspeed","MiniMax-M2.7"];var x=a.i(572131),y=a.i(291938),z=a.i(960927),A=a.i(710302),B=a.i(630534);function C({value:a,onChange:f}){let{t:g}=(0,s.b)(),h=g.settings?.ai?.minimaxCode,{status:i,loading:j,pending:q,busy:r,refresh:t,login:u,logout:D,checkin:E}=function(){let{t:a}=(0,s.b)(),b=a.settings?.ai?.minimaxCode,[c,d]=(0,x.useState)(null),[e,f]=(0,x.useState)(!0),[g,h]=(0,x.useState)(null),[i,j]=(0,x.useState)(!1),k=(0,x.useRef)(null),l=(0,x.useCallback)(async()=>{f(!0);try{let a=await y.k.get("/api/minimax-code");d(a),a.pendingLogin&&h(a.pendingLogin)}catch(a){B.V.error("[MiniMaxCode]","Failed to load status",{error:a})}finally{f(!1)}},[]);(0,x.useEffect)(()=>{l()},[l]),(0,x.useEffect)(()=>{if(!g)return;let a=!1,c=async()=>{try{let d=await y.k.get("/api/minimax-code/login");if(a)return;if("pending"===d.status){k.current=setTimeout(c,g.intervalMs);return}h(null),"ok"===d.status?A.c.success(b?.loginSuccess||"Signed in"):"expired"===d.status?A.c.error(b?.loginExpired||"Authorization timed out"):"denied"===d.status&&A.c.error(b?.loginDenied||"Authorization declined"),l()}catch(c){if(a)return;h(null),A.c.error(`${b?.loginFailed||"Sign-in failed"}: ${(0,z.Z)(c)}`)}};return k.current=setTimeout(c,g.intervalMs),()=>{a=!0,k.current&&clearTimeout(k.current)}},[g,l,b]);let m=async()=>{j(!0);try{await y.k.delete("/api/minimax-code"),h(null),await l()}catch(a){A.c.error((0,z.Z)(a))}finally{j(!1)}},n=async()=>{j(!0);try{let a=await y.k.post("/api/minimax-code/checkin",{});"failed"===a.status?A.c.error((b?.checkinFailed||"Check-in failed: {error}").replace("{error}",a.error||"")):A.c.success(b?.checkinSuccess||"Checked in"),await l()}catch(a){A.c.error((0,z.Z)(a))}finally{j(!1)}};return{status:c,loading:e,pending:g,busy:i,refresh:l,login:async()=>{j(!0);try{let a=await y.k.post("/api/minimax-code/login",{});h(a),window.open(a.url,"_blank","noopener,noreferrer")}catch(a){A.c.error(`${b?.loginFailed||"Sign-in failed"}: ${(0,z.Z)(a)}`)}finally{j(!1)}},logout:m,checkin:n}}(),F=i?.login??"none",G=i?.account,H=i?.credits,I={none:h?.statusNone||"Not signed in",active:h?.statusActive||"Signed in",expired:h?.statusExpired||"Login expired"}[F];return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:h?.intro}),(0,b.jsxs)("section",{className:"space-y-3 rounded-md border bg-background p-3","aria-label":h?.title||"MiniMax Code account",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)("h4",{className:"text-sm font-medium",children:h?.title||"MiniMax Code account"}),(0,b.jsx)(d.f,{variant:"ghost",size:"sm",onClick:()=>void t(),disabled:j,"aria-label":h?.refresh||"Refresh",children:(0,b.jsx)(n.f,{className:`h-4 w-4 ${j?"animate-spin":""}`})})]}),(0,b.jsxs)("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-2 text-sm",children:[(0,b.jsx)("dt",{className:"text-muted-foreground",children:h?.loginStatus||"Login status"}),(0,b.jsxs)("dd",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,b.jsx)(o.f,{variant:"active"===F?"default":"expired"===F?"destructive":"secondary",children:I}),G&&(0,b.jsx)("span",{className:"truncate text-muted-foreground",children:G.name||G.email||G.userId})]}),"active"===F&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("dt",{className:"text-muted-foreground",children:h?.credits||"Remaining credits"}),(0,b.jsx)("dd",{children:H?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"font-medium tabular-nums",children:H.total}),(0,b.jsx)("span",{className:"ml-2 text-xs text-muted-foreground",children:(h?.creditsDetail||"Free {free} · Purchased {purchased}").replace("{free}",String(H.free)).replace("{purchased}",String(H.purchased))})]}):(0,b.jsx)("span",{className:"text-muted-foreground",children:h?.creditsUnavailable||"Unavailable"})})]})]}),"active"===F&&i&&(0,b.jsx)(v,{checkin:i.checkin,autoCheckin:a?.autoCheckin!==!1,onAutoCheckinChange:b=>f({...a,autoCheckin:b}),busy:r,onCheckin:()=>void E()}),q?(0,b.jsxs)("div",{className:"space-y-1 rounded-md bg-muted/50 p-3 text-sm",children:[(0,b.jsxs)("p",{className:"flex items-center gap-2",children:[(0,b.jsx)(c.f,{className:"h-4 w-4 animate-spin"}),h?.waiting]}),q.userCode&&(0,b.jsxs)("p",{children:[h?.userCode||"Verification code",": ",(0,b.jsx)("span",{className:"font-mono font-medium",children:q.userCode})]}),(0,b.jsxs)("a",{href:q.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 underline",children:[h?.openLink||"Open the authorization page"," ",(0,b.jsx)(k.f,{className:"h-3 w-3"})]})]}):(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsxs)(d.f,{size:"sm",onClick:()=>void u(),disabled:r,children:[r?(0,b.jsx)(c.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,b.jsx)(l.f,{className:"mr-2 h-4 w-4"}),"none"===F?h?.login||"Sign in with browser":h?.relogin||"Sign in again"]}),"none"!==F&&(0,b.jsxs)(d.f,{size:"sm",variant:"outline",onClick:()=>void D(),disabled:r,children:[(0,b.jsx)(m.f,{className:"mr-2 h-4 w-4"}),h?.logout||"Sign out"]})]})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{htmlFor:"minimax-code-model",children:h?.model||"Model"}),(0,b.jsx)(p.f,{id:"minimax-code-model",list:"minimax-code-models",value:a?.model||"",onChange:b=>f({...a,model:b.target.value}),placeholder:"MiniMax-M3.1-Flash"}),(0,b.jsx)("datalist",{id:"minimax-code-models",children:w.map(a=>(0,b.jsx)("option",{value:a},a))}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:h?.modelHint})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:h?.risk})]})}var D=a.i(403512),E=a.i(951675),F=a.i(175592),G=a.i(676330),H=a.i(152679),I=a.i(148463);function J({value:a,onChange:c}){let{t:g}=(0,s.b)(),h=(0,I.f)("openai"),i=a?.instances||[],j=a?.activeInstanceId,k=i.find(a=>a.id===j),l=(b,d)=>{c({...a,instances:i.map(a=>a.id===j?{...a,[b]:d}:a)})},m=async()=>{if(!j||!await (0,A.u)(g.settings?.ai?.confirmDelete||"Delete this instance?",{destructive:!0}))return;let a=i.filter(a=>a.id!==j);c({instances:a,activeInstanceId:a[0]?.id})};return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)(e.f,{children:g.settings?.ai?.instances||"Instance"}),(0,b.jsxs)(d.f,{type:"button",variant:"outline",size:"sm",onClick:()=>{if(i.length>=10)return;let a={id:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{let b=16*Math.random()|0;return("x"===a?b:3&b|8).toString(16)}),name:`Instance ${i.length+1}`,apiKey:"",baseUrl:"https://api.openai.com/v1",model:"gpt-6.1-sol"};c({instances:[...i,a],activeInstanceId:a.id})},disabled:i.length>=10,className:"h-7 px-2 text-xs",children:[(0,b.jsx)(D.f,{className:"h-3 w-3 mr-1"}),g.settings?.ai?.addInstance||"Add"]})]}),i.length>0?(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsxs)(f.d,{value:j||"",onValueChange:b=>c({...a,activeInstanceId:b}),children:[(0,b.jsx)(f.P,{className:"flex-1",children:(0,b.jsx)(f.U,{placeholder:g.settings?.ai?.selectInstance||"Select Instance"})}),(0,b.jsx)(f.r,{children:i.map(a=>(0,b.jsx)(f.T,{value:a.id,children:a.name},a.id))})]}),i.length>1&&(0,b.jsx)(d.f,{type:"button",variant:"outline",size:"icon",onClick:m,className:"h-10 w-10 text-destructive hover:text-destructive",children:(0,b.jsx)(E.f,{className:"h-4 w-4"})})]}):(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:g.settings?.ai?.noInstances||"No instances configured. Click 'Add' to create one."}),i.length>=10&&(0,b.jsx)("p",{className:"text-xs text-amber-600",children:g.settings?.ai?.maxInstancesReached||"Maximum instances reached (10)"})]}),k&&(0,b.jsxs)("div",{className:"space-y-3 p-3 border rounded-md bg-background",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)(e.f,{children:[g.settings?.ai?.instanceName||"Instance Name"," ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,b.jsx)(p.f,{value:k.name||"",onChange:a=>l("name",a.target.value),placeholder:"e.g. GLM-4V",className:k.name?.trim()?"":"border-destructive"})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(G.f,{label:(0,b.jsxs)(b.Fragment,{children:["API Key ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),href:h?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(H.f,{value:k.apiKey||"",onChange:a=>l("apiKey",a.target.value),placeholder:"sk-...",className:k.apiKey?.trim()?"":"border-destructive"})]}),(0,b.jsxs)("div",{className:"space-y-2 pt-4 border-t",children:[(0,b.jsxs)(e.f,{children:["Base URL ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,b.jsx)(p.f,{value:k.baseUrl||"",onChange:a=>l("baseUrl",a.target.value),placeholder:"https://api.openai.com/v1",className:k.baseUrl?.trim()?"":"border-destructive"})]}),(0,b.jsx)(F.f,{provider:"openai",apiKey:k.apiKey,baseUrl:k.baseUrl,currentModel:k.model,onModelChange:a=>l("model",a),docsHref:h?.models})]})]})}function K({provider:a}){let{t:c}=(0,s.b)(),d=c.settings.ai.providerDocs,e=(0,I.f)(a);if(!e)return null;let f=[e.cn&&{href:e.cn,label:e.intl?d.cn:d.official},e.intl&&{href:e.intl,label:e.cn?d.intl:d.official}].filter(a=>!!a);return(0,b.jsxs)("p",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[(0,b.jsx)("span",{children:d.title}),f.map(a=>(0,b.jsxs)("a",{href:a.href,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 underline",children:[a.label,(0,b.jsx)(k.f,{className:"h-3 w-3"})]},a.href))]})}var L=a.i(190622);function M({provider:a,value:c,onChange:d}){let{t:f}=(0,s.b)(),g=L.$[a],h=(a,b)=>d({...c,[a]:b}),i={qwen:f.settings?.ai?.qwenBaseUrlHint,stepfun:f.settings?.ai?.stepfunBaseUrlHint,volcengine:f.settings?.ai?.volcengineBaseUrlHint,"volcengine-agent":f.settings?.ai?.volcengineAgentBaseUrlHint,"volcengine-coding":f.settings?.ai?.volcengineCodingBaseUrlHint};return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:["volcengine-free"===a&&(0,b.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:[(0,b.jsx)("p",{className:"font-medium",children:f.settings.ai.volcengineFree.title}),(0,b.jsx)("p",{className:"mt-1",children:f.settings.ai.volcengineFree.body})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(G.f,{label:"API Key",href:g.docs.apiKey,linkText:f.settings.ai.docLinks.apiKey}),(0,b.jsx)(H.f,{value:c?.apiKey||"",onChange:a=>h("apiKey",a.target.value),placeholder:"sk-..."}),(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",children:[f.settings?.ai?.vendorApiKeyHint||"Get an API key from the console:"," ",(0,b.jsx)("a",{href:g.consoleUrl,target:"_blank",rel:"noopener noreferrer",className:"underline break-all",children:g.consoleUrl})]})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:"Base URL (Optional)"}),(0,b.jsx)(p.f,{value:c?.baseUrl||"",onChange:a=>h("baseUrl",a.target.value),placeholder:g.baseUrl}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:i[a]??f.settings?.ai?.vendorBaseUrlHint})]}),(0,b.jsx)(F.f,{provider:a,apiKey:c?.apiKey,baseUrl:c?.baseUrl,currentModel:c?.model||g.model,onModelChange:a=>h("model",a),docsHref:g.docs.models})]})}a.s(["f",0,function({config:a,setConfig:k,loading:l,saving:m,onSave:n}){let{t:o,language:p}=(0,s.b)();return l?(0,b.jsx)("div",{className:"flex justify-center py-4",children:(0,b.jsx)(c.f,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):(0,b.jsxs)("div",{className:"space-y-4 border rounded-lg p-4 bg-muted/30",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:o.settings?.tabs?.ai||"AI Provider"}),(0,b.jsxs)(f.d,{value:a.aiProvider,onValueChange:a=>k(b=>({...b,aiProvider:a})),children:[(0,b.jsx)(f.P,{children:(0,b.jsx)(f.U,{})}),(0,b.jsxs)(f.r,{children:[(0,b.jsx)(f.T,{value:"minimax",children:(0,L.z)("minimax",p)}),(0,b.jsx)(f.T,{value:"minimax-code",children:"MiniMax Code OAuth"}),L.U.filter(a=>"minimax"!==a).map(a=>(0,b.jsx)(f.T,{value:a,children:(0,L.z)(a,p)},a)),(0,b.jsx)(f.T,{value:"anthropic",children:"Anthropic / Compatible"}),(0,b.jsx)(f.T,{value:"azure",children:"Azure OpenAI"}),(0,b.jsx)(f.T,{value:"openai",children:"OpenAI / Compatible"}),(0,b.jsx)(f.T,{value:"gemini",children:"Google Gemini"})]})]}),(0,b.jsx)(K,{provider:a.aiProvider})]}),"openai"===a.aiProvider&&(0,b.jsx)(J,{value:a.openai,onChange:a=>k(b=>({...b,openai:a}))}),"gemini"===a.aiProvider&&(0,b.jsx)(j.f,{value:a.gemini,onChange:a=>k(b=>({...b,gemini:a}))}),"minimax-code"===a.aiProvider&&(0,b.jsx)(C,{value:a.minimaxCode,onChange:a=>k(b=>({...b,minimaxCode:a}))}),"anthropic"===a.aiProvider&&(0,b.jsx)(h.f,{value:a.anthropic,onChange:a=>k(b=>({...b,anthropic:a}))}),(0,L.j)(a.aiProvider)&&(0,b.jsx)(M,{provider:a.aiProvider,value:a[a.aiProvider],onChange:a=>k(b=>({...b,[b.aiProvider]:a}))},a.aiProvider),"azure"===a.aiProvider&&(0,b.jsx)(i.f,{value:a.azure,onChange:a=>k(b=>({...b,azure:a}))}),(0,b.jsx)(g.f,{config:a,saving:m,saveButton:(0,b.jsxs)(d.f,{onClick:n,disabled:m,className:"flex-1",children:[m&&(0,b.jsx)(c.f,{className:"mr-2 h-4 w-4 animate-spin"}),o.settings?.ai?.save||"Save AI Settings"]})})]})}],151304),a.s(["f",0,function(a,b){if(!(0,u.L)(a.timeZone??u.J))return b.settings.general.invalidTimeZone;if("openai"===a.aiProvider)for(let c of a.openai?.instances||[]){if(!c.name?.trim())return b.settings?.ai?.validationNameRequired||"Instance name is required";if(!c.apiKey?.trim())return b.settings?.ai?.validationApiKeyRequired||"API Key is required";if(!c.baseUrl?.trim())return b.settings?.ai?.validationBaseUrlRequired||"Base URL is required";if(!c.model?.trim())return b.settings?.ai?.validationModelRequired||"Model name is required"}if("azure"===a.aiProvider){if(!a.azure?.endpoint?.trim())return b.settings?.ai?.validationAzureEndpointRequired||"Azure Endpoint is required";if(!a.azure?.deploymentName?.trim())return b.settings?.ai?.validationAzureDeploymentRequired||"Deployment Name is required";if(!a.azure?.apiKey?.trim())return b.settings?.ai?.validationApiKeyRequired||"API Key is required"}return null}],439830)},492710,175592,676330,148463,612416,340898,474896,a=>{var b=a.i(187924),c=a.i(866718),d=a.i(152679),e=a.i(870430),f=a.i(572131),g=a.i(699570),h=a.i(580701),i=a.i(168370),j=a.i(519783),k=a.i(875160),l=a.i(291938),m=a.i(550194),n=a.i(190622),o=a.i(630534);function p({provider:a,apiKey:d,baseUrl:q,currentModel:r,onModelChange:s,docsHref:t}){let{t:u}=(0,m.b)(),[v,w]=(0,f.useState)([]),[x,y]=(0,f.useState)(!1),[z,A]=(0,f.useState)(null),[B,C]=(0,f.useState)(r||""),[D,E]=(0,f.useState)(!1),[F,G]=(0,f.useState)(r);r!==F&&(G(r),C(r||""));let H=async()=>{if(!d)return void A(u.modelSelector?.enterApiKeyFirst||"Please enter API Key first");y(!0),A(null);try{let b=await l.k.post("/api/ai/models",{provider:a,apiKey:d,...q&&{baseUrl:q}});if("error"in b&&"string"==typeof b.error){A(b.error),E(!0),w([]);return}w(b.models),0===b.models.length&&(A(u.modelSelector?.noVisionModel||"No vision model found, please enter manually"),E(!0))}catch(b){o.V.error("[ModelSelector]","Failed to fetch models",{error:b});let a=b instanceof Error&&b.message||u.modelSelector?.fetchFailed||"Failed to fetch models";A(a+(u.modelSelector?.enterManually||", please enter manually")),E(!0)}finally{y(!1)}};return(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(e.f,{className:"flex-1",children:u.modelSelector?.modelName||"Model Name"}),t&&(0,b.jsxs)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground underline",children:[u.settings.ai.docLinks.models,(0,b.jsx)(i.f,{className:"h-3 w-3"})]}),(0,b.jsx)(g.f,{type:"button",variant:"outline",size:"sm",onClick:H,disabled:x||!d,children:x?(0,b.jsx)(k.f,{className:"h-3 w-3 animate-spin"}):(0,b.jsx)(j.f,{className:"h-3 w-3"})})]}),z&&(0,b.jsx)("p",{className:"text-xs text-yellow-600",children:z}),D||0===v.length?(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(c.f,{value:B,onChange:a=>{var b;C(b=a.target.value),s(b)},placeholder:(0,n.j)(a)?n.$[a].model:"openai"===a?"gpt-6.1-sol":"gemini-1.5-flash"}),v.length>0&&(0,b.jsx)(g.f,{type:"button",variant:"link",size:"sm",className:"h-auto p-0 text-xs",onClick:()=>E(!1),children:u.modelSelector?.selectFromList||"Select from List"})]}):(0,b.jsx)("div",{className:"space-y-2",children:(0,b.jsxs)(h.d,{value:r,onValueChange:a=>{"_custom"===a?E(!0):(E(!1),C(a),s(a))},children:[(0,b.jsx)(h.P,{children:(0,b.jsx)(h.U,{placeholder:u.modelSelector?.selectModel||"Select Model"})}),(0,b.jsxs)(h.r,{children:[v.map(a=>(0,b.jsxs)(h.T,{value:a.id,children:[a.name,a.owned_by&&` (${a.owned_by})`]},a.id)),(0,b.jsx)(h.T,{value:"_custom",children:u.modelSelector?.customInput||"Custom Input..."})]})]})})]})}function q({label:a,href:c,linkText:d}){return c?(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)(e.f,{children:a}),(0,b.jsxs)("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground underline",children:[d,(0,b.jsx)(i.f,{className:"h-3 w-3"})]})]}):(0,b.jsx)(e.f,{children:a})}a.s(["f",0,p],175592),a.s(["f",0,q],676330);let r={openai:{intl:"https://platform.openai.com/docs/api-reference",apiKey:"https://platform.openai.com/docs/quickstart",models:"https://platform.openai.com/docs/models"},anthropic:{intl:"https://docs.anthropic.com/en/api/overview",apiKey:"https://docs.anthropic.com/en/api/getting-started",models:"https://docs.anthropic.com/en/docs/about-claude/models/overview"},azure:{intl:"https://learn.microsoft.com/azure/ai-foundry/openai/reference",apiKey:"https://learn.microsoft.com/azure/ai-foundry/openai/how-to/create-resource",models:"https://learn.microsoft.com/azure/ai-foundry/openai/concepts/models"},gemini:{intl:"https://ai.google.dev/gemini-api/docs",apiKey:"https://ai.google.dev/gemini-api/docs/api-key",models:"https://ai.google.dev/gemini-api/docs/models"}};function s(a){return(0,n.j)(a)?n.$[a].docs:r[a]??null}a.s(["f",0,s],148463),a.s(["f",0,function({value:a,onChange:f}){let{t:g}=(0,m.b)(),h=s("anthropic"),i=(b,c)=>f({...a,[b]:c});return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:"API Key",href:h?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(d.f,{value:a?.apiKey||"",onChange:a=>i("apiKey",a.target.value),placeholder:"sk-ant-..."})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:"Base URL (Optional)"}),(0,b.jsx)(c.f,{value:a?.baseUrl||"",onChange:a=>i("baseUrl",a.target.value),placeholder:"https://api.anthropic.com"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:g.settings?.ai?.anthropicBaseUrlHint})]}),(0,b.jsx)(p,{provider:"anthropic",apiKey:a?.apiKey,baseUrl:a?.baseUrl,currentModel:a?.model,onModelChange:a=>i("model",a),docsHref:h?.models})]})}],492710),a.s(["f",0,function({value:a,onChange:f}){let{t:g}=(0,m.b)(),h=s("azure"),i=(b,c)=>f({...a,[b]:c}),j=a=>a?.trim()?"":"border-destructive";return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)(e.f,{children:[g.settings?.ai?.azureEndpoint||"Azure Endpoint"," ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,b.jsx)(c.f,{value:a?.endpoint||"",onChange:a=>i("endpoint",a.target.value),placeholder:g.settings?.ai?.azureEndpointPlaceholder||"https://your-resource.openai.azure.com",className:j(a?.endpoint)})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:(0,b.jsxs)(b.Fragment,{children:[g.settings?.ai?.azureDeployment||"Deployment Name"," ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),href:h?.models,linkText:g.settings.ai.docLinks.models}),(0,b.jsx)(c.f,{value:a?.deploymentName||"",onChange:a=>i("deploymentName",a.target.value),placeholder:g.settings?.ai?.azureDeploymentPlaceholder||"gpt-4o-deployment",className:j(a?.deploymentName)})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:(0,b.jsxs)(b.Fragment,{children:["API Key ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),href:h?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(d.f,{value:a?.apiKey||"",onChange:a=>i("apiKey",a.target.value),placeholder:"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",className:j(a?.apiKey)})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:g.settings?.ai?.azureApiVersion||"API Version"}),(0,b.jsx)(c.f,{value:a?.apiVersion||"",onChange:a=>i("apiVersion",a.target.value),placeholder:g.settings?.ai?.azureApiVersionPlaceholder||"2024-02-15-preview"})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:g.settings?.ai?.azureModel||"Model Display Name"}),(0,b.jsx)(c.f,{value:a?.model||"",onChange:a=>i("model",a.target.value),placeholder:"gpt-4o"})]})]})}],612416),a.s(["f",0,function({value:a,onChange:f}){let{t:g}=(0,m.b)(),h=s("gemini"),i=(b,c)=>f({...a,[b]:c});return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:"API Key",href:h?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(d.f,{value:a?.apiKey||"",onChange:a=>i("apiKey",a.target.value),placeholder:"AIza..."})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:"Base URL (Optional)"}),(0,b.jsx)(c.f,{value:a?.baseUrl||"",onChange:a=>i("baseUrl",a.target.value),placeholder:"https://generativelanguage.googleapis.com"})]}),(0,b.jsx)(p,{provider:"gemini",apiKey:a?.apiKey,baseUrl:a?.baseUrl,currentModel:a?.model,onModelChange:a=>i("model",a),docsHref:h?.models})]})}],340898);var t=a.i(164831);let u={name:"log-in",size:24,node:[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]]};u.node;let v=(0,t.f)(u);a.s(["f",0,v],474896)},152679,a=>{var b=a.i(187924),c=a.i(572131),d=a.i(755681),e=a.i(777064),f=a.i(699570),g=a.i(866718),h=a.i(550194),i=a.i(368114);a.s(["f",0,function({className:a,...j}){let{t:k}=(0,h.b)(),[l,m]=(0,c.useState)(!1);return(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(g.f,{type:l?"text":"password",className:(0,i.f)("pr-10",a),...j}),(0,b.jsx)(f.f,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",onClick:()=>m(!l),"aria-label":l?k.common.hidePassword:k.common.showPassword,tabIndex:-1,children:l?(0,b.jsx)(e.f,{className:"h-4 w-4 text-muted-foreground"}):(0,b.jsx)(d.f,{className:"h-4 w-4 text-muted-foreground"})})]})}])}]})();
2
2
 
3
3
  //# sourceMappingURL=_0cmd1ubdlo_by._.js.map
@@ -1,3 +1,3 @@
1
1
  (()=>{"use strict";module.exports=[118688,a=>{var b=a.i(164831);let c={name:"book-open",size:24,node:[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],118688)},589027,113608,a=>{var b=a.i(164831);let c={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],589027);let e={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};e.node;let f=(0,b.f)(e);a.s(["f",0,f],113608)},79362,a=>{var b=a.i(164831);let c={name:"circle-check-big",size:24,node:[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],aliases:["check-circle"]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],79362)},211134,a=>{var b=a.i(164831);let c={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],211134)},755681,a=>{var b=a.i(164831);let c={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],755681)},519783,a=>{var b=a.i(164831);let c={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],519783)},951675,a=>{var b=a.i(164831);let c={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],951675)},474215,a=>{var b=a.i(164831);let c={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};c.node;let d=(0,b.f)(c);a.s(["X",0,d],474215)},786304,a=>{var b=a.i(187924),c=a.i(811011),d=a.i(400187),e=a.i(368114);let f=(0,d.f)("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});a.s(["f",0,function({className:a,variant:d,asChild:g=!1,...h}){let i=g?c.M:"span";return(0,b.jsx)(i,{"data-slot":"badge",className:(0,e.f)(f({variant:d}),a),...h})}])},529759,a=>{var b=a.i(187924),c=a.i(572131),d=a.i(986705);let e=(0,c.createContext)({timeZone:d.J,setTimeZone:()=>void 0});a.s(["n",0,function({children:a,initialTimeZone:f=d.J}){let[g,h]=(0,c.useState)(f);return(0,b.jsx)(e.Provider,{value:{timeZone:g,setTimeZone:h},children:a})},"M",0,function(){return(0,c.useContext)(e)}])},481132,a=>{var b=a.i(572131),c=a.i(291938),d=a.i(630534);let e=null,f=0,g=new Set;a.s(["f",0,function(){let[a,h]=(0,b.useState)(e??[]),[i,j]=(0,b.useState)(!e),[k,l]=(0,b.useState)(null),m=(0,b.useCallback)(async(a=!1)=>{let b=Date.now();if(!a&&e&&b-f<3e4){h(e),j(!1);return}try{j(!0);let a=await c.k.get("/api/paper-groups");e=a,f=b,g.forEach(b=>b(a)),l(null)}catch(a){d.V.error("[usePaperGroups]","Failed to fetch paper groups",{error:a}),l("Failed to load paper groups")}finally{j(!1)}},[]);return(0,b.useEffect)(()=>(g.add(h),m(),()=>{g.delete(h)}),[m]),{groups:a,loading:i,error:k,refetch:(0,b.useCallback)(()=>(e=null,f=0,m(!0)),[m])}}])}]})();
2
2
 
3
- //# sourceMappingURL=_05gdkgyyr0suj._.js.map
3
+ //# sourceMappingURL=_0fp_p60hb9ex8._.js.map