@inkeep/open-knowledge 0.52.0 → 0.52.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 (201) hide show
  1. package/dist/{acp-harness-probe-DwjAsAgs.mjs → acp-harness-probe-C_3yC8me.mjs} +2 -2
  2. package/dist/assets/skills/project/references/linking.md +1 -1
  3. package/dist/cli.mjs +43 -43
  4. package/dist/constants-DfM3I5S9.mjs +2 -0
  5. package/dist/git-handle-B7hMkLUm.mjs +1 -0
  6. package/dist/{git-handle-KAEFG2Xp.mjs → git-handle-CSHsjfXr.mjs} +2 -2
  7. package/dist/index.d.mts +2 -0
  8. package/dist/index.mjs +192 -190
  9. package/dist/init-CQQVpPkh.mjs +1 -0
  10. package/dist/{init-BoGgG4hO.mjs → init-fqDKH9Bq.mjs} +5 -5
  11. package/dist/{launch-json-removal-BFicWt7A.mjs → launch-json-removal-Dy8UutGX.mjs} +2 -2
  12. package/dist/{loader-DZv3lzzV.mjs → loader-Bnc6dbfj.mjs} +2 -2
  13. package/dist/loader-D3BVi7qE.mjs +1 -0
  14. package/dist/md-manager-qfeJIs4M.mjs +2 -0
  15. package/dist/{open-browser-CQP79XeJ.mjs → open-browser-jHUUD-04.mjs} +2 -2
  16. package/dist/parse-worker.mjs +1 -1
  17. package/dist/preview-BTgZceSh.mjs +1 -0
  18. package/dist/{preview-YtpCVo6q.mjs → preview-CbQFdsEY.mjs} +2 -2
  19. package/dist/public/assets/{ActivityModeContent-NOKRoNvx.js → ActivityModeContent-CfsQ1yYS.js} +1 -1
  20. package/dist/public/assets/{AgentDiffPane-D6y-RNd5.js → AgentDiffPane-CNcJa9dd.js} +1 -1
  21. package/dist/public/assets/{AgentThreadClientBinder-BFNjsn1A.js → AgentThreadClientBinder-C7UyHsZU.js} +1 -1
  22. package/dist/public/assets/{ChangedOutsideBadge-CTtTUnmJ.js → ChangedOutsideBadge-C8kGA2y7.js} +1 -1
  23. package/dist/public/assets/CodeMirrorPropInput-BFuQFciv.js +3 -0
  24. package/dist/public/assets/DiffView-C-imhjB8.js +3 -0
  25. package/dist/public/assets/DocumentContext-Dby66SPb.js +38 -0
  26. package/dist/public/assets/{EditorModeToggle-BQwt-g16.js → EditorModeToggle-C66Nkjv9.js} +1 -1
  27. package/dist/public/assets/{EnableSyncConfirmDialog-CeD6U8jw.js → EnableSyncConfirmDialog-a9VoUq0a.js} +1 -1
  28. package/dist/public/assets/FeedbackForm-8nRLEz5R.js +1 -0
  29. package/dist/public/assets/{GraphPanel-D3eqDrvs.js → GraphPanel-0AhiEqQX.js} +2 -2
  30. package/dist/public/assets/{ImportSkillDialog-Dus8C3ya.js → ImportSkillDialog-CU4B1sIh.js} +1 -1
  31. package/dist/public/assets/{LintConfigEditor-13jZ4Dsg.js → LintConfigEditor-HyAVziIr.js} +1 -1
  32. package/dist/public/assets/ManagedArtifactProperties-C8GKISON.js +2 -0
  33. package/dist/public/assets/ManagedArtifactProperties-CTUGFCNh.js +1 -0
  34. package/dist/public/assets/{McpConsentDialogBody-CmWQQsvA.js → McpConsentDialogBody-DHNKc5z1.js} +1 -1
  35. package/dist/public/assets/{MermaidDocEditor-BwM26FyA.js → MermaidDocEditor-DZwTQ4gl.js} +1 -1
  36. package/dist/public/assets/{ReportBugDialogBody-AcYxCdAP.js → ReportBugDialogBody-Cl-knrTl.js} +1 -1
  37. package/dist/public/assets/{SchemaConfigEditor-BMX58iGg.js → SchemaConfigEditor-DXos_cHI.js} +1 -1
  38. package/dist/public/assets/{SessionsHost-0gH5fj7L.js → SessionsHost-Trmtu1eL.js} +2 -2
  39. package/dist/public/assets/{SettingsDialogBody-CSGA73Nq.js → SettingsDialogBody-CoTz-Sjn.js} +4 -4
  40. package/dist/public/assets/{ShareBranchSwitchDialog-ClrT-3XL.js → ShareBranchSwitchDialog-BasumVv5.js} +1 -1
  41. package/dist/public/assets/{ShareReceiveDialog-CGp7LdmP.js → ShareReceiveDialog-Di5kpFZF.js} +1 -1
  42. package/dist/public/assets/{ShareReceiveMissDialog-CjusDUpU.js → ShareReceiveMissDialog-D0Uy4ElT.js} +1 -1
  43. package/dist/public/assets/{SkillEditBanner-DAXtbz8B.js → SkillEditBanner-DvyisUoP.js} +1 -1
  44. package/dist/public/assets/{SkillOriginInline-CSKIzMpb.js → SkillOriginInline-CRiror8A.js} +1 -1
  45. package/dist/public/assets/{SkillToolbarControls-Co9gbY4r.js → SkillToolbarControls-DdW_8JRU.js} +1 -1
  46. package/dist/public/assets/{SlidesToolbarControls-bvIjkbin.js → SlidesToolbarControls-ldyC9Am0.js} +1 -1
  47. package/dist/public/assets/SourceEditor-CNFa0lwh.js +1 -0
  48. package/dist/public/assets/{TerminalPanel-CCfioVTh.js → TerminalPanel-Dqvr0XcU.js} +3 -3
  49. package/dist/public/assets/{TerminalWindowApp-CXQsiNzb.js → TerminalWindowApp-Bf-V2DO3.js} +1 -1
  50. package/dist/public/assets/{TextDocEditor-BhSgQ-DA.js → TextDocEditor-C3MlFWhG.js} +1 -1
  51. package/dist/public/assets/{ThreadView-DfJo0d_V.js → ThreadView-CbcAWyf3.js} +4 -4
  52. package/dist/public/assets/{TimelineDiffPane-NIZsgHzq.js → TimelineDiffPane-DpvzG-7k.js} +1 -1
  53. package/dist/public/assets/{agent-diff-store-B8KERfT2.js → agent-diff-store-Co9g5IfS.js} +1 -1
  54. package/dist/public/assets/auth-state-cache-DbSRbNlV.js +11 -0
  55. package/dist/public/assets/client-version-Bjkw91Sx.js +1 -0
  56. package/dist/public/assets/cm-theme-DZT10ikr.js +1 -0
  57. package/dist/public/assets/comment-chips-W7NIm-0i.js +5 -0
  58. package/dist/public/assets/config-provider-CfA6TibZ.js +5 -0
  59. package/dist/public/assets/{dist-DoYGOGZp.js → dist-BDUZWXxp.js} +138 -136
  60. package/dist/public/assets/dist-BRmJz2fY.js +1 -0
  61. package/dist/public/assets/dist-BVpMlVG3.js +1 -0
  62. package/dist/public/assets/{dist-DPG-4B8V.js → dist-BgBcg3TP.js} +1 -1
  63. package/dist/public/assets/{dist-DwFjOxj-.js → dist-BiwzWInZ.js} +1 -1
  64. package/dist/public/assets/dist-CkFATl39.js +1 -0
  65. package/dist/public/assets/{dist-BSAh-TK7.js → dist-DAqA-GDU.js} +1 -1
  66. package/dist/public/assets/{dist-DU3mip8Z.js → dist-DM6osNK2.js} +1 -1
  67. package/dist/public/assets/dist-DQyQPRvE.js +1 -0
  68. package/dist/public/assets/dist-DfLFtHzK.js +23 -0
  69. package/dist/public/assets/dist-DsH7eETa.js +9 -0
  70. package/dist/public/assets/dist-dO0W-CVt.js +6 -0
  71. package/dist/public/assets/dist-ofeGnIBD.js +1 -0
  72. package/dist/public/assets/dist-z-y_5Bgj.js +2 -0
  73. package/dist/public/assets/{doc-paths-SFSlIMRQ.js → doc-paths-B_EmP8cW.js} +1 -1
  74. package/dist/public/assets/documents-events-CyHlKMaL.js +1 -0
  75. package/dist/public/assets/{file-tree-adapter-oSszPvAJ.js → file-tree-adapter-C10x5wS8.js} +1 -1
  76. package/dist/public/assets/{file-tree-utils-BG5IgULP.js → file-tree-utils-ByMdqLJt.js} +1 -1
  77. package/dist/public/assets/{folder-config-api-7-6Lsx3w.js → folder-config-api-Cczw7DYP.js} +1 -1
  78. package/dist/public/assets/{follow-file-BukSIwm0.js → follow-file-N29KZEEf.js} +2 -2
  79. package/dist/public/assets/globals-tIUZlcbW.css +1 -0
  80. package/dist/public/assets/i18n-D_9uJD0A.js +1 -0
  81. package/dist/public/assets/index-C1WI_OhQ.js +2095 -0
  82. package/dist/public/assets/lint-config-client-CYdW-Tni.js +1 -0
  83. package/dist/public/assets/{markdownlint-rule-browser-CljNGtQ4.js → markdownlint-rule-browser-sb35mRDf.js} +1 -1
  84. package/dist/public/assets/messages-BFSFw083.js +1 -0
  85. package/dist/public/assets/messages-But-gxxm.js +1 -0
  86. package/dist/public/assets/messages-C2dy97-C.js +1 -0
  87. package/dist/public/assets/messages-C6mfKAsF.js +1 -0
  88. package/dist/public/assets/messages-CT0uUq60.js +1 -0
  89. package/dist/public/assets/messages-CoCHeX4T.js +1 -0
  90. package/dist/public/assets/messages-D2Xjng5y.js +1 -0
  91. package/dist/public/assets/messages-DGIb-W2n.js +1 -0
  92. package/dist/public/assets/messages-DZjmC-3B.js +1 -0
  93. package/dist/public/assets/messages-DmRUKkYi.js +1 -0
  94. package/dist/public/assets/messages-Vp_S0vgN.js +1 -0
  95. package/dist/public/assets/navigation-targets-DNQLGx4S.js +1 -0
  96. package/dist/public/assets/{open-managed-artifact-tab-ChY4GdUc.js → open-managed-artifact-tab-DsfVWdN2.js} +1 -1
  97. package/dist/public/assets/{pending-receive-nav-store-CzDpDZMG.js → pending-receive-nav-store-B6wCDw0y.js} +1 -1
  98. package/dist/public/assets/prop-types-BMoAzRJb.js +1 -0
  99. package/dist/public/assets/{receive-store-BJRLpWDq.js → receive-store-BM_DwTAf.js} +1 -1
  100. package/dist/public/assets/{selection-context-5FLhwrRu.js → selection-context-C25HN8ah.js} +1 -1
  101. package/dist/public/assets/{skill-actions-DwL1MSzH.js → skill-actions-C6bRjFrb.js} +2 -2
  102. package/dist/public/assets/{skill-scope-ByxyMqpD.js → skill-scope-B5Xgc-WT.js} +1 -1
  103. package/dist/public/assets/{skills-api-CD1FoT1f.js → skills-api-DoO3XjKb.js} +1 -1
  104. package/dist/public/assets/{src-Dlkd7M23.js → src-C_rxWG-w.js} +2 -2
  105. package/dist/public/assets/{tag-pill-input-D9TPdQQY.js → tag-pill-input-cqPLLshm.js} +1 -1
  106. package/dist/public/assets/{target-navigation-intent-Dn77egCV.js → target-navigation-intent-lLql9jwx.js} +1 -1
  107. package/dist/public/assets/{terminal-cli-display-ceeLXdxI.js → terminal-cli-display-CsGUuG_t.js} +1 -1
  108. package/dist/public/assets/{terminal-launch-events-un6YHfuE.js → terminal-launch-events-CkaZrvkd.js} +1 -1
  109. package/dist/public/assets/{terminal-telemetry-DATv4VP7.js → terminal-telemetry-fn9k9pw_.js} +1 -1
  110. package/dist/public/assets/{text-viewer-languages-4qbY4VOt.js → text-viewer-languages-oVDGEYYY.js} +2 -2
  111. package/dist/public/assets/typing-burst-detector-CHbBPNo9.js +8 -0
  112. package/dist/public/assets/{uninstall-97GnPmGj.js → uninstall-B5VY4DdS.js} +1 -1
  113. package/dist/public/assets/{use-activity-panel-DwhRkMuD.js → use-activity-panel-7n2VLfXF.js} +1 -1
  114. package/dist/public/assets/{use-apply-config-color-theme-Cwl6JTaa.js → use-apply-config-color-theme-Qaeabbc6.js} +1 -1
  115. package/dist/public/assets/{use-collab-url-B6fAlmsp.js → use-collab-url-QfvPJNi5.js} +1 -1
  116. package/dist/public/assets/{use-live-xterm-theme-XZ_rkAuD.js → use-live-xterm-theme-Cqejj-mM.js} +1 -1
  117. package/dist/public/assets/{use-open-skill-C9c3oqii.js → use-open-skill-5_eskJGl.js} +1 -1
  118. package/dist/public/assets/{use-popular-skills-iSI9dtuW.js → use-popular-skills-BXLqRPAb.js} +1 -1
  119. package/dist/public/assets/{use-settings-route-D49weK6e.js → use-settings-route-BE811wlS.js} +1 -1
  120. package/dist/public/assets/{use-skill-origin-CbV3B2nV.js → use-skill-origin-BUCP6ANG.js} +1 -1
  121. package/dist/public/assets/{use-skills-DWcQk94I.js → use-skills-Cffo4E-9.js} +1 -1
  122. package/dist/public/assets/{use-terminal-enabled-CkJ-MlfR.js → use-terminal-enabled-C-WvHqPJ.js} +1 -1
  123. package/dist/public/assets/use-timeline-entry-diff-DCf5cDVg.js +6 -0
  124. package/dist/public/assets/{use-workspace-DTMCKV7B.js → use-workspace-DpNyv2nG.js} +1 -1
  125. package/dist/public/index.html +63 -63
  126. package/dist/public/uninstall.html +6 -6
  127. package/dist/{repair-launch-json-1WD5loxw.mjs → repair-launch-json-CBzcD3X_.mjs} +2 -2
  128. package/dist/{repair-mcp-configs-BAT9F_0R.mjs → repair-mcp-configs-DP9uPVNr.mjs} +2 -2
  129. package/dist/{repair-skills-CBiPGgau.mjs → repair-skills-Cdqec7U0.mjs} +2 -2
  130. package/dist/repair-skills-DCg6eBNi.mjs +1 -0
  131. package/dist/{server-lock-BV0Ktccm.mjs → server-lock-CU3-_gnL.mjs} +2 -2
  132. package/dist/server-lock-D833sKBI.mjs +1 -0
  133. package/dist/{skill-teardown-RIfU9RXJ.mjs → skill-teardown-CuyNWxzR.mjs} +2 -2
  134. package/dist/{src-CTjAV_8D.mjs → src-CdD-yezs.mjs} +4 -4
  135. package/dist/src-Cxffy8op.mjs +2038 -0
  136. package/dist/{src-DStuuia4.mjs → src-D7BnleBG.mjs} +1 -1
  137. package/dist/{src-DMpGVIiQ.mjs → src-DE02-xKN.mjs} +123 -121
  138. package/dist/src-Dns-dOR5.mjs +1 -0
  139. package/dist/start-B4CFm73f.mjs +1 -0
  140. package/dist/start-DtUGEi6H.mjs +12 -0
  141. package/dist/{ui-CjlnXaCK.mjs → ui-ColO8lUq.mjs} +3 -3
  142. package/dist/ui-F9aOCyp-.mjs +1 -0
  143. package/dist/{write-project-skill-KUk3TJzG.mjs → write-project-skill-U5FHNOHQ.mjs} +2 -2
  144. package/package.json +4 -4
  145. package/dist/constants-D23ArAh3.mjs +0 -2
  146. package/dist/git-handle-Bw80Zwhs.mjs +0 -1
  147. package/dist/init-BwGT5lTe.mjs +0 -1
  148. package/dist/loader-B2vSSBD6.mjs +0 -1
  149. package/dist/md-manager-DiVPjAYl.mjs +0 -2
  150. package/dist/preview-CPRgyoDj.mjs +0 -1
  151. package/dist/public/assets/CodeMirrorPropInput-BPYAZ8kt.js +0 -3
  152. package/dist/public/assets/DiffView-BkhkquRc.js +0 -3
  153. package/dist/public/assets/DocumentContext-Cmtye82b.js +0 -38
  154. package/dist/public/assets/FeedbackForm-BiAgA0cr.js +0 -1
  155. package/dist/public/assets/ManagedArtifactProperties-BDvo6tfo.js +0 -1
  156. package/dist/public/assets/ManagedArtifactProperties-ppSBOaES.js +0 -2
  157. package/dist/public/assets/SourceEditor-BgLK1i4n.js +0 -1
  158. package/dist/public/assets/auth-state-cache-CdxRaOii.js +0 -11
  159. package/dist/public/assets/client-version-DygZeHKE.js +0 -1
  160. package/dist/public/assets/cm-theme-NiQt8zc0.js +0 -1
  161. package/dist/public/assets/comment-chips-DUivrMCA.js +0 -5
  162. package/dist/public/assets/config-provider-hPtL5Ruf.js +0 -5
  163. package/dist/public/assets/dist-BUDkMEzD.js +0 -1
  164. package/dist/public/assets/dist-C6lhy_gK.js +0 -1
  165. package/dist/public/assets/dist-CADCdgrq.js +0 -23
  166. package/dist/public/assets/dist-CrYLos7c.js +0 -2
  167. package/dist/public/assets/dist-DbcFk_pj.js +0 -1
  168. package/dist/public/assets/dist-DpjZjxsY.js +0 -6
  169. package/dist/public/assets/dist-Ds8NLlxa.js +0 -9
  170. package/dist/public/assets/dist-RxK2lKIj.js +0 -1
  171. package/dist/public/assets/dist-lGeJn8Qx.js +0 -1
  172. package/dist/public/assets/documents-events-a5eIuqSk.js +0 -1
  173. package/dist/public/assets/globals-DXwGOGPM.css +0 -1
  174. package/dist/public/assets/i18n-BAXNC2k8.js +0 -1
  175. package/dist/public/assets/index-BRKZBUZB.js +0 -2095
  176. package/dist/public/assets/lint-config-client-DPKnQGxT.js +0 -1
  177. package/dist/public/assets/messages-B6vvv7H-.js +0 -1
  178. package/dist/public/assets/messages-Bf16a61t.js +0 -1
  179. package/dist/public/assets/messages-BlMkdPL-.js +0 -1
  180. package/dist/public/assets/messages-BrwWcQ1q.js +0 -1
  181. package/dist/public/assets/messages-Bsokz5p_.js +0 -1
  182. package/dist/public/assets/messages-CWnVB_17.js +0 -1
  183. package/dist/public/assets/messages-CgqvsJOb.js +0 -1
  184. package/dist/public/assets/messages-D3GzXczV.js +0 -1
  185. package/dist/public/assets/messages-DAiMiSQb.js +0 -1
  186. package/dist/public/assets/messages-DKla4fHa.js +0 -1
  187. package/dist/public/assets/messages-DhVrLKqA.js +0 -1
  188. package/dist/public/assets/navigation-targets-CmqNPgrG.js +0 -1
  189. package/dist/public/assets/prop-types-BuByQU-C.js +0 -1
  190. package/dist/public/assets/typing-burst-detector-CsTrQNxg.js +0 -8
  191. package/dist/public/assets/use-timeline-entry-diff-CJCmKbXD.js +0 -6
  192. package/dist/repair-skills-D8TKPOmv.mjs +0 -1
  193. package/dist/server-lock-B4Z9_lXn.mjs +0 -1
  194. package/dist/src-7_R2_5l2.mjs +0 -1
  195. package/dist/src-CLSt7s4C.mjs +0 -2033
  196. package/dist/start-BRIHMdxp.mjs +0 -1
  197. package/dist/start-uUPf2DlX.mjs +0 -12
  198. package/dist/ui-DQkCLucF.mjs +0 -1
  199. /package/dist/public/assets/{globals-Ctlj0TIx.js → globals-CLY_4Hw9.js} +0 -0
  200. /package/dist/public/assets/{lint-plugin-meta-CKntN3M1.js → lint-plugin-meta-FPoTE-0t.js} +0 -0
  201. /package/dist/public/assets/{skeleton-D4wPMdlV.js → skeleton-BOVIbSHk.js} +0 -0
