@inkeep/open-knowledge 0.43.0-beta.0 → 0.43.0-beta.10
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.
- package/dist/{acp-harness-probe-BI6bXf3a.mjs → acp-harness-probe-D9cTkuMT.mjs} +2 -2
- package/dist/assets/skills/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +1 -1
- package/dist/assets/skills/write-skill/SKILL.md +1 -1
- package/dist/cli.mjs +50 -50
- package/dist/config-schema.json +26 -0
- package/dist/config.project.schema.json +26 -0
- package/dist/constants-BT3Cjn4w.mjs +2 -0
- package/dist/fs-traced-CeWo_16n.mjs +1 -0
- package/dist/{fs-traced-BmZQL7v9.mjs → fs-traced-DDm-belY.mjs} +2 -2
- package/dist/git-handle-BS2VGYSG.mjs +1 -0
- package/dist/{git-handle-bosCq-DO.mjs → git-handle-UIC7K5Fw.mjs} +2 -2
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +1 -1
- package/dist/{init-BUp3cQ_4.mjs → init-C3jLZpVV.mjs} +33 -33
- package/dist/init-mD_V5dOp.mjs +1 -0
- package/dist/{launch-json-removal-CwOqJJze.mjs → launch-json-removal-XwBCEaAO.mjs} +2 -2
- package/dist/{loader-y7Mn8M-Z.mjs → loader-BYtT6HwT.mjs} +2 -2
- package/dist/loader-CqtToSGf.mjs +1 -0
- package/dist/md-manager-DP9jzxy1.mjs +2 -0
- package/dist/{open-browser-CkLowmAw.mjs → open-browser-CGiyukoG.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/preview-BCOpQaY2.mjs +1 -0
- package/dist/{preview-BV8bR51k.mjs → preview-DlzwRGU_.mjs} +2 -2
- package/dist/public/assets/{ActivityModeContent-CCFHLlT9.js → ActivityModeContent-BjW-VNSE.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-CQfhJYfr.js → AgentDiffPane-j36DVL1g.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-DZwzRPDa.js → AgentThreadClientBinder-CE6rI2aT.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-BqDZpzvH.js → CodeMirrorPropInput-CVrIx84a.js} +2 -2
- package/dist/public/assets/DocumentContext-BBZuJCfz.js +38 -0
- package/dist/public/assets/{EditorModeToggle-1xLWvnWd.js → EditorModeToggle-CX5Jh4N0.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-CPuodmd5.js → EnableSyncConfirmDialog-B10u8n1i.js} +1 -1
- package/dist/public/assets/FeedbackForm-DxEuHipa.js +1 -0
- package/dist/public/assets/{GraphPanel-U2ZyS1Aa.js → GraphPanel-CJYpjaIw.js} +2 -2
- package/dist/public/assets/LintConfigEditor-CgfN9-PD.js +1 -0
- package/dist/public/assets/{ManagedArtifactProperties-EDghUFni.js → ManagedArtifactProperties-BDVq5wN3.js} +1 -1
- package/dist/public/assets/{McpConsentDialogBody-C8VSVSPz.js → McpConsentDialogBody-Coe3N-YS.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-BwjUe5g_.js → MermaidDocEditor-DcZ_-MzA.js} +1 -1
- package/dist/public/assets/PropertyPanel-BISGQmxU.js +2 -0
- package/dist/public/assets/ReportBugDialogBody-C5wWE46i.js +3 -0
- package/dist/public/assets/SchemaConfigEditor-B3eLp98_.js +1 -0
- package/dist/public/assets/{SettingsDialogBody-_7c5ty2t.js → SettingsDialogBody-D4dqeST7.js} +3 -3
- package/dist/public/assets/{ShareBranchSwitchDialog-Dj6PdkLL.js → ShareBranchSwitchDialog-D_HYrO-M.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-Cmfia-Vl.js → ShareReceiveDialog-CCw_xKkg.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-xHTJ1V_2.js → ShareReceiveMissDialog-TDfzNW6D.js} +1 -1
- package/dist/public/assets/{SkillEditorActions-Cw7itVro.js → SkillEditorActions-Donhizbo.js} +1 -1
- package/dist/public/assets/SourceEditor-D2SZ5OF3.js +1 -0
- package/dist/public/assets/{TerminalPanel-Dfvz7JrY.js → TerminalPanel-C7pIldJ0.js} +2 -2
- package/dist/public/assets/{TerminalSessionsHost-D6vvdN1I.js → TerminalSessionsHost-BTWnv_Gu.js} +2 -2
- package/dist/public/assets/{TerminalWindowApp-CfeLvqLD.js → TerminalWindowApp-iqp-Np-a.js} +1 -1
- package/dist/public/assets/{ThreadView-S_XJwwbZ.js → ThreadView-DbS6XYBN.js} +3 -3
- package/dist/public/assets/{TimelineDiffPane-DgS-xWyU.js → TimelineDiffPane-CT7VsrDy.js} +1 -1
- package/dist/public/assets/{agent-diff-store-Cn0Zbsuy.js → agent-diff-store-CmJJu7WO.js} +1 -1
- package/dist/public/assets/{agent-visibility-B4n6jrOx.js → agent-visibility-DujHi06m.js} +1 -1
- package/dist/public/assets/auth-state-cache-C8cTMd6P.js +11 -0
- package/dist/public/assets/client-version-Z-1kpNfZ.js +1 -0
- package/dist/public/assets/{config-provider-GshVNiWq.js → config-provider-BI6LhEXG.js} +2 -2
- package/dist/public/assets/{dist-Cgpf3BIr.js → dist-BlIr-8t0.js} +172 -172
- package/dist/public/assets/{doc-hash-Bso39bSh.js → doc-hash-D0_HbJ23.js} +1 -1
- package/dist/public/assets/{documents-events-CtKncdGv.js → documents-events-CJea1fR_.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-SJF4yRd-.js → file-tree-adapter-DzAMgO1O.js} +1 -1
- package/dist/public/assets/{file-tree-utils-llNa05uo.js → file-tree-utils-3pfPI1X_.js} +1 -1
- package/dist/public/assets/{globals-88oPHAs4.css → globals-B1VH9dVh.css} +1 -1
- package/dist/public/assets/{globals-BzYms-F0.js → globals-CdwCpkXl.js} +1 -1
- package/dist/public/assets/index-C0AkDryr.js +2013 -0
- package/dist/public/assets/{lint-config-client-BYECwWuu.js → lint-config-client-DbBWIg_9.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-BR80y6ho.js → markdownlint-rule-browser-CUFRDZ2I.js} +1 -1
- package/dist/public/assets/{navigation-targets-SdStq-nY.js → navigation-targets-dewfI5_V.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-CgQ5akUh.js → open-managed-artifact-tab-kMJwQpt4.js} +1 -1
- package/dist/public/assets/pending-receive-nav-store-CDDIEMIE.js +1 -0
- package/dist/public/assets/{prop-types-CU-rIGvv.js → prop-types-BmO8uGg2.js} +1 -1
- package/dist/public/assets/{receive-store-C5uRDARd.js → receive-store-4fDKib_S.js} +1 -1
- package/dist/public/assets/{schema-fields-view-intent-BeD8vY0v.js → schema-fields-view-intent-D_s-Cynn.js} +1 -1
- package/dist/public/assets/{selection-context-DtzxXWAX.js → selection-context-C0NUwqpZ.js} +1 -1
- package/dist/public/assets/{skill-actions-PBEWDc_3.js → skill-actions-BLuXIHSm.js} +1 -1
- package/dist/public/assets/{skills-api-Cd3IvPjQ.js → skills-api-SMCgwzEY.js} +1 -1
- package/dist/public/assets/{src-Dum6a22K.js → src-itVDbQfo.js} +1 -1
- package/dist/public/assets/{tag-pill-input-CS-2Qx-_.js → tag-pill-input-DR244KKn.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-D3w-HLu3.js → target-navigation-intent-Cbl2tfqs.js} +1 -1
- package/dist/public/assets/{telemetry-impl-Z8PmW_aL.js → telemetry-impl-llHFvtad.js} +1 -1
- package/dist/public/assets/{telemetry-startup-Cy7C8oSF.js → telemetry-startup-Ce8-_9qU.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-CTVJjVZG.js → terminal-launch-events-BRcRf0Xe.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-pdIn1zDv.js → terminal-telemetry-B2HfhwZL.js} +1 -1
- package/dist/public/assets/typing-burst-detector-D-YHMlG7.js +8 -0
- package/dist/public/assets/{uninstall-BpVYvA3J.js → uninstall-CBrvDiNY.js} +1 -1
- package/dist/public/assets/{use-activity-panel-B8RDBgok.js → use-activity-panel-DmOMj8An.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-A0jx7vnI.js → use-apply-config-color-theme-CVaACVk5.js} +2 -2
- package/dist/public/assets/{use-collab-url-bpUtly6S.js → use-collab-url-CNP-irXj.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-w8QeNUlq.js → use-live-xterm-theme-Dcnl-fJO.js} +1 -1
- package/dist/public/assets/use-settings-route-u-AZNZ9O.js +1 -0
- package/dist/public/assets/{use-terminal-enabled-CuFAAh8J.js → use-terminal-enabled-CkLthL6Z.js} +1 -1
- package/dist/public/assets/use-timeline-entry-diff-YCuC-AiR.js +6 -0
- package/dist/public/assets/{use-workspace-CNWEPWim.js → use-workspace-Cn4V4yWb.js} +1 -1
- package/dist/public/assets/{workspace-paths-DQOJHVhV.js → workspace-paths-Cs9eIuPX.js} +1 -1
- package/dist/public/index.html +37 -37
- package/dist/public/uninstall.html +4 -4
- package/dist/{repair-launch-json-_2TGq22B.mjs → repair-launch-json-B7EsRree.mjs} +2 -2
- package/dist/{repair-mcp-configs-Cf6t84yK.mjs → repair-mcp-configs-CAdsYeAL.mjs} +2 -2
- package/dist/repair-skills-ClK8g58l.mjs +1 -0
- package/dist/{repair-skills-DwQqF8O8.mjs → repair-skills-DVSrDMGl.mjs} +2 -2
- package/dist/schemas/v0/config.project.schema.json +26 -0
- package/dist/server-lock-W-oGU6ba.mjs +1 -0
- package/dist/{server-lock-DpWXnrNF.mjs → server-lock-WyY-R-p6.mjs} +2 -2
- package/dist/{sleep-DTzPXGtM.mjs → sleep-DDnWCWup.mjs} +2 -2
- package/dist/src-BBhkxvx7.mjs +3275 -0
- package/dist/src-BMO6onuh.mjs +1 -0
- package/dist/{src-JZ7OJ1TB.mjs → src-BzvNUgtF.mjs} +7 -7
- package/dist/{src-DY417osM.mjs → src-DjCV5AKN.mjs} +124 -124
- package/dist/start-BYvqfT9V.mjs +4 -0
- package/dist/start-ConG7Bk_.mjs +1 -0
- package/dist/{write-project-skill-cxdqSDsT.mjs → write-project-skill-CS4rRA1W.mjs} +4 -4
- package/package.json +5 -5
- package/dist/constants-BKJ7B5iw.mjs +0 -2
- package/dist/fs-traced-B9Czc2nP.mjs +0 -1
- package/dist/git-handle-B1uGukUi.mjs +0 -1
- package/dist/init-CIt3KTw5.mjs +0 -1
- package/dist/loader-Bofa7u1n.mjs +0 -1
- package/dist/md-manager-DPw-b4lt.mjs +0 -2
- package/dist/preview-CUhu4iSu.mjs +0 -1
- package/dist/public/assets/DocumentContext-WcIs30H8.js +0 -38
- package/dist/public/assets/FeedbackForm-DXei5e26.js +0 -1
- package/dist/public/assets/LintConfigEditor-DEUL9rFl.js +0 -1
- package/dist/public/assets/PropertyPanel-F1tECi8I.js +0 -2
- package/dist/public/assets/ReportBugDialogBody-Cz_kN3Qc.js +0 -3
- package/dist/public/assets/SchemaConfigEditor-C_t3p7aQ.js +0 -1
- package/dist/public/assets/SourceEditor-DGpQCfDe.js +0 -1
- package/dist/public/assets/auth-state-cache-PC5ml3gS.js +0 -11
- package/dist/public/assets/client-version-BmlQC9U8.js +0 -1
- package/dist/public/assets/index-BVWeqqNi.js +0 -2014
- package/dist/public/assets/pending-receive-nav-store-DTqMgVXW.js +0 -1
- package/dist/public/assets/typing-burst-detector-BEbZgL9-.js +0 -6
- package/dist/public/assets/use-settings-route-CFvCFlXS.js +0 -1
- package/dist/public/assets/use-timeline-entry-diff-DlW9hmrR.js +0 -6
- package/dist/repair-skills-CtpTVpw_.mjs +0 -1
- package/dist/server-lock-CZMSbPZ0.mjs +0 -1
- package/dist/src-BFcAqZ_V.mjs +0 -1
- package/dist/src-BkP5u3RK.mjs +0 -3269
- package/dist/start-0twfe-vW.mjs +0 -1
- package/dist/start-BcTJLNem.mjs +0 -3
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./createLucideIcon-DAkhoPjT.js";import{t as s}from"./button-Gol9BgNB.js";import{c,d as l,i as u,n as d,o as f,p,s as m,t as h}from"./EnableSyncConfirmDialog-CPuodmd5.js";import{t as g}from"./arrow-up-right-obRIg3Sv.js";import{t as _}from"./check-GqWaoTdV.js";import{t as v}from"./folder-open-wLd69QUc.js";import{t as y}from"./info-yKMseklR.js";import{t as b}from"./loader-circle-Cg5SU7AZ.js";import{n as x}from"./miss-dialog-store-Bx4JLuKB.js";import{t as S}from"./refresh-cw-BfeWGCsv.js";import{t as C}from"./triangle-alert-Clgvyc7B.js";import{n as w}from"./dist-BLAMau9Z.js";import{r as T,u as E,v as D}from"./doc-hash-Bso39bSh.js";import{t as O}from"./external-link-T4Nj1gcG.js";var k=o(`file-pen`,[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]]),A=o(`file-question-mark`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3`,key:`mhlwft`}]]),j=o(`file-x-corner`,[[`path`,{d:`M11 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5`,key:`1jo35a`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m15 17 5 5`,key:`36xl1x`}],[`path`,{d:`m20 17-5 5`,key:`vdz27y`}]]),M=a(),N=e(n(),1),P=t(),F=`https://git-scm.com/docs/git-push`;function I(e,t){return!(e!==`stale`&&e!==`absent`||e===`stale`&&t?.syncEnabled===!0)}function L(e){return e?e.state!==`dormant`&&e.state!==`disabled`&&e.state!==`auth-error`&&e.state!==`conflict`:!1}function R(e){let t=(0,M.c)(47),{freshness:n,status:a,kind:o}=e,{_:c}=i(),{confirmOpen:l,setConfirmOpen:p,onToggleRequest:m,onConfirm:v}=u(f()),[b,x]=(0,N.useState)(`idle`),w=(0,N.useRef)(null),T,E;if(t[0]!==a||t[1]!==b?(T=()=>{if(!(b!==`pending`||!a)){if(a.pushError||a.pushErrorCode){x(`idle`);return}(a.lastSyncUtc??null)!==w.current&&x(`synced`)}},E=[b,a],t[0]=a,t[1]=b,t[2]=T,t[3]=E):(T=t[2],E=t[3]),(0,N.useEffect)(T,E),!I(n,a))return null;if(b===`synced`){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,P.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-dashed border-border bg-muted/40 p-2 text-xs text-muted-foreground`,"data-testid":`share-freshness-row`,children:[(0,P.jsx)(_,{className:`mt-0.5 size-3.5 shrink-0`,"aria-hidden":`true`}),(0,P.jsx)(`span`,{children:(0,P.jsx)(r,{id:`fxbCNQ`})})]}),t[4]=e):e=t[4],e}let D=a?.syncEnabled===!0,O=a?.pushPermission?.checkStatus===`denied`,k=!!(a?.pushError||a?.pushErrorCode),A=O||k,j=n===`absent`&&!D,R;if(n===`absent`&&!D){let e;t[5]!==c||t[6]!==o?(e=c(o===`folder`?{id:`PrJYSN`}:{id:`3BnyYc`}),t[5]=c,t[6]=o,t[7]=e):e=t[7],R=e}else if(n===`stale`){let e;t[8]!==c||t[9]!==o?(e=c(o===`folder`?{id:`Gt4gOO`}:{id:`2IYGkU`}),t[8]=c,t[9]=o,t[10]=e):e=t[10],R=e}else{let e;t[11]!==c||t[12]!==o?(e=c(o===`folder`?{id:`nqV0Kk`}:{id:`gwykHF`}),t[11]=c,t[12]=o,t[13]=e):e=t[13],R=e}let V;t[14]!==c||t[15]!==k||t[16]!==O?(V=O?c({id:`9OIqw4`}):k?c({id:`K6MQQk`}):null,t[14]=c,t[15]=k,t[16]=O,t[17]=V):V=t[17];let H=V,U;t[18]===a?.lastSyncUtc?U=t[19]:(U=()=>{w.current=a?.lastSyncUtc??null,x(`pending`),d(`sync`).catch(e=>{console.warn(`[share-freshness] sync trigger failed`,e instanceof Error?e.message:e),x(`idle`)})},t[18]=a?.lastSyncUtc,t[19]=U);let W=U,G=j?C:y,K;t[20]===G?K=t[21]:(K=(0,P.jsx)(G,{className:`mt-0.5 size-3.5 shrink-0`,"aria-hidden":`true`}),t[20]=G,t[21]=K);let q;t[22]===R?q=t[23]:(q=(0,P.jsx)(`span`,{children:R}),t[22]=R,t[23]=q);let J;t[24]===H?J=t[25]:(J=H?(0,P.jsx)(`span`,{children:H}):null,t[24]=H,t[25]=J);let Y;t[26]!==A||t[27]!==W||t[28]!==m||t[29]!==a||t[30]!==D||t[31]!==b?(Y=A?null:D?L(a)?(0,P.jsx)(`div`,{children:b===`pending`?(0,P.jsxs)(s,{variant:`outline`,size:`xs`,disabled:!0,children:[(0,P.jsx)(S,{className:`size-3 shrink-0 animate-spin`,"aria-hidden":`true`}),(0,P.jsx)(r,{id:`EHu0x2`})]}):(0,P.jsx)(s,{variant:`outline`,size:`xs`,onClick:W,children:(0,P.jsx)(r,{id:`lb_UU4`})})}):null:(0,P.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1.5`,children:[(0,P.jsx)(s,{variant:`outline`,size:`xs`,onClick:()=>m(!0),children:(0,P.jsx)(r,{id:`XU0OXn`})}),(0,P.jsxs)(`a`,{href:F,target:`_blank`,rel:`noopener noreferrer`,onClick:B,onAuxClick:z,className:`inline-flex items-center gap-1 transition-colors hover:text-primary`,children:[(0,P.jsx)(r,{id:`GLxIKR`}),(0,P.jsx)(g,{className:`size-3 shrink-0`,"aria-hidden":`true`})]})]}),t[26]=A,t[27]=W,t[28]=m,t[29]=a,t[30]=D,t[31]=b,t[32]=Y):Y=t[32];let X;t[33]!==q||t[34]!==J||t[35]!==Y?(X=(0,P.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[q,J,Y]}),t[33]=q,t[34]=J,t[35]=Y,t[36]=X):X=t[36];let Z;t[37]!==K||t[38]!==X?(Z=(0,P.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-dashed border-border bg-muted/40 p-2 text-xs text-muted-foreground`,"data-testid":`share-freshness-row`,children:[K,X]}),t[37]=K,t[38]=X,t[39]=Z):Z=t[39];let Q;t[40]!==l||t[41]!==v||t[42]!==p?(Q=(0,P.jsx)(h,{open:l,onOpenChange:p,onConfirm:v}),t[40]=l,t[41]=v,t[42]=p,t[43]=Q):Q=t[43];let $;return t[44]!==Z||t[45]!==Q?($=(0,P.jsxs)(P.Fragment,{children:[Z,Q]}),t[44]=Z,t[45]=Q,t[46]=$):$=t[46],$}function z(e){return O(e,F)}function B(e){return O(e,F)}function V(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function H(e){let t=(0,M.c)(13),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={phase:`pending`},t[0]=n):n=t[0];let[r,i]=(0,N.useState)(n),[a,o]=(0,N.useState)(0),s=e.branch,c;t[1]!==s||t[2]!==e.kind||t[3]!==e.path?(c=()=>{let t=window.okDesktop??null;if(!t||s===null){i({phase:`resolved`,resolution:{verdict:`unknown`}});return}let n=!1;return t.project.fetchTargetStatus({projectPath:t.config.projectPath,branch:s,path:e.path,kind:e.kind}).then(e=>{n||i({phase:`resolved`,resolution:e??{verdict:`unknown`}})}).catch(e=>{n||(console.warn(`[receive] miss target-status fetch failed`,e instanceof Error?e.message:e),i({phase:`resolved`,resolution:{verdict:`unknown`}}))}),()=>{n=!0}},t[1]=s,t[2]=e.kind,t[3]=e.path,t[4]=c):c=t[4];let l;t[5]!==s||t[6]!==a||t[7]!==e.kind||t[8]!==e.path?(l=[s,e.kind,e.path,a],t[5]=s,t[6]=a,t[7]=e.kind,t[8]=e.path,t[9]=l):l=t[9],(0,N.useEffect)(c,l);let u;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>{i({phase:`pending`}),o(U)},t[10]=u):u=t[10];let d;return t[11]===r?d=t[12]:(d={state:r,refetch:u},t[11]=r,t[12]=d),d}function U(e){return e+1}function W(e){let t=(0,M.c)(15),{onEnabled:n}=e,i=f(),a;t[0]===n?a=t[1]:(a={onEnabled:n},t[0]=n,t[1]=a);let{confirmOpen:o,setConfirmOpen:c,onToggleRequest:l,onConfirm:d}=u(i,a),p;t[2]===l?p=t[3]:(p=()=>l(!0),t[2]=l,t[3]=p);let m,g;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,P.jsx)(S,{className:`size-4`,"aria-hidden":`true`}),g=(0,P.jsx)(r,{id:`XU0OXn`}),t[4]=m,t[5]=g):(m=t[4],g=t[5]);let _;t[6]===p?_=t[7]:(_=(0,P.jsxs)(s,{onClick:p,"data-testid":`share-receive-miss-enable-sync`,children:[m,g]}),t[6]=p,t[7]=_);let v;t[8]!==o||t[9]!==d||t[10]!==c?(v=(0,P.jsx)(h,{open:o,onOpenChange:c,onConfirm:d}),t[8]=o,t[9]=d,t[10]=c,t[11]=v):v=t[11];let y;return t[12]!==_||t[13]!==v?(y=(0,P.jsxs)(P.Fragment,{children:[_,v]}),t[12]=_,t[13]=v,t[14]=y):y=t[14],y}function G(e){let t=(0,M.c)(23),{status:n,onSyncCompleted:a}=e,{_:o}=i(),[c,l]=(0,N.useState)(!1),u=(0,N.useRef)(null),f;t[0]!==a||t[1]!==c||t[2]!==n.lastSyncUtc||t[3]!==n.pushError||t[4]!==n.pushErrorCode?(f=()=>{if(c){if(n.pushError||n.pushErrorCode){l(!1);return}(n.lastSyncUtc??null)!==u.current&&(l(!1),a?.())}},t[0]=a,t[1]=c,t[2]=n.lastSyncUtc,t[3]=n.pushError,t[4]=n.pushErrorCode,t[5]=f):f=t[5];let p;t[6]!==a||t[7]!==c||t[8]!==n?(p=[c,n,a],t[6]=a,t[7]=c,t[8]=n,t[9]=p):p=t[9],(0,N.useEffect)(f,p);let m;t[10]!==o||t[11]!==n.lastSyncUtc?(m=()=>{u.current=n.lastSyncUtc??null,l(!0),d(`sync`).catch(e=>{console.warn(`[receive] miss sync trigger failed`,e instanceof Error?e.message:e),l(!1),w.error(o({id:`1u-mAI`}))})},t[10]=o,t[11]=n.lastSyncUtc,t[12]=m):m=t[12];let h=m,g;t[13]!==h||t[14]!==c?(g=c?(0,P.jsxs)(s,{disabled:!0,"aria-busy":`true`,"data-testid":`share-receive-miss-sync-now`,children:[(0,P.jsx)(S,{className:`size-4 animate-spin`,"aria-hidden":`true`}),(0,P.jsx)(r,{id:`EHu0x2`})]}):(0,P.jsxs)(s,{onClick:h,"data-testid":`share-receive-miss-sync-now`,children:[(0,P.jsx)(S,{className:`size-4`,"aria-hidden":`true`}),(0,P.jsx)(r,{id:`lb_UU4`})]}),t[13]=h,t[14]=c,t[15]=g):g=t[15];let _;t[16]===c?_=t[17]:(_=c?(0,P.jsx)(r,{id:`dXOolp`}):null,t[16]=c,t[17]=_);let v;t[18]===_?v=t[19]:(v=(0,P.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`sr-only`,"data-testid":`share-receive-miss-sync-status`,children:_}),t[18]=_,t[19]=v);let y;return t[20]!==g||t[21]!==v?(y=(0,P.jsxs)(P.Fragment,{children:[g,v]}),t[20]=g,t[21]=v,t[22]=y):y=t[22],y}var K=!1;function q(e){return!K&&e!==null&&e.syncEnabled!==!0}function J(e){return e===null?!1:e.hasRemote&&e.lastPullUtc!==void 0&&e.state!==`conflict`}function Y(e,t){let n=(0,M.c)(15),[r,i]=(0,N.useState)(!1),[a,o]=(0,N.useState)(null),[s,c]=(0,N.useState)(!1),l=(0,N.useRef)(null),u,f;n[0]!==t||n[1]!==r||n[2]!==e?(u=()=>{if(!r||(e?.lastPullUtc??null)===l.current)return;i(!1);let n=e?.lastPullOutcome??null;if(n===null){t?.();return}switch(n){case`refused`:case`error`:o(n);return;case`succeeded`:case`up-to-date`:if(q(e)){K=!0,c(!0);return}t?.();return;case`conflict`:t?.();return;default:t?.();return}},f=[r,e,t],n[0]=t,n[1]=r,n[2]=e,n[3]=u,n[4]=f):(u=n[3],f=n[4]),(0,N.useEffect)(u,f);let p;n[5]===t?p=n[6]:(p=()=>{c(!1),t?.()},n[5]=t,n[6]=p);let m;n[7]===e?.lastPullUtc?m=n[8]:(m=()=>{l.current=e?.lastPullUtc??null,o(null),i(!0),d(`pull`).catch(e=>{console.warn(`[receive] miss pull trigger failed`,e instanceof Error?e.message:e),i(!1),o(`error`)})},n[7]=e?.lastPullUtc,n[8]=m);let h;return n[9]!==a||n[10]!==s||n[11]!==r||n[12]!==p||n[13]!==m?(h={pending:r,failure:a,offering:s,resolveOffer:p,start:m},n[9]=a,n[10]=s,n[11]=r,n[12]=p,n[13]=m,n[14]=h):h=n[14],h}function X(e){let t=(0,M.c)(10),{pending:n,onPull:i}=e,a;t[0]!==i||t[1]!==n?(a=n?(0,P.jsxs)(s,{disabled:!0,"aria-busy":`true`,"data-testid":`share-receive-miss-pull-now`,children:[(0,P.jsx)(S,{className:`size-4 animate-spin`,"aria-hidden":`true`}),(0,P.jsx)(r,{id:`4uNLmk`})]}):(0,P.jsxs)(s,{onClick:i,"data-testid":`share-receive-miss-pull-now`,children:[(0,P.jsx)(p,{className:`size-4`,"aria-hidden":`true`}),(0,P.jsx)(r,{id:`fevEu0`})]}),t[0]=i,t[1]=n,t[2]=a):a=t[2];let o;t[3]===n?o=t[4]:(o=n?(0,P.jsx)(r,{id:`glG1TR`}):null,t[3]=n,t[4]=o);let c;t[5]===o?c=t[6]:(c=(0,P.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`sr-only`,"data-testid":`share-receive-miss-pull-status`,children:o}),t[5]=o,t[6]=c);let l;return t[7]!==a||t[8]!==c?(l=(0,P.jsxs)(P.Fragment,{children:[a,c]}),t[7]=a,t[8]=c,t[9]=l):l=t[9],l}function Z(e){let t=(0,M.c)(18),{onResolve:n,strandedCommitCount:r}=e,i=c(),a=(0,N.useRef)(!1),o;t[0]===n?o=t[1]:(o=function(){a.current||(a.current=!0,n())},t[0]=n,t[1]=o);let s=o,l;t[2]===s?l=t[3]:(l={onApplied:s},t[2]=s,t[3]=l);let{confirmOpen:u,setConfirmOpen:d,onModeSelect:f,onConfirm:p}=m(i,`off`,l),g=(0,N.useRef)(!1),_,v;t[4]===f?(_=t[5],v=t[6]):(_=()=>{g.current||(g.current=!0,f(`follow`))},v=[f],t[4]=f,t[5]=_,t[6]=v),(0,N.useEffect)(_,v);let y;t[7]!==s||t[8]!==d?(y=e=>{d(e),e||s()},t[7]=s,t[8]=d,t[9]=y):y=t[9];let b;t[10]!==p||t[11]!==s?(b=()=>{p(),s()},t[10]=p,t[11]=s,t[12]=b):b=t[12];let x;return t[13]!==u||t[14]!==r||t[15]!==y||t[16]!==b?(x=(0,P.jsx)(h,{open:u,onOpenChange:y,onConfirm:b,variant:`follow`,strandedCommitCount:r}),t[13]=u,t[14]=r,t[15]=y,t[16]=b,t[17]=x):x=t[17],x}function Q(e){let t=(0,M.c)(89),{nav:n,state:a,onBrowseFolder:o,onOpenRenamed:c,onEnableAutoSync:u,onSyncCompleted:d,onPullApplied:f}=e,{_:m}=i(),h=l(),g=Y(h,f),_=n.branch,y;t[0]!==m||t[1]!==n.kind?(y=n.kind===`folder`?m({id:`ugoTXs`}):m({id:`XH30C4`}),t[0]=m,t[1]=n.kind,t[2]=y):y=t[2];let S=y;if(a.phase===`pending`){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(b,{className:`size-5 animate-spin`,"aria-hidden":`true`}),(0,P.jsx)(r,{id:`c8jBgX`})]}),t[3]=e):e=t[3],e}let{resolution:C}=a,w,T;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,P.jsx)(v,{className:`size-4`,"aria-hidden":`true`}),T=(0,P.jsx)(r,{id:`hItdtk`}),t[4]=w,t[5]=T):(w=t[4],T=t[5]);let E;t[6]===o?E=t[7]:(E=(0,P.jsxs)(s,{variant:`outline`,onClick:o,"data-testid":`share-receive-miss-browse`,children:[w,T]}),t[6]=o,t[7]=E);let D=E,O,N,F,I=null;if(C.verdict===`renamed`){let e;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,P.jsx)(x,{className:`size-9`,"aria-hidden":`true`}),t[8]=e):e=t[8],O=e;let n;t[9]!==C.renamedTo||t[10]!==S?(n={0:C.renamedTo,targetNoun:S},t[9]=C.renamedTo,t[10]=S,t[11]=n):n=t[11];let i;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(i={0:(0,P.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})},t[12]=i):i=t[12];let a;t[13]===n?a=t[14]:(a=(0,P.jsx)(r,{id:`P0HC30`,values:n,components:i}),t[13]=n,t[14]=a),N=a;let o;t[15]!==c||t[16]!==C.renamedTo?(o=()=>c(C.renamedTo),t[15]=c,t[16]=C.renamedTo,t[17]=o):o=t[17];let l,u;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,P.jsx)(x,{className:`size-4`,"aria-hidden":`true`}),u=(0,P.jsx)(r,{id:`AItsE5`}),t[18]=l,t[19]=u):(l=t[18],u=t[19]);let d;t[20]===o?d=t[21]:(d=(0,P.jsxs)(s,{onClick:o,"data-testid":`share-receive-miss-open-renamed`,children:[l,u]}),t[20]=o,t[21]=d);let f;t[22]!==D||t[23]!==d?(f=(0,P.jsxs)(P.Fragment,{children:[d,D]}),t[22]=D,t[23]=d,t[24]=f):f=t[24],F=f}else if(C.verdict===`deleted`){let e;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,P.jsx)(j,{className:`size-9`,"aria-hidden":`true`}),t[25]=e):e=t[25],O=e;let n;t[26]!==_||t[27]!==S?(n={targetNoun:S,branch:_},t[26]=_,t[27]=S,t[28]=n):n=t[28];let i;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(i={0:(0,P.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})},t[29]=i):i=t[29];let a;t[30]===n?a=t[31]:(a=(0,P.jsx)(r,{id:`kpqWwG`,values:n,components:i}),t[30]=n,t[31]=a),N=a,F=D}else if(C.verdict===`never-on-branch`){let e;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,P.jsx)(A,{className:`size-9`,"aria-hidden":`true`}),t[32]=e):e=t[32],O=e;let n;t[33]!==_||t[34]!==S?(n={targetNoun:S,branch:_},t[33]=_,t[34]=S,t[35]=n):n=t[35];let i;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(i={0:(0,P.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})},t[36]=i):i=t[36];let a;t[37]===n?a=t[38]:(a=(0,P.jsx)(r,{id:`i9TPUi`,values:n,components:i}),t[37]=n,t[38]=a),N=a,F=D}else if(C.verdict===`changed-locally`){let e;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,P.jsx)(k,{className:`size-9`,"aria-hidden":`true`}),t[39]=e):e=t[39],O=e;let n=h?.syncEnabled===!0,i=h?.pushPermission?.checkStatus===`denied`||!!(h?.pushError||h?.pushErrorCode);if(n){let e;t[40]!==_||t[41]!==S?(e=_===null?(0,P.jsx)(r,{id:`RyIKxy`,values:{targetNoun:S}}):(0,P.jsx)(r,{id:`l6kpzR`,values:{targetNoun:S,branch:_},components:{0:(0,P.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}}),t[40]=_,t[41]=S,t[42]=e):e=t[42],N=e}else{let e;t[43]!==_||t[44]!==S?(e=_===null?(0,P.jsx)(r,{id:`UuYo7g`,values:{targetNoun:S}}):(0,P.jsx)(r,{id:`HoWElC`,values:{targetNoun:S,branch:_},components:{0:(0,P.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}}),t[43]=_,t[44]=S,t[45]=e):e=t[45],N=e}let a=null;if(h?.syncEnabled){if(L(h)&&!i){let e;t[46]!==d||t[47]!==h?(e=(0,P.jsx)(G,{status:h,onSyncCompleted:d}),t[46]=d,t[47]=h,t[48]=e):e=t[48],a=e}}else if(h!==null){let e;t[49]===u?e=t[50]:(e=(0,P.jsx)(W,{onEnabled:u}),t[49]=u,t[50]=e),a=e}let o;t[51]!==D||t[52]!==a?(o=(0,P.jsxs)(P.Fragment,{children:[a,D]}),t[51]=D,t[52]=a,t[53]=o):o=t[53],F=o}else{let e;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,P.jsx)(p,{className:`size-9`,"aria-hidden":`true`}),t[54]=e):e=t[54],O=e;let n;t[55]===h?n=t[56]:(n=J(h),t[55]=h,t[56]=n);let i=n;if(i){let e;t[57]===_?e=t[58]:(e=_===null?(0,P.jsx)(r,{id:`gwEcOD`}):(0,P.jsx)(r,{id:`wvK7Ay`,values:{branch:_},components:{0:(0,P.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}}),t[57]=_,t[58]=e),N=e}else{let e;t[59]===_?e=t[60]:(e=_===null?(0,P.jsx)(r,{id:`Xewl6B`}):(0,P.jsx)(r,{id:`d1JjXo`,values:{branch:_},components:{0:(0,P.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}}),t[59]=_,t[60]=e),N=e}let a=g.failure===null?`sr-only`:`max-w-md text-balance text-1sm text-destructive`,o;t[61]===g.failure?o=t[62]:(o=g.failure===`refused`?(0,P.jsx)(r,{id:`Xp7Kq4`}):g.failure===`error`?(0,P.jsx)(r,{id:`JG_8KT`}):null,t[61]=g.failure,t[62]=o);let s;t[63]!==a||t[64]!==o?(s=(0,P.jsx)(`p`,{role:`alert`,className:a,"data-testid":`share-receive-miss-pull-error`,children:o}),t[63]=a,t[64]=o,t[65]=s):s=t[65],I=s;let c;t[66]!==i||t[67]!==g.pending||t[68]!==g.start?(c=i?(0,P.jsx)(X,{pending:g.pending,onPull:g.start}):null,t[66]=i,t[67]=g.pending,t[68]=g.start,t[69]=c):c=t[69];let l;t[70]!==g.offering||t[71]!==g.resolveOffer||t[72]!==h?.ahead?(l=g.offering?(0,P.jsx)(Z,{onResolve:g.resolveOffer,strandedCommitCount:h?.ahead??0}):null,t[70]=g.offering,t[71]=g.resolveOffer,t[72]=h?.ahead,t[73]=l):l=t[73];let u;t[74]!==D||t[75]!==c||t[76]!==l?(u=(0,P.jsxs)(P.Fragment,{children:[c,D,l]}),t[74]=D,t[75]=c,t[76]=l,t[77]=u):u=t[77],F=u}let R;t[78]===O?R=t[79]:(R=(0,P.jsx)(`div`,{className:`flex size-16 items-center justify-center rounded-full border bg-muted/40 text-muted-foreground`,children:O}),t[78]=O,t[79]=R);let z;t[80]===N?z=t[81]:(z=(0,P.jsx)(`p`,{className:`max-w-md text-balance text-base leading-6 text-foreground/90`,children:N}),t[80]=N,t[81]=z);let B;t[82]===F?B=t[83]:(B=(0,P.jsx)(`div`,{className:`flex flex-col-reverse gap-2 sm:flex-row sm:flex-wrap sm:justify-center`,children:F}),t[82]=F,t[83]=B);let V;return t[84]!==I||t[85]!==R||t[86]!==z||t[87]!==B?(V=(0,P.jsxs)(P.Fragment,{children:[R,z,I,B]}),t[84]=I,t[85]=R,t[86]=z,t[87]=B,t[88]=V):V=t[88],V}function $(e){return e.replace(/^\/+|\/+$/g,``)}function ee(e,t){if(t.kind===`folder`){if(E(e))return $(t.path)===``;let n=T(e);return n!==null&&$(n)===$(t.path)}let n=T(e);return n===null?!1:D(n)===D(t.path)}function te(){let e=null,t=new Set,n=!1;function r(){for(let e of t)e()}function i(t){e!==t&&(e=t,r())}function a(){e!==null&&(ee(window.location.hash,e)||i(null))}function o(){n||typeof window>`u`||(n=!0,window.addEventListener(`hashchange`,a))}return{arm(e){o(),i(e)},clear(){i(null)},getSnapshot(){return e},subscribe(e){return t.add(e),()=>{t.delete(e)}},dispose(){n&&typeof window<`u`&&(window.removeEventListener(`hashchange`,a),n=!1),i(null)}}}var ne=te();function re(e,t){return e===null||e.kind!==`missing`||t===null||D(t.path)!==e.target?null:t}export{H as a,V as i,ne as n,R as o,Q as r,I as s,re as t};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{C as n,nn as r,r as i}from"./DocumentContext-WcIs30H8.js";import{t as a}from"./react-f2sANaYj.js";import{n as o,r as s}from"./dist-Nvb76hAm.js";import{r as c,t as l}from"./useQuery-ZeEDLtxh.js";import{t as u}from"./compiler-runtime-BfE3aGVn.js";import{s as d}from"./createLucideIcon-DAkhoPjT.js";import{t as f}from"./button-Gol9BgNB.js";import{i as p,n as m,t as h}from"./tooltip-B4J7VHmA.js";import{n as g,r as _,t as v}from"./collapsible-B1mS1n9y.js";import{N as y,ct as b,k as x}from"./CodeMirrorPropInput-BqDZpzvH.js";import{n as S,t as C}from"./toggle-group-CjXmmTGy.js";import{Jt as w,ai as T,gt as E,yr as D,yt as O}from"./dist-Cgpf3BIr.js";import{t as k}from"./chevron-right-C8oTR6gu.js";import{n as A}from"./CopyButton-1Q6Wnnjb.js";import{i as j,r as M}from"./prop-types-CU-rIGvv.js";import{l as N}from"./workspace-paths-DQOJHVhV.js";import{t as P}from"./refresh-cw-BfeWGCsv.js";import{t as F}from"./triangle-alert-Clgvyc7B.js";import{t as I}from"./wrench-BfoTvqT9.js";import{n as L}from"./dist-BLAMau9Z.js";import{t as R}from"./dist-q14fBS3T.js";import{a as z}from"./use-settings-route-CFvCFlXS.js";import{c as B}from"./documents-events-CtKncdGv.js";import{i as V}from"./startup-marks-CqVzdU1y.js";import{a as H,s as U}from"./doc-hash-Bso39bSh.js";import{t as W}from"./badge-Dba4cvJR.js";import{a as G,i as ee,n as te,o as ne,r as re,s as ie,t as ae}from"./panel-C8ZhM4q-.js";import{t as oe}from"./lint-plugin-meta-J-wb-uxW.js";import{t as K}from"./skeleton-BG12Hmzn.js";import{a as se,d as ce}from"./lint-config-client-BYECwWuu.js";var q=e(a(),1),J=u(),le=3e4,Y=new Map;function X(e){return e?Date.now()-e.rememberedAt>le?null:e.navigation:null}function ue(e,t){Y.set(e,{navigation:t,rememberedAt:Date.now()})}function Z(e){return X(Y.get(e))}function de(e){let t=Y.get(e);return Y.delete(e),X(t)}function fe(e){Y.delete(e)}function pe(e,t){let n=(0,J.c)(4),r=t===void 0?!1:t,[i,a]=(0,q.useState)(void 0),o=(0,q.useRef)(null),s,c;return n[0]!==r||n[1]!==e?(s=()=>{if(r||e.length===0){a(void 0);return}let t=function(){let t=window.innerHeight/2,n,r;for(let i of e){let e=document.getElementById(i);if(!e)continue;let a=e.getBoundingClientRect().top;a<0?n=i:r===void 0&&a<t&&(r=i)}a(r??n??e[0])},n=function(){o.current===null&&(o.current=requestAnimationFrame(()=>{o.current=null,t()}))};return document.addEventListener(`scroll`,n,{capture:!0,passive:!0}),t(),()=>{document.removeEventListener(`scroll`,n,{capture:!0}),o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)}},c=[e,r],n[0]=r,n[1]=e,n[2]=s,n[3]=c):(s=n[2],c=n[3]),(0,q.useEffect)(s,c),i}var Q=t(),me=300;async function he(e){let t=await fetch(`/api/page-headings?docName=${encodeURIComponent(e)}`),n;try{n=await t.json()}catch(e){throw new y(R._({id:`qAQVSD`}),{cause:e,status:t.status})}if(!t.ok){let e=O.safeParse(n);throw e.success?Error(e.data.title):new y(R._({id:`zlErBl`}),{status:t.status})}let r=E.safeParse(n);if(!r.success)throw new y(R._({id:`XW18jo`}),{status:t.status});return r.data.headings??[]}var ge=32,_e=12,ve=6,ye=`open-knowledge:outline-nav`;function be(e){let t=(0,J.c)(2),n;return t[0]===e?n=t[1]:(n=(0,Q.jsx)(V,{name:`outline-panel`,children:(0,Q.jsx)(xe,{...e})}),t[0]=e,t[1]=n),n}function xe(e){let t=(0,J.c)(50),{docName:n,isSourceMode:r,className:a}=e,u=a===void 0?``:a,{_:f}=s(),{pages:p,loading:m}=j(),h=c(),{activeProvider:g,activeDocName:_}=i(),v,y;t[0]===n?(v=t[1],y=t[2]):(v=[`page-headings`,n],y=()=>he(n),t[0]=n,t[1]=v,t[2]=y);let b;t[3]!==n||t[4]!==m||t[5]!==p?(b=!m&&(p.has(n)||D(n)),t[3]=n,t[4]=m,t[5]=p,t[6]=b):b=t[6];let x;t[7]!==v||t[8]!==y||t[9]!==b?(x={queryKey:v,queryFn:y,enabled:b,staleTime:1/0},t[7]=v,t[8]=y,t[9]=b,t[10]=x):x=t[10];let{data:S,isLoading:C,error:w}=l(x),T;t[11]===S?T=t[12]:(T=S===void 0?[]:S,t[11]=S,t[12]=T);let E=T,O,k;t[13]!==_||t[14]!==g||t[15]!==n||t[16]!==h?(O=()=>{if(!g||_!==n)return;let e=g.document,t=null,r=()=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{t=null,h.invalidateQueries({queryKey:[`page-headings`,n]})},me)};return e.on(`update`,r),()=>{e.off(`update`,r),t!==null&&clearTimeout(t)}},k=[g,_,n,h],t[13]=_,t[14]=g,t[15]=n,t[16]=h,t[17]=O,t[18]=k):(O=t[17],k=t[18]),(0,q.useEffect)(O,k);let A;t[19]===E?A=t[20]:(A=E.map(Se),t[19]=E,t[20]=A);let M=pe(A,r),N;t[21]!==M||t[22]!==E?(N=M?E.findIndex(e=>e.slug===M):-1,t[21]=M,t[22]=E,t[23]=N):N=t[23];let P=N,F;t[24]!==n||t[25]!==r?(F=function(e,t){let i={index:e,slug:t,mode:r?`source`:`wysiwyg`};i.mode===`source`&&ue(n,{kind:`outline`,detail:i}),window.dispatchEvent(new CustomEvent(ye,{detail:i}))},t[24]=n,t[25]=r,t[26]=F):F=t[26];let I=F,L=((P>=0?E[P].level:1)-1)*_e+(_e-ve)/2,R=P*ge+(ge-ve)/2,z;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,Q.jsx)(ie,{children:(0,Q.jsx)(o,{id:`dD7NPy`})}),t[27]=z):z=t[27];let B;t[28]!==E.length||t[29]!==C?(B=!C&&(0,Q.jsx)(re,{children:E.length}),t[28]=E.length,t[29]=C,t[30]=B):B=t[30];let V;t[31]===B?V=t[32]:(V=(0,Q.jsxs)(ne,{children:[z,B]}),t[31]=B,t[32]=V);let H;t[33]!==f||t[34]!==P||t[35]!==M||t[36]!==w||t[37]!==I||t[38]!==E||t[39]!==C||t[40]!==L||t[41]!==R?(H=w?(0,Q.jsx)(G,{className:`px-2`,children:w instanceof Error?w.message:f({id:`GuqOb1`})}):E.length===0&&!C?(0,Q.jsx)(ee,{className:`px-2`,children:(0,Q.jsx)(o,{id:`0BB9ID`})}):(0,Q.jsxs)(`nav`,{"aria-label":f({id:`BymzO4`}),className:`relative`,children:[P>=0&&(0,Q.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:ve,height:ve,transform:`translate(${L}px, ${R}px)`}}),E.map((e,t)=>{let n=e.slug===M;return(0,Q.jsx)(`button`,{type:`button`,"aria-current":n?`location`:void 0,onClick:()=>I(t,e.slug),className:d(`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)*_e+20}px`},title:e.text,children:e.text},t)})]}),t[33]=f,t[34]=P,t[35]=M,t[36]=w,t[37]=I,t[38]=E,t[39]=C,t[40]=L,t[41]=R,t[42]=H):H=t[42];let U;t[43]!==C||t[44]!==H?(U=(0,Q.jsx)(te,{className:`px-3 py-2`,"aria-busy":C,children:H}),t[43]=C,t[44]=H,t[45]=U):U=t[45];let W;return t[46]!==u||t[47]!==V||t[48]!==U?(W=(0,Q.jsxs)(ae,{className:u,children:[V,U]}),t[46]=u,t[47]=V,t[48]=U,t[49]=W):W=t[49],W}function Se(e){return e.slug}function Ce(e){let t=(0,J.c)(10),{scope:n,onScopeChange:r}=e,{_:i}=s(),a;t[0]===r?a=t[1]:(a=e=>{e&&r(e)},t[0]=r,t[1]=a);let c;t[2]===i?c=t[3]:(c=i({id:`aBgwis`}),t[2]=i,t[3]=c);let l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Q.jsx)(S,{value:`doc`,className:`flex-1`,"data-testid":`panel-scope-doc`,children:(0,Q.jsx)(o,{id:`UpCz01`})}),t[4]=l):l=t[4];let u;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Q.jsx)(S,{value:`project`,className:`flex-1`,"data-testid":`panel-scope-project`,children:(0,Q.jsx)(o,{id:`e0NrBM`})}),t[5]=u):u=t[5];let d;return t[6]!==n||t[7]!==a||t[8]!==c?(d=(0,Q.jsx)(`div`,{className:`shrink-0 px-4 pb-2`,children:(0,Q.jsxs)(C,{type:`single`,variant:`segmented`,size:`sm`,spacing:1,value:n,onValueChange:a,"aria-label":c,className:`w-full rounded-md bg-muted p-0.5 dark:bg-background`,children:[l,u]})}),t[6]=n,t[7]=a,t[8]=c,t[9]=d):d=t[9],d}async function we(e={kind:`project`}){try{let t=e.kind===`path`?`?path=${encodeURIComponent(e.path)}`:e.kind===`doc`?`?doc=${encodeURIComponent(e.docName)}`:``,n=await fetch(`/api/audit${t}`);if(!n.ok)return console.warn(`[audit] request failed`,n.status,n.statusText),null;let r=await n.json().catch(()=>null),i=w.safeParse(r);return i.success?i.data:(console.warn(`[audit] response failed schema validation`,i.error.issues),null)}catch(e){return console.warn(`[audit] fetch threw`,e),null}}function Te(e){let t=(0,J.c)(4),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[],t[0]=n):n=t[0];let[r,i]=(0,q.useState)(n),a,o;return t[1]===e?(a=t[2],o=t[3]):(a=()=>{if(i(Oe),e===null)return;let t=!1,n=()=>{we({kind:`doc`,docName:e}).then(e=>{if(t||e===null)return;let n=e.files.flatMap(De).filter(Ee);i(e=>e.length===0&&n.length===0?e:n)})};n();let r=B(e=>{e.includes(`backlinks`)&&n()});return()=>{t=!0,r()}},o=[e],t[1]=e,t[2]=a,t[3]=o),(0,q.useEffect)(a,o),r}function Ee(e){return e.source===`links`}function De(e){return e.diagnostics}function Oe(e){return e.length===0?e:[]}var ke={errorCount:0,warningCount:0},$=new Map,Ae=new Set,je=new Map;function Me(){let e=new Map;for(let[t,n]of $){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})}je=e;for(let e of Ae)e()}function Ne(e){let t={lint:{errorCount:0,warningCount:0},links:{errorCount:0,warningCount:0}};for(let n of e){let e=n.source===`links`?t.links:t.lint;n.severity===`error`?e.errorCount+=1:e.warningCount+=1}return t}function Pe(e){return Ae.add(e),()=>{Ae.delete(e)}}function Fe(){return je}function Ie(e){$.clear();for(let t of e)$.set(H(t.file),Ne(t.diagnostics));Me()}function Le(e,t){$.set(e,Ne(t)),Me()}function Re(e,t,n){let r=$.get(e)??{lint:ke,links:ke},i=r[t];i.errorCount===n.errorCount&&i.warningCount===n.warningCount||($.set(e,{...r,[t]:n}),Me())}var ze=`open-knowledge:lint-nav`;function Be(e,t){return e.range.start.line-t.range.start.line||e.range.start.character-t.range.start.character}function Ve(e){return{line:e.range.start.line+1,column:e.range.start.character+1}}function He(e){let t=(0,J.c)(29),{diagnostic:n}=e,{_:i}=s(),a=n.severity===`error`?A:F,c=`${n.source}/${n.code}`,l=n.range.start.line+1,u=n.source===`links`,f=n.severity===`error`?`text-destructive`:`text-amber-500`,p;t[0]===f?p=t[1]:(p=d(`mt-0.5 size-3.5 shrink-0`,f),t[0]=f,t[1]=p);let m;t[2]!==a||t[3]!==p?(m=(0,Q.jsx)(a,{"aria-hidden":`true`,className:p}),t[2]=a,t[3]=p,t[4]=m):m=t[4];let h;t[5]===n.message?h=t[6]:(h=(0,Q.jsx)(`span`,{className:`text-foreground`,children:n.message}),t[5]=n.message,t[6]=h);let g;t[7]!==m||t[8]!==h?(g=(0,Q.jsxs)(`span`,{className:`flex items-start gap-1.5 text-sm`,children:[m,h]}),t[7]=m,t[8]=h,t[9]=g):g=t[9];let _=u&&`gap-0.5`,v;t[10]===_?v=t[11]:(v=d(`h-4 shrink-0 px-1 font-sans text-[10px] uppercase leading-none`,_),t[10]=_,t[11]=v);let y;t[12]===u?y=t[13]:(y=u?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(r,{"aria-hidden":`true`,className:`size-2.5`}),(0,Q.jsx)(o,{id:`LdyooL`})]}):(0,Q.jsx)(o,{id:`STOrpI`}),t[12]=u,t[13]=y);let b;t[14]!==v||t[15]!==y?(b=(0,Q.jsx)(W,{variant:`gray`,"data-testid":`problems-source-tag`,className:v,children:y}),t[14]=v,t[15]=y,t[16]=b):b=t[16];let x;t[17]!==i||t[18]!==l?(x=i({id:`enPTnx`,values:{displayLine:l}}),t[17]=i,t[18]=l,t[19]=x):x=t[19];let S;t[20]!==c||t[21]!==x?(S=(0,Q.jsxs)(`span`,{className:`min-w-0 truncate`,children:[c,` · `,x]}),t[20]=c,t[21]=x,t[22]=S):S=t[22];let C;t[23]!==S||t[24]!==b?(C=(0,Q.jsxs)(`span`,{className:`flex items-center gap-1.5 ps-5 font-mono text-xs text-muted-foreground`,children:[b,S]}),t[23]=S,t[24]=b,t[25]=C):C=t[25];let w;return t[26]!==C||t[27]!==g?(w=(0,Q.jsxs)(Q.Fragment,{children:[g,C]}),t[26]=C,t[27]=g,t[28]=w):w=t[28],w}function Ue(e){return`${e.source}/${e.code}-${e.range.start.line}-${e.range.start.character}-${e.message}`}function We(e){return e.reduce((e,t)=>e+ +((t.fixes?.length??0)>0),0)}function Ge(e){let t=(0,J.c)(11),{target:n,creating:r,disabled:i,onCreate:a}=e,{_:c}=s(),l;t[0]!==c||t[1]!==n?(l=c({id:`oWsZk8`,values:{target:n}}),t[0]=c,t[1]=n,t[2]=l):l=t[2];let u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Q.jsx)(b,{"aria-hidden":`true`,className:`size-3`}),t[3]=u):u=t[3];let d;t[4]===r?d=t[5]:(d=r?(0,Q.jsx)(o,{id:`E9bKSA`}):(0,Q.jsx)(o,{id:`XRuL0i`}),t[4]=r,t[5]=d);let p;return t[6]!==i||t[7]!==a||t[8]!==l||t[9]!==d?(p=(0,Q.jsxs)(f,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,disabled:i,onClick:a,"aria-label":l,"data-testid":`problems-create-page`,children:[u,d]}),t[6]=i,t[7]=a,t[8]=l,t[9]=d,t[10]=p):p=t[10],p}function Ke(e){let t=(0,J.c)(13),{count:n,disabled:r,onClick:i,children:a}=e,{_:c}=s(),l;t[0]!==c||t[1]!==a||t[2]!==n?(l=a===void 0?c({id:`Izb10l`,values:{count:n}}):void 0,t[0]=c,t[1]=a,t[2]=n,t[3]=l):l=t[3];let u;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Q.jsx)(I,{"aria-hidden":`true`,className:`size-3`}),t[4]=u):u=t[4];let d;t[5]!==a||t[6]!==n?(d=a??(0,Q.jsx)(o,{id:`5_8TCr`,values:{count:n}}),t[5]=a,t[6]=n,t[7]=d):d=t[7];let p;return t[8]!==r||t[9]!==i||t[10]!==l||t[11]!==d?(p=(0,Q.jsxs)(f,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,disabled:r,onClick:i,"aria-label":l,"data-testid":`problems-fix-all`,children:[u,d]}),t[8]=r,t[9]=i,t[10]=l,t[11]=d,t[12]=p):p=t[12],p}function qe(e){let t=(0,J.c)(14),{docName:r,diagnostics:i,onFix:a,onFixAll:c,onAskAi:l}=e,{_:u}=s(),[d,g]=(0,q.useState)(`doc`),{data:_}=ce(),v=_===null?null:_.effective.enabled?oe.filter(e=>_.effective.plugins[e.id].enabled):[],y=v!==null&&v.length===0,b;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={status:`idle`},t[0]=b):b=t[0];let[x,S]=(0,q.useState)(b),[C,w]=(0,q.useState)(null),T=M(),[E,D]=(0,q.useState)(null),O=(0,q.useRef)(!0),k,A;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(k=()=>(O.current=!0,()=>{O.current=!1}),A=[],t[1]=k,t[2]=A):(k=t[1],A=t[2]),(0,q.useEffect)(k,A);let j=[...i].sort(Be),P=async function(e){let t=e.linkTarget;if(!(t===void 0||E!==null||T===null)){D(t);try{await n({initialDir:``,suggestedName:t},{addPage:T.addPage})}catch(e){let t=e;L.error(t instanceof Error?t.message:u({id:`tfi40B`})),O.current&&D(null);return}L.success(u({id:`EWCJFu`,values:{target:t}})),O.current&&D(null),O.current&&x.status===`loaded`&&await F()}};async function F(){S({status:`loading`});let e=await we();e!==null&&Ie(e.files),O.current&&S(e===null?{status:`failed`}:{status:`loaded`,result:e})}let R=x.status===`loaded`?x.result.files.filter(Ze):[],B=async function(){if(C!==null||R.length===0)return;w({done:0,total:R.length});let e=[];for(let t of R){let n=await se(H(t.file));if(!O.current)return;n.ok||e.push({file:t.file,detail:n.errorDetail}),w(Xe)}if(w(null),e.length>0){let t=e[0];L.error(u({id:`fru3T7`,values:{0:e.length,1:R.length}}),{description:t===void 0?void 0:`${t.file}${t.detail===null?``:` — ${t.detail}`}`})}try{await F()}catch{O.current&&S({status:`failed`})}},V=function(e){g(e),e===`project`&&x.status===`idle`&&F()},W;t[3]===r?W=t[4]:(W=function(e){let t=Ve(e);ue(r,{kind:`lint`,detail:t}),window.dispatchEvent(new CustomEvent(ze,{detail:t}))},t[3]=r,t[4]=W);let G=W,K;t[5]!==r||t[6]!==G?(K=function(e,t){let n=H(e);if(n===r){G(t);return}ue(n,{kind:`lint`,detail:Ve(t)}),window.location.hash=U(n)},t[5]=r,t[6]=G,t[7]=K):K=t[7];let le=K,Y;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,Q.jsx)(ie,{children:(0,Q.jsx)(o,{id:`OXdGnd`})}),t[8]=Y):Y=t[8];let X=v!==null&&v.length>0&&(0,Q.jsxs)(h,{children:[(0,Q.jsx)(p,{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,Q.jsx)(o,{id:`yxF19Y`,values:{0:v.length}})}),(0,Q.jsx)(m,{"data-testid":`problems-active-plugins-tooltip`,children:(0,Q.jsx)(o,{id:`ws5o1F`,values:{0:v.map(Ye).join(`, `)}})})]}),Z;t[9]===X?Z=t[10]:(Z=(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[Y,X]}),t[9]=X,t[10]=Z);let de=d===`doc`&&j.length>0&&(0,Q.jsx)(re,{children:j.length}),fe;return t[11]!==de||t[12]!==Z?(fe=(0,Q.jsxs)(ne,{children:[Z,de]}),t[11]=de,t[12]=Z,t[13]=fe):fe=t[13],(0,Q.jsxs)(ae,{children:[fe,(0,Q.jsx)(Ce,{scope:d,onScopeChange:V}),d===`doc`?(0,Q.jsx)(te,{className:`px-2 py-2`,children:j.length===0?y?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(ee,{className:`px-2`,"data-testid":`problems-no-plugins`,children:(0,Q.jsx)(o,{id:`Hngy37`})}),(0,Q.jsx)(`div`,{className:`px-2 pt-2`,children:(0,Q.jsx)(f,{variant:`outline`,size:`sm`,onClick:z,"data-testid":`problems-enable-plugins`,children:(0,Q.jsx)(o,{id:`rnX-1S`})})})]}):(0,Q.jsx)(ee,{className:`px-2`,children:(0,Q.jsx)(o,{id:`ZI8uvA`})}):(0,Q.jsxs)(Q.Fragment,{children:[c!==void 0&&(0,Q.jsx)(`div`,{className:`flex items-center justify-end gap-2 px-2 pb-1`,children:(0,Q.jsx)(Ke,{count:We(j),disabled:We(j)===0,onClick:c})}),(0,Q.jsx)(`ul`,{"aria-label":u({id:`OXdGnd`}),className:`flex flex-col gap-0.5`,children:j.map(e=>{let t=e.range.start.line+1,n=a!==void 0&&(e.fixes?.length??0)>0,r=e.linkTarget!==void 0&&T!==null,i=`${e.source}/${e.code}`;return(0,Q.jsxs)(`li`,{className:`group relative rounded transition-colors hover:bg-muted`,children:[(0,Q.jsx)(`button`,{type:`button`,onClick:()=>G(e),className:`flex w-full cursor-pointer flex-col gap-0.5 rounded px-2 py-1.5 text-left`,title:u({id:`aHPdYV`,values:{displayLine:t}}),children:(0,Q.jsx)(He,{diagnostic:e})}),n||l!==void 0||r?(0,Q.jsxs)(`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:[r?(0,Q.jsx)(Ge,{target:e.linkTarget??``,creating:E===e.linkTarget,disabled:E!==null,onCreate:()=>void P(e)}):null,n?(0,Q.jsxs)(f,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,onClick:()=>a?.(e),"aria-label":u({id:`fZj9em`,values:{flatId:i}}),"data-testid":`problems-fix`,children:[(0,Q.jsx)(I,{"aria-hidden":`true`,className:`size-3`}),(0,Q.jsx)(o,{id:`c4fVUV`})]}):null,l===void 0?null:(0,Q.jsxs)(f,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,onClick:()=>l(e),"aria-label":u({id:`hh4mVC`,values:{flatId:i}}),"data-testid":`problems-ask-ai`,children:[(0,Q.jsx)(N,{"aria-hidden":`true`,className:`size-3`}),(0,Q.jsx)(o,{id:`xWEvuo`})]})]}):null]},Ue(e))})})]})}):(0,Q.jsx)($e,{audit:x,onRefresh:()=>void F(),onNavigate:le,fixableCount:R.reduce(Je,0),fixing:C,onFixAll:()=>void B(),onCreateTarget:T===null?void 0:e=>void P(e),creatingTarget:E})]})}function Je(e,t){return e+We(t.diagnostics)}function Ye(e){return e.label}function Xe(e){return e===null?e:{...e,done:e.done+1}}function Ze(e){return e.diagnostics.some(Qe)}function Qe(e){return(e.fixes?.length??0)>0}function $e(e){let t=(0,J.c)(45),{audit:n,onRefresh:r,onNavigate:i,fixableCount:a,fixing:c,onFixAll:l,onCreateTarget:u,creatingTarget:d}=e,{_:p}=s(),m=n.status===`loading`||n.status===`idle`,h;t[0]!==n.result||t[1]!==n.status?(h=n.status===`loaded`&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(o,{id:`DsDwR-`,values:{0:n.result.errorCount}}),` · `,(0,Q.jsx)(o,{id:`W1SI2K`,values:{0:n.result.warningCount}})]}),t[0]=n.result,t[1]=n.status,t[2]=h):h=t[2];let g;t[3]===h?g=t[4]:(g=(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,"data-testid":`problems-audit-summary`,children:h}),t[3]=h,t[4]=g);let _;t[5]!==p||t[6]!==c?(_=c===null?null:(0,Q.jsx)(`span`,{className:`sr-only`,role:`status`,children:p({id:`gZElfU`,values:{0:c.done,1:c.total}})}),t[5]=p,t[6]=c,t[7]=_):_=t[7];let v=m||c!==null||a===0,y;t[8]===c?y=t[9]:(y=c===null?void 0:(0,Q.jsx)(o,{id:`S9t1PI`,values:{0:c.done,1:c.total}}),t[8]=c,t[9]=y);let b;t[10]!==a||t[11]!==l||t[12]!==v||t[13]!==y?(b=(0,Q.jsx)(Ke,{count:a,disabled:v,onClick:l,children:y}),t[10]=a,t[11]=l,t[12]=v,t[13]=y,t[14]=b):b=t[14];let x;t[15]===p?x=t[16]:(x=p({id:`WRdYfS`}),t[15]=p,t[16]=x);let S=m||c!==null,C;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Q.jsx)(P,{"aria-hidden":`true`,className:`size-3.5`}),t[17]=C):C=t[17];let w;t[18]!==r||t[19]!==x||t[20]!==S?(w=(0,Q.jsx)(f,{variant:`ghost`,size:`icon`,className:`size-6 shrink-0 text-muted-foreground`,"aria-label":x,"data-testid":`problems-audit-refresh`,disabled:S,onClick:r,children:C}),t[18]=r,t[19]=x,t[20]=S,t[21]=w):w=t[21];let T;t[22]!==w||t[23]!==_||t[24]!==b?(T=(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[_,b,w]}),t[22]=w,t[23]=_,t[24]=b,t[25]=T):T=t[25];let E;t[26]!==T||t[27]!==g?(E=(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-2 px-2 pb-1`,children:[g,T]}),t[26]=T,t[27]=g,t[28]=E):E=t[28];let D;t[29]!==p||t[30]!==m?(D=m&&(0,Q.jsx)(`div`,{className:`flex flex-col gap-1`,role:`status`,"aria-busy":`true`,"aria-label":p({id:`dx-TwN`}),children:[1,2,3].map(et)}),t[29]=p,t[30]=m,t[31]=D):D=t[31];let O;t[32]===n.status?O=t[33]:(O=n.status===`failed`&&(0,Q.jsx)(G,{className:`px-2 text-xs`,children:(0,Q.jsx)(o,{id:`IFezUv`})}),t[32]=n.status,t[33]=O);let k;t[34]!==n.result||t[35]!==n.status||t[36]!==d||t[37]!==u||t[38]!==i?(k=n.status===`loaded`&&(0,Q.jsx)(tt,{result:n.result,onNavigate:i,onCreateTarget:u,creatingTarget:d}),t[34]=n.result,t[35]=n.status,t[36]=d,t[37]=u,t[38]=i,t[39]=k):k=t[39];let A;return t[40]!==E||t[41]!==D||t[42]!==O||t[43]!==k?(A=(0,Q.jsxs)(te,{className:`px-2 py-2`,"data-testid":`problems-project-scope`,children:[E,D,O,k]}),t[40]=E,t[41]=D,t[42]=O,t[43]=k,t[44]=A):A=t[44],A}function et(e){return(0,Q.jsxs)(`div`,{className:`flex items-start gap-2.5 rounded px-2 py-1.5`,children:[(0,Q.jsx)(K,{className:`mt-0.5 size-3.5 shrink-0 rounded`}),(0,Q.jsxs)(`div`,{className:`flex-1 space-y-1.5`,children:[(0,Q.jsx)(K,{className:`h-3 w-28`}),(0,Q.jsx)(K,{className:`h-3 w-40`})]})]},e)}function tt(e){let t=(0,J.c)(12),{result:n,onNavigate:r,onCreateTarget:i,creatingTarget:a}=e,{_:c}=s(),l;t[0]!==c||t[1]!==n.warnings?(l=n.warnings.length>0&&(0,Q.jsx)(`ul`,{"aria-label":c({id:`Rsdhj9`}),className:`flex flex-col gap-0.5 pb-1`,children:n.warnings.map(nt)}),t[0]=c,t[1]=n.warnings,t[2]=l):l=t[2];let u;t[3]!==a||t[4]!==i||t[5]!==r||t[6]!==n.fileCount||t[7]!==n.files?(u=n.files.length===0?(0,Q.jsx)(ee,{className:`px-2`,children:(0,Q.jsx)(o,{id:`k_Dqw1`,values:{0:n.fileCount}})}):n.files.map(e=>(0,Q.jsx)(rt,{file:e,onNavigate:r,onCreateTarget:i,creatingTarget:a},e.file)),t[3]=a,t[4]=i,t[5]=r,t[6]=n.fileCount,t[7]=n.files,t[8]=u):u=t[8];let d;return t[9]!==l||t[10]!==u?(d=(0,Q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[l,u]}),t[9]=l,t[10]=u,t[11]=d):d=t[11],d}function nt(e,t){return(0,Q.jsxs)(`li`,{className:`flex items-start gap-1.5 px-2 text-xs`,children:[(0,Q.jsx)(F,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-amber-500`}),(0,Q.jsx)(`span`,{className:`min-w-0 text-foreground`,children:e})]},`${t}-${e}`)}function rt(e){let t=(0,J.c)(41),{file:n,onNavigate:r,onCreateTarget:i,creatingTarget:a}=e,{_:o}=s(),c,l,u,d,f,p,m,h,y;if(t[0]!==o||t[1]!==a||t[2]!==n.diagnostics||t[3]!==n.file||t[4]!==i||t[5]!==r){let e=[...n.diagnostics].sort(Be);l=v,m=!0,h=`problems-audit-group`;let s;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Q.jsx)(k,{"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[15]=s):s=t[15];let b;t[16]===n.file?b=t[17]:(b=(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs text-foreground`,title:n.file,children:n.file}),t[16]=n.file,t[17]=b),y=(0,Q.jsxs)(_,{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:[s,b,(0,Q.jsx)(W,{variant:`gray`,"data-testid":`problems-audit-file-count`,className:`shrink-0`,children:e.length})]}),c=g,p=`overflow-hidden data-[state=open]:animate-[collapsible-down_150ms_ease-out] data-[state=closed]:animate-[collapsible-up_150ms_ease-in]`,t[18]!==o||t[19]!==n.file?(u=o({id:`zAJzIg`,values:{0:n.file}}),t[18]=o,t[19]=n.file,t[20]=u):u=t[20],d=`flex flex-col gap-0.5 pb-1 ps-3`;let x;t[21]!==o||t[22]!==a||t[23]!==n.file||t[24]!==i||t[25]!==r?(x=e=>{let t=e.range.start.line+1,s=e.linkTarget!==void 0&&i!==void 0;return(0,Q.jsxs)(`li`,{className:`group relative rounded transition-colors hover:bg-muted`,children:[(0,Q.jsx)(`button`,{type:`button`,onClick:()=>r(n.file,e),className:`flex w-full cursor-pointer flex-col gap-0.5 rounded px-2 py-1.5 text-left`,title:o({id:`kDwcbW`,values:{0:n.file,displayLine:t}}),children:(0,Q.jsx)(He,{diagnostic:e})}),s?(0,Q.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:(0,Q.jsx)(Ge,{target:e.linkTarget??``,creating:a===e.linkTarget,disabled:a!==null,onCreate:()=>i?.(e)})}):null]},Ue(e))},t[21]=o,t[22]=a,t[23]=n.file,t[24]=i,t[25]=r,t[26]=x):x=t[26],f=e.map(x),t[0]=o,t[1]=a,t[2]=n.diagnostics,t[3]=n.file,t[4]=i,t[5]=r,t[6]=c,t[7]=l,t[8]=u,t[9]=d,t[10]=f,t[11]=p,t[12]=m,t[13]=h,t[14]=y}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],y=t[14];let b;t[27]!==u||t[28]!==d||t[29]!==f?(b=(0,Q.jsx)(`ul`,{"aria-label":u,className:d,children:f}),t[27]=u,t[28]=d,t[29]=f,t[30]=b):b=t[30];let x;t[31]!==c||t[32]!==p||t[33]!==b?(x=(0,Q.jsx)(c,{className:p,children:b}),t[31]=c,t[32]=p,t[33]=b,t[34]=x):x=t[34];let S;return t[35]!==l||t[36]!==m||t[37]!==h||t[38]!==y||t[39]!==x?(S=(0,Q.jsxs)(l,{defaultOpen:m,"data-testid":h,children:[y,x]}),t[35]=l,t[36]=m,t[37]=h,t[38]=y,t[39]=x,t[40]=S):S=t[40],S}var it={words:0,chars:0,tokens:0},at=/[ -〿-ゟ゠-ヿ㐀-䶿一-鿿豈---ក-]/,ot=/[\p{L}\p{N}]/u,st=new Set([`text`,`inlineCode`,`code`,`tag`]),ct=new Set([`html`,`definition`,`footnoteDefinition`,`yaml`,`toml`,`image`,`imageReference`,`mdxFlowExpression`,`mdxTextExpression`,`mdxjsEsm`,`rawMdxFallback`,`rawMdxFallbackMdast`]),lt=new Set([`paragraph`,`heading`,`blockquote`,`list`,`listItem`,`thematicBreak`,`table`,`tableRow`,`tableCell`,`mdxJsxFlowElement`,`commentBlock`]);function ut(e,t){if(!e)return;let n=e.type;if(!ct.has(n)){if(st.has(n)){e.value&&(t.push(e.value),n===`code`&&t.push(`
|
|
2
|
-
`));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)ut(n,t);if(lt.has(n)&&t.length>0){let e=t[t.length-1];e&&!e.endsWith(`
|
|
3
|
-
`)&&t.push(`
|
|
4
|
-
`)}}}}function dt(e){try{let t=x().parseToMdast(e),n=[];return ut(t,n),n.join(``).trim()}catch(t){return console.warn(`[document-stats] mdast parse failed, falling back to raw text`,t),e.trim()}}function ft(e){if(!e)return 0;let t=0;for(let n of e.split(/\s+/))ot.test(n)&&t++;return t}function pt(e){let t=globalThis.Intl.Segmenter;if(!t)return ft(e);let n=new t(void 0,{granularity:`word`}),r=0;for(let t of n.segment(e))t.isWordLike&&r++;return r}function mt(e){let t=at.test(e)?1.5:4;return Math.ceil(e.length/t)}function ht(e){return e?{words:at.test(e)?pt(e):ft(e),chars:e.length,tokens:mt(e)}:{words:0,chars:0,tokens:0}}function gt(e){if(!e)return{words:0,chars:0,tokens:0};let{body:t}=T(e);return t.trim()?ht(dt(t)):{words:0,chars:0,tokens:0}}function _t(e,{isMarkdown:t}){let n=e.trim();return n?ht(t?dt(e):n):it}var vt=new Map,yt=new Set,bt=(e,t)=>`${t}:${e}`;function xt(){for(let e of yt)e()}function St(e,t,n){let r=bt(e,t);if(n===null){vt.delete(r)&&xt();return}let i=vt.get(r);i&&i.words===n.words&&i.chars===n.chars&&i.tokens===n.tokens||(vt.set(r,n),xt())}function Ct(e,t){return e===null?null:vt.get(bt(e,t))??null}function wt(e){return yt.add(e),()=>{yt.delete(e)}}function Tt(e){let{from:t,to:n,empty:r}=e.state.selection;if(r)return null;let i=e.state.doc.textBetween(t,n,`
|
|
5
|
-
`,` `);return i.trim()?_t(i,{isMarkdown:!1}):null}function Et(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(`
|
|
6
|
-
`);return n.trim()?_t(n,{isMarkdown:!0}):null}export{be as _,wt as a,Z as b,ze as c,Le as d,Re as f,ye as g,Te as h,Tt as i,qe as l,we as m,St as n,it as o,Pe as p,Et as r,gt as s,Ct as t,Fe as u,fe as v,ue as x,de as y};
|
|
@@ -1 +0,0 @@
|
|
|
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{Ki as r}from"./dist-Cgpf3BIr.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:`OFBmkg`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ K`,windowsLinux:`Ctrl K`,match:{key:`k`,mod:!0}}]},{id:`settings`,category:`general`,title:{id:`Tz0i8g`},description:{id:`6m_7We`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ ,`,windowsLinux:`Ctrl ,`,match:{key:`,`,anyMod:!0}}]},{id:`new-item`,category:`general`,title:{id:`HdkSiO`},description:{id:`KkEAud`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ N`,windowsLinux:`Ctrl N`,match:{key:`n`,mod:!0}},{mac:`⌥⌘ N`,windowsLinux:`Ctrl Alt N`,match:{key:`n`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`new-folder`,category:`general`,title:{id:`96G6Re`},description:{id:`3cOo2C`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ N`,windowsLinux:`Ctrl Shift N`}]},{id:`toggle-files-sidebar`,category:`general`,title:{id:`rtdR4v`},description:{id:`EbZT7P`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ S`,windowsLinux:`Ctrl Alt S`,match:{code:`KeyS`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-document-panel`,category:`general`,title:{id:`lkYioO`},description:{id:`It9ARY`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ B`,windowsLinux:`Ctrl Alt B`,match:{code:`KeyB`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-terminal-panel`,category:`general`,title:{id:`dPOFid`},description:{id:`l9HUtd`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ J`,windowsLinux:`Ctrl J`,match:{key:`j`,mod:!0}}]},{id:`open-ask-ai`,category:`general`,title:{id:`xWEvuo`},description:{id:`5OTgC7`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ L`,windowsLinux:`Ctrl L`,match:{key:`l`,mod:!0}}]},{id:`new-terminal-tab`,category:`general`,title:{id:`YkvmF4`},description:{id:`j2kt1j`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ J`,windowsLinux:`Ctrl Shift J`,match:{key:`j`,mod:!0,shiftKey:!0}}]},{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:`edit-with-ai`,category:`general`,title:{id:`G4-bgo`},description:{id:`a3H_MR`},scope:{id:`C62P6b`},bindings:[{mac:`⇧⌘ I`,windowsLinux:`Ctrl Shift I`,match:{key:`i`,mod:!0,shiftKey:!0}}]},{id:`history-undo-redo`,category:`wysiwyg`,title:{id:`i9OyGp`},description:{id:`lbkOif`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z / ⌘ Y`,windowsLinux:`Ctrl Shift Z / Ctrl Y`}]},{id:`heading-paragraph`,category:`wysiwyg`,title:{id:`bkQRMh`},description:{id:`rgPqOw`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 0`,windowsLinux:`Ctrl Alt 0`}]},{id:`heading-levels`,category:`wysiwyg`,title:{id:`q_z77Z`},description:{id:`8Jm2EP`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 1-6`,windowsLinux:`Ctrl Alt 1-6`}]},{id:`list-bullet`,category:`wysiwyg`,title:{id:`ijLc3m`},description:{id:`By-7Pn`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 8`,windowsLinux:`Ctrl Shift 8`}]},{id:`list-ordered`,category:`wysiwyg`,title:{id:`iSQTsg`},description:{id:`ou1hFW`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 7`,windowsLinux:`Ctrl Shift 7`}]},{id:`list-task`,category:`wysiwyg`,title:{id:`E1_c72`},description:{id:`-slrNR`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 9`,windowsLinux:`Ctrl Shift 9`}]},{id:`code-block`,category:`wysiwyg`,title:{id:`4A3Yzu`},description:{id:`pTPqMK`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ C`,windowsLinux:`Ctrl Alt C`}]},{id:`hard-break`,category:`wysiwyg`,title:{id:`-3ois8`},description:{id:`vDXqVv`},scope:{id:`ur2XSb`},bindings:[{mac:`Shift Enter`,windowsLinux:`Shift Enter`},{mac:`⌘ Enter`,windowsLinux:`Ctrl Enter`}]},{id:`move-block`,category:`wysiwyg`,title:{id:`f1XQyZ`},description:{id:`zQBg2C`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ ↑`,windowsLinux:`Ctrl Shift ↑`},{mac:`⇧⌘ ↓`,windowsLinux:`Ctrl Shift ↓`}]},{id:`list-indent`,category:`wysiwyg`,title:{id:`G0YZ-I`},description:{id:`5GKMSz`},scope:{id:`ynIa4S`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`list-split-item`,category:`wysiwyg`,title:{id:`neRy3o`},description:{id:`NpC29w`},scope:{id:`ynIa4S`},bindings:[{mac:`Enter`,windowsLinux:`Enter`}]},{id:`table-cell-navigation`,category:`wysiwyg`,title:{id:`K8-WWn`},description:{id:`4NC2Ym`},scope:{id:`l1aQKz`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`table-delete-selection`,category:`wysiwyg`,title:{id:`881Uwh`},description:{id:`YEP3X2`},scope:{id:`99eR72`},bindings:[{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌘ Backspace / ⌘ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`}]},{id:`delete-atom`,category:`wysiwyg`,title:{id:`636K3K`},description:{id:`oXKEsy`},scope:{id:`ur2XSb`},bindings:[{mac:`Backspace`,windowsLinux:`Backspace`},{mac:`Delete`,windowsLinux:`Delete`}]},{id:`slash-menu`,category:`navigation`,title:{id:`shNd9t`},description:{id:`8PmoQF`},scope:{id:`ur2XSb`},bindings:[{mac:`/`,windowsLinux:`/`}]},{id:`suggestion-navigation`,category:`navigation`,title:{id:`riqekz`},description:{id:`OiHJdA`},scope:{id:`y5FUYi`},bindings:[{mac:`↑ / ↓`,windowsLinux:`↑ / ↓`},{mac:`Enter / Tab`,windowsLinux:`Enter / Tab`},{mac:`Esc`,windowsLinux:`Esc`}]},{id:`component-navigation`,category:`navigation`,title:{id:`rwrPbS`},description:{id:`0s8-e8`},scope:{id:`ur2XSb`},bindings:[{mac:`↑ / ↓ / ← / →`,windowsLinux:`↑ / ↓ / ← / →`},{mac:`Enter / Esc`,windowsLinux:`Enter / Esc`}]},{id:`source-indent`,category:`source`,title:{id:`fwhX-N`},description:{id:`skf5Ix`},scope:{id:`tiWX6q`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`source-navigation`,category:`source`,title:{id:`qSKu2v`},description:{id:`gITz7o`},scope:{id:`tiWX6q`},bindings:[{mac:`Arrow keys / Option Arrow / Command Arrow`,windowsLinux:`Arrow keys / Ctrl Arrow / Home / End`},{mac:`Page Up / Page Down`,windowsLinux:`Page Up / Page Down`},{mac:`Shift with movement keys`,windowsLinux:`Shift with movement keys`}]},{id:`source-editing`,category:`source`,title:{id:`pFagOn`},description:{id:`MGb89P`},scope:{id:`tiWX6q`},bindings:[{mac:`Enter / Shift Enter / ⌘ Enter`,windowsLinux:`Enter / Shift Enter / Ctrl Enter`},{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌥ Backspace / ⌥ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`},{mac:`⌥ ↑ / ⌥ ↓`,windowsLinux:`Alt ↑ / Alt ↓`},{mac:`⇧⌥ ↑ / ⇧⌥ ↓`,windowsLinux:`Shift Alt ↑ / Shift Alt ↓`},{mac:`⇧⌘ K`,windowsLinux:`Ctrl Shift K`}]},{id:`source-history`,category:`source`,title:{id:`4Sxexw`},description:{id:`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,n=f()){return d(t).bindings.some(t=>{let r=x(t.match,n);return r?C(e,r,n):!1})}function x(e,t){return e?S(e)?e:e[t]??null:null}function S(e){return`key`in e||`code`in e}function C(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 w=`#settings`;function T(e){return`#settings/${e}`}var E=`configure-agents`;function D(){if(typeof window>`u`)return;let e=T(E);window.location.hash!==e&&(window.location.hash=e)}var O=`plugins-manage`;function k(){if(typeof window>`u`)return;let e=T(O);window.location.hash!==e&&(window.location.hash=e)}function A(e){return y(e.target)?!1:b(e,`settings`)}function j(e){let t=e.replace(/^#/,``);return t===`settings`?!0:t.startsWith(`settings/`)&&t.length>9}function M(e){let t=e.replace(/^#/,``);if(!t.startsWith(`settings/`))return null;let n=t.slice(9);return n.length>0?n:null}function N(){return typeof window>`u`?``:window.location.hash}function P(){let e=(0,a.c)(5),[t,n]=(0,i.useState)(L),[r,o]=(0,i.useState)(I),s,c;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=()=>{(0,i.startTransition)(()=>{let e=N();n(j(e)),o(M(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=F,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 F(){typeof window>`u`||j(N())&&window.history.back()}function I(){return M(N())}function L(){return j(N())}export{k as a,o as c,h as d,g as f,b as g,y as h,D as i,s as l,m,j as n,P as o,v as p,A as r,l as s,w as t,_ as u};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{o as e,t}from"./chunk-CYidjpOJ.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{m as r,r as i}from"./DocumentContext-WcIs30H8.js";import{t as a}from"./react-f2sANaYj.js";import{t as o}from"./react-dom-DPxgxlDT.js";import{t as s}from"./compiler-runtime-BfE3aGVn.js";import{et as c,k as l,q as u}from"./CodeMirrorPropInput-BqDZpzvH.js";import{$i as d,Oi as f,Vi as p,Y as m,aa as h,ai as g,da as _,ea as v,ha as y,ia as b,la as x,ma as S,pa as C}from"./dist-Cgpf3BIr.js";import{t as ee}from"./libesm-Db-3Gx3Z.js";var w=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pointer=void 0,e.unescapeToken=t,e.escapeToken=n;function t(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function n(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.Pointer=function(){function e(e){e===void 0&&(e=[``]),this.tokens=e}return e.fromJSON=function(n){var r=n.split(`/`).map(t);if(r[0]!==``)throw Error(`Invalid JSON Pointer: ${n}`);return new e(r)},e.prototype.toString=function(){return this.tokens.map(n).join(`/`)},e.prototype.evaluate=function(e){for(var t=null,n=``,r=e,i=1,a=this.tokens.length;i<a;i++)t=r,n=this.tokens[i],!(n==`__proto__`||n==`constructor`||n==`prototype`)&&(r=(t||{})[n]);return{parent:t,key:n,value:r}},e.prototype.get=function(e){return this.evaluate(e).value},e.prototype.set=function(e,t){var n=this.evaluate(e);n.parent&&(n.parent[n.key]=t)},e.prototype.push=function(e){this.tokens.push(e)},e.prototype.add=function(t){return new e(this.tokens.concat(String(t)))},e.prototype.parent=function(){return new e(this.tokens.length>1?this.tokens.slice(0,-1):[``])},e}()})),T=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.hasOwnProperty=void 0,e.objectType=t,e.clone=r,e.hasOwnProperty=Object.prototype.hasOwnProperty;function t(e){return e===void 0?`undefined`:e===null?`null`:Array.isArray(e)?`array`:typeof e}function n(e){return typeof e==`object`&&!!e}function r(t){if(!n(t))return t;if(t.constructor==Array){for(var i=t.length,a=Array(i),o=0;o<i;o++)a[o]=r(t[o]);return a}if(t.constructor==Date)return new Date(+t);var s={};for(var c in t)e.hasOwnProperty.call(t,c)&&(s[c]=r(t[c]));return s}})),E=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isDestructive=n,e.subtract=r,e.intersection=i,e.diffArrays=l,e.diffObjects=u,e.diffAny=d;var t=T();function n(e){var t=e.op;return t===`remove`||t===`replace`||t===`copy`||t===`move`}function r(e,n){var r=[];for(var i in e)t.hasOwnProperty.call(e,i)&&e[i]!==void 0&&!(t.hasOwnProperty.call(n,i)&&n[i]!==void 0)&&r.push(i);return r}function i(e){for(var n=e.length,r={},i=0;i<n;i++){var a=e[i];for(var o in a)t.hasOwnProperty.call(a,o)&&a[o]!==void 0&&(r[o]=(r[o]||0)+1)}for(var o in r)r[o]<n&&delete r[o];return Object.keys(r)}function a(e,n){var r=[];for(var i in e)t.hasOwnProperty.call(e,i)&&e[i]!==void 0&&t.hasOwnProperty.call(n,i)&&n[i]!==void 0&&r.push(i);return r}function o(e){return e.op===`add`}function s(e){return e.op===`remove`}function c(e,t){return{operations:e.operations.concat(t),cost:e.cost+1}}function l(e,t,n,r){r===void 0&&(r=d);var i=Math.max(e.length,t.length),a=new Map([[0,{operations:[],cost:0}]]);function l(o,s){var u=o*i+s,d=a.get(u);if(d===void 0){if(o>0&&s>0&&!r(e[o-1],t[s-1],n.add(String(o-1))).length)d=l(o-1,s-1);else{var f=[];if(o>0){var p=l(o-1,s),m={op:`remove`,index:o-1};f.push(c(p,m))}if(s>0){var h=l(o,s-1),g={op:`add`,index:o-1,value:t[s-1]};f.push(c(h,g))}if(o>0&&s>0){var _=l(o-1,s-1),v={op:`replace`,index:o-1,original:e[o-1],value:t[s-1]};f.push(c(_,v))}d=f.sort(function(e,t){return e.cost-t.cost})[0]}a.set(u,d)}return d}var u=isNaN(e.length)||e.length<=0?0:e.length;return l(u,isNaN(t.length)||t.length<=0?0:t.length).operations.reduce(function(e,t){var i=e[0],a=e[1];if(o(t)){var c=t.index+1+a,l=c<u+a?String(c):`-`,d={op:t.op,path:n.add(l).toString(),value:t.value};return[i.concat(d),a+1]}else if(s(t)){var d={op:t.op,path:n.add(String(t.index+a)).toString()};return[i.concat(d),a-1]}else{var f=n.add(String(t.index+a)),p=r(t.original,t.value,f);return[i.concat.apply(i,p),a]}},[[],0])[0]}function u(e,t,n,i){i===void 0&&(i=d);var o=[];return r(e,t).forEach(function(e){o.push({op:`remove`,path:n.add(e).toString()})}),r(t,e).forEach(function(e){o.push({op:`add`,path:n.add(e).toString(),value:t[e]})}),a(e,t).forEach(function(r){o.push.apply(o,i(e[r],t[r],n.add(r)))}),o}function d(e,n,r,i){if(i===void 0&&(i=d),e===n)return[];var a=(0,t.objectType)(e),o=(0,t.objectType)(n);return a==`array`&&o==`array`?l(e,n,r,i):a==`object`&&o==`object`?u(e,n,r,i):[{op:`replace`,path:r.toString(),value:n}]}})),te=t((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.InvalidOperationError=e.TestError=e.MissingError=void 0,e.add=l,e.remove=u,e.replace=d,e.move=f,e.copy=p,e.test=m,e.apply=g;var n=w(),r=T(),i=E(),a=function(e){t(n,e);function n(t){var n=e.call(this,`Value required at path: ${t}`)||this;return n.path=t,n.name=`MissingError`,n}return n}(Error);e.MissingError=a;var o=function(e){t(n,e);function n(t,n){var r=e.call(this,`Test failed: ${t} != ${n}`)||this;return r.actual=t,r.expected=n,r.name=`TestError`,r}return n}(Error);e.TestError=o;function s(e,t,n){if(Array.isArray(e))if(t==`-`)e.push(n);else{var r=parseInt(t,10);e.splice(r,0,n)}else e[t]=n}function c(e,t){if(Array.isArray(e)){var n=parseInt(t,10);e.splice(n,1)}else delete e[t]}function l(e,t,i){var o=n.Pointer.fromJSON(t.path);if(i?.implicitArrayCreation&&o.tokens[o.tokens.length-1]===`-`){var c=o.parent().evaluate(e);c.value===void 0&&(0,r.objectType)(c.parent)===`object`&&(c.parent[c.key]=[])}var l=o.evaluate(e);return l.parent===void 0||i?.implicitArrayCreation&&l.key===`-`&&!Array.isArray(l.parent)?new a(t.path):(s(l.parent,l.key,(0,r.clone)(t.value)),null)}function u(e,t,r){var i=n.Pointer.fromJSON(t.path).evaluate(e);return i.value===void 0?new a(t.path):(c(i.parent,i.key),null)}function d(e,t,i){var o=n.Pointer.fromJSON(t.path).evaluate(e);if(o.parent===null)return new a(t.path);if(Array.isArray(o.parent)){if(parseInt(o.key,10)>=o.parent.length)return new a(t.path)}else if(o.value===void 0)return new a(t.path);return o.parent[o.key]=(0,r.clone)(t.value),null}function f(e,t,r){var i=n.Pointer.fromJSON(t.from).evaluate(e);if(i.value===void 0)return new a(t.from);var o=n.Pointer.fromJSON(t.path).evaluate(e);return o.parent===void 0?new a(t.path):(c(i.parent,i.key),s(o.parent,o.key,i.value),null)}function p(e,t,i){var o=n.Pointer.fromJSON(t.from).evaluate(e);if(o.value===void 0)return new a(t.from);var c=n.Pointer.fromJSON(t.path).evaluate(e);return c.parent===void 0?new a(t.path):(s(c.parent,c.key,(0,r.clone)(o.value)),null)}function m(e,t,r){var a=n.Pointer.fromJSON(t.path).evaluate(e);return(0,i.diffAny)(a.value,t.value,new n.Pointer).length?new o(a.value,t.value):null}var h=function(e){t(n,e);function n(t){var n=e.call(this,`Invalid operation: ${t.op}`)||this;return n.operation=t,n.name=`InvalidOperationError`,n}return n}(Error);e.InvalidOperationError=h;function g(e,t,n){switch(t.op){case`add`:return l(e,t,n);case`remove`:return u(e,t,n);case`replace`:return d(e,t,n);case`move`:return f(e,t,n);case`copy`:return p(e,t,n);case`test`:return m(e,t,n)}return new h(t)}})),ne=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pointer=void 0,e.applyPatch=i,e.createPatch=o;var t=w();Object.defineProperty(e,`Pointer`,{enumerable:!0,get:function(){return t.Pointer}});var n=te(),r=E();function i(e,t,r){return t.map(function(t){return(0,n.apply)(e,t,r)})}function a(e){function t(n,i,a){var o=e(n,i,a);return Array.isArray(o)?o:(0,r.diffAny)(n,i,a,t)}return t}function o(e,n,i){var o=new t.Pointer;return(i?a(i):r.diffAny)(e,n,o)}})),D=e(a(),1),re=e(o(),1),O=s(),k=ne();function A(){}A.prototype={diff:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.callback;typeof n==`function`&&(r=n,n={}),this.options=n;var i=this;function a(e){return r?(setTimeout(function(){r(void 0,e)},0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var o=t.length,s=e.length,c=1,l=o+s;n.maxEditLength&&(l=Math.min(l,n.maxEditLength));var u=n.timeout??1/0,d=Date.now()+u,f=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(f[0],t,e,0);if(f[0].oldPos+1>=s&&p+1>=o)return a([{value:this.join(t),count:t.length}]);var m=-1/0,h=1/0;function g(){for(var n=Math.max(m,-c);n<=Math.min(h,c);n+=2){var r=void 0,l=f[n-1],u=f[n+1];l&&(f[n-1]=void 0);var d=!1;if(u){var g=u.oldPos-n;d=u&&0<=g&&g<o}var _=l&&l.oldPos+1<s;if(!d&&!_){f[n]=void 0;continue}if(r=!_||d&&l.oldPos+1<u.oldPos?i.addToPath(u,!0,void 0,0):i.addToPath(l,void 0,!0,1),p=i.extractCommon(r,t,e,n),r.oldPos+1>=s&&p+1>=o)return a(ie(i,r.lastComponent,t,e,i.useLongestToken));f[n]=r,r.oldPos+1>=s&&(h=Math.min(h,n-1)),p+1>=o&&(m=Math.max(m,n+1))}c++}if(r)(function e(){setTimeout(function(){if(c>l||Date.now()>d)return r();g()||e()},0)})();else for(;c<=l&&Date.now()<=d;){var _=g();if(_)return _}},addToPath:function(e,t,n,r){var i=e.lastComponent;return i&&i.added===t&&i.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:i.count+1,added:t,removed:n,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:i}}},extractCommon:function(e,t,n,r){for(var i=t.length,a=n.length,o=e.oldPos,s=o-r,c=0;s+1<i&&o+1<a&&this.equals(t[s+1],n[o+1]);)s++,o++,c++;return c&&(e.lastComponent={count:c,previousComponent:e.lastComponent}),e.oldPos=o,s},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split(``)},join:function(e){return e.join(``)}};function ie(e,t,n,r,i){for(var a=[],o;t;)a.push(t),o=t.previousComponent,delete t.previousComponent,t=o;a.reverse();for(var s=0,c=a.length,l=0,u=0;s<c;s++){var d=a[s];if(!d.removed){if(!d.added&&i){var f=n.slice(l,l+d.count);f=f.map(function(e,t){var n=r[u+t];return n.length>e.length?n:e}),d.value=e.join(f)}else d.value=e.join(n.slice(l,l+d.count));l+=d.count,d.added||(u+=d.count)}else if(d.value=e.join(r.slice(u,u+d.count)),u+=d.count,s&&a[s-1].added){var p=a[s-1];a[s-1]=a[s],a[s]=p}}var m=a[c-1];return c>1&&typeof m.value==`string`&&(m.added||m.removed)&&e.equals(``,m.value)&&(a[c-2].value+=m.value,a.pop()),a}var j=new A;function ae(e,t,n){return j.diff(e,t,n)}var M=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,N=/\S/,P=new A;P.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!N.test(e)&&!N.test(t)},P.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&M.test(t[n])&&M.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};function oe(e,t,n){return P.diff(e,t,n)}var F=new A;F.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
2
|
-
`));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t};var I=new A;I.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var se=new A;se.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function L(e){"@babel/helpers - typeof";return L=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},L(e)}var ce=Object.prototype.toString,R=new A;R.useLongestToken=!0,R.tokenize=F.tokenize,R.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,i=r===void 0?function(e,t){return t===void 0?n:t}:r;return typeof e==`string`?e:JSON.stringify(z(e,null,null,i),i,` `)},R.equals=function(e,t){return A.prototype.equals.call(R,e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`))};function z(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i,e));var a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];var o;if(ce.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=z(e[a],t,n,r,i);return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),L(e)===`object`&&e!==null){t.push(e),o={},n.push(o);var s=[],c;for(c in e)e.hasOwnProperty(c)&&s.push(c);for(s.sort(),a=0;a<s.length;a+=1)c=s[a],o[c]=z(e[c],t,n,r,c);t.pop(),n.pop()}else o=e;return o}var B=new A;B.tokenize=function(e){return e.slice()},B.join=B.removeEmpty=function(e){return e};function V(e,t){let n=t.content.findDiffStart(e.content);if(n===null)return!1;let{a:r,b:i}=t.content.findDiffEnd(e.content),a=n-Math.min(r,i);return a>0&&(e.resolve(n-a).depth<t.resolve(r+a).depth?n-=a:(r+=a,i+=a)),new C(n,i,t.slice(n,r))}function le(e){if(!e.steps.length)return;let t=new S(e.docs[0]),n=e.steps.slice();for(;n.length;){let e=n.shift();for(;n.length&&e.merge(n[0]);){let r=n.shift();e=e instanceof C&&r instanceof C?V(t.doc,r.apply(e.apply(t.doc).doc).doc):e.merge(r)}t.step(e)}return t}function H(e){let t=new S(e);return t.removeMark(0,e.nodeSize-2),t.doc}function U(e,t){let n=t.split(`/`);for(n.shift();n.length;){if(typeof e!=`object`)throw Error();let t=n.shift();e=e[t]}return e}function W(e){return JSON.parse(JSON.stringify(e))}var ue=class{fromDoc;toDoc;complexSteps;wordDiffs;simplifyDiff;schema;tr;currentJSON;finalJSON;ops;constructor(e,t,n={}){let r={complexSteps:!0,wordDiffs:!1,simplifyDiff:!0,...n};this.fromDoc=e,this.toDoc=t,this.complexSteps=r.complexSteps,this.wordDiffs=r.wordDiffs,this.simplifyDiff=r.simplifyDiff,this.schema=e.type.schema,this.tr=new S(e),this.currentJSON={},this.finalJSON={},this.ops=[]}init(){return this.complexSteps?(this.currentJSON=H(this.fromDoc).toJSON(),this.finalJSON=H(this.toDoc).toJSON(),this.ops=(0,k.createPatch)(this.currentJSON,this.finalJSON),this.recreateChangeContentSteps(),this.recreateChangeMarkSteps()):(this.currentJSON=this.fromDoc.toJSON(),this.finalJSON=this.toDoc.toJSON(),this.ops=(0,k.createPatch)(this.currentJSON,this.finalJSON),this.recreateChangeContentSteps()),this.simplifyDiff&&(this.tr=le(this.tr)||this.tr),this.tr}recreateChangeContentSteps(){let e=[];for(;this.ops.length;){let t=this.ops.shift();e.push(t);let n,r=W(this.currentJSON),i=t.path.split(`/`);for(;n==null;){(0,k.applyPatch)(r,[t]);try{n=this.schema.nodeFromJSON(r),n.check()}catch{if(n=null,this.ops.length>0)t=this.ops.shift(),e.push(t);else throw Error(`No valid diff possible applying ${t.path}`)}}this.complexSteps&&e.length===1&&(i.includes(`attrs`)||i.includes(`type`))?(this.addSetNodeMarkup(),e=[]):e.length===1&&t.op===`replace`&&i[i.length-1]===`text`?(this.addReplaceTextSteps(t,r),e=[]):this.addReplaceStep(n,r)&&(e=[])}}addSetNodeMarkup(){let e=this.schema.nodeFromJSON(this.currentJSON),t=this.schema.nodeFromJSON(this.finalJSON),n=t.content.findDiffStart(e.content),r=e.nodeAt(n),i=t.nodeAt(n);if(n!=null){let e=r.type===i.type?null:i.type;try{this.tr.setNodeMarkup(n,e,i.attrs,i.marks)}catch(t){if(e&&t.message.includes(`Invalid content`))this.tr.replaceWith(n,n+r.nodeSize,i);else throw t}return this.currentJSON=H(this.tr.doc).toJSON(),this.ops=(0,k.createPatch)(this.currentJSON,this.finalJSON),!0}return!1}recreateChangeMarkSteps(){this.toDoc.descendants((e,t)=>{if(!e.isInline)return!0;this.tr.doc.nodesBetween(t,t+e.nodeSize,(n,r)=>{if(!n.isInline)return!0;let i=Math.max(t,r),a=Math.min(t+e.nodeSize,r+n.nodeSize);n.marks.forEach(t=>{t.isInSet(e.marks)||this.tr.removeMark(i,a,t)}),e.marks.forEach(e=>{e.isInSet(n.marks)||this.tr.addMark(i,a,e)})})})}addReplaceStep(e,t){let n=V(this.schema.nodeFromJSON(this.currentJSON),e);if(!n)return!1;if(!this.tr.maybeStep(n).failed)return this.currentJSON=t,!0;throw Error(`No valid step found.`)}addReplaceTextSteps(e,t){let n={...e,value:`xx`},r={...e,value:`yy`},i=W(this.currentJSON),a=W(this.currentJSON);(0,k.applyPatch)(i,[n]),(0,k.applyPatch)(a,[r]);let o=this.schema.nodeFromJSON(i),s=this.schema.nodeFromJSON(a),c=e.value,l=U(this.currentJSON,e.path),u=this.wordDiffs?oe(l,c):ae(l,c),d=o.content.findDiffStart(s.content),f=o.resolve(d+1).marks();for(;u.length;){let e=u.shift();if(e.added){let t=this.schema.nodeFromJSON({type:`text`,text:e.value}).mark(f);if(u.length&&u[0].removed){let e=u.shift();this.tr.replaceWith(d,d+e.value.length,t)}else this.tr.insert(d,t);d+=e.value.length}else if(e.removed)if(u.length&&u[0].added){let t=u.shift(),n=this.schema.nodeFromJSON({type:`text`,text:t.value}).mark(f);this.tr.replaceWith(d,d+e.value.length,n),d+=t.value.length}else this.tr.delete(d,d+e.value.length);else d+=e.value.length}this.currentJSON=t}};function de(e,t,n={}){return new ue(e,t,n).init()}var G=new Set([`list`,`bulletList`,`orderedList`,`taskList`]);function K(e){let t=[];return e.forEach((e,n)=>{if(G.has(e.type.name)){let r=n+1,i=0;e.forEach(e=>{let n=r+i;t.push({from:n,to:n+e.nodeSize,key:`${e.type.name}:${e.textContent}`}),i+=e.nodeSize})}else t.push({from:n,to:n+e.nodeSize,key:`${e.type.name}:${e.textContent}`})}),t}function fe(e,t){let n=e.length,r=t.length,i=Array.from({length:n+1},()=>Array(r+1).fill(0));for(let a=n-1;a>=0;a--)for(let n=r-1;n>=0;n--)i[a][n]=e[a].key===t[n].key?i[a+1][n+1]+1:Math.max(i[a+1][n],i[a][n+1]);let a=[],o=0,s=0;for(;o<n&&s<r;)e[o].key===t[s].key?(a.push({type:`same`,b:t[s]}),o++,s++):i[o+1][s]>=i[o][s+1]?(a.push({type:`del`,a:e[o]}),o++):(a.push({type:`ins`,b:t[s]}),s++);for(;o<n;)a.push({type:`del`,a:e[o++]});for(;s<r;)a.push({type:`ins`,b:t[s++]});return a}function pe(e,t){let n=fe(K(e),K(t)),r=[],i=0;for(let e of n)e.type===`same`?i=e.b.to:e.type===`ins`?(r.push({fromA:0,toA:0,fromB:e.b.from,toB:e.b.to}),i=e.b.to):r.push({fromA:e.a.from,toA:e.a.to,fromB:i,toB:i});return r}var me=400;function q(e,t,n){return t.nodeFromJSON(e.parseWithFallback(n))}function he(e,t){let n=t.filter(e=>e.toB>e.fromB),r=[];return e.steps.forEach((t,i)=>{let a=t instanceof x?`add`:t instanceof _?`remove`:null;if(a===null)return;let o=t,s=e.mapping.slice(i+1),c=s.map(o.from,-1),l=s.map(o.to,1);if(l<=c||n.some(e=>e.fromB<=c&&l<=e.toB))return;let u=e.mapping.slice(0,i).invert(),d=u.map(o.from),f=u.map(o.to);f<=d||r.push({fromA:d,toA:f,fromB:c,toB:l,markName:o.mark.type.name,kind:a})}),r}function ge(e,t,n,r){if(e.length>2e5||t.length>2e5)return{ok:!1,reason:`ceiling`};let i,a;try{i=q(r,n,e),a=q(r,n,t)}catch{return{ok:!1,reason:`parse`}}let o=a,s=null;try{s=de(i,a,{complexSteps:!0,wordDiffs:!0,simplifyDiff:!0}),o=s.doc}catch{}let c=pe(i,o),l=s?he(s,c):[];return c.length+l.length>me?{ok:!1,reason:`ceiling`}:{ok:!0,afterDoc:o,beforeDoc:i,changes:c,markChanges:l}}var _e=`.ok-diff-ins, .ok-diff-ins-block, [data-diff-deleted]`;function ve(e){return e.changes.length+2*e.markChanges.length}function J(e){let t=!1;return e.forEach(e=>{e.isBlock&&(t=!0)}),t}function ye(e){if(e.childCount===0)return!1;let t=!0;return e.forEach(e=>{e.type.name!==`listItem`&&e.type.name!==`taskItem`&&(t=!1)}),t}function Y(e,t,n){let r=document.createElement(n?`div`:`span`);r.className=n?`ok-diff-del ok-diff-del-block`:`ok-diff-del`,r.setAttribute(`data-diff-deleted`,``);let i=e.serializeFragment(t);if(n&&ye(t)){let e=document.createElement(`ul`);e.appendChild(i),r.appendChild(e)}else r.appendChild(i);return r}function be(e,t,n,r,i){let a=y.fromSchema(i),o=[];for(let e of r){let n=t.slice(e.fromA,e.toA),r=J(n.content);o.push(d.widget(e.fromB,()=>Y(a,n.content,r),{side:-1,ignoreSelection:!0,marks:[]})),o.push(d.inline(e.fromB,e.toB,{class:`ok-diff-ins`},{inclusiveEnd:!0}))}for(let e of n)if(e.toB>e.fromB&&o.push(d.node(e.fromB,e.toB,{class:`ok-diff-ins-block`})),e.toA>e.fromA){let n=t.slice(e.fromA,e.toA),r=J(n.content);o.push(d.widget(e.fromB,()=>Y(a,n.content,r),{side:-1,ignoreSelection:!0,marks:[]}))}return v.create(e,o)}var xe=new Set([`slashCommand`,`blockDragHandle`,`blockMover`,`tableInsertControls`,`fileHandler`,`gfmAutolink`,`inlineLinkInputRule`,`keyboardNav`,`tiptapFindReplace`,`selectionState`,`sourceDirtyObserver`,`tabFocusTrap`]),X=r.filter(e=>!xe.has(e.name)).map(e=>e.name===`jsxComponent`?m:e),Z=n(),Q=p(X);function Se(e,t){return ge(e,t,Q,l())}var Ce=f.create({name:`renderedDiffDecorations`,addOptions(){return{decorations:v.empty}},addProseMirrorPlugins(){let e=this.options.decorations;return[new b({key:new h(`renderedDiffDecorations`),props:{decorations:()=>e}})]}});function we(e){let t=(0,O.c)(31),{diff:n}=e,r,i,a,o;if(t[0]!==n.afterDoc||t[1]!==n.beforeDoc||t[2]!==n.changes||t[3]!==n.markChanges){let e=be(n.afterDoc,n.beforeDoc,n.changes,n.markChanges,Q);o=c,a=!1,r=X,i=Ce.configure({decorations:e}),t[0]=n.afterDoc,t[1]=n.beforeDoc,t[2]=n.changes,t[3]=n.markChanges,t[4]=r,t[5]=i,t[6]=a,t[7]=o}else r=t[4],i=t[5],a=t[6],o=t[7];let s;t[8]!==r||t[9]!==i?(s=[...r,i],t[8]=r,t[9]=i,t[10]=s):s=t[10];let l;t[11]===n.afterDoc?l=t[12]:(l=n.afterDoc.toJSON(),t[11]=n.afterDoc,t[12]=l);let d;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(d={attributes:{class:`pt-4`}},t[13]=d):d=t[13];let f;t[14]!==a||t[15]!==s||t[16]!==l?(f={editable:a,extensions:s,content:l,editorProps:d},t[14]=a,t[15]=s,t[16]=l,t[17]=f):f=t[17];let p;t[18]===n?p=t[19]:(p=[n],t[18]=n,t[19]=p);let m=o(f,p),[h]=(0,D.useState)(Te),g=(0,D.useRef)(null),_,v;t[20]===h?(_=t[21],v=t[22]):(_=()=>{let e=g.current;if(e)return e.appendChild(h),()=>{h.parentNode===e&&e.removeChild(h)}},v=[h],t[20]=h,t[21]=_,t[22]=v),(0,D.useLayoutEffect)(_,v);let y;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Z.jsx)(`div`,{className:`tiptap-editor`,children:(0,Z.jsx)(`div`,{ref:g,style:{display:`contents`}})}),t[23]=y):y=t[23];let b;t[24]===m?b=t[25]:(b=(0,Z.jsx)(u,{editor:m,className:`tiptap-editor-portal-content`}),t[24]=m,t[25]=b);let x;t[26]!==h||t[27]!==b?(x=(0,re.createPortal)(b,h),t[26]=h,t[27]=b,t[28]=x):x=t[28];let S;return t[29]===x?S=t[30]:(S=(0,Z.jsxs)(`div`,{className:`editor-doc-scroll min-h-0 flex-1`,"data-testid":`rendered-diff-view`,children:[y,x]}),t[29]=x,t[30]=S),S}function Te(){let e=document.createElement(`div`);return e.style.display=`contents`,e}function Ee(e){let t=0,n=!1;for(let r of e.split(`
|
|
3
|
-
`)){let e=r.startsWith(`+`)&&!r.startsWith(`+++`)||r.startsWith(`-`)&&!r.startsWith(`---`);e&&!n&&(t+=1),n=e}return t}function De(e){let t=Array.from(e.querySelectorAll(`.diff-code-insert, .diff-code-delete`)),n=[],r=null;for(let e of t){let t=e.closest(`tr`);t&&((r===null||t.previousElementSibling!==r)&&n.push(e),r=t)}return n}function $(e){let t=0,n=0;for(let r of e.split(`
|
|
4
|
-
`))r.startsWith(`+`)&&!r.startsWith(`+++`)?t++:r.startsWith(`-`)&&!r.startsWith(`---`)&&n++;return{additions:t,deletions:n}}function Oe(e,t){return`${e}\u0000${t}`}function ke(e,t,n){let r=g(e).body,i=g(t).body;return r===i?``:ee(n,r,i,``,``,{context:Math.max(r.split(`
|
|
5
|
-
`).length,i.split(`
|
|
6
|
-
`).length)})}function Ae(e,t,n,r,a){let o=(0,O.c)(10),s=r===void 0?`vs-live`:r,c=a===void 0?null:a,{activeProvider:l}=i(),u;o[0]===Symbol.for(`react.memo_cache_sentinel`)?(u={status:`idle`,diff:null},o[0]=u):u=o[0];let[d,f]=(0,D.useState)(u),p=(0,D.useRef)(l),m;o[1]===l?m=o[2]:(m=()=>{p.current=l},o[1]=l,o[2]=m),(0,D.useEffect)(m);let h,_;return o[3]!==n||o[4]!==t||o[5]!==s||o[6]!==c||o[7]!==e?(h=()=>{if(!e){f({status:`idle`,diff:null});return}let r=e,i=!1;f({status:`loading`,diff:null});let a=async function(e){let r=Oe(t,e),i=n.get(r);if(i!==void 0)return i;let a=await fetch(`/api/history/${e}?docName=${encodeURIComponent(t)}`);if(!a.ok)return console.error(`[timeline-diff] history fetch returned non-ok response`,{sha:e,docName:t,status:a.status}),null;let o=(await a.json()).content??``;return n.set(r,o),o};return(async function(){try{let e=await a(r);if(i)return;if(e===null){f({status:`error`,diff:null});return}let n,o;if(s===`vs-parent`){let t=c?await a(c):``;if(i)return;if(t===null){f({status:`error`,diff:null});return}n=t,o=e}else n=e,o=p.current?.document.getText(`source`).toString()??``;let l=g(n).body,u=g(o).body,d=ke(n,o,t);if(i)return;let{additions:m,deletions:h}=$(d);f({status:`ready`,diff:d,additions:m,deletions:h,before:l,after:u})}catch(e){i||(console.error(`[timeline-diff] failed to load entry diff`,{sha:r,docName:t,mode:s,err:e}),f({status:`error`,diff:null}))}})(),()=>{i=!0}},_=[e,t,n,s,c],o[3]=n,o[4]=t,o[5]=s,o[6]=c,o[7]=e,o[8]=h,o[9]=_):(h=o[8],_=o[9]),(0,D.useEffect)(h,_),d}export{we as a,ve as c,Ee as i,Ae as n,Se as o,De as r,_e as s,$ as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./repair-skills-DwQqF8O8.mjs";export{e as repairSkills};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,o as t,r as n}from"./server-lock-DpWXnrNF.mjs";export{n as markServerLockDraining,e as releaseServerLock,t as updateServerLockPort};
|
package/dist/src-BFcAqZ_V.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as e,Ja as t,Ma as n,Na as r,Pa as i,Xa as a,bo as o,d as s,l as c,oo as l,y as u}from"./src-DY417osM.mjs";import{$ as d,$i as f,$n as p,$r as m,$t as h,A as g,Ai as _,An as v,At as y,B as b,Bi as x,Bn as S,Br as C,Bt as w,C as T,Ci as E,Cn as D,Cr as O,Ct as k,D as A,Di as j,Dn as M,Dr as N,Dt as P,E as F,Ei as I,En as L,Er as R,Et as z,F as B,Fi as V,Fn as H,Fr as U,Ft as W,G,Gi as K,Gn as q,Gr as J,Gt as Y,H as X,Hi as Z,Hn as Q,Hr as $,Ht as ee,I as te,Ii as ne,In as re,Ir as ie,It as ae,J as oe,Ji as se,Jn as ce,Jr as le,Jt as ue,K as de,Ki as fe,Kn as pe,Kr as me,Kt as he,L as ge,Li as _e,Ln as ve,Lr as ye,Lt as be,M as xe,Mi as Se,Mn as Ce,Mt as we,N as Te,Ni as Ee,Nn as De,Nt as Oe,O as ke,Oi as Ae,On as je,Or as Me,Ot as Ne,P as Pe,Pi as Fe,Pn as Ie,Pr as Le,Pt as Re,Q as ze,Qi as Be,Qn as Ve,Qr as He,Qt as Ue,R as We,Ri as Ge,Rn as Ke,Rr as qe,Rt as Je,S as Ye,Si as Xe,Sn as Ze,Sr as Qe,St as $e,T as et,Ti as tt,Tn as nt,Tr as rt,Tt as it,U as at,Ui as ot,Un as st,Ur as ct,Ut as lt,V as ut,Vi as dt,Vn as ft,Vr as pt,Vt as mt,W as ht,Wi as gt,Wn as _t,Wr as vt,Wt as yt,X as bt,Xi as xt,Xn as St,Xr as Ct,Xt as wt,Y as Tt,Yi as Et,Yn as Dt,Yr as Ot,Yt as kt,Z as At,Zi as jt,Zn as Mt,Zr as Nt,Zt as Pt,_ as Ft,_i as It,_n as Lt,_r as Rt,_t as zt,a as Bt,aa as Vt,ai as Ht,an as Ut,ar as Wt,at as Gt,b as Kt,bi as qt,bn as Jt,br as Yt,bt as Xt,c as Zt,ca as Qt,ci as $t,cn as en,cr as tn,ct as nn,d as rn,da as an,di as on,dn as sn,dr as cn,ea as ln,ei as un,en as dn,er as fn,et as pn,f as mn,fa as hn,fi as gn,fn as _n,fr as vn,g as yn,gi as bn,gn as xn,gr as Sn,gt as Cn,h as wn,ha as Tn,hi as En,hn as Dn,hr as On,i as kn,ia as An,ii as jn,in as Mn,ir as Nn,it as Pn,j as Fn,ji as In,jn as Ln,jt as Rn,k as zn,ki as Bn,kn as Vn,kt as Hn,l as Un,la as Wn,li as Gn,ln as Kn,lr as qn,lt as Jn,m as Yn,ma as Xn,mi as Zn,mn as Qn,mr as $n,n as er,na as tr,ni as nr,nn as rr,nr as ir,nt as ar,o as or,oa as sr,oi as cr,on as lr,or as ur,ot as dr,p as fr,pa as pr,pi as mr,pn as hr,pr as gr,q as _r,qi as vr,qn as yr,qr as br,qt as xr,r as Sr,ra as Cr,ri as wr,rn as Tr,rr as Er,rt as Dr,s as Or,sa as kr,si as Ar,sn as jr,sr as Mr,st as Nr,t as Pr,ta as Fr,ti as Ir,tn as Lr,tr as Rr,tt as zr,u as Br,ua as Vr,ui as Hr,un as Ur,ur as Wr,v as Gr,vi as Kr,vn as qr,vr as Jr,vt as Yr,w as Xr,wi as Zr,wn as Qr,wr as $r,wt as ei,x as ti,xi as ni,xn as ri,xr as ii,xt as ai,y as oi,yi as si,yn as ci,yr as li,yt as ui,z as di,zi as fi,zn as pi,zr as mi,zt as hi}from"./src-BkP5u3RK.mjs";import{C as gi,E as _i,T as vi,_ as yi,b as bi,c as xi,d as Si,g as Ci,i as wi,l as Ti,m as Ei,n as Di,p as Oi,s as ki,t as Ai,u as ji,v as Mi,w as Ni,x as Pi,y as Fi}from"./fs-traced-BmZQL7v9.mjs";import{a as Ii,d as Li,f as Ri,i as zi,l as Bi,n as Vi,r as Hi,t as Ui,u as Wi}from"./logger-B7Z8XO-z.mjs";import{S as Gi,_ as Ki,a as qi,c as Ji,f as Yi,g as Xi,h as Zi,i as Qi,l as $i,m as ea,n as ta,o as na,p as ra,r as ia,s as aa,t as oa,u as sa,v as ca,x as la}from"./server-lock-DpWXnrNF.mjs";export{sr as AGENT_ID_MAX_LEN,kr as AGENT_ID_RE,Xe as AGENT_WRITE_ORIGIN,pr as AcpPermissionStore,Vr as AcpRegistry,si as AcpThreadManager,It as AgentFocusBroadcaster,bn as AgentPresenceBroadcaster,E as AgentSessionCapacityError,Zr as AgentSessionManager,zt as AutoStartDisabledError,$n as BUNDLE_IDS,On as BUNDLE_SCOPE,Sn as BUNDLE_SKILL_NAME,De as BacklinkIndex,Fe as CC1Broadcaster,a as CC1_CONTRACT_VERSION,Mn as CONFIG_FILENAME,je as CONFLICT_MARKER_RE,qe as CURSOR_BUNDLE_PATHS_BY_PLATFORM,Ft as ConfigSchema,x as DEFAULT_CHECKPOINT_RETENTION,un as DEFAULT_EMBEDDINGS_DIMENSIONS,W as DEFAULT_PACK_ID,X as DocumentDurabilityState,Ir as EMBEDDINGS_API_KEY_ENV,an as FEATURED_AGENT_IDS,dt as FILE_SYSTEM_WRITER,Ce as FILE_WATCHER_ORIGIN,le as FileEmbeddingsBackend,h as GIT_PREFLIGHT_FAIL_SPAN_NAME,Z as GIT_UPSTREAM_WRITER,Xn as GitDirAccessError,S as GitNotAvailableError,ft as GitTooOldError,Yr as HOCUSPOCUS_AUTH_REJECTION_REASONS,ui as HocuspocusAuthRejection,Xt as HocuspocusAuthTokenSchema,vt as INSTALLED_AGENTS_SCHEMES,t as LINEAGE_EPOCH_KEY,di as LIVE_DERIVED_INDEX_DEBOUNCE_MS,ae as LOG_MD_TEMPLATE,z as MANAGED_RENAME_ORIGIN,qt as MAX_ACP_THREADS,tt as MAX_AGENT_SESSIONS,nn as MCP_CONNECTION_ID_HEADER,n as MCP_SERVER_NAME,I as MIN_EVICTABLE_IDLE_MS,Q as MIN_GIT_VERSION,at as MISSING_OK_CONFIG_MESSAGE,Tn as MalformedGitPointerError,pn as McpLogger,ht as MissingOkConfigError,Ae as OBSERVER_SYNC_ORIGIN,Ut as OK_OKIGNORE_TEMPLATE,r as ORPHAN_MODES,o as PROTOCOL_VERSION,Ui as PinoLogger,Ji as ProcessLockCollisionError,Un as ProjectGitInitError,P as ROLLBACK_ORIGIN,lr as ROOT_GITIGNORE_TEMPLATE,Xi as RUNTIME_VERSION,ot as SERVICE_WRITER,qn as SKILL_INSTALL_EVENTS_FILE_REL,u as SKILL_STATE_TARGETS,be as STARTER_FOLDERS,Je as STARTER_FOLDER_FRONTMATTER_FILENAME,hi as STARTER_PACKS,w as STARTER_PACK_IDS,mt as STARTER_TEMPLATES,F as STATE_MANIFEST_FILENAME,Ki as STATE_SCHEMA_VERSION,l as SYSTEM_DOC_NAME,xr as SeedPrerequisiteError,ue as SeedRootDirError,oa as ServerLockCollisionError,Pr as SingleFileNotAFileError,er as SingleFileNotFoundError,Sr as SingleFileNotMarkdownError,A as StateManifestError,et as TagIndex,Rt as USER_GLOBAL_BUNDLE_IDS,H as UiLockCollisionError,Ne as __getShowAllWalkStatsForTesting,Hn as __resetShowAllWalkStatsForTesting,$i as acquireProcessLock,ta as acquireServerLock,re as acquireUiLock,j as applyAgentMarkdownWrite,L as applyExternalChange,Re as applySeed,ke as assertCompatibleStateManifest,st as assertGitAvailable,Qn as assertNeverDiskEvent,Kr as attachAcpThreadSocket,Cn as attachIdleShutdown,Gr as bootServer,Ve as buildAndOpenSkill,jr as buildConfigYmlContent,Tt as buildExecResult,ni as buildOkMcpStdioCommand,cn as buildSkillZip,ee as buildStarterFolderFrontmatterYaml,gt as buildWipTree,Jr as bundleSkillMdPath,Ot as canonicalProjectKey,Dn as classifyEvents,Ai as classifyFsPath,Ct as clearAllEmbeddingsKeys,wr as clearContributors,lt as coercePackId,c as colorFromSeed,K as commitUpstreamImport,fe as commitWip,vr as commitWipFromTree,_t as compareSemver,ii as composeEffectiveLinterConfig,Qe as composeFrontmatterSchemasConfig,Vn as containsConflictMarkers,xn as contentHash,jn as contributorCount,B as countShadowObjects,te as countStaleAgentWipRefs,ge as countWipRefs,y as createApiExtension,mr as createAssetServeMiddleware,Le as createContentFilter,U as createContentFilterAsync,Nt as createEmbeddingsSecretStore,kn as createEphemeralProjectDir,M as createExternalChangeHandler,mn as createFileLogger,b as createLiveDerivedIndexExtension,_r as createMcpHttpHandler,J as createOsProbe,Pe as createPersistenceExtension,T as createServer,xe as createServerObserverExtension,In as createStreamingErrorWriter,Vi as createTestLogger,He as describeStoredEmbeddingsKey,yn as detectClaudeDesktopPresence,q as detectGit,zn as detectProjectShape,p as detectUserSkillHosts,Dr as discoverLockDirs,rt as discoverMarkdownlintConfig,dn as emitPreflightFailureSpan,bt as encodeDocName,At as encodeFolderRoute,ze as encodeSkillRoute,Br as ensureProjectGit,en as ensureProjectSkillGitignore,Se as errorResponse,Lt as evictStaleTrackerEntries,Pn as extractOkBinaryPath,Ie as extractWikiLinksFromMarkdown,pe as fallbackPaths,rn as findEnclosingGitRoot,_n as findEnclosingProjectRoot,R as findNativeMarkdownlintFile,fr as flushFileLogger,ai as formatAuthRejectionWire,Ht as formatContributors,cr as formatContributorsFrom,we as formatPackRationale,se as gcCheckpointRefs,zr as getCurrentMcpLogger,Hr as getLocalDir,Yn as getLogFilePath,Hi as getLogger,wn as getLogsDir,ca as getMachineId,Fi as getMeter,Fr as getMetrics,bi as getTracer,tr as handleCollabSocketError,mi as handleSpawnCursor,We as hasGcLogLatch,s as iconFromClientName,Cr as incrementCollabSocketFilteredError,An as incrementServerObserverFire,Kn as initContent,Et as initShadowRepo,Pi as initTelemetry,Kt as initToleranceTelemetryWriter,Nr as installPrettyZodErrors,zi as installTestLoggers,fn as installUserSkill,En as isAllowedApiOrigin,kt as isAllowedWorkspaceHostHeader,V as isConfigDoc,$e as isHocuspocusAuthRejectionReason,yt as isKnownPackId,ne as isLinkIndexExcludedDoc,wt as isLoopbackAddress,_e as isManagedArtifactDoc,i as isOrphanMode,Bn as isPairedWriteOrigin,C as isPathWithinDir,la as isProcessAlive,hr as isProjectRoot,ce as isProjectSkillManaged,Ge as isReservedForUserTree,qr as isSelfWrite,fi as isSystemDoc,ti as isToleranceTelemetryEnabled,Gi as isValidLockPid,ci as lastKnownHash,xt as listRescueCheckpoints,Y as listStarterPacks,hn as loadCustomAgents,Te as loadPrincipal,sa as lockFilePath,Ii as loggerFactory,Bi as logsCurrentPath,Wi as logsPreviousPath,m as makeLazyEmbeddingsKeyStore,ia as markServerLockDraining,G as mountMcpAndApi,Di as normalizeFsPath,li as originGitHubHost,Ur as packageVersionMajorMinor,k as parseAuthRejectionWire,yr as parseGitVersion,ei as parseHocuspocusAuthToken,de as parseKeepaliveConnectionId,Jt as pathToDocName,Oe as planSeed,Bt as prepareSingleFileOpen,Gt as processCommand,dr as processUsage,Rr as readAllTargets,ir as readBundleDecision,N as readOwnNativeRules,Yi as readProcessLock,ra as readProcessLockDetailed,ut as readProjectHeadState,br as readProjectLocalSemanticConfig,Qi as readServerLock,Er as readServerPackageVersion,Nn as readSkillInstallStateSnapshot,Dt as readSkillManagement,g as readStateManifest,Wt as readTargetRecordedAt,ur as readTargetVersion,ve as readUiLock,v as reconcile,Ar as recordContributor,Wr as recordSkillInstallEvent,oe as registerAllTools,ri as registerWrite,ea as releaseProcessLock,qi as releaseServerLock,Ke as releaseUiLock,Ze as removeLastKnownHash,Vt as resetMetrics,e as resolveBundleEnabled,vn as resolveBundledSkillDir,on as resolveContentDir,pt as resolveCursorBinaryDefault,$ as resolveCursorSpawnInvocation,O as resolveEffectiveLinterConfig,nr as resolveEmbeddingsCredential,gn as resolveLockDir,$r as resolveNativeConfigForDoc,Me as resolveNativeMarkdownlintConfig,he as resolvePack,Or as resolvePackageVersion,d as resolveUiInfo,$t as restoreContributors,oi as restoreLifecycleFromConflictsJson,ie as rewriteMarkdownLinksForDocumentRename,ye as rewriteWikiLinksForDocumentRename,Lr as runAuthReposSubprocess,rr as runAuthStatusSubprocess,Pt as runCloneSubprocess,Tr as runDeviceFlowSubprocess,ar as runWithMcpLogger,Zn as safeContentPath,Rn as safeSubdir,jt as safetyCheckpoint,Jn as sanitizeClientName,Be as saveInMemoryCheckpoint,f as saveVersion,it as seedBasenameIndex,or as serializeError,gi as setActiveSpanAttributes,_ as setupServerObservers,ln as shadowGit,Ni as shutdownTelemetry,St as skillManagementPath,Li as spansCurrentPath,Ri as spansPreviousPath,ct as spawnDetached,Ln as splitMarkdownBlocks,D as startWatcher,Ee as streamingProblemEvent,Gn as swapContributors,Ye as teardownToleranceTelemetryWriter,Qt as toBroadcasterKey,wi as tracedAppendFileSync,ki as tracedLinkSync,xi as tracedMkdir,Ti as tracedMkdirSync,ji as tracedRename,Si as tracedRenameSync,Oi as tracedRmSync,Ei as tracedRmdirSync,Ci as tracedUnlinkSync,yi as tracedWriteFile,Mi as tracedWriteFileSync,Xr as trustSystemCertificates,Zt as untrackTrackedProjectSkillProjection,Qr as updateLastKnownHash,Zi as updateProcessLockPort,na as updateServerLockPort,pi as updateUiLockPort,Wn as validateAgentId,Ue as validateCloneInputs,gr as validateSkillZip,aa as waitForServerLockDrain,me as withHiddenWindowsConsole,vi as withSpan,_i as withSpanSync,Mr as writeBundleDecision,Yt as writeMarkdownlintRule,sn as writeRootGitignoreForNewRepo,Mt as writeSkillManagement,Fn as writeStateManifest,tn as writeTargetVersion,nt as writeTracker};
|