texlite 0.22.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/DESIGN.md +5 -0
  2. package/OPERATIONS.md +21 -1
  3. package/README.md +1 -0
  4. package/README.zh-CN.md +1 -0
  5. package/addon.md +76 -0
  6. package/dist/client/assets/{AdminUsers-DepqkT6m.js → AdminUsers-xuVuiwoh.js} +1 -1
  7. package/dist/client/assets/AdminUsers-xuVuiwoh.js.br +0 -0
  8. package/dist/client/assets/AdminUsers-xuVuiwoh.js.gz +0 -0
  9. package/dist/client/assets/{AgentIcon-DeoZDwgh.css → AgentIcon-DJGGRJnV.css} +1 -1
  10. package/dist/client/assets/AgentIcon-DJGGRJnV.css.br +0 -0
  11. package/dist/client/assets/AgentIcon-DJGGRJnV.css.gz +0 -0
  12. package/dist/client/assets/{AgentManagement-DlV6tHez.js → AgentManagement-D-0hrv6f.js} +1 -1
  13. package/dist/client/assets/AgentManagement-D-0hrv6f.js.br +0 -0
  14. package/dist/client/assets/AgentManagement-D-0hrv6f.js.gz +0 -0
  15. package/dist/client/assets/AgentTerminal-DZo-22RN.js +2 -0
  16. package/dist/client/assets/AgentTerminal-DZo-22RN.js.br +0 -0
  17. package/dist/client/assets/AgentTerminal-DZo-22RN.js.gz +0 -0
  18. package/dist/client/assets/AgentTerminalSurface-CcC17_CY.js +16 -0
  19. package/dist/client/assets/AgentTerminalSurface-CcC17_CY.js.br +0 -0
  20. package/dist/client/assets/AgentTerminalSurface-CcC17_CY.js.gz +0 -0
  21. package/dist/client/assets/{AvatarSettingsDialog-C8WQhZBK.js → AvatarSettingsDialog-ChKrdDqp.js} +1 -1
  22. package/dist/client/assets/AvatarSettingsDialog-ChKrdDqp.js.br +0 -0
  23. package/dist/client/assets/AvatarSettingsDialog-ChKrdDqp.js.gz +0 -0
  24. package/dist/client/assets/{CitationBibtexEditor-SpudGDwi.js → CitationBibtexEditor-BZIU4Lif.js} +1 -1
  25. package/dist/client/assets/{CitationLibraryDialog-DgOIkLwK.js → CitationLibraryDialog-DqO9e0GV.js} +3 -3
  26. package/dist/client/assets/CitationLibraryDialog-DqO9e0GV.js.br +0 -0
  27. package/dist/client/assets/CitationLibraryDialog-DqO9e0GV.js.gz +0 -0
  28. package/dist/client/assets/{Dashboard-CD1w42mA.js → Dashboard-BYgqCgBM.js} +3 -3
  29. package/dist/client/assets/Dashboard-BYgqCgBM.js.br +0 -0
  30. package/dist/client/assets/Dashboard-BYgqCgBM.js.gz +0 -0
  31. package/dist/client/assets/{GitDialog-DGzZ3GRj.js → GitDialog-CA68baSd.js} +1 -1
  32. package/dist/client/assets/GitDialog-CA68baSd.js.br +0 -0
  33. package/dist/client/assets/GitDialog-CA68baSd.js.gz +0 -0
  34. package/dist/client/assets/{GitHubAccountDialog-CGZl3mcY.js → GitHubAccountDialog-CnxfR0JD.js} +1 -1
  35. package/dist/client/assets/GitHubAccountDialog-CnxfR0JD.js.br +0 -0
  36. package/dist/client/assets/GitHubAccountDialog-CnxfR0JD.js.gz +0 -0
  37. package/dist/client/assets/{HistoryDialog-DTZxCgyT.js → HistoryDialog-c2EEaFsl.js} +1 -1
  38. package/dist/client/assets/HistoryDialog-c2EEaFsl.js.br +0 -0
  39. package/dist/client/assets/HistoryDialog-c2EEaFsl.js.gz +0 -0
  40. package/dist/client/assets/{InfoPopover-Ba7GvcuW.js → InfoPopover-BJYnFn1P.js} +1 -1
  41. package/dist/client/assets/{LatexEditor-Boc-45KL.js → LatexEditor-vNOVTIl7.js} +1 -1
  42. package/dist/client/assets/LatexEditor-vNOVTIl7.js.br +0 -0
  43. package/dist/client/assets/LatexEditor-vNOVTIl7.js.gz +0 -0
  44. package/dist/client/assets/{MarkdownPreview-BH2iwvle.js → MarkdownPreview-BJPqGTcw.js} +1 -1
  45. package/dist/client/assets/MarkdownPreview-BJPqGTcw.js.br +0 -0
  46. package/dist/client/assets/MarkdownPreview-BJPqGTcw.js.gz +0 -0
  47. package/dist/client/assets/{ProjectIconPickerDialog-Bfkaxcnh.js → ProjectIconPickerDialog-ChiEUQ0g.js} +1 -1
  48. package/dist/client/assets/ProjectIconPickerDialog-ChiEUQ0g.js.br +0 -0
  49. package/dist/client/assets/ProjectIconPickerDialog-ChiEUQ0g.js.gz +0 -0
  50. package/dist/client/assets/{ProjectSearchDialog-DPIzxVYj.js → ProjectSearchDialog-DxgjbnmY.js} +1 -1
  51. package/dist/client/assets/ProjectSearchDialog-DxgjbnmY.js.br +0 -0
  52. package/dist/client/assets/ProjectSearchDialog-DxgjbnmY.js.gz +0 -0
  53. package/dist/client/assets/{ProjectSettings-ChXx_cmP.js → ProjectSettings-BwQTbXhh.js} +1 -1
  54. package/dist/client/assets/ProjectSettings-BwQTbXhh.js.br +0 -0
  55. package/dist/client/assets/ProjectSettings-BwQTbXhh.js.gz +0 -0
  56. package/dist/client/assets/ProjectWorkspace-C2QAb-Fc.js +25 -0
  57. package/dist/client/assets/ProjectWorkspace-C2QAb-Fc.js.br +0 -0
  58. package/dist/client/assets/ProjectWorkspace-C2QAb-Fc.js.gz +0 -0
  59. package/dist/client/assets/{QuickOpenDialog-CHjPlBu2.js → QuickOpenDialog-B7NTqOpu.js} +1 -1
  60. package/dist/client/assets/QuickOpenDialog-B7NTqOpu.js.br +0 -0
  61. package/dist/client/assets/QuickOpenDialog-B7NTqOpu.js.gz +0 -0
  62. package/dist/client/assets/{ReadOnlySource-DKcmDg0e.js → ReadOnlySource-DIalHHvP.js} +1 -1
  63. package/dist/client/assets/{SelectionHistoryDialog-Dnj22E8N.js → SelectionHistoryDialog-BhOyneNx.js} +1 -1
  64. package/dist/client/assets/SelectionHistoryDialog-BhOyneNx.js.br +0 -0
  65. package/dist/client/assets/SelectionHistoryDialog-BhOyneNx.js.gz +0 -0
  66. package/dist/client/assets/{SharedProjectPage-l8GSYTm-.js → SharedProjectPage-s-khOyvB.js} +2 -2
  67. package/dist/client/assets/SharedProjectPage-s-khOyvB.js.br +0 -0
  68. package/dist/client/assets/SharedProjectPage-s-khOyvB.js.gz +0 -0
  69. package/dist/client/assets/{SystemMetricsDialog-DkmBA4o4.js → SystemMetricsDialog-Bycm88U1.js} +1 -1
  70. package/dist/client/assets/SystemMetricsDialog-Bycm88U1.js.br +0 -0
  71. package/dist/client/assets/SystemMetricsDialog-Bycm88U1.js.gz +0 -0
  72. package/dist/client/assets/{TagManagementDialog-BM1MRuwh.js → TagManagementDialog-DwUAA8uC.js} +1 -1
  73. package/dist/client/assets/TagManagementDialog-DwUAA8uC.js.br +0 -0
  74. package/dist/client/assets/TagManagementDialog-DwUAA8uC.js.gz +0 -0
  75. package/dist/client/assets/{ThemeSwitcher-dcvtWVCO.js → ThemeSwitcher-RSqZi7kx.js} +1 -1
  76. package/dist/client/assets/TikzGalleryDialog-Bqzl2256.css +1 -0
  77. package/dist/client/assets/TikzGalleryDialog-Bqzl2256.css.br +0 -0
  78. package/dist/client/assets/TikzGalleryDialog-Bqzl2256.css.gz +0 -0
  79. package/dist/client/assets/TikzGalleryDialog-CLAmKmS6.js +1 -0
  80. package/dist/client/assets/TikzGalleryDialog-CLAmKmS6.js.br +0 -0
  81. package/dist/client/assets/TikzGalleryDialog-CLAmKmS6.js.gz +0 -0
  82. package/dist/client/assets/WordCountDialog-ByxE-RUs.js +1 -0
  83. package/dist/client/assets/WordCountDialog-ByxE-RUs.js.br +0 -0
  84. package/dist/client/assets/WordCountDialog-ByxE-RUs.js.gz +0 -0
  85. package/dist/client/assets/{chktex-BrzPYHey.js → chktex-22lKGvKa.js} +1 -1
  86. package/dist/client/assets/{i18n-Dtn6w-qA.js → i18n-Wn96VbWM.js} +4 -4
  87. package/dist/client/assets/i18n-Wn96VbWM.js.br +0 -0
  88. package/dist/client/assets/i18n-Wn96VbWM.js.gz +0 -0
  89. package/dist/client/assets/{index-CPR6YZEf.js → index-CemLYDYL.js} +2 -2
  90. package/dist/client/assets/index-CemLYDYL.js.br +0 -0
  91. package/dist/client/assets/index-CemLYDYL.js.gz +0 -0
  92. package/dist/client/assets/index-DSF5eT29.css +1 -0
  93. package/dist/client/assets/index-DSF5eT29.css.br +0 -0
  94. package/dist/client/assets/index-DSF5eT29.css.gz +0 -0
  95. package/dist/client/assets/{relativeTime-mmWGtWRR.js → relativeTime-C-GTw3lA.js} +1 -1
  96. package/dist/client/assets/relativeTime-C-GTw3lA.js.br +0 -0
  97. package/dist/client/assets/relativeTime-C-GTw3lA.js.gz +0 -0
  98. package/dist/client/assets/sourceCursorStore-Dpoi7PAL.js +1 -0
  99. package/dist/client/assets/sourceCursorStore-Dpoi7PAL.js.br +0 -0
  100. package/dist/client/assets/sourceCursorStore-Dpoi7PAL.js.gz +0 -0
  101. package/dist/client/assets/{spellCheck-BTyLQAFH.js → spellCheck-kxvnxrvw.js} +1 -1
  102. package/dist/client/assets/spellCheck-kxvnxrvw.js.br +0 -0
  103. package/dist/client/assets/spellCheck-kxvnxrvw.js.gz +0 -0
  104. package/dist/client/assets/{useDeletionTransitions-Ba_yhkrl.js → useDeletionTransitions-Xlq7HabP.js} +1 -1
  105. package/dist/client/assets/useDeletionTransitions-Xlq7HabP.js.br +0 -0
  106. package/dist/client/assets/useDeletionTransitions-Xlq7HabP.js.gz +0 -0
  107. package/dist/client/index.html +3 -3
  108. package/dist/server/agents/workspaces.js +14 -1
  109. package/dist/server/app.js +2 -0
  110. package/dist/server/cli.js +12 -1
  111. package/dist/server/config.js +10 -0
  112. package/dist/server/i18n.js +6 -0
  113. package/dist/server/locales/zh-Hant.js +3 -0
  114. package/dist/server/routes/compile.js +56 -4
  115. package/dist/server/routes/system.js +1 -0
  116. package/dist/server/routes/tikzGallery.js +38 -0
  117. package/dist/server/tikzEditorAddon.js +115 -0
  118. package/dist/server/tikzEditorRelease.js +9 -0
  119. package/dist/server/tikzGallery.js +63 -0
  120. package/dist/shared/tikzStandalone.js +15 -0
  121. package/package.json +2 -1
  122. package/templates/agents/AGENTS.md +12 -0
  123. package/texlite.config.example.json +4 -0
  124. package/dist/client/assets/AdminUsers-DepqkT6m.js.br +0 -0
  125. package/dist/client/assets/AdminUsers-DepqkT6m.js.gz +0 -0
  126. package/dist/client/assets/AgentIcon-DeoZDwgh.css.br +0 -0
  127. package/dist/client/assets/AgentIcon-DeoZDwgh.css.gz +0 -0
  128. package/dist/client/assets/AgentManagement-DlV6tHez.js.br +0 -0
  129. package/dist/client/assets/AgentManagement-DlV6tHez.js.gz +0 -0
  130. package/dist/client/assets/AgentTerminal-CvOz5X_j.js +0 -2
  131. package/dist/client/assets/AgentTerminal-CvOz5X_j.js.br +0 -0
  132. package/dist/client/assets/AgentTerminal-CvOz5X_j.js.gz +0 -0
  133. package/dist/client/assets/AgentTerminalSurface-COqg_GdK.js +0 -16
  134. package/dist/client/assets/AgentTerminalSurface-COqg_GdK.js.br +0 -0
  135. package/dist/client/assets/AgentTerminalSurface-COqg_GdK.js.gz +0 -0
  136. package/dist/client/assets/AvatarSettingsDialog-C8WQhZBK.js.br +0 -0
  137. package/dist/client/assets/AvatarSettingsDialog-C8WQhZBK.js.gz +0 -0
  138. package/dist/client/assets/CitationLibraryDialog-DgOIkLwK.js.br +0 -0
  139. package/dist/client/assets/CitationLibraryDialog-DgOIkLwK.js.gz +0 -0
  140. package/dist/client/assets/Dashboard-CD1w42mA.js.br +0 -0
  141. package/dist/client/assets/Dashboard-CD1w42mA.js.gz +0 -0
  142. package/dist/client/assets/GitDialog-DGzZ3GRj.js.br +0 -0
  143. package/dist/client/assets/GitDialog-DGzZ3GRj.js.gz +0 -0
  144. package/dist/client/assets/GitHubAccountDialog-CGZl3mcY.js.br +0 -0
  145. package/dist/client/assets/GitHubAccountDialog-CGZl3mcY.js.gz +0 -0
  146. package/dist/client/assets/HistoryDialog-DTZxCgyT.js.br +0 -0
  147. package/dist/client/assets/HistoryDialog-DTZxCgyT.js.gz +0 -0
  148. package/dist/client/assets/LatexEditor-Boc-45KL.js.br +0 -0
  149. package/dist/client/assets/LatexEditor-Boc-45KL.js.gz +0 -0
  150. package/dist/client/assets/MarkdownPreview-BH2iwvle.js.br +0 -0
  151. package/dist/client/assets/MarkdownPreview-BH2iwvle.js.gz +0 -0
  152. package/dist/client/assets/ProjectIconPickerDialog-Bfkaxcnh.js.br +0 -0
  153. package/dist/client/assets/ProjectIconPickerDialog-Bfkaxcnh.js.gz +0 -0
  154. package/dist/client/assets/ProjectSearchDialog-DPIzxVYj.js.br +0 -0
  155. package/dist/client/assets/ProjectSearchDialog-DPIzxVYj.js.gz +0 -0
  156. package/dist/client/assets/ProjectSettings-ChXx_cmP.js.br +0 -0
  157. package/dist/client/assets/ProjectSettings-ChXx_cmP.js.gz +0 -0
  158. package/dist/client/assets/ProjectWorkspace-B-w2ix8N.js +0 -25
  159. package/dist/client/assets/ProjectWorkspace-B-w2ix8N.js.br +0 -0
  160. package/dist/client/assets/ProjectWorkspace-B-w2ix8N.js.gz +0 -0
  161. package/dist/client/assets/QuickOpenDialog-CHjPlBu2.js.br +0 -0
  162. package/dist/client/assets/QuickOpenDialog-CHjPlBu2.js.gz +0 -0
  163. package/dist/client/assets/SelectionHistoryDialog-Dnj22E8N.js.br +0 -0
  164. package/dist/client/assets/SelectionHistoryDialog-Dnj22E8N.js.gz +0 -0
  165. package/dist/client/assets/SharedProjectPage-l8GSYTm-.js.br +0 -0
  166. package/dist/client/assets/SharedProjectPage-l8GSYTm-.js.gz +0 -0
  167. package/dist/client/assets/SystemMetricsDialog-DkmBA4o4.js.br +0 -0
  168. package/dist/client/assets/SystemMetricsDialog-DkmBA4o4.js.gz +0 -0
  169. package/dist/client/assets/TagManagementDialog-BM1MRuwh.js.br +0 -0
  170. package/dist/client/assets/TagManagementDialog-BM1MRuwh.js.gz +0 -0
  171. package/dist/client/assets/WordCountDialog-DI0Jv-fg.js +0 -1
  172. package/dist/client/assets/WordCountDialog-DI0Jv-fg.js.br +0 -0
  173. package/dist/client/assets/WordCountDialog-DI0Jv-fg.js.gz +0 -0
  174. package/dist/client/assets/i18n-Dtn6w-qA.js.br +0 -0
  175. package/dist/client/assets/i18n-Dtn6w-qA.js.gz +0 -0
  176. package/dist/client/assets/index-BbU2fbRw.css +0 -1
  177. package/dist/client/assets/index-BbU2fbRw.css.br +0 -0
  178. package/dist/client/assets/index-BbU2fbRw.css.gz +0 -0
  179. package/dist/client/assets/index-CPR6YZEf.js.br +0 -0
  180. package/dist/client/assets/index-CPR6YZEf.js.gz +0 -0
  181. package/dist/client/assets/relativeTime-mmWGtWRR.js.br +0 -0
  182. package/dist/client/assets/relativeTime-mmWGtWRR.js.gz +0 -0
  183. package/dist/client/assets/sourceCursorStore-BVDvDKeP.js +0 -1
  184. package/dist/client/assets/sourceCursorStore-BVDvDKeP.js.br +0 -0
  185. package/dist/client/assets/sourceCursorStore-BVDvDKeP.js.gz +0 -0
  186. package/dist/client/assets/spellCheck-BTyLQAFH.js.br +0 -0
  187. package/dist/client/assets/spellCheck-BTyLQAFH.js.gz +0 -0
  188. package/dist/client/assets/useDeletionTransitions-Ba_yhkrl.js.br +0 -0
  189. package/dist/client/assets/useDeletionTransitions-Ba_yhkrl.js.gz +0 -0
  190. /package/dist/client/assets/{AgentIcon-CA-PfOka.js → AgentIcon-qmglBc3M.js} +0 -0
  191. /package/dist/client/assets/{AgentIcon-CA-PfOka.js.br → AgentIcon-qmglBc3M.js.br} +0 -0
  192. /package/dist/client/assets/{AgentIcon-CA-PfOka.js.gz → AgentIcon-qmglBc3M.js.gz} +0 -0
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./AvatarSettingsDialog-C8WQhZBK.js","./rolldown-runtime-XKyaHtl9.js","./react-DUEFWlB7.js","./useTranslation-DwkoADSz.js","./i18nInstance-CIMFwH0l.js","./useDeletionTransitions-Ba_yhkrl.js","./basePath-B5-c90eh.js","./createLucideIcon-CDYIzuiB.js","./dist-B_WjsTVV.js","./es2015-D2UDOM09.js","./index-CPR6YZEf.js","./i18n-Dtn6w-qA.js","./vite-runtime-CRzLMJPS.js","./loader-circle-DKGyi5EK.js","./dist-DdUqlCPw.js","./index-BbU2fbRw.css","./check-Dw16EqG-.js","./SaveButton-wiTpGLho.js","./circle-check-CunlnBPw.js","./search-DjOWqLig.js","./SystemMetricsDialog-DkmBA4o4.js","./clock-3-DztJubz_.js","./InfoPopover-Ba7GvcuW.js","./refresh-cw-IqExWG6S.js","./CitationLibraryDialog-DgOIkLwK.js","./relativeTime-mmWGtWRR.js","./chevron-up-BHaMUEEA.js","./TagMarquee-BLmCTTCt.js","./library-big-B8e_Fiql.js","./plus-Cei21TlT.js","./dist-C9O-A_C4.js","./latexScanner-D9bMX44Y.js","./citationAuthors-BWHXhKvT.js","./bibtexNames-CPGbBJxd.js","./citationLibrary-DxGdbZEQ.js","./generatedParser-CZa2vsK6.js","./editor-CkUEg2La.js","./bibtexReferences-xpSF8IXH.js","./SuccessNotice-ubBtzzi_.js","./TagColorSelect-e-Tq5V3H.js","./AdminUsers-DepqkT6m.js","./lock-keyhole-aC_QjKDi.js","./user-plus-NNBQOWDP.js","./AgentManagement-DlV6tHez.js","./arrow-down-C_4f1E-E.js","./AgentIcon-CA-PfOka.js","./AgentIcon-DeoZDwgh.css","./TagManagementDialog-BM1MRuwh.js","./ProjectIconPickerDialog-Bfkaxcnh.js","./GitHubAccountDialog-CGZl3mcY.js","./GitHubIcon-CExJn0AV.js"])))=>i.map(i=>d[i]);
2
- import{n as e,r as t}from"./rolldown-runtime-XKyaHtl9.js";import{i as n,t as r}from"./react-DUEFWlB7.js";import{_ as i,b as a,g as o,h as s,i as c,m as l,n as u,p as d,t as f,u as p,v as m,x as h,y as ee}from"./relativeTime-mmWGtWRR.js";import{t as g}from"./useTranslation-DwkoADSz.js";import{r as _,t as te}from"./i18n-Dtn6w-qA.js";import{r as v,t as ne}from"./basePath-B5-c90eh.js";import{t as y}from"./vite-runtime-CRzLMJPS.js";import{t as b}from"./createLucideIcon-CDYIzuiB.js";import{A as re,B as ie,C as ae,D as oe,E as se,F as x,H as ce,I as le,L as S,M as ue,N as de,O as fe,P as C,R as pe,S as me,T as he,U as ge,V as _e,_ as ve,b as ye,c as be,d as xe,j as w,k as T,m as Se,n as Ce,t as we,u as Te,v as Ee,w as De,x as Oe,z as ke}from"./useDeletionTransitions-Ba_yhkrl.js";import{t as Ae}from"./bot-ClmnQ29j.js";import{o as E}from"./dist-B_WjsTVV.js";import{n as je,r as D,t as Me}from"./GitHubIcon-CExJn0AV.js";import{i as O,n as Ne,r as Pe,t as k}from"./TagMarquee-BLmCTTCt.js";import{t as Fe}from"./hard-drive-CXlummIE.js";import{n as Ie,t as Le}from"./ThemeSwitcher-dcvtWVCO.js";import{t as Re}from"./loader-circle-DKGyi5EK.js";import{t as ze}from"./palette-8_-Y5XON.js";import{n as Be,t as Ve}from"./terminal-DD9WJ56e.js";import{E as He,T as Ue,_ as We,a as Ge,d as A,f as Ke,g as j,h as qe,l as Je,p as Ye,v as Xe,w as M,y as N}from"./index-CPR6YZEf.js";var Ze={name:`activity`,size:24,node:[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]};Ze.node;var Qe=b(Ze),$e={name:`archive-restore`,size:24,node:[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h2`,key:`tvwodi`}],[`path`,{d:`M20 8v11a2 2 0 0 1-2 2h-2`,key:`1gkqxj`}],[`path`,{d:`m9 15 3-3 3 3`,key:`1pd0qc`}],[`path`,{d:`M12 12v9`,key:`192myk`}]]};$e.node;var et=b($e),tt={name:`archive`,size:24,node:[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]};tt.node;var nt=b(tt),rt={name:`arrow-down-up`,size:24,node:[[`path`,{d:`m3 16 4 4 4-4`,key:`1co6wj`}],[`path`,{d:`M7 20V4`,key:`1yoxec`}],[`path`,{d:`m21 8-4-4-4 4`,key:`1c9v7m`}],[`path`,{d:`M17 4v16`,key:`7dpous`}]]};rt.node;var it=b(rt),P={name:`arrow-right-left`,size:24,node:[[`path`,{d:`m16 3 4 4-4 4`,key:`1x1c3m`}],[`path`,{d:`M20 7H4`,key:`zbl0bi`}],[`path`,{d:`m8 21-4-4 4-4`,key:`h9nckh`}],[`path`,{d:`M4 17h16`,key:`g4d7ey`}]]};P.node;var at=b(P),ot={name:`atom`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`path`,{d:`M20.2 20.2c2.04-2.03.02-7.36-4.5-11.9-4.54-4.52-9.87-6.54-11.9-4.5-2.04 2.03-.02 7.36 4.5 11.9 4.54 4.52 9.87 6.54 11.9 4.5Z`,key:`1l2ple`}],[`path`,{d:`M15.7 15.7c4.52-4.54 6.54-9.87 4.5-11.9-2.03-2.04-7.36-.02-11.9 4.5-4.52 4.54-6.54 9.87-4.5 11.9 2.03 2.04 7.36.02 11.9-4.5Z`,key:`1wam0m`}]]};ot.node;var st=b(ot),F={name:`beaker`,size:24,node:[[`path`,{d:`M4.5 3h15`,key:`c7n0jr`}],[`path`,{d:`M6 3v16a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V3`,key:`m1uhx7`}],[`path`,{d:`M6 14h12`,key:`4cwo0f`}]]};F.node;var ct=b(F),lt={name:`bell-off`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]};lt.node;var ut=b(lt),dt={name:`bookmark`,size:24,node:[[`path`,{d:`M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z`,key:`oz39mx`}]]};dt.node;var ft=b(dt),pt={name:`braces`,size:24,node:[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]],aliases:[`curly-braces`]};pt.node;var I=b(pt),mt={name:`brain-circuit`,size:24,node:[[`path`,{d:`M12 13h4`,key:`1ku699`}],[`path`,{d:`M12 18h6a2 2 0 012 2v1`,key:`6s3bw4`}],[`path`,{d:`M12 8h8`,key:`1lhi5i`}],[`path`,{d:`M12 9a4.17 4.17 0 01-3 4`,key:`13l7kh`}],[`path`,{d:`M16 8V5a2 2 0 012-2`,key:`gais5y`}],[`path`,{d:`M6 18a4 4 0 01-2-7.465`,key:`1y2m15`}],[`path`,{d:`M6.004 5.125a4 4 0 00-2.526 5.77`,key:`3cw1ss`}],[`path`,{d:`M6.294 6.294A3 3 0 1112 5v13a4 4 0 11-7.967-.518`,key:`m2z1wm`}],[`circle`,{cx:`16`,cy:`13`,r:`0.5`,fill:`currentColor`,key:`9zzywh`}],[`circle`,{cx:`18`,cy:`3`,r:`0.5`,fill:`currentColor`,key:`i2xui6`}],[`circle`,{cx:`20`,cy:`21`,r:`0.5`,fill:`currentColor`,key:`1dobdp`}],[`circle`,{cx:`20`,cy:`8`,r:`0.5`,fill:`currentColor`,key:`r9nqlq`}]]};mt.node;var L=b(mt),ht={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 01-3-4 4.17 4.17 0 01-3 4`,key:`5nuw1p`}],[`path`,{d:`M17.707 6.294A3 3 0 1012 5a3 3 0 10-5.707 1.294`,key:`18ldcf`}],[`path`,{d:`M17.996 5.125a4 4 0 012.526 5.77`,key:`1sdu8q`}],[`path`,{d:`M18 18a4 4 0 002-7.465`,key:`7xqqvr`}],[`path`,{d:`M19.967 17.482a4 4 0 11-7.967.517 4 4 0 11-7.967-.517`,key:`t46ysz`}],[`path`,{d:`M6 18a4 4 0 01-2-7.465`,key:`1y2m15`}],[`path`,{d:`M6.004 5.125a4 4 0 00-2.526 5.77`,key:`3cw1ss`}]]};ht.node;var R=b(ht),gt={name:`calculator`,size:24,node:[[`rect`,{width:`16`,height:`20`,x:`4`,y:`2`,rx:`2`,key:`1nb95v`}],[`line`,{x1:`8`,x2:`16`,y1:`6`,y2:`6`,key:`x4nwl0`}],[`line`,{x1:`16`,x2:`16`,y1:`14`,y2:`18`,key:`wjye3r`}],[`path`,{d:`M16 10h.01`,key:`1m94wz`}],[`path`,{d:`M12 10h.01`,key:`1nrarc`}],[`path`,{d:`M8 10h.01`,key:`19clt8`}],[`path`,{d:`M12 14h.01`,key:`1etili`}],[`path`,{d:`M8 14h.01`,key:`6423bh`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}],[`path`,{d:`M8 18h.01`,key:`lrp35t`}]]};gt.node;var _t=b(gt),vt={name:`calendar-days`,size:24,node:[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M8 13h.01`,key:`1sbv64`}],[`path`,{d:`M12 13h.01`,key:`y0uutt`}],[`path`,{d:`M16 13h.01`,key:`wip0gl`}],[`path`,{d:`M8 17h.01`,key:`p3bg7i`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M16 17h.01`,key:`ql8jdd`}]]};vt.node;var yt=b(vt),bt={name:`chart-column`,size:24,node:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]],aliases:[`bar-chart-3`]};bt.node;var z=b(bt),B={name:`chart-line`,size:24,node:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`m19 9-5 5-4-4-3 3`,key:`2osh9i`}]],aliases:[`line-chart`]};B.node;var xt=b(B),St={name:`chart-no-axes-combined`,size:24,node:[[`path`,{d:`M12 16v5`,key:`zza2cw`}],[`path`,{d:`M16 14.639V21`,key:`1s85h0`}],[`path`,{d:`M20 10.656V21`,key:`q45596`}],[`path`,{d:`m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15`,key:`1fw8x9`}],[`path`,{d:`M4 18.463V21`,key:`1otddq`}],[`path`,{d:`M8 14.656V21`,key:`1t2idw`}]]};St.node;var Ct=b(St),V={name:`chart-pie`,size:24,node:[[`path`,{d:`M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z`,key:`pzmjnu`}],[`path`,{d:`M21.21 15.89A10 10 0 1 1 8 2.83`,key:`k2fpak`}]],aliases:[`pie-chart`]};V.node;var wt=b(V),Tt={name:`chart-scatter`,size:24,node:[[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}],[`circle`,{cx:`18.5`,cy:`5.5`,r:`.5`,fill:`currentColor`,key:`lysivs`}],[`circle`,{cx:`11.5`,cy:`11.5`,r:`.5`,fill:`currentColor`,key:`byv1b8`}],[`circle`,{cx:`7.5`,cy:`16.5`,r:`.5`,fill:`currentColor`,key:`nkw3mc`}],[`circle`,{cx:`17.5`,cy:`14.5`,r:`.5`,fill:`currentColor`,key:`1gjh6j`}],[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}]],aliases:[`scatter-chart`]};Tt.node;var H=b(Tt),Et={name:`circle-arrow-up`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 12-4-4-4 4`,key:`177agl`}],[`path`,{d:`M12 16V8`,key:`1sbj14`}]],aliases:[`arrow-up-circle`]};Et.node;var Dt=b(Et),Ot={name:`circuit-board`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M11 9h4a2 2 0 0 0 2-2V3`,key:`1ve2rv`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`M7 21v-4a2 2 0 0 1 2-2h4`,key:`1fwkro`}],[`circle`,{cx:`15`,cy:`15`,r:`2`,key:`3i40o0`}]]};Ot.node;var kt=b(Ot),U={name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]};U.node;var At=b(U),jt={name:`cloud`,size:24,node:[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]};jt.node;var Mt=b(jt),Nt={name:`cpu`,size:24,node:[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]};Nt.node;var Pt=b(Nt),Ft={name:`database`,size:24,node:[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]};Ft.node;var It=b(Ft),Lt={name:`dna`,size:24,node:[[`path`,{d:`m10 16 1.5 1.5`,key:`11lckj`}],[`path`,{d:`m14 8-1.5-1.5`,key:`1ohn8i`}],[`path`,{d:`M15 2c-1.798 1.998-2.518 3.995-2.807 5.993`,key:`80uv8i`}],[`path`,{d:`m16.5 10.5 1 1`,key:`696xn5`}],[`path`,{d:`m17 6-2.891-2.891`,key:`xu6p2f`}],[`path`,{d:`M2 15c6.667-6 13.333 0 20-6`,key:`1pyr53`}],[`path`,{d:`m20 9 .891.891`,key:`3xwk7g`}],[`path`,{d:`M3.109 14.109 4 15`,key:`q76aoh`}],[`path`,{d:`m6.5 12.5 1 1`,key:`cs35ky`}],[`path`,{d:`m7 18 2.891 2.891`,key:`1sisit`}],[`path`,{d:`M9 22c1.798-1.998 2.518-3.995 2.807-5.993`,key:`q3hbxp`}]]};Lt.node;var Rt=b(Lt),zt={name:`earth`,size:24,node:[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]],aliases:[`globe-2`]};zt.node;var Bt=b(zt),Vt={name:`file-chart-column-increasing`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M12 18v-4`,key:`q1q25u`}],[`path`,{d:`M16 18v-6`,key:`15y0np`}]],aliases:[`file-bar-chart`]};Vt.node;var Ht=b(Vt),Ut={name:`file-stack`,size:24,node:[[`path`,{d:`M11 21a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1`,key:`likhh7`}],[`path`,{d:`M16 16a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1`,key:`17ky3x`}],[`path`,{d:`M21 6a2 2 0 0 0-.586-1.414l-2-2A2 2 0 0 0 17 2h-3a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1z`,key:`1hyeo0`}]]};Ut.node;var Wt=b(Ut),Gt={name:`flask-conical`,size:24,node:[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]};Gt.node;var Kt=b(Gt),W={name:`folder-archive`,size:24,node:[[`circle`,{cx:`15`,cy:`19`,r:`2`,key:`u2pros`}],[`path`,{d:`M20.9 19.8A2 2 0 0 0 22 18V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h5.1`,key:`1jj40k`}],[`path`,{d:`M15 11v-1`,key:`cntcp`}],[`path`,{d:`M15 17v-2`,key:`1279jj`}]]};W.node;var G=b(W),qt={name:`folder-kanban`,size:24,node:[[`path`,{d:`M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z`,key:`1fr9dc`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M12 10v2`,key:`hh53o1`}],[`path`,{d:`M16 10v6`,key:`1d6xys`}]]};qt.node;var Jt=b(qt),K={name:`graduation-cap`,size:24,node:[[`path`,{d:`M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z`,key:`j76jl0`}],[`path`,{d:`M22 10v6`,key:`1lu8f3`}],[`path`,{d:`M6 12.5V16a6 3 0 0 0 12 0v-3.5`,key:`1r8lef`}]]};K.node;var Yt=b(K),q={name:`image`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]};q.node;var Xt=b(q),Zt={name:`library`,size:24,node:[[`path`,{d:`m16 6 4 14`,key:`ji33uf`}],[`path`,{d:`M12 6v14`,key:`1n7gus`}],[`path`,{d:`M8 8v12`,key:`1gg7y9`}],[`path`,{d:`M4 4v16`,key:`6qkkli`}]]};Zt.node;var Qt=b(Zt),$t={name:`lightbulb`,size:24,node:[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]};$t.node;var J=b($t),en={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`}]]};en.node;var Y=b(en),tn={name:`map`,size:24,node:[[`path`,{d:`M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z`,key:`169xi5`}],[`path`,{d:`M15 5.764v15`,key:`1pn4in`}],[`path`,{d:`M9 3.236v15`,key:`1uimfh`}]]};tn.node;var nn=b(tn),rn={name:`microscope`,size:24,node:[[`path`,{d:`M6 18h8`,key:`1borvv`}],[`path`,{d:`M3 22h18`,key:`8prr45`}],[`path`,{d:`M14 22a7 7 0 1 0 0-14h-1`,key:`1jwaiy`}],[`path`,{d:`M9 14h2`,key:`197e7h`}],[`path`,{d:`M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z`,key:`1bmzmy`}],[`path`,{d:`M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3`,key:`1drr47`}]]};rn.node;var an=b(rn),on={name:`network`,size:24,node:[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]};on.node;var X=b(on),Z={name:`newspaper`,size:24,node:[[`path`,{d:`M15 18h-5`,key:`95g1m2`}],[`path`,{d:`M18 14h-8`,key:`sponae`}],[`path`,{d:`M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2`,key:`39pd36`}],[`rect`,{width:`8`,height:`4`,x:`10`,y:`6`,rx:`1`,key:`aywv1n`}]]};Z.node;var sn=b(Z),cn={name:`pen-tool`,size:24,node:[[`path`,{d:`m18 13-.654-4.736a4 4 0 00-2.756-3.266l-9.163-2.9a2 2 0 00-2.017.493l-.82.819a2 2 0 00-.492 2.017l2.9 9.163a4 4 0 003.266 2.756L13 18`,key:`93nyr4`}],[`path`,{d:`M18.648 12.352a1.205 1.205 0 011.704 0l1.296 1.296a1.205 1.205 0 010 1.704l-6.296 6.296a1.205 1.205 0 01-1.704 0l-1.296-1.296a1.205 1.205 0 010-1.704z`,key:`lnux7s`}],[`path`,{d:`m3 3 6.586 6.586`,key:`1igwcn`}],[`circle`,{cx:`11`,cy:`11`,r:`2`,key:`xmgehs`}]]};cn.node;var ln=b(cn),un={name:`presentation`,size:24,node:[[`path`,{d:`M2 3h20`,key:`91anmk`}],[`path`,{d:`M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3`,key:`2k9sn8`}],[`path`,{d:`m7 21 5-5 5 5`,key:`bip4we`}]]};un.node;var dn=b(un),fn={name:`quote`,size:24,node:[[`path`,{d:`M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`rib7q0`}],[`path`,{d:`M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`1ymkrd`}]]};fn.node;var pn=b(fn),mn={name:`regex`,size:24,node:[[`path`,{d:`M17 3v10`,key:`15fgeh`}],[`path`,{d:`m12.67 5.5 8.66 5`,key:`1gpheq`}],[`path`,{d:`m12.67 10.5 8.66-5`,key:`1dkfa6`}],[`path`,{d:`M9 17a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2z`,key:`swwfx4`}]]};mn.node;var hn=b(mn),gn={name:`rocket`,size:24,node:[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]};gn.node;var _n=b(gn),vn={name:`rotate-ccw-clock`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]],aliases:[`history`]};vn.node;var yn=b(vn),bn={name:`server`,size:24,node:[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]};bn.node;var xn=b(bn),Sn={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};Sn.node;var Cn=b(Sn),wn={name:`sticky-note`,size:24,node:[[`path`,{d:`M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z`,key:`1dfntj`}],[`path`,{d:`M15 3v5a1 1 0 0 0 1 1h5`,key:`6s6qgf`}]]};wn.node;var Tn=b(wn),En={name:`target`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]};En.node;var Dn=b(En),On={name:`telescope`,size:24,node:[[`path`,{d:`m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44`,key:`k4qptu`}],[`path`,{d:`m13.56 11.747 4.332-.924`,key:`19l80z`}],[`path`,{d:`m16 21-3.105-6.21`,key:`7oh9d`}],[`path`,{d:`M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z`,key:`m7xp4m`}],[`path`,{d:`m6.158 8.633 1.114 4.456`,key:`74o979`}],[`path`,{d:`m8 21 3.105-6.21`,key:`1fvxut`}],[`circle`,{cx:`12`,cy:`13`,r:`2`,key:`1c1ljs`}]]};On.node;var kn=b(On),An={name:`test-tube-diagonal`,size:24,node:[[`path`,{d:`M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3`,key:`1ub6xw`}],[`path`,{d:`m16 2 6 6`,key:`1gw87d`}],[`path`,{d:`M12 16H4`,key:`1cjfip`}]],aliases:[`test-tube-2`]};An.node;var jn=b(An),Mn={name:`test-tubes`,size:24,node:[[`path`,{d:`M9 2v17.5A2.5 2.5 0 0 1 6.5 22A2.5 2.5 0 0 1 4 19.5V2`,key:`1hjrqt`}],[`path`,{d:`M20 2v17.5a2.5 2.5 0 0 1-2.5 2.5a2.5 2.5 0 0 1-2.5-2.5V2`,key:`16lc8n`}],[`path`,{d:`M3 2h7`,key:`7s29d5`}],[`path`,{d:`M14 2h7`,key:`7sicin`}],[`path`,{d:`M9 16H4`,key:`1bfye3`}],[`path`,{d:`M20 16h-5`,key:`ddnjpe`}]]};Mn.node;var Nn=b(Mn),Pn={name:`university`,size:24,node:[[`path`,{d:`M14 21v-3a2 2 0 0 0-4 0v3`,key:`1rgiei`}],[`path`,{d:`M18 12h.01`,key:`yjnet6`}],[`path`,{d:`M18 16h.01`,key:`plv8zi`}],[`path`,{d:`M22 7a1 1 0 0 0-1-1h-2a2 2 0 0 1-1.143-.359L13.143 2.36a2 2 0 0 0-2.286-.001L6.143 5.64A2 2 0 0 1 5 6H3a1 1 0 0 0-1 1v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2z`,key:`1ogmi3`}],[`path`,{d:`M6 12h.01`,key:`c2rlol`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}],[`circle`,{cx:`12`,cy:`10`,r:`2`,key:`1yojzk`}]],aliases:[`school-2`]};Pn.node;var Fn=b(Pn),In={name:`user-round`,size:24,node:[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]],aliases:[`user-2`]};In.node;var Ln=b(In),Rn={name:`users-round`,size:24,node:[[`path`,{d:`M18 21a8 8 0 0 0-16 0`,key:`3ypg7q`}],[`circle`,{cx:`10`,cy:`8`,r:`5`,key:`o932ke`}],[`path`,{d:`M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3`,key:`10s06x`}]],aliases:[`users-2`]};Rn.node;var zn=b(Rn),Bn={name:`workflow`,size:24,node:[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]};Bn.node;var Vn=b(Bn),Q=t(n(),1),$=r(),Hn=(0,Q.lazy)(()=>y(()=>import(`./AvatarSettingsDialog-C8WQhZBK.js`).then(e=>({default:e.AvatarSettingsDialog})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]),import.meta.url));function Un({user:e,onGitHub:t,onSignOut:n,onUserChange:r}){let{t:i,i18n:a}=g(),[o,s]=(0,Q.useState)(!1),[c,l]=(0,Q.useState)(!1),[u,d]=(0,Q.useState)(!1),[f,p]=(0,Q.useState)(``),m=(0,Q.useRef)(!1),h=(0,Q.useRef)(!1),ee=(0,Q.useRef)(null),te=(0,Q.useId)(),v=e.displayName||e.username,ne=async()=>{if(!m.current){m.current=!0,d(!0),p(``);try{await n()}catch(e){p(N(e))}finally{m.current=!1,d(!1)}}};return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(Se,{open:o,onOpenChange:e=>{s(e),e&&p(``)},children:[(0,$.jsx)(ye,{asChild:!0,children:(0,$.jsxs)(`button`,{type:`button`,className:`user-menu-trigger`,"aria-label":i(`account.menu`,{name:v}),children:[(0,$.jsx)(xe,{userId:e.id,name:v,username:e.username,avatarStyle:e.avatarStyle,className:`user-menu-avatar`}),(0,$.jsx)(`span`,{className:`user-menu-name`,children:v}),(0,$.jsx)(E,{size:14,"aria-hidden":`true`})]})}),(0,$.jsx)(Ee,{children:(0,$.jsxs)(ve,{ref:ee,tabIndex:-1,className:`user-menu-content`,align:`end`,sideOffset:10,collisionPadding:12,"aria-label":i(`account.menu`,{name:v}),onOpenAutoFocus:e=>{e.preventDefault(),ee.current?.focus()},onCloseAutoFocus:e=>{h.current&&e.preventDefault(),h.current=!1},children:[(0,$.jsxs)(`div`,{className:`user-menu-profile`,children:[(0,$.jsx)(xe,{userId:e.id,name:v,username:e.username,avatarStyle:e.avatarStyle,className:`user-menu-avatar`}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`strong`,{children:v}),(0,$.jsxs)(`span`,{children:[`@`,e.username]})]}),(0,$.jsx)(`button`,{type:`button`,className:`user-menu-github`,"aria-label":i(`account.openGithubSettings`),"data-tooltip":i(`account.githubTitle`),onClick:()=>{h.current=!0,s(!1),t()},children:(0,$.jsx)(Me,{size:19})})]}),(0,$.jsxs)(`div`,{className:`user-menu-settings`,children:[(0,$.jsxs)(`button`,{type:`button`,className:`user-menu-avatar-setting`,onClick:()=>{h.current=!0,s(!1),l(!0)},children:[(0,$.jsxs)(`span`,{className:`user-menu-setting-label`,children:[(0,$.jsx)(Ln,{size:16,"aria-hidden":!0}),i(`account.avatarTitle`)]}),(0,$.jsx)(ce,{size:14,"aria-hidden":!0})]}),(0,$.jsxs)(`div`,{className:`user-menu-language`,children:[(0,$.jsxs)(`label`,{htmlFor:te,children:[(0,$.jsx)(Ie,{size:16,"aria-hidden":`true`}),i(`common.language`)]}),(0,$.jsxs)(`div`,{className:`user-menu-language-select`,children:[(0,$.jsxs)(`select`,{id:te,value:_(a.resolvedLanguage),onChange:e=>void a.changeLanguage(e.target.value),children:[(0,$.jsx)(`option`,{value:`en`,children:i(`common.languageEnglish`)}),(0,$.jsx)(`option`,{value:`zh`,children:i(`common.languageChinese`)}),(0,$.jsx)(`option`,{value:`zh-Hant`,children:i(`common.languageTraditionalChinese`)})]}),(0,$.jsx)(E,{size:13,"aria-hidden":`true`})]})]}),(0,$.jsxs)(`div`,{className:`user-menu-theme`,children:[(0,$.jsxs)(`span`,{className:`user-menu-setting-label`,children:[(0,$.jsx)(ze,{size:16,"aria-hidden":`true`}),i(`theme.title`)]}),(0,$.jsx)(Le,{})]})]}),f&&(0,$.jsx)(`p`,{className:`user-menu-error`,role:`alert`,children:f}),(0,$.jsxs)(`button`,{type:`button`,className:`user-menu-signout`,disabled:u,"aria-busy":u,onClick:()=>void ne(),children:[u?(0,$.jsx)(Re,{size:16,className:`spin`,"aria-hidden":`true`}):(0,$.jsx)(Y,{size:16,"aria-hidden":`true`}),i(`auth.logout`)]})]})})]}),c&&(0,$.jsx)(Ke,{title:i(`account.avatarTitle`),onClose:()=>l(!1),children:(0,$.jsx)(Hn,{user:e,onClose:()=>l(!1),onSaved:e=>r?.(e)})})]})}var Wn={npm:`npm update --global texlite
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./AvatarSettingsDialog-ChKrdDqp.js","./rolldown-runtime-XKyaHtl9.js","./react-DUEFWlB7.js","./useTranslation-DwkoADSz.js","./i18nInstance-CIMFwH0l.js","./useDeletionTransitions-Xlq7HabP.js","./basePath-B5-c90eh.js","./createLucideIcon-CDYIzuiB.js","./dist-B_WjsTVV.js","./es2015-D2UDOM09.js","./index-CemLYDYL.js","./i18n-Wn96VbWM.js","./vite-runtime-CRzLMJPS.js","./loader-circle-DKGyi5EK.js","./dist-DdUqlCPw.js","./index-DSF5eT29.css","./check-Dw16EqG-.js","./SaveButton-wiTpGLho.js","./circle-check-CunlnBPw.js","./search-DjOWqLig.js","./SystemMetricsDialog-Bycm88U1.js","./clock-3-DztJubz_.js","./InfoPopover-BJYnFn1P.js","./refresh-cw-IqExWG6S.js","./CitationLibraryDialog-DqO9e0GV.js","./relativeTime-C-GTw3lA.js","./chevron-up-BHaMUEEA.js","./TagMarquee-BLmCTTCt.js","./library-big-B8e_Fiql.js","./plus-Cei21TlT.js","./dist-C9O-A_C4.js","./latexScanner-D9bMX44Y.js","./citationAuthors-BWHXhKvT.js","./bibtexNames-CPGbBJxd.js","./citationLibrary-DxGdbZEQ.js","./generatedParser-CZa2vsK6.js","./editor-CkUEg2La.js","./bibtexReferences-xpSF8IXH.js","./SuccessNotice-ubBtzzi_.js","./TagColorSelect-e-Tq5V3H.js","./AdminUsers-xuVuiwoh.js","./lock-keyhole-aC_QjKDi.js","./user-plus-NNBQOWDP.js","./AgentManagement-D-0hrv6f.js","./arrow-down-C_4f1E-E.js","./AgentIcon-qmglBc3M.js","./AgentIcon-DJGGRJnV.css","./TagManagementDialog-DwUAA8uC.js","./ProjectIconPickerDialog-ChiEUQ0g.js","./GitHubAccountDialog-CnxfR0JD.js","./GitHubIcon-CExJn0AV.js"])))=>i.map(i=>d[i]);
2
+ import{n as e,r as t}from"./rolldown-runtime-XKyaHtl9.js";import{i as n,t as r}from"./react-DUEFWlB7.js";import{_ as i,b as a,g as o,h as s,i as c,m as l,n as u,p as d,t as f,u as p,v as m,x as h,y as ee}from"./relativeTime-C-GTw3lA.js";import{t as g}from"./useTranslation-DwkoADSz.js";import{r as _,t as te}from"./i18n-Wn96VbWM.js";import{r as v,t as ne}from"./basePath-B5-c90eh.js";import{t as y}from"./vite-runtime-CRzLMJPS.js";import{t as b}from"./createLucideIcon-CDYIzuiB.js";import{A as re,B as ie,C as ae,D as oe,E as se,F as x,H as ce,I as le,L as S,M as ue,N as de,O as fe,P as C,R as pe,S as me,T as he,U as ge,V as _e,_ as ve,b as ye,c as be,d as xe,j as w,k as T,m as Se,n as Ce,t as we,u as Te,v as Ee,w as De,x as Oe,z as ke}from"./useDeletionTransitions-Xlq7HabP.js";import{t as Ae}from"./bot-ClmnQ29j.js";import{o as E}from"./dist-B_WjsTVV.js";import{n as je,r as D,t as Me}from"./GitHubIcon-CExJn0AV.js";import{i as O,n as Ne,r as Pe,t as k}from"./TagMarquee-BLmCTTCt.js";import{t as Fe}from"./hard-drive-CXlummIE.js";import{n as Ie,t as Le}from"./ThemeSwitcher-RSqZi7kx.js";import{t as Re}from"./loader-circle-DKGyi5EK.js";import{t as ze}from"./palette-8_-Y5XON.js";import{n as Be,t as Ve}from"./terminal-DD9WJ56e.js";import{E as He,T as Ue,_ as We,a as Ge,d as A,f as Ke,g as j,h as qe,l as Je,p as Ye,v as Xe,w as M,y as N}from"./index-CemLYDYL.js";var Ze={name:`activity`,size:24,node:[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]};Ze.node;var Qe=b(Ze),$e={name:`archive-restore`,size:24,node:[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h2`,key:`tvwodi`}],[`path`,{d:`M20 8v11a2 2 0 0 1-2 2h-2`,key:`1gkqxj`}],[`path`,{d:`m9 15 3-3 3 3`,key:`1pd0qc`}],[`path`,{d:`M12 12v9`,key:`192myk`}]]};$e.node;var et=b($e),tt={name:`archive`,size:24,node:[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]};tt.node;var nt=b(tt),rt={name:`arrow-down-up`,size:24,node:[[`path`,{d:`m3 16 4 4 4-4`,key:`1co6wj`}],[`path`,{d:`M7 20V4`,key:`1yoxec`}],[`path`,{d:`m21 8-4-4-4 4`,key:`1c9v7m`}],[`path`,{d:`M17 4v16`,key:`7dpous`}]]};rt.node;var it=b(rt),P={name:`arrow-right-left`,size:24,node:[[`path`,{d:`m16 3 4 4-4 4`,key:`1x1c3m`}],[`path`,{d:`M20 7H4`,key:`zbl0bi`}],[`path`,{d:`m8 21-4-4 4-4`,key:`h9nckh`}],[`path`,{d:`M4 17h16`,key:`g4d7ey`}]]};P.node;var at=b(P),ot={name:`atom`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`path`,{d:`M20.2 20.2c2.04-2.03.02-7.36-4.5-11.9-4.54-4.52-9.87-6.54-11.9-4.5-2.04 2.03-.02 7.36 4.5 11.9 4.54 4.52 9.87 6.54 11.9 4.5Z`,key:`1l2ple`}],[`path`,{d:`M15.7 15.7c4.52-4.54 6.54-9.87 4.5-11.9-2.03-2.04-7.36-.02-11.9 4.5-4.52 4.54-6.54 9.87-4.5 11.9 2.03 2.04 7.36.02 11.9-4.5Z`,key:`1wam0m`}]]};ot.node;var st=b(ot),F={name:`beaker`,size:24,node:[[`path`,{d:`M4.5 3h15`,key:`c7n0jr`}],[`path`,{d:`M6 3v16a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V3`,key:`m1uhx7`}],[`path`,{d:`M6 14h12`,key:`4cwo0f`}]]};F.node;var ct=b(F),lt={name:`bell-off`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]};lt.node;var ut=b(lt),dt={name:`bookmark`,size:24,node:[[`path`,{d:`M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z`,key:`oz39mx`}]]};dt.node;var ft=b(dt),pt={name:`braces`,size:24,node:[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]],aliases:[`curly-braces`]};pt.node;var I=b(pt),mt={name:`brain-circuit`,size:24,node:[[`path`,{d:`M12 13h4`,key:`1ku699`}],[`path`,{d:`M12 18h6a2 2 0 012 2v1`,key:`6s3bw4`}],[`path`,{d:`M12 8h8`,key:`1lhi5i`}],[`path`,{d:`M12 9a4.17 4.17 0 01-3 4`,key:`13l7kh`}],[`path`,{d:`M16 8V5a2 2 0 012-2`,key:`gais5y`}],[`path`,{d:`M6 18a4 4 0 01-2-7.465`,key:`1y2m15`}],[`path`,{d:`M6.004 5.125a4 4 0 00-2.526 5.77`,key:`3cw1ss`}],[`path`,{d:`M6.294 6.294A3 3 0 1112 5v13a4 4 0 11-7.967-.518`,key:`m2z1wm`}],[`circle`,{cx:`16`,cy:`13`,r:`0.5`,fill:`currentColor`,key:`9zzywh`}],[`circle`,{cx:`18`,cy:`3`,r:`0.5`,fill:`currentColor`,key:`i2xui6`}],[`circle`,{cx:`20`,cy:`21`,r:`0.5`,fill:`currentColor`,key:`1dobdp`}],[`circle`,{cx:`20`,cy:`8`,r:`0.5`,fill:`currentColor`,key:`r9nqlq`}]]};mt.node;var L=b(mt),ht={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 01-3-4 4.17 4.17 0 01-3 4`,key:`5nuw1p`}],[`path`,{d:`M17.707 6.294A3 3 0 1012 5a3 3 0 10-5.707 1.294`,key:`18ldcf`}],[`path`,{d:`M17.996 5.125a4 4 0 012.526 5.77`,key:`1sdu8q`}],[`path`,{d:`M18 18a4 4 0 002-7.465`,key:`7xqqvr`}],[`path`,{d:`M19.967 17.482a4 4 0 11-7.967.517 4 4 0 11-7.967-.517`,key:`t46ysz`}],[`path`,{d:`M6 18a4 4 0 01-2-7.465`,key:`1y2m15`}],[`path`,{d:`M6.004 5.125a4 4 0 00-2.526 5.77`,key:`3cw1ss`}]]};ht.node;var R=b(ht),gt={name:`calculator`,size:24,node:[[`rect`,{width:`16`,height:`20`,x:`4`,y:`2`,rx:`2`,key:`1nb95v`}],[`line`,{x1:`8`,x2:`16`,y1:`6`,y2:`6`,key:`x4nwl0`}],[`line`,{x1:`16`,x2:`16`,y1:`14`,y2:`18`,key:`wjye3r`}],[`path`,{d:`M16 10h.01`,key:`1m94wz`}],[`path`,{d:`M12 10h.01`,key:`1nrarc`}],[`path`,{d:`M8 10h.01`,key:`19clt8`}],[`path`,{d:`M12 14h.01`,key:`1etili`}],[`path`,{d:`M8 14h.01`,key:`6423bh`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}],[`path`,{d:`M8 18h.01`,key:`lrp35t`}]]};gt.node;var _t=b(gt),vt={name:`calendar-days`,size:24,node:[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M8 13h.01`,key:`1sbv64`}],[`path`,{d:`M12 13h.01`,key:`y0uutt`}],[`path`,{d:`M16 13h.01`,key:`wip0gl`}],[`path`,{d:`M8 17h.01`,key:`p3bg7i`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M16 17h.01`,key:`ql8jdd`}]]};vt.node;var yt=b(vt),bt={name:`chart-column`,size:24,node:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]],aliases:[`bar-chart-3`]};bt.node;var z=b(bt),B={name:`chart-line`,size:24,node:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`m19 9-5 5-4-4-3 3`,key:`2osh9i`}]],aliases:[`line-chart`]};B.node;var xt=b(B),St={name:`chart-no-axes-combined`,size:24,node:[[`path`,{d:`M12 16v5`,key:`zza2cw`}],[`path`,{d:`M16 14.639V21`,key:`1s85h0`}],[`path`,{d:`M20 10.656V21`,key:`q45596`}],[`path`,{d:`m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15`,key:`1fw8x9`}],[`path`,{d:`M4 18.463V21`,key:`1otddq`}],[`path`,{d:`M8 14.656V21`,key:`1t2idw`}]]};St.node;var Ct=b(St),V={name:`chart-pie`,size:24,node:[[`path`,{d:`M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z`,key:`pzmjnu`}],[`path`,{d:`M21.21 15.89A10 10 0 1 1 8 2.83`,key:`k2fpak`}]],aliases:[`pie-chart`]};V.node;var wt=b(V),Tt={name:`chart-scatter`,size:24,node:[[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}],[`circle`,{cx:`18.5`,cy:`5.5`,r:`.5`,fill:`currentColor`,key:`lysivs`}],[`circle`,{cx:`11.5`,cy:`11.5`,r:`.5`,fill:`currentColor`,key:`byv1b8`}],[`circle`,{cx:`7.5`,cy:`16.5`,r:`.5`,fill:`currentColor`,key:`nkw3mc`}],[`circle`,{cx:`17.5`,cy:`14.5`,r:`.5`,fill:`currentColor`,key:`1gjh6j`}],[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}]],aliases:[`scatter-chart`]};Tt.node;var H=b(Tt),Et={name:`circle-arrow-up`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 12-4-4-4 4`,key:`177agl`}],[`path`,{d:`M12 16V8`,key:`1sbj14`}]],aliases:[`arrow-up-circle`]};Et.node;var Dt=b(Et),Ot={name:`circuit-board`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M11 9h4a2 2 0 0 0 2-2V3`,key:`1ve2rv`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`M7 21v-4a2 2 0 0 1 2-2h4`,key:`1fwkro`}],[`circle`,{cx:`15`,cy:`15`,r:`2`,key:`3i40o0`}]]};Ot.node;var kt=b(Ot),U={name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]};U.node;var At=b(U),jt={name:`cloud`,size:24,node:[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]};jt.node;var Mt=b(jt),Nt={name:`cpu`,size:24,node:[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]};Nt.node;var Pt=b(Nt),Ft={name:`database`,size:24,node:[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]};Ft.node;var It=b(Ft),Lt={name:`dna`,size:24,node:[[`path`,{d:`m10 16 1.5 1.5`,key:`11lckj`}],[`path`,{d:`m14 8-1.5-1.5`,key:`1ohn8i`}],[`path`,{d:`M15 2c-1.798 1.998-2.518 3.995-2.807 5.993`,key:`80uv8i`}],[`path`,{d:`m16.5 10.5 1 1`,key:`696xn5`}],[`path`,{d:`m17 6-2.891-2.891`,key:`xu6p2f`}],[`path`,{d:`M2 15c6.667-6 13.333 0 20-6`,key:`1pyr53`}],[`path`,{d:`m20 9 .891.891`,key:`3xwk7g`}],[`path`,{d:`M3.109 14.109 4 15`,key:`q76aoh`}],[`path`,{d:`m6.5 12.5 1 1`,key:`cs35ky`}],[`path`,{d:`m7 18 2.891 2.891`,key:`1sisit`}],[`path`,{d:`M9 22c1.798-1.998 2.518-3.995 2.807-5.993`,key:`q3hbxp`}]]};Lt.node;var Rt=b(Lt),zt={name:`earth`,size:24,node:[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]],aliases:[`globe-2`]};zt.node;var Bt=b(zt),Vt={name:`file-chart-column-increasing`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M12 18v-4`,key:`q1q25u`}],[`path`,{d:`M16 18v-6`,key:`15y0np`}]],aliases:[`file-bar-chart`]};Vt.node;var Ht=b(Vt),Ut={name:`file-stack`,size:24,node:[[`path`,{d:`M11 21a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1`,key:`likhh7`}],[`path`,{d:`M16 16a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1`,key:`17ky3x`}],[`path`,{d:`M21 6a2 2 0 0 0-.586-1.414l-2-2A2 2 0 0 0 17 2h-3a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1z`,key:`1hyeo0`}]]};Ut.node;var Wt=b(Ut),Gt={name:`flask-conical`,size:24,node:[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]};Gt.node;var Kt=b(Gt),W={name:`folder-archive`,size:24,node:[[`circle`,{cx:`15`,cy:`19`,r:`2`,key:`u2pros`}],[`path`,{d:`M20.9 19.8A2 2 0 0 0 22 18V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h5.1`,key:`1jj40k`}],[`path`,{d:`M15 11v-1`,key:`cntcp`}],[`path`,{d:`M15 17v-2`,key:`1279jj`}]]};W.node;var G=b(W),qt={name:`folder-kanban`,size:24,node:[[`path`,{d:`M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z`,key:`1fr9dc`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M12 10v2`,key:`hh53o1`}],[`path`,{d:`M16 10v6`,key:`1d6xys`}]]};qt.node;var Jt=b(qt),K={name:`graduation-cap`,size:24,node:[[`path`,{d:`M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z`,key:`j76jl0`}],[`path`,{d:`M22 10v6`,key:`1lu8f3`}],[`path`,{d:`M6 12.5V16a6 3 0 0 0 12 0v-3.5`,key:`1r8lef`}]]};K.node;var Yt=b(K),q={name:`image`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]};q.node;var Xt=b(q),Zt={name:`library`,size:24,node:[[`path`,{d:`m16 6 4 14`,key:`ji33uf`}],[`path`,{d:`M12 6v14`,key:`1n7gus`}],[`path`,{d:`M8 8v12`,key:`1gg7y9`}],[`path`,{d:`M4 4v16`,key:`6qkkli`}]]};Zt.node;var Qt=b(Zt),$t={name:`lightbulb`,size:24,node:[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]};$t.node;var J=b($t),en={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`}]]};en.node;var Y=b(en),tn={name:`map`,size:24,node:[[`path`,{d:`M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z`,key:`169xi5`}],[`path`,{d:`M15 5.764v15`,key:`1pn4in`}],[`path`,{d:`M9 3.236v15`,key:`1uimfh`}]]};tn.node;var nn=b(tn),rn={name:`microscope`,size:24,node:[[`path`,{d:`M6 18h8`,key:`1borvv`}],[`path`,{d:`M3 22h18`,key:`8prr45`}],[`path`,{d:`M14 22a7 7 0 1 0 0-14h-1`,key:`1jwaiy`}],[`path`,{d:`M9 14h2`,key:`197e7h`}],[`path`,{d:`M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z`,key:`1bmzmy`}],[`path`,{d:`M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3`,key:`1drr47`}]]};rn.node;var an=b(rn),on={name:`network`,size:24,node:[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]};on.node;var X=b(on),Z={name:`newspaper`,size:24,node:[[`path`,{d:`M15 18h-5`,key:`95g1m2`}],[`path`,{d:`M18 14h-8`,key:`sponae`}],[`path`,{d:`M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2`,key:`39pd36`}],[`rect`,{width:`8`,height:`4`,x:`10`,y:`6`,rx:`1`,key:`aywv1n`}]]};Z.node;var sn=b(Z),cn={name:`pen-tool`,size:24,node:[[`path`,{d:`m18 13-.654-4.736a4 4 0 00-2.756-3.266l-9.163-2.9a2 2 0 00-2.017.493l-.82.819a2 2 0 00-.492 2.017l2.9 9.163a4 4 0 003.266 2.756L13 18`,key:`93nyr4`}],[`path`,{d:`M18.648 12.352a1.205 1.205 0 011.704 0l1.296 1.296a1.205 1.205 0 010 1.704l-6.296 6.296a1.205 1.205 0 01-1.704 0l-1.296-1.296a1.205 1.205 0 010-1.704z`,key:`lnux7s`}],[`path`,{d:`m3 3 6.586 6.586`,key:`1igwcn`}],[`circle`,{cx:`11`,cy:`11`,r:`2`,key:`xmgehs`}]]};cn.node;var ln=b(cn),un={name:`presentation`,size:24,node:[[`path`,{d:`M2 3h20`,key:`91anmk`}],[`path`,{d:`M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3`,key:`2k9sn8`}],[`path`,{d:`m7 21 5-5 5 5`,key:`bip4we`}]]};un.node;var dn=b(un),fn={name:`quote`,size:24,node:[[`path`,{d:`M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`rib7q0`}],[`path`,{d:`M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`1ymkrd`}]]};fn.node;var pn=b(fn),mn={name:`regex`,size:24,node:[[`path`,{d:`M17 3v10`,key:`15fgeh`}],[`path`,{d:`m12.67 5.5 8.66 5`,key:`1gpheq`}],[`path`,{d:`m12.67 10.5 8.66-5`,key:`1dkfa6`}],[`path`,{d:`M9 17a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2z`,key:`swwfx4`}]]};mn.node;var hn=b(mn),gn={name:`rocket`,size:24,node:[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]};gn.node;var _n=b(gn),vn={name:`rotate-ccw-clock`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]],aliases:[`history`]};vn.node;var yn=b(vn),bn={name:`server`,size:24,node:[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]};bn.node;var xn=b(bn),Sn={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};Sn.node;var Cn=b(Sn),wn={name:`sticky-note`,size:24,node:[[`path`,{d:`M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z`,key:`1dfntj`}],[`path`,{d:`M15 3v5a1 1 0 0 0 1 1h5`,key:`6s6qgf`}]]};wn.node;var Tn=b(wn),En={name:`target`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]};En.node;var Dn=b(En),On={name:`telescope`,size:24,node:[[`path`,{d:`m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44`,key:`k4qptu`}],[`path`,{d:`m13.56 11.747 4.332-.924`,key:`19l80z`}],[`path`,{d:`m16 21-3.105-6.21`,key:`7oh9d`}],[`path`,{d:`M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z`,key:`m7xp4m`}],[`path`,{d:`m6.158 8.633 1.114 4.456`,key:`74o979`}],[`path`,{d:`m8 21 3.105-6.21`,key:`1fvxut`}],[`circle`,{cx:`12`,cy:`13`,r:`2`,key:`1c1ljs`}]]};On.node;var kn=b(On),An={name:`test-tube-diagonal`,size:24,node:[[`path`,{d:`M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3`,key:`1ub6xw`}],[`path`,{d:`m16 2 6 6`,key:`1gw87d`}],[`path`,{d:`M12 16H4`,key:`1cjfip`}]],aliases:[`test-tube-2`]};An.node;var jn=b(An),Mn={name:`test-tubes`,size:24,node:[[`path`,{d:`M9 2v17.5A2.5 2.5 0 0 1 6.5 22A2.5 2.5 0 0 1 4 19.5V2`,key:`1hjrqt`}],[`path`,{d:`M20 2v17.5a2.5 2.5 0 0 1-2.5 2.5a2.5 2.5 0 0 1-2.5-2.5V2`,key:`16lc8n`}],[`path`,{d:`M3 2h7`,key:`7s29d5`}],[`path`,{d:`M14 2h7`,key:`7sicin`}],[`path`,{d:`M9 16H4`,key:`1bfye3`}],[`path`,{d:`M20 16h-5`,key:`ddnjpe`}]]};Mn.node;var Nn=b(Mn),Pn={name:`university`,size:24,node:[[`path`,{d:`M14 21v-3a2 2 0 0 0-4 0v3`,key:`1rgiei`}],[`path`,{d:`M18 12h.01`,key:`yjnet6`}],[`path`,{d:`M18 16h.01`,key:`plv8zi`}],[`path`,{d:`M22 7a1 1 0 0 0-1-1h-2a2 2 0 0 1-1.143-.359L13.143 2.36a2 2 0 0 0-2.286-.001L6.143 5.64A2 2 0 0 1 5 6H3a1 1 0 0 0-1 1v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2z`,key:`1ogmi3`}],[`path`,{d:`M6 12h.01`,key:`c2rlol`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}],[`circle`,{cx:`12`,cy:`10`,r:`2`,key:`1yojzk`}]],aliases:[`school-2`]};Pn.node;var Fn=b(Pn),In={name:`user-round`,size:24,node:[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]],aliases:[`user-2`]};In.node;var Ln=b(In),Rn={name:`users-round`,size:24,node:[[`path`,{d:`M18 21a8 8 0 0 0-16 0`,key:`3ypg7q`}],[`circle`,{cx:`10`,cy:`8`,r:`5`,key:`o932ke`}],[`path`,{d:`M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3`,key:`10s06x`}]],aliases:[`users-2`]};Rn.node;var zn=b(Rn),Bn={name:`workflow`,size:24,node:[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]};Bn.node;var Vn=b(Bn),Q=t(n(),1),$=r(),Hn=(0,Q.lazy)(()=>y(()=>import(`./AvatarSettingsDialog-ChKrdDqp.js`).then(e=>({default:e.AvatarSettingsDialog})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]),import.meta.url));function Un({user:e,onGitHub:t,onSignOut:n,onUserChange:r}){let{t:i,i18n:a}=g(),[o,s]=(0,Q.useState)(!1),[c,l]=(0,Q.useState)(!1),[u,d]=(0,Q.useState)(!1),[f,p]=(0,Q.useState)(``),m=(0,Q.useRef)(!1),h=(0,Q.useRef)(!1),ee=(0,Q.useRef)(null),te=(0,Q.useId)(),v=e.displayName||e.username,ne=async()=>{if(!m.current){m.current=!0,d(!0),p(``);try{await n()}catch(e){p(N(e))}finally{m.current=!1,d(!1)}}};return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(Se,{open:o,onOpenChange:e=>{s(e),e&&p(``)},children:[(0,$.jsx)(ye,{asChild:!0,children:(0,$.jsxs)(`button`,{type:`button`,className:`user-menu-trigger`,"aria-label":i(`account.menu`,{name:v}),children:[(0,$.jsx)(xe,{userId:e.id,name:v,username:e.username,avatarStyle:e.avatarStyle,className:`user-menu-avatar`}),(0,$.jsx)(`span`,{className:`user-menu-name`,children:v}),(0,$.jsx)(E,{size:14,"aria-hidden":`true`})]})}),(0,$.jsx)(Ee,{children:(0,$.jsxs)(ve,{ref:ee,tabIndex:-1,className:`user-menu-content`,align:`end`,sideOffset:10,collisionPadding:12,"aria-label":i(`account.menu`,{name:v}),onOpenAutoFocus:e=>{e.preventDefault(),ee.current?.focus()},onCloseAutoFocus:e=>{h.current&&e.preventDefault(),h.current=!1},children:[(0,$.jsxs)(`div`,{className:`user-menu-profile`,children:[(0,$.jsx)(xe,{userId:e.id,name:v,username:e.username,avatarStyle:e.avatarStyle,className:`user-menu-avatar`}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`strong`,{children:v}),(0,$.jsxs)(`span`,{children:[`@`,e.username]})]}),(0,$.jsx)(`button`,{type:`button`,className:`user-menu-github`,"aria-label":i(`account.openGithubSettings`),"data-tooltip":i(`account.githubTitle`),onClick:()=>{h.current=!0,s(!1),t()},children:(0,$.jsx)(Me,{size:19})})]}),(0,$.jsxs)(`div`,{className:`user-menu-settings`,children:[(0,$.jsxs)(`button`,{type:`button`,className:`user-menu-avatar-setting`,onClick:()=>{h.current=!0,s(!1),l(!0)},children:[(0,$.jsxs)(`span`,{className:`user-menu-setting-label`,children:[(0,$.jsx)(Ln,{size:16,"aria-hidden":!0}),i(`account.avatarTitle`)]}),(0,$.jsx)(ce,{size:14,"aria-hidden":!0})]}),(0,$.jsxs)(`div`,{className:`user-menu-language`,children:[(0,$.jsxs)(`label`,{htmlFor:te,children:[(0,$.jsx)(Ie,{size:16,"aria-hidden":`true`}),i(`common.language`)]}),(0,$.jsxs)(`div`,{className:`user-menu-language-select`,children:[(0,$.jsxs)(`select`,{id:te,value:_(a.resolvedLanguage),onChange:e=>void a.changeLanguage(e.target.value),children:[(0,$.jsx)(`option`,{value:`en`,children:i(`common.languageEnglish`)}),(0,$.jsx)(`option`,{value:`zh`,children:i(`common.languageChinese`)}),(0,$.jsx)(`option`,{value:`zh-Hant`,children:i(`common.languageTraditionalChinese`)})]}),(0,$.jsx)(E,{size:13,"aria-hidden":`true`})]})]}),(0,$.jsxs)(`div`,{className:`user-menu-theme`,children:[(0,$.jsxs)(`span`,{className:`user-menu-setting-label`,children:[(0,$.jsx)(ze,{size:16,"aria-hidden":`true`}),i(`theme.title`)]}),(0,$.jsx)(Le,{})]})]}),f&&(0,$.jsx)(`p`,{className:`user-menu-error`,role:`alert`,children:f}),(0,$.jsxs)(`button`,{type:`button`,className:`user-menu-signout`,disabled:u,"aria-busy":u,onClick:()=>void ne(),children:[u?(0,$.jsx)(Re,{size:16,className:`spin`,"aria-hidden":`true`}):(0,$.jsx)(Y,{size:16,"aria-hidden":`true`}),i(`auth.logout`)]})]})})]}),c&&(0,$.jsx)(Ke,{title:i(`account.avatarTitle`),onClose:()=>l(!1),children:(0,$.jsx)(Hn,{user:e,onClose:()=>l(!1),onSaved:e=>r?.(e)})})]})}var Wn={npm:`npm update --global texlite
3
3
  texlite restart`,docker:`git pull --ff-only
4
4
  ./scripts/compose.sh pull
5
- ./scripts/compose.sh up -d`};function Gn({userId:e}){let{t}=g(),[n,r]=(0,Q.useState)(null),[i,a]=(0,Q.useState)(!1),[o,s]=(0,Q.useState)(`npm`),[c,l]=(0,Q.useState)(!1),[u,d]=(0,Q.useState)(``),f=(0,Q.useRef)(!1),p=(0,Q.useRef)(null);(0,Q.useEffect)(()=>{let e=new AbortController,t=!1,n=async()=>{if(!(document.visibilityState===`hidden`||t)){t=!0;try{let t=await M(`/api/admin/updates`,{signal:e.signal});if(e.signal.aborted||t.update?.latestVersion===p.current)return;r(t.update)}catch{}finally{t=!1}}};n();let i=window.setInterval(()=>{n()},18e5),a=()=>{document.visibilityState===`visible`&&n()};return document.addEventListener(`visibilitychange`,a),()=>{e.abort(),window.clearInterval(i),document.removeEventListener(`visibilitychange`,a)}},[e]);let m=async()=>{if(n&&!f.current){f.current=!0,l(!0),d(``);try{await M(`/api/admin/updates/dismiss`,{method:`POST`,body:JSON.stringify({version:n.latestVersion})}),p.current=n.latestVersion,r(e=>e?.latestVersion===n.latestVersion?null:e),a(!1)}catch(e){d(N(e))}finally{f.current=!1,l(!1)}}};return n?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{className:`update-notice`,role:`status`,children:[(0,$.jsx)(Dt,{"aria-hidden":!0,size:17}),(0,$.jsx)(`span`,{children:t(`updates.available`,{version:n.latestVersion})}),(0,$.jsx)(`button`,{type:`button`,className:`update-notice-details`,onClick:()=>{s(n.method),a(!0)},children:t(`updates.howToUpdate`)}),(0,$.jsx)(`button`,{type:`button`,className:`update-notice-dismiss`,disabled:c,onClick:()=>void m(),"aria-label":t(`updates.dismiss`),title:t(`updates.dismiss`),children:(0,$.jsx)(Oe,{"aria-hidden":!0,size:16})})]}),u&&!i&&(0,$.jsx)(`p`,{className:`error`,role:`alert`,children:u}),(0,$.jsxs)(j,{open:i,onOpenChange:a,title:t(`updates.title`),description:t(`updates.versions`,{current:n.currentVersion,latest:n.latestVersion}),footer:(0,$.jsxs)(`button`,{type:`button`,className:`update-dismiss-action`,disabled:c,onClick:()=>void m(),children:[(0,$.jsx)(ut,{"aria-hidden":!0,size:15}),t(`updates.dismiss`)]}),children:[(0,$.jsx)(`div`,{className:`update-methods`,role:`group`,"aria-label":t(`updates.method`),children:[`npm`,`docker`].map(e=>(0,$.jsx)(`button`,{type:`button`,"aria-pressed":o===e,"aria-controls":`update-instructions`,onClick:()=>s(e),children:e===`npm`?`npm`:`Docker`},e))}),(0,$.jsxs)(`div`,{id:`update-instructions`,children:[(0,$.jsx)(`p`,{className:`update-command-hint`,children:t(o===`npm`?`updates.npmHint`:`updates.dockerHint`)}),(0,$.jsx)(`pre`,{className:`update-commands`,children:(0,$.jsx)(`code`,{children:Wn[o]})}),(0,$.jsx)(`p`,{className:`muted update-command-hint`,children:t(o===`npm`?`updates.restartHint`:`updates.imageHint`)})]}),(0,$.jsx)(`div`,{className:`update-links`,children:(0,$.jsxs)(`a`,{href:`https://github.com/SWUFE-DB-Group/TexLite/releases`,target:`_blank`,rel:`noreferrer`,children:[t(`updates.releaseNotes`),(0,$.jsx)(D,{"aria-hidden":!0,size:12})]})}),u&&(0,$.jsx)(`p`,{className:`error`,role:`alert`,children:u})]})]}):null}var Kn=`file-text.book-open.notebook-pen.book-marked.scroll-text.library.graduation-cap.presentation.image.folder-kanban.microscope.flask-conical.test-tube-diagonal.atom.dna.telescope.earth.map.languages.university.code-2.file-code-2.database.server.network.circuit-board.brain.brain-circuit.bot.shield-check.workflow.sigma.calculator.chart-no-axes-combined.line-chart.bar-chart-3.pie-chart.chart-scatter.file-spreadsheet.file-chart-column-increasing.lightbulb.rocket.target.sparkles.file-pen-line.file-stack.folder.folder-open.folder-archive.archive.bookmark.newspaper.notepad-text.sticky-note.pen-tool.quote.list-tree.file-search.beaker.test-tubes.folder-git-2.git-branch.terminal.braces.regex.cpu.hard-drive.cloud.users-round.calendar-days`.split(`.`),qn=new Set(Kn);function Jn(e){return typeof e==`string`&&qn.has(e)}function Yn(e){if(typeof e!=`string`)return null;let t=e.trim();return!t||t.length>96?null:/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(t)?t:null}var Xn={"file-text":C,"book-open":m,"notebook-pen":Pe,"book-marked":ee,"scroll-text":oe,library:Qt,"graduation-cap":Yt,presentation:dn,image:Xt,"folder-kanban":Jt,microscope:an,"flask-conical":Kt,"test-tube-diagonal":jn,atom:st,dna:Rt,telescope:kn,earth:Bt,map:nn,languages:Ie,university:Fn,"code-2":_e,"file-code-2":S,database:It,server:xn,network:X,"circuit-board":kt,brain:R,"brain-circuit":L,bot:Ae,"shield-check":d,workflow:Vn,sigma:Be,calculator:_t,"chart-no-axes-combined":Ct,"line-chart":xt,"bar-chart-3":z,"pie-chart":wt,"chart-scatter":H,"file-spreadsheet":x,"file-chart-column-increasing":Ht,lightbulb:J,rocket:_n,target:Dn,sparkles:Cn,"file-pen-line":s,"file-stack":Wt,folder:O,"folder-open":de,"folder-archive":G,archive:nt,bookmark:ft,newspaper:sn,"notepad-text":fe,"sticky-note":Tn,"pen-tool":ln,quote:pn,"list-tree":re,"file-search":le,beaker:ct,"test-tubes":Nn,"folder-git-2":je,"git-branch":w,terminal:Ve,braces:I,regex:hn,cpu:Pt,"hard-drive":Fe,cloud:Mt,"users-round":zn,"calendar-days":yt},Zn=Kn.map(e=>({name:e}));function Qn(e){let t=Array.from(e.trim())[0];return t?t.toLocaleUpperCase():`?`}function $n({icon:e,fallback:t,size:n=18}){let r=Jn(e)?Xn[e]:null;if(r)return(0,$.jsx)(r,{"aria-hidden":`true`,size:n,strokeWidth:1.9});let i=Yn(e);if(i){let e=`url(${ne(`/api/project-icons/${encodeURIComponent(i)}`)})`;return(0,$.jsx)(`span`,{"aria-hidden":`true`,className:`project-icon-external-glyph`,style:{maskImage:e,WebkitMaskImage:e}})}return(0,$.jsx)(`span`,{"aria-hidden":`true`,children:t})}function er({icon:e,projectName:t,editable:n=!1,onEdit:r,editLabel:i,title:a,className:o=``}){let s=(0,$.jsx)($n,{icon:e,fallback:Qn(t)}),c=`project-icon-avatar${n?` editable`:``}${o?` ${o}`:``}`;return n&&r?(0,$.jsx)(`button`,{type:`button`,className:c,title:i,"aria-label":i,onClick:r,children:s}):(0,$.jsx)(`span`,{className:c,title:a,"aria-hidden":`true`,children:s})}function tr({project:e,currentUser:t,showArchived:n,archiveBusy:r,menuOpen:i,t:a,variant:s,onToggleMenu:c,onCloseMenu:u,onAssignTags:d,onRename:f,onDuplicate:p,onArchive:m,onTransfer:h,onDelete:ee}){let g=(0,Q.useRef)(null),_=e.permission===`owner`,te=t.role===`admin`||t.canCreateProjects,v=e.ownerId===t.id,y=e.permission===`owner`;(0,Q.useEffect)(()=>{if(!i)return;let e=e=>{e.target instanceof Node&&!g.current?.contains(e.target)&&u()},t=e=>{e.key===`Escape`&&u()};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[i,u]);let b=[{id:`tags`,label:a(`tags.assign`),icon:(0,$.jsx)(Ne,{"aria-hidden":!0,size:15}),section:`main`,onSelect:d},..._?[{id:`rename`,label:a(`projects.rename`),icon:(0,$.jsx)(l,{"aria-hidden":!0,size:15}),section:`main`,onSelect:f}]:[],...te?[{id:`duplicate`,label:a(`projects.duplicate`),icon:(0,$.jsx)(o,{"aria-hidden":!0,size:15}),section:`main`,onSelect:p}]:[],{id:`download`,label:a(`projects.download`),icon:(0,$.jsx)(ie,{"aria-hidden":!0,size:15}),section:`main`,href:ne(`/api/projects/${e.id}/download`)},{id:`archive`,label:a(n?`projects.unarchive`:`projects.archive`),icon:n?(0,$.jsx)(et,{"aria-hidden":!0,size:15}):(0,$.jsx)(nt,{"aria-hidden":!0,size:15}),section:`main`,disabled:r,onSelect:m},...v?[{id:`transfer`,label:a(`projects.transfer`),icon:(0,$.jsx)(at,{"aria-hidden":!0,size:15}),section:`main`,onSelect:h}]:[],...y?[{id:`delete`,label:a(`common.delete`),icon:(0,$.jsx)(he,{"aria-hidden":!0,size:15}),section:`danger`,onSelect:ee}]:[]],re=b.filter(e=>e.section===`main`),ae=b.filter(e=>e.section===`danger`),oe=e=>{e.disabled||(u(),e.onSelect?.())};return(0,$.jsxs)(`div`,{ref:g,className:`project-action-menu-root project-action-menu-${s}`,onClick:e=>e.stopPropagation(),children:[(0,$.jsx)(`button`,{type:`button`,className:`project-action-menu-trigger`,"aria-label":a(`projects.projectActions`,{project:e.name}),"aria-expanded":i,"aria-controls":`project-actions-${e.id}`,onClick:e=>{e.stopPropagation(),c()},children:(0,$.jsx)(ke,{"aria-hidden":!0,size:19})}),i&&(0,$.jsxs)(`div`,{id:`project-actions-${e.id}`,className:`project-action-menu`,role:`group`,"aria-label":a(`projects.projectActions`,{project:e.name}),children:[re.map(e=>e.href?(0,$.jsxs)(`a`,{href:e.href,download:!0,onClick:e=>{e.stopPropagation(),u()},children:[e.icon,e.label]},e.id):(0,$.jsxs)(`button`,{type:`button`,disabled:e.disabled,onClick:t=>{t.stopPropagation(),oe(e)},children:[e.icon,e.label]},e.id)),ae.length>0&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{className:`project-action-menu-separator`,"aria-hidden":`true`}),ae.map(e=>(0,$.jsxs)(`button`,{type:`button`,className:`danger`,onClick:t=>{t.stopPropagation(),oe(e)},children:[e.icon,e.label]},e.id))]})]})]})}function nr({project:e,removing:t=!1,onRemovalEnd:n,currentUser:r,showArchived:i,archiveBusy:o,menuOpen:s,t:c,formatCreatedDate:l,formatUpdatedTime:u,formatExactTime:d,onOpenProject:f,onOpenMention:p,onToggleMenu:m,onCloseMenu:h,onAssignTags:ee,onRename:g,onDuplicate:_,onArchive:te,onTransfer:v,onDelete:ne,onChooseIcon:y}){let b=e.ownerDisplayName??e.ownerUsername??c(`projects.deletedUser`),re=e.lastModifiedDisplayName??e.lastModifiedUsername??c(`projects.deletedUser`);return(0,$.jsxs)(`article`,{ref:t?we:void 0,inert:t?!0:void 0,"aria-hidden":t?!0:void 0,className:`project-card project-list-row${e.ownerId===r.id?` owned-project`:``}${s?` project-list-menu-open`:``}${t?` deletion-exit`:``}`,onAnimationEnd:e=>{e.target===e.currentTarget&&t&&n?.()},onClick:e=>{e.target===e.currentTarget&&f()},children:[(0,$.jsx)(er,{icon:e.icon,projectName:e.name,title:e.name,editable:e.permission===`owner`,editLabel:c(`projectIcons.change`),onEdit:y,className:`project-list-avatar`}),(0,$.jsx)(`span`,{className:`project-list-summary`,children:(0,$.jsxs)(`button`,{type:`button`,className:`project-list-cell-open project-list-summary-open`,onClick:f,"aria-label":c(`projects.openProject`,{project:e.name}),children:[(0,$.jsxs)(`span`,{className:`project-list-title-line`,children:[(0,$.jsx)(`strong`,{className:`project-list-title`,title:e.name,children:e.name}),!!(e.unresolvedCommentCount&&e.unresolvedCommentCount>0)&&(0,$.jsxs)(`span`,{className:`project-comments-badge unresolved`,title:c(`projects.unresolvedCommentsTooltip`,{count:e.commentCount??e.unresolvedCommentCount,unresolved:e.unresolvedCommentCount,total:e.commentCount??e.unresolvedCommentCount}),children:[(0,$.jsx)(T,{"aria-hidden":!0,size:10}),(0,$.jsx)(`span`,{children:c(`projects.unresolvedCount`,{count:e.unresolvedCommentCount})})]})]}),e.tags?.length>0&&(0,$.jsx)(k,{className:`project-list-tags`,children:e.tags.map(e=>(0,$.jsxs)(`span`,{className:`tag tag-${e.color}`,title:e.name,children:[(0,$.jsx)(`span`,{className:`tag-dot`,"aria-hidden":`true`}),(0,$.jsx)(`span`,{className:`tag-label`,children:e.name})]},e.id))})]})}),(0,$.jsxs)(`button`,{type:`button`,className:`project-list-cell-open project-list-owner`,onClick:f,title:e.ownerUsername?`@${e.ownerUsername}`:void 0,"aria-label":c(`projects.openProject`,{project:e.name}),children:[(0,$.jsxs)(`span`,{className:`sr-only`,children:[c(`projects.owner`),`: `]}),b]}),(0,$.jsxs)(`button`,{type:`button`,className:`project-list-cell-open project-list-created`,onClick:f,title:d(e.createdAt),"aria-label":c(`projects.openProject`,{project:e.name}),children:[(0,$.jsxs)(`span`,{className:`sr-only`,children:[c(`projects.created`),`: `]}),(0,$.jsx)(`time`,{dateTime:e.createdAt,children:l(e.createdAt)})]}),(0,$.jsxs)(`button`,{type:`button`,className:`project-list-cell-open project-list-modified`,onClick:f,title:d(e.updatedAt),"aria-label":c(`projects.openProject`,{project:e.name}),children:[(0,$.jsxs)(`span`,{className:`sr-only`,children:[c(`projects.modified`),`: `]}),(0,$.jsx)(`time`,{dateTime:e.updatedAt,children:u(e.updatedAt)}),(0,$.jsx)(`small`,{children:c(`projects.byUser`,{user:re})})]}),e.unreadMentionCount&&e.unreadMentionCount>0?(0,$.jsxs)(`button`,{className:`project-mentions-badge project-list-mentions`,type:`button`,title:c(`projects.unreadMentionsTooltip`,{count:e.unreadMentionCount}),onClick:p,children:[(0,$.jsx)(a,{"aria-hidden":!0,size:10}),(0,$.jsx)(`span`,{children:e.unreadMentionCount})]}):(0,$.jsx)(`span`,{className:`project-list-mentions`}),(0,$.jsx)(tr,{variant:`list`,project:e,currentUser:r,showArchived:i,archiveBusy:o,menuOpen:s,t:c,onToggleMenu:m,onCloseMenu:h,onAssignTags:ee,onRename:g,onDuplicate:_,onArchive:te,onTransfer:v,onDelete:ne})]})}var rr=[`all`,`owned`,`shared`],ir={all:`projects.allProjects`,owned:`projects.ownedByMe`,shared:`projects.sharedWithMe`};function ar({value:e,counts:t,onChange:n}){let{t:r}=g();return(0,$.jsx)(`div`,{className:`project-ownership-tabs`,role:`tablist`,"aria-label":r(`projects.ownership`),children:rr.map((i,a)=>(0,$.jsxs)(`button`,{id:`project-tab-${i}`,type:`button`,role:`tab`,"aria-selected":e===i,"aria-controls":`project-catalog-panel`,tabIndex:e===i?0:-1,onClick:()=>n(i),onKeyDown:e=>{let t;if(e.key===`ArrowRight`)t=(a+1)%rr.length;else if(e.key===`ArrowLeft`)t=(a+rr.length-1)%rr.length;else if(e.key===`Home`)t=0;else if(e.key===`End`)t=rr.length-1;else return;e.preventDefault(),n(rr[t]),e.currentTarget.parentElement?.querySelector(`#project-tab-${rr[t]}`)?.focus()},children:[(0,$.jsx)(`span`,{children:r(ir[i])}),t[i]>0&&(0,$.jsx)(`sup`,{children:t[i]})]},i))})}function or({preview:e}){let t=e==null||!!(e.title||e.abstract);return(0,$.jsx)(`div`,{className:`project-paper`,"aria-hidden":`true`,children:t&&(0,$.jsxs)($.Fragment,{children:[e?.title?(0,$.jsx)(`div`,{className:`project-paper-title`,children:e.title}):(0,$.jsxs)(`div`,{className:`project-paper-heading`,children:[(0,$.jsx)(`span`,{}),(0,$.jsx)(`span`,{})]}),(0,$.jsx)(`span`,{className:`project-paper-byline`}),(0,$.jsx)(`div`,{className:`project-paper-abstract-label`,children:`Abstract`}),e?.abstract&&(0,$.jsx)(`p`,{className:`project-paper-summary`,children:e.abstract}),(0,$.jsxs)(`div`,{className:`project-paper-lines`,children:[(0,$.jsx)(`span`,{}),(0,$.jsx)(`span`,{}),(0,$.jsx)(`span`,{}),(0,$.jsx)(`span`,{}),(0,$.jsx)(`span`,{})]})]})})}function sr({removing:e,onRemovalEnd:t,onOpenProject:n,onOpenMention:r,formatUpdatedTime:i,formatExactTime:o,...s}){let{project:c,t:l}=s,u=c.ownerDisplayName??c.ownerUsername??l(`projects.deletedUser`),d=c.lastModifiedDisplayName??c.lastModifiedUsername??l(`projects.deletedUser`),f=(0,$.jsxs)(`div`,{className:`project-details-tooltip project-name-tooltip`,children:[(0,$.jsx)(`strong`,{children:c.name}),` `,(0,$.jsx)(`span`,{className:`project-details-person`,children:(0,$.jsx)(h,{t:l,i18nKey:`projects.ownedBy`,values:{user:u},components:{user:(0,$.jsx)(`strong`,{className:`project-details-name`})}})})]}),p=(0,$.jsx)(`div`,{className:`project-details-tooltip`,children:(0,$.jsxs)(`ul`,{children:[(0,$.jsxs)(`li`,{children:[(0,$.jsx)(yt,{"aria-hidden":!0,size:14}),(0,$.jsx)(`div`,{children:(0,$.jsx)(`time`,{dateTime:c.createdAt,children:l(`projects.createdAt`,{time:o(c.createdAt)})})})]}),(0,$.jsxs)(`li`,{children:[(0,$.jsx)(yn,{"aria-hidden":!0,size:14}),(0,$.jsx)(`div`,{children:(0,$.jsx)(`time`,{dateTime:c.updatedAt,children:(0,$.jsx)(h,{t:l,i18nKey:`projects.lastModifiedAt`,values:{time:o(c.updatedAt),user:d},components:{user:(0,$.jsx)(`strong`,{className:`project-details-name`})}})})})]})]})});return(0,$.jsxs)(`article`,{ref:e?we:void 0,inert:e?!0:void 0,"aria-hidden":e?!0:void 0,className:`project-card project-grid-card${s.menuOpen?` project-card-menu-open`:``}${e?` deletion-exit`:``}`,onAnimationEnd:n=>{n.target===n.currentTarget&&e&&t()},children:[(0,$.jsxs)(`button`,{type:`button`,className:`project-card-open`,"aria-label":l(`projects.openProject`,{project:c.name}),onClick:n,children:[(0,$.jsxs)(`div`,{className:`project-card-thumbnail`,children:[(0,$.jsx)(or,{preview:c.preview}),(0,$.jsx)(k,{className:`project-card-tags`,title:c.tags.map(e=>e.name).join(`, `),children:c.tags.map(e=>(0,$.jsxs)(`span`,{className:`tag tag-${e.color}`,children:[(0,$.jsx)(`span`,{className:`tag-dot`,"aria-hidden":`true`}),(0,$.jsx)(`span`,{className:`tag-label`,children:e.name})]},e.id))})]}),(0,$.jsxs)(`div`,{className:`project-card-caption`,children:[(0,$.jsx)(A,{text:c.name,content:f,children:(0,$.jsx)(`strong`,{className:`project-card-title`,children:c.name})}),(0,$.jsxs)(`div`,{className:`project-card-metadata`,children:[(0,$.jsx)(A,{text:o(c.updatedAt),content:p,children:(0,$.jsxs)(`time`,{dateTime:c.updatedAt,children:[(0,$.jsx)(At,{"aria-hidden":!0,size:12,strokeWidth:1.75}),(0,$.jsx)(`span`,{children:i(c.updatedAt)})]})}),(0,$.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,$.jsx)(`span`,{className:`project-card-modifier`,children:l(`projects.byUserInline`,{user:d})})]})]})]}),(0,$.jsxs)(`div`,{className:`project-card-badges`,children:[!!(c.unreadMentionCount&&c.unreadMentionCount>0)&&(0,$.jsxs)(`button`,{className:`project-mentions-badge`,type:`button`,title:l(`projects.unreadMentionsTooltip`,{count:c.unreadMentionCount}),"aria-label":l(`projects.unreadMentionsTooltip`,{count:c.unreadMentionCount}),onClick:r,children:[(0,$.jsx)(a,{"aria-hidden":!0,size:12}),(0,$.jsx)(`span`,{children:c.unreadMentionCount})]}),!!(c.unresolvedCommentCount&&c.unresolvedCommentCount>0)&&(0,$.jsxs)(`button`,{className:`project-comments-badge unresolved`,type:`button`,"data-tooltip":l(`projects.unresolvedCount`,{count:c.unresolvedCommentCount}),"aria-label":l(`projects.unresolvedCount`,{count:c.unresolvedCommentCount}),onClick:n,children:[(0,$.jsx)(T,{"aria-hidden":!0,size:12}),(0,$.jsx)(`span`,{children:c.unresolvedCommentCount})]})]}),(0,$.jsx)(tr,{...s,variant:`grid`})]})}var cr=e({Dashboard:()=>Sr}),lr=e=>e.id,ur=[],dr=`(max-width: 1250px)`,fr=()=>window.matchMedia?.(dr).matches??!1,pr=e=>{let t=window.matchMedia?.(dr);return t?.addEventListener(`change`,e),()=>t?.removeEventListener(`change`,e)},mr=(e,t,n,r,i,a)=>JSON.stringify([e,t,n,r,i,a]),hr=(0,Q.lazy)(()=>y(()=>import(`./SystemMetricsDialog-DkmBA4o4.js`).then(e=>({default:e.SystemMetricsDialog})),__vite__mapDeps([20,1,2,3,4,7,5,6,8,9,10,11,12,13,14,15,21,22,23]),import.meta.url)),gr=(0,Q.lazy)(()=>y(()=>import(`./CitationLibraryDialog-DgOIkLwK.js`).then(e=>({default:e.CitationLibraryDialog})),__vite__mapDeps([24,1,2,25,4,3,6,7,5,8,9,10,11,12,13,14,15,16,26,27,22,28,29,17,18,19,30,31,32,33,34,35,36,37,38,39]),import.meta.url)),_r=(0,Q.lazy)(()=>y(()=>import(`./AdminUsers-DepqkT6m.js`).then(e=>({default:e.AdminUsers})),__vite__mapDeps([40,1,2,25,4,3,6,7,5,8,9,10,11,12,13,14,15,18,22,41,19,42,38]),import.meta.url)),vr=(0,Q.lazy)(()=>y(()=>import(`./AgentManagement-DlV6tHez.js`).then(e=>({default:e.AgentManagement})),__vite__mapDeps([43,1,2,25,4,3,6,7,5,8,9,10,11,12,13,14,15,44,18,45,46,22,23,17,38]),import.meta.url)),yr=(0,Q.lazy)(()=>y(()=>import(`./TagManagementDialog-BM1MRuwh.js`).then(e=>({default:e.TagManagementDialog})),__vite__mapDeps([47,1,2,25,4,3,6,7,5,8,9,10,11,12,13,14,15,29,17,18,38,39,16,30]),import.meta.url)),br=(0,Q.lazy)(()=>y(()=>import(`./ProjectIconPickerDialog-Bfkaxcnh.js`).then(e=>({default:e.ProjectIconPickerDialog})),__vite__mapDeps([48,1,2,3,4,17,7,18,13,19,10,11,6,12,14,9,15]),import.meta.url)),xr=(0,Q.lazy)(()=>y(()=>import(`./GitHubAccountDialog-CGZl3mcY.js`).then(e=>({default:e.GitHubAccountDialog})),__vite__mapDeps([49,1,2,3,4,7,5,6,8,9,10,11,12,13,14,15,50,22,17,18,38]),import.meta.url));function Sr({site:e,user:t,initialData:n,onDataChange:r,onUser:a,onOpenProject:o}){let{t:s}=g(),l={"data-texlite-tooltips":(0,Q.useSyncExternalStore)(pr,fr,()=>!1)?void 0:`off`},[d,m]=(0,Q.useState)(()=>n?.projects??[]),[_,y]=(0,Q.useState)(()=>n?.tags??[]),[b,re]=(0,Q.useState)(()=>n?.pagination??{page:1,pageSize:32,total:n?.projects.length??0,totalPages:+!!n?.projects.length}),[ie,oe]=(0,Q.useState)(()=>n?.counts??{all:0,owned:0,shared:0}),[x,le]=(0,Q.useState)(()=>n?.filters.ownership??`all`),[S,fe]=(0,Q.useState)(!1),[C,he]=(0,Q.useState)(!1),_e=c(t.id),{showExecutionReminder:ve}=p(),[ye,xe]=(0,Q.useState)(!1),[w,T]=(0,Q.useState)(!1),[Se,we]=(0,Q.useState)(!1),[Ee,ke]=(0,Q.useState)(``),[Ae,E]=(0,Q.useState)(``),[je,D]=(0,Q.useState)(``),[Me,O]=(0,Q.useState)(``),[Pe,k]=(0,Q.useState)(``),[Fe,Ie]=(0,Q.useState)(``),[Le,ze]=(0,Q.useState)(!1),[Be,Ve]=(0,Q.useState)(``),[A,Ze]=(0,Q.useState)(!1),[$e,et]=(0,Q.useState)(!1),[tt,rt]=(0,Q.useState)(``),[P,ot]=(0,Q.useState)(null),[st,F]=(0,Q.useState)(``),[ct,lt]=(0,Q.useState)(null),[ut,dt]=(0,Q.useState)(null),ft=(0,Q.useRef)(null),pt=(0,Q.useRef)(null),[I,mt]=(0,Q.useState)(!1),[L,ht]=(0,Q.useState)(()=>n?.filters.search??``),[R,gt]=(0,Q.useState)(()=>n?.filters.tag??``),[_t,vt]=(0,Q.useState)(!1),[yt,bt]=(0,Q.useState)(!1),[z,B]=(0,Q.useState)(null),[xt,St]=(0,Q.useState)(null),[Ct,V]=(0,Q.useState)(null),[wt,Tt]=(0,Q.useState)(``),[H,Et]=(0,Q.useState)(!1),[Dt,Ot]=(0,Q.useState)(null),[kt,U]=(0,Q.useState)(``),[At,jt]=(0,Q.useState)(!1),[Mt,Nt]=(0,Q.useState)(null),[Pt,Ft]=(0,Q.useState)(!1),[It,Lt]=(0,Q.useState)(null),[Rt,zt]=(0,Q.useState)(null),[Bt,Vt]=(0,Q.useState)([]),[Ht,Ut]=(0,Q.useState)(``),[Wt,Gt]=(0,Q.useState)(!1),[Kt,W]=(0,Q.useState)(``),[G,qt]=(0,Q.useState)(()=>Ge(v(`texlite-project-view`))===`list`?`list`:`grid`),[K,Yt]=(0,Q.useState)(()=>n?.filters.sort??(Ge(v(`texlite-project-sort`))===`created`?`created`:`updated`)),[q,Xt]=(0,Q.useState)(()=>n?.filters.archived??!1),[Zt,Qt]=(0,Q.useState)(``),[$t,J]=(0,Q.useState)(null),[en,Y]=(0,Q.useState)(()=>n?.pagination.page??1),tn=u(),[nn,rn]=(0,Q.useState)(()=>n?mr(n.filters.ownership,n.filters.archived,n.pagination.page,n.filters.search,n.filters.tag,n.filters.sort):``),[an,on]=(0,Q.useState)(0),X=()=>on(e=>e+1),Z=(0,Q.useRef)(0),sn=(0,Q.useRef)(null),cn=mr(x,q,en,L,R,K),ln=nn===cn,{entries:un,finishExit:dn}=Ce(ln?d:ur,{scopeKey:`${cn}|${G}|${S}|${w}`,deletedKey:It,keyOf:lr,duration:250}),fn=(e,t,n,r,i,a)=>{let o=new URLSearchParams({page:String(n),pageSize:`32`,sort:a,scope:e});G===`grid`&&o.set(`previews`,`1`),t&&o.set(`archived`,`1`),r.trim()&&o.set(`search`,r.trim()),i&&o.set(`tag`,i),ke(``);let s=++Z.current;sn.current?.abort();let c=new AbortController;return sn.current=c,Promise.all([M(`/api/projects?${o.toString()}`,{signal:c.signal}),M(`/api/tags`,{signal:c.signal})]).then(([n,o])=>{s===Z.current&&(m(n.projects),y(o.tags),re(n.pagination),Y(n.pagination.page),oe(n.counts),rn(mr(e,t,n.pagination.page,r,i,a)))}).catch(e=>{!He(e)&&s===Z.current&&ke(N(e))}).finally(()=>{sn.current===c&&(sn.current=null)})};(0,Q.useEffect)(()=>(fn(x,q,en,L,R,K),()=>sn.current?.abort()),[x,q,en,L,R,K,an,G]),(0,Q.useEffect)(()=>{ln&&r({projects:d,tags:_,pagination:b,counts:ie,filters:{ownership:x,archived:q,search:L,tag:R,sort:K}})},[d,_,b,ie,nn,cn]),(0,Q.useEffect)(()=>{if(!_t)return;let e=e=>{e.target instanceof Node&&!pt.current?.contains(e.target)&&vt(!1)},t=e=>{e.key===`Escape`&&vt(!1)};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[_t]);let pn=e=>{J(null),qt(e),Je(v(`texlite-project-view`),e)},mn=e=>{Yt(e),Y(1),Je(v(`texlite-project-sort`),e)},hn=e=>{e!==x&&(le(e),Y(1),J(null))},gn=e=>{Xt(e),Y(1)},_n=e=>{gt(e),Y(1)},vn=async()=>{if(Be.trim()&&!A){Ze(!0),E(``);try{let{project:e}=await M(`/api/projects`,{method:`POST`,body:JSON.stringify({name:Be})});ze(!1),Ve(``),o(e.id)}catch(e){E(N(e))}finally{Ze(!1)}}},yn=async()=>{if(!P)return;let t=P,n=e.maxUploadSizeMB;if(t.size>n*1024*1024)return F(s(`errors.fileTooLarge`,{size:n}));mt(!0),F(``),lt(`uploading`),dt(0);let r=new FormData;r.append(`file`,t);try{let{project:e}=await Ue(`/api/projects/import?name=${encodeURIComponent(tt.trim())}`,r,{onProgress:(e,t)=>{dt(t?Math.min(99,Math.floor(e/t*100)):null)},onUploadComplete:()=>{dt(null),lt(`processing`)}});et(!1),ot(null),rt(``),o(e.id)}catch(e){F(N(e))}finally{mt(!1),lt(null),dt(null)}},bn=e=>{I||(e&&!e.name.toLocaleLowerCase().endsWith(`.zip`)?F(s(`errors.zipOnly`)):(F(``),ot(e),e&&!tt&&rt(e.name.replace(/\.zip$/i,``))))},xn=async()=>{await M(`/api/auth/logout`,{method:`POST`}),a(null)},Sn=async e=>{if(!z)return;let t=z.tags.some(t=>t.id===e.id);D(``);try{let n=(await M(t?`/api/projects/${z.id}/tags/${e.id}`:`/api/projects/${z.id}/tags`,t?{method:`DELETE`}:{method:`POST`,body:JSON.stringify({tagId:e.id})})).project;B(n),m(e=>e.map(e=>e.id===n.id?n:e)),X()}catch(e){D(N(e))}},wn=e=>{y(t=>[...t,e].sort((e,t)=>e.name.localeCompare(t.name)))},Tn=e=>{let t=t=>t.map(t=>t.id===e.id?e:t);y(e=>t(e).sort((e,t)=>e.name.localeCompare(t.name))),m(e=>e.map(e=>({...e,tags:t(e.tags)}))),B(e=>e?{...e,tags:t(e.tags)}:null),X()},En=e=>{y(t=>t.filter(t=>t.id!==e)),m(t=>t.map(t=>({...t,tags:t.tags.filter(t=>t.id!==e)}))),B(t=>t?{...t,tags:t.tags.filter(t=>t.id!==e)}:null),gt(t=>t===e?``:t),Y(1),X()},Dn=async(e,t)=>{let n=await M(`/api/projects/${e}/icon`,{method:`PATCH`,body:JSON.stringify({icon:t})});m(e=>{let t=e.map(e=>e.id===n.project.id?n.project:e);return K===`updated`?t.sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt)||e.name.localeCompare(t.name)):t}),X()},On=async()=>{if(Ct&&wt.trim()&&!H){Et(!0),O(``);try{let e=await M(`/api/projects/${Ct.id}`,{method:`PATCH`,body:JSON.stringify({name:wt})});m(t=>t.map(t=>t.id===e.project.id?e.project:t)),V(null),Tt(``),X()}catch(e){O(N(e))}finally{Et(!1)}}},kn=async()=>{if(Dt&&kt.trim()){jt(!0),k(``);try{await M(`/api/projects/${Dt.id}/duplicate`,{method:`POST`,body:JSON.stringify({name:kt})}),Ot(null),U(``),X()}catch(e){k(N(e))}finally{jt(!1)}}},An=async()=>{if(!Mt||Pt)return;Ft(!0),Ie(``);let e=Z.current;try{await M(`/api/projects/${Mt.id}`,{method:`DELETE`}),e===Z.current&&(Lt(Mt.id),Nn(Mt,`delete`)),Nt(null),X()}catch(e){Ie(N(e))}finally{Ft(!1)}},jn=async e=>{zt(e),Ut(``),Vt([]),W(``),Gt(!0);try{let t=await M(`/api/users`);Vt(t.users.filter(t=>t.id!==e.ownerId))}catch(e){W(N(e))}finally{Gt(!1)}},Mn=async()=>{if(Rt&&Ht){Gt(!0),W(``);try{await M(`/api/projects/${Rt.id}/owner`,{method:`PUT`,body:JSON.stringify({userId:Ht})}),zt(null),Ut(``),X()}catch(e){W(N(e))}finally{Gt(!1)}}},Nn=(e,n)=>{m(t=>t.filter(t=>t.id!==e.id)),n===`delete`&&oe(n=>({...n,all:Math.max(0,n.all-1),[e.ownerId===t.id?`owned`:`shared`]:Math.max(0,n[e.ownerId===t.id?`owned`:`shared`]-1)}));let r=Math.max(0,b.total-1),i=Math.ceil(r/b.pageSize),a=i===0?1:Math.min(en,i);re({...b,page:a,total:r,totalPages:i}),Y(a)},Pn=async e=>{let t=!q;Qt(e.id),ke(``);let n=Z.current;try{await M(`/api/projects/${e.id}/archive`,{method:t?`PUT`:`DELETE`}),n===Z.current&&Nn(e,`archive`),X()}catch(e){ke(N(e))}finally{Qt(``)}},Fn=async e=>{try{let t=(await M(`/api/projects/${e.id}/mentions?unread=1&limit=1`)).mentions[0];o(e.id,t?.id)}catch(e){ke(N(e))}},In=e=>be(e,te.resolvedLanguage),Ln=e=>be(e,te.resolvedLanguage??`en`,{year:`numeric`,month:`2-digit`,day:`2-digit`}),Rn=(e,t)=>f(e,te.resolvedLanguage??`en`,tn,(e,t)=>s(e,t),t);return(0,$.jsxs)(`div`,{className:`page`,children:[(0,$.jsxs)(`header`,{className:`topbar`,children:[(0,$.jsxs)(`a`,{className:`brand-link`,href:ne(`/`),"aria-label":e.siteName,children:[(0,$.jsx)(Xe,{siteName:e.siteName}),(0,$.jsx)(`span`,{className:`site-title`,children:e.siteName})]}),(0,$.jsxs)(`div`,{className:`top-actions`,children:[t.role===`admin`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`button`,{...l,className:`ghost`,"aria-label":s(`metrics.title`),"data-tooltip":s(`metrics.title`),onClick:()=>xe(!0),children:[(0,$.jsx)(Qe,{"aria-hidden":!0,size:14}),(0,$.jsx)(`span`,{className:`top-action-label`,children:s(`metrics.title`)})]}),(0,$.jsxs)(`button`,{...l,className:`ghost${S?` top-return-action`:``}`,"aria-label":s(S?`users.back`:`users.manage`),"data-tooltip":s(S?`users.back`:`users.manage`),onClick:()=>{fe(e=>!e),he(!1),T(!1)},children:[S?(0,$.jsx)(ge,{"aria-hidden":!0,size:14}):(0,$.jsx)(me,{"aria-hidden":!0,size:14}),(0,$.jsx)(`span`,{className:`top-action-label`,children:s(S?`users.back`:`users.manage`)})]})]}),(0,$.jsxs)(`button`,{...l,className:`ghost${w?` top-return-action`:``}`,"aria-label":s(w?`users.back`:`citationLibrary.title`),"data-tooltip":s(w?`users.back`:`citationLibrary.title`),onClick:()=>{fe(!1),he(!1),T(e=>!e)},children:[w?(0,$.jsx)(ge,{"aria-hidden":!0,size:14}):(0,$.jsx)(ee,{"aria-hidden":!0,size:14}),(0,$.jsx)(`span`,{className:`top-action-label`,children:s(w?`users.back`:`citationLibrary.title`)})]}),(t.role===`admin`||_e.visible)&&(0,$.jsxs)(`button`,{...l,className:`ghost${C?` top-return-action`:``}`,"aria-label":s(C?`agents.back`:t.role===`admin`?`agents.title`:`agents.tasks`),"data-tooltip":s(C?`agents.back`:t.role===`admin`?`agents.title`:`agents.tasks`),onClick:()=>{he(e=>!e),fe(!1),T(!1)},children:[C?(0,$.jsx)(ge,{"aria-hidden":!0,size:14}):(0,$.jsx)(se,{"aria-hidden":!0,size:14}),(0,$.jsx)(`span`,{className:`top-action-label`,children:s(C?`agents.back`:t.role===`admin`?`agents.title`:`agents.tasks`)}),ve&&!C&&_e.activeCount>0&&(0,$.jsx)(`sup`,{className:`agent-active-count`,"aria-label":s(`agents.activeCount`,{count:_e.activeCount}),children:_e.activeCount})]}),(0,$.jsx)(Un,{user:t,onGitHub:()=>we(!0),onSignOut:xn,onUserChange:a})]})]}),t.role===`admin`&&(0,$.jsx)(`div`,{className:`dashboard-update`,children:(0,$.jsx)(Gn,{userId:t.id},t.id)}),C?(0,$.jsx)(`main`,{className:`dashboard`,children:(0,$.jsx)(Ye,{onClose:()=>he(!1),children:(0,$.jsx)(vr,{user:t,onBack:()=>he(!1)})})}):S?(0,$.jsx)(`main`,{className:`dashboard`,children:(0,$.jsx)(Ye,{onClose:()=>fe(!1),children:(0,$.jsx)(_r,{currentUser:t,minPasswordLength:e.minPasswordLength,onBack:()=>fe(!1)})})}):w?(0,$.jsx)(`main`,{className:`dashboard`,children:(0,$.jsx)(Ye,{onClose:()=>T(!1),children:(0,$.jsx)(gr,{page:!0,open:!0,onOpenChange:T,onBack:()=>T(!1),currentUserId:t.id,maxBibtexBytes:e.maxCitationBibtexBytes})})}):(0,$.jsxs)(`main`,{className:`dashboard`,children:[(0,$.jsxs)(`div`,{className:`section-title project-catalog-heading`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`h1`,{children:[(0,$.jsx)(Jt,{"aria-hidden":!0,size:25}),s(`projects.title`)]}),(0,$.jsx)(`p`,{className:`muted`,children:t.canCreateProjects?s(`projects.subtitle`):s(`projects.restricted`)})]}),(0,$.jsxs)(`div`,{className:`section-actions`,children:[(0,$.jsxs)(`button`,{...l,"aria-label":s(`tags.manage`),"data-tooltip":s(`tags.manage`),onClick:()=>bt(!0),children:[(0,$.jsx)(Ne,{"aria-hidden":!0,size:15}),(0,$.jsx)(`span`,{className:`project-action-label`,children:s(`tags.manage`)})]}),t.canCreateProjects&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`button`,{...l,"aria-label":s(`projects.upload`),"data-tooltip":s(`projects.upload`),onClick:()=>{F(``),et(!0)},children:[(0,$.jsx)(ae,{"aria-hidden":!0,size:15}),(0,$.jsx)(`span`,{className:`project-action-label`,children:s(`projects.upload`)})]}),(0,$.jsxs)(`button`,{...l,className:`primary`,"aria-label":s(`projects.new`),"data-tooltip":s(`projects.new`),onClick:()=>{E(``),ze(!0)},children:[(0,$.jsx)(ue,{"aria-hidden":!0,size:15}),(0,$.jsx)(`span`,{className:`project-action-label`,children:s(`projects.new`)})]})]})]})]}),(0,$.jsx)(ar,{value:x,counts:ie,onChange:hn}),Ee&&(0,$.jsx)(`p`,{className:`error`,children:Ee}),(0,$.jsxs)(`div`,{className:`project-catalog-layout`,children:[(0,$.jsxs)(`aside`,{ref:pt,className:`project-tag-sidebar${R?` has-active-filter`:``}`,children:[(0,$.jsxs)(`button`,{type:`button`,className:`project-tag-toggle`,title:s(`projects.filterTags`),"aria-label":s(`projects.filterTags`),"aria-expanded":_t,"aria-controls":`dashboard-tag-filters`,onClick:()=>vt(e=>!e),children:[(0,$.jsxs)(`span`,{className:`project-tag-toggle-copy`,children:[(0,$.jsx)(Ne,{"aria-hidden":!0,size:15}),(0,$.jsx)(`span`,{children:s(`projects.filterTags`)})]}),(0,$.jsx)(ce,{className:`project-tag-toggle-chevron`,"aria-hidden":!0,size:15})]}),_t&&(0,$.jsxs)(`div`,{id:`dashboard-tag-filters`,className:`project-tag-filters`,role:`group`,"aria-label":s(`projects.filterTags`),children:[(0,$.jsx)(`button`,{type:`button`,className:R?``:`active`,"aria-pressed":!R,onClick:()=>_n(``),children:s(`projects.allTags`)}),_.length>0?_.map(e=>(0,$.jsxs)(`button`,{type:`button`,className:R===e.id?`active`:``,title:e.name,"aria-pressed":R===e.id,onClick:()=>_n(R===e.id?``:e.id),children:[(0,$.jsx)(Cr,{color:e.color}),(0,$.jsx)(`span`,{children:e.name})]},e.id)):(0,$.jsx)(`p`,{className:`project-tag-empty`,children:s(`tags.none`)})]})]}),(0,$.jsx)(`div`,{className:`project-catalog-content`,children:(0,$.jsxs)(`section`,{id:`project-catalog-panel`,role:`tabpanel`,"aria-labelledby":`project-tab-${x}`,"aria-busy":!ln&&!Ee,children:[(0,$.jsxs)(`div`,{className:`project-toolbar`,children:[(0,$.jsx)(`input`,{type:`search`,placeholder:s(`projects.search`),value:L,onChange:e=>{ht(e.target.value),Y(1)}}),(0,$.jsxs)(`div`,{className:`project-scope`,role:`group`,"aria-label":s(`projects.scope`),children:[(0,$.jsxs)(`button`,{className:q?``:`active`,onClick:()=>gn(!1),"aria-pressed":!q,children:[(0,$.jsx)(de,{size:14}),s(`projects.active`)]}),(0,$.jsxs)(`button`,{className:q?`active`:``,onClick:()=>gn(!0),"aria-pressed":q,children:[(0,$.jsx)(nt,{size:14}),s(`projects.archived`)]})]}),(0,$.jsxs)(`label`,{className:`project-sort`,children:[(0,$.jsx)(it,{size:14}),(0,$.jsx)(`span`,{children:s(`projects.sortBy`)}),(0,$.jsxs)(`select`,{value:K,onChange:e=>mn(e.target.value),children:[(0,$.jsx)(`option`,{value:`updated`,children:s(`projects.sortModified`)}),(0,$.jsx)(`option`,{value:`created`,children:s(`projects.sortCreated`)})]})]}),(0,$.jsxs)(`div`,{className:`view-toggle`,children:[(0,$.jsx)(`button`,{className:G===`grid`?`active`:``,onClick:()=>pn(`grid`),title:s(`projects.grid`),children:`▦`}),(0,$.jsx)(`button`,{className:G===`list`?`active`:``,onClick:()=>pn(`list`),title:s(`projects.list`),children:`☷`})]})]}),!ln&&!Ee&&(0,$.jsxs)(`div`,{className:`project-catalog-loading`,role:`status`,children:[(0,$.jsx)(Re,{className:`spin`,size:17,"aria-hidden":!0}),s(`common.loading`)]}),(0,$.jsxs)(`div`,{className:`project-grid ${G===`list`?`list-view`:``}${$t?` project-list-menu-active`:``}`,children:[G===`list`&&un.length>0&&(0,$.jsxs)(`div`,{className:`project-list-header`,"aria-hidden":`true`,children:[(0,$.jsx)(`span`,{className:`project-list-header-avatar`}),(0,$.jsx)(`span`,{children:s(`projects.title`)}),(0,$.jsx)(`span`,{children:s(`projects.owner`)}),(0,$.jsx)(`span`,{className:`project-list-header-created`,children:s(`projects.created`)}),(0,$.jsx)(`span`,{className:`project-list-header-modified`,children:s(`projects.modified`)}),(0,$.jsx)(`span`,{className:`project-list-header-mentions`,children:s(`projects.mentionsColumn`)}),(0,$.jsx)(`span`,{className:`project-list-header-actions`,children:s(`projects.actions`)})]}),G===`list`?un.map(({item:e,removeAt:n})=>(0,$.jsx)(nr,{project:e,removing:n!==null,onRemovalEnd:()=>dn(e.id),currentUser:t,showArchived:q,archiveBusy:Zt===e.id,menuOpen:$t===e.id,t:s,formatCreatedDate:Ln,formatUpdatedTime:Rn,formatExactTime:In,onOpenProject:()=>{J(null),o(e.id)},onOpenMention:()=>void Fn(e),onToggleMenu:()=>J(t=>t===e.id?null:e.id),onCloseMenu:()=>J(t=>t===e.id?null:t),onAssignTags:()=>{D(``),B(e)},onRename:()=>{O(``),V(e),Tt(e.name)},onDuplicate:()=>{k(``),Ot(e),U(`${e.name} (1)`)},onArchive:()=>void Pn(e),onTransfer:()=>void jn(e),onDelete:()=>{Nt(e),Ie(``)},onChooseIcon:()=>St(e)},e.id)):un.map(({item:e,removeAt:n})=>(0,$.jsx)(sr,{project:e,currentUser:t,removing:n!==null,onRemovalEnd:()=>dn(e.id),showArchived:q,archiveBusy:Zt===e.id,menuOpen:$t===e.id,t:s,formatUpdatedTime:e=>Rn(e,{singleUnit:!0}),formatExactTime:In,onOpenProject:()=>{J(null),o(e.id)},onOpenMention:()=>void Fn(e),onToggleMenu:()=>J(t=>t===e.id?null:e.id),onCloseMenu:()=>J(t=>t===e.id?null:t),onAssignTags:()=>{D(``),B(e)},onRename:()=>{O(``),V(e),Tt(e.name)},onDuplicate:()=>{k(``),Ot(e),U(`${e.name} (1)`)},onArchive:()=>void Pn(e),onTransfer:()=>void jn(e),onDelete:()=>{Nt(e),Ie(``)}},e.id)),ln&&un.length===0&&(L.trim()||R?(0,$.jsx)(`div`,{className:`empty`,children:s(`projects.noMatches`)}):q?(0,$.jsxs)(`div`,{className:`project-empty project-empty-archived`,children:[(0,$.jsx)(`span`,{className:`project-empty-icon`,children:(0,$.jsx)(nt,{"aria-hidden":`true`,size:25,strokeWidth:1.5})}),(0,$.jsx)(`h2`,{children:s(`projects.noArchived`)}),(0,$.jsx)(`p`,{children:s(`projects.noArchivedDescription`)}),(0,$.jsxs)(`button`,{type:`button`,className:`project-empty-action`,onClick:()=>gn(!1),children:[(0,$.jsx)(ge,{"aria-hidden":`true`,size:14}),s(`projects.backToActive`)]})]}):x===`shared`?(0,$.jsxs)(`div`,{className:`project-empty`,children:[(0,$.jsx)(`span`,{className:`project-empty-icon`,children:(0,$.jsx)(me,{size:28,"aria-hidden":!0})}),(0,$.jsx)(`h2`,{children:s(`projects.noShared`)}),(0,$.jsx)(`p`,{children:s(`projects.emptyRestricted`)})]}):(0,$.jsxs)(`div`,{className:`project-empty`,children:[(0,$.jsx)(`span`,{className:`project-empty-icon`,children:(0,$.jsx)(Cn,{size:28})}),(0,$.jsx)(`h2`,{children:s(`projects.emptyTitle`)}),(0,$.jsx)(`p`,{children:t.canCreateProjects?s(`projects.emptyDescription`):s(`projects.emptyRestricted`)})]}))]}),ln&&b.totalPages>1&&(0,$.jsxs)(`nav`,{className:`project-pagination`,"aria-label":s(`projects.pagination`),children:[(0,$.jsxs)(`button`,{disabled:b.page<=1,onClick:()=>Y(e=>Math.max(1,e-1)),title:s(`projects.previousPage`),children:[(0,$.jsx)(i,{size:15}),s(`projects.previousPage`)]}),(0,$.jsx)(`span`,{children:s(`projects.pageOf`,{page:b.page,totalPages:b.totalPages,count:b.total})}),(0,$.jsxs)(`button`,{disabled:b.page>=b.totalPages,onClick:()=>Y(e=>Math.min(b.totalPages,e+1)),title:s(`projects.nextPage`),children:[(0,$.jsx)(ce,{size:15}),s(`projects.nextPage`)]})]})]})})]}),(0,$.jsx)(j,{className:`management-dialog`,open:Le,title:s(`projects.new`),description:s(`projects.newDescription`),onOpenChange:e=>{(e||!A)&&(ze(e),e||E(``))},footer:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`button`,{disabled:A,onClick:()=>ze(!1),children:s(`common.cancel`)}),(0,$.jsxs)(`button`,{className:`primary`,disabled:A||!Be.trim(),"aria-busy":A,onClick:()=>void vn(),children:[A&&(0,$.jsx)(Re,{className:`spin`,size:14}),s(A?`common.loading`:`common.create`)]})]}),children:(0,$.jsxs)($.Fragment,{children:[Ae&&(0,$.jsx)(`p`,{className:`error dialog-error`,children:Ae}),(0,$.jsxs)(`label`,{className:`form-field`,children:[s(`projects.name`),(0,$.jsx)(`input`,{autoFocus:!0,value:Be,onChange:e=>{Ve(e.target.value),E(``)},onKeyDown:e=>{e.key===`Enter`&&vn()}})]})]})}),(0,$.jsx)(j,{className:`management-dialog`,open:$e,title:s(`projects.upload`),description:s(`projects.uploadDescription`,{size:e.maxUploadSizeMB}),onOpenChange:e=>{(e||!I)&&(et(e),e||F(``))},footer:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`button`,{disabled:I,onClick:()=>{et(!1),F(``)},children:s(`common.cancel`)}),(0,$.jsxs)(`button`,{className:`primary`,disabled:!P||I,"aria-busy":I,onClick:()=>void yn(),children:[I&&(0,$.jsx)(Re,{className:`spin`,size:14}),s(I?ct===`processing`?`projects.processing`:`projects.uploading`:`projects.import`)]})]}),children:(0,$.jsxs)(`div`,{className:`form-stack`,children:[st&&(0,$.jsx)(`p`,{className:`error import-error`,children:st}),(0,$.jsxs)(`div`,{className:`upload-picker${P?` has-file`:``}${I?` is-disabled`:``}`,onDragOver:e=>{e.preventDefault(),I||(e.dataTransfer.dropEffect=`copy`)},onDrop:e=>{e.preventDefault(),I||bn(e.dataTransfer.files[0]??null)},children:[(0,$.jsx)(`input`,{ref:ft,className:`sr-only`,type:`file`,accept:`.zip,application/zip`,disabled:I,onChange:e=>bn(e.target.files?.[0]??null)}),(0,$.jsx)(pe,{size:34}),(0,$.jsxs)(`div`,{className:`upload-picker-copy`,children:[(0,$.jsx)(`strong`,{children:P?.name??s(`projects.chooseZip`)}),(0,$.jsx)(`span`,{children:P?s(`projects.selectedFileSize`,{size:Te(P.size,{maximumUnit:`MB`})}):s(`projects.dropZip`)})]}),(0,$.jsxs)(`button`,{type:`button`,disabled:I,onClick:()=>ft.current?.click(),children:[(0,$.jsx)(ae,{size:15}),s(`projects.browse`)]}),P&&(0,$.jsx)(`button`,{className:`upload-clear`,type:`button`,disabled:I,title:s(`projects.clearFile`),"aria-label":s(`projects.clearFile`),onClick:()=>{bn(null),ft.current&&(ft.current.value=``)},children:(0,$.jsx)(Oe,{size:14})})]}),(0,$.jsxs)(`label`,{className:`form-field`,children:[s(`projects.name`),(0,$.jsx)(`input`,{disabled:I,value:tt,onChange:e=>rt(e.target.value)})]}),I&&(0,$.jsxs)(`div`,{className:`project-import-progress`,role:`status`,"aria-live":`polite`,children:[(0,$.jsxs)(`div`,{className:`project-import-progress-label`,children:[(0,$.jsx)(`span`,{children:s(ct===`processing`?`projects.processing`:`projects.uploading`)}),ct===`uploading`&&ut!==null&&(0,$.jsxs)(`small`,{"aria-hidden":`true`,children:[ut,`%`]})]}),(0,$.jsx)(`progress`,{"aria-label":s(`projects.uploadProgress`),max:100,value:ct===`uploading`?ut??void 0:void 0}),ct===`processing`&&(0,$.jsx)(`small`,{className:`import-progress-hint`,children:s(`projects.processingHint`)})]})]})}),yt&&(0,$.jsx)(Ke,{title:s(`tags.manage`),onClose:()=>bt(!1),children:(0,$.jsx)(yr,{open:!0,onOpenChange:bt,onTagCreated:wn,onTagUpdated:Tn,onTagDeleted:En})}),xt&&(0,$.jsx)(Ke,{title:s(`projectIcons.title`),onClose:()=>St(null),children:(0,$.jsx)(br,{project:xt,open:!0,onOpenChange:e=>{e||St(null)},onSave:Dn})}),(0,$.jsx)(j,{open:!!z,title:s(`tags.assignTitle`,{project:z?.name??``}),description:s(`tags.assignDescription`),onOpenChange:e=>{e||(B(null),D(``))},footer:(0,$.jsx)(`button`,{onClick:()=>{B(null),D(``)},children:s(`common.close`)}),children:(0,$.jsxs)(`div`,{className:`tag-assignment-list`,children:[je&&(0,$.jsx)(`p`,{className:`error dialog-error`,children:je}),_.map(e=>(0,$.jsxs)(`label`,{children:[(0,$.jsx)(`input`,{type:`checkbox`,checked:!!z?.tags.some(t=>t.id===e.id),onChange:()=>void Sn(e)}),(0,$.jsx)(Cr,{color:e.color}),(0,$.jsx)(`span`,{children:e.name})]},e.id)),_.length===0&&(0,$.jsx)(`p`,{className:`muted`,children:s(`tags.empty`)})]})}),(0,$.jsx)(j,{open:!!Ct,title:s(`projects.renameTitle`),onOpenChange:e=>{(e||!H)&&(e||(V(null),O(``)))},footer:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`button`,{disabled:H,onClick:()=>{V(null),O(``)},children:s(`common.cancel`)}),(0,$.jsxs)(`button`,{className:`primary`,disabled:H||!wt.trim(),"aria-busy":H,onClick:()=>void On(),children:[H&&(0,$.jsx)(Re,{className:`spin`,size:14}),s(H?`common.loading`:`projects.rename`)]})]}),children:(0,$.jsxs)($.Fragment,{children:[Me&&(0,$.jsx)(`p`,{className:`error dialog-error`,children:Me}),(0,$.jsxs)(`label`,{className:`form-field`,children:[s(`projects.name`),(0,$.jsx)(`input`,{autoFocus:!0,value:wt,onChange:e=>{Tt(e.target.value),O(``)},onKeyDown:e=>{e.key===`Enter`&&On()}})]})]})}),(0,$.jsx)(j,{open:!!Dt,title:s(`projects.duplicateTitle`),description:s(`projects.duplicateDescription`,{project:Dt?.name??``}),onOpenChange:e=>{!e&&!At&&(Ot(null),U(``),k(``))},footer:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`button`,{disabled:At,onClick:()=>{Ot(null),U(``),k(``)},children:s(`common.cancel`)}),(0,$.jsx)(`button`,{className:`primary`,disabled:At||!kt.trim(),onClick:()=>void kn(),children:s(At?`projects.duplicating`:`projects.duplicate`)})]}),children:(0,$.jsxs)($.Fragment,{children:[Pe&&(0,$.jsx)(`p`,{className:`error dialog-error`,children:Pe}),(0,$.jsxs)(`label`,{className:`form-field`,children:[s(`projects.name`),(0,$.jsx)(`input`,{autoFocus:!0,value:kt,onChange:e=>{U(e.target.value),k(``)},onKeyDown:e=>{e.key===`Enter`&&kn()}})]})]})}),(0,$.jsx)(j,{open:!!Rt,title:s(`projects.transferOwnership`),description:s(`projects.transferDescription`,{project:Rt?.name??``}),onOpenChange:e=>{!e&&!Wt&&(zt(null),Ut(``),W(``))},footer:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`button`,{disabled:Wt,onClick:()=>{zt(null),Ut(``),W(``)},children:s(`common.cancel`)}),(0,$.jsxs)(`button`,{className:`primary`,disabled:Wt||!Ht,onClick:()=>void Mn(),children:[Wt?(0,$.jsx)(Re,{className:`spin`,size:14}):(0,$.jsx)(at,{size:14}),s(`projects.transfer`)]})]}),children:(0,$.jsxs)(`div`,{className:`form-stack`,children:[Kt&&(0,$.jsx)(`p`,{className:`error dialog-error`,children:Kt}),(0,$.jsxs)(`label`,{className:`form-field`,children:[s(`projects.newOwner`),(0,$.jsxs)(`select`,{disabled:Wt||Bt.length===0,value:Ht,onChange:e=>Ut(e.target.value),children:[(0,$.jsx)(`option`,{value:``,children:Wt?s(`common.loading`):Bt.length>0?s(`projects.chooseNewOwner`):s(`projects.noTransferUsers`)}),Bt.map(e=>(0,$.jsxs)(`option`,{value:e.id,children:[e.displayName??e.username,` (@`,e.username,`)`]},e.id))]})]}),(0,$.jsxs)(`p`,{className:`warning`,children:[(0,$.jsx)(De,{size:15}),s(`projects.transferWarning`)]})]})}),(0,$.jsx)(qe,{className:`management-dialog`,open:!!Mt,title:s(`projects.deleteTitle`),description:(0,$.jsx)(h,{i18nKey:`projects.deleteDescription`,values:{project:Mt?.name??``},components:{project:(0,$.jsx)(`strong`,{})}}),confirmLabel:s(Pt?`common.loading`:`common.delete`),danger:!0,busy:Pt,error:Fe,onCancel:()=>{Pt||(Nt(null),Ie(``))},onConfirm:()=>void An()})]}),ye&&(0,$.jsx)(Ke,{title:s(`metrics.title`),onClose:()=>xe(!1),children:(0,$.jsx)(hr,{open:!0,onOpenChange:xe})}),Se&&(0,$.jsx)(Ke,{title:s(`account.githubTitle`),onClose:()=>we(!1),children:(0,$.jsx)(xr,{open:!0,onOpenChange:we})}),(0,$.jsx)(We,{})]})}function Cr({color:e}){return(0,$.jsx)(`span`,{className:`tag-dot tag-${e}`})}export{Sr as Dashboard,Jn as a,Qe as c,Qn as i,$n as n,Yn as o,Zn as r,Pt as s,cr as t};
5
+ ./scripts/compose.sh up -d`};function Gn({userId:e}){let{t}=g(),[n,r]=(0,Q.useState)(null),[i,a]=(0,Q.useState)(!1),[o,s]=(0,Q.useState)(`npm`),[c,l]=(0,Q.useState)(!1),[u,d]=(0,Q.useState)(``),f=(0,Q.useRef)(!1),p=(0,Q.useRef)(null);(0,Q.useEffect)(()=>{let e=new AbortController,t=!1,n=async()=>{if(!(document.visibilityState===`hidden`||t)){t=!0;try{let t=await M(`/api/admin/updates`,{signal:e.signal});if(e.signal.aborted||t.update?.latestVersion===p.current)return;r(t.update)}catch{}finally{t=!1}}};n();let i=window.setInterval(()=>{n()},18e5),a=()=>{document.visibilityState===`visible`&&n()};return document.addEventListener(`visibilitychange`,a),()=>{e.abort(),window.clearInterval(i),document.removeEventListener(`visibilitychange`,a)}},[e]);let m=async()=>{if(n&&!f.current){f.current=!0,l(!0),d(``);try{await M(`/api/admin/updates/dismiss`,{method:`POST`,body:JSON.stringify({version:n.latestVersion})}),p.current=n.latestVersion,r(e=>e?.latestVersion===n.latestVersion?null:e),a(!1)}catch(e){d(N(e))}finally{f.current=!1,l(!1)}}};return n?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{className:`update-notice`,role:`status`,children:[(0,$.jsx)(Dt,{"aria-hidden":!0,size:17}),(0,$.jsx)(`span`,{children:t(`updates.available`,{version:n.latestVersion})}),(0,$.jsx)(`button`,{type:`button`,className:`update-notice-details`,onClick:()=>{s(n.method),a(!0)},children:t(`updates.howToUpdate`)}),(0,$.jsx)(`button`,{type:`button`,className:`update-notice-dismiss`,disabled:c,onClick:()=>void m(),"aria-label":t(`updates.dismiss`),title:t(`updates.dismiss`),children:(0,$.jsx)(Oe,{"aria-hidden":!0,size:16})})]}),u&&!i&&(0,$.jsx)(`p`,{className:`error`,role:`alert`,children:u}),(0,$.jsxs)(j,{open:i,onOpenChange:a,title:t(`updates.title`),description:t(`updates.versions`,{current:n.currentVersion,latest:n.latestVersion}),footer:(0,$.jsxs)(`button`,{type:`button`,className:`update-dismiss-action`,disabled:c,onClick:()=>void m(),children:[(0,$.jsx)(ut,{"aria-hidden":!0,size:15}),t(`updates.dismiss`)]}),children:[(0,$.jsx)(`div`,{className:`update-methods`,role:`group`,"aria-label":t(`updates.method`),children:[`npm`,`docker`].map(e=>(0,$.jsx)(`button`,{type:`button`,"aria-pressed":o===e,"aria-controls":`update-instructions`,onClick:()=>s(e),children:e===`npm`?`npm`:`Docker`},e))}),(0,$.jsxs)(`div`,{id:`update-instructions`,children:[(0,$.jsx)(`p`,{className:`update-command-hint`,children:t(o===`npm`?`updates.npmHint`:`updates.dockerHint`)}),(0,$.jsx)(`pre`,{className:`update-commands`,children:(0,$.jsx)(`code`,{children:Wn[o]})}),(0,$.jsx)(`p`,{className:`muted update-command-hint`,children:t(o===`npm`?`updates.restartHint`:`updates.imageHint`)})]}),(0,$.jsx)(`div`,{className:`update-links`,children:(0,$.jsxs)(`a`,{href:`https://github.com/SWUFE-DB-Group/TexLite/releases`,target:`_blank`,rel:`noreferrer`,children:[t(`updates.releaseNotes`),(0,$.jsx)(D,{"aria-hidden":!0,size:12})]})}),u&&(0,$.jsx)(`p`,{className:`error`,role:`alert`,children:u})]})]}):null}var Kn=`file-text.book-open.notebook-pen.book-marked.scroll-text.library.graduation-cap.presentation.image.folder-kanban.microscope.flask-conical.test-tube-diagonal.atom.dna.telescope.earth.map.languages.university.code-2.file-code-2.database.server.network.circuit-board.brain.brain-circuit.bot.shield-check.workflow.sigma.calculator.chart-no-axes-combined.line-chart.bar-chart-3.pie-chart.chart-scatter.file-spreadsheet.file-chart-column-increasing.lightbulb.rocket.target.sparkles.file-pen-line.file-stack.folder.folder-open.folder-archive.archive.bookmark.newspaper.notepad-text.sticky-note.pen-tool.quote.list-tree.file-search.beaker.test-tubes.folder-git-2.git-branch.terminal.braces.regex.cpu.hard-drive.cloud.users-round.calendar-days`.split(`.`),qn=new Set(Kn);function Jn(e){return typeof e==`string`&&qn.has(e)}function Yn(e){if(typeof e!=`string`)return null;let t=e.trim();return!t||t.length>96?null:/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(t)?t:null}var Xn={"file-text":C,"book-open":m,"notebook-pen":Pe,"book-marked":ee,"scroll-text":oe,library:Qt,"graduation-cap":Yt,presentation:dn,image:Xt,"folder-kanban":Jt,microscope:an,"flask-conical":Kt,"test-tube-diagonal":jn,atom:st,dna:Rt,telescope:kn,earth:Bt,map:nn,languages:Ie,university:Fn,"code-2":_e,"file-code-2":S,database:It,server:xn,network:X,"circuit-board":kt,brain:R,"brain-circuit":L,bot:Ae,"shield-check":d,workflow:Vn,sigma:Be,calculator:_t,"chart-no-axes-combined":Ct,"line-chart":xt,"bar-chart-3":z,"pie-chart":wt,"chart-scatter":H,"file-spreadsheet":x,"file-chart-column-increasing":Ht,lightbulb:J,rocket:_n,target:Dn,sparkles:Cn,"file-pen-line":s,"file-stack":Wt,folder:O,"folder-open":de,"folder-archive":G,archive:nt,bookmark:ft,newspaper:sn,"notepad-text":fe,"sticky-note":Tn,"pen-tool":ln,quote:pn,"list-tree":re,"file-search":le,beaker:ct,"test-tubes":Nn,"folder-git-2":je,"git-branch":w,terminal:Ve,braces:I,regex:hn,cpu:Pt,"hard-drive":Fe,cloud:Mt,"users-round":zn,"calendar-days":yt},Zn=Kn.map(e=>({name:e}));function Qn(e){let t=Array.from(e.trim())[0];return t?t.toLocaleUpperCase():`?`}function $n({icon:e,fallback:t,size:n=18}){let r=Jn(e)?Xn[e]:null;if(r)return(0,$.jsx)(r,{"aria-hidden":`true`,size:n,strokeWidth:1.9});let i=Yn(e);if(i){let e=`url(${ne(`/api/project-icons/${encodeURIComponent(i)}`)})`;return(0,$.jsx)(`span`,{"aria-hidden":`true`,className:`project-icon-external-glyph`,style:{maskImage:e,WebkitMaskImage:e}})}return(0,$.jsx)(`span`,{"aria-hidden":`true`,children:t})}function er({icon:e,projectName:t,editable:n=!1,onEdit:r,editLabel:i,title:a,className:o=``}){let s=(0,$.jsx)($n,{icon:e,fallback:Qn(t)}),c=`project-icon-avatar${n?` editable`:``}${o?` ${o}`:``}`;return n&&r?(0,$.jsx)(`button`,{type:`button`,className:c,title:i,"aria-label":i,onClick:r,children:s}):(0,$.jsx)(`span`,{className:c,title:a,"aria-hidden":`true`,children:s})}function tr({project:e,currentUser:t,showArchived:n,archiveBusy:r,menuOpen:i,t:a,variant:s,onToggleMenu:c,onCloseMenu:u,onAssignTags:d,onRename:f,onDuplicate:p,onArchive:m,onTransfer:h,onDelete:ee}){let g=(0,Q.useRef)(null),_=e.permission===`owner`,te=t.role===`admin`||t.canCreateProjects,v=e.ownerId===t.id,y=e.permission===`owner`;(0,Q.useEffect)(()=>{if(!i)return;let e=e=>{e.target instanceof Node&&!g.current?.contains(e.target)&&u()},t=e=>{e.key===`Escape`&&u()};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[i,u]);let b=[{id:`tags`,label:a(`tags.assign`),icon:(0,$.jsx)(Ne,{"aria-hidden":!0,size:15}),section:`main`,onSelect:d},..._?[{id:`rename`,label:a(`projects.rename`),icon:(0,$.jsx)(l,{"aria-hidden":!0,size:15}),section:`main`,onSelect:f}]:[],...te?[{id:`duplicate`,label:a(`projects.duplicate`),icon:(0,$.jsx)(o,{"aria-hidden":!0,size:15}),section:`main`,onSelect:p}]:[],{id:`download`,label:a(`projects.download`),icon:(0,$.jsx)(ie,{"aria-hidden":!0,size:15}),section:`main`,href:ne(`/api/projects/${e.id}/download`)},{id:`archive`,label:a(n?`projects.unarchive`:`projects.archive`),icon:n?(0,$.jsx)(et,{"aria-hidden":!0,size:15}):(0,$.jsx)(nt,{"aria-hidden":!0,size:15}),section:`main`,disabled:r,onSelect:m},...v?[{id:`transfer`,label:a(`projects.transfer`),icon:(0,$.jsx)(at,{"aria-hidden":!0,size:15}),section:`main`,onSelect:h}]:[],...y?[{id:`delete`,label:a(`common.delete`),icon:(0,$.jsx)(he,{"aria-hidden":!0,size:15}),section:`danger`,onSelect:ee}]:[]],re=b.filter(e=>e.section===`main`),ae=b.filter(e=>e.section===`danger`),oe=e=>{e.disabled||(u(),e.onSelect?.())};return(0,$.jsxs)(`div`,{ref:g,className:`project-action-menu-root project-action-menu-${s}`,onClick:e=>e.stopPropagation(),children:[(0,$.jsx)(`button`,{type:`button`,className:`project-action-menu-trigger`,"aria-label":a(`projects.projectActions`,{project:e.name}),"aria-expanded":i,"aria-controls":`project-actions-${e.id}`,onClick:e=>{e.stopPropagation(),c()},children:(0,$.jsx)(ke,{"aria-hidden":!0,size:19})}),i&&(0,$.jsxs)(`div`,{id:`project-actions-${e.id}`,className:`project-action-menu`,role:`group`,"aria-label":a(`projects.projectActions`,{project:e.name}),children:[re.map(e=>e.href?(0,$.jsxs)(`a`,{href:e.href,download:!0,onClick:e=>{e.stopPropagation(),u()},children:[e.icon,e.label]},e.id):(0,$.jsxs)(`button`,{type:`button`,disabled:e.disabled,onClick:t=>{t.stopPropagation(),oe(e)},children:[e.icon,e.label]},e.id)),ae.length>0&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{className:`project-action-menu-separator`,"aria-hidden":`true`}),ae.map(e=>(0,$.jsxs)(`button`,{type:`button`,className:`danger`,onClick:t=>{t.stopPropagation(),oe(e)},children:[e.icon,e.label]},e.id))]})]})]})}function nr({project:e,removing:t=!1,onRemovalEnd:n,currentUser:r,showArchived:i,archiveBusy:o,menuOpen:s,t:c,formatCreatedDate:l,formatUpdatedTime:u,formatExactTime:d,onOpenProject:f,onOpenMention:p,onToggleMenu:m,onCloseMenu:h,onAssignTags:ee,onRename:g,onDuplicate:_,onArchive:te,onTransfer:v,onDelete:ne,onChooseIcon:y}){let b=e.ownerDisplayName??e.ownerUsername??c(`projects.deletedUser`),re=e.lastModifiedDisplayName??e.lastModifiedUsername??c(`projects.deletedUser`);return(0,$.jsxs)(`article`,{ref:t?we:void 0,inert:t?!0:void 0,"aria-hidden":t?!0:void 0,className:`project-card project-list-row${e.ownerId===r.id?` owned-project`:``}${s?` project-list-menu-open`:``}${t?` deletion-exit`:``}`,onAnimationEnd:e=>{e.target===e.currentTarget&&t&&n?.()},onClick:e=>{e.target===e.currentTarget&&f()},children:[(0,$.jsx)(er,{icon:e.icon,projectName:e.name,title:e.name,editable:e.permission===`owner`,editLabel:c(`projectIcons.change`),onEdit:y,className:`project-list-avatar`}),(0,$.jsx)(`span`,{className:`project-list-summary`,children:(0,$.jsxs)(`button`,{type:`button`,className:`project-list-cell-open project-list-summary-open`,onClick:f,"aria-label":c(`projects.openProject`,{project:e.name}),children:[(0,$.jsxs)(`span`,{className:`project-list-title-line`,children:[(0,$.jsx)(`strong`,{className:`project-list-title`,title:e.name,children:e.name}),!!(e.unresolvedCommentCount&&e.unresolvedCommentCount>0)&&(0,$.jsxs)(`span`,{className:`project-comments-badge unresolved`,title:c(`projects.unresolvedCommentsTooltip`,{count:e.commentCount??e.unresolvedCommentCount,unresolved:e.unresolvedCommentCount,total:e.commentCount??e.unresolvedCommentCount}),children:[(0,$.jsx)(T,{"aria-hidden":!0,size:10}),(0,$.jsx)(`span`,{children:c(`projects.unresolvedCount`,{count:e.unresolvedCommentCount})})]})]}),e.tags?.length>0&&(0,$.jsx)(k,{className:`project-list-tags`,children:e.tags.map(e=>(0,$.jsxs)(`span`,{className:`tag tag-${e.color}`,title:e.name,children:[(0,$.jsx)(`span`,{className:`tag-dot`,"aria-hidden":`true`}),(0,$.jsx)(`span`,{className:`tag-label`,children:e.name})]},e.id))})]})}),(0,$.jsxs)(`button`,{type:`button`,className:`project-list-cell-open project-list-owner`,onClick:f,title:e.ownerUsername?`@${e.ownerUsername}`:void 0,"aria-label":c(`projects.openProject`,{project:e.name}),children:[(0,$.jsxs)(`span`,{className:`sr-only`,children:[c(`projects.owner`),`: `]}),b]}),(0,$.jsxs)(`button`,{type:`button`,className:`project-list-cell-open project-list-created`,onClick:f,title:d(e.createdAt),"aria-label":c(`projects.openProject`,{project:e.name}),children:[(0,$.jsxs)(`span`,{className:`sr-only`,children:[c(`projects.created`),`: `]}),(0,$.jsx)(`time`,{dateTime:e.createdAt,children:l(e.createdAt)})]}),(0,$.jsxs)(`button`,{type:`button`,className:`project-list-cell-open project-list-modified`,onClick:f,title:d(e.updatedAt),"aria-label":c(`projects.openProject`,{project:e.name}),children:[(0,$.jsxs)(`span`,{className:`sr-only`,children:[c(`projects.modified`),`: `]}),(0,$.jsx)(`time`,{dateTime:e.updatedAt,children:u(e.updatedAt)}),(0,$.jsx)(`small`,{children:c(`projects.byUser`,{user:re})})]}),e.unreadMentionCount&&e.unreadMentionCount>0?(0,$.jsxs)(`button`,{className:`project-mentions-badge project-list-mentions`,type:`button`,title:c(`projects.unreadMentionsTooltip`,{count:e.unreadMentionCount}),onClick:p,children:[(0,$.jsx)(a,{"aria-hidden":!0,size:10}),(0,$.jsx)(`span`,{children:e.unreadMentionCount})]}):(0,$.jsx)(`span`,{className:`project-list-mentions`}),(0,$.jsx)(tr,{variant:`list`,project:e,currentUser:r,showArchived:i,archiveBusy:o,menuOpen:s,t:c,onToggleMenu:m,onCloseMenu:h,onAssignTags:ee,onRename:g,onDuplicate:_,onArchive:te,onTransfer:v,onDelete:ne})]})}var rr=[`all`,`owned`,`shared`],ir={all:`projects.allProjects`,owned:`projects.ownedByMe`,shared:`projects.sharedWithMe`};function ar({value:e,counts:t,onChange:n}){let{t:r}=g();return(0,$.jsx)(`div`,{className:`project-ownership-tabs`,role:`tablist`,"aria-label":r(`projects.ownership`),children:rr.map((i,a)=>(0,$.jsxs)(`button`,{id:`project-tab-${i}`,type:`button`,role:`tab`,"aria-selected":e===i,"aria-controls":`project-catalog-panel`,tabIndex:e===i?0:-1,onClick:()=>n(i),onKeyDown:e=>{let t;if(e.key===`ArrowRight`)t=(a+1)%rr.length;else if(e.key===`ArrowLeft`)t=(a+rr.length-1)%rr.length;else if(e.key===`Home`)t=0;else if(e.key===`End`)t=rr.length-1;else return;e.preventDefault(),n(rr[t]),e.currentTarget.parentElement?.querySelector(`#project-tab-${rr[t]}`)?.focus()},children:[(0,$.jsx)(`span`,{children:r(ir[i])}),t[i]>0&&(0,$.jsx)(`sup`,{children:t[i]})]},i))})}function or({preview:e}){let t=e==null||!!(e.title||e.abstract);return(0,$.jsx)(`div`,{className:`project-paper`,"aria-hidden":`true`,children:t&&(0,$.jsxs)($.Fragment,{children:[e?.title?(0,$.jsx)(`div`,{className:`project-paper-title`,children:e.title}):(0,$.jsxs)(`div`,{className:`project-paper-heading`,children:[(0,$.jsx)(`span`,{}),(0,$.jsx)(`span`,{})]}),(0,$.jsx)(`span`,{className:`project-paper-byline`}),(0,$.jsx)(`div`,{className:`project-paper-abstract-label`,children:`Abstract`}),e?.abstract&&(0,$.jsx)(`p`,{className:`project-paper-summary`,children:e.abstract}),(0,$.jsxs)(`div`,{className:`project-paper-lines`,children:[(0,$.jsx)(`span`,{}),(0,$.jsx)(`span`,{}),(0,$.jsx)(`span`,{}),(0,$.jsx)(`span`,{}),(0,$.jsx)(`span`,{})]})]})})}function sr({removing:e,onRemovalEnd:t,onOpenProject:n,onOpenMention:r,formatUpdatedTime:i,formatExactTime:o,...s}){let{project:c,t:l}=s,u=c.ownerDisplayName??c.ownerUsername??l(`projects.deletedUser`),d=c.lastModifiedDisplayName??c.lastModifiedUsername??l(`projects.deletedUser`),f=(0,$.jsxs)(`div`,{className:`project-details-tooltip project-name-tooltip`,children:[(0,$.jsx)(`strong`,{children:c.name}),` `,(0,$.jsx)(`span`,{className:`project-details-person`,children:(0,$.jsx)(h,{t:l,i18nKey:`projects.ownedBy`,values:{user:u},components:{user:(0,$.jsx)(`strong`,{className:`project-details-name`})}})})]}),p=(0,$.jsx)(`div`,{className:`project-details-tooltip`,children:(0,$.jsxs)(`ul`,{children:[(0,$.jsxs)(`li`,{children:[(0,$.jsx)(yt,{"aria-hidden":!0,size:14}),(0,$.jsx)(`div`,{children:(0,$.jsx)(`time`,{dateTime:c.createdAt,children:l(`projects.createdAt`,{time:o(c.createdAt)})})})]}),(0,$.jsxs)(`li`,{children:[(0,$.jsx)(yn,{"aria-hidden":!0,size:14}),(0,$.jsx)(`div`,{children:(0,$.jsx)(`time`,{dateTime:c.updatedAt,children:(0,$.jsx)(h,{t:l,i18nKey:`projects.lastModifiedAt`,values:{time:o(c.updatedAt),user:d},components:{user:(0,$.jsx)(`strong`,{className:`project-details-name`})}})})})]})]})});return(0,$.jsxs)(`article`,{ref:e?we:void 0,inert:e?!0:void 0,"aria-hidden":e?!0:void 0,className:`project-card project-grid-card${s.menuOpen?` project-card-menu-open`:``}${e?` deletion-exit`:``}`,onAnimationEnd:n=>{n.target===n.currentTarget&&e&&t()},children:[(0,$.jsxs)(`button`,{type:`button`,className:`project-card-open`,"aria-label":l(`projects.openProject`,{project:c.name}),onClick:n,children:[(0,$.jsxs)(`div`,{className:`project-card-thumbnail`,children:[(0,$.jsx)(or,{preview:c.preview}),(0,$.jsx)(k,{className:`project-card-tags`,title:c.tags.map(e=>e.name).join(`, `),children:c.tags.map(e=>(0,$.jsxs)(`span`,{className:`tag tag-${e.color}`,children:[(0,$.jsx)(`span`,{className:`tag-dot`,"aria-hidden":`true`}),(0,$.jsx)(`span`,{className:`tag-label`,children:e.name})]},e.id))})]}),(0,$.jsxs)(`div`,{className:`project-card-caption`,children:[(0,$.jsx)(A,{text:c.name,content:f,children:(0,$.jsx)(`strong`,{className:`project-card-title`,children:c.name})}),(0,$.jsxs)(`div`,{className:`project-card-metadata`,children:[(0,$.jsx)(A,{text:o(c.updatedAt),content:p,children:(0,$.jsxs)(`time`,{dateTime:c.updatedAt,children:[(0,$.jsx)(At,{"aria-hidden":!0,size:12,strokeWidth:1.75}),(0,$.jsx)(`span`,{children:i(c.updatedAt)})]})}),(0,$.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,$.jsx)(`span`,{className:`project-card-modifier`,children:l(`projects.byUserInline`,{user:d})})]})]})]}),(0,$.jsxs)(`div`,{className:`project-card-badges`,children:[!!(c.unreadMentionCount&&c.unreadMentionCount>0)&&(0,$.jsxs)(`button`,{className:`project-mentions-badge`,type:`button`,title:l(`projects.unreadMentionsTooltip`,{count:c.unreadMentionCount}),"aria-label":l(`projects.unreadMentionsTooltip`,{count:c.unreadMentionCount}),onClick:r,children:[(0,$.jsx)(a,{"aria-hidden":!0,size:12}),(0,$.jsx)(`span`,{children:c.unreadMentionCount})]}),!!(c.unresolvedCommentCount&&c.unresolvedCommentCount>0)&&(0,$.jsxs)(`button`,{className:`project-comments-badge unresolved`,type:`button`,"data-tooltip":l(`projects.unresolvedCount`,{count:c.unresolvedCommentCount}),"aria-label":l(`projects.unresolvedCount`,{count:c.unresolvedCommentCount}),onClick:n,children:[(0,$.jsx)(T,{"aria-hidden":!0,size:12}),(0,$.jsx)(`span`,{children:c.unresolvedCommentCount})]})]}),(0,$.jsx)(tr,{...s,variant:`grid`})]})}var cr=e({Dashboard:()=>Sr}),lr=e=>e.id,ur=[],dr=`(max-width: 1250px)`,fr=()=>window.matchMedia?.(dr).matches??!1,pr=e=>{let t=window.matchMedia?.(dr);return t?.addEventListener(`change`,e),()=>t?.removeEventListener(`change`,e)},mr=(e,t,n,r,i,a)=>JSON.stringify([e,t,n,r,i,a]),hr=(0,Q.lazy)(()=>y(()=>import(`./SystemMetricsDialog-Bycm88U1.js`).then(e=>({default:e.SystemMetricsDialog})),__vite__mapDeps([20,1,2,3,4,7,5,6,8,9,10,11,12,13,14,15,21,22,23]),import.meta.url)),gr=(0,Q.lazy)(()=>y(()=>import(`./CitationLibraryDialog-DqO9e0GV.js`).then(e=>({default:e.CitationLibraryDialog})),__vite__mapDeps([24,1,2,25,4,3,6,7,5,8,9,10,11,12,13,14,15,16,26,27,22,28,29,17,18,19,30,31,32,33,34,35,36,37,38,39]),import.meta.url)),_r=(0,Q.lazy)(()=>y(()=>import(`./AdminUsers-xuVuiwoh.js`).then(e=>({default:e.AdminUsers})),__vite__mapDeps([40,1,2,25,4,3,6,7,5,8,9,10,11,12,13,14,15,18,22,41,19,42,38]),import.meta.url)),vr=(0,Q.lazy)(()=>y(()=>import(`./AgentManagement-D-0hrv6f.js`).then(e=>({default:e.AgentManagement})),__vite__mapDeps([43,1,2,25,4,3,6,7,5,8,9,10,11,12,13,14,15,44,18,45,46,22,23,17,38]),import.meta.url)),yr=(0,Q.lazy)(()=>y(()=>import(`./TagManagementDialog-DwUAA8uC.js`).then(e=>({default:e.TagManagementDialog})),__vite__mapDeps([47,1,2,25,4,3,6,7,5,8,9,10,11,12,13,14,15,29,17,18,38,39,16,30]),import.meta.url)),br=(0,Q.lazy)(()=>y(()=>import(`./ProjectIconPickerDialog-ChiEUQ0g.js`).then(e=>({default:e.ProjectIconPickerDialog})),__vite__mapDeps([48,1,2,3,4,17,7,18,13,19,10,11,6,12,14,9,15]),import.meta.url)),xr=(0,Q.lazy)(()=>y(()=>import(`./GitHubAccountDialog-CnxfR0JD.js`).then(e=>({default:e.GitHubAccountDialog})),__vite__mapDeps([49,1,2,3,4,7,5,6,8,9,10,11,12,13,14,15,50,22,17,18,38]),import.meta.url));function Sr({site:e,user:t,initialData:n,onDataChange:r,onUser:a,onOpenProject:o}){let{t:s}=g(),l={"data-texlite-tooltips":(0,Q.useSyncExternalStore)(pr,fr,()=>!1)?void 0:`off`},[d,m]=(0,Q.useState)(()=>n?.projects??[]),[_,y]=(0,Q.useState)(()=>n?.tags??[]),[b,re]=(0,Q.useState)(()=>n?.pagination??{page:1,pageSize:32,total:n?.projects.length??0,totalPages:+!!n?.projects.length}),[ie,oe]=(0,Q.useState)(()=>n?.counts??{all:0,owned:0,shared:0}),[x,le]=(0,Q.useState)(()=>n?.filters.ownership??`all`),[S,fe]=(0,Q.useState)(!1),[C,he]=(0,Q.useState)(!1),_e=c(t.id),{showExecutionReminder:ve}=p(),[ye,xe]=(0,Q.useState)(!1),[w,T]=(0,Q.useState)(!1),[Se,we]=(0,Q.useState)(!1),[Ee,ke]=(0,Q.useState)(``),[Ae,E]=(0,Q.useState)(``),[je,D]=(0,Q.useState)(``),[Me,O]=(0,Q.useState)(``),[Pe,k]=(0,Q.useState)(``),[Fe,Ie]=(0,Q.useState)(``),[Le,ze]=(0,Q.useState)(!1),[Be,Ve]=(0,Q.useState)(``),[A,Ze]=(0,Q.useState)(!1),[$e,et]=(0,Q.useState)(!1),[tt,rt]=(0,Q.useState)(``),[P,ot]=(0,Q.useState)(null),[st,F]=(0,Q.useState)(``),[ct,lt]=(0,Q.useState)(null),[ut,dt]=(0,Q.useState)(null),ft=(0,Q.useRef)(null),pt=(0,Q.useRef)(null),[I,mt]=(0,Q.useState)(!1),[L,ht]=(0,Q.useState)(()=>n?.filters.search??``),[R,gt]=(0,Q.useState)(()=>n?.filters.tag??``),[_t,vt]=(0,Q.useState)(!1),[yt,bt]=(0,Q.useState)(!1),[z,B]=(0,Q.useState)(null),[xt,St]=(0,Q.useState)(null),[Ct,V]=(0,Q.useState)(null),[wt,Tt]=(0,Q.useState)(``),[H,Et]=(0,Q.useState)(!1),[Dt,Ot]=(0,Q.useState)(null),[kt,U]=(0,Q.useState)(``),[At,jt]=(0,Q.useState)(!1),[Mt,Nt]=(0,Q.useState)(null),[Pt,Ft]=(0,Q.useState)(!1),[It,Lt]=(0,Q.useState)(null),[Rt,zt]=(0,Q.useState)(null),[Bt,Vt]=(0,Q.useState)([]),[Ht,Ut]=(0,Q.useState)(``),[Wt,Gt]=(0,Q.useState)(!1),[Kt,W]=(0,Q.useState)(``),[G,qt]=(0,Q.useState)(()=>Ge(v(`texlite-project-view`))===`list`?`list`:`grid`),[K,Yt]=(0,Q.useState)(()=>n?.filters.sort??(Ge(v(`texlite-project-sort`))===`created`?`created`:`updated`)),[q,Xt]=(0,Q.useState)(()=>n?.filters.archived??!1),[Zt,Qt]=(0,Q.useState)(``),[$t,J]=(0,Q.useState)(null),[en,Y]=(0,Q.useState)(()=>n?.pagination.page??1),tn=u(),[nn,rn]=(0,Q.useState)(()=>n?mr(n.filters.ownership,n.filters.archived,n.pagination.page,n.filters.search,n.filters.tag,n.filters.sort):``),[an,on]=(0,Q.useState)(0),X=()=>on(e=>e+1),Z=(0,Q.useRef)(0),sn=(0,Q.useRef)(null),cn=mr(x,q,en,L,R,K),ln=nn===cn,{entries:un,finishExit:dn}=Ce(ln?d:ur,{scopeKey:`${cn}|${G}|${S}|${w}`,deletedKey:It,keyOf:lr,duration:250}),fn=(e,t,n,r,i,a)=>{let o=new URLSearchParams({page:String(n),pageSize:`32`,sort:a,scope:e});G===`grid`&&o.set(`previews`,`1`),t&&o.set(`archived`,`1`),r.trim()&&o.set(`search`,r.trim()),i&&o.set(`tag`,i),ke(``);let s=++Z.current;sn.current?.abort();let c=new AbortController;return sn.current=c,Promise.all([M(`/api/projects?${o.toString()}`,{signal:c.signal}),M(`/api/tags`,{signal:c.signal})]).then(([n,o])=>{s===Z.current&&(m(n.projects),y(o.tags),re(n.pagination),Y(n.pagination.page),oe(n.counts),rn(mr(e,t,n.pagination.page,r,i,a)))}).catch(e=>{!He(e)&&s===Z.current&&ke(N(e))}).finally(()=>{sn.current===c&&(sn.current=null)})};(0,Q.useEffect)(()=>(fn(x,q,en,L,R,K),()=>sn.current?.abort()),[x,q,en,L,R,K,an,G]),(0,Q.useEffect)(()=>{ln&&r({projects:d,tags:_,pagination:b,counts:ie,filters:{ownership:x,archived:q,search:L,tag:R,sort:K}})},[d,_,b,ie,nn,cn]),(0,Q.useEffect)(()=>{if(!_t)return;let e=e=>{e.target instanceof Node&&!pt.current?.contains(e.target)&&vt(!1)},t=e=>{e.key===`Escape`&&vt(!1)};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[_t]);let pn=e=>{J(null),qt(e),Je(v(`texlite-project-view`),e)},mn=e=>{Yt(e),Y(1),Je(v(`texlite-project-sort`),e)},hn=e=>{e!==x&&(le(e),Y(1),J(null))},gn=e=>{Xt(e),Y(1)},_n=e=>{gt(e),Y(1)},vn=async()=>{if(Be.trim()&&!A){Ze(!0),E(``);try{let{project:e}=await M(`/api/projects`,{method:`POST`,body:JSON.stringify({name:Be})});ze(!1),Ve(``),o(e.id)}catch(e){E(N(e))}finally{Ze(!1)}}},yn=async()=>{if(!P)return;let t=P,n=e.maxUploadSizeMB;if(t.size>n*1024*1024)return F(s(`errors.fileTooLarge`,{size:n}));mt(!0),F(``),lt(`uploading`),dt(0);let r=new FormData;r.append(`file`,t);try{let{project:e}=await Ue(`/api/projects/import?name=${encodeURIComponent(tt.trim())}`,r,{onProgress:(e,t)=>{dt(t?Math.min(99,Math.floor(e/t*100)):null)},onUploadComplete:()=>{dt(null),lt(`processing`)}});et(!1),ot(null),rt(``),o(e.id)}catch(e){F(N(e))}finally{mt(!1),lt(null),dt(null)}},bn=e=>{I||(e&&!e.name.toLocaleLowerCase().endsWith(`.zip`)?F(s(`errors.zipOnly`)):(F(``),ot(e),e&&!tt&&rt(e.name.replace(/\.zip$/i,``))))},xn=async()=>{await M(`/api/auth/logout`,{method:`POST`}),a(null)},Sn=async e=>{if(!z)return;let t=z.tags.some(t=>t.id===e.id);D(``);try{let n=(await M(t?`/api/projects/${z.id}/tags/${e.id}`:`/api/projects/${z.id}/tags`,t?{method:`DELETE`}:{method:`POST`,body:JSON.stringify({tagId:e.id})})).project;B(n),m(e=>e.map(e=>e.id===n.id?n:e)),X()}catch(e){D(N(e))}},wn=e=>{y(t=>[...t,e].sort((e,t)=>e.name.localeCompare(t.name)))},Tn=e=>{let t=t=>t.map(t=>t.id===e.id?e:t);y(e=>t(e).sort((e,t)=>e.name.localeCompare(t.name))),m(e=>e.map(e=>({...e,tags:t(e.tags)}))),B(e=>e?{...e,tags:t(e.tags)}:null),X()},En=e=>{y(t=>t.filter(t=>t.id!==e)),m(t=>t.map(t=>({...t,tags:t.tags.filter(t=>t.id!==e)}))),B(t=>t?{...t,tags:t.tags.filter(t=>t.id!==e)}:null),gt(t=>t===e?``:t),Y(1),X()},Dn=async(e,t)=>{let n=await M(`/api/projects/${e}/icon`,{method:`PATCH`,body:JSON.stringify({icon:t})});m(e=>{let t=e.map(e=>e.id===n.project.id?n.project:e);return K===`updated`?t.sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt)||e.name.localeCompare(t.name)):t}),X()},On=async()=>{if(Ct&&wt.trim()&&!H){Et(!0),O(``);try{let e=await M(`/api/projects/${Ct.id}`,{method:`PATCH`,body:JSON.stringify({name:wt})});m(t=>t.map(t=>t.id===e.project.id?e.project:t)),V(null),Tt(``),X()}catch(e){O(N(e))}finally{Et(!1)}}},kn=async()=>{if(Dt&&kt.trim()){jt(!0),k(``);try{await M(`/api/projects/${Dt.id}/duplicate`,{method:`POST`,body:JSON.stringify({name:kt})}),Ot(null),U(``),X()}catch(e){k(N(e))}finally{jt(!1)}}},An=async()=>{if(!Mt||Pt)return;Ft(!0),Ie(``);let e=Z.current;try{await M(`/api/projects/${Mt.id}`,{method:`DELETE`}),e===Z.current&&(Lt(Mt.id),Nn(Mt,`delete`)),Nt(null),X()}catch(e){Ie(N(e))}finally{Ft(!1)}},jn=async e=>{zt(e),Ut(``),Vt([]),W(``),Gt(!0);try{let t=await M(`/api/users`);Vt(t.users.filter(t=>t.id!==e.ownerId))}catch(e){W(N(e))}finally{Gt(!1)}},Mn=async()=>{if(Rt&&Ht){Gt(!0),W(``);try{await M(`/api/projects/${Rt.id}/owner`,{method:`PUT`,body:JSON.stringify({userId:Ht})}),zt(null),Ut(``),X()}catch(e){W(N(e))}finally{Gt(!1)}}},Nn=(e,n)=>{m(t=>t.filter(t=>t.id!==e.id)),n===`delete`&&oe(n=>({...n,all:Math.max(0,n.all-1),[e.ownerId===t.id?`owned`:`shared`]:Math.max(0,n[e.ownerId===t.id?`owned`:`shared`]-1)}));let r=Math.max(0,b.total-1),i=Math.ceil(r/b.pageSize),a=i===0?1:Math.min(en,i);re({...b,page:a,total:r,totalPages:i}),Y(a)},Pn=async e=>{let t=!q;Qt(e.id),ke(``);let n=Z.current;try{await M(`/api/projects/${e.id}/archive`,{method:t?`PUT`:`DELETE`}),n===Z.current&&Nn(e,`archive`),X()}catch(e){ke(N(e))}finally{Qt(``)}},Fn=async e=>{try{let t=(await M(`/api/projects/${e.id}/mentions?unread=1&limit=1`)).mentions[0];o(e.id,t?.id)}catch(e){ke(N(e))}},In=e=>be(e,te.resolvedLanguage),Ln=e=>be(e,te.resolvedLanguage??`en`,{year:`numeric`,month:`2-digit`,day:`2-digit`}),Rn=(e,t)=>f(e,te.resolvedLanguage??`en`,tn,(e,t)=>s(e,t),t);return(0,$.jsxs)(`div`,{className:`page`,children:[(0,$.jsxs)(`header`,{className:`topbar`,children:[(0,$.jsxs)(`a`,{className:`brand-link`,href:ne(`/`),"aria-label":e.siteName,children:[(0,$.jsx)(Xe,{siteName:e.siteName}),(0,$.jsx)(`span`,{className:`site-title`,children:e.siteName})]}),(0,$.jsxs)(`div`,{className:`top-actions`,children:[t.role===`admin`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`button`,{...l,className:`ghost`,"aria-label":s(`metrics.title`),"data-tooltip":s(`metrics.title`),onClick:()=>xe(!0),children:[(0,$.jsx)(Qe,{"aria-hidden":!0,size:14}),(0,$.jsx)(`span`,{className:`top-action-label`,children:s(`metrics.title`)})]}),(0,$.jsxs)(`button`,{...l,className:`ghost${S?` top-return-action`:``}`,"aria-label":s(S?`users.back`:`users.manage`),"data-tooltip":s(S?`users.back`:`users.manage`),onClick:()=>{fe(e=>!e),he(!1),T(!1)},children:[S?(0,$.jsx)(ge,{"aria-hidden":!0,size:14}):(0,$.jsx)(me,{"aria-hidden":!0,size:14}),(0,$.jsx)(`span`,{className:`top-action-label`,children:s(S?`users.back`:`users.manage`)})]})]}),(0,$.jsxs)(`button`,{...l,className:`ghost${w?` top-return-action`:``}`,"aria-label":s(w?`users.back`:`citationLibrary.title`),"data-tooltip":s(w?`users.back`:`citationLibrary.title`),onClick:()=>{fe(!1),he(!1),T(e=>!e)},children:[w?(0,$.jsx)(ge,{"aria-hidden":!0,size:14}):(0,$.jsx)(ee,{"aria-hidden":!0,size:14}),(0,$.jsx)(`span`,{className:`top-action-label`,children:s(w?`users.back`:`citationLibrary.title`)})]}),(t.role===`admin`||_e.visible)&&(0,$.jsxs)(`button`,{...l,className:`ghost${C?` top-return-action`:``}`,"aria-label":s(C?`agents.back`:t.role===`admin`?`agents.title`:`agents.tasks`),"data-tooltip":s(C?`agents.back`:t.role===`admin`?`agents.title`:`agents.tasks`),onClick:()=>{he(e=>!e),fe(!1),T(!1)},children:[C?(0,$.jsx)(ge,{"aria-hidden":!0,size:14}):(0,$.jsx)(se,{"aria-hidden":!0,size:14}),(0,$.jsx)(`span`,{className:`top-action-label`,children:s(C?`agents.back`:t.role===`admin`?`agents.title`:`agents.tasks`)}),ve&&!C&&_e.activeCount>0&&(0,$.jsx)(`sup`,{className:`agent-active-count`,"aria-label":s(`agents.activeCount`,{count:_e.activeCount}),children:_e.activeCount})]}),(0,$.jsx)(Un,{user:t,onGitHub:()=>we(!0),onSignOut:xn,onUserChange:a})]})]}),t.role===`admin`&&(0,$.jsx)(`div`,{className:`dashboard-update`,children:(0,$.jsx)(Gn,{userId:t.id},t.id)}),C?(0,$.jsx)(`main`,{className:`dashboard`,children:(0,$.jsx)(Ye,{onClose:()=>he(!1),children:(0,$.jsx)(vr,{user:t,onBack:()=>he(!1)})})}):S?(0,$.jsx)(`main`,{className:`dashboard`,children:(0,$.jsx)(Ye,{onClose:()=>fe(!1),children:(0,$.jsx)(_r,{currentUser:t,minPasswordLength:e.minPasswordLength,onBack:()=>fe(!1)})})}):w?(0,$.jsx)(`main`,{className:`dashboard`,children:(0,$.jsx)(Ye,{onClose:()=>T(!1),children:(0,$.jsx)(gr,{page:!0,open:!0,onOpenChange:T,onBack:()=>T(!1),currentUserId:t.id,maxBibtexBytes:e.maxCitationBibtexBytes})})}):(0,$.jsxs)(`main`,{className:`dashboard`,children:[(0,$.jsxs)(`div`,{className:`section-title project-catalog-heading`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`h1`,{children:[(0,$.jsx)(Jt,{"aria-hidden":!0,size:25}),s(`projects.title`)]}),(0,$.jsx)(`p`,{className:`muted`,children:t.canCreateProjects?s(`projects.subtitle`):s(`projects.restricted`)})]}),(0,$.jsxs)(`div`,{className:`section-actions`,children:[(0,$.jsxs)(`button`,{...l,"aria-label":s(`tags.manage`),"data-tooltip":s(`tags.manage`),onClick:()=>bt(!0),children:[(0,$.jsx)(Ne,{"aria-hidden":!0,size:15}),(0,$.jsx)(`span`,{className:`project-action-label`,children:s(`tags.manage`)})]}),t.canCreateProjects&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`button`,{...l,"aria-label":s(`projects.upload`),"data-tooltip":s(`projects.upload`),onClick:()=>{F(``),et(!0)},children:[(0,$.jsx)(ae,{"aria-hidden":!0,size:15}),(0,$.jsx)(`span`,{className:`project-action-label`,children:s(`projects.upload`)})]}),(0,$.jsxs)(`button`,{...l,className:`primary`,"aria-label":s(`projects.new`),"data-tooltip":s(`projects.new`),onClick:()=>{E(``),ze(!0)},children:[(0,$.jsx)(ue,{"aria-hidden":!0,size:15}),(0,$.jsx)(`span`,{className:`project-action-label`,children:s(`projects.new`)})]})]})]})]}),(0,$.jsx)(ar,{value:x,counts:ie,onChange:hn}),Ee&&(0,$.jsx)(`p`,{className:`error`,children:Ee}),(0,$.jsxs)(`div`,{className:`project-catalog-layout`,children:[(0,$.jsxs)(`aside`,{ref:pt,className:`project-tag-sidebar${R?` has-active-filter`:``}`,children:[(0,$.jsxs)(`button`,{type:`button`,className:`project-tag-toggle`,title:s(`projects.filterTags`),"aria-label":s(`projects.filterTags`),"aria-expanded":_t,"aria-controls":`dashboard-tag-filters`,onClick:()=>vt(e=>!e),children:[(0,$.jsxs)(`span`,{className:`project-tag-toggle-copy`,children:[(0,$.jsx)(Ne,{"aria-hidden":!0,size:15}),(0,$.jsx)(`span`,{children:s(`projects.filterTags`)})]}),(0,$.jsx)(ce,{className:`project-tag-toggle-chevron`,"aria-hidden":!0,size:15})]}),_t&&(0,$.jsxs)(`div`,{id:`dashboard-tag-filters`,className:`project-tag-filters`,role:`group`,"aria-label":s(`projects.filterTags`),children:[(0,$.jsx)(`button`,{type:`button`,className:R?``:`active`,"aria-pressed":!R,onClick:()=>_n(``),children:s(`projects.allTags`)}),_.length>0?_.map(e=>(0,$.jsxs)(`button`,{type:`button`,className:R===e.id?`active`:``,title:e.name,"aria-pressed":R===e.id,onClick:()=>_n(R===e.id?``:e.id),children:[(0,$.jsx)(Cr,{color:e.color}),(0,$.jsx)(`span`,{children:e.name})]},e.id)):(0,$.jsx)(`p`,{className:`project-tag-empty`,children:s(`tags.none`)})]})]}),(0,$.jsx)(`div`,{className:`project-catalog-content`,children:(0,$.jsxs)(`section`,{id:`project-catalog-panel`,role:`tabpanel`,"aria-labelledby":`project-tab-${x}`,"aria-busy":!ln&&!Ee,children:[(0,$.jsxs)(`div`,{className:`project-toolbar`,children:[(0,$.jsx)(`input`,{type:`search`,placeholder:s(`projects.search`),value:L,onChange:e=>{ht(e.target.value),Y(1)}}),(0,$.jsxs)(`div`,{className:`project-scope`,role:`group`,"aria-label":s(`projects.scope`),children:[(0,$.jsxs)(`button`,{className:q?``:`active`,onClick:()=>gn(!1),"aria-pressed":!q,children:[(0,$.jsx)(de,{size:14}),s(`projects.active`)]}),(0,$.jsxs)(`button`,{className:q?`active`:``,onClick:()=>gn(!0),"aria-pressed":q,children:[(0,$.jsx)(nt,{size:14}),s(`projects.archived`)]})]}),(0,$.jsxs)(`label`,{className:`project-sort`,children:[(0,$.jsx)(it,{size:14}),(0,$.jsx)(`span`,{children:s(`projects.sortBy`)}),(0,$.jsxs)(`select`,{value:K,onChange:e=>mn(e.target.value),children:[(0,$.jsx)(`option`,{value:`updated`,children:s(`projects.sortModified`)}),(0,$.jsx)(`option`,{value:`created`,children:s(`projects.sortCreated`)})]})]}),(0,$.jsxs)(`div`,{className:`view-toggle`,children:[(0,$.jsx)(`button`,{className:G===`grid`?`active`:``,onClick:()=>pn(`grid`),title:s(`projects.grid`),children:`▦`}),(0,$.jsx)(`button`,{className:G===`list`?`active`:``,onClick:()=>pn(`list`),title:s(`projects.list`),children:`☷`})]})]}),!ln&&!Ee&&(0,$.jsxs)(`div`,{className:`project-catalog-loading`,role:`status`,children:[(0,$.jsx)(Re,{className:`spin`,size:17,"aria-hidden":!0}),s(`common.loading`)]}),(0,$.jsxs)(`div`,{className:`project-grid ${G===`list`?`list-view`:``}${$t?` project-list-menu-active`:``}`,children:[G===`list`&&un.length>0&&(0,$.jsxs)(`div`,{className:`project-list-header`,"aria-hidden":`true`,children:[(0,$.jsx)(`span`,{className:`project-list-header-avatar`}),(0,$.jsx)(`span`,{children:s(`projects.title`)}),(0,$.jsx)(`span`,{children:s(`projects.owner`)}),(0,$.jsx)(`span`,{className:`project-list-header-created`,children:s(`projects.created`)}),(0,$.jsx)(`span`,{className:`project-list-header-modified`,children:s(`projects.modified`)}),(0,$.jsx)(`span`,{className:`project-list-header-mentions`,children:s(`projects.mentionsColumn`)}),(0,$.jsx)(`span`,{className:`project-list-header-actions`,children:s(`projects.actions`)})]}),G===`list`?un.map(({item:e,removeAt:n})=>(0,$.jsx)(nr,{project:e,removing:n!==null,onRemovalEnd:()=>dn(e.id),currentUser:t,showArchived:q,archiveBusy:Zt===e.id,menuOpen:$t===e.id,t:s,formatCreatedDate:Ln,formatUpdatedTime:Rn,formatExactTime:In,onOpenProject:()=>{J(null),o(e.id)},onOpenMention:()=>void Fn(e),onToggleMenu:()=>J(t=>t===e.id?null:e.id),onCloseMenu:()=>J(t=>t===e.id?null:t),onAssignTags:()=>{D(``),B(e)},onRename:()=>{O(``),V(e),Tt(e.name)},onDuplicate:()=>{k(``),Ot(e),U(`${e.name} (1)`)},onArchive:()=>void Pn(e),onTransfer:()=>void jn(e),onDelete:()=>{Nt(e),Ie(``)},onChooseIcon:()=>St(e)},e.id)):un.map(({item:e,removeAt:n})=>(0,$.jsx)(sr,{project:e,currentUser:t,removing:n!==null,onRemovalEnd:()=>dn(e.id),showArchived:q,archiveBusy:Zt===e.id,menuOpen:$t===e.id,t:s,formatUpdatedTime:e=>Rn(e,{singleUnit:!0}),formatExactTime:In,onOpenProject:()=>{J(null),o(e.id)},onOpenMention:()=>void Fn(e),onToggleMenu:()=>J(t=>t===e.id?null:e.id),onCloseMenu:()=>J(t=>t===e.id?null:t),onAssignTags:()=>{D(``),B(e)},onRename:()=>{O(``),V(e),Tt(e.name)},onDuplicate:()=>{k(``),Ot(e),U(`${e.name} (1)`)},onArchive:()=>void Pn(e),onTransfer:()=>void jn(e),onDelete:()=>{Nt(e),Ie(``)}},e.id)),ln&&un.length===0&&(L.trim()||R?(0,$.jsx)(`div`,{className:`empty`,children:s(`projects.noMatches`)}):q?(0,$.jsxs)(`div`,{className:`project-empty project-empty-archived`,children:[(0,$.jsx)(`span`,{className:`project-empty-icon`,children:(0,$.jsx)(nt,{"aria-hidden":`true`,size:25,strokeWidth:1.5})}),(0,$.jsx)(`h2`,{children:s(`projects.noArchived`)}),(0,$.jsx)(`p`,{children:s(`projects.noArchivedDescription`)}),(0,$.jsxs)(`button`,{type:`button`,className:`project-empty-action`,onClick:()=>gn(!1),children:[(0,$.jsx)(ge,{"aria-hidden":`true`,size:14}),s(`projects.backToActive`)]})]}):x===`shared`?(0,$.jsxs)(`div`,{className:`project-empty`,children:[(0,$.jsx)(`span`,{className:`project-empty-icon`,children:(0,$.jsx)(me,{size:28,"aria-hidden":!0})}),(0,$.jsx)(`h2`,{children:s(`projects.noShared`)}),(0,$.jsx)(`p`,{children:s(`projects.emptyRestricted`)})]}):(0,$.jsxs)(`div`,{className:`project-empty`,children:[(0,$.jsx)(`span`,{className:`project-empty-icon`,children:(0,$.jsx)(Cn,{size:28})}),(0,$.jsx)(`h2`,{children:s(`projects.emptyTitle`)}),(0,$.jsx)(`p`,{children:t.canCreateProjects?s(`projects.emptyDescription`):s(`projects.emptyRestricted`)})]}))]}),ln&&b.totalPages>1&&(0,$.jsxs)(`nav`,{className:`project-pagination`,"aria-label":s(`projects.pagination`),children:[(0,$.jsxs)(`button`,{disabled:b.page<=1,onClick:()=>Y(e=>Math.max(1,e-1)),title:s(`projects.previousPage`),children:[(0,$.jsx)(i,{size:15}),s(`projects.previousPage`)]}),(0,$.jsx)(`span`,{children:s(`projects.pageOf`,{page:b.page,totalPages:b.totalPages,count:b.total})}),(0,$.jsxs)(`button`,{disabled:b.page>=b.totalPages,onClick:()=>Y(e=>Math.min(b.totalPages,e+1)),title:s(`projects.nextPage`),children:[(0,$.jsx)(ce,{size:15}),s(`projects.nextPage`)]})]})]})})]}),(0,$.jsx)(j,{className:`management-dialog`,open:Le,title:s(`projects.new`),description:s(`projects.newDescription`),onOpenChange:e=>{(e||!A)&&(ze(e),e||E(``))},footer:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`button`,{disabled:A,onClick:()=>ze(!1),children:s(`common.cancel`)}),(0,$.jsxs)(`button`,{className:`primary`,disabled:A||!Be.trim(),"aria-busy":A,onClick:()=>void vn(),children:[A&&(0,$.jsx)(Re,{className:`spin`,size:14}),s(A?`common.loading`:`common.create`)]})]}),children:(0,$.jsxs)($.Fragment,{children:[Ae&&(0,$.jsx)(`p`,{className:`error dialog-error`,children:Ae}),(0,$.jsxs)(`label`,{className:`form-field`,children:[s(`projects.name`),(0,$.jsx)(`input`,{autoFocus:!0,value:Be,onChange:e=>{Ve(e.target.value),E(``)},onKeyDown:e=>{e.key===`Enter`&&vn()}})]})]})}),(0,$.jsx)(j,{className:`management-dialog`,open:$e,title:s(`projects.upload`),description:s(`projects.uploadDescription`,{size:e.maxUploadSizeMB}),onOpenChange:e=>{(e||!I)&&(et(e),e||F(``))},footer:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`button`,{disabled:I,onClick:()=>{et(!1),F(``)},children:s(`common.cancel`)}),(0,$.jsxs)(`button`,{className:`primary`,disabled:!P||I,"aria-busy":I,onClick:()=>void yn(),children:[I&&(0,$.jsx)(Re,{className:`spin`,size:14}),s(I?ct===`processing`?`projects.processing`:`projects.uploading`:`projects.import`)]})]}),children:(0,$.jsxs)(`div`,{className:`form-stack`,children:[st&&(0,$.jsx)(`p`,{className:`error import-error`,children:st}),(0,$.jsxs)(`div`,{className:`upload-picker${P?` has-file`:``}${I?` is-disabled`:``}`,onDragOver:e=>{e.preventDefault(),I||(e.dataTransfer.dropEffect=`copy`)},onDrop:e=>{e.preventDefault(),I||bn(e.dataTransfer.files[0]??null)},children:[(0,$.jsx)(`input`,{ref:ft,className:`sr-only`,type:`file`,accept:`.zip,application/zip`,disabled:I,onChange:e=>bn(e.target.files?.[0]??null)}),(0,$.jsx)(pe,{size:34}),(0,$.jsxs)(`div`,{className:`upload-picker-copy`,children:[(0,$.jsx)(`strong`,{children:P?.name??s(`projects.chooseZip`)}),(0,$.jsx)(`span`,{children:P?s(`projects.selectedFileSize`,{size:Te(P.size,{maximumUnit:`MB`})}):s(`projects.dropZip`)})]}),(0,$.jsxs)(`button`,{type:`button`,disabled:I,onClick:()=>ft.current?.click(),children:[(0,$.jsx)(ae,{size:15}),s(`projects.browse`)]}),P&&(0,$.jsx)(`button`,{className:`upload-clear`,type:`button`,disabled:I,title:s(`projects.clearFile`),"aria-label":s(`projects.clearFile`),onClick:()=>{bn(null),ft.current&&(ft.current.value=``)},children:(0,$.jsx)(Oe,{size:14})})]}),(0,$.jsxs)(`label`,{className:`form-field`,children:[s(`projects.name`),(0,$.jsx)(`input`,{disabled:I,value:tt,onChange:e=>rt(e.target.value)})]}),I&&(0,$.jsxs)(`div`,{className:`project-import-progress`,role:`status`,"aria-live":`polite`,children:[(0,$.jsxs)(`div`,{className:`project-import-progress-label`,children:[(0,$.jsx)(`span`,{children:s(ct===`processing`?`projects.processing`:`projects.uploading`)}),ct===`uploading`&&ut!==null&&(0,$.jsxs)(`small`,{"aria-hidden":`true`,children:[ut,`%`]})]}),(0,$.jsx)(`progress`,{"aria-label":s(`projects.uploadProgress`),max:100,value:ct===`uploading`?ut??void 0:void 0}),ct===`processing`&&(0,$.jsx)(`small`,{className:`import-progress-hint`,children:s(`projects.processingHint`)})]})]})}),yt&&(0,$.jsx)(Ke,{title:s(`tags.manage`),onClose:()=>bt(!1),children:(0,$.jsx)(yr,{open:!0,onOpenChange:bt,onTagCreated:wn,onTagUpdated:Tn,onTagDeleted:En})}),xt&&(0,$.jsx)(Ke,{title:s(`projectIcons.title`),onClose:()=>St(null),children:(0,$.jsx)(br,{project:xt,open:!0,onOpenChange:e=>{e||St(null)},onSave:Dn})}),(0,$.jsx)(j,{open:!!z,title:s(`tags.assignTitle`,{project:z?.name??``}),description:s(`tags.assignDescription`),onOpenChange:e=>{e||(B(null),D(``))},footer:(0,$.jsx)(`button`,{onClick:()=>{B(null),D(``)},children:s(`common.close`)}),children:(0,$.jsxs)(`div`,{className:`tag-assignment-list`,children:[je&&(0,$.jsx)(`p`,{className:`error dialog-error`,children:je}),_.map(e=>(0,$.jsxs)(`label`,{children:[(0,$.jsx)(`input`,{type:`checkbox`,checked:!!z?.tags.some(t=>t.id===e.id),onChange:()=>void Sn(e)}),(0,$.jsx)(Cr,{color:e.color}),(0,$.jsx)(`span`,{children:e.name})]},e.id)),_.length===0&&(0,$.jsx)(`p`,{className:`muted`,children:s(`tags.empty`)})]})}),(0,$.jsx)(j,{open:!!Ct,title:s(`projects.renameTitle`),onOpenChange:e=>{(e||!H)&&(e||(V(null),O(``)))},footer:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`button`,{disabled:H,onClick:()=>{V(null),O(``)},children:s(`common.cancel`)}),(0,$.jsxs)(`button`,{className:`primary`,disabled:H||!wt.trim(),"aria-busy":H,onClick:()=>void On(),children:[H&&(0,$.jsx)(Re,{className:`spin`,size:14}),s(H?`common.loading`:`projects.rename`)]})]}),children:(0,$.jsxs)($.Fragment,{children:[Me&&(0,$.jsx)(`p`,{className:`error dialog-error`,children:Me}),(0,$.jsxs)(`label`,{className:`form-field`,children:[s(`projects.name`),(0,$.jsx)(`input`,{autoFocus:!0,value:wt,onChange:e=>{Tt(e.target.value),O(``)},onKeyDown:e=>{e.key===`Enter`&&On()}})]})]})}),(0,$.jsx)(j,{open:!!Dt,title:s(`projects.duplicateTitle`),description:s(`projects.duplicateDescription`,{project:Dt?.name??``}),onOpenChange:e=>{!e&&!At&&(Ot(null),U(``),k(``))},footer:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`button`,{disabled:At,onClick:()=>{Ot(null),U(``),k(``)},children:s(`common.cancel`)}),(0,$.jsx)(`button`,{className:`primary`,disabled:At||!kt.trim(),onClick:()=>void kn(),children:s(At?`projects.duplicating`:`projects.duplicate`)})]}),children:(0,$.jsxs)($.Fragment,{children:[Pe&&(0,$.jsx)(`p`,{className:`error dialog-error`,children:Pe}),(0,$.jsxs)(`label`,{className:`form-field`,children:[s(`projects.name`),(0,$.jsx)(`input`,{autoFocus:!0,value:kt,onChange:e=>{U(e.target.value),k(``)},onKeyDown:e=>{e.key===`Enter`&&kn()}})]})]})}),(0,$.jsx)(j,{open:!!Rt,title:s(`projects.transferOwnership`),description:s(`projects.transferDescription`,{project:Rt?.name??``}),onOpenChange:e=>{!e&&!Wt&&(zt(null),Ut(``),W(``))},footer:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`button`,{disabled:Wt,onClick:()=>{zt(null),Ut(``),W(``)},children:s(`common.cancel`)}),(0,$.jsxs)(`button`,{className:`primary`,disabled:Wt||!Ht,onClick:()=>void Mn(),children:[Wt?(0,$.jsx)(Re,{className:`spin`,size:14}):(0,$.jsx)(at,{size:14}),s(`projects.transfer`)]})]}),children:(0,$.jsxs)(`div`,{className:`form-stack`,children:[Kt&&(0,$.jsx)(`p`,{className:`error dialog-error`,children:Kt}),(0,$.jsxs)(`label`,{className:`form-field`,children:[s(`projects.newOwner`),(0,$.jsxs)(`select`,{disabled:Wt||Bt.length===0,value:Ht,onChange:e=>Ut(e.target.value),children:[(0,$.jsx)(`option`,{value:``,children:Wt?s(`common.loading`):Bt.length>0?s(`projects.chooseNewOwner`):s(`projects.noTransferUsers`)}),Bt.map(e=>(0,$.jsxs)(`option`,{value:e.id,children:[e.displayName??e.username,` (@`,e.username,`)`]},e.id))]})]}),(0,$.jsxs)(`p`,{className:`warning`,children:[(0,$.jsx)(De,{size:15}),s(`projects.transferWarning`)]})]})}),(0,$.jsx)(qe,{className:`management-dialog`,open:!!Mt,title:s(`projects.deleteTitle`),description:(0,$.jsx)(h,{i18nKey:`projects.deleteDescription`,values:{project:Mt?.name??``},components:{project:(0,$.jsx)(`strong`,{})}}),confirmLabel:s(Pt?`common.loading`:`common.delete`),danger:!0,busy:Pt,error:Fe,onCancel:()=>{Pt||(Nt(null),Ie(``))},onConfirm:()=>void An()})]}),ye&&(0,$.jsx)(Ke,{title:s(`metrics.title`),onClose:()=>xe(!1),children:(0,$.jsx)(hr,{open:!0,onOpenChange:xe})}),Se&&(0,$.jsx)(Ke,{title:s(`account.githubTitle`),onClose:()=>we(!1),children:(0,$.jsx)(xr,{open:!0,onOpenChange:we})}),(0,$.jsx)(We,{})]})}function Cr({color:e}){return(0,$.jsx)(`span`,{className:`tag-dot tag-${e}`})}export{Sr as Dashboard,Jn as a,Qe as c,Qn as i,$n as n,Yn as o,Zn as r,Pt as s,cr as t};
@@ -1,4 +1,4 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,t as n}from"./react-DUEFWlB7.js";import{t as r}from"./useTranslation-DwkoADSz.js";import{t as i}from"./createLucideIcon-CDYIzuiB.js";import{H as a,c as ee,j as o,w as te}from"./useDeletionTransitions-Ba_yhkrl.js";import{o as s}from"./dist-B_WjsTVV.js";import{n as ne,r as re,t as c}from"./GitHubIcon-CExJn0AV.js";import{t as ie}from"./git-compare-arrows-158rS_vn.js";import{t as ae}from"./InfoPopover-Ba7GvcuW.js";import{t as l}from"./loader-circle-DKGyi5EK.js";import{n as oe,t as se}from"./minimize-2-CkBmeGXp.js";import{t as ce}from"./minus-DrpwqY8Y.js";import{t as le}from"./plus-Cei21TlT.js";import{b as u,g as d,w as f,x as p}from"./index-CPR6YZEf.js";import{w as ue}from"./ProjectWorkspace-B-w2ix8N.js";var m={name:`cloud-upload`,size:24,node:[[`path`,{d:`M12 13v8`,key:`1l5pq0`}],[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`m8 17 4-4 4 4`,key:`1quai1`}]],aliases:[`upload-cloud`]};m.node;var de=i(m),h={name:`git-commit-horizontal`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]],aliases:[`git-commit`]};h.node;var g=i(h),_={name:`undo-2`,size:24,node:[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]};_.node;var fe=i(_),v=e(t(),1),y=n();function b({open:e,project:t,onOpenChange:n,onBeforeMutation:i}){let{t:m,i18n:h}=r(),[_,b]=(0,v.useState)(null),[S,C]=(0,v.useState)(`project`),[w,T]=(0,v.useState)([]),[E,D]=(0,v.useState)(()=>x(t.name)),[O,he]=(0,v.useState)(!0),[k,A]=(0,v.useState)(``),[j,M]=(0,v.useState)(null),[N,P]=(0,v.useState)(null),[F,I]=(0,v.useState)(!1),[ge,L]=(0,v.useState)(!1),[R,z]=(0,v.useState)(!0),[B,V]=(0,v.useState)(!0),[H,U]=(0,v.useState)(``),[W,G]=(0,v.useState)(``),[K,q]=(0,v.useState)(``),[J,Y]=(0,v.useState)(!1),[X,_e]=(0,v.useState)(10),Z=(0,v.useRef)(null),ve=async(e=!1)=>{let n=await f(`/api/projects/${t.id}/git`);if(b(n.status),e&&(z(!n.status.tokenConfigured),V(!n.status.remoteUrl)),n.status.initialized&&n.status.latestCommit){let e=await f(`/api/projects/${t.id}/git/history`);T(e.commits)}else T([])};(0,v.useEffect)(()=>{e?(G(``),q(``),M(null),C(`project`),Y(!1),D(x(t.name)),U(`load`),i().then(()=>ve(!0)).catch(e=>G(e instanceof Error?e.message:m(`errors.generic`))).finally(()=>U(``))):(document.fullscreenElement&&document.exitFullscreen().catch(()=>void 0),Y(!1))},[e,t.id]),(0,v.useEffect)(()=>{let e=()=>Y(document.fullscreenElement===Z.current);return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[]),(0,v.useEffect)(()=>{if(!J)return;let e=e=>{e.key===`Escape`&&!document.fullscreenElement&&Y(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[J]);let Q=async(e,t,n,r)=>{U(e),G(``),q(``);try{await t(),n&&q(n)}catch(e){let t=e instanceof Error?e.message:m(`errors.generic`);G(r?`${r}: ${t}`:t)}finally{U(``)}},ye=()=>Q(`repository`,async()=>{let e=await f(`/api/projects/${t.id}/git/repository`,{method:`POST`,body:JSON.stringify({name:E,private:O})});b(e.status),V(!1)},m(`git.repositoryCreated`)),be=()=>Q(`commit`,async()=>{if(!await i())throw Error(m(`errors.collaborationUnavailable`));let e=await f(`/api/projects/${t.id}/git/commit`,{method:`POST`,body:JSON.stringify({message:k})});b(e.status),T(t=>[e.commit,...t.filter(t=>t.sha!==e.commit.sha)].slice(0,100)),A(``),M(null)},m(`git.committed`),m(`git.commitFailed`)),xe=()=>Q(`push`,async()=>{if(!await i())throw Error(m(`errors.collaborationUnavailable`));let e=await f(`/api/projects/${t.id}/git/push`,{method:`POST`});b(e.status)},m(`git.pushed`),m(`git.pushFailed`)),Se=e=>Q(`diff`,async()=>{if(!await i())throw Error(m(`errors.collaborationUnavailable`));let n=e?`?revision=${encodeURIComponent(e)}`:``,r=await f(`/api/projects/${t.id}/git/diff${n}`);M({...r,revision:e})}),Ce=e=>{j&&j.revision===e?(M(null),Y(!1),document.fullscreenElement&&document.exitFullscreen().catch(()=>void 0)):Se(e)},we=async()=>{if(J){document.fullscreenElement&&await document.exitFullscreen().catch(()=>void 0),Y(!1);return}let e=Z.current;if(e?.requestFullscreen)try{await e.requestFullscreen()}catch{}Y(!0)},Te=()=>{let e=N;e&&(P(null),Q(`checkout`,async()=>{if(!await i())throw Error(m(`errors.collaborationUnavailable`));await f(`/api/projects/${t.id}/git/checkout`,{method:`POST`,body:JSON.stringify({revision:e===`branch`?null:e.sha,force:F})}),window.location.reload()}))},Ee=()=>{L(!1),Q(`discard`,async()=>{if(!await i())throw Error(m(`errors.collaborationUnavailable`));await f(`/api/projects/${t.id}/git/discard`,{method:`POST`}),window.location.reload()})},De=H===`load`&&!_,$=j!==null&&j.revision===void 0;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(d,{open:e,extraWide:!0,className:J?`git-dialog-modal-fullscreen`:void 0,title:m(`git.title`),description:m(`git.description`),onOpenChange:n,footer:(0,y.jsx)(`button`,{onClick:()=>n(!1),children:m(`common.close`)}),children:(0,y.jsxs)(`div`,{className:`git-dialog`,children:[De&&(0,y.jsxs)(`div`,{className:`git-loading`,children:[(0,y.jsx)(l,{className:`spin`,size:22}),m(`common.loading`)]}),W&&(0,y.jsx)(`p`,{className:`git-message error`,role:`alert`,children:W}),K&&(0,y.jsxs)(`p`,{className:`git-message success`,role:`status`,children:[(0,y.jsx)(o,{size:14}),K]}),_&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`div`,{className:`share-scope-tabs`,role:`tablist`,"aria-label":m(`git.title`),children:[`project`,`history`].map(e=>(0,y.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":S===e,disabled:!!H,onClick:()=>{C(e),M(null),Y(!1),document.fullscreenElement&&document.exitFullscreen().catch(()=>void 0)},children:m(e===`project`?`git.projectTab`:`git.history`)},e))}),S===`project`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`section`,{className:`git-section`,children:[(0,y.jsxs)(`button`,{className:`git-section-toggle`,type:`button`,"aria-expanded":R,onClick:()=>z(e=>!e),children:[(0,y.jsxs)(`span`,{className:`git-section-heading`,children:[(0,y.jsx)(c,{size:16}),(0,y.jsxs)(`span`,{children:[(0,y.jsx)(`strong`,{children:m(`git.authentication`)}),(0,y.jsx)(`small`,{children:_.tokenConfigured?m(`git.connectedAs`,{login:_.githubLogin}):m(`git.authenticationHint`)})]})]}),R?(0,y.jsx)(s,{size:16}):(0,y.jsx)(a,{size:16})]}),R&&(0,y.jsx)(`div`,{className:`git-section-content`,children:_.tokenConfigured?(0,y.jsx)(`p`,{className:`git-account-guidance`,children:m(`git.accountTokenManaged`,{login:_.githubLogin})}):(0,y.jsxs)(`p`,{className:`warning`,role:`status`,children:[(0,y.jsx)(te,{size:15,"aria-hidden":`true`}),(0,y.jsx)(`span`,{children:m(`git.accountTokenMissing`)})]})})]}),(0,y.jsxs)(`section`,{className:`git-section`,children:[(0,y.jsxs)(`button`,{className:`git-section-toggle`,type:`button`,"aria-expanded":B,onClick:()=>V(e=>!e),children:[(0,y.jsxs)(`span`,{className:`git-section-heading`,children:[(0,y.jsx)(ne,{size:16}),(0,y.jsxs)(`span`,{children:[(0,y.jsx)(`strong`,{children:m(`git.repository`)}),(0,y.jsx)(`small`,{children:_.remoteUrl?_.repositoryName??_.remoteUrl:_.initialized?m(`git.localReady`):m(`git.localPending`)})]})]}),B?(0,y.jsx)(s,{size:16}):(0,y.jsx)(a,{size:16})]}),B&&(0,y.jsx)(`div`,{className:`git-section-content`,children:_.remoteUrl?(0,y.jsxs)(`div`,{className:`git-repository-card`,children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`strong`,{children:_.repositoryName??m(`git.origin`)}),(0,y.jsxs)(`small`,{children:[_.branch??m(`git.detachedAt`,{revision:_.latestCommit?.shortSha??`HEAD`}),` · `,_.dirty?m(`git.changedFiles`,{count:_.changedFiles}):m(`git.clean`)]})]}),_.repositoryHtmlUrl&&(0,y.jsxs)(`a`,{href:_.repositoryHtmlUrl,target:`_blank`,rel:`noreferrer`,children:[(0,y.jsx)(re,{size:14}),m(`git.openGitHub`)]})]}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`label`,{className:`form-field`,children:[m(`git.repositoryName`),(0,y.jsx)(`input`,{value:E,onChange:e=>D(e.target.value)})]}),(0,y.jsxs)(`label`,{className:`checkbox-field`,children:[(0,y.jsx)(`input`,{type:`checkbox`,checked:O,onChange:e=>he(e.target.checked)}),m(`git.privateRepository`)]}),(0,y.jsxs)(`button`,{className:`git-primary-action`,disabled:!!H||!_.tokenConfigured||!E.trim(),onClick:ye,children:[H===`repository`?(0,y.jsx)(l,{className:`spin`,size:14}):(0,y.jsx)(c,{size:14}),m(`git.createRepository`)]})]})})]}),_.initialized&&(0,y.jsxs)(`section`,{className:`git-section`,children:[(0,y.jsxs)(`div`,{className:`git-section-heading`,children:[(0,y.jsx)(g,{size:16}),(0,y.jsxs)(`div`,{children:[(0,y.jsxs)(`div`,{className:`git-section-title`,children:[(0,y.jsx)(`strong`,{children:m(`git.commitAndPush`)}),(0,y.jsx)(ae,{label:m(`git.commandsInfo`),content:(0,y.jsx)(pe,{})})]}),(0,y.jsx)(`small`,{className:`git-identity-line`,children:_.branch?(0,y.jsxs)(y.Fragment,{children:[m(`git.identityPrefix`),` `,(0,y.jsx)(`span`,{className:`git-identity-name`,children:_.commitIdentity.name}),` <`,(0,y.jsx)(`span`,{className:`git-identity-email`,children:_.commitIdentity.email}),`>`]}):m(`git.detachedHead`)})]})]}),(0,y.jsxs)(`label`,{className:`form-field`,children:[m(`git.commitMessage`),(0,y.jsx)(`textarea`,{rows:3,value:k,placeholder:m(`git.commitPlaceholder`),onChange:e=>A(e.target.value)})]}),(0,y.jsxs)(`div`,{className:`git-action-row`,children:[(0,y.jsxs)(`button`,{title:_.dirty?void 0:m(`git.noChangesToCommit`),disabled:!!H||!_.branch||!_.dirty||!k.trim(),onClick:be,children:[H===`commit`?(0,y.jsx)(l,{className:`spin`,size:14}):(0,y.jsx)(g,{size:14}),m(`git.commit`)]}),(0,y.jsxs)(`button`,{title:_.ahead===0&&_.branch&&_.remoteUrl&&_.tokenConfigured&&_.latestCommit?m(`git.noUnpushedCommits`):void 0,disabled:!!H||!_.branch||!_.tokenConfigured||!_.remoteUrl||!_.latestCommit||_.ahead===0,onClick:xe,children:[H===`push`?(0,y.jsx)(l,{className:`spin`,size:14}):(0,y.jsx)(de,{size:14}),m(`git.push`),_.ahead>0&&(0,y.jsx)(`span`,{className:`git-count`,children:_.ahead})]}),(0,y.jsxs)(`button`,{"aria-pressed":$,className:$?`is-active`:void 0,disabled:!!H||!_.latestCommit,onClick:()=>Ce(),children:[H===`diff`?(0,y.jsx)(l,{className:`spin`,size:14}):$?(0,y.jsx)(p,{size:14}):(0,y.jsx)(u,{size:14}),m(`git.workingDiff`)]}),(0,y.jsxs)(`button`,{className:`git-discard-button`,title:_.restorable?m(`git.discardChanges`):m(`git.noChangesToDiscard`),disabled:!!H||!_.latestCommit||!_.restorable,onClick:()=>L(!0),children:[(0,y.jsx)(ue,{size:14}),m(`git.discardChanges`)]}),!_.branch&&(0,y.jsxs)(`button`,{disabled:!!H,onClick:()=>{I(!1),P(`branch`)},children:[(0,y.jsx)(o,{size:14}),m(`git.returnToBranch`,{branch:_.defaultBranch})]})]})]})]}),j&&(0,y.jsxs)(`section`,{ref:Z,className:`git-section git-diff-section${J?` is-fullscreen`:``}`,children:[(0,y.jsxs)(`div`,{className:`git-diff-heading`,children:[(0,y.jsxs)(`div`,{className:`git-section-heading`,children:[(0,y.jsx)(ie,{size:16}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`strong`,{children:m(`git.diffTitle`)}),(0,y.jsxs)(`small`,{children:[j.title,j.truncated?` · ${m(`git.diffTruncated`)}`:``]})]})]}),(0,y.jsxs)(`div`,{className:`git-diff-controls`,children:[(0,y.jsxs)(`div`,{className:`git-diff-font-controls`,role:`group`,"aria-label":m(`git.diffFontSize`),children:[(0,y.jsx)(`button`,{type:`button`,className:`git-diff-font-button`,disabled:X<=8,title:m(`git.diffFontDecrease`),"aria-label":m(`git.diffFontDecrease`),onClick:()=>_e(e=>Math.max(8,e-1)),children:(0,y.jsx)(ce,{size:14})}),(0,y.jsxs)(`span`,{className:`git-diff-font-value`,"aria-live":`polite`,children:[X,`px`]}),(0,y.jsx)(`button`,{type:`button`,className:`git-diff-font-button`,disabled:X>=24,title:m(`git.diffFontIncrease`),"aria-label":m(`git.diffFontIncrease`),onClick:()=>_e(e=>Math.min(24,e+1)),children:(0,y.jsx)(le,{size:14})})]}),(0,y.jsx)(`button`,{type:`button`,className:`git-diff-fullscreen`,title:m(J?`git.exitFullscreenDiff`:`git.fullscreenDiff`),"aria-label":m(J?`git.exitFullscreenDiff`:`git.fullscreenDiff`),onClick:()=>void we(),children:J?(0,y.jsx)(se,{size:15}):(0,y.jsx)(oe,{size:15})})]})]}),(0,y.jsx)(me,{content:j.diff,empty:m(`git.noChanges`),fontSize:X})]}),S===`history`&&(0,y.jsxs)(`section`,{className:`git-section`,children:[(0,y.jsxs)(`div`,{className:`git-section-heading`,children:[(0,y.jsx)(o,{size:16}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`strong`,{children:m(`git.history`)}),(0,y.jsx)(`small`,{children:m(`git.historyHint`)})]})]}),(0,y.jsxs)(`div`,{className:`git-history`,children:[w.map(e=>{let t=j?.revision===e.sha;return(0,y.jsxs)(`article`,{children:[(0,y.jsx)(`code`,{children:e.shortSha}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`strong`,{children:e.message}),(0,y.jsxs)(`small`,{children:[e.authorName,` · `,ee(e.authoredAt,h.resolvedLanguage)]})]}),(0,y.jsxs)(`span`,{"data-texlite-tooltip-always":!0,children:[(0,y.jsx)(`button`,{type:`button`,className:t?`is-active`:void 0,title:m(t?`git.hideCommitDiff`:`git.viewCommitDiff`),"aria-label":m(t?`git.hideCommitDiff`:`git.viewCommitDiff`),"aria-pressed":t,disabled:!!H,onClick:()=>Ce(e.sha),children:t?(0,y.jsx)(p,{size:14}):(0,y.jsx)(u,{size:14})}),(0,y.jsx)(`button`,{type:`button`,title:m(`git.checkoutVersion`),disabled:!!H,onClick:()=>{I(!1),P(e)},children:(0,y.jsx)(fe,{size:14})})]})]},e.sha)}),w.length===0&&(0,y.jsx)(`p`,{className:`muted git-history-empty`,children:m(`git.noCommits`)})]})]})]})]})}),(0,y.jsx)(d,{open:!!N,title:m(N===`branch`?`git.returnTitle`:`git.checkoutTitle`),description:N===`branch`?m(`git.returnDescription`,{branch:_?.defaultBranch??`main`}):m(`git.checkoutDescription`,{revision:N?.shortSha??``,message:N?.message??``}),onOpenChange:e=>{e||P(null)},footer:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`button`,{onClick:()=>P(null),children:m(`common.cancel`)}),(0,y.jsx)(`button`,{className:F?`danger`:`primary`,onClick:Te,children:m(`git.checkout`)})]}),children:(0,y.jsxs)(`label`,{className:`git-force-checkout`,children:[(0,y.jsx)(`input`,{type:`checkbox`,checked:F,onChange:e=>I(e.target.checked)}),(0,y.jsxs)(`span`,{children:[(0,y.jsx)(`strong`,{children:m(`git.forceCheckout`)}),(0,y.jsx)(`small`,{children:m(`git.forceCheckoutDescription`)})]})]})}),(0,y.jsx)(d,{open:ge,title:m(`git.discardTitle`),description:m(`git.discardDescription`),onOpenChange:L,footer:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`button`,{onClick:()=>L(!1),children:m(`common.cancel`)}),(0,y.jsx)(`button`,{className:`danger`,onClick:Ee,children:m(`git.discardConfirm`)})]}),children:(0,y.jsx)(y.Fragment,{})})]})}function pe(){let{t:e}=r();return(0,y.jsxs)(`ul`,{className:`git-command-help`,children:[(0,y.jsxs)(`li`,{children:[(0,y.jsx)(`strong`,{children:e(`git.commit`)}),(0,y.jsxs)(`code`,{children:[(0,y.jsx)(`b`,{children:`git add`}),` --all`,`
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,t as n}from"./react-DUEFWlB7.js";import{t as r}from"./useTranslation-DwkoADSz.js";import{t as i}from"./createLucideIcon-CDYIzuiB.js";import{H as a,c as ee,j as o,w as te}from"./useDeletionTransitions-Xlq7HabP.js";import{o as s}from"./dist-B_WjsTVV.js";import{n as ne,r as re,t as c}from"./GitHubIcon-CExJn0AV.js";import{t as ie}from"./git-compare-arrows-158rS_vn.js";import{t as ae}from"./InfoPopover-BJYnFn1P.js";import{t as l}from"./loader-circle-DKGyi5EK.js";import{n as oe,t as se}from"./minimize-2-CkBmeGXp.js";import{t as ce}from"./minus-DrpwqY8Y.js";import{t as le}from"./plus-Cei21TlT.js";import{b as u,g as d,w as f,x as p}from"./index-CemLYDYL.js";import{w as ue}from"./ProjectWorkspace-C2QAb-Fc.js";var m={name:`cloud-upload`,size:24,node:[[`path`,{d:`M12 13v8`,key:`1l5pq0`}],[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`m8 17 4-4 4 4`,key:`1quai1`}]],aliases:[`upload-cloud`]};m.node;var de=i(m),h={name:`git-commit-horizontal`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]],aliases:[`git-commit`]};h.node;var g=i(h),_={name:`undo-2`,size:24,node:[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]};_.node;var fe=i(_),v=e(t(),1),y=n();function b({open:e,project:t,onOpenChange:n,onBeforeMutation:i}){let{t:m,i18n:h}=r(),[_,b]=(0,v.useState)(null),[S,C]=(0,v.useState)(`project`),[w,T]=(0,v.useState)([]),[E,D]=(0,v.useState)(()=>x(t.name)),[O,he]=(0,v.useState)(!0),[k,A]=(0,v.useState)(``),[j,M]=(0,v.useState)(null),[N,P]=(0,v.useState)(null),[F,I]=(0,v.useState)(!1),[ge,L]=(0,v.useState)(!1),[R,z]=(0,v.useState)(!0),[B,V]=(0,v.useState)(!0),[H,U]=(0,v.useState)(``),[W,G]=(0,v.useState)(``),[K,q]=(0,v.useState)(``),[J,Y]=(0,v.useState)(!1),[X,_e]=(0,v.useState)(10),Z=(0,v.useRef)(null),ve=async(e=!1)=>{let n=await f(`/api/projects/${t.id}/git`);if(b(n.status),e&&(z(!n.status.tokenConfigured),V(!n.status.remoteUrl)),n.status.initialized&&n.status.latestCommit){let e=await f(`/api/projects/${t.id}/git/history`);T(e.commits)}else T([])};(0,v.useEffect)(()=>{e?(G(``),q(``),M(null),C(`project`),Y(!1),D(x(t.name)),U(`load`),i().then(()=>ve(!0)).catch(e=>G(e instanceof Error?e.message:m(`errors.generic`))).finally(()=>U(``))):(document.fullscreenElement&&document.exitFullscreen().catch(()=>void 0),Y(!1))},[e,t.id]),(0,v.useEffect)(()=>{let e=()=>Y(document.fullscreenElement===Z.current);return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[]),(0,v.useEffect)(()=>{if(!J)return;let e=e=>{e.key===`Escape`&&!document.fullscreenElement&&Y(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[J]);let Q=async(e,t,n,r)=>{U(e),G(``),q(``);try{await t(),n&&q(n)}catch(e){let t=e instanceof Error?e.message:m(`errors.generic`);G(r?`${r}: ${t}`:t)}finally{U(``)}},ye=()=>Q(`repository`,async()=>{let e=await f(`/api/projects/${t.id}/git/repository`,{method:`POST`,body:JSON.stringify({name:E,private:O})});b(e.status),V(!1)},m(`git.repositoryCreated`)),be=()=>Q(`commit`,async()=>{if(!await i())throw Error(m(`errors.collaborationUnavailable`));let e=await f(`/api/projects/${t.id}/git/commit`,{method:`POST`,body:JSON.stringify({message:k})});b(e.status),T(t=>[e.commit,...t.filter(t=>t.sha!==e.commit.sha)].slice(0,100)),A(``),M(null)},m(`git.committed`),m(`git.commitFailed`)),xe=()=>Q(`push`,async()=>{if(!await i())throw Error(m(`errors.collaborationUnavailable`));let e=await f(`/api/projects/${t.id}/git/push`,{method:`POST`});b(e.status)},m(`git.pushed`),m(`git.pushFailed`)),Se=e=>Q(`diff`,async()=>{if(!await i())throw Error(m(`errors.collaborationUnavailable`));let n=e?`?revision=${encodeURIComponent(e)}`:``,r=await f(`/api/projects/${t.id}/git/diff${n}`);M({...r,revision:e})}),Ce=e=>{j&&j.revision===e?(M(null),Y(!1),document.fullscreenElement&&document.exitFullscreen().catch(()=>void 0)):Se(e)},we=async()=>{if(J){document.fullscreenElement&&await document.exitFullscreen().catch(()=>void 0),Y(!1);return}let e=Z.current;if(e?.requestFullscreen)try{await e.requestFullscreen()}catch{}Y(!0)},Te=()=>{let e=N;e&&(P(null),Q(`checkout`,async()=>{if(!await i())throw Error(m(`errors.collaborationUnavailable`));await f(`/api/projects/${t.id}/git/checkout`,{method:`POST`,body:JSON.stringify({revision:e===`branch`?null:e.sha,force:F})}),window.location.reload()}))},Ee=()=>{L(!1),Q(`discard`,async()=>{if(!await i())throw Error(m(`errors.collaborationUnavailable`));await f(`/api/projects/${t.id}/git/discard`,{method:`POST`}),window.location.reload()})},De=H===`load`&&!_,$=j!==null&&j.revision===void 0;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(d,{open:e,extraWide:!0,className:J?`git-dialog-modal-fullscreen`:void 0,title:m(`git.title`),description:m(`git.description`),onOpenChange:n,footer:(0,y.jsx)(`button`,{onClick:()=>n(!1),children:m(`common.close`)}),children:(0,y.jsxs)(`div`,{className:`git-dialog`,children:[De&&(0,y.jsxs)(`div`,{className:`git-loading`,children:[(0,y.jsx)(l,{className:`spin`,size:22}),m(`common.loading`)]}),W&&(0,y.jsx)(`p`,{className:`git-message error`,role:`alert`,children:W}),K&&(0,y.jsxs)(`p`,{className:`git-message success`,role:`status`,children:[(0,y.jsx)(o,{size:14}),K]}),_&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`div`,{className:`share-scope-tabs`,role:`tablist`,"aria-label":m(`git.title`),children:[`project`,`history`].map(e=>(0,y.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":S===e,disabled:!!H,onClick:()=>{C(e),M(null),Y(!1),document.fullscreenElement&&document.exitFullscreen().catch(()=>void 0)},children:m(e===`project`?`git.projectTab`:`git.history`)},e))}),S===`project`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`section`,{className:`git-section`,children:[(0,y.jsxs)(`button`,{className:`git-section-toggle`,type:`button`,"aria-expanded":R,onClick:()=>z(e=>!e),children:[(0,y.jsxs)(`span`,{className:`git-section-heading`,children:[(0,y.jsx)(c,{size:16}),(0,y.jsxs)(`span`,{children:[(0,y.jsx)(`strong`,{children:m(`git.authentication`)}),(0,y.jsx)(`small`,{children:_.tokenConfigured?m(`git.connectedAs`,{login:_.githubLogin}):m(`git.authenticationHint`)})]})]}),R?(0,y.jsx)(s,{size:16}):(0,y.jsx)(a,{size:16})]}),R&&(0,y.jsx)(`div`,{className:`git-section-content`,children:_.tokenConfigured?(0,y.jsx)(`p`,{className:`git-account-guidance`,children:m(`git.accountTokenManaged`,{login:_.githubLogin})}):(0,y.jsxs)(`p`,{className:`warning`,role:`status`,children:[(0,y.jsx)(te,{size:15,"aria-hidden":`true`}),(0,y.jsx)(`span`,{children:m(`git.accountTokenMissing`)})]})})]}),(0,y.jsxs)(`section`,{className:`git-section`,children:[(0,y.jsxs)(`button`,{className:`git-section-toggle`,type:`button`,"aria-expanded":B,onClick:()=>V(e=>!e),children:[(0,y.jsxs)(`span`,{className:`git-section-heading`,children:[(0,y.jsx)(ne,{size:16}),(0,y.jsxs)(`span`,{children:[(0,y.jsx)(`strong`,{children:m(`git.repository`)}),(0,y.jsx)(`small`,{children:_.remoteUrl?_.repositoryName??_.remoteUrl:_.initialized?m(`git.localReady`):m(`git.localPending`)})]})]}),B?(0,y.jsx)(s,{size:16}):(0,y.jsx)(a,{size:16})]}),B&&(0,y.jsx)(`div`,{className:`git-section-content`,children:_.remoteUrl?(0,y.jsxs)(`div`,{className:`git-repository-card`,children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`strong`,{children:_.repositoryName??m(`git.origin`)}),(0,y.jsxs)(`small`,{children:[_.branch??m(`git.detachedAt`,{revision:_.latestCommit?.shortSha??`HEAD`}),` · `,_.dirty?m(`git.changedFiles`,{count:_.changedFiles}):m(`git.clean`)]})]}),_.repositoryHtmlUrl&&(0,y.jsxs)(`a`,{href:_.repositoryHtmlUrl,target:`_blank`,rel:`noreferrer`,children:[(0,y.jsx)(re,{size:14}),m(`git.openGitHub`)]})]}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`label`,{className:`form-field`,children:[m(`git.repositoryName`),(0,y.jsx)(`input`,{value:E,onChange:e=>D(e.target.value)})]}),(0,y.jsxs)(`label`,{className:`checkbox-field`,children:[(0,y.jsx)(`input`,{type:`checkbox`,checked:O,onChange:e=>he(e.target.checked)}),m(`git.privateRepository`)]}),(0,y.jsxs)(`button`,{className:`git-primary-action`,disabled:!!H||!_.tokenConfigured||!E.trim(),onClick:ye,children:[H===`repository`?(0,y.jsx)(l,{className:`spin`,size:14}):(0,y.jsx)(c,{size:14}),m(`git.createRepository`)]})]})})]}),_.initialized&&(0,y.jsxs)(`section`,{className:`git-section`,children:[(0,y.jsxs)(`div`,{className:`git-section-heading`,children:[(0,y.jsx)(g,{size:16}),(0,y.jsxs)(`div`,{children:[(0,y.jsxs)(`div`,{className:`git-section-title`,children:[(0,y.jsx)(`strong`,{children:m(`git.commitAndPush`)}),(0,y.jsx)(ae,{label:m(`git.commandsInfo`),content:(0,y.jsx)(pe,{})})]}),(0,y.jsx)(`small`,{className:`git-identity-line`,children:_.branch?(0,y.jsxs)(y.Fragment,{children:[m(`git.identityPrefix`),` `,(0,y.jsx)(`span`,{className:`git-identity-name`,children:_.commitIdentity.name}),` <`,(0,y.jsx)(`span`,{className:`git-identity-email`,children:_.commitIdentity.email}),`>`]}):m(`git.detachedHead`)})]})]}),(0,y.jsxs)(`label`,{className:`form-field`,children:[m(`git.commitMessage`),(0,y.jsx)(`textarea`,{rows:3,value:k,placeholder:m(`git.commitPlaceholder`),onChange:e=>A(e.target.value)})]}),(0,y.jsxs)(`div`,{className:`git-action-row`,children:[(0,y.jsxs)(`button`,{title:_.dirty?void 0:m(`git.noChangesToCommit`),disabled:!!H||!_.branch||!_.dirty||!k.trim(),onClick:be,children:[H===`commit`?(0,y.jsx)(l,{className:`spin`,size:14}):(0,y.jsx)(g,{size:14}),m(`git.commit`)]}),(0,y.jsxs)(`button`,{title:_.ahead===0&&_.branch&&_.remoteUrl&&_.tokenConfigured&&_.latestCommit?m(`git.noUnpushedCommits`):void 0,disabled:!!H||!_.branch||!_.tokenConfigured||!_.remoteUrl||!_.latestCommit||_.ahead===0,onClick:xe,children:[H===`push`?(0,y.jsx)(l,{className:`spin`,size:14}):(0,y.jsx)(de,{size:14}),m(`git.push`),_.ahead>0&&(0,y.jsx)(`span`,{className:`git-count`,children:_.ahead})]}),(0,y.jsxs)(`button`,{"aria-pressed":$,className:$?`is-active`:void 0,disabled:!!H||!_.latestCommit,onClick:()=>Ce(),children:[H===`diff`?(0,y.jsx)(l,{className:`spin`,size:14}):$?(0,y.jsx)(p,{size:14}):(0,y.jsx)(u,{size:14}),m(`git.workingDiff`)]}),(0,y.jsxs)(`button`,{className:`git-discard-button`,title:_.restorable?m(`git.discardChanges`):m(`git.noChangesToDiscard`),disabled:!!H||!_.latestCommit||!_.restorable,onClick:()=>L(!0),children:[(0,y.jsx)(ue,{size:14}),m(`git.discardChanges`)]}),!_.branch&&(0,y.jsxs)(`button`,{disabled:!!H,onClick:()=>{I(!1),P(`branch`)},children:[(0,y.jsx)(o,{size:14}),m(`git.returnToBranch`,{branch:_.defaultBranch})]})]})]})]}),j&&(0,y.jsxs)(`section`,{ref:Z,className:`git-section git-diff-section${J?` is-fullscreen`:``}`,children:[(0,y.jsxs)(`div`,{className:`git-diff-heading`,children:[(0,y.jsxs)(`div`,{className:`git-section-heading`,children:[(0,y.jsx)(ie,{size:16}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`strong`,{children:m(`git.diffTitle`)}),(0,y.jsxs)(`small`,{children:[j.title,j.truncated?` · ${m(`git.diffTruncated`)}`:``]})]})]}),(0,y.jsxs)(`div`,{className:`git-diff-controls`,children:[(0,y.jsxs)(`div`,{className:`git-diff-font-controls`,role:`group`,"aria-label":m(`git.diffFontSize`),children:[(0,y.jsx)(`button`,{type:`button`,className:`git-diff-font-button`,disabled:X<=8,title:m(`git.diffFontDecrease`),"aria-label":m(`git.diffFontDecrease`),onClick:()=>_e(e=>Math.max(8,e-1)),children:(0,y.jsx)(ce,{size:14})}),(0,y.jsxs)(`span`,{className:`git-diff-font-value`,"aria-live":`polite`,children:[X,`px`]}),(0,y.jsx)(`button`,{type:`button`,className:`git-diff-font-button`,disabled:X>=24,title:m(`git.diffFontIncrease`),"aria-label":m(`git.diffFontIncrease`),onClick:()=>_e(e=>Math.min(24,e+1)),children:(0,y.jsx)(le,{size:14})})]}),(0,y.jsx)(`button`,{type:`button`,className:`git-diff-fullscreen`,title:m(J?`git.exitFullscreenDiff`:`git.fullscreenDiff`),"aria-label":m(J?`git.exitFullscreenDiff`:`git.fullscreenDiff`),onClick:()=>void we(),children:J?(0,y.jsx)(se,{size:15}):(0,y.jsx)(oe,{size:15})})]})]}),(0,y.jsx)(me,{content:j.diff,empty:m(`git.noChanges`),fontSize:X})]}),S===`history`&&(0,y.jsxs)(`section`,{className:`git-section`,children:[(0,y.jsxs)(`div`,{className:`git-section-heading`,children:[(0,y.jsx)(o,{size:16}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`strong`,{children:m(`git.history`)}),(0,y.jsx)(`small`,{children:m(`git.historyHint`)})]})]}),(0,y.jsxs)(`div`,{className:`git-history`,children:[w.map(e=>{let t=j?.revision===e.sha;return(0,y.jsxs)(`article`,{children:[(0,y.jsx)(`code`,{children:e.shortSha}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`strong`,{children:e.message}),(0,y.jsxs)(`small`,{children:[e.authorName,` · `,ee(e.authoredAt,h.resolvedLanguage)]})]}),(0,y.jsxs)(`span`,{"data-texlite-tooltip-always":!0,children:[(0,y.jsx)(`button`,{type:`button`,className:t?`is-active`:void 0,title:m(t?`git.hideCommitDiff`:`git.viewCommitDiff`),"aria-label":m(t?`git.hideCommitDiff`:`git.viewCommitDiff`),"aria-pressed":t,disabled:!!H,onClick:()=>Ce(e.sha),children:t?(0,y.jsx)(p,{size:14}):(0,y.jsx)(u,{size:14})}),(0,y.jsx)(`button`,{type:`button`,title:m(`git.checkoutVersion`),disabled:!!H,onClick:()=>{I(!1),P(e)},children:(0,y.jsx)(fe,{size:14})})]})]},e.sha)}),w.length===0&&(0,y.jsx)(`p`,{className:`muted git-history-empty`,children:m(`git.noCommits`)})]})]})]})]})}),(0,y.jsx)(d,{open:!!N,title:m(N===`branch`?`git.returnTitle`:`git.checkoutTitle`),description:N===`branch`?m(`git.returnDescription`,{branch:_?.defaultBranch??`main`}):m(`git.checkoutDescription`,{revision:N?.shortSha??``,message:N?.message??``}),onOpenChange:e=>{e||P(null)},footer:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`button`,{onClick:()=>P(null),children:m(`common.cancel`)}),(0,y.jsx)(`button`,{className:F?`danger`:`primary`,onClick:Te,children:m(`git.checkout`)})]}),children:(0,y.jsxs)(`label`,{className:`git-force-checkout`,children:[(0,y.jsx)(`input`,{type:`checkbox`,checked:F,onChange:e=>I(e.target.checked)}),(0,y.jsxs)(`span`,{children:[(0,y.jsx)(`strong`,{children:m(`git.forceCheckout`)}),(0,y.jsx)(`small`,{children:m(`git.forceCheckoutDescription`)})]})]})}),(0,y.jsx)(d,{open:ge,title:m(`git.discardTitle`),description:m(`git.discardDescription`),onOpenChange:L,footer:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`button`,{onClick:()=>L(!1),children:m(`common.cancel`)}),(0,y.jsx)(`button`,{className:`danger`,onClick:Ee,children:m(`git.discardConfirm`)})]}),children:(0,y.jsx)(y.Fragment,{})})]})}function pe(){let{t:e}=r();return(0,y.jsxs)(`ul`,{className:`git-command-help`,children:[(0,y.jsxs)(`li`,{children:[(0,y.jsx)(`strong`,{children:e(`git.commit`)}),(0,y.jsxs)(`code`,{children:[(0,y.jsx)(`b`,{children:`git add`}),` --all`,`
2
2
  `,(0,y.jsx)(`b`,{children:`git commit`}),` -m "…"`]}),(0,y.jsx)(`p`,{children:e(`git.commandsLocalOnly`)})]}),(0,y.jsxs)(`li`,{children:[(0,y.jsx)(`strong`,{children:e(`git.push`)}),(0,y.jsxs)(`code`,{children:[(0,y.jsx)(`b`,{children:`git push`}),` --set-upstream origin HEAD:refs/heads/<branch>`]})]}),(0,y.jsxs)(`li`,{children:[(0,y.jsx)(`strong`,{children:e(`git.workingDiff`)}),(0,y.jsxs)(`code`,{children:[(0,y.jsx)(`b`,{children:`git diff`}),` --no-ext-diff --unified=3 HEAD --`]}),(0,y.jsx)(`p`,{children:e(`git.commandsUntrackedDiff`)}),(0,y.jsxs)(`code`,{children:[(0,y.jsx)(`b`,{children:`git diff`}),` --no-index -- /dev/null <file>`]})]}),(0,y.jsxs)(`li`,{children:[(0,y.jsx)(`strong`,{children:e(`git.discardChanges`)}),(0,y.jsxs)(`code`,{children:[(0,y.jsx)(`b`,{children:`git restore`}),` --source=HEAD --staged --worktree -- .`]}),(0,y.jsx)(`p`,{children:e(`git.commandsRestoreHint`)})]})]})}function me({content:e,empty:t,fontSize:n}){return e.trim()?(0,y.jsx)(`pre`,{className:`git-diff`,style:{fontSize:`${n}px`},children:e.split(`
3
3
  `).map((e,t)=>{let n=e.startsWith(`+`)&&!e.startsWith(`+++`)?`addition`:e.startsWith(`-`)&&!e.startsWith(`---`)?`deletion`:e.startsWith(`@@`)?`hunk`:e.startsWith(`diff `)?`header`:``;return(0,y.jsxs)(`span`,{className:n,children:[e,`
4
4
  `]},t)})}):(0,y.jsx)(`div`,{className:`git-diff-empty`,children:t})}function x(e){return e.trim().replace(/\s+/g,`-`).replace(/[^A-Za-z0-9._-]/g,`-`).replace(/-+/g,`-`).replace(/^[.-]+|[.-]+$/g,``).slice(0,100)||`texlite-project`}export{b as GitDialog};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,t as n}from"./react-DUEFWlB7.js";import{t as r}from"./useTranslation-DwkoADSz.js";import{t as i}from"./createLucideIcon-CDYIzuiB.js";import{H as a,T as o}from"./useDeletionTransitions-Ba_yhkrl.js";import{o as s}from"./dist-B_WjsTVV.js";import{r as c,t as l}from"./GitHubIcon-CExJn0AV.js";import{t as u}from"./InfoPopover-Ba7GvcuW.js";import{t as d}from"./loader-circle-DKGyi5EK.js";import{t as f}from"./SaveButton-wiTpGLho.js";import{g as p,w as m,y as h}from"./index-CPR6YZEf.js";import{t as g}from"./SuccessNotice-ubBtzzi_.js";var _={name:`mail`,size:24,node:[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]};_.node;var v=i(_),y=e(t(),1),b=n();function x(){let{t:e}=r();return(0,b.jsxs)(`div`,{className:`git-token-guidance`,children:[(0,b.jsx)(`strong`,{children:e(`git.recommendedAccessTitle`)}),(0,b.jsxs)(`span`,{children:[e(`git.recommendedAccessBeforeAll`),(0,b.jsx)(`em`,{className:`git-token-highlight`,children:`All repositories`}),e(`git.recommendedAccessBeforeAdministration`),(0,b.jsx)(`em`,{className:`git-token-highlight`,children:`Administration`}),e(`git.recommendedAccessBetweenPermissions`),(0,b.jsx)(`em`,{className:`git-token-highlight`,children:`Contents`}),e(`git.recommendedAccessAfterPermissions`)]})]})}function S({open:e,onOpenChange:t}){let{t:n}=r(),[i,_]=(0,y.useState)(null),[S,C]=(0,y.useState)(`token`),[w,T]=(0,y.useState)(``),[E,D]=(0,y.useState)(!1),[O,k]=(0,y.useState)(``),[A,j]=(0,y.useState)(``),M=(0,y.useId)(),N=`${M}-panel`,P=`${M}-identity-panel`,[F,I]=(0,y.useState)(``),[L,R]=(0,y.useState)(``),{message:z,show:B,clear:V}=g();(0,y.useEffect)(()=>{e&&(I(`load`),R(``),V(),_(null),C(`token`),T(``),D(!1),k(``),j(``),m(`/api/account/github`).then(e=>{_(e.status),k(e.status.gitUsername),j(e.status.gitEmail)}).catch(e=>R(h(e))).finally(()=>I(e=>e===`load`?``:e)))},[e,V]);let H=e=>{F||(C(e),R(``),V())},U=async()=>{if(!F){I(`save`),R(``),V();try{let e=await m(`/api/account/github`,{method:`PUT`,body:JSON.stringify({token:w})});_(e.status),T(``),D(!1),B(`save`)}catch(e){R(h(e))}finally{I(``)}}},W=async()=>{if(!F){I(`remove`),R(``),V();try{let e=await m(`/api/account/github`,{method:`DELETE`});_(e.status),T(``),D(!1),B(`remove`)}catch(e){R(h(e))}finally{I(``)}}},G=O.trim(),K=A.trim(),q=/\p{Cc}/u,J=!!G&&G.length<=100&&!q.test(G)&&!/[<>]/.test(G),Y=!!K&&K.length<=254&&!q.test(K)&&/^[^\s<>@]+@[^\s<>@]+$/.test(K),X=J&&Y,Z=G!==(i?.gitUsername??``)||K!==(i?.gitEmail??``),Q=X&&Z,$=async()=>{if(!F&&Q){I(`saveIdentity`),R(``),V();try{let e=await m(`/api/account/github/identity`,{method:`PUT`,body:JSON.stringify({username:G,email:K})});_(e.status),k(e.status.gitUsername),j(e.status.gitEmail),B(`saveIdentity`)}catch(e){R(h(e))}finally{I(``)}}};return(0,b.jsx)(p,{open:e,title:n(`account.githubTitle`),description:n(`account.githubDescription`),onOpenChange:e=>{F||t(e)},footer:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`button`,{disabled:!!F,onClick:()=>t(!1),children:n(`common.close`)}),S===`token`?(0,b.jsx)(f,{saving:F===`save`,feedback:z===`save`?n(`editor.saved`):``,disabled:!!F||!(!i?.tokenConfigured||E)||w.trim().length<20,onClick:()=>void U(),children:n(`git.saveToken`)}):(0,b.jsx)(f,{saving:F===`saveIdentity`,feedback:z===`saveIdentity`?n(`editor.saved`):``,disabled:!!F||!Q,onClick:()=>void $(),children:n(`git.saveIdentity`)})]}),children:(0,b.jsxs)(`div`,{className:`git-dialog account-github-dialog`,children:[F===`load`&&!i&&(0,b.jsxs)(`div`,{className:`git-loading`,children:[(0,b.jsx)(d,{className:`spin`,size:20}),n(`common.loading`)]}),L&&(0,b.jsx)(`p`,{className:`git-message error dialog-error`,children:L}),i&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:`share-scope-tabs`,role:`tablist`,"aria-label":n(`account.githubTitle`),children:[`token`,`identity`].map(e=>(0,b.jsx)(`button`,{type:`button`,role:`tab`,id:`${M}-${e}-tab`,"aria-controls":e===`token`?N:P,"aria-selected":S===e,disabled:!!F,onClick:()=>H(e),children:n(e===`token`?`git.tokenTab`:`git.identityTab`)},e))}),(0,b.jsxs)(`div`,{id:N,className:`account-github-panel`,role:`tabpanel`,"aria-labelledby":`${M}-token-tab`,hidden:S!==`token`,children:[i.tokenConfigured&&(0,b.jsxs)(`div`,{className:`git-account`,children:[(0,b.jsx)(l,{size:17}),(0,b.jsx)(`span`,{children:n(`git.connectedAs`,{login:i.githubLogin})}),(0,b.jsxs)(`button`,{className:`danger-text`,disabled:!!F,onClick:()=>void W(),children:[F===`remove`?(0,b.jsx)(d,{className:`spin`,size:14}):(0,b.jsx)(o,{size:14}),n(`git.removeToken`)]})]}),i.tokenConfigured&&(0,b.jsxs)(`button`,{type:`button`,className:`git-token-disclosure`,"aria-expanded":E,"aria-controls":M,disabled:!!F,onClick:()=>D(e=>!e),children:[E?(0,b.jsx)(s,{size:14,"aria-hidden":!0}):(0,b.jsx)(a,{size:14,"aria-hidden":!0}),n(`git.replaceToken`)]}),(0,b.jsxs)(`div`,{id:M,className:`git-token-form`,hidden:i.tokenConfigured&&!E,children:[(0,b.jsx)(x,{}),(0,b.jsxs)(`label`,{className:`form-field`,children:[n(`git.token`),(0,b.jsx)(`input`,{type:`password`,autoComplete:`new-password`,spellCheck:!1,autoCapitalize:`none`,autoCorrect:`off`,value:w,placeholder:n(`git.tokenPlaceholder`),onChange:e=>{T(e.target.value),V()}})]}),(0,b.jsx)(`div`,{className:`git-inline-actions`,children:(0,b.jsxs)(`a`,{href:`https://github.com/settings/personal-access-tokens/new`,target:`_blank`,rel:`noreferrer`,children:[n(`git.createToken`),(0,b.jsx)(c,{size:12})]})}),(0,b.jsx)(`p`,{className:`muted account-github-encryption-note`,children:n(`account.githubEncryption`)})]})]}),(0,b.jsxs)(`div`,{id:P,className:`account-github-panel git-identity-form`,role:`tabpanel`,"aria-labelledby":`${M}-identity-tab`,hidden:S!==`identity`,children:[(0,b.jsxs)(`div`,{className:`git-section-heading`,children:[(0,b.jsx)(v,{size:16}),(0,b.jsx)(`div`,{children:(0,b.jsxs)(`div`,{className:`git-section-title`,children:[(0,b.jsx)(`strong`,{children:n(`git.identityTitle`)}),(0,b.jsx)(u,{label:n(`git.identityInfoLabel`),content:n(`git.identityInfo`)})]})})]}),(0,b.jsxs)(`label`,{className:`form-field`,children:[n(`git.identityName`),(0,b.jsx)(`input`,{value:O,autoComplete:`off`,spellCheck:!1,maxLength:100,"aria-invalid":!!G&&!J,onChange:e=>{k(e.target.value),V()}})]}),(0,b.jsxs)(`label`,{className:`form-field`,children:[n(`git.identityEmail`),(0,b.jsx)(`input`,{type:`email`,value:A,autoComplete:`off`,spellCheck:!1,maxLength:254,"aria-invalid":!!K&&!Y,onChange:e=>{j(e.target.value),V()}})]}),K&&!Y&&(0,b.jsx)(`p`,{className:`git-identity-validation`,role:`alert`,children:n(`git.identityEmailInvalid`)})]})]})]})})}export{S as GitHubAccountDialog};
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,t as n}from"./react-DUEFWlB7.js";import{t as r}from"./useTranslation-DwkoADSz.js";import{t as i}from"./createLucideIcon-CDYIzuiB.js";import{H as a,T as o}from"./useDeletionTransitions-Xlq7HabP.js";import{o as s}from"./dist-B_WjsTVV.js";import{r as c,t as l}from"./GitHubIcon-CExJn0AV.js";import{t as u}from"./InfoPopover-BJYnFn1P.js";import{t as d}from"./loader-circle-DKGyi5EK.js";import{t as f}from"./SaveButton-wiTpGLho.js";import{g as p,w as m,y as h}from"./index-CemLYDYL.js";import{t as g}from"./SuccessNotice-ubBtzzi_.js";var _={name:`mail`,size:24,node:[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]};_.node;var v=i(_),y=e(t(),1),b=n();function x(){let{t:e}=r();return(0,b.jsxs)(`div`,{className:`git-token-guidance`,children:[(0,b.jsx)(`strong`,{children:e(`git.recommendedAccessTitle`)}),(0,b.jsxs)(`span`,{children:[e(`git.recommendedAccessBeforeAll`),(0,b.jsx)(`em`,{className:`git-token-highlight`,children:`All repositories`}),e(`git.recommendedAccessBeforeAdministration`),(0,b.jsx)(`em`,{className:`git-token-highlight`,children:`Administration`}),e(`git.recommendedAccessBetweenPermissions`),(0,b.jsx)(`em`,{className:`git-token-highlight`,children:`Contents`}),e(`git.recommendedAccessAfterPermissions`)]})]})}function S({open:e,onOpenChange:t}){let{t:n}=r(),[i,_]=(0,y.useState)(null),[S,C]=(0,y.useState)(`token`),[w,T]=(0,y.useState)(``),[E,D]=(0,y.useState)(!1),[O,k]=(0,y.useState)(``),[A,j]=(0,y.useState)(``),M=(0,y.useId)(),N=`${M}-panel`,P=`${M}-identity-panel`,[F,I]=(0,y.useState)(``),[L,R]=(0,y.useState)(``),{message:z,show:B,clear:V}=g();(0,y.useEffect)(()=>{e&&(I(`load`),R(``),V(),_(null),C(`token`),T(``),D(!1),k(``),j(``),m(`/api/account/github`).then(e=>{_(e.status),k(e.status.gitUsername),j(e.status.gitEmail)}).catch(e=>R(h(e))).finally(()=>I(e=>e===`load`?``:e)))},[e,V]);let H=e=>{F||(C(e),R(``),V())},U=async()=>{if(!F){I(`save`),R(``),V();try{let e=await m(`/api/account/github`,{method:`PUT`,body:JSON.stringify({token:w})});_(e.status),T(``),D(!1),B(`save`)}catch(e){R(h(e))}finally{I(``)}}},W=async()=>{if(!F){I(`remove`),R(``),V();try{let e=await m(`/api/account/github`,{method:`DELETE`});_(e.status),T(``),D(!1),B(`remove`)}catch(e){R(h(e))}finally{I(``)}}},G=O.trim(),K=A.trim(),q=/\p{Cc}/u,J=!!G&&G.length<=100&&!q.test(G)&&!/[<>]/.test(G),Y=!!K&&K.length<=254&&!q.test(K)&&/^[^\s<>@]+@[^\s<>@]+$/.test(K),X=J&&Y,Z=G!==(i?.gitUsername??``)||K!==(i?.gitEmail??``),Q=X&&Z,$=async()=>{if(!F&&Q){I(`saveIdentity`),R(``),V();try{let e=await m(`/api/account/github/identity`,{method:`PUT`,body:JSON.stringify({username:G,email:K})});_(e.status),k(e.status.gitUsername),j(e.status.gitEmail),B(`saveIdentity`)}catch(e){R(h(e))}finally{I(``)}}};return(0,b.jsx)(p,{open:e,title:n(`account.githubTitle`),description:n(`account.githubDescription`),onOpenChange:e=>{F||t(e)},footer:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`button`,{disabled:!!F,onClick:()=>t(!1),children:n(`common.close`)}),S===`token`?(0,b.jsx)(f,{saving:F===`save`,feedback:z===`save`?n(`editor.saved`):``,disabled:!!F||!(!i?.tokenConfigured||E)||w.trim().length<20,onClick:()=>void U(),children:n(`git.saveToken`)}):(0,b.jsx)(f,{saving:F===`saveIdentity`,feedback:z===`saveIdentity`?n(`editor.saved`):``,disabled:!!F||!Q,onClick:()=>void $(),children:n(`git.saveIdentity`)})]}),children:(0,b.jsxs)(`div`,{className:`git-dialog account-github-dialog`,children:[F===`load`&&!i&&(0,b.jsxs)(`div`,{className:`git-loading`,children:[(0,b.jsx)(d,{className:`spin`,size:20}),n(`common.loading`)]}),L&&(0,b.jsx)(`p`,{className:`git-message error dialog-error`,children:L}),i&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:`share-scope-tabs`,role:`tablist`,"aria-label":n(`account.githubTitle`),children:[`token`,`identity`].map(e=>(0,b.jsx)(`button`,{type:`button`,role:`tab`,id:`${M}-${e}-tab`,"aria-controls":e===`token`?N:P,"aria-selected":S===e,disabled:!!F,onClick:()=>H(e),children:n(e===`token`?`git.tokenTab`:`git.identityTab`)},e))}),(0,b.jsxs)(`div`,{id:N,className:`account-github-panel`,role:`tabpanel`,"aria-labelledby":`${M}-token-tab`,hidden:S!==`token`,children:[i.tokenConfigured&&(0,b.jsxs)(`div`,{className:`git-account`,children:[(0,b.jsx)(l,{size:17}),(0,b.jsx)(`span`,{children:n(`git.connectedAs`,{login:i.githubLogin})}),(0,b.jsxs)(`button`,{className:`danger-text`,disabled:!!F,onClick:()=>void W(),children:[F===`remove`?(0,b.jsx)(d,{className:`spin`,size:14}):(0,b.jsx)(o,{size:14}),n(`git.removeToken`)]})]}),i.tokenConfigured&&(0,b.jsxs)(`button`,{type:`button`,className:`git-token-disclosure`,"aria-expanded":E,"aria-controls":M,disabled:!!F,onClick:()=>D(e=>!e),children:[E?(0,b.jsx)(s,{size:14,"aria-hidden":!0}):(0,b.jsx)(a,{size:14,"aria-hidden":!0}),n(`git.replaceToken`)]}),(0,b.jsxs)(`div`,{id:M,className:`git-token-form`,hidden:i.tokenConfigured&&!E,children:[(0,b.jsx)(x,{}),(0,b.jsxs)(`label`,{className:`form-field`,children:[n(`git.token`),(0,b.jsx)(`input`,{type:`password`,autoComplete:`new-password`,spellCheck:!1,autoCapitalize:`none`,autoCorrect:`off`,value:w,placeholder:n(`git.tokenPlaceholder`),onChange:e=>{T(e.target.value),V()}})]}),(0,b.jsx)(`div`,{className:`git-inline-actions`,children:(0,b.jsxs)(`a`,{href:`https://github.com/settings/personal-access-tokens/new`,target:`_blank`,rel:`noreferrer`,children:[n(`git.createToken`),(0,b.jsx)(c,{size:12})]})}),(0,b.jsx)(`p`,{className:`muted account-github-encryption-note`,children:n(`account.githubEncryption`)})]})]}),(0,b.jsxs)(`div`,{id:P,className:`account-github-panel git-identity-form`,role:`tabpanel`,"aria-labelledby":`${M}-identity-tab`,hidden:S!==`identity`,children:[(0,b.jsxs)(`div`,{className:`git-section-heading`,children:[(0,b.jsx)(v,{size:16}),(0,b.jsx)(`div`,{children:(0,b.jsxs)(`div`,{className:`git-section-title`,children:[(0,b.jsx)(`strong`,{children:n(`git.identityTitle`)}),(0,b.jsx)(u,{label:n(`git.identityInfoLabel`),content:n(`git.identityInfo`)})]})})]}),(0,b.jsxs)(`label`,{className:`form-field`,children:[n(`git.identityName`),(0,b.jsx)(`input`,{value:O,autoComplete:`off`,spellCheck:!1,maxLength:100,"aria-invalid":!!G&&!J,onChange:e=>{k(e.target.value),V()}})]}),(0,b.jsxs)(`label`,{className:`form-field`,children:[n(`git.identityEmail`),(0,b.jsx)(`input`,{type:`email`,value:A,autoComplete:`off`,spellCheck:!1,maxLength:254,"aria-invalid":!!K&&!Y,onChange:e=>{j(e.target.value),V()}})]}),K&&!Y&&(0,b.jsx)(`p`,{className:`git-identity-validation`,role:`alert`,children:n(`git.identityEmailInvalid`)})]})]})]})})}export{S as GitHubAccountDialog};
@@ -1,4 +1,4 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,t as n}from"./react-DUEFWlB7.js";import{t as r}from"./useTranslation-DwkoADSz.js";import{t as i}from"./createLucideIcon-CDYIzuiB.js";import{H as a,L as o,P as s,T as c,c as l,u}from"./useDeletionTransitions-Ba_yhkrl.js";import{o as d}from"./dist-B_WjsTVV.js";import{t as f}from"./circle-check-CunlnBPw.js";import{t as p}from"./clock-3-DztJubz_.js";import{O as m,b as h,g}from"./sourceCursorStore-BVDvDKeP.js";import{t as _}from"./hard-drive-CXlummIE.js";import{t as v}from"./loader-circle-DKGyi5EK.js";import{n as y,t as ee}from"./minimize-2-CkBmeGXp.js";import{t as te}from"./minus-DrpwqY8Y.js";import{t as ne}from"./plus-Cei21TlT.js";import{t as re}from"./SaveButton-wiTpGLho.js";import{t as b}from"./search-DjOWqLig.js";import{C as ie,E as x,g as ae,h as oe,w as S,y as C}from"./index-CPR6YZEf.js";import{t as se}from"./SuccessNotice-ubBtzzi_.js";import{r as w}from"./dist-Dxkdrap6.js";import{w as ce}from"./ProjectWorkspace-B-w2ix8N.js";var T={name:`list-checks`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]};T.node;var le=i(T),E={name:`tag`,size:24,node:[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]};E.node;var ue=i(E),D=e(t(),1),O=55296,k=2048,A=63487,j=4e4;function M(e,t){if(e===t)return e?[[0,e]]:[];let n=[``],r=new Map,i=(e,t)=>{let i=[];for(let a=0;a<e.length;){let o=e.indexOf(`
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,t as n}from"./react-DUEFWlB7.js";import{t as r}from"./useTranslation-DwkoADSz.js";import{t as i}from"./createLucideIcon-CDYIzuiB.js";import{H as a,L as o,P as s,T as c,c as l,u}from"./useDeletionTransitions-Xlq7HabP.js";import{o as d}from"./dist-B_WjsTVV.js";import{t as f}from"./circle-check-CunlnBPw.js";import{t as p}from"./clock-3-DztJubz_.js";import{O as m,b as h,g}from"./sourceCursorStore-Dpoi7PAL.js";import{t as _}from"./hard-drive-CXlummIE.js";import{t as v}from"./loader-circle-DKGyi5EK.js";import{n as y,t as ee}from"./minimize-2-CkBmeGXp.js";import{t as te}from"./minus-DrpwqY8Y.js";import{t as ne}from"./plus-Cei21TlT.js";import{t as re}from"./SaveButton-wiTpGLho.js";import{t as b}from"./search-DjOWqLig.js";import{C as ie,E as x,g as ae,h as oe,w as S,y as C}from"./index-CemLYDYL.js";import{t as se}from"./SuccessNotice-ubBtzzi_.js";import{r as w}from"./dist-Dxkdrap6.js";import{w as ce}from"./ProjectWorkspace-C2QAb-Fc.js";var T={name:`list-checks`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]};T.node;var le=i(T),E={name:`tag`,size:24,node:[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]};E.node;var ue=i(E),D=e(t(),1),O=55296,k=2048,A=63487,j=4e4;function M(e,t){if(e===t)return e?[[0,e]]:[];let n=[``],r=new Map,i=(e,t)=>{let i=[];for(let a=0;a<e.length;){let o=e.indexOf(`
2
2
  `,a),s=o<0?e.length:o+1,c=e.slice(a,s),l=r.get(c);if(l===void 0&&(n.length===t&&(c=e.slice(a),s=e.length,l=r.get(c)),l===void 0)){let e=n.length;l=String.fromCharCode(e<O?e:e+k),n.push(c),r.set(c,l)}i.push(l),a=s}return i.join(``)},a=i(e,j),o=i(t,A);return w(a,o,{checkLines:!1,timeout:1}).map(([e,t])=>[e,Array.from(t,e=>{let t=e.charCodeAt(0),r=t<O?t:t-k;return n[r]}).join(``)])}function de(e,t,n,r=`历史版本`,i=`当前版本`,a=3){let o=t.replace(/\r\n/g,`
3
3
  `),s=n.replace(/\r\n/g,`
4
4
  `);if(o===s)return{diffText:``,additions:0,deletions:0,hasChanges:!1};let c=M(o,s),l=[],u=1,d=1,f=0,p=0;for(let[e,t]of c){if(!t)continue;let n=t.split(`
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,t as n}from"./react-DUEFWlB7.js";import{t as r}from"./createLucideIcon-CDYIzuiB.js";import{_ as i,b as a,g as o,m as s,v as c}from"./useDeletionTransitions-Ba_yhkrl.js";var l={name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]};l.node;var u=r(l),d=e(t(),1),f=n();function p({content:e,label:t=typeof e==`string`?e:void 0,className:n=``,icon:r=u,size:l=14}){let[p,m]=(0,d.useState)(!1),h=(0,d.useRef)(null),g=h.current?.closest(`[role="dialog"]`)??null;return(0,f.jsxs)(s,{open:p,onOpenChange:m,children:[(0,f.jsx)(a,{asChild:!0,children:(0,f.jsx)(`button`,{ref:h,type:`button`,className:`info-popover-trigger ${n}`,"aria-label":t,children:(0,f.jsx)(r,{size:l,"aria-hidden":`true`})})}),(0,f.jsx)(c,{container:g??void 0,children:(0,f.jsxs)(i,{className:`info-popover-content`,side:`top`,sideOffset:7,collisionPadding:10,collisionBoundary:g,"aria-label":t,onOpenAutoFocus:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),onEscapeKeyDown:e=>e.preventDefault(),children:[typeof e==`string`?(0,f.jsx)(`p`,{children:e}):e,(0,f.jsx)(o,{className:`info-popover-arrow`,width:10,height:5})]})})]})}export{p as t};
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,t as n}from"./react-DUEFWlB7.js";import{t as r}from"./createLucideIcon-CDYIzuiB.js";import{_ as i,b as a,g as o,m as s,v as c}from"./useDeletionTransitions-Xlq7HabP.js";var l={name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]};l.node;var u=r(l),d=e(t(),1),f=n();function p({content:e,label:t=typeof e==`string`?e:void 0,className:n=``,icon:r=u,size:l=14}){let[p,m]=(0,d.useState)(!1),h=(0,d.useRef)(null),g=h.current?.closest(`[role="dialog"]`)??null;return(0,f.jsxs)(s,{open:p,onOpenChange:m,children:[(0,f.jsx)(a,{asChild:!0,children:(0,f.jsx)(`button`,{ref:h,type:`button`,className:`info-popover-trigger ${n}`,"aria-label":t,children:(0,f.jsx)(r,{size:l,"aria-hidden":`true`})})}),(0,f.jsx)(c,{container:g??void 0,children:(0,f.jsxs)(i,{className:`info-popover-content`,side:`top`,sideOffset:7,collisionPadding:10,collisionBoundary:g,"aria-label":t,onOpenAutoFocus:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),onEscapeKeyDown:e=>e.preventDefault(),children:[typeof e==`string`?(0,f.jsx)(`p`,{children:e}):e,(0,f.jsx)(o,{className:`info-popover-arrow`,width:10,height:5})]})})]})}export{p as t};
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./katex-Ca9qmXPj.js","./rolldown-runtime-XKyaHtl9.js","./katex.min-VLoWtPY0.js","./katex-CvRo0776.css","./vimSupport-C-WiMLjc.js","./editor-CkUEg2La.js"])))=>i.map(i=>d[i]);
2
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,r as n,t as r}from"./react-DUEFWlB7.js";import{t as i}from"./useTranslation-DwkoADSz.js";import{t as a}from"./vite-runtime-CRzLMJPS.js";import{i as o}from"./useDeletionTransitions-Ba_yhkrl.js";import{n as s,w as c}from"./index-CPR6YZEf.js";import{$t as l,Bt as u,C as d,Ft as f,Gt as p,Ht as m,It as h,Jt as g,Kt as _,Lt as v,M as ee,Mt as y,N as te,P as ne,Pt as b,Qt as x,Rt as re,S as ie,Ut as ae,Vt as oe,Wt as se,Xt as ce,Y as le,Zt as S,_ as ue,a as de,b as fe,c as pe,cn as me,d as he,en as ge,f as _e,ft as ve,g as ye,gt as be,i as xe,in as Se,it as Ce,l as C,ln as we,m as w,o as Te,on as T,ot as Ee,p as E,r as D,rn as De,s as O,sn as k,tn as A,tt as Oe,u as j,ut as ke,v as Ae}from"./editor-CkUEg2La.js";import{c as je,i as Me,n as Ne,o as Pe,r as Fe,s as M,t as Ie}from"./editorThemeExtension-BWtZV1Af.js";import{a as Le,c as N,d as Re,f as ze,i as P,l as Be,m as Ve,n as He,o as Ue,p as F,r as We,s as Ge,t as Ke,u as I}from"./latexScanner-D9bMX44Y.js";import{n as qe,r as Je,t as Ye}from"./citationAuthors-BWHXhKvT.js";import{r as Xe}from"./bibtexReferences-xpSF8IXH.js";import{a as Ze,c as L,i as Qe,n as $e,o as et,r as tt,s as nt,t as rt}from"./textLanguages-CwWstpJ5.js";import{C as it,S as R,_ as z,b as B,f as at,g as V,h as ot,m as H,p as U,v as st,x as W,y as ct}from"./ProjectWorkspace-B-w2ix8N.js";var G=e(t(),1),lt=class e{constructor(e,t){this.yanchor=e,this.yhead=t}toJSON(){return{yanchor:st(this.yanchor),yhead:st(this.yhead)}}static fromJSON(t){return new e(V(t.yanchor),V(t.yhead))}},ut=class{constructor(e,t){this.ytext=e,this.awareness=t,this.undoManager=new U(e)}toYPos(e,t=0){return z(this.ytext,e,t)}fromYPos(e){let t=ot(V(e),this.ytext.doc);if(t==null||t.type!==this.ytext)throw Error(`[y-codemirror] The position you want to retrieve was created by a different document`);return{pos:t.index,assoc:t.assoc}}toYRange(e){let t=e.assoc;return new lt(this.toYPos(e.anchor,t),this.toYPos(e.head,t))}fromYRange(e){let t=this.fromYPos(e.yanchor),n=this.fromYPos(e.yhead);return t.pos===n.pos?l.cursor(n.pos,n.assoc):l.range(t.pos,n.pos)}},K=A.define({combine(e){return e[e.length-1]}}),dt=S.define(),ft=class{constructor(e){this.view=e,this.conf=e.state.facet(K),this._observer=(t,n)=>{if(n.origin!==this.conf){let n=t.delta,r=[],i=0;for(let e=0;e<n.length;e++){let t=n[e];t.insert==null?t.delete==null?i+=t.retain:(r.push({from:i,to:i+t.delete,insert:``}),i+=t.delete):r.push({from:i,to:i,insert:t.insert})}e.dispatch({changes:r,annotations:[dt.of(this.conf)]})}},this._ytext=this.conf.ytext,this._ytext.observe(this._observer)}update(e){if(!e.docChanged||e.transactions.length>0&&e.transactions[0].annotation(dt)===this.conf)return;let t=this.conf.ytext;t.doc.transact(()=>{let n=0;e.changes.iterChanges((e,r,i,a,o)=>{let s=o.sliceString(0,o.length,`
2
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,r as n,t as r}from"./react-DUEFWlB7.js";import{t as i}from"./useTranslation-DwkoADSz.js";import{t as a}from"./vite-runtime-CRzLMJPS.js";import{i as o}from"./useDeletionTransitions-Xlq7HabP.js";import{n as s,w as c}from"./index-CemLYDYL.js";import{$t as l,Bt as u,C as d,Ft as f,Gt as p,Ht as m,It as h,Jt as g,Kt as _,Lt as v,M as ee,Mt as y,N as te,P as ne,Pt as b,Qt as x,Rt as re,S as ie,Ut as ae,Vt as oe,Wt as se,Xt as ce,Y as le,Zt as S,_ as ue,a as de,b as fe,c as pe,cn as me,d as he,en as ge,f as _e,ft as ve,g as ye,gt as be,i as xe,in as Se,it as Ce,l as C,ln as we,m as w,o as Te,on as T,ot as Ee,p as E,r as D,rn as De,s as O,sn as k,tn as A,tt as Oe,u as j,ut as ke,v as Ae}from"./editor-CkUEg2La.js";import{c as je,i as Me,n as Ne,o as Pe,r as Fe,s as M,t as Ie}from"./editorThemeExtension-BWtZV1Af.js";import{a as Le,c as N,d as Re,f as ze,i as P,l as Be,m as Ve,n as He,o as Ue,p as F,r as We,s as Ge,t as Ke,u as I}from"./latexScanner-D9bMX44Y.js";import{n as qe,r as Je,t as Ye}from"./citationAuthors-BWHXhKvT.js";import{r as Xe}from"./bibtexReferences-xpSF8IXH.js";import{a as Ze,c as L,i as Qe,n as $e,o as et,r as tt,s as nt,t as rt}from"./textLanguages-CwWstpJ5.js";import{C as it,S as R,_ as z,b as B,f as at,g as V,h as ot,m as H,p as U,v as st,x as W,y as ct}from"./ProjectWorkspace-C2QAb-Fc.js";var G=e(t(),1),lt=class e{constructor(e,t){this.yanchor=e,this.yhead=t}toJSON(){return{yanchor:st(this.yanchor),yhead:st(this.yhead)}}static fromJSON(t){return new e(V(t.yanchor),V(t.yhead))}},ut=class{constructor(e,t){this.ytext=e,this.awareness=t,this.undoManager=new U(e)}toYPos(e,t=0){return z(this.ytext,e,t)}fromYPos(e){let t=ot(V(e),this.ytext.doc);if(t==null||t.type!==this.ytext)throw Error(`[y-codemirror] The position you want to retrieve was created by a different document`);return{pos:t.index,assoc:t.assoc}}toYRange(e){let t=e.assoc;return new lt(this.toYPos(e.anchor,t),this.toYPos(e.head,t))}fromYRange(e){let t=this.fromYPos(e.yanchor),n=this.fromYPos(e.yhead);return t.pos===n.pos?l.cursor(n.pos,n.assoc):l.range(t.pos,n.pos)}},K=A.define({combine(e){return e[e.length-1]}}),dt=S.define(),ft=class{constructor(e){this.view=e,this.conf=e.state.facet(K),this._observer=(t,n)=>{if(n.origin!==this.conf){let n=t.delta,r=[],i=0;for(let e=0;e<n.length;e++){let t=n[e];t.insert==null?t.delete==null?i+=t.retain:(r.push({from:i,to:i+t.delete,insert:``}),i+=t.delete):r.push({from:i,to:i,insert:t.insert})}e.dispatch({changes:r,annotations:[dt.of(this.conf)]})}},this._ytext=this.conf.ytext,this._ytext.observe(this._observer)}update(e){if(!e.docChanged||e.transactions.length>0&&e.transactions[0].annotation(dt)===this.conf)return;let t=this.conf.ytext;t.doc.transact(()=>{let n=0;e.changes.iterChanges((e,r,i,a,o)=>{let s=o.sliceString(0,o.length,`
3
3
  `);e!==r&&t.delete(e+n,r-e),s.length>0&&t.insert(e+n,s),n+=s.length-(r-e)})},this.conf)}destroy(){this._ytext.unobserve(this._observer)}},pt=h.fromClass(ft),mt=b.baseTheme({".cm-ySelection":{},".cm-yLineSelection":{padding:0,margin:`0px 2px 0px 4px`},".cm-ySelectionCaret":{position:`relative`,borderLeft:`1px solid black`,borderRight:`1px solid black`,marginLeft:`-1px`,marginRight:`-1px`,boxSizing:`border-box`,display:`inline`},".cm-ySelectionCaretDot":{borderRadius:`50%`,position:`absolute`,width:`.4em`,height:`.4em`,top:`-.2em`,left:`-.2em`,backgroundColor:`inherit`,transition:`transform .3s ease-in-out`,boxSizing:`border-box`},".cm-ySelectionCaret:hover > .cm-ySelectionCaretDot":{transformOrigin:`bottom center`,transform:`scale(0)`},".cm-ySelectionInfo":{position:`absolute`,top:`-1.05em`,left:`-1px`,fontSize:`.75em`,fontFamily:`serif`,fontStyle:`normal`,fontWeight:`normal`,lineHeight:`normal`,userSelect:`none`,color:`white`,paddingLeft:`2px`,paddingRight:`2px`,zIndex:101,transition:`opacity .3s ease-in-out`,backgroundColor:`inherit`,opacity:0,transitionDelay:`0s`,whiteSpace:`nowrap`},".cm-ySelectionCaret:hover > .cm-ySelectionInfo":{opacity:1,transitionDelay:`0s`}}),ht=S.define(),gt=class extends v{constructor(e,t){super(),this.color=e,this.name=t}toDOM(){return ct(`span`,[W(`class`,`cm-ySelectionCaret`),W(`style`,`background-color: ${this.color}; border-color: ${this.color}`)],[B(`⁠`),ct(`div`,[W(`class`,`cm-ySelectionCaretDot`)]),B(`⁠`),ct(`div`,[W(`class`,`cm-ySelectionInfo`)],[B(this.name)]),B(`⁠`)])}eq(e){return e.color===this.color}compare(e){return e.color===this.color}updateDOM(){return!1}get estimatedHeight(){return-1}ignoreEvent(){return!0}},_t=class{constructor(e){this.conf=e.state.facet(K),this._listener=({added:t,updated:n,removed:r},i,a)=>{t.concat(n).concat(r).findIndex(e=>e!==this.conf.awareness.doc.clientID)>=0&&e.dispatch({annotations:[ht.of([])]})},this._awareness=this.conf.awareness,this._awareness.on(`change`,this._listener),this.decorations=Se.of([])}destroy(){this._awareness.off(`change`,this._listener)}update(e){let t=this.conf.ytext,n=t.doc,r=this.conf.awareness,i=[],a=this.conf.awareness.getLocalState();if(a!=null){let n=e.view.hasFocus&&e.view.dom.ownerDocument.hasFocus(),i=n?e.state.selection.main:null,o=a.cursor==null?null:V(a.cursor.anchor),s=a.cursor==null?null:V(a.cursor.head);if(i!=null){let e=z(t,i.anchor),n=z(t,i.head);(a.cursor==null||!H(o,e)||!H(s,n))&&r.setLocalStateField(`cursor`,{anchor:e,head:n})}else a.cursor!=null&&n&&r.setLocalStateField(`cursor`,null)}r.getStates().forEach((a,o)=>{if(o===r.doc.clientID)return;let s=a.cursor;if(s==null||s.anchor==null||s.head==null)return;let c=ot(s.anchor,n),l=ot(s.head,n);if(c==null||l==null||c.type!==t||l.type!==t)return;let{color:u=`#30bced`,name:d=`Anonymous`}=a.user||{},f=a.user&&a.user.colorLight||u+`33`,p=it(c.index,l.index),m=R(c.index,l.index),h=e.view.state.doc.lineAt(p),g=e.view.state.doc.lineAt(m);if(h.number===g.number)i.push({from:p,to:m,value:y.mark({attributes:{style:`background-color: ${f}`},class:`cm-ySelection`})});else{i.push({from:p,to:h.from+h.length,value:y.mark({attributes:{style:`background-color: ${f}`},class:`cm-ySelection`})}),i.push({from:g.from,to:m,value:y.mark({attributes:{style:`background-color: ${f}`},class:`cm-ySelection`})});for(let t=h.number+1;t<g.number;t++){let n=e.view.state.doc.line(t).from;i.push({from:n,to:n,value:y.line({attributes:{style:`background-color: ${f}`,class:`cm-yLineSelection`}})})}}i.push({from:l.index,to:l.index,value:y.widget({side:l.index-c.index>0?-1:1,block:!1,widget:new gt(u,d)})})}),this.decorations=y.set(i,!0)}},vt=h.fromClass(_t,{decorations:e=>e.decorations}),yt=()=>{let e=!0;return(t,n)=>{if(e){e=!1;try{t()}finally{e=!0}}else n!==void 0&&n()}},bt=class{constructor(e){this.undoManager=e}addTrackedOrigin(e){this.undoManager.addTrackedOrigin(e)}removeTrackedOrigin(e){this.undoManager.removeTrackedOrigin(e)}undo(){return this.undoManager.undo()!=null}redo(){return this.undoManager.redo()!=null}},xt=A.define({combine(e){return e[e.length-1]}});S.define();var St=class{constructor(e){this.view=e,this.conf=e.state.facet(xt),this._undoManager=this.conf.undoManager,this.syncConf=e.state.facet(K),this._beforeChangeSelection=null,this._mux=yt(),this._onStackItemAdded=({stackItem:e,changedParentTypes:t})=>{t.has(this.syncConf.ytext)&&this._beforeChangeSelection&&!e.meta.has(this)&&e.meta.set(this,this._beforeChangeSelection)},this._onStackItemPopped=({stackItem:t})=>{let n=t.meta.get(this);if(n){let t=this.syncConf.fromYRange(n);e.dispatch(e.state.update({selection:t,effects:[b.scrollIntoView(t)]})),this._storeSelection()}},this._storeSelection=()=>{this._beforeChangeSelection=this.syncConf.toYRange(this.view.state.selection.main)},this._undoManager.on(`stack-item-added`,this._onStackItemAdded),this._undoManager.on(`stack-item-popped`,this._onStackItemPopped),this._undoManager.addTrackedOrigin(this.syncConf)}update(e){e.selectionSet&&(e.transactions.length===0||e.transactions[0].annotation(dt)!==this.syncConf)&&this._storeSelection()}destroy(){this._undoManager.off(`stack-item-added`,this._onStackItemAdded),this._undoManager.off(`stack-item-popped`,this._onStackItemPopped),this._undoManager.removeTrackedOrigin(this.syncConf)}},Ct=h.fromClass(St),wt=({state:e,dispatch:t})=>e.facet(xt).undo()||!0,Tt=({state:e,dispatch:t})=>e.facet(xt).redo()||!0,Et=[{key:`Mod-z`,run:wt,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:Tt,preventDefault:!0},{key:`Mod-Shift-z`,run:Tt,preventDefault:!0}],Dt=(e,t,{undoManager:n=new U(e)}={})=>{let r=new ut(e,t),i=[K.of(r),pt];return t&&i.push(mt,vt),n!==!1&&i.push(xt.of(new bt(n)),Ct,b.domEventHandlers({beforeinput(e,t){return e.inputType===`historyUndo`?wt(t):e.inputType===`historyRedo`&&Tt(t)}})),i};function Ot(e,t){if(!t.valid||!t.search)return 0;let n=0,r=t.getCursor(e);for(;!r.next().done;)n+=1;return n}function kt(e,t){if(!t.valid||!t.search)return 0;let{from:n,to:r}=e.selection.main,i=t.getCursor(e),a=0;for(let e=i.next();!e.done&&(a+=1,!(e.value.from>n));e=i.next())if(e.value.from===n&&e.value.to===r)return a;return 0}function At(e){return JSON.stringify([e.search,e.caseSensitive,e.literal,e.regexp,e.wholeWord])}var jt={down:[`m6 9 6 6 6-6`],up:[`m18 15-6-6-6 6`],foldVertical:[`M12 22v-6`,`M12 8V2`,`M4 12H2`,`M10 12H8`,`M16 12h-2`,`M22 12h-2`,`m15 19-3-3-3 3`,`m15 5-3 3-3-3`],unfoldVertical:[`M12 22v-6`,`M12 8V2`,`M4 12H2`,`M10 12H8`,`M16 12h-2`,`M22 12h-2`,`m15 19-3 3-3-3`,`m15 5-3-3-3 3`],close:[`M18 6 6 18`,`m6 6 12 12`],replace:[`M14 4a1 1 0 0 1 1-1`,`M15 10a1 1 0 0 1-1-1`,`M21 4a1 1 0 0 0-1-1`,`M21 9a1 1 0 0 1-1 1`,`m3 7 3 3 3-3`,`M6 10V5a2 2 0 0 1 2-2h2`],replaceAll:[`M14 14a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1`,`M19 14a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1`]};function Mt(e,t){let n=e.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(let[e,t]of Object.entries({viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`}))n.setAttribute(e,t);for(let r of t===`replaceAll`?[...jt.replace,...jt.replaceAll]:jt[t]){let t=e.createElementNS(n.namespaceURI,`path`);t.setAttribute(`d`,r),n.append(t)}if(t===`replace`||t===`replaceAll`){let t=e.createElementNS(n.namespaceURI,`rect`);for(let[e,n]of Object.entries({x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`}))t.setAttribute(e,n);n.append(t)}return n}function Nt(e){return t=>new Pt(t,e)}var Pt=class{view;t;dom;top=!0;pos=80;doc;searchField;replaceField;searchBox;status;replaceRow;toggleReplace;options;actions;replaceActions;query;countedDoc=null;signature=``;count=0;constructor(e,t){this.view=e,this.t=t,this.doc=e.dom.ownerDocument,this.query=O(e.state),this.dom=this.element(`div`,`cm-search cm-compact-search`);let n=this.element(`div`,`cm-search-layout`);this.searchField=this.input(`search`,`find`),this.searchField.setAttribute(`main-field`,`true`),this.replaceField=this.input(`replace`,`replace`),this.searchBox=this.element(`div`,`cm-search-box`);let r=this.element(`div`,`cm-search-tools`);this.options=[[`caseSensitive`,`Aa`,`matchCase`],[`regexp`,`.*`,`regexp`],[`wholeWord`,`ab`,`wholeWord`]].map(([e,n,i])=>{let a=this.button(e,t(`editor.search.${i}`),()=>{this.commit({[e]:!this.query[e]})});return a.textContent=n,r.append(a),a}),this.status=this.element(`span`,`cm-search-count`),this.status.setAttribute(`role`,`status`),this.status.setAttribute(`aria-live`,`polite`),r.append(this.status),this.searchBox.append(this.searchField,r),this.toggleReplace=this.button(`toggleReplace`,``,()=>this.showReplace(this.replaceRow.hidden)),this.toggleReplace.hidden=e.state.readOnly;let i=this.element(`div`,`cm-search-actions`);this.actions=[this.iconButton(`prev`,t(`editor.search.previous`),`up`,()=>Te(e),`Shift+Enter`),this.iconButton(`next`,t(`editor.search.next`),`down`,()=>de(e),`Enter`)],i.append(...this.actions);let a=this.iconButton(`close`,t(`common.close`),`close`,()=>xe(e),`Escape`);this.replaceRow=this.element(`div`,`cm-search-replace-row`);let o=this.element(`div`,`cm-search-box cm-replace-box`);o.append(this.replaceField);let s=this.element(`div`,`cm-search-actions`);this.replaceActions=[this.iconButton(`replace`,t(`editor.search.replaceNext`),`replace`,()=>j(e),`Enter`),this.iconButton(`replaceAll`,t(`editor.search.replaceAll`),`replaceAll`,()=>C(e))],s.append(...this.replaceActions),this.replaceRow.append(o,s),n.append(this.toggleReplace,this.searchBox,i,a,this.replaceRow),this.dom.append(n),this.showReplace(!e.state.readOnly),this.dom.addEventListener(`keydown`,this.keydown),this.refresh()}mount(){this.searchField.focus(),this.searchField.select()}update(e){(!O(e.state).eq(this.query)||e.docChanged||e.selectionSet)&&this.refresh()}element(e,t){let n=this.doc.createElement(e);return n.className=t,n}input(e,t){let n=this.element(`input`,`cm-textfield`);return n.name=e,n.placeholder=this.t(`editor.search.${t}`),n.setAttribute(`aria-label`,n.placeholder),n.setAttribute(`form`,``),n.autocomplete=`off`,n.spellcheck=!1,n.addEventListener(`input`,()=>this.commit()),n}button(e,t,n){let r=this.element(`button`,`cm-search-icon`);return r.type=`button`,r.name=e,r.title=t,r.setAttribute(`aria-label`,t),r.addEventListener(`click`,n),r}iconButton(e,t,n,r,i){let a=this.button(e,t,r);return i&&(a.title=`${t} (${i})`),a.append(Mt(this.doc,n)),a}commit(e={}){let{caseSensitive:t,regexp:n,wholeWord:r,literal:i}=this.query,a=new D({caseSensitive:t,regexp:n,wholeWord:r,literal:i,search:this.searchField.value,replace:this.replaceField.value,...e});a.eq(this.query)||this.view.dispatch({effects:w.of(a)})}refresh(){this.query=O(this.view.state),this.searchField.value!==this.query.search&&(this.searchField.value=this.query.search),this.replaceField.value!==this.query.replace&&(this.replaceField.value=this.query.replace),this.options.forEach((e,t)=>e.setAttribute(`aria-pressed`,String(this.query[[`caseSensitive`,`regexp`,`wholeWord`][t]])));let e=At(this.query);(e!==this.signature||this.countedDoc!==this.view.state.doc)&&(this.signature=e,this.countedDoc=this.view.state.doc,this.count=Ot(this.view.state,this.query));let t=!!this.query.search&&(!this.query.valid||!this.count);this.searchBox.classList.toggle(`cm-search-error`,t),this.searchField.setAttribute(`aria-invalid`,String(t));let n=this.count?kt(this.view.state,this.query):0;this.status.textContent=this.query.search?this.query.valid?this.count?`${n} / ${this.count}`:this.t(`editor.search.noMatches`):this.t(`editor.search.invalidQuery`):``,this.status.setAttribute(`aria-label`,this.count?`${this.t(`editor.search.currentMatch`)} ${n}, ${this.t(`editor.search.matchCount`,{count:this.count})}`:this.status.textContent),this.actions.forEach(e=>{e.disabled=!this.count});let r=!this.query.regexp&&this.query.caseSensitive&&this.query.search===this.query.replace;this.replaceActions.forEach(e=>{e.disabled=!this.count||r||this.view.state.readOnly})}showReplace(e){this.replaceRow.hidden=!e,this.toggleReplace.replaceChildren(Mt(this.doc,e?`foldVertical`:`unfoldVertical`)),this.toggleReplace.setAttribute(`aria-expanded`,String(e)),this.toggleReplace.title=this.t(e?`editor.search.hideReplace`:`editor.search.showReplace`),this.toggleReplace.setAttribute(`aria-label`,this.toggleReplace.title),this.view.requestMeasure()}keydown=e=>{e.isComposing||(g(this.view,e,`search-panel`)?e.preventDefault():e.key===`Enter`&&e.target===this.searchField?(e.preventDefault(),(e.shiftKey?Te:de)(this.view)):e.key===`Enter`&&e.target===this.replaceField&&(e.preventDefault(),this.replaceActions[0].disabled||j(this.view)))}},Ft=class{view;dom;lines=[];signature=``;document=null;open=!1;destroyed=!1;constructor(e){this.view=e,this.dom=e.dom.ownerDocument.createElement(`div`),this.dom.className=`cm-search-overview`,this.dom.setAttribute(`aria-hidden`,`true`),this.dom.hidden=!0,e.dom.append(this.dom),this.refresh()}update(e){!this.refresh()&&this.open&&e.geometryChanged&&this.measure()}destroy(){this.destroyed=!0,this.dom.remove()}refresh(){let e=this.view.state,t=E(e),n=O(e),r=At(n);if(t===this.open&&e.doc===this.document&&r===this.signature)return!1;let i=this.open;if(this.open=t,this.document=e.doc,this.signature=r,this.lines=[],t&&n.valid&&n.search){let t=new Set,r=n.getCursor(e);for(let n=r.next();!n.done;n=r.next())t.add(e.doc.lineAt(n.value.from).number);this.lines=[...t]}return(t||i)&&this.measure(),!0}measure(){this.view.requestMeasure({key:this,read:()=>{if(this.destroyed||!this.lines.length)return null;let e=this.view.scrollDOM,t=e.clientHeight;if(!t||!e.scrollHeight)return null;let n=this.view.dom.getBoundingClientRect(),r=e.getBoundingClientRect(),i=new Set;for(let n of this.lines){let r=this.view.lineBlockAt(this.view.state.doc.line(n).from).top+this.view.documentPadding.top;i.add(Math.max(0,Math.min(t-2,Math.floor(r/e.scrollHeight*t/2)*2)))}let a=Math.max(6,r.width-e.clientWidth);return{top:r.top-n.top,right:Math.max(0,n.right-r.right+a),height:t,positions:i}},write:e=>{this.destroyed||(this.dom.hidden=!e,e?(Object.assign(this.dom.style,{top:`${e.top}px`,right:`${e.right}px`,height:`${e.height}px`}),this.dom.replaceChildren(...[...e.positions].map(e=>{let t=this.dom.ownerDocument.createElement(`span`);return t.className=`cm-search-overview-mark`,t.style.top=`${e}px`,t}))):this.dom.replaceChildren())}})}},It=h.fromClass(Ft);function Lt(e){return{syntaxError:()=>e(`bibtex.diagnostics.syntaxError`),duplicatePerson:(t,n)=>e(`bibtex.diagnostics.duplicatePerson`,{field:t,person:n}),unknownEntryType:t=>e(`bibtex.diagnostics.unknownEntryType`,{entryType:t}),duplicateEntryKey:t=>e(`bibtex.diagnostics.duplicateEntryKey`,{key:t}),duplicateField:t=>e(`bibtex.diagnostics.duplicateField`,{field:t}),unknownField:t=>e(`bibtex.diagnostics.unknownField`,{field:t}),invalidFieldValue:t=>e(`bibtex.diagnostics.invalidFieldValue`,{field:t}),emptyFieldValue:t=>e(`bibtex.diagnostics.emptyFieldValue`,{field:t}),verifyInheritedFields:(t,n)=>e(`bibtex.diagnostics.verifyInheritedFields`,{field:t,fields:n}),missingRequiredFields:t=>e(`bibtex.diagnostics.missingRequiredFields`,{fields:t}),missingRecommendedFields:t=>e(`bibtex.diagnostics.missingRecommendedFields`,{fields:t}),entryDescription:t=>e(`bibtex.hover.entryDescription`,{entryType:`@${t}`}),fieldDescription:t=>e(`bibtex.hover.fieldDescription`,{field:t}),requiredFields:t=>e(`bibtex.hover.requiredFields`,{fields:t}),optionalFields:t=>e(`bibtex.hover.optionalFields`,{fields:t}),exampleLabel:()=>e(`bibtex.hover.example`),noteLabel:()=>e(`bibtex.hover.note`),authorsNote:()=>e(`bibtex.hover.authorsNote`),pagesNote:()=>e(`bibtex.hover.pagesNote`),monthNote:()=>e(`bibtex.hover.monthNote`)}}var Rt=new Set([`math`,`displaymath`,`equation`,`align`,`alignat`,`flalign`,`gather`,`multline`,`split`,`aligned`,`alignedat`,`gathered`,`matrix`,`pmatrix`,`bmatrix`,`vmatrix`,`cases`,`dcases`,`rcases`,`smallmatrix`,`subarray`,`array`]);function q(e,t){let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;--r)n+=1;return n%2==1}function zt(e,t){let n=e.indexOf(`
4
4
  `,t);return n<0?e.length:n+1}function Bt(e){return e.replace(/\*$/,``).toLowerCase()}function Vt(e,t){if(e[t]!==`\\`||q(e,t))return null;let n=/^\\(begin|end)[ \t]*\{[ \t]*([^{}\s]+)[ \t]*\}/.exec(e.slice(t));return n?{type:n[1],name:n[2],end:t+n[0].length}:null}function Ht(e,t){return e[t]!==`\\`||q(e,t)?null:Be(e,t)}function Ut(e,t,n,r=!1){for(let i=t;i<e.length;i+=1){if(r&&(e[i]===`
5
5
  `&&/^[\t \r]*\n/.test(e.slice(i+1))||e[i]===`\\`&&!q(e,i)&&/^\\par(?![A-Za-z@])/.test(e.slice(i))))return-1;if(e[i]===`%`&&!q(e,i))i=zt(e,i)-1;else if(n===`dollar`&&e[i]===`$`&&!q(e,i)||n===`paren`&&e[i]===`\\`&&e[i+1]===`)`&&!q(e,i)||n===`bracket`&&e[i]===`\\`&&e[i+1]===`]`&&!q(e,i))return i}return-1}function Wt(e,t){for(let n=t;n<e.length-1;n+=1)if(e[n]===`%`&&!q(e,n))n=zt(e,n)-1;else if(e[n]===`$`&&e[n+1]===`$`&&!q(e,n))return n;return-1}function Gt(e,t,n){let r=1;for(let i=t;i<e.length;i+=1){if(e[i]===`%`&&!q(e,i)){i=zt(e,i)-1;continue}let t=Ht(e,i);if(t!==null){i=t-1;continue}let a=Vt(e,i);if(a&&a.name===n){if(a.type===`begin`)r+=1;else if(--r===0)return{from:i,to:a.end};i=a.end-1}}return null}function Kt(e,t,n){return t>=e.from&&(t<e.to||t===e.to&&n<0)}function qt(e){let t=``;for(let n=0;n<e.length;n+=1)if(e[n]===`%`&&!q(e,n)){let r=zt(e,n);r>n&&e[r-1]===`