@inkeep/open-knowledge 0.71.7 → 0.72.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/dist/cli.mjs +54 -54
  2. package/dist/constants-C2sFQ-ut.mjs +1 -0
  3. package/dist/{dist-DsaTRpAv.mjs → dist-C7Oi9AkI.mjs} +481 -481
  4. package/dist/{dist-Cq96M7zq.mjs → dist-s4KdL8xn.mjs} +1 -1
  5. package/dist/index.mjs +169 -169
  6. package/dist/init-B6J0LwAj.mjs +1 -0
  7. package/dist/{init-BjzAy9ci.mjs → init-DdkNne7X.mjs} +63 -63
  8. package/dist/{launch-json-removal-DMD-44kV.mjs → launch-json-removal-CtCgfHIV.mjs} +1 -1
  9. package/dist/{loader-BWovV0v-.mjs → loader-BMlNYLSo.mjs} +1 -1
  10. package/dist/loader-C9weUSCP.mjs +1 -0
  11. package/dist/{md-manager-BGnqyqi1-I1w3knRG.mjs → md-manager-BGnqyqi1-hmuoZRep.mjs} +152 -152
  12. package/dist/{open-browser-pXGFLi7w.mjs → open-browser-B9QXUTKM.mjs} +1 -1
  13. package/dist/parse-worker.mjs +1 -1
  14. package/dist/preview-D4hBn5zd.mjs +1 -0
  15. package/dist/{preview-p0u3B2o7.mjs → preview-hbhV_wcx.mjs} +1 -1
  16. package/dist/public/assets/{ActivityModeContent-C24KgNKp.js → ActivityModeContent-BSKSxQkW.js} +1 -1
  17. package/dist/public/assets/AddPropertiesButton-C3dmN-ll.js +2 -0
  18. package/dist/public/assets/{AgentDiffPane-Bvvhv_01.js → AgentDiffPane-DWY1J3oQ.js} +1 -1
  19. package/dist/public/assets/{AgentThreadClientBinder-DP_nmH_9.js → AgentThreadClientBinder-Cr9ETN3r.js} +1 -1
  20. package/dist/public/assets/{BugReportHistory-BqIVquYg.js → BugReportHistory-DDskcX7v.js} +1 -1
  21. package/dist/public/assets/{BugReportHistoryDialog-B-D82_t-.js → BugReportHistoryDialog-CvNcrBPU.js} +1 -1
  22. package/dist/public/assets/CodeMirrorPropInput-D7qjFBS1.js +3 -0
  23. package/dist/public/assets/{ConfigSharingInfoTooltip-BuYGzKLA.js → ConfigSharingInfoTooltip-nR8InNBq.js} +1 -1
  24. package/dist/public/assets/ConsentDialogBody-D5Rtg_0O.js +2 -0
  25. package/dist/public/assets/{DiffViewBoundary-adNbZiZy.js → DiffViewBoundary-PIidsEB0.js} +1 -1
  26. package/dist/public/assets/DocumentContext-C9S71wln.js +39 -0
  27. package/dist/public/assets/{EditorModeToggle-DVMmrqG-.js → EditorModeToggle-DYEsuS22.js} +1 -1
  28. package/dist/public/assets/{EnableSyncConfirmDialog-CZUuF3GZ.js → EnableSyncConfirmDialog-BMcjAXQG.js} +1 -1
  29. package/dist/public/assets/{ExcalidrawDocEditor-D8YC7vQl.js → ExcalidrawDocEditor-C3FFb5-7.js} +1 -1
  30. package/dist/public/assets/FeedbackForm-Cj96AEa6.js +1 -0
  31. package/dist/public/assets/{GraphPanel-Dbd1qPTJ.js → GraphPanel-DImIytId.js} +2 -2
  32. package/dist/public/assets/{ImageAttachments-DPB_G5ll.js → ImageAttachments-mGJuIugG.js} +1 -1
  33. package/dist/public/assets/{ImportSkillDialog-B4G78y97.js → ImportSkillDialog-CUfZ9NoH.js} +1 -1
  34. package/dist/public/assets/{LintConfigEditor-CEfuQorE.js → LintConfigEditor-Cy4ux0rD.js} +1 -1
  35. package/dist/public/assets/ManagedArtifactProperties-0jExcUJJ.js +1 -0
  36. package/dist/public/assets/{ManagedArtifactProperties-D2TrNZYC.js → ManagedArtifactProperties-D4h09k-o.js} +1 -1
  37. package/dist/public/assets/{McpConsentDialogBody-CBlhR4aV.js → McpConsentDialogBody-D2Q0gKrR.js} +1 -1
  38. package/dist/public/assets/{Mermaid-SmRHELBV.js → Mermaid-kh2E8eKv.js} +1 -1
  39. package/dist/public/assets/{MermaidDocEditor-BJ4e4Aej.js → MermaidDocEditor-hwnJqayq.js} +1 -1
  40. package/dist/public/assets/{PropertyDisplayRow-CAfIhsrn.js → PropertyDisplayRow-BSqCQQy1.js} +1 -1
  41. package/dist/public/assets/{RegisteredAgentIcon-DO05Zsgw.js → RegisteredAgentIcon-F77Pc7UX.js} +1 -1
  42. package/dist/public/assets/{ReportBugDialogBody-BGk9OXk6.js → ReportBugDialogBody-BqrpJzQN.js} +2 -2
  43. package/dist/public/assets/{ReportBugMenuTrigger-DMJApmCu.js → ReportBugMenuTrigger-DVxOktVo.js} +2 -2
  44. package/dist/public/assets/{SchemaConfigEditor-B8EG5k1b.js → SchemaConfigEditor-Cx7OUpSv.js} +1 -1
  45. package/dist/public/assets/{SessionsHost-C2DGes3g.js → SessionsHost-C1UHXxRY.js} +2 -2
  46. package/dist/public/assets/{SettingsDialogBody-B24nHBps.js → SettingsDialogBody-C0Aa7J1R.js} +4 -4
  47. package/dist/public/assets/{ShareBranchSwitchDialog-Brk63ToM.js → ShareBranchSwitchDialog-CElKP5--.js} +1 -1
  48. package/dist/public/assets/{ShareReceiveDialog-DugUU6H-.js → ShareReceiveDialog-eUYbafbL.js} +1 -1
  49. package/dist/public/assets/{ShareReceiveMissDialog-BBXw8jYw.js → ShareReceiveMissDialog-B8LN6NsE.js} +1 -1
  50. package/dist/public/assets/{SkillCostValue-CPvt1R0K.js → SkillCostValue-CYiM4fwH.js} +1 -1
  51. package/dist/public/assets/{SkillEditBanner-BhGvQjS6.js → SkillEditBanner-BjpFp0Tk.js} +1 -1
  52. package/dist/public/assets/{SkillForkDialog-Dn8iYTBx.js → SkillForkDialog-Ck7P6_L6.js} +1 -1
  53. package/dist/public/assets/{SkillInstallMenu-CPWBzZvu.js → SkillInstallMenu-BMs-csgk.js} +2 -2
  54. package/dist/public/assets/{SkillOriginInline-KZ1bl1g3.js → SkillOriginInline-DypsP1oA.js} +1 -1
  55. package/dist/public/assets/{SkillToolbarControls-DbJvydAV.js → SkillToolbarControls-VU85I8r5.js} +1 -1
  56. package/dist/public/assets/{SlidesToolbarControls-DjbXp2gZ.js → SlidesToolbarControls-sZ8C08CO.js} +1 -1
  57. package/dist/public/assets/SourceEditor-DdrHMt6G.js +1 -0
  58. package/dist/public/assets/{TerminalPanel-BDiOHKAS.js → TerminalPanel-BZR5LPrA.js} +3 -3
  59. package/dist/public/assets/{TerminalStartingNotice-Dx7WuMrs.js → TerminalStartingNotice-BA6-yv9t.js} +1 -1
  60. package/dist/public/assets/{TerminalWindowApp-ChFXb2Qk.js → TerminalWindowApp-DufH5Hx_.js} +1 -1
  61. package/dist/public/assets/{TextDocEditor-DIaQTzqy.js → TextDocEditor-C_5JBwto.js} +1 -1
  62. package/dist/public/assets/ThreadView-PrKYwlvF.js +15 -0
  63. package/dist/public/assets/{TimelineDiffPane-DbydLd8H.js → TimelineDiffPane-CpWA2fXb.js} +1 -1
  64. package/dist/public/assets/{agent-diff-store-DmGK0F1i.js → agent-diff-store-DQQcfBXg.js} +1 -1
  65. package/dist/public/assets/auth-state-cache-C2VvxhnG.js +11 -0
  66. package/dist/public/assets/{bug-report-send-manager-CQk0wAIh.js → bug-report-send-manager-LuGwxlhw.js} +1 -1
  67. package/dist/public/assets/{checkbox-Crs_F_Np.js → checkbox-B-MvAL6W.js} +1 -1
  68. package/dist/public/assets/client-version-DL6f3Eze.js +1 -0
  69. package/dist/public/assets/{comment-chips-DQBo2lXi.js → comment-chips-DYOG7PYn.js} +1 -1
  70. package/dist/public/assets/{config-provider-DQrDvyOl.js → config-provider-CweylYd4.js} +3 -3
  71. package/dist/public/assets/css-color-to-hex-DSVb9_xg.js +1 -0
  72. package/dist/public/assets/{dist-BtM-eRCP.js → dist-CsoN3WVg.js} +1 -1
  73. package/dist/public/assets/{doc-hash-DuqGWmIR.js → doc-hash-CYZIWizw.js} +1 -1
  74. package/dist/public/assets/{doc-undo-manager-g8yw6SU1.js → doc-undo-manager-DzHL90Tw.js} +1 -1
  75. package/dist/public/assets/{documents-events-BWGH8AZm.js → documents-events-KOPTKKT9.js} +1 -1
  76. package/dist/public/assets/{file-tree-adapter-7t_Jxx39.js → file-tree-adapter-alngEyLn.js} +1 -1
  77. package/dist/public/assets/{file-tree-utils-BHK-SRnW.js → file-tree-utils-DQCU70Xb.js} +1 -1
  78. package/dist/public/assets/{folder-config-api-CIm0Cp93.js → folder-config-api-Bmb3KTlK.js} +1 -1
  79. package/dist/public/assets/i18n-DQjeEGli.js +1 -0
  80. package/dist/public/assets/index-IWrOVhV7.js +2205 -0
  81. package/dist/public/assets/{lint-config-client-DIc0G5Tz.js → lint-config-client-BJWh3vFX.js} +1 -1
  82. package/dist/public/assets/{markdownlint-rule-browser-94SDLcDi.js → markdownlint-rule-browser-BcHGYaC4.js} +1 -1
  83. package/dist/public/assets/messages-AXHLeGQt.js +1 -0
  84. package/dist/public/assets/messages-Bad1epmU.js +1 -0
  85. package/dist/public/assets/messages-BarCysIY.js +1 -0
  86. package/dist/public/assets/messages-Bf_tPcA9.js +1 -0
  87. package/dist/public/assets/messages-C4ywd-AF.js +1 -0
  88. package/dist/public/assets/messages-CIKZ4K8H.js +1 -0
  89. package/dist/public/assets/messages-CcZON2A3.js +1 -0
  90. package/dist/public/assets/messages-D5EuoIQc.js +1 -0
  91. package/dist/public/assets/messages-DkfioSU7.js +1 -0
  92. package/dist/public/assets/messages-R0HmfG3t.js +1 -0
  93. package/dist/public/assets/messages-dRWrlTPQ.js +1 -0
  94. package/dist/public/assets/messages-nzLvVaOP.js +1 -0
  95. package/dist/public/assets/navigation-targets-BVaXLrtB.js +1 -0
  96. package/dist/public/assets/{page-list-cache-zDjyCETV.js → page-list-cache-PSfXHiyQ.js} +1 -1
  97. package/dist/public/assets/{pending-receive-nav-store-C9zJmNSR.js → pending-receive-nav-store-DbY1aNlr.js} +1 -1
  98. package/dist/public/assets/progress-BB9J1mc2.js +9 -0
  99. package/dist/public/assets/{project-paths-960ETy7U.js → project-paths-DcbAbull.js} +1 -1
  100. package/dist/public/assets/{prop-types-BjIgGE16.js → prop-types-D1hAwTEd.js} +1 -1
  101. package/dist/public/assets/{receive-store-CBcJJRFA.js → receive-store-vreBP997.js} +1 -1
  102. package/dist/public/assets/{selection-context-Di2DO5CK.js → selection-context-BUc5Gs38.js} +1 -1
  103. package/dist/public/assets/{skill-scope-B6bHwenU.js → skill-scope-CZxo9iBd.js} +1 -1
  104. package/dist/public/assets/{skills-api-C3qsIon9.js → skills-api-DaUEGHn_.js} +1 -1
  105. package/dist/public/assets/{src-CdbVi-VE.js → src-of-xw_jT.js} +1 -1
  106. package/dist/public/assets/{startup-marks-swtqxoLx.js → startup-marks-DLeZtJmj.js} +1 -1
  107. package/dist/public/assets/{tag-pill-input-ByBaUmhF.js → tag-pill-input-CsHHTYuv.js} +1 -1
  108. package/dist/public/assets/{target-navigation-intent-CuO6wtCU.js → target-navigation-intent-CObszLg5.js} +1 -1
  109. package/dist/public/assets/{telemetry-impl-Djs-mvzd.js → telemetry-impl-BU_i-Mtv.js} +1 -1
  110. package/dist/public/assets/{telemetry-startup-Dgnan_Me.js → telemetry-startup-rdebVRWm.js} +1 -1
  111. package/dist/public/assets/terminal-bAqZh2Fr.js +1 -0
  112. package/dist/public/assets/{terminal-cli-display-D_AH6BSk.js → terminal-cli-display-COu7VoeL.js} +1 -1
  113. package/dist/public/assets/{terminal-command-events-B4M-54dr.js → terminal-command-events-p5EcIMFY.js} +1 -1
  114. package/dist/public/assets/{terminal-launch-events-DeMYbk3B.js → terminal-launch-events-BPa_Ncv3.js} +1 -1
  115. package/dist/public/assets/{terminal-telemetry-aJ6-t74p.js → terminal-telemetry-7Ys2mZMy.js} +1 -1
  116. package/dist/public/assets/{typing-burst-detector-B_Zi_fiw.js → typing-burst-detector-Dh6-rH64.js} +4 -4
  117. package/dist/public/assets/{uninstall-Bk0idZ9m.js → uninstall-Dal1w59t.js} +1 -1
  118. package/dist/public/assets/{use-activity-panel-DZtlbBNZ.js → use-activity-panel-BlKd2ENk.js} +1 -1
  119. package/dist/public/assets/{use-collab-url-DfAQJAka.js → use-collab-url-D3dqt-_X.js} +1 -1
  120. package/dist/public/assets/{use-conflicts-DGntG5Qo.js → use-conflicts-DBPLs_iO.js} +1 -1
  121. package/dist/public/assets/{use-live-xterm-theme-BWa5evl7.js → use-live-xterm-theme-BS0Xjqrp.js} +1 -1
  122. package/dist/public/assets/{use-open-skill-Btm827GX.js → use-open-skill-D0zgZv3_.js} +1 -1
  123. package/dist/public/assets/{use-settings-route-hhiF55zj.js → use-settings-route-Clcs-HGF.js} +1 -1
  124. package/dist/public/assets/{use-skill-origin--Dz7Uy4F.js → use-skill-origin-c2hL8l8D.js} +1 -1
  125. package/dist/public/assets/{use-skills-CSN-LidQ.js → use-skills-FyqcYg2s.js} +1 -1
  126. package/dist/public/assets/{use-terminal-enabled-DYzYENzH.js → use-terminal-enabled-DmKkIaRB.js} +1 -1
  127. package/dist/public/assets/{use-timeline-entry-diff-DoJF0gl-.js → use-timeline-entry-diff-RnNhfLnG.js} +4 -4
  128. package/dist/public/assets/{use-workspace-I562aeNt.js → use-workspace-CSw7_QPW.js} +1 -1
  129. package/dist/public/index.html +72 -72
  130. package/dist/public/uninstall.html +7 -7
  131. package/dist/{registry-probes-CyYWP5PX.mjs → registry-probes-2XdUdFfg.mjs} +2 -2
  132. package/dist/{removal-file-path-CSbwRHIY.mjs → removal-file-path-D4_z7MqE.mjs} +1 -1
  133. package/dist/{repair-launch-json-DHvM8qP-.mjs → repair-launch-json-ix1eXaJU.mjs} +1 -1
  134. package/dist/{repair-mcp-configs-B3XsJHOt.mjs → repair-mcp-configs-DQTYCPj-.mjs} +1 -1
  135. package/dist/src-CLGfVFCQ.mjs +1 -0
  136. package/dist/src-DFjOk0D0.mjs +11 -0
  137. package/dist/{start-DNA-HoqI.mjs → start-DBgivHvN.mjs} +3 -3
  138. package/dist/start-aC_vE1aA.mjs +1 -0
  139. package/package.json +5 -5
  140. package/dist/constants-BQ-TCrpS.mjs +0 -1
  141. package/dist/init-CYDXbzN5.mjs +0 -1
  142. package/dist/loader-DzTfiUgx.mjs +0 -1
  143. package/dist/preview-C48WV1Iy.mjs +0 -1
  144. package/dist/public/assets/AddPropertiesButton-DF3g4Kwr.js +0 -2
  145. package/dist/public/assets/CodeMirrorPropInput-BHl8UEr3.js +0 -3
  146. package/dist/public/assets/ConsentDialogBody-7wMM91sQ.js +0 -2
  147. package/dist/public/assets/DocumentContext-JLD5PPhL.js +0 -38
  148. package/dist/public/assets/FeedbackForm-cj3i2d-x.js +0 -1
  149. package/dist/public/assets/ManagedArtifactProperties-CTxT6-h3.js +0 -1
  150. package/dist/public/assets/SourceEditor-DVaSbjqJ.js +0 -1
  151. package/dist/public/assets/ThreadView-MF8W-BXC.js +0 -15
  152. package/dist/public/assets/auth-state-cache-BmIS4nys.js +0 -11
  153. package/dist/public/assets/client-version-C0XGnOwf.js +0 -1
  154. package/dist/public/assets/css-color-to-hex-DkX_3Tbi.js +0 -1
  155. package/dist/public/assets/i18n-BihTB2it.js +0 -1
  156. package/dist/public/assets/index-CobxLX9l.js +0 -2205
  157. package/dist/public/assets/messages-BVmWopHv.js +0 -1
  158. package/dist/public/assets/messages-BYF487KC.js +0 -1
  159. package/dist/public/assets/messages-Ba7hA1-i.js +0 -1
  160. package/dist/public/assets/messages-BmxqLTvu.js +0 -1
  161. package/dist/public/assets/messages-BnFyqYis.js +0 -1
  162. package/dist/public/assets/messages-C16gG4yf.js +0 -1
  163. package/dist/public/assets/messages-CqtZbqmN.js +0 -1
  164. package/dist/public/assets/messages-CuDjMaKo.js +0 -1
  165. package/dist/public/assets/messages-DDK4Na9D.js +0 -1
  166. package/dist/public/assets/messages-DJy4WeZ_.js +0 -1
  167. package/dist/public/assets/messages-DUp4BhrU.js +0 -1
  168. package/dist/public/assets/messages-x9A7h6fC.js +0 -1
  169. package/dist/public/assets/navigation-targets-CQLH4NW1.js +0 -1
  170. package/dist/public/assets/progress-BNikaukM.js +0 -9
  171. package/dist/public/assets/terminal-WtPHPKhg.js +0 -1
  172. package/dist/src-BIA89bBb.mjs +0 -1
  173. package/dist/src-Bc3P8FGr.mjs +0 -11
  174. package/dist/start-DnhcnDi1.mjs +0 -1
  175. /package/dist/public/assets/{ThemePicker-aWkT89kw.js → ThemePicker-DOsOc-E2.js} +0 -0
  176. /package/dist/public/assets/{eye-BtMXolFK.js → eye-BQkq4vEg.js} +0 -0
  177. /package/dist/public/assets/{folder-open-dlosmFj2.js → folder-open-BaM9INLo.js} +0 -0
  178. /package/dist/public/assets/{hash-d98LeeWB.js → hash-Dglwn3ro.js} +0 -0
  179. /package/dist/public/assets/{info-CilGMBpP.js → info-SOxUaHbk.js} +0 -0
  180. /package/dist/public/assets/{list-plus-BmoxCvSM.js → list-plus-DOCJc_At.js} +0 -0
  181. /package/dist/public/assets/{maximize-2-DaY3HCwc.js → maximize-2-DxqkwIPV.js} +0 -0
  182. /package/dist/public/assets/{minus-cd1ERTPg.js → minus-1czdqXPL.js} +0 -0
  183. /package/dist/public/assets/{miss-dialog-store-CNJRdTPE.js → miss-dialog-store-Bk8_yXT9.js} +0 -0
  184. /package/dist/public/assets/{package-DCh1ji9x.js → package-CHRzycGO.js} +0 -0
  185. /package/dist/public/assets/{panel-right-open-Dx0ZAduW.js → panel-right-open-8vaSAKL0.js} +0 -0
  186. /package/dist/public/assets/{paperclip-p1q4JO6T.js → paperclip-DgND7swz.js} +0 -0
  187. /package/dist/public/assets/{refresh-cw-DgTHxKWl.js → refresh-cw-CgRx7hPO.js} +0 -0
  188. /package/dist/public/assets/{spinner-Bp2_BYkl.js → spinner-84U_t9u0.js} +0 -0
  189. /package/dist/public/assets/{square-pen-zPTA2xeB.js → square-pen-DACj4fA5.js} +0 -0
