@hiai-gg/docsmint 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. package/README.md +7 -3
  2. package/dist/backend/index.js +49330 -66661
  3. package/dist/backend-account-runtime-cleanup.js +291 -291
  4. package/dist/backend-api-key-facade.js +4 -4
  5. package/dist/backend-pipeline-cancellation.js +285 -285
  6. package/dist/frontend/CategoryDialog-CVJi5PJu.js +602 -0
  7. package/dist/frontend/{ConfirmDialog-B1MjKlVQ.js → ConfirmDialog-0JwB8mKN.js} +5 -8
  8. package/dist/frontend/{CreateSnapshotDialog-BTMoPFdj.js → CreateSnapshotDialog-BLrtuYs5.js} +63 -68
  9. package/dist/frontend/{DatePicker-Bmjko3X7.js → DatePicker-BwSb8TRv.js} +17 -29
  10. package/dist/frontend/{DeleteDialog-BkfIeKXO.js → DeleteDialog-s7Dr6bXg.js} +51 -56
  11. package/dist/frontend/{FolderNode-Do8pIfyA.js → FolderNode-Y7cV9xeX.js} +105 -106
  12. package/dist/frontend/{FolderTreeSelector-FyxhcHjr.js → FolderTreeSelector-BR3lYmPU.js} +18 -20
  13. package/dist/frontend/HiAiEditor-BQERr-cd.js +3077 -0
  14. package/dist/frontend/{HiaiDocsExtensionProvider-Cc3yzW5I.js → HiaiDocsExtensionProvider-A2nGddUR.js} +2 -3
  15. package/dist/frontend/{Icon-3EYzvNyk.js → Icon-CiHcxcpv.js} +1 -2
  16. package/dist/frontend/SettingsDialog-BvS74JZu.js +978 -0
  17. package/dist/frontend/{ShareDialog-Ddvl7xvb.js → ShareDialog-Bo50h_Oe.js} +23 -25
  18. package/dist/frontend/Sidebar-i0kbanpg.js +2123 -0
  19. package/dist/frontend/{TagCreateDialog-DQmMJe_E.js → TagCreateDialog-DhKfsfv3.js} +78 -86
  20. package/dist/frontend/action_cancel-BdsWzQKU.js +4 -0
  21. package/dist/frontend/action_close-CVhfLPRQ.js +4 -0
  22. package/dist/frontend/action_create-ByaroO1_.js +4 -0
  23. package/dist/frontend/action_delete-SRloglWY.js +4 -0
  24. package/dist/frontend/action_go_to-DO1bicF-.js +4 -0
  25. package/dist/frontend/action_loading-iQ0KsN6i.js +4 -0
  26. package/dist/frontend/action_save-DeqrZQwV.js +4 -0
  27. package/dist/frontend/api/attachments.js +1 -2
  28. package/dist/frontend/api/categories.js +1 -2
  29. package/dist/frontend/api/documents.js +1 -2
  30. package/dist/frontend/api/folders.js +1 -2
  31. package/dist/frontend/api/settings.js +1 -2
  32. package/dist/frontend/api/share.js +1 -2
  33. package/dist/frontend/api/tags.js +1 -2
  34. package/dist/frontend/{api-keys-DIwAdYkg.js → api-keys-B63imiLr.js} +2 -3
  35. package/dist/frontend/app-shell.js +55 -79
  36. package/dist/frontend/{attachments-C225gTA7.js → attachments-Bfly-sam.js} +2 -3
  37. package/dist/frontend/{auth-client-C5EyWdAF.js → auth-client-Dx7d9Tzo.js} +252 -253
  38. package/dist/frontend/{bundle-mjs-CZ3g1Uzr.js → bundle-mjs-clTO1WW-.js} +5 -23
  39. package/dist/frontend/{camera-DtgHzfVI.js → camera-DsdOPOcD.js} +2 -3
  40. package/dist/frontend/{categories-C8AAkhCR.js → categories-CusvHb5Y.js} +3 -4
  41. package/dist/frontend/{categories_update_error-4aSI8PTr.js → categories_update_error-Cn8DBBHv.js} +2 -3
  42. package/dist/frontend/{check-DVx65aSv.js → check-DiMZRkKS.js} +2 -3
  43. package/dist/frontend/{chevron-down-C2tbZ8Ol.js → chevron-down-CxFrMFDJ.js} +2 -3
  44. package/dist/frontend/{circle-check-BAN-D7yg.js → circle-check-B4F_qgPx.js} +2 -3
  45. package/dist/frontend/{client-GbtOH90i.js → client-BDdDd84W.js} +1 -2
  46. package/dist/frontend/{clipboard-Cgzxc0_R.js → clipboard-Dt1oW6nm.js} +1 -2
  47. package/dist/frontend/{clock-ByiB0SwQ.js → clock-dcpueRk-.js} +2 -3
  48. package/dist/frontend/collaboration.js +6 -12
  49. package/dist/frontend/components/category-dialog.js +1 -2
  50. package/dist/frontend/components/create-snapshot-dialog.js +1 -2
  51. package/dist/frontend/components/delete-dialog.js +1 -2
  52. package/dist/frontend/components/editor/compact-editor.js +2 -3
  53. package/dist/frontend/components/editor/document-editor.js +1 -2
  54. package/dist/frontend/components/editor/document-title.js +3 -4
  55. package/dist/frontend/components/editor/docx-serializer.js +123 -167
  56. package/dist/frontend/components/editor/extensions.js +1 -2
  57. package/dist/frontend/components/editor/markdown-toggle.js +5 -6
  58. package/dist/frontend/components/editor/markdown.js +1 -2
  59. package/dist/frontend/components/folder-node.js +1 -2
  60. package/dist/frontend/components/folder-tree-selector.js +1 -2
  61. package/dist/frontend/components/save-as-dialog.js +86 -90
  62. package/dist/frontend/components/settings.js +1 -2
  63. package/dist/frontend/components/share-dialog.js +1 -2
  64. package/dist/frontend/components/sidebar.js +1 -2
  65. package/dist/frontend/components/tag-create-dialog.js +1 -2
  66. package/dist/frontend/components/version-history.js +177 -180
  67. package/dist/frontend/{context-D0zPFXZ4.js → context-BguSRnCt.js} +1 -2
  68. package/dist/frontend/{copy-CRzvfZGb.js → copy-Bag46YaR.js} +2 -3
  69. package/dist/frontend/dashboard.js +666 -690
  70. package/dist/frontend/{db-CgTtukT4.js → db-B1ZV452J.js} +22 -39
  71. package/dist/frontend/{dialog-a_ZcpEC5.js → dialog-C0Bpok1d.js} +10 -18
  72. package/dist/frontend/{dist-CcHOStsA.js → dist-BlcV_BOY.js} +2 -3
  73. package/dist/frontend/{dist-qd_OnyUC.js → dist-DjId3RKL.js} +8 -21
  74. package/dist/frontend/dist-Dl9qg10h.js +301 -0
  75. package/dist/frontend/{dndzone-CDhrbpTg.js → dndzone-C62yjeG3.js} +38 -53
  76. package/dist/frontend/doc-tabs.js +1 -2
  77. package/dist/frontend/doc_title_label-BOuZzvqv.js +4 -0
  78. package/dist/frontend/doc_title_placeholder-ZxpdWWEn.js +4 -0
  79. package/dist/frontend/{document-drop-coordinator-Da7HcXgv.js → document-drop-coordinator-C_o93kKW.js} +3 -4
  80. package/dist/frontend/document-drop-coordinator.js +1 -2
  81. package/dist/frontend/{documents-CwCs1rA7.js → documents-CDJb8dv-.js} +4 -8
  82. package/dist/frontend/{dropdown-menu-DrHYReIC.js → dropdown-menu-B3nk2aM-.js} +13 -24
  83. package/dist/frontend/{editor-content-sanitizer-CWjqiz0T.js → editor-content-sanitizer-5MjSVPVn.js} +1 -2
  84. package/dist/frontend/editor-preferences.js +1 -2
  85. package/dist/frontend/{editor-preferences.svelte-Bt_A9k7n.js → editor-preferences.svelte-BpTE4mbz.js} +3 -5
  86. package/dist/frontend/{editorExtensions-DPR-CjMu.js → editorExtensions-DbiFj4tn.js} +3 -4
  87. package/dist/frontend/{editor_markdown_placeholder-BIWDUF1E.js → editor_markdown_placeholder-BztIY9Ci.js} +2 -3
  88. package/dist/frontend/{ellipsis-vertical-qxNgoXu-.js → ellipsis-vertical-Oymsv1R4.js} +2 -3
  89. package/dist/frontend/{error_dismiss-Dx_JbRjs.js → error_dismiss-C651ZdWI.js} +2 -3
  90. package/dist/frontend/error_generic-BlWqOE-a.js +4 -0
  91. package/dist/frontend/extension.js +1 -2
  92. package/dist/frontend/{folder-D74E-Kdp.js → folder-BpmB_sAy.js} +3 -5
  93. package/dist/frontend/folder-refresh.js +1 -2
  94. package/dist/frontend/{folders-CC0UWkZH.js → folders-DgKSovXa.js} +2 -3
  95. package/dist/frontend/{folders_rename-BJo4Gipq.js → folders_rename-Cxbg5GIw.js} +2 -3
  96. package/dist/frontend/frontend.css +1 -1
  97. package/dist/frontend/i18n.js +144 -145
  98. package/dist/frontend/{identity-CNhtuCJV.js → identity-B7HeOzDJ.js} +4 -5
  99. package/dist/frontend/{input-Q_7qCfnU.js → input-CbeB9220.js} +2 -3
  100. package/dist/frontend/keyboard.js +1 -2
  101. package/dist/frontend/{keyboard.svelte-CApmX0vl.js → keyboard.svelte-BBUdhTsM.js} +2 -3
  102. package/dist/frontend/{label-Dj8FDEhf.js → label-CfBWf3gI.js} +2 -3
  103. package/dist/frontend/{lib-aUbBbIW2.js → lib-CITdCbKa.js} +176 -365
  104. package/dist/frontend/{loader-circle-D3t5NkvC.js → loader-circle-skKwfRCB.js} +2 -3
  105. package/dist/frontend/markdown-6E9TWC6V.js +11 -0
  106. package/dist/frontend/offline/identity.js +1 -2
  107. package/dist/frontend/{popper-layer-force-mount-CNtiLgbV.js → popper-layer-force-mount-BG0eyrCk.js} +112 -284
  108. package/dist/frontend/{resolve-BG4HgzpN.js → resolve-DbT-KhGZ.js} +2 -3
  109. package/dist/frontend/{rolldown-runtime-DArdT4gl.js → rolldown-runtime-CwxnZyOB.js} +2 -3
  110. package/dist/frontend/{rotate-ccw-B1ybQ8oQ.js → rotate-ccw-DAUX7np7.js} +2 -3
  111. package/dist/frontend/{route-context-DYQlUfzL.js → route-context-6OHiGtfb.js} +2 -4
  112. package/dist/frontend/{runtime-CwWSo6c9.js → runtime-CGUiMzK6.js} +1 -2
  113. package/dist/frontend/{schemas-1Na35n71.js → schemas-YXxhj5o8.js} +850 -880
  114. package/dist/frontend/scroll_to_top_aria-lJc2RSx_.js +4 -0
  115. package/dist/frontend/{search-preferences-B1GdbdUc.js → search-preferences-DuLDczRu.js} +1 -2
  116. package/dist/frontend/search.js +277 -292
  117. package/dist/frontend/{search_title-DOC0cPlQ.js → search_title-BETwQYJq.js} +2 -3
  118. package/dist/frontend/{select-value-BkI1W1bn.js → select-value-BY5Hw6Rl.js} +28 -65
  119. package/dist/frontend/{settings-CHx4wBwb.js → settings-DyePuqjp.js} +3 -4
  120. package/dist/frontend/{share-D5yo0JOh.js → share-3gWTTYvH.js} +2 -3
  121. package/dist/frontend/{share-context-BJ4GF4yT.js → share-context-C2xyVP9M.js} +29 -37
  122. package/dist/frontend/{share_copied-DPxVzfWh.js → share_copied-BuAnmpbz.js} +2 -3
  123. package/dist/frontend/{share_toggle_password-DdxfIjj1.js → share_toggle_password-LEYUeHWr.js} +2 -3
  124. package/dist/frontend/shared-document.js +27 -36
  125. package/dist/frontend/{sidebar_uncategorized-qJ2_Aonf.js → sidebar_uncategorized-C5PGOflV.js} +2 -3
  126. package/dist/frontend/{sort_relevance-DwYX5MO9.js → sort_relevance-DpCVLby_.js} +2 -3
  127. package/dist/frontend/{subfolders-refresh-store.svelte-DxP21a1c.js → subfolders-refresh-store.svelte-CeyqvNpu.js} +1 -2
  128. package/dist/frontend/{tag-qbTBLj-g.js → tag-Wdfe0rKU.js} +3 -5
  129. package/dist/frontend/{tag-store.svelte-ogVCMCbv.js → tag-store.svelte-C9VYWqLQ.js} +2 -3
  130. package/dist/frontend/{tags-CF_cqzSV.js → tags-DlDVothf.js} +3 -4
  131. package/dist/frontend/{tags_load_error-BKjA1pI0.js → tags_load_error-BINNpPPV.js} +2 -3
  132. package/dist/frontend/{tags_new-BiNAJ9Bx.js → tags_new-Dw0Uy43-.js} +2 -3
  133. package/dist/frontend/{textarea-BNK0LFUK.js → textarea-D6emvAwM.js} +2 -3
  134. package/dist/frontend/theme.js +2 -3
  135. package/dist/frontend/{theme.svelte-BRdxXd-B.js → theme.svelte-BiXvrqwh.js} +7 -23
  136. package/dist/frontend/{theme_system-BBNUhYKh.js → theme_system-YIfa_2Xt.js} +2 -3
  137. package/dist/frontend/utils/clipboard.js +1 -2
  138. package/dist/frontend/utils/dndzone.js +1 -2
  139. package/dist/frontend/{utils-BovMJHdA.js → utils-CnAmIMwr.js} +2 -3
  140. package/dist/frontend/utils-DH0uqK40.js +6 -0
  141. package/dist/frontend/utils.js +1 -2
  142. package/dist/frontend/version_create_snapshot-D8xjbuCq.js +4 -0
  143. package/dist/frontend/{version_restored_from-dVRN3Zdk.js → version_restored_from-DYFFSuQj.js} +2 -3
  144. package/dist/frontend/{version_snapshot_label_placeholder-DrMikux0.js → version_snapshot_label_placeholder-BhKq1NQ7.js} +2 -3
  145. package/dist/frontend/{weekday_we-C5H_M-df.js → weekday_we-BxbzNVWR.js} +2 -3
  146. package/dist/frontend/{x-CvSSnrjl.js → x-CBUgPygC.js} +2 -3
  147. package/dist/frontend/{yjs-VUcKqaKW.js → yjs-BbwnvxgY.js} +9 -23
  148. package/dist/frontend-ssr/api/attachments.js +2 -3
  149. package/dist/frontend-ssr/api/categories.js +1 -2
  150. package/dist/frontend-ssr/api/documents.js +1 -2
  151. package/dist/frontend-ssr/api/folders.js +1 -2
  152. package/dist/frontend-ssr/api/settings.js +1 -2
  153. package/dist/frontend-ssr/api/share.js +2 -3
  154. package/dist/frontend-ssr/api/tags.js +1 -2
  155. package/dist/frontend-ssr/app-shell.js +19 -28
  156. package/dist/frontend-ssr/assets/{CategoryDialog-DuZLLlt7.js → CategoryDialog-2CCX508O.js} +17 -20
  157. package/dist/frontend-ssr/assets/{ConfirmDialog-0WVu9BCE.js → ConfirmDialog-Cc6lcY1N.js} +8 -14
  158. package/dist/frontend-ssr/assets/{CreateSnapshotDialog-3vhDTFNu.js → CreateSnapshotDialog-BB8fXF9W.js} +9 -10
  159. package/dist/frontend-ssr/assets/{DatePicker-t12leL2Y.js → DatePicker-CfzKzipR.js} +9 -15
  160. package/dist/frontend-ssr/assets/{DeleteDialog-B0AU1fJR.js → DeleteDialog-DRU4UgOW.js} +4 -5
  161. package/dist/frontend-ssr/assets/{FolderNode-C-B-s8x1.js → FolderNode-Dg_5-orQ.js} +11 -12
  162. package/dist/frontend-ssr/assets/{FolderTreeSelector-DdQuEcj0.js → FolderTreeSelector-D0reTdFS.js} +5 -7
  163. package/dist/frontend-ssr/assets/{HiAiEditor-Cj3B2Dt6.js → HiAiEditor-DeHWAIj-.js} +44 -69
  164. package/dist/frontend-ssr/assets/{HiaiDocsExtensionProvider-BRKWmcDd.js → HiaiDocsExtensionProvider-D6cGL-9s.js} +2 -3
  165. package/dist/frontend-ssr/assets/{Icon-DE_3EnuF.js → Icon-CrIRbT5O.js} +4 -8
  166. package/dist/frontend-ssr/assets/{SettingsDialog-DAT-Zxu0.js → SettingsDialog-BpHY3IMb.js} +29 -40
  167. package/dist/frontend-ssr/assets/{ShareDialog-CpE9zd_f.js → ShareDialog-CY40nWZJ.js} +7 -9
  168. package/dist/frontend-ssr/assets/{Sidebar-B_Ey6QNL.js → Sidebar-fpYk5MGO.js} +55 -63
  169. package/dist/frontend-ssr/assets/{TagCreateDialog-DBHO1DPU.js → TagCreateDialog-C2tpdEuj.js} +13 -14
  170. package/dist/frontend-ssr/assets/{action_cancel-OVgQDP5Q.js → action_cancel-CsBbxW0m.js} +2 -3
  171. package/dist/frontend-ssr/assets/{action_close-DagDyMXk.js → action_close-lFKBqBwg.js} +2 -3
  172. package/dist/frontend-ssr/assets/{action_create-hqJWjyqh.js → action_create-BV4ZOcQW.js} +2 -3
  173. package/dist/frontend-ssr/assets/{action_delete-B1-16jSo.js → action_delete-CNmRhKQP.js} +2 -3
  174. package/dist/frontend-ssr/assets/{action_go_to-DQScgw7P.js → action_go_to-tN5I26xM.js} +2 -3
  175. package/dist/frontend-ssr/assets/{action_save-Bx7vlLZI.js → action_save-YCfMiKb4.js} +2 -3
  176. package/dist/frontend-ssr/assets/{api-keys-CHOrbU-Q.js → api-keys-G6oimJIv.js} +2 -3
  177. package/dist/frontend-ssr/assets/{auth-client-CITU3xkE.js → auth-client-BnnnJDAb.js} +102 -71
  178. package/dist/frontend-ssr/assets/{camera-B6ldo_Js.js → camera-OYNSMvMd.js} +2 -3
  179. package/dist/frontend-ssr/assets/{categories-C_dxFoHi.js → categories-bBPviKjl.js} +2 -3
  180. package/dist/frontend-ssr/assets/{categories_update_error-DkKgsqdD.js → categories_update_error-Bfx5vtvt.js} +11 -21
  181. package/dist/frontend-ssr/assets/{chevron-down-DQcr6JUc.js → chevron-down-DB6YsSbQ.js} +2 -3
  182. package/dist/frontend-ssr/assets/{chevron-right-9szrliZx.js → chevron-right-DOt2uY6b.js} +2 -3
  183. package/dist/frontend-ssr/assets/{circle-check-BgP9MRRv.js → circle-check-DQhTm9YR.js} +2 -3
  184. package/dist/frontend-ssr/assets/{client-rfwQYYHY.js → client-B2AniXwV.js} +1 -2
  185. package/dist/frontend-ssr/assets/{clipboard-CXOaoz2W.js → clipboard-CXKnyYba.js} +1 -2
  186. package/dist/frontend-ssr/assets/{clock-roNtGlT6.js → clock-B08dVWtf.js} +2 -3
  187. package/dist/frontend-ssr/assets/{context-Bi_mO-NS.js → context-C_xxvxnR.js} +1 -2
  188. package/dist/frontend-ssr/assets/{copy-BYqYnBIQ.js → copy-2jsznHar.js} +2 -3
  189. package/dist/frontend-ssr/assets/{db-DxRzq-kx.js → db-BEKLU5Fc.js} +2 -3
  190. package/dist/frontend-ssr/assets/{dialog-SqCnTT43.js → dialog-C6U-DqLr.js} +9 -17
  191. package/dist/frontend-ssr/assets/{dist-CaZQ1FhA.js → dist-DqXTz_zE.js} +9 -12
  192. package/dist/frontend-ssr/assets/{dist-CqxHwOlp.js → dist-ip9bPdma.js} +3 -6
  193. package/dist/frontend-ssr/assets/{dndzone-CnTCMhPd.js → dndzone-Dx3jt_e4.js} +4 -6
  194. package/dist/frontend-ssr/assets/{doc_title_label-Ev_ltlh3.js → doc_title_label-CE_l-Gum.js} +2 -3
  195. package/dist/frontend-ssr/assets/{doc_title_placeholder-DSHpUb7w.js → doc_title_placeholder-7_i7PtG6.js} +2 -3
  196. package/dist/frontend-ssr/assets/{document-drop-coordinator-CEaYACsC.js → document-drop-coordinator-BVytYy2K.js} +1 -2
  197. package/dist/frontend-ssr/assets/{documents-CEuA1V6N.js → documents-B_wpQFTh.js} +2 -3
  198. package/dist/frontend-ssr/assets/{dropdown-menu-CE6U0f1b.js → dropdown-menu-BS5fcN9l.js} +12 -23
  199. package/dist/frontend-ssr/assets/{editor-content-sanitizer-Gjm93iR-.js → editor-content-sanitizer-CIdFjBSC.js} +1 -2
  200. package/dist/frontend-ssr/assets/{editor-preferences.svelte-iI5jJM1x.js → editor-preferences.svelte-CdAXTd-I.js} +2 -4
  201. package/dist/frontend-ssr/assets/{editorExtensions-rhletNji.js → editorExtensions-2O7O2Nhv.js} +2 -3
  202. package/dist/frontend-ssr/assets/{editor_markdown_placeholder-BpezdkOr.js → editor_markdown_placeholder-CAeLJjFT.js} +3 -5
  203. package/dist/frontend-ssr/assets/{editor_toolbar_undo-CKJAOqv2.js → editor_toolbar_undo-CVCfQIS1.js} +29 -57
  204. package/dist/frontend-ssr/assets/{ellipsis-vertical-Cg1MrZsl.js → ellipsis-vertical-IFHt2NM1.js} +2 -3
  205. package/dist/frontend-ssr/assets/{error_generic-DTK0kwxT.js → error_generic-BB80i0Vk.js} +3 -5
  206. package/dist/frontend-ssr/assets/{folder-DHB-CEcQ.js → folder-CXa1_bm5.js} +2 -3
  207. package/dist/frontend-ssr/assets/{folders-BOXeb9hz.js → folders-CTLqWbMm.js} +2 -3
  208. package/dist/frontend-ssr/assets/{folders_rename-DvciOb6K.js → folders_rename-ydbfwQlj.js} +7 -13
  209. package/dist/frontend-ssr/assets/{identity-B7ngLQzZ.js → identity-DTz1SQwC.js} +2 -3
  210. package/dist/frontend-ssr/assets/{input-DVrBVPgs.js → input-Bxw9sFF0.js} +2 -3
  211. package/dist/frontend-ssr/assets/{keyboard.svelte-BgF47N3L.js → keyboard.svelte-njehUCm3.js} +1 -2
  212. package/dist/frontend-ssr/assets/{label-vtCK3pTp.js → label-CMWedjs6.js} +2 -3
  213. package/dist/frontend-ssr/assets/{loader-circle-D3NWhCif.js → loader-circle-zbKj9Qb-.js} +2 -3
  214. package/dist/frontend-ssr/assets/{markdown-Co31-Tl2.js → markdown-BmIhDQp7.js} +2 -3
  215. package/dist/frontend-ssr/assets/{popper-layer-force-mount-C4dMMt-f.js → popper-layer-force-mount-CSHZsG2E.js} +78 -156
  216. package/dist/frontend-ssr/assets/{resolve-BqHozBXl.js → resolve-Wqdff4CL.js} +1 -2
  217. package/dist/frontend-ssr/assets/{rotate-ccw-DNf3nwMD.js → rotate-ccw-B7SaTFWf.js} +2 -3
  218. package/dist/frontend-ssr/assets/{route-context-BPRerEtZ.js → route-context-BsqLFt5Y.js} +2 -4
  219. package/dist/frontend-ssr/assets/{runtime-O78RzRqx.js → runtime-BX6-jTn_.js} +1 -2
  220. package/dist/frontend-ssr/assets/{scroll_to_top_aria-BN4ZfOnM.js → scroll_to_top_aria-CAYSiGHO.js} +2 -3
  221. package/dist/frontend-ssr/assets/{search_title-CKUsQDT0.js → search_title-C7NVXXq3.js} +2 -3
  222. package/dist/frontend-ssr/assets/{search_toggle_filters-hS9rvQhC.js → search_toggle_filters-Bq_YVD8s.js} +15 -29
  223. package/dist/frontend-ssr/assets/{select-value-Ce5c_fuA.js → select-value-TgslfiUB.js} +18 -34
  224. package/dist/frontend-ssr/assets/{settings-BRxvn30Y.js → settings-B1MA_FjO.js} +3 -4
  225. package/dist/frontend-ssr/assets/{share-context-B4UpvTSw.js → share-context-RVh8AExX.js} +17 -22
  226. package/dist/frontend-ssr/assets/{share_copied-BxU9rjXG.js → share_copied-CrwEwkb3.js} +31 -61
  227. package/dist/frontend-ssr/assets/{share_toggle_password-C6OmroqR.js → share_toggle_password-Co56z0Ha.js} +11 -21
  228. package/dist/frontend-ssr/assets/{sidebar_uncategorized-Dx-LTd5w.js → sidebar_uncategorized-COWdmZ3d.js} +6 -11
  229. package/dist/frontend-ssr/assets/{subfolders-refresh-store.svelte-CXHxQWKh.js → subfolders-refresh-store.svelte-LxG18U0n.js} +1 -2
  230. package/dist/frontend-ssr/assets/{tag-Cqv0fWVG.js → tag-BGhtDKpP.js} +3 -5
  231. package/dist/frontend-ssr/assets/{tag-store.svelte-QRysvGKe.js → tag-store.svelte-CUUgAaDD.js} +2 -3
  232. package/dist/frontend-ssr/assets/{tags-BBCoFYro.js → tags-C7u-LBsl.js} +2 -3
  233. package/dist/frontend-ssr/assets/{tags_load_error-CPrc6Gzs.js → tags_load_error-DW4FbHvr.js} +19 -37
  234. package/dist/frontend-ssr/assets/{tags_new-VmMr9v2V.js → tags_new-Dr3ByMPZ.js} +4 -7
  235. package/dist/frontend-ssr/assets/{textarea-BdjOJJVb.js → textarea-Bz5Tz4rw.js} +2 -3
  236. package/dist/frontend-ssr/assets/{theme.svelte-D6bbaJ9m.js → theme.svelte-CdHah46l.js} +3 -5
  237. package/dist/frontend-ssr/assets/{theme_system-BucaNntV.js → theme_system-E97FASeq.js} +19 -37
  238. package/dist/frontend-ssr/assets/{utils-DvZnctjz.js → utils-085zSPe5.js} +1 -2
  239. package/dist/frontend-ssr/assets/{utils-D3X7I8nz.js → utils-DF6CmRDX.js} +1 -2
  240. package/dist/frontend-ssr/assets/{version_create_snapshot-COHzwjle.js → version_create_snapshot-DeeYB7bb.js} +2 -3
  241. package/dist/frontend-ssr/assets/{version_restored_from-CertjFDl.js → version_restored_from-CTt2LM4A.js} +13 -25
  242. package/dist/frontend-ssr/assets/{version_snapshot_label_placeholder-Cy_rMCij.js → version_snapshot_label_placeholder-BbGD9YuN.js} +12 -23
  243. package/dist/frontend-ssr/assets/{weekday_we-DrI3U230.js → weekday_we-BzGQ-iFc.js} +22 -43
  244. package/dist/frontend-ssr/collaboration.js +2 -4
  245. package/dist/frontend-ssr/components/category-dialog.js +1 -2
  246. package/dist/frontend-ssr/components/create-snapshot-dialog.js +1 -2
  247. package/dist/frontend-ssr/components/delete-dialog.js +1 -2
  248. package/dist/frontend-ssr/components/editor/compact-editor.js +2 -3
  249. package/dist/frontend-ssr/components/editor/document-editor.js +1 -2
  250. package/dist/frontend-ssr/components/editor/document-title.js +3 -4
  251. package/dist/frontend-ssr/components/editor/docx-serializer.js +1 -2
  252. package/dist/frontend-ssr/components/editor/extensions.js +1 -2
  253. package/dist/frontend-ssr/components/editor/markdown-toggle.js +4 -5
  254. package/dist/frontend-ssr/components/editor/markdown.js +1 -2
  255. package/dist/frontend-ssr/components/folder-node.js +1 -2
  256. package/dist/frontend-ssr/components/folder-tree-selector.js +1 -2
  257. package/dist/frontend-ssr/components/save-as-dialog.js +12 -13
  258. package/dist/frontend-ssr/components/settings.js +1 -2
  259. package/dist/frontend-ssr/components/share-dialog.js +1 -2
  260. package/dist/frontend-ssr/components/sidebar.js +1 -2
  261. package/dist/frontend-ssr/components/tag-create-dialog.js +1 -2
  262. package/dist/frontend-ssr/components/version-history.js +18 -21
  263. package/dist/frontend-ssr/dashboard.js +64 -88
  264. package/dist/frontend-ssr/doc-tabs.js +1 -2
  265. package/dist/frontend-ssr/document-drop-coordinator.js +1 -2
  266. package/dist/frontend-ssr/editor-preferences.js +1 -2
  267. package/dist/frontend-ssr/extension.js +1 -2
  268. package/dist/frontend-ssr/folder-refresh.js +1 -2
  269. package/dist/frontend-ssr/i18n.js +315 -603
  270. package/dist/frontend-ssr/keyboard.js +1 -2
  271. package/dist/frontend-ssr/offline/identity.js +1 -2
  272. package/dist/frontend-ssr/search.js +17 -20
  273. package/dist/frontend-ssr/shared-document.js +5 -8
  274. package/dist/frontend-ssr/theme.js +2 -3
  275. package/dist/frontend-ssr/utils/clipboard.js +1 -2
  276. package/dist/frontend-ssr/utils/dndzone.js +1 -2
  277. package/dist/frontend-ssr/utils.js +1 -2
  278. package/dist/lifecycle-runtime.js +3996 -17873
  279. package/dist/mcp-cli.js +64 -64
  280. package/dist/mcp-server.js +68 -68
  281. package/package.json +4 -4
  282. package/packages/cli/src/index.ts +1 -1
  283. package/server.json +2 -2
  284. package/dist/frontend/CategoryDialog-CJeAYxcd.js +0 -630
  285. package/dist/frontend/HiAiEditor-D6ad_auS.js +0 -3129
  286. package/dist/frontend/SettingsDialog-B8Oswuqb.js +0 -991
  287. package/dist/frontend/Sidebar-BV0IDqTS.js +0 -2149
  288. package/dist/frontend/action_cancel-Cuxsznzz.js +0 -5
  289. package/dist/frontend/action_close-BJm_52wm.js +0 -5
  290. package/dist/frontend/action_create-CtBQrRuj.js +0 -5
  291. package/dist/frontend/action_delete-BXBIzvn0.js +0 -5
  292. package/dist/frontend/action_go_to-VmK5jmEk.js +0 -5
  293. package/dist/frontend/action_loading-BLCGJVA9.js +0 -5
  294. package/dist/frontend/action_save-BRN2Z_GP.js +0 -5
  295. package/dist/frontend/dist-DcHl92QO.js +0 -316
  296. package/dist/frontend/doc_title_label-DS9jSIh2.js +0 -5
  297. package/dist/frontend/doc_title_placeholder-DBQpM1aH.js +0 -5
  298. package/dist/frontend/error_generic-CzNtmBT4.js +0 -5
  299. package/dist/frontend/markdown-O9YJA70S.js +0 -12
  300. package/dist/frontend/scroll_to_top_aria-CvkNF_Hu.js +0 -5
  301. package/dist/frontend/utils-BlHvR6OL.js +0 -7
  302. package/dist/frontend/version_create_snapshot-3bu-0qzH.js +0 -5
