@inkeep/open-knowledge 0.85.0-beta.8 → 0.85.0

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 (173) hide show
  1. package/dist/assets/skills/project/references/doc-editing.md +1 -3
  2. package/dist/cli.mjs +58 -58
  3. package/dist/constants-TNJVUahv.mjs +1 -0
  4. package/dist/{dist-C88EFTff.mjs → dist-4xO55Yaw.mjs} +1 -1
  5. package/dist/dist-Bkpf6l5f.mjs +2212 -0
  6. package/dist/index.d.mts +1 -33
  7. package/dist/index.mjs +209 -209
  8. package/dist/init-CVCNY4Ls.mjs +1 -0
  9. package/dist/{init-D7PlEegF.mjs → init-DkjNMYlz.mjs} +9 -9
  10. package/dist/{launch-json-removal-D9SwwoqN.mjs → launch-json-removal-a4E1YMn5.mjs} +1 -1
  11. package/dist/loader-DRmyM_aE.mjs +1 -0
  12. package/dist/{loader-B6EbvYkG.mjs → loader-ucwkbXZa.mjs} +1 -1
  13. package/dist/{md-manager-BGnqyqi1-BXD2ehDb.mjs → md-manager-BGnqyqi1-CDSS__qm.mjs} +125 -125
  14. package/dist/{open-browser-Dz0M-5l3.mjs → open-browser-sLXj2Tjq.mjs} +1 -1
  15. package/dist/parse-worker.mjs +1 -1
  16. package/dist/{preview-BEmA3MKx.mjs → preview-D_ZiJu7g.mjs} +1 -1
  17. package/dist/preview-Dcj4w_f3.mjs +1 -0
  18. package/dist/public/assets/{AccountSection-CAc6UOnq.js → AccountSection-BEKd-tkM.js} +1 -1
  19. package/dist/public/assets/{ActivityModeContent-DJynIwUP.js → ActivityModeContent-DrbbsE_-.js} +1 -1
  20. package/dist/public/assets/{AddPropertiesButton-DbEuq3sM.js → AddPropertiesButton-DoCpp2QW.js} +2 -2
  21. package/dist/public/assets/{AgentConnectionsSection-PbNqCjhO.js → AgentConnectionsSection-BOlCjbB0.js} +1 -1
  22. package/dist/public/assets/{AgentDiffPane-D1R52IAC.js → AgentDiffPane-CtNtZb9V.js} +1 -1
  23. package/dist/public/assets/{AttachmentsSection-CwzmF_oJ.js → AttachmentsSection-DackfQ_s.js} +1 -1
  24. package/dist/public/assets/{AuthModal-B97W2kBc.js → AuthModal-7ZC-1yVV.js} +1 -1
  25. package/dist/public/assets/{CodeMirrorPropInput-CIKjKCws.js → CodeMirrorPropInput-DvKu95Lo.js} +3 -3
  26. package/dist/public/assets/{ContentRulesSection-qOrpB7KF.js → ContentRulesSection-DtplCATO.js} +1 -1
  27. package/dist/public/assets/{DiffViewBoundary-CukzuN1M.js → DiffViewBoundary-Cue9UIPe.js} +1 -1
  28. package/dist/public/assets/{DocumentContext-Dpy4ql5Q.js → DocumentContext-BH42QH54.js} +4 -4
  29. package/dist/public/assets/{EditorModeToggle-DTbhRtHs.js → EditorModeToggle-DnKwTnbn.js} +1 -1
  30. package/dist/public/assets/{ExcalidrawDocEditor-B2xUOvkW.js → ExcalidrawDocEditor-Bgw6T9Fb.js} +1 -1
  31. package/dist/public/assets/FeedbackForm-h13skg8D.js +1 -0
  32. package/dist/public/assets/{GraphPanel-CbRFSjv5.js → GraphPanel-BmqiikMo.js} +2 -2
  33. package/dist/public/assets/{ImageAttachments-DmZlAyNH.js → ImageAttachments-Dd_h_7LM.js} +1 -1
  34. package/dist/public/assets/{ImportSkillDialog-CyfVZKqf.js → ImportSkillDialog-C4_lHSx9.js} +1 -1
  35. package/dist/public/assets/{LinkPreviewsSection-CF_3Yekj.js → LinkPreviewsSection-DQxmONPl.js} +1 -1
  36. package/dist/public/assets/{LintConfigEditor-CHV8ivfk.js → LintConfigEditor-BMxjC7yE.js} +1 -1
  37. package/dist/public/assets/{LintingSection-BRRp1vEf.js → LintingSection-B-IUi1Qd.js} +1 -1
  38. package/dist/public/assets/ManagedArtifactProperties-Bl8aGLz1.js +1 -0
  39. package/dist/public/assets/{ManagedArtifactProperties-DbGm48tE.js → ManagedArtifactProperties-Jf0t9Hbp.js} +1 -1
  40. package/dist/public/assets/{MermaidDocEditor-Cg5l17ho.js → MermaidDocEditor-CRbSyiuH.js} +1 -1
  41. package/dist/public/assets/{NetworkAccessSection-CWnE5RB-.js → NetworkAccessSection-DJggS7b-.js} +1 -1
  42. package/dist/public/assets/{OkignoreSection-Dg2isYSX.js → OkignoreSection-DYAQ4Haz.js} +1 -1
  43. package/dist/public/assets/{PageListContext-B4oUr1KZ.js → PageListContext-DgTeRFU-.js} +1 -1
  44. package/dist/public/assets/{ProjectTemplatesSection-BQRFn0aR.js → ProjectTemplatesSection-oiahzFKw.js} +1 -1
  45. package/dist/public/assets/{PropertyDisplayRow-DPpqKedg.js → PropertyDisplayRow-D4PvPcj8.js} +1 -1
  46. package/dist/public/assets/{PublishToGitHubDialog-C8Z4c1cR.js → PublishToGitHubDialog-DW5fQKKa.js} +1 -1
  47. package/dist/public/assets/{RegisteredAgentIcon-CNf09bvo.js → RegisteredAgentIcon-DKZ8eOKZ.js} +1 -1
  48. package/dist/public/assets/{ReportBugDialogBody-DokEvc7U.js → ReportBugDialogBody-DoHfZBJP.js} +1 -1
  49. package/dist/public/assets/{ReportBugMenuTrigger-BSorqVCo.js → ReportBugMenuTrigger-B7ha_vzT.js} +1 -1
  50. package/dist/public/assets/{SchemaConfigEditor-DqdcRzYD.js → SchemaConfigEditor-NA0BTi-e.js} +1 -1
  51. package/dist/public/assets/{SearchSection-BQFA9q-a.js → SearchSection-Cr2ZiTwI.js} +1 -1
  52. package/dist/public/assets/{SessionsHost-5rMutJWH.js → SessionsHost-DFL-snqS.js} +2 -2
  53. package/dist/public/assets/{SettingsDialogBody-CRRd_5fA.js → SettingsDialogBody-M1HGNylA.js} +2 -2
  54. package/dist/public/assets/{ShareBranchSwitchDialog-BVpHAvAz.js → ShareBranchSwitchDialog-BqfHGl0s.js} +1 -1
  55. package/dist/public/assets/{ShareReceiveDialog-DuE0Io5t.js → ShareReceiveDialog-CxPIsiXq.js} +1 -1
  56. package/dist/public/assets/{ShareReceiveMissDialog-WEyChUmK.js → ShareReceiveMissDialog-BxMzxo4C.js} +1 -1
  57. package/dist/public/assets/{SkillCostValue-BAFvtN-A.js → SkillCostValue-DPX8ruMM.js} +1 -1
  58. package/dist/public/assets/{SkillForkDialog-DK0im2ZH.js → SkillForkDialog-BB_XS1nP.js} +1 -1
  59. package/dist/public/assets/{SkillInstallMenu-BVEHbRUy.js → SkillInstallMenu-CAjgsxCn.js} +1 -1
  60. package/dist/public/assets/{SkillOriginInline-CeyDfqua.js → SkillOriginInline-D1tWqOqr.js} +1 -1
  61. package/dist/public/assets/{SkillToolbarControls-GO9DY9uH.js → SkillToolbarControls-BnM0BcVL.js} +1 -1
  62. package/dist/public/assets/{SkillsManagerSection-BY_rUJ96.js → SkillsManagerSection-B0OJHWNm.js} +1 -1
  63. package/dist/public/assets/{SlidesPluginSection-qj2ynzJw.js → SlidesPluginSection-Bi8J2lVH.js} +1 -1
  64. package/dist/public/assets/{SlidesToolbarControls-OD5hTRCr.js → SlidesToolbarControls-CqXBuf70.js} +1 -1
  65. package/dist/public/assets/{SourceEditor-DwYtJEqZ.js → SourceEditor-DdxSAmDx.js} +1 -1
  66. package/dist/public/assets/{SpellingSettings-BvzNDT7g.js → SpellingSettings-Dkdy9B2q.js} +1 -1
  67. package/dist/public/assets/{SyncSection-CSV4Q3-z.js → SyncSection-DH3epVLR.js} +1 -1
  68. package/dist/public/assets/{SyncStatusBadge-DmKujoEJ.js → SyncStatusBadge-DrRCeCvZ.js} +1 -1
  69. package/dist/public/assets/{TemplateRow-PUB19e3g.js → TemplateRow-DoNZxhIJ.js} +1 -1
  70. package/dist/public/assets/{TerminalLaunchContext-DncO203O.js → TerminalLaunchContext-Cwrrh5Ck.js} +1 -1
  71. package/dist/public/assets/{TerminalPanel-CNyrqROa.js → TerminalPanel-C5LSq4fA.js} +1 -1
  72. package/dist/public/assets/{TerminalSection-CRjm8wzK.js → TerminalSection-DU8swJ-Q.js} +1 -1
  73. package/dist/public/assets/{TerminalWindowApp-5Yzprb2g.js → TerminalWindowApp-CeS0EeFD.js} +1 -1
  74. package/dist/public/assets/{TextDocEditor-Baf4tcry.js → TextDocEditor-DR9-rMdW.js} +1 -1
  75. package/dist/public/assets/{ThemePluginSection-C4i43nY3.js → ThemePluginSection-BT1NQe1R.js} +2 -2
  76. package/dist/public/assets/{ThreadView-hUBkJ35P.js → ThreadView-Cp69nJvv.js} +1 -1
  77. package/dist/public/assets/{TimelineDiffPane-BohOVaCv.js → TimelineDiffPane-BfAbyPCH.js} +1 -1
  78. package/dist/public/assets/_envelope-g8Le8UBe-6j_3zVcA.js +1 -0
  79. package/dist/public/assets/{agent-connections-Dj9-89rY.js → agent-connections-CykO_Ezy.js} +1 -1
  80. package/dist/public/assets/{agent-registry-CUdBP9oP.js → agent-registry-pREadnY_.js} +1 -1
  81. package/dist/public/assets/{bridge-D0M08jrS.js → bridge-D8Oy74FE.js} +3 -3
  82. package/dist/public/assets/{card-13ChSYBD.js → card-DJoKetZ9.js} +1 -1
  83. package/dist/public/assets/{catalog-eC0BYrwO.js → catalog-CJ_rs_wb.js} +1 -1
  84. package/dist/public/assets/{client-version-BpvzLe36.js → client-version-09D8u2lP.js} +1 -1
  85. package/dist/public/assets/{comment-chips-CZj3Fghj.js → comment-chips-aOK6IXhP.js} +1 -1
  86. package/dist/public/assets/{config-provider-OflyhMYP.js → config-provider-m9Ao-f9D.js} +2 -2
  87. package/dist/public/assets/config-schema-Dh_H8E-u.js +1 -0
  88. package/dist/public/assets/{css-color-to-hex-9GaMLm_g.js → css-color-to-hex-Cjxd2Xbp.js} +1 -1
  89. package/dist/public/assets/{diagnostic-breadcrumb-DPgUDxA8.js → diagnostic-breadcrumb-Cr0C15nJ.js} +1 -1
  90. package/dist/public/assets/{doc-undo-manager-lMyCDpKw.js → doc-undo-manager-BNDPNoYq.js} +1 -1
  91. package/dist/public/assets/field-controls-C6S4B1Im.js +1 -0
  92. package/dist/public/assets/{field-controls-Dzoda-yy.js → field-controls-DSwLWrMh.js} +1 -1
  93. package/dist/public/assets/{file-tree-adapter-0APd5Uqe.js → file-tree-adapter-BeSKxnyg.js} +1 -1
  94. package/dist/public/assets/{file-tree-utils-BPUSn1l0.js → file-tree-utils-DUpeRMj2.js} +1 -1
  95. package/dist/public/assets/folder-config-api-Db5-uEQR.js +1 -0
  96. package/dist/public/assets/{frontmatter-tags-BEkbJ1mW.js → frontmatter-tags-CoOxl3mC.js} +1 -1
  97. package/dist/public/assets/{handoff-Ccrokk1b.js → handoff-pwpLEUcJ.js} +1 -1
  98. package/dist/public/assets/{index-CtLXsR8v.js → index-EQxoHYsz.js} +13 -13
  99. package/dist/public/assets/{lint-config-client-DNaT4xzp.js → lint-config-client-DDZrpVHz.js} +1 -1
  100. package/dist/public/assets/{lint-plugins-Denw4h4y.js → lint-plugins-DjZCf7i3.js} +1 -1
  101. package/dist/public/assets/{markdown-lint-Bm1176Wf.js → markdown-lint-DeZBsw3J.js} +3 -3
  102. package/dist/public/assets/{markdownlint-rule-browser-0hwXUugA.js → markdownlint-rule-browser-60Esn3tM.js} +1 -1
  103. package/dist/public/assets/{navigation-targets-CcY2FHJZ.js → navigation-targets-DTSxcGor.js} +1 -1
  104. package/dist/public/assets/{page-list-cache-B9RqU_KB.js → page-list-cache-BNFVKu-D.js} +1 -1
  105. package/dist/public/assets/parse-api-error-B5EVRh3T.js +1 -0
  106. package/dist/public/assets/{pending-receive-nav-store-ienh9z35.js → pending-receive-nav-store-CTKqE4f9.js} +1 -1
  107. package/dist/public/assets/{perf-CPPbaRwr.js → perf-DZJpLc5j.js} +1 -1
  108. package/dist/public/assets/{preferred-session-events-DXwjk8-J.js → preferred-session-events-D3VKdVs1.js} +1 -1
  109. package/dist/public/assets/{progress-70K6FIt8.js → progress-BUhjQpqL.js} +1 -1
  110. package/dist/public/assets/{receive-store-CnWTih4w.js → receive-store-O9cRwWtJ.js} +1 -1
  111. package/dist/public/assets/saved-themes-client-ByYw6oZt.js +1 -0
  112. package/dist/public/assets/{schema-section-DFiSaK5s.js → schema-section-C8DGjvNX.js} +1 -1
  113. package/dist/public/assets/schemas-api-CQHNNDP6.js +112 -0
  114. package/dist/public/assets/{selection-context-DYdSNd6N.js → selection-context-CXQ2g-vC.js} +1 -1
  115. package/dist/public/assets/{skills-api-B9YEcMtk.js → skills-api-B7NWq2mZ.js} +1 -1
  116. package/dist/public/assets/{src-DQAsmuTd.js → src-BW92GkqF.js} +1 -1
  117. package/dist/public/assets/{startup-marks-YB3zPCjL.js → startup-marks-aftNzVFI.js} +1 -1
  118. package/dist/public/assets/storage-scope-lp6Y3sn1.js +1 -0
  119. package/dist/public/assets/{tag-pill-input-CUjBNOlr.js → tag-pill-input-C9tJ_ebG.js} +1 -1
  120. package/dist/public/assets/{target-navigation-intent-OCgrT_rG.js → target-navigation-intent-D7IZjXLN.js} +1 -1
  121. package/dist/public/assets/{telemetry-impl-Qt0R8fsM.js → telemetry-impl-BGTG-dVN.js} +1 -1
  122. package/dist/public/assets/{telemetry-startup-CpnPkk1U.js → telemetry-startup-Dnz5Cf32.js} +1 -1
  123. package/dist/public/assets/terminal-cli-display-Bn8rI2FY.js +1 -0
  124. package/dist/public/assets/{terminal-command-events-YJjbnpwG.js → terminal-command-events-DYVYsw0p.js} +1 -1
  125. package/dist/public/assets/{terminal-launch-events-C_GWUJjY.js → terminal-launch-events-C1I24zal.js} +1 -1
  126. package/dist/public/assets/{typing-burst-detector-zGdk134c.js → typing-burst-detector-DiJWNHNK.js} +2 -2
  127. package/dist/public/assets/{use-activity-panel-DfL_rV-q.js → use-activity-panel-ZGbJVtoL.js} +1 -1
  128. package/dist/public/assets/{use-apply-config-color-theme-D0H8BLH0.js → use-apply-config-color-theme-B9f6n0Cd.js} +2 -2
  129. package/dist/public/assets/{use-conflicts-CIO4TSqq.js → use-conflicts-BJFBAg9M.js} +1 -1
  130. package/dist/public/assets/{use-installed-clis-CTgVOGN1.js → use-installed-clis-98lB00dU.js} +2 -2
  131. package/dist/public/assets/{use-live-xterm-theme-D4ySF_-p.js → use-live-xterm-theme-CMmPbV7u.js} +1 -1
  132. package/dist/public/assets/{use-open-skill-DfkvZ_Bu.js → use-open-skill-Nru-PAlE.js} +1 -1
  133. package/dist/public/assets/{use-semantic-search-status-CRBCNkG6.js → use-semantic-search-status-Cqw3SIgk.js} +1 -1
  134. package/dist/public/assets/{use-skill-origin-C4Hj71IE.js → use-skill-origin-f6iU7bK5.js} +1 -1
  135. package/dist/public/assets/{use-skill-targets-9Csbq0fG.js → use-skill-targets-CcZTp1aJ.js} +1 -1
  136. package/dist/public/assets/{use-skills-BzbDGc60.js → use-skills-D4I9tjyB.js} +1 -1
  137. package/dist/public/assets/{use-terminal-enabled-CI-0DBdj.js → use-terminal-enabled-DnnXtaEs.js} +1 -1
  138. package/dist/public/assets/{use-timeline-entry-diff-RE38BXhc.js → use-timeline-entry-diff-Bu0jft5W.js} +2 -2
  139. package/dist/public/assets/{use-workspace-eebQ7TvN.js → use-workspace-CF2-WOaH.js} +1 -1
  140. package/dist/public/index.html +70 -70
  141. package/dist/{registry-probes-BH2uw5Jf.mjs → registry-probes-CRUm2aMY.mjs} +3 -3
  142. package/dist/{removal-file-path-BuUAo5vC.mjs → removal-file-path-DVMcCry_.mjs} +1 -1
  143. package/dist/{repair-launch-json-BozJA4K5.mjs → repair-launch-json-DOfAd3oZ.mjs} +1 -1
  144. package/dist/{repair-mcp-configs-D8UQE5Ig.mjs → repair-mcp-configs-C4c5EcIG.mjs} +1 -1
  145. package/dist/src-CNTwiJdN.mjs +14 -0
  146. package/dist/src-DkLULCOE.mjs +1 -0
  147. package/dist/start-C3Psdi4z.mjs +1 -0
  148. package/dist/{start-DdbwQecd.mjs → start-DxGMMch9.mjs} +3 -3
  149. package/package.json +4 -4
  150. package/dist/constants-6nYvEHuj.mjs +0 -1
  151. package/dist/dist-Dizk2k7y.mjs +0 -2212
  152. package/dist/init-CUuZYRCr.mjs +0 -1
  153. package/dist/loader-DO_qCug3.mjs +0 -1
  154. package/dist/preview-CbAbyGAf.mjs +0 -1
  155. package/dist/public/assets/FeedbackForm-DhmoszxQ.js +0 -1
  156. package/dist/public/assets/ManagedArtifactProperties-kzAj26e2.js +0 -1
  157. package/dist/public/assets/_envelope-DwyyiIO_-B2czcEJX.js +0 -1
  158. package/dist/public/assets/config-schema-C_UAFDLp.js +0 -1
  159. package/dist/public/assets/field-controls-nUgQuwqO.js +0 -1
  160. package/dist/public/assets/folder-config-api-CVKiiPvW.js +0 -1
  161. package/dist/public/assets/parse-api-error-CeEVOj25.js +0 -1
  162. package/dist/public/assets/saved-themes-client-DfS9q8l3.js +0 -1
  163. package/dist/public/assets/schemas-api-DbKS2FSh.js +0 -112
  164. package/dist/public/assets/storage-scope-DTSZLReS.js +0 -1
  165. package/dist/public/assets/terminal-cli-display-Dfy7Rj7j.js +0 -1
  166. package/dist/src-BVRsIRXH.mjs +0 -14
  167. package/dist/src-W8Lzxzm1.mjs +0 -1
  168. package/dist/start-NiFudUEJ.mjs +0 -1
  169. /package/dist/public/assets/{constants-github-B7yhDvQc.js → constants-github-DOek7bCt.js} +0 -0
  170. /package/dist/public/assets/{doc-extensions-CcO7K8uD-DG9uHV54.js → doc-extensions-CcO7K8uD-B004ggqh.js} +0 -0
  171. /package/dist/public/assets/{logging-renderer-log-CqIZVUIQ.js → logging-renderer-log-Bvxj7ztp.js} +0 -0
  172. /package/dist/public/assets/{share-D-LUU2aX-B7Yg0G_m.js → share-D-LUU2aX-DfD-mrg-.js} +0 -0
  173. /package/dist/public/assets/{util-doc-name-DRKmy6g9.js → util-doc-name-D-_o-n0R.js} +0 -0
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./AboutSection-D_23z-dF.js","./chunk-CYidjpOJ.js","./dist-Nvb76hAm.js","./jsx-runtime-BUgB2tll.js","./react-f2sANaYj.js","./arrow-up-right-nJaICi16.js","./createLucideIcon-DdBzwsHe.js","./spinner-Bx8xD6f8.js","./compiler-runtime-BfE3aGVn.js","./utils-CPqDy6Hr.js","./bundle-mjs-SHeFpKGC.js","./SettingsSectionHeader-D-JSH4bX.js","./tooltip-DBqLYfio.js","./dist-YVu4MRkZ2.js","./floating-ui.dom-DkPPH5vF.js","./dist-DTFuvKje.js","./dist-CSCUSbQc.js","./react-dom-DPxgxlDT.js","./dist-CRjqnzU7.js","./dist-CxbWbOvU.js","./badge-DmdA1C7r.js","./dist-BsJYDohW.js","./external-link-CldCnbtR.js","./button-DzgjsZzC.js","./SharingSection-XR4AeJT9.js","./radio-group-G1GR05Rb.js","./dist-uiDX6Nr9.js","./dist-BKgU0kag.js","./dist-DBXmXNZF.js","./dist-BGzUo_18.js","./ConfigSharingInfoTooltip-B2YLIcK1.js","./info-CyR0W2SK.js","./skeleton-BPb29aFG.js","./AccountSection-CAc6UOnq.js","./label-CvMpFFbN.js","./SyncStatusBadge-DmKujoEJ.js","./config-provider-OflyhMYP.js","./trace-api-BjgnT4Mc.js","./status-SIkheD7g.js","./dist-PQ5KMVDh.js","./schemas-api-DbKS2FSh.js","./schemas-B93JY9Ef.js","./_envelope-DwyyiIO_-B2czcEJX.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-BujW07bM.js","./constants-editors-DLxv8SuP.js","./constants-product-C4Nt9vD3.js","./use-apply-config-language-CdocdaSu.js","./preload-helper-Chd9yIcd.js","./dist-C_FzPxEX2.js","./messages-B6BYNmqo.js","./client-version-BpvzLe36.js","./css-color-to-hex-9GaMLm_g.js","./use-apply-config-color-theme-D0H8BLH0.js","./use-apply-config-theme-CYFG76sS.js","./saved-themes-client-DfS9q8l3.js","./constants-upload-CVKO8P4d.js","./select-Bu4Wm3Rf.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-DGH1_U0o.js","./terminal-command-events-YJjbnpwG.js","./handoff-Ccrokk1b.js","./dialog-BJEjKJjL.js","./electron-drag-strip-D9GZhMg_.js","./x-DM2drskU.js","./popover-BhiLJhH5.js","./dist-D1AbXGbs.js","./use-conflicts-CIO4TSqq.js","./documents-events-ckNvVQCr.js","./schemas-cc1-DNrPPikD.js","./config-errors-tVoeK4OC.js","./use-git-sync-status-DPG8QuKs.js","./doc-hash-BJkweiX9.js","./use-settings-route-CikTq5Vq.js","./keyboard-shortcuts-FtScAm_I.js","./dist-Dc8tD1th.js","./w3c-keyname-C7Rznu6R.js","./trash-2-CchZ0T47.js","./AuthModal-B97W2kBc.js","./copy-DpWa6i2v.js","./input-C-Qm8YDT.js","./auth-state-cache-fRITSReW.js","./AgentConnectionsSection-PbNqCjhO.js","./switch-BKZTXkzu.js","./useQuery-ZeEDLtxh.js","./RegisteredAgentIcon-CNf09bvo.js","./cursor-B6reg1lS.js","./agent-registry-CUdBP9oP.js","./search-CFu4WXqc.js","./TerminalLaunchContext-DncO203O.js","./agent-connections-Dj9-89rY.js","./alert-dialog-BA3e7-10.js","./checkbox-CKD8LETI.js","./minus-DdRxss3A.js","./folder-QqUoFRPR.js","./monitor-IXzxTnmk.js","./sparkles-BS2TX_Um.js","./AgentIconCluster-Qf_VPGzc.js","./OpenInAgentMenuItem-Bd9Zl2ks.js","./dropdown-menu-DtLu9NwU.js","./dist-UouvQIiM.js","./dist-d0R4nnoB.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-DTSZLReS.js","./bridge-D0M08jrS.js","./structural-freshness-CIbkMFA3-CWi_lyiW.js","./terminal-cli-display-Dfy7Rj7j.js","./settings-section-labels-BA8paawN.js","./catalog-eC0BYrwO.js","./use-workspace-eebQ7TvN.js","./AttachmentsSection-CwzmF_oJ.js","./field-controls-Dzoda-yy.js","./toggle-group-B7p69Qfd.js","./circle-alert-eBm4JPxY.js","./ThemePicker-pc5gwEur.js","./plus-zPnYzcqL.js","./rotate-ccw-Zi1IjIg9.js","./form-BGyym9kP.js","./textarea-CMYJSlFq.js","./config-schema-C_UAFDLp.js","./config-validation-events-01z0iLZK.js","./ContentRulesSection-qOrpB7KF.js","./markdown-lint-Bm1176Wf.js","./lib-QQS1Brzc.js","./ccount-BoHE53_k.js","./syntax-CKL08zSk.js","./markdownit-Cn1WWq3J.js","./field-controls-nUgQuwqO.js","./HotkeysSection-BroWUkWa.js","./settings-host-gates-BdPynUVr.js","./kbd-Cg1nrB7U.js","./IntegrationsSection-Bem--yGZ.js","./InstallInClaudeDesktopDialog-DNy01p3t.js","./arrow-right-NOQZeKIW.js","./circle-check-nK1yRBIw.js","./download-BouT3__0.js","./LinkPreviewsSection-CF_3Yekj.js","./LintingSection-BRRp1vEf.js","./CodeMirrorPropInput-CIKjKCws.js","./dist-DseqKdAU.js","./dist-D2SphF3p.js","./dist-CjyZozAk.js","./dist-BxTTaZ5o.js","./dist-C2Kstufe.js","./dist-BvhrN0Uj.js","./dist-DKYEqMZn.js","./dist-D5mDCusD.js","./dist-BpU-J2LR.js","./dist-BkE9d74i.js","./stex-CUzil_LB.js","./lib-DlDYgFfS.js","./space-separated-tokens-l9yufOSK.js","./trim-lines-DfV8CCf7.js","./folder-open-COGOeTzI.js","./with-selector-zVo3Fruj.js","./navigation-targets-CcY2FHJZ.js","./file-tree-utils-BPUSn1l0.js","./doc-paths-cEiFVCxr.js","./cm-theme-Cvtw80TE.js","./page-list-cache-B9RqU_KB.js","./documents-fetch-Y7Dt9_Tn.js","./note-window-mode-CI3Yju9B.js","./DocumentContext-Dpy4ql5Q.js","./propagation-api-BP58TooP.js","./context-api-D2PVlCLE.js","./lib-JGveGkyb.js","./lib-TFtgHRaJ.js","./lib-7Zm1Z07d.js","./git-branch-CeTudSak.js","./Mermaid-CprZhBlA.js","./maximize-2-DjzhPUDZ.js","./frontmatter-tags-BEkbJ1mW.js","./prop-types-ZtKgQMRh.js","./hash-C4CJQURT.js","./local-menu-action-bus-Dyh2UJJF.js","./paperclip-BHdV1F_7.js","./react-error-boundary-6ac6QM6R.js","./CopyButton-BGYz3S5f.js","./PageListContext-B4oUr1KZ.js","./parse-api-error-CeEVOj25.js","./startup-marks-YB3zPCjL.js","./perf-CPPbaRwr.js","./diagnostic-breadcrumb-DPgUDxA8.js","./file-tree-rename-validation-CQF8z42p.js","./use-collab-url-DPmF-V5e.js","./excalidraw-scene-WvG0vu5I.js","./known-skill-dirs-DtxJ8qaH.js","./skill-scope-N3jmnGIX.js","./skills-api-B9YEcMtk.js","./DocumentContext-B0sQn39F.css","./lint-plugin-meta-CtDE2R0v.js","./square-pen-BoydeSu6.js","./DeleteConfirmationDialog-CCv72H-k.js","./card-13ChSYBD.js","./SkillInstallMenu-BVEHbRUy.js","./ChangedOutsideBadge-Yx_v8aj4.js","./context-menu-CKOBjlWm.js","./dist-ecS2llwR.js","./use-skills-BzbDGc60.js","./use-skill-targets-9Csbq0fG.js","./markdownlint-rule-browser-0hwXUugA.js","./tag-pill-input-CUjBNOlr.js","./lint-config-client-DNaT4xzp.js","./use-open-skill-DfkvZ_Bu.js","./open-managed-artifact-tab-2lsv2g--.js","./schema-fields-view-intent-CGV401S6.js","./NetworkAccessSection-CWnE5RB-.js","./restart-collab-server-BLCoCY2a.js","./OkignoreSection-Dg2isYSX.js","./sortable.esm-BdFZmZc5.js","./grip-vertical-DNbkgWZL.js","./config-ignore-nested-error-events-9jefebwW.js","./ProjectTemplatesSection-BQRFn0aR.js","./TemplateRow-PUB19e3g.js","./file-plus-DKxOZh2k.js","./folder-config-api-CVKiiPvW.js","./SearchSection-BQFA9q-a.js","./use-semantic-search-status-CRBCNkG6.js","./SkillsManagerSection-BY_rUJ96.js","./SlidesPluginSection-qj2ynzJw.js","./input-group-MLVCQYFm.js","./SyncSection-CSV4Q3-z.js","./PublishToGitHubDialog-C8Z4c1cR.js","./clipboard-adapter-DOdbK8py.js","./TerminalSection-CRjm8wzK.js","./use-terminal-enabled-CI-0DBdj.js","./terminal-telemetry-DkL8V654.js","./ThemePluginSection-C4i43nY3.js","./schema-section-DFiSaK5s.js","./settings-fields-DLfIBRfX.js","./lint-plugins-Denw4h4y.js","./OkCliPathRow-BtSsFiGL.js","./SpellingSettings-BvzNDT7g.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{n as c,r as l,t as u}from"./alert-CF8zw7ni.js";import{t as d}from"./lazy-with-preload-vPXQq10U.js";import{r as f}from"./settings-host-gates-BdPynUVr.js";import{n as p}from"./settings-fields-DLfIBRfX.js";import{t as m}from"./SettingsSectionHeader-D-JSH4bX.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-D_23z-dF.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]),import.meta.url)).AboutSection),b=v(async()=>(await t(async()=>{let{SharingSection:e}=await import(`./SharingSection-XR4AeJT9.js`);return{SharingSection:e}},__vite__mapDeps([24,1,2,3,4,25,15,16,17,26,27,28,18,8,9,10,29,30,12,13,14,19,31,6,11,5,20,21,22,23,32]),import.meta.url)).SharingSection),x=v(async()=>(await t(async()=>{let{AccountSection:e}=await import(`./AccountSection-CAc6UOnq.js`);return{AccountSection:e}},__vite__mapDeps([33,1,2,3,4,34,15,16,17,8,9,10,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,29,55,56,57,58,59,60,61,62,13,14,18,26,19,63,12,28,6,64,65,66,67,5,68,69,70,7,71,72,73,74,75,76,20,21,23,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,22,11,32,96]),import.meta.url)).AccountSection),S=v(async()=>(await t(async()=>{let{AgentConnectionsSection:e}=await import(`./AgentConnectionsSection-PbNqCjhO.js`);return{AgentConnectionsSection:e}},__vite__mapDeps([97,1,54,2,3,4,98,15,16,17,28,18,8,9,10,99,6,5,100,101,102,40,41,42,43,44,45,46,47,48,49,50,51,76,64,7,103,73,104,105,106,78,19,63,23,21,107,108,34,12,13,14,109,31,110,111,79,112,113,114,115,116,26,27,68,39,117,118,119,20,77,120,121,122,123,124,125,126,127,128,11,22,129,95,130,131]),import.meta.url)).AgentConnectionsSection),C=v(async()=>(await t(async()=>{let{AttachmentsSection:e}=await import(`./AttachmentsSection-CwzmF_oJ.js`);return{AttachmentsSection:e}},__vite__mapDeps([132,1,36,37,38,39,4,8,3,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,29,17,55,56,57,58,59,2,60,61,62,13,14,15,16,18,26,19,63,12,9,10,28,6,64,65,133,98,134,27,21,135,136,25,110,137,138,92,73,139,34,23,77,78,79,120,121,95,32,140,85,141,11,5,20,22,142]),import.meta.url)).AttachmentsSection),w=v(async()=>(await t(async()=>{let{ContentRulesSection:e}=await import(`./ContentRulesSection-qOrpB7KF.js`);return{ContentRulesSection:e}},__vite__mapDeps([143,36,1,37,38,39,4,8,3,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,29,17,55,56,57,58,59,2,60,61,62,13,14,15,16,18,26,19,63,12,9,10,28,6,64,65,34,98,144,145,146,147,148,11,5,20,21,22,85]),import.meta.url)).ContentRulesSection),T=v(async()=>(await t(async()=>{let{SectionSkeleton:e}=await import(`./field-controls-nUgQuwqO.js`);return{SectionSkeleton:e}},__vite__mapDeps([149,133,1,2,3,4,37,62,13,14,15,16,17,18,26,19,63,12,8,9,10,28,6,64,65,98,134,27,21,135,136,25,110,59,39,137,138,92,73,139,34,29,40,41,42,43,44,45,46,47,48,49,50,51,23,77,78,79,120,121,95,32,140,52,53,54,55,58,60,61,85,141]),import.meta.url)).SectionSkeleton),E=v(async()=>(await t(async()=>{let{HotkeysSection:e}=await import(`./HotkeysSection-BroWUkWa.js`);return{HotkeysSection:e}},__vite__mapDeps([150,2,1,3,4,8,11,12,13,14,15,16,17,18,19,9,10,5,6,20,21,22,151,152,89,90,91]),import.meta.url)).HotkeysSection),D=v(async()=>(await t(async()=>{let{IntegrationsSection:e}=await import(`./IntegrationsSection-Bem--yGZ.js`);return{IntegrationsSection:e}},__vite__mapDeps([153,1,2,3,4,154,6,155,156,94,157,7,8,9,10,29,17,23,16,21,77,78,15,19,63,79,22,11,12,13,14,18,5,20]),import.meta.url)).IntegrationsSection),O=v(async()=>(await t(async()=>{let{LinkPreviewsSection:e}=await import(`./LinkPreviewsSection-CF_3Yekj.js`);return{LinkPreviewsSection:e}},__vite__mapDeps([158,1,36,37,38,39,4,8,3,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,29,17,55,56,57,58,59,2,60,61,98,15,16,28,18,9,10,11,12,13,14,19,5,6,20,21,22,23,77,78,63,79,85]),import.meta.url)).LinkPreviewsSection),k=v(async()=>(await t(async()=>{let{MarkdownlintPluginSection:e}=await import(`./LintingSection-BRRp1vEf.js`);return{MarkdownlintPluginSection:e}},__vite__mapDeps([159,1,160,53,161,162,91,163,164,165,166,167,168,169,170,171,14,36,37,38,39,4,8,3,40,41,42,43,44,45,46,47,48,49,50,51,52,54,29,17,55,56,57,58,59,2,60,61,90,145,146,172,173,174,147,6,175,92,176,177,178,179,180,181,22,87,182,183,127,106,15,16,78,19,63,23,21,10,9,34,98,28,18,184,185,186,62,13,26,12,64,65,66,187,126,188,189,190,67,191,155,192,73,77,79,68,135,156,94,157,193,69,194,195,31,7,108,196,197,137,103,111,198,199,200,83,84,85,201,202,203,204,205,20,95,152,80,81,206,207,208,209,123,210,125,131,118,211,144,148,5,212,70,213,214,74,215,107,216,114,115,116,27,109,112,113,101,117,119,217,218,219,220,221,11,222,138,120,121,32,223,224,225,226,227,88,89]),import.meta.url)).MarkdownlintPluginSection),A=v(async()=>(await t(async()=>{let{ProjectPluginsManageSection:e}=await import(`./LintingSection-BRRp1vEf.js`);return{ProjectPluginsManageSection:e}},__vite__mapDeps([159,1,160,53,161,162,91,163,164,165,166,167,168,169,170,171,14,36,37,38,39,4,8,3,40,41,42,43,44,45,46,47,48,49,50,51,52,54,29,17,55,56,57,58,59,2,60,61,90,145,146,172,173,174,147,6,175,92,176,177,178,179,180,181,22,87,182,183,127,106,15,16,78,19,63,23,21,10,9,34,98,28,18,184,185,186,62,13,26,12,64,65,66,187,126,188,189,190,67,191,155,192,73,77,79,68,135,156,94,157,193,69,194,195,31,7,108,196,197,137,103,111,198,199,200,83,84,85,201,202,203,204,205,20,95,152,80,81,206,207,208,209,123,210,125,131,118,211,144,148,5,212,70,213,214,74,215,107,216,114,115,116,27,109,112,113,101,117,119,217,218,219,220,221,11,222,138,120,121,32,223,224,225,226,227,88,89]),import.meta.url)).ProjectPluginsManageSection),j=v(async()=>(await t(async()=>{let{UserPluginsManageSection:e}=await import(`./LintingSection-BRRp1vEf.js`);return{UserPluginsManageSection:e}},__vite__mapDeps([159,1,160,53,161,162,91,163,164,165,166,167,168,169,170,171,14,36,37,38,39,4,8,3,40,41,42,43,44,45,46,47,48,49,50,51,52,54,29,17,55,56,57,58,59,2,60,61,90,145,146,172,173,174,147,6,175,92,176,177,178,179,180,181,22,87,182,183,127,106,15,16,78,19,63,23,21,10,9,34,98,28,18,184,185,186,62,13,26,12,64,65,66,187,126,188,189,190,67,191,155,192,73,77,79,68,135,156,94,157,193,69,194,195,31,7,108,196,197,137,103,111,198,199,200,83,84,85,201,202,203,204,205,20,95,152,80,81,206,207,208,209,123,210,125,131,118,211,144,148,5,212,70,213,214,74,215,107,216,114,115,116,27,109,112,113,101,117,119,217,218,219,220,221,11,222,138,120,121,32,223,224,225,226,227,88,89]),import.meta.url)).UserPluginsManageSection),M=v(async()=>(await t(async()=>{let{NetworkAccessSection:e}=await import(`./NetworkAccessSection-CWnE5RB-.js`);return{NetworkAccessSection:e}},__vite__mapDeps([228,1,36,37,38,39,4,8,3,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,29,17,55,56,57,58,59,2,60,61,106,15,16,78,19,63,23,21,10,9,34,25,26,27,28,18,98,11,12,13,14,5,6,20,22,95,229,85,141]),import.meta.url)).NetworkAccessSection),N=v(async()=>(await t(async()=>{let{OkignoreSection:e}=await import(`./OkignoreSection-Dg2isYSX.js`);return{OkignoreSection:e}},__vite__mapDeps([230,1,231,17,4,2,3,12,13,14,15,16,18,19,8,9,10,64,6,232,73,79,29,200,54,177,178,45,44,179,61,47,181,83,84,41,85,51,182,201,202,203,204,48,11,5,20,21,22,233,23,95,32,142]),import.meta.url)).OkignoreSection),P=v(async()=>(await t(async()=>{let{ProjectTemplatesSection:e}=await import(`./ProjectTemplatesSection-BQRFn0aR.js`);return{ProjectTemplatesSection:e}},__vite__mapDeps([234,1,2,3,4,137,6,8,235,54,106,15,16,17,78,19,63,23,21,10,9,114,115,116,13,14,18,26,27,64,68,236,92,79,29,40,41,42,43,44,45,46,47,48,49,50,51,214,7,77,120,34,121,95,140,83,84,85,237,201,11,12,5,20,22,32,226,87,88,89,90,91]),import.meta.url)).ProjectTemplatesSection),F=v(async()=>(await t(async()=>{let{SearchSection:e}=await import(`./SearchSection-BQFA9q-a.js`);return{SearchSection:e}},__vite__mapDeps([238,1,36,37,38,39,4,8,3,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,29,17,55,56,57,58,59,2,60,61,66,15,16,98,28,18,9,10,68,6,239,83,84,85,11,12,13,14,19,5,20,21,22,23,77,78,63,79,120,34,121,95,141]),import.meta.url)).SearchSection),I=v(async()=>(await t(async()=>{let{SkillsManagerSection:e}=await import(`./SkillsManagerSection-BY_rUJ96.js`);return{SkillsManagerSection:e}},__vite__mapDeps([240,1,2,3,4,106,15,16,17,78,19,63,8,23,21,10,9,6,155,114,115,116,13,14,18,26,27,64,68,94,92,29,112,12,109,111,113,39,101,117,118,119,50,51,217,11,5,20,22,77,79,95,32,221,54,40,41,42,43,44,45,46,47,48,49,83,84,85,201,210,220,208,226,87,203,204,209,123,122]),import.meta.url)).SkillsManagerSection),L=v(async()=>(await t(async()=>{let{SlidesPluginSection:e}=await import(`./SlidesPluginSection-qj2ynzJw.js`);return{SlidesPluginSection:e}},__vite__mapDeps([241,1,2,3,4,5,6,72,8,199,12,13,14,15,16,17,18,19,9,10,64,94,23,21,75,76,42,41,43,44,11,20,22,242,95,140,88,89,90,91]),import.meta.url)).SlidesPluginSection),R=v(async()=>(await t(async()=>{let{SyncSection:e}=await import(`./SyncSection-CSV4Q3-z.js`);return{SyncSection:e}},__vite__mapDeps([243,1,36,37,38,39,4,8,3,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,29,17,55,56,57,58,59,2,60,61,62,13,14,15,16,18,26,19,63,12,9,10,28,6,64,65,66,134,27,21,35,67,5,68,69,70,7,71,72,73,74,75,76,20,23,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,93,94,95,22,244,34,25,184,161,162,163,164,165,166,167,168,169,170,171,160,145,146,172,173,174,147,175,92,176,177,178,179,180,181,182,183,127,185,186,98,187,126,188,189,190,191,155,192,135,156,157,193,194,195,31,108,196,197,137,103,111,198,199,200,201,202,203,204,205,152,206,207,208,209,123,210,125,131,118,211,120,121,140,245,11,32]),import.meta.url)).SyncSection),z=v(async()=>(await t(async()=>{let{TerminalSection:e}=await import(`./TerminalSection-CRjm8wzK.js`);return{TerminalSection:e}},__vite__mapDeps([246,1,36,37,38,39,4,8,3,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,29,17,55,56,57,58,59,2,60,61,98,15,16,28,18,9,10,11,12,13,14,19,5,6,20,21,22,247,248,85]),import.meta.url)).TerminalSection),B=v(async()=>(await t(async()=>{let{ThemePluginSection:e}=await import(`./ThemePluginSection-C4i43nY3.js`);return{ThemePluginSection:e}},__vite__mapDeps([249,1,2,3,4,34,15,16,17,8,9,10,5,6,39,29,40,41,42,43,44,45,46,47,48,49,50,51,250,139,133,37,62,13,14,18,26,19,63,12,28,64,65,98,134,27,21,135,136,25,110,59,137,138,92,73,23,77,78,79,120,121,95,32,140,52,53,54,55,58,60,61,85,141,11,20,22,142,251]),import.meta.url)).ThemePluginSection),V=v(async()=>{let{LINT_PLUGIN_UI:e}=await t(async()=>{let{LINT_PLUGIN_UI:e}=await import(`./lint-plugins-Denw4h4y.js`);return{LINT_PLUGIN_UI:e}},__vite__mapDeps([252,212,6,1,4,159,160,53,161,162,91,163,164,165,166,167,168,169,170,171,14,36,37,38,39,8,3,40,41,42,43,44,45,46,47,48,49,50,51,52,54,29,17,55,56,57,58,59,2,60,61,90,145,146,172,173,174,147,175,92,176,177,178,179,180,181,22,87,182,183,127,106,15,16,78,19,63,23,21,10,9,34,98,28,18,184,185,186,62,13,26,12,64,65,66,187,126,188,189,190,67,191,155,192,73,77,79,68,135,156,94,157,193,69,194,195,31,7,108,196,197,137,103,111,198,199,200,83,84,85,201,202,203,204,205,20,95,152,80,81,206,207,208,209,123,210,125,131,118,211,144,148,5,70,213,214,74,215,107,216,114,115,116,27,109,112,113,101,117,119,217,218,219,220,221,11,222,138,120,121,32,223,224,225,226,227,88,89]),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=d(async()=>{let[{BoundSchemaSection:e},{OkCliPathRow:n},{SpellingSettings:r}]=await Promise.all([t(()=>import(`./schema-section-DFiSaK5s.js`),__vite__mapDeps([250,1,139,16,4,34,15,17,3,8,9,10,29,133,2,37,62,13,14,18,26,19,63,12,28,6,64,65,98,134,27,21,135,136,25,110,59,39,137,138,92,73,40,41,42,43,44,45,46,47,48,49,50,51,23,77,78,79,120,121,95,32,140,52,53,54,55,58,60,61,85,141,11,5,20,22,142]),import.meta.url),t(()=>import(`./OkCliPathRow-BtSsFiGL.js`),__vite__mapDeps([253,1,2,3,4,107,15,16,17,28,18,64,6,108,8,9,10,34,12,13,14,19,31,29,23,21]),import.meta.url),t(()=>import(`./SpellingSettings-BvzNDT7g.js`),__vite__mapDeps([254,1,14,13,15,16,4,17,3,18,54,2,98,28,8,9,10,12,19,64,6,138,79,29,176,133,37,62,26,63,65,134,27,21,135,136,25,110,59,39,137,92,73,139,34,40,41,42,43,44,45,46,47,48,49,50,51,23,77,78,120,121,95,32,140,52,53,55,58,60,61,85,141,151]),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)(l,{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)(u,{"data-testid":`settings-user-config-unavailable`,children:[r,a,(0,_.jsx)(c,{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-D_23z-dF.js","./chunk-CYidjpOJ.js","./dist-Nvb76hAm.js","./jsx-runtime-BUgB2tll.js","./react-f2sANaYj.js","./arrow-up-right-nJaICi16.js","./createLucideIcon-DdBzwsHe.js","./spinner-Bx8xD6f8.js","./compiler-runtime-BfE3aGVn.js","./utils-CPqDy6Hr.js","./bundle-mjs-SHeFpKGC.js","./SettingsSectionHeader-D-JSH4bX.js","./tooltip-DBqLYfio.js","./dist-YVu4MRkZ2.js","./floating-ui.dom-DkPPH5vF.js","./dist-DTFuvKje.js","./dist-CSCUSbQc.js","./react-dom-DPxgxlDT.js","./dist-CRjqnzU7.js","./dist-CxbWbOvU.js","./badge-DmdA1C7r.js","./dist-BsJYDohW.js","./external-link-CldCnbtR.js","./button-DzgjsZzC.js","./SharingSection-XR4AeJT9.js","./radio-group-G1GR05Rb.js","./dist-uiDX6Nr9.js","./dist-BKgU0kag.js","./dist-DBXmXNZF.js","./dist-BGzUo_18.js","./ConfigSharingInfoTooltip-B2YLIcK1.js","./info-CyR0W2SK.js","./skeleton-BPb29aFG.js","./AccountSection-BEKd-tkM.js","./label-CvMpFFbN.js","./SyncStatusBadge-DrRCeCvZ.js","./config-provider-m9Ao-f9D.js","./trace-api-BjgnT4Mc.js","./status-SIkheD7g.js","./dist-PQ5KMVDh.js","./schemas-api-CQHNNDP6.js","./schemas-B93JY9Ef.js","./_envelope-g8Le8UBe-6j_3zVcA.js","./share-D-LUU2aX-DfD-mrg-.js","./util-doc-name-D-_o-n0R.js","./constants-cc1-Bt4QPTUe.js","./constants-github-DOek7bCt.js","./doc-extensions-CcO7K8uD-B004ggqh.js","./logging-renderer-log-Bvxj7ztp.js","./skill-targets-schema-BujW07bM.js","./constants-editors-DLxv8SuP.js","./constants-product-C4Nt9vD3.js","./use-apply-config-language-CdocdaSu.js","./preload-helper-Chd9yIcd.js","./dist-C_FzPxEX2.js","./messages-B6BYNmqo.js","./client-version-09D8u2lP.js","./css-color-to-hex-Cjxd2Xbp.js","./use-apply-config-color-theme-B9f6n0Cd.js","./use-apply-config-theme-CYFG76sS.js","./saved-themes-client-ByYw6oZt.js","./constants-upload-CVKO8P4d.js","./select-Bu4Wm3Rf.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-DGH1_U0o.js","./terminal-command-events-DYVYsw0p.js","./handoff-pwpLEUcJ.js","./dialog-BJEjKJjL.js","./electron-drag-strip-D9GZhMg_.js","./x-DM2drskU.js","./popover-BhiLJhH5.js","./dist-D1AbXGbs.js","./use-conflicts-BJFBAg9M.js","./documents-events-ckNvVQCr.js","./schemas-cc1-DNrPPikD.js","./config-errors-tVoeK4OC.js","./use-git-sync-status-DPG8QuKs.js","./doc-hash-BJkweiX9.js","./use-settings-route-CikTq5Vq.js","./keyboard-shortcuts-FtScAm_I.js","./dist-Dc8tD1th.js","./w3c-keyname-C7Rznu6R.js","./trash-2-CchZ0T47.js","./AuthModal-7ZC-1yVV.js","./copy-DpWa6i2v.js","./input-C-Qm8YDT.js","./auth-state-cache-fRITSReW.js","./AgentConnectionsSection-BOlCjbB0.js","./switch-BKZTXkzu.js","./useQuery-ZeEDLtxh.js","./RegisteredAgentIcon-DKZ8eOKZ.js","./cursor-B6reg1lS.js","./agent-registry-pREadnY_.js","./search-CFu4WXqc.js","./TerminalLaunchContext-Cwrrh5Ck.js","./agent-connections-CykO_Ezy.js","./alert-dialog-BA3e7-10.js","./checkbox-CKD8LETI.js","./minus-DdRxss3A.js","./folder-QqUoFRPR.js","./monitor-IXzxTnmk.js","./sparkles-BS2TX_Um.js","./AgentIconCluster-Qf_VPGzc.js","./OpenInAgentMenuItem-Bd9Zl2ks.js","./dropdown-menu-DtLu9NwU.js","./dist-UouvQIiM.js","./dist-d0R4nnoB.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-lp6Y3sn1.js","./bridge-D8Oy74FE.js","./structural-freshness-CIbkMFA3-CWi_lyiW.js","./terminal-cli-display-Bn8rI2FY.js","./settings-section-labels-BA8paawN.js","./catalog-CJ_rs_wb.js","./use-workspace-CF2-WOaH.js","./AttachmentsSection-DackfQ_s.js","./field-controls-DSwLWrMh.js","./toggle-group-B7p69Qfd.js","./circle-alert-eBm4JPxY.js","./ThemePicker-pc5gwEur.js","./plus-zPnYzcqL.js","./rotate-ccw-Zi1IjIg9.js","./form-BGyym9kP.js","./textarea-CMYJSlFq.js","./config-schema-Dh_H8E-u.js","./config-validation-events-01z0iLZK.js","./ContentRulesSection-DtplCATO.js","./markdown-lint-DeZBsw3J.js","./lib-QQS1Brzc.js","./ccount-BoHE53_k.js","./syntax-CKL08zSk.js","./markdownit-Cn1WWq3J.js","./field-controls-C6S4B1Im.js","./HotkeysSection-BroWUkWa.js","./settings-host-gates-BdPynUVr.js","./kbd-Cg1nrB7U.js","./IntegrationsSection-Bem--yGZ.js","./InstallInClaudeDesktopDialog-DNy01p3t.js","./arrow-right-NOQZeKIW.js","./circle-check-nK1yRBIw.js","./download-BouT3__0.js","./LinkPreviewsSection-DQxmONPl.js","./LintingSection-B-IUi1Qd.js","./CodeMirrorPropInput-DvKu95Lo.js","./dist-DseqKdAU.js","./dist-D2SphF3p.js","./dist-CjyZozAk.js","./dist-BxTTaZ5o.js","./dist-C2Kstufe.js","./dist-BvhrN0Uj.js","./dist-DKYEqMZn.js","./dist-D5mDCusD.js","./dist-BpU-J2LR.js","./dist-BkE9d74i.js","./stex-CUzil_LB.js","./lib-DlDYgFfS.js","./space-separated-tokens-l9yufOSK.js","./trim-lines-DfV8CCf7.js","./folder-open-COGOeTzI.js","./with-selector-zVo3Fruj.js","./navigation-targets-DTSxcGor.js","./file-tree-utils-DUpeRMj2.js","./doc-paths-cEiFVCxr.js","./cm-theme-Cvtw80TE.js","./page-list-cache-BNFVKu-D.js","./documents-fetch-Y7Dt9_Tn.js","./note-window-mode-CI3Yju9B.js","./DocumentContext-BH42QH54.js","./propagation-api-BP58TooP.js","./context-api-D2PVlCLE.js","./lib-JGveGkyb.js","./lib-TFtgHRaJ.js","./lib-7Zm1Z07d.js","./git-branch-CeTudSak.js","./Mermaid-CprZhBlA.js","./maximize-2-DjzhPUDZ.js","./frontmatter-tags-CoOxl3mC.js","./prop-types-ZtKgQMRh.js","./hash-C4CJQURT.js","./local-menu-action-bus-Dyh2UJJF.js","./paperclip-BHdV1F_7.js","./react-error-boundary-6ac6QM6R.js","./CopyButton-BGYz3S5f.js","./PageListContext-DgTeRFU-.js","./parse-api-error-B5EVRh3T.js","./startup-marks-aftNzVFI.js","./perf-DZJpLc5j.js","./diagnostic-breadcrumb-Cr0C15nJ.js","./file-tree-rename-validation-CQF8z42p.js","./use-collab-url-DPmF-V5e.js","./excalidraw-scene-WvG0vu5I.js","./known-skill-dirs-DtxJ8qaH.js","./skill-scope-N3jmnGIX.js","./skills-api-B7NWq2mZ.js","./DocumentContext-B0sQn39F.css","./lint-plugin-meta-CtDE2R0v.js","./square-pen-BoydeSu6.js","./DeleteConfirmationDialog-CCv72H-k.js","./card-DJoKetZ9.js","./SkillInstallMenu-CAjgsxCn.js","./ChangedOutsideBadge-Yx_v8aj4.js","./context-menu-CKOBjlWm.js","./dist-ecS2llwR.js","./use-skills-D4I9tjyB.js","./use-skill-targets-CcZTp1aJ.js","./markdownlint-rule-browser-60Esn3tM.js","./tag-pill-input-C9tJ_ebG.js","./lint-config-client-DDZrpVHz.js","./use-open-skill-Nru-PAlE.js","./open-managed-artifact-tab-2lsv2g--.js","./schema-fields-view-intent-CGV401S6.js","./NetworkAccessSection-DJggS7b-.js","./restart-collab-server-BLCoCY2a.js","./OkignoreSection-DYAQ4Haz.js","./sortable.esm-BdFZmZc5.js","./grip-vertical-DNbkgWZL.js","./config-ignore-nested-error-events-9jefebwW.js","./ProjectTemplatesSection-oiahzFKw.js","./TemplateRow-DoNZxhIJ.js","./file-plus-DKxOZh2k.js","./folder-config-api-Db5-uEQR.js","./SearchSection-Cr2ZiTwI.js","./use-semantic-search-status-Cqw3SIgk.js","./SkillsManagerSection-B0OJHWNm.js","./SlidesPluginSection-Bi8J2lVH.js","./input-group-MLVCQYFm.js","./SyncSection-DH3epVLR.js","./PublishToGitHubDialog-DW5fQKKa.js","./clipboard-adapter-DOdbK8py.js","./TerminalSection-DU8swJ-Q.js","./use-terminal-enabled-DnnXtaEs.js","./terminal-telemetry-DkL8V654.js","./ThemePluginSection-BT1NQe1R.js","./schema-section-C8DGjvNX.js","./settings-fields-DLfIBRfX.js","./lint-plugins-DjZCf7i3.js","./OkCliPathRow-BtSsFiGL.js","./SpellingSettings-Dkdy9B2q.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{n as c,r as l,t as u}from"./alert-CF8zw7ni.js";import{t as d}from"./lazy-with-preload-vPXQq10U.js";import{r as f}from"./settings-host-gates-BdPynUVr.js";import{n as p}from"./settings-fields-DLfIBRfX.js";import{t as m}from"./SettingsSectionHeader-D-JSH4bX.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-D_23z-dF.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]),import.meta.url)).AboutSection),b=v(async()=>(await t(async()=>{let{SharingSection:e}=await import(`./SharingSection-XR4AeJT9.js`);return{SharingSection:e}},__vite__mapDeps([24,1,2,3,4,25,15,16,17,26,27,28,18,8,9,10,29,30,12,13,14,19,31,6,11,5,20,21,22,23,32]),import.meta.url)).SharingSection),x=v(async()=>(await t(async()=>{let{AccountSection:e}=await import(`./AccountSection-BEKd-tkM.js`);return{AccountSection:e}},__vite__mapDeps([33,1,2,3,4,34,15,16,17,8,9,10,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,29,55,56,57,58,59,60,61,62,13,14,18,26,19,63,12,28,6,64,65,66,67,5,68,69,70,7,71,72,73,74,75,76,20,21,23,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,22,11,32,96]),import.meta.url)).AccountSection),S=v(async()=>(await t(async()=>{let{AgentConnectionsSection:e}=await import(`./AgentConnectionsSection-BOlCjbB0.js`);return{AgentConnectionsSection:e}},__vite__mapDeps([97,1,54,2,3,4,98,15,16,17,28,18,8,9,10,99,6,5,100,101,102,40,41,42,43,44,45,46,47,48,49,50,51,76,64,7,103,73,104,105,106,78,19,63,23,21,107,108,34,12,13,14,109,31,110,111,79,112,113,114,115,116,26,27,68,39,117,118,119,20,77,120,121,122,123,124,125,126,127,128,11,22,129,95,130,131]),import.meta.url)).AgentConnectionsSection),C=v(async()=>(await t(async()=>{let{AttachmentsSection:e}=await import(`./AttachmentsSection-DackfQ_s.js`);return{AttachmentsSection:e}},__vite__mapDeps([132,1,36,37,38,39,4,8,3,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,29,17,55,56,57,58,59,2,60,61,62,13,14,15,16,18,26,19,63,12,9,10,28,6,64,65,133,98,134,27,21,135,136,25,110,137,138,92,73,139,34,23,77,78,79,120,121,95,32,140,85,141,11,5,20,22,142]),import.meta.url)).AttachmentsSection),w=v(async()=>(await t(async()=>{let{ContentRulesSection:e}=await import(`./ContentRulesSection-DtplCATO.js`);return{ContentRulesSection:e}},__vite__mapDeps([143,36,1,37,38,39,4,8,3,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,29,17,55,56,57,58,59,2,60,61,62,13,14,15,16,18,26,19,63,12,9,10,28,6,64,65,34,98,144,145,146,147,148,11,5,20,21,22,85]),import.meta.url)).ContentRulesSection),T=v(async()=>(await t(async()=>{let{SectionSkeleton:e}=await import(`./field-controls-C6S4B1Im.js`);return{SectionSkeleton:e}},__vite__mapDeps([149,133,1,2,3,4,37,62,13,14,15,16,17,18,26,19,63,12,8,9,10,28,6,64,65,98,134,27,21,135,136,25,110,59,39,137,138,92,73,139,34,29,40,41,42,43,44,45,46,47,48,49,50,51,23,77,78,79,120,121,95,32,140,52,53,54,55,58,60,61,85,141]),import.meta.url)).SectionSkeleton),E=v(async()=>(await t(async()=>{let{HotkeysSection:e}=await import(`./HotkeysSection-BroWUkWa.js`);return{HotkeysSection:e}},__vite__mapDeps([150,2,1,3,4,8,11,12,13,14,15,16,17,18,19,9,10,5,6,20,21,22,151,152,89,90,91]),import.meta.url)).HotkeysSection),D=v(async()=>(await t(async()=>{let{IntegrationsSection:e}=await import(`./IntegrationsSection-Bem--yGZ.js`);return{IntegrationsSection:e}},__vite__mapDeps([153,1,2,3,4,154,6,155,156,94,157,7,8,9,10,29,17,23,16,21,77,78,15,19,63,79,22,11,12,13,14,18,5,20]),import.meta.url)).IntegrationsSection),O=v(async()=>(await t(async()=>{let{LinkPreviewsSection:e}=await import(`./LinkPreviewsSection-DQxmONPl.js`);return{LinkPreviewsSection:e}},__vite__mapDeps([158,1,36,37,38,39,4,8,3,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,29,17,55,56,57,58,59,2,60,61,98,15,16,28,18,9,10,11,12,13,14,19,5,6,20,21,22,23,77,78,63,79,85]),import.meta.url)).LinkPreviewsSection),k=v(async()=>(await t(async()=>{let{MarkdownlintPluginSection:e}=await import(`./LintingSection-B-IUi1Qd.js`);return{MarkdownlintPluginSection:e}},__vite__mapDeps([159,1,160,53,161,162,91,163,164,165,166,167,168,169,170,171,14,36,37,38,39,4,8,3,40,41,42,43,44,45,46,47,48,49,50,51,52,54,29,17,55,56,57,58,59,2,60,61,90,145,146,172,173,174,147,6,175,92,176,177,178,179,180,181,22,87,182,183,127,106,15,16,78,19,63,23,21,10,9,34,98,28,18,184,185,186,62,13,26,12,64,65,66,187,126,188,189,190,67,191,155,192,73,77,79,68,135,156,94,157,193,69,194,195,31,7,108,196,197,137,103,111,198,199,200,83,84,85,201,202,203,204,205,20,95,152,80,81,206,207,208,209,123,210,125,131,118,211,144,148,5,212,70,213,214,74,215,107,216,114,115,116,27,109,112,113,101,117,119,217,218,219,220,221,11,222,138,120,121,32,223,224,225,226,227,88,89]),import.meta.url)).MarkdownlintPluginSection),A=v(async()=>(await t(async()=>{let{ProjectPluginsManageSection:e}=await import(`./LintingSection-B-IUi1Qd.js`);return{ProjectPluginsManageSection:e}},__vite__mapDeps([159,1,160,53,161,162,91,163,164,165,166,167,168,169,170,171,14,36,37,38,39,4,8,3,40,41,42,43,44,45,46,47,48,49,50,51,52,54,29,17,55,56,57,58,59,2,60,61,90,145,146,172,173,174,147,6,175,92,176,177,178,179,180,181,22,87,182,183,127,106,15,16,78,19,63,23,21,10,9,34,98,28,18,184,185,186,62,13,26,12,64,65,66,187,126,188,189,190,67,191,155,192,73,77,79,68,135,156,94,157,193,69,194,195,31,7,108,196,197,137,103,111,198,199,200,83,84,85,201,202,203,204,205,20,95,152,80,81,206,207,208,209,123,210,125,131,118,211,144,148,5,212,70,213,214,74,215,107,216,114,115,116,27,109,112,113,101,117,119,217,218,219,220,221,11,222,138,120,121,32,223,224,225,226,227,88,89]),import.meta.url)).ProjectPluginsManageSection),j=v(async()=>(await t(async()=>{let{UserPluginsManageSection:e}=await import(`./LintingSection-B-IUi1Qd.js`);return{UserPluginsManageSection:e}},__vite__mapDeps([159,1,160,53,161,162,91,163,164,165,166,167,168,169,170,171,14,36,37,38,39,4,8,3,40,41,42,43,44,45,46,47,48,49,50,51,52,54,29,17,55,56,57,58,59,2,60,61,90,145,146,172,173,174,147,6,175,92,176,177,178,179,180,181,22,87,182,183,127,106,15,16,78,19,63,23,21,10,9,34,98,28,18,184,185,186,62,13,26,12,64,65,66,187,126,188,189,190,67,191,155,192,73,77,79,68,135,156,94,157,193,69,194,195,31,7,108,196,197,137,103,111,198,199,200,83,84,85,201,202,203,204,205,20,95,152,80,81,206,207,208,209,123,210,125,131,118,211,144,148,5,212,70,213,214,74,215,107,216,114,115,116,27,109,112,113,101,117,119,217,218,219,220,221,11,222,138,120,121,32,223,224,225,226,227,88,89]),import.meta.url)).UserPluginsManageSection),M=v(async()=>(await t(async()=>{let{NetworkAccessSection:e}=await import(`./NetworkAccessSection-DJggS7b-.js`);return{NetworkAccessSection:e}},__vite__mapDeps([228,1,36,37,38,39,4,8,3,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,29,17,55,56,57,58,59,2,60,61,106,15,16,78,19,63,23,21,10,9,34,25,26,27,28,18,98,11,12,13,14,5,6,20,22,95,229,85,141]),import.meta.url)).NetworkAccessSection),N=v(async()=>(await t(async()=>{let{OkignoreSection:e}=await import(`./OkignoreSection-DYAQ4Haz.js`);return{OkignoreSection:e}},__vite__mapDeps([230,1,231,17,4,2,3,12,13,14,15,16,18,19,8,9,10,64,6,232,73,79,29,200,54,177,178,45,44,179,61,47,181,83,84,41,85,51,182,201,202,203,204,48,11,5,20,21,22,233,23,95,32,142]),import.meta.url)).OkignoreSection),P=v(async()=>(await t(async()=>{let{ProjectTemplatesSection:e}=await import(`./ProjectTemplatesSection-oiahzFKw.js`);return{ProjectTemplatesSection:e}},__vite__mapDeps([234,1,2,3,4,137,6,8,235,54,106,15,16,17,78,19,63,23,21,10,9,114,115,116,13,14,18,26,27,64,68,236,92,79,29,40,41,42,43,44,45,46,47,48,49,50,51,214,7,77,120,34,121,95,140,83,84,85,237,201,11,12,5,20,22,32,226,87,88,89,90,91]),import.meta.url)).ProjectTemplatesSection),F=v(async()=>(await t(async()=>{let{SearchSection:e}=await import(`./SearchSection-Cr2ZiTwI.js`);return{SearchSection:e}},__vite__mapDeps([238,1,36,37,38,39,4,8,3,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,29,17,55,56,57,58,59,2,60,61,66,15,16,98,28,18,9,10,68,6,239,83,84,85,11,12,13,14,19,5,20,21,22,23,77,78,63,79,120,34,121,95,141]),import.meta.url)).SearchSection),I=v(async()=>(await t(async()=>{let{SkillsManagerSection:e}=await import(`./SkillsManagerSection-B0OJHWNm.js`);return{SkillsManagerSection:e}},__vite__mapDeps([240,1,2,3,4,106,15,16,17,78,19,63,8,23,21,10,9,6,155,114,115,116,13,14,18,26,27,64,68,94,92,29,112,12,109,111,113,39,101,117,118,119,50,51,217,11,5,20,22,77,79,95,32,221,54,40,41,42,43,44,45,46,47,48,49,83,84,85,201,210,220,208,226,87,203,204,209,123,122]),import.meta.url)).SkillsManagerSection),L=v(async()=>(await t(async()=>{let{SlidesPluginSection:e}=await import(`./SlidesPluginSection-Bi8J2lVH.js`);return{SlidesPluginSection:e}},__vite__mapDeps([241,1,2,3,4,5,6,72,8,199,12,13,14,15,16,17,18,19,9,10,64,94,23,21,75,76,42,41,43,44,11,20,22,242,95,140,88,89,90,91]),import.meta.url)).SlidesPluginSection),R=v(async()=>(await t(async()=>{let{SyncSection:e}=await import(`./SyncSection-DH3epVLR.js`);return{SyncSection:e}},__vite__mapDeps([243,1,36,37,38,39,4,8,3,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,29,17,55,56,57,58,59,2,60,61,62,13,14,15,16,18,26,19,63,12,9,10,28,6,64,65,66,134,27,21,35,67,5,68,69,70,7,71,72,73,74,75,76,20,23,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,93,94,95,22,244,34,25,184,161,162,163,164,165,166,167,168,169,170,171,160,145,146,172,173,174,147,175,92,176,177,178,179,180,181,182,183,127,185,186,98,187,126,188,189,190,191,155,192,135,156,157,193,194,195,31,108,196,197,137,103,111,198,199,200,201,202,203,204,205,152,206,207,208,209,123,210,125,131,118,211,120,121,140,245,11,32]),import.meta.url)).SyncSection),z=v(async()=>(await t(async()=>{let{TerminalSection:e}=await import(`./TerminalSection-DU8swJ-Q.js`);return{TerminalSection:e}},__vite__mapDeps([246,1,36,37,38,39,4,8,3,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,29,17,55,56,57,58,59,2,60,61,98,15,16,28,18,9,10,11,12,13,14,19,5,6,20,21,22,247,248,85]),import.meta.url)).TerminalSection),B=v(async()=>(await t(async()=>{let{ThemePluginSection:e}=await import(`./ThemePluginSection-BT1NQe1R.js`);return{ThemePluginSection:e}},__vite__mapDeps([249,1,2,3,4,34,15,16,17,8,9,10,5,6,39,29,40,41,42,43,44,45,46,47,48,49,50,51,250,139,133,37,62,13,14,18,26,19,63,12,28,64,65,98,134,27,21,135,136,25,110,59,137,138,92,73,23,77,78,79,120,121,95,32,140,52,53,54,55,58,60,61,85,141,11,20,22,142,251]),import.meta.url)).ThemePluginSection),V=v(async()=>{let{LINT_PLUGIN_UI:e}=await t(async()=>{let{LINT_PLUGIN_UI:e}=await import(`./lint-plugins-DjZCf7i3.js`);return{LINT_PLUGIN_UI:e}},__vite__mapDeps([252,212,6,1,4,159,160,53,161,162,91,163,164,165,166,167,168,169,170,171,14,36,37,38,39,8,3,40,41,42,43,44,45,46,47,48,49,50,51,52,54,29,17,55,56,57,58,59,2,60,61,90,145,146,172,173,174,147,175,92,176,177,178,179,180,181,22,87,182,183,127,106,15,16,78,19,63,23,21,10,9,34,98,28,18,184,185,186,62,13,26,12,64,65,66,187,126,188,189,190,67,191,155,192,73,77,79,68,135,156,94,157,193,69,194,195,31,7,108,196,197,137,103,111,198,199,200,83,84,85,201,202,203,204,205,20,95,152,80,81,206,207,208,209,123,210,125,131,118,211,144,148,5,70,213,214,74,215,107,216,114,115,116,27,109,112,113,101,117,119,217,218,219,220,221,11,222,138,120,121,32,223,224,225,226,227,88,89]),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=d(async()=>{let[{BoundSchemaSection:e},{OkCliPathRow:n},{SpellingSettings:r}]=await Promise.all([t(()=>import(`./schema-section-C8DGjvNX.js`),__vite__mapDeps([250,1,139,16,4,34,15,17,3,8,9,10,29,133,2,37,62,13,14,18,26,19,63,12,28,6,64,65,98,134,27,21,135,136,25,110,59,39,137,138,92,73,40,41,42,43,44,45,46,47,48,49,50,51,23,77,78,79,120,121,95,32,140,52,53,54,55,58,60,61,85,141,11,5,20,22,142]),import.meta.url),t(()=>import(`./OkCliPathRow-BtSsFiGL.js`),__vite__mapDeps([253,1,2,3,4,107,15,16,17,28,18,64,6,108,8,9,10,34,12,13,14,19,31,29,23,21]),import.meta.url),t(()=>import(`./SpellingSettings-Dkdy9B2q.js`),__vite__mapDeps([254,1,14,13,15,16,4,17,3,18,54,2,98,28,8,9,10,12,19,64,6,138,79,29,176,133,37,62,26,63,65,134,27,21,135,136,25,110,59,39,137,92,73,139,34,40,41,42,43,44,45,46,47,48,49,50,51,23,77,78,120,121,95,32,140,52,53,55,58,60,61,85,141,151]),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)(l,{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)(u,{"data-testid":`settings-user-config-unavailable`,children:[r,a,(0,_.jsx)(c,{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-CKSBhTB-.js";import{a as h,n as de}from"./receive-store-CnWTih4w.js";import{t as fe}from"./share-metadata-rows-mAclt7sW.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-CKSBhTB-.js";import{a as h,n as de}from"./receive-store-O9cRwWtJ.js";import{t as fe}from"./share-metadata-rows-mAclt7sW.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{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 c}from"./desktop-bridge-types-BxqZkaz9.js";import{t as ee}from"./spinner-Bx8xD6f8.js";import{a as te,c as ne,i as re,n as l,o as u,s as ie,t as d}from"./dialog-BJEjKJjL.js";import{a as f,c as p,i as m,l as h,n as g,o as _,r as ae,s as v}from"./receive-store-CnWTih4w.js";import{t as oe}from"./share-metadata-rows-mAclt7sW.js";var y=e(n(),1),b=a(),x=e=>({phase:`ready`,seed:e});function S(e){return e.phase===`ready`?{phase:`initializing`,seed:e.seed}:e}function C(e,t){return e.phase===`initializing`?t.ok?{phase:`opening`,seed:e.seed}:{phase:`error`,seed:e.seed,reason:t.reason,message:t.message}:e}function w(e,t){return e.phase===`opening`?t.ok?{phase:`done`,seed:e.seed}:{phase:`error`,seed:e.seed,reason:`network-error`,message:t.message}:e}function T(e){return e.phase===`done`||e.phase===`cancelled`||e.phase===`error`?e:{phase:`cancelled`,seed:e.seed}}var E=t();function D(e){return{kind:e.target.kind,path:c(e.target),repositoryPath:c(e.repositoryTarget),...e.contentRootDepth===null?{}:{contentRootDepth:e.contentRootDepth}}}function O(e){return e!==null&&e.kind===`launcher-consent`}function k(e){return e!==null&&e.kind===`launcher-miss`}function A(e){let t=(0,b.c)(14),{bridge:n,cloneController:r,store:i}=e,a=i===void 0?g:i,o=(0,y.useSyncExternalStore)(a.subscribe,a.getSnapshot,M),[c,ee]=(0,y.useState)(0),[te,ne]=(0,y.useState)(o);o!==te&&(ne(o),ee(j));let re,l;t[0]!==o||t[1]!==a?(re=()=>{if(!o)return;let e=v(o);e&&(s.error(e.message),a.dismiss())},l=[o,a],t[0]=o,t[1]=a,t[2]=re,t[3]=l):(re=t[2],l=t[3]),(0,y.useEffect)(re,l);let u;t[4]===o?u=t[5]:(u=k(o)?o:null,t[4]=o,t[5]=u);let ie=u,d;t[6]===o?d=t[7]:(d=O(o)?o:null,t[6]=o,t[7]=d);let f=d??ie;if(!f)return null;let p;return t[8]!==f||t[9]!==n||t[10]!==r||t[11]!==c||t[12]!==a?(p=(0,E.jsx)(N,{payload:f,bridge:n,cloneController:r,store:a},c),t[8]=f,t[9]=n,t[10]=r,t[11]=c,t[12]=a,t[13]=p):p=t[13],p}function j(e){return e+1}function M(){return null}function N(e){let t=(0,b.c)(165),{payload:n,bridge:a,cloneController:g,store:v}=e,{_:S}=i(),[T,A]=(0,y.useState)(!1),[j,M]=(0,y.useState)(null),[N,fe]=(0,y.useState)(!1),[P,pe]=(0,y.useState)(!1),[F,me]=(0,y.useState)(null),[I,L]=(0,y.useState)(null),he=(0,y.useRef)(!1),ge=(0,y.useRef)(null),_e,ve;t[0]===F?(_e=t[1],ve=t[2]):(_e=()=>{F&&ge.current?.focus()},ve=[F],t[0]=F,t[1]=_e,t[2]=ve),(0,y.useEffect)(_e,ve);let ye;t[3]!==I||t[4]!==n?(ye=()=>{O(n)&&I===null&&(console.warn(`[receive] q1_hit=true selection=branch_match_non_ok candidate=${n.candidatePath}`),L(x({candidatePath:n.candidatePath,branch:n.share.branch,targetPath:c(n.share.target),targetKind:n.share.target.kind,repositoryPath:c(n.share.repositoryTarget),...n.share.contentRootDepth===null?{}:{contentRootDepth:n.share.contentRootDepth},parentProjectName:n.parentProjectName})))},t[3]=I,t[4]=n,t[5]=ye):ye=t[5];let be;t[6]===n?be=t[7]:(be=[n],t[6]=n,t[7]=be),(0,y.useEffect)(ye,be);let xe;t[8]!==j||t[9]!==g||t[10]!==n?(xe=()=>{if(!g||!k(n)||j!==null||he.current)return;he.current=!0,fe(!0);let e=n.share.host;g.getAuthStatus(e).then(e=>{M(e)}).catch(t=>{console.warn(`[receive] auth pre-flight probe failed`,t instanceof Error?t.message:t),M({authenticated:!1,host:e})}).finally(()=>{fe(!1)})},t[8]=j,t[9]=g,t[10]=n,t[11]=xe):xe=t[11];let Se;t[12]!==j||t[13]!==n?(Se=[n,j],t[12]=j,t[13]=n,t[14]=Se):Se=t[14],(0,y.useEffect)(xe,Se);let R=k(n)?n:null,Ce=O(n)?n:null,z=R?.share??Ce?.share??null,B,V,H,U,W,we,G,K;if(t[15]!==S||t[16]!==N||t[17]!==a||t[18]!==g||t[19]!==P||t[20]!==I||t[21]!==R||t[22]!==T||t[23]!==z||t[24]!==v){G=Symbol.for(`react.early_return_sentinel`);bb0:{let e=z?{host:z.host,owner:z.owner,repo:z.repo}:null,n;t[33]!==S||t[34]!==z?.target.kind?(n=z?.target.kind===`folder`?S({id:`ugoTXs`}):S({id:`XH30C4`}),t[33]=S,t[34]=z?.target.kind,t[35]=n):n=t[35],K=n,H=async function(){if(!R||!e)return;if(console.log(f({q2_path:`clone`})),!g){s.info(S({id:`27XW26`}),{action:{label:S({id:`B3NAZC`}),onClick:()=>{a.navigator.open()}},duration:8e3});return}if(P)return;me(null),pe(!0);let t=ae(e),n;try{n=await g.runClone({url:t,branch:R.share.branch})}catch(e){let t=e;console.warn(`[receive] runClone threw unexpectedly`,t),pe(!1),me({detail:t instanceof Error?t.message:String(t)});return}if(pe(!1),n.kind===`error`){me({detail:n.detail??null});return}if(n.kind===`ok`){try{await a.project.open({path:n.dir,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:D(R.share)}),v.dismiss()}catch(e){let t=e;console.warn(`[receive] project open after clone failed`,t instanceof Error?t.message:t),s.error(S({id:`438Fca`}))}return}};let i;t[36]!==S||t[37]!==N||t[38]!==g?(i=async function(){if(!(!g||N)){fe(!0);try{let e=await g.startSignIn();fe(!1),e!==null&&M(e)}catch(e){let t=e;fe(!1),console.warn(`[receive] startSignIn failed`,t instanceof Error?t.message:t),s.error(S({id:`lzwo7p`}))}}},t[36]=S,t[37]=N,t[38]=g,t[39]=i):i=t[39],W=i,U=async function(){if(!(!R||!e||T)){me(null),A(!0),console.log(f({q2_path:`local`}));try{for(;;){let t=await a.dialog.openFolder();if(!t)break;let n=await a.share.validateLocalFolder({folderPath:t,host:e.host,owner:e.owner,repo:e.repo});if(console.log(f({folder_validate:n.kind})),n.kind===`ok`){let e=R.share.branch,n={currentBranch:null,headSha:null,detached:!1};try{n=await a.project.readHeadBranch(t)}catch(e){let t=e;console.warn(`[receive] local-folder readHeadBranch failed`,t instanceof Error?t.message:t)}let r=h(e,n)!==`true`;try{await a.project.open({path:t,target:`new-window`,entryPoint:`share-receive`,...r?{pendingShareBranchSwitch:{share:R.share,projectPath:t,currentBranch:n.currentBranch}}:{pendingDeepLinkTarget:D(R.share)}}),v.dismiss()}catch(e){let t=e;console.warn(`[receive] local-folder-open failed`,t instanceof Error?t.message:t),s.error(S({id:`phM8Kh`}))}break}let r=_(n,e);r&&s.error(r)}}catch(e){let t=e;console.warn(`[receive] local-folder-validate failed`,t instanceof Error?t.message:t),s.error(S({id:`rlUzXK`}))}A(!1)}};let m;t[40]!==S||t[41]!==a||t[42]!==I||t[43]!==v?(m=function(){if(I===null||I.phase!==`ready`)return;let e=I.seed;console.warn(`[receive] consent_dialog action=initialize worktree=${e.candidatePath}`),L(de),a.project.okInit({projectPath:e.candidatePath}).then(async t=>{if(t.ok===!0){L(e=>e===null?e:C(e,{ok:!0,projectPath:t.projectPath}));try{await a.project.open({path:t.projectPath,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:{kind:e.targetKind,path:e.targetPath,repositoryPath:e.repositoryPath??e.targetPath,...e.contentRootDepth===void 0?{}:{contentRootDepth:e.contentRootDepth}},pendingBranch:e.branch}),L(ue),v.dismiss()}catch(t){let n=t,r=n instanceof Error?n.message:String(n);L(e=>e===null?e:w(e,{ok:!1,message:r})),s.error(S({id:`nDT8qt`,values:{0:e.candidatePath}}))}return}let n=t.reason,r=t.message||`Initialization failed.`;L(e=>e===null?e:C(e,{ok:!1,reason:n,message:r})),s.error(r)}).catch(t=>{let n=t instanceof Error?t.message:String(t);L(e=>e===null?e:C(e,{ok:!1,reason:`network-error`,message:n})),s.error(S({id:`3Mwaly`,values:{0:e.candidatePath}}))})},t[40]=S,t[41]=a,t[42]=I,t[43]=v,t[44]=m):m=t[44];let y=m,b;t[45]!==I||t[46]!==v?(b=function(){I!==null&&console.warn(`[receive] consent_dialog action=cancel worktree=${I.seed.candidatePath}`),L(le),v.dismiss()},t[45]=I,t[46]=v,t[47]=b):b=t[47];let x=b;if(I!==null&&I.phase!==`cancelled`&&I.phase!==`done`&&z!==null){let e=I.seed,n=I.phase===`initializing`||I.phase===`opening`,i;t[48]===x?i=t[49]:(i=e=>{e||x()},t[48]=x,t[49]=i);let a;t[50]===K?a=t[51]:(a=(0,E.jsx)(ne,{children:(0,E.jsx)(r,{id:`RY6Bq1`,values:{targetNoun:K}})}),t[50]=K,t[51]=a);let s;t[52]===z.target?s=t[53]:(s=c(z.target)?`— ${c(z.target)}`:``,t[52]=z.target,t[53]=s);let f;t[54]!==z.owner||t[55]!==z.repo||t[56]!==s?(f=(0,E.jsx)(te,{className:`sr-only`,children:(0,E.jsx)(r,{id:`pgq_xf`,values:{0:z.owner,1:z.repo,2:s}})}),t[54]=z.owner,t[55]=z.repo,t[56]=s,t[57]=f):f=t[57];let p=z.owner,m=z.repo,h;t[58]===z.target?h=t[59]:(h=c(z.target),t[58]=z.target,t[59]=h);let g;t[60]!==z.branch||t[61]!==z.owner||t[62]!==z.repo||t[63]!==z.target.kind||t[64]!==h?(g=(0,E.jsx)(oe,{owner:p,repo:m,path:h,kind:z.target.kind,branch:z.branch,testId:`share-receive-metadata`,branchTestId:`share-receive-metadata-branch`}),t[60]=z.branch,t[61]=z.owner,t[62]=z.repo,t[63]=z.target.kind,t[64]=h,t[65]=g):g=t[65];let _;t[66]!==a||t[67]!==f||t[68]!==g?(_=(0,E.jsxs)(ie,{children:[a,f,g]}),t[66]=a,t[67]=f,t[68]=g,t[69]=_):_=t[69];let ae;t[70]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,E.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,E.jsx)(r,{id:`KsAPaB`})}),t[70]=ae):ae=t[70];let v;t[71]===e.candidatePath?v=t[72]:(v=(0,E.jsx)(`p`,{className:`mt-2 break-all rounded bg-muted px-2 py-1 font-mono text-xs text-foreground/80`,"data-testid":`share-receive-consent-path`,children:e.candidatePath}),t[71]=e.candidatePath,t[72]=v);let b;t[73]===e.parentProjectName?b=t[74]:(b=e.parentProjectName===null?null:(0,E.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,"data-testid":`share-receive-consent-parent`,children:(0,E.jsx)(r,{id:`JmfgFc`,values:{0:e.parentProjectName}})}),t[73]=e.parentProjectName,t[74]=b);let S;t[75]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,E.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:(0,E.jsx)(r,{id:`w7SsvI`})}),t[75]=S):S=t[75];let C;t[76]!==I.message||t[77]!==I.phase?(C=I.phase===`error`?(0,E.jsx)(`p`,{className:`mt-3 text-sm text-destructive`,"data-testid":`share-receive-consent-error`,role:`alert`,children:I.message}):null,t[76]=I.message,t[77]=I.phase,t[78]=C):C=t[78];let w;t[79]!==v||t[80]!==b||t[81]!==C?(w=(0,E.jsxs)(l,{children:[ae,v,b,S,C]}),t[79]=v,t[80]=b,t[81]=C,t[82]=w):w=t[82];let T;t[83]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,E.jsx)(r,{id:`dEgA5A`}),t[83]=T):T=t[83];let D;t[84]===x?D=t[85]:(D=(0,E.jsx)(o,{variant:`ghost`,onClick:x,"data-testid":`share-receive-consent-cancel`,children:T}),t[84]=x,t[85]=D);let O=n||I.phase===`error`,k=n||I.phase===`error`,A;t[86]===n?A=t[87]:(A=n?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(ee,{className:`mr-2 h-4 w-4`,"aria-hidden":`true`}),(0,E.jsx)(r,{id:`NKkZXl`})]}):(0,E.jsx)(r,{id:`NKkZXl`}),t[86]=n,t[87]=A);let j;t[88]!==y||t[89]!==O||t[90]!==k||t[91]!==A?(j=(0,E.jsx)(o,{onClick:y,disabled:O,"aria-disabled":k,"data-testid":`share-receive-consent-initialize`,children:A}),t[88]=y,t[89]=O,t[90]=k,t[91]=A,t[92]=j):j=t[92];let M;t[93]!==D||t[94]!==j?(M=(0,E.jsxs)(u,{children:[D,j]}),t[93]=D,t[94]=j,t[95]=M):M=t[95];let N;t[96]!==_||t[97]!==w||t[98]!==M?(N=(0,E.jsxs)(re,{className:`sm:max-w-xl`,"data-testid":`share-receive-consent-dialog`,onInteractOutside:ce,onPointerDownOutside:se,children:[_,w,M]}),t[96]=_,t[97]=w,t[98]=M,t[99]=N):N=t[99];let le;t[100]!==i||t[101]!==N?(le=(0,E.jsx)(d,{open:!0,onOpenChange:i,children:N}),t[100]=i,t[101]=N,t[102]=le):le=t[102],G=le;break bb0}if(!R||!z||!e){G=null;break bb0}B=g!==void 0&&!P;let O;t[103]!==S||t[104]!==P?(O=S(P?{id:`YjhKI5`}:{id:`LE7t79`}),t[103]=S,t[104]=P,t[105]=O):O=t[105],V=O,we=p(e)}t[15]=S,t[16]=N,t[17]=a,t[18]=g,t[19]=P,t[20]=I,t[21]=R,t[22]=T,t[23]=z,t[24]=v,t[25]=B,t[26]=V,t[27]=H,t[28]=U,t[29]=W,t[30]=we,t[31]=G,t[32]=K}else B=t[25],V=t[26],H=t[27],U=t[28],W=t[29],we=t[30],G=t[31],K=t[32];if(G!==Symbol.for(`react.early_return_sentinel`))return G;let Te=we,Ee=j?.authenticated?j.login:void 0,De;t[106]===F?De=t[107]:(De=F?.detail?m(F.detail):``,t[106]=F,t[107]=De);let Oe=De,q;t[108]===v?q=t[109]:(q=e=>{e||v.dismiss()},t[108]=v,t[109]=q);let J;t[110]===K?J=t[111]:(J=(0,E.jsx)(ne,{children:(0,E.jsx)(r,{id:`RY6Bq1`,values:{targetNoun:K}})}),t[110]=K,t[111]=J);let Y;t[112]===z.target?Y=t[113]:(Y=c(z.target)?` — ${c(z.target)}`:null,t[112]=z.target,t[113]=Y);let X;t[114]!==z.owner||t[115]!==z.repo||t[116]!==Y?(X=(0,E.jsxs)(te,{className:`sr-only`,children:[z.owner,`/`,z.repo,Y]}),t[114]=z.owner,t[115]=z.repo,t[116]=Y,t[117]=X):X=t[117];let ke=z.owner,Ae=z.repo,Z;t[118]===z.target?Z=t[119]:(Z=c(z.target),t[118]=z.target,t[119]=Z);let Q;t[120]!==z.branch||t[121]!==z.owner||t[122]!==z.repo||t[123]!==z.target.kind||t[124]!==Z?(Q=(0,E.jsx)(oe,{owner:ke,repo:Ae,path:Z,kind:z.target.kind,branch:z.branch,testId:`share-receive-metadata`,branchTestId:`share-receive-metadata-branch`}),t[120]=z.branch,t[121]=z.owner,t[122]=z.repo,t[123]=z.target.kind,t[124]=Z,t[125]=Q):Q=t[125];let je;t[126]!==J||t[127]!==X||t[128]!==Q?(je=(0,E.jsxs)(ie,{children:[J,X,Q]}),t[126]=J,t[127]=X,t[128]=Q,t[129]=je):je=t[129];let Me;t[130]!==g||t[131]!==B||t[132]!==F||t[133]!==Oe||t[134]!==V||t[135]!==P||t[136]!==H||t[137]!==U||t[138]!==T?(Me=F?(0,E.jsxs)(`div`,{ref:ge,tabIndex:-1,className:`rounded-lg border border-destructive/40 bg-destructive/5 p-4 outline-none`,"data-testid":`share-receive-clone-error`,children:[(0,E.jsx)(`p`,{className:`text-sm font-semibold text-foreground`,role:`alert`,children:(0,E.jsx)(r,{id:`aiArms`})}),Oe?(0,E.jsxs)(`p`,{className:`mt-2 break-words text-xs text-destructive`,"data-testid":`share-receive-clone-error-message`,children:[(0,E.jsx)(r,{id:`4BITzH`}),` `,(0,E.jsxs)(`span`,{className:`font-mono text-foreground/80`,children:[`"`,Oe,`"`]})]}):null,(0,E.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:(0,E.jsx)(r,{id:`Llyqvo`})}),(0,E.jsxs)(`ul`,{className:`mt-1 list-disc space-y-1 pl-5 text-sm text-muted-foreground`,"data-testid":`share-receive-clone-error-reasons`,children:[(0,E.jsx)(`li`,{children:(0,E.jsx)(r,{id:`6LbUG7`})}),(0,E.jsx)(`li`,{children:(0,E.jsx)(r,{id:`_pY_Vq`})}),(0,E.jsx)(`li`,{children:(0,E.jsx)(r,{id:`J6mxC1`})})]}),(0,E.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:[(0,E.jsx)(o,{onClick:()=>{H()},"data-testid":`share-receive-clone-retry`,children:(0,E.jsx)(r,{id:`KDw4GX`})}),(0,E.jsx)(o,{variant:`outline`,onClick:()=>{U()},disabled:T||P,"data-testid":`share-receive-error-local`,children:(0,E.jsx)(r,{id:`xFQRu4`})})]})]}):(0,E.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,E.jsxs)(`button`,{type:`button`,"data-testid":`share-receive-clone`,className:`flex flex-col items-start gap-2 rounded-lg border border-primary/50 bg-primary/5 p-4 text-left transition hover:border-primary hover:bg-primary/10 focus-visible:border-ring focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-primary/50 disabled:hover:bg-primary/5`,onClick:()=>{H()},disabled:g!==void 0&&!B,"aria-disabled":g!==void 0&&!B,children:[(0,E.jsx)(`span`,{className:`text-sm font-semibold`,children:V}),(0,E.jsx)(`span`,{className:`line-clamp-2 text-1sm text-muted-foreground`,children:(0,E.jsx)(r,{id:`fj5YiP`})})]}),(0,E.jsxs)(`button`,{type:`button`,"data-testid":`share-receive-local`,className:`flex flex-col items-start gap-2 rounded-lg border border-border bg-card p-4 text-left transition hover:border-foreground/50 hover:bg-accent focus-visible:border-ring focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50`,onClick:()=>{U()},disabled:T||P,children:[(0,E.jsx)(`span`,{className:`text-sm font-semibold`,children:(0,E.jsx)(r,{id:`HfI1dR`})}),(0,E.jsx)(`span`,{className:`line-clamp-2 text-1sm text-muted-foreground`,children:(0,E.jsx)(r,{id:`_qD6mn`})})]})]}),t[130]=g,t[131]=B,t[132]=F,t[133]=Oe,t[134]=V,t[135]=P,t[136]=H,t[137]=U,t[138]=T,t[139]=Me):Me=t[139];let Ne;t[140]!==N||t[141]!==j||t[142]!==g||t[143]!==W||t[144]!==Ee?(Ne=g?(0,E.jsx)(`div`,{className:`mt-3 flex items-center justify-between rounded-md border border-border bg-muted/30 px-3 py-2 text-xs`,"data-testid":`share-receive-auth-banner`,role:`status`,"aria-live":`polite`,children:j===null?(0,E.jsx)(`span`,{className:`text-muted-foreground`,children:(0,E.jsx)(r,{id:`UDFrWm`})}):j.authenticated?(0,E.jsx)(`span`,{className:`text-muted-foreground`,children:(0,E.jsx)(r,{id:`VAHWL_`,values:{signedInLogin:Ee},components:{0:(0,E.jsx)(`span`,{className:`font-medium text-foreground/90`})}})}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`span`,{className:`text-muted-foreground`,children:(0,E.jsx)(r,{id:`SgKLfA`})}),(0,E.jsx)(`button`,{type:`button`,"data-testid":`share-receive-signin`,className:`font-medium text-primary underline-offset-2 hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded`,onClick:()=>{W()},disabled:N,children:N?(0,E.jsx)(r,{id:`PKLY-1`}):(0,E.jsx)(r,{id:`3jod3l`})})]})}):null,t[140]=N,t[141]=j,t[142]=g,t[143]=W,t[144]=Ee,t[145]=Ne):Ne=t[145];let Pe;t[146]!==F||t[147]!==Te?(Pe=F?null:(0,E.jsx)(`p`,{className:`mt-3 text-1sm text-muted-foreground`,children:(0,E.jsx)(r,{id:`RJ3a8Z`,values:{lookingForUrl:Te},components:{0:(0,E.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}),t[146]=F,t[147]=Te,t[148]=Pe):Pe=t[148];let Fe;t[149]!==Me||t[150]!==Ne||t[151]!==Pe?(Fe=(0,E.jsxs)(l,{children:[Me,Ne,Pe]}),t[149]=Me,t[150]=Ne,t[151]=Pe,t[152]=Fe):Fe=t[152];let Ie;t[153]===v?Ie=t[154]:(Ie=()=>v.dismiss(),t[153]=v,t[154]=Ie);let Le;t[155]===Symbol.for(`react.memo_cache_sentinel`)?(Le=(0,E.jsx)(r,{id:`dEgA5A`}),t[155]=Le):Le=t[155];let Re;t[156]===Ie?Re=t[157]:(Re=(0,E.jsx)(u,{children:(0,E.jsx)(o,{variant:`outline`,onClick:Ie,children:Le})}),t[156]=Ie,t[157]=Re);let $;t[158]!==je||t[159]!==Fe||t[160]!==Re?($=(0,E.jsxs)(re,{className:`sm:max-w-xl`,"data-testid":`share-receive-dialog`,children:[je,Fe,Re]}),t[158]=je,t[159]=Fe,t[160]=Re,t[161]=$):$=t[161];let ze;return t[162]!==q||t[163]!==$?(ze=(0,E.jsx)(d,{open:!0,onOpenChange:q,children:$}),t[162]=q,t[163]=$,t[164]=ze):ze=t[164],ze}function se(e){return e.preventDefault()}function ce(e){return e.preventDefault()}function le(e){return e===null?e:T(e)}function ue(e){return e===null?e:w(e,{ok:!0})}function de(e){return e===null?e:S(e)}export{A as ShareReceiveDialog};
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 c}from"./desktop-bridge-types-BxqZkaz9.js";import{t as ee}from"./spinner-Bx8xD6f8.js";import{a as te,c as ne,i as re,n as l,o as u,s as ie,t as d}from"./dialog-BJEjKJjL.js";import{a as f,c as p,i as m,l as h,n as g,o as _,r as ae,s as v}from"./receive-store-O9cRwWtJ.js";import{t as oe}from"./share-metadata-rows-mAclt7sW.js";var y=e(n(),1),b=a(),x=e=>({phase:`ready`,seed:e});function S(e){return e.phase===`ready`?{phase:`initializing`,seed:e.seed}:e}function C(e,t){return e.phase===`initializing`?t.ok?{phase:`opening`,seed:e.seed}:{phase:`error`,seed:e.seed,reason:t.reason,message:t.message}:e}function w(e,t){return e.phase===`opening`?t.ok?{phase:`done`,seed:e.seed}:{phase:`error`,seed:e.seed,reason:`network-error`,message:t.message}:e}function T(e){return e.phase===`done`||e.phase===`cancelled`||e.phase===`error`?e:{phase:`cancelled`,seed:e.seed}}var E=t();function D(e){return{kind:e.target.kind,path:c(e.target),repositoryPath:c(e.repositoryTarget),...e.contentRootDepth===null?{}:{contentRootDepth:e.contentRootDepth}}}function O(e){return e!==null&&e.kind===`launcher-consent`}function k(e){return e!==null&&e.kind===`launcher-miss`}function A(e){let t=(0,b.c)(14),{bridge:n,cloneController:r,store:i}=e,a=i===void 0?g:i,o=(0,y.useSyncExternalStore)(a.subscribe,a.getSnapshot,M),[c,ee]=(0,y.useState)(0),[te,ne]=(0,y.useState)(o);o!==te&&(ne(o),ee(j));let re,l;t[0]!==o||t[1]!==a?(re=()=>{if(!o)return;let e=v(o);e&&(s.error(e.message),a.dismiss())},l=[o,a],t[0]=o,t[1]=a,t[2]=re,t[3]=l):(re=t[2],l=t[3]),(0,y.useEffect)(re,l);let u;t[4]===o?u=t[5]:(u=k(o)?o:null,t[4]=o,t[5]=u);let ie=u,d;t[6]===o?d=t[7]:(d=O(o)?o:null,t[6]=o,t[7]=d);let f=d??ie;if(!f)return null;let p;return t[8]!==f||t[9]!==n||t[10]!==r||t[11]!==c||t[12]!==a?(p=(0,E.jsx)(N,{payload:f,bridge:n,cloneController:r,store:a},c),t[8]=f,t[9]=n,t[10]=r,t[11]=c,t[12]=a,t[13]=p):p=t[13],p}function j(e){return e+1}function M(){return null}function N(e){let t=(0,b.c)(165),{payload:n,bridge:a,cloneController:g,store:v}=e,{_:S}=i(),[T,A]=(0,y.useState)(!1),[j,M]=(0,y.useState)(null),[N,fe]=(0,y.useState)(!1),[P,pe]=(0,y.useState)(!1),[F,me]=(0,y.useState)(null),[I,L]=(0,y.useState)(null),he=(0,y.useRef)(!1),ge=(0,y.useRef)(null),_e,ve;t[0]===F?(_e=t[1],ve=t[2]):(_e=()=>{F&&ge.current?.focus()},ve=[F],t[0]=F,t[1]=_e,t[2]=ve),(0,y.useEffect)(_e,ve);let ye;t[3]!==I||t[4]!==n?(ye=()=>{O(n)&&I===null&&(console.warn(`[receive] q1_hit=true selection=branch_match_non_ok candidate=${n.candidatePath}`),L(x({candidatePath:n.candidatePath,branch:n.share.branch,targetPath:c(n.share.target),targetKind:n.share.target.kind,repositoryPath:c(n.share.repositoryTarget),...n.share.contentRootDepth===null?{}:{contentRootDepth:n.share.contentRootDepth},parentProjectName:n.parentProjectName})))},t[3]=I,t[4]=n,t[5]=ye):ye=t[5];let be;t[6]===n?be=t[7]:(be=[n],t[6]=n,t[7]=be),(0,y.useEffect)(ye,be);let xe;t[8]!==j||t[9]!==g||t[10]!==n?(xe=()=>{if(!g||!k(n)||j!==null||he.current)return;he.current=!0,fe(!0);let e=n.share.host;g.getAuthStatus(e).then(e=>{M(e)}).catch(t=>{console.warn(`[receive] auth pre-flight probe failed`,t instanceof Error?t.message:t),M({authenticated:!1,host:e})}).finally(()=>{fe(!1)})},t[8]=j,t[9]=g,t[10]=n,t[11]=xe):xe=t[11];let Se;t[12]!==j||t[13]!==n?(Se=[n,j],t[12]=j,t[13]=n,t[14]=Se):Se=t[14],(0,y.useEffect)(xe,Se);let R=k(n)?n:null,Ce=O(n)?n:null,z=R?.share??Ce?.share??null,B,V,H,U,W,we,G,K;if(t[15]!==S||t[16]!==N||t[17]!==a||t[18]!==g||t[19]!==P||t[20]!==I||t[21]!==R||t[22]!==T||t[23]!==z||t[24]!==v){G=Symbol.for(`react.early_return_sentinel`);bb0:{let e=z?{host:z.host,owner:z.owner,repo:z.repo}:null,n;t[33]!==S||t[34]!==z?.target.kind?(n=z?.target.kind===`folder`?S({id:`ugoTXs`}):S({id:`XH30C4`}),t[33]=S,t[34]=z?.target.kind,t[35]=n):n=t[35],K=n,H=async function(){if(!R||!e)return;if(console.log(f({q2_path:`clone`})),!g){s.info(S({id:`27XW26`}),{action:{label:S({id:`B3NAZC`}),onClick:()=>{a.navigator.open()}},duration:8e3});return}if(P)return;me(null),pe(!0);let t=ae(e),n;try{n=await g.runClone({url:t,branch:R.share.branch})}catch(e){let t=e;console.warn(`[receive] runClone threw unexpectedly`,t),pe(!1),me({detail:t instanceof Error?t.message:String(t)});return}if(pe(!1),n.kind===`error`){me({detail:n.detail??null});return}if(n.kind===`ok`){try{await a.project.open({path:n.dir,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:D(R.share)}),v.dismiss()}catch(e){let t=e;console.warn(`[receive] project open after clone failed`,t instanceof Error?t.message:t),s.error(S({id:`438Fca`}))}return}};let i;t[36]!==S||t[37]!==N||t[38]!==g?(i=async function(){if(!(!g||N)){fe(!0);try{let e=await g.startSignIn();fe(!1),e!==null&&M(e)}catch(e){let t=e;fe(!1),console.warn(`[receive] startSignIn failed`,t instanceof Error?t.message:t),s.error(S({id:`lzwo7p`}))}}},t[36]=S,t[37]=N,t[38]=g,t[39]=i):i=t[39],W=i,U=async function(){if(!(!R||!e||T)){me(null),A(!0),console.log(f({q2_path:`local`}));try{for(;;){let t=await a.dialog.openFolder();if(!t)break;let n=await a.share.validateLocalFolder({folderPath:t,host:e.host,owner:e.owner,repo:e.repo});if(console.log(f({folder_validate:n.kind})),n.kind===`ok`){let e=R.share.branch,n={currentBranch:null,headSha:null,detached:!1};try{n=await a.project.readHeadBranch(t)}catch(e){let t=e;console.warn(`[receive] local-folder readHeadBranch failed`,t instanceof Error?t.message:t)}let r=h(e,n)!==`true`;try{await a.project.open({path:t,target:`new-window`,entryPoint:`share-receive`,...r?{pendingShareBranchSwitch:{share:R.share,projectPath:t,currentBranch:n.currentBranch}}:{pendingDeepLinkTarget:D(R.share)}}),v.dismiss()}catch(e){let t=e;console.warn(`[receive] local-folder-open failed`,t instanceof Error?t.message:t),s.error(S({id:`phM8Kh`}))}break}let r=_(n,e);r&&s.error(r)}}catch(e){let t=e;console.warn(`[receive] local-folder-validate failed`,t instanceof Error?t.message:t),s.error(S({id:`rlUzXK`}))}A(!1)}};let m;t[40]!==S||t[41]!==a||t[42]!==I||t[43]!==v?(m=function(){if(I===null||I.phase!==`ready`)return;let e=I.seed;console.warn(`[receive] consent_dialog action=initialize worktree=${e.candidatePath}`),L(de),a.project.okInit({projectPath:e.candidatePath}).then(async t=>{if(t.ok===!0){L(e=>e===null?e:C(e,{ok:!0,projectPath:t.projectPath}));try{await a.project.open({path:t.projectPath,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:{kind:e.targetKind,path:e.targetPath,repositoryPath:e.repositoryPath??e.targetPath,...e.contentRootDepth===void 0?{}:{contentRootDepth:e.contentRootDepth}},pendingBranch:e.branch}),L(ue),v.dismiss()}catch(t){let n=t,r=n instanceof Error?n.message:String(n);L(e=>e===null?e:w(e,{ok:!1,message:r})),s.error(S({id:`nDT8qt`,values:{0:e.candidatePath}}))}return}let n=t.reason,r=t.message||`Initialization failed.`;L(e=>e===null?e:C(e,{ok:!1,reason:n,message:r})),s.error(r)}).catch(t=>{let n=t instanceof Error?t.message:String(t);L(e=>e===null?e:C(e,{ok:!1,reason:`network-error`,message:n})),s.error(S({id:`3Mwaly`,values:{0:e.candidatePath}}))})},t[40]=S,t[41]=a,t[42]=I,t[43]=v,t[44]=m):m=t[44];let y=m,b;t[45]!==I||t[46]!==v?(b=function(){I!==null&&console.warn(`[receive] consent_dialog action=cancel worktree=${I.seed.candidatePath}`),L(le),v.dismiss()},t[45]=I,t[46]=v,t[47]=b):b=t[47];let x=b;if(I!==null&&I.phase!==`cancelled`&&I.phase!==`done`&&z!==null){let e=I.seed,n=I.phase===`initializing`||I.phase===`opening`,i;t[48]===x?i=t[49]:(i=e=>{e||x()},t[48]=x,t[49]=i);let a;t[50]===K?a=t[51]:(a=(0,E.jsx)(ne,{children:(0,E.jsx)(r,{id:`RY6Bq1`,values:{targetNoun:K}})}),t[50]=K,t[51]=a);let s;t[52]===z.target?s=t[53]:(s=c(z.target)?`— ${c(z.target)}`:``,t[52]=z.target,t[53]=s);let f;t[54]!==z.owner||t[55]!==z.repo||t[56]!==s?(f=(0,E.jsx)(te,{className:`sr-only`,children:(0,E.jsx)(r,{id:`pgq_xf`,values:{0:z.owner,1:z.repo,2:s}})}),t[54]=z.owner,t[55]=z.repo,t[56]=s,t[57]=f):f=t[57];let p=z.owner,m=z.repo,h;t[58]===z.target?h=t[59]:(h=c(z.target),t[58]=z.target,t[59]=h);let g;t[60]!==z.branch||t[61]!==z.owner||t[62]!==z.repo||t[63]!==z.target.kind||t[64]!==h?(g=(0,E.jsx)(oe,{owner:p,repo:m,path:h,kind:z.target.kind,branch:z.branch,testId:`share-receive-metadata`,branchTestId:`share-receive-metadata-branch`}),t[60]=z.branch,t[61]=z.owner,t[62]=z.repo,t[63]=z.target.kind,t[64]=h,t[65]=g):g=t[65];let _;t[66]!==a||t[67]!==f||t[68]!==g?(_=(0,E.jsxs)(ie,{children:[a,f,g]}),t[66]=a,t[67]=f,t[68]=g,t[69]=_):_=t[69];let ae;t[70]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,E.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,E.jsx)(r,{id:`KsAPaB`})}),t[70]=ae):ae=t[70];let v;t[71]===e.candidatePath?v=t[72]:(v=(0,E.jsx)(`p`,{className:`mt-2 break-all rounded bg-muted px-2 py-1 font-mono text-xs text-foreground/80`,"data-testid":`share-receive-consent-path`,children:e.candidatePath}),t[71]=e.candidatePath,t[72]=v);let b;t[73]===e.parentProjectName?b=t[74]:(b=e.parentProjectName===null?null:(0,E.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,"data-testid":`share-receive-consent-parent`,children:(0,E.jsx)(r,{id:`JmfgFc`,values:{0:e.parentProjectName}})}),t[73]=e.parentProjectName,t[74]=b);let S;t[75]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,E.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:(0,E.jsx)(r,{id:`w7SsvI`})}),t[75]=S):S=t[75];let C;t[76]!==I.message||t[77]!==I.phase?(C=I.phase===`error`?(0,E.jsx)(`p`,{className:`mt-3 text-sm text-destructive`,"data-testid":`share-receive-consent-error`,role:`alert`,children:I.message}):null,t[76]=I.message,t[77]=I.phase,t[78]=C):C=t[78];let w;t[79]!==v||t[80]!==b||t[81]!==C?(w=(0,E.jsxs)(l,{children:[ae,v,b,S,C]}),t[79]=v,t[80]=b,t[81]=C,t[82]=w):w=t[82];let T;t[83]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,E.jsx)(r,{id:`dEgA5A`}),t[83]=T):T=t[83];let D;t[84]===x?D=t[85]:(D=(0,E.jsx)(o,{variant:`ghost`,onClick:x,"data-testid":`share-receive-consent-cancel`,children:T}),t[84]=x,t[85]=D);let O=n||I.phase===`error`,k=n||I.phase===`error`,A;t[86]===n?A=t[87]:(A=n?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(ee,{className:`mr-2 h-4 w-4`,"aria-hidden":`true`}),(0,E.jsx)(r,{id:`NKkZXl`})]}):(0,E.jsx)(r,{id:`NKkZXl`}),t[86]=n,t[87]=A);let j;t[88]!==y||t[89]!==O||t[90]!==k||t[91]!==A?(j=(0,E.jsx)(o,{onClick:y,disabled:O,"aria-disabled":k,"data-testid":`share-receive-consent-initialize`,children:A}),t[88]=y,t[89]=O,t[90]=k,t[91]=A,t[92]=j):j=t[92];let M;t[93]!==D||t[94]!==j?(M=(0,E.jsxs)(u,{children:[D,j]}),t[93]=D,t[94]=j,t[95]=M):M=t[95];let N;t[96]!==_||t[97]!==w||t[98]!==M?(N=(0,E.jsxs)(re,{className:`sm:max-w-xl`,"data-testid":`share-receive-consent-dialog`,onInteractOutside:ce,onPointerDownOutside:se,children:[_,w,M]}),t[96]=_,t[97]=w,t[98]=M,t[99]=N):N=t[99];let le;t[100]!==i||t[101]!==N?(le=(0,E.jsx)(d,{open:!0,onOpenChange:i,children:N}),t[100]=i,t[101]=N,t[102]=le):le=t[102],G=le;break bb0}if(!R||!z||!e){G=null;break bb0}B=g!==void 0&&!P;let O;t[103]!==S||t[104]!==P?(O=S(P?{id:`YjhKI5`}:{id:`LE7t79`}),t[103]=S,t[104]=P,t[105]=O):O=t[105],V=O,we=p(e)}t[15]=S,t[16]=N,t[17]=a,t[18]=g,t[19]=P,t[20]=I,t[21]=R,t[22]=T,t[23]=z,t[24]=v,t[25]=B,t[26]=V,t[27]=H,t[28]=U,t[29]=W,t[30]=we,t[31]=G,t[32]=K}else B=t[25],V=t[26],H=t[27],U=t[28],W=t[29],we=t[30],G=t[31],K=t[32];if(G!==Symbol.for(`react.early_return_sentinel`))return G;let Te=we,Ee=j?.authenticated?j.login:void 0,De;t[106]===F?De=t[107]:(De=F?.detail?m(F.detail):``,t[106]=F,t[107]=De);let Oe=De,q;t[108]===v?q=t[109]:(q=e=>{e||v.dismiss()},t[108]=v,t[109]=q);let J;t[110]===K?J=t[111]:(J=(0,E.jsx)(ne,{children:(0,E.jsx)(r,{id:`RY6Bq1`,values:{targetNoun:K}})}),t[110]=K,t[111]=J);let Y;t[112]===z.target?Y=t[113]:(Y=c(z.target)?` — ${c(z.target)}`:null,t[112]=z.target,t[113]=Y);let X;t[114]!==z.owner||t[115]!==z.repo||t[116]!==Y?(X=(0,E.jsxs)(te,{className:`sr-only`,children:[z.owner,`/`,z.repo,Y]}),t[114]=z.owner,t[115]=z.repo,t[116]=Y,t[117]=X):X=t[117];let ke=z.owner,Ae=z.repo,Z;t[118]===z.target?Z=t[119]:(Z=c(z.target),t[118]=z.target,t[119]=Z);let Q;t[120]!==z.branch||t[121]!==z.owner||t[122]!==z.repo||t[123]!==z.target.kind||t[124]!==Z?(Q=(0,E.jsx)(oe,{owner:ke,repo:Ae,path:Z,kind:z.target.kind,branch:z.branch,testId:`share-receive-metadata`,branchTestId:`share-receive-metadata-branch`}),t[120]=z.branch,t[121]=z.owner,t[122]=z.repo,t[123]=z.target.kind,t[124]=Z,t[125]=Q):Q=t[125];let je;t[126]!==J||t[127]!==X||t[128]!==Q?(je=(0,E.jsxs)(ie,{children:[J,X,Q]}),t[126]=J,t[127]=X,t[128]=Q,t[129]=je):je=t[129];let Me;t[130]!==g||t[131]!==B||t[132]!==F||t[133]!==Oe||t[134]!==V||t[135]!==P||t[136]!==H||t[137]!==U||t[138]!==T?(Me=F?(0,E.jsxs)(`div`,{ref:ge,tabIndex:-1,className:`rounded-lg border border-destructive/40 bg-destructive/5 p-4 outline-none`,"data-testid":`share-receive-clone-error`,children:[(0,E.jsx)(`p`,{className:`text-sm font-semibold text-foreground`,role:`alert`,children:(0,E.jsx)(r,{id:`aiArms`})}),Oe?(0,E.jsxs)(`p`,{className:`mt-2 break-words text-xs text-destructive`,"data-testid":`share-receive-clone-error-message`,children:[(0,E.jsx)(r,{id:`4BITzH`}),` `,(0,E.jsxs)(`span`,{className:`font-mono text-foreground/80`,children:[`"`,Oe,`"`]})]}):null,(0,E.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:(0,E.jsx)(r,{id:`Llyqvo`})}),(0,E.jsxs)(`ul`,{className:`mt-1 list-disc space-y-1 pl-5 text-sm text-muted-foreground`,"data-testid":`share-receive-clone-error-reasons`,children:[(0,E.jsx)(`li`,{children:(0,E.jsx)(r,{id:`6LbUG7`})}),(0,E.jsx)(`li`,{children:(0,E.jsx)(r,{id:`_pY_Vq`})}),(0,E.jsx)(`li`,{children:(0,E.jsx)(r,{id:`J6mxC1`})})]}),(0,E.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:[(0,E.jsx)(o,{onClick:()=>{H()},"data-testid":`share-receive-clone-retry`,children:(0,E.jsx)(r,{id:`KDw4GX`})}),(0,E.jsx)(o,{variant:`outline`,onClick:()=>{U()},disabled:T||P,"data-testid":`share-receive-error-local`,children:(0,E.jsx)(r,{id:`xFQRu4`})})]})]}):(0,E.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,E.jsxs)(`button`,{type:`button`,"data-testid":`share-receive-clone`,className:`flex flex-col items-start gap-2 rounded-lg border border-primary/50 bg-primary/5 p-4 text-left transition hover:border-primary hover:bg-primary/10 focus-visible:border-ring focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-primary/50 disabled:hover:bg-primary/5`,onClick:()=>{H()},disabled:g!==void 0&&!B,"aria-disabled":g!==void 0&&!B,children:[(0,E.jsx)(`span`,{className:`text-sm font-semibold`,children:V}),(0,E.jsx)(`span`,{className:`line-clamp-2 text-1sm text-muted-foreground`,children:(0,E.jsx)(r,{id:`fj5YiP`})})]}),(0,E.jsxs)(`button`,{type:`button`,"data-testid":`share-receive-local`,className:`flex flex-col items-start gap-2 rounded-lg border border-border bg-card p-4 text-left transition hover:border-foreground/50 hover:bg-accent focus-visible:border-ring focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50`,onClick:()=>{U()},disabled:T||P,children:[(0,E.jsx)(`span`,{className:`text-sm font-semibold`,children:(0,E.jsx)(r,{id:`HfI1dR`})}),(0,E.jsx)(`span`,{className:`line-clamp-2 text-1sm text-muted-foreground`,children:(0,E.jsx)(r,{id:`_qD6mn`})})]})]}),t[130]=g,t[131]=B,t[132]=F,t[133]=Oe,t[134]=V,t[135]=P,t[136]=H,t[137]=U,t[138]=T,t[139]=Me):Me=t[139];let Ne;t[140]!==N||t[141]!==j||t[142]!==g||t[143]!==W||t[144]!==Ee?(Ne=g?(0,E.jsx)(`div`,{className:`mt-3 flex items-center justify-between rounded-md border border-border bg-muted/30 px-3 py-2 text-xs`,"data-testid":`share-receive-auth-banner`,role:`status`,"aria-live":`polite`,children:j===null?(0,E.jsx)(`span`,{className:`text-muted-foreground`,children:(0,E.jsx)(r,{id:`UDFrWm`})}):j.authenticated?(0,E.jsx)(`span`,{className:`text-muted-foreground`,children:(0,E.jsx)(r,{id:`VAHWL_`,values:{signedInLogin:Ee},components:{0:(0,E.jsx)(`span`,{className:`font-medium text-foreground/90`})}})}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`span`,{className:`text-muted-foreground`,children:(0,E.jsx)(r,{id:`SgKLfA`})}),(0,E.jsx)(`button`,{type:`button`,"data-testid":`share-receive-signin`,className:`font-medium text-primary underline-offset-2 hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded`,onClick:()=>{W()},disabled:N,children:N?(0,E.jsx)(r,{id:`PKLY-1`}):(0,E.jsx)(r,{id:`3jod3l`})})]})}):null,t[140]=N,t[141]=j,t[142]=g,t[143]=W,t[144]=Ee,t[145]=Ne):Ne=t[145];let Pe;t[146]!==F||t[147]!==Te?(Pe=F?null:(0,E.jsx)(`p`,{className:`mt-3 text-1sm text-muted-foreground`,children:(0,E.jsx)(r,{id:`RJ3a8Z`,values:{lookingForUrl:Te},components:{0:(0,E.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}),t[146]=F,t[147]=Te,t[148]=Pe):Pe=t[148];let Fe;t[149]!==Me||t[150]!==Ne||t[151]!==Pe?(Fe=(0,E.jsxs)(l,{children:[Me,Ne,Pe]}),t[149]=Me,t[150]=Ne,t[151]=Pe,t[152]=Fe):Fe=t[152];let Ie;t[153]===v?Ie=t[154]:(Ie=()=>v.dismiss(),t[153]=v,t[154]=Ie);let Le;t[155]===Symbol.for(`react.memo_cache_sentinel`)?(Le=(0,E.jsx)(r,{id:`dEgA5A`}),t[155]=Le):Le=t[155];let Re;t[156]===Ie?Re=t[157]:(Re=(0,E.jsx)(u,{children:(0,E.jsx)(o,{variant:`outline`,onClick:Ie,children:Le})}),t[156]=Ie,t[157]=Re);let $;t[158]!==je||t[159]!==Fe||t[160]!==Re?($=(0,E.jsxs)(re,{className:`sm:max-w-xl`,"data-testid":`share-receive-dialog`,children:[je,Fe,Re]}),t[158]=je,t[159]=Fe,t[160]=Re,t[161]=$):$=t[161];let ze;return t[162]!==q||t[163]!==$?(ze=(0,E.jsx)(d,{open:!0,onOpenChange:q,children:$}),t[162]=q,t[163]=$,t[164]=ze):ze=t[164],ze}function se(e){return e.preventDefault()}function ce(e){return e.preventDefault()}function le(e){return e===null?e:T(e)}function ue(e){return e===null?e:w(e,{ok:!0})}function de(e){return e===null?e:S(e)}export{A as ShareReceiveDialog};
@@ -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-ienh9z35.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-CTKqE4f9.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{t as e}from"./jsx-runtime-BUgB2tll.js";import{n as t,r as n}from"./dist-Nvb76hAm.js";import{t as r}from"./compiler-runtime-BfE3aGVn.js";import{i,n as a,r as o,t as s}from"./tooltip-DBqLYfio.js";import{Q as c}from"./schemas-api-DbKS2FSh.js";import{t as l}from"./triangle-alert-BXrUEeRU.js";var u=r(),d=e();function f(e){return e<1e3?`${e}`:`${Math.round(e/100)/10}k`}function p(e){let t=(0,u.c)(33),{tokens:r,budget:c}=e,{_:p}=n(),m=c!==void 0&&r>c,h,g,_,v,y,b,x,S;if(t[0]!==p||t[1]!==c||t[2]!==m||t[3]!==r){S=Symbol.for(`react.early_return_sentinel`);bb0:{let e=c===void 0?``:f(c),n=m||void 0,u=m?`text-amber-600 dark:text-amber-500`:void 0,C;t[12]===r?C=t[13]:(C=f(r),t[12]=r,t[13]=C);let w=m?(0,d.jsx)(`span`,{role:`img`,"aria-label":p({id:`nem6R7`,values:{budgetLabel:e}}),children:(0,d.jsx)(l,{className:`ms-0.5 inline size-3 align-[-0.1em]`,"aria-hidden":`true`})}):null,T;t[14]!==n||t[15]!==u||t[16]!==C||t[17]!==w?(T=(0,d.jsxs)(`span`,{"data-over-budget":n,className:u,children:[C,w]}),t[14]=n,t[15]=u,t[16]=C,t[17]=w,t[18]=T):T=t[18];let E=T;if(!m){S=E;break bb0}_=o,g=s,t[19]===E?x=t[20]:(x=(0,d.jsx)(i,{asChild:!0,children:E}),t[19]=E,t[20]=x),h=a,v=`right`,y=`max-w-xs`,b=p({id:`JsHvhz`,values:{budgetLabel:e}})}t[0]=p,t[1]=c,t[2]=m,t[3]=r,t[4]=h,t[5]=g,t[6]=_,t[7]=v,t[8]=y,t[9]=b,t[10]=x,t[11]=S}else h=t[4],g=t[5],_=t[6],v=t[7],y=t[8],b=t[9],x=t[10],S=t[11];if(S!==Symbol.for(`react.early_return_sentinel`))return S;let C;t[21]!==h||t[22]!==v||t[23]!==y||t[24]!==b?(C=(0,d.jsx)(h,{side:v,className:y,children:b}),t[21]=h,t[22]=v,t[23]=y,t[24]=b,t[25]=C):C=t[25];let w;t[26]!==g||t[27]!==x||t[28]!==C?(w=(0,d.jsxs)(g,{children:[x,C]}),t[26]=g,t[27]=x,t[28]=C,t[29]=w):w=t[29];let T;return t[30]!==_||t[31]!==w?(T=(0,d.jsx)(_,{children:w}),t[30]=_,t[31]=w,t[32]=T):T=t[32],T}function m(e){let n=(0,u.c)(22),{size:r}=e,i=r.alwaysOn+r.onTrigger+r.onDemand,a;n[0]===r.alwaysOn?a=n[1]:(a=(0,d.jsx)(p,{tokens:r.alwaysOn,budget:100}),n[0]=r.alwaysOn,n[1]=a);let o;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,d.jsx)(t,{id:`eTsJYJ`}),n[2]=o):o=n[2];let s;n[3]===a?s=n[4]:(s=(0,d.jsxs)(`span`,{children:[a,` `,o]}),n[3]=a,n[4]=s);let l;n[5]===r.onTrigger?l=n[6]:(l=(0,d.jsxs)(`span`,{children:[(0,d.jsx)(p,{tokens:r.onTrigger,budget:c}),` SKILL.md`]}),n[5]=r.onTrigger,n[6]=l);let f;n[7]===r.onDemand?f=n[8]:(f=(0,d.jsx)(p,{tokens:r.onDemand}),n[7]=r.onDemand,n[8]=f);let m;n[9]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,d.jsx)(t,{id:`ae9Ozt`}),n[9]=m):m=n[9];let h;n[10]===f?h=n[11]:(h=(0,d.jsxs)(`span`,{children:[f,` `,m]}),n[10]=f,n[11]=h);let g;n[12]===i?g=n[13]:(g=(0,d.jsx)(p,{tokens:i}),n[12]=i,n[13]=g);let _;n[14]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,d.jsx)(t,{id:`ONchxy`}),n[14]=_):_=n[14];let v;n[15]===g?v=n[16]:(v=(0,d.jsxs)(`span`,{className:`text-foreground/80`,children:[g,` `,_]}),n[15]=g,n[16]=v);let y;return n[17]!==v||n[18]!==s||n[19]!==l||n[20]!==h?(y=(0,d.jsxs)(`span`,{"data-testid":`skill-cost-value`,className:`flex flex-col gap-0.5 font-mono text-[13px] text-muted-foreground`,children:[s,l,h,v]}),n[17]=v,n[18]=s,n[19]=l,n[20]=h,n[21]=y):y=n[21],y}export{f as n,m as t};
1
+ import{t as e}from"./jsx-runtime-BUgB2tll.js";import{n as t,r as n}from"./dist-Nvb76hAm.js";import{t as r}from"./compiler-runtime-BfE3aGVn.js";import{i,n as a,r as o,t as s}from"./tooltip-DBqLYfio.js";import{Q as c}from"./schemas-api-CQHNNDP6.js";import{t as l}from"./triangle-alert-BXrUEeRU.js";var u=r(),d=e();function f(e){return e<1e3?`${e}`:`${Math.round(e/100)/10}k`}function p(e){let t=(0,u.c)(33),{tokens:r,budget:c}=e,{_:p}=n(),m=c!==void 0&&r>c,h,g,_,v,y,b,x,S;if(t[0]!==p||t[1]!==c||t[2]!==m||t[3]!==r){S=Symbol.for(`react.early_return_sentinel`);bb0:{let e=c===void 0?``:f(c),n=m||void 0,u=m?`text-amber-600 dark:text-amber-500`:void 0,C;t[12]===r?C=t[13]:(C=f(r),t[12]=r,t[13]=C);let w=m?(0,d.jsx)(`span`,{role:`img`,"aria-label":p({id:`nem6R7`,values:{budgetLabel:e}}),children:(0,d.jsx)(l,{className:`ms-0.5 inline size-3 align-[-0.1em]`,"aria-hidden":`true`})}):null,T;t[14]!==n||t[15]!==u||t[16]!==C||t[17]!==w?(T=(0,d.jsxs)(`span`,{"data-over-budget":n,className:u,children:[C,w]}),t[14]=n,t[15]=u,t[16]=C,t[17]=w,t[18]=T):T=t[18];let E=T;if(!m){S=E;break bb0}_=o,g=s,t[19]===E?x=t[20]:(x=(0,d.jsx)(i,{asChild:!0,children:E}),t[19]=E,t[20]=x),h=a,v=`right`,y=`max-w-xs`,b=p({id:`JsHvhz`,values:{budgetLabel:e}})}t[0]=p,t[1]=c,t[2]=m,t[3]=r,t[4]=h,t[5]=g,t[6]=_,t[7]=v,t[8]=y,t[9]=b,t[10]=x,t[11]=S}else h=t[4],g=t[5],_=t[6],v=t[7],y=t[8],b=t[9],x=t[10],S=t[11];if(S!==Symbol.for(`react.early_return_sentinel`))return S;let C;t[21]!==h||t[22]!==v||t[23]!==y||t[24]!==b?(C=(0,d.jsx)(h,{side:v,className:y,children:b}),t[21]=h,t[22]=v,t[23]=y,t[24]=b,t[25]=C):C=t[25];let w;t[26]!==g||t[27]!==x||t[28]!==C?(w=(0,d.jsxs)(g,{children:[x,C]}),t[26]=g,t[27]=x,t[28]=C,t[29]=w):w=t[29];let T;return t[30]!==_||t[31]!==w?(T=(0,d.jsx)(_,{children:w}),t[30]=_,t[31]=w,t[32]=T):T=t[32],T}function m(e){let n=(0,u.c)(22),{size:r}=e,i=r.alwaysOn+r.onTrigger+r.onDemand,a;n[0]===r.alwaysOn?a=n[1]:(a=(0,d.jsx)(p,{tokens:r.alwaysOn,budget:100}),n[0]=r.alwaysOn,n[1]=a);let o;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,d.jsx)(t,{id:`eTsJYJ`}),n[2]=o):o=n[2];let s;n[3]===a?s=n[4]:(s=(0,d.jsxs)(`span`,{children:[a,` `,o]}),n[3]=a,n[4]=s);let l;n[5]===r.onTrigger?l=n[6]:(l=(0,d.jsxs)(`span`,{children:[(0,d.jsx)(p,{tokens:r.onTrigger,budget:c}),` SKILL.md`]}),n[5]=r.onTrigger,n[6]=l);let f;n[7]===r.onDemand?f=n[8]:(f=(0,d.jsx)(p,{tokens:r.onDemand}),n[7]=r.onDemand,n[8]=f);let m;n[9]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,d.jsx)(t,{id:`ae9Ozt`}),n[9]=m):m=n[9];let h;n[10]===f?h=n[11]:(h=(0,d.jsxs)(`span`,{children:[f,` `,m]}),n[10]=f,n[11]=h);let g;n[12]===i?g=n[13]:(g=(0,d.jsx)(p,{tokens:i}),n[12]=i,n[13]=g);let _;n[14]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,d.jsx)(t,{id:`ONchxy`}),n[14]=_):_=n[14];let v;n[15]===g?v=n[16]:(v=(0,d.jsxs)(`span`,{className:`text-foreground/80`,children:[g,` `,_]}),n[15]=g,n[16]=v);let y;return n[17]!==v||n[18]!==s||n[19]!==l||n[20]!==h?(y=(0,d.jsxs)(`span`,{"data-testid":`skill-cost-value`,className:`flex flex-col gap-0.5 font-mono text-[13px] text-muted-foreground`,children:[s,l,h,v]}),n[17]=v,n[18]=s,n[19]=l,n[20]=h,n[21]=y):y=n[21],y}export{f as n,m as t};
@@ -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"./label-CvMpFFbN.js";import{t as s}from"./button-DzgjsZzC.js";import{n as c}from"./dist-BGzUo_18.js";import{O as ee}from"./schemas-api-DbKS2FSh.js";import{a as l,c as te,i as u,n as d,o as f,s as p,t as m}from"./dialog-BJEjKJjL.js";import{l as h}from"./skill-scope-N3jmnGIX.js";import{E as ne,u as re}from"./skills-api-B9YEcMtk.js";import{t as ie}from"./input-C-Qm8YDT.js";import{t as ae}from"./MultiFileDiff-BiPNiqPB.js";import{t as oe}from"./pierre-theme-CVT0rO1h.js";var se=a(),g=e(n(),1),_=t();function v(e){let t=(0,se.c)(60),{target:n,onOpenChange:a}=e,{_:v}=i(),y=(0,g.useId)(),[b,x]=(0,g.useState)(null),[S,C]=(0,g.useState)(null),[w,T]=(0,g.useState)(!1),[E,D]=(0,g.useState)(!1),[O,k]=(0,g.useState)(``),[A,j]=(0,g.useState)(!1),M;t[0]===n?M=t[1]:(M=()=>{if(x(null),C(null),T(!1),D(!1),!n)return;let{skill:e,editor:t}=n,r=e.absolutePath?.slice(0,-`/${e.path}`.length)??null;if(r===null){T(!0);return}let i=`${r}/${e.path.replace(/\/SKILL\.mdx?$/i,``)}`,a=`${r}/${h(t,e.scope)}/${e.name}`,o=new AbortController;for(let[t,n]of[[i,C],[a,x]])re({source:t,name:e.name},o.signal).then(e=>{o.signal.aborted||(e.ok?n(e.skillMd):T(!0))}).catch(()=>{o.signal.aborted||T(!0)});return()=>o.abort()},t[0]=n,t[1]=M);let N=n?.skill.scope,P=n?.skill.name,F=n?.editor,I;if(t[2]!==N||t[3]!==P||t[4]!==F?(I=[N,P,F],t[2]=N,t[3]=P,t[4]=F,t[5]=I):I=t[5],(0,g.useEffect)(M,I),!n)return null;let{skill:L,editor:R}=n,z;t[6]!==v||t[7]!==R||t[8]!==a||t[9]!==L.name||t[10]!==L.scope||t[11]!==n||t[12]!==O?(z=async function(e){if(!n)return;j(!0);let t=await ne({scope:L.scope,name:L.name,editor:R,action:e,...e===`rename`?{toName:O.trim()}:{}});if(j(!1),!t.ok){c.error(v({id:`MIF36T`,values:{0:t.error}}));return}c.success(v(e===`align`?{id:`QKgePK`,values:{editor:R}}:e===`make-source`?{id:`It9oAP`,values:{editor:R}}:{id:`b2ezG_`,values:{0:O.trim()}})),a(!1)},t[6]=v,t[7]=R,t[8]=a,t[9]=L.name,t[10]=L.scope,t[11]=n,t[12]=O,t[13]=z):z=t[13];let B=z,V,H;t[14]!==L.name||t[15]!==O?(H=O.trim(),V=H===``||!ee.test(H)||H===L.name,t[14]=L.name,t[15]=O,t[16]=V,t[17]=H):(V=t[16],H=t[17]);let U=V,W;t[18]!==A||t[19]!==a?(W=e=>{!e&&!A&&a(!1)},t[18]=A,t[19]=a,t[20]=W):W=t[20];let G;t[21]!==R||t[22]!==L.name?(G=(0,_.jsx)(te,{children:(0,_.jsx)(r,{id:`q8aCbb`,values:{0:L.name,editor:R}})}),t[21]=R,t[22]=L.name,t[23]=G):G=t[23];let K;t[24]===R?K=t[25]:(K=(0,_.jsx)(l,{children:(0,_.jsx)(r,{id:`QASTNu`,values:{editor:R}})}),t[24]=R,t[25]=K);let q;t[26]!==K||t[27]!==G?(q=(0,_.jsxs)(p,{children:[G,K]}),t[26]=K,t[27]=G,t[28]=q):q=t[28];let J;t[29]!==S||t[30]!==b||t[31]!==w||t[32]!==L.name?(J=S!==null&&b!==null?(0,_.jsx)(ae,{className:`pierre-diff`,oldFile:{name:L.name,contents:S},newFile:{name:L.name,contents:b},options:{overflow:`wrap`,diffStyle:`unified`,theme:oe()}}):w?(0,_.jsx)(`div`,{className:`flex min-h-56 items-center justify-center px-6 text-center text-muted-foreground text-sm`,children:(0,_.jsx)(r,{id:`5BlXTD`})}):(0,_.jsx)(`div`,{className:`flex min-h-56 items-center justify-center text-muted-foreground text-sm`,children:(0,_.jsx)(r,{id:`1V17kO`})}),t[29]=S,t[30]=b,t[31]=w,t[32]=L.name,t[33]=J):J=t[33];let Y;t[34]!==B||t[35]!==R||t[36]!==y||t[37]!==U||t[38]!==E||t[39]!==L.name||t[40]!==O||t[41]!==H?(Y=E?(0,_.jsxs)(`div`,{className:`mt-3 space-y-1.5`,children:[(0,_.jsx)(o,{htmlFor:y,children:(0,_.jsx)(r,{id:`pSimwP`,values:{editor:R}})}),(0,_.jsx)(ie,{id:y,value:O,onChange:e=>k(e.target.value),placeholder:`${L.name}-${R}`,"aria-invalid":U&&H!==``,onKeyDown:e=>{e.key===`Enter`&&!U&&B(`rename`)}})]}):null,t[34]=B,t[35]=R,t[36]=y,t[37]=U,t[38]=E,t[39]=L.name,t[40]=O,t[41]=H,t[42]=Y):Y=t[42];let X;t[43]!==J||t[44]!==Y?(X=(0,_.jsxs)(d,{className:`min-h-0 flex-1 overflow-auto`,children:[J,Y]}),t[43]=J,t[44]=Y,t[45]=X):X=t[45];let Z;t[46]!==B||t[47]!==A||t[48]!==R||t[49]!==U||t[50]!==E||t[51]!==L.name?(Z=(0,_.jsx)(f,{children:E?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(s,{variant:`outline`,onClick:()=>D(!1),disabled:A,children:(0,_.jsx)(r,{id:`iH8pgl`})}),(0,_.jsx)(s,{onClick:()=>void B(`rename`),disabled:A||U,children:(0,_.jsx)(r,{id:`AT0e50`})})]}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(s,{variant:`outline`,onClick:()=>{k(`${L.name}-${R}`),D(!0)},disabled:A,children:(0,_.jsx)(r,{id:`AT0e50`})}),(0,_.jsx)(s,{variant:`outline`,onClick:()=>void B(`make-source`),disabled:A,children:(0,_.jsx)(r,{id:`xWomUD`,values:{editor:R}})}),(0,_.jsx)(s,{onClick:()=>void B(`align`),disabled:A,children:(0,_.jsx)(r,{id:`PZn2LP`})})]})}),t[46]=B,t[47]=A,t[48]=R,t[49]=U,t[50]=E,t[51]=L.name,t[52]=Z):Z=t[52];let Q;t[53]!==q||t[54]!==X||t[55]!==Z?(Q=(0,_.jsxs)(u,{className:`flex max-h-[85vh] w-full flex-col sm:max-w-5xl`,children:[q,X,Z]}),t[53]=q,t[54]=X,t[55]=Z,t[56]=Q):Q=t[56];let $;return t[57]!==Q||t[58]!==W?($=(0,_.jsx)(m,{open:!0,onOpenChange:W,children:Q}),t[57]=Q,t[58]=W,t[59]=$):$=t[59],$}export{v as SkillForkDialog};
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"./label-CvMpFFbN.js";import{t as s}from"./button-DzgjsZzC.js";import{n as c}from"./dist-BGzUo_18.js";import{O as ee}from"./schemas-api-CQHNNDP6.js";import{a as l,c as te,i as u,n as d,o as f,s as p,t as m}from"./dialog-BJEjKJjL.js";import{l as h}from"./skill-scope-N3jmnGIX.js";import{E as ne,u as re}from"./skills-api-B7NWq2mZ.js";import{t as ie}from"./input-C-Qm8YDT.js";import{t as ae}from"./MultiFileDiff-BiPNiqPB.js";import{t as oe}from"./pierre-theme-CVT0rO1h.js";var se=a(),g=e(n(),1),_=t();function v(e){let t=(0,se.c)(60),{target:n,onOpenChange:a}=e,{_:v}=i(),y=(0,g.useId)(),[b,x]=(0,g.useState)(null),[S,C]=(0,g.useState)(null),[w,T]=(0,g.useState)(!1),[E,D]=(0,g.useState)(!1),[O,k]=(0,g.useState)(``),[A,j]=(0,g.useState)(!1),M;t[0]===n?M=t[1]:(M=()=>{if(x(null),C(null),T(!1),D(!1),!n)return;let{skill:e,editor:t}=n,r=e.absolutePath?.slice(0,-`/${e.path}`.length)??null;if(r===null){T(!0);return}let i=`${r}/${e.path.replace(/\/SKILL\.mdx?$/i,``)}`,a=`${r}/${h(t,e.scope)}/${e.name}`,o=new AbortController;for(let[t,n]of[[i,C],[a,x]])re({source:t,name:e.name},o.signal).then(e=>{o.signal.aborted||(e.ok?n(e.skillMd):T(!0))}).catch(()=>{o.signal.aborted||T(!0)});return()=>o.abort()},t[0]=n,t[1]=M);let N=n?.skill.scope,P=n?.skill.name,F=n?.editor,I;if(t[2]!==N||t[3]!==P||t[4]!==F?(I=[N,P,F],t[2]=N,t[3]=P,t[4]=F,t[5]=I):I=t[5],(0,g.useEffect)(M,I),!n)return null;let{skill:L,editor:R}=n,z;t[6]!==v||t[7]!==R||t[8]!==a||t[9]!==L.name||t[10]!==L.scope||t[11]!==n||t[12]!==O?(z=async function(e){if(!n)return;j(!0);let t=await ne({scope:L.scope,name:L.name,editor:R,action:e,...e===`rename`?{toName:O.trim()}:{}});if(j(!1),!t.ok){c.error(v({id:`MIF36T`,values:{0:t.error}}));return}c.success(v(e===`align`?{id:`QKgePK`,values:{editor:R}}:e===`make-source`?{id:`It9oAP`,values:{editor:R}}:{id:`b2ezG_`,values:{0:O.trim()}})),a(!1)},t[6]=v,t[7]=R,t[8]=a,t[9]=L.name,t[10]=L.scope,t[11]=n,t[12]=O,t[13]=z):z=t[13];let B=z,V,H;t[14]!==L.name||t[15]!==O?(H=O.trim(),V=H===``||!ee.test(H)||H===L.name,t[14]=L.name,t[15]=O,t[16]=V,t[17]=H):(V=t[16],H=t[17]);let U=V,W;t[18]!==A||t[19]!==a?(W=e=>{!e&&!A&&a(!1)},t[18]=A,t[19]=a,t[20]=W):W=t[20];let G;t[21]!==R||t[22]!==L.name?(G=(0,_.jsx)(te,{children:(0,_.jsx)(r,{id:`q8aCbb`,values:{0:L.name,editor:R}})}),t[21]=R,t[22]=L.name,t[23]=G):G=t[23];let K;t[24]===R?K=t[25]:(K=(0,_.jsx)(l,{children:(0,_.jsx)(r,{id:`QASTNu`,values:{editor:R}})}),t[24]=R,t[25]=K);let q;t[26]!==K||t[27]!==G?(q=(0,_.jsxs)(p,{children:[G,K]}),t[26]=K,t[27]=G,t[28]=q):q=t[28];let J;t[29]!==S||t[30]!==b||t[31]!==w||t[32]!==L.name?(J=S!==null&&b!==null?(0,_.jsx)(ae,{className:`pierre-diff`,oldFile:{name:L.name,contents:S},newFile:{name:L.name,contents:b},options:{overflow:`wrap`,diffStyle:`unified`,theme:oe()}}):w?(0,_.jsx)(`div`,{className:`flex min-h-56 items-center justify-center px-6 text-center text-muted-foreground text-sm`,children:(0,_.jsx)(r,{id:`5BlXTD`})}):(0,_.jsx)(`div`,{className:`flex min-h-56 items-center justify-center text-muted-foreground text-sm`,children:(0,_.jsx)(r,{id:`1V17kO`})}),t[29]=S,t[30]=b,t[31]=w,t[32]=L.name,t[33]=J):J=t[33];let Y;t[34]!==B||t[35]!==R||t[36]!==y||t[37]!==U||t[38]!==E||t[39]!==L.name||t[40]!==O||t[41]!==H?(Y=E?(0,_.jsxs)(`div`,{className:`mt-3 space-y-1.5`,children:[(0,_.jsx)(o,{htmlFor:y,children:(0,_.jsx)(r,{id:`pSimwP`,values:{editor:R}})}),(0,_.jsx)(ie,{id:y,value:O,onChange:e=>k(e.target.value),placeholder:`${L.name}-${R}`,"aria-invalid":U&&H!==``,onKeyDown:e=>{e.key===`Enter`&&!U&&B(`rename`)}})]}):null,t[34]=B,t[35]=R,t[36]=y,t[37]=U,t[38]=E,t[39]=L.name,t[40]=O,t[41]=H,t[42]=Y):Y=t[42];let X;t[43]!==J||t[44]!==Y?(X=(0,_.jsxs)(d,{className:`min-h-0 flex-1 overflow-auto`,children:[J,Y]}),t[43]=J,t[44]=Y,t[45]=X):X=t[45];let Z;t[46]!==B||t[47]!==A||t[48]!==R||t[49]!==U||t[50]!==E||t[51]!==L.name?(Z=(0,_.jsx)(f,{children:E?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(s,{variant:`outline`,onClick:()=>D(!1),disabled:A,children:(0,_.jsx)(r,{id:`iH8pgl`})}),(0,_.jsx)(s,{onClick:()=>void B(`rename`),disabled:A||U,children:(0,_.jsx)(r,{id:`AT0e50`})})]}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(s,{variant:`outline`,onClick:()=>{k(`${L.name}-${R}`),D(!0)},disabled:A,children:(0,_.jsx)(r,{id:`AT0e50`})}),(0,_.jsx)(s,{variant:`outline`,onClick:()=>void B(`make-source`),disabled:A,children:(0,_.jsx)(r,{id:`xWomUD`,values:{editor:R}})}),(0,_.jsx)(s,{onClick:()=>void B(`align`),disabled:A,children:(0,_.jsx)(r,{id:`PZn2LP`})})]})}),t[46]=B,t[47]=A,t[48]=R,t[49]=U,t[50]=E,t[51]=L.name,t[52]=Z):Z=t[52];let Q;t[53]!==q||t[54]!==X||t[55]!==Z?(Q=(0,_.jsxs)(u,{className:`flex max-h-[85vh] w-full flex-col sm:max-w-5xl`,children:[q,X,Z]}),t[53]=q,t[54]=X,t[55]=Z,t[56]=Q):Q=t[56];let $;return t[57]!==Q||t[58]!==W?($=(0,_.jsx)(m,{open:!0,onOpenChange:W,children:Q}),t[57]=Q,t[58]=W,t[59]=$):$=t[59],$}export{v as SkillForkDialog};
@@ -1,2 +1,2 @@
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"./AgentIconCluster-Qf_VPGzc.js";import{i as s,n as c,t as l}from"./tooltip-DBqLYfio.js";import{t as u}from"./button-DzgjsZzC.js";import{n as d}from"./dist-BGzUo_18.js";import{c as f}from"./documents-events-ckNvVQCr.js";import{n as p}from"./constants-editors-DLxv8SuP.js";import{n as m,r as h,t as g}from"./skill-targets-schema-BujW07bM.js";import{t as _}from"./createLucideIcon-DdBzwsHe.js";import{a as v,f as y,i as b,m as x,n as S,o as C,p as w,u as T}from"./dropdown-menu-DtLu9NwU.js";import{t as E}from"./folder-QqUoFRPR.js";import"./constants-skills-BLHVRW90.js";import{i as ee,l as te,n as D,r as O}from"./skill-scope-N3jmnGIX.js";import{F as k,S as ne,j as A,x as j}from"./skills-api-B9YEcMtk.js";import{t as M}from"./use-skills-BzbDGc60.js";import{a as N,c as P,i as F,l as I,n as L,o as R,s as z,u as B}from"./context-menu-CKOBjlWm.js";import{t as V}from"./ChangedOutsideBadge-Yx_v8aj4.js";var H=_(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),U=e(n(),1),W=a(),G=t();function K(e){let t=(0,W.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,G.jsx)(F,{...r}):(0,G.jsx)(b,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function re(e){let t=(0,W.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,G.jsx)(N,{...r}):(0,G.jsx)(v,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function ie(e){let t=(0,W.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,G.jsx)(L,{...r}):(0,G.jsx)(S,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function ae(e){let t=(0,W.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,G.jsx)(R,{...r}):(0,G.jsx)(C,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function oe(e){let t=(0,W.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,G.jsx)(z,{...r}):(0,G.jsx)(T,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function se(e){let t=(0,W.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,G.jsx)(P,{...r}):(0,G.jsx)(y,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function ce(e){let t=(0,W.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,G.jsx)(I,{...r}):(0,G.jsx)(w,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function le(e){let t=(0,W.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,G.jsx)(B,{...r}):(0,G.jsx)(x,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}var q=Object.freeze({hosts:null,source:null}),J=new Map,Y=new Map;function X(e,t){return`${e}:${t}`}function Z(e){return J.get(e)??q}function ue(e,t){let n=Y.get(e)??new Set;return Y.set(e,n),n.add(t),()=>{n.delete(t),n.size===0&&Y.delete(e)}}function Q(e,t){let n=Z(e),r={...n,...t};if(!(r.hosts===n.hosts&&r.source===n.source)){r.hosts===null&&r.source===null?J.delete(e):J.set(e,r);for(let t of Y.get(e)??[])t()}}var de=g.options,fe=m.options,pe=`.agents/`;function me({skill:e,allSkills:t,hostSet:n,sourceHostOverlay:r,linkMode:i}){let a=t=>e?`${te(t,e.scope)}/${e.name}`:null,o=e?.hubOffered??(e&&t!==null?t.find(t=>t.scope===e.scope)?.hubOffered:void 0),s=e!==void 0&&(o===!0||(e.hosts??[]).includes(`agents`)||t?.some(t=>t.scope===e.scope&&(t.hosts.includes(`agents`)||t.path.startsWith(pe)))),c=e?.hostAliases??(e&&t!==null?Object.assign({},...t.filter(t=>t.scope===e.scope).map(e=>e.hostAliases??{})):{}),l=e?.installableEditors??(e&&t!==null?t.find(t=>t.scope===e.scope)?.installableEditors:void 0),u=l?new Set(l):null,d=e?.scope===`global`?fe:de,f=(s?[...d,`agents`]:d).filter(e=>!(e in c)).filter(e=>e===`agents`||u===null||u.has(e)||n.has(e)),p=new Set(f.map(e=>a(e))),m=e?.scope===`global`?`~/`:``,h=e?.path?.includes(`/`)?`${m}${e.path.replace(/\/SKILL\.mdx?$/i,``)}`:null,g=h!==null&&!p.has(h)?h:null,_=g===null?r??e?.hosts?.[0]:void 0,v=new Set(e?.conflictHosts??[]),y=new Set(e?.driftPaths??[]),b=new Set(e?.symlinkedHosts??[]),x=[...[...n].filter(e=>e!==_&&!(e in c)&&!v.has(e)&&!e.includes(`/`)).map(e=>({target:e,display:a(e)??e,mode:b.has(e)?`link`:`copy`})),...(e?.customPlacements??[]).map(e=>({target:O(e),display:`${m}${e.path}`,mode:e.mode}))],S=x.map(e=>e.mode),C=S.filter(e=>e===`link`).length,w=S.length===0?i?`link`:`copy`:C*2>=S.length?`link`:`copy`,T=new Map((e?.customPlacements??[]).map(e=>[O(e),e])),E=new Set(T.keys());if(t!==null&&e){for(let n of t)if(n.scope===e.scope)for(let e of n.customPlacements??[]){let t=O(e);t!==``&&E.add(t)}}return{pathFor:a,aliases:c,rows:f,sourceRow:g,sourceHost:_,conflicted:v,drifted:y,linked:b,expectedMode:w,convertible:x,customRootRows:e===void 0?[]:[...E].sort().map(t=>({root:t,display:`${m}${t}/${e.name}`,placed:T.get(t)??null})).filter(e=>!p.has(e.display)&&e.display!==h&&!(e.root in c))}}var he=`min-w-[24rem]`;function ge(e,t){let n=(0,W.c)(45),r=t.installingName===e.name,i=(0,U.useRef)(e),[a,o]=(0,U.useState)(!1),s=(0,U.useRef)(!1),c,l;n[0]===r?(c=n[1],l=n[2]):(c=()=>{s.current&&!r&&o(!0),s.current=r},l=[r],n[0]=r,n[1]=c,n[2]=l),(0,U.useEffect)(c,l);let u,f;n[3]===e?(u=n[4],f=n[5]):(u=()=>{e!==i.current&&(i.current=e,o(!1))},f=[e],n[3]=e,n[4]=u,n[5]=f),(0,U.useEffect)(u,f);let p=r||a,m;n[6]!==e.name||n[7]!==e.scope?(m=X(e.scope,e.name),n[6]=e.name,n[7]=e.scope,n[8]=m):m=n[8];let g=m,_,v;n[9]===g?(_=n[10],v=n[11]):(_=e=>ue(g,e),v=()=>Z(g),n[9]=g,n[10]=_,n[11]=v);let y=(0,U.useSyncExternalStore)(_,v),b=y.hosts,x=y.source,S,C;n[12]!==x||n[13]!==g||n[14]!==e.hosts?(S=()=>{x!==null&&e.hosts[0]===x&&Q(g,{source:null})},C=[e.hosts,x,g],n[12]=x,n[13]=g,n[14]=e.hosts,n[15]=S,n[16]=C):(S=n[15],C=n[16]),(0,U.useEffect)(S,C);let w=e.linkMode===!0,T=b??e.hosts,E;n[17]===T?E=n[18]:(E=new Set(T),n[17]=T,n[18]=E);let ee=E,te=b?b.length>0:e.installed,D=(0,U.useRef)(e.hosts),O,ne;n[19]!==b||n[20]!==e.hosts?(O=()=>{b===null&&(D.current=e.hosts)},ne=[b,e.hosts],n[19]=b,n[20]=e.hosts,n[21]=O,n[22]=ne):(O=n[21],ne=n[22]),(0,U.useEffect)(O,ne);let M;n[23]===e.hosts?M=n[24]:(M=[...e.hosts].sort().join(`,`),n[23]=e.hosts,n[24]=M);let N=M,P,F;n[25]!==g||n[26]!==N?(P=()=>{let e=Z(g).hosts;e&&[...e].sort().join(`,`)===N&&Q(g,{hosts:null})},F=[N,g],n[25]=g,n[26]=N,n[27]=P,n[28]=F):(P=n[27],F=n[28]),(0,U.useEffect)(P,F);let I=(0,U.useRef)(null),L=(0,U.useRef)(null),R,z;n[29]===Symbol.for(`react.memo_cache_sentinel`)?(R=()=>()=>{I.current&&clearTimeout(I.current),L.current?.(),L.current=null},z=[],n[29]=R,n[30]=z):(R=n[29],z=n[30]),(0,U.useEffect)(R,z);let B;n[31]!==t||n[32]!==g||n[33]!==e?(B=function(n,r){D.current=n,Q(g,{hosts:n}),I.current&&clearTimeout(I.current);let i=async()=>{L.current=null,I.current=null;let r=await t.install(e,n.filter(h));if(!r.ok){Q(g,{hosts:null});return}D.current=[...r.hosts],Q(g,{hosts:[...r.hosts]})};r?(L.current=()=>void i(),I.current=setTimeout(()=>void i(),350)):(L.current=null,i())},n[31]=t,n[32]=g,n[33]=e,n[34]=B):B=n[34];let V=B,H;return n[35]!==t||n[36]!==V||n[37]!==ee||n[38]!==te||n[39]!==p||n[40]!==x||n[41]!==g||n[42]!==w||n[43]!==e?(H={hostSet:ee,installed:te,installing:p,toggleEditor(e,t){let n=new Set(D.current);t?n.add(e):n.delete(e),V([...n],!0)},installAll(){let t=e.scope===`global`?fe:de,n=D.current.filter(e=>!t.includes(e)),r=e.installableEditors??t,i=t.filter(e=>r.includes(e)||D.current.includes(e));V([...n,...i],!1)},linkMode:w,sourceHost:x??e.hosts[0],placeAt(n,r){t.runLocationWrite(e,()=>j({scope:e.scope,name:e.name,dir:n,mode:r})).then(ve)},unplaceAt(n){t.runLocationWrite(e,()=>k({scope:e.scope,name:e.name,path:n})).then(_e)},setSource(n){Q(g,{source:n}),t.runLocationWrite(e,()=>A({scope:e.scope,name:e.name,target:n})).then(e=>{e.ok||(Q(g,{source:null}),d.error(e.error))})},convertLocation(n,r){t.convertLocations(e,[{target:n,mode:r}])},convertLocations(n){t.convertLocations(e,n)}},n[35]=t,n[36]=V,n[37]=ee,n[38]=te,n[39]=p,n[40]=x,n[41]=g,n[42]=w,n[43]=e,n[44]=H):H=n[44],H}function _e(e){e.ok||d.error(e.error)}function ve(e){e.ok||d.error(e.error)}function $(e){let t=(0,W.c)(7),{hint:n,children:r}=e,i;t[0]===r?i=t[1]:(i=(0,G.jsx)(s,{asChild:!0,children:r}),t[0]=r,t[1]=i);let a;t[2]===n?a=t[3]:(a=(0,G.jsx)(c,{side:`right`,className:`max-w-xs`,children:n}),t[2]=n,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,G.jsxs)(l,{children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function ye(e){let t=(0,W.c)(77),{toggles:n,skill:a,onResolveFork:s,onRunStart:c,menuKind:l}=e,m=l===void 0?`dropdown`:l,{_:h}=i(),{hostSet:g,toggleEditor:_,installAll:v}=n,y=M(),b,x,S,C,w,T,O,k,A,j;if(t[0]!==h||t[1]!==y.data||t[2]!==y.status||t[3]!==g||t[4]!==v||t[5]!==m||t[6]!==s||t[7]!==c||t[8]!==a||t[9]!==_||t[10]!==n){let{pathFor:e,aliases:i,rows:l,sourceRow:M,sourceHost:N,conflicted:P,drifted:F,linked:I,expectedMode:L,convertible:R,customRootRows:z}=me({skill:a,allSkills:y.status===`ready`?y.data:null,hostSet:g,sourceHostOverlay:n.sourceHost,linkMode:n.linkMode});w=l,T=M,C=L,x=R,S=z;let B=e=>D(i,e),H=Ee,U=e=>{let t=B(e);return t.length===0?!0:window.confirm(h({id:`Uobeu9`,values:{0:t.map(H).join(`, `),rootRel:e}}))},W;t[21]!==h||t[22]!==a?(W=(e,t)=>{let n=e.includes(`/`)?e:te(e,a?.scope??`project`);return(0,G.jsx)($,{hint:h({id:`0dslv8`,values:{0:H(e),1:H(e),2:a?.name??``,poolRootRel:t,subRoot:n}}),children:(0,G.jsx)(u,{variant:`ghost`,size:`sm`,className:`h-4 shrink-0 px-0`,"aria-label":h({id:`G6Lrs_`,values:{0:H(e)}}),onClick:r=>{r.preventDefault(),r.stopPropagation(),window.confirm(h({id:`iiqOKM`,values:{0:H(e),1:a.name,2:H(e),subRoot:n,poolRootRel:t}}))&&ne({scope:a.scope,root:n,action:`unlink`,exclude:[a.name]}).then(e=>{e.ok?f():d.error(h({id:`PRgIJh`,values:{0:e.error,subRoot:n}}))})},"data-testid":`skill-audience-unfollow-${e}`,children:(0,G.jsx)(o,{host:e,"aria-hidden":!0,className:`size-3.5`})})},e)},t[21]=h,t[22]=a,t[23]=W):W=t[23];let K=W;b=n.installing;let re=ee(a),oe=Te,se;t[24]!==h||t[25]!==c||t[26]!==n?(se=(e,t,i)=>{let a=i===`link`?`copy`:`link`;return(0,G.jsx)($,{hint:h(i===`link`?{id:`FeXcUS`,values:{display:t}}:{id:`ugQcJX`,values:{display:t}}),children:(0,G.jsx)(u,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-yellow-500/40 bg-yellow-500/10 px-1 font-normal text-[10px] text-yellow-600 uppercase tracking-wide hover:bg-yellow-500/20`,onClick:r=>{r.preventDefault(),r.stopPropagation(),window.confirm(h(a===`link`?{id:`m0eHej`,values:{display:t}}:{id:`HbcQYf`,values:{display:t}}))&&(c?.(),n.convertLocation?.(e,a))},"data-testid":`skill-convert-${e}`,children:i===`link`?(0,G.jsx)(r,{id:`uUCrBv`}):(0,G.jsx)(r,{id:`iaPtht`})})})},t[24]=h,t[25]=c,t[26]=n,t[27]=se):se=t[27];let ce=se,le;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,G.jsx)(r,{id:`npcziF`}),t[28]=le):le=t[28];let q;t[29]===h?q=t[30]:(q=h({id:`6f_UX4`}),t[29]=h,t[30]=q);let J;t[31]===v?J=t[32]:(J=()=>v(),t[31]=v,t[32]=J);let Y;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,G.jsx)(r,{id:`N40H-G`}),t[33]=Y):Y=t[33];let X;t[34]!==b||t[35]!==J?(X=(0,G.jsx)(u,{variant:`ghost`,size:`sm`,className:`h-5 px-1.5 font-normal text-[11px] text-muted-foreground hover:text-foreground`,disabled:b,onClick:J,"data-testid":`skill-install-all`,children:Y}),t[34]=b,t[35]=J,t[36]=X):X=t[36];let Z;t[37]!==q||t[38]!==X?(Z=(0,G.jsx)($,{hint:q,children:X}),t[37]=q,t[38]=X,t[39]=Z):Z=t[39],t[40]!==m||t[41]!==Z?(O=(0,G.jsxs)(ae,{menuKind:m,className:`flex items-center justify-between gap-2`,children:[le,Z]}),t[40]=m,t[41]=Z,t[42]=O):O=t[42],k=T===null?null:(0,G.jsx)($,{hint:h({id:`pXB6SL`}),children:(0,G.jsxs)(ie,{menuKind:m,disabled:b,checked:!0,onSelect:we,"data-testid":`skill-source-row`,children:[(0,G.jsx)(E,{"aria-hidden":!0,className:`size-4 text-muted-foreground`}),(0,G.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,G.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:T}),(()=>{let e=oe(T).split(`/`).slice(0,-1).join(`/`),t=B(e);return t.length>0?(0,G.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-source`,children:t.map(t=>K(t,e))}):null})(),(0,G.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-border/60 px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,children:(0,G.jsx)(r,{id:`tiFPjk`})})]})]})}),A=w.map(t=>{let i=e(t),c=t===`agents`?`.agents`:p[t],l=oe(i).split(`/`).slice(0,-1).join(`/`),d=B(l);return(0,G.jsx)($,{hint:P.has(t)?h({id:`8HvJlU`,values:{0:i??c}}):t===N?i?h({id:`ssk6rl`,values:{path:i}}):c:g.has(t)?h(i?{id:`9ieZhu`,values:{path:i}}:{id:`n3T3EE`,values:{label:c}}):re?.editor===t?h({id:`_3S4Ql`,values:{0:a?.name??``,1:re.plugin,2:i??c,label:c}}):h(i?N===void 0?{id:`xk133d`,values:{path:i}}:C===`link`?{id:`1LtA5r`,values:{path:i}}:{id:`opPbzN`,values:{path:i}}:{id:`Pp0Vgd`,values:{label:c}}),children:(0,G.jsxs)(ie,{menuKind:m,disabled:b,checked:g.has(t),onCheckedChange:e=>{P.has(t)||e===!0&&!U(l)||_(t,e===!0)},onSelect:Ce,className:`group`,"data-testid":`skill-install-editor-${t}`,children:[(0,G.jsx)(o,{host:t,"aria-hidden":!0,className:`size-4`}),(0,G.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,G.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:i??c}),d.length>0?(0,G.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-${t}`,children:d.map(e=>K(e,l))}):null,re?.editor===t&&!g.has(t)?(0,G.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-border/60 px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,"data-testid":`skill-row-plugin-covered-${t}`,children:(0,G.jsx)(r,{id:`scRzTw`})}):null,P.has(t)?(0,G.jsx)($,{hint:h({id:`_O7dJS`}),children:(0,G.jsx)(u,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-yellow-500/40 bg-yellow-500/10 px-1 text-[10px] text-yellow-600 uppercase tracking-wide hover:bg-yellow-500/20`,onClick:e=>{e.preventDefault(),s?.(t)},"data-testid":`skill-fork-chip-${t}`,children:(0,G.jsx)(r,{id:`jng7Ko`})})}):t===N?(0,G.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-border/60 px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,children:(0,G.jsx)(r,{id:`tiFPjk`})}):g.has(t)&&a?.hosts?(0,G.jsxs)(G.Fragment,{children:[!b&&(I.has(t)?`link`:`copy`)!==C?ce(t,i??c,I.has(t)?`link`:`copy`):null,(0,G.jsx)($,{hint:h({id:`nBgzKO`}),children:(0,G.jsx)(u,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide opacity-0 focus-visible:opacity-100 group-hover:opacity-100 hover:border-foreground/40 hover:text-foreground`,onClick:e=>{e.preventDefault(),e.stopPropagation(),n.setSource?.(t)},"data-testid":`skill-set-source-${t}`,children:(0,G.jsx)(r,{id:`VNNRfN`})})})]}):null,!b&&F.has(oe(i))?(0,G.jsx)($,{hint:h({id:`iz1LdD`}),children:(0,G.jsx)(V,{testId:`skill-drift-${t}`})}):null]})]})},t)}),j=S.map(e=>{let t=e.display;return(0,G.jsx)($,{hint:e.placed===null?h(N===void 0?{id:`xk133d`,values:{path:t}}:C===`link`?{id:`1LtA5r`,values:{path:t}}:{id:`opPbzN`,values:{path:t}}):h({id:`9ieZhu`,values:{path:t}}),children:(0,G.jsxs)(ie,{menuKind:m,disabled:b,checked:e.placed!==null,onCheckedChange:t=>{if(t===!0&&e.placed===null){if(!U(e.root))return;n.placeAt(e.root,C)}else e.placed!==null&&n.unplaceAt?.(e.placed.path)},onSelect:Se,className:`group`,"data-testid":`skill-custom-root-${e.root}`,children:[e.root===`.agents/skills`?(0,G.jsx)(o,{host:`agents`,"aria-hidden":!0,className:`size-4`}):(0,G.jsx)(E,{"aria-hidden":!0,className:`size-4 text-muted-foreground`}),(0,G.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,G.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:e.display}),B(e.root).length>0?(0,G.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-custom-${e.root}`,children:B(e.root).map(t=>K(t,e.root))}):null,!b&&e.placed!==null&&F.has(e.placed.path)?(0,G.jsx)($,{hint:h({id:`iz1LdD`}),children:(0,G.jsx)(V,{testId:`skill-drift-custom-${e.root}`})}):e.placed===null?null:(0,G.jsxs)(G.Fragment,{children:[!b&&e.placed.mode!==C?ce(e.root,e.display,e.placed.mode):null,(0,G.jsx)($,{hint:h({id:`nBgzKO`}),children:(0,G.jsx)(u,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide opacity-0 focus-visible:opacity-100 group-hover:opacity-100 hover:border-foreground/40 hover:text-foreground`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n.setSource?.(e.root)},"data-testid":`skill-set-source-custom-${e.root}`,children:(0,G.jsx)(r,{id:`VNNRfN`})})})]})]})]})},e.root)}),t[0]=h,t[1]=y.data,t[2]=y.status,t[3]=g,t[4]=v,t[5]=m,t[6]=s,t[7]=c,t[8]=a,t[9]=_,t[10]=n,t[11]=b,t[12]=x,t[13]=S,t[14]=C,t[15]=w,t[16]=T,t[17]=O,t[18]=k,t[19]=A,t[20]=j}else b=t[11],x=t[12],S=t[13],C=t[14],w=t[15],T=t[16],O=t[17],k=t[18],A=t[19],j=t[20];let N;t[43]!==S||t[44]!==w.length||t[45]!==T?(N=w.length===0&&S.length===0&&T===null?(0,G.jsx)(`div`,{className:`px-2 py-1.5 text-[11px] text-muted-foreground leading-snug`,"data-testid":`skill-install-no-destinations`,children:(0,G.jsx)(r,{id:`MOAoFO`})}):null,t[43]=S,t[44]=w.length,t[45]=T,t[46]=N):N=t[46];let P;t[47]!==h||t[48]!==b||t[49]!==x||t[50]!==C||t[51]!==c||t[52]!==n?(P=x.length>0&&n.convertLocations?(0,G.jsxs)(`div`,{className:`flex items-center gap-1 px-2 pt-1 pb-1.5`,children:[(0,G.jsx)(u,{variant:`ghost`,size:`sm`,className:`h-auto whitespace-normal p-0 text-left font-normal text-[11px] text-muted-foreground leading-snug hover:bg-transparent hover:text-foreground`,onClick:e=>{e.preventDefault();let t=C===`link`?`copy`:`link`,r=x.filter(e=>e.mode!==t);if(r.length===0)return;let i=h(t===`copy`?{id:`iOAsF1`}:{id:`MS8lMS`}),a=h(t===`copy`?{id:`gZiT5e`}:{id:`PhIa-X`}),o=r.map(xe).join(`
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"./AgentIconCluster-Qf_VPGzc.js";import{i as s,n as c,t as l}from"./tooltip-DBqLYfio.js";import{t as u}from"./button-DzgjsZzC.js";import{n as d}from"./dist-BGzUo_18.js";import{c as f}from"./documents-events-ckNvVQCr.js";import{n as p}from"./constants-editors-DLxv8SuP.js";import{n as m,r as h,t as g}from"./skill-targets-schema-BujW07bM.js";import{t as _}from"./createLucideIcon-DdBzwsHe.js";import{a as v,f as y,i as b,m as x,n as S,o as C,p as w,u as T}from"./dropdown-menu-DtLu9NwU.js";import{t as E}from"./folder-QqUoFRPR.js";import"./constants-skills-BLHVRW90.js";import{i as ee,l as te,n as D,r as O}from"./skill-scope-N3jmnGIX.js";import{F as k,S as ne,j as A,x as j}from"./skills-api-B7NWq2mZ.js";import{t as M}from"./use-skills-D4I9tjyB.js";import{a as N,c as P,i as F,l as I,n as L,o as R,s as z,u as B}from"./context-menu-CKOBjlWm.js";import{t as V}from"./ChangedOutsideBadge-Yx_v8aj4.js";var H=_(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),U=e(n(),1),W=a(),G=t();function K(e){let t=(0,W.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,G.jsx)(F,{...r}):(0,G.jsx)(b,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function re(e){let t=(0,W.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,G.jsx)(N,{...r}):(0,G.jsx)(v,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function ie(e){let t=(0,W.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,G.jsx)(L,{...r}):(0,G.jsx)(S,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function ae(e){let t=(0,W.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,G.jsx)(R,{...r}):(0,G.jsx)(C,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function oe(e){let t=(0,W.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,G.jsx)(z,{...r}):(0,G.jsx)(T,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function se(e){let t=(0,W.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,G.jsx)(P,{...r}):(0,G.jsx)(y,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function ce(e){let t=(0,W.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,G.jsx)(I,{...r}):(0,G.jsx)(w,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function le(e){let t=(0,W.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,G.jsx)(B,{...r}):(0,G.jsx)(x,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}var q=Object.freeze({hosts:null,source:null}),J=new Map,Y=new Map;function X(e,t){return`${e}:${t}`}function Z(e){return J.get(e)??q}function ue(e,t){let n=Y.get(e)??new Set;return Y.set(e,n),n.add(t),()=>{n.delete(t),n.size===0&&Y.delete(e)}}function Q(e,t){let n=Z(e),r={...n,...t};if(!(r.hosts===n.hosts&&r.source===n.source)){r.hosts===null&&r.source===null?J.delete(e):J.set(e,r);for(let t of Y.get(e)??[])t()}}var de=g.options,fe=m.options,pe=`.agents/`;function me({skill:e,allSkills:t,hostSet:n,sourceHostOverlay:r,linkMode:i}){let a=t=>e?`${te(t,e.scope)}/${e.name}`:null,o=e?.hubOffered??(e&&t!==null?t.find(t=>t.scope===e.scope)?.hubOffered:void 0),s=e!==void 0&&(o===!0||(e.hosts??[]).includes(`agents`)||t?.some(t=>t.scope===e.scope&&(t.hosts.includes(`agents`)||t.path.startsWith(pe)))),c=e?.hostAliases??(e&&t!==null?Object.assign({},...t.filter(t=>t.scope===e.scope).map(e=>e.hostAliases??{})):{}),l=e?.installableEditors??(e&&t!==null?t.find(t=>t.scope===e.scope)?.installableEditors:void 0),u=l?new Set(l):null,d=e?.scope===`global`?fe:de,f=(s?[...d,`agents`]:d).filter(e=>!(e in c)).filter(e=>e===`agents`||u===null||u.has(e)||n.has(e)),p=new Set(f.map(e=>a(e))),m=e?.scope===`global`?`~/`:``,h=e?.path?.includes(`/`)?`${m}${e.path.replace(/\/SKILL\.mdx?$/i,``)}`:null,g=h!==null&&!p.has(h)?h:null,_=g===null?r??e?.hosts?.[0]:void 0,v=new Set(e?.conflictHosts??[]),y=new Set(e?.driftPaths??[]),b=new Set(e?.symlinkedHosts??[]),x=[...[...n].filter(e=>e!==_&&!(e in c)&&!v.has(e)&&!e.includes(`/`)).map(e=>({target:e,display:a(e)??e,mode:b.has(e)?`link`:`copy`})),...(e?.customPlacements??[]).map(e=>({target:O(e),display:`${m}${e.path}`,mode:e.mode}))],S=x.map(e=>e.mode),C=S.filter(e=>e===`link`).length,w=S.length===0?i?`link`:`copy`:C*2>=S.length?`link`:`copy`,T=new Map((e?.customPlacements??[]).map(e=>[O(e),e])),E=new Set(T.keys());if(t!==null&&e){for(let n of t)if(n.scope===e.scope)for(let e of n.customPlacements??[]){let t=O(e);t!==``&&E.add(t)}}return{pathFor:a,aliases:c,rows:f,sourceRow:g,sourceHost:_,conflicted:v,drifted:y,linked:b,expectedMode:w,convertible:x,customRootRows:e===void 0?[]:[...E].sort().map(t=>({root:t,display:`${m}${t}/${e.name}`,placed:T.get(t)??null})).filter(e=>!p.has(e.display)&&e.display!==h&&!(e.root in c))}}var he=`min-w-[24rem]`;function ge(e,t){let n=(0,W.c)(45),r=t.installingName===e.name,i=(0,U.useRef)(e),[a,o]=(0,U.useState)(!1),s=(0,U.useRef)(!1),c,l;n[0]===r?(c=n[1],l=n[2]):(c=()=>{s.current&&!r&&o(!0),s.current=r},l=[r],n[0]=r,n[1]=c,n[2]=l),(0,U.useEffect)(c,l);let u,f;n[3]===e?(u=n[4],f=n[5]):(u=()=>{e!==i.current&&(i.current=e,o(!1))},f=[e],n[3]=e,n[4]=u,n[5]=f),(0,U.useEffect)(u,f);let p=r||a,m;n[6]!==e.name||n[7]!==e.scope?(m=X(e.scope,e.name),n[6]=e.name,n[7]=e.scope,n[8]=m):m=n[8];let g=m,_,v;n[9]===g?(_=n[10],v=n[11]):(_=e=>ue(g,e),v=()=>Z(g),n[9]=g,n[10]=_,n[11]=v);let y=(0,U.useSyncExternalStore)(_,v),b=y.hosts,x=y.source,S,C;n[12]!==x||n[13]!==g||n[14]!==e.hosts?(S=()=>{x!==null&&e.hosts[0]===x&&Q(g,{source:null})},C=[e.hosts,x,g],n[12]=x,n[13]=g,n[14]=e.hosts,n[15]=S,n[16]=C):(S=n[15],C=n[16]),(0,U.useEffect)(S,C);let w=e.linkMode===!0,T=b??e.hosts,E;n[17]===T?E=n[18]:(E=new Set(T),n[17]=T,n[18]=E);let ee=E,te=b?b.length>0:e.installed,D=(0,U.useRef)(e.hosts),O,ne;n[19]!==b||n[20]!==e.hosts?(O=()=>{b===null&&(D.current=e.hosts)},ne=[b,e.hosts],n[19]=b,n[20]=e.hosts,n[21]=O,n[22]=ne):(O=n[21],ne=n[22]),(0,U.useEffect)(O,ne);let M;n[23]===e.hosts?M=n[24]:(M=[...e.hosts].sort().join(`,`),n[23]=e.hosts,n[24]=M);let N=M,P,F;n[25]!==g||n[26]!==N?(P=()=>{let e=Z(g).hosts;e&&[...e].sort().join(`,`)===N&&Q(g,{hosts:null})},F=[N,g],n[25]=g,n[26]=N,n[27]=P,n[28]=F):(P=n[27],F=n[28]),(0,U.useEffect)(P,F);let I=(0,U.useRef)(null),L=(0,U.useRef)(null),R,z;n[29]===Symbol.for(`react.memo_cache_sentinel`)?(R=()=>()=>{I.current&&clearTimeout(I.current),L.current?.(),L.current=null},z=[],n[29]=R,n[30]=z):(R=n[29],z=n[30]),(0,U.useEffect)(R,z);let B;n[31]!==t||n[32]!==g||n[33]!==e?(B=function(n,r){D.current=n,Q(g,{hosts:n}),I.current&&clearTimeout(I.current);let i=async()=>{L.current=null,I.current=null;let r=await t.install(e,n.filter(h));if(!r.ok){Q(g,{hosts:null});return}D.current=[...r.hosts],Q(g,{hosts:[...r.hosts]})};r?(L.current=()=>void i(),I.current=setTimeout(()=>void i(),350)):(L.current=null,i())},n[31]=t,n[32]=g,n[33]=e,n[34]=B):B=n[34];let V=B,H;return n[35]!==t||n[36]!==V||n[37]!==ee||n[38]!==te||n[39]!==p||n[40]!==x||n[41]!==g||n[42]!==w||n[43]!==e?(H={hostSet:ee,installed:te,installing:p,toggleEditor(e,t){let n=new Set(D.current);t?n.add(e):n.delete(e),V([...n],!0)},installAll(){let t=e.scope===`global`?fe:de,n=D.current.filter(e=>!t.includes(e)),r=e.installableEditors??t,i=t.filter(e=>r.includes(e)||D.current.includes(e));V([...n,...i],!1)},linkMode:w,sourceHost:x??e.hosts[0],placeAt(n,r){t.runLocationWrite(e,()=>j({scope:e.scope,name:e.name,dir:n,mode:r})).then(ve)},unplaceAt(n){t.runLocationWrite(e,()=>k({scope:e.scope,name:e.name,path:n})).then(_e)},setSource(n){Q(g,{source:n}),t.runLocationWrite(e,()=>A({scope:e.scope,name:e.name,target:n})).then(e=>{e.ok||(Q(g,{source:null}),d.error(e.error))})},convertLocation(n,r){t.convertLocations(e,[{target:n,mode:r}])},convertLocations(n){t.convertLocations(e,n)}},n[35]=t,n[36]=V,n[37]=ee,n[38]=te,n[39]=p,n[40]=x,n[41]=g,n[42]=w,n[43]=e,n[44]=H):H=n[44],H}function _e(e){e.ok||d.error(e.error)}function ve(e){e.ok||d.error(e.error)}function $(e){let t=(0,W.c)(7),{hint:n,children:r}=e,i;t[0]===r?i=t[1]:(i=(0,G.jsx)(s,{asChild:!0,children:r}),t[0]=r,t[1]=i);let a;t[2]===n?a=t[3]:(a=(0,G.jsx)(c,{side:`right`,className:`max-w-xs`,children:n}),t[2]=n,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,G.jsxs)(l,{children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function ye(e){let t=(0,W.c)(77),{toggles:n,skill:a,onResolveFork:s,onRunStart:c,menuKind:l}=e,m=l===void 0?`dropdown`:l,{_:h}=i(),{hostSet:g,toggleEditor:_,installAll:v}=n,y=M(),b,x,S,C,w,T,O,k,A,j;if(t[0]!==h||t[1]!==y.data||t[2]!==y.status||t[3]!==g||t[4]!==v||t[5]!==m||t[6]!==s||t[7]!==c||t[8]!==a||t[9]!==_||t[10]!==n){let{pathFor:e,aliases:i,rows:l,sourceRow:M,sourceHost:N,conflicted:P,drifted:F,linked:I,expectedMode:L,convertible:R,customRootRows:z}=me({skill:a,allSkills:y.status===`ready`?y.data:null,hostSet:g,sourceHostOverlay:n.sourceHost,linkMode:n.linkMode});w=l,T=M,C=L,x=R,S=z;let B=e=>D(i,e),H=Ee,U=e=>{let t=B(e);return t.length===0?!0:window.confirm(h({id:`Uobeu9`,values:{0:t.map(H).join(`, `),rootRel:e}}))},W;t[21]!==h||t[22]!==a?(W=(e,t)=>{let n=e.includes(`/`)?e:te(e,a?.scope??`project`);return(0,G.jsx)($,{hint:h({id:`0dslv8`,values:{0:H(e),1:H(e),2:a?.name??``,poolRootRel:t,subRoot:n}}),children:(0,G.jsx)(u,{variant:`ghost`,size:`sm`,className:`h-4 shrink-0 px-0`,"aria-label":h({id:`G6Lrs_`,values:{0:H(e)}}),onClick:r=>{r.preventDefault(),r.stopPropagation(),window.confirm(h({id:`iiqOKM`,values:{0:H(e),1:a.name,2:H(e),subRoot:n,poolRootRel:t}}))&&ne({scope:a.scope,root:n,action:`unlink`,exclude:[a.name]}).then(e=>{e.ok?f():d.error(h({id:`PRgIJh`,values:{0:e.error,subRoot:n}}))})},"data-testid":`skill-audience-unfollow-${e}`,children:(0,G.jsx)(o,{host:e,"aria-hidden":!0,className:`size-3.5`})})},e)},t[21]=h,t[22]=a,t[23]=W):W=t[23];let K=W;b=n.installing;let re=ee(a),oe=Te,se;t[24]!==h||t[25]!==c||t[26]!==n?(se=(e,t,i)=>{let a=i===`link`?`copy`:`link`;return(0,G.jsx)($,{hint:h(i===`link`?{id:`FeXcUS`,values:{display:t}}:{id:`ugQcJX`,values:{display:t}}),children:(0,G.jsx)(u,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-yellow-500/40 bg-yellow-500/10 px-1 font-normal text-[10px] text-yellow-600 uppercase tracking-wide hover:bg-yellow-500/20`,onClick:r=>{r.preventDefault(),r.stopPropagation(),window.confirm(h(a===`link`?{id:`m0eHej`,values:{display:t}}:{id:`HbcQYf`,values:{display:t}}))&&(c?.(),n.convertLocation?.(e,a))},"data-testid":`skill-convert-${e}`,children:i===`link`?(0,G.jsx)(r,{id:`uUCrBv`}):(0,G.jsx)(r,{id:`iaPtht`})})})},t[24]=h,t[25]=c,t[26]=n,t[27]=se):se=t[27];let ce=se,le;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,G.jsx)(r,{id:`npcziF`}),t[28]=le):le=t[28];let q;t[29]===h?q=t[30]:(q=h({id:`6f_UX4`}),t[29]=h,t[30]=q);let J;t[31]===v?J=t[32]:(J=()=>v(),t[31]=v,t[32]=J);let Y;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,G.jsx)(r,{id:`N40H-G`}),t[33]=Y):Y=t[33];let X;t[34]!==b||t[35]!==J?(X=(0,G.jsx)(u,{variant:`ghost`,size:`sm`,className:`h-5 px-1.5 font-normal text-[11px] text-muted-foreground hover:text-foreground`,disabled:b,onClick:J,"data-testid":`skill-install-all`,children:Y}),t[34]=b,t[35]=J,t[36]=X):X=t[36];let Z;t[37]!==q||t[38]!==X?(Z=(0,G.jsx)($,{hint:q,children:X}),t[37]=q,t[38]=X,t[39]=Z):Z=t[39],t[40]!==m||t[41]!==Z?(O=(0,G.jsxs)(ae,{menuKind:m,className:`flex items-center justify-between gap-2`,children:[le,Z]}),t[40]=m,t[41]=Z,t[42]=O):O=t[42],k=T===null?null:(0,G.jsx)($,{hint:h({id:`pXB6SL`}),children:(0,G.jsxs)(ie,{menuKind:m,disabled:b,checked:!0,onSelect:we,"data-testid":`skill-source-row`,children:[(0,G.jsx)(E,{"aria-hidden":!0,className:`size-4 text-muted-foreground`}),(0,G.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,G.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:T}),(()=>{let e=oe(T).split(`/`).slice(0,-1).join(`/`),t=B(e);return t.length>0?(0,G.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-source`,children:t.map(t=>K(t,e))}):null})(),(0,G.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-border/60 px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,children:(0,G.jsx)(r,{id:`tiFPjk`})})]})]})}),A=w.map(t=>{let i=e(t),c=t===`agents`?`.agents`:p[t],l=oe(i).split(`/`).slice(0,-1).join(`/`),d=B(l);return(0,G.jsx)($,{hint:P.has(t)?h({id:`8HvJlU`,values:{0:i??c}}):t===N?i?h({id:`ssk6rl`,values:{path:i}}):c:g.has(t)?h(i?{id:`9ieZhu`,values:{path:i}}:{id:`n3T3EE`,values:{label:c}}):re?.editor===t?h({id:`_3S4Ql`,values:{0:a?.name??``,1:re.plugin,2:i??c,label:c}}):h(i?N===void 0?{id:`xk133d`,values:{path:i}}:C===`link`?{id:`1LtA5r`,values:{path:i}}:{id:`opPbzN`,values:{path:i}}:{id:`Pp0Vgd`,values:{label:c}}),children:(0,G.jsxs)(ie,{menuKind:m,disabled:b,checked:g.has(t),onCheckedChange:e=>{P.has(t)||e===!0&&!U(l)||_(t,e===!0)},onSelect:Ce,className:`group`,"data-testid":`skill-install-editor-${t}`,children:[(0,G.jsx)(o,{host:t,"aria-hidden":!0,className:`size-4`}),(0,G.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,G.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:i??c}),d.length>0?(0,G.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-${t}`,children:d.map(e=>K(e,l))}):null,re?.editor===t&&!g.has(t)?(0,G.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-border/60 px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,"data-testid":`skill-row-plugin-covered-${t}`,children:(0,G.jsx)(r,{id:`scRzTw`})}):null,P.has(t)?(0,G.jsx)($,{hint:h({id:`_O7dJS`}),children:(0,G.jsx)(u,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-yellow-500/40 bg-yellow-500/10 px-1 text-[10px] text-yellow-600 uppercase tracking-wide hover:bg-yellow-500/20`,onClick:e=>{e.preventDefault(),s?.(t)},"data-testid":`skill-fork-chip-${t}`,children:(0,G.jsx)(r,{id:`jng7Ko`})})}):t===N?(0,G.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-border/60 px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,children:(0,G.jsx)(r,{id:`tiFPjk`})}):g.has(t)&&a?.hosts?(0,G.jsxs)(G.Fragment,{children:[!b&&(I.has(t)?`link`:`copy`)!==C?ce(t,i??c,I.has(t)?`link`:`copy`):null,(0,G.jsx)($,{hint:h({id:`nBgzKO`}),children:(0,G.jsx)(u,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide opacity-0 focus-visible:opacity-100 group-hover:opacity-100 hover:border-foreground/40 hover:text-foreground`,onClick:e=>{e.preventDefault(),e.stopPropagation(),n.setSource?.(t)},"data-testid":`skill-set-source-${t}`,children:(0,G.jsx)(r,{id:`VNNRfN`})})})]}):null,!b&&F.has(oe(i))?(0,G.jsx)($,{hint:h({id:`iz1LdD`}),children:(0,G.jsx)(V,{testId:`skill-drift-${t}`})}):null]})]})},t)}),j=S.map(e=>{let t=e.display;return(0,G.jsx)($,{hint:e.placed===null?h(N===void 0?{id:`xk133d`,values:{path:t}}:C===`link`?{id:`1LtA5r`,values:{path:t}}:{id:`opPbzN`,values:{path:t}}):h({id:`9ieZhu`,values:{path:t}}),children:(0,G.jsxs)(ie,{menuKind:m,disabled:b,checked:e.placed!==null,onCheckedChange:t=>{if(t===!0&&e.placed===null){if(!U(e.root))return;n.placeAt(e.root,C)}else e.placed!==null&&n.unplaceAt?.(e.placed.path)},onSelect:Se,className:`group`,"data-testid":`skill-custom-root-${e.root}`,children:[e.root===`.agents/skills`?(0,G.jsx)(o,{host:`agents`,"aria-hidden":!0,className:`size-4`}):(0,G.jsx)(E,{"aria-hidden":!0,className:`size-4 text-muted-foreground`}),(0,G.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,G.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:e.display}),B(e.root).length>0?(0,G.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-custom-${e.root}`,children:B(e.root).map(t=>K(t,e.root))}):null,!b&&e.placed!==null&&F.has(e.placed.path)?(0,G.jsx)($,{hint:h({id:`iz1LdD`}),children:(0,G.jsx)(V,{testId:`skill-drift-custom-${e.root}`})}):e.placed===null?null:(0,G.jsxs)(G.Fragment,{children:[!b&&e.placed.mode!==C?ce(e.root,e.display,e.placed.mode):null,(0,G.jsx)($,{hint:h({id:`nBgzKO`}),children:(0,G.jsx)(u,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide opacity-0 focus-visible:opacity-100 group-hover:opacity-100 hover:border-foreground/40 hover:text-foreground`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n.setSource?.(e.root)},"data-testid":`skill-set-source-custom-${e.root}`,children:(0,G.jsx)(r,{id:`VNNRfN`})})})]})]})]})},e.root)}),t[0]=h,t[1]=y.data,t[2]=y.status,t[3]=g,t[4]=v,t[5]=m,t[6]=s,t[7]=c,t[8]=a,t[9]=_,t[10]=n,t[11]=b,t[12]=x,t[13]=S,t[14]=C,t[15]=w,t[16]=T,t[17]=O,t[18]=k,t[19]=A,t[20]=j}else b=t[11],x=t[12],S=t[13],C=t[14],w=t[15],T=t[16],O=t[17],k=t[18],A=t[19],j=t[20];let N;t[43]!==S||t[44]!==w.length||t[45]!==T?(N=w.length===0&&S.length===0&&T===null?(0,G.jsx)(`div`,{className:`px-2 py-1.5 text-[11px] text-muted-foreground leading-snug`,"data-testid":`skill-install-no-destinations`,children:(0,G.jsx)(r,{id:`MOAoFO`})}):null,t[43]=S,t[44]=w.length,t[45]=T,t[46]=N):N=t[46];let P;t[47]!==h||t[48]!==b||t[49]!==x||t[50]!==C||t[51]!==c||t[52]!==n?(P=x.length>0&&n.convertLocations?(0,G.jsxs)(`div`,{className:`flex items-center gap-1 px-2 pt-1 pb-1.5`,children:[(0,G.jsx)(u,{variant:`ghost`,size:`sm`,className:`h-auto whitespace-normal p-0 text-left font-normal text-[11px] text-muted-foreground leading-snug hover:bg-transparent hover:text-foreground`,onClick:e=>{e.preventDefault();let t=C===`link`?`copy`:`link`,r=x.filter(e=>e.mode!==t);if(r.length===0)return;let i=h(t===`copy`?{id:`iOAsF1`}:{id:`MS8lMS`}),a=h(t===`copy`?{id:`gZiT5e`}:{id:`PhIa-X`}),o=r.map(xe).join(`
2
2
  `);window.confirm(`${i}\n\n${a}\n\n${o}\n\n${h({id:`Cu6GXQ`})}`)&&(c?.(),n.convertLocations?.(r.map(e=>({target:e.target,mode:t}))))},disabled:b,"data-testid":`skill-convert-all`,children:C===`link`?(0,G.jsx)(r,{id:`rcJmK8`}):(0,G.jsx)(r,{id:`LBv_TR`})}),(0,G.jsx)($,{hint:h({id:`0J6nhG`}),children:(0,G.jsx)(u,{variant:`ghost`,size:`sm`,"aria-label":h({id:`qJSo0_`}),className:`size-4 shrink-0 rounded-full border border-border/60 p-0 font-normal text-[9px] text-muted-foreground hover:border-foreground/40 hover:bg-transparent hover:text-foreground`,onClick:be,"data-testid":`skill-convert-all-help`,children:`?`})})]}):null,t[47]=h,t[48]=b,t[49]=x,t[50]=C,t[51]=c,t[52]=n,t[53]=P):P=t[53];let F;t[54]===m?F=t[55]:(F=(0,G.jsx)(oe,{menuKind:m}),t[54]=m,t[55]=F);let I;t[56]===h?I=t[57]:(I=h({id:`5ymuTA`}),t[56]=h,t[57]=I);let L;t[58]===a?.scope?L=t[59]:(L=()=>{window.location.hash=a?.scope===`global`?`#settings/user-skills`:`#settings/skills`},t[58]=a?.scope,t[59]=L);let R,z;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,G.jsx)(H,{"aria-hidden":!0}),z=(0,G.jsx)(r,{id:`ZBF9fn`}),t[60]=R,t[61]=z):(R=t[60],z=t[61]);let B;t[62]!==m||t[63]!==L?(B=(0,G.jsxs)(re,{menuKind:m,onSelect:L,children:[R,z]}),t[62]=m,t[63]=L,t[64]=B):B=t[64];let U;t[65]!==B||t[66]!==I?(U=(0,G.jsx)($,{hint:I,children:B}),t[65]=B,t[66]=I,t[67]=U):U=t[67];let K;return t[68]!==U||t[69]!==O||t[70]!==k||t[71]!==A||t[72]!==j||t[73]!==N||t[74]!==P||t[75]!==F?(K=(0,G.jsxs)(G.Fragment,{children:[O,k,A,j,N,P,F,U]}),t[68]=U,t[69]=O,t[70]=k,t[71]=A,t[72]=j,t[73]=N,t[74]=P,t[75]=F,t[76]=K):K=t[76],K}function be(e){return e.preventDefault()}function xe(e){return e.display}function Se(e){return e.preventDefault()}function Ce(e){return e.preventDefault()}function we(e){return e.preventDefault()}function Te(e){return(e??``).replace(/^~\//,``)}function Ee(e){return e===`agents`?`.agents`:p[e]??e}export{de as a,ae as c,ce as d,le as f,fe as i,oe as l,ye as n,K as o,H as p,ge as r,re as s,he as t,se as u};
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./SkillUpdateConflictDialog-CLBRL2qe.js","./dist-Nvb76hAm.js","./chunk-CYidjpOJ.js","./jsx-runtime-BUgB2tll.js","./react-f2sANaYj.js","./pierre-theme-CVT0rO1h.js","./preload-helper-Chd9yIcd.js","./engine-compile-CXIMXtDL.js","./lib-TFtgHRaJ.js","./ccount-BoHE53_k.js","./lib-DlDYgFfS.js","./space-separated-tokens-l9yufOSK.js","./lib-7Zm1Z07d.js","./ok-syntax-theme-Blw5Xy2g.js","./MultiFileDiff-BiPNiqPB.js","./compiler-runtime-BfE3aGVn.js","./button-DzgjsZzC.js","./dist-CSCUSbQc.js","./dist-BsJYDohW.js","./bundle-mjs-SHeFpKGC.js","./utils-CPqDy6Hr.js","./dialog-BJEjKJjL.js","./electron-drag-strip-D9GZhMg_.js","./dist-DTFuvKje.js","./react-dom-DPxgxlDT.js","./dist-CxbWbOvU.js","./es2015-Dtr4fzLT.js","./x-DM2drskU.js","./createLucideIcon-DdBzwsHe.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{i as s,n as c,t as l}from"./tooltip-DBqLYfio.js";import{t as u}from"./switch-BKZTXkzu.js";import{t as d}from"./button-DzgjsZzC.js";import{t as f}from"./arrow-up-right-nJaICi16.js";import{t as p}from"./spinner-Bx8xD6f8.js";import{t as m}from"./refresh-cw-CC7UZEnZ.js";import{t as h}from"./undo-2-xEF_s_Io.js";import{t as g}from"./use-skill-origin-C4Hj71IE.js";var _=o(),v=e(r(),1),y=n(),b=(0,v.lazy)(async()=>({default:(await t(()=>import(`./SkillUpdateConflictDialog-CLBRL2qe.js`),__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,27,28]),import.meta.url)).SkillUpdateConflictDialog}));function x(e){let t=(0,_.c)(48),{scope:n,name:r}=e,{_:o}=a(),x;t[0]!==r||t[1]!==n?(x={scope:n,name:r},t[0]=r,t[1]=n,t[2]=x):x=t[2];let{origin:S,github:C,displaySource:w,importedTitle:T,canReimport:E,updateAvailable:D,modified:O,autoUpdate:k,gitTracked:A,setAutoUpdate:j,revertable:M,reimport:N,reimporting:P,previewUpdate:F,revert:I,reverting:L}=g(x),[R,z]=(0,v.useState)(null),B;t[3]!==O||t[4]!==F||t[5]!==N?(B=async function(){if(O){let e=await F();e&&z(e);return}await N()},t[3]=O,t[4]=F,t[5]=N,t[6]=B):B=t[6];let V=B,H;t[7]===N?H=t[8]:(H=async function(){await N(),z(null)},t[7]=N,t[8]=H);let U=H;if(!S)return null;let W;t[9]!==w||t[10]!==C||t[11]!==T?(W=C?(0,y.jsxs)(`a`,{href:C,target:`_blank`,rel:`noreferrer`,title:T??void 0,className:`hidden min-w-0 max-w-48 items-center gap-1 hover:text-foreground @xl/toolbar:flex`,children:[(0,y.jsx)(`span`,{className:`truncate`,children:w}),(0,y.jsx)(f,{className:`size-3 shrink-0`,"aria-hidden":!0})]}):(0,y.jsx)(`span`,{title:T??void 0,className:`hidden min-w-0 max-w-48 truncate @xl/toolbar:inline`,children:w}),t[9]=w,t[10]=C,t[11]=T,t[12]=W):W=t[12];let G;t[13]!==o||t[14]!==k||t[15]!==E||t[16]!==A||t[17]!==j?(G=E?(0,y.jsxs)(l,{children:[(0,y.jsx)(s,{asChild:!0,children:(0,y.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1`,children:[(0,y.jsx)(`label`,{htmlFor:`skill-auto-update-switch`,className:`hidden cursor-pointer @xl/toolbar:inline`,children:(0,y.jsx)(i,{id:`2M0JF6`})}),(0,y.jsx)(u,{id:`skill-auto-update-switch`,checked:k&&!A,disabled:A,onCheckedChange:e=>void j(e===!0),"aria-label":o({id:`o9fPtM`}),className:`scale-75`})]})}),(0,y.jsx)(c,{side:`bottom`,children:A?(0,y.jsx)(i,{id:`vy_VIN`}):k?(0,y.jsx)(i,{id:`vGQxBT`}):(0,y.jsx)(i,{id:`9p_QBN`})})]}):null,t[13]=o,t[14]=k,t[15]=E,t[16]=A,t[17]=j,t[18]=G):G=t[18];let K;t[19]===O?K=t[20]:(K=O?(0,y.jsxs)(l,{children:[(0,y.jsx)(s,{asChild:!0,children:(0,y.jsx)(`span`,{className:`shrink-0 rounded-sm bg-amber-500/15 px-1.5 py-0.5 font-medium text-[11px] text-amber-700 dark:text-amber-400`,children:(0,y.jsx)(i,{id:`tgWuMB`})})}),(0,y.jsx)(c,{side:`bottom`,children:(0,y.jsx)(i,{id:`s0Iold`})})]}):null,t[19]=O,t[20]=K);let q;t[21]!==o||t[22]!==E||t[23]!==O||t[24]!==P||t[25]!==I||t[26]!==M||t[27]!==L?(q=O&&E&&M?(0,y.jsxs)(l,{children:[(0,y.jsx)(d,{variant:`ghost`,size:`sm`,onClick:()=>void I(),disabled:L||P,"aria-label":o({id:`VxLvKE`}),className:`shrink-0 gap-1 text-muted-foreground px-2 text-xs hover:text-foreground`,asChild:!0,children:(0,y.jsxs)(s,{children:[L?(0,y.jsx)(p,{icon:h,className:`size-3`,"aria-hidden":!0}):(0,y.jsx)(h,{className:`size-3`,"aria-hidden":!0}),(0,y.jsx)(`span`,{className:`hidden @xl/toolbar:inline`,children:L?(0,y.jsx)(i,{id:`fIJtam`}):(0,y.jsx)(i,{id:`jJdwCB`})})]})}),(0,y.jsx)(c,{side:`bottom`,children:(0,y.jsx)(i,{id:`XSb9HS`})})]}):null,t[21]=o,t[22]=E,t[23]=O,t[24]=P,t[25]=I,t[26]=M,t[27]=L,t[28]=q):q=t[28];let J;t[29]!==o||t[30]!==E||t[31]!==V||t[32]!==P||t[33]!==L||t[34]!==D?(J=E&&D?(0,y.jsxs)(l,{children:[(0,y.jsx)(d,{variant:`ghost`,size:`sm`,onClick:()=>void V(),disabled:P||L,"aria-label":o({id:`GidGkh`}),className:`shrink-0 gap-1 text-muted-foreground px-2 text-xs hover:text-foreground`,asChild:!0,children:(0,y.jsxs)(s,{children:[P?(0,y.jsx)(p,{icon:m,className:`size-3`,"aria-hidden":!0}):(0,y.jsx)(m,{className:`size-3`,"aria-hidden":!0}),(0,y.jsx)(`span`,{className:`hidden @xl/toolbar:inline`,children:P?(0,y.jsx)(i,{id:`JL3si7`}):(0,y.jsx)(i,{id:`EkH9pt`})})]})}),(0,y.jsx)(c,{side:`bottom`,children:(0,y.jsx)(i,{id:`GidGkh`})})]}):null,t[29]=o,t[30]=E,t[31]=V,t[32]=P,t[33]=L,t[34]=D,t[35]=J):J=t[35];let Y;t[36]!==R||t[37]!==r||t[38]!==U||t[39]!==P?(Y=R?(0,y.jsx)(v.Suspense,{fallback:null,children:(0,y.jsx)(b,{open:!0,onOpenChange:e=>{e||z(null)},skillName:r,localBody:R.localBody,upstreamBody:R.upstreamBody,applying:P,onTakeUpstream:()=>void U()})}):null,t[36]=R,t[37]=r,t[38]=U,t[39]=P,t[40]=Y):Y=t[40];let X;return t[41]!==W||t[42]!==G||t[43]!==K||t[44]!==q||t[45]!==J||t[46]!==Y?(X=(0,y.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5 text-muted-foreground text-xs`,children:[W,G,K,q,J,Y]}),t[41]=W,t[42]=G,t[43]=K,t[44]=q,t[45]=J,t[46]=Y,t[47]=X):X=t[47],X}export{x as SkillOriginInline};
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{i as s,n as c,t as l}from"./tooltip-DBqLYfio.js";import{t as u}from"./switch-BKZTXkzu.js";import{t as d}from"./button-DzgjsZzC.js";import{t as f}from"./arrow-up-right-nJaICi16.js";import{t as p}from"./spinner-Bx8xD6f8.js";import{t as m}from"./refresh-cw-CC7UZEnZ.js";import{t as h}from"./undo-2-xEF_s_Io.js";import{t as g}from"./use-skill-origin-f6iU7bK5.js";var _=o(),v=e(r(),1),y=n(),b=(0,v.lazy)(async()=>({default:(await t(()=>import(`./SkillUpdateConflictDialog-CLBRL2qe.js`),__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,27,28]),import.meta.url)).SkillUpdateConflictDialog}));function x(e){let t=(0,_.c)(48),{scope:n,name:r}=e,{_:o}=a(),x;t[0]!==r||t[1]!==n?(x={scope:n,name:r},t[0]=r,t[1]=n,t[2]=x):x=t[2];let{origin:S,github:C,displaySource:w,importedTitle:T,canReimport:E,updateAvailable:D,modified:O,autoUpdate:k,gitTracked:A,setAutoUpdate:j,revertable:M,reimport:N,reimporting:P,previewUpdate:F,revert:I,reverting:L}=g(x),[R,z]=(0,v.useState)(null),B;t[3]!==O||t[4]!==F||t[5]!==N?(B=async function(){if(O){let e=await F();e&&z(e);return}await N()},t[3]=O,t[4]=F,t[5]=N,t[6]=B):B=t[6];let V=B,H;t[7]===N?H=t[8]:(H=async function(){await N(),z(null)},t[7]=N,t[8]=H);let U=H;if(!S)return null;let W;t[9]!==w||t[10]!==C||t[11]!==T?(W=C?(0,y.jsxs)(`a`,{href:C,target:`_blank`,rel:`noreferrer`,title:T??void 0,className:`hidden min-w-0 max-w-48 items-center gap-1 hover:text-foreground @xl/toolbar:flex`,children:[(0,y.jsx)(`span`,{className:`truncate`,children:w}),(0,y.jsx)(f,{className:`size-3 shrink-0`,"aria-hidden":!0})]}):(0,y.jsx)(`span`,{title:T??void 0,className:`hidden min-w-0 max-w-48 truncate @xl/toolbar:inline`,children:w}),t[9]=w,t[10]=C,t[11]=T,t[12]=W):W=t[12];let G;t[13]!==o||t[14]!==k||t[15]!==E||t[16]!==A||t[17]!==j?(G=E?(0,y.jsxs)(l,{children:[(0,y.jsx)(s,{asChild:!0,children:(0,y.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1`,children:[(0,y.jsx)(`label`,{htmlFor:`skill-auto-update-switch`,className:`hidden cursor-pointer @xl/toolbar:inline`,children:(0,y.jsx)(i,{id:`2M0JF6`})}),(0,y.jsx)(u,{id:`skill-auto-update-switch`,checked:k&&!A,disabled:A,onCheckedChange:e=>void j(e===!0),"aria-label":o({id:`o9fPtM`}),className:`scale-75`})]})}),(0,y.jsx)(c,{side:`bottom`,children:A?(0,y.jsx)(i,{id:`vy_VIN`}):k?(0,y.jsx)(i,{id:`vGQxBT`}):(0,y.jsx)(i,{id:`9p_QBN`})})]}):null,t[13]=o,t[14]=k,t[15]=E,t[16]=A,t[17]=j,t[18]=G):G=t[18];let K;t[19]===O?K=t[20]:(K=O?(0,y.jsxs)(l,{children:[(0,y.jsx)(s,{asChild:!0,children:(0,y.jsx)(`span`,{className:`shrink-0 rounded-sm bg-amber-500/15 px-1.5 py-0.5 font-medium text-[11px] text-amber-700 dark:text-amber-400`,children:(0,y.jsx)(i,{id:`tgWuMB`})})}),(0,y.jsx)(c,{side:`bottom`,children:(0,y.jsx)(i,{id:`s0Iold`})})]}):null,t[19]=O,t[20]=K);let q;t[21]!==o||t[22]!==E||t[23]!==O||t[24]!==P||t[25]!==I||t[26]!==M||t[27]!==L?(q=O&&E&&M?(0,y.jsxs)(l,{children:[(0,y.jsx)(d,{variant:`ghost`,size:`sm`,onClick:()=>void I(),disabled:L||P,"aria-label":o({id:`VxLvKE`}),className:`shrink-0 gap-1 text-muted-foreground px-2 text-xs hover:text-foreground`,asChild:!0,children:(0,y.jsxs)(s,{children:[L?(0,y.jsx)(p,{icon:h,className:`size-3`,"aria-hidden":!0}):(0,y.jsx)(h,{className:`size-3`,"aria-hidden":!0}),(0,y.jsx)(`span`,{className:`hidden @xl/toolbar:inline`,children:L?(0,y.jsx)(i,{id:`fIJtam`}):(0,y.jsx)(i,{id:`jJdwCB`})})]})}),(0,y.jsx)(c,{side:`bottom`,children:(0,y.jsx)(i,{id:`XSb9HS`})})]}):null,t[21]=o,t[22]=E,t[23]=O,t[24]=P,t[25]=I,t[26]=M,t[27]=L,t[28]=q):q=t[28];let J;t[29]!==o||t[30]!==E||t[31]!==V||t[32]!==P||t[33]!==L||t[34]!==D?(J=E&&D?(0,y.jsxs)(l,{children:[(0,y.jsx)(d,{variant:`ghost`,size:`sm`,onClick:()=>void V(),disabled:P||L,"aria-label":o({id:`GidGkh`}),className:`shrink-0 gap-1 text-muted-foreground px-2 text-xs hover:text-foreground`,asChild:!0,children:(0,y.jsxs)(s,{children:[P?(0,y.jsx)(p,{icon:m,className:`size-3`,"aria-hidden":!0}):(0,y.jsx)(m,{className:`size-3`,"aria-hidden":!0}),(0,y.jsx)(`span`,{className:`hidden @xl/toolbar:inline`,children:P?(0,y.jsx)(i,{id:`JL3si7`}):(0,y.jsx)(i,{id:`EkH9pt`})})]})}),(0,y.jsx)(c,{side:`bottom`,children:(0,y.jsx)(i,{id:`GidGkh`})})]}):null,t[29]=o,t[30]=E,t[31]=V,t[32]=P,t[33]=L,t[34]=D,t[35]=J):J=t[35];let Y;t[36]!==R||t[37]!==r||t[38]!==U||t[39]!==P?(Y=R?(0,y.jsx)(v.Suspense,{fallback:null,children:(0,y.jsx)(b,{open:!0,onOpenChange:e=>{e||z(null)},skillName:r,localBody:R.localBody,upstreamBody:R.upstreamBody,applying:P,onTakeUpstream:()=>void U()})}):null,t[36]=R,t[37]=r,t[38]=U,t[39]=P,t[40]=Y):Y=t[40];let X;return t[41]!==W||t[42]!==G||t[43]!==K||t[44]!==q||t[45]!==J||t[46]!==Y?(X=(0,y.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5 text-muted-foreground text-xs`,children:[W,G,K,q,J,Y]}),t[41]=W,t[42]=G,t[43]=K,t[44]=q,t[45]=J,t[46]=Y,t[47]=X):X=t[47],X}export{x as SkillOriginInline};
@@ -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-Bu4Wm3Rf.js";import{t as m}from"./button-DzgjsZzC.js";import{l as h,n as g,r as _,t as v}from"./AddPropertiesButton-DbEuq3sM.js";import{a as y,h as b,r as x,t as S,u as C}from"./dropdown-menu-DtLu9NwU.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-N3jmnGIX.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-Bu4Wm3Rf.js";import{t as m}from"./button-DzgjsZzC.js";import{l as h,n as g,r as _,t as v}from"./AddPropertiesButton-DoCpp2QW.js";import{a as y,h as b,r as x,t as S,u as C}from"./dropdown-menu-DtLu9NwU.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-N3jmnGIX.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};