@inkeep/open-knowledge 0.82.0-beta.2 → 0.82.0-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 (160) hide show
  1. package/dist/cli.mjs +58 -58
  2. package/dist/constants-W9G4vRvJ.mjs +1 -0
  3. package/dist/dist-C1WwDYOU.mjs +1 -0
  4. package/dist/dist-DdoZ294B.mjs +2132 -0
  5. package/dist/index.d.mts +8 -0
  6. package/dist/index.mjs +12 -12
  7. package/dist/init-DaBUbh8G.mjs +1 -0
  8. package/dist/{init-DxmJQw-q.mjs → init-vgeY_wHD.mjs} +67 -67
  9. package/dist/{launch-json-removal-6P0pQNcb.mjs → launch-json-removal-D4FuJ2Te.mjs} +1 -1
  10. package/dist/{loader-DM58JL8z.mjs → loader-DYbtvtxH.mjs} +1 -1
  11. package/dist/loader-YyyVC5zh.mjs +1 -0
  12. package/dist/{md-manager-BGnqyqi1-_aOifsph.mjs → md-manager-BGnqyqi1-D77IwxHB.mjs} +149 -149
  13. package/dist/{open-browser-b5cByL_R.mjs → open-browser-Dg3gcrHM.mjs} +1 -1
  14. package/dist/parse-worker.mjs +1 -1
  15. package/dist/{preview-B197-pRb.mjs → preview-1EGVW00C.mjs} +1 -1
  16. package/dist/preview-BQhr7b8a.mjs +1 -0
  17. package/dist/public/assets/{ActivityModeContent-DQuMnh5C.js → ActivityModeContent-qim4zFx-.js} +1 -1
  18. package/dist/public/assets/AddPropertiesButton-DKXiB5hC.js +2 -0
  19. package/dist/public/assets/{AgentDiffPane-CfePb4Vn.js → AgentDiffPane-BD8yOgrS.js} +1 -1
  20. package/dist/public/assets/{AgentThreadClientBinder-ZCMADC7K.js → AgentThreadClientBinder-18BD6ihn.js} +1 -1
  21. package/dist/public/assets/{BugReportHistory-DF4MWYfb.js → BugReportHistory-C2kxTgHh.js} +1 -1
  22. package/dist/public/assets/{BugReportHistoryDialog-gCloscKr.js → BugReportHistoryDialog-DgtiL-NP.js} +1 -1
  23. package/dist/public/assets/{CodeMirrorPropInput-Cpqvck97.js → CodeMirrorPropInput-D7ODqRwE.js} +1 -1
  24. package/dist/public/assets/{ConsentDialogBody-B4dRFslY.js → ConsentDialogBody-CD7KM28d.js} +1 -1
  25. package/dist/public/assets/{DeleteConfirmationDialog-j-IypjMj.js → DeleteConfirmationDialog-C1zIx9Bd.js} +1 -1
  26. package/dist/public/assets/{DiffViewBoundary-DmVyFPz3.js → DiffViewBoundary-DGNf5H84.js} +1 -1
  27. package/dist/public/assets/DocumentContext-BHjfklWj.js +39 -0
  28. package/dist/public/assets/{EditorModeToggle-X2jghMca.js → EditorModeToggle-XKuoOdJs.js} +1 -1
  29. package/dist/public/assets/{ExcalidrawDocEditor-DYtEACVo.js → ExcalidrawDocEditor-I2eQXX7E.js} +1 -1
  30. package/dist/public/assets/FeedbackForm-BQ8aBBom.js +1 -0
  31. package/dist/public/assets/{GraphPanel-BDvjXMEQ.js → GraphPanel-nDzxbZwr.js} +2 -2
  32. package/dist/public/assets/{ImageAttachments-D6OJOCsx.js → ImageAttachments-Dob2zdX6.js} +1 -1
  33. package/dist/public/assets/{ImportSkillDialog-BhLkbnwE.js → ImportSkillDialog-CU7KSDgH.js} +1 -1
  34. package/dist/public/assets/{LintConfigEditor-CkcVzFfE.js → LintConfigEditor-81_fDdG_.js} +1 -1
  35. package/dist/public/assets/{ManagedArtifactProperties-C9JeOwFQ.js → ManagedArtifactProperties-DTfJaeLZ.js} +1 -1
  36. package/dist/public/assets/ManagedArtifactProperties-yEjDaTS8.js +1 -0
  37. package/dist/public/assets/{MermaidDocEditor-j_et9Ci3.js → MermaidDocEditor-Dw5SypSn.js} +1 -1
  38. package/dist/public/assets/{OpenInAgentMenuItem-BTXZ6GJd.js → OpenInAgentMenuItem-BMo7aLCS.js} +1 -1
  39. package/dist/public/assets/{PropertyDisplayRow-C1uc8qxv.js → PropertyDisplayRow-Bn0kgK3p.js} +1 -1
  40. package/dist/public/assets/{RegisteredAgentIcon-DYSDhnfL.js → RegisteredAgentIcon-DbL9sShX.js} +1 -1
  41. package/dist/public/assets/{ReportBugDialogBody-D641oLxH.js → ReportBugDialogBody-DEETk9Jo.js} +1 -1
  42. package/dist/public/assets/{ReportBugMenuTrigger-BLGrQGJZ.js → ReportBugMenuTrigger-B1WREGjA.js} +1 -1
  43. package/dist/public/assets/{SchemaConfigEditor-BaSvU0-b.js → SchemaConfigEditor-BLXTxBGL.js} +1 -1
  44. package/dist/public/assets/{SessionsHost-uURZn-05.js → SessionsHost-DquHUp9T.js} +2 -2
  45. package/dist/public/assets/{SettingsDialogBody-CC9Qpr7Q.js → SettingsDialogBody-DKEUH63t.js} +4 -4
  46. package/dist/public/assets/ShareBranchSwitchDialog-BUS2my96.js +1 -0
  47. package/dist/public/assets/{ShareReceiveDialog-Bsy3uU-q.js → ShareReceiveDialog-BKgD7Duc.js} +1 -1
  48. package/dist/public/assets/{ShareReceiveMissDialog-CGkRwnD4.js → ShareReceiveMissDialog-_8dejDWk.js} +1 -1
  49. package/dist/public/assets/{SkillCostValue-DQ8Tx_1m.js → SkillCostValue-CmCcSYjJ.js} +1 -1
  50. package/dist/public/assets/{SkillEditBanner-CFIWznnO.js → SkillEditBanner-DFdS9BhL.js} +1 -1
  51. package/dist/public/assets/{SkillForkDialog-C_-Mxjb0.js → SkillForkDialog-D5Aha7ke.js} +1 -1
  52. package/dist/public/assets/{SkillInstallMenu-C1d_Onp0.js → SkillInstallMenu-Cju9gFSt.js} +2 -2
  53. package/dist/public/assets/{SkillOriginInline-CZCok01y.js → SkillOriginInline-DPQ0UfdG.js} +1 -1
  54. package/dist/public/assets/{SkillToolbarControls-jOPo2cwU.js → SkillToolbarControls-SRsQowBm.js} +1 -1
  55. package/dist/public/assets/{SlidesToolbarControls-CyQHjFAZ.js → SlidesToolbarControls-8Tu4pV-S.js} +1 -1
  56. package/dist/public/assets/{SourceEditor-BkV5uQIG.js → SourceEditor-DUhZs5yo.js} +1 -1
  57. package/dist/public/assets/{SyncStatusBadge-DKTFq6nT.js → SyncStatusBadge-B9wP5KjD.js} +1 -1
  58. package/dist/public/assets/TerminalPanel-Db-Lo-iL.js +146 -0
  59. package/dist/public/assets/{TerminalWindowApp-Cmnoc_8o.js → TerminalWindowApp-CAjzSiBI.js} +1 -1
  60. package/dist/public/assets/{TextDocEditor-RnLIKCzS.js → TextDocEditor-C7dpFdVd.js} +1 -1
  61. package/dist/public/assets/{ThreadView-BbjIu_Tj.js → ThreadView-CsZKSzs5.js} +6 -6
  62. package/dist/public/assets/{TimelineDiffPane-CJOIx5co.js → TimelineDiffPane-DcChEu2J.js} +1 -1
  63. package/dist/public/assets/agent-connections-iuaYc-Gk.js +1 -0
  64. package/dist/public/assets/{auth-state-cache-DytZdZGG.js → auth-state-cache-Dz-Yvu70.js} +4 -4
  65. package/dist/public/assets/{bug-report-send-manager-vRHbDgcD.js → bug-report-send-manager-0DIkaLj0.js} +1 -1
  66. package/dist/public/assets/{client-version-BRUdlpYX.js → client-version-DJFCNOKL.js} +1 -1
  67. package/dist/public/assets/{comment-chips-D7-Sf8LJ.js → comment-chips-jwrddJ4n.js} +1 -1
  68. package/dist/public/assets/{config-provider-72j5NG_s.js → config-provider-B4cgjuAt.js} +1 -1
  69. package/dist/public/assets/{css-color-to-hex-CvWv027U.js → css-color-to-hex-oO6GoCcb.js} +1 -1
  70. package/dist/public/assets/{diagnostic-breadcrumb-WWSlN_l6.js → diagnostic-breadcrumb-DK-Cqae0.js} +1 -1
  71. package/dist/public/assets/{dist-BQnk7HYC.js → dist-CUgbgEDy.js} +199 -199
  72. package/dist/public/assets/{doc-paths-zlKNK6ew.js → doc-paths-DaHerw67.js} +1 -1
  73. package/dist/public/assets/{doc-undo-manager-CUYFsfKH.js → doc-undo-manager-ZAJ7EhHf.js} +1 -1
  74. package/dist/public/assets/{documents-events-BkJZtY8-.js → documents-events-AGLgPGQa.js} +1 -1
  75. package/dist/public/assets/{file-tree-adapter-Bd2ICSy3.js → file-tree-adapter--GNP_kR2.js} +1 -1
  76. package/dist/public/assets/{file-tree-utils-BknD8oVN.js → file-tree-utils-lPpxK5Yq.js} +1 -1
  77. package/dist/public/assets/{folder-config-api-B069M2f5.js → folder-config-api-DDOXhGdo.js} +1 -1
  78. package/dist/public/assets/{index-PxHb8oCI.js → index-BdhkBLck.js} +15 -15
  79. package/dist/public/assets/{lint-config-client-CxrUSFhk.js → lint-config-client-B_xNfTBy.js} +1 -1
  80. package/dist/public/assets/{markdownlint-rule-browser-DLJGhZu8.js → markdownlint-rule-browser-DzjG_qoM.js} +1 -1
  81. package/dist/public/assets/{messages-DCLxtq5E.js → messages-15pqM65e.js} +1 -1
  82. package/dist/public/assets/{messages-s1kQ0F_h.js → messages-9WOa9KUm.js} +1 -1
  83. package/dist/public/assets/{messages-AFVdD964.js → messages-B_Wv5APO.js} +1 -1
  84. package/dist/public/assets/{messages-BcWRA-nI.js → messages-C7pSlTmA.js} +1 -1
  85. package/dist/public/assets/{messages-CbN1r9yA.js → messages-CAYad86H.js} +1 -1
  86. package/dist/public/assets/{messages-OBzrmAFm.js → messages-CQ1vIgoS.js} +1 -1
  87. package/dist/public/assets/{messages-C0Gd4qNa.js → messages-CciFZ7sP.js} +1 -1
  88. package/dist/public/assets/messages-CibA1WyZ.js +1 -0
  89. package/dist/public/assets/{messages-DM9zlCjV.js → messages-Dd9VKFx-.js} +1 -1
  90. package/dist/public/assets/{messages-BCP_tUaH.js → messages-DsNN544W.js} +1 -1
  91. package/dist/public/assets/{messages-hoIRV_jf.js → messages-KKn5PQmE.js} +1 -1
  92. package/dist/public/assets/{messages-C2ZTIk86.js → messages-WxVoyVTt.js} +1 -1
  93. package/dist/public/assets/{messages-l5K8pww3.js → messages-spfa9ZpO.js} +1 -1
  94. package/dist/public/assets/{navigation-targets-JXxslLnB.js → navigation-targets-DV1dMVAb.js} +1 -1
  95. package/dist/public/assets/{page-list-cache-BjuTcwZG.js → page-list-cache-BaKlIcC-.js} +1 -1
  96. package/dist/public/assets/{pending-receive-nav-store-I34BHw8L.js → pending-receive-nav-store-4xt56kJR.js} +1 -1
  97. package/dist/public/assets/{preferred-session-events-Dn2B8C6Q.js → preferred-session-events-CeCXvWmc.js} +1 -1
  98. package/dist/public/assets/{progress-Cr6xP6xF.js → progress-D6YLD7xV.js} +1 -1
  99. package/dist/public/assets/{project-paths-B4WlvnNK.js → project-paths-Cs2SPmYR.js} +1 -1
  100. package/dist/public/assets/{prop-types-DTpxi1kh.js → prop-types-Dv_cZRA5.js} +1 -1
  101. package/dist/public/assets/{receive-store-CnxXP7Rx.js → receive-store-CvglCO2B.js} +1 -1
  102. package/dist/public/assets/{selection-context-uBhB3eE7.js → selection-context-CDv7YpZ_.js} +1 -1
  103. package/dist/public/assets/{sign-in-terminal-events-BinEsAuS.js → sign-in-terminal-events-BigKQgqQ.js} +1 -1
  104. package/dist/public/assets/{skill-scope-DPIrVPTZ.js → skill-scope-BGcfBWlz.js} +1 -1
  105. package/dist/public/assets/{skills-api-Crupv6z4.js → skills-api-mYKB0zDh.js} +1 -1
  106. package/dist/public/assets/{src-o93MaH3v.js → src-xGMvMbEd.js} +1 -1
  107. package/dist/public/assets/{startup-marks-DKfzso0C.js → startup-marks-yQqTMBm5.js} +1 -1
  108. package/dist/public/assets/{tag-pill-input-CLaEMXUD.js → tag-pill-input-BQLv6DZ1.js} +1 -1
  109. package/dist/public/assets/{target-navigation-intent-zOwhEhjl.js → target-navigation-intent-BIFEl4OT.js} +1 -1
  110. package/dist/public/assets/{telemetry-startup-Co4ih8hj.js → telemetry-startup-DyEWsvUO.js} +1 -1
  111. package/dist/public/assets/{terminal-command-events-CSovYcNv.js → terminal-command-events-CoTkNESn.js} +1 -1
  112. package/dist/public/assets/{terminal-launch-events-HpRiFG59.js → terminal-launch-events-BBjjknBw.js} +1 -1
  113. package/dist/public/assets/{terminal-telemetry-DcIn01ci.js → terminal-telemetry-CGR3Wr8L.js} +1 -1
  114. package/dist/public/assets/{thread-client-HIe8sJZj.js → thread-client-V2_Sw10t.js} +1 -1
  115. package/dist/public/assets/{typing-burst-detector-BJWhmLpH.js → typing-burst-detector-Bwb8vXQS.js} +4 -4
  116. package/dist/public/assets/{uninstall-F-GEBRwC.js → uninstall-BcI5d3jC.js} +1 -1
  117. package/dist/public/assets/{use-activity-panel-DPXbm__T.js → use-activity-panel-Bm-_7omz.js} +1 -1
  118. package/dist/public/assets/{use-apply-config-language-Cuqo14R8.js → use-apply-config-language-Bzn7Rbw_.js} +2 -2
  119. package/dist/public/assets/{use-collab-url-Xg2vl_9f.js → use-collab-url-D3j3svaH.js} +1 -1
  120. package/dist/public/assets/{use-conflicts-q41ecWBs.js → use-conflicts-8sSRJ_Uy.js} +1 -1
  121. package/dist/public/assets/{use-git-sync-status-DjWrCson.js → use-git-sync-status-CBlTkWfK.js} +1 -1
  122. package/dist/public/assets/{use-installed-clis-BXQp0M3M.js → use-installed-clis-ClKL7RtP.js} +2 -2
  123. package/dist/public/assets/{use-live-xterm-theme-DJANnc0z.js → use-live-xterm-theme-bJiLIpxd.js} +1 -1
  124. package/dist/public/assets/{use-open-skill-Bv2npv4w.js → use-open-skill-BpW3ZhuK.js} +1 -1
  125. package/dist/public/assets/{use-settings-route-9O_1v-q-.js → use-settings-route-DL25HSeL.js} +1 -1
  126. package/dist/public/assets/use-skill-origin-Cts8svd2.js +1 -0
  127. package/dist/public/assets/{use-skills-B6Tde6G8.js → use-skills-DXlhkRBq.js} +1 -1
  128. package/dist/public/assets/{use-terminal-enabled-DbQnWyNv.js → use-terminal-enabled-Br80VTvl.js} +1 -1
  129. package/dist/public/assets/{use-timeline-entry-diff-DYEZ5Kr0.js → use-timeline-entry-diff-l604pHZz.js} +4 -4
  130. package/dist/public/assets/{use-workspace-CgZbdppm.js → use-workspace-DtyUPSZ4.js} +1 -1
  131. package/dist/public/index.html +60 -60
  132. package/dist/public/uninstall.html +4 -4
  133. package/dist/{registry-probes-BVV-dp2_.mjs → registry-probes-BXgdIidc.mjs} +8 -8
  134. package/dist/{removal-file-path-IGB8kLW3.mjs → removal-file-path-Ce-oxAGQ.mjs} +1 -1
  135. package/dist/{repair-launch-json-Bm0KASfL.mjs → repair-launch-json-CtsInz2s.mjs} +1 -1
  136. package/dist/{repair-mcp-configs-LE7SMVZu.mjs → repair-mcp-configs-BESnoIPY.mjs} +1 -1
  137. package/dist/src-BPwbNxCr.mjs +1 -0
  138. package/dist/src-KNAqsxPK.mjs +11 -0
  139. package/dist/start-B8iic9V_.mjs +5 -0
  140. package/dist/start-BXE7aaH4.mjs +1 -0
  141. package/package.json +4 -4
  142. package/dist/constants-CzSXiZrq.mjs +0 -1
  143. package/dist/dist-3oA3zia0.mjs +0 -2132
  144. package/dist/dist-cOlZ_g1o.mjs +0 -1
  145. package/dist/init-PDchMTWx.mjs +0 -1
  146. package/dist/loader-B8l-Xtmg.mjs +0 -1
  147. package/dist/preview-CAoM5JFA.mjs +0 -1
  148. package/dist/public/assets/AddPropertiesButton-B1OSJ-0F.js +0 -2
  149. package/dist/public/assets/DocumentContext-oEOdA-1V.js +0 -39
  150. package/dist/public/assets/FeedbackForm-DWwETSKh.js +0 -1
  151. package/dist/public/assets/ManagedArtifactProperties-7hZevPi3.js +0 -1
  152. package/dist/public/assets/ShareBranchSwitchDialog-BaiZgNy4.js +0 -1
  153. package/dist/public/assets/TerminalPanel-d_daafCx.js +0 -146
  154. package/dist/public/assets/agent-connections-BriCDDPd.js +0 -1
  155. package/dist/public/assets/messages-fT_Mlcyb.js +0 -1
  156. package/dist/public/assets/use-skill-origin-CmJxQKvj.js +0 -1
  157. package/dist/src--KGw9ViN.mjs +0 -11
  158. package/dist/src-F_RCTw6-.mjs +0 -1
  159. package/dist/start-C96oJP3X.mjs +0 -5
  160. package/dist/start-Da74MpW4.mjs +0 -1