@@ -1 +1 @@
1
- import{r as e}from"./dist-Nvb76hAm.js";import{Ba as t,Bt as n,Ra as r,Wa as i}from"./dist-DoYGOGZp.js";function a(e){return e.path.split(`/`).slice(0,-1).join(`/`)}var o=[`project`,`global`];function s(e){return{project:new Set(e.filter(e=>e.scope===`project`).map(e=>e.name)),global:new Set(e.filter(e=>e.scope===`global`).map(e=>e.name))}}function c(e){return e.startsWith(`open-knowledge-pack-`)?e.slice(i.length):e}function l(e){let t=e.path.replace(/\/SKILL\.mdx?$/i,``);return e.scope===`global`?`~/${t}`:t}function u(e){return e.replace(/^\/(?:Users|home)\/[^/]+/,`~`).replace(/^\/root/,`~`)}function d(e){let t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):e}function f(){let{_:t}=e();return{project:t({id:`e0NrBM`}),global:t({id:`2GT3Hf`})}}function p(){let{_:t}=e();return{project:t({id:`Es3G-g`}),global:t({id:`fvrHin`})}}function m(e,n){if(e.includes(`/`))return n===`global`?`~/${e}`:e;let i=e===`agents`?`.agents/skills`:(n===`global`?t:r)[e]??`.${e}/skills`;return n===`global`?`~/${i}`:i}function h(e,t){return!e||t===``?[]:Object.keys(e).filter(n=>e[n]===t)}function g(e){let t=e.hostAliases??{},n=e=>e.split(`/`).slice(0,-1).join(`/`),r=new Set(e.hosts),i=new Set([...e.hosts.filter(e=>!e.includes(`/`)).map(t=>m(t,e.scope).replace(/^~\//,``)),...(e.customPlacements??[]).map(e=>n(e.path)),...e.path.includes(`/`)?[n(e.path.replace(/\/SKILL\.mdx?$/i,``))]:[]]);return Object.entries(t).filter(([e,t])=>!r.has(e)&&i.has(t)).map(([e])=>e)}function _(e){let t=new Set(e.symlinkedHosts??[]),n=[],r=new Set,i=(e,t)=>{r.has(e)||(r.add(e),n.push({dir:e,symlink:t}))};i(l(e),t.has(e.hosts[0]??``));for(let n of e.hosts)i(`${m(n,e.scope)}/${e.name}`,t.has(n));for(let t of e.customPlacements??[])i(t.path,t.mode===`link`);return n}function v(e,t=e.hosts){let r=n.options,i=g(e);return[...t.includes(`agents`)?[`agents`]:[],...r.filter(e=>t.includes(e)||i.includes(e)),...(e.customPlacements??[]).map(e=>a(e))]}export{d as a,m as c,p as d,f,v as i,s as l,h as n,c as o,a as r,_ as s,o as t,u};
1
+ import{r as e}from"./dist-Nvb76hAm.js";import{Ja as t,Ka as n,Qa as r,Vt as i}from"./dist-BDUZWXxp.js";function a(e){return e.path.split(`/`).slice(0,-1).join(`/`)}var o=[`project`,`global`];function s(e){return{project:new Set(e.filter(e=>e.scope===`project`).map(e=>e.name)),global:new Set(e.filter(e=>e.scope===`global`).map(e=>e.name))}}function c(e){return e.startsWith(`open-knowledge-pack-`)?e.slice(r.length):e}function l(e){let t=e.path.replace(/\/SKILL\.mdx?$/i,``);return e.scope===`global`?`~/${t}`:t}function u(e){return e.replace(/^\/(?:Users|home)\/[^/]+/,`~`).replace(/^\/root/,`~`)}function d(e){let t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):e}function f(){let{_:t}=e();return{project:t({id:`e0NrBM`}),global:t({id:`2GT3Hf`})}}function p(){let{_:t}=e();return{project:t({id:`Es3G-g`}),global:t({id:`fvrHin`})}}function m(e,r){if(e.includes(`/`))return r===`global`?`~/${e}`:e;let i=e===`agents`?`.agents/skills`:(r===`global`?t:n)[e]??`.${e}/skills`;return r===`global`?`~/${i}`:i}function h(e,t){return!e||t===``?[]:Object.keys(e).filter(n=>e[n]===t)}function g(e){let t=e.hostAliases??{},n=e=>e.split(`/`).slice(0,-1).join(`/`),r=new Set(e.hosts),i=new Set([...e.hosts.filter(e=>!e.includes(`/`)).map(t=>m(t,e.scope).replace(/^~\//,``)),...(e.customPlacements??[]).map(e=>n(e.path)),...e.path.includes(`/`)?[n(e.path.replace(/\/SKILL\.mdx?$/i,``))]:[]]);return Object.entries(t).filter(([e,t])=>!r.has(e)&&i.has(t)).map(([e])=>e)}function _(e){let t=new Set(e.symlinkedHosts??[]),n=[],r=new Set,i=(e,t)=>{r.has(e)||(r.add(e),n.push({dir:e,symlink:t}))};i(l(e),t.has(e.hosts[0]??``));for(let n of e.hosts)i(`${m(n,e.scope)}/${e.name}`,t.has(n));for(let t of e.customPlacements??[])i(t.path,t.mode===`link`);return n}function v(e,t=e.hosts){let n=i.options,r=g(e);return[...t.includes(`agents`)?[`agents`]:[],...n.filter(e=>t.includes(e)||r.includes(e)),...(e.customPlacements??[]).map(e=>a(e))]}export{d as a,m as c,p as d,f,v as i,s as l,h as n,c as o,a as r,_ as s,o as t,u};
@@ -1 +1 @@
1
- import{Ht as e}from"./dist-DoYGOGZp.js";import{t}from"./dist-DUfEoSbR.js";import{o as n}from"./documents-events-a5eIuqSk.js";import{t as r}from"./parse-api-error-DfesE4Y7.js";async function i(e){return r(await e.json().catch(()=>null))??`HTTP ${e.status}`}async function a(e,t){try{let n=await fetch(e,t?{signal:t}:void 0);return n.ok?{ok:!0,...await n.json()}:{ok:!1,error:await i(n)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function o(e,t,n){try{let r=await fetch(e,{method:t,...n===void 0?{}:{headers:{"Content-Type":`application/json`},body:JSON.stringify(n)}});return r.ok?{ok:!0,...await r.json().catch(()=>null)??{}}:{ok:!1,error:await i(r)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function s(e){let t=e.trim();return t.length<2?{ok:!0,results:[],backend:`skills.sh`,degraded:!1}:a(`/api/skills/search?q=${encodeURIComponent(t)}`)}async function c(){return a(`/api/skills/popular?limit=24`)}async function l(n,r){let i=await a(n?`/api/skills?scope=${n}`:`/api/skills`,r);if(!i.ok)return i;let{ok:o,...s}=i,c=e.safeParse(s);return c.success?{ok:!0,skills:c.data.skills}:{ok:!1,error:t._({id:`iXs0kt`})}}async function u(e){return a(`/api/skills/detail?${new URLSearchParams({source:e.source,name:e.name}).toString()}`)}async function d(e,t){return a(`/api/skills/preview?${new URLSearchParams({source:e.source,name:e.name}).toString()}`,t)}async function f(e,t){return a(`/api/skills/resolve-ref?${new URLSearchParams({ref:e.ref,scope:e.scope,from:e.from}).toString()}`,t)}async function p(e){return a(`/api/skills/publisher?source=${encodeURIComponent(e)}`)}async function m(e,t){return a(`/api/skills/discover?source=${encodeURIComponent(e)}`,t)}async function h(){return a(`/api/skills/installed`)}async function g(e){try{let n=await fetch(`/api/skill/edit-external`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return!r||typeof r.docName!=`string`?{ok:!1,error:t._({id:`iBVgIQ`})}:{ok:!0,docName:r.docName}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function _(e){try{let t=await fetch(`/api/skill`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,created:r?.created??!1,warnings:r?.warnings??[],...typeof r?.path==`string`?{path:r.path}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function v(e){try{let i=await fetch(`/api/skill/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!i.ok){let e=await i.json().catch(()=>null),t=r(e)??`HTTP ${i.status}`,n=typeof e?.detail==`string`&&/multiple skills/i.test(String(e?.title??``))?String(e.detail).split(`, `).map(e=>e.trim()).filter(Boolean):void 0;return n?{ok:!1,error:t,skills:n}:{ok:!1,error:t}}let a=await i.json().catch(()=>null);return!a||typeof a.name!=`string`?{ok:!1,error:t._({id:`HLoO-Z`})}:(n(),{ok:!0,name:a.name,alreadyImported:a?.alreadyImported??!1,collisionRenamedFrom:a?.collisionRenamedFrom,warnings:a?.warnings??[]})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function y(e){try{let r=await fetch(`/api/skills/import-bulk`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!r.ok)return{ok:!1,error:await i(r)};let a=await r.json().catch(()=>null);return!a||!Array.isArray(a.results)?{ok:!1,error:t._({id:`HLoO-Z`})}:(n(),{ok:!0,...a})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function b(e,r){try{let a=await fetch(`/api/skill-upload?scope=${encodeURIComponent(r)}`,{method:`POST`,body:e});if(!a.ok)return{ok:!1,error:await i(a)};let o=await a.json().catch(()=>null);return!o||typeof o.name!=`string`?{ok:!1,error:t._({id:`iodl3p`})}:(n(),{ok:!0,name:o.name,alreadyImported:o?.alreadyImported??!1,collisionRenamedFrom:o?.collisionRenamedFrom,warnings:o?.warnings??[]})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function x(e,t){let n=`${e}-copy`;if(!t.has(n))return n;for(let n=2;n<1e3;n+=1){let r=`${e}-copy-${n}`;if(!t.has(r))return r}return`${e}-copy-${t.size+1}`}async function S(e){try{let r=x(e.name,e.existingNames),a=await fetch(`/api/skill/duplicate`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({scope:e.scope,name:e.name,toName:r})});if(!a.ok)return{ok:!1,error:await i(a)};let o=await a.json().catch(()=>null);return typeof o?.name==`string`?(n(),{ok:!0,name:o.name}):{ok:!1,error:t._({id:`emMrXQ`})}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function C(e){let{name:t,fromScope:r,toScope:a}=e;if(r===a)return{ok:!0,scope:a};try{let e=await fetch(`/api/skill/move-scope`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({name:t,fromScope:r,toScope:a})});if(!e.ok)return{ok:!1,error:await i(e)};let o=await e.json().catch(()=>null);return n(),{ok:!0,scope:a,...typeof o?.path==`string`?{path:o.path}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function w(e){try{let t=await fetch(`/api/skill`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,committed:r?.committed??!1,...typeof r?.to==`string`?{to:r.to}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function T(e,t){try{let r=`?name=${encodeURIComponent(t)}&scope=${encodeURIComponent(e)}`,a=await fetch(`/api/skill${r}`,{method:`DELETE`});if(!a.ok)return{ok:!1,error:await i(a)};let o=await a.json().catch(()=>null);return n(),{ok:!0,existed:o?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function E(e){let t=await o(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,fork:{editor:e.editor,action:e.action,...e.toName===void 0?{}:{toName:e.toName}}});return t.ok?(n(),{ok:!0}):t}async function D(e){try{let t=await fetch(`/api/skill-file`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,path:r?.path??e.path}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function O(e){try{let t=await fetch(`/api/skill-file/rename`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,from:r?.from??e.from,to:r?.to??e.to,...r?.fromDocName===void 0?{}:{fromDocName:r.fromDocName},...r?.toDocName===void 0?{}:{toDocName:r.toDocName}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function k(e){try{let t=new URLSearchParams({scope:e.scope,name:e.name,path:e.path}),r=await fetch(`/api/skill-file?${t.toString()}`,{method:`DELETE`});if(!r.ok)return{ok:!1,error:await i(r)};let a=await r.json().catch(()=>null);return n(),{ok:!0,existed:a?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function A(e,t,n){try{let r=new URLSearchParams({name:t,scope:e,...n?{host:n}:{}}),a=await fetch(`/api/skill?${r.toString()}`);return a.ok?{ok:!0,files:(await a.json().catch(()=>null))?.skill?.files??[]}:{ok:!1,error:await i(a)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function j(e){try{let t=new URLSearchParams({name:e.name,scope:e.scope,path:e.path,...e.host?{host:e.host}:{}}),n=await fetch(`/api/skill-file?${t.toString()}`,{signal:e.signal});if(!n.ok)return{ok:!1,status:n.status,error:await i(n)};let r=await n.json().catch(()=>null);return typeof r?.text==`string`?{ok:!0,text:r.text}:{ok:!1,status:n.status,error:`HTTP ${n.status}`}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function M(e,t){return j({...e,signal:t}).then(e=>e.ok?{ok:!0,text:e.text}:{ok:!1,status:e.status})}async function N(e){try{let t=await fetch(`/api/skill/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,hosts:r?.hosts??[],scripts:r?.scripts??!1,warnings:r?.warnings??[],warningCodes:r?.warningCodes??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function P(e){try{let t=await fetch(`/api/skill/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({scope:e.scope,name:e.name,place:{dir:e.dir,mode:e.mode}})});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,placedAt:r?.placedAt??e.dir}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function F(e){let t=await o(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,unplace:{path:e.path}});return t.ok?(n(),{ok:!0}):t}async function I(e){let t=await o(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,setSource:e.target});return t.ok?(n(),{ok:!0}):t}async function L(e){let t=await o(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,convert:{target:e.target,mode:e.mode}});return t.ok?(n(),{ok:!0}):t}async function R(e){try{let t=await fetch(`/api/skill-targets`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({folderAction:e})});return t.ok?{ok:!0}:{ok:!1,error:await i(t)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function z(e){try{let t=await fetch(`/api/skill/reimport`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return e.dryRun||n(),{ok:!0,updated:r?.updated??!1,source:r?.source??``,localBody:r?.localBody,upstreamBody:r?.upstreamBody,...r?.gitTracked===void 0?{}:{gitTracked:r.gitTracked},warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function B(e){try{let t=await fetch(`/api/skill/revert`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}export{F as A,O as C,_ as D,B as E,D as M,s as O,z as S,f as T,M as _,S as a,P as b,p as c,A as d,v as f,l as g,h,m as i,b as j,I as k,u as l,N as m,T as n,g as o,y as p,k as r,c as s,L as t,d as u,w as v,E as w,R as x,C as y};
1
+ import{Ut as e}from"./dist-BDUZWXxp.js";import{t}from"./dist-DUfEoSbR.js";import{o as n}from"./documents-events-CyHlKMaL.js";import{t as r}from"./parse-api-error-DfesE4Y7.js";async function i(e){return r(await e.json().catch(()=>null))??`HTTP ${e.status}`}async function a(e,t){try{let n=await fetch(e,t?{signal:t}:void 0);return n.ok?{ok:!0,...await n.json()}:{ok:!1,error:await i(n)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function o(e,t,n){try{let r=await fetch(e,{method:t,...n===void 0?{}:{headers:{"Content-Type":`application/json`},body:JSON.stringify(n)}});return r.ok?{ok:!0,...await r.json().catch(()=>null)??{}}:{ok:!1,error:await i(r)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function s(e){let t=e.trim();return t.length<2?{ok:!0,results:[],backend:`skills.sh`,degraded:!1}:a(`/api/skills/search?q=${encodeURIComponent(t)}`)}async function c(){return a(`/api/skills/popular?limit=24`)}async function l(n,r){let i=await a(n?`/api/skills?scope=${n}`:`/api/skills`,r);if(!i.ok)return i;let{ok:o,...s}=i,c=e.safeParse(s);return c.success?{ok:!0,skills:c.data.skills}:{ok:!1,error:t._({id:`iXs0kt`})}}async function u(e){return a(`/api/skills/detail?${new URLSearchParams({source:e.source,name:e.name}).toString()}`)}async function d(e,t){return a(`/api/skills/preview?${new URLSearchParams({source:e.source,name:e.name}).toString()}`,t)}async function f(e,t){return a(`/api/skills/resolve-ref?${new URLSearchParams({ref:e.ref,scope:e.scope,from:e.from}).toString()}`,t)}async function p(e){return a(`/api/skills/publisher?source=${encodeURIComponent(e)}`)}async function m(e,t){return a(`/api/skills/discover?source=${encodeURIComponent(e)}`,t)}async function h(){return a(`/api/skills/installed`)}async function g(e){try{let n=await fetch(`/api/skill/edit-external`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return!r||typeof r.docName!=`string`?{ok:!1,error:t._({id:`iBVgIQ`})}:{ok:!0,docName:r.docName}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function _(e){try{let t=await fetch(`/api/skill`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,created:r?.created??!1,warnings:r?.warnings??[],...typeof r?.path==`string`?{path:r.path}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function v(e){try{let i=await fetch(`/api/skill/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!i.ok){let e=await i.json().catch(()=>null),t=r(e)??`HTTP ${i.status}`,n=typeof e?.detail==`string`&&/multiple skills/i.test(String(e?.title??``))?String(e.detail).split(`, `).map(e=>e.trim()).filter(Boolean):void 0;return n?{ok:!1,error:t,skills:n}:{ok:!1,error:t}}let a=await i.json().catch(()=>null);return!a||typeof a.name!=`string`?{ok:!1,error:t._({id:`HLoO-Z`})}:(n(),{ok:!0,name:a.name,alreadyImported:a?.alreadyImported??!1,collisionRenamedFrom:a?.collisionRenamedFrom,warnings:a?.warnings??[]})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function y(e){try{let r=await fetch(`/api/skills/import-bulk`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!r.ok)return{ok:!1,error:await i(r)};let a=await r.json().catch(()=>null);return!a||!Array.isArray(a.results)?{ok:!1,error:t._({id:`HLoO-Z`})}:(n(),{ok:!0,...a})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function b(e,r){try{let a=await fetch(`/api/skill-upload?scope=${encodeURIComponent(r)}`,{method:`POST`,body:e});if(!a.ok)return{ok:!1,error:await i(a)};let o=await a.json().catch(()=>null);return!o||typeof o.name!=`string`?{ok:!1,error:t._({id:`iodl3p`})}:(n(),{ok:!0,name:o.name,alreadyImported:o?.alreadyImported??!1,collisionRenamedFrom:o?.collisionRenamedFrom,warnings:o?.warnings??[]})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function x(e,t){let n=`${e}-copy`;if(!t.has(n))return n;for(let n=2;n<1e3;n+=1){let r=`${e}-copy-${n}`;if(!t.has(r))return r}return`${e}-copy-${t.size+1}`}async function S(e){try{let r=x(e.name,e.existingNames),a=await fetch(`/api/skill/duplicate`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({scope:e.scope,name:e.name,toName:r})});if(!a.ok)return{ok:!1,error:await i(a)};let o=await a.json().catch(()=>null);return typeof o?.name==`string`?(n(),{ok:!0,name:o.name}):{ok:!1,error:t._({id:`emMrXQ`})}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function C(e){let{name:t,fromScope:r,toScope:a}=e;if(r===a)return{ok:!0,scope:a};try{let e=await fetch(`/api/skill/move-scope`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({name:t,fromScope:r,toScope:a})});if(!e.ok)return{ok:!1,error:await i(e)};let o=await e.json().catch(()=>null);return n(),{ok:!0,scope:a,...typeof o?.path==`string`?{path:o.path}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function w(e){try{let t=await fetch(`/api/skill`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,committed:r?.committed??!1,...typeof r?.to==`string`?{to:r.to}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function T(e,t){try{let r=`?name=${encodeURIComponent(t)}&scope=${encodeURIComponent(e)}`,a=await fetch(`/api/skill${r}`,{method:`DELETE`});if(!a.ok)return{ok:!1,error:await i(a)};let o=await a.json().catch(()=>null);return n(),{ok:!0,existed:o?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function E(e){let t=await o(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,fork:{editor:e.editor,action:e.action,...e.toName===void 0?{}:{toName:e.toName}}});return t.ok?(n(),{ok:!0}):t}async function D(e){try{let t=await fetch(`/api/skill-file`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,path:r?.path??e.path}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function O(e){try{let t=await fetch(`/api/skill-file/rename`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,from:r?.from??e.from,to:r?.to??e.to,...r?.fromDocName===void 0?{}:{fromDocName:r.fromDocName},...r?.toDocName===void 0?{}:{toDocName:r.toDocName}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function k(e){try{let t=new URLSearchParams({scope:e.scope,name:e.name,path:e.path}),r=await fetch(`/api/skill-file?${t.toString()}`,{method:`DELETE`});if(!r.ok)return{ok:!1,error:await i(r)};let a=await r.json().catch(()=>null);return n(),{ok:!0,existed:a?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function A(e,t,n){try{let r=new URLSearchParams({name:t,scope:e,...n?{host:n}:{}}),a=await fetch(`/api/skill?${r.toString()}`);return a.ok?{ok:!0,files:(await a.json().catch(()=>null))?.skill?.files??[]}:{ok:!1,error:await i(a)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function j(e){try{let t=new URLSearchParams({name:e.name,scope:e.scope,path:e.path,...e.host?{host:e.host}:{}}),n=await fetch(`/api/skill-file?${t.toString()}`,{signal:e.signal});if(!n.ok)return{ok:!1,status:n.status,error:await i(n)};let r=await n.json().catch(()=>null);return typeof r?.text==`string`?{ok:!0,text:r.text}:{ok:!1,status:n.status,error:`HTTP ${n.status}`}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function M(e,t){return j({...e,signal:t}).then(e=>e.ok?{ok:!0,text:e.text}:{ok:!1,status:e.status})}async function N(e){try{let t=await fetch(`/api/skill/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,hosts:r?.hosts??[],scripts:r?.scripts??!1,warnings:r?.warnings??[],warningCodes:r?.warningCodes??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function P(e){try{let t=await fetch(`/api/skill/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({scope:e.scope,name:e.name,place:{dir:e.dir,mode:e.mode}})});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,placedAt:r?.placedAt??e.dir}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function F(e){let t=await o(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,unplace:{path:e.path}});return t.ok?(n(),{ok:!0}):t}async function I(e){let t=await o(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,setSource:e.target});return t.ok?(n(),{ok:!0}):t}async function L(e){let t=await o(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,convert:{target:e.target,mode:e.mode}});return t.ok?(n(),{ok:!0}):t}async function R(e){try{let t=await fetch(`/api/skill-targets`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({folderAction:e})});return t.ok?{ok:!0}:{ok:!1,error:await i(t)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function z(e){try{let t=await fetch(`/api/skill/reimport`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return e.dryRun||n(),{ok:!0,updated:r?.updated??!1,source:r?.source??``,localBody:r?.localBody,upstreamBody:r?.upstreamBody,...r?.gitTracked===void 0?{}:{gitTracked:r.gitTracked},warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function B(e){try{let t=await fetch(`/api/skill/revert`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}export{F as A,O as C,_ as D,B as E,D as M,s as O,z as S,f as T,M as _,S as a,P as b,p as c,A as d,v as f,l as g,h,m as i,b as j,I as k,u as l,N as m,T as n,g as o,y as p,k as r,c as s,L as t,d as u,w as v,E as w,R as x,C as y};
@@ -1,2 +1,2 @@
1
- import{L as e}from"./CodeMirrorPropInput-BPYAZ8kt.js";import{C as t,D as n,E as r,G as i,L as a,S as o,U as s,W as c,g as l,it as u,rt as d}from"./config-provider-hPtL5Ruf.js";import{$ as f,Dt as p,J as m,Mt as h,Q as g,St as _,X as v,kt as y}from"./dist-BSAh-TK7.js";var b=class e{constructor(e,t){this.yanchor=e,this.yhead=t}toJSON(){return{yanchor:a(this.yanchor),yhead:a(this.yhead)}}static fromJSON(t){return new e(r(t.yanchor),r(t.yhead))}},x=class{constructor(e,t){this.ytext=e,this.awareness=t,this.undoManager=new l(e)}toYPos(e,t=0){return n(this.ytext,e,t)}fromYPos(e){let n=t(r(e),this.ytext.doc);if(n==null||n.type!==this.ytext)throw Error(`[y-codemirror] The position you want to retrieve was created by a different document`);return{pos:n.index,assoc:n.assoc}}toYRange(e){let t=e.assoc;return new b(this.toYPos(e.anchor,t),this.toYPos(e.head,t))}fromYRange(e){let t=this.fromYPos(e.yanchor),n=this.fromYPos(e.yhead);return t.pos===n.pos?p.cursor(n.pos,n.assoc):p.range(t.pos,n.pos)}},S=y.define({combine(e){return e[e.length-1]}}),C=_.define(),w=class{constructor(e){this.view=e,this.conf=e.state.facet(S),this._observer=(t,n)=>{if(n.origin!==this.conf){let n=t.delta,r=[],i=0;for(let e=0;e<n.length;e++){let t=n[e];t.insert==null?t.delete==null?i+=t.retain:(r.push({from:i,to:i+t.delete,insert:``}),i+=t.delete):r.push({from:i,to:i,insert:t.insert})}e.dispatch({changes:r,annotations:[C.of(this.conf)]})}},this._ytext=this.conf.ytext,this._ytext.observe(this._observer)}update(e){if(!e.docChanged||e.transactions.length>0&&e.transactions[0].annotation(C)===this.conf)return;let t=this.conf.ytext;t.doc.transact(()=>{let n=0;e.changes.iterChanges((e,r,i,a,o)=>{let s=o.sliceString(0,o.length,`
2
- `);e!==r&&t.delete(e+n,r-e),s.length>0&&t.insert(e+n,s),n+=s.length-(r-e)})},this.conf)}destroy(){this._ytext.unobserve(this._observer)}},T=g.fromClass(w),E=v.baseTheme({".cm-ySelection":{},".cm-yLineSelection":{padding:0,margin:`0px 2px 0px 4px`},".cm-ySelectionCaret":{position:`relative`,borderLeft:`1px solid black`,borderRight:`1px solid black`,marginLeft:`-1px`,marginRight:`-1px`,boxSizing:`border-box`,display:`inline`},".cm-ySelectionCaretDot":{borderRadius:`50%`,position:`absolute`,width:`.4em`,height:`.4em`,top:`-.2em`,left:`-.2em`,backgroundColor:`inherit`,transition:`transform .3s ease-in-out`,boxSizing:`border-box`},".cm-ySelectionCaret:hover > .cm-ySelectionCaretDot":{transformOrigin:`bottom center`,transform:`scale(0)`},".cm-ySelectionInfo":{position:`absolute`,top:`-1.05em`,left:`-1px`,fontSize:`.75em`,fontFamily:`serif`,fontStyle:`normal`,fontWeight:`normal`,lineHeight:`normal`,userSelect:`none`,color:`white`,paddingLeft:`2px`,paddingRight:`2px`,zIndex:101,transition:`opacity .3s ease-in-out`,backgroundColor:`inherit`,opacity:0,transitionDelay:`0s`,whiteSpace:`nowrap`},".cm-ySelectionCaret:hover > .cm-ySelectionInfo":{opacity:1,transitionDelay:`0s`}}),D=_.define(),O=class extends f{constructor(e,t){super(),this.color=e,this.name=t}toDOM(){return s(`span`,[i(`class`,`cm-ySelectionCaret`),i(`style`,`background-color: ${this.color}; border-color: ${this.color}`)],[c(`⁠`),s(`div`,[i(`class`,`cm-ySelectionCaretDot`)]),c(`⁠`),s(`div`,[i(`class`,`cm-ySelectionInfo`)],[c(this.name)]),c(`⁠`)])}eq(e){return e.color===this.color}compare(e){return e.color===this.color}updateDOM(){return!1}get estimatedHeight(){return-1}ignoreEvent(){return!0}},k=class{constructor(e){this.conf=e.state.facet(S),this._listener=({added:t,updated:n,removed:r},i,a)=>{t.concat(n).concat(r).findIndex(e=>e!==this.conf.awareness.doc.clientID)>=0&&e.dispatch({annotations:[D.of([])]})},this._awareness=this.conf.awareness,this._awareness.on(`change`,this._listener),this.decorations=h.of([])}destroy(){this._awareness.off(`change`,this._listener)}update(e){let i=this.conf.ytext,a=i.doc,s=this.conf.awareness,c=[],l=this.conf.awareness.getLocalState();if(l!=null){let t=e.view.hasFocus&&e.view.dom.ownerDocument.hasFocus(),a=t?e.state.selection.main:null,c=l.cursor==null?null:r(l.cursor.anchor),u=l.cursor==null?null:r(l.cursor.head);if(a!=null){let e=n(i,a.anchor),t=n(i,a.head);(l.cursor==null||!o(c,e)||!o(u,t))&&s.setLocalStateField(`cursor`,{anchor:e,head:t})}else l.cursor!=null&&t&&s.setLocalStateField(`cursor`,null)}s.getStates().forEach((n,r)=>{if(r===s.doc.clientID)return;let o=n.cursor;if(o==null||o.anchor==null||o.head==null)return;let l=t(o.anchor,a),f=t(o.head,a);if(l==null||f==null||l.type!==i||f.type!==i)return;let{color:p=`#30bced`,name:h=`Anonymous`}=n.user||{},g=n.user&&n.user.colorLight||p+`33`,_=u(l.index,f.index),v=d(l.index,f.index),y=e.view.state.doc.lineAt(_),b=e.view.state.doc.lineAt(v);if(y.number===b.number)c.push({from:_,to:v,value:m.mark({attributes:{style:`background-color: ${g}`},class:`cm-ySelection`})});else{c.push({from:_,to:y.from+y.length,value:m.mark({attributes:{style:`background-color: ${g}`},class:`cm-ySelection`})}),c.push({from:b.from,to:v,value:m.mark({attributes:{style:`background-color: ${g}`},class:`cm-ySelection`})});for(let t=y.number+1;t<b.number;t++){let n=e.view.state.doc.line(t).from;c.push({from:n,to:n,value:m.line({attributes:{style:`background-color: ${g}`,class:`cm-yLineSelection`}})})}}c.push({from:f.index,to:f.index,value:m.widget({side:f.index-l.index>0?-1:1,block:!1,widget:new O(p,h)})})}),this.decorations=m.set(c,!0)}},A=g.fromClass(k,{decorations:e=>e.decorations}),j=class{constructor(e){this.undoManager=e}addTrackedOrigin(e){this.undoManager.addTrackedOrigin(e)}removeTrackedOrigin(e){this.undoManager.removeTrackedOrigin(e)}undo(){return this.undoManager.undo()!=null}redo(){return this.undoManager.redo()!=null}},M=y.define({combine(e){return e[e.length-1]}});_.define();var N=class{constructor(t){this.view=t,this.conf=t.state.facet(M),this._undoManager=this.conf.undoManager,this.syncConf=t.state.facet(S),this._beforeChangeSelection=null,this._mux=e(),this._onStackItemAdded=({stackItem:e,changedParentTypes:t})=>{t.has(this.syncConf.ytext)&&this._beforeChangeSelection&&!e.meta.has(this)&&e.meta.set(this,this._beforeChangeSelection)},this._onStackItemPopped=({stackItem:e})=>{let n=e.meta.get(this);if(n){let e=this.syncConf.fromYRange(n);t.dispatch(t.state.update({selection:e,effects:[v.scrollIntoView(e)]})),this._storeSelection()}},this._storeSelection=()=>{this._beforeChangeSelection=this.syncConf.toYRange(this.view.state.selection.main)},this._undoManager.on(`stack-item-added`,this._onStackItemAdded),this._undoManager.on(`stack-item-popped`,this._onStackItemPopped),this._undoManager.addTrackedOrigin(this.syncConf)}update(e){e.selectionSet&&(e.transactions.length===0||e.transactions[0].annotation(C)!==this.syncConf)&&this._storeSelection()}destroy(){this._undoManager.off(`stack-item-added`,this._onStackItemAdded),this._undoManager.off(`stack-item-popped`,this._onStackItemPopped),this._undoManager.removeTrackedOrigin(this.syncConf)}},P=g.fromClass(N),F=({state:e,dispatch:t})=>e.facet(M).undo()||!0,I=({state:e,dispatch:t})=>e.facet(M).redo()||!0,L=[{key:`Mod-z`,run:F,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:I,preventDefault:!0},{key:`Mod-Shift-z`,run:I,preventDefault:!0}],R=(e,t,{undoManager:n=new l(e)}={})=>{let r=new x(e,t),i=[S.of(r),T];return t&&i.push(E,A),n!==!1&&i.push(M.of(new j(n)),P,v.domEventHandlers({beforeinput(e,t){return e.inputType===`historyUndo`?F(t):e.inputType===`historyRedo`?I(t):!1}})),i};export{L as n,R as t};
1
+ import{I as e}from"./CodeMirrorPropInput-BFuQFciv.js";import{C as t,D as n,E as r,G as i,L as a,S as o,U as s,W as c,g as l,it as u,rt as d}from"./config-provider-CfA6TibZ.js";import{$ as f,At as p,Ct as m,Nt as h,Ot as g,Y as _,Z as v,et as y}from"./dist-DAqA-GDU.js";var b=class e{constructor(e,t){this.yanchor=e,this.yhead=t}toJSON(){return{yanchor:a(this.yanchor),yhead:a(this.yhead)}}static fromJSON(t){return new e(r(t.yanchor),r(t.yhead))}},x=class{constructor(e,t){this.ytext=e,this.awareness=t,this.undoManager=new l(e)}toYPos(e,t=0){return n(this.ytext,e,t)}fromYPos(e){let n=t(r(e),this.ytext.doc);if(n==null||n.type!==this.ytext)throw Error(`[y-codemirror] The position you want to retrieve was created by a different document`);return{pos:n.index,assoc:n.assoc}}toYRange(e){let t=e.assoc;return new b(this.toYPos(e.anchor,t),this.toYPos(e.head,t))}fromYRange(e){let t=this.fromYPos(e.yanchor),n=this.fromYPos(e.yhead);return t.pos===n.pos?g.cursor(n.pos,n.assoc):g.range(t.pos,n.pos)}},S=p.define({combine(e){return e[e.length-1]}}),C=m.define(),w=class{constructor(e){this.view=e,this.conf=e.state.facet(S),this._observer=(t,n)=>{if(n.origin!==this.conf){let n=t.delta,r=[],i=0;for(let e=0;e<n.length;e++){let t=n[e];t.insert==null?t.delete==null?i+=t.retain:(r.push({from:i,to:i+t.delete,insert:``}),i+=t.delete):r.push({from:i,to:i,insert:t.insert})}e.dispatch({changes:r,annotations:[C.of(this.conf)]})}},this._ytext=this.conf.ytext,this._ytext.observe(this._observer)}update(e){if(!e.docChanged||e.transactions.length>0&&e.transactions[0].annotation(C)===this.conf)return;let t=this.conf.ytext;t.doc.transact(()=>{let n=0;e.changes.iterChanges((e,r,i,a,o)=>{let s=o.sliceString(0,o.length,`
2
+ `);e!==r&&t.delete(e+n,r-e),s.length>0&&t.insert(e+n,s),n+=s.length-(r-e)})},this.conf)}destroy(){this._ytext.unobserve(this._observer)}},T=f.fromClass(w),E=v.baseTheme({".cm-ySelection":{},".cm-yLineSelection":{padding:0,margin:`0px 2px 0px 4px`},".cm-ySelectionCaret":{position:`relative`,borderLeft:`1px solid black`,borderRight:`1px solid black`,marginLeft:`-1px`,marginRight:`-1px`,boxSizing:`border-box`,display:`inline`},".cm-ySelectionCaretDot":{borderRadius:`50%`,position:`absolute`,width:`.4em`,height:`.4em`,top:`-.2em`,left:`-.2em`,backgroundColor:`inherit`,transition:`transform .3s ease-in-out`,boxSizing:`border-box`},".cm-ySelectionCaret:hover > .cm-ySelectionCaretDot":{transformOrigin:`bottom center`,transform:`scale(0)`},".cm-ySelectionInfo":{position:`absolute`,top:`-1.05em`,left:`-1px`,fontSize:`.75em`,fontFamily:`serif`,fontStyle:`normal`,fontWeight:`normal`,lineHeight:`normal`,userSelect:`none`,color:`white`,paddingLeft:`2px`,paddingRight:`2px`,zIndex:101,transition:`opacity .3s ease-in-out`,backgroundColor:`inherit`,opacity:0,transitionDelay:`0s`,whiteSpace:`nowrap`},".cm-ySelectionCaret:hover > .cm-ySelectionInfo":{opacity:1,transitionDelay:`0s`}}),D=m.define(),O=class extends y{constructor(e,t){super(),this.color=e,this.name=t}toDOM(){return s(`span`,[i(`class`,`cm-ySelectionCaret`),i(`style`,`background-color: ${this.color}; border-color: ${this.color}`)],[c(`⁠`),s(`div`,[i(`class`,`cm-ySelectionCaretDot`)]),c(`⁠`),s(`div`,[i(`class`,`cm-ySelectionInfo`)],[c(this.name)]),c(`⁠`)])}eq(e){return e.color===this.color}compare(e){return e.color===this.color}updateDOM(){return!1}get estimatedHeight(){return-1}ignoreEvent(){return!0}},k=class{constructor(e){this.conf=e.state.facet(S),this._listener=({added:t,updated:n,removed:r},i,a)=>{t.concat(n).concat(r).findIndex(e=>e!==this.conf.awareness.doc.clientID)>=0&&e.dispatch({annotations:[D.of([])]})},this._awareness=this.conf.awareness,this._awareness.on(`change`,this._listener),this.decorations=h.of([])}destroy(){this._awareness.off(`change`,this._listener)}update(e){let i=this.conf.ytext,a=i.doc,s=this.conf.awareness,c=[],l=this.conf.awareness.getLocalState();if(l!=null){let t=e.view.hasFocus&&e.view.dom.ownerDocument.hasFocus(),a=t?e.state.selection.main:null,c=l.cursor==null?null:r(l.cursor.anchor),u=l.cursor==null?null:r(l.cursor.head);if(a!=null){let e=n(i,a.anchor),t=n(i,a.head);(l.cursor==null||!o(c,e)||!o(u,t))&&s.setLocalStateField(`cursor`,{anchor:e,head:t})}else l.cursor!=null&&t&&s.setLocalStateField(`cursor`,null)}s.getStates().forEach((n,r)=>{if(r===s.doc.clientID)return;let o=n.cursor;if(o==null||o.anchor==null||o.head==null)return;let l=t(o.anchor,a),f=t(o.head,a);if(l==null||f==null||l.type!==i||f.type!==i)return;let{color:p=`#30bced`,name:m=`Anonymous`}=n.user||{},h=n.user&&n.user.colorLight||p+`33`,g=u(l.index,f.index),v=d(l.index,f.index),y=e.view.state.doc.lineAt(g),b=e.view.state.doc.lineAt(v);if(y.number===b.number)c.push({from:g,to:v,value:_.mark({attributes:{style:`background-color: ${h}`},class:`cm-ySelection`})});else{c.push({from:g,to:y.from+y.length,value:_.mark({attributes:{style:`background-color: ${h}`},class:`cm-ySelection`})}),c.push({from:b.from,to:v,value:_.mark({attributes:{style:`background-color: ${h}`},class:`cm-ySelection`})});for(let t=y.number+1;t<b.number;t++){let n=e.view.state.doc.line(t).from;c.push({from:n,to:n,value:_.line({attributes:{style:`background-color: ${h}`,class:`cm-yLineSelection`}})})}}c.push({from:f.index,to:f.index,value:_.widget({side:f.index-l.index>0?-1:1,block:!1,widget:new O(p,m)})})}),this.decorations=_.set(c,!0)}},A=f.fromClass(k,{decorations:e=>e.decorations}),j=class{constructor(e){this.undoManager=e}addTrackedOrigin(e){this.undoManager.addTrackedOrigin(e)}removeTrackedOrigin(e){this.undoManager.removeTrackedOrigin(e)}undo(){return this.undoManager.undo()!=null}redo(){return this.undoManager.redo()!=null}},M=p.define({combine(e){return e[e.length-1]}});m.define();var N=class{constructor(t){this.view=t,this.conf=t.state.facet(M),this._undoManager=this.conf.undoManager,this.syncConf=t.state.facet(S),this._beforeChangeSelection=null,this._mux=e(),this._onStackItemAdded=({stackItem:e,changedParentTypes:t})=>{t.has(this.syncConf.ytext)&&this._beforeChangeSelection&&!e.meta.has(this)&&e.meta.set(this,this._beforeChangeSelection)},this._onStackItemPopped=({stackItem:e})=>{let n=e.meta.get(this);if(n){let e=this.syncConf.fromYRange(n);t.dispatch(t.state.update({selection:e,effects:[v.scrollIntoView(e)]})),this._storeSelection()}},this._storeSelection=()=>{this._beforeChangeSelection=this.syncConf.toYRange(this.view.state.selection.main)},this._undoManager.on(`stack-item-added`,this._onStackItemAdded),this._undoManager.on(`stack-item-popped`,this._onStackItemPopped),this._undoManager.addTrackedOrigin(this.syncConf)}update(e){e.selectionSet&&(e.transactions.length===0||e.transactions[0].annotation(C)!==this.syncConf)&&this._storeSelection()}destroy(){this._undoManager.off(`stack-item-added`,this._onStackItemAdded),this._undoManager.off(`stack-item-popped`,this._onStackItemPopped),this._undoManager.removeTrackedOrigin(this.syncConf)}},P=f.fromClass(N),F=({state:e,dispatch:t})=>e.facet(M).undo()||!0,I=({state:e,dispatch:t})=>e.facet(M).redo()||!0,L=[{key:`Mod-z`,run:F,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:I,preventDefault:!0},{key:`Mod-Shift-z`,run:I,preventDefault:!0}],R=(e,t,{undoManager:n=new l(e)}={})=>{let r=new x(e,t),i=[S.of(r),T];return t&&i.push(E,A),n!==!1&&i.push(M.of(new j(n)),P,v.domEventHandlers({beforeinput(e,t){return e.inputType===`historyUndo`?F(t):e.inputType===`historyRedo`?I(t):!1}})),i};export{L as n,R as t};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{r}from"./dist-Nvb76hAm.js";import{t as i}from"./compiler-runtime-BfE3aGVn.js";import{t as a}from"./utils-CPqDy6Hr.js";import{i as o,n as ee,t as te}from"./tooltip-DHXgxWLL.js";import{Lr as ne}from"./dist-DoYGOGZp.js";import{t as re}from"./x-DS57FvHW.js";import{t as ie}from"./badge-DFX4S3a5.js";var s=i(),c=e(n(),1),l=t();function u(e){let t=(0,s.c)(96),{value:n,onChange:i,onBlur:u,placeholder:d,id:f,disabled:p,grammar:ae,entryProblems:m,"aria-describedby":oe,"aria-invalid":se,ref:h}=e,ce=ae===void 0?`frontmatter-tag`:ae,{_:g}=r(),[_,le]=(0,c.useState)(``),[v,ue]=(0,c.useState)(null),[y,b]=(0,c.useState)(null),de=(0,c.useRef)(null),x;t[0]===h?x=t[1]:(x=e=>{de.current=e,typeof h==`function`?h(e):h&&(h.current=e)},t[0]=h,t[1]=x);let fe=x,[S,C]=(0,c.useState)(!1),pe=(0,c.useId)(),w=`${f??pe}-grammar-hint`,T=`${f??pe}-pill`,E;t[2]!==g||t[3]!==d?(E=d??g({id:`M5mfAe`}),t[2]=g,t[3]=d,t[4]=E):E=t[4];let me=E,D=ce===`frontmatter-tag`,O;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>{le(``),C(!1),ue(null)},t[5]=O):O=t[5];let k=O,A;t[6]!==v||t[7]!==i||t[8]!==D||t[9]!==n?(A=e=>{let t=e.trim(),r=v===null?-1:n.indexOf(v);if(!t)return r!==-1&&i(n.filter((e,t)=>t!==r)),v!==null&&k(),!0;if(D&&!ne(t))return C(!0),!1;let a=D&&t.startsWith(`#`)?t.slice(1):t,o=n.indexOf(a);if(r===-1)return o===-1&&i([...n,a]),k(),!0;let ee=n.map((e,t)=>t===r?a:e);return i(o===-1||o===r?ee:ee.filter((e,t)=>t!==r)),k(),!0},t[6]=v,t[7]=i,t[8]=D,t[9]=n,t[10]=A):A=t[10];let j=A,M;t[11]!==i||t[12]!==n?(M=e=>{i(n.filter((t,n)=>n!==e))},t[11]=i,t[12]=n,t[13]=M):M=t[13];let N=M,P;t[14]!==j||t[15]!==p||t[16]!==_?(P=e=>{p||(_.trim()!==``&&j(_),le(e),C(!1),b(null),ue(e))},t[14]=j,t[15]=p,t[16]=_,t[17]=P):P=t[17];let F=P,I;t[18]!==y||t[19]!==n?(I=y===null?-1:n.indexOf(y),t[18]=y,t[19]=n,t[20]=I):I=t[20];let L=I,R;t[21]===n?R=t[22]:(R=e=>{b(e===null?null:n[e]??null)},t[21]=n,t[22]=R);let z=R,B,V;t[23]===v?(B=t[24],V=t[25]):(B=()=>{v!==null&&(de.current?.focus(),de.current?.select())},V=[v],t[23]=v,t[24]=B,t[25]=V),(0,c.useEffect)(B,V);let H=S?`true`:se,he=p&&`pointer-events-none opacity-60`,U;t[26]===he?U=t[27]:(U=a(`flex min-h-8 w-full flex-wrap items-center gap-1.5 rounded-lg border border-input bg-transparent px-2 py-1 text-sm transition-colors`,`focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50`,`aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20`,`dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,he),t[26]=he,t[27]=U);let W;if(t[28]!==g||t[29]!==F||t[30]!==p||t[31]!==v||t[32]!==m||t[33]!==y||t[34]!==T||t[35]!==N||t[36]!==D||t[37]!==n){let e;t[39]!==g||t[40]!==F||t[41]!==p||t[42]!==v||t[43]!==m||t[44]!==y||t[45]!==T||t[46]!==N||t[47]!==D?(e=(e,t)=>{if(e===v)return null;let n=D&&!ne(e),r=m?.get(e),i=n||r!==void 0,s=r??(n?`Tags must start with a letter or digit and contain only letters, digits, underscores, dashes, and slashes.`:void 0),c=e===y,u=(0,l.jsxs)(ie,{id:`${T}-${t}`,variant:i?`destructive`:`secondary`,"data-tag-invalid":n?`true`:void 0,"data-tag-problem":r===void 0?void 0:`true`,"data-highlighted":c?`true`:void 0,className:a(`gap-1 pl-2 pr-1 normal-case`,i&&`ring-1 ring-destructive/40`,c&&`ring-2 ring-ring/70`),children:[(0,l.jsx)(`button`,{type:`button`,tabIndex:-1,className:`cursor-pointer rounded-sm font-mono`,onDoubleClick:()=>F(e),disabled:p,"aria-label":g({id:`NkNfSr`,values:{tag:e}}),title:s===void 0?g({id:`vHlhDc`}):void 0,children:e}),(0,l.jsx)(`button`,{type:`button`,onClick:()=>N(t),"aria-label":g({id:`D4H2N6`,values:{tag:e}}),className:`rounded-sm p-0.5 hover:bg-background/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,disabled:p,children:(0,l.jsx)(re,{className:`size-3`,"aria-hidden":`true`})})]},e);return s===void 0?u:(0,l.jsxs)(te,{children:[(0,l.jsx)(o,{asChild:!0,children:u}),(0,l.jsx)(ee,{children:s})]},e)},t[39]=g,t[40]=F,t[41]=p,t[42]=v,t[43]=m,t[44]=y,t[45]=T,t[46]=N,t[47]=D,t[48]=e):e=t[48],W=n.map(e),t[28]=g,t[29]=F,t[30]=p,t[31]=v,t[32]=m,t[33]=y,t[34]=T,t[35]=N,t[36]=D,t[37]=n,t[38]=W}else W=t[38];let G;t[49]!==S||t[50]!==y?(G=e=>{le(e.target.value),S&&C(!1),y!==null&&b(null)},t[49]=S,t[50]=y,t[51]=G):G=t[51];let K;t[52]!==j||t[53]!==F||t[54]!==_||t[55]!==S||t[56]!==v||t[57]!==z||t[58]!==L||t[59]!==N||t[60]!==n?(K=e=>{let t=e.currentTarget,r=t.selectionStart===0&&t.selectionEnd===0;if(v===null&&n.length>0){if(e.key===`ArrowLeft`&&(L!==-1||r)){e.preventDefault(),z(L===-1?n.length-1:Math.max(0,L-1));return}if(e.key===`ArrowRight`&&L!==-1){e.preventDefault(),z(L===n.length-1?null:L+1);return}if((e.key===`Home`||e.key===`End`)&&L!==-1){e.preventDefault(),z(e.key===`Home`?0:n.length-1);return}}if(L!==-1&&v===null){if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=n[L];t!==void 0&&F(t);return}if(e.key===`Backspace`||e.key===`Delete`){e.preventDefault();let t=n[L-1]??null,r=n[L+1]??null;N(L),b(e.key===`Backspace`?t??r:r??t);return}}e.key===`Enter`?(_.trim()||v!==null)&&(e.preventDefault(),j(_)):e.key===`,`?(e.preventDefault(),_.trim()&&j(_)):e.key===`Tab`?_.trim()&&(e.preventDefault(),j(_)):e.key===`Backspace`&&_===``&&n.length>0&&v===null?(e.preventDefault(),N(n.length-1)):e.key===`Escape`&&(v!==null||S?(e.preventDefault(),k(),b(null)):L!==-1&&(e.preventDefault(),b(null)))},t[52]=j,t[53]=F,t[54]=_,t[55]=S,t[56]=v,t[57]=z,t[58]=L,t[59]=N,t[60]=n,t[61]=K):K=t[61];let q;t[62]!==j||t[63]!==_||t[64]!==v||t[65]!==u?(q=()=>{(_.trim()||v!==null)&&!j(_)&&v!==null&&k(),b(null),u?.()},t[62]=j,t[63]=_,t[64]=v,t[65]=u,t[66]=q):q=t[66];let ge=n.length===0?me:``,_e=S?`true`:void 0,J;t[67]!==oe||t[68]!==S||t[69]!==w?(J=[S?w:void 0,oe].filter(Boolean).join(` `)||void 0,t[67]=oe,t[68]=S,t[69]=w,t[70]=J):J=t[70];let ve=S?`true`:se,ye=L===-1?void 0:`${T}-${L}`,Y=S&&`text-destructive placeholder:text-destructive/60`,X;t[71]===Y?X=t[72]:(X=a(`min-w-[8ch] flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed`,Y),t[71]=Y,t[72]=X);let Z;t[73]!==fe||t[74]!==p||t[75]!==_||t[76]!==f||t[77]!==G||t[78]!==K||t[79]!==q||t[80]!==ge||t[81]!==_e||t[82]!==J||t[83]!==ve||t[84]!==ye||t[85]!==X?(Z=(0,l.jsx)(`input`,{id:f,ref:fe,type:`text`,value:_,onChange:G,onKeyDown:K,onBlur:q,placeholder:ge,"data-tag-invalid":_e,"aria-describedby":J,"aria-invalid":ve,"aria-activedescendant":ye,disabled:p,className:X}),t[73]=fe,t[74]=p,t[75]=_,t[76]=f,t[77]=G,t[78]=K,t[79]=q,t[80]=ge,t[81]=_e,t[82]=J,t[83]=ve,t[84]=ye,t[85]=X,t[86]=Z):Z=t[86];let Q;t[87]!==S||t[88]!==w?(Q=S&&(0,l.jsx)(`span`,{id:w,role:`alert`,"data-testid":`tag-pill-input-error`,className:`w-full px-1 pt-0.5 text-xs text-destructive`,children:`Tags must start with a letter or digit and contain only letters, digits, underscores, dashes, and slashes.`}),t[87]=S,t[88]=w,t[89]=Q):Q=t[89];let $;return t[90]!==H||t[91]!==U||t[92]!==W||t[93]!==Z||t[94]!==Q?($=(0,l.jsxs)(`div`,{"data-slot":`tag-pill-input`,"aria-invalid":H,className:U,children:[W,Z,Q]}),t[90]=H,t[91]=U,t[92]=W,t[93]=Z,t[94]=Q,t[95]=$):$=t[95],$}export{u as t};
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{r}from"./dist-Nvb76hAm.js";import{t as i}from"./compiler-runtime-BfE3aGVn.js";import{t as a}from"./utils-CPqDy6Hr.js";import{i as o,n as ee,t as te}from"./tooltip-DHXgxWLL.js";import{Vr as ne}from"./dist-BDUZWXxp.js";import{t as re}from"./x-DS57FvHW.js";import{t as ie}from"./badge-DFX4S3a5.js";var s=i(),c=e(n(),1),l=t();function u(e){let t=(0,s.c)(96),{value:n,onChange:i,onBlur:u,placeholder:d,id:f,disabled:p,grammar:ae,entryProblems:m,"aria-describedby":oe,"aria-invalid":se,ref:h}=e,ce=ae===void 0?`frontmatter-tag`:ae,{_:g}=r(),[_,le]=(0,c.useState)(``),[v,ue]=(0,c.useState)(null),[y,b]=(0,c.useState)(null),de=(0,c.useRef)(null),x;t[0]===h?x=t[1]:(x=e=>{de.current=e,typeof h==`function`?h(e):h&&(h.current=e)},t[0]=h,t[1]=x);let fe=x,[S,C]=(0,c.useState)(!1),pe=(0,c.useId)(),w=`${f??pe}-grammar-hint`,T=`${f??pe}-pill`,E;t[2]!==g||t[3]!==d?(E=d??g({id:`M5mfAe`}),t[2]=g,t[3]=d,t[4]=E):E=t[4];let me=E,D=ce===`frontmatter-tag`,O;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>{le(``),C(!1),ue(null)},t[5]=O):O=t[5];let k=O,A;t[6]!==v||t[7]!==i||t[8]!==D||t[9]!==n?(A=e=>{let t=e.trim(),r=v===null?-1:n.indexOf(v);if(!t)return r!==-1&&i(n.filter((e,t)=>t!==r)),v!==null&&k(),!0;if(D&&!ne(t))return C(!0),!1;let a=D&&t.startsWith(`#`)?t.slice(1):t,o=n.indexOf(a);if(r===-1)return o===-1&&i([...n,a]),k(),!0;let ee=n.map((e,t)=>t===r?a:e);return i(o===-1||o===r?ee:ee.filter((e,t)=>t!==r)),k(),!0},t[6]=v,t[7]=i,t[8]=D,t[9]=n,t[10]=A):A=t[10];let j=A,M;t[11]!==i||t[12]!==n?(M=e=>{i(n.filter((t,n)=>n!==e))},t[11]=i,t[12]=n,t[13]=M):M=t[13];let N=M,P;t[14]!==j||t[15]!==p||t[16]!==_?(P=e=>{p||(_.trim()!==``&&j(_),le(e),C(!1),b(null),ue(e))},t[14]=j,t[15]=p,t[16]=_,t[17]=P):P=t[17];let F=P,I;t[18]!==y||t[19]!==n?(I=y===null?-1:n.indexOf(y),t[18]=y,t[19]=n,t[20]=I):I=t[20];let L=I,R;t[21]===n?R=t[22]:(R=e=>{b(e===null?null:n[e]??null)},t[21]=n,t[22]=R);let z=R,B,V;t[23]===v?(B=t[24],V=t[25]):(B=()=>{v!==null&&(de.current?.focus(),de.current?.select())},V=[v],t[23]=v,t[24]=B,t[25]=V),(0,c.useEffect)(B,V);let H=S?`true`:se,he=p&&`pointer-events-none opacity-60`,U;t[26]===he?U=t[27]:(U=a(`flex min-h-8 w-full flex-wrap items-center gap-1.5 rounded-lg border border-input bg-transparent px-2 py-1 text-sm transition-colors`,`focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50`,`aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20`,`dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,he),t[26]=he,t[27]=U);let W;if(t[28]!==g||t[29]!==F||t[30]!==p||t[31]!==v||t[32]!==m||t[33]!==y||t[34]!==T||t[35]!==N||t[36]!==D||t[37]!==n){let e;t[39]!==g||t[40]!==F||t[41]!==p||t[42]!==v||t[43]!==m||t[44]!==y||t[45]!==T||t[46]!==N||t[47]!==D?(e=(e,t)=>{if(e===v)return null;let n=D&&!ne(e),r=m?.get(e),i=n||r!==void 0,s=r??(n?`Tags must start with a letter or digit and contain only letters, digits, underscores, dashes, and slashes.`:void 0),c=e===y,u=(0,l.jsxs)(ie,{id:`${T}-${t}`,variant:i?`destructive`:`secondary`,"data-tag-invalid":n?`true`:void 0,"data-tag-problem":r===void 0?void 0:`true`,"data-highlighted":c?`true`:void 0,className:a(`gap-1 pl-2 pr-1 normal-case`,i&&`ring-1 ring-destructive/40`,c&&`ring-2 ring-ring/70`),children:[(0,l.jsx)(`button`,{type:`button`,tabIndex:-1,className:`cursor-pointer rounded-sm font-mono`,onDoubleClick:()=>F(e),disabled:p,"aria-label":g({id:`NkNfSr`,values:{tag:e}}),title:s===void 0?g({id:`vHlhDc`}):void 0,children:e}),(0,l.jsx)(`button`,{type:`button`,onClick:()=>N(t),"aria-label":g({id:`D4H2N6`,values:{tag:e}}),className:`rounded-sm p-0.5 hover:bg-background/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,disabled:p,children:(0,l.jsx)(re,{className:`size-3`,"aria-hidden":`true`})})]},e);return s===void 0?u:(0,l.jsxs)(te,{children:[(0,l.jsx)(o,{asChild:!0,children:u}),(0,l.jsx)(ee,{children:s})]},e)},t[39]=g,t[40]=F,t[41]=p,t[42]=v,t[43]=m,t[44]=y,t[45]=T,t[46]=N,t[47]=D,t[48]=e):e=t[48],W=n.map(e),t[28]=g,t[29]=F,t[30]=p,t[31]=v,t[32]=m,t[33]=y,t[34]=T,t[35]=N,t[36]=D,t[37]=n,t[38]=W}else W=t[38];let G;t[49]!==S||t[50]!==y?(G=e=>{le(e.target.value),S&&C(!1),y!==null&&b(null)},t[49]=S,t[50]=y,t[51]=G):G=t[51];let K;t[52]!==j||t[53]!==F||t[54]!==_||t[55]!==S||t[56]!==v||t[57]!==z||t[58]!==L||t[59]!==N||t[60]!==n?(K=e=>{let t=e.currentTarget,r=t.selectionStart===0&&t.selectionEnd===0;if(v===null&&n.length>0){if(e.key===`ArrowLeft`&&(L!==-1||r)){e.preventDefault(),z(L===-1?n.length-1:Math.max(0,L-1));return}if(e.key===`ArrowRight`&&L!==-1){e.preventDefault(),z(L===n.length-1?null:L+1);return}if((e.key===`Home`||e.key===`End`)&&L!==-1){e.preventDefault(),z(e.key===`Home`?0:n.length-1);return}}if(L!==-1&&v===null){if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=n[L];t!==void 0&&F(t);return}if(e.key===`Backspace`||e.key===`Delete`){e.preventDefault();let t=n[L-1]??null,r=n[L+1]??null;N(L),b(e.key===`Backspace`?t??r:r??t);return}}e.key===`Enter`?(_.trim()||v!==null)&&(e.preventDefault(),j(_)):e.key===`,`?(e.preventDefault(),_.trim()&&j(_)):e.key===`Tab`?_.trim()&&(e.preventDefault(),j(_)):e.key===`Backspace`&&_===``&&n.length>0&&v===null?(e.preventDefault(),N(n.length-1)):e.key===`Escape`&&(v!==null||S?(e.preventDefault(),k(),b(null)):L!==-1&&(e.preventDefault(),b(null)))},t[52]=j,t[53]=F,t[54]=_,t[55]=S,t[56]=v,t[57]=z,t[58]=L,t[59]=N,t[60]=n,t[61]=K):K=t[61];let q;t[62]!==j||t[63]!==_||t[64]!==v||t[65]!==u?(q=()=>{(_.trim()||v!==null)&&!j(_)&&v!==null&&k(),b(null),u?.()},t[62]=j,t[63]=_,t[64]=v,t[65]=u,t[66]=q):q=t[66];let ge=n.length===0?me:``,_e=S?`true`:void 0,J;t[67]!==oe||t[68]!==S||t[69]!==w?(J=[S?w:void 0,oe].filter(Boolean).join(` `)||void 0,t[67]=oe,t[68]=S,t[69]=w,t[70]=J):J=t[70];let ve=S?`true`:se,ye=L===-1?void 0:`${T}-${L}`,Y=S&&`text-destructive placeholder:text-destructive/60`,X;t[71]===Y?X=t[72]:(X=a(`min-w-[8ch] flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed`,Y),t[71]=Y,t[72]=X);let Z;t[73]!==fe||t[74]!==p||t[75]!==_||t[76]!==f||t[77]!==G||t[78]!==K||t[79]!==q||t[80]!==ge||t[81]!==_e||t[82]!==J||t[83]!==ve||t[84]!==ye||t[85]!==X?(Z=(0,l.jsx)(`input`,{id:f,ref:fe,type:`text`,value:_,onChange:G,onKeyDown:K,onBlur:q,placeholder:ge,"data-tag-invalid":_e,"aria-describedby":J,"aria-invalid":ve,"aria-activedescendant":ye,disabled:p,className:X}),t[73]=fe,t[74]=p,t[75]=_,t[76]=f,t[77]=G,t[78]=K,t[79]=q,t[80]=ge,t[81]=_e,t[82]=J,t[83]=ve,t[84]=ye,t[85]=X,t[86]=Z):Z=t[86];let Q;t[87]!==S||t[88]!==w?(Q=S&&(0,l.jsx)(`span`,{id:w,role:`alert`,"data-testid":`tag-pill-input-error`,className:`w-full px-1 pt-0.5 text-xs text-destructive`,children:`Tags must start with a letter or digit and contain only letters, digits, underscores, dashes, and slashes.`}),t[87]=S,t[88]=w,t[89]=Q):Q=t[89];let $;return t[90]!==H||t[91]!==U||t[92]!==W||t[93]!==Z||t[94]!==Q?($=(0,l.jsxs)(`div`,{"data-slot":`tag-pill-input`,"aria-invalid":H,className:U,children:[W,Z,Q]}),t[90]=H,t[91]=U,t[92]=W,t[93]=Z,t[94]=Q,t[95]=$):$=t[95],$}export{u as t};
@@ -1 +1 @@
1
- import{m as e}from"./doc-paths-SFSlIMRQ.js";import{s as t}from"./navigation-targets-CmqNPgrG.js";function n(e){switch(e.kind){case`doc`:case`large-file`:return`doc`;case`skill-file`:return`doc`;case`folder`:case`folder-index`:return`folder`;case`missing`:case`asset`:return`missing`}}function r(r,i){let a=t(r,i);return{resolvedTarget:a,hashDocName:a.target,hash:a.kind===`skill-file`?e({scope:a.scope,name:a.name,path:a.path,...a.host?{host:a.host}:{}}):null,displayState:n(a)}}export{r as t};
1
+ import{m as e}from"./doc-paths-B_EmP8cW.js";import{s as t}from"./navigation-targets-DNQLGx4S.js";function n(e){switch(e.kind){case`doc`:case`large-file`:return`doc`;case`skill-file`:return`doc`;case`folder`:case`folder-index`:return`folder`;case`missing`:case`asset`:return`missing`}}function r(r,i){let a=t(r,i);return{resolvedTarget:a,hashDocName:a.target,hash:a.kind===`skill-file`?e({scope:a.scope,name:a.name,path:a.path,...a.host?{host:a.host}:{}}):null,displayState:n(a)}}export{r as t};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r}from"./dist-Nvb76hAm.js";import{n as i}from"./dist-PQ5KMVDh.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./utils-CPqDy6Hr.js";import"./dropdown-menu-CLgDYkh1.js";import{Gt as s,Wt as c,n as l,t as ee}from"./dist-DoYGOGZp.js";import{t as u}from"./badge-DFX4S3a5.js";import{i as d,n as f,t as p}from"./cursor-B6reg1lS.js";import{t as te}from"./copilot-Dh1BU6kS.js";var m=e(n(),1),h=`ok-acp-registered-agents-v1`,g={agents:[],defaultKey:null};function _(e){return`${e.source}:${e.id}`}function v(e){if(typeof e!=`object`||!e)return!1;let t=e;return(t.source===`registry`||t.source===`custom`)&&typeof t.id==`string`&&t.id!==``&&typeof t.name==`string`&&t.name!==``&&(t.iconUrl===void 0||typeof t.iconUrl==`string`)&&(t.lastUsedAt===void 0||typeof t.lastUsedAt==`number`)&&(t.featured===void 0||typeof t.featured==`boolean`)}function y(){let e;try{e=localStorage.getItem(h)}catch{return g}if(e===null)return g;try{let t=JSON.parse(e),n=Array.isArray(t.agents)?t.agents.filter(v):[];return{agents:n,defaultKey:typeof t.defaultKey==`string`&&n.some(e=>_(e)===t.defaultKey)?t.defaultKey:null}}catch(e){return console.warn(`[registered-agents] discarding corrupt localStorage payload`,e),g}}function b(e){try{localStorage.setItem(h,JSON.stringify(e))}catch(e){console.warn(`[registered-agents] failed to persist registration`,e)}}var x=null,S=[],C=null,w=new Set;function T(){return x===null&&(x=y()),x}function E(e){x=e,C=M(e.agents,S);for(let e of w)e()}function ne(){E(y())}typeof window<`u`&&typeof window.addEventListener==`function`&&window.addEventListener(`storage`,e=>{(e.key===h||e.key===null)&&ne()});function D(e){return w.add(e),()=>w.delete(e)}var O=()=>(C===null&&(C=M(T().agents,S)),C),k=()=>{let{agents:e,defaultKey:t}=T();return t===null?null:e.find(e=>_(e)===t)??null};function A(e,t={}){let{makeDefault:n=!0}=t,r=_(e),i=T();if(!n){let t={agents:i.agents.some(e=>_(e)===r)?i.agents.map(t=>_(t)===r?{...e,...t.lastUsedAt===void 0?{}:{lastUsedAt:t.lastUsedAt}}:t):[...i.agents,e],defaultKey:i.defaultKey};b(t),E(t);return}let a=i.agents.filter(e=>_(e)!==r),o={agents:[{...e,lastUsedAt:Date.now()},...a],defaultKey:r};b(o),E(o)}function j(e,t){let n=e.lastUsedAt??0,r=t.lastUsedAt??0;if(n!==r)return r-n;let i=e.featured===!0?0:1,a=t.featured===!0?0:1;return i===a?e.name.localeCompare(t.name,void 0,{numeric:!0,sensitivity:`base`}):i-a}function M(e,t){let n=new Set(e.map(_));return[...e,...t.filter(e=>!n.has(_(e)))].sort(j)}function N(e){S=[...e],C=M(T().agents,S);for(let e of w)e()}function P(e,t){let n=T();if(n.defaultKey!==e)return;let r=n.agents.find(n=>_(n)!==e&&t(n))??null,i={agents:n.agents,defaultKey:r?_(r):null};b(i),E(i)}function re(e,t){return t!==null&&e.some(e=>e.source===t.source&&e.id===t.id)?t:e[0]??null}function ie(e){let t=new Map(e.map(e=>[_(e),e])),n=T(),r=!1,i=n.agents.map(e=>{let n=t.get(_(e));if(n===void 0)return e;let i=n.name??e.name,a=n.iconUrl??e.iconUrl,o=n.supported??e.supported,s=n.featured??e.featured;return i===e.name&&a===e.iconUrl&&o===e.supported&&s===e.featured?e:(r=!0,{...e,name:i,...a===void 0?{}:{iconUrl:a},...o===void 0?{}:{supported:o},...s===void 0?{}:{featured:s}})});if(!r)return;let a={agents:i,defaultKey:n.defaultKey};b(a),E(a)}function ae(){return(0,m.useSyncExternalStore)(D,O,O)}function oe(){return(0,m.useSyncExternalStore)(D,k,k)}var F=t(),I=a();async function se(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.openExternal)try{return await n.shell.openExternal(e),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:L(e)}}let r=t.doc??(typeof document<`u`?document:void 0);if(!r)return{ok:!1,reason:`dispatch-error`,detail:`no DOM available`};try{let t=r.createElement(`a`);return t.href=e,t.rel=`noopener noreferrer`,/^https?:/i.test(e)&&(t.target=`_blank`),r.body.appendChild(t),t.click(),t.remove(),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:L(e)}}}function L(e){if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}var R=[{id:`claude-cowork`,displayName:`Claude Cowork`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Conversational pairing in Claude Desktop's Cowork tab.`},{id:`claude-code`,displayName:`Claude`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Agentic coding in Claude Desktop's Code tab.`},{id:`codex`,displayName:`Codex`,appBrandName:`Codex Desktop`,schemes:[`codex:`],installUrl:`https://openai.com/codex`,tagline:`OpenAI's coding agent, terminal-native.`},{id:`cursor`,displayName:`Cursor`,schemes:[`cursor:`],installUrl:`https://cursor.com/`,tagline:`AI-first VS Code fork with multi-file edits.`},{id:`copilot`,displayName:`GitHub Copilot`,schemes:[],installUrl:`https://docs.github.com/en/copilot/how-tos/copilot-cli/cli-getting-started`,tagline:`GitHub's terminal-native coding agent.`},{id:`opencode`,displayName:`OpenCode`,schemes:[],installUrl:`https://opencode.ai`,tagline:`Open-source terminal coding agent; bring any local model.`},{id:`pi`,displayName:`Pi`,schemes:[],installUrl:`https://pi.dev`,tagline:`Minimal open-source terminal coding agent, extensible in TypeScript.`},{id:`antigravity`,displayName:`Antigravity`,schemes:[],installUrl:`https://antigravity.google`,tagline:"Google's agentic IDE + `agy` terminal agent."},{id:`openclaw`,displayName:`OpenClaw`,schemes:[],installUrl:`https://openclaw.ai`,tagline:`Open-source agent gateway; runs agents against your MCP servers.`},{id:`hermes`,displayName:`Hermes`,schemes:[],installUrl:`https://hermes-agent.nousresearch.com`,tagline:`Nous Research's terminal coding agent.`}],z=R.filter(e=>e.id!==`claude-cowork`&&e.id!==`copilot`&&e.id!==`opencode`&&e.id!==`pi`&&e.id!==`antigravity`&&e.id!==`openclaw`&&e.id!==`hermes`),B=`ok-acp-enabled-agents-v1`,V={};function H(e,t){return`in-app:${e}:${t}`}function U(e){return`terminal:${e}`}function W(e){return`desktop:${e}`}function G(e,t){return e??t}function K(){let e;try{e=localStorage.getItem(B)}catch(e){return console.warn(`[enabled-agents] localStorage unavailable; treating overrides as empty`,e),V}if(e===null)return V;try{let t=JSON.parse(e);if(typeof t!=`object`||!t)return V;let n={};for(let[e,r]of Object.entries(t))typeof r==`boolean`&&(n[e]=r);return n}catch(e){return console.warn(`[enabled-agents] discarding corrupt localStorage payload`,e),V}}function q(e){try{localStorage.setItem(B,JSON.stringify(e))}catch(e){console.warn(`[enabled-agents] failed to persist override`,e)}}var J=null,Y=new Set;function X(){return J===null&&(J=K()),J}function Z(e){J=e;for(let e of Y)e()}function ce(){Z(K())}typeof window<`u`&&typeof window.addEventListener==`function`&&window.addEventListener(`storage`,e=>{(e.key===B||e.key===null)&&ce()});function le(e){return Y.add(e),()=>Y.delete(e)}var Q=()=>X();function ue(e,t){let n=X();if(t===void 0){if(!(e in n))return;let{[e]:t,...r}=n;q(r),Z(r);return}if(n[e]===t)return;let r={...n,[e]:t};q(r),Z(r)}function de(){return(0,m.useSyncExternalStore)(le,Q,Q)}function fe(e,t,n,r,i){return i===!1?!1:G(e[H(t,n)],r)}function pe(e,t,n){return G(e[U(t)],n[t]!==!1)}function $(e,t){return G(e[W(t)],!1)}function me(e){let t=(0,I.c)(5),{className:n}=e,i;t[0]===n?i=t[1]:(i=o(`h-4 px-1 text-[10px]`,n),t[0]=n,t[1]=i);let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,F.jsx)(r,{id:`YBt9YP`}),t[2]=a):a=t[2];let s;return t[3]===i?s=t[4]:(s=(0,F.jsx)(u,{variant:`gray`,className:i,children:a}),t[3]=i,t[4]=s),s}function he(e){let t=(0,I.c)(5),n,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(`title`,{children:`Antigravity icon`}),r=(0,F.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 2.5a1.5 1.5 0 0 1 1.28.72l8.5 14A1.5 1.5 0 0 1 20.5 19.5h-17a1.5 1.5 0 0 1-1.28-2.28l8.5-14A1.5 1.5 0 0 1 12 2.5Zm0 4.42L5.83 17h12.34L12 6.92Z`}),i=(0,F.jsx)(`path`,{fill:`currentColor`,d:`M12 9.6 15.6 17h-7.2L12 9.6Z`}),t[0]=n,t[1]=r,t[2]=i):(n=t[0],r=t[1],i=t[2]);let a;return t[3]===e?a=t[4]:(a=(0,F.jsxs)(`svg`,{role:`img`,"aria-label":`Antigravity icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 24 24`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}function ge(e){let t=(0,I.c)(6),n,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(`title`,{children:`Hermes icon`}),r=(0,F.jsx)(`path`,{d:`M5.938 12.835c.127-.039.285.02.373.143.028.038.036.092.046.14.003.014-.02.033-.04.05-.124-.098-.24-.194-.354-.291-.011-.01-.016-.027-.025-.042zM8.396 9.412c.195-.032.39-.06.588-.05a.54.54 0 01.148.026c.202.071.402.147.601.224.028.01.05.036.075.055l-.013.027a9.203 9.203 0 01-.26-.089c-.115-.038-.213-.077-.315-.098-.25-.05-.25-.046-.292-.014l.574.144c.275.139.55.276.823.417.042.022.09.057.107.098.026.06.063.076.117.072.066-.006.132-.017.213-.027l-.04.086c.051.08.142.02.216.064-.074.13-.247.09-.334.199l.061.074-.12.087c0 .106-.038.168-.306.243l.026.085-.196.042.07.124h-.25l-.007.137c-.081-.01-.161-.018-.244-.027l-.053.123c-.027-.008-.052-.011-.073-.023-.067-.038-.128-.056-.195.006-.019.017-.063.014-.093.008-.026-.006-.05-.029-.07-.042-.11.095-.11.095-.208.003-.057.046-.12.074-.186.011-.063.027-.123-.02-.178-.014-.07.007-.097-.035-.133-.07l-.13.033c-.013-.236-.194-.19-.34-.203.005-.072.05-.092.095-.094a.474.474 0 01.159.022c.164.05.32.12.496.138.203.021.405.029.601-.015.265-.059.52-.149.707-.365.049-.056.083-.127.117-.195.019-.038.02-.084-.02-.116a1.397 1.397 0 00-.382-.217c.024.12-.031.182-.115.221 0 .014-.004.025 0 .03.08.115.084.16-.007.267a1.39 1.39 0 01-.218.211.477.477 0 01-.641-.05 1.36 1.36 0 01-.133-.152c-.078-.107-.076-.108-.033-.236-.165-.08-.128-.226-.104-.364.008-.05.028-.096.049-.163-.04.014-.067.017-.087.032a.897.897 0 00-.316.357c-.007.016-.01.034-.02.047-.012.015-.034.038-.045.035-.02-.006-.037-.027-.05-.045-.008-.012-.007-.032-.012-.057h-.126l.053-.172a14.82 14.82 0 00-.039-.049l.11-.284c-.06.026-.091.044-.124.051-.03.007-.064 0-.095 0 0-.031-.01-.07.004-.092.149-.22.305-.428.593-.476z`}),i=(0,F.jsx)(`path`,{d:`M8.06 10.788c-.003-.038-.004-.075.037-.062.016.006.034.048.028.067-.01.04-.038.032-.064-.005z`}),a=(0,F.jsx)(`path`,{clipRule:`evenodd`,d:`M11.981.009c.226-.012.453-.011.679 0 .247.01.495.024.74.062.401.064.798.157 1.19.273.463.138.92.299 1.356.511a7.31 7.31 0 012.948 2.642c.292.469.536.963.739 1.479.219.556.446 1.11.623 1.683.204.654.329 1.326.458 1.997.097.504.182 1.01.29 1.511.156.722.329 1.44.494 2.16.186.812.4 1.615.63 2.415.102.355.193.713.282 1.072.11.436.202.876.254 1.323.031.278.066.557.073.837a7.56 7.56 0 01-.017.88c-.037.413-.1.818-.226 1.212a5.017 5.017 0 01-.915 1.649l-.13.156.018.023c.043-.023.088-.041.127-.068.2-.138.373-.307.531-.49.4-.46.721-.973.975-1.529a3.59 3.59 0 00.325-1.72c-.024-.424-.097-.834-.3-1.213-.013-.027-.015-.06-.03-.121.05.035.082.048.101.072.107.13.22.258.315.398.33.494.46 1.052.486 1.64a3.75 3.75 0 01-.47 1.97c-.36.655-.887 1.14-1.526 1.506-.193.111-.394.21-.595.308-.157.078-.248.211-.318.365a.522.522 0 00-.033.406.359.359 0 01.013.139c-.005.077-.077.155-.14.162-.054.006-.125-.043-.15-.116a1.206 1.206 0 01-.06-.233c-.04-.314-.155-.6-.308-.87a3.906 3.906 0 00-.73-.91 2.129 2.129 0 00-.897-.524 4.093 4.093 0 00-.692-.131c-.075-.008-.15-.04-.22.01.18.06.363.11.538.18.434.173.82.43 1.18.728.308.255.58.543.794.884.098.155.186.315.227.496.027.123.042.25.067.375.013.062-.002.109-.053.144-.047.033-.122.034-.163-.01a.455.455 0 01-.08-.14c-.03-.073-.038-.159-.078-.225a7.314 7.314 0 00-1.423-1.664c-.16-.137-.329-.26-.537-.323-.376-.114-.753-.203-1.15-.154-.213.025-.427.032-.64.053a1.6 1.6 0 00-.736.278 5.14 5.14 0 00-.834.72c-.329.342-.642.699-.955 1.055-.136.155-.264.319-.314.531a5.227 5.227 0 00-.012.051.096.096 0 01-.09.076h-.31c-.046 0-.082-.048-.072-.094.023-.108.045-.216.07-.324.075-.325.19-.635.368-.917.024-.039.04-.088.104-.08l.01.049.027.077c.28-.435.571-.834.996-1.135.283-.204.584-.378.89-.55a.196.196 0 00-.098-.002c-.162.043-.325.084-.485.134-.402.124-.764.33-1.11.566-.147.1-.298.193-.414.333a7.314 7.314 0 00-1.07 1.767.845.845 0 00-.04.12.075.075 0 01-.072.056h-.494c-.04 0-.062-.051-.036-.082.123-.14.246-.282.377-.415.275-.281.58-.532.777-.884.027-.048.063-.09.095-.135.238-.333.54-.607.818-.902.082-.086.175-.16.26-.24.029-.027.053-.057.079-.085l-.018-.025-.135.041c-.034.017-.07.031-.102.05-.248.144-.494.292-.743.433-.408.23-.825.439-1.209.711-.281.2-.591.358-.889.533-.02.012-.044.015-.08.028-.015-.135.143-.201.108-.336-.033.014-.064.02-.085.038-.111.096-.227.19-.328.296-.148.157-.284.325-.425.488-.125.143-.25.286-.373.431A.153.153 0 019.89 24H8.762a.316.316 0 00.016-.042c.028-.09.085-.172.083-.28-.091-.018-.162.001-.212.077a4.45 4.45 0 00-.136.215c-.01.016-.024.03-.042.03h-.093c-.019 0-.029-.022-.017-.037.071-.088.14-.178.209-.268.001-.002-.006-.012-.012-.024-.014.004-.03.006-.045.013-.176.09-.352.181-.527.274a.363.363 0 01-.168.042H5.202c-.026 0-.039-.036-.019-.053.21-.178.402-.374.558-.605.335-.496.538-1.047.667-1.629.004-.02-.003-.043-.006-.091-.037.048-.059.072-.076.1a1.943 1.943 0 01-.334.415c-.28.258-.59.448-.983.464-.297.012-.588 0-.865-.127-.46-.21-.722-.57-.794-1.072-.025-.17-.017-.171-.182-.219A3.513 3.513 0 011.97 20.6a2.286 2.286 0 01-.808-1.13 3.569 3.569 0 01-.16-1.245c.002-.034.016-.067.024-.1.032.023.046.043.05.066.033.153.059.308.096.46.086.355.257.664.516.92.258.256.571.419.91.532.358.118.717.138 1.07-.016a1.89 1.89 0 00.621-.452c.328-.348.533-.76.648-1.223.009-.034.005-.071.007-.11-.015.006-.026.006-.03.011-.031.05-.064.1-.093.152-.284.502-.679.887-1.196 1.135-.351.17-.718.255-1.11.159a1.607 1.607 0 01-.971-.64 2.006 2.006 0 01-.368-.924 2.903 2.903 0 01.02-.886c.05-.439.466-1.17.742-1.271-.02.063-.035.112-.053.16-.043.116-.097.227-.13.345a1.901 1.901 0 00-.05.82c.033.212.09.416.204.6.147.236.346.407.62.465.11.023.225.014.338.018a.576.576 0 00.386-.131c.164-.128.282-.292.366-.481.168-.375.24-.777.309-1.179.05-.296.093-.594.133-.893.039-.281.071-.563.104-.845.026-.232.048-.464.074-.696.024-.228.052-.455.076-.683.024-.227.047-.455.069-.683.013-.14.022-.28.034-.42l.037-.417c.022-.25.041-.5.065-.748.008-.082-.02-.132-.09-.177a2.46 2.46 0 01-.492-.418c-.1-.109-.188-.228-.282-.342-.035-.042-.056-.097-.116-.118a2.084 2.084 0 00.275.597c.06.092.131.176.196.265.063.086.182.115.234.226-.028.003-.046.01-.06.006a4.74 4.74 0 01-.22-.057 2.71 2.71 0 01-1.287-.819c-.435-.487-.656-1.076-.71-1.723a5.206 5.206 0 01.014-1.06c.072-.602.22-1.186.45-1.745.155-.376.338-.741.526-1.102.205-.393.466-.75.765-1.076.512-.559 1.104-1.024 1.726-1.448.717-.49 1.478-.898 2.277-1.233C8.244.828 8.767.632 9.31.494c.655-.166 1.31-.33 1.982-.415.229-.03.458-.058.688-.07zm-1.847 22.82c-.07.06-.147.111-.207.18-.238.27-.464.549-.668.869l-.044.108a.177.177 0 00.093-.057c.174-.19.351-.378.519-.574.104-.122.195-.255.288-.386.024-.034.03-.08.046-.12l-.027-.02zm1.65-3.695a5.51 5.51 0 00-.653.593l-.37.386a.963.963 0 01-.377.25 1.372 1.372 0 01-.467.09c-.044 0-.087.006-.151.012.028.058.043.097.064.131.15.242.301.482.45.724.136.22.276.438.399.666.068.125.105.267.156.404.077.027.14-.018.202-.048.29-.135.579-.274.867-.412.213-.101.437-.186.636-.31.347-.215.68-.455 1.018-.685.015-.01.026-.028.042-.046-.023-.019-.038-.037-.056-.044-.287-.111-.527-.3-.77-.482a5.319 5.319 0 01-.506-.42 1.757 1.757 0 01-.41-.653c-.019-.049-.045-.095-.075-.156zm-5.847.264c-.06.096-.097.194-.132.293a3.38 3.38 0 01-.555 1.01c-.2.25-.455.412-.762.493-.23.06-.464.076-.7.07-.048-.002-.097.002-.158.005.016.04.021.066.035.085.1.145.23.246.4.295.157.046.316.034.498.023.181-.037.343-.115.485-.234.238-.199.402-.454.536-.732.175-.363.264-.751.342-1.144.01-.053.008-.11.011-.164zm14.945-4.586c.008.029.016.057.027.107.024.155.051.31.072.464.03.219.067.437.078.657.017.344.027.689-.014 1.033-.037.315-.063.633-.116.946a6.153 6.153 0 01-.46 1.518c-.008.018-.01.039-.02.082.047-.03.077-.042.098-.064.085-.083.17-.167.248-.255.271-.305.458-.66.596-1.043.18-.498.228-1.011.145-1.531-.103-.65-.33-1.263-.597-1.881a9.055 9.055 0 00-.024-.055l-.033.022zM5.797 8.29a.26.26 0 00.018.153c.124.251.25.501.379.75.025.049.066.09.03.163-.284.06-.578.119-.88.255.059.038.097.06.132.087.042.032.112.058.09.12-.01.033-.075.048-.117.072.017.01.043.021.067.036.166.102.33.207.447.368.138.192.229.404.188.644-.079.469-.306.85-.69 1.132-.054.04-.106.083-.161.122a.243.243 0 00-.103.245.77.77 0 00.055.195c.083.196.22.35.375.492.083.076.159.164.222.257a.37.37 0 01.025.377c-.023.05-.05.099-.076.148-.03.06-.028.111.022.162.041.042.08.089.112.138.038.058.078.079.147.05a.486.486 0 01.333-.006c.16.046.302.126.444.21.13.077.264.149.4.219.067.035.14.05.219.026.071-.022.124.01.145.076.02.064-.003.108-.074.139-.07.03-.137.063-.209.088-.1.035-.201.073-.314.077-.013-.107.11-.088.127-.159-.206-.126-.643-.145-.801-.034.063.112.035.21-.096.313-.13-.1-.025-.202.002-.3a.209.209 0 00-.249.17c-.015.101.067.216.178.224.108.007.218-.005.326-.012.06-.005.12-.027.199 0-.103.123-.248.127-.357.19.002.05.07.086.019.131-.053.048-.095-.001-.132-.03-.08-.063-.16-.126-.231-.197a.474.474 0 01-.157-.311.52.52 0 00-.043-.172c-.032-.074-.032-.137.033-.19-.018-.03-.028-.053-.045-.072a1.222 1.222 0 01-.196-.369c-.053-.137-.046-.264.048-.381.024-.03.05-.06.064-.095a.664.664 0 00.047-.168c.017-.165-.064-.287-.182-.387-.186-.156-.36-.322-.46-.551-.005-.011-.024-.017-.037-.026-.011.017-.024.027-.025.038-.019.185-.045.37-.052.557-.014.377.058.743.162 1.104.118.41.289.798.488 1.173.267.502.537 1.002.812 1.5.055.098.13.189.208.27.198.202.452.272.724.273.202 0 .404-.006.605-.026.295-.03.59-.073.884-.113.183-.025.365-.057.548-.08.21-.026.38.073.522.21.16.156.305.327.447.5.22.265.397.56.554.867.05.098.07.1.147.03.13-.121.26-.242.394-.36.067-.059.088-.12.067-.213a3.535 3.535 0 01-.085-.796c.002-.157.006-.314.018-.471.015-.224.03-.45.06-.672a59.114 59.114 0 01.362-2.298c.087-.493.182-.984.268-1.477.06-.347.118-.694.162-1.043.034-.273.055-.55.063-.825.011-.332.003-.665.002-.998 0-.077.004-.155-.01-.23-.028-.142-.01-.155-.162-.19a5.826 5.826 0 00-.607-.107c-.146-.018-.207-.053-.221-.19-.006-.049-.025-.098-.041-.146-.009-.025-.024-.048-.046-.09l-.025.264c-.009.096-.029.116-.127.115-.055 0-.11-.008-.164-.008-.476 0-.952-.008-1.426.032-.095.008-.173-.015-.226-.103-.04-.066-.088-.126-.134-.186-.063-.084-.086-.093-.182-.06-.195.068-.388.138-.582.21a2.71 2.71 0 00-.675.394.986.986 0 01-.323.168c-.033.01-.07.008-.127.013.02-.066.024-.114.047-.15.064-.105.135-.205.205-.306.023-.033.049-.063.073-.095l-.015-.023-.201.037c-.146.04-.296.07-.437.122-.148.053-.266.023-.386-.072a3.623 3.623 0 01-.733-.786l-.093-.132zm8.592 8.963l-.147.09c-.22.134-.44.266-.659.402-.093.058-.184.12-.27.188-.085.07-.124.161-.072.272.047.1.093.2.147.294.047.08.124.138.213.147.11.01.228.012.336-.012.217-.05.372-.205.528-.357a.291.291 0 00.087-.308c-.046-.18-.079-.365-.118-.547-.011-.052-.027-.103-.045-.169zm-.257-2.409c-.12.291-.205.597-.325.91-.151.433-.294.87-.435 1.323.036-.01.054-.01.067-.018.261-.16.522-.324.785-.484.054-.033.071-.078.065-.138-.012-.13-.024-.262-.034-.393l-.068-.886c-.008-.103-.02-.206-.029-.31-.009 0-.017-.002-.026-.004zm3.081-8.13l.099.285c.08.231.159.463.24.714l.58 1.952c.187.63.372 1.262.558 1.893.114.382.235.762.343 1.146.072.257.126.519.186.799.044.206.087.413.127.64.034.106.023.226.077.325l.025-.006-.068-.362c-.038-.206-.077-.412-.113-.638-.015-.07-.029-.141-.046-.211-.095-.396-.177-.796-.29-1.187-.196-.685-.413-1.364-.618-2.046-.165-.549-.322-1.1-.488-1.648-.069-.227-.15-.45-.226-.695l-.117-.336c-.037-.107-.075-.216-.115-.322-.04-.106-.084-.21-.127-.314a7.558 7.558 0 01-.027.01zM6.225 14.304c-.063-.001-.115.014-.134.083a.35.35 0 00.41.012 4.533 4.533 0 00-.276-.095zM5.23 11.98c-.026-.027-.057-.048-.075.002-.012.032-.007.07-.01.113.082-.037.082-.037.085-.115zm.062-1.189a.135.135 0 00-.088.056.197.197 0 00-.025.11c.005.152.01.306.026.457a.751.751 0 00.066.218c.061.136.157.167.288.101.055-.027.06-.054.025-.11a4.52 4.52 0 01-.129-.211c-.015-.068-.066-.131-.033-.207.04-.09-.076-.116-.074-.19V10.874c-.003-.038-.006-.087-.056-.083zm-.017-.968a.867.867 0 00-.467.127c-.076.045-.084.07-.05.158.034.087.07.173.115.254.064.117.09.125.21.077a.657.657 0 01.336-.053c.202.022.357.136.504.264l.092.077c.007-.006.014-.013.022-.018-.019-.105-.035-.226-.149-.264-.157-.053-.324-.075-.508-.117l-.24-.005c.24-.169.452-.044.687.009-.063-.115-.153-.147-.23-.193-.082-.05-.17-.092-.25-.144-.06-.037-.12-.08-.072-.172zm10.233.325c-.23-.01-.427.08-.608.211-.034.026-.06.065-.105.117.087.026.15.046.232.065.044-.015.088-.03.13-.046.306-.114.61-.115.904.031.126.063.237.04.366-.005-.02-.031-.03-.054-.045-.071a.986.986 0 00-.448-.273c-.14-.044-.284-.024-.426-.03zM7.99 6.483a.308.308 0 00.002.133c.08.321.156.643.242.962.104.387.27.75.456 1.103.02.037.061.08.098.087a.404.404 0 00.253-.051l-.472-.84c-.23-.448-.405-.92-.579-1.394zM10.397.497c-.2-.008-.405.004-.603.034-.236.035-.47.087-.7.152-.287.08-.569.18-.852.273-.04.013-.074.038-.11.058.028.014.05.018.07.014.287-.068.58-.085.873-.09.134-.002.269.009.402.025.19.024.382.048.57.09.456.104.874.3 1.265.556.464.306.888.66 1.257 1.078.205.232.395.475.56.739.17.274.315.561.449.856.273.601.456 1.232.6 1.876.04.173.07.348.1.524.017.104.065.167.17.19.122.028.2.105.22.251-.003.102-.06.174-.129.24a1.065 1.065 0 00-.268.358.164.164 0 00.083-.039c.08-.086.162-.172.235-.265a.56.56 0 00.13-.333c.009-.05.022-.1.024-.15.007-.124-.017-.15-.143-.168-.025-.004-.049-.014-.073-.015-.082-.007-.125-.063-.137-.131-.033-.198-.004-.355.247-.408.086-.018.174-.03.26-.042.158-.023.315-.053.473-.067.14-.012.19.033.226.167.008.029.018.057.021.087.019.179-.008.225-.141.288-.027.013-.055.024-.078.042a.148.148 0 00-.051.067c-.039.144.073.382.206.445l.673.32c.023.011.05.015.075.023l.018-.026c-.015-.008-.032-.013-.044-.024a2.27 2.27 0 00-.544-.32 4.898 4.898 0 00-.173-.075.203.203 0 01-.126-.191c-.003-.085.045-.154.128-.187l.059-.025c.099-.044.118-.076.112-.187a.384.384 0 00-.008-.063c-.067-.294-.123-.59-.205-.88a9.478 9.478 0 00-.826-2.036 7.465 7.465 0 00-1.39-1.805 4.536 4.536 0 00-1.177-.824 3.656 3.656 0 00-1.016-.328 6.155 6.155 0 00-.712-.074zm6.719 5.955c.01.014.018.028.038.034l-.022-.044-.016.01zM4.103 3.917a.062.062 0 01-.03.012.455.455 0 01-.04.039c-.01.01-.02.02-.045.04l-.363.354c-.088.085-.17.178-.266.253-.284.22-.425.53-.544.855a.132.132 0 00-.007.071c.013.055.033.108.052.168l.074.026c-.017.056-.03.105-.047.152-.058.164-.118.327-.175.491-.005.015.008.036.019.077.08-.175.158-.33.225-.489.228-.544.484-1.074.819-1.561.09-.133.182-.266.283-.401.004-.006.007-.013.022-.03.001-.016.003-.032.015-.04l.008-.017zm12.976 2.408a.023.023 0 01.009.019.073.073 0 00-.006.01.188.188 0 00.007.02l.018.022c.002-.007.007-.016.005-.021-.003-.01-.012-.018-.02-.038a1.331 1.331 0 01-.013-.012zM4.199 4.48c-.003.004-.008.008-.027.014-.005.013-.011.025-.031.047a2.085 2.085 0 01-.124.167c-.048.07-.116.055-.181.041-.134-.028-.228.016-.287.143-.089.187-.187.37-.273.56-.049.108-.11.216-.118.36.081.003.154.007.228.008h.228a2.563 2.563 0 01-.079.264c-.01.052-.022.103-.033.155l.02.004c.018-.046.037-.092.067-.153.066-.142.13-.285.2-.426.02-.04.034-.1.116-.092 0 .043.004.084 0 .124-.005.045-.017.09-.028.143.141.043.086.174.115.269.102-.022.104-.195.248-.144v.205l.017.002.439-1.059c-.13 0-.246-.02-.358.033-.024.011-.058-.001-.108-.004.075-.15.139-.278.211-.417a.128.128 0 01.025-.036c0-.015-.001-.03.008-.038l.006-.02c-.005.006-.01.011-.028.017-.004.012-.009.024-.026.045a.085.085 0 01-.032.033c-.123.157-.09.164-.258.106-.079-.027-.078-.028-.047-.144.028-.046.056-.093.098-.15 0-.016-.001-.032.007-.042L4.2 4.48zm2.073-.67c-.003.006-.007.011-.027.016-.094.125-.194.246-.28.377-.155.238-.301.481-.451.723-.14.224-.345.368-.575.481-.017.008-.04.006-.079.011.012-.059.016-.109.033-.153a6.076 6.076 0 01.229-.518l-.007-.02a.138.138 0 01-.035.025c-.028.05-.055.1-.093.164-.26.424-.443.817-.442.95.024.004.048.011.073.013.177.013.188.007.26-.165.03-.07.077-.12.147-.15l.175-.07c.044-.018.085-.057.146-.032.003.05-.01.11.014.145.042.062.044.125.047.193.002.049.017.098.026.147.029-.034.039-.065.05-.097.142-.39.277-.782.428-1.17.1-.256.22-.504.33-.756.013-.03.013-.067.03-.092V3.81zm3.987-.34c0 .045.01.084.021.123.042.16.094.318.124.48.024.133.023.27.028.406 0 .033-.019.067-.032.11-.094-.058-.047-.158-.106-.215h-.125c-.015.072-.01.152-.046.2-.066.085-.155.154-.236.227-.043.038-.078.018-.103-.025l-.046-.087c-.065.035-.117.069-.172.093-.116.051-.235.095-.35.147-.085.038-.09.053-.07.147.014.075.034.148.047.223.013.072.05.109.123.124.233.05.462.115.657.265.058-.102.058-.102.168-.151.03-.014.06-.03.092-.042.08-.03.115-.017.15.06.023.048.041.098.066.158.06-.14-.042-.267.017-.416.157.18.24.39.375.567a.235.235 0 00.022-.098c.002-.124 0-.247.002-.371 0-.034.013-.067.02-.1l.032-.003c.11.155.13.354.226.52a3.036 3.036 0 00-.01-.392c-.004-.045 0-.074.05-.088.08.036.116.14.215.158-.03-.275-.423-1.137-.798-1.635-.114-.127-.2-.28-.34-.386zm-2.667.696c-.019.034-.03.05-.037.067-.061.185-.125.37-.18.556-.031.105-.087.169-.195.19-.09.019-.178.052-.268.073-.038.009-.089.015-.118-.003-.024-.016-.025-.069-.036-.106-.064.076-.082.087-.17.047-.133-.062-.262-.135-.393-.201-.048-.025-.093-.063-.17-.03-.043.12-.091.25-.137.382-.099.28-.087.242.095.453.046.048.102.03.154.023.054-.009.106-.03.16-.036.13-.013.26-.08.367-.015.204-.064.387-.122.571-.178.05-.015.089.005.114.054.022.042.034.093.082.121.038-.056-.013-.128.063-.178l.14.241-.042-1.46zm.278.358c-.096-.01-.107.01-.11.108-.002.038-.003.078.002.115.03.2.099.386.174.57.002.006.012.01.022.015l.078-.05c.052.036.081.088.153.088.205-.002.41.014.616.012.099-.001.158.042.205.12.018.03.024.077.088.066l-.08-.394c-.05-.195-.085-.395-.172-.589-.057.057-.114.068-.18.046a.72.72 0 00-.135-.028c-.22-.028-.44-.059-.66-.08zm10.254-1.727c.089.163.155.316.139.491-.016.168.026.342-.044.516-.047-.033-.088-.082-.112-.075-.117.035-.164-.057-.227-.115a4.772 4.772 0 01-.286-.29l-.104-.113a4.856 4.856 0 01-.023.019c.035.046.07.093.11.156.04.064.084.127.122.193.034.058.065.118.031.205-.082-.01-.164-.019-.246-.032-.06-.01-.101 0-.124.07-.031.098-.037.096-.15.09.02.042.036.08.057.116.041.074.03.138-.03.196-.06.06-.118.122-.178.181a.175.175 0 01-.185.046c-.222-.061-.447-.113-.67-.174-.032-.009-.063-.04-.086-.068-.03-.04-.052-.087-.08-.13-.044-.07-.09-.138-.136-.207a.18.18 0 00-.014.105c.012.127.03.253.035.38.005.1-.024.12-.121.104-.104-.017-.206-.04-.31-.058-.064-.012-.131-.028-.202.03l.081.208c.09 0 .166-.01.237.002a.819.819 0 01.458.251c.078.083.154.168.241.26l.018-.005c-.004-.006-.008-.013-.01-.04.014-.056-.062-.118.018-.178.031.03.064.057.088.09.058.078.111.159.169.257l.089.141.024-.013a2093.819 2093.819 0 01-.427-.934c.055.007.083.007.108.016.193.07.385.142.577.216.074.028.147.06.219.094.062.028.112.018.157-.033.05-.056.102-.112.154-.167.05-.051.095-.046.132.014.016.025.026.053.04.08.071.138.143.277.217.433l.159.308.025-.011c-.044-.106-.07-.218-.138-.334-.057-.182-.168-.346-.206-.545.136.034.362.326.567.732l.057.074.018-.011a1.563 1.563 0 01-.052-.127c-.046-.145-.097-.29-.136-.436-.022-.083-.036-.173.022-.26l.109.058-.026-.207.027-.016c.022.02.05.036.065.06.073.108.143.22.215.33.01.016.029.029.043.043-.036-.217-.2-.38-.229-.626l.155.112c.014-.166.012-.319.042-.465.032-.158-.023-.297-.063-.445.024.004.036.006.055.025.092.124.183.249.277.371.02.027.05.047.069.087l.04.063.019-.015a.293.293 0 01-.053-.082 27.922 27.922 0 01-.332-.49c-.221-.311-.363-.467-.485-.521zm-6.57.327c-.003.161.092.275.069.415l-.368.087c.09.139.032.237-.052.331-.05.057-.092.122-.143.178-.037.04-.046.078-.018.126l.16.275c.029.048.072.066.128.064.076-.003.152 0 .228-.001.116-.003.216.022.275.137.006.014.02.024.044.052.004-.059-.003-.098.01-.13.016-.04.04-.099.072-.108.084-.023.173-.024.26-.03.013-.001.027.018.04.029l.071.065c.019-.11-.082-.198-.024-.31l.126.04c-.026-.123-.07-.245-.071-.366 0-.123.051-.243.115-.36.107.062.16.156.234.253.183.265.36.533.494.834.165-.078.27.068.407.088-.003-.106-.133-.441-.197-.492a.142.142 0 00-.102-.028c-.06.011-.119.039-.191.063-.025-.039-.056-.078-.077-.122a3.936 3.936 0 00-.473-.783c-.076-.094-.16-.182-.228-.26l-.391.285c-.049.035-.094.03-.132-.017l-.169-.207c-.025-.03-.053-.059-.097-.108z`}),t[0]=n,t[1]=r,t[2]=i,t[3]=a):(n=t[0],r=t[1],i=t[2],a=t[3]);let o;return t[4]===e?o=t[5]:(o=(0,F.jsxs)(`svg`,{role:`img`,"aria-label":`Hermes icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`currentColor`,fillRule:`evenodd`,viewBox:`0 0 24 24`,...e,children:[n,r,i,a]}),t[4]=e,t[5]=o),o}function _e(e){let t=(0,I.c)(7),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(`title`,{children:`OpenClaw icon`}),t[0]=n):n=t[0];let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,F.jsxs)(`mask`,{id:`openclaw-eyes`,maskUnits:`userSpaceOnUse`,x:0,y:0,width:120,height:120,children:[(0,F.jsx)(`rect`,{width:120,height:120,fill:`white`}),(0,F.jsx)(`circle`,{cx:45,cy:35,r:6,fill:`black`}),(0,F.jsx)(`circle`,{cx:75,cy:35,r:6,fill:`black`})]}),t[1]=r):r=t[1];let i,a,o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,F.jsxs)(`g`,{fill:`currentColor`,mask:`url(#openclaw-eyes)`,children:[(0,F.jsx)(`path`,{d:`M60 10 C30 10 15 35 15 55 C15 75 30 95 45 100 L45 110 L55 110 L55 100 C55 100 60 102 65 100 L65 110 L75 110 L75 100 C90 95 105 75 105 55 C105 35 90 10 60 10Z`}),(0,F.jsx)(`path`,{d:`M20 45 C5 40 0 50 5 60 C10 70 20 65 25 55 C28 48 25 45 20 45Z`}),(0,F.jsx)(`path`,{d:`M100 45 C115 40 120 50 115 60 C110 70 100 65 95 55 C92 48 95 45 100 45Z`})]}),a=(0,F.jsx)(`path`,{d:`M45 15 Q35 5 30 8`,fill:`none`,stroke:`currentColor`,strokeWidth:3,strokeLinecap:`round`}),o=(0,F.jsx)(`path`,{d:`M75 15 Q85 5 90 8`,fill:`none`,stroke:`currentColor`,strokeWidth:3,strokeLinecap:`round`}),t[2]=i,t[3]=a,t[4]=o):(i=t[2],a=t[3],o=t[4]);let s;return t[5]===e?s=t[6]:(s=(0,F.jsxs)(`svg`,{role:`img`,"aria-label":`OpenClaw icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 120 120`,...e,children:[n,r,i,a,o]}),t[5]=e,t[6]=s),s}function ve(e){let t=(0,I.c)(5),n,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(`title`,{children:`OpenCode icon`}),r=(0,F.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M384 416H128V96H384V416ZM320 160H192V352H320V160Z`}),i=(0,F.jsx)(`path`,{fill:`currentColor`,fillOpacity:.55,d:`M320 224V352H192V224H320Z`}),t[0]=n,t[1]=r,t[2]=i):(n=t[0],r=t[1],i=t[2]);let a;return t[3]===e?a=t[4]:(a=(0,F.jsxs)(`svg`,{role:`img`,"aria-label":`OpenCode icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 512 512`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}function ye(e){let t=(0,I.c)(5),n,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(`title`,{children:`Pi icon`}),r=(0,F.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M165.29 165.29H517.36V400H400V517.36H282.65V634.72H165.29ZM282.65 282.65V400H400V282.65Z`}),i=(0,F.jsx)(`path`,{fill:`currentColor`,d:`M517.36 400H634.72V634.72H517.36Z`}),t[0]=n,t[1]=r,t[2]=i):(n=t[0],r=t[1],i=t[2]);let a;return t[3]===e?a=t[4]:(a=(0,F.jsxs)(`svg`,{role:`img`,"aria-label":`Pi icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 800 800`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}var be={"claude-cowork":`claude`,"claude-code":`claude`,codex:`openai`,cursor:`cursor`,copilot:`github`,opencode:`opencode`,pi:`pi`,antigravity:`antigravity`,openclaw:`openclaw`,hermes:`hermes`};function xe(e){let t=(0,I.c)(47),n,r,a,s;t[0]===e?(n=t[1],r=t[2],a=t[3],s=t[4]):({id:r,style:s,className:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=s);let{resolvedTheme:c}=i(),u=be[r],m=u?(c===`dark`?l[u]:void 0)??ee[u]:void 0,h;t[5]!==m||t[6]!==s?(h=m?{...s,"--ok-brand-color":m}:s,t[5]=m,t[6]=s,t[7]=h):h=t[7];let g=h,_=m&&`[&_*]:![color:var(--ok-brand-color)]`,v;t[8]!==n||t[9]!==_?(v=o(_,n),t[8]=n,t[9]=_,t[10]=v):v=t[10];let y=v;if(r===`claude-cowork`||r===`claude-code`){let e;return t[11]!==y||t[12]!==g||t[13]!==a?(e=(0,F.jsx)(d,{style:g,className:y,...a}),t[11]=y,t[12]=g,t[13]=a,t[14]=e):e=t[14],e}if(r===`codex`){let e;return t[15]!==y||t[16]!==g||t[17]!==a?(e=(0,F.jsx)(f,{style:g,className:y,...a}),t[15]=y,t[16]=g,t[17]=a,t[18]=e):e=t[18],e}if(r===`cursor`){let e;return t[19]!==y||t[20]!==g||t[21]!==a?(e=(0,F.jsx)(p,{style:g,className:y,...a}),t[19]=y,t[20]=g,t[21]=a,t[22]=e):e=t[22],e}if(r===`copilot`){let e;return t[23]!==y||t[24]!==g||t[25]!==a?(e=(0,F.jsx)(te,{style:g,className:y,...a}),t[23]=y,t[24]=g,t[25]=a,t[26]=e):e=t[26],e}if(r===`opencode`){let e;return t[27]!==y||t[28]!==g||t[29]!==a?(e=(0,F.jsx)(ve,{style:g,className:y,...a}),t[27]=y,t[28]=g,t[29]=a,t[30]=e):e=t[30],e}if(r===`pi`){let e;return t[31]!==y||t[32]!==g||t[33]!==a?(e=(0,F.jsx)(ye,{style:g,className:y,...a}),t[31]=y,t[32]=g,t[33]=a,t[34]=e):e=t[34],e}if(r===`antigravity`){let e;return t[35]!==y||t[36]!==g||t[37]!==a?(e=(0,F.jsx)(he,{style:g,className:y,...a}),t[35]=y,t[36]=g,t[37]=a,t[38]=e):e=t[38],e}if(r===`openclaw`){let e;return t[39]!==y||t[40]!==g||t[41]!==a?(e=(0,F.jsx)(_e,{style:g,className:y,...a}),t[39]=y,t[40]=g,t[41]=a,t[42]=e):e=t[42],e}if(r===`hermes`){let e;return t[43]!==y||t[44]!==g||t[45]!==a?(e=(0,F.jsx)(ge,{style:g,className:y,...a}),t[43]=y,t[44]=g,t[45]=a,t[46]=e):e=t[46],e}return null}var Se=s;function Ce(e){return c[e].handoffTarget}export{ae as S,re as _,$ as a,N as b,W as c,U as d,de as f,ie as g,se as h,me as i,H as l,z as m,Ce as n,fe as o,R as p,xe as r,pe as s,Se as t,ue as u,P as v,oe as x,A as y};
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r}from"./dist-Nvb76hAm.js";import{n as i}from"./dist-PQ5KMVDh.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./utils-CPqDy6Hr.js";import"./dropdown-menu-CLgDYkh1.js";import{Gt as s,Kt as c,n as l,t as ee}from"./dist-BDUZWXxp.js";import{t as u}from"./badge-DFX4S3a5.js";import{i as d,n as f,t as p}from"./cursor-B6reg1lS.js";import{t as te}from"./copilot-Dh1BU6kS.js";var m=e(n(),1),h=`ok-acp-registered-agents-v1`,g={agents:[],defaultKey:null};function _(e){return`${e.source}:${e.id}`}function v(e){if(typeof e!=`object`||!e)return!1;let t=e;return(t.source===`registry`||t.source===`custom`)&&typeof t.id==`string`&&t.id!==``&&typeof t.name==`string`&&t.name!==``&&(t.iconUrl===void 0||typeof t.iconUrl==`string`)&&(t.lastUsedAt===void 0||typeof t.lastUsedAt==`number`)&&(t.featured===void 0||typeof t.featured==`boolean`)}function y(){let e;try{e=localStorage.getItem(h)}catch{return g}if(e===null)return g;try{let t=JSON.parse(e),n=Array.isArray(t.agents)?t.agents.filter(v):[];return{agents:n,defaultKey:typeof t.defaultKey==`string`&&n.some(e=>_(e)===t.defaultKey)?t.defaultKey:null}}catch(e){return console.warn(`[registered-agents] discarding corrupt localStorage payload`,e),g}}function b(e){try{localStorage.setItem(h,JSON.stringify(e))}catch(e){console.warn(`[registered-agents] failed to persist registration`,e)}}var x=null,S=[],C=null,w=new Set;function T(){return x===null&&(x=y()),x}function E(e){x=e,C=M(e.agents,S);for(let e of w)e()}function ne(){E(y())}typeof window<`u`&&typeof window.addEventListener==`function`&&window.addEventListener(`storage`,e=>{(e.key===h||e.key===null)&&ne()});function D(e){return w.add(e),()=>w.delete(e)}var O=()=>(C===null&&(C=M(T().agents,S)),C),k=()=>{let{agents:e,defaultKey:t}=T();return t===null?null:e.find(e=>_(e)===t)??null};function A(e,t={}){let{makeDefault:n=!0}=t,r=_(e),i=T();if(!n){let t={agents:i.agents.some(e=>_(e)===r)?i.agents.map(t=>_(t)===r?{...e,...t.lastUsedAt===void 0?{}:{lastUsedAt:t.lastUsedAt}}:t):[...i.agents,e],defaultKey:i.defaultKey};b(t),E(t);return}let a=i.agents.filter(e=>_(e)!==r),o={agents:[{...e,lastUsedAt:Date.now()},...a],defaultKey:r};b(o),E(o)}function j(e,t){let n=e.lastUsedAt??0,r=t.lastUsedAt??0;if(n!==r)return r-n;let i=e.featured===!0?0:1,a=t.featured===!0?0:1;return i===a?e.name.localeCompare(t.name,void 0,{numeric:!0,sensitivity:`base`}):i-a}function M(e,t){let n=new Set(e.map(_));return[...e,...t.filter(e=>!n.has(_(e)))].sort(j)}function N(e){S=[...e],C=M(T().agents,S);for(let e of w)e()}function P(e,t){let n=T();if(n.defaultKey!==e)return;let r=n.agents.find(n=>_(n)!==e&&t(n))??null,i={agents:n.agents,defaultKey:r?_(r):null};b(i),E(i)}function re(e,t){return t!==null&&e.some(e=>e.source===t.source&&e.id===t.id)?t:e[0]??null}function ie(e){let t=new Map(e.map(e=>[_(e),e])),n=T(),r=!1,i=n.agents.map(e=>{let n=t.get(_(e));if(n===void 0)return e;let i=n.name??e.name,a=n.iconUrl??e.iconUrl,o=n.supported??e.supported,s=n.featured??e.featured;return i===e.name&&a===e.iconUrl&&o===e.supported&&s===e.featured?e:(r=!0,{...e,name:i,...a===void 0?{}:{iconUrl:a},...o===void 0?{}:{supported:o},...s===void 0?{}:{featured:s}})});if(!r)return;let a={agents:i,defaultKey:n.defaultKey};b(a),E(a)}function ae(){return(0,m.useSyncExternalStore)(D,O,O)}function oe(){return(0,m.useSyncExternalStore)(D,k,k)}var F=t(),I=a();async function se(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.openExternal)try{return await n.shell.openExternal(e),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:L(e)}}let r=t.doc??(typeof document<`u`?document:void 0);if(!r)return{ok:!1,reason:`dispatch-error`,detail:`no DOM available`};try{let t=r.createElement(`a`);return t.href=e,t.rel=`noopener noreferrer`,/^https?:/i.test(e)&&(t.target=`_blank`),r.body.appendChild(t),t.click(),t.remove(),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:L(e)}}}function L(e){if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}var R=[{id:`claude-cowork`,displayName:`Claude Cowork`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Conversational pairing in Claude Desktop's Cowork tab.`},{id:`claude-code`,displayName:`Claude`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Agentic coding in Claude Desktop's Code tab.`},{id:`codex`,displayName:`Codex`,appBrandName:`Codex Desktop`,schemes:[`codex:`],installUrl:`https://openai.com/codex`,tagline:`OpenAI's coding agent, terminal-native.`},{id:`cursor`,displayName:`Cursor`,schemes:[`cursor:`],installUrl:`https://cursor.com/`,tagline:`AI-first VS Code fork with multi-file edits.`},{id:`copilot`,displayName:`GitHub Copilot`,schemes:[],installUrl:`https://docs.github.com/en/copilot/how-tos/copilot-cli/cli-getting-started`,tagline:`GitHub's terminal-native coding agent.`},{id:`opencode`,displayName:`OpenCode`,schemes:[],installUrl:`https://opencode.ai`,tagline:`Open-source terminal coding agent; bring any local model.`},{id:`pi`,displayName:`Pi`,schemes:[],installUrl:`https://pi.dev`,tagline:`Minimal open-source terminal coding agent, extensible in TypeScript.`},{id:`antigravity`,displayName:`Antigravity`,schemes:[],installUrl:`https://antigravity.google`,tagline:"Google's agentic IDE + `agy` terminal agent."},{id:`openclaw`,displayName:`OpenClaw`,schemes:[],installUrl:`https://openclaw.ai`,tagline:`Open-source agent gateway; runs agents against your MCP servers.`},{id:`hermes`,displayName:`Hermes`,schemes:[],installUrl:`https://hermes-agent.nousresearch.com`,tagline:`Nous Research's terminal coding agent.`}],z=R.filter(e=>e.id!==`claude-cowork`&&e.id!==`copilot`&&e.id!==`opencode`&&e.id!==`pi`&&e.id!==`antigravity`&&e.id!==`openclaw`&&e.id!==`hermes`),B=`ok-acp-enabled-agents-v1`,V={};function H(e,t){return`in-app:${e}:${t}`}function U(e){return`terminal:${e}`}function W(e){return`desktop:${e}`}function G(e,t){return e??t}function K(){let e;try{e=localStorage.getItem(B)}catch(e){return console.warn(`[enabled-agents] localStorage unavailable; treating overrides as empty`,e),V}if(e===null)return V;try{let t=JSON.parse(e);if(typeof t!=`object`||!t)return V;let n={};for(let[e,r]of Object.entries(t))typeof r==`boolean`&&(n[e]=r);return n}catch(e){return console.warn(`[enabled-agents] discarding corrupt localStorage payload`,e),V}}function q(e){try{localStorage.setItem(B,JSON.stringify(e))}catch(e){console.warn(`[enabled-agents] failed to persist override`,e)}}var J=null,Y=new Set;function X(){return J===null&&(J=K()),J}function Z(e){J=e;for(let e of Y)e()}function ce(){Z(K())}typeof window<`u`&&typeof window.addEventListener==`function`&&window.addEventListener(`storage`,e=>{(e.key===B||e.key===null)&&ce()});function le(e){return Y.add(e),()=>Y.delete(e)}var Q=()=>X();function ue(e,t){let n=X();if(t===void 0){if(!(e in n))return;let{[e]:t,...r}=n;q(r),Z(r);return}if(n[e]===t)return;let r={...n,[e]:t};q(r),Z(r)}function de(){return(0,m.useSyncExternalStore)(le,Q,Q)}function fe(e,t,n,r,i){return i===!1?!1:G(e[H(t,n)],r)}function pe(e,t,n){return G(e[U(t)],n[t]!==!1)}function $(e,t){return G(e[W(t)],!1)}function me(e){let t=(0,I.c)(5),{className:n}=e,i;t[0]===n?i=t[1]:(i=o(`h-4 px-1 text-[10px]`,n),t[0]=n,t[1]=i);let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,F.jsx)(r,{id:`YBt9YP`}),t[2]=a):a=t[2];let s;return t[3]===i?s=t[4]:(s=(0,F.jsx)(u,{variant:`gray`,className:i,children:a}),t[3]=i,t[4]=s),s}function he(e){let t=(0,I.c)(5),n,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(`title`,{children:`Antigravity icon`}),r=(0,F.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 2.5a1.5 1.5 0 0 1 1.28.72l8.5 14A1.5 1.5 0 0 1 20.5 19.5h-17a1.5 1.5 0 0 1-1.28-2.28l8.5-14A1.5 1.5 0 0 1 12 2.5Zm0 4.42L5.83 17h12.34L12 6.92Z`}),i=(0,F.jsx)(`path`,{fill:`currentColor`,d:`M12 9.6 15.6 17h-7.2L12 9.6Z`}),t[0]=n,t[1]=r,t[2]=i):(n=t[0],r=t[1],i=t[2]);let a;return t[3]===e?a=t[4]:(a=(0,F.jsxs)(`svg`,{role:`img`,"aria-label":`Antigravity icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 24 24`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}function ge(e){let t=(0,I.c)(6),n,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(`title`,{children:`Hermes icon`}),r=(0,F.jsx)(`path`,{d:`M5.938 12.835c.127-.039.285.02.373.143.028.038.036.092.046.14.003.014-.02.033-.04.05-.124-.098-.24-.194-.354-.291-.011-.01-.016-.027-.025-.042zM8.396 9.412c.195-.032.39-.06.588-.05a.54.54 0 01.148.026c.202.071.402.147.601.224.028.01.05.036.075.055l-.013.027a9.203 9.203 0 01-.26-.089c-.115-.038-.213-.077-.315-.098-.25-.05-.25-.046-.292-.014l.574.144c.275.139.55.276.823.417.042.022.09.057.107.098.026.06.063.076.117.072.066-.006.132-.017.213-.027l-.04.086c.051.08.142.02.216.064-.074.13-.247.09-.334.199l.061.074-.12.087c0 .106-.038.168-.306.243l.026.085-.196.042.07.124h-.25l-.007.137c-.081-.01-.161-.018-.244-.027l-.053.123c-.027-.008-.052-.011-.073-.023-.067-.038-.128-.056-.195.006-.019.017-.063.014-.093.008-.026-.006-.05-.029-.07-.042-.11.095-.11.095-.208.003-.057.046-.12.074-.186.011-.063.027-.123-.02-.178-.014-.07.007-.097-.035-.133-.07l-.13.033c-.013-.236-.194-.19-.34-.203.005-.072.05-.092.095-.094a.474.474 0 01.159.022c.164.05.32.12.496.138.203.021.405.029.601-.015.265-.059.52-.149.707-.365.049-.056.083-.127.117-.195.019-.038.02-.084-.02-.116a1.397 1.397 0 00-.382-.217c.024.12-.031.182-.115.221 0 .014-.004.025 0 .03.08.115.084.16-.007.267a1.39 1.39 0 01-.218.211.477.477 0 01-.641-.05 1.36 1.36 0 01-.133-.152c-.078-.107-.076-.108-.033-.236-.165-.08-.128-.226-.104-.364.008-.05.028-.096.049-.163-.04.014-.067.017-.087.032a.897.897 0 00-.316.357c-.007.016-.01.034-.02.047-.012.015-.034.038-.045.035-.02-.006-.037-.027-.05-.045-.008-.012-.007-.032-.012-.057h-.126l.053-.172a14.82 14.82 0 00-.039-.049l.11-.284c-.06.026-.091.044-.124.051-.03.007-.064 0-.095 0 0-.031-.01-.07.004-.092.149-.22.305-.428.593-.476z`}),i=(0,F.jsx)(`path`,{d:`M8.06 10.788c-.003-.038-.004-.075.037-.062.016.006.034.048.028.067-.01.04-.038.032-.064-.005z`}),a=(0,F.jsx)(`path`,{clipRule:`evenodd`,d:`M11.981.009c.226-.012.453-.011.679 0 .247.01.495.024.74.062.401.064.798.157 1.19.273.463.138.92.299 1.356.511a7.31 7.31 0 012.948 2.642c.292.469.536.963.739 1.479.219.556.446 1.11.623 1.683.204.654.329 1.326.458 1.997.097.504.182 1.01.29 1.511.156.722.329 1.44.494 2.16.186.812.4 1.615.63 2.415.102.355.193.713.282 1.072.11.436.202.876.254 1.323.031.278.066.557.073.837a7.56 7.56 0 01-.017.88c-.037.413-.1.818-.226 1.212a5.017 5.017 0 01-.915 1.649l-.13.156.018.023c.043-.023.088-.041.127-.068.2-.138.373-.307.531-.49.4-.46.721-.973.975-1.529a3.59 3.59 0 00.325-1.72c-.024-.424-.097-.834-.3-1.213-.013-.027-.015-.06-.03-.121.05.035.082.048.101.072.107.13.22.258.315.398.33.494.46 1.052.486 1.64a3.75 3.75 0 01-.47 1.97c-.36.655-.887 1.14-1.526 1.506-.193.111-.394.21-.595.308-.157.078-.248.211-.318.365a.522.522 0 00-.033.406.359.359 0 01.013.139c-.005.077-.077.155-.14.162-.054.006-.125-.043-.15-.116a1.206 1.206 0 01-.06-.233c-.04-.314-.155-.6-.308-.87a3.906 3.906 0 00-.73-.91 2.129 2.129 0 00-.897-.524 4.093 4.093 0 00-.692-.131c-.075-.008-.15-.04-.22.01.18.06.363.11.538.18.434.173.82.43 1.18.728.308.255.58.543.794.884.098.155.186.315.227.496.027.123.042.25.067.375.013.062-.002.109-.053.144-.047.033-.122.034-.163-.01a.455.455 0 01-.08-.14c-.03-.073-.038-.159-.078-.225a7.314 7.314 0 00-1.423-1.664c-.16-.137-.329-.26-.537-.323-.376-.114-.753-.203-1.15-.154-.213.025-.427.032-.64.053a1.6 1.6 0 00-.736.278 5.14 5.14 0 00-.834.72c-.329.342-.642.699-.955 1.055-.136.155-.264.319-.314.531a5.227 5.227 0 00-.012.051.096.096 0 01-.09.076h-.31c-.046 0-.082-.048-.072-.094.023-.108.045-.216.07-.324.075-.325.19-.635.368-.917.024-.039.04-.088.104-.08l.01.049.027.077c.28-.435.571-.834.996-1.135.283-.204.584-.378.89-.55a.196.196 0 00-.098-.002c-.162.043-.325.084-.485.134-.402.124-.764.33-1.11.566-.147.1-.298.193-.414.333a7.314 7.314 0 00-1.07 1.767.845.845 0 00-.04.12.075.075 0 01-.072.056h-.494c-.04 0-.062-.051-.036-.082.123-.14.246-.282.377-.415.275-.281.58-.532.777-.884.027-.048.063-.09.095-.135.238-.333.54-.607.818-.902.082-.086.175-.16.26-.24.029-.027.053-.057.079-.085l-.018-.025-.135.041c-.034.017-.07.031-.102.05-.248.144-.494.292-.743.433-.408.23-.825.439-1.209.711-.281.2-.591.358-.889.533-.02.012-.044.015-.08.028-.015-.135.143-.201.108-.336-.033.014-.064.02-.085.038-.111.096-.227.19-.328.296-.148.157-.284.325-.425.488-.125.143-.25.286-.373.431A.153.153 0 019.89 24H8.762a.316.316 0 00.016-.042c.028-.09.085-.172.083-.28-.091-.018-.162.001-.212.077a4.45 4.45 0 00-.136.215c-.01.016-.024.03-.042.03h-.093c-.019 0-.029-.022-.017-.037.071-.088.14-.178.209-.268.001-.002-.006-.012-.012-.024-.014.004-.03.006-.045.013-.176.09-.352.181-.527.274a.363.363 0 01-.168.042H5.202c-.026 0-.039-.036-.019-.053.21-.178.402-.374.558-.605.335-.496.538-1.047.667-1.629.004-.02-.003-.043-.006-.091-.037.048-.059.072-.076.1a1.943 1.943 0 01-.334.415c-.28.258-.59.448-.983.464-.297.012-.588 0-.865-.127-.46-.21-.722-.57-.794-1.072-.025-.17-.017-.171-.182-.219A3.513 3.513 0 011.97 20.6a2.286 2.286 0 01-.808-1.13 3.569 3.569 0 01-.16-1.245c.002-.034.016-.067.024-.1.032.023.046.043.05.066.033.153.059.308.096.46.086.355.257.664.516.92.258.256.571.419.91.532.358.118.717.138 1.07-.016a1.89 1.89 0 00.621-.452c.328-.348.533-.76.648-1.223.009-.034.005-.071.007-.11-.015.006-.026.006-.03.011-.031.05-.064.1-.093.152-.284.502-.679.887-1.196 1.135-.351.17-.718.255-1.11.159a1.607 1.607 0 01-.971-.64 2.006 2.006 0 01-.368-.924 2.903 2.903 0 01.02-.886c.05-.439.466-1.17.742-1.271-.02.063-.035.112-.053.16-.043.116-.097.227-.13.345a1.901 1.901 0 00-.05.82c.033.212.09.416.204.6.147.236.346.407.62.465.11.023.225.014.338.018a.576.576 0 00.386-.131c.164-.128.282-.292.366-.481.168-.375.24-.777.309-1.179.05-.296.093-.594.133-.893.039-.281.071-.563.104-.845.026-.232.048-.464.074-.696.024-.228.052-.455.076-.683.024-.227.047-.455.069-.683.013-.14.022-.28.034-.42l.037-.417c.022-.25.041-.5.065-.748.008-.082-.02-.132-.09-.177a2.46 2.46 0 01-.492-.418c-.1-.109-.188-.228-.282-.342-.035-.042-.056-.097-.116-.118a2.084 2.084 0 00.275.597c.06.092.131.176.196.265.063.086.182.115.234.226-.028.003-.046.01-.06.006a4.74 4.74 0 01-.22-.057 2.71 2.71 0 01-1.287-.819c-.435-.487-.656-1.076-.71-1.723a5.206 5.206 0 01.014-1.06c.072-.602.22-1.186.45-1.745.155-.376.338-.741.526-1.102.205-.393.466-.75.765-1.076.512-.559 1.104-1.024 1.726-1.448.717-.49 1.478-.898 2.277-1.233C8.244.828 8.767.632 9.31.494c.655-.166 1.31-.33 1.982-.415.229-.03.458-.058.688-.07zm-1.847 22.82c-.07.06-.147.111-.207.18-.238.27-.464.549-.668.869l-.044.108a.177.177 0 00.093-.057c.174-.19.351-.378.519-.574.104-.122.195-.255.288-.386.024-.034.03-.08.046-.12l-.027-.02zm1.65-3.695a5.51 5.51 0 00-.653.593l-.37.386a.963.963 0 01-.377.25 1.372 1.372 0 01-.467.09c-.044 0-.087.006-.151.012.028.058.043.097.064.131.15.242.301.482.45.724.136.22.276.438.399.666.068.125.105.267.156.404.077.027.14-.018.202-.048.29-.135.579-.274.867-.412.213-.101.437-.186.636-.31.347-.215.68-.455 1.018-.685.015-.01.026-.028.042-.046-.023-.019-.038-.037-.056-.044-.287-.111-.527-.3-.77-.482a5.319 5.319 0 01-.506-.42 1.757 1.757 0 01-.41-.653c-.019-.049-.045-.095-.075-.156zm-5.847.264c-.06.096-.097.194-.132.293a3.38 3.38 0 01-.555 1.01c-.2.25-.455.412-.762.493-.23.06-.464.076-.7.07-.048-.002-.097.002-.158.005.016.04.021.066.035.085.1.145.23.246.4.295.157.046.316.034.498.023.181-.037.343-.115.485-.234.238-.199.402-.454.536-.732.175-.363.264-.751.342-1.144.01-.053.008-.11.011-.164zm14.945-4.586c.008.029.016.057.027.107.024.155.051.31.072.464.03.219.067.437.078.657.017.344.027.689-.014 1.033-.037.315-.063.633-.116.946a6.153 6.153 0 01-.46 1.518c-.008.018-.01.039-.02.082.047-.03.077-.042.098-.064.085-.083.17-.167.248-.255.271-.305.458-.66.596-1.043.18-.498.228-1.011.145-1.531-.103-.65-.33-1.263-.597-1.881a9.055 9.055 0 00-.024-.055l-.033.022zM5.797 8.29a.26.26 0 00.018.153c.124.251.25.501.379.75.025.049.066.09.03.163-.284.06-.578.119-.88.255.059.038.097.06.132.087.042.032.112.058.09.12-.01.033-.075.048-.117.072.017.01.043.021.067.036.166.102.33.207.447.368.138.192.229.404.188.644-.079.469-.306.85-.69 1.132-.054.04-.106.083-.161.122a.243.243 0 00-.103.245.77.77 0 00.055.195c.083.196.22.35.375.492.083.076.159.164.222.257a.37.37 0 01.025.377c-.023.05-.05.099-.076.148-.03.06-.028.111.022.162.041.042.08.089.112.138.038.058.078.079.147.05a.486.486 0 01.333-.006c.16.046.302.126.444.21.13.077.264.149.4.219.067.035.14.05.219.026.071-.022.124.01.145.076.02.064-.003.108-.074.139-.07.03-.137.063-.209.088-.1.035-.201.073-.314.077-.013-.107.11-.088.127-.159-.206-.126-.643-.145-.801-.034.063.112.035.21-.096.313-.13-.1-.025-.202.002-.3a.209.209 0 00-.249.17c-.015.101.067.216.178.224.108.007.218-.005.326-.012.06-.005.12-.027.199 0-.103.123-.248.127-.357.19.002.05.07.086.019.131-.053.048-.095-.001-.132-.03-.08-.063-.16-.126-.231-.197a.474.474 0 01-.157-.311.52.52 0 00-.043-.172c-.032-.074-.032-.137.033-.19-.018-.03-.028-.053-.045-.072a1.222 1.222 0 01-.196-.369c-.053-.137-.046-.264.048-.381.024-.03.05-.06.064-.095a.664.664 0 00.047-.168c.017-.165-.064-.287-.182-.387-.186-.156-.36-.322-.46-.551-.005-.011-.024-.017-.037-.026-.011.017-.024.027-.025.038-.019.185-.045.37-.052.557-.014.377.058.743.162 1.104.118.41.289.798.488 1.173.267.502.537 1.002.812 1.5.055.098.13.189.208.27.198.202.452.272.724.273.202 0 .404-.006.605-.026.295-.03.59-.073.884-.113.183-.025.365-.057.548-.08.21-.026.38.073.522.21.16.156.305.327.447.5.22.265.397.56.554.867.05.098.07.1.147.03.13-.121.26-.242.394-.36.067-.059.088-.12.067-.213a3.535 3.535 0 01-.085-.796c.002-.157.006-.314.018-.471.015-.224.03-.45.06-.672a59.114 59.114 0 01.362-2.298c.087-.493.182-.984.268-1.477.06-.347.118-.694.162-1.043.034-.273.055-.55.063-.825.011-.332.003-.665.002-.998 0-.077.004-.155-.01-.23-.028-.142-.01-.155-.162-.19a5.826 5.826 0 00-.607-.107c-.146-.018-.207-.053-.221-.19-.006-.049-.025-.098-.041-.146-.009-.025-.024-.048-.046-.09l-.025.264c-.009.096-.029.116-.127.115-.055 0-.11-.008-.164-.008-.476 0-.952-.008-1.426.032-.095.008-.173-.015-.226-.103-.04-.066-.088-.126-.134-.186-.063-.084-.086-.093-.182-.06-.195.068-.388.138-.582.21a2.71 2.71 0 00-.675.394.986.986 0 01-.323.168c-.033.01-.07.008-.127.013.02-.066.024-.114.047-.15.064-.105.135-.205.205-.306.023-.033.049-.063.073-.095l-.015-.023-.201.037c-.146.04-.296.07-.437.122-.148.053-.266.023-.386-.072a3.623 3.623 0 01-.733-.786l-.093-.132zm8.592 8.963l-.147.09c-.22.134-.44.266-.659.402-.093.058-.184.12-.27.188-.085.07-.124.161-.072.272.047.1.093.2.147.294.047.08.124.138.213.147.11.01.228.012.336-.012.217-.05.372-.205.528-.357a.291.291 0 00.087-.308c-.046-.18-.079-.365-.118-.547-.011-.052-.027-.103-.045-.169zm-.257-2.409c-.12.291-.205.597-.325.91-.151.433-.294.87-.435 1.323.036-.01.054-.01.067-.018.261-.16.522-.324.785-.484.054-.033.071-.078.065-.138-.012-.13-.024-.262-.034-.393l-.068-.886c-.008-.103-.02-.206-.029-.31-.009 0-.017-.002-.026-.004zm3.081-8.13l.099.285c.08.231.159.463.24.714l.58 1.952c.187.63.372 1.262.558 1.893.114.382.235.762.343 1.146.072.257.126.519.186.799.044.206.087.413.127.64.034.106.023.226.077.325l.025-.006-.068-.362c-.038-.206-.077-.412-.113-.638-.015-.07-.029-.141-.046-.211-.095-.396-.177-.796-.29-1.187-.196-.685-.413-1.364-.618-2.046-.165-.549-.322-1.1-.488-1.648-.069-.227-.15-.45-.226-.695l-.117-.336c-.037-.107-.075-.216-.115-.322-.04-.106-.084-.21-.127-.314a7.558 7.558 0 01-.027.01zM6.225 14.304c-.063-.001-.115.014-.134.083a.35.35 0 00.41.012 4.533 4.533 0 00-.276-.095zM5.23 11.98c-.026-.027-.057-.048-.075.002-.012.032-.007.07-.01.113.082-.037.082-.037.085-.115zm.062-1.189a.135.135 0 00-.088.056.197.197 0 00-.025.11c.005.152.01.306.026.457a.751.751 0 00.066.218c.061.136.157.167.288.101.055-.027.06-.054.025-.11a4.52 4.52 0 01-.129-.211c-.015-.068-.066-.131-.033-.207.04-.09-.076-.116-.074-.19V10.874c-.003-.038-.006-.087-.056-.083zm-.017-.968a.867.867 0 00-.467.127c-.076.045-.084.07-.05.158.034.087.07.173.115.254.064.117.09.125.21.077a.657.657 0 01.336-.053c.202.022.357.136.504.264l.092.077c.007-.006.014-.013.022-.018-.019-.105-.035-.226-.149-.264-.157-.053-.324-.075-.508-.117l-.24-.005c.24-.169.452-.044.687.009-.063-.115-.153-.147-.23-.193-.082-.05-.17-.092-.25-.144-.06-.037-.12-.08-.072-.172zm10.233.325c-.23-.01-.427.08-.608.211-.034.026-.06.065-.105.117.087.026.15.046.232.065.044-.015.088-.03.13-.046.306-.114.61-.115.904.031.126.063.237.04.366-.005-.02-.031-.03-.054-.045-.071a.986.986 0 00-.448-.273c-.14-.044-.284-.024-.426-.03zM7.99 6.483a.308.308 0 00.002.133c.08.321.156.643.242.962.104.387.27.75.456 1.103.02.037.061.08.098.087a.404.404 0 00.253-.051l-.472-.84c-.23-.448-.405-.92-.579-1.394zM10.397.497c-.2-.008-.405.004-.603.034-.236.035-.47.087-.7.152-.287.08-.569.18-.852.273-.04.013-.074.038-.11.058.028.014.05.018.07.014.287-.068.58-.085.873-.09.134-.002.269.009.402.025.19.024.382.048.57.09.456.104.874.3 1.265.556.464.306.888.66 1.257 1.078.205.232.395.475.56.739.17.274.315.561.449.856.273.601.456 1.232.6 1.876.04.173.07.348.1.524.017.104.065.167.17.19.122.028.2.105.22.251-.003.102-.06.174-.129.24a1.065 1.065 0 00-.268.358.164.164 0 00.083-.039c.08-.086.162-.172.235-.265a.56.56 0 00.13-.333c.009-.05.022-.1.024-.15.007-.124-.017-.15-.143-.168-.025-.004-.049-.014-.073-.015-.082-.007-.125-.063-.137-.131-.033-.198-.004-.355.247-.408.086-.018.174-.03.26-.042.158-.023.315-.053.473-.067.14-.012.19.033.226.167.008.029.018.057.021.087.019.179-.008.225-.141.288-.027.013-.055.024-.078.042a.148.148 0 00-.051.067c-.039.144.073.382.206.445l.673.32c.023.011.05.015.075.023l.018-.026c-.015-.008-.032-.013-.044-.024a2.27 2.27 0 00-.544-.32 4.898 4.898 0 00-.173-.075.203.203 0 01-.126-.191c-.003-.085.045-.154.128-.187l.059-.025c.099-.044.118-.076.112-.187a.384.384 0 00-.008-.063c-.067-.294-.123-.59-.205-.88a9.478 9.478 0 00-.826-2.036 7.465 7.465 0 00-1.39-1.805 4.536 4.536 0 00-1.177-.824 3.656 3.656 0 00-1.016-.328 6.155 6.155 0 00-.712-.074zm6.719 5.955c.01.014.018.028.038.034l-.022-.044-.016.01zM4.103 3.917a.062.062 0 01-.03.012.455.455 0 01-.04.039c-.01.01-.02.02-.045.04l-.363.354c-.088.085-.17.178-.266.253-.284.22-.425.53-.544.855a.132.132 0 00-.007.071c.013.055.033.108.052.168l.074.026c-.017.056-.03.105-.047.152-.058.164-.118.327-.175.491-.005.015.008.036.019.077.08-.175.158-.33.225-.489.228-.544.484-1.074.819-1.561.09-.133.182-.266.283-.401.004-.006.007-.013.022-.03.001-.016.003-.032.015-.04l.008-.017zm12.976 2.408a.023.023 0 01.009.019.073.073 0 00-.006.01.188.188 0 00.007.02l.018.022c.002-.007.007-.016.005-.021-.003-.01-.012-.018-.02-.038a1.331 1.331 0 01-.013-.012zM4.199 4.48c-.003.004-.008.008-.027.014-.005.013-.011.025-.031.047a2.085 2.085 0 01-.124.167c-.048.07-.116.055-.181.041-.134-.028-.228.016-.287.143-.089.187-.187.37-.273.56-.049.108-.11.216-.118.36.081.003.154.007.228.008h.228a2.563 2.563 0 01-.079.264c-.01.052-.022.103-.033.155l.02.004c.018-.046.037-.092.067-.153.066-.142.13-.285.2-.426.02-.04.034-.1.116-.092 0 .043.004.084 0 .124-.005.045-.017.09-.028.143.141.043.086.174.115.269.102-.022.104-.195.248-.144v.205l.017.002.439-1.059c-.13 0-.246-.02-.358.033-.024.011-.058-.001-.108-.004.075-.15.139-.278.211-.417a.128.128 0 01.025-.036c0-.015-.001-.03.008-.038l.006-.02c-.005.006-.01.011-.028.017-.004.012-.009.024-.026.045a.085.085 0 01-.032.033c-.123.157-.09.164-.258.106-.079-.027-.078-.028-.047-.144.028-.046.056-.093.098-.15 0-.016-.001-.032.007-.042L4.2 4.48zm2.073-.67c-.003.006-.007.011-.027.016-.094.125-.194.246-.28.377-.155.238-.301.481-.451.723-.14.224-.345.368-.575.481-.017.008-.04.006-.079.011.012-.059.016-.109.033-.153a6.076 6.076 0 01.229-.518l-.007-.02a.138.138 0 01-.035.025c-.028.05-.055.1-.093.164-.26.424-.443.817-.442.95.024.004.048.011.073.013.177.013.188.007.26-.165.03-.07.077-.12.147-.15l.175-.07c.044-.018.085-.057.146-.032.003.05-.01.11.014.145.042.062.044.125.047.193.002.049.017.098.026.147.029-.034.039-.065.05-.097.142-.39.277-.782.428-1.17.1-.256.22-.504.33-.756.013-.03.013-.067.03-.092V3.81zm3.987-.34c0 .045.01.084.021.123.042.16.094.318.124.48.024.133.023.27.028.406 0 .033-.019.067-.032.11-.094-.058-.047-.158-.106-.215h-.125c-.015.072-.01.152-.046.2-.066.085-.155.154-.236.227-.043.038-.078.018-.103-.025l-.046-.087c-.065.035-.117.069-.172.093-.116.051-.235.095-.35.147-.085.038-.09.053-.07.147.014.075.034.148.047.223.013.072.05.109.123.124.233.05.462.115.657.265.058-.102.058-.102.168-.151.03-.014.06-.03.092-.042.08-.03.115-.017.15.06.023.048.041.098.066.158.06-.14-.042-.267.017-.416.157.18.24.39.375.567a.235.235 0 00.022-.098c.002-.124 0-.247.002-.371 0-.034.013-.067.02-.1l.032-.003c.11.155.13.354.226.52a3.036 3.036 0 00-.01-.392c-.004-.045 0-.074.05-.088.08.036.116.14.215.158-.03-.275-.423-1.137-.798-1.635-.114-.127-.2-.28-.34-.386zm-2.667.696c-.019.034-.03.05-.037.067-.061.185-.125.37-.18.556-.031.105-.087.169-.195.19-.09.019-.178.052-.268.073-.038.009-.089.015-.118-.003-.024-.016-.025-.069-.036-.106-.064.076-.082.087-.17.047-.133-.062-.262-.135-.393-.201-.048-.025-.093-.063-.17-.03-.043.12-.091.25-.137.382-.099.28-.087.242.095.453.046.048.102.03.154.023.054-.009.106-.03.16-.036.13-.013.26-.08.367-.015.204-.064.387-.122.571-.178.05-.015.089.005.114.054.022.042.034.093.082.121.038-.056-.013-.128.063-.178l.14.241-.042-1.46zm.278.358c-.096-.01-.107.01-.11.108-.002.038-.003.078.002.115.03.2.099.386.174.57.002.006.012.01.022.015l.078-.05c.052.036.081.088.153.088.205-.002.41.014.616.012.099-.001.158.042.205.12.018.03.024.077.088.066l-.08-.394c-.05-.195-.085-.395-.172-.589-.057.057-.114.068-.18.046a.72.72 0 00-.135-.028c-.22-.028-.44-.059-.66-.08zm10.254-1.727c.089.163.155.316.139.491-.016.168.026.342-.044.516-.047-.033-.088-.082-.112-.075-.117.035-.164-.057-.227-.115a4.772 4.772 0 01-.286-.29l-.104-.113a4.856 4.856 0 01-.023.019c.035.046.07.093.11.156.04.064.084.127.122.193.034.058.065.118.031.205-.082-.01-.164-.019-.246-.032-.06-.01-.101 0-.124.07-.031.098-.037.096-.15.09.02.042.036.08.057.116.041.074.03.138-.03.196-.06.06-.118.122-.178.181a.175.175 0 01-.185.046c-.222-.061-.447-.113-.67-.174-.032-.009-.063-.04-.086-.068-.03-.04-.052-.087-.08-.13-.044-.07-.09-.138-.136-.207a.18.18 0 00-.014.105c.012.127.03.253.035.38.005.1-.024.12-.121.104-.104-.017-.206-.04-.31-.058-.064-.012-.131-.028-.202.03l.081.208c.09 0 .166-.01.237.002a.819.819 0 01.458.251c.078.083.154.168.241.26l.018-.005c-.004-.006-.008-.013-.01-.04.014-.056-.062-.118.018-.178.031.03.064.057.088.09.058.078.111.159.169.257l.089.141.024-.013a2093.819 2093.819 0 01-.427-.934c.055.007.083.007.108.016.193.07.385.142.577.216.074.028.147.06.219.094.062.028.112.018.157-.033.05-.056.102-.112.154-.167.05-.051.095-.046.132.014.016.025.026.053.04.08.071.138.143.277.217.433l.159.308.025-.011c-.044-.106-.07-.218-.138-.334-.057-.182-.168-.346-.206-.545.136.034.362.326.567.732l.057.074.018-.011a1.563 1.563 0 01-.052-.127c-.046-.145-.097-.29-.136-.436-.022-.083-.036-.173.022-.26l.109.058-.026-.207.027-.016c.022.02.05.036.065.06.073.108.143.22.215.33.01.016.029.029.043.043-.036-.217-.2-.38-.229-.626l.155.112c.014-.166.012-.319.042-.465.032-.158-.023-.297-.063-.445.024.004.036.006.055.025.092.124.183.249.277.371.02.027.05.047.069.087l.04.063.019-.015a.293.293 0 01-.053-.082 27.922 27.922 0 01-.332-.49c-.221-.311-.363-.467-.485-.521zm-6.57.327c-.003.161.092.275.069.415l-.368.087c.09.139.032.237-.052.331-.05.057-.092.122-.143.178-.037.04-.046.078-.018.126l.16.275c.029.048.072.066.128.064.076-.003.152 0 .228-.001.116-.003.216.022.275.137.006.014.02.024.044.052.004-.059-.003-.098.01-.13.016-.04.04-.099.072-.108.084-.023.173-.024.26-.03.013-.001.027.018.04.029l.071.065c.019-.11-.082-.198-.024-.31l.126.04c-.026-.123-.07-.245-.071-.366 0-.123.051-.243.115-.36.107.062.16.156.234.253.183.265.36.533.494.834.165-.078.27.068.407.088-.003-.106-.133-.441-.197-.492a.142.142 0 00-.102-.028c-.06.011-.119.039-.191.063-.025-.039-.056-.078-.077-.122a3.936 3.936 0 00-.473-.783c-.076-.094-.16-.182-.228-.26l-.391.285c-.049.035-.094.03-.132-.017l-.169-.207c-.025-.03-.053-.059-.097-.108z`}),t[0]=n,t[1]=r,t[2]=i,t[3]=a):(n=t[0],r=t[1],i=t[2],a=t[3]);let o;return t[4]===e?o=t[5]:(o=(0,F.jsxs)(`svg`,{role:`img`,"aria-label":`Hermes icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`currentColor`,fillRule:`evenodd`,viewBox:`0 0 24 24`,...e,children:[n,r,i,a]}),t[4]=e,t[5]=o),o}function _e(e){let t=(0,I.c)(7),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(`title`,{children:`OpenClaw icon`}),t[0]=n):n=t[0];let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,F.jsxs)(`mask`,{id:`openclaw-eyes`,maskUnits:`userSpaceOnUse`,x:0,y:0,width:120,height:120,children:[(0,F.jsx)(`rect`,{width:120,height:120,fill:`white`}),(0,F.jsx)(`circle`,{cx:45,cy:35,r:6,fill:`black`}),(0,F.jsx)(`circle`,{cx:75,cy:35,r:6,fill:`black`})]}),t[1]=r):r=t[1];let i,a,o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,F.jsxs)(`g`,{fill:`currentColor`,mask:`url(#openclaw-eyes)`,children:[(0,F.jsx)(`path`,{d:`M60 10 C30 10 15 35 15 55 C15 75 30 95 45 100 L45 110 L55 110 L55 100 C55 100 60 102 65 100 L65 110 L75 110 L75 100 C90 95 105 75 105 55 C105 35 90 10 60 10Z`}),(0,F.jsx)(`path`,{d:`M20 45 C5 40 0 50 5 60 C10 70 20 65 25 55 C28 48 25 45 20 45Z`}),(0,F.jsx)(`path`,{d:`M100 45 C115 40 120 50 115 60 C110 70 100 65 95 55 C92 48 95 45 100 45Z`})]}),a=(0,F.jsx)(`path`,{d:`M45 15 Q35 5 30 8`,fill:`none`,stroke:`currentColor`,strokeWidth:3,strokeLinecap:`round`}),o=(0,F.jsx)(`path`,{d:`M75 15 Q85 5 90 8`,fill:`none`,stroke:`currentColor`,strokeWidth:3,strokeLinecap:`round`}),t[2]=i,t[3]=a,t[4]=o):(i=t[2],a=t[3],o=t[4]);let s;return t[5]===e?s=t[6]:(s=(0,F.jsxs)(`svg`,{role:`img`,"aria-label":`OpenClaw icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 120 120`,...e,children:[n,r,i,a,o]}),t[5]=e,t[6]=s),s}function ve(e){let t=(0,I.c)(5),n,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(`title`,{children:`OpenCode icon`}),r=(0,F.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M384 416H128V96H384V416ZM320 160H192V352H320V160Z`}),i=(0,F.jsx)(`path`,{fill:`currentColor`,fillOpacity:.55,d:`M320 224V352H192V224H320Z`}),t[0]=n,t[1]=r,t[2]=i):(n=t[0],r=t[1],i=t[2]);let a;return t[3]===e?a=t[4]:(a=(0,F.jsxs)(`svg`,{role:`img`,"aria-label":`OpenCode icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 512 512`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}function ye(e){let t=(0,I.c)(5),n,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(`title`,{children:`Pi icon`}),r=(0,F.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M165.29 165.29H517.36V400H400V517.36H282.65V634.72H165.29ZM282.65 282.65V400H400V282.65Z`}),i=(0,F.jsx)(`path`,{fill:`currentColor`,d:`M517.36 400H634.72V634.72H517.36Z`}),t[0]=n,t[1]=r,t[2]=i):(n=t[0],r=t[1],i=t[2]);let a;return t[3]===e?a=t[4]:(a=(0,F.jsxs)(`svg`,{role:`img`,"aria-label":`Pi icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 800 800`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}var be={"claude-cowork":`claude`,"claude-code":`claude`,codex:`openai`,cursor:`cursor`,copilot:`github`,opencode:`opencode`,pi:`pi`,antigravity:`antigravity`,openclaw:`openclaw`,hermes:`hermes`};function xe(e){let t=(0,I.c)(47),n,r,a,s;t[0]===e?(n=t[1],r=t[2],a=t[3],s=t[4]):({id:r,style:s,className:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=s);let{resolvedTheme:c}=i(),u=be[r],m=u?(c===`dark`?l[u]:void 0)??ee[u]:void 0,h;t[5]!==m||t[6]!==s?(h=m?{...s,"--ok-brand-color":m}:s,t[5]=m,t[6]=s,t[7]=h):h=t[7];let g=h,_=m&&`[&_*]:![color:var(--ok-brand-color)]`,v;t[8]!==n||t[9]!==_?(v=o(_,n),t[8]=n,t[9]=_,t[10]=v):v=t[10];let y=v;if(r===`claude-cowork`||r===`claude-code`){let e;return t[11]!==y||t[12]!==g||t[13]!==a?(e=(0,F.jsx)(d,{style:g,className:y,...a}),t[11]=y,t[12]=g,t[13]=a,t[14]=e):e=t[14],e}if(r===`codex`){let e;return t[15]!==y||t[16]!==g||t[17]!==a?(e=(0,F.jsx)(f,{style:g,className:y,...a}),t[15]=y,t[16]=g,t[17]=a,t[18]=e):e=t[18],e}if(r===`cursor`){let e;return t[19]!==y||t[20]!==g||t[21]!==a?(e=(0,F.jsx)(p,{style:g,className:y,...a}),t[19]=y,t[20]=g,t[21]=a,t[22]=e):e=t[22],e}if(r===`copilot`){let e;return t[23]!==y||t[24]!==g||t[25]!==a?(e=(0,F.jsx)(te,{style:g,className:y,...a}),t[23]=y,t[24]=g,t[25]=a,t[26]=e):e=t[26],e}if(r===`opencode`){let e;return t[27]!==y||t[28]!==g||t[29]!==a?(e=(0,F.jsx)(ve,{style:g,className:y,...a}),t[27]=y,t[28]=g,t[29]=a,t[30]=e):e=t[30],e}if(r===`pi`){let e;return t[31]!==y||t[32]!==g||t[33]!==a?(e=(0,F.jsx)(ye,{style:g,className:y,...a}),t[31]=y,t[32]=g,t[33]=a,t[34]=e):e=t[34],e}if(r===`antigravity`){let e;return t[35]!==y||t[36]!==g||t[37]!==a?(e=(0,F.jsx)(he,{style:g,className:y,...a}),t[35]=y,t[36]=g,t[37]=a,t[38]=e):e=t[38],e}if(r===`openclaw`){let e;return t[39]!==y||t[40]!==g||t[41]!==a?(e=(0,F.jsx)(_e,{style:g,className:y,...a}),t[39]=y,t[40]=g,t[41]=a,t[42]=e):e=t[42],e}if(r===`hermes`){let e;return t[43]!==y||t[44]!==g||t[45]!==a?(e=(0,F.jsx)(ge,{style:g,className:y,...a}),t[43]=y,t[44]=g,t[45]=a,t[46]=e):e=t[46],e}return null}var Se=c;function Ce(e){return s[e].handoffTarget}export{ae as S,re as _,$ as a,N as b,W as c,U as d,de as f,ie as g,se as h,me as i,H as l,z as m,Ce as n,fe as o,R as p,xe as r,pe as s,Se as t,ue as u,P as v,oe as x,A as y};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./utils-CPqDy6Hr.js";import{a as r,m as i,s as a}from"./terminal-cli-display-ceeLXdxI.js";import{Gt as o}from"./dist-DoYGOGZp.js";import{t as s}from"./createLucideIcon-Bhw2PmPp.js";import{_ as c,f as l,l as u}from"./sortable.esm-Dd5A8_XI.js";var d=e(t(),1),f=new Map,p=null,m=new Set;function h(){return f.get(`agents`)??f.get(`terminal`)??null}function g(e,t){return e===null||t===null?e===t:e.id!==t.id||e.kind!==t.kind||e.label!==t.label?!1:e.kind===`thread`&&t.kind===`thread`?e.agentId===t.agentId&&e.iconUrl===t.iconUrl:e.kind===`terminal`&&t.kind===`terminal`?e.cli===t.cli:!1}function _(e,t){if(f.has(e)&&g(f.get(e)??null,t))return;f.set(e,t);let n=h();if(!g(p,n)){p=n;for(let e of m)e()}}function v(){return p}function y(e){return m.add(e),()=>{m.delete(e)}}function b(){return(0,d.useSyncExternalStore)(y,v,ee)}function ee(){return null}var te=s(`panel-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),ne=s(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),x={},S=new Set;function C(){return x}function w(e){x={...x,...e};for(let e of S)e()}function T(e){return S.add(e),()=>{S.delete(e)}}function E(){return(0,d.useSyncExternalStore)(T,C,C)}var D=`ok-ask-ai-agent-v2`,O=`ok-ask-ai-default-agent-v1`,re=`ok-preferred-agent-v1`,ie=`terminal-cli`;function k(e){return`${ie}:${e}`}var A=`in-app-thread`;function j(e){return`${A}:${e.source}:${e.id}`}function M(e){if(e===null)return null;if(e===`in-app-thread`)return{kind:`default`};let t=`${A}:`;if(!e.startsWith(t))return null;let n=e.slice(t.length),r=n.indexOf(`:`);if(r<=0)return null;let i=n.slice(0,r),a=n.slice(r+1);return i!==`registry`&&i!==`custom`||a===``?null:{kind:`concrete`,source:i,id:a}}function N(e){return e===null?null:e===`terminal-cli`?`claude`:o.find(t=>e===k(t))??null}function P(e){if(e)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function F(e){let t=P(e);if(!t)return null;try{let e=t.getItem(D);return e===null?t.getItem(O)??t.getItem(re):e}catch{return null}}function I(e,t){let n=P(t);if(n)try{n.setItem(D,e)}catch(e){console.warn(`[ask-ai] Failed to persist default agent:`,e)}for(let e of L)e()}var L=new Set;function R(){return F()}function z(){for(let e of L)e()}typeof window<`u`&&typeof window.addEventListener==`function`&&window.addEventListener(`storage`,e=>{(e.key===`ok-ask-ai-agent-v2`||e.key===null)&&z()});function B(e){return L.add(e),()=>L.delete(e)}function V(){return(0,d.useSyncExternalStore)(B,R,R)}var H=`open-knowledge:active-terminal-input`;function U(e,t,n=typeof window>`u`?new EventTarget:window){n.dispatchEvent(new CustomEvent(H,{detail:{text:e,newTab:t?.newTab===!0,submit:t?.submit===!0,...t?.target===`agents`?{target:`agents`}:{}}}))}function W(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent?t.detail:void 0;n!==void 0&&typeof n.text==`string`&&e({text:n.text,newTab:n.newTab===!0,submit:n.submit===!0,...n.target===`agents`?{target:`agents`}:{}})};return t.addEventListener(H,n),()=>t.removeEventListener(H,n)}function G(e,t){return o.filter(n=>a(e,n,t))}function K(e){return i.filter(t=>r(e,t.id)).map(e=>e.id)}function q(e){let{sticky:t,effectiveThreadAgent:n,enabledClis:r,enabledDesktopTargets:i,installedClis:a,terminalAvailable:o,threadsAvailable:s,desktopSelectable:c,preferBareTerminal:l,bareTerminalFallback:u}=e;if(l&&o)return{kind:`terminal`};if(s&&M(t)!==null&&n!==null)return{kind:`thread`,agent:n};if(o){let e=N(t);if(e!==null&&r.includes(e))return{kind:`cli`,cli:e}}return c&&t!==null&&i.includes(t)?{kind:`desktop`,target:t}:s&&n!==null?{kind:`thread`,agent:n}:o&&r.length>0?{kind:`cli`,cli:r.find(e=>a[e]===!0)??r[0]}:c&&i.length>0?{kind:`desktop`,target:i[0]}:u&&o?{kind:`terminal`}:{kind:`none`}}var J=`flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-sm text-muted-foreground outline-none hover:bg-foreground/10 hover:text-foreground hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring/50`,ae=`border-border bg-background text-foreground hover:bg-background focus-visible:bg-background`,oe={start:[u.Space],cancel:[u.Esc],end:[u.Space,u.Enter]};function se(e){return n(J,e?`mr-1 opacity-100`:`pointer-events-none absolute right-1 opacity-0 group-hover:pointer-events-auto group-hover:opacity-100`)}function ce(e){return e?void 0:-1}function le({className:e,isDragging:t}){return n(e,t&&ae)}function ue(e){return e.code===u.Enter&&e.target===e.currentTarget}function de(e){return e.key===`ContextMenu`||e.shiftKey&&e.key===`F10`}function fe(e,t,n){for(let r of e.querySelectorAll(`[data-editor-tab-id]`))if(r.dataset.editorPaneId===t&&r.dataset.editorTabId===n)return r;return null}function pe({event:e,hasKeyboardActivation:t,isDragging:n}){return e.defaultPrevented?`ignore`:!n&&t&&ue(e)?`activate-tab`:`delegate-sortable`}function me({activeWidth:e,disableMovement:t=!1,isDragging:n,outerStyle:r,transform:i,transition:a}){let o=n&&e?e:void 0;return{...r,transform:t?void 0:c.Transform.toString(i?{...i,scaleX:1,scaleY:1}:null),transition:t?void 0:a,flexBasis:o??r?.flexBasis,maxWidth:o??r?.maxWidth,minWidth:o??r?.minWidth,opacity:r?.opacity,width:o??r?.width,zIndex:n?20:r?.zIndex}}function he(e,t){let n=e?.querySelectorAll(t)??[],r=1/0,i=-1/0;for(let e of n){let t=e.getBoundingClientRect();r=Math.min(r,t.left),i=Math.max(i,t.right)}return Number.isFinite(r)&&Number.isFinite(i)?{left:r,right:i}:null}function ge(e){return({activeNodeRect:t,transform:n})=>{let r={...n,y:0};if(!e||!t)return r;let i=e.left-t.left,a=e.right-t.right;return r.x=Math.min(Math.max(r.x,i),a),r}}function Y(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.kind===`editor-tab`&&typeof t.paneId==`string`&&typeof t.tabId==`string`&&typeof t.splittable==`boolean`&&typeof t.label==`string`}function _e(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.kind===`pane-edge`?typeof t.paneId==`string`&&(t.side===`left`||t.side===`right`):t.kind===`pane-strip`&&typeof t.paneId==`string`&&typeof t.index==`number`&&Number.isInteger(t.index)}function X(e,t){return e.x>=t.left&&e.x<=t.right&&e.y>=t.top&&e.y<=t.bottom}function Z(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}var ve=e=>{let t=e.droppableContainers.filter(e=>e.data.current?.kind===`pane-edge`),n=e.droppableContainers.filter(e=>e.data.current?.kind!==`pane-edge`),r=e.active.data.current,i=e.pointerCoordinates;if(i&&Y(r)&&r.splittable){let n=t.find(t=>{let n=e.droppableRects.get(t.id);return n?X(i,n):!1});if(n)return[{id:n.id,data:{droppableContainer:n,value:0}}]}if(i){let t=n.filter(t=>{let n=e.droppableRects.get(t.id);return n?X(i,n):!1});if(t.length>0){let n=t.filter(e=>Y(e.data.current));return l({...e,droppableContainers:n.length>0?n:t})}let r=n.filter(t=>{let n=t.data.current,r=e.droppableRects.get(t.id);return n?.kind!==`pane-strip`||!r?!1:Z(e.collisionRect,r)});if(r.length===0)return[];let a=new Set(r.map(e=>e.data.current?.paneId)),o=n.filter(t=>{let n=t.data.current,r=e.droppableRects.get(t.id);return!Y(n)||!a.has(n.paneId)||!r?!1:Z(e.collisionRect,r)});return l({...e,droppableContainers:o.length>0?o:r})}return l({...e,droppableContainers:n})},ye=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(r){let e=1/0,i=-1/0,a=null,o=null;for(let r of t){let t=n.get(r.id);t&&(t.left<e&&(e=t.left,a=r),t.right>i&&(i=t.right,o=r))}if(!Number.isFinite(e)||!Number.isFinite(i))return[];let s=r.x<e?a:r.x>i?o:null;if(s)return[{id:s.id,data:{droppableContainer:s,value:0}}]}return l(e)};function be(e){Math.abs(e.deltaX)>=Math.abs(e.deltaY)||e.currentTarget.scrollWidth<=e.currentTarget.clientWidth||(e.preventDefault(),e.currentTarget.scrollLeft+=e.deltaY)}var Q=`open-knowledge:new-preferred-session`;function xe(e=typeof window>`u`?new EventTarget:window){e.dispatchEvent(new CustomEvent(Q))}function Se(e,t=typeof window>`u`?new EventTarget:window){let n=()=>e();return t.addEventListener(Q,n),()=>t.removeEventListener(Q,n)}var $=`open-knowledge:terminal-launch`;function Ce(e,t,n,r=typeof window>`u`?new EventTarget:window){r.dispatchEvent(new CustomEvent($,{detail:{prompt:e,cli:t,stage:n?.stage===!0}}))}function we(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent?t.detail:void 0;n&&typeof n.prompt==`string`&&e(n.prompt,n.cli,{stage:n.stage===!0})};return t.addEventListener($,n),()=>t.removeEventListener($,n)}export{j as A,U as C,N as D,F as E,te as F,_ as I,b as L,w as M,E as N,I as O,ne as P,q as S,A as T,he as _,be as a,K as b,ve as c,pe as d,me as f,_e as g,Y as h,Se as i,V as j,k,fe as l,ce as m,we as n,oe as o,se as p,xe as r,ge as s,Ce as t,le as u,de as v,W as w,G as x,ye as y};
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./utils-CPqDy6Hr.js";import{a as r,m as i,s as a}from"./terminal-cli-display-CsGUuG_t.js";import{Kt as o}from"./dist-BDUZWXxp.js";import{t as s}from"./createLucideIcon-Bhw2PmPp.js";import{_ as c,f as l,l as u}from"./sortable.esm-Dd5A8_XI.js";var d=e(t(),1),f=new Map,p=null,m=new Set;function h(){return f.get(`agents`)??f.get(`terminal`)??null}function g(e,t){return e===null||t===null?e===t:e.id!==t.id||e.kind!==t.kind||e.label!==t.label?!1:e.kind===`thread`&&t.kind===`thread`?e.agentId===t.agentId&&e.iconUrl===t.iconUrl:e.kind===`terminal`&&t.kind===`terminal`?e.cli===t.cli:!1}function _(e,t){if(f.has(e)&&g(f.get(e)??null,t))return;f.set(e,t);let n=h();if(!g(p,n)){p=n;for(let e of m)e()}}function v(){return p}function y(e){return m.add(e),()=>{m.delete(e)}}function b(){return(0,d.useSyncExternalStore)(y,v,ee)}function ee(){return null}var te=s(`panel-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),ne=s(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),x={},S=new Set;function C(){return x}function w(e){x={...x,...e};for(let e of S)e()}function T(e){return S.add(e),()=>{S.delete(e)}}function E(){return(0,d.useSyncExternalStore)(T,C,C)}var D=`ok-ask-ai-agent-v2`,O=`ok-ask-ai-default-agent-v1`,re=`ok-preferred-agent-v1`,ie=`terminal-cli`;function k(e){return`${ie}:${e}`}var A=`in-app-thread`;function j(e){return`${A}:${e.source}:${e.id}`}function M(e){if(e===null)return null;if(e===`in-app-thread`)return{kind:`default`};let t=`${A}:`;if(!e.startsWith(t))return null;let n=e.slice(t.length),r=n.indexOf(`:`);if(r<=0)return null;let i=n.slice(0,r),a=n.slice(r+1);return i!==`registry`&&i!==`custom`||a===``?null:{kind:`concrete`,source:i,id:a}}function N(e){return e===null?null:e===`terminal-cli`?`claude`:o.find(t=>e===k(t))??null}function P(e){if(e)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function F(e){let t=P(e);if(!t)return null;try{let e=t.getItem(D);return e===null?t.getItem(O)??t.getItem(re):e}catch{return null}}function I(e,t){let n=P(t);if(n)try{n.setItem(D,e)}catch(e){console.warn(`[ask-ai] Failed to persist default agent:`,e)}for(let e of L)e()}var L=new Set;function R(){return F()}function z(){for(let e of L)e()}typeof window<`u`&&typeof window.addEventListener==`function`&&window.addEventListener(`storage`,e=>{(e.key===`ok-ask-ai-agent-v2`||e.key===null)&&z()});function B(e){return L.add(e),()=>L.delete(e)}function V(){return(0,d.useSyncExternalStore)(B,R,R)}var H=`open-knowledge:active-terminal-input`;function U(e,t,n=typeof window>`u`?new EventTarget:window){n.dispatchEvent(new CustomEvent(H,{detail:{text:e,newTab:t?.newTab===!0,submit:t?.submit===!0,...t?.target===`agents`?{target:`agents`}:{}}}))}function W(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent?t.detail:void 0;n!==void 0&&typeof n.text==`string`&&e({text:n.text,newTab:n.newTab===!0,submit:n.submit===!0,...n.target===`agents`?{target:`agents`}:{}})};return t.addEventListener(H,n),()=>t.removeEventListener(H,n)}function G(e,t){return o.filter(n=>a(e,n,t))}function K(e){return i.filter(t=>r(e,t.id)).map(e=>e.id)}function q(e){let{sticky:t,effectiveThreadAgent:n,enabledClis:r,enabledDesktopTargets:i,installedClis:a,terminalAvailable:o,threadsAvailable:s,desktopSelectable:c,preferBareTerminal:l,bareTerminalFallback:u}=e;if(l&&o)return{kind:`terminal`};if(s&&M(t)!==null&&n!==null)return{kind:`thread`,agent:n};if(o){let e=N(t);if(e!==null&&r.includes(e))return{kind:`cli`,cli:e}}return c&&t!==null&&i.includes(t)?{kind:`desktop`,target:t}:s&&n!==null?{kind:`thread`,agent:n}:o&&r.length>0?{kind:`cli`,cli:r.find(e=>a[e]===!0)??r[0]}:c&&i.length>0?{kind:`desktop`,target:i[0]}:u&&o?{kind:`terminal`}:{kind:`none`}}var J=`flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-sm text-muted-foreground outline-none hover:bg-foreground/10 hover:text-foreground hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring/50`,ae=`border-border bg-background text-foreground hover:bg-background focus-visible:bg-background`,oe={start:[u.Space],cancel:[u.Esc],end:[u.Space,u.Enter]};function se(e){return n(J,e?`mr-1 opacity-100`:`pointer-events-none absolute right-1 opacity-0 group-hover:pointer-events-auto group-hover:opacity-100`)}function ce(e){return e?void 0:-1}function le({className:e,isDragging:t}){return n(e,t&&ae)}function ue(e){return e.code===u.Enter&&e.target===e.currentTarget}function de(e){return e.key===`ContextMenu`||e.shiftKey&&e.key===`F10`}function fe(e,t,n){for(let r of e.querySelectorAll(`[data-editor-tab-id]`))if(r.dataset.editorPaneId===t&&r.dataset.editorTabId===n)return r;return null}function pe({event:e,hasKeyboardActivation:t,isDragging:n}){return e.defaultPrevented?`ignore`:!n&&t&&ue(e)?`activate-tab`:`delegate-sortable`}function me({activeWidth:e,disableMovement:t=!1,isDragging:n,outerStyle:r,transform:i,transition:a}){let o=n&&e?e:void 0;return{...r,transform:t?void 0:c.Transform.toString(i?{...i,scaleX:1,scaleY:1}:null),transition:t?void 0:a,flexBasis:o??r?.flexBasis,maxWidth:o??r?.maxWidth,minWidth:o??r?.minWidth,opacity:r?.opacity,width:o??r?.width,zIndex:n?20:r?.zIndex}}function he(e,t){let n=e?.querySelectorAll(t)??[],r=1/0,i=-1/0;for(let e of n){let t=e.getBoundingClientRect();r=Math.min(r,t.left),i=Math.max(i,t.right)}return Number.isFinite(r)&&Number.isFinite(i)?{left:r,right:i}:null}function ge(e){return({activeNodeRect:t,transform:n})=>{let r={...n,y:0};if(!e||!t)return r;let i=e.left-t.left,a=e.right-t.right;return r.x=Math.min(Math.max(r.x,i),a),r}}function Y(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.kind===`editor-tab`&&typeof t.paneId==`string`&&typeof t.tabId==`string`&&typeof t.splittable==`boolean`&&typeof t.label==`string`}function _e(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.kind===`pane-edge`?typeof t.paneId==`string`&&(t.side===`left`||t.side===`right`):t.kind===`pane-strip`&&typeof t.paneId==`string`&&typeof t.index==`number`&&Number.isInteger(t.index)}function X(e,t){return e.x>=t.left&&e.x<=t.right&&e.y>=t.top&&e.y<=t.bottom}function Z(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}var ve=e=>{let t=e.droppableContainers.filter(e=>e.data.current?.kind===`pane-edge`),n=e.droppableContainers.filter(e=>e.data.current?.kind!==`pane-edge`),r=e.active.data.current,i=e.pointerCoordinates;if(i&&Y(r)&&r.splittable){let n=t.find(t=>{let n=e.droppableRects.get(t.id);return n?X(i,n):!1});if(n)return[{id:n.id,data:{droppableContainer:n,value:0}}]}if(i){let t=n.filter(t=>{let n=e.droppableRects.get(t.id);return n?X(i,n):!1});if(t.length>0){let n=t.filter(e=>Y(e.data.current));return l({...e,droppableContainers:n.length>0?n:t})}let r=n.filter(t=>{let n=t.data.current,r=e.droppableRects.get(t.id);return n?.kind!==`pane-strip`||!r?!1:Z(e.collisionRect,r)});if(r.length===0)return[];let a=new Set(r.map(e=>e.data.current?.paneId)),o=n.filter(t=>{let n=t.data.current,r=e.droppableRects.get(t.id);return!Y(n)||!a.has(n.paneId)||!r?!1:Z(e.collisionRect,r)});return l({...e,droppableContainers:o.length>0?o:r})}return l({...e,droppableContainers:n})},ye=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(r){let e=1/0,i=-1/0,a=null,o=null;for(let r of t){let t=n.get(r.id);t&&(t.left<e&&(e=t.left,a=r),t.right>i&&(i=t.right,o=r))}if(!Number.isFinite(e)||!Number.isFinite(i))return[];let s=r.x<e?a:r.x>i?o:null;if(s)return[{id:s.id,data:{droppableContainer:s,value:0}}]}return l(e)};function be(e){Math.abs(e.deltaX)>=Math.abs(e.deltaY)||e.currentTarget.scrollWidth<=e.currentTarget.clientWidth||(e.preventDefault(),e.currentTarget.scrollLeft+=e.deltaY)}var Q=`open-knowledge:new-preferred-session`;function xe(e=typeof window>`u`?new EventTarget:window){e.dispatchEvent(new CustomEvent(Q))}function Se(e,t=typeof window>`u`?new EventTarget:window){let n=()=>e();return t.addEventListener(Q,n),()=>t.removeEventListener(Q,n)}var $=`open-knowledge:terminal-launch`;function Ce(e,t,n,r=typeof window>`u`?new EventTarget:window){r.dispatchEvent(new CustomEvent($,{detail:{prompt:e,cli:t,stage:n?.stage===!0}}))}function we(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent?t.detail:void 0;n&&typeof n.prompt==`string`&&e(n.prompt,n.cli,{stage:n.stage===!0})};return t.addEventListener($,n),()=>t.removeEventListener($,n)}export{j as A,U as C,N as D,F as E,te as F,_ as I,b as L,w as M,E as N,I as O,ne as P,q as S,A as T,he as _,be as a,K as b,ve as c,pe as d,me as f,_e as g,Y as h,Se as i,V as j,k,fe as l,ce as m,we as n,oe as o,se as p,xe as r,ge as s,Ce as t,le as u,de as v,W as w,G as x,ye as y};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./useQuery-ZeEDLtxh.js";import{t as r}from"./compiler-runtime-BfE3aGVn.js";import{g as i}from"./terminal-cli-display-ceeLXdxI.js";import{t as a}from"./trace-api-18gcBe0u.js";var o=r(),s=e(t(),1);function c(e){let t=[`claude-acp`,`codex-acp`,`cursor`,`opencode`],n=e=>{let n=t.indexOf(e);return n===-1?t.length:n};return e.filter(e=>e.supported&&e.harness?.availability===`present`).sort((e,t)=>n(e.id)-n(t.id))}async function l(e){let t=await fetch(`/api/acp/catalog`,{signal:e??AbortSignal.timeout(2e4)});if(!t.ok)throw Error(`agent catalog request failed: HTTP ${t.status}`);let n=await t.json();return{agents:Array.isArray(n.agents)?n.agents:[],stale:n.stale===!0,maxThreads:typeof n.maxThreads==`number`?n.maxThreads:8}}function u(){let e=(0,o.c)(4),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`acp-catalog`],queryFn:f,staleTime:3e5},e[0]=t):t=e[0];let{data:r}=n(t),a=r?.agents,c,l;e[1]===a?(c=e[2],l=e[3]):(c=()=>{a&&i(a.map(d))},l=[a],e[1]=a,e[2]=c,e[3]=l),(0,s.useEffect)(c,l)}function d(e){return{source:e.source,id:e.id,name:e.name,supported:e.supported,featured:e.featured,...e.iconUrl===void 0?{}:{iconUrl:e.iconUrl}}}function f(e){let{signal:t}=e;return l(t)}var p=`open-knowledge-app`;function m(e){try{a.getTracer(p).startSpan(e).end()}catch(e){console.warn(`[terminal-telemetry] span emit failed:`,e instanceof Error?e:String(e))}}function h(){m(`ok.desktop.terminalOpened`)}function g(){m(`ok.desktop.shellConsentGranted`)}export{u as a,l as i,h as n,c as r,g as t};
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./useQuery-ZeEDLtxh.js";import{t as r}from"./compiler-runtime-BfE3aGVn.js";import{g as i}from"./terminal-cli-display-CsGUuG_t.js";import{t as a}from"./trace-api-18gcBe0u.js";var o=r(),s=e(t(),1);function c(e){let t=[`claude-acp`,`codex-acp`,`cursor`,`opencode`],n=e=>{let n=t.indexOf(e);return n===-1?t.length:n};return e.filter(e=>e.supported&&e.harness?.availability===`present`).sort((e,t)=>n(e.id)-n(t.id))}async function l(e){let t=await fetch(`/api/acp/catalog`,{signal:e??AbortSignal.timeout(2e4)});if(!t.ok)throw Error(`agent catalog request failed: HTTP ${t.status}`);let n=await t.json();return{agents:Array.isArray(n.agents)?n.agents:[],stale:n.stale===!0,maxThreads:typeof n.maxThreads==`number`?n.maxThreads:8}}function u(){let e=(0,o.c)(4),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`acp-catalog`],queryFn:f,staleTime:3e5},e[0]=t):t=e[0];let{data:r}=n(t),a=r?.agents,c,l;e[1]===a?(c=e[2],l=e[3]):(c=()=>{a&&i(a.map(d))},l=[a],e[1]=a,e[2]=c,e[3]=l),(0,s.useEffect)(c,l)}function d(e){return{source:e.source,id:e.id,name:e.name,supported:e.supported,featured:e.featured,...e.iconUrl===void 0?{}:{iconUrl:e.iconUrl}}}function f(e){let{signal:t}=e;return l(t)}var p=`open-knowledge-app`;function m(e){try{a.getTracer(p).startSpan(e).end()}catch(e){console.warn(`[terminal-telemetry] span emit failed:`,e instanceof Error?e:String(e))}}function h(){m(`ok.desktop.terminalOpened`)}function g(){m(`ok.desktop.shellConsentGranted`)}export{u as a,l as i,h as n,c as r,g as t};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dist-BSAh-TK7.js","./chunk-CYidjpOJ.js","./w3c-keyname-Bw5giFqP.js","./dist-DwFjOxj-.js","./dist-DPG-4B8V.js","./dist-CADCdgrq.js","./dist-BUDkMEzD.js","./dist-lGeJn8Qx.js","./dist-DpjZjxsY.js","./dist-C6lhy_gK.js","./dist-Ds8NLlxa.js","./dist-DU3mip8Z.js","./dist-DbcFk_pj.js"])))=>i.map(i=>d[i]);
2
- import{t as e}from"./preload-helper-Chd9yIcd.js";var t=new Map;function n(e){let n=t.get(e);if(n)return n;let i=r(e);return t.set(e,i),i}async function r(t){switch(t){case`bash`:case`shell`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BSAh-TK7.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{shell:e}=await import(`./shell-DhuGq92J.js`);return{shell:e}},[],import.meta.url)).shell);case`c`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BSAh-TK7.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{c:e}=await import(`./clike-BBEjy26W.js`);return{c:e}},[],import.meta.url)).c);case`cpp`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BSAh-TK7.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{cpp:e}=await import(`./clike-BBEjy26W.js`);return{cpp:e}},[],import.meta.url)).cpp);case`csharp`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BSAh-TK7.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{csharp:e}=await import(`./clike-BBEjy26W.js`);return{csharp:e}},[],import.meta.url)).csharp);case`css`:case`less`:case`scss`:return(await e(async()=>{let{css:e}=await import(`./dist-DwFjOxj-.js`).then(e=>e.r);return{css:e}},__vite__mapDeps([3,1,0,2,4]),import.meta.url)).css().language;case`diff`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BSAh-TK7.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{diff:e}=await import(`./diff-CvpcR3NJ.js`);return{diff:e}},[],import.meta.url)).diff);case`gherkin`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BSAh-TK7.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{gherkin:e}=await import(`./gherkin-D3uEvcwv.js`);return{gherkin:e}},[],import.meta.url)).gherkin);case`go`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BSAh-TK7.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{go:e}=await import(`./go-fa_HI4OB.js`);return{go:e}},[],import.meta.url)).go);case`ini`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BSAh-TK7.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{properties:e}=await import(`./properties-BlzchQr8.js`);return{properties:e}},[],import.meta.url)).properties);case`java`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BSAh-TK7.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{java:e}=await import(`./clike-BBEjy26W.js`);return{java:e}},[],import.meta.url)).java);case`javascript`:return(await e(async()=>{let{javascript:e}=await import(`./dist-CADCdgrq.js`).then(e=>e.t);return{javascript:e}},__vite__mapDeps([5,1,6,0,2,4]),import.meta.url)).javascript().language;case`json`:return(await e(async()=>{let{json:e}=await import(`./dist-lGeJn8Qx.js`).then(e=>e.t);return{json:e}},__vite__mapDeps([7,1,0,2,4]),import.meta.url)).json().language;case`kotlin`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BSAh-TK7.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{kotlin:e}=await import(`./clike-BBEjy26W.js`);return{kotlin:e}},[],import.meta.url)).kotlin);case`lua`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BSAh-TK7.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{lua:e}=await import(`./lua-D7ZxzT_Z.js`);return{lua:e}},[],import.meta.url)).lua);case`markdown`:return(await e(async()=>{let{markdown:e}=await import(`./dist-DpjZjxsY.js`).then(e=>e.t);return{markdown:e}},__vite__mapDeps([8,1,6,0,2,9,3,4,5]),import.meta.url)).markdown().language;case`objectivec`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BSAh-TK7.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{objectiveC:e}=await import(`./clike-BBEjy26W.js`);return{objectiveC:e}},[],import.meta.url)).objectiveC);case`perl`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BSAh-TK7.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{perl:e}=await import(`./perl-B2T_oOXa.js`);return{perl:e}},[],import.meta.url)).perl);case`python`:return(await e(async()=>{let{python:e}=await import(`./dist-Ds8NLlxa.js`);return{python:e}},__vite__mapDeps([10,6,0,1,2,4]),import.meta.url)).python().language;case`r`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BSAh-TK7.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{r:e}=await import(`./r-BuKMh1KL.js`);return{r:e}},[],import.meta.url)).r);case`ruby`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BSAh-TK7.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{ruby:e}=await import(`./ruby-CUkUilNJ.js`);return{ruby:e}},[],import.meta.url)).ruby);case`rust`:return(await e(async()=>{let{rust:e}=await import(`./dist-DU3mip8Z.js`);return{rust:e}},__vite__mapDeps([11,0,1,2,4]),import.meta.url)).rust().language;case`sql`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BSAh-TK7.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{standardSQL:e}=await import(`./sql-PCnKIGcH.js`);return{standardSQL:e}},[],import.meta.url)).standardSQL);case`swift`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BSAh-TK7.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{swift:e}=await import(`./swift-BxR8RYdU.js`);return{swift:e}},[],import.meta.url)).swift);case`typescript`:return(await e(async()=>{let{javascript:e}=await import(`./dist-CADCdgrq.js`).then(e=>e.t);return{javascript:e}},__vite__mapDeps([5,1,6,0,2,4]),import.meta.url)).javascript({typescript:!0,jsx:!0}).language;case`html`:case`xml`:return(await e(async()=>{let{html:e}=await import(`./dist-C6lhy_gK.js`).then(e=>e.t);return{html:e}},__vite__mapDeps([9,1,3,0,2,4,5,6]),import.meta.url)).html().language;case`yaml`:return(await e(async()=>{let{yaml:e}=await import(`./dist-DbcFk_pj.js`).then(e=>e.t);return{yaml:e}},__vite__mapDeps([12,1,0,2,4]),import.meta.url)).yaml().language;default:return null}}async function i(t,r){if(t===`canvas`)return(await e(async()=>{let{json:e}=await import(`./dist-lGeJn8Qx.js`).then(e=>e.t);return{json:e}},__vite__mapDeps([7,1,0,2,4]),import.meta.url)).json().language;if(r){let e=await n(r);if(e)return e}return t===`toml`?(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BSAh-TK7.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{toml:e}=await import(`./toml-nuQJU7MH.js`);return{toml:e}},[],import.meta.url)).toml):null}export{i as t};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dist-DAqA-GDU.js","./chunk-CYidjpOJ.js","./w3c-keyname-Bw5giFqP.js","./dist-BiwzWInZ.js","./dist-BgBcg3TP.js","./dist-DfLFtHzK.js","./dist-ofeGnIBD.js","./dist-DQyQPRvE.js","./dist-dO0W-CVt.js","./dist-CkFATl39.js","./dist-DsH7eETa.js","./dist-DM6osNK2.js","./dist-BVpMlVG3.js"])))=>i.map(i=>d[i]);
2
+ import{t as e}from"./preload-helper-Chd9yIcd.js";var t=new Map;function n(e){let n=t.get(e);if(n)return n;let i=r(e);return t.set(e,i),i}async function r(t){switch(t){case`bash`:case`shell`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-DAqA-GDU.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{shell:e}=await import(`./shell-DhuGq92J.js`);return{shell:e}},[],import.meta.url)).shell);case`c`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-DAqA-GDU.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{c:e}=await import(`./clike-BBEjy26W.js`);return{c:e}},[],import.meta.url)).c);case`cpp`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-DAqA-GDU.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{cpp:e}=await import(`./clike-BBEjy26W.js`);return{cpp:e}},[],import.meta.url)).cpp);case`csharp`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-DAqA-GDU.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{csharp:e}=await import(`./clike-BBEjy26W.js`);return{csharp:e}},[],import.meta.url)).csharp);case`css`:case`less`:case`scss`:return(await e(async()=>{let{css:e}=await import(`./dist-BiwzWInZ.js`).then(e=>e.r);return{css:e}},__vite__mapDeps([3,1,0,2,4]),import.meta.url)).css().language;case`diff`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-DAqA-GDU.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{diff:e}=await import(`./diff-CvpcR3NJ.js`);return{diff:e}},[],import.meta.url)).diff);case`gherkin`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-DAqA-GDU.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{gherkin:e}=await import(`./gherkin-D3uEvcwv.js`);return{gherkin:e}},[],import.meta.url)).gherkin);case`go`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-DAqA-GDU.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{go:e}=await import(`./go-fa_HI4OB.js`);return{go:e}},[],import.meta.url)).go);case`ini`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-DAqA-GDU.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{properties:e}=await import(`./properties-BlzchQr8.js`);return{properties:e}},[],import.meta.url)).properties);case`java`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-DAqA-GDU.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{java:e}=await import(`./clike-BBEjy26W.js`);return{java:e}},[],import.meta.url)).java);case`javascript`:return(await e(async()=>{let{javascript:e}=await import(`./dist-DfLFtHzK.js`).then(e=>e.t);return{javascript:e}},__vite__mapDeps([5,1,6,0,2,4]),import.meta.url)).javascript().language;case`json`:return(await e(async()=>{let{json:e}=await import(`./dist-DQyQPRvE.js`).then(e=>e.t);return{json:e}},__vite__mapDeps([7,1,0,2,4]),import.meta.url)).json().language;case`kotlin`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-DAqA-GDU.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{kotlin:e}=await import(`./clike-BBEjy26W.js`);return{kotlin:e}},[],import.meta.url)).kotlin);case`lua`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-DAqA-GDU.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{lua:e}=await import(`./lua-D7ZxzT_Z.js`);return{lua:e}},[],import.meta.url)).lua);case`markdown`:return(await e(async()=>{let{markdown:e}=await import(`./dist-dO0W-CVt.js`).then(e=>e.t);return{markdown:e}},__vite__mapDeps([8,1,6,0,2,9,3,4,5]),import.meta.url)).markdown().language;case`objectivec`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-DAqA-GDU.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{objectiveC:e}=await import(`./clike-BBEjy26W.js`);return{objectiveC:e}},[],import.meta.url)).objectiveC);case`perl`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-DAqA-GDU.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{perl:e}=await import(`./perl-B2T_oOXa.js`);return{perl:e}},[],import.meta.url)).perl);case`python`:return(await e(async()=>{let{python:e}=await import(`./dist-DsH7eETa.js`);return{python:e}},__vite__mapDeps([10,6,0,1,2,4]),import.meta.url)).python().language;case`r`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-DAqA-GDU.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{r:e}=await import(`./r-BuKMh1KL.js`);return{r:e}},[],import.meta.url)).r);case`ruby`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-DAqA-GDU.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{ruby:e}=await import(`./ruby-CUkUilNJ.js`);return{ruby:e}},[],import.meta.url)).ruby);case`rust`:return(await e(async()=>{let{rust:e}=await import(`./dist-DM6osNK2.js`);return{rust:e}},__vite__mapDeps([11,0,1,2,4]),import.meta.url)).rust().language;case`sql`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-DAqA-GDU.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{standardSQL:e}=await import(`./sql-PCnKIGcH.js`);return{standardSQL:e}},[],import.meta.url)).standardSQL);case`swift`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-DAqA-GDU.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{swift:e}=await import(`./swift-BxR8RYdU.js`);return{swift:e}},[],import.meta.url)).swift);case`typescript`:return(await e(async()=>{let{javascript:e}=await import(`./dist-DfLFtHzK.js`).then(e=>e.t);return{javascript:e}},__vite__mapDeps([5,1,6,0,2,4]),import.meta.url)).javascript({typescript:!0,jsx:!0}).language;case`html`:case`xml`:return(await e(async()=>{let{html:e}=await import(`./dist-CkFATl39.js`).then(e=>e.t);return{html:e}},__vite__mapDeps([9,1,3,0,2,4,5,6]),import.meta.url)).html().language;case`yaml`:return(await e(async()=>{let{yaml:e}=await import(`./dist-BVpMlVG3.js`).then(e=>e.t);return{yaml:e}},__vite__mapDeps([12,1,0,2,4]),import.meta.url)).yaml().language;default:return null}}async function i(t,r){if(t===`canvas`)return(await e(async()=>{let{json:e}=await import(`./dist-DQyQPRvE.js`).then(e=>e.t);return{json:e}},__vite__mapDeps([7,1,0,2,4]),import.meta.url)).json().language;if(r){let e=await n(r);if(e)return e}return t===`toml`?(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-DAqA-GDU.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{toml:e}=await import(`./toml-nuQJU7MH.js`);return{toml:e}},[],import.meta.url)).toml):null}export{i as t};
@@ -0,0 +1,8 @@
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{Ct as n,Dt as r,Hn as i,Ht as a,In as o,Tn as s,Wt as c,_n as l,_t as u,a as d,k as f,nt as p,tt as m,yt as h}from"./DocumentContext-Dby66SPb.js";import{t as g}from"./react-f2sANaYj.js";import{n as _,r as v}from"./dist-Nvb76hAm.js";import{r as y,t as b}from"./useQuery-ZeEDLtxh.js";import{t as x}from"./compiler-runtime-BfE3aGVn.js";import{t as S}from"./utils-CPqDy6Hr.js";import{t as C}from"./button-CA0dewJJ.js";import{i as w,n as T,t as E}from"./tooltip-DHXgxWLL.js";import{n as D,r as O,t as k}from"./collapsible-COrqeoHr.js";import{$ as A,M as j,T as M,it as N,tt as P}from"./CodeMirrorPropInput-BFuQFciv.js";import{n as F,t as I}from"./toggle-group-CZcn-1gX.js";import{F as L,So as R,Un as z,Wn as B,Ya as V,en as H,ht as U,tn as W,uo as G,yi as K,yt as ee}from"./dist-BDUZWXxp.js";import{o as te}from"./use-settings-route-BE811wlS.js";import{t as q}from"./dist-DUfEoSbR.js";import{n as J}from"./dist-B6jB2qbD2.js";import{f as ne,l as re}from"./documents-events-CyHlKMaL.js";import{t as Y}from"./createLucideIcon-Bhw2PmPp.js";import{t as X}from"./chevron-right-Diamp-K_.js";import{r as ie}from"./CopyButton-ByR_1gcU.js";import{i as ae,r as oe}from"./prop-types-BMoAzRJb.js";import{t as se}from"./refresh-cw-DQervzDZ.js";import{t as ce}from"./triangle-alert-COo6wbUK.js";import{t as le}from"./wrench-CP2MIQHF.js";import{f as ue,u as de}from"./doc-paths-B_EmP8cW.js";import{a as fe,i as pe}from"./startup-marks-Cdkh8q3E.js";import{t as me}from"./badge-DFX4S3a5.js";import{C as he,D as ge}from"./config-provider-CfA6TibZ.js";import{$ as _e,It as ve,Lt as ye,Ot as be,Y as xe,Z as Se}from"./dist-DAqA-GDU.js";import{a as Ce,c as we,i as Te,n as Ee,r as De,s as Oe,t as ke}from"./panel-CbGx_cRv.js";import{t as Ae}from"./lint-plugin-meta-FPoTE-0t.js";import{t as je}from"./skeleton-BOVIbSHk.js";import{a as Me,c as Ne,d as Pe}from"./lint-config-client-CYdW-Tni.js";var Fe=Y(`chevrons-down-up`,[[`path`,{d:`m7 20 5-5 5 5`,key:`13a0gw`}],[`path`,{d:`m7 4 5 5 5-5`,key:`1kwcof`}]]),Ie=Y(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),Le=56,Re=2,ze=150,Be=2e3;function Ve(e,t,n){return e.top+e.height/2-(n+t)/2}function He(e,t){let n=Math.max(0,t.scrollHeight-t.clientHeight);return Math.max(0,Math.min(e,n))}function Ue(e){let{docName:t,container:i,measureTarget:a,placement:o,intent:s,grade:c,landedMode:l,transition:u,onOutcome:d,onDiscardQueuedTarget:f,toolbarOffset:p=Le,driftThresholdPx:m=Re,quietMs:g=ze,abandonAfterMs:_=Be}=e,v=e.contentColumn??i.firstElementChild,y=h(t),b=n(t,{yieldsToNavigation:s===`toggle`,supersede:()=>P(`superseded`)}),x=i.style.overflowAnchor;i.style.overflowAnchor=`none`,u&&fe(`ok/mode-switch/transition`,{from:u.from,to:u.to,grade:c});let S=!1,C=null,w,T,E=0,D,O=()=>{let e=a();return e===null?null:He(o===`center`?Ve(e,i.clientHeight,p):e.top-p,i)},k=()=>{let e=O();if(e===null)return{measurable:!1,moved:!1};C=e;let t=Math.abs(i.scrollTop-e)>m;return t&&(i.scrollTop=e),{measurable:!0,moved:t}},A=()=>i.scrollTop-(O()??C??i.scrollTop),j=()=>{w&&clearTimeout(w),T&&clearTimeout(T),E&&cancelAnimationFrame(E),D?.disconnect(),i.removeEventListener(`wheel`,I),i.removeEventListener(`touchstart`,I),i.removeEventListener(`contentvisibilityautostatechange`,L,!0),i.style.overflowAnchor=x,y.release(),b.release()},M=()=>{if(S)return;S=!0;let e;try{k(),e=A(),C!==null&&r({docName:t,container:i,targetScrollTop:i.scrollTop,mode:l})}finally{j()}fe(`ok/landing/land`,{grade:c,delta:e}),d?.({status:`landed`,delta:e})},N=()=>{if(S)return;S=!0;let e=C??i.scrollTop,t;try{t=A()}finally{j()}fe(`ok/landing/abandoned`,{grade:c,target:e,delta:t}),d?.({status:`abandoned`,delta:t})},P=e=>{S||(S=!0,j(),e===`mode-flip`&&f?.(),d?.({status:`cancelled`,reason:e}))},F=()=>{w&&clearTimeout(w),w=setTimeout(M,g)};function I(){P(`user-scroll`)}function L(){if(S)return;let{measurable:e,moved:t}=k();e&&(t||w===void 0)&&F()}try{k().measurable&&F(),i.addEventListener(`contentvisibilityautostatechange`,L,!0),i.addEventListener(`wheel`,I,{passive:!0}),i.addEventListener(`touchstart`,I,{passive:!0}),typeof ResizeObserver<`u`&&v&&(D=new ResizeObserver(L),D.observe(v)),E=requestAnimationFrame(L),T=setTimeout(N,_)}catch(e){throw S=!0,j(),e}return{cancel:P}}function We(e){switch(e){case`bulletList`:case`orderedList`:case`taskList`:case`list`:return`list`;case`codeBlock`:case`code`:return`code`;case`horizontalRule`:case`thematicBreak`:return`thematicBreak`;case`jsxComponent`:case`mdxJsxFlowElement`:case`mdxJsxTextElement`:return`jsx`;case`htmlBlock`:case`html`:return`html`;default:return e}}function Ge(e){return typeof e!=`object`||!e?``:`value`in e&&typeof e.value==`string`?e.value:`children`in e&&Array.isArray(e.children)?e.children.map(Ge).join(``):``}function Ke(e,t){let{frontmatter:n,body:r}=R(e),i=n===``?0:n.split(`
2
+ `).length-1;try{return{blocks:t.parseToEditorMdast(r).children.map(e=>({start:(e.position?.start.line??1/0)+i,end:(e.position?.end.line??-1/0)+i,kind:We(e.type),text:Ge(e)})),fmLineCount:i}}catch{return performance.mark(`ok/block-spans/parse-failed`),{blocks:[],fmLineCount:i}}}function qe(e,t){let{blocks:n,fmLineCount:r}=Ke(e,t);return{spans:n.map(e=>({start:e.start,end:e.end})),fmLineCount:r}}function Je(e,t){if(e.length===0)return null;let n=0,r=e.length-1,i=e.length-1;for(;n<=r;){let a=n+r>>1,o=e[a];o!==void 0&&o.end>=t?(i=a,r=a-1):n=a+1}return i}function Ye(e){let t=0;for(let n=e.childCount-1;n>=0;n--){let r=e.child(n);if(r.type.name!==`paragraph`||r.content.size!==0)break;t++}return t<2?e.childCount-t:e.childCount}function Xe(e,t,n){let r=e.childCount,i=Math.max(0,Math.min(t,r)),a=Math.max(i,Math.min(n,r));if(a<=i)return null;let o=0;for(let t=0;t<i;t++)o+=e.child(t).nodeSize;let s=o;for(let t=i;t<a;t++)o+=e.child(t).nodeSize;let c=o,l=e.content.size,u=Math.max(0,Math.min(s,l)),d=Math.max(u,Math.min(c,l));return d<=u?null:{from:u,to:d}}function Ze(e){let t=[0];for(let n=0;n<e.length;n++)e[n]===`
3
+ `&&t.push(n+1);return t}function Qe(e,t,n){return t<=1?0:t-1>=e.length?n:e[t-1]??n}function $e(e,t){let n=0,r=e.length-1,i=1;for(;n<=r;){let a=n+r>>1;(e[a]??0)<=t?(i=a+1,n=a+1):r=a-1}return i}function et(e,t,n){return Math.max(t,Math.min(e,n))}function tt(e,t){let n=e=>e.replace(/\s+/g,` `).trim();return n(e)===n(t)}function nt(e,t){return t.inRange?t.tripwireOk?tt(e.content,t.text)?`exact`:e.kind===t.kind?`same-type-ordinal`:`ordinal`:`ordinal`:`clamped`}function rt(e){let t=null,n=null;function r(r){return n!==null&&t===r?n:(n={blocks:Ke(r,e).blocks,lineStarts:Ze(r)},t=r,n)}return{captureFromWysiwyg(e,t,n){if(e.childCount===0)return null;let r=et(t,0,e.content.size),i=0,a=e.childCount-1,o=0;for(let t=0;t<e.childCount;t++){let n=e.child(t).nodeSize;if(r<i+n){a=t,o=i+1;break}i+=n,o=i+1}let s=e.child(a),c={blockIndex:a,kind:We(s.type.name),content:s.textContent};return n?.refine&&(c.selectionInBlock=Math.max(0,r-o)),c},captureFromSource(e,t,n){let{blocks:i,lineStarts:a}=r(e);if(i.length===0)return null;let o=et(t,0,e.length),s=Je(i,$e(a,o));if(s===null)return null;let c=i[s];if(!c)return null;let l={blockIndex:s,kind:c.kind,content:c.text};if(n?.refine){let t=Qe(a,c.start,e.length);l.selectionInBlock=Math.max(0,o-t)}return l},resolveInSource(e,{source:t,doc:n}){let{blocks:i,lineStarts:a}=r(t);if(i.length===0)return null;let o=e.blockIndex>=0&&e.blockIndex<i.length,s=Ye(n)===i.length,c=i[et(e.blockIndex,0,i.length-1)],l=Qe(a,c.start,t.length),u=Math.min(Qe(a,c.end+1,t.length),t.length),d=nt(e,{inRange:o,tripwireOk:s,kind:c.kind,text:c.text}),f=l;return d===`exact`&&e.selectionInBlock!==void 0&&(f=et(l+e.selectionInBlock,l,u)),{blockStart:l,blockEnd:u,point:f,confidence:d}},resolveInWysiwyg(e,{source:t,doc:n}){let i=Ye(n);if(i===0)return null;let{blocks:a}=r(t),o=e.blockIndex>=0&&e.blockIndex<i,s=i===a.length,c=et(e.blockIndex,0,i-1),l=Xe(n,c,c+1);if(l===null)return null;let u=n.child(c),d=nt(e,{inRange:o,tripwireOk:s,kind:We(u.type.name),text:u.textContent});return{blockStart:l.from,blockEnd:l.to,point:l.from,confidence:d}}}}var it=ve.define(),at=ve.define(),ot=xe.mark({class:m}),st=ye.define({create(){return xe.none},update(e,t){let n=e.map(t.changes);for(let e of t.effects)e.is(it)?n=xe.set([ot.range(e.value.from,e.value.to)]):e.is(at)&&(n=xe.none);return n},provide:e=>Se.decorations.from(e)}),ct=new WeakMap,lt=_e.define(e=>({destroy(){let t=ct.get(e);t!==void 0&&(clearTimeout(t),ct.delete(e))}}));function ut(e,t,n,r){let i=p(e.state.doc.length,t,n,r);if(!i)return;e.dispatch({effects:it.of(i)});let a=ct.get(e);a!==void 0&&clearTimeout(a);let o=setTimeout(()=>{ct.delete(e),e.dispatch({effects:at.of(null)})},L);ct.set(e,o)}function dt(){return[st,lt]}var ft=3e4;function pt(){let e=new Map,t=e=>e?Date.now()-e.rememberedAt>ft?null:e.navigation:null;return{remember(t,n){e.set(t,{navigation:n,rememberedAt:Date.now()})},peek(n){return t(e.get(n))},consume(n){let r=e.get(n);return e.delete(n),t(r)},clear(t){e.delete(t)},clearForTest(){e.clear()}}}var mt=pt(),ht=pt(),gt=mt.remember,_t=mt.peek,vt=mt.consume,yt=mt.clear;mt.clearForTest;var bt=ht.remember,xt=ht.peek,St=ht.consume,Ct=ht.clear;ht.clearForTest;function wt(e,t,n){return{start:ge(e,t),end:ge(e,n)}}function Tt(e,t){let n=he(e.start,t),r=he(e.end,t);return n===null||r===null||r.index<=n.index?null:n.index}var Et=`open-knowledge:view-in-source`,Dt=56,Ot=null;function kt(){return Ot??=rt(M()),Ot}function At(e,t,n,r,i=`toggle`){let a=r.captureFromWysiwyg(e,t,{refine:i===`jump`});if(!a)return null;let o=r.resolveInSource(a,{source:n.toString(),doc:e});return{kind:`selection-offset`,intent:i,anchor:a,pin:o?wt(n,o.blockStart,o.blockEnd):void 0}}function jt(e){let{editor:t,docName:n,ytext:r}=e,i=A(t);if(!i)return;let a=i.state.selection.from,o=At(i.state.doc,a,r,kt(),`jump`);o&&gt(n,o),window.dispatchEvent(new CustomEvent(Et,{detail:{docName:n}}))}function Mt(e,t,n,r,i){let a=r.captureFromSource(e,t);if(!a)return null;let o=i?r.resolveInSource(a,{source:e,doc:i}):null;return{kind:`selection-offset`,anchor:a,pin:o?wt(n,o.blockStart,o.blockEnd):void 0}}function Nt(e,t){let{source:n,pmDoc:r,ydoc:i,resolver:a}=t;if(e.pin){let t=Tt(e.pin,i);if(t===null){let t=a.resolveInWysiwyg(e.anchor,{source:n,doc:r});return t?{...t,point:t.blockStart,confidence:`clamped`}:null}let o=a.captureFromSource(n,t);if(o)return a.resolveInWysiwyg(o,{source:n,doc:r})}return a.resolveInWysiwyg(e.anchor,{source:n,doc:r})}function Pt(e,t){let{source:n,pmDoc:r,ydoc:i,resolver:a}=t;if(e.pin){let t=Tt(e.pin,i);if(t===null){let t=a.resolveInSource(e.anchor,{source:n,doc:r});return t?{...t,point:t.blockStart,confidence:`clamped`}:null}let o=a.captureFromSource(n,t);if(o)return a.resolveInSource(o,{source:n,doc:r})}return a.resolveInSource(e.anchor,{source:n,doc:r})}function Ft(e,t){try{return e.coordsAtPos(t)}catch{return null}}function It(e,t,n){let r=Math.max(0,Math.min(n,e.state.doc.length)),i=t.getBoundingClientRect().top,a=Ft(e,r);if(a)return{top:a.top-i+t.scrollTop,height:a.bottom-a.top};try{let n=e.lineBlockAt(r);return{top:e.documentTop-i+t.scrollTop+n.top,height:n.height}}catch{return null}}function Lt(e,t){if(e.isDestroyed)return null;try{let n=e.nodeDOM(t);if(n instanceof HTMLElement)return n;let{node:r}=e.domAtPos(t);return r instanceof HTMLElement?r:r.parentElement}catch{return null}}function Rt(e,t,n){if(e.isDestroyed)return null;let r=Lt(e,Math.max(0,Math.min(n,e.state.doc.content.size)));if(!r)return null;let i=r.getBoundingClientRect(),a=t.getBoundingClientRect().top;return{top:i.top-a+t.scrollTop,height:i.height}}function zt(){return typeof document>`u`?null:u()}function Bt(e,t){let n=t.getBoundingClientRect(),r=n.left+n.width/2;for(let t of[Dt+1,Dt+12,Dt+40]){let i=e.posAtCoords({left:r,top:n.top+t});if(i)return i.pos}return null}function Vt(e,t){let n=t.getBoundingClientRect(),r=n.left+n.width/2;for(let t of[Dt+1,Dt+12,Dt+40]){let i=e.posAtCoords({x:r,y:n.top+t});if(i!==null)return i}return null}function Ht(e){let{from:t,to:n,docName:r,ytext:i}=e;t===`wysiwyg`&&n===`source`?Ut(r,i):t===`source`&&n===`wysiwyg`&&Wt(r,i)}function Ut(e,t){let n=_t(e);if(n&&n.kind!==`selection-offset`)return;let r=l(e);if(!r)return;let i=A(r);if(!i)return;let a=zt();if(!a)return;let o=Bt(i,a);if(o===null)return;let s=At(i.state.doc,o,t,kt());s&&gt(e,s)}function Wt(e,t){let n=a(e);if(!n)return;let r=zt();if(!r)return;let i=Vt(n,r);if(i===null)return;let o=l(e),s=o?A(o)?.state.doc:void 0,c=Mt(t.toString(),i,t,kt(),s);c&&bt(e,c)}function Gt(e){let{view:t,docName:r,navigation:i,ydoc:a,transition:o}=e,s=l(r),c=s?A(s)?.state.doc:void 0;if(!c)return null;let u=Pt(i,{source:t.state.doc.toString(),pmDoc:c,ydoc:a,resolver:kt()});if(!u)return null;let d=zt();if(!d)return null;let f=u,p=i.intent===`jump`,m=p?f.point:f.blockStart;t.dispatch({effects:Se.scrollIntoView(m,{y:`start`})});let h=!1,g=null,_=n(r,{yieldsToNavigation:!p,supersede:()=>{h=!0,_.release()}}),v=e=>{if(!h){if(Ft(t,m)===null&&e<8){requestAnimationFrame(()=>v(e+1));return}try{p&&(t.dispatch({selection:be.cursor(m)}),t.focus())}finally{_.release()}g=Ue({docName:r,container:d,contentColumn:t.contentDOM,measureTarget:()=>It(t,d,m),placement:p?`center`:`top`,intent:p?`jump`:`toggle`,grade:f.confidence,landedMode:`source`,transition:o,toolbarOffset:Dt,onOutcome:p?e=>{e.status===`landed`&&ut(t,f.blockStart,f.blockEnd,f.confidence)}:void 0,onDiscardQueuedTarget:()=>yt(r)})}};return v(0),{cancel:e=>{h=!0,_.release(),g?.cancel(e)}}}function Kt(e){let{editor:t,docName:n,navigation:r,ydoc:i,transition:a}=e,o=A(t);if(!o)return null;let s=Nt(r,{source:i.getText(`source`).toString(),pmDoc:o.state.doc,ydoc:i,resolver:kt()});if(!s)return null;let c=zt();if(!c)return null;let l=s;return Ue({docName:n,container:c,contentColumn:o.dom,measureTarget:()=>Rt(o,c,l.point),placement:`top`,intent:`toggle`,grade:l.confidence,landedMode:`wysiwyg`,transition:a,toolbarOffset:Dt,onDiscardQueuedTarget:()=>Ct(n)})}var Z=e(g(),1),Q=x(),$=t();function qt(e){let t=(0,Q.c)(14),{scope:n,onScopeChange:r,projectLabel:i}=e,{_:a}=v(),o;t[0]===r?o=t[1]:(o=e=>{e&&r(e)},t[0]=r,t[1]=o);let s;t[2]===a?s=t[3]:(s=a({id:`aBgwis`}),t[2]=a,t[3]=s);let c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(F,{value:`doc`,className:`flex-1`,"data-testid":`panel-scope-doc`,children:(0,$.jsx)(_,{id:`UpCz01`})}),t[4]=c):c=t[4];let l;t[5]===i?l=t[6]:(l=i??(0,$.jsx)(_,{id:`e0NrBM`}),t[5]=i,t[6]=l);let u;t[7]===l?u=t[8]:(u=(0,$.jsx)(F,{value:`project`,className:`flex-1`,"data-testid":`panel-scope-project`,children:l}),t[7]=l,t[8]=u);let d;return t[9]!==n||t[10]!==o||t[11]!==s||t[12]!==u?(d=(0,$.jsx)(`div`,{className:`shrink-0 px-4 pb-2`,children:(0,$.jsxs)(I,{type:`single`,variant:`segmented`,size:`sm`,spacing:1,value:n,onValueChange:o,"aria-label":s,className:`w-full rounded-md bg-muted p-0.5 dark:bg-background`,children:[c,u]})}),t[9]=n,t[10]=o,t[11]=s,t[12]=u,t[13]=d):d=t[13],d}function Jt(e){let t=e.localTarget;if(e.source!==`links`||t===void 0)return e.message;let n=t.resolvedTarget??t.href;return t.reason===`unresolvable`?t.role===`image`?q._({id:`W5qdI_`,values:{shown:n}}):q._({id:`bpMVIA`,values:{shown:n}}):t.targetKind===`file`?t.role===`image`?q._({id:`iSWh95`,values:{shown:n}}):q._({id:`fOzzSV`,values:{shown:n}}):q._({id:`XBBZnv`,values:{shown:n}})}var Yt=`audit-superseded`;async function Xt(e={kind:`project`},t){return Qt(e,W,!1,t)}async function Zt(e={kind:`project`},t){return Qt(e,H,!0,t)}async function Qt(e,t,n,r){try{let i=new URLSearchParams;e.kind===`path`?i.set(`path`,e.path):e.kind===`doc`&&i.set(`doc`,e.docName),n&&i.set(`counts`,`1`);let a=i.size===0?``:`?${i}`,o=await fetch(`/api/audit${a}`,r===void 0?void 0:{signal:r});if(!o.ok)return o.status===409?Yt:(console.warn(`[audit] request failed`,o.status,o.statusText),null);let s;try{s=await o.json()}catch{return r?.aborted===!0||console.warn(`[audit] response body is not valid JSON`),null}let c=t.safeParse(s);return c.success?c.data:(console.warn(`[audit] response failed schema validation`,c.error.issues),null)}catch(e){return r?.aborted===!0||console.warn(`[audit] fetch threw`,e),null}}function $t(e,t){let n=!1,r=!1,i=!1,a=[],o=null,s=()=>{if(r){i=!0;return}r=!0,o=new AbortController,t({status:`loading`,findings:a}),Xt({kind:`doc`,docName:e},o.signal).then(e=>{if(!(n||o?.signal.aborted===!0)){if(e===null){t({status:`failed`,findings:a});return}if(e===`audit-superseded`){i=!0;return}i||(a=e.files.flatMap(e=>e.diagnostics).filter(e=>e.source===`links`),t({status:`loaded`,findings:a}))}}).finally(()=>{n||(r=!1,o=null,i&&(i=!1,s()))})};s();let c=ne(e=>{(e.includes(`backlinks`)||re(e))&&s()});return()=>{n=!0,o?.abort(),c()}}function en(e){let t=(0,Q.c)(6),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={docName:null,state:{status:`idle`,findings:[]}},t[0]=n):n=t[0];let[r,i]=(0,Z.useState)(n),a,o;if(t[1]===e?(a=t[2],o=t[3]):(a=()=>{if(e===null){i({docName:null,state:{status:`idle`,findings:[]}});return}return i({docName:e,state:{status:`loading`,findings:[]}}),$t(e,t=>i({docName:e,state:t}))},o=[e],t[1]=e,t[2]=a,t[3]=o),(0,Z.useEffect)(a,o),r.docName!==e){let n;return t[4]===e?n=t[5]:(n=e===null?{status:`idle`,findings:[]}:{status:`loading`,findings:[]},t[4]=e,t[5]=n),n}return r.state}function tn(e){return Math.min(50,Math.max(1,Math.ceil(e/10)))}function nn(e,t){return e===t||e%tn(t)===0}var rn=[250,500,1e3,2e3,4e3];function an(e){return e.status===503&&e.problemType===`urn:ok:error:too-many-agent-sessions`}async function on(e,t){let n=await t.fixItem(e);for(let r of rn){if(n.ok||!an(n)||!t.shouldContinue()||(console.debug(`[sweep] capacity refusal, backing off %dms`,r),await t.sleep(r),!t.shouldContinue()))break;n=await t.fixItem(e)}return n}async function sn(e){let t=e.items.length,n=[];for(let[r,i]of e.items.entries()){if(r>0&&(await e.sleep(15),!e.shouldContinue()))return{failures:n,cancelled:!0};let a=await on(i,e);if(a.ok||n.push({item:i,detail:a.errorDetail}),!e.shouldContinue())return{failures:n,cancelled:!0};let o=r+1;nn(o,t)&&e.onProgress(o,t)}return{failures:n,cancelled:!1}}function cn(e){return new Promise(t=>setTimeout(t,e))}var ln=null,un=!1,dn=new Set,fn=new Set;function pn(e){ln=e;for(let e of dn)e()}function mn(e){return dn.add(e),()=>{dn.delete(e)}}function hn(){return ln}function gn(){return(0,Z.useSyncExternalStore)(mn,hn,hn)}function _n(e){return fn.add(e),()=>{fn.delete(e)}}function vn(){un=!0}function yn(e,t,n){if(e.length>0&&(console.warn(`[lint] fix-all: ${e.length} of ${n} files failed`,e.map(e=>({file:e.item.file,detail:e.detail}))),!t)){let t=e[0];J.error(q._({id:`se-tU0`,values:{0:e.length,total:n}}),{description:t===void 0?void 0:`${t.item.file}${t.detail===null?``:` — ${t.detail}`}`})}if(t){J.info(q._({id:`H1TmTu`}));return}e.length===0&&J.success(q._({id:`SWX1O7`,values:{total:n}}))}async function bn({items:e,fixItem:t,sleep:n=cn}){if(ln!==null||e.length===0)return;let r=e.length;un=!1,pn({done:0,total:r});let i=[],a=!1,o=!1;try{let o=await sn({items:e,fixItem:t,sleep:n,onProgress:e=>pn({done:e,total:r}),shouldContinue:()=>!un});i=o.failures,a=o.cancelled}catch(e){console.warn(`[lint] fix-all: sweep threw`,e),o=!0}finally{pn(null)}try{o?J.error(q._({id:`vwV-kH`})):yn(i,a,r)}finally{for(let e of fn)e()}}var xn={errorCount:0,warningCount:0},Sn=new Map,Cn=new Set,wn=new Map;function Tn(){let e=new Map;for(let[t,n]of Sn){let r=n.lint.errorCount+n.links.errorCount,i=n.lint.warningCount+n.links.warningCount;r===0&&i===0||e.set(t,{errorCount:r,warningCount:i})}wn=e;for(let e of Cn)e()}var En=z;function Dn(e){return Cn.add(e),()=>{Cn.delete(e)}}function On(){return wn}function kn(e){Sn.clear();for(let t of e)Sn.set(de(t.file),En(t.diagnostics));Tn()}function An(e){Sn.clear();for(let t of e)Sn.set(de(t.file),{lint:t.lint,links:t.links});Tn()}function jn(e,t){Sn.set(e,En(t)),Tn()}function Mn(e,t,n){let r=Sn.get(e)??{lint:xn,links:xn},i=r[t];i.errorCount===n.errorCount&&i.warningCount===n.warningCount||(Sn.set(e,{...r,[t]:n}),Tn())}var Nn=`open-knowledge:lint-nav`;function Pn(e,t){return e.range.start.line-t.range.start.line||e.range.start.character-t.range.start.character}function Fn(e,t){return{docName:e,line:t.range.start.line+1,column:t.range.start.character+1,source:t.source}}function In(e){if(e.source!==`links`)return null;let t=e.localTarget;return t===void 0?`document`:t.role===`image`?`image`:t.targetKind===`file`?`file`:t.targetKind===`document`?`document`:`unresolvable`}var Ln={document:o,file:i,image:P,unresolvable:o};function Rn(e){return e.linkTarget!==void 0&&In(e)===`document`}function zn(e){let t=(0,Q.c)(40),{diagnostic:n,instanceCount:r}=e,{_:i}=v(),a=n.severity===`error`?ie:ce,o=n.range.start.line+1,s;t[0]===n?s=t[1]:(s=In(n),t[0]=n,t[1]=s);let c=s,l=c===null?null:Ln[c],u=r!==void 0&&r>1,d=n.severity===`error`?`text-destructive`:`text-amber-500`,f;t[2]===d?f=t[3]:(f=S(`mt-0.5 size-3.5 shrink-0`,d),t[2]=d,t[3]=f);let p;t[4]!==a||t[5]!==f?(p=(0,$.jsx)(a,{"aria-hidden":`true`,className:f}),t[4]=a,t[5]=f,t[6]=p):p=t[6];let m;t[7]===n?m=t[8]:(m=Jt(n),t[7]=n,t[8]=m);let h;t[9]===m?h=t[10]:(h=(0,$.jsx)(`span`,{className:`min-w-0 flex-1 text-foreground`,children:m}),t[9]=m,t[10]=h);let g;t[11]!==u||t[12]!==r?(g=u?(0,$.jsxs)(`span`,{className:`mt-0.5 flex shrink-0 items-center gap-1`,children:[(0,$.jsx)(me,{variant:`gray`,"data-testid":`problems-instance-count`,className:`h-4 px-1 font-sans text-[10px] leading-none`,children:(0,$.jsx)(_,{id:`iZCZmF`,values:{instanceCount:r}})}),(0,$.jsx)(X,{"aria-hidden":`true`,className:`size-3 text-muted-foreground transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`})]}):null,t[11]=u,t[12]=r,t[13]=g):g=t[13];let y;t[14]!==p||t[15]!==h||t[16]!==g?(y=(0,$.jsxs)(`span`,{className:`flex items-start gap-1.5 text-sm`,children:[p,h,g]}),t[14]=p,t[15]=h,t[16]=g,t[17]=y):y=t[17];let b=c??void 0,x=l!==null&&`gap-0.5`,C;t[18]===x?C=t[19]:(C=S(`h-4 shrink-0 px-1 font-sans text-[10px] uppercase leading-none`,x),t[18]=x,t[19]=C);let w;t[20]===l?w=t[21]:(w=l===null?null:(0,$.jsx)(l,{"aria-hidden":`true`,className:`size-2.5`}),t[20]=l,t[21]=w);let T;t[22]!==n.source||t[23]!==C||t[24]!==w||t[25]!==b?(T=(0,$.jsxs)(me,{variant:`gray`,"data-testid":`problems-source-tag`,"data-target-kind":b,className:C,children:[w,n.source]}),t[22]=n.source,t[23]=C,t[24]=w,t[25]=b,t[26]=T):T=t[26];let E;t[27]!==i||t[28]!==n.code||t[29]!==o||t[30]!==u?(E=u?n.code:`${n.code} · ${i({id:`enPTnx`,values:{displayLine:o}})}`,t[27]=i,t[28]=n.code,t[29]=o,t[30]=u,t[31]=E):E=t[31];let D;t[32]===E?D=t[33]:(D=(0,$.jsx)(`span`,{className:`min-w-0 truncate`,children:E}),t[32]=E,t[33]=D);let O;t[34]!==T||t[35]!==D?(O=(0,$.jsxs)(`span`,{className:`flex items-center gap-1.5 ps-5 font-mono text-xs text-muted-foreground`,children:[T,D]}),t[34]=T,t[35]=D,t[36]=O):O=t[36];let k;return t[37]!==O||t[38]!==y?(k=(0,$.jsxs)($.Fragment,{children:[y,O]}),t[37]=O,t[38]=y,t[39]=k):k=t[39],k}function Bn(e){let t=new Map;for(let n of e){let e=`${n.source}/${n.code}\u0000${n.linkTarget??``}\u0000${n.message}`,r=t.get(e);r===void 0?t.set(e,{key:e,instances:[n]}):r.instances.push(n)}return[...t.values()]}function Vn(e){let t=(0,Q.c)(63),{group:n,onNavigate:r,navTitle:i,renderActions:a}=e,{_:o}=v(),s=n.instances[0],c,l,u,d,f,p,m,h;if(t[0]!==o||t[1]!==s||t[2]!==n.instances.length||t[3]!==i||t[4]!==r||t[5]!==a){h=Symbol.for(`react.early_return_sentinel`);bb0:{let e=Jt(s);if(n.instances.length===1){let e;t[14]!==s||t[15]!==a?(e=a(s),t[14]=s,t[15]=a,t[16]=e):e=t[16];let n=e,o;t[17]!==s||t[18]!==r?(o=()=>r(s),t[17]=s,t[18]=r,t[19]=o):o=t[19];let c;t[20]!==s||t[21]!==i?(c=i(s),t[20]=s,t[21]=i,t[22]=c):c=t[22];let l;t[23]===s?l=t[24]:(l=(0,$.jsx)(zn,{diagnostic:s}),t[23]=s,t[24]=l);let u;t[25]!==l||t[26]!==o||t[27]!==c?(u=(0,$.jsx)(`button`,{type:`button`,onClick:o,className:`flex w-full cursor-pointer flex-col gap-0.5 rounded px-2 py-1.5 text-left`,title:c,children:l}),t[25]=l,t[26]=o,t[27]=c,t[28]=u):u=t[28];let d;t[29]===n?d=t[30]:(d=n===null?null:(0,$.jsx)(`div`,{className:`absolute bottom-1 right-1 flex items-center gap-1 rounded bg-muted opacity-0 transition-opacity focus-within:opacity-100 group-hover:opacity-100 motion-reduce:transition-none`,children:n}),t[29]=n,t[30]=d);let f;t[31]!==u||t[32]!==d?(f=(0,$.jsxs)(`li`,{className:`group relative rounded transition-colors hover:bg-muted`,children:[u,d]}),t[31]=u,t[32]=d,t[33]=f):f=t[33],h=f;break bb0}p=`rounded`,m=`problems-duplicate-group`,l=k,t[34]!==s||t[35]!==n.instances.length?(f=(0,$.jsx)(O,{className:`group flex w-full cursor-pointer flex-col gap-0.5 rounded px-2 py-1.5 text-left transition-colors hover:bg-muted`,children:(0,$.jsx)(zn,{diagnostic:s,instanceCount:n.instances.length})}),t[34]=s,t[35]=n.instances.length,t[36]=f):f=t[36],c=D,d=`overflow-hidden data-[state=open]:animate-[collapsible-down_150ms_ease-out] data-[state=closed]:animate-[collapsible-up_150ms_ease-in] motion-reduce:animate-none`,u=o({id:`_Bix3-`,values:{localizedFirstMessage:e}})}t[0]=o,t[1]=s,t[2]=n.instances.length,t[3]=i,t[4]=r,t[5]=a,t[6]=c,t[7]=l,t[8]=u,t[9]=d,t[10]=f,t[11]=p,t[12]=m,t[13]=h}else c=t[6],l=t[7],u=t[8],d=t[9],f=t[10],p=t[11],m=t[12],h=t[13];if(h!==Symbol.for(`react.early_return_sentinel`))return h;let g;if(t[37]!==o||t[38]!==n.instances||t[39]!==i||t[40]!==r||t[41]!==a){let e;t[43]!==o||t[44]!==i||t[45]!==r||t[46]!==a?(e=e=>{let t=a(e),n=e.range.start.line+1,s=Jt(e);return(0,$.jsxs)(`li`,{className:`group relative rounded transition-colors hover:bg-muted`,children:[(0,$.jsx)(`button`,{type:`button`,onClick:()=>r(e),className:`flex w-full cursor-pointer rounded px-2 py-1 text-left font-mono text-xs text-muted-foreground`,title:i(e),"aria-label":o({id:`txUHO8`,values:{localizedMessage:s,displayLine:n}}),children:o({id:`enPTnx`,values:{displayLine:n}})}),t===null?null:(0,$.jsx)(`div`,{className:`absolute bottom-0.5 right-1 flex items-center gap-1 rounded bg-muted opacity-0 transition-opacity focus-within:opacity-100 group-hover:opacity-100 motion-reduce:transition-none`,children:t})]},Hn(e))},t[43]=o,t[44]=i,t[45]=r,t[46]=a,t[47]=e):e=t[47],g=n.instances.map(e),t[37]=o,t[38]=n.instances,t[39]=i,t[40]=r,t[41]=a,t[42]=g}else g=t[42];let _;t[48]!==u||t[49]!==g?(_=(0,$.jsx)(`ul`,{"aria-label":u,className:`flex flex-col gap-0.5 pb-1 ps-5`,"data-testid":`problems-duplicate-instances`,children:g}),t[48]=u,t[49]=g,t[50]=_):_=t[50];let y;t[51]!==c||t[52]!==d||t[53]!==_?(y=(0,$.jsx)(c,{className:d,children:_}),t[51]=c,t[52]=d,t[53]=_,t[54]=y):y=t[54];let b;t[55]!==l||t[56]!==f||t[57]!==y?(b=(0,$.jsxs)(l,{children:[f,y]}),t[55]=l,t[56]=f,t[57]=y,t[58]=b):b=t[58];let x;return t[59]!==b||t[60]!==p||t[61]!==m?(x=(0,$.jsx)(`li`,{className:p,"data-testid":m,children:b}),t[59]=b,t[60]=p,t[61]=m,t[62]=x):x=t[62],x}function Hn(e){return`${e.source}/${e.code}-${e.range.start.line}-${e.range.start.character}-${e.message}`}function Un(e){return e.reduce((e,t)=>e+ +((t.fixes?.length??0)>0),0)}function Wn(e){let t=(0,Q.c)(11),{target:n,creating:r,disabled:i,onCreate:a}=e,{_:o}=v(),s;t[0]!==o||t[1]!==n?(s=o({id:`oWsZk8`,values:{target:n}}),t[0]=o,t[1]=n,t[2]=s):s=t[2];let c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(N,{"aria-hidden":`true`,className:`size-3`}),t[3]=c):c=t[3];let l;t[4]===r?l=t[5]:(l=r?(0,$.jsx)(_,{id:`E9bKSA`}):(0,$.jsx)(_,{id:`XRuL0i`}),t[4]=r,t[5]=l);let u;return t[6]!==i||t[7]!==a||t[8]!==s||t[9]!==l?(u=(0,$.jsxs)(C,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,disabled:i,onClick:a,"aria-label":s,"data-testid":`problems-create-page`,children:[c,l]}),t[6]=i,t[7]=a,t[8]=s,t[9]=l,t[10]=u):u=t[10],u}function Gn(e){let t=(0,Q.c)(8),{tip:n,testId:r,children:i}=e,a;t[0]===i?a=t[1]:(a=(0,$.jsx)(w,{asChild:!0,children:(0,$.jsx)(`span`,{className:`inline-flex shrink-0`,children:i})}),t[0]=i,t[1]=a);let o;t[2]!==r||t[3]!==n?(o=(0,$.jsx)(T,{"data-testid":r,children:n}),t[2]=r,t[3]=n,t[4]=o):o=t[4];let s;return t[5]!==a||t[6]!==o?(s=(0,$.jsxs)(E,{children:[a,o]}),t[5]=a,t[6]=o,t[7]=s):s=t[7],s}function Kn(e){let t=(0,Q.c)(21),{count:n,problemCount:r,aiAvailable:i,disabled:a,onClick:o,children:s}=e,{_:c}=v(),l;t[0]!==i||t[1]!==n||t[2]!==r?(l=n>0?(0,$.jsx)(_,{id:`vjwsDi`,values:{count:n}}):r===0?(0,$.jsx)(_,{id:`gAhHu7`}):i?(0,$.jsx)(_,{id:`zA9zRL`}):(0,$.jsx)(_,{id:`X3MMeA`}),t[0]=i,t[1]=n,t[2]=r,t[3]=l):l=t[3];let u;t[4]!==c||t[5]!==s||t[6]!==n||t[7]!==r?(u=s===void 0?r===0?c({id:`4m-xuX`}):n===0?c({id:`SqIoy_`}):void 0:void 0,t[4]=c,t[5]=s,t[6]=n,t[7]=r,t[8]=u):u=t[8];let d;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)(le,{"aria-hidden":`true`,className:`size-3`}),t[9]=d):d=t[9];let f;t[10]!==s||t[11]!==n?(f=s??(0,$.jsx)(_,{id:`RZXTlY`,values:{count:n}}),t[10]=s,t[11]=n,t[12]=f):f=t[12];let p;t[13]!==a||t[14]!==o||t[15]!==u||t[16]!==f?(p=(0,$.jsxs)(C,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,disabled:a,onClick:o,"aria-label":u,"data-testid":`problems-auto-fix`,children:[d,f]}),t[13]=a,t[14]=o,t[15]=u,t[16]=f,t[17]=p):p=t[17];let m;return t[18]!==l||t[19]!==p?(m=(0,$.jsx)(Gn,{testId:`problems-auto-fix-tip`,tip:l,children:p}),t[18]=l,t[19]=p,t[20]=m):m=t[20],m}function qn(e){let t=(0,Q.c)(12),{count:n,disabled:r,onClick:i}=e,a;t[0]===n?a=t[1]:(a=(0,$.jsx)(_,{id:`mgDKWS`,values:{count:n}}),t[0]=n,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsx)(s,{"aria-hidden":`true`,className:`size-3`}),t[2]=o):o=t[2];let c;t[3]===n?c=t[4]:(c=(0,$.jsx)(_,{id:`gyHDWC`,values:{count:n}}),t[3]=n,t[4]=c);let l;t[5]!==r||t[6]!==i||t[7]!==c?(l=(0,$.jsxs)(C,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,disabled:r,onClick:i,"data-testid":`problems-fix-with-ai`,children:[o,c]}),t[5]=r,t[6]=i,t[7]=c,t[8]=l):l=t[8];let u;return t[9]!==a||t[10]!==l?(u=(0,$.jsx)(Gn,{testId:`problems-fix-with-ai-tip`,tip:a,children:l}),t[9]=a,t[10]=l,t[11]=u):u=t[11],u}function Jn(e){let t=(0,Q.c)(50),{docName:n,diagnostics:r,linkFindingsStatus:i,onFix:a,onAutoFix:o,onAskAi:c,onFixWithAi:l}=e,u=i===void 0?`loaded`:i,{_:d}=v(),[p,m]=(0,Z.useState)(`doc`),{data:h}=Pe(),g=h===null?null:h.effective.enabled?Ae.filter(e=>h.effective.plugins[e.id].enabled):[],y=g!==null&&g.length===0,b;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={status:`idle`},t[0]=b):b=t[0];let[x,S]=(0,Z.useState)(b),D=gn(),O=oe(),[k,A]=(0,Z.useState)(null),j=(0,Z.useRef)(!0),M,N;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(M=()=>(j.current=!0,()=>{j.current=!1}),N=[],t[1]=M,t[2]=N):(M=t[1],N=t[2]),(0,Z.useEffect)(M,N);let P=(0,Z.useRef)(nr),F=(0,Z.useRef)(tr),I;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(I={status:`idle`},t[3]=I):I=t[3];let L=(0,Z.useRef)(I),R;t[4]===x?R=t[5]:(R=()=>{x.status!==`loading`&&(L.current=x)},t[4]=x,t[5]=R),(0,Z.useEffect)(R);let z=(0,Z.useRef)(0),B=[...r].sort(Pn),V=Un(B),H;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(H=async function(){z.current+=1;let e=z.current,t=L.current;S({status:`loading`});let n=await Xt();if(n===`audit-superseded`){z.current===e&&j.current&&S(t.status===`idle`?{status:`failed`}:t);return}n!==null&&kn(n.files),j.current&&S(n===null?{status:`failed`}:{status:`loaded`,result:n})},t[6]=H):H=t[6];let U=H,W;t[7]!==d||t[8]!==x.status||t[9]!==k||t[10]!==O?(W=async function(e){let t=e.linkTarget;if(!(t===void 0||k!==null||O===null)){A(t);try{await f({initialDir:``,suggestedName:t},{addPage:O.addPage})}catch(e){let t=e;J.error(t instanceof Error?t.message:d({id:`tfi40B`})),j.current&&A(null);return}J.success(d({id:`EWCJFu`,values:{target:t}})),j.current&&A(null),j.current&&x.status===`loaded`&&await U()}},t[7]=d,t[8]=x.status,t[9]=k,t[10]=O,t[11]=W):W=t[11];let G=W,K=x.status===`loaded`?x.result.files.filter($n):[],ee=function(){bn({items:K,fixItem:Qn})},q;t[12]===x.status?q=t[13]:(q=function(e){m(e),e===`project`&&x.status===`idle`&&U()},t[12]=x.status,t[13]=q);let Y=q,X;t[14]===x.status?X=t[15]:(X=()=>{P.current=()=>{x.status===`idle`||x.status===`failed`||U()}},t[14]=x.status,t[15]=X),(0,Z.useEffect)(X);let ie,ae;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(ie=()=>Ne(()=>P.current()),ae=[],t[16]=ie,t[17]=ae):(ie=t[16],ae=t[17]),(0,Z.useEffect)(ie,ae);let se,ce;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(se=()=>ne(e=>{re(e)&&P.current()}),ce=[],t[18]=se,t[19]=ce):(se=t[18],ce=t[19]),(0,Z.useEffect)(se,ce);let fe;t[20]===x.status?fe=t[21]:(fe=()=>{F.current=()=>{x.status===`idle`||x.status===`failed`||U().catch(e=>{console.warn(`[lint] post-sweep re-audit failed`,e),j.current&&S({status:`failed`})})}},t[20]=x.status,t[21]=fe),(0,Z.useEffect)(fe);let pe,me;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(pe=()=>_n(()=>F.current()),me=[],t[22]=pe,t[23]=me):(pe=t[22],me=t[23]),(0,Z.useEffect)(pe,me);let he;t[24]===n?he=t[25]:(he=function(e){let t=Fn(n,e);gt(n,{kind:`lint`,detail:t}),window.dispatchEvent(new CustomEvent(Nn,{detail:t}))},t[24]=n,t[25]=he);let ge=he,_e;t[26]!==n||t[27]!==ge?(_e=function(e,t){let r=de(e);if(r===n){ge(t);return}gt(r,{kind:`lint`,detail:Fn(r,t)}),window.location.hash=ue(r)},t[26]=n,t[27]=ge,t[28]=_e):_e=t[28];let ve=_e,ye;t[29]!==d||t[30]!==G||t[31]!==k||t[32]!==c||t[33]!==a||t[34]!==O?(ye=function(e){let t=a!==void 0&&(e.fixes?.length??0)>0,n=Rn(e)&&O!==null;if(!t&&!n&&c===void 0)return null;let r=`${e.source}/${e.code}`;return(0,$.jsxs)($.Fragment,{children:[n?(0,$.jsx)(Wn,{target:e.linkTarget??``,creating:k===e.linkTarget,disabled:k!==null,onCreate:()=>void G(e)}):null,t?(0,$.jsxs)(C,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,onClick:()=>a?.(e),"aria-label":d({id:`fZj9em`,values:{flatId:r}}),"data-testid":`problems-fix`,children:[(0,$.jsx)(le,{"aria-hidden":`true`,className:`size-3`}),(0,$.jsx)(_,{id:`c4fVUV`})]}):null,c===void 0?null:(0,$.jsxs)(C,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,onClick:()=>c(e),"aria-label":d({id:`hh4mVC`,values:{flatId:r}}),"data-testid":`problems-ask-ai`,children:[(0,$.jsx)(s,{"aria-hidden":`true`,className:`size-3`}),(0,$.jsx)(_,{id:`xWEvuo`})]})]})},t[29]=d,t[30]=G,t[31]=k,t[32]=c,t[33]=a,t[34]=O,t[35]=ye):ye=t[35];let be=ye,xe=ke,Se;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,$.jsx)(we,{children:(0,$.jsx)(_,{id:`OXdGnd`})}),t[36]=Se):Se=t[36];let je=g!==null&&g.length>0&&(0,$.jsxs)(E,{children:[(0,$.jsx)(w,{className:`shrink-0 cursor-default rounded-md bg-muted-foreground/5 px-2 py-1 font-mono text-xs text-muted-foreground`,"data-testid":`problems-active-plugins`,children:(0,$.jsx)(_,{id:`yxF19Y`,values:{0:g.length}})}),(0,$.jsx)(T,{"data-testid":`problems-active-plugins-tooltip`,children:(0,$.jsx)(_,{id:`ws5o1F`,values:{0:g.map(Zn).join(`, `)}})})]}),Me;t[37]===je?Me=t[38]:(Me=(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[Se,je]}),t[37]=je,t[38]=Me);let Fe=p===`doc`&&B.length>0&&(0,$.jsx)(De,{children:B.length}),Ie;t[39]!==Me||t[40]!==Fe?(Ie=(0,$.jsxs)(Oe,{children:[Me,Fe]}),t[39]=Me,t[40]=Fe,t[41]=Ie):Ie=t[41];let Le;t[42]!==Y||t[43]!==p?(Le=(0,$.jsx)(qt,{scope:p,onScopeChange:Y}),t[42]=Y,t[43]=p,t[44]=Le):Le=t[44];let Re=p===`doc`?(0,$.jsxs)(Ee,{className:`px-2 py-2`,children:[u===`idle`||u===`loading`?(0,$.jsx)(Te,{className:`px-2 pb-2`,role:`status`,"aria-live":`polite`,"data-testid":`problems-links-loading`,children:(0,$.jsx)(_,{id:`W9NSe0`})}):u===`failed`?(0,$.jsx)(Ce,{className:`px-2 pb-2`,role:`status`,"data-testid":`problems-links-failed`,children:B.length>0?(0,$.jsx)(_,{id:`IoHQYP`}):(0,$.jsx)(_,{id:`gpbKxw`})}):null,B.length===0?u===`loaded`?y?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Te,{className:`px-2`,"data-testid":`problems-no-plugins`,children:(0,$.jsx)(_,{id:`Hngy37`})}),(0,$.jsx)(`div`,{className:`px-2 pt-2`,children:(0,$.jsx)(C,{variant:`outline`,size:`sm`,onClick:te,"data-testid":`problems-enable-plugins`,children:(0,$.jsx)(_,{id:`rnX-1S`})})})]}):(0,$.jsx)(Te,{className:`px-2`,children:(0,$.jsx)(_,{id:`ZI8uvA`})}):null:(0,$.jsxs)($.Fragment,{children:[o!==void 0||l!==void 0?(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-1 px-2 pb-1`,children:[o!==void 0&&(0,$.jsx)(Kn,{count:V,problemCount:B.length,aiAvailable:l!==void 0,disabled:V===0,onClick:o}),l!==void 0&&(0,$.jsx)(qn,{count:B.length,disabled:!1,onClick:()=>l(`doc`)})]}):null,(0,$.jsx)(`ul`,{"aria-label":d({id:`OXdGnd`}),className:`flex flex-col gap-0.5`,children:Bn(B).map(e=>(0,$.jsx)(Vn,{group:e,onNavigate:ge,navTitle:e=>d({id:`vbMHjo`,values:{0:e.range.start.line+1}}),renderActions:be},e.key))})]})]}):(0,$.jsx)(rr,{audit:x,onRefresh:()=>void U(),onNavigate:ve,fixableCount:K.reduce(Xn,0),problemCount:x.status===`loaded`?x.result.files.reduce(Yn,0):0,fixing:D,onAutoFix:ee,onCancelFix:vn,onFixWithAi:l===void 0||x.status!==`loaded`?void 0:()=>l(`project`),onCreateTarget:O===null?void 0:e=>void G(e),creatingTarget:k}),ze;return t[45]!==xe||t[46]!==Ie||t[47]!==Le||t[48]!==Re?(ze=(0,$.jsxs)(xe,{children:[Ie,Le,Re]}),t[45]=xe,t[46]=Ie,t[47]=Le,t[48]=Re,t[49]=ze):ze=t[49],ze}function Yn(e,t){return e+t.diagnostics.length}function Xn(e,t){return e+Un(t.diagnostics)}function Zn(e){return e.label}function Qn(e){return Me(de(e.file))}function $n(e){return e.diagnostics.some(er)}function er(e){return(e.fixes?.length??0)>0}function tr(){}function nr(){}function rr(e){let t=(0,Q.c)(81),{audit:n,onRefresh:r,onNavigate:i,fixableCount:a,problemCount:o,fixing:s,onAutoFix:c,onCancelFix:l,onFixWithAi:u,onCreateTarget:d,creatingTarget:f}=e,{_:p}=v(),m=n.status===`loading`||n.status===`idle`,h;t[0]!==n.result||t[1]!==n.status?(h=n.status===`loaded`?n.result.files:[],t[0]=n.result,t[1]=n.status,t[2]=h):h=t[2];let g=h,[y,b]=(0,Z.useState)(or),x;t[3]!==y||t[4]!==g?(x=g.length>0&&g.every(e=>y.has(e.file)),t[3]=y,t[4]=g,t[5]=x):x=t[5];let S=x,D;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(D=function(e,t){b(n=>{let r=new Set(n);return t?r.add(e):r.delete(e),r})},t[6]=D):D=t[6];let O=D,k;t[7]!==S||t[8]!==g?(k=function(){b(S?new Set:new Set(g.map(ar)))},t[7]=S,t[8]=g,t[9]=k):k=t[9];let A=k,j;t[10]!==n.result||t[11]!==n.status?(j=n.status===`loaded`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(_,{id:`DsDwR-`,values:{0:n.result.errorCount}}),` · `,(0,$.jsx)(_,{id:`W1SI2K`,values:{0:n.result.warningCount}})]}),t[10]=n.result,t[11]=n.status,t[12]=j):j=t[12];let M;t[13]===j?M=t[14]:(M=(0,$.jsx)(`p`,{className:`min-w-0 truncate text-xs text-muted-foreground`,"data-testid":`problems-audit-summary`,children:j}),t[13]=j,t[14]=M);let N;t[15]!==p||t[16]!==S||t[17]!==g.length||t[18]!==A?(N=g.length>0?(0,$.jsxs)(E,{children:[(0,$.jsx)(w,{asChild:!0,children:(0,$.jsx)(C,{variant:`ghost`,size:`icon`,className:`size-6 shrink-0 text-muted-foreground`,"aria-label":p(S?{id:`I4LGsH`}:{id:`Ugvy4O`}),"data-testid":`problems-audit-expand-toggle`,onClick:A,children:S?(0,$.jsx)(Fe,{"aria-hidden":`true`,className:`size-3.5`}):(0,$.jsx)(Ie,{"aria-hidden":`true`,className:`size-3.5`})})}),(0,$.jsx)(T,{"data-testid":`problems-audit-expand-toggle-tooltip`,children:S?(0,$.jsx)(_,{id:`I4LGsH`}):(0,$.jsx)(_,{id:`Ugvy4O`})})]}):null,t[15]=p,t[16]=S,t[17]=g.length,t[18]=A,t[19]=N):N=t[19];let P;t[20]===p?P=t[21]:(P=p({id:`I7y_vn`}),t[20]=p,t[21]=P);let F=m||s!==null,I;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,$.jsx)(se,{"aria-hidden":`true`,className:`size-3.5`}),t[22]=I):I=t[22];let L;t[23]!==r||t[24]!==P||t[25]!==F?(L=(0,$.jsx)(w,{asChild:!0,children:(0,$.jsx)(C,{variant:`ghost`,size:`icon`,className:`size-6 shrink-0 text-muted-foreground`,"aria-label":P,"data-testid":`problems-audit-refresh`,disabled:F,onClick:r,children:I})}),t[23]=r,t[24]=P,t[25]=F,t[26]=L):L=t[26];let R;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,$.jsx)(T,{"data-testid":`problems-audit-refresh-tooltip`,children:(0,$.jsx)(_,{id:`I7y_vn`})}),t[27]=R):R=t[27];let z;t[28]===L?z=t[29]:(z=(0,$.jsxs)(E,{children:[L,R]}),t[28]=L,t[29]=z);let B;t[30]!==z||t[31]!==N?(B=(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[N,z]}),t[30]=z,t[31]=N,t[32]=B):B=t[32];let V;t[33]!==B||t[34]!==M?(V=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[M,B]}),t[33]=B,t[34]=M,t[35]=V):V=t[35];let H;t[36]!==p||t[37]!==s?(H=s===null?null:(0,$.jsx)(`span`,{className:`sr-only`,role:`status`,children:p({id:`gZElfU`,values:{0:s.done,1:s.total}})}),t[36]=p,t[37]=s,t[38]=H):H=t[38];let U;t[39]!==p||t[40]!==s||t[41]!==l?(U=s===null?null:(0,$.jsxs)(E,{children:[(0,$.jsx)(w,{asChild:!0,children:(0,$.jsx)(C,{variant:`ghost`,size:`sm`,className:`h-6 shrink-0 px-2 text-muted-foreground`,"aria-label":p({id:`q2cLM6`}),"data-testid":`problems-cancel-fix`,onClick:l,children:(0,$.jsx)(_,{id:`ygCKqB`})})}),(0,$.jsx)(T,{"data-testid":`problems-cancel-fix-tooltip`,children:(0,$.jsx)(_,{id:`yvSAuM`})})]}),t[39]=p,t[40]=s,t[41]=l,t[42]=U):U=t[42];let W=u!==void 0,G=m||s!==null||a===0,K;t[43]===s?K=t[44]:(K=s===null?void 0:(0,$.jsx)(_,{id:`S9t1PI`,values:{0:s.done,1:s.total}}),t[43]=s,t[44]=K);let ee;t[45]!==a||t[46]!==c||t[47]!==o||t[48]!==W||t[49]!==G||t[50]!==K?(ee=(0,$.jsx)(Kn,{count:a,problemCount:o,aiAvailable:W,disabled:G,onClick:c,children:K}),t[45]=a,t[46]=c,t[47]=o,t[48]=W,t[49]=G,t[50]=K,t[51]=ee):ee=t[51];let te;t[52]!==s||t[53]!==u||t[54]!==o?(te=u!==void 0&&o>0?(0,$.jsx)(qn,{count:o,disabled:s!==null,onClick:u}):null,t[52]=s,t[53]=u,t[54]=o,t[55]=te):te=t[55];let q;t[56]!==H||t[57]!==U||t[58]!==ee||t[59]!==te?(q=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-1`,children:[H,U,ee,te]}),t[56]=H,t[57]=U,t[58]=ee,t[59]=te,t[60]=q):q=t[60];let J;t[61]!==V||t[62]!==q?(J=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1 px-2 pb-1`,children:[V,q]}),t[61]=V,t[62]=q,t[63]=J):J=t[63];let ne;t[64]!==p||t[65]!==m?(ne=m&&(0,$.jsx)(`div`,{className:`flex flex-col gap-1`,role:`status`,"aria-busy":`true`,"aria-label":p({id:`dx-TwN`}),children:[1,2,3].map(ir)}),t[64]=p,t[65]=m,t[66]=ne):ne=t[66];let re;t[67]===n.status?re=t[68]:(re=n.status===`failed`&&(0,$.jsx)(Ce,{className:`px-2 text-xs`,children:(0,$.jsx)(_,{id:`IFezUv`})}),t[67]=n.status,t[68]=re);let Y;t[69]!==n.result||t[70]!==n.status||t[71]!==f||t[72]!==y||t[73]!==d||t[74]!==i?(Y=n.status===`loaded`&&(0,$.jsx)(sr,{result:n.result,onNavigate:i,onCreateTarget:d,creatingTarget:f,expandedFiles:y,onToggleFile:O}),t[69]=n.result,t[70]=n.status,t[71]=f,t[72]=y,t[73]=d,t[74]=i,t[75]=Y):Y=t[75];let X;return t[76]!==J||t[77]!==ne||t[78]!==re||t[79]!==Y?(X=(0,$.jsxs)(Ee,{className:`px-2 py-2`,"data-testid":`problems-project-scope`,children:[J,ne,re,Y]}),t[76]=J,t[77]=ne,t[78]=re,t[79]=Y,t[80]=X):X=t[80],X}function ir(e){return(0,$.jsxs)(`div`,{className:`flex items-start gap-2.5 rounded px-2 py-1.5`,children:[(0,$.jsx)(je,{className:`mt-0.5 size-3.5 shrink-0 rounded`}),(0,$.jsxs)(`div`,{className:`flex-1 space-y-1.5`,children:[(0,$.jsx)(je,{className:`h-3 w-28`}),(0,$.jsx)(je,{className:`h-3 w-40`})]})]},e)}function ar(e){return e.file}function or(){return new Set}function sr(e){let t=(0,Q.c)(14),{result:n,onNavigate:r,onCreateTarget:i,creatingTarget:a,expandedFiles:o,onToggleFile:s}=e,{_:c}=v(),l;t[0]!==c||t[1]!==n.warnings?(l=n.warnings.length>0&&(0,$.jsx)(`ul`,{"aria-label":c({id:`Rsdhj9`}),className:`flex flex-col gap-0.5 pb-1`,children:n.warnings.map(cr)}),t[0]=c,t[1]=n.warnings,t[2]=l):l=t[2];let u;t[3]!==a||t[4]!==o||t[5]!==i||t[6]!==r||t[7]!==s||t[8]!==n.fileCount||t[9]!==n.files?(u=n.files.length===0?(0,$.jsx)(Te,{className:`px-2`,children:(0,$.jsx)(_,{id:`k_Dqw1`,values:{0:n.fileCount}})}):n.files.map(e=>(0,$.jsx)(lr,{file:e,onNavigate:r,onCreateTarget:i,creatingTarget:a,open:o.has(e.file),onOpenChange:t=>s(e.file,t)},e.file)),t[3]=a,t[4]=o,t[5]=i,t[6]=r,t[7]=s,t[8]=n.fileCount,t[9]=n.files,t[10]=u):u=t[10];let d;return t[11]!==l||t[12]!==u?(d=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[l,u]}),t[11]=l,t[12]=u,t[13]=d):d=t[13],d}function cr(e,t){return(0,$.jsxs)(`li`,{className:`flex items-start gap-1.5 px-2 text-xs`,children:[(0,$.jsx)(ce,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-amber-500`}),(0,$.jsx)(`span`,{className:`min-w-0 text-foreground`,children:e})]},`${t}-${e}`)}function lr(e){let t=(0,Q.c)(45),{file:n,onNavigate:r,onCreateTarget:i,creatingTarget:a,open:o,onOpenChange:s}=e,{_:c}=v(),l,u,d,f,p,m,h,g,_,y;if(t[0]!==c||t[1]!==a||t[2]!==n.diagnostics||t[3]!==n.file||t[4]!==i||t[5]!==r||t[6]!==s||t[7]!==o){let e=[...n.diagnostics].sort(Pn);u=k,h=o,g=s,_=`problems-audit-group`;let v;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsx)(X,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`}),t[18]=v):v=t[18];let b;t[19]===n.file?b=t[20]:(b=(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs text-foreground`,title:n.file,children:n.file}),t[19]=n.file,t[20]=b),y=(0,$.jsxs)(O,{className:`group flex w-full cursor-pointer items-center gap-1.5 rounded px-2 py-1.5 text-left transition-colors hover:bg-muted`,children:[v,b,(0,$.jsx)(me,{variant:`gray`,"data-testid":`problems-audit-file-count`,className:`shrink-0`,children:e.length})]}),l=D,m=`overflow-hidden data-[state=open]:animate-[collapsible-down_150ms_ease-out] data-[state=closed]:animate-[collapsible-up_150ms_ease-in] motion-reduce:animate-none`,t[21]!==c||t[22]!==n.file?(d=c({id:`zAJzIg`,values:{0:n.file}}),t[21]=c,t[22]=n.file,t[23]=d):d=t[23],f=`flex flex-col gap-0.5 pb-1 ps-3`;let x;t[24]!==c||t[25]!==a||t[26]!==n.file||t[27]!==i||t[28]!==r?(x=e=>(0,$.jsx)(Vn,{group:e,onNavigate:e=>r(n.file,e),navTitle:e=>c({id:`xKDsGS`,values:{0:e.range.start.line+1,1:n.file}}),renderActions:e=>!Rn(e)||i===void 0?null:(0,$.jsx)(Wn,{target:e.linkTarget??``,creating:a===e.linkTarget,disabled:a!==null,onCreate:()=>i(e)})},e.key),t[24]=c,t[25]=a,t[26]=n.file,t[27]=i,t[28]=r,t[29]=x):x=t[29],p=Bn(e).map(x),t[0]=c,t[1]=a,t[2]=n.diagnostics,t[3]=n.file,t[4]=i,t[5]=r,t[6]=s,t[7]=o,t[8]=l,t[9]=u,t[10]=d,t[11]=f,t[12]=p,t[13]=m,t[14]=h,t[15]=g,t[16]=_,t[17]=y}else l=t[8],u=t[9],d=t[10],f=t[11],p=t[12],m=t[13],h=t[14],g=t[15],_=t[16],y=t[17];let b;t[30]!==d||t[31]!==f||t[32]!==p?(b=(0,$.jsx)(`ul`,{"aria-label":d,className:f,children:p}),t[30]=d,t[31]=f,t[32]=p,t[33]=b):b=t[33];let x;t[34]!==l||t[35]!==m||t[36]!==b?(x=(0,$.jsx)(l,{className:m,children:b}),t[34]=l,t[35]=m,t[36]=b,t[37]=x):x=t[37];let S;return t[38]!==u||t[39]!==x||t[40]!==h||t[41]!==g||t[42]!==_||t[43]!==y?(S=(0,$.jsxs)(u,{open:h,onOpenChange:g,"data-testid":_,children:[y,x]}),t[38]=u,t[39]=x,t[40]=h,t[41]=g,t[42]=_,t[43]=y,t[44]=S):S=t[44],S}var ur=null,dr=[];function fr(e){if(e===ur)return dr;let t=pr(e);return ur=e,dr=t,t}function pr(e){let t=[],n=new Map,r=B();for(let i=mr(e);i<=e.lines;i++){let a=e.line(i);if(r(a.text))continue;let o=K(a.text,n);o&&t.push({slug:o.slug,from:a.from})}return t}function mr(e){if(!hr(e.line(1).text))return 1;for(let t=2;t<=e.lines;t++)if(hr(e.line(t).text))return t+1;return 1}function hr(e){return V.test(e.endsWith(`\r`)?e.slice(0,-1):e)}function gr(e){let t=document.getElementById(e);return t?t.getBoundingClientRect().top:null}function _r(e){let t=new Map;for(let n of fr(e.state.doc))t.set(n.slug,n.from);let n=e.documentTop;return r=>{let i=t.get(r);return i===void 0?null:n+e.lineBlockAt(i).top}}function vr(e,t){let n=(0,Q.c)(9),r;n[0]===t?r=n[1]:(r=t===void 0?{}:t,n[0]=t,n[1]=r);let{isSourceMode:i,docName:o}=r,s=i===void 0?!1:i,[l,u]=(0,Z.useState)(void 0),d=(0,Z.useRef)(null),f;n[2]===o?f=n[3]:(f=()=>o?a(o):null,n[2]=o,n[3]=f);let p=(0,Z.useSyncExternalStore)(c,f,yr),m,h;return n[4]!==s||n[5]!==e||n[6]!==p?(m=()=>{if(e.length===0||s&&!p){u(void 0);return}let t=function(){let t=s&&p?_r(p):gr,n=window.innerHeight/2,r,i;for(let a of e){let e=t(a);e!==null&&(e<0?r=a:i===void 0&&e<n&&(i=a))}u(i??r??e[0])},n=function(){d.current===null&&(d.current=requestAnimationFrame(()=>{d.current=null,t()}))};return document.addEventListener(`scroll`,n,{capture:!0,passive:!0}),t(),()=>{document.removeEventListener(`scroll`,n,{capture:!0}),d.current!==null&&(cancelAnimationFrame(d.current),d.current=null)}},h=[e,s,p],n[4]=s,n[5]=e,n[6]=p,n[7]=m,n[8]=h):(m=n[7],h=n[8]),(0,Z.useEffect)(m,h),l}function yr(){return null}var br=300;async function xr(e){let t=await fetch(`/api/page-headings?docName=${encodeURIComponent(e)}`),n;try{n=await t.json()}catch(e){throw new j(q._({id:`qAQVSD`}),{cause:e,status:t.status})}if(!t.ok){let e=ee.safeParse(n);throw e.success?Error(e.data.title):new j(q._({id:`zlErBl`}),{status:t.status})}let r=U.safeParse(n);if(!r.success)throw new j(q._({id:`XW18jo`}),{status:t.status});return r.data.headings??[]}var Sr=32,Cr=12,wr=6,Tr=`open-knowledge:outline-nav`;function Er(e){let t=(0,Q.c)(2),n;return t[0]===e?n=t[1]:(n=(0,$.jsx)(pe,{name:`outline-panel`,children:(0,$.jsx)(Dr,{...e})}),t[0]=e,t[1]=n),n}function Dr(e){let t=(0,Q.c)(53),{docName:n,isSourceMode:r,className:i}=e,a=i===void 0?``:i,{_:o}=v(),{pages:s,loading:c}=ae(),l=y(),{activeProvider:u,activeDocName:f}=d(),p,m;t[0]===n?(p=t[1],m=t[2]):(p=[`page-headings`,n],m=()=>xr(n),t[0]=n,t[1]=p,t[2]=m);let h;t[3]!==n||t[4]!==c||t[5]!==s?(h=!c&&(s.has(n)||G(n)),t[3]=n,t[4]=c,t[5]=s,t[6]=h):h=t[6];let g;t[7]!==p||t[8]!==m||t[9]!==h?(g={queryKey:p,queryFn:m,enabled:h,staleTime:1/0},t[7]=p,t[8]=m,t[9]=h,t[10]=g):g=t[10];let{data:x,isLoading:C,error:w}=b(g),T;t[11]===x?T=t[12]:(T=x===void 0?[]:x,t[11]=x,t[12]=T);let E=T,D,O;t[13]!==f||t[14]!==u||t[15]!==n||t[16]!==l?(D=()=>{if(!u||f!==n)return;let e=u.document,t=null,r=()=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{t=null,l.invalidateQueries({queryKey:[`page-headings`,n]})},br)};return e.on(`update`,r),()=>{e.off(`update`,r),t!==null&&clearTimeout(t)}},O=[u,f,n,l],t[13]=f,t[14]=u,t[15]=n,t[16]=l,t[17]=D,t[18]=O):(D=t[17],O=t[18]),(0,Z.useEffect)(D,O);let k;t[19]===E?k=t[20]:(k=E.map(Or),t[19]=E,t[20]=k);let A=k,j;t[21]!==n||t[22]!==r?(j={isSourceMode:r,docName:n},t[21]=n,t[22]=r,t[23]=j):j=t[23];let M=vr(A,j),N;t[24]!==M||t[25]!==E?(N=M?E.findIndex(e=>e.slug===M):-1,t[24]=M,t[25]=E,t[26]=N):N=t[26];let P=N,F;t[27]!==n||t[28]!==r?(F=function(e,t){let i={docName:n,index:e,slug:t,mode:r?`source`:`wysiwyg`};i.mode===`source`&&gt(n,{kind:`outline`,detail:i}),window.dispatchEvent(new CustomEvent(Tr,{detail:i}))},t[27]=n,t[28]=r,t[29]=F):F=t[29];let I=F,L=((P>=0?E[P].level:1)-1)*Cr+(Cr-wr)/2,R=P*Sr+(Sr-wr)/2,z;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,$.jsx)(we,{children:(0,$.jsx)(_,{id:`dD7NPy`})}),t[30]=z):z=t[30];let B;t[31]!==E.length||t[32]!==C?(B=!C&&(0,$.jsx)(De,{children:E.length}),t[31]=E.length,t[32]=C,t[33]=B):B=t[33];let V;t[34]===B?V=t[35]:(V=(0,$.jsxs)(Oe,{children:[z,B]}),t[34]=B,t[35]=V);let H;t[36]!==o||t[37]!==P||t[38]!==M||t[39]!==w||t[40]!==I||t[41]!==E||t[42]!==C||t[43]!==L||t[44]!==R?(H=w?(0,$.jsx)(Ce,{className:`px-2`,children:w instanceof Error?w.message:o({id:`GuqOb1`})}):E.length===0&&!C?(0,$.jsx)(Te,{className:`px-2`,children:(0,$.jsx)(_,{id:`0BB9ID`})}):(0,$.jsxs)(`nav`,{"aria-label":o({id:`BymzO4`}),className:`relative`,children:[P>=0&&(0,$.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute left-0 top-0 rounded-full bg-primary motion-safe:[transition:transform_0.25s_var(--ease-out-strong)]`,style:{width:wr,height:wr,transform:`translate(${L}px, ${R}px)`}}),E.map((e,t)=>{let n=e.slug===M;return(0,$.jsx)(`button`,{type:`button`,"aria-current":n?`location`:void 0,onClick:()=>I(t,e.slug),className:S(`w-full cursor-pointer truncate py-1.5 pe-2 text-left text-sm transition-colors`,n?`font-medium text-primary`:`text-muted-foreground hover:text-foreground`),style:{paddingLeft:`${(e.level-1)*Cr+20}px`},title:e.text,children:e.text},t)})]}),t[36]=o,t[37]=P,t[38]=M,t[39]=w,t[40]=I,t[41]=E,t[42]=C,t[43]=L,t[44]=R,t[45]=H):H=t[45];let U;t[46]!==C||t[47]!==H?(U=(0,$.jsx)(Ee,{className:`px-3 py-2`,"aria-busy":C,children:H}),t[46]=C,t[47]=H,t[48]=U):U=t[48];let W;return t[49]!==a||t[50]!==V||t[51]!==U?(W=(0,$.jsxs)(ke,{className:a,children:[V,U]}),t[49]=a,t[50]=V,t[51]=U,t[52]=W):W=t[52],W}function Or(e){return e.slug}var kr={words:0,chars:0,tokens:0},Ar=/[ -〿぀-ゟ゠-ヿ㐀-䶿一-鿿豈-﫿＀-￯฀-๿ក-៿]/,jr=/[\p{L}\p{N}]/u,Mr=new Set([`text`,`inlineCode`,`code`,`tag`]),Nr=new Set([`html`,`definition`,`footnoteDefinition`,`yaml`,`toml`,`image`,`imageReference`,`mdxFlowExpression`,`mdxTextExpression`,`mdxjsEsm`,`rawMdxFallback`,`rawMdxFallbackMdast`]),Pr=new Set([`paragraph`,`heading`,`blockquote`,`list`,`listItem`,`thematicBreak`,`table`,`tableRow`,`tableCell`,`mdxJsxFlowElement`,`commentBlock`]);function Fr(e,t){if(!e)return;let n=e.type;if(!Nr.has(n)){if(Mr.has(n)){e.value&&(t.push(e.value),n===`code`&&t.push(`
4
+ `));return}if(n===`wikiLink`||n===`wikiLinkEmbed`){let n=e.data?.alias??e.value??``;n&&t.push(n);return}if(Array.isArray(e.children)){for(let n of e.children)Fr(n,t);if(Pr.has(n)&&t.length>0){let e=t[t.length-1];e&&!e.endsWith(`
5
+ `)&&t.push(`
6
+ `)}}}}function Ir(e){try{let t=M().parseToMdast(e),n=[];return Fr(t,n),n.join(``).trim()}catch(t){return console.warn(`[document-stats] mdast parse failed, falling back to raw text`,t),e.trim()}}function Lr(e){if(!e)return 0;let t=0;for(let n of e.split(/\s+/))jr.test(n)&&t++;return t}function Rr(e){let t=globalThis.Intl.Segmenter;if(!t)return Lr(e);let n=new t(void 0,{granularity:`word`}),r=0;for(let t of n.segment(e))t.isWordLike&&r++;return r}function zr(e){let t=Ar.test(e)?1.5:4;return Math.ceil(e.length/t)}function Br(e){return e?{words:Ar.test(e)?Rr(e):Lr(e),chars:e.length,tokens:zr(e)}:{words:0,chars:0,tokens:0}}function Vr(e){if(!e)return{words:0,chars:0,tokens:0};let{body:t}=R(e);return t.trim()?Br(Ir(t)):{words:0,chars:0,tokens:0}}function Hr(e,{isMarkdown:t}){let n=e.trim();return n?Br(t?Ir(e):n):kr}var Ur=new Map,Wr=new Set,Gr=(e,t)=>`${t}:${e}`;function Kr(){for(let e of Wr)e()}function qr(e,t,n){let r=Gr(e,t);if(n===null){Ur.delete(r)&&Kr();return}let i=Ur.get(r);i&&i.words===n.words&&i.chars===n.chars&&i.tokens===n.tokens||(Ur.set(r,n),Kr())}function Jr(e,t){return e===null?null:Ur.get(Gr(e,t))??null}function Yr(e){return Wr.add(e),()=>{Wr.delete(e)}}function Xr(e){let{from:t,to:n,empty:r}=e.state.selection;if(r)return null;let i=e.state.doc.textBetween(t,n,`
7
+ `,` `);return i.trim()?Hr(i,{isMarkdown:!1}):null}function Zr(e){let t=[];for(let n of e.state.selection.ranges)n.empty||t.push(e.state.sliceDoc(n.from,n.to));if(t.length===0)return null;let n=t.join(`
8
+ `);return n.trim()?Hr(n,{isMarkdown:!0}):null}export{yt as A,qe as B,Jt as C,Gt as D,jt as E,gt as F,dt as I,Je as L,St as M,_t as N,Kt as O,xt as P,Xe as R,en as S,Ht as T,Ie as V,Dn as _,Yr as a,Zt as b,Tr as c,Nn as d,Jn as f,An as g,Mn as h,Xr as i,vt as j,Et as k,Er as l,jn as m,qr as n,kr as o,On as p,Zr as r,Vr as s,Jr as t,fr as u,Yt as v,qt as w,$t as x,Xt as y,Ye as z};