@@ -1,8 +1,8 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{Dn as n,In as r,Kn as i,Mt as a,Nt as o,ci as s,di as c,fr as l,gn as u,i as d,jn as f,sn as p,tr as m,vn as h,vr as g,z as _}from"./DocumentContext-JLD5PPhL.js";import{t as v}from"./react-f2sANaYj.js";import{n as y,r as b}from"./dist-Nvb76hAm.js";import{r as x,t as S}from"./useQuery-ZeEDLtxh.js";import{t as C}from"./compiler-runtime-BfE3aGVn.js";import{t as w}from"./utils-CPqDy6Hr.js";import{t as T}from"./button-Cym3gapE.js";import{i as E,n as D,t as O}from"./tooltip-DttaCTqz.js";import{n as k,r as A,t as j}from"./collapsible-DYySK8La.js";import{n as M,t as N}from"./toggle-group-C2_37kV5.js";import{Ct as P,Dt as F,Ki as I,R as L,Rs as R,Yo as z,Zs as B,ir as V,ln as H,rr as U,un as W,ws as G}from"./dist-BtM-eRCP.js";import{n as K}from"./dist-CJhtNlOm2.js";import{s as q}from"./use-settings-route-hhiF55zj.js";import{t as J}from"./dist-Cr4-nBVI.js";import{f as Y,v as ee}from"./documents-events-BWGH8AZm.js";import{t as te}from"./note-window-mode-CsmLTxU_.js";import{t as X}from"./createLucideIcon-B6ULg5PN.js";import{t as ne}from"./chevron-right-C-g4JuT4.js";import{n as re,t as ie}from"./lint-plugin-meta-zA9wHIBR.js";import{n as ae}from"./upload-DGQJhdiQ.js";import{i as oe,r as se}from"./prop-types-BjIgGE16.js";import{Et as ce,Ot as le,S as ue,X as de,jt as fe,rt as pe}from"./CodeMirrorPropInput-BHl8UEr3.js";import{t as me}from"./info-CilGMBpP.js";import{t as he}from"./refresh-cw-DgTHxKWl.js";import{t as ge}from"./triangle-alert-1CPkv6zu.js";import{t as _e}from"./wrench-BFRDKz2A.js";import{l as ve,s as ye}from"./doc-hash-DuqGWmIR.js";import{a as be,i as xe,s as Se}from"./startup-marks-swtqxoLx.js";import{C as Ce,D as we}from"./config-provider-DQrDvyOl.js";import{J as Te,K as Ee,Mt as De,Nt as Oe,X as ke,wt as Ae}from"./dist-DlsJ2gMP.js";import{t as je}from"./badge-C0BAzyS2.js";import{a as Me,c as Ne,i as Pe,n as Fe,r as Ie,s as Le,t as Re}from"./panel-Dne_do-w.js";import{t as ze}from"./skeleton-BIcSE0wv.js";import{a as Be,c as Ve,d as He}from"./lint-config-client-DIc0G5Tz.js";var Ue=X(`chevrons-down-up`,[[`path`,{d:`m7 20 5-5 5 5`,key:`13a0gw`}],[`path`,{d:`m7 4 5 5 5-5`,key:`1kwcof`}]]),We=56,Ge=2,Ke=150,qe=2e3;function Je(e,t,n){return e.top+e.height/2-(n+t)/2}function Ye(e,t){let n=Math.max(0,t.scrollHeight-t.clientHeight);return Math.max(0,Math.min(e,n))}function Xe(e){let{docName:t,container:i,measureTarget:a,placement:o,intent:s,grade:c,landedMode:l,transition:u,onOutcome:d,onDiscardQueuedTarget:p,toolbarOffset:m=We,driftThresholdPx:h=Ge,quietMs:g=Ke,abandonAfterMs:_=qe}=e,v=e.contentColumn??i.firstElementChild,y=n(t,`landing`),b=f(t,{yieldsToNavigation:s===`toggle`,supersede:()=>P(`superseded`)}),x=i.style.overflowAnchor;i.style.overflowAnchor=`none`,u&&be(`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:Ye(o===`center`?Je(e,i.clientHeight,m):e.top-m,i)},k=()=>{let e=O();if(e===null)return{measurable:!1,moved:!1};C=e;let t=Math.abs(i.scrollTop-e)>h;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()}be(`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()}be(`ok/landing/abandoned`,{grade:c,target:e,delta:t}),d?.({status:`abandoned`,delta:t})},P=e=>{S||(S=!0,j(),e===`mode-flip`&&p?.(),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 Ze(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 Qe(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(Qe).join(``):``}function $e(e,t){let{frontmatter:n,body:r}=B(e),i=n===``?0:n.split(`
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{$n as n,Bt as r,Cn as i,Pn as a,R as o,Rn as s,Tn as c,Tr as l,Un as u,cr as d,gi as f,i as p,mn as m,yi as h,yr as g,zt as _}from"./DocumentContext-C9S71wln.js";import{t as v}from"./react-f2sANaYj.js";import{n as y,r as b}from"./dist-Nvb76hAm.js";import{r as x,t as S}from"./useQuery-ZeEDLtxh.js";import{t as C}from"./compiler-runtime-BfE3aGVn.js";import{t as w}from"./utils-CPqDy6Hr.js";import{t as T}from"./button-Cym3gapE.js";import{i as E,n as D,t as O}from"./tooltip-DttaCTqz.js";import{n as k,r as A,t as j}from"./collapsible-DYySK8La.js";import{n as M,t as N}from"./toggle-group-C2_37kV5.js";import{Ct as P,Dt as F,Ki as I,Qs as L,R,Ts as z,Xo as B,ir as V,ln as H,rr as U,un as W,zs as G}from"./dist-CsoN3WVg.js";import{n as K}from"./dist-CJhtNlOm2.js";import{s as q}from"./use-settings-route-Clcs-HGF.js";import{t as J}from"./dist-Cr4-nBVI.js";import{f as Y,v as ee}from"./documents-events-KOPTKKT9.js";import{t as te}from"./note-window-mode-CsmLTxU_.js";import{t as X}from"./createLucideIcon-B6ULg5PN.js";import{t as ne}from"./chevron-right-C-g4JuT4.js";import{n as re,t as ie}from"./lint-plugin-meta-zA9wHIBR.js";import{n as ae}from"./upload-DGQJhdiQ.js";import{i as oe,r as se}from"./prop-types-D1hAwTEd.js";import{Et as ce,Ot as le,S as ue,X as de,jt as fe,rt as pe}from"./CodeMirrorPropInput-D7qjFBS1.js";import{t as me}from"./info-SOxUaHbk.js";import{t as he}from"./refresh-cw-CgRx7hPO.js";import{t as ge}from"./triangle-alert-1CPkv6zu.js";import{t as _e}from"./wrench-BFRDKz2A.js";import{l as ve,s as ye}from"./doc-hash-CYZIWizw.js";import{a as be,i as xe,s as Se}from"./startup-marks-DLeZtJmj.js";import{C as Ce,D as we}from"./config-provider-CweylYd4.js";import{J as Te,K as Ee,Mt as De,Nt as Oe,X as ke,wt as Ae}from"./dist-DlsJ2gMP.js";import{t as je}from"./badge-C0BAzyS2.js";import{a as Me,c as Ne,i as Pe,n as Fe,r as Ie,s as Le,t as Re}from"./panel-Dne_do-w.js";import{t as ze}from"./skeleton-BIcSE0wv.js";import{a as Be,c as Ve,d as He}from"./lint-config-client-BJWh3vFX.js";var Ue=X(`chevrons-down-up`,[[`path`,{d:`m7 20 5-5 5 5`,key:`13a0gw`}],[`path`,{d:`m7 4 5 5 5-5`,key:`1kwcof`}]]),We=56,Ge=2,Ke=150,qe=2e3;function Je(e,t,n){return e.top+e.height/2-(n+t)/2}function Ye(e,t){let n=Math.max(0,t.scrollHeight-t.clientHeight);return Math.max(0,Math.min(e,n))}function Xe(e){let{docName:t,container:n,measureTarget:r,placement:i,intent:o,grade:c,landedMode:l,transition:d,onOutcome:f,onDiscardQueuedTarget:p,toolbarOffset:m=We,driftThresholdPx:h=Ge,quietMs:g=Ke,abandonAfterMs:_=qe}=e,v=e.contentColumn??n.firstElementChild,y=a(t,`landing`),b=s(t,{yieldsToNavigation:o===`toggle`,supersede:()=>P(`superseded`)}),x=n.style.overflowAnchor;n.style.overflowAnchor=`none`,d&&be(`ok/mode-switch/transition`,{from:d.from,to:d.to,grade:c});let S=!1,C=null,w,T,E=0,D,O=()=>{let e=r();return e===null?null:Ye(i===`center`?Je(e,n.clientHeight,m):e.top-m,n)},k=()=>{let e=O();if(e===null)return{measurable:!1,moved:!1};C=e;let t=Math.abs(n.scrollTop-e)>h;return t&&(n.scrollTop=e),{measurable:!0,moved:t}},A=()=>n.scrollTop-(O()??C??n.scrollTop),j=()=>{w&&clearTimeout(w),T&&clearTimeout(T),E&&cancelAnimationFrame(E),D?.disconnect(),n.removeEventListener(`wheel`,I),n.removeEventListener(`touchstart`,I),n.removeEventListener(`contentvisibilityautostatechange`,L,!0),n.style.overflowAnchor=x,y.release(),b.release()},M=()=>{if(S)return;S=!0;let e;try{k(),e=A(),C!==null&&u({docName:t,container:n,targetScrollTop:n.scrollTop,mode:l})}finally{j()}be(`ok/landing/land`,{grade:c,delta:e}),f?.({status:`landed`,delta:e})},N=()=>{if(S)return;S=!0;let e=C??n.scrollTop,t;try{t=A()}finally{j()}be(`ok/landing/abandoned`,{grade:c,target:e,delta:t}),f?.({status:`abandoned`,delta:t})},P=e=>{S||(S=!0,j(),e===`mode-flip`&&p?.(),f?.({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(),n.addEventListener(`contentvisibilityautostatechange`,L,!0),n.addEventListener(`wheel`,I,{passive:!0}),n.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 Ze(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 Qe(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(Qe).join(``):``}function $e(e,t){let{frontmatter:n,body:r}=L(e),i=n===``?0:n.split(`
2
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:Ze(e.type),text:Qe(e)})),fmLineCount:i}}catch{return performance.mark(`ok/block-spans/parse-failed`),{blocks:[],fmLineCount:i}}}function et(e,t){let{blocks:n,fmLineCount:r}=$e(e,t);return{spans:n.map(e=>({start:e.start,end:e.end})),fmLineCount:r}}function tt(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 nt(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===e.childCount?0:e.childCount}function rt(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 it(e){let t=[0];for(let n=0;n<e.length;n++)e[n]===`
3
- `&&t.push(n+1);return t}function at(e,t,n){return t<=1?0:t-1>=e.length?n:e[t-1]??n}function ot(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 st(e,t,n){return Math.max(t,Math.min(e,n))}function ct(e,t){let n=e=>e.replace(/\s+/g,` `).trim();return n(e)===n(t)}function lt(e,t){return t.inRange?t.tripwireOk?ct(e.content,t.text)?`exact`:e.kind===t.kind?`same-type-ordinal`:`ordinal`:`ordinal`:`clamped`}function ut(e){let t=null,n=null;function r(r){return n!==null&&t===r?n:(n={blocks:$e(r,e).blocks,lineStarts:it(r)},t=r,n)}return{captureFromWysiwyg(e,t,n){if(e.childCount===0)return null;let r=st(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:Ze(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=st(t,0,e.length),s=tt(i,ot(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=at(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=nt(n)===i.length,c=i[st(e.blockIndex,0,i.length-1)],l=at(a,c.start,t.length),u=Math.min(at(a,c.end+1,t.length),t.length),d=lt(e,{inRange:o,tripwireOk:s,kind:c.kind,text:c.text}),f=l;return d===`exact`&&e.selectionInBlock!==void 0&&(f=st(l+e.selectionInBlock,l,u)),{blockStart:l,blockEnd:u,point:f,confidence:d}},resolveInWysiwyg(e,{source:t,doc:n}){let i=nt(n);if(i===0)return null;let{blocks:a}=r(t),o=e.blockIndex>=0&&e.blockIndex<i,s=i===a.length,c=st(e.blockIndex,0,i-1),l=rt(n,c,c+1);if(l===null)return null;let u=n.child(c),d=lt(e,{inRange:o,tripwireOk:s,kind:Ze(u.type.name),text:u.textContent});return{blockStart:l.from,blockEnd:l.to,point:l.from,confidence:d}}}}var dt=De.define(),ft=De.define(),pt=Ee.mark({class:a}),mt=Oe.define({create(){return Ee.none},update(e,t){let n=e.map(t.changes);for(let e of t.effects)e.is(dt)?n=Ee.set([pt.range(e.value.from,e.value.to)]):e.is(ft)&&(n=Ee.none);return n},provide:e=>Te.decorations.from(e)}),ht=new WeakMap,gt=ke.define(e=>({destroy(){let t=ht.get(e);t!==void 0&&(clearTimeout(t),ht.delete(e))}}));function _t(e,t,n,r){let i=o(e.state.doc.length,t,n,r);if(!i)return;e.dispatch({effects:dt.of(i)});let a=ht.get(e);a!==void 0&&clearTimeout(a);let s=setTimeout(()=>{ht.delete(e),e.dispatch({effects:ft.of(null)})},L);ht.set(e,s)}function vt(){return[mt,gt]}var yt=3e4;function bt(){let e=new Map,t=e=>e?Date.now()-e.rememberedAt>yt?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 xt=bt(),St=bt(),Ct=xt.remember,wt=xt.peek,Tt=xt.consume,Et=xt.clear;xt.clearForTest;var Dt=St.remember,Ot=St.peek,kt=St.consume,At=St.clear;St.clearForTest;function jt(e,t,n){return{start:we(e,t),end:we(e,n)}}function Mt(e,t){let n=Ce(e.start,t),r=Ce(e.end,t);return n===null||r===null||r.index<=n.index?null:n.index}var Nt=`open-knowledge:view-in-source`,Pt=null;function Ft(){return Pt??=ut(de()),Pt}function It(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?jt(n,o.blockStart,o.blockEnd):void 0}}function Lt(e){let{editor:t,docName:n,ytext:r}=e,i=ce(t);if(!i)return;let a=i.state.selection.from,o=It(i.state.doc,a,r,Ft(),`jump`);o&&Ct(n,o),window.dispatchEvent(new CustomEvent(Nt,{detail:{docName:n}}))}function Rt(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?jt(n,o.blockStart,o.blockEnd):void 0}}function zt(e,t){let{source:n,pmDoc:r,ydoc:i,resolver:a}=t;if(e.pin){let t=Mt(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 Bt(e,t){let{source:n,pmDoc:r,ydoc:i,resolver:a}=t;if(e.pin){let t=Mt(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 Vt(e,t){try{return e.coordsAtPos(t)}catch{return null}}function Ht(e,t,n){let r=Math.max(0,Math.min(n,e.state.doc.length)),i=t.getBoundingClientRect().top,a=Vt(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 Ut(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 Wt(e,t,n){if(e.isDestroyed)return null;let r=Ut(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 Gt(){return typeof document>`u`?null:p()}function Kt(e,t){let n=t.getBoundingClientRect(),r=n.left+n.width/2,i=ue();for(let t of[i+1,i+12,i+40]){let i=e.posAtCoords({left:r,top:n.top+t});if(i)return i.pos}return null}function qt(e,t){let n=t.getBoundingClientRect(),r=n.left+n.width/2,i=ue();for(let t of[i+1,i+12,i+40]){let i=e.posAtCoords({x:r,y:n.top+t});if(i!==null)return i}return null}function Jt(e){let{from:t,to:n,docName:r,ytext:i}=e;t===`wysiwyg`&&n===`source`?Yt(r,i):t===`source`&&n===`wysiwyg`&&Xt(r,i)}function Yt(e,t){let n=wt(e);if(n&&n.kind!==`selection-offset`)return;let r=i(e);if(!r)return;let a=ce(r);if(!a)return;let o=Gt();if(!o)return;let s=Kt(a,o);if(s===null)return;let c=It(a.state.doc,s,t,Ft());c&&Ct(e,c)}function Xt(e,t){let n=u(e);if(!n)return;let r=Gt();if(!r)return;let a=qt(n,r);if(a===null)return;let o=i(e),s=o?ce(o)?.state.doc:void 0,c=Rt(t.toString(),a,t,Ft(),s);c&&Dt(e,c)}function Zt(e){let{view:t,docName:n,navigation:r,ydoc:a,transition:o}=e,s=i(n),c=s?ce(s)?.state.doc:void 0;if(!c)return null;let l=Bt(r,{source:t.state.doc.toString(),pmDoc:c,ydoc:a,resolver:Ft()});if(!l)return null;let u=Gt();if(!u)return null;let d=l,p=r.intent===`jump`,m=p?d.point:d.blockStart;t.dispatch({effects:Te.scrollIntoView(m,{y:`start`})});let h=!1,g=null,_=f(n,{yieldsToNavigation:!p,supersede:()=>{h=!0,_.release()}}),v=e=>{if(!h){if(Vt(t,m)===null&&e<8){requestAnimationFrame(()=>v(e+1));return}try{p&&(t.dispatch({selection:Ae.cursor(m)}),t.focus())}finally{_.release()}g=Xe({docName:n,container:u,contentColumn:t.contentDOM,measureTarget:()=>Ht(t,u,m),placement:p?`center`:`top`,intent:p?`jump`:`toggle`,grade:d.confidence,landedMode:`source`,transition:o,toolbarOffset:ue(),onOutcome:p?e=>{e.status===`landed`&&_t(t,d.blockStart,d.blockEnd,d.confidence)}:void 0,onDiscardQueuedTarget:()=>Et(n)})}};return v(0),{cancel:e=>{h=!0,_.release(),g?.cancel(e)}}}function Qt(e){let{editor:t,docName:n,navigation:r,ydoc:i,transition:a}=e,o=ce(t);if(!o)return null;let s=zt(r,{source:i.getText(`source`).toString(),pmDoc:o.state.doc,ydoc:i,resolver:Ft()});if(!s)return null;let c=Gt();if(!c)return null;let l=s;return Xe({docName:n,container:c,contentColumn:o.dom,measureTarget:()=>Wt(o,c,l.point),placement:`top`,intent:`toggle`,grade:l.confidence,landedMode:`wysiwyg`,transition:a,toolbarOffset:ue(),onDiscardQueuedTarget:()=>At(n)})}var $t={words:0,chars:0,tokens:0},en=/[ -〿぀-ゟ゠-ヿ㐀-䶿一-鿿豈-﫿＀-￯฀-๿ក-៿]/,tn=/[\p{L}\p{N}]/u,nn=new Set([`text`,`inlineCode`,`code`,`tag`]),rn=new Set([`html`,`definition`,`footnoteDefinition`,`yaml`,`toml`,`image`,`imageReference`,`mdxFlowExpression`,`mdxTextExpression`,`mdxjsEsm`,`rawMdxFallback`,`rawMdxFallbackMdast`]),an=new Set([`paragraph`,`heading`,`blockquote`,`list`,`listItem`,`thematicBreak`,`table`,`tableRow`,`tableCell`,`mdxJsxFlowElement`,`commentBlock`]);function on(e,t){if(!e)return;let n=e.type;if(!rn.has(n)){if(nn.has(n)){e.value&&(t.push(e.value),n===`code`&&t.push(`
3
+ `&&t.push(n+1);return t}function at(e,t,n){return t<=1?0:t-1>=e.length?n:e[t-1]??n}function ot(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 st(e,t,n){return Math.max(t,Math.min(e,n))}function ct(e,t){let n=e=>e.replace(/\s+/g,` `).trim();return n(e)===n(t)}function lt(e,t){return t.inRange?t.tripwireOk?ct(e.content,t.text)?`exact`:e.kind===t.kind?`same-type-ordinal`:`ordinal`:`ordinal`:`clamped`}function ut(e){let t=null,n=null;function r(r){return n!==null&&t===r?n:(n={blocks:$e(r,e).blocks,lineStarts:it(r)},t=r,n)}return{captureFromWysiwyg(e,t,n){if(e.childCount===0)return null;let r=st(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:Ze(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=st(t,0,e.length),s=tt(i,ot(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=at(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=nt(n)===i.length,c=i[st(e.blockIndex,0,i.length-1)],l=at(a,c.start,t.length),u=Math.min(at(a,c.end+1,t.length),t.length),d=lt(e,{inRange:o,tripwireOk:s,kind:c.kind,text:c.text}),f=l;return d===`exact`&&e.selectionInBlock!==void 0&&(f=st(l+e.selectionInBlock,l,u)),{blockStart:l,blockEnd:u,point:f,confidence:d}},resolveInWysiwyg(e,{source:t,doc:n}){let i=nt(n);if(i===0)return null;let{blocks:a}=r(t),o=e.blockIndex>=0&&e.blockIndex<i,s=i===a.length,c=st(e.blockIndex,0,i-1),l=rt(n,c,c+1);if(l===null)return null;let u=n.child(c),d=lt(e,{inRange:o,tripwireOk:s,kind:Ze(u.type.name),text:u.textContent});return{blockStart:l.from,blockEnd:l.to,point:l.from,confidence:d}}}}var dt=De.define(),ft=De.define(),pt=Ee.mark({class:_}),mt=Oe.define({create(){return Ee.none},update(e,t){let n=e.map(t.changes);for(let e of t.effects)e.is(dt)?n=Ee.set([pt.range(e.value.from,e.value.to)]):e.is(ft)&&(n=Ee.none);return n},provide:e=>Te.decorations.from(e)}),ht=new WeakMap,gt=ke.define(e=>({destroy(){let t=ht.get(e);t!==void 0&&(clearTimeout(t),ht.delete(e))}}));function _t(e,t,n,i){let a=r(e.state.doc.length,t,n,i);if(!a)return;e.dispatch({effects:dt.of(a)});let o=ht.get(e);o!==void 0&&clearTimeout(o);let s=setTimeout(()=>{ht.delete(e),e.dispatch({effects:ft.of(null)})},R);ht.set(e,s)}function vt(){return[mt,gt]}var yt=3e4;function bt(){let e=new Map,t=e=>e?Date.now()-e.rememberedAt>yt?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 xt=bt(),St=bt(),Ct=xt.remember,wt=xt.peek,Tt=xt.consume,Et=xt.clear;xt.clearForTest;var Dt=St.remember,Ot=St.peek,kt=St.consume,At=St.clear;St.clearForTest;function jt(e,t,n){return{start:we(e,t),end:we(e,n)}}function Mt(e,t){let n=Ce(e.start,t),r=Ce(e.end,t);return n===null||r===null||r.index<=n.index?null:n.index}var Nt=`open-knowledge:view-in-source`,Pt=null;function Ft(){return Pt??=ut(de()),Pt}function It(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?jt(n,o.blockStart,o.blockEnd):void 0}}function Lt(e){let{editor:t,docName:n,ytext:r}=e,i=ce(t);if(!i)return;let a=i.state.selection.from,o=It(i.state.doc,a,r,Ft(),`jump`);o&&Ct(n,o),window.dispatchEvent(new CustomEvent(Nt,{detail:{docName:n}}))}function Rt(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?jt(n,o.blockStart,o.blockEnd):void 0}}function zt(e,t){let{source:n,pmDoc:r,ydoc:i,resolver:a}=t;if(e.pin){let t=Mt(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 Bt(e,t){let{source:n,pmDoc:r,ydoc:i,resolver:a}=t;if(e.pin){let t=Mt(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 Vt(e,t){try{return e.coordsAtPos(t)}catch{return null}}function Ht(e,t,n){let r=Math.max(0,Math.min(n,e.state.doc.length)),i=t.getBoundingClientRect().top,a=Vt(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 Ut(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 Wt(e,t,n){if(e.isDestroyed)return null;let r=Ut(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 Gt(){return typeof document>`u`?null:m()}function Kt(e,t){let n=t.getBoundingClientRect(),r=n.left+n.width/2,i=ue();for(let t of[i+1,i+12,i+40]){let i=e.posAtCoords({left:r,top:n.top+t});if(i)return i.pos}return null}function qt(e,t){let n=t.getBoundingClientRect(),r=n.left+n.width/2,i=ue();for(let t of[i+1,i+12,i+40]){let i=e.posAtCoords({x:r,y:n.top+t});if(i!==null)return i}return null}function Jt(e){let{from:t,to:n,docName:r,ytext:i}=e;t===`wysiwyg`&&n===`source`?Yt(r,i):t===`source`&&n===`wysiwyg`&&Xt(r,i)}function Yt(e,t){let r=wt(e);if(r&&r.kind!==`selection-offset`)return;let i=n(e);if(!i)return;let a=ce(i);if(!a)return;let o=Gt();if(!o)return;let s=Kt(a,o);if(s===null)return;let c=It(a.state.doc,s,t,Ft());c&&Ct(e,c)}function Xt(e,t){let r=i(e);if(!r)return;let a=Gt();if(!a)return;let o=qt(r,a);if(o===null)return;let s=n(e),c=s?ce(s)?.state.doc:void 0,l=Rt(t.toString(),o,t,Ft(),c);l&&Dt(e,l)}function Zt(e){let{view:t,docName:r,navigation:i,ydoc:a,transition:o}=e,c=n(r),l=c?ce(c)?.state.doc:void 0;if(!l)return null;let u=Bt(i,{source:t.state.doc.toString(),pmDoc:l,ydoc:a,resolver:Ft()});if(!u)return null;let d=Gt();if(!d)return null;let f=u,p=i.intent===`jump`,m=p?f.point:f.blockStart;t.dispatch({effects:Te.scrollIntoView(m,{y:`start`})});let h=!1,g=null,_=s(r,{yieldsToNavigation:!p,supersede:()=>{h=!0,_.release()}}),v=e=>{if(!h){if(Vt(t,m)===null&&e<8){requestAnimationFrame(()=>v(e+1));return}try{p&&(t.dispatch({selection:Ae.cursor(m)}),t.focus())}finally{_.release()}g=Xe({docName:r,container:d,contentColumn:t.contentDOM,measureTarget:()=>Ht(t,d,m),placement:p?`center`:`top`,intent:p?`jump`:`toggle`,grade:f.confidence,landedMode:`source`,transition:o,toolbarOffset:ue(),onOutcome:p?e=>{e.status===`landed`&&_t(t,f.blockStart,f.blockEnd,f.confidence)}:void 0,onDiscardQueuedTarget:()=>Et(r)})}};return v(0),{cancel:e=>{h=!0,_.release(),g?.cancel(e)}}}function Qt(e){let{editor:t,docName:n,navigation:r,ydoc:i,transition:a}=e,o=ce(t);if(!o)return null;let s=zt(r,{source:i.getText(`source`).toString(),pmDoc:o.state.doc,ydoc:i,resolver:Ft()});if(!s)return null;let c=Gt();if(!c)return null;let l=s;return Xe({docName:n,container:c,contentColumn:o.dom,measureTarget:()=>Wt(o,c,l.point),placement:`top`,intent:`toggle`,grade:l.confidence,landedMode:`wysiwyg`,transition:a,toolbarOffset:ue(),onDiscardQueuedTarget:()=>At(n)})}var $t={words:0,chars:0,tokens:0},en=/[ -〿぀-ゟ゠-ヿ㐀-䶿一-鿿豈-﫿＀-￯฀-๿ក-៿]/,tn=/[\p{L}\p{N}]/u,nn=new Set([`text`,`inlineCode`,`code`,`tag`]),rn=new Set([`html`,`definition`,`footnoteDefinition`,`yaml`,`toml`,`image`,`imageReference`,`mdxFlowExpression`,`mdxTextExpression`,`mdxjsEsm`,`rawMdxFallback`,`rawMdxFallbackMdast`]),an=new Set([`paragraph`,`heading`,`blockquote`,`list`,`listItem`,`thematicBreak`,`table`,`tableRow`,`tableCell`,`mdxJsxFlowElement`,`commentBlock`]);function on(e,t){if(!e)return;let n=e.type;if(!rn.has(n)){if(nn.has(n)){e.value&&(t.push(e.value),n===`code`&&t.push(`
4
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)on(n,t);if(an.has(n)&&t.length>0){let e=t[t.length-1];e&&!e.endsWith(`
5
5
  `)&&t.push(`
6
- `)}}}}function sn(e){try{let t=de().parseToMdast(e),n=[];return on(t,n),n.join(``).trim()}catch(t){return console.warn(`[document-stats] mdast parse failed, falling back to raw text`,t),e.trim()}}function cn(e){if(!e)return 0;let t=0;for(let n of e.split(/\s+/))tn.test(n)&&t++;return t}function ln(e){let t=globalThis.Intl.Segmenter;if(!t)return cn(e);let n=new t(void 0,{granularity:`word`}),r=0;for(let t of n.segment(e))t.isWordLike&&r++;return r}function un(e){let t=en.test(e)?1.5:4;return Math.ceil(e.length/t)}function dn(e){return e?{words:en.test(e)?ln(e):cn(e),chars:e.length,tokens:un(e)}:{words:0,chars:0,tokens:0}}function fn(e){if(!e)return{words:0,chars:0,tokens:0};let{body:t}=B(e);return t.trim()?dn(sn(t)):{words:0,chars:0,tokens:0}}function pn(e){return dn(e)}function mn(e,{isMarkdown:t}){let n=e.trim();return n?dn(t?sn(e):n):$t}function hn(e,t){return e!==null&&z(e)?`source`:t}var gn=new Map,_n=new Set,vn=(e,t)=>`${t}:${e}`;function yn(){for(let e of _n)e()}function bn(e,t,n){let r=vn(e,t);if(n===null){gn.delete(r)&&yn();return}let i=gn.get(r);i&&i.words===n.words&&i.chars===n.chars&&i.tokens===n.tokens||(gn.set(r,n),yn())}function xn(e,t){return e===null?null:gn.get(vn(e,t))??null}function Sn(e){return _n.add(e),()=>{_n.delete(e)}}function Cn(e){let{from:t,to:n,empty:r}=e.state.selection;if(r)return null;let i=e.state.doc.textBetween(t,n,`
6
+ `)}}}}function sn(e){try{let t=de().parseToMdast(e),n=[];return on(t,n),n.join(``).trim()}catch(t){return console.warn(`[document-stats] mdast parse failed, falling back to raw text`,t),e.trim()}}function cn(e){if(!e)return 0;let t=0;for(let n of e.split(/\s+/))tn.test(n)&&t++;return t}function ln(e){let t=globalThis.Intl.Segmenter;if(!t)return cn(e);let n=new t(void 0,{granularity:`word`}),r=0;for(let t of n.segment(e))t.isWordLike&&r++;return r}function un(e){let t=en.test(e)?1.5:4;return Math.ceil(e.length/t)}function dn(e){return e?{words:en.test(e)?ln(e):cn(e),chars:e.length,tokens:un(e)}:{words:0,chars:0,tokens:0}}function fn(e){if(!e)return{words:0,chars:0,tokens:0};let{body:t}=L(e);return t.trim()?dn(sn(t)):{words:0,chars:0,tokens:0}}function pn(e){return dn(e)}function mn(e,{isMarkdown:t}){let n=e.trim();return n?dn(t?sn(e):n):$t}function hn(e,t){return e!==null&&B(e)?`source`:t}var gn=new Map,_n=new Set,vn=(e,t)=>`${t}:${e}`;function yn(){for(let e of _n)e()}function bn(e,t,n){let r=vn(e,t);if(n===null){gn.delete(r)&&yn();return}let i=gn.get(r);i&&i.words===n.words&&i.chars===n.chars&&i.tokens===n.tokens||(gn.set(r,n),yn())}function xn(e,t){return e===null?null:gn.get(vn(e,t))??null}function Sn(e){return _n.add(e),()=>{_n.delete(e)}}function Cn(e){let{from:t,to:n,empty:r}=e.state.selection;if(r)return null;let i=e.state.doc.textBetween(t,n,`
7
7
  `,` `);return i.trim()?mn(i,{isMarkdown:!1}):null}function wn(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()?mn(n,{isMarkdown:!0}):null}var Z=e(v(),1),Q=C(),$=t();function Tn(e){let t=(0,Q.c)(14),{scope:n,onScopeChange:r,projectLabel:i}=e,{_:a}=b(),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)(M,{value:`doc`,className:`flex-1`,"data-testid":`panel-scope-doc`,children:(0,$.jsx)(y,{id:`UpCz01`})}),t[4]=c):c=t[4];let l;t[5]===i?l=t[6]:(l=i??(0,$.jsx)(y,{id:`ZWyHmq`}),t[5]=i,t[6]=l);let u;t[7]===l?u=t[8]:(u=(0,$.jsx)(M,{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)(N,{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 En(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`?J._({id:`W5qdI_`,values:{shown:n}}):J._({id:`bpMVIA`,values:{shown:n}}):t.targetKind===`file`?t.role===`image`?J._({id:`iSWh95`,values:{shown:n}}):J._({id:`fOzzSV`,values:{shown:n}}):J._({id:`XBBZnv`,values:{shown:n}})}var Dn=`audit-superseded`;async function On(e={kind:`project`},t){return An(e,W,!1,t)}async function kn(e={kind:`project`},t){return An(e,H,!0,t)}async function An(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?Dn:(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 jn(e,t){let n=!1,r=!1,i=!1,a=[],o,s=null,c=()=>({findings:a,...o===void 0?{}:{brokenLinkSuppression:o}}),l=()=>{if(r){i=!0;return}r=!0,s=new AbortController,t({status:`loading`,...c()}),On({kind:`doc`,docName:e},s.signal).then(e=>{if(!(n||s?.signal.aborted===!0)){if(e===null){t({status:`failed`,...c()});return}if(e===`audit-superseded`){i=!0;return}i||(a=e.files.flatMap(e=>e.diagnostics).filter(e=>e.source===`links`),o=e.brokenLinkSuppression,t({status:`loaded`,...c()}))}}).finally(()=>{n||(r=!1,s=null,i&&(i=!1,l()))})};l();let u=ee(e=>{(e.includes(`backlinks`)||Y(e))&&l()}),d=Ve(l);return()=>{n=!0,s?.abort(),u(),d()}}function Mn(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:[]}}),jn(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 Nn(e){return Math.min(50,Math.max(1,Math.ceil(e/10)))}function Pn(e,t){return e===t||e%Nn(t)===0}var Fn=[250,500,1e3,2e3,4e3];function In(e){return e.status===503&&e.problemType===`urn:ok:error:too-many-agent-sessions`}async function Ln(e,t){let n=await t.fixItem(e);for(let r of Fn){if(n.ok||!In(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 Rn(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 Ln(i,e);if(a.ok||n.push({item:i,detail:a.errorDetail}),!e.shouldContinue())return{failures:n,cancelled:!0};let o=r+1;Pn(o,t)&&e.onProgress(o,t)}return{failures:n,cancelled:!1}}function zn(e){return new Promise(t=>setTimeout(t,e))}var Bn=null,Vn=!1,Hn=new Set,Un=new Set;function Wn(e){Bn=e;for(let e of Hn)e()}function Gn(e){return Hn.add(e),()=>{Hn.delete(e)}}function Kn(){return Bn}function qn(){return(0,Z.useSyncExternalStore)(Gn,Kn,Kn)}function Jn(e){return Un.add(e),()=>{Un.delete(e)}}function Yn(){Vn=!0}function Xn(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];K.error(J._({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){K.info(J._({id:`H1TmTu`}));return}e.length===0&&K.success(J._({id:`SWX1O7`,values:{total:n}}))}async function Zn({items:e,fixItem:t,sleep:n=zn}){if(Bn!==null||e.length===0)return;let r=e.length;Vn=!1,Wn({done:0,total:r});let i=[],a=!1,o=!1;try{let o=await Rn({items:e,fixItem:t,sleep:n,onProgress:e=>Wn({done:e,total:r}),shouldContinue:()=>!Vn});i=o.failures,a=o.cancelled}catch(e){console.warn(`[lint] fix-all: sweep threw`,e),o=!0}finally{Wn(null)}try{o?K.error(J._({id:`vwV-kH`})):Xn(i,a,r)}finally{for(let e of Un)e()}}var Qn={errorCount:0,warningCount:0},$n=new Map,er=new Set,tr=new Map;function nr(){let e=new Map;for(let[t,n]of $n){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})}tr=e;for(let e of er)e()}var rr=U;function ir(e){return er.add(e),()=>{er.delete(e)}}function ar(){return tr}function or(e){$n.clear();for(let t of e)$n.set(ye(t.file),rr(t.diagnostics));nr()}function sr(e){$n.clear();for(let t of e)$n.set(ye(t.file),{lint:t.lint,links:t.links});nr()}function cr(e,t){$n.set(e,rr(t)),nr()}function lr(e,t,n){let r=$n.get(e)??{lint:Qn,links:Qn},i=r[t];i.errorCount===n.errorCount&&i.warningCount===n.warningCount||($n.set(e,{...r,[t]:n}),nr())}var ur=`open-knowledge:lint-nav`;function dr(e,t){return e.range.start.line-t.range.start.line||e.range.start.character-t.range.start.character}function fr(e,t){return{docName:e,line:t.range.start.line+1,column:t.range.start.character+1,source:t.source,...t.frontmatterScope===void 0?{}:{frontmatterScope:t.frontmatterScope}}}function pr(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 mr={document:l,file:g,image:le,unresolvable:l};function hr(e){return e.linkTarget!==void 0&&pr(e)===`document`}function gr(e){let t=(0,Q.c)(40),{diagnostic:n,instanceCount:r}=e,{_:i}=b(),a=n.severity===`error`?ae:ge,o=n.range.start.line+1,s;t[0]===n?s=t[1]:(s=pr(n),t[0]=n,t[1]=s);let c=s,l=c===null?null:mr[c],u=r!==void 0&&r>1,d=n.severity===`error`?`text-destructive`:`text-amber-500`,f;t[2]===d?f=t[3]:(f=w(`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=En(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)(je,{variant:`gray`,"data-testid":`problems-instance-count`,className:`h-4 px-1 font-sans text-[10px] leading-none`,children:(0,$.jsx)(y,{id:`iZCZmF`,values:{instanceCount:r}})}),(0,$.jsx)(ne,{"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 _;t[14]!==p||t[15]!==h||t[16]!==g?(_=(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]=_):_=t[17];let v=c??void 0,x=l!==null&&`gap-0.5`,S;t[18]===x?S=t[19]:(S=w(`h-4 shrink-0 px-1 font-sans text-[10px] uppercase leading-none`,x),t[18]=x,t[19]=S);let C;t[20]===l?C=t[21]:(C=l===null?null:(0,$.jsx)(l,{"aria-hidden":`true`,className:`size-2.5`}),t[20]=l,t[21]=C);let T;t[22]!==n.source||t[23]!==S||t[24]!==C||t[25]!==v?(T=(0,$.jsxs)(je,{variant:`gray`,"data-testid":`problems-source-tag`,"data-target-kind":v,className:S,children:[C,n.source]}),t[22]=n.source,t[23]=S,t[24]=C,t[25]=v,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]!==_?(k=(0,$.jsxs)($.Fragment,{children:[_,O]}),t[37]=O,t[38]=_,t[39]=k):k=t[39],k}function _r(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 vr(e){let t=(0,Q.c)(63),{group:n,onNavigate:r,navTitle:i,renderActions:a}=e,{_:o}=b(),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=En(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)(gr,{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=j,t[34]!==s||t[35]!==n.instances.length?(f=(0,$.jsx)(A,{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)(gr,{diagnostic:s,instanceCount:n.instances.length})}),t[34]=s,t[35]=n.instances.length,t[36]=f):f=t[36],c=k,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=En(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})]},yr(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 v;t[51]!==c||t[52]!==d||t[53]!==_?(v=(0,$.jsx)(c,{className:d,children:_}),t[51]=c,t[52]=d,t[53]=_,t[54]=v):v=t[54];let y;t[55]!==l||t[56]!==f||t[57]!==v?(y=(0,$.jsxs)(l,{children:[f,v]}),t[55]=l,t[56]=f,t[57]=v,t[58]=y):y=t[58];let x;return t[59]!==y||t[60]!==p||t[61]!==m?(x=(0,$.jsx)(`li`,{className:p,"data-testid":m,children:y}),t[59]=y,t[60]=p,t[61]=m,t[62]=x):x=t[62],x}function yr(e){return`${e.source}/${e.code}-${e.range.start.line}-${e.range.start.character}-${e.message}`}function br(e){return e.reduce((e,t)=>e+ +((t.fixes?.length??0)>0),0)}function xr(e){let t=(0,Q.c)(11),{target:n,creating:r,disabled:i,onCreate:a}=e,{_:o}=b(),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)(fe,{"aria-hidden":`true`,className:`size-3`}),t[3]=c):c=t[3];let l;t[4]===r?l=t[5]:(l=r?(0,$.jsx)(y,{id:`E9bKSA`}):(0,$.jsx)(y,{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)(T,{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 Sr(e){let t=(0,Q.c)(8),{tip:n,testId:r,children:i}=e,a;t[0]===i?a=t[1]:(a=(0,$.jsx)(E,{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)(D,{"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)(O,{children:[a,o]}),t[5]=a,t[6]=o,t[7]=s):s=t[7],s}function Cr(e){let t=(0,Q.c)(21),{count:n,problemCount:r,aiAvailable:i,disabled:a,onClick:o,children:s}=e,{_:c}=b(),l;t[0]!==i||t[1]!==n||t[2]!==r?(l=n>0?(0,$.jsx)(y,{id:`vjwsDi`,values:{count:n}}):r===0?(0,$.jsx)(y,{id:`gAhHu7`}):i?(0,$.jsx)(y,{id:`zA9zRL`}):(0,$.jsx)(y,{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)(_e,{"aria-hidden":`true`,className:`size-3`}),t[9]=d):d=t[9];let f;t[10]!==s||t[11]!==n?(f=s??(0,$.jsx)(y,{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)(T,{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)(Sr,{testId:`problems-auto-fix-tip`,tip:l,children:p}),t[18]=l,t[19]=p,t[20]=m):m=t[20],m}function wr(e){let t=(0,Q.c)(12),{count:n,disabled:r,onClick:i}=e,a;t[0]===n?a=t[1]:(a=(0,$.jsx)(y,{id:`mgDKWS`,values:{count:n}}),t[0]=n,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsx)(m,{"aria-hidden":`true`,className:`size-3`}),t[2]=o):o=t[2];let s;t[3]===n?s=t[4]:(s=(0,$.jsx)(y,{id:`gyHDWC`,values:{count:n}}),t[3]=n,t[4]=s);let c;t[5]!==r||t[6]!==i||t[7]!==s?(c=(0,$.jsxs)(T,{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,s]}),t[5]=r,t[6]=i,t[7]=s,t[8]=c):c=t[8];let l;return t[9]!==a||t[10]!==c?(l=(0,$.jsx)(Sr,{testId:`problems-fix-with-ai-tip`,tip:a,children:c}),t[9]=a,t[10]=c,t[11]=l):l=t[11],l}function Tr(e){let t=(0,Q.c)(61),{docName:n,diagnostics:r,linkFindingsStatus:i,brokenLinkSuppression:a,onFix:o,onAutoFix:l,onAskAi:u,onFixWithAi:d}=e,f=i===void 0?`loaded`:i,{_:p}=b(),h=(0,Z.useRef)(null),g=(0,Z.useId)(),[v,x]=(0,Z.useState)(`doc`),S;t[0]===n?S=t[1]:(S=z(n),t[0]=n,t[1]=S);let C=!S,{data:w}=He(),k=w===null?null:w.effective.enabled?ie.filter(e=>w.effective.plugins[e.id].enabled):[],A=k!==null&&k.length===0,j=a!==void 0,M=(v===`project`||C)&&k!==null&&k.length>0,N;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(N={status:`idle`},t[2]=N):N=t[2];let[P,F]=(0,Z.useState)(N),I=qn(),L=se(),[R,B]=(0,Z.useState)(null),V=(0,Z.useRef)(!0),H,U;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(H=()=>(V.current=!0,()=>{V.current=!1}),U=[],t[3]=H,t[4]=U):(H=t[3],U=t[4]),(0,Z.useEffect)(H,U);let W=(0,Z.useRef)(Nr),G=(0,Z.useRef)(Mr),J;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(J={status:`idle`},t[5]=J):J=t[5];let te=(0,Z.useRef)(J),X;t[6]===P?X=t[7]:(X=()=>{P.status!==`loading`&&(te.current=P)},t[6]=P,t[7]=X),(0,Z.useEffect)(X);let ne=(0,Z.useRef)(0),re=[...r].sort(dr),ae=br(re),oe;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(oe=async function(){ne.current+=1;let e=ne.current,t=te.current;F({status:`loading`});let n=await On();if(n===`audit-superseded`){ne.current===e&&V.current&&F(t.status===`idle`?{status:`failed`}:t);return}n!==null&&or(n.files),V.current&&F(n===null?{status:`failed`}:{status:`loaded`,result:n})},t[8]=oe):oe=t[8];let ce=oe,le;t[9]!==p||t[10]!==P.status||t[11]!==R||t[12]!==L?(le=async function(e){let t=e.linkTarget;if(!(t===void 0||R!==null||L===null)){B(t);try{await _({initialDir:``,suggestedName:t},{addPage:L.addPage})}catch(e){let t=e;K.error(t instanceof Error?t.message:p({id:`tfi40B`})),V.current&&B(null);return}K.success(p({id:`EWCJFu`,values:{target:t}})),V.current&&B(null),V.current&&P.status===`loaded`&&await ce()}},t[9]=p,t[10]=P.status,t[11]=R,t[12]=L,t[13]=le):le=t[13];let ue=le,de=P.status===`loaded`?P.result.files.filter(Ar):[],fe=function(){Zn({items:de,fixItem:kr})},pe;t[14]===P.status?pe=t[15]:(pe=function(e){x(e),e===`project`&&P.status===`idle`&&ce()},t[14]=P.status,t[15]=pe);let me=pe,he;t[16]===P.status?he=t[17]:(he=()=>{W.current=()=>{P.status===`idle`||P.status===`failed`||ce()}},t[16]=P.status,t[17]=he),(0,Z.useEffect)(he);let ge,be;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(ge=()=>Ve(()=>W.current()),be=[],t[18]=ge,t[19]=be):(ge=t[18],be=t[19]),(0,Z.useEffect)(ge,be);let xe,Se;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(xe=()=>ee(e=>{Y(e)&&W.current()}),Se=[],t[20]=xe,t[21]=Se):(xe=t[20],Se=t[21]),(0,Z.useEffect)(xe,Se);let Ce;t[22]===me?Ce=t[23]:(Ce=(e,t)=>{e===`problems`&&(s(`problems`),t.scope!==void 0&&me(t.scope),t.focus===`panel`&&h.current?.focus({preventScroll:!0}))},t[22]=me,t[23]=Ce);let we=(0,Z.useEffectEvent)(Ce),Te;t[24]===we?Te=t[25]:(Te=()=>{let e=s(`problems`);return e!==null&&we(`problems`,e),c(we)},t[24]=we,t[25]=Te);let Ee;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=[],t[26]=Ee):Ee=t[26],(0,Z.useEffect)(Te,Ee);let De;t[27]===P.status?De=t[28]:(De=()=>{G.current=()=>{P.status===`idle`||P.status===`failed`||ce().catch(e=>{console.warn(`[lint] post-sweep re-audit failed`,e),V.current&&F({status:`failed`})})}},t[27]=P.status,t[28]=De),(0,Z.useEffect)(De);let Oe,ke;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=()=>Jn(()=>G.current()),ke=[],t[29]=Oe,t[30]=ke):(Oe=t[29],ke=t[30]),(0,Z.useEffect)(Oe,ke);let Ae;t[31]===n?Ae=t[32]:(Ae=function(e){let t=fr(n,e);Ct(n,{kind:`lint`,detail:t}),window.dispatchEvent(new CustomEvent(ur,{detail:t}))},t[31]=n,t[32]=Ae);let je=Ae,ze;t[33]!==n||t[34]!==je?(ze=function(e,t){let r=ye(e);if(r===n){je(t);return}Ct(r,{kind:`lint`,detail:fr(r,t)}),window.location.hash=ve(r)},t[33]=n,t[34]=je,t[35]=ze):ze=t[35];let Be=ze,Ue;t[36]!==p||t[37]!==ue||t[38]!==R||t[39]!==u||t[40]!==o||t[41]!==L?(Ue=function(e){let t=o!==void 0&&(e.fixes?.length??0)>0,n=hr(e)&&L!==null;if(!t&&!n&&u===void 0)return null;let r=`${e.source}/${e.code}`;return(0,$.jsxs)($.Fragment,{children:[n?(0,$.jsx)(xr,{target:e.linkTarget??``,creating:R===e.linkTarget,disabled:R!==null,onCreate:()=>void ue(e)}):null,t?(0,$.jsxs)(T,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,onClick:()=>o?.(e),"aria-label":p({id:`fZj9em`,values:{flatId:r}}),"data-testid":`problems-fix`,children:[(0,$.jsx)(_e,{"aria-hidden":`true`,className:`size-3`}),(0,$.jsx)(y,{id:`c4fVUV`})]}):null,u===void 0?null:(0,$.jsxs)(T,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,onClick:()=>u(e),"aria-label":p({id:`hh4mVC`,values:{flatId:r}}),"data-testid":`problems-ask-ai`,children:[(0,$.jsx)(m,{"aria-hidden":`true`,className:`size-3`}),(0,$.jsx)(y,{id:`xWEvuo`})]})]})},t[36]=p,t[37]=ue,t[38]=R,t[39]=u,t[40]=o,t[41]=L,t[42]=Ue):Ue=t[42];let We=Ue,Ge=Re,Ke;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(Ke=(0,$.jsx)(y,{id:`OXdGnd`}),t[43]=Ke):Ke=t[43];let qe;t[44]===g?qe=t[45]:(qe=(0,$.jsx)(Ne,{id:g,children:Ke}),t[44]=g,t[45]=qe);let Je=M&&(0,$.jsxs)(O,{children:[(0,$.jsx)(E,{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)(y,{id:`yxF19Y`,values:{0:k.length}})}),(0,$.jsx)(D,{"data-testid":`problems-active-plugins-tooltip`,children:(0,$.jsx)(y,{id:`ws5o1F`,values:{0:k.map(Or).join(`, `)}})})]}),Ye;t[46]!==qe||t[47]!==Je?(Ye=(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[qe,Je]}),t[46]=qe,t[47]=Je,t[48]=Ye):Ye=t[48];let Xe=v===`doc`&&re.length>0&&(0,$.jsx)(Ie,{children:re.length}),Ze;t[49]!==Ye||t[50]!==Xe?(Ze=(0,$.jsxs)(Le,{children:[Ye,Xe]}),t[49]=Ye,t[50]=Xe,t[51]=Ze):Ze=t[51];let Qe;t[52]!==me||t[53]!==v?(Qe=(0,$.jsx)(Tn,{scope:v,onScopeChange:me}),t[52]=me,t[53]=v,t[54]=Qe):Qe=t[54];let $e=v===`doc`?(0,$.jsxs)(Fe,{className:`px-2 py-2`,children:[f===`idle`||f===`loading`?(0,$.jsx)(Pe,{className:`px-2 pb-2`,role:`status`,"aria-live":`polite`,"data-testid":`problems-links-loading`,children:(0,$.jsx)(y,{id:`W9NSe0`})}):f===`failed`?(0,$.jsx)(Me,{className:`px-2 pb-2`,role:`status`,"data-testid":`problems-links-failed`,children:re.length>0||j?(0,$.jsx)(y,{id:`IoHQYP`}):(0,$.jsx)(y,{id:`gpbKxw`})}):null,j&&(0,$.jsx)(Rr,{suppression:a}),re.length===0?f===`loaded`?C?A?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Pe,{className:`px-2`,"data-testid":`problems-no-plugins`,children:j?(0,$.jsx)(y,{id:`mI1KPS`}):(0,$.jsx)(y,{id:`Hngy37`})}),(0,$.jsx)(`div`,{className:`px-2 pt-2`,children:(0,$.jsx)(T,{variant:`outline`,size:`sm`,onClick:q,"data-testid":`problems-enable-plugins`,children:(0,$.jsx)(y,{id:`rnX-1S`})})})]}):j?null:(0,$.jsx)(Pe,{className:`px-2`,children:(0,$.jsx)(y,{id:`ZI8uvA`})}):(0,$.jsx)(Pe,{className:`px-2`,"data-testid":`problems-markdown-not-applicable`,children:(0,$.jsx)(y,{id:`Kdvukk`})}):null:(0,$.jsxs)($.Fragment,{children:[l!==void 0||d!==void 0?(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-1 px-2 pb-1`,children:[l!==void 0&&(0,$.jsx)(Cr,{count:ae,problemCount:re.length,aiAvailable:d!==void 0,disabled:ae===0,onClick:l}),d!==void 0&&(0,$.jsx)(wr,{count:re.length,disabled:!1,onClick:()=>d(`doc`)})]}):null,(0,$.jsx)(`ul`,{"aria-label":p({id:`OXdGnd`}),className:`flex flex-col gap-0.5`,children:_r(re).map(e=>(0,$.jsx)(vr,{group:e,onNavigate:je,navTitle:e=>p({id:`vbMHjo`,values:{0:e.range.start.line+1}}),renderActions:We},e.key))})]})]}):(0,$.jsx)(Pr,{audit:P,onRefresh:()=>void ce(),onNavigate:Be,fixableCount:de.reduce(Dr,0),problemCount:P.status===`loaded`?P.result.files.reduce(Er,0):0,fixing:I,onAutoFix:fe,onCancelFix:Yn,onFixWithAi:d===void 0||P.status!==`loaded`?void 0:()=>d(`project`),onCreateTarget:L===null?void 0:e=>void ue(e),creatingTarget:R}),et;return t[55]!==Ge||t[56]!==g||t[57]!==Ze||t[58]!==Qe||t[59]!==$e?(et=(0,$.jsxs)(Ge,{ref:h,tabIndex:-1,"aria-labelledby":g,"data-testid":`problems-panel`,children:[Ze,Qe,$e]}),t[55]=Ge,t[56]=g,t[57]=Ze,t[58]=Qe,t[59]=$e,t[60]=et):et=t[60],et}function Er(e,t){return e+t.diagnostics.length}function Dr(e,t){return e+br(t.diagnostics)}function Or(e){return e.label}function kr(e){return Be(ye(e.file))}function Ar(e){return e.diagnostics.some(jr)}function jr(e){return(e.fixes?.length??0)>0}function Mr(){}function Nr(){}function Pr(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}=b(),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,[_,v]=(0,Z.useState)(Lr),x;t[3]!==_||t[4]!==g?(x=g.length>0&&g.every(e=>_.has(e.file)),t[3]=_,t[4]=g,t[5]=x):x=t[5];let S=x,C;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(C=function(e,t){v(n=>{let r=new Set(n);return t?r.add(e):r.delete(e),r})},t[6]=C):C=t[6];let w=C,k;t[7]!==S||t[8]!==g?(k=function(){v(S?new Set:new Set(g.map(Ir)))},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)(y,{id:`DsDwR-`,values:{0:n.result.errorCount}}),` · `,(0,$.jsx)(y,{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)(O,{children:[(0,$.jsx)(E,{asChild:!0,children:(0,$.jsx)(T,{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)(Ue,{"aria-hidden":`true`,className:`size-3.5`}):(0,$.jsx)(re,{"aria-hidden":`true`,className:`size-3.5`})})}),(0,$.jsx)(D,{"data-testid":`problems-audit-expand-toggle-tooltip`,children:S?(0,$.jsx)(y,{id:`I4LGsH`}):(0,$.jsx)(y,{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)(he,{"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)(E,{asChild:!0,children:(0,$.jsx)(T,{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)(D,{"data-testid":`problems-audit-refresh-tooltip`,children:(0,$.jsx)(y,{id:`I7y_vn`})}),t[27]=R):R=t[27];let z;t[28]===L?z=t[29]:(z=(0,$.jsxs)(O,{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)(O,{children:[(0,$.jsx)(E,{asChild:!0,children:(0,$.jsx)(T,{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)(y,{id:`ygCKqB`})})}),(0,$.jsx)(D,{"data-testid":`problems-cancel-fix-tooltip`,children:(0,$.jsx)(y,{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)(y,{id:`S9t1PI`,values:{0:s.done,1:s.total}}),t[43]=s,t[44]=K);let q;t[45]!==a||t[46]!==c||t[47]!==o||t[48]!==W||t[49]!==G||t[50]!==K?(q=(0,$.jsx)(Cr,{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]=q):q=t[51];let J;t[52]!==s||t[53]!==u||t[54]!==o?(J=u!==void 0&&o>0?(0,$.jsx)(wr,{count:o,disabled:s!==null,onClick:u}):null,t[52]=s,t[53]=u,t[54]=o,t[55]=J):J=t[55];let Y;t[56]!==H||t[57]!==U||t[58]!==q||t[59]!==J?(Y=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-1`,children:[H,U,q,J]}),t[56]=H,t[57]=U,t[58]=q,t[59]=J,t[60]=Y):Y=t[60];let ee;t[61]!==V||t[62]!==Y?(ee=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1 px-2 pb-1`,children:[V,Y]}),t[61]=V,t[62]=Y,t[63]=ee):ee=t[63];let te;t[64]!==p||t[65]!==m?(te=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(Fr)}),t[64]=p,t[65]=m,t[66]=te):te=t[66];let X;t[67]===n.status?X=t[68]:(X=n.status===`failed`&&(0,$.jsx)(Me,{className:`px-2 text-xs`,children:(0,$.jsx)(y,{id:`IFezUv`})}),t[67]=n.status,t[68]=X);let ne;t[69]!==n.result||t[70]!==n.status||t[71]!==f||t[72]!==_||t[73]!==d||t[74]!==i?(ne=n.status===`loaded`&&(0,$.jsx)(zr,{result:n.result,onNavigate:i,onCreateTarget:d,creatingTarget:f,expandedFiles:_,onToggleFile:w}),t[69]=n.result,t[70]=n.status,t[71]=f,t[72]=_,t[73]=d,t[74]=i,t[75]=ne):ne=t[75];let ie;return t[76]!==ee||t[77]!==te||t[78]!==X||t[79]!==ne?(ie=(0,$.jsxs)(Fe,{className:`px-2 py-2`,"data-testid":`problems-project-scope`,children:[ee,te,X,ne]}),t[76]=ee,t[77]=te,t[78]=X,t[79]=ne,t[80]=ie):ie=t[80],ie}function Fr(e){return(0,$.jsxs)(`div`,{className:`flex items-start gap-2.5 rounded px-2 py-1.5`,children:[(0,$.jsx)(ze,{className:`mt-0.5 size-3.5 shrink-0 rounded`}),(0,$.jsxs)(`div`,{className:`flex-1 space-y-1.5`,children:[(0,$.jsx)(ze,{className:`h-3 w-28`}),(0,$.jsx)(ze,{className:`h-3 w-40`})]})]},e)}function Ir(e){return e.file}function Lr(){return new Set}function Rr(e){let t=(0,Q.c)(6),{suppression:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(me,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0`}),t[0]=r):r=t[0];let i;t[1]===n.count?i=t[2]:(i=(0,$.jsx)(y,{id:`gi9c0-`,values:{0:n.count}}),t[1]=n.count,t[2]=i);let a;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(y,{id:`l91IVc`}),t[3]=a):a=t[3];let o;return t[4]===i?o=t[5]:(o=(0,$.jsxs)(`div`,{role:`note`,"aria-live":`polite`,"data-testid":`problems-broken-link-suppression`,className:`mx-2 mb-1 flex items-start gap-1.5 rounded-md border border-border/70 bg-muted/40 px-2 py-1.5 text-xs text-muted-foreground`,children:[r,(0,$.jsxs)(`span`,{className:`min-w-0`,children:[i,` `,a]})]}),t[4]=i,t[5]=o),o}function zr(e){let t=(0,Q.c)(18),{result:n,onNavigate:r,onCreateTarget:i,creatingTarget:a,expandedFiles:o,onToggleFile:s}=e,{_:c}=b(),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(Br)}),t[0]=c,t[1]=n.warnings,t[2]=l):l=t[2];let u;t[3]===n.brokenLinkSuppression?u=t[4]:(u=n.brokenLinkSuppression!==void 0&&(0,$.jsx)(Rr,{suppression:n.brokenLinkSuppression}),t[3]=n.brokenLinkSuppression,t[4]=u);let d;t[5]!==a||t[6]!==o||t[7]!==i||t[8]!==r||t[9]!==s||t[10]!==n.brokenLinkSuppression||t[11]!==n.fileCount||t[12]!==n.files?(d=n.files.length===0?n.brokenLinkSuppression===void 0?(0,$.jsx)(Pe,{className:`px-2`,children:(0,$.jsx)(y,{id:`k_Dqw1`,values:{0:n.fileCount}})}):null:n.files.map(e=>(0,$.jsx)(Vr,{file:e,onNavigate:r,onCreateTarget:i,creatingTarget:a,open:o.has(e.file),onOpenChange:t=>s(e.file,t)},e.file)),t[5]=a,t[6]=o,t[7]=i,t[8]=r,t[9]=s,t[10]=n.brokenLinkSuppression,t[11]=n.fileCount,t[12]=n.files,t[13]=d):d=t[13];let f;return t[14]!==l||t[15]!==u||t[16]!==d?(f=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[l,u,d]}),t[14]=l,t[15]=u,t[16]=d,t[17]=f):f=t[17],f}function Br(e,t){return(0,$.jsxs)(`li`,{className:`flex items-start gap-1.5 px-2 text-xs`,children:[(0,$.jsx)(ge,{"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 Vr(e){let t=(0,Q.c)(45),{file:n,onNavigate:r,onCreateTarget:i,creatingTarget:a,open:o,onOpenChange:s}=e,{_:c}=b(),l,u,d,f,p,m,h,g,_,v;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(dr);u=j,h=o,g=s,_=`problems-audit-group`;let y;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsx)(ne,{"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]=y):y=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),v=(0,$.jsxs)(A,{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:[y,b,(0,$.jsx)(je,{variant:`gray`,"data-testid":`problems-audit-file-count`,className:`shrink-0`,children:e.length})]}),l=k,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)(vr,{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=>!hr(e)||i===void 0?null:(0,$.jsx)(xr,{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=_r(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]=v}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],v=t[17];let y;t[30]!==d||t[31]!==f||t[32]!==p?(y=(0,$.jsx)(`ul`,{"aria-label":d,className:f,children:p}),t[30]=d,t[31]=f,t[32]=p,t[33]=y):y=t[33];let x;t[34]!==l||t[35]!==m||t[36]!==y?(x=(0,$.jsx)(l,{className:m,children:y}),t[34]=l,t[35]=m,t[36]=y,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]!==v?(S=(0,$.jsxs)(u,{open:h,onOpenChange:g,"data-testid":_,children:[v,x]}),t[38]=u,t[39]=x,t[40]=h,t[41]=g,t[42]=_,t[43]=v,t[44]=S):S=t[44],S}function Hr(e,t){return e.has(t)||R(t)}var Ur=null,Wr=[];function Gr(e){if(e===Ur)return Wr;let t=Kr(e);return Ur=e,Wr=t,t}function Kr(e){let t=[],n=new Map,r=V();for(let i=qr(e);i<=e.lines;i++){let a=e.line(i);if(r(a.text))continue;let o=I(a.text,n);o&&t.push({slug:o.slug,from:a.from})}return t}function qr(e){if(!Jr(e.line(1).text))return 1;for(let t=2;t<=e.lines;t++)if(Jr(e.line(t).text))return t+1;return 1}function Jr(e){return G.test(e.endsWith(`\r`)?e.slice(0,-1):e)}function Yr(e){let t=document.getElementById(e);return t?t.getBoundingClientRect().top:null}function Xr(e){let t=new Map;for(let n of Gr(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 Zr(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:a}=r,o=i===void 0?!1:i,[s,c]=(0,Z.useState)(void 0),l=(0,Z.useRef)(null),d;n[2]===a?d=n[3]:(d=()=>a?u(a):null,n[2]=a,n[3]=d);let f=(0,Z.useSyncExternalStore)(h,d,Qr),p,m;return n[4]!==o||n[5]!==e||n[6]!==f?(p=()=>{if(e.length===0||o&&!f){c(void 0);return}let t=function(){let t=o&&f?Xr(f):Yr,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))}c(i??r??e[0])},n=function(){l.current===null&&(l.current=requestAnimationFrame(()=>{l.current=null,t()}))};return document.addEventListener(`scroll`,n,{capture:!0,passive:!0}),t(),()=>{document.removeEventListener(`scroll`,n,{capture:!0}),l.current!==null&&(cancelAnimationFrame(l.current),l.current=null)}},m=[e,o,f],n[4]=o,n[5]=e,n[6]=f,n[7]=p,n[8]=m):(p=n[7],m=n[8]),(0,Z.useEffect)(p,m),s}function Qr(){return null}var $r=300;async function ei(e){let t=await fetch(`/api/page-headings?docName=${encodeURIComponent(e)}`),n;try{n=await t.json()}catch(e){throw new pe(J._({id:`qAQVSD`}),{cause:e,status:t.status})}if(!t.ok){let e=F.safeParse(n);throw e.success?Error(e.data.title):new pe(J._({id:`zlErBl`}),{status:t.status})}let r=P.safeParse(n);if(!r.success)throw new pe(J._({id:`XW18jo`}),{status:t.status});return r.data.headings??[]}var ti=32,ni=12,ri=6,ii=`open-knowledge:outline-nav`,ai=`ok-outline-nav`,oi=`ok-outline-nav-dispatch`,si=`ok-outline-nav-settled`;function ci(e){let t=(0,Q.c)(2),n;return t[0]===e?n=t[1]:(n=(0,$.jsx)(xe,{name:`outline-panel`,children:(0,$.jsx)(li,{...e})}),t[0]=e,t[1]=n),n}function li(e){let t=(0,Q.c)(65),{docName:n,isSourceMode:r,className:i}=e,a=i===void 0?``:i,{_:o}=b(),{pages:s,loading:c,error:l}=oe(),u=x(),{activeProvider:f,activeDocName:p}=d(),m;t[0]!==n||t[1]!==s?(m=Hr(s,n),t[0]=n,t[1]=s,t[2]=m):m=t[2];let h=m,g;t[3]!==n||t[4]!==u?(g=u.getQueryState([`page-headings`,n]),t[3]=n,t[4]=u,t[5]=g):g=t[5];let _=!c&&l===null&&!h&&g!==void 0,v,C;t[6]===n?(v=t[7],C=t[8]):(v=[`page-headings`,n],C=()=>ei(n),t[6]=n,t[7]=v,t[8]=C);let T=!c&&h,E;t[9]!==v||t[10]!==C||t[11]!==T?(E={queryKey:v,queryFn:C,enabled:T,staleTime:1/0},t[9]=v,t[10]=C,t[11]=T,t[12]=E):E=t[12];let{data:D,isLoading:O,error:k}=S(E),A;t[13]===D?A=t[14]:(A=D===void 0?[]:D,t[13]=D,t[14]=A);let j=A,M,N;t[15]!==n||t[16]!==_||t[17]!==u?(M=()=>{_&&u.resetQueries({queryKey:[`page-headings`,n]})},N=[_,n,u],t[15]=n,t[16]=_,t[17]=u,t[18]=M,t[19]=N):(M=t[18],N=t[19]),(0,Z.useEffect)(M,N);let P,F;t[20]!==p||t[21]!==f||t[22]!==n||t[23]!==u?(P=()=>{if(!f||p!==n)return;let e=f.document,t=null,r=()=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{t=null,u.invalidateQueries({queryKey:[`page-headings`,n]})},$r)};return e.on(`update`,r),()=>{e.off(`update`,r),t!==null&&clearTimeout(t)}},F=[f,p,n,u],t[20]=p,t[21]=f,t[22]=n,t[23]=u,t[24]=P,t[25]=F):(P=t[24],F=t[25]),(0,Z.useEffect)(P,F);let I=c||O,L;t[26]===j?L=t[27]:(L=j.map(ui),t[26]=j,t[27]=L);let R=L,z;t[28]!==n||t[29]!==r?(z={isSourceMode:r,docName:n},t[28]=n,t[29]=r,t[30]=z):z=t[30];let B=Zr(R,z),V,H,U,W,G,K,q;if(t[31]!==o||t[32]!==B||t[33]!==a||t[34]!==n||t[35]!==k||t[36]!==j||t[37]!==I||t[38]!==r||t[39]!==_){let e=B?j.findIndex(e=>e.slug===B):-1,i=function(t,i){let a={docName:n,index:t,slug:i,mode:r?`source`:`wysiwyg`};a.mode===`source`&&Ct(n,{kind:`outline`,detail:a}),Se(oi,{docName:n,index:t,mode:a.mode,outlineCount:j.length,headingLevel:j[t]?.level,activeIndex:e}),window.dispatchEvent(new CustomEvent(ii,{detail:a}))},s=((e>=0?j[e].level:1)-1)*ni+(ni-ri)/2,c=e*ti+(ti-ri)/2;H=Re,K=a;let l;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(Ne,{children:(0,$.jsx)(y,{id:`dD7NPy`})}),t[47]=l):l=t[47];let u;t[48]!==k||t[49]!==j.length||t[50]!==I||t[51]!==_?(u=!I&&!k&&!_&&(0,$.jsx)(Ie,{children:j.length}),t[48]=k,t[49]=j.length,t[50]=I,t[51]=_,t[52]=u):u=t[52],t[53]===u?q=t[54]:(q=(0,$.jsxs)(Le,{children:[l,u]}),t[53]=u,t[54]=q),V=Fe,U=`px-3 py-2`,W=I,G=_?(0,$.jsx)(Pe,{className:`px-2`,role:`status`,children:(0,$.jsx)(y,{id:`0x9smA`})}):k?(0,$.jsx)(Me,{className:`px-2`,children:k instanceof Error?k.message:o({id:`GuqOb1`})}):j.length===0&&!I?(0,$.jsx)(Pe,{className:`px-2`,children:(0,$.jsx)(y,{id:`0BB9ID`})}):(0,$.jsxs)(`nav`,{"aria-label":o({id:`BymzO4`}),className:`relative`,children:[e>=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:ri,height:ri,transform:`translate(${s}px, ${c}px)`}}),j.map((e,t)=>{let n=e.slug===B;return(0,$.jsx)(`button`,{type:`button`,"aria-current":n?`location`:void 0,onClick:()=>i(t,e.slug),className:w(`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)*ni+20}px`},title:e.text,children:e.text},t)})]}),t[31]=o,t[32]=B,t[33]=a,t[34]=n,t[35]=k,t[36]=j,t[37]=I,t[38]=r,t[39]=_,t[40]=V,t[41]=H,t[42]=U,t[43]=W,t[44]=G,t[45]=K,t[46]=q}else V=t[40],H=t[41],U=t[42],W=t[43],G=t[44],K=t[45],q=t[46];let J;t[55]!==V||t[56]!==U||t[57]!==W||t[58]!==G?(J=(0,$.jsx)(V,{className:U,"aria-busy":W,children:G}),t[55]=V,t[56]=U,t[57]=W,t[58]=G,t[59]=J):J=t[59];let Y;return t[60]!==H||t[61]!==K||t[62]!==q||t[63]!==J?(Y=(0,$.jsxs)(H,{className:K,children:[q,J]}),t[60]=H,t[61]=K,t[62]=q,t[63]=J,t[64]=Y):Y=t[64],Y}function ui(e){return e.slug}var di=!1;function fi(){return di||!te()?!1:(di=!0,!0)}export{pn as A,Ot as B,xn as C,Sn as D,Cn as E,Nt as F,nt as G,vt as H,Et as I,et as K,Tt as L,Lt as M,Zt as N,$t as O,Qt as P,kt as R,hn as S,wn as T,tt as U,Ct as V,rt as W,kn as _,ci as a,En as b,ur as c,cr as d,lr as f,On as g,Dn as h,si as i,Jt as j,fn as k,Tr as l,ir as m,ai as n,Gr as o,sr as p,ii as r,Hr as s,fi as t,ar as u,jn as v,bn as w,Tn as x,Mn as y,wt as z};
8
+ `);return n.trim()?mn(n,{isMarkdown:!0}):null}var Z=e(v(),1),Q=C(),$=t();function Tn(e){let t=(0,Q.c)(14),{scope:n,onScopeChange:r,projectLabel:i}=e,{_:a}=b(),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)(M,{value:`doc`,className:`flex-1`,"data-testid":`panel-scope-doc`,children:(0,$.jsx)(y,{id:`UpCz01`})}),t[4]=c):c=t[4];let l;t[5]===i?l=t[6]:(l=i??(0,$.jsx)(y,{id:`ZWyHmq`}),t[5]=i,t[6]=l);let u;t[7]===l?u=t[8]:(u=(0,$.jsx)(M,{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)(N,{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 En(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`?J._({id:`W5qdI_`,values:{shown:n}}):J._({id:`bpMVIA`,values:{shown:n}}):t.targetKind===`file`?t.role===`image`?J._({id:`iSWh95`,values:{shown:n}}):J._({id:`fOzzSV`,values:{shown:n}}):J._({id:`XBBZnv`,values:{shown:n}})}var Dn=`audit-superseded`;async function On(e={kind:`project`},t){return An(e,W,!1,t)}async function kn(e={kind:`project`},t){return An(e,H,!0,t)}async function An(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?Dn:(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 jn(e,t){let n=!1,r=!1,i=!1,a=[],o,s=null,c=()=>({findings:a,...o===void 0?{}:{brokenLinkSuppression:o}}),l=()=>{if(r){i=!0;return}r=!0,s=new AbortController,t({status:`loading`,...c()}),On({kind:`doc`,docName:e},s.signal).then(e=>{if(!(n||s?.signal.aborted===!0)){if(e===null){t({status:`failed`,...c()});return}if(e===`audit-superseded`){i=!0;return}i||(a=e.files.flatMap(e=>e.diagnostics).filter(e=>e.source===`links`),o=e.brokenLinkSuppression,t({status:`loaded`,...c()}))}}).finally(()=>{n||(r=!1,s=null,i&&(i=!1,l()))})};l();let u=ee(e=>{(e.includes(`backlinks`)||Y(e))&&l()}),d=Ve(l);return()=>{n=!0,s?.abort(),u(),d()}}function Mn(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:[]}}),jn(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 Nn(e){return Math.min(50,Math.max(1,Math.ceil(e/10)))}function Pn(e,t){return e===t||e%Nn(t)===0}var Fn=[250,500,1e3,2e3,4e3];function In(e){return e.status===503&&e.problemType===`urn:ok:error:too-many-agent-sessions`}async function Ln(e,t){let n=await t.fixItem(e);for(let r of Fn){if(n.ok||!In(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 Rn(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 Ln(i,e);if(a.ok||n.push({item:i,detail:a.errorDetail}),!e.shouldContinue())return{failures:n,cancelled:!0};let o=r+1;Pn(o,t)&&e.onProgress(o,t)}return{failures:n,cancelled:!1}}function zn(e){return new Promise(t=>setTimeout(t,e))}var Bn=null,Vn=!1,Hn=new Set,Un=new Set;function Wn(e){Bn=e;for(let e of Hn)e()}function Gn(e){return Hn.add(e),()=>{Hn.delete(e)}}function Kn(){return Bn}function qn(){return(0,Z.useSyncExternalStore)(Gn,Kn,Kn)}function Jn(e){return Un.add(e),()=>{Un.delete(e)}}function Yn(){Vn=!0}function Xn(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];K.error(J._({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){K.info(J._({id:`H1TmTu`}));return}e.length===0&&K.success(J._({id:`SWX1O7`,values:{total:n}}))}async function Zn({items:e,fixItem:t,sleep:n=zn}){if(Bn!==null||e.length===0)return;let r=e.length;Vn=!1,Wn({done:0,total:r});let i=[],a=!1,o=!1;try{let o=await Rn({items:e,fixItem:t,sleep:n,onProgress:e=>Wn({done:e,total:r}),shouldContinue:()=>!Vn});i=o.failures,a=o.cancelled}catch(e){console.warn(`[lint] fix-all: sweep threw`,e),o=!0}finally{Wn(null)}try{o?K.error(J._({id:`vwV-kH`})):Xn(i,a,r)}finally{for(let e of Un)e()}}var Qn={errorCount:0,warningCount:0},$n=new Map,er=new Set,tr=new Map;function nr(){let e=new Map;for(let[t,n]of $n){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})}tr=e;for(let e of er)e()}var rr=U;function ir(e){return er.add(e),()=>{er.delete(e)}}function ar(){return tr}function or(e){$n.clear();for(let t of e)$n.set(ye(t.file),rr(t.diagnostics));nr()}function sr(e){$n.clear();for(let t of e)$n.set(ye(t.file),{lint:t.lint,links:t.links});nr()}function cr(e,t){$n.set(e,rr(t)),nr()}function lr(e,t,n){let r=$n.get(e)??{lint:Qn,links:Qn},i=r[t];i.errorCount===n.errorCount&&i.warningCount===n.warningCount||($n.set(e,{...r,[t]:n}),nr())}var ur=`open-knowledge:lint-nav`;function dr(e,t){return e.range.start.line-t.range.start.line||e.range.start.character-t.range.start.character}function fr(e,t){return{docName:e,line:t.range.start.line+1,column:t.range.start.character+1,source:t.source,...t.frontmatterScope===void 0?{}:{frontmatterScope:t.frontmatterScope}}}function pr(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 mr={document:g,file:l,image:le,unresolvable:g};function hr(e){return e.linkTarget!==void 0&&pr(e)===`document`}function gr(e){let t=(0,Q.c)(40),{diagnostic:n,instanceCount:r}=e,{_:i}=b(),a=n.severity===`error`?ae:ge,o=n.range.start.line+1,s;t[0]===n?s=t[1]:(s=pr(n),t[0]=n,t[1]=s);let c=s,l=c===null?null:mr[c],u=r!==void 0&&r>1,d=n.severity===`error`?`text-destructive`:`text-amber-500`,f;t[2]===d?f=t[3]:(f=w(`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=En(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)(je,{variant:`gray`,"data-testid":`problems-instance-count`,className:`h-4 px-1 font-sans text-[10px] leading-none`,children:(0,$.jsx)(y,{id:`iZCZmF`,values:{instanceCount:r}})}),(0,$.jsx)(ne,{"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 _;t[14]!==p||t[15]!==h||t[16]!==g?(_=(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]=_):_=t[17];let v=c??void 0,x=l!==null&&`gap-0.5`,S;t[18]===x?S=t[19]:(S=w(`h-4 shrink-0 px-1 font-sans text-[10px] uppercase leading-none`,x),t[18]=x,t[19]=S);let C;t[20]===l?C=t[21]:(C=l===null?null:(0,$.jsx)(l,{"aria-hidden":`true`,className:`size-2.5`}),t[20]=l,t[21]=C);let T;t[22]!==n.source||t[23]!==S||t[24]!==C||t[25]!==v?(T=(0,$.jsxs)(je,{variant:`gray`,"data-testid":`problems-source-tag`,"data-target-kind":v,className:S,children:[C,n.source]}),t[22]=n.source,t[23]=S,t[24]=C,t[25]=v,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]!==_?(k=(0,$.jsxs)($.Fragment,{children:[_,O]}),t[37]=O,t[38]=_,t[39]=k):k=t[39],k}function _r(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 vr(e){let t=(0,Q.c)(63),{group:n,onNavigate:r,navTitle:i,renderActions:a}=e,{_:o}=b(),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=En(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)(gr,{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=j,t[34]!==s||t[35]!==n.instances.length?(f=(0,$.jsx)(A,{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)(gr,{diagnostic:s,instanceCount:n.instances.length})}),t[34]=s,t[35]=n.instances.length,t[36]=f):f=t[36],c=k,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=En(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})]},yr(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 v;t[51]!==c||t[52]!==d||t[53]!==_?(v=(0,$.jsx)(c,{className:d,children:_}),t[51]=c,t[52]=d,t[53]=_,t[54]=v):v=t[54];let y;t[55]!==l||t[56]!==f||t[57]!==v?(y=(0,$.jsxs)(l,{children:[f,v]}),t[55]=l,t[56]=f,t[57]=v,t[58]=y):y=t[58];let x;return t[59]!==y||t[60]!==p||t[61]!==m?(x=(0,$.jsx)(`li`,{className:p,"data-testid":m,children:y}),t[59]=y,t[60]=p,t[61]=m,t[62]=x):x=t[62],x}function yr(e){return`${e.source}/${e.code}-${e.range.start.line}-${e.range.start.character}-${e.message}`}function br(e){return e.reduce((e,t)=>e+ +((t.fixes?.length??0)>0),0)}function xr(e){let t=(0,Q.c)(11),{target:n,creating:r,disabled:i,onCreate:a}=e,{_:o}=b(),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)(fe,{"aria-hidden":`true`,className:`size-3`}),t[3]=c):c=t[3];let l;t[4]===r?l=t[5]:(l=r?(0,$.jsx)(y,{id:`E9bKSA`}):(0,$.jsx)(y,{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)(T,{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 Sr(e){let t=(0,Q.c)(8),{tip:n,testId:r,children:i}=e,a;t[0]===i?a=t[1]:(a=(0,$.jsx)(E,{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)(D,{"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)(O,{children:[a,o]}),t[5]=a,t[6]=o,t[7]=s):s=t[7],s}function Cr(e){let t=(0,Q.c)(21),{count:n,problemCount:r,aiAvailable:i,disabled:a,onClick:o,children:s}=e,{_:c}=b(),l;t[0]!==i||t[1]!==n||t[2]!==r?(l=n>0?(0,$.jsx)(y,{id:`vjwsDi`,values:{count:n}}):r===0?(0,$.jsx)(y,{id:`gAhHu7`}):i?(0,$.jsx)(y,{id:`zA9zRL`}):(0,$.jsx)(y,{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)(_e,{"aria-hidden":`true`,className:`size-3`}),t[9]=d):d=t[9];let f;t[10]!==s||t[11]!==n?(f=s??(0,$.jsx)(y,{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)(T,{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)(Sr,{testId:`problems-auto-fix-tip`,tip:l,children:p}),t[18]=l,t[19]=p,t[20]=m):m=t[20],m}function wr(e){let t=(0,Q.c)(12),{count:n,disabled:r,onClick:i}=e,a;t[0]===n?a=t[1]:(a=(0,$.jsx)(y,{id:`mgDKWS`,values:{count:n}}),t[0]=n,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsx)(d,{"aria-hidden":`true`,className:`size-3`}),t[2]=o):o=t[2];let s;t[3]===n?s=t[4]:(s=(0,$.jsx)(y,{id:`gyHDWC`,values:{count:n}}),t[3]=n,t[4]=s);let c;t[5]!==r||t[6]!==i||t[7]!==s?(c=(0,$.jsxs)(T,{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,s]}),t[5]=r,t[6]=i,t[7]=s,t[8]=c):c=t[8];let l;return t[9]!==a||t[10]!==c?(l=(0,$.jsx)(Sr,{testId:`problems-fix-with-ai-tip`,tip:a,children:c}),t[9]=a,t[10]=c,t[11]=l):l=t[11],l}function Tr(e){let t=(0,Q.c)(61),{docName:n,diagnostics:r,linkFindingsStatus:i,brokenLinkSuppression:a,onFix:s,onAutoFix:c,onAskAi:l,onFixWithAi:u}=e,p=i===void 0?`loaded`:i,{_:m}=b(),g=(0,Z.useRef)(null),_=(0,Z.useId)(),[v,x]=(0,Z.useState)(`doc`),S;t[0]===n?S=t[1]:(S=B(n),t[0]=n,t[1]=S);let C=!S,{data:w}=He(),k=w===null?null:w.effective.enabled?ie.filter(e=>w.effective.plugins[e.id].enabled):[],A=k!==null&&k.length===0,j=a!==void 0,M=(v===`project`||C)&&k!==null&&k.length>0,N;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(N={status:`idle`},t[2]=N):N=t[2];let[P,F]=(0,Z.useState)(N),I=qn(),L=se(),[R,z]=(0,Z.useState)(null),V=(0,Z.useRef)(!0),H,U;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(H=()=>(V.current=!0,()=>{V.current=!1}),U=[],t[3]=H,t[4]=U):(H=t[3],U=t[4]),(0,Z.useEffect)(H,U);let W=(0,Z.useRef)(Nr),G=(0,Z.useRef)(Mr),J;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(J={status:`idle`},t[5]=J):J=t[5];let te=(0,Z.useRef)(J),X;t[6]===P?X=t[7]:(X=()=>{P.status!==`loading`&&(te.current=P)},t[6]=P,t[7]=X),(0,Z.useEffect)(X);let ne=(0,Z.useRef)(0),re=[...r].sort(dr),ae=br(re),oe;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(oe=async function(){ne.current+=1;let e=ne.current,t=te.current;F({status:`loading`});let n=await On();if(n===`audit-superseded`){ne.current===e&&V.current&&F(t.status===`idle`?{status:`failed`}:t);return}n!==null&&or(n.files),V.current&&F(n===null?{status:`failed`}:{status:`loaded`,result:n})},t[8]=oe):oe=t[8];let ce=oe,le;t[9]!==m||t[10]!==P.status||t[11]!==R||t[12]!==L?(le=async function(e){let t=e.linkTarget;if(!(t===void 0||R!==null||L===null)){z(t);try{await o({initialDir:``,suggestedName:t},{addPage:L.addPage})}catch(e){let t=e;K.error(t instanceof Error?t.message:m({id:`tfi40B`})),V.current&&z(null);return}K.success(m({id:`EWCJFu`,values:{target:t}})),V.current&&z(null),V.current&&P.status===`loaded`&&await ce()}},t[9]=m,t[10]=P.status,t[11]=R,t[12]=L,t[13]=le):le=t[13];let ue=le,de=P.status===`loaded`?P.result.files.filter(Ar):[],fe=function(){Zn({items:de,fixItem:kr})},pe;t[14]===P.status?pe=t[15]:(pe=function(e){x(e),e===`project`&&P.status===`idle`&&ce()},t[14]=P.status,t[15]=pe);let me=pe,he;t[16]===P.status?he=t[17]:(he=()=>{W.current=()=>{P.status===`idle`||P.status===`failed`||ce()}},t[16]=P.status,t[17]=he),(0,Z.useEffect)(he);let ge,be;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(ge=()=>Ve(()=>W.current()),be=[],t[18]=ge,t[19]=be):(ge=t[18],be=t[19]),(0,Z.useEffect)(ge,be);let xe,Se;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(xe=()=>ee(e=>{Y(e)&&W.current()}),Se=[],t[20]=xe,t[21]=Se):(xe=t[20],Se=t[21]),(0,Z.useEffect)(xe,Se);let Ce;t[22]===me?Ce=t[23]:(Ce=(e,t)=>{e===`problems`&&(f(`problems`),t.scope!==void 0&&me(t.scope),t.focus===`panel`&&g.current?.focus({preventScroll:!0}))},t[22]=me,t[23]=Ce);let we=(0,Z.useEffectEvent)(Ce),Te;t[24]===we?Te=t[25]:(Te=()=>{let e=f(`problems`);return e!==null&&we(`problems`,e),h(we)},t[24]=we,t[25]=Te);let Ee;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=[],t[26]=Ee):Ee=t[26],(0,Z.useEffect)(Te,Ee);let De;t[27]===P.status?De=t[28]:(De=()=>{G.current=()=>{P.status===`idle`||P.status===`failed`||ce().catch(e=>{console.warn(`[lint] post-sweep re-audit failed`,e),V.current&&F({status:`failed`})})}},t[27]=P.status,t[28]=De),(0,Z.useEffect)(De);let Oe,ke;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=()=>Jn(()=>G.current()),ke=[],t[29]=Oe,t[30]=ke):(Oe=t[29],ke=t[30]),(0,Z.useEffect)(Oe,ke);let Ae;t[31]===n?Ae=t[32]:(Ae=function(e){let t=fr(n,e);Ct(n,{kind:`lint`,detail:t}),window.dispatchEvent(new CustomEvent(ur,{detail:t}))},t[31]=n,t[32]=Ae);let je=Ae,ze;t[33]!==n||t[34]!==je?(ze=function(e,t){let r=ye(e);if(r===n){je(t);return}Ct(r,{kind:`lint`,detail:fr(r,t)}),window.location.hash=ve(r)},t[33]=n,t[34]=je,t[35]=ze):ze=t[35];let Be=ze,Ue;t[36]!==m||t[37]!==ue||t[38]!==R||t[39]!==l||t[40]!==s||t[41]!==L?(Ue=function(e){let t=s!==void 0&&(e.fixes?.length??0)>0,n=hr(e)&&L!==null;if(!t&&!n&&l===void 0)return null;let r=`${e.source}/${e.code}`;return(0,$.jsxs)($.Fragment,{children:[n?(0,$.jsx)(xr,{target:e.linkTarget??``,creating:R===e.linkTarget,disabled:R!==null,onCreate:()=>void ue(e)}):null,t?(0,$.jsxs)(T,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,onClick:()=>s?.(e),"aria-label":m({id:`fZj9em`,values:{flatId:r}}),"data-testid":`problems-fix`,children:[(0,$.jsx)(_e,{"aria-hidden":`true`,className:`size-3`}),(0,$.jsx)(y,{id:`c4fVUV`})]}):null,l===void 0?null:(0,$.jsxs)(T,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,onClick:()=>l(e),"aria-label":m({id:`hh4mVC`,values:{flatId:r}}),"data-testid":`problems-ask-ai`,children:[(0,$.jsx)(d,{"aria-hidden":`true`,className:`size-3`}),(0,$.jsx)(y,{id:`xWEvuo`})]})]})},t[36]=m,t[37]=ue,t[38]=R,t[39]=l,t[40]=s,t[41]=L,t[42]=Ue):Ue=t[42];let We=Ue,Ge=Re,Ke;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(Ke=(0,$.jsx)(y,{id:`OXdGnd`}),t[43]=Ke):Ke=t[43];let qe;t[44]===_?qe=t[45]:(qe=(0,$.jsx)(Ne,{id:_,children:Ke}),t[44]=_,t[45]=qe);let Je=M&&(0,$.jsxs)(O,{children:[(0,$.jsx)(E,{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)(y,{id:`yxF19Y`,values:{0:k.length}})}),(0,$.jsx)(D,{"data-testid":`problems-active-plugins-tooltip`,children:(0,$.jsx)(y,{id:`ws5o1F`,values:{0:k.map(Or).join(`, `)}})})]}),Ye;t[46]!==qe||t[47]!==Je?(Ye=(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[qe,Je]}),t[46]=qe,t[47]=Je,t[48]=Ye):Ye=t[48];let Xe=v===`doc`&&re.length>0&&(0,$.jsx)(Ie,{children:re.length}),Ze;t[49]!==Ye||t[50]!==Xe?(Ze=(0,$.jsxs)(Le,{children:[Ye,Xe]}),t[49]=Ye,t[50]=Xe,t[51]=Ze):Ze=t[51];let Qe;t[52]!==me||t[53]!==v?(Qe=(0,$.jsx)(Tn,{scope:v,onScopeChange:me}),t[52]=me,t[53]=v,t[54]=Qe):Qe=t[54];let $e=v===`doc`?(0,$.jsxs)(Fe,{className:`px-2 py-2`,children:[p===`idle`||p===`loading`?(0,$.jsx)(Pe,{className:`px-2 pb-2`,role:`status`,"aria-live":`polite`,"data-testid":`problems-links-loading`,children:(0,$.jsx)(y,{id:`W9NSe0`})}):p===`failed`?(0,$.jsx)(Me,{className:`px-2 pb-2`,role:`status`,"data-testid":`problems-links-failed`,children:re.length>0||j?(0,$.jsx)(y,{id:`IoHQYP`}):(0,$.jsx)(y,{id:`gpbKxw`})}):null,j&&(0,$.jsx)(Rr,{suppression:a}),re.length===0?p===`loaded`?C?A?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Pe,{className:`px-2`,"data-testid":`problems-no-plugins`,children:j?(0,$.jsx)(y,{id:`mI1KPS`}):(0,$.jsx)(y,{id:`Hngy37`})}),(0,$.jsx)(`div`,{className:`px-2 pt-2`,children:(0,$.jsx)(T,{variant:`outline`,size:`sm`,onClick:q,"data-testid":`problems-enable-plugins`,children:(0,$.jsx)(y,{id:`rnX-1S`})})})]}):j?null:(0,$.jsx)(Pe,{className:`px-2`,children:(0,$.jsx)(y,{id:`ZI8uvA`})}):(0,$.jsx)(Pe,{className:`px-2`,"data-testid":`problems-markdown-not-applicable`,children:(0,$.jsx)(y,{id:`Kdvukk`})}):null:(0,$.jsxs)($.Fragment,{children:[c!==void 0||u!==void 0?(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-1 px-2 pb-1`,children:[c!==void 0&&(0,$.jsx)(Cr,{count:ae,problemCount:re.length,aiAvailable:u!==void 0,disabled:ae===0,onClick:c}),u!==void 0&&(0,$.jsx)(wr,{count:re.length,disabled:!1,onClick:()=>u(`doc`)})]}):null,(0,$.jsx)(`ul`,{"aria-label":m({id:`OXdGnd`}),className:`flex flex-col gap-0.5`,children:_r(re).map(e=>(0,$.jsx)(vr,{group:e,onNavigate:je,navTitle:e=>m({id:`vbMHjo`,values:{0:e.range.start.line+1}}),renderActions:We},e.key))})]})]}):(0,$.jsx)(Pr,{audit:P,onRefresh:()=>void ce(),onNavigate:Be,fixableCount:de.reduce(Dr,0),problemCount:P.status===`loaded`?P.result.files.reduce(Er,0):0,fixing:I,onAutoFix:fe,onCancelFix:Yn,onFixWithAi:u===void 0||P.status!==`loaded`?void 0:()=>u(`project`),onCreateTarget:L===null?void 0:e=>void ue(e),creatingTarget:R}),et;return t[55]!==Ge||t[56]!==_||t[57]!==Ze||t[58]!==Qe||t[59]!==$e?(et=(0,$.jsxs)(Ge,{ref:g,tabIndex:-1,"aria-labelledby":_,"data-testid":`problems-panel`,children:[Ze,Qe,$e]}),t[55]=Ge,t[56]=_,t[57]=Ze,t[58]=Qe,t[59]=$e,t[60]=et):et=t[60],et}function Er(e,t){return e+t.diagnostics.length}function Dr(e,t){return e+br(t.diagnostics)}function Or(e){return e.label}function kr(e){return Be(ye(e.file))}function Ar(e){return e.diagnostics.some(jr)}function jr(e){return(e.fixes?.length??0)>0}function Mr(){}function Nr(){}function Pr(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}=b(),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,[_,v]=(0,Z.useState)(Lr),x;t[3]!==_||t[4]!==g?(x=g.length>0&&g.every(e=>_.has(e.file)),t[3]=_,t[4]=g,t[5]=x):x=t[5];let S=x,C;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(C=function(e,t){v(n=>{let r=new Set(n);return t?r.add(e):r.delete(e),r})},t[6]=C):C=t[6];let w=C,k;t[7]!==S||t[8]!==g?(k=function(){v(S?new Set:new Set(g.map(Ir)))},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)(y,{id:`DsDwR-`,values:{0:n.result.errorCount}}),` · `,(0,$.jsx)(y,{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)(O,{children:[(0,$.jsx)(E,{asChild:!0,children:(0,$.jsx)(T,{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)(Ue,{"aria-hidden":`true`,className:`size-3.5`}):(0,$.jsx)(re,{"aria-hidden":`true`,className:`size-3.5`})})}),(0,$.jsx)(D,{"data-testid":`problems-audit-expand-toggle-tooltip`,children:S?(0,$.jsx)(y,{id:`I4LGsH`}):(0,$.jsx)(y,{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)(he,{"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)(E,{asChild:!0,children:(0,$.jsx)(T,{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)(D,{"data-testid":`problems-audit-refresh-tooltip`,children:(0,$.jsx)(y,{id:`I7y_vn`})}),t[27]=R):R=t[27];let z;t[28]===L?z=t[29]:(z=(0,$.jsxs)(O,{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)(O,{children:[(0,$.jsx)(E,{asChild:!0,children:(0,$.jsx)(T,{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)(y,{id:`ygCKqB`})})}),(0,$.jsx)(D,{"data-testid":`problems-cancel-fix-tooltip`,children:(0,$.jsx)(y,{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)(y,{id:`S9t1PI`,values:{0:s.done,1:s.total}}),t[43]=s,t[44]=K);let q;t[45]!==a||t[46]!==c||t[47]!==o||t[48]!==W||t[49]!==G||t[50]!==K?(q=(0,$.jsx)(Cr,{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]=q):q=t[51];let J;t[52]!==s||t[53]!==u||t[54]!==o?(J=u!==void 0&&o>0?(0,$.jsx)(wr,{count:o,disabled:s!==null,onClick:u}):null,t[52]=s,t[53]=u,t[54]=o,t[55]=J):J=t[55];let Y;t[56]!==H||t[57]!==U||t[58]!==q||t[59]!==J?(Y=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-1`,children:[H,U,q,J]}),t[56]=H,t[57]=U,t[58]=q,t[59]=J,t[60]=Y):Y=t[60];let ee;t[61]!==V||t[62]!==Y?(ee=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1 px-2 pb-1`,children:[V,Y]}),t[61]=V,t[62]=Y,t[63]=ee):ee=t[63];let te;t[64]!==p||t[65]!==m?(te=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(Fr)}),t[64]=p,t[65]=m,t[66]=te):te=t[66];let X;t[67]===n.status?X=t[68]:(X=n.status===`failed`&&(0,$.jsx)(Me,{className:`px-2 text-xs`,children:(0,$.jsx)(y,{id:`IFezUv`})}),t[67]=n.status,t[68]=X);let ne;t[69]!==n.result||t[70]!==n.status||t[71]!==f||t[72]!==_||t[73]!==d||t[74]!==i?(ne=n.status===`loaded`&&(0,$.jsx)(zr,{result:n.result,onNavigate:i,onCreateTarget:d,creatingTarget:f,expandedFiles:_,onToggleFile:w}),t[69]=n.result,t[70]=n.status,t[71]=f,t[72]=_,t[73]=d,t[74]=i,t[75]=ne):ne=t[75];let ie;return t[76]!==ee||t[77]!==te||t[78]!==X||t[79]!==ne?(ie=(0,$.jsxs)(Fe,{className:`px-2 py-2`,"data-testid":`problems-project-scope`,children:[ee,te,X,ne]}),t[76]=ee,t[77]=te,t[78]=X,t[79]=ne,t[80]=ie):ie=t[80],ie}function Fr(e){return(0,$.jsxs)(`div`,{className:`flex items-start gap-2.5 rounded px-2 py-1.5`,children:[(0,$.jsx)(ze,{className:`mt-0.5 size-3.5 shrink-0 rounded`}),(0,$.jsxs)(`div`,{className:`flex-1 space-y-1.5`,children:[(0,$.jsx)(ze,{className:`h-3 w-28`}),(0,$.jsx)(ze,{className:`h-3 w-40`})]})]},e)}function Ir(e){return e.file}function Lr(){return new Set}function Rr(e){let t=(0,Q.c)(6),{suppression:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(me,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0`}),t[0]=r):r=t[0];let i;t[1]===n.count?i=t[2]:(i=(0,$.jsx)(y,{id:`gi9c0-`,values:{0:n.count}}),t[1]=n.count,t[2]=i);let a;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(y,{id:`l91IVc`}),t[3]=a):a=t[3];let o;return t[4]===i?o=t[5]:(o=(0,$.jsxs)(`div`,{role:`note`,"aria-live":`polite`,"data-testid":`problems-broken-link-suppression`,className:`mx-2 mb-1 flex items-start gap-1.5 rounded-md border border-border/70 bg-muted/40 px-2 py-1.5 text-xs text-muted-foreground`,children:[r,(0,$.jsxs)(`span`,{className:`min-w-0`,children:[i,` `,a]})]}),t[4]=i,t[5]=o),o}function zr(e){let t=(0,Q.c)(18),{result:n,onNavigate:r,onCreateTarget:i,creatingTarget:a,expandedFiles:o,onToggleFile:s}=e,{_:c}=b(),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(Br)}),t[0]=c,t[1]=n.warnings,t[2]=l):l=t[2];let u;t[3]===n.brokenLinkSuppression?u=t[4]:(u=n.brokenLinkSuppression!==void 0&&(0,$.jsx)(Rr,{suppression:n.brokenLinkSuppression}),t[3]=n.brokenLinkSuppression,t[4]=u);let d;t[5]!==a||t[6]!==o||t[7]!==i||t[8]!==r||t[9]!==s||t[10]!==n.brokenLinkSuppression||t[11]!==n.fileCount||t[12]!==n.files?(d=n.files.length===0?n.brokenLinkSuppression===void 0?(0,$.jsx)(Pe,{className:`px-2`,children:(0,$.jsx)(y,{id:`k_Dqw1`,values:{0:n.fileCount}})}):null:n.files.map(e=>(0,$.jsx)(Vr,{file:e,onNavigate:r,onCreateTarget:i,creatingTarget:a,open:o.has(e.file),onOpenChange:t=>s(e.file,t)},e.file)),t[5]=a,t[6]=o,t[7]=i,t[8]=r,t[9]=s,t[10]=n.brokenLinkSuppression,t[11]=n.fileCount,t[12]=n.files,t[13]=d):d=t[13];let f;return t[14]!==l||t[15]!==u||t[16]!==d?(f=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[l,u,d]}),t[14]=l,t[15]=u,t[16]=d,t[17]=f):f=t[17],f}function Br(e,t){return(0,$.jsxs)(`li`,{className:`flex items-start gap-1.5 px-2 text-xs`,children:[(0,$.jsx)(ge,{"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 Vr(e){let t=(0,Q.c)(45),{file:n,onNavigate:r,onCreateTarget:i,creatingTarget:a,open:o,onOpenChange:s}=e,{_:c}=b(),l,u,d,f,p,m,h,g,_,v;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(dr);u=j,h=o,g=s,_=`problems-audit-group`;let y;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsx)(ne,{"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]=y):y=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),v=(0,$.jsxs)(A,{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:[y,b,(0,$.jsx)(je,{variant:`gray`,"data-testid":`problems-audit-file-count`,className:`shrink-0`,children:e.length})]}),l=k,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)(vr,{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=>!hr(e)||i===void 0?null:(0,$.jsx)(xr,{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=_r(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]=v}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],v=t[17];let y;t[30]!==d||t[31]!==f||t[32]!==p?(y=(0,$.jsx)(`ul`,{"aria-label":d,className:f,children:p}),t[30]=d,t[31]=f,t[32]=p,t[33]=y):y=t[33];let x;t[34]!==l||t[35]!==m||t[36]!==y?(x=(0,$.jsx)(l,{className:m,children:y}),t[34]=l,t[35]=m,t[36]=y,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]!==v?(S=(0,$.jsxs)(u,{open:h,onOpenChange:g,"data-testid":_,children:[v,x]}),t[38]=u,t[39]=x,t[40]=h,t[41]=g,t[42]=_,t[43]=v,t[44]=S):S=t[44],S}function Hr(e,t){return e.has(t)||G(t)}var Ur=null,Wr=[];function Gr(e){if(e===Ur)return Wr;let t=Kr(e);return Ur=e,Wr=t,t}function Kr(e){let t=[],n=new Map,r=V();for(let i=qr(e);i<=e.lines;i++){let a=e.line(i);if(r(a.text))continue;let o=I(a.text,n);o&&t.push({slug:o.slug,from:a.from})}return t}function qr(e){if(!Jr(e.line(1).text))return 1;for(let t=2;t<=e.lines;t++)if(Jr(e.line(t).text))return t+1;return 1}function Jr(e){return z.test(e.endsWith(`\r`)?e.slice(0,-1):e)}function Yr(e){let t=document.getElementById(e);return t?t.getBoundingClientRect().top:null}function Xr(e){let t=new Map;for(let n of Gr(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 Zr(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:a,docName:o}=r,s=a===void 0?!1:a,[l,u]=(0,Z.useState)(void 0),d=(0,Z.useRef)(null),f;n[2]===o?f=n[3]:(f=()=>o?i(o):null,n[2]=o,n[3]=f);let p=(0,Z.useSyncExternalStore)(c,f,Qr),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?Xr(p):Yr,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 Qr(){return null}var $r=300;async function ei(e){let t=await fetch(`/api/page-headings?docName=${encodeURIComponent(e)}`),n;try{n=await t.json()}catch(e){throw new pe(J._({id:`qAQVSD`}),{cause:e,status:t.status})}if(!t.ok){let e=F.safeParse(n);throw e.success?Error(e.data.title):new pe(J._({id:`zlErBl`}),{status:t.status})}let r=P.safeParse(n);if(!r.success)throw new pe(J._({id:`XW18jo`}),{status:t.status});return r.data.headings??[]}var ti=32,ni=12,ri=6,ii=`open-knowledge:outline-nav`,ai=`ok-outline-nav`,oi=`ok-outline-nav-dispatch`,si=`ok-outline-nav-settled`;function ci(e){let t=(0,Q.c)(2),n;return t[0]===e?n=t[1]:(n=(0,$.jsx)(xe,{name:`outline-panel`,children:(0,$.jsx)(li,{...e})}),t[0]=e,t[1]=n),n}function li(e){let t=(0,Q.c)(65),{docName:n,isSourceMode:r,className:i}=e,a=i===void 0?``:i,{_:o}=b(),{pages:s,loading:c,error:l}=oe(),u=x(),{activeProvider:d,activeDocName:f}=p(),m;t[0]!==n||t[1]!==s?(m=Hr(s,n),t[0]=n,t[1]=s,t[2]=m):m=t[2];let h=m,g;t[3]!==n||t[4]!==u?(g=u.getQueryState([`page-headings`,n]),t[3]=n,t[4]=u,t[5]=g):g=t[5];let _=!c&&l===null&&!h&&g!==void 0,v,C;t[6]===n?(v=t[7],C=t[8]):(v=[`page-headings`,n],C=()=>ei(n),t[6]=n,t[7]=v,t[8]=C);let T=!c&&h,E;t[9]!==v||t[10]!==C||t[11]!==T?(E={queryKey:v,queryFn:C,enabled:T,staleTime:1/0},t[9]=v,t[10]=C,t[11]=T,t[12]=E):E=t[12];let{data:D,isLoading:O,error:k}=S(E),A;t[13]===D?A=t[14]:(A=D===void 0?[]:D,t[13]=D,t[14]=A);let j=A,M,N;t[15]!==n||t[16]!==_||t[17]!==u?(M=()=>{_&&u.resetQueries({queryKey:[`page-headings`,n]})},N=[_,n,u],t[15]=n,t[16]=_,t[17]=u,t[18]=M,t[19]=N):(M=t[18],N=t[19]),(0,Z.useEffect)(M,N);let P,F;t[20]!==f||t[21]!==d||t[22]!==n||t[23]!==u?(P=()=>{if(!d||f!==n)return;let e=d.document,t=null,r=()=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{t=null,u.invalidateQueries({queryKey:[`page-headings`,n]})},$r)};return e.on(`update`,r),()=>{e.off(`update`,r),t!==null&&clearTimeout(t)}},F=[d,f,n,u],t[20]=f,t[21]=d,t[22]=n,t[23]=u,t[24]=P,t[25]=F):(P=t[24],F=t[25]),(0,Z.useEffect)(P,F);let I=c||O,L;t[26]===j?L=t[27]:(L=j.map(ui),t[26]=j,t[27]=L);let R=L,z;t[28]!==n||t[29]!==r?(z={isSourceMode:r,docName:n},t[28]=n,t[29]=r,t[30]=z):z=t[30];let B=Zr(R,z),V,H,U,W,G,K,q;if(t[31]!==o||t[32]!==B||t[33]!==a||t[34]!==n||t[35]!==k||t[36]!==j||t[37]!==I||t[38]!==r||t[39]!==_){let e=B?j.findIndex(e=>e.slug===B):-1,i=function(t,i){let a={docName:n,index:t,slug:i,mode:r?`source`:`wysiwyg`};a.mode===`source`&&Ct(n,{kind:`outline`,detail:a}),Se(oi,{docName:n,index:t,mode:a.mode,outlineCount:j.length,headingLevel:j[t]?.level,activeIndex:e}),window.dispatchEvent(new CustomEvent(ii,{detail:a}))},s=((e>=0?j[e].level:1)-1)*ni+(ni-ri)/2,c=e*ti+(ti-ri)/2;H=Re,K=a;let l;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(Ne,{children:(0,$.jsx)(y,{id:`dD7NPy`})}),t[47]=l):l=t[47];let u;t[48]!==k||t[49]!==j.length||t[50]!==I||t[51]!==_?(u=!I&&!k&&!_&&(0,$.jsx)(Ie,{children:j.length}),t[48]=k,t[49]=j.length,t[50]=I,t[51]=_,t[52]=u):u=t[52],t[53]===u?q=t[54]:(q=(0,$.jsxs)(Le,{children:[l,u]}),t[53]=u,t[54]=q),V=Fe,U=`px-3 py-2`,W=I,G=_?(0,$.jsx)(Pe,{className:`px-2`,role:`status`,children:(0,$.jsx)(y,{id:`0x9smA`})}):k?(0,$.jsx)(Me,{className:`px-2`,children:k instanceof Error?k.message:o({id:`GuqOb1`})}):j.length===0&&!I?(0,$.jsx)(Pe,{className:`px-2`,children:(0,$.jsx)(y,{id:`0BB9ID`})}):(0,$.jsxs)(`nav`,{"aria-label":o({id:`BymzO4`}),className:`relative`,children:[e>=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:ri,height:ri,transform:`translate(${s}px, ${c}px)`}}),j.map((e,t)=>{let n=e.slug===B;return(0,$.jsx)(`button`,{type:`button`,"aria-current":n?`location`:void 0,onClick:()=>i(t,e.slug),className:w(`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)*ni+20}px`},title:e.text,children:e.text},t)})]}),t[31]=o,t[32]=B,t[33]=a,t[34]=n,t[35]=k,t[36]=j,t[37]=I,t[38]=r,t[39]=_,t[40]=V,t[41]=H,t[42]=U,t[43]=W,t[44]=G,t[45]=K,t[46]=q}else V=t[40],H=t[41],U=t[42],W=t[43],G=t[44],K=t[45],q=t[46];let J;t[55]!==V||t[56]!==U||t[57]!==W||t[58]!==G?(J=(0,$.jsx)(V,{className:U,"aria-busy":W,children:G}),t[55]=V,t[56]=U,t[57]=W,t[58]=G,t[59]=J):J=t[59];let Y;return t[60]!==H||t[61]!==K||t[62]!==q||t[63]!==J?(Y=(0,$.jsxs)(H,{className:K,children:[q,J]}),t[60]=H,t[61]=K,t[62]=q,t[63]=J,t[64]=Y):Y=t[64],Y}function ui(e){return e.slug}var di=!1;function fi(){return di||!te()?!1:(di=!0,!0)}export{pn as A,Ot as B,xn as C,Sn as D,Cn as E,Nt as F,nt as G,vt as H,Et as I,et as K,Tt as L,Lt as M,Zt as N,$t as O,Qt as P,kt as R,hn as S,wn as T,tt as U,Ct as V,rt as W,kn as _,ci as a,En as b,ur as c,cr as d,lr as f,On as g,Dn as h,si as i,Jt as j,fn as k,Tr as l,ir as m,ai as n,Gr as o,sr as p,ii as r,Hr as s,fi as t,ar as u,jn as v,bn as w,Tn as x,Mn as y,wt as z};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./globals-CQVYUd1p.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a,t as o}from"./dist-Nvb76hAm.js";import{t as s}from"./compiler-runtime-BfE3aGVn.js";import{t as c}from"./button-Cym3gapE.js";import{t as l}from"./checkbox-Crs_F_Np.js";import{t as u}from"./label-D-K3fWtj.js";import{n as d,t as f}from"./radio-group-npdxiS6E.js";import{on as p,sn as m}from"./dist-BtM-eRCP.js";import{t as h}from"./dist-Cr4-nBVI.js";import{t as g}from"./spinner-Bp2_BYkl.js";import{t as _}from"./input-DaMAkTYk.js";import"./i18n-BihTB2it.js";import{t as v}from"./badge-C0BAzyS2.js";import{t as y}from"./textarea-BF-s7jTP.js";var b=e(r(),1),x=t(),S=s();async function C(){let e=typeof window>`u`?void 0:window.okUninstall;if(e===void 0)return null;try{let t=await e.ready();return t.kind===`screen`?t.screen:null}catch{return null}}function w(e){let t=typeof window>`u`?void 0:window.okUninstall;t!==void 0&&t.send(e).catch(()=>void 0)}var T=n();function E(e){let t=(0,S.c)(37),{notice:n,onConfirm:r,onCancel:i}=e,{_:o}=a(),s=(0,b.useId)(),l=(0,b.useId)(),u=n.cancelLabel!==void 0,d,f;t[0]!==u||t[1]!==i||t[2]!==r?(d=()=>{let e=e=>{e.key===`Escape`&&(u?i():r())};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},f=[u,i,r],t[0]=u,t[1]=i,t[2]=r,t[3]=d,t[4]=f):(d=t[3],f=t[4]),(0,b.useEffect)(d,f);let p;t[5]!==n.title||t[6]!==s?(p=(0,T.jsx)(`header`,{className:`shrink-0 px-6 pt-5 pb-3.5`,children:(0,T.jsx)(`h1`,{id:s,className:`font-medium text-base leading-none`,children:n.title})}),t[5]=n.title,t[6]=s,t[7]=p):p=t[7];let m;t[8]===n.paragraphs?m=t[9]:(m=n.paragraphs.map(D),t[8]=n.paragraphs,t[9]=m);let h;t[10]!==o||t[11]!==n.log?(h=n.log!==void 0&&(0,T.jsx)(`section`,{"aria-label":o({id:`Oi56Cu`}),tabIndex:0,className:`subtle-scrollbar mt-0.5 mb-2.5 min-h-20 flex-1 overflow-auto rounded-lg border border-border border-dotted bg-muted/40 px-3 py-2.5 focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50`,children:(0,T.jsx)(`pre`,{className:`select-text whitespace-pre-wrap font-mono text-xs leading-relaxed wrap-anywhere`,children:n.log})}),t[10]=o,t[11]=n.log,t[12]=h):h=t[12];let g;t[13]===n.footnote?g=t[14]:(g=n.footnote!==void 0&&(0,T.jsx)(`p`,{className:`select-text text-muted-foreground text-xs wrap-anywhere`,children:n.footnote}),t[13]=n.footnote,t[14]=g);let _;t[15]!==l||t[16]!==m||t[17]!==h||t[18]!==g?(_=(0,T.jsxs)(`div`,{id:l,className:`flex min-h-0 flex-1 flex-col px-6 pt-1 pb-4 text-sm`,children:[m,h,g]}),t[15]=l,t[16]=m,t[17]=h,t[18]=g,t[19]=_):_=t[19];let v;t[20]!==n.cancelLabel||t[21]!==i?(v=n.cancelLabel!==void 0&&(0,T.jsx)(c,{type:`button`,variant:`outline-mono`,autoFocus:!0,onClick:i,children:n.cancelLabel}),t[20]=n.cancelLabel,t[21]=i,t[22]=v):v=t[22];let y=n.danger===!0?`destructive`:`default`,x=!u,C;t[23]!==n.confirmLabel||t[24]!==r||t[25]!==x||t[26]!==y?(C=(0,T.jsx)(c,{type:`button`,variant:y,autoFocus:x,onClick:r,children:n.confirmLabel}),t[23]=n.confirmLabel,t[24]=r,t[25]=x,t[26]=y,t[27]=C):C=t[27];let w;t[28]!==C||t[29]!==v?(w=(0,T.jsxs)(`footer`,{className:`flex items-center justify-end gap-2.5 border-border border-t bg-muted/50 px-6 pt-3.5 pb-4`,children:[v,C]}),t[28]=C,t[29]=v,t[30]=w):w=t[30];let E;return t[31]!==l||t[32]!==w||t[33]!==p||t[34]!==_||t[35]!==s?(E=(0,T.jsxs)(`div`,{role:`alertdialog`,"aria-labelledby":s,"aria-describedby":l,className:`flex h-dvh flex-col bg-background text-foreground`,children:[p,_,w]}),t[31]=l,t[32]=w,t[33]=p,t[34]=_,t[35]=s,t[36]=E):E=t[36],E}function D(e){return(0,T.jsx)(`p`,{className:`mb-2.5 leading-normal`,children:e},e)}function O(e){return e.open||e.running?`active`:e.recent?`recent`:null}function k(e){return e.split(`/`).filter(Boolean).at(-1)??e}function A(e){let t=(0,S.c)(9),{status:n}=e,{_:r}=a(),i;t[0]===r?i=t[1]:(i=r({id:`s_ereB`}),t[0]=r,t[1]=i);let o;t[2]===r?o=t[3]:(o=r({id:`_2cM9E`}),t[2]=r,t[3]=o);let s;t[4]!==i||t[5]!==o?(s={active:i,recent:o},t[4]=i,t[5]=o,t[6]=s):s=t[6];let c=s[n],l;return t[7]===c?l=t[8]:(l=(0,T.jsx)(v,{variant:`secondary`,className:`rounded-sm text-muted-foreground`,children:c}),t[7]=c,t[8]=l),l}function j(e){let t=(0,S.c)(28),{project:n,checked:r,onCheckedChange:i}=e,{_:o}=a(),s=(0,b.useId)(),c;t[0]===n?c=t[1]:(c=O(n),t[0]=n,t[1]=c);let d=c,f;t[2]===i?f=t[3]:(f=e=>i(e===!0),t[2]=i,t[3]=f);let p;t[4]!==o||t[5]!==n.path?(p=o({id:`CHfFN_`,values:{0:n.path}}),t[4]=o,t[5]=n.path,t[6]=p):p=t[6];let m;t[7]!==s||t[8]!==r||t[9]!==f||t[10]!==p?(m=(0,T.jsx)(l,{id:s,className:`mt-0.5`,checked:r,onCheckedChange:f,"aria-label":p}),t[7]=s,t[8]=r,t[9]=f,t[10]=p,t[11]=m):m=t[11];let h;t[12]===n.path?h=t[13]:(h=k(n.path),t[12]=n.path,t[13]=h);let g;t[14]===h?g=t[15]:(g=(0,T.jsx)(`span`,{className:`w-full truncate font-medium text-sm`,children:h}),t[14]=h,t[15]=g);let _;t[16]===n.path?_=t[17]:(_=(0,T.jsx)(`span`,{className:`w-full select-text break-words text-muted-foreground text-xs`,children:n.path}),t[16]=n.path,t[17]=_);let v;t[18]!==s||t[19]!==g||t[20]!==_?(v=(0,T.jsxs)(u,{htmlFor:s,className:`min-w-0 flex-col items-start gap-0.5 font-normal`,children:[g,_]}),t[18]=s,t[19]=g,t[20]=_,t[21]=v):v=t[21];let y;t[22]===d?y=t[23]:(y=d!==null&&(0,T.jsx)(`div`,{className:`flex justify-end max-sm:col-start-2 max-sm:justify-start`,children:(0,T.jsx)(A,{status:d})}),t[22]=d,t[23]=y);let x;return t[24]!==m||t[25]!==v||t[26]!==y?(x=(0,T.jsxs)(`div`,{className:`grid grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-2.5 border-border/60 border-b px-3 py-2.5 last:border-b-0 hover:bg-accent/40 max-sm:grid-cols-[auto_minmax(0,1fr)]`,children:[m,v,y]}),t[24]=m,t[25]=v,t[26]=y,t[27]=x):x=t[27],x}function M(e){let t=(0,S.c)(45),{projects:n,onConfirm:r,onCancel:o}=e,{_:s}=a(),[d,f]=(0,b.useState)(te),p=(0,b.useId)(),m=(0,b.useId)(),h=(0,b.useId)(),g=n.length>0&&d.size===n.length?!0:d.size>0?`indeterminate`:!1,_;t[0]===n?_=t[1]:(_=e=>f(e?new Set(n.map(ee)):new Set),t[0]=n,t[1]=_);let v=_,y,x;t[2]!==o||t[3]!==n?(y=()=>{let e=e=>{if(e.key===`Escape`){o();return}(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`a`&&(e.preventDefault(),f(new Set(n.map(P))))};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},x=[o,n],t[2]=o,t[3]=n,t[4]=y,t[5]=x):(y=t[4],x=t[5]),(0,b.useEffect)(y,x);let C;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,T.jsx)(i,{id:`PrVaZo`}),t[6]=C):C=t[6];let w;t[7]===p?w=t[8]:(w=(0,T.jsx)(`h1`,{id:p,className:`font-medium leading-none text-base`,children:C}),t[7]=p,t[8]=w);let E;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,T.jsx)(i,{id:`keop3U`}),t[9]=E):E=t[9];let D;t[10]===m?D=t[11]:(D=(0,T.jsx)(`p`,{id:m,className:`text-sm text-muted-foreground`,children:E}),t[10]=m,t[11]=D);let O;t[12]!==w||t[13]!==D?(O=(0,T.jsxs)(`header`,{className:`shrink-0 px-6 pt-5 pb-3.5 space-y-4`,children:[w,D]}),t[12]=w,t[13]=D,t[14]=O):O=t[14];let k;t[15]===s?k=t[16]:(k=s({id:`QySH4I`}),t[15]=s,t[16]=k);let A;t[17]!==s||t[18]!==n||t[19]!==h||t[20]!==g||t[21]!==d||t[22]!==v?(A=n.length===0?(0,T.jsx)(`div`,{className:`rounded-lg border border-border p-4`,children:(0,T.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:(0,T.jsx)(i,{id:`bKt9Jk`})})}):(0,T.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-border`,children:[(0,T.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2.5 border-border border-b px-3 py-2.5 bg-muted/30`,children:[(0,T.jsx)(l,{id:h,checked:g,onCheckedChange:e=>v(e===!0)}),(0,T.jsx)(u,{htmlFor:h,className:`flex-1 font-medium text-sm`,children:(0,T.jsx)(i,{id:`wgNoIs`})}),(0,T.jsxs)(`span`,{role:`status`,"aria-label":s({id:`nsUDL8`,values:{0:d.size,1:n.length}}),className:`text-muted-foreground text-xs tabular-nums`,children:[d.size,` / `,n.length]})]}),(0,T.jsx)(`div`,{className:`subtle-scrollbar min-h-0 flex-1 overflow-y-scroll [scrollbar-gutter:stable]`,children:n.map((e,t)=>(0,T.jsx)(j,{project:e,checked:d.has(t),onCheckedChange:e=>{f(n=>{let r=new Set(n);return e?r.add(t):r.delete(t),r})}},e.path))})]}),t[17]=s,t[18]=n,t[19]=h,t[20]=g,t[21]=d,t[22]=v,t[23]=A):A=t[23];let M;t[24]!==A||t[25]!==k?(M=(0,T.jsx)(`section`,{"aria-label":k,className:`flex min-h-0 flex-1 flex-col px-6 py-3.5`,children:A}),t[24]=A,t[25]=k,t[26]=M):M=t[26];let F;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,T.jsx)(i,{id:`dEgA5A`}),t[27]=F):F=t[27];let I;t[28]===o?I=t[29]:(I=(0,T.jsx)(c,{type:`button`,variant:`outline-mono`,autoFocus:!0,onClick:o,children:F}),t[28]=o,t[29]=I);let L;t[30]!==r||t[31]!==d?(L=()=>r([...d].sort(N)),t[30]=r,t[31]=d,t[32]=L):L=t[32];let R;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,T.jsx)(i,{id:`J7nMqi`}),t[33]=R):R=t[33];let z;t[34]===L?z=t[35]:(z=(0,T.jsx)(c,{type:`button`,variant:`destructive`,onClick:L,children:R}),t[34]=L,t[35]=z);let B;t[36]!==I||t[37]!==z?(B=(0,T.jsxs)(`footer`,{className:`flex items-center justify-end gap-2.5 border-border border-t bg-muted/50 px-6 pt-3.5 pb-4`,children:[I,z]}),t[36]=I,t[37]=z,t[38]=B):B=t[38];let V;return t[39]!==m||t[40]!==M||t[41]!==B||t[42]!==O||t[43]!==p?(V=(0,T.jsxs)(`div`,{role:`dialog`,"aria-labelledby":p,"aria-describedby":m,className:`flex h-dvh flex-col overflow-hidden bg-background text-foreground`,children:[O,M,B]}),t[39]=m,t[40]=M,t[41]=B,t[42]=O,t[43]=p,t[44]=V):V=t[44],V}function N(e,t){return e-t}function P(e,t){return t}function ee(e,t){return t}function te(){return new Set}function F(){let e=(0,S.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,T.jsx)(g,{"aria-hidden":`true`,className:`mx-auto mb-4 size-8 text-primary`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,T.jsx)(`h1`,{className:`mb-2 font-medium text-base leading-none`,children:(0,T.jsx)(i,{id:`j2229h`})}),e[1]=n):n=e[1];let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,T.jsx)(`main`,{className:`grid h-dvh place-items-center bg-background text-foreground`,children:(0,T.jsxs)(`div`,{role:`status`,className:`max-w-vw px-7 py-7 text-center`,children:[t,n,(0,T.jsx)(`p`,{className:`text-muted-foreground text-sm leading-relaxed`,children:(0,T.jsx)(i,{id:`kCjkGY`})})]})}),e[2]=r):r=e[2],r}function I(){let{_:e}=a();return{"workflow-fit":e({id:`5vAI6Z`}),"missing-feature":e({id:`cH0dkG`}),"hard-to-start":e({id:`uoJF_D`}),unreliable:e({id:`WGMoTY`}),"switched-tool":e({id:`jO18NZ`}),"one-off":e({id:`S3qu11`}),other:e({id:`aQyGJc`})}}function L(e){let t=(0,S.c)(86),{onSend:n,onSkip:r}=e,{_:o}=a(),s=I(),[h,g]=(0,b.useState)(``),[v,x]=(0,b.useState)(``),[C,w]=(0,b.useState)(!1),[E,D]=(0,b.useState)(``),O=(0,b.useRef)(null),k=(0,b.useId)(),A=(0,b.useId)(),j=(0,b.useId)(),M=(0,b.useId)(),N=(0,b.useId)(),P=(0,b.useId)(),ee,te;t[0]===C?(ee=t[1],te=t[2]):(ee=()=>{C&&O.current?.focus()},te=[C],t[0]=C,t[1]=ee,t[2]=te),(0,b.useEffect)(ee,te);let F;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,T.jsx)(i,{id:`ElyuiT`}),t[3]=F):F=t[3];let L;t[4]===k?L=t[5]:(L=(0,T.jsx)(`h1`,{id:k,className:`font-medium leading-none text-base`,children:F}),t[4]=k,t[5]=L);let R;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,T.jsx)(i,{id:`ZDOq9A`}),t[6]=R):R=t[6];let z;t[7]===A?z=t[8]:(z=(0,T.jsx)(`p`,{id:A,className:`text-muted-foreground text-sm`,children:R}),t[7]=A,t[8]=z);let B;t[9]!==L||t[10]!==z?(B=(0,T.jsxs)(`header`,{className:`px-6 pt-5 pb-3.5 space-y-4`,children:[L,z]}),t[9]=L,t[10]=z,t[11]=B):B=t[11];let V;t[12]!==E||t[13]!==C||t[14]!==v||t[15]!==n||t[16]!==h?(V=e=>{e.preventDefault();let t=v.trim(),r=C?E.trim():``;n({...h===``?{}:{reason:h},...t===``?{}:{note:t},...r===``?{}:{email:r}})},t[12]=E,t[13]=C,t[14]=v,t[15]=n,t[16]=h,t[17]=V):V=t[17];let ne;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,T.jsx)(i,{id:`oxdGJn`}),t[18]=ne):ne=t[18];let H;t[19]===j?H=t[20]:(H=(0,T.jsx)(`p`,{id:j,className:`mb-2 font-medium text-sm`,children:ne}),t[19]=j,t[20]=H);let U;t[21]!==j||t[22]!==s?(U=m.map(e=>(0,T.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md px-1 py-1`,children:[(0,T.jsx)(d,{id:`${j}-${e.value}`,value:e.value}),(0,T.jsx)(u,{htmlFor:`${j}-${e.value}`,className:`font-normal text-sm leading-snug`,children:s[e.value]})]},e.value)),t[21]=j,t[22]=s,t[23]=U):U=t[23];let W;t[24]!==j||t[25]!==h||t[26]!==U?(W=(0,T.jsx)(f,{"aria-labelledby":j,value:h,onValueChange:g,children:U}),t[24]=j,t[25]=h,t[26]=U,t[27]=W):W=t[27];let G;t[28]!==H||t[29]!==W?(G=(0,T.jsxs)(`div`,{className:`mb-6`,children:[H,W]}),t[28]=H,t[29]=W,t[30]=G):G=t[30];let re;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,T.jsx)(i,{id:`axQ1h6`}),t[31]=re):re=t[31];let K;t[32]===M?K=t[33]:(K=(0,T.jsx)(u,{htmlFor:M,className:`mb-2 font-medium text-sm`,children:re}),t[32]=M,t[33]=K);let ie;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(ie=e=>x(e.target.value),t[34]=ie):ie=t[34];let q;t[35]!==v||t[36]!==M?(q=(0,T.jsx)(y,{id:M,rows:3,maxLength:p,value:v,onChange:ie}),t[35]=v,t[36]=M,t[37]=q):q=t[37];let J;t[38]!==K||t[39]!==q?(J=(0,T.jsxs)(`div`,{className:`mb-6`,children:[K,q]}),t[38]=K,t[39]=q,t[40]=J):J=t[40];let ae;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(ae=e=>w(e===!0),t[41]=ae):ae=t[41];let Y;t[42]!==C||t[43]!==N?(Y=(0,T.jsx)(l,{id:N,checked:C,onCheckedChange:ae}),t[42]=C,t[43]=N,t[44]=Y):Y=t[44];let oe;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,T.jsx)(i,{id:`xEb24l`}),t[45]=oe):oe=t[45];let X;t[46]===N?X=t[47]:(X=(0,T.jsx)(u,{htmlFor:N,className:`font-medium text-sm`,children:oe}),t[46]=N,t[47]=X);let Z;t[48]!==Y||t[49]!==X?(Z=(0,T.jsxs)(`div`,{className:`mb-2 flex items-center gap-2.5`,children:[Y,X]}),t[48]=Y,t[49]=X,t[50]=Z):Z=t[50];let se=!C,ce;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,T.jsx)(i,{id:`ATGYL1`}),t[51]=ce):ce=t[51];let Q;t[52]===P?Q=t[53]:(Q=(0,T.jsx)(u,{htmlFor:P,className:`mb-2 font-medium text-sm sr-only`,children:ce}),t[52]=P,t[53]=Q);let $;t[54]===o?$=t[55]:($=o({id:`JHf6qZ`}),t[54]=o,t[55]=$);let le=!C,ue;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(ue=e=>D(e.target.value),t[56]=ue):ue=t[56];let de;t[57]!==E||t[58]!==P||t[59]!==$||t[60]!==le?(de=(0,T.jsx)(_,{id:P,ref:O,type:`email`,maxLength:320,autoComplete:`email`,spellCheck:!1,placeholder:$,disabled:le,value:E,onChange:ue}),t[57]=E,t[58]=P,t[59]=$,t[60]=le,t[61]=de):de=t[61];let fe;t[62]!==se||t[63]!==Q||t[64]!==de?(fe=(0,T.jsxs)(`div`,{className:`mb-6`,hidden:se,children:[Q,de]}),t[62]=se,t[63]=Q,t[64]=de,t[65]=fe):fe=t[65];let pe;t[66]!==G||t[67]!==J||t[68]!==Z||t[69]!==fe?(pe=(0,T.jsxs)(`div`,{className:`subtle-scrollbar min-h-0 flex-1 overflow-y-auto px-6 pt-1 pb-4`,children:[G,J,Z,fe]}),t[66]=G,t[67]=J,t[68]=Z,t[69]=fe,t[70]=pe):pe=t[70];let me;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,T.jsx)(i,{id:`6Uau97`}),t[71]=me):me=t[71];let he;t[72]===r?he=t[73]:(he=(0,T.jsx)(c,{type:`button`,variant:`outline-mono`,autoFocus:!0,onClick:r,children:me}),t[72]=r,t[73]=he);let ge;t[74]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,T.jsx)(c,{type:`submit`,children:(0,T.jsx)(i,{id:`xMsnTe`})}),t[74]=ge):ge=t[74];let _e;t[75]===he?_e=t[76]:(_e=(0,T.jsxs)(`footer`,{className:`flex items-center justify-end gap-2.5 border-border border-t bg-muted/50 px-6 pt-3.5 pb-4`,children:[he,ge]}),t[75]=he,t[76]=_e);let ve;t[77]!==pe||t[78]!==_e||t[79]!==V?(ve=(0,T.jsxs)(`form`,{className:`flex min-h-0 flex-1 flex-col`,onSubmit:V,children:[pe,_e]}),t[77]=pe,t[78]=_e,t[79]=V,t[80]=ve):ve=t[80];let ye;return t[81]!==A||t[82]!==ve||t[83]!==B||t[84]!==k?(ye=(0,T.jsxs)(`div`,{role:`dialog`,"aria-labelledby":k,"aria-describedby":A,className:`flex h-dvh flex-col bg-background text-foreground`,children:[B,ve]}),t[81]=A,t[82]=ve,t[83]=B,t[84]=k,t[85]=ye):ye=t[85],ye}function R(){let e=(0,S.c)(9),[t,n]=(0,b.useState)(null),r,a;if(e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=!0;return C().then(t=>{e&&n(t)}),()=>{e=!1}},a=[],e[0]=r,e[1]=a):(r=e[0],a=e[1]),(0,b.useEffect)(r,a),t!==null)switch(t.kind){case`picker`:{let n;return e[2]===t.projects?n=e[3]:(n=(0,T.jsx)(M,{projects:t.projects,onConfirm:U,onCancel:H}),e[2]=t.projects,e[3]=n),n}case`survey`:{let t;return e[4]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,T.jsx)(L,{onSend:ne,onSkip:V}),e[4]=t):t=e[4],t}case`progress`:{let t;return e[5]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,T.jsx)(F,{}),e[5]=t):t=e[5],t}case`notice`:{let n;return e[6]===t.notice?n=e[7]:(n=(0,T.jsx)(E,{notice:t.notice,onConfirm:B,onCancel:z}),e[6]=t.notice,e[7]=n),n}default:return t}let o;return e[8]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,T.jsx)(`main`,{className:`flex min-h-dvh items-center justify-center bg-background p-8 text-foreground`,children:(0,T.jsx)(`p`,{className:`text-center text-muted-foreground text-sm`,children:(0,T.jsx)(i,{id:`tzGWeg`})})}),e[8]=o):o=e[8],o}function z(){return w({kind:`notice-cancel`})}function B(){return w({kind:`notice-confirm`})}function V(){return w({kind:`survey-skip`})}function ne(e){return w({kind:`survey-send`,...e})}function H(){return w({kind:`picker-cancel`})}function U(e){return w({kind:`picker-confirm`,selectedIndexes:e})}var W=document.getElementById(`root`);if(!W)throw Error(`Root element not found`);(0,x.createRoot)(W).render((0,T.jsx)(b.StrictMode,{children:(0,T.jsx)(o,{i18n:h,children:(0,T.jsx)(R,{})})}));
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./globals-CQVYUd1p.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a,t as o}from"./dist-Nvb76hAm.js";import{t as s}from"./compiler-runtime-BfE3aGVn.js";import{t as c}from"./button-Cym3gapE.js";import{t as l}from"./checkbox-B-MvAL6W.js";import{t as u}from"./label-D-K3fWtj.js";import{n as d,t as f}from"./radio-group-npdxiS6E.js";import{on as p,sn as m}from"./dist-CsoN3WVg.js";import{t as h}from"./dist-Cr4-nBVI.js";import{t as g}from"./spinner-84U_t9u0.js";import{t as _}from"./input-DaMAkTYk.js";import"./i18n-DQjeEGli.js";import{t as v}from"./badge-C0BAzyS2.js";import{t as y}from"./textarea-BF-s7jTP.js";var b=e(r(),1),x=t(),S=s();async function C(){let e=typeof window>`u`?void 0:window.okUninstall;if(e===void 0)return null;try{let t=await e.ready();return t.kind===`screen`?t.screen:null}catch{return null}}function w(e){let t=typeof window>`u`?void 0:window.okUninstall;t!==void 0&&t.send(e).catch(()=>void 0)}var T=n();function E(e){let t=(0,S.c)(37),{notice:n,onConfirm:r,onCancel:i}=e,{_:o}=a(),s=(0,b.useId)(),l=(0,b.useId)(),u=n.cancelLabel!==void 0,d,f;t[0]!==u||t[1]!==i||t[2]!==r?(d=()=>{let e=e=>{e.key===`Escape`&&(u?i():r())};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},f=[u,i,r],t[0]=u,t[1]=i,t[2]=r,t[3]=d,t[4]=f):(d=t[3],f=t[4]),(0,b.useEffect)(d,f);let p;t[5]!==n.title||t[6]!==s?(p=(0,T.jsx)(`header`,{className:`shrink-0 px-6 pt-5 pb-3.5`,children:(0,T.jsx)(`h1`,{id:s,className:`font-medium text-base leading-none`,children:n.title})}),t[5]=n.title,t[6]=s,t[7]=p):p=t[7];let m;t[8]===n.paragraphs?m=t[9]:(m=n.paragraphs.map(D),t[8]=n.paragraphs,t[9]=m);let h;t[10]!==o||t[11]!==n.log?(h=n.log!==void 0&&(0,T.jsx)(`section`,{"aria-label":o({id:`Oi56Cu`}),tabIndex:0,className:`subtle-scrollbar mt-0.5 mb-2.5 min-h-20 flex-1 overflow-auto rounded-lg border border-border border-dotted bg-muted/40 px-3 py-2.5 focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50`,children:(0,T.jsx)(`pre`,{className:`select-text whitespace-pre-wrap font-mono text-xs leading-relaxed wrap-anywhere`,children:n.log})}),t[10]=o,t[11]=n.log,t[12]=h):h=t[12];let g;t[13]===n.footnote?g=t[14]:(g=n.footnote!==void 0&&(0,T.jsx)(`p`,{className:`select-text text-muted-foreground text-xs wrap-anywhere`,children:n.footnote}),t[13]=n.footnote,t[14]=g);let _;t[15]!==l||t[16]!==m||t[17]!==h||t[18]!==g?(_=(0,T.jsxs)(`div`,{id:l,className:`flex min-h-0 flex-1 flex-col px-6 pt-1 pb-4 text-sm`,children:[m,h,g]}),t[15]=l,t[16]=m,t[17]=h,t[18]=g,t[19]=_):_=t[19];let v;t[20]!==n.cancelLabel||t[21]!==i?(v=n.cancelLabel!==void 0&&(0,T.jsx)(c,{type:`button`,variant:`outline-mono`,autoFocus:!0,onClick:i,children:n.cancelLabel}),t[20]=n.cancelLabel,t[21]=i,t[22]=v):v=t[22];let y=n.danger===!0?`destructive`:`default`,x=!u,C;t[23]!==n.confirmLabel||t[24]!==r||t[25]!==x||t[26]!==y?(C=(0,T.jsx)(c,{type:`button`,variant:y,autoFocus:x,onClick:r,children:n.confirmLabel}),t[23]=n.confirmLabel,t[24]=r,t[25]=x,t[26]=y,t[27]=C):C=t[27];let w;t[28]!==C||t[29]!==v?(w=(0,T.jsxs)(`footer`,{className:`flex items-center justify-end gap-2.5 border-border border-t bg-muted/50 px-6 pt-3.5 pb-4`,children:[v,C]}),t[28]=C,t[29]=v,t[30]=w):w=t[30];let E;return t[31]!==l||t[32]!==w||t[33]!==p||t[34]!==_||t[35]!==s?(E=(0,T.jsxs)(`div`,{role:`alertdialog`,"aria-labelledby":s,"aria-describedby":l,className:`flex h-dvh flex-col bg-background text-foreground`,children:[p,_,w]}),t[31]=l,t[32]=w,t[33]=p,t[34]=_,t[35]=s,t[36]=E):E=t[36],E}function D(e){return(0,T.jsx)(`p`,{className:`mb-2.5 leading-normal`,children:e},e)}function O(e){return e.open||e.running?`active`:e.recent?`recent`:null}function k(e){return e.split(`/`).filter(Boolean).at(-1)??e}function A(e){let t=(0,S.c)(9),{status:n}=e,{_:r}=a(),i;t[0]===r?i=t[1]:(i=r({id:`s_ereB`}),t[0]=r,t[1]=i);let o;t[2]===r?o=t[3]:(o=r({id:`_2cM9E`}),t[2]=r,t[3]=o);let s;t[4]!==i||t[5]!==o?(s={active:i,recent:o},t[4]=i,t[5]=o,t[6]=s):s=t[6];let c=s[n],l;return t[7]===c?l=t[8]:(l=(0,T.jsx)(v,{variant:`secondary`,className:`rounded-sm text-muted-foreground`,children:c}),t[7]=c,t[8]=l),l}function j(e){let t=(0,S.c)(28),{project:n,checked:r,onCheckedChange:i}=e,{_:o}=a(),s=(0,b.useId)(),c;t[0]===n?c=t[1]:(c=O(n),t[0]=n,t[1]=c);let d=c,f;t[2]===i?f=t[3]:(f=e=>i(e===!0),t[2]=i,t[3]=f);let p;t[4]!==o||t[5]!==n.path?(p=o({id:`CHfFN_`,values:{0:n.path}}),t[4]=o,t[5]=n.path,t[6]=p):p=t[6];let m;t[7]!==s||t[8]!==r||t[9]!==f||t[10]!==p?(m=(0,T.jsx)(l,{id:s,className:`mt-0.5`,checked:r,onCheckedChange:f,"aria-label":p}),t[7]=s,t[8]=r,t[9]=f,t[10]=p,t[11]=m):m=t[11];let h;t[12]===n.path?h=t[13]:(h=k(n.path),t[12]=n.path,t[13]=h);let g;t[14]===h?g=t[15]:(g=(0,T.jsx)(`span`,{className:`w-full truncate font-medium text-sm`,children:h}),t[14]=h,t[15]=g);let _;t[16]===n.path?_=t[17]:(_=(0,T.jsx)(`span`,{className:`w-full select-text break-words text-muted-foreground text-xs`,children:n.path}),t[16]=n.path,t[17]=_);let v;t[18]!==s||t[19]!==g||t[20]!==_?(v=(0,T.jsxs)(u,{htmlFor:s,className:`min-w-0 flex-col items-start gap-0.5 font-normal`,children:[g,_]}),t[18]=s,t[19]=g,t[20]=_,t[21]=v):v=t[21];let y;t[22]===d?y=t[23]:(y=d!==null&&(0,T.jsx)(`div`,{className:`flex justify-end max-sm:col-start-2 max-sm:justify-start`,children:(0,T.jsx)(A,{status:d})}),t[22]=d,t[23]=y);let x;return t[24]!==m||t[25]!==v||t[26]!==y?(x=(0,T.jsxs)(`div`,{className:`grid grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-2.5 border-border/60 border-b px-3 py-2.5 last:border-b-0 hover:bg-accent/40 max-sm:grid-cols-[auto_minmax(0,1fr)]`,children:[m,v,y]}),t[24]=m,t[25]=v,t[26]=y,t[27]=x):x=t[27],x}function M(e){let t=(0,S.c)(45),{projects:n,onConfirm:r,onCancel:o}=e,{_:s}=a(),[d,f]=(0,b.useState)(te),p=(0,b.useId)(),m=(0,b.useId)(),h=(0,b.useId)(),g=n.length>0&&d.size===n.length?!0:d.size>0?`indeterminate`:!1,_;t[0]===n?_=t[1]:(_=e=>f(e?new Set(n.map(ee)):new Set),t[0]=n,t[1]=_);let v=_,y,x;t[2]!==o||t[3]!==n?(y=()=>{let e=e=>{if(e.key===`Escape`){o();return}(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`a`&&(e.preventDefault(),f(new Set(n.map(P))))};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},x=[o,n],t[2]=o,t[3]=n,t[4]=y,t[5]=x):(y=t[4],x=t[5]),(0,b.useEffect)(y,x);let C;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,T.jsx)(i,{id:`PrVaZo`}),t[6]=C):C=t[6];let w;t[7]===p?w=t[8]:(w=(0,T.jsx)(`h1`,{id:p,className:`font-medium leading-none text-base`,children:C}),t[7]=p,t[8]=w);let E;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,T.jsx)(i,{id:`keop3U`}),t[9]=E):E=t[9];let D;t[10]===m?D=t[11]:(D=(0,T.jsx)(`p`,{id:m,className:`text-sm text-muted-foreground`,children:E}),t[10]=m,t[11]=D);let O;t[12]!==w||t[13]!==D?(O=(0,T.jsxs)(`header`,{className:`shrink-0 px-6 pt-5 pb-3.5 space-y-4`,children:[w,D]}),t[12]=w,t[13]=D,t[14]=O):O=t[14];let k;t[15]===s?k=t[16]:(k=s({id:`QySH4I`}),t[15]=s,t[16]=k);let A;t[17]!==s||t[18]!==n||t[19]!==h||t[20]!==g||t[21]!==d||t[22]!==v?(A=n.length===0?(0,T.jsx)(`div`,{className:`rounded-lg border border-border p-4`,children:(0,T.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:(0,T.jsx)(i,{id:`bKt9Jk`})})}):(0,T.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-border`,children:[(0,T.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2.5 border-border border-b px-3 py-2.5 bg-muted/30`,children:[(0,T.jsx)(l,{id:h,checked:g,onCheckedChange:e=>v(e===!0)}),(0,T.jsx)(u,{htmlFor:h,className:`flex-1 font-medium text-sm`,children:(0,T.jsx)(i,{id:`wgNoIs`})}),(0,T.jsxs)(`span`,{role:`status`,"aria-label":s({id:`nsUDL8`,values:{0:d.size,1:n.length}}),className:`text-muted-foreground text-xs tabular-nums`,children:[d.size,` / `,n.length]})]}),(0,T.jsx)(`div`,{className:`subtle-scrollbar min-h-0 flex-1 overflow-y-scroll [scrollbar-gutter:stable]`,children:n.map((e,t)=>(0,T.jsx)(j,{project:e,checked:d.has(t),onCheckedChange:e=>{f(n=>{let r=new Set(n);return e?r.add(t):r.delete(t),r})}},e.path))})]}),t[17]=s,t[18]=n,t[19]=h,t[20]=g,t[21]=d,t[22]=v,t[23]=A):A=t[23];let M;t[24]!==A||t[25]!==k?(M=(0,T.jsx)(`section`,{"aria-label":k,className:`flex min-h-0 flex-1 flex-col px-6 py-3.5`,children:A}),t[24]=A,t[25]=k,t[26]=M):M=t[26];let F;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,T.jsx)(i,{id:`dEgA5A`}),t[27]=F):F=t[27];let I;t[28]===o?I=t[29]:(I=(0,T.jsx)(c,{type:`button`,variant:`outline-mono`,autoFocus:!0,onClick:o,children:F}),t[28]=o,t[29]=I);let L;t[30]!==r||t[31]!==d?(L=()=>r([...d].sort(N)),t[30]=r,t[31]=d,t[32]=L):L=t[32];let R;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,T.jsx)(i,{id:`J7nMqi`}),t[33]=R):R=t[33];let z;t[34]===L?z=t[35]:(z=(0,T.jsx)(c,{type:`button`,variant:`destructive`,onClick:L,children:R}),t[34]=L,t[35]=z);let B;t[36]!==I||t[37]!==z?(B=(0,T.jsxs)(`footer`,{className:`flex items-center justify-end gap-2.5 border-border border-t bg-muted/50 px-6 pt-3.5 pb-4`,children:[I,z]}),t[36]=I,t[37]=z,t[38]=B):B=t[38];let V;return t[39]!==m||t[40]!==M||t[41]!==B||t[42]!==O||t[43]!==p?(V=(0,T.jsxs)(`div`,{role:`dialog`,"aria-labelledby":p,"aria-describedby":m,className:`flex h-dvh flex-col overflow-hidden bg-background text-foreground`,children:[O,M,B]}),t[39]=m,t[40]=M,t[41]=B,t[42]=O,t[43]=p,t[44]=V):V=t[44],V}function N(e,t){return e-t}function P(e,t){return t}function ee(e,t){return t}function te(){return new Set}function F(){let e=(0,S.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,T.jsx)(g,{"aria-hidden":`true`,className:`mx-auto mb-4 size-8 text-primary`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,T.jsx)(`h1`,{className:`mb-2 font-medium text-base leading-none`,children:(0,T.jsx)(i,{id:`j2229h`})}),e[1]=n):n=e[1];let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,T.jsx)(`main`,{className:`grid h-dvh place-items-center bg-background text-foreground`,children:(0,T.jsxs)(`div`,{role:`status`,className:`max-w-vw px-7 py-7 text-center`,children:[t,n,(0,T.jsx)(`p`,{className:`text-muted-foreground text-sm leading-relaxed`,children:(0,T.jsx)(i,{id:`kCjkGY`})})]})}),e[2]=r):r=e[2],r}function I(){let{_:e}=a();return{"workflow-fit":e({id:`5vAI6Z`}),"missing-feature":e({id:`cH0dkG`}),"hard-to-start":e({id:`uoJF_D`}),unreliable:e({id:`WGMoTY`}),"switched-tool":e({id:`jO18NZ`}),"one-off":e({id:`S3qu11`}),other:e({id:`aQyGJc`})}}function L(e){let t=(0,S.c)(86),{onSend:n,onSkip:r}=e,{_:o}=a(),s=I(),[h,g]=(0,b.useState)(``),[v,x]=(0,b.useState)(``),[C,w]=(0,b.useState)(!1),[E,D]=(0,b.useState)(``),O=(0,b.useRef)(null),k=(0,b.useId)(),A=(0,b.useId)(),j=(0,b.useId)(),M=(0,b.useId)(),N=(0,b.useId)(),P=(0,b.useId)(),ee,te;t[0]===C?(ee=t[1],te=t[2]):(ee=()=>{C&&O.current?.focus()},te=[C],t[0]=C,t[1]=ee,t[2]=te),(0,b.useEffect)(ee,te);let F;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,T.jsx)(i,{id:`ElyuiT`}),t[3]=F):F=t[3];let L;t[4]===k?L=t[5]:(L=(0,T.jsx)(`h1`,{id:k,className:`font-medium leading-none text-base`,children:F}),t[4]=k,t[5]=L);let R;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,T.jsx)(i,{id:`ZDOq9A`}),t[6]=R):R=t[6];let z;t[7]===A?z=t[8]:(z=(0,T.jsx)(`p`,{id:A,className:`text-muted-foreground text-sm`,children:R}),t[7]=A,t[8]=z);let B;t[9]!==L||t[10]!==z?(B=(0,T.jsxs)(`header`,{className:`px-6 pt-5 pb-3.5 space-y-4`,children:[L,z]}),t[9]=L,t[10]=z,t[11]=B):B=t[11];let V;t[12]!==E||t[13]!==C||t[14]!==v||t[15]!==n||t[16]!==h?(V=e=>{e.preventDefault();let t=v.trim(),r=C?E.trim():``;n({...h===``?{}:{reason:h},...t===``?{}:{note:t},...r===``?{}:{email:r}})},t[12]=E,t[13]=C,t[14]=v,t[15]=n,t[16]=h,t[17]=V):V=t[17];let ne;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,T.jsx)(i,{id:`oxdGJn`}),t[18]=ne):ne=t[18];let H;t[19]===j?H=t[20]:(H=(0,T.jsx)(`p`,{id:j,className:`mb-2 font-medium text-sm`,children:ne}),t[19]=j,t[20]=H);let U;t[21]!==j||t[22]!==s?(U=m.map(e=>(0,T.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md px-1 py-1`,children:[(0,T.jsx)(d,{id:`${j}-${e.value}`,value:e.value}),(0,T.jsx)(u,{htmlFor:`${j}-${e.value}`,className:`font-normal text-sm leading-snug`,children:s[e.value]})]},e.value)),t[21]=j,t[22]=s,t[23]=U):U=t[23];let W;t[24]!==j||t[25]!==h||t[26]!==U?(W=(0,T.jsx)(f,{"aria-labelledby":j,value:h,onValueChange:g,children:U}),t[24]=j,t[25]=h,t[26]=U,t[27]=W):W=t[27];let G;t[28]!==H||t[29]!==W?(G=(0,T.jsxs)(`div`,{className:`mb-6`,children:[H,W]}),t[28]=H,t[29]=W,t[30]=G):G=t[30];let re;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,T.jsx)(i,{id:`axQ1h6`}),t[31]=re):re=t[31];let K;t[32]===M?K=t[33]:(K=(0,T.jsx)(u,{htmlFor:M,className:`mb-2 font-medium text-sm`,children:re}),t[32]=M,t[33]=K);let ie;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(ie=e=>x(e.target.value),t[34]=ie):ie=t[34];let q;t[35]!==v||t[36]!==M?(q=(0,T.jsx)(y,{id:M,rows:3,maxLength:p,value:v,onChange:ie}),t[35]=v,t[36]=M,t[37]=q):q=t[37];let J;t[38]!==K||t[39]!==q?(J=(0,T.jsxs)(`div`,{className:`mb-6`,children:[K,q]}),t[38]=K,t[39]=q,t[40]=J):J=t[40];let ae;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(ae=e=>w(e===!0),t[41]=ae):ae=t[41];let Y;t[42]!==C||t[43]!==N?(Y=(0,T.jsx)(l,{id:N,checked:C,onCheckedChange:ae}),t[42]=C,t[43]=N,t[44]=Y):Y=t[44];let oe;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,T.jsx)(i,{id:`xEb24l`}),t[45]=oe):oe=t[45];let X;t[46]===N?X=t[47]:(X=(0,T.jsx)(u,{htmlFor:N,className:`font-medium text-sm`,children:oe}),t[46]=N,t[47]=X);let Z;t[48]!==Y||t[49]!==X?(Z=(0,T.jsxs)(`div`,{className:`mb-2 flex items-center gap-2.5`,children:[Y,X]}),t[48]=Y,t[49]=X,t[50]=Z):Z=t[50];let se=!C,ce;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,T.jsx)(i,{id:`ATGYL1`}),t[51]=ce):ce=t[51];let Q;t[52]===P?Q=t[53]:(Q=(0,T.jsx)(u,{htmlFor:P,className:`mb-2 font-medium text-sm sr-only`,children:ce}),t[52]=P,t[53]=Q);let $;t[54]===o?$=t[55]:($=o({id:`JHf6qZ`}),t[54]=o,t[55]=$);let le=!C,ue;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(ue=e=>D(e.target.value),t[56]=ue):ue=t[56];let de;t[57]!==E||t[58]!==P||t[59]!==$||t[60]!==le?(de=(0,T.jsx)(_,{id:P,ref:O,type:`email`,maxLength:320,autoComplete:`email`,spellCheck:!1,placeholder:$,disabled:le,value:E,onChange:ue}),t[57]=E,t[58]=P,t[59]=$,t[60]=le,t[61]=de):de=t[61];let fe;t[62]!==se||t[63]!==Q||t[64]!==de?(fe=(0,T.jsxs)(`div`,{className:`mb-6`,hidden:se,children:[Q,de]}),t[62]=se,t[63]=Q,t[64]=de,t[65]=fe):fe=t[65];let pe;t[66]!==G||t[67]!==J||t[68]!==Z||t[69]!==fe?(pe=(0,T.jsxs)(`div`,{className:`subtle-scrollbar min-h-0 flex-1 overflow-y-auto px-6 pt-1 pb-4`,children:[G,J,Z,fe]}),t[66]=G,t[67]=J,t[68]=Z,t[69]=fe,t[70]=pe):pe=t[70];let me;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,T.jsx)(i,{id:`6Uau97`}),t[71]=me):me=t[71];let he;t[72]===r?he=t[73]:(he=(0,T.jsx)(c,{type:`button`,variant:`outline-mono`,autoFocus:!0,onClick:r,children:me}),t[72]=r,t[73]=he);let ge;t[74]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,T.jsx)(c,{type:`submit`,children:(0,T.jsx)(i,{id:`xMsnTe`})}),t[74]=ge):ge=t[74];let _e;t[75]===he?_e=t[76]:(_e=(0,T.jsxs)(`footer`,{className:`flex items-center justify-end gap-2.5 border-border border-t bg-muted/50 px-6 pt-3.5 pb-4`,children:[he,ge]}),t[75]=he,t[76]=_e);let ve;t[77]!==pe||t[78]!==_e||t[79]!==V?(ve=(0,T.jsxs)(`form`,{className:`flex min-h-0 flex-1 flex-col`,onSubmit:V,children:[pe,_e]}),t[77]=pe,t[78]=_e,t[79]=V,t[80]=ve):ve=t[80];let ye;return t[81]!==A||t[82]!==ve||t[83]!==B||t[84]!==k?(ye=(0,T.jsxs)(`div`,{role:`dialog`,"aria-labelledby":k,"aria-describedby":A,className:`flex h-dvh flex-col bg-background text-foreground`,children:[B,ve]}),t[81]=A,t[82]=ve,t[83]=B,t[84]=k,t[85]=ye):ye=t[85],ye}function R(){let e=(0,S.c)(9),[t,n]=(0,b.useState)(null),r,a;if(e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=!0;return C().then(t=>{e&&n(t)}),()=>{e=!1}},a=[],e[0]=r,e[1]=a):(r=e[0],a=e[1]),(0,b.useEffect)(r,a),t!==null)switch(t.kind){case`picker`:{let n;return e[2]===t.projects?n=e[3]:(n=(0,T.jsx)(M,{projects:t.projects,onConfirm:U,onCancel:H}),e[2]=t.projects,e[3]=n),n}case`survey`:{let t;return e[4]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,T.jsx)(L,{onSend:ne,onSkip:V}),e[4]=t):t=e[4],t}case`progress`:{let t;return e[5]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,T.jsx)(F,{}),e[5]=t):t=e[5],t}case`notice`:{let n;return e[6]===t.notice?n=e[7]:(n=(0,T.jsx)(E,{notice:t.notice,onConfirm:B,onCancel:z}),e[6]=t.notice,e[7]=n),n}default:return t}let o;return e[8]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,T.jsx)(`main`,{className:`flex min-h-dvh items-center justify-center bg-background p-8 text-foreground`,children:(0,T.jsx)(`p`,{className:`text-center text-muted-foreground text-sm`,children:(0,T.jsx)(i,{id:`tzGWeg`})})}),e[8]=o):o=e[8],o}function z(){return w({kind:`notice-cancel`})}function B(){return w({kind:`notice-confirm`})}function V(){return w({kind:`survey-skip`})}function ne(e){return w({kind:`survey-send`,...e})}function H(){return w({kind:`picker-cancel`})}function U(e){return w({kind:`picker-confirm`,selectedIndexes:e})}var W=document.getElementById(`root`);if(!W)throw Error(`Root element not found`);(0,x.createRoot)(W).render((0,T.jsx)(b.StrictMode,{children:(0,T.jsx)(o,{i18n:h,children:(0,T.jsx)(R,{})})}));
@@ -1 +1 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{i as t}from"./DocumentContext-JLD5PPhL.js";import{t as n}from"./react-f2sANaYj.js";import{t as r}from"./compiler-runtime-BfE3aGVn.js";import{Dt as i,i as a,r as o}from"./dist-BtM-eRCP.js";import{v as s}from"./documents-events-BWGH8AZm.js";import{rt as c}from"./CodeMirrorPropInput-BHl8UEr3.js";import{n as l}from"./agent-presence-Co1vuBcW.js";import{t as u}from"./lru-string-cache-Dfb6RGWx.js";var d=r(),f=e(n(),1),p=500,m=64;async function h(e){let t=`/api/agent-activity?agentId=${encodeURIComponent(e)}`,n=await fetch(t),r;try{r=await n.json()}catch(e){throw new c(`Could not parse /api/agent-activity response.`,{cause:e,status:n.status})}if(!n.ok){let e=i.safeParse(r);throw e.success?Error(e.data.title):new c(`/api/agent-activity returned a non-RFC-9457 error response.`,{cause:e.error,status:n.status})}let a=o.safeParse(r);if(!a.success)throw new c(`/api/agent-activity returned a body that did not match AgentActivitySuccessSchema.`,{cause:a.error,status:n.status});return a.data}async function g(e,t,n){let r=`/api/agent-burst-diff?agentId=${encodeURIComponent(e)}&docName=${encodeURIComponent(t)}&keptCount=${n}`,o=await fetch(r),s;try{s=await o.json()}catch(e){throw new c(`Could not parse /api/agent-burst-diff response.`,{cause:e,status:o.status})}if(!o.ok){let e=i.safeParse(s);throw e.success?Error(e.data.title):new c(`/api/agent-burst-diff returned a non-RFC-9457 error response.`,{cause:e.error,status:o.status})}let l=a.safeParse(s);if(!l.success)throw new c(`/api/agent-burst-diff returned a body that did not match AgentBurstDiffSuccessSchema.`,{cause:l.error,status:o.status});let{diff:u,before:d,after:f,properties:p}=l.data;return{diff:u,before:d,after:f,properties:p}}function _(e){let n=(0,d.c)(23),{systemProvider:r}=t(),[i,a]=(0,f.useState)(null),[o,c]=(0,f.useState)(`idle`),[l,_]=(0,f.useState)(null),b;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=new u(m),n[0]=b):b=n[0];let x=(0,f.useRef)(b),S=(0,f.useRef)(0),C;n[1]===r?C=n[2]:(C=e=>{let t=S.current+=1;c(`loading`),_(null),h(e).then(n=>{if(S.current!==t)return;let i=y(r,e);a({...n,writingDocs:i}),c(`ready`)}).catch(e=>{S.current===t&&(_(e instanceof Error?e.message:String(e)),c(`error`))})},n[1]=r,n[2]=C);let w=C,T;n[3]!==e||n[4]!==w?(T=()=>{if(!e){S.current+=1,a(null),c(`idle`),_(null),x.current.clear();return}x.current.clear(),w(e);let t=null,n=s(n=>{n.includes(`session-activity`)&&(t&&clearTimeout(t),t=setTimeout(()=>{t=null,w(e)},p))});return()=>{t&&clearTimeout(t),n()}},n[3]=e,n[4]=w,n[5]=T):T=n[5];let E;n[6]===e?E=n[7]:(E=[e],n[6]=e,n[7]=E),(0,f.useEffect)(T,E);let D,O;n[8]!==e||n[9]!==r?(D=()=>{if(!e||!r)return;let t=()=>{if(!r.awareness)return;let t=y(r,e);a(e=>!e||v(e.writingDocs,t)?e:{...e,writingDocs:t})},n=r.awareness;if(!n||typeof n.on!=`function`){t();return}n.on(`update`,t),t();let i=setInterval(t,1e3);return()=>{clearInterval(i),typeof n.off==`function`&&n.off(`update`,t)}},O=[e,r],n[8]=e,n[9]=r,n[10]=D,n[11]=O):(D=n[10],O=n[11]),(0,f.useEffect)(D,O);let k;n[12]===e?k=n[13]:(k=async(t,n)=>{if(!e)return``;let r=`${t}\0${n}`,i=x.current.get(r);if(i!==void 0)return i;let{diff:a}=await g(e,t,n);return x.current.set(r,a),a},n[12]=e,n[13]=k);let A=k,j;n[14]!==e||n[15]!==w?(j=()=>{e&&w(e)},n[14]=e,n[15]=w,n[16]=j):j=n[16];let M=j,N;return n[17]!==i||n[18]!==l||n[19]!==A||n[20]!==M||n[21]!==o?(N={data:i,status:o,error:l,reload:M,fetchBurstDiff:A},n[17]=i,n[18]=l,n[19]=A,n[20]=M,n[21]=o,n[22]=N):N=n[22],N}function v(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function y(e,t){let n=new Set;if(!e)return n;let r=e.awareness;if(!l(r))return n;let i=[t,t.startsWith(`agent-`)?t.slice(6):`agent-${t}`];for(let e of r.getStates().values()){let t=e.agentPresence;if(t)for(let e of i){let r=t[e];r&&r.mode===`writing`&&r.currentDoc&&n.add(r.currentDoc)}}return n}export{_ as n,g as t};
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{i as t}from"./DocumentContext-C9S71wln.js";import{t as n}from"./react-f2sANaYj.js";import{t as r}from"./compiler-runtime-BfE3aGVn.js";import{Dt as i,i as a,r as o}from"./dist-CsoN3WVg.js";import{v as s}from"./documents-events-KOPTKKT9.js";import{rt as c}from"./CodeMirrorPropInput-D7qjFBS1.js";import{n as l}from"./agent-presence-Co1vuBcW.js";import{t as u}from"./lru-string-cache-Dfb6RGWx.js";var d=r(),f=e(n(),1),p=500,m=64;async function h(e){let t=`/api/agent-activity?agentId=${encodeURIComponent(e)}`,n=await fetch(t),r;try{r=await n.json()}catch(e){throw new c(`Could not parse /api/agent-activity response.`,{cause:e,status:n.status})}if(!n.ok){let e=i.safeParse(r);throw e.success?Error(e.data.title):new c(`/api/agent-activity returned a non-RFC-9457 error response.`,{cause:e.error,status:n.status})}let a=o.safeParse(r);if(!a.success)throw new c(`/api/agent-activity returned a body that did not match AgentActivitySuccessSchema.`,{cause:a.error,status:n.status});return a.data}async function g(e,t,n){let r=`/api/agent-burst-diff?agentId=${encodeURIComponent(e)}&docName=${encodeURIComponent(t)}&keptCount=${n}`,o=await fetch(r),s;try{s=await o.json()}catch(e){throw new c(`Could not parse /api/agent-burst-diff response.`,{cause:e,status:o.status})}if(!o.ok){let e=i.safeParse(s);throw e.success?Error(e.data.title):new c(`/api/agent-burst-diff returned a non-RFC-9457 error response.`,{cause:e.error,status:o.status})}let l=a.safeParse(s);if(!l.success)throw new c(`/api/agent-burst-diff returned a body that did not match AgentBurstDiffSuccessSchema.`,{cause:l.error,status:o.status});let{diff:u,before:d,after:f,properties:p}=l.data;return{diff:u,before:d,after:f,properties:p}}function _(e){let n=(0,d.c)(23),{systemProvider:r}=t(),[i,a]=(0,f.useState)(null),[o,c]=(0,f.useState)(`idle`),[l,_]=(0,f.useState)(null),b;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=new u(m),n[0]=b):b=n[0];let x=(0,f.useRef)(b),S=(0,f.useRef)(0),C;n[1]===r?C=n[2]:(C=e=>{let t=S.current+=1;c(`loading`),_(null),h(e).then(n=>{if(S.current!==t)return;let i=y(r,e);a({...n,writingDocs:i}),c(`ready`)}).catch(e=>{S.current===t&&(_(e instanceof Error?e.message:String(e)),c(`error`))})},n[1]=r,n[2]=C);let w=C,T;n[3]!==e||n[4]!==w?(T=()=>{if(!e){S.current+=1,a(null),c(`idle`),_(null),x.current.clear();return}x.current.clear(),w(e);let t=null,n=s(n=>{n.includes(`session-activity`)&&(t&&clearTimeout(t),t=setTimeout(()=>{t=null,w(e)},p))});return()=>{t&&clearTimeout(t),n()}},n[3]=e,n[4]=w,n[5]=T):T=n[5];let E;n[6]===e?E=n[7]:(E=[e],n[6]=e,n[7]=E),(0,f.useEffect)(T,E);let D,O;n[8]!==e||n[9]!==r?(D=()=>{if(!e||!r)return;let t=()=>{if(!r.awareness)return;let t=y(r,e);a(e=>!e||v(e.writingDocs,t)?e:{...e,writingDocs:t})},n=r.awareness;if(!n||typeof n.on!=`function`){t();return}n.on(`update`,t),t();let i=setInterval(t,1e3);return()=>{clearInterval(i),typeof n.off==`function`&&n.off(`update`,t)}},O=[e,r],n[8]=e,n[9]=r,n[10]=D,n[11]=O):(D=n[10],O=n[11]),(0,f.useEffect)(D,O);let k;n[12]===e?k=n[13]:(k=async(t,n)=>{if(!e)return``;let r=`${t}\0${n}`,i=x.current.get(r);if(i!==void 0)return i;let{diff:a}=await g(e,t,n);return x.current.set(r,a),a},n[12]=e,n[13]=k);let A=k,j;n[14]!==e||n[15]!==w?(j=()=>{e&&w(e)},n[14]=e,n[15]=w,n[16]=j):j=n[16];let M=j,N;return n[17]!==i||n[18]!==l||n[19]!==A||n[20]!==M||n[21]!==o?(N={data:i,status:o,error:l,reload:M,fetchBurstDiff:A},n[17]=i,n[18]=l,n[19]=A,n[20]=M,n[21]=o,n[22]=N):N=n[22],N}function v(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function y(e,t){let n=new Set;if(!e)return n;let r=e.awareness;if(!l(r))return n;let i=[t,t.startsWith(`agent-`)?t.slice(6):`agent-${t}`];for(let e of r.getStates().values()){let t=e.agentPresence;if(t)for(let e of i){let r=t[e];r&&r.mode===`writing`&&r.currentDoc&&n.add(r.currentDoc)}}return n}export{_ as n,g as t};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{d as r,f as i,g as a,h as o,m as s,p as c}from"./dist-BtM-eRCP.js";var l=e(t(),1),u=n();async function d(e){let t;try{t=await fetch(`/api/config`,{signal:e,headers:{Accept:`application/json`}})}catch(e){if(e.name===`AbortError`)throw e;return{status:`error`,code:`network`}}if(t.status===404||t.status===501)return{status:`absent`};if(!t.ok)return{status:`error`,code:t.status};let n;try{n=await t.json()}catch{return{status:`error`,code:`invalid-body`}}if(typeof n!=`object`||!n||Array.isArray(n))return{status:`error`,code:`invalid-body`};let r=n;return{status:`ok`,config:{collabUrl:typeof r.collabUrl==`string`?r.collabUrl:null,previewUrl:typeof r.previewUrl==`string`?r.previewUrl:null,port:typeof r.port==`number`?r.port:0,singleFile:r.singleFile===!0}}}function f(e){return b(e,s)}function p(e){return b(e,a)}function m(e){return b(e,r)}function h(e){return b(e,c)}function g(e){return b(e,i)}function _(e){let t=b(e,o);if(!t)return null;try{return{docName:t.docName,sv:v(t.sv)}}catch{return null}}function v(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function y(e,t){let n=p(e);if(n){t.onServerInfo?.(n);return}let r=m(e);if(r){t.onBranchSwitched?.(r);return}let i=_(e);if(i){t.onDiskAck?.(i);return}let a=f(e);if(a){t.onDerivedView?.(a);return}let o=h(e);if(o){t.onConfigValidationRejected?.(o);return}let s=g(e);if(s){t.onConfigIgnoreNestedError?.(s);return}t.onUnknown?.(e)}function b(e,t){let n;try{n=JSON.parse(e)}catch{return null}let r=t.safeParse(n);return r.success?r.data:null}function x(){return typeof location>`u`?`ws://localhost/collab`:`${location.protocol===`https:`?`wss`:`ws`}://${location.host}/collab`}function S(e){if(e===void 0)return null;let t=e.okDesktop;return!t||!t.config.collabUrl||t.config.collabUrl.length===0?null:t}function C(e){return{collabUrl:e.collabUrl,attempts:0,terminal:!1,lastError:null}}var w=2e3,T=15e3;function E(e){return e?C(e):{collabUrl:null,attempts:0,terminal:!1,lastError:null}}function D(e){let t=e.terminalAfterMs??3e4,n=e.initialDelayMs??w,r=e.maxDelayMs??T,i=e.log??{info:console.info,warn:console.warn},a=new AbortController,o=null,s=n,c=0,l=!1,u=!1,d=null,f=e.now(),p=async()=>{c+=1;let n=null;try{let t=await e.fetchConfig(a.signal);t.status===`absent`?(n=e.fallbackUrl(),d=null):t.status===`ok`&&t.config.collabUrl!==null?(n=t.config.collabUrl,d=null):t.status===`ok`?(u||(u=!0,i.info(`[collab-url] server responded but server.lock has no port yet — retrying`)),d={kind:`null-collab`}):t.status===`error`&&(i.warn(`[collab-url] /api/config error (${t.code}) — retrying in ${s}ms`),d={kind:`error`,code:t.code})}catch(e){if(e.name===`AbortError`)return;d={kind:`error`,code:`network`}}if(!l){if(n!==null){e.onStateChange({collabUrl:n,attempts:c,terminal:!1,lastError:null});return}if(e.now()-f>=t){e.onStateChange({collabUrl:null,attempts:c,terminal:!0,lastError:d});return}e.onStateChange({collabUrl:null,attempts:c,terminal:!1,lastError:d}),o=e.setTimeout(()=>{p()},s),s=Math.min(s*2,r)}};return p(),{cancel:()=>{l=!0,a.abort(),o!==null&&(e.clearTimeout(o),o=null)}}}function O(){let e=(0,u.c)(7),[t,n]=(0,l.useState)(N),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={token:0},e[0]=r):r=e[0];let i=(0,l.useRef)(r),[a,o]=(0,l.useState)(0),s;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=i.current.token=i.current.token+1,t=S(window);if(t){n(C(t.config));let r=t.onProjectSwitched(t=>{e===i.current.token&&n(C(t))});return()=>{r()}}let r=D({fetchConfig:d,fallbackUrl:x,now:Date.now,setTimeout:M,clearTimeout:j,onStateChange:t=>{e===i.current.token&&n(t)}});return()=>{r.cancel()}},e[1]=s):s=e[1];let c;e[2]===a?c=e[3]:(c=[a],e[2]=a,e[3]=c),(0,l.useEffect)(s,c);let f;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=()=>{i.current.token=i.current.token+1,n(A),o(k)},e[4]=f):f=e[4];let p=f,m;return e[5]===t?m=e[6]:(m={...t,retry:p},e[5]=t,e[6]=m),m}function k(e){return e+1}function A(e){return{...e,terminal:!1,lastError:null}}function j(e){return globalThis.clearTimeout(e)}function M(e,t){return globalThis.setTimeout(e,t)}function N(){return E(S(typeof window>`u`?void 0:window)?.config)}export{d as i,O as n,y as r,S as t};
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{d as r,f as i,g as a,h as o,m as s,p as c}from"./dist-CsoN3WVg.js";var l=e(t(),1),u=n();async function d(e){let t;try{t=await fetch(`/api/config`,{signal:e,headers:{Accept:`application/json`}})}catch(e){if(e.name===`AbortError`)throw e;return{status:`error`,code:`network`}}if(t.status===404||t.status===501)return{status:`absent`};if(!t.ok)return{status:`error`,code:t.status};let n;try{n=await t.json()}catch{return{status:`error`,code:`invalid-body`}}if(typeof n!=`object`||!n||Array.isArray(n))return{status:`error`,code:`invalid-body`};let r=n;return{status:`ok`,config:{collabUrl:typeof r.collabUrl==`string`?r.collabUrl:null,previewUrl:typeof r.previewUrl==`string`?r.previewUrl:null,port:typeof r.port==`number`?r.port:0,singleFile:r.singleFile===!0}}}function f(e){return b(e,s)}function p(e){return b(e,a)}function m(e){return b(e,r)}function h(e){return b(e,c)}function g(e){return b(e,i)}function _(e){let t=b(e,o);if(!t)return null;try{return{docName:t.docName,sv:v(t.sv)}}catch{return null}}function v(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function y(e,t){let n=p(e);if(n){t.onServerInfo?.(n);return}let r=m(e);if(r){t.onBranchSwitched?.(r);return}let i=_(e);if(i){t.onDiskAck?.(i);return}let a=f(e);if(a){t.onDerivedView?.(a);return}let o=h(e);if(o){t.onConfigValidationRejected?.(o);return}let s=g(e);if(s){t.onConfigIgnoreNestedError?.(s);return}t.onUnknown?.(e)}function b(e,t){let n;try{n=JSON.parse(e)}catch{return null}let r=t.safeParse(n);return r.success?r.data:null}function x(){return typeof location>`u`?`ws://localhost/collab`:`${location.protocol===`https:`?`wss`:`ws`}://${location.host}/collab`}function S(e){if(e===void 0)return null;let t=e.okDesktop;return!t||!t.config.collabUrl||t.config.collabUrl.length===0?null:t}function C(e){return{collabUrl:e.collabUrl,attempts:0,terminal:!1,lastError:null}}var w=2e3,T=15e3;function E(e){return e?C(e):{collabUrl:null,attempts:0,terminal:!1,lastError:null}}function D(e){let t=e.terminalAfterMs??3e4,n=e.initialDelayMs??w,r=e.maxDelayMs??T,i=e.log??{info:console.info,warn:console.warn},a=new AbortController,o=null,s=n,c=0,l=!1,u=!1,d=null,f=e.now(),p=async()=>{c+=1;let n=null;try{let t=await e.fetchConfig(a.signal);t.status===`absent`?(n=e.fallbackUrl(),d=null):t.status===`ok`&&t.config.collabUrl!==null?(n=t.config.collabUrl,d=null):t.status===`ok`?(u||(u=!0,i.info(`[collab-url] server responded but server.lock has no port yet — retrying`)),d={kind:`null-collab`}):t.status===`error`&&(i.warn(`[collab-url] /api/config error (${t.code}) — retrying in ${s}ms`),d={kind:`error`,code:t.code})}catch(e){if(e.name===`AbortError`)return;d={kind:`error`,code:`network`}}if(!l){if(n!==null){e.onStateChange({collabUrl:n,attempts:c,terminal:!1,lastError:null});return}if(e.now()-f>=t){e.onStateChange({collabUrl:null,attempts:c,terminal:!0,lastError:d});return}e.onStateChange({collabUrl:null,attempts:c,terminal:!1,lastError:d}),o=e.setTimeout(()=>{p()},s),s=Math.min(s*2,r)}};return p(),{cancel:()=>{l=!0,a.abort(),o!==null&&(e.clearTimeout(o),o=null)}}}function O(){let e=(0,u.c)(7),[t,n]=(0,l.useState)(N),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={token:0},e[0]=r):r=e[0];let i=(0,l.useRef)(r),[a,o]=(0,l.useState)(0),s;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=i.current.token=i.current.token+1,t=S(window);if(t){n(C(t.config));let r=t.onProjectSwitched(t=>{e===i.current.token&&n(C(t))});return()=>{r()}}let r=D({fetchConfig:d,fallbackUrl:x,now:Date.now,setTimeout:M,clearTimeout:j,onStateChange:t=>{e===i.current.token&&n(t)}});return()=>{r.cancel()}},e[1]=s):s=e[1];let c;e[2]===a?c=e[3]:(c=[a],e[2]=a,e[3]=c),(0,l.useEffect)(s,c);let f;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=()=>{i.current.token=i.current.token+1,n(A),o(k)},e[4]=f):f=e[4];let p=f,m;return e[5]===t?m=e[6]:(m={...t,retry:p},e[5]=t,e[6]=m),m}function k(e){return e+1}function A(e){return{...e,terminal:!1,lastError:null}}function j(e){return globalThis.clearTimeout(e)}function M(e,t){return globalThis.setTimeout(e,t)}function N(){return E(S(typeof window>`u`?void 0:window)?.config)}export{d as i,O as n,y as r,S as t};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{v as r}from"./documents-events-BWGH8AZm.js";var i=n(),a=e(t(),1);async function o(){try{let e=await fetch(`/api/sync/conflicts`);return e.ok?{conflicts:(await e.json()).conflicts??[]}:(console.warn(JSON.stringify({event:`conflicts-fetch-failed`,status:e.status})),{conflicts:[],error:`server`})}catch(e){return console.warn(JSON.stringify({event:`conflicts-fetch-failed`,status:null,detail:e instanceof Error?e.message:String(e)})),{conflicts:[],error:`network`}}}function s(){let e=(0,i.c)(10),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0];let[n,s]=(0,a.useState)(t),[c,l]=(0,a.useState)(!0),[u,d]=(0,a.useState)(null),f=(0,a.useRef)(0),p;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(p=function(){let e=f.current+=1;o().then(t=>{let{conflicts:n,error:r}=t;e===f.current&&(r===void 0&&s(n),d(r??null),l(!1))})},e[1]=p):p=e[1];let m=p,h,g;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>{m()},g=[],e[2]=h,e[3]=g):(h=e[2],g=e[3]),(0,a.useEffect)(h,g);let _,v;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>r(e=>{e.includes(`sync-status`)&&m()}),v=[],e[4]=_,e[5]=v):(_=e[4],v=e[5]),(0,a.useEffect)(_,v);let y;return e[6]!==n||e[7]!==u||e[8]!==c?(y={conflicts:n,loading:c,error:u},e[6]=n,e[7]=u,e[8]=c,e[9]=y):y=e[9],y}export{s as t};
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{v as r}from"./documents-events-KOPTKKT9.js";var i=n(),a=e(t(),1);async function o(){try{let e=await fetch(`/api/sync/conflicts`);return e.ok?{conflicts:(await e.json()).conflicts??[]}:(console.warn(JSON.stringify({event:`conflicts-fetch-failed`,status:e.status})),{conflicts:[],error:`server`})}catch(e){return console.warn(JSON.stringify({event:`conflicts-fetch-failed`,status:null,detail:e instanceof Error?e.message:String(e)})),{conflicts:[],error:`network`}}}function s(){let e=(0,i.c)(10),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0];let[n,s]=(0,a.useState)(t),[c,l]=(0,a.useState)(!0),[u,d]=(0,a.useState)(null),f=(0,a.useRef)(0),p;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(p=function(){let e=f.current+=1;o().then(t=>{let{conflicts:n,error:r}=t;e===f.current&&(r===void 0&&s(n),d(r??null),l(!1))})},e[1]=p):p=e[1];let m=p,h,g;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>{m()},g=[],e[2]=h,e[3]=g):(h=e[2],g=e[3]),(0,a.useEffect)(h,g);let _,v;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>r(e=>{e.includes(`sync-status`)&&m()}),v=[],e[4]=_,e[5]=v):(_=e[4],v=e[5]),(0,a.useEffect)(_,v);let y;return e[6]!==n||e[7]!==u||e[8]!==c?(y={conflicts:n,loading:c,error:u},e[6]=n,e[7]=u,e[8]=c,e[9]=y):y=e[9],y}export{s as t};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{r,t as i}from"./css-color-to-hex-DkX_3Tbi.js";var a=e(t(),1),o=n(),s={background:`#171717`,foreground:`#e5e5e5`,cursor:`#e5e5e5`,cursorAccent:`#171717`,selectionBackground:`#3a3d41`,black:`#000000`,red:`#cd3131`,green:`#0dbc79`,yellow:`#e5e510`,blue:`#2472c8`,magenta:`#bc3fbc`,cyan:`#11a8cd`,white:`#e5e5e5`,brightBlack:`#666666`,brightRed:`#f14c4c`,brightGreen:`#23d18b`,brightYellow:`#f5f543`,brightBlue:`#3b8eea`,brightMagenta:`#d670d6`,brightCyan:`#29b8db`,brightWhite:`#ffffff`},c={background:`#ffffff`,foreground:`#262626`,cursor:`#262626`,cursorAccent:`#ffffff`,selectionBackground:`#add6ff`,black:`#000000`,red:`#cd3131`,green:`#00bc00`,yellow:`#949800`,blue:`#0451a5`,magenta:`#bc05bc`,cyan:`#0598bc`,white:`#555555`,brightBlack:`#666666`,brightRed:`#cd3131`,brightGreen:`#14ce14`,brightYellow:`#b5ba00`,brightBlue:`#0451a5`,brightMagenta:`#bc05bc`,brightCyan:`#0598bc`,brightWhite:`#a5a5a5`};function l(e){return e===`dark`?s:c}function u(e){return!e||e===`rgba(0, 0, 0, 0)`||e===`transparent`||e.includes(`var(`)?null:i(e,{alpha:!0})}function d(e){let t=new Map;if(typeof document>`u`||!document.body)return t;let n=document.createDocumentFragment(),r=e.map(e=>{let t=document.createElement(`span`);return t.style.display=`none`,t.style.backgroundColor=`var(${e})`,n.appendChild(t),{token:e,probe:t}});document.body.appendChild(n);try{for(let{token:e,probe:n}of r)t.set(e,u(getComputedStyle(n).backgroundColor))}finally{for(let{probe:e}of r)e.remove()}return t}var f={black:`--ansi-black`,red:`--ansi-red`,green:`--ansi-green`,yellow:`--ansi-yellow`,blue:`--ansi-blue`,magenta:`--ansi-magenta`,cyan:`--ansi-cyan`,white:`--ansi-white`,brightBlack:`--ansi-bright-black`,brightRed:`--ansi-bright-red`,brightGreen:`--ansi-bright-green`,brightYellow:`--ansi-bright-yellow`,brightBlue:`--ansi-bright-blue`,brightMagenta:`--ansi-bright-magenta`,brightCyan:`--ansi-bright-cyan`,brightWhite:`--ansi-bright-white`},p=[`--background`,`--foreground`,`--selection-soft`,...Object.values(f)];function m(){let e=d(p);return t=>e.get(t)??null}var h=-1,g=null;function _(e){return(h!==e||g===null)&&(h=e,g=m(),typeof requestAnimationFrame==`function`&&requestAnimationFrame(()=>{h=-1,g=null})),g}function v(e,t=m()){let n=l(e),r=t(`--background`)??n.background,i=t(`--foreground`)??n.foreground,a={};for(let e of Object.keys(f)){let n=t(f[e]);n&&(a[e]=n)}return{...n,...a,background:r,foreground:i,cursor:i,cursorAccent:r,selectionBackground:t(`--selection-soft`)??n.selectionBackground}}function y(e,t){let n=new Set([...Object.keys(e),...Object.keys(t)]);for(let r of n)if(e[r]!==t[r])return!1;return!0}function b(e){let t=(0,o.c)(7),n=r(),i;t[0]!==n||t[1]!==e?(i=()=>v(e,_(n)),t[0]=n,t[1]=e,t[2]=i):i=t[2];let[s,c]=(0,a.useState)(i),l,u;return t[3]!==n||t[4]!==e?(l=()=>{let t=v(e,_(n));c(e=>y(e,t)?e:t)},u=[n,e],t[3]=n,t[4]=e,t[5]=l,t[6]=u):(l=t[5],u=t[6]),(0,a.useEffect)(l,u),s}export{b as t};
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{r,t as i}from"./css-color-to-hex-DSVb9_xg.js";var a=e(t(),1),o=n(),s={background:`#171717`,foreground:`#e5e5e5`,cursor:`#e5e5e5`,cursorAccent:`#171717`,selectionBackground:`#3a3d41`,black:`#000000`,red:`#cd3131`,green:`#0dbc79`,yellow:`#e5e510`,blue:`#2472c8`,magenta:`#bc3fbc`,cyan:`#11a8cd`,white:`#e5e5e5`,brightBlack:`#666666`,brightRed:`#f14c4c`,brightGreen:`#23d18b`,brightYellow:`#f5f543`,brightBlue:`#3b8eea`,brightMagenta:`#d670d6`,brightCyan:`#29b8db`,brightWhite:`#ffffff`},c={background:`#ffffff`,foreground:`#262626`,cursor:`#262626`,cursorAccent:`#ffffff`,selectionBackground:`#add6ff`,black:`#000000`,red:`#cd3131`,green:`#00bc00`,yellow:`#949800`,blue:`#0451a5`,magenta:`#bc05bc`,cyan:`#0598bc`,white:`#555555`,brightBlack:`#666666`,brightRed:`#cd3131`,brightGreen:`#14ce14`,brightYellow:`#b5ba00`,brightBlue:`#0451a5`,brightMagenta:`#bc05bc`,brightCyan:`#0598bc`,brightWhite:`#a5a5a5`};function l(e){return e===`dark`?s:c}function u(e){return!e||e===`rgba(0, 0, 0, 0)`||e===`transparent`||e.includes(`var(`)?null:i(e,{alpha:!0})}function d(e){let t=new Map;if(typeof document>`u`||!document.body)return t;let n=document.createDocumentFragment(),r=e.map(e=>{let t=document.createElement(`span`);return t.style.display=`none`,t.style.backgroundColor=`var(${e})`,n.appendChild(t),{token:e,probe:t}});document.body.appendChild(n);try{for(let{token:e,probe:n}of r)t.set(e,u(getComputedStyle(n).backgroundColor))}finally{for(let{probe:e}of r)e.remove()}return t}var f={black:`--ansi-black`,red:`--ansi-red`,green:`--ansi-green`,yellow:`--ansi-yellow`,blue:`--ansi-blue`,magenta:`--ansi-magenta`,cyan:`--ansi-cyan`,white:`--ansi-white`,brightBlack:`--ansi-bright-black`,brightRed:`--ansi-bright-red`,brightGreen:`--ansi-bright-green`,brightYellow:`--ansi-bright-yellow`,brightBlue:`--ansi-bright-blue`,brightMagenta:`--ansi-bright-magenta`,brightCyan:`--ansi-bright-cyan`,brightWhite:`--ansi-bright-white`},p=[`--background`,`--foreground`,`--selection-soft`,...Object.values(f)];function m(){let e=d(p);return t=>e.get(t)??null}var h=-1,g=null;function _(e){return(h!==e||g===null)&&(h=e,g=m(),typeof requestAnimationFrame==`function`&&requestAnimationFrame(()=>{h=-1,g=null})),g}function v(e,t=m()){let n=l(e),r=t(`--background`)??n.background,i=t(`--foreground`)??n.foreground,a={};for(let e of Object.keys(f)){let n=t(f[e]);n&&(a[e]=n)}return{...n,...a,background:r,foreground:i,cursor:i,cursorAccent:r,selectionBackground:t(`--selection-soft`)??n.selectionBackground}}function y(e,t){let n=new Set([...Object.keys(e),...Object.keys(t)]);for(let r of n)if(e[r]!==t[r])return!1;return!0}function b(e){let t=(0,o.c)(7),n=r(),i;t[0]!==n||t[1]!==e?(i=()=>v(e,_(n)),t[0]=n,t[1]=e,t[2]=i):i=t[2];let[s,c]=(0,a.useState)(i),l,u;return t[3]!==n||t[4]!==e?(l=()=>{let t=v(e,_(n));c(e=>y(e,t)?e:t)},u=[n,e],t[3]=n,t[4]=e,t[5]=l,t[6]=u):(l=t[5],u=t[6]),(0,a.useEffect)(l,u),s}export{b as t};
@@ -1 +1 @@
1
- import{i as e}from"./DocumentContext-JLD5PPhL.js";import{t}from"./compiler-runtime-BfE3aGVn.js";import{Ys as n}from"./dist-BtM-eRCP.js";import{n as r}from"./dist-CJhtNlOm2.js";import{t as i}from"./dist-Cr4-nBVI.js";import{d as a,r as o}from"./documents-events-BWGH8AZm.js";import{t as s}from"./createLucideIcon-B6ULg5PN.js";import{_ as c,f as l,h as u,l as d,v as f}from"./doc-hash-DuqGWmIR.js";import{u as p}from"./navigation-targets-CQLH4NW1.js";import{_ as m}from"./skills-api-C3qsIon9.js";import{n as h,t as g}from"./use-skills-CSN-LidQ.js";var _=s(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),v=t();function y(e){if(typeof window>`u`)return;let t=d(e);u(window.location.hash,t)||(window.location.hash=t)}function b(e){if(typeof window>`u`)return;let t=l(e);window.location.hash!==t&&(window.location.hash=t)}var x=null,S=new Set;function C(){return x}function w(e){return S.add(e),()=>{S.delete(e)}}function T(){for(let e of S)e()}function E(e){x!==null&&x.scope===e.scope&&x.name===e.name||(x=e,T())}function D(){x!==null&&(x=null,T())}function O(){let t=(0,v.c)(4),{openTarget:s}=e(),l=g(),u;return t[0]!==s||t[1]!==l.data||t[2]!==l.status?(u=(e,t,u)=>{let g=n=>{l.status===`ready`&&l.data.some(n=>n.scope===e&&n.name===t)||(o(e,t),h(e,t).then(()=>a(e,t))),s({kind:`doc`,target:n,docName:n},u?.replaceActive?{tabBehavior:`replace-active`}:void 0);let r=d(n);u?.replaceHistory?f(r):c(r)},_=l.status===`ready`?l.data.find(n=>n.scope===e&&n.name===t&&(u?.host===void 0?n.hostQualifier===void 0:n.hostQualifier===u.host)):void 0;if(_?.ignored===!0&&_.managed!==!0){let n=_;(async()=>{try{let n=await m(e),r=n.ok?n.skills.find(n=>n.scope===e&&n.name===t&&(u?.host===void 0?n.hostQualifier===void 0:n.hostQualifier===u.host)):void 0;if(r&&r.ignored!==!0){g(p(r));return}}catch{}E({scope:n.scope,name:n.name})})();return}let v=k;if(_?.managed===!0&&_.absolutePath!==void 0){b({flavor:`builtin`,source:v(_.absolutePath),name:_.name,subtitle:``,level:_.scope});return}if(_&&_.scope===`project`&&_.managed!==!0&&_.canonicalPath!==void 0&&_.absolutePath!==void 0){b({flavor:`linked`,source:v(_.absolutePath),name:_.name,subtitle:``,level:_.scope});return}if(_)return g(p(_));if(e===`project`&&u?.path)return g(u.path.replace(/\.mdx?$/i,``));if(e===`global`)return g(n(e,t,u?.host));(async()=>{try{let n=await m(`project`);if(!n.ok){r.error(i._({id:`IO8REi`,values:{0:n.error,name:t}}));return}let a=n.skills.find(n=>n.scope===e&&n.name===t);if(!a){r.error(i._({id:`9uRLEH`,values:{name:t}}));return}g(p(a))}catch(e){let n=e;r.error(i._({id:`IO8REi`,values:{0:n instanceof Error?n.message:String(n),name:t}}))}})()},t[0]=s,t[1]=l.data,t[2]=l.status,t[3]=u):u=t[3],u}function k(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return t>0?e.slice(0,t):e}export{w as a,_ as c,E as i,D as n,y as o,C as r,b as s,O as t};
1
+ import{i as e}from"./DocumentContext-C9S71wln.js";import{t}from"./compiler-runtime-BfE3aGVn.js";import{Xs as n}from"./dist-CsoN3WVg.js";import{n as r}from"./dist-CJhtNlOm2.js";import{t as i}from"./dist-Cr4-nBVI.js";import{d as a,r as o}from"./documents-events-KOPTKKT9.js";import{t as s}from"./createLucideIcon-B6ULg5PN.js";import{_ as c,f as l,h as u,l as d,v as f}from"./doc-hash-CYZIWizw.js";import{u as p}from"./navigation-targets-BVaXLrtB.js";import{_ as m}from"./skills-api-DaUEGHn_.js";import{n as h,t as g}from"./use-skills-FyqcYg2s.js";var _=s(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),v=t();function y(e){if(typeof window>`u`)return;let t=d(e);u(window.location.hash,t)||(window.location.hash=t)}function b(e){if(typeof window>`u`)return;let t=l(e);window.location.hash!==t&&(window.location.hash=t)}var x=null,S=new Set;function C(){return x}function w(e){return S.add(e),()=>{S.delete(e)}}function T(){for(let e of S)e()}function E(e){x!==null&&x.scope===e.scope&&x.name===e.name||(x=e,T())}function D(){x!==null&&(x=null,T())}function O(){let t=(0,v.c)(4),{openTarget:s}=e(),l=g(),u;return t[0]!==s||t[1]!==l.data||t[2]!==l.status?(u=(e,t,u)=>{let g=n=>{l.status===`ready`&&l.data.some(n=>n.scope===e&&n.name===t)||(o(e,t),h(e,t).then(()=>a(e,t))),s({kind:`doc`,target:n,docName:n},u?.replaceActive?{tabBehavior:`replace-active`}:void 0);let r=d(n);u?.replaceHistory?f(r):c(r)},_=l.status===`ready`?l.data.find(n=>n.scope===e&&n.name===t&&(u?.host===void 0?n.hostQualifier===void 0:n.hostQualifier===u.host)):void 0;if(_?.ignored===!0&&_.managed!==!0){let n=_;(async()=>{try{let n=await m(e),r=n.ok?n.skills.find(n=>n.scope===e&&n.name===t&&(u?.host===void 0?n.hostQualifier===void 0:n.hostQualifier===u.host)):void 0;if(r&&r.ignored!==!0){g(p(r));return}}catch{}E({scope:n.scope,name:n.name})})();return}let v=k;if(_?.managed===!0&&_.absolutePath!==void 0){b({flavor:`builtin`,source:v(_.absolutePath),name:_.name,subtitle:``,level:_.scope});return}if(_&&_.scope===`project`&&_.managed!==!0&&_.canonicalPath!==void 0&&_.absolutePath!==void 0){b({flavor:`linked`,source:v(_.absolutePath),name:_.name,subtitle:``,level:_.scope});return}if(_)return g(p(_));if(e===`project`&&u?.path)return g(u.path.replace(/\.mdx?$/i,``));if(e===`global`)return g(n(e,t,u?.host));(async()=>{try{let n=await m(`project`);if(!n.ok){r.error(i._({id:`IO8REi`,values:{0:n.error,name:t}}));return}let a=n.skills.find(n=>n.scope===e&&n.name===t);if(!a){r.error(i._({id:`9uRLEH`,values:{name:t}}));return}g(p(a))}catch(e){let n=e;r.error(i._({id:`IO8REi`,values:{0:n instanceof Error?n.message:String(n),name:t}}))}})()},t[0]=s,t[1]=l.data,t[2]=l.status,t[3]=u):u=t[3],u}function k(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return t>0?e.slice(0,t):e}export{w as a,_ as c,E as i,D as n,y as o,C as r,b as s,O as t};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{Va as r}from"./dist-BtM-eRCP.js";var i=e(t(),1),a=n(),o={general:{id:`Weq9zb`},workspace:{id:`pmUArF`},search:{id:`A1taO8`},wysiwyg:{id:`ur2XSb`},source:{id:`tiWX6q`},navigation:{id:`LXfNU-`}},s=Object.keys(o),c=[{id:`command-palette`,category:`general`,title:{id:`ZjtgI-`},description:{id:`PBQwGb`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ K`,windowsLinux:`Ctrl K`,match:{key:`k`,mod:!0}},{mac:`⌘ P`,windowsLinux:`Ctrl P`,match:{key:`p`,mod:!0}}]},{id:`settings`,category:`general`,title:{id:`Tz0i8g`},description:{id:`6m_7We`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ ,`,windowsLinux:`Ctrl ,`,match:{key:`,`,anyMod:!0}}]},{id:`new-item`,category:`general`,title:{id:`HdkSiO`},description:{id:`KkEAud`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ N`,windowsLinux:`Ctrl N`,match:{key:`n`,mod:!0}},{mac:`⌥⌘ N`,windowsLinux:`Ctrl Alt N`,match:{key:`n`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`new-folder`,category:`general`,title:{id:`96G6Re`},description:{id:`3cOo2C`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ N`,windowsLinux:`Ctrl Shift N`}]},{id:`toggle-files-sidebar`,category:`general`,title:{id:`rtdR4v`},description:{id:`EbZT7P`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ S`,windowsLinux:`Ctrl Alt S`,match:{code:`KeyS`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-document-panel`,category:`general`,title:{id:`lkYioO`},description:{id:`It9ARY`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ B`,windowsLinux:`Ctrl Alt B`,match:{code:`KeyB`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-editor-mode`,category:`general`,title:{id:`vPXOUw`},description:{id:`buNXgr`},scope:{id:`uBAxNB`},bindings:[{mac:`⌥⌘ M`,windowsLinux:`Ctrl Alt M`,match:{code:`KeyM`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-terminal-panel`,category:`general`,title:{id:`-Al4WQ`},description:{id:`SCveu1`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ J`,windowsLinux:`Ctrl J`,match:{key:`j`,mod:!0},nativeMenuAccelerator:!0},{mac:"⌃ `",windowsLinux:"Ctrl `",match:{code:`Backquote`,ctrlKey:!0}}]},{id:`toggle-agent-panel`,category:`general`,title:{id:`4-Phgi`},description:{id:`4ivBhl`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ L`,windowsLinux:`Ctrl L`,match:{key:`l`,mod:!0}}]},{id:`ask-ai-selection`,category:`general`,title:{id:`6YBJ3m`},description:{id:`ClTEde`},scope:{id:`C62P6b`},bindings:[{mac:`⌘ L`,windowsLinux:`Ctrl L`,match:{key:`l`,mod:!0}}]},{id:`open-ask-ai`,category:`general`,title:{id:`xWEvuo`},description:{id:`5OTgC7`},scope:{id:`2GT3Hf`},bindings:[{mac:`⇧⌘ L`,windowsLinux:`Ctrl Shift L`,match:{code:`KeyL`,anyMod:!0,shiftKey:!0,allowExtraModifiers:!0}}]},{id:`new-terminal-tab`,category:`general`,title:{id:`YkvmF4`},description:{id:`j2kt1j`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ J`,windowsLinux:`Ctrl Shift J`,match:{key:`j`,mod:!0,shiftKey:!0}}]},{id:`report-bug`,category:`general`,title:{id:`cd5EXh`},description:{id:`CJpuc1`},scope:{id:`cZI5AL`},desktopOnly:!0,bindings:[{mac:`⇧⌘ D`,windowsLinux:`Ctrl Shift D`}]},{id:`navigate-back`,category:`navigation`,title:{id:`iH8pgl`},description:{id:`cjtjry`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ [`,windowsLinux:`Alt ←`}]},{id:`navigate-forward`,category:`navigation`,title:{id:`rxWGWX`},description:{id:`XK5cbh`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ ]`,windowsLinux:`Alt →`}]},{id:`tab-new`,category:`navigation`,title:{id:`3YvS-c`},description:{id:`t6w1cq`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ T`,windowsLinux:`Ctrl T`,match:{key:`t`,mod:!0}}]},{id:`tab-next`,category:`navigation`,title:{id:`l46MqT`},description:{id:`thnPBX`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌃ Tab`,windowsLinux:`Ctrl Tab`,match:{key:`Tab`,ctrlKey:!0}}]},{id:`tab-previous`,category:`navigation`,title:{id:`Mh_4hd`},description:{id:`DJd000`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌃⇧ Tab`,windowsLinux:`Ctrl Shift Tab`,match:{key:`Tab`,ctrlKey:!0,shiftKey:!0}}]},{id:`tab-jump`,category:`navigation`,title:{id:`_6FVBz`},description:{id:`wGSHzy`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ 1-8`,windowsLinux:`Ctrl 1-8`}]},{id:`tab-jump-last`,category:`navigation`,title:{id:`N1KkEO`},description:{id:`ZQJ1IV`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ 9`,windowsLinux:`Ctrl 9`}]},{id:`tab-reopen-closed`,category:`navigation`,title:{id:`hpzRlK`},description:{id:`E5WeIy`},scope:{id:`2GT3Hf`},bindings:[{mac:`⇧⌘ T`,windowsLinux:`Ctrl Shift T`,match:{key:`t`,mod:!0,shiftKey:!0}}]},{id:`open-folder`,category:`workspace`,title:{id:`PVUn_c`},description:{id:`VYd_YA`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ O`,windowsLinux:`Ctrl O`}]},{id:`open-file`,category:`workspace`,title:{id:`9npOH9`},description:{id:`H08D2X`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ O`,windowsLinux:`Ctrl Shift O`}]},{id:`switch-project`,category:`workspace`,title:{id:`xaDWAI`},description:{id:`oS1YpJ`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ P`,windowsLinux:`Ctrl Shift P`}]},{id:`file-tree-copy`,category:`workspace`,title:{id:`eGUbmF`},description:{id:`7uBlRT`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ C`,windowsLinux:`Ctrl C`}]},{id:`file-tree-paste`,category:`workspace`,title:{id:`_tjopj`},description:{id:`e4PbgC`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ V`,windowsLinux:`Ctrl V`}]},{id:`file-tree-duplicate`,category:`workspace`,title:{id:`ot5BRK`},description:{id:`mxY24F`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ D`,windowsLinux:`Ctrl D`}]},{id:`file-tree-delete`,category:`workspace`,title:{id:`VxO6wR`},description:{id:`osRqlv`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ Backspace`,windowsLinux:`Delete`}]},{id:`file-tree-select-all`,category:`workspace`,title:{id:`1d1F11`},description:{id:`4v2Yyz`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ A`,windowsLinux:`Ctrl A`}]},{id:`find`,category:`search`,title:{id:`KujtjC`},description:{id:`8OGgNM`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ F`,windowsLinux:`Ctrl F`,match:{key:`f`,mod:!0,allowShiftKey:!0}}]},{id:`replace`,category:`search`,title:{id:`fqSfXY`},description:{id:`wT4iQr`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ F`,windowsLinux:`Ctrl H`,match:{mac:{key:`f`,mod:!0,altKey:!0},windowsLinux:{key:`h`,mod:!0}}}]},{id:`find-next`,category:`search`,title:{id:`v7lbnC`},description:{id:`PR9FSv`},scope:{id:`EqtBXb`},bindings:[{mac:`⌘ G`,windowsLinux:`Ctrl G`,match:{key:`g`,mod:!0}},{mac:`F3`,windowsLinux:`F3`,match:{key:`F3`}}]},{id:`find-previous`,category:`search`,title:{id:`PB4upl`},description:{id:`PgzIpb`},scope:{id:`EqtBXb`},bindings:[{mac:`⇧⌘ G`,windowsLinux:`Ctrl Shift G`,match:{key:`g`,mod:!0,shiftKey:!0}},{mac:`Shift F3`,windowsLinux:`Shift F3`,match:{key:`F3`,shiftKey:!0}}]},{id:`find-field-navigation`,category:`search`,title:{id:`yMgL_E`},description:{id:`5ALjdr`},scope:{id:`BgV29F`},bindings:[{mac:`Enter / Shift Enter`,windowsLinux:`Enter / Shift Enter`}]},{id:`replace-current-from-field`,category:`search`,title:{id:`LDuM35`},description:{id:`EZVxVz`},scope:{id:`rZVMkf`},bindings:[{mac:`Enter`,windowsLinux:`Enter`}]},{id:`format-bold`,category:`wysiwyg`,title:{id:`KmydK6`},description:{id:`fbdLmk`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ B`,windowsLinux:`Ctrl B`}]},{id:`format-italic`,category:`wysiwyg`,title:{id:`pzutoc`},description:{id:`TLIO3j`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ I`,windowsLinux:`Ctrl I`}]},{id:`format-underline`,category:`wysiwyg`,title:{id:`YyXtnN`},description:{id:`Okd2Xv`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ U`,windowsLinux:`Ctrl U`}]},{id:`format-strike`,category:`wysiwyg`,title:{id:`WhOsNE`},description:{id:`HCn0Ay`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ X`,windowsLinux:`Ctrl Shift X`}]},{id:`format-inline-code`,category:`wysiwyg`,title:{id:`OX2Neh`},description:{id:`mo22UP`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ E`,windowsLinux:`Ctrl E`}]},{id:`format-highlight`,category:`wysiwyg`,title:{id:`gtEbeW`},description:{id:`Eji13z`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ H`,windowsLinux:`Ctrl Shift H`}]},{id:`add-link`,category:`wysiwyg`,title:{id:`VzGJRl`},description:{id:`u7U_Ij`},scope:{id:`v77jrg`},bindings:[{mac:`⌘ K`,windowsLinux:`Ctrl K`,match:{key:`k`,mod:!0}}]},{id:`add-comment`,category:`wysiwyg`,title:{id:`G4m8rL`},description:{id:`bGOTXx`},scope:{id:`C62P6b`},bindings:[{mac:`⇧⌘ M`,windowsLinux:`Ctrl Shift M`,match:{key:`m`,mod:!0,shiftKey:!0}}]},{id:`view-source-at-cursor`,category:`wysiwyg`,title:{id:`zq2eBA`},description:{id:`cU-seF`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ E`,windowsLinux:`Ctrl Alt E`,match:{code:`KeyE`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`send-comment-queue`,category:`general`,title:{id:`C7PKTv`},description:{id:`5ecEGe`},scope:{id:`ryhHUm`},bindings:[{mac:`⇧⌘ Enter`,windowsLinux:`Ctrl Shift Enter`,match:{key:`Enter`,mod:!0,shiftKey:!0}}]},{id:`history-undo-redo`,category:`wysiwyg`,title:{id:`i9OyGp`},description:{id:`lbkOif`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z / ⌘ Y`,windowsLinux:`Ctrl Shift Z / Ctrl Y`}]},{id:`heading-paragraph`,category:`wysiwyg`,title:{id:`bkQRMh`},description:{id:`rgPqOw`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 0`,windowsLinux:`Ctrl Alt 0`}]},{id:`heading-levels`,category:`wysiwyg`,title:{id:`q_z77Z`},description:{id:`8Jm2EP`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 1-6`,windowsLinux:`Ctrl Alt 1-6`}]},{id:`list-bullet`,category:`wysiwyg`,title:{id:`ijLc3m`},description:{id:`By-7Pn`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 8`,windowsLinux:`Ctrl Shift 8`}]},{id:`list-ordered`,category:`wysiwyg`,title:{id:`iSQTsg`},description:{id:`ou1hFW`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 7`,windowsLinux:`Ctrl Shift 7`}]},{id:`list-task`,category:`wysiwyg`,title:{id:`E1_c72`},description:{id:`-slrNR`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 9`,windowsLinux:`Ctrl Shift 9`}]},{id:`code-block`,category:`wysiwyg`,title:{id:`4A3Yzu`},description:{id:`pTPqMK`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ C`,windowsLinux:`Ctrl Alt C`}]},{id:`hard-break`,category:`wysiwyg`,title:{id:`-3ois8`},description:{id:`vDXqVv`},scope:{id:`ur2XSb`},bindings:[{mac:`Shift Enter`,windowsLinux:`Shift Enter`},{mac:`⌘ Enter`,windowsLinux:`Ctrl Enter`}]},{id:`move-block`,category:`wysiwyg`,title:{id:`f1XQyZ`},description:{id:`zQBg2C`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ ↑`,windowsLinux:`Ctrl Shift ↑`},{mac:`⇧⌘ ↓`,windowsLinux:`Ctrl Shift ↓`}]},{id:`list-indent`,category:`wysiwyg`,title:{id:`G0YZ-I`},description:{id:`5GKMSz`},scope:{id:`ynIa4S`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`list-split-item`,category:`wysiwyg`,title:{id:`neRy3o`},description:{id:`NpC29w`},scope:{id:`ynIa4S`},bindings:[{mac:`Enter`,windowsLinux:`Enter`}]},{id:`table-cell-navigation`,category:`wysiwyg`,title:{id:`K8-WWn`},description:{id:`4NC2Ym`},scope:{id:`l1aQKz`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`table-delete-selection`,category:`wysiwyg`,title:{id:`881Uwh`},description:{id:`YEP3X2`},scope:{id:`99eR72`},bindings:[{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌘ Backspace / ⌘ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`}]},{id:`delete-atom`,category:`wysiwyg`,title:{id:`636K3K`},description:{id:`oXKEsy`},scope:{id:`ur2XSb`},bindings:[{mac:`Backspace`,windowsLinux:`Backspace`},{mac:`Delete`,windowsLinux:`Delete`}]},{id:`slash-menu`,category:`navigation`,title:{id:`shNd9t`},description:{id:`8PmoQF`},scope:{id:`ur2XSb`},bindings:[{mac:`/`,windowsLinux:`/`}]},{id:`suggestion-navigation`,category:`navigation`,title:{id:`riqekz`},description:{id:`OiHJdA`},scope:{id:`y5FUYi`},bindings:[{mac:`↑ / ↓`,windowsLinux:`↑ / ↓`},{mac:`Enter / Tab`,windowsLinux:`Enter / Tab`},{mac:`Esc`,windowsLinux:`Esc`}]},{id:`component-navigation`,category:`navigation`,title:{id:`rwrPbS`},description:{id:`0s8-e8`},scope:{id:`ur2XSb`},bindings:[{mac:`↑ / ↓ / ← / →`,windowsLinux:`↑ / ↓ / ← / →`},{mac:`Enter / Esc`,windowsLinux:`Enter / Esc`}]},{id:`source-indent`,category:`source`,title:{id:`fwhX-N`},description:{id:`skf5Ix`},scope:{id:`tiWX6q`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`source-navigation`,category:`source`,title:{id:`qSKu2v`},description:{id:`gITz7o`},scope:{id:`tiWX6q`},bindings:[{mac:`Arrow keys / Option Arrow / Command Arrow`,windowsLinux:`Arrow keys / Ctrl Arrow / Home / End`},{mac:`Page Up / Page Down`,windowsLinux:`Page Up / Page Down`},{mac:`Shift with movement keys`,windowsLinux:`Shift with movement keys`}]},{id:`source-editing`,category:`source`,title:{id:`pFagOn`},description:{id:`MGb89P`},scope:{id:`tiWX6q`},bindings:[{mac:`Enter / Shift Enter / ⌘ Enter`,windowsLinux:`Enter / Shift Enter / Ctrl Enter`},{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌥ Backspace / ⌥ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`},{mac:`⌥ ↑ / ⌥ ↓`,windowsLinux:`Alt ↑ / Alt ↓`},{mac:`⇧⌥ ↑ / ⇧⌥ ↓`,windowsLinux:`Shift Alt ↑ / Shift Alt ↓`},{mac:`⇧⌘ K`,windowsLinux:`Ctrl Shift K`}]},{id:`source-history`,category:`source`,title:{id:`4Sxexw`},description:{id:`TDeOpa`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z`,windowsLinux:`Ctrl Y / Ctrl Shift Z`}]},{id:`code-field-history`,category:`wysiwyg`,title:{id:`VXGFMg`},description:{id:`BkGtRl`},scope:{id:`FWSjnp`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z`,windowsLinux:`Ctrl Y`},{mac:`⌘ U / ⇧⌘ U`,windowsLinux:`Ctrl U / Alt U`}]},{id:`source-select-all`,category:`source`,title:{id:`a-cKXz`},description:{id:`UTNVyS`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ A`,windowsLinux:`Ctrl A`}]},{id:`source-multi-cursor`,category:`source`,title:{id:`mg0YGL`},description:{id:`lWNpNB`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ ↑ / ⌥⌘ ↓`,windowsLinux:`Ctrl Alt ↑ / Ctrl Alt ↓`},{mac:`⇧⌘ L`,windowsLinux:`Ctrl Shift L`}]},{id:`source-search`,category:`source`,title:{id:`7OhaRy`},description:{id:`mwMF9u`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ F`,windowsLinux:`Ctrl F`}]},{id:`source-toggle-comment`,category:`source`,title:{id:`RfaEio`},description:{id:`MrwYIK`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ /`,windowsLinux:`Ctrl /`},{mac:`Shift Alt A`,windowsLinux:`Shift Alt A`}]},{id:`source-select-next-occurrence`,category:`source`,title:{id:`hY8pka`},description:{id:`XnlF3W`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ D`,windowsLinux:`Ctrl D`}]},{id:`source-goto-line`,category:`source`,title:{id:`7FamGZ`},description:{id:`yHikCO`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ G`,windowsLinux:`Ctrl Alt G`}]},{id:`source-find-results`,category:`source`,title:{id:`rJVoVX`},description:{id:`TwYboS`},scope:{id:`qyLmWw`},bindings:[{mac:`⌘ G / ⇧⌘ G`,windowsLinux:`Ctrl G / Ctrl Shift G`},{mac:`F3 / Shift F3`,windowsLinux:`F3 / Shift F3`},{mac:`Esc`,windowsLinux:`Esc`}]},{id:`source-folding`,category:`source`,title:{id:`bcjYUA`},description:{id:`VZGh8G`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ [ / ⌥⌘ ]`,windowsLinux:`Ctrl Shift [ / Ctrl Shift ]`},{mac:`Ctrl Alt [ / Ctrl Alt ]`,windowsLinux:`Ctrl Alt [ / Ctrl Alt ]`}]},{id:`source-completion`,category:`source`,title:{id:`VuxVSP`},description:{id:`Ehkru0`},scope:{id:`tiWX6q`},bindings:[{mac:`Ctrl Space`,windowsLinux:`Ctrl Space`},{mac:"⌥ ` / ⌥ I",windowsLinux:`Ctrl Space`},{mac:`↑ / ↓ / Page Up / Page Down`,windowsLinux:`↑ / ↓ / Page Up / Page Down`},{mac:`Enter / Esc`,windowsLinux:`Enter / Esc`}]},{id:`source-tab-focus-mode`,category:`source`,title:{id:`eG8Jsg`},description:{id:`qRZh7J`},scope:{id:`tiWX6q`},bindings:[{mac:`Shift Alt M`,windowsLinux:`Ctrl M`}]},{id:`source-lint-panel`,category:`source`,title:{id:`yvG-l1`},description:{id:`kCqCyf`},scope:{id:`tiWX6q`},bindings:[{mac:`⇧⌘ M`,windowsLinux:`Ctrl Shift M`}]},{id:`source-next-diagnostic`,category:`source`,title:{id:`M1OfV9`},description:{id:`ExPiRQ`},scope:{id:`tiWX6q`},bindings:[{mac:`F8`,windowsLinux:`F8`}]}],l=c,u=new Map(c.map(e=>[e.id,e]));function d(e){let t=u.get(e);if(!t)throw Error(`Unknown keyboard shortcut: ${e}`);return t}function f(){return r()?`mac`:`windowsLinux`}var p=[[/⌘/g,` Command `],[/⌥/g,` Option `],[/⇧/g,` Shift `],[/⌃/g,` Control `],[/↑/g,` Up Arrow `],[/↓/g,` Down Arrow `],[/←/g,` Left Arrow `],[/→/g,` Right Arrow `],[/\[/g,` Left Bracket `],[/\]/g,` Right Bracket `],[/,/g,` Comma `],[/\bCtrl\b/g,` Control `]];function m(e){return e.split(` / `).map(e=>p.reduce((e,[t,n])=>e.replace(t,n),e).replaceAll(/\s+/g,` `).trim()).join(` or `)}function h(e,t=f()){return t===`mac`?e.mac:e.windowsLinux}function g(e,t=f()){return m(h(e,t))}function _(e,t=f()){return h(d(e).bindings[0],t)}function v(e,t=f()){return g(d(e).bindings[0],t)}function y(e){if(!e||typeof e!=`object`)return!1;if(`isContentEditable`in e&&e.isContentEditable===!0)return!0;if(!(`tagName`in e))return!1;let t=String(e.tagName).toUpperCase();return t===`INPUT`||t===`TEXTAREA`}function b(e,t=f()){return t===`mac`?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function x(e,t,n=f()){return d(t).bindings.some(t=>{let r=C(t.match,n);return r?T(e,r,n):!1})}function S(e,t,n,r=f()){return d(t).bindings.some(t=>{if(n&&t.nativeMenuAccelerator===!0)return!1;let i=C(t.match,r);return i?T(e,i,r):!1})}function C(e,t){return e?w(e)?e:e[t]??null:null}function w(e){return`key`in e||`code`in e}function T(e,t,n){if(t.key&&e.key.toLowerCase()!==t.key.toLowerCase()||t.code&&e.code!==t.code)return!1;let r=t.metaKey??(t.mod?n===`mac`:!1),i=t.ctrlKey??(t.mod?n===`windowsLinux`:!1),a=t.altKey??!1,o=t.shiftKey??!1;return t.allowExtraModifiers?!(t.anyMod&&!e.metaKey&&!e.ctrlKey||r&&!e.metaKey||i&&!e.ctrlKey||a&&!e.altKey||o&&!e.shiftKey):(t.anyMod?e.metaKey||e.ctrlKey:e.metaKey===r&&e.ctrlKey===i)&&e.altKey===a&&(t.allowShiftKey||!!e.shiftKey===o)}var E=`#settings`;function D(e){return`#settings/${e}`}var O=`open-knowledge:settings-section-intent`;function k(e){if(typeof window>`u`)return()=>{};let t=t=>{let{detail:n}=t;typeof n==`string`&&n.length>0&&e(n)};return window.addEventListener(O,t),()=>window.removeEventListener(O,t)}function A(e){if(typeof window>`u`)return;let t=D(e);if(H(window.location.hash)){window.history.replaceState(null,``,t),window.dispatchEvent(new CustomEvent(O,{detail:e}));return}window.location.hash!==t&&(window.location.hash=t)}var j=`agent-connections`;function M(){A(j)}var N=`sync`,P=!1;function F(){let e=P;return P=!1,e}function I(e){e?.advanced===!0&&(P=!0),A(N)}var L=`plugins-manage`;function R(){A(L)}function z(e){return`plugin:${e}`}function B(e){A(z(e))}function V(e){return y(e.target)?!1:x(e,`settings`)}function H(e){let t=e.replace(/^#/,``);return t===`settings`?!0:t.startsWith(`settings/`)&&t.length>9}function U(e){let t=e.replace(/^#/,``);if(!t.startsWith(`settings/`))return null;let n=t.slice(9);return n.length>0?n:null}function W(){return typeof window>`u`?``:window.location.hash}function G(){let e=(0,a.c)(5),[t,n]=(0,i.useState)(J),[r,o]=(0,i.useState)(q),s,c;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=()=>{(0,i.startTransition)(()=>{let e=W();n(H(e)),o(U(e))})};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},c=[],e[0]=s,e[1]=c):(s=e[0],c=e[1]),(0,i.useEffect)(s,c);let l=K,u;return e[2]!==t||e[3]!==r?(u={open:t,section:r,close:l},e[2]=t,e[3]=r,e[4]=u):u=e[4],u}function K(){typeof window>`u`||H(W())&&window.history.back()}function q(){return U(W())}function J(){return H(W())}export{S,v as _,M as a,x as b,I as c,l as d,o as f,g,h,V as i,k as l,_ as m,F as n,B as o,s as p,H as r,R as s,E as t,G as u,m as v,b as x,y};
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{Va as r}from"./dist-CsoN3WVg.js";var i=e(t(),1),a=n(),o={general:{id:`Weq9zb`},workspace:{id:`pmUArF`},search:{id:`A1taO8`},wysiwyg:{id:`ur2XSb`},source:{id:`tiWX6q`},navigation:{id:`LXfNU-`}},s=Object.keys(o),c=[{id:`command-palette`,category:`general`,title:{id:`ZjtgI-`},description:{id:`PBQwGb`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ K`,windowsLinux:`Ctrl K`,match:{key:`k`,mod:!0}},{mac:`⌘ P`,windowsLinux:`Ctrl P`,match:{key:`p`,mod:!0}}]},{id:`settings`,category:`general`,title:{id:`Tz0i8g`},description:{id:`6m_7We`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ ,`,windowsLinux:`Ctrl ,`,match:{key:`,`,anyMod:!0}}]},{id:`new-item`,category:`general`,title:{id:`HdkSiO`},description:{id:`KkEAud`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ N`,windowsLinux:`Ctrl N`,match:{key:`n`,mod:!0}},{mac:`⌥⌘ N`,windowsLinux:`Ctrl Alt N`,match:{key:`n`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`new-folder`,category:`general`,title:{id:`96G6Re`},description:{id:`3cOo2C`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ N`,windowsLinux:`Ctrl Shift N`}]},{id:`toggle-files-sidebar`,category:`general`,title:{id:`rtdR4v`},description:{id:`EbZT7P`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ S`,windowsLinux:`Ctrl Alt S`,match:{code:`KeyS`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-document-panel`,category:`general`,title:{id:`lkYioO`},description:{id:`It9ARY`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ B`,windowsLinux:`Ctrl Alt B`,match:{code:`KeyB`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-editor-mode`,category:`general`,title:{id:`vPXOUw`},description:{id:`buNXgr`},scope:{id:`uBAxNB`},bindings:[{mac:`⌥⌘ M`,windowsLinux:`Ctrl Alt M`,match:{code:`KeyM`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-terminal-panel`,category:`general`,title:{id:`-Al4WQ`},description:{id:`SCveu1`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ J`,windowsLinux:`Ctrl J`,match:{key:`j`,mod:!0},nativeMenuAccelerator:!0},{mac:"⌃ `",windowsLinux:"Ctrl `",match:{code:`Backquote`,ctrlKey:!0}}]},{id:`toggle-agent-panel`,category:`general`,title:{id:`4-Phgi`},description:{id:`4ivBhl`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ L`,windowsLinux:`Ctrl L`,match:{key:`l`,mod:!0}}]},{id:`ask-ai-selection`,category:`general`,title:{id:`6YBJ3m`},description:{id:`ClTEde`},scope:{id:`C62P6b`},bindings:[{mac:`⌘ L`,windowsLinux:`Ctrl L`,match:{key:`l`,mod:!0}}]},{id:`open-ask-ai`,category:`general`,title:{id:`xWEvuo`},description:{id:`5OTgC7`},scope:{id:`2GT3Hf`},bindings:[{mac:`⇧⌘ L`,windowsLinux:`Ctrl Shift L`,match:{code:`KeyL`,anyMod:!0,shiftKey:!0,allowExtraModifiers:!0}}]},{id:`new-terminal-tab`,category:`general`,title:{id:`YkvmF4`},description:{id:`j2kt1j`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ J`,windowsLinux:`Ctrl Shift J`,match:{key:`j`,mod:!0,shiftKey:!0}}]},{id:`report-bug`,category:`general`,title:{id:`cd5EXh`},description:{id:`CJpuc1`},scope:{id:`cZI5AL`},desktopOnly:!0,bindings:[{mac:`⇧⌘ D`,windowsLinux:`Ctrl Shift D`}]},{id:`navigate-back`,category:`navigation`,title:{id:`iH8pgl`},description:{id:`cjtjry`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ [`,windowsLinux:`Alt ←`}]},{id:`navigate-forward`,category:`navigation`,title:{id:`rxWGWX`},description:{id:`XK5cbh`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ ]`,windowsLinux:`Alt →`}]},{id:`tab-new`,category:`navigation`,title:{id:`3YvS-c`},description:{id:`t6w1cq`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ T`,windowsLinux:`Ctrl T`,match:{key:`t`,mod:!0}}]},{id:`tab-next`,category:`navigation`,title:{id:`l46MqT`},description:{id:`thnPBX`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌃ Tab`,windowsLinux:`Ctrl Tab`,match:{key:`Tab`,ctrlKey:!0}}]},{id:`tab-previous`,category:`navigation`,title:{id:`Mh_4hd`},description:{id:`DJd000`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌃⇧ Tab`,windowsLinux:`Ctrl Shift Tab`,match:{key:`Tab`,ctrlKey:!0,shiftKey:!0}}]},{id:`tab-jump`,category:`navigation`,title:{id:`_6FVBz`},description:{id:`wGSHzy`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ 1-8`,windowsLinux:`Ctrl 1-8`}]},{id:`tab-jump-last`,category:`navigation`,title:{id:`N1KkEO`},description:{id:`ZQJ1IV`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ 9`,windowsLinux:`Ctrl 9`}]},{id:`tab-reopen-closed`,category:`navigation`,title:{id:`hpzRlK`},description:{id:`E5WeIy`},scope:{id:`2GT3Hf`},bindings:[{mac:`⇧⌘ T`,windowsLinux:`Ctrl Shift T`,match:{key:`t`,mod:!0,shiftKey:!0}}]},{id:`open-folder`,category:`workspace`,title:{id:`PVUn_c`},description:{id:`VYd_YA`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ O`,windowsLinux:`Ctrl O`}]},{id:`open-file`,category:`workspace`,title:{id:`9npOH9`},description:{id:`H08D2X`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ O`,windowsLinux:`Ctrl Shift O`}]},{id:`switch-project`,category:`workspace`,title:{id:`xaDWAI`},description:{id:`oS1YpJ`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ P`,windowsLinux:`Ctrl Shift P`}]},{id:`file-tree-copy`,category:`workspace`,title:{id:`eGUbmF`},description:{id:`7uBlRT`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ C`,windowsLinux:`Ctrl C`}]},{id:`file-tree-paste`,category:`workspace`,title:{id:`_tjopj`},description:{id:`e4PbgC`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ V`,windowsLinux:`Ctrl V`}]},{id:`file-tree-duplicate`,category:`workspace`,title:{id:`ot5BRK`},description:{id:`mxY24F`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ D`,windowsLinux:`Ctrl D`}]},{id:`file-tree-delete`,category:`workspace`,title:{id:`VxO6wR`},description:{id:`osRqlv`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ Backspace`,windowsLinux:`Delete`}]},{id:`file-tree-select-all`,category:`workspace`,title:{id:`1d1F11`},description:{id:`4v2Yyz`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ A`,windowsLinux:`Ctrl A`}]},{id:`find`,category:`search`,title:{id:`KujtjC`},description:{id:`8OGgNM`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ F`,windowsLinux:`Ctrl F`,match:{key:`f`,mod:!0,allowShiftKey:!0}}]},{id:`replace`,category:`search`,title:{id:`fqSfXY`},description:{id:`wT4iQr`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ F`,windowsLinux:`Ctrl H`,match:{mac:{key:`f`,mod:!0,altKey:!0},windowsLinux:{key:`h`,mod:!0}}}]},{id:`find-next`,category:`search`,title:{id:`v7lbnC`},description:{id:`PR9FSv`},scope:{id:`EqtBXb`},bindings:[{mac:`⌘ G`,windowsLinux:`Ctrl G`,match:{key:`g`,mod:!0}},{mac:`F3`,windowsLinux:`F3`,match:{key:`F3`}}]},{id:`find-previous`,category:`search`,title:{id:`PB4upl`},description:{id:`PgzIpb`},scope:{id:`EqtBXb`},bindings:[{mac:`⇧⌘ G`,windowsLinux:`Ctrl Shift G`,match:{key:`g`,mod:!0,shiftKey:!0}},{mac:`Shift F3`,windowsLinux:`Shift F3`,match:{key:`F3`,shiftKey:!0}}]},{id:`find-field-navigation`,category:`search`,title:{id:`yMgL_E`},description:{id:`5ALjdr`},scope:{id:`BgV29F`},bindings:[{mac:`Enter / Shift Enter`,windowsLinux:`Enter / Shift Enter`}]},{id:`replace-current-from-field`,category:`search`,title:{id:`LDuM35`},description:{id:`EZVxVz`},scope:{id:`rZVMkf`},bindings:[{mac:`Enter`,windowsLinux:`Enter`}]},{id:`format-bold`,category:`wysiwyg`,title:{id:`KmydK6`},description:{id:`fbdLmk`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ B`,windowsLinux:`Ctrl B`}]},{id:`format-italic`,category:`wysiwyg`,title:{id:`pzutoc`},description:{id:`TLIO3j`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ I`,windowsLinux:`Ctrl I`}]},{id:`format-underline`,category:`wysiwyg`,title:{id:`YyXtnN`},description:{id:`Okd2Xv`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ U`,windowsLinux:`Ctrl U`}]},{id:`format-strike`,category:`wysiwyg`,title:{id:`WhOsNE`},description:{id:`HCn0Ay`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ X`,windowsLinux:`Ctrl Shift X`}]},{id:`format-inline-code`,category:`wysiwyg`,title:{id:`OX2Neh`},description:{id:`mo22UP`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ E`,windowsLinux:`Ctrl E`}]},{id:`format-highlight`,category:`wysiwyg`,title:{id:`gtEbeW`},description:{id:`Eji13z`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ H`,windowsLinux:`Ctrl Shift H`}]},{id:`add-link`,category:`wysiwyg`,title:{id:`VzGJRl`},description:{id:`u7U_Ij`},scope:{id:`v77jrg`},bindings:[{mac:`⌘ K`,windowsLinux:`Ctrl K`,match:{key:`k`,mod:!0}}]},{id:`add-comment`,category:`wysiwyg`,title:{id:`G4m8rL`},description:{id:`bGOTXx`},scope:{id:`C62P6b`},bindings:[{mac:`⇧⌘ M`,windowsLinux:`Ctrl Shift M`,match:{key:`m`,mod:!0,shiftKey:!0}}]},{id:`view-source-at-cursor`,category:`wysiwyg`,title:{id:`zq2eBA`},description:{id:`cU-seF`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ E`,windowsLinux:`Ctrl Alt E`,match:{code:`KeyE`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`send-comment-queue`,category:`general`,title:{id:`C7PKTv`},description:{id:`5ecEGe`},scope:{id:`ryhHUm`},bindings:[{mac:`⇧⌘ Enter`,windowsLinux:`Ctrl Shift Enter`,match:{key:`Enter`,mod:!0,shiftKey:!0}}]},{id:`history-undo-redo`,category:`wysiwyg`,title:{id:`i9OyGp`},description:{id:`lbkOif`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z / ⌘ Y`,windowsLinux:`Ctrl Shift Z / Ctrl Y`}]},{id:`heading-paragraph`,category:`wysiwyg`,title:{id:`bkQRMh`},description:{id:`rgPqOw`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 0`,windowsLinux:`Ctrl Alt 0`}]},{id:`heading-levels`,category:`wysiwyg`,title:{id:`q_z77Z`},description:{id:`8Jm2EP`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 1-6`,windowsLinux:`Ctrl Alt 1-6`}]},{id:`list-bullet`,category:`wysiwyg`,title:{id:`ijLc3m`},description:{id:`By-7Pn`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 8`,windowsLinux:`Ctrl Shift 8`}]},{id:`list-ordered`,category:`wysiwyg`,title:{id:`iSQTsg`},description:{id:`ou1hFW`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 7`,windowsLinux:`Ctrl Shift 7`}]},{id:`list-task`,category:`wysiwyg`,title:{id:`E1_c72`},description:{id:`-slrNR`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 9`,windowsLinux:`Ctrl Shift 9`}]},{id:`code-block`,category:`wysiwyg`,title:{id:`4A3Yzu`},description:{id:`pTPqMK`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ C`,windowsLinux:`Ctrl Alt C`}]},{id:`hard-break`,category:`wysiwyg`,title:{id:`-3ois8`},description:{id:`vDXqVv`},scope:{id:`ur2XSb`},bindings:[{mac:`Shift Enter`,windowsLinux:`Shift Enter`},{mac:`⌘ Enter`,windowsLinux:`Ctrl Enter`}]},{id:`move-block`,category:`wysiwyg`,title:{id:`f1XQyZ`},description:{id:`HJ7aHU`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ ↑`,windowsLinux:`Ctrl Shift ↑`},{mac:`⇧⌘ ↓`,windowsLinux:`Ctrl Shift ↓`}]},{id:`list-indent`,category:`wysiwyg`,title:{id:`G0YZ-I`},description:{id:`5GKMSz`},scope:{id:`ynIa4S`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`list-split-item`,category:`wysiwyg`,title:{id:`neRy3o`},description:{id:`NpC29w`},scope:{id:`ynIa4S`},bindings:[{mac:`Enter`,windowsLinux:`Enter`}]},{id:`table-cell-navigation`,category:`wysiwyg`,title:{id:`K8-WWn`},description:{id:`4NC2Ym`},scope:{id:`l1aQKz`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`table-delete-selection`,category:`wysiwyg`,title:{id:`881Uwh`},description:{id:`YEP3X2`},scope:{id:`99eR72`},bindings:[{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌘ Backspace / ⌘ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`}]},{id:`delete-atom`,category:`wysiwyg`,title:{id:`636K3K`},description:{id:`oXKEsy`},scope:{id:`ur2XSb`},bindings:[{mac:`Backspace`,windowsLinux:`Backspace`},{mac:`Delete`,windowsLinux:`Delete`}]},{id:`slash-menu`,category:`navigation`,title:{id:`shNd9t`},description:{id:`8PmoQF`},scope:{id:`ur2XSb`},bindings:[{mac:`/`,windowsLinux:`/`}]},{id:`suggestion-navigation`,category:`navigation`,title:{id:`riqekz`},description:{id:`OiHJdA`},scope:{id:`y5FUYi`},bindings:[{mac:`↑ / ↓`,windowsLinux:`↑ / ↓`},{mac:`Enter / Tab`,windowsLinux:`Enter / Tab`},{mac:`Esc`,windowsLinux:`Esc`}]},{id:`component-navigation`,category:`navigation`,title:{id:`rwrPbS`},description:{id:`0s8-e8`},scope:{id:`ur2XSb`},bindings:[{mac:`↑ / ↓ / ← / →`,windowsLinux:`↑ / ↓ / ← / →`},{mac:`Enter / Esc`,windowsLinux:`Enter / Esc`}]},{id:`source-indent`,category:`source`,title:{id:`fwhX-N`},description:{id:`skf5Ix`},scope:{id:`tiWX6q`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`source-navigation`,category:`source`,title:{id:`qSKu2v`},description:{id:`gITz7o`},scope:{id:`tiWX6q`},bindings:[{mac:`Arrow keys / Option Arrow / Command Arrow`,windowsLinux:`Arrow keys / Ctrl Arrow / Home / End`},{mac:`Page Up / Page Down`,windowsLinux:`Page Up / Page Down`},{mac:`Shift with movement keys`,windowsLinux:`Shift with movement keys`}]},{id:`source-editing`,category:`source`,title:{id:`pFagOn`},description:{id:`MGb89P`},scope:{id:`tiWX6q`},bindings:[{mac:`Enter / Shift Enter / ⌘ Enter`,windowsLinux:`Enter / Shift Enter / Ctrl Enter`},{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌥ Backspace / ⌥ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`},{mac:`⌥ ↑ / ⌥ ↓`,windowsLinux:`Alt ↑ / Alt ↓`},{mac:`⇧⌥ ↑ / ⇧⌥ ↓`,windowsLinux:`Shift Alt ↑ / Shift Alt ↓`},{mac:`⇧⌘ K`,windowsLinux:`Ctrl Shift K`}]},{id:`source-history`,category:`source`,title:{id:`4Sxexw`},description:{id:`TDeOpa`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z`,windowsLinux:`Ctrl Y / Ctrl Shift Z`}]},{id:`code-field-history`,category:`wysiwyg`,title:{id:`VXGFMg`},description:{id:`BkGtRl`},scope:{id:`FWSjnp`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z`,windowsLinux:`Ctrl Y`},{mac:`⌘ U / ⇧⌘ U`,windowsLinux:`Ctrl U / Alt U`}]},{id:`source-select-all`,category:`source`,title:{id:`a-cKXz`},description:{id:`UTNVyS`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ A`,windowsLinux:`Ctrl A`}]},{id:`source-multi-cursor`,category:`source`,title:{id:`mg0YGL`},description:{id:`lWNpNB`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ ↑ / ⌥⌘ ↓`,windowsLinux:`Ctrl Alt ↑ / Ctrl Alt ↓`},{mac:`⇧⌘ L`,windowsLinux:`Ctrl Shift L`}]},{id:`source-search`,category:`source`,title:{id:`7OhaRy`},description:{id:`mwMF9u`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ F`,windowsLinux:`Ctrl F`}]},{id:`source-toggle-comment`,category:`source`,title:{id:`RfaEio`},description:{id:`MrwYIK`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ /`,windowsLinux:`Ctrl /`},{mac:`Shift Alt A`,windowsLinux:`Shift Alt A`}]},{id:`source-select-next-occurrence`,category:`source`,title:{id:`hY8pka`},description:{id:`XnlF3W`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ D`,windowsLinux:`Ctrl D`}]},{id:`source-goto-line`,category:`source`,title:{id:`7FamGZ`},description:{id:`yHikCO`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ G`,windowsLinux:`Ctrl Alt G`}]},{id:`source-find-results`,category:`source`,title:{id:`rJVoVX`},description:{id:`TwYboS`},scope:{id:`qyLmWw`},bindings:[{mac:`⌘ G / ⇧⌘ G`,windowsLinux:`Ctrl G / Ctrl Shift G`},{mac:`F3 / Shift F3`,windowsLinux:`F3 / Shift F3`},{mac:`Esc`,windowsLinux:`Esc`}]},{id:`source-folding`,category:`source`,title:{id:`bcjYUA`},description:{id:`VZGh8G`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ [ / ⌥⌘ ]`,windowsLinux:`Ctrl Shift [ / Ctrl Shift ]`},{mac:`Ctrl Alt [ / Ctrl Alt ]`,windowsLinux:`Ctrl Alt [ / Ctrl Alt ]`}]},{id:`source-completion`,category:`source`,title:{id:`VuxVSP`},description:{id:`Ehkru0`},scope:{id:`tiWX6q`},bindings:[{mac:`Ctrl Space`,windowsLinux:`Ctrl Space`},{mac:"⌥ ` / ⌥ I",windowsLinux:`Ctrl Space`},{mac:`↑ / ↓ / Page Up / Page Down`,windowsLinux:`↑ / ↓ / Page Up / Page Down`},{mac:`Enter / Esc`,windowsLinux:`Enter / Esc`}]},{id:`source-tab-focus-mode`,category:`source`,title:{id:`eG8Jsg`},description:{id:`qRZh7J`},scope:{id:`tiWX6q`},bindings:[{mac:`Shift Alt M`,windowsLinux:`Ctrl M`}]},{id:`source-lint-panel`,category:`source`,title:{id:`yvG-l1`},description:{id:`kCqCyf`},scope:{id:`tiWX6q`},bindings:[{mac:`⇧⌘ M`,windowsLinux:`Ctrl Shift M`}]},{id:`source-next-diagnostic`,category:`source`,title:{id:`M1OfV9`},description:{id:`ExPiRQ`},scope:{id:`tiWX6q`},bindings:[{mac:`F8`,windowsLinux:`F8`}]}],l=c,u=new Map(c.map(e=>[e.id,e]));function d(e){let t=u.get(e);if(!t)throw Error(`Unknown keyboard shortcut: ${e}`);return t}function f(){return r()?`mac`:`windowsLinux`}var p=[[/⌘/g,` Command `],[/⌥/g,` Option `],[/⇧/g,` Shift `],[/⌃/g,` Control `],[/↑/g,` Up Arrow `],[/↓/g,` Down Arrow `],[/←/g,` Left Arrow `],[/→/g,` Right Arrow `],[/\[/g,` Left Bracket `],[/\]/g,` Right Bracket `],[/,/g,` Comma `],[/\bCtrl\b/g,` Control `]];function m(e){return e.split(` / `).map(e=>p.reduce((e,[t,n])=>e.replace(t,n),e).replaceAll(/\s+/g,` `).trim()).join(` or `)}function h(e,t=f()){return t===`mac`?e.mac:e.windowsLinux}function g(e,t=f()){return m(h(e,t))}function _(e,t=f()){return h(d(e).bindings[0],t)}function v(e,t=f()){return g(d(e).bindings[0],t)}function y(e){if(!e||typeof e!=`object`)return!1;if(`isContentEditable`in e&&e.isContentEditable===!0)return!0;if(!(`tagName`in e))return!1;let t=String(e.tagName).toUpperCase();return t===`INPUT`||t===`TEXTAREA`}function b(e,t=f()){return t===`mac`?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function x(e,t,n=f()){return d(t).bindings.some(t=>{let r=C(t.match,n);return r?T(e,r,n):!1})}function S(e,t,n,r=f()){return d(t).bindings.some(t=>{if(n&&t.nativeMenuAccelerator===!0)return!1;let i=C(t.match,r);return i?T(e,i,r):!1})}function C(e,t){return e?w(e)?e:e[t]??null:null}function w(e){return`key`in e||`code`in e}function T(e,t,n){if(t.key&&e.key.toLowerCase()!==t.key.toLowerCase()||t.code&&e.code!==t.code)return!1;let r=t.metaKey??(t.mod?n===`mac`:!1),i=t.ctrlKey??(t.mod?n===`windowsLinux`:!1),a=t.altKey??!1,o=t.shiftKey??!1;return t.allowExtraModifiers?!(t.anyMod&&!e.metaKey&&!e.ctrlKey||r&&!e.metaKey||i&&!e.ctrlKey||a&&!e.altKey||o&&!e.shiftKey):(t.anyMod?e.metaKey||e.ctrlKey:e.metaKey===r&&e.ctrlKey===i)&&e.altKey===a&&(t.allowShiftKey||!!e.shiftKey===o)}var E=`#settings`;function D(e){return`#settings/${e}`}var O=`open-knowledge:settings-section-intent`;function k(e){if(typeof window>`u`)return()=>{};let t=t=>{let{detail:n}=t;typeof n==`string`&&n.length>0&&e(n)};return window.addEventListener(O,t),()=>window.removeEventListener(O,t)}function A(e){if(typeof window>`u`)return;let t=D(e);if(H(window.location.hash)){window.history.replaceState(null,``,t),window.dispatchEvent(new CustomEvent(O,{detail:e}));return}window.location.hash!==t&&(window.location.hash=t)}var j=`agent-connections`;function M(){A(j)}var N=`sync`,P=!1;function F(){let e=P;return P=!1,e}function I(e){e?.advanced===!0&&(P=!0),A(N)}var L=`plugins-manage`;function R(){A(L)}function z(e){return`plugin:${e}`}function B(e){A(z(e))}function V(e){return y(e.target)?!1:x(e,`settings`)}function H(e){let t=e.replace(/^#/,``);return t===`settings`?!0:t.startsWith(`settings/`)&&t.length>9}function U(e){let t=e.replace(/^#/,``);if(!t.startsWith(`settings/`))return null;let n=t.slice(9);return n.length>0?n:null}function W(){return typeof window>`u`?``:window.location.hash}function G(){let e=(0,a.c)(5),[t,n]=(0,i.useState)(J),[r,o]=(0,i.useState)(q),s,c;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=()=>{(0,i.startTransition)(()=>{let e=W();n(H(e)),o(U(e))})};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},c=[],e[0]=s,e[1]=c):(s=e[0],c=e[1]),(0,i.useEffect)(s,c);let l=K,u;return e[2]!==t||e[3]!==r?(u={open:t,section:r,close:l},e[2]=t,e[3]=r,e[4]=u):u=e[4],u}function K(){typeof window>`u`||H(W())&&window.history.back()}function q(){return U(W())}function J(){return H(W())}export{S,v as _,M as a,x as b,I as c,l as d,o as f,g,h,V as i,k as l,_ as m,F as n,B as o,s as p,H as r,R as s,E as t,G as u,m as v,b as x,y};