@inkeep/open-knowledge 0.64.0-beta.3 → 0.64.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{acp-harness-probe-DDqiQmm_.mjs → acp-harness-probe-Bz_Xfqhw.mjs} +2 -2
- package/dist/cli.mjs +6 -6
- package/dist/constants-BgJb28Cb.mjs +2 -0
- package/dist/git-handle-Bh1alj7a.mjs +1 -0
- package/dist/{git-handle-29BNYqgw.mjs → git-handle-UnQwrdlT.mjs} +2 -2
- package/dist/index.d.mts +69 -21
- package/dist/index.mjs +157 -157
- package/dist/init-Cpnor43q.mjs +1 -0
- package/dist/{init-8KXad73_.mjs → init-JIlCRbdu.mjs} +3 -3
- package/dist/{launch-json-removal-BwH0QFXd.mjs → launch-json-removal-D1H1a769.mjs} +2 -2
- package/dist/{loader-COdw9cCC.mjs → loader-BkOiHFr0.mjs} +2 -2
- package/dist/loader-ROlCo-Nz.mjs +1 -0
- package/dist/md-manager-BJ88tow5.mjs +2 -0
- package/dist/{open-browser-aU_PSdrG.mjs → open-browser-CrMsTPIV.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-DLUqlPI6.mjs → preview-BF5V_rVP.mjs} +2 -2
- package/dist/preview-PgQuIcNJ.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-DVp1gZjW.js → ActivityModeContent-CauWCpUS.js} +1 -1
- package/dist/public/assets/{AddPropertiesButton-B4mgksK9.js → AddPropertiesButton-BNouQBfs.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-CxHgKni7.js → AgentDiffPane-DXQNRZ8O.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-DjPyJZC2.js → AgentThreadClientBinder-5zJFp5cf.js} +1 -1
- package/dist/public/assets/{AppMenubar-D2MAtGAz.js → AppMenubar-ywn95n5_.js} +1 -1
- package/dist/public/assets/{BugReportHistory-CVve2Axu.js → BugReportHistory-BATOeSHw.js} +1 -1
- package/dist/public/assets/{BugReportHistoryDialog-Ba061U9i.js → BugReportHistoryDialog-sIMmVxt-.js} +1 -1
- package/dist/public/assets/CodeMirrorPropInput-DX8Yunfs.js +3 -0
- package/dist/public/assets/{ConfigSharingInfoTooltip-BAHlj9xZ.js → ConfigSharingInfoTooltip-CmY8gl8k.js} +1 -1
- package/dist/public/assets/{ConsentDialogBody-CzH4EuI3.js → ConsentDialogBody-C4z025ef.js} +1 -1
- package/dist/public/assets/{DiffView-D8XUmPm-.js → DiffView-BgxYEqNK.js} +1 -1
- package/dist/public/assets/{DocumentContext-DKudm1-z.js → DocumentContext-BV7jb-np.js} +20 -20
- package/dist/public/assets/{EditorModeToggle-D6L8r63B.js → EditorModeToggle-B8yEewMp.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-BZuygRVh.js → EnableSyncConfirmDialog-uAw_zEkg.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-D2QIjqhX.js → ExcalidrawDocEditor-DhTxtSyA.js} +4 -4
- package/dist/public/assets/FeedbackForm-DJ9TwFhA.js +1 -0
- package/dist/public/assets/{GraphPanel-ByInPd3a.js → GraphPanel-Brg6YDja.js} +2 -2
- package/dist/public/assets/{ImportSkillDialog-BAk-BVT8.js → ImportSkillDialog-BYfuLW-m.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-a6yi3Ww5.js → LintConfigEditor-pJBzAP1G.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-CFDGVAK1.js +1 -0
- package/dist/public/assets/{ManagedArtifactProperties-D8geiZjG.js → ManagedArtifactProperties-D1f8Frip.js} +1 -1
- package/dist/public/assets/{McpConsentDialogBody-DVBhoRAw.js → McpConsentDialogBody-Da_YGlKw.js} +1 -1
- package/dist/public/assets/{Mermaid-C9X7cjZ1.js → Mermaid-BAKMqFxz.js} +2 -2
- package/dist/public/assets/{MermaidDocEditor-04iIKbvP.js → MermaidDocEditor-DVxgZCM4.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-Cn7uHncy.js → PropertyDisplayRow-9aYyPFhc.js} +2 -2
- package/dist/public/assets/{RegisteredAgentIcon-DIfsdEiW.js → RegisteredAgentIcon-C5l0ngck.js} +1 -1
- package/dist/public/assets/ReportBugDialogBody-YQEEGPWa.js +3 -0
- package/dist/public/assets/ReportBugMenuTrigger-BYHhqbyX.js +2 -0
- package/dist/public/assets/{RowDisclosure-BTtG2df8.js → RowDisclosure-BD4HJbRH.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-fWpkoH9e.js → SchemaConfigEditor-0hGeiywr.js} +1 -1
- package/dist/public/assets/{SessionsHost-BbabLBoa.js → SessionsHost-BegjN_Wv.js} +2 -2
- package/dist/public/assets/SettingsDialogBody-Bng9Ek1r.js +12 -0
- package/dist/public/assets/{ShareBranchSwitchDialog-CPFRMiPb.js → ShareBranchSwitchDialog-DNMbGcR3.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-DHygzplb.js → ShareReceiveDialog-CxRzoJmJ.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-DDYsfJz-.js → ShareReceiveMissDialog-C2M-0S6A.js} +1 -1
- package/dist/public/assets/{SkillCostValue-Dh3W83GI.js → SkillCostValue-0sdQK-kg.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-Dmd9x2GL.js → SkillEditBanner-BIAkDbBb.js} +1 -1
- package/dist/public/assets/SkillInstallMenu-C5Y79gdz.js +2 -0
- package/dist/public/assets/{SkillOriginInline-DPbc95eY.js → SkillOriginInline-C35IR2C_.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-CiKYhqeu.js → SkillToolbarControls-DEiTj33j.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-DukKIknR.js → SlidesToolbarControls-Bua5dOtR.js} +1 -1
- package/dist/public/assets/SourceEditor-DzxE90kB.js +1 -0
- package/dist/public/assets/{TerminalPanel-niWqOudS.js → TerminalPanel-EZTkF_Im.js} +3 -3
- package/dist/public/assets/{TerminalStartingNotice-LVCAO53j.js → TerminalStartingNotice-5YXAirXU.js} +1 -1
- package/dist/public/assets/TerminalWindowApp-zabnp2hc.js +1 -0
- package/dist/public/assets/{TextDocEditor-DYyxuF3J.js → TextDocEditor-5pSurn6C.js} +1 -1
- package/dist/public/assets/{ThemePicker-DXALMWUA.js → ThemePicker-BEVvKk5L.js} +1 -1
- package/dist/public/assets/{ThreadView-Dg2ocFRD.js → ThreadView-DY925XKN.js} +7 -7
- package/dist/public/assets/{TimelineDiffPane-Dq7qjm7t.js → TimelineDiffPane-BOSthuzR.js} +1 -1
- package/dist/public/assets/{abnfDiagram-N423BO3Z-CcNzibSW.js → abnfDiagram-N423BO3Z-DBJ3AZ9J.js} +1 -1
- package/dist/public/assets/{agent-diff-store-B3dLX7vR.js → agent-diff-store-CWlSMAcS.js} +1 -1
- package/dist/public/assets/{alert-dialog-v-lStrvw.js → alert-dialog-BV3f4Vr2.js} +1 -1
- package/dist/public/assets/{architectureDiagram-T3A2C74G-x7KhBP2B.js → architectureDiagram-T3A2C74G-DHhiMV1e.js} +1 -1
- package/dist/public/assets/arrow-up-right-BTi7mHwL.js +1 -0
- package/dist/public/assets/auth-state-cache-DN_6SHvB.js +11 -0
- package/dist/public/assets/{badge-zJWUwhkd.js → badge-52pHek8I.js} +1 -1
- package/dist/public/assets/{blockDiagram-VBNYF7ZC-_DUjKmqC.js → blockDiagram-VBNYF7ZC-B0XVQOlY.js} +1 -1
- package/dist/public/assets/{braces-DmS8bWjv.js → braces-Bzye844v.js} +1 -1
- package/dist/public/assets/{bug-report-send-manager-CXIJIjU-.js → bug-report-send-manager-idwD-g0s.js} +1 -1
- package/dist/public/assets/{button-CA0dewJJ.js → button-Cym3gapE.js} +1 -1
- package/dist/public/assets/{c4Diagram-5PPSVZJV-BvXPINTk.js → c4Diagram-5PPSVZJV-C0fXVzxK.js} +1 -1
- package/dist/public/assets/{calendar-D-m9ekuo.js → calendar-P1YHNDVH.js} +1 -1
- package/dist/public/assets/{case-sensitive-m-hzm2Fd.js → case-sensitive-BwklrMJw.js} +1 -1
- package/dist/public/assets/channel-Bw1oZ3oX.js +1 -0
- package/dist/public/assets/check-Dut4Aov8.js +1 -0
- package/dist/public/assets/{checkbox-C60ghXVs.js → checkbox-UfDS9TpS.js} +1 -1
- package/dist/public/assets/{chevron-down-Dkq_Sx62.js → chevron-down-DNO3PgI_.js} +1 -1
- package/dist/public/assets/chevron-left-Dhf0Sw0W.js +1 -0
- package/dist/public/assets/chevron-right-4mYNnAZZ.js +1 -0
- package/dist/public/assets/{chunk-2GRJ4B5K-Cj6-Oom3.js → chunk-2GRJ4B5K-I9g7v43C.js} +1 -1
- package/dist/public/assets/{chunk-3NCLNEKW-Bd-QhfAE.js → chunk-3NCLNEKW-CIPZUTs2.js} +1 -1
- package/dist/public/assets/{chunk-4I5QYGJK-DTmx7k3q.js → chunk-4I5QYGJK-CJSo7JWo.js} +1 -1
- package/dist/public/assets/{chunk-5RXB4S5H-szWjFIhQ.js → chunk-5RXB4S5H-CV_VIHj4.js} +1 -1
- package/dist/public/assets/{chunk-6Q2QTUOP-vClzZXZJ.js → chunk-6Q2QTUOP-HonjM1WC.js} +1 -1
- package/dist/public/assets/{chunk-7Z6QIM7H-CG3W4Gq4.js → chunk-7Z6QIM7H-C7MoQiZ1.js} +1 -1
- package/dist/public/assets/{chunk-BO2N2NFS-DhLAiJRz.js → chunk-BO2N2NFS-D2iiEks4.js} +4 -4
- package/dist/public/assets/{chunk-GF5L2VYU-D2VOXB1D.js → chunk-GF5L2VYU-DMKobWUK.js} +1 -1
- package/dist/public/assets/{chunk-I66GZJ75-BIJACljW.js → chunk-I66GZJ75-BUquu3u4.js} +1 -1
- package/dist/public/assets/{chunk-J7OUQ5F2-IIkcOqGv.js → chunk-J7OUQ5F2-D_xZJOyH.js} +2 -2
- package/dist/public/assets/{chunk-JQJVKLGR-QOce9PgS.js → chunk-JQJVKLGR-DEq8-3eQ.js} +1 -1
- package/dist/public/assets/{chunk-KBJHAD2P-B80ctoly.js → chunk-KBJHAD2P-D4Yduc8o.js} +1 -1
- package/dist/public/assets/{chunk-NSK5VX7P-DLJZ8VNx.js → chunk-NSK5VX7P-BW0NvKtJ.js} +1 -1
- package/dist/public/assets/{chunk-QR6OTTB3-DfBTRDdj.js → chunk-QR6OTTB3-BAd_wKMz.js} +1 -1
- package/dist/public/assets/{chunk-UBXNYLIW-zy0cmc7-.js → chunk-UBXNYLIW-xJmEmvG8.js} +1 -1
- package/dist/public/assets/{chunk-W5SLKNZC-dHRGG7r8.js → chunk-W5SLKNZC-9q5ZT0Or.js} +1 -1
- package/dist/public/assets/{chunk-WRU74C26-DC6Jygyt.js → chunk-WRU74C26-DEuLBlab.js} +1 -1
- package/dist/public/assets/{circle-alert-CeU2sqgg.js → circle-alert-b-E0_BIP.js} +1 -1
- package/dist/public/assets/classDiagram-JCYQIIEL-CrlbOdYD.js +1 -0
- package/dist/public/assets/classDiagram-v2-OCEON4UE-CrkjdB4S.js +1 -0
- package/dist/public/assets/client-version-BBQwLhqb.js +1 -0
- package/dist/public/assets/{cm-theme-CUQw2QSJ.js → cm-theme-CvD6eMwN.js} +1 -1
- package/dist/public/assets/{code-highlighter-impl-DQmjHoA2.js → code-highlighter-impl-CGDVGaGi.js} +1 -1
- package/dist/public/assets/{collapsible-COrqeoHr.js → collapsible-DYySK8La.js} +1 -1
- package/dist/public/assets/comment-chips-BtWBKUUL.js +5 -0
- package/dist/public/assets/{config-provider-DyH_5S1M.js → config-provider-BXiukxwE.js} +3 -3
- package/dist/public/assets/context-api-dUnlgSJr.js +1 -0
- package/dist/public/assets/{cynefinDiagram-MW4NZA55-CqGzh2Za.js → cynefinDiagram-MW4NZA55-Vp3Z3EOq.js} +1 -1
- package/dist/public/assets/{dagre-VZM6K2ZE-1ir2rJwc.js → dagre-VZM6K2ZE-BsNhh3lr.js} +1 -1
- package/dist/public/assets/{diagram-7IWD3JNH-Bj6PNtgh.js → diagram-7IWD3JNH-CntjEuMQ.js} +1 -1
- package/dist/public/assets/{diagram-B4RE2ZJO-Dz4Gdk3e.js → diagram-B4RE2ZJO-CxKY34wz.js} +1 -1
- package/dist/public/assets/{diagram-LBJQPF4R-DwZPbSOO.js → diagram-LBJQPF4R-CAoRKtuu.js} +1 -1
- package/dist/public/assets/{diagram-Q27KOJAE-DpBefHrG.js → diagram-Q27KOJAE-Bexqwg9W.js} +1 -1
- package/dist/public/assets/{diagram-UB23O5K3-CnYsy3bR.js → diagram-UB23O5K3-BO3f0yq6.js} +1 -1
- package/dist/public/assets/{dialog-CkCtHEOY.js → dialog-Ba9N5nEw.js} +1 -1
- package/dist/public/assets/{dist-BNjWPf5h.js → dist-4YFTUwt_.js} +1 -1
- package/dist/public/assets/{dist-BpVYX4pM2.js → dist-B6U1sHwQ2.js} +1 -1
- package/dist/public/assets/{dist-DJUH3LhV.js → dist-BDna-dOq.js} +1 -1
- package/dist/public/assets/{dist-C2xqTq7L.js → dist-BXlOzfrR.js} +1 -1
- package/dist/public/assets/dist-BY_vnlVW2.js +1 -0
- package/dist/public/assets/{dist-DsLZcVyZ.js → dist-BcvirUWL.js} +1 -1
- package/dist/public/assets/{dist-BF2Tao7_.js → dist-Bd3O90Cl.js} +1 -1
- package/dist/public/assets/{dist-gTGB_-tT.js → dist-Bn0BEeMP.js} +1 -1
- package/dist/public/assets/{dist-CSCWMTfQ.js → dist-CMrReMig.js} +1 -1
- package/dist/public/assets/{dist-Bun0_jqP.js → dist-CWL3ooGG.js} +1 -1
- package/dist/public/assets/{dist-aPIbpbAV.js → dist-CZYk4Gmy.js} +1 -1
- package/dist/public/assets/{dist-BTeDUJz7.js → dist-C_QZEaeX.js} +87 -87
- package/dist/public/assets/{dist-D_jhHcmP.js → dist-CfolydxL.js} +1 -1
- package/dist/public/assets/{dist-CUculQn6.js → dist-CkzVKD46.js} +1 -1
- package/dist/public/assets/{dist-BvwnbioL.js → dist-DRO03ovd.js} +1 -1
- package/dist/public/assets/{dist-D6nD_291.js → dist-DXjgrsHI.js} +1 -1
- package/dist/public/assets/{dist-DOg6TrZ3.js → dist-DatS2_-H.js} +1 -1
- package/dist/public/assets/{dist-BcWdMddd.js → dist-Dhtu02232.js} +1 -1
- package/dist/public/assets/{dist-DbEdNEy-2.js → dist-DnnH0RLX2.js} +1 -1
- package/dist/public/assets/{dist-C1JnQAE8.js → dist-Ds0ot8zG.js} +1 -1
- package/dist/public/assets/{dist-Cu8jzM5J.js → dist-GoOli512.js} +1 -1
- package/dist/public/assets/{dist-CtBjTqZn.js → dist-MhaicsMV.js} +1 -1
- package/dist/public/assets/dist-wcXwpuqG.js +1 -0
- package/dist/public/assets/{dist-DkdJazl9.js → dist-xXHzlM2r.js} +1 -1
- package/dist/public/assets/{doc-paths-DRMElswC.js → doc-paths-DMctW8qz.js} +1 -1
- package/dist/public/assets/{documents-events-DhF_sptK.js → documents-events-CwqQxQT5.js} +1 -1
- package/dist/public/assets/dropdown-menu-CRvS0_4-.js +1 -0
- package/dist/public/assets/{ebnfDiagram-BXEA7PRR-CbFOpeAM.js → ebnfDiagram-BXEA7PRR-DC58rQAn.js} +1 -1
- package/dist/public/assets/{erDiagram-JOGREHBK-CZ9JcnST.js → erDiagram-JOGREHBK-CUz9pdjc.js} +1 -1
- package/dist/public/assets/{es2015-wpLRKwCl.js → es2015-B9_uRFGw.js} +1 -1
- package/dist/public/assets/{eye-DrF_XrDR.js → eye-7pio2q9G.js} +1 -1
- package/dist/public/assets/{field-Ml4KaP--.js → field-XqXEu64v.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-hJoW3AuD.js → file-tree-adapter-CpTo1U5h.js} +1 -1
- package/dist/public/assets/{file-tree-utils-Cb7_vXe_.js → file-tree-utils-DrK6l51M.js} +1 -1
- package/dist/public/assets/flowDiagram-UKHOOZJN-DHMrplYi.js +1 -0
- package/dist/public/assets/{folder-config-api-CBCo8vGy.js → folder-config-api-Dxuhqlqr.js} +1 -1
- package/dist/public/assets/{folder-open-BGKIxsBF.js → folder-open-BWpLO6wT.js} +1 -1
- package/dist/public/assets/{form-DWhbcQ6z.js → form-BntZOc7C.js} +1 -1
- package/dist/public/assets/{ganttDiagram-PKOTCBZU-BHB-hUMH.js → ganttDiagram-PKOTCBZU-C2NMWsS0.js} +1 -1
- package/dist/public/assets/{git-branch-CYpvbxHz.js → git-branch-3CSRgL0o.js} +1 -1
- package/dist/public/assets/{gitGraphDiagram-DS77QQ5N-ZJ5Y224L.js → gitGraphDiagram-DS77QQ5N-CVdMqGMX.js} +1 -1
- package/dist/public/assets/{globals-BuFIIVIr.css → globals-20k8qIHJ.css} +1 -1
- package/dist/public/assets/{hash-DdgzU_HC.js → hash-3VQG5UJ7.js} +1 -1
- package/dist/public/assets/{highlighted-body-OFNGDK62-PeS0VpT5.js → highlighted-body-OFNGDK62-UCUIw0Lt.js} +1 -1
- package/dist/public/assets/i18n-CHdOLU04.js +1 -0
- package/dist/public/assets/index-CEIpyn32.js +2204 -0
- package/dist/public/assets/{info-YXcJ2AqB.js → info-SlzbpjOb.js} +1 -1
- package/dist/public/assets/{infoDiagram-6WML65LV-BG7MF-gX.js → infoDiagram-6WML65LV-D2JV8LcI.js} +1 -1
- package/dist/public/assets/{input-group-Co1pGUva.js → input-group-DpVg5lNG.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-WSZJBQD7-B0JcQQJV.js → ishikawaDiagram-WSZJBQD7-YJJMNAlB.js} +1 -1
- package/dist/public/assets/{journeyDiagram-NVQOT4AX-CU6rukz3.js → journeyDiagram-NVQOT4AX-NC-EWDbF.js} +1 -1
- package/dist/public/assets/{kanban-definition-27J2QSJJ-XgZkt40N.js → kanban-definition-27J2QSJJ-A5wz4I7T.js} +1 -1
- package/dist/public/assets/{label-Bbz2bT-a.js → label-D-K3fWtj.js} +1 -1
- package/dist/public/assets/{launch-agent-thread-b9-Dv6tT.js → launch-agent-thread-J0X5JOlh.js} +1 -1
- package/dist/public/assets/{launcher-selection-Bld0AvL_.js → launcher-selection-Btzbq8G9.js} +1 -1
- package/dist/public/assets/{lib-BoSom6iA.js → lib-DmueaA5E.js} +1 -1
- package/dist/public/assets/{lib-D6L_wV12.js → lib-vOz_s3tj.js} +1 -1
- package/dist/public/assets/{line-B4oNUbqJ.js → line-BURCYBOK.js} +1 -1
- package/dist/public/assets/lint-config-client-pNtVqn1v.js +1 -0
- package/dist/public/assets/{lint-plugin-meta-C39uvKXt.js → lint-plugin-meta-LEBWvINg.js} +1 -1
- package/dist/public/assets/{list-plus-DZ9qXaBL.js → list-plus-nPRgk4Qi.js} +1 -1
- package/dist/public/assets/{local-menu-action-bus-CXdHCOml.js → local-menu-action-bus-BLEUyEvu.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-CajbFe11.js → markdownlint-rule-browser-IpH2V17S.js} +1 -1
- package/dist/public/assets/mermaid-GHXKKRXX-BmYrNHJr.js +1 -0
- package/dist/public/assets/{mermaid.core-CRAU02Cc.js → mermaid.core-C0IvVkS9.js} +3 -3
- package/dist/public/assets/mermaid.core-DhUKqb7Q.js +1 -0
- package/dist/public/assets/messages-B9v-Dl6o.js +1 -0
- package/dist/public/assets/messages-BNKgouAQ.js +1 -0
- package/dist/public/assets/messages-BWVpwygE.js +1 -0
- package/dist/public/assets/messages-BdoFX7Ke.js +1 -0
- package/dist/public/assets/messages-BozLzcJu.js +1 -0
- package/dist/public/assets/messages-C0rOkBCJ.js +1 -0
- package/dist/public/assets/messages-CF7zITDG.js +1 -0
- package/dist/public/assets/messages-CIBqdK6N.js +1 -0
- package/dist/public/assets/messages-CfXBJncQ.js +1 -0
- package/dist/public/assets/messages-DXdzgbRq.js +1 -0
- package/dist/public/assets/messages-G8fhkSEs.js +1 -0
- package/dist/public/assets/messages-z_LlF45n.js +1 -0
- package/dist/public/assets/{mindmap-definition-FAOFIHXS-CbNRnPS1.js → mindmap-definition-FAOFIHXS-CKQxgOGt.js} +1 -1
- package/dist/public/assets/minus-VHw16jS_.js +1 -0
- package/dist/public/assets/{miss-dialog-store-DtLnMdOO.js → miss-dialog-store-DVpIaq34.js} +1 -1
- package/dist/public/assets/{ok-B0nm7wTQ.js → ok-Z-u-nHAF.js} +1 -1
- package/dist/public/assets/{package-CisN94Rd.js → package-B5dxtZEP.js} +1 -1
- package/dist/public/assets/page-list-cache-DambRQ7B.js +1 -0
- package/dist/public/assets/{panel-right-open-BgAOqW9e.js → panel-right-open-B0h13QHr.js} +1 -1
- package/dist/public/assets/{paperclip-DTGtQ_JR.js → paperclip-ChAyZqn8.js} +1 -1
- package/dist/public/assets/{pegDiagram-VL7TDLO6-1D9kW7ay.js → pegDiagram-VL7TDLO6-BHV9FATd.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-Dgzal0Jj.js → pending-receive-nav-store-DLOxz1b_.js} +1 -1
- package/dist/public/assets/{pieDiagram-7S7Q4E2Y-CAWP7eNl.js → pieDiagram-7S7Q4E2Y-vlst6sEu.js} +1 -1
- package/dist/public/assets/{platform-labels-CQrhw-5Z.js → platform-labels-DdSSzvdg.js} +1 -1
- package/dist/public/assets/{popover-BlSDN3zW.js → popover-B7jXm65e.js} +1 -1
- package/dist/public/assets/{progress-Bssl1FLe.js → progress-BtHJSSZk.js} +3 -3
- package/dist/public/assets/{project-paths-CBkV3-Ol.js → project-paths-BN2qP-Oz.js} +1 -1
- package/dist/public/assets/{prop-types-BGEVLmnR.js → prop-types-Boc_oFTG.js} +1 -1
- package/dist/public/assets/{propagation-api-BqnX4XED.js → propagation-api-DC5404fy.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-CIZ2JOQS-Z4KSVoW4.js → quadrantDiagram-CIZ2JOQS-aZGa0dqP.js} +1 -1
- package/dist/public/assets/radio-group-npdxiS6E.js +1 -0
- package/dist/public/assets/{railroadDiagram-AXF67PYL-BP83q5bW.js → railroadDiagram-AXF67PYL-Daf6Zy7e.js} +1 -1
- package/dist/public/assets/{receive-store-SbtZ93F8.js → receive-store-Rla0xjPc.js} +1 -1
- package/dist/public/assets/{refresh-cw-BaBMjcrv.js → refresh-cw-DwRz6AkS.js} +1 -1
- package/dist/public/assets/{requirementDiagram-LRYGKXZP--AY3V6V9.js → requirementDiagram-LRYGKXZP-C8dZAU1p.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-W5VNT64P-B-TG-dlh.js → sankeyDiagram-W5VNT64P-DSVSXy_1.js} +1 -1
- package/dist/public/assets/{select-Bs8KgWvR.js → select-XEGYznMI.js} +1 -1
- package/dist/public/assets/{selection-context-BbFFffLG.js → selection-context-C0Dh06ez.js} +1 -1
- package/dist/public/assets/{separator-B8dpHmeD.js → separator-C6x7j8mC.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-SI44F4Z6-CXQngtIb.js → sequenceDiagram-SI44F4Z6-Bnbh_rO1.js} +1 -1
- package/dist/public/assets/{skill-scope-D3YD_IZ5.js → skill-scope-C2Q18Fyo.js} +1 -1
- package/dist/public/assets/{skills-api-BHMzgYxx.js → skills-api-Du0yE_Ea.js} +1 -1
- package/dist/public/assets/{spinner-OTMpJ3P-.js → spinner-t7GahFcQ.js} +1 -1
- package/dist/public/assets/{square-pen-CBDgB7xx.js → square-pen-K4JT0cp9.js} +1 -1
- package/dist/public/assets/{src-B7bXrIgD.js → src-XvoJ42p_.js} +1 -1
- package/dist/public/assets/startup-marks-Cw2UqI10.js +1 -0
- package/dist/public/assets/{stateDiagram-OKZ733FA-DjmKNgc-.js → stateDiagram-OKZ733FA-DS5XYAjU.js} +1 -1
- package/dist/public/assets/stateDiagram-v2-UEYNNEHI-BWm5URXG.js +1 -0
- package/dist/public/assets/{swimlanes-SLNWSIFB-W7I7Md-O.js → swimlanes-SLNWSIFB-BGX6QMGe.js} +1 -1
- package/dist/public/assets/swimlanesDiagram-ULZ7WXOC-CQ5DIVBE.js +8 -0
- package/dist/public/assets/{switch-BeP1gMN6.js → switch-iwBsEWej.js} +1 -1
- package/dist/public/assets/{tabs-r9BJxNSQ.js → tabs-BNfoCymd.js} +1 -1
- package/dist/public/assets/{tag-pill-input-CIT-G8TJ.js → tag-pill-input-BWs4IhME.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-BePi2-hy.js → target-navigation-intent-C_Ucfr51.js} +1 -1
- package/dist/public/assets/{telemetry-impl-C53i8fXP.js → telemetry-impl-DLl1oxED.js} +1 -1
- package/dist/public/assets/{telemetry-startup-BuxfLmwJ.js → telemetry-startup-k7vK2L8Z.js} +1 -1
- package/dist/public/assets/{terminal-tB03Ykfq.js → terminal-D4HSnHXf.js} +1 -1
- package/dist/public/assets/terminal-cli-display-CrkxgiPR.js +1 -0
- package/dist/public/assets/{terminal-launch-events-D3fBT3uk.js → terminal-launch-events-BgzVfom1.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-DogVmcEg.js → terminal-telemetry-CWD0Kbui.js} +1 -1
- package/dist/public/assets/{text-viewer-languages-CmBalDDz.js → text-viewer-languages-DRp_Y82n.js} +2 -2
- package/dist/public/assets/{thread-client-DG1ERL6y.js → thread-client-CyOBKqv0.js} +1 -1
- package/dist/public/assets/{timeline-definition-Z64GVDOM-Cl223Ubn.js → timeline-definition-Z64GVDOM-BKNoWHPk.js} +1 -1
- package/dist/public/assets/toggle-group-C2_37kV5.js +1 -0
- package/dist/public/assets/{tooltip-DPvMEqsq.js → tooltip-DttaCTqz.js} +1 -1
- package/dist/public/assets/{trash-2-BvCgdeps.js → trash-2-CePzTX_C.js} +1 -1
- package/dist/public/assets/{triangle-alert-BMtjvBBD.js → triangle-alert-D0n54WVY.js} +1 -1
- package/dist/public/assets/typing-burst-detector-CtCPp1ik.js +8 -0
- package/dist/public/assets/{undo-2-DI8uqzmR.js → undo-2-BOBiJGd5.js} +1 -1
- package/dist/public/assets/{uninstall-DreCX4_1.js → uninstall-Be_VK869.js} +1 -1
- package/dist/public/assets/{use-activity-panel-CR337nsy.js → use-activity-panel-Bat2VfJF.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-D4rPvW8P.js → use-apply-config-color-theme-3_75T4Q8.js} +1 -1
- package/dist/public/assets/{use-collab-url-D5rWSAYA.js → use-collab-url-9MxkxDjK.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-DeqoKEyE.js → use-live-xterm-theme-BjybDd5E.js} +1 -1
- package/dist/public/assets/{use-open-skill-B6OWc3jt.js → use-open-skill-B004qnQw.js} +1 -1
- package/dist/public/assets/use-settings-route-6Aa41RPQ.js +1 -0
- package/dist/public/assets/{use-skill-origin-QOgMC_cx.js → use-skill-origin-C0RzVLGk.js} +1 -1
- package/dist/public/assets/{use-skills-CUyxM_-s.js → use-skills-BkWQHhha.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-BUJSR3VC.js → use-terminal-enabled-ST2-eUch.js} +1 -1
- package/dist/public/assets/use-timeline-entry-diff-C-o8h9N3.js +6 -0
- package/dist/public/assets/{use-workspace-DHq4JpK0.js → use-workspace-7B06onC_.js} +1 -1
- package/dist/public/assets/{vennDiagram-T6HMQDX7-B_vlI0S5.js → vennDiagram-T6HMQDX7-CRzUxobP.js} +1 -1
- package/dist/public/assets/{wardleyDiagram-T6FBY63Y-D3R5qk6E.js → wardleyDiagram-T6FBY63Y-CoEGckrX.js} +1 -1
- package/dist/public/assets/{wrench-DtgyRnkw.js → wrench-ZOpNzIoC.js} +1 -1
- package/dist/public/assets/x-C0WDbk6g.js +1 -0
- package/dist/public/assets/{xychartDiagram-ELKLHX3M-Btdla0qC.js → xychartDiagram-ELKLHX3M-BlVTFSNG.js} +1 -1
- package/dist/public/index.html +155 -155
- package/dist/public/uninstall.html +29 -29
- package/dist/{repair-launch-json-srmUn2hE.mjs → repair-launch-json-BVjKD52o.mjs} +2 -2
- package/dist/{repair-mcp-configs-I0KtICul.mjs → repair-mcp-configs-BQ7U1U_I.mjs} +2 -2
- package/dist/repair-skills-DIytACob.mjs +1 -0
- package/dist/{repair-skills-CRG-r1Xh.mjs → repair-skills-DPyYfXHX.mjs} +2 -2
- package/dist/{resolve-project-root-urAKqvDX.mjs → resolve-project-root-suxWrGvT.mjs} +2 -2
- package/dist/{server-lock-_JWkU2Mh.mjs → server-lock-CcnGITIh.mjs} +2 -2
- package/dist/server-lock-D8d0WVYU.mjs +1 -0
- package/dist/{skill-teardown-CVMrfSeZ.mjs → skill-teardown-D4qifTbZ.mjs} +2 -2
- package/dist/src-7XhmCEkb.mjs +1 -0
- package/dist/{src-BRlSw7bk.mjs → src-C8wtGJxJ.mjs} +1 -1
- package/dist/{src-CjFV1e1Z.mjs → src-CNSuUQTi.mjs} +4 -4
- package/dist/{src-DhKkOAcb.mjs → src-CaLoSvK5.mjs} +2 -2
- package/dist/src-CnywvEPN.mjs +20 -0
- package/dist/{start-1qNjbPX9.mjs → start-ClCOtrI0.mjs} +3 -3
- package/dist/start-CxNMq7dN.mjs +1 -0
- package/package.json +4 -4
- package/dist/constants-vY0RbDo-.mjs +0 -2
- package/dist/git-handle-DfQBBy3_.mjs +0 -1
- package/dist/init-CQuP4oZS.mjs +0 -1
- package/dist/loader-DPUVbNgg.mjs +0 -1
- package/dist/md-manager-CZcRasmz.mjs +0 -2
- package/dist/preview-Tkr1Psqx.mjs +0 -1
- package/dist/public/assets/CodeMirrorPropInput-BL-5Q3Jo.js +0 -3
- package/dist/public/assets/FeedbackForm-DFqW8szu.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-DqX6bBKJ.js +0 -1
- package/dist/public/assets/ReportBugDialogBody-DsOp1u-j.js +0 -3
- package/dist/public/assets/SettingsDialogBody-Dd2GkDtz.js +0 -12
- package/dist/public/assets/SkillInstallMenu-Bj4eanWC.js +0 -2
- package/dist/public/assets/SourceEditor-ChRbLJso.js +0 -1
- package/dist/public/assets/TerminalWindowApp-CWKtaPQf.js +0 -1
- package/dist/public/assets/arrow-up-right-BATFT-Sr.js +0 -1
- package/dist/public/assets/auth-state-cache-D7CM6sAp.js +0 -11
- package/dist/public/assets/channel-CPB7MoVI.js +0 -1
- package/dist/public/assets/check-_e5AYsE9.js +0 -1
- package/dist/public/assets/chevron-left-C3qnVWRd.js +0 -1
- package/dist/public/assets/chevron-right-BBMR0NbW.js +0 -1
- package/dist/public/assets/classDiagram-JCYQIIEL-Co922tiB.js +0 -1
- package/dist/public/assets/classDiagram-v2-OCEON4UE-CUyubUTn.js +0 -1
- package/dist/public/assets/client-version-Cr4yDTzO.js +0 -1
- package/dist/public/assets/comment-chips-BPjveL06.js +0 -5
- package/dist/public/assets/context-api-7lTvMdKG.js +0 -1
- package/dist/public/assets/dist-Be8lWZxP2.js +0 -1
- package/dist/public/assets/dist-pKYOq3XC2.js +0 -1
- package/dist/public/assets/dropdown-menu-JsEh078s.js +0 -1
- package/dist/public/assets/flowDiagram-UKHOOZJN-CFTGjA42.js +0 -1
- package/dist/public/assets/i18n-B28KWA_H.js +0 -1
- package/dist/public/assets/index-D7ftC-TA.js +0 -2204
- package/dist/public/assets/lint-config-client-DEbFKblI.js +0 -1
- package/dist/public/assets/mermaid-GHXKKRXX-f4wv8zwP.js +0 -1
- package/dist/public/assets/mermaid.core-wyUsrdV8.js +0 -1
- package/dist/public/assets/messages-BNqWoTE7.js +0 -1
- package/dist/public/assets/messages-BVQV1WJj.js +0 -1
- package/dist/public/assets/messages-Bu3H835T.js +0 -1
- package/dist/public/assets/messages-C2YnjINV.js +0 -1
- package/dist/public/assets/messages-CDgZBFJp.js +0 -1
- package/dist/public/assets/messages-D81fhPOK.js +0 -1
- package/dist/public/assets/messages-DRSi5QzW.js +0 -1
- package/dist/public/assets/messages-DmpME-BQ.js +0 -1
- package/dist/public/assets/messages-Drz1dYnk.js +0 -1
- package/dist/public/assets/messages-Ds1yna2Q.js +0 -1
- package/dist/public/assets/messages-N6kgiusx.js +0 -1
- package/dist/public/assets/messages-wwtrT-dP.js +0 -1
- package/dist/public/assets/minus-Dz9yQFxH.js +0 -1
- package/dist/public/assets/page-list-cache-QK9n5Q5R.js +0 -1
- package/dist/public/assets/radio-group-BsZGGl8l.js +0 -1
- package/dist/public/assets/startup-marks-BPO-vrjH.js +0 -1
- package/dist/public/assets/stateDiagram-v2-UEYNNEHI-DYowbT5J.js +0 -1
- package/dist/public/assets/swimlanesDiagram-ULZ7WXOC-Hyp8OggN.js +0 -8
- package/dist/public/assets/terminal-cli-display-Ch5uUFIR.js +0 -1
- package/dist/public/assets/toggle-group-BlEg4yJE.js +0 -1
- package/dist/public/assets/typing-burst-detector-BQPFhb8j.js +0 -8
- package/dist/public/assets/use-installed-clis-vg6izNL9.js +0 -1
- package/dist/public/assets/use-settings-route-9Zx6tEdn.js +0 -1
- package/dist/public/assets/use-timeline-entry-diff-BwGOAWfO.js +0 -6
- package/dist/public/assets/x-BAYve4SL.js +0 -1
- package/dist/repair-skills-BABpOhB_.mjs +0 -1
- package/dist/server-lock-C_5VGPQF.mjs +0 -1
- package/dist/src-BMK0mOrM.mjs +0 -20
- package/dist/src-ByMg6cEv.mjs +0 -1
- package/dist/start-BBP7vc3m.mjs +0 -1
- /package/dist/public/assets/{asset-dispatch-D3iE-ozy.js → asset-dispatch-CD6rGcnF.js} +0 -0
- /package/dist/public/assets/{auth-prompt-store-BXeyTyYx.js → auth-prompt-store-vAFATIFt.js} +0 -0
- /package/dist/public/assets/{createLucideIcon-CfxA0Qtb.js → createLucideIcon-BulbvLvN.js} +0 -0
- /package/dist/public/assets/{desktop-bridge-types-rBjHIYSI.js → desktop-bridge-types-oYPdTDmz.js} +0 -0
- /package/dist/public/assets/{dist-mv8e6dBX.js → dist-BHv-mziD.js} +0 -0
- /package/dist/public/assets/{dist-Cm417ZCm.js → dist-Bd_yyADX.js} +0 -0
- /package/dist/public/assets/{dist-DTX2HxC82.js → dist-CJhtNlOm2.js} +0 -0
- /package/dist/public/assets/{dist-BgXDUIPy.js → dist-Cr4-nBVI.js} +0 -0
- /package/dist/public/assets/{documents-fetch-B1PtbYbS.js → documents-fetch-Bw4lKnRN.js} +0 -0
- /package/dist/public/assets/{external-link-D2rJDkPo.js → external-link-DGqXfQJy.js} +0 -0
- /package/dist/public/assets/{file-tree-rename-validation-D2G4Kbju.js → file-tree-rename-validation-DmGgIR2S.js} +0 -0
- /package/dist/public/assets/{floating-ui.dom-Dk5WJYh0.js → floating-ui.dom-BcZPrP06.js} +0 -0
- /package/dist/public/assets/{globals-Cu_E7Ptz.js → globals-CTSydwqe.js} +0 -0
- /package/dist/public/assets/{html-void-elements-Biw85x38.js → html-void-elements-zEl0KGqf.js} +0 -0
- /package/dist/public/assets/{input-BZhIrrdB.js → input-Cy2M_Avq.js} +0 -0
- /package/dist/public/assets/{katex-DJlTj0sX.js → katex-CcPk1vJT.js} +0 -0
- /package/dist/public/assets/{markdownit-BZnioq-C.js → markdownit-CugClK-K.js} +0 -0
- /package/dist/public/assets/{note-window-mode-BXAdiDXS.js → note-window-mode-CsmLTxU_.js} +0 -0
- /package/dist/public/assets/{parse-api-error-Cmyw9Afr.js → parse-api-error-Dd8VI2eu.js} +0 -0
- /package/dist/public/assets/{stex-PMopVeEZ.js → stex-s_JxeNEZ.js} +0 -0
- /package/dist/public/assets/{tool-list-format-CGMeWIgE.js → tool-list-format-HdFmW82S.js} +0 -0
- /package/dist/public/assets/{trace-api-CEY5PfXs.js → trace-api-BP9dN1Hz.js} +0 -0
- /package/dist/public/assets/{use-apply-config-theme-PILfflfB.js → use-apply-config-theme-CBmHKD_B.js} +0 -0
- /package/dist/public/assets/{w3c-keyname-DlL_314g.js → w3c-keyname-C7Rznu6R.js} +0 -0
- /package/dist/public/assets/{workspace-paths-F2vuFWEQ.js → workspace-paths-CAsMig07.js} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{Qn as n}from"./DocumentContext-DKudm1-z.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{t as o}from"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./utils-CPqDy6Hr.js";import{r as c}from"./clipboard-adapter-815RzzoI.js";import{t as l}from"./button-CA0dewJJ.js";import{i as u,n as d,t as f}from"./tooltip-DPvMEqsq.js";import{a as p,c as m,i as h,l as g,o as _,r as v,s as y}from"./alert-dialog-v-lStrvw.js";import{a as b,c as x,d as S,f as C,l as w,p as T,r as E,s as D,u as O}from"./terminal-cli-display-Ch5uUFIR.js";import{a as k,d as A,f as j,i as M,n as N,o as P,p as F,u as I}from"./dropdown-menu-JsEh078s.js";import{f as L}from"./RegisteredAgentIcon-DIfsdEiW.js";import{Yt as R,fo as z,ni as B,qt as V}from"./dist-BTeDUJz7.js";import{n as H}from"./dist-DTX2HxC82.js";import{c as ee}from"./documents-events-DhF_sptK.js";import{t as U}from"./createLucideIcon-CfxA0Qtb.js";import{c as W}from"./use-open-skill-B6OWc3jt.js";import{t as te}from"./spinner-OTMpJ3P-.js";import{N as ne,S as re,j as G,x as K}from"./skills-api-BHMzgYxx.js";import{i as ie,l as ae,n as oe,r as q}from"./skill-scope-D3YD_IZ5.js";import{t as J}from"./use-skills-CUyxM_-s.js";var Y=t(),X=e(r(),1),Z=o(),se=3100,ce=3;function le(e,t,n){let r=n?.windowMs??600,i=n?.maxLevel??ce;if(e===0||t>=r)return 1;let a=e+1;return a>i?i:a}var ue={0:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},1:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},2:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},3:{count:16,startRadius:11,baseDistance:7,distanceVariance:3,sizeMin:.45,sizeMax:1.2,maxDelay:500,durationMin:1100,durationMax:2400}},de=[`var(--color-azure-blue)`,`var(--color-sky-blue)`,`var(--color-violet-300)`,`var(--color-orange-light)`,`var(--color-crystal-blue)`,`var(--color-white-cream)`];function fe(e,t={}){let n=t.rng??Math.random,r=t.colors??de,i=ue[e];if(i.count===0||r.length===0)return[];let a=[],o=Math.PI*2/i.count;for(let e=0;e<i.count;e++){let t=e*o+(n()-.5)*o*.7,s=i.baseDistance+(n()-.5)*2*i.distanceVariance,c=i.sizeMin+n()*(i.sizeMax-i.sizeMin),l=n()*i.maxDelay,u=i.durationMin+n()*(i.durationMax-i.durationMin),d=Math.floor(n()*r.length),f=Math.cos(t),p=Math.sin(t);a.push({id:e,dx:f*s,dy:p*s,originDx:f*i.startRadius,originDy:p*i.startRadius,size:c,color:r[d]??`currentColor`,delay:l,duration:u})}return a}var pe=1.8,me=90,he=16,ge=380,_e=.025,ve=.1,ye=.18,be=400,xe=9.2736,Se=18.1799,Ce=14.5244,we={1:{halfWidth:1.5,apexLift:2.2},2:{halfWidth:1.4,apexLift:2.6},3:{halfWidth:1.25,apexLift:3}};function Te(e,t){let{halfWidth:n,apexLift:r}=we[t];return`M${e-n} ${Ce+.3} Q${e} ${Ce-r}, ${e+n} ${Ce+.3}`}function Ee(e){let t=1.5,n=.3;return`M${e-t} ${Ce-n} Q${e} ${Ce+1.4}, ${e+t} ${Ce-n}`}var De=15,Oe=15;function ke(e){return{fill:e.color,"--fx-tx":`${e.dx}px`,"--fx-ty":`${e.dy}px`,"--fx-delay":`${e.delay}ms`,"--fx-duration":`${e.duration}ms`}}function Ae(e){let t=(0,Z.c)(73),{size:n,className:r,style:i,trackMouse:a,variant:o,celebrateSignal:l,onRage:u}=e,d=n===void 0?48:n,f=a===void 0?!0:a,p=o===void 0?`default`:o,m=l===void 0?0:l,h=(0,X.useRef)(null),g=(0,X.useRef)(null),_=(0,X.useRef)(null),v;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(v={x:0,y:0},t[0]=v):v=t[0];let y=(0,X.useRef)(v),[b,x]=(0,X.useState)(0),[S,C]=(0,X.useState)(0),[w,T]=(0,X.useState)(0),E;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(E=[],t[1]=E):E=t[1];let[D,O]=(0,X.useState)(E),k=(0,X.useRef)(0),A=(0,X.useRef)(0),j=(0,X.useRef)(void 0),M=p===`sleeping`,N;t[2]!==b||t[3]!==M||t[4]!==u?(N=function(){if(M)return;let e=typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),t=A.current===0?1/0:e-A.current;A.current=e;let n=le(b,t),r=b===3&&e-k.current<3100,i=n===3&&r;n===3&&u?.(),x(n),C(Ie),i||(O(fe(n)),n===3&&(k.current=e,T(Fe))),clearTimeout(j.current),j.current=setTimeout(()=>{x(0),O([])},se)},t[2]=b,t[3]=M,t[4]=u,t[5]=N):N=t[5];let P=N,F,I;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(F=()=>()=>clearTimeout(j.current),I=[],t[6]=F,t[7]=I):(F=t[6],I=t[7]),(0,X.useEffect)(F,I);let L,R;t[8]!==m||t[9]!==M?(L=()=>{m===0||M||(x(3),C(Pe),O(fe(3)),k.current=typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),T(Ne),clearTimeout(j.current),j.current=setTimeout(()=>{x(0),O([])},se))},R=[m,M],t[8]=m,t[9]=M,t[10]=L,t[11]=R):(L=t[10],R=t[11]),(0,X.useEffect)(L,R);let z,B;t[12]!==M||t[13]!==f?(z=()=>{if(!f||M||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;let e=0,t=0,n=!1,r=0,i=0,a=0,o=0,s=0,c=function(){s===0&&(s=requestAnimationFrame(u))},l=function(r){e=r.clientX,t=r.clientY,n=!0,c()};function u(){s=0;let l=g.current,u=h.current;if(!l||!u){c();return}let d=n;n=!1;let f=l.getBoundingClientRect(),p=f.left+f.width/2,m=f.top+f.height*.48,v=e-p,b=t-m,x=Math.hypot(v,b),S=Math.max(-1,Math.min(1,v/ge)),C=-Math.max(-1,Math.min(1,b/ge))*he,w=S*he,T=0,E=0;if(x>=1){let e=Math.min(x/me,1)*pe;T=v/x*e,E=b/x*e}let D=Math.abs(C-r)<.01&&Math.abs(w-i)<.01&&Math.abs(T-a)<.01&&Math.abs(E-o)<.01;if(!d&&D)return;c(),r+=(C-r)*ve,i+=(w-i)*ve,u.style.transform=`perspective(${be}px) rotateX(${r.toFixed(3)}deg) rotateY(${i.toFixed(3)}deg)`,a+=(T-a)*ye,o+=(E-o)*ye;let O=i*_e,k=-r*_e,A=a+O,j=o+k;y.current.x=A,y.current.y=j,_.current?.setAttribute(`transform`,`translate(${A.toFixed(3)} ${j.toFixed(3)})`)}return document.addEventListener(`mousemove`,l,{passive:!0}),c(),()=>{document.removeEventListener(`mousemove`,l),s!==0&&cancelAnimationFrame(s),s=0,h.current&&(h.current.style.transform=``),y.current={x:0,y:0},_.current?.removeAttribute(`transform`)}},B=[f,M],t[12]=M,t[13]=f,t[14]=z,t[15]=B):(z=t[14],B=t[15]),(0,X.useEffect)(z,B);let V;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(V=()=>{let e=_.current;if(!e)return;let{x:t,y:n}=y.current;e.setAttribute(`transform`,`translate(${t.toFixed(3)} ${n.toFixed(3)})`)},t[16]=V):V=t[16],(0,X.useLayoutEffect)(V);let H=b>0,ee=H?b:1,U=H?`ok-blob-clicked-${b}`:null,W;t[17]===r?W=t[18]:(W=s(`ok-blob-3d-wrapper`,r),t[17]=r,t[18]=W);let te=M?`cursor-default`:`cursor-pointer`,ne=`body-${S}`,re=M&&`ok-blob-sleeping`,G;t[19]!==U||t[20]!==re?(G=s(`ok-blob-group`,re,U),t[19]=U,t[20]=re,t[21]=G):G=t[21];let K;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,Y.jsx)(`path`,{d:c,className:`ok-blob-body`}),t[22]=K):K=t[22];let ie=(H||M)&&`ok-blob-eye-hidden`,ae;t[23]===ie?ae=t[24]:(ae=s(`ok-blob-eye`,ie),t[23]=ie,t[24]=ae);let oe;t[25]===ae?oe=t[26]:(oe=(0,Y.jsx)(`ellipse`,{cx:xe,cy:Ce,rx:1.2722,ry:1.9083,className:ae}),t[25]=ae,t[26]=oe);let q=(H||M)&&`ok-blob-eye-hidden`,J;t[27]===q?J=t[28]:(J=s(`ok-blob-eye ok-blob-eye-right`,q),t[27]=q,t[28]=J);let ce;t[29]===J?ce=t[30]:(ce=(0,Y.jsx)(`ellipse`,{cx:Se,cy:Ce,rx:1.2722,ry:1.9083,className:J}),t[29]=J,t[30]=ce);let ue;t[31]===ee?ue=t[32]:(ue=Te(xe,ee),t[31]=ee,t[32]=ue);let de=(!H||M)&&`ok-blob-eye-hidden`,we;t[33]===de?we=t[34]:(we=s(`ok-blob-happy-eye`,de),t[33]=de,t[34]=we);let De;t[35]!==ue||t[36]!==we?(De=(0,Y.jsx)(`path`,{d:ue,strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:we}),t[35]=ue,t[36]=we,t[37]=De):De=t[37];let Oe;t[38]===ee?Oe=t[39]:(Oe=Te(Se,ee),t[38]=ee,t[39]=Oe);let ke=(!H||M)&&`ok-blob-eye-hidden`,Ae;t[40]===ke?Ae=t[41]:(Ae=s(`ok-blob-happy-eye`,ke),t[40]=ke,t[41]=Ae);let Le;t[42]!==Oe||t[43]!==Ae?(Le=(0,Y.jsx)(`path`,{d:Oe,strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:Ae}),t[42]=Oe,t[43]=Ae,t[44]=Le):Le=t[44];let Re;t[45]===M?Re=t[46]:(Re=M?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`path`,{d:Ee(xe),strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:`ok-blob-sleeping-eye`}),(0,Y.jsx)(`path`,{d:Ee(Se),strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:`ok-blob-sleeping-eye`})]}):null,t[45]=M,t[46]=Re);let ze;t[47]!==oe||t[48]!==ce||t[49]!==De||t[50]!==Le||t[51]!==Re?(ze=(0,Y.jsxs)(`g`,{ref:_,children:[oe,ce,De,Le,Re]}),t[47]=oe,t[48]=ce,t[49]=De,t[50]=Le,t[51]=Re,t[52]=ze):ze=t[52];let Q;t[53]!==ne||t[54]!==G||t[55]!==ze?(Q=(0,Y.jsxs)(`g`,{className:G,children:[K,ze]},ne),t[53]=ne,t[54]=G,t[55]=ze,t[56]=Q):Q=t[56];let Be;t[57]===M?Be=t[58]:(Be=M?(0,Y.jsxs)(`g`,{children:[(0,Y.jsx)(`text`,{x:21,y:7,className:`ok-blob-z ok-blob-z-1`,children:`z`}),(0,Y.jsx)(`text`,{x:26,y:2,className:`ok-blob-z ok-blob-z-2`,children:`z`})]}):null,t[57]=M,t[58]=Be);let Ve;t[59]!==w||t[60]!==D?(Ve=D.length>0&&(0,Y.jsx)(`g`,{"data-slot":`ok-blob-burst`,children:D.map(je)},`firework-${w}`),t[59]=w,t[60]=D,t[61]=Ve):Ve=t[61];let He;t[62]!==P||t[63]!==d||t[64]!==te||t[65]!==Q||t[66]!==Be||t[67]!==Ve?(He=(0,Y.jsxs)(`svg`,{ref:g,width:d,height:d,viewBox:`0 0 30 30`,fill:`none`,overflow:`visible`,xmlns:`http://www.w3.org/2000/svg`,className:te,"aria-hidden":`true`,onClick:P,onMouseDown:Me,children:[Q,Be,Ve]}),t[62]=P,t[63]=d,t[64]=te,t[65]=Q,t[66]=Be,t[67]=Ve,t[68]=He):He=t[68];let Ue;return t[69]!==i||t[70]!==W||t[71]!==He?(Ue=(0,Y.jsx)(`span`,{ref:h,className:W,style:i,children:He}),t[69]=i,t[70]=W,t[71]=He,t[72]=Ue):Ue=t[72],Ue}function je(e){return(0,Y.jsx)(`circle`,{cx:De+e.originDx,cy:Oe+e.originDy,r:e.size,className:`ok-blob-firework`,style:ke(e)},e.id)}function Me(e){return e.preventDefault()}function Ne(e){return e+1}function Pe(e){return e+1}function Fe(e){return e+1}function Ie(e){return e+1}var Le=U(`ellipsis-vertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),Re=U(`file-plus`,[[`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:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M9 15h6`,key:`cctwl0`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}]]),ze=U(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Q=[...new Set(L.flatMap(e=>e.schemes))];function Be(e,t){let n=t.now?.()??Date.now(),r={};for(let t of L){let i=t.schemes[0],a=i===void 0?void 0:e[i];if(!a){r[t.id]={installed:null};continue}r[t.id]={installed:a.installed,...a.displayName===void 0?{}:{displayName:a.displayName},lastChecked:n}}return r}function Ve(e){return Be({},e)}async function He(e){let t=e.schemes??Q,n=await Promise.all(t.map(async t=>{let n=t.replace(/:$/,``);try{return[t,await e.detectProtocol(n)]}catch{return[t,{installed:!1}]}}));return Object.fromEntries(n)}var Ue=Object.fromEntries(Q.map(e=>[e,{installed:!1}]));async function We(e){let t;try{t=await e.fetch(`/api/installed-agents`,{signal:e.signal,headers:{Accept:`application/json`}})}catch(e){if(e.name===`AbortError`)throw e;return Ue}if(!t.ok)return Ue;let n;try{n=await t.json()}catch{return Ue}if(typeof n!=`object`||!n||Array.isArray(n))return Ue;let r=n,i={};for(let e of Q)i[e]={installed:r[e.replace(/:$/,``)]===!0};return i}function Ge(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n){let n=e[r],i=t[r];if(!n||!i||n.installed!==i.installed||n.displayName!==i.displayName)return!1}return!0}function Ke(e){let t=e.throttleMs??1e4,n=!1,r=null,i=null,a={},o=Ve({isElectronHost:e.isElectronHost(),now:e.now}),s=new Set,c=()=>{if(!n)for(let e of s)e(o)},l=()=>{o=Be(a,{isElectronHost:e.isElectronHost(),now:e.now})};return{probe:async()=>{if(n)return;if(i)return i;if(r!==null&&e.now()-r<t)return;let o=(async()=>{try{let t=await e.probe();if(n)return;let i=!Ge(a,t);a=t,i&&(l(),c()),r=e.now()}catch{}finally{i=null}})();return i=o,o},getTargetStates:()=>o,subscribe:e=>(s.add(e),()=>{s.delete(e)}),cancel:()=>{n=!0,s.clear()}}}function qe(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function Je(){let e=typeof window<`u`?window.okDesktop:void 0;if(e){let t=t=>e.shell.detectProtocol(t);return{probe:()=>He({detectProtocol:t}),isElectronHost:()=>!0,now:Date.now}}let t=globalThis.fetch.bind(globalThis);return{probe:()=>We({fetch:t}),isElectronHost:()=>!1,now:Date.now}}function Ye(){let e=(0,Z.c)(5),[t,n]=(0,X.useState)(Xe),r=(0,X.useRef)(null),i,a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>{let e=Ke(Je());r.current=e;let t=e.subscribe(n);e.probe();let i=()=>{e.probe()};return window.addEventListener(`focus`,i),()=>{window.removeEventListener(`focus`,i),t(),e.cancel(),r.current=null}},a=[],e[0]=i,e[1]=a):(i=e[0],a=e[1]),(0,X.useEffect)(i,a);let o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>r.current?.probe()??Promise.resolve(),e[2]=o):o=e[2];let s;return e[3]===t?s=e[4]:(s={states:t,refresh:o},e[3]=t,e[4]=s),s}function Xe(){return Ve({isElectronHost:qe(),now:Date.now})}var Ze=(0,X.createContext)(null);function Qe(e){let t=(0,Z.c)(3),{value:n,children:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,Y.jsx)(Ze,{value:n,children:r}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}function $e(){return(0,X.use)(Ze)}function et(e){let t=(0,Z.c)(48),{itemName:n,isSubmitting:r,onDelete:o,customTitle:s,customDescription:c,customDetail:u,customConfirmLabel:d,customConfirmLabelBusy:f,children:b}=e,{_:x}=a(),S;t[0]!==x||t[1]!==n?(S=n??x({id:`L3CEC1`}),t[0]=x,t[1]=n,t[2]=S):S=t[2];let C=S,w;t[3]!==x||t[4]!==d?(w=d??x({id:`cnGeoo`}),t[3]=x,t[4]=d,t[5]=w):w=t[5];let T=w,E;t[6]!==x||t[7]!==d||t[8]!==f?(E=f??d??x({id:`s3caR3`}),t[6]=x,t[7]=d,t[8]=f,t[9]=E):E=t[9];let D=E,O;t[10]!==x||t[11]!==s||t[12]!==C?(O=s??x({id:`77SdEP`,values:{itemName:C}}),t[10]=x,t[11]=s,t[12]=C,t[13]=O):O=t[13];let k;t[14]===O?k=t[15]:(k=(0,Y.jsx)(g,{children:O}),t[14]=O,t[15]=k);let A;t[16]!==x||t[17]!==c||t[18]!==C?(A=c??x({id:`16D5Zj`,values:{itemName:C}}),t[16]=x,t[17]=c,t[18]=C,t[19]=A):A=t[19];let j;t[20]===A?j=t[21]:(j=(0,Y.jsx)(_,{className:`whitespace-pre-wrap`,children:A}),t[20]=A,t[21]=j);let M;t[22]===u?M=t[23]:(M=u?(0,Y.jsx)(`p`,{className:`text-muted-foreground text-sm`,"data-testid":`delete-confirmation-detail`,children:u}):null,t[22]=u,t[23]=M);let N;t[24]!==k||t[25]!==j||t[26]!==M?(N=(0,Y.jsxs)(m,{children:[k,j,M]}),t[24]=k,t[25]=j,t[26]=M,t[27]=N):N=t[27];let P;t[28]===b?P=t[29]:(P=b?(0,Y.jsx)(v,{children:b}):null,t[28]=b,t[29]=P);let F;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Y.jsx)(i,{id:`dEgA5A`}),t[30]=F):F=t[30];let I;t[31]===r?I=t[32]:(I=(0,Y.jsx)(h,{disabled:r,children:F}),t[31]=r,t[32]=I);let L;t[33]!==T||t[34]!==D||t[35]!==r?(L=r?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(te,{"aria-hidden":`true`,className:`size-4`}),` `,D]}):T,t[33]=T,t[34]=D,t[35]=r,t[36]=L):L=t[36];let R;t[37]!==r||t[38]!==o||t[39]!==L?(R=(0,Y.jsx)(l,{variant:`destructive`,onClick:o,disabled:r,children:L}),t[37]=r,t[38]=o,t[39]=L,t[40]=R):R=t[40];let z;t[41]!==I||t[42]!==R?(z=(0,Y.jsxs)(y,{children:[I,R]}),t[41]=I,t[42]=R,t[43]=z):z=t[43];let B;return t[44]!==P||t[45]!==z||t[46]!==N?(B=(0,Y.jsxs)(p,{children:[N,P,z]}),t[44]=P,t[45]=z,t[46]=N,t[47]=B):B=t[47],B}function tt(e){return e===`agents`||e===`.agents`||e.startsWith(`.agents/`)?`.agents`:e.includes(`/`)?e:z[e]??e}function nt(e){return e===`claude`?`claude-code`:e}function rt(e){let t=(0,Z.c)(18),r,i;if(t[0]===e?(r=t[1],i=t[2]):({host:r,...i}=e,t[0]=e,t[1]=r,t[2]=i),r===`agents`){let e;return t[3]===i?e=t[4]:(e=(0,Y.jsx)(n,{...i}),t[3]=i,t[4]=e),e}if(r.includes(`/`)){if(r===`.agents`||r.startsWith(`.agents/`)){let e;return t[5]===i?e=t[6]:(e=(0,Y.jsx)(n,{...i}),t[5]=i,t[6]=e),e}if(r===`.ok`||r.startsWith(`.ok/`)){let e;if(t[7]!==i){let{className:n,...r}=i;e=r,t[7]=i,t[8]=e}else e=t[8];let n=e,r;return t[9]===n?r=t[10]:(r=(0,Y.jsx)(Ae,{size:14,...n}),t[9]=n,t[10]=r),r}let e;return t[11]===i?e=t[12]:(e=(0,Y.jsx)(W,{...i}),t[11]=i,t[12]=e),e}let a;t[13]===r?a=t[14]:(a=nt(r),t[13]=r,t[14]=a);let o;return t[15]!==i||t[16]!==a?(o=(0,Y.jsx)(E,{...i,id:a}),t[15]=i,t[16]=a,t[17]=o):o=t[17],o}function it(e){let t=(0,Z.c)(14),{hosts:n,className:r,iconClassName:i}=e,a,o,c;if(t[0]!==r||t[1]!==n||t[2]!==i){let e=n.slice(0,2),l=n.slice(2);t[6]===r?a=t[7]:(a=s(`flex items-center gap-1`,r),t[6]=r,t[7]=a);let p;t[8]===i?p=t[9]:(p=e=>(0,Y.jsxs)(f,{children:[(0,Y.jsx)(u,{asChild:!0,children:(0,Y.jsx)(`span`,{className:`flex shrink-0 items-center`,children:(0,Y.jsx)(rt,{host:e,className:s(`size-3.5 shrink-0`,i),"aria-label":tt(e)})})}),(0,Y.jsx)(d,{children:tt(e)})]},e),t[8]=i,t[9]=p),o=e.map(p),c=l.length>0?(0,Y.jsxs)(f,{children:[(0,Y.jsx)(u,{asChild:!0,children:(0,Y.jsxs)(`span`,{className:`ml-0.5 cursor-default`,children:[`+`,l.length]})}),(0,Y.jsx)(d,{children:l.map(tt).join(`, `)})]}):null,t[0]=r,t[1]=n,t[2]=i,t[3]=a,t[4]=o,t[5]=c}else a=t[3],o=t[4],c=t[5];let l;return t[10]!==a||t[11]!==o||t[12]!==c?(l=(0,Y.jsxs)(`span`,{className:a,children:[o,c]}),t[10]=a,t[11]=o,t[12]=c,t[13]=l):l=t[13],l}function at(e){let t=(0,Z.c)(6),{testId:n,title:r}=e,a;t[0]===r?a=t[1]:(a=r===void 0?{}:{title:r},t[0]=r,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Y.jsx)(i,{id:`YjiZAs`}),t[2]=o):o=t[2];let s;return t[3]!==a||t[4]!==n?(s=(0,Y.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-yellow-500/40 bg-yellow-500/10 px-1 text-[10px] text-yellow-600 uppercase tracking-wide`,"data-testid":n,...a,children:o}),t[3]=a,t[4]=n,t[5]=s):s=t[5],s}function ot(e){let t=(0,Z.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Y.jsx)(D,{...r}):(0,Y.jsx)(M,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function st(e){let t=(0,Z.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Y.jsx)(x,{...r}):(0,Y.jsx)(k,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function ct(e){let t=(0,Z.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Y.jsx)(b,{...r}):(0,Y.jsx)(N,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function lt(e){let t=(0,Z.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Y.jsx)(w,{...r}):(0,Y.jsx)(P,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function ut(e){let t=(0,Z.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Y.jsx)(O,{...r}):(0,Y.jsx)(I,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function dt(e){let t=(0,Z.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Y.jsx)(S,{...r}):(0,Y.jsx)(A,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function ft(e){let t=(0,Z.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Y.jsx)(C,{...r}):(0,Y.jsx)(j,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function pt(e){let t=(0,Z.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Y.jsx)(T,{...r}):(0,Y.jsx)(F,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}var mt=Object.freeze({hosts:null,source:null}),ht=new Map,gt=new Map;function _t(e,t){return`${e}:${t}`}function vt(e){return ht.get(e)??mt}function yt(e,t){let n=gt.get(e)??new Set;return gt.set(e,n),n.add(t),()=>{n.delete(t),n.size===0&>.delete(e)}}function bt(e,t){let n=vt(e),r={...n,...t};if(!(r.hosts===n.hosts&&r.source===n.source)){r.hosts===null&&r.source===null?ht.delete(e):ht.set(e,r);for(let t of gt.get(e)??[])t()}}var xt=V.options,St=R.options,Ct=`.agents/`;function wt({skill:e,allSkills:t,hostSet:n,sourceHostOverlay:r,linkMode:i}){let a=t=>e?`${ae(t,e.scope)}/${e.name}`:null,o=e!==void 0&&((e.hosts??[]).includes(`agents`)||t?.some(e=>e.hosts.includes(`agents`)||e.path.startsWith(Ct))),s=e?.hostAliases??(e&&t!==null?Object.assign({},...t.filter(t=>t.scope===e.scope).map(e=>e.hostAliases??{})):{}),c=e?.installableEditors??(e&&t!==null?t.find(t=>t.scope===e.scope)?.installableEditors:void 0),l=c?new Set(c):null,u=e?.scope===`global`?St:xt,d=(o?[...u,`agents`]:u).filter(e=>!(e in s)).filter(e=>e===`agents`||l===null||l.has(e)||n.has(e)),f=new Set(d.map(e=>a(e))),p=e?.scope===`global`?`~/`:``,m=e?.path?.includes(`/`)?`${p}${e.path.replace(/\/SKILL\.mdx?$/i,``)}`:null,h=m!==null&&!f.has(m)?m:null,g=h===null?r??e?.hosts?.[0]:void 0,_=new Set(e?.conflictHosts??[]),v=new Set(e?.driftPaths??[]),y=new Set(e?.symlinkedHosts??[]),b=[...[...n].filter(e=>e!==g&&!(e in s)&&!_.has(e)&&!e.includes(`/`)).map(e=>({target:e,display:a(e)??e,mode:y.has(e)?`link`:`copy`})),...(e?.customPlacements??[]).map(e=>({target:q(e),display:`${p}${e.path}`,mode:e.mode}))],x=b.map(e=>e.mode),S=x.filter(e=>e===`link`).length,C=x.length===0?i?`link`:`copy`:S*2>=x.length?`link`:`copy`,w=new Map((e?.customPlacements??[]).map(e=>[q(e),e])),T=new Set(w.keys());if(t!==null&&e){for(let n of t)if(n.scope===e.scope)for(let e of n.customPlacements??[]){let t=q(e);t!==``&&T.add(t)}}return{pathFor:a,aliases:s,rows:d,sourceRow:h,sourceHost:g,conflicted:_,drifted:v,linked:y,expectedMode:C,convertible:b,customRootRows:e===void 0?[]:[...T].sort().map(t=>({root:t,display:`${p}${t}/${e.name}`,placed:w.get(t)??null})).filter(e=>!f.has(e.display)&&e.display!==m&&!(e.root in s))}}var Tt=`min-w-[24rem]`;function Et(e,t){let n=(0,Z.c)(45),r=t.installingName===e.name,i=(0,X.useRef)(e),[a,o]=(0,X.useState)(!1),s=(0,X.useRef)(!1),c,l;n[0]===r?(c=n[1],l=n[2]):(c=()=>{s.current&&!r&&o(!0),s.current=r},l=[r],n[0]=r,n[1]=c,n[2]=l),(0,X.useEffect)(c,l);let u,d;n[3]===e?(u=n[4],d=n[5]):(u=()=>{e!==i.current&&(i.current=e,o(!1))},d=[e],n[3]=e,n[4]=u,n[5]=d),(0,X.useEffect)(u,d);let f=r||a,p;n[6]!==e.name||n[7]!==e.scope?(p=_t(e.scope,e.name),n[6]=e.name,n[7]=e.scope,n[8]=p):p=n[8];let m=p,h,g;n[9]===m?(h=n[10],g=n[11]):(h=e=>yt(m,e),g=()=>vt(m),n[9]=m,n[10]=h,n[11]=g);let _=(0,X.useSyncExternalStore)(h,g),v=_.hosts,y=_.source,b,x;n[12]!==y||n[13]!==m||n[14]!==e.hosts?(b=()=>{y!==null&&e.hosts[0]===y&&bt(m,{source:null})},x=[e.hosts,y,m],n[12]=y,n[13]=m,n[14]=e.hosts,n[15]=b,n[16]=x):(b=n[15],x=n[16]),(0,X.useEffect)(b,x);let S=e.linkMode===!0,C=v??e.hosts,w;n[17]===C?w=n[18]:(w=new Set(C),n[17]=C,n[18]=w);let T=w,E=v?v.length>0:e.installed,D=(0,X.useRef)(e.hosts),O,k;n[19]!==v||n[20]!==e.hosts?(O=()=>{v===null&&(D.current=e.hosts)},k=[v,e.hosts],n[19]=v,n[20]=e.hosts,n[21]=O,n[22]=k):(O=n[21],k=n[22]),(0,X.useEffect)(O,k);let A;n[23]===e.hosts?A=n[24]:(A=[...e.hosts].sort().join(`,`),n[23]=e.hosts,n[24]=A);let j=A,M,N;n[25]!==m||n[26]!==j?(M=()=>{let e=vt(m).hosts;e&&[...e].sort().join(`,`)===j&&bt(m,{hosts:null})},N=[j,m],n[25]=m,n[26]=j,n[27]=M,n[28]=N):(M=n[27],N=n[28]),(0,X.useEffect)(M,N);let P=(0,X.useRef)(null),F=(0,X.useRef)(null),I,L;n[29]===Symbol.for(`react.memo_cache_sentinel`)?(I=()=>()=>{P.current&&clearTimeout(P.current),F.current?.(),F.current=null},L=[],n[29]=I,n[30]=L):(I=n[29],L=n[30]),(0,X.useEffect)(I,L);let R;n[31]!==t||n[32]!==m||n[33]!==e?(R=function(n,r){D.current=n,bt(m,{hosts:n}),P.current&&clearTimeout(P.current);let i=async()=>{F.current=null,P.current=null;let r=await t.install(e,n.filter(B));if(!r.ok){bt(m,{hosts:null});return}D.current=[...r.hosts],bt(m,{hosts:[...r.hosts]})};r?(F.current=()=>void i(),P.current=setTimeout(()=>void i(),350)):(F.current=null,i())},n[31]=t,n[32]=m,n[33]=e,n[34]=R):R=n[34];let z=R,V;return n[35]!==t||n[36]!==z||n[37]!==T||n[38]!==E||n[39]!==f||n[40]!==y||n[41]!==m||n[42]!==S||n[43]!==e?(V={hostSet:T,installed:E,installing:f,toggleEditor(e,t){let n=new Set(D.current);t?n.add(e):n.delete(e),z([...n],!0)},installAll(){let t=e.scope===`global`?St:xt,n=D.current.filter(e=>!t.includes(e)),r=e.installableEditors??t,i=t.filter(e=>r.includes(e)||D.current.includes(e));z([...n,...i],!1)},linkMode:S,sourceHost:y??e.hosts[0],placeAt(n,r){t.runLocationWrite(e,()=>K({scope:e.scope,name:e.name,dir:n,mode:r})).then(Ot)},unplaceAt(n){t.runLocationWrite(e,()=>ne({scope:e.scope,name:e.name,path:n})).then(Dt)},setSource(n){bt(m,{source:n}),t.runLocationWrite(e,()=>G({scope:e.scope,name:e.name,target:n})).then(e=>{e.ok||(bt(m,{source:null}),H.error(e.error))})},convertLocation(n,r){t.convertLocations(e,[{target:n,mode:r}])},convertLocations(n){t.convertLocations(e,n)}},n[35]=t,n[36]=z,n[37]=T,n[38]=E,n[39]=f,n[40]=y,n[41]=m,n[42]=S,n[43]=e,n[44]=V):V=n[44],V}function Dt(e){e.ok||H.error(e.error)}function Ot(e){e.ok||H.error(e.error)}function $(e){let t=(0,Z.c)(7),{hint:n,children:r}=e,i;t[0]===r?i=t[1]:(i=(0,Y.jsx)(u,{asChild:!0,children:r}),t[0]=r,t[1]=i);let a;t[2]===n?a=t[3]:(a=(0,Y.jsx)(d,{side:`right`,className:`max-w-xs`,children:n}),t[2]=n,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,Y.jsxs)(f,{children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function kt(e){let t=(0,Z.c)(77),{toggles:n,skill:r,onResolveFork:o,onRunStart:s,menuKind:c}=e,u=c===void 0?`dropdown`:c,{_:d}=a(),{hostSet:f,toggleEditor:p,installAll:m}=n,h=J(),g,_,v,y,b,x,S,C,w,T;if(t[0]!==d||t[1]!==h.data||t[2]!==h.status||t[3]!==f||t[4]!==m||t[5]!==u||t[6]!==o||t[7]!==s||t[8]!==r||t[9]!==p||t[10]!==n){let{pathFor:e,aliases:a,rows:c,sourceRow:E,sourceHost:D,conflicted:O,drifted:k,linked:A,expectedMode:j,convertible:M,customRootRows:N}=wt({skill:r,allSkills:h.status===`ready`?h.data:null,hostSet:f,sourceHostOverlay:n.sourceHost,linkMode:n.linkMode});b=c,x=E,y=j,_=M,v=N;let P=e=>oe(a,e),F=It,I=e=>{let t=P(e);return t.length===0?!0:window.confirm(d({id:`Uobeu9`,values:{0:t.map(F).join(`, `),rootRel:e}}))},L;t[21]!==d||t[22]!==r?(L=(e,t)=>{let n=e.includes(`/`)?e:ae(e,r?.scope??`project`);return(0,Y.jsx)($,{hint:d({id:`0dslv8`,values:{0:F(e),1:F(e),2:r?.name??``,poolRootRel:t,subRoot:n}}),children:(0,Y.jsx)(l,{variant:`ghost`,size:`sm`,className:`h-4 shrink-0 px-0`,"aria-label":d({id:`G6Lrs_`,values:{0:F(e)}}),onClick:i=>{i.preventDefault(),i.stopPropagation(),window.confirm(d({id:`iiqOKM`,values:{0:F(e),1:r.name,2:F(e),subRoot:n,poolRootRel:t}}))&&re({scope:r.scope,root:n,action:`unlink`,exclude:[r.name]}).then(e=>{e.ok?ee():H.error(d({id:`PRgIJh`,values:{0:e.error,subRoot:n}}))})},"data-testid":`skill-audience-unfollow-${e}`,children:(0,Y.jsx)(rt,{host:e,"aria-hidden":!0,className:`size-3.5`})})},e)},t[21]=d,t[22]=r,t[23]=L):L=t[23];let R=L;g=n.installing;let B=ie(r),V=Ft,U;t[24]!==d||t[25]!==s||t[26]!==n?(U=(e,t,r)=>{let a=r===`link`?`copy`:`link`;return(0,Y.jsx)($,{hint:d(r===`link`?{id:`FeXcUS`,values:{display:t}}:{id:`ugQcJX`,values:{display:t}}),children:(0,Y.jsx)(l,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-yellow-500/40 bg-yellow-500/10 px-1 font-normal text-[10px] text-yellow-600 uppercase tracking-wide hover:bg-yellow-500/20`,onClick:r=>{r.preventDefault(),r.stopPropagation(),window.confirm(d(a===`link`?{id:`m0eHej`,values:{display:t}}:{id:`HbcQYf`,values:{display:t}}))&&(s?.(),n.convertLocation?.(e,a))},"data-testid":`skill-convert-${e}`,children:r===`link`?(0,Y.jsx)(i,{id:`uUCrBv`}):(0,Y.jsx)(i,{id:`iaPtht`})})})},t[24]=d,t[25]=s,t[26]=n,t[27]=U):U=t[27];let te=U,ne;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,Y.jsx)(i,{id:`npcziF`}),t[28]=ne):ne=t[28];let G;t[29]===d?G=t[30]:(G=d({id:`6f_UX4`}),t[29]=d,t[30]=G);let K;t[31]===m?K=t[32]:(K=()=>m(),t[31]=m,t[32]=K);let q;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,Y.jsx)(i,{id:`N40H-G`}),t[33]=q):q=t[33];let J;t[34]!==g||t[35]!==K?(J=(0,Y.jsx)(l,{variant:`ghost`,size:`sm`,className:`h-5 px-1.5 font-normal text-[11px] text-muted-foreground hover:text-foreground`,disabled:g,onClick:K,"data-testid":`skill-install-all`,children:q}),t[34]=g,t[35]=K,t[36]=J):J=t[36];let X;t[37]!==G||t[38]!==J?(X=(0,Y.jsx)($,{hint:G,children:J}),t[37]=G,t[38]=J,t[39]=X):X=t[39],t[40]!==u||t[41]!==X?(S=(0,Y.jsxs)(lt,{menuKind:u,className:`flex items-center justify-between gap-2`,children:[ne,X]}),t[40]=u,t[41]=X,t[42]=S):S=t[42],C=x===null?null:(0,Y.jsx)($,{hint:d({id:`pXB6SL`}),children:(0,Y.jsxs)(ct,{menuKind:u,disabled:g,checked:!0,onSelect:Pt,"data-testid":`skill-source-row`,children:[(0,Y.jsx)(W,{"aria-hidden":!0,className:`size-4 text-muted-foreground`}),(0,Y.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Y.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:x}),(()=>{let e=V(x).split(`/`).slice(0,-1).join(`/`),t=P(e);return t.length>0?(0,Y.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-source`,children:t.map(t=>R(t,e))}):null})(),(0,Y.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-border/60 px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,children:(0,Y.jsx)(i,{id:`tiFPjk`})})]})]})}),w=b.map(t=>{let a=e(t),s=t===`agents`?`.agents`:z[t],c=V(a).split(`/`).slice(0,-1).join(`/`),m=P(c);return(0,Y.jsx)($,{hint:O.has(t)?d({id:`8HvJlU`,values:{0:a??s}}):t===D?a?d({id:`ssk6rl`,values:{path:a}}):s:f.has(t)?d(a?{id:`9ieZhu`,values:{path:a}}:{id:`n3T3EE`,values:{label:s}}):B?.editor===t?d({id:`_3S4Ql`,values:{0:r?.name??``,1:B.plugin,2:a??s,label:s}}):d(a?D===void 0?{id:`xk133d`,values:{path:a}}:y===`link`?{id:`1LtA5r`,values:{path:a}}:{id:`opPbzN`,values:{path:a}}:{id:`Pp0Vgd`,values:{label:s}}),children:(0,Y.jsxs)(ct,{menuKind:u,disabled:g,checked:f.has(t),onCheckedChange:e=>{O.has(t)||e===!0&&!I(c)||p(t,e===!0)},onSelect:Nt,className:`group`,"data-testid":`skill-install-editor-${t}`,children:[(0,Y.jsx)(rt,{host:t,"aria-hidden":!0,className:`size-4`}),(0,Y.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Y.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:a??s}),m.length>0?(0,Y.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-${t}`,children:m.map(e=>R(e,c))}):null,B?.editor===t&&!f.has(t)?(0,Y.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-border/60 px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,"data-testid":`skill-row-plugin-covered-${t}`,children:(0,Y.jsx)(i,{id:`scRzTw`})}):null,O.has(t)?(0,Y.jsx)($,{hint:d({id:`_O7dJS`}),children:(0,Y.jsx)(l,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-yellow-500/40 bg-yellow-500/10 px-1 text-[10px] text-yellow-600 uppercase tracking-wide hover:bg-yellow-500/20`,onClick:e=>{e.preventDefault(),o?.(t)},"data-testid":`skill-fork-chip-${t}`,children:(0,Y.jsx)(i,{id:`jng7Ko`})})}):t===D?(0,Y.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-border/60 px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,children:(0,Y.jsx)(i,{id:`tiFPjk`})}):f.has(t)&&r?.hosts?(0,Y.jsxs)(Y.Fragment,{children:[!g&&(A.has(t)?`link`:`copy`)!==y?te(t,a??s,A.has(t)?`link`:`copy`):null,(0,Y.jsx)($,{hint:d({id:`nBgzKO`}),children:(0,Y.jsx)(l,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide opacity-0 focus-visible:opacity-100 group-hover:opacity-100 hover:border-foreground/40 hover:text-foreground`,onClick:e=>{e.preventDefault(),e.stopPropagation(),n.setSource?.(t)},"data-testid":`skill-set-source-${t}`,children:(0,Y.jsx)(i,{id:`VNNRfN`})})})]}):null,!g&&k.has(V(a))?(0,Y.jsx)($,{hint:d({id:`iz1LdD`}),children:(0,Y.jsx)(at,{testId:`skill-drift-${t}`})}):null]})]})},t)}),T=v.map(e=>{let t=e.display;return(0,Y.jsx)($,{hint:e.placed===null?d(D===void 0?{id:`xk133d`,values:{path:t}}:y===`link`?{id:`1LtA5r`,values:{path:t}}:{id:`opPbzN`,values:{path:t}}):d({id:`9ieZhu`,values:{path:t}}),children:(0,Y.jsxs)(ct,{menuKind:u,disabled:g,checked:e.placed!==null,onCheckedChange:t=>{if(t===!0&&e.placed===null){if(!I(e.root))return;n.placeAt(e.root,y)}else e.placed!==null&&n.unplaceAt?.(e.placed.path)},onSelect:Mt,className:`group`,"data-testid":`skill-custom-root-${e.root}`,children:[e.root===`.agents/skills`?(0,Y.jsx)(rt,{host:`agents`,"aria-hidden":!0,className:`size-4`}):(0,Y.jsx)(W,{"aria-hidden":!0,className:`size-4 text-muted-foreground`}),(0,Y.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Y.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:e.display}),P(e.root).length>0?(0,Y.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-custom-${e.root}`,children:P(e.root).map(t=>R(t,e.root))}):null,!g&&e.placed!==null&&k.has(e.placed.path)?(0,Y.jsx)($,{hint:d({id:`iz1LdD`}),children:(0,Y.jsx)(at,{testId:`skill-drift-custom-${e.root}`})}):e.placed===null?null:(0,Y.jsxs)(Y.Fragment,{children:[!g&&e.placed.mode!==y?te(e.root,e.display,e.placed.mode):null,(0,Y.jsx)($,{hint:d({id:`nBgzKO`}),children:(0,Y.jsx)(l,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide opacity-0 focus-visible:opacity-100 group-hover:opacity-100 hover:border-foreground/40 hover:text-foreground`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n.setSource?.(e.root)},"data-testid":`skill-set-source-custom-${e.root}`,children:(0,Y.jsx)(i,{id:`VNNRfN`})})})]})]})]})},e.root)}),t[0]=d,t[1]=h.data,t[2]=h.status,t[3]=f,t[4]=m,t[5]=u,t[6]=o,t[7]=s,t[8]=r,t[9]=p,t[10]=n,t[11]=g,t[12]=_,t[13]=v,t[14]=y,t[15]=b,t[16]=x,t[17]=S,t[18]=C,t[19]=w,t[20]=T}else g=t[11],_=t[12],v=t[13],y=t[14],b=t[15],x=t[16],S=t[17],C=t[18],w=t[19],T=t[20];let E;t[43]!==v||t[44]!==b.length||t[45]!==x?(E=b.length===0&&v.length===0&&x===null?(0,Y.jsx)(`div`,{className:`px-2 py-1.5 text-[11px] text-muted-foreground leading-snug`,"data-testid":`skill-install-no-destinations`,children:(0,Y.jsx)(i,{id:`MOAoFO`})}):null,t[43]=v,t[44]=b.length,t[45]=x,t[46]=E):E=t[46];let D;t[47]!==d||t[48]!==g||t[49]!==_||t[50]!==y||t[51]!==s||t[52]!==n?(D=_.length>0&&n.convertLocations?(0,Y.jsxs)(`div`,{className:`flex items-center gap-1 px-2 pt-1 pb-1.5`,children:[(0,Y.jsx)(l,{variant:`ghost`,size:`sm`,className:`h-auto whitespace-normal p-0 text-left font-normal text-[11px] text-muted-foreground leading-snug hover:bg-transparent hover:text-foreground`,onClick:e=>{e.preventDefault();let t=y===`link`?`copy`:`link`,r=_.filter(e=>e.mode!==t);if(r.length===0)return;let i=d(t===`copy`?{id:`iOAsF1`}:{id:`MS8lMS`}),a=d(t===`copy`?{id:`gZiT5e`}:{id:`PhIa-X`}),o=r.map(jt).join(`
|
|
2
|
-
`);window.confirm(`${i}\n\n${a}\n\n${o}\n\n${d({id:`Cu6GXQ`})}`)&&(s?.(),n.convertLocations?.(r.map(e=>({target:e.target,mode:t}))))},disabled:g,"data-testid":`skill-convert-all`,children:y===`link`?(0,Y.jsx)(i,{id:`rcJmK8`}):(0,Y.jsx)(i,{id:`LBv_TR`})}),(0,Y.jsx)($,{hint:d({id:`0J6nhG`}),children:(0,Y.jsx)(l,{variant:`ghost`,size:`sm`,"aria-label":d({id:`qJSo0_`}),className:`size-4 shrink-0 rounded-full border border-border/60 p-0 font-normal text-[9px] text-muted-foreground hover:border-foreground/40 hover:bg-transparent hover:text-foreground`,onClick:At,"data-testid":`skill-convert-all-help`,children:`?`})})]}):null,t[47]=d,t[48]=g,t[49]=_,t[50]=y,t[51]=s,t[52]=n,t[53]=D):D=t[53];let O;t[54]===u?O=t[55]:(O=(0,Y.jsx)(ut,{menuKind:u}),t[54]=u,t[55]=O);let k;t[56]===d?k=t[57]:(k=d({id:`5ymuTA`}),t[56]=d,t[57]=k);let A;t[58]===r?.scope?A=t[59]:(A=()=>{window.location.hash=r?.scope===`global`?`#settings/user-skills`:`#settings/skills`},t[58]=r?.scope,t[59]=A);let j,M;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,Y.jsx)(ze,{"aria-hidden":!0}),M=(0,Y.jsx)(i,{id:`ZBF9fn`}),t[60]=j,t[61]=M):(j=t[60],M=t[61]);let N;t[62]!==u||t[63]!==A?(N=(0,Y.jsxs)(st,{menuKind:u,onSelect:A,children:[j,M]}),t[62]=u,t[63]=A,t[64]=N):N=t[64];let P;t[65]!==N||t[66]!==k?(P=(0,Y.jsx)($,{hint:k,children:N}),t[65]=N,t[66]=k,t[67]=P):P=t[67];let F;return t[68]!==P||t[69]!==S||t[70]!==C||t[71]!==w||t[72]!==T||t[73]!==E||t[74]!==D||t[75]!==O?(F=(0,Y.jsxs)(Y.Fragment,{children:[S,C,w,T,E,D,O,P]}),t[68]=P,t[69]=S,t[70]=C,t[71]=w,t[72]=T,t[73]=E,t[74]=D,t[75]=O,t[76]=F):F=t[76],F}function At(e){return e.preventDefault()}function jt(e){return e.display}function Mt(e){return e.preventDefault()}function Nt(e){return e.preventDefault()}function Pt(e){return e.preventDefault()}function Ft(e){return(e??``).replace(/^~\//,``)}function It(e){return e===`agents`?`.agents`:z[e]??e}export{Le as C,Re as S,et as _,xt as a,Ye as b,lt as c,ft as d,pt as f,tt as g,it as h,St as i,ut as l,rt as m,kt as n,ot as o,at as p,Et as r,st as s,Tt as t,dt as u,Qe as v,Ae as w,ze as x,$e as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{En as n,It as r,Rt as i,U as a,_n as o,bt as s,en as c,hn as l,jn as u,lt as d,mt as f,st as p,tn as m,ut as h,yt as g}from"./DocumentContext-DKudm1-z.js";import{t as _}from"./react-f2sANaYj.js";import{n as v}from"./dist-PQ5KMVDh.js";import{t as ee}from"./compiler-runtime-BfE3aGVn.js";import{J as y,M as b,X as x,a as te,b as S,i as ne,o as re}from"./CodeMirrorPropInput-BL-5Q3Jo.js";import{Co as C,No as w,T as ie,Xi as ae,_o as T,ai as E}from"./dist-BTeDUJz7.js";import{i as oe}from"./use-apply-config-theme-PILfflfB.js";import{C as D,F as se,M as ce,N as le,R as ue,T as O,f as k,i as de,k as fe,p as pe,r as me,t as he,u as ge}from"./typing-burst-detector-BQPFhb8j.js";import"./config-provider-DyH_5S1M.js";import{$ as A,D as j,Dt as M,F as N,It as P,Lt as F,Ot as I,Pt as L,Y as R,Z as z,b as B,ct as V,ft as _e,g as H,gt as U,ht as ve,it as W,kt as ye,l as G,lt as K,nt as q,pt as J,rt as Y,ut as X,v as Z}from"./dist-C2xqTq7L.js";import{a as be,n as xe}from"./cm-theme-CUQw2QSJ.js";import{i as Se,n as Ce,o as we,r as Te}from"./dist-D6nD_291.js";import{o as Ee,r as De}from"./selection-context-BbFFffLG.js";import{l as Oe}from"./lint-config-client-DEbFKblI.js";import{a as ke,i as Ae,n as je,o as Me,r as Ne,s as Pe,t as Fe}from"./dist-BpVYX4pM2.js";import{n as Ie,t as Le}from"./src-B7bXrIgD.js";var Q=e(_(),1),Re=ee();function ze(){let e=g();return e===null?null:new Set(e.keys())}function Be(e,t,n){let r=[],i=N(e);if(n!=null){let a=[];for(let{from:e,to:n}of t)i.iterate({from:e,to:n,enter(e){if(e.name===`InlineCode`||e.name===`FencedCode`)return a.push({from:e.from,to:e.to}),!1}});let o=(e,t)=>a.some(n=>e>=n.from&&t<=n.to);for(let{from:i,to:a}of t){let t=e.doc.sliceString(i,a);C.lastIndex=0;for(let e=C.exec(t);e!==null;e=C.exec(t)){let t=e[2];if(!w(t))continue;let a=i+(e.index??0)+e[1].length,s=a+t.length+1;o(a,s)||r.push(R.mark({class:n.has(t)?`cm-skill-ref`:`cm-skill-ref cm-skill-ref-missing`,attributes:{"data-skill-ref":t}}).range(a,s))}}}for(let{from:a,to:o}of t)i.iterate({from:a,to:o,enter(t){if(t.name!==`InlineCode`)return;let i=e.doc.sliceString(t.from,t.to),a=i.length-i.replace(/^`+/,``).length,o=i.length-i.replace(/`+$/,``).length,s=i.slice(a,i.length-o),c=/^\/([a-z0-9][a-z0-9-]{1,63})$/.exec(s)?.[1];if(c!==void 0&&w(c)&&n!=null)return r.push(R.mark({class:n.has(c)?`cm-skill-ref`:`cm-skill-ref cm-skill-ref-missing`,attributes:{"data-skill-ref":c}}).range(t.from+a,t.to-o)),!1;let l=p.exec(s);if(l)return r.push(R.mark({class:`cm-skill-path-link`,attributes:{"data-skill-path":l[1]}}).range(t.from+a,t.to-o)),!1}});return r.sort((e,t)=>e.from-t.from||e.value.startSide-t.value.startSide),R.set(r)}function Ve(e){let t=h(e);return t===null?[]:[A.fromClass(class{decorations;constructor(e){this.decorations=Be(e.state,e.visibleRanges,ze())}update(e){(e.docChanged||e.viewportChanged||N(e.startState)!==N(e.state))&&(this.decorations=Be(e.view.state,e.view.visibleRanges,ze()))}},{decorations:e=>e.decorations}),z.domEventHandlers({mousedown(n){let r=n.target?.closest?.(`[data-skill-ref]`),i=r instanceof HTMLElement?r.dataset.skillRef:void 0;if(i!==void 0){n.preventDefault();let e=g()?.get(i);return e===void 0?f():window.location.hash=s(i,e),!0}let a=n.target?.closest?.(`.cm-skill-path-link`),o=a instanceof HTMLElement?a.dataset.skillPath:void 0;return o===void 0?!1:(n.preventDefault(),window.location.hash=d(t,e,o),!0)}})]}var He=R.line({attributes:{dir:`auto`}});function Ue(e){let t=new L;for(let n of e.visibleRanges)for(let r=n.from;r<=n.to;){let n=e.state.doc.lineAt(r);t.add(n.from,n.from,He),r=n.to+1}return t.finish()}var We=A.fromClass(class{decorations;constructor(e){this.decorations=Ue(e)}update(e){(e.docChanged||e.viewportChanged)&&(this.decorations=Ue(e.view))}},{decorations:e=>e.decorations}),Ge=[z.perLineTextDirection.of(!0),We],Ke=new Set([`Link`,`Image`,`HTMLTag`,`HTMLBlock`]),qe=`cm-lint-local-target`;function Je(e,t){let n=Math.min(Math.max(t.line+1,1),e.lines),r=e.line(n);return Math.min(r.from+Math.max(0,t.character),r.to)}function Ye(e,t){let n=H(e,t+1,100);if(n){let e=n.resolveInner(t,1);for(;e;){if(Ke.has(e.name))return{from:e.from,to:e.to};e=e.parent}}return{from:t,to:t}}function Xe(e){return e===`error`?`error`:e===`info`?`info`:`warning`}function Ze(e,t){let n=e.doc,r=[];for(let i of t){if(i.source!==`links`)continue;let t=Ye(e,Je(n,i.range.start));r.push({from:t.from,to:Math.max(t.to,t.from),severity:Xe(i.severity),message:O(i),source:`${i.source}/${i.code}`,markClass:qe})}return r}var Qe=P.define();function $e(e){let t={findings:[]};return[Ae(e=>y()?Ze(e.state,t.findings):[],{delay:300,needsRefresh:e=>e.transactions.some(e=>e.effects.some(e=>e.is(Qe)))}),A.define(n=>{let r=e=>{t.findings=e,n.dispatch({effects:Qe.of(null)}),Fe(n)},i=D(e,e=>{e.status===`loaded`&&r(e.findings)}),a=x(()=>r(t.findings));return{destroy(){i(),a()}}})]}function et(e,t){return e.enabled?[je(),Ae(async n=>tt(n.state.doc,await E(n.state.doc.toString(),e,t)),{delay:600})]:[]}function $(e,t){let n=Math.min(Math.max(t.line+1,1),e.lines),r=e.line(n);return Math.min(r.from+Math.max(0,t.character),r.to)}function tt(e,t){let n=[];for(let r of t){let t=$(e,r.range.start),i=$(e,r.range.end),a={from:t,to:Math.max(i,t),severity:r.severity,message:r.message,source:`${r.source}/${r.code}`},o=nt(r);o&&(a.actions=[o]),n.push(a)}return n}function nt(e){let t=e.fixes;return!t||t.length===0?null:{name:`Fix`,apply(e){let n=e.state.doc;e.dispatch({changes:t.map(e=>({from:$(n,e.range.start),to:$(n,e.range.end),insert:e.newText})),userEvent:`input.complete`})}}}var rt=[J(),K(),X(),Z(),Y(),W(),ye.allowMultipleSelections.of(!0),j(),G(),Te(),Ce(),U(),q(),V(),ke(),_e.of([...Se,...xe,...Pe,...B,...we,...Ne])],it=R.mark({class:`cm-link-ref-broken`}),at=/^\s{0,3}\[([^\]]+)\]:\s/,ot=/\[([^\]]*)\]\[([^\]]*)\]/g,st=new Set([`FencedCode`,`CodeBlock`,`InlineCode`]);function ct(e,t){let n=0,r=t.length-1;for(;n<=r;){let i=n+r>>1,a=t[i];if(e<a.from)r=i-1;else if(e>=a.to)n=i+1;else return!0}return!1}function lt(e){let t=[];return N(e).iterate({enter(e){if(st.has(e.name))return t.push({from:e.from,to:e.to}),!1}}),t.sort((e,t)=>e.from-t.from),t}function ut(e){let t=new Set,n=[],r=e.doc,i=lt(e);for(let e=1;e<=r.lines;e++){let n=r.line(e);if(ct(n.from,i))continue;let a=at.exec(n.text);a&&t.add(a[1].toLowerCase())}for(let e=1;e<=r.lines;e++){let t=r.line(e);if(!ct(t.from,i)&&!at.test(t.text))for(ot.lastIndex=0;;){let e=ot.exec(t.text);if(!e)break;let r=t.from+e.index;if(ct(r,i))continue;let a=e[2]||e[1];n.push({from:r,to:r+e[0].length,label:a.toLowerCase()})}}let a=[];for(let e of n)t.has(e.label)||a.push(it.range(e.from,e.to));return a.sort((e,t)=>e.from-t.from),R.set(a)}var dt=F.define({create(e){return ut(e)},update(e,t){return t.docChanged?ut(t.state):e},provide:e=>z.decorations.from(e)}),ft=/^(\s*(?:[-*+]|\d+[.)]) (?:\[[ x]\] )?)/,pt=R.mark({class:`cm-del`}),mt=R.line({class:`cm-table-header`,attributes:{style:`--list-hang: 2ch`}}),ht=R.line({class:`cm-table-row`,attributes:{style:`--list-hang: 2ch`}});function gt(e){let t=0;for(let n of e)if(n===` `)t++;else if(n===` `)t+=4;else break;return t}function _t(e){if(e.doc.lines<2)return null;let t=e.doc.line(1);if(!T.test(t.text))return null;for(let n=2;n<=e.doc.lines;n++){let r=e.doc.line(n);if(T.test(r.text))return{from:t.from,to:r.to}}return null}function vt(e,t){let n=[],r=N(e),i=_t(e),a=e=>i!==null&&e>=i.from&&e<=i.to;for(let{from:i,to:o}of t)r.iterate({from:i,to:o,enter(t){if(!a(t.from)){if(t.name===`Strikethrough`){let e=t.from,r=t.to,i=t.node.cursor();if(i.firstChild())do i.name===`StrikethroughMark`&&(i.from===t.from?e=i.to:r=i.from);while(i.nextSibling());return e<r&&n.push(pt.range(e,r)),!1}if(t.name===`ListItem`){let r=e.doc.lineAt(t.from),i=ft.exec(r.text),a=i?i[1].length:2,o=R.line({class:`cm-list-item`,attributes:{style:`--list-hang: ${a}ch`}});n.push(o.range(r.from));return}if(t.name===`FencedCode`){let r=e.doc.lineAt(t.from),i=e.doc.lineAt(t.to);for(let t=r.number+1;t<i.number;t++){let r=e.doc.line(t),i=gt(r.text),a=R.line({class:`cm-fenced-code-line`,attributes:{style:`--line-indent: ${i}`}});n.push(a.range(r.from))}return!1}if(t.name===`TableHeader`){let r=e.doc.lineAt(t.from);return n.push(mt.range(r.from)),!1}if(t.name===`TableRow`){let r=e.doc.lineAt(t.from);return n.push(ht.range(r.from)),!1}if(t.name===`TableDelimiter`&&t.node.parent?.name===`Table`){let r=e.doc.lineAt(t.from);return n.push(ht.range(r.from)),!1}}}});return n.sort((e,t)=>e.from-t.from||e.value.startSide-t.value.startSide),R.set(n)}var yt=class{decorations;constructor(e){this.decorations=vt(e.state,e.visibleRanges)}update(e){(e.docChanged||e.viewportChanged||N(e.startState)!==N(e.state))&&(this.decorations=vt(e.view.state,e.view.visibleRanges))}},bt=A.fromClass(yt,{decorations:e=>e.decorations});function xt(){return[bt,dt]}var St=t(),Ct=P.define();function wt(e,t,n){let r=k(e.state.doc)[t.index];r&&u(n,()=>{e.dispatch({selection:I.cursor(r.from),effects:z.scrollIntoView(r.from,{y:`start`})}),e.focus()})}function Tt(e,t,n,r){requestAnimationFrame(()=>{if(!n())return;let i=e.state.doc,a=Math.min(t.offset,i.length);u(r,()=>{e.dispatch({selection:I.cursor(a),effects:z.scrollIntoView(a,{y:`center`})}),e.focus()})})}function Et(e,t,n){let r=e.state.doc,i=Math.min(Math.max(t.line,1),r.lines),a=r.line(i),o=Math.min(a.from+Math.max(0,t.column-1),a.to);u(n,()=>{e.dispatch({selection:I.cursor(o),effects:z.scrollIntoView(o,{y:`start`})}),e.focus()})}function Dt(e){let t=(0,Re.c)(50),{docName:s,ytext:u,provider:d,placeholder:f,isSourceModeActive:p}=e,h=(0,Q.useRef)(null),g=(0,Q.useRef)(null),[_,ee]=(0,Q.useState)(null);if(_)throw _;let{resolvedTheme:y}=v(),{merged:b}=oe(),x=(0,Q.useRef)(p),S=b?.editor?.wordWrap??!0,{data:C}=Oe(s),w;t[0]!==C?.effective||t[1]!==b?(w=C?.effective??(b?.contentRules?ae(b.contentRules):ie),t[0]=C?.effective,t[1]=b,t[2]=w):w=t[2];let T=w,E;t[3]===T?E=t[4]:(E=JSON.stringify(T),t[3]=T,t[4]=E);let D=E,O,k;t[5]===p?(O=t[6],k=t[7]):(O=()=>{x.current=p},k=[p],t[5]=p,t[6]=O,t[7]=k),(0,Q.useEffect)(O,k);let A=(0,Q.useRef)(null),j;t[8]!==s||t[9]!==T||t[10]!==f||t[11]!==d||t[12]!==y||t[13]!==S||t[14]!==u?(j=()=>{let e=h.current;if(!e)return;let t=d.configuration.name??``,p,_=kt;try{p=c({docName:t,container:e,sizeStats:{viewCount:0,bytes:u.length},factory:e=>{let o=null,c=a({ydoc:d.document,ytext:u,docName:t}),l=new M,p=new M,m=new M,h=new M,g=new z({state:ye.create({doc:u.toString(),extensions:[rt,Ge,Me({scrollToMatch:e=>n(t)?z.scrollIntoView(e,{y:`start`}):Ct.of(null)}),_e.of([be]),Le(u,d.awareness),_e.of(Ie),...ne({themeCompartment:l,resolvedTheme:y,ydoc:d.document,wordWrapCompartment:p,wordWrap:S,currentDocName:t}),xt(),Ve(t),ue(),h.of(et(T,s)),$e(s),c,z.updateListener.of(e=>{r(e)&&i(t)}),z.updateListener.of(e=>{!e.selectionSet&&!e.docChanged||(o!==null&&clearTimeout(o),o=setTimeout(()=>{o=null,me(t,`source`,de(e.view)),De(t,`source`,Ee(e.view,t))},120))}),m.of(ve(f??``)),z.theme({"&":{height:`100%`}}),z.scrollMargins.of(Ot)]}),parent:e});me(t,`source`,de(g)),De(t,`source`,Ee(g,t));let v=g.contentDOM;return v.addEventListener(`keydown`,_),v.addEventListener(`paste`,_),v.addEventListener(`drop`,_),v.addEventListener(`cut`,_),{view:g,ydoc:d.document,ytext:u,provider:d,themeCompartment:l,wordWrapCompartment:p,placeholderCompartment:m,lintCompartment:h}}}),A.current=p,g.current=p.view,l(s,p.view),he()&&p.view.focus()}catch(e){let t=e;console.error(`[SourceEditor] mountCmEditor failed`,t),A.current=null,g.current=null,ee(t instanceof Error?t:Error(String(t)))}return()=>{let e=A.current;e&&(m(e),o(s,e.view)),A.current=null,g.current=null}},t[8]=s,t[9]=T,t[10]=f,t[11]=d,t[12]=y,t[13]=S,t[14]=u,t[15]=j):j=t[15];let N;t[16]!==d||t[17]!==u?(N=[u,d],t[16]=d,t[17]=u,t[18]=N):N=t[18],(0,Q.useEffect)(j,N);let P,F;t[19]===s?(P=t[20],F=t[21]):(P=()=>{},F=[s],t[19]=s,t[20]=P,t[21]=F),(0,Q.useEffect)(P,F);let I,L;t[22]===y?(I=t[23],L=t[24]):(L=()=>{let e=A.current;e&&e.view.dispatch({effects:e.themeCompartment.reconfigure(y===`dark`?te:re)})},I=[y],t[22]=y,t[23]=I,t[24]=L),(0,Q.useEffect)(L,I);let R,B;t[25]===S?(R=t[26],B=t[27]):(R=()=>{let e=A.current;e&&e.view.dispatch({effects:e.wordWrapCompartment.reconfigure(S?z.lineWrapping:[])})},B=[S],t[25]=S,t[26]=R,t[27]=B),(0,Q.useEffect)(R,B);let V,H;t[28]===f?(V=t[29],H=t[30]):(V=()=>{let e=A.current;e&&e.view.dispatch({effects:e.placeholderCompartment.reconfigure(ve(f??``))})},H=[f],t[28]=f,t[29]=V,t[30]=H),(0,Q.useEffect)(V,H);let U;t[31]!==s||t[32]!==T?(U=()=>{let e=A.current;e&&e.view.dispatch({effects:e.lintCompartment.reconfigure(et(T,s))})},t[31]=s,t[32]=T,t[33]=U):U=t[33];let W;t[34]===D?W=t[35]:(W=[D],t[34]=D,t[35]=W),(0,Q.useEffect)(U,W);let G,K;t[36]!==s||t[37]!==p?(G=()=>{let e=function(e){let t=e.detail;if(!t||t.docName!==s||t.mode!==`source`||!p)return;let n=g.current;n&&(wt(n,t,s),ce(s))};return window.addEventListener(ge,e),()=>window.removeEventListener(ge,e)},K=[s,p],t[36]=s,t[37]=p,t[38]=G,t[39]=K):(G=t[38],K=t[39]),(0,Q.useEffect)(G,K);let q,J;t[40]!==s||t[41]!==p?(q=()=>{let e=function(e){let t=e.detail;if(!t||t.docName!==s||!p)return;let n=g.current;n&&(Et(n,t,s),ce(s))};return window.addEventListener(pe,e),()=>window.removeEventListener(pe,e)},J=[s,p],t[40]=s,t[41]=p,t[42]=q,t[43]=J):(q=t[42],J=t[43]),(0,Q.useEffect)(q,J);let Y,X;t[44]!==s||t[45]!==p||t[46]!==d?(Y=()=>{if(!p)return;let e=g.current;if(!e)return;let t=se(s);if(!t)return;if(t.kind!==`selection-offset`){le(s),t.kind===`outline`?wt(e,t.detail,s):t.kind===`lint`?Et(e,t.detail,s):t.kind===`raw-mdx`&&Tt(e,t.detail,()=>x.current,s);return}let n=!1,r=null;return queueMicrotask(()=>{if(n)return;let t=se(s);t?.kind===`selection-offset`&&(r=fe({view:e,docName:s,navigation:t,ydoc:d.document,transition:{from:`wysiwyg`,to:`source`}}),r&&le(s))}),()=>{n=!0,r?.cancel(`mode-flip`)}},X=[s,p,d],t[44]=s,t[45]=p,t[46]=d,t[47]=Y,t[48]=X):(Y=t[47],X=t[48]),(0,Q.useEffect)(Y,X);let Z;return t[49]===Symbol.for(`react.memo_cache_sentinel`)?(Z=(0,St.jsx)(`div`,{ref:h,className:`source-editor h-full pb-3`}),t[49]=Z):Z=t[49],Z}function Ot(){return{top:S()}}function kt(){return b()}export{Dt as SourceEditor,Tt as applyRawMdxNavigation};
|
|
@@ -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}from"./dist-PQ5KMVDh.js";import{t as i}from"./compiler-runtime-BfE3aGVn.js";import{t as a}from"./config-provider-DyH_5S1M.js";import{t as o}from"./use-installed-clis-vg6izNL9.js";import{t as s}from"./use-live-xterm-theme-DeqoKEyE.js";import{SessionsHost as c}from"./SessionsHost-BbabLBoa.js";var l=i(),u=e(n(),1),d=t();function f(e){let t=(0,l.c)(5),{bridge:n}=e,r=n.config.collabUrl?n.config.collabUrl:null,i;t[0]===n?i=t[1]:(i=(0,d.jsx)(p,{bridge:n}),t[0]=n,t[1]=i);let o;return t[2]!==r||t[3]!==i?(o=(0,d.jsx)(a,{collabUrl:r,children:i}),t[2]=r,t[3]=i,t[4]=o):o=t[4],o}function p(e){let t=(0,l.c)(9),{bridge:n}=e,{resolvedTheme:i}=r(),a=s(i),f=o(),[p,g]=(0,u.useState)(null),_;t[0]===a.background?_=t[1]:(_=(0,d.jsx)(`div`,{ref:g,className:`flex h-screen min-h-0 flex-col`,style:{backgroundColor:a.background}}),t[0]=a.background,t[1]=_);let v;t[2]!==n||t[3]!==p||t[4]!==f?(v=(0,d.jsx)(c,{bridge:n,surface:`terminal-window`,terminalCapable:!0,visible:!0,onVisibleChange:h,installedClis:f,container:p,isShowing:!0,onRequestEditorFocus:m}),t[2]=n,t[3]=p,t[4]=f,t[5]=v):v=t[5];let y;return t[6]!==_||t[7]!==v?(y=(0,d.jsxs)(d.Fragment,{children:[_,v]}),t[6]=_,t[7]=v,t[8]=y):y=t[8],y}function m(){}function h(e){e||window.close()}export{f as TerminalWindowApp};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-CfxA0Qtb.js";var t=e(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]);export{t};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{_r as n,br as r,gr as i,i as a,ir as o,tr as s}from"./DocumentContext-DKudm1-z.js";import{t as c}from"./react-f2sANaYj.js";import{n as l,r as u}from"./dist-Nvb76hAm.js";import{t as d}from"./compiler-runtime-BfE3aGVn.js";import{t as f}from"./utils-CPqDy6Hr.js";import{n as p,t as m}from"./clipboard-adapter-815RzzoI.js";import{C as h,S as g,_,a as v,h as y}from"./SkillInstallMenu-Bj4eanWC.js";import{t as b}from"./button-CA0dewJJ.js";import{t as x}from"./dist-mv8e6dBX.js";import{i as S,n as C,t as w}from"./tooltip-DPvMEqsq.js";import{a as T,c as E,i as D,n as O,o as k,s as A,t as j}from"./dialog-CkCtHEOY.js";import{t as M}from"./alert-dialog-v-lStrvw.js";import{t as N}from"./checkbox-C60ghXVs.js";import{a as P,m as F,r as I,t as L}from"./dropdown-menu-JsEh078s.js";import{t as R}from"./label-Bbz2bT-a.js";import{i as z,n as ee,o as te,s as ne,t as B}from"./select-Bs8KgWvR.js";import{n as re,t as V}from"./radio-group-BsZGGl8l.js";import{Ct as H,Gt as U,Ht as W,Jt as G,Ko as K,Ut as ie,Wt as ae,Yo as oe,fo as se,js as ce,nn as le}from"./dist-BTeDUJz7.js";import{n as q}from"./dist-DTX2HxC82.js";import{c as ue}from"./use-settings-route-9Zx6tEdn.js";import{t as J}from"./dist-BgXDUIPy.js";import{c as de,v as fe,x as Y}from"./documents-events-DhF_sptK.js";import{i as pe}from"./use-apply-config-theme-PILfflfB.js";import{t as me}from"./parse-api-error-Cmyw9Afr.js";import{n as he}from"./use-workspace-DHq4JpK0.js";import{t as X}from"./createLucideIcon-CfxA0Qtb.js";import{h as ge,n as _e,r as ve,t as ye}from"./EnableSyncConfirmDialog-BZuygRVh.js";import{c as be,s as xe,u as Se}from"./Mermaid-C9X7cjZ1.js";import{t as Ce}from"./arrow-up-right-BATFT-Sr.js";import{t as we}from"./check-_e5AYsE9.js";import{s as Te}from"./prop-types-BGEVLmnR.js";import{n as Ee,t as De}from"./terminal-tB03Ykfq.js";import{a as Oe,r as ke,t as Ae}from"./folder-config-api-CBCo8vGy.js";import{t as je}from"./spinner-OTMpJ3P-.js";import{t as Me}from"./refresh-cw-BaBMjcrv.js";import{t as Ne}from"./trash-2-BvCgdeps.js";import{t as Pe}from"./triangle-alert-BMtjvBBD.js";import{t as Fe}from"./x-BAYve4SL.js";import{d as Ie,f as Le,n as Re,u as ze,v as Be}from"./doc-paths-DRMElswC.js";import"./config-provider-DyH_5S1M.js";import{S as Ve,h as He,i as Ue,p as We,x as Ge}from"./skills-api-BHMzgYxx.js";import{p as Ke,r as qe,t as Je}from"./skill-scope-D3YD_IZ5.js";import{t as Ye}from"./input-BZhIrrdB.js";import{a as Xe,i as Ze,r as Qe,t as $e}from"./popover-BlSDN3zW.js";import{t as et}from"./external-link-D2rJDkPo.js";import{t as tt}from"./badge-zJWUwhkd.js";import{a as nt,i as rt,n as it,o as at,r as ot,s as st,t as ct}from"./field-Ml4KaP--.js";import{t as lt}from"./use-skills-CUyxM_-s.js";import{t as ut}from"./textarea-BtqZ3yY1.js";import{t as dt}from"./terminal-command-events-ponJwwNv.js";var ft=X(`cloud-alert`,[[`path`,{d:`M12 12v4`,key:`tww15h`}],[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.128 16.949A7 7 0 1 1 15.71 8h1.79a1 1 0 0 1 0 9h-1.642`,key:`1namsd`}]]),pt=X(`cloud-off`,[[`path`,{d:`M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057`,key:`1uxyv8`}],[`path`,{d:`M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78`,key:`99tcn7`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),mt=X(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),ht=X(`log-in`,[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]),gt=X(`move-up-right`,[[`path`,{d:`M13 5H19V11`,key:`1n1gyv`}],[`path`,{d:`M19 5L5 19`,key:`72u4yj`}]]),_t=X(`user-cog`,[[`path`,{d:`M10 15H6a4 4 0 0 0-4 4v2`,key:`1nfge6`}],[`path`,{d:`m14.305 16.53.923-.382`,key:`1itpsq`}],[`path`,{d:`m15.228 13.852-.923-.383`,key:`eplpkm`}],[`path`,{d:`m16.852 12.228-.383-.923`,key:`13v3q0`}],[`path`,{d:`m16.852 17.772-.383.924`,key:`1i8mnm`}],[`path`,{d:`m19.148 12.228.383-.923`,key:`1q8j1v`}],[`path`,{d:`m19.53 18.696-.382-.924`,key:`vk1qj3`}],[`path`,{d:`m20.772 13.852.924-.383`,key:`n880s0`}],[`path`,{d:`m20.772 16.148.924.383`,key:`1g6xey`}],[`circle`,{cx:`18`,cy:`15`,r:`3`,key:`gjjjvw`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]);function vt(e){return e===`eperm`?J._({id:`XuQzrk`}):J._({id:`BUyQnq`})}async function yt(e){let t=await e.restartServer(e.config.projectPath);return t.ok?{ok:!0}:{ok:!1,message:vt(t.reason)}}var Z=d(),Q=e(c(),1);function bt(e){let t=(0,Z.c)(12),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={status:`idle`},t[0]=n):n=t[0];let[r,i]=(0,Q.useState)(n),[a,o]=(0,Q.useState)(0),s,c;t[1]===e?(s=t[2],c=t[3]):(s=()=>{if(e!==null)return Y(()=>{o(wt)})},c=[e],t[1]=e,t[2]=s,t[3]=c),(0,Q.useEffect)(s,c);let l;t[4]===e?l=t[5]:(l=()=>{if(e===null){i({status:`idle`});return}let t=!1;i({status:`loading`});let n=e?`?path=${encodeURIComponent(e)}`:``;return fetch(`/api/folder-config${n}`).then(St).then(e=>{if(!t){if(!e||typeof e!=`object`||!e.folder){i({status:`error`,message:J._({id:`_ci9Bj`})});return}i({status:`ready`,data:{folder:e.folder,frontmatterLocal:e.frontmatter_local??null}})}}).catch(e=>{t||i({status:`error`,message:e instanceof Error?e.message:String(e)})}),()=>{t=!0}},t[4]=e,t[5]=l);let u;t[6]!==e||t[7]!==a?(u=[e,a],t[6]=e,t[7]=a,t[8]=u):u=t[8],(0,Q.useEffect)(l,u);let d;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>o(xt),t[9]=d):d=t[9];let f;return t[10]===r?f=t[11]:(f={state:r,refresh:d},t[10]=r,t[11]=f),f}function xt(e){return e+1}async function St(e){if(!e.ok){let t=await e.json().catch(Ct);throw Error(me(t)??`HTTP ${e.status}`)}return e.json()}function Ct(){return null}function wt(e){return e+1}function Tt(){let e=(0,Z.c)(6),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={status:`idle`},e[0]=t):t=e[0];let[n,r]=(0,Q.useState)(t),[i,a]=(0,Q.useState)(0),o,s;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>Y(()=>{a(Ot)}),s=[],e[1]=o,e[2]=s):(o=e[1],s=e[2]),(0,Q.useEffect)(o,s);let c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{let e=!1;return r({status:`loading`}),fetch(`/api/templates`).then(Et).then(t=>{if(e)return;let n=le.safeParse(t);if(!n.success){console.error(`[ok-templates] /api/templates response failed schema validation:`,n.error.issues),r({status:`error`,message:J._({id:`RLNIgv`})});return}r({status:`ready`,data:n.data.templates})}).catch(t=>{e||r({status:`error`,message:t instanceof Error?t.message:String(t)})}),()=>{e=!0}},e[3]=c):c=e[3];let l;return e[4]===i?l=e[5]:(l=[i],e[4]=i,e[5]=l),(0,Q.useEffect)(c,l),n}async function Et(e){if(!e.ok){let t=await e.json().catch(Dt);throw Error(me(t)??`HTTP ${e.status}`)}return e.json()}function Dt(){return null}function Ot(e){return e+1}async function kt(){try{let e=await fetch(`/api/semantic-status`);return e.ok?await e.json():(console.debug(`[semantic-status] probe returned`,e.status),null)}catch(e){return console.debug(`[semantic-status] probe failed`,e),null}}function At(e){let t=(0,Z.c)(16),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let r=n.enabled??!0,[i,a]=(0,Q.useState)(null),o;t[2]===r?o=t[3]:(o=function(){r&&kt().then(e=>{e&&a(e)})},t[2]=r,t[3]=o);let s=o,c;t[4]===s?c=t[5]:(c=()=>{s()},t[4]=s,t[5]=c);let l;t[6]===r?l=t[7]:(l=[r],t[6]=r,t[7]=l),(0,Q.useEffect)(c,l);let u;t[8]!==r||t[9]!==s?(u=()=>{if(r)return fe(e=>{e.includes(`files`)&&s()})},t[8]=r,t[9]=s,t[10]=u):u=t[10];let d;t[11]===r?d=t[12]:(d=[r],t[11]=r,t[12]=d),(0,Q.useEffect)(u,d);let f;return t[13]!==s||t[14]!==i?(f={status:i,refresh:s},t[13]=s,t[14]=i,t[15]=f):f=t[15],f}var $=t(),jt=`github.com`,Mt=new Map;async function Nt(e){try{let t=await e.json(),n=H.safeParse(t);if(n.success)return n.data.title}catch{}}async function Pt(e,t){return fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t??{})})}async function Ft(e){let t=e?.host??jt,n=await Pt(`/api/local-op/auth/status`,e);if(!n.ok)return{authenticated:!1,host:t,error:await Nt(n)};let r=await n.json(),i=typeof r.host==`string`?r.host:t,a=r.ghAvailable===!0;if(r.authenticated===!0&&typeof r.login==`string`){let e=r.tier===`A`||r.tier===`B`||r.tier===`C`?r.tier:void 0;return{authenticated:!0,host:i,login:r.login,tier:e,name:typeof r.name==`string`?r.name:void 0,email:typeof r.email==`string`?r.email:void 0,ghAvailable:a}}return{authenticated:!1,host:i,error:typeof r.error==`string`?r.error:void 0,ghAvailable:a}}function It(e){let t=e?.host??jt,n=Mt.get(t);if(n)return n;let r=Ft(e).finally(()=>{Mt.delete(t)});return Mt.set(t,r),r}function Lt(e){let t=e.split(`
|
|
2
|
-
`);for(let e=t.length-1;e>=0;e--){let n=t[e]?.trim();if(n)try{let e=JSON.parse(n);if(e&&typeof e==`object`)return e}catch{}}return null}function Rt(){return{status:It,async repos(e){let t=e?.host??`github.com`,n=await Pt(`/api/local-op/auth/repos`,e);if(!n.ok)return{ok:!1,error:await Nt(n)??J._({id:`sGZLfB`})};let r=Lt(await n.text());if(r&&r.type===`error`&&r.problem&&typeof r.problem==`object`){let e=r.problem;return{ok:!1,error:e.detail||e.title||J._({id:`sGZLfB`})}}if(!r||!Array.isArray(r.repos))return{ok:!1,error:J._({id:`sGZLfB`})};let i=[];for(let e of r.repos){let t=e;typeof t?.full_name==`string`&&typeof t.clone_url==`string`&&i.push({full_name:t.full_name,clone_url:t.clone_url,private:t.private===!0})}return{ok:!0,host:typeof r.host==`string`?r.host:t,repos:i}},async signout(e){let t=await Pt(`/api/local-op/auth/signout`,e);return t.ok?{ok:!0}:{ok:!1,error:await Nt(t)}}}}function zt(e){return{status:t=>e.localOp.authStatus(t),repos:t=>e.localOp.authRepos(t)}}async function Bt(e,t){let n=e.getReader(),r=new TextDecoder,i=``;for(;;){let{done:e,value:a}=await n.read();if(e)return i+=r.decode(),!!(i.trim()&&t(i)===`terminal`);i+=r.decode(a,{stream:!0});let o=i.split(`
|
|
3
|
-
`);i=o.pop()??``;for(let e of o)if(e.trim()&&t(e)===`terminal`)return!0}}function Vt(e){let t=[],n=[],r=new AbortController,i=!1,a=()=>{for(let e of n.splice(0))e(null)};return e(e=>{i||(n.length>0?n.shift()?.(e):t.push(e),(e.type===`complete`||e.type===`error`)&&(i=!0,r.abort(),a()))},r.signal),{events:{[Symbol.asyncIterator](){return{async next(){if(t.length>0){let e=t.shift();return e===void 0?{value:void 0,done:!0}:{value:e,done:!1}}return i?{value:void 0,done:!0}:new Promise(e=>{n.push(t=>{e(t===null?{value:void 0,done:!0}:{value:t,done:!1})})})}}}},cancel:()=>{i||(i=!0,r.abort(),a())}}}var Ht=2e3,Ut=1e4;function Wt(e,t){return new Promise(n=>{let r=setTimeout(()=>{t.removeEventListener(`abort`,i),n()},e);function i(){clearTimeout(r),n()}t.addEventListener(`abort`,i,{once:!0})})}function Gt(e){fetch(`/api/local-op/auth/cancel`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({channel:e})}).catch(e=>{console.warn(`[auth-transport] Cancel request failed (best-effort):`,e instanceof Error?e.message:e)})}async function Kt(e,t,n,r){let i=Rt(),a=Ht;for(;!t.aborted&&Date.now()<n;){try{let n=await i.status(r?{host:r}:void 0);if(t.aborted)return;if(n.authenticated){e({type:`complete`,host:n.host,login:n.login,name:n.name,email:n.email});return}}catch(e){console.warn(`[auth-transport] Recovery probe failed:`,e instanceof Error?e.message:e)}await Wt(a,t),a=Math.min(a*1.5,Ut)}t.aborted||e({type:`error`,message:J._({id:`ve8vEM`})})}function qt(e,t,n){let r=!1,i=Vt((n,i)=>{let a=e=>{(e.type===`complete`||e.type===`error`)&&(r=!0),n(e)};(async()=>{let n=null;try{let r=await fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t),signal:i});if(!r.ok){let e=J._({id:`LnVIW4`});try{let t=H.safeParse(await r.json());t.success&&(e=t.data.title)}catch{}a({type:`error`,message:e});return}if(!r.body){a({type:`error`,message:J._({id:`LnVIW4`})});return}if(await Bt(r.body,e=>{let t;try{t=JSON.parse(e)}catch{return console.warn(`[auth-transport] Dropped unparseable NDJSON line:`,e.slice(0,100)),`continue`}if(t&&typeof t==`object`&&t.type===`error`&&`problem`in t){let e=t.problem;return a({type:`error`,message:e?.detail||e?.title||J._({id:`29VNqC`})}),`terminal`}if(t.type===`ping`)return`continue`;let r=t;return r.type===`verification`&&(n=Date.now()+r.expires_in*1e3),a(r),r.type===`complete`||r.type===`error`?`terminal`:`continue`})||i.aborted)return;if(n===null){a({type:`error`,message:J._({id:`DskIkK`})});return}await Kt(a,i,n,t.host)}catch(e){if(e instanceof Error&&e.name===`AbortError`)return;if(n!==null){await Kt(a,i,n,t.host);return}a({type:`error`,message:J._({id:`Q5fqMz`})})}})()});return{events:i.events,cancel:()=>{r||Gt(n),i.cancel()}}}function Jt(){return{start(){return qt(`/api/local-op/auth/login`,{json:!0},`login`)},ghLogin(e){return qt(`/api/local-op/auth/gh-login`,{host:e,json:!0},`gh-login`)},async pat(e,t){try{let n=await fetch(`/api/local-op/auth/pat`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({host:e,token:t})});if(n.ok){let e=await n.json();return{ok:!0,login:typeof e.login==`string`?e.login:``}}let r=J._({id:`sNeKjP`});try{let e=H.safeParse(await n.json());e.success&&(r=e.data.detail||e.data.title)}catch{}return{ok:!1,error:r}}catch{return{ok:!1,error:J._({id:`Q5fqMz`})}}}}}function Yt(e){return{start(){return e.localOp.auth.start()}}}async function Xt(e){try{await navigator.clipboard.writeText(e)}catch{}}function Zt(e){let t=(0,Z.c)(25),{onSuccess:r,startFlow:i}=e,{_:a}=u(),[o,s]=(0,Q.useState)(null),[c,d]=(0,Q.useState)(`https://github.com/login/device`),[f,p]=(0,Q.useState)(!1),[m,h]=(0,Q.useState)(null),[g,_]=(0,Q.useState)(null),[v,y]=(0,Q.useState)(0),x=(0,Q.useRef)(null),S=(0,Q.useRef)(null),C;t[0]!==a||t[1]!==r||t[2]!==i?(C=async function(){h(null);try{let e=i();x.current=e.cancel;let t=e.events[Symbol.asyncIterator](),n=!1,o=await t.next();for(;!o.done;){let e=o.value;if(e.type===`verification`)s(e.user_code),d(e.verification_uri),_(Date.now()+e.expires_in*1e3),y(e.expires_in*1e3),Xt(e.user_code).then(()=>{p(!0),setTimeout(()=>p(!1),2e3)});else if(e.type===`complete`){n=!0,r({login:e.login,name:e.name,email:e.email,avatarUrl:e.avatarUrl});break}else if(e.type===`error`){n=!0,h(e.message);break}o=await t.next()}n||h(a({id:`DskIkK`}))}catch(e){let t=e;t instanceof Error&&t.name!==`AbortError`&&h(a({id:`Q5fqMz`}))}},t[0]=a,t[1]=r,t[2]=i,t[3]=C):C=t[3];let w=C,T;t[4]===w?T=t[5]:(T=()=>{let e=!1;return queueMicrotask(()=>{e||w()}),()=>{e=!0,x.current?.(),x.current=null,S.current&&clearInterval(S.current)}},t[4]=w,t[5]=T);let E;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(E=[],t[6]=E):E=t[6],(0,Q.useEffect)(T,E);let D,O;t[7]!==a||t[8]!==g?(D=()=>{if(g!==null)return S.current=setInterval(()=>{let e=g-Date.now();e<=0?(y(0),S.current&&clearInterval(S.current),h(a({id:`ve8vEM`}))):y(e)},1e3),()=>{S.current&&clearInterval(S.current)}},O=[g,a],t[7]=a,t[8]=g,t[9]=D,t[10]=O):(D=t[9],O=t[10]),(0,Q.useEffect)(D,O);let k=Math.floor(v/6e4),A=Math.floor(v%6e4/1e3),j;t[11]===A?j=t[12]:(j=A.toString().padStart(2,`0`),t[11]=A,t[12]=j);let M=`${k}:${j}`,N;t[13]!==a||t[14]!==f||t[15]!==m||t[16]!==M||t[17]!==o||t[18]!==c?(N=o?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(l,{id:`eVPynQ`,values:{verificationUri:c},components:{0:(0,$.jsx)(`a`,{href:c,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>et(e,c),onAuxClick:e=>et(e,c),className:`inline-flex items-center gap-0.5 text-foreground hover:text-primary hover:underline`}),1:(0,$.jsx)(`span`,{}),2:(0,$.jsx)(Ce,{className:`inline size-3.5`,"aria-hidden":!0})}})}),(0,$.jsxs)(b,{type:`button`,variant:`outline`,"aria-label":a({id:`nCzR-G`,values:{userCode:o}}),onClick:()=>void Xt(o).then(()=>{p(!0),setTimeout(()=>p(!1),2e3)}),className:`relative h-auto w-full justify-center rounded-md bg-muted px-12 py-3 hover:bg-muted/80`,children:[(0,$.jsx)(`code`,{className:`font-mono text-2xl font-bold tracking-widest`,children:o}),(0,$.jsx)(`span`,{className:`absolute right-3 text-muted-foreground`,"aria-hidden":`true`,children:f?(0,$.jsx)(we,{className:`size-4`}):(0,$.jsx)(n,{className:`size-4`})})]}),(0,$.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`sr-only`,children:f?(0,$.jsx)(l,{id:`80c4-P`}):null}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between text-xs text-muted-foreground`,children:[(0,$.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,$.jsx)(`span`,{className:`size-1.5 rounded-full bg-amber-500 animate-pulse`}),(0,$.jsx)(l,{id:`5y_9lO`})]}),(0,$.jsx)(`span`,{children:(0,$.jsx)(l,{id:`gYz2ep`,values:{timeLabel:M}})})]})]}):(0,$.jsx)(`div`,{className:`flex items-center justify-center py-6 text-sm text-muted-foreground`,children:m?null:(0,$.jsx)(l,{id:`aWlJai`})}),t[13]=a,t[14]=f,t[15]=m,t[16]=M,t[17]=o,t[18]=c,t[19]=N):N=t[19];let P;t[20]===m?P=t[21]:(P=m&&(0,$.jsx)(`p`,{className:`text-1sm text-destructive`,children:m}),t[20]=m,t[21]=P);let F;return t[22]!==N||t[23]!==P?(F=(0,$.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[N,P]}),t[22]=N,t[23]=P,t[24]=F):F=t[24],F}function Qt(e){let t=(0,Z.c)(30),{login:n,name:r,onNameChange:i,email:a,onEmailChange:o}=e,{_:s}=u(),c;t[0]===n?c=t[1]:(c=(0,$.jsx)(`p`,{className:`text-sm font-medium`,children:(0,$.jsx)(l,{id:`E_tNGD`,values:{login:n}})}),t[0]=n,t[1]=c);let d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,$.jsx)(l,{id:`gp3I7-`})}),t[2]=d):d=t[2];let f;t[3]===s?f=t[4]:(f=s({id:`6YtxFj`}),t[3]=s,t[4]=f);let p;t[5]!==s||t[6]!==n?(p=s({id:`J2Mv98`,values:{login:n}}),t[5]=s,t[6]=n,t[7]=p):p=t[7];let m;t[8]===i?m=t[9]:(m=e=>i(e.target.value),t[8]=i,t[9]=m);let h;t[10]!==r||t[11]!==f||t[12]!==p||t[13]!==m?(h=(0,$.jsx)(Ye,{"aria-label":f,placeholder:p,value:r,onChange:m}),t[10]=r,t[11]=f,t[12]=p,t[13]=m,t[14]=h):h=t[14];let g;t[15]===s?g=t[16]:(g=s({id:`O3oNi5`}),t[15]=s,t[16]=g);let _;t[17]===s?_=t[18]:(_=s({id:`O3oNi5`}),t[17]=s,t[18]=_);let v;t[19]===o?v=t[20]:(v=e=>o(e.target.value),t[19]=o,t[20]=v);let y;t[21]!==a||t[22]!==g||t[23]!==_||t[24]!==v?(y=(0,$.jsx)(Ye,{type:`email`,"aria-label":g,placeholder:_,value:a,onChange:v}),t[21]=a,t[22]=g,t[23]=_,t[24]=v,t[25]=y):y=t[25];let b;return t[26]!==c||t[27]!==y||t[28]!==h?(b=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[c,d,h,y]}),t[26]=c,t[27]=y,t[28]=h,t[29]=b):b=t[29],b}function $t(e){let t=(0,Z.c)(37),{host:n,token:r,onTokenChange:i,error:a,onSubmit:o,showGhOption:s,onGhSignIn:c}=e,{_:d}=u(),f=`https://${n}/settings/tokens/new?scopes=repo,read:user&description=OpenKnowledge`,p;t[0]!==n||t[1]!==c||t[2]!==s?(p=s?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(b,{type:`button`,onClick:c,children:(0,$.jsx)(l,{id:`_SDGzH`})}),(0,$.jsxs)(`div`,{className:`flex items-center gap-3 text-xs text-muted-foreground`,children:[(0,$.jsx)(`span`,{className:`h-px flex-1 bg-border`}),(0,$.jsx)(l,{id:`8L0EPw`}),(0,$.jsx)(`span`,{className:`h-px flex-1 bg-border`})]})]}):(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(l,{id:`8k6INX`,values:{host:n},components:{0:(0,$.jsx)(`span`,{className:`font-medium text-foreground`})}})}),t[0]=n,t[1]=c,t[2]=s,t[3]=p):p=t[3];let m,h;t[4]===f?(m=t[5],h=t[6]):(m=e=>et(e,f),h=e=>et(e,f),t[4]=f,t[5]=m,t[6]=h);let g;t[7]===n?g=t[8]:(g=(0,$.jsx)(l,{id:`6hYjww`,values:{host:n}}),t[7]=n,t[8]=g);let _;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsx)(Ce,{className:`inline size-3.5`,"aria-hidden":!0}),t[9]=_):_=t[9];let v;t[10]!==f||t[11]!==m||t[12]!==h||t[13]!==g?(v=(0,$.jsxs)(`a`,{href:f,target:`_blank`,rel:`noopener noreferrer`,onClick:m,onAuxClick:h,className:`inline-flex w-fit items-center gap-0.5 text-sm text-foreground hover:text-primary hover:underline`,children:[g,_]}),t[10]=f,t[11]=m,t[12]=h,t[13]=g,t[14]=v):v=t[14];let y;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,$.jsx)(l,{id:`Xg-Ntj`})}),t[15]=y):y=t[15];let x;t[16]===d?x=t[17]:(x=d({id:`p2LEhJ`}),t[16]=d,t[17]=x);let S;t[18]===i?S=t[19]:(S=e=>i(e.target.value),t[18]=i,t[19]=S);let C;t[20]===o?C=t[21]:(C=e=>{e.key===`Enter`&&o()},t[20]=o,t[21]=C);let w;t[22]!==C||t[23]!==x||t[24]!==S||t[25]!==r?(w=(0,$.jsx)(Ye,{type:`password`,"aria-label":x,placeholder:`ghp_`,value:r,onChange:S,onKeyDown:C}),t[22]=C,t[23]=x,t[24]=S,t[25]=r,t[26]=w):w=t[26];let T;t[27]===a?T=t[28]:(T=a&&(0,$.jsx)(`p`,{className:`text-1sm text-destructive`,children:a}),t[27]=a,t[28]=T);let E;t[29]===s?E=t[30]:(E=!s&&(0,$.jsxs)(`div`,{className:`mt-1 rounded-md border border-border/60 bg-muted/40 p-3 text-sm text-muted-foreground`,children:[(0,$.jsx)(`p`,{children:(0,$.jsx)(l,{id:`qX-ABr`})}),(0,$.jsxs)(`ol`,{className:`mt-1.5 list-decimal space-y-0.5 pl-5`,children:[(0,$.jsx)(`li`,{children:(0,$.jsx)(l,{id:`jxtXZI`})}),(0,$.jsx)(`li`,{children:(0,$.jsx)(l,{id:`9Vh9Jf`})})]})]}),t[29]=s,t[30]=E);let D;return t[31]!==p||t[32]!==w||t[33]!==T||t[34]!==E||t[35]!==v?(D=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[p,v,y,w,T,E]}),t[31]=p,t[32]=w,t[33]=T,t[34]=E,t[35]=v,t[36]=D):D=t[36],D}var en=1e4;function tn(e){let t=(0,Z.c)(92),{open:n,onOpenChange:r,onSuccess:i,identityPrompt:a,reauth:o,transport:s,queryTransport:c,host:d,ghAvailable:f}=e,{_:p}=u(),m;t[0]===s?m=t[1]:(m=s??Jt(),t[0]=s,t[1]=m);let h=m,g;t[2]===c?g=t[3]:(g=c??Rt(),t[2]=c,t[3]=g);let _=g,[v,y]=(0,Q.useState)(`auth`),[x,S]=(0,Q.useState)(null),[C,w]=(0,Q.useState)(``),[T,M]=(0,Q.useState)(``),[N,P]=(0,Q.useState)(``),[F,I]=(0,Q.useState)(null),[L,R]=(0,Q.useState)(!1),[z,ee]=(0,Q.useState)(void 0),[te,ne]=(0,Q.useState)(void 0),B=d??z,re=!!B&&B!==`github.com`&&!!(f??te)&&typeof h.ghLogin==`function`,V=!a&&d===void 0,H,U;t[4]!==d||t[5]!==a||t[6]!==V||t[7]!==n?(H=()=>{n&&(S(null),w(``),M(``),P(``),I(null),R(!1),ee(void 0),ne(void 0),y(a||V?`checking`:d&&d!==`github.com`?`pat`:`auth`))},U=[n,a,d,V],t[4]=d,t[5]=a,t[6]=V,t[7]=n,t[8]=H,t[9]=U):(H=t[8],U=t[9]),(0,Q.useLayoutEffect)(H,U);let W;t[10]!==a||t[11]!==n||t[12]!==_?(W=()=>{if(!n||!a)return;let e=!1,t=t=>{e||(e=!0,y(t))},r=setTimeout(()=>t(`auth`),en);return _.status().then(n=>{e||(n.authenticated?(S({login:n.login,name:n.name,email:n.email}),w(n.name??``),M(n.email??``),t(`identity`)):t(`auth`))}).catch(()=>{t(`auth`)}),()=>{e=!0,clearTimeout(r)}},t[10]=a,t[11]=n,t[12]=_,t[13]=W):W=t[13];let G;t[14]!==a||t[15]!==n?(G=[n,a],t[14]=a,t[15]=n,t[16]=G):G=t[16],(0,Q.useEffect)(W,G);let K;t[17]!==V||t[18]!==n||t[19]!==_?(K=()=>{if(!n||!V)return;let e=!1,t=t=>{e||(e=!0,y(t))},r=setTimeout(()=>t(`auth`),en);return _.status().then(n=>{if(e)return;let r=!!n.host&&n.host!==`github.com`;ee(n.host),ne(n.ghAvailable),t(r?`pat`:`auth`)}).catch(()=>{t(`auth`)}),()=>{e=!0,clearTimeout(r)}},t[17]=V,t[18]=n,t[19]=_,t[20]=K):K=t[20];let ie;t[21]!==V||t[22]!==n?(ie=[n,V],t[21]=V,t[22]=n,t[23]=ie):ie=t[23],(0,Q.useEffect)(K,ie);let ae;t[24]!==p||t[25]!==a||t[26]!==r||t[27]!==i?(ae=function(e){if(S(e),a)w(e.name??``),M(e.email??``),y(`identity`);else{y(`done`),i?.(e),r(!1);let t=e.login;q.success(p(t?{id:`E_tNGD`,values:{login:t}}:{id:`cgl-gn`}))}},t[24]=p,t[25]=a,t[26]=r,t[27]=i,t[28]=ae):ae=t[28];let oe=ae,se;t[29]!==p||t[30]!==B||t[31]!==oe||t[32]!==L||t[33]!==N||t[34]!==h?(se=async function(){let e=N.trim();if(!e||!B||L)return;if(!h.pat){I(p({id:`iMYFJM`}));return}R(!0),I(null);let t=await h.pat(B,e);R(!1),t.ok?oe({login:t.login??``}):I(t.error??p({id:`sNeKjP`}))},t[29]=p,t[30]=B,t[31]=oe,t[32]=L,t[33]=N,t[34]=h,t[35]=se):se=t[35];let ce=se,le;t[36]!==p||t[37]!==x||t[38]!==r||t[39]!==i?(le=function(e,t){fetch(`/api/local-op/auth/set-identity`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({name:e,email:t})}).catch(nn);let n={...x??{login:``},name:e,email:t};y(`done`),i?.(n),r(!1);let a=n.login;q.success(p(a?{id:`E_tNGD`,values:{login:a}}:{id:`cgl-gn`}))},t[36]=p,t[37]=x,t[38]=r,t[39]=i,t[40]=le):le=t[40];let ue=le,J;t[41]!==p||t[42]!==x||t[43]!==r||t[44]!==i?(J=function(){if(!x)return;y(`done`),i?.(x),r(!1);let e=x.login;q.success(p(e?{id:`E_tNGD`,values:{login:e}}:{id:`cgl-gn`}))},t[41]=p,t[42]=x,t[43]=r,t[44]=i,t[45]=J):J=t[45];let de=J,fe;t[46]===r?fe=t[47]:(fe=function(){r(!1)},t[46]=r,t[47]=fe);let Y=fe,pe;t[48]!==a||t[49]!==o||t[50]!==v?(pe=(0,$.jsx)(A,{children:(0,$.jsx)(E,{children:o&&(v===`pat`||v===`gh-device`)?(0,$.jsx)(l,{id:`DUWgfT`}):o?(0,$.jsx)(l,{id:`X8kjQX`}):v===`pat`||v===`gh-device`?(0,$.jsx)(l,{id:`tzZ6ha`}):a&&v!==`auth`?(0,$.jsx)(l,{id:`29XZXN`}):(0,$.jsx)(l,{id:`3jod3l`})})}),t[48]=a,t[49]=o,t[50]=v,t[51]=pe):pe=t[51];let me;t[52]===v?me=t[53]:(me=v===`checking`&&(0,$.jsx)(O,{children:(0,$.jsx)(`div`,{className:`flex items-center justify-center py-6 text-sm text-muted-foreground`,children:(0,$.jsx)(l,{id:`gBbxn_`})})}),t[52]=v,t[53]=me);let he;t[54]!==oe||t[55]!==Y||t[56]!==h||t[57]!==v?(he=v===`auth`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(O,{children:(0,$.jsx)(Zt,{onSuccess:oe,startFlow:()=>h.start()})}),(0,$.jsx)(k,{children:(0,$.jsx)(b,{variant:`outline`,className:`font-mono uppercase`,onClick:Y,children:(0,$.jsx)(l,{id:`dEgA5A`})})})]}),t[54]=oe,t[55]=Y,t[56]=h,t[57]=v,t[58]=he):he=t[58];let X;t[59]!==re||t[60]!==B||t[61]!==Y||t[62]!==ce||t[63]!==F||t[64]!==L||t[65]!==N||t[66]!==v?(X=v===`pat`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(O,{children:(0,$.jsx)($t,{host:B??``,token:N,onTokenChange:P,error:F,onSubmit:ce,showGhOption:re,onGhSignIn:()=>y(`gh-device`)})}),(0,$.jsxs)(k,{children:[(0,$.jsx)(b,{variant:`outline`,className:`font-mono uppercase`,onClick:Y,children:(0,$.jsx)(l,{id:`dEgA5A`})}),(0,$.jsx)(b,{onClick:ce,disabled:!N.trim()||L,children:L?(0,$.jsx)(l,{id:`9zb2WA`}):(0,$.jsx)(l,{id:`iSLIjg`})})]})]}),t[59]=re,t[60]=B,t[61]=Y,t[62]=ce,t[63]=F,t[64]=L,t[65]=N,t[66]=v,t[67]=X):X=t[67];let ge;t[68]!==B||t[69]!==oe||t[70]!==Y||t[71]!==h||t[72]!==v?(ge=v===`gh-device`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(O,{children:(0,$.jsx)(Zt,{onSuccess:oe,startFlow:()=>h.ghLogin?.(B??``)??h.start()})}),(0,$.jsxs)(k,{children:[(0,$.jsx)(b,{variant:`ghost`,onClick:()=>y(`pat`),children:(0,$.jsx)(l,{id:`hLKfZe`})}),(0,$.jsx)(b,{variant:`outline`,className:`font-mono uppercase`,onClick:Y,children:(0,$.jsx)(l,{id:`dEgA5A`})})]})]}),t[68]=B,t[69]=oe,t[70]=Y,t[71]=h,t[72]=v,t[73]=ge):ge=t[73];let _e;t[74]!==x||t[75]!==ue||t[76]!==de||t[77]!==T||t[78]!==C||t[79]!==v?(_e=v===`identity`&&x&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(O,{children:(0,$.jsx)(Qt,{login:x.login,name:C,onNameChange:w,email:T,onEmailChange:M})}),(0,$.jsxs)(k,{children:[(0,$.jsx)(b,{variant:`ghost`,onClick:de,children:(0,$.jsx)(l,{id:`6Uau97`})}),(0,$.jsx)(b,{onClick:()=>ue(C.trim(),T.trim()),disabled:!C.trim()||!T.trim(),children:(0,$.jsx)(l,{id:`tfDRzk`})})]})]}),t[74]=x,t[75]=ue,t[76]=de,t[77]=T,t[78]=C,t[79]=v,t[80]=_e):_e=t[80];let ve;t[81]!==pe||t[82]!==me||t[83]!==he||t[84]!==X||t[85]!==ge||t[86]!==_e?(ve=(0,$.jsxs)(D,{className:`sm:max-w-md`,children:[pe,me,he,X,ge,_e]}),t[81]=pe,t[82]=me,t[83]=he,t[84]=X,t[85]=ge,t[86]=_e,t[87]=ve):ve=t[87];let ye;return t[88]!==r||t[89]!==n||t[90]!==ve?(ye=(0,$.jsx)(j,{open:n,onOpenChange:r,children:ve}),t[88]=r,t[89]=n,t[90]=ve,t[91]=ye):ye=t[91],ye}function nn(){}function rn(e){let t=(0,Z.c)(16),{value:n,onChange:r,disabled:i,placeholder:a,rows:o}=e,s=i===void 0?!1:i,c=o===void 0?12:o,u=(0,Q.useId)(),d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)(l,{id:`3o3tur`}),t[0]=d):d=t[0];let f;t[1]===u?f=t[2]:(f=(0,$.jsx)(at,{htmlFor:u,children:d}),t[1]=u,t[2]=f);let p;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(ot,{children:(0,$.jsx)(l,{id:`5gr_ev`,values:{dateToken:`{{date}}`,userToken:`{{user}}`},components:{0:(0,$.jsx)(`code`,{className:`font-mono`}),1:(0,$.jsx)(`code`,{className:`font-mono`})}})}),t[3]=p):p=t[3];let m;t[4]===r?m=t[5]:(m=e=>r(e.target.value),t[4]=r,t[5]=m);let h;t[6]!==s||t[7]!==u||t[8]!==a||t[9]!==c||t[10]!==m||t[11]!==n?(h=(0,$.jsx)(ut,{id:u,value:n,onChange:m,disabled:s,rows:c,spellCheck:!1,placeholder:a,className:`font-mono text-xs leading-relaxed min-h-72`}),t[6]=s,t[7]=u,t[8]=a,t[9]=c,t[10]=m,t[11]=n,t[12]=h):h=t[12];let g;return t[13]!==f||t[14]!==h?(g=(0,$.jsxs)(ct,{children:[f,p,h]}),t[13]=f,t[14]=h,t[15]=g):g=t[15],g}var an=/^[A-Za-z0-9_-]+$/;function on(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)}function sn(e){let t={},n=e.title.trim();n&&(t.title=n);let r=e.description.trim();return r&&(t.description=r),t}var cn=0;function ln(){return cn+=1,`prop-${cn}`}function un(e){let{frontmatter:t,body:n}=K(e);if(t===``)return{type:``,properties:[],markdown:e};let r=[];for(let e of oe(t).split(`
|
|
4
|
-
`)){if(e.trim()===``)continue;let t=e.indexOf(`:`);if((/^\s/.test(e)||t===-1)&&r.length>0){let t=r[r.length-1];t&&(t.value+=`\n${e}`);continue}t!==-1&&r.push({key:e.slice(0,t).trim(),value:e.slice(t+1).replace(/^ /,``)})}let i=``,a=[];for(let e of r){if(e.key===`type`&&i===``){i=e.value.trim();continue}a.push({id:ln(),key:e.key,value:e.value})}return{type:i,properties:a,markdown:n}}function dn(e){let t=[],n=e.type.trim();n&&t.push(`type: ${n}`);for(let n of e.properties){let e=n.key.trim();e===``||e===`type`||t.push(n.value===``?`${e}:`:`${e}: ${n.value}`)}if(t.length===0)return e.markdown.replace(/^\n+/,``);let r=e.markdown.startsWith(`
|
|
5
|
-
`)?e.markdown:`\n${e.markdown}`;return`---\n${t.join(`
|
|
6
|
-
`)}\n---\n${r}`}function fn(e){let t=(0,Z.c)(54),{mode:n,folderPath:r,scope:i,initial:a,existingNames:o,onCommitted:s}=e,c=i===void 0?`local`:i,[l,u]=(0,Q.useState)(a.title),[d,f]=(0,Q.useState)(a.name),[p,m]=(0,Q.useState)(a.description),h;t[0]===a.body?h=t[1]:(h=()=>un(a.body),t[0]=a.body,t[1]=h);let g=(0,Q.useState)(h)[0],[_,v]=(0,Q.useState)(g.type),[y,b]=(0,Q.useState)(g.properties),[x,S]=(0,Q.useState)(g.markdown),[C,w]=(0,Q.useState)(!1),[T,E]=(0,Q.useState)(!1),[D,O]=(0,Q.useState)(!1),k;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(k=function(e,t){b(n=>n.map(n=>n.id===e?{...n,...t}:n))},t[2]=k):k=t[2];let A=k,j;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(j=function(){b(pn)},t[3]=j):j=t[3];let M=j,N;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(N=function(e){b(t=>t.filter(t=>t.id!==e))},t[4]=N):N=t[4];let P=N,F;t[5]!==n||t[6]!==T?(F=function(e){u(e),n===`create`&&!T&&f(on(e))},t[5]=n,t[6]=T,t[7]=F):F=t[7];let I=F,L;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(L=function(e){f(e),E(!0)},t[8]=L):L=t[8];let R=L,z=n===`edit`&&c===`local`,ee=n===`create`||z,te;t[9]===l?te=t[10]:(te=l.trim(),t[9]=l,t[10]=te);let ne=te,B,re,V,H;t[11]!==o||t[12]!==n||t[13]!==d||t[14]!==ee||t[15]!==ne?(H=d.trim(),V=ne===``,B=ee&&(H===``||!an.test(H)),re=n===`create`&&!B&&(o?.has(H)??!1),t[11]=o,t[12]=n,t[13]=d,t[14]=ee,t[15]=ne,t[16]=B,t[17]=re,t[18]=V,t[19]=H):(B=t[16],re=t[17],V=t[18],H=t[19]);let U=re,W=!C&&!V&&!B,G;t[20]!==x||t[21]!==z||t[22]!==W||t[23]!==p||t[24]!==r||t[25]!==a.name||t[26]!==n||t[27]!==s||t[28]!==y||t[29]!==l||t[30]!==H||t[31]!==ne||t[32]!==_?(G=async function(){if(!W){O(!0);return}w(!0);let e=sn({title:l,description:p}),t=dn({type:_,properties:y,markdown:x}),i=z&&H!==a.name,o=i?await ke({fromFolder:r,fromName:a.name,toFolder:r,toName:H,frontmatter:e,body:t}):await Oe({folder:r,name:n===`create`?H:a.name,frontmatter:e,body:t});if(w(!1),!o.ok){let{error:e}=o;q.error(n===`create`?J._({id:`jdGUeI`,values:{error:e}}):J._({id:`rQAQus`,values:{error:e}}));return}i?q.success(J._({id:`YKLP_-`})):`warnings`in o&&o.warnings.length>0?q.warning(o.warnings.join(` `)):n===`create`?q.success(J._({id:`06SZfb`,values:{trimmedTitle:ne}})):q.success(J._({id:`GamjcN`})),s(n===`create`||i?H:a.name)},t[20]=x,t[21]=z,t[22]=W,t[23]=p,t[24]=r,t[25]=a.name,t[26]=n,t[27]=s,t[28]=y,t[29]=l,t[30]=H,t[31]=ne,t[32]=_,t[33]=G):G=t[33];let K=G,ie;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(ie=()=>O(!0),t[34]=ie):ie=t[34];let ae;return t[35]!==x||t[36]!==z||t[37]!==W||t[38]!==p||t[39]!==a.name||t[40]!==n||t[41]!==y||t[42]!==C||t[43]!==I||t[44]!==d||t[45]!==B||t[46]!==U||t[47]!==K||t[48]!==l||t[49]!==V||t[50]!==D||t[51]!==H||t[52]!==_?(ae={mode:n,title:l,slug:d,description:p,type:_,properties:y,body:x,setTitle:I,setSlug:R,setDescription:m,setType:v,setProperty:A,addProperty:M,removeProperty:P,setBody:S,markTitleTouched:ie,titleTouched:D,isSaving:C,canSubmit:W,titleInvalid:V,slugInvalid:B,slugShadows:U,trimmedSlug:H,fixedName:a.name,canRename:z,submit:K},t[35]=x,t[36]=z,t[37]=W,t[38]=p,t[39]=a.name,t[40]=n,t[41]=y,t[42]=C,t[43]=I,t[44]=d,t[45]=B,t[46]=U,t[47]=K,t[48]=l,t[49]=V,t[50]=D,t[51]=H,t[52]=_,t[53]=ae):ae=t[53],ae}function pn(e){return[...e,{id:ln(),key:``,value:``}]}function mn(e){let t=(0,Z.c)(72),{form:n,bodyPlaceholder:r}=e,{_:i}=u(),a=(0,Q.useId)(),o=(0,Q.useId)(),s=(0,Q.useId)(),c=n.titleTouched&&n.titleInvalid,{fixedName:d}=n,f,p;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(l,{id:`MHrjPM`}),p=(0,$.jsx)(`span`,{className:`text-destructive`,children:`*`}),t[0]=f,t[1]=p):(f=t[0],p=t[1]);let m;t[2]===a?m=t[3]:(m=(0,$.jsxs)(at,{htmlFor:a,children:[f,p]}),t[2]=a,t[3]=m);let h=n.title,g;t[4]===n?g=t[5]:(g=e=>n.setTitle(e.target.value),t[4]=n,t[5]=g);let _=n.markTitleTouched,v;t[6]===i?v=t[7]:(v=i({id:`KWL_Ih`}),t[6]=i,t[7]=v);let y;t[8]!==n.isSaving||t[9]!==n.markTitleTouched||t[10]!==n.title||t[11]!==a||t[12]!==c||t[13]!==g||t[14]!==v?(y=(0,$.jsx)(Ye,{id:a,"data-testid":`template-name-input`,value:h,onChange:g,onBlur:_,placeholder:v,disabled:n.isSaving,"aria-invalid":c}),t[8]=n.isSaving,t[9]=n.markTitleTouched,t[10]=n.title,t[11]=a,t[12]=c,t[13]=g,t[14]=v,t[15]=y):y=t[15];let b;t[16]===c?b=t[17]:(b=c?(0,$.jsx)(rt,{children:(0,$.jsx)(l,{id:`V_wltx`})}):null,t[16]=c,t[17]=b);let x;t[18]!==m||t[19]!==y||t[20]!==b?(x=(0,$.jsxs)(ct,{children:[m,y,b]}),t[18]=m,t[19]=y,t[20]=b,t[21]=x):x=t[21];let S;t[22]!==d||t[23]!==n?(S=n.mode===`create`?(0,$.jsx)(gn,{form:n}):n.canRename?(0,$.jsx)(_n,{form:n}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,$.jsx)(l,{id:`NjrIak`,values:{fixedName:d},components:{0:(0,$.jsx)(`code`,{className:`font-mono`})}})}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,$.jsx)(l,{id:`jSO1X5`})})]}),t[22]=d,t[23]=n,t[24]=S):S=t[24];let C;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(l,{id:`Nu4oKW`}),t[25]=C):C=t[25];let w;t[26]===o?w=t[27]:(w=(0,$.jsx)(at,{htmlFor:o,children:C}),t[26]=o,t[27]=w);let T=n.description,E;t[28]===n?E=t[29]:(E=e=>n.setDescription(e.target.value),t[28]=n,t[29]=E);let D;t[30]===i?D=t[31]:(D=i({id:`3FMvls`}),t[30]=i,t[31]=D);let O;t[32]!==o||t[33]!==n.description||t[34]!==n.isSaving||t[35]!==E||t[36]!==D?(O=(0,$.jsx)(ut,{id:o,value:T,onChange:E,placeholder:D,disabled:n.isSaving,rows:2}),t[32]=o,t[33]=n.description,t[34]=n.isSaving,t[35]=E,t[36]=D,t[37]=O):O=t[37];let k;t[38]!==w||t[39]!==O?(k=(0,$.jsxs)(ct,{children:[w,O]}),t[38]=w,t[39]=O,t[40]=k):k=t[40];let A;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,$.jsx)(l,{id:`-zy2Nq`}),t[41]=A):A=t[41];let j;t[42]===s?j=t[43]:(j=(0,$.jsx)(at,{htmlFor:s,children:A}),t[42]=s,t[43]=j);let M=n.type,N;t[44]===n?N=t[45]:(N=e=>n.setType(e.target.value),t[44]=n,t[45]=N);let P;t[46]===i?P=t[47]:(P=i({id:`o9CrsQ`}),t[46]=i,t[47]=P);let F;t[48]!==n.isSaving||t[49]!==n.type||t[50]!==N||t[51]!==P||t[52]!==s?(F=(0,$.jsx)(Ye,{id:s,value:M,onChange:N,placeholder:P,disabled:n.isSaving,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,className:`font-mono`}),t[48]=n.isSaving,t[49]=n.type,t[50]=N,t[51]=P,t[52]=s,t[53]=F):F=t[53];let I;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,$.jsx)(ot,{children:(0,$.jsx)(l,{id:`ipn17C`,components:{0:(0,$.jsx)(`code`,{className:`font-mono`}),1:(0,$.jsx)(`code`,{className:`font-mono`})}})}),t[54]=I):I=t[54];let L;t[55]!==j||t[56]!==F?(L=(0,$.jsxs)(ct,{children:[j,F,I]}),t[55]=j,t[56]=F,t[57]=L):L=t[57];let R;t[58]===n?R=t[59]:(R=(0,$.jsx)(hn,{form:n}),t[58]=n,t[59]=R);let z;t[60]!==r||t[61]!==n.body||t[62]!==n.isSaving||t[63]!==n.setBody?(z=(0,$.jsx)(rn,{value:n.body,onChange:n.setBody,disabled:n.isSaving,placeholder:r}),t[60]=r,t[61]=n.body,t[62]=n.isSaving,t[63]=n.setBody,t[64]=z):z=t[64];let ee;return t[65]!==x||t[66]!==S||t[67]!==k||t[68]!==L||t[69]!==R||t[70]!==z?(ee=(0,$.jsxs)(nt,{children:[x,S,k,L,R,z]}),t[65]=x,t[66]=S,t[67]=k,t[68]=L,t[69]=R,t[70]=z,t[71]=ee):ee=t[71],ee}function hn(e){let t=(0,Z.c)(12),{form:n}=e,{_:r}=u(),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(at,{children:(0,$.jsx)(l,{id:`-WFFG2`})}),t[0]=i):i=t[0];let a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(ot,{children:(0,$.jsx)(l,{id:`zrP8HX`,components:{0:(0,$.jsx)(`code`,{className:`font-mono`}),1:(0,$.jsx)(`code`,{className:`font-mono`})}})}),t[1]=a):a=t[1];let o;t[2]!==r||t[3]!==n?(o=n.properties.length>0?(0,$.jsx)(`div`,{className:`flex flex-col gap-2`,children:n.properties.map(e=>(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(Ye,{"aria-label":r({id:`56xUL1`}),value:e.key,onChange:t=>n.setProperty(e.id,{key:t.target.value}),placeholder:r({id:`Aq-O0x`}),disabled:n.isSaving,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,className:`font-mono w-1/3`}),(0,$.jsx)(Ye,{"aria-label":r({id:`iKZkk1`}),value:e.value,onChange:t=>n.setProperty(e.id,{value:t.target.value}),placeholder:r({id:`jEZ6Lf`}),disabled:n.isSaving,spellCheck:!1,className:`font-mono flex-1`}),(0,$.jsx)(b,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":r({id:`rNifQd`}),onClick:()=>n.removeProperty(e.id),disabled:n.isSaving,children:(0,$.jsx)(Fe,{"aria-hidden":`true`})})]},e.id))}):null,t[2]=r,t[3]=n,t[4]=o):o=t[4];let s;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(l,{id:`F-NRCj`}),t[5]=s):s=t[5];let c;t[6]!==n.addProperty||t[7]!==n.isSaving?(c=(0,$.jsx)(b,{type:`button`,variant:`outline`,size:`sm`,className:`self-start`,onClick:n.addProperty,disabled:n.isSaving,children:s}),t[6]=n.addProperty,t[7]=n.isSaving,t[8]=c):c=t[8];let d;return t[9]!==o||t[10]!==c?(d=(0,$.jsxs)(ct,{children:[i,a,o,c]}),t[9]=o,t[10]=c,t[11]=d):d=t[11],d}function gn(e){let t=(0,Z.c)(34),{form:n}=e,{_:r}=u(),i=(0,Q.useId)(),[a,o]=(0,Q.useState)(!1),s=a||n.titleTouched&&(n.slugInvalid||n.slugShadows),{slug:c,trimmedSlug:d}=n;if(!s){if(d===``)return null;let e;t[0]===c?e=t[1]:(e={slug:c},t[0]=c,t[1]=e);let r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r={0:(0,$.jsx)(`code`,{className:`font-mono`})},t[2]=r):r=t[2];let i;t[3]===e?i=t[4]:(i=(0,$.jsx)(l,{id:`Pgu10b`,values:e,components:r}),t[3]=e,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>o(!0),t[5]=a):a=t[5];let s;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(l,{id:`ePK91l`}),t[6]=s):s=t[6];let u;t[7]===n.isSaving?u=t[8]:(u=(0,$.jsx)(b,{type:`button`,variant:`link`,className:`h-auto p-0 align-baseline text-xs font-mono uppercase`,onClick:a,disabled:n.isSaving,children:s}),t[7]=n.isSaving,t[8]=u);let f;return t[9]!==i||t[10]!==u?(f=(0,$.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[i,` `,u]}),t[9]=i,t[10]=u,t[11]=f):f=t[11],f}let f;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(l,{id:`GN6L5F`}),t[12]=f):f=t[12];let p;t[13]===i?p=t[14]:(p=(0,$.jsx)(at,{htmlFor:i,children:f}),t[13]=i,t[14]=p);let m;t[15]===n?m=t[16]:(m=e=>n.setSlug(e.target.value),t[15]=n,t[16]=m);let h;t[17]===r?h=t[18]:(h=r({id:`tjXez2`}),t[17]=r,t[18]=h);let g;t[19]!==n.isSaving||t[20]!==n.slugInvalid||t[21]!==c||t[22]!==i||t[23]!==m||t[24]!==h?(g=(0,$.jsx)(Ye,{id:i,value:c,onChange:m,placeholder:h,disabled:n.isSaving,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,"aria-invalid":n.slugInvalid,className:`font-mono`}),t[19]=n.isSaving,t[20]=n.slugInvalid,t[21]=c,t[22]=i,t[23]=m,t[24]=h,t[25]=g):g=t[25];let _;t[26]!==n.slugInvalid||t[27]!==n.slugShadows||t[28]!==d?(_=n.slugInvalid?(0,$.jsx)(rt,{children:(0,$.jsx)(l,{id:`l_FAT6`,components:{0:(0,$.jsx)(`code`,{className:`font-mono`}),1:(0,$.jsx)(`code`,{className:`font-mono`})}})}):n.slugShadows?(0,$.jsx)(ot,{className:`text-yellow-600 dark:text-yellow-500`,children:(0,$.jsx)(l,{id:`jwnpdM`,values:{trimmedSlug:d},components:{0:(0,$.jsx)(`code`,{className:`font-mono`})}})}):(0,$.jsx)(ot,{children:(0,$.jsx)(l,{id:`TsZmgr`})}),t[26]=n.slugInvalid,t[27]=n.slugShadows,t[28]=d,t[29]=_):_=t[29];let v;return t[30]!==p||t[31]!==g||t[32]!==_?(v=(0,$.jsxs)(ct,{children:[p,g,_]}),t[30]=p,t[31]=g,t[32]=_,t[33]=v):v=t[33],v}function _n(e){let t=(0,Z.c)(20),{form:n}=e,{_:r}=u(),i=(0,Q.useId)(),a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(l,{id:`GN6L5F`}),t[0]=a):a=t[0];let o;t[1]===i?o=t[2]:(o=(0,$.jsx)(at,{htmlFor:i,children:a}),t[1]=i,t[2]=o);let s=n.slug,c;t[3]===n?c=t[4]:(c=e=>n.setSlug(e.target.value),t[3]=n,t[4]=c);let d;t[5]===r?d=t[6]:(d=r({id:`tjXez2`}),t[5]=r,t[6]=d);let f;t[7]!==n.isSaving||t[8]!==n.slug||t[9]!==n.slugInvalid||t[10]!==i||t[11]!==c||t[12]!==d?(f=(0,$.jsx)(Ye,{id:i,value:s,onChange:c,placeholder:d,disabled:n.isSaving,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,"aria-invalid":n.slugInvalid,className:`font-mono`}),t[7]=n.isSaving,t[8]=n.slug,t[9]=n.slugInvalid,t[10]=i,t[11]=c,t[12]=d,t[13]=f):f=t[13];let p;t[14]===n.slugInvalid?p=t[15]:(p=n.slugInvalid?(0,$.jsx)(rt,{children:(0,$.jsx)(l,{id:`l_FAT6`,components:{0:(0,$.jsx)(`code`,{className:`font-mono`}),1:(0,$.jsx)(`code`,{className:`font-mono`})}})}):(0,$.jsx)(ot,{children:(0,$.jsx)(l,{id:`FvMSms`})}),t[14]=n.slugInvalid,t[15]=p);let m;return t[16]!==o||t[17]!==f||t[18]!==p?(m=(0,$.jsxs)(ct,{children:[o,f,p]}),t[16]=o,t[17]=f,t[18]=p,t[19]=m):m=t[19],m}var vn={name:``,title:``,description:``,body:``},yn=`## Overview
|
|
7
|
-
|
|
8
|
-
(Replace with the starting content for new documents.)
|
|
9
|
-
`;function bn(e){let t=(0,Z.c)(12),{folderPath:n,existingNames:r,open:i,onOpenChange:a,onCreated:o}=e,s;t[0]!==r||t[1]!==n||t[2]!==o||t[3]!==a||t[4]!==i?(s=i?(0,$.jsx)(xn,{folderPath:n,existingNames:r,onOpenChange:a,onCreated:o}):null,t[0]=r,t[1]=n,t[2]=o,t[3]=a,t[4]=i,t[5]=s):s=t[5];let c;t[6]===s?c=t[7]:(c=(0,$.jsx)(D,{className:`sm:max-w-3xl max-h-[85vh] flex flex-col`,children:s}),t[6]=s,t[7]=c);let l;return t[8]!==a||t[9]!==i||t[10]!==c?(l=(0,$.jsx)(j,{open:i,onOpenChange:a,children:c}),t[8]=a,t[9]=i,t[10]=c,t[11]=l):l=t[11],l}function xn(e){let t=(0,Z.c)(31),{folderPath:n,existingNames:r,onOpenChange:i,onCreated:a}=e,o;t[0]!==a||t[1]!==i?(o=e=>{a(e),i(!1)},t[0]=a,t[1]=i,t[2]=o):o=t[2];let s;t[3]!==r||t[4]!==n||t[5]!==o?(s={mode:`create`,folderPath:n,initial:vn,existingNames:r,onCommitted:o},t[3]=r,t[4]=n,t[5]=o,t[6]=s):s=t[6];let c=fn(s),u;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(E,{children:(0,$.jsx)(l,{id:`G1Gw0v`})}),t[7]=u):u=t[7];let d;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsxs)(A,{children:[u,(0,$.jsx)(T,{children:(0,$.jsx)(l,{id:`NUr4kz`})})]}),t[8]=d):d=t[8];let f;t[9]===c?f=t[10]:(f=(0,$.jsx)(O,{children:(0,$.jsx)(mn,{form:c,bodyPlaceholder:yn})}),t[9]=c,t[10]=f);let p;t[11]===i?p=t[12]:(p=()=>i(!1),t[11]=i,t[12]=p);let m;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(l,{id:`dEgA5A`}),t[13]=m):m=t[13];let h;t[14]!==c.isSaving||t[15]!==p?(h=(0,$.jsx)(b,{variant:`outline`,className:`font-mono uppercase`,onMouseDown:Sn,onClick:p,disabled:c.isSaving,children:m}),t[14]=c.isSaving,t[15]=p,t[16]=h):h=t[16];let g;t[17]===c?g=t[18]:(g=()=>void c.submit(),t[17]=c,t[18]=g);let _;t[19]===c.isSaving?_=t[20]:(_=c.isSaving?(0,$.jsx)(l,{id:`E9bKSA`}):(0,$.jsx)(l,{id:`A5hiCy`}),t[19]=c.isSaving,t[20]=_);let v;t[21]!==c.isSaving||t[22]!==_||t[23]!==g?(v=(0,$.jsx)(b,{onClick:g,disabled:c.isSaving,children:_}),t[21]=c.isSaving,t[22]=_,t[23]=g,t[24]=v):v=t[24];let y;t[25]!==v||t[26]!==h?(y=(0,$.jsxs)(k,{children:[h,v]}),t[25]=v,t[26]=h,t[27]=y):y=t[27];let x;return t[28]!==y||t[29]!==f?(x=(0,$.jsxs)($.Fragment,{children:[d,f,y]}),t[28]=y,t[29]=f,t[30]=x):x=t[30],x}function Sn(e){return e.preventDefault()}function Cn(e){let t=(0,Z.c)(16),{template:n,onOpenChange:r,onDeleted:i}=e,{_:a}=u(),[o,s]=(0,Q.useState)(!1),c;t[0]!==a||t[1]!==i||t[2]!==r?(c=async function(e){s(!0);let t=await Ae(e.source_folder,e.name);if(s(!1),!t.ok){let{error:e}=t;q.error(a({id:`36WXSC`,values:{error:e}}));return}let n=e.title??e.name;q.success(a({id:`ErRi6L`,values:{label:n}})),i(),r(!1)},t[0]=a,t[1]=i,t[2]=r,t[3]=c):c=t[3];let l=c,d=n!==null,f;t[4]!==o||t[5]!==r?(f=e=>{!e&&!o&&r(!1)},t[4]=o,t[5]=r,t[6]=f):f=t[6];let p;t[7]!==a||t[8]!==o||t[9]!==l||t[10]!==n?(p=n?(()=>{let{name:e,path:t,scope:r}=n,i=r===`inherited`?`\n\n${a({id:`8uAWix`})}`:``;return(0,$.jsx)(_,{itemName:a({id:`XfzqjK`,values:{name:e}}),isSubmitting:o,onDelete:()=>l(n),customDescription:`${a({id:`5LXwX8`,values:{path:t}})}${i}`})})():null,t[7]=a,t[8]=o,t[9]=l,t[10]=n,t[11]=p):p=t[11];let m;return t[12]!==d||t[13]!==f||t[14]!==p?(m=(0,$.jsx)(M,{open:d,onOpenChange:f,children:p}),t[12]=d,t[13]=f,t[14]=p,t[15]=m):m=t[15],m}function wn(e){let t=(0,Z.c)(45),{template:n,onEdit:r,onDelete:i,onCreate:a,badge:s}=e,{_:c}=u(),d=n.title??n.name,f=!!(n.title&&n.title!==n.name),p;t[0]===d?p=t[1]:(p=(0,$.jsx)(`span`,{className:`truncate font-medium`,children:d}),t[0]=d,t[1]=p);let m;t[2]!==f||t[3]!==n.name?(m=f?(0,$.jsx)(`code`,{className:`shrink-0 font-mono text-xs text-muted-foreground`,children:n.name}):null,t[2]=f,t[3]=n.name,t[4]=m):m=t[4];let _;t[5]===s?_=t[6]:(_=s?(0,$.jsx)(`span`,{className:`ml-auto shrink-0`,children:s}):null,t[5]=s,t[6]=_);let v;t[7]!==p||t[8]!==m||t[9]!==_?(v=(0,$.jsxs)(`span`,{className:`flex w-full items-center gap-2`,children:[p,m,_]}),t[7]=p,t[8]=m,t[9]=_,t[10]=v):v=t[10];let y;t[11]===n.description?y=t[12]:(y=n.description?(0,$.jsx)(`span`,{className:`w-full truncate text-sm text-muted-foreground`,children:n.description}):null,t[11]=n.description,t[12]=y);let x;t[13]!==r||t[14]!==v||t[15]!==y?(x=(0,$.jsxs)(b,{type:`button`,variant:`ghost`,onClick:r,className:`h-auto min-w-0 flex-1 flex-col items-start gap-0.5 px-1.5 py-1 text-left font-normal hover:bg-transparent`,children:[v,y]}),t[13]=r,t[14]=v,t[15]=y,t[16]=x):x=t[16];let S;t[17]!==c||t[18]!==d||t[19]!==a?(S=a?(0,$.jsxs)(b,{type:`button`,variant:`ghost`,size:`sm`,className:`shrink-0 font-mono uppercase opacity-0 group-hover:opacity-100 focus-visible:opacity-100`,onClick:a,"aria-label":c({id:`mZ1r4i`,values:{label:d}}),children:[(0,$.jsx)(g,{className:`size-3.5`,"aria-hidden":!0}),(0,$.jsx)(l,{id:`hYgDIe`})]}):null,t[17]=c,t[18]=d,t[19]=a,t[20]=S):S=t[20];let C;t[21]!==c||t[22]!==d?(C=c({id:`Bx4EXG`,values:{label:d}}),t[21]=c,t[22]=d,t[23]=C):C=t[23];let w;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsx)(h,{className:`size-4`,"aria-hidden":!0}),t[24]=w):w=t[24];let T;t[25]===C?T=t[26]:(T=(0,$.jsx)(F,{asChild:!0,children:(0,$.jsx)(b,{variant:`ghost`,size:`icon`,className:`size-7 shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 data-[state=open]:opacity-100`,"aria-label":C,children:w})}),t[25]=C,t[26]=T);let E,D;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(o,{"aria-hidden":!0}),D=(0,$.jsx)(l,{id:`ePK91l`}),t[27]=E,t[28]=D):(E=t[27],D=t[28]);let O;t[29]===r?O=t[30]:(O=(0,$.jsxs)(P,{onSelect:r,children:[E,D]}),t[29]=r,t[30]=O);let k,A;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,$.jsx)(Ne,{"aria-hidden":!0}),A=(0,$.jsx)(l,{id:`cnGeoo`}),t[31]=k,t[32]=A):(k=t[31],A=t[32]);let j;t[33]===i?j=t[34]:(j=(0,$.jsxs)(P,{variant:`destructive`,onSelect:i,children:[k,A]}),t[33]=i,t[34]=j);let M;t[35]!==O||t[36]!==j?(M=(0,$.jsxs)(I,{align:`end`,className:`min-w-52`,children:[O,j]}),t[35]=O,t[36]=j,t[37]=M):M=t[37];let N;t[38]!==T||t[39]!==M?(N=(0,$.jsxs)(L,{modal:!1,children:[T,M]}),t[38]=T,t[39]=M,t[40]=N):N=t[40];let R;return t[41]!==N||t[42]!==x||t[43]!==S?(R=(0,$.jsxs)(`li`,{className:`group flex items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-muted/50`,children:[x,S,N]}),t[41]=N,t[42]=x,t[43]=S,t[44]=R):R=t[44],R}function Tn(){let e=(0,Z.c)(8),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={status:`idle`},e[0]=t):t=e[0];let[n,r]=(0,Q.useState)(t),[i,a]=(0,Q.useState)(0),[o,s]=(0,Q.useState)(!1),c;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{let e=!1;return r({status:`loading`}),fetch(`/api/skill-targets`).then(Dn).then(t=>{if(e)return;let n=G.safeParse(t);if(!n.success){console.error(`[ok-skills] /api/skill-targets response failed schema validation:`,n.error.issues),r({status:`error`,message:J._({id:`PXaT32`})});return}r({status:`ready`,data:n.data})}).catch(t=>{e||r({status:`error`,message:t instanceof Error?t.message:String(t)})}),()=>{e=!0}},e[1]=c):c=e[1];let l;e[2]===i?l=e[3]:(l=[i],e[2]=i,e[3]=l),(0,Q.useEffect)(c,l);let u;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(u=async e=>{s(!0);let t=await Ve(e);if(!t.ok)throw s(!1),Error(t.error);if(e.preview)return s(!1),t.preview;de(),a(En),s(!1)},e[4]=u):u=e[4];let d=u,f;return e[5]!==o||e[6]!==n?(f={state:n,saving:o,folderAction:d},e[5]=o,e[6]=n,e[7]=f):f=e[7],f}function En(e){return e+1}async function Dn(e){if(!e.ok){let t=await e.json().catch(On);throw Error(me(t)??`HTTP ${e.status}`)}return e.json()}function On(){return null}function kn(e){let t=(0,Z.c)(2);if(!e.bundle)return null;let n;return t[0]===e?n=t[1]:(n=(0,$.jsx)(An,{...e,bundle:e.bundle}),t[0]=e,t[1]=n),n}function An(e){let t=(0,Z.c)(118),{bundle:n,source:r,defaultScope:i,installOverride:a,onInstalled:o,onOpenChange:s,returnFocus:c}=e,{_:d}=u(),f=(0,Q.useId)(),p=Ke(),[m,h]=(0,Q.useState)(a?.scope??i),g;t[0]!==n.names||t[1]!==a?(g=()=>a?new Set(n.names):new Set,t[0]=n.names,t[1]=a,t[2]=g):g=t[2];let[_,x]=(0,Q.useState)(g),[S,C]=(0,Q.useState)(!1),w;t[3]===n.descriptions?w=t[4]:(w=()=>new Map(Object.entries(n.descriptions??{})),t[3]=n.descriptions,t[4]=w);let[M,P]=(0,Q.useState)(w),F=Tn(),[I,L]=(0,Q.useState)(null),re=F.state.status===`ready`?F.state.data.targets:null,V;t[5]!==re||t[6]!==I?(V=I??new Set(re??[]),t[5]=re,t[6]=I,t[7]=V):V=t[7];let H=V,U=lt(),W=U.status===`ready`?U.data.find(e=>e.scope===m)?.installableEditors:void 0,G=v.filter(e=>!W||W.includes(e)||H.has(e)),K;t[8]!==m||t[9]!==U.data||t[10]!==U.status?(K=U.status===`ready`?new Set(U.data.filter(e=>e.scope===m).map(In)):new Set,t[8]=m,t[9]=U.data,t[10]=U.status,t[11]=K):K=t[11];let ie=K,ae;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(ae=new Set,t[12]=ae):ae=t[12];let[oe,ce]=(0,Q.useState)(ae),le=new Set;if(F.state.status===`ready`){let e;t[13]===F.state.data.folders?e=t[14]:(e=F.state.data.folders??[],t[13]=F.state.data.folders,t[14]=e);for(let t of e)t.scope===m&&(v.includes(t.host)||t.root&&le.add(t.root))}if(U.status===`ready`){for(let e of U.data)if(e.scope===m)for(let t of e.customPlacements??[]){let e=qe(t);e&&le.add(e)}}let ue=[...le].sort(),J=a!==void 0,de,fe;t[15]!==r||t[16]!==J?(de=()=>{if(J)return;let e=new AbortController;return Ue(r,e.signal).then(t=>{e.signal.aborted||!t.ok||P(new Map(t.skills.map(Fn)))}),()=>e.abort()},fe=[r,J],t[15]=r,t[16]=J,t[17]=de,t[18]=fe):(de=t[17],fe=t[18]),(0,Q.useEffect)(de,fe);let{plugin:Y,names:pe}=n,me;if(t[19]!==ie||t[20]!==pe){let e;t[22]===ie?e=t[23]:(e=e=>!ie.has(e),t[22]=ie,t[23]=e),me=pe.filter(e),t[19]=ie,t[20]=pe,t[21]=me}else me=t[21];let he=me,X=_.size===he.length&&he.length>0,ge;t[24]===_?ge=t[25]:(ge=function(e,t){let n=new Set(_);t?n.add(e):n.delete(e),x(n)},t[24]=_,t[25]=ge);let _e=ge,ve;t[26]!==d||t[27]!==oe||t[28]!==H||t[29]!==a||t[30]!==o||t[31]!==s||t[32]!==Y||t[33]!==m||t[34]!==_||t[35]!==r?(ve=async function(){if(C(!0),a){let e=await a.installSelected([..._]);if(C(!1),e===null)return;e.size>0&&o?.(e),s(!1);return}let e=await We({source:r,skills:[..._],scope:m,install:!1,marketplace:!0});if(!e.ok){C(!1),q.error(d({id:`Lbl6KA`,values:{0:Y??r,1:e.error}}));return}let t=e.results.map(Pn).filter(Nn),n=[...H];if(n.length>0)for(let e of t){let t=await He({scope:m,name:e,targets:n,linkMode:!0});t.ok||q.error(d({id:`1oSHI0`,values:{0:t.error,skillName:e}}))}for(let e of oe)for(let n of t){let t=await Ge({scope:m,name:n,dir:e,mode:`link`});t.ok||q.error(d({id:`OkC7-2`,values:{0:t.error,skillName:n,root:e}}))}C(!1);let{imported:i,alreadyImported:c,failed:l}=e;if(l>0){let t=e.results.filter(Mn).map(jn).join(`, `);q.error(d({id:`cMMb6H`,values:{imported:i,failed:l,failedNames:t}}))}else i===0?q.info(d({id:`uJfwF8`})):c>0?q.success(d({id:`tkIXtS`,values:{imported:i,alreadyImported:c}})):q.success(d({id:`-kKdCC`,values:{0:Y??r,imported:i}}));let u=new Map;for(let t of e.results)t.status!==`imported`&&t.status!==`already-imported`||u.set(t.requested,t.name??t.requested);u.size>0&&o?.(u),s(!1)},t[26]=d,t[27]=oe,t[28]=H,t[29]=a,t[30]=o,t[31]=s,t[32]=Y,t[33]=m,t[34]=_,t[35]=r,t[36]=ve):ve=t[36];let ye=ve,be=j,xe;t[37]!==S||t[38]!==s?(xe=e=>{!e&&!S&&s(!1)},t[37]=S,t[38]=s,t[39]=xe):xe=t[39];let Se=D,Ce;t[40]===c?Ce=t[41]:(Ce=e=>{c&&(e.preventDefault(),c())},t[40]=c,t[41]=Ce);let we;t[42]!==Y||t[43]!==r?(we=(0,$.jsx)(E,{children:Y?(0,$.jsx)(l,{id:`J86siq`,values:{plugin:Y}}):(0,$.jsx)(l,{id:`Q-DKvr`,values:{source:r}})}),t[42]=Y,t[43]=r,t[44]=we):we=t[44];let Te;t[45]===Y?Te=t[46]:(Te=(0,$.jsx)(T,{children:Y?(0,$.jsx)(l,{id:`lj4cNf`}):(0,$.jsx)(l,{id:`4mDIcg`})}),t[45]=Y,t[46]=Te);let Ee;t[47]!==we||t[48]!==Te?(Ee=(0,$.jsxs)(A,{children:[we,Te]}),t[47]=we,t[48]=Te,t[49]=Ee):Ee=t[49];let De=O,Oe;t[50]!==he.length||t[51]!==_.size?(Oe=(0,$.jsx)(`p`,{className:`font-medium text-xs font-mono text-foreground/70 uppercase tracking-wider`,children:(0,$.jsx)(l,{id:`lUtr1r`,values:{0:_.size,1:he.length}})}),t[50]=he.length,t[51]=_.size,t[52]=Oe):Oe=t[52];let ke;t[53]!==X||t[54]!==he?(ke=()=>x(X?new Set:new Set(he)),t[53]=X,t[54]=he,t[55]=ke):ke=t[55];let Ae;t[56]===X?Ae=t[57]:(Ae=X?(0,$.jsx)(l,{id:`xCJdfg`}):(0,$.jsx)(l,{id:`wgNoIs`}),t[56]=X,t[57]=Ae);let Me;t[58]!==S||t[59]!==ke||t[60]!==Ae?(Me=(0,$.jsx)(b,{variant:`ghost`,size:`sm`,disabled:S,onClick:ke,children:Ae}),t[58]=S,t[59]=ke,t[60]=Ae,t[61]=Me):Me=t[61];let Ne;t[62]!==Oe||t[63]!==Me?(Ne=(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[Oe,Me]}),t[62]=Oe,t[63]=Me,t[64]=Ne):Ne=t[64];let Pe;if(t[65]!==S||t[66]!==M||t[67]!==ie||t[68]!==pe||t[69]!==_||t[70]!==_e){let e;t[72]!==S||t[73]!==M||t[74]!==ie||t[75]!==_||t[76]!==_e?(e=e=>{let t=M.get(e),n=ie.has(e);return(0,$.jsxs)(R,{className:`flex cursor-pointer items-start gap-3 p-3 text-sm font-normal hover:bg-muted/40`,children:[(0,$.jsx)(N,{checked:n||_.has(e),disabled:S||n,onCheckedChange:t=>_e(e,t===!0),className:`mt-0.5`}),(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,$.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(`span`,{className:`font-mono`,children:e}),n?(0,$.jsx)(`span`,{className:`shrink-0 rounded-sm bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground uppercase tracking-wide`,children:(0,$.jsx)(l,{id:`eQkgKV`})}):null]}),t?(0,$.jsx)(`span`,{className:`text-1sm text-muted-foreground line-clamp-2`,children:t}):null]})]},e)},t[72]=S,t[73]=M,t[74]=ie,t[75]=_,t[76]=_e,t[77]=e):e=t[77],Pe=pe.map(e),t[65]=S,t[66]=M,t[67]=ie,t[68]=pe,t[69]=_,t[70]=_e,t[71]=Pe}else Pe=t[71];let Fe;t[78]===Pe?Fe=t[79]:(Fe=(0,$.jsx)(`div`,{className:`max-h-72 overflow-y-auto rounded-md border border-border divide-y divide-border`,children:Pe}),t[78]=Pe,t[79]=Fe);let Ie;t[80]===m?Ie=t[81]:(Ie=m===`project`?(0,$.jsx)(l,{id:`oVW7VD`}):(0,$.jsx)(l,{id:`7HY6fA`}),t[80]=m,t[81]=Ie);let Le=J?null:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{"aria-hidden":!0,children:`·`}),H.size+oe.size>0?(0,$.jsx)(y,{hosts:[...H,...oe],iconClassName:`size-3.5`}):(0,$.jsx)(l,{id:`poAsUN`}),(0,$.jsxs)($e,{children:[(0,$.jsx)(Xe,{asChild:!0,children:(0,$.jsx)(b,{variant:`link`,size:`sm`,className:`h-auto px-1`,disabled:S,"data-testid":`plugin-bundle-change-destination`,children:(0,$.jsx)(l,{id:`o-XJ9D`})})}),(0,$.jsxs)(Ze,{align:`start`,className:`flex w-72 flex-col gap-4`,children:[(0,$.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,$.jsx)(R,{htmlFor:f,children:(0,$.jsx)(l,{id:`7MSbAT`})}),(0,$.jsxs)(B,{value:m,disabled:S,onValueChange:e=>h(e),children:[(0,$.jsx)(te,{id:f,className:`w-full`,children:(0,$.jsx)(ne,{})}),(0,$.jsx)(ee,{children:Je.map(e=>(0,$.jsx)(z,{value:e,children:p[e]},e))})]})]}),(0,$.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,$.jsx)(R,{children:(0,$.jsx)(l,{id:`Y5la_5`})}),(0,$.jsxs)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-2`,children:[G.map(e=>(0,$.jsxs)(R,{className:`flex cursor-pointer items-center gap-2 text-sm font-normal`,children:[(0,$.jsx)(N,{checked:H.has(e),disabled:S,onCheckedChange:t=>{let n=new Set(H);t===!0?n.add(e):n.delete(e),L(n)}}),se[e]??e]},e)),ue.map(e=>(0,$.jsxs)(R,{className:`flex cursor-pointer items-center gap-2 font-normal text-sm`,children:[(0,$.jsx)(N,{checked:oe.has(e),disabled:S,onCheckedChange:t=>{let n=new Set(oe);t===!0?n.add(e):n.delete(e),ce(n)}}),(0,$.jsx)(`span`,{className:`font-mono text-xs`,children:e})]},e))]})]})]})]})]}),Re;t[82]!==Ie||t[83]!==Le?(Re=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 text-1sm text-muted-foreground`,"data-testid":`plugin-bundle-destination`,children:[Ie,Le]}),t[82]=Ie,t[83]=Le,t[84]=Re):Re=t[84];let ze;t[85]!==De||t[86]!==Ne||t[87]!==Fe||t[88]!==Re?(ze=(0,$.jsxs)(De,{className:`flex flex-col gap-4`,children:[Ne,Fe,Re]}),t[85]=De,t[86]=Ne,t[87]=Fe,t[88]=Re,t[89]=ze):ze=t[89];let Be;t[90]===s?Be=t[91]:(Be=()=>s(!1),t[90]=s,t[91]=Be);let Ve;t[92]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=(0,$.jsx)(l,{id:`dEgA5A`}),t[92]=Ve):Ve=t[92];let Ye;t[93]!==S||t[94]!==Be?(Ye=(0,$.jsx)(b,{variant:`outline`,className:`font-mono uppercase`,disabled:S,onClick:Be,children:Ve}),t[93]=S,t[94]=Be,t[95]=Ye):Ye=t[95];let Qe=S||_.size===0,et;t[96]===ye?et=t[97]:(et=()=>void ye(),t[96]=ye,t[97]=et);let tt;t[98]!==S||t[99]!==_.size?(tt=S?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(je,{"aria-hidden":`true`,className:`size-4`}),(0,$.jsx)(l,{id:`Wtw22s`})]}):_.size===0?(0,$.jsx)(l,{id:`TKQ7K-`}):(0,$.jsx)(l,{id:`9XwoPv`,values:{0:_.size}}),t[98]=S,t[99]=_.size,t[100]=tt):tt=t[100];let nt;t[101]!==Qe||t[102]!==et||t[103]!==tt?(nt=(0,$.jsx)(b,{"data-testid":`plugin-bundle-install`,disabled:Qe,onClick:et,children:tt}),t[101]=Qe,t[102]=et,t[103]=tt,t[104]=nt):nt=t[104];let rt;t[105]!==Ye||t[106]!==nt?(rt=(0,$.jsxs)(k,{children:[Ye,nt]}),t[105]=Ye,t[106]=nt,t[107]=rt):rt=t[107];let it;t[108]!==Se||t[109]!==Ce||t[110]!==Ee||t[111]!==ze||t[112]!==rt?(it=(0,$.jsxs)(Se,{className:`sm:max-w-lg`,onCloseAutoFocus:Ce,children:[Ee,ze,rt]}),t[108]=Se,t[109]=Ce,t[110]=Ee,t[111]=ze,t[112]=rt,t[113]=it):it=t[113];let at;return t[114]!==be||t[115]!==xe||t[116]!==it?(at=(0,$.jsx)(be,{open:!0,onOpenChange:xe,children:it}),t[114]=be,t[115]=xe,t[116]=it,t[117]=at):at=t[117],at}function jn(e){return e.requested}function Mn(e){return e.status===`failed`||e.status===`not-found`}function Nn(e){return typeof e==`string`}function Pn(e){return e.name}function Fn(e){return[e.name,e.description]}function In(e){return e.name}var Ln=`claude-cowork`,Rn=`ok:skill:cowork:installed:v`,zn=250,Bn=`/api/skill/install-state`,Vn=null,Hn=new Set,Un=null,Wn=!1,Gn=()=>{rr(dr())},Kn=e=>{e.key?.startsWith(Rn)&&rr(dr())};function qn(){Wn||typeof window>`u`||(window.addEventListener(`focus`,Gn),window.addEventListener(`storage`,Kn),Wn=!0)}function Jn(){Wn&&(typeof window>`u`||(window.removeEventListener(`focus`,Gn),window.removeEventListener(`storage`,Kn),Wn=!1))}var Yn=!1,Xn=!1,Zn=!1,Qn=!1,$n=!1,er=!1,tr=!1;async function nr(e){let t=!0;if(e.detectClaudeDesktop)try{t=await e.detectClaudeDesktop()}catch(e){t=!0,Yn||(Yn=!0,console.warn(`[claude-desktop-integration] detectClaudeDesktop IPC rejected — falling back to desktopPresent=true`,e))}let n=await e.fetchSnapshot();if(n){let e=n.targets?.[Ln]??null;return e?.version?{desktopPresent:t,skillInstalled:!0,skillVersion:e.version}:{desktopPresent:t,skillInstalled:!1,skillVersion:null}}let r=e.readLocalStorageGuard();return{desktopPresent:t,skillInstalled:r.skillInstalled,skillVersion:r.skillVersion}}async function rr(e){return Un||(Un=(async()=>{try{Vn=await nr(e);for(let e of Hn)try{e()}catch(e){console.error(`[claude-desktop-integration] subscriber threw`,e)}}catch(e){console.error(`[claude-desktop-integration] probe rejected unexpectedly`,e)}finally{Un=null}})(),Un)}function ir(e){return Hn.size===0&&qn(),Hn.add(e),()=>{Hn.delete(e),Hn.size===0&&Jn()}}function ar(){return Vn}function or(){if(typeof window>`u`)return;let e=window.okDesktop?.skill,t=e?.detectClaudeDesktop;if(t)return()=>t.call(e)}function sr(e){let t=e?.timeoutMs??zn,n=e?.fetchImpl??(typeof fetch<`u`?fetch:void 0);return async()=>{if(!n)return null;let e;try{let r=new AbortController,i=setTimeout(()=>r.abort(),t);try{e=await n(Bn,{method:`GET`,cache:`no-store`,signal:r.signal})}finally{clearTimeout(i)}}catch(e){let n=e instanceof DOMException&&e.name===`AbortError`;return n&&!Zn?(Zn=!0,console.warn(`[claude-desktop-integration] fetch ${Bn} timed out (>${t}ms) — falling back to localStorage guard`)):!n&&!Xn&&(Xn=!0,console.warn(`[claude-desktop-integration] fetch ${Bn} failed — falling back to localStorage guard`,e)),null}if(!e.ok)return Qn||(Qn=!0,console.warn(`[claude-desktop-integration] ${Bn} returned ${e.status} ${e.statusText} — falling back to localStorage guard`)),null;let r;try{r=await e.json()}catch(e){return $n||($n=!0,console.warn(`[claude-desktop-integration] ${Bn} returned unparseable JSON — falling back to localStorage guard`,e)),null}return cr(r)}}function cr(e){if(typeof e!=`object`||!e)return lr(`not an object`);let t=e;if(typeof t.currentVersion!=`string`||t.currentVersion===``)return lr(`currentVersion not a non-empty string`);if(t.targets!==void 0){if(t.targets===null||typeof t.targets!=`object`)return lr(`targets not object`);for(let[,e]of Object.entries(t.targets)){if(e==null)continue;if(typeof e!=`object`)return lr(`target entry not object`);let t=e;if(typeof t.version!=`string`||t.version===``)return lr(`target.version not a non-empty string`)}}return t}function lr(e){return er||(er=!0,console.warn(`[claude-desktop-integration] ${Bn} response failed shape validation (${e}) — falling back to localStorage guard`)),null}function ur(){if(typeof localStorage>`u`)return{skillInstalled:!1,skillVersion:null};try{for(let e=0;e<localStorage.length;e++){let t=localStorage.key(e);if(t?.startsWith(Rn))return{skillInstalled:!0,skillVersion:t.slice(27)}}}catch(e){tr||(tr=!0,console.warn(`[claude-desktop-integration] localStorage scan threw — falling back to skillInstalled=false`,e))}return{skillInstalled:!1,skillVersion:null}}function dr(){return{detectClaudeDesktop:or(),fetchSnapshot:sr(),readLocalStorageGuard:ur}}function fr(){let e=(0,Z.c)(5),t=(0,Q.useSyncExternalStore)(ir,ar,ar),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[],e[0]=n):n=e[0],(0,Q.useEffect)(mr,n);let r=t?.desktopPresent??!0,i=t?.skillInstalled??!1,a=t?.skillVersion??null,o;return e[1]!==r||e[2]!==i||e[3]!==a?(o={desktopPresent:r,skillInstalled:i,skillVersion:a,refresh:pr},e[1]=r,e[2]=i,e[3]=a,e[4]=o):o=e[4],o}function pr(){rr(dr())}function mr(){Vn||rr(dr())}function hr(){return typeof window<`u`&&window.okDesktop!=null}function gr(){return hr()&&window.okDesktop?.config.ptyAvailable===!0}var _r=[{path:[`appearance`,`theme`],label:{id:`FEr96N`},description:{id:`JZ8cO6`},control:`theme-cards`},{path:[`appearance`,`language`],label:{id:`vXIe7J`},description:{id:`gUx34c`},control:`language-select`},{path:[`editor`,`wordWrap`],label:{id:`iKSP5j`},description:{id:`mmpzAq`}},{path:[`editor`,`previewTabs`],label:{id:`drzzZw`},description:{id:`AIC67-`}},{path:[`appearance`,`preview`,`autoOpen`],label:{id:`2XQ8Ww`},description:{id:`bultyE`}},{path:[`telemetry`,`skillInstallReports`,`enabled`],label:{id:`2jUGEP`},description:{id:`Ns0z5o`}}],vr=[{path:[`appearance`,`colorThemeLight`],label:{id:`rFmBG3`},description:{id:`mnpsVn`},control:`theme-tiles`}],yr=[{sectionId:`preferences`,fields:_r},{sectionId:`plugin:theme`,fields:vr}];async function br(){try{let e=await fetch(`/api/sync/conflicts`);return e.ok?{conflicts:(await e.json()).conflicts??[]}:(console.warn(JSON.stringify({event:`conflicts-fetch-failed`,status:e.status})),{conflicts:[],error:`server`})}catch(e){return console.warn(JSON.stringify({event:`conflicts-fetch-failed`,status:null,detail:e instanceof Error?e.message:String(e)})),{conflicts:[],error:`network`}}}function xr(){let e=(0,Z.c)(10),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0];let[n,r]=(0,Q.useState)(t),[i,a]=(0,Q.useState)(!0),[o,s]=(0,Q.useState)(null),c=(0,Q.useRef)(0),l;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(l=function(){let e=c.current+=1;br().then(t=>{let{conflicts:n,error:i}=t;e===c.current&&(r(n),s(i??null),a(!1))})},e[1]=l):l=e[1];let u=l,d,f;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{u()},f=[],e[2]=d,e[3]=f):(d=e[2],f=e[3]),(0,Q.useEffect)(d,f);let p,m;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>fe(e=>{e.includes(`sync-status`)&&u()}),m=[],e[4]=p,e[5]=m):(p=e[4],m=e[5]),(0,Q.useEffect)(p,m);let h;return e[6]!==n||e[7]!==o||e[8]!==i?(h={conflicts:n,loading:i,error:o},e[6]=n,e[7]=o,e[8]=i,e[9]=h):h=e[9],h}function Sr(e){if(!e)return``;let t=e.replace(/[/\\]+$/g,``),n=Math.max(t.lastIndexOf(`/`),t.lastIndexOf(`\\`));return n<0?t:t.slice(n+1)}function Cr(e){let t=e.trim();return t.length===0?{kind:`blank`,raw:e}:t.startsWith(`#`)?{kind:`comment`,raw:e}:{kind:`pattern`,raw:e,text:t}}function wr(e){return{lines:e.split(`
|
|
10
|
-
`).map(Cr)}}function Tr(e){return e.lines.map(e=>e.raw).join(`
|
|
11
|
-
`)}function Er(e){return e.lines.filter(e=>e.kind===`pattern`)}function Dr(e,t){let n=t.trim();if(n.length===0)return e;for(let t of e.lines)if(t.kind===`pattern`&&t.text===n)return e;let r={kind:`pattern`,raw:n,text:n},i=e.lines.slice(),a=i[i.length-1];return a&&a.kind===`blank`&&a.raw===``?i.splice(i.length-1,0,r):i.push(r,{kind:`blank`,raw:``}),{lines:i}}function Or(e,t){let n=t.trim();if(n.length===0)return-1;let r=0;for(let t of e.lines)if(t.kind===`pattern`){if(t.text===n)return r;r++}return-1}function kr(e,t,n){let r=n.trim();if(r.length===0)return Ar(e,t);let i=Mr(e,t);if(i<0)return e;let a=e.lines.slice();return a[i]={kind:`pattern`,raw:r,text:r},{lines:a}}function Ar(e,t){let n=Mr(e,t);if(n<0)return e;let r=e.lines.slice();return r.splice(n,1),{lines:r}}function jr(e,t,n){if(t===n)return e;let r=[],i=[];if(e.lines.forEach((e,t)=>{e.kind===`pattern`&&(r.push(t),i.push(e))}),t<0||t>=i.length||n<0||n>=i.length)return e;let a=i.slice(),[o]=a.splice(t,1);if(!o)return e;a.splice(n,0,o);let s=e.lines.slice();return r.forEach((e,t)=>{let n=a[t];n&&(s[e]=n)}),{lines:s}}function Mr(e,t){if(t<0)return-1;let n=0;for(let r=0;r<e.lines.length;r++)if(e.lines[r]?.kind===`pattern`){if(n===t)return r;n++}return-1}var Nr=`/api/share/construct-url`;function Pr(e){return{kind:`doc`,docName:e}}function Fr(e){return{kind:`folder`,folderRelativePath:e}}async function Ir(e,t=fetch){let n=await t(Nr,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!n.ok)throw Error(`construct-url transport ${n.status}`);let r=await n.json(),i=W.safeParse(r);if(!i.success)throw Error(`construct-url response shape mismatch`);return i.data}function Lr(e,t){switch(e){case`detached-head`:return J._({id:`jLOL1H`});case`branch-not-on-origin`:return t?J._({id:`x-fZxg`,values:{branch:t}}):J._({id:`ZGVsOD`});case`non-github-remote`:return J._({id:`V4JHny`});case`invalid-path`:return J._({id:`0pZmTP`});case`unsupported-share-url`:return J._({id:`uYZTcW`});case`no-remote`:return J._({id:`pA16WG`})}}async function Rr(e,t){if(!e.hasRemote)return e.onClickWhenNoRemote(),{kind:`opened-wizard`};let n=e.kind===`folder`?{kind:`folder`,folderPath:e.folderRelativePath}:{kind:`doc`,docPath:Re(e.docName)},r;try{r=await Ir(n,t.fetchFn)}catch{return t.toastError(J._({id:`u3YnKw`}),`transport`),{kind:`transport-error`}}if(r.ok){try{await t.clipboardWrite(r.shareUrl)}catch{return t.toastError(J._({id:`E_A2Nq`}),`clipboard`),t.logEvent(`[share] action=link-construct result=clipboard-failed`),{kind:`clipboard-failed`,shareUrl:r.shareUrl,freshness:r.freshness}}return t.toastSuccess(e.kind===`folder`?J._({id:`xcGVzH`}):J._({id:`c1LZZH`})),t.logEvent(`[share] action=link-construct`),{kind:`copied`,shareUrl:r.shareUrl,branch:r.branch,freshness:r.freshness}}if(r.error===`no-remote`)return e.onClickWhenNoRemote(),{kind:`opened-wizard`};let i=r.branch;return t.toastError(Lr(r.error,i),`business`),{kind:`business-error`,error:r.error,branch:i}}var zr=`/api/share/publish/owners`,Br=`/api/share/publish/name-check`,Vr=`/api/share/publish`,Hr=/[A-Za-z0-9._-]/g;function Ur(e){return(e.match(Hr)?.join(``)??``).replace(/[-.]{2,}/g,e=>e[0]??`-`).replace(/^[-.]+/,``).replace(/[-.]+$/,``)}function Wr(e){return e.find(e=>e.kind===`org`)?.login??e[0]?.login??``}function Gr(e){return`https://github.com/orgs/${encodeURIComponent(e)}/policies/applications`}function Kr(e,t,n){switch(e){case`name-conflict`:return{banner:J._({id:`n81AV0`,values:{owner:t,name:n}}),next:{kind:`edit-name`}};case`saml-sso`:return{banner:J._({id:`gLCE2c`,values:{owner:t}}),next:{kind:`authorize-org`,authorizeUrl:Gr(t)}};case`push-failed`:return{banner:J._({id:`7Y9yTo`,values:{owner:t,name:n}}),next:{kind:`retry-push`}};case`auth-required`:return{banner:J._({id:`UGtPix`}),next:{kind:`reauth`}};case`init-failed`:return{banner:J._({id:`kGp168`}),next:{kind:`edit-form`}};case`network`:return{banner:J._({id:`UVLlMV`}),next:{kind:`edit-form`}};case`no-project`:return{banner:J._({id:`S6eHlw`}),next:{kind:`edit-form`}}}}async function qr(e=fetch){let t=await e(zr,{method:`GET`});if(!t.ok)throw Error(`owners transport ${t.status}`);let n=await t.json(),r=ae.safeParse(n);if(!r.success)throw Error(`owners response shape mismatch`);return r.data}async function Jr(e,t,n=fetch){let r=await n(`${Br}?owner=${encodeURIComponent(e)}&name=${encodeURIComponent(t)}`,{method:`GET`});if(!r.ok)throw Error(`name-check transport ${r.status}`);let i=await r.json(),a=ie.safeParse(i);if(!a.success)throw Error(`name-check response shape mismatch`);return a.data}async function Yr(e,t=fetch){let n=await t(Vr,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!n.ok)throw Error(`publish transport ${n.status}`);let r=await n.json(),i=U.safeParse(r);if(!i.success)throw Error(`publish response shape mismatch`);return i.data}function Xr(e,t,n){return e.ok?e.available?{kind:`available`}:{kind:`taken`,owner:t,name:n}:e.error===`auth-required`?{kind:`error`,banner:J._({id:`UGtPix`})}:{kind:`error`,banner:J._({id:`UVLlMV`})}}function Zr(e){return e.submitting||e.owner===null||e.sanitizedName.length===0?!1:e.nameCheck.kind===`available`}var Qr=500;function $r(e){let t=(0,Z.c)(69),{open:n,onOpenChange:r}=e,{_:i}=u(),o=he(),{activeDocName:s}=a(),[c,d]=(0,Q.useState)(null),[f,h]=(0,Q.useState)(!1),[g,_]=(0,Q.useState)(null),[v,y]=(0,Q.useState)(``),[x,S]=(0,Q.useState)(``),[C,w]=(0,Q.useState)(`private`),[M,N]=(0,Q.useState)(``),P;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(P={kind:`idle`},t[0]=P):P=t[0];let[F,I]=(0,Q.useState)(P),[L,z]=(0,Q.useState)(!1),[ee,te]=(0,Q.useState)(null),[ne,B]=(0,Q.useState)(!1),[H,U]=(0,Q.useState)(null),[W,G]=(0,Q.useState)(!1),[K,ie]=(0,Q.useState)(null),[ae,oe]=(0,Q.useState)(null),se=(0,Q.useRef)(null),ce=(0,Q.useRef)(null),le=(0,Q.useRef)(null),ue;t[1]===x?ue=t[2]:(ue=Ur(x),t[1]=x,t[2]=ue);let J=ue,de=c?.find(e=>e.login===v)??null,fe;t[3]!==i||t[4]!==v?(fe=async function(){h(!0),_(null);try{let e=await qr();if(!e.ok){e.error===`auth-required`?(B(!0),_(i({id:`6cyguR`}))):_(i({id:`UVLlMV`})),h(!1);return}d(e.owners),e.owners.length>0&&v===``&&y(Wr(e.owners))}catch{_(i({id:`UVLlMV`}))}h(!1)},t[3]=i,t[4]=v,t[5]=fe):fe=t[5];let Y=fe,pe;t[6]!==Y||t[7]!==n||t[8]!==c||t[9]!==v||t[10]!==o?.contentDir?(pe=()=>{n&&(I({kind:`idle`}),te(null),z(!1),_(null),U(null),G(!1),ie(null),oe(null),S(Ur(Sr(o?.contentDir??``))),w(`private`),N(``),c===null?Y():v===``&&c.length>0&&y(Wr(c)))},t[6]=Y,t[7]=n,t[8]=c,t[9]=v,t[10]=o?.contentDir,t[11]=pe):pe=t[11];let me;t[12]===n?me=t[13]:(me=[n],t[12]=n,t[13]=me),(0,Q.useEffect)(pe,me);let X,ge;t[14]!==i||t[15]!==n||t[16]!==J||t[17]!==v?(X=()=>{if(n){if(se.current!==null&&clearTimeout(se.current),v===``||J===``){I({kind:`idle`});return}return I({kind:`pending`}),se.current=setTimeout(async()=>{let e=v,t=J;ce.current=`${e}|${t}`,I({kind:`checking`});try{let n=await Jr(e,t);if(ce.current!==`${e}|${t}`)return;I(Xr(n,e,t))}catch{if(ce.current!==`${e}|${t}`)return;I({kind:`error`,banner:i({id:`UVLlMV`})})}},Qr),()=>{se.current!==null&&(clearTimeout(se.current),se.current=null)}}},ge=[n,v,J,i],t[14]=i,t[15]=n,t[16]=J,t[17]=v,t[18]=X,t[19]=ge):(X=t[18],ge=t[19]),(0,Q.useEffect)(X,ge);let _e,ve;t[20]!==i||t[21]!==s||t[22]!==H?(_e=()=>{if(!H||!s)return;let e=!1;return(async()=>{try{let t=await Ir({kind:`doc`,docPath:Re(s)});if(e)return;t.ok?ie(t.shareUrl):oe(Lr(t.error,t.branch))}catch(t){let n=t;if(e)return;console.warn(`[share] action=prefetch-share-url result=failed`,n),oe(i({id:`J6N5MX`}))}})(),()=>{e=!0}},ve=[H,s,i],t[20]=i,t[21]=s,t[22]=H,t[23]=_e,t[24]=ve):(_e=t[23],ve=t[24]),(0,Q.useEffect)(_e,ve);let ye;t[25]===Y?ye=t[26]:(ye=function(){B(!1),_(null),Y()},t[25]=Y,t[26]=ye);let be=ye,xe=async function(){if(Zr({owner:de,sanitizedName:J,nameCheck:F,submitting:L})){z(!0),te(null);try{let e=await Yr({owner:v,name:J,visibility:C,description:M.trim().length>0?M.trim():void 0});if(e.ok){U({ownerLogin:e.ownerLogin,repoName:e.repoName}),z(!1);return}let t=Kr(e.error,v,J);te({message:t.banner,next:t.next}),t.next.kind===`edit-name`?(le.current?.focus(),le.current?.select()):t.next.kind===`reauth`&&B(!0)}catch{te({message:i({id:`UVLlMV`}),next:{kind:`edit-form`}})}z(!1)}},Se;t[27]!==i||t[28]!==W||t[29]!==r||t[30]!==K?(Se=function(){!K||W||(G(!0),p(K).then(()=>{q.success(i({id:`c1LZZH`})),r(!1)}).catch(e=>{if(console.warn(`[share] action=link-construct result=clipboard-failed`,e),m(e)&&window.self!==window.top){q.error(i({id:`Dub54T`}));return}q.error(i({id:`MQIM_Y`}))}).finally(()=>{G(!1)}))},t[27]=i,t[28]=W,t[29]=r,t[30]=K,t[31]=Se):Se=t[31];let Ce=Se,we;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(we=function(e){let t=window.okDesktop?.shell?.openExternal;t?t(e):window.open(e,`_blank`,`noopener`)},t[32]=we):we=t[32];let Te=we,Ee;t[33]===r?Ee=t[34]:(Ee=function(){r(!1)},t[33]=r,t[34]=Ee);let De=Ee,Oe=!Zr({owner:de,sanitizedName:J,nameCheck:F,submitting:L}),ke;t[35]!==i||t[36]!==s||t[37]!==ee||t[38]!==W||t[39]!==M||t[40]!==Te||t[41]!==De||t[42]!==Ce||t[43]!==xe||t[44]!==Y||t[45]!==x||t[46]!==F||t[47]!==c||t[48]!==g||t[49]!==f||t[50]!==H||t[51]!==J||t[52]!==v||t[53]!==K||t[54]!==ae||t[55]!==Oe||t[56]!==L||t[57]!==C?(ke=(0,$.jsx)(D,{className:`sm:max-w-lg`,showCloseButton:!1,children:H?(0,$.jsx)(ti,{ownerLogin:H.ownerLogin,repoName:H.repoName,shareUrl:K,shareUrlError:ae,copying:W,canCopy:s!==null,onCopy:Ce,onClose:De}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(A,{children:[(0,$.jsx)(E,{children:(0,$.jsx)(l,{id:`qXsafh`})}),(0,$.jsx)(T,{children:(0,$.jsx)(l,{id:`Z1LF1M`})})]}),(0,$.jsxs)(O,{className:`flex flex-col gap-6`,children:[(0,$.jsxs)(`fieldset`,{className:`flex flex-col gap-2`,children:[(0,$.jsx)(R,{id:`publish-owner-label`,children:(0,$.jsx)(l,{id:`LtI9AS`})}),f&&c===null?(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,$.jsx)(je,{className:`size-3.5`,"aria-hidden":!0}),` `,(0,$.jsx)(l,{id:`Z3FXyt`})]}):g?(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,$.jsx)(`span`,{className:`text-sm text-destructive`,children:g}),(0,$.jsx)(b,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>Y(),children:(0,$.jsx)(l,{id:`6gRgw8`})})]}):(0,$.jsx)(V,{value:v,onValueChange:y,"aria-labelledby":`publish-owner-label`,"data-testid":`publish-owner-radio`,children:(c??[]).map(ei)})]}),(0,$.jsxs)(`fieldset`,{className:`flex flex-col gap-2`,children:[(0,$.jsx)(R,{htmlFor:`publish-name`,children:(0,$.jsx)(l,{id:`0xnmlQ`})}),(0,$.jsx)(Ye,{id:`publish-name`,ref:le,"data-testid":`publish-name`,value:x,onChange:e=>S(e.target.value),onBlur:()=>{ce.current=null},placeholder:`my-knowledge-base`,autoComplete:`off`,spellCheck:!1}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-1sm`,"aria-live":`polite`,children:[(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:J?(0,$.jsx)(l,{id:`Nn4GgW`,values:{sanitizedName:J},components:{0:(0,$.jsx)(`code`,{className:`font-mono`})}}):(0,$.jsx)(l,{id:`Oxyd5f`})}),(0,$.jsx)(oi,{status:F})]})]}),(0,$.jsxs)(`fieldset`,{className:`flex flex-col gap-2`,children:[(0,$.jsx)(R,{id:`publish-visibility-label`,children:(0,$.jsx)(l,{id:`2q_Q7x`})}),(0,$.jsxs)(V,{value:C,onValueChange:e=>w(e===`public`?`public`:`private`),className:`sm:flex`,"aria-labelledby":`publish-visibility-label`,children:[(0,$.jsx)(at,{htmlFor:`publish-visibility-private`,children:(0,$.jsxs)(ct,{orientation:`horizontal`,children:[(0,$.jsxs)(it,{children:[(0,$.jsx)(st,{children:(0,$.jsx)(l,{id:`zwBp5t`})}),(0,$.jsx)(ot,{className:`text-1sm`,children:(0,$.jsx)(l,{id:`D8OV7J`})})]}),(0,$.jsx)(re,{value:`private`,id:`publish-visibility-private`,"data-testid":`publish-visibility-private`})]})}),(0,$.jsx)(at,{htmlFor:`publish-visibility-public`,children:(0,$.jsxs)(ct,{orientation:`horizontal`,children:[(0,$.jsxs)(it,{children:[(0,$.jsx)(st,{children:(0,$.jsx)(l,{id:`7d1a0d`})}),(0,$.jsx)(ot,{className:`text-1sm`,children:(0,$.jsx)(l,{id:`4jDd0j`})})]}),(0,$.jsx)(re,{value:`public`,id:`publish-visibility-public`,"data-testid":`publish-visibility-public`})]})})]})]}),(0,$.jsxs)(`fieldset`,{className:`flex flex-col gap-2`,children:[(0,$.jsx)(R,{htmlFor:`publish-description`,children:(0,$.jsx)(l,{id:`Fxf4jq`})}),(0,$.jsx)(ut,{id:`publish-description`,"data-testid":`publish-description`,rows:2,value:M,onChange:e=>N(e.target.value),placeholder:i({id:`c5rF4v`})})]}),ee&&(0,$.jsx)(ai,{banner:ee,onAuthorize:Te,onRetryPush:xe})]}),(0,$.jsxs)(k,{children:[(0,$.jsx)(b,{type:`button`,variant:`outline`,className:`font-mono uppercase`,onClick:De,children:(0,$.jsx)(l,{id:`dEgA5A`})}),(0,$.jsx)(b,{type:`button`,onClick:xe,disabled:Oe,"data-testid":`publish-submit`,children:L?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(je,{className:`size-3.5`,"aria-hidden":!0}),` `,(0,$.jsx)(l,{id:`Bdha5y`})]}):(0,$.jsx)(l,{id:`EEYbdt`})})]})]})}),t[35]=i,t[36]=s,t[37]=ee,t[38]=W,t[39]=M,t[40]=Te,t[41]=De,t[42]=Ce,t[43]=xe,t[44]=Y,t[45]=x,t[46]=F,t[47]=c,t[48]=g,t[49]=f,t[50]=H,t[51]=J,t[52]=v,t[53]=K,t[54]=ae,t[55]=Oe,t[56]=L,t[57]=C,t[58]=ke):ke=t[58];let Ae;t[59]!==r||t[60]!==n||t[61]!==ke?(Ae=(0,$.jsx)(j,{open:n,onOpenChange:r,children:ke}),t[59]=r,t[60]=n,t[61]=ke,t[62]=Ae):Ae=t[62];let Me;t[63]!==ne||t[64]!==be?(Me=(0,$.jsx)(tn,{open:ne,onOpenChange:B,onSuccess:be}),t[63]=ne,t[64]=be,t[65]=Me):Me=t[65];let Ne;return t[66]!==Ae||t[67]!==Me?(Ne=(0,$.jsxs)($.Fragment,{children:[Ae,Me]}),t[66]=Ae,t[67]=Me,t[68]=Ne):Ne=t[68],Ne}function ei(e){let t=`publish-owner-${e.login}`;return(0,$.jsx)(at,{htmlFor:t,children:(0,$.jsxs)(ct,{orientation:`horizontal`,children:[(0,$.jsx)(it,{children:(0,$.jsxs)(st,{children:[e.avatarUrl?(0,$.jsx)(`img`,{src:e.avatarUrl,alt:``,"aria-hidden":!0,className:`size-4 rounded-full`}):null,(0,$.jsx)(`span`,{children:e.login})]})}),(0,$.jsx)(re,{value:e.login,id:t,"data-testid":`publish-owner-option-${e.login}`})]})},e.login)}function ti(e){let t=(0,Z.c)(36),{ownerLogin:r,repoName:i,shareUrl:a,shareUrlError:o,copying:s,canCopy:c,onCopy:d,onClose:f}=e,{_:p}=u(),m=(0,Q.useRef)(null),h,g;t[0]===a?(h=t[1],g=t[2]):(h=()=>{!a||!m.current||(m.current.focus(),m.current.select())},g=[a],t[0]=a,t[1]=h,t[2]=g),(0,Q.useEffect)(h,g);let _;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsx)(E,{children:(0,$.jsx)(l,{id:`u3wRF-`})}),t[3]=_):_=t[3];let v;t[4]!==r||t[5]!==i?(v={ownerLogin:r,repoName:i},t[4]=r,t[5]=i,t[6]=v):v=t[6];let y;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(y={0:(0,$.jsx)(`code`,{className:`font-mono`})},t[7]=y):y=t[7];let x;t[8]===v?x=t[9]:(x=(0,$.jsxs)(A,{children:[_,(0,$.jsx)(T,{children:(0,$.jsx)(l,{id:`r871ed`,values:v,components:y})})]}),t[8]=v,t[9]=x);let S;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsx)(Te,{className:`mt-0.5 size-4 text-emerald-600`,"aria-hidden":!0}),t[10]=S):S=t[10];let C;t[11]===c?C=t[12]:(C=(0,$.jsxs)(`div`,{role:`status`,"data-testid":`publish-success`,className:`flex items-start gap-3 rounded-md border border-emerald-500/40 bg-emerald-500/5 p-3 text-sm`,children:[S,(0,$.jsx)(`span`,{className:`text-foreground`,children:c?(0,$.jsx)(l,{id:`cOrTMo`}):(0,$.jsx)(l,{id:`nTwL53`})})]}),t[11]=c,t[12]=C);let w;t[13]!==c||t[14]!==a||t[15]!==o?(w=c&&(0,$.jsxs)(`fieldset`,{className:`flex flex-col gap-2`,children:[(0,$.jsx)(R,{htmlFor:`publish-share-url`,children:(0,$.jsx)(l,{id:`5-FeN2`})}),o?(0,$.jsx)(`div`,{role:`alert`,"data-testid":`publish-share-url-error`,className:`rounded-md border border-destructive/50 bg-destructive/5 p-2 text-sm text-destructive`,children:o}):a?(0,$.jsx)(Ye,{id:`publish-share-url`,ref:m,"data-testid":`publish-share-url`,readOnly:!0,value:a,onFocus:ii,onClick:ri,onContextMenu:ni,className:`font-mono text-xs`}):(0,$.jsxs)(`div`,{"data-testid":`publish-share-url-loading`,className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,$.jsx)(je,{className:`size-3.5`,"aria-hidden":!0}),` `,(0,$.jsx)(l,{id:`M9597s`})]})]}),t[13]=c,t[14]=a,t[15]=o,t[16]=w):w=t[16];let D;t[17]!==C||t[18]!==w?(D=(0,$.jsxs)(O,{className:`flex flex-col gap-4`,children:[C,w]}),t[17]=C,t[18]=w,t[19]=D):D=t[19];let j;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsx)(l,{id:`DPfwMq`}),t[20]=j):j=t[20];let M;t[21]===f?M=t[22]:(M=(0,$.jsx)(b,{type:`button`,variant:`outline`,className:`font-mono uppercase`,onClick:f,"data-testid":`publish-success-done`,children:j}),t[21]=f,t[22]=M);let N;t[23]!==p||t[24]!==c||t[25]!==s||t[26]!==d||t[27]!==a?(N=c&&(0,$.jsx)(b,{type:`button`,onClick:d,disabled:s||!a,"data-testid":`publish-copy-link`,"aria-label":p({id:`RGCCrg`}),children:s?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(je,{className:`size-3.5`,"aria-hidden":!0}),` `,(0,$.jsx)(l,{id:`OvEjsP`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(n,{className:`size-3.5`,"aria-hidden":!0}),` `,(0,$.jsx)(l,{id:`RGCCrg`})]})}),t[23]=p,t[24]=c,t[25]=s,t[26]=d,t[27]=a,t[28]=N):N=t[28];let P;t[29]!==M||t[30]!==N?(P=(0,$.jsxs)(k,{children:[M,N]}),t[29]=M,t[30]=N,t[31]=P):P=t[31];let F;return t[32]!==D||t[33]!==P||t[34]!==x?(F=(0,$.jsxs)($.Fragment,{children:[x,D,P]}),t[32]=D,t[33]=P,t[34]=x,t[35]=F):F=t[35],F}function ni(e){return e.currentTarget.select()}function ri(e){return e.currentTarget.select()}function ii(e){return e.currentTarget.select()}function ai(e){let t=(0,Z.c)(13),{banner:n,onAuthorize:r,onRetryPush:a}=e,o=n.next,s;t[0]===n.message?s=t[1]:(s=(0,$.jsx)(`span`,{children:n.message}),t[0]=n.message,t[1]=s);let c;t[2]!==o.authorizeUrl||t[3]!==o.kind||t[4]!==r?(c=o.kind===`authorize-org`&&(0,$.jsxs)(b,{type:`button`,variant:`outline`,size:`sm`,className:`self-start`,"data-testid":`publish-authorize-org`,onClick:()=>r(o.authorizeUrl),children:[(0,$.jsx)(l,{id:`FyW0WO`}),` `,(0,$.jsx)(i,{className:`ml-1 size-3`,"aria-hidden":!0})]}),t[2]=o.authorizeUrl,t[3]=o.kind,t[4]=r,t[5]=c):c=t[5];let u;t[6]!==o.kind||t[7]!==a?(u=o.kind===`retry-push`&&(0,$.jsx)(b,{type:`button`,variant:`outline`,size:`sm`,className:`self-start`,"data-testid":`publish-retry-push`,onClick:a,children:(0,$.jsx)(l,{id:`NOHyEE`})}),t[6]=o.kind,t[7]=a,t[8]=u):u=t[8];let d;return t[9]!==s||t[10]!==c||t[11]!==u?(d=(0,$.jsxs)(`div`,{role:`alert`,"data-testid":`publish-banner`,className:`flex flex-col gap-2 rounded-md border border-destructive/50 bg-destructive/5 p-3 text-sm`,children:[s,c,u]}),t[9]=s,t[10]=c,t[11]=u,t[12]=d):d=t[12],d}function oi(e){let t=(0,Z.c)(12),{status:n}=e;if(n.kind===`available`){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Te,{className:`size-3.5`,"aria-hidden":!0}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsxs)(`span`,{"data-testid":`publish-name-check`,"data-status":`available`,className:`flex items-center gap-1 text-emerald-600 dark:text-emerald-400`,children:[e,` `,(0,$.jsx)(l,{id:`csDS2L`})]}),t[1]=n):n=t[1],n}if(n.kind===`taken`){let{owner:e,name:i}=n,a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(r,{className:`size-3.5`,"aria-hidden":!0}),t[2]=a):a=t[2];let o;return t[3]!==i||t[4]!==e?(o=(0,$.jsxs)(`span`,{"data-testid":`publish-name-check`,"data-status":`taken`,className:`flex items-center gap-1 text-destructive`,children:[a,` `,(0,$.jsx)(l,{id:`LRgZAt`,values:{owner:e,name:i}})]}),t[3]=i,t[4]=e,t[5]=o):o=t[5],o}if(n.kind===`checking`||n.kind===`pending`){let e;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(je,{className:`size-3.5`,"aria-hidden":!0}),t[6]=e):e=t[6];let r;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(l,{id:`pWT04I`}),t[7]=r):r=t[7];let i;return t[8]===n.kind?i=t[9]:(i=(0,$.jsxs)(`span`,{"data-testid":`publish-name-check`,"data-status":n.kind,className:`flex items-center gap-1 text-muted-foreground`,children:[e,` `,r]}),t[8]=n.kind,t[9]=i),i}if(n.kind===`error`){let e;return t[10]===n.banner?e=t[11]:(e=(0,$.jsx)(`span`,{"data-testid":`publish-name-check`,"data-status":`error`,className:`text-destructive`,children:n.banner}),t[10]=n.banner,t[11]=e),e}return null}var si=5e3,ci=3e4,li=0;function ui(){let e=Date.now();e-li<ci||(li=e,_e(`fetch`).catch(()=>{li===e&&(li=0)}))}async function di(){try{let e=await fetch(`/api/git/worktree-status`);return e.ok?await e.json():null}catch{return null}}function fi(e){let t=(0,Z.c)(6),[n,r]=(0,Q.useState)(null),i,a;t[0]===e?(i=t[1],a=t[2]):(i=()=>{if(!e)return;let t=!1,n=!1,i=!1;function a(){if(n){i=!0;return}n=!0,di().then(e=>{n=!1,!t&&e&&e.readable!==!1&&r(e),i&&!t&&(i=!1,a())})}a(),ui();let o=setInterval(a,si),s=fe(e=>{e.includes(`sync-status`)&&a()});return()=>{t=!0,clearInterval(o),s()}},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,Q.useEffect)(i,a);let o=e&&n===null,s;return t[3]!==n||t[4]!==o?(s={status:n,loading:o},t[3]=n,t[4]=o,t[5]=s):s=t[5],s}async function pi(e){let t=await fetch(`/api/sync/resolve-blocking`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:e})});if(!t.ok)throw Error(`sync resolve-blocking failed: ${t.status}`)}function mi(){return typeof window<`u`&&window.okDesktop!=null}function hi(e){let t=(0,Z.c)(23),{paths:n}=e,[r,i]=(0,Q.useState)(null),[a,o]=(0,Q.useState)(!1);if(n.length===0)return null;let s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=async function(e){i(e),o(!1);try{await pi(e),i(null)}catch{o(!0),i(null)}},t[0]=s):s=t[0];let c=s,u=r!==null,d;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)(`span`,{id:`sync-blocking-heading`,className:`text-xs font-medium text-foreground`,children:(0,$.jsx)(l,{id:`sdvHp3`})}),t[1]=d):d=t[1];let f;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[d,(0,$.jsx)(`span`,{className:`text-2xs text-muted-foreground`,children:(0,$.jsx)(l,{id:`H4doZt`})})]}),t[2]=f):f=t[2];let p;t[3]===n?p=t[4]:(p=n.map(_i),t[3]=n,t[4]=p);let m;t[5]===p?m=t[6]:(m=(0,$.jsx)(`ul`,{"aria-labelledby":`sync-blocking-heading`,className:`flex max-h-28 flex-col gap-1 overflow-y-auto overscroll-contain`,"data-testid":`sync-blocking-list`,children:p}),t[5]=p,t[6]=m);let h;t[7]===a?h=t[8]:(h=a&&(0,$.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,"data-testid":`sync-blocking-error`,children:(0,$.jsx)(l,{id:`FsEXax`})}),t[7]=a,t[8]=h);let g;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>void c(`commit`),t[9]=g):g=t[9];let _;t[10]===r?_=t[11]:(_=r===`commit`&&(0,$.jsx)(je,{"aria-hidden":`true`,"data-icon":`inline-start`}),t[10]=r,t[11]=_);let v;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsx)(l,{id:`N7Lau6`}),t[12]=v):v=t[12];let y;t[13]!==u||t[14]!==_?(y=(0,$.jsxs)(b,{size:`xs`,disabled:u,onClick:g,"data-testid":`sync-blocking-commit`,children:[_,v]}),t[13]=u,t[14]=_,t[15]=y):y=t[15];let x;t[16]===u?x=t[17]:(x=mi()&&(0,$.jsxs)(b,{variant:`link-muted`,size:`xs`,className:`self-start p-0`,disabled:u,onClick:gi,"data-testid":`sync-blocking-terminal`,children:[(0,$.jsx)(De,{"data-icon":`inline-start`}),(0,$.jsx)(l,{id:`6EoD0z`})]}),t[16]=u,t[17]=x);let S;return t[18]!==y||t[19]!==x||t[20]!==m||t[21]!==h?(S=(0,$.jsxs)(`div`,{className:`flex flex-col gap-2 border-t pt-3`,children:[f,m,h,y,x]}),t[18]=y,t[19]=x,t[20]=m,t[21]=h,t[22]=S):S=t[22],S}function gi(){return dt(`git-status`)}function _i(e){return(0,$.jsx)(`li`,{title:e,className:`min-w-0 truncate font-mono text-2xs text-foreground`,children:e},e)}function vi(e=`sync`,t){_e(e).catch(e=>{console.warn(`[sync-badge] manual sync trigger failed`,e instanceof Error?e.message:e),t?.()})}function yi(e){typeof window>`u`||Be(window.location.hash,e)||(window.location.hash=e)}function bi(e){return e.kind===`doc`?Le(e.docName):Ie(e.path)}function xi(e){let t=Date.now()-new Date(e).getTime();if(t<6e4)return J._({id:`xOTzt5`});if(t<36e5){let e=Math.floor(t/6e4);return J._({id:`_rP3HI`,values:{minutes:e}})}if(t<864e5){let e=Math.floor(t/36e5);return J._({id:`nYeBmY`,values:{hours:e}})}return new Date(e).toLocaleDateString()}function Si(e){return e.syncMode===`follow`}function Ci(e){return e.state===`idle`&&e.conflictCount>0?`conflict`:e.state}function wi(e){let t=(0,Z.c)(12),{status:n}=e;switch(Ci(n)){case`dormant`:{let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(mt,{className:`size-3.5 text-muted-foreground`}),t[0]=e):e=t[0],e}case`idle`:{if(n.ahead>0||n.behind>0){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Me,{className:`size-3.5 text-muted-foreground`}),t[1]=e):e=t[1],e}let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(mt,{className:`size-3.5 text-muted-foreground`}),t[2]=e):e=t[2],e}case`fetching`:case`pulling`:case`pushing`:{let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(je,{"aria-hidden":`true`,icon:Me,className:`size-3.5 text-muted-foreground`}),t[3]=e):e=t[3],e}case`conflict`:{let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Pe,{className:`size-3.5 text-amber-500`}),t[4]=e):e=t[4],e}case`offline`:{let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(pt,{className:`size-3.5 text-muted-foreground`}),t[5]=e):e=t[5],e}case`auth-error`:{let e;return t[6]===n?e=t[7]:(e=ji(n)?(0,$.jsx)(ft,{className:`size-3.5 text-destructive`}):(0,$.jsx)(ht,{className:`size-3.5 text-destructive`}),t[6]=n,t[7]=e),e}case`disabled`:{if(n.pausedReason){let e;return t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Pe,{className:`size-3.5 text-amber-500`}),t[8]=e):e=t[8],e}if(n.ahead>0||n.behind>0){let e;return t[9]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Me,{className:`size-3.5 text-muted-foreground`}),t[9]=e):e=t[9],e}let e;return t[10]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(mt,{className:`size-3.5 text-muted-foreground`}),t[10]=e):e=t[10],e}default:{let e;return t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(mt,{className:`size-3.5 text-muted-foreground`}),t[11]=e):e=t[11],e}}}function Ti(e){switch(Ci(e)){case`idle`:return!Si(e)&&e.ahead>0?`↑${e.ahead}`:e.behind>0?`↓${e.behind}`:``;case`fetching`:case`pulling`:case`pushing`:return``;case`conflict`:return e.conflictCount>0?`${e.conflictCount}`:``;case`offline`:return``;case`auth-error`:return``;default:return``}}function Ei(e){let t=Si(e),n=Ci(e);switch(n){case`dormant`:return J._({id:`RmBY0A`});case`idle`:return t?J._({id:`j5CWO4`}):J._({id:`N2FcBE`});case`fetching`:return t?J._({id:`7IsvrP`}):J._({id:`Wgmlsw`});case`pulling`:return t?J._({id:`JL3si7`}):J._({id:`4uNLmk`});case`pushing`:return J._({id:`iycx_A`});case`conflict`:return J._({id:`IInnZo`});case`offline`:return J._({id:`6Aih4U`});case`auth-error`:return J._({id:`mHVPm5`});case`disabled`:return e.pausedReason?J._({id:`U6wmNc`}):J._({id:`BWTzAb`});default:return n}}function Di(e){switch(e){case`external-changes-pending`:return J._({id:`W9_Bub`});case`dirty-tree`:return J._({id:`a5Gha5`});case`non-content-merge-failure`:return J._({id:`sIxSSP`});case`detached-head`:return J._({id:`uQNW00`});case`diverged-local-commits`:return J._({id:`LQsCPn`});case`auth-error`:return J._({id:`mHVPm5`});case`protected-branch`:return J._({id:`8fc_3j`});case`no-push-permission`:return J._({id:`EiVgl5`});default:return e}}function Oi(e,t){let n=[];switch(e){case`not-authenticated`:n.push(J._({id:`ycIX5i`}));break;case`no-collaborator`:n.push(J._({id:`EiVgl5`}));break;case`private-no-access`:n.push(J._({id:`07gHun`}));break;case`repo-not-found`:n.push(J._({id:`uksqrP`}));break;default:n.push(J._({id:`EiVgl5`}))}return n.push(...ki(t)),n}function ki(e){let t=[];if(e?.resolvedLogin){let n=e.resolvedLogin;t.push(J._({id:`ZKVuLY`,values:{login:n}}))}return e?.declaredLogin&&t.push(Ai(e.declaredLogin,e.declaredSource)),t}function Ai(e,t){switch(t){case`remote-url`:return J._({id:`CMd-g-`,values:{declaredLogin:e}});case`credential-config`:return J._({id:`akOe4q`,values:{declaredLogin:e}});default:return J._({id:`GBEqoP`,values:{declaredLogin:e}})}}function ji(e){return e.pushErrorCode===`auth-not-found-as-identity`||e.pullErrorCode===`auth-not-found-as-identity`}function Mi(e){return e?.pausedReason===`auth-error`&&ji(e)}function Ni(e){return e?.checkStatus===`denied`&&e.deniedReason===`not-authenticated`}function Pi(e){switch(e){case`auth-403`:return J._({id:`EiVgl5`});case`auth-401`:return J._({id:`-Qw-1t`});case`auth-scope-mismatch`:return J._({id:`Zue_jx`});case`auth-no-credential`:return J._({id:`uCaIdy`});case`semantic-protected-branch`:return J._({id:`T0OVm7`});case`auth-not-found-as-identity`:return J._({id:`jRsjlF`});default:return J._({id:`1AumWo`})}}function Fi(e){switch(e){case`auth-403`:return J._({id:`RgbKEe`});case`auth-401`:return J._({id:`-Qw-1t`});case`auth-scope-mismatch`:return J._({id:`Zue_jx`});case`auth-no-credential`:return J._({id:`uCaIdy`});case`auth-not-found-as-identity`:return J._({id:`jRsjlF`});default:return J._({id:`jZ_E5M`})}}function Ii(e){switch(e){case`auth-403`:return J._({id:`RgbKEe`});case`auth-401`:return J._({id:`-Qw-1t`});case`auth-scope-mismatch`:return J._({id:`Zue_jx`});case`auth-no-credential`:return J._({id:`uCaIdy`});case`semantic-protected-branch`:return J._({id:`T0OVm7`});case`auth-not-found-as-identity`:return J._({id:`jRsjlF`});default:return J._({id:`cUk6TF`})}}function Li(e){let t=e.pushErrorCode!=null||e.pushError!=null,n=e.pullErrorCode!=null||e.pullError!=null;if(t&&n&&(e.pushErrorCode==null?e.pullErrorCode==null&&e.pushError===e.pullError:e.pushErrorCode===e.pullErrorCode))return[{key:`sync`,direction:null,message:e.pushErrorCode==null?e.pushError:Ii(e.pushErrorCode)}];let r=t&&n,i=[];return t&&i.push({key:`push`,direction:r?`push`:null,message:e.pushErrorCode?Pi(e.pushErrorCode):e.pushError}),n&&i.push({key:`pull`,direction:r?`pull`:null,message:e.pullErrorCode?Fi(e.pullErrorCode):e.pullError}),i}function Ri(e){return e?.checkStatus===`unknown`&&e.unknownError===`token-invalid`}function zi(e){return Ci(e)===`auth-error`&&ji(e)?J._({id:`EkEFE3`}):Ei(e)}function Bi(e){let t=Si(e),n=Ci(e);if(n===`conflict`&&e.conflictCount>0){let{conflictCount:t}=e;return J._({id:`cUK8lW`,values:{conflictCount:t}})}if(n===`idle`){let{ahead:n,behind:r}=e;return t?r>0?J._({id:`9o1bIV`,values:{behind:r}}):J._({id:`j5CWO4`}):n>0&&r>0?J._({id:`5F5HYj`,values:{ahead:n,behind:r}}):n>0?J._({id:`PdA9NZ`,values:{ahead:n}}):r>0?J._({id:`9o1bIV`,values:{behind:r}}):J._({id:`N2FcBE`})}return zi(e)}function Vi(e){let t=(0,Z.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,$.jsx)(`span`,{className:`font-mono uppercase tracking-wide text-2xs text-muted-foreground`,children:n}),t[0]=n,t[1]=r),r}function Hi(e){switch(e){case`M`:return J._({id:`tgWuMB`});case`A`:return J._({id:`hp8OtS`});case`D`:return J._({id:`vGjmyl`});case`R`:return J._({id:`QeREu8`});case`C`:return J._({id:`6V3Ea3`});case`U`:return J._({id:`cyoNqf`});case`T`:return J._({id:`zWZBPx`});case`?`:return J._({id:`C2abof`});case`!`:return J._({id:`xDKOFk`});default:return J._({id:`cNsIJf`})}}function Ui(e){switch(e){case`D`:return`destructive`;case`U`:return`warning`;default:return`gray`}}function Wi(e){let t=(0,Z.c)(24),{entry:n,dimmed:r}=e,i;t[0]===n.code?i=t[1]:(i=Hi(n.code),t[0]=n.code,t[1]=i);let a=i,o=n.open,s=`truncate font-mono text-2xs ${r?`text-muted-foreground/60`:`text-foreground`}`,c;t[2]===n.code?c=t[3]:(c=Ui(n.code),t[2]=n.code,t[3]=c);let l;t[4]===n.code?l=t[5]:(l=(0,$.jsx)(`span`,{"aria-hidden":!0,children:n.code}),t[4]=n.code,t[5]=l);let u;t[6]===a?u=t[7]:(u=(0,$.jsx)(`span`,{className:`sr-only`,children:a}),t[6]=a,t[7]=u);let d;t[8]!==c||t[9]!==l||t[10]!==u?(d=(0,$.jsx)(S,{asChild:!0,children:(0,$.jsxs)(tt,{variant:c,className:`size-4 shrink-0 justify-center p-0 text-2xs leading-none`,children:[l,u]})}),t[8]=c,t[9]=l,t[10]=u,t[11]=d):d=t[11];let f;t[12]===a?f=t[13]:(f=(0,$.jsx)(C,{children:a}),t[12]=a,t[13]=f);let p;t[14]!==d||t[15]!==f?(p=(0,$.jsxs)(w,{children:[d,f]}),t[14]=d,t[15]=f,t[16]=p):p=t[16];let m;t[17]!==n.path||t[18]!==o||t[19]!==s?(m=o?(0,$.jsx)(Qe,{asChild:!0,children:(0,$.jsx)(b,{variant:`link`,size:`xs`,className:`h-auto min-h-6 min-w-0 shrink justify-start overflow-hidden p-0 font-normal`,onClick:()=>yi(bi(o)),"data-testid":`worktree-row-open`,children:(0,$.jsx)(`span`,{title:n.path,className:`min-w-0 ${s}`,children:n.path})})}):(0,$.jsx)(`span`,{title:n.path,className:s,children:n.path}),t[17]=n.path,t[18]=o,t[19]=s,t[20]=m):m=t[20];let h;return t[21]!==p||t[22]!==m?(h=(0,$.jsxs)(`li`,{className:`flex min-w-0 items-center gap-2`,children:[p,m]}),t[21]=p,t[22]=m,t[23]=h):h=t[23],h}function Gi(e){let t=(0,Z.c)(15),{title:n,note:r,entries:i,dimmed:a}=e,o=a===void 0?!1:a;if(i.length===0)return null;let s;t[0]===n?s=t[1]:(s=(0,$.jsx)(`span`,{className:`text-2xs font-medium text-muted-foreground`,children:n}),t[0]=n,t[1]=s);let c;t[2]===r?c=t[3]:(c=r&&(0,$.jsx)(`span`,{className:`text-2xs text-muted-foreground/80`,children:r}),t[2]=r,t[3]=c);let l;if(t[4]!==o||t[5]!==i){let e;t[7]===o?e=t[8]:(e=e=>(0,$.jsx)(Wi,{entry:e,dimmed:o},`${e.code}:${e.path}`),t[7]=o,t[8]=e),l=i.map(e),t[4]=o,t[5]=i,t[6]=l}else l=t[6];let u;t[9]===l?u=t[10]:(u=(0,$.jsx)(`ul`,{className:`flex flex-col gap-1`,children:l}),t[9]=l,t[10]=u);let d;return t[11]!==s||t[12]!==c||t[13]!==u?(d=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[s,c,u]}),t[11]=s,t[12]=c,t[13]=u,t[14]=d):d=t[14],d}function Ki(e){let t=(0,Z.c)(9),{direction:n,count:r}=e,{_:i}=u();if(r<=0)return null;let a;t[0]===n?a=t[1]:(a=n===`behind`?(0,$.jsx)(Se,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":!0}):(0,$.jsx)(xe,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":!0}),t[0]=n,t[1]=a);let o;t[2]!==i||t[3]!==r||t[4]!==n?(o=i(n===`behind`?{id:`sKHiNR`,values:{count:r}}:{id:`9ZxzfT`,values:{count:r}}),t[2]=i,t[3]=r,t[4]=n,t[5]=o):o=t[5];let s;return t[6]!==a||t[7]!==o?(s=(0,$.jsxs)(`span`,{className:`flex flex-1 items-center gap-1.5 rounded-md bg-muted px-2 py-1 text-xs text-foreground`,children:[a,o]}),t[6]=a,t[7]=o,t[8]=s):s=t[8],s}function qi(e){let t=new Set,n=[],r=[];for(let i of[...e.staged,...e.notStaged,...e.untracked])t.has(i.path)||(t.add(i.path),(i.syncScoped?n:r).push(i));return{willPush:n,wontPush:r}}function Ji(e){let t=(0,Z.c)(24),{status:n,worktree:r,loading:i}=e,a;t[0]===r?a=t[1]:(a=r?qi(r):{willPush:[],wontPush:[]},t[0]=r,t[1]=a);let{willPush:o,wontPush:s}=a,c;t[2]===r?.incoming?c=t[3]:(c=r?.incoming??[],t[2]=r?.incoming,t[3]=c);let u=c,d=r!==null&&r.readable===!1,f=r!==null&&o.length===0&&s.length===0&&u.length===0,p;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(Vi,{children:(0,$.jsx)(l,{id:`uAQUqI`})}),t[4]=p):p=t[4];let m;t[5]===r?m=t[6]:(m=r&&(r.branch||r.detached)&&(0,$.jsx)(`span`,{className:`min-w-0 truncate font-mono text-2xs text-muted-foreground`,children:r.detached?(0,$.jsx)(l,{id:`OBdkpo`}):r.upstream?`${r.branch} → ${r.upstream}`:r.branch}),t[5]=r,t[6]=m);let h;t[7]===m?h=t[8]:(h=(0,$.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2`,children:[p,m]}),t[7]=m,t[8]=h);let g;t[9]!==n.ahead||t[10]!==n.behind?(g=(n.behind>0||n.ahead>0)&&(0,$.jsxs)(`div`,{className:`flex items-stretch gap-2`,children:[(0,$.jsx)(Ki,{direction:`behind`,count:n.behind}),(0,$.jsx)(Ki,{direction:`ahead`,count:n.ahead})]}),t[9]=n.ahead,t[10]=n.behind,t[11]=g):g=t[11];let _;t[12]!==f||t[13]!==u||t[14]!==i||t[15]!==d||t[16]!==o||t[17]!==s||t[18]!==r?(_=i?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,$.jsx)(l,{id:`eolhcI`})}):d?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,"data-testid":`worktree-unreadable`,children:(0,$.jsx)(l,{id:`L9ox9k`})}):f?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,$.jsx)(l,{id:`WfcERq`})}):r&&(0,$.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[(0,$.jsx)(Gi,{title:(0,$.jsx)(l,{id:`NcwbBM`}),entries:u}),(0,$.jsx)(Gi,{title:(0,$.jsx)(l,{id:`JOhCT9`}),entries:o}),(0,$.jsx)(Gi,{title:(0,$.jsx)(l,{id:`vsFXfP`}),note:(0,$.jsx)(l,{id:`PxZCNM`}),entries:s,dimmed:!0}),r.truncated&&(0,$.jsx)(`p`,{className:`text-2xs text-muted-foreground`,children:(0,$.jsx)(l,{id:`KvwJv8`})})]}),t[12]=f,t[13]=u,t[14]=i,t[15]=d,t[16]=o,t[17]=s,t[18]=r,t[19]=_):_=t[19];let v;return t[20]!==h||t[21]!==g||t[22]!==_?(v=(0,$.jsxs)(`div`,{className:`flex flex-col gap-2.5 border-t pt-3`,children:[h,g,_]}),t[20]=h,t[21]=g,t[22]=_,t[23]=v):v=t[23],v}function Yi(e){let t=(0,Z.c)(19),{pulledAt:n,pushedAt:r,combinedAt:i}=e,{_:a}=u(),o,s,c;if(t[0]!==a||t[1]!==i||t[2]!==n||t[3]!==r){o=n===null?null:xi(n),s=r===null?null:xi(r);let e=i===null?null:xi(i);c=o!==null&&s!==null?a({id:`1TA-aJ`,values:{pulled:o,pushed:s}}):o===null?s===null?e===null?null:a({id:`irnKr_`,values:{updatedRelative:e}}):a({id:`lPkjpD`,values:{pushed:s}}):a({id:`xW5AUw`,values:{pulled:o}}),t[0]=a,t[1]=i,t[2]=n,t[3]=r,t[4]=o,t[5]=s,t[6]=c}else o=t[4],s=t[5],c=t[6];let l=c,d=o!==null||s!==null;if(l===null){let e;return t[7]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`span`,{}),t[7]=e):e=t[7],e}let f;t[8]!==l||t[9]!==d?(f=d&&(0,$.jsx)(`span`,{className:`sr-only`,"data-testid":`sync-popover-last-sync-label`,children:l}),t[8]=l,t[9]=d,t[10]=f):f=t[10];let p;t[11]!==l||t[12]!==o||t[13]!==s||t[14]!==d?(p=d?(0,$.jsxs)(`span`,{"aria-hidden":`true`,className:`inline-flex items-center gap-1`,children:[o!==null&&(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-0.5`,children:[(0,$.jsx)(Se,{className:`size-3`}),o]}),o!==null&&s!==null&&(0,$.jsx)(`span`,{children:`·`}),s!==null&&(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-0.5`,children:[(0,$.jsx)(xe,{className:`size-3`}),s]})]}):(0,$.jsx)(`span`,{"aria-hidden":`true`,children:l}),t[11]=l,t[12]=o,t[13]=s,t[14]=d,t[15]=p):p=t[15];let m;return t[16]!==f||t[17]!==p?(m=(0,$.jsxs)(`span`,{className:`text-xs text-muted-foreground`,"data-testid":`sync-popover-last-sync`,children:[f,p]}),t[16]=f,t[17]=p,t[18]=m):m=t[18],m}function Xi(e){let t=(0,Z.c)(145),{status:n,onSignIn:r,onSetIdentity:i}=e,{_:a}=u(),{conflictCount:o}=n,{projectLocalConfig:c,projectLocalSynced:d}=pe(),f=c?.autoSync,{mode:p,confirmOpen:m,setConfirmOpen:h,pendingMode:g,strandedCommitCount:_,onModeSelect:v,onConfirm:y}=ve(f,n.ahead),{status:x,loading:S}=fi(!0),C=p===`follow`,w;t[0]===n?w=t[1]:(w=Ci(n),t[0]=n,t[1]=w);let T=w,E;t[2]===n?E=t[3]:(E=ji(n),t[2]=n,t[3]=E);let D=E,O=n.lastPullOkUtc??null,k=n.lastPushOkUtc??null,A=n.lastRunUtc??n.lastSyncUtc??null,j=n.pushPermission?.checkStatus===`denied`&&n.pushPermission.deniedReason!==`not-authenticated`&&!D,M=!j,N=T===`fetching`||T===`pulling`||T===`pushing`,[P,F]=(0,Q.useState)(null),I,L;t[4]===N?(I=t[5],L=t[6]):(I=()=>{N||F(null)},L=[N],t[4]=N,t[5]=I,t[6]=L),(0,Q.useEffect)(I,L);let R;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(R=e=>{F(t=>t===e?null:t)},t[7]=R):R=t[7];let re=R,V=N?P??(T===`pushing`?`push`:`pull`):null,H;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(H=e=>{F(e),vi(e,()=>re(e))},t[8]=H):H=t[8];let U=H,W=T===`dormant`||T===`auth-error`||n.state===`conflict`,G=W||n.conflictCount>0,K;t[9]===n.blockingPaths?K=t[10]:(K=n.blockingPaths??[],t[9]=n.blockingPaths,t[10]=K);let ie=K,{conflicts:ae}=xr(),oe=ae[0]??null,se=T===`conflict`&&oe!==null,le;t[11]===n?le=t[12]:(le=(0,$.jsx)(wi,{status:n}),t[11]=n,t[12]=le);let q;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,$.jsx)(`span`,{className:`text-1sm font-medium`,children:(0,$.jsx)(l,{id:`yZepkk`})}),t[13]=q):q=t[13];let ue;t[14]===le?ue=t[15]:(ue=(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[le,q]}),t[14]=le,t[15]=ue);let J;t[16]!==a||t[17]!==n.remote?(J=n.remote&&(n.remote.webUrl?(0,$.jsxs)(`a`,{href:n.remote.webUrl,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex min-w-0 items-center gap-0.5 text-xs text-foreground hover:text-primary hover:underline`,"aria-label":a({id:`1nke1r`,values:{0:n.remote.label}}),children:[(0,$.jsx)(`span`,{className:`truncate`,children:n.remote.label}),(0,$.jsx)(Ce,{className:`size-3.5 shrink-0`,"aria-hidden":!0})]}):(0,$.jsx)(`span`,{className:`min-w-0 truncate text-xs text-foreground`,children:n.remote.label})),t[16]=a,t[17]=n.remote,t[18]=J):J=t[18];let de;t[19]!==ue||t[20]!==J?(de=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[ue,J]}),t[19]=ue,t[20]=J,t[21]=de):de=t[21];let fe=g??`full`,Y;t[22]!==m||t[23]!==y||t[24]!==h||t[25]!==_||t[26]!==fe?(Y=(0,$.jsx)(ye,{open:m,onOpenChange:h,onConfirm:y,variant:fe,strandedCommitCount:_}),t[22]=m,t[23]=y,t[24]=h,t[25]=_,t[26]=fe,t[27]=Y):Y=t[27];let me;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,$.jsx)(Vi,{children:(0,$.jsx)(l,{id:`CnOGgs`})}),t[28]=me):me=t[28];let he;t[29]===v?he=t[30]:(he=e=>{ce(e)&&v(e)},t[29]=v,t[30]=he);let X=!d,ge;t[31]===a?ge=t[32]:(ge=a({id:`CnOGgs`}),t[31]=a,t[32]=ge);let _e;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,$.jsx)(ne,{}),t[33]=_e):_e=t[33];let be;t[34]===ge?be=t[35]:(be=(0,$.jsx)(te,{size:`sm`,className:`w-full text-xs`,"aria-label":ge,"data-testid":`sync-mode-select`,children:_e}),t[34]=ge,t[35]=be);let we;t[36]===a?we=t[37]:(we=a({id:`BWTzAb`}),t[36]=a,t[37]=we);let Te;t[38]===we?Te=t[39]:(Te=(0,$.jsx)(z,{value:`off`,className:`text-xs`,children:we}),t[38]=we,t[39]=Te);let Ee;t[40]===a?Ee=t[41]:(Ee=a({id:`tlGXxX`}),t[40]=a,t[41]=Ee);let De;t[42]===Ee?De=t[43]:(De=(0,$.jsx)(z,{value:`follow`,className:`text-xs`,children:Ee}),t[42]=Ee,t[43]=De);let Oe;t[44]===a?Oe=t[45]:(Oe=a({id:`IXiG0B`}),t[44]=a,t[45]=Oe);let ke;t[46]!==j||t[47]!==Oe?(ke=(0,$.jsx)(z,{value:`full`,className:`text-xs`,disabled:j,children:Oe}),t[46]=j,t[47]=Oe,t[48]=ke):ke=t[48];let Ae;t[49]!==Te||t[50]!==De||t[51]!==ke?(Ae=(0,$.jsxs)(ee,{children:[Te,De,ke]}),t[49]=Te,t[50]=De,t[51]=ke,t[52]=Ae):Ae=t[52];let Ne;t[53]!==p||t[54]!==he||t[55]!==X||t[56]!==be||t[57]!==Ae?(Ne=(0,$.jsxs)(B,{value:p,onValueChange:he,disabled:X,children:[be,Ae]}),t[53]=p,t[54]=he,t[55]=X,t[56]=be,t[57]=Ae,t[58]=Ne):Ne=t[58];let Pe;t[59]===p?Pe=t[60]:(Pe=(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,"data-testid":`sync-popover-mode-line`,children:p===`off`?(0,$.jsx)(l,{id:`qD3krc`}):p===`follow`?(0,$.jsx)(l,{id:`PGRnbw`}):(0,$.jsx)(l,{id:`zBiFZh`})}),t[59]=p,t[60]=Pe);let Fe;t[61]!==Ne||t[62]!==Pe?(Fe=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[me,Ne,Pe]}),t[61]=Ne,t[62]=Pe,t[63]=Fe):Fe=t[63];let Ie;t[64]===Symbol.for(`react.memo_cache_sentinel`)?(Ie=(0,$.jsx)(Vi,{children:(0,$.jsx)(l,{id:`BWTzAb`})}),t[64]=Ie):Ie=t[64];let Re=N||W,Be;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(Be=()=>U(`pull`),t[65]=Be):Be=t[65];let Ve;t[66]===V?Ve=t[67]:(Ve=V===`pull`?(0,$.jsx)(je,{"aria-hidden":`true`,"data-icon":`inline-start`}):(0,$.jsx)(Se,{"data-icon":`inline-start`}),t[66]=V,t[67]=Ve);let He;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(He=(0,$.jsx)(l,{id:`e4GHWP`}),t[68]=He):He=t[68];let Ue;t[69]!==Re||t[70]!==Ve?(Ue=(0,$.jsxs)(b,{variant:`outline`,size:`xs`,className:`flex-1`,disabled:Re,onClick:Be,"data-testid":`sync-popover-pull`,children:[Ve,He]}),t[69]=Re,t[70]=Ve,t[71]=Ue):Ue=t[71];let We;t[72]!==N||t[73]!==M||t[74]!==G||t[75]!==V?(We=M&&(0,$.jsxs)(b,{variant:`outline`,size:`xs`,className:`flex-1`,disabled:N||G,onClick:()=>U(`push`),"data-testid":`sync-popover-push`,children:[V===`push`?(0,$.jsx)(je,{"aria-hidden":`true`,"data-icon":`inline-start`}):(0,$.jsx)(xe,{"data-icon":`inline-start`}),(0,$.jsx)(l,{id:`uO9WLl`})]}),t[72]=N,t[73]=M,t[74]=G,t[75]=V,t[76]=We):We=t[76];let Ge;t[77]!==Ue||t[78]!==We?(Ge=(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[Ue,We]}),t[77]=Ue,t[78]=We,t[79]=Ge):Ge=t[79];let Ke;t[80]!==N||t[81]!==M||t[82]!==G||t[83]!==V?(Ke=M&&(0,$.jsxs)(b,{size:`xs`,className:`w-full`,disabled:N||G,onClick:()=>U(`sync`),"data-testid":`sync-popover-sync`,children:[V===`sync`?(0,$.jsx)(je,{"aria-hidden":`true`,icon:Me,"data-icon":`inline-start`}):(0,$.jsx)(Me,{"data-icon":`inline-start`}),(0,$.jsx)(l,{id:`YEzhIr`})]}),t[80]=N,t[81]=M,t[82]=G,t[83]=V,t[84]=Ke):Ke=t[84];let qe;t[85]!==Ge||t[86]!==Ke?(qe=(0,$.jsxs)(`div`,{className:`flex flex-col gap-2 border-t pt-3`,children:[Ie,Ge,Ke]}),t[85]=Ge,t[86]=Ke,t[87]=qe):qe=t[87];let Je;if(t[88]!==a||t[89]!==n){let e;t[91]===a?e=t[92]:(e=e=>(0,$.jsx)(`p`,{className:`text-xs text-destructive`,children:e.direction===`push`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`span`,{className:`font-medium`,children:[a({id:`uO9WLl`}),`: `]}),e.message]}):e.direction===`pull`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`span`,{className:`font-medium`,children:[a({id:`e4GHWP`}),`: `]}),e.message]}):e.message},e.key),t[91]=a,t[92]=e),Je=Li(n).map(e),t[88]=a,t[89]=n,t[90]=Je}else Je=t[90];let Ye;t[93]===n?Ye=t[94]:(Ye=Mi(n)&&n.pushPermission?.checkStatus===`denied`?ki(n.pushPermission).map(ea):null,t[93]=n,t[94]=Ye);let Xe;t[95]!==n.pausedReason||t[96]!==n.pushPermission?(Xe=n.pausedReason===`no-push-permission`&&n.pushPermission?.checkStatus===`denied`?ki(n.pushPermission).map($i):null,t[95]=n.pausedReason,t[96]=n.pushPermission,t[97]=Xe):Xe=t[97];let Ze;t[98]!==Je||t[99]!==Ye||t[100]!==Xe?(Ze=(0,$.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:`flex flex-col gap-3.5 empty:sr-only`,children:[Je,Ye,Xe]}),t[98]=Je,t[99]=Ye,t[100]=Xe,t[101]=Ze):Ze=t[101];let $e;t[102]!==ie||t[103]!==C||t[104]!==j||t[105]!==r||t[106]!==n?($e=!C&&Ni(n.pushPermission)?(0,$.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,$.jsx)(`p`,{className:`min-w-0 flex-1 text-xs text-muted-foreground`,children:(0,$.jsx)(l,{id:`ycIX5i`})}),r&&(0,$.jsx)(b,{variant:`outline`,size:`xs`,className:`self-start`,onClick:r,children:(0,$.jsx)(l,{id:`5lWFkC`})})]}):ie.length>0?(0,$.jsx)(hi,{paths:ie}):Mi(n)?null:n.pausedReason?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Di(n.pausedReason)}):!C&&j&&n.pushPermission?.checkStatus===`denied`?Oi(n.pushPermission.deniedReason,n.pushPermission).map(Qi):Ri(n.pushPermission)?(0,$.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,$.jsx)(`p`,{className:`min-w-0 flex-1 text-xs text-muted-foreground`,children:(0,$.jsx)(l,{id:`C_cPoW`})}),r&&(0,$.jsx)(b,{variant:`outline`,size:`xs`,className:`self-start`,onClick:r,children:(0,$.jsx)(l,{id:`5lWFkC`})})]}):null,t[102]=ie,t[103]=C,t[104]=j,t[105]=r,t[106]=n,t[107]=$e):$e=t[107];let et;t[108]!==oe||t[109]!==se||t[110]!==T?(et=T===`conflict`&&(0,$.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,$.jsx)(`p`,{className:`min-w-0 flex-1 text-xs text-amber-700 dark:text-amber-400`,children:(0,$.jsx)(l,{id:`ko386X`})}),se&&oe&&(0,$.jsx)(b,{variant:`outline`,size:`xs`,className:`self-start`,onClick:()=>yi(Le(ze(oe.file))),children:(0,$.jsx)(l,{id:`5k0NLb`})})]}),t[108]=oe,t[109]=se,t[110]=T,t[111]=et):et=t[111];let tt;t[112]!==r||t[113]!==T||t[114]!==n?(tt=T===`auth-error`&&!Mi(n)&&r&&(0,$.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,$.jsx)(`p`,{className:`min-w-0 flex-1 text-xs text-destructive`,children:(0,$.jsx)(l,{id:`Vl1H8I`})}),(0,$.jsx)(b,{variant:`outline`,size:`xs`,className:`self-start`,onClick:r,children:(0,$.jsx)(l,{id:`5lWFkC`})})]}),t[112]=r,t[113]=T,t[114]=n,t[115]=tt):tt=t[115];let nt;t[116]===o?nt=t[117]:(nt=o>0&&(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,$.jsx)(l,{id:`B4_ipX`,values:{conflictCount:o}})}),t[116]=o,t[117]=nt);let rt;t[118]!==n||t[119]!==x||t[120]!==S?(rt=(0,$.jsx)(Ji,{status:n,worktree:x,loading:S}),t[118]=n,t[119]=x,t[120]=S,t[121]=rt):rt=t[121];let it;t[122]!==A||t[123]!==O||t[124]!==k?(it=(0,$.jsx)(Yi,{pulledAt:O,pushedAt:k,combinedAt:A}),t[122]=A,t[123]=O,t[124]=k,t[125]=it):it=t[125];let at;t[126]===Symbol.for(`react.memo_cache_sentinel`)?(at=(0,$.jsx)(Qe,{asChild:!0,children:(0,$.jsxs)(b,{variant:`link`,size:`xs`,className:`h-auto p-0 text-xs text-muted-foreground hover:font-medium hover:text-foreground hover:no-underline`,onClick:Zi,"data-testid":`sync-popover-settings`,children:[(0,$.jsx)(s,{"data-icon":`inline-start`}),(0,$.jsx)(l,{id:`VNgKZz`})]})}),t[126]=at):at=t[126];let ot;t[127]===it?ot=t[128]:(ot=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[it,at]}),t[127]=it,t[128]=ot);let st;t[129]!==i||t[130]!==n.identityUnresolved?(st=n.identityUnresolved&&i&&(0,$.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-dashed p-2`,children:[(0,$.jsx)(_t,{className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground`}),(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,$.jsx)(`p`,{className:`text-xs leading-snug text-muted-foreground`,children:(0,$.jsx)(l,{id:`nrGWJ7`})}),(0,$.jsx)(b,{variant:`outline`,size:`xs`,className:`self-start`,onClick:i,children:(0,$.jsx)(l,{id:`keNFEd`})})]})]}),t[129]=i,t[130]=n.identityUnresolved,t[131]=st):st=t[131];let ct;return t[132]!==de||t[133]!==Y||t[134]!==Fe||t[135]!==qe||t[136]!==Ze||t[137]!==$e||t[138]!==et||t[139]!==tt||t[140]!==nt||t[141]!==rt||t[142]!==ot||t[143]!==st?(ct=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3.5`,children:[de,Y,Fe,qe,Ze,$e,et,tt,nt,rt,ot,st]}),t[132]=de,t[133]=Y,t[134]=Fe,t[135]=qe,t[136]=Ze,t[137]=$e,t[138]=et,t[139]=tt,t[140]=nt,t[141]=rt,t[142]=ot,t[143]=st,t[144]=ct):ct=t[144],ct}function Zi(){return ue({advanced:!0})}function Qi(e){return(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e},e)}function $i(e){return(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e},e)}function ea(e){return(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e},e)}function ta(e){let t=(0,Z.c)(68),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{onSignIn:r,onSetIdentity:i}=n,{_:a}=u(),{status:o,fetchError:s}=ge();if(!o){if(s){let e;t[2]===a?e=t[3]:(e=a({id:`iqIDv4`}),t[2]=a,t[3]=e);let n;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(pt,{className:`size-3.5`}),t[4]=n):n=t[4];let r;t[5]===e?r=t[6]:(r=(0,$.jsx)(S,{asChild:!0,children:(0,$.jsx)(b,{variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground`,"aria-label":e,disabled:!0,children:n})}),t[5]=e,t[6]=r);let i;t[7]===s?i=t[8]:(i=(0,$.jsx)(C,{children:s===`network`?(0,$.jsx)(l,{id:`I5AfhE`}):(0,$.jsx)(l,{id:`uKRYiW`})}),t[7]=s,t[8]=i);let o;return t[9]!==r||t[10]!==i?(o=(0,$.jsxs)(w,{children:[r,i]}),t[9]=r,t[10]=i,t[11]=o):o=t[11],o}return null}if(!o.hasRemote)return null;let c;t[12]===o?c=t[13]:(c=Ti(o),t[12]=o,t[13]=c);let d=c,f,p,m,h,g,_,v,y,x,T,E,D;if(t[14]!==a||t[15]!==o){let e=zi(o);_=!!o.identityUnresolved,g=$e,h=w,m=S,D=!0,p=Xe,E=!0,f=b,v=`ghost`,y=`icon-sm`,x=`text-muted-foreground relative`,T=a(_?{id:`DFfRbX`,values:{syncStateLabel:e}}:{id:`F4vEsL`,values:{syncStateLabel:e}}),t[14]=a,t[15]=o,t[16]=f,t[17]=p,t[18]=m,t[19]=h,t[20]=g,t[21]=_,t[22]=v,t[23]=y,t[24]=x,t[25]=T,t[26]=E,t[27]=D}else f=t[16],p=t[17],m=t[18],h=t[19],g=t[20],_=t[21],v=t[22],y=t[23],x=t[24],T=t[25],E=t[26],D=t[27];let O;t[28]===o?O=t[29]:(O=(0,$.jsx)(wi,{status:o}),t[28]=o,t[29]=O);let k;t[30]===d?k=t[31]:(k=d&&(0,$.jsx)(`span`,{className:`absolute -top-0.5 -right-0.5 text-[9px] leading-none font-medium bg-background border rounded-full px-0.5`,children:d}),t[30]=d,t[31]=k);let A;t[32]!==d||t[33]!==_?(A=!d&&_&&(0,$.jsx)(`span`,{className:`absolute -top-0.5 -right-0.5 size-1.5 rounded-full bg-amber-500 ring-2 ring-background`,"aria-hidden":!0}),t[32]=d,t[33]=_,t[34]=A):A=t[34];let j;t[35]!==f||t[36]!==k||t[37]!==A||t[38]!==v||t[39]!==y||t[40]!==x||t[41]!==T||t[42]!==O?(j=(0,$.jsxs)(f,{variant:v,size:y,className:x,"aria-label":T,children:[O,k,A]}),t[35]=f,t[36]=k,t[37]=A,t[38]=v,t[39]=y,t[40]=x,t[41]=T,t[42]=O,t[43]=j):j=t[43];let M;t[44]!==p||t[45]!==j||t[46]!==E?(M=(0,$.jsx)(p,{asChild:E,children:j}),t[44]=p,t[45]=j,t[46]=E,t[47]=M):M=t[47];let N;t[48]!==m||t[49]!==M||t[50]!==D?(N=(0,$.jsx)(m,{asChild:D,children:M}),t[48]=m,t[49]=M,t[50]=D,t[51]=N):N=t[51];let P;t[52]===o?P=t[53]:(P=Bi(o),t[52]=o,t[53]=P);let F;t[54]===P?F=t[55]:(F=(0,$.jsx)(C,{children:P}),t[54]=P,t[55]=F);let I;t[56]!==h||t[57]!==N||t[58]!==F?(I=(0,$.jsxs)(h,{children:[N,F]}),t[56]=h,t[57]=N,t[58]=F,t[59]=I):I=t[59];let L;t[60]!==i||t[61]!==r||t[62]!==o?(L=(0,$.jsx)(Ze,{align:`end`,className:`flex max-h-(--radix-popover-content-available-height) w-80 flex-col overflow-y-auto p-3`,children:(0,$.jsx)(Xi,{status:o,onSignIn:r,onSetIdentity:i})}),t[60]=i,t[61]=r,t[62]=o,t[63]=L):L=t[63];let R;return t[64]!==g||t[65]!==I||t[66]!==L?(R=(0,$.jsxs)(g,{children:[I,L]}),t[64]=g,t[65]=I,t[66]=L,t[67]=R):R=t[67],R}function na(e){let t=(0,Z.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,size:i,asChild:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=i===void 0?`default`:i,s=a!==void 0&&a?x:`div`,c;t[5]===n?c=t[6]:(c=f(`group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,n),t[5]=n,t[6]=c);let l;return t[7]!==s||t[8]!==r||t[9]!==o||t[10]!==c?(l=(0,$.jsx)(s,{"data-slot":`card`,"data-size":o,className:c,...r}),t[7]=s,t[8]=r,t[9]=o,t[10]=c,t[11]=l):l=t[11],l}function ra(e){let t=(0,Z.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=f(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(`div`,{"data-slot":`card-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ia(e){let t=(0,Z.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=f(`cn-font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(`div`,{"data-slot":`card-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function aa(e){let t=(0,Z.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=f(`text-sm text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(`div`,{"data-slot":`card-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function oa(e){let t=(0,Z.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=f(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(`div`,{"data-slot":`card-action`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function sa(e){let t=(0,Z.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=f(`px-(--card-spacing)`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(`div`,{"data-slot":`card-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ca(e){let t=(0,Z.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=f(`flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(`div`,{"data-slot":`card-footer`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var la=`npx @inkeep/open-knowledge cowork`,ua=`https://openknowledge.ai/docs/integrations/claude-code`;function da(){return typeof window<`u`&&typeof window.okDesktop?.skill==`object`}function fa(e){let t=(0,Z.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,$.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 font-mono text-[0.85em]`,children:n}),t[0]=n,t[1]=r),r}function pa(e){let t=(0,Z.c)(5),{children:n,className:r}=e,i;t[0]===r?i=t[1]:(i=f(`font-mono tracking-wide uppercase text-primary font-medium text-xs`,r),t[0]=r,t[1]=i);let a;return t[2]!==n||t[3]!==i?(a=(0,$.jsx)(`p`,{className:i,children:n}),t[2]=n,t[3]=i,t[4]=a):a=t[4],a}function ma(e){let t=(0,Z.c)(4),{n}=e,r;t[0]===n?r=t[1]:(r=n.toString().padStart(2,`0`),t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,$.jsx)(`span`,{"aria-hidden":`true`,className:`flex h-5 w-5 shrink-0 items-center justify-center text-xs font-medium text-muted-foreground font-mono tabular-nums`,children:r}),t[2]=r,t[3]=i),i}function ha(){let e=(0,Z.c)(8),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(pa,{children:(0,$.jsx)(l,{id:`cIptmH`})}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(ma,{n:1}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsxs)(`li`,{className:`flex gap-3`,children:[n,(0,$.jsx)(`span`,{children:(0,$.jsx)(l,{id:`pHYP6v`,components:{0:(0,$.jsx)(`strong`,{className:`font-medium`}),1:(0,$.jsx)(be,{"aria-hidden":`true`,className:`inline h-3 w-3 text-muted-foreground`}),2:(0,$.jsx)(`strong`,{className:`font-medium`})}})})]}),e[2]=r):r=e[2];let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(ma,{n:2}),e[3]=i):i=e[3];let a;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsxs)(`li`,{className:`flex gap-3`,children:[i,(0,$.jsx)(`span`,{children:(0,$.jsx)(l,{id:`gGVP4q`,components:{0:(0,$.jsx)(`span`,{className:`inline-flex items-center justify-center font-medium border h-5 w-5 rounded-md text-xs`}),1:(0,$.jsx)(be,{"aria-hidden":`true`,className:`inline h-3 w-3 text-muted-foreground`}),2:(0,$.jsx)(`strong`,{className:`font-medium`}),3:(0,$.jsx)(be,{"aria-hidden":`true`,className:`inline h-3 w-3 text-muted-foreground`}),4:(0,$.jsx)(`strong`,{className:`font-medium`})}})})]}),e[4]=a):a=e[4];let o;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsx)(ma,{n:3}),e[5]=o):o=e[5];let s;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsxs)(`ol`,{className:`flex flex-col gap-4 text-sm`,children:[r,a,(0,$.jsxs)(`li`,{className:`flex gap-3`,children:[o,(0,$.jsx)(`span`,{children:(0,$.jsx)(l,{id:`COr1Y7`,components:{0:(0,$.jsx)(fa,{}),1:(0,$.jsx)(`strong`,{className:`font-medium`})}})})]})]}),e[6]=s):s=e[6];let c;return e[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[t,s,(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground mt-4`,children:(0,$.jsx)(l,{id:`kV2YZv`,components:{0:(0,$.jsx)(`strong`,{className:`font-medium`}),1:(0,$.jsx)(`strong`,{className:`font-medium`}),2:(0,$.jsx)(be,{"aria-hidden":`true`,className:`inline h-3 w-3 text-muted-foreground`}),3:(0,$.jsx)(be,{"aria-hidden":`true`,className:`inline h-3 w-3 text-muted-foreground`})}})})]}),e[7]=c):c=e[7],c}function ga(e){let t=(0,Z.c)(74),{open:r,onOpenChange:i,reinstall:a}=e,o=a===void 0?!1:a,{_:s}=u(),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c={kind:`idle`},t[0]=c):c=t[0];let[d,f]=(0,Q.useState)(c),[p,m]=(0,Q.useState)(!1),h,g;t[1]===r?(h=t[2],g=t[3]):(h=()=>{r||(f({kind:`idle`}),m(!1))},g=[r],t[1]=r,t[2]=h,t[3]=g),(0,Q.useEffect)(h,g);let _;t[4]===s?_=t[5]:(_=async function(){f({kind:`downloading`});let e=window.okDesktop?.skill;if(!e){f({kind:`error`,message:s({id:`y46m5r`})});return}let t=await e.buildAndOpen();if(t.ok)f({kind:`handed-off`,path:t.path});else{let e=t.message??t.reason;q.error(s({id:`hSySVc`,values:{msg:e}})),f({kind:`error`,message:t.reason===`open-failed`?s({id:`IA1wNb`,values:{msg:e}}):`${t.reason}: ${e}`})}},t[4]=s,t[5]=_);let v=_,y;t[6]===s?y=t[7]:(y=async function(){try{await navigator.clipboard.writeText(la),m(!0),setTimeout(()=>m(!1),2e3)}catch(e){let t=e,n=t instanceof Error?t.message:String(t);q.error(s({id:`Uw6ERJ`,values:{detail:n}}))}},t[6]=s,t[7]=y);let x=y,S;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(S=da(),t[8]=S):S=t[8];let C=S,w;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsx)(Ee,{"aria-hidden":`true`,className:`h-4 w-4`}),t[9]=w):w=t[9];let M;t[10]===o?M=t[11]:(M=(0,$.jsxs)(E,{className:`flex items-center gap-2`,children:[w,o?(0,$.jsx)(l,{id:`xNyj3h`}):(0,$.jsx)(l,{id:`7qRHf0`})]}),t[10]=o,t[11]=M);let N;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,$.jsx)(T,{children:(0,$.jsx)(l,{id:`9V0W-R`,components:{0:(0,$.jsx)(`strong`,{className:`font-medium text-foreground`})}})}),t[12]=N):N=t[12];let P;t[13]===M?P=t[14]:(P=(0,$.jsxs)(A,{children:[M,N]}),t[13]=M,t[14]=P);let F;t[15]===d.kind?F=t[16]:(F=d.kind===`idle`&&C&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,$.jsx)(pa,{className:`text-muted-foreground`,children:(0,$.jsx)(l,{id:`Dnn2XG`})}),(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,$.jsx)(l,{id:`RN62Q8`,components:{0:(0,$.jsx)(fa,{}),1:(0,$.jsx)(fa,{})}})})]}),(0,$.jsx)(ha,{})]}),t[15]=d.kind,t[16]=F);let I;t[17]!==s||t[18]!==p||t[19]!==x||t[20]!==d.kind?(I=d.kind===`idle`&&!C&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,$.jsx)(pa,{children:(0,$.jsx)(l,{id:`L8fKuc`})}),(0,$.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border bg-muted/40 p-2`,children:[(0,$.jsx)(`code`,{className:`flex-1 font-mono text-xs`,children:la}),(0,$.jsx)(b,{variant:`ghost`,size:`sm`,onClick:x,"aria-label":s({id:`Oos8fo`}),className:`h-7 gap-1`,children:p?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Te,{"aria-hidden":`true`,className:`h-3 w-3`}),(0,$.jsx)(l,{id:`6V3Ea3`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(n,{"aria-hidden":`true`,className:`h-3 w-3`}),(0,$.jsx)(l,{id:`he3ygx`})]})})]}),(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,$.jsx)(l,{id:`z60Lgn`,components:{0:(0,$.jsx)(fa,{})}})})]}),(0,$.jsx)(ha,{})]}),t[17]=s,t[18]=p,t[19]=x,t[20]=d.kind,t[21]=I):I=t[21];let L;t[22]===d.kind?L=t[23]:(L=d.kind===`downloading`&&(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,$.jsx)(je,{"aria-hidden":`true`,className:`h-4 w-4`}),(0,$.jsx)(l,{id:`bwil08`,components:{0:(0,$.jsx)(fa,{})}})]}),t[22]=d.kind,t[23]=L);let R;t[24]!==d.kind||t[25]!==d.path?(R=d.kind===`handed-off`&&C&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-primary/30 bg-primary/5 px-3 py-2`,children:[(0,$.jsx)(Te,{"aria-hidden":`true`,className:`mt-0.5 h-4 w-4 text-primary`}),(0,$.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,$.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:(0,$.jsx)(l,{id:`r51jLC`})}),(0,$.jsx)(`code`,{className:`font-mono text-xs text-muted-foreground`,children:d.path??`~/Downloads/openknowledge.skill`})]})]}),(0,$.jsx)(ha,{})]}),t[24]=d.kind,t[25]=d.path,t[26]=R):R=t[26];let z;t[27]===d.kind?z=t[28]:(z=d.kind===`handed-off`&&!C&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-primary/30 bg-primary/5 px-3 py-2`,children:[(0,$.jsx)(Te,{"aria-hidden":`true`,className:`mt-0.5 h-4 w-4 text-primary`}),(0,$.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,$.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:(0,$.jsx)(l,{id:`hynz2K`})}),(0,$.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,$.jsx)(l,{id:`qXg5W9`,components:{0:(0,$.jsx)(fa,{})}})})]})]}),(0,$.jsx)(ha,{})]}),t[27]=d.kind,t[28]=z);let ee;t[29]!==d.kind||t[30]!==d.message?(ee=d.kind===`error`&&(0,$.jsxs)(`div`,{className:`flex flex-col gap-2 text-sm`,children:[(0,$.jsx)(`span`,{className:`text-destructive`,children:d.message}),(0,$.jsx)(`a`,{href:ua,target:`_blank`,rel:`noopener noreferrer`,onClick:ba,onAuxClick:ya,className:`text-xs underline underline-offset-2 hover:text-foreground`,children:(0,$.jsx)(l,{id:`mGaZwZ`})})]}),t[29]=d.kind,t[30]=d.message,t[31]=ee):ee=t[31];let te;t[32]!==F||t[33]!==I||t[34]!==L||t[35]!==R||t[36]!==z||t[37]!==ee?(te=(0,$.jsx)(O,{children:(0,$.jsxs)(`div`,{className:`flex flex-col gap-6 py-2`,children:[F,I,L,R,z,ee]})}),t[32]=F,t[33]=I,t[34]=L,t[35]=R,t[36]=z,t[37]=ee,t[38]=te):te=t[38];let ne;t[39]===d.kind?ne=t[40]:(ne=d.kind!==`error`&&(0,$.jsxs)(`a`,{href:ua,target:`_blank`,rel:`noopener noreferrer`,onClick:va,onAuxClick:_a,className:`inline-flex items-center gap-1 self-center text-xs text-muted-foreground underline underline-offset-2 hover:text-foreground sm:mr-auto font-mono tracking-wide uppercase`,children:[(0,$.jsx)(l,{id:`U3IvM5`}),(0,$.jsx)(gt,{"aria-hidden":`true`,className:`h-3 w-3`})]}),t[39]=d.kind,t[40]=ne);let B;t[41]!==v||t[42]!==i||t[43]!==d.kind||t[44]!==o?(B=d.kind===`idle`&&C&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(b,{className:`uppercase font-mono`,variant:`outline`,onClick:()=>i(!1),children:(0,$.jsx)(l,{id:`dEgA5A`})}),(0,$.jsxs)(b,{onClick:v,children:[(0,$.jsx)(Ee,{"aria-hidden":`true`,className:`h-4 w-4`}),o?(0,$.jsx)(l,{id:`YGIi_c`}):(0,$.jsx)(l,{id:`TKQ7K-`})]})]}),t[41]=v,t[42]=i,t[43]=d.kind,t[44]=o,t[45]=B):B=t[45];let re;t[46]!==i||t[47]!==d.kind?(re=d.kind===`idle`&&!C&&(0,$.jsx)(b,{className:`uppercase font-mono`,variant:`outline`,onClick:()=>i(!1),children:(0,$.jsx)(l,{id:`yz7wBu`})}),t[46]=i,t[47]=d.kind,t[48]=re):re=t[48];let V;t[49]!==v||t[50]!==i||t[51]!==d.kind?(V=d.kind===`error`&&C&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(b,{className:`uppercase font-mono`,variant:`outline`,onClick:()=>i(!1),children:(0,$.jsx)(l,{id:`dEgA5A`})}),(0,$.jsxs)(b,{onClick:v,children:[(0,$.jsx)(Ee,{"aria-hidden":`true`,className:`h-4 w-4`}),(0,$.jsx)(l,{id:`KDw4GX`})]})]}),t[49]=v,t[50]=i,t[51]=d.kind,t[52]=V):V=t[52];let H;t[53]!==d.kind||t[54]!==o?(H=d.kind===`downloading`&&(0,$.jsxs)(b,{disabled:!0,children:[(0,$.jsx)(je,{"aria-hidden":`true`,className:`h-4 w-4`}),o?(0,$.jsx)(l,{id:`fIgqfQ`}):(0,$.jsx)(l,{id:`Wtw22s`})]}),t[53]=d.kind,t[54]=o,t[55]=H):H=t[55];let U;t[56]!==i||t[57]!==d.kind?(U=d.kind===`handed-off`&&(0,$.jsx)(b,{onClick:()=>i(!1),children:(0,$.jsx)(l,{id:`DPfwMq`})}),t[56]=i,t[57]=d.kind,t[58]=U):U=t[58];let W;t[59]!==ne||t[60]!==B||t[61]!==re||t[62]!==V||t[63]!==H||t[64]!==U?(W=(0,$.jsxs)(k,{children:[ne,B,re,V,H,U]}),t[59]=ne,t[60]=B,t[61]=re,t[62]=V,t[63]=H,t[64]=U,t[65]=W):W=t[65];let G;t[66]!==P||t[67]!==te||t[68]!==W?(G=(0,$.jsxs)(D,{className:`sm:max-w-lg`,"data-ok-layer-spawned":``,children:[P,te,W]}),t[66]=P,t[67]=te,t[68]=W,t[69]=G):G=t[69];let K;return t[70]!==i||t[71]!==r||t[72]!==G?(K=(0,$.jsx)(j,{open:r,onOpenChange:i,children:G}),t[70]=i,t[71]=r,t[72]=G,t[73]=K):K=t[73],K}function _a(e){return et(e,ua)}function va(e){return et(e,ua)}function ya(e){return et(e,ua)}function ba(e){return et(e,ua)}var xa=new Set;function Sa(e){for(let t of xa)try{t(e)}catch(e){console.warn(`[config-ignore-nested-error-events] listener threw:`,e)}}function Ca(e){return xa.add(e),()=>{xa.delete(e)}}var wa=new Set;function Ta(e){for(let t of wa)try{t(e)}catch(e){console.warn(`[config-validation-events] listener threw:`,e)}}function Ea(e){return wa.add(e),()=>{wa.delete(e)}}var Da=null;function Oa(){return Da}function ka(e){Da=e}export{At as $,Er as A,hr as B,$r as C,Dr as D,Rr as E,Sr as F,wn as G,fr as H,xr as I,tn as J,Cn as K,vr as L,Ar as M,jr as N,kr as O,Tr as P,zt as Q,_r as R,Ri as S,Fr as T,kn as U,gr as V,Tn as W,Vt as X,Yt as Y,Rt as Z,Di as _,Sa as a,Mi as b,na as c,aa as d,Tt as et,ca as f,ki as g,ta as h,Ea as i,wr as j,Or as k,oa as l,ia as m,ka as n,yt as nt,Ca as o,ra as p,bn as q,Ta as r,mt as rt,ga as s,Oa as t,bt as tt,sa as u,Ii as v,Pr as w,Ni as x,ji as y,yr as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{at as e,ot as t}from"./chunk-I66GZJ75-BIJACljW.js";var n=(n,r)=>t.lang.round(e.parse(n)[r]);export{n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-CfxA0Qtb.js";var t=e(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-CfxA0Qtb.js";var t=e(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-CfxA0Qtb.js";var t=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-aWKxesFC.js";import"./src-D_jMrcY1.js";import"./chunk-I66GZJ75-BIJACljW.js";import"./chunk-NSK5VX7P-DLJZ8VNx.js";import"./chunk-W5SLKNZC-dHRGG7r8.js";import"./chunk-UBXNYLIW-zy0cmc7-.js";import"./chunk-4I5QYGJK-DTmx7k3q.js";import"./chunk-WRU74C26-DC6Jygyt.js";import"./chunk-QR6OTTB3-DfBTRDdj.js";import"./chunk-7BUUIJ7U-DEVgK4C5.js";import"./chunk-7Z6QIM7H-CG3W4Gq4.js";import"./chunk-J7OUQ5F2-IIkcOqGv.js";import"./chunk-2GRJ4B5K-Cj6-Oom3.js";import"./chunk-XXDRQBXY-Bwmq4E1Q.js";import"./chunk-KBJHAD2P-B80ctoly.js";import{i as t,n,r,t as i}from"./chunk-GF5L2VYU-D2VOXB1D.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-aWKxesFC.js";import"./src-D_jMrcY1.js";import"./chunk-I66GZJ75-BIJACljW.js";import"./chunk-NSK5VX7P-DLJZ8VNx.js";import"./chunk-W5SLKNZC-dHRGG7r8.js";import"./chunk-UBXNYLIW-zy0cmc7-.js";import"./chunk-4I5QYGJK-DTmx7k3q.js";import"./chunk-WRU74C26-DC6Jygyt.js";import"./chunk-QR6OTTB3-DfBTRDdj.js";import"./chunk-7BUUIJ7U-DEVgK4C5.js";import"./chunk-7Z6QIM7H-CG3W4Gq4.js";import"./chunk-J7OUQ5F2-IIkcOqGv.js";import"./chunk-2GRJ4B5K-Cj6-Oom3.js";import"./chunk-XXDRQBXY-Bwmq4E1Q.js";import"./chunk-KBJHAD2P-B80ctoly.js";import{i as t,n,r,t as i}from"./chunk-GF5L2VYU-D2VOXB1D.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Nn as e,Pn as t}from"./dist-BTeDUJz7.js";var n={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.63.10`}?.VITE_APP_VERSION??`0.0.0-unknown`;function r(){return e({kind:`web`,runtimeVersion:n})}function i(){return t({kind:`web`,runtimeVersion:n})}export{r as n,i as r,n as t};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-BUgB2tll.js";import{Ar as t,Kn as n,Lr as r,Tn as i,Wn as a,ei as o,jn as s,jr as c,ri as l,si as u}from"./DocumentContext-DKudm1-z.js";import{n as d,r as f}from"./dist-Nvb76hAm.js";import{t as p}from"./compiler-runtime-BfE3aGVn.js";import{i as m}from"./local-menu-action-bus-CXdHCOml.js";import{t as h}from"./utils-CPqDy6Hr.js";import{t as g}from"./button-CA0dewJJ.js";import{i as _,n as ee,t as te}from"./tooltip-DPvMEqsq.js";import{xt as v}from"./CodeMirrorPropInput-BL-5Q3Jo.js";import{$n as y,Ln as b,Pi as x,Rn as S,_r as C,er as w}from"./dist-BTeDUJz7.js";import{n as T}from"./dist-DTX2HxC82.js";import{t as E}from"./dist-BgXDUIPy.js";import{t as ne}from"./createLucideIcon-CfxA0Qtb.js";import{t as re}from"./x-BAYve4SL.js";import{f as ie}from"./doc-paths-DRMElswC.js";var D=ne(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),O=p(),k=`var(--ok-comment-hue,37,99,235)`,ae=k,oe={fill:.22,line:.7},A={fill:.45,line:1},se=.45;function ce(e,t){let n=ae,{fill:r,line:i}=t?A:oe;return[`border-radius:2px`,`padding-bottom:1px`,...e.id===null?[]:[`cursor:pointer`],`background-color:rgba(${n},${r})`,`box-shadow:inset 0 -2px 0 rgba(${n},${i})`,``].join(`;`)}function j(e){return e.map(e=>e.id??`·`).join(`|`)}function le(e){let t=null;for(let n of e)n.id!==null&&(t===null||n.to-n.from<t.to-t.from)&&(t=n);return t?.id??null}function ue(e,t){return e.id===null||e.id===t}function de(e,t=null){let n=[...e].filter(e=>e.from<e.to).sort((e,t)=>e.from-t.from||e.to-t.to||(e.id??``).localeCompare(t.id??``));if(n.length===0)return[];let r=[...new Set(n.flatMap(e=>[e.from,e.to]))].sort((e,t)=>e-t),i=[],a=null,o=()=>{if(a===null)return;let e=a.covering.find(e=>ue(e,t));i.push({from:a.from,to:a.to,style:ce(e??a.covering[0],e!==void 0),threadId:le(a.covering)}),a=null};for(let e=0;e<r.length-1;e++){let t=r[e],i=r[e+1],s=n.filter(e=>e.from<=t&&e.to>=i);if(s.length===0){o();continue}if(a!==null&&a.to===t&&j(a.covering)===j(s)){a.to=i;continue}o(),a={from:t,to:i,covering:s}}return o(),i}var M=`data-comment-reveal`;function N(e){return typeof CSS<`u`&&CSS.escape?CSS.escape(e):e}function P(e){return e===``?null:document.querySelector(`[data-testid="property-row"][data-key="${N(e)}"]`)}function fe(e){let t=P(e);if(t===null)return null;let n=t.getBoundingClientRect();return n.height===0&&n.width===0?null:n}function pe(e){P(e)?.scrollIntoView({block:`center`,behavior:`smooth`})}function F(e){if(e.quote===``)return!1;let t=e.path.length===0?e.key:e.path[e.path.length-1],n=Array.from(document.querySelectorAll(`[data-testid="property-row"][data-key="${N(String(t))}"]`)),r=Array.from(document.querySelectorAll(`[data-testid="property-row"]`));for(let t of[...n,...r]){let n=t.querySelector(`textarea, input`);if(n===null)continue;let r=I(n.value,e.quote,e.start,e.end);if(r!==null)return t.scrollIntoView({block:`center`,behavior:`smooth`}),n.focus(),n.setSelectionRange(r.start,r.end),me(n),!0}return!1}function I(e,t,n,r){if(n!==void 0&&r!==void 0&&e.slice(n,r)===t)return{start:n,end:r};let i=e.indexOf(t);return i<0?null:{start:i,end:i+t.length}}function me(e){e.style.setProperty(`--comment-reveal-fill`,`rgba(${k},${se})`),e.setAttribute(M,`true`);let t=()=>{e.removeAttribute(M),e.style.removeProperty(`--comment-reveal-fill`)};e.addEventListener(`blur`,t,{once:!0}),e.addEventListener(`pointerdown`,t,{once:!0}),e.addEventListener(`keydown`,t,{once:!0})}function L(e,{includeBlockComponents:t=!1}={}){let n=``,r=[];return e.descendants((e,i)=>{if(e.isText&&e.text){for(let t=0;t<e.text.length;t++)n+=e.text[t],r.push(i+t);return!0}if(e.isBlock&&!t)return!0;let a=b(e);if(a.length>0){let t=i+e.nodeSize-1;for(let e=0;e<a.length;e++)n+=a[e],r.push(e===a.length-1?t:i)}return!0}),{text:n,positions:r}}function R(e,t){let n=[];if(t===``)return n;let r=e.indexOf(t);for(;r!==-1;)n.push(r),r=e.indexOf(t,r+1);return n}function z(e,t,n){let r=n?.prefix??``,i=n?.suffix??``;if(r===``&&i===``)return null;let a=r===``?[0]:C(e,r,{syntaxIn:`needle`}).map(e=>e.end),o=i===``?[e.length]:C(e,i,{syntaxIn:`needle`}).map(e=>e.start);if(a.length!==1||o.length!==1)return null;let s=a[0],c=o[0];for(;s<c&&/\s/.test(e[s]??``);)s+=1;for(;c>s&&/\s/.test(e[c-1]??``);)--c;if(c<=s)return null;let l=x(t.length);return c-s>l?null:{start:s,end:c}}function B(e,t){let n=e.positions[t.start],r=e.positions[t.end-1];return n==null||r==null?null:{from:n,to:r+1}}function V(e,t,n){if(t.length===0)return null;let r=R(e.text,t).map(e=>({start:e,end:e+t.length}));if(r.length===0&&(r=C(e.text,t,{syntaxIn:`needle`})),r.length===0){let r=z(e.text,t,n);return r===null?null:B(e,r)}let i=n?.prefix??``,a=n?.suffix??``,o=t=>e.text.includes(t)||C(e.text,t,{syntaxIn:`needle`}).length>0;if(i!==``&&a!==``&&!o(i+t+a)&&o(i+a))return null;let s=y({prefix:i,suffix:a},{syntaxInContext:!0}),c=t=>s===0||w(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0})>=s;if(r.length===1){if(!c(r[0])){let r=z(e.text,t,n);return r===null?null:B(e,r)}return B(e,r[0])}let l=[],u=-1;for(let t of r){let n=w(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0});n>u?(u=n,l=[t]):n===u&&l.push(t)}if(!c(l[0])){let r=z(e.text,t,n);return r===null?null:B(e,r)}return B(e,l[0])}var H=64;function he(e,t,n){return{prefix:S(e,Math.max(0,t-H),t),suffix:S(e,n,Math.min(e.content.size,n+H))}}function U(e,t,n){return W(e)(t,n)}function W(e){let t=L(e),n=null;return(r,i)=>{let a=V(t,r,i);return a===null?(n??=L(e,{includeBlockComponents:!0}),V(n,r,i)):a}}var ge=220,_e=24,ve=600;function G(e,t){return s(e,()=>{let n=i(e);t(),window.setTimeout(()=>n.release(),ve)})}function ye(e){let t=e.viewTop+e.insetTop,n=e.viewBottom-ge;return e.anchorTop>=t&&e.anchorBottom<=n?0:e.anchorTop-(t+_e)}function K(e){let t=e?.parentElement??null;for(;t;){let e=getComputedStyle(t).overflowY;if(e===`auto`||e===`scroll`)return t;t=t.parentElement}return null}function q(e){let t=Number.parseFloat(getComputedStyle(e).scrollPaddingTop);return Number.isFinite(t)?t:0}function J(e,t,n,r){let i=v(e);if(!i)return!1;let a=K(i.dom);if(!a)return G(n,()=>e.commands.scrollIntoView());let o,s;try{o=i.coordsAtPos(t.from),s=i.coordsAtPos(t.to)}catch{return!1}let c=a.getBoundingClientRect(),l=ye({anchorTop:o.top,anchorBottom:Math.max(o.bottom,s.bottom),viewTop:c.top,viewBottom:c.bottom,insetTop:q(a)});if(l===0)return!0;let u=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;return G(n,()=>a.scrollTo({top:a.scrollTop+l,behavior:r?.instant||u?`auto`:`smooth`}))}var be=1e4,xe=80,Se=1500,Y=[`wheel`,`touchstart`,`mousedown`,`keydown`];function Ce(e){let r=!1,i=null,o=null,s=-1,l=()=>{let n=a(e.docName);if(!n||n.isDestroyed)return!1;if(r||(r=!0,t(e.threadId)),e.quote===``)return i===null&&(i=Date.now(),c(e.threadId)),!0;let l=n.state.doc.content.size;return(o===null||l!==s)&&(o=U(n.state.doc,e.quote,e.context),s=l),!o||!J(n,o,e.docName,{instant:!0})?!1:(i===null&&(i=Date.now(),c(e.threadId)),!0)};u(`comments`),l(),a(e.docName)===null&&window.location.assign(ie(e.docName));let d=!1,f=()=>{if(!d){d=!0,h(),window.clearInterval(g),window.clearTimeout(_);for(let e of Y)window.removeEventListener(e,p,!0)}},p=()=>f(),m=()=>{l()&&i!==null&&Date.now()-i>=Se&&f()},h=n(m),g=window.setInterval(m,xe),_=window.setTimeout(()=>{i===null&&T.error(r?E._({id:`KeXgA-`}):E._({id:`JDQ5I5`})),f()},be);for(let e of Y)window.addEventListener(e,p,!0);m()}var X=e();function we(){return o().length}function Te(){let e=(0,O.c)(4),t=o(),n;if(e[0]!==t){n=new Map;for(let e of t){let t=r(e)?.docName;t!==void 0&&n.set(t,(n.get(t)??0)+1)}e[0]=t,e[1]=n}else n=e[1];let i;return e[2]===n?i=e[3]:(i=[...n].map(Ee),e[2]=n,e[3]=i),i}function Ee(e){let[t,n]=e;return{docName:t,count:n}}function De(e){let t=(0,O.c)(34),{count:n,docs:r,attached:i,onAttach:a,onDismiss:o}=e,s;t[0]===r?s=t[1]:(s=r===void 0?[]:r,t[0]=r,t[1]=s);let c=s,{_:l}=f();if(n===0)return null;if(!i){let e;t[2]===l?e=t[3]:(e=l({id:`UpOct_`}),t[2]=l,t[3]=e);let n,r,i;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=h(`h-auto min-h-0 gap-1 rounded-md border border-dashed bg-transparent px-1.5 py-0.5`,`text-xs font-normal text-muted-foreground hover:bg-muted/60 hover:text-foreground`),r=(0,X.jsx)(m,{className:`size-3`}),i=(0,X.jsx)(d,{id:`VbyRUy`}),t[4]=n,t[5]=r,t[6]=i):(n=t[4],r=t[5],i=t[6]);let o;return t[7]!==a||t[8]!==e?(o=(0,X.jsxs)(g,{type:`button`,size:`sm`,variant:`ghost`,"aria-pressed":!1,"aria-label":e,onClick:a,"data-testid":`composer-context-chip-comments`,className:n,children:[r,i]}),t[7]=a,t[8]=e,t[9]=o):o=t[9],o}let u;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(u=h(`inline-flex items-center gap-1 rounded-md border bg-muted/60 py-0.5 pr-0.5 pl-1.5`,`text-xs text-muted-foreground`),t[10]=u):u=t[10];let p;t[11]===l?p=t[12]:(p=l({id:`2zvUIK`}),t[11]=l,t[12]=p);let v;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,X.jsx)(D,{className:`size-3`}),t[13]=v):v=t[13];let y;t[14]!==n||t[15]!==c.length?(y=c.length>1?(0,X.jsx)(d,{id:`5TmrYN`,values:{0:c.length,count:n}}):(0,X.jsx)(d,{id:`eiUA4k`,values:{count:n}}),t[14]=n,t[15]=c.length,t[16]=y):y=t[16];let b;t[17]!==p||t[18]!==y?(b=(0,X.jsx)(_,{asChild:!0,children:(0,X.jsxs)(g,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":p,onClick:ke,"data-testid":`composer-comments-open-panel`,className:`h-auto min-h-0 gap-1 px-0.5 py-0 text-xs font-normal text-muted-foreground hover:text-foreground`,children:[v,y]})}),t[17]=p,t[18]=y,t[19]=b):b=t[19];let x;t[20]===c?x=t[21]:(x=(0,X.jsx)(ee,{className:`max-w-64`,children:c.length>1?(0,X.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:c.map(Oe)}):(0,X.jsx)(d,{id:`2zvUIK`})}),t[20]=c,t[21]=x);let S;t[22]!==b||t[23]!==x?(S=(0,X.jsxs)(te,{children:[b,x]}),t[22]=b,t[23]=x,t[24]=S):S=t[24];let C;t[25]===l?C=t[26]:(C=l({id:`pFRz_E`}),t[25]=l,t[26]=C);let w;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,X.jsx)(re,{className:`size-3`}),t[27]=w):w=t[27];let T;t[28]!==o||t[29]!==C?(T=(0,X.jsx)(g,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":C,onClick:o,className:`size-4 p-0 text-muted-foreground hover:text-foreground`,children:w}),t[28]=o,t[29]=C,t[30]=T):T=t[30];let E;return t[31]!==T||t[32]!==S?(E=(0,X.jsxs)(`span`,{"data-testid":`composer-context-chip-comments`,className:u,children:[S,T]}),t[31]=T,t[32]=S,t[33]=E):E=t[33],E}function Oe(e){return(0,X.jsxs)(`li`,{className:`flex items-baseline gap-1.5`,children:[(0,X.jsx)(`span`,{className:`tabular-nums`,children:e.count}),(0,X.jsx)(`span`,{className:`truncate`,children:Z(e.docName)})]},e.docName)}function ke(){return l()}function Z(e){let t=e.lastIndexOf(`/`);return t>=0?e.slice(t+1):e}function Ae(e,t){let n=e;for(let e of t)n+=typeof e==`number`?`[${e}]`:`.${e}`;return n}function je(e){Ce({docName:e.docName,quote:e.target.kind===`property`?``:e.anchor?.quote??``,threadId:e.id,context:e.anchor??void 0});let{target:t,anchor:n}=e;if(t.kind!==`property`||n===null)return;let r=0,i=()=>{F({key:t.key,path:t.path,quote:n.quote,start:n.start,end:n.end})||(r+=1,!(r>=Q)&&requestAnimationFrame(i))};requestAnimationFrame(i)}var Q=30;function Me(e){return{docName:e.docName,body:e.instruction,propertyKey:e.property,quote:e.passage?.exact??``,anchorLost:e.anchorLost,prefix:e.passage?.prefix??``,suffix:e.passage?.suffix??``,repeats:e.passageRepeats}}var $=48;function Ne(e){let t=e.replace(/\s+/g,` `).trimStart();return t.length>$?`…${t.slice(-$)}`:t}function Pe(e){let t=e.replace(/\s+/g,` `).trimEnd();return t.length>$?`${t.slice(0,$)}…`:t}function Fe(e){if(!e.repeats)return null;let t=Ne(e.prefix),n=Pe(e.suffix);return t===``&&n===``?null:`(This text appears more than once in the file. The one meant is ${t===``?`at the start of the file, followed by "${n}"`:n===``?`at the end of the file, preceded by "${t}"`:`between "${t}" and "${n}"`} — match that context rather than the first occurrence.)`}function Ie(e,t,n){let r=t.trim(),i=[];if(i.push(r.length>0?r:`Address the following review comments by editing the documents directly.`),i.push(``),i.push(e.length===1?`The comment:`:`The ${e.length} comments:`),e.forEach((e,t)=>{if(i.push(``),e.propertyKey){let n=e.quote.trim();if(n===``)i.push(`${t+1}. In \`${e.docName}\`, on the \`${e.propertyKey}\` property (frontmatter):`),i.push(``),i.push(` ${e.body.trim()}`);else{i.push(`${t+1}. In \`${e.docName}\`, on this text within the \`${e.propertyKey}\` property (frontmatter):`),i.push(``);for(let e of n.split(`
|
|
2
|
-
`))i.push(` > ${e}`);i.push(``),i.push(` ${e.body.trim()}`)}e.anchorLost&&(i.push(``),i.push(n===``?` (Note: \`${e.propertyKey}\` is no longer in this document's frontmatter — it was renamed or removed since the comment was written. Do not apply this to a different property; if you cannot tell what it now refers to, say so instead of guessing.)`:` (Note: that text is no longer in \`${e.propertyKey}\` — the value was edited, reshaped, or removed since the comment was written. Do not apply this to a different property or a different part of the value; if you cannot tell what it now refers to, say so instead of guessing.)`));return}i.push(`${t+1}. In \`${e.docName}\`, on this passage:`),i.push(``);for(let t of e.quote.split(`
|
|
3
|
-
`))i.push(` > ${t}`);i.push(``),i.push(` ${e.body.trim()}`);let n=Fe(e);n!==null&&(i.push(``),i.push(` ${n}`)),e.anchorLost&&(i.push(``),i.push(` (Note: this passage is no longer in the document — it was edited or removed since the comment was written. Do not apply this to a different passage; if you cannot tell what it now refers to, say so instead of guessing.)`))}),n&&n.markdown.trim().length>0){i.push(``),i.push(`Also in scope, selected in \`${n.docName}\` (not a comment):`),i.push(``);for(let e of n.markdown.trim().split(`
|
|
4
|
-
`))i.push(`> ${e}`)}return i.join(`
|
|
5
|
-
`)}export{F as _,je as a,D as b,Te as c,q as d,he as f,fe as g,I as h,Ae as i,K as l,U as m,Ie as n,Me as o,W as p,Z as r,we as s,De as t,J as u,pe as v,de as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as e}from"./trace-api-CEY5PfXs.js";var t=e.getInstance();export{t};
|
|
@@ -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{a as r,i,n as a}from"./dist-mv8e6dBX.js";import{c as o,l as s,n as c,o as l,r as u,t as d,u as f}from"./dist-DsLZcVyZ.js";import{n as p,t as m}from"./dist-gTGB_-tT.js";import{n as ee,t as h}from"./dist-BvwnbioL.js";import{i as te,n as ne,r as re,t as g}from"./es2015-wpLRKwCl.js";import{a as _,i as v,n as y,r as ie,t as ae}from"./dist-CSCWMTfQ.js";import{n as oe,r as b,t as x}from"./dist-BcWdMddd.js";var S=e(n(),1),C=t(),w=[`Enter`,` `],T=[`ArrowDown`,`PageUp`,`Home`],E=[`ArrowUp`,`PageDown`,`End`],se=[...T,...E],D={ltr:[...w,`ArrowRight`],rtl:[...w,`ArrowLeft`]},ce={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},O=`Menu`,[k,le,A]=p(O),[j,M]=o(O,[A,_,b]),N=_(),ue=b(),[P,F]=j(O),[de,I]=j(O),L=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=N(t),[c,l]=S.useState(null),u=S.useRef(!1),f=d(a),p=m(i);return S.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,C.jsx)(v,{...s,children:(0,C.jsx)(P,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:l,children:(0,C.jsx)(de,{scope:t,onClose:S.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:p,modal:o,children:r})})})};L.displayName=O;var fe=`MenuAnchor`,R=S.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=N(n);return(0,C.jsx)(ae,{...i,...r,ref:t})});R.displayName=fe;var z=`MenuPortal`,[pe,me]=j(z,{forceMount:void 0}),he=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=F(z,t);return(0,C.jsx)(pe,{scope:t,forceMount:n,children:(0,C.jsx)(u,{present:n||a.open,children:(0,C.jsx)(h,{asChild:!0,container:i,children:r})})})};he.displayName=z;var B=`MenuContent`,[ge,V]=j(B),_e=S.forwardRef((e,t)=>{let n=me(B,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=F(B,e.__scopeMenu),o=I(B,e.__scopeMenu);return(0,C.jsx)(k.Provider,{scope:e.__scopeMenu,children:(0,C.jsx)(u,{present:r||a.open,children:(0,C.jsx)(k.Slot,{scope:e.__scopeMenu,children:o.modal?(0,C.jsx)(ve,{...i,ref:t}):(0,C.jsx)(ye,{...i,ref:t})})})})}),ve=S.forwardRef((e,t)=>{let n=F(B,e.__scopeMenu),i=S.useRef(null),a=r(t,i);return S.useEffect(()=>{let e=i.current;if(e)return g(e)},[]),(0,C.jsx)(H,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:l(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ye=S.forwardRef((e,t)=>{let n=F(B,e.__scopeMenu);return(0,C.jsx)(H,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),be=a(`MenuContent.ScrollLock`),H=S.forwardRef((e,t)=>{let{__scopeMenu:n,loop:i=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,disableOutsideScroll:g,..._}=e,v=F(B,n),y=I(B,n),ae=N(n),b=ue(n),x=le(n),[w,T]=S.useState(null),D=S.useRef(null),ce=r(t,D,v.onContentChange),O=S.useRef(0),k=S.useRef(``),A=S.useRef(0),j=S.useRef(null),M=S.useRef(`right`),P=S.useRef(0),de=g?ne:S.Fragment,L=g?{as:be,allowPinchZoom:!0}:void 0,fe=e=>{let t=k.current+e,n=x().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Je(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){k.current=t,window.clearTimeout(O.current),t!==``&&(O.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};S.useEffect(()=>()=>window.clearTimeout(O.current),[]),re();let R=S.useCallback(e=>M.current===j.current?.side&&Xe(e,j.current?.area),[]);return(0,C.jsx)(ge,{scope:n,searchRef:k,onItemEnter:S.useCallback(e=>{R(e)&&e.preventDefault()},[R]),onItemLeave:S.useCallback(e=>{R(e)||(D.current?.focus(),T(null))},[R]),onTriggerLeave:S.useCallback(e=>{R(e)&&e.preventDefault()},[R]),pointerGraceTimerRef:A,onPointerGraceIntentChange:S.useCallback(e=>{j.current=e},[]),children:(0,C.jsx)(de,{...L,children:(0,C.jsx)(te,{asChild:!0,trapped:a,onMountAutoFocus:l(o,e=>{e.preventDefault(),D.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,C.jsx)(ee,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,children:(0,C.jsx)(oe,{asChild:!0,...b,dir:y.dir,orientation:`vertical`,loop:i,currentTabStopId:w,onCurrentTabStopIdChange:T,onEntryFocus:l(u,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,C.jsx)(ie,{role:`menu`,"aria-orientation":`vertical`,"data-state":Ge(v.open),"data-radix-menu-content":``,dir:y.dir,...ae,..._,ref:ce,style:{outline:`none`,..._.style},onKeyDown:l(_.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&fe(e.key));let i=D.current;if(e.target!==i||!se.includes(e.key))return;e.preventDefault();let a=x().filter(e=>!e.disabled).map(e=>e.ref.current);E.includes(e.key)&&a.reverse(),Ke(a)}),onBlur:l(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(O.current),k.current=``)}),onPointerMove:l(e.onPointerMove,$(e=>{let t=e.target,n=P.current!==e.clientX;e.currentTarget.contains(t)&&n&&(M.current=e.clientX>P.current?`right`:`left`,P.current=e.clientX)}))})})})})})})});_e.displayName=B;var xe=`MenuGroup`,U=S.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,C.jsx)(s.div,{role:`group`,...r,ref:t})});U.displayName=xe;var Se=`MenuLabel`,W=S.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,C.jsx)(s.div,{...r,ref:t})});W.displayName=Se;var G=`MenuItem`,Ce=`menu.itemSelect`,K=S.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:i,...a}=e,o=S.useRef(null),s=I(G,e.__scopeMenu),c=V(G,e.__scopeMenu),u=r(t,o),d=S.useRef(!1),p=()=>{let e=o.current;if(!n&&e){let t=new CustomEvent(Ce,{bubbles:!0,cancelable:!0});e.addEventListener(Ce,e=>i?.(e),{once:!0}),f(e,t),t.defaultPrevented?d.current=!1:s.onClose()}};return(0,C.jsx)(we,{...a,ref:u,disabled:n,onClick:l(e.onClick,p),onPointerDown:t=>{e.onPointerDown?.(t),d.current=!0},onPointerUp:l(e.onPointerUp,e=>{d.current||e.currentTarget?.click()}),onKeyDown:l(e.onKeyDown,e=>{let t=c.searchRef.current!==``;n||t&&e.key===` `||w.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});K.displayName=G;var we=S.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:i=!1,textValue:a,...o}=e,c=V(G,n),u=ue(n),d=S.useRef(null),f=r(t,d),[p,m]=S.useState(!1),[ee,h]=S.useState(``);return S.useEffect(()=>{let e=d.current;e&&h((e.textContent??``).trim())},[o.children]),(0,C.jsx)(k.ItemSlot,{scope:n,disabled:i,textValue:a??ee,children:(0,C.jsx)(x,{asChild:!0,...u,focusable:!i,children:(0,C.jsx)(s.div,{role:`menuitem`,"data-highlighted":p?``:void 0,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,...o,ref:f,onPointerMove:l(e.onPointerMove,$(e=>{i?c.onItemLeave(e):(c.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:l(e.onPointerLeave,$(e=>c.onItemLeave(e))),onFocus:l(e.onFocus,()=>m(!0)),onBlur:l(e.onBlur,()=>m(!1))})})})}),Te=`MenuCheckboxItem`,q=S.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,C.jsx)(Me,{scope:e.__scopeMenu,checked:n,children:(0,C.jsx)(K,{role:`menuitemcheckbox`,"aria-checked":Z(n)?`mixed`:n,...i,ref:t,"data-state":Q(n),onSelect:l(i.onSelect,()=>r?.(Z(n)?!0:!n),{checkForDefaultPrevented:!1})})})});q.displayName=Te;var Ee=`MenuRadioGroup`,[De,Oe]=j(Ee,{value:void 0,onValueChange:()=>{}}),ke=S.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=d(r);return(0,C.jsx)(De,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,C.jsx)(U,{...i,ref:t})})});ke.displayName=Ee;var Ae=`MenuRadioItem`,je=S.forwardRef((e,t)=>{let{value:n,...r}=e,i=Oe(Ae,e.__scopeMenu),a=n===i.value;return(0,C.jsx)(Me,{scope:e.__scopeMenu,checked:a,children:(0,C.jsx)(K,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Q(a),onSelect:l(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});je.displayName=Ae;var J=`MenuItemIndicator`,[Me,Ne]=j(J,{checked:!1}),Pe=S.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=Ne(J,n);return(0,C.jsx)(u,{present:r||Z(a.checked)||a.checked===!0,children:(0,C.jsx)(s.span,{...i,ref:t,"data-state":Q(a.checked)})})});Pe.displayName=J;var Fe=`MenuSeparator`,Ie=S.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,C.jsx)(s.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});Ie.displayName=Fe;var Le=`MenuArrow`,Re=S.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=N(n);return(0,C.jsx)(y,{...i,...r,ref:t})});Re.displayName=Le;var Y=`MenuSub`,[ze,Be]=j(Y),Ve=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=F(Y,t),o=N(t),[s,l]=S.useState(null),[u,f]=S.useState(null),p=d(i);return S.useEffect(()=>(a.open===!1&&p(!1),()=>p(!1)),[a.open,p]),(0,C.jsx)(v,{...o,children:(0,C.jsx)(P,{scope:t,open:r,onOpenChange:p,content:u,onContentChange:f,children:(0,C.jsx)(ze,{scope:t,contentId:c(),triggerId:c(),trigger:s,onTriggerChange:l,children:n})})})};Ve.displayName=Y;var X=`MenuSubTrigger`,He=S.forwardRef((e,t)=>{let n=F(X,e.__scopeMenu),r=I(X,e.__scopeMenu),a=Be(X,e.__scopeMenu),o=V(X,e.__scopeMenu),s=S.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=o,d={__scopeMenu:e.__scopeMenu},f=S.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return S.useEffect(()=>f,[f]),S.useEffect(()=>{let e=c.current;return()=>{window.clearTimeout(e),u(null)}},[c,u]),(0,C.jsx)(R,{asChild:!0,...d,children:(0,C.jsx)(we,{id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":a.contentId,"data-state":Ge(n.open),...e,ref:i(t,a.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:l(e.onPointerMove,$(t=>{o.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:l(e.onPointerLeave,$(e=>{f();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,a=i?-5:5,s=t[i?`left`:`right`],l=t[i?`right`:`left`];o.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:s,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:s,y:t.bottom}],side:r}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(e),e.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:l(e.onKeyDown,t=>{let i=o.searchRef.current!==``;e.disabled||i&&t.key===` `||D[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});He.displayName=X;var Ue=`MenuSubContent`,We=S.forwardRef((e,t)=>{let n=me(B,e.__scopeMenu),{forceMount:i=n.forceMount,...a}=e,o=F(B,e.__scopeMenu),s=I(B,e.__scopeMenu),c=Be(Ue,e.__scopeMenu),d=S.useRef(null),f=r(t,d);return(0,C.jsx)(k.Provider,{scope:e.__scopeMenu,children:(0,C.jsx)(u,{present:i||o.open,children:(0,C.jsx)(k.Slot,{scope:e.__scopeMenu,children:(0,C.jsx)(H,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:f,align:`start`,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&d.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:l(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:l(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:l(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=ce[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});We.displayName=Ue;function Ge(e){return e?`open`:`closed`}function Z(e){return e===`indeterminate`}function Q(e){return Z(e)?`indeterminate`:e?`checked`:`unchecked`}function Ke(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function qe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Je(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=qe(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Ye(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Xe(e,t){return t?Ye({x:e.clientX,y:e.clientY},t):!1}function $(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Ze=L,Qe=R,$e=he,et=_e,tt=U,nt=W,rt=K,it=q,at=ke,ot=je,st=Pe,ct=Ie,lt=Re,ut=Ve,dt=He,ft=We;export{M as _,tt as a,nt as c,ot as d,Ze as f,dt as g,ft as h,et as i,$e as l,ut as m,lt as n,rt as o,ct as p,it as r,st as s,Qe as t,at as u};
|
|
@@ -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{c as r,i,l as a,n as o,o as s,r as c}from"./dist-DsLZcVyZ.js";import{t as l}from"./dist-gTGB_-tT.js";import{n as u,r as d,t as f}from"./dist-BcWdMddd.js";var p=e(n(),1),m=t(),h=`Tabs`,[g,_]=r(h,[d]),v=d(),[y,b]=g(h),x=p.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:s,defaultValue:c,orientation:u=`horizontal`,dir:d,activationMode:f=`automatic`,...p}=e,g=l(d),[_,v]=i({prop:r,onChange:s,defaultProp:c??``,caller:h});return(0,m.jsx)(y,{scope:n,baseId:o(),value:_,onValueChange:v,orientation:u,dir:g,activationMode:f,children:(0,m.jsx)(a.div,{dir:g,"data-orientation":u,...p,ref:t})})});x.displayName=h;var S=`TabsList`,C=p.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,o=b(S,n),s=v(n);return(0,m.jsx)(u,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:r,children:(0,m.jsx)(a.div,{role:`tablist`,"aria-orientation":o.orientation,...i,ref:t})})});C.displayName=S;var w=`TabsTrigger`,T=p.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,c=b(w,n),l=v(n),u=O(c.baseId,r),d=k(c.baseId,r),p=r===c.value;return(0,m.jsx)(f,{asChild:!0,...l,focusable:!i,active:p,children:(0,m.jsx)(a.button,{type:`button`,role:`tab`,"aria-selected":p,"aria-controls":d,"data-state":p?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:u,...o,ref:t,onMouseDown:s(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?c.onValueChange(r):e.preventDefault()}),onKeyDown:s(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&c.onValueChange(r)}),onFocus:s(e.onFocus,()=>{let e=c.activationMode!==`manual`;!p&&!i&&e&&c.onValueChange(r)})})})});T.displayName=w;var E=`TabsContent`,D=p.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:o,...s}=e,l=b(E,n),u=O(l.baseId,r),d=k(l.baseId,r),f=r===l.value,h=p.useRef(f);return p.useEffect(()=>{let e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,m.jsx)(c,{present:i||f,children:({present:n})=>(0,m.jsx)(a.div,{"data-state":f?`active`:`inactive`,"data-orientation":l.orientation,role:`tabpanel`,"aria-labelledby":u,hidden:!n,id:d,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:h.current?`0s`:void 0},children:n&&o})})});D.displayName=E;function O(e,t){return`${e}-trigger-${t}`}function k(e,t){return`${e}-content-${t}`}var A=x,j=C,M=T,N=D;export{M as i,j as n,A as r,N as t};
|