@inkeep/open-knowledge 0.35.6 → 0.36.0-beta.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 (98) hide show
  1. package/dist/assets/skills/discovery/SKILL.md +1 -1
  2. package/dist/assets/skills/project/SKILL.md +1 -1
  3. package/dist/{chunk-TLSUDHID-CLK1mcxB.mjs → chunk-TLSUDHID-yiNJx4fT.mjs} +2 -2
  4. package/dist/cli.mjs +45 -45
  5. package/dist/constants-CmbV91sN.mjs +2 -0
  6. package/dist/{diff-HJF2MPDN-BPDjd-cH.mjs → diff-HJF2MPDN-02pYbkEo.mjs} +1 -1
  7. package/dist/{flag-coverage-6JEX67RU-t5LX_AGv.mjs → flag-coverage-6JEX67RU-D9YrJ9GF.mjs} +2 -2
  8. package/dist/{gh-detect-D21DaYXA.mjs → gh-detect-Cdvn1Wl3.mjs} +2 -2
  9. package/dist/{git-handle-C-78iRUR.mjs → git-handle-BguAxUWZ.mjs} +2 -2
  10. package/dist/git-handle-yT0SOj6_.mjs +1 -0
  11. package/dist/index.mjs +1 -1
  12. package/dist/{init-DvItJ22e.mjs → init-CetD9kmn.mjs} +4 -4
  13. package/dist/init-D1x8_KTh.mjs +1 -0
  14. package/dist/{launch-json-removal-D_MCrO8m.mjs → launch-json-removal-Y88F17II.mjs} +2 -2
  15. package/dist/{libesm-Ob3yvbRV.mjs → libesm-bRpdkHYn.mjs} +1 -1
  16. package/dist/loader-DgNZrRP1.mjs +1 -0
  17. package/dist/{loader-BFIt9ZLv.mjs → loader-XgA8baVf.mjs} +3 -3
  18. package/dist/{open-browser-CO5MRLMI.mjs → open-browser-B6D9fYyH.mjs} +2 -2
  19. package/dist/preview-B9l1AJ73.mjs +1 -0
  20. package/dist/{preview-DQYpdd0r.mjs → preview-BUYXW7-i.mjs} +2 -2
  21. package/dist/public/assets/{ActivityModeContent-V_zAw2Cp.js → ActivityModeContent-FexHGqMd.js} +1 -1
  22. package/dist/public/assets/{AgentDiffPane-CVTl1yHd.js → AgentDiffPane-Dcf2DUzT.js} +1 -1
  23. package/dist/public/assets/CodeMirrorPropInput-CWbhbvpr.js +3 -0
  24. package/dist/public/assets/{DocumentContext-DdPNvhCs.js → DocumentContext-O0A-tcJv.js} +10 -10
  25. package/dist/public/assets/{EnableSyncConfirmDialog-YbXwL0lV.js → EnableSyncConfirmDialog-N6XcDLKE.js} +1 -1
  26. package/dist/public/assets/{GraphPanel-C_f_Xd2V.js → GraphPanel-BqPMq7aw.js} +1 -1
  27. package/dist/public/assets/ManagedArtifactProperties-DCcQ10r7.js +1 -0
  28. package/dist/public/assets/{McpConsentDialogBody-DWMKC7U_.js → McpConsentDialogBody-BEhEYVhf.js} +1 -1
  29. package/dist/public/assets/{MermaidDocEditor-ChTa4qji.js → MermaidDocEditor-D1Zoh82_.js} +1 -1
  30. package/dist/public/assets/PropertyPanel-BnoEwA0Y.js +2 -0
  31. package/dist/public/assets/{ReportBugDialogBody-DO-LsEqg.js → ReportBugDialogBody-WNYejKs4.js} +1 -1
  32. package/dist/public/assets/SettingsDialogBody-BB7CWXDf.js +7 -0
  33. package/dist/public/assets/{ShareBranchSwitchDialog-CtWDd4RN.js → ShareBranchSwitchDialog-BdrVo8_D.js} +1 -1
  34. package/dist/public/assets/{ShareReceiveDialog-DHN60dEn.js → ShareReceiveDialog-Hvt2MZBo.js} +1 -1
  35. package/dist/public/assets/{ShareReceiveMissDialog-BPZPyDcg.js → ShareReceiveMissDialog-DgBQa7QK.js} +1 -1
  36. package/dist/public/assets/{SkillEditorActions-D0qSUb6F.js → SkillEditorActions-C0gxnHUB.js} +1 -1
  37. package/dist/public/assets/{SourceEditor-CiiGGjlz.js → SourceEditor-Cp2KKJVb.js} +1 -1
  38. package/dist/public/assets/{TerminalPanel-DipsMDbQ.js → TerminalPanel-Ch4_Ef5u.js} +3 -3
  39. package/dist/public/assets/{TimelineDiffPane-CCoQyhfx.js → TimelineDiffPane-Bs3d6DMI.js} +1 -1
  40. package/dist/public/assets/{agent-presence-DB_yc77e.js → agent-presence-YrdogQa3.js} +1 -1
  41. package/dist/public/assets/auth-state-cache-CnaWICXD.js +11 -0
  42. package/dist/public/assets/{config-provider-TXwl7IKA.js → config-provider-gBTyVVxO.js} +4 -4
  43. package/dist/public/assets/{dist-DAFoMRai.js → dist-BkuNSvgE.js} +1 -1
  44. package/dist/public/assets/{dist-D--vIb9_.js → dist-DEmM8o04.js} +160 -160
  45. package/dist/public/assets/{doc-hash-BNPgzBjA.js → doc-hash-DBnfNiP9.js} +1 -1
  46. package/dist/public/assets/{documents-events-BOt1_9Hf.js → documents-events-Ynxz3YVq.js} +1 -1
  47. package/dist/public/assets/{file-tree-adapter-C2NHvUNc.js → file-tree-adapter-z-igJkOj.js} +1 -1
  48. package/dist/public/assets/index-CgUFh8Pf.js +1995 -0
  49. package/dist/public/assets/index-aNI-rWHK.css +1 -0
  50. package/dist/public/assets/{lint-config-client-DfHR5qma.js → lint-config-client-DPZxzs8Q.js} +1 -1
  51. package/dist/public/assets/{navigation-targets-Dp0ljlND.js → navigation-targets-Bi-igYug.js} +1 -1
  52. package/dist/public/assets/{open-managed-artifact-tab-SLDmUABC.js → open-managed-artifact-tab-n_ttWe3q.js} +1 -1
  53. package/dist/public/assets/{pending-receive-nav-store-DjOWVQpM.js → pending-receive-nav-store-B2epkYbV.js} +1 -1
  54. package/dist/public/assets/{prop-types-D27bl_X-.js → prop-types-uamYPR-P.js} +1 -1
  55. package/dist/public/assets/{receive-store-CqCttQos.js → receive-store-Cfx8Fm1O.js} +1 -1
  56. package/dist/public/assets/{selection-context-VCaFOVcH.js → selection-context-BZ0vDvOZ.js} +1 -1
  57. package/dist/public/assets/{skill-actions-2X4vusgg.js → skill-actions-Bo5y4Jmv.js} +1 -1
  58. package/dist/public/assets/{skills-api-Zn9HHSnp.js → skills-api-_7OVhd1o.js} +1 -1
  59. package/dist/public/assets/{src-DOsxfOd0.js → src-BLjGyHA1.js} +1 -1
  60. package/dist/public/assets/{target-navigation-intent-gXTtsPCh.js → target-navigation-intent-D32NU0VH.js} +1 -1
  61. package/dist/public/assets/{typing-burst-detector-xnXm4fKL.js → typing-burst-detector-DZPDaaHu.js} +1 -1
  62. package/dist/public/assets/{use-activity-panel-Bw3nEPtk.js → use-activity-panel-CsmAywD8.js} +1 -1
  63. package/dist/public/assets/{use-apply-config-color-theme-B7VneWrH.js → use-apply-config-color-theme-DIFwGHaM.js} +2 -2
  64. package/dist/public/assets/{use-timeline-entry-diff-BlAVrAam.js → use-timeline-entry-diff-BpeNmjL3.js} +4 -4
  65. package/dist/public/assets/{workspace-paths-DFIcBLaH.js → workspace-paths-DeyKDDDU.js} +1 -1
  66. package/dist/public/index.html +27 -27
  67. package/dist/{repair-launch-json-55hsf0T9.mjs → repair-launch-json-DEgACMOU.mjs} +2 -2
  68. package/dist/{repair-mcp-configs-BguLpfZ8.mjs → repair-mcp-configs-Ba_AXlLr.mjs} +2 -2
  69. package/dist/{repair-skills-D7OqUhR5.mjs → repair-skills-B1G1QeKl.mjs} +2 -2
  70. package/dist/repair-skills-C5TRYdRl.mjs +1 -0
  71. package/dist/server-lock-BPbVTiet.mjs +1 -0
  72. package/dist/server-lock-D46oe4zF.mjs +39 -0
  73. package/dist/src-C-7wAp3_.mjs +3267 -0
  74. package/dist/{src-DYB9-lDM.mjs → src-Cn58m_TB.mjs} +6 -6
  75. package/dist/src-DjjyaKSr.mjs +1 -0
  76. package/dist/{src-CgIX2vtn.mjs → src-S2yxN8_s.mjs} +84 -84
  77. package/dist/start-BB_cIun6.mjs +1 -0
  78. package/dist/{start-BfZR_A1i.mjs → start-BQrV2xXS.mjs} +2 -2
  79. package/dist/{write-project-skill-BZ1Qx_Fc.mjs → write-project-skill-yzj7GOCS.mjs} +2 -2
  80. package/package.json +5 -5
  81. package/dist/constants-7gE0NYyy.mjs +0 -2
  82. package/dist/git-handle-Cm2rQ_SB.mjs +0 -1
  83. package/dist/init-0Jt4mSNz.mjs +0 -1
  84. package/dist/loader-DeEzYY2a.mjs +0 -1
  85. package/dist/preview-CbI7kH_Q.mjs +0 -1
  86. package/dist/public/assets/CodeMirrorPropInput-BbZYh8z8.js +0 -3
  87. package/dist/public/assets/ManagedArtifactProperties-DlJgeeBW.js +0 -1
  88. package/dist/public/assets/PropertyPanel-CGrfp7KX.js +0 -2
  89. package/dist/public/assets/SettingsDialogBody-Dqdq8UCp.js +0 -7
  90. package/dist/public/assets/auth-state-cache-Bm2yGEzY.js +0 -11
  91. package/dist/public/assets/index-C3iemlkC.css +0 -1
  92. package/dist/public/assets/index-Dqu53vRM.js +0 -1995
  93. package/dist/repair-skills-B_LT6KmX.mjs +0 -1
  94. package/dist/server-lock-B4ji1_12.mjs +0 -1
  95. package/dist/server-lock-B_XsVesk.mjs +0 -2
  96. package/dist/src-PsxMXz66.mjs +0 -1
  97. package/dist/src-i2Sa6WJ8.mjs +0 -3310
  98. package/dist/start-CvKHB-rv.mjs +0 -1
