@inkeep/open-knowledge 0.50.0-beta.1 → 0.50.0-beta.11
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-DRAaVrjf.mjs +3 -0
- package/dist/cli.mjs +27 -27
- package/dist/config-schema.json +158 -40
- package/dist/config.project-local.schema.json +61 -0
- package/dist/config.project.schema.json +76 -7
- package/dist/config.user.schema.json +41 -33
- package/dist/constants-DLJSo46_.mjs +2 -0
- package/dist/fs-traced-DJHV_QPy.mjs +12 -0
- package/dist/fs-traced-GKhfy5ua.mjs +1 -0
- package/dist/git-handle-BHbVb-kE.mjs +1 -0
- package/dist/{git-handle-B9WUn7B2.mjs → git-handle-BWXziar2.mjs} +2 -2
- package/dist/index.d.mts +83 -33
- package/dist/index.mjs +215 -215
- package/dist/init-Bi1d2uLD.mjs +638 -0
- package/dist/init-CqUUUDta.mjs +1 -0
- package/dist/{launch-json-removal-CXPn5A7N.mjs → launch-json-removal-BUYuUwT_.mjs} +2 -2
- package/dist/loader-DAMg0xnL.mjs +1 -0
- package/dist/loader-DXsqPNjF.mjs +2 -0
- package/dist/md-manager-BP88oH5c.mjs +2 -0
- package/dist/{open-browser-Bu1KY-5f.mjs → open-browser-CHq05YCN.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-CXrbuj-R.mjs → preview-BENkmrSy.mjs} +2 -2
- package/dist/preview-aNluJ6KN.mjs +1 -0
- package/dist/public/assets/ActivityModeContent-C3XczVNM.js +1 -0
- package/dist/public/assets/AgentDiffPane-CCvn5wQ3.js +2 -0
- package/dist/public/assets/{AgentThreadClientBinder-0uU00Tq4.js → AgentThreadClientBinder-D85mW3F8.js} +1 -1
- package/dist/public/assets/{AppMenubar-Dk1BEmD9.js → AppMenubar-DzKyqu4x.js} +1 -1
- package/dist/public/assets/BugReportHistory-mvsL4k28.js +1 -0
- package/dist/public/assets/{BugReportHistoryDialog-DIqnZXkT.js → BugReportHistoryDialog-DpBx3OAi.js} +1 -1
- package/dist/public/assets/ChangedOutsideBadge-BTzPOikC.js +1 -0
- package/dist/public/assets/CodeMirrorPropInput-CJOa9rBB.js +3 -0
- package/dist/public/assets/{ConfigSharingInfoTooltip-BNI3Q3Qo.js → ConfigSharingInfoTooltip-BPA8HEYl.js} +1 -1
- package/dist/public/assets/{ConsentDialogBody-BlayjFQq.js → ConsentDialogBody-KXeO_ZFL.js} +1 -1
- package/dist/public/assets/{CopyButton-Q-6hSzy6.js → CopyButton-DhHoiQJR.js} +1 -1
- package/dist/public/assets/{DiffView-BnNY_4OT.js → DiffView-BjOsi4GM.js} +1 -1
- package/dist/public/assets/DocumentContext-q72mQT_t.js +38 -0
- package/dist/public/assets/{EditorModeToggle-OACqdrIA.js → EditorModeToggle-CYQ3YFwJ.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-DBMws9uC.js → EnableSyncConfirmDialog-D3pGpgBV.js} +1 -1
- package/dist/public/assets/FeedbackForm-CPJzntj4.js +1 -0
- package/dist/public/assets/{GraphPanel-BlBOG-me.js → GraphPanel-BgjTBQzf.js} +2 -2
- package/dist/public/assets/ImportSkillDialog-CXQr-FGP.js +1 -0
- package/dist/public/assets/{LintConfigEditor-v0oqzBfd.js → LintConfigEditor-DbAjr4jH.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-B4gUE4uy.js +2 -0
- package/dist/public/assets/ManagedArtifactProperties-ga621KKB.js +1 -0
- package/dist/public/assets/{McpConsentDialogBody-DcaMMYmf.js → McpConsentDialogBody-CDj5MfEH.js} +1 -1
- package/dist/public/assets/{Mermaid-cUFqNhzC.js → Mermaid-D-pcyGRV.js} +2 -2
- package/dist/public/assets/{MermaidDocEditor-YEj8k0Fj.js → MermaidDocEditor-BKY1PMJY.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-CCgDsAUc.js → RegisteredAgentIcon-BgDInKA9.js} +1 -1
- package/dist/public/assets/ReportBugDialogBody-C3RLSmI4.js +3 -0
- package/dist/public/assets/{SchemaConfigEditor-C_BBar0x.js → SchemaConfigEditor-SePva8he.js} +1 -1
- package/dist/public/assets/SessionsHost-gsjDemop.js +2 -0
- package/dist/public/assets/SettingsDialogBody-B0aiIMgi.js +12 -0
- package/dist/public/assets/ShareBranchSwitchDialog-BvB0M0F8.js +1 -0
- package/dist/public/assets/ShareReceiveDialog-DdTZvKPD.js +1 -0
- package/dist/public/assets/{ShareReceiveMissDialog-TTjnDvC9.js → ShareReceiveMissDialog-5admpSFE.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-Dmsi4hSW.js → SkillEditBanner-xwl6MInS.js} +1 -1
- package/dist/public/assets/SkillOriginInline-1lmATcpN.js +1 -0
- package/dist/public/assets/SkillToolbarControls-26O0onQs.js +1 -0
- package/dist/public/assets/{SlidesToolbarControls-CWIkYgNX.js → SlidesToolbarControls-guFXAVIS.js} +1 -1
- package/dist/public/assets/{SourceEditor-D3dXest3.js → SourceEditor-DCC6j8cH.js} +1 -1
- package/dist/public/assets/{TerminalPanel-D_OODFVz.js → TerminalPanel-CP9vexOS.js} +2 -2
- package/dist/public/assets/{TerminalWindowApp-Dwoah4yb.js → TerminalWindowApp-CFcodtB9.js} +1 -1
- package/dist/public/assets/{TextDocEditor-DzdzVGmP.js → TextDocEditor-Ba292y2S.js} +1 -1
- package/dist/public/assets/ThreadView-Bxz-QRgZ.js +10 -0
- package/dist/public/assets/TimelineDiffPane-FY54Yfye.js +2 -0
- package/dist/public/assets/{abnfDiagram-VRR7QNED-zrdnvCxH.js → abnfDiagram-VRR7QNED-CQ5y3jGZ.js} +1 -1
- package/dist/public/assets/{agent-diff-store-DmpkFUx3.js → agent-diff-store-DTrbnQbK.js} +1 -1
- package/dist/public/assets/{arc-DNWUH4a1.js → arc-DllfmQO6.js} +1 -1
- package/dist/public/assets/architecture-TIHT7OUA-CIR5HZsg.js +1 -0
- package/dist/public/assets/{architectureDiagram-ZJ3FMSHR-C8Bd5LWV.js → architectureDiagram-ZJ3FMSHR-DEDVgPeV.js} +1 -1
- package/dist/public/assets/arrow-up-right-D_WN0VGP.js +1 -0
- package/dist/public/assets/auth-state-cache-CAQ4A-He.js +11 -0
- package/dist/public/assets/{blockDiagram-677ZJIJ3-B9IYmQZQ.js → blockDiagram-677ZJIJ3-Biovo5Vk.js} +1 -1
- package/dist/public/assets/{braces-54VO1tdr.js → braces-B2tgJ4cu.js} +1 -1
- package/dist/public/assets/{c4Diagram-LMCZKHZV-BAmqGVbu.js → c4Diagram-LMCZKHZV-BUMbkcfU.js} +1 -1
- package/dist/public/assets/{calendar-BhCmsdcp.js → calendar-q3K0fDI1.js} +1 -1
- package/dist/public/assets/{case-sensitive-BpYLDHFG.js → case-sensitive-Cz58rAyi.js} +1 -1
- package/dist/public/assets/channel-C6KgPQqg.js +1 -0
- package/dist/public/assets/check-xiKupoJh.js +1 -0
- package/dist/public/assets/{checkbox-gpfWb1pY.js → checkbox-DxTkAw0k.js} +1 -1
- package/dist/public/assets/{chevron-down-Ccgt58N5.js → chevron-down-DmoBYxyq.js} +1 -1
- package/dist/public/assets/chevron-left-CiNweXA3.js +1 -0
- package/dist/public/assets/chevron-right-DJvandMc.js +1 -0
- package/dist/public/assets/{chevron-up-DXAtCwKR.js → chevron-up-eNJS5_XA.js} +1 -1
- package/dist/public/assets/chunk-2Q5K7J3B-CgG_zTm9.js +1 -0
- package/dist/public/assets/{chunk-32BRIVSS-DMLdlgjI.js → chunk-32BRIVSS-CJfLw0io.js} +1 -1
- package/dist/public/assets/{chunk-52WLFC77-CA6wNZGK.js → chunk-52WLFC77-CKUXR-Lo.js} +1 -1
- package/dist/public/assets/{chunk-5FCAYU7R-DqJZ_M2Z.js → chunk-5FCAYU7R-Blhoqerk.js} +1 -1
- package/dist/public/assets/{chunk-5HE753X5-xEmSuz1X.js → chunk-5HE753X5-Be3l52OO.js} +1 -1
- package/dist/public/assets/{chunk-5JV3BV7I-Ck8lDs_Z.js → chunk-5JV3BV7I-COJRGdXn.js} +1 -1
- package/dist/public/assets/{chunk-5TONJI2A-PrC_RJYQ.js → chunk-5TONJI2A-6Fwn-ZXg.js} +1 -1
- package/dist/public/assets/{chunk-5VM5RSS4-uHW5nKzV.js → chunk-5VM5RSS4-CBB7ddJZ.js} +1 -1
- package/dist/public/assets/{chunk-7BUUIJ7U-QsQRXodN.js → chunk-7BUUIJ7U-BCqa-5nq.js} +1 -1
- package/dist/public/assets/{chunk-BIQX33UG-Bn3R7PMg.js → chunk-BIQX33UG-DzD4i2B0.js} +1 -1
- package/dist/public/assets/{chunk-BO2N2NFS-XrP3H1kD.js → chunk-BO2N2NFS-KCTBsTca.js} +3 -3
- package/dist/public/assets/{chunk-C7G6YPKG-Cyi6lMg0.js → chunk-C7G6YPKG-DxT1wdEz.js} +1 -1
- package/dist/public/assets/{chunk-CQNSW5MT-DcGjpkNq.js → chunk-CQNSW5MT-DFeH5OJq.js} +1 -1
- package/dist/public/assets/{chunk-CYSBUYHQ-DtqK9e9B.js → chunk-CYSBUYHQ-BnJMwkKI.js} +1 -1
- package/dist/public/assets/{chunk-EMLP6XTP-CwGsiDUi.js → chunk-EMLP6XTP-MSvlJ735.js} +1 -1
- package/dist/public/assets/{chunk-EX3LRPZG-DLPjvnJt.js → chunk-EX3LRPZG-DUzsTxw6.js} +1 -1
- package/dist/public/assets/{chunk-FWX5IMBZ-Dl1Yx5lK.js → chunk-FWX5IMBZ-D3EMolHi.js} +2 -2
- package/dist/public/assets/{chunk-HOUHSVGY-DV13h0Pr.js → chunk-HOUHSVGY-CA499J_e.js} +1 -1
- package/dist/public/assets/{chunk-ICXQ74PX-INpeR2_Y.js → chunk-ICXQ74PX-CNLojPkU.js} +1 -1
- package/dist/public/assets/{chunk-JG7HCLWE-DjqF4wz1.js → chunk-JG7HCLWE-BjvLoZ4O.js} +1 -1
- package/dist/public/assets/{chunk-JWPE2WC7-ChNUGWh8.js → chunk-JWPE2WC7-DKo0ygBr.js} +1 -1
- package/dist/public/assets/{chunk-MOJQB5TN-DYAyc4PI.js → chunk-MOJQB5TN-hxtcpfx_.js} +1 -1
- package/dist/public/assets/{chunk-MOZMSUNE-DAoBuwD4.js → chunk-MOZMSUNE-DQOK9LgW.js} +1 -1
- package/dist/public/assets/{chunk-OGEWGWER-_vqBGeRc.js → chunk-OGEWGWER-DmUP6YIh.js} +1 -1
- package/dist/public/assets/{chunk-OSBZ3O6U-SeZvOun8.js → chunk-OSBZ3O6U-D1WpsIpR.js} +1 -1
- package/dist/public/assets/{chunk-PUDLZKDR-C184t24_.js → chunk-PUDLZKDR-CQKVQESS.js} +1 -1
- package/dist/public/assets/{chunk-Q4XR5HBZ-SaCK9erE.js → chunk-Q4XR5HBZ-CChmYrK9.js} +1 -1
- package/dist/public/assets/{chunk-QBLGF6JB-CJVMUUtn.js → chunk-QBLGF6JB-CgndLuEz.js} +1 -1
- package/dist/public/assets/{chunk-R7FJI6CG-q21e0CIM.js → chunk-R7FJI6CG-DCv2sUq2.js} +1 -1
- package/dist/public/assets/{chunk-RYQCIY6F-nQAz-0yS.js → chunk-RYQCIY6F-AIaldrY4.js} +1 -1
- package/dist/public/assets/{chunk-U6XO7XAA-hembI7o8.js → chunk-U6XO7XAA-CxMMdww-.js} +1 -1
- package/dist/public/assets/{chunk-V7JOEXUC-3RMXHrzo.js → chunk-V7JOEXUC-CXy9SmJk.js} +1 -1
- package/dist/public/assets/chunk-VAUOI2AC-ujVxk4Ze.js +1 -0
- package/dist/public/assets/{chunk-VR4S4FIN-YHQiPjFo.js → chunk-VR4S4FIN-KG7H_g4c.js} +1 -1
- package/dist/public/assets/{chunk-WYO6CB5R-tHLnBMnY.js → chunk-WYO6CB5R-B368j75q.js} +1 -1
- package/dist/public/assets/chunk-XXDRQBXY-B7w13F3i.js +1 -0
- package/dist/public/assets/{chunk-YOTPTUD7-u4FR_PoG.js → chunk-YOTPTUD7-Cqb1OWoI.js} +1 -1
- package/dist/public/assets/{chunk-ZGVPDNZ5-BFUSTZTU.js → chunk-ZGVPDNZ5-BKdDRJat.js} +1 -1
- package/dist/public/assets/{chunk-ZIRB5QZD-D120inkG.js → chunk-ZIRB5QZD-CvXXd6Mf.js} +1 -1
- package/dist/public/assets/classDiagram-OUVF2IWQ-CrrbWSrl.js +1 -0
- package/dist/public/assets/classDiagram-v2-EOCWNBFH-BYbi6pvW.js +1 -0
- package/dist/public/assets/client-version-DZzYmEAI.js +1 -0
- package/dist/public/assets/{cm-theme-DPWSzbOc.js → cm-theme-ChFGbVCe.js} +1 -1
- package/dist/public/assets/{comment-chips-CNh6cTT4.js → comment-chips-El0Mtul3.js} +1 -1
- package/dist/public/assets/config-provider-Cp4CY5__.js +5 -0
- package/dist/public/assets/context-menu-CYgsnEgV.js +1 -0
- package/dist/public/assets/{cose-bilkent-JH36ORCC-D0CYnCA3.js → cose-bilkent-JH36ORCC-CwtkHR1Y.js} +1 -1
- package/dist/public/assets/cynefin-VYW2F7L2-BdPtv88z.js +1 -0
- package/dist/public/assets/{cynefinDiagram-TSTJHNR4-Bgric3JJ.js → cynefinDiagram-TSTJHNR4-LsplRO2K.js} +1 -1
- package/dist/public/assets/{dagre-uJOGPMM-.js → dagre-C6VKrNvO.js} +1 -1
- package/dist/public/assets/{dagre-VKFMJZFB-BXjUnJMs.js → dagre-VKFMJZFB-DhzjgRUZ.js} +1 -1
- package/dist/public/assets/{diagram-FQU43EPY-dXOWFjMG.js → diagram-FQU43EPY-a4jh9ybB.js} +1 -1
- package/dist/public/assets/{diagram-G47NLZAW-zdJG9pHl.js → diagram-G47NLZAW-Jgkwuc6y.js} +1 -1
- package/dist/public/assets/{diagram-NH7WQ7WH-BVYbs_C0.js → diagram-NH7WQ7WH-Cz1HEitz.js} +1 -1
- package/dist/public/assets/{diagram-OA4YK3LP-Ds5ohbs1.js → diagram-OA4YK3LP-CIcVtjXP.js} +1 -1
- package/dist/public/assets/{diagram-WEI45ONY-BluqqbZ4.js → diagram-WEI45ONY-C8wU887b.js} +1 -1
- package/dist/public/assets/{dialog-O4u6_xiQ.js → dialog-Bxcn1sLm.js} +1 -1
- package/dist/public/assets/{dist-TVrIGknK2.js → dist-B6uhnkqb2.js} +184 -184
- package/dist/public/assets/{dist-C1TyNsxp.js → dist-BOhFaMG0.js} +1 -1
- package/dist/public/assets/{dist-tByLfm_n.js → dist-Bb1r1o6u.js} +1 -1
- package/dist/public/assets/{dist-CNm9tACe.js → dist-Bx9oFJRu.js} +1 -1
- package/dist/public/assets/{dist-CpwfhxFl.js → dist-C9uRrl_E.js} +1 -1
- package/dist/public/assets/{dist-hrQOAqN1.js → dist-CFyOS6pn.js} +1 -1
- package/dist/public/assets/{dist-CI5_cNui.js → dist-CXSIgvvA.js} +1 -1
- package/dist/public/assets/{dist-CJuiZAB0.js → dist-DL1WTl5d.js} +1 -1
- package/dist/public/assets/{dist-CDMQmWZl.js → dist-DRg5A_HQ.js} +1 -1
- package/dist/public/assets/{dist-CebtYbHb.js → dist-D_1xxRDt.js} +1 -1
- package/dist/public/assets/{dist-DU2smIGg.js → dist-DgRDZMLf.js} +1 -1
- package/dist/public/assets/{dist-BpOfJRMm.js → dist-DrCK4JBL.js} +1 -1
- package/dist/public/assets/{dist-y6w4IT08.js → dist-DuPjpj5-.js} +1 -1
- package/dist/public/assets/{dist-wfUjMP-v.js → dist-EpVTQF77.js} +1 -1
- package/dist/public/assets/{doc-paths-BKAhPn1c.js → doc-paths-DCnBNou3.js} +1 -1
- package/dist/public/assets/{documents-events-B6nWdFan.js → documents-events-BE14yj3s.js} +1 -1
- package/dist/public/assets/{download-BuEN0lZf.js → download-btG_KeFQ.js} +1 -1
- package/dist/public/assets/{dropdown-menu-CP1RnfZI.js → dropdown-menu-K4eCFwQy.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-CCIWWBDH-BWiN4nWj.js → ebnfDiagram-CCIWWBDH-CjptFZja.js} +1 -1
- package/dist/public/assets/{erDiagram-Q63AITRT-5GE6Syx5.js → erDiagram-Q63AITRT-BYiJa_5G.js} +1 -1
- package/dist/public/assets/eventmodeling-45OFAUF4-ur3Hg9pT.js +1 -0
- package/dist/public/assets/{eye-CYj_zi2W.js → eye-j_4QS15C.js} +1 -1
- package/dist/public/assets/{field-BADrt9_J.js → field-9eXIpxzl.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-Dhf8gmFi.js → file-tree-adapter-BOumv5bR.js} +1 -1
- package/dist/public/assets/{file-tree-utils-Cx1c51Ql.js → file-tree-utils-zx8XyJDX.js} +1 -1
- package/dist/public/assets/flowDiagram-23GEKE2U-C1BAvCbz.js +1 -0
- package/dist/public/assets/{folder-CWVPrRtx.js → folder-C8rE1Soy.js} +1 -1
- package/dist/public/assets/{folder-config-api-CKhPo3Lt.js → folder-config-api-DzcYYQUB.js} +1 -1
- package/dist/public/assets/{folder-open-BXfoqsrp.js → folder-open-CB-trByC.js} +1 -1
- package/dist/public/assets/{follow-file-BRGwJuKy.js → follow-file-D8sBwhbX.js} +1 -1
- package/dist/public/assets/{ganttDiagram-NO4QXBWP-DGnL6oh-.js → ganttDiagram-NO4QXBWP-TYuuGc0X.js} +1 -1
- package/dist/public/assets/{git-branch-CMN6cdzm.js → git-branch-JnfmLuHd.js} +1 -1
- package/dist/public/assets/gitGraph-TEB2WS4Q-l_1SzZcb.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-IHSO6WYX-mMfBO0xv.js → gitGraphDiagram-IHSO6WYX-BrjUrrk2.js} +1 -1
- package/dist/public/assets/globals-Bq7QmnDv.css +1 -0
- package/dist/public/assets/{graphlib-CS7i3af0.js → graphlib-D8PlvV2o.js} +1 -1
- package/dist/public/assets/{hash-BS4ux6bl.js → hash-DKiwvmF3.js} +1 -1
- package/dist/public/assets/{highlighted-body-OFNGDK62-Bc_b2HT_.js → highlighted-body-OFNGDK62-eJrwOujA.js} +1 -1
- package/dist/public/assets/{history-CiIvI4I4.js → history-eaFgPZWX.js} +1 -1
- package/dist/public/assets/i18n-Bm86sjGW.js +1 -0
- package/dist/public/assets/index-DYmWXWr6.js +2097 -0
- package/dist/public/assets/{info-160SNOuG.js → info-CsTy513y.js} +1 -1
- package/dist/public/assets/info-DKCQHKI2-CCDXfGhV.js +1 -0
- package/dist/public/assets/{infoDiagram-FWYZ7A6U-DuU1GDQ6.js → infoDiagram-FWYZ7A6U-B6_Knuir.js} +1 -1
- package/dist/public/assets/{input-group-CPKSxoq5.js → input-group-BA2Li4LU.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-FXEZZL3T-Bg0KJFCj.js → ishikawaDiagram-FXEZZL3T-CqxHoebw.js} +1 -1
- package/dist/public/assets/{journeyDiagram-5HDEW3XC-DLWkGhNH.js → journeyDiagram-5HDEW3XC-B1-3fVtR.js} +1 -1
- package/dist/public/assets/{kanban-definition-HUTT4EX6-BhYGhRMu.js → kanban-definition-HUTT4EX6-CdhMOBCU.js} +1 -1
- package/dist/public/assets/{line-e19R8FCM.js → line-C0o9Fjf4.js} +1 -1
- package/dist/public/assets/{linear-a82bFSBJ.js → linear-CjM1R4zy.js} +1 -1
- package/dist/public/assets/{lint-config-client-KRlZx1_T.js → lint-config-client-CXdpjOMj.js} +1 -1
- package/dist/public/assets/{list-plus-BPvSuFZX.js → list-plus-ByOuGBSE.js} +1 -1
- package/dist/public/assets/{local-menu-action-bus-BDB0W02w.js → local-menu-action-bus-BKJCODnD.js} +1 -1
- package/dist/public/assets/{map-il90ypLM.js → map-Cu759seX.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-BAnqBevm.js → markdownlint-rule-browser-MV3bVGCC.js} +1 -1
- package/dist/public/assets/mermaid-GHXKKRXX-C9G7CQ6h.js +1 -0
- package/dist/public/assets/{mermaid-parser.core-ueh8mdU-.js → mermaid-parser.core-DpHycRcl.js} +2 -2
- package/dist/public/assets/{mermaid.core-RZ5le45c.js → mermaid.core-BnYdLHjl.js} +3 -3
- package/dist/public/assets/messages-B12ABuMo.js +1 -0
- package/dist/public/assets/messages-BUufFcK8.js +1 -0
- package/dist/public/assets/messages-BV-Jgai1.js +1 -0
- package/dist/public/assets/messages-B_u6thtp.js +1 -0
- package/dist/public/assets/messages-CS-CWF8r.js +1 -0
- package/dist/public/assets/messages-CwQGRPEE.js +1 -0
- package/dist/public/assets/messages-Cwceyxby.js +1 -0
- package/dist/public/assets/messages-DGpodehZ.js +1 -0
- package/dist/public/assets/messages-DHl_AYzv.js +1 -0
- package/dist/public/assets/messages-DbRvxOAn.js +1 -0
- package/dist/public/assets/messages-DdKkPWw3.js +1 -0
- package/dist/public/assets/{mindmap-definition-LN4V7U3C-Bcv7y0kn.js → mindmap-definition-LN4V7U3C-D6FYi_vY.js} +1 -1
- package/dist/public/assets/minus-H7UCODAH.js +1 -0
- package/dist/public/assets/{miss-dialog-store-CdaZpyLg.js → miss-dialog-store-DKfFwAsF.js} +1 -1
- package/dist/public/assets/navigation-targets-GITJ7Tz8.js +1 -0
- package/dist/public/assets/{now-CZywS9tX.js → now-Cd_fQsCQ.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-CgUiYJiR.js → open-managed-artifact-tab-DzG5xo47.js} +1 -1
- package/dist/public/assets/{ordinal-Bj6MlRdi.js → ordinal-oNJqAlZi.js} +1 -1
- package/dist/public/assets/packet-7NZHBO7P-BBeRj-Du.js +1 -0
- package/dist/public/assets/{panel-right-open-_nL1w4h-.js → panel-right-open-JxkSMPMb.js} +1 -1
- package/dist/public/assets/{paperclip-DV67TMJS.js → paperclip-BxFhnUjq.js} +1 -1
- package/dist/public/assets/{pegDiagram-2B236MQR-Du6F68bP.js → pegDiagram-2B236MQR-Cic2_Ooi.js} +1 -1
- package/dist/public/assets/pending-receive-nav-store-CitdQa34.js +1 -0
- package/dist/public/assets/pie-RZYD4A2V-BszLCTWh.js +1 -0
- package/dist/public/assets/{pieDiagram-ENE6RG2P-Du-eEA1d.js → pieDiagram-ENE6RG2P-DgqO0C3j.js} +1 -1
- package/dist/public/assets/{project-paths-BWmSfpDI.js → project-paths-DC6bWLUQ.js} +1 -1
- package/dist/public/assets/prop-types-DOjW8INh.js +1 -0
- package/dist/public/assets/{quadrantDiagram-ABIIQ3AL-NefyxxyK.js → quadrantDiagram-ABIIQ3AL-CC3ZGpWb.js} +1 -1
- package/dist/public/assets/radar-I7S5WNFK-CG0ShGDu.js +1 -0
- package/dist/public/assets/railroad-3IZDKUUU-N5ekmrCL.js +1 -0
- package/dist/public/assets/railroad-abnf-AHOZXSZD-DnjoKlG9.js +1 -0
- package/dist/public/assets/railroad-ebnf-EBAXGLYW-qDwmtJRh.js +1 -0
- package/dist/public/assets/railroad-peg-LSFZ7HO6-DSfMsKSD.js +1 -0
- package/dist/public/assets/{railroadDiagram-RFXS5EU6-CN_1Ywzn.js → railroadDiagram-RFXS5EU6-DaoKPEli.js} +1 -1
- package/dist/public/assets/{receive-store--Bc0z-E4.js → receive-store-8XeTNhUV.js} +1 -1
- package/dist/public/assets/{refresh-cw-Bjv-Fpq5.js → refresh-cw-CAV3aG7d.js} +1 -1
- package/dist/public/assets/{requirementDiagram-TGXJPOKE-bDLvkWBT.js → requirementDiagram-TGXJPOKE-qmFI0ev3.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-HTMAVEWB-CyhjQEet.js → sankeyDiagram-HTMAVEWB-CYeZQsa5.js} +1 -1
- package/dist/public/assets/{schema-fields-view-intent-BMlW8LRz.js → schema-fields-view-intent-CeZOW3HG.js} +1 -1
- package/dist/public/assets/{select-BaOsrrG7.js → select-BjNoD_FX.js} +1 -1
- package/dist/public/assets/{selection-context-CsRnyGFj.js → selection-context-tW7mNL04.js} +1 -1
- package/dist/public/assets/{separator-BXBsYPiB.js → separator-BKbgOjgy.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-DBY2YBRQ-BeYilBxj.js → sequenceDiagram-DBY2YBRQ-DfXkoRwp.js} +1 -1
- package/dist/public/assets/{sizeCapture-X5ZJPWSS-Mb3J__hm.js → sizeCapture-X5ZJPWSS-Bd7A4fpz.js} +1 -1
- package/dist/public/assets/skill-actions-B-rAAmok.js +2 -0
- package/dist/public/assets/{skill-scope-CwmLPgmT.js → skill-scope-qH5lhviP.js} +1 -1
- package/dist/public/assets/skills-api-Dl_Mtb7L.js +1 -0
- package/dist/public/assets/spinner-D7fgqgRw.js +1 -0
- package/dist/public/assets/{square-pen-CW0s3lqC.js → square-pen-hwoIfi3M.js} +1 -1
- package/dist/public/assets/{src-DfI4uz3u.js → src-DJwM4wxS.js} +2 -2
- package/dist/public/assets/{src-DT86yydp.js → src-XHagG0Wj.js} +1 -1
- package/dist/public/assets/{stateDiagram-2N3HPSRC-D0WNjYjx.js → stateDiagram-2N3HPSRC-CCh_abZC.js} +1 -1
- package/dist/public/assets/stateDiagram-v2-6OUMAXLB-CUhlDos5.js +1 -0
- package/dist/public/assets/{swimlanes-5IMT3BWC-BAPdgrYU.js → swimlanes-5IMT3BWC-Dk2uoutn.js} +2 -2
- package/dist/public/assets/swimlanesDiagram-G3AALYLV-DHL99Ckz.js +8 -0
- package/dist/public/assets/{tag-pill-input-DnM-Fz1E.js → tag-pill-input-Cg2Wozsu.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-D8zAsaUV.js → target-navigation-intent-uYgRrqg5.js} +1 -1
- package/dist/public/assets/{telemetry-impl-DFcgjFFc.js → telemetry-impl-LPWb9DJh.js} +2 -2
- package/dist/public/assets/{telemetry-startup-0F_AW_hr.js → telemetry-startup-B-jACYNe.js} +1 -1
- package/dist/public/assets/terminal-bCsp6kPz.js +1 -0
- package/dist/public/assets/{terminal-cli-display-Djf7X5gE.js → terminal-cli-display-BqUx5532.js} +1 -1
- package/dist/public/assets/terminal-launch-events-C9cyVGWq.js +1 -0
- package/dist/public/assets/{terminal-telemetry-CynEAJPS.js → terminal-telemetry-BoS_NSJ3.js} +1 -1
- package/dist/public/assets/{text-viewer-languages-BBrkAtBf.js → text-viewer-languages-BmEIetCD.js} +2 -2
- package/dist/public/assets/{timeline-definition-FHXFAJF6-BnIpQBQO.js → timeline-definition-FHXFAJF6-tb13RhWP.js} +1 -1
- package/dist/public/assets/{trash-2-rgduGgZB.js → trash-2-CSpv7np3.js} +1 -1
- package/dist/public/assets/treeView-QDETBFTQ-DwFOcFO4.js +1 -0
- package/dist/public/assets/treemap-6X3UGDF4-D_-cggQd.js +1 -0
- package/dist/public/assets/{triangle-alert-CnW4IElJ.js → triangle-alert-xKPljhlK.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-DzIKrNKg.js → typing-burst-detector-i5YC5a51.js} +2 -2
- package/dist/public/assets/{undo-2-BmxrL5XS.js → undo-2-D5cqFzyJ.js} +1 -1
- package/dist/public/assets/uninstall-DTD665q0.js +1 -0
- package/dist/public/assets/{use-activity-panel-CbIsW8Oq.js → use-activity-panel-B_OxshWx.js} +1 -1
- package/dist/public/assets/use-apply-config-color-theme-6RHjH1SX.js +1 -0
- package/dist/public/assets/{use-collab-url-DESxkkaS.js → use-collab-url-4QmUjyTo.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-D9HFWiME.js → use-live-xterm-theme-BaPGSFwn.js} +1 -1
- package/dist/public/assets/{use-open-skill-DyTRfvTr.js → use-open-skill-BZcJfbB3.js} +1 -1
- package/dist/public/assets/use-popular-skills-BI639F_L.js +1 -0
- package/dist/public/assets/{use-settings-route-BXWhuQbZ.js → use-settings-route-Ln_W_o3I.js} +1 -1
- package/dist/public/assets/{use-skill-origin-DBXnPKZS.js → use-skill-origin-BjoZBPjm.js} +1 -1
- package/dist/public/assets/{use-skills-CVci-eTA.js → use-skills-DyoXP6p3.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-DDthawVX.js → use-terminal-enabled-C1FCQb8g.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-BC2rFPLm.js → use-timeline-entry-diff-C5UrKke2.js} +4 -4
- package/dist/public/assets/{use-workspace-CAcWHNxj.js → use-workspace-C5uwuxa8.js} +1 -1
- package/dist/public/assets/{vennDiagram-L72KCM5P-C38RYC28.js → vennDiagram-L72KCM5P-Cyp_-2xs.js} +1 -1
- package/dist/public/assets/wardley-OPB4EBWU-Dz0s9mBi.js +1 -0
- package/dist/public/assets/{wardleyDiagram-EHGQE667-B0VRsKo1.js → wardleyDiagram-EHGQE667-C5z1_r-x.js} +1 -1
- package/dist/public/assets/{wrench-DtGaC8XY.js → wrench-yAsO-Pm9.js} +1 -1
- package/dist/public/assets/x-BopM5CF8.js +1 -0
- package/dist/public/assets/{xychartDiagram-FW5EYKEG-jAQK9E85.js → xychartDiagram-FW5EYKEG-DH9RxgRE.js} +1 -1
- package/dist/public/index.html +144 -140
- package/dist/public/uninstall.html +14 -14
- package/dist/{repair-launch-json-V-un1HwF.mjs → repair-launch-json-D_fCoitG.mjs} +2 -2
- package/dist/{repair-mcp-configs-CgS2qBwI.mjs → repair-mcp-configs-C3cLZGEE.mjs} +2 -2
- package/dist/{repair-skills-cQdbD3lz.mjs → repair-skills-BKjhKhUN.mjs} +2 -2
- package/dist/repair-skills-DN4OicpR.mjs +1 -0
- package/dist/schemas/v0/config.project-local.schema.json +61 -0
- package/dist/schemas/v0/config.project.schema.json +76 -7
- package/dist/schemas/v0/config.user.schema.json +41 -33
- package/dist/{server-lock-CVlhIOaP.mjs → server-lock-qqJQphTS.mjs} +2 -2
- package/dist/server-lock-rwNc7NVh.mjs +1 -0
- package/dist/{skill-teardown-BVQqx1VE.mjs → skill-teardown-B4kT3Fxa.mjs} +2 -2
- package/dist/{sleep-DVOInM4H.mjs → sleep-DdJljU3h.mjs} +21 -20
- package/dist/src-BB2_Ksle.mjs +2032 -0
- package/dist/src-DyAkipH8.mjs +1 -0
- package/dist/src-Joe5Ft2d.mjs +20 -0
- package/dist/src-c73kUNxd.mjs +348 -0
- package/dist/src-n7camJHB.mjs +1 -0
- package/dist/start-BUeLlQd8.mjs +1 -0
- package/dist/start-CYM9hyHf.mjs +4 -0
- package/dist/{write-project-skill-DPVCl9Kv.mjs → write-project-skill-BD0rO6kN.mjs} +4 -4
- package/package.json +4 -4
- package/dist/acp-harness-probe-DwJF1QrM.mjs +0 -3
- package/dist/constants-C9EGLQ-u.mjs +0 -2
- package/dist/fs-traced-DVpoNaQJ.mjs +0 -12
- package/dist/fs-traced-_QGcVmcb.mjs +0 -1
- package/dist/git-handle-BfyNyc1q.mjs +0 -1
- package/dist/init-8_iXriiz.mjs +0 -638
- package/dist/init-D5SAyEIp.mjs +0 -1
- package/dist/loader-CJqV3lQK.mjs +0 -2
- package/dist/loader-CU-Nz3ee.mjs +0 -1
- package/dist/md-manager-DGG55-uN.mjs +0 -2
- package/dist/preview-CjwSh-52.mjs +0 -1
- package/dist/public/assets/ActivityModeContent-HRSmxB9_.js +0 -1
- package/dist/public/assets/AgentDiffPane-BGYo5UN6.js +0 -2
- package/dist/public/assets/BugReportHistory-CRlvJE2K.js +0 -1
- package/dist/public/assets/ChangedOutsideBadge-CG45zoCT.js +0 -1
- package/dist/public/assets/CodeMirrorPropInput-B__Dqs8P.js +0 -3
- package/dist/public/assets/DocumentContext-Dxzqsjf0.js +0 -38
- package/dist/public/assets/FeedbackForm-YQbdmBFL.js +0 -1
- package/dist/public/assets/ImportSkillDialog-CgeVAxXn.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-BfO4jYnj.js +0 -2
- package/dist/public/assets/ManagedArtifactProperties-Dmjq1ugS.js +0 -1
- package/dist/public/assets/ReportBugDialogBody-f7fl9dVO.js +0 -3
- package/dist/public/assets/SessionsHost-DPObQsYR.js +0 -2
- package/dist/public/assets/SettingsDialogBody-C53PpDiP.js +0 -12
- package/dist/public/assets/ShareBranchSwitchDialog-DMbjNni-.js +0 -1
- package/dist/public/assets/ShareReceiveDialog-DMLSpBoi.js +0 -1
- package/dist/public/assets/SkillOriginInline-BoGssBkU.js +0 -1
- package/dist/public/assets/SkillToolbarControls-C8yypIJ3.js +0 -1
- package/dist/public/assets/ThreadView-DJxvdzfd.js +0 -10
- package/dist/public/assets/TimelineDiffPane-D5U46urB.js +0 -2
- package/dist/public/assets/architecture-TIHT7OUA-DHywK0qf.js +0 -1
- package/dist/public/assets/arrow-up-right-CXYxHO7Z.js +0 -1
- package/dist/public/assets/auth-state-cache-Dm1J9vyz.js +0 -11
- package/dist/public/assets/channel-BNyr5ucm.js +0 -1
- package/dist/public/assets/check-DA6LolTH.js +0 -1
- package/dist/public/assets/chevron-left-DY9flfyc.js +0 -1
- package/dist/public/assets/chevron-right-2RK4DD3b.js +0 -1
- package/dist/public/assets/chunk-2Q5K7J3B-UKfnOi4g.js +0 -1
- package/dist/public/assets/chunk-VAUOI2AC-ChJppfl7.js +0 -1
- package/dist/public/assets/chunk-XXDRQBXY-Bsh29NfZ.js +0 -1
- package/dist/public/assets/classDiagram-OUVF2IWQ-6PbrHEW6.js +0 -1
- package/dist/public/assets/classDiagram-v2-EOCWNBFH-B4bz8Etj.js +0 -1
- package/dist/public/assets/client-version-BbTOZkhQ.js +0 -1
- package/dist/public/assets/config-provider-CZ_6SNHv.js +0 -5
- package/dist/public/assets/cynefin-VYW2F7L2-CjkKc5Wd.js +0 -1
- package/dist/public/assets/eventmodeling-45OFAUF4-GQ05Sah7.js +0 -1
- package/dist/public/assets/flowDiagram-23GEKE2U-CwO12b-s.js +0 -1
- package/dist/public/assets/gitGraph-TEB2WS4Q-Da8kWWZb.js +0 -1
- package/dist/public/assets/globals-CIRDbOmQ.css +0 -1
- package/dist/public/assets/i18n-iRTrMKQI.js +0 -1
- package/dist/public/assets/index-Dask65mE.js +0 -2097
- package/dist/public/assets/info-DKCQHKI2-BPZv5cfZ.js +0 -1
- package/dist/public/assets/loader-circle-BbuX0POi.js +0 -1
- package/dist/public/assets/mermaid-GHXKKRXX-CaB-_LCR.js +0 -1
- package/dist/public/assets/messages-52Q73NDn.js +0 -1
- package/dist/public/assets/messages-B-LUKCxb.js +0 -1
- package/dist/public/assets/messages-Bjt29O_q.js +0 -1
- package/dist/public/assets/messages-BzwBNPDu.js +0 -1
- package/dist/public/assets/messages-CGjveR2E.js +0 -1
- package/dist/public/assets/messages-CkanzrCR.js +0 -1
- package/dist/public/assets/messages-Cy75Ipbk.js +0 -1
- package/dist/public/assets/messages-D2UntltU.js +0 -1
- package/dist/public/assets/messages-D8H0FnV4.js +0 -1
- package/dist/public/assets/messages-Dl7JEKLk.js +0 -1
- package/dist/public/assets/messages-s-nrsPLp.js +0 -1
- package/dist/public/assets/minus-Ba4o_31L.js +0 -1
- package/dist/public/assets/navigation-targets-BhdJAW-R.js +0 -1
- package/dist/public/assets/packet-7NZHBO7P-BtkfuFQU.js +0 -1
- package/dist/public/assets/pending-receive-nav-store-Crda7hlg.js +0 -1
- package/dist/public/assets/pie-RZYD4A2V-DipSPJ4R.js +0 -1
- package/dist/public/assets/prop-types-CvU-2DkU.js +0 -1
- package/dist/public/assets/radar-I7S5WNFK-CsW1Ke6j.js +0 -1
- package/dist/public/assets/railroad-3IZDKUUU-CDGYvuvs.js +0 -1
- package/dist/public/assets/railroad-abnf-AHOZXSZD-IJHoKQ5T.js +0 -1
- package/dist/public/assets/railroad-ebnf-EBAXGLYW-DiwXL3Zg.js +0 -1
- package/dist/public/assets/railroad-peg-LSFZ7HO6-B4tduAeK.js +0 -1
- package/dist/public/assets/skill-actions-B7Cmxryy.js +0 -2
- package/dist/public/assets/skills-api-DDfyPLwg.js +0 -1
- package/dist/public/assets/stateDiagram-v2-6OUMAXLB-NccT1PAw.js +0 -1
- package/dist/public/assets/swimlanesDiagram-G3AALYLV-CIDy7tZE.js +0 -8
- package/dist/public/assets/terminal-BNdVsbND.js +0 -1
- package/dist/public/assets/terminal-launch-events-B76nHQ-9.js +0 -1
- package/dist/public/assets/treeView-QDETBFTQ-DCy4i-OI.js +0 -1
- package/dist/public/assets/treemap-6X3UGDF4-BrUnfA75.js +0 -1
- package/dist/public/assets/uninstall-DT91VYMe.js +0 -1
- package/dist/public/assets/use-apply-config-color-theme-Cd_bVm8F.js +0 -1
- package/dist/public/assets/use-skill-directory-BaP9hj7C.js +0 -1
- package/dist/public/assets/wardley-OPB4EBWU-yXijkZ08.js +0 -1
- package/dist/public/assets/x-D8xzRaMT.js +0 -1
- package/dist/repair-skills-KPpoS1oT.mjs +0 -1
- package/dist/server-lock-CMPaDe7b.mjs +0 -1
- package/dist/src-C1NIOm2S.mjs +0 -1
- package/dist/src-Cb3i1kcm.mjs +0 -348
- package/dist/src-Dn98dNdR.mjs +0 -1
- package/dist/src-Mfncsy21.mjs +0 -20
- package/dist/src-q9JjDIHN.mjs +0 -2032
- package/dist/start-BSLZXd-A.mjs +0 -4
- package/dist/start-CJ3wdpkC.mjs +0 -1
- /package/dist/public/assets/{ActivityPanelDiffView-aQoOngI6.js → ActivityPanelDiffView-fDxLwTi2.js} +0 -0
- /package/dist/public/assets/{SkillModeBanner-Y5LYtJrC.js → SkillModeBanner-d0ZDkWTk.js} +0 -0
- /package/dist/public/assets/{__vite-browser-external-6FU8ctEn.js → __vite-browser-external-D_48KNDi.js} +0 -0
- /package/dist/public/assets/{agent-presence-DntZZFlY.js → agent-presence-DK_W4GTa.js} +0 -0
- /package/dist/public/assets/{array-Ce922FV9.js → array-DYKIbRR-.js} +0 -0
- /package/dist/public/assets/{asset-dispatch-_dEhJuVP.js → asset-dispatch-DsHoHhCG.js} +0 -0
- /package/dist/public/assets/{auth-prompt-store-CeaWNesV.js → auth-prompt-store-CyiGTt3C.js} +0 -0
- /package/dist/public/assets/{badge-CY_v_nGy.js → badge-zHd29IKW.js} +0 -0
- /package/dist/public/assets/{chunk-KEIR6QF5-88h2AcFS.js → chunk-KEIR6QF5-Z0IgTo4K.js} +0 -0
- /package/dist/public/assets/{chunk-Y2CYZVJY-B-DQ9l1H.js → chunk-Y2CYZVJY-Bmis3P2F.js} +0 -0
- /package/dist/public/assets/{clike-DDeLLKpf.js → clike-l3ublWpW.js} +0 -0
- /package/dist/public/assets/{clipboard-adapter-C4L1qX1X.js → clipboard-adapter-DEJxizFj.js} +0 -0
- /package/dist/public/assets/{code-highlighter-impl-Bq6VPPCL.js → code-highlighter-impl-CHS525hA.js} +0 -0
- /package/dist/public/assets/{colors-DXv_7g0X.js → colors-C77NTF6g.js} +0 -0
- /package/dist/public/assets/{copilot-D0J83lOh.js → copilot-BdGxiVpg.js} +0 -0
- /package/dist/public/assets/{createLucideIcon-BcLKHslE.js → createLucideIcon-6iYxif1u.js} +0 -0
- /package/dist/public/assets/{cursor-B6-YoFzF.js → cursor-CUtcHGV-.js} +0 -0
- /package/dist/public/assets/{cytoscape.esm-61X9Wf4W.js → cytoscape.esm-C2gIT5zZ.js} +0 -0
- /package/dist/public/assets/{defaultLocale-BypL9rsE.js → defaultLocale-BugBqEWo.js} +0 -0
- /package/dist/public/assets/{desktop-bridge-types-rBjHIYSI.js → desktop-bridge-types-oYPdTDmz.js} +0 -0
- /package/dist/public/assets/{diff-CUOV9XAb.js → diff-TXhtTD_D.js} +0 -0
- /package/dist/public/assets/{dist-BSzXg9wc.js → dist-1ia0sKe1.js} +0 -0
- /package/dist/public/assets/{dist-BTu6o3T-.js → dist-B0Beym3_.js} +0 -0
- /package/dist/public/assets/{dist-CG-e4AlS.js → dist-DNiTklSL.js} +0 -0
- /package/dist/public/assets/{documents-fetch-B8A9IAH3.js → documents-fetch-I34CgFeh.js} +0 -0
- /package/dist/public/assets/{external-link-Bw5EK5AQ.js → external-link-CHCx4FXC.js} +0 -0
- /package/dist/public/assets/{file-tree-rename-validation-Dt6fQYnB.js → file-tree-rename-validation-DEuNOzhg.js} +0 -0
- /package/dist/public/assets/{form-WTEKK5Th.js → form-_Bm7VdZa.js} +0 -0
- /package/dist/public/assets/{format-C7y0e043.js → format-Dx1Bv63R.js} +0 -0
- /package/dist/public/assets/{gherkin-DHKdvgzn.js → gherkin-Bu_VunKM.js} +0 -0
- /package/dist/public/assets/{globals-C9aYStL7.js → globals-B8Za6o5Q.js} +0 -0
- /package/dist/public/assets/{go-C7e4ztpP.js → go-BYJ3ESi0.js} +0 -0
- /package/dist/public/assets/{init-DQ9T43b9.js → init-B44NBVpk.js} +0 -0
- /package/dist/public/assets/{input-_CzMpvY9.js → input-VnbFvuKd.js} +0 -0
- /package/dist/public/assets/{isObject-B3vD71ho.js → isObject-Dhzo1ma6.js} +0 -0
- /package/dist/public/assets/{libesm-DLjHMG6S.js → libesm-BYxokP1G.js} +0 -0
- /package/dist/public/assets/{lint-plugin-meta-D6yg1VIa.js → lint-plugin-meta-FPoTE-0t.js} +0 -0
- /package/dist/public/assets/{lru-string-cache-D1rxjuni.js → lru-string-cache-BgNKFfCO.js} +0 -0
- /package/dist/public/assets/{lua-BbsHik3c.js → lua-De9v6Xwm.js} +0 -0
- /package/dist/public/assets/{mcp-consent-store-yqsuAEir.js → mcp-consent-store-CBPF1Ll9.js} +0 -0
- /package/dist/public/assets/{min-LWIJDKXt.js → min-CgRbfTQR.js} +0 -0
- /package/dist/public/assets/{panel-DVJ8gssn.js → panel-9S5Pf2VO.js} +0 -0
- /package/dist/public/assets/{panzoom.es-CnTJleIF.js → panzoom.es-CebiCTnw.js} +0 -0
- /package/dist/public/assets/{path-CdhP4z-N.js → path-DNVjzh9n.js} +0 -0
- /package/dist/public/assets/{pdf-CvpTyCsQ.js → pdf-19dxfod4.js} +0 -0
- /package/dist/public/assets/{pdf.worker-Dwl0H-tq.js → pdf.worker-Cn0IyjYR.js} +0 -0
- /package/dist/public/assets/{perl-B_IBZ74F.js → perl-DAC-0-L4.js} +0 -0
- /package/dist/public/assets/{properties-DC2eg36q.js → properties-BuEq0L0N.js} +0 -0
- /package/dist/public/assets/{r-Cuws8T_X.js → r-D6J_8GbJ.js} +0 -0
- /package/dist/public/assets/{rough.esm-Bmw38t74.js → rough.esm-hH2VdTtm.js} +0 -0
- /package/dist/public/assets/{ruby-B4Exyfkx.js → ruby-BulDdqGQ.js} +0 -0
- /package/dist/public/assets/{share-metadata-rows-a0ScdR3d.js → share-metadata-rows-CBd7DuHz.js} +0 -0
- /package/dist/public/assets/{shell-DA6f2ert.js → shell-FYbPjPiK.js} +0 -0
- /package/dist/public/assets/{skeleton-ColtBPsg.js → skeleton-BOVIbSHk.js} +0 -0
- /package/dist/public/assets/{sortable.esm-DlAqBM0z.js → sortable.esm-mqYoEMD5.js} +0 -0
- /package/dist/public/assets/{sql-gKfhysbI.js → sql-BTcd-g6A.js} +0 -0
- /package/dist/public/assets/{src-l8acH7-t.js → src-D2oHIihg.js} +0 -0
- /package/dist/public/assets/{startup-marks-BPO-vrjH.js → startup-marks-BYurBbnW.js} +0 -0
- /package/dist/public/assets/{stex-Cj2UNqUe.js → stex-BmYSnOnf.js} +0 -0
- /package/dist/public/assets/{swift-D4PiCeXt.js → swift-CnW5XUwC.js} +0 -0
- /package/dist/public/assets/{terminal-command-events-BBYZtptJ.js → terminal-command-events-mSM3ArSl.js} +0 -0
- /package/dist/public/assets/{textarea-C5-cm3M6.js → textarea-D59GB_Zy.js} +0 -0
- /package/dist/public/assets/{thread-client-CER-baRK.js → thread-client-DySYYPC9.js} +0 -0
- /package/dist/public/assets/{thread-draft-staging-DZhf3sQU.js → thread-draft-staging-BZaq81Sj.js} +0 -0
- /package/dist/public/assets/{timeline-diff-store-BpUHW_Yp.js → timeline-diff-store-cCBpDgND.js} +0 -0
- /package/dist/public/assets/{toml-BAg1ozw3.js → toml-vEnVjPi4.js} +0 -0
- /package/dist/public/assets/{use-installed-clis-CsPJ2Mod.js → use-installed-clis-CdB0ME5s.js} +0 -0
- /package/dist/public/assets/{useLintConfigViewMode-shAfv89B.js → useLintConfigViewMode-C89oTBHY.js} +0 -0
- /package/dist/public/assets/{workspace-paths-D7hYulMY.js → workspace-paths-C2pS_Pbn.js} +0 -0
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{o as e,t}from"./chunk-CYidjpOJ.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{Tn as r,Yt as i}from"./DocumentContext-Dxzqsjf0.js";import{t as a}from"./react-f2sANaYj.js";import{n as o,r as s}from"./dist-Nvb76hAm.js";import{t as c}from"./useQuery-ZeEDLtxh.js";import{n as l}from"./dist-PQ5KMVDh.js";import{t as u}from"./compiler-runtime-BfE3aGVn.js";import{a as d,c as f,o as p,r as m}from"./local-menu-action-bus-BDB0W02w.js";import{t as h}from"./utils-CPqDy6Hr.js";import{i as g,n as _,o as v,s as y,t as b}from"./ChangedOutsideBadge-CG45zoCT.js";import{t as x}from"./button-RQ5o7P7w.js";import{i as S,n as C,t as w}from"./tooltip-x7BNUa3s.js";import{n as T,r as E,t as D}from"./collapsible-OhEmjTXw.js";import{a as O,c as k,i as A,n as j,o as M,r as N,s as P,t as F}from"./dialog-O4u6_xiQ.js";import{t as I}from"./checkbox-gpfWb1pY.js";import{a as L,m as R,r as z,t as B}from"./dropdown-menu-CP1RnfZI.js";import{t as V}from"./label-BT2yjpKR.js";import{i as H,n as ee,o as U,s as te,t as ne}from"./select-BaOsrrG7.js";import{n as re,t as ie}from"./radio-group-CmCnommQ.js";import{n as ae}from"./separator-BXBsYPiB.js";import{t as W}from"./switch-0kSGDL9E.js";import{n as G,r as K,t as oe}from"./toggle-group-DAYvcc1F.js";import{S as q,a as J,c as Y,d as se,f as ce,i as le,l as ue,m as de,n as fe,o as pe,r as me,s as he,u as ge,v as _e,y as ve}from"./terminal-cli-display-Djf7X5gE.js";import{i as ye}from"./terminal-telemetry-CynEAJPS.js";import{$ as be,Ca as xe,Co as Se,Do as Ce,Ea as we,Ft as Te,Ho as Ee,Jo as De,Ko as Oe,Lo as ke,Po as Ae,Pt as je,To as Me,Uo as Ne,Vo as Pe,Yo as Fe,_r as Ie,bo as Le,co as Re,do as ze,fo as Be,ht as Ve,jo as He,ko as Ue,lo as We,qo as Ge,si as Ke,so as qe,vo as Je,wo as Ye,xa as Xe,yo as Ze}from"./dist-TVrIGknK2.js";import{a as Qe,c as $e,d as et,g as tt,l as nt,n as rt,p as it,u as at}from"./use-settings-route-BXWhuQbZ.js";import{t as ot}from"./dist-DoS8xGN6.js";import{n as X}from"./dist-Bkx5dDHT2.js";import{a as st,c as ct,d as lt,f as ut,h as dt,i as ft,l as pt,m as mt,n as ht,o as gt,s as _t,u as vt}from"./use-apply-config-color-theme-Cd_bVm8F.js";import{t as yt}from"./createLucideIcon-BcLKHslE.js";import{a as bt,c as xt,d as St,s as Ct,t as wt}from"./EnableSyncConfirmDialog-DBMws9uC.js";import{t as Tt}from"./arrow-up-right-CXYxHO7Z.js";import{t as Et}from"./RegisteredAgentIcon-CCgDsAUc.js";import{t as Dt}from"./check-DA6LolTH.js";import{t as Ot}from"./chevron-right-2RK4DD3b.js";import{t as kt}from"./CopyButton-Q-6hSzy6.js";import{i as At}from"./prop-types-CvU-2DkU.js";import{A as jt,C as Mt,D as Nt,E as Pt,L as Ft,M as It,N as Lt,P as Rt,S as zt,V as Bt,_ as Vt,b as Ht,d as Ut,f as Wt,g as Gt,i as Kt,j as qt,k as Jt,l as Yt,n as Xt,o as Zt,u as Qt,v as $t,x as en,y as tn,z as nn}from"./auth-state-cache-Dm1J9vyz.js";import{o as rn}from"./folder-config-api-CKhPo3Lt.js";import{t as an}from"./info-160SNOuG.js";import{t as on}from"./loader-circle-BbuX0POi.js";import{t as sn}from"./square-pen-CW0s3lqC.js";import{t as cn}from"./terminal-BNdVsbND.js";import{t as ln}from"./trash-2-rgduGgZB.js";import{t as un}from"./triangle-alert-CnW4IElJ.js";import{t as dn}from"./x-D8xzRaMT.js";import{d as fn}from"./doc-paths-BKAhPn1c.js";import{t as pn}from"./ConfigSharingInfoTooltip-BNI3Q3Qo.js";import{t as mn}from"./input-_CzMpvY9.js";import{Y as hn}from"./navigation-targets-BhdJAW-R.js";import{t as gn}from"./badge-CY_v_nGy.js";import{i as _n}from"./field-BADrt9_J.js";import"./config-provider-CZ_6SNHv.js";import{t as vn}from"./external-link-Bw5EK5AQ.js";import{t as yn}from"./textarea-C5-cm3M6.js";import{t as bn}from"./lint-plugin-meta-D6yg1VIa.js";import{t as xn}from"./skeleton-ColtBPsg.js";import{d as Sn,n as Cn,r as wn,t as Tn,u as En}from"./lint-config-client-KRlZx1_T.js";import{_ as Dn,a as On,d as kn,f as An,g as jn,h as Mn,i as Nn,o as Pn,s as Fn,t as In,u as Ln}from"./sortable.esm-DlAqBM0z.js";import{t as Rn}from"./open-managed-artifact-tab-CgUiYJiR.js";import{n as zn,r as Bn,t as Vn}from"./input-group-CPKSxoq5.js";import{a as Hn,f as Un,i as Wn,n as Gn,o as Kn,p as qn,r as Jn,s as Yn,t as Xn}from"./form-WTEKK5Th.js";import{r as Zn,t as Qn}from"./terminal-command-events-BBYZtptJ.js";import{t as $n}from"./tag-pill-input-DnM-Fz1E.js";import{t as er}from"./markdownlint-rule-browser-BAnqBevm.js";import{i as tr,n as nr}from"./schema-fields-view-intent-BMlW8LRz.js";import{n as rr,t as ir}from"./use-terminal-enabled-DDthawVX.js";var ar=yt(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),or=yt(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),sr=yt(`wifi-off`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Z=u(),Q=e(a(),1),$=n(),cr=`settings-sharing-title`;function lr(){let e=(0,Z.c)(1),t=(typeof window<`u`?window.okDesktop:void 0)?.sharing,n;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=t===void 0?(0,$.jsx)(ur,{}):(0,$.jsx)(dr,{}),e[0]=n):n=e[0],n}function ur(){let e=(0,Z.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(`h3`,{id:cr,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`cs4mps`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(`section`,{"aria-labelledby":cr,className:`space-y-3`,children:(0,$.jsxs)(`div`,{className:`space-y-1`,children:[t,(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`7YRrJ9`,components:{0:(0,$.jsx)(`code`,{}),1:(0,$.jsx)(`code`,{}),2:(0,$.jsx)(`code`,{})}})})]})}),e[1]=n):n=e[1],n}function dr(){let e=(0,Z.c)(39),{_:t}=s(),[n,r]=(0,Q.useState)(null),[i,a]=(0,Q.useState)(!1),[c,l]=(0,Q.useState)(null),u;e[0]===t?u=e[1]:(u=async function(){let e=window.okDesktop?.sharing;if(e)try{r(await e.status())}catch(e){let n=e;X.error(n instanceof Error?n.message:t({id:`K0N7zS`})),r(pr)}},e[0]=t,e[1]=u);let d=u,f;e[2]===d?f=e[3]:(f=()=>{d()},e[2]=d,e[3]=f);let p;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=[],e[4]=p):p=e[4],(0,Q.useEffect)(f,p);let m;e[5]!==t||e[6]!==i||e[7]!==d||e[8]!==n?(m=async function(e){let r=window.okDesktop?.sharing;if(!r||n===null||i||n.mode===e)return;a(!0),l(null);let o=null,s=null;try{o=await r.setMode(e)}catch(e){s=e}if(a(!1),s!==null){X.error(s instanceof Error?s.message:t({id:`qZv5ZR`}));return}o!==null&&(o.kind===`refused-tracked`?(l({tracked:o.tracked,remediation:o.remediation}),X.error(t({id:`z2JdQ-`}),{duration:5e3})):o.kind===`no-exclude`?X.warning(o.reason===`no-git`?t({id:`YSFv5w`}):t({id:`8cS0nH`,values:{0:o.reason}})):X.success(t(e===`local-only`?{id:`wdzBgi`}:{id:`k_pade`})),await d())},e[5]=t,e[6]=i,e[7]=d,e[8]=n,e[9]=m):m=e[9];let h=m,g;e[10]!==t||e[11]!==i||e[12]!==d||e[13]!==n?(g=async function(){let e=window.okDesktop?.sharing;if(!e||n===null||i)return;a(!0);let r=null,o=null;try{r=await e.setSkillsShared(!1)}catch(e){o=e}if(a(!1),o!==null){X.error(o instanceof Error?o.message:t({id:`onTlRk`}));return}if(r!==null){if(r.kind===`no-exclude`){let e=r.reason===`no-git`?t({id:`Xwump4`}):r.reason===`inaccessible`?t({id:`PlGC6r`}):t({id:`zcmYx4`});X.warning(t({id:`4h3e0H`,values:{detail:e}}));return}X.success(t({id:`P3S14k`})),await d()}},e[10]=t,e[11]=i,e[12]=d,e[13]=n,e[14]=g):g=e[14];let _=g;if(n===null){let t;return e[15]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`section`,{"aria-labelledby":cr,className:`space-y-3`,children:[(0,$.jsx)(`h3`,{id:cr,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`cs4mps`})}),(0,$.jsx)(xn,{className:`h-24`})]}),e[15]=t):t=e[15],t}let v=n.mode===`no-git`,y;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,$.jsx)(`h3`,{id:cr,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`cs4mps`})}),(0,$.jsx)(pn,{})]}),e[16]=y):y=e[16];let b;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[y,(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`N55YNr`})})]}),e[17]=b):b=e[17];let S;e[18]!==i||e[19]!==v||e[20]!==h||e[21]!==n.mode?(S=v?(0,$.jsx)(`p`,{className:`rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-sm text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-200`,role:`status`,"data-testid":`settings-sharing-no-git`,children:(0,$.jsx)(o,{id:`ju38ms`})}):(0,$.jsxs)(ie,{value:n.mode,onValueChange:e=>void h(e),disabled:i,className:`gap-2`,"aria-labelledby":cr,"data-testid":`settings-sharing-radiogroup`,children:[(0,$.jsxs)(`label`,{htmlFor:`settings-sharing-shared`,className:`flex items-start gap-2 text-sm`,children:[(0,$.jsx)(re,{id:`settings-sharing-shared`,value:`shared`,"data-testid":`settings-sharing-shared`,className:`mt-1`}),(0,$.jsxs)(`span`,{children:[(0,$.jsx)(`span`,{className:`font-medium`,children:(0,$.jsx)(o,{id:`0Gd0NU`})}),(0,$.jsx)(`span`,{className:`block text-1sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`dJw2_7`})})]})]}),(0,$.jsxs)(`label`,{htmlFor:`settings-sharing-local-only`,className:`flex items-start gap-2 text-sm`,children:[(0,$.jsx)(re,{id:`settings-sharing-local-only`,value:`local-only`,"data-testid":`settings-sharing-local-only`,className:`mt-1`}),(0,$.jsxs)(`span`,{children:[(0,$.jsx)(`span`,{className:`font-medium`,children:(0,$.jsx)(o,{id:`QjzFZj`})}),(0,$.jsx)(`span`,{className:`block text-1sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`un-K1H`})})]})]})]}),e[18]=i,e[19]=v,e[20]=h,e[21]=n.mode,e[22]=S):S=e[22];let C;e[23]!==i||e[24]!==_||e[25]!==n.mode||e[26]!==n.skillsShared?(C=n.mode===`local-only`&&n.skillsShared?(0,$.jsxs)(`div`,{className:`flex items-start justify-between gap-2 rounded-md border border-muted-foreground/30 bg-muted/40 p-3 text-sm`,"data-testid":`settings-sharing-skills-exception`,children:[(0,$.jsxs)(`span`,{children:[(0,$.jsx)(`span`,{className:`font-medium`,children:(0,$.jsx)(o,{id:`Kiytqd`})}),(0,$.jsx)(`span`,{className:`block text-1sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`K0FgsP`})})]}),(0,$.jsx)(x,{variant:`outline`,size:`sm`,disabled:i,onClick:()=>void _(),children:(0,$.jsx)(o,{id:`9uI_rE`})})]}):null,e[23]=i,e[24]=_,e[25]=n.mode,e[26]=n.skillsShared,e[27]=C):C=e[27];let w;e[28]===c?w=e[29]:(w=c===null?null:(0,$.jsxs)(`div`,{className:`space-y-2 rounded-md border border-destructive bg-destructive/10 p-3 text-sm`,role:`alert`,"data-testid":`settings-sharing-refusal`,children:[(0,$.jsx)(`p`,{className:`font-semibold`,children:(0,$.jsx)(o,{id:`ZscwQ0`})}),(0,$.jsx)(`pre`,{className:`whitespace-pre-wrap font-mono text-xs leading-relaxed`,children:c.remediation}),(0,$.jsx)(x,{variant:`outline`,size:`sm`,onClick:()=>l(null),children:(0,$.jsx)(o,{id:`1QfxQT`})})]}),e[28]=c,e[29]=w);let T;e[30]!==c||e[31]!==n.mode||e[32]!==n.trackedUpstream?(T=n.trackedUpstream.length>0&&n.mode!==`no-git`&&c===null?(0,$.jsxs)(`div`,{className:`space-y-1 rounded-md border border-muted-foreground/30 bg-muted/40 p-3 text-sm`,"data-testid":`settings-sharing-tracked-info`,children:[(0,$.jsx)(`p`,{className:`font-medium`,children:(0,$.jsx)(o,{id:`LhWYpm`})}),(0,$.jsx)(`ul`,{className:`list-disc pl-5 font-mono text-xs text-muted-foreground`,children:n.trackedUpstream.map(fr)}),(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`1XSMhZ`,components:{0:(0,$.jsx)(`code`,{}),1:(0,$.jsx)(`code`,{})}})})]}):null,e[30]=c,e[31]=n.mode,e[32]=n.trackedUpstream,e[33]=T):T=e[33];let E;return e[34]!==T||e[35]!==S||e[36]!==C||e[37]!==w?(E=(0,$.jsxs)(`section`,{"aria-labelledby":cr,className:`space-y-4`,"data-testid":`settings-sharing`,children:[b,S,C,w,T]}),e[34]=T,e[35]=S,e[36]=C,e[37]=w,e[38]=E):E=e[38],E}function fr(e){return(0,$.jsx)(`li`,{children:e},e)}function pr(e){return e??{kind:`status`,mode:`no-git`,excluded:[],trackedUpstream:[],skillsShared:!1}}function mr(e){let t=(0,Z.c)(35),{authQueryTransport:n,authTransport:r}=e,{_:i}=s(),a;t[0]===n?a=t[1]:(a=n??Ft(),t[0]=n,t[1]=a);let c=a,l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l={phase:`loading`},t[2]=l):l=t[2];let[u,d]=(0,Q.useState)(l),[f,p]=(0,Q.useState)(!1),[m,h]=(0,Q.useState)(!1),[g,_]=(0,Q.useState)(null),v=(0,Q.useRef)(!1),y;t[3]===c?y=t[4]:(y=async function(){d({phase:`loading`});try{let e=await c.status();d({phase:`loaded`,result:e}),Xt(e.authenticated)}catch(e){console.warn(`[AccountSection] GitHub status check failed`,e),d({phase:`check-failed`})}},t[3]=c,t[4]=y);let b=y,S;t[5]===b?S=t[6]:(S=()=>{b()},t[5]=b,t[6]=S);let C;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(C=[],t[7]=C):C=t[7],(0,Q.useEffect)(S,C);let w;t[8]!==i||t[9]!==b||t[10]!==c?(w=async function(){if(v.current)return;v.current=!0,p(!1),h(!0),_(null);let e=null;try{let t=c.signout?await c.signout():{ok:!1,error:i({id:`8cpOa8`})};t.ok||(e=t.error??i({id:`8cpOa8`}))}catch(t){console.warn(`[AccountSection] GitHub disconnect failed`,t),e=i({id:`8cpOa8`})}await b(),e&&_(e),h(!1),v.current=!1},t[8]=i,t[9]=b,t[10]=c,t[11]=w):w=t[11];let T=w,E;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(`h3`,{id:`settings-account-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`AeXO77`})}),t[12]=E):E=t[12];let D;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[E,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`E6lrpp`})})]}),t[13]=D):D=t[13];let O;t[14]!==g||t[15]!==m||t[16]!==T||t[17]!==b||t[18]!==u.phase||t[19]!==u.result?(O=u.phase===`loading`?(0,$.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"aria-busy":`true`,className:`space-y-2 rounded-md border p-3`,"data-testid":`settings-account-loading`,children:[(0,$.jsx)(`span`,{className:`sr-only`,children:(0,$.jsx)(o,{id:`IWGfGF`})}),(0,$.jsx)(xn,{className:`h-4 w-40`}),(0,$.jsx)(xn,{className:`h-8 w-32`})]}):u.phase===`check-failed`?(0,$.jsxs)(`div`,{className:`space-y-2 rounded-md border p-3`,"data-testid":`settings-account-check-failed`,children:[(0,$.jsx)(`p`,{role:`status`,className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`T_wG4n`})}),(0,$.jsx)(x,{variant:`outline`,size:`sm`,onClick:()=>void b(),children:(0,$.jsx)(o,{id:`KDw4GX`})})]}):u.result.authenticated?u.result.tier===`A`?(0,$.jsx)(gr,{login:u.result.login}):(0,$.jsx)(hr,{login:u.result.login,disconnecting:m,error:g,onDisconnect:()=>void T()}):(0,$.jsx)(_r,{onConnect:()=>p(!0)}),t[14]=g,t[15]=m,t[16]=T,t[17]=b,t[18]=u.phase,t[19]=u.result,t[20]=O):O=t[20];let k;t[21]===b?k=t[22]:(k=e=>{p(e),e||b()},t[21]=b,t[22]=k);let A=u.phase===`loaded`?u.result.host:void 0,j=u.phase===`loaded`?u.result.ghAvailable:void 0,M;t[23]===b?M=t[24]:(M=()=>{b()},t[23]=b,t[24]=M);let N;t[25]!==f||t[26]!==r||t[27]!==k||t[28]!==A||t[29]!==j||t[30]!==M?(N=(0,$.jsx)(Rt,{open:f,onOpenChange:k,transport:r,host:A,ghAvailable:j,onSuccess:M}),t[25]=f,t[26]=r,t[27]=k,t[28]=A,t[29]=j,t[30]=M,t[31]=N):N=t[31];let P;return t[32]!==N||t[33]!==O?(P=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-account-title`,className:`space-y-3`,"data-testid":`settings-account`,children:[D,O,N]}),t[32]=N,t[33]=O,t[34]=P):P=t[34],P}function hr(e){let t=(0,Z.c)(20),{login:n,disconnecting:r,error:i,onDisconnect:a}=e,s;t[0]===n?s=t[1]:(s=(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`E_tNGD`,values:{login:n}})}),t[0]=n,t[1]=s);let c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,$.jsx)(o,{id:`nxlOpL`})}),t[2]=c):c=t[2];let l;t[3]===s?l=t[4]:(l=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[s,c]}),t[3]=s,t[4]=l);let u;t[5]===r?u=t[6]:(u=r?(0,$.jsx)(o,{id:`rppgXF`}):(0,$.jsx)(o,{id:`-K0AvT`}),t[5]=r,t[6]=u);let d;t[7]!==r||t[8]!==a||t[9]!==u?(d=(0,$.jsx)(x,{variant:`outline`,onClick:a,disabled:r,"aria-describedby":`settings-account-disconnect-caveat`,"data-testid":`settings-account-disconnect`,children:u}),t[7]=r,t[8]=a,t[9]=u,t[10]=d):d=t[10];let f;t[11]!==l||t[12]!==d?(f=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[l,d]}),t[11]=l,t[12]=d,t[13]=f):f=t[13];let p;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(`p`,{id:`settings-account-disconnect-caveat`,className:`text-muted-foreground text-1sm`,"data-testid":`settings-account-disconnect-caveat`,children:(0,$.jsx)(o,{id:`msOK6I`})}),t[14]=p):p=t[14];let m;t[15]===i?m=t[16]:(m=i?(0,$.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,"data-testid":`settings-account-disconnect-error`,children:i}):null,t[15]=i,t[16]=m);let h;return t[17]!==f||t[18]!==m?(h=(0,$.jsxs)(`div`,{className:`space-y-2 rounded-md border p-3`,"data-testid":`settings-account-connected`,children:[f,p,m]}),t[17]=f,t[18]=m,t[19]=h):h=t[19],h}function gr(e){let t=(0,Z.c)(5),{login:n}=e,r;t[0]===n?r=t[1]:(r=(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`E_tNGD`,values:{login:n}})}),t[0]=n,t[1]=r);let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,$.jsx)(o,{id:`ny6vNn`})}),t[2]=i):i=t[2];let a;return t[3]===r?a=t[4]:(a=(0,$.jsx)(`div`,{className:`rounded-md border p-3`,"data-testid":`settings-account-gh-cli`,children:(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[r,i]})}),t[3]=r,t[4]=a),a}function _r(e){let t=(0,Z.c)(5),{onConnect:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`S33tz3`})}),t[0]=r):r=t[0];let i;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[r,(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,$.jsx)(o,{id:`EJuO7B`})})]}),t[1]=i):i=t[1];let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(o,{id:`5lWFkC`}),t[2]=a):a=t[2];let s;return t[3]===n?s=t[4]:(s=(0,$.jsx)(`div`,{className:`rounded-md border p-3`,"data-testid":`settings-account-disconnected`,children:(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[i,(0,$.jsx)(x,{onClick:n,"data-testid":`settings-account-connect`,children:a})]})}),t[3]=n,t[4]=s),s}function vr(e){return e.kind===`editor`?`editor:${e.id}`:e.kind===`skill`?`skill:${e.id}`:`path`}function yr(e){let t=(0,Z.c)(11),{testId:n,children:r}=e,{_:i}=s(),a;t[0]===i?a=t[1]:(a=i({id:`2B6eYX`}),t[0]=i,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsx)(an,{className:`size-3.5`}),t[2]=o):o=t[2];let c;t[3]!==a||t[4]!==n?(c=(0,$.jsx)(S,{asChild:!0,children:(0,$.jsx)(x,{variant:`ghost`,size:`icon`,className:`mt-1.5 mr-1.5 h-6 w-6 shrink-0 text-muted-foreground opacity-60 hover:opacity-100`,"aria-label":a,"data-testid":n,children:o})}),t[3]=a,t[4]=n,t[5]=c):c=t[5];let l;t[6]===r?l=t[7]:(l=(0,$.jsx)(C,{side:`left`,className:`max-w-sm text-left`,children:(0,$.jsx)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:r})}),t[6]=r,t[7]=l);let u;return t[8]!==c||t[9]!==l?(u=(0,$.jsxs)(w,{children:[c,l]}),t[8]=c,t[9]=l,t[10]=u):u=t[10],u}function br(){let e=(0,Z.c)(38),{_:t}=s(),n=typeof window<`u`?window.okDesktop??null:null,[r,i]=(0,Q.useState)(null),[a,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(null),d,f;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{if(!n)return;let e=!1;return n.integrations.status().then(t=>{e||i(t)}).catch(()=>{e||c(!0)}),()=>{e=!0}},f=[n],e[0]=d,e[1]=f):(d=e[0],f=e[1]),(0,Q.useEffect)(d,f);let p;e[2]===t?p=e[3]:(p=async function(e,r){if(n){u(vr(e));try{let t=await n.integrations.setComponent({component:e,enabled:r});i(t.status),t.ok||X.error(t.error)}catch(e){let n=e;X.error(t({id:`gfdqcY`,values:{0:n instanceof Error?n.message:String(n)}}))}u(null)}},e[2]=t,e[3]=p);let m=p,h;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(`h3`,{id:`settings-ai-tools-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`_5qBNl`})}),e[4]=h):h=e[4];let g;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[h,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`mLAjyL`})})]}),e[5]=g):g=e[5];let _=g;if(!n||a){let t;return e[6]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-ai-tools-title`,className:`space-y-4`,children:[_,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`ai-tools-unavailable`,children:(0,$.jsx)(o,{id:`O4PnDd`})})]}),e[6]=t):t=e[6],t}if(r===null){let t;return e[7]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-ai-tools-title`,className:`space-y-4`,children:[_,(0,$.jsxs)(`div`,{className:`space-y-2`,"data-testid":`ai-tools-loading`,children:[(0,$.jsx)(xn,{className:`h-10 w-full`}),(0,$.jsx)(xn,{className:`h-10 w-full`}),(0,$.jsx)(xn,{className:`h-10 w-full`})]})]}),e[7]=t):t=e[7],t}let v=l!==null||!r.available,y=r.path.shellDetected||r.path.installed,b;e[8]===r.available?b=e[9]:(b=!r.available&&(0,$.jsx)(`p`,{className:`text-sm text-amber-600 dark:text-amber-400`,"data-testid":`ai-tools-read-only`,children:(0,$.jsx)(o,{id:`OplnBG`})}),e[8]=r.available,e[9]=b);let x;e[10]!==t||e[11]!==m||e[12]!==v||e[13]!==y||e[14]!==r.path.installed||e[15]!==r.path.rcFilesToTouch?(x=y&&(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,$.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,$.jsx)(o,{id:`ALhMYW`})}),(0,$.jsxs)(`div`,{className:`flex items-start overflow-hidden rounded-md border border-border bg-card/50 hover:bg-accent`,children:[(0,$.jsxs)(V,{htmlFor:`ai-tools-path`,className:`flex flex-1 cursor-pointer items-start gap-2.5 px-3 py-2.5 font-normal`,children:[(0,$.jsx)(I,{id:`ai-tools-path`,checked:r.path.installed,disabled:v,onCheckedChange:()=>void m({kind:`path`},!r.path.installed),className:`mt-0.5`,"data-testid":`ai-tools-path-checkbox`}),(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,$.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:(0,$.jsx)(o,{id:`Fsx78O`,components:{0:(0,$.jsx)(`code`,{className:`inline-code`})}})}),(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,"data-testid":`ai-tools-path-status`,children:r.path.installed?t({id:`yhdqox`}):t({id:`04XyCH`,values:{0:r.path.rcFilesToTouch.join(`, `)}})})]})]}),(0,$.jsxs)(yr,{testId:`ai-tools-path-info`,children:[(0,$.jsx)(`p`,{className:`opacity-70`,children:(0,$.jsx)(o,{id:`f9lQNJ`})}),r.path.rcFilesToTouch.map(Sr),(0,$.jsx)(`p`,{className:`pt-1`,children:(0,$.jsx)(o,{id:`CWzc2T`,components:{0:(0,$.jsx)(`code`,{}),1:(0,$.jsx)(`code`,{})}})})]})]})]}),e[10]=t,e[11]=m,e[12]=v,e[13]=y,e[14]=r.path.installed,e[15]=r.path.rcFilesToTouch,e[16]=x):x=e[16];let S;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,$.jsx)(o,{id:`psfGPX`})}),e[17]=S):S=e[17];let C;if(e[18]!==t||e[19]!==m||e[20]!==v||e[21]!==r.editors){let n;e[23]!==t||e[24]!==m||e[25]!==v?(n=e=>{let n=e.state===`installed`||e.state===`foreign`,r=v||e.state===`unmanageable`,i=e.state===`not-installed`&&!e.detected,a=`https://openknowledge.ai/docs/integrations/${we[e.id]}`,s=e.state===`installed`?t({id:`eQkgKV`}):e.state===`foreign`?t({id:`AczYxH`}):e.state===`unmanageable`?t({id:`LbmLyU`}):e.detected?t({id:`bBE5tC`}):null,c=e.state===`foreign`||e.state===`unmanageable`?`text-xs text-amber-600 dark:text-amber-400`:`text-xs text-muted-foreground`;return(0,$.jsxs)(`li`,{className:r?`flex items-start`:`flex items-start hover:bg-accent`,children:[(0,$.jsxs)(V,{htmlFor:`ai-tools-editor-${e.id}`,className:r?`flex flex-1 items-start gap-2.5 px-3 py-2.5 font-normal`:`flex flex-1 cursor-pointer items-start gap-2.5 px-3 py-2.5 font-normal`,children:[(0,$.jsx)(I,{id:`ai-tools-editor-${e.id}`,checked:n,disabled:r,onCheckedChange:()=>void m({kind:`editor`,id:e.id},!n),className:`mt-0.5`,"data-testid":`ai-tools-editor-checkbox-${e.id}`}),(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,$.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:e.label}),s!==null&&(0,$.jsx)(`span`,{className:c,"data-testid":`ai-tools-editor-status-${e.id}`,children:s})]})]}),i&&(0,$.jsxs)(`a`,{href:a,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>vn(e,a),onAuxClick:e=>vn(e,a),"aria-label":t({id:`D-Oh1s`,values:{0:e.label}}),className:`flex shrink-0 items-center gap-0.5 px-2 py-2.5 text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline`,"data-testid":`ai-tools-editor-status-${e.id}`,children:[(0,$.jsx)(o,{id:`P_bX4O`}),(0,$.jsx)(Tt,{className:`size-3`,"aria-hidden":!0})]}),(0,$.jsxs)(yr,{testId:`ai-tools-editor-info-${e.id}`,children:[(0,$.jsx)(`p`,{className:`opacity-70`,children:(0,$.jsx)(o,{id:`J2eKUI`})}),(0,$.jsx)(`p`,{children:(0,$.jsx)(`code`,{className:`break-all`,children:e.configPath??t({id:`ndwmea`})})}),(0,$.jsx)(`p`,{className:`pt-1 opacity-70`,children:(0,$.jsx)(o,{id:`VIwCaD`})}),(0,$.jsx)(`p`,{children:(0,$.jsx)(`code`,{className:`break-all`,children:e.entryLocator})})]})]},e.id)},e[23]=t,e[24]=m,e[25]=v,e[26]=n):n=e[26],C=r.editors.map(n),e[18]=t,e[19]=m,e[20]=v,e[21]=r.editors,e[22]=C}else C=e[22];let w;e[27]===C?w=e[28]:(w=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[S,(0,$.jsx)(`ul`,{className:`rounded-md border border-border bg-card/50 divide-y divide-border overflow-hidden`,children:C})]}),e[27]=C,e[28]=w);let T;e[29]!==m||e[30]!==v||e[31]!==r.skills?(T=r.skills.length>0&&(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,$.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,$.jsx)(o,{id:`28B21t`})}),(0,$.jsx)(`ul`,{className:`rounded-md border border-border bg-card/50 divide-y divide-border overflow-hidden`,children:r.skills.map(e=>(0,$.jsxs)(`li`,{className:`flex items-start hover:bg-accent`,children:[(0,$.jsxs)(V,{htmlFor:`ai-tools-skill-${e.id}`,className:`flex flex-1 cursor-pointer items-start gap-2.5 px-3 py-2.5 font-normal`,children:[(0,$.jsx)(I,{id:`ai-tools-skill-${e.id}`,checked:e.installed,disabled:v,onCheckedChange:()=>void m({kind:`skill`,id:e.id},!e.installed),className:`mt-0.5`,"data-testid":`ai-tools-skill-checkbox-${e.id}`}),(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,$.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:(0,$.jsx)(`code`,{children:e.name})}),(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,"data-testid":`ai-tools-skill-status-${e.id}`,children:e.id===`discovery`?(0,$.jsx)(o,{id:`0inVGS`}):(0,$.jsx)(o,{id:`FXk_zY`})})]})]}),(0,$.jsxs)(yr,{testId:`ai-tools-skill-info-${e.id}`,children:[(0,$.jsx)(`p`,{className:`opacity-70`,children:(0,$.jsx)(o,{id:`HSh8u_`})}),e.paths.map(xr)]})]},e.id))})]}),e[29]=m,e[30]=v,e[31]=r.skills,e[32]=T):T=e[32];let E;return e[33]!==T||e[34]!==b||e[35]!==x||e[36]!==w?(E=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-ai-tools-title`,className:`space-y-4`,children:[_,b,x,w,T]}),e[33]=T,e[34]=b,e[35]=x,e[36]=w,e[37]=E):E=e[37],E}function xr(e){return(0,$.jsx)(`p`,{children:(0,$.jsx)(`code`,{className:`break-all`,children:e})},e)}function Sr(e){return(0,$.jsx)(`p`,{children:(0,$.jsx)(`code`,{className:`break-all`,children:e})},e)}function Cr(e){return{chrome:e.sidebar,surface:e.background,bar:e.primary,line:e.border,dots:[e[`syntax-string`],e[`syntax-keyword`],e[`syntax-atom`]]}}function wr(e,t,n){return e.id===`custom`?Cr(Se(ut(t))):e.scheme?Cr(Se(e.scheme)):Cr(pt(n))}function Tr(e){let t=(0,Z.c)(38),{theme:n,customSeed:r,slotMode:i}=e,a,o,s,c,l,u,d,f,p,m;t[0]!==r||t[1]!==i||t[2]!==n?(a=wr(n,r,i),u=!0,d=``,f=`aspect-[4/3] w-full overflow-hidden rounded-md border`,p={backgroundColor:a.surface,borderColor:a.line},m=(0,$.jsxs)(`div`,{className:`flex h-1/3 items-center gap-1 px-1.5`,style:{backgroundColor:a.chrome,borderBottom:`1px solid ${a.line}`},children:[(0,$.jsx)(`span`,{className:`h-1.5 w-5 rounded-full`,style:{backgroundColor:a.bar}}),(0,$.jsx)(`span`,{className:`h-1.5 flex-1 rounded-full opacity-50`,style:{backgroundColor:a.line}})]}),l=`flex h-2/3`,o=`flex w-1/4 flex-col items-center justify-center gap-1`,s={backgroundColor:a.chrome,borderRight:`1px solid ${a.line}`},c=a.dots.map(Er),t[0]=r,t[1]=i,t[2]=n,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=l,t[8]=u,t[9]=d,t[10]=f,t[11]=p,t[12]=m):(a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],d=t[9],f=t[10],p=t[11],m=t[12]);let h;t[13]!==o||t[14]!==s||t[15]!==c?(h=(0,$.jsx)(`div`,{className:o,style:s,children:c}),t[13]=o,t[14]=s,t[15]=c,t[16]=h):h=t[16];let g;t[17]===a.dots[1]?g=t[18]:(g=(0,$.jsx)(`span`,{className:`h-1.5 w-3/4 rounded-full`,style:{backgroundColor:a.dots[1]}}),t[17]=a.dots[1],t[18]=g);let _;t[19]===a.line?_=t[20]:(_=(0,$.jsx)(`span`,{className:`h-1.5 w-1/2 rounded-full opacity-60`,style:{backgroundColor:a.line}}),t[19]=a.line,t[20]=_);let v;t[21]===a.dots[0]?v=t[22]:(v=(0,$.jsx)(`span`,{className:`h-1.5 w-2/3 rounded-full`,style:{backgroundColor:a.dots[0]}}),t[21]=a.dots[0],t[22]=v);let y;t[23]!==g||t[24]!==_||t[25]!==v?(y=(0,$.jsxs)(`div`,{className:`flex flex-1 flex-col justify-center gap-1 px-1.5`,children:[g,_,v]}),t[23]=g,t[24]=_,t[25]=v,t[26]=y):y=t[26];let b;t[27]!==h||t[28]!==y||t[29]!==l?(b=(0,$.jsxs)(`div`,{className:l,children:[h,y]}),t[27]=h,t[28]=y,t[29]=l,t[30]=b):b=t[30];let x;return t[31]!==b||t[32]!==u||t[33]!==d||t[34]!==f||t[35]!==p||t[36]!==m?(x=(0,$.jsxs)(`div`,{"aria-hidden":u,"data-theme-swatch":d,className:f,style:p,children:[m,b]}),t[31]=b,t[32]=u,t[33]=d,t[34]=f,t[35]=p,t[36]=m,t[37]=x):x=t[37],x}function Er(e,t){return(0,$.jsx)(`span`,{className:`size-1.5 rounded-full`,style:{backgroundColor:e}},t)}function Dr(e){return h(`size-6 min-w-6 rounded-md border p-0 transition-colors`,e?`border-primary bg-primary/15 text-primary hover:bg-primary/20 data-[state=on]:bg-primary/15`:`border-border/70 text-muted-foreground/70 hover:text-foreground`)}function Or(e){return h(`size-3.5`,e&&`fill-current`)}function kr(e){let t=(0,Z.c)(11),{selection:n,onAssign:r,slotMode:i,customSeed:a,firstItemId:o,"aria-label":c,"aria-describedby":l}=e,u=i===void 0?`light`:i,{_:d}=s(),f;t[0]!==d||t[1]!==a||t[2]!==o||t[3]!==r||t[4]!==n||t[5]!==u?(f=Le.map((e,t)=>{let i=n.light===e.id,s=n.dark===e.id;return(0,$.jsxs)(`fieldset`,{"aria-label":e.label,className:h(`flex min-w-0 flex-col gap-1.5 rounded-lg border-2 p-1 text-left`,n[u]===e.id?`border-primary`:`border-transparent`),children:[(0,$.jsx)(x,{type:`button`,variant:`ghost`,"aria-hidden":!0,tabIndex:-1,onClick:()=>r(u,e.id),className:`h-auto w-full cursor-pointer p-0 transition-opacity hover:bg-transparent hover:opacity-90`,children:(0,$.jsx)(Tr,{theme:e,customSeed:a,slotMode:u})}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-1 px-0.5`,children:[(0,$.jsx)(`span`,{className:`truncate text-1sm font-medium text-foreground`,children:e.label}),(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,$.jsx)(K,{id:t===0?o:void 0,className:Dr(i),pressed:i,onPressedChange:t=>{t&&r(`light`,e.id)},"aria-label":d({id:`sq4WQH`,values:{0:e.label}}),children:(0,$.jsx)(or,{className:Or(i)})}),(0,$.jsx)(K,{className:Dr(s),pressed:s,onPressedChange:t=>{t&&r(`dark`,e.id)},"aria-label":d({id:`lZvQrY`,values:{0:e.label}}),children:(0,$.jsx)(ar,{className:Or(s)})})]})]})]},e.id)}),t[0]=d,t[1]=a,t[2]=o,t[3]=r,t[4]=n,t[5]=u,t[6]=f):f=t[6];let p;return t[7]!==l||t[8]!==c||t[9]!==f?(p=(0,$.jsx)(`fieldset`,{"aria-label":c,"aria-describedby":l,className:`grid w-full min-w-0 grid-cols-2 gap-2 sm:grid-cols-3`,children:f}),t[7]=l,t[8]=c,t[9]=f,t[10]=p):p=t[10],p}var Ar=`system`;function jr(e){return typeof e==`string`&&Ze.includes(e)}function Mr(e){return jr(e)?e:Ar}function Nr(e){return new Intl.DisplayNames([e],{type:`language`}).of(e)??e}function Pr(e){let t=(0,Z.c)(6),{choice:n}=e;if(n===Ar){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(o,{id:`D-NlUC`}),t[0]=e):e=t[0],e}let r;t[1]===n?r=t[2]:(r=Nr(n),t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=(0,$.jsx)(`span`,{lang:n,className:`capitalize`,children:r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function Fr(e){let t=(0,Z.c)(22),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({value:o,onValueChange:r,onBlur:n,ref:i,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s;t[6]===o?s=t[7]:(s=Mr(o),t[6]=o,t[7]=s);let c=s,l;t[8]===r?l=t[9]:(l=e=>r(Mr(e)),t[8]=r,t[9]=l);let u;t[10]===c?u=t[11]:(u=(0,$.jsx)(te,{children:(0,$.jsx)(Pr,{choice:c})}),t[10]=c,t[11]=u);let d;t[12]!==n||t[13]!==i||t[14]!==a||t[15]!==u?(d=(0,$.jsx)(U,{...a,ref:i,onBlur:n,size:`sm`,className:`w-48`,children:u}),t[12]=n,t[13]=i,t[14]=a,t[15]=u,t[16]=d):d=t[16];let f;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsxs)(ee,{children:[(0,$.jsx)(H,{value:Ar,children:(0,$.jsx)(Pr,{choice:Ar})}),Je.map(Ir)]}),t[17]=f):f=t[17];let p;return t[18]!==c||t[19]!==l||t[20]!==d?(p=(0,$.jsxs)(ne,{value:c,onValueChange:l,children:[d,f]}),t[18]=c,t[19]=l,t[20]=d,t[21]=p):p=t[21],p}function Ir(e){return(0,$.jsx)(H,{value:e,children:(0,$.jsx)(Pr,{choice:e})},e)}function Lr(e,t){if(e.length===0)throw Error(`buildPatch: path must be non-empty`);let[n,...r]=e;return r.length===0?{[String(n)]:t}:{[String(n)]:Lr(r,t)}}function Rr(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=t?._zod?.def;if(e?.type===`default`){let t=e.defaultValue;return typeof t==`function`?t():t}let n=t?._zod?.def?.innerType;if(n===void 0)return;t=n}}function zr(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=t?._zod?.def;if(!e)return;if(e.type===`default`||e.type===`optional`||e.type===`nullable`){t=e.innerType;continue}return e.type}}function Br(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=t?._zod?.def;if(!e)return;if(e.type===`enum`)return e.entries?Object.values(e.entries):void 0;if(e.innerType!==void 0){t=e.innerType;continue}return}}function Vr(e){let t=(0,Z.c)(14),n;t[0]===e?n=t[1]:(n=e.current(),t[0]=e,t[1]=n);let r=n,i;t[2]===r?i=t[3]:(i={defaultValues:r,mode:`onBlur`},t[2]=r,t[3]=i);let a=Un(i),o,s;t[4]!==e||t[5]!==a?(o=()=>e.subscribe(e=>{Hr(a,e)}),s=[e,a],t[4]=e,t[5]=a,t[6]=o,t[7]=s):(o=t[6],s=t[7]),(0,Q.useEffect)(o,s);let c;t[8]!==e||t[9]!==a?(c=t=>Ur(a,e,t),t[8]=e,t[9]=a,t[10]=c):c=t[10];let l=c,u;return t[11]!==l||t[12]!==a?(u={form:a,commitField:l},t[11]=l,t[12]=a,t[13]=u):u=t[13],u}function Hr(e,t){e.reset(t,{keepDirtyValues:!0,keepDirty:!0,keepTouched:!0})}function Ur(e,t,n){let r=e.getValues(n),i=Lr(Kr(n),r),a=t.patch(i);if(a.ok)return e.clearErrors(n),e.resetField(n,{defaultValue:r,keepError:!1}),!0;if(Ae(a.error)&&a.error.code===`SCHEMA_INVALID`&&a.error.issues.length>0){e.clearErrors(n);for(let t of a.error.issues){let r=t.path.length>0?t.path.map(String).join(`.`):n;e.setError(r,{type:`config-binding`,message:t.message})}}else e.setError(n,{type:`config-binding`,message:Wr(a.error,n)});return!1}function Wr(e,t){if(Ae(e)&&e.code===`SCHEMA_INVALID`){let n=e.issues.find(e=>Gr(e,t));if(n)return n.message}return He(e)}function Gr(e,t){return e.path.map(String).join(`.`)===t}function Kr(e){return e.split(`.`)}var qr={light:{id:`1njn7W`},dark:{id:`pvnfJD`},system:{id:`D-NlUC`}};function Jr(e){if(!Ae(e)||e.code!==`SCHEMA_INVALID`)return null;let t=e.issues[0];return!t||t.path.length===0?null:t.path.map(String).join(`.`)}function Yr(){let e=(0,Z.c)(3),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(xn,{className:`h-5 w-32`}),n=(0,$.jsx)(xn,{className:`h-4 w-64`}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsxs)(`div`,{className:`space-y-3`,children:[t,n,(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsx)(xn,{className:`h-9 w-full`}),(0,$.jsx)(xn,{className:`h-9 w-full`})]})]}),e[2]=r):r=e[2],r}function Xr({field:e,scope:t,commitField:n,isFlashed:r}){"use no memo";let{_:i}=s(),a=qn(),c=dt(),l=Ge(We,e.path),u=l?zr(l):void 0,d=l?Rr(l):void 0,f=l?Br(l):void 0,p=l?Ue(l):void 0,m=p?.scope===`project`&&t!==`project`||p?.scope===`user`&&t!==`user`,g=e.path.join(`.`),_=i(e.label),[v,y]=(0,Q.useState)(!1),b=(0,Q.useRef)(null);(0,Q.useEffect)(()=>()=>{b.current&&clearTimeout(b.current)},[]);let T=()=>{y(!0),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>y(!1),1200)},E=()=>{let e=n(g);return e&&T(),e},D=()=>a.getFieldState(g).isDirty?E():!0,O=()=>{if(e.control===`theme-tiles`){let e=c?.userBinding;if(!e)return;let t=e.patch({appearance:st()});t.ok?T():a.setError(g,{type:`manual`,message:Wr(t.error,g)});return}let t=d===void 0?null:d;a.setValue(g,t,{shouldDirty:!1}),E()},k=h(`relative`,r&&`animate-settings-flash`);return(0,$.jsx)(Wn,{control:a.control,name:g,render:({field:n})=>{let r=!m&&(d!==void 0||n.value!==void 0);return(0,$.jsxs)(Hn,{className:k,"data-field":e.path.join(`.`),"data-scope":t,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,$.jsx)(Kn,{className:`text-sm font-medium`,children:_}),r?(0,$.jsxs)(w,{children:[(0,$.jsx)(S,{asChild:!0,children:(0,$.jsx)(x,{variant:`ghost`,size:`icon`,className:`h-5 w-5 text-muted-foreground opacity-60 hover:opacity-100`,onClick:O,"aria-label":i({id:`lhjq3G`,values:{labelText:_}}),children:(0,$.jsx)(ae,{className:`size-3.5`})})}),(0,$.jsx)(C,{children:(0,$.jsx)(o,{id:`L-rMC9`})})]}):null]}),e.description?(0,$.jsx)(Jn,{className:`text-muted-foreground text-1sm`,children:i(e.description)}):null,(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(Gn,{children:(0,$.jsx)(Zr,{field:e,ctl:n,typeTag:u,enumOptions:f,onCommit:D,onSavedOutsideForm:T,onWriteRejected:e=>{a.setError(g,{type:`manual`,message:Wr(e,g)})}})}),(0,$.jsx)(ti,{visible:v,srOnly:e.control===`theme-tiles`})]}),(0,$.jsx)(Yn,{"data-field-error":e.path.join(`.`)})]})}})}function Zr({field:e,ctl:t,typeTag:n,enumOptions:r,onCommit:i,onSavedOutsideForm:a,onWriteRejected:o,...c}){"use no memo";let{_:u}=s(),{setTheme:d,systemTheme:f}=l(),p=dt(),m=p?.merged??null;if(e.control===`language-select`)return(0,$.jsx)(Fr,{...c,value:t.value,ref:t.ref,onBlur:t.onBlur,onValueChange:e=>{t.onChange(e),i()}});if(e.control===`theme-tiles`){let{id:t,...n}=c,r=m?.appearance?.customTheme,i=m?.appearance?.theme,s=Fe(i,f===`dark`),l=Oe(m?.appearance);return(0,$.jsx)(kr,{...n,firstItemId:t,selection:l,customSeed:r,slotMode:s,"aria-label":u(e.label),onAssign:(e,t)=>{let n=p?.userBinding;if(!n)return;let c={...l,[e]:t},u=e=>{let t=e[s];return t===`custom`?_t(ut(r)):Ce(t)};ht({selection:c,modePreference:i,slotMode:s,customSeed:r});let f=u(c);f&&d(f);let m=n.patch({appearance:gt(c)});if(m.ok){a();return}ht({selection:l,modePreference:i,slotMode:s,customSeed:r}),d(u(l)??i??`system`),o(m.error)}})}if(n===`boolean`)return(0,$.jsx)(W,{...c,checked:!!t.value,ref:t.ref,onCheckedChange:e=>{t.onChange(e),i()},onBlur:t.onBlur});if(n===`enum`&&r&&r.length>0&&(e.control===`enum-toggle`||r.length<=4)){let{id:n,...a}=c,o=e.path[0]===`appearance`&&e.path[1]===`theme`;return(0,$.jsx)(oe,{...a,type:`single`,value:typeof t.value==`string`?t.value:``,ref:t.ref,onValueChange:e=>{e&&(o&&d(e),t.onChange(e),i())},onBlur:t.onBlur,variant:`segmented`,size:`sm`,spacing:1,className:`bg-muted dark:bg-background p-0.5 rounded-lg`,"aria-label":u(e.label),children:r.map((e,t)=>{let r=qr[e];return(0,$.jsx)(G,{value:e,id:t===0?n:void 0,className:r?`text-1sm`:`text-1sm capitalize`,children:r?u(r):e},e)})})}return n===`number`||n===`int`?(0,$.jsx)($r,{ctl:t,onCommit:i,...c}):n===`array`?(0,$.jsx)(ei,{ctl:t,onCommit:i,...c}):(0,$.jsx)(Qr,{ctl:t,onCommit:i,...c})}function Qr({ctl:e,onCommit:t,...n}){"use no memo";return(0,$.jsx)(mn,{...n,value:typeof e.value==`string`?e.value:``,ref:e.ref,onChange:t=>e.onChange(t.target.value),onBlur:()=>{e.onBlur(),t()},onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),t())},className:`h-8 text-sm`})}function $r({ctl:e,onCommit:t,...n}){"use no memo";let[r,i]=(0,Q.useState)(e.value===void 0?``:String(e.value)),a=(0,Q.useRef)(e.value);(0,Q.useEffect)(()=>{a.current!==e.value&&(i(e.value===void 0?``:String(e.value)),a.current=e.value)},[e.value]);let o=()=>{let n=Number(r);if(!Number.isFinite(n)){e.onChange(r),t();return}e.onChange(n),t(),a.current=n};return(0,$.jsx)(mn,{...n,type:`number`,value:r,ref:e.ref,onChange:e=>i(e.target.value),onBlur:()=>{e.onBlur(),o()},onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),o())},className:`h-8 w-28 text-sm tabular-nums`})}function ei({ctl:e,onCommit:t,...n}){"use no memo";let r=Array.isArray(e.value)?e.value.join(`
|
|
2
|
-
`):``,[i,a]=(0,Q.useState)(r),o=(0,Q.useRef)(r);(0,Q.useEffect)(()=>{let t=Array.isArray(e.value)?e.value.join(`
|
|
3
|
-
`):``;t!==o.current&&(a(t),o.current=t)},[e.value]);let s=()=>{let n=i.split(`
|
|
4
|
-
`).map(e=>e.trim()).filter(e=>e.length>0);e.onChange(n),t(),o.current=n.join(`
|
|
5
|
-
`)};return(0,$.jsx)(yn,{...n,value:i,ref:e.ref,onChange:e=>a(e.target.value),onBlur:()=>{e.onBlur(),s()},rows:Math.max(2,Math.min(6,i.split(`
|
|
6
|
-
`).length)),className:`field-sizing-fixed min-h-16 rounded-md bg-background px-3 py-1.5 font-mono text-xs md:text-xs dark:bg-background`})}function ti(e){let t=(0,Z.c)(5),{visible:n,srOnly:r}=e,i=r===void 0?!1:r,a;t[0]!==i||t[1]!==n?(a=n?(0,$.jsxs)($.Fragment,{children:[i?null:(0,$.jsx)(Dt,{"aria-hidden":`true`,className:`size-3.5`}),(0,$.jsx)(`span`,{className:`sr-only`,children:(0,$.jsx)(o,{id:`idD8Ev`})})]}):null,t[0]=i,t[1]=n,t[2]=a):a=t[2];let s;return t[3]===a?s=t[4]:(s=(0,$.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`text-emerald-600`,children:a}),t[3]=a,t[4]=s),s}var ni=`content.attachmentFolderPath`,ri=`attachments`;function ii(e){let t=Ee(e);return t===`./`?`same-folder`:t===`/`?`content-root`:t.startsWith(`./`)?`current-folder-subfolder`:`content-root-folder`}function ai(e){let t=Ee(e);return t===`./`||t===`/`?ri:t.startsWith(`./`)?t.slice(2)||ri:t}function oi(e){return e.trim().replace(/^(?:\.\/)+/,``).replace(/\/{2,}/g,`/`).replace(/\/+$/g,``)}function si(e,t){let n=oi(t)||ri;return e===`same-folder`?`./`:e===`content-root`?`/`:e===`current-folder-subfolder`?`./${n}`:n}function ci(){let e=(0,Z.c)(4),{projectBinding:t,projectConfig:n,projectSynced:r}=mt();if(!t||!r||!n){let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(Yr,{}),e[0]=t):t=e[0],t}let i=n.content.attachmentFolderPath??`./`,a;return e[1]!==i||e[2]!==t?(a=(0,$.jsx)(li,{binding:t,value:i},i),e[1]=i,e[2]=t,e[3]=a):a=e[3],a}function li(e){let t=(0,Z.c)(50),{binding:n,value:r}=e,{_:i}=s(),a;t[0]===r?a=t[1]:(a=()=>ii(r),t[0]=r,t[1]=a);let[c,l]=(0,Q.useState)(a),u;t[2]===r?u=t[3]:(u=()=>ai(r),t[2]=r,t[3]=u);let[d,f]=(0,Q.useState)(u),[p,m]=(0,Q.useState)(null),[g,_]=(0,Q.useState)(!1),[v,y]=(0,Q.useState)(!1),b=(0,Q.useRef)(null),x=(0,Q.useRef)(null),S,C;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>()=>{b.current&&clearTimeout(b.current),x.current&&clearTimeout(x.current)},C=[],t[4]=S,t[5]=C):(S=t[4],C=t[5]),(0,Q.useEffect)(S,C);let w,T;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(w=()=>Kt(e=>{if(e.docName!==`__config__/project`||Jr(e.error)!==ni)return;let t=Wr(e.error,ni);X.error(He(e.error),{duration:8e3}),m(t),y(!0),x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{y(!1),m(null)},600)}),T=[],t[6]=w,t[7]=T):(w=t[6],T=t[7]),(0,Q.useEffect)(w,T);let E;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(E=()=>{_(!0),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>_(!1),1200)},t[8]=E):E=t[8];let D=E,O;t[9]!==i||t[10]!==n?(O=e=>{let t=n.patch({content:{attachmentFolderPath:e}});if(t.ok){m(null),D();return}let r=Wr(t.error,ni);m(r),X.error(i({id:`eQxm13`,values:{detail:r}}))},t[9]=i,t[10]=n,t[11]=O):O=t[11];let k=O,A;t[12]!==k||t[13]!==d?(A=e=>{if(e!==`same-folder`&&e!==`content-root`&&e!==`current-folder-subfolder`&&e!==`content-root-folder`)return;let t=e,n=t===`current-folder-subfolder`||t===`content-root-folder`?d||ri:d;l(t),f(n),k(si(t,n))},t[12]=k,t[13]=d,t[14]=A):A=t[14];let j=A,M;t[15]!==k||t[16]!==d||t[17]!==c?(M=()=>{let e=si(c,d);f(ai(e)),k(e)},t[15]=k,t[16]=d,t[17]=c,t[18]=M):M=t[18];let N=M,P=c===`current-folder-subfolder`||c===`content-root-folder`,F;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,$.jsx)(`h3`,{id:`settings-attachments-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`w_Sphq`})}),t[19]=F):F=t[19];let I;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[F,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`Hnl9nT`})})]}),t[20]=I):I=t[20];let L=v&&`animate-settings-flash`,R;t[21]===L?R=t[22]:(R=h(`rounded-md border p-3`,L),t[21]=L,t[22]=R);let z;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,$.jsx)(`div`,{className:`text-sm font-medium`,id:`settings-attachments-location-label`,children:(0,$.jsx)(o,{id:`AsqRE_`})}),t[23]=z):z=t[23];let B;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,$.jsxs)(`div`,{className:`space-y-0.5`,children:[z,(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,$.jsx)(o,{id:`vppAju`})})]}),t[24]=B):B=t[24];let V;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,$.jsx)(U,{"aria-labelledby":`settings-attachments-location-label`,"data-testid":`settings-attachments-mode`,size:`sm`,children:(0,$.jsx)(te,{})}),t[25]=V):V=t[25];let re;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,$.jsx)(H,{value:`same-folder`,children:(0,$.jsx)(o,{id:`Q7W-mC`})}),t[26]=re):re=t[26];let ie;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,$.jsx)(H,{value:`content-root`,children:(0,$.jsx)(o,{id:`yWSvcf`})}),t[27]=ie):ie=t[27];let ae;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,$.jsx)(H,{value:`current-folder-subfolder`,children:(0,$.jsx)(o,{id:`0YUS3Q`})}),t[28]=ae):ae=t[28];let W;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,$.jsxs)(ee,{children:[re,ie,ae,(0,$.jsx)(H,{value:`content-root-folder`,children:(0,$.jsx)(o,{id:`qAx7xG`})})]}),t[29]=W):W=t[29];let G;t[30]!==c||t[31]!==j?(G=(0,$.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-[minmax(0,1fr)_minmax(16rem,18rem)] sm:items-start`,children:[B,(0,$.jsxs)(ne,{value:c,onValueChange:j,children:[V,W]})]}),t[30]=c,t[31]=j,t[32]=G):G=t[32];let K;t[33]!==i||t[34]!==N||t[35]!==d||t[36]!==P?(K=P?(0,$.jsxs)(`div`,{className:`mt-3 max-w-sm space-y-1`,children:[(0,$.jsx)(`label`,{className:`text-sm font-medium`,htmlFor:`settings-attachments-folder-input`,children:(0,$.jsx)(o,{id:`kNqMMd`})}),(0,$.jsx)(mn,{id:`settings-attachments-folder-input`,value:d,placeholder:i({id:`OeAl1e`}),onChange:e=>f(e.target.value),onBlur:N,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),N())},className:`h-8 text-sm`,"data-testid":`settings-attachments-folder`})]}):null,t[33]=i,t[34]=N,t[35]=d,t[36]=P,t[37]=K):K=t[37];let oe;t[38]===p?oe=t[39]:(oe=p?(0,$.jsx)(`p`,{className:`text-1sm text-destructive`,"data-field-error":ni,role:`alert`,children:p}):null,t[38]=p,t[39]=oe);let q;t[40]===g?q=t[41]:(q=(0,$.jsx)(ti,{visible:g}),t[40]=g,t[41]=q);let J;t[42]!==oe||t[43]!==q?(J=(0,$.jsxs)(`div`,{className:`mt-2 flex min-h-5 items-center gap-2`,children:[oe,q]}),t[42]=oe,t[43]=q,t[44]=J):J=t[44];let Y;return t[45]!==R||t[46]!==G||t[47]!==K||t[48]!==J?(Y=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-attachments-title`,className:`space-y-3`,"data-testid":`settings-attachments`,children:[I,(0,$.jsxs)(`div`,{className:R,"data-field":ni,"data-scope":`project`,children:[G,K,J]})]}),t[45]=R,t[46]=G,t[47]=K,t[48]=J,t[49]=Y):Y=t[49],Y}function ui(e){let t=(0,Z.c)(21),{icon:n,name:r,hint:i,checked:a,disabled:o,ariaLabel:s,testId:c,onToggle:l}=e,u;t[0]===n?u=t[1]:(u=(0,$.jsx)(`span`,{className:`flex h-5 shrink-0 items-center`,children:n}),t[0]=n,t[1]=u);let d;t[2]===r?d=t[3]:(d=(0,$.jsx)(`span`,{className:`truncate text-sm leading-5`,children:r}),t[2]=r,t[3]=d);let f;t[4]===i?f=t[5]:(f=i?(0,$.jsx)(`span`,{className:`truncate text-muted-foreground text-1sm`,children:i}):null,t[4]=i,t[5]=f);let p;t[6]!==d||t[7]!==f?(p=(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[d,f]}),t[6]=d,t[7]=f,t[8]=p):p=t[8];let m;t[9]!==u||t[10]!==p?(m=(0,$.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2.5`,children:[u,p]}),t[9]=u,t[10]=p,t[11]=m):m=t[11];let h;t[12]!==s||t[13]!==a||t[14]!==o||t[15]!==l||t[16]!==c?(h=(0,$.jsx)(W,{checked:a,disabled:o,onCheckedChange:l,"aria-label":s,"data-testid":c}),t[12]=s,t[13]=a,t[14]=o,t[15]=l,t[16]=c,t[17]=h):h=t[17];let g;return t[18]!==m||t[19]!==h?(g=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-3 py-2.5`,children:[m,h]}),t[18]=m,t[19]=h,t[20]=g):g=t[20],g}function di(e){let t=(0,Z.c)(9),{label:n,children:r,labelId:i}=e,a;t[0]!==n||t[1]!==i?(a=(0,$.jsx)(`h4`,{id:i,className:`mb-2 font-mono text-muted-foreground text-xs uppercase tracking-wide`,children:n}),t[0]=n,t[1]=i,t[2]=a):a=t[2];let o;t[3]===r?o=t[4]:(o=(0,$.jsx)(`div`,{className:`divide-y overflow-hidden rounded-md border`,children:r}),t[3]=r,t[4]=o);let s;return t[5]!==i||t[6]!==a||t[7]!==o?(s=(0,$.jsxs)(`section`,{"aria-labelledby":i,children:[a,o]}),t[5]=i,t[6]=a,t[7]=o,t[8]=s):s=t[8],s}function fi(){let e=(0,Z.c)(50),{_:t}=s(),n=ce(),i=q(),{states:a,refresh:o}=y(),l=v(),[u,d]=(0,Q.useState)(``),[f,p]=(0,Q.useState)(!1),m;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(m={queryKey:[`acp-catalog`],queryFn:hi,staleTime:3e5},e[0]=m):m=e[0];let h=c(m),g;e[1]===o?g=e[2]:(g=()=>{o()},e[1]=o,e[2]=g);let _=(0,Q.useEffectEvent)(g),b;e[3]===_?b=e[4]:(b=()=>{_()},e[3]=_,e[4]=b);let S;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(S=[],e[5]=S):S=e[5],(0,Q.useEffect)(b,S);let C=h.data?.agents,w;e[6]===i?w=e[7]:(w=new Set(i.map(mi)),e[6]=i,e[7]=w);let T=w,E;e[8]===l?.installedClis?E=e[9]:(E=l?.installedClis??{},e[8]=l?.installedClis,e[9]=E);let D=E,O;if(e[10]!==t||e[11]!==h||e[12]!==C||e[13]!==D||e[14]!==n||e[15]!==u||e[16]!==T||e[17]!==f||e[18]!==a||e[19]!==l){let i=u.trim().toLowerCase(),o=e=>i===``||e.toLowerCase().includes(i),s=(C??[]).filter(e=>o(e.name)),c=l===null?[]:Te.filter(e=>o(je[e].displayName)),m=de.filter(e=>o(e.displayName)),g=i!==``,_=!h.isLoading&&!h.isError,v=g&&_&&s.length===0&&c.length===0&&m.length===0,y=!g||h.isLoading||h.isError||s.length>0,b=l!==null&&(!g||c.length>0),S=!g||m.length>0,w;e[21]!==n||e[22]!==T?(w=e=>{let t=T.has(`${e.source}:${e.id}`),r=e.supported===!0&&e.harness?.availability===`present`;return pe(n,e.source,e.id,t||r,e.supported)},e[21]=n,e[22]=T,e[23]=w):w=e[23];let E=w,k;e[24]===E?k=e[25]:(k=e=>e.harness!==void 0||E(e),e[24]=E,e[25]=k);let A=s.filter(k),j=g||f?s:A,M=g?0:s.length-A.length,N;e[26]===t?N=e[27]:(N=t({id:`jRAGrQ`}),e[26]=t,e[27]=N);let P;e[28]===N?P=e[29]:(P=(0,$.jsx)(`h3`,{id:`settings-configure-agents-title`,className:`font-semibold text-base`,children:N}),e[28]=N,e[29]=P);let F;e[30]===t?F=e[31]:(F=t({id:`XFpEgc`}),e[30]=t,e[31]=F);let I;e[32]===F?I=e[33]:(I=(0,$.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:F}),e[32]=F,e[33]=I);let L;e[34]!==P||e[35]!==I?(L=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[P,I]}),e[34]=P,e[35]=I,e[36]=L):L=e[36];let R;e[37]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,$.jsx)(r,{className:`-translate-y-1/2 absolute top-1/2 left-2.5 size-4 text-muted-foreground`,"aria-hidden":`true`}),e[37]=R):R=e[37];let z;e[38]===Symbol.for(`react.memo_cache_sentinel`)?(z=e=>d(e.target.value),e[38]=z):z=e[38];let B;e[39]===t?B=e[40]:(B=t({id:`-7s4fw`}),e[39]=t,e[40]=B);let V;e[41]===t?V=e[42]:(V=t({id:`-7s4fw`}),e[41]=t,e[42]=V);let H;e[43]!==u||e[44]!==B||e[45]!==V?(H=(0,$.jsxs)(`div`,{className:`relative`,children:[R,(0,$.jsx)(mn,{value:u,onChange:z,placeholder:B,"aria-label":V,className:`pl-8`,"data-testid":`configure-agents-search`})]}),e[43]=u,e[44]=B,e[45]=V,e[46]=H):H=e[46];let ee;e[47]!==t||e[48]!==v?(ee=v?(0,$.jsx)(`p`,{className:`py-6 text-center text-muted-foreground text-sm`,"data-testid":`configure-agents-no-results`,children:t({id:`Nay2Yr`})}):null,e[47]=t,e[48]=v,e[49]=ee):ee=e[49],O=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-configure-agents-title`,className:`space-y-6`,"data-testid":`settings-configure-agents`,children:[L,H,ee,y?(0,$.jsx)(di,{label:(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[t({id:`RXEbZy`}),(0,$.jsx)(le,{})]}),labelId:`settings-configure-agents-in-app`,children:h.isLoading?(0,$.jsxs)(`div`,{className:`flex items-center justify-center gap-2 px-3 py-6 text-muted-foreground text-sm`,children:[(0,$.jsx)(on,{className:`size-4 animate-spin`,"aria-hidden":`true`}),t({id:`ucXZ0k`})]}):h.isError?(0,$.jsxs)(`div`,{className:`flex flex-col items-center gap-2 px-3 py-6 text-center text-muted-foreground text-sm`,children:[(0,$.jsx)(sr,{className:`size-5`,"aria-hidden":`true`}),(0,$.jsx)(`span`,{children:t({id:`FqGWeR`})}),(0,$.jsx)(x,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>void h.refetch(),children:t({id:`6gRgw8`})})]}):(C?.length??0)===0?(0,$.jsx)(`p`,{className:`px-3 py-6 text-center text-muted-foreground text-sm`,children:t({id:`QQbwzK`})}):(0,$.jsxs)($.Fragment,{children:[j.map(e=>{let r=E(e),i=e.supported?e.description:t({id:`5jEnaB`});return(0,$.jsx)(ui,{icon:(0,$.jsx)(Et,{agentId:e.id,iconUrl:e.iconUrl,className:`size-4`}),name:e.name,hint:i,checked:r,disabled:!e.supported,ariaLabel:t({id:`FZtBeR`,values:{0:e.name}}),testId:`configure-agents-in-app-${e.source}:${e.id}`,onToggle:t=>{t?(ve({source:e.source,id:e.id,name:e.name,supported:e.supported,...e.iconUrl===void 0?{}:{iconUrl:e.iconUrl}},{makeDefault:!1}),ge(ue(e.source,e.id),!0)):(ge(ue(e.source,e.id),!1),_e(`${e.source}:${e.id}`,e=>pe(n,e.source,e.id,!0,e.supported)))}},`${e.source}:${e.id}`)}),M>0?(0,$.jsx)(x,{type:`button`,variant:`ghost`,onClick:()=>p(pi),className:`w-full justify-center rounded-none font-normal text-1sm text-muted-foreground`,"data-testid":`configure-agents-in-app-show-more`,children:t(f?{id:`6lGV3K`}:{id:`np9pbC`,values:{inAppHiddenCount:M}})}):null]})}):null,b?(0,$.jsx)(di,{label:t({id:`ALhMYW`}),labelId:`settings-configure-agents-terminal`,children:c.map(e=>{let{displayName:r}=je[e],i=D[e]===!1;return(0,$.jsx)(ui,{icon:(0,$.jsx)(me,{id:fe(e),className:`size-4`,"aria-hidden":`true`}),name:t({id:`QYfQdv`,values:{displayName:r}}),hint:i?t({id:`5SwVv1`}):void 0,checked:he(n,e,D),ariaLabel:t({id:`27TLNq`,values:{displayName:r}}),testId:`configure-agents-terminal-${e}`,onToggle:t=>ge(se(e),t)},e)})}):null,S?(0,$.jsx)(di,{label:t({id:`BBqGS9`}),labelId:`settings-configure-agents-desktop`,children:m.map(e=>{let r=a[e.id]?.installed??null;return(0,$.jsx)(ui,{icon:(0,$.jsx)(me,{id:e.id,className:`size-4`,"aria-hidden":`true`}),name:e.displayName,hint:r===!1?t({id:`5SwVv1`}):void 0,checked:J(n,e.id),ariaLabel:t({id:`FZtBeR`,values:{0:e.displayName}}),testId:`configure-agents-desktop-${e.id}`,onToggle:t=>ge(Y(e.id),t)},e.id)})}):null]}),e[10]=t,e[11]=h,e[12]=C,e[13]=D,e[14]=n,e[15]=u,e[16]=T,e[17]=f,e[18]=a,e[19]=l,e[20]=O}else O=e[20];return O}function pi(e){return!e}function mi(e){return`${e.source}:${e.id}`}function hi(e){let{signal:t}=e;return ye(t)}function gi(){let e=(0,Z.c)(35),{_:t}=s(),{projectConfig:n,projectSynced:r,projectBinding:i}=mt(),a=r&&i!==null,c=n?.validation?.links??`warning`,l=n?.validation?.fileTreeIndicators!==!1,u;e[0]!==t||e[1]!==i?(u=function(e){if(i===null){X.error(t({id:`dVaXnv`}));return}let n=i.patch({validation:e});n.ok||X.error(t({id:`NrFwux`,values:{0:He(n.error)}}))},e[0]=t,e[1]=i,e[2]=u):u=e[2];let d=u,f;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(`h3`,{id:`settings-content-rules-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`OPOiKn`})}),e[3]=f):f=e[3];let p;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[f,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`FTBN5g`})})]}),e[4]=p):p=e[4];let m;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(V,{htmlFor:`settings-content-rules-links`,className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`8ruqQi`})}),e[5]=m):m=e[5];let h;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[m,(0,$.jsx)(`p`,{id:`settings-content-rules-links-description`,className:`text-1sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`N-IonL`})})]}),e[6]=h):h=e[6];let g;e[7]===d?g=e[8]:(g=e=>d({links:e}),e[7]=d,e[8]=g);let _=!a,v;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsx)(U,{id:`settings-content-rules-links`,"aria-describedby":`settings-content-rules-links-description`,className:`w-36 shrink-0`,"data-testid":`settings-content-rules-links`,children:(0,$.jsx)(te,{})}),e[9]=v):v=e[9];let y;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsx)(H,{value:`off`,children:(0,$.jsx)(o,{id:`Nwbs0q`})}),e[10]=y):y=e[10];let b;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsx)(H,{value:`warning`,children:(0,$.jsx)(o,{id:`r6y-jM`})}),e[11]=b):b=e[11];let x;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsxs)(ee,{children:[y,b,(0,$.jsx)(H,{value:`error`,children:(0,$.jsx)(o,{id:`SlfejT`})})]}),e[12]=x):x=e[12];let S;e[13]!==c||e[14]!==g||e[15]!==_?(S=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-3 py-3`,children:[h,(0,$.jsxs)(ne,{value:c,onValueChange:g,disabled:_,children:[v,x]})]}),e[13]=c,e[14]=g,e[15]=_,e[16]=S):S=e[16];let C;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(V,{htmlFor:`settings-content-rules-indicators`,className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`x3kWeu`})}),e[17]=C):C=e[17];let w;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[C,(0,$.jsx)(`p`,{id:`settings-content-rules-indicators-description`,className:`text-1sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`ktspdq`})})]}),e[18]=w):w=e[18];let T=!a,E;e[19]===d?E=e[20]:(E=e=>d({fileTreeIndicators:e}),e[19]=d,e[20]=E);let D;e[21]!==t||e[22]!==l?(D=t(l?{id:`U9tm58`}:{id:`uR2YT3`}),e[21]=t,e[22]=l,e[23]=D):D=e[23];let O;e[24]!==l||e[25]!==T||e[26]!==E||e[27]!==D?(O=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-3 py-3`,children:[w,(0,$.jsx)(W,{id:`settings-content-rules-indicators`,"aria-describedby":`settings-content-rules-indicators-description`,checked:l,disabled:T,onCheckedChange:E,"aria-label":D,"data-testid":`settings-content-rules-indicators`})]}),e[24]=l,e[25]=T,e[26]=E,e[27]=D,e[28]=O):O=e[28];let k;e[29]!==S||e[30]!==O?(k=(0,$.jsxs)(`div`,{className:`divide-y rounded-md border`,children:[S,O]}),e[29]=S,e[30]=O,e[31]=k):k=e[31];let A;e[32]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`settings-content-rules-plugins-note`,children:(0,$.jsx)(o,{id:`YDL7N6`})}),e[32]=A):A=e[32];let j;return e[33]===k?j=e[34]:(j=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-content-rules-title`,className:`space-y-4`,"data-testid":`settings-content-rules`,children:[p,k,A]}),e[33]=k,e[34]=j),j}function _i({binding:e}){return it(e).split(` / `).map((e,t)=>t===0?(0,$.jsx)(i,{"aria-label":tt(e),children:e},`kbd-${e}`):(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,$.jsx)(`span`,{className:`sr-only`,children:(0,$.jsx)(o,{id:`qEue6Q`})}),(0,$.jsx)(`span`,{"aria-hidden":`true`,children:` / `}),(0,$.jsx)(i,{"aria-label":tt(e),children:e})]},`or-${e}`))}function vi(){let e=(0,Z.c)(6),{_:t}=s(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(`h3`,{id:`settings-hotkeys-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`4KmEoC`})}),e[0]=n):n=e[0];let r;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[n,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`RaPMZv`})})]}),e[1]=r):r=e[1];let i;e[2]===t?i=e[3]:(i=et.map(e=>{let n=nt.filter(t=>t.category===e);return n.length===0?null:(0,$.jsxs)(`section`,{"aria-labelledby":`settings-hotkeys-${e}`,children:[(0,$.jsx)(`h4`,{id:`settings-hotkeys-${e}`,className:`mb-2 font-mono text-muted-foreground text-xs uppercase tracking-wide`,children:t(at[e])}),(0,$.jsx)(`ul`,{"aria-labelledby":`settings-hotkeys-${e}`,className:`m-0 list-none overflow-hidden rounded-md border p-0`,children:n.map(e=>{let n=`settings-hotkey-${e.id}-title`,r=`settings-hotkey-${e.id}-description`,i=e.bindings.reduce(yi,0)>4;return(0,$.jsxs)(`li`,{"aria-describedby":r,"aria-labelledby":n,className:h(`grid gap-2 border-border border-b px-3 py-3 last:border-b-0`,i?`sm:grid-cols-1`:`sm:grid-cols-[minmax(0,1fr)_minmax(0,auto)]`),"data-testid":`settings-hotkey-${e.id}`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,$.jsx)(`p`,{className:`font-medium text-sm`,id:n,children:t(e.title)}),(0,$.jsxs)(gn,{variant:`gray`,children:[(0,$.jsx)(`span`,{className:`sr-only`,children:(0,$.jsx)(o,{id:`iXTp5j`})}),t(e.scope)]})]}),(0,$.jsx)(`p`,{className:`text-muted-foreground text-sm`,id:r,children:t(e.description)})]}),(0,$.jsx)(`div`,{className:h(`flex min-w-0 max-w-full self-start content-start flex-wrap items-start gap-1.5`,i?`sm:justify-start`:`sm:max-w-[38rem] sm:justify-end`),children:e.bindings.map(t=>(0,$.jsx)(_i,{binding:t},`${e.id}-${t.mac}-${t.windowsLinux}`))})]},e.id)})})]},e)}),e[2]=t,e[3]=i);let a;return e[4]===i?a=e[5]:(a=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-hotkeys-title`,className:`space-y-5`,"data-testid":`settings-hotkeys`,children:[r,(0,$.jsx)(`div`,{className:`space-y-6`,"data-testid":`settings-hotkeys-list`,children:i})]}),e[4]=i,e[5]=a),a}function yi(e,t){return e+it(t).split(` / `).length}function bi(){(0,Z.c)(16);let[e,t]=(0,Q.useState)(!1),{skillInstalled:n,refresh:r}=Jt();return null}function xi(){let e=(0,Z.c)(32),{_:t}=s(),{projectLocalConfig:n,projectLocalSynced:r,projectLocalBinding:i}=mt(),[a,c]=(0,Q.useState)(!1),l=(0,Q.useRef)(null),u=n?.linkPreviews?.enabled??!1,d=r&&i!==null,f;e[0]!==t||e[1]!==i?(f=function(e){if(i===null)return X.error(t({id:`ax9kie`})),!1;let n=i.patch({linkPreviews:{enabled:e}});if(!n.ok){let r=He(n.error);return X.error(t(e?{id:`ZatAO_`,values:{detail:r}}:{id:`RO-yts`,values:{detail:r}})),!1}return!0},e[0]=t,e[1]=i,e[2]=f):f=e[2];let p=f,m;e[3]===p?m=e[4]:(m=function(e){if(e){c(!0);return}p(!1)},e[3]=p,e[4]=m);let h=m,g;e[5]===p?g=e[6]:(g=function(){p(!0)&&c(!1)},e[5]=p,e[6]=g);let _=g,v;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsx)(`h3`,{id:`settings-link-previews-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`gh27t1`})}),e[7]=v):v=e[7];let y;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[v,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`cGV6Mh`})})]}),e[8]=y):y=e[8];let b;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsx)(`label`,{htmlFor:`settings-link-previews-toggle`,className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`ENpRJV`})}),e[9]=b):b=e[9];let x;e[10]===u?x=e[11]:(x=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[b,(0,$.jsx)(`p`,{id:`settings-link-previews-toggle-description`,className:`text-muted-foreground text-1sm`,"data-testid":`settings-link-previews-body`,children:u?(0,$.jsx)(o,{id:`rVJpLz`}):(0,$.jsx)(o,{id:`YjMLg2`})})]}),e[10]=u,e[11]=x);let S=!d,C;e[12]!==t||e[13]!==u?(C=t(u?{id:`5Umg9i`}:{id:`KpOJFY`}),e[12]=t,e[13]=u,e[14]=C):C=e[14];let w;e[15]!==u||e[16]!==h||e[17]!==S||e[18]!==C?(w=(0,$.jsx)(W,{ref:l,id:`settings-link-previews-toggle`,"aria-describedby":`settings-link-previews-toggle-description`,checked:u,disabled:S,onCheckedChange:h,"aria-label":C,"data-testid":`settings-link-previews-toggle`}),e[15]=u,e[16]=h,e[17]=S,e[18]=C,e[19]=w):w=e[19];let T;e[20]!==x||e[21]!==w?(T=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[x,w]}),e[20]=x,e[21]=w,e[22]=T):T=e[22];let E;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm mt-2`,children:(0,$.jsx)(o,{id:`Xk0-VC`})}),e[23]=E):E=e[23];let D;e[24]===T?D=e[25]:(D=(0,$.jsxs)(`div`,{className:`rounded-md border p-3`,children:[T,E]}),e[24]=T,e[25]=D);let O;e[26]!==a||e[27]!==_?(O=(0,$.jsx)(Si,{open:a,onOpenChange:c,onConfirm:_,returnFocusRef:l}),e[26]=a,e[27]=_,e[28]=O):O=e[28];let k;return e[29]!==D||e[30]!==O?(k=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-link-previews-title`,className:`space-y-3`,"data-testid":`settings-link-previews`,children:[y,D,O]}),e[29]=D,e[30]=O,e[31]=k):k=e[31],k}function Si(e){let t=(0,Z.c)(17),{open:n,onOpenChange:r,onConfirm:i,returnFocusRef:a}=e,s;t[0]===a?s=t[1]:(s=e=>{e.preventDefault(),a.current?.focus()},t[0]=a,t[1]=s);let c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(k,{children:(0,$.jsx)(o,{id:`MqsbfN`})}),t[2]=c):c=t[2];let l;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsxs)(P,{children:[c,(0,$.jsx)(O,{children:(0,$.jsx)(o,{id:`VFQXPl`})})]}),t[3]=l):l=t[3];let u;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(`p`,{className:`mb-2 font-medium`,children:(0,$.jsx)(o,{id:`2Snes1`})}),t[4]=u):u=t[4];let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)(j,{children:(0,$.jsxs)(`div`,{role:`alert`,className:`rounded-md border border-amber-300 bg-amber-50 px-3 py-2.5 text-sm text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-200`,children:[u,(0,$.jsxs)(`ul`,{className:`list-disc space-y-1.5 pl-5`,children:[(0,$.jsx)(`li`,{children:(0,$.jsx)(o,{id:`My0wYT`})}),(0,$.jsx)(`li`,{children:(0,$.jsx)(o,{id:`lmBPt0`})}),(0,$.jsx)(`li`,{children:(0,$.jsx)(o,{id:`5AzM72`})})]})]})}),t[5]=d):d=t[5];let f;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(N,{asChild:!0,children:(0,$.jsx)(x,{variant:`outline`,children:(0,$.jsx)(o,{id:`dEgA5A`})})}),t[6]=f):f=t[6];let p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(o,{id:`iMkWoF`}),t[7]=p):p=t[7];let m;t[8]===i?m=t[9]:(m=(0,$.jsxs)(M,{children:[f,(0,$.jsx)(x,{onClick:i,"data-testid":`settings-link-previews-confirm-enable`,children:p})]}),t[8]=i,t[9]=m);let h;t[10]!==s||t[11]!==m?(h=(0,$.jsxs)(A,{className:`sm:max-w-lg`,"data-testid":`settings-link-previews-confirm`,onCloseAutoFocus:s,children:[l,d,m]}),t[10]=s,t[11]=m,t[12]=h):h=t[12];let g;return t[13]!==r||t[14]!==n||t[15]!==h?(g=(0,$.jsx)(F,{open:n,onOpenChange:r,children:h}),t[13]=r,t[14]=n,t[15]=h,t[16]=g):g=t[16],g}var Ci=[`unmatched`,`invalid`,`suspicious`],wi=` appliesTo glob `,Ti=` (frontmatter mapping for `,Ei=` — `;function Di(e){if(!e.startsWith(`"`))return null;for(let t=1;t<e.length;t++){let n=e[t];if(n===`\\`){t++;continue}if(n===`"`)try{return{value:JSON.parse(e.slice(0,t+1)),rest:e.slice(t+1)}}catch{return null}}return null}function Oi(e){let t=Ci.find(t=>e.startsWith(`${t}${wi}`));if(t===void 0)return null;let n=Di(e.slice(t.length+16));if(n===null)return null;let r=n.rest.lastIndexOf(Ti);if(r===-1||!n.rest.endsWith(`)`))return null;let i=n.rest.slice(r+26,-1);if(i===``)return null;let a=n.rest.slice(0,r);if(!a.startsWith(Ei))return null;let o=a.slice(3);return o===``?null:{kind:t,pattern:n.value,detail:o,file:i}}function ki(e){let t=new Map;for(let n of e){let e=Oi(n);if(e===null)continue;let r=t.get(e.file);r===void 0&&(r=new Map,t.set(e.file,r));let i=r.get(e.pattern);r.set(e.pattern,i===void 0?e.detail:`${i}; ${e.detail}`)}return t}function Ai(e){let t=(0,Z.c)(10),{scope:n}=e,r=`settings-scope-badge-${n}`,i;t[0]===n?i=t[1]:(i=n===`user`?(0,$.jsx)(o,{id:`7PzzBU`}):(0,$.jsx)(o,{id:`e0NrBM`}),t[0]=n,t[1]=i);let a;t[2]!==r||t[3]!==i?(a=(0,$.jsx)(S,{asChild:!0,children:(0,$.jsx)(gn,{variant:`gray`,tabIndex:0,className:`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,"data-testid":r,children:i})}),t[2]=r,t[3]=i,t[4]=a):a=t[4];let s;t[5]===n?s=t[6]:(s=(0,$.jsx)(C,{children:n===`user`?(0,$.jsx)(o,{id:`a7P3nH`}):(0,$.jsx)(o,{id:`494br3`})}),t[5]=n,t[6]=s);let c;return t[7]!==a||t[8]!==s?(c=(0,$.jsxs)(w,{children:[a,s]}),t[7]=a,t[8]=s,t[9]=c):c=t[9],c}function ji(e){let t=(0,Z.c)(22),{titleId:n,title:r,scope:i,beta:a,docUrl:c,children:l}=e,{_:u}=s(),d;t[0]!==r||t[1]!==n?(d=(0,$.jsx)(`h3`,{id:n,className:`text-base font-semibold`,children:r}),t[0]=r,t[1]=n,t[2]=d):d=t[2];let f;t[3]===a?f=t[4]:(f=a?(0,$.jsx)(tr,{}):null,t[3]=a,t[4]=f);let p;t[5]===i?p=t[6]:(p=i?(0,$.jsx)(Ai,{scope:i}):null,t[5]=i,t[6]=p);let m;t[7]!==d||t[8]!==f||t[9]!==p?(m=(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[d,f,p]}),t[7]=d,t[8]=f,t[9]=p,t[10]=m):m=t[10];let h;t[11]===l?h=t[12]:(h=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:l}),t[11]=l,t[12]=h);let g;t[13]!==u||t[14]!==c||t[15]!==r||t[16]!==n?(g=c===void 0?null:(0,$.jsxs)(`a`,{href:c,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>vn(e,c),onAuxClick:e=>vn(e,c),"aria-label":u({id:`Li4U-T`,values:{title:r}}),className:`inline-flex items-center gap-0.5 text-sm text-muted-foreground underline-offset-2 hover:text-foreground hover:underline`,"data-testid":`${n}-docs-link`,children:[(0,$.jsx)(o,{id:`zwWKhA`}),(0,$.jsx)(Tt,{"aria-hidden":!0,className:`size-3`})]}),t[13]=u,t[14]=c,t[15]=r,t[16]=n,t[17]=g):g=t[17];let _;return t[18]!==m||t[19]!==h||t[20]!==g?(_=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[m,h,g]}),t[18]=m,t[19]=h,t[20]=g,t[21]=_):_=t[21],_}var Mi=8e3;function Ni({pluginId:e,label:t}){X.success(ot._({id:`XfA5xx`,values:{label:t}}),{id:`plugin-enabled-${e}`,description:ot._({id:`2wTb8w`}),duration:Mi,action:{label:ot._({id:`Yp-Hi_`}),onClick:()=>Qe(e)}})}function Pi(){let e=(0,Z.c)(7),{_:t}=s(),{projectConfig:n,projectSynced:r,projectBinding:i}=mt(),a=n?.contentRules,o=r&&i!==null,c;e[0]!==t||e[1]!==i?(c=function(e){if(i===null)return X.error(t({id:`dVaXnv`})),!1;let n=i.patch({contentRules:e});return n.ok?!0:(X.error(t({id:`NrFwux`,values:{0:He(n.error)}})),!1)},e[0]=t,e[1]=i,e[2]=c):c=e[2];let l=c,u;return e[3]!==o||e[4]!==a||e[5]!==l?(u={contentRules:a,bindingReady:o,write:l},e[3]=o,e[4]=a,e[5]=l,e[6]=u):u=e[6],u}function Fi(e,t){return{[e]:{enabled:t}}}function Ii(e){let t=(0,Z.c)(2),{id:n}=e;switch(n){case`markdownlint`:{let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(o,{id:`Vftef5`}),t[0]=e):e=t[0],e}case`frontmatter`:{let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(o,{id:`78G7R3`}),t[1]=e):e=t[1],e}}}function Li(){let e=(0,Z.c)(12),{_:t}=s(),{contentRules:n,bindingReady:r,write:i}=Pi(),a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(`h3`,{id:`settings-plugins-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`ohUJJM`})}),e[0]=a):a=e[0];let c;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[a,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`oXlLi4`})})]}),e[1]=c):c=e[1];let l;e[2]!==t||e[3]!==r||e[4]!==n||e[5]!==i?(l=bn.map(e=>{let a=n?.[e.id]?.enabled===!0,o=`settings-plugin-toggle-${e.id}-description`;return(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-3 py-3`,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsxs)(V,{htmlFor:`settings-plugin-toggle-${e.id}`,className:`inline-flex items-center gap-1.5 text-sm font-medium`,children:[e.label,e.id===`frontmatter`?(0,$.jsx)(tr,{}):null]}),(0,$.jsx)(`p`,{id:o,className:`text-1sm text-muted-foreground`,children:(0,$.jsx)(Ii,{id:e.id})})]}),(0,$.jsx)(W,{id:`settings-plugin-toggle-${e.id}`,"aria-describedby":o,checked:a,disabled:!r,onCheckedChange:t=>{i(Fi(e.id,t))&&t&&Ni({pluginId:e.id,label:e.label})},"aria-label":t(a?{id:`y5UgU8`,values:{0:e.label}}:{id:`FZtBeR`,values:{0:e.label}}),"data-testid":`settings-plugin-toggle-${e.id}`})]},e.id)}),e[2]=t,e[3]=r,e[4]=n,e[5]=i,e[6]=l):l=e[6];let u;e[7]===l?u=e[8]:(u=(0,$.jsx)(`div`,{className:`divide-y rounded-md border`,"data-testid":`settings-plugins-list`,children:l}),e[7]=l,e[8]=u);let d;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`settings-plugins-audit-pointer`,children:(0,$.jsx)(o,{id:`9KooKn`})}),e[9]=d):d=e[9];let f;return e[10]===u?f=e[11]:(f=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-plugins-title`,className:`space-y-4`,"data-testid":`settings-plugins-manage`,children:[c,u,d]}),e[10]=u,e[11]=f),f}function Ri(e){let t=(0,Z.c)(31),{userBinding:n}=e,{_:r}=s(),{userConfig:i}=mt(),a=i?.appearance?.colorThemeEnabled!==!1,c=i?.slides?.enabled===!0,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(`h3`,{id:`settings-user-plugins-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`ohUJJM`})}),t[0]=l):l=t[0];let u;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[l,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`k2fEi7`})})]}),t[1]=u):u=t[1];let d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)(V,{htmlFor:`settings-plugin-toggle-theme`,className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`fJ3EbT`})}),t[2]=d):d=t[2];let f;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[d,(0,$.jsx)(`p`,{id:`settings-plugin-toggle-theme-description`,className:`text-1sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`YRavYS`})})]}),t[3]=f):f=t[3];let p=n===null,m;t[4]!==r||t[5]!==n?(m=e=>{if(n){if(!n.patch({appearance:{colorThemeEnabled:e}}).ok){X.error(r({id:`C_Lyvh`}));return}e&&Ni({pluginId:`theme`,label:r({id:`fJ3EbT`})})}},t[4]=r,t[5]=n,t[6]=m):m=t[6];let h;t[7]!==r||t[8]!==a?(h=r(a?{id:`cOJyVj`}:{id:`G_hVTP`}),t[7]=r,t[8]=a,t[9]=h):h=t[9];let g;t[10]!==p||t[11]!==m||t[12]!==h||t[13]!==a?(g=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-3 py-3`,children:[f,(0,$.jsx)(W,{id:`settings-plugin-toggle-theme`,"aria-describedby":`settings-plugin-toggle-theme-description`,checked:a,disabled:p,onCheckedChange:m,"aria-label":h,"data-testid":`settings-plugin-toggle-theme`})]}),t[10]=p,t[11]=m,t[12]=h,t[13]=a,t[14]=g):g=t[14];let _;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsxs)(V,{htmlFor:`settings-plugin-toggle-slides`,className:`inline-flex items-center gap-1.5 text-sm font-medium`,children:[(0,$.jsx)(o,{id:`f14doC`}),(0,$.jsx)(tr,{})]}),t[15]=_):_=t[15];let v;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[_,(0,$.jsx)(`p`,{id:`settings-plugin-toggle-slides-description`,className:`text-1sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`Ozyht_`})})]}),t[16]=v):v=t[16];let y=n===null,b;t[17]!==r||t[18]!==n?(b=e=>{if(n){if(!n.patch({slides:{enabled:e}}).ok){X.error(r({id:`GMaDTM`}));return}e&&Ni({pluginId:`slides`,label:r({id:`f14doC`})})}},t[17]=r,t[18]=n,t[19]=b):b=t[19];let x;t[20]!==r||t[21]!==c?(x=r(c?{id:`wRni1Z`}:{id:`UlVARL`}),t[20]=r,t[21]=c,t[22]=x):x=t[22];let S;t[23]!==c||t[24]!==y||t[25]!==b||t[26]!==x?(S=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-3 py-3`,children:[v,(0,$.jsx)(W,{id:`settings-plugin-toggle-slides`,"aria-describedby":`settings-plugin-toggle-slides-description`,checked:c,disabled:y,onCheckedChange:b,"aria-label":x,"data-testid":`settings-plugin-toggle-slides`})]}),t[23]=c,t[24]=y,t[25]=b,t[26]=x,t[27]=S):S=t[27];let C;return t[28]!==S||t[29]!==g?(C=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-user-plugins-title`,className:`space-y-4`,"data-testid":`settings-user-plugins-manage`,children:[u,(0,$.jsxs)(`div`,{className:`divide-y rounded-md border`,"data-testid":`settings-user-plugins-list`,children:[g,S]})]}),t[28]=S,t[29]=g,t[30]=C):C=t[30],C}function zi(e){return bn.find(t=>t.id===e)?.docUrl}function Bi(e){let t=(0,Z.c)(6),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{initialRuleQuery:r}=n,i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=zi(`markdownlint`),t[2]=i):i=t[2];let a;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(ji,{titleId:`settings-plugin-markdownlint-title`,title:`markdownlint`,scope:`project`,docUrl:i,children:(0,$.jsx)(o,{id:`WFEbV1`,components:{0:(0,$.jsx)(`a`,{href:`https://github.com/DavidAnson/markdownlint`,target:`_blank`,rel:`noopener noreferrer`,onClick:Hi,onAuxClick:Vi,className:`inline-flex items-center gap-0.5 text-muted-foreground underline-offset-2 hover:text-foreground hover:underline`}),1:(0,$.jsx)(Tt,{"aria-hidden":!0,className:`size-3`})}})}),t[3]=a):a=t[3];let s;return t[4]===r?s=t[5]:(s=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-plugin-markdownlint-title`,className:`space-y-4`,"data-testid":`settings-plugin-markdownlint`,children:[a,(0,$.jsx)(er,{initialRuleQuery:r})]}),t[4]=r,t[5]=s),s}function Vi(e){return vn(e,`https://github.com/DavidAnson/markdownlint`)}function Hi(e){return vn(e,`https://github.com/DavidAnson/markdownlint`)}function Ui(e){return e===void 0?[]:Array.isArray(e)?e:[e]}function Wi(e){let t=(0,Z.c)(20),{summary:n}=e;switch(n.kind){case`everything`:{let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(o,{id:`0zAhu6`}),t[0]=e):e=t[0],e}case`folder-recursive`:{let e;return t[1]===n.folder?e=t[2]:(e=(0,$.jsx)(o,{id:`OZavHH`,values:{0:n.folder}}),t[1]=n.folder,t[2]=e),e}case`folder-direct`:{let e;return t[3]===n.folder?e=t[4]:(e=(0,$.jsx)(o,{id:`CWjM1r`,values:{0:n.folder}}),t[3]=n.folder,t[4]=e),e}case`exact`:{let e;return t[5]===n.target?e=t[6]:(e=(0,$.jsx)(o,{id:`c3ZGrq`,values:{0:n.target}}),t[5]=n.target,t[6]=e),e}case`name-anywhere`:{let e;return t[7]===n.name?e=t[8]:(e=(0,$.jsx)(o,{id:`QLgdT6`,values:{0:n.name}}),t[7]=n.name,t[8]=e),e}case`folder-anywhere`:{let e;return t[9]===n.folder?e=t[10]:(e=(0,$.jsx)(o,{id:`_yB-24`,values:{0:n.folder}}),t[9]=n.folder,t[10]=e),e}case`folder-recursive-nested`:{let e;return t[11]!==n.folder||t[12]!==n.root?(e=(0,$.jsx)(o,{id:`paCw0z`,values:{0:n.folder,1:n.root}}),t[11]=n.folder,t[12]=n.root,t[13]=e):e=t[13],e}case`matches-nothing`:{let e;return t[14]===n.pattern?e=t[15]:(e=(0,$.jsx)(o,{id:`J2_JuX`,values:{0:n.pattern}}),t[14]=n.pattern,t[15]=e),e}case`invalid`:{let e;return t[16]===n.pattern?e=t[17]:(e=(0,$.jsx)(o,{id:`5aahsI`,values:{0:n.pattern}}),t[16]=n.pattern,t[17]=e),e}case`pattern`:{let e;return t[18]===n.pattern?e=t[19]:(e=(0,$.jsx)(o,{id:`SiFgBx`,values:{0:n.pattern}}),t[18]=n.pattern,t[19]=e),e}}}function Gi(e){let t=(0,Z.c)(4),{file:n,appliesTo:r}=e,i;if(t[0]!==r||t[1]!==n){let{includes:e,excludes:a}=Ke(r),s=Ki,c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(o,{id:`p98xmP`}),t[3]=c):c=t[3],i=(0,$.jsxs)(`p`,{className:`text-xs text-muted-foreground`,"data-testid":`frontmatter-schema-applies-summary-${n}`,children:[c,` `,e.length===0?(0,$.jsx)(Wi,{summary:{kind:`everything`}}):s(e),a.length>0?(0,$.jsxs)($.Fragment,{children:[` `,(0,$.jsx)(o,{id:`YGNRB5`}),` `,s(a)]}):null,`.`]}),t[0]=r,t[1]=n,t[2]=i}else i=t[2];return i}function Ki(e){return e.map(qi)}function qi(e,t){return(0,$.jsxs)(`span`,{children:[t>0?`, `:null,(0,$.jsx)(Wi,{summary:e})]},t)}function Ji(e){return e.enabled!==!1}function Yi(e){let t=(0,Z.c)(49),{file:n,mapping:r,disabled:i,globProblems:a,onToggle:c,onAppliesToChange:l,onDelete:u}=e,{_:d}=s(),f;t[0]===r?f=t[1]:(f=r!==void 0&&Ji(r),t[0]=r,t[1]=f);let p=f,m;t[2]===n?m=t[3]:(m=()=>{nr(n),window.location.hash=fn(n)},t[2]=n,t[3]=m);let h=m,g=`frontmatter-schema-row-${n}`,_;t[4]===n?_=t[5]:(_=(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-sm`,title:n,children:n}),t[4]=n,t[5]=_);let v;t[6]!==d||t[7]!==n?(v=d({id:`74C2zx`,values:{file:n}}),t[6]=d,t[7]=n,t[8]=v):v=t[8];let y=`frontmatter-schema-edit-${n}`,b,S;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsx)(sn,{"aria-hidden":!0,className:`size-3`}),S=(0,$.jsx)(o,{id:`ePK91l`}),t[9]=b,t[10]=S):(b=t[9],S=t[10]);let C;t[11]!==h||t[12]!==v||t[13]!==y?(C=(0,$.jsxs)(x,{variant:`outline`,size:`sm`,className:`h-6 shrink-0 gap-1 px-2 text-xs`,onClick:h,"aria-label":v,"data-testid":y,children:[b,S]}),t[11]=h,t[12]=v,t[13]=y,t[14]=C):C=t[14];let w;t[15]!==d||t[16]!==i||t[17]!==n||t[18]!==u?(w=u===null?null:(0,$.jsx)(x,{variant:`ghost`,size:`icon`,className:`h-5 w-5 shrink-0 text-muted-foreground opacity-60 hover:opacity-100`,disabled:i,"aria-label":d({id:`mHf8mp`,values:{file:n}}),onClick:u,"data-testid":`frontmatter-schema-delete-${n}`,children:(0,$.jsx)(ln,{className:`size-3.5`})}),t[15]=d,t[16]=i,t[17]=n,t[18]=u,t[19]=w):w=t[19];let T;t[20]!==d||t[21]!==n||t[22]!==p?(T=d(p?{id:`mAzs2H`,values:{file:n}}:{id:`EO4Dt1`,values:{file:n}}),t[20]=d,t[21]=n,t[22]=p,t[23]=T):T=t[23];let E=`frontmatter-schema-toggle-${n}`,D;t[24]!==i||t[25]!==p||t[26]!==c||t[27]!==T||t[28]!==E?(D=(0,$.jsx)(W,{checked:p,disabled:i,"aria-label":T,onCheckedChange:c,"data-testid":E}),t[24]=i,t[25]=p,t[26]=c,t[27]=T,t[28]=E,t[29]=D):D=t[29];let O;t[30]!==w||t[31]!==D||t[32]!==C?(O=(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[C,w,D]}),t[30]=w,t[31]=D,t[32]=C,t[33]=O):O=t[33];let k;t[34]!==O||t[35]!==_?(k=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[_,O]}),t[34]=O,t[35]=_,t[36]=k):k=t[36];let A;t[37]!==d||t[38]!==i||t[39]!==n||t[40]!==a||t[41]!==r?.appliesTo||t[42]!==p||t[43]!==l?(A=p?(0,$.jsxs)(`div`,{className:`mt-2 space-y-1 pl-1.5`,children:[(0,$.jsx)(V,{htmlFor:`frontmatter-schema-applies-${n}`,className:`text-xs`,children:(0,$.jsx)(o,{id:`5Y17qa`})}),(0,$.jsx)($n,{id:`frontmatter-schema-applies-${n}`,value:Ui(r?.appliesTo),grammar:`free-text`,disabled:i,entryProblems:a,onChange:l,placeholder:d({id:`R_U_A4`}),"aria-label":d({id:`a45f2c`})}),(0,$.jsx)(Gi,{file:n,appliesTo:r?.appliesTo})]}):null,t[37]=d,t[38]=i,t[39]=n,t[40]=a,t[41]=r?.appliesTo,t[42]=p,t[43]=l,t[44]=A):A=t[44];let j;return t[45]!==k||t[46]!==A||t[47]!==g?(j=(0,$.jsxs)(`div`,{className:`px-3 py-2`,"data-testid":g,children:[k,A]}),t[45]=k,t[46]=A,t[47]=g,t[48]=j):j=t[48],j}function Xi(){let e=(0,Z.c)(99),{_:t}=s(),{contentRules:n,bindingReady:r,write:i}=Pi(),{data:a}=Sn(),{schemas:c}=En(),l;e[0]===n?.frontmatter?.schemas?l=e[1]:(l=n?.frontmatter?.schemas??[],e[0]=n?.frontmatter?.schemas,e[1]=l);let u=l,[h,_]=(0,Q.useState)(``),[v,y]=(0,Q.useState)(!1),[b,S]=(0,Q.useState)(``),[C,w]=(0,Q.useState)(null),[T,E]=(0,Q.useState)(!1),D,O,k,A,j,M,N,P;if(e[2]!==t||e[3]!==r||e[4]!==v||e[5]!==a?.configProblems||e[6]!==c||e[7]!==u||e[8]!==b||e[9]!==h||e[10]!==i){let n=new Set(u.map(ea)),s=(a?.configProblems??[]).filter(e=>e.startsWith(`frontmatter schema `)?[...n].some(t=>e.startsWith(`frontmatter schema ${t}:`)):e.startsWith(`invalid appliesTo glob`)||e.startsWith(`suspicious appliesTo glob`)||e.startsWith(`unmatched appliesTo glob`)?[...n].some(t=>e.endsWith(`(frontmatter mapping for ${t})`)):!1),l;e[19]===i?l=e[20]:(l=function(e){i({frontmatter:{schemas:e}})&&wn()},e[19]=i,e[20]=l);let g=l,C=[...new Set([...c,...u.map($i)])].sort(Qi),T=h.trim().toLowerCase(),F=C.filter(e=>T===``||e.toLowerCase().includes(T)),I=ki(s),L;e[21]===u?L=e[22]:(L=e=>{let t=Oi(e);if(t===null)return!0;let n=u.find(e=>e.file===t.file),r=n!==void 0&&Ji(n)&&Ui(n.appliesTo).includes(t.pattern),i=u.some(e=>e.file===t.file&&Ui(e.appliesTo).includes(t.pattern));return!r&&i},e[21]=u,e[22]=L);let R=s.filter(L),z;e[23]!==u||e[24]!==g?(z=function(e,t){if(!u.some(t=>t.file===e)){t&&g([...u,{file:e,enabled:!0}]);return}g(u.map(n=>n.file===e?{...n,enabled:t}:n))},e[23]=u,e[24]=g,e[25]=z):z=e[25];let B=z,H;e[26]!==u||e[27]!==g?(H=function(e,t){g(u.map(n=>{if(n.file!==e)return n;if(t.length===0){let{appliesTo:e,...t}=n;return t}return{...n,appliesTo:t}}))},e[26]=u,e[27]=g,e[28]=H):H=e[28];let ee=H,U;e[29]!==t||e[30]!==u||e[31]!==g?(U=async function(e){E(!0);let n=await Cn(e);if(E(!1),!n.ok){X.error(n.errorDetail??t({id:`hgtsat`,values:{file:e}}));return}u.some(t=>t.file===e)&&g(u.filter(t=>t.file!==e)),w(null),X.success(t({id:`v_2_3v`,values:{file:e}}))},e[29]=t,e[30]=u,e[31]=g,e[32]=U):U=e[32],D=U;let te;e[33]!==t||e[34]!==u||e[35]!==b||e[36]!==g?(te=async function(){let e=b.trim();if(e===``||e.includes(`/`)||e.includes(`\\`))return;let n=`.ok/schemas/${e.endsWith(`.json`)?e:`${e}.schema.json`}`,r=await Tn(n);if(!r.ok){X.error(r.errorDetail??t({id:`U88xbi`}));return}g([...u,{file:n,enabled:!0}]),y(!1),S(``)},e[33]=t,e[34]=u,e[35]=b,e[36]=g,e[37]=te):te=e[37];let ne=te;O=`settings-plugin-frontmatter-title`,k=`space-y-4`,A=`settings-plugin-frontmatter`;let re;e[38]===t?re=e[39]:(re=t({id:`PVggyD`}),e[38]=t,e[39]=re);let ie,ae;e[40]===Symbol.for(`react.memo_cache_sentinel`)?(ie=zi(`frontmatter`),ae=(0,$.jsx)(o,{id:`V3iDh1`}),e[40]=ie,e[41]=ae):(ie=e[40],ae=e[41]),e[42]===re?j=e[43]:(j=(0,$.jsx)(ji,{titleId:`settings-plugin-frontmatter-title`,title:re,beta:!0,docUrl:ie,children:ae}),e[42]=re,e[43]=j),M=R.length>0&&(0,$.jsxs)(`div`,{className:`space-y-1 rounded-md border border-amber-500/50 bg-amber-500/10 p-3 text-sm`,"data-testid":`frontmatter-config-problems`,children:[(0,$.jsx)(`p`,{className:`font-medium`,children:(0,$.jsx)(o,{id:`3BLniE`})}),(0,$.jsx)(`ul`,{className:`list-disc pl-5 text-muted-foreground`,children:R.map(Zi)})]});let W;e[44]===Symbol.for(`react.memo_cache_sentinel`)?(W=e=>_(e.target.value),e[44]=W):W=e[44];let G;e[45]===t?G=e[46]:(G=t({id:`37P2BJ`}),e[45]=t,e[46]=G);let K;e[47]===t?K=e[48]:(K=t({id:`_NWEid`}),e[47]=t,e[48]=K);let oe;e[49]!==h||e[50]!==G||e[51]!==K?(oe=(0,$.jsx)(mn,{value:h,onChange:W,placeholder:G,"aria-label":K,className:`h-8`,"data-testid":`frontmatter-schema-search`}),e[49]=h,e[50]=G,e[51]=K,e[52]=oe):oe=e[52];let q;e[53]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,$.jsx)(p,{asChild:!0,children:(0,$.jsxs)(x,{variant:`outline`,size:`sm`,className:`shrink-0`,"data-testid":`frontmatter-create-schema`,children:[(0,$.jsx)(f,{"aria-hidden":!0,className:`size-4`}),(0,$.jsx)(o,{id:`LQdLio`})]})}),e[53]=q):q=e[53];let J;e[54]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,$.jsx)(V,{htmlFor:`frontmatter-create-schema-name`,className:`text-xs`,children:(0,$.jsx)(o,{id:`PijLsG`})}),e[54]=J):J=e[54];let Y;e[55]===Symbol.for(`react.memo_cache_sentinel`)?(Y=e=>S(e.target.value),e[55]=Y):Y=e[55];let se;e[56]===ne?se=e[57]:(se=e=>{e.key===`Enter`&&ne()},e[56]=ne,e[57]=se);let ce;e[58]!==b||e[59]!==se?(ce=(0,$.jsx)(mn,{id:`frontmatter-create-schema-name`,value:b,onChange:Y,onKeyDown:se,placeholder:`doc`,"data-testid":`frontmatter-create-schema-name`}),e[58]=b,e[59]=se,e[60]=ce):ce=e[60];let le;e[61]!==r||e[62]!==b?(le=!r||b.trim()===``,e[61]=r,e[62]=b,e[63]=le):le=e[63];let ue;e[64]===ne?ue=e[65]:(ue=()=>void ne(),e[64]=ne,e[65]=ue);let de;e[66]===Symbol.for(`react.memo_cache_sentinel`)?(de=(0,$.jsx)(o,{id:`hYgDIe`}),e[66]=de):de=e[66];let fe;e[67]!==le||e[68]!==ue?(fe=(0,$.jsx)(x,{size:`sm`,disabled:le,onClick:ue,"data-testid":`frontmatter-create-schema-save`,children:de}),e[67]=le,e[68]=ue,e[69]=fe):fe=e[69];let pe;e[70]!==ce||e[71]!==fe?(pe=(0,$.jsxs)(d,{align:`end`,className:`w-72 space-y-2`,children:[J,ce,fe]}),e[70]=ce,e[71]=fe,e[72]=pe):pe=e[72];let me;e[73]!==v||e[74]!==pe?(me=(0,$.jsxs)(m,{open:v,onOpenChange:y,children:[q,pe]}),e[73]=v,e[74]=pe,e[75]=me):me=e[75],e[76]!==oe||e[77]!==me?(N=(0,$.jsxs)(`div`,{className:`flex items-center gap-4`,children:[oe,me]}),e[76]=oe,e[77]=me,e[78]=N):N=e[78],P=F.length===0?(0,$.jsx)(`p`,{className:`rounded-md border border-dashed p-3 text-sm text-muted-foreground`,"data-testid":`frontmatter-schemas-empty`,children:C.length===0?(0,$.jsx)(o,{id:`cRm498`}):(0,$.jsx)(o,{id:`3HAPpl`})}):(0,$.jsx)(`div`,{className:`divide-y rounded-md border`,"data-testid":`frontmatter-schemas-list`,children:F.map(e=>(0,$.jsx)(Yi,{file:e,mapping:u.find(t=>t.file===e),disabled:!r,globProblems:I.get(e),onToggle:t=>B(e,t),onAppliesToChange:t=>ee(e,t),onDelete:Ie(e)?()=>w(e):null},e))}),e[2]=t,e[3]=r,e[4]=v,e[5]=a?.configProblems,e[6]=c,e[7]=u,e[8]=b,e[9]=h,e[10]=i,e[11]=D,e[12]=O,e[13]=k,e[14]=A,e[15]=j,e[16]=M,e[17]=N,e[18]=P}else D=e[11],O=e[12],k=e[13],A=e[14],j=e[15],M=e[16],N=e[17],P=e[18];let I=C!==null,L;e[79]===T?L=e[80]:(L=e=>{!e&&!T&&w(null)},e[79]=T,e[80]=L);let R;e[81]!==t||e[82]!==D||e[83]!==C||e[84]!==T?(R=C===null?null:(0,$.jsx)(g,{itemName:t({id:`qribBG`,values:{deleteTarget:C}}),isSubmitting:T,onDelete:()=>void D(C),customDescription:t({id:`NzPihF`,values:{deleteTarget:C}})}),e[81]=t,e[82]=D,e[83]=C,e[84]=T,e[85]=R):R=e[85];let z;e[86]!==R||e[87]!==I||e[88]!==L?(z=(0,$.jsx)(F,{open:I,onOpenChange:L,children:R}),e[86]=R,e[87]=I,e[88]=L,e[89]=z):z=e[89];let B;return e[90]!==O||e[91]!==z||e[92]!==k||e[93]!==A||e[94]!==j||e[95]!==M||e[96]!==N||e[97]!==P?(B=(0,$.jsxs)(`section`,{"aria-labelledby":O,className:k,"data-testid":A,children:[j,M,N,P,z]}),e[90]=O,e[91]=z,e[92]=k,e[93]=A,e[94]=j,e[95]=M,e[96]=N,e[97]=P,e[98]=B):B=e[98],B}function Zi(e){return(0,$.jsx)(`li`,{children:e},e)}function Qi(e,t){return e.localeCompare(t)}function $i(e){return e.file}function ea(e){return e.file}var ta={markdownlint:Bi,frontmatter:Xi},na=bn.map(e=>({...e,Section:ta[e.id]})),ra=e(t(((e,t)=>{function n(e){return Array.isArray(e)?e:[e]}var r=``,i=` `,a=`\\`,o=/^\s+$/,s=/(?:[^\\]|^)\\$/,c=/^\\!/,l=/^\\#/,u=/\r?\n/g,d=/^\.*\/|^\.+$/,f=`/`,p=`node-ignore`;typeof Symbol<`u`&&(p=Symbol.for(`node-ignore`));var m=p,h=(e,t,n)=>Object.defineProperty(e,t,{value:n}),g=/([0-z])-([0-z])/g,_=()=>!1,v=e=>e.replace(g,(e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:r),y=e=>{let{length:t}=e;return e.slice(0,t-t%2)},b=[[/^\uFEFF/,()=>r],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,n)=>t+(n.indexOf(`\\`)===0?i:r)],[/(\\+?)\s/g,(e,t)=>{let{length:n}=t;return t.slice(0,n-n%2)+i}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>`[^/]`],[/^\//,()=>`^`],[/\//g,()=>`\\/`],[/^\^*\\\*\\\*\\\//,()=>`^(?:.*\\/)?`],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?`^`:`(?:^|\\/)`}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,n)=>t+6<n.length?`(?:\\/[^\\/]+)*`:`\\/.+`],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,n)=>t+n.replace(/\\\*/g,`[^\\/]*`)],[/\\\\\\(?=[$.|*+(){^])/g,()=>a],[/\\\\/g,()=>a],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,n,r,i)=>t===a?`\\[${n}${y(r)}${i}`:i===`]`&&r.length%2==0?`[${v(n)}${r}]`:`[]`],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:`[^/]*`}(?=$|\\/$)`]],x=Object.create(null),S=(e,t)=>{let n=x[e];return n||(n=b.reduce((t,[n,r])=>t.replace(n,r.bind(e)),e),x[e]=n),t?new RegExp(n,`i`):new RegExp(n)},C=e=>typeof e==`string`,w=e=>e&&C(e)&&!o.test(e)&&!s.test(e)&&e.indexOf(`#`)!==0,T=e=>e.split(u),E=class{constructor(e,t,n,r){this.origin=e,this.pattern=t,this.negative=n,this.regex=r}},D=(e,t)=>{let n=e,r=!1;e.indexOf(`!`)===0&&(r=!0,e=e.substr(1)),e=e.replace(c,`!`).replace(l,`#`);let i=S(e,t);return new E(n,e,r,i)},O=(e,t)=>{throw new t(e)},k=(e,t,n)=>C(e)?e?k.isNotRelative(e)?n(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:n(`path must not be empty`,TypeError):n(`path must be a string, but got \`${t}\``,TypeError),A=e=>d.test(e);k.isNotRelative=A,k.convert=e=>e;var j=class{constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:n=!1}={}){h(this,m,!0),this._rules=[],this._ignoreCase=t,this._allowRelativePaths=n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(e){if(e&&e[m]){this._rules=this._rules.concat(e._rules),this._added=!0;return}if(w(e)){let t=D(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,n(C(e)?T(e):e).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(e){return this.add(e)}_testOne(e,t){let n=!1,r=!1;return this._rules.forEach(i=>{let{negative:a}=i;r===a&&n!==r||a&&!n&&!r&&!t||i.regex.test(e)&&(n=!a,r=a)}),{ignored:n,unignored:r}}_test(e,t,n,r){let i=e&&k.convert(e);return k(i,e,this._allowRelativePaths?_:O),this._t(i,t,n,r)}_t(e,t,n,r){if(e in t)return t[e];if(r||=e.split(f),r.pop(),!r.length)return t[e]=this._testOne(e,n);let i=this._t(r.join(f)+f,t,n,r);return t[e]=i.ignored?i:this._testOne(e,n)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return n(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}},M=e=>new j(e);if(M.isPathValid=e=>k(e&&k.convert(e),e,_),M.default=M,t.exports=M,typeof process<`u`&&({}.IGNORE_TEST_WIN32||process.platform===`win32`)){k.convert=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,`/`);let e=/^[a-z]:\//i;k.isNotRelative=t=>e.test(t)||A(t)}}))(),1),ia=new Map;function aa(e){let t=ia.get(e);if(t)return ia.delete(e),ia.set(e,t),t;let n=(0,ra.default)();if(n.add(e),ia.set(e,n),ia.size>256){let e=ia.keys().next().value;e!==void 0&&ia.delete(e)}return n}function oa(e,t){let n=e.trim();if(n.length===0||n.startsWith(`#`))return 0;let r=aa(n),i=0;for(let e of t)e.length!==0&&r.ignores(e)&&(i+=1);return i}var sa={"trailing-backslash":`Trailing backslash — line continuation isn't supported.`,"unmatched-bracket":`Unmatched [ — character class is open.`,"lone-bang":`Lone ! — negation needs a pattern after it.`,"leading-whitespace":`Leading whitespace — the rule may not match as expected.`,"embedded-newline":`Embedded line break — the row spans multiple lines.`};function ca(e){let t=[];if(e.length===0||e.trimStart().startsWith(`#`))return t;/[\r\n]/.test(e)&&t.push({code:`embedded-newline`,message:sa[`embedded-newline`]}),/^\s/.test(e)&&t.push({code:`leading-whitespace`,message:sa[`leading-whitespace`]});let n=e.trim();return n===`!`&&t.push({code:`lone-bang`,message:sa[`lone-bang`]}),n.endsWith(`\\`)&&t.push({code:`trailing-backslash`,message:sa[`trailing-backslash`]}),la(n,`[`)>la(n,`]`)&&t.push({code:`unmatched-bracket`,message:sa[`unmatched-bracket`]}),t}function la(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}var ua=`https://openknowledge.ai/docs/features/ignore-patterns`,da=1200,fa=150,pa=150,ma=5e3,ha=600,ga=400,_a=`okignore-show-advanced`;function va(e){let t=(0,Z.c)(3),{binding:n,synced:r}=e;if(n===null||!r){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(ya,{}),t[0]=e):e=t[0],e}let i;return t[1]===n?i=t[2]:(i=(0,$.jsx)(ba,{binding:n}),t[1]=n,t[2]=i),i}function ya(){let e=(0,Z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-okignore-title`,className:`space-y-3`,"data-testid":`settings-okignore-skeleton`,children:[(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsx)(`h3`,{id:`settings-okignore-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`3zyg_A`})}),(0,$.jsx)(xn,{className:`h-4 w-72`})]}),(0,$.jsx)(xn,{className:`h-20 w-full`})]}),e[0]=t):t=e[0],t}function ba(e){let t=(0,Z.c)(72),{binding:n}=e,{_:r}=s(),i;t[0]===n?i=t[1]:(i=()=>n.current(),t[0]=n,t[1]=i);let[a,c]=(0,Q.useState)(i),l,u;t[2]===n?(l=t[3],u=t[4]):(l=()=>n.subscribe(e=>{c(e)}),u=[n],t[2]=n,t[3]=l,t[4]=u),(0,Q.useEffect)(l,u);let{pages:d,pageMeta:f,assetPaths:p}=At(),m;t[5]!==p||t[6]!==f||t[7]!==d?(m=Va(d,f,p),t[5]=p,t[6]=f,t[7]=d,t[8]=m):m=t[8];let h=m,g,_;t[9]===a?(g=t[10],_=t[11]):(g=Ht(a),_=tn(g),t[9]=a,t[10]=g,t[11]=_);let v=_,y=v.length===0,[b,x]=(0,Q.useState)(null),S=(0,Q.useRef)(null),C,w;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(C=()=>()=>{S.current&&clearTimeout(S.current)},w=[],t[12]=C,t[13]=w):(C=t[12],w=t[13]),(0,Q.useEffect)(C,w);let T;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(T=e=>{x({key:e,ts:Date.now()}),S.current&&clearTimeout(S.current),S.current=setTimeout(()=>x(null),da)},t[14]=T):T=t[14];let E=T,[D,O]=(0,Q.useState)(null),k=(0,Q.useRef)(null),A,j;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(j=()=>()=>{k.current&&clearTimeout(k.current)},A=[],t[15]=A,t[16]=j):(A=t[15],j=t[16]),(0,Q.useEffect)(j,A);let M,N;t[17]===n?(M=t[18],N=t[19]):(M=()=>Kt(e=>{e.docName===`__config__/okignore`&&n.notifyRejection(e.error)}),N=[n],t[17]=n,t[18]=M,t[19]=N),(0,Q.useEffect)(M,N);let P,F;t[20]===n?(P=t[21],F=t[22]):(P=()=>n.subscribeRejection(e=>{let{error:t}=e,n=La(t);O({message:n?.detail??He(t),lineNumber:n?.lineNumber,ts:Date.now()}),k.current&&clearTimeout(k.current),k.current=setTimeout(()=>O(null),ma)}),F=[n],t[20]=n,t[21]=P,t[22]=F),(0,Q.useEffect)(P,F);let I,L;t[23]===r?(I=t[24],L=t[25]):(I=()=>Zt(e=>{let{path:t}=e;X.error(r({id:`3oh0nQ`,values:{path:t}}),{description:e.error,id:`okignore-nested-error:${e.path}`,duration:8e3})}),L=[r],t[23]=r,t[24]=I,t[25]=L),(0,Q.useEffect)(I,L);let R;t[26]===n?R=t[27]:(R=e=>{n.patch(e)},t[26]=n,t[27]=R);let z=R,B;t[28]!==z||t[29]!==g||t[30]!==v?(B=(e,t)=>{let n=t.trim(),r=v[e];if(r&&n!==r.text){if(n.length===0){z(Mt(en(g,e)));return}z(Mt(Vt(g,e,n))),E(Ia(n,e))}},t[28]=z,t[29]=g,t[30]=v,t[31]=B):B=t[31];let V=B,H;t[32]!==z||t[33]!==g?(H=e=>{z(Mt(en(g,e)))},t[32]=z,t[33]=g,t[34]=H):H=t[34];let ee=H,U;t[35]!==z||t[36]!==g||t[37]!==v.length?(U=e=>{let t=e.trim();if(t.length===0)return;let n=$t(g,t);if(n>=0){E(Ia(t,n));return}z(Mt(Gt(g,t))),E(Ia(t,v.length))},t[35]=z,t[36]=g,t[37]=v.length,t[38]=U):U=t[38];let te=U,ne;t[39]!==z||t[40]!==g?(ne=e=>{let t=String(e.active.id),n=e.over?String(e.over.id):null;if(!n||t===n)return;let r=Fa(t),i=Fa(n);r<0||i<0||r===i||z(Mt(zt(g,r,i)))},t[39]=z,t[40]=g,t[41]=ne):ne=t[41];let re=ne,ie;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(ie={activationConstraint:{distance:4}},t[42]=ie):ie=t[42];let ae;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(ae={coordinateGetter:Nn},t[43]=ae):ae=t[43];let W=jn(Mn(kn,ie),Mn(Ln,ae)),G=D===null?null:`rejection-${D.ts}`,[K,oe]=Wa(),q;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,$.jsx)(`h3`,{id:`settings-okignore-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`3zyg_A`})}),t[44]=q):q=t[44];let J;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[q,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`Z5h97D`,components:{0:(0,$.jsx)(`a`,{href:ua,target:`_blank`,rel:`noreferrer noopener`,className:`text-primary underline-offset-2 hover:underline`,"data-testid":`settings-okignore-primer`})}})})]}),t[45]=J):J=t[45];let Y;t[46]===D?Y=t[47]:(Y=D===null?null:(0,$.jsx)(Ca,{rejection:D}),t[46]=D,t[47]=Y);let se;t[48]!==n||t[49]!==h||t[50]!==te||t[51]!==re||t[52]!==V||t[53]!==ee||t[54]!==y||t[55]!==v||t[56]!==G||t[57]!==b||t[58]!==W||t[59]!==K||t[60]!==a?(se=K?(0,$.jsx)(xa,{binding:n,text:a}):y?(0,$.jsx)(wa,{onAdd:te,rejectionFlashKey:G,filePaths:h}):(0,$.jsx)(Ta,{patterns:v,sensors:W,onDragEnd:re,onEdit:V,onRemove:ee,onAdd:te,savedFlash:b,rejectionFlashKey:G,filePaths:h}),t[48]=n,t[49]=h,t[50]=te,t[51]=re,t[52]=V,t[53]=ee,t[54]=y,t[55]=v,t[56]=G,t[57]=b,t[58]=W,t[59]=K,t[60]=a,t[61]=se):se=t[61];let ce;t[62]!==oe||t[63]!==K?(ce=()=>oe(!K),t[62]=oe,t[63]=K,t[64]=ce):ce=t[64];let le;t[65]!==K||t[66]!==ce?(le=(0,$.jsx)(`div`,{className:`flex justify-end`,children:(0,$.jsx)(Sa,{enabled:K,onToggle:ce})}),t[65]=K,t[66]=ce,t[67]=le):le=t[67];let ue;return t[68]!==Y||t[69]!==se||t[70]!==le?(ue=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-okignore-title`,className:`space-y-3`,"data-testid":`settings-okignore-section`,children:[J,Y,se,le]}),t[68]=Y,t[69]=se,t[70]=le,t[71]=ue):ue=t[71],ue}function xa(e){let t=(0,Z.c)(31),{binding:n,text:r}=e,{_:i}=s(),[a,o]=(0,Q.useState)(r),c=(0,Q.useRef)(r),l=(0,Q.useRef)(!1),u=(0,Q.useRef)(r),d=(0,Q.useRef)(null),f,p;t[0]===r?(f=t[1],p=t[2]):(f=()=>{l.current||r!==c.current&&(o(r),u.current=r,c.current=r)},p=[r],t[0]=r,t[1]=f,t[2]=p),(0,Q.useEffect)(f,p);let m,h;t[3]===a?(m=t[4],h=t[5]):(m=()=>{u.current=a},h=[a],t[3]=a,t[4]=m,t[5]=h),(0,Q.useEffect)(m,h);let g,_;t[6]===n?(g=t[7],_=t[8]):(g=()=>()=>{d.current&&(clearTimeout(d.current),d.current=null,u.current!==c.current&&(n.patch(u.current),c.current=u.current))},_=[n],t[6]=n,t[7]=g,t[8]=_),(0,Q.useEffect)(g,_);let v;t[9]===n?v=t[10]:(v=e=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{d.current=null,e!==c.current&&(c.current=e,n.patch(e))},ga)},t[9]=n,t[10]=v);let y=v,b;t[11]===n?b=t[12]:(b=()=>{d.current&&=(clearTimeout(d.current),null),u.current!==c.current&&(c.current=u.current,n.patch(u.current))},t[11]=n,t[12]=b);let x=b,S;t[13]===y?S=t[14]:(S=e=>{o(e.target.value),y(e.target.value)},t[13]=y,t[14]=S);let C;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(C=()=>{l.current=!0},t[15]=C):C=t[15];let w;t[16]===x?w=t[17]:(w=()=>{l.current=!1,x()},t[16]=x,t[17]=w);let T;t[18]===a?T=t[19]:(T=a.split(`
|
|
7
|
-
`),t[18]=a,t[19]=T);let E=Math.max(6,Math.min(20,T.length+1)),D;t[20]===i?D=t[21]:(D=i({id:`rssK8c`}),t[20]=i,t[21]=D);let O;t[22]===i?O=t[23]:(O=i({id:`AeHuzT`}),t[22]=i,t[23]=O);let k;return t[24]!==a||t[25]!==w||t[26]!==E||t[27]!==D||t[28]!==O||t[29]!==S?(k=(0,$.jsx)(`textarea`,{value:a,onChange:S,onFocus:C,onBlur:w,spellCheck:!1,rows:E,"aria-label":D,placeholder:O,className:`min-h-32 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-xs outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,"data-testid":`settings-okignore-advanced-textarea`}),t[24]=a,t[25]=w,t[26]=E,t[27]=D,t[28]=O,t[29]=S,t[30]=k):k=t[30],k}function Sa(e){let t=(0,Z.c)(6),{enabled:n,onToggle:r}=e,i;t[0]===n?i=t[1]:(i=n?(0,$.jsx)(o,{id:`9PQysm`}):(0,$.jsx)(o,{id:`Nv3mUj`}),t[0]=n,t[1]=i);let a;return t[2]!==n||t[3]!==r||t[4]!==i?(a=(0,$.jsx)(x,{type:`button`,variant:`ghost`,size:`sm`,onClick:r,"aria-pressed":n,className:`h-7 px-2 text-xs text-muted-foreground hover:text-foreground`,"data-testid":`settings-okignore-show-advanced-toggle`,children:i}),t[2]=n,t[3]=r,t[4]=i,t[5]=a):a=t[5],a}function Ca(e){let t=(0,Z.c)(7),{rejection:n}=e,{_:r}=s(),{lineNumber:i,message:a}=n,o;t[0]!==r||t[1]!==i||t[2]!==a?(o=r(i===void 0?{id:`G7-rf8`,values:{message:a}}:{id:`P3NS4G`,values:{lineNumber:i,message:a}}),t[0]=r,t[1]=i,t[2]=a,t[3]=o):o=t[3];let c=o,l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(un,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0`}),t[4]=l):l=t[4];let u;return t[5]===c?u=t[6]:(u=(0,$.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"data-testid":`settings-okignore-rejection-banner`,className:`flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-sm text-destructive animate-in fade-in`,children:[l,(0,$.jsx)(`span`,{children:c})]}),t[5]=c,t[6]=u),u}function wa(e){let t=(0,Z.c)(8),{onAdd:n,rejectionFlashKey:r,filePaths:i}=e,{_:a}=s(),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`makN88`})}),t[0]=c):c=t[0];let l;t[1]===a?l=t[2]:(l=a({id:`Gx0VS1`}),t[1]=a,t[2]=l);let u;return t[3]!==i||t[4]!==n||t[5]!==r||t[6]!==l?(u=(0,$.jsxs)(`div`,{className:`space-y-3 rounded-md border border-dashed p-4`,"data-testid":`settings-okignore-empty`,children:[c,(0,$.jsx)(ka,{onAdd:n,placeholder:l,rejectionFlashKey:r,filePaths:i})]}),t[3]=i,t[4]=n,t[5]=r,t[6]=l,t[7]=u):u=t[7],u}function Ta(e){let t=(0,Z.c)(35),{patterns:n,sensors:r,onDragEnd:i,onEdit:a,onRemove:o,onAdd:c,savedFlash:l,rejectionFlashKey:u,filePaths:d}=e,{_:f}=s(),p;t[0]===n?p=t[1]:(p=n.map(Ea),t[0]=n,t[1]=p);let m=p,h;t[2]===f?h=t[3]:(h=f({id:`3zyg_A`}),t[2]=f,t[3]=h);let g;if(t[4]!==d||t[5]!==a||t[6]!==o||t[7]!==n||t[8]!==l){let e;t[10]!==d||t[11]!==a||t[12]!==o||t[13]!==l?(e=(e,t)=>{let n=Ia(e.text,t),r=l!==null&&l.key===n;return(0,$.jsx)(Da,{sortableId:Pa(t),patternIndex:t,pattern:e,onEdit:a,onRemove:o,flashActive:r,filePaths:d},Pa(t))},t[10]=d,t[11]=a,t[12]=o,t[13]=l,t[14]=e):e=t[14],g=n.map(e),t[4]=d,t[5]=a,t[6]=o,t[7]=n,t[8]=l,t[9]=g}else g=t[9];let _;t[15]!==h||t[16]!==g?(_=(0,$.jsx)(`ul`,{"aria-label":h,className:`divide-y rounded-md border`,"data-testid":`settings-okignore-list`,children:g}),t[15]=h,t[16]=g,t[17]=_):_=t[17];let v;t[18]!==m||t[19]!==_?(v=(0,$.jsx)(In,{items:m,strategy:Pn,children:_}),t[18]=m,t[19]=_,t[20]=v):v=t[20];let y;t[21]!==i||t[22]!==r||t[23]!==v?(y=(0,$.jsx)(Fn,{sensors:r,collisionDetection:An,onDragEnd:i,children:v}),t[21]=i,t[22]=r,t[23]=v,t[24]=y):y=t[24];let b;t[25]===f?b=t[26]:(b=f({id:`cZGNlb`}),t[25]=f,t[26]=b);let x;t[27]!==d||t[28]!==c||t[29]!==u||t[30]!==b?(x=(0,$.jsx)(ka,{onAdd:c,placeholder:b,rejectionFlashKey:u,filePaths:d}),t[27]=d,t[28]=c,t[29]=u,t[30]=b,t[31]=x):x=t[31];let S;return t[32]!==y||t[33]!==x?(S=(0,$.jsxs)(`div`,{className:`space-y-2`,children:[y,x]}),t[32]=y,t[33]=x,t[34]=S):S=t[34],S}function Ea(e,t){return Pa(t)}function Da(e){let t=(0,Z.c)(47),{sortableId:n,patternIndex:r,pattern:i,onEdit:a,onRemove:o,flashActive:c,filePaths:l}=e,{_:u}=s(),d;t[0]===n?d=t[1]:(d={id:n},t[0]=n,t[1]=d);let{attributes:f,listeners:p,setNodeRef:m,transform:h,transition:g,isDragging:_}=On(d),v=i.text,y;t[2]===h?y=t[3]:(y=Dn.Transform.toString(h),t[2]=h,t[3]=y);let b=_?.5:void 0,S=_?1:void 0,C;t[4]!==y||t[5]!==b||t[6]!==S||t[7]!==g?(C={transform:y,transition:g,opacity:b,zIndex:S},t[4]=y,t[5]=b,t[6]=S,t[7]=g,t[8]=C):C=t[8];let w=C,T;t[9]!==u||t[10]!==v?(T=u({id:`7_bFEL`,values:{patternText:v}}),t[9]=u,t[10]=v,t[11]=T):T=t[11];let E;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(rn,{className:`size-3.5`}),t[12]=E):E=t[12];let D;t[13]!==f||t[14]!==p||t[15]!==T?(D=(0,$.jsx)(x,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-testid":`settings-okignore-drag-handle`,"aria-label":T,...f,...p,className:`h-7 w-4 shrink-0 cursor-grab touch-none px-0 text-muted-foreground/40 hover:text-foreground focus-visible:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring active:cursor-grabbing`,children:E}),t[13]=f,t[14]=p,t[15]=T,t[16]=D):D=t[16];let O;t[17]!==a||t[18]!==r?(O=e=>a(r,e),t[17]=a,t[18]=r,t[19]=O):O=t[19];let k;t[20]!==l||t[21]!==i.text||t[22]!==r||t[23]!==O?(k=(0,$.jsx)(Oa,{patternIndex:r,initialText:i.text,onCommit:O,filePaths:l}),t[20]=l,t[21]=i.text,t[22]=r,t[23]=O,t[24]=k):k=t[24];let A;t[25]===c?A=t[26]:(A=(0,$.jsx)(Na,{visible:c}),t[25]=c,t[26]=A);let j;t[27]!==u||t[28]!==v?(j=u({id:`S9Vnum`,values:{patternText:v}}),t[27]=u,t[28]=v,t[29]=j):j=t[29];let M;t[30]!==o||t[31]!==r?(M=()=>o(r),t[30]=o,t[31]=r,t[32]=M):M=t[32];let N;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,$.jsx)(dn,{className:`size-3.5`}),t[33]=N):N=t[33];let P;t[34]!==j||t[35]!==M?(P=(0,$.jsx)(x,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-testid":`settings-okignore-remove`,"aria-label":j,onClick:M,className:`h-7 w-7 shrink-0 text-muted-foreground hover:text-destructive`,children:N}),t[34]=j,t[35]=M,t[36]=P):P=t[36];let F;t[37]!==k||t[38]!==A||t[39]!==P||t[40]!==D?(F=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[D,k,A,P]}),t[37]=k,t[38]=A,t[39]=P,t[40]=D,t[41]=F):F=t[41];let I;return t[42]!==r||t[43]!==m||t[44]!==w||t[45]!==F?(I=(0,$.jsx)(`li`,{ref:m,style:w,className:`flex flex-col gap-0.5 px-2 py-1.5`,"data-testid":`settings-okignore-row`,"data-pattern-index":r,children:F}),t[42]=r,t[43]=m,t[44]=w,t[45]=F,t[46]=I):I=t[46],I}function Oa(e){let t=(0,Z.c)(31),{patternIndex:n,initialText:r,onCommit:i,filePaths:a}=e,{_:o}=s(),[c,l]=(0,Q.useState)(r),u=(0,Q.useRef)(r),d=(0,Q.useRef)(!1),f,p;t[0]===r?(f=t[1],p=t[2]):(f=()=>{d.current||r!==u.current&&(l(r),u.current=r)},p=[r],t[0]=r,t[1]=f,t[2]=p),(0,Q.useEffect)(f,p);let m=Ra(c),g=za(c,a),_=n+1,v;t[3]!==c||t[4]!==i?(v=()=>{c!==u.current&&(u.current=c,i(c))},t[3]=c,t[4]=i,t[5]=v):v=t[5];let y=v,b,x;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(b=e=>l(e.target.value),x=()=>{d.current=!0},t[6]=b,t[7]=x):(b=t[6],x=t[7]);let S;t[8]===y?S=t[9]:(S=()=>{d.current=!1,y()},t[8]=y,t[9]=S);let C;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(C=e=>{e.key===`Enter`?(e.preventDefault(),e.currentTarget.blur()):e.key===`Escape`&&(e.preventDefault(),l(u.current),e.currentTarget.blur())},t[10]=C):C=t[10];let w;t[11]!==o||t[12]!==_?(w=o({id:`-YV1Uo`,values:{patternNumber:_}}),t[11]=o,t[12]=_,t[13]=w):w=t[13];let T=m.length>0?`border-amber-500/60 focus-visible:ring-amber-500/40`:``,E;t[14]===T?E=t[15]:(E=h(`h-7 flex-1 font-mono text-xs`,T),t[14]=T,t[15]=E);let D;t[16]!==c||t[17]!==E||t[18]!==S||t[19]!==w?(D=(0,$.jsx)(mn,{value:c,onChange:b,onFocus:x,onBlur:S,onKeyDown:C,"aria-label":w,className:E,"data-testid":`settings-okignore-row-input`}),t[16]=c,t[17]=E,t[18]=S,t[19]=w,t[20]=D):D=t[20];let O;t[21]===m?O=t[22]:(O=(0,$.jsx)(Aa,{warnings:m}),t[21]=m,t[22]=O);let k;t[23]!==D||t[24]!==O?(k=(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1`,children:[D,O]}),t[23]=D,t[24]=O,t[25]=k):k=t[25];let A;t[26]===g?A=t[27]:(A=(0,$.jsx)(Ba,{count:g}),t[26]=g,t[27]=A);let j;return t[28]!==k||t[29]!==A?(j=(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[k,A]}),t[28]=k,t[29]=A,t[30]=j):j=t[30],j}function ka(e){let t=(0,Z.c)(34),{onAdd:n,placeholder:r,rejectionFlashKey:i,filePaths:a}=e,{_:c}=s(),[l,u]=(0,Q.useState)(``),d=Ra(l),f=za(l,a),p=Ka(i),m;t[0]!==n||t[1]!==l?(m=()=>{let e=l.trim();e.length!==0&&(n(e),u(``))},t[0]=n,t[1]=l,t[2]=m):m=t[2];let g=m,_;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>u(e.target.value),t[3]=_):_=t[3];let v;t[4]===g?v=t[5]:(v=e=>{e.key===`Enter`&&(e.preventDefault(),g())},t[4]=g,t[5]=v);let y;t[6]===c?y=t[7]:(y=c({id:`p9sdCy`}),t[6]=c,t[7]=y);let b=p?`border-destructive ring-2 ring-destructive/30 focus-visible:ring-destructive/50`:d.length>0?`border-amber-500/60 focus-visible:ring-amber-500/40`:``,S;t[8]===b?S=t[9]:(S=h(`h-8 text-sm`,b),t[8]=b,t[9]=S);let C=p?`true`:void 0,w;t[10]!==l||t[11]!==r||t[12]!==v||t[13]!==y||t[14]!==S||t[15]!==C?(w=(0,$.jsx)(mn,{value:l,onChange:_,onKeyDown:v,placeholder:r,"aria-label":y,className:S,"data-testid":`settings-okignore-add-input`,"data-rejection-flashing":C}),t[10]=l,t[11]=r,t[12]=v,t[13]=y,t[14]=S,t[15]=C,t[16]=w):w=t[16];let T;t[17]===d?T=t[18]:(T=(0,$.jsx)(Aa,{warnings:d}),t[17]=d,t[18]=T);let E;t[19]===l?E=t[20]:(E=l.trim(),t[19]=l,t[20]=E);let D=E.length===0,O;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(o,{id:`BY-g4_`}),t[21]=O):O=t[21];let k;t[22]!==g||t[23]!==D?(k=(0,$.jsx)(x,{size:`sm`,onClick:g,disabled:D,"data-testid":`settings-okignore-add-button`,children:O}),t[22]=g,t[23]=D,t[24]=k):k=t[24];let A;t[25]!==k||t[26]!==w||t[27]!==T?(A=(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[w,T,k]}),t[25]=k,t[26]=w,t[27]=T,t[28]=A):A=t[28];let j;t[29]===f?j=t[30]:(j=(0,$.jsx)(Ba,{count:f}),t[29]=f,t[30]=j);let M;return t[31]!==A||t[32]!==j?(M=(0,$.jsxs)(`div`,{className:`flex flex-col gap-0.5`,"data-testid":`settings-okignore-add`,children:[A,j]}),t[31]=A,t[32]=j,t[33]=M):M=t[33],M}function Aa(e){let t=(0,Z.c)(31),{warnings:n}=e,{_:r}=s();if(n.length===0){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`span`,{"aria-hidden":`true`,className:`flex w-4 shrink-0 justify-center`,"data-testid":`settings-okignore-warning-indicator`,"data-warnings":`0`}),t[0]=e):e=t[0],e}let i,a,o,c,l,u,d;t[1]!==r||t[2]!==n?(o=n.map(Ma).join(` `),a=w,i=S,d=!0,c=`status`,l=`polite`,u=r({id:`NORKZU`,values:{summary:o}}),t[1]=r,t[2]=n,t[3]=i,t[4]=a,t[5]=o,t[6]=c,t[7]=l,t[8]=u,t[9]=d):(i=t[3],a=t[4],o=t[5],c=t[6],l=t[7],u=t[8],d=t[9]);let f=String(n.length),p;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(un,{"aria-hidden":`true`,className:`size-3.5`}),t[10]=p):p=t[10];let m;t[11]===o?m=t[12]:(m=(0,$.jsx)(`span`,{className:`sr-only`,children:o}),t[11]=o,t[12]=m);let h;t[13]!==c||t[14]!==l||t[15]!==u||t[16]!==f||t[17]!==m?(h=(0,$.jsxs)(`span`,{role:c,"aria-live":l,"aria-label":u,className:`flex w-4 shrink-0 cursor-help justify-center text-amber-500`,"data-testid":`settings-okignore-warning-indicator`,"data-warnings":f,children:[p,m]}),t[13]=c,t[14]=l,t[15]=u,t[16]=f,t[17]=m,t[18]=h):h=t[18];let g;t[19]!==i||t[20]!==d||t[21]!==h?(g=(0,$.jsx)(i,{asChild:d,children:h}),t[19]=i,t[20]=d,t[21]=h,t[22]=g):g=t[22];let _;t[23]===n?_=t[24]:(_=n.map(ja),t[23]=n,t[24]=_);let v;t[25]===_?v=t[26]:(v=(0,$.jsx)(C,{side:`top`,className:`max-w-xs`,children:(0,$.jsx)(`ul`,{className:`list-disc space-y-1 pl-4`,children:_})}),t[25]=_,t[26]=v);let y;return t[27]!==a||t[28]!==v||t[29]!==g?(y=(0,$.jsxs)(a,{children:[g,v]}),t[27]=a,t[28]=v,t[29]=g,t[30]=y):y=t[30],y}function ja(e){return(0,$.jsx)(`li`,{children:e.message},e.code)}function Ma(e){return e.message}function Na(e){let t=(0,Z.c)(4),{visible:n}=e,r;t[0]===n?r=t[1]:(r=n?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Dt,{"aria-hidden":`true`,className:`size-3.5`}),(0,$.jsx)(`span`,{className:`sr-only`,children:(0,$.jsx)(o,{id:`idD8Ev`})})]}):null,t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,$.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`flex w-4 shrink-0 justify-center text-emerald-600`,"data-testid":`settings-okignore-saved-indicator`,children:r}),t[2]=r,t[3]=i),i}function Pa(e){return`okignore-pattern-${e}`}function Fa(e){let t=e.match(/^okignore-pattern-(\d+)$/);if(!t)return-1;let n=Number.parseInt(t[1]??``,10);return Number.isNaN(n)?-1:n}function Ia(e,t){return`${t}::${e}`}function La(e){return!Ae(e)||e.code!==`OKIGNORE_INVALID`?null:{detail:e.detail,lineNumber:e.lineNumber}}function Ra(e){let t=(0,Z.c)(5),n;t[0]===e?n=t[1]:(n=()=>e.length===0?[]:ca(e),t[0]=e,t[1]=n);let[r,i]=(0,Q.useState)(n),a,o;return t[2]===e?(a=t[3],o=t[4]):(a=()=>{if(e.length===0){i([]);return}let t=setTimeout(()=>{i(ca(e))},fa);return()=>clearTimeout(t)},o=[e],t[2]=e,t[3]=a,t[4]=o),(0,Q.useEffect)(a,o),r}function za(e,t){let n=(0,Z.c)(9),r;n[0]===e?r=n[1]:(r=e.trim(),n[0]=e,n[1]=r);let i=r,a;n[2]!==t||n[3]!==i?(a=()=>i.length===0?null:oa(i,t),n[2]=t,n[3]=i,n[4]=a):a=n[4];let[o,s]=(0,Q.useState)(a),c,l;return n[5]!==t||n[6]!==i?(c=()=>{if(i.length===0){s(null);return}let e=setTimeout(()=>{s(oa(i,t))},pa);return()=>clearTimeout(e)},l=[i,t],n[5]=t,n[6]=i,n[7]=c,n[8]=l):(c=n[7],l=n[8]),(0,Q.useEffect)(c,l),o}function Ba(e){let t=(0,Z.c)(12),{count:n}=e;if(n===null){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`span`,{"aria-hidden":`true`,className:`block h-3.5`,"data-testid":`settings-okignore-preview`,"data-preview-state":`hidden`}),t[0]=e):e=t[0],e}let r=n===0,i=String(n),a=r?`text-muted-foreground/70`:`text-muted-foreground`,s;t[1]===a?s=t[2]:(s=h(`block text-xs`,a),t[1]=a,t[2]=s);let c;t[3]===n?c=t[4]:(c=(0,$.jsx)(o,{id:`-3Qbv7`,values:{count:n}}),t[3]=n,t[4]=c);let l;t[5]===r?l=t[6]:(l=r?(0,$.jsx)(`span`,{className:`ml-1 text-muted-foreground/60`,children:(0,$.jsx)(o,{id:`5kWklo`})}):null,t[5]=r,t[6]=l);let u;return t[7]!==i||t[8]!==s||t[9]!==c||t[10]!==l?(u=(0,$.jsxs)(`span`,{role:`status`,"aria-live":`polite`,"data-testid":`settings-okignore-preview`,"data-preview-state":`visible`,"data-preview-count":i,className:s,children:[c,l]}),t[7]=i,t[8]=s,t[9]=c,t[10]=l,t[11]=u):u=t[11],u}function Va(e,t,n){let r=[];for(let n of e){let e=t.get(n)?.docExt??`.md`;r.push(n+e)}for(let e of n)r.push(e);return r}function Ha(){try{return globalThis.localStorage?.getItem(_a)===`true`}catch{return!1}}function Ua(e){try{globalThis.localStorage?.setItem(_a,e?`true`:`false`)}catch(e){console.debug(`[OkignoreSection] localStorage unavailable; advanced toggle will not persist:`,e)}}function Wa(){let e=(0,Z.c)(3),[t,n]=(0,Q.useState)(Ga),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=e=>{n(e),Ua(e)},e[0]=r):r=e[0];let i=r,a;return e[1]===t?a=e[2]:(a=[t,i],e[1]=t,e[2]=a),a}function Ga(){return Ha()}function Ka(e){let t=(0,Z.c)(3),[n,r]=(0,Q.useState)(!1),i,a;return t[0]===e?(i=t[1],a=t[2]):(i=()=>{if(e===null)return;r(!0);let t=setTimeout(()=>r(!1),ha);return()=>clearTimeout(t)},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,Q.useEffect)(i,a),n}function qa(e){return`editor:${e}`}var Ja=`skill`;function Ya(e){let t=(0,Z.c)(11),{testId:n,children:r}=e,{_:i}=s(),a;t[0]===i?a=t[1]:(a=i({id:`2B6eYX`}),t[0]=i,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsx)(an,{className:`size-3.5`}),t[2]=o):o=t[2];let c;t[3]!==a||t[4]!==n?(c=(0,$.jsx)(S,{asChild:!0,children:(0,$.jsx)(x,{variant:`ghost`,size:`icon`,className:`mt-1.5 mr-1.5 h-6 w-6 shrink-0 text-muted-foreground opacity-60 hover:opacity-100`,"aria-label":a,"data-testid":n,children:o})}),t[3]=a,t[4]=n,t[5]=c):c=t[5];let l;t[6]===r?l=t[7]:(l=(0,$.jsx)(C,{side:`left`,className:`max-w-sm text-left`,children:(0,$.jsx)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:r})}),t[6]=r,t[7]=l);let u;return t[8]!==c||t[9]!==l?(u=(0,$.jsxs)(w,{children:[c,l]}),t[8]=c,t[9]=l,t[10]=u):u=t[10],u}function Xa(e){let t=(0,Z.c)(5),{followUp:n,testId:r}=e;if(n===`none`)return null;let i;t[0]===n?i=t[1]:(i=n===`approve-once`?(0,$.jsx)(o,{id:`HTW0Zw`,components:{0:(0,$.jsx)(`code`,{className:`inline-code`})}}):n===`enable-manually`?(0,$.jsx)(o,{id:`NNJsn7`}):(0,$.jsx)(o,{id:`n8DwqQ`}),t[0]=n,t[1]=i);let a;return t[2]!==i||t[3]!==r?(a=(0,$.jsx)(`span`,{role:`status`,className:`text-xs text-amber-600 dark:text-amber-400`,"data-testid":r,children:i}),t[2]=i,t[3]=r,t[4]=a):a=t[4],a}function Za(){let e=(0,Z.c)(29),{_:t}=s(),n=typeof window<`u`?window.okDesktop??null:null,[r,i]=(0,Q.useState)(null),[a,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(null),d,f;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{if(!n)return;let e=!1;return n.projectIntegrations.status().then(t=>{e||i(t)}).catch(()=>{e||c(!0)}),()=>{e=!0}},f=[n],e[0]=d,e[1]=f):(d=e[0],f=e[1]),(0,Q.useEffect)(d,f);let p;e[2]===t?p=e[3]:(p=async function(e,r){if(n){u(e.kind===`editor`?qa(e.id):Ja);try{let t=await n.projectIntegrations.setComponent({component:e,enabled:r});i(t.status),t.ok||X.error(t.error)}catch(e){let n=e;X.error(t({id:`gfdqcY`,values:{0:n instanceof Error?n.message:String(n)}}))}u(null)}},e[2]=t,e[3]=p);let m=p,h;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(`h3`,{id:`settings-project-ai-tools-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`crqzW5`})}),e[4]=h):h=e[4];let g;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[h,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`ZYtq3m`})})]}),e[5]=g):g=e[5];let _=g;if(!n||a){let t;return e[6]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-project-ai-tools-title`,className:`space-y-4`,children:[_,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`project-ai-tools-unavailable`,children:(0,$.jsx)(o,{id:`g4WlQK`})})]}),e[6]=t):t=e[6],t}if(r===null){let t;return e[7]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-project-ai-tools-title`,className:`space-y-4`,children:[_,(0,$.jsxs)(`div`,{className:`space-y-2`,"data-testid":`project-ai-tools-loading`,children:[(0,$.jsx)(xn,{className:`h-10 w-full`}),(0,$.jsx)(xn,{className:`h-10 w-full`})]})]}),e[7]=t):t=e[7],t}if(!r.hasProject){let t;return e[8]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-project-ai-tools-title`,className:`space-y-4`,children:[_,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`project-ai-tools-no-project`,children:(0,$.jsx)(o,{id:`yaPGPa`})})]}),e[8]=t):t=e[8],t}let v=l!==null||!r.available,y;e[9]===r.available?y=e[10]:(y=!r.available&&(0,$.jsx)(`p`,{className:`text-sm text-amber-600 dark:text-amber-400`,"data-testid":`project-ai-tools-read-only`,children:(0,$.jsx)(o,{id:`_NX6gG`})}),e[9]=r.available,e[10]=y);let b;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,$.jsx)(o,{id:`psfGPX`})}),e[11]=b):b=e[11];let x;if(e[12]!==m||e[13]!==v||e[14]!==r.editors){let t;e[16]!==m||e[17]!==v?(t=e=>(0,$.jsx)($a,{editor:e,busy:v,onToggle:t=>void m({kind:`editor`,id:e.id},t)},e.id),e[16]=m,e[17]=v,e[18]=t):t=e[18],x=r.editors.map(t),e[12]=m,e[13]=v,e[14]=r.editors,e[15]=x}else x=e[15];let S;e[19]===x?S=e[20]:(S=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[b,(0,$.jsx)(`ul`,{className:`rounded-md border border-border bg-card/50 divide-y divide-border overflow-hidden`,children:x})]}),e[19]=x,e[20]=S);let C;e[21]!==m||e[22]!==v||e[23]!==r.skill?(C=r.skill!==null&&(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,$.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,$.jsx)(o,{id:`LtiJ5c`})}),(0,$.jsx)(`ul`,{className:`rounded-md border border-border bg-card/50 overflow-hidden`,children:(0,$.jsxs)(`li`,{className:`flex items-start hover:bg-accent`,children:[(0,$.jsxs)(V,{htmlFor:`project-ai-tools-skill`,className:`flex flex-1 cursor-pointer items-start gap-2.5 px-3 py-2.5 font-normal`,children:[(0,$.jsx)(I,{id:`project-ai-tools-skill`,checked:r.skill.installed,disabled:v,onCheckedChange:()=>void m({kind:`skill`},!r.skill?.installed),className:`mt-0.5`,"data-testid":`project-ai-tools-skill-checkbox`}),(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,$.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:(0,$.jsx)(`code`,{children:`open-knowledge`})}),(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:(0,$.jsx)(o,{id:`khCa4M`})})]})]}),(0,$.jsxs)(Ya,{testId:`project-ai-tools-skill-info`,children:[(0,$.jsx)(`p`,{className:`opacity-70`,children:(0,$.jsx)(o,{id:`HSh8u_`})}),r.skill.paths.map(Qa)]})]})})]}),e[21]=m,e[22]=v,e[23]=r.skill,e[24]=C):C=e[24];let w;return e[25]!==y||e[26]!==S||e[27]!==C?(w=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-project-ai-tools-title`,className:`space-y-4`,children:[_,y,S,C]}),e[25]=y,e[26]=S,e[27]=C,e[28]=w):w=e[28],w}function Qa(e){return(0,$.jsx)(`p`,{children:(0,$.jsx)(`code`,{className:`break-all`,children:e})},e)}function $a(e){let t=(0,Z.c)(45),{editor:n,busy:r,onToggle:i}=e,{_:a}=s(),c=n.state===`installed`||n.state===`foreign`,l=r||n.state===`unmanageable`,u;t[0]!==a||t[1]!==n.state?(u=n.state===`installed`?a({id:`eQkgKV`}):n.state===`foreign`?a({id:`AczYxH`}):n.state===`unmanageable`?a({id:`CXTwen`}):null,t[0]=a,t[1]=n.state,t[2]=u):u=t[2];let d=u,f=n.state===`foreign`||n.state===`unmanageable`?`text-xs text-amber-600 dark:text-amber-400`:`text-xs text-muted-foreground`,p=l?`flex items-start`:`flex items-start hover:bg-accent`,m=`project-ai-tools-editor-${n.id}`,h=l?`flex flex-1 items-start gap-2.5 px-3 py-2.5 font-normal`:`flex flex-1 cursor-pointer items-start gap-2.5 px-3 py-2.5 font-normal`,g=`project-ai-tools-editor-${n.id}`,_;t[3]!==c||t[4]!==i?(_=()=>i(!c),t[3]=c,t[4]=i,t[5]=_):_=t[5];let v=`project-ai-tools-editor-checkbox-${n.id}`,y;t[6]!==c||t[7]!==l||t[8]!==g||t[9]!==_||t[10]!==v?(y=(0,$.jsx)(I,{id:g,checked:c,disabled:l,onCheckedChange:_,className:`mt-0.5`,"data-testid":v}),t[6]=c,t[7]=l,t[8]=g,t[9]=_,t[10]=v,t[11]=y):y=t[11];let b;t[12]===n.label?b=t[13]:(b=(0,$.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:n.label}),t[12]=n.label,t[13]=b);let x;t[14]!==n.id||t[15]!==f||t[16]!==d?(x=d!==null&&(0,$.jsx)(`span`,{className:f,"data-testid":`project-ai-tools-editor-status-${n.id}`,children:d}),t[14]=n.id,t[15]=f,t[16]=d,t[17]=x):x=t[17];let S;t[18]!==c||t[19]!==n.followUp||t[20]!==n.id?(S=c&&(0,$.jsx)(Xa,{followUp:n.followUp,testId:`project-ai-tools-editor-followup-${n.id}`}),t[18]=c,t[19]=n.followUp,t[20]=n.id,t[21]=S):S=t[21];let C;t[22]!==x||t[23]!==S||t[24]!==b?(C=(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[b,x,S]}),t[22]=x,t[23]=S,t[24]=b,t[25]=C):C=t[25];let w;t[26]!==C||t[27]!==m||t[28]!==h||t[29]!==y?(w=(0,$.jsxs)(V,{htmlFor:m,className:h,children:[y,C]}),t[26]=C,t[27]=m,t[28]=h,t[29]=y,t[30]=w):w=t[30];let T=`project-ai-tools-editor-info-${n.id}`,E;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(`p`,{className:`opacity-70`,children:(0,$.jsx)(o,{id:`J2eKUI`})}),t[31]=E):E=t[31];let D;t[32]===n.configPath?D=t[33]:(D=(0,$.jsx)(`p`,{children:(0,$.jsx)(`code`,{className:`break-all`,children:n.configPath})}),t[32]=n.configPath,t[33]=D);let O;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(`p`,{className:`pt-1 opacity-70`,children:(0,$.jsx)(o,{id:`VIwCaD`})}),t[34]=O):O=t[34];let k;t[35]===n.entryLocator?k=t[36]:(k=(0,$.jsx)(`p`,{children:(0,$.jsx)(`code`,{className:`break-all`,children:n.entryLocator})}),t[35]=n.entryLocator,t[36]=k);let A;t[37]!==T||t[38]!==D||t[39]!==k?(A=(0,$.jsxs)(Ya,{testId:T,children:[E,D,O,k]}),t[37]=T,t[38]=D,t[39]=k,t[40]=A):A=t[40];let j;return t[41]!==w||t[42]!==A||t[43]!==p?(j=(0,$.jsxs)(`li`,{className:p,children:[w,A]}),t[41]=w,t[42]=A,t[43]=p,t[44]=j):j=t[44],j}function eo(e){let t=(0,Z.c)(68),{config:n}=e,{state:r,refresh:i}=Bt(``),[a,s]=(0,Q.useState)(null),[c,l]=(0,Q.useState)(!1),u=$e(),d;t[0]===u?d=t[1]:(d=function(e,t){Rn(hn(e,t)),u.close()},t[0]=u,t[1]=d);let f=d,p,m,h,g,_,v,y,b,x;if(t[2]!==n||t[3]!==c||t[4]!==f||t[5]!==i||t[6]!==r){x=Symbol.for(`react.early_return_sentinel`);bb0:{let e=r.status===`ready`?(r.data.folder.templates_available??[]).filter(e=>e.scope===n.scope).sort(no):[];if(r.status===`error`){let{loadErrorTitle:e}=n,{message:a}=r,s=`settings-${n.testIdPrefix}-section`,u;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>l(!0),t[16]=u):u=t[16];let d;t[17]===n?d=t[18]:(d=(0,$.jsx)(ro,{config:n,onNewClick:u}),t[17]=n,t[18]=d);let p;t[19]!==e||t[20]!==a?(p=(0,$.jsx)(`div`,{className:`rounded-lg border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive`,role:`alert`,children:(0,$.jsx)(o,{id:`uH_S-u`,values:{loadErrorTitle:e,message:a}})}),t[19]=e,t[20]=a,t[21]=p):p=t[21];let m;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(m=new Set,t[22]=m):m=t[22];let h;t[23]!==f||t[24]!==i?(h=e=>{i(),f(``,e)},t[23]=f,t[24]=i,t[25]=h):h=t[25];let g;t[26]!==c||t[27]!==h?(g=(0,$.jsx)(Lt,{folderPath:``,existingNames:m,open:c,onOpenChange:l,onCreated:h}),t[26]=c,t[27]=h,t[28]=g):g=t[28];let _;t[29]!==n.settingsId||t[30]!==s||t[31]!==d||t[32]!==p||t[33]!==g?(_=(0,$.jsxs)(`section`,{className:`space-y-3`,"aria-labelledby":n.settingsId,"data-testid":s,children:[d,p,g]}),t[29]=n.settingsId,t[30]=s,t[31]=d,t[32]=p,t[33]=g,t[34]=_):_=t[34],x=_;break bb0}if(r.status===`idle`||r.status===`loading`){let e=`settings-${n.testIdPrefix}-section`,r;t[35]===n?r=t[36]:(r=(0,$.jsx)(ro,{config:n}),t[35]=n,t[36]=r);let i;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsxs)(`div`,{className:`rounded-lg border bg-card p-3 space-y-2`,children:[(0,$.jsx)(xn,{className:`h-12 w-full`}),(0,$.jsx)(xn,{className:`h-12 w-full`})]}),t[37]=i):i=t[37];let a;t[38]!==n.settingsId||t[39]!==e||t[40]!==r?(a=(0,$.jsxs)(`section`,{className:`space-y-3`,"aria-labelledby":n.settingsId,"data-testid":e,children:[r,i]}),t[38]=n.settingsId,t[39]=e,t[40]=r,t[41]=a):a=t[41],x=a;break bb0}g=`space-y-3`,_=n.settingsId,v=`settings-${n.testIdPrefix}-section`;let a;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>l(!0),t[42]=a):a=t[42],t[43]===n?y=t[44]:(y=(0,$.jsx)(ro,{config:n,onNewClick:a}),t[43]=n,t[44]=y);let u=e.length===0?(0,$.jsx)(`p`,{className:`px-3 py-4 text-sm text-muted-foreground`,"data-testid":`settings-${n.testIdPrefix}-empty`,children:n.emptyMessage}):(0,$.jsx)(`ul`,{className:`space-y-1 p-2`,"data-testid":`settings-${n.testIdPrefix}-list`,children:e.map(e=>(0,$.jsx)(qt,{template:e,onEdit:()=>f(e.source_folder,e.name),onDelete:()=>s(e),badge:(0,$.jsx)(gn,{variant:n.badge.variant,className:`text-2xs`,children:n.badge.label})},e.name))});t[45]===u?b=t[46]:(b=(0,$.jsx)(`div`,{className:`rounded-lg border bg-card`,children:u}),t[45]=u,t[46]=b),p=Lt,m=``,h=new Set(e.map(to))}t[2]=n,t[3]=c,t[4]=f,t[5]=i,t[6]=r,t[7]=p,t[8]=m,t[9]=h,t[10]=g,t[11]=_,t[12]=v,t[13]=y,t[14]=b,t[15]=x}else p=t[7],m=t[8],h=t[9],g=t[10],_=t[11],v=t[12],y=t[13],b=t[14],x=t[15];if(x!==Symbol.for(`react.early_return_sentinel`))return x;let S;t[47]!==f||t[48]!==i?(S=e=>{i(),f(``,e)},t[47]=f,t[48]=i,t[49]=S):S=t[49];let C;t[50]!==p||t[51]!==c||t[52]!==S||t[53]!==m||t[54]!==h?(C=(0,$.jsx)(p,{folderPath:m,existingNames:h,open:c,onOpenChange:l,onCreated:S}),t[50]=p,t[51]=c,t[52]=S,t[53]=m,t[54]=h,t[55]=C):C=t[55];let w;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>{e||s(null)},t[56]=w):w=t[56];let T;t[57]!==a||t[58]!==i?(T=(0,$.jsx)(It,{template:a,onOpenChange:w,onDeleted:i}),t[57]=a,t[58]=i,t[59]=T):T=t[59];let E;return t[60]!==C||t[61]!==T||t[62]!==g||t[63]!==_||t[64]!==v||t[65]!==y||t[66]!==b?(E=(0,$.jsxs)(`section`,{className:g,"aria-labelledby":_,"data-testid":v,children:[y,b,C,T]}),t[60]=C,t[61]=T,t[62]=g,t[63]=_,t[64]=v,t[65]=y,t[66]=b,t[67]=E):E=t[67],E}function to(e){return e.name}function no(e,t){return(e.title??e.name).toLowerCase().localeCompare((t.title??t.name).toLowerCase())}function ro(e){let t=(0,Z.c)(14),{config:n,onNewClick:r}=e,i;t[0]!==n.settingsId||t[1]!==n.title?(i=(0,$.jsx)(`h3`,{id:n.settingsId,className:`text-base font-semibold`,children:n.title}),t[0]=n.settingsId,t[1]=n.title,t[2]=i):i=t[2];let a;t[3]===n.description?a=t[4]:(a=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n.description}),t[3]=n.description,t[4]=a);let s;t[5]!==i||t[6]!==a?(s=(0,$.jsxs)(`div`,{children:[i,a]}),t[5]=i,t[6]=a,t[7]=s):s=t[7];let c;t[8]!==n.testIdPrefix||t[9]!==r?(c=r?(0,$.jsxs)(x,{variant:`outline`,size:`sm`,className:`font-mono uppercase shrink-0`,onClick:r,"data-testid":`settings-${n.testIdPrefix}-new-button`,children:[(0,$.jsx)(f,{className:`size-3.5`,"aria-hidden":!0}),(0,$.jsx)(o,{id:`G1Gw0v`})]}):null,t[8]=n.testIdPrefix,t[9]=r,t[10]=c):c=t[10];let l;return t[11]!==s||t[12]!==c?(l=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[s,c]}),t[11]=s,t[12]=c,t[13]=l):l=t[13],l}function io(){let e=(0,Z.c)(16),{_:t}=s(),n;e[0]===t?n=e[1]:(n=t({id:`hBMK4W`}),e[0]=t,e[1]=n);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(o,{id:`nft48x`,components:{0:(0,$.jsx)(`code`,{className:`font-mono`})}}),e[2]=r):r=e[2];let i;e[3]===t?i=e[4]:(i=t({id:`6Pxqwv`}),e[3]=t,e[4]=i);let a;e[5]===t?a=e[6]:(a=t({id:`BD0XSC`}),e[5]=t,e[6]=a);let c;e[7]===t?c=e[8]:(c=t({id:`ysxgu8`}),e[7]=t,e[8]=c);let l;e[9]===c?l=e[10]:(l={label:c,variant:`gray`},e[9]=c,e[10]=l);let u;return e[11]!==n||e[12]!==i||e[13]!==a||e[14]!==l?(u=(0,$.jsx)(eo,{config:{scope:`local`,title:n,description:r,emptyMessage:i,loadErrorTitle:a,badge:l,settingsId:`settings-project-templates-title`,testIdPrefix:`project-templates`}}),e[11]=n,e[12]=i,e[13]=a,e[14]=l,e[15]=u):u=e[15],u}async function ao(e){try{let t=Ve.safeParse(await e.json());if(t.success)return t.data.title}catch{}}async function oo(e,t){try{let n=await fetch(e,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t)});return n.ok?{ok:!0}:{ok:!1,error:await ao(n)}}catch{return{ok:!1}}}function so(){return{setKey:e=>oo(`/api/local-op/embeddings/set-key`,{key:e}),clearKey:()=>oo(`/api/local-op/embeddings/clear-key`,{}),async testConnection(){try{let e=await fetch(`/api/local-op/embeddings/test`,{method:`POST`,headers:{"content-type":`application/json`},body:`{}`});if(!e.ok)return null;let t=be.safeParse(await e.json());return t.success?t.data:null}catch{return null}}}}var co=[2500,5e3];function lo(e){let t=(0,Z.c)(160),{transport:n}=e,{_:r}=s(),{projectLocalConfig:i,projectLocalSynced:a,projectLocalBinding:c}=mt(),{status:l,refresh:u}=nn(),d;t[0]===n?d=t[1]:(d=n??so(),t[0]=n,t[1]=d);let f=d,[p,m]=(0,Q.useState)(!1),[h,g]=(0,Q.useState)(null),[_,v]=(0,Q.useState)(!1),y;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(y=[],t[2]=y):y=t[2];let b=(0,Q.useRef)(y),S,C;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>()=>{for(let e of b.current)clearTimeout(e)},C=[],t[3]=S,t[4]=C):(S=t[3],C=t[4]),(0,Q.useEffect)(S,C);let w=i?.search?.semantic?.baseUrl??`https://api.openai.com/v1`,O=i?.search?.semantic?.model??`text-embedding-3-small`,[k,A]=(0,Q.useState)(w),[j,M]=(0,Q.useState)(O),[N,P]=(0,Q.useState)(null),[F,I]=(0,Q.useState)(null),[L,R]=(0,Q.useState)(!1),[z,B]=(0,Q.useState)(null),V;t[5]!==w||t[6]!==O?(V={baseUrl:w,model:O},t[5]=w,t[6]=O,t[7]=V):V=t[7];let[H,ee]=(0,Q.useState)(V);(w!==H.baseUrl||O!==H.model)&&(ee({baseUrl:w,model:O}),A(w),M(O),v(!1),g(null),B(null));let U=i?.search?.semantic?.enabled??!1,te=a&&c!==null,ne=F??(w!==`https://api.openai.com/v1`||O!==`text-embedding-3-small`),re;t[8]===u?re=t[9]:(re=function(){for(let e of b.current)clearTimeout(e);b.current=co.map(e=>setTimeout(u,e))},t[8]=u,t[9]=re);let ie=re,ae;t[10]!==r||t[11]!==c||t[12]!==u||t[13]!==ie?(ae=function(e){if(c===null)return X.error(r({id:`YW7Q86`})),!1;let t=c.patch({search:{semantic:{enabled:e}}});if(!t.ok){let n=He(t.error);return X.error(r(e?{id:`LYufDw`,values:{detail:n}}:{id:`5mksg0`,values:{detail:n}})),!1}return u(),ie(),!0},t[10]=r,t[11]=c,t[12]=u,t[13]=ie,t[14]=ae):ae=t[14];let G=ae,K;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(K=function(e){return e.trim()||`https://api.openai.com/v1`},t[15]=K):K=t[15];let oe=K,q;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(q=function(e){return e.trim()||`text-embedding-3-small`},t[16]=q):q=t[16];let J=q,Y;t[17]!==r||t[18]!==c||t[19]!==u||t[20]!==ie?(Y=function(e){if(c===null)return X.error(r({id:`YW7Q86`})),!1;let t=c.patch({search:{semantic:{baseUrl:e.baseUrl,model:e.model}}});if(!t.ok){let e=He(t.error);return X.error(r({id:`aQD_86`,values:{detail:e}})),!1}return B(null),u(),ie(),!0},t[17]=r,t[18]=c,t[19]=u,t[20]=ie,t[21]=Y):Y=t[21];let se=Y,ce;t[22]!==w||t[23]!==O?(ce=function(e){e.baseUrl===w&&e.model===O||P(e)},t[22]=w,t[23]=O,t[24]=ce):ce=t[24];let le=ce,ue;t[25]!==N||t[26]!==se?(ue=function(){N&&se(N)&&P(null)},t[25]=N,t[26]=se,t[27]=ue):ue=t[27];let de=ue,fe;t[28]!==w||t[29]!==O?(fe=function(){P(null),A(w),M(O),g(null)},t[28]=w,t[29]=O,t[30]=fe):fe=t[30];let pe=fe,me;t[31]!==f||t[32]!==L?(me=async function(){if(L)return;R(!0),B(null);let e;try{e=await f.testConnection()}catch{e=null}R(!1),B({response:e})},t[31]=f,t[32]=L,t[33]=me):me=t[33];let he=me,ge;t[34]===G?ge=t[35]:(ge=function(e){if(e){m(!0);return}G(!1)},t[34]=G,t[35]=ge);let _e=ge,ve;t[36]===G?ve=t[37]:(ve=function(){G(!0)&&m(!1)},t[36]=G,t[37]=ve);let ye=ve,be;t[38]===r?be=t[39]:(be=function(e){let t=e.trim();if(!t)return null;let n=Me(t);return n===null?null:r(n===`invalid-url`?{id:`2j1kfc`}:{id:`JM_aq-`})},t[38]=r,t[39]=be);let xe=be,Se;t[40]!==xe||t[41]!==_?(Se=function(e){A(e),_&&g(xe(e))},t[40]=xe,t[41]=_,t[42]=Se):Se=t[42];let Ce=Se,we;t[43]!==k||t[44]!==xe||t[45]!==j||t[46]!==le?(we=function(){v(!0);let e=xe(k);g(e),e===null&&le({baseUrl:oe(k),model:J(j)})},t[43]=k,t[44]=xe,t[45]=j,t[46]=le,t[47]=we):we=t[47];let Te=we,Ee=l?.enabled??!1,De=l?.keyPresent??!1,Oe=l?.keyNotRequired??!1,ke=l?.keyHint??null,Ae=l?.keySource??null,je=l?.ready??!1,Ne=l?.capable??!1,Pe=l?.embedded??0,Fe=l?.total??0,Ie;t[48]===w?Ie=t[49]:(Ie=_o(w)??w,t[48]=w,t[49]=Ie);let Le=Ie,Re;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(Re=(0,$.jsx)(`h3`,{id:`settings-search-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`3y6XTb`})}),t[50]=Re):Re=t[50];let Ve;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[Re,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`dUQ7_J`})})]}),t[51]=Ve):Ve=t[51];let Ue;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(Ue=(0,$.jsx)(`label`,{htmlFor:`settings-search-semantic-toggle`,className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`3y6XTb`})}),t[52]=Ue):Ue=t[52];let We;t[53]===U?We=t[54]:(We=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[Ue,(0,$.jsx)(`p`,{id:`settings-search-semantic-toggle-description`,className:`text-muted-foreground text-1sm`,"data-testid":`settings-search-body`,children:U?(0,$.jsx)(o,{id:`stlgky`}):(0,$.jsx)(o,{id:`kdzzOK`})})]}),t[53]=U,t[54]=We);let Ge=!te,Ke;t[55]!==r||t[56]!==U?(Ke=r(U?{id:`fNr-MX`}:{id:`Aif3E7`}),t[55]=r,t[56]=U,t[57]=Ke):Ke=t[57];let qe;t[58]!==U||t[59]!==_e||t[60]!==Ge||t[61]!==Ke?(qe=(0,$.jsx)(W,{id:`settings-search-semantic-toggle`,"aria-describedby":`settings-search-semantic-toggle-description`,checked:U,disabled:Ge,onCheckedChange:_e,"aria-label":Ke,"data-testid":`settings-search-semantic-toggle`}),t[58]=U,t[59]=_e,t[60]=Ge,t[61]=Ke,t[62]=qe):qe=t[62];let Je;t[63]!==We||t[64]!==qe?(Je=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[We,qe]}),t[63]=We,t[64]=qe,t[65]=Je):Je=t[65];let Ye;t[66]!==Ne||t[67]!==Pe||t[68]!==U||t[69]!==Oe||t[70]!==De||t[71]!==je||t[72]!==Ee||t[73]!==l||t[74]!==Fe?(Ye=U?(0,$.jsx)(fo,{loaded:l!==null,serverEnabled:Ee,keyPresent:De,keyNotRequired:Oe,ready:je,capable:Ne,embedded:Pe,total:Fe}):null,t[66]=Ne,t[67]=Pe,t[68]=U,t[69]=Oe,t[70]=De,t[71]=je,t[72]=Ee,t[73]=l,t[74]=Fe,t[75]=Ye):Ye=t[75];let Xe;t[76]!==Je||t[77]!==Ye?(Xe=(0,$.jsxs)(`div`,{className:`rounded-md border p-3`,children:[Je,Ye]}),t[76]=Je,t[77]=Ye,t[78]=Xe):Xe=t[78];let Ze=l!==null,Qe;t[79]!==Le||t[80]!==ke||t[81]!==Oe||t[82]!==De||t[83]!==Ae||t[84]!==u||t[85]!==f||t[86]!==Ze?(Qe=(0,$.jsx)(uo,{transport:f,refresh:u,endpointHost:Le,keyPresent:De,keyHint:ke,keySource:Ae,keyNotRequired:Oe,loaded:Ze}),t[79]=Le,t[80]=ke,t[81]=Oe,t[82]=De,t[83]=Ae,t[84]=u,t[85]=f,t[86]=Ze,t[87]=Qe):Qe=t[87];let $e;t[88]===Symbol.for(`react.memo_cache_sentinel`)?($e=(0,$.jsxs)(E,{className:`group flex w-full items-center justify-between gap-2 px-3 py-2 text-sm font-medium hover:bg-muted/50`,"data-testid":`settings-search-custom-endpoint-trigger`,children:[(0,$.jsx)(o,{id:`Hp4rRh`}),(0,$.jsx)(Ot,{className:`size-4 transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`,"aria-hidden":!0})]}),t[88]=$e):$e=t[88];let et;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(et=(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,$.jsx)(o,{id:`kRTXGw`})}),t[89]=et):et=t[89];let tt;t[90]===Symbol.for(`react.memo_cache_sentinel`)?(tt=(0,$.jsx)(`label`,{htmlFor:`settings-search-base-url`,className:`block text-sm font-medium`,children:(0,$.jsx)(o,{id:`FCKppt`})}),t[90]=tt):tt=t[90];let nt;t[91]===Ce?nt=t[92]:(nt=e=>Ce(e.currentTarget.value),t[91]=Ce,t[92]=nt);let rt;t[93]===Te?rt=t[94]:(rt=e=>{e.key===`Enter`&&(e.preventDefault(),Te())},t[93]=Te,t[94]=rt);let it=!te,at=h!==null,ot;t[95]!==k||t[96]!==Te||t[97]!==nt||t[98]!==rt||t[99]!==it||t[100]!==at?(ot=(0,$.jsx)(mn,{id:`settings-search-base-url`,value:k,onChange:nt,onBlur:Te,onKeyDown:rt,placeholder:ze,disabled:it,spellCheck:!1,autoComplete:`off`,"aria-invalid":at,"aria-describedby":`settings-search-base-url-message`,"data-testid":`settings-search-base-url`,className:`h-8 font-mono text-sm`}),t[95]=k,t[96]=Te,t[97]=nt,t[98]=rt,t[99]=it,t[100]=at,t[101]=ot):ot=t[101];let st=h?`text-1sm text-destructive`:`text-muted-foreground text-1sm`,ct=h?`settings-search-base-url-error`:`settings-search-base-url-help`,lt;t[102]===h?lt=t[103]:(lt=h??(0,$.jsx)(o,{id:`lHCR4I`}),t[102]=h,t[103]=lt);let ut;t[104]!==st||t[105]!==ct||t[106]!==lt?(ut=(0,$.jsx)(`p`,{id:`settings-search-base-url-message`,"aria-live":`polite`,className:st,"data-testid":ct,children:lt}),t[104]=st,t[105]=ct,t[106]=lt,t[107]=ut):ut=t[107];let dt;t[108]!==ot||t[109]!==ut?(dt=(0,$.jsxs)(`div`,{className:`space-y-2`,children:[tt,ot,ut]}),t[108]=ot,t[109]=ut,t[110]=dt):dt=t[110];let ft;t[111]===Symbol.for(`react.memo_cache_sentinel`)?(ft=(0,$.jsx)(`label`,{htmlFor:`settings-search-model`,className:`block text-sm font-medium`,children:(0,$.jsx)(o,{id:`scu3wk`})}),t[111]=ft):ft=t[111];let pt;t[112]===Symbol.for(`react.memo_cache_sentinel`)?(pt=e=>M(e.currentTarget.value),t[112]=pt):pt=t[112];let ht;t[113]===Te?ht=t[114]:(ht=e=>{e.key===`Enter`&&(e.preventDefault(),Te())},t[113]=Te,t[114]=ht);let gt=!te,_t;t[115]!==Te||t[116]!==j||t[117]!==ht||t[118]!==gt?(_t=(0,$.jsx)(mn,{id:`settings-search-model`,value:j,onChange:pt,onBlur:Te,onKeyDown:ht,placeholder:Be,disabled:gt,spellCheck:!1,autoComplete:`off`,"aria-describedby":`settings-search-model-help`,"data-testid":`settings-search-model`,className:`h-8 font-mono text-sm`}),t[115]=Te,t[116]=j,t[117]=ht,t[118]=gt,t[119]=_t):_t=t[119];let vt;t[120]===Symbol.for(`react.memo_cache_sentinel`)?(vt=(0,$.jsx)(`p`,{id:`settings-search-model-help`,className:`text-muted-foreground text-1sm`,"data-testid":`settings-search-model-help`,children:(0,$.jsx)(o,{id:`C-mmmK`,values:{DEFAULT_EMBEDDINGS_MODEL:Be}})}),t[120]=vt):vt=t[120];let yt;t[121]===_t?yt=t[122]:(yt=(0,$.jsxs)(`div`,{className:`space-y-2`,children:[ft,_t,vt]}),t[121]=_t,t[122]=yt);let bt;t[123]===he?bt=t[124]:(bt=()=>void he(),t[123]=he,t[124]=bt);let xt=L||!te,St;t[125]===L?St=t[126]:(St=L?(0,$.jsx)(o,{id:`qIJIrD`}):(0,$.jsx)(o,{id:`e2zZ3E`}),t[125]=L,t[126]=St);let Ct;t[127]!==bt||t[128]!==xt||t[129]!==St?(Ct=(0,$.jsx)(x,{variant:`outline`,onClick:bt,disabled:xt,"data-testid":`settings-search-test-connection`,children:St}),t[127]=bt,t[128]=xt,t[129]=St,t[130]=Ct):Ct=t[130];let wt;t[131]!==w||t[132]!==O||t[133]!==z||t[134]!==L?(wt=(0,$.jsx)(po,{result:z,testing:L,configuredBaseUrl:w,configuredModel:O}),t[131]=w,t[132]=O,t[133]=z,t[134]=L,t[135]=wt):wt=t[135];let Tt;t[136]!==Ct||t[137]!==wt?(Tt=(0,$.jsxs)(`div`,{className:`space-y-2`,children:[Ct,wt]}),t[136]=Ct,t[137]=wt,t[138]=Tt):Tt=t[138];let Et;t[139]!==dt||t[140]!==yt||t[141]!==Tt?(Et=(0,$.jsxs)(T,{className:`space-y-4 border-t px-3 py-3`,children:[et,dt,yt,Tt]}),t[139]=dt,t[140]=yt,t[141]=Tt,t[142]=Et):Et=t[142];let Dt;t[143]!==ne||t[144]!==Et?(Dt=(0,$.jsxs)(D,{open:ne,onOpenChange:I,className:`rounded-md border`,"data-testid":`settings-search-custom-endpoint`,children:[$e,Et]}),t[143]=ne,t[144]=Et,t[145]=Dt):Dt=t[145];let kt;t[146]!==p||t[147]!==ye?(kt=(0,$.jsx)(vo,{open:p,onOpenChange:m,onConfirm:ye}),t[146]=p,t[147]=ye,t[148]=kt):kt=t[148];let At;t[149]!==pe||t[150]!==de||t[151]!==N||t[152]!==Fe?(At=(0,$.jsx)(go,{pending:N,pageCount:Fe,onCancel:pe,onConfirm:de}),t[149]=pe,t[150]=de,t[151]=N,t[152]=Fe,t[153]=At):At=t[153];let jt;return t[154]!==Xe||t[155]!==Qe||t[156]!==Dt||t[157]!==kt||t[158]!==At?(jt=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-search-title`,className:`space-y-3`,"data-testid":`settings-search`,children:[Ve,Xe,Qe,Dt,kt,At]}),t[154]=Xe,t[155]=Qe,t[156]=Dt,t[157]=kt,t[158]=At,t[159]=jt):jt=t[159],jt}function uo(e){let t=(0,Z.c)(31),{transport:n,refresh:r,endpointHost:i,keyPresent:a,keyHint:c,keySource:l,keyNotRequired:u,loaded:d}=e,{_:f}=s(),[p,m]=(0,Q.useState)(``),[h,g]=(0,Q.useState)(!1),[_,v]=(0,Q.useState)(null),y;t[0]!==f||t[1]!==h||t[2]!==p||t[3]!==r||t[4]!==n?(y=async function(){let e=p.trim();if(!e||h)return;g(!0),v(null);let t=await n.setKey(e);g(!1),t.ok?(m(``),r()):v(t.error??f({id:`Ck9XRt`}))},t[0]=f,t[1]=h,t[2]=p,t[3]=r,t[4]=n,t[5]=y):y=t[5];let b=y,S;t[6]!==f||t[7]!==h||t[8]!==r||t[9]!==n?(S=async function(){if(h)return;g(!0),v(null);let e=await n.clearKey();g(!1),e.ok?r():v(e.error??f({id:`CSL0l1`}))},t[6]=f,t[7]=h,t[8]=r,t[9]=n,t[10]=S):S=t[10];let C=S,w;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsx)(`h4`,{className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`2pR7ad`})}),t[11]=w):w=t[11];let T;t[12]!==i||t[13]!==u?(T=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[w,(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:u?(0,$.jsx)(o,{id:`k8xtrB`,values:{endpointHost:i},components:{0:(0,$.jsx)(`span`,{className:`font-medium`})}}):(0,$.jsx)(o,{id:`RhX_1U`,values:{endpointHost:i},components:{0:(0,$.jsx)(`span`,{className:`font-medium`}),1:(0,$.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})})]}),t[12]=i,t[13]=u,t[14]=T):T=t[14];let E;t[15]!==f||t[16]!==h||t[17]!==c||t[18]!==p||t[19]!==a||t[20]!==l||t[21]!==d||t[22]!==C||t[23]!==b?(E=l===`env`?(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,"data-testid":`settings-search-key-env`,children:(0,$.jsx)(o,{id:`KH5bQi`,components:{0:(0,$.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})}):(0,$.jsxs)($.Fragment,{children:[a?(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,"data-testid":`settings-search-key-set`,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`div`,{className:`mb-1.5 text-sm font-medium`,children:(0,$.jsx)(o,{id:`AqnqMJ`})}),c?(0,$.jsxs)(`p`,{className:`truncate font-mono text-muted-foreground text-xs`,title:f({id:`qEIFZu`,values:{keyHint:c}}),"data-testid":`settings-search-key-hint`,children:[(0,$.jsx)(`span`,{"aria-hidden":`true`,children:`••••••••`}),c]}):null]}),(0,$.jsx)(x,{variant:`outline`,onClick:()=>void C(),disabled:h,"data-testid":`settings-search-key-clear`,children:(0,$.jsx)(o,{id:`xCJdfg`})})]}):null,(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`label`,{htmlFor:`settings-search-key-input`,className:`mb-2 block text-sm font-medium`,children:a?(0,$.jsx)(o,{id:`UW93oq`}):(0,$.jsx)(o,{id:`K6jxcj`})}),(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(mn,{id:`settings-search-key-input`,type:`password`,value:p,onChange:e=>m(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),b())},placeholder:f({id:`tsiTqO`}),autoComplete:`off`,spellCheck:!1,disabled:h||!d,"data-testid":`settings-search-key-input`,className:`h-8 font-mono text-sm`}),(0,$.jsx)(x,{onClick:()=>void b(),disabled:h||p.trim().length===0,"data-testid":`settings-search-key-save`,children:h?(0,$.jsx)(o,{id:`uF9ruK`}):(0,$.jsx)(o,{id:`tfDRzk`})})]})]})]}),t[15]=f,t[16]=h,t[17]=c,t[18]=p,t[19]=a,t[20]=l,t[21]=d,t[22]=C,t[23]=b,t[24]=E):E=t[24];let D;t[25]===_?D=t[26]:(D=_?(0,$.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,"data-testid":`settings-search-key-error`,children:_}):null,t[25]=_,t[26]=D);let O;return t[27]!==T||t[28]!==E||t[29]!==D?(O=(0,$.jsxs)(`section`,{className:`space-y-3 rounded-md border p-3`,"data-testid":`settings-search-key`,children:[T,E,D]}),t[27]=T,t[28]=E,t[29]=D,t[30]=O):O=t[30],O}function fo(e){let t=(0,Z.c)(12),{loaded:n,serverEnabled:r,keyPresent:i,keyNotRequired:a,ready:s,capable:c,embedded:l,total:u}=e;if(!n||!r){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`p`,{role:`status`,"aria-live":`polite`,className:`text-muted-foreground text-1sm mt-2`,"data-testid":`settings-search-settling`,children:(0,$.jsx)(o,{id:`AdcGcG`})}),t[0]=e):e=t[0],e}if(!i&&!a){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`div`,{role:`alert`,className:`mt-2 rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-1sm text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-200`,"data-testid":`settings-search-needs-key`,children:(0,$.jsx)(o,{id:`x4pGVR`})}),t[1]=e):e=t[1],e}if(s&&!c){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`div`,{role:`alert`,className:`mt-2 rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-1sm text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-200`,"data-testid":`settings-search-provider-error`,children:(0,$.jsx)(o,{id:`Oj-JV8`,components:{0:(0,$.jsx)(`span`,{className:`font-medium`})}})}),t[2]=e):e=t[2],e}if(!s){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`p`,{role:`status`,className:`text-muted-foreground text-1sm mt-2`,"data-testid":`settings-search-pending`,children:(0,$.jsx)(o,{id:`VZSBXL`})}),t[3]=e):e=t[3],e}let d;t[4]!==l||t[5]!==u?(d=(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,$.jsx)(o,{id:`lVWEIL`,values:{embedded:l,total:u}})}),t[4]=l,t[5]=u,t[6]=d):d=t[6];let f;t[7]===l?f=t[8]:(f=l===0?(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,$.jsx)(o,{id:`ku0yLQ`})}):null,t[7]=l,t[8]=f);let p;return t[9]!==d||t[10]!==f?(p=(0,$.jsxs)(`div`,{className:`mt-2 space-y-0.5`,"data-testid":`settings-search-coverage`,children:[d,f]}),t[9]=d,t[10]=f,t[11]=p):p=t[11],p}function po(e){let t=(0,Z.c)(6),{result:n,testing:r,configuredBaseUrl:i,configuredModel:a}=e;if(r||n===null)return null;let{response:s}=n;if(s===null){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(ho,{tone:`error`,testId:`settings-search-test-unreachable`,children:(0,$.jsx)(o,{id:`uNGmQn`})}),t[0]=e):e=t[0],e}if(s.endpoint!==i||s.model!==a){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(ho,{tone:`warn`,testId:`settings-search-test-stale`,children:(0,$.jsx)(o,{id:`psl2Sj`})}),t[1]=e):e=t[1],e}if(s.ok){let e;return t[2]===s.dimensions?e=t[3]:(e=(0,$.jsx)(ho,{tone:`ok`,testId:`settings-search-test-ok`,children:(0,$.jsx)(o,{id:`D-_B7l`,values:{0:s.dimensions}})}),t[2]=s.dimensions,t[3]=e),e}let c;return t[4]===s?c=t[5]:(c=(0,$.jsx)(ho,{tone:`error`,testId:`settings-search-test-error`,children:(0,$.jsx)(mo,{response:s})}),t[4]=s,t[5]=c),c}function mo(e){let t=(0,Z.c)(9),{response:n}=e;switch(n.reason){case`no_key`:{let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(o,{id:`7cAW1G`}),t[0]=e):e=t[0],e}case`invalid_endpoint`:{let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(o,{id:`PhLu69`}),t[1]=e):e=t[1],e}case`rate_limit`:{let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(o,{id:`xDEcka`}),t[2]=e):e=t[2],e}case`timeout`:{let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(o,{id:`PpJy-V`}),t[3]=e):e=t[3],e}case`network`:{let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(o,{id:`yFr-5x`}),t[4]=e):e=t[4],e}case`dims_mismatch`:{let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(o,{id:`5Szq6N`,components:{0:(0,$.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}}),t[5]=e):e=t[5],e}case`malformed_response`:{let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(o,{id:`AwLCZA`}),t[6]=e):e=t[6],e}default:{let e;return t[7]===n.status?e=t[8]:(e=n.status===void 0?(0,$.jsx)(o,{id:`tN5WTS`}):(0,$.jsx)(o,{id:`v_cQn_`,values:{0:n.status}}),t[7]=n.status,t[8]=e),e}}}function ho(e){let t=(0,Z.c)(7),{tone:n,testId:r,children:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={ok:`border-emerald-300 bg-emerald-50 text-emerald-900 dark:border-emerald-700 dark:bg-emerald-950 dark:text-emerald-200`,warn:`border-amber-300 bg-amber-50 text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-200`,error:`border-destructive/50 bg-destructive/10 text-destructive`},t[0]=a):a=t[0];let o=a[n],s=n===`error`?`alert`:`status`,c=n===`error`?`assertive`:`polite`,l=`rounded-md border px-3 py-2 text-1sm ${o}`,u;return t[1]!==i||t[2]!==s||t[3]!==c||t[4]!==l||t[5]!==r?(u=(0,$.jsx)(`p`,{role:s,"aria-live":c,className:l,"data-testid":r,children:i}),t[1]=i,t[2]=s,t[3]=c,t[4]=l,t[5]=r,t[6]=u):u=t[6],u}function go(e){let t=(0,Z.c)(32),{pending:n,pageCount:r,onCancel:i,onConfirm:a}=e,s;t[0]===n?s=t[1]:(s=n?_o(n.baseUrl)??n.baseUrl:``,t[0]=n,t[1]=s);let c=s,l=n!==null,u;t[2]===i?u=t[3]:(u=e=>{e||i()},t[2]=i,t[3]=u);let d;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)(k,{children:(0,$.jsx)(o,{id:`_GRWOJ`})}),t[4]=d):d=t[4];let f;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsxs)(P,{children:[d,(0,$.jsx)(O,{children:(0,$.jsx)(o,{id:`EKwNEe`})})]}),t[5]=f):f=t[5];let p;t[6]!==c||t[7]!==r?(p={pageCount:r,host:c},t[6]=c,t[7]=r,t[8]=p):p=t[8];let m;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(m={0:(0,$.jsx)(`span`,{className:`font-medium`}),1:(0,$.jsx)(`span`,{className:`font-medium`})},t[9]=m):m=t[9];let h;t[10]===p?h=t[11]:(h=(0,$.jsx)(`li`,{children:(0,$.jsx)(o,{id:`darW93`,values:p,components:m})}),t[10]=p,t[11]=h);let g=n?.model,_;t[12]===g?_=t[13]:(_={0:g},t[12]=g,t[13]=_);let v;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(v={0:(0,$.jsx)(`span`,{className:`font-mono`})},t[14]=v):v=t[14];let y;t[15]===_?y=t[16]:(y=(0,$.jsx)(`li`,{children:(0,$.jsx)(o,{id:`sweBEk`,values:_,components:v})}),t[15]=_,t[16]=y);let b;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsx)(`li`,{children:(0,$.jsx)(o,{id:`cD3aew`})}),t[17]=b):b=t[17];let S;t[18]!==y||t[19]!==h?(S=(0,$.jsx)(j,{children:(0,$.jsx)(`div`,{role:`alert`,className:`rounded-md border border-amber-300 bg-amber-50 px-3 py-2.5 text-sm text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-200`,children:(0,$.jsxs)(`ul`,{className:`list-disc space-y-1.5 pl-5`,children:[h,y,b]})})}),t[18]=y,t[19]=h,t[20]=S):S=t[20];let C;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(N,{asChild:!0,children:(0,$.jsx)(x,{variant:`outline`,children:(0,$.jsx)(o,{id:`dEgA5A`})})}),t[21]=C):C=t[21];let w;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsx)(o,{id:`9aVlF2`}),t[22]=w):w=t[22];let T;t[23]===a?T=t[24]:(T=(0,$.jsxs)(M,{children:[C,(0,$.jsx)(x,{onClick:a,"data-testid":`settings-search-provider-confirm-apply`,children:w})]}),t[23]=a,t[24]=T);let E;t[25]!==S||t[26]!==T?(E=(0,$.jsxs)(A,{className:`sm:max-w-lg`,"data-testid":`settings-search-provider-confirm`,children:[f,S,T]}),t[25]=S,t[26]=T,t[27]=E):E=t[27];let D;return t[28]!==E||t[29]!==l||t[30]!==u?(D=(0,$.jsx)(F,{open:l,onOpenChange:u,children:E}),t[28]=E,t[29]=l,t[30]=u,t[31]=D):D=t[31],D}function _o(e){try{return new URL(e).host}catch{return null}}function vo(e){let t=(0,Z.c)(13),{open:n,onOpenChange:r,onConfirm:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(k,{children:(0,$.jsx)(o,{id:`vhAnzJ`})}),t[0]=a):a=t[0];let s;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsxs)(P,{children:[a,(0,$.jsx)(O,{children:(0,$.jsx)(o,{id:`aENGMB`})})]}),t[1]=s):s=t[1];let c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(`p`,{className:`mb-2 font-medium`,children:(0,$.jsx)(o,{id:`7PNNNs`})}),t[2]=c):c=t[2];let l;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(`li`,{children:(0,$.jsx)(o,{id:`UfW9Kr`})}),t[3]=l):l=t[3];let u;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(j,{children:(0,$.jsxs)(`div`,{role:`alert`,className:`rounded-md border border-amber-300 bg-amber-50 px-3 py-2.5 text-sm text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-200`,children:[c,(0,$.jsxs)(`ul`,{className:`list-disc space-y-1.5 pl-5`,children:[l,(0,$.jsx)(`li`,{children:(0,$.jsx)(o,{id:`Emz5BG`,components:{0:(0,$.jsx)(`code`,{className:`rounded bg-amber-100 px-1 py-0.5 font-mono text-xs dark:bg-amber-900`})}})}),(0,$.jsx)(`li`,{children:(0,$.jsx)(o,{id:`DKYW1G`})})]})]})}),t[4]=u):u=t[4];let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)(N,{asChild:!0,children:(0,$.jsx)(x,{variant:`outline`,children:(0,$.jsx)(o,{id:`dEgA5A`})})}),t[5]=d):d=t[5];let f;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(o,{id:`iMkWoF`}),t[6]=f):f=t[6];let p;t[7]===i?p=t[8]:(p=(0,$.jsxs)(A,{className:`sm:max-w-lg`,"data-testid":`settings-search-confirm`,children:[s,u,(0,$.jsxs)(M,{children:[d,(0,$.jsx)(x,{onClick:i,"data-testid":`settings-search-confirm-enable`,children:f})]})]}),t[7]=i,t[8]=p);let m;return t[9]!==r||t[10]!==n||t[11]!==p?(m=(0,$.jsx)(F,{open:n,onOpenChange:r,children:p}),t[9]=r,t[10]=n,t[11]=p,t[12]=m):m=t[12],m}function yo(e){let t=(0,Z.c)(46),{scope:n}=e,{_:r}=s(),{state:i,saving:a,folderAction:c}=jt(),[l,u]=(0,Q.useState)(``),d,f,p,m;if(t[0]!==r||t[1]!==c||t[2]!==a||t[3]!==n||t[4]!==i.data||t[5]!==i.message||t[6]!==i.status){let e=i.status===`ready`?(i.data.folders??[]).filter(e=>e.scope===n):[],s=new Map(e.map(So)),l=e=>(e.state===`linked`||e.state===`linked-parent`)&&typeof e.target==`string`&&s.has(e.target),u=new Map;for(let t of e){if(!l(t))continue;let e=t.target;u.set(e,[...u.get(e)??[],t])}let h;t[11]===l?h=t[12]:(h=e=>!l(e),t[11]=l,t[12]=h);let g=e.filter(h),v;t[13]!==c||t[14]!==n?(v=(e,t,r)=>{c({scope:n,root:e,action:t,...r===void 0?{}:{target:r}}).catch(xo)},t[13]=c,t[14]=n,t[15]=v):v=t[15];let y=v;d=`space-y-2 rounded-lg border bg-card p-3`,f=`settings-skill-folders`;let S;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsx)(`h4`,{className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`HSh8u_`})}),t[16]=S):S=t[16],t[17]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsxs)(`div`,{children:[S,(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`sLcbHt`})})]}),t[17]=p):p=t[17],m=i.status===`error`?(0,$.jsx)(`div`,{className:`text-1sm text-destructive`,role:`alert`,"data-testid":`skill-targets-error`,children:(0,$.jsx)(o,{id:`ACKMCN`,values:{0:i.message}})}):i.status===`ready`?(0,$.jsx)(`ul`,{className:`space-y-1 pt-1`,children:g.map(t=>{let i=n===`global`?`~/${t.root}`:t.root,s=u.get(t.root)??[],c=e.filter(e=>e.root!==t.root&&(e.state===`own`||e.state===`absent`));return(0,$.jsxs)(`li`,{className:`text-sm`,"data-testid":`skill-folder-row-${t.host}`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(_,{host:t.host,"aria-hidden":!0,className:`size-4 shrink-0`}),(0,$.jsxs)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs`,children:[i,t.state===`linked`||t.state===`linked-parent`?(0,$.jsxs)(`span`,{className:`text-muted-foreground`,children:[` → `,t.target??`?`]}):null]}),t.drift?(0,$.jsx)(b,{testId:`skill-folder-drift-${t.host}`,title:r({id:`p3m_Gk`,values:{0:t.expected??``}})}):null,t.state===`absent`?(0,$.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground uppercase tracking-wide`,children:(0,$.jsx)(o,{id:`KFd4xz`})}):null,t.state===`linked-parent`?(0,$.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground uppercase tracking-wide`,title:r({id:`yLwx9e`}),children:(0,$.jsx)(o,{id:`nf0wk0`})}):null,(t.state===`own`||t.state===`absent`)&&c.length>0?(0,$.jsxs)(B,{children:[(0,$.jsx)(R,{asChild:!0,children:(0,$.jsx)(x,{size:`sm`,variant:`ghost`,disabled:a,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] uppercase tracking-wide text-muted-foreground hover:text-foreground`,title:r({id:`g5w1sF`,values:{display:i}}),"data-testid":`skill-folder-link-${t.host}`,children:(0,$.jsx)(o,{id:`uUCrBv`})})}),(0,$.jsx)(z,{align:`end`,className:`w-auto`,children:c.map(e=>(0,$.jsxs)(L,{onSelect:()=>y(e.root,`link`,t.root),"data-testid":`skill-folder-link-${t.host}-to-${e.root}`,children:[(0,$.jsx)(_,{host:e.host,"aria-hidden":!0,className:`size-4`}),(0,$.jsx)(`span`,{className:`font-mono text-xs`,children:n===`global`?`~/${e.root}`:e.root})]},e.root))})]}):null,t.state===`linked`?(0,$.jsx)(x,{size:`sm`,variant:`ghost`,disabled:a,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] uppercase tracking-wide text-muted-foreground hover:text-foreground`,title:r({id:`MQ5LOx`,values:{display:i}}),onClick:()=>y(t.root,`unlink`),"data-testid":`skill-folder-unlink-${t.host}`,children:(0,$.jsx)(o,{id:`ptQ3_N`})}):null]}),s.length>0?(0,$.jsx)(`ul`,{className:`mt-1 ml-2 space-y-1 border-border/60 border-l pl-3`,"data-testid":`skill-folder-followers-${t.host}`,children:s.map(e=>(0,$.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(_,{host:e.host,"aria-hidden":!0,className:`size-4 shrink-0`}),(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-muted-foreground text-xs`,children:n===`global`?`~/${e.root}`:e.root}),e.drift?(0,$.jsx)(b,{testId:`skill-folder-drift-${e.host}`,title:r({id:`p3m_Gk`,values:{0:e.expected??``}})}):null,e.state===`linked-parent`?(0,$.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground uppercase tracking-wide`,title:r({id:`yLwx9e`}),children:(0,$.jsx)(o,{id:`Ef6ukL`})}):(0,$.jsx)(x,{size:`sm`,variant:`ghost`,disabled:a,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide hover:text-foreground`,title:r({id:`9_2oe6`,values:{0:n===`global`?`~/${e.root}`:e.root}}),onClick:()=>y(e.root,`unlink`),"data-testid":`skill-folder-unlink-${e.host}`,children:(0,$.jsx)(o,{id:`ptQ3_N`})})]},e.host))}):null]},t.host)})}):(0,$.jsxs)(`div`,{className:`space-y-2 pt-1`,children:[(0,$.jsx)(xn,{className:`h-5 w-56`}),(0,$.jsx)(xn,{className:`h-5 w-56`})]}),t[0]=r,t[1]=c,t[2]=a,t[3]=n,t[4]=i.data,t[5]=i.message,t[6]=i.status,t[7]=d,t[8]=f,t[9]=p,t[10]=m}else d=t[7],f=t[8],p=t[9],m=t[10];let h;t[18]!==c||t[19]!==l||t[20]!==n?(h=e=>{e.preventDefault();let t=l.trim().replace(/^~\//,``);t!==``&&c({scope:n,root:t,action:`add-root`}).then(()=>u(``)).catch(bo)},t[18]=c,t[19]=l,t[20]=n,t[21]=h):h=t[21];let g;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(g=e=>u(e.target.value),t[22]=g):g=t[22];let v;t[23]!==r||t[24]!==n?(v=r(n===`global`?{id:`Wboy1j`}:{id:`jpoCue`}),t[23]=r,t[24]=n,t[25]=v):v=t[25];let y;t[26]!==l||t[27]!==a||t[28]!==v?(y=(0,$.jsx)(mn,{value:l,onChange:g,placeholder:v,className:`h-7 flex-1 font-mono text-xs`,disabled:a,"data-testid":`skill-folders-add-root-input`}),t[26]=l,t[27]=a,t[28]=v,t[29]=y):y=t[29];let S;t[30]!==l||t[31]!==a?(S=a||l.trim()===``,t[30]=l,t[31]=a,t[32]=S):S=t[32];let C;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(o,{id:`ZW2yR_`}),t[33]=C):C=t[33];let w;t[34]===S?w=t[35]:(w=(0,$.jsx)(x,{type:`submit`,size:`sm`,variant:`secondary`,disabled:S,className:`h-7 px-2 font-normal text-xs`,children:C}),t[34]=S,t[35]=w);let T;t[36]!==w||t[37]!==h||t[38]!==y?(T=(0,$.jsxs)(`form`,{className:`flex items-center gap-2 pt-1`,onSubmit:h,"data-testid":`skill-folders-add-root`,children:[y,w]}),t[36]=w,t[37]=h,t[38]=y,t[39]=T):T=t[39];let E;return t[40]!==d||t[41]!==T||t[42]!==f||t[43]!==p||t[44]!==m?(E=(0,$.jsxs)(`section`,{className:d,"data-testid":f,children:[p,m,T]}),t[40]=d,t[41]=T,t[42]=f,t[43]=p,t[44]=m,t[45]=E):E=t[45],E}function bo(e){return X.error(e instanceof Error?e.message:String(e))}function xo(e){return X.error(e instanceof Error?e.message:String(e))}function So(e){return[e.root,e]}function Co(e){let t=(0,Z.c)(14),{scope:n}=e,r=`settings-skills-title-${n}`,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(o,{id:`PCSkw2`}),t[0]=i):i=t[0];let a;t[1]===r?a=t[2]:(a=(0,$.jsx)(`h3`,{id:r,className:`text-base font-semibold`,children:i}),t[1]=r,t[2]=a);let s;t[3]===n?s=t[4]:(s=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n===`project`?(0,$.jsx)(o,{id:`NCmYhK`}):(0,$.jsx)(o,{id:`67TEhP`})}),t[3]=n,t[4]=s);let c;t[5]!==a||t[6]!==s?(c=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[a,s]}),t[5]=a,t[6]=s,t[7]=c):c=t[7];let l;t[8]===n?l=t[9]:(l=(0,$.jsx)(yo,{scope:n}),t[8]=n,t[9]=l);let u;return t[10]!==c||t[11]!==l||t[12]!==r?(u=(0,$.jsxs)(`section`,{"aria-labelledby":r,className:`space-y-4`,"data-testid":`settings-skills-section`,children:[c,l]}),t[10]=c,t[11]=l,t[12]=r,t[13]=u):u=t[13],u}var wo=Zn(`install-slidev`)??``,To=`https://sli.dev/guide/install`,Eo=`https://openknowledge.ai/docs/plugins/slidev`;function Do(){let e=(0,Z.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={kind:`checking`},e[0]=t):t=e[0];let[n,r]=(0,Q.useState)(t),i,a;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>{let e=!0,t=()=>{let t=window.okDesktop?.slides;if(t==null){r({kind:`unsupported`});return}t.status().then(t=>{e&&r(t.available?{kind:`available`,source:t.source}:{kind:`missing`})}).catch(t=>{console.warn(`[slides] settings availability probe failed:`,t),e&&r({kind:`check-failed`})})};return t(),window.addEventListener(`focus`,t),()=>{e=!1,window.removeEventListener(`focus`,t)}},a=[],e[1]=i,e[2]=a):(i=e[1],a=e[2]),(0,Q.useEffect)(i,a),n}function Oo(){let e=window.okDesktop;return e?.terminal!=null&&e.config?.ptyAvailable===!0}function ko(e){let t=(0,Z.c)(23),{availability:n}=e,{_:r}=s();if(n.kind===`checking`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`slides-status-checking`,children:(0,$.jsx)(o,{id:`P8AnMN`})}),t[0]=e):e=t[0],e}if(n.kind===`check-failed`){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`slides-status-check-failed`,children:(0,$.jsx)(o,{id:`49Mb7P`})}),t[1]=e):e=t[1],e}if(n.kind===`unsupported`){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`slides-status-unsupported`,children:(0,$.jsx)(o,{id:`lScd1O`})}),t[2]=e):e=t[2],e}if(n.kind===`available`){let e;return t[3]===n.source?e=t[4]:(e=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`slides-status-available`,children:n.source===`project-local`?(0,$.jsx)(o,{id:`el2KyL`}):(0,$.jsx)(o,{id:`xxRpzT`})}),t[3]=n.source,t[4]=e),e}let i;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(`p`,{className:`text-sm text-amber-600 dark:text-amber-400`,children:(0,$.jsx)(o,{id:`HPaAxt`})}),t[5]=i):i=t[5];let a;t[6]===r?a=t[7]:(a=r({id:`hz076O`}),t[6]=r,t[7]=a);let c;t[8]===a?c=t[9]:(c=(0,$.jsx)(Bn,{readOnly:!0,value:wo,"aria-label":a,className:`font-mono text-xs`,"data-testid":`slides-install-command`,onFocus:No}),t[8]=a,t[9]=c);let l;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(zn,{align:`inline-end`,children:(0,$.jsx)(kt,{copyContent:wo})}),t[10]=l):l=t[10];let u;t[11]===c?u=t[12]:(u=(0,$.jsxs)(Vn,{children:[c,l]}),t[11]=c,t[12]=u);let d;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(d=Oo()?(0,$.jsxs)(x,{type:`button`,size:`sm`,variant:`outline`,"data-testid":`slides-run-install`,onClick:Mo,children:[(0,$.jsx)(cn,{"aria-hidden":!0,className:`size-3.5`}),(0,$.jsx)(o,{id:`hVAkI8`})]}):null,t[13]=d):d=t[13];let f;t[14]===r?f=t[15]:(f=r({id:`NfraGd`}),t[14]=r,t[15]=f);let p,m;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(o,{id:`1NgrlY`}),m=(0,$.jsx)(Tt,{"aria-hidden":!0,className:`size-3`}),t[16]=p,t[17]=m):(p=t[16],m=t[17]);let h;t[18]===f?h=t[19]:(h=(0,$.jsxs)(`div`,{className:`flex items-center gap-3`,children:[d,(0,$.jsxs)(`a`,{href:To,target:`_blank`,rel:`noopener noreferrer`,onClick:jo,onAuxClick:Ao,"aria-label":f,className:`inline-flex items-center gap-0.5 text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline`,"data-testid":`slides-install-docs-link`,children:[p,m]})]}),t[18]=f,t[19]=h);let g;return t[20]!==h||t[21]!==u?(g=(0,$.jsxs)(`div`,{className:`space-y-3`,"data-testid":`slides-status-missing`,children:[i,u,h]}),t[20]=h,t[21]=u,t[22]=g):g=t[22],g}function Ao(e){return vn(e,To)}function jo(e){return vn(e,To)}function Mo(){typeof window<`u`&&rt(window.location.hash)&&window.history.back(),Qn(`install-slidev`)}function No(e){return e.currentTarget.select()}function Po(){let e=(0,Z.c)(3),t=Do(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(ji,{titleId:`settings-plugin-slides-title`,title:`Slidev`,scope:`user`,beta:!0,docUrl:Eo,children:(0,$.jsx)(o,{id:`L3w0_C`,components:{0:(0,$.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})}),e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-plugin-slides-title`,className:`space-y-4`,"data-testid":`settings-plugin-slides`,children:[n,(0,$.jsx)(`div`,{"aria-live":`polite`,children:(0,$.jsx)(ko,{availability:t})})]}),e[1]=t,e[2]=r),r}var Fo=`data-[state=on]:border-primary data-[state=on]:bg-primary data-[state=on]:text-primary-foreground data-[state=on]:hover:bg-primary/90`;function Io(){let e=(0,Z.c)(93),{_:t}=s(),n=St(),{projectConfig:r,projectLocalConfig:i,projectLocalSynced:a,projectSynced:c}=mt(),l=xt(),u=bt(),d;e[0]===i?.autoSync?d=e[1]:(d=De(i?.autoSync)??`off`,e[0]=i?.autoSync,e[1]=d);let f=d,{confirmOpen:p,setConfirmOpen:m,pendingMode:h,onModeSelect:g,onConfirm:_}=Ct(l,f),[v,y]=(0,Q.useState)(!1),[b,O]=(0,Q.useState)(!1);if(n&&!n.hasRemote&&n.state===`dormant`){let t;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(`h3`,{id:`settings-sync-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`Nu4DdT`})}),e[2]=t):t=e[2];let n;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[t,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`AiNMQ7`})})]}),e[3]=n):n=e[3];let r;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`3_6U6f`})}),e[4]=r):r=e[4];let i;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsxs)(`div`,{className:`space-y-0.5`,children:[r,(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,$.jsx)(o,{id:`i92eAT`})})]}),e[5]=i):i=e[5];let a;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>y(!0),e[6]=a):a=e[6];let s;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-md border p-3`,children:[i,(0,$.jsx)(x,{onClick:a,"data-testid":`settings-sync-setup`,children:(0,$.jsx)(o,{id:`zkz0Fg`})})]}),e[7]=s):s=e[7];let c;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(E,{asChild:!0,children:(0,$.jsxs)(x,{variant:`ghost`,size:`sm`,className:`group gap-1 px-1.5 text-muted-foreground`,children:[(0,$.jsx)(Ot,{className:`size-3.5 transition-transform group-data-[state=open]:rotate-90`,"aria-hidden":!0}),(0,$.jsx)(o,{id:`6caB2T`})]})}),e[8]=c):c=e[8];let l;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsxs)(D,{children:[c,(0,$.jsx)(T,{className:`px-1.5 pt-2 text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`44DSl0`,components:{0:(0,$.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})})]}),e[9]=l):l=e[9];let u;return e[10]===v?u=e[11]:(u=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-sync-title`,className:`space-y-4`,"data-testid":`settings-sync-empty`,children:[n,s,l,(0,$.jsx)(Wt,{open:v,onOpenChange:y})]}),e[10]=v,e[11]=u),u}let k=!a,A=n?.pushPermission?.checkStatus===`denied`||n?.pausedReason===`no-push-permission`,j=n?.pushPermission,M;e[12]===j?M=e[13]:(M=Qt(j),e[12]=j,e[13]=M);let N=M,P=f===`full`&&A&&N,F=f===`full`&&A&&!N,I=n?.pushPermission?.checkStatus===`denied`&&n.pushPermission.deniedReason!==`not-authenticated`,L;e[14]!==A||e[15]!==F||e[16]!==n?(L=F||A||!n?.pausedReason?null:Yt(n.pausedReason),e[14]=A,e[15]=F,e[16]=n,e[17]=L):L=e[17];let R=L,z;e[18]===g?z=e[19]:(z=function(e){ke(e)&&g(e)},e[18]=g,e[19]=z);let B=z,V;e[20]===r?.autoSync?.default?V=e[21]:(V=Pe(r?.autoSync?.default)??`ask`,e[20]=r?.autoSync?.default,e[21]=V);let H=V,ee;e[22]!==t||e[23]!==u?(ee=function(e){if(e!==`ask`&&!ke(e))return;if(u===null){X.error(t({id:`fiMNLl`}));return}let n;bb110:switch(e){case`ask`:n=null;break bb110;case`off`:n=!1;break bb110;case`full`:n=!0;break bb110;case`follow`:n=`follow`;break bb110;default:throw Error(`unhandled committed default: ${String(e)}`)}let r=u(n);if(!r.ok){let e=r.error;X.error(t({id:`oAFVKX`,values:{detail:e}}))}},e[22]=t,e[23]=u,e[24]=ee):ee=e[24];let U=ee,te;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,$.jsx)(`h3`,{id:`settings-sync-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`Nu4DdT`})}),e[25]=te):te=e[25];let ne;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[te,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`-f2Ogn`})})]}),e[26]=ne):ne=e[26];let re;e[27]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,$.jsx)(`div`,{id:`settings-sync-mode-label`,className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`yZepkk`})}),e[27]=re):re=e[27];let ie;e[28]===f?ie=e[29]:(ie=(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,"data-testid":`settings-sync-body`,children:f===`full`?(0,$.jsx)(o,{id:`hxYFzm`}):f===`follow`?(0,$.jsx)(o,{id:`-imiMK`}):(0,$.jsx)(o,{id:`UVDasf`})}),e[28]=f,e[29]=ie);let ae;e[30]!==t||e[31]!==n?(ae=n?.remote?(0,$.jsxs)(`p`,{className:`text-muted-foreground text-1sm truncate`,"data-testid":`settings-sync-remote`,children:[(0,$.jsx)(o,{id:`Q8A-U_`}),` `,n.remote.webUrl?(0,$.jsxs)(`a`,{href:n.remote.webUrl,target:`_blank`,rel:`noopener noreferrer`,className:`text-foreground hover:text-primary hover:underline inline-flex items-center gap-0.5`,"aria-label":t({id:`1nke1r`,values:{0:n.remote.label}}),"data-testid":`settings-sync-remote-link`,children:[(0,$.jsx)(`span`,{children:n.remote.label}),(0,$.jsx)(Tt,{className:`inline size-3.5`,"aria-hidden":!0})]}):(0,$.jsx)(`span`,{className:`font-medium text-foreground`,"data-testid":`settings-sync-remote-label`,children:n.remote.label})]}):null,e[30]=t,e[31]=n,e[32]=ae):ae=e[32];let W;e[33]!==ie||e[34]!==ae?(W=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[re,ie,ae]}),e[33]=ie,e[34]=ae,e[35]=W):W=e[35];let K;e[36]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,$.jsx)(G,{value:`off`,className:Fo,"data-testid":`settings-sync-mode-off`,children:(0,$.jsx)(o,{id:`az8lvo`})}),e[36]=K):K=e[36];let q;e[37]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,$.jsx)(G,{value:`follow`,className:Fo,"data-testid":`settings-sync-mode-follow`,children:(0,$.jsx)(o,{id:`MKEPCY`})}),e[37]=q):q=e[37];let J;e[38]===I?J=e[39]:(J=I?(0,$.jsxs)(w,{children:[(0,$.jsx)(S,{asChild:!0,children:(0,$.jsx)(`span`,{className:`inline-flex`,children:(0,$.jsx)(G,{value:`full`,className:Fo,disabled:!0,"data-testid":`settings-sync-mode-full`,children:(0,$.jsx)(o,{id:`g2Tj8R`})})})}),(0,$.jsx)(C,{"data-testid":`settings-sync-mode-full-tip`,children:(0,$.jsx)(o,{id:`ChAtFg`})})]}):(0,$.jsx)(G,{value:`full`,className:Fo,"data-testid":`settings-sync-mode-full`,children:(0,$.jsx)(o,{id:`g2Tj8R`})}),e[38]=I,e[39]=J);let Y;e[40]!==f||e[41]!==k||e[42]!==B||e[43]!==J?(Y=(0,$.jsxs)(oe,{type:`single`,variant:`outline`,spacing:2,value:f,onValueChange:B,disabled:k,"aria-labelledby":`settings-sync-mode-label`,"data-testid":`settings-sync-mode-toggle`,children:[K,q,J]}),e[40]=f,e[41]=k,e[42]=B,e[43]=J,e[44]=Y):Y=e[44];let se;e[45]!==W||e[46]!==Y?(se=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[W,Y]}),e[45]=W,e[46]=Y,e[47]=se):se=e[47];let ce;e[48]===P?ce=e[49]:(ce=P&&(0,$.jsxs)(`div`,{className:`mt-2 flex items-start gap-2`,"data-testid":`settings-sync-reconnect`,children:[(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground flex-1 min-w-0`,children:(0,$.jsx)(o,{id:`tnG-m6`})}),(0,$.jsx)(x,{variant:`outline`,size:`xs`,className:`self-start`,onClick:()=>O(!0),children:(0,$.jsx)(o,{id:`5lWFkC`})})]}),e[48]=P,e[49]=ce);let le;e[50]!==g||e[51]!==F?(le=F&&(0,$.jsxs)(`div`,{className:`mt-2 flex items-start gap-2`,"data-testid":`settings-sync-switch-follow`,children:[(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground flex-1 min-w-0`,children:(0,$.jsx)(o,{id:`ajHi4O`})}),(0,$.jsx)(x,{variant:`outline`,size:`xs`,className:`self-start`,onClick:()=>g(`follow`),"data-testid":`settings-sync-switch-follow-action`,children:(0,$.jsx)(o,{id:`i6ng22`})})]}),e[50]=g,e[51]=F,e[52]=le):le=e[52];let ue;e[53]!==A||e[54]!==f||e[55]!==P||e[56]!==F?(ue=!F&&!P&&A&&f!==`follow`&&(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground mt-2`,"data-testid":`settings-sync-denied-hint`,children:(0,$.jsx)(o,{id:`uUiiyC`})}),e[53]=A,e[54]=f,e[55]=P,e[56]=F,e[57]=ue):ue=e[57];let de;e[58]===R?de=e[59]:(de=R!==null&&(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground mt-2`,"data-testid":`settings-sync-reason`,children:R}),e[58]=R,e[59]=de);let fe;e[60]===n?.pushPermission?fe=e[61]:(fe=Ut(n?.pushPermission)&&(0,$.jsxs)(`div`,{className:`mt-2 flex items-start gap-2`,"data-testid":`settings-sync-signin-again`,children:[(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground flex-1 min-w-0`,children:(0,$.jsx)(o,{id:`C_cPoW`})}),(0,$.jsx)(x,{variant:`outline`,size:`xs`,className:`self-start`,onClick:()=>O(!0),children:(0,$.jsx)(o,{id:`5lWFkC`})})]}),e[60]=n?.pushPermission,e[61]=fe);let pe;e[62]!==se||e[63]!==ce||e[64]!==le||e[65]!==ue||e[66]!==de||e[67]!==fe?(pe=(0,$.jsxs)(`div`,{className:`rounded-md border p-3`,children:[se,ce,le,ue,de,fe]}),e[62]=se,e[63]=ce,e[64]=le,e[65]=ue,e[66]=de,e[67]=fe,e[68]=pe):pe=e[68];let me;e[69]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,$.jsx)(`div`,{id:`settings-sync-default-label`,className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`j_Z6g7`})}),e[69]=me):me=e[69];let he;e[70]===Symbol.for(`react.memo_cache_sentinel`)?(he=(0,$.jsxs)(`div`,{className:`space-y-0.5`,children:[me,(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,$.jsx)(o,{id:`msuDyW`})})]}),e[70]=he):he=e[70];let ge=!c,_e;e[71]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,$.jsx)(G,{value:`ask`,className:Fo,"data-testid":`settings-sync-default-ask`,children:(0,$.jsx)(o,{id:`EdQY6l`})}),e[71]=_e):_e=e[71];let ve;e[72]===Symbol.for(`react.memo_cache_sentinel`)?(ve=(0,$.jsx)(G,{value:`off`,className:Fo,"data-testid":`settings-sync-default-off`,children:(0,$.jsx)(o,{id:`az8lvo`})}),e[72]=ve):ve=e[72];let ye;e[73]===Symbol.for(`react.memo_cache_sentinel`)?(ye=(0,$.jsx)(G,{value:`follow`,className:Fo,"data-testid":`settings-sync-default-follow`,children:(0,$.jsx)(o,{id:`MKEPCY`})}),e[73]=ye):ye=e[73];let be;e[74]===Symbol.for(`react.memo_cache_sentinel`)?(be=(0,$.jsx)(G,{value:`full`,className:Fo,"data-testid":`settings-sync-default-full`,children:(0,$.jsx)(o,{id:`g2Tj8R`})}),e[74]=be):be=e[74];let xe;e[75]!==H||e[76]!==U||e[77]!==ge?(xe=(0,$.jsxs)(`div`,{className:`rounded-md border p-3 space-y-2`,"data-testid":`settings-sync-default`,children:[he,(0,$.jsxs)(oe,{type:`single`,variant:`outline`,spacing:2,value:H,onValueChange:U,disabled:ge,"aria-labelledby":`settings-sync-default-label`,"data-testid":`settings-sync-default-toggle`,children:[_e,ve,ye,be]})]}),e[75]=H,e[76]=U,e[77]=ge,e[78]=xe):xe=e[78];let Se=h??`full`,Ce=h===`follow`?n?.ahead??0:0,we;e[79]!==p||e[80]!==_||e[81]!==m||e[82]!==Se||e[83]!==Ce?(we=(0,$.jsx)(wt,{open:p,onOpenChange:m,onConfirm:_,variant:Se,strandedCommitCount:Ce}),e[79]=p,e[80]=_,e[81]=m,e[82]=Se,e[83]=Ce,e[84]=we):we=e[84];let Te;e[85]===Symbol.for(`react.memo_cache_sentinel`)?(Te=()=>O(!1),e[85]=Te):Te=e[85];let Ee;e[86]===b?Ee=e[87]:(Ee=(0,$.jsx)(Rt,{open:b,onOpenChange:O,onSuccess:Te,reauth:!0}),e[86]=b,e[87]=Ee);let Oe;return e[88]!==pe||e[89]!==xe||e[90]!==we||e[91]!==Ee?(Oe=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-sync-title`,className:`space-y-3`,children:[ne,pe,xe,we,Ee]}),e[88]=pe,e[89]=xe,e[90]=we,e[91]=Ee,e[92]=Oe):Oe=e[92],Oe}function Lo(e){let t=(0,Z.c)(15),{title:n,description:r,scope:i,binding:a,fields:o,scopeBadge:s}=e,{form:c,commitField:l}=Vr(a),[u,d]=(0,Q.useState)(null),f=(0,Q.useRef)(null),p,m;t[0]!==c||t[1]!==i?(p=()=>{let e=i===`project`?Xe:xe,t=Kt(t=>{if(t.docName!==e)return;X.error(He(t.error),{duration:8e3});let n=Jr(t.error);n&&(c.setError(n,{type:`config-validation-rejected`,message:Wr(t.error,n)}),c.setFocus(n),d(n),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{d(null),c.clearErrors(n)},600))});return()=>{t(),f.current&&clearTimeout(f.current)}},m=[i,c],t[0]=c,t[1]=i,t[2]=p,t[3]=m):(p=t[2],m=t[3]),(0,Q.useEffect)(p,m);let h;t[4]!==l||t[5]!==r||t[6]!==o||t[7]!==u||t[8]!==i||t[9]!==s||t[10]!==n?(h=(0,$.jsx)(Ro,{title:n,description:r,scope:i,scopeBadge:s,fields:o,commitField:l,flashedPath:u}),t[4]=l,t[5]=r,t[6]=o,t[7]=u,t[8]=i,t[9]=s,t[10]=n,t[11]=h):h=t[11];let g;return t[12]!==c||t[13]!==h?(g=(0,$.jsx)(Xn,{...c,children:h}),t[12]=c,t[13]=h,t[14]=g):g=t[14],g}function Ro(e){let t=(0,Z.c)(28),{title:n,description:r,scope:i,scopeBadge:a,fields:o,commitField:s,flashedPath:c}=e,l=`settings-section-${i}-title`,u;t[0]!==n||t[1]!==l?(u=(0,$.jsx)(`h3`,{id:l,className:`text-base font-semibold`,children:n}),t[0]=n,t[1]=l,t[2]=u):u=t[2];let d;t[3]===a?d=t[4]:(d=a?(0,$.jsx)(Ai,{scope:a}):null,t[3]=a,t[4]=d);let f;t[5]!==u||t[6]!==d?(f=(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[u,d]}),t[5]=u,t[6]=d,t[7]=f):f=t[7];let p;t[8]===r?p=t[9]:(p=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:r}),t[8]=r,t[9]=p);let m;t[10]!==f||t[11]!==p?(m=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[f,p]}),t[10]=f,t[11]=p,t[12]=m):m=t[12];let h;if(t[13]!==s||t[14]!==o||t[15]!==c||t[16]!==i){let e;t[18]!==s||t[19]!==c||t[20]!==i?(e=e=>(0,$.jsx)(Xr,{field:e,scope:i,commitField:s,isFlashed:c===e.path.join(`.`)},e.path.join(`.`)),t[18]=s,t[19]=c,t[20]=i,t[21]=e):e=t[21],h=o.map(e),t[13]=s,t[14]=o,t[15]=c,t[16]=i,t[17]=h}else h=t[17];let g;t[22]===h?g=t[23]:(g=(0,$.jsx)(`div`,{className:`space-y-10`,children:h}),t[22]=h,t[23]=g);let _;return t[24]!==m||t[25]!==g||t[26]!==l?(_=(0,$.jsxs)(`section`,{"aria-labelledby":l,className:`space-y-3`,children:[m,g]}),t[24]=m,t[25]=g,t[26]=l,t[27]=_):_=t[27],_}function zo(){let e=(0,Z.c)(71),{_:t}=s(),{enabled:n,synced:r}=ir(),i=rr(),a=n!==!1,{userConfig:o,userBinding:c,userSynced:l}=mt(),u=o?.agents?.autoApproveOkTools!==!1,[d,f]=(0,Q.useState)(!1),p,m;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>{let e=window.okDesktop;if(!e)return;let t=!1;return e.terminal.cliPreflight(`codex`).then(e=>{t||f(e.onPath===`present`&&e.okServerConfigured!==!0)}).catch(Bo),()=>{t=!0}},m=[],e[0]=p,e[1]=m):(p=e[0],m=e[1]),(0,Q.useEffect)(p,m);let h;e[2]!==t||e[3]!==i?(h=function(e){if(i===null){X.error(t({id:`w6sBjd`}));return}let n=i(e);n.ok||X.error(t(e?{id:`jKd3AP`,values:{0:n.error}}:{id:`pajIrl`,values:{0:n.error}}))},e[2]=t,e[3]=i,e[4]=h):h=e[4];let g=h,_;e[5]!==t||e[6]!==c?(_=function(e){if(c===null){X.error(t({id:`fnlBN4`}));return}let n=c.patch({agents:{autoApproveOkTools:e}});if(!n.ok){let e=He(n.error);X.error(t({id:`habOU_`,values:{detail:e}}))}},e[5]=t,e[6]=c,e[7]=_):_=e[7];let v=_,y;e[8]===t?y=e[9]:(y=t({id:`ALhMYW`}),e[8]=t,e[9]=y);let b;e[10]===y?b=e[11]:(b=(0,$.jsx)(`h3`,{id:`settings-terminal-title`,className:`text-base font-semibold`,children:y}),e[10]=y,e[11]=b);let x;e[12]===t?x=e[13]:(x=t({id:`FCAcjR`}),e[12]=t,e[13]=x);let S;e[14]===x?S=e[15]:(S=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:x}),e[14]=x,e[15]=S);let C;e[16]!==b||e[17]!==S?(C=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[b,S]}),e[16]=b,e[17]=S,e[18]=C):C=e[18];let w;e[19]===t?w=e[20]:(w=t({id:`E4XYYH`}),e[19]=t,e[20]=w);let T;e[21]===w?T=e[22]:(T=(0,$.jsx)(`label`,{htmlFor:`settings-terminal-toggle`,className:`text-sm font-medium`,children:w}),e[21]=w,e[22]=T);let E;e[23]!==t||e[24]!==a?(E=t(a?{id:`AQGtjK`}:{id:`R65q-K`}),e[23]=t,e[24]=a,e[25]=E):E=e[25];let D;e[26]===E?D=e[27]:(D=(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground`,"data-testid":`settings-terminal-body`,children:E}),e[26]=E,e[27]=D);let O;e[28]!==T||e[29]!==D?(O=(0,$.jsxs)(`div`,{className:`space-y-0.5`,children:[T,D]}),e[28]=T,e[29]=D,e[30]=O):O=e[30];let k=!r||i===null,A;e[31]===t?A=e[32]:(A=t({id:`E4XYYH`}),e[31]=t,e[32]=A);let j;e[33]!==g||e[34]!==a||e[35]!==k||e[36]!==A?(j=(0,$.jsx)(W,{id:`settings-terminal-toggle`,checked:a,onCheckedChange:g,disabled:k,"aria-label":A,"data-testid":`settings-terminal-toggle`}),e[33]=g,e[34]=a,e[35]=k,e[36]=A,e[37]=j):j=e[37];let M;e[38]!==O||e[39]!==j?(M=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-md border p-3`,children:[O,j]}),e[38]=O,e[39]=j,e[40]=M):M=e[40];let N;e[41]===t?N=e[42]:(N=t({id:`ilodsp`}),e[41]=t,e[42]=N);let P;e[43]===N?P=e[44]:(P=(0,$.jsx)(`label`,{htmlFor:`settings-terminal-autoapprove-toggle`,className:`text-sm font-medium`,children:N}),e[43]=N,e[44]=P);let F;e[45]===t?F=e[46]:(F=t({id:`jENU1Q`}),e[45]=t,e[46]=F);let I;e[47]===F?I=e[48]:(I=(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground`,"data-testid":`settings-terminal-autoapprove-body`,children:F}),e[47]=F,e[48]=I);let L;e[49]!==t||e[50]!==u||e[51]!==d?(L=u&&d?(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground`,"data-testid":`settings-terminal-autoapprove-codex-note`,children:t({id:`Kr3VPS`})}):null,e[49]=t,e[50]=u,e[51]=d,e[52]=L):L=e[52];let R;e[53]!==P||e[54]!==I||e[55]!==L?(R=(0,$.jsxs)(`div`,{className:`space-y-0.5`,children:[P,I,L]}),e[53]=P,e[54]=I,e[55]=L,e[56]=R):R=e[56];let z=!l||c===null,B;e[57]===t?B=e[58]:(B=t({id:`ilodsp`}),e[57]=t,e[58]=B);let V;e[59]!==v||e[60]!==u||e[61]!==z||e[62]!==B?(V=(0,$.jsx)(W,{id:`settings-terminal-autoapprove-toggle`,checked:u,onCheckedChange:v,disabled:z,"aria-label":B,"data-testid":`settings-terminal-autoapprove-toggle`}),e[59]=v,e[60]=u,e[61]=z,e[62]=B,e[63]=V):V=e[63];let H;e[64]!==R||e[65]!==V?(H=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-md border p-3`,children:[R,V]}),e[64]=R,e[65]=V,e[66]=H):H=e[66];let ee;return e[67]!==M||e[68]!==H||e[69]!==C?(ee=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-terminal-title`,className:`space-y-3`,children:[C,M,H]}),e[67]=M,e[68]=H,e[69]=C,e[70]=ee):ee=e[70],ee}function Bo(){}function Vo(e){let t=(0,Z.c)(14),{slot:n,active:r,className:i,style:a,children:o}=e,s=r===n,c=s?`true`:void 0,l=s&&`ring-2 ring-offset-1`,u;t[0]!==i||t[1]!==l?(u=h(`rounded-[2px] transition-shadow`,l,i),t[0]=i,t[1]=l,t[2]=u):u=t[2];let d;t[3]===s?d=t[4]:(d=s?{boxShadow:`0 0 0 2px currentColor`}:null,t[3]=s,t[4]=d);let f;t[5]!==a||t[6]!==d?(f={...a,...d},t[5]=a,t[6]=d,t[7]=f):f=t[7];let p;return t[8]!==o||t[9]!==n||t[10]!==c||t[11]!==u||t[12]!==f?(p=(0,$.jsx)(`span`,{"data-slot":n,"data-lit":c,className:u,style:f,children:o}),t[8]=o,t[9]=n,t[10]=c,t[11]=u,t[12]=f,t[13]=p):p=t[13],p}function Ho(e){let t=(0,Z.c)(198),{scheme:n,highlightSlot:r,className:i}=e,{_:a}=s(),o=n.palette,c;t[0]===n?c=t[1]:(c=Se(n),t[0]=n,t[1]=c);let l=c,u=r??null,d;t[2]===a?d=t[3]:(d=a({id:`V6e25h`}),t[2]=a,t[3]=d);let f;t[4]===i?f=t[5]:(f=h(`overflow-hidden rounded-lg border text-[9px] leading-[1.5] select-none`,i),t[4]=i,t[5]=f);let p;t[6]!==o.base00||t[7]!==o.base02||t[8]!==o.base05?(p={backgroundColor:o.base00,color:o.base05,borderColor:o.base02},t[6]=o.base00,t[7]=o.base02,t[8]=o.base05,t[9]=p):p=t[9];let m=`1px solid ${o.base02}`,g;t[10]!==o.base01||t[11]!==m?(g={backgroundColor:o.base01,borderBottom:m},t[10]=o.base01,t[11]=m,t[12]=g):g=t[12];let _;t[13]!==o.base00||t[14]!==o.base0D?(_={backgroundColor:o.base0D,color:o.base00},t[13]=o.base00,t[14]=o.base0D,t[15]=_):_=t[15];let v;t[16]===a?v=t[17]:(v=a({id:`tfDRzk`}),t[16]=a,t[17]=v);let y;t[18]!==_||t[19]!==v?(y=(0,$.jsx)(`span`,{className:`inline-block rounded-full px-1.5 py-[1px] font-medium`,style:_,children:v}),t[18]=_,t[19]=v,t[20]=y):y=t[20];let b;t[21]!==u||t[22]!==y?(b=(0,$.jsx)(Vo,{slot:`base0D`,active:u,children:y}),t[21]=u,t[22]=y,t[23]=b):b=t[23];let x;t[24]===o.base04?x=t[25]:(x=(0,$.jsx)(`span`,{style:{color:o.base04},children:`notes / release-plan.md`}),t[24]=o.base04,t[25]=x);let S;t[26]!==u||t[27]!==x?(S=(0,$.jsx)(Vo,{slot:`base04`,active:u,className:`flex-1 truncate`,children:x}),t[26]=u,t[27]=x,t[28]=S):S=t[28];let C;t[29]!==b||t[30]!==S||t[31]!==g?(C=(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5 px-2 py-1.5`,style:g,children:[b,S]}),t[29]=b,t[30]=S,t[31]=g,t[32]=C):C=t[32];let w=`1px solid ${o.base02}`,T;t[33]!==o.base01||t[34]!==w?(T={backgroundColor:o.base01,borderRight:w},t[33]=o.base01,t[34]=w,t[35]=T):T=t[35];let E;t[36]===o.base02?E=t[37]:(E={backgroundColor:o.base02},t[36]=o.base02,t[37]=E);let D;t[38]===o.base05?D=t[39]:(D=(0,$.jsx)(`span`,{style:{color:o.base05},children:`release-plan`}),t[38]=o.base05,t[39]=D);let O;t[40]!==u||t[41]!==E||t[42]!==D?(O=(0,$.jsx)(Vo,{slot:`base02`,active:u,className:`block rounded px-1 py-[1px]`,style:E,children:D}),t[40]=u,t[41]=E,t[42]=D,t[43]=O):O=t[43];let k;t[44]===o.base04?k=t[45]:(k=(0,$.jsx)(`span`,{style:{color:o.base04},children:`backlog`}),t[44]=o.base04,t[45]=k);let A;t[46]!==u||t[47]!==k?(A=(0,$.jsx)(Vo,{slot:`base04`,active:u,className:`block px-1`,children:k}),t[46]=u,t[47]=k,t[48]=A):A=t[48];let j;t[49]===o.base04?j=t[50]:(j=(0,$.jsx)(`span`,{style:{color:o.base04},children:`archive`}),t[49]=o.base04,t[50]=j);let M;t[51]!==u||t[52]!==j?(M=(0,$.jsx)(Vo,{slot:`base04`,active:u,className:`block px-1`,children:j}),t[51]=u,t[52]=j,t[53]=M):M=t[53];let N;t[54]!==T||t[55]!==O||t[56]!==A||t[57]!==M?(N=(0,$.jsxs)(`div`,{className:`w-[26%] shrink-0 space-y-[3px] p-1.5`,style:T,children:[O,A,M]}),t[54]=T,t[55]=O,t[56]=A,t[57]=M,t[58]=N):N=t[58];let P=l[`syntax-func`],F;t[59]===P?F=t[60]:(F={color:P},t[59]=P,t[60]=F);let I;t[61]===a?I=t[62]:(I=a({id:`gayL_Q`}),t[61]=a,t[62]=I);let L;t[63]!==F||t[64]!==I?(L=(0,$.jsx)(`span`,{style:F,children:I}),t[63]=F,t[64]=I,t[65]=L):L=t[65];let R;t[66]!==u||t[67]!==L?(R=(0,$.jsx)(Vo,{slot:`base0D`,active:u,className:`block font-semibold`,children:L}),t[66]=u,t[67]=L,t[68]=R):R=t[68];let z;t[69]===o.base05?z=t[70]:(z={color:o.base05},t[69]=o.base05,t[70]=z);let B;t[71]===a?B=t[72]:(B=a({id:`um-es7`}),t[71]=a,t[72]=B);let V;t[73]!==z||t[74]!==B?(V=(0,$.jsxs)(`span`,{style:z,children:[B,` `]}),t[73]=z,t[74]=B,t[75]=V):V=t[75];let H=l[`link-color`],ee;t[76]===H?ee=t[77]:(ee={color:H,textDecoration:`underline`},t[76]=H,t[77]=ee);let U;t[78]===a?U=t[79]:(U=a({id:`4sUdTJ`}),t[78]=a,t[79]=U);let te;t[80]!==ee||t[81]!==U?(te=(0,$.jsx)(`span`,{style:ee,children:U}),t[80]=ee,t[81]=U,t[82]=te):te=t[82];let ne;t[83]!==u||t[84]!==te?(ne=(0,$.jsx)(Vo,{slot:`base0D`,active:u,children:te}),t[83]=u,t[84]=te,t[85]=ne):ne=t[85];let re;t[86]===o.base05?re=t[87]:(re=(0,$.jsx)(`span`,{style:{color:o.base05},children:`.`}),t[86]=o.base05,t[87]=re);let ie;t[88]!==V||t[89]!==ne||t[90]!==re?(ie=(0,$.jsxs)(`div`,{className:`space-y-[2px]`,children:[V,ne,re]}),t[88]=V,t[89]=ne,t[90]=re,t[91]=ie):ie=t[91];let ae=`2px solid ${l[`callout-warning-color`]}`,W;t[92]!==o.base01||t[93]!==ae?(W={backgroundColor:o.base01,borderLeft:ae},t[92]=o.base01,t[93]=ae,t[94]=W):W=t[94];let G=l[`callout-warning-color`],K;t[95]===G?K=t[96]:(K={color:G},t[95]=G,t[96]=K);let oe;t[97]===a?oe=t[98]:(oe=a({id:`r6y-jM`}),t[97]=a,t[98]=oe);let q;t[99]!==K||t[100]!==oe?(q=(0,$.jsx)(`span`,{style:K,className:`font-medium`,children:oe}),t[99]=K,t[100]=oe,t[101]=q):q=t[101];let J;t[102]!==u||t[103]!==W||t[104]!==q?(J=(0,$.jsx)(Vo,{slot:`base0A`,active:u,className:`block rounded px-1.5 py-1`,style:W,children:q}),t[102]=u,t[103]=W,t[104]=q,t[105]=J):J=t[105];let Y=l[`syntax-bg`],se;t[106]===Y?se=t[107]:(se={backgroundColor:Y},t[106]=Y,t[107]=se);let ce=l[`syntax-keyword`],le;t[108]===ce?le=t[109]:(le=(0,$.jsx)(`span`,{style:{color:ce},children:`const`}),t[108]=ce,t[109]=le);let ue;t[110]!==u||t[111]!==le?(ue=(0,$.jsx)(Vo,{slot:`base0E`,active:u,children:le}),t[110]=u,t[111]=le,t[112]=ue):ue=t[112];let de=l[`syntax-var`],fe;t[113]===de?fe=t[114]:(fe=(0,$.jsx)(`span`,{style:{color:de},children:`retries`}),t[113]=de,t[114]=fe);let pe;t[115]!==u||t[116]!==fe?(pe=(0,$.jsx)(Vo,{slot:`base08`,active:u,children:fe}),t[115]=u,t[116]=fe,t[117]=pe):pe=t[117];let me=l[`syntax-operator`],he;t[118]===me?he=t[119]:(he=(0,$.jsx)(`span`,{style:{color:me},children:` = `}),t[118]=me,t[119]=he);let ge=l[`syntax-number`],_e;t[120]===ge?_e=t[121]:(_e=(0,$.jsx)(`span`,{style:{color:ge},children:`3`}),t[120]=ge,t[121]=_e);let ve;t[122]!==u||t[123]!==_e?(ve=(0,$.jsx)(Vo,{slot:`base09`,active:u,children:_e}),t[122]=u,t[123]=_e,t[124]=ve):ve=t[124];let ye;t[125]!==ue||t[126]!==pe||t[127]!==he||t[128]!==ve?(ye=(0,$.jsxs)(`div`,{children:[ue,` `,pe,he,ve]}),t[125]=ue,t[126]=pe,t[127]=he,t[128]=ve,t[129]=ye):ye=t[129];let be=l[`syntax-string`],xe;t[130]===be?xe=t[131]:(xe=(0,$.jsx)(`span`,{style:{color:be},children:`"ready"`}),t[130]=be,t[131]=xe);let Ce;t[132]!==u||t[133]!==xe?(Ce=(0,$.jsx)(Vo,{slot:`base0B`,active:u,children:xe}),t[132]=u,t[133]=xe,t[134]=Ce):Ce=t[134];let we=l[`syntax-comment`],Te;t[135]===we?Te=t[136]:(Te={color:we,fontStyle:`italic`},t[135]=we,t[136]=Te);let Ee;t[137]===a?Ee=t[138]:(Ee=a({id:`g9Nj4l`}),t[137]=a,t[138]=Ee);let De;t[139]!==Te||t[140]!==Ee?(De=(0,$.jsx)(`span`,{style:Te,children:Ee}),t[139]=Te,t[140]=Ee,t[141]=De):De=t[141];let Oe;t[142]!==u||t[143]!==De?(Oe=(0,$.jsx)(Vo,{slot:`base03`,active:u,children:De}),t[142]=u,t[143]=De,t[144]=Oe):Oe=t[144];let ke;t[145]!==Ce||t[146]!==Oe?(ke=(0,$.jsxs)(`div`,{children:[Ce,` `,Oe]}),t[145]=Ce,t[146]=Oe,t[147]=ke):ke=t[147];let Ae;t[148]!==se||t[149]!==ye||t[150]!==ke?(Ae=(0,$.jsxs)(`div`,{className:`rounded px-1.5 py-1 font-mono`,style:se,children:[ye,ke]}),t[148]=se,t[149]=ye,t[150]=ke,t[151]=Ae):Ae=t[151];let je=`1px solid ${o.base02}`,Me;t[152]!==o.base00||t[153]!==je?(Me={backgroundColor:o.base00,border:je},t[152]=o.base00,t[153]=je,t[154]=Me):Me=t[154];let Ne;t[155]===o.base04?Ne=t[156]:(Ne=(0,$.jsx)(`span`,{style:{color:o.base04},children:`$`}),t[155]=o.base04,t[156]=Ne);let Pe=l[`ansi-red`],Fe;t[157]===Pe?Fe=t[158]:(Fe=[`base08`,Pe],t[157]=Pe,t[158]=Fe);let Ie=l[`ansi-yellow`],Le;t[159]===Ie?Le=t[160]:(Le=[`base0A`,Ie],t[159]=Ie,t[160]=Le);let Re=l[`ansi-green`],ze;t[161]===Re?ze=t[162]:(ze=[`base0B`,Re],t[161]=Re,t[162]=ze);let Be=l[`ansi-cyan`],Ve;t[163]===Be?Ve=t[164]:(Ve=[`base0C`,Be],t[163]=Be,t[164]=Ve);let He=l[`ansi-blue`],Ue;t[165]===He?Ue=t[166]:(Ue=[`base0D`,He],t[165]=He,t[166]=Ue);let We=l[`ansi-magenta`],Ge;t[167]===We?Ge=t[168]:(Ge=[`base0E`,We],t[167]=We,t[168]=Ge);let Ke;t[169]!==Fe||t[170]!==Le||t[171]!==ze||t[172]!==Ve||t[173]!==Ue||t[174]!==Ge?(Ke=[Fe,Le,ze,Ve,Ue,Ge],t[169]=Fe,t[170]=Le,t[171]=ze,t[172]=Ve,t[173]=Ue,t[174]=Ge,t[175]=Ke):Ke=t[175];let qe=Ke,Je;t[176]!==u||t[177]!==qe?(Je=qe.map(e=>{let[t,n]=e;return(0,$.jsx)(Vo,{slot:t,active:u,children:(0,$.jsx)(`span`,{className:`inline-block size-1.5 rounded-[1px]`,style:{backgroundColor:n}})},t)}),t[176]=u,t[177]=qe,t[178]=Je):Je=t[178];let Ye;t[179]!==Me||t[180]!==Ne||t[181]!==Je?(Ye=(0,$.jsxs)(`div`,{className:`flex items-center gap-1 rounded px-1.5 py-1 font-mono`,style:Me,children:[Ne,Je]}),t[179]=Me,t[180]=Ne,t[181]=Je,t[182]=Ye):Ye=t[182];let Xe;t[183]!==R||t[184]!==ie||t[185]!==J||t[186]!==Ae||t[187]!==Ye?(Xe=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1.5 p-2`,children:[R,ie,J,Ae,Ye]}),t[183]=R,t[184]=ie,t[185]=J,t[186]=Ae,t[187]=Ye,t[188]=Xe):Xe=t[188];let Ze;t[189]!==N||t[190]!==Xe?(Ze=(0,$.jsxs)(`div`,{className:`flex`,children:[N,Xe]}),t[189]=N,t[190]=Xe,t[191]=Ze):Ze=t[191];let Qe;return t[192]!==C||t[193]!==d||t[194]!==f||t[195]!==p||t[196]!==Ze?(Qe=(0,$.jsxs)(`div`,{"aria-label":d,role:`img`,className:f,style:p,children:[C,Ze]}),t[192]=C,t[193]=d,t[194]=f,t[195]=p,t[196]=Ze,t[197]=Qe):Qe=t[197],Qe}var Uo=qe.slice(0,8),Wo=qe.slice(8),Go=`https://github.com/tinted-theming/schemes`;function Ko(e){let t=(0,Z.c)(141),{userBinding:n}=e,{_:r}=s(),{setTheme:i,systemTheme:a}=l(),o=dt()?.merged??null,c=o?.appearance?.customTheme,u;t[0]===c?u=t[1]:(u=ut(c),t[0]=c,t[1]=u);let d=u,f=o?.appearance?.theme,p=o?.appearance,m;t[2]===p?m=t[3]:(m=Oe(p),t[2]=p,t[3]=m);let h=m,g=a===`dark`,_;t[4]!==f||t[5]!==g?(_=Fe(f,g),t[4]=f,t[5]=g,t[6]=_):_=t[6];let v=_,y=h[v]===`custom`,[b,S]=(0,Q.useState)(d),C;t[7]===d?C=t[8]:(C=JSON.stringify(d),t[7]=d,t[8]=C);let w=C,T;t[9]===d?T=t[10]:(T=()=>{S(d)},t[9]=d,t[10]=T);let E;t[11]===w?E=t[12]:(E=[w],t[11]=w,t[12]=E),(0,Q.useEffect)(T,E);let[D,O]=(0,Q.useState)(``),[k,A]=(0,Q.useState)(null),[j,M]=(0,Q.useState)(null),N=o?.appearance?.customTheme,P;t[13]===N?P=t[14]:(P=vt(N),t[13]=N,t[14]=P);let F=P,I;t[15]!==y||t[16]!==f||t[17]!==h||t[18]!==i||t[19]!==v?(I=function(e){y&&(ht({selection:h,modePreference:f,slotMode:v,customSeed:ct(e)}),i(_t(e)===`dark`?`dark`:`light`))},t[15]=y,t[16]=f,t[17]=h,t[18]=i,t[19]=v,t[20]=I):I=t[20];let L=I,R;t[21]!==L||t[22]!==b?(R=function(e,t){let n={...b,palette:{...b.palette,[e]:t}};S(n),lt(t)&&L(n)},t[21]=L,t[22]=b,t[23]=R):R=t[23];let z=R,B;t[24]!==F||t[25]!==b||t[26]!==n?(B=function(e,t){if(lt(t)){if(F){let r={...b,palette:{...b.palette,[e]:t}};n.patch({appearance:{customTheme:ct(r)}});return}n.patch({appearance:{customTheme:{[e]:t}}})}},t[24]=F,t[25]=b,t[26]=n,t[27]=B):B=t[27];let H=B,ee;t[28]!==r||t[29]!==D||t[30]!==L||t[31]!==n?(ee=function(){let e=Ne(D);if(!e.ok){A(Xo(e.error,r));return}A(null),O(``),S(e.scheme),L(e.scheme),n.patch({appearance:{customTheme:ct(e.scheme)}})},t[28]=r,t[29]=D,t[30]=L,t[31]=n,t[32]=ee):ee=t[32];let U=ee,te;t[33]!==r||t[34]!==b?(te=async function(){let e=Ye(b),t=navigator.clipboard?.writeText?.bind(navigator.clipboard);if(t)try{await t(e),X.success(r({id:`bD2SLZ`}));return}catch{}O(e),A(null),X.error(r({id:`9j1tqo`}))},t[33]=r,t[34]=b,t[35]=te):te=t[35];let ne=te,re;t[36]!==L||t[37]!==n?(re=function(){S(ft),A(null),L(ft),n.patch({appearance:{customTheme:ct(ft)}})},t[36]=L,t[37]=n,t[38]=re):re=t[38];let ie=re,ae;t[39]===r?ae=t[40]:(ae=r({id:`DcLaew`}),t[39]=r,t[40]=ae);let W;t[41]===ae?W=t[42]:(W=(0,$.jsx)(`h3`,{id:`settings-custom-theme-title`,className:`font-medium text-sm`,children:ae}),t[41]=ae,t[42]=W);let G;t[43]!==r||t[44]!==y?(G=r(y?{id:`Quz_Qu`}:{id:`3l_knd`}),t[43]=r,t[44]=y,t[45]=G):G=t[45];let K;t[46]===G?K=t[47]:(K=(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:G}),t[46]=G,t[47]=K);let oe;t[48]!==W||t[49]!==K?(oe=(0,$.jsxs)(`div`,{children:[W,K]}),t[48]=W,t[49]=K,t[50]=oe):oe=t[50];let q;t[51]===r?q=t[52]:(q=r({id:`aNb3JH`}),t[51]=r,t[52]=q);let J;t[53]!==ne||t[54]!==q?(J=(0,$.jsx)(x,{variant:`outline`,size:`sm`,onClick:ne,children:q}),t[53]=ne,t[54]=q,t[55]=J):J=t[55];let Y;t[56]===r?Y=t[57]:(Y=r({id:`OfhWJH`}),t[56]=r,t[57]=Y);let se;t[58]!==ie||t[59]!==Y?(se=(0,$.jsx)(x,{variant:`ghost`,size:`sm`,onClick:ie,className:`text-muted-foreground`,children:Y}),t[58]=ie,t[59]=Y,t[60]=se):se=t[60];let ce;t[61]!==J||t[62]!==se?(ce=(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[J,se]}),t[61]=J,t[62]=se,t[63]=ce):ce=t[63];let le;t[64]!==oe||t[65]!==ce?(le=(0,$.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[oe,ce]}),t[64]=oe,t[65]=ce,t[66]=le):le=t[66];let ue;t[67]!==j||t[68]!==b?(ue=(0,$.jsx)(Ho,{scheme:b,highlightSlot:j,className:`w-full`}),t[67]=j,t[68]=b,t[69]=ue):ue=t[69];let de;t[70]===r?de=t[71]:(de=r({id:`sKMhJz`}),t[70]=r,t[71]=de);let fe,pe;t[72]===r?(fe=t[73],pe=t[74]):(fe=e=>r({id:`CMyafZ`,values:{slot:e}}),pe=r({id:`yR5LHI`}),t[72]=r,t[73]=fe,t[74]=pe);let me;t[75]!==H||t[76]!==z||t[77]!==b||t[78]!==de||t[79]!==fe||t[80]!==pe?(me=(0,$.jsx)(Yo,{label:de,slots:Uo,scheme:b,onPick:z,commit:H,onSlotFocus:M,hexLabel:fe,invalidHint:pe}),t[75]=H,t[76]=z,t[77]=b,t[78]=de,t[79]=fe,t[80]=pe,t[81]=me):me=t[81];let he;t[82]===r?he=t[83]:(he=r({id:`gyWc8_`}),t[82]=r,t[83]=he);let ge,_e;t[84]===r?(ge=t[85],_e=t[86]):(ge=e=>r({id:`CMyafZ`,values:{slot:e}}),_e=r({id:`yR5LHI`}),t[84]=r,t[85]=ge,t[86]=_e);let ve;t[87]!==H||t[88]!==z||t[89]!==b||t[90]!==he||t[91]!==ge||t[92]!==_e?(ve=(0,$.jsx)(Yo,{label:he,slots:Wo,scheme:b,onPick:z,commit:H,onSlotFocus:M,hexLabel:ge,invalidHint:_e}),t[87]=H,t[88]=z,t[89]=b,t[90]=he,t[91]=ge,t[92]=_e,t[93]=ve):ve=t[93];let ye;t[94]!==me||t[95]!==ve?(ye=(0,$.jsxs)(`div`,{className:`space-y-3`,children:[me,ve]}),t[94]=me,t[95]=ve,t[96]=ye):ye=t[96];let be;t[97]===r?be=t[98]:(be=r({id:`IbTC7z`}),t[97]=r,t[98]=be);let xe;t[99]===be?xe=t[100]:(xe=(0,$.jsx)(V,{htmlFor:`custom-theme-import`,className:`text-1sm text-muted-foreground`,children:be}),t[99]=be,t[100]=xe);let Se=k!==null,Ce=k?`custom-theme-import-error`:void 0,we;t[101]===k?we=t[102]:(we=e=>{O(e.target.value),k&&A(null)},t[101]=k,t[102]=we);let Te;t[103]!==D||t[104]!==Se||t[105]!==Ce||t[106]!==we?(Te=(0,$.jsx)(yn,{id:`custom-theme-import`,value:D,spellCheck:!1,rows:3,placeholder:`system: "base16"
|
|
8
|
-
name: "Ayu Dark"
|
|
9
|
-
variant: "dark"
|
|
10
|
-
palette:
|
|
11
|
-
base00: "#0f1419"
|
|
12
|
-
base01: "#131721"`,"aria-invalid":Se,"aria-describedby":Ce,onChange:we,className:`font-mono text-1sm`,"data-testid":`custom-theme-import`}),t[103]=D,t[104]=Se,t[105]=Ce,t[106]=we,t[107]=Te):Te=t[107];let Ee;t[108]===k?Ee=t[109]:(Ee=k?(0,$.jsx)(_n,{id:`custom-theme-import-error`,"data-testid":`custom-theme-import-error`,children:k}):null,t[108]=k,t[109]=Ee);let De;t[110]===D?De=t[111]:(De=D.trim(),t[110]=D,t[111]=De);let ke=!De,Ae;t[112]===r?Ae=t[113]:(Ae=r({id:`7EmDc7`}),t[112]=r,t[113]=Ae);let je;t[114]!==U||t[115]!==ke||t[116]!==Ae?(je=(0,$.jsx)(x,{variant:`outline`,size:`sm`,disabled:ke,onClick:U,children:Ae}),t[114]=U,t[115]=ke,t[116]=Ae,t[117]=je):je=t[117];let Me;t[118]===r?Me=t[119]:(Me=r({id:`pfkaJ2`}),t[118]=r,t[119]=Me);let Pe;t[120]===r?Pe=t[121]:(Pe=r({id:`UeQEbk`}),t[120]=r,t[121]=Pe);let Ie;t[122]===Symbol.for(`react.memo_cache_sentinel`)?(Ie=(0,$.jsx)(Tt,{"aria-hidden":!0,className:`size-3`}),t[122]=Ie):Ie=t[122];let Le;t[123]===Pe?Le=t[124]:(Le=(0,$.jsxs)(`a`,{href:Go,target:`_blank`,rel:`noopener noreferrer`,onClick:Jo,onAuxClick:qo,className:`inline-flex items-center gap-0.5 underline-offset-2 hover:text-foreground hover:underline`,children:[Pe,Ie]}),t[123]=Pe,t[124]=Le);let Re;t[125]!==Me||t[126]!==Le?(Re=(0,$.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[Me,` `,Le]}),t[125]=Me,t[126]=Le,t[127]=Re):Re=t[127];let ze;t[128]!==je||t[129]!==Re?(ze=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1`,children:[je,Re]}),t[128]=je,t[129]=Re,t[130]=ze):ze=t[130];let Be;t[131]!==xe||t[132]!==Te||t[133]!==Ee||t[134]!==ze?(Be=(0,$.jsxs)(`div`,{className:`space-y-1.5 border-t pt-3`,children:[xe,Te,Ee,ze]}),t[131]=xe,t[132]=Te,t[133]=Ee,t[134]=ze,t[135]=Be):Be=t[135];let Ve;return t[136]!==le||t[137]!==ue||t[138]!==ye||t[139]!==Be?(Ve=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-custom-theme-title`,className:`space-y-3`,"data-section":`custom-theme`,children:[le,ue,ye,Be]}),t[136]=le,t[137]=ue,t[138]=ye,t[139]=Be,t[140]=Ve):Ve=t[140],Ve}function qo(e){return vn(e,Go)}function Jo(e){return vn(e,Go)}function Yo(e){let t=(0,Z.c)(22),{label:n,slots:r,scheme:i,onPick:a,commit:o,hexLabel:s,invalidHint:c,onSlotFocus:l}=e,u;t[0]===n?u=t[1]:(u=(0,$.jsx)(`span`,{className:`text-xs font-medium uppercase tracking-wide text-muted-foreground`,children:n}),t[0]=n,t[1]=u);let d;if(t[2]!==o||t[3]!==s||t[4]!==c||t[5]!==a||t[6]!==l||t[7]!==i||t[8]!==r){let e;t[10]!==o||t[11]!==s||t[12]!==c||t[13]!==a||t[14]!==l||t[15]!==i?(e=e=>{let t=i.palette[e],n=lt(t),r={onMouseEnter:()=>l(e),onMouseLeave:()=>l(null),onFocus:()=>l(e)};return(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5 rounded px-1 py-0.5`,children:[(0,$.jsx)(mn,{type:`color`,"aria-label":`${e} — ${Re[e]}`,value:n?t:`#000000`,onChange:t=>a(e,t.target.value),onBlur:t=>{l(null),o(e,t.target.value)},...r,className:`h-7 w-8 shrink-0 cursor-pointer rounded-md p-1`}),(0,$.jsxs)(`div`,{className:`relative min-w-0 flex-1`,children:[(0,$.jsxs)(V,{className:`block truncate text-[10px] leading-tight text-muted-foreground`,children:[(0,$.jsx)(`span`,{className:`font-mono`,children:e}),` `,(0,$.jsx)(`span`,{className:`opacity-80`,children:Re[e]})]}),(0,$.jsx)(mn,{value:t,spellCheck:!1,"aria-label":s(e),"aria-invalid":!n,"aria-describedby":n?void 0:`custom-theme-hex-error-${e}`,onChange:t=>a(e,t.target.value),onBlur:t=>{l(null),o(e,t.target.value)},onKeyDown:t=>{t.key===`Enter`&&o(e,t.target.value)},...r,className:`h-6 font-mono text-[11px] uppercase`}),n?null:(0,$.jsx)(_n,{id:`custom-theme-hex-error-${e}`,className:`absolute top-full left-0 mt-0.5 text-xs leading-tight`,"data-testid":`custom-theme-hex-error-${e}`,children:c})]})]},e)},t[10]=o,t[11]=s,t[12]=c,t[13]=a,t[14]=l,t[15]=i,t[16]=e):e=t[16],d=r.map(e),t[2]=o,t[3]=s,t[4]=c,t[5]=a,t[6]=l,t[7]=i,t[8]=r,t[9]=d}else d=t[9];let f;t[17]===d?f=t[18]:(f=(0,$.jsx)(`div`,{className:`grid grid-cols-1 gap-x-3 gap-y-2 sm:grid-cols-2`,children:d}),t[17]=d,t[18]=f);let p;return t[19]!==u||t[20]!==f?(p=(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[u,f]}),t[19]=u,t[20]=f,t[21]=p):p=t[21],p}function Xo(e,t){switch(e.kind){case`unparseable`:return e.line===void 0?t`That doesn’t parse as YAML or JSON.`:t`That doesn’t parse as YAML or JSON — check line ${e.line}.`;case`not-a-scheme`:return t`That parsed, but it isn’t a base16 scheme.`;case`missing-slots`:return t`Missing ${e.slots.length} slot(s): ${e.slots.join(`, `)}`;case`bad-hex`:return t`Not a hex color: ${e.slots.join(`, `)}`}}function Zo(e){let t=(0,Z.c)(13),{userBinding:n}=e,{_:r}=s(),i;t[0]===r?i=t[1]:(i=r({id:`fJ3EbT`}),t[0]=r,t[1]=i);let a;t[2]===r?a=t[3]:(a=r({id:`J_bJiH`}),t[2]=r,t[3]=a);let o;t[4]!==i||t[5]!==a||t[6]!==n?(o=(0,$.jsx)(Lo,{title:i,description:a,scope:`user`,scopeBadge:`user`,binding:n,fields:Pt}),t[4]=i,t[5]=a,t[6]=n,t[7]=o):o=t[7];let c;t[8]===n?c=t[9]:(c=(0,$.jsx)(Ko,{userBinding:n}),t[8]=n,t[9]=c);let l;return t[10]!==o||t[11]!==c?(l=(0,$.jsxs)(`div`,{className:`space-y-6`,children:[o,c]}),t[10]=o,t[11]=c,t[12]=l):l=t[12],l}function Qo(e){let t=(0,Z.c)(39),{activeId:n,userBinding:r,okignoreBinding:i,okignoreSynced:a,markdownlintRuleQuery:o}=e,{_:c}=s();if(n===`preferences`){let e;t[0]!==c||t[1]!==r?(e=r?(0,$.jsx)(Lo,{title:c({id:`Q6hhn8`}),description:c({id:`Y_kL7X`}),scope:`user`,binding:r,fields:Nt}):(0,$.jsx)(Yr,{}),t[0]=c,t[1]=r,t[2]=e):e=t[2];let n;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(ci,{}),t[3]=n):n=t[3];let i;return t[4]===e?i=t[5]:(i=(0,$.jsxs)(`div`,{className:`space-y-8`,children:[e,n]}),t[4]=e,t[5]=i),i}if(n===`configure-agents`){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(fi,{}),t[6]=e):e=t[6],e}if(n===`hotkeys`){let e;return t[7]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(vi,{}),t[7]=e):e=t[7],e}if(n===`account`){let e;return t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(mr,{}),t[8]=e):e=t[8],e}if(n===`sync`){let e;return t[9]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Io,{}),t[9]=e):e=t[9],e}if(n===`search`){let e;return t[10]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(lo,{}),t[10]=e):e=t[10],e}if(n===`plugins-manage`){let e;return t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Li,{}),t[11]=e):e=t[11],e}if(n===`content-rules`){let e;return t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(gi,{}),t[12]=e):e=t[12],e}if(n===`user-plugins-manage`){let e;return t[13]===r?e=t[14]:(e=(0,$.jsx)(Ri,{userBinding:r}),t[13]=r,t[14]=e),e}if(n===`plugin:theme`){let e;return t[15]===r?e=t[16]:(e=r?(0,$.jsx)(Zo,{userBinding:r}):(0,$.jsx)(Yr,{}),t[15]=r,t[16]=e),e}if(n===`plugin:slides`){let e;return t[17]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Po,{}),t[17]=e):e=t[17],e}if(n===`plugin:markdownlint`){let e=o??null,n;return t[18]===e?n=t[19]:(n=(0,$.jsx)(Bi,{initialRuleQuery:e}),t[18]=e,t[19]=n),n}if(n.startsWith(`plugin:`)){let e;t[20]===n?e=t[21]:(e=n.slice(7),t[20]=n,t[21]=e);let r=e,i;t[22]===r?i=t[23]:(i=na.find(e=>e.id===r),t[22]=r,t[23]=i);let a=i;if(!a)return null;let o=a.Section,s;return t[24]!==o||t[25]!==n?(s=(0,$.jsx)(o,{},n),t[24]=o,t[25]=n,t[26]=s):s=t[26],s}if(n===`link-previews`){let e;return t[27]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(xi,{}),t[27]=e):e=t[27],e}if(n===`terminal`){let e;return t[28]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(zo,{}),t[28]=e):e=t[28],e}if(n===`project-templates`){let e;return t[29]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(io,{}),t[29]=e):e=t[29],e}if(n===`skills`){let e;return t[30]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Co,{scope:`project`}),t[30]=e):e=t[30],e}if(n===`user-skills`){let e;return t[31]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Co,{scope:`global`}),t[31]=e):e=t[31],e}if(n===`sharing`){let e;return t[32]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(lr,{}),t[32]=e):e=t[32],e}if(n===`okignore`){let e;return t[33]!==i||t[34]!==a?(e=(0,$.jsx)(va,{binding:i,synced:a}),t[33]=i,t[34]=a,t[35]=e):e=t[35],e}if(n===`ai-tools`){let e;return t[36]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(br,{}),t[36]=e):e=t[36],e}if(n===`project-ai-tools`){let e;return t[37]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Za,{}),t[37]=e):e=t[37],e}if(n===`claude-desktop`){let e;return t[38]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(bi,{}),t[38]=e):e=t[38],e}return null}export{Qo as SettingsDialogBody};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./button-RQ5o7P7w.js";import{a as ee,c as te,i as ne,n as re,o as ie,s as ae,t as oe}from"./dialog-O4u6_xiQ.js";import{n as s}from"./dist-Bkx5dDHT2.js";import{t as c}from"./desktop-bridge-types-rBjHIYSI.js";import{n as l,t as se}from"./git-branch-CMN6cdzm.js";import{t as u}from"./loader-circle-BbuX0POi.js";import{n as ce,t as d}from"./miss-dialog-store-CdaZpyLg.js";import{r as f,t as p}from"./auth-prompt-store-CeaWNesV.js";import{a as m,n as h}from"./receive-store--Bc0z-E4.js";import{t as le}from"./share-metadata-rows-a0ScdR3d.js";var g=e(n(),1),ue=a();function de(e){let t=e.shareTargetExists,n=e.dirtyConflicts.conflicts,r=e.dirtyConflicts.files;return t&&!n?{kind:`A`,openCurrentEnabled:!0,switchEnabled:!0,conflictingFiles:r}:!t&&!n?{kind:`B`,openCurrentEnabled:!1,switchEnabled:!0,conflictingFiles:r}:t&&n?{kind:`C`,openCurrentEnabled:!0,switchEnabled:!1,conflictingFiles:r}:{kind:`D`,openCurrentEnabled:!1,switchEnabled:!1,conflictingFiles:r}}function fe(e){return e.detached?e.currentHeadSha:e.currentBranch??`HEAD`}function _(e){if(e.ok)return{action:`await-cc1`};switch(e.reason){case`dirty-conflict`:return{action:`rerender-conflict`,files:e.files??[]};case`branch-not-found`:return{action:`dismiss-with-toast`,reason:`branch-not-found`};case`fetch-failed`:case`checkout-failed`:return{action:`stay-with-toast`,reason:e.reason};case`branch-in-other-worktree`:{let t=e.otherWorktreePath;return t===void 0||t.length===0?{action:`stay-with-toast`,reason:`checkout-failed`}:{action:`pivot-to-other-worktree`,otherWorktreePath:t}}case`ff-diverged`:return{action:`branch-diverged`};default:{let t=e.reason;throw Error(`Unhandled CheckoutFailureReason: ${String(t)}`)}}}var pe={phase:`loading`};function me(e,t){return e.phase===`loading`?t===null?{phase:`error`}:{phase:`ready`,info:t}:e}function he(e,t){return e.phase!==`ready`&&e.phase!==`verdict`?e:{phase:`switching`,info:e.info,pendingDoc:t}}function ge(e){return e.phase===`ready`?{phase:`creating-worktree`,info:e.info}:e}function _e(e){return de(e).kind===`B`&&e.shareTargetOnOriginBranch===!1}function ve(e){return e.phase===`ready`?{phase:`verdict-pending`,info:e.info}:e}function ye(e,t){if(e.phase!==`verdict-pending`)return e;if(t===null||t.verdict===`unknown`||t.verdict===`changed-locally`)return{phase:`ready`,info:e.info};let n=t.verdict===`renamed`?{kind:`renamed`,renamedTo:t.renamedTo}:{kind:t.verdict};return{phase:`verdict`,info:e.info,resolution:n}}function be(e,t){if(e.phase!==`switching`)return{state:e};if(t===null)return{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:`proxy-null`}};let n=_(t);return n.action===`await-cc1`?{state:{phase:`awaiting-cc1-recycle`,pendingDoc:e.pendingDoc}}:n.action===`rerender-conflict`?{state:{phase:`ready`,info:{...e.info,dirtyConflicts:{conflicts:!0,files:n.files.slice()}}}}:n.action===`pivot-to-other-worktree`?{state:{phase:`branch-in-other-worktree`,info:e.info,otherWorktreePath:n.otherWorktreePath,pendingDoc:e.pendingDoc}}:n.action===`dismiss-with-toast`?{state:{phase:`dismissed`,reason:n.reason},sideEffect:{kind:`toast`,reason:n.reason}}:n.action===`branch-diverged`?{state:{phase:`verdict`,info:e.info,resolution:{kind:`diverged`}}}:{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:n.reason}}}function xe(e,t){return e.phase===`creating-worktree`?t===null?{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:`proxy-null`}}:t.ok?{state:{phase:`opening-worktree`,path:t.path}}:t.reason===`branch-not-found`?{state:{phase:`dismissed`,reason:`branch-not-found`},sideEffect:{kind:`toast`,reason:`branch-not-found`}}:{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:t.reason,helper:t.helper,authFailed:t.reason===`fetch-failed`?t.authFailed:void 0}}:{state:e}}var v=t();function Se(e){return e!==null&&e.kind===`project-branch-switch`}function y(e){let t=(0,ue.c)(217),{bridge:n,store:a}=e,p=a===void 0?h:a,{_}=i(),y=(0,g.useSyncExternalStore)(p.subscribe,p.getSnapshot,Ae),[b,x]=(0,g.useState)(pe),je=(0,g.useRef)(!1),Me=(0,g.useRef)(!1),Ne=(0,g.useRef)(!1),Pe=(0,g.useRef)(null),Fe;t[0]===y?Fe=t[1]:(Fe=Se(y)?y:null,t[0]=y,t[1]=Fe);let S=Fe,Ie;t[2]!==_||t[3]!==S?.share.target.kind?(Ie=S?.share.target.kind===`folder`?_({id:`ugoTXs`}):_({id:`XH30C4`}),t[2]=_,t[3]=S?.share.target.kind,t[4]=Ie):Ie=t[4];let C=Ie,Le;t[5]===S?Le=t[6]:(Le=()=>{x(pe),je.current=!1,Me.current=!1,Ne.current=!1,Pe.current=S},t[5]=S,t[6]=Le);let Re;t[7]===y?Re=t[8]:(Re=[y],t[7]=y,t[8]=Re),(0,g.useEffect)(Le,Re);let ze;t[9]!==S||t[10]!==n?(ze=()=>{if(!S||je.current)return;je.current=!0;let e=!1;return n.project.fetchBranchInfo({projectPath:S.projectPath,branch:S.share.branch,kind:S.share.target.kind,path:c(S.share.target)}).then(t=>{e||x(e=>me(e,t))}).catch(t=>{e||(console.warn(`[receive] branch-info-fetch-failed`,t instanceof Error?t.message:t),x(ke))}),()=>{e=!0}},t[9]=S,t[10]=n,t[11]=ze):ze=t[11];let Be;t[12]===S?Be=t[13]:(Be=[S],t[12]=S,t[13]=Be),(0,g.useEffect)(ze,Be);let Ve;t[14]!==S||t[15]!==b.info||t[16]!==b.phase||t[17]!==n?(Ve=()=>{if(!S||b.phase!==`ready`||Ne.current||!_e(b.info))return;Ne.current=!0,x(ve);let e=S;n.project.fetchTargetStatus({projectPath:S.projectPath,branch:S.share.branch,kind:S.share.target.kind,path:c(S.share.target)}).then(t=>{Pe.current===e&&x(e=>ye(e,t))}).catch(t=>{Pe.current===e&&(console.warn(`[receive] target-status-fetch-failed`,t instanceof Error?t.message:t),x(Oe))})},t[14]=S,t[15]=b.info,t[16]=b.phase,t[17]=n,t[18]=Ve):Ve=t[18];let He;t[19]!==S||t[20]!==b.phase?(He=[b.phase,S],t[19]=S,t[20]=b.phase,t[21]=He):He=t[21],(0,g.useEffect)(Ve,He);let Ue;t[22]!==S||t[23]!==b.phase||t[24]!==b.resolution||t[25]!==p?(Ue=()=>{if(b.phase!==`verdict`)return;let{kind:e}=b.resolution;e!==`deleted`&&e!==`never-on-branch`||S&&(d.arm({kind:S.share.target.kind,path:c(S.share.target),branch:S.share.branch}),p.dismiss())},t[22]=S,t[23]=b.phase,t[24]=b.resolution,t[25]=p,t[26]=Ue):Ue=t[26];let We;t[27]!==S||t[28]!==b||t[29]!==p?(We=[b,S,p],t[27]=S,t[28]=b,t[29]=p,t[30]=We):We=t[30],(0,g.useEffect)(Ue,We);let Ge;t[31]!==b.phase||t[32]!==b.resolution?(Ge=()=>{b.phase===`verdict`&&console.log(m({verdict_cell:b.resolution.kind}))},t[31]=b.phase,t[32]=b.resolution,t[33]=Ge):Ge=t[33];let Ke;t[34]===b?Ke=t[35]:(Ke=[b],t[34]=b,t[35]=Ke),(0,g.useEffect)(Ge,Ke);let qe;t[36]!==_||t[37]!==S||t[38]!==b.pendingDoc||t[39]!==b.phase||t[40]!==n||t[41]!==p||t[42]!==C?(qe=()=>{if(b.phase!==`awaiting-cc1-recycle`||!S)return;let e=S.share.branch,t=b.pendingDoc;if(!e){p.dismiss();return}if(Me.current)return;Me.current=!0;let r=!1;return n.project.awaitBranchSwitched({projectPath:S.projectPath,branch:e,timeoutMs:3e4}).then(i=>{if(!r){if(i.ok){console.log(m({branch_dialog_action:`branch-switch-complete`,branch:e})),n.project.open({path:S.projectPath,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:{kind:S.share.target.kind,path:t},pendingBranch:e}).catch(e=>{console.warn(`[receive] warm-focus-dispatch-failed branch_action=switch`,e instanceof Error?e.message:e),s.error(_({id:`gQV-9w`,values:{targetNoun:C}}))}),p.dismiss();return}console.log(m({branch_dialog_action:`branch-switch-timeout`,branch:e})),s.error(_({id:`LBwUR6`,values:{targetNoun:C}})),p.dismiss()}}).catch(e=>{r||(console.warn(`[receive] awaitBranchSwitched rejected`,e instanceof Error?e.message:e),s.error(_({id:`Jw6EC4`,values:{targetNoun:C}})),p.dismiss())}),()=>{r=!0}},t[36]=_,t[37]=S,t[38]=b.pendingDoc,t[39]=b.phase,t[40]=n,t[41]=p,t[42]=C,t[43]=qe):qe=t[43];let Je;if(t[44]!==S||t[45]!==b.phase?(Je=[b.phase,S],t[44]=S,t[45]=b.phase,t[46]=Je):Je=t[46],(0,g.useEffect)(qe,Je),!S)return null;let{share:w,projectPath:T,currentBranch:Ye}=S,E=w.branch,Xe;t[47]!==_||t[48]!==n.project||t[49]!==T||t[50]!==E||t[51]!==p?(Xe=function(e,t,r){console.log(m({branch_dialog_action:`switch`,branch_action:`switch`,branch:E,verdict_cell:r})),x(t=>he(t,e)),n.project.runCheckout(t?{projectPath:T,branch:E,fastForward:!0}:{projectPath:T,branch:E}).then(e=>{let t=null,n=!1;x(r=>{let{state:i,sideEffect:a}=be(r,e);return a&&(t=a.reason,n=i.phase===`dismissed`),i}),t===`branch-not-found`?s.error(_({id:`NJyQi_`,values:{shareBranch:E}})):t===`fetch-failed`?s.error(_({id:`bWLmRK`})):(t===`checkout-failed`||t===`proxy-null`)&&s.error(_({id:`c863eW`,values:{shareBranch:E}})),n&&p.dismiss()}).catch(e=>{console.warn(`[receive] runCheckout rejected branch_action=switch`,e instanceof Error?e.message:e),x(De),s.error(_({id:`c863eW`,values:{shareBranch:E}}))})},t[47]=_,t[48]=n.project,t[49]=T,t[50]=E,t[51]=p,t[52]=Xe):Xe=t[52];let D=Xe,Ze;t[53]!==b.info||t[54]!==b.phase||t[55]!==D||t[56]!==w.target?(Ze=function(){b.phase===`ready`&&de(b.info).switchEnabled&&D(c(w.target),!1)},t[53]=b.info,t[54]=b.phase,t[55]=D,t[56]=w.target,t[57]=Ze):Ze=t[57];let Qe=Ze,$e;t[58]!==b.phase||t[59]!==b.resolution||t[60]!==D||t[61]!==w.target?($e=function(){b.phase===`verdict`&&D(c(w.target),!0,b.resolution.kind)},t[58]=b.phase,t[59]=b.resolution,t[60]=D,t[61]=w.target,t[62]=$e):$e=t[62];let et=$e,tt;t[63]!==b.phase||t[64]!==b.resolution||t[65]!==D?(tt=function(){b.phase===`verdict`&&b.resolution.kind===`renamed`&&D(b.resolution.renamedTo,!0,b.resolution.kind)},t[63]=b.phase,t[64]=b.resolution,t[65]=D,t[66]=tt):tt=t[66];let nt=tt,rt;t[67]!==b.phase||t[68]!==b.resolution||t[69]!==D||t[70]!==w.target?(rt=function(){b.phase===`verdict`&&D(c(w.target),!1,b.resolution.kind)},t[67]=b.phase,t[68]=b.resolution,t[69]=D,t[70]=w.target,t[71]=rt):rt=t[71];let it=rt,at;t[72]!==_||t[73]!==n.project||t[74]!==T||t[75]!==w.target||t[76]!==E||t[77]!==p||t[78]!==C?(at=function(){console.log(m({branch_dialog_action:`open-current`,branch:E})),n.project.open({path:T,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:{kind:w.target.kind,path:c(w.target)}}).catch(e=>{console.warn(`[receive] warm-focus-dispatch-failed branch_action=open-current`,e instanceof Error?e.message:e),s.error(_({id:`b5aNbi`,values:{targetNoun:C}}))}),p.dismiss()},t[72]=_,t[73]=n.project,t[74]=T,t[75]=w.target,t[76]=E,t[77]=p,t[78]=C,t[79]=at):at=t[79];let ot=at,st;t[80]!==_||t[81]!==E?(st=function(e,t,n){if(e===`fetch-failed`&&n){s.error(_({id:`gfb-CM`}),{action:{label:_({id:`5lWFkC`}),onClick:Ee}});return}switch(e){case`helper-not-found`:{let e=t??_({id:`cHhH3i`});s.error(_({id:`Z7x_Zh`,values:{tool:e}}));return}case`branch-not-found`:s.error(_({id:`NJyQi_`,values:{shareBranch:E}}));return;case`fetch-failed`:s.error(_({id:`bWLmRK`}));return;case`already-checked-out`:s.error(_({id:`ljHjfg`}));return;case`branch-exists`:s.error(_({id:`h3QZcB`,values:{shareBranch:E}}));return;case`path-exists`:s.error(_({id:`cN1Gcp`,values:{shareBranch:E}}));return;case`no-git`:s.error(_({id:`CFnavk`}));return;case`invalid-branch`:s.error(_({id:`JfPuv7`,values:{shareBranch:E}}));return;case`proxy-null`:case`error`:s.error(_({id:`e8zYa8`,values:{shareBranch:E}}));return;default:throw Error(`Unhandled worktree failure reason: ${String(e)}`)}},t[80]=_,t[81]=E,t[82]=st):st=t[82];let ct=st,lt;t[83]!==_||t[84]!==n.project||t[85]!==w.target||t[86]!==E||t[87]!==ct||t[88]!==p?(lt=function(e){let t=null,r,i,a=!1,o=null;if(x(n=>{let{state:ee,sideEffect:te}=xe(n,e);return te&&(t=te.reason,r=te.helper,i=te.authFailed,a=ee.phase===`dismissed`),ee.phase===`opening-worktree`&&(o=ee.path),ee}),t!==null&&(console.log(m({branch_dialog_action:`open-worktree-failed:${t}`,branch:E})),ct(t,r,i)),o!==null){f();let e=o;n.project.open({path:e,target:`new-window`,entryPoint:`worktree`,pendingDeepLinkTarget:{kind:w.target.kind,path:c(w.target)},pendingBranch:E}).catch(t=>{console.warn(`[receive] worktree-open-failed branch_dialog_action=open-worktree`,t instanceof Error?t.message:t),s.error(_({id:`LdABLa`,values:{target:e}}))}),p.dismiss()}a&&p.dismiss()},t[83]=_,t[84]=n.project,t[85]=w.target,t[86]=E,t[87]=ct,t[88]=p,t[89]=lt):lt=t[89];let ut=lt,dt;t[90]!==ut||t[91]!==b.phase||t[92]!==n.worktree||t[93]!==E?(dt=function(){b.phase===`ready`&&(console.log(m({branch_dialog_action:`open-worktree`,branch:E})),x(ge),n.worktree.checkout({branch:E}).then(e=>{ut(e)}).catch(e=>{console.warn(`[receive] worktree-checkout rejected branch_dialog_action=open-worktree`,e instanceof Error?e.message:e),ut(null)}))},t[90]=ut,t[91]=b.phase,t[92]=n.worktree,t[93]=E,t[94]=dt):dt=t[94];let ft=dt,pt;t[95]!==_||t[96]!==b.otherWorktreePath||t[97]!==b.phase||t[98]!==n.project||t[99]!==w.target||t[100]!==E||t[101]!==p?(pt=function(){if(b.phase!==`branch-in-other-worktree`)return;let e=b.otherWorktreePath;console.log(m({branch_dialog_action:`pivot-to-other-worktree`,branch:E})),n.project.open({path:e,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:{kind:w.target.kind,path:c(w.target)},pendingBranch:E}).catch(t=>{console.warn(`[receive] pivot-open-failed branch_action=pivot-to-other-worktree`,t instanceof Error?t.message:t),s.error(_({id:`LdABLa`,values:{target:e}}))}),p.dismiss()},t[95]=_,t[96]=b.otherWorktreePath,t[97]=b.phase,t[98]=n.project,t[99]=w.target,t[100]=E,t[101]=p,t[102]=pt):pt=t[102];let mt=pt,ht;t[103]!==b.phase||t[104]!==b.resolution||t[105]!==p?(ht=function(){console.log(m({branch_dialog_action:`cancel`,verdict_cell:b.phase===`verdict`?b.resolution.kind:void 0})),p.dismiss()},t[103]=b.phase,t[104]=b.resolution,t[105]=p,t[106]=ht):ht=t[106];let O=ht,k,A,j,M,N,P,F,I,L,R,z,B,V,H,U,W,G,K,q;if(t[107]!==_||t[108]!==b.info||t[109]!==b.otherWorktreePath||t[110]!==b.phase||t[111]!==b.resolution||t[112]!==O||t[113]!==Ye||t[114]!==w.branch||t[115]!==w.owner||t[116]!==w.repo||t[117]!==w.target||t[118]!==E||t[119]!==C){K=b.phase===`ready`||b.phase===`switching`||b.phase===`creating-worktree`?de(b.info):null;let e;t[139]!==b.info||t[140]!==b.phase||t[141]!==Ye?(e=b.phase===`ready`||b.phase===`switching`||b.phase===`creating-worktree`?fe(b.info):Ye??`HEAD`,t[139]=b.info,t[140]=b.phase,t[141]=Ye,t[142]=e):e=t[142];let n=e;F=b.phase===`switching`||b.phase===`awaiting-cc1-recycle`,M=b.phase===`creating-worktree`;let i;t[143]===_?i=t[144]:(i=_({id:`OuY8t9`}),t[143]=_,t[144]=i),N=i;let a;t[145]===_?a=t[146]:(a=_({id:`XZkdtg`}),t[145]=_,t[146]=a),P=a;let o;t[147]===_?o=t[148]:(o=_({id:`VTulZj`}),t[147]=_,t[148]=o),q=o;let ie=b.phase===`loading`,s=b.phase===`error`;j=oe,W=!0,t[149]===O?G=t[150]:(G=e=>{e||O()},t[149]=O,t[150]=G),A=ne,z=`sm:max-w-xl`,B=`share-branch-switch-dialog`,V=Te,H=we;let l;t[151]===C?l=t[152]:(l=(0,v.jsx)(te,{children:(0,v.jsx)(r,{id:`RY6Bq1`,values:{targetNoun:C}})}),t[151]=C,t[152]=l);let se=w.owner,ce=w.repo,d;t[153]===w.target?d=t[154]:(d=c(w.target),t[153]=w.target,t[154]=d);let f;t[155]!==w.owner||t[156]!==w.repo||t[157]!==d?(f=(0,v.jsx)(ee,{className:`sr-only`,children:(0,v.jsx)(r,{id:`f8jU-L`,values:{0:se,1:ce,2:d}})}),t[155]=w.owner,t[156]=w.repo,t[157]=d,t[158]=f):f=t[158],t[159]!==l||t[160]!==f?(U=(0,v.jsxs)(ae,{children:[l,f]}),t[159]=l,t[160]=f,t[161]=U):U=t[161],k=re;let p=w.owner,m=w.repo,h;t[162]===w.target?h=t[163]:(h=c(w.target),t[162]=w.target,t[163]=h),t[164]!==w.branch||t[165]!==w.owner||t[166]!==w.repo||t[167]!==w.target.kind||t[168]!==h?(I=(0,v.jsx)(`div`,{className:`mb-4`,children:(0,v.jsx)(le,{owner:p,repo:m,path:h,kind:w.target.kind,branch:w.branch,testId:`share-branch-switch-metadata`,branchTestId:`share-branch-switch-metadata-branch`})}),t[164]=w.branch,t[165]=w.owner,t[166]=w.repo,t[167]=w.target.kind,t[168]=h,t[169]=I):I=t[169],L=b.phase===`branch-in-other-worktree`?(0,v.jsxs)(`div`,{className:`text-sm text-muted-foreground`,"data-testid":`share-branch-switch-in-other-worktree`,children:[(0,v.jsx)(`p`,{className:`leading-6`,children:(0,v.jsx)(r,{id:`yjExfe`,values:{shareBranch:E},components:{0:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}),(0,v.jsx)(`p`,{className:`mt-2 break-all rounded bg-muted px-2 py-1 font-mono text-xs text-foreground/80`,"data-testid":`share-branch-switch-in-other-worktree-path`,children:b.otherWorktreePath})]}):b.phase===`verdict-pending`?(0,v.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,"data-testid":`share-branch-switch-verdict-pending`,role:`status`,"aria-live":`polite`,children:[(0,v.jsx)(u,{className:`h-4 w-4 animate-spin`,"aria-hidden":`true`}),(0,v.jsx)(r,{id:`c8jBgX`})]}):b.phase===`verdict`?b.resolution.kind===`on-origin`?(0,v.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,"data-testid":`share-branch-switch-verdict-on-origin`,children:(0,v.jsx)(r,{id:`Uay5NL`,values:{targetNoun:C,shareBranch:E},components:{0:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):b.resolution.kind===`renamed`?(0,v.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,"data-testid":`share-branch-switch-verdict-renamed`,children:(0,v.jsx)(r,{id:`P0HC30`,values:{0:b.resolution.renamedTo,targetNoun:C},components:{0:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):b.resolution.kind===`diverged`?(0,v.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,"data-testid":`share-branch-switch-verdict-diverged`,children:(0,v.jsx)(r,{id:`kLv8d3`,values:{shareBranch:E,targetNoun:C},components:{0:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):(0,v.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,"data-testid":`share-branch-switch-verdict-handoff`,role:`status`,"aria-live":`polite`,children:[(0,v.jsx)(u,{className:`h-4 w-4 animate-spin`,"aria-hidden":`true`}),(0,v.jsx)(r,{id:`c8jBgX`})]}):ie?(0,v.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,"data-testid":`share-branch-switch-loading`,role:`status`,"aria-live":`polite`,children:[(0,v.jsx)(u,{className:`h-4 w-4 animate-spin`,"aria-hidden":`true`}),(0,v.jsx)(r,{id:`jerqF0`})]}):s?(0,v.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,v.jsx)(r,{id:`w4hMYl`})}):K?.kind===`D`?(0,v.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,children:(0,v.jsx)(r,{id:`DTI-fp`,values:{targetNoun:C,shareBranch:E},components:{0:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):K?.kind===`B`?(0,v.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,children:(0,v.jsx)(r,{id:`sZ2IOu`,values:{targetNoun:C,shareBranch:E,currentLabel:n},components:{0:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`}),1:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):(0,v.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,children:(0,v.jsx)(r,{id:`_902BE`,values:{targetNoun:C,shareBranch:E,currentLabel:n},components:{0:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`}),1:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}),R=K&&!K.switchEnabled&&K.conflictingFiles.length>0?(0,v.jsxs)(`div`,{className:`mt-3 rounded-md border border-border bg-muted/30 p-3 text-1sm`,"data-testid":`share-branch-switch-conflict`,children:[(0,v.jsx)(`p`,{className:`font-medium text-foreground/90`,children:(0,v.jsx)(r,{id:`n2lRue`})}),(0,v.jsx)(`ul`,{id:`share-receive-branch-conflict-files`,className:`mt-1 list-disc space-y-0.5 pl-5 text-muted-foreground`,children:K.conflictingFiles.map(Ce)})]}):null,t[107]=_,t[108]=b.info,t[109]=b.otherWorktreePath,t[110]=b.phase,t[111]=b.resolution,t[112]=O,t[113]=Ye,t[114]=w.branch,t[115]=w.owner,t[116]=w.repo,t[117]=w.target,t[118]=E,t[119]=C,t[120]=k,t[121]=A,t[122]=j,t[123]=M,t[124]=N,t[125]=P,t[126]=F,t[127]=I,t[128]=L,t[129]=R,t[130]=z,t[131]=B,t[132]=V,t[133]=H,t[134]=U,t[135]=W,t[136]=G,t[137]=K,t[138]=q}else k=t[120],A=t[121],j=t[122],M=t[123],N=t[124],P=t[125],F=t[126],I=t[127],L=t[128],R=t[129],z=t[130],B=t[131],V=t[132],H=t[133],U=t[134],W=t[135],G=t[136],K=t[137],q=t[138];let J;t[170]===F?J=t[171]:(J=F?(0,v.jsxs)(`p`,{className:`mt-3 flex items-center gap-2 text-sm text-muted-foreground`,"data-testid":`share-branch-switch-switching`,role:`status`,"aria-live":`polite`,children:[(0,v.jsx)(u,{className:`h-4 w-4 animate-spin`,"aria-hidden":`true`}),(0,v.jsx)(r,{id:`CU3AiE`})]}):null,t[170]=F,t[171]=J);let Y;t[172]===M?Y=t[173]:(Y=M?(0,v.jsxs)(`p`,{className:`mt-3 flex items-center gap-2 text-sm text-muted-foreground`,"data-testid":`share-branch-switch-creating-worktree`,role:`status`,"aria-live":`polite`,children:[(0,v.jsx)(u,{className:`h-4 w-4 animate-spin`,"aria-hidden":`true`}),(0,v.jsx)(r,{id:`PZtgO0`})]}):null,t[172]=M,t[173]=Y);let X;t[174]!==k||t[175]!==I||t[176]!==L||t[177]!==R||t[178]!==J||t[179]!==Y?(X=(0,v.jsxs)(k,{children:[I,L,R,J,Y]}),t[174]=k,t[175]=I,t[176]=L,t[177]=R,t[178]=J,t[179]=Y,t[180]=X):X=t[180];let gt;t[181]===Symbol.for(`react.memo_cache_sentinel`)?(gt=(0,v.jsx)(r,{id:`dEgA5A`}),t[181]=gt):gt=t[181];let Z;t[182]===O?Z=t[183]:(Z=(0,v.jsx)(o,{variant:`ghost`,className:`font-mono uppercase`,onClick:O,"data-testid":`share-branch-switch-cancel`,children:gt}),t[182]=O,t[183]=Z);let Q;t[184]!==b.phase||t[185]!==b.resolution||t[186]!==M||t[187]!==ot||t[188]!==nt||t[189]!==ft||t[190]!==mt||t[191]!==it||t[192]!==Qe||t[193]!==et||t[194]!==N||t[195]!==P||t[196]!==F||t[197]!==K||t[198]!==q?(Q=b.phase===`branch-in-other-worktree`?(0,v.jsx)(o,{onClick:mt,"data-testid":`share-branch-switch-in-other-worktree-pivot`,children:(0,v.jsx)(r,{id:`hyCxJY`})}):b.phase===`verdict`?b.resolution.kind===`on-origin`?(0,v.jsxs)(o,{onClick:et,"data-testid":`share-branch-switch-verdict-switch-update`,children:[(0,v.jsx)(se,{className:`size-3.5`,"aria-hidden":!0}),(0,v.jsx)(r,{id:`uA_jXp`})]}):b.resolution.kind===`renamed`?(0,v.jsxs)(o,{onClick:nt,"data-testid":`share-branch-switch-verdict-open-renamed`,children:[(0,v.jsx)(ce,{className:`size-3.5`,"aria-hidden":!0}),(0,v.jsx)(r,{id:`AItsE5`})]}):b.resolution.kind===`diverged`?(0,v.jsxs)(o,{onClick:it,"data-testid":`share-branch-switch-verdict-plain-switch`,children:[(0,v.jsx)(se,{className:`size-3.5`,"aria-hidden":!0}),P]}):null:(0,v.jsxs)(`div`,{className:`flex min-w-0 flex-col-reverse gap-2 sm:flex-row sm:flex-wrap sm:justify-end sm:gap-2`,children:[K?.openCurrentEnabled?(0,v.jsxs)(o,{variant:`outline`,className:`font-mono uppercase`,onClick:ot,disabled:F||M,"data-testid":`share-branch-switch-open-current`,children:[(0,v.jsx)(ce,{className:`size-3.5`,"aria-hidden":!0}),N]}):null,(0,v.jsx)(o,{variant:`outline`,onClick:Qe,disabled:!K?.switchEnabled||F||M,"aria-disabled":!K?.switchEnabled||F||M,"aria-describedby":K&&!K.switchEnabled&&K.conflictingFiles.length>0?`share-receive-branch-conflict-files`:void 0,"data-testid":`share-branch-switch-switch`,children:F?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(u,{className:`size-3.5 animate-spin`,"aria-hidden":`true`}),P]}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(se,{className:`size-3.5`,"aria-hidden":!0}),P]})}),(0,v.jsx)(o,{onClick:ft,disabled:!K||F||M,"data-testid":`share-branch-switch-worktree`,children:M?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(u,{className:`size-3.5 animate-spin`,"aria-hidden":`true`}),q]}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(l,{className:`size-3.5`,"aria-hidden":!0}),q]})})]}),t[184]=b.phase,t[185]=b.resolution,t[186]=M,t[187]=ot,t[188]=nt,t[189]=ft,t[190]=mt,t[191]=it,t[192]=Qe,t[193]=et,t[194]=N,t[195]=P,t[196]=F,t[197]=K,t[198]=q,t[199]=Q):Q=t[199];let _t;t[200]!==Z||t[201]!==Q?(_t=(0,v.jsxs)(ie,{className:`sm:justify-between`,children:[Z,Q]}),t[200]=Z,t[201]=Q,t[202]=_t):_t=t[202];let $;t[203]!==A||t[204]!==z||t[205]!==B||t[206]!==V||t[207]!==H||t[208]!==U||t[209]!==X||t[210]!==_t?($=(0,v.jsxs)(A,{className:z,"data-testid":B,onInteractOutside:V,onPointerDownOutside:H,children:[U,X,_t]}),t[203]=A,t[204]=z,t[205]=B,t[206]=V,t[207]=H,t[208]=U,t[209]=X,t[210]=_t,t[211]=$):$=t[211];let vt;return t[212]!==j||t[213]!==W||t[214]!==G||t[215]!==$?(vt=(0,v.jsx)(j,{open:W,onOpenChange:G,children:$}),t[212]=j,t[213]=W,t[214]=G,t[215]=$,t[216]=vt):vt=t[216],vt}function Ce(e){return(0,v.jsx)(`li`,{children:(0,v.jsx)(`code`,{className:`text-foreground/80`,children:e})},e)}function we(e){e.preventDefault()}function Te(e){e.preventDefault()}function Ee(){return p.request()}function De(e){return be(e,null).state}function Oe(e){return ye(e,null)}function ke(e){return me(e,null)}function Ae(){return null}export{y as ShareBranchSwitchDialog};
|