@inkeep/open-knowledge 0.64.0-beta.4 → 0.64.0-beta.5

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 (147) hide show
  1. package/dist/{acp-harness-probe-B0ZOHZTz.mjs → acp-harness-probe-Bz_Xfqhw.mjs} +2 -2
  2. package/dist/cli.mjs +6 -6
  3. package/dist/constants-BgJb28Cb.mjs +2 -0
  4. package/dist/git-handle-Bh1alj7a.mjs +1 -0
  5. package/dist/{git-handle-29BNYqgw.mjs → git-handle-UnQwrdlT.mjs} +2 -2
  6. package/dist/index.d.mts +32 -19
  7. package/dist/index.mjs +157 -157
  8. package/dist/init-Cpnor43q.mjs +1 -0
  9. package/dist/{init-XAxC4-D4.mjs → init-JIlCRbdu.mjs} +3 -3
  10. package/dist/{launch-json-removal-1-8ZHJtz.mjs → launch-json-removal-D1H1a769.mjs} +2 -2
  11. package/dist/{loader-BAhIE_G7.mjs → loader-BkOiHFr0.mjs} +2 -2
  12. package/dist/loader-ROlCo-Nz.mjs +1 -0
  13. package/dist/md-manager-BJ88tow5.mjs +2 -0
  14. package/dist/{open-browser-aU_PSdrG.mjs → open-browser-CrMsTPIV.mjs} +2 -2
  15. package/dist/parse-worker.mjs +1 -1
  16. package/dist/{preview-W17sbyAM.mjs → preview-BF5V_rVP.mjs} +2 -2
  17. package/dist/preview-PgQuIcNJ.mjs +1 -0
  18. package/dist/public/assets/{ActivityModeContent-CTkq714U.js → ActivityModeContent-CauWCpUS.js} +1 -1
  19. package/dist/public/assets/{AddPropertiesButton-BPD1FL9u.js → AddPropertiesButton-BNouQBfs.js} +1 -1
  20. package/dist/public/assets/{AgentDiffPane-irQjcz1_.js → AgentDiffPane-DXQNRZ8O.js} +1 -1
  21. package/dist/public/assets/{AgentThreadClientBinder-BVL-74Xg.js → AgentThreadClientBinder-5zJFp5cf.js} +1 -1
  22. package/dist/public/assets/{BugReportHistory-DH6PeCd-.js → BugReportHistory-BATOeSHw.js} +1 -1
  23. package/dist/public/assets/{BugReportHistoryDialog-B8YFi-N2.js → BugReportHistoryDialog-sIMmVxt-.js} +1 -1
  24. package/dist/public/assets/CodeMirrorPropInput-DX8Yunfs.js +3 -0
  25. package/dist/public/assets/{ConsentDialogBody-oXXodDvV.js → ConsentDialogBody-C4z025ef.js} +1 -1
  26. package/dist/public/assets/DocumentContext-BV7jb-np.js +38 -0
  27. package/dist/public/assets/{EditorModeToggle-BaN2Oili.js → EditorModeToggle-B8yEewMp.js} +1 -1
  28. package/dist/public/assets/{EnableSyncConfirmDialog-xkXGTFo0.js → EnableSyncConfirmDialog-uAw_zEkg.js} +1 -1
  29. package/dist/public/assets/{ExcalidrawDocEditor-Dj9eB-pP.js → ExcalidrawDocEditor-DhTxtSyA.js} +1 -1
  30. package/dist/public/assets/FeedbackForm-DJ9TwFhA.js +1 -0
  31. package/dist/public/assets/{GraphPanel-DwUEHRhD.js → GraphPanel-Brg6YDja.js} +2 -2
  32. package/dist/public/assets/{ImportSkillDialog-DkMQKyPv.js → ImportSkillDialog-BYfuLW-m.js} +1 -1
  33. package/dist/public/assets/{LintConfigEditor-B-NsTPbc.js → LintConfigEditor-pJBzAP1G.js} +1 -1
  34. package/dist/public/assets/ManagedArtifactProperties-CFDGVAK1.js +1 -0
  35. package/dist/public/assets/{ManagedArtifactProperties-rX7XGDin.js → ManagedArtifactProperties-D1f8Frip.js} +1 -1
  36. package/dist/public/assets/{MermaidDocEditor-yQOGFE0A.js → MermaidDocEditor-DVxgZCM4.js} +1 -1
  37. package/dist/public/assets/{PropertyDisplayRow-Du0eofgg.js → PropertyDisplayRow-9aYyPFhc.js} +1 -1
  38. package/dist/public/assets/{ReportBugDialogBody-CSy9sPgF.js → ReportBugDialogBody-YQEEGPWa.js} +1 -1
  39. package/dist/public/assets/{ReportBugMenuTrigger-DcXixDKs.js → ReportBugMenuTrigger-BYHhqbyX.js} +2 -2
  40. package/dist/public/assets/{SchemaConfigEditor-Bw4WfNdB.js → SchemaConfigEditor-0hGeiywr.js} +1 -1
  41. package/dist/public/assets/{SessionsHost-Bb2LhY4k.js → SessionsHost-BegjN_Wv.js} +2 -2
  42. package/dist/public/assets/{SettingsDialogBody-BOlhS9Ub.js → SettingsDialogBody-Bng9Ek1r.js} +4 -4
  43. package/dist/public/assets/{ShareBranchSwitchDialog-MPieYF0-.js → ShareBranchSwitchDialog-DNMbGcR3.js} +1 -1
  44. package/dist/public/assets/{ShareReceiveDialog-Dv4IxMEt.js → ShareReceiveDialog-CxRzoJmJ.js} +1 -1
  45. package/dist/public/assets/{ShareReceiveMissDialog-BDMgkM4B.js → ShareReceiveMissDialog-C2M-0S6A.js} +1 -1
  46. package/dist/public/assets/{SkillCostValue-BN4Joz66.js → SkillCostValue-0sdQK-kg.js} +1 -1
  47. package/dist/public/assets/{SkillEditBanner-ojtVKJKQ.js → SkillEditBanner-BIAkDbBb.js} +1 -1
  48. package/dist/public/assets/SkillInstallMenu-C5Y79gdz.js +2 -0
  49. package/dist/public/assets/{SkillOriginInline-C997nHPd.js → SkillOriginInline-C35IR2C_.js} +1 -1
  50. package/dist/public/assets/{SkillToolbarControls-Dj-887tA.js → SkillToolbarControls-DEiTj33j.js} +1 -1
  51. package/dist/public/assets/{SlidesToolbarControls-DW6XStbl.js → SlidesToolbarControls-Bua5dOtR.js} +1 -1
  52. package/dist/public/assets/SourceEditor-DzxE90kB.js +1 -0
  53. package/dist/public/assets/{TerminalPanel-CT7hDlGm.js → TerminalPanel-EZTkF_Im.js} +3 -3
  54. package/dist/public/assets/{TerminalWindowApp-YPZsrULF.js → TerminalWindowApp-zabnp2hc.js} +1 -1
  55. package/dist/public/assets/{TextDocEditor-7bDJHloT.js → TextDocEditor-5pSurn6C.js} +1 -1
  56. package/dist/public/assets/{ThreadView-DP3_zX56.js → ThreadView-DY925XKN.js} +5 -5
  57. package/dist/public/assets/{TimelineDiffPane-DG4VaixQ.js → TimelineDiffPane-BOSthuzR.js} +1 -1
  58. package/dist/public/assets/{agent-diff-store-DikFdttU.js → agent-diff-store-CWlSMAcS.js} +1 -1
  59. package/dist/public/assets/auth-state-cache-DN_6SHvB.js +11 -0
  60. package/dist/public/assets/{bug-report-send-manager-Di-wNg5H.js → bug-report-send-manager-idwD-g0s.js} +1 -1
  61. package/dist/public/assets/client-version-BBQwLhqb.js +1 -0
  62. package/dist/public/assets/{comment-chips-BNT5yiMX.js → comment-chips-BtWBKUUL.js} +1 -1
  63. package/dist/public/assets/{config-provider-D9QQqC6e.js → config-provider-BXiukxwE.js} +2 -2
  64. package/dist/public/assets/{dist-DTZ5Uilk.js → dist-C_QZEaeX.js} +86 -86
  65. package/dist/public/assets/{doc-paths-CbSX4XTW.js → doc-paths-DMctW8qz.js} +1 -1
  66. package/dist/public/assets/{documents-events-DxL5ysM1.js → documents-events-CwqQxQT5.js} +1 -1
  67. package/dist/public/assets/{file-tree-adapter-Dfj6r2ub.js → file-tree-adapter-CpTo1U5h.js} +1 -1
  68. package/dist/public/assets/{file-tree-utils-Cs7B4muN.js → file-tree-utils-DrK6l51M.js} +1 -1
  69. package/dist/public/assets/{folder-config-api-DrObHnBt.js → folder-config-api-Dxuhqlqr.js} +1 -1
  70. package/dist/public/assets/i18n-CHdOLU04.js +1 -0
  71. package/dist/public/assets/index-CEIpyn32.js +2204 -0
  72. package/dist/public/assets/{launcher-selection-B27yBVlr.js → launcher-selection-Btzbq8G9.js} +1 -1
  73. package/dist/public/assets/lint-config-client-pNtVqn1v.js +1 -0
  74. package/dist/public/assets/{markdownlint-rule-browser-CLc72-TR.js → markdownlint-rule-browser-IpH2V17S.js} +1 -1
  75. package/dist/public/assets/page-list-cache-DambRQ7B.js +1 -0
  76. package/dist/public/assets/{pending-receive-nav-store-CakgGJjG.js → pending-receive-nav-store-DLOxz1b_.js} +1 -1
  77. package/dist/public/assets/{progress-BJuxWr77.js → progress-BtHJSSZk.js} +3 -3
  78. package/dist/public/assets/{project-paths-vxe5ndBy.js → project-paths-BN2qP-Oz.js} +1 -1
  79. package/dist/public/assets/{prop-types-DcE7SWmX.js → prop-types-Boc_oFTG.js} +1 -1
  80. package/dist/public/assets/{receive-store-CkD0UhDA.js → receive-store-Rla0xjPc.js} +1 -1
  81. package/dist/public/assets/{selection-context-BFI-bqiT.js → selection-context-C0Dh06ez.js} +1 -1
  82. package/dist/public/assets/{skill-scope-grqY_b8j.js → skill-scope-C2Q18Fyo.js} +1 -1
  83. package/dist/public/assets/{skills-api-DNXy9jz0.js → skills-api-Du0yE_Ea.js} +1 -1
  84. package/dist/public/assets/{src-DXdR4ZQN.js → src-XvoJ42p_.js} +1 -1
  85. package/dist/public/assets/startup-marks-Cw2UqI10.js +1 -0
  86. package/dist/public/assets/{tag-pill-input-D34lLgUq.js → tag-pill-input-BWs4IhME.js} +1 -1
  87. package/dist/public/assets/{target-navigation-intent-XZyK8hlI.js → target-navigation-intent-C_Ucfr51.js} +1 -1
  88. package/dist/public/assets/{telemetry-impl-CQvRl6_a.js → telemetry-impl-DLl1oxED.js} +1 -1
  89. package/dist/public/assets/{telemetry-startup-BZHG8uvV.js → telemetry-startup-k7vK2L8Z.js} +1 -1
  90. package/dist/public/assets/{terminal-cli-display-C3XNS9Zb.js → terminal-cli-display-CrkxgiPR.js} +1 -1
  91. package/dist/public/assets/typing-burst-detector-CtCPp1ik.js +8 -0
  92. package/dist/public/assets/{uninstall-Cl4LM0CB.js → uninstall-Be_VK869.js} +1 -1
  93. package/dist/public/assets/{use-activity-panel-BdGnO2Z6.js → use-activity-panel-Bat2VfJF.js} +1 -1
  94. package/dist/public/assets/{use-apply-config-color-theme-Bwj3f7UC.js → use-apply-config-color-theme-3_75T4Q8.js} +1 -1
  95. package/dist/public/assets/{use-collab-url-OrVAc6Wo.js → use-collab-url-9MxkxDjK.js} +1 -1
  96. package/dist/public/assets/{use-live-xterm-theme-5k6Gqiaw.js → use-live-xterm-theme-BjybDd5E.js} +1 -1
  97. package/dist/public/assets/{use-open-skill-DymWWnJ_.js → use-open-skill-B004qnQw.js} +1 -1
  98. package/dist/public/assets/{use-settings-route-BFU85dl8.js → use-settings-route-6Aa41RPQ.js} +1 -1
  99. package/dist/public/assets/{use-skill-origin-BTVSbkkb.js → use-skill-origin-C0RzVLGk.js} +1 -1
  100. package/dist/public/assets/{use-skills-Dn1UHdyr.js → use-skills-BkWQHhha.js} +1 -1
  101. package/dist/public/assets/{use-terminal-enabled-DkT9h5DB.js → use-terminal-enabled-ST2-eUch.js} +1 -1
  102. package/dist/public/assets/use-timeline-entry-diff-C-o8h9N3.js +6 -0
  103. package/dist/public/assets/{use-workspace-BfO5PsIE.js → use-workspace-7B06onC_.js} +1 -1
  104. package/dist/public/index.html +47 -47
  105. package/dist/public/uninstall.html +3 -3
  106. package/dist/{repair-launch-json-BLY6J8I2.mjs → repair-launch-json-BVjKD52o.mjs} +2 -2
  107. package/dist/{repair-mcp-configs-lXWW4hnd.mjs → repair-mcp-configs-BQ7U1U_I.mjs} +2 -2
  108. package/dist/repair-skills-DIytACob.mjs +1 -0
  109. package/dist/{repair-skills-CRG-r1Xh.mjs → repair-skills-DPyYfXHX.mjs} +2 -2
  110. package/dist/{resolve-project-root-urAKqvDX.mjs → resolve-project-root-suxWrGvT.mjs} +2 -2
  111. package/dist/{server-lock-_JWkU2Mh.mjs → server-lock-CcnGITIh.mjs} +2 -2
  112. package/dist/server-lock-D8d0WVYU.mjs +1 -0
  113. package/dist/{skill-teardown-CVMrfSeZ.mjs → skill-teardown-D4qifTbZ.mjs} +2 -2
  114. package/dist/src-7XhmCEkb.mjs +1 -0
  115. package/dist/{src-BRlSw7bk.mjs → src-C8wtGJxJ.mjs} +1 -1
  116. package/dist/{src-CjFV1e1Z.mjs → src-CNSuUQTi.mjs} +4 -4
  117. package/dist/{src-DhKkOAcb.mjs → src-CaLoSvK5.mjs} +2 -2
  118. package/dist/src-CnywvEPN.mjs +20 -0
  119. package/dist/{start-BaCKwcGO.mjs → start-ClCOtrI0.mjs} +3 -3
  120. package/dist/start-CxNMq7dN.mjs +1 -0
  121. package/package.json +4 -4
  122. package/dist/constants-C-QXBCBl.mjs +0 -2
  123. package/dist/git-handle-DfQBBy3_.mjs +0 -1
  124. package/dist/init-DPb4O5KS.mjs +0 -1
  125. package/dist/loader-DhmZ3k83.mjs +0 -1
  126. package/dist/md-manager-CZcRasmz.mjs +0 -2
  127. package/dist/preview-ztEEIVyt.mjs +0 -1
  128. package/dist/public/assets/CodeMirrorPropInput-kIJWwKe4.js +0 -3
  129. package/dist/public/assets/DocumentContext-6gn-Aiv8.js +0 -38
  130. package/dist/public/assets/FeedbackForm-BnoSzKB_.js +0 -1
  131. package/dist/public/assets/ManagedArtifactProperties-DL8NyQe3.js +0 -1
  132. package/dist/public/assets/SkillInstallMenu-B3V2W9x9.js +0 -2
  133. package/dist/public/assets/SourceEditor-YP4-TM8J.js +0 -1
  134. package/dist/public/assets/auth-state-cache-Oucukckm.js +0 -11
  135. package/dist/public/assets/client-version-DpPDNVRX.js +0 -1
  136. package/dist/public/assets/i18n-CP94ib4l.js +0 -1
  137. package/dist/public/assets/index-DxkeeuEK.js +0 -2204
  138. package/dist/public/assets/lint-config-client-DbEZKTUk.js +0 -1
  139. package/dist/public/assets/page-list-cache-4RZDQAIl.js +0 -1
  140. package/dist/public/assets/startup-marks-C-m5WZDP.js +0 -1
  141. package/dist/public/assets/typing-burst-detector-CHFv8DDa.js +0 -8
  142. package/dist/public/assets/use-timeline-entry-diff-CQ3Ngq3P.js +0 -6
  143. package/dist/repair-skills-BABpOhB_.mjs +0 -1
  144. package/dist/server-lock-C_5VGPQF.mjs +0 -1
  145. package/dist/src-BZeMIn4S.mjs +0 -1
  146. package/dist/src-Cv5CfSHR.mjs +0 -20
  147. package/dist/start-Bqguzc8D.mjs +0 -1