@@ -0,0 +1,978 @@
1
+ import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./dialog-C0Bpok1d.js";
2
+ import { t as s } from "./input-CbeB9220.js";
3
+ import { t as c } from "./action_close-CVhfLPRQ.js";
4
+ import { S as l, _ as u, a as d, b as f, c as p, d as m, f as h, g, h as _, i as v, l as y, m as b, n as x, o as S, p as C, r as w, s as T, t as E, u as ee, v as D, x as te, y as ne } from "./theme_system-YIfa_2Xt.js";
5
+ import { t as O } from "./error_generic-BlWqOE-a.js";
6
+ import { t as k } from "./label-CfBWf3gI.js";
7
+ import { t as A } from "./utils-DH0uqK40.js";
8
+ import { t as re } from "./loader-circle-skKwfRCB.js";
9
+ import { t as j } from "./Icon-CiHcxcpv.js";
10
+ import { a as ie, r as ae } from "./settings-DyePuqjp.js";
11
+ import { r as oe, t as se } from "./auth-client-Dx7d9Tzo.js";
12
+ import { a as M, i as N, n as P, o as F, s as ce, t as I } from "./api-keys-B63imiLr.js";
13
+ import { i as L } from "./categories-CusvHb5Y.js";
14
+ import { a as le, n as ue, t as de } from "./route-context-6OHiGtfb.js";
15
+ import { t as fe } from "./context-BguSRnCt.js";
16
+ import { t as pe } from "./resolve-DbT-KhGZ.js";
17
+ import { n as R, t as z } from "./db-B1ZV452J.js";
18
+ import { a as B, t as V } from "./identity-B7HeOzDJ.js";
19
+ import { t as H } from "./editor-preferences.svelte-BpTE4mbz.js";
20
+ import { n as U, r as W, t as G } from "./search-preferences-DuLDczRu.js";
21
+ import { t as me } from "./theme.svelte-BiXvrqwh.js";
22
+ import "svelte/internal/disclose-version";
23
+ import * as K from "svelte/internal/client";
24
+ import { onMount as he } from "svelte";
25
+ import "svelte/internal/flags/legacy";
26
+ import { page as ge } from "$app/state";
27
+ // ../node_modules/.bun/lucide-svelte@1.0.1+5d720e49779a0e36/node_modules/lucide-svelte/dist/icons/log-out.svelte
28
+ function _e(e, t) {
29
+ let n = K.legacy_rest_props(t, [
30
+ "children",
31
+ "$$slots",
32
+ "$$events",
33
+ "$$legacy"
34
+ ]), r = [
35
+ ["path", { d: "m16 17 5-5-5-5" }],
36
+ ["path", { d: "M21 12H9" }],
37
+ ["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }]
38
+ ];
39
+ j(e, K.spread_props({ name: "log-out" }, () => n, {
40
+ get iconNode() {
41
+ return r;
42
+ },
43
+ children: (e, n) => {
44
+ var r = K.comment(), i = K.first_child(r);
45
+ K.slot(i, t, "default", {}, null), K.append(e, r);
46
+ },
47
+ $$slots: { default: !0 }
48
+ }));
49
+ }
50
+ // ../node_modules/.bun/lucide-svelte@1.0.1+5d720e49779a0e36/node_modules/lucide-svelte/dist/icons/save.svelte
51
+ function ve(e, t) {
52
+ let n = K.legacy_rest_props(t, [
53
+ "children",
54
+ "$$slots",
55
+ "$$events",
56
+ "$$legacy"
57
+ ]), r = [
58
+ ["path", { d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" }],
59
+ ["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7" }],
60
+ ["path", { d: "M7 3v4a1 1 0 0 0 1 1h7" }]
61
+ ];
62
+ j(e, K.spread_props({ name: "save" }, () => n, {
63
+ get iconNode() {
64
+ return r;
65
+ },
66
+ children: (e, n) => {
67
+ var r = K.comment(), i = K.first_child(r);
68
+ K.slot(i, t, "default", {}, null), K.append(e, r);
69
+ },
70
+ $$slots: { default: !0 }
71
+ }));
72
+ }
73
+ // ../node_modules/.bun/@hiai-gg+hiai-ui@0.1.3+07527d1d107142bd/node_modules/@hiai-gg/hiai-ui/dist/components/ui/tabs/tabs.svelte
74
+ var q = K.from_html("<div><!></div>");
75
+ function ye(e, t) {
76
+ K.push(t, !0);
77
+ let n = K.prop(t, "value", 15, "");
78
+ var r = q(), i = K.child(r), a = (e) => {
79
+ var n = K.comment(), r = K.first_child(n);
80
+ K.snippet(r, () => t.children), K.append(e, n);
81
+ };
82
+ K.if(i, (e) => {
83
+ t.children && e(a);
84
+ }), K.reset(r), K.template_effect((e) => {
85
+ K.set_class(r, 1, e), K.set_attribute(r, "data-tabs-value", n());
86
+ }, [() => K.clsx(A("w-full", t.class))]), K.append(e, r), K.pop();
87
+ }
88
+ // ../node_modules/.bun/@hiai-gg+hiai-ui@0.1.3+07527d1d107142bd/node_modules/@hiai-gg/hiai-ui/dist/components/ui/tabs/tabs-content.svelte
89
+ var be = K.from_html("<div role=\"tabpanel\"><!></div>");
90
+ function J(e, t) {
91
+ K.push(t, !0);
92
+ var n = K.comment(), r = K.first_child(n), i = (e) => {
93
+ var n = be(), r = K.child(n), i = (e) => {
94
+ var n = K.comment(), r = K.first_child(n);
95
+ K.snippet(r, () => t.children), K.append(e, n);
96
+ };
97
+ K.if(r, (e) => {
98
+ t.children && e(i);
99
+ }), K.reset(n), K.template_effect((e) => K.set_class(n, 1, e), [() => K.clsx(A("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", t.class))]), K.append(e, n);
100
+ };
101
+ K.if(r, (e) => {
102
+ t.currentValue === t.value && e(i);
103
+ }), K.append(e, n), K.pop();
104
+ }
105
+ // ../node_modules/.bun/@hiai-gg+hiai-ui@0.1.3+07527d1d107142bd/node_modules/@hiai-gg/hiai-ui/dist/components/ui/tabs/tabs-list.svelte
106
+ var xe = K.from_html("<div role=\"tablist\"><!></div>");
107
+ function Se(e, t) {
108
+ K.push(t, !0);
109
+ var n = xe(), r = K.child(n), i = (e) => {
110
+ var n = K.comment(), r = K.first_child(n);
111
+ K.snippet(r, () => t.children), K.append(e, n);
112
+ };
113
+ K.if(r, (e) => {
114
+ t.children && e(i);
115
+ }), K.reset(n), K.template_effect((e) => K.set_class(n, 1, e), [() => K.clsx(A("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground", t.class))]), K.append(e, n), K.pop();
116
+ }
117
+ // ../node_modules/.bun/@hiai-gg+hiai-ui@0.1.3+07527d1d107142bd/node_modules/@hiai-gg/hiai-ui/dist/components/ui/tabs/tabs-trigger.svelte
118
+ var Ce = K.from_html("<button type=\"button\" role=\"tab\"><!></button>");
119
+ function Y(e, t) {
120
+ K.push(t, !0);
121
+ let n = K.prop(t, "selected", 3, !1);
122
+ function r() {
123
+ t.onclick?.(t.value);
124
+ }
125
+ var i = Ce(), a = K.child(i), o = (e) => {
126
+ var n = K.comment(), r = K.first_child(n);
127
+ K.snippet(r, () => t.children), K.append(e, n);
128
+ };
129
+ K.if(a, (e) => {
130
+ t.children && e(o);
131
+ }), K.reset(i), K.template_effect((e) => {
132
+ K.set_attribute(i, "aria-selected", n()), K.set_attribute(i, "data-state", n() ? "active" : "inactive"), K.set_class(i, 1, e);
133
+ }, [() => K.clsx(A("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", n() ? "bg-primary text-primary-foreground shadow" : "text-muted-foreground hover:bg-accent hover:text-accent-foreground", t.class))]), K.delegated("click", i, r), K.append(e, i), K.pop();
134
+ }
135
+ K.delegate(["click"]);
136
+ // src/lib/components/settings/ApiAccessSettings.svelte
137
+ var we = K.from_html("<div class=\"rounded-lg border border-primary/30 bg-primary/10 p-4 text-primary\"><p class=\"text-sm font-medium\">Copy this key now. It will not be shown again.</p> <code class=\"mt-2 block break-all rounded bg-background/80 p-2 text-xs text-foreground\"> </code> <!></div>"), X = K.from_html("<p class=\"text-sm text-destructive\" role=\"alert\"> </p>"), Te = K.from_html("<p class=\"text-sm text-muted-foreground\">Loading API access…</p>"), Ee = K.from_html("<div class=\"flex items-center justify-between rounded-md border p-3 text-sm\"><div><div class=\"font-medium\"> </div><div class=\"text-muted-foreground\"> </div></div> <!></div>"), De = K.from_html("<p class=\"text-sm text-muted-foreground\">No global API keys.</p>"), Oe = K.from_html("<div class=\"flex items-center justify-between gap-3 rounded-md border border-dashed p-3 text-sm\"><div><div class=\"font-medium\"> </div><div class=\"text-muted-foreground\"> </div></div> <div class=\"flex shrink-0 gap-2\"><!> <!></div></div>"), ke = K.from_html("<p class=\"text-sm text-muted-foreground\">No category API keys.</p>"), Ae = K.from_html("<div class=\"max-h-72 space-y-5 overflow-y-auto pr-1\" aria-label=\"API key management list\"><section class=\"space-y-2\"><h3 class=\"text-sm font-semibold\">Global keys</h3> <!></section> <section class=\"space-y-2\"><h3 class=\"text-sm font-semibold\">Category keys</h3> <!></section></div>"), je = K.from_html("<div class=\"space-y-5 rounded-lg border border-border bg-card p-6\"><div><h2 class=\"text-lg font-medium\">API</h2> <p class=\"text-sm text-muted-foreground\">Create a user-wide key or review category-scoped access. Global keys are shown once.</p></div> <div class=\"flex gap-2\"><!> <!></div> <!> <!> <!></div>");
138
+ function Me(e, t) {
139
+ K.push(t, !0);
140
+ let n = K.state(K.proxy([])), r = K.state(K.proxy([])), i = K.state("Global API key"), o = K.state(K.proxy({})), c = K.state(null), l = K.state(!0), u = K.state(!1), d = K.state(null), f = K.derived(() => K.get(c) ? K.get(o)[K.get(c)] : void 0), p = le(), m = K.derived(() => K.get(n).filter((e) => e.scopes.includes("global"))), h = K.derived(() => K.get(n).filter((e) => P(e.scopes) !== null));
141
+ function g(e) {
142
+ return K.get(r).find((t) => t.id === e)?.name ?? "Unknown category";
143
+ }
144
+ async function _() {
145
+ K.set(l, !0), K.set(d, null);
146
+ try {
147
+ let [e, t] = await Promise.all([M(p.fetch), L(p.fetch)]);
148
+ K.set(n, e.keys, !0), K.set(r, t, !0);
149
+ } catch (e) {
150
+ K.set(d, e instanceof Error ? e.message : "Failed to load API access", !0);
151
+ } finally {
152
+ K.set(l, !1);
153
+ }
154
+ }
155
+ he(_);
156
+ async function v() {
157
+ K.set(u, !0), K.set(d, null);
158
+ try {
159
+ let e = await N(K.get(i).trim() || void 0, p.fetch);
160
+ K.set(o, {
161
+ ...K.get(o),
162
+ [e.id]: e.key
163
+ }, !0), K.set(c, e.id, !0), await _();
164
+ } catch (e) {
165
+ K.set(d, e instanceof Error ? e.message : "Failed to create API key", !0);
166
+ } finally {
167
+ K.set(u, !1);
168
+ }
169
+ }
170
+ async function y(e) {
171
+ K.set(u, !0);
172
+ try {
173
+ await ce(e, p.fetch);
174
+ let { [e]: t, ...n } = K.get(o);
175
+ K.set(o, n, !0), K.get(c) === e && K.set(c, null), await _();
176
+ } finally {
177
+ K.set(u, !1);
178
+ }
179
+ }
180
+ async function b(e) {
181
+ let t = K.get(o)[e.id] ?? await F(e.id, p.fetch);
182
+ await navigator.clipboard.writeText(I(e, t));
183
+ }
184
+ var x = je(), S = K.sibling(K.child(x), 2), C = K.child(S);
185
+ s(C, {
186
+ "aria-label": "Global API key name",
187
+ get value() {
188
+ return K.get(i);
189
+ },
190
+ set value(e) {
191
+ K.set(i, e, !0);
192
+ }
193
+ });
194
+ var w = K.sibling(C, 2);
195
+ a(w, {
196
+ onclick: v,
197
+ get disabled() {
198
+ return K.get(u);
199
+ },
200
+ children: (e, t) => {
201
+ K.next();
202
+ var n = K.text("Create global key");
203
+ K.append(e, n);
204
+ },
205
+ $$slots: { default: !0 }
206
+ }), K.reset(S);
207
+ var T = K.sibling(S, 2), E = (e) => {
208
+ var t = we(), n = K.sibling(K.child(t), 2), r = K.only_child(n, !0), i = K.sibling(n, 2);
209
+ a(i, {
210
+ class: "mt-2",
211
+ size: "sm",
212
+ variant: "outline",
213
+ onclick: () => navigator.clipboard.writeText(K.get(f)),
214
+ children: (e, t) => {
215
+ K.next();
216
+ var n = K.text("Copy key");
217
+ K.append(e, n);
218
+ },
219
+ $$slots: { default: !0 }
220
+ }), K.reset(t), K.template_effect(() => K.set_text(r, K.get(f))), K.append(e, t);
221
+ };
222
+ K.if(T, (e) => {
223
+ K.get(f) && e(E);
224
+ });
225
+ var ee = K.sibling(T, 2), D = (e) => {
226
+ var t = X(), n = K.only_child(t, !0);
227
+ K.template_effect(() => K.set_text(n, K.get(d))), K.append(e, t);
228
+ };
229
+ K.if(ee, (e) => {
230
+ K.get(d) && e(D);
231
+ });
232
+ var te = K.sibling(ee, 2), ne = (e) => {
233
+ var t = Te();
234
+ K.append(e, t);
235
+ }, O = (e) => {
236
+ var t = Ae(), n = K.child(t), r = K.sibling(K.child(n), 2);
237
+ K.each(r, 17, () => K.get(m), (e) => e.id, (e, t) => {
238
+ var n = Ee(), r = K.child(n), i = K.child(r), o = K.only_child(i, !0), s = K.sibling(i), c = K.only_child(s);
239
+ K.reset(r);
240
+ var l = K.sibling(r, 2);
241
+ a(l, {
242
+ size: "sm",
243
+ variant: "destructive",
244
+ onclick: () => y(K.get(t).id),
245
+ get disabled() {
246
+ return K.get(u);
247
+ },
248
+ children: (e, t) => {
249
+ K.next();
250
+ var n = K.text("Revoke");
251
+ K.append(e, n);
252
+ },
253
+ $$slots: { default: !0 }
254
+ }), K.reset(n), K.template_effect(() => {
255
+ K.set_text(o, K.get(t).name), K.set_text(c, `${K.get(t).prefix ?? ""}…`);
256
+ }), K.append(e, n);
257
+ }, (e) => {
258
+ var t = De();
259
+ K.append(e, t);
260
+ }), K.reset(n);
261
+ var i = K.sibling(n, 2), s = K.sibling(K.child(i), 2);
262
+ K.each(s, 17, () => K.get(h), (e) => e.id, (e, t) => {
263
+ var n = Oe(), r = K.child(n), i = K.child(r), s = K.only_child(i), c = K.sibling(i), l = K.only_child(c);
264
+ K.reset(r);
265
+ var d = K.sibling(r, 2), f = K.child(d);
266
+ {
267
+ let e = K.derived(() => !K.get(t).recoverable && !K.get(o)[K.get(t).id]);
268
+ a(f, {
269
+ size: "sm",
270
+ variant: "outline",
271
+ onclick: () => b(K.get(t)),
272
+ get disabled() {
273
+ return K.get(e);
274
+ },
275
+ children: (e, n) => {
276
+ K.next();
277
+ var r = K.text();
278
+ K.template_effect(() => K.set_text(r, K.get(t).recoverable || K.get(o)[K.get(t).id] ? "Copy key" : "Rotate to enable copy")), K.append(e, r);
279
+ },
280
+ $$slots: { default: !0 }
281
+ });
282
+ }
283
+ var p = K.sibling(f, 2);
284
+ a(p, {
285
+ size: "sm",
286
+ variant: "destructive",
287
+ onclick: () => y(K.get(t).id),
288
+ get disabled() {
289
+ return K.get(u);
290
+ },
291
+ children: (e, t) => {
292
+ K.next();
293
+ var n = K.text("Revoke");
294
+ K.append(e, n);
295
+ },
296
+ $$slots: { default: !0 }
297
+ }), K.reset(d), K.reset(n), K.template_effect((e, n) => {
298
+ K.set_text(s, `${e ?? ""}: ${K.get(t).name ?? ""}`), K.set_text(l, `${K.get(t).prefix ?? ""}… · ${n ?? ""}`);
299
+ }, [() => g(P(K.get(t).scopes)), () => K.get(t).scopes.map((e) => e.split(":").at(-1)).join(" / ")]), K.append(e, n);
300
+ }, (e) => {
301
+ var t = ke();
302
+ K.append(e, t);
303
+ }), K.reset(i), K.reset(t), K.append(e, t);
304
+ };
305
+ K.if(te, (e) => {
306
+ K.get(l) ? e(ne) : e(O, -1);
307
+ }), K.reset(x), K.append(e, x), K.pop();
308
+ }
309
+ // src/lib/offline/cleanup.ts
310
+ async function Ne() {
311
+ let e = null;
312
+ try {
313
+ e = await B();
314
+ } catch {} finally {
315
+ V();
316
+ }
317
+ let t = "hiai-docs::hiai-docs-pwa-local::pwa-v1";
318
+ try {
319
+ if (e) try {
320
+ let t = R(e);
321
+ await Promise.allSettled([
322
+ t.documents.clear(),
323
+ t.folders.clear(),
324
+ t.drafts.clear(),
325
+ t.mutationQueue?.clear(),
326
+ t.metadata.clear()
327
+ ]);
328
+ } finally {
329
+ await z(e).catch(() => void 0);
330
+ }
331
+ let n = await caches.keys();
332
+ await Promise.all(n.filter((e) => e.startsWith(`${t}::`) || e.startsWith(`${t}-`)).map((e) => caches.delete(e))), "serviceWorker" in navigator && (await navigator.serviceWorker.getRegistration("/"))?.active?.postMessage({
333
+ type: "CLEAR_HOST_CACHES",
334
+ cachePrefix: t
335
+ });
336
+ } catch {}
337
+ }
338
+ // src/lib/stores/search-preferences.svelte.ts
339
+ var Pe = !1, Z = K.state(K.proxy({ ...G }));
340
+ function Fe() {
341
+ if (typeof localStorage < "u") try {
342
+ localStorage.setItem(U, JSON.stringify(K.get(Z)));
343
+ } catch {}
344
+ }
345
+ function Ie() {
346
+ if (!(Pe || typeof window > "u")) {
347
+ Pe = !0;
348
+ try {
349
+ K.set(Z, W(JSON.parse(localStorage.getItem("docsmint:search-preferences") ?? "null")), !0);
350
+ } catch {
351
+ K.set(Z, { ...G }, !0);
352
+ }
353
+ }
354
+ }
355
+ function Le(e) {
356
+ K.set(Z, {
357
+ ...K.get(Z),
358
+ ...e
359
+ }, !0), Fe();
360
+ }
361
+ var Q = {
362
+ get graphSearchEnabled() {
363
+ return K.get(Z).graphSearchEnabled;
364
+ },
365
+ init: Ie,
366
+ update: Le
367
+ }, Re = K.from_html("<!> <!>", 1), ze = K.from_html("<!> <!> <!> <!> <!>", 1), Be = K.from_html("<p class=\"text-xs text-muted-foreground\">Verification is required before the new address becomes active.</p>"), Ve = K.from_html("<p class=\"text-sm text-destructive\"> </p>"), $ = K.from_html("<!> ", 1), He = K.from_html("<form class=\"space-y-4\"><div class=\"space-y-2\"><!> <!></div> <div class=\"space-y-2\"><!> <!> <p class=\"text-xs text-muted-foreground\"> </p> <!></div> <details class=\"profile-advanced border-t pt-4 svelte-1eaqpj\"><summary class=\"flex cursor-pointer items-center justify-between gap-3 rounded-md px-1 py-2 svelte-1eaqpj\"><span><span class=\"block text-sm font-medium\">Advanced</span> <span class=\"block text-xs text-muted-foreground\">Search and additional profile controls</span></span> <span class=\"profile-advanced-chevron svelte-1eaqpj\" aria-hidden=\"true\">⌄</span></summary> <div class=\"mt-3 space-y-3\"><div class=\"flex items-center justify-between gap-4 rounded-md border p-3\"><span><span class=\"block text-sm font-medium\">GraphRAG search</span> <span class=\"block text-xs text-muted-foreground\">Use graph expansion for related documents. Disable it for faster standard RAG search.</span></span> <button type=\"button\" role=\"switch\" aria-label=\"Use GraphRAG search\"><span class=\"svelte-1eaqpj\"></span></button></div> <!></div></details> <!> <!></form>"), Ue = K.from_html("<form class=\"space-y-4\"><div class=\"space-y-2\"><!> <!></div> <div class=\"space-y-2\"><!> <!></div> <div class=\"space-y-2\"><!> <!></div> <!> <!></form>"), We = K.from_html("<button type=\"button\"> </button>"), Ge = K.from_html("<div class=\"space-y-6\"><div class=\"space-y-2\"><!> <p class=\"text-xs text-muted-foreground\"> </p></div> <div class=\"grid grid-cols-3 gap-2\"></div> <details class=\"editor-settings border-t pt-5 svelte-1eaqpj\"><summary class=\"flex cursor-pointer items-center justify-between gap-3 rounded-md px-1 py-2 svelte-1eaqpj\"><span><span class=\"block text-sm font-medium\">Editor modes</span> <span class=\"block text-xs text-muted-foreground\">Source views and toolbar layout</span></span> <span class=\"editor-settings-chevron svelte-1eaqpj\" aria-hidden=\"true\">⌄</span></summary> <div class=\"mt-3 space-y-3\"><div class=\"flex items-center justify-between gap-4 rounded-md border p-3\"><span><span class=\"block text-sm font-medium\">Visual editor</span> <span class=\"block text-xs text-muted-foreground\">Show the standard WYSIWYG editor mode.</span></span> <button type=\"button\" role=\"switch\" aria-label=\"Show visual editor\"><span class=\"svelte-1eaqpj\"></span></button></div> <div class=\"flex items-center justify-between gap-4 rounded-md border p-3\"><span><span class=\"block text-sm font-medium\">Raw Markdown</span> <span class=\"block text-xs text-muted-foreground\">Show the Markdown source button in documents.</span></span> <button type=\"button\" role=\"switch\" aria-label=\"Show Raw Markdown\"><span class=\"svelte-1eaqpj\"></span></button></div> <div class=\"flex items-center justify-between gap-4 rounded-md border p-3\"><span><span class=\"block text-sm font-medium\">Minimal toolbar</span> <span class=\"block text-xs text-muted-foreground\">Bold, italic, underline, lists, highlight, and copy.</span></span> <button type=\"button\" role=\"switch\" aria-label=\"Use minimal toolbar\"><span class=\"svelte-1eaqpj\"></span></button></div> <div class=\"flex items-center justify-between gap-4 rounded-md border p-3\"><span><span class=\"block text-sm font-medium\">Scroll to top</span> <span class=\"block text-xs text-muted-foreground\">Show the floating arrow after scrolling down.</span></span> <button type=\"button\" role=\"switch\" aria-label=\"Show scroll to top\"><span class=\"svelte-1eaqpj\"></span></button></div></div></details></div>"), Ke = K.from_html("<!> <!> <!> <!> <!> <!>", 1), qe = K.from_html("<!> <!> <!>", 1);
368
+ function Je(A, j) {
369
+ K.push(j, !0);
370
+ let M = K.prop(j, "open", 15, !1), N = K.state("profile"), P = fe(), F = K.derived(() => pe(P.settingsSections, { pathname: ge.url.pathname })), ce = K.derived(() => pe(P.profileActions, { pathname: ge.url.pathname })), I = K.state(""), L = K.state(""), le = K.state(""), R = K.state(""), z = K.state("idle"), B = K.state(""), V = K.state(""), U = K.state(""), W = K.state(""), G = K.state("idle"), q = K.state("");
371
+ he(async () => {
372
+ H.init(), Q.init();
373
+ try {
374
+ let e = await ae();
375
+ e.name && K.set(I, e.name, !0), e.email && (K.set(L, e.email, !0), K.set(le, e.email, !0));
376
+ } catch {}
377
+ });
378
+ async function be() {
379
+ K.set(z, "saving"), K.set(B, "");
380
+ try {
381
+ if (await ie({ name: K.get(I) }), K.get(L).trim() !== "" && K.get(L).trim().toLowerCase() !== K.get(le).toLowerCase()) {
382
+ let { error: e } = await se.changeEmail({
383
+ newEmail: K.get(L).trim(),
384
+ callbackURL: "/"
385
+ });
386
+ if (e) throw Error(e.message ?? O());
387
+ K.set(R, K.get(L).trim(), !0);
388
+ }
389
+ K.set(z, "saved"), setTimeout(() => {
390
+ K.set(z, "idle");
391
+ }, 2e3);
392
+ } catch (e) {
393
+ K.set(z, "error"), K.set(B, e instanceof Error ? e.message : g(), !0);
394
+ }
395
+ }
396
+ async function xe() {
397
+ if (K.set(q, ""), K.get(U) !== K.get(W)) K.set(G, "error"), K.set(q, ne(), !0);
398
+ else if (K.get(U).length < 8) K.set(G, "error"), K.set(q, f(), !0);
399
+ else {
400
+ K.set(G, "saving");
401
+ try {
402
+ let { error: e } = await se.changePassword({
403
+ currentPassword: K.get(V),
404
+ newPassword: K.get(U),
405
+ revokeOtherSessions: !0
406
+ });
407
+ if (e) {
408
+ K.set(G, "error"), K.set(q, e.message ?? O(), !0);
409
+ return;
410
+ }
411
+ K.set(G, "saved"), K.set(V, ""), K.set(U, ""), K.set(W, ""), setTimeout(() => {
412
+ K.set(G, "idle");
413
+ }, 2e3);
414
+ } catch (e) {
415
+ K.set(G, "error"), K.set(q, e instanceof Error ? e.message : O(), !0);
416
+ }
417
+ }
418
+ }
419
+ function Ce(e, t) {
420
+ me.spread(e, t ? {
421
+ x: t.clientX,
422
+ y: t.clientY
423
+ } : void 0);
424
+ }
425
+ let we = [
426
+ {
427
+ value: "light",
428
+ label: x(),
429
+ key: "light"
430
+ },
431
+ {
432
+ value: "dark",
433
+ label: w(),
434
+ key: "dark"
435
+ },
436
+ {
437
+ value: "system",
438
+ label: E(),
439
+ key: "system"
440
+ }
441
+ ], X = K.state(!1), Te = de();
442
+ async function Ee() {
443
+ K.set(X, !0);
444
+ try {
445
+ await Ne(), await oe(), M(!1), ue(Te, "/login");
446
+ } catch {
447
+ K.set(X, !1);
448
+ }
449
+ }
450
+ function De() {
451
+ M(!1);
452
+ }
453
+ var Oe = K.comment(), ke = K.first_child(Oe);
454
+ K.component(ke, () => r, (r, f) => {
455
+ f(r, {
456
+ get open() {
457
+ return M();
458
+ },
459
+ set open(e) {
460
+ M(e);
461
+ },
462
+ children: (r, f) => {
463
+ var g = K.comment(), x = K.first_child(g);
464
+ K.component(x, () => e, (e, r) => {
465
+ r(e, {
466
+ children: (e, r) => {
467
+ var f = qe(), g = K.first_child(f);
468
+ K.component(g, () => n, (e, n) => {
469
+ n(e, {
470
+ children: (e, n) => {
471
+ var r = Re(), i = K.first_child(r);
472
+ K.component(i, () => o, (e, t) => {
473
+ t(e, {
474
+ children: (e, t) => {
475
+ K.next();
476
+ var n = K.text();
477
+ K.template_effect((e) => K.set_text(n, e), [() => v()]), K.append(e, n);
478
+ },
479
+ $$slots: { default: !0 }
480
+ });
481
+ });
482
+ var a = K.sibling(i, 2);
483
+ K.component(a, () => t, (e, t) => {
484
+ t(e, {
485
+ children: (e, t) => {
486
+ K.next();
487
+ var n = K.text();
488
+ K.template_effect((e) => K.set_text(n, e), [() => C()]), K.append(e, n);
489
+ },
490
+ $$slots: { default: !0 }
491
+ });
492
+ }), K.append(e, r);
493
+ },
494
+ $$slots: { default: !0 }
495
+ });
496
+ });
497
+ var x = K.sibling(g, 2);
498
+ K.component(x, () => ye, (e, t) => {
499
+ t(e, {
500
+ class: "w-full",
501
+ get value() {
502
+ return K.get(N);
503
+ },
504
+ set value(e) {
505
+ K.set(N, e, !0);
506
+ },
507
+ children: (e, t) => {
508
+ var n = Ke(), r = K.first_child(n);
509
+ K.component(r, () => Se, (e, t) => {
510
+ t(e, {
511
+ class: "grid w-full grid-cols-[repeat(auto-fit,minmax(0,1fr))] gap-1",
512
+ children: (e, t) => {
513
+ var n = ze(), r = K.first_child(n);
514
+ {
515
+ let e = K.derived(() => K.get(N) === "profile");
516
+ K.component(r, () => Y, (t, n) => {
517
+ n(t, {
518
+ value: "profile",
519
+ get selected() {
520
+ return K.get(e);
521
+ },
522
+ onclick: (e) => K.set(N, e, !0),
523
+ children: (e, t) => {
524
+ K.next();
525
+ var n = K.text();
526
+ K.template_effect((e) => K.set_text(n, e), [() => p()]), K.append(e, n);
527
+ },
528
+ $$slots: { default: !0 }
529
+ });
530
+ });
531
+ }
532
+ var i = K.sibling(r, 2);
533
+ {
534
+ let e = K.derived(() => K.get(N) === "password");
535
+ K.component(i, () => Y, (t, n) => {
536
+ n(t, {
537
+ value: "password",
538
+ get selected() {
539
+ return K.get(e);
540
+ },
541
+ onclick: (e) => K.set(N, e, !0),
542
+ children: (e, t) => {
543
+ K.next();
544
+ var n = K.text();
545
+ K.template_effect((e) => K.set_text(n, e), [() => b()]), K.append(e, n);
546
+ },
547
+ $$slots: { default: !0 }
548
+ });
549
+ });
550
+ }
551
+ var a = K.sibling(i, 2);
552
+ {
553
+ let e = K.derived(() => K.get(N) === "api");
554
+ K.component(a, () => Y, (t, n) => {
555
+ n(t, {
556
+ value: "api",
557
+ get selected() {
558
+ return K.get(e);
559
+ },
560
+ onclick: (e) => K.set(N, e, !0),
561
+ children: (e, t) => {
562
+ K.next();
563
+ var n = K.text("API");
564
+ K.append(e, n);
565
+ },
566
+ $$slots: { default: !0 }
567
+ });
568
+ });
569
+ }
570
+ var o = K.sibling(a, 2);
571
+ {
572
+ let e = K.derived(() => K.get(N) === "appearance");
573
+ K.component(o, () => Y, (t, n) => {
574
+ n(t, {
575
+ value: "appearance",
576
+ get selected() {
577
+ return K.get(e);
578
+ },
579
+ onclick: (e) => K.set(N, e, !0),
580
+ children: (e, t) => {
581
+ K.next();
582
+ var n = K.text("Style");
583
+ K.append(e, n);
584
+ },
585
+ $$slots: { default: !0 }
586
+ });
587
+ });
588
+ }
589
+ var s = K.sibling(o, 2);
590
+ K.each(s, 17, () => K.get(F), (e) => e.id, (e, t) => {
591
+ var n = K.comment(), r = K.first_child(n);
592
+ {
593
+ let e = K.derived(() => K.get(N) === K.get(t).id);
594
+ K.component(r, () => Y, (n, r) => {
595
+ r(n, {
596
+ get value() {
597
+ return K.get(t).id;
598
+ },
599
+ get selected() {
600
+ return K.get(e);
601
+ },
602
+ onclick: (e) => K.set(N, e, !0),
603
+ children: (e, n) => {
604
+ K.next();
605
+ var r = K.text();
606
+ K.template_effect(() => K.set_text(r, K.get(t).label)), K.append(e, r);
607
+ },
608
+ $$slots: { default: !0 }
609
+ });
610
+ });
611
+ }
612
+ K.append(e, n);
613
+ }), K.append(e, n);
614
+ },
615
+ $$slots: { default: !0 }
616
+ });
617
+ });
618
+ var i = K.sibling(r, 2);
619
+ K.component(i, () => J, (e, t) => {
620
+ t(e, {
621
+ value: "profile",
622
+ get currentValue() {
623
+ return K.get(N);
624
+ },
625
+ children: (e, t) => {
626
+ var n = He(), r = K.child(n), i = K.child(r);
627
+ k(i, {
628
+ for: "settings-name",
629
+ children: (e, t) => {
630
+ K.next();
631
+ var n = K.text();
632
+ K.template_effect((e) => K.set_text(n, e), [() => y()]), K.append(e, n);
633
+ },
634
+ $$slots: { default: !0 }
635
+ });
636
+ var o = K.sibling(i, 2);
637
+ s(o, {
638
+ id: "settings-name",
639
+ type: "text",
640
+ name: "name",
641
+ autocomplete: "name",
642
+ get value() {
643
+ return K.get(I);
644
+ },
645
+ set value(e) {
646
+ K.set(I, e, !0);
647
+ }
648
+ }), K.reset(r);
649
+ var c = K.sibling(r, 2), l = K.child(c);
650
+ k(l, {
651
+ for: "settings-email",
652
+ children: (e, t) => {
653
+ K.next();
654
+ var n = K.text();
655
+ K.template_effect((e) => K.set_text(n, e), [() => m()]), K.append(e, n);
656
+ },
657
+ $$slots: { default: !0 }
658
+ });
659
+ var u = K.sibling(l, 2);
660
+ s(u, {
661
+ id: "settings-email",
662
+ type: "email",
663
+ name: "email",
664
+ autocomplete: "email",
665
+ get value() {
666
+ return K.get(L);
667
+ },
668
+ set value(e) {
669
+ K.set(L, e, !0);
670
+ }
671
+ });
672
+ var d = K.sibling(u, 2), f = K.only_child(d, !0), p = K.sibling(d, 2), h = (e) => {
673
+ var t = Be();
674
+ K.append(e, t);
675
+ };
676
+ K.if(p, (e) => {
677
+ K.get(R) && e(h);
678
+ }), K.reset(c);
679
+ var g = K.sibling(c, 2), _ = K.sibling(K.child(g), 2), v = K.child(_), b = K.sibling(K.child(v), 2);
680
+ let x;
681
+ K.reset(v);
682
+ var C = K.sibling(v, 2);
683
+ K.each(C, 17, () => K.get(ce), (e) => e.id, (e, t) => {
684
+ let n = K.derived(() => K.get(t).component);
685
+ var r = K.comment(), i = K.first_child(r);
686
+ K.component(i, () => K.get(n), (e, t) => {
687
+ t(e, {});
688
+ }), K.append(e, r);
689
+ }), K.reset(_), K.reset(g);
690
+ var w = K.sibling(g, 2), E = (e) => {
691
+ var t = Ve(), n = K.only_child(t, !0);
692
+ K.template_effect(() => K.set_text(n, K.get(B))), K.append(e, t);
693
+ };
694
+ K.if(w, (e) => {
695
+ K.get(B) && e(E);
696
+ });
697
+ var D = K.sibling(w, 2);
698
+ {
699
+ let e = K.derived(() => K.get(z) === "saving");
700
+ a(D, {
701
+ type: "submit",
702
+ get disabled() {
703
+ return K.get(e);
704
+ },
705
+ class: "w-full sm:w-auto",
706
+ children: (e, t) => {
707
+ var n = $(), r = K.first_child(n), i = (e) => {
708
+ re(e, { class: "mr-2 size-4 animate-spin" });
709
+ }, a = (e) => {
710
+ ve(e, { class: "mr-2 size-4" });
711
+ };
712
+ K.if(r, (e) => {
713
+ K.get(z) === "saving" ? e(i) : e(a, -1);
714
+ });
715
+ var o = K.sibling(r);
716
+ K.template_effect((e) => K.set_text(o, ` ${e ?? ""}`), [() => K.get(z) === "saved" ? S() : T()]), K.append(e, n);
717
+ },
718
+ $$slots: { default: !0 }
719
+ });
720
+ }
721
+ K.reset(n), K.template_effect((e) => {
722
+ K.set_text(f, e), x = K.set_class(b, 1, "preference-switch svelte-1eaqpj", null, x, { enabled: Q.graphSearchEnabled }), K.set_attribute(b, "aria-checked", Q.graphSearchEnabled);
723
+ }, [() => ee()]), K.event("submit", n, (e) => {
724
+ e.preventDefault(), be();
725
+ }), K.delegated("click", b, () => Q.update({ graphSearchEnabled: !Q.graphSearchEnabled })), K.append(e, n);
726
+ },
727
+ $$slots: { default: !0 }
728
+ });
729
+ });
730
+ var o = K.sibling(i, 2);
731
+ K.component(o, () => J, (e, t) => {
732
+ t(e, {
733
+ value: "password",
734
+ get currentValue() {
735
+ return K.get(N);
736
+ },
737
+ children: (e, t) => {
738
+ var n = Ue(), r = K.child(n), i = K.child(r);
739
+ k(i, {
740
+ for: "settings-current-password",
741
+ children: (e, t) => {
742
+ K.next();
743
+ var n = K.text();
744
+ K.template_effect((e) => K.set_text(n, e), [() => te()]), K.append(e, n);
745
+ },
746
+ $$slots: { default: !0 }
747
+ });
748
+ var o = K.sibling(i, 2);
749
+ s(o, {
750
+ id: "settings-current-password",
751
+ type: "password",
752
+ name: "current-password",
753
+ autocomplete: "current-password",
754
+ get value() {
755
+ return K.get(V);
756
+ },
757
+ set value(e) {
758
+ K.set(V, e, !0);
759
+ }
760
+ }), K.reset(r);
761
+ var c = K.sibling(r, 2), l = K.child(c);
762
+ k(l, {
763
+ for: "settings-new-password",
764
+ children: (e, t) => {
765
+ K.next();
766
+ var n = K.text();
767
+ K.template_effect((e) => K.set_text(n, e), [() => _()]), K.append(e, n);
768
+ },
769
+ $$slots: { default: !0 }
770
+ });
771
+ var d = K.sibling(l, 2);
772
+ s(d, {
773
+ id: "settings-new-password",
774
+ type: "password",
775
+ name: "new-password",
776
+ autocomplete: "new-password",
777
+ get value() {
778
+ return K.get(U);
779
+ },
780
+ set value(e) {
781
+ K.set(U, e, !0);
782
+ }
783
+ }), K.reset(c);
784
+ var f = K.sibling(c, 2), p = K.child(f);
785
+ k(p, {
786
+ for: "settings-confirm-password",
787
+ children: (e, t) => {
788
+ K.next();
789
+ var n = K.text();
790
+ K.template_effect((e) => K.set_text(n, e), [() => u()]), K.append(e, n);
791
+ },
792
+ $$slots: { default: !0 }
793
+ });
794
+ var m = K.sibling(p, 2);
795
+ s(m, {
796
+ id: "settings-confirm-password",
797
+ type: "password",
798
+ name: "confirm-password",
799
+ autocomplete: "new-password",
800
+ get value() {
801
+ return K.get(W);
802
+ },
803
+ set value(e) {
804
+ K.set(W, e, !0);
805
+ }
806
+ }), K.reset(f);
807
+ var h = K.sibling(f, 2), g = (e) => {
808
+ var t = Ve(), n = K.only_child(t, !0);
809
+ K.template_effect(() => K.set_text(n, K.get(q))), K.append(e, t);
810
+ };
811
+ K.if(h, (e) => {
812
+ K.get(q) && e(g);
813
+ });
814
+ var v = K.sibling(h, 2);
815
+ {
816
+ let e = K.derived(() => K.get(G) === "saving");
817
+ a(v, {
818
+ type: "submit",
819
+ get disabled() {
820
+ return K.get(e);
821
+ },
822
+ class: "w-full sm:w-auto",
823
+ children: (e, t) => {
824
+ var n = $(), r = K.first_child(n), i = (e) => {
825
+ re(e, { class: "mr-2 size-4 animate-spin" });
826
+ };
827
+ K.if(r, (e) => {
828
+ K.get(G) === "saving" && e(i);
829
+ });
830
+ var a = K.sibling(r);
831
+ K.template_effect((e) => K.set_text(a, ` ${e ?? ""}`), [() => K.get(G) === "saved" ? S() : D()]), K.append(e, n);
832
+ },
833
+ $$slots: { default: !0 }
834
+ });
835
+ }
836
+ K.reset(n), K.event("submit", n, (e) => {
837
+ e.preventDefault(), xe();
838
+ }), K.append(e, n);
839
+ },
840
+ $$slots: { default: !0 }
841
+ });
842
+ });
843
+ var c = K.sibling(o, 2);
844
+ K.component(c, () => J, (e, t) => {
845
+ t(e, {
846
+ value: "appearance",
847
+ get currentValue() {
848
+ return K.get(N);
849
+ },
850
+ children: (e, t) => {
851
+ var n = Ge(), r = K.child(n), i = K.child(r);
852
+ k(i, {
853
+ children: (e, t) => {
854
+ K.next();
855
+ var n = K.text();
856
+ K.template_effect((e) => K.set_text(n, e), [() => d()]), K.append(e, n);
857
+ },
858
+ $$slots: { default: !0 }
859
+ });
860
+ var a = K.sibling(i, 2), o = K.only_child(a, !0);
861
+ K.reset(r);
862
+ var s = K.sibling(r, 2);
863
+ K.each(s, 21, () => we, (e) => e.key, (e, t) => {
864
+ var n = We(), r = K.only_child(n, !0);
865
+ K.template_effect((e) => {
866
+ K.set_class(n, 1, e, "svelte-1eaqpj"), K.set_text(r, K.get(t).label);
867
+ }, [() => K.clsx(["rounded-md border px-3 py-2 text-sm font-medium transition-colors", me.value === K.get(t).value ? "border-primary bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-accent hover:text-accent-foreground"].join(" "))]), K.delegated("click", n, (e) => Ce(K.get(t).value, e)), K.append(e, n);
868
+ }), K.reset(s);
869
+ var c = K.sibling(s, 2), l = K.sibling(K.child(c), 2), u = K.child(l), f = K.sibling(K.child(u), 2);
870
+ let p;
871
+ K.reset(u);
872
+ var m = K.sibling(u, 2), g = K.sibling(K.child(m), 2);
873
+ let _;
874
+ K.reset(m);
875
+ var v = K.sibling(m, 2), y = K.sibling(K.child(v), 2);
876
+ let b;
877
+ K.reset(v);
878
+ var x = K.sibling(v, 2), S = K.sibling(K.child(x), 2);
879
+ let C;
880
+ K.reset(x), K.reset(l), K.reset(c), K.reset(n), K.template_effect((e) => {
881
+ K.set_text(o, e), p = K.set_class(f, 1, "preference-switch svelte-1eaqpj", null, p, { enabled: H.showVisualMode }), K.set_attribute(f, "aria-checked", H.showVisualMode), f.disabled = !H.showMarkdownMode, _ = K.set_class(g, 1, "preference-switch svelte-1eaqpj", null, _, { enabled: H.showMarkdownMode }), K.set_attribute(g, "aria-checked", H.showMarkdownMode), g.disabled = !H.showVisualMode, b = K.set_class(y, 1, "preference-switch svelte-1eaqpj", null, b, { enabled: H.minimalToolbar }), K.set_attribute(y, "aria-checked", H.minimalToolbar), C = K.set_class(S, 1, "preference-switch svelte-1eaqpj", null, C, { enabled: H.showScrollToTop }), K.set_attribute(S, "aria-checked", H.showScrollToTop);
882
+ }, [() => h()]), K.delegated("click", f, () => H.update({ showVisualMode: !H.showVisualMode })), K.delegated("click", g, () => H.update({ showMarkdownMode: !H.showMarkdownMode })), K.delegated("click", y, () => H.update({ minimalToolbar: !H.minimalToolbar })), K.delegated("click", S, () => H.update({ showScrollToTop: !H.showScrollToTop })), K.append(e, n);
883
+ },
884
+ $$slots: { default: !0 }
885
+ });
886
+ });
887
+ var l = K.sibling(c, 2);
888
+ K.component(l, () => J, (e, t) => {
889
+ t(e, {
890
+ value: "api",
891
+ get currentValue() {
892
+ return K.get(N);
893
+ },
894
+ children: (e, t) => {
895
+ Me(e, {});
896
+ },
897
+ $$slots: { default: !0 }
898
+ });
899
+ });
900
+ var f = K.sibling(l, 2);
901
+ K.each(f, 17, () => K.get(F), (e) => e.id, (e, t) => {
902
+ var n = K.comment(), r = K.first_child(n);
903
+ K.component(r, () => J, (e, n) => {
904
+ n(e, {
905
+ get value() {
906
+ return K.get(t).id;
907
+ },
908
+ get currentValue() {
909
+ return K.get(N);
910
+ },
911
+ children: (e, n) => {
912
+ let r = K.derived(() => K.get(t).component);
913
+ var i = K.comment(), a = K.first_child(i);
914
+ K.component(a, () => K.get(r), (e, t) => {
915
+ t(e, {});
916
+ }), K.append(e, i);
917
+ },
918
+ $$slots: { default: !0 }
919
+ });
920
+ }), K.append(e, n);
921
+ }), K.append(e, n);
922
+ },
923
+ $$slots: { default: !0 }
924
+ });
925
+ });
926
+ var w = K.sibling(x, 2);
927
+ K.component(w, () => i, (e, t) => {
928
+ t(e, {
929
+ class: "settings-dialog-footer gap-4 max-sm:flex-col max-sm:items-stretch",
930
+ children: (e, t) => {
931
+ var n = Re(), r = K.first_child(n), i = (e) => {
932
+ a(e, {
933
+ id: "logout-button",
934
+ variant: "ghost",
935
+ onclick: Ee,
936
+ get disabled() {
937
+ return K.get(X);
938
+ },
939
+ class: "mr-auto text-muted-foreground hover:text-destructive max-sm:mr-0",
940
+ children: (e, t) => {
941
+ var n = $(), r = K.first_child(n);
942
+ _e(r, { class: "mr-2 size-4" });
943
+ var i = K.sibling(r);
944
+ K.template_effect((e) => K.set_text(i, ` ${e ?? ""}`), [() => K.get(X) ? "…" : l()]), K.append(e, n);
945
+ },
946
+ $$slots: { default: !0 }
947
+ });
948
+ };
949
+ K.if(r, (e) => {
950
+ K.get(N) === "profile" && e(i);
951
+ });
952
+ var o = K.sibling(r, 2);
953
+ a(o, {
954
+ variant: "outline",
955
+ onclick: De,
956
+ class: "w-full sm:w-auto",
957
+ children: (e, t) => {
958
+ K.next();
959
+ var n = K.text();
960
+ K.template_effect((e) => K.set_text(n, e), [() => c()]), K.append(e, n);
961
+ },
962
+ $$slots: { default: !0 }
963
+ }), K.append(e, n);
964
+ },
965
+ $$slots: { default: !0 }
966
+ });
967
+ }), K.append(e, f);
968
+ },
969
+ $$slots: { default: !0 }
970
+ });
971
+ }), K.append(r, g);
972
+ },
973
+ $$slots: { default: !0 }
974
+ });
975
+ }), K.append(A, Oe), K.pop();
976
+ }
977
+ K.delegate(["click"]);
978
+ export { Q as n, Je as t };