@@ -1 +0,0 @@
1
- import{t as e}from"./index-PxHb8oCI.js";export{e as FeedbackForm};
@@ -1 +0,0 @@
1
- import{t as e}from"./ManagedArtifactProperties-C9JeOwFQ.js";export{e as ManagedArtifactProperties};
@@ -1 +0,0 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./button-BeFNZANd.js";import{n as s}from"./dist-CJhtNlOm2.js";import{t as ee}from"./dist-Cr4-nBVI.js";import{t as c}from"./desktop-bridge-types-oYPdTDmz.js";import{n as l,t as te}from"./git-branch-B_QTfwFA.js";import{t as u}from"./spinner-D7ppCG-D.js";import{n as ne,t as d}from"./miss-dialog-store-CWiUu3y7.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-BTFtzetj.js";import{t as le}from"./tool-list-format-BBT_vsDw.js";import{i as ue,n as p,t as m}from"./auth-prompt-store-DKA-QhmR.js";import{a as h,n as de}from"./receive-store-CnxXP7Rx.js";import{t as fe}from"./share-metadata-rows-CBVJZE24.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}}:{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-switch-unsafe-symlinks:${e}`}function y(e){let t=(0,pe.c)(217),{bridge:n,store:a}=e,m=a===void 0?de:a,{_}=i(),y=(0,g.useSyncExternalStore)(m.subscribe,m.getSnapshot,Le),[b,x]=(0,g.useState)(ge),Re=(0,g.useRef)(!1),ze=(0,g.useRef)(!1),Be=(0,g.useRef)(!1),Ve=(0,g.useRef)(null),He;t[0]===y?He=t[1]:(He=De(y)?y:null,t[0]=y,t[1]=He);let S=He,Ue;t[2]!==_||t[3]!==S?.share.target.kind?(Ue=S?.share.target.kind===`folder`?_({id:`ugoTXs`}):_({id:`XH30C4`}),t[2]=_,t[3]=S?.share.target.kind,t[4]=Ue):Ue=t[4];let C=Ue,We;t[5]===S?We=t[6]:(We=()=>{x(ge),Re.current=!1,ze.current=!1,Be.current=!1,Ve.current=S},t[5]=S,t[6]=We);let Ge;t[7]===y?Ge=t[8]:(Ge=[y],t[7]=y,t[8]=Ge),(0,g.useEffect)(We,Ge);let Ke;t[9]!==S||t[10]!==n?(Ke=()=>{if(!S||Re.current)return;Re.current=!0;let e=!1;return n.project.fetchBranchInfo({projectPath:S.projectPath,branch:S.share.branch,kind:S.share.repositoryTarget.kind,path:Te(S.share)}).then(t=>{e||x(e=>_e(e,t))}).catch(t=>{e||(console.warn(`[receive] branch-info-fetch-failed`,t instanceof Error?t.message:t),x(Ie))}),()=>{e=!0}},t[9]=S,t[10]=n,t[11]=Ke):Ke=t[11];let qe;t[12]===S?qe=t[13]:(qe=[S],t[12]=S,t[13]=qe),(0,g.useEffect)(Ke,qe);let Je;t[14]!==S||t[15]!==b.info||t[16]!==b.phase||t[17]!==n?(Je=()=>{if(!S||b.phase!==`ready`||Be.current||!be(b.info))return;Be.current=!0,x(xe);let e=S;n.project.fetchTargetStatus({projectPath:S.projectPath,branch:S.share.branch,kind:S.share.target.kind,path:Te(S.share),...S.share.contentRootDepth===null?{}:{contentRootDepth:S.share.contentRootDepth}}).then(t=>{Ve.current===e&&x(e=>Se(e,t))}).catch(t=>{Ve.current===e&&(console.warn(`[receive] target-status-fetch-failed`,t instanceof Error?t.message:t),x(Fe))})},t[14]=S,t[15]=b.info,t[16]=b.phase,t[17]=n,t[18]=Je):Je=t[18];let Ye;t[19]!==S||t[20]!==b.phase?(Ye=[b.phase,S],t[19]=S,t[20]=b.phase,t[21]=Ye):Ye=t[21],(0,g.useEffect)(Je,Ye);let Xe;t[22]!==S||t[23]!==b.phase||t[24]!==b.resolution||t[25]!==m?(Xe=()=>{if(b.phase!==`verdict`)return;let{kind:e}=b.resolution;e!==`deleted`&&e!==`never-on-branch`||S&&(d.arm({kind:S.share.target.kind,path:c(S.share.target),repositoryPath:Te(S.share),...S.share.contentRootDepth===null?{}:{contentRootDepth:S.share.contentRootDepth},branch:S.share.branch}),m.dismiss())},t[22]=S,t[23]=b.phase,t[24]=b.resolution,t[25]=m,t[26]=Xe):Xe=t[26];let Ze;t[27]!==S||t[28]!==b||t[29]!==m?(Ze=[b,S,m],t[27]=S,t[28]=b,t[29]=m,t[30]=Ze):Ze=t[30],(0,g.useEffect)(Xe,Ze);let Qe;t[31]!==b.phase||t[32]!==b.resolution?(Qe=()=>{b.phase===`verdict`&&console.log(h({verdict_cell:b.resolution.kind}))},t[31]=b.phase,t[32]=b.resolution,t[33]=Qe):Qe=t[33];let $e;t[34]===b?$e=t[35]:($e=[b],t[34]=b,t[35]=$e),(0,g.useEffect)(Qe,$e);let et;t[36]!==_||t[37]!==S||t[38]!==b.pendingDoc||t[39]!==b.phase||t[40]!==n||t[41]!==m||t[42]!==C?(et=()=>{if(b.phase!==`awaiting-cc1-recycle`||!S)return;let e=S.share.branch,t=b.pendingDoc;if(!e){m.dismiss();return}if(ze.current)return;ze.current=!0;let r=!1;return n.project.awaitBranchSwitched({projectPath:S.projectPath,branch:e,timeoutMs:3e4}).then(i=>{if(!r){if(i.ok){console.log(h({branch_dialog_action:`branch-switch-complete`,branch:e})),n.project.open({path:S.projectPath,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:Ee(S.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:C}}))}),m.dismiss();return}console.log(h({branch_dialog_action:`branch-switch-timeout`,branch:e})),s.error(_({id:`LBwUR6`,values:{targetNoun:C}})),m.dismiss()}}).catch(e=>{r||(console.warn(`[receive] awaitBranchSwitched rejected`,e instanceof Error?e.message:e),s.error(_({id:`Jw6EC4`,values:{targetNoun:C}})),m.dismiss())}),()=>{r=!0}},t[36]=_,t[37]=S,t[38]=b.pendingDoc,t[39]=b.phase,t[40]=n,t[41]=m,t[42]=C,t[43]=et):et=t[43];let tt;if(t[44]!==S||t[45]!==b.phase?(tt=[b.phase,S],t[44]=S,t[45]=b.phase,t[46]=tt):tt=t[46],(0,g.useEffect)(et,tt),!S)return null;let{share:w,projectPath:T,currentBranch:nt}=S,E=w.branch,rt;t[47]!==_||t[48]!==n.project||t[49]!==T||t[50]!==E||t[51]!==m?(rt=function(e,t,r){console.log(h({branch_dialog_action:`switch`,branch_action:`switch`,branch:E,verdict_cell:r})),x(t=>ve(t,e)),n.project.runCheckout(t?{projectPath:T,branch:E,fastForward:!0}:{projectPath:T,branch:E}).then(e=>{let t=null,n=!1,r=[];x(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(E);if(t!==`unsafe-symlinks`&&s.dismiss(i),t===`unsafe-symlinks`){let e=r.slice(0,Oe),t=r.length-e.length,n=t>0?[...e,_({id:`pCJv30`,values:{hiddenCount:t}})]:e;s.error(_({id:`461Vg9`,values:{shareBranch:E}}),{description:n.length===0?void 0:le(n,ee.locale),id:i,duration:1/0})}else t===`branch-not-found`?s.error(_({id:`NJyQi_`,values:{shareBranch:E}})):t===`fetch-failed`?s.error(_({id:`bWLmRK`})):t===`symlink-check-failed`?s.error(_({id:`0uxLib`,values:{shareBranch:E}})):(t===`checkout-failed`||t===`proxy-null`)&&s.error(_({id:`c863eW`,values:{shareBranch:E}}));n&&m.dismiss()}).catch(e=>{console.warn(`[receive] runCheckout rejected branch_action=switch`,e instanceof Error?e.message:e),x(Pe),s.dismiss(ke(E)),s.error(_({id:`c863eW`,values:{shareBranch:E}}))})},t[47]=_,t[48]=n.project,t[49]=T,t[50]=E,t[51]=m,t[52]=rt):rt=t[52];let D=rt,it;t[53]!==b.info||t[54]!==b.phase||t[55]!==D||t[56]!==w.target?(it=function(){b.phase===`ready`&&me(b.info).switchEnabled&&D(c(w.target),!1)},t[53]=b.info,t[54]=b.phase,t[55]=D,t[56]=w.target,t[57]=it):it=t[57];let at=it,ot;t[58]!==b.phase||t[59]!==b.resolution||t[60]!==D||t[61]!==w.target?(ot=function(){b.phase===`verdict`&&D(c(w.target),!0,b.resolution.kind)},t[58]=b.phase,t[59]=b.resolution,t[60]=D,t[61]=w.target,t[62]=ot):ot=t[62];let st=ot,ct;t[63]!==b.phase||t[64]!==b.resolution||t[65]!==D?(ct=function(){b.phase===`verdict`&&b.resolution.kind===`renamed`&&D(b.resolution.renamedTo,!0,b.resolution.kind)},t[63]=b.phase,t[64]=b.resolution,t[65]=D,t[66]=ct):ct=t[66];let lt=ct,ut;t[67]!==b.phase||t[68]!==b.resolution||t[69]!==D||t[70]!==w.target?(ut=function(){b.phase===`verdict`&&D(c(w.target),!1,b.resolution.kind)},t[67]=b.phase,t[68]=b.resolution,t[69]=D,t[70]=w.target,t[71]=ut):ut=t[71];let dt=ut,ft;t[72]!==_||t[73]!==n.project||t[74]!==T||t[75]!==w||t[76]!==E||t[77]!==m||t[78]!==C?(ft=function(){console.log(h({branch_dialog_action:`open-current`,branch:E})),n.project.open({path:T,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:Ee(w)}).catch(e=>{console.warn(`[receive] warm-focus-dispatch-failed branch_action=open-current`,e instanceof Error?e.message:e),s.error(_({id:`b5aNbi`,values:{targetNoun:C}}))}),m.dismiss()},t[72]=_,t[73]=n.project,t[74]=T,t[75]=w,t[76]=E,t[77]=m,t[78]=C,t[79]=ft):ft=t[79];let pt=ft,mt;t[80]!==_||t[81]!==E?(mt=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:Ne}});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:E}}));return;case`fetch-failed`:s.error(_({id:`bWLmRK`}));return;case`already-checked-out`:s.error(_({id:`ljHjfg`}));return;case`branch-exists`:s.error(_({id:`h3QZcB`,values:{shareBranch:E}}));return;case`path-exists`:s.error(_({id:`cN1Gcp`,values:{shareBranch:E}}));return;case`no-git`:s.error(_({id:`CFnavk`}));return;case`empty-repo`:s.error(_({id:`5IgYAM`}));return;case`invalid-branch`:s.error(_({id:`JfPuv7`,values:{shareBranch:E}}));return;case`project-scope-unavailable`:s.error(_(p({reason:t,issue:e.projectScopeIssue})));return;case`proxy-null`:case`error`:s.error(_({id:`e8zYa8`,values:{shareBranch:E}}));return;default:throw Error(`Unhandled worktree failure reason: ${String(t)}`)}},t[80]=_,t[81]=E,t[82]=mt):mt=t[82];let ht=mt,gt;t[83]!==_||t[84]!==n.project||t[85]!==w||t[86]!==E||t[87]!==ht||t[88]!==m?(gt=function(e){e?.ok===!1&&e.reason===`project-scope-unavailable`&&ue();let t,r=!1,i=null;if(x(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!==void 0&&(console.log(h({branch_dialog_action:`open-worktree-failed:${t.reason}`,branch:E})),ht(t)),i!==null){ue();let e=i;n.project.open({path:e,target:`new-window`,entryPoint:`worktree`,pendingDeepLinkTarget:Ee(w),pendingBranch:E}).catch(t=>{console.warn(`[receive] worktree-open-failed branch_dialog_action=open-worktree`,t instanceof Error?t.message:t),s.error(_({id:`LdABLa`,values:{target:e}}))}),m.dismiss()}r&&m.dismiss()},t[83]=_,t[84]=n.project,t[85]=w,t[86]=E,t[87]=ht,t[88]=m,t[89]=gt):gt=t[89];let _t=gt,vt;t[90]!==_t||t[91]!==b.phase||t[92]!==n.worktree||t[93]!==E?(vt=function(){b.phase===`ready`&&(console.log(h({branch_dialog_action:`open-worktree`,branch:E})),x(ye),n.worktree.checkout({branch:E}).then(e=>{_t(e)}).catch(e=>{console.warn(`[receive] worktree-checkout rejected branch_dialog_action=open-worktree`,e instanceof Error?e.message:e),_t(null)}))},t[90]=_t,t[91]=b.phase,t[92]=n.worktree,t[93]=E,t[94]=vt):vt=t[94];let yt=vt,bt;t[95]!==_||t[96]!==b.otherWorktreePath||t[97]!==b.phase||t[98]!==n.project||t[99]!==w||t[100]!==E||t[101]!==m?(bt=function(){if(b.phase!==`branch-in-other-worktree`)return;let e=b.otherWorktreePath;console.log(h({branch_dialog_action:`pivot-to-other-worktree`,branch:E})),n.project.open({path:e,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:Ee(w),pendingBranch:E}).catch(t=>{console.warn(`[receive] pivot-open-failed branch_action=pivot-to-other-worktree`,t instanceof Error?t.message:t),s.error(_({id:`LdABLa`,values:{target:e}}))}),m.dismiss()},t[95]=_,t[96]=b.otherWorktreePath,t[97]=b.phase,t[98]=n.project,t[99]=w,t[100]=E,t[101]=m,t[102]=bt):bt=t[102];let xt=bt,St;t[103]!==b.phase||t[104]!==b.resolution||t[105]!==m?(St=function(){console.log(h({branch_dialog_action:`cancel`,verdict_cell:b.phase===`verdict`?b.resolution.kind:void 0})),m.dismiss()},t[103]=b.phase,t[104]=b.resolution,t[105]=m,t[106]=St):St=t[106];let O=St,k,A,j,M,N,P,F,I,L,R,z,B,V,H,U,W,G,K,q;if(t[107]!==_||t[108]!==b.info||t[109]!==b.otherWorktreePath||t[110]!==b.phase||t[111]!==b.resolution||t[112]!==O||t[113]!==nt||t[114]!==w.branch||t[115]!==w.owner||t[116]!==w.repo||t[117]!==w.target||t[118]!==E||t[119]!==C){K=b.phase===`ready`||b.phase===`switching`||b.phase===`creating-worktree`?me(b.info):null;let e;t[139]!==b.info||t[140]!==b.phase||t[141]!==nt?(e=b.phase===`ready`||b.phase===`switching`||b.phase===`creating-worktree`?he(b.info):nt??`HEAD`,t[139]=b.info,t[140]=b.phase,t[141]=nt,t[142]=e):e=t[142];let n=e;F=b.phase===`switching`||b.phase===`awaiting-cc1-recycle`,M=b.phase===`creating-worktree`;let i;t[143]===_?i=t[144]:(i=_({id:`OuY8t9`}),t[143]=_,t[144]=i),N=i;let a;t[145]===_?a=t[146]:(a=_({id:`XZkdtg`}),t[145]=_,t[146]=a),P=a;let o;t[147]===_?o=t[148]:(o=_({id:`VTulZj`}),t[147]=_,t[148]=o),q=o;let s=b.phase===`loading`,ee=b.phase===`error`;j=ce,W=!0,t[149]===O?G=t[150]:(G=e=>{e||O()},t[149]=O,t[150]=G),A=ae,z=`sm:max-w-xl`,B=`share-branch-switch-dialog`,V=Me,H=je;let l;t[151]===C?l=t[152]:(l=(0,v.jsx)(ie,{children:(0,v.jsx)(r,{id:`RY6Bq1`,values:{targetNoun:C}})}),t[151]=C,t[152]=l);let te=w.owner,ne=w.repo,d;t[153]===w.target?d=t[154]:(d=c(w.target),t[153]=w.target,t[154]=d);let f;t[155]!==w.owner||t[156]!==w.repo||t[157]!==d?(f=(0,v.jsx)(re,{className:`sr-only`,children:(0,v.jsx)(r,{id:`f8jU-L`,values:{0:te,1:ne,2:d}})}),t[155]=w.owner,t[156]=w.repo,t[157]=d,t[158]=f):f=t[158],t[159]!==l||t[160]!==f?(U=(0,v.jsxs)(se,{children:[l,f]}),t[159]=l,t[160]=f,t[161]=U):U=t[161],k=oe;let le=w.owner,ue=w.repo,p;t[162]===w.target?p=t[163]:(p=c(w.target),t[162]=w.target,t[163]=p),t[164]!==w.branch||t[165]!==w.owner||t[166]!==w.repo||t[167]!==w.target.kind||t[168]!==p?(I=(0,v.jsx)(`div`,{className:`mb-4`,children:(0,v.jsx)(fe,{owner:le,repo:ue,path:p,kind:w.target.kind,branch:w.branch,testId:`share-branch-switch-metadata`,branchTestId:`share-branch-switch-metadata-branch`})}),t[164]=w.branch,t[165]=w.owner,t[166]=w.repo,t[167]=w.target.kind,t[168]=p,t[169]=I):I=t[169],L=b.phase===`branch-in-other-worktree`?(0,v.jsxs)(`div`,{className:`text-sm text-muted-foreground`,"data-testid":`share-branch-switch-in-other-worktree`,children:[(0,v.jsx)(`p`,{className:`leading-6`,children:(0,v.jsx)(r,{id:`yjExfe`,values:{shareBranch:E},components:{0:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}),(0,v.jsx)(`p`,{className:`mt-2 break-all rounded bg-muted px-2 py-1 font-mono text-xs text-foreground/80`,"data-testid":`share-branch-switch-in-other-worktree-path`,children:b.otherWorktreePath})]}):b.phase===`verdict-pending`?(0,v.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,"data-testid":`share-branch-switch-verdict-pending`,role:`status`,"aria-live":`polite`,children:[(0,v.jsx)(u,{className:`h-4 w-4`,"aria-hidden":`true`}),(0,v.jsx)(r,{id:`c8jBgX`})]}):b.phase===`verdict`?b.resolution.kind===`on-origin`?(0,v.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,"data-testid":`share-branch-switch-verdict-on-origin`,children:(0,v.jsx)(r,{id:`Uay5NL`,values:{targetNoun:C,shareBranch:E},components:{0:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):b.resolution.kind===`renamed`?(0,v.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,"data-testid":`share-branch-switch-verdict-renamed`,children:(0,v.jsx)(r,{id:`P0HC30`,values:{0:b.resolution.renamedTo,targetNoun:C},components:{0:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):b.resolution.kind===`diverged`?(0,v.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,"data-testid":`share-branch-switch-verdict-diverged`,children:(0,v.jsx)(r,{id:`kLv8d3`,values:{shareBranch:E,targetNoun:C},components:{0:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):(0,v.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,"data-testid":`share-branch-switch-verdict-handoff`,role:`status`,"aria-live":`polite`,children:[(0,v.jsx)(u,{className:`h-4 w-4`,"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`})}):K?.kind===`D`?(0,v.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,children:(0,v.jsx)(r,{id:`DTI-fp`,values:{targetNoun:C,shareBranch:E},components:{0:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):K?.kind===`B`?(0,v.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,children:(0,v.jsx)(r,{id:`sZ2IOu`,values:{targetNoun:C,shareBranch:E,currentLabel:n},components:{0:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`}),1:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):(0,v.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,children:(0,v.jsx)(r,{id:`_902BE`,values:{targetNoun:C,shareBranch:E,currentLabel:n},components:{0:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`}),1:(0,v.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}),R=K&&!K.switchEnabled&&K.conflictingFiles.length>0?(0,v.jsxs)(`div`,{className:`mt-3 rounded-md border border-border bg-muted/30 p-3 text-1sm`,"data-testid":`share-branch-switch-conflict`,children:[(0,v.jsx)(`p`,{className:`font-medium text-foreground/90`,children:(0,v.jsx)(r,{id:`n2lRue`})}),(0,v.jsx)(`ul`,{id:`share-receive-branch-conflict-files`,className:`mt-1 list-disc space-y-0.5 pl-5 text-muted-foreground`,children:K.conflictingFiles.map(Ae)})]}):null,t[107]=_,t[108]=b.info,t[109]=b.otherWorktreePath,t[110]=b.phase,t[111]=b.resolution,t[112]=O,t[113]=nt,t[114]=w.branch,t[115]=w.owner,t[116]=w.repo,t[117]=w.target,t[118]=E,t[119]=C,t[120]=k,t[121]=A,t[122]=j,t[123]=M,t[124]=N,t[125]=P,t[126]=F,t[127]=I,t[128]=L,t[129]=R,t[130]=z,t[131]=B,t[132]=V,t[133]=H,t[134]=U,t[135]=W,t[136]=G,t[137]=K,t[138]=q}else k=t[120],A=t[121],j=t[122],M=t[123],N=t[124],P=t[125],F=t[126],I=t[127],L=t[128],R=t[129],z=t[130],B=t[131],V=t[132],H=t[133],U=t[134],W=t[135],G=t[136],K=t[137],q=t[138];let J;t[170]===F?J=t[171]:(J=F?(0,v.jsxs)(`p`,{className:`mt-3 flex items-center gap-2 text-sm text-muted-foreground`,"data-testid":`share-branch-switch-switching`,role:`status`,"aria-live":`polite`,children:[(0,v.jsx)(u,{className:`h-4 w-4`,"aria-hidden":`true`}),(0,v.jsx)(r,{id:`CU3AiE`})]}):null,t[170]=F,t[171]=J);let Y;t[172]===M?Y=t[173]:(Y=M?(0,v.jsxs)(`p`,{className:`mt-3 flex items-center gap-2 text-sm text-muted-foreground`,"data-testid":`share-branch-switch-creating-worktree`,role:`status`,"aria-live":`polite`,children:[(0,v.jsx)(u,{className:`h-4 w-4`,"aria-hidden":`true`}),(0,v.jsx)(r,{id:`PZtgO0`})]}):null,t[172]=M,t[173]=Y);let X;t[174]!==k||t[175]!==I||t[176]!==L||t[177]!==R||t[178]!==J||t[179]!==Y?(X=(0,v.jsxs)(k,{children:[I,L,R,J,Y]}),t[174]=k,t[175]=I,t[176]=L,t[177]=R,t[178]=J,t[179]=Y,t[180]=X):X=t[180];let Ct;t[181]===Symbol.for(`react.memo_cache_sentinel`)?(Ct=(0,v.jsx)(r,{id:`dEgA5A`}),t[181]=Ct):Ct=t[181];let Z;t[182]===O?Z=t[183]:(Z=(0,v.jsx)(o,{variant:`ghost`,onClick:O,"data-testid":`share-branch-switch-cancel`,children:Ct}),t[182]=O,t[183]=Z);let Q;t[184]!==b.phase||t[185]!==b.resolution||t[186]!==M||t[187]!==pt||t[188]!==lt||t[189]!==yt||t[190]!==xt||t[191]!==dt||t[192]!==at||t[193]!==st||t[194]!==N||t[195]!==P||t[196]!==F||t[197]!==K||t[198]!==q?(Q=b.phase===`branch-in-other-worktree`?(0,v.jsx)(o,{onClick:xt,"data-testid":`share-branch-switch-in-other-worktree-pivot`,children:(0,v.jsx)(r,{id:`hyCxJY`})}):b.phase===`verdict`?b.resolution.kind===`on-origin`?(0,v.jsxs)(o,{onClick:st,"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`})]}):b.resolution.kind===`renamed`?(0,v.jsxs)(o,{onClick:lt,"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`})]}):b.resolution.kind===`diverged`?(0,v.jsxs)(o,{onClick:dt,"data-testid":`share-branch-switch-verdict-plain-switch`,children:[(0,v.jsx)(te,{className:`size-3.5`,"aria-hidden":!0}),P]}):null:(0,v.jsxs)(`div`,{className:`flex min-w-0 flex-col-reverse gap-2 sm:flex-row sm:flex-wrap sm:justify-end sm:gap-2`,children:[K?.openCurrentEnabled?(0,v.jsxs)(o,{variant:`outline`,onClick:pt,disabled:F||M,"data-testid":`share-branch-switch-open-current`,children:[(0,v.jsx)(ne,{className:`size-3.5`,"aria-hidden":!0}),N]}):null,(0,v.jsx)(o,{variant:`outline`,onClick:at,disabled:!K?.switchEnabled||F||M,"aria-disabled":!K?.switchEnabled||F||M,"aria-describedby":K&&!K.switchEnabled&&K.conflictingFiles.length>0?`share-receive-branch-conflict-files`:void 0,"data-testid":`share-branch-switch-switch`,children:F?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(u,{className:`size-3.5`,"aria-hidden":`true`}),P]}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(te,{className:`size-3.5`,"aria-hidden":!0}),P]})}),(0,v.jsx)(o,{onClick:yt,disabled:!K||F||M,"data-testid":`share-branch-switch-worktree`,children:M?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(u,{className:`size-3.5`,"aria-hidden":`true`}),q]}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(l,{className:`size-3.5`,"aria-hidden":!0}),q]})})]}),t[184]=b.phase,t[185]=b.resolution,t[186]=M,t[187]=pt,t[188]=lt,t[189]=yt,t[190]=xt,t[191]=dt,t[192]=at,t[193]=st,t[194]=N,t[195]=P,t[196]=F,t[197]=K,t[198]=q,t[199]=Q):Q=t[199];let wt;t[200]!==Z||t[201]!==Q?(wt=(0,v.jsxs)(f,{className:`sm:justify-between`,children:[Z,Q]}),t[200]=Z,t[201]=Q,t[202]=wt):wt=t[202];let $;t[203]!==A||t[204]!==z||t[205]!==B||t[206]!==V||t[207]!==H||t[208]!==U||t[209]!==X||t[210]!==wt?($=(0,v.jsxs)(A,{className:z,"data-testid":B,onInteractOutside:V,onPointerDownOutside:H,children:[U,X,wt]}),t[203]=A,t[204]=z,t[205]=B,t[206]=V,t[207]=H,t[208]=U,t[209]=X,t[210]=wt,t[211]=$):$=t[211];let Tt;return t[212]!==j||t[213]!==W||t[214]!==G||t[215]!==$?(Tt=(0,v.jsx)(j,{open:W,onOpenChange:G,children:$}),t[212]=j,t[213]=W,t[214]=G,t[215]=$,t[216]=Tt):Tt=t[216],Tt}function Ae(e){return(0,v.jsx)(`li`,{children:(0,v.jsx)(`code`,{className:`text-foreground/80`,children:e})},e)}function je(e){e.preventDefault()}function Me(e){e.preventDefault()}function Ne(){return m.request()}function Pe(e){return Ce(e,null).state}function Fe(e){return Se(e,null)}function Ie(e){return _e(e,null)}function Le(){return null}export{y as ShareBranchSwitchDialog};