@@ -1 +1 @@
1
- import{vo as e}from"./dist-DTZ5Uilk.js";function t(t){return e.includes(t)}function n(e){if(e.startsWith(_)||e.startsWith(x)||e.startsWith(S)||e.startsWith(w)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=v(t),r=n>=0?t.slice(0,n):t;if(!r)return null;try{return r.split(`/`).map(decodeURIComponent).join(`/`)}catch{return r}}function r(e){if(e.startsWith(_)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=t.indexOf(`#`);if(n<0)return null;let r=t.slice(n+1);if(!r)return null;try{return decodeURIComponent(r)}catch{return r}}function i(e,t){let n=`#/${e}`;return t?`${n}#${encodeURIComponent(t)}`:n}function a(e,t){return e===t||o(e)===o(t)}function o(e){try{return decodeURIComponent(e)}catch{return e}}var s=`__okHashHistoryEntry`;function c(e){return{...typeof e==`object`&&e?e:{},[s]:!0}}function l(e){return typeof e==`object`&&!!e&&e[s]===!0}function u(){l(window.history.state)||window.history.replaceState(c(window.history.state),``)}function d(e){let{pathname:t,search:n}=window.location;window.history.replaceState(c(window.history.state),``,`${t}${n}${e}`)}function f(e){if(a(window.location.hash,e))return;let{pathname:t,search:n}=window.location;window.history.pushState(c(window.history.state),``,`${t}${n}${e}`)}function p(e){return e.endsWith(`.mdx`)?e.slice(0,-4):e.endsWith(`.md`)?e.slice(0,-3):e}function m(e,t){let n=e.replace(/^\/+|\/+$/g,``),r=n?`#/${n}/`:`#/`;return t?`${r}#${encodeURIComponent(t)}`:r}function h(e,t,n){if(e===`folder`)return m(t);let r=`#/${encodeURIComponent(t)}`;return n==null||n===``?r:`${r}?branch=${encodeURIComponent(n)}`}function g(e){if(e===`#/`)return!0;if(!e.startsWith(`#/`))return!1;let t=e.slice(2);return t.length>0&&t[0]===`?`}var _=`#/__asset__/`;function v(e){let t=e.indexOf(`?`),n=e.indexOf(`#`);return t<0?n:n<0?t:Math.min(t,n)}function y(e){if(!e.startsWith(_))return null;let t=e.slice(12);if(!t)return null;try{return t.split(`/`).map(decodeURIComponent).join(`/`)}catch{return t}}function b(e){return`${_}${e.split(`/`).map(encodeURIComponent).join(`/`)}`}var x=`#/__skill-file__/`,S=`#/__skills__`;function C(e){return e===S||e.startsWith(`${S}/`)}var w=`#/__skill-preview__/`,T=[`explore`,`detected`,`builtin`,`foreign`,`linked`];function E(e){return e!==void 0&&T.includes(e)}var D=`project`;function O(e){return[e.flavor,e.source,e.name,e.subtitle,e.level??D].map(encodeURIComponent).join(`/`)}function k(e){if(!e)return null;let n;try{n=e.split(`/`).map(decodeURIComponent)}catch{return null}if(n.length<4||n.length>6)return null;let[r,i,a,o,s,c]=n;return!E(r)||!i||!a?null:{flavor:r,source:i,name:a,subtitle:o??``,...s&&t(s)?{level:s}:{},...c?{path:c}:{}}}function A(e){let t=O(e);return e.path&&(t+=`/${encodeURIComponent(e.path)}`),`${w}${t}`}function j(e){return e.startsWith(w)?k(e.slice(20)):null}var M=`:`;function N(e){let t=e.host===void 0?e.name:`${e.name}${M}${e.host}`;return`${x}${[e.scope,t].map(encodeURIComponent).join(`/`)}/${e.path.split(`/`).map(encodeURIComponent).join(`/`)}`}function P(e){if(!e.startsWith(x))return null;let n=e.slice(17);if(!n)return null;let r;try{r=n.split(`/`).map(decodeURIComponent)}catch{return null}if(r.length<3)return null;let[i,a,...o]=r,s=o.join(`/`);if(!i||!a||!s||!t(i))return null;let c=a.indexOf(M),l=c===-1?a:a.slice(0,c),u=c===-1?void 0:a.slice(c+1);return l?{scope:i,name:l,path:s,...u?{host:u}:{}}:null}var F=/\.(md|mdx)$/i;function I(e){return e.trim().replace(/^\.\/+/,``).replace(/^\/+/,``)}function L(e){return I(e).replace(F,``)}function R(e){let t=I(e);return t?F.test(t)?t:`${t}.md`:`untitled.md`}function z(e){let t=L(e),n=t.lastIndexOf(`/`);return{initialDir:n>0?t.slice(0,n):``,suggestedName:`${n>=0?t.slice(n+1):t||`untitled`}.md`}}export{j as C,P as S,l as _,y as a,f as b,h as c,b as d,i as f,g,A as h,r as i,O as l,N as m,R as n,k as o,m as p,L as r,n as s,z as t,p as u,a as v,C as w,d as x,u as y};
1
+ import{yo as e}from"./dist-C_QZEaeX.js";function t(t){return e.includes(t)}function n(e){if(e.startsWith(_)||e.startsWith(x)||e.startsWith(S)||e.startsWith(w)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=v(t),r=n>=0?t.slice(0,n):t;if(!r)return null;try{return r.split(`/`).map(decodeURIComponent).join(`/`)}catch{return r}}function r(e){if(e.startsWith(_)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=t.indexOf(`#`);if(n<0)return null;let r=t.slice(n+1);if(!r)return null;try{return decodeURIComponent(r)}catch{return r}}function i(e,t){let n=`#/${e}`;return t?`${n}#${encodeURIComponent(t)}`:n}function a(e,t){return e===t||o(e)===o(t)}function o(e){try{return decodeURIComponent(e)}catch{return e}}var s=`__okHashHistoryEntry`;function c(e){return{...typeof e==`object`&&e?e:{},[s]:!0}}function l(e){return typeof e==`object`&&!!e&&e[s]===!0}function u(){l(window.history.state)||window.history.replaceState(c(window.history.state),``)}function d(e){let{pathname:t,search:n}=window.location;window.history.replaceState(c(window.history.state),``,`${t}${n}${e}`)}function f(e){if(a(window.location.hash,e))return;let{pathname:t,search:n}=window.location;window.history.pushState(c(window.history.state),``,`${t}${n}${e}`)}function p(e){return e.endsWith(`.mdx`)?e.slice(0,-4):e.endsWith(`.md`)?e.slice(0,-3):e}function m(e,t){let n=e.replace(/^\/+|\/+$/g,``),r=n?`#/${n}/`:`#/`;return t?`${r}#${encodeURIComponent(t)}`:r}function h(e,t,n){if(e===`folder`)return m(t);let r=`#/${encodeURIComponent(t)}`;return n==null||n===``?r:`${r}?branch=${encodeURIComponent(n)}`}function g(e){if(e===`#/`)return!0;if(!e.startsWith(`#/`))return!1;let t=e.slice(2);return t.length>0&&t[0]===`?`}var _=`#/__asset__/`;function v(e){let t=e.indexOf(`?`),n=e.indexOf(`#`);return t<0?n:n<0?t:Math.min(t,n)}function y(e){if(!e.startsWith(_))return null;let t=e.slice(12);if(!t)return null;try{return t.split(`/`).map(decodeURIComponent).join(`/`)}catch{return t}}function b(e){return`${_}${e.split(`/`).map(encodeURIComponent).join(`/`)}`}var x=`#/__skill-file__/`,S=`#/__skills__`;function C(e){return e===S||e.startsWith(`${S}/`)}var w=`#/__skill-preview__/`,T=[`explore`,`detected`,`builtin`,`foreign`,`linked`];function E(e){return e!==void 0&&T.includes(e)}var D=`project`;function O(e){return[e.flavor,e.source,e.name,e.subtitle,e.level??D].map(encodeURIComponent).join(`/`)}function k(e){if(!e)return null;let n;try{n=e.split(`/`).map(decodeURIComponent)}catch{return null}if(n.length<4||n.length>6)return null;let[r,i,a,o,s,c]=n;return!E(r)||!i||!a?null:{flavor:r,source:i,name:a,subtitle:o??``,...s&&t(s)?{level:s}:{},...c?{path:c}:{}}}function A(e){let t=O(e);return e.path&&(t+=`/${encodeURIComponent(e.path)}`),`${w}${t}`}function j(e){return e.startsWith(w)?k(e.slice(20)):null}var M=`:`;function N(e){let t=e.host===void 0?e.name:`${e.name}${M}${e.host}`;return`${x}${[e.scope,t].map(encodeURIComponent).join(`/`)}/${e.path.split(`/`).map(encodeURIComponent).join(`/`)}`}function P(e){if(!e.startsWith(x))return null;let n=e.slice(17);if(!n)return null;let r;try{r=n.split(`/`).map(decodeURIComponent)}catch{return null}if(r.length<3)return null;let[i,a,...o]=r,s=o.join(`/`);if(!i||!a||!s||!t(i))return null;let c=a.indexOf(M),l=c===-1?a:a.slice(0,c),u=c===-1?void 0:a.slice(c+1);return l?{scope:i,name:l,path:s,...u?{host:u}:{}}:null}var F=/\.(md|mdx)$/i;function I(e){return e.trim().replace(/^\.\/+/,``).replace(/^\/+/,``)}function L(e){return I(e).replace(F,``)}function R(e){let t=I(e);return t?F.test(t)?t:`${t}.md`:`untitled.md`}function z(e){let t=L(e),n=t.lastIndexOf(`/`);return{initialDir:n>0?t.slice(0,n):``,suggestedName:`${n>=0?t.slice(n+1):t||`untitled`}.md`}}export{j as C,P as S,l as _,y as a,f as b,h as c,b as d,i as f,g,A as h,r as i,O as l,N as m,R as n,k as o,m as p,L as r,n as s,z as t,p as u,a as v,C as w,d as x,u as y};
@@ -1 +1 @@
1
- import{A as e}from"./dist-DTZ5Uilk.js";var t=`open-knowledge:documents-changed`,n=new Set(e.options);function r(e){return e===void 0||!Array.isArray(e)?[`files`]:[...new Set(e.filter(e=>n.has(e)))]}function i(e=[`files`]){window.dispatchEvent(new CustomEvent(t,{detail:{channels:r(e)}}))}function a(e){let n=t=>{e(r(t instanceof CustomEvent?t.detail?.channels:void 0))};return window.addEventListener(t,n),()=>window.removeEventListener(t,n)}function o(e){return e.includes(`local-targets`)||e.includes(`files`)}var s=`open-knowledge:doc-persisted`;function c(e){window.dispatchEvent(new CustomEvent(s,{detail:{docName:e}}))}function l(e){let t=t=>{if(!(t instanceof CustomEvent))return;let n=t.detail?.docName;typeof n==`string`&&n.length>0&&e(n)};return window.addEventListener(s,t),()=>window.removeEventListener(s,t)}var u=`open-knowledge:branch-changed`;function d(e){window.dispatchEvent(new CustomEvent(u,{detail:{branch:e}}))}function f(e){let t=t=>{if(!(t instanceof CustomEvent))return;let n=t.detail;e(n?.branch??null)};return window.addEventListener(u,t),()=>window.removeEventListener(u,t)}var p=`open-knowledge:templates-changed`;function m(){window.dispatchEvent(new CustomEvent(p))}function h(e){let t=()=>e();return window.addEventListener(p,t),()=>window.removeEventListener(p,t)}var g=`open-knowledge:skills-changed`;function _(){window.dispatchEvent(new CustomEvent(g))}function v(e){let t=()=>e();return window.addEventListener(g,t),()=>window.removeEventListener(g,t)}var y=`open-knowledge:skill-scope-moved`;function b(e){window.dispatchEvent(new CustomEvent(y,{detail:e}))}function x(e){let t=t=>e(t.detail);return window.addEventListener(y,t),()=>window.removeEventListener(y,t)}var S=new Set,C=(e,t)=>`${e}\u0000${t}`;function w(e,t){S.add(C(e,t)),_()}function T(e,t){S.delete(C(e,t))&&_()}var E=new Map;function D(e,t){let n=C(e,t);E.set(n,(E.get(n)??0)+1),_()}function O(e,t){let n=C(e,t),r=E.get(n);r!==void 0&&(r<=1?E.delete(n):E.set(n,r-1),_())}function k(e,t){return E.has(C(e,t))}function A(){return[...E.keys()].sort().join(``)}function j(e,t){return S.has(C(e,t))}function M(e){return S.size===0?e:e.filter(e=>!S.has(C(e.scope,e.name)))}export{l as _,c as a,v as b,_ as c,O as d,o as f,f as g,A as h,d as i,m as l,k as m,w as n,i as o,j as p,D as r,b as s,M as t,T as u,a as v,h as x,x as y};
1
+ import{A as e}from"./dist-C_QZEaeX.js";var t=`open-knowledge:documents-changed`,n=new Set(e.options);function r(e){return e===void 0||!Array.isArray(e)?[`files`]:[...new Set(e.filter(e=>n.has(e)))]}function i(e=[`files`]){window.dispatchEvent(new CustomEvent(t,{detail:{channels:r(e)}}))}function a(e){let n=t=>{e(r(t instanceof CustomEvent?t.detail?.channels:void 0))};return window.addEventListener(t,n),()=>window.removeEventListener(t,n)}function o(e){return e.includes(`local-targets`)||e.includes(`files`)}var s=`open-knowledge:doc-persisted`;function c(e){window.dispatchEvent(new CustomEvent(s,{detail:{docName:e}}))}function l(e){let t=t=>{if(!(t instanceof CustomEvent))return;let n=t.detail?.docName;typeof n==`string`&&n.length>0&&e(n)};return window.addEventListener(s,t),()=>window.removeEventListener(s,t)}var u=`open-knowledge:branch-changed`;function d(e){window.dispatchEvent(new CustomEvent(u,{detail:{branch:e}}))}function f(e){let t=t=>{if(!(t instanceof CustomEvent))return;let n=t.detail;e(n?.branch??null)};return window.addEventListener(u,t),()=>window.removeEventListener(u,t)}var p=`open-knowledge:templates-changed`;function m(){window.dispatchEvent(new CustomEvent(p))}function h(e){let t=()=>e();return window.addEventListener(p,t),()=>window.removeEventListener(p,t)}var g=`open-knowledge:skills-changed`;function _(){window.dispatchEvent(new CustomEvent(g))}function v(e){let t=()=>e();return window.addEventListener(g,t),()=>window.removeEventListener(g,t)}var y=`open-knowledge:skill-scope-moved`;function b(e){window.dispatchEvent(new CustomEvent(y,{detail:e}))}function x(e){let t=t=>e(t.detail);return window.addEventListener(y,t),()=>window.removeEventListener(y,t)}var S=new Set,C=(e,t)=>`${e}\u0000${t}`;function w(e,t){S.add(C(e,t)),_()}function T(e,t){S.delete(C(e,t))&&_()}var E=new Map;function D(e,t){let n=C(e,t);E.set(n,(E.get(n)??0)+1),_()}function O(e,t){let n=C(e,t),r=E.get(n);r!==void 0&&(r<=1?E.delete(n):E.set(n,r-1),_())}function k(e,t){return E.has(C(e,t))}function A(){return[...E.keys()].sort().join(``)}function j(e,t){return S.has(C(e,t))}function M(e){return S.size===0?e:e.filter(e=>!S.has(C(e.scope,e.name)))}export{l as _,c as a,v as b,_ as c,O as d,o as f,f as g,A as h,d as i,m as l,k as m,w as n,i as o,j as p,D as r,b as s,M as t,T as u,a as v,h as x,x as y};
@@ -1 +1 @@
1
- import{As as e,Ds as t,Es as n,Ms as r}from"./dist-DTZ5Uilk.js";import{d as i,f as a,p as o}from"./doc-paths-CbSX4XTW.js";import{c as s}from"./page-list-cache-4RZDQAIl.js";import{c,l,s as u}from"./file-tree-utils-Cs7B4muN.js";import{t as d}from"./file-tree-rename-validation-DmGgIR2S.js";var f=`application/x-open-knowledge-sidebar-item+json`,p={image:!0,video:!0,audio:!0,pdf:!0,text:!0,mermaid:!0,excalidraw:!0};function m(e){return JSON.stringify(e)}function h(e){return e?Array.from(e.types).includes(f):!1}function ee(e){return e.kind===`folder`?{target:{kind:`folder`,target:e.folderPath,folderPath:e.folderPath},hash:o(e.folderPath)}:e.kind===`asset`?{target:{kind:`asset`,target:e.assetPath,assetPath:e.assetPath,mediaKind:e.mediaKind},hash:i(e.assetPath)}:{target:s(e.docName,e.size)??{kind:`doc`,target:e.docName,docName:e.docName},hash:a(e.docName)}}function g(e){if(!e||!h(e))return null;let t=e.getData(f);if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!_(n)||n.v!==1||typeof n.kind!=`string`)return null;if(n.kind===`doc`){if(typeof n.docName!=`string`||n.docName.length===0)return null;let e=n.size;return e!==null&&typeof e!=`number`?null:{v:1,kind:`doc`,docName:n.docName,size:e}}if(n.kind===`folder`)return typeof n.folderPath==`string`?{v:1,kind:`folder`,folderPath:n.folderPath}:null;if(n.kind===`asset`){if(typeof n.assetPath!=`string`||n.assetPath.length===0)return null;let e=n.mediaKind;return e!==null&&!v(e)?null:{v:1,kind:`asset`,assetPath:n.assetPath,mediaKind:e}}return null}function _(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function v(e){return typeof e==`string`&&Object.hasOwn(p,e)}var y=`.md`,b=/\.(md|mdx)$/i;function x(r,i=y){return b.test(r)||e(r)||t(r)||n(r)?r:`${r}${i}`}function S(e){return $(e).replace(b,``)}function C(e,t){let n=$(e),r=k(t),i=t.find(e=>c(e)&&A(e,r)===n)??t.find(e=>c(e)&&T(e)===n);if(i)return i.docName;let a=S(n);return t.find(e=>{let t=T(e);return t!==n&&b.test(t)&&S(t)===a})&&b.test(n)?n:a}function w(e,t){let n=k(t);return t.find(t=>A(t,n)===e)??t.find(t=>T(t)===e)}function T(e){return l(e)?O(e.path):u(e)?e.path:x(e.docName,e.docExt)}function E(e){let t=$(e).match(b);return t?`.${t[1].toLowerCase()}`:void 0}function D(e){return $(e)}function O(e){let t=$(e.trim());return t?`${t}/`:``}function te(e){return e.endsWith(`/`)?D(e):S(e)}function k(e){let t=new Map;for(let n of e){if(!c(n))continue;let e=n.docName.match(b);if(!e)continue;let r=n.docName.slice(0,-e[0].length),i=t.get(r);i?i.add(e[0]):t.set(r,new Set([e[0]]))}return t}function A(e,t){let n=T(e);if(!c(e))return n;let r=e.docName.match(b);if(!r)return n;let i=e.docName.slice(0,-r[0].length);return(t.get(i)?.size??0)>1?n:`${e.docName}${e.docExt??y}`}function j(e){let t=k(e),n=new Set,r=[];for(let i of e){let e=A(i,t);n.has(e)||(n.add(e),r.push(e))}return r}function M(e){return[...e].sort().join(`\0`)}function N(e){return M(j(e))}function P(e,t={}){let n=new Set;for(let r of e){let e=(l(r)||u(r)?r.path:r.docName).split(`/`).filter(Boolean);if(!t.includeOkFolders&&e.includes(`.ok`))continue;if(l(r)){let e=O(r.path);e&&n.add(e)}let i=l(r)?e.length:e.length-1;for(let t=1;t<=i;t++)n.add(`${e.slice(0,t).join(`/`)}/`)}return[...n].sort()}function F(e){if(!e)return[];let t=$(e.replace(b,``)).split(`/`).filter(Boolean),n=[],r=e.endsWith(`/`)?t.length:t.length-1;for(let e=1;e<=r;e++)n.push(`${t.slice(0,e).join(`/`)}/`);return n}function I(e,t,n){let r=E(e);if(r)return r;let i=n.find(e=>c(e)&&e.docName===t);return i?i.docExt??y:Q(e).includes(`.`)?void 0:y}function L(e,t){let n=e.lastIndexOf(`/`),r=n===-1?``:e.slice(0,n+1),i=n===-1?e:e.slice(n+1),a=t.filter(e=>{if(!u(e)||!e.path.startsWith(r))return!1;let t=e.path.slice(r.length);return!t.includes(`/`)&&t.startsWith(`${i}.`)});return a.length===1?a[0].path:null}function R(e,t,n){if(E(e))return null;let r=n.find(e=>u(e)&&e.path===t);return r?r.path:Q(e).includes(`.`)?t:L(t,n)}function z(e,t){let n=e.kind===`directory`,r=n?D(e.path):C(e.path,t);if(n)return{kind:`folder`,name:$(Q(e.path)).replace(b,``),path:r,treePath:V(e.path,!0)};let i=R(e.path,r,t);if(i)return{kind:`asset`,name:$(Q(i)),path:i,treePath:i};let a=I(e.path,r,t);return{kind:`file`,name:$(Q(e.path)).replace(b,``),path:r,treePath:V(e.path,!1),docExt:a}}function B(e){return e.kind===`directory`?D(e.path):e.path}function V(e,t){return t?O(e):b.test(e)?e:`${e}${y}`}function H(e,t,n){let r=O(t),i=new Set(n);for(let t=0;t<100;t++){let n=t===0?``:` ${t+1}`;if(e===`file`){let e=`${r}Untitled${n}${y}`;if(!i.has(e))return{addPath:e,renamePath:e};continue}let a=`${r}New Folder${n}/`;if(!i.has(a))return{addPath:a,renamePath:a}}throw Error(`Could not allocate a unique tree placeholder`)}function U(e,t){return e===`file`?V(t,!1):`${D(t)}/index${y}`}function W(e,t){return t.kind===`root`||t.directoryPath==null?Q(e):`${t.directoryPath}${Q(e)}`}function G(e,t){if(t)return D(O(e));let n=S(e),r=n.lastIndexOf(`/`);return r===-1?``:n.slice(0,r)}function K(e,t){let n=D(O(e));return n?`${n}/${t}`:t}function q(e,t,n){e.append(`parentDocName`,K(t,n)),e.append(`placement`,`parent-dir`)}function J(e,t){return(t.path??K(e,t.src)).replace(/^\/+/,``)}function Y(e){let t=e.dataTransfer?.types;if(!t)return!1;let n=Array.from(t);return n.includes(`Files`)&&!n.includes(`application/x-open-knowledge-sidebar-item+json`)}function X(e){return Array.from(e.dataTransfer?.files??[]).filter(e=>e.name.length>0||e.size>0)}function Z(e,t){let n=d(e).toLowerCase();if(n===``)return null;let i=new Date().toISOString();if(n===`.md`||n===`.mdx`)return{kind:`document`,docName:S(e),docExt:n,modified:i,size:t.size};let a=n.startsWith(`.`)?n.slice(1):n;return{kind:`asset`,path:e,assetExt:a,mediaKind:r(a),modified:i,size:t.size}}function Q(e){let t=$(e),n=t.lastIndexOf(`/`),r=n===-1?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function $(e){return e.endsWith(`/`)?e.slice(0,-1):e}export{g as A,z as C,f as D,J as E,h as O,C as S,te as T,G as _,U as a,D as b,j as c,T as d,X as f,V as g,Y as h,W as i,m as j,ee as k,N as l,O as m,P as n,H as o,w as p,F as r,x as s,q as t,Z as u,B as v,M as w,S as x,L as y};
1
+ import{Ds as e,Ns as t,Os as n,js as r}from"./dist-C_QZEaeX.js";import{d as i,f as a,p as o}from"./doc-paths-DMctW8qz.js";import{c as s}from"./page-list-cache-DambRQ7B.js";import{c,l,s as u}from"./file-tree-utils-DrK6l51M.js";import{t as d}from"./file-tree-rename-validation-DmGgIR2S.js";var f=`application/x-open-knowledge-sidebar-item+json`,p={image:!0,video:!0,audio:!0,pdf:!0,text:!0,mermaid:!0,excalidraw:!0};function m(e){return JSON.stringify(e)}function h(e){return e?Array.from(e.types).includes(f):!1}function ee(e){return e.kind===`folder`?{target:{kind:`folder`,target:e.folderPath,folderPath:e.folderPath},hash:o(e.folderPath)}:e.kind===`asset`?{target:{kind:`asset`,target:e.assetPath,assetPath:e.assetPath,mediaKind:e.mediaKind},hash:i(e.assetPath)}:{target:s(e.docName,e.size)??{kind:`doc`,target:e.docName,docName:e.docName},hash:a(e.docName)}}function g(e){if(!e||!h(e))return null;let t=e.getData(f);if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!_(n)||n.v!==1||typeof n.kind!=`string`)return null;if(n.kind===`doc`){if(typeof n.docName!=`string`||n.docName.length===0)return null;let e=n.size;return e!==null&&typeof e!=`number`?null:{v:1,kind:`doc`,docName:n.docName,size:e}}if(n.kind===`folder`)return typeof n.folderPath==`string`?{v:1,kind:`folder`,folderPath:n.folderPath}:null;if(n.kind===`asset`){if(typeof n.assetPath!=`string`||n.assetPath.length===0)return null;let e=n.mediaKind;return e!==null&&!v(e)?null:{v:1,kind:`asset`,assetPath:n.assetPath,mediaKind:e}}return null}function _(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function v(e){return typeof e==`string`&&Object.hasOwn(p,e)}var y=`.md`,b=/\.(md|mdx)$/i;function x(t,i=y){return b.test(t)||r(t)||n(t)||e(t)?t:`${t}${i}`}function S(e){return $(e).replace(b,``)}function C(e,t){let n=$(e),r=k(t),i=t.find(e=>c(e)&&A(e,r)===n)??t.find(e=>c(e)&&T(e)===n);if(i)return i.docName;let a=S(n);return t.find(e=>{let t=T(e);return t!==n&&b.test(t)&&S(t)===a})&&b.test(n)?n:a}function w(e,t){let n=k(t);return t.find(t=>A(t,n)===e)??t.find(t=>T(t)===e)}function T(e){return l(e)?O(e.path):u(e)?e.path:x(e.docName,e.docExt)}function E(e){let t=$(e).match(b);return t?`.${t[1].toLowerCase()}`:void 0}function D(e){return $(e)}function O(e){let t=$(e.trim());return t?`${t}/`:``}function te(e){return e.endsWith(`/`)?D(e):S(e)}function k(e){let t=new Map;for(let n of e){if(!c(n))continue;let e=n.docName.match(b);if(!e)continue;let r=n.docName.slice(0,-e[0].length),i=t.get(r);i?i.add(e[0]):t.set(r,new Set([e[0]]))}return t}function A(e,t){let n=T(e);if(!c(e))return n;let r=e.docName.match(b);if(!r)return n;let i=e.docName.slice(0,-r[0].length);return(t.get(i)?.size??0)>1?n:`${e.docName}${e.docExt??y}`}function j(e){let t=k(e),n=new Set,r=[];for(let i of e){let e=A(i,t);n.has(e)||(n.add(e),r.push(e))}return r}function M(e){return[...e].sort().join(`\0`)}function N(e){return M(j(e))}function P(e,t={}){let n=new Set;for(let r of e){let e=(l(r)||u(r)?r.path:r.docName).split(`/`).filter(Boolean);if(!t.includeOkFolders&&e.includes(`.ok`))continue;if(l(r)){let e=O(r.path);e&&n.add(e)}let i=l(r)?e.length:e.length-1;for(let t=1;t<=i;t++)n.add(`${e.slice(0,t).join(`/`)}/`)}return[...n].sort()}function F(e){if(!e)return[];let t=$(e.replace(b,``)).split(`/`).filter(Boolean),n=[],r=e.endsWith(`/`)?t.length:t.length-1;for(let e=1;e<=r;e++)n.push(`${t.slice(0,e).join(`/`)}/`);return n}function I(e,t,n){let r=E(e);if(r)return r;let i=n.find(e=>c(e)&&e.docName===t);return i?i.docExt??y:Q(e).includes(`.`)?void 0:y}function L(e,t){let n=e.lastIndexOf(`/`),r=n===-1?``:e.slice(0,n+1),i=n===-1?e:e.slice(n+1),a=t.filter(e=>{if(!u(e)||!e.path.startsWith(r))return!1;let t=e.path.slice(r.length);return!t.includes(`/`)&&t.startsWith(`${i}.`)});return a.length===1?a[0].path:null}function R(e,t,n){if(E(e))return null;let r=n.find(e=>u(e)&&e.path===t);return r?r.path:Q(e).includes(`.`)?t:L(t,n)}function z(e,t){let n=e.kind===`directory`,r=n?D(e.path):C(e.path,t);if(n)return{kind:`folder`,name:$(Q(e.path)).replace(b,``),path:r,treePath:V(e.path,!0)};let i=R(e.path,r,t);if(i)return{kind:`asset`,name:$(Q(i)),path:i,treePath:i};let a=I(e.path,r,t);return{kind:`file`,name:$(Q(e.path)).replace(b,``),path:r,treePath:V(e.path,!1),docExt:a}}function B(e){return e.kind===`directory`?D(e.path):e.path}function V(e,t){return t?O(e):b.test(e)?e:`${e}${y}`}function H(e,t,n){let r=O(t),i=new Set(n);for(let t=0;t<100;t++){let n=t===0?``:` ${t+1}`;if(e===`file`){let e=`${r}Untitled${n}${y}`;if(!i.has(e))return{addPath:e,renamePath:e};continue}let a=`${r}New Folder${n}/`;if(!i.has(a))return{addPath:a,renamePath:a}}throw Error(`Could not allocate a unique tree placeholder`)}function U(e,t){return e===`file`?V(t,!1):`${D(t)}/index${y}`}function W(e,t){return t.kind===`root`||t.directoryPath==null?Q(e):`${t.directoryPath}${Q(e)}`}function G(e,t){if(t)return D(O(e));let n=S(e),r=n.lastIndexOf(`/`);return r===-1?``:n.slice(0,r)}function K(e,t){let n=D(O(e));return n?`${n}/${t}`:t}function q(e,t,n){e.append(`parentDocName`,K(t,n)),e.append(`placement`,`parent-dir`)}function J(e,t){return(t.path??K(e,t.src)).replace(/^\/+/,``)}function Y(e){let t=e.dataTransfer?.types;if(!t)return!1;let n=Array.from(t);return n.includes(`Files`)&&!n.includes(`application/x-open-knowledge-sidebar-item+json`)}function X(e){return Array.from(e.dataTransfer?.files??[]).filter(e=>e.name.length>0||e.size>0)}function Z(e,n){let r=d(e).toLowerCase();if(r===``)return null;let i=new Date().toISOString();if(r===`.md`||r===`.mdx`)return{kind:`document`,docName:S(e),docExt:r,modified:i,size:n.size};let a=r.startsWith(`.`)?r.slice(1):r;return{kind:`asset`,path:e,assetExt:a,mediaKind:t(a),modified:i,size:n.size}}function Q(e){let t=$(e),n=t.lastIndexOf(`/`),r=n===-1?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function $(e){return e.endsWith(`/`)?e.slice(0,-1):e}export{g as A,z as C,f as D,J as E,h as O,C as S,te as T,G as _,U as a,D as b,j as c,T as d,X as f,V as g,Y as h,W as i,m as j,ee as k,N as l,O as m,P as n,H as o,w as p,F as r,x as s,q as t,Z as u,B as v,M as w,S as x,L as y};
@@ -1 +1 @@
1
- import{Kr as e,Mo as t,Qr as n}from"./dist-DTZ5Uilk.js";function r(e){return e.kind===`asset`}function i(e){return e.kind===`document`}function a(e){return e.kind===`folder`}function o(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??s(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 s(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 c(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 l(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):``}function u(e){return e.split(`/`).some(e=>e.toLowerCase()===`.ok`)}function d(e,t){return t&&e!==`document`&&e!==`folder`}function f(t,n){return!n&&e(t)}function p(t,r={}){let{showHiddenFiles:i=!1,showOnlyMarkdownFiles:a=!1,showOkFolders:o=!1}=r;return t.filter(t=>{let r=t.docName??t.path??``;if(r===``||d(t.kind,a))return!1;let s=r.split(`/`),c=s.indexOf(`.ok`);if(c!==-1){if(!o)return!1;let t=s.slice(0,c).join(`/`);return i||t===``||!e(t)}return n(r)?!1:!f(r,i)})}function m(e,r={}){let{showHiddenFiles:i=!1,showOnlyMarkdownFiles:a=!1}=r,o=e.docName??e.path??``;return o===``||t(o)||n(o)||u(o)?{hiddenFiles:!1,onlyMarkdownFiles:!1}:{hiddenFiles:f(o,i),onlyMarkdownFiles:d(e.kind,a)}}function h(e){let{visibility:t={},unfilteredRootEntryCount:n,knownPageCount:r}=e;return(n>0||r>0)&&(t.showOnlyMarkdownFiles??!1)?`filtered-to-zero`:`true-empty`}export{p as a,i as c,o as d,l as i,a as l,h as n,u as o,c as r,r as s,m as t,s as u};
1
+ import{$r as e,No as t,qr as n}from"./dist-C_QZEaeX.js";function r(e){return e.kind===`asset`}function i(e){return e.kind===`document`}function a(e){return e.kind===`folder`}function o(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??s(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 s(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 c(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 l(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):``}function u(e){return e.split(`/`).some(e=>e.toLowerCase()===`.ok`)}function d(e,t){return t&&e!==`document`&&e!==`folder`}function f(e,t){return!t&&n(e)}function p(t,r={}){let{showHiddenFiles:i=!1,showOnlyMarkdownFiles:a=!1,showOkFolders:o=!1}=r;return t.filter(t=>{let r=t.docName??t.path??``;if(r===``||d(t.kind,a))return!1;let s=r.split(`/`),c=s.indexOf(`.ok`);if(c!==-1){if(!o)return!1;let e=s.slice(0,c).join(`/`);return i||e===``||!n(e)}return e(r)?!1:!f(r,i)})}function m(n,r={}){let{showHiddenFiles:i=!1,showOnlyMarkdownFiles:a=!1}=r,o=n.docName??n.path??``;return o===``||t(o)||e(o)||u(o)?{hiddenFiles:!1,onlyMarkdownFiles:!1}:{hiddenFiles:f(o,i),onlyMarkdownFiles:d(n.kind,a)}}function h(e){let{visibility:t={},unfilteredRootEntryCount:n,knownPageCount:r}=e;return(n>0||r>0)&&(t.showOnlyMarkdownFiles??!1)?`filtered-to-zero`:`true-empty`}export{p as a,i as c,o as d,l as i,a as l,h as n,u as o,c as r,r as s,m as t,s as u};
@@ -1 +1 @@
1
- import{l as e}from"./documents-events-DxL5ysM1.js";import{t}from"./parse-api-error-Dd8VI2eu.js";import{t as n}from"./createLucideIcon-BulbvLvN.js";var r=n(`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`}]]);async function i(e){return t(await e.json().catch(()=>null))??`HTTP ${e.status}`}async function a(e,t){try{let n=await fetch(`/api/folder-config`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({path:e,frontmatter:t})});return n.ok?{ok:!0}:{ok:!1,error:await i(n)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function o(t){try{let n=await fetch(`/api/template`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,created:r?.created??!1,warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function s(t,n){try{let r=`?folder=${encodeURIComponent(t)}&name=${encodeURIComponent(n)}`,a=await fetch(`/api/template${r}`,{method:`DELETE`});if(!a.ok)return{ok:!1,error:await i(a)};let o=await a.json().catch(()=>null);return e(),{ok:!0,existed:o?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function c(t){try{let n=await fetch(`/api/template`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,committed:r?.committed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function l(t){try{let n=await fetch(`/api/template/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,path:r?.path??``,created:r?.created??!1,warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}export{o as a,a as i,l as n,r as o,c as r,s as t};
1
+ import{l as e}from"./documents-events-CwqQxQT5.js";import{t}from"./parse-api-error-Dd8VI2eu.js";import{t as n}from"./createLucideIcon-BulbvLvN.js";var r=n(`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`}]]);async function i(e){return t(await e.json().catch(()=>null))??`HTTP ${e.status}`}async function a(e,t){try{let n=await fetch(`/api/folder-config`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({path:e,frontmatter:t})});return n.ok?{ok:!0}:{ok:!1,error:await i(n)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function o(t){try{let n=await fetch(`/api/template`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,created:r?.created??!1,warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function s(t,n){try{let r=`?folder=${encodeURIComponent(t)}&name=${encodeURIComponent(n)}`,a=await fetch(`/api/template${r}`,{method:`DELETE`});if(!a.ok)return{ok:!1,error:await i(a)};let o=await a.json().catch(()=>null);return e(),{ok:!0,existed:o?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function c(t){try{let n=await fetch(`/api/template`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,committed:r?.committed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function l(t){try{let n=await fetch(`/api/template/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,path:r?.path??``,created:r?.created??!1,warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}export{o as a,a as i,l as n,r as o,c as r,s as t};
@@ -0,0 +1 @@
1
+ import"./dist-C_QZEaeX.js";import{t as e}from"./dist-Cr4-nBVI.js";import{t}from"./messages-CF7zITDG.js";e.load(`en`,t.messages),e.activate(`en`);