@@ -1 +1 @@
1
- import{i as e}from"./chunk-DseTPa7n.js";import{n as t,r as n,t as r}from"./compiler-runtime-DrcePeIl.js";import{u as i}from"./createLucideIcon-Wgamzz8_.js";import{$ as a,Oi as o,Q as s,Z as c}from"./dist-D--vIb9_.js";var l={general:{id:`Weq9zb`},workspace:{id:`pmUArF`},search:{id:`A1taO8`},wysiwyg:{id:`ur2XSb`},source:{id:`tiWX6q`},navigation:{id:`LXfNU-`}},u=Object.keys(l),d=[{id:`command-palette`,category:`general`,title:{id:`ZjtgI-`},description:{id:`OFBmkg`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ K`,windowsLinux:`Ctrl K`,match:{key:`k`,mod:!0}}]},{id:`settings`,category:`general`,title:{id:`Tz0i8g`},description:{id:`6m_7We`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ ,`,windowsLinux:`Ctrl ,`,match:{key:`,`,anyMod:!0}}]},{id:`new-item`,category:`general`,title:{id:`HdkSiO`},description:{id:`KkEAud`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ N`,windowsLinux:`Ctrl N`,match:{key:`n`,mod:!0}},{mac:`⌥⌘ N`,windowsLinux:`Ctrl Alt N`,match:{key:`n`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`new-folder`,category:`general`,title:{id:`96G6Re`},description:{id:`3cOo2C`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ N`,windowsLinux:`Ctrl Shift N`}]},{id:`toggle-files-sidebar`,category:`general`,title:{id:`rtdR4v`},description:{id:`EbZT7P`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ S`,windowsLinux:`Ctrl Alt S`,match:{code:`KeyS`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-document-panel`,category:`general`,title:{id:`lkYioO`},description:{id:`It9ARY`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ B`,windowsLinux:`Ctrl Alt B`,match:{code:`KeyB`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-terminal-panel`,category:`general`,title:{id:`dPOFid`},description:{id:`oCNLN8`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ J`,windowsLinux:`Ctrl J`,match:{key:`j`,mod:!0}}]},{id:`open-ask-ai`,category:`general`,title:{id:`xWEvuo`},description:{id:`5OTgC7`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ L`,windowsLinux:`Ctrl L`,match:{key:`l`,mod:!0}}]},{id:`new-terminal-tab`,category:`general`,title:{id:`k0vc0N`},description:{id:`si3L24`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ J`,windowsLinux:`Ctrl Shift J`,match:{key:`j`,mod:!0,shiftKey:!0}}]},{id:`tab-new`,category:`navigation`,title:{id:`3YvS-c`},description:{id:`t6w1cq`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ T`,windowsLinux:`Ctrl T`,match:{key:`t`,mod:!0}}]},{id:`tab-next`,category:`navigation`,title:{id:`l46MqT`},description:{id:`thnPBX`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌃ Tab`,windowsLinux:`Ctrl Tab`,match:{key:`Tab`,ctrlKey:!0}}]},{id:`tab-previous`,category:`navigation`,title:{id:`Mh_4hd`},description:{id:`DJd000`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌃⇧ Tab`,windowsLinux:`Ctrl Shift Tab`,match:{key:`Tab`,ctrlKey:!0,shiftKey:!0}}]},{id:`tab-jump`,category:`navigation`,title:{id:`_6FVBz`},description:{id:`wGSHzy`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ 1-8`,windowsLinux:`Ctrl 1-8`}]},{id:`tab-jump-last`,category:`navigation`,title:{id:`N1KkEO`},description:{id:`ZQJ1IV`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ 9`,windowsLinux:`Ctrl 9`}]},{id:`tab-reopen-closed`,category:`navigation`,title:{id:`hpzRlK`},description:{id:`E5WeIy`},scope:{id:`2GT3Hf`},bindings:[{mac:`⇧⌘ T`,windowsLinux:`Ctrl Shift T`,match:{key:`t`,mod:!0,shiftKey:!0}}]},{id:`open-folder`,category:`workspace`,title:{id:`PVUn_c`},description:{id:`VYd_YA`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ O`,windowsLinux:`Ctrl O`}]},{id:`open-file`,category:`workspace`,title:{id:`9npOH9`},description:{id:`H08D2X`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ O`,windowsLinux:`Ctrl Shift O`}]},{id:`switch-project`,category:`workspace`,title:{id:`xaDWAI`},description:{id:`oS1YpJ`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ P`,windowsLinux:`Ctrl Shift P`}]},{id:`file-tree-copy`,category:`workspace`,title:{id:`eGUbmF`},description:{id:`7uBlRT`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ C`,windowsLinux:`Ctrl C`}]},{id:`file-tree-paste`,category:`workspace`,title:{id:`_tjopj`},description:{id:`e4PbgC`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ V`,windowsLinux:`Ctrl V`}]},{id:`file-tree-duplicate`,category:`workspace`,title:{id:`ot5BRK`},description:{id:`mxY24F`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ D`,windowsLinux:`Ctrl D`}]},{id:`file-tree-delete`,category:`workspace`,title:{id:`VxO6wR`},description:{id:`osRqlv`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ Backspace`,windowsLinux:`Delete`}]},{id:`file-tree-select-all`,category:`workspace`,title:{id:`1d1F11`},description:{id:`4v2Yyz`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ A`,windowsLinux:`Ctrl A`}]},{id:`find`,category:`search`,title:{id:`KujtjC`},description:{id:`8OGgNM`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ F`,windowsLinux:`Ctrl F`,match:{key:`f`,mod:!0,allowShiftKey:!0}}]},{id:`replace`,category:`search`,title:{id:`fqSfXY`},description:{id:`wT4iQr`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ F`,windowsLinux:`Ctrl H`,match:{mac:{key:`f`,mod:!0,altKey:!0},windowsLinux:{key:`h`,mod:!0}}}]},{id:`find-next`,category:`search`,title:{id:`v7lbnC`},description:{id:`PR9FSv`},scope:{id:`EqtBXb`},bindings:[{mac:`⌘ G`,windowsLinux:`Ctrl G`,match:{key:`g`,mod:!0}},{mac:`F3`,windowsLinux:`F3`,match:{key:`F3`}}]},{id:`find-previous`,category:`search`,title:{id:`PB4upl`},description:{id:`PgzIpb`},scope:{id:`EqtBXb`},bindings:[{mac:`⇧⌘ G`,windowsLinux:`Ctrl Shift G`,match:{key:`g`,mod:!0,shiftKey:!0}},{mac:`Shift F3`,windowsLinux:`Shift F3`,match:{key:`F3`,shiftKey:!0}}]},{id:`find-field-navigation`,category:`search`,title:{id:`yMgL_E`},description:{id:`5ALjdr`},scope:{id:`BgV29F`},bindings:[{mac:`Enter / Shift Enter`,windowsLinux:`Enter / Shift Enter`}]},{id:`replace-current-from-field`,category:`search`,title:{id:`LDuM35`},description:{id:`EZVxVz`},scope:{id:`rZVMkf`},bindings:[{mac:`Enter`,windowsLinux:`Enter`}]},{id:`format-bold`,category:`wysiwyg`,title:{id:`KmydK6`},description:{id:`fbdLmk`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ B`,windowsLinux:`Ctrl B`}]},{id:`format-italic`,category:`wysiwyg`,title:{id:`pzutoc`},description:{id:`TLIO3j`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ I`,windowsLinux:`Ctrl I`}]},{id:`format-underline`,category:`wysiwyg`,title:{id:`YyXtnN`},description:{id:`Okd2Xv`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ U`,windowsLinux:`Ctrl U`}]},{id:`format-strike`,category:`wysiwyg`,title:{id:`WhOsNE`},description:{id:`HCn0Ay`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ X`,windowsLinux:`Ctrl Shift X`}]},{id:`format-inline-code`,category:`wysiwyg`,title:{id:`OX2Neh`},description:{id:`mo22UP`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ E`,windowsLinux:`Ctrl E`}]},{id:`format-highlight`,category:`wysiwyg`,title:{id:`gtEbeW`},description:{id:`Eji13z`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ H`,windowsLinux:`Ctrl Shift H`}]},{id:`add-link`,category:`wysiwyg`,title:{id:`VzGJRl`},description:{id:`u7U_Ij`},scope:{id:`v77jrg`},bindings:[{mac:`⌘ K`,windowsLinux:`Ctrl K`,match:{key:`k`,mod:!0}}]},{id:`edit-with-ai`,category:`general`,title:{id:`G4-bgo`},description:{id:`a3H_MR`},scope:{id:`C62P6b`},bindings:[{mac:`⇧⌘ I`,windowsLinux:`Ctrl Shift I`,match:{key:`i`,mod:!0,shiftKey:!0}}]},{id:`history-undo-redo`,category:`wysiwyg`,title:{id:`i9OyGp`},description:{id:`lbkOif`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z / ⌘ Y`,windowsLinux:`Ctrl Shift Z / Ctrl Y`}]},{id:`heading-paragraph`,category:`wysiwyg`,title:{id:`bkQRMh`},description:{id:`rgPqOw`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 0`,windowsLinux:`Ctrl Alt 0`}]},{id:`heading-levels`,category:`wysiwyg`,title:{id:`q_z77Z`},description:{id:`8Jm2EP`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 1-6`,windowsLinux:`Ctrl Alt 1-6`}]},{id:`list-bullet`,category:`wysiwyg`,title:{id:`ijLc3m`},description:{id:`By-7Pn`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 8`,windowsLinux:`Ctrl Shift 8`}]},{id:`list-ordered`,category:`wysiwyg`,title:{id:`iSQTsg`},description:{id:`ou1hFW`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 7`,windowsLinux:`Ctrl Shift 7`}]},{id:`list-task`,category:`wysiwyg`,title:{id:`E1_c72`},description:{id:`-slrNR`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 9`,windowsLinux:`Ctrl Shift 9`}]},{id:`code-block`,category:`wysiwyg`,title:{id:`4A3Yzu`},description:{id:`pTPqMK`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ C`,windowsLinux:`Ctrl Alt C`}]},{id:`hard-break`,category:`wysiwyg`,title:{id:`-3ois8`},description:{id:`vDXqVv`},scope:{id:`ur2XSb`},bindings:[{mac:`Shift Enter`,windowsLinux:`Shift Enter`},{mac:`⌘ Enter`,windowsLinux:`Ctrl Enter`}]},{id:`move-block`,category:`wysiwyg`,title:{id:`f1XQyZ`},description:{id:`zQBg2C`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ ↑`,windowsLinux:`Ctrl Shift ↑`},{mac:`⇧⌘ ↓`,windowsLinux:`Ctrl Shift ↓`}]},{id:`list-indent`,category:`wysiwyg`,title:{id:`G0YZ-I`},description:{id:`5GKMSz`},scope:{id:`ynIa4S`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`list-split-item`,category:`wysiwyg`,title:{id:`neRy3o`},description:{id:`NpC29w`},scope:{id:`ynIa4S`},bindings:[{mac:`Enter`,windowsLinux:`Enter`}]},{id:`table-cell-navigation`,category:`wysiwyg`,title:{id:`K8-WWn`},description:{id:`4NC2Ym`},scope:{id:`l1aQKz`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`table-delete-selection`,category:`wysiwyg`,title:{id:`881Uwh`},description:{id:`YEP3X2`},scope:{id:`99eR72`},bindings:[{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌘ Backspace / ⌘ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`}]},{id:`delete-atom`,category:`wysiwyg`,title:{id:`636K3K`},description:{id:`oXKEsy`},scope:{id:`ur2XSb`},bindings:[{mac:`Backspace`,windowsLinux:`Backspace`},{mac:`Delete`,windowsLinux:`Delete`}]},{id:`slash-menu`,category:`navigation`,title:{id:`shNd9t`},description:{id:`8PmoQF`},scope:{id:`ur2XSb`},bindings:[{mac:`/`,windowsLinux:`/`}]},{id:`suggestion-navigation`,category:`navigation`,title:{id:`riqekz`},description:{id:`OiHJdA`},scope:{id:`y5FUYi`},bindings:[{mac:`↑ / ↓`,windowsLinux:`↑ / ↓`},{mac:`Enter / Tab`,windowsLinux:`Enter / Tab`},{mac:`Esc`,windowsLinux:`Esc`}]},{id:`component-navigation`,category:`navigation`,title:{id:`rwrPbS`},description:{id:`0s8-e8`},scope:{id:`ur2XSb`},bindings:[{mac:`↑ / ↓ / ← / →`,windowsLinux:`↑ / ↓ / ← / →`},{mac:`Enter / Esc`,windowsLinux:`Enter / Esc`}]},{id:`source-indent`,category:`source`,title:{id:`fwhX-N`},description:{id:`skf5Ix`},scope:{id:`tiWX6q`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`source-navigation`,category:`source`,title:{id:`qSKu2v`},description:{id:`gITz7o`},scope:{id:`tiWX6q`},bindings:[{mac:`Arrow keys / Option Arrow / Command Arrow`,windowsLinux:`Arrow keys / Ctrl Arrow / Home / End`},{mac:`Page Up / Page Down`,windowsLinux:`Page Up / Page Down`},{mac:`Shift with movement keys`,windowsLinux:`Shift with movement keys`}]},{id:`source-editing`,category:`source`,title:{id:`pFagOn`},description:{id:`MGb89P`},scope:{id:`tiWX6q`},bindings:[{mac:`Enter / Shift Enter / ⌘ Enter`,windowsLinux:`Enter / Shift Enter / Ctrl Enter`},{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌥ Backspace / ⌥ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`},{mac:`⌥ ↑ / ⌥ ↓`,windowsLinux:`Alt ↑ / Alt ↓`},{mac:`⇧⌥ ↑ / ⇧⌥ ↓`,windowsLinux:`Shift Alt ↑ / Shift Alt ↓`},{mac:`⇧⌘ K`,windowsLinux:`Ctrl Shift K`}]},{id:`source-history`,category:`source`,title:{id:`4Sxexw`},description:{id:`r2huLx`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z`,windowsLinux:`Ctrl Y / Ctrl Shift Z`},{mac:`⌘ U / ⇧⌘ U`,windowsLinux:`Ctrl U / Alt U`}]},{id:`source-select-all`,category:`source`,title:{id:`a-cKXz`},description:{id:`UTNVyS`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ A`,windowsLinux:`Ctrl A`}]},{id:`source-multi-cursor`,category:`source`,title:{id:`mg0YGL`},description:{id:`lWNpNB`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ ↑ / ⌥⌘ ↓`,windowsLinux:`Ctrl Alt ↑ / Ctrl Alt ↓`},{mac:`⇧⌘ L`,windowsLinux:`Ctrl Shift L`}]},{id:`source-search`,category:`source`,title:{id:`7OhaRy`},description:{id:`mwMF9u`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ F`,windowsLinux:`Ctrl F`}]},{id:`source-toggle-comment`,category:`source`,title:{id:`RfaEio`},description:{id:`MrwYIK`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ /`,windowsLinux:`Ctrl /`},{mac:`Shift Alt A`,windowsLinux:`Shift Alt A`}]},{id:`source-select-next-occurrence`,category:`source`,title:{id:`hY8pka`},description:{id:`XnlF3W`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ D`,windowsLinux:`Ctrl D`}]},{id:`source-goto-line`,category:`source`,title:{id:`7FamGZ`},description:{id:`yHikCO`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ G`,windowsLinux:`Ctrl Alt G`}]},{id:`source-find-results`,category:`source`,title:{id:`rJVoVX`},description:{id:`TwYboS`},scope:{id:`qyLmWw`},bindings:[{mac:`⌘ G / ⇧⌘ G`,windowsLinux:`Ctrl G / Ctrl Shift G`},{mac:`F3 / Shift F3`,windowsLinux:`F3 / Shift F3`},{mac:`Esc`,windowsLinux:`Esc`}]},{id:`source-folding`,category:`source`,title:{id:`bcjYUA`},description:{id:`VZGh8G`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ [ / ⌥⌘ ]`,windowsLinux:`Ctrl Shift [ / Ctrl Shift ]`},{mac:`Ctrl Alt [ / Ctrl Alt ]`,windowsLinux:`Ctrl Alt [ / Ctrl Alt ]`}]},{id:`source-completion`,category:`source`,title:{id:`VuxVSP`},description:{id:`Ehkru0`},scope:{id:`tiWX6q`},bindings:[{mac:`Ctrl Space`,windowsLinux:`Ctrl Space`},{mac:"⌥ ` / ⌥ I",windowsLinux:`Ctrl Space`},{mac:`↑ / ↓ / Page Up / Page Down`,windowsLinux:`↑ / ↓ / Page Up / Page Down`},{mac:`Enter / Esc`,windowsLinux:`Enter / Esc`}]},{id:`source-tab-focus-mode`,category:`source`,title:{id:`eG8Jsg`},description:{id:`qRZh7J`},scope:{id:`tiWX6q`},bindings:[{mac:`Shift Alt M`,windowsLinux:`Ctrl M`}]},{id:`source-lint-panel`,category:`source`,title:{id:`yvG-l1`},description:{id:`kCqCyf`},scope:{id:`tiWX6q`},bindings:[{mac:`⇧⌘ M`,windowsLinux:`Ctrl Shift M`}]},{id:`source-next-diagnostic`,category:`source`,title:{id:`M1OfV9`},description:{id:`ExPiRQ`},scope:{id:`tiWX6q`},bindings:[{mac:`F8`,windowsLinux:`F8`}]}],f=d,p=new Map(d.map(e=>[e.id,e]));function m(e){let t=p.get(e);if(!t)throw Error(`Unknown keyboard shortcut: ${e}`);return t}function h(){return o()?`mac`:`windowsLinux`}var g=[[/⌘/g,` Command `],[/⌥/g,` Option `],[/⇧/g,` Shift `],[/⌃/g,` Control `],[/↑/g,` Up Arrow `],[/↓/g,` Down Arrow `],[/←/g,` Left Arrow `],[/→/g,` Right Arrow `],[/\[/g,` Left Bracket `],[/\]/g,` Right Bracket `],[/,/g,` Comma `],[/\bCtrl\b/g,` Control `]];function _(e){return e.split(` / `).map(e=>g.reduce((e,[t,n])=>e.replace(t,n),e).replaceAll(/\s+/g,` `).trim()).join(` or `)}function v(e,t=h()){return t===`mac`?e.mac:e.windowsLinux}function y(e,t=h()){return _(v(e,t))}function b(e,t=h()){return v(m(e).bindings[0],t)}function x(e,t=h()){return y(m(e).bindings[0],t)}function S(e){if(!e||typeof e!=`object`)return!1;if(`isContentEditable`in e&&e.isContentEditable===!0)return!0;if(!(`tagName`in e))return!1;let t=String(e.tagName).toUpperCase();return t===`INPUT`||t===`TEXTAREA`}function C(e,t,n=h()){return m(t).bindings.some(t=>{let r=w(t.match,n);return r?E(e,r,n):!1})}function w(e,t){return e?T(e)?e:e[t]??null:null}function T(e){return`key`in e||`code`in e}function E(e,t,n){if(t.key&&e.key.toLowerCase()!==t.key.toLowerCase()||t.code&&e.code!==t.code)return!1;let r=t.metaKey??(t.mod?n===`mac`:!1),i=t.ctrlKey??(t.mod?n===`windowsLinux`:!1),a=t.altKey??!1,o=t.shiftKey??!1;return t.allowExtraModifiers?!(t.anyMod&&!e.metaKey&&!e.ctrlKey||r&&!e.metaKey||i&&!e.ctrlKey||a&&!e.altKey||o&&!e.shiftKey):(t.anyMod?e.metaKey||e.ctrlKey:e.metaKey===r&&e.ctrlKey===i)&&e.altKey===a&&(t.allowShiftKey||!!e.shiftKey===o)}var D=r(),O=n();function k(e){let t=(0,D.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`animate-pulse rounded-md bg-muted`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,O.jsx)(`div`,{"data-slot":`skeleton`,className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}var A=e(t(),1),j=`open-knowledge:lint-config-changed`;function M(){window.dispatchEvent(new CustomEvent(j))}function N(e){let t=()=>e();return window.addEventListener(j,t),()=>window.removeEventListener(j,t)}async function P(e){try{let t=e===void 0?``:`?doc=${encodeURIComponent(e)}`,n=await fetch(`/api/lint/config${t}`);if(!n.ok)return null;let r=await n.json().catch(()=>null),i=s.safeParse(r);return i.success?i.data:(console.warn(`[lint] lint-config response failed schema validation`,i.error.issues),null)}catch{return null}}async function F(e){return(await P(e))?.effective??null}async function I(e){try{let t=e?`?path=${encodeURIComponent(e)}`:``,n=await fetch(`/api/lint/audit${t}`);if(!n.ok)return null;let r=await n.json().catch(()=>null),i=c.safeParse(r);return i.success?i.data:(console.warn(`[lint] audit response failed schema validation`,i.error.issues),null)}catch{return null}}async function L(e){try{let t=await fetch(`/api/lint/fix`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({docName:e})});if(!t.ok){let e=await t.json().catch(()=>null);return{ok:!1,errorDetail:typeof e?.title==`string`?e.title:null}}let n=await t.json().catch(()=>null),r=a.safeParse(n);return r.success?{ok:!0,result:r.data}:(console.warn(`[lint] fix response failed schema validation`,r.error.issues),{ok:!1,errorDetail:null})}catch{return{ok:!1,errorDetail:null}}}async function R(e,t){try{let n=await fetch(`/api/lint/markdownlint-config`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ruleId:e,value:t})});if(!n.ok){let e=await n.json().catch(()=>null);return{ok:!1,errorDetail:typeof e?.title==`string`?e.title:null}}let r=await n.json().catch(()=>null),i=s.safeParse(r);return i.success?{ok:!0,response:i.data}:{ok:!1,errorDetail:null}}catch{return{ok:!1,errorDetail:null}}}function z(e){let t=(0,D.c)(5),[n,r]=(0,A.useState)(null),i,a;t[0]===e?(i=t[1],a=t[2]):(i=()=>{if(!e){r(null);return}let t=!1,n=()=>{P(e).then(e=>{t||r(e)})};n();let i=N(n);return()=>{t=!0,i()}},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,A.useEffect)(i,a);let o;return t[3]===n?o=t[4]:(o={data:n},t[3]=n,t[4]=o),o}function B(){let e=(0,D.c)(4),[t,n]=(0,A.useState)(null),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=!1,t=()=>{P().then(t=>{e||n(t)})};t();let r=N(t);return()=>{e=!0,r()}},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,A.useEffect)(r,i);let a;return e[2]===t?a=e[3]:(a={data:t},e[2]=t,e[3]=a),a}export{S as _,N as a,R as c,l as d,u as f,_ as g,x as h,I as i,k as l,v as m,F as n,z as o,b as p,L as r,B as s,M as t,f as u,C as v};
1
+ import{i as e}from"./chunk-DseTPa7n.js";import{n as t,r as n,t as r}from"./compiler-runtime-DrcePeIl.js";import{u as i}from"./createLucideIcon-Wgamzz8_.js";import{$ as a,Q as o,Z as s,ki as c}from"./dist-DEmM8o04.js";var l={general:{id:`Weq9zb`},workspace:{id:`pmUArF`},search:{id:`A1taO8`},wysiwyg:{id:`ur2XSb`},source:{id:`tiWX6q`},navigation:{id:`LXfNU-`}},u=Object.keys(l),d=[{id:`command-palette`,category:`general`,title:{id:`ZjtgI-`},description:{id:`OFBmkg`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ K`,windowsLinux:`Ctrl K`,match:{key:`k`,mod:!0}}]},{id:`settings`,category:`general`,title:{id:`Tz0i8g`},description:{id:`6m_7We`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ ,`,windowsLinux:`Ctrl ,`,match:{key:`,`,anyMod:!0}}]},{id:`new-item`,category:`general`,title:{id:`HdkSiO`},description:{id:`KkEAud`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ N`,windowsLinux:`Ctrl N`,match:{key:`n`,mod:!0}},{mac:`⌥⌘ N`,windowsLinux:`Ctrl Alt N`,match:{key:`n`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`new-folder`,category:`general`,title:{id:`96G6Re`},description:{id:`3cOo2C`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ N`,windowsLinux:`Ctrl Shift N`}]},{id:`toggle-files-sidebar`,category:`general`,title:{id:`rtdR4v`},description:{id:`EbZT7P`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ S`,windowsLinux:`Ctrl Alt S`,match:{code:`KeyS`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-document-panel`,category:`general`,title:{id:`lkYioO`},description:{id:`It9ARY`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ B`,windowsLinux:`Ctrl Alt B`,match:{code:`KeyB`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-terminal-panel`,category:`general`,title:{id:`dPOFid`},description:{id:`oCNLN8`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ J`,windowsLinux:`Ctrl J`,match:{key:`j`,mod:!0}}]},{id:`open-ask-ai`,category:`general`,title:{id:`xWEvuo`},description:{id:`5OTgC7`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ L`,windowsLinux:`Ctrl L`,match:{key:`l`,mod:!0}}]},{id:`new-terminal-tab`,category:`general`,title:{id:`k0vc0N`},description:{id:`si3L24`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ J`,windowsLinux:`Ctrl Shift J`,match:{key:`j`,mod:!0,shiftKey:!0}}]},{id:`tab-new`,category:`navigation`,title:{id:`3YvS-c`},description:{id:`t6w1cq`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ T`,windowsLinux:`Ctrl T`,match:{key:`t`,mod:!0}}]},{id:`tab-next`,category:`navigation`,title:{id:`l46MqT`},description:{id:`thnPBX`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌃ Tab`,windowsLinux:`Ctrl Tab`,match:{key:`Tab`,ctrlKey:!0}}]},{id:`tab-previous`,category:`navigation`,title:{id:`Mh_4hd`},description:{id:`DJd000`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌃⇧ Tab`,windowsLinux:`Ctrl Shift Tab`,match:{key:`Tab`,ctrlKey:!0,shiftKey:!0}}]},{id:`tab-jump`,category:`navigation`,title:{id:`_6FVBz`},description:{id:`wGSHzy`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ 1-8`,windowsLinux:`Ctrl 1-8`}]},{id:`tab-jump-last`,category:`navigation`,title:{id:`N1KkEO`},description:{id:`ZQJ1IV`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ 9`,windowsLinux:`Ctrl 9`}]},{id:`tab-reopen-closed`,category:`navigation`,title:{id:`hpzRlK`},description:{id:`E5WeIy`},scope:{id:`2GT3Hf`},bindings:[{mac:`⇧⌘ T`,windowsLinux:`Ctrl Shift T`,match:{key:`t`,mod:!0,shiftKey:!0}}]},{id:`open-folder`,category:`workspace`,title:{id:`PVUn_c`},description:{id:`VYd_YA`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ O`,windowsLinux:`Ctrl O`}]},{id:`open-file`,category:`workspace`,title:{id:`9npOH9`},description:{id:`H08D2X`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ O`,windowsLinux:`Ctrl Shift O`}]},{id:`switch-project`,category:`workspace`,title:{id:`xaDWAI`},description:{id:`oS1YpJ`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ P`,windowsLinux:`Ctrl Shift P`}]},{id:`file-tree-copy`,category:`workspace`,title:{id:`eGUbmF`},description:{id:`7uBlRT`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ C`,windowsLinux:`Ctrl C`}]},{id:`file-tree-paste`,category:`workspace`,title:{id:`_tjopj`},description:{id:`e4PbgC`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ V`,windowsLinux:`Ctrl V`}]},{id:`file-tree-duplicate`,category:`workspace`,title:{id:`ot5BRK`},description:{id:`mxY24F`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ D`,windowsLinux:`Ctrl D`}]},{id:`file-tree-delete`,category:`workspace`,title:{id:`VxO6wR`},description:{id:`osRqlv`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ Backspace`,windowsLinux:`Delete`}]},{id:`file-tree-select-all`,category:`workspace`,title:{id:`1d1F11`},description:{id:`4v2Yyz`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ A`,windowsLinux:`Ctrl A`}]},{id:`find`,category:`search`,title:{id:`KujtjC`},description:{id:`8OGgNM`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ F`,windowsLinux:`Ctrl F`,match:{key:`f`,mod:!0,allowShiftKey:!0}}]},{id:`replace`,category:`search`,title:{id:`fqSfXY`},description:{id:`wT4iQr`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ F`,windowsLinux:`Ctrl H`,match:{mac:{key:`f`,mod:!0,altKey:!0},windowsLinux:{key:`h`,mod:!0}}}]},{id:`find-next`,category:`search`,title:{id:`v7lbnC`},description:{id:`PR9FSv`},scope:{id:`EqtBXb`},bindings:[{mac:`⌘ G`,windowsLinux:`Ctrl G`,match:{key:`g`,mod:!0}},{mac:`F3`,windowsLinux:`F3`,match:{key:`F3`}}]},{id:`find-previous`,category:`search`,title:{id:`PB4upl`},description:{id:`PgzIpb`},scope:{id:`EqtBXb`},bindings:[{mac:`⇧⌘ G`,windowsLinux:`Ctrl Shift G`,match:{key:`g`,mod:!0,shiftKey:!0}},{mac:`Shift F3`,windowsLinux:`Shift F3`,match:{key:`F3`,shiftKey:!0}}]},{id:`find-field-navigation`,category:`search`,title:{id:`yMgL_E`},description:{id:`5ALjdr`},scope:{id:`BgV29F`},bindings:[{mac:`Enter / Shift Enter`,windowsLinux:`Enter / Shift Enter`}]},{id:`replace-current-from-field`,category:`search`,title:{id:`LDuM35`},description:{id:`EZVxVz`},scope:{id:`rZVMkf`},bindings:[{mac:`Enter`,windowsLinux:`Enter`}]},{id:`format-bold`,category:`wysiwyg`,title:{id:`KmydK6`},description:{id:`fbdLmk`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ B`,windowsLinux:`Ctrl B`}]},{id:`format-italic`,category:`wysiwyg`,title:{id:`pzutoc`},description:{id:`TLIO3j`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ I`,windowsLinux:`Ctrl I`}]},{id:`format-underline`,category:`wysiwyg`,title:{id:`YyXtnN`},description:{id:`Okd2Xv`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ U`,windowsLinux:`Ctrl U`}]},{id:`format-strike`,category:`wysiwyg`,title:{id:`WhOsNE`},description:{id:`HCn0Ay`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ X`,windowsLinux:`Ctrl Shift X`}]},{id:`format-inline-code`,category:`wysiwyg`,title:{id:`OX2Neh`},description:{id:`mo22UP`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ E`,windowsLinux:`Ctrl E`}]},{id:`format-highlight`,category:`wysiwyg`,title:{id:`gtEbeW`},description:{id:`Eji13z`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ H`,windowsLinux:`Ctrl Shift H`}]},{id:`add-link`,category:`wysiwyg`,title:{id:`VzGJRl`},description:{id:`u7U_Ij`},scope:{id:`v77jrg`},bindings:[{mac:`⌘ K`,windowsLinux:`Ctrl K`,match:{key:`k`,mod:!0}}]},{id:`edit-with-ai`,category:`general`,title:{id:`G4-bgo`},description:{id:`a3H_MR`},scope:{id:`C62P6b`},bindings:[{mac:`⇧⌘ I`,windowsLinux:`Ctrl Shift I`,match:{key:`i`,mod:!0,shiftKey:!0}}]},{id:`history-undo-redo`,category:`wysiwyg`,title:{id:`i9OyGp`},description:{id:`lbkOif`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z / ⌘ Y`,windowsLinux:`Ctrl Shift Z / Ctrl Y`}]},{id:`heading-paragraph`,category:`wysiwyg`,title:{id:`bkQRMh`},description:{id:`rgPqOw`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 0`,windowsLinux:`Ctrl Alt 0`}]},{id:`heading-levels`,category:`wysiwyg`,title:{id:`q_z77Z`},description:{id:`8Jm2EP`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 1-6`,windowsLinux:`Ctrl Alt 1-6`}]},{id:`list-bullet`,category:`wysiwyg`,title:{id:`ijLc3m`},description:{id:`By-7Pn`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 8`,windowsLinux:`Ctrl Shift 8`}]},{id:`list-ordered`,category:`wysiwyg`,title:{id:`iSQTsg`},description:{id:`ou1hFW`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 7`,windowsLinux:`Ctrl Shift 7`}]},{id:`list-task`,category:`wysiwyg`,title:{id:`E1_c72`},description:{id:`-slrNR`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 9`,windowsLinux:`Ctrl Shift 9`}]},{id:`code-block`,category:`wysiwyg`,title:{id:`4A3Yzu`},description:{id:`pTPqMK`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ C`,windowsLinux:`Ctrl Alt C`}]},{id:`hard-break`,category:`wysiwyg`,title:{id:`-3ois8`},description:{id:`vDXqVv`},scope:{id:`ur2XSb`},bindings:[{mac:`Shift Enter`,windowsLinux:`Shift Enter`},{mac:`⌘ Enter`,windowsLinux:`Ctrl Enter`}]},{id:`move-block`,category:`wysiwyg`,title:{id:`f1XQyZ`},description:{id:`zQBg2C`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ ↑`,windowsLinux:`Ctrl Shift ↑`},{mac:`⇧⌘ ↓`,windowsLinux:`Ctrl Shift ↓`}]},{id:`list-indent`,category:`wysiwyg`,title:{id:`G0YZ-I`},description:{id:`5GKMSz`},scope:{id:`ynIa4S`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`list-split-item`,category:`wysiwyg`,title:{id:`neRy3o`},description:{id:`NpC29w`},scope:{id:`ynIa4S`},bindings:[{mac:`Enter`,windowsLinux:`Enter`}]},{id:`table-cell-navigation`,category:`wysiwyg`,title:{id:`K8-WWn`},description:{id:`4NC2Ym`},scope:{id:`l1aQKz`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`table-delete-selection`,category:`wysiwyg`,title:{id:`881Uwh`},description:{id:`YEP3X2`},scope:{id:`99eR72`},bindings:[{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌘ Backspace / ⌘ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`}]},{id:`delete-atom`,category:`wysiwyg`,title:{id:`636K3K`},description:{id:`oXKEsy`},scope:{id:`ur2XSb`},bindings:[{mac:`Backspace`,windowsLinux:`Backspace`},{mac:`Delete`,windowsLinux:`Delete`}]},{id:`slash-menu`,category:`navigation`,title:{id:`shNd9t`},description:{id:`8PmoQF`},scope:{id:`ur2XSb`},bindings:[{mac:`/`,windowsLinux:`/`}]},{id:`suggestion-navigation`,category:`navigation`,title:{id:`riqekz`},description:{id:`OiHJdA`},scope:{id:`y5FUYi`},bindings:[{mac:`↑ / ↓`,windowsLinux:`↑ / ↓`},{mac:`Enter / Tab`,windowsLinux:`Enter / Tab`},{mac:`Esc`,windowsLinux:`Esc`}]},{id:`component-navigation`,category:`navigation`,title:{id:`rwrPbS`},description:{id:`0s8-e8`},scope:{id:`ur2XSb`},bindings:[{mac:`↑ / ↓ / ← / →`,windowsLinux:`↑ / ↓ / ← / →`},{mac:`Enter / Esc`,windowsLinux:`Enter / Esc`}]},{id:`source-indent`,category:`source`,title:{id:`fwhX-N`},description:{id:`skf5Ix`},scope:{id:`tiWX6q`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`source-navigation`,category:`source`,title:{id:`qSKu2v`},description:{id:`gITz7o`},scope:{id:`tiWX6q`},bindings:[{mac:`Arrow keys / Option Arrow / Command Arrow`,windowsLinux:`Arrow keys / Ctrl Arrow / Home / End`},{mac:`Page Up / Page Down`,windowsLinux:`Page Up / Page Down`},{mac:`Shift with movement keys`,windowsLinux:`Shift with movement keys`}]},{id:`source-editing`,category:`source`,title:{id:`pFagOn`},description:{id:`MGb89P`},scope:{id:`tiWX6q`},bindings:[{mac:`Enter / Shift Enter / ⌘ Enter`,windowsLinux:`Enter / Shift Enter / Ctrl Enter`},{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌥ Backspace / ⌥ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`},{mac:`⌥ ↑ / ⌥ ↓`,windowsLinux:`Alt ↑ / Alt ↓`},{mac:`⇧⌥ ↑ / ⇧⌥ ↓`,windowsLinux:`Shift Alt ↑ / Shift Alt ↓`},{mac:`⇧⌘ K`,windowsLinux:`Ctrl Shift K`}]},{id:`source-history`,category:`source`,title:{id:`4Sxexw`},description:{id:`r2huLx`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z`,windowsLinux:`Ctrl Y / Ctrl Shift Z`},{mac:`⌘ U / ⇧⌘ U`,windowsLinux:`Ctrl U / Alt U`}]},{id:`source-select-all`,category:`source`,title:{id:`a-cKXz`},description:{id:`UTNVyS`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ A`,windowsLinux:`Ctrl A`}]},{id:`source-multi-cursor`,category:`source`,title:{id:`mg0YGL`},description:{id:`lWNpNB`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ ↑ / ⌥⌘ ↓`,windowsLinux:`Ctrl Alt ↑ / Ctrl Alt ↓`},{mac:`⇧⌘ L`,windowsLinux:`Ctrl Shift L`}]},{id:`source-search`,category:`source`,title:{id:`7OhaRy`},description:{id:`mwMF9u`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ F`,windowsLinux:`Ctrl F`}]},{id:`source-toggle-comment`,category:`source`,title:{id:`RfaEio`},description:{id:`MrwYIK`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ /`,windowsLinux:`Ctrl /`},{mac:`Shift Alt A`,windowsLinux:`Shift Alt A`}]},{id:`source-select-next-occurrence`,category:`source`,title:{id:`hY8pka`},description:{id:`XnlF3W`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ D`,windowsLinux:`Ctrl D`}]},{id:`source-goto-line`,category:`source`,title:{id:`7FamGZ`},description:{id:`yHikCO`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ G`,windowsLinux:`Ctrl Alt G`}]},{id:`source-find-results`,category:`source`,title:{id:`rJVoVX`},description:{id:`TwYboS`},scope:{id:`qyLmWw`},bindings:[{mac:`⌘ G / ⇧⌘ G`,windowsLinux:`Ctrl G / Ctrl Shift G`},{mac:`F3 / Shift F3`,windowsLinux:`F3 / Shift F3`},{mac:`Esc`,windowsLinux:`Esc`}]},{id:`source-folding`,category:`source`,title:{id:`bcjYUA`},description:{id:`VZGh8G`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ [ / ⌥⌘ ]`,windowsLinux:`Ctrl Shift [ / Ctrl Shift ]`},{mac:`Ctrl Alt [ / Ctrl Alt ]`,windowsLinux:`Ctrl Alt [ / Ctrl Alt ]`}]},{id:`source-completion`,category:`source`,title:{id:`VuxVSP`},description:{id:`Ehkru0`},scope:{id:`tiWX6q`},bindings:[{mac:`Ctrl Space`,windowsLinux:`Ctrl Space`},{mac:"⌥ ` / ⌥ I",windowsLinux:`Ctrl Space`},{mac:`↑ / ↓ / Page Up / Page Down`,windowsLinux:`↑ / ↓ / Page Up / Page Down`},{mac:`Enter / Esc`,windowsLinux:`Enter / Esc`}]},{id:`source-tab-focus-mode`,category:`source`,title:{id:`eG8Jsg`},description:{id:`qRZh7J`},scope:{id:`tiWX6q`},bindings:[{mac:`Shift Alt M`,windowsLinux:`Ctrl M`}]},{id:`source-lint-panel`,category:`source`,title:{id:`yvG-l1`},description:{id:`kCqCyf`},scope:{id:`tiWX6q`},bindings:[{mac:`⇧⌘ M`,windowsLinux:`Ctrl Shift M`}]},{id:`source-next-diagnostic`,category:`source`,title:{id:`M1OfV9`},description:{id:`ExPiRQ`},scope:{id:`tiWX6q`},bindings:[{mac:`F8`,windowsLinux:`F8`}]}],f=d,p=new Map(d.map(e=>[e.id,e]));function m(e){let t=p.get(e);if(!t)throw Error(`Unknown keyboard shortcut: ${e}`);return t}function h(){return c()?`mac`:`windowsLinux`}var g=[[/⌘/g,` Command `],[/⌥/g,` Option `],[/⇧/g,` Shift `],[/⌃/g,` Control `],[/↑/g,` Up Arrow `],[/↓/g,` Down Arrow `],[/←/g,` Left Arrow `],[/→/g,` Right Arrow `],[/\[/g,` Left Bracket `],[/\]/g,` Right Bracket `],[/,/g,` Comma `],[/\bCtrl\b/g,` Control `]];function _(e){return e.split(` / `).map(e=>g.reduce((e,[t,n])=>e.replace(t,n),e).replaceAll(/\s+/g,` `).trim()).join(` or `)}function v(e,t=h()){return t===`mac`?e.mac:e.windowsLinux}function y(e,t=h()){return _(v(e,t))}function b(e,t=h()){return v(m(e).bindings[0],t)}function x(e,t=h()){return y(m(e).bindings[0],t)}function S(e){if(!e||typeof e!=`object`)return!1;if(`isContentEditable`in e&&e.isContentEditable===!0)return!0;if(!(`tagName`in e))return!1;let t=String(e.tagName).toUpperCase();return t===`INPUT`||t===`TEXTAREA`}function C(e,t,n=h()){return m(t).bindings.some(t=>{let r=w(t.match,n);return r?E(e,r,n):!1})}function w(e,t){return e?T(e)?e:e[t]??null:null}function T(e){return`key`in e||`code`in e}function E(e,t,n){if(t.key&&e.key.toLowerCase()!==t.key.toLowerCase()||t.code&&e.code!==t.code)return!1;let r=t.metaKey??(t.mod?n===`mac`:!1),i=t.ctrlKey??(t.mod?n===`windowsLinux`:!1),a=t.altKey??!1,o=t.shiftKey??!1;return t.allowExtraModifiers?!(t.anyMod&&!e.metaKey&&!e.ctrlKey||r&&!e.metaKey||i&&!e.ctrlKey||a&&!e.altKey||o&&!e.shiftKey):(t.anyMod?e.metaKey||e.ctrlKey:e.metaKey===r&&e.ctrlKey===i)&&e.altKey===a&&(t.allowShiftKey||!!e.shiftKey===o)}var D=r(),O=n();function k(e){let t=(0,D.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`animate-pulse rounded-md bg-muted`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,O.jsx)(`div`,{"data-slot":`skeleton`,className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}var A=e(t(),1),j=`open-knowledge:lint-config-changed`;function M(){window.dispatchEvent(new CustomEvent(j))}function N(e){let t=()=>e();return window.addEventListener(j,t),()=>window.removeEventListener(j,t)}async function P(e){try{let t=e===void 0?``:`?doc=${encodeURIComponent(e)}`,n=await fetch(`/api/lint/config${t}`);if(!n.ok)return null;let r=await n.json().catch(()=>null),i=o.safeParse(r);return i.success?i.data:(console.warn(`[lint] lint-config response failed schema validation`,i.error.issues),null)}catch{return null}}async function F(e){return(await P(e))?.effective??null}async function I(e){try{let t=e?`?path=${encodeURIComponent(e)}`:``,n=await fetch(`/api/lint/audit${t}`);if(!n.ok)return null;let r=await n.json().catch(()=>null),i=s.safeParse(r);return i.success?i.data:(console.warn(`[lint] audit response failed schema validation`,i.error.issues),null)}catch{return null}}async function L(e){try{let t=await fetch(`/api/lint/fix`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({docName:e})});if(!t.ok){let e=await t.json().catch(()=>null);return{ok:!1,errorDetail:typeof e?.title==`string`?e.title:null}}let n=await t.json().catch(()=>null),r=a.safeParse(n);return r.success?{ok:!0,result:r.data}:(console.warn(`[lint] fix response failed schema validation`,r.error.issues),{ok:!1,errorDetail:null})}catch{return{ok:!1,errorDetail:null}}}async function R(e,t){try{let n=await fetch(`/api/lint/markdownlint-config`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ruleId:e,value:t})});if(!n.ok){let e=await n.json().catch(()=>null);return{ok:!1,errorDetail:typeof e?.title==`string`?e.title:null}}let r=await n.json().catch(()=>null),i=o.safeParse(r);return i.success?{ok:!0,response:i.data}:{ok:!1,errorDetail:null}}catch{return{ok:!1,errorDetail:null}}}function z(e){let t=(0,D.c)(5),[n,r]=(0,A.useState)(null),i,a;t[0]===e?(i=t[1],a=t[2]):(i=()=>{if(!e){r(null);return}let t=!1,n=()=>{P(e).then(e=>{t||r(e)})};n();let i=N(n);return()=>{t=!0,i()}},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,A.useEffect)(i,a);let o;return t[3]===n?o=t[4]:(o={data:n},t[3]=n,t[4]=o),o}function B(){let e=(0,D.c)(4),[t,n]=(0,A.useState)(null),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=!1,t=()=>{P().then(t=>{e||n(t)})};t();let r=N(t);return()=>{e=!0,r()}},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,A.useEffect)(r,i);let a;return e[2]===t?a=e[3]:(a={data:t},e[2]=t,e[3]=a),a}export{S as _,N as a,R as c,l as d,u as f,_ as g,x as h,I as i,k as l,v as m,F as n,z as o,b as p,L as r,B as s,M as t,f as u,C as v};
@@ -1 +1 @@
1
- import{D as e,Dr as t,Mr as n,Tr as r,_r as i,ar as a,ba as o,cr as s,qr as c,ur as l,ya as u}from"./dist-D--vIb9_.js";import{h as d}from"./doc-hash-BNPgzBjA.js";function f(e){return e.kind===`asset`}function p(e){return e.kind===`document`}function m(e){return e.kind===`folder`}function h(e){let t=[],n=0;for(let r of e)switch(r.kind){case`document`:if(r.docName===void 0){n+=1;break}t.push({kind:`document`,docName:r.docName,docExt:r.docExt,size:r.size,modified:r.modified,isSymlink:r.isSymlink,canonicalDocName:r.canonicalDocName,targetPath:r.targetPath});break;case`asset`:if(r.path===void 0||r.assetExt===void 0){n+=1;break}t.push({kind:`asset`,path:r.path,assetExt:r.assetExt,mediaKind:r.mediaKind??null,size:r.size,modified:r.modified,referencedBy:r.referencedBy});break;case`file`:if(r.path===void 0){n+=1;break}t.push({kind:`asset`,path:r.path,assetExt:r.assetExt??g(r.path),mediaKind:null,size:r.size,modified:r.modified,referencedBy:[]});break;case`folder`:if(r.path===void 0){n+=1;break}t.push({kind:`folder`,path:r.path,size:r.size,modified:r.modified,hasChildren:r.hasChildren,isSymlink:r.isSymlink,targetPath:r.targetPath});break;default:r.kind;break}return n>0&&console.warn(`[file-tree-utils] dropped ${n} listing entries missing variant identity fields`),t}function g(e){let t=e.includes(`/`)?e.split(`/`).pop()??e:e,n=t.lastIndexOf(`.`);return n>0&&n<t.length-1?t.slice(n+1).toLowerCase():t.startsWith(`.`)&&t.length>1?t.slice(1).toLowerCase():`file`}function _(e){if(!e)return[];let t=e.split(`/`).filter(Boolean),n=[];for(let e=1;e<t.length;e++)n.push(t.slice(0,e).join(`/`));return n}function v(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):``}function y(e){return e.split(`/`).some(e=>e.toLowerCase()===`.ok`)}function b(e,t){return t&&e!==`document`&&e!==`folder`}function x(e,t){return!t&&s(e)}function S(e,t={}){let{showHiddenFiles:n=!1,showOnlyMarkdownFiles:r=!1,showOkFolders:i=!1}=t;return e.filter(e=>{let t=e.docName??e.path??``;if(t===``||b(e.kind,r))return!1;let a=t.split(`/`),o=a.indexOf(`.ok`);if(o!==-1){if(!i)return!1;let e=a.slice(0,o).join(`/`);return n||e===``||!s(e)}return!x(t,n)})}function C(e,t={}){let{showHiddenFiles:n=!1,showOnlyMarkdownFiles:r=!1}=t,i=e.docName??e.path??``;return i===``||l(i)||y(i)?{hiddenFiles:!1,onlyMarkdownFiles:!1}:{hiddenFiles:x(i,n),onlyMarkdownFiles:b(e.kind,r)}}function w(e){let{visibility:t={},unfilteredRootEntryCount:n,knownPageCount:r}=e;return(n>0||r>0)&&(t.showOnlyMarkdownFiles??!1)?`filtered-to-zero`:`true-empty`}var T=null,E=new Set;function D(e,t){if(e===t)return!0;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function O(e,t){return e===null?!1:e===t?!0:D(e.pages,t.pages)&&D(e.folderPaths,t.folderPaths)&&D(e.assetPaths??new Set,t.assetPaths??new Set)&&D(e.filePaths??new Set,t.filePaths??new Set)&&k(e.pageIcons,t.pageIcons)}function k(e,t){if(e===t)return!0;let n=e?.size??0;if(n!==(t?.size??0))return!1;if(n===0)return!0;for(let[n,r]of e)if(t.get(n)!==r)return!1;return!0}function A(e,t){let n=new Map;for(let r of e){let e=t(r);e&&!n.has(e)&&n.set(e,r)}return n}function j(e,t){let n=new Map,r=[...e].sort((e,t)=>e.localeCompare(t));for(let e of r){let r=e.lastIndexOf(`/`),i=t(r===-1?e:e.slice(r+1));i&&!n.has(i)&&n.set(i,e)}return n}function M(e){let t=new Map;for(let[n,r]of e){let e=r.icon;typeof e==`string`&&e.trim()!==``&&t.set(n,e)}return t}function N(){return T}function P(e){if(!O(T,e)){T=e;for(let t of Array.from(E))try{t(e)}catch(e){console.error(`[page-list-cache] subscriber threw:`,e)}}}function F(e){if(E.add(e),T!==null)try{e(T)}catch(e){console.error(`[page-list-cache] subscriber threw on replay:`,e)}return()=>{E.delete(e)}}function I(e){let t=e.trim();return{normalizedTarget:t.replace(/^\.\/+/,``).replace(/^\/+/,``).replace(/\/+$/g,``),expectsFolder:/\/+$/.test(t)}}function L(e){return d(e).replace(/\/+$/g,``)}function R(e){let t=new Set;for(let n of e)for(let e of _(n))t.add(e);return t}function z(e,t){if(!t)return;let n=c(e);if(n)return t.get(n)}function B(e,t){if(!t||e.includes(`/`))return;let n=c(e);if(n)return t.get(n)}function V(e,t){return t?`${e}${t}`:(e.split(`/`).pop()??``).lastIndexOf(`.`)>0?e:`${e}.md`}function H(e,t){if(!y(e))return null;let n=i(e);if(n)return{kind:`doc`,target:n,docName:n};if(t.pages.has(e))return null;let r=V(e,t.docExt);return{kind:`asset`,target:r,assetPath:r,mediaKind:o(r.slice(r.lastIndexOf(`.`)+1))}}function U(e,a){if(l(e)){let i=r(e);if(i?.kind===`reference`){let e=`references/${i.rel}.md`;return{kind:`skill-file`,target:`global/${i.name}/${e}`,scope:`global`,name:i.name,path:e}}let a=t(e);if(a?.kind===`skill`&&a.scope===`project`){let e=n(a.name);return{kind:`doc`,target:e,docName:e}}return{kind:`doc`,target:e,docName:e}}let o=i(e);if(o)return{kind:`doc`,target:o,docName:o};let{normalizedTarget:s,expectsFolder:c}=I(e);if(!s)return{kind:`missing`,target:s};if(!c&&u(s))return{kind:`doc`,target:s,docName:s};let d=L(e);if(!c&&a.pages.has(s))return{kind:`doc`,target:s,docName:s};if(!c&&d!==s&&a.pages.has(d))return{kind:`doc`,target:d,docName:d};if(!c){let e=z(d,a.pagesBySlug);if(e)return{kind:`doc`,target:e,docName:e}}let f=`${d}/index`;if(a.pages.has(f))return{kind:`folder-index`,target:d,folderPath:d,docName:f,noteKind:`canonical-index`};let p=d.split(`/`).pop(),m=p?`${d}/${p}`:null;if(m&&a.pages.has(m))return{kind:`folder-index`,target:d,folderPath:d,docName:m,noteKind:`legacy-folder-note`};if(!c){let e=B(d,a.pagesByBasename);if(e)return{kind:`doc`,target:e,docName:e}}return(a.folderPaths??R(a.pages)).has(d)?{kind:`folder`,target:d,folderPath:d}:H(s,a)??{kind:`missing`,target:d||s}}function W(e){return e.kind===`folder-index`?{kind:`folder`,target:e.folderPath,folderPath:e.folderPath}:e}function G(t,n,r=e){return typeof n!=`number`||!a(n,r)?null:{kind:`large-file`,target:t,docName:t,size:n,limit:r}}function K(t,n,r=e){return t.kind!==`doc`&&t.kind!==`folder-index`?t:G(t.docName,n.get(t.docName)?.size,r)??t}function q(e){switch(e.kind){case`doc`:case`folder-index`:case`large-file`:return e.docName;case`missing`:return e.target;case`asset`:case`skill-file`:case`folder`:return null}}export{h as C,g as S,S as _,H as a,p as b,M as c,N as d,P as f,v as g,w as h,G as i,j as l,C as m,q as n,U as o,F as p,W as r,K as s,R as t,A as u,y as v,m as x,f as y};
1
+ import{D as e,Er as t,Jr as n,Nr as r,Or as i,ar as a,ba as o,cr as s,ur as c,vr as l,xa as u}from"./dist-DEmM8o04.js";import{h as d}from"./doc-hash-DBnfNiP9.js";function f(e){return e.kind===`asset`}function p(e){return e.kind===`document`}function m(e){return e.kind===`folder`}function h(e){let t=[],n=0;for(let r of e)switch(r.kind){case`document`:if(r.docName===void 0){n+=1;break}t.push({kind:`document`,docName:r.docName,docExt:r.docExt,size:r.size,modified:r.modified,isSymlink:r.isSymlink,canonicalDocName:r.canonicalDocName,targetPath:r.targetPath});break;case`asset`:if(r.path===void 0||r.assetExt===void 0){n+=1;break}t.push({kind:`asset`,path:r.path,assetExt:r.assetExt,mediaKind:r.mediaKind??null,size:r.size,modified:r.modified,referencedBy:r.referencedBy});break;case`file`:if(r.path===void 0){n+=1;break}t.push({kind:`asset`,path:r.path,assetExt:r.assetExt??g(r.path),mediaKind:null,size:r.size,modified:r.modified,referencedBy:[]});break;case`folder`:if(r.path===void 0){n+=1;break}t.push({kind:`folder`,path:r.path,size:r.size,modified:r.modified,hasChildren:r.hasChildren,isSymlink:r.isSymlink,targetPath:r.targetPath});break;default:r.kind;break}return n>0&&console.warn(`[file-tree-utils] dropped ${n} listing entries missing variant identity fields`),t}function g(e){let t=e.includes(`/`)?e.split(`/`).pop()??e:e,n=t.lastIndexOf(`.`);return n>0&&n<t.length-1?t.slice(n+1).toLowerCase():t.startsWith(`.`)&&t.length>1?t.slice(1).toLowerCase():`file`}function _(e){if(!e)return[];let t=e.split(`/`).filter(Boolean),n=[];for(let e=1;e<t.length;e++)n.push(t.slice(0,e).join(`/`));return n}function v(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):``}function y(e){return e.split(`/`).some(e=>e.toLowerCase()===`.ok`)}function b(e,t){return t&&e!==`document`&&e!==`folder`}function x(e,t){return!t&&s(e)}function S(e,t={}){let{showHiddenFiles:n=!1,showOnlyMarkdownFiles:r=!1,showOkFolders:i=!1}=t;return e.filter(e=>{let t=e.docName??e.path??``;if(t===``||b(e.kind,r))return!1;let a=t.split(`/`),o=a.indexOf(`.ok`);if(o!==-1){if(!i)return!1;let e=a.slice(0,o).join(`/`);return n||e===``||!s(e)}return!x(t,n)})}function C(e,t={}){let{showHiddenFiles:n=!1,showOnlyMarkdownFiles:r=!1}=t,i=e.docName??e.path??``;return i===``||c(i)||y(i)?{hiddenFiles:!1,onlyMarkdownFiles:!1}:{hiddenFiles:x(i,n),onlyMarkdownFiles:b(e.kind,r)}}function w(e){let{visibility:t={},unfilteredRootEntryCount:n,knownPageCount:r}=e;return(n>0||r>0)&&(t.showOnlyMarkdownFiles??!1)?`filtered-to-zero`:`true-empty`}var T=null,E=new Set;function D(e,t){if(e===t)return!0;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function O(e,t){return e===null?!1:e===t?!0:D(e.pages,t.pages)&&D(e.folderPaths,t.folderPaths)&&D(e.assetPaths??new Set,t.assetPaths??new Set)&&D(e.filePaths??new Set,t.filePaths??new Set)&&k(e.pageIcons,t.pageIcons)}function k(e,t){if(e===t)return!0;let n=e?.size??0;if(n!==(t?.size??0))return!1;if(n===0)return!0;for(let[n,r]of e)if(t.get(n)!==r)return!1;return!0}function A(e,t){let n=new Map;for(let r of e){let e=t(r);e&&!n.has(e)&&n.set(e,r)}return n}function j(e,t){let n=new Map,r=[...e].sort((e,t)=>e.localeCompare(t));for(let e of r){let r=e.lastIndexOf(`/`),i=t(r===-1?e:e.slice(r+1));i&&!n.has(i)&&n.set(i,e)}return n}function M(e){let t=new Map;for(let[n,r]of e){let e=r.icon;typeof e==`string`&&e.trim()!==``&&t.set(n,e)}return t}function N(){return T}function P(e){if(!O(T,e)){T=e;for(let t of Array.from(E))try{t(e)}catch(e){console.error(`[page-list-cache] subscriber threw:`,e)}}}function F(e){if(E.add(e),T!==null)try{e(T)}catch(e){console.error(`[page-list-cache] subscriber threw on replay:`,e)}return()=>{E.delete(e)}}function I(e){let t=e.trim();return{normalizedTarget:t.replace(/^\.\/+/,``).replace(/^\/+/,``).replace(/\/+$/g,``),expectsFolder:/\/+$/.test(t)}}function L(e){return d(e).replace(/\/+$/g,``)}function R(e){let t=new Set;for(let n of e)for(let e of _(n))t.add(e);return t}function z(e,t){if(!t)return;let r=n(e);if(r)return t.get(r)}function B(e,t){if(!t||e.includes(`/`))return;let r=n(e);if(r)return t.get(r)}function V(e,t){return t?`${e}${t}`:(e.split(`/`).pop()??``).lastIndexOf(`.`)>0?e:`${e}.md`}function H(e,t){if(!y(e))return null;let n=l(e);if(n)return{kind:`doc`,target:n,docName:n};if(t.pages.has(e))return null;let r=V(e,t.docExt);return{kind:`asset`,target:r,assetPath:r,mediaKind:u(r.slice(r.lastIndexOf(`.`)+1))}}function U(e,n){if(c(e)){let n=t(e);if(n?.kind===`reference`){let e=`references/${n.rel}.md`;return{kind:`skill-file`,target:`global/${n.name}/${e}`,scope:`global`,name:n.name,path:e}}let a=i(e);if(a?.kind===`skill`&&a.scope===`project`){let e=r(a.name);return{kind:`doc`,target:e,docName:e}}return{kind:`doc`,target:e,docName:e}}let a=l(e);if(a)return{kind:`doc`,target:a,docName:a};let{normalizedTarget:s,expectsFolder:u}=I(e);if(!s)return{kind:`missing`,target:s};if(!u&&o(s))return{kind:`doc`,target:s,docName:s};let d=L(e);if(!u&&n.pages.has(s))return{kind:`doc`,target:s,docName:s};if(!u&&d!==s&&n.pages.has(d))return{kind:`doc`,target:d,docName:d};if(!u){let e=z(d,n.pagesBySlug);if(e)return{kind:`doc`,target:e,docName:e}}let f=`${d}/index`;if(n.pages.has(f))return{kind:`folder-index`,target:d,folderPath:d,docName:f,noteKind:`canonical-index`};let p=d.split(`/`).pop(),m=p?`${d}/${p}`:null;if(m&&n.pages.has(m))return{kind:`folder-index`,target:d,folderPath:d,docName:m,noteKind:`legacy-folder-note`};if(!u){let e=B(d,n.pagesByBasename);if(e)return{kind:`doc`,target:e,docName:e}}return(n.folderPaths??R(n.pages)).has(d)?{kind:`folder`,target:d,folderPath:d}:H(s,n)??{kind:`missing`,target:d||s}}function W(e){return e.kind===`folder-index`?{kind:`folder`,target:e.folderPath,folderPath:e.folderPath}:e}function G(t,n,r=e){return typeof n!=`number`||!a(n,r)?null:{kind:`large-file`,target:t,docName:t,size:n,limit:r}}function K(t,n,r=e){return t.kind!==`doc`&&t.kind!==`folder-index`?t:G(t.docName,n.get(t.docName)?.size,r)??t}function q(e){switch(e.kind){case`doc`:case`folder-index`:case`large-file`:return e.docName;case`missing`:return e.target;case`asset`:case`skill-file`:case`folder`:return null}}export{h as C,g as S,S as _,H as a,p as b,M as c,N as d,P as f,v as g,w as h,G as i,j as l,C as m,q as n,U as o,F as p,W as r,K as s,R as t,A as u,y as v,m as x,f as y};
@@ -1,4 +1,4 @@
1
- import{i as e}from"./chunk-DseTPa7n.js";import{n as t}from"./compiler-runtime-DrcePeIl.js";import{t as n}from"./react-dom-CMNLH3L-.js";import{t as r}from"./createLucideIcon-Wgamzz8_.js";import{t as i}from"./parse-api-error-DfesE4Y7.js";import{i as a}from"./documents-events-BOt1_9Hf.js";import{l as o,s}from"./doc-hash-BNPgzBjA.js";var c=r(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),l=e(n()),u=e(t());function d(){var e=[...arguments];return(0,u.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var f=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function p(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function m(e){return`nodeType`in e}function h(e){return e?p(e)?e:m(e)?e.ownerDocument?.defaultView??window:window:window}function g(e){let{Document:t}=h(e);return e instanceof t}function _(e){return p(e)?!1:e instanceof h(e).HTMLElement}function v(e){return e instanceof h(e).SVGElement}function y(e){return e?p(e)?e.document:m(e)?g(e)?e:_(e)||v(e)?e.ownerDocument:document:document:document}var b=f?u.useLayoutEffect:u.useEffect;function x(e){let t=(0,u.useRef)(e);return b(()=>{t.current=e}),(0,u.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function S(){let e=(0,u.useRef)(null);return[(0,u.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,u.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function C(e,t){t===void 0&&(t=[e]);let n=(0,u.useRef)(e);return b(()=>{n.current!==e&&(n.current=e)},t),n}function w(e,t){let n=(0,u.useRef)();return(0,u.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function T(e){let t=x(e),n=(0,u.useRef)(null);return[n,(0,u.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function E(e){let t=(0,u.useRef)();return(0,u.useEffect)(()=>{t.current=e},[e]),t.current}var D={};function O(e,t){return(0,u.useMemo)(()=>{if(t)return t;let n=D[e]==null?0:D[e]+1;return D[e]=n,e+`-`+n},[e,t])}function k(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var ee=k(1),A=k(-1);function te(e){return`clientX`in e&&`clientY`in e}function ne(e){if(!e)return!1;let{KeyboardEvent:t}=h(e.target);return t&&e instanceof t}function j(e){if(!e)return!1;let{TouchEvent:t}=h(e.target);return t&&e instanceof t}function re(e){if(j(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return te(e)?{x:e.clientX,y:e.clientY}:null}var M=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[M.Translate.toString(e),M.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),N=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function ie(e){return e.matches(N)?e:e.querySelector(N)}var ae={display:`none`};function P(e){let{id:t,value:n}=e;return u.createElement(`div`,{id:t,style:ae},n)}function F(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return u.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function I(){let[e,t]=(0,u.useState)(``);return{announce:(0,u.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var oe=(0,u.createContext)(null);function se(e){let t=(0,u.useContext)(oe);(0,u.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function ce(){let[e]=(0,u.useState)(()=>new Set),t=(0,u.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,u.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var L={draggable:`
1
+ import{i as e}from"./chunk-DseTPa7n.js";import{n as t}from"./compiler-runtime-DrcePeIl.js";import{t as n}from"./react-dom-CMNLH3L-.js";import{t as r}from"./createLucideIcon-Wgamzz8_.js";import{t as i}from"./parse-api-error-DfesE4Y7.js";import{i as a}from"./documents-events-Ynxz3YVq.js";import{l as o,s}from"./doc-hash-DBnfNiP9.js";var c=r(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),l=e(n()),u=e(t());function d(){var e=[...arguments];return(0,u.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var f=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function p(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function m(e){return`nodeType`in e}function h(e){return e?p(e)?e:m(e)?e.ownerDocument?.defaultView??window:window:window}function g(e){let{Document:t}=h(e);return e instanceof t}function _(e){return p(e)?!1:e instanceof h(e).HTMLElement}function v(e){return e instanceof h(e).SVGElement}function y(e){return e?p(e)?e.document:m(e)?g(e)?e:_(e)||v(e)?e.ownerDocument:document:document:document}var b=f?u.useLayoutEffect:u.useEffect;function x(e){let t=(0,u.useRef)(e);return b(()=>{t.current=e}),(0,u.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function S(){let e=(0,u.useRef)(null);return[(0,u.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,u.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function C(e,t){t===void 0&&(t=[e]);let n=(0,u.useRef)(e);return b(()=>{n.current!==e&&(n.current=e)},t),n}function w(e,t){let n=(0,u.useRef)();return(0,u.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function T(e){let t=x(e),n=(0,u.useRef)(null);return[n,(0,u.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function E(e){let t=(0,u.useRef)();return(0,u.useEffect)(()=>{t.current=e},[e]),t.current}var D={};function O(e,t){return(0,u.useMemo)(()=>{if(t)return t;let n=D[e]==null?0:D[e]+1;return D[e]=n,e+`-`+n},[e,t])}function k(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var ee=k(1),A=k(-1);function te(e){return`clientX`in e&&`clientY`in e}function ne(e){if(!e)return!1;let{KeyboardEvent:t}=h(e.target);return t&&e instanceof t}function j(e){if(!e)return!1;let{TouchEvent:t}=h(e.target);return t&&e instanceof t}function re(e){if(j(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return te(e)?{x:e.clientX,y:e.clientY}:null}var M=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[M.Translate.toString(e),M.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),N=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function ie(e){return e.matches(N)?e:e.querySelector(N)}var ae={display:`none`};function P(e){let{id:t,value:n}=e;return u.createElement(`div`,{id:t,style:ae},n)}function F(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return u.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function I(){let[e,t]=(0,u.useState)(``);return{announce:(0,u.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var oe=(0,u.createContext)(null);function se(e){let t=(0,u.useContext)(oe);(0,u.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function ce(){let[e]=(0,u.useState)(()=>new Set),t=(0,u.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,u.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var L={draggable:`
2
2
  To pick up a draggable item, press the space bar.
3
3
  While dragging, use the arrow keys to move the item.
4
4
  Press space again to drop the item in its new position, or press escape to cancel.
@@ -1 +1 @@
1
- import{i as e}from"./chunk-DseTPa7n.js";import{n as t,r as n,t as r}from"./compiler-runtime-DrcePeIl.js";import{n as i,r as a}from"./dist-CSDjUb5q.js";import{n as o,t as s}from"./createLucideIcon-Wgamzz8_.js";import{a as c,c as l,n as u,r as d,t as f}from"./EnableSyncConfirmDialog-YbXwL0lV.js";import{t as p}from"./arrow-up-right-BnJZWj8r.js";import{t as m}from"./check-BJRSVBAg.js";import{t as h}from"./folder-open-ygPcz1xa.js";import{t as g}from"./info-CVuSDi5Y.js";import{t as _}from"./loader-circle-BrJhrTc7.js";import{n as v}from"./miss-dialog-store-b0Uwu1ZT.js";import{t as y}from"./refresh-cw-DgVrChIu.js";import{t as b}from"./triangle-alert-BaZPlVka.js";import{h as x,r as S,u as C}from"./doc-hash-BNPgzBjA.js";import{t as w}from"./external-link-BUoZ56id.js";var T=s(`arrow-down-to-line`,[[`path`,{d:`M12 17V3`,key:`1cwfxf`}],[`path`,{d:`m6 11 6 6 6-6`,key:`12ii2o`}],[`path`,{d:`M19 21H5`,key:`150jfl`}]]),E=s(`file-pen`,[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]]),D=s(`file-question-mark`,[[`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:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3`,key:`mhlwft`}]]),O=s(`file-x-corner`,[[`path`,{d:`M11 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5`,key:`1jo35a`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m15 17 5 5`,key:`36xl1x`}],[`path`,{d:`m20 17-5 5`,key:`vdz27y`}]]),k=r(),A=e(t(),1),j=n(),M=`https://git-scm.com/docs/git-push`;function N(e,t){return!(e!==`stale`&&e!==`absent`||e===`stale`&&t?.syncEnabled===!0)}function P(e){return e?e.state!==`dormant`&&e.state!==`disabled`&&e.state!==`auth-error`&&e.state!==`conflict`:!1}function F(e){let t=(0,k.c)(47),{freshness:n,status:r,kind:s}=e,{_:l}=a(),{confirmOpen:h,setConfirmOpen:_,onToggleRequest:v,onConfirm:x}=d(c()),[S,C]=(0,A.useState)(`idle`),w=(0,A.useRef)(null),T,E;if(t[0]!==r||t[1]!==S?(T=()=>{if(!(S!==`pending`||!r)){if(r.pushError||r.pushErrorCode){C(`idle`);return}(r.lastSyncUtc??null)!==w.current&&C(`synced`)}},E=[S,r],t[0]=r,t[1]=S,t[2]=T,t[3]=E):(T=t[2],E=t[3]),(0,A.useEffect)(T,E),!N(n,r))return null;if(S===`synced`){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-dashed border-border bg-muted/40 p-2 text-xs text-muted-foreground`,"data-testid":`share-freshness-row`,children:[(0,j.jsx)(m,{className:`mt-0.5 size-3.5 shrink-0`,"aria-hidden":`true`}),(0,j.jsx)(`span`,{children:(0,j.jsx)(i,{id:`fxbCNQ`})})]}),t[4]=e):e=t[4],e}let D=r?.syncEnabled===!0,O=r?.pushPermission?.checkStatus===`denied`,F=!!(r?.pushError||r?.pushErrorCode),R=O||F,z=n===`absent`&&!D,B;if(n===`absent`&&!D){let e;t[5]!==l||t[6]!==s?(e=l(s===`folder`?{id:`PrJYSN`}:{id:`3BnyYc`}),t[5]=l,t[6]=s,t[7]=e):e=t[7],B=e}else if(n===`stale`){let e;t[8]!==l||t[9]!==s?(e=l(s===`folder`?{id:`Gt4gOO`}:{id:`2IYGkU`}),t[8]=l,t[9]=s,t[10]=e):e=t[10],B=e}else{let e;t[11]!==l||t[12]!==s?(e=l(s===`folder`?{id:`nqV0Kk`}:{id:`gwykHF`}),t[11]=l,t[12]=s,t[13]=e):e=t[13],B=e}let V;t[14]!==l||t[15]!==F||t[16]!==O?(V=O?l({id:`9OIqw4`}):F?l({id:`K6MQQk`}):null,t[14]=l,t[15]=F,t[16]=O,t[17]=V):V=t[17];let H=V,U;t[18]===r?.lastSyncUtc?U=t[19]:(U=()=>{w.current=r?.lastSyncUtc??null,C(`pending`),u(`sync`).catch(e=>{console.warn(`[share-freshness] sync trigger failed`,e instanceof Error?e.message:e),C(`idle`)})},t[18]=r?.lastSyncUtc,t[19]=U);let W=U,G=z?b:g,K;t[20]===G?K=t[21]:(K=(0,j.jsx)(G,{className:`mt-0.5 size-3.5 shrink-0`,"aria-hidden":`true`}),t[20]=G,t[21]=K);let q;t[22]===B?q=t[23]:(q=(0,j.jsx)(`span`,{children:B}),t[22]=B,t[23]=q);let J;t[24]===H?J=t[25]:(J=H?(0,j.jsx)(`span`,{children:H}):null,t[24]=H,t[25]=J);let Y;t[26]!==R||t[27]!==W||t[28]!==v||t[29]!==r||t[30]!==D||t[31]!==S?(Y=R?null:D?P(r)?(0,j.jsx)(`div`,{children:S===`pending`?(0,j.jsxs)(o,{variant:`outline`,size:`xs`,disabled:!0,children:[(0,j.jsx)(y,{className:`size-3 shrink-0 animate-spin`,"aria-hidden":`true`}),(0,j.jsx)(i,{id:`EHu0x2`})]}):(0,j.jsx)(o,{variant:`outline`,size:`xs`,onClick:W,children:(0,j.jsx)(i,{id:`lb_UU4`})})}):null:(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1.5`,children:[(0,j.jsx)(o,{variant:`outline`,size:`xs`,onClick:()=>v(!0),children:(0,j.jsx)(i,{id:`XU0OXn`})}),(0,j.jsxs)(`a`,{href:M,target:`_blank`,rel:`noopener noreferrer`,onClick:L,onAuxClick:I,className:`inline-flex items-center gap-1 transition-colors hover:text-primary`,children:[(0,j.jsx)(i,{id:`GLxIKR`}),(0,j.jsx)(p,{className:`size-3 shrink-0`,"aria-hidden":`true`})]})]}),t[26]=R,t[27]=W,t[28]=v,t[29]=r,t[30]=D,t[31]=S,t[32]=Y):Y=t[32];let X;t[33]!==q||t[34]!==J||t[35]!==Y?(X=(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[q,J,Y]}),t[33]=q,t[34]=J,t[35]=Y,t[36]=X):X=t[36];let Z;t[37]!==K||t[38]!==X?(Z=(0,j.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-dashed border-border bg-muted/40 p-2 text-xs text-muted-foreground`,"data-testid":`share-freshness-row`,children:[K,X]}),t[37]=K,t[38]=X,t[39]=Z):Z=t[39];let Q;t[40]!==h||t[41]!==x||t[42]!==_?(Q=(0,j.jsx)(f,{open:h,onOpenChange:_,onConfirm:x}),t[40]=h,t[41]=x,t[42]=_,t[43]=Q):Q=t[43];let $;return t[44]!==Z||t[45]!==Q?($=(0,j.jsxs)(j.Fragment,{children:[Z,Q]}),t[44]=Z,t[45]=Q,t[46]=$):$=t[46],$}function I(e){return w(e,M)}function L(e){return w(e,M)}function R(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function z(e){let t=(0,k.c)(13),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={phase:`pending`},t[0]=n):n=t[0];let[r,i]=(0,A.useState)(n),[a,o]=(0,A.useState)(0),s=e.branch,c;t[1]!==s||t[2]!==e.kind||t[3]!==e.path?(c=()=>{let t=window.okDesktop??null;if(!t||s===null){i({phase:`resolved`,resolution:{verdict:`unknown`}});return}let n=!1;return t.project.fetchTargetStatus({projectPath:t.config.projectPath,branch:s,path:e.path,kind:e.kind}).then(e=>{n||i({phase:`resolved`,resolution:e??{verdict:`unknown`}})}).catch(e=>{n||(console.warn(`[receive] miss target-status fetch failed`,e instanceof Error?e.message:e),i({phase:`resolved`,resolution:{verdict:`unknown`}}))}),()=>{n=!0}},t[1]=s,t[2]=e.kind,t[3]=e.path,t[4]=c):c=t[4];let l;t[5]!==s||t[6]!==a||t[7]!==e.kind||t[8]!==e.path?(l=[s,e.kind,e.path,a],t[5]=s,t[6]=a,t[7]=e.kind,t[8]=e.path,t[9]=l):l=t[9],(0,A.useEffect)(c,l);let u;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>{i({phase:`pending`}),o(B)},t[10]=u):u=t[10];let d;return t[11]===r?d=t[12]:(d={state:r,refetch:u},t[11]=r,t[12]=d),d}function B(e){return e+1}function V(e){let t=(0,k.c)(15),{onEnabled:n}=e,r=c(),a;t[0]===n?a=t[1]:(a={onEnabled:n},t[0]=n,t[1]=a);let{confirmOpen:s,setConfirmOpen:l,onToggleRequest:u,onConfirm:p}=d(r,a),m;t[2]===u?m=t[3]:(m=()=>u(!0),t[2]=u,t[3]=m);let h,g;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,j.jsx)(y,{className:`size-4`,"aria-hidden":`true`}),g=(0,j.jsx)(i,{id:`XU0OXn`}),t[4]=h,t[5]=g):(h=t[4],g=t[5]);let _;t[6]===m?_=t[7]:(_=(0,j.jsxs)(o,{onClick:m,"data-testid":`share-receive-miss-enable-sync`,children:[h,g]}),t[6]=m,t[7]=_);let v;t[8]!==s||t[9]!==p||t[10]!==l?(v=(0,j.jsx)(f,{open:s,onOpenChange:l,onConfirm:p}),t[8]=s,t[9]=p,t[10]=l,t[11]=v):v=t[11];let b;return t[12]!==_||t[13]!==v?(b=(0,j.jsxs)(j.Fragment,{children:[_,v]}),t[12]=_,t[13]=v,t[14]=b):b=t[14],b}function H(e){let t=(0,k.c)(15),{status:n,onSyncCompleted:r}=e,[a,s]=(0,A.useState)(!1),c=(0,A.useRef)(null),l;t[0]!==r||t[1]!==a||t[2]!==n.lastSyncUtc||t[3]!==n.pushError||t[4]!==n.pushErrorCode?(l=()=>{if(a){if(n.pushError||n.pushErrorCode){s(!1);return}(n.lastSyncUtc??null)!==c.current&&(s(!1),r?.())}},t[0]=r,t[1]=a,t[2]=n.lastSyncUtc,t[3]=n.pushError,t[4]=n.pushErrorCode,t[5]=l):l=t[5];let d;t[6]!==r||t[7]!==a||t[8]!==n?(d=[a,n,r],t[6]=r,t[7]=a,t[8]=n,t[9]=d):d=t[9],(0,A.useEffect)(l,d);let f;t[10]===n.lastSyncUtc?f=t[11]:(f=()=>{c.current=n.lastSyncUtc??null,s(!0),u(`sync`).catch(e=>{console.warn(`[receive] miss sync trigger failed`,e instanceof Error?e.message:e),s(!1)})},t[10]=n.lastSyncUtc,t[11]=f);let p=f,m;return t[12]!==p||t[13]!==a?(m=a?(0,j.jsxs)(o,{disabled:!0,"data-testid":`share-receive-miss-sync-now`,children:[(0,j.jsx)(y,{className:`size-4 animate-spin`,"aria-hidden":`true`}),(0,j.jsx)(i,{id:`EHu0x2`})]}):(0,j.jsxs)(o,{onClick:p,"data-testid":`share-receive-miss-sync-now`,children:[(0,j.jsx)(y,{className:`size-4`,"aria-hidden":`true`}),(0,j.jsx)(i,{id:`lb_UU4`})]}),t[12]=p,t[13]=a,t[14]=m):m=t[14],m}function U(e){let t=(0,k.c)(67),{nav:n,state:r,onBrowseFolder:s,onOpenRenamed:c,onEnableAutoSync:u,onSyncCompleted:d}=e,{_:f}=a(),p=l(),m=n.branch,g;t[0]!==f||t[1]!==n.kind?(g=n.kind===`folder`?f({id:`ugoTXs`}):f({id:`XH30C4`}),t[0]=f,t[1]=n.kind,t[2]=g):g=t[2];let y=g;if(r.phase===`pending`){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(_,{className:`size-5 animate-spin`,"aria-hidden":`true`}),(0,j.jsx)(i,{id:`c8jBgX`})]}),t[3]=e):e=t[3],e}let{resolution:b}=r,x,S;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,j.jsx)(h,{className:`size-4`,"aria-hidden":`true`}),S=(0,j.jsx)(i,{id:`hItdtk`}),t[4]=x,t[5]=S):(x=t[4],S=t[5]);let C;t[6]===s?C=t[7]:(C=(0,j.jsxs)(o,{variant:`outline`,onClick:s,"data-testid":`share-receive-miss-browse`,children:[x,S]}),t[6]=s,t[7]=C);let w=C,A,M,N;if(b.verdict===`renamed`){let e;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsx)(v,{className:`size-9`,"aria-hidden":`true`}),t[8]=e):e=t[8],A=e;let n;t[9]!==b.renamedTo||t[10]!==y?(n={0:b.renamedTo,targetNoun:y},t[9]=b.renamedTo,t[10]=y,t[11]=n):n=t[11];let r;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(r={0:(0,j.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})},t[12]=r):r=t[12];let a;t[13]===n?a=t[14]:(a=(0,j.jsx)(i,{id:`P0HC30`,values:n,components:r}),t[13]=n,t[14]=a),M=a;let s;t[15]!==c||t[16]!==b.renamedTo?(s=()=>c(b.renamedTo),t[15]=c,t[16]=b.renamedTo,t[17]=s):s=t[17];let l,u;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,j.jsx)(v,{className:`size-4`,"aria-hidden":`true`}),u=(0,j.jsx)(i,{id:`AItsE5`}),t[18]=l,t[19]=u):(l=t[18],u=t[19]);let d;t[20]===s?d=t[21]:(d=(0,j.jsxs)(o,{onClick:s,"data-testid":`share-receive-miss-open-renamed`,children:[l,u]}),t[20]=s,t[21]=d);let f;t[22]!==w||t[23]!==d?(f=(0,j.jsxs)(j.Fragment,{children:[d,w]}),t[22]=w,t[23]=d,t[24]=f):f=t[24],N=f}else if(b.verdict===`deleted`){let e;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsx)(O,{className:`size-9`,"aria-hidden":`true`}),t[25]=e):e=t[25],A=e;let n;t[26]!==m||t[27]!==y?(n={targetNoun:y,branch:m},t[26]=m,t[27]=y,t[28]=n):n=t[28];let r;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(r={0:(0,j.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})},t[29]=r):r=t[29];let a;t[30]===n?a=t[31]:(a=(0,j.jsx)(i,{id:`kpqWwG`,values:n,components:r}),t[30]=n,t[31]=a),M=a,N=w}else if(b.verdict===`never-on-branch`){let e;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsx)(D,{className:`size-9`,"aria-hidden":`true`}),t[32]=e):e=t[32],A=e;let n;t[33]!==m||t[34]!==y?(n={targetNoun:y,branch:m},t[33]=m,t[34]=y,t[35]=n):n=t[35];let r;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(r={0:(0,j.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})},t[36]=r):r=t[36];let a;t[37]===n?a=t[38]:(a=(0,j.jsx)(i,{id:`i9TPUi`,values:n,components:r}),t[37]=n,t[38]=a),M=a,N=w}else if(b.verdict===`changed-locally`){let e;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsx)(E,{className:`size-9`,"aria-hidden":`true`}),t[39]=e):e=t[39],A=e;let n=p?.syncEnabled===!0,r=p?.pushPermission?.checkStatus===`denied`||!!(p?.pushError||p?.pushErrorCode);if(n){let e;t[40]!==m||t[41]!==y?(e=m===null?(0,j.jsx)(i,{id:`RyIKxy`,values:{targetNoun:y}}):(0,j.jsx)(i,{id:`l6kpzR`,values:{targetNoun:y,branch:m},components:{0:(0,j.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}}),t[40]=m,t[41]=y,t[42]=e):e=t[42],M=e}else{let e;t[43]!==m||t[44]!==y?(e=m===null?(0,j.jsx)(i,{id:`UuYo7g`,values:{targetNoun:y}}):(0,j.jsx)(i,{id:`HoWElC`,values:{targetNoun:y,branch:m},components:{0:(0,j.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}}),t[43]=m,t[44]=y,t[45]=e):e=t[45],M=e}let a=null;if(p?.syncEnabled){if(P(p)&&!r){let e;t[46]!==d||t[47]!==p?(e=(0,j.jsx)(H,{status:p,onSyncCompleted:d}),t[46]=d,t[47]=p,t[48]=e):e=t[48],a=e}}else if(p!==null){let e;t[49]===u?e=t[50]:(e=(0,j.jsx)(V,{onEnabled:u}),t[49]=u,t[50]=e),a=e}let o;t[51]!==w||t[52]!==a?(o=(0,j.jsxs)(j.Fragment,{children:[a,w]}),t[51]=w,t[52]=a,t[53]=o):o=t[53],N=o}else{let e;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsx)(T,{className:`size-9`,"aria-hidden":`true`}),t[54]=e):e=t[54],A=e;let n;t[55]===m?n=t[56]:(n=m===null?(0,j.jsx)(i,{id:`Xewl6B`}):(0,j.jsx)(i,{id:`d1JjXo`,values:{branch:m},components:{0:(0,j.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}}),t[55]=m,t[56]=n),M=n,N=w}let F;t[57]===A?F=t[58]:(F=(0,j.jsx)(`div`,{className:`flex size-16 items-center justify-center rounded-full border bg-muted/40 text-muted-foreground`,children:A}),t[57]=A,t[58]=F);let I;t[59]===M?I=t[60]:(I=(0,j.jsx)(`p`,{className:`max-w-md text-balance text-base leading-6 text-foreground/90`,children:M}),t[59]=M,t[60]=I);let L;t[61]===N?L=t[62]:(L=(0,j.jsx)(`div`,{className:`flex flex-col-reverse gap-2 sm:flex-row`,children:N}),t[61]=N,t[62]=L);let R;return t[63]!==F||t[64]!==I||t[65]!==L?(R=(0,j.jsxs)(j.Fragment,{children:[F,I,L]}),t[63]=F,t[64]=I,t[65]=L,t[66]=R):R=t[66],R}function W(e){return e.replace(/^\/+|\/+$/g,``)}function G(e,t){if(t.kind===`folder`){if(C(e))return W(t.path)===``;let n=S(e);return n!==null&&W(n)===W(t.path)}let n=S(e);return n===null?!1:x(n)===x(t.path)}function K(){let e=null,t=new Set,n=!1;function r(){for(let e of t)e()}function i(t){e!==t&&(e=t,r())}function a(){e!==null&&(G(window.location.hash,e)||i(null))}function o(){n||typeof window>`u`||(n=!0,window.addEventListener(`hashchange`,a))}return{arm(e){o(),i(e)},clear(){i(null)},getSnapshot(){return e},subscribe(e){return t.add(e),()=>{t.delete(e)}},dispose(){n&&typeof window<`u`&&(window.removeEventListener(`hashchange`,a),n=!1),i(null)}}}var q=K();function J(e,t){return e===null||e.kind!==`missing`||t===null||x(t.path)!==e.target?null:t}export{z as a,T as c,R as i,q as n,F as o,U as r,N as s,J as t};
1
+ import{i as e}from"./chunk-DseTPa7n.js";import{n as t,r as n,t as r}from"./compiler-runtime-DrcePeIl.js";import{n as i,r as a}from"./dist-CSDjUb5q.js";import{n as o,t as s}from"./createLucideIcon-Wgamzz8_.js";import{a as c,c as l,n as u,r as d,t as f}from"./EnableSyncConfirmDialog-N6XcDLKE.js";import{t as p}from"./arrow-up-right-BnJZWj8r.js";import{t as m}from"./check-BJRSVBAg.js";import{t as h}from"./folder-open-ygPcz1xa.js";import{t as g}from"./info-CVuSDi5Y.js";import{t as _}from"./loader-circle-BrJhrTc7.js";import{n as v}from"./miss-dialog-store-b0Uwu1ZT.js";import{t as y}from"./refresh-cw-DgVrChIu.js";import{t as b}from"./triangle-alert-BaZPlVka.js";import{h as x,r as S,u as C}from"./doc-hash-DBnfNiP9.js";import{t as w}from"./external-link-BUoZ56id.js";var T=s(`arrow-down-to-line`,[[`path`,{d:`M12 17V3`,key:`1cwfxf`}],[`path`,{d:`m6 11 6 6 6-6`,key:`12ii2o`}],[`path`,{d:`M19 21H5`,key:`150jfl`}]]),E=s(`file-pen`,[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]]),D=s(`file-question-mark`,[[`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:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3`,key:`mhlwft`}]]),O=s(`file-x-corner`,[[`path`,{d:`M11 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5`,key:`1jo35a`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m15 17 5 5`,key:`36xl1x`}],[`path`,{d:`m20 17-5 5`,key:`vdz27y`}]]),k=r(),A=e(t(),1),j=n(),M=`https://git-scm.com/docs/git-push`;function N(e,t){return!(e!==`stale`&&e!==`absent`||e===`stale`&&t?.syncEnabled===!0)}function P(e){return e?e.state!==`dormant`&&e.state!==`disabled`&&e.state!==`auth-error`&&e.state!==`conflict`:!1}function F(e){let t=(0,k.c)(47),{freshness:n,status:r,kind:s}=e,{_:l}=a(),{confirmOpen:h,setConfirmOpen:_,onToggleRequest:v,onConfirm:x}=d(c()),[S,C]=(0,A.useState)(`idle`),w=(0,A.useRef)(null),T,E;if(t[0]!==r||t[1]!==S?(T=()=>{if(!(S!==`pending`||!r)){if(r.pushError||r.pushErrorCode){C(`idle`);return}(r.lastSyncUtc??null)!==w.current&&C(`synced`)}},E=[S,r],t[0]=r,t[1]=S,t[2]=T,t[3]=E):(T=t[2],E=t[3]),(0,A.useEffect)(T,E),!N(n,r))return null;if(S===`synced`){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-dashed border-border bg-muted/40 p-2 text-xs text-muted-foreground`,"data-testid":`share-freshness-row`,children:[(0,j.jsx)(m,{className:`mt-0.5 size-3.5 shrink-0`,"aria-hidden":`true`}),(0,j.jsx)(`span`,{children:(0,j.jsx)(i,{id:`fxbCNQ`})})]}),t[4]=e):e=t[4],e}let D=r?.syncEnabled===!0,O=r?.pushPermission?.checkStatus===`denied`,F=!!(r?.pushError||r?.pushErrorCode),R=O||F,z=n===`absent`&&!D,B;if(n===`absent`&&!D){let e;t[5]!==l||t[6]!==s?(e=l(s===`folder`?{id:`PrJYSN`}:{id:`3BnyYc`}),t[5]=l,t[6]=s,t[7]=e):e=t[7],B=e}else if(n===`stale`){let e;t[8]!==l||t[9]!==s?(e=l(s===`folder`?{id:`Gt4gOO`}:{id:`2IYGkU`}),t[8]=l,t[9]=s,t[10]=e):e=t[10],B=e}else{let e;t[11]!==l||t[12]!==s?(e=l(s===`folder`?{id:`nqV0Kk`}:{id:`gwykHF`}),t[11]=l,t[12]=s,t[13]=e):e=t[13],B=e}let V;t[14]!==l||t[15]!==F||t[16]!==O?(V=O?l({id:`9OIqw4`}):F?l({id:`K6MQQk`}):null,t[14]=l,t[15]=F,t[16]=O,t[17]=V):V=t[17];let H=V,U;t[18]===r?.lastSyncUtc?U=t[19]:(U=()=>{w.current=r?.lastSyncUtc??null,C(`pending`),u(`sync`).catch(e=>{console.warn(`[share-freshness] sync trigger failed`,e instanceof Error?e.message:e),C(`idle`)})},t[18]=r?.lastSyncUtc,t[19]=U);let W=U,G=z?b:g,K;t[20]===G?K=t[21]:(K=(0,j.jsx)(G,{className:`mt-0.5 size-3.5 shrink-0`,"aria-hidden":`true`}),t[20]=G,t[21]=K);let q;t[22]===B?q=t[23]:(q=(0,j.jsx)(`span`,{children:B}),t[22]=B,t[23]=q);let J;t[24]===H?J=t[25]:(J=H?(0,j.jsx)(`span`,{children:H}):null,t[24]=H,t[25]=J);let Y;t[26]!==R||t[27]!==W||t[28]!==v||t[29]!==r||t[30]!==D||t[31]!==S?(Y=R?null:D?P(r)?(0,j.jsx)(`div`,{children:S===`pending`?(0,j.jsxs)(o,{variant:`outline`,size:`xs`,disabled:!0,children:[(0,j.jsx)(y,{className:`size-3 shrink-0 animate-spin`,"aria-hidden":`true`}),(0,j.jsx)(i,{id:`EHu0x2`})]}):(0,j.jsx)(o,{variant:`outline`,size:`xs`,onClick:W,children:(0,j.jsx)(i,{id:`lb_UU4`})})}):null:(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1.5`,children:[(0,j.jsx)(o,{variant:`outline`,size:`xs`,onClick:()=>v(!0),children:(0,j.jsx)(i,{id:`XU0OXn`})}),(0,j.jsxs)(`a`,{href:M,target:`_blank`,rel:`noopener noreferrer`,onClick:L,onAuxClick:I,className:`inline-flex items-center gap-1 transition-colors hover:text-primary`,children:[(0,j.jsx)(i,{id:`GLxIKR`}),(0,j.jsx)(p,{className:`size-3 shrink-0`,"aria-hidden":`true`})]})]}),t[26]=R,t[27]=W,t[28]=v,t[29]=r,t[30]=D,t[31]=S,t[32]=Y):Y=t[32];let X;t[33]!==q||t[34]!==J||t[35]!==Y?(X=(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[q,J,Y]}),t[33]=q,t[34]=J,t[35]=Y,t[36]=X):X=t[36];let Z;t[37]!==K||t[38]!==X?(Z=(0,j.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-dashed border-border bg-muted/40 p-2 text-xs text-muted-foreground`,"data-testid":`share-freshness-row`,children:[K,X]}),t[37]=K,t[38]=X,t[39]=Z):Z=t[39];let Q;t[40]!==h||t[41]!==x||t[42]!==_?(Q=(0,j.jsx)(f,{open:h,onOpenChange:_,onConfirm:x}),t[40]=h,t[41]=x,t[42]=_,t[43]=Q):Q=t[43];let $;return t[44]!==Z||t[45]!==Q?($=(0,j.jsxs)(j.Fragment,{children:[Z,Q]}),t[44]=Z,t[45]=Q,t[46]=$):$=t[46],$}function I(e){return w(e,M)}function L(e){return w(e,M)}function R(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function z(e){let t=(0,k.c)(13),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={phase:`pending`},t[0]=n):n=t[0];let[r,i]=(0,A.useState)(n),[a,o]=(0,A.useState)(0),s=e.branch,c;t[1]!==s||t[2]!==e.kind||t[3]!==e.path?(c=()=>{let t=window.okDesktop??null;if(!t||s===null){i({phase:`resolved`,resolution:{verdict:`unknown`}});return}let n=!1;return t.project.fetchTargetStatus({projectPath:t.config.projectPath,branch:s,path:e.path,kind:e.kind}).then(e=>{n||i({phase:`resolved`,resolution:e??{verdict:`unknown`}})}).catch(e=>{n||(console.warn(`[receive] miss target-status fetch failed`,e instanceof Error?e.message:e),i({phase:`resolved`,resolution:{verdict:`unknown`}}))}),()=>{n=!0}},t[1]=s,t[2]=e.kind,t[3]=e.path,t[4]=c):c=t[4];let l;t[5]!==s||t[6]!==a||t[7]!==e.kind||t[8]!==e.path?(l=[s,e.kind,e.path,a],t[5]=s,t[6]=a,t[7]=e.kind,t[8]=e.path,t[9]=l):l=t[9],(0,A.useEffect)(c,l);let u;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>{i({phase:`pending`}),o(B)},t[10]=u):u=t[10];let d;return t[11]===r?d=t[12]:(d={state:r,refetch:u},t[11]=r,t[12]=d),d}function B(e){return e+1}function V(e){let t=(0,k.c)(15),{onEnabled:n}=e,r=c(),a;t[0]===n?a=t[1]:(a={onEnabled:n},t[0]=n,t[1]=a);let{confirmOpen:s,setConfirmOpen:l,onToggleRequest:u,onConfirm:p}=d(r,a),m;t[2]===u?m=t[3]:(m=()=>u(!0),t[2]=u,t[3]=m);let h,g;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,j.jsx)(y,{className:`size-4`,"aria-hidden":`true`}),g=(0,j.jsx)(i,{id:`XU0OXn`}),t[4]=h,t[5]=g):(h=t[4],g=t[5]);let _;t[6]===m?_=t[7]:(_=(0,j.jsxs)(o,{onClick:m,"data-testid":`share-receive-miss-enable-sync`,children:[h,g]}),t[6]=m,t[7]=_);let v;t[8]!==s||t[9]!==p||t[10]!==l?(v=(0,j.jsx)(f,{open:s,onOpenChange:l,onConfirm:p}),t[8]=s,t[9]=p,t[10]=l,t[11]=v):v=t[11];let b;return t[12]!==_||t[13]!==v?(b=(0,j.jsxs)(j.Fragment,{children:[_,v]}),t[12]=_,t[13]=v,t[14]=b):b=t[14],b}function H(e){let t=(0,k.c)(15),{status:n,onSyncCompleted:r}=e,[a,s]=(0,A.useState)(!1),c=(0,A.useRef)(null),l;t[0]!==r||t[1]!==a||t[2]!==n.lastSyncUtc||t[3]!==n.pushError||t[4]!==n.pushErrorCode?(l=()=>{if(a){if(n.pushError||n.pushErrorCode){s(!1);return}(n.lastSyncUtc??null)!==c.current&&(s(!1),r?.())}},t[0]=r,t[1]=a,t[2]=n.lastSyncUtc,t[3]=n.pushError,t[4]=n.pushErrorCode,t[5]=l):l=t[5];let d;t[6]!==r||t[7]!==a||t[8]!==n?(d=[a,n,r],t[6]=r,t[7]=a,t[8]=n,t[9]=d):d=t[9],(0,A.useEffect)(l,d);let f;t[10]===n.lastSyncUtc?f=t[11]:(f=()=>{c.current=n.lastSyncUtc??null,s(!0),u(`sync`).catch(e=>{console.warn(`[receive] miss sync trigger failed`,e instanceof Error?e.message:e),s(!1)})},t[10]=n.lastSyncUtc,t[11]=f);let p=f,m;return t[12]!==p||t[13]!==a?(m=a?(0,j.jsxs)(o,{disabled:!0,"data-testid":`share-receive-miss-sync-now`,children:[(0,j.jsx)(y,{className:`size-4 animate-spin`,"aria-hidden":`true`}),(0,j.jsx)(i,{id:`EHu0x2`})]}):(0,j.jsxs)(o,{onClick:p,"data-testid":`share-receive-miss-sync-now`,children:[(0,j.jsx)(y,{className:`size-4`,"aria-hidden":`true`}),(0,j.jsx)(i,{id:`lb_UU4`})]}),t[12]=p,t[13]=a,t[14]=m):m=t[14],m}function U(e){let t=(0,k.c)(67),{nav:n,state:r,onBrowseFolder:s,onOpenRenamed:c,onEnableAutoSync:u,onSyncCompleted:d}=e,{_:f}=a(),p=l(),m=n.branch,g;t[0]!==f||t[1]!==n.kind?(g=n.kind===`folder`?f({id:`ugoTXs`}):f({id:`XH30C4`}),t[0]=f,t[1]=n.kind,t[2]=g):g=t[2];let y=g;if(r.phase===`pending`){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(_,{className:`size-5 animate-spin`,"aria-hidden":`true`}),(0,j.jsx)(i,{id:`c8jBgX`})]}),t[3]=e):e=t[3],e}let{resolution:b}=r,x,S;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,j.jsx)(h,{className:`size-4`,"aria-hidden":`true`}),S=(0,j.jsx)(i,{id:`hItdtk`}),t[4]=x,t[5]=S):(x=t[4],S=t[5]);let C;t[6]===s?C=t[7]:(C=(0,j.jsxs)(o,{variant:`outline`,onClick:s,"data-testid":`share-receive-miss-browse`,children:[x,S]}),t[6]=s,t[7]=C);let w=C,A,M,N;if(b.verdict===`renamed`){let e;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsx)(v,{className:`size-9`,"aria-hidden":`true`}),t[8]=e):e=t[8],A=e;let n;t[9]!==b.renamedTo||t[10]!==y?(n={0:b.renamedTo,targetNoun:y},t[9]=b.renamedTo,t[10]=y,t[11]=n):n=t[11];let r;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(r={0:(0,j.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})},t[12]=r):r=t[12];let a;t[13]===n?a=t[14]:(a=(0,j.jsx)(i,{id:`P0HC30`,values:n,components:r}),t[13]=n,t[14]=a),M=a;let s;t[15]!==c||t[16]!==b.renamedTo?(s=()=>c(b.renamedTo),t[15]=c,t[16]=b.renamedTo,t[17]=s):s=t[17];let l,u;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,j.jsx)(v,{className:`size-4`,"aria-hidden":`true`}),u=(0,j.jsx)(i,{id:`AItsE5`}),t[18]=l,t[19]=u):(l=t[18],u=t[19]);let d;t[20]===s?d=t[21]:(d=(0,j.jsxs)(o,{onClick:s,"data-testid":`share-receive-miss-open-renamed`,children:[l,u]}),t[20]=s,t[21]=d);let f;t[22]!==w||t[23]!==d?(f=(0,j.jsxs)(j.Fragment,{children:[d,w]}),t[22]=w,t[23]=d,t[24]=f):f=t[24],N=f}else if(b.verdict===`deleted`){let e;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsx)(O,{className:`size-9`,"aria-hidden":`true`}),t[25]=e):e=t[25],A=e;let n;t[26]!==m||t[27]!==y?(n={targetNoun:y,branch:m},t[26]=m,t[27]=y,t[28]=n):n=t[28];let r;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(r={0:(0,j.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})},t[29]=r):r=t[29];let a;t[30]===n?a=t[31]:(a=(0,j.jsx)(i,{id:`kpqWwG`,values:n,components:r}),t[30]=n,t[31]=a),M=a,N=w}else if(b.verdict===`never-on-branch`){let e;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsx)(D,{className:`size-9`,"aria-hidden":`true`}),t[32]=e):e=t[32],A=e;let n;t[33]!==m||t[34]!==y?(n={targetNoun:y,branch:m},t[33]=m,t[34]=y,t[35]=n):n=t[35];let r;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(r={0:(0,j.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})},t[36]=r):r=t[36];let a;t[37]===n?a=t[38]:(a=(0,j.jsx)(i,{id:`i9TPUi`,values:n,components:r}),t[37]=n,t[38]=a),M=a,N=w}else if(b.verdict===`changed-locally`){let e;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsx)(E,{className:`size-9`,"aria-hidden":`true`}),t[39]=e):e=t[39],A=e;let n=p?.syncEnabled===!0,r=p?.pushPermission?.checkStatus===`denied`||!!(p?.pushError||p?.pushErrorCode);if(n){let e;t[40]!==m||t[41]!==y?(e=m===null?(0,j.jsx)(i,{id:`RyIKxy`,values:{targetNoun:y}}):(0,j.jsx)(i,{id:`l6kpzR`,values:{targetNoun:y,branch:m},components:{0:(0,j.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}}),t[40]=m,t[41]=y,t[42]=e):e=t[42],M=e}else{let e;t[43]!==m||t[44]!==y?(e=m===null?(0,j.jsx)(i,{id:`UuYo7g`,values:{targetNoun:y}}):(0,j.jsx)(i,{id:`HoWElC`,values:{targetNoun:y,branch:m},components:{0:(0,j.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}}),t[43]=m,t[44]=y,t[45]=e):e=t[45],M=e}let a=null;if(p?.syncEnabled){if(P(p)&&!r){let e;t[46]!==d||t[47]!==p?(e=(0,j.jsx)(H,{status:p,onSyncCompleted:d}),t[46]=d,t[47]=p,t[48]=e):e=t[48],a=e}}else if(p!==null){let e;t[49]===u?e=t[50]:(e=(0,j.jsx)(V,{onEnabled:u}),t[49]=u,t[50]=e),a=e}let o;t[51]!==w||t[52]!==a?(o=(0,j.jsxs)(j.Fragment,{children:[a,w]}),t[51]=w,t[52]=a,t[53]=o):o=t[53],N=o}else{let e;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsx)(T,{className:`size-9`,"aria-hidden":`true`}),t[54]=e):e=t[54],A=e;let n;t[55]===m?n=t[56]:(n=m===null?(0,j.jsx)(i,{id:`Xewl6B`}):(0,j.jsx)(i,{id:`d1JjXo`,values:{branch:m},components:{0:(0,j.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}}),t[55]=m,t[56]=n),M=n,N=w}let F;t[57]===A?F=t[58]:(F=(0,j.jsx)(`div`,{className:`flex size-16 items-center justify-center rounded-full border bg-muted/40 text-muted-foreground`,children:A}),t[57]=A,t[58]=F);let I;t[59]===M?I=t[60]:(I=(0,j.jsx)(`p`,{className:`max-w-md text-balance text-base leading-6 text-foreground/90`,children:M}),t[59]=M,t[60]=I);let L;t[61]===N?L=t[62]:(L=(0,j.jsx)(`div`,{className:`flex flex-col-reverse gap-2 sm:flex-row`,children:N}),t[61]=N,t[62]=L);let R;return t[63]!==F||t[64]!==I||t[65]!==L?(R=(0,j.jsxs)(j.Fragment,{children:[F,I,L]}),t[63]=F,t[64]=I,t[65]=L,t[66]=R):R=t[66],R}function W(e){return e.replace(/^\/+|\/+$/g,``)}function G(e,t){if(t.kind===`folder`){if(C(e))return W(t.path)===``;let n=S(e);return n!==null&&W(n)===W(t.path)}let n=S(e);return n===null?!1:x(n)===x(t.path)}function K(){let e=null,t=new Set,n=!1;function r(){for(let e of t)e()}function i(t){e!==t&&(e=t,r())}function a(){e!==null&&(G(window.location.hash,e)||i(null))}function o(){n||typeof window>`u`||(n=!0,window.addEventListener(`hashchange`,a))}return{arm(e){o(),i(e)},clear(){i(null)},getSnapshot(){return e},subscribe(e){return t.add(e),()=>{t.delete(e)}},dispose(){n&&typeof window<`u`&&(window.removeEventListener(`hashchange`,a),n=!1),i(null)}}}var q=K();function J(e,t){return e===null||e.kind!==`missing`||t===null||x(t.path)!==e.target?null:t}export{z as a,T as c,R as i,q as n,F as o,U as r,N as s,J as t};
@@ -1 +1 @@
1
- import{i as e,t}from"./chunk-DseTPa7n.js";import{n,r,t as i}from"./compiler-runtime-DrcePeIl.js";import{t as a}from"./createLucideIcon-Wgamzz8_.js";import{qr as o}from"./dist-D--vIb9_.js";import{t as s}from"./parse-api-error-DfesE4Y7.js";import{c as ee,f as te,l as c,t as ne,u as l}from"./navigation-targets-Dp0ljlND.js";import{o as re}from"./documents-events-BOt1_9Hf.js";import{t as u}from"./documents-fetch-BzTSsuPI.js";import{r as ie}from"./startup-marks-2VTPXUbb.js";var d=a(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),f=a(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),p=e(n(),1),ae=i();function m(e,t){let n=!1,r=!1,i=!1;async function a(){if(!i){n=!0;try{await e()}finally{n=!1,i?r=!1:r&&(r=!1,a())}}}return{request(){if(!i){if(n){r=!0,t?.();return}a()}},dispose(){i=!0,r=!1,t?.()}}}var oe=r(),h=(0,p.createContext)(null);function se(e,t){if(t.size===0)return new Set(e);let n=new Set(e);for(let e of t)n.add(e);return n}function ce(e,t){if(e.size===0)return new Set;let n=new Set;for(let r of e)t.has(r)||n.add(r);return n}function g(e,t){let n=new Map(e);for(let e of t)n.has(e)||n.set(e,e);return n}async function le(){let e=await fetch(`/api/pages`);if(!e.ok){let t=await e.json().catch(()=>null);throw Error(s(t)??`/api/pages responded with ${e.status}`)}let t=await e.json();return Array.isArray(t.pages)?t.pages:[]}async function ue(){let{ok:e,status:t,body:n}=await u();if(!e)throw Error(s(n)??`/api/documents responded with ${t}`);let r=n??{};return Array.isArray(r.documents)?{assetPaths:r.documents.filter(e=>e.kind===`asset`&&typeof e.path==`string`&&e.path.length>0).map(e=>e.path),folderPaths:r.documents.filter(e=>e.kind===`folder`&&typeof e.path==`string`&&e.path.length>0).map(e=>e.path),filePaths:r.documents.filter(e=>e.kind===`file`&&typeof e.path==`string`&&e.path.length>0).map(e=>e.path)}:{assetPaths:[],folderPaths:[],filePaths:[]}}function de(e){console.error(`[PageListContext] Failed to load pages:`,e)}function _(e){console.warn(`[PageListContext] Failed to load referenced assets:`,e)}function v(e){let t=(0,ae.c)(54),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=new Set,t[0]=r):r=t[0];let[i,a]=(0,p.useState)(r),s;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=new Map,t[1]=s):s=t[1];let[u,d]=(0,p.useState)(s),f;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=new Map,t[2]=f):f=t[2];let[_,v]=(0,p.useState)(f),y;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(y=new Set,t[3]=y):y=t[3];let[b,x]=(0,p.useState)(y),S;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(S=new Set,t[4]=S):S=t[4];let[C,ge]=(0,p.useState)(S),w;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(w=new Set,t[5]=w):w=t[5];let[T,_e]=(0,p.useState)(w),E;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(E=new Set,t[6]=E):E=t[6];let[D,O]=(0,p.useState)(E),[k,A]=(0,p.useState)(!0),[j,M]=(0,p.useState)(null),N=(0,p.useRef)(0),P;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(P=function(){let e=N.current+=1;return Promise.all([le(),ue().catch(he)]).then(t=>{let[n,r]=t;if(e!==N.current)return;let i=new Set(n.map(me));a(i),d(new Map(n.map(pe))),v(new Map(n.map(fe))),x(new Set(r.assetPaths)),ge(new Set(r.folderPaths)),_e(new Set(r.filePaths)),O(e=>ce(e,i)),M(null),ie()}).catch(t=>{e===N.current&&(de(t),M(t instanceof Error?t.message:`Failed to load pages`))}).finally(()=>{e===N.current&&A(!1)})},t[7]=P):P=t[7];let F=P,I;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(I=function(e){O(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),n}),M(null)},t[8]=I):I=t[8];let ve=I,L,R;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(L=()=>{let e=m(F);e.request();let t=null,n=()=>{document.visibilityState===`visible`&&e.request()};window.addEventListener(`focus`,n),window.addEventListener(`visibilitychange`,n);let r=re(n=>{n.includes(`files`)&&t===null&&(t=setTimeout(()=>{t=null,e.request()},300))});return()=>{t!==null&&clearTimeout(t),e.dispose(),window.removeEventListener(`focus`,n),window.removeEventListener(`visibilitychange`,n),r()}},R=[],t[9]=L,t[10]=R):(L=t[9],R=t[10]),(0,p.useEffect)(L,R);let z,B,V,H,U,W,G,K;if(t[11]!==D||t[12]!==b||t[13]!==T||t[14]!==C||t[15]!==_||t[16]!==u||t[17]!==i){W=se(i,D);let e;t[26]!==D||t[27]!==u?(e=g(u,D),t[26]=D,t[27]=u,t[28]=e):e=t[28],U=e,H=_,z=b,B=T,V=new Set([...ne(W),...C]),G=l(W,o),K=c(W,o),t[11]=D,t[12]=b,t[13]=T,t[14]=C,t[15]=_,t[16]=u,t[17]=i,t[18]=z,t[19]=B,t[20]=V,t[21]=H,t[22]=U,t[23]=W,t[24]=G,t[25]=K}else z=t[18],B=t[19],V=t[20],H=t[21],U=t[22],W=t[23],G=t[24],K=t[25];let q=K,J;t[29]===_?J=t[30]:(J=ee(_),t[29]=_,t[30]=J);let Y=J,X,Z;t[31]!==z||t[32]!==B||t[33]!==V||t[34]!==Y||t[35]!==W||t[36]!==q||t[37]!==G?(X=()=>{te({pages:W,folderPaths:V,pagesBySlug:G,pagesByBasename:q,assetPaths:z,filePaths:B,pageIcons:Y})},Z=[W,V,G,q,z,B,Y],t[31]=z,t[32]=B,t[33]=V,t[34]=Y,t[35]=W,t[36]=q,t[37]=G,t[38]=X,t[39]=Z):(X=t[38],Z=t[39]),(0,p.useEffect)(X,Z);let Q;t[40]!==z||t[41]!==j||t[42]!==B||t[43]!==V||t[44]!==k||t[45]!==H||t[46]!==U||t[47]!==W||t[48]!==q||t[49]!==G?(Q={pages:W,pagesBySlug:G,pagesByBasename:q,pageTitles:U,pageMeta:H,folderPaths:V,assetPaths:z,filePaths:B,loading:k,error:j,refetch:F,addPage:ve},t[40]=z,t[41]=j,t[42]=B,t[43]=V,t[44]=k,t[45]=H,t[46]=U,t[47]=W,t[48]=q,t[49]=G,t[50]=Q):Q=t[50];let $;return t[51]!==n||t[52]!==Q?($=(0,oe.jsx)(h,{value:Q,children:n}),t[51]=n,t[52]=Q,t[53]=$):$=t[53],$}function fe(e){return[e.docName,{size:e.size,modified:e.modified,docExt:e.docExt,icon:e.icon}]}function pe(e){return[e.docName,e.title]}function me(e){return e.docName}function he(e){return _(e),{assetPaths:[],folderPaths:[],filePaths:[]}}function y(){let e=(0,p.use)(h);if(!e)throw Error(`usePageList must be used within <PageListProvider />`);return e}function b(){return(0,p.use)(h)}var x=t(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),S=t(((e,t)=>{var n=x();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),C=t(((e,t)=>{t.exports=S()()}));export{m as a,y as i,v as n,f as o,b as r,d as s,C as t};
1
+ import{i as e,t}from"./chunk-DseTPa7n.js";import{n,r,t as i}from"./compiler-runtime-DrcePeIl.js";import{t as a}from"./createLucideIcon-Wgamzz8_.js";import{Jr as o}from"./dist-DEmM8o04.js";import{t as s}from"./parse-api-error-DfesE4Y7.js";import{c as ee,f as te,l as c,t as ne,u as l}from"./navigation-targets-Bi-igYug.js";import{o as re}from"./documents-events-Ynxz3YVq.js";import{t as u}from"./documents-fetch-BzTSsuPI.js";import{r as ie}from"./startup-marks-2VTPXUbb.js";var d=a(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),f=a(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),p=e(n(),1),ae=i();function m(e,t){let n=!1,r=!1,i=!1;async function a(){if(!i){n=!0;try{await e()}finally{n=!1,i?r=!1:r&&(r=!1,a())}}}return{request(){if(!i){if(n){r=!0,t?.();return}a()}},dispose(){i=!0,r=!1,t?.()}}}var oe=r(),h=(0,p.createContext)(null);function se(e,t){if(t.size===0)return new Set(e);let n=new Set(e);for(let e of t)n.add(e);return n}function ce(e,t){if(e.size===0)return new Set;let n=new Set;for(let r of e)t.has(r)||n.add(r);return n}function g(e,t){let n=new Map(e);for(let e of t)n.has(e)||n.set(e,e);return n}async function le(){let e=await fetch(`/api/pages`);if(!e.ok){let t=await e.json().catch(()=>null);throw Error(s(t)??`/api/pages responded with ${e.status}`)}let t=await e.json();return Array.isArray(t.pages)?t.pages:[]}async function ue(){let{ok:e,status:t,body:n}=await u();if(!e)throw Error(s(n)??`/api/documents responded with ${t}`);let r=n??{};return Array.isArray(r.documents)?{assetPaths:r.documents.filter(e=>e.kind===`asset`&&typeof e.path==`string`&&e.path.length>0).map(e=>e.path),folderPaths:r.documents.filter(e=>e.kind===`folder`&&typeof e.path==`string`&&e.path.length>0).map(e=>e.path),filePaths:r.documents.filter(e=>e.kind===`file`&&typeof e.path==`string`&&e.path.length>0).map(e=>e.path)}:{assetPaths:[],folderPaths:[],filePaths:[]}}function de(e){console.error(`[PageListContext] Failed to load pages:`,e)}function _(e){console.warn(`[PageListContext] Failed to load referenced assets:`,e)}function v(e){let t=(0,ae.c)(54),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=new Set,t[0]=r):r=t[0];let[i,a]=(0,p.useState)(r),s;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=new Map,t[1]=s):s=t[1];let[u,d]=(0,p.useState)(s),f;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=new Map,t[2]=f):f=t[2];let[_,v]=(0,p.useState)(f),y;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(y=new Set,t[3]=y):y=t[3];let[b,x]=(0,p.useState)(y),S;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(S=new Set,t[4]=S):S=t[4];let[C,ge]=(0,p.useState)(S),w;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(w=new Set,t[5]=w):w=t[5];let[T,_e]=(0,p.useState)(w),E;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(E=new Set,t[6]=E):E=t[6];let[D,O]=(0,p.useState)(E),[k,A]=(0,p.useState)(!0),[j,M]=(0,p.useState)(null),N=(0,p.useRef)(0),P;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(P=function(){let e=N.current+=1;return Promise.all([le(),ue().catch(he)]).then(t=>{let[n,r]=t;if(e!==N.current)return;let i=new Set(n.map(me));a(i),d(new Map(n.map(pe))),v(new Map(n.map(fe))),x(new Set(r.assetPaths)),ge(new Set(r.folderPaths)),_e(new Set(r.filePaths)),O(e=>ce(e,i)),M(null),ie()}).catch(t=>{e===N.current&&(de(t),M(t instanceof Error?t.message:`Failed to load pages`))}).finally(()=>{e===N.current&&A(!1)})},t[7]=P):P=t[7];let F=P,I;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(I=function(e){O(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),n}),M(null)},t[8]=I):I=t[8];let ve=I,L,R;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(L=()=>{let e=m(F);e.request();let t=null,n=()=>{document.visibilityState===`visible`&&e.request()};window.addEventListener(`focus`,n),window.addEventListener(`visibilitychange`,n);let r=re(n=>{n.includes(`files`)&&t===null&&(t=setTimeout(()=>{t=null,e.request()},300))});return()=>{t!==null&&clearTimeout(t),e.dispose(),window.removeEventListener(`focus`,n),window.removeEventListener(`visibilitychange`,n),r()}},R=[],t[9]=L,t[10]=R):(L=t[9],R=t[10]),(0,p.useEffect)(L,R);let z,B,V,H,U,W,G,K;if(t[11]!==D||t[12]!==b||t[13]!==T||t[14]!==C||t[15]!==_||t[16]!==u||t[17]!==i){W=se(i,D);let e;t[26]!==D||t[27]!==u?(e=g(u,D),t[26]=D,t[27]=u,t[28]=e):e=t[28],U=e,H=_,z=b,B=T,V=new Set([...ne(W),...C]),G=l(W,o),K=c(W,o),t[11]=D,t[12]=b,t[13]=T,t[14]=C,t[15]=_,t[16]=u,t[17]=i,t[18]=z,t[19]=B,t[20]=V,t[21]=H,t[22]=U,t[23]=W,t[24]=G,t[25]=K}else z=t[18],B=t[19],V=t[20],H=t[21],U=t[22],W=t[23],G=t[24],K=t[25];let q=K,J;t[29]===_?J=t[30]:(J=ee(_),t[29]=_,t[30]=J);let Y=J,X,Z;t[31]!==z||t[32]!==B||t[33]!==V||t[34]!==Y||t[35]!==W||t[36]!==q||t[37]!==G?(X=()=>{te({pages:W,folderPaths:V,pagesBySlug:G,pagesByBasename:q,assetPaths:z,filePaths:B,pageIcons:Y})},Z=[W,V,G,q,z,B,Y],t[31]=z,t[32]=B,t[33]=V,t[34]=Y,t[35]=W,t[36]=q,t[37]=G,t[38]=X,t[39]=Z):(X=t[38],Z=t[39]),(0,p.useEffect)(X,Z);let Q;t[40]!==z||t[41]!==j||t[42]!==B||t[43]!==V||t[44]!==k||t[45]!==H||t[46]!==U||t[47]!==W||t[48]!==q||t[49]!==G?(Q={pages:W,pagesBySlug:G,pagesByBasename:q,pageTitles:U,pageMeta:H,folderPaths:V,assetPaths:z,filePaths:B,loading:k,error:j,refetch:F,addPage:ve},t[40]=z,t[41]=j,t[42]=B,t[43]=V,t[44]=k,t[45]=H,t[46]=U,t[47]=W,t[48]=q,t[49]=G,t[50]=Q):Q=t[50];let $;return t[51]!==n||t[52]!==Q?($=(0,oe.jsx)(h,{value:Q,children:n}),t[51]=n,t[52]=Q,t[53]=$):$=t[53],$}function fe(e){return[e.docName,{size:e.size,modified:e.modified,docExt:e.docExt,icon:e.icon}]}function pe(e){return[e.docName,e.title]}function me(e){return e.docName}function he(e){return _(e),{assetPaths:[],folderPaths:[],filePaths:[]}}function y(){let e=(0,p.use)(h);if(!e)throw Error(`usePageList must be used within <PageListProvider />`);return e}function b(){return(0,p.use)(h)}var x=t(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),S=t(((e,t)=>{var n=x();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),C=t(((e,t)=>{t.exports=S()()}));export{m as a,y as i,v as n,f as o,b as r,d as s,C as t};
@@ -1,2 +1,2 @@
1
- import{nn as e}from"./dist-D--vIb9_.js";function t(t){return e(t)}function n(e,t){switch(e.kind){case`ok`:return null;case`not-git`:return`This folder doesn't contain a git repository. Pick a different folder?`;case`wrong-repo`:return`This folder is a clone of ${e.actualOwner}/${e.actualRepo}, not ${t.owner}/${t.repo}. Pick a different folder?`;case`no-origin`:case`non-github`:case`symlink-escape`:return`This folder isn't a clone of ${t.owner}/${t.repo}. Pick a different folder?`}}function r(e){return e.kind===`unsupported-version`?{kind:`unsupported-version`,message:`Update OpenKnowledge to open this share.`}:e.kind===`invalid`?{kind:`invalid`,message:`Invalid share URL.`}:null}function i(e){let t=e.split(`
1
+ import{nn as e}from"./dist-DEmM8o04.js";function t(t){return e(t)}function n(e,t){switch(e.kind){case`ok`:return null;case`not-git`:return`This folder doesn't contain a git repository. Pick a different folder?`;case`wrong-repo`:return`This folder is a clone of ${e.actualOwner}/${e.actualRepo}, not ${t.owner}/${t.repo}. Pick a different folder?`;case`no-origin`:case`non-github`:case`symlink-escape`:return`This folder isn't a clone of ${t.owner}/${t.repo}. Pick a different folder?`}}function r(e){return e.kind===`unsupported-version`?{kind:`unsupported-version`,message:`Update OpenKnowledge to open this share.`}:e.kind===`invalid`?{kind:`invalid`,message:`Invalid share URL.`}:null}function i(e){let t=e.split(`
2
2
  `).map(e=>e.trim()).filter(e=>e.length>0&&!/^Cloning into /i.test(e)),n=t.filter(e=>/^remote:/i.test(e)),r=n[n.length-1];if(r)return r.replace(/^remote:\s*/i,``).trim();let i=t.find(e=>/^fatal:/i.test(e));return i?i.replace(/^fatal:\s*/i,``).trim():t[0]??``}function a(e){let t=[`[receive]`];return e.q2_path!==void 0&&t.push(`q2_path=${e.q2_path}`),e.folder_validate!==void 0&&t.push(`folder_validate=${e.folder_validate}`),e.branch_action!==void 0&&t.push(`branch_action=${e.branch_action}`),e.branch!==void 0&&t.push(`branch=${e.branch}`),e.doc_check!==void 0&&t.push(`doc_check=${e.doc_check}`),e.branch_dialog_action!==void 0&&t.push(`branch_dialog_action=${e.branch_dialog_action}`),e.verdict_cell!==void 0&&t.push(`verdict_cell=${e.verdict_cell}`),t.join(` `)}function o(){let e=null,t=new Set,n=!1,r=null;function i(){for(let e of t)e()}function a(){e!==null&&(e=null,i())}return{install({bridge:t}){if(t)return n?r??void 0:(n=!0,r=t.onShareReceived(t=>{e=t,i()}),()=>{r?.(),r=null,n=!1,a()})},getSnapshot(){return e},subscribe(e){return t.add(e),()=>{t.delete(e)}},dismiss(){a()}}}var s=o();function c(e){return s.install(e)}export{a,i,s as n,n as o,t as r,r as s,c as t};
@@ -1,4 +1,4 @@
1
- import{A as e}from"./DocumentContext-DdPNvhCs.js";function t(e){return e.lineCount===1&&e.charLen<100?{kind:`inline`,markdown:e.markdown}:e.surface===`source`&&e.sourceLineStart!==void 0&&e.sourceLineEnd!==void 0?{kind:`lines`,startLine:e.sourceLineStart,endLine:e.sourceLineEnd}:{kind:`anchor`,markdown:e.markdown}}function n(e,t){return e.sourceLineStart!==void 0&&e.sourceLineEnd!==void 0?`${t} (${e.sourceLineStart===e.sourceLineEnd?`${e.sourceLineStart}`:`${e.sourceLineStart}-${e.sourceLineEnd}`})`:e.lineCount>1?`${t} (${e.lineCount} lines)`:`${t} (selection)`}function r(e){let t=e.replace(/\r\n/g,`
1
+ import{A as e}from"./DocumentContext-O0A-tcJv.js";function t(e){return e.lineCount===1&&e.charLen<100?{kind:`inline`,markdown:e.markdown}:e.surface===`source`&&e.sourceLineStart!==void 0&&e.sourceLineEnd!==void 0?{kind:`lines`,startLine:e.sourceLineStart,endLine:e.sourceLineEnd}:{kind:`anchor`,markdown:e.markdown}}function n(e,t){return e.sourceLineStart!==void 0&&e.sourceLineEnd!==void 0?`${t} (${e.sourceLineStart===e.sourceLineEnd?`${e.sourceLineStart}`:`${e.sourceLineStart}-${e.sourceLineEnd}`})`:e.lineCount>1?`${t} (${e.lineCount} lines)`:`${t} (selection)`}function r(e){let t=e.replace(/\r\n/g,`
2
2
  `).split(`
3
3
  `),n=[],r=!1;for(let e of t){let t=e.trim();if(/^(```|~~~)/.test(t)){r||n.push(`code`),r=!r;continue}if(r||t===``)continue;if(/^\|.*\|?$/.test(t)&&t.includes(`|`)){n[n.length-1]!==`table`&&n.push(`table`);continue}if(/^<\/?[A-Za-z]/.test(t)){n[n.length-1]!==`component`&&n.push(`component`);continue}let i=t.match(/^#{1,6}\s+(.*)$/);if(i){n.push(i[1]??``);continue}let a=t.match(/^[-*+]\s+(.*)$/);if(a){n.push(`• ${a[1]??``}`);continue}let o=t.match(/^\d+\.\s+(.*)$/);if(o){n.push(`• ${o[1]??``}`);continue}let s=t.match(/^>\s?(.*)$/);if(s){n.push(s[1]??``);continue}n.push(t)}return n.join(` `).replace(/\s+/g,` `).trim()}var i=new Map,a=new Set,o=(e,t)=>`${t}:${e}`;function s(){for(let e of a)e()}function c(e,t){return e.markdown===t.markdown&&e.sourceLineStart===t.sourceLineStart&&e.sourceLineEnd===t.sourceLineEnd}function l(e,t,n){let r=o(e,t);if(n===null){i.delete(r)&&s();return}let a=i.get(r);a&&c(a,n)||(i.set(r,n),s())}function u(e,t){return e===null?null:i.get(o(e,t))??null}function d(e){return a.add(e),()=>{a.delete(e)}}function f(t,n){if(t.state.selection.empty)return null;let r=e(t);return r.trim()?{surface:`wysiwyg`,docName:n,markdown:r,charLen:r.trim().length,lineCount:(r.match(/\n/g)?.length??0)+1}:null}function p(e,t){return e.trim()?{surface:`frontmatter`,docName:t,markdown:e,charLen:e.trim().length,lineCount:(e.match(/\n/g)?.length??0)+1}:null}function m(e,t){let n=[],r=1/0,i=-1;for(let t of e.state.selection.ranges)t.empty||(n.push(e.state.sliceDoc(t.from,t.to)),r=Math.min(r,t.from),i=Math.max(i,t.to));if(n.length===0)return null;let a=n.join(`
4
4
  `);if(!a.trim())return null;let o=e.state.doc.lineAt(r).number,s=e.state.doc.lineAt(i).number;return{surface:`source`,docName:t,markdown:a,charLen:a.trim().length,lineCount:s-o+1,sourceLineStart:o,sourceLineEnd:s}}export{p as a,t as c,n as i,d as l,r as n,m as o,l as r,f as s,u as t};