@inkeep/open-knowledge 0.86.17-beta.3 → 0.86.17-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/cli.mjs +6 -6
  2. package/dist/constants-DeaZLquu.mjs +1 -0
  3. package/dist/index.mjs +1 -1
  4. package/dist/init-8Cr5abNk.mjs +1 -0
  5. package/dist/{init-CvyCdp2d.mjs → init-CtXpb0ul.mjs} +2 -2
  6. package/dist/{launch-json-removal-BRj3_5eq.mjs → launch-json-removal-CCyfZNY4.mjs} +1 -1
  7. package/dist/loader-BGeYO-d1.mjs +1 -0
  8. package/dist/{loader-S_g5-dc0.mjs → loader-DFZLVxnu.mjs} +1 -1
  9. package/dist/{preview-CpLnHHtN.mjs → preview-BDnb5brK.mjs} +1 -1
  10. package/dist/preview-BPzYH69J.mjs +1 -0
  11. package/dist/public/assets/{AccountSection-BPO21vUf.js → AccountSection-DA84Zzc7.js} +1 -1
  12. package/dist/public/assets/{ActivityModeContent-C2ELI_T7.js → ActivityModeContent-C-Y0fQGL.js} +1 -1
  13. package/dist/public/assets/{AddPropertiesButton-CrpxZ0jL.js → AddPropertiesButton-6doNmCHk.js} +1 -1
  14. package/dist/public/assets/{AgentDiffPane-CZxKNrkv.js → AgentDiffPane-B_DContk.js} +1 -1
  15. package/dist/public/assets/{AttachmentsSection-67spU8bD.js → AttachmentsSection-C0RrYUwl.js} +1 -1
  16. package/dist/public/assets/{CodeMirrorPropInput-CLpFWFtJ.js → CodeMirrorPropInput-CutdtFWg.js} +1 -1
  17. package/dist/public/assets/{ContentRulesSection-CH61-mRM.js → ContentRulesSection-Cx-_TVeQ.js} +1 -1
  18. package/dist/public/assets/{DocumentContext-CQ9yJTwa.js → DocumentContext-kCyJeOet.js} +1 -1
  19. package/dist/public/assets/{EditorModeToggle-Br7bWVE2.js → EditorModeToggle-BqwBm3K2.js} +1 -1
  20. package/dist/public/assets/{ExcalidrawDocEditor-CeKMRAG8.js → ExcalidrawDocEditor-BTnjPtV8.js} +1 -1
  21. package/dist/public/assets/FeedbackForm-C69qwrk2.js +1 -0
  22. package/dist/public/assets/{ImportSkillDialog-BmCzg6KC.js → ImportSkillDialog-BsXIm82I.js} +1 -1
  23. package/dist/public/assets/{LinkPreviewsSection-B9nf9R33.js → LinkPreviewsSection-CARb4E-q.js} +1 -1
  24. package/dist/public/assets/{LintConfigEditor-BbEsH5lH.js → LintConfigEditor-DcED0Hii.js} +1 -1
  25. package/dist/public/assets/{LintingSection-zFSe17qu.js → LintingSection-1p5riHJr.js} +1 -1
  26. package/dist/public/assets/ManagedArtifactProperties-DIdm2wtB.js +1 -0
  27. package/dist/public/assets/{ManagedArtifactProperties-BIw0B0y3.js → ManagedArtifactProperties-Dcttx_LD.js} +1 -1
  28. package/dist/public/assets/{MermaidDocEditor-Ci5L1_yq.js → MermaidDocEditor-BMMrW0t7.js} +1 -1
  29. package/dist/public/assets/{NetworkAccessSection-BZvYLs-8.js → NetworkAccessSection-COgbHUpP.js} +1 -1
  30. package/dist/public/assets/{PropertyDisplayRow-BjRsfbdh.js → PropertyDisplayRow-DfS-LXmJ.js} +1 -1
  31. package/dist/public/assets/{PublishToGitHubDialog-CCmFMsMn.js → PublishToGitHubDialog-Bepd054x.js} +1 -1
  32. package/dist/public/assets/{SchemaConfigEditor-DMK38biI.js → SchemaConfigEditor-Bmgaqz-2.js} +1 -1
  33. package/dist/public/assets/{SearchSection-CkHEgSyS.js → SearchSection-COCy0K9s.js} +1 -1
  34. package/dist/public/assets/{SessionsHost-C_rKn4gK.js → SessionsHost-BNqxw7vi.js} +2 -2
  35. package/dist/public/assets/{SettingsDialogBody-C3pR2lz9.js → SettingsDialogBody-CMUT1rF1.js} +2 -2
  36. package/dist/public/assets/{ShareBranchSwitchDialog-cMvRsP7t.js → ShareBranchSwitchDialog-BNGZhCgr.js} +1 -1
  37. package/dist/public/assets/{ShareReceiveMissDialog-E9CfbNf8.js → ShareReceiveMissDialog-BAF4K9WJ.js} +1 -1
  38. package/dist/public/assets/{SkillToolbarControls-BYBjkIll.js → SkillToolbarControls-BupKeb9p.js} +1 -1
  39. package/dist/public/assets/{SourceEditor-Cow_bsej.js → SourceEditor-CvoEfT7F.js} +1 -1
  40. package/dist/public/assets/{SyncSection-Ccjs60mx.js → SyncSection-BEIfMESo.js} +1 -1
  41. package/dist/public/assets/{SyncStatusBadge-C1T8mG3k.js → SyncStatusBadge-DCFtOS5t.js} +1 -1
  42. package/dist/public/assets/{TerminalSection-cT2gMi9B.js → TerminalSection-BfiF2u8b.js} +1 -1
  43. package/dist/public/assets/{TerminalWindowApp-DrbdGcCr.js → TerminalWindowApp-DzJsuqRv.js} +1 -1
  44. package/dist/public/assets/{TextDocEditor-DDhSzFSB.js → TextDocEditor-BnKkqIGO.js} +1 -1
  45. package/dist/public/assets/{ThreadView-D-_IGxvf.js → ThreadView-C9W2KxuN.js} +1 -1
  46. package/dist/public/assets/{TimelineDiffPane-VIqDTVsT.js → TimelineDiffPane-Ln9kzGle.js} +1 -1
  47. package/dist/public/assets/auth-prompt-store-C_-QXZFC.js +1 -0
  48. package/dist/public/assets/{client-version-CCRiHemw.js → client-version-DCe8o_W6.js} +1 -1
  49. package/dist/public/assets/{comment-chips-CIE82DKm.js → comment-chips-C5SWlm4P.js} +1 -1
  50. package/dist/public/assets/{config-provider-sjjSxSoD.js → config-provider-BO6LFV98.js} +1 -1
  51. package/dist/public/assets/{doc-undo-manager-JxaZtC6U.js → doc-undo-manager-Dl3bkI8d.js} +1 -1
  52. package/dist/public/assets/{index-vHGXuKt-.js → index-BDvFz9d_.js} +7 -7
  53. package/dist/public/assets/{lint-plugins-CmqJCDle.js → lint-plugins-Bm1VUGkr.js} +1 -1
  54. package/dist/public/assets/{pending-receive-nav-store-bmJhghAd.js → pending-receive-nav-store-BQaN4dQv.js} +1 -1
  55. package/dist/public/assets/{preferred-session-events-BBIFDcsA.js → preferred-session-events-ZJtPADlr.js} +1 -1
  56. package/dist/public/assets/{progress-BIEd5lIx.js → progress-B5hPfBTQ.js} +1 -1
  57. package/dist/public/assets/{selection-context-Bk-__0F7.js → selection-context-DKhvREFe.js} +1 -1
  58. package/dist/public/assets/{src-C9e8mYI6.js → src-BqGewQt5.js} +1 -1
  59. package/dist/public/assets/{telemetry-impl-CpZJfwf6.js → telemetry-impl-Dm8NmMCm.js} +1 -1
  60. package/dist/public/assets/{telemetry-startup-DwFA1jFv.js → telemetry-startup-CaMUckwD.js} +1 -1
  61. package/dist/public/assets/{typing-burst-detector-BoVzKGHe.js → typing-burst-detector-Bx-tJ0Xa.js} +1 -1
  62. package/dist/public/assets/{use-activity-panel-CKMLbVv1.js → use-activity-panel-BvMa4lMc.js} +1 -1
  63. package/dist/public/assets/{use-open-skill-BFjCoRE7.js → use-open-skill-ClU4UkE4.js} +1 -1
  64. package/dist/public/assets/{use-terminal-enabled-B61pD1lf.js → use-terminal-enabled-Do44dcYv.js} +1 -1
  65. package/dist/public/assets/{use-timeline-entry-diff-DnMPpGTx.js → use-timeline-entry-diff-Cagjyjw7.js} +1 -1
  66. package/dist/public/index.html +20 -20
  67. package/dist/{registry-probes-_IsrAHiX.mjs → registry-probes-Br8W-Weh.mjs} +1 -1
  68. package/dist/{removal-file-path-nIjE8OaK.mjs → removal-file-path-DQWsmhyK.mjs} +1 -1
  69. package/dist/{repair-launch-json-CitXUvEN.mjs → repair-launch-json-BNbjx_7w.mjs} +1 -1
  70. package/dist/{repair-mcp-configs-DU143---.mjs → repair-mcp-configs-DV8Qn3sQ.mjs} +1 -1
  71. package/dist/{src-BRfo3ikA.mjs → src-CazRCt5G.mjs} +1 -1
  72. package/dist/src-D7eKOx6_.mjs +1 -0
  73. package/dist/{start-zvLt4Aja.mjs → start-B4mP3qmX.mjs} +2 -2
  74. package/dist/start-BOXCSMYG.mjs +1 -0
  75. package/package.json +4 -4
  76. package/dist/constants-BG85h0cv.mjs +0 -1
  77. package/dist/init-B2tEhkpv.mjs +0 -1
  78. package/dist/loader-_DDcFacF.mjs +0 -1
  79. package/dist/preview-Bth2y4VS.mjs +0 -1
  80. package/dist/public/assets/FeedbackForm-C8sXd3Wb.js +0 -1
  81. package/dist/public/assets/ManagedArtifactProperties-BTKjGqhE.js +0 -1
  82. package/dist/public/assets/auth-prompt-store-BVF1DJFW.js +0 -1
  83. package/dist/src-BzYivx7V.mjs +0 -1
  84. package/dist/start-D7bmjnyB.mjs +0 -1
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./AboutSection-LPELvEUl.js","./chunk-CYidjpOJ.js","./dist-Nvb76hAm.js","./jsx-runtime-BUgB2tll.js","./react-f2sANaYj.js","./label-CvMpFFbN.js","./dist-DTFuvKje.js","./dist-CSCUSbQc.js","./react-dom-DPxgxlDT.js","./compiler-runtime-BfE3aGVn.js","./utils-CPqDy6Hr.js","./bundle-mjs-SHeFpKGC.js","./switch-BKZTXkzu.js","./dist-DBXmXNZF.js","./dist-CRjqnzU7.js","./arrow-up-right-nJaICi16.js","./createLucideIcon-DdBzwsHe.js","./spinner-Bx8xD6f8.js","./SettingsSectionHeader-DDNA1hrR.js","./tooltip-Bz6z4_se.js","./dist-DXjgFhPl2.js","./floating-ui.dom-BYl7JZd0.js","./dist-CxbWbOvU.js","./badge-DmdA1C7r.js","./dist-BsJYDohW.js","./external-link-8lDpeCuR.js","./button-DzgjsZzC.js","./SharingSection-Y4AD8HPt.js","./radio-group-G1GR05Rb.js","./dist-uiDX6Nr9.js","./dist-BKgU0kag.js","./dist-BGzUo_18.js","./ConfigSharingInfoTooltip-DSloJmkE.js","./info-CyR0W2SK.js","./skeleton-CrbF9ppq.js","./channel-cli-copy-DOAEiMde.js","./constants-product-BVSOzxVs.js","./AccountSection-BPO21vUf.js","./SyncStatusBadge-C1T8mG3k.js","./config-provider-sjjSxSoD.js","./trace-api-BSvaJNnr.js","./status-BNivpG-Q.js","./dist-PQ5KMVDh.js","./schemas-api-CD98jV86.js","./schemas-B93JY9Ef.js","./_envelope-q8XHEv4O-C-Qnl5Tu.js","./share-D-LUU2aX-B7Yg0G_m.js","./util-doc-name-DRKmy6g9.js","./constants-cc1-Bt4QPTUe.js","./constants-github-B7yhDvQc.js","./doc-extensions-CcO7K8uD-DG9uHV54.js","./logging-renderer-log-CqIZVUIQ.js","./skill-targets-schema-D6kA7J61.js","./constants-editors-DmmORwNP.js","./use-apply-config-language-DhdpbJI9.js","./preload-helper-Chd9yIcd.js","./dist-C_FzPxEX2.js","./messages-B8VdcD3O.js","./client-version-CCRiHemw.js","./css-color-to-hex-BRv_r6oZ.js","./use-apply-config-color-theme-hiddt1uL.js","./use-apply-config-theme-CYFG76sS.js","./saved-themes-client-D09wxYQm.js","./constants-upload-CVKO8P4d.js","./select-pACXgFe2.js","./es2015-Dtr4fzLT.js","./check-B2OLRY33.js","./chevron-down-CEv6N8LG.js","./collapsible-BKbszYZV.js","./arrow-up-BGHhPj4y.js","./chevron-right-Bofu4lib.js","./settings-2-DoBlNQMk.js","./git-merge-VDBzSZBV.js","./refresh-cw-CC7UZEnZ.js","./terminal-Cpb4l1oH.js","./triangle-alert-BXrUEeRU.js","./DisclosureWarning-CYHeueUe.js","./terminal-command-events-h-p66odT.js","./handoff-DzPPe6fp.js","./dialog-BJEjKJjL.js","./electron-drag-strip-D9GZhMg_.js","./x-DM2drskU.js","./popover-Mb1GgB61.js","./dist-Cj3Bpren.js","./use-conflicts-BAjZ5TAV.js","./documents-events-ddyuXdQl.js","./schemas-cc1-B3Jf9JeC.js","./config-errors-DDAH9fqy.js","./use-git-sync-status-PkMYmN4D.js","./doc-hash-BJkweiX9.js","./reveal-editor-SLzwvD1I.js","./use-settings-route-Bj-m9X61.js","./keyboard-shortcuts-FtScAm_I.js","./dist-Dc8tD1th.js","./w3c-keyname-C7Rznu6R.js","./trash-2-CchZ0T47.js","./AuthModal-DT32BOAJ.js","./copy-DpWa6i2v.js","./input-BsFOyzfK.js","./auth-state-cache-Bx6C01Jt.js","./AgentConnectionsSection-DhbJCdHu.js","./useQuery-ZeEDLtxh.js","./RegisteredAgentIcon-FmoZTlpS.js","./cursor-DWbF35K0.js","./agent-registry-DoeDgmSS.js","./search-CFu4WXqc.js","./TerminalLaunchContext-DWUMDSpw.js","./agent-connections-DSKODCmO.js","./alert-dialog-BA3e7-10.js","./checkbox-CKD8LETI.js","./minus-DdRxss3A.js","./folder-QqUoFRPR.js","./monitor-IXzxTnmk.js","./sparkles-BS2TX_Um.js","./AgentIconCluster-DYP1yNXm.js","./OpenInAgentMenuItem-DUU1-QP7.js","./dropdown-menu-5XqyQTVx.js","./dist-C0nuYMFu.js","./dist-d2WYntJB.js","./copilot-Dh1BU6kS.js","./utils-random-uuid-D7CMpgvf.js","./mascot-outline-CtS592mc.js","./field-DFJgKWGh.js","./separator-D7s_9ZwH.js","./tool-list-format-CS7MZY1Q.js","./constants-skills-BLHVRW90.js","./bool-pref-CqB9j4bL.js","./storage-scope-ldi41iCU.js","./bridge-BeevbgaB.js","./structural-freshness-CIbkMFA3-CWi_lyiW.js","./terminal-cli-display-Irv_lU4O.js","./settings-section-labels-VKfUFuEe.js","./catalog-C1GEA-Va.js","./use-workspace-Bgh-YT5K.js","./AttachmentsSection-67spU8bD.js","./field-controls-CKb1JSHS.js","./toggle-group-B7p69Qfd.js","./circle-alert-eBm4JPxY.js","./ThemePicker-pc5gwEur.js","./plus-zPnYzcqL.js","./rotate-ccw-Zi1IjIg9.js","./form-U6OjlA0v.js","./textarea-DYYN2PV4.js","./config-schema-CIaXsCAX.js","./config-validation-events-Bq1HmeDP.js","./ContentRulesSection-CH61-mRM.js","./markdown-lint-BuEapKhE.js","./lib-CHTgVmKZ.js","./ccount-DGTHxXcy.js","./syntax-YjkwC8Y2.js","./markdownit-BNu6K0Lc.js","./field-controls-CCcf2ybM.js","./HotkeysSection-C9sCf3j3.js","./settings-host-gates-DEfVpJcs.js","./kbd-Cg1nrB7U.js","./IntegrationsSection-D3htSKMO.js","./InstallInClaudeDesktopDialog-RH9RYFyV.js","./arrow-right-NOQZeKIW.js","./circle-check-nK1yRBIw.js","./download-BouT3__0.js","./LinkPreviewsSection-B9nf9R33.js","./LintingSection-zFSe17qu.js","./CodeMirrorPropInput-CLpFWFtJ.js","./dist-DTvyxWzB.js","./dist-BosZaL03.js","./dist-CBBf5U_8.js","./dist-nSDmHl8c.js","./dist-DL4JUOn7.js","./dist-urhiDaCp.js","./dist-D2c3re7d.js","./dist-BjL32yBS.js","./dist-Jw9rDwKW.js","./dist-DxN51Ana2.js","./stex-BAMK64Qm.js","./lib-DjmHwbg0.js","./space-separated-tokens-BMeAno6f.js","./trim-lines-6NHDbF9s.js","./folder-open-COGOeTzI.js","./with-selector-zVo3Fruj.js","./navigation-targets-DSSJ_2xi.js","./file-tree-utils-CiVz_BRk.js","./doc-paths-DiEZR__C.js","./cm-theme-Dml6DrPs.js","./desktop-bridge-p6CFXLIz.js","./page-list-cache-p7dO1d0k.js","./documents-fetch-BPNWNaEf.js","./note-window-mode-CI3Yju9B.js","./DocumentContext-CQ9yJTwa.js","./propagation-api-B1IlUKzT.js","./context-api-B9rp0hJb.js","./lib-DggJrklf.js","./lib-BiDTxxNs.js","./lib-qLdVx2Nx.js","./git-branch-CeTudSak.js","./Mermaid-BUWNFmOJ.js","./maximize-2-DjzhPUDZ.js","./ime-composition-_BDVzXn4.js","./prop-types-ZtKgQMRh.js","./hash-C4CJQURT.js","./local-menu-action-bus-Dyh2UJJF.js","./paperclip-BHdV1F_7.js","./react-error-boundary-6ac6QM6R.js","./CopyButton-BTy3joJd.js","./PageListContext-CbzXXblg.js","./parse-api-error-CeEVOj25.js","./startup-marks-Cb3e8PuI.js","./perf-CPPbaRwr.js","./diagnostic-breadcrumb-DPgUDxA8.js","./file-tree-rename-validation-DAMy4Ak1.js","./use-collab-url-BWFGjvvU.js","./api-config-BeqD_2Y2.js","./excalidraw-scene-7qRUVF00.js","./known-skill-dirs-WpNGuhvr.js","./single-file-mode-_W9sHrBm.js","./skill-scope-DOTLd4gL.js","./skills-api-zXSg3eSX.js","./DocumentContext-B0sQn39F.css","./lint-plugin-meta-CtDE2R0v.js","./square-pen-BoydeSu6.js","./DeleteConfirmationDialog-CUUTX6Ez.js","./SkillPluginBundleDialog-BmLQqQms.js","./SkillInstallMenu-DyKWxkEY.js","./ChangedOutsideBadge-DhpGZlDx.js","./context-menu-B5MxEep2.js","./dist-BzicVdNV.js","./use-skills-B2fLFrq6.js","./use-skill-targets-DIBQkXNG.js","./markdownlint-rule-browser-BQ4c4vDN.js","./tag-pill-input-D6mNhknm.js","./lint-config-client-DRJNyM2s.js","./use-open-skill-BFjCoRE7.js","./open-managed-artifact-tab-Bgndx1BG.js","./schema-fields-view-intent-DvM5_nmW.js","./NetworkAccessSection-BZvYLs-8.js","./restart-collab-server-DKIjp3iW.js","./OkignoreSection-BudJQycp.js","./sortable.esm-CFAacZUM.js","./grip-vertical-DNbkgWZL.js","./config-ignore-nested-error-events-DvR3WEey.js","./ProjectTemplatesSection-DCliKsre.js","./TemplateRow-DsoFn6-i.js","./file-plus-DKxOZh2k.js","./folder-config-api-BDhEYA86.js","./SearchSection-CkHEgSyS.js","./use-semantic-search-status-CRj98qO1.js","./SkillsManagerSection-C0pgRzfs.js","./SlidesPluginSection-B8KiQkqa.js","./input-group-xi315pKE.js","./SyncSection-Ccjs60mx.js","./PublishToGitHubDialog-CCmFMsMn.js","./clipboard-adapter-C8gKg_7K.js","./TerminalSection-cT2gMi9B.js","./use-terminal-enabled-B61pD1lf.js","./ThemePluginSection-McKmY5If.js","./schema-section-CalUQFIh.js","./settings-fields-CAtLOUgy.js","./lint-plugins-CmqJCDle.js","./OkCliPathRow-CIrEL7IY.js","./SpellingSettings-CElN7mrA.js"])))=>i.map(i=>d[i]);
2
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./preload-helper-Chd9yIcd.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{t as o}from"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./triangle-alert-BXrUEeRU.js";import{t as c}from"./lazy-with-preload-D9fROG5C.js";import{n as l,r as u,t as d}from"./alert-RmVFIy8D.js";import{r as f}from"./settings-host-gates-DEfVpJcs.js";import{n as p}from"./settings-fields-CAtLOUgy.js";import{t as m}from"./SettingsSectionHeader-DDNA1hrR.js";var h=o(),g=e(r(),1),_=n();function v(e){return(0,g.lazy)(async()=>({default:await e()}))}var y=v(async()=>(await t(async()=>{let{AboutSection:e}=await import(`./AboutSection-LPELvEUl.js`);return{AboutSection:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]),import.meta.url)).AboutSection),b=v(async()=>(await t(async()=>{let{SharingSection:e}=await import(`./SharingSection-Y4AD8HPt.js`);return{SharingSection:e}},__vite__mapDeps([27,1,2,3,4,28,6,7,8,29,30,13,14,9,10,11,31,32,19,20,21,22,33,16,18,15,23,24,25,26,34,35,36]),import.meta.url)).SharingSection),x=v(async()=>(await t(async()=>{let{AccountSection:e}=await import(`./AccountSection-BPO21vUf.js`);return{AccountSection:e}},__vite__mapDeps([37,1,2,3,4,5,6,7,8,9,10,11,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,57,58,59,60,61,62,63,64,20,21,14,29,22,65,19,13,16,66,67,68,69,15,70,71,72,17,73,74,75,76,77,78,23,24,26,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,25,18,34,99,35]),import.meta.url)).AccountSection),S=v(async()=>(await t(async()=>{let{AgentConnectionsSection:e}=await import(`./AgentConnectionsSection-DhbJCdHu.js`);return{AgentConnectionsSection:e}},__vite__mapDeps([100,1,56,2,3,4,12,6,7,8,13,14,9,10,11,101,16,15,102,103,104,43,44,45,46,47,48,49,50,51,52,53,36,78,66,17,105,75,106,107,108,80,22,65,26,24,109,110,5,19,20,21,111,33,112,113,81,114,115,116,117,118,29,30,70,42,119,120,121,23,79,122,123,124,125,126,127,128,129,130,18,25,131,98,132,133]),import.meta.url)).AgentConnectionsSection),C=v(async()=>(await t(async()=>{let{AttachmentsSection:e}=await import(`./AttachmentsSection-67spU8bD.js`);return{AttachmentsSection:e}},__vite__mapDeps([134,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,64,20,21,6,7,14,29,22,65,19,10,11,13,16,66,67,135,12,136,30,24,137,138,28,112,139,140,95,75,141,5,26,79,80,81,122,123,98,34,142,87,143,18,15,23,25,144]),import.meta.url)).AttachmentsSection),w=v(async()=>(await t(async()=>{let{ContentRulesSection:e}=await import(`./ContentRulesSection-CH61-mRM.js`);return{ContentRulesSection:e}},__vite__mapDeps([145,39,1,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,64,20,21,6,7,14,29,22,65,19,10,11,13,16,66,67,5,12,146,147,148,149,150,18,15,23,24,25,87]),import.meta.url)).ContentRulesSection),T=v(async()=>(await t(async()=>{let{SectionSkeleton:e}=await import(`./field-controls-CCcf2ybM.js`);return{SectionSkeleton:e}},__vite__mapDeps([151,135,1,2,3,4,40,64,20,21,6,7,8,14,29,22,65,19,9,10,11,13,16,66,67,12,136,30,24,137,138,28,112,61,42,139,140,95,75,141,5,31,43,44,45,46,47,48,49,50,51,52,53,36,26,79,80,81,122,123,98,34,142,54,55,56,57,60,62,63,87,143]),import.meta.url)).SectionSkeleton),E=v(async()=>(await t(async()=>{let{HotkeysSection:e}=await import(`./HotkeysSection-C9sCf3j3.js`);return{HotkeysSection:e}},__vite__mapDeps([152,2,1,3,4,9,18,19,20,21,6,7,8,14,22,10,11,15,16,23,24,25,153,154,92,93,94]),import.meta.url)).HotkeysSection),D=v(async()=>(await t(async()=>{let{IntegrationsSection:e}=await import(`./IntegrationsSection-D3htSKMO.js`);return{IntegrationsSection:e}},__vite__mapDeps([155,1,2,3,4,156,16,157,158,97,159,17,9,10,11,31,8,26,7,24,79,80,6,22,65,81,25,18,19,20,21,14,15,23]),import.meta.url)).IntegrationsSection),O=v(async()=>(await t(async()=>{let{LinkPreviewsSection:e}=await import(`./LinkPreviewsSection-B9nf9R33.js`);return{LinkPreviewsSection:e}},__vite__mapDeps([160,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,12,6,7,13,14,10,11,18,19,20,21,22,15,16,23,24,25,26,79,80,65,81,87]),import.meta.url)).LinkPreviewsSection),k=v(async()=>(await t(async()=>{let{MarkdownlintPluginSection:e}=await import(`./LintingSection-zFSe17qu.js`);return{MarkdownlintPluginSection:e}},__vite__mapDeps([161,1,162,55,163,164,94,165,166,167,168,169,170,171,172,173,21,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,56,31,8,57,58,59,60,61,2,62,63,93,147,148,174,175,176,149,16,177,95,178,179,180,181,182,183,184,25,89,185,186,129,108,6,7,80,22,65,26,24,11,10,5,12,13,14,187,188,189,64,20,29,19,66,67,68,190,128,191,192,193,69,194,157,195,75,79,81,70,137,158,97,159,196,71,197,198,33,17,110,199,200,139,105,113,201,202,203,85,86,87,204,205,206,207,208,23,98,154,82,83,209,210,211,212,90,213,214,125,215,127,133,120,216,146,150,15,217,72,218,219,76,220,109,221,116,117,118,30,111,114,115,103,119,121,222,223,224,225,226,18,227,140,122,123,34,228,229,230,231,232,91,92]),import.meta.url)).MarkdownlintPluginSection),A=v(async()=>(await t(async()=>{let{ProjectPluginsManageSection:e}=await import(`./LintingSection-zFSe17qu.js`);return{ProjectPluginsManageSection:e}},__vite__mapDeps([161,1,162,55,163,164,94,165,166,167,168,169,170,171,172,173,21,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,56,31,8,57,58,59,60,61,2,62,63,93,147,148,174,175,176,149,16,177,95,178,179,180,181,182,183,184,25,89,185,186,129,108,6,7,80,22,65,26,24,11,10,5,12,13,14,187,188,189,64,20,29,19,66,67,68,190,128,191,192,193,69,194,157,195,75,79,81,70,137,158,97,159,196,71,197,198,33,17,110,199,200,139,105,113,201,202,203,85,86,87,204,205,206,207,208,23,98,154,82,83,209,210,211,212,90,213,214,125,215,127,133,120,216,146,150,15,217,72,218,219,76,220,109,221,116,117,118,30,111,114,115,103,119,121,222,223,224,225,226,18,227,140,122,123,34,228,229,230,231,232,91,92]),import.meta.url)).ProjectPluginsManageSection),j=v(async()=>(await t(async()=>{let{UserPluginsManageSection:e}=await import(`./LintingSection-zFSe17qu.js`);return{UserPluginsManageSection:e}},__vite__mapDeps([161,1,162,55,163,164,94,165,166,167,168,169,170,171,172,173,21,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,56,31,8,57,58,59,60,61,2,62,63,93,147,148,174,175,176,149,16,177,95,178,179,180,181,182,183,184,25,89,185,186,129,108,6,7,80,22,65,26,24,11,10,5,12,13,14,187,188,189,64,20,29,19,66,67,68,190,128,191,192,193,69,194,157,195,75,79,81,70,137,158,97,159,196,71,197,198,33,17,110,199,200,139,105,113,201,202,203,85,86,87,204,205,206,207,208,23,98,154,82,83,209,210,211,212,90,213,214,125,215,127,133,120,216,146,150,15,217,72,218,219,76,220,109,221,116,117,118,30,111,114,115,103,119,121,222,223,224,225,226,18,227,140,122,123,34,228,229,230,231,232,91,92]),import.meta.url)).UserPluginsManageSection),M=v(async()=>(await t(async()=>{let{NetworkAccessSection:e}=await import(`./NetworkAccessSection-BZvYLs-8.js`);return{NetworkAccessSection:e}},__vite__mapDeps([233,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,108,6,7,80,22,65,26,24,11,10,5,28,29,30,13,14,12,18,19,20,21,15,16,23,25,98,35,234,87,143]),import.meta.url)).NetworkAccessSection),N=v(async()=>(await t(async()=>{let{OkignoreSection:e}=await import(`./OkignoreSection-BudJQycp.js`);return{OkignoreSection:e}},__vite__mapDeps([235,1,236,8,4,2,3,19,20,21,6,7,14,22,9,10,11,66,16,237,75,81,31,203,56,179,180,48,47,181,63,50,184,85,86,44,87,36,185,204,205,206,207,51,18,15,23,24,25,238,26,98,34,144]),import.meta.url)).OkignoreSection),P=v(async()=>(await t(async()=>{let{ProjectTemplatesSection:e}=await import(`./ProjectTemplatesSection-DCliKsre.js`);return{ProjectTemplatesSection:e}},__vite__mapDeps([239,1,2,3,4,139,16,9,240,56,108,6,7,8,80,22,65,26,24,11,10,116,117,118,20,21,14,29,30,66,70,241,95,81,31,43,44,45,46,47,48,49,50,51,52,53,36,219,17,79,122,5,123,98,142,85,86,87,242,204,18,19,15,23,25,34,231,89,91,92,93,94]),import.meta.url)).ProjectTemplatesSection),F=v(async()=>(await t(async()=>{let{SearchSection:e}=await import(`./SearchSection-CkHEgSyS.js`);return{SearchSection:e}},__vite__mapDeps([243,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,68,6,7,12,13,14,10,11,70,16,244,85,86,87,18,19,20,21,22,15,23,24,25,26,79,80,65,81,122,5,123,98,35,143]),import.meta.url)).SearchSection),I=v(async()=>(await t(async()=>{let{SkillsManagerSection:e}=await import(`./SkillsManagerSection-C0pgRzfs.js`);return{SkillsManagerSection:e}},__vite__mapDeps([245,1,2,3,4,108,6,7,8,80,22,65,9,26,24,11,10,16,157,116,117,118,20,21,14,29,30,66,70,97,95,31,114,19,111,113,115,42,103,119,120,121,53,36,222,18,15,23,25,79,81,98,34,226,56,43,44,45,46,47,48,49,50,51,52,85,86,87,204,215,225,212,231,89,206,207,214,125,124]),import.meta.url)).SkillsManagerSection),L=v(async()=>(await t(async()=>{let{SlidesPluginSection:e}=await import(`./SlidesPluginSection-B8KiQkqa.js`);return{SlidesPluginSection:e}},__vite__mapDeps([246,1,2,3,4,15,16,74,9,202,19,20,21,6,7,8,14,22,10,11,66,97,26,24,77,78,45,44,46,47,18,23,25,247,98,142,91,92,93,94]),import.meta.url)).SlidesPluginSection),R=v(async()=>(await t(async()=>{let{SyncSection:e}=await import(`./SyncSection-Ccjs60mx.js`);return{SyncSection:e}},__vite__mapDeps([248,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,64,20,21,6,7,14,29,22,65,19,10,11,13,16,66,67,68,136,30,24,38,69,15,70,71,72,17,73,74,75,76,77,78,23,26,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,96,97,98,25,249,5,28,187,163,164,165,166,167,168,169,170,171,172,173,162,147,148,174,175,176,149,177,95,178,179,180,181,182,183,184,185,186,129,188,189,12,190,128,191,192,193,194,157,195,137,158,159,196,197,198,33,110,199,200,139,105,113,201,202,203,204,205,206,207,208,154,209,210,211,212,213,214,125,215,127,133,120,216,122,123,142,250,18,34]),import.meta.url)).SyncSection),z=v(async()=>(await t(async()=>{let{TerminalSection:e}=await import(`./TerminalSection-cT2gMi9B.js`);return{TerminalSection:e}},__vite__mapDeps([251,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,12,6,7,13,14,10,11,18,19,20,21,22,15,16,23,24,25,252,87,35]),import.meta.url)).TerminalSection),B=v(async()=>(await t(async()=>{let{ThemePluginSection:e}=await import(`./ThemePluginSection-McKmY5If.js`);return{ThemePluginSection:e}},__vite__mapDeps([253,1,2,3,4,5,6,7,8,9,10,11,15,16,42,31,43,44,45,46,47,48,49,50,51,52,53,36,254,141,135,40,64,20,21,14,29,22,65,19,13,66,67,12,136,30,24,137,138,28,112,61,139,140,95,75,26,79,80,81,122,123,98,34,142,54,55,56,57,60,62,63,87,143,18,23,25,144,255]),import.meta.url)).ThemePluginSection),V=v(async()=>{let{LINT_PLUGIN_UI:e}=await t(async()=>{let{LINT_PLUGIN_UI:e}=await import(`./lint-plugins-CmqJCDle.js`);return{LINT_PLUGIN_UI:e}},__vite__mapDeps([256,217,16,1,4,161,162,55,163,164,94,165,166,167,168,169,170,171,172,173,21,39,40,41,42,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,56,31,8,57,58,59,60,61,2,62,63,93,147,148,174,175,176,149,177,95,178,179,180,181,182,183,184,25,89,185,186,129,108,6,7,80,22,65,26,24,11,10,5,12,13,14,187,188,189,64,20,29,19,66,67,68,190,128,191,192,193,69,194,157,195,75,79,81,70,137,158,97,159,196,71,197,198,33,17,110,199,200,139,105,113,201,202,203,85,86,87,204,205,206,207,208,23,98,154,82,83,209,210,211,212,90,213,214,125,215,127,133,120,216,146,150,15,72,218,219,76,220,109,221,116,117,118,30,111,114,115,103,119,121,222,223,224,225,226,18,227,140,122,123,34,228,229,230,231,232,91,92]),import.meta.url);return function({id:t}){let n=e.find(e=>e.id===t);if(!n)return null;let r=n.Section;return(0,_.jsx)(r,{})}}),H=c(async()=>{let[{BoundSchemaSection:e},{OkCliPathRow:n},{SpellingSettings:r}]=await Promise.all([t(()=>import(`./schema-section-CalUQFIh.js`),__vite__mapDeps([254,1,141,7,4,5,6,8,3,9,10,11,31,135,2,40,64,20,21,14,29,22,65,19,13,16,66,67,12,136,30,24,137,138,28,112,61,42,139,140,95,75,43,44,45,46,47,48,49,50,51,52,53,36,26,79,80,81,122,123,98,34,142,54,55,56,57,60,62,63,87,143,18,15,23,25,144]),import.meta.url),t(()=>import(`./OkCliPathRow-CIrEL7IY.js`),__vite__mapDeps([257,1,2,3,4,109,6,7,8,13,14,66,16,110,9,10,11,5,19,20,21,22,33,31,26,24,35,36]),import.meta.url),t(()=>import(`./SpellingSettings-CElN7mrA.js`),__vite__mapDeps([258,1,21,20,6,7,4,8,3,14,56,2,12,13,9,10,11,19,22,66,16,140,81,31,178,135,40,64,29,65,67,136,30,24,137,138,28,112,61,42,139,95,75,141,5,43,44,45,46,47,48,49,50,51,52,53,36,26,79,80,122,123,98,34,142,54,55,57,60,62,63,87,143,153]),import.meta.url)]);return{default:function({title:t,description:i,binding:a}){return(0,_.jsx)(e,{title:t,description:i,scope:`user`,scopeBadge:`user`,binding:a,fields:p,slotsAfter:{"appearance.theme":(0,_.jsx)(n,{}),"appearance.language":(0,_.jsx)(r,{})}})}}}),U=H.preload;function W(e){let t=(0,h.c)(4),{loadFailed:n}=e;if(!n){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(T,{}),t[0]=e):e=t[0],e}let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,_.jsx)(s,{"aria-hidden":`true`}),t[1]=r):r=t[1];let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,_.jsx)(u,{children:(0,_.jsx)(i,{id:`PXg8xK`})}),t[2]=a):a=t[2];let o;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,_.jsxs)(d,{"data-testid":`settings-user-config-unavailable`,children:[r,a,(0,_.jsx)(l,{children:(0,_.jsx)(i,{id:`rFbQzX`})})]}),t[3]=o):o=t[3],o}function G(e){let t=(0,h.c)(37),{activeId:n,userBinding:r,userLoadFailed:o,okignoreBinding:s,okignoreSynced:c,markdownlintRuleQuery:l}=e,u=o===void 0?!1:o,{_:d}=a();if(n===`preferences`){let e;return t[0]!==d||t[1]!==r||t[2]!==u?(e=r?(0,_.jsx)(H,{title:d({id:`Q6hhn8`}),description:d({id:`Y_kL7X`}),binding:r}):(0,_.jsx)(W,{loadFailed:u}),t[0]=d,t[1]=r,t[2]=u,t[3]=e):e=t[3],e}if(n===`project-preferences`){let e;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(i,{id:`Q6hhn8`}),t[4]=e):e=t[4];let n;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,_.jsxs)(`section`,{"aria-labelledby":`settings-project-preferences-title`,className:`space-y-8`,"data-testid":`settings-project-preferences`,children:[(0,_.jsx)(m,{titleId:`settings-project-preferences-title`,title:e,scope:`project`,children:(0,_.jsx)(i,{id:`FKVmcC`})}),(0,_.jsx)(C,{}),(0,_.jsx)(w,{}),f()?(0,_.jsx)(z,{}):null]}),t[5]=n):n=t[5],n}if(n===`agent-connections`){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(S,{}),t[6]=e):e=t[6],e}if(n===`hotkeys`){let e;return t[7]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(E,{}),t[7]=e):e=t[7],e}if(n===`account`){let e;return t[8]!==r||t[9]!==u?(e=r?(0,_.jsx)(x,{userBinding:r}):(0,_.jsx)(W,{loadFailed:u}),t[8]=r,t[9]=u,t[10]=e):e=t[10],e}if(n===`sync`){let e;return t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsxs)(`section`,{"aria-labelledby":`settings-sync-sharing-title`,className:`space-y-8`,"data-testid":`settings-sync-sharing`,children:[(0,_.jsx)(m,{titleId:`settings-sync-sharing-title`,title:(0,_.jsx)(i,{id:`AznQ2V`}),children:(0,_.jsx)(i,{id:`HADdBA`})}),(0,_.jsx)(R,{}),(0,_.jsx)(b,{})]}),t[11]=e):e=t[11],e}if(n===`search`){let e;return t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(F,{}),t[12]=e):e=t[12],e}if(n===`link-previews`){let e;return t[13]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(O,{}),t[13]=e):e=t[13],e}if(n===`plugins-manage`){let e;return t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(A,{}),t[14]=e):e=t[14],e}if(n===`user-plugins-manage`){let e;return t[15]===r?e=t[16]:(e=(0,_.jsx)(j,{userBinding:r}),t[15]=r,t[16]=e),e}if(n===`plugin:theme`){let e;return t[17]!==r||t[18]!==u?(e=r?(0,_.jsx)(B,{userBinding:r}):(0,_.jsx)(W,{loadFailed:u}),t[17]=r,t[18]=u,t[19]=e):e=t[19],e}if(n===`plugin:slides`){let e;return t[20]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(L,{}),t[20]=e):e=t[20],e}if(n===`plugin:markdownlint`){let e=l??null,n;return t[21]===e?n=t[22]:(n=(0,_.jsx)(k,{initialRuleQuery:e}),t[21]=e,t[22]=n),n}if(n.startsWith(`plugin:`)){let e;t[23]===n?e=t[24]:(e=n.slice(7),t[23]=n,t[24]=e);let r;return t[25]!==n||t[26]!==e?(r=(0,_.jsx)(V,{id:e},n),t[25]=n,t[26]=e,t[27]=r):r=t[27],r}if(n===`project-templates`){let e;return t[28]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(P,{}),t[28]=e):e=t[28],e}if(n===`skills`){let e;return t[29]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(I,{scope:`project`}),t[29]=e):e=t[29],e}if(n===`user-skills`){let e;return t[30]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(I,{scope:`global`}),t[30]=e):e=t[30],e}if(n===`okignore`){let e;return t[31]!==s||t[32]!==c?(e=(0,_.jsx)(N,{binding:s,synced:c}),t[31]=s,t[32]=c,t[33]=e):e=t[33],e}if(n===`network-access`){let e;return t[34]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(M,{}),t[34]=e):e=t[34],e}if(n===`claude-desktop`){let e;return t[35]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(D,{}),t[35]=e):e=t[35],e}if(n===`about`){let e;return t[36]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(y,{}),t[36]=e):e=t[36],e}return null}export{G as SettingsDialogBody,U as preloadPreferencesSection};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./AboutSection-LPELvEUl.js","./chunk-CYidjpOJ.js","./dist-Nvb76hAm.js","./jsx-runtime-BUgB2tll.js","./react-f2sANaYj.js","./label-CvMpFFbN.js","./dist-DTFuvKje.js","./dist-CSCUSbQc.js","./react-dom-DPxgxlDT.js","./compiler-runtime-BfE3aGVn.js","./utils-CPqDy6Hr.js","./bundle-mjs-SHeFpKGC.js","./switch-BKZTXkzu.js","./dist-DBXmXNZF.js","./dist-CRjqnzU7.js","./arrow-up-right-nJaICi16.js","./createLucideIcon-DdBzwsHe.js","./spinner-Bx8xD6f8.js","./SettingsSectionHeader-DDNA1hrR.js","./tooltip-Bz6z4_se.js","./dist-DXjgFhPl2.js","./floating-ui.dom-BYl7JZd0.js","./dist-CxbWbOvU.js","./badge-DmdA1C7r.js","./dist-BsJYDohW.js","./external-link-8lDpeCuR.js","./button-DzgjsZzC.js","./SharingSection-Y4AD8HPt.js","./radio-group-G1GR05Rb.js","./dist-uiDX6Nr9.js","./dist-BKgU0kag.js","./dist-BGzUo_18.js","./ConfigSharingInfoTooltip-DSloJmkE.js","./info-CyR0W2SK.js","./skeleton-CrbF9ppq.js","./channel-cli-copy-DOAEiMde.js","./constants-product-BVSOzxVs.js","./AccountSection-DA84Zzc7.js","./SyncStatusBadge-DCFtOS5t.js","./config-provider-BO6LFV98.js","./trace-api-BSvaJNnr.js","./status-BNivpG-Q.js","./dist-PQ5KMVDh.js","./schemas-api-CD98jV86.js","./schemas-B93JY9Ef.js","./_envelope-q8XHEv4O-C-Qnl5Tu.js","./share-D-LUU2aX-B7Yg0G_m.js","./util-doc-name-DRKmy6g9.js","./constants-cc1-Bt4QPTUe.js","./constants-github-B7yhDvQc.js","./doc-extensions-CcO7K8uD-DG9uHV54.js","./logging-renderer-log-CqIZVUIQ.js","./skill-targets-schema-D6kA7J61.js","./constants-editors-DmmORwNP.js","./use-apply-config-language-DhdpbJI9.js","./preload-helper-Chd9yIcd.js","./dist-C_FzPxEX2.js","./messages-B8VdcD3O.js","./client-version-DCe8o_W6.js","./css-color-to-hex-BRv_r6oZ.js","./use-apply-config-color-theme-hiddt1uL.js","./use-apply-config-theme-CYFG76sS.js","./saved-themes-client-D09wxYQm.js","./constants-upload-CVKO8P4d.js","./select-pACXgFe2.js","./es2015-Dtr4fzLT.js","./check-B2OLRY33.js","./chevron-down-CEv6N8LG.js","./collapsible-BKbszYZV.js","./arrow-up-BGHhPj4y.js","./chevron-right-Bofu4lib.js","./settings-2-DoBlNQMk.js","./git-merge-VDBzSZBV.js","./refresh-cw-CC7UZEnZ.js","./terminal-Cpb4l1oH.js","./triangle-alert-BXrUEeRU.js","./DisclosureWarning-CYHeueUe.js","./terminal-command-events-h-p66odT.js","./handoff-DzPPe6fp.js","./dialog-BJEjKJjL.js","./electron-drag-strip-D9GZhMg_.js","./x-DM2drskU.js","./popover-Mb1GgB61.js","./dist-Cj3Bpren.js","./use-conflicts-BAjZ5TAV.js","./documents-events-ddyuXdQl.js","./schemas-cc1-B3Jf9JeC.js","./config-errors-DDAH9fqy.js","./use-git-sync-status-PkMYmN4D.js","./doc-hash-BJkweiX9.js","./reveal-editor-SLzwvD1I.js","./use-settings-route-Bj-m9X61.js","./keyboard-shortcuts-FtScAm_I.js","./dist-Dc8tD1th.js","./w3c-keyname-C7Rznu6R.js","./trash-2-CchZ0T47.js","./AuthModal-DT32BOAJ.js","./copy-DpWa6i2v.js","./input-BsFOyzfK.js","./auth-state-cache-Bx6C01Jt.js","./AgentConnectionsSection-DhbJCdHu.js","./useQuery-ZeEDLtxh.js","./RegisteredAgentIcon-FmoZTlpS.js","./cursor-DWbF35K0.js","./agent-registry-DoeDgmSS.js","./search-CFu4WXqc.js","./TerminalLaunchContext-DWUMDSpw.js","./agent-connections-DSKODCmO.js","./alert-dialog-BA3e7-10.js","./checkbox-CKD8LETI.js","./minus-DdRxss3A.js","./folder-QqUoFRPR.js","./monitor-IXzxTnmk.js","./sparkles-BS2TX_Um.js","./AgentIconCluster-DYP1yNXm.js","./OpenInAgentMenuItem-DUU1-QP7.js","./dropdown-menu-5XqyQTVx.js","./dist-C0nuYMFu.js","./dist-d2WYntJB.js","./copilot-Dh1BU6kS.js","./utils-random-uuid-D7CMpgvf.js","./mascot-outline-CtS592mc.js","./field-DFJgKWGh.js","./separator-D7s_9ZwH.js","./tool-list-format-CS7MZY1Q.js","./constants-skills-BLHVRW90.js","./bool-pref-CqB9j4bL.js","./storage-scope-ldi41iCU.js","./bridge-BeevbgaB.js","./structural-freshness-CIbkMFA3-CWi_lyiW.js","./terminal-cli-display-Irv_lU4O.js","./settings-section-labels-VKfUFuEe.js","./catalog-C1GEA-Va.js","./use-workspace-Bgh-YT5K.js","./AttachmentsSection-C0RrYUwl.js","./field-controls-CKb1JSHS.js","./toggle-group-B7p69Qfd.js","./circle-alert-eBm4JPxY.js","./ThemePicker-pc5gwEur.js","./plus-zPnYzcqL.js","./rotate-ccw-Zi1IjIg9.js","./form-U6OjlA0v.js","./textarea-DYYN2PV4.js","./config-schema-CIaXsCAX.js","./config-validation-events-Bq1HmeDP.js","./ContentRulesSection-Cx-_TVeQ.js","./markdown-lint-BuEapKhE.js","./lib-CHTgVmKZ.js","./ccount-DGTHxXcy.js","./syntax-YjkwC8Y2.js","./markdownit-BNu6K0Lc.js","./field-controls-CCcf2ybM.js","./HotkeysSection-C9sCf3j3.js","./settings-host-gates-DEfVpJcs.js","./kbd-Cg1nrB7U.js","./IntegrationsSection-D3htSKMO.js","./InstallInClaudeDesktopDialog-RH9RYFyV.js","./arrow-right-NOQZeKIW.js","./circle-check-nK1yRBIw.js","./download-BouT3__0.js","./LinkPreviewsSection-CARb4E-q.js","./LintingSection-1p5riHJr.js","./CodeMirrorPropInput-CutdtFWg.js","./dist-DTvyxWzB.js","./dist-BosZaL03.js","./dist-CBBf5U_8.js","./dist-nSDmHl8c.js","./dist-DL4JUOn7.js","./dist-urhiDaCp.js","./dist-D2c3re7d.js","./dist-BjL32yBS.js","./dist-Jw9rDwKW.js","./dist-DxN51Ana2.js","./stex-BAMK64Qm.js","./lib-DjmHwbg0.js","./space-separated-tokens-BMeAno6f.js","./trim-lines-6NHDbF9s.js","./folder-open-COGOeTzI.js","./with-selector-zVo3Fruj.js","./navigation-targets-DSSJ_2xi.js","./file-tree-utils-CiVz_BRk.js","./doc-paths-DiEZR__C.js","./cm-theme-Dml6DrPs.js","./desktop-bridge-p6CFXLIz.js","./page-list-cache-p7dO1d0k.js","./documents-fetch-BPNWNaEf.js","./note-window-mode-CI3Yju9B.js","./DocumentContext-kCyJeOet.js","./propagation-api-B1IlUKzT.js","./context-api-B9rp0hJb.js","./lib-DggJrklf.js","./lib-BiDTxxNs.js","./lib-qLdVx2Nx.js","./git-branch-CeTudSak.js","./Mermaid-BUWNFmOJ.js","./maximize-2-DjzhPUDZ.js","./ime-composition-_BDVzXn4.js","./prop-types-ZtKgQMRh.js","./hash-C4CJQURT.js","./local-menu-action-bus-Dyh2UJJF.js","./paperclip-BHdV1F_7.js","./react-error-boundary-6ac6QM6R.js","./CopyButton-BTy3joJd.js","./PageListContext-CbzXXblg.js","./parse-api-error-CeEVOj25.js","./startup-marks-Cb3e8PuI.js","./perf-CPPbaRwr.js","./diagnostic-breadcrumb-DPgUDxA8.js","./file-tree-rename-validation-DAMy4Ak1.js","./use-collab-url-BWFGjvvU.js","./api-config-BeqD_2Y2.js","./excalidraw-scene-7qRUVF00.js","./known-skill-dirs-WpNGuhvr.js","./single-file-mode-_W9sHrBm.js","./skill-scope-DOTLd4gL.js","./skills-api-zXSg3eSX.js","./DocumentContext-B0sQn39F.css","./lint-plugin-meta-CtDE2R0v.js","./square-pen-BoydeSu6.js","./DeleteConfirmationDialog-CUUTX6Ez.js","./SkillPluginBundleDialog-BmLQqQms.js","./SkillInstallMenu-DyKWxkEY.js","./ChangedOutsideBadge-DhpGZlDx.js","./context-menu-B5MxEep2.js","./dist-BzicVdNV.js","./use-skills-B2fLFrq6.js","./use-skill-targets-DIBQkXNG.js","./markdownlint-rule-browser-BQ4c4vDN.js","./tag-pill-input-D6mNhknm.js","./lint-config-client-DRJNyM2s.js","./use-open-skill-ClU4UkE4.js","./open-managed-artifact-tab-Bgndx1BG.js","./schema-fields-view-intent-DvM5_nmW.js","./NetworkAccessSection-COgbHUpP.js","./restart-collab-server-DKIjp3iW.js","./OkignoreSection-BudJQycp.js","./sortable.esm-CFAacZUM.js","./grip-vertical-DNbkgWZL.js","./config-ignore-nested-error-events-DvR3WEey.js","./ProjectTemplatesSection-DCliKsre.js","./TemplateRow-DsoFn6-i.js","./file-plus-DKxOZh2k.js","./folder-config-api-BDhEYA86.js","./SearchSection-COCy0K9s.js","./use-semantic-search-status-CRj98qO1.js","./SkillsManagerSection-C0pgRzfs.js","./SlidesPluginSection-B8KiQkqa.js","./input-group-xi315pKE.js","./SyncSection-BEIfMESo.js","./PublishToGitHubDialog-Bepd054x.js","./clipboard-adapter-C8gKg_7K.js","./TerminalSection-BfiF2u8b.js","./use-terminal-enabled-Do44dcYv.js","./ThemePluginSection-McKmY5If.js","./schema-section-CalUQFIh.js","./settings-fields-CAtLOUgy.js","./lint-plugins-Bm1VUGkr.js","./OkCliPathRow-CIrEL7IY.js","./SpellingSettings-CElN7mrA.js"])))=>i.map(i=>d[i]);
2
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./preload-helper-Chd9yIcd.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{t as o}from"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./triangle-alert-BXrUEeRU.js";import{t as c}from"./lazy-with-preload-D9fROG5C.js";import{n as l,r as u,t as d}from"./alert-RmVFIy8D.js";import{r as f}from"./settings-host-gates-DEfVpJcs.js";import{n as p}from"./settings-fields-CAtLOUgy.js";import{t as m}from"./SettingsSectionHeader-DDNA1hrR.js";var h=o(),g=e(r(),1),_=n();function v(e){return(0,g.lazy)(async()=>({default:await e()}))}var y=v(async()=>(await t(async()=>{let{AboutSection:e}=await import(`./AboutSection-LPELvEUl.js`);return{AboutSection:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]),import.meta.url)).AboutSection),b=v(async()=>(await t(async()=>{let{SharingSection:e}=await import(`./SharingSection-Y4AD8HPt.js`);return{SharingSection:e}},__vite__mapDeps([27,1,2,3,4,28,6,7,8,29,30,13,14,9,10,11,31,32,19,20,21,22,33,16,18,15,23,24,25,26,34,35,36]),import.meta.url)).SharingSection),x=v(async()=>(await t(async()=>{let{AccountSection:e}=await import(`./AccountSection-DA84Zzc7.js`);return{AccountSection:e}},__vite__mapDeps([37,1,2,3,4,5,6,7,8,9,10,11,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,57,58,59,60,61,62,63,64,20,21,14,29,22,65,19,13,16,66,67,68,69,15,70,71,72,17,73,74,75,76,77,78,23,24,26,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,25,18,34,99,35]),import.meta.url)).AccountSection),S=v(async()=>(await t(async()=>{let{AgentConnectionsSection:e}=await import(`./AgentConnectionsSection-DhbJCdHu.js`);return{AgentConnectionsSection:e}},__vite__mapDeps([100,1,56,2,3,4,12,6,7,8,13,14,9,10,11,101,16,15,102,103,104,43,44,45,46,47,48,49,50,51,52,53,36,78,66,17,105,75,106,107,108,80,22,65,26,24,109,110,5,19,20,21,111,33,112,113,81,114,115,116,117,118,29,30,70,42,119,120,121,23,79,122,123,124,125,126,127,128,129,130,18,25,131,98,132,133]),import.meta.url)).AgentConnectionsSection),C=v(async()=>(await t(async()=>{let{AttachmentsSection:e}=await import(`./AttachmentsSection-C0RrYUwl.js`);return{AttachmentsSection:e}},__vite__mapDeps([134,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,64,20,21,6,7,14,29,22,65,19,10,11,13,16,66,67,135,12,136,30,24,137,138,28,112,139,140,95,75,141,5,26,79,80,81,122,123,98,34,142,87,143,18,15,23,25,144]),import.meta.url)).AttachmentsSection),w=v(async()=>(await t(async()=>{let{ContentRulesSection:e}=await import(`./ContentRulesSection-Cx-_TVeQ.js`);return{ContentRulesSection:e}},__vite__mapDeps([145,39,1,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,64,20,21,6,7,14,29,22,65,19,10,11,13,16,66,67,5,12,146,147,148,149,150,18,15,23,24,25,87]),import.meta.url)).ContentRulesSection),T=v(async()=>(await t(async()=>{let{SectionSkeleton:e}=await import(`./field-controls-CCcf2ybM.js`);return{SectionSkeleton:e}},__vite__mapDeps([151,135,1,2,3,4,40,64,20,21,6,7,8,14,29,22,65,19,9,10,11,13,16,66,67,12,136,30,24,137,138,28,112,61,42,139,140,95,75,141,5,31,43,44,45,46,47,48,49,50,51,52,53,36,26,79,80,81,122,123,98,34,142,54,55,56,57,60,62,63,87,143]),import.meta.url)).SectionSkeleton),E=v(async()=>(await t(async()=>{let{HotkeysSection:e}=await import(`./HotkeysSection-C9sCf3j3.js`);return{HotkeysSection:e}},__vite__mapDeps([152,2,1,3,4,9,18,19,20,21,6,7,8,14,22,10,11,15,16,23,24,25,153,154,92,93,94]),import.meta.url)).HotkeysSection),D=v(async()=>(await t(async()=>{let{IntegrationsSection:e}=await import(`./IntegrationsSection-D3htSKMO.js`);return{IntegrationsSection:e}},__vite__mapDeps([155,1,2,3,4,156,16,157,158,97,159,17,9,10,11,31,8,26,7,24,79,80,6,22,65,81,25,18,19,20,21,14,15,23]),import.meta.url)).IntegrationsSection),O=v(async()=>(await t(async()=>{let{LinkPreviewsSection:e}=await import(`./LinkPreviewsSection-CARb4E-q.js`);return{LinkPreviewsSection:e}},__vite__mapDeps([160,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,12,6,7,13,14,10,11,18,19,20,21,22,15,16,23,24,25,26,79,80,65,81,87]),import.meta.url)).LinkPreviewsSection),k=v(async()=>(await t(async()=>{let{MarkdownlintPluginSection:e}=await import(`./LintingSection-1p5riHJr.js`);return{MarkdownlintPluginSection:e}},__vite__mapDeps([161,1,162,55,163,164,94,165,166,167,168,169,170,171,172,173,21,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,56,31,8,57,58,59,60,61,2,62,63,93,147,148,174,175,176,149,16,177,95,178,179,180,181,182,183,184,25,89,185,186,129,108,6,7,80,22,65,26,24,11,10,5,12,13,14,187,188,189,64,20,29,19,66,67,68,190,128,191,192,193,69,194,157,195,75,79,81,70,137,158,97,159,196,71,197,198,33,17,110,199,200,139,105,113,201,202,203,85,86,87,204,205,206,207,208,23,98,154,82,83,209,210,211,212,90,213,214,125,215,127,133,120,216,146,150,15,217,72,218,219,76,220,109,221,116,117,118,30,111,114,115,103,119,121,222,223,224,225,226,18,227,140,122,123,34,228,229,230,231,232,91,92]),import.meta.url)).MarkdownlintPluginSection),A=v(async()=>(await t(async()=>{let{ProjectPluginsManageSection:e}=await import(`./LintingSection-1p5riHJr.js`);return{ProjectPluginsManageSection:e}},__vite__mapDeps([161,1,162,55,163,164,94,165,166,167,168,169,170,171,172,173,21,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,56,31,8,57,58,59,60,61,2,62,63,93,147,148,174,175,176,149,16,177,95,178,179,180,181,182,183,184,25,89,185,186,129,108,6,7,80,22,65,26,24,11,10,5,12,13,14,187,188,189,64,20,29,19,66,67,68,190,128,191,192,193,69,194,157,195,75,79,81,70,137,158,97,159,196,71,197,198,33,17,110,199,200,139,105,113,201,202,203,85,86,87,204,205,206,207,208,23,98,154,82,83,209,210,211,212,90,213,214,125,215,127,133,120,216,146,150,15,217,72,218,219,76,220,109,221,116,117,118,30,111,114,115,103,119,121,222,223,224,225,226,18,227,140,122,123,34,228,229,230,231,232,91,92]),import.meta.url)).ProjectPluginsManageSection),j=v(async()=>(await t(async()=>{let{UserPluginsManageSection:e}=await import(`./LintingSection-1p5riHJr.js`);return{UserPluginsManageSection:e}},__vite__mapDeps([161,1,162,55,163,164,94,165,166,167,168,169,170,171,172,173,21,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,56,31,8,57,58,59,60,61,2,62,63,93,147,148,174,175,176,149,16,177,95,178,179,180,181,182,183,184,25,89,185,186,129,108,6,7,80,22,65,26,24,11,10,5,12,13,14,187,188,189,64,20,29,19,66,67,68,190,128,191,192,193,69,194,157,195,75,79,81,70,137,158,97,159,196,71,197,198,33,17,110,199,200,139,105,113,201,202,203,85,86,87,204,205,206,207,208,23,98,154,82,83,209,210,211,212,90,213,214,125,215,127,133,120,216,146,150,15,217,72,218,219,76,220,109,221,116,117,118,30,111,114,115,103,119,121,222,223,224,225,226,18,227,140,122,123,34,228,229,230,231,232,91,92]),import.meta.url)).UserPluginsManageSection),M=v(async()=>(await t(async()=>{let{NetworkAccessSection:e}=await import(`./NetworkAccessSection-COgbHUpP.js`);return{NetworkAccessSection:e}},__vite__mapDeps([233,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,108,6,7,80,22,65,26,24,11,10,5,28,29,30,13,14,12,18,19,20,21,15,16,23,25,98,35,234,87,143]),import.meta.url)).NetworkAccessSection),N=v(async()=>(await t(async()=>{let{OkignoreSection:e}=await import(`./OkignoreSection-BudJQycp.js`);return{OkignoreSection:e}},__vite__mapDeps([235,1,236,8,4,2,3,19,20,21,6,7,14,22,9,10,11,66,16,237,75,81,31,203,56,179,180,48,47,181,63,50,184,85,86,44,87,36,185,204,205,206,207,51,18,15,23,24,25,238,26,98,34,144]),import.meta.url)).OkignoreSection),P=v(async()=>(await t(async()=>{let{ProjectTemplatesSection:e}=await import(`./ProjectTemplatesSection-DCliKsre.js`);return{ProjectTemplatesSection:e}},__vite__mapDeps([239,1,2,3,4,139,16,9,240,56,108,6,7,8,80,22,65,26,24,11,10,116,117,118,20,21,14,29,30,66,70,241,95,81,31,43,44,45,46,47,48,49,50,51,52,53,36,219,17,79,122,5,123,98,142,85,86,87,242,204,18,19,15,23,25,34,231,89,91,92,93,94]),import.meta.url)).ProjectTemplatesSection),F=v(async()=>(await t(async()=>{let{SearchSection:e}=await import(`./SearchSection-COCy0K9s.js`);return{SearchSection:e}},__vite__mapDeps([243,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,68,6,7,12,13,14,10,11,70,16,244,85,86,87,18,19,20,21,22,15,23,24,25,26,79,80,65,81,122,5,123,98,35,143]),import.meta.url)).SearchSection),I=v(async()=>(await t(async()=>{let{SkillsManagerSection:e}=await import(`./SkillsManagerSection-C0pgRzfs.js`);return{SkillsManagerSection:e}},__vite__mapDeps([245,1,2,3,4,108,6,7,8,80,22,65,9,26,24,11,10,16,157,116,117,118,20,21,14,29,30,66,70,97,95,31,114,19,111,113,115,42,103,119,120,121,53,36,222,18,15,23,25,79,81,98,34,226,56,43,44,45,46,47,48,49,50,51,52,85,86,87,204,215,225,212,231,89,206,207,214,125,124]),import.meta.url)).SkillsManagerSection),L=v(async()=>(await t(async()=>{let{SlidesPluginSection:e}=await import(`./SlidesPluginSection-B8KiQkqa.js`);return{SlidesPluginSection:e}},__vite__mapDeps([246,1,2,3,4,15,16,74,9,202,19,20,21,6,7,8,14,22,10,11,66,97,26,24,77,78,45,44,46,47,18,23,25,247,98,142,91,92,93,94]),import.meta.url)).SlidesPluginSection),R=v(async()=>(await t(async()=>{let{SyncSection:e}=await import(`./SyncSection-BEIfMESo.js`);return{SyncSection:e}},__vite__mapDeps([248,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,64,20,21,6,7,14,29,22,65,19,10,11,13,16,66,67,68,136,30,24,38,69,15,70,71,72,17,73,74,75,76,77,78,23,26,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,96,97,98,25,249,5,28,187,163,164,165,166,167,168,169,170,171,172,173,162,147,148,174,175,176,149,177,95,178,179,180,181,182,183,184,185,186,129,188,189,12,190,128,191,192,193,194,157,195,137,158,159,196,197,198,33,110,199,200,139,105,113,201,202,203,204,205,206,207,208,154,209,210,211,212,213,214,125,215,127,133,120,216,122,123,142,250,18,34]),import.meta.url)).SyncSection),z=v(async()=>(await t(async()=>{let{TerminalSection:e}=await import(`./TerminalSection-BfiF2u8b.js`);return{TerminalSection:e}},__vite__mapDeps([251,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,12,6,7,13,14,10,11,18,19,20,21,22,15,16,23,24,25,252,87,35]),import.meta.url)).TerminalSection),B=v(async()=>(await t(async()=>{let{ThemePluginSection:e}=await import(`./ThemePluginSection-McKmY5If.js`);return{ThemePluginSection:e}},__vite__mapDeps([253,1,2,3,4,5,6,7,8,9,10,11,15,16,42,31,43,44,45,46,47,48,49,50,51,52,53,36,254,141,135,40,64,20,21,14,29,22,65,19,13,66,67,12,136,30,24,137,138,28,112,61,139,140,95,75,26,79,80,81,122,123,98,34,142,54,55,56,57,60,62,63,87,143,18,23,25,144,255]),import.meta.url)).ThemePluginSection),V=v(async()=>{let{LINT_PLUGIN_UI:e}=await t(async()=>{let{LINT_PLUGIN_UI:e}=await import(`./lint-plugins-Bm1VUGkr.js`);return{LINT_PLUGIN_UI:e}},__vite__mapDeps([256,217,16,1,4,161,162,55,163,164,94,165,166,167,168,169,170,171,172,173,21,39,40,41,42,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,56,31,8,57,58,59,60,61,2,62,63,93,147,148,174,175,176,149,177,95,178,179,180,181,182,183,184,25,89,185,186,129,108,6,7,80,22,65,26,24,11,10,5,12,13,14,187,188,189,64,20,29,19,66,67,68,190,128,191,192,193,69,194,157,195,75,79,81,70,137,158,97,159,196,71,197,198,33,17,110,199,200,139,105,113,201,202,203,85,86,87,204,205,206,207,208,23,98,154,82,83,209,210,211,212,90,213,214,125,215,127,133,120,216,146,150,15,72,218,219,76,220,109,221,116,117,118,30,111,114,115,103,119,121,222,223,224,225,226,18,227,140,122,123,34,228,229,230,231,232,91,92]),import.meta.url);return function({id:t}){let n=e.find(e=>e.id===t);if(!n)return null;let r=n.Section;return(0,_.jsx)(r,{})}}),H=c(async()=>{let[{BoundSchemaSection:e},{OkCliPathRow:n},{SpellingSettings:r}]=await Promise.all([t(()=>import(`./schema-section-CalUQFIh.js`),__vite__mapDeps([254,1,141,7,4,5,6,8,3,9,10,11,31,135,2,40,64,20,21,14,29,22,65,19,13,16,66,67,12,136,30,24,137,138,28,112,61,42,139,140,95,75,43,44,45,46,47,48,49,50,51,52,53,36,26,79,80,81,122,123,98,34,142,54,55,56,57,60,62,63,87,143,18,15,23,25,144]),import.meta.url),t(()=>import(`./OkCliPathRow-CIrEL7IY.js`),__vite__mapDeps([257,1,2,3,4,109,6,7,8,13,14,66,16,110,9,10,11,5,19,20,21,22,33,31,26,24,35,36]),import.meta.url),t(()=>import(`./SpellingSettings-CElN7mrA.js`),__vite__mapDeps([258,1,21,20,6,7,4,8,3,14,56,2,12,13,9,10,11,19,22,66,16,140,81,31,178,135,40,64,29,65,67,136,30,24,137,138,28,112,61,42,139,95,75,141,5,43,44,45,46,47,48,49,50,51,52,53,36,26,79,80,122,123,98,34,142,54,55,57,60,62,63,87,143,153]),import.meta.url)]);return{default:function({title:t,description:i,binding:a}){return(0,_.jsx)(e,{title:t,description:i,scope:`user`,scopeBadge:`user`,binding:a,fields:p,slotsAfter:{"appearance.theme":(0,_.jsx)(n,{}),"appearance.language":(0,_.jsx)(r,{})}})}}}),U=H.preload;function W(e){let t=(0,h.c)(4),{loadFailed:n}=e;if(!n){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(T,{}),t[0]=e):e=t[0],e}let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,_.jsx)(s,{"aria-hidden":`true`}),t[1]=r):r=t[1];let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,_.jsx)(u,{children:(0,_.jsx)(i,{id:`PXg8xK`})}),t[2]=a):a=t[2];let o;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,_.jsxs)(d,{"data-testid":`settings-user-config-unavailable`,children:[r,a,(0,_.jsx)(l,{children:(0,_.jsx)(i,{id:`rFbQzX`})})]}),t[3]=o):o=t[3],o}function G(e){let t=(0,h.c)(37),{activeId:n,userBinding:r,userLoadFailed:o,okignoreBinding:s,okignoreSynced:c,markdownlintRuleQuery:l}=e,u=o===void 0?!1:o,{_:d}=a();if(n===`preferences`){let e;return t[0]!==d||t[1]!==r||t[2]!==u?(e=r?(0,_.jsx)(H,{title:d({id:`Q6hhn8`}),description:d({id:`Y_kL7X`}),binding:r}):(0,_.jsx)(W,{loadFailed:u}),t[0]=d,t[1]=r,t[2]=u,t[3]=e):e=t[3],e}if(n===`project-preferences`){let e;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(i,{id:`Q6hhn8`}),t[4]=e):e=t[4];let n;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,_.jsxs)(`section`,{"aria-labelledby":`settings-project-preferences-title`,className:`space-y-8`,"data-testid":`settings-project-preferences`,children:[(0,_.jsx)(m,{titleId:`settings-project-preferences-title`,title:e,scope:`project`,children:(0,_.jsx)(i,{id:`FKVmcC`})}),(0,_.jsx)(C,{}),(0,_.jsx)(w,{}),f()?(0,_.jsx)(z,{}):null]}),t[5]=n):n=t[5],n}if(n===`agent-connections`){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(S,{}),t[6]=e):e=t[6],e}if(n===`hotkeys`){let e;return t[7]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(E,{}),t[7]=e):e=t[7],e}if(n===`account`){let e;return t[8]!==r||t[9]!==u?(e=r?(0,_.jsx)(x,{userBinding:r}):(0,_.jsx)(W,{loadFailed:u}),t[8]=r,t[9]=u,t[10]=e):e=t[10],e}if(n===`sync`){let e;return t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsxs)(`section`,{"aria-labelledby":`settings-sync-sharing-title`,className:`space-y-8`,"data-testid":`settings-sync-sharing`,children:[(0,_.jsx)(m,{titleId:`settings-sync-sharing-title`,title:(0,_.jsx)(i,{id:`AznQ2V`}),children:(0,_.jsx)(i,{id:`HADdBA`})}),(0,_.jsx)(R,{}),(0,_.jsx)(b,{})]}),t[11]=e):e=t[11],e}if(n===`search`){let e;return t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(F,{}),t[12]=e):e=t[12],e}if(n===`link-previews`){let e;return t[13]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(O,{}),t[13]=e):e=t[13],e}if(n===`plugins-manage`){let e;return t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(A,{}),t[14]=e):e=t[14],e}if(n===`user-plugins-manage`){let e;return t[15]===r?e=t[16]:(e=(0,_.jsx)(j,{userBinding:r}),t[15]=r,t[16]=e),e}if(n===`plugin:theme`){let e;return t[17]!==r||t[18]!==u?(e=r?(0,_.jsx)(B,{userBinding:r}):(0,_.jsx)(W,{loadFailed:u}),t[17]=r,t[18]=u,t[19]=e):e=t[19],e}if(n===`plugin:slides`){let e;return t[20]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(L,{}),t[20]=e):e=t[20],e}if(n===`plugin:markdownlint`){let e=l??null,n;return t[21]===e?n=t[22]:(n=(0,_.jsx)(k,{initialRuleQuery:e}),t[21]=e,t[22]=n),n}if(n.startsWith(`plugin:`)){let e;t[23]===n?e=t[24]:(e=n.slice(7),t[23]=n,t[24]=e);let r;return t[25]!==n||t[26]!==e?(r=(0,_.jsx)(V,{id:e},n),t[25]=n,t[26]=e,t[27]=r):r=t[27],r}if(n===`project-templates`){let e;return t[28]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(P,{}),t[28]=e):e=t[28],e}if(n===`skills`){let e;return t[29]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(I,{scope:`project`}),t[29]=e):e=t[29],e}if(n===`user-skills`){let e;return t[30]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(I,{scope:`global`}),t[30]=e):e=t[30],e}if(n===`okignore`){let e;return t[31]!==s||t[32]!==c?(e=(0,_.jsx)(N,{binding:s,synced:c}),t[31]=s,t[32]=c,t[33]=e):e=t[33],e}if(n===`network-access`){let e;return t[34]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(M,{}),t[34]=e):e=t[34],e}if(n===`claude-desktop`){let e;return t[35]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(D,{}),t[35]=e):e=t[35],e}if(n===`about`){let e;return t[36]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(y,{}),t[36]=e):e=t[36],e}return null}export{G as SettingsDialogBody,U as preloadPreferencesSection};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./button-DzgjsZzC.js";import{n as s}from"./dist-BGzUo_18.js";import{t as ee}from"./dist-C_FzPxEX2.js";import{t as c}from"./desktop-bridge-types-BxqZkaz9.js";import{n as l,t as te}from"./git-branch-CeTudSak.js";import{t as u}from"./spinner-Bx8xD6f8.js";import{n as ne,t as d}from"./miss-dialog-store-CsiJb9Ou.js";import{a as re,c as ie,i as ae,n as oe,o as f,s as se,t as ce}from"./dialog-BJEjKJjL.js";import{t as le}from"./tool-list-format-CS7MZY1Q.js";import{i as ue,n as p,t as m}from"./auth-prompt-store-BVF1DJFW.js";import{a as h,n as de}from"./receive-store-3PZqJEKz.js";import{t as fe}from"./share-metadata-rows-C_o8h27z.js";var g=e(n(),1),pe=a();function me(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 he(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`};case`unsafe-symlinks`:return{action:`refused-unsafe-symlinks`,paths:e.refusedSymlinkPaths??[]};case`symlink-check-failed`:return{action:`stay-with-toast`,reason:`symlink-check-failed`};default:{let t=e.reason;throw Error(`Unhandled CheckoutFailureReason: ${String(t)}`)}}}var ge={phase:`loading`};function _e(e,t){return e.phase===`loading`?t===null?{phase:`error`}:{phase:`ready`,info:t}:e}function ve(e,t){return e.phase!==`ready`&&e.phase!==`verdict`?e:{phase:`switching`,info:e.info,pendingDoc:t}}function ye(e){return e.phase===`ready`?{phase:`creating-worktree`,info:e.info}:e}function be(e){return me(e).kind===`B`&&e.shareTargetOnOriginBranch===!1}function xe(e){return e.phase===`ready`?{phase:`verdict-pending`,info:e.info}:e}function Se(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 Ce(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`}}}:n.action===`refused-unsafe-symlinks`?{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:`unsafe-symlinks`,paths:n.paths}}:{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:n.reason}}}function we(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`}}:t.reason===`project-scope-unavailable`?{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:t.reason,projectScopeIssue:t.issue}}:t.reason===`unsafe-symlinks`?{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:t.reason,paths:t.refusedSymlinkPaths}}:{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:t.reason,helper:t.helper,authFailed:t.reason===`fetch-failed`?t.authFailed:void 0,notFoundAsIdentity:t.reason===`fetch-failed`?t.notFoundAsIdentity:void 0}}:{state:e}}var v=t();function Te(e){return c(e.repositoryTarget)}function Ee(e,t=c(e.target)){let n=e.contentRootDepth===null?t:[...Te(e).split(`/`).slice(0,e.contentRootDepth),...t===``?[]:t.split(`/`)].join(`/`);return{kind:e.target.kind,path:t,repositoryPath:n,...e.contentRootDepth===null?{}:{contentRootDepth:e.contentRootDepth}}}function De(e){return e!==null&&e.kind===`project-branch-switch`}var Oe=5;function ke(e){return`share-branch-unsafe-symlinks:${e}`}function Ae(e){let t=(0,pe.c)(221),{bridge:n,store:a}=e,m=a===void 0?de:a,{_}=i(),Ae;t[0]===_?Ae=t[1]:(Ae=function(e){let t=e.slice(0,Oe),n=e.length-t.length,r=n>0?[...t,_({id:`pCJv30`,values:{hiddenCount:n}})]:t;return r.length===0?void 0:le(r,ee.locale)},t[0]=_,t[1]=Ae);let y=Ae,b=(0,g.useSyncExternalStore)(m.subscribe,m.getSnapshot,Re),[x,S]=(0,g.useState)(ge),ze=(0,g.useRef)(!1),Be=(0,g.useRef)(!1),Ve=(0,g.useRef)(!1),He=(0,g.useRef)(null),Ue;t[2]===b?Ue=t[3]:(Ue=De(b)?b:null,t[2]=b,t[3]=Ue);let C=Ue,We;t[4]!==_||t[5]!==C?.share.target.kind?(We=C?.share.target.kind===`folder`?_({id:`ugoTXs`}):_({id:`XH30C4`}),t[4]=_,t[5]=C?.share.target.kind,t[6]=We):We=t[6];let w=We,Ge;t[7]===C?Ge=t[8]:(Ge=()=>{S(ge),ze.current=!1,Be.current=!1,Ve.current=!1,He.current=C},t[7]=C,t[8]=Ge);let Ke;t[9]===b?Ke=t[10]:(Ke=[b],t[9]=b,t[10]=Ke),(0,g.useEffect)(Ge,Ke);let qe;t[11]!==C||t[12]!==n?(qe=()=>{if(!C||ze.current)return;ze.current=!0;let e=!1;return n.project.fetchBranchInfo({projectPath:C.projectPath,branch:C.share.branch,kind:C.share.repositoryTarget.kind,path:Te(C.share)}).then(t=>{e||S(e=>_e(e,t))}).catch(t=>{e||(console.warn(`[receive] branch-info-fetch-failed`,t instanceof Error?t.message:t),S(Le))}),()=>{e=!0}},t[11]=C,t[12]=n,t[13]=qe):qe=t[13];let Je;t[14]===C?Je=t[15]:(Je=[C],t[14]=C,t[15]=Je),(0,g.useEffect)(qe,Je);let Ye;t[16]!==C||t[17]!==x.info||t[18]!==x.phase||t[19]!==n?(Ye=()=>{if(!C||x.phase!==`ready`||Ve.current||!be(x.info))return;Ve.current=!0,S(xe);let e=C;n.project.fetchTargetStatus({projectPath:C.projectPath,branch:C.share.branch,kind:C.share.target.kind,path:Te(C.share),...C.share.contentRootDepth===null?{}:{contentRootDepth:C.share.contentRootDepth}}).then(t=>{He.current===e&&S(e=>Se(e,t))}).catch(t=>{He.current===e&&(console.warn(`[receive] target-status-fetch-failed`,t instanceof Error?t.message:t),S(Ie))})},t[16]=C,t[17]=x.info,t[18]=x.phase,t[19]=n,t[20]=Ye):Ye=t[20];let Xe;t[21]!==C||t[22]!==x.phase?(Xe=[x.phase,C],t[21]=C,t[22]=x.phase,t[23]=Xe):Xe=t[23],(0,g.useEffect)(Ye,Xe);let Ze;t[24]!==C||t[25]!==x.phase||t[26]!==x.resolution||t[27]!==m?(Ze=()=>{if(x.phase!==`verdict`)return;let{kind:e}=x.resolution;e!==`deleted`&&e!==`never-on-branch`||C&&(d.arm({kind:C.share.target.kind,path:c(C.share.target),repositoryPath:Te(C.share),...C.share.contentRootDepth===null?{}:{contentRootDepth:C.share.contentRootDepth},branch:C.share.branch}),m.dismiss())},t[24]=C,t[25]=x.phase,t[26]=x.resolution,t[27]=m,t[28]=Ze):Ze=t[28];let Qe;t[29]!==C||t[30]!==x||t[31]!==m?(Qe=[x,C,m],t[29]=C,t[30]=x,t[31]=m,t[32]=Qe):Qe=t[32],(0,g.useEffect)(Ze,Qe);let $e;t[33]!==x.phase||t[34]!==x.resolution?($e=()=>{x.phase===`verdict`&&console.log(h({verdict_cell:x.resolution.kind}))},t[33]=x.phase,t[34]=x.resolution,t[35]=$e):$e=t[35];let et;t[36]===x?et=t[37]:(et=[x],t[36]=x,t[37]=et),(0,g.useEffect)($e,et);let tt;t[38]!==_||t[39]!==C||t[40]!==x.pendingDoc||t[41]!==x.phase||t[42]!==n||t[43]!==m||t[44]!==w?(tt=()=>{if(x.phase!==`awaiting-cc1-recycle`||!C)return;let e=C.share.branch,t=x.pendingDoc;if(!e){m.dismiss();return}if(Be.current)return;Be.current=!0;let r=!1;return n.project.awaitBranchSwitched({projectPath:C.projectPath,branch:e,timeoutMs:3e4}).then(i=>{if(!r){if(i.ok){console.log(h({branch_dialog_action:`branch-switch-complete`,branch:e})),n.project.open({path:C.projectPath,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:Ee(C.share,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:w}}))}),m.dismiss();return}console.log(h({branch_dialog_action:`branch-switch-timeout`,branch:e})),s.error(_({id:`LBwUR6`,values:{targetNoun:w}})),m.dismiss()}}).catch(e=>{r||(console.warn(`[receive] awaitBranchSwitched rejected`,e instanceof Error?e.message:e),s.error(_({id:`Jw6EC4`,values:{targetNoun:w}})),m.dismiss())}),()=>{r=!0}},t[38]=_,t[39]=C,t[40]=x.pendingDoc,t[41]=x.phase,t[42]=n,t[43]=m,t[44]=w,t[45]=tt):tt=t[45];let nt;if(t[46]!==C||t[47]!==x.phase?(nt=[x.phase,C],t[46]=C,t[47]=x.phase,t[48]=nt):nt=t[48],(0,g.useEffect)(tt,nt),!C)return null;let{share:T,projectPath:E,currentBranch:rt}=C,D=T.branch,it;t[49]!==_||t[50]!==n.project||t[51]!==E||t[52]!==y||t[53]!==D||t[54]!==m?(it=function(e,t,r){console.log(h({branch_dialog_action:`switch`,branch_action:`switch`,branch:D,verdict_cell:r})),S(t=>ve(t,e)),n.project.runCheckout(t?{projectPath:E,branch:D,fastForward:!0}:{projectPath:E,branch:D}).then(e=>{let t=null,n=!1,r=[];S(i=>{let{state:a,sideEffect:o}=Ce(i,e);return o&&(t=o.reason,r=o.paths??[],n=a.phase===`dismissed`),a});let i=ke(D);t!==`unsafe-symlinks`&&s.dismiss(i),t===`unsafe-symlinks`?s.error(_({id:`461Vg9`,values:{shareBranch:D}}),{description:y(r),id:i,duration:1/0}):t===`branch-not-found`?s.error(_({id:`NJyQi_`,values:{shareBranch:D}})):t===`fetch-failed`?s.error(_({id:`bWLmRK`})):t===`symlink-check-failed`?s.error(_({id:`0uxLib`,values:{shareBranch:D}})):(t===`checkout-failed`||t===`proxy-null`)&&s.error(_({id:`c863eW`,values:{shareBranch:D}})),n&&m.dismiss()}).catch(e=>{console.warn(`[receive] runCheckout rejected branch_action=switch`,e instanceof Error?e.message:e),S(Fe),s.dismiss(ke(D)),s.error(_({id:`c863eW`,values:{shareBranch:D}}))})},t[49]=_,t[50]=n.project,t[51]=E,t[52]=y,t[53]=D,t[54]=m,t[55]=it):it=t[55];let O=it,at;t[56]!==x.info||t[57]!==x.phase||t[58]!==O||t[59]!==T.target?(at=function(){x.phase===`ready`&&me(x.info).switchEnabled&&O(c(T.target),!1)},t[56]=x.info,t[57]=x.phase,t[58]=O,t[59]=T.target,t[60]=at):at=t[60];let ot=at,st;t[61]!==x.phase||t[62]!==x.resolution||t[63]!==O||t[64]!==T.target?(st=function(){x.phase===`verdict`&&O(c(T.target),!0,x.resolution.kind)},t[61]=x.phase,t[62]=x.resolution,t[63]=O,t[64]=T.target,t[65]=st):st=t[65];let ct=st,lt;t[66]!==x.phase||t[67]!==x.resolution||t[68]!==O?(lt=function(){x.phase===`verdict`&&x.resolution.kind===`renamed`&&O(x.resolution.renamedTo,!0,x.resolution.kind)},t[66]=x.phase,t[67]=x.resolution,t[68]=O,t[69]=lt):lt=t[69];let ut=lt,dt;t[70]!==x.phase||t[71]!==x.resolution||t[72]!==O||t[73]!==T.target?(dt=function(){x.phase===`verdict`&&O(c(T.target),!1,x.resolution.kind)},t[70]=x.phase,t[71]=x.resolution,t[72]=O,t[73]=T.target,t[74]=dt):dt=t[74];let ft=dt,pt;t[75]!==_||t[76]!==n.project||t[77]!==E||t[78]!==T||t[79]!==D||t[80]!==m||t[81]!==w?(pt=function(){console.log(h({branch_dialog_action:`open-current`,branch:D})),n.project.open({path:E,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:Ee(T)}).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:w}}))}),m.dismiss()},t[75]=_,t[76]=n.project,t[77]=E,t[78]=T,t[79]=D,t[80]=m,t[81]=w,t[82]=pt):pt=t[82];let mt=pt,ht;t[83]!==_||t[84]!==y||t[85]!==D?(ht=function(e){let{reason:t}=e,n=`helper`in e?e.helper:void 0,r=`authFailed`in e?e.authFailed:void 0,i=`notFoundAsIdentity`in e?e.notFoundAsIdentity:void 0;if(t===`fetch-failed`&&i){s.error(_({id:`jRsjlF`}));return}if(t===`fetch-failed`&&r){s.error(_({id:`gfb-CM`}),{action:{label:_({id:`5lWFkC`}),onClick:Pe}});return}switch(t){case`helper-not-found`:{let e=n??_({id:`cHhH3i`});s.error(_({id:`Z7x_Zh`,values:{tool:e}}));return}case`branch-not-found`:s.error(_({id:`NJyQi_`,values:{shareBranch:D}}));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:D}}));return;case`path-exists`:s.error(_({id:`cN1Gcp`,values:{shareBranch:D}}));return;case`no-git`:s.error(_({id:`CFnavk`}));return;case`empty-repo`:s.error(_({id:`5IgYAM`}));return;case`invalid-branch`:s.error(_({id:`JfPuv7`,values:{shareBranch:D}}));return;case`project-scope-unavailable`:s.error(_(p({reason:t,issue:e.projectScopeIssue})));return;case`unsafe-symlinks`:s.error(_({id:`_6cS9O`,values:{shareBranch:D}}),{description:y(e.paths),id:ke(D),duration:1/0});return;case`proxy-null`:case`error`:s.error(_({id:`e8zYa8`,values:{shareBranch:D}}));return;default:throw Error(`Unhandled worktree failure reason: ${String(t)}`)}},t[83]=_,t[84]=y,t[85]=D,t[86]=ht):ht=t[86];let gt=ht,_t;t[87]!==_||t[88]!==n.project||t[89]!==T||t[90]!==D||t[91]!==gt||t[92]!==m?(_t=function(e){e?.ok===!1&&e.reason===`project-scope-unavailable`&&ue();let t,r=!1,i=null;if(S(n=>{let{state:a,sideEffect:o}=we(n,e);return o&&(t=o,r=a.phase===`dismissed`),a.phase===`opening-worktree`&&(i=a.path),a}),t?.reason!==`unsafe-symlinks`&&s.dismiss(ke(D)),t!==void 0&&(console.log(h({branch_dialog_action:`open-worktree-failed:${t.reason}`,branch:D})),gt(t)),i!==null){ue();let e=i;n.project.open({path:e,target:`new-window`,entryPoint:`worktree`,pendingDeepLinkTarget:Ee(T),pendingBranch:D}).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}}))}),m.dismiss()}r&&m.dismiss()},t[87]=_,t[88]=n.project,t[89]=T,t[90]=D,t[91]=gt,t[92]=m,t[93]=_t):_t=t[93];let vt=_t,yt;t[94]!==vt||t[95]!==x.phase||t[96]!==n.worktree||t[97]!==D?(yt=function(){x.phase===`ready`&&(console.log(h({branch_dialog_action:`open-worktree`,branch:D})),S(ye),n.worktree.checkout({branch:D}).then(e=>{vt(e)}).catch(e=>{console.warn(`[receive] worktree-checkout rejected branch_dialog_action=open-worktree`,e instanceof Error?e.message:e),vt(null)}))},t[94]=vt,t[95]=x.phase,t[96]=n.worktree,t[97]=D,t[98]=yt):yt=t[98];let bt=yt,xt;t[99]!==_||t[100]!==x.otherWorktreePath||t[101]!==x.phase||t[102]!==n.project||t[103]!==T||t[104]!==D||t[105]!==m?(xt=function(){if(x.phase!==`branch-in-other-worktree`)return;let e=x.otherWorktreePath;console.log(h({branch_dialog_action:`pivot-to-other-worktree`,branch:D})),n.project.open({path:e,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:Ee(T),pendingBranch:D}).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}}))}),m.dismiss()},t[99]=_,t[100]=x.otherWorktreePath,t[101]=x.phase,t[102]=n.project,t[103]=T,t[104]=D,t[105]=m,t[106]=xt):xt=t[106];let St=xt,Ct;t[107]!==x.phase||t[108]!==x.resolution||t[109]!==m?(Ct=function(){console.log(h({branch_dialog_action:`cancel`,verdict_cell:x.phase===`verdict`?x.resolution.kind:void 0})),m.dismiss()},t[107]=x.phase,t[108]=x.resolution,t[109]=m,t[110]=Ct):Ct=t[110];let k=Ct,A,j,M,N,P,F,I,L,R,z,B,V,H,U,W,G,K,q,J;if(t[111]!==_||t[112]!==x.info||t[113]!==x.otherWorktreePath||t[114]!==x.phase||t[115]!==x.resolution||t[116]!==k||t[117]!==rt||t[118]!==T.branch||t[119]!==T.owner||t[120]!==T.repo||t[121]!==T.target||t[122]!==D||t[123]!==w){q=x.phase===`ready`||x.phase===`switching`||x.phase===`creating-worktree`?me(x.info):null;let e;t[143]!==x.info||t[144]!==x.phase||t[145]!==rt?(e=x.phase===`ready`||x.phase===`switching`||x.phase===`creating-worktree`?he(x.info):rt??`HEAD`,t[143]=x.info,t[144]=x.phase,t[145]=rt,t[146]=e):e=t[146];let n=e;I=x.phase===`switching`||x.phase===`awaiting-cc1-recycle`,N=x.phase===`creating-worktree`;let i;t[147]===_?i=t[148]:(i=_({id:`OuY8t9`}),t[147]=_,t[148]=i),P=i;let a;t[149]===_?a=t[150]:(a=_({id:`XZkdtg`}),t[149]=_,t[150]=a),F=a;let o;t[151]===_?o=t[152]:(o=_({id:`VTulZj`}),t[151]=_,t[152]=o),J=o;let s=x.phase===`loading`,ee=x.phase===`error`;M=ce,G=!0,t[153]===k?K=t[154]:(K=e=>{e||k()},t[153]=k,t[154]=K),j=ae,B=`sm:max-w-xl`,V=`share-branch-switch-dialog`,H=Ne,U=Me;let l;t[155]===w?l=t[156]:(l=(0,v.jsx)(ie,{children:(0,v.jsx)(r,{id:`RY6Bq1`,values:{targetNoun:w}})}),t[155]=w,t[156]=l);let te=T.owner,ne=T.repo,d;t[157]===T.target?d=t[158]:(d=c(T.target),t[157]=T.target,t[158]=d);let f;t[159]!==T.owner||t[160]!==T.repo||t[161]!==d?(f=(0,v.jsx)(re,{className:`sr-only`,children:(0,v.jsx)(r,{id:`f8jU-L`,values:{0:te,1:ne,2:d}})}),t[159]=T.owner,t[160]=T.repo,t[161]=d,t[162]=f):f=t[162],t[163]!==l||t[164]!==f?(W=(0,v.jsxs)(se,{children:[l,f]}),t[163]=l,t[164]=f,t[165]=W):W=t[165],A=oe;let le=T.owner,ue=T.repo,p;t[166]===T.target?p=t[167]:(p=c(T.target),t[166]=T.target,t[167]=p),t[168]!==T.branch||t[169]!==T.owner||t[170]!==T.repo||t[171]!==T.target.kind||t[172]!==p?(L=(0,v.jsx)(`div`,{className:`mb-4`,children:(0,v.jsx)(fe,{owner:le,repo:ue,path:p,kind:T.target.kind,branch:T.branch,testId:`share-branch-switch-metadata`,branchTestId:`share-branch-switch-metadata-branch`})}),t[168]=T.branch,t[169]=T.owner,t[170]=T.repo,t[171]=T.target.kind,t[172]=p,t[173]=L):L=t[173],R=x.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:D},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:x.otherWorktreePath})]}):x.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`,"aria-hidden":`true`}),(0,v.jsx)(r,{id:`c8jBgX`})]}):x.phase===`verdict`?x.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:w,shareBranch:D},components:{0:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):x.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:x.resolution.renamedTo,targetNoun:w},components:{0:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):x.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:D,targetNoun:w},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`,"aria-hidden":`true`}),(0,v.jsx)(r,{id:`c8jBgX`})]}):s?(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`,"aria-hidden":`true`}),(0,v.jsx)(r,{id:`jerqF0`})]}):ee?(0,v.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,v.jsx)(r,{id:`w4hMYl`})}):q?.kind===`D`?(0,v.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,children:(0,v.jsx)(r,{id:`DTI-fp`,values:{targetNoun:w,shareBranch:D},components:{0:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):q?.kind===`B`?(0,v.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,children:(0,v.jsx)(r,{id:`sZ2IOu`,values:{targetNoun:w,shareBranch:D,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:w,shareBranch:D,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`})}})}),z=q&&!q.switchEnabled&&q.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:q.conflictingFiles.map(je)})]}):null,t[111]=_,t[112]=x.info,t[113]=x.otherWorktreePath,t[114]=x.phase,t[115]=x.resolution,t[116]=k,t[117]=rt,t[118]=T.branch,t[119]=T.owner,t[120]=T.repo,t[121]=T.target,t[122]=D,t[123]=w,t[124]=A,t[125]=j,t[126]=M,t[127]=N,t[128]=P,t[129]=F,t[130]=I,t[131]=L,t[132]=R,t[133]=z,t[134]=B,t[135]=V,t[136]=H,t[137]=U,t[138]=W,t[139]=G,t[140]=K,t[141]=q,t[142]=J}else A=t[124],j=t[125],M=t[126],N=t[127],P=t[128],F=t[129],I=t[130],L=t[131],R=t[132],z=t[133],B=t[134],V=t[135],H=t[136],U=t[137],W=t[138],G=t[139],K=t[140],q=t[141],J=t[142];let Y;t[174]===I?Y=t[175]:(Y=I?(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`,"aria-hidden":`true`}),(0,v.jsx)(r,{id:`CU3AiE`})]}):null,t[174]=I,t[175]=Y);let X;t[176]===N?X=t[177]:(X=N?(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`,"aria-hidden":`true`}),(0,v.jsx)(r,{id:`PZtgO0`})]}):null,t[176]=N,t[177]=X);let Z;t[178]!==A||t[179]!==L||t[180]!==R||t[181]!==z||t[182]!==Y||t[183]!==X?(Z=(0,v.jsxs)(A,{children:[L,R,z,Y,X]}),t[178]=A,t[179]=L,t[180]=R,t[181]=z,t[182]=Y,t[183]=X,t[184]=Z):Z=t[184];let wt;t[185]===Symbol.for(`react.memo_cache_sentinel`)?(wt=(0,v.jsx)(r,{id:`dEgA5A`}),t[185]=wt):wt=t[185];let Q;t[186]===k?Q=t[187]:(Q=(0,v.jsx)(o,{variant:`ghost`,onClick:k,"data-testid":`share-branch-switch-cancel`,children:wt}),t[186]=k,t[187]=Q);let Tt;t[188]!==x.phase||t[189]!==x.resolution||t[190]!==N||t[191]!==mt||t[192]!==ut||t[193]!==bt||t[194]!==St||t[195]!==ft||t[196]!==ot||t[197]!==ct||t[198]!==P||t[199]!==F||t[200]!==I||t[201]!==q||t[202]!==J?(Tt=x.phase===`branch-in-other-worktree`?(0,v.jsx)(o,{onClick:St,"data-testid":`share-branch-switch-in-other-worktree-pivot`,children:(0,v.jsx)(r,{id:`hyCxJY`})}):x.phase===`verdict`?x.resolution.kind===`on-origin`?(0,v.jsxs)(o,{onClick:ct,"data-testid":`share-branch-switch-verdict-switch-update`,children:[(0,v.jsx)(te,{className:`size-3.5`,"aria-hidden":!0}),(0,v.jsx)(r,{id:`uA_jXp`})]}):x.resolution.kind===`renamed`?(0,v.jsxs)(o,{onClick:ut,"data-testid":`share-branch-switch-verdict-open-renamed`,children:[(0,v.jsx)(ne,{className:`size-3.5`,"aria-hidden":!0}),(0,v.jsx)(r,{id:`AItsE5`})]}):x.resolution.kind===`diverged`?(0,v.jsxs)(o,{onClick:ft,"data-testid":`share-branch-switch-verdict-plain-switch`,children:[(0,v.jsx)(te,{className:`size-3.5`,"aria-hidden":!0}),F]}):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:[q?.openCurrentEnabled?(0,v.jsxs)(o,{variant:`outline`,onClick:mt,disabled:I||N,"data-testid":`share-branch-switch-open-current`,children:[(0,v.jsx)(ne,{className:`size-3.5`,"aria-hidden":!0}),P]}):null,(0,v.jsx)(o,{variant:`outline`,onClick:ot,disabled:!q?.switchEnabled||I||N,"aria-disabled":!q?.switchEnabled||I||N,"aria-describedby":q&&!q.switchEnabled&&q.conflictingFiles.length>0?`share-receive-branch-conflict-files`:void 0,"data-testid":`share-branch-switch-switch`,children:I?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(u,{className:`size-3.5`,"aria-hidden":`true`}),F]}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(te,{className:`size-3.5`,"aria-hidden":!0}),F]})}),(0,v.jsx)(o,{onClick:bt,disabled:!q||I||N,"data-testid":`share-branch-switch-worktree`,children:N?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(u,{className:`size-3.5`,"aria-hidden":`true`}),J]}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(l,{className:`size-3.5`,"aria-hidden":!0}),J]})})]}),t[188]=x.phase,t[189]=x.resolution,t[190]=N,t[191]=mt,t[192]=ut,t[193]=bt,t[194]=St,t[195]=ft,t[196]=ot,t[197]=ct,t[198]=P,t[199]=F,t[200]=I,t[201]=q,t[202]=J,t[203]=Tt):Tt=t[203];let Et;t[204]!==Q||t[205]!==Tt?(Et=(0,v.jsxs)(f,{className:`sm:justify-between`,children:[Q,Tt]}),t[204]=Q,t[205]=Tt,t[206]=Et):Et=t[206];let $;t[207]!==j||t[208]!==B||t[209]!==V||t[210]!==H||t[211]!==U||t[212]!==W||t[213]!==Z||t[214]!==Et?($=(0,v.jsxs)(j,{className:B,"data-testid":V,onInteractOutside:H,onPointerDownOutside:U,children:[W,Z,Et]}),t[207]=j,t[208]=B,t[209]=V,t[210]=H,t[211]=U,t[212]=W,t[213]=Z,t[214]=Et,t[215]=$):$=t[215];let Dt;return t[216]!==M||t[217]!==G||t[218]!==K||t[219]!==$?(Dt=(0,v.jsx)(M,{open:G,onOpenChange:K,children:$}),t[216]=M,t[217]=G,t[218]=K,t[219]=$,t[220]=Dt):Dt=t[220],Dt}function je(e){return(0,v.jsx)(`li`,{children:(0,v.jsx)(`code`,{className:`text-foreground/80`,children:e})},e)}function Me(e){e.preventDefault()}function Ne(e){e.preventDefault()}function Pe(){return m.request()}function Fe(e){return Ce(e,null).state}function Ie(e){return Se(e,null)}function Le(e){return _e(e,null)}function Re(){return null}export{Ae as ShareBranchSwitchDialog};
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-DzgjsZzC.js";import{n as s}from"./dist-BGzUo_18.js";import{t as ee}from"./dist-C_FzPxEX2.js";import{t as c}from"./desktop-bridge-types-BxqZkaz9.js";import{n as l,t as te}from"./git-branch-CeTudSak.js";import{t as u}from"./spinner-Bx8xD6f8.js";import{n as ne,t as d}from"./miss-dialog-store-CsiJb9Ou.js";import{a as re,c as ie,i as ae,n as oe,o as f,s as se,t as ce}from"./dialog-BJEjKJjL.js";import{t as le}from"./tool-list-format-CS7MZY1Q.js";import{i as ue,n as p,t as m}from"./auth-prompt-store-C_-QXZFC.js";import{a as h,n as de}from"./receive-store-3PZqJEKz.js";import{t as fe}from"./share-metadata-rows-C_o8h27z.js";var g=e(n(),1),pe=a();function me(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 he(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`};case`unsafe-symlinks`:return{action:`refused-unsafe-symlinks`,paths:e.refusedSymlinkPaths??[]};case`symlink-check-failed`:return{action:`stay-with-toast`,reason:`symlink-check-failed`};default:{let t=e.reason;throw Error(`Unhandled CheckoutFailureReason: ${String(t)}`)}}}var ge={phase:`loading`};function _e(e,t){return e.phase===`loading`?t===null?{phase:`error`}:{phase:`ready`,info:t}:e}function ve(e,t){return e.phase!==`ready`&&e.phase!==`verdict`?e:{phase:`switching`,info:e.info,pendingDoc:t}}function ye(e){return e.phase===`ready`?{phase:`creating-worktree`,info:e.info}:e}function be(e){return me(e).kind===`B`&&e.shareTargetOnOriginBranch===!1}function xe(e){return e.phase===`ready`?{phase:`verdict-pending`,info:e.info}:e}function Se(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 Ce(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`}}}:n.action===`refused-unsafe-symlinks`?{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:`unsafe-symlinks`,paths:n.paths}}:{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:n.reason}}}function we(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`}}:t.reason===`project-scope-unavailable`?{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:t.reason,projectScopeIssue:t.issue}}:t.reason===`unsafe-symlinks`?{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:t.reason,paths:t.refusedSymlinkPaths}}:{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:t.reason,helper:t.helper,authFailed:t.reason===`fetch-failed`?t.authFailed:void 0,notFoundAsIdentity:t.reason===`fetch-failed`?t.notFoundAsIdentity:void 0}}:{state:e}}var v=t();function Te(e){return c(e.repositoryTarget)}function Ee(e,t=c(e.target)){let n=e.contentRootDepth===null?t:[...Te(e).split(`/`).slice(0,e.contentRootDepth),...t===``?[]:t.split(`/`)].join(`/`);return{kind:e.target.kind,path:t,repositoryPath:n,...e.contentRootDepth===null?{}:{contentRootDepth:e.contentRootDepth}}}function De(e){return e!==null&&e.kind===`project-branch-switch`}var Oe=5;function ke(e){return`share-branch-unsafe-symlinks:${e}`}function Ae(e){let t=(0,pe.c)(221),{bridge:n,store:a}=e,m=a===void 0?de:a,{_}=i(),Ae;t[0]===_?Ae=t[1]:(Ae=function(e){let t=e.slice(0,Oe),n=e.length-t.length,r=n>0?[...t,_({id:`pCJv30`,values:{hiddenCount:n}})]:t;return r.length===0?void 0:le(r,ee.locale)},t[0]=_,t[1]=Ae);let y=Ae,b=(0,g.useSyncExternalStore)(m.subscribe,m.getSnapshot,Re),[x,S]=(0,g.useState)(ge),ze=(0,g.useRef)(!1),Be=(0,g.useRef)(!1),Ve=(0,g.useRef)(!1),He=(0,g.useRef)(null),Ue;t[2]===b?Ue=t[3]:(Ue=De(b)?b:null,t[2]=b,t[3]=Ue);let C=Ue,We;t[4]!==_||t[5]!==C?.share.target.kind?(We=C?.share.target.kind===`folder`?_({id:`ugoTXs`}):_({id:`XH30C4`}),t[4]=_,t[5]=C?.share.target.kind,t[6]=We):We=t[6];let w=We,Ge;t[7]===C?Ge=t[8]:(Ge=()=>{S(ge),ze.current=!1,Be.current=!1,Ve.current=!1,He.current=C},t[7]=C,t[8]=Ge);let Ke;t[9]===b?Ke=t[10]:(Ke=[b],t[9]=b,t[10]=Ke),(0,g.useEffect)(Ge,Ke);let qe;t[11]!==C||t[12]!==n?(qe=()=>{if(!C||ze.current)return;ze.current=!0;let e=!1;return n.project.fetchBranchInfo({projectPath:C.projectPath,branch:C.share.branch,kind:C.share.repositoryTarget.kind,path:Te(C.share)}).then(t=>{e||S(e=>_e(e,t))}).catch(t=>{e||(console.warn(`[receive] branch-info-fetch-failed`,t instanceof Error?t.message:t),S(Le))}),()=>{e=!0}},t[11]=C,t[12]=n,t[13]=qe):qe=t[13];let Je;t[14]===C?Je=t[15]:(Je=[C],t[14]=C,t[15]=Je),(0,g.useEffect)(qe,Je);let Ye;t[16]!==C||t[17]!==x.info||t[18]!==x.phase||t[19]!==n?(Ye=()=>{if(!C||x.phase!==`ready`||Ve.current||!be(x.info))return;Ve.current=!0,S(xe);let e=C;n.project.fetchTargetStatus({projectPath:C.projectPath,branch:C.share.branch,kind:C.share.target.kind,path:Te(C.share),...C.share.contentRootDepth===null?{}:{contentRootDepth:C.share.contentRootDepth}}).then(t=>{He.current===e&&S(e=>Se(e,t))}).catch(t=>{He.current===e&&(console.warn(`[receive] target-status-fetch-failed`,t instanceof Error?t.message:t),S(Ie))})},t[16]=C,t[17]=x.info,t[18]=x.phase,t[19]=n,t[20]=Ye):Ye=t[20];let Xe;t[21]!==C||t[22]!==x.phase?(Xe=[x.phase,C],t[21]=C,t[22]=x.phase,t[23]=Xe):Xe=t[23],(0,g.useEffect)(Ye,Xe);let Ze;t[24]!==C||t[25]!==x.phase||t[26]!==x.resolution||t[27]!==m?(Ze=()=>{if(x.phase!==`verdict`)return;let{kind:e}=x.resolution;e!==`deleted`&&e!==`never-on-branch`||C&&(d.arm({kind:C.share.target.kind,path:c(C.share.target),repositoryPath:Te(C.share),...C.share.contentRootDepth===null?{}:{contentRootDepth:C.share.contentRootDepth},branch:C.share.branch}),m.dismiss())},t[24]=C,t[25]=x.phase,t[26]=x.resolution,t[27]=m,t[28]=Ze):Ze=t[28];let Qe;t[29]!==C||t[30]!==x||t[31]!==m?(Qe=[x,C,m],t[29]=C,t[30]=x,t[31]=m,t[32]=Qe):Qe=t[32],(0,g.useEffect)(Ze,Qe);let $e;t[33]!==x.phase||t[34]!==x.resolution?($e=()=>{x.phase===`verdict`&&console.log(h({verdict_cell:x.resolution.kind}))},t[33]=x.phase,t[34]=x.resolution,t[35]=$e):$e=t[35];let et;t[36]===x?et=t[37]:(et=[x],t[36]=x,t[37]=et),(0,g.useEffect)($e,et);let tt;t[38]!==_||t[39]!==C||t[40]!==x.pendingDoc||t[41]!==x.phase||t[42]!==n||t[43]!==m||t[44]!==w?(tt=()=>{if(x.phase!==`awaiting-cc1-recycle`||!C)return;let e=C.share.branch,t=x.pendingDoc;if(!e){m.dismiss();return}if(Be.current)return;Be.current=!0;let r=!1;return n.project.awaitBranchSwitched({projectPath:C.projectPath,branch:e,timeoutMs:3e4}).then(i=>{if(!r){if(i.ok){console.log(h({branch_dialog_action:`branch-switch-complete`,branch:e})),n.project.open({path:C.projectPath,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:Ee(C.share,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:w}}))}),m.dismiss();return}console.log(h({branch_dialog_action:`branch-switch-timeout`,branch:e})),s.error(_({id:`LBwUR6`,values:{targetNoun:w}})),m.dismiss()}}).catch(e=>{r||(console.warn(`[receive] awaitBranchSwitched rejected`,e instanceof Error?e.message:e),s.error(_({id:`Jw6EC4`,values:{targetNoun:w}})),m.dismiss())}),()=>{r=!0}},t[38]=_,t[39]=C,t[40]=x.pendingDoc,t[41]=x.phase,t[42]=n,t[43]=m,t[44]=w,t[45]=tt):tt=t[45];let nt;if(t[46]!==C||t[47]!==x.phase?(nt=[x.phase,C],t[46]=C,t[47]=x.phase,t[48]=nt):nt=t[48],(0,g.useEffect)(tt,nt),!C)return null;let{share:T,projectPath:E,currentBranch:rt}=C,D=T.branch,it;t[49]!==_||t[50]!==n.project||t[51]!==E||t[52]!==y||t[53]!==D||t[54]!==m?(it=function(e,t,r){console.log(h({branch_dialog_action:`switch`,branch_action:`switch`,branch:D,verdict_cell:r})),S(t=>ve(t,e)),n.project.runCheckout(t?{projectPath:E,branch:D,fastForward:!0}:{projectPath:E,branch:D}).then(e=>{let t=null,n=!1,r=[];S(i=>{let{state:a,sideEffect:o}=Ce(i,e);return o&&(t=o.reason,r=o.paths??[],n=a.phase===`dismissed`),a});let i=ke(D);t!==`unsafe-symlinks`&&s.dismiss(i),t===`unsafe-symlinks`?s.error(_({id:`461Vg9`,values:{shareBranch:D}}),{description:y(r),id:i,duration:1/0}):t===`branch-not-found`?s.error(_({id:`NJyQi_`,values:{shareBranch:D}})):t===`fetch-failed`?s.error(_({id:`bWLmRK`})):t===`symlink-check-failed`?s.error(_({id:`0uxLib`,values:{shareBranch:D}})):(t===`checkout-failed`||t===`proxy-null`)&&s.error(_({id:`c863eW`,values:{shareBranch:D}})),n&&m.dismiss()}).catch(e=>{console.warn(`[receive] runCheckout rejected branch_action=switch`,e instanceof Error?e.message:e),S(Fe),s.dismiss(ke(D)),s.error(_({id:`c863eW`,values:{shareBranch:D}}))})},t[49]=_,t[50]=n.project,t[51]=E,t[52]=y,t[53]=D,t[54]=m,t[55]=it):it=t[55];let O=it,at;t[56]!==x.info||t[57]!==x.phase||t[58]!==O||t[59]!==T.target?(at=function(){x.phase===`ready`&&me(x.info).switchEnabled&&O(c(T.target),!1)},t[56]=x.info,t[57]=x.phase,t[58]=O,t[59]=T.target,t[60]=at):at=t[60];let ot=at,st;t[61]!==x.phase||t[62]!==x.resolution||t[63]!==O||t[64]!==T.target?(st=function(){x.phase===`verdict`&&O(c(T.target),!0,x.resolution.kind)},t[61]=x.phase,t[62]=x.resolution,t[63]=O,t[64]=T.target,t[65]=st):st=t[65];let ct=st,lt;t[66]!==x.phase||t[67]!==x.resolution||t[68]!==O?(lt=function(){x.phase===`verdict`&&x.resolution.kind===`renamed`&&O(x.resolution.renamedTo,!0,x.resolution.kind)},t[66]=x.phase,t[67]=x.resolution,t[68]=O,t[69]=lt):lt=t[69];let ut=lt,dt;t[70]!==x.phase||t[71]!==x.resolution||t[72]!==O||t[73]!==T.target?(dt=function(){x.phase===`verdict`&&O(c(T.target),!1,x.resolution.kind)},t[70]=x.phase,t[71]=x.resolution,t[72]=O,t[73]=T.target,t[74]=dt):dt=t[74];let ft=dt,pt;t[75]!==_||t[76]!==n.project||t[77]!==E||t[78]!==T||t[79]!==D||t[80]!==m||t[81]!==w?(pt=function(){console.log(h({branch_dialog_action:`open-current`,branch:D})),n.project.open({path:E,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:Ee(T)}).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:w}}))}),m.dismiss()},t[75]=_,t[76]=n.project,t[77]=E,t[78]=T,t[79]=D,t[80]=m,t[81]=w,t[82]=pt):pt=t[82];let mt=pt,ht;t[83]!==_||t[84]!==y||t[85]!==D?(ht=function(e){let{reason:t}=e,n=`helper`in e?e.helper:void 0,r=`authFailed`in e?e.authFailed:void 0,i=`notFoundAsIdentity`in e?e.notFoundAsIdentity:void 0;if(t===`fetch-failed`&&i){s.error(_({id:`jRsjlF`}));return}if(t===`fetch-failed`&&r){s.error(_({id:`gfb-CM`}),{action:{label:_({id:`5lWFkC`}),onClick:Pe}});return}switch(t){case`helper-not-found`:{let e=n??_({id:`cHhH3i`});s.error(_({id:`Z7x_Zh`,values:{tool:e}}));return}case`branch-not-found`:s.error(_({id:`NJyQi_`,values:{shareBranch:D}}));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:D}}));return;case`path-exists`:s.error(_({id:`cN1Gcp`,values:{shareBranch:D}}));return;case`no-git`:s.error(_({id:`CFnavk`}));return;case`empty-repo`:s.error(_({id:`5IgYAM`}));return;case`invalid-branch`:s.error(_({id:`JfPuv7`,values:{shareBranch:D}}));return;case`project-scope-unavailable`:s.error(_(p({reason:t,issue:e.projectScopeIssue})));return;case`unsafe-symlinks`:s.error(_({id:`_6cS9O`,values:{shareBranch:D}}),{description:y(e.paths),id:ke(D),duration:1/0});return;case`proxy-null`:case`error`:s.error(_({id:`e8zYa8`,values:{shareBranch:D}}));return;default:throw Error(`Unhandled worktree failure reason: ${String(t)}`)}},t[83]=_,t[84]=y,t[85]=D,t[86]=ht):ht=t[86];let gt=ht,_t;t[87]!==_||t[88]!==n.project||t[89]!==T||t[90]!==D||t[91]!==gt||t[92]!==m?(_t=function(e){e?.ok===!1&&e.reason===`project-scope-unavailable`&&ue();let t,r=!1,i=null;if(S(n=>{let{state:a,sideEffect:o}=we(n,e);return o&&(t=o,r=a.phase===`dismissed`),a.phase===`opening-worktree`&&(i=a.path),a}),t?.reason!==`unsafe-symlinks`&&s.dismiss(ke(D)),t!==void 0&&(console.log(h({branch_dialog_action:`open-worktree-failed:${t.reason}`,branch:D})),gt(t)),i!==null){ue();let e=i;n.project.open({path:e,target:`new-window`,entryPoint:`worktree`,pendingDeepLinkTarget:Ee(T),pendingBranch:D}).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}}))}),m.dismiss()}r&&m.dismiss()},t[87]=_,t[88]=n.project,t[89]=T,t[90]=D,t[91]=gt,t[92]=m,t[93]=_t):_t=t[93];let vt=_t,yt;t[94]!==vt||t[95]!==x.phase||t[96]!==n.worktree||t[97]!==D?(yt=function(){x.phase===`ready`&&(console.log(h({branch_dialog_action:`open-worktree`,branch:D})),S(ye),n.worktree.checkout({branch:D}).then(e=>{vt(e)}).catch(e=>{console.warn(`[receive] worktree-checkout rejected branch_dialog_action=open-worktree`,e instanceof Error?e.message:e),vt(null)}))},t[94]=vt,t[95]=x.phase,t[96]=n.worktree,t[97]=D,t[98]=yt):yt=t[98];let bt=yt,xt;t[99]!==_||t[100]!==x.otherWorktreePath||t[101]!==x.phase||t[102]!==n.project||t[103]!==T||t[104]!==D||t[105]!==m?(xt=function(){if(x.phase!==`branch-in-other-worktree`)return;let e=x.otherWorktreePath;console.log(h({branch_dialog_action:`pivot-to-other-worktree`,branch:D})),n.project.open({path:e,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:Ee(T),pendingBranch:D}).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}}))}),m.dismiss()},t[99]=_,t[100]=x.otherWorktreePath,t[101]=x.phase,t[102]=n.project,t[103]=T,t[104]=D,t[105]=m,t[106]=xt):xt=t[106];let St=xt,Ct;t[107]!==x.phase||t[108]!==x.resolution||t[109]!==m?(Ct=function(){console.log(h({branch_dialog_action:`cancel`,verdict_cell:x.phase===`verdict`?x.resolution.kind:void 0})),m.dismiss()},t[107]=x.phase,t[108]=x.resolution,t[109]=m,t[110]=Ct):Ct=t[110];let k=Ct,A,j,M,N,P,F,I,L,R,z,B,V,H,U,W,G,K,q,J;if(t[111]!==_||t[112]!==x.info||t[113]!==x.otherWorktreePath||t[114]!==x.phase||t[115]!==x.resolution||t[116]!==k||t[117]!==rt||t[118]!==T.branch||t[119]!==T.owner||t[120]!==T.repo||t[121]!==T.target||t[122]!==D||t[123]!==w){q=x.phase===`ready`||x.phase===`switching`||x.phase===`creating-worktree`?me(x.info):null;let e;t[143]!==x.info||t[144]!==x.phase||t[145]!==rt?(e=x.phase===`ready`||x.phase===`switching`||x.phase===`creating-worktree`?he(x.info):rt??`HEAD`,t[143]=x.info,t[144]=x.phase,t[145]=rt,t[146]=e):e=t[146];let n=e;I=x.phase===`switching`||x.phase===`awaiting-cc1-recycle`,N=x.phase===`creating-worktree`;let i;t[147]===_?i=t[148]:(i=_({id:`OuY8t9`}),t[147]=_,t[148]=i),P=i;let a;t[149]===_?a=t[150]:(a=_({id:`XZkdtg`}),t[149]=_,t[150]=a),F=a;let o;t[151]===_?o=t[152]:(o=_({id:`VTulZj`}),t[151]=_,t[152]=o),J=o;let s=x.phase===`loading`,ee=x.phase===`error`;M=ce,G=!0,t[153]===k?K=t[154]:(K=e=>{e||k()},t[153]=k,t[154]=K),j=ae,B=`sm:max-w-xl`,V=`share-branch-switch-dialog`,H=Ne,U=Me;let l;t[155]===w?l=t[156]:(l=(0,v.jsx)(ie,{children:(0,v.jsx)(r,{id:`RY6Bq1`,values:{targetNoun:w}})}),t[155]=w,t[156]=l);let te=T.owner,ne=T.repo,d;t[157]===T.target?d=t[158]:(d=c(T.target),t[157]=T.target,t[158]=d);let f;t[159]!==T.owner||t[160]!==T.repo||t[161]!==d?(f=(0,v.jsx)(re,{className:`sr-only`,children:(0,v.jsx)(r,{id:`f8jU-L`,values:{0:te,1:ne,2:d}})}),t[159]=T.owner,t[160]=T.repo,t[161]=d,t[162]=f):f=t[162],t[163]!==l||t[164]!==f?(W=(0,v.jsxs)(se,{children:[l,f]}),t[163]=l,t[164]=f,t[165]=W):W=t[165],A=oe;let le=T.owner,ue=T.repo,p;t[166]===T.target?p=t[167]:(p=c(T.target),t[166]=T.target,t[167]=p),t[168]!==T.branch||t[169]!==T.owner||t[170]!==T.repo||t[171]!==T.target.kind||t[172]!==p?(L=(0,v.jsx)(`div`,{className:`mb-4`,children:(0,v.jsx)(fe,{owner:le,repo:ue,path:p,kind:T.target.kind,branch:T.branch,testId:`share-branch-switch-metadata`,branchTestId:`share-branch-switch-metadata-branch`})}),t[168]=T.branch,t[169]=T.owner,t[170]=T.repo,t[171]=T.target.kind,t[172]=p,t[173]=L):L=t[173],R=x.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:D},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:x.otherWorktreePath})]}):x.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`,"aria-hidden":`true`}),(0,v.jsx)(r,{id:`c8jBgX`})]}):x.phase===`verdict`?x.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:w,shareBranch:D},components:{0:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):x.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:x.resolution.renamedTo,targetNoun:w},components:{0:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):x.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:D,targetNoun:w},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`,"aria-hidden":`true`}),(0,v.jsx)(r,{id:`c8jBgX`})]}):s?(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`,"aria-hidden":`true`}),(0,v.jsx)(r,{id:`jerqF0`})]}):ee?(0,v.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,v.jsx)(r,{id:`w4hMYl`})}):q?.kind===`D`?(0,v.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,children:(0,v.jsx)(r,{id:`DTI-fp`,values:{targetNoun:w,shareBranch:D},components:{0:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):q?.kind===`B`?(0,v.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,children:(0,v.jsx)(r,{id:`sZ2IOu`,values:{targetNoun:w,shareBranch:D,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:w,shareBranch:D,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`})}})}),z=q&&!q.switchEnabled&&q.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:q.conflictingFiles.map(je)})]}):null,t[111]=_,t[112]=x.info,t[113]=x.otherWorktreePath,t[114]=x.phase,t[115]=x.resolution,t[116]=k,t[117]=rt,t[118]=T.branch,t[119]=T.owner,t[120]=T.repo,t[121]=T.target,t[122]=D,t[123]=w,t[124]=A,t[125]=j,t[126]=M,t[127]=N,t[128]=P,t[129]=F,t[130]=I,t[131]=L,t[132]=R,t[133]=z,t[134]=B,t[135]=V,t[136]=H,t[137]=U,t[138]=W,t[139]=G,t[140]=K,t[141]=q,t[142]=J}else A=t[124],j=t[125],M=t[126],N=t[127],P=t[128],F=t[129],I=t[130],L=t[131],R=t[132],z=t[133],B=t[134],V=t[135],H=t[136],U=t[137],W=t[138],G=t[139],K=t[140],q=t[141],J=t[142];let Y;t[174]===I?Y=t[175]:(Y=I?(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`,"aria-hidden":`true`}),(0,v.jsx)(r,{id:`CU3AiE`})]}):null,t[174]=I,t[175]=Y);let X;t[176]===N?X=t[177]:(X=N?(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`,"aria-hidden":`true`}),(0,v.jsx)(r,{id:`PZtgO0`})]}):null,t[176]=N,t[177]=X);let Z;t[178]!==A||t[179]!==L||t[180]!==R||t[181]!==z||t[182]!==Y||t[183]!==X?(Z=(0,v.jsxs)(A,{children:[L,R,z,Y,X]}),t[178]=A,t[179]=L,t[180]=R,t[181]=z,t[182]=Y,t[183]=X,t[184]=Z):Z=t[184];let wt;t[185]===Symbol.for(`react.memo_cache_sentinel`)?(wt=(0,v.jsx)(r,{id:`dEgA5A`}),t[185]=wt):wt=t[185];let Q;t[186]===k?Q=t[187]:(Q=(0,v.jsx)(o,{variant:`ghost`,onClick:k,"data-testid":`share-branch-switch-cancel`,children:wt}),t[186]=k,t[187]=Q);let Tt;t[188]!==x.phase||t[189]!==x.resolution||t[190]!==N||t[191]!==mt||t[192]!==ut||t[193]!==bt||t[194]!==St||t[195]!==ft||t[196]!==ot||t[197]!==ct||t[198]!==P||t[199]!==F||t[200]!==I||t[201]!==q||t[202]!==J?(Tt=x.phase===`branch-in-other-worktree`?(0,v.jsx)(o,{onClick:St,"data-testid":`share-branch-switch-in-other-worktree-pivot`,children:(0,v.jsx)(r,{id:`hyCxJY`})}):x.phase===`verdict`?x.resolution.kind===`on-origin`?(0,v.jsxs)(o,{onClick:ct,"data-testid":`share-branch-switch-verdict-switch-update`,children:[(0,v.jsx)(te,{className:`size-3.5`,"aria-hidden":!0}),(0,v.jsx)(r,{id:`uA_jXp`})]}):x.resolution.kind===`renamed`?(0,v.jsxs)(o,{onClick:ut,"data-testid":`share-branch-switch-verdict-open-renamed`,children:[(0,v.jsx)(ne,{className:`size-3.5`,"aria-hidden":!0}),(0,v.jsx)(r,{id:`AItsE5`})]}):x.resolution.kind===`diverged`?(0,v.jsxs)(o,{onClick:ft,"data-testid":`share-branch-switch-verdict-plain-switch`,children:[(0,v.jsx)(te,{className:`size-3.5`,"aria-hidden":!0}),F]}):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:[q?.openCurrentEnabled?(0,v.jsxs)(o,{variant:`outline`,onClick:mt,disabled:I||N,"data-testid":`share-branch-switch-open-current`,children:[(0,v.jsx)(ne,{className:`size-3.5`,"aria-hidden":!0}),P]}):null,(0,v.jsx)(o,{variant:`outline`,onClick:ot,disabled:!q?.switchEnabled||I||N,"aria-disabled":!q?.switchEnabled||I||N,"aria-describedby":q&&!q.switchEnabled&&q.conflictingFiles.length>0?`share-receive-branch-conflict-files`:void 0,"data-testid":`share-branch-switch-switch`,children:I?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(u,{className:`size-3.5`,"aria-hidden":`true`}),F]}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(te,{className:`size-3.5`,"aria-hidden":!0}),F]})}),(0,v.jsx)(o,{onClick:bt,disabled:!q||I||N,"data-testid":`share-branch-switch-worktree`,children:N?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(u,{className:`size-3.5`,"aria-hidden":`true`}),J]}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(l,{className:`size-3.5`,"aria-hidden":!0}),J]})})]}),t[188]=x.phase,t[189]=x.resolution,t[190]=N,t[191]=mt,t[192]=ut,t[193]=bt,t[194]=St,t[195]=ft,t[196]=ot,t[197]=ct,t[198]=P,t[199]=F,t[200]=I,t[201]=q,t[202]=J,t[203]=Tt):Tt=t[203];let Et;t[204]!==Q||t[205]!==Tt?(Et=(0,v.jsxs)(f,{className:`sm:justify-between`,children:[Q,Tt]}),t[204]=Q,t[205]=Tt,t[206]=Et):Et=t[206];let $;t[207]!==j||t[208]!==B||t[209]!==V||t[210]!==H||t[211]!==U||t[212]!==W||t[213]!==Z||t[214]!==Et?($=(0,v.jsxs)(j,{className:B,"data-testid":V,onInteractOutside:H,onPointerDownOutside:U,children:[W,Z,Et]}),t[207]=j,t[208]=B,t[209]=V,t[210]=H,t[211]=U,t[212]=W,t[213]=Z,t[214]=Et,t[215]=$):$=t[215];let Dt;return t[216]!==M||t[217]!==G||t[218]!==K||t[219]!==$?(Dt=(0,v.jsx)(M,{open:G,onOpenChange:K,children:$}),t[216]=M,t[217]=G,t[218]=K,t[219]=$,t[220]=Dt):Dt=t[220],Dt}function je(e){return(0,v.jsx)(`li`,{children:(0,v.jsx)(`code`,{className:`text-foreground/80`,children:e})},e)}function Me(e){e.preventDefault()}function Ne(e){e.preventDefault()}function Pe(){return m.request()}function Fe(e){return Ce(e,null).state}function Ie(e){return Se(e,null)}function Le(e){return _e(e,null)}function Re(){return null}export{Ae as ShareBranchSwitchDialog};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{t as r}from"./compiler-runtime-BfE3aGVn.js";import{a as i,i as a,n as o,o as s,r as c}from"./pending-receive-nav-store-bmJhghAd.js";import{t as l}from"./miss-dialog-store-CsiJb9Ou.js";import{c as u,i as d,n as f,s as p,t as m}from"./dialog-BJEjKJjL.js";import{l as h,u as g}from"./doc-hash-BJkweiX9.js";var _=r(),v=e(n(),1),y=t();function b(e){let t=e.split(`/`).filter(Boolean);return t.length>0?t[t.length-1]:e}function x(){let e=(0,_.c)(2),t=(0,v.useSyncExternalStore)(l.subscribe,l.getSnapshot,S);if(t===null)return null;let n;return e[0]===t?n=e[1]:(n=(0,y.jsx)(C,{nav:t},t.path),e[0]=t,e[1]=n),n}function S(){return null}function C(e){let t=(0,_.c)(28),{nav:n}=e,{state:r,refetch:v}=s(n),x;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(x=function(){l.dismiss()},t[0]=x):x=t[0];let S=x,C;t[1]===n.path?C=t[2]:(C=function(){window.location.hash=g(i(n.path)),S()},t[1]=n.path,t[2]=C);let w=C,T;t[3]===n?T=t[4]:(T=function(e){c.arm(o(n,e)),window.location.hash=n.kind===`folder`?g(e):h(e),S()},t[3]=n,t[4]=T);let E=T,D;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(D=e=>{e||S()},t[5]=D):D=t[5];let O=r.phase,k=r.phase===`resolved`?r.resolution.verdict:void 0,A;t[6]===n.path?A=t[7]:(A=b(n.path),t[6]=n.path,t[7]=A);let j;t[8]===A?j=t[9]:(j=(0,y.jsx)(p,{children:(0,y.jsx)(u,{className:`truncate`,children:A})}),t[8]=A,t[9]=j);let M=r.phase===`pending`?`flex flex-col items-center justify-center gap-3 py-6 text-center text-sm text-muted-foreground`:`flex flex-col items-center justify-center gap-6 py-2 text-center`,N;t[10]!==n.path||t[11]!==E?(N=()=>E(n.path),t[10]=n.path,t[11]=E,t[12]=N):N=t[12];let P;t[13]!==w||t[14]!==n||t[15]!==E||t[16]!==v||t[17]!==r||t[18]!==N?(P=(0,y.jsx)(a,{nav:n,state:r,onBrowseFolder:w,onOpenRenamed:E,onEnableAutoSync:S,onSyncCompleted:v,onPullApplied:N}),t[13]=w,t[14]=n,t[15]=E,t[16]=v,t[17]=r,t[18]=N,t[19]=P):P=t[19];let F;t[20]!==P||t[21]!==M?(F=(0,y.jsx)(f,{className:M,children:P}),t[20]=P,t[21]=M,t[22]=F):F=t[22];let I;return t[23]!==r.phase||t[24]!==F||t[25]!==k||t[26]!==j?(I=(0,y.jsx)(m,{open:!0,onOpenChange:D,children:(0,y.jsxs)(d,{className:`sm:max-w-md`,"data-testid":`share-receive-miss-dialog`,"data-phase":O,"data-verdict":k,children:[j,F]})}),t[23]=r.phase,t[24]=F,t[25]=k,t[26]=j,t[27]=I):I=t[27],I}export{x as ShareReceiveMissDialog};
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{t as r}from"./compiler-runtime-BfE3aGVn.js";import{a as i,i as a,n as o,o as s,r as c}from"./pending-receive-nav-store-BQaN4dQv.js";import{t as l}from"./miss-dialog-store-CsiJb9Ou.js";import{c as u,i as d,n as f,s as p,t as m}from"./dialog-BJEjKJjL.js";import{l as h,u as g}from"./doc-hash-BJkweiX9.js";var _=r(),v=e(n(),1),y=t();function b(e){let t=e.split(`/`).filter(Boolean);return t.length>0?t[t.length-1]:e}function x(){let e=(0,_.c)(2),t=(0,v.useSyncExternalStore)(l.subscribe,l.getSnapshot,S);if(t===null)return null;let n;return e[0]===t?n=e[1]:(n=(0,y.jsx)(C,{nav:t},t.path),e[0]=t,e[1]=n),n}function S(){return null}function C(e){let t=(0,_.c)(28),{nav:n}=e,{state:r,refetch:v}=s(n),x;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(x=function(){l.dismiss()},t[0]=x):x=t[0];let S=x,C;t[1]===n.path?C=t[2]:(C=function(){window.location.hash=g(i(n.path)),S()},t[1]=n.path,t[2]=C);let w=C,T;t[3]===n?T=t[4]:(T=function(e){c.arm(o(n,e)),window.location.hash=n.kind===`folder`?g(e):h(e),S()},t[3]=n,t[4]=T);let E=T,D;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(D=e=>{e||S()},t[5]=D):D=t[5];let O=r.phase,k=r.phase===`resolved`?r.resolution.verdict:void 0,A;t[6]===n.path?A=t[7]:(A=b(n.path),t[6]=n.path,t[7]=A);let j;t[8]===A?j=t[9]:(j=(0,y.jsx)(p,{children:(0,y.jsx)(u,{className:`truncate`,children:A})}),t[8]=A,t[9]=j);let M=r.phase===`pending`?`flex flex-col items-center justify-center gap-3 py-6 text-center text-sm text-muted-foreground`:`flex flex-col items-center justify-center gap-6 py-2 text-center`,N;t[10]!==n.path||t[11]!==E?(N=()=>E(n.path),t[10]=n.path,t[11]=E,t[12]=N):N=t[12];let P;t[13]!==w||t[14]!==n||t[15]!==E||t[16]!==v||t[17]!==r||t[18]!==N?(P=(0,y.jsx)(a,{nav:n,state:r,onBrowseFolder:w,onOpenRenamed:E,onEnableAutoSync:S,onSyncCompleted:v,onPullApplied:N}),t[13]=w,t[14]=n,t[15]=E,t[16]=v,t[17]=r,t[18]=N,t[19]=P):P=t[19];let F;t[20]!==P||t[21]!==M?(F=(0,y.jsx)(f,{className:M,children:P}),t[20]=P,t[21]=M,t[22]=F):F=t[22];let I;return t[23]!==r.phase||t[24]!==F||t[25]!==k||t[26]!==j?(I=(0,y.jsx)(m,{open:!0,onOpenChange:D,children:(0,y.jsxs)(d,{className:`sm:max-w-md`,"data-testid":`share-receive-miss-dialog`,"data-phase":O,"data-verdict":k,children:[j,F]})}),t[23]=r.phase,t[24]=F,t[25]=k,t[26]=j,t[27]=I):I=t[27],I}export{x as ShareReceiveMissDialog};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./utils-CPqDy6Hr.js";import{a as s,i as c,n as l,o as u,r as d,s as f,t as p}from"./select-pACXgFe2.js";import{t as m}from"./button-DzgjsZzC.js";import{l as h,n as g,r as _,t as v}from"./AddPropertiesButton-CrpxZ0jL.js";import{a as y,h as b,r as x,t as S,u as C}from"./dropdown-menu-5XqyQTVx.js";import{n as w}from"./file-plus-DKxOZh2k.js";import{t as T}from"./list-plus-CYMJBvrm.js";import{p as E,t as D}from"./skill-scope-DOTLd4gL.js";var O=a(),k=t();function A(e){let t=(0,O.c)(21),{value:n,onRequestMove:a,disabled:m,triggerClassName:h}=e,{_:g}=i(),_=E(),v;t[0]===a?v=t[1]:(v=e=>a(e),t[0]=a,t[1]=v);let y;t[2]===g?y=t[3]:(y=g({id:`oCHfGC`}),t[2]=g,t[3]=y);let b;t[4]===h?b=t[5]:(b=o(`w-auto gap-1 text-xs font-mono uppercase`,h),t[4]=h,t[5]=b);let x;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,k.jsx)(f,{}),t[6]=x):x=t[6];let S;t[7]!==y||t[8]!==b?(S=(0,k.jsx)(u,{size:`sm`,"aria-label":y,"data-testid":`skill-level-select`,className:b,children:x}),t[7]=y,t[8]=b,t[9]=S):S=t[9];let C;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,k.jsx)(s,{children:(0,k.jsx)(r,{id:`oCHfGC`})}),t[10]=C):C=t[10];let w;t[11]===_?w=t[12]:(w=D.map(e=>(0,k.jsx)(c,{value:e,children:_[e]},e)),t[11]=_,t[12]=w);let T;t[13]===w?T=t[14]:(T=(0,k.jsx)(l,{align:`end`,children:(0,k.jsxs)(d,{children:[C,w]})}),t[13]=w,t[14]=T);let A;return t[15]!==m||t[16]!==v||t[17]!==S||t[18]!==T||t[19]!==n?(A=(0,k.jsxs)(p,{value:n,onValueChange:v,disabled:m,children:[S,T]}),t[15]=m,t[16]=v,t[17]=S,t[18]=T,t[19]=n,t[20]=A):A=t[20],A}var j=e(n(),1);function M(e){let t=(0,O.c)(12),{scope:n,name:r}=e,[i,a]=(0,j.useState)(null),o;t[0]===n?o=t[1]:(o=e=>{e!==n&&a(e)},t[0]=n,t[1]=o);let s;t[2]!==r||t[3]!==i||t[4]!==n?(s=i?{scope:n,name:r,toScope:i}:null,t[2]=r,t[3]=i,t[4]=n,t[5]=s):s=t[5];let c;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=e=>!e&&a(null),t[6]=c):c=t[6];let l;t[7]===s?l=t[8]:(l=(0,k.jsx)(h,{target:s,onOpenChange:c}),t[7]=s,t[8]=l);let u;return t[9]!==o||t[10]!==l?(u={requestMove:o,dialog:l},t[9]=o,t[10]=l,t[11]=u):u=t[11],u}function N(e){let t=(0,O.c)(41),{scope:n,name:a,showAddPropertyButton:o,onAddProperty:s,problemCount:c,problemMessages:l}=e,{_:u}=i(),d;t[0]!==a||t[1]!==n?(d={scope:n,name:a},t[0]=a,t[1]=n,t[2]=d):d=t[2];let f=M(d),p;t[3]!==f.requestMove||t[4]!==n?(p=(0,k.jsx)(A,{value:n,onRequestMove:f.requestMove,triggerClassName:`hidden @xl/toolbar:flex`}),t[3]=f.requestMove,t[4]=n,t[5]=p):p=t[5];let h;t[6]!==a||t[7]!==n?(h=(0,k.jsx)(_,{scope:n,name:a}),t[6]=a,t[7]=n,t[8]=h):h=t[8];let E;t[9]!==p||t[10]!==h?(E=(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[p,h]}),t[9]=p,t[10]=h,t[11]=E):E=t[11];let D;t[12]!==s||t[13]!==c||t[14]!==l||t[15]!==o?(D=o?(0,k.jsx)(v,{onAddProperty:s,problemCount:c,problemMessages:l,className:`hidden @xl/toolbar:inline-flex`}):null,t[12]=s,t[13]=c,t[14]=l,t[15]=o,t[16]=D):D=t[16];let j;t[17]===u?j=t[18]:(j=u({id:`Yzs3QX`}),t[17]=u,t[18]=j);let N;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,k.jsx)(w,{className:`size-4`,"aria-hidden":!0}),t[19]=N):N=t[19];let P;t[20]===j?P=t[21]:(P=(0,k.jsx)(b,{asChild:!0,children:(0,k.jsx)(m,{variant:`ghost`,size:`icon`,"aria-label":j,"data-testid":`skill-toolbar-overflow`,className:`@xl/toolbar:hidden`,children:N})}),t[20]=j,t[21]=P);let F;t[22]===f?F=t[23]:(F=e=>f.requestMove(e),t[22]=f,t[23]=F);let I;t[24]!==n||t[25]!==F?(I=(0,k.jsx)(g,{value:n,onSelect:F}),t[24]=n,t[25]=F,t[26]=I):I=t[26];let L;t[27]!==s||t[28]!==o?(L=o?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(C,{}),(0,k.jsxs)(y,{onSelect:s,children:[(0,k.jsx)(T,{}),(0,k.jsx)(r,{id:`81H_23`})]})]}):null,t[27]=s,t[28]=o,t[29]=L):L=t[29];let R;t[30]!==I||t[31]!==L?(R=(0,k.jsxs)(x,{align:`end`,className:`min-w-44`,children:[I,L]}),t[30]=I,t[31]=L,t[32]=R):R=t[32];let z;t[33]!==R||t[34]!==P?(z=(0,k.jsxs)(S,{children:[P,R]}),t[33]=R,t[34]=P,t[35]=z):z=t[35];let B;return t[36]!==f.dialog||t[37]!==z||t[38]!==E||t[39]!==D?(B=(0,k.jsxs)(k.Fragment,{children:[E,D,z,f.dialog]}),t[36]=f.dialog,t[37]=z,t[38]=E,t[39]=D,t[40]=B):B=t[40],B}export{N as SkillToolbarControls};
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"./utils-CPqDy6Hr.js";import{a as s,i as c,n as l,o as u,r as d,s as f,t as p}from"./select-pACXgFe2.js";import{t as m}from"./button-DzgjsZzC.js";import{l as h,n as g,r as _,t as v}from"./AddPropertiesButton-6doNmCHk.js";import{a as y,h as b,r as x,t as S,u as C}from"./dropdown-menu-5XqyQTVx.js";import{n as w}from"./file-plus-DKxOZh2k.js";import{t as T}from"./list-plus-CYMJBvrm.js";import{p as E,t as D}from"./skill-scope-DOTLd4gL.js";var O=a(),k=t();function A(e){let t=(0,O.c)(21),{value:n,onRequestMove:a,disabled:m,triggerClassName:h}=e,{_:g}=i(),_=E(),v;t[0]===a?v=t[1]:(v=e=>a(e),t[0]=a,t[1]=v);let y;t[2]===g?y=t[3]:(y=g({id:`oCHfGC`}),t[2]=g,t[3]=y);let b;t[4]===h?b=t[5]:(b=o(`w-auto gap-1 text-xs font-mono uppercase`,h),t[4]=h,t[5]=b);let x;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,k.jsx)(f,{}),t[6]=x):x=t[6];let S;t[7]!==y||t[8]!==b?(S=(0,k.jsx)(u,{size:`sm`,"aria-label":y,"data-testid":`skill-level-select`,className:b,children:x}),t[7]=y,t[8]=b,t[9]=S):S=t[9];let C;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,k.jsx)(s,{children:(0,k.jsx)(r,{id:`oCHfGC`})}),t[10]=C):C=t[10];let w;t[11]===_?w=t[12]:(w=D.map(e=>(0,k.jsx)(c,{value:e,children:_[e]},e)),t[11]=_,t[12]=w);let T;t[13]===w?T=t[14]:(T=(0,k.jsx)(l,{align:`end`,children:(0,k.jsxs)(d,{children:[C,w]})}),t[13]=w,t[14]=T);let A;return t[15]!==m||t[16]!==v||t[17]!==S||t[18]!==T||t[19]!==n?(A=(0,k.jsxs)(p,{value:n,onValueChange:v,disabled:m,children:[S,T]}),t[15]=m,t[16]=v,t[17]=S,t[18]=T,t[19]=n,t[20]=A):A=t[20],A}var j=e(n(),1);function M(e){let t=(0,O.c)(12),{scope:n,name:r}=e,[i,a]=(0,j.useState)(null),o;t[0]===n?o=t[1]:(o=e=>{e!==n&&a(e)},t[0]=n,t[1]=o);let s;t[2]!==r||t[3]!==i||t[4]!==n?(s=i?{scope:n,name:r,toScope:i}:null,t[2]=r,t[3]=i,t[4]=n,t[5]=s):s=t[5];let c;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=e=>!e&&a(null),t[6]=c):c=t[6];let l;t[7]===s?l=t[8]:(l=(0,k.jsx)(h,{target:s,onOpenChange:c}),t[7]=s,t[8]=l);let u;return t[9]!==o||t[10]!==l?(u={requestMove:o,dialog:l},t[9]=o,t[10]=l,t[11]=u):u=t[11],u}function N(e){let t=(0,O.c)(41),{scope:n,name:a,showAddPropertyButton:o,onAddProperty:s,problemCount:c,problemMessages:l}=e,{_:u}=i(),d;t[0]!==a||t[1]!==n?(d={scope:n,name:a},t[0]=a,t[1]=n,t[2]=d):d=t[2];let f=M(d),p;t[3]!==f.requestMove||t[4]!==n?(p=(0,k.jsx)(A,{value:n,onRequestMove:f.requestMove,triggerClassName:`hidden @xl/toolbar:flex`}),t[3]=f.requestMove,t[4]=n,t[5]=p):p=t[5];let h;t[6]!==a||t[7]!==n?(h=(0,k.jsx)(_,{scope:n,name:a}),t[6]=a,t[7]=n,t[8]=h):h=t[8];let E;t[9]!==p||t[10]!==h?(E=(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[p,h]}),t[9]=p,t[10]=h,t[11]=E):E=t[11];let D;t[12]!==s||t[13]!==c||t[14]!==l||t[15]!==o?(D=o?(0,k.jsx)(v,{onAddProperty:s,problemCount:c,problemMessages:l,className:`hidden @xl/toolbar:inline-flex`}):null,t[12]=s,t[13]=c,t[14]=l,t[15]=o,t[16]=D):D=t[16];let j;t[17]===u?j=t[18]:(j=u({id:`Yzs3QX`}),t[17]=u,t[18]=j);let N;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,k.jsx)(w,{className:`size-4`,"aria-hidden":!0}),t[19]=N):N=t[19];let P;t[20]===j?P=t[21]:(P=(0,k.jsx)(b,{asChild:!0,children:(0,k.jsx)(m,{variant:`ghost`,size:`icon`,"aria-label":j,"data-testid":`skill-toolbar-overflow`,className:`@xl/toolbar:hidden`,children:N})}),t[20]=j,t[21]=P);let F;t[22]===f?F=t[23]:(F=e=>f.requestMove(e),t[22]=f,t[23]=F);let I;t[24]!==n||t[25]!==F?(I=(0,k.jsx)(g,{value:n,onSelect:F}),t[24]=n,t[25]=F,t[26]=I):I=t[26];let L;t[27]!==s||t[28]!==o?(L=o?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(C,{}),(0,k.jsxs)(y,{onSelect:s,children:[(0,k.jsx)(T,{}),(0,k.jsx)(r,{id:`81H_23`})]})]}):null,t[27]=s,t[28]=o,t[29]=L):L=t[29];let R;t[30]!==I||t[31]!==L?(R=(0,k.jsxs)(x,{align:`end`,className:`min-w-44`,children:[I,L]}),t[30]=I,t[31]=L,t[32]=R):R=t[32];let z;t[33]!==R||t[34]!==P?(z=(0,k.jsxs)(S,{children:[P,R]}),t[33]=R,t[34]=P,t[35]=z):z=t[35];let B;return t[36]!==f.dialog||t[37]!==z||t[38]!==E||t[39]!==D?(B=(0,k.jsxs)(k.Fragment,{children:[E,D,z,f.dialog]}),t[36]=f.dialog,t[37]=z,t[38]=E,t[39]=D,t[40]=B):B=t[40],B}export{N as SkillToolbarControls};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{At as n,Bt as r,Cn as i,Dt as a,Pt as o,Qn as s,Sn as c,an as l,kt as u,qn as ee,rn as te,st as ne,zt as d}from"./DocumentContext-CQ9yJTwa.js";import{t as f}from"./react-f2sANaYj.js";import{n as p}from"./dist-PQ5KMVDh.js";import{t as m}from"./compiler-runtime-BfE3aGVn.js";import{ht as h}from"./schemas-api-CD98jV86.js";import{i as g}from"./use-apply-config-theme-CYFG76sS.js";import{H as re,I as _,L as ie,N as ae,T as oe,b as v,c as se,n as y,o as b,r as ce,t as le,v as x,w as ue,z as de}from"./typing-burst-detector-BoVzKGHe.js";import{Bn as fe,Hn as S,Q as C,a as pe,gt as w,i as me,mt as T,o as he,x as E}from"./CodeMirrorPropInput-CLpFWFtJ.js";import{a as D,i as O}from"./constants-skills-BLHVRW90.js";import{t as k}from"./diagnostic-breadcrumb-DPgUDxA8.js";import{n as A}from"./perf-CPPbaRwr.js";import{m as ge}from"./config-provider-sjjSxSoD.js";import{$ as j,At as M,Ct as N,E as P,J as F,K as I,Mt as L,N as R,Nt as z,Tt as _e,X as B,at as V,b as H,et as U,ft as ve,g as W,l as G,lt as K,ot as q,pt as J,st as Y,tt as X,ut as Z,v as ye,wt as be}from"./dist-BosZaL03.js";import{i as xe,t as Se}from"./dist-DTvyxWzB.js";import{i as Ce,n as we,o as Te,r as Ee}from"./dist-D2c3re7d.js";import{o as De,r as Oe}from"./selection-context-Bk-__0F7.js";import{C as ke,D as Ae,t as je}from"./markdown-lint-BuEapKhE.js";import{l as Me}from"./lint-config-client-DRJNyM2s.js";import{a as Ne,i as Pe,n as Fe,o as Ie,r as Le,s as Re,t as ze}from"./dist-CRnJUJYV.js";import{n as Be,t as Ve}from"./src-C9e8mYI6.js";var Q=e(f(),1),He=m();function Ue(){let e=d();return e===null?null:new Set(e.keys())}function We(e,t,n){let r=[],i=R(e);if(n!=null){let a=[];for(let{from:e,to:n}of t)i.iterate({from:e,to:n,enter(e){if(e.name===`InlineCode`||e.name===`FencedCode`)return a.push({from:e.from,to:e.to}),!1}});let o=(e,t)=>a.some(n=>e>=n.from&&t<=n.to);for(let{from:i,to:a}of t){let t=e.doc.sliceString(i,a);O.lastIndex=0;for(let e=O.exec(t);e!==null;e=O.exec(t)){let t=e[2];if(!D(t))continue;let a=i+(e.index??0)+e[1].length,s=a+t.length+1;o(a,s)||r.push(I.mark({class:n.has(t)?`cm-skill-ref`:`cm-skill-ref cm-skill-ref-missing`,attributes:{"data-skill-ref":t}}).range(a,s))}}}for(let{from:o,to:s}of t)i.iterate({from:o,to:s,enter(t){if(t.name!==`InlineCode`)return;let i=e.doc.sliceString(t.from,t.to),o=i.length-i.replace(/^`+/,``).length,s=i.length-i.replace(/`+$/,``).length,c=i.slice(o,i.length-s),l=/^\/([a-z0-9][a-z0-9-]{1,63})$/.exec(c)?.[1];if(l!==void 0&&D(l)&&n!=null)return r.push(I.mark({class:n.has(l)?`cm-skill-ref`:`cm-skill-ref cm-skill-ref-missing`,attributes:{"data-skill-ref":l}}).range(t.from+o,t.to-s)),!1;let u=a.exec(c);if(u)return r.push(I.mark({class:`cm-skill-path-link`,attributes:{"data-skill-path":u[1]}}).range(t.from+o,t.to-s)),!1}});return r.sort((e,t)=>e.from-t.from||e.value.startSide-t.value.startSide),I.set(r)}function Ge(e){let t=n(e);return t===null?[]:[B.fromClass(class{decorations;constructor(e){this.decorations=We(e.state,e.visibleRanges,Ue())}update(e){(e.docChanged||e.viewportChanged||R(e.startState)!==R(e.state))&&(this.decorations=We(e.view.state,e.view.visibleRanges,Ue()))}},{decorations:e=>e.decorations}),F.domEventHandlers({mousedown(n){let i=n.target?.closest?.(`[data-skill-ref]`),a=i instanceof HTMLElement?i.dataset.skillRef:void 0;if(a!==void 0){n.preventDefault();let e=d()?.get(a);return e===void 0?o():window.location.hash=r(a,e),!0}let s=n.target?.closest?.(`.cm-skill-path-link`),c=s instanceof HTMLElement?s.dataset.skillPath:void 0;return c===void 0?!1:(n.preventDefault(),window.location.hash=u(t,e,c),!0)}})]}var Ke=I.line({attributes:{dir:`auto`}});function qe(e){let t=new M;for(let n of e.visibleRanges)for(let r=n.from;r<=n.to;){let n=e.state.doc.lineAt(r);t.add(n.from,n.from,Ke),r=n.to+1}return t.finish()}var Je=B.fromClass(class{decorations;constructor(e){this.decorations=qe(e)}update(e){(e.docChanged||e.viewportChanged)&&(this.decorations=qe(e.view))}},{decorations:e=>e.decorations}),Ye=[F.perLineTextDirection.of(!0),Je],Xe=new Set([`Link`,`Image`,`HTMLTag`,`HTMLBlock`]),Ze=`cm-lint-local-target`;function Qe(e,t){let n=Math.min(Math.max(t.line+1,1),e.lines),r=e.line(n);return Math.min(r.from+Math.max(0,t.character),r.to)}function $e(e,t){let n=W(e,t+1,100);if(n){let e=n.resolveInner(t,1);for(;e;){if(Xe.has(e.name))return{from:e.from,to:e.to};e=e.parent}}return{from:t,to:t}}function et(e){return e===`error`?`error`:e===`info`?`info`:`warning`}function tt(e,t){let n=e.doc,r=[];for(let i of t){if(i.source!==`links`)continue;let t=$e(e,Qe(n,i.range.start));r.push({from:t.from,to:Math.max(t.to,t.from),severity:et(i.severity),message:v(i),source:`${i.source}/${i.code}`,markClass:Ze})}return r}var nt=L.define();function rt(e){let t={findings:[]};return[Pe(e=>T()?tt(e.state,t.findings):[],{delay:300,needsRefresh:e=>e.transactions.some(e=>e.effects.some(e=>e.is(nt)))}),B.define(n=>{let r=e=>{t.findings=e,n.dispatch({effects:nt.of(null)}),ze(n)},i=x(e,e=>{e.status===`loaded`&&r(e.findings)}),a=w(()=>r(t.findings));return{destroy(){i(),a()}}})]}function it(e,t){return e.enabled?[Fe(),Pe(async n=>at(n.state.doc,await ke(n.state.doc.toString(),e,t)),{delay:600})]:[]}function $(e,t){let n=Math.min(Math.max(t.line+1,1),e.lines),r=e.line(n);return Math.min(r.from+Math.max(0,t.character),r.to)}function at(e,t){let n=[];for(let r of t){let t=$(e,r.range.start),i=$(e,r.range.end),a={from:t,to:Math.max(i,t),severity:r.severity,message:r.message,source:`${r.source}/${r.code}`},o=ot(r);o&&(a.actions=[o]),n.push(a)}return n}function ot(e){let t=e.fixes;return!t||t.length===0?null:{name:`Fix`,apply(e){let n=e.state.doc;e.dispatch({changes:t.map(e=>({from:$(n,e.range.start),to:$(n,e.range.end),insert:e.newText})),userEvent:`input.complete`})}}}var st=[Z(),q(),Y(),ye(),U(),X(),_e.allowMultipleSelections.of(!0),P(),G(),Ee(),we(),J(),j(),V(),Ne(),K.of([...Ce,...Se,...Re,...H,...Te,...Le])],ct=I.mark({class:`cm-link-ref-broken`}),lt=/^\s{0,3}\[([^\]]+)\]:\s/,ut=/\[([^\]]*)\]\[([^\]]*)\]/g,dt=new Set([`FencedCode`,`CodeBlock`,`InlineCode`]);function ft(e,t){let n=0,r=t.length-1;for(;n<=r;){let i=n+r>>1,a=t[i];if(e<a.from)r=i-1;else if(e>=a.to)n=i+1;else return!0}return!1}function pt(e){let t=[];return R(e).iterate({enter(e){if(dt.has(e.name))return t.push({from:e.from,to:e.to}),!1}}),t.sort((e,t)=>e.from-t.from),t}function mt(e){let t=new Set,n=[],r=e.doc,i=pt(e);for(let e=1;e<=r.lines;e++){let n=r.line(e);if(ft(n.from,i))continue;let a=lt.exec(n.text);a&&t.add(a[1].toLowerCase())}for(let e=1;e<=r.lines;e++){let t=r.line(e);if(!ft(t.from,i)&&!lt.test(t.text))for(ut.lastIndex=0;;){let e=ut.exec(t.text);if(!e)break;let r=t.from+e.index;if(ft(r,i))continue;let a=e[2]||e[1];n.push({from:r,to:r+e[0].length,label:a.toLowerCase()})}}let a=[];for(let e of n)t.has(e.label)||a.push(ct.range(e.from,e.to));return a.sort((e,t)=>e.from-t.from),I.set(a)}var ht=z.define({create(e){return mt(e)},update(e,t){return t.docChanged?mt(t.state):e},provide:e=>F.decorations.from(e)}),gt=/^(\s*(?:[-*+]|\d+[.)]) (?:\[[ x]\] )?)/,_t=I.mark({class:`cm-del`}),vt=I.line({class:`cm-table-header`,attributes:{style:`--list-hang: 2ch`}}),yt=I.line({class:`cm-table-row`,attributes:{style:`--list-hang: 2ch`}});function bt(e){let t=0;for(let n of e)if(n===` `)t++;else if(n===` `)t+=4;else break;return t}function xt(e){if(e.doc.lines<2)return null;let t=e.doc.line(1);if(!h.test(t.text))return null;for(let n=2;n<=e.doc.lines;n++){let r=e.doc.line(n);if(h.test(r.text))return{from:t.from,to:r.to}}return null}function St(e,t){let n=[],r=R(e),i=xt(e),a=e=>i!==null&&e>=i.from&&e<=i.to;for(let{from:i,to:o}of t)r.iterate({from:i,to:o,enter(t){if(!a(t.from)){if(t.name===`Strikethrough`){let e=t.from,r=t.to,i=t.node.cursor();if(i.firstChild())do i.name===`StrikethroughMark`&&(i.from===t.from?e=i.to:r=i.from);while(i.nextSibling());return e<r&&n.push(_t.range(e,r)),!1}if(t.name===`ListItem`){let r=e.doc.lineAt(t.from),i=gt.exec(r.text),a=i?i[1].length:2,o=I.line({class:`cm-list-item`,attributes:{style:`--list-hang: ${a}ch`}});n.push(o.range(r.from));return}if(t.name===`FencedCode`){let r=e.doc.lineAt(t.from),i=e.doc.lineAt(t.to);for(let t=r.number+1;t<i.number;t++){let r=e.doc.line(t),i=bt(r.text),a=I.line({class:`cm-fenced-code-line`,attributes:{style:`--line-indent: ${i}`}});n.push(a.range(r.from))}return!1}if(t.name===`TableHeader`){let r=e.doc.lineAt(t.from);return n.push(vt.range(r.from)),!1}if(t.name===`TableRow`){let r=e.doc.lineAt(t.from);return n.push(yt.range(r.from)),!1}if(t.name===`TableDelimiter`&&t.node.parent?.name===`Table`){let r=e.doc.lineAt(t.from);return n.push(yt.range(r.from)),!1}}}});return n.sort((e,t)=>e.from-t.from||e.value.startSide-t.value.startSide),I.set(n)}var Ct=class{decorations;constructor(e){this.decorations=St(e.state,e.visibleRanges)}update(e){(e.docChanged||e.viewportChanged||R(e.startState)!==R(e.state))&&(this.decorations=St(e.view.state,e.view.visibleRanges))}},wt=B.fromClass(Ct,{decorations:e=>e.decorations});function Tt(){return[wt,ht]}function Et(e,t){let n=e.trackedOrigins;return n.has(t)?!0:t?n.has(t.constructor):!1}function Dt(e){let{docName:t,ytext:n,undoManager:r}=e,i=!1,a=!1,o=!1,s=(e,t)=>{i||Et(r,t.origin)||(a=!0)};return n.observe(s),{setSourceModeActive(e){if(!o&&e!==i){if(!e){i=!1,r.stopCapturing();return}a&&(r.clear(),A(`ok/source-undo/flip-clear`,{docName:t})),a=!1,i=!0}},destroy(){o||(o=!0,n.unobserve(s))}}}var Ot=new WeakMap;function kt(e){return B.define(t=>{let n=Dt(e);return Ot.set(t,n),{destroy(){n.destroy()}}})}function At(e,t){let n=Ot.get(e);if(!n)throw Error(`createSourceUndoFlipExtension is not installed on this EditorView`);n.setSourceModeActive(t)}var jt=t(),Mt=L.define();function Nt(e,t){try{At(t.view,!1)}finally{try{i(t)}finally{S(e,t.view)}}}function Pt(e,t,n){let r=b(e.state.doc),i=r[t.index],a={docName:n,mode:`source`,index:t.index,sourceHeadingCount:r.length};if(!i)return k(y,{...a,outcome:`no-target`}),!1;let o=s(n,`outline`,()=>{e.dispatch({selection:be.cursor(i.from),effects:F.scrollIntoView(i.from,{y:`start`})}),e.focus()});return k(y,{...a,outcome:o?`scrolled`:`declined`,targetLine:e.state.doc.lineAt(i.from).number}),o}function Ft(e,t,n,r){requestAnimationFrame(()=>{if(!n())return;let i=e.state.doc,a=Math.min(t.offset,i.length);s(r,`raw-mdx`,()=>{e.dispatch({selection:be.cursor(a),effects:F.scrollIntoView(a,{y:`center`})}),e.focus()})})}function It(e,t,n){let r=e.state.doc,i=Math.min(Math.max(t.line,1),r.lines),a=r.line(i),o=Math.min(a.from+Math.max(0,t.column-1),a.to);return s(n,`problems-row`,()=>{e.dispatch({selection:be.cursor(o),effects:F.scrollIntoView(o,{y:`start`})}),e.focus()})}function Lt(e){let t=(0,He.c)(51),{docName:n,ytext:r,provider:i,placeholder:a,isSourceModeActive:o}=e,s=(0,Q.useRef)(null),u=(0,Q.useRef)(null),[d,f]=(0,Q.useState)(null);if(d)throw d;let{resolvedTheme:m}=p(),{merged:h}=g(),v=(0,Q.useRef)(o),b=h?.editor?.wordWrap??!0,{data:x}=Me(n),S;t[0]!==x?.effective||t[1]!==h?(S=x?.effective??(h?.contentRules?Ae(h.contentRules):je),t[0]=x?.effective,t[1]=h,t[2]=S):S=t[2];let C=S,w;t[3]===C?w=t[4]:(w=JSON.stringify(C),t[3]=C,t[4]=w);let T=w,E=(0,Q.useRef)(null),D;t[5]!==n||t[6]!==o||t[7]!==C||t[8]!==a||t[9]!==i||t[10]!==m||t[11]!==b||t[12]!==r?(D=()=>{let e=s.current;if(!e)return;let t=i.configuration.name??``,d,p=zt;try{d=c({docName:t,container:e,sizeStats:{viewCount:0,bytes:r.length},factory:e=>{let o=null,s=new ge(r);try{let c=ne({ydoc:i.document,ytext:r,docName:t}),u=new N,d=new N,f=new N,h=new N,g=new F({state:_e.create({doc:r.toString(),extensions:[st,Ye,Ie({scrollToMatch:e=>ee(t,`find-match`)?F.scrollIntoView(e,{y:`start`}):Mt.of(null)}),K.of([xe]),Ve(r,i.awareness,{undoManager:s}),K.of(Be),kt({docName:t,ytext:r,undoManager:s}),...me({themeCompartment:u,resolvedTheme:m,ydoc:i.document,wordWrapCompartment:d,wordWrap:b,currentDocName:t}),Tt(),Ge(t),re(),h.of(it(C,n)),rt(n),c,F.updateListener.of(e=>{te(e)&&l(t)}),F.updateListener.of(e=>{!e.selectionSet&&!e.docChanged||(o!==null&&clearTimeout(o),o=setTimeout(()=>{o=null,ue(t,`source`,oe(e.view)),Oe(t,`source`,De(e.view,t))},120))}),f.of(ve(a??``)),F.theme({"&":{height:`100%`}}),F.scrollMargins.of(Rt)]}),parent:e});ue(t,`source`,oe(g)),Oe(t,`source`,De(g,t));let _=g.contentDOM;return _.addEventListener(`keydown`,p),_.addEventListener(`paste`,p),_.addEventListener(`drop`,p),_.addEventListener(`cut`,p),{view:g,ydoc:i.document,ytext:r,provider:i,undoManager:s,themeCompartment:u,wordWrapCompartment:d,placeholderCompartment:f,lintCompartment:h}}catch(e){let t=e;throw s.destroy(),t}}}),E.current=d,u.current=d.view,At(d.view,o),fe(n,d.view,`sourceEditor`),le()&&d.view.focus()}catch(e){let t=e;console.error(`[SourceEditor] mountCmEditor failed`,t),E.current=null,u.current=null,f(t instanceof Error?t:Error(String(t)))}return()=>{let e=E.current;E.current=null,u.current=null,e&&Nt(n,e)}},t[5]=n,t[6]=o,t[7]=C,t[8]=a,t[9]=i,t[10]=m,t[11]=b,t[12]=r,t[13]=D):D=t[13];let O;t[14]!==i||t[15]!==r?(O=[r,i],t[14]=i,t[15]=r,t[16]=O):O=t[16],(0,Q.useEffect)(D,O);let A,j;t[17]===o?(A=t[18],j=t[19]):(A=()=>{v.current=o;let e=u.current;e&&At(e,o)},j=[o],t[17]=o,t[18]=A,t[19]=j),(0,Q.useEffect)(A,j);let M,P;t[20]===n?(M=t[21],P=t[22]):(M=()=>{},P=[n],t[20]=n,t[21]=M,t[22]=P),(0,Q.useEffect)(M,P);let I,L;t[23]===m?(I=t[24],L=t[25]):(L=()=>{let e=E.current;e&&e.view.dispatch({effects:e.themeCompartment.reconfigure(m===`dark`?pe:he)})},I=[m],t[23]=m,t[24]=I,t[25]=L),(0,Q.useEffect)(L,I);let R,z;t[26]===b?(R=t[27],z=t[28]):(R=()=>{let e=E.current;e&&e.view.dispatch({effects:e.wordWrapCompartment.reconfigure(b?F.lineWrapping:[])})},z=[b],t[26]=b,t[27]=R,t[28]=z),(0,Q.useEffect)(R,z);let B,V;t[29]===a?(B=t[30],V=t[31]):(B=()=>{let e=E.current;e&&e.view.dispatch({effects:e.placeholderCompartment.reconfigure(ve(a??``))})},V=[a],t[29]=a,t[30]=B,t[31]=V),(0,Q.useEffect)(B,V);let H;t[32]!==n||t[33]!==C?(H=()=>{let e=E.current;e&&e.view.dispatch({effects:e.lintCompartment.reconfigure(it(C,n))})},t[32]=n,t[33]=C,t[34]=H):H=t[34];let U;t[35]===T?U=t[36]:(U=[T],t[35]=T,t[36]=U),(0,Q.useEffect)(H,U);let W,G;t[37]!==n||t[38]!==o?(W=()=>{let e=function(e){let t=e.detail;if(!t||t.docName!==n||t.mode!==`source`||!o)return;let r=u.current;if(!r){k(y,{docName:n,mode:`source`,index:t.index,outcome:`no-view`});return}Pt(r,t,n)&&t.onNavigated?.(r.contentDOM),_(n)};return window.addEventListener(ce,e),()=>window.removeEventListener(ce,e)},G=[n,o],t[37]=n,t[38]=o,t[39]=W,t[40]=G):(W=t[39],G=t[40]),(0,Q.useEffect)(W,G);let q,J;t[41]!==n||t[42]!==o?(q=()=>{let e=function(e){let t=e.detail;if(!t||t.docName!==n||!o)return;let r=u.current;r&&It(r,t,n)&&(_(n),t.onNavigated?.(r.contentDOM))};return window.addEventListener(se,e),()=>window.removeEventListener(se,e)},J=[n,o],t[41]=n,t[42]=o,t[43]=q,t[44]=J):(q=t[43],J=t[44]),(0,Q.useEffect)(q,J);let Y,X;t[45]!==n||t[46]!==o||t[47]!==i?(Y=()=>{if(!o)return;let e=u.current;if(!e)return;let t=de(n);if(!t)return;if(t.kind!==`selection-offset`){ie(n),t.kind===`outline`?Pt(e,t.detail,n)&&t.detail.onNavigated?.(e.contentDOM):t.kind===`lint`?It(e,t.detail,n)&&t.detail.onNavigated?.(e.contentDOM):t.kind===`raw-mdx`&&Ft(e,t.detail,()=>v.current,n);return}let r=!1,a=null;return queueMicrotask(()=>{if(r)return;let t=de(n);t?.kind===`selection-offset`&&(a=ae({view:e,docName:n,navigation:t,ydoc:i.document,transition:{from:`wysiwyg`,to:`source`}}),a&&ie(n))}),()=>{r=!0,a?.cancel(`mode-flip`)}},X=[n,o,i],t[45]=n,t[46]=o,t[47]=i,t[48]=Y,t[49]=X):(Y=t[48],X=t[49]),(0,Q.useEffect)(Y,X);let Z;return t[50]===Symbol.for(`react.memo_cache_sentinel`)?(Z=(0,jt.jsx)(`div`,{ref:s,className:`source-editor h-full pb-3`}),t[50]=Z):Z=t[50],Z}function Rt(){return{top:E()}}function zt(){return C()}export{Lt as SourceEditor,Ft as applyRawMdxNavigation};
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{At as n,Bt as r,Cn as i,Dt as a,Pt as o,Qn as s,Sn as c,an as l,kt as u,qn as ee,rn as te,st as ne,zt as d}from"./DocumentContext-kCyJeOet.js";import{t as f}from"./react-f2sANaYj.js";import{n as p}from"./dist-PQ5KMVDh.js";import{t as m}from"./compiler-runtime-BfE3aGVn.js";import{ht as h}from"./schemas-api-CD98jV86.js";import{i as g}from"./use-apply-config-theme-CYFG76sS.js";import{H as re,I as _,L as ie,N as ae,T as oe,b as v,c as se,n as y,o as b,r as ce,t as le,v as x,w as ue,z as de}from"./typing-burst-detector-Bx-tJ0Xa.js";import{Bn as fe,Hn as S,Q as C,a as pe,gt as w,i as me,mt as T,o as he,x as E}from"./CodeMirrorPropInput-CutdtFWg.js";import{a as D,i as O}from"./constants-skills-BLHVRW90.js";import{t as k}from"./diagnostic-breadcrumb-DPgUDxA8.js";import{n as A}from"./perf-CPPbaRwr.js";import{m as ge}from"./config-provider-BO6LFV98.js";import{$ as j,At as M,Ct as N,E as P,J as F,K as I,Mt as L,N as R,Nt as z,Tt as _e,X as B,at as V,b as H,et as U,ft as ve,g as W,l as G,lt as K,ot as q,pt as J,st as Y,tt as X,ut as Z,v as ye,wt as be}from"./dist-BosZaL03.js";import{i as xe,t as Se}from"./dist-DTvyxWzB.js";import{i as Ce,n as we,o as Te,r as Ee}from"./dist-D2c3re7d.js";import{o as De,r as Oe}from"./selection-context-DKhvREFe.js";import{C as ke,D as Ae,t as je}from"./markdown-lint-BuEapKhE.js";import{l as Me}from"./lint-config-client-DRJNyM2s.js";import{a as Ne,i as Pe,n as Fe,o as Ie,r as Le,s as Re,t as ze}from"./dist-CRnJUJYV.js";import{n as Be,t as Ve}from"./src-BqGewQt5.js";var Q=e(f(),1),He=m();function Ue(){let e=d();return e===null?null:new Set(e.keys())}function We(e,t,n){let r=[],i=R(e);if(n!=null){let a=[];for(let{from:e,to:n}of t)i.iterate({from:e,to:n,enter(e){if(e.name===`InlineCode`||e.name===`FencedCode`)return a.push({from:e.from,to:e.to}),!1}});let o=(e,t)=>a.some(n=>e>=n.from&&t<=n.to);for(let{from:i,to:a}of t){let t=e.doc.sliceString(i,a);O.lastIndex=0;for(let e=O.exec(t);e!==null;e=O.exec(t)){let t=e[2];if(!D(t))continue;let a=i+(e.index??0)+e[1].length,s=a+t.length+1;o(a,s)||r.push(I.mark({class:n.has(t)?`cm-skill-ref`:`cm-skill-ref cm-skill-ref-missing`,attributes:{"data-skill-ref":t}}).range(a,s))}}}for(let{from:o,to:s}of t)i.iterate({from:o,to:s,enter(t){if(t.name!==`InlineCode`)return;let i=e.doc.sliceString(t.from,t.to),o=i.length-i.replace(/^`+/,``).length,s=i.length-i.replace(/`+$/,``).length,c=i.slice(o,i.length-s),l=/^\/([a-z0-9][a-z0-9-]{1,63})$/.exec(c)?.[1];if(l!==void 0&&D(l)&&n!=null)return r.push(I.mark({class:n.has(l)?`cm-skill-ref`:`cm-skill-ref cm-skill-ref-missing`,attributes:{"data-skill-ref":l}}).range(t.from+o,t.to-s)),!1;let u=a.exec(c);if(u)return r.push(I.mark({class:`cm-skill-path-link`,attributes:{"data-skill-path":u[1]}}).range(t.from+o,t.to-s)),!1}});return r.sort((e,t)=>e.from-t.from||e.value.startSide-t.value.startSide),I.set(r)}function Ge(e){let t=n(e);return t===null?[]:[B.fromClass(class{decorations;constructor(e){this.decorations=We(e.state,e.visibleRanges,Ue())}update(e){(e.docChanged||e.viewportChanged||R(e.startState)!==R(e.state))&&(this.decorations=We(e.view.state,e.view.visibleRanges,Ue()))}},{decorations:e=>e.decorations}),F.domEventHandlers({mousedown(n){let i=n.target?.closest?.(`[data-skill-ref]`),a=i instanceof HTMLElement?i.dataset.skillRef:void 0;if(a!==void 0){n.preventDefault();let e=d()?.get(a);return e===void 0?o():window.location.hash=r(a,e),!0}let s=n.target?.closest?.(`.cm-skill-path-link`),c=s instanceof HTMLElement?s.dataset.skillPath:void 0;return c===void 0?!1:(n.preventDefault(),window.location.hash=u(t,e,c),!0)}})]}var Ke=I.line({attributes:{dir:`auto`}});function qe(e){let t=new M;for(let n of e.visibleRanges)for(let r=n.from;r<=n.to;){let n=e.state.doc.lineAt(r);t.add(n.from,n.from,Ke),r=n.to+1}return t.finish()}var Je=B.fromClass(class{decorations;constructor(e){this.decorations=qe(e)}update(e){(e.docChanged||e.viewportChanged)&&(this.decorations=qe(e.view))}},{decorations:e=>e.decorations}),Ye=[F.perLineTextDirection.of(!0),Je],Xe=new Set([`Link`,`Image`,`HTMLTag`,`HTMLBlock`]),Ze=`cm-lint-local-target`;function Qe(e,t){let n=Math.min(Math.max(t.line+1,1),e.lines),r=e.line(n);return Math.min(r.from+Math.max(0,t.character),r.to)}function $e(e,t){let n=W(e,t+1,100);if(n){let e=n.resolveInner(t,1);for(;e;){if(Xe.has(e.name))return{from:e.from,to:e.to};e=e.parent}}return{from:t,to:t}}function et(e){return e===`error`?`error`:e===`info`?`info`:`warning`}function tt(e,t){let n=e.doc,r=[];for(let i of t){if(i.source!==`links`)continue;let t=$e(e,Qe(n,i.range.start));r.push({from:t.from,to:Math.max(t.to,t.from),severity:et(i.severity),message:v(i),source:`${i.source}/${i.code}`,markClass:Ze})}return r}var nt=L.define();function rt(e){let t={findings:[]};return[Pe(e=>T()?tt(e.state,t.findings):[],{delay:300,needsRefresh:e=>e.transactions.some(e=>e.effects.some(e=>e.is(nt)))}),B.define(n=>{let r=e=>{t.findings=e,n.dispatch({effects:nt.of(null)}),ze(n)},i=x(e,e=>{e.status===`loaded`&&r(e.findings)}),a=w(()=>r(t.findings));return{destroy(){i(),a()}}})]}function it(e,t){return e.enabled?[Fe(),Pe(async n=>at(n.state.doc,await ke(n.state.doc.toString(),e,t)),{delay:600})]:[]}function $(e,t){let n=Math.min(Math.max(t.line+1,1),e.lines),r=e.line(n);return Math.min(r.from+Math.max(0,t.character),r.to)}function at(e,t){let n=[];for(let r of t){let t=$(e,r.range.start),i=$(e,r.range.end),a={from:t,to:Math.max(i,t),severity:r.severity,message:r.message,source:`${r.source}/${r.code}`},o=ot(r);o&&(a.actions=[o]),n.push(a)}return n}function ot(e){let t=e.fixes;return!t||t.length===0?null:{name:`Fix`,apply(e){let n=e.state.doc;e.dispatch({changes:t.map(e=>({from:$(n,e.range.start),to:$(n,e.range.end),insert:e.newText})),userEvent:`input.complete`})}}}var st=[Z(),q(),Y(),ye(),U(),X(),_e.allowMultipleSelections.of(!0),P(),G(),Ee(),we(),J(),j(),V(),Ne(),K.of([...Ce,...Se,...Re,...H,...Te,...Le])],ct=I.mark({class:`cm-link-ref-broken`}),lt=/^\s{0,3}\[([^\]]+)\]:\s/,ut=/\[([^\]]*)\]\[([^\]]*)\]/g,dt=new Set([`FencedCode`,`CodeBlock`,`InlineCode`]);function ft(e,t){let n=0,r=t.length-1;for(;n<=r;){let i=n+r>>1,a=t[i];if(e<a.from)r=i-1;else if(e>=a.to)n=i+1;else return!0}return!1}function pt(e){let t=[];return R(e).iterate({enter(e){if(dt.has(e.name))return t.push({from:e.from,to:e.to}),!1}}),t.sort((e,t)=>e.from-t.from),t}function mt(e){let t=new Set,n=[],r=e.doc,i=pt(e);for(let e=1;e<=r.lines;e++){let n=r.line(e);if(ft(n.from,i))continue;let a=lt.exec(n.text);a&&t.add(a[1].toLowerCase())}for(let e=1;e<=r.lines;e++){let t=r.line(e);if(!ft(t.from,i)&&!lt.test(t.text))for(ut.lastIndex=0;;){let e=ut.exec(t.text);if(!e)break;let r=t.from+e.index;if(ft(r,i))continue;let a=e[2]||e[1];n.push({from:r,to:r+e[0].length,label:a.toLowerCase()})}}let a=[];for(let e of n)t.has(e.label)||a.push(ct.range(e.from,e.to));return a.sort((e,t)=>e.from-t.from),I.set(a)}var ht=z.define({create(e){return mt(e)},update(e,t){return t.docChanged?mt(t.state):e},provide:e=>F.decorations.from(e)}),gt=/^(\s*(?:[-*+]|\d+[.)]) (?:\[[ x]\] )?)/,_t=I.mark({class:`cm-del`}),vt=I.line({class:`cm-table-header`,attributes:{style:`--list-hang: 2ch`}}),yt=I.line({class:`cm-table-row`,attributes:{style:`--list-hang: 2ch`}});function bt(e){let t=0;for(let n of e)if(n===` `)t++;else if(n===` `)t+=4;else break;return t}function xt(e){if(e.doc.lines<2)return null;let t=e.doc.line(1);if(!h.test(t.text))return null;for(let n=2;n<=e.doc.lines;n++){let r=e.doc.line(n);if(h.test(r.text))return{from:t.from,to:r.to}}return null}function St(e,t){let n=[],r=R(e),i=xt(e),a=e=>i!==null&&e>=i.from&&e<=i.to;for(let{from:i,to:o}of t)r.iterate({from:i,to:o,enter(t){if(!a(t.from)){if(t.name===`Strikethrough`){let e=t.from,r=t.to,i=t.node.cursor();if(i.firstChild())do i.name===`StrikethroughMark`&&(i.from===t.from?e=i.to:r=i.from);while(i.nextSibling());return e<r&&n.push(_t.range(e,r)),!1}if(t.name===`ListItem`){let r=e.doc.lineAt(t.from),i=gt.exec(r.text),a=i?i[1].length:2,o=I.line({class:`cm-list-item`,attributes:{style:`--list-hang: ${a}ch`}});n.push(o.range(r.from));return}if(t.name===`FencedCode`){let r=e.doc.lineAt(t.from),i=e.doc.lineAt(t.to);for(let t=r.number+1;t<i.number;t++){let r=e.doc.line(t),i=bt(r.text),a=I.line({class:`cm-fenced-code-line`,attributes:{style:`--line-indent: ${i}`}});n.push(a.range(r.from))}return!1}if(t.name===`TableHeader`){let r=e.doc.lineAt(t.from);return n.push(vt.range(r.from)),!1}if(t.name===`TableRow`){let r=e.doc.lineAt(t.from);return n.push(yt.range(r.from)),!1}if(t.name===`TableDelimiter`&&t.node.parent?.name===`Table`){let r=e.doc.lineAt(t.from);return n.push(yt.range(r.from)),!1}}}});return n.sort((e,t)=>e.from-t.from||e.value.startSide-t.value.startSide),I.set(n)}var Ct=class{decorations;constructor(e){this.decorations=St(e.state,e.visibleRanges)}update(e){(e.docChanged||e.viewportChanged||R(e.startState)!==R(e.state))&&(this.decorations=St(e.view.state,e.view.visibleRanges))}},wt=B.fromClass(Ct,{decorations:e=>e.decorations});function Tt(){return[wt,ht]}function Et(e,t){let n=e.trackedOrigins;return n.has(t)?!0:t?n.has(t.constructor):!1}function Dt(e){let{docName:t,ytext:n,undoManager:r}=e,i=!1,a=!1,o=!1,s=(e,t)=>{i||Et(r,t.origin)||(a=!0)};return n.observe(s),{setSourceModeActive(e){if(!o&&e!==i){if(!e){i=!1,r.stopCapturing();return}a&&(r.clear(),A(`ok/source-undo/flip-clear`,{docName:t})),a=!1,i=!0}},destroy(){o||(o=!0,n.unobserve(s))}}}var Ot=new WeakMap;function kt(e){return B.define(t=>{let n=Dt(e);return Ot.set(t,n),{destroy(){n.destroy()}}})}function At(e,t){let n=Ot.get(e);if(!n)throw Error(`createSourceUndoFlipExtension is not installed on this EditorView`);n.setSourceModeActive(t)}var jt=t(),Mt=L.define();function Nt(e,t){try{At(t.view,!1)}finally{try{i(t)}finally{S(e,t.view)}}}function Pt(e,t,n){let r=b(e.state.doc),i=r[t.index],a={docName:n,mode:`source`,index:t.index,sourceHeadingCount:r.length};if(!i)return k(y,{...a,outcome:`no-target`}),!1;let o=s(n,`outline`,()=>{e.dispatch({selection:be.cursor(i.from),effects:F.scrollIntoView(i.from,{y:`start`})}),e.focus()});return k(y,{...a,outcome:o?`scrolled`:`declined`,targetLine:e.state.doc.lineAt(i.from).number}),o}function Ft(e,t,n,r){requestAnimationFrame(()=>{if(!n())return;let i=e.state.doc,a=Math.min(t.offset,i.length);s(r,`raw-mdx`,()=>{e.dispatch({selection:be.cursor(a),effects:F.scrollIntoView(a,{y:`center`})}),e.focus()})})}function It(e,t,n){let r=e.state.doc,i=Math.min(Math.max(t.line,1),r.lines),a=r.line(i),o=Math.min(a.from+Math.max(0,t.column-1),a.to);return s(n,`problems-row`,()=>{e.dispatch({selection:be.cursor(o),effects:F.scrollIntoView(o,{y:`start`})}),e.focus()})}function Lt(e){let t=(0,He.c)(51),{docName:n,ytext:r,provider:i,placeholder:a,isSourceModeActive:o}=e,s=(0,Q.useRef)(null),u=(0,Q.useRef)(null),[d,f]=(0,Q.useState)(null);if(d)throw d;let{resolvedTheme:m}=p(),{merged:h}=g(),v=(0,Q.useRef)(o),b=h?.editor?.wordWrap??!0,{data:x}=Me(n),S;t[0]!==x?.effective||t[1]!==h?(S=x?.effective??(h?.contentRules?Ae(h.contentRules):je),t[0]=x?.effective,t[1]=h,t[2]=S):S=t[2];let C=S,w;t[3]===C?w=t[4]:(w=JSON.stringify(C),t[3]=C,t[4]=w);let T=w,E=(0,Q.useRef)(null),D;t[5]!==n||t[6]!==o||t[7]!==C||t[8]!==a||t[9]!==i||t[10]!==m||t[11]!==b||t[12]!==r?(D=()=>{let e=s.current;if(!e)return;let t=i.configuration.name??``,d,p=zt;try{d=c({docName:t,container:e,sizeStats:{viewCount:0,bytes:r.length},factory:e=>{let o=null,s=new ge(r);try{let c=ne({ydoc:i.document,ytext:r,docName:t}),u=new N,d=new N,f=new N,h=new N,g=new F({state:_e.create({doc:r.toString(),extensions:[st,Ye,Ie({scrollToMatch:e=>ee(t,`find-match`)?F.scrollIntoView(e,{y:`start`}):Mt.of(null)}),K.of([xe]),Ve(r,i.awareness,{undoManager:s}),K.of(Be),kt({docName:t,ytext:r,undoManager:s}),...me({themeCompartment:u,resolvedTheme:m,ydoc:i.document,wordWrapCompartment:d,wordWrap:b,currentDocName:t}),Tt(),Ge(t),re(),h.of(it(C,n)),rt(n),c,F.updateListener.of(e=>{te(e)&&l(t)}),F.updateListener.of(e=>{!e.selectionSet&&!e.docChanged||(o!==null&&clearTimeout(o),o=setTimeout(()=>{o=null,ue(t,`source`,oe(e.view)),Oe(t,`source`,De(e.view,t))},120))}),f.of(ve(a??``)),F.theme({"&":{height:`100%`}}),F.scrollMargins.of(Rt)]}),parent:e});ue(t,`source`,oe(g)),Oe(t,`source`,De(g,t));let _=g.contentDOM;return _.addEventListener(`keydown`,p),_.addEventListener(`paste`,p),_.addEventListener(`drop`,p),_.addEventListener(`cut`,p),{view:g,ydoc:i.document,ytext:r,provider:i,undoManager:s,themeCompartment:u,wordWrapCompartment:d,placeholderCompartment:f,lintCompartment:h}}catch(e){let t=e;throw s.destroy(),t}}}),E.current=d,u.current=d.view,At(d.view,o),fe(n,d.view,`sourceEditor`),le()&&d.view.focus()}catch(e){let t=e;console.error(`[SourceEditor] mountCmEditor failed`,t),E.current=null,u.current=null,f(t instanceof Error?t:Error(String(t)))}return()=>{let e=E.current;E.current=null,u.current=null,e&&Nt(n,e)}},t[5]=n,t[6]=o,t[7]=C,t[8]=a,t[9]=i,t[10]=m,t[11]=b,t[12]=r,t[13]=D):D=t[13];let O;t[14]!==i||t[15]!==r?(O=[r,i],t[14]=i,t[15]=r,t[16]=O):O=t[16],(0,Q.useEffect)(D,O);let A,j;t[17]===o?(A=t[18],j=t[19]):(A=()=>{v.current=o;let e=u.current;e&&At(e,o)},j=[o],t[17]=o,t[18]=A,t[19]=j),(0,Q.useEffect)(A,j);let M,P;t[20]===n?(M=t[21],P=t[22]):(M=()=>{},P=[n],t[20]=n,t[21]=M,t[22]=P),(0,Q.useEffect)(M,P);let I,L;t[23]===m?(I=t[24],L=t[25]):(L=()=>{let e=E.current;e&&e.view.dispatch({effects:e.themeCompartment.reconfigure(m===`dark`?pe:he)})},I=[m],t[23]=m,t[24]=I,t[25]=L),(0,Q.useEffect)(L,I);let R,z;t[26]===b?(R=t[27],z=t[28]):(R=()=>{let e=E.current;e&&e.view.dispatch({effects:e.wordWrapCompartment.reconfigure(b?F.lineWrapping:[])})},z=[b],t[26]=b,t[27]=R,t[28]=z),(0,Q.useEffect)(R,z);let B,V;t[29]===a?(B=t[30],V=t[31]):(B=()=>{let e=E.current;e&&e.view.dispatch({effects:e.placeholderCompartment.reconfigure(ve(a??``))})},V=[a],t[29]=a,t[30]=B,t[31]=V),(0,Q.useEffect)(B,V);let H;t[32]!==n||t[33]!==C?(H=()=>{let e=E.current;e&&e.view.dispatch({effects:e.lintCompartment.reconfigure(it(C,n))})},t[32]=n,t[33]=C,t[34]=H):H=t[34];let U;t[35]===T?U=t[36]:(U=[T],t[35]=T,t[36]=U),(0,Q.useEffect)(H,U);let W,G;t[37]!==n||t[38]!==o?(W=()=>{let e=function(e){let t=e.detail;if(!t||t.docName!==n||t.mode!==`source`||!o)return;let r=u.current;if(!r){k(y,{docName:n,mode:`source`,index:t.index,outcome:`no-view`});return}Pt(r,t,n)&&t.onNavigated?.(r.contentDOM),_(n)};return window.addEventListener(ce,e),()=>window.removeEventListener(ce,e)},G=[n,o],t[37]=n,t[38]=o,t[39]=W,t[40]=G):(W=t[39],G=t[40]),(0,Q.useEffect)(W,G);let q,J;t[41]!==n||t[42]!==o?(q=()=>{let e=function(e){let t=e.detail;if(!t||t.docName!==n||!o)return;let r=u.current;r&&It(r,t,n)&&(_(n),t.onNavigated?.(r.contentDOM))};return window.addEventListener(se,e),()=>window.removeEventListener(se,e)},J=[n,o],t[41]=n,t[42]=o,t[43]=q,t[44]=J):(q=t[43],J=t[44]),(0,Q.useEffect)(q,J);let Y,X;t[45]!==n||t[46]!==o||t[47]!==i?(Y=()=>{if(!o)return;let e=u.current;if(!e)return;let t=de(n);if(!t)return;if(t.kind!==`selection-offset`){ie(n),t.kind===`outline`?Pt(e,t.detail,n)&&t.detail.onNavigated?.(e.contentDOM):t.kind===`lint`?It(e,t.detail,n)&&t.detail.onNavigated?.(e.contentDOM):t.kind===`raw-mdx`&&Ft(e,t.detail,()=>v.current,n);return}let r=!1,a=null;return queueMicrotask(()=>{if(r)return;let t=de(n);t?.kind===`selection-offset`&&(a=ae({view:e,docName:n,navigation:t,ydoc:i.document,transition:{from:`wysiwyg`,to:`source`}}),a&&ie(n))}),()=>{r=!0,a?.cancel(`mode-flip`)}},X=[n,o,i],t[45]=n,t[46]=o,t[47]=i,t[48]=Y,t[49]=X):(Y=t[48],X=t[49]),(0,Q.useEffect)(Y,X);let Z;return t[50]===Symbol.for(`react.memo_cache_sentinel`)?(Z=(0,jt.jsx)(`div`,{ref:s,className:`source-editor h-full pb-3`}),t[50]=Z):Z=t[50],Z}function Rt(){return{top:E()}}function zt(){return C()}export{Lt as SourceEditor,Ft as applyRawMdxNavigation};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{i as o,n as s,t as c}from"./tooltip-Bz6z4_se.js";import{n as ee,r as te,t as ne}from"./collapsible-BKbszYZV.js";import{i as l,n as u,o as d,s as f,t as p}from"./select-pACXgFe2.js";import{n as m,t as h}from"./toggle-group-B7p69Qfd.js";import{t as g}from"./button-DzgjsZzC.js";import{n as _}from"./dist-BGzUo_18.js";import{d as re,f as ie,h as ae,m as oe,p as se}from"./share-D-LUU2aX-B7Yg0G_m.js";import{i as ce}from"./use-apply-config-theme-CYFG76sS.js";import{C as le,T as ue,a as de,c as fe,h as pe,l as me,m as he,n as ge,o as _e,p as ve,t as ye,u as be,v as xe,w as Se,x as Ce}from"./SyncStatusBadge-C1T8mG3k.js";import{t as we}from"./arrow-up-right-nJaICi16.js";import{t as Te}from"./chevron-right-Bofu4lib.js";import{t as Ee}from"./use-settings-route-Bj-m9X61.js";import"./config-provider-sjjSxSoD.js";import{n as De}from"./use-git-sync-status-PkMYmN4D.js";import{t as Oe}from"./AuthModal-DT32BOAJ.js";import{t as v}from"./PublishToGitHubDialog-CCmFMsMn.js";import{t as ke}from"./skeleton-CrbF9ppq.js";import{n as Ae,t as je}from"./SettingsSectionHeader-DDNA1hrR.js";var Me=a(),y=e(n(),1),b=t(),x=`data-[state=on]:border-primary data-[state=on]:bg-primary data-[state=on]:text-primary-foreground data-[state=on]:hover:bg-primary/90`;function S(){let e=(0,Me.c)(4),[t,n]=(0,y.useState)(!1),r=(0,y.useRef)(null),i=(0,y.useRef)(null),a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,b.jsx)(C,{onPublish:()=>n(!0),setUpSyncingRef:r}),e[0]=a):a=e[0];let o;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>(r.current??i.current)?.focus(),e[1]=o):o=e[1];let s;return e[2]===t?s=e[3]:(s=(0,b.jsxs)(`section`,{ref:i,"aria-labelledby":`settings-sync-title`,tabIndex:-1,"data-testid":`settings-sync-section`,children:[a,(0,b.jsx)(v,{open:t,onOpenChange:n,returnFocus:o})]}),e[2]=t,e[3]=s),s}function C(e){let t=(0,Me.c)(149),{onPublish:n,setUpSyncingRef:a}=e,{_:v}=i(),{status:S,fetchError:C}=De(),{projectConfig:Fe,projectLocalConfig:Ie,projectLocalSynced:Le,projectSynced:Re}=ce(),ze=ue(),Be=Ce(),Ve=le(),[He,Ue]=(0,y.useState)(!1),We,Ge;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(We=()=>{Ee()&&Ue(!0)},Ge=[],t[0]=We,t[1]=Ge):(We=t[0],Ge=t[1]),(0,y.useEffect)(We,Ge);let w=oe(Ie?.autoSync),Ke=w.pushIntervalSeconds<w.pullIntervalSeconds,qe=Ie?.autoSync,Je;t[2]===qe?Je=t[3]:(Je=ae(qe),t[2]=qe,t[3]=Je);let Ye=Je,Xe=Fe?.autoSync?.default,Ze;t[4]===Xe?Ze=t[5]:(Ze=se(Xe),t[4]=Xe,t[5]=Ze);let Qe=Ze,$e;t[6]!==Ye||t[7]!==S?($e=Ye??(S===null?`off`:xe(S)),t[6]=Ye,t[7]=S,t[8]=$e):$e=t[8];let T=$e,E=Le&&Ye===null&&Qe!==null,{confirmOpen:et,setConfirmOpen:tt,pendingMode:nt,onModeSelect:D,onTurnOff:rt,onKeepCurrent:it,onConfirm:at}=Se(ze,T),[ot,O]=(0,y.useState)(!1),k=!Le;if(S===null){let e=C!==null,n=e?`settings-sync-unavailable`:`settings-sync-loading`,i;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,b.jsx)(je,{titleId:`settings-sync-title`,title:(0,b.jsx)(r,{id:`Nu4DdT`}),scope:`project-local`,level:`block`}),t[9]=i):i=t[9];let a=!e,o;t[10]!==C||t[11]!==e?(o=e?(0,b.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:C===`network`?(0,b.jsx)(r,{id:`epGMvx`}):(0,b.jsx)(r,{id:`wLRCZ8`})}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`span`,{className:`sr-only`,children:(0,b.jsx)(r,{id:`OgvwrM`})}),(0,b.jsx)(ke,{className:`h-24`})]}),t[10]=C,t[11]=e,t[12]=o):o=t[12];let s;t[13]!==a||t[14]!==o?(s=(0,b.jsx)(`div`,{role:`status`,"aria-live":`polite`,"aria-busy":a,children:o}),t[13]=a,t[14]=o,t[15]=s):s=t[15];let c;return t[16]!==s||t[17]!==n?(c=(0,b.jsxs)(`div`,{className:`space-y-3`,"data-testid":n,children:[i,s]}),t[16]=s,t[17]=n,t[18]=c):c=t[18],c}if(!S.hasRemote){let e=T!==`off`,i;t[19]!==rt||t[20]!==a?(i=()=>{rt()&&a.current?.focus()},t[19]=rt,t[20]=a,t[21]=i):i=t[21];let o=i,s;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,b.jsx)(r,{id:`Nu4DdT`}),t[22]=s):s=t[22];let c;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,b.jsx)(je,{titleId:`settings-sync-title`,title:s,scope:`project-local`,level:`block`,children:(0,b.jsx)(r,{id:`AiNMQ7`})}),t[23]=c):c=t[23];let l;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,b.jsx)(`div`,{className:`text-sm font-medium`,children:(0,b.jsx)(r,{id:`3_6U6f`})}),t[24]=l):l=t[24];let u;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,b.jsxs)(`div`,{className:`space-y-0.5`,children:[l,(0,b.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,b.jsx)(r,{id:`i92eAT`})})]}),t[25]=u):u=t[25];let d;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,b.jsx)(r,{id:`zkz0Fg`}),t[26]=d):d=t[26];let f;t[27]!==n||t[28]!==a?(f=(0,b.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-md border p-3`,children:[u,(0,b.jsx)(g,{ref:a,onClick:n,"data-testid":`settings-sync-setup`,children:d})]}),t[27]=n,t[28]=a,t[29]=f):f=t[29];let p;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,b.jsx)(te,{asChild:!0,children:(0,b.jsxs)(g,{variant:`ghost`,size:`sm`,className:`group gap-1 px-1.5 text-muted-foreground`,children:[(0,b.jsx)(Te,{className:`size-3.5 transition-transform group-data-[state=open]:rotate-90`,"aria-hidden":!0}),(0,b.jsx)(r,{id:`6caB2T`})]})}),t[30]=p):p=t[30];let m;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,b.jsxs)(ne,{children:[p,(0,b.jsx)(ee,{className:`px-1.5 pt-2 text-sm text-muted-foreground`,children:(0,b.jsx)(r,{id:`44DSl0`,components:{0:(0,b.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})})]}),t[31]=m):m=t[31];let h;t[32]!==e||t[33]!==k||t[34]!==o?(h=e?(0,b.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border p-3`,"data-testid":`settings-sync-no-remote-auto-on`,children:[(0,b.jsx)(`p`,{className:`text-1sm text-muted-foreground flex-1 min-w-0`,children:(0,b.jsx)(r,{id:`9U-7Xv`})}),(0,b.jsx)(g,{variant:`outline`,size:`xs`,className:`self-start`,onClick:o,disabled:k,"data-testid":`settings-sync-no-remote-turn-off`,children:(0,b.jsx)(r,{id:`v6Glry`})})]}):null,t[32]=e,t[33]=k,t[34]=o,t[35]=h):h=t[35];let _;return t[36]!==f||t[37]!==h?(_=(0,b.jsxs)(`div`,{className:`space-y-4`,"data-testid":`settings-sync-empty`,children:[c,f,m,h]}),t[36]=f,t[37]=h,t[38]=_):_=t[38],_}let st=S.pushPermission?.checkStatus===`denied`||S.pausedReason===`no-push-permission`,ct;t[39]===S.pushPermission?ct=t[40]:(ct=ve(S.pushPermission),t[39]=S.pushPermission,t[40]=ct);let lt=ct,ut;t[41]===S?ut=t[42]:(ut=fe(S),t[41]=S,t[42]=ut);let dt=ut,ft=T===`full`&&st&&lt,A=T===`full`&&st&&!lt&&!dt,j=!A&&!ft&&st&&!dt,pt=S.pushPermission?.checkStatus===`denied`&&S.pushPermission.deniedReason!==`not-authenticated`&&!dt,mt;t[43]===S?mt=t[44]:(mt=be(S),t[43]=S,t[44]=mt);let M=mt,ht=st&&S.pausedReason!==`unsafe-incoming-symlinks`,gt;t[45]!==M||t[46]!==ht||t[47]!==S.pausedReason||t[48]!==S.remote?(gt=S.pausedReason?M?_e(`auth-not-found-as-identity`,me(S.remote)):ht?null:(0,b.jsx)(ye,{reason:S.pausedReason}):null,t[45]=M,t[46]=ht,t[47]=S.pausedReason,t[48]=S.remote,t[49]=gt):gt=t[49];let N=gt,_t;t[50]!==E||t[51]!==T||t[52]!==it||t[53]!==D?(_t=function(e){let t=e===``?T:e;if(ie(t)){if(t===T){E&&it();return}D(t)}},t[50]=E,t[51]=T,t[52]=it,t[53]=D,t[54]=_t):_t=t[54];let vt=_t,yt=Qe??`ask`,bt;t[55]!==v||t[56]!==Be?(bt=function(e){if(e!==`ask`&&!ie(e))return;if(Be===null){_.error(v({id:`fiMNLl`}));return}let t;bb163:switch(e){case`ask`:t=null;break bb163;case`off`:t=!1;break bb163;case`full`:t=!0;break bb163;case`follow`:t=`follow`;break bb163;default:throw Error(`unhandled committed default: ${String(e)}`)}let n=Be(t);if(!n.ok){let e=n.error;_.error(v({id:`oAFVKX`,values:{detail:e}}))}},t[55]=v,t[56]=Be,t[57]=bt):bt=t[57];let xt=bt,St;t[58]===v?St=t[59]:(St=function(e){switch(e){case 30:return v({id:`OqqecQ`});case 60:return v({id:`4mbrAq`});case 300:return v({id:`PEGxvo`});case 900:return v({id:`Cz-K13`});case 3600:return v({id:`vp5vfW`});default:return v({id:`U7Iesw`,values:{seconds:e}})}},t[58]=v,t[59]=St);let Ct=St,wt;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(wt=function(e){return re.includes(e)?[...re]:[...re,e].sort(Pe)},t[60]=wt):wt=t[60];let Tt=wt,Et=function(e,t){let n=Number(t);if(!Number.isFinite(n)||Ve===null)return;let r=Ve({pullIntervalSeconds:e===`pull`?n:w.pullIntervalSeconds,pushIntervalSeconds:e===`push`?n:w.pushIntervalSeconds});if(!r.ok){let e=r.error;_.error(v({id:`WOfp4H`,values:{detail:e}}))}},Dt;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(Dt=(0,b.jsx)(r,{id:`Nu4DdT`}),t[61]=Dt):Dt=t[61];let P;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,b.jsx)(je,{titleId:`settings-sync-title`,title:Dt,scope:`project-local`,level:`block`,children:(0,b.jsx)(r,{id:`qLXJTB`})}),t[62]=P):P=t[62];let Ot;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(Ot=(0,b.jsx)(`div`,{id:`settings-sync-mode-label`,className:`text-sm font-medium`,children:(0,b.jsx)(r,{id:`yZepkk`})}),t[63]=Ot):Ot=t[63];let F;t[64]===T?F=t[65]:(F=(0,b.jsx)(`p`,{className:`text-muted-foreground text-1sm`,"data-testid":`settings-sync-body`,children:T===`full`?(0,b.jsx)(r,{id:`zBiFZh`}):T===`follow`?(0,b.jsx)(r,{id:`PGRnbw`}):(0,b.jsx)(r,{id:`t5I7P_`})}),t[64]=T,t[65]=F);let I;t[66]===E?I=t[67]:(I=E?(0,b.jsx)(`p`,{id:`settings-sync-mode-default-note`,className:`text-muted-foreground text-1sm`,"data-testid":`settings-sync-mode-from-default`,children:(0,b.jsx)(r,{id:`uNkJ8H`})}):null,t[66]=E,t[67]=I);let L;t[68]!==v||t[69]!==S.remote?(L=S.remote?(0,b.jsxs)(`p`,{className:`text-muted-foreground text-1sm truncate`,"data-testid":`settings-sync-remote`,children:[(0,b.jsx)(r,{id:`Q8A-U_`}),` `,S.remote.webUrl?(0,b.jsxs)(`a`,{href:S.remote.webUrl,target:`_blank`,rel:`noopener noreferrer`,className:`text-foreground hover:text-primary hover:underline inline-flex items-center gap-0.5`,"aria-label":v({id:`1nke1r`,values:{0:S.remote.label}}),"data-testid":`settings-sync-remote-link`,children:[(0,b.jsx)(`span`,{children:S.remote.label}),(0,b.jsx)(we,{className:`inline size-3.5`,"aria-hidden":!0})]}):(0,b.jsx)(`span`,{className:`font-medium text-foreground`,"data-testid":`settings-sync-remote-label`,children:S.remote.label})]}):null,t[68]=v,t[69]=S.remote,t[70]=L):L=t[70];let R;t[71]!==F||t[72]!==I||t[73]!==L?(R=(0,b.jsxs)(`div`,{className:`min-w-0`,children:[Ot,F,I,L]}),t[71]=F,t[72]=I,t[73]=L,t[74]=R):R=t[74];let kt=E?`settings-sync-mode-default-note`:void 0,At;t[75]===Symbol.for(`react.memo_cache_sentinel`)?(At=(0,b.jsx)(m,{value:`off`,className:x,"data-testid":`settings-sync-mode-off`,children:(0,b.jsx)(r,{id:`BWTzAb`})}),t[75]=At):At=t[75];let jt;t[76]===Symbol.for(`react.memo_cache_sentinel`)?(jt=(0,b.jsx)(m,{value:`follow`,className:x,"data-testid":`settings-sync-mode-follow`,children:(0,b.jsx)(r,{id:`tlGXxX`})}),t[76]=jt):jt=t[76];let z;t[77]!==pt||t[78]!==j?(z=pt?(0,b.jsxs)(c,{children:[(0,b.jsx)(o,{asChild:!0,children:(0,b.jsx)(`span`,{className:`inline-flex`,children:(0,b.jsx)(m,{value:`full`,className:x,disabled:!0,"aria-describedby":j?`settings-sync-denied-hint-text`:void 0,"data-testid":`settings-sync-mode-full`,children:(0,b.jsx)(r,{id:`IXiG0B`})})})}),(0,b.jsx)(s,{"data-testid":`settings-sync-mode-full-tip`,children:(0,b.jsx)(r,{id:`EiVgl5`})})]}):(0,b.jsx)(m,{value:`full`,className:x,"data-testid":`settings-sync-mode-full`,children:(0,b.jsx)(r,{id:`IXiG0B`})}),t[77]=pt,t[78]=j,t[79]=z):z=t[79];let B;t[80]!==T||t[81]!==k||t[82]!==vt||t[83]!==kt||t[84]!==z?(B=(0,b.jsxs)(h,{type:`single`,variant:`outline`,spacing:2,value:T,onValueChange:vt,disabled:k,"aria-labelledby":`settings-sync-mode-label`,"aria-describedby":kt,"data-testid":`settings-sync-mode-toggle`,children:[At,jt,z]}),t[80]=T,t[81]=k,t[82]=vt,t[83]=kt,t[84]=z,t[85]=B):B=t[85];let V;t[86]!==R||t[87]!==B?(V=(0,b.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[R,B]}),t[86]=R,t[87]=B,t[88]=V):V=t[88];let H;t[89]!==O||t[90]!==ft?(H=ft&&(0,b.jsxs)(`div`,{className:`mt-2 flex items-start gap-2`,"data-testid":`settings-sync-reconnect`,children:[(0,b.jsx)(`p`,{className:`text-1sm text-muted-foreground flex-1 min-w-0`,children:(0,b.jsx)(r,{id:`tnG-m6`})}),(0,b.jsx)(g,{variant:`outline`,size:`xs`,className:`self-start`,onClick:()=>O(!0),children:(0,b.jsx)(r,{id:`5lWFkC`})})]}),t[89]=O,t[90]=ft,t[91]=H):H=t[91];let U;t[92]!==D||t[93]!==A?(U=A&&(0,b.jsxs)(`div`,{className:`mt-2 flex items-start gap-2`,"data-testid":`settings-sync-switch-follow`,children:[(0,b.jsx)(`p`,{className:`text-1sm text-muted-foreground flex-1 min-w-0`,children:(0,b.jsx)(r,{id:`srdlOs`})}),(0,b.jsx)(g,{variant:`outline`,size:`xs`,className:`self-start`,onClick:()=>D(`follow`),"data-testid":`settings-sync-switch-follow-action`,children:(0,b.jsx)(r,{id:`v16Pzh`})})]}),t[92]=D,t[93]=A,t[94]=U):U=t[94];let W;t[95]!==T||t[96]!==j?(W=j&&(0,b.jsx)(`p`,{id:`settings-sync-denied-hint-text`,className:`text-1sm text-muted-foreground mt-2`,"data-testid":`settings-sync-denied-hint`,children:T===`follow`?(0,b.jsx)(r,{id:`EiVgl5`}):(0,b.jsx)(r,{id:`eNOyTV`})}),t[95]=T,t[96]=j,t[97]=W):W=t[97];let G;t[98]===N?G=t[99]:(G=N!==null&&(0,b.jsx)(`p`,{className:`text-1sm text-muted-foreground mt-2`,"data-testid":`settings-sync-reason`,children:N}),t[98]=N,t[99]=G);let K;t[100]!==N||t[101]!==S.refusedSymlinkPaths?(K=N!==null&&(S.refusedSymlinkPaths?.length??0)>0&&(0,b.jsx)(`div`,{className:`mt-2`,children:(0,b.jsx)(ge,{paths:S.refusedSymlinkPaths})}),t[100]=N,t[101]=S.refusedSymlinkPaths,t[102]=K):K=t[102];let q;t[103]!==M||t[104]!==j||t[105]!==A||t[106]!==S.pushPermission?(q=S.pushPermission?.checkStatus===`denied`&&(M||A||j)?(0,b.jsx)(`div`,{className:`mt-2 space-y-1`,"data-testid":`settings-sync-identity`,children:de(S.pushPermission).map(Ne)}):null,t[103]=M,t[104]=j,t[105]=A,t[106]=S.pushPermission,t[107]=q):q=t[107];let J;t[108]!==O||t[109]!==S.pushPermission?(J=he(S.pushPermission)&&(0,b.jsxs)(`div`,{className:`mt-2 flex items-start gap-2`,"data-testid":`settings-sync-signin-again`,children:[(0,b.jsx)(`p`,{className:`text-1sm text-muted-foreground flex-1 min-w-0`,children:(0,b.jsx)(r,{id:`C_cPoW`})}),(0,b.jsx)(g,{variant:`outline`,size:`xs`,className:`self-start`,onClick:()=>O(!0),children:(0,b.jsx)(r,{id:`5lWFkC`})})]}),t[108]=O,t[109]=S.pushPermission,t[110]=J):J=t[110];let Y;t[111]!==V||t[112]!==H||t[113]!==U||t[114]!==W||t[115]!==G||t[116]!==K||t[117]!==q||t[118]!==J?(Y=(0,b.jsxs)(`div`,{className:`rounded-md border p-3`,children:[V,H,U,W,G,K,q,J]}),t[111]=V,t[112]=H,t[113]=U,t[114]=W,t[115]=G,t[116]=K,t[117]=q,t[118]=J,t[119]=Y):Y=t[119];let Mt=T!==`off`&&(0,b.jsxs)(ne,{open:He,onOpenChange:Ue,children:[(0,b.jsx)(te,{asChild:!0,children:(0,b.jsxs)(g,{variant:`ghost`,size:`sm`,className:`group gap-1 px-1.5 text-muted-foreground`,"data-testid":`settings-sync-advanced-trigger`,children:[(0,b.jsx)(Te,{className:`size-3.5 transition-transform group-data-[state=open]:rotate-90`,"aria-hidden":!0}),(0,b.jsx)(r,{id:`sxkWRg`})]})}),(0,b.jsx)(ee,{className:`pt-2`,children:(0,b.jsxs)(`div`,{className:`rounded-md border p-3 space-y-3`,"data-testid":`settings-sync-intervals`,children:[(0,b.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,b.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,b.jsx)(`div`,{id:`settings-sync-pull-interval-label`,className:`text-sm font-medium`,children:(0,b.jsx)(r,{id:`Xs1kjx`})}),(0,b.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,b.jsx)(r,{id:`T1fMJ6`})})]}),(0,b.jsxs)(p,{value:String(w.pullIntervalSeconds),onValueChange:e=>Et(`pull`,e),disabled:!Le,children:[(0,b.jsx)(d,{size:`sm`,className:`w-40 shrink-0`,"aria-labelledby":`settings-sync-pull-interval-label`,"data-testid":`settings-sync-pull-interval`,children:(0,b.jsx)(f,{})}),(0,b.jsx)(u,{children:Tt(w.pullIntervalSeconds).map(e=>(0,b.jsx)(l,{value:String(e),children:Ct(e)},e))})]})]}),T===`full`&&(0,b.jsxs)(`div`,{className:`flex items-start justify-between gap-4 border-t pt-3`,children:[(0,b.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,b.jsx)(`div`,{id:`settings-sync-push-interval-label`,className:`text-sm font-medium`,children:(0,b.jsx)(r,{id:`gyYvCN`})}),(0,b.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,b.jsx)(r,{id:`czQDKY`})})]}),(0,b.jsxs)(p,{value:String(w.pushIntervalSeconds),onValueChange:e=>Et(`push`,e),disabled:!Le,children:[(0,b.jsx)(d,{size:`sm`,className:`w-40 shrink-0`,"aria-labelledby":`settings-sync-push-interval-label`,"data-testid":`settings-sync-push-interval`,children:(0,b.jsx)(f,{})}),(0,b.jsx)(u,{children:Tt(w.pushIntervalSeconds).map(e=>(0,b.jsx)(l,{value:String(e),children:Ct(e)},e))})]})]}),T===`full`&&Ke&&(0,b.jsx)(`p`,{className:`text-1sm text-muted-foreground`,"data-testid":`settings-sync-push-outpaces-pull-hint`,children:(0,b.jsx)(r,{id:`x-E_vF`})})]})})]}),Nt;t[120]===Symbol.for(`react.memo_cache_sentinel`)?(Nt=(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsx)(`div`,{id:`settings-sync-default-label`,className:`text-sm font-medium`,children:(0,b.jsx)(r,{id:`j_Z6g7`})}),(0,b.jsx)(Ae,{scope:`project`})]}),t[120]=Nt):Nt=t[120];let Pt;t[121]===Symbol.for(`react.memo_cache_sentinel`)?(Pt=(0,b.jsxs)(`div`,{className:`space-y-0.5`,children:[Nt,(0,b.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,b.jsx)(r,{id:`Zysl7r`})})]}),t[121]=Pt):Pt=t[121];let Ft=!Re,It;t[122]===Symbol.for(`react.memo_cache_sentinel`)?(It=(0,b.jsx)(m,{value:`ask`,className:x,"data-testid":`settings-sync-default-ask`,children:(0,b.jsx)(r,{id:`EdQY6l`})}),t[122]=It):It=t[122];let Lt;t[123]===Symbol.for(`react.memo_cache_sentinel`)?(Lt=(0,b.jsx)(m,{value:`off`,className:x,"data-testid":`settings-sync-default-off`,children:(0,b.jsx)(r,{id:`BWTzAb`})}),t[123]=Lt):Lt=t[123];let Rt;t[124]===Symbol.for(`react.memo_cache_sentinel`)?(Rt=(0,b.jsx)(m,{value:`follow`,className:x,"data-testid":`settings-sync-default-follow`,children:(0,b.jsx)(r,{id:`tlGXxX`})}),t[124]=Rt):Rt=t[124];let zt;t[125]===Symbol.for(`react.memo_cache_sentinel`)?(zt=(0,b.jsx)(m,{value:`full`,className:x,"data-testid":`settings-sync-default-full`,children:(0,b.jsx)(r,{id:`IXiG0B`})}),t[125]=zt):zt=t[125];let X;t[126]!==yt||t[127]!==xt||t[128]!==Ft?(X=(0,b.jsxs)(`div`,{className:`rounded-md border p-3 space-y-2`,"data-testid":`settings-sync-default`,children:[Pt,(0,b.jsxs)(h,{type:`single`,variant:`outline`,spacing:2,value:yt,onValueChange:xt,disabled:Ft,"aria-labelledby":`settings-sync-default-label`,"data-testid":`settings-sync-default-toggle`,children:[It,Lt,Rt,zt]})]}),t[126]=yt,t[127]=xt,t[128]=Ft,t[129]=X):X=t[129];let Bt=nt??`full`,Vt=nt===`follow`?S.ahead??0:0,Z;t[130]!==et||t[131]!==at||t[132]!==tt||t[133]!==Bt||t[134]!==Vt?(Z=(0,b.jsx)(pe,{open:et,onOpenChange:tt,onConfirm:at,variant:Bt,strandedCommitCount:Vt}),t[130]=et,t[131]=at,t[132]=tt,t[133]=Bt,t[134]=Vt,t[135]=Z):Z=t[135];let Q;t[136]===O?Q=t[137]:(Q=()=>O(!1),t[136]=O,t[137]=Q);let $;t[138]!==ot||t[139]!==O||t[140]!==Q?($=(0,b.jsx)(Oe,{open:ot,onOpenChange:O,onSuccess:Q,reauth:!0}),t[138]=ot,t[139]=O,t[140]=Q,t[141]=$):$=t[141];let Ht;return t[142]!==P||t[143]!==Y||t[144]!==Mt||t[145]!==X||t[146]!==Z||t[147]!==$?(Ht=(0,b.jsxs)(`div`,{className:`space-y-3`,children:[P,Y,Mt,X,Z,$]}),t[142]=P,t[143]=Y,t[144]=Mt,t[145]=X,t[146]=Z,t[147]=$,t[148]=Ht):Ht=t[148],Ht}function Ne(e){return(0,b.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:e},e)}function Pe(e,t){return e-t}export{S as SyncSection};
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{i as o,n as s,t as c}from"./tooltip-Bz6z4_se.js";import{n as ee,r as te,t as ne}from"./collapsible-BKbszYZV.js";import{i as l,n as u,o as d,s as f,t as p}from"./select-pACXgFe2.js";import{n as m,t as h}from"./toggle-group-B7p69Qfd.js";import{t as g}from"./button-DzgjsZzC.js";import{n as _}from"./dist-BGzUo_18.js";import{d as re,f as ie,h as ae,m as oe,p as se}from"./share-D-LUU2aX-B7Yg0G_m.js";import{i as ce}from"./use-apply-config-theme-CYFG76sS.js";import{C as le,T as ue,a as de,c as fe,h as pe,l as me,m as he,n as ge,o as _e,p as ve,t as ye,u as be,v as xe,w as Se,x as Ce}from"./SyncStatusBadge-DCFtOS5t.js";import{t as we}from"./arrow-up-right-nJaICi16.js";import{t as Te}from"./chevron-right-Bofu4lib.js";import{t as Ee}from"./use-settings-route-Bj-m9X61.js";import"./config-provider-BO6LFV98.js";import{n as De}from"./use-git-sync-status-PkMYmN4D.js";import{t as Oe}from"./AuthModal-DT32BOAJ.js";import{t as v}from"./PublishToGitHubDialog-Bepd054x.js";import{t as ke}from"./skeleton-CrbF9ppq.js";import{n as Ae,t as je}from"./SettingsSectionHeader-DDNA1hrR.js";var Me=a(),y=e(n(),1),b=t(),x=`data-[state=on]:border-primary data-[state=on]:bg-primary data-[state=on]:text-primary-foreground data-[state=on]:hover:bg-primary/90`;function S(){let e=(0,Me.c)(4),[t,n]=(0,y.useState)(!1),r=(0,y.useRef)(null),i=(0,y.useRef)(null),a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,b.jsx)(C,{onPublish:()=>n(!0),setUpSyncingRef:r}),e[0]=a):a=e[0];let o;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>(r.current??i.current)?.focus(),e[1]=o):o=e[1];let s;return e[2]===t?s=e[3]:(s=(0,b.jsxs)(`section`,{ref:i,"aria-labelledby":`settings-sync-title`,tabIndex:-1,"data-testid":`settings-sync-section`,children:[a,(0,b.jsx)(v,{open:t,onOpenChange:n,returnFocus:o})]}),e[2]=t,e[3]=s),s}function C(e){let t=(0,Me.c)(149),{onPublish:n,setUpSyncingRef:a}=e,{_:v}=i(),{status:S,fetchError:C}=De(),{projectConfig:Fe,projectLocalConfig:Ie,projectLocalSynced:Le,projectSynced:Re}=ce(),ze=ue(),Be=Ce(),Ve=le(),[He,Ue]=(0,y.useState)(!1),We,Ge;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(We=()=>{Ee()&&Ue(!0)},Ge=[],t[0]=We,t[1]=Ge):(We=t[0],Ge=t[1]),(0,y.useEffect)(We,Ge);let w=oe(Ie?.autoSync),Ke=w.pushIntervalSeconds<w.pullIntervalSeconds,qe=Ie?.autoSync,Je;t[2]===qe?Je=t[3]:(Je=ae(qe),t[2]=qe,t[3]=Je);let Ye=Je,Xe=Fe?.autoSync?.default,Ze;t[4]===Xe?Ze=t[5]:(Ze=se(Xe),t[4]=Xe,t[5]=Ze);let Qe=Ze,$e;t[6]!==Ye||t[7]!==S?($e=Ye??(S===null?`off`:xe(S)),t[6]=Ye,t[7]=S,t[8]=$e):$e=t[8];let T=$e,E=Le&&Ye===null&&Qe!==null,{confirmOpen:et,setConfirmOpen:tt,pendingMode:nt,onModeSelect:D,onTurnOff:rt,onKeepCurrent:it,onConfirm:at}=Se(ze,T),[ot,O]=(0,y.useState)(!1),k=!Le;if(S===null){let e=C!==null,n=e?`settings-sync-unavailable`:`settings-sync-loading`,i;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,b.jsx)(je,{titleId:`settings-sync-title`,title:(0,b.jsx)(r,{id:`Nu4DdT`}),scope:`project-local`,level:`block`}),t[9]=i):i=t[9];let a=!e,o;t[10]!==C||t[11]!==e?(o=e?(0,b.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:C===`network`?(0,b.jsx)(r,{id:`epGMvx`}):(0,b.jsx)(r,{id:`wLRCZ8`})}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`span`,{className:`sr-only`,children:(0,b.jsx)(r,{id:`OgvwrM`})}),(0,b.jsx)(ke,{className:`h-24`})]}),t[10]=C,t[11]=e,t[12]=o):o=t[12];let s;t[13]!==a||t[14]!==o?(s=(0,b.jsx)(`div`,{role:`status`,"aria-live":`polite`,"aria-busy":a,children:o}),t[13]=a,t[14]=o,t[15]=s):s=t[15];let c;return t[16]!==s||t[17]!==n?(c=(0,b.jsxs)(`div`,{className:`space-y-3`,"data-testid":n,children:[i,s]}),t[16]=s,t[17]=n,t[18]=c):c=t[18],c}if(!S.hasRemote){let e=T!==`off`,i;t[19]!==rt||t[20]!==a?(i=()=>{rt()&&a.current?.focus()},t[19]=rt,t[20]=a,t[21]=i):i=t[21];let o=i,s;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,b.jsx)(r,{id:`Nu4DdT`}),t[22]=s):s=t[22];let c;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,b.jsx)(je,{titleId:`settings-sync-title`,title:s,scope:`project-local`,level:`block`,children:(0,b.jsx)(r,{id:`AiNMQ7`})}),t[23]=c):c=t[23];let l;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,b.jsx)(`div`,{className:`text-sm font-medium`,children:(0,b.jsx)(r,{id:`3_6U6f`})}),t[24]=l):l=t[24];let u;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,b.jsxs)(`div`,{className:`space-y-0.5`,children:[l,(0,b.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,b.jsx)(r,{id:`i92eAT`})})]}),t[25]=u):u=t[25];let d;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,b.jsx)(r,{id:`zkz0Fg`}),t[26]=d):d=t[26];let f;t[27]!==n||t[28]!==a?(f=(0,b.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-md border p-3`,children:[u,(0,b.jsx)(g,{ref:a,onClick:n,"data-testid":`settings-sync-setup`,children:d})]}),t[27]=n,t[28]=a,t[29]=f):f=t[29];let p;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,b.jsx)(te,{asChild:!0,children:(0,b.jsxs)(g,{variant:`ghost`,size:`sm`,className:`group gap-1 px-1.5 text-muted-foreground`,children:[(0,b.jsx)(Te,{className:`size-3.5 transition-transform group-data-[state=open]:rotate-90`,"aria-hidden":!0}),(0,b.jsx)(r,{id:`6caB2T`})]})}),t[30]=p):p=t[30];let m;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,b.jsxs)(ne,{children:[p,(0,b.jsx)(ee,{className:`px-1.5 pt-2 text-sm text-muted-foreground`,children:(0,b.jsx)(r,{id:`44DSl0`,components:{0:(0,b.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})})]}),t[31]=m):m=t[31];let h;t[32]!==e||t[33]!==k||t[34]!==o?(h=e?(0,b.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border p-3`,"data-testid":`settings-sync-no-remote-auto-on`,children:[(0,b.jsx)(`p`,{className:`text-1sm text-muted-foreground flex-1 min-w-0`,children:(0,b.jsx)(r,{id:`9U-7Xv`})}),(0,b.jsx)(g,{variant:`outline`,size:`xs`,className:`self-start`,onClick:o,disabled:k,"data-testid":`settings-sync-no-remote-turn-off`,children:(0,b.jsx)(r,{id:`v6Glry`})})]}):null,t[32]=e,t[33]=k,t[34]=o,t[35]=h):h=t[35];let _;return t[36]!==f||t[37]!==h?(_=(0,b.jsxs)(`div`,{className:`space-y-4`,"data-testid":`settings-sync-empty`,children:[c,f,m,h]}),t[36]=f,t[37]=h,t[38]=_):_=t[38],_}let st=S.pushPermission?.checkStatus===`denied`||S.pausedReason===`no-push-permission`,ct;t[39]===S.pushPermission?ct=t[40]:(ct=ve(S.pushPermission),t[39]=S.pushPermission,t[40]=ct);let lt=ct,ut;t[41]===S?ut=t[42]:(ut=fe(S),t[41]=S,t[42]=ut);let dt=ut,ft=T===`full`&&st&&lt,A=T===`full`&&st&&!lt&&!dt,j=!A&&!ft&&st&&!dt,pt=S.pushPermission?.checkStatus===`denied`&&S.pushPermission.deniedReason!==`not-authenticated`&&!dt,mt;t[43]===S?mt=t[44]:(mt=be(S),t[43]=S,t[44]=mt);let M=mt,ht=st&&S.pausedReason!==`unsafe-incoming-symlinks`,gt;t[45]!==M||t[46]!==ht||t[47]!==S.pausedReason||t[48]!==S.remote?(gt=S.pausedReason?M?_e(`auth-not-found-as-identity`,me(S.remote)):ht?null:(0,b.jsx)(ye,{reason:S.pausedReason}):null,t[45]=M,t[46]=ht,t[47]=S.pausedReason,t[48]=S.remote,t[49]=gt):gt=t[49];let N=gt,_t;t[50]!==E||t[51]!==T||t[52]!==it||t[53]!==D?(_t=function(e){let t=e===``?T:e;if(ie(t)){if(t===T){E&&it();return}D(t)}},t[50]=E,t[51]=T,t[52]=it,t[53]=D,t[54]=_t):_t=t[54];let vt=_t,yt=Qe??`ask`,bt;t[55]!==v||t[56]!==Be?(bt=function(e){if(e!==`ask`&&!ie(e))return;if(Be===null){_.error(v({id:`fiMNLl`}));return}let t;bb163:switch(e){case`ask`:t=null;break bb163;case`off`:t=!1;break bb163;case`full`:t=!0;break bb163;case`follow`:t=`follow`;break bb163;default:throw Error(`unhandled committed default: ${String(e)}`)}let n=Be(t);if(!n.ok){let e=n.error;_.error(v({id:`oAFVKX`,values:{detail:e}}))}},t[55]=v,t[56]=Be,t[57]=bt):bt=t[57];let xt=bt,St;t[58]===v?St=t[59]:(St=function(e){switch(e){case 30:return v({id:`OqqecQ`});case 60:return v({id:`4mbrAq`});case 300:return v({id:`PEGxvo`});case 900:return v({id:`Cz-K13`});case 3600:return v({id:`vp5vfW`});default:return v({id:`U7Iesw`,values:{seconds:e}})}},t[58]=v,t[59]=St);let Ct=St,wt;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(wt=function(e){return re.includes(e)?[...re]:[...re,e].sort(Pe)},t[60]=wt):wt=t[60];let Tt=wt,Et=function(e,t){let n=Number(t);if(!Number.isFinite(n)||Ve===null)return;let r=Ve({pullIntervalSeconds:e===`pull`?n:w.pullIntervalSeconds,pushIntervalSeconds:e===`push`?n:w.pushIntervalSeconds});if(!r.ok){let e=r.error;_.error(v({id:`WOfp4H`,values:{detail:e}}))}},Dt;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(Dt=(0,b.jsx)(r,{id:`Nu4DdT`}),t[61]=Dt):Dt=t[61];let P;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,b.jsx)(je,{titleId:`settings-sync-title`,title:Dt,scope:`project-local`,level:`block`,children:(0,b.jsx)(r,{id:`qLXJTB`})}),t[62]=P):P=t[62];let Ot;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(Ot=(0,b.jsx)(`div`,{id:`settings-sync-mode-label`,className:`text-sm font-medium`,children:(0,b.jsx)(r,{id:`yZepkk`})}),t[63]=Ot):Ot=t[63];let F;t[64]===T?F=t[65]:(F=(0,b.jsx)(`p`,{className:`text-muted-foreground text-1sm`,"data-testid":`settings-sync-body`,children:T===`full`?(0,b.jsx)(r,{id:`zBiFZh`}):T===`follow`?(0,b.jsx)(r,{id:`PGRnbw`}):(0,b.jsx)(r,{id:`t5I7P_`})}),t[64]=T,t[65]=F);let I;t[66]===E?I=t[67]:(I=E?(0,b.jsx)(`p`,{id:`settings-sync-mode-default-note`,className:`text-muted-foreground text-1sm`,"data-testid":`settings-sync-mode-from-default`,children:(0,b.jsx)(r,{id:`uNkJ8H`})}):null,t[66]=E,t[67]=I);let L;t[68]!==v||t[69]!==S.remote?(L=S.remote?(0,b.jsxs)(`p`,{className:`text-muted-foreground text-1sm truncate`,"data-testid":`settings-sync-remote`,children:[(0,b.jsx)(r,{id:`Q8A-U_`}),` `,S.remote.webUrl?(0,b.jsxs)(`a`,{href:S.remote.webUrl,target:`_blank`,rel:`noopener noreferrer`,className:`text-foreground hover:text-primary hover:underline inline-flex items-center gap-0.5`,"aria-label":v({id:`1nke1r`,values:{0:S.remote.label}}),"data-testid":`settings-sync-remote-link`,children:[(0,b.jsx)(`span`,{children:S.remote.label}),(0,b.jsx)(we,{className:`inline size-3.5`,"aria-hidden":!0})]}):(0,b.jsx)(`span`,{className:`font-medium text-foreground`,"data-testid":`settings-sync-remote-label`,children:S.remote.label})]}):null,t[68]=v,t[69]=S.remote,t[70]=L):L=t[70];let R;t[71]!==F||t[72]!==I||t[73]!==L?(R=(0,b.jsxs)(`div`,{className:`min-w-0`,children:[Ot,F,I,L]}),t[71]=F,t[72]=I,t[73]=L,t[74]=R):R=t[74];let kt=E?`settings-sync-mode-default-note`:void 0,At;t[75]===Symbol.for(`react.memo_cache_sentinel`)?(At=(0,b.jsx)(m,{value:`off`,className:x,"data-testid":`settings-sync-mode-off`,children:(0,b.jsx)(r,{id:`BWTzAb`})}),t[75]=At):At=t[75];let jt;t[76]===Symbol.for(`react.memo_cache_sentinel`)?(jt=(0,b.jsx)(m,{value:`follow`,className:x,"data-testid":`settings-sync-mode-follow`,children:(0,b.jsx)(r,{id:`tlGXxX`})}),t[76]=jt):jt=t[76];let z;t[77]!==pt||t[78]!==j?(z=pt?(0,b.jsxs)(c,{children:[(0,b.jsx)(o,{asChild:!0,children:(0,b.jsx)(`span`,{className:`inline-flex`,children:(0,b.jsx)(m,{value:`full`,className:x,disabled:!0,"aria-describedby":j?`settings-sync-denied-hint-text`:void 0,"data-testid":`settings-sync-mode-full`,children:(0,b.jsx)(r,{id:`IXiG0B`})})})}),(0,b.jsx)(s,{"data-testid":`settings-sync-mode-full-tip`,children:(0,b.jsx)(r,{id:`EiVgl5`})})]}):(0,b.jsx)(m,{value:`full`,className:x,"data-testid":`settings-sync-mode-full`,children:(0,b.jsx)(r,{id:`IXiG0B`})}),t[77]=pt,t[78]=j,t[79]=z):z=t[79];let B;t[80]!==T||t[81]!==k||t[82]!==vt||t[83]!==kt||t[84]!==z?(B=(0,b.jsxs)(h,{type:`single`,variant:`outline`,spacing:2,value:T,onValueChange:vt,disabled:k,"aria-labelledby":`settings-sync-mode-label`,"aria-describedby":kt,"data-testid":`settings-sync-mode-toggle`,children:[At,jt,z]}),t[80]=T,t[81]=k,t[82]=vt,t[83]=kt,t[84]=z,t[85]=B):B=t[85];let V;t[86]!==R||t[87]!==B?(V=(0,b.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[R,B]}),t[86]=R,t[87]=B,t[88]=V):V=t[88];let H;t[89]!==O||t[90]!==ft?(H=ft&&(0,b.jsxs)(`div`,{className:`mt-2 flex items-start gap-2`,"data-testid":`settings-sync-reconnect`,children:[(0,b.jsx)(`p`,{className:`text-1sm text-muted-foreground flex-1 min-w-0`,children:(0,b.jsx)(r,{id:`tnG-m6`})}),(0,b.jsx)(g,{variant:`outline`,size:`xs`,className:`self-start`,onClick:()=>O(!0),children:(0,b.jsx)(r,{id:`5lWFkC`})})]}),t[89]=O,t[90]=ft,t[91]=H):H=t[91];let U;t[92]!==D||t[93]!==A?(U=A&&(0,b.jsxs)(`div`,{className:`mt-2 flex items-start gap-2`,"data-testid":`settings-sync-switch-follow`,children:[(0,b.jsx)(`p`,{className:`text-1sm text-muted-foreground flex-1 min-w-0`,children:(0,b.jsx)(r,{id:`srdlOs`})}),(0,b.jsx)(g,{variant:`outline`,size:`xs`,className:`self-start`,onClick:()=>D(`follow`),"data-testid":`settings-sync-switch-follow-action`,children:(0,b.jsx)(r,{id:`v16Pzh`})})]}),t[92]=D,t[93]=A,t[94]=U):U=t[94];let W;t[95]!==T||t[96]!==j?(W=j&&(0,b.jsx)(`p`,{id:`settings-sync-denied-hint-text`,className:`text-1sm text-muted-foreground mt-2`,"data-testid":`settings-sync-denied-hint`,children:T===`follow`?(0,b.jsx)(r,{id:`EiVgl5`}):(0,b.jsx)(r,{id:`eNOyTV`})}),t[95]=T,t[96]=j,t[97]=W):W=t[97];let G;t[98]===N?G=t[99]:(G=N!==null&&(0,b.jsx)(`p`,{className:`text-1sm text-muted-foreground mt-2`,"data-testid":`settings-sync-reason`,children:N}),t[98]=N,t[99]=G);let K;t[100]!==N||t[101]!==S.refusedSymlinkPaths?(K=N!==null&&(S.refusedSymlinkPaths?.length??0)>0&&(0,b.jsx)(`div`,{className:`mt-2`,children:(0,b.jsx)(ge,{paths:S.refusedSymlinkPaths})}),t[100]=N,t[101]=S.refusedSymlinkPaths,t[102]=K):K=t[102];let q;t[103]!==M||t[104]!==j||t[105]!==A||t[106]!==S.pushPermission?(q=S.pushPermission?.checkStatus===`denied`&&(M||A||j)?(0,b.jsx)(`div`,{className:`mt-2 space-y-1`,"data-testid":`settings-sync-identity`,children:de(S.pushPermission).map(Ne)}):null,t[103]=M,t[104]=j,t[105]=A,t[106]=S.pushPermission,t[107]=q):q=t[107];let J;t[108]!==O||t[109]!==S.pushPermission?(J=he(S.pushPermission)&&(0,b.jsxs)(`div`,{className:`mt-2 flex items-start gap-2`,"data-testid":`settings-sync-signin-again`,children:[(0,b.jsx)(`p`,{className:`text-1sm text-muted-foreground flex-1 min-w-0`,children:(0,b.jsx)(r,{id:`C_cPoW`})}),(0,b.jsx)(g,{variant:`outline`,size:`xs`,className:`self-start`,onClick:()=>O(!0),children:(0,b.jsx)(r,{id:`5lWFkC`})})]}),t[108]=O,t[109]=S.pushPermission,t[110]=J):J=t[110];let Y;t[111]!==V||t[112]!==H||t[113]!==U||t[114]!==W||t[115]!==G||t[116]!==K||t[117]!==q||t[118]!==J?(Y=(0,b.jsxs)(`div`,{className:`rounded-md border p-3`,children:[V,H,U,W,G,K,q,J]}),t[111]=V,t[112]=H,t[113]=U,t[114]=W,t[115]=G,t[116]=K,t[117]=q,t[118]=J,t[119]=Y):Y=t[119];let Mt=T!==`off`&&(0,b.jsxs)(ne,{open:He,onOpenChange:Ue,children:[(0,b.jsx)(te,{asChild:!0,children:(0,b.jsxs)(g,{variant:`ghost`,size:`sm`,className:`group gap-1 px-1.5 text-muted-foreground`,"data-testid":`settings-sync-advanced-trigger`,children:[(0,b.jsx)(Te,{className:`size-3.5 transition-transform group-data-[state=open]:rotate-90`,"aria-hidden":!0}),(0,b.jsx)(r,{id:`sxkWRg`})]})}),(0,b.jsx)(ee,{className:`pt-2`,children:(0,b.jsxs)(`div`,{className:`rounded-md border p-3 space-y-3`,"data-testid":`settings-sync-intervals`,children:[(0,b.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,b.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,b.jsx)(`div`,{id:`settings-sync-pull-interval-label`,className:`text-sm font-medium`,children:(0,b.jsx)(r,{id:`Xs1kjx`})}),(0,b.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,b.jsx)(r,{id:`T1fMJ6`})})]}),(0,b.jsxs)(p,{value:String(w.pullIntervalSeconds),onValueChange:e=>Et(`pull`,e),disabled:!Le,children:[(0,b.jsx)(d,{size:`sm`,className:`w-40 shrink-0`,"aria-labelledby":`settings-sync-pull-interval-label`,"data-testid":`settings-sync-pull-interval`,children:(0,b.jsx)(f,{})}),(0,b.jsx)(u,{children:Tt(w.pullIntervalSeconds).map(e=>(0,b.jsx)(l,{value:String(e),children:Ct(e)},e))})]})]}),T===`full`&&(0,b.jsxs)(`div`,{className:`flex items-start justify-between gap-4 border-t pt-3`,children:[(0,b.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,b.jsx)(`div`,{id:`settings-sync-push-interval-label`,className:`text-sm font-medium`,children:(0,b.jsx)(r,{id:`gyYvCN`})}),(0,b.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,b.jsx)(r,{id:`czQDKY`})})]}),(0,b.jsxs)(p,{value:String(w.pushIntervalSeconds),onValueChange:e=>Et(`push`,e),disabled:!Le,children:[(0,b.jsx)(d,{size:`sm`,className:`w-40 shrink-0`,"aria-labelledby":`settings-sync-push-interval-label`,"data-testid":`settings-sync-push-interval`,children:(0,b.jsx)(f,{})}),(0,b.jsx)(u,{children:Tt(w.pushIntervalSeconds).map(e=>(0,b.jsx)(l,{value:String(e),children:Ct(e)},e))})]})]}),T===`full`&&Ke&&(0,b.jsx)(`p`,{className:`text-1sm text-muted-foreground`,"data-testid":`settings-sync-push-outpaces-pull-hint`,children:(0,b.jsx)(r,{id:`x-E_vF`})})]})})]}),Nt;t[120]===Symbol.for(`react.memo_cache_sentinel`)?(Nt=(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsx)(`div`,{id:`settings-sync-default-label`,className:`text-sm font-medium`,children:(0,b.jsx)(r,{id:`j_Z6g7`})}),(0,b.jsx)(Ae,{scope:`project`})]}),t[120]=Nt):Nt=t[120];let Pt;t[121]===Symbol.for(`react.memo_cache_sentinel`)?(Pt=(0,b.jsxs)(`div`,{className:`space-y-0.5`,children:[Nt,(0,b.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,b.jsx)(r,{id:`Zysl7r`})})]}),t[121]=Pt):Pt=t[121];let Ft=!Re,It;t[122]===Symbol.for(`react.memo_cache_sentinel`)?(It=(0,b.jsx)(m,{value:`ask`,className:x,"data-testid":`settings-sync-default-ask`,children:(0,b.jsx)(r,{id:`EdQY6l`})}),t[122]=It):It=t[122];let Lt;t[123]===Symbol.for(`react.memo_cache_sentinel`)?(Lt=(0,b.jsx)(m,{value:`off`,className:x,"data-testid":`settings-sync-default-off`,children:(0,b.jsx)(r,{id:`BWTzAb`})}),t[123]=Lt):Lt=t[123];let Rt;t[124]===Symbol.for(`react.memo_cache_sentinel`)?(Rt=(0,b.jsx)(m,{value:`follow`,className:x,"data-testid":`settings-sync-default-follow`,children:(0,b.jsx)(r,{id:`tlGXxX`})}),t[124]=Rt):Rt=t[124];let zt;t[125]===Symbol.for(`react.memo_cache_sentinel`)?(zt=(0,b.jsx)(m,{value:`full`,className:x,"data-testid":`settings-sync-default-full`,children:(0,b.jsx)(r,{id:`IXiG0B`})}),t[125]=zt):zt=t[125];let X;t[126]!==yt||t[127]!==xt||t[128]!==Ft?(X=(0,b.jsxs)(`div`,{className:`rounded-md border p-3 space-y-2`,"data-testid":`settings-sync-default`,children:[Pt,(0,b.jsxs)(h,{type:`single`,variant:`outline`,spacing:2,value:yt,onValueChange:xt,disabled:Ft,"aria-labelledby":`settings-sync-default-label`,"data-testid":`settings-sync-default-toggle`,children:[It,Lt,Rt,zt]})]}),t[126]=yt,t[127]=xt,t[128]=Ft,t[129]=X):X=t[129];let Bt=nt??`full`,Vt=nt===`follow`?S.ahead??0:0,Z;t[130]!==et||t[131]!==at||t[132]!==tt||t[133]!==Bt||t[134]!==Vt?(Z=(0,b.jsx)(pe,{open:et,onOpenChange:tt,onConfirm:at,variant:Bt,strandedCommitCount:Vt}),t[130]=et,t[131]=at,t[132]=tt,t[133]=Bt,t[134]=Vt,t[135]=Z):Z=t[135];let Q;t[136]===O?Q=t[137]:(Q=()=>O(!1),t[136]=O,t[137]=Q);let $;t[138]!==ot||t[139]!==O||t[140]!==Q?($=(0,b.jsx)(Oe,{open:ot,onOpenChange:O,onSuccess:Q,reauth:!0}),t[138]=ot,t[139]=O,t[140]=Q,t[141]=$):$=t[141];let Ht;return t[142]!==P||t[143]!==Y||t[144]!==Mt||t[145]!==X||t[146]!==Z||t[147]!==$?(Ht=(0,b.jsxs)(`div`,{className:`space-y-3`,children:[P,Y,Mt,X,Z,$]}),t[142]=P,t[143]=Y,t[144]=Mt,t[145]=X,t[146]=Z,t[147]=$,t[148]=Ht):Ht=t[148],Ht}function Ne(e){return(0,b.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:e},e)}function Pe(e,t){return e-t}export{S as SyncSection};