@halcyonlabs/app 0.47.0-halcyon.19 → 0.47.0-halcyon.21

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 (579) hide show
  1. package/app/dist/assets/{AddMachineDialog-BpnPQjZ9.js → AddMachineDialog-4BQFC118.js} +1 -1
  2. package/app/dist/assets/AddMachineDialog-4BQFC118.js.br +0 -0
  3. package/app/dist/assets/AddMachineDialog-4BQFC118.js.gz +0 -0
  4. package/app/dist/assets/{AppCommandShortcutHint-DT0MQ07r.js → AppCommandShortcutHint-BlXOfa_n.js} +1 -1
  5. package/app/dist/assets/{AppFileExternalNavigationDispatcher-DWBAM2Ao.js → AppFileExternalNavigationDispatcher-fGD_vTns.js} +1 -1
  6. package/app/dist/assets/AppFileExternalNavigationDispatcher-fGD_vTns.js.br +0 -0
  7. package/app/dist/assets/AppFileExternalNavigationDispatcher-fGD_vTns.js.gz +0 -0
  8. package/app/dist/assets/{AppToasterView-z0BfD6I6.js → AppToasterView-DzbjTKdn.js} +1 -1
  9. package/app/dist/assets/{BbDiff-ny0zSZK7.js → BbDiff-BkqgAZD9.js} +1 -1
  10. package/app/dist/assets/BbDiff-BkqgAZD9.js.br +0 -0
  11. package/app/dist/assets/BbDiff-BkqgAZD9.js.gz +0 -0
  12. package/app/dist/assets/{BbDiffSplit-D2B68Y3j.js → BbDiffSplit-DTvWaW-n.js} +2 -2
  13. package/app/dist/assets/BbDiffSplit-DTvWaW-n.js.br +0 -0
  14. package/app/dist/assets/BbDiffSplit-DTvWaW-n.js.gz +0 -0
  15. package/app/dist/assets/{BbSourceCode-Coh1Fz_y.js → BbSourceCode-Dqw4VrLu.js} +1 -1
  16. package/app/dist/assets/BbSourceCode-Dqw4VrLu.js.br +0 -0
  17. package/app/dist/assets/BbSourceCode-Dqw4VrLu.js.gz +0 -0
  18. package/app/dist/assets/{BrowserTabDeck-B6MAEL-g.js → BrowserTabDeck-CuHEyZd6.js} +1 -1
  19. package/app/dist/assets/BrowserTabDeck-CuHEyZd6.js.br +0 -0
  20. package/app/dist/assets/BrowserTabDeck-CuHEyZd6.js.gz +0 -0
  21. package/app/dist/assets/{CommandPaletteBody-BrqKHT3H.js → CommandPaletteBody-DynxiDg6.js} +1 -1
  22. package/app/dist/assets/CommandPaletteBody-DynxiDg6.js.br +0 -0
  23. package/app/dist/assets/CommandPaletteBody-DynxiDg6.js.gz +0 -0
  24. package/app/dist/assets/{DiffHost-axFBS1TY.js → DiffHost-3UTZIJNs.js} +1 -1
  25. package/app/dist/assets/DiffHost-3UTZIJNs.js.br +0 -0
  26. package/app/dist/assets/DiffHost-3UTZIJNs.js.gz +0 -0
  27. package/app/dist/assets/{ExperimentalFileLinkMenu-BqFZL6JY.js → ExperimentalFileLinkMenu-C0RXVabs.js} +1 -1
  28. package/app/dist/assets/ExperimentalFileLinkMenu-C0RXVabs.js.br +0 -0
  29. package/app/dist/assets/ExperimentalFileLinkMenu-C0RXVabs.js.gz +0 -0
  30. package/app/dist/assets/{FilePreview-D1vlO0xa.js → FilePreview-BxgJ2jjI.js} +1 -1
  31. package/app/dist/assets/FilePreview-BxgJ2jjI.js.br +0 -0
  32. package/app/dist/assets/FilePreview-BxgJ2jjI.js.gz +0 -0
  33. package/app/dist/assets/{GitDiffCardHeader-BDVE9Slz.js → GitDiffCardHeader-Ce736y-m.js} +1 -1
  34. package/app/dist/assets/GitDiffCardHeader-Ce736y-m.js.br +0 -0
  35. package/app/dist/assets/GitDiffCardHeader-Ce736y-m.js.gz +0 -0
  36. package/app/dist/assets/{InlineMessageEditorFrame-CfMA_yDN.js → InlineMessageEditorFrame-Dud8h1It.js} +1 -1
  37. package/app/dist/assets/InlineMessageEditorFrame-Dud8h1It.js.br +0 -0
  38. package/app/dist/assets/InlineMessageEditorFrame-Dud8h1It.js.gz +0 -0
  39. package/app/dist/assets/{MachineRenameDialog-PZtQvU1f.js → MachineRenameDialog-C_ZV5gEB.js} +1 -1
  40. package/app/dist/assets/MachineRenameDialog-C_ZV5gEB.js.br +0 -0
  41. package/app/dist/assets/MachineRenameDialog-C_ZV5gEB.js.gz +0 -0
  42. package/app/dist/assets/{MachineSettingsView-CI2wHJ0D.js → MachineSettingsView-BWSIpenw.js} +1 -1
  43. package/app/dist/assets/MachineSettingsView-BWSIpenw.js.br +0 -0
  44. package/app/dist/assets/MachineSettingsView-BWSIpenw.js.gz +0 -0
  45. package/app/dist/assets/{MicrophonePreferences-j_i1qWay.js → MicrophonePreferences-CNEhQgAS.js} +1 -1
  46. package/app/dist/assets/MicrophonePreferences-CNEhQgAS.js.br +0 -0
  47. package/app/dist/assets/MicrophonePreferences-CNEhQgAS.js.gz +0 -0
  48. package/app/dist/assets/{ModelReasoningMenu-CFZ_DBOK.js → ModelReasoningMenu-BeNCpeQf.js} +1 -1
  49. package/app/dist/assets/ModelReasoningMenu-BeNCpeQf.js.br +0 -0
  50. package/app/dist/assets/ModelReasoningMenu-BeNCpeQf.js.gz +0 -0
  51. package/app/dist/assets/{NewTabPage-Cj0qUVQ8.js → NewTabPage-CsPDV6iC.js} +1 -1
  52. package/app/dist/assets/NewTabPage-CsPDV6iC.js.br +0 -0
  53. package/app/dist/assets/NewTabPage-CsPDV6iC.js.gz +0 -0
  54. package/app/dist/assets/{NewThreadComposer-BQ9ueBmG.js → NewThreadComposer-BY0jUSbs.js} +1 -1
  55. package/app/dist/assets/NewThreadComposer-BY0jUSbs.js.br +0 -0
  56. package/app/dist/assets/NewThreadComposer-BY0jUSbs.js.gz +0 -0
  57. package/app/dist/assets/{OnboardingFlow-B3VDIg3q.js → OnboardingFlow-BQdrTtHC.js} +1 -1
  58. package/app/dist/assets/OnboardingFlow-BQdrTtHC.js.br +0 -0
  59. package/app/dist/assets/OnboardingFlow-BQdrTtHC.js.gz +0 -0
  60. package/app/dist/assets/{OptionPicker-DQwMICWD.js → OptionPicker-sql35hd_.js} +1 -1
  61. package/app/dist/assets/OptionPicker-sql35hd_.js.br +0 -0
  62. package/app/dist/assets/OptionPicker-sql35hd_.js.gz +0 -0
  63. package/app/dist/assets/{PaletteShell-CUaJsDQy.js → PaletteShell-B9KeWKsT.js} +1 -1
  64. package/app/dist/assets/PaletteShell-B9KeWKsT.js.br +0 -0
  65. package/app/dist/assets/PaletteShell-B9KeWKsT.js.gz +0 -0
  66. package/app/dist/assets/{PaneMaximizeButton-BOOlC9xx.js → PaneMaximizeButton-CGBzyikf.js} +1 -1
  67. package/app/dist/assets/PaneMaximizeButton-CGBzyikf.js.br +0 -0
  68. package/app/dist/assets/PaneMaximizeButton-CGBzyikf.js.gz +0 -0
  69. package/app/dist/assets/{PierreLineSelectionActions-DeORj4pK.js → PierreLineSelectionActions-BYL6I0xE.js} +1 -1
  70. package/app/dist/assets/PierreLineSelectionActions-BYL6I0xE.js.br +0 -0
  71. package/app/dist/assets/PierreLineSelectionActions-BYL6I0xE.js.gz +0 -0
  72. package/app/dist/assets/{PluginPanelRightPanelHost-Dhmjh3Yu.js → PluginPanelRightPanelHost-Dj-wS_Ki.js} +1 -1
  73. package/app/dist/assets/PluginPanelRightPanelHost-Dj-wS_Ki.js.br +0 -0
  74. package/app/dist/assets/PluginPanelRightPanelHost-Dj-wS_Ki.js.gz +0 -0
  75. package/app/dist/assets/{PluginThreadChat-BpwUIMzi.js → PluginThreadChat-Dh-No9s-.js} +1 -1
  76. package/app/dist/assets/PluginThreadChat-Dh-No9s-.js.br +0 -0
  77. package/app/dist/assets/PluginThreadChat-Dh-No9s-.js.gz +0 -0
  78. package/app/dist/assets/{ProjectDetailSettingsView-CcynSBqP.js → ProjectDetailSettingsView-BOV7URzQ.js} +1 -1
  79. package/app/dist/assets/ProjectDetailSettingsView-BOV7URzQ.js.br +0 -0
  80. package/app/dist/assets/ProjectDetailSettingsView-BOV7URzQ.js.gz +0 -0
  81. package/app/dist/assets/{ProjectMachineSetupDialog-BHF6n4Kn.js → ProjectMachineSetupDialog-BW4gUYj0.js} +1 -1
  82. package/app/dist/assets/ProjectMachineSetupDialog-BW4gUYj0.js.br +0 -0
  83. package/app/dist/assets/ProjectMachineSetupDialog-BW4gUYj0.js.gz +0 -0
  84. package/app/dist/assets/{ProjectsSettingsSection-D95eFIME.js → ProjectsSettingsSection-BI_xhcA2.js} +1 -1
  85. package/app/dist/assets/ProjectsSettingsSection-BI_xhcA2.js.br +0 -0
  86. package/app/dist/assets/ProjectsSettingsSection-BI_xhcA2.js.gz +0 -0
  87. package/app/dist/assets/{QueuedMessagesList-DWaI57OV.js → QueuedMessagesList-BEyivVSE.js} +1 -1
  88. package/app/dist/assets/QueuedMessagesList-BEyivVSE.js.br +0 -0
  89. package/app/dist/assets/QueuedMessagesList-BEyivVSE.js.gz +0 -0
  90. package/app/dist/assets/{RemotePathBrowser-CaeJnvqX.js → RemotePathBrowser-DVW5AwBs.js} +1 -1
  91. package/app/dist/assets/RemotePathBrowser-DVW5AwBs.js.br +0 -0
  92. package/app/dist/assets/RemotePathBrowser-DVW5AwBs.js.gz +0 -0
  93. package/app/dist/assets/{RootComposeView-DXDnU_77.js → RootComposeView-Cbnwq7j_.js} +1 -1
  94. package/app/dist/assets/RootComposeView-Cbnwq7j_.js.br +0 -0
  95. package/app/dist/assets/RootComposeView-Cbnwq7j_.js.gz +0 -0
  96. package/app/dist/assets/{SecondaryPanelLayout-Cbzw-eIz.js → SecondaryPanelLayout-fG8BuYv-.js} +1 -1
  97. package/app/dist/assets/SecondaryPanelLayout-fG8BuYv-.js.br +0 -0
  98. package/app/dist/assets/SecondaryPanelLayout-fG8BuYv-.js.gz +0 -0
  99. package/app/dist/assets/{ServerMoveOverlayView-ZEw2QJoL.js → ServerMoveOverlayView-CPWZimVv.js} +1 -1
  100. package/app/dist/assets/ServerMoveOverlayView-CPWZimVv.js.br +0 -0
  101. package/app/dist/assets/ServerMoveOverlayView-CPWZimVv.js.gz +0 -0
  102. package/app/dist/assets/{SettingsSidebar-CdfGtADz.js → SettingsSidebar-DxfoXXKW.js} +1 -1
  103. package/app/dist/assets/SettingsSidebar-DxfoXXKW.js.br +0 -0
  104. package/app/dist/assets/SettingsSidebar-DxfoXXKW.js.gz +0 -0
  105. package/app/dist/assets/{SettingsView-h9ZS30dB.js → SettingsView-D_DkKpuv.js} +1 -1
  106. package/app/dist/assets/SettingsView-D_DkKpuv.js.br +0 -0
  107. package/app/dist/assets/SettingsView-D_DkKpuv.js.gz +0 -0
  108. package/app/dist/assets/{SidebarFooterCustomize-B4Q71PFC.js → SidebarFooterCustomize-VQoenr5y.js} +1 -1
  109. package/app/dist/assets/SidebarFooterCustomize-VQoenr5y.js.br +0 -0
  110. package/app/dist/assets/SidebarFooterCustomize-VQoenr5y.js.gz +0 -0
  111. package/app/dist/assets/{SidebarVisibilityCustomize-DD2XyXp-.js → SidebarVisibilityCustomize-DUKnlz9Y.js} +1 -1
  112. package/app/dist/assets/SidebarVisibilityCustomize-DUKnlz9Y.js.br +0 -0
  113. package/app/dist/assets/SidebarVisibilityCustomize-DUKnlz9Y.js.gz +0 -0
  114. package/app/dist/assets/{SourceCodeHost-mzkOzbsV.js → SourceCodeHost-BlXLvWv2.js} +2 -2
  115. package/app/dist/assets/SourceCodeHost-BlXLvWv2.js.br +0 -0
  116. package/app/dist/assets/SourceCodeHost-BlXLvWv2.js.gz +0 -0
  117. package/app/dist/assets/{SplitWorkspaceRoute-BJEIDTsl.js → SplitWorkspaceRoute-6w4G23kc.js} +2 -2
  118. package/app/dist/assets/SplitWorkspaceRoute-6w4G23kc.js.br +0 -0
  119. package/app/dist/assets/SplitWorkspaceRoute-6w4G23kc.js.gz +0 -0
  120. package/app/dist/assets/{TerminalOutputBlock-LgqFqaFJ.js → TerminalOutputBlock-BxBSWJr_.js} +1 -1
  121. package/app/dist/assets/TerminalOutputBlock-BxBSWJr_.js.br +0 -0
  122. package/app/dist/assets/TerminalOutputBlock-BxBSWJr_.js.gz +0 -0
  123. package/app/dist/assets/{ThreadActionsMenu-CGpm4Smm.js → ThreadActionsMenu-ChpSKv80.js} +1 -1
  124. package/app/dist/assets/ThreadActionsMenu-ChpSKv80.js.br +0 -0
  125. package/app/dist/assets/ThreadActionsMenu-ChpSKv80.js.gz +0 -0
  126. package/app/dist/assets/{ThreadDetailView-BNuaME6v.js → ThreadDetailView-CfH3uWo-.js} +3 -3
  127. package/app/dist/assets/ThreadDetailView-CfH3uWo-.js.br +0 -0
  128. package/app/dist/assets/ThreadDetailView-CfH3uWo-.js.gz +0 -0
  129. package/app/dist/assets/{ThreadSearchPaletteMode-BBQgpzya.js → ThreadSearchPaletteMode-B72v3f5V.js} +1 -1
  130. package/app/dist/assets/ThreadSearchPaletteMode-B72v3f5V.js.br +0 -0
  131. package/app/dist/assets/ThreadSearchPaletteMode-B72v3f5V.js.gz +0 -0
  132. package/app/dist/assets/{ThreadSecondaryPanel-D3Q2Ugws.js → ThreadSecondaryPanel-4nIZy4h9.js} +1 -1
  133. package/app/dist/assets/ThreadSecondaryPanel-4nIZy4h9.js.br +0 -0
  134. package/app/dist/assets/ThreadSecondaryPanel-4nIZy4h9.js.gz +0 -0
  135. package/app/dist/assets/{ThreadSecondaryPanelTabContent-DWJgn-1Y.js → ThreadSecondaryPanelTabContent-8-e35_Me.js} +1 -1
  136. package/app/dist/assets/ThreadSecondaryPanelTabContent-8-e35_Me.js.br +0 -0
  137. package/app/dist/assets/{ThreadSecondaryPanelTabContent-DWJgn-1Y.js.gz → ThreadSecondaryPanelTabContent-8-e35_Me.js.gz} +0 -0
  138. package/app/dist/assets/{ThreadStatusGlyph-Cm0DMDOm.js → ThreadStatusGlyph-C9tzRtlV.js} +1 -1
  139. package/app/dist/assets/ThreadStatusGlyph-C9tzRtlV.js.br +0 -0
  140. package/app/dist/assets/ThreadStatusGlyph-C9tzRtlV.js.gz +0 -0
  141. package/app/dist/assets/{ThreadTerminalPanel-DWnPApoJ.js → ThreadTerminalPanel-CqTk9L2y.js} +1 -1
  142. package/app/dist/assets/ThreadTerminalPanel-CqTk9L2y.js.br +0 -0
  143. package/app/dist/assets/ThreadTerminalPanel-CqTk9L2y.js.gz +0 -0
  144. package/app/dist/assets/{ThreadTerminalView-VSstFotF.js → ThreadTerminalView-B6XNBrJ9.js} +1 -1
  145. package/app/dist/assets/ThreadTerminalView-B6XNBrJ9.js.br +0 -0
  146. package/app/dist/assets/ThreadTerminalView-B6XNBrJ9.js.gz +0 -0
  147. package/app/dist/assets/{ThreadTimelineNavigationContext-X5kHi62J.js → ThreadTimelineNavigationContext-DbZHHZfY.js} +2 -2
  148. package/app/dist/assets/ThreadTimelineNavigationContext-DbZHHZfY.js.br +0 -0
  149. package/app/dist/assets/ThreadTimelineNavigationContext-DbZHHZfY.js.gz +0 -0
  150. package/app/dist/assets/{ThreadUnarchiveButton-CzReEHtx.js → ThreadUnarchiveButton-CtjS9UkR.js} +1 -1
  151. package/app/dist/assets/{TimelineDetailScroll-DAyZkrWd.js → TimelineDetailScroll-CpFZhWhU.js} +1 -1
  152. package/app/dist/assets/TimelineDetailScroll-CpFZhWhU.js.br +0 -0
  153. package/app/dist/assets/TimelineDetailScroll-CpFZhWhU.js.gz +0 -0
  154. package/app/dist/assets/{TimelineFileDiffBlock-BHanM8gy.js → TimelineFileDiffBlock-JiOlR3O8.js} +1 -1
  155. package/app/dist/assets/TimelineFileDiffBlock-JiOlR3O8.js.br +0 -0
  156. package/app/dist/assets/TimelineFileDiffBlock-JiOlR3O8.js.gz +0 -0
  157. package/app/dist/assets/{TimelineSelectionMenu-NgclvOOl.js → TimelineSelectionMenu-DT4qwoFI.js} +1 -1
  158. package/app/dist/assets/TimelineSelectionMenu-DT4qwoFI.js.br +0 -0
  159. package/app/dist/assets/TimelineSelectionMenu-DT4qwoFI.js.gz +0 -0
  160. package/app/dist/assets/{ToolsView-DgNwKkID.js → ToolsView-nAAic88Z.js} +1 -1
  161. package/app/dist/assets/ToolsView-nAAic88Z.js.br +0 -0
  162. package/app/dist/assets/ToolsView-nAAic88Z.js.gz +0 -0
  163. package/app/dist/assets/{ToolsViewSplits-BF5GHpoJ.js → ToolsViewSplits-Blo3GJMQ.js} +2 -2
  164. package/app/dist/assets/ToolsViewSplits-Blo3GJMQ.js.br +0 -0
  165. package/app/dist/assets/ToolsViewSplits-Blo3GJMQ.js.gz +0 -0
  166. package/app/dist/assets/{WaveformVisualizer-Cri3lXZw.js → WaveformVisualizer-BrH_nwc4.js} +1 -1
  167. package/app/dist/assets/WaveformVisualizer-BrH_nwc4.js.br +0 -0
  168. package/app/dist/assets/WaveformVisualizer-BrH_nwc4.js.gz +0 -0
  169. package/app/dist/assets/{absolute-file-path-CVrJEmkI.js → absolute-file-path-W_eh4kPq.js} +1 -1
  170. package/app/dist/assets/{app-fixed-tab-navigation-MkQXoAlQ.js → app-fixed-tab-navigation-DX9s-gCj.js} +1 -1
  171. package/app/dist/assets/app-fixed-tab-navigation-DX9s-gCj.js.br +0 -0
  172. package/app/dist/assets/app-fixed-tab-navigation-DX9s-gCj.js.gz +0 -0
  173. package/app/dist/assets/{audio-input-device-preference-Bv7CMblt.js → audio-input-device-preference-DsU6GGNE.js} +1 -1
  174. package/app/dist/assets/audio-input-device-preference-DsU6GGNE.js.br +0 -0
  175. package/app/dist/assets/audio-input-device-preference-DsU6GGNE.js.gz +0 -0
  176. package/app/dist/assets/{bottom-anchored-scroll-body-WkS6Ysu2.js → bottom-anchored-scroll-body-C8n22V_o.js} +1 -1
  177. package/app/dist/assets/bottom-anchored-scroll-body-C8n22V_o.js.br +0 -0
  178. package/app/dist/assets/bottom-anchored-scroll-body-C8n22V_o.js.gz +0 -0
  179. package/app/dist/assets/{browser-url-CkFc4qcI.js → browser-url-B0SjaYti.js} +1 -1
  180. package/app/dist/assets/browser-url-B0SjaYti.js.br +0 -0
  181. package/app/dist/assets/browser-url-B0SjaYti.js.gz +0 -0
  182. package/app/dist/assets/{checkbox-CB54Ucjt.js → checkbox-Ct38DhHB.js} +1 -1
  183. package/app/dist/assets/checkbox-Ct38DhHB.js.br +0 -0
  184. package/app/dist/assets/checkbox-Ct38DhHB.js.gz +0 -0
  185. package/app/dist/assets/{code-loading-skeletons-BB3W6Jxd.js → code-loading-skeletons-C_099GEq.js} +1 -1
  186. package/app/dist/assets/code-loading-skeletons-C_099GEq.js.br +5 -0
  187. package/app/dist/assets/code-loading-skeletons-C_099GEq.js.gz +0 -0
  188. package/app/dist/assets/{code-rendering-CxXqiD4W.js → code-rendering-OxBy5zPr.js} +1 -1
  189. package/app/dist/assets/{code-theme-registration-CljisFQu.js → code-theme-registration-BokyXo30.js} +1 -1
  190. package/app/dist/assets/{detail-card-B1VUDLNX.js → detail-card-Cj628JNK.js} +1 -1
  191. package/app/dist/assets/detail-card-Cj628JNK.js.br +0 -0
  192. package/app/dist/assets/detail-card-Cj628JNK.js.gz +0 -0
  193. package/app/dist/assets/{diff-stats-tally-I7rMu5N0.js → diff-stats-tally-MtORWItG.js} +1 -1
  194. package/app/dist/assets/diff-stats-tally-MtORWItG.js.br +0 -0
  195. package/app/dist/assets/diff-stats-tally-MtORWItG.js.gz +0 -0
  196. package/app/dist/assets/{environment-mutations-CQyFiDlo.js → environment-mutations-rP4eROm2.js} +1 -1
  197. package/app/dist/assets/environment-mutations-rP4eROm2.js.br +0 -0
  198. package/app/dist/assets/environment-mutations-rP4eROm2.js.gz +0 -0
  199. package/app/dist/assets/{environment-workspace-display-CiBUVP2u.js → environment-workspace-display-O1JRHfbV.js} +3 -3
  200. package/app/dist/assets/environment-workspace-display-O1JRHfbV.js.br +0 -0
  201. package/app/dist/assets/environment-workspace-display-O1JRHfbV.js.gz +0 -0
  202. package/app/dist/assets/{event-code-block-Bpn_2p89.js → event-code-block-DqUZCAii.js} +1 -1
  203. package/app/dist/assets/event-code-block-DqUZCAii.js.br +0 -0
  204. package/app/dist/assets/event-code-block-DqUZCAii.js.gz +0 -0
  205. package/app/dist/assets/{expandable-text-CoDH4ptt.js → expandable-text-herJC70e.js} +1 -1
  206. package/app/dist/assets/expandable-text-herJC70e.js.br +0 -0
  207. package/app/dist/assets/expandable-text-herJC70e.js.gz +0 -0
  208. package/app/dist/assets/{file-opener-preference-C7NAS-GW.js → file-opener-preference-BEeek6dm.js} +1 -1
  209. package/app/dist/assets/{file-path-link-DrvaADa1.js → file-path-link-Cni9Azi2.js} +1 -1
  210. package/app/dist/assets/file-path-link-Cni9Azi2.js.br +0 -0
  211. package/app/dist/assets/file-path-link-Cni9Azi2.js.gz +0 -0
  212. package/app/dist/assets/{host-mutations-BdKF0vb_.js → host-mutations-Ckc-eVys.js} +1 -1
  213. package/app/dist/assets/host-mutations-Ckc-eVys.js.br +0 -0
  214. package/app/dist/assets/host-mutations-Ckc-eVys.js.gz +0 -0
  215. package/app/dist/assets/{icon-extended-Bmnh2NUd.js → icon-extended-DDFkslJU.js} +1 -1
  216. package/app/dist/assets/icon-extended-DDFkslJU.js.br +0 -0
  217. package/app/dist/assets/icon-extended-DDFkslJU.js.gz +0 -0
  218. package/app/dist/assets/{image-lightbox-D3Fevp17.js → image-lightbox-BW1bqQJM.js} +1 -1
  219. package/app/dist/assets/image-lightbox-BW1bqQJM.js.br +0 -0
  220. package/app/dist/assets/image-lightbox-BW1bqQJM.js.gz +0 -0
  221. package/app/dist/assets/{index-Bfkd7WaZ.js → index-BBxUiLNy.js} +8 -8
  222. package/app/dist/assets/index-BBxUiLNy.js.br +0 -0
  223. package/app/dist/assets/index-BBxUiLNy.js.gz +0 -0
  224. package/app/dist/assets/{inline-rename-editor-BIpXK65F.js → inline-rename-editor-wjwfk7v2.js} +1 -1
  225. package/app/dist/assets/inline-rename-editor-wjwfk7v2.js.br +0 -0
  226. package/app/dist/assets/inline-rename-editor-wjwfk7v2.js.gz +0 -0
  227. package/app/dist/assets/{launcherRow-CR-65XBF.js → launcherRow-rIW7Z6Xm.js} +1 -1
  228. package/app/dist/assets/launcherRow-rIW7Z6Xm.js.br +0 -0
  229. package/app/dist/assets/launcherRow-rIW7Z6Xm.js.gz +0 -0
  230. package/app/dist/assets/{localhost-link-rewrite-description-CIPrZ4gX.js → localhost-link-rewrite-description-Bovg3W--.js} +1 -1
  231. package/app/dist/assets/localhost-link-rewrite-description-Bovg3W--.js.br +0 -0
  232. package/app/dist/assets/localhost-link-rewrite-description-Bovg3W--.js.gz +0 -0
  233. package/app/dist/assets/{machine-provider-queries-BjtsqCT7.js → machine-provider-queries-CRlWTEz7.js} +1 -1
  234. package/app/dist/assets/machine-provider-queries-CRlWTEz7.js.br +0 -0
  235. package/app/dist/assets/machine-provider-queries-CRlWTEz7.js.gz +0 -0
  236. package/app/dist/assets/{machine-server-access-HMhg_GpF.js → machine-server-access-D3hixOIC.js} +1 -1
  237. package/app/dist/assets/{markdown-file-image-routing-CG3cFYwB.js → markdown-file-image-routing-DAIVjxLg.js} +1 -1
  238. package/app/dist/assets/{markdown-html-7vEPZaw6.js → markdown-html-B-Kyh3zI.js} +1 -1
  239. package/app/dist/assets/markdown-html-B-Kyh3zI.js.br +0 -0
  240. package/app/dist/assets/markdown-html-B-Kyh3zI.js.gz +0 -0
  241. package/app/dist/assets/{markdown-local-file-link-sP8_W_A8.js → markdown-local-file-link-C89PR8d5.js} +1 -1
  242. package/app/dist/assets/markdown-local-file-link-C89PR8d5.js.br +0 -0
  243. package/app/dist/assets/markdown-local-file-link-C89PR8d5.js.gz +0 -0
  244. package/app/dist/assets/{markdown-preview-DIfq3fId.js → markdown-preview-B7BmqIlu.js} +2 -2
  245. package/app/dist/assets/markdown-preview-B7BmqIlu.js.br +0 -0
  246. package/app/dist/assets/markdown-preview-B7BmqIlu.js.gz +0 -0
  247. package/app/dist/assets/{markdown-prompt-mentions-BSTB-Vmw.js → markdown-prompt-mentions-B0JRhgrI.js} +1 -1
  248. package/app/dist/assets/markdown-prompt-mentions-B0JRhgrI.js.br +0 -0
  249. package/app/dist/assets/markdown-prompt-mentions-B0JRhgrI.js.gz +0 -0
  250. package/app/dist/assets/{model-load-error-message-OglVlwTY.js → model-load-error-message-B-HKqgUD.js} +1 -1
  251. package/app/dist/assets/model-load-error-message-B-HKqgUD.js.br +0 -0
  252. package/app/dist/assets/model-load-error-message-B-HKqgUD.js.gz +0 -0
  253. package/app/dist/assets/onboarding-telemetry-C21cbjI_.js +1 -0
  254. package/app/dist/assets/{open-in-editor-button-B8RkW-4j.js → open-in-editor-button-CQGreiCk.js} +1 -1
  255. package/app/dist/assets/open-in-editor-button-CQGreiCk.js.br +0 -0
  256. package/app/dist/assets/open-in-editor-button-CQGreiCk.js.gz +0 -0
  257. package/app/dist/assets/{page-shell-Cqdn2HWD.js → page-shell-BHTOdeQn.js} +1 -1
  258. package/app/dist/assets/page-shell-BHTOdeQn.js.br +0 -0
  259. package/app/dist/assets/page-shell-BHTOdeQn.js.gz +0 -0
  260. package/app/dist/assets/{pierre-worker-pool-CQnFjCvY.js → pierre-worker-pool-Bm9cLA-c.js} +1 -1
  261. package/app/dist/assets/pierre-worker-pool-Bm9cLA-c.js.br +0 -0
  262. package/app/dist/assets/pierre-worker-pool-Bm9cLA-c.js.gz +0 -0
  263. package/app/dist/assets/{plugin-detail-navigation-DR_dbSv3.js → plugin-detail-navigation-CmSGTNyL.js} +1 -1
  264. package/app/dist/assets/plugin-detail-navigation-CmSGTNyL.js.br +0 -0
  265. package/app/dist/assets/plugin-detail-navigation-CmSGTNyL.js.gz +0 -0
  266. package/app/dist/assets/{plugin-frontend-VzstkBtF.js → plugin-frontend-BdQdYbWd.js} +3 -3
  267. package/app/dist/assets/plugin-frontend-BdQdYbWd.js.br +0 -0
  268. package/app/dist/assets/plugin-frontend-BdQdYbWd.js.gz +0 -0
  269. package/app/dist/assets/{plugin-ui-mdaPclkM.js → plugin-ui-DyNDyPD9.js} +1 -1
  270. package/app/dist/assets/plugin-ui-DyNDyPD9.js.br +0 -0
  271. package/app/dist/assets/plugin-ui-DyNDyPD9.js.gz +0 -0
  272. package/app/dist/assets/{project-default-execution-options-query-1RlH9w9L.js → project-default-execution-options-query-h6eTG6_Q.js} +1 -1
  273. package/app/dist/assets/{queued-editor-typeahead-layout-CiIAEWsc.js → queued-editor-typeahead-layout-BKui5z7C.js} +1 -1
  274. package/app/dist/assets/queued-editor-typeahead-layout-BKui5z7C.js.br +0 -0
  275. package/app/dist/assets/queued-editor-typeahead-layout-BKui5z7C.js.gz +0 -0
  276. package/app/dist/assets/{queued-messages-layout-DyuqzIxg.js → queued-messages-layout-BuEilXwP.js} +1 -1
  277. package/app/dist/assets/queued-messages-layout-BuEilXwP.js.br +0 -0
  278. package/app/dist/assets/queued-messages-layout-BuEilXwP.js.gz +0 -0
  279. package/app/dist/assets/{resource-list-DKdrv-JU.js → resource-list-B6MkAu8v.js} +1 -1
  280. package/app/dist/assets/resource-list-B6MkAu8v.js.br +0 -0
  281. package/app/dist/assets/resource-list-B6MkAu8v.js.gz +0 -0
  282. package/app/dist/assets/root-compose-create-preference-DDv947dq.js +1 -0
  283. package/app/dist/assets/{save-file-B3ftv5Jn.js → save-file-DYAtq7A9.js} +1 -1
  284. package/app/dist/assets/{settings-nav-BLpuT_C0.js → settings-nav-DbICcozy.js} +1 -1
  285. package/app/dist/assets/settings-nav-DbICcozy.js.br +0 -0
  286. package/app/dist/assets/settings-nav-DbICcozy.js.gz +0 -0
  287. package/app/dist/assets/{settings-sections-BvsMU9Kk.js → settings-sections-Cq0VX9E8.js} +1 -1
  288. package/app/dist/assets/settings-sections-Cq0VX9E8.js.br +0 -0
  289. package/app/dist/assets/settings-sections-Cq0VX9E8.js.gz +0 -0
  290. package/app/dist/assets/{shortcut-pill-DPVhSJ-G.js → shortcut-pill-DldxrKgx.js} +1 -1
  291. package/app/dist/assets/{sidebarTouchSensor-G8ypC2Ro.js → sidebarTouchSensor-D7jKXrfM.js} +1 -1
  292. package/app/dist/assets/sidebarTouchSensor-D7jKXrfM.js.br +0 -0
  293. package/app/dist/assets/sidebarTouchSensor-D7jKXrfM.js.gz +0 -0
  294. package/app/dist/assets/{switch-xFGnSGwy.js → switch-CzvlSesf.js} +1 -1
  295. package/app/dist/assets/switch-CzvlSesf.js.br +0 -0
  296. package/app/dist/assets/switch-CzvlSesf.js.gz +0 -0
  297. package/app/dist/assets/{textarea-CQaTsl45.js → textarea-9yaIMD7J.js} +1 -1
  298. package/app/dist/assets/{thread-event-parser-y3FxoN7v.js → thread-event-parser-BqVpKC6z.js} +1 -1
  299. package/app/dist/assets/thread-event-parser-BqVpKC6z.js.br +0 -0
  300. package/app/dist/assets/thread-event-parser-BqVpKC6z.js.gz +0 -0
  301. package/app/dist/assets/{thread-panel-queries-DWf3O5hk.js → thread-panel-queries-C3MI4mdc.js} +1 -1
  302. package/app/dist/assets/thread-panel-queries-C3MI4mdc.js.br +0 -0
  303. package/app/dist/assets/thread-panel-queries-C3MI4mdc.js.gz +0 -0
  304. package/app/dist/assets/{thread-runtime-mutations-UVG-YPVF.js → thread-runtime-mutations-Cr1H7KSz.js} +1 -1
  305. package/app/dist/assets/thread-runtime-mutations-Cr1H7KSz.js.br +0 -0
  306. package/app/dist/assets/thread-runtime-mutations-Cr1H7KSz.js.gz +0 -0
  307. package/app/dist/assets/{thread-terminal-queries-DOflC4hl.js → thread-terminal-queries-B4JkOWS2.js} +1 -1
  308. package/app/dist/assets/thread-terminal-queries-B4JkOWS2.js.br +0 -0
  309. package/app/dist/assets/thread-terminal-queries-B4JkOWS2.js.gz +0 -0
  310. package/app/dist/assets/{threadRecentItems-uVNwTDHY.js → threadRecentItems-DI2mgj7S.js} +1 -1
  311. package/app/dist/assets/threadRecentItems-DI2mgj7S.js.br +0 -0
  312. package/app/dist/assets/threadRecentItems-DI2mgj7S.js.gz +0 -0
  313. package/app/dist/assets/{threadWorkspaceOpenPath-C3NqD2MJ.js → threadWorkspaceOpenPath-BQgtUYL5.js} +1 -1
  314. package/app/dist/assets/threadWorkspaceOpenPath-BQgtUYL5.js.br +0 -0
  315. package/app/dist/assets/threadWorkspaceOpenPath-BQgtUYL5.js.gz +0 -0
  316. package/app/dist/assets/{title-bar-scroll-fade-Bg1HUJXc.js → title-bar-scroll-fade-CxbgbTcm.js} +1 -1
  317. package/app/dist/assets/title-bar-scroll-fade-CxbgbTcm.js.br +0 -0
  318. package/app/dist/assets/title-bar-scroll-fade-CxbgbTcm.js.gz +0 -0
  319. package/app/dist/assets/{truncate-start-DyS7-Yxt.js → truncate-start-CaCnKnh9.js} +1 -1
  320. package/app/dist/assets/{use-hover-popover-Di5t21dF.js → use-hover-popover-CyIdak3c.js} +1 -1
  321. package/app/dist/assets/use-hover-popover-CyIdak3c.js.br +0 -0
  322. package/app/dist/assets/use-hover-popover-CyIdak3c.js.gz +0 -0
  323. package/app/dist/assets/{useElementWidth-ixw7193l.js → useElementWidth-CL3Nb-eq.js} +1 -1
  324. package/app/dist/assets/useElementWidth-CL3Nb-eq.js.br +0 -0
  325. package/app/dist/assets/useElementWidth-CL3Nb-eq.js.gz +0 -0
  326. package/app/dist/assets/{useLocalOpenTargets-ZpAju0H3.js → useLocalOpenTargets-yzd9-Ceh.js} +1 -1
  327. package/app/dist/assets/useLocalOpenTargets-yzd9-Ceh.js.br +0 -0
  328. package/app/dist/assets/useLocalOpenTargets-yzd9-Ceh.js.gz +0 -0
  329. package/app/dist/assets/{usePanelResizeSnap-fqnDdIZ4.js → usePanelResizeSnap-dys9IwEk.js} +1 -1
  330. package/app/dist/assets/usePanelResizeSnap-dys9IwEk.js.br +0 -0
  331. package/app/dist/assets/usePanelResizeSnap-dys9IwEk.js.gz +0 -0
  332. package/app/dist/assets/{usePanelTerminals-BNnuXkgJ.js → usePanelTerminals-BN8UCJFO.js} +1 -1
  333. package/app/dist/assets/usePanelTerminals-BN8UCJFO.js.br +0 -0
  334. package/app/dist/assets/usePanelTerminals-BN8UCJFO.js.gz +0 -0
  335. package/app/dist/assets/{usePathSuggestions-B-mANSfN.js → usePathSuggestions-DkeFAE7l.js} +1 -1
  336. package/app/dist/assets/usePathSuggestions-DkeFAE7l.js.br +0 -0
  337. package/app/dist/assets/usePathSuggestions-DkeFAE7l.js.gz +0 -0
  338. package/app/dist/assets/{useResolvedLiveFileTarget-HWH-tIU4.js → useResolvedLiveFileTarget-43fAKgDx.js} +1 -1
  339. package/app/dist/assets/useResolvedLiveFileTarget-43fAKgDx.js.br +0 -0
  340. package/app/dist/assets/useResolvedLiveFileTarget-43fAKgDx.js.gz +0 -0
  341. package/app/dist/assets/{useThreadTerminalController-COG4IW7A.js → useThreadTerminalController-DcWLbe8W.js} +1 -1
  342. package/app/dist/assets/useThreadTerminalController-DcWLbe8W.js.br +0 -0
  343. package/app/dist/assets/useThreadTerminalController-DcWLbe8W.js.gz +0 -0
  344. package/app/dist/assets/{workspace-change-summary-CQ20dHT9.js → workspace-change-summary-Bd3p-LXz.js} +1 -1
  345. package/app/dist/assets/workspace-change-summary-Bd3p-LXz.js.br +0 -0
  346. package/app/dist/assets/workspace-change-summary-Bd3p-LXz.js.gz +0 -0
  347. package/app/dist/assets/workspace-checkout-display-DMp28yCr.js +32 -0
  348. package/app/dist/assets/workspace-checkout-display-DMp28yCr.js.br +0 -0
  349. package/app/dist/assets/workspace-checkout-display-DMp28yCr.js.gz +0 -0
  350. package/app/dist/index.html +17 -17
  351. package/app/dist/index.html.br +0 -0
  352. package/app/dist/index.html.gz +0 -0
  353. package/dist/index.d.ts +107 -107
  354. package/package.json +1 -1
  355. package/server/dist/builtin-plugins/orbit/dist/assets/orbit/revision +1 -1
  356. package/app/dist/assets/AddMachineDialog-BpnPQjZ9.js.br +0 -0
  357. package/app/dist/assets/AddMachineDialog-BpnPQjZ9.js.gz +0 -0
  358. package/app/dist/assets/AppFileExternalNavigationDispatcher-DWBAM2Ao.js.br +0 -0
  359. package/app/dist/assets/AppFileExternalNavigationDispatcher-DWBAM2Ao.js.gz +0 -0
  360. package/app/dist/assets/BbDiff-ny0zSZK7.js.br +0 -0
  361. package/app/dist/assets/BbDiff-ny0zSZK7.js.gz +0 -0
  362. package/app/dist/assets/BbDiffSplit-D2B68Y3j.js.br +0 -0
  363. package/app/dist/assets/BbDiffSplit-D2B68Y3j.js.gz +0 -0
  364. package/app/dist/assets/BbSourceCode-Coh1Fz_y.js.br +0 -0
  365. package/app/dist/assets/BbSourceCode-Coh1Fz_y.js.gz +0 -0
  366. package/app/dist/assets/BrowserTabDeck-B6MAEL-g.js.br +0 -0
  367. package/app/dist/assets/BrowserTabDeck-B6MAEL-g.js.gz +0 -0
  368. package/app/dist/assets/CommandPaletteBody-BrqKHT3H.js.br +0 -0
  369. package/app/dist/assets/CommandPaletteBody-BrqKHT3H.js.gz +0 -0
  370. package/app/dist/assets/DiffHost-axFBS1TY.js.br +0 -0
  371. package/app/dist/assets/DiffHost-axFBS1TY.js.gz +0 -0
  372. package/app/dist/assets/ExperimentalFileLinkMenu-BqFZL6JY.js.br +0 -0
  373. package/app/dist/assets/ExperimentalFileLinkMenu-BqFZL6JY.js.gz +0 -0
  374. package/app/dist/assets/FilePreview-D1vlO0xa.js.br +0 -0
  375. package/app/dist/assets/FilePreview-D1vlO0xa.js.gz +0 -0
  376. package/app/dist/assets/GitDiffCardHeader-BDVE9Slz.js.br +0 -0
  377. package/app/dist/assets/GitDiffCardHeader-BDVE9Slz.js.gz +0 -0
  378. package/app/dist/assets/InlineMessageEditorFrame-CfMA_yDN.js.br +0 -0
  379. package/app/dist/assets/InlineMessageEditorFrame-CfMA_yDN.js.gz +0 -0
  380. package/app/dist/assets/MachineRenameDialog-PZtQvU1f.js.br +0 -0
  381. package/app/dist/assets/MachineRenameDialog-PZtQvU1f.js.gz +0 -0
  382. package/app/dist/assets/MachineSettingsView-CI2wHJ0D.js.br +0 -0
  383. package/app/dist/assets/MachineSettingsView-CI2wHJ0D.js.gz +0 -0
  384. package/app/dist/assets/MicrophonePreferences-j_i1qWay.js.br +0 -0
  385. package/app/dist/assets/MicrophonePreferences-j_i1qWay.js.gz +0 -0
  386. package/app/dist/assets/ModelReasoningMenu-CFZ_DBOK.js.br +0 -0
  387. package/app/dist/assets/ModelReasoningMenu-CFZ_DBOK.js.gz +0 -0
  388. package/app/dist/assets/NewTabPage-Cj0qUVQ8.js.br +0 -0
  389. package/app/dist/assets/NewTabPage-Cj0qUVQ8.js.gz +0 -0
  390. package/app/dist/assets/NewThreadComposer-BQ9ueBmG.js.br +0 -0
  391. package/app/dist/assets/NewThreadComposer-BQ9ueBmG.js.gz +0 -0
  392. package/app/dist/assets/OnboardingFlow-B3VDIg3q.js.br +0 -0
  393. package/app/dist/assets/OnboardingFlow-B3VDIg3q.js.gz +0 -0
  394. package/app/dist/assets/OptionPicker-DQwMICWD.js.br +0 -0
  395. package/app/dist/assets/OptionPicker-DQwMICWD.js.gz +0 -0
  396. package/app/dist/assets/PaletteShell-CUaJsDQy.js.br +0 -0
  397. package/app/dist/assets/PaletteShell-CUaJsDQy.js.gz +0 -0
  398. package/app/dist/assets/PaneMaximizeButton-BOOlC9xx.js.br +0 -0
  399. package/app/dist/assets/PaneMaximizeButton-BOOlC9xx.js.gz +0 -0
  400. package/app/dist/assets/PierreLineSelectionActions-DeORj4pK.js.br +0 -0
  401. package/app/dist/assets/PierreLineSelectionActions-DeORj4pK.js.gz +0 -0
  402. package/app/dist/assets/PluginPanelRightPanelHost-Dhmjh3Yu.js.br +0 -0
  403. package/app/dist/assets/PluginPanelRightPanelHost-Dhmjh3Yu.js.gz +0 -0
  404. package/app/dist/assets/PluginThreadChat-BpwUIMzi.js.br +0 -0
  405. package/app/dist/assets/PluginThreadChat-BpwUIMzi.js.gz +0 -0
  406. package/app/dist/assets/ProjectDetailSettingsView-CcynSBqP.js.br +0 -0
  407. package/app/dist/assets/ProjectDetailSettingsView-CcynSBqP.js.gz +0 -0
  408. package/app/dist/assets/ProjectMachineSetupDialog-BHF6n4Kn.js.br +0 -0
  409. package/app/dist/assets/ProjectMachineSetupDialog-BHF6n4Kn.js.gz +0 -0
  410. package/app/dist/assets/ProjectsSettingsSection-D95eFIME.js.br +0 -0
  411. package/app/dist/assets/ProjectsSettingsSection-D95eFIME.js.gz +0 -0
  412. package/app/dist/assets/QueuedMessagesList-DWaI57OV.js.br +0 -0
  413. package/app/dist/assets/QueuedMessagesList-DWaI57OV.js.gz +0 -0
  414. package/app/dist/assets/RemotePathBrowser-CaeJnvqX.js.br +0 -0
  415. package/app/dist/assets/RemotePathBrowser-CaeJnvqX.js.gz +0 -0
  416. package/app/dist/assets/RootComposeView-DXDnU_77.js.br +0 -0
  417. package/app/dist/assets/RootComposeView-DXDnU_77.js.gz +0 -0
  418. package/app/dist/assets/SecondaryPanelLayout-Cbzw-eIz.js.br +0 -0
  419. package/app/dist/assets/SecondaryPanelLayout-Cbzw-eIz.js.gz +0 -0
  420. package/app/dist/assets/ServerMoveOverlayView-ZEw2QJoL.js.br +0 -0
  421. package/app/dist/assets/ServerMoveOverlayView-ZEw2QJoL.js.gz +0 -0
  422. package/app/dist/assets/SettingsSidebar-CdfGtADz.js.br +0 -0
  423. package/app/dist/assets/SettingsSidebar-CdfGtADz.js.gz +0 -0
  424. package/app/dist/assets/SettingsView-h9ZS30dB.js.br +0 -0
  425. package/app/dist/assets/SettingsView-h9ZS30dB.js.gz +0 -0
  426. package/app/dist/assets/SidebarFooterCustomize-B4Q71PFC.js.br +0 -0
  427. package/app/dist/assets/SidebarFooterCustomize-B4Q71PFC.js.gz +0 -0
  428. package/app/dist/assets/SidebarVisibilityCustomize-DD2XyXp-.js.br +0 -0
  429. package/app/dist/assets/SidebarVisibilityCustomize-DD2XyXp-.js.gz +0 -0
  430. package/app/dist/assets/SourceCodeHost-mzkOzbsV.js.br +0 -0
  431. package/app/dist/assets/SourceCodeHost-mzkOzbsV.js.gz +0 -0
  432. package/app/dist/assets/SplitWorkspaceRoute-BJEIDTsl.js.br +0 -0
  433. package/app/dist/assets/SplitWorkspaceRoute-BJEIDTsl.js.gz +0 -0
  434. package/app/dist/assets/TerminalOutputBlock-LgqFqaFJ.js.br +0 -0
  435. package/app/dist/assets/TerminalOutputBlock-LgqFqaFJ.js.gz +0 -0
  436. package/app/dist/assets/ThreadActionsMenu-CGpm4Smm.js.br +0 -0
  437. package/app/dist/assets/ThreadActionsMenu-CGpm4Smm.js.gz +0 -0
  438. package/app/dist/assets/ThreadDetailView-BNuaME6v.js.br +0 -0
  439. package/app/dist/assets/ThreadDetailView-BNuaME6v.js.gz +0 -0
  440. package/app/dist/assets/ThreadSearchPaletteMode-BBQgpzya.js.br +0 -0
  441. package/app/dist/assets/ThreadSearchPaletteMode-BBQgpzya.js.gz +0 -0
  442. package/app/dist/assets/ThreadSecondaryPanel-D3Q2Ugws.js.br +0 -0
  443. package/app/dist/assets/ThreadSecondaryPanel-D3Q2Ugws.js.gz +0 -0
  444. package/app/dist/assets/ThreadSecondaryPanelTabContent-DWJgn-1Y.js.br +0 -0
  445. package/app/dist/assets/ThreadStatusGlyph-Cm0DMDOm.js.br +0 -0
  446. package/app/dist/assets/ThreadStatusGlyph-Cm0DMDOm.js.gz +0 -0
  447. package/app/dist/assets/ThreadTerminalPanel-DWnPApoJ.js.br +0 -0
  448. package/app/dist/assets/ThreadTerminalPanel-DWnPApoJ.js.gz +0 -0
  449. package/app/dist/assets/ThreadTerminalView-VSstFotF.js.br +0 -0
  450. package/app/dist/assets/ThreadTerminalView-VSstFotF.js.gz +0 -0
  451. package/app/dist/assets/ThreadTimelineNavigationContext-X5kHi62J.js.br +0 -0
  452. package/app/dist/assets/ThreadTimelineNavigationContext-X5kHi62J.js.gz +0 -0
  453. package/app/dist/assets/TimelineDetailScroll-DAyZkrWd.js.br +0 -0
  454. package/app/dist/assets/TimelineDetailScroll-DAyZkrWd.js.gz +0 -0
  455. package/app/dist/assets/TimelineFileDiffBlock-BHanM8gy.js.br +0 -0
  456. package/app/dist/assets/TimelineFileDiffBlock-BHanM8gy.js.gz +0 -0
  457. package/app/dist/assets/TimelineSelectionMenu-NgclvOOl.js.br +0 -0
  458. package/app/dist/assets/TimelineSelectionMenu-NgclvOOl.js.gz +0 -0
  459. package/app/dist/assets/ToolsView-DgNwKkID.js.br +0 -0
  460. package/app/dist/assets/ToolsView-DgNwKkID.js.gz +0 -0
  461. package/app/dist/assets/ToolsViewSplits-BF5GHpoJ.js.br +0 -0
  462. package/app/dist/assets/ToolsViewSplits-BF5GHpoJ.js.gz +0 -0
  463. package/app/dist/assets/WaveformVisualizer-Cri3lXZw.js.br +0 -0
  464. package/app/dist/assets/WaveformVisualizer-Cri3lXZw.js.gz +0 -0
  465. package/app/dist/assets/app-fixed-tab-navigation-MkQXoAlQ.js.br +0 -0
  466. package/app/dist/assets/app-fixed-tab-navigation-MkQXoAlQ.js.gz +0 -0
  467. package/app/dist/assets/audio-input-device-preference-Bv7CMblt.js.br +0 -0
  468. package/app/dist/assets/audio-input-device-preference-Bv7CMblt.js.gz +0 -0
  469. package/app/dist/assets/bottom-anchored-scroll-body-WkS6Ysu2.js.br +0 -0
  470. package/app/dist/assets/bottom-anchored-scroll-body-WkS6Ysu2.js.gz +0 -0
  471. package/app/dist/assets/browser-url-CkFc4qcI.js.br +0 -0
  472. package/app/dist/assets/browser-url-CkFc4qcI.js.gz +0 -0
  473. package/app/dist/assets/checkbox-CB54Ucjt.js.br +0 -0
  474. package/app/dist/assets/checkbox-CB54Ucjt.js.gz +0 -0
  475. package/app/dist/assets/code-loading-skeletons-BB3W6Jxd.js.br +0 -1
  476. package/app/dist/assets/code-loading-skeletons-BB3W6Jxd.js.gz +0 -0
  477. package/app/dist/assets/detail-card-B1VUDLNX.js.br +0 -0
  478. package/app/dist/assets/detail-card-B1VUDLNX.js.gz +0 -0
  479. package/app/dist/assets/diff-stats-tally-I7rMu5N0.js.br +0 -0
  480. package/app/dist/assets/diff-stats-tally-I7rMu5N0.js.gz +0 -0
  481. package/app/dist/assets/environment-mutations-CQyFiDlo.js.br +0 -0
  482. package/app/dist/assets/environment-mutations-CQyFiDlo.js.gz +0 -0
  483. package/app/dist/assets/environment-workspace-display-CiBUVP2u.js.br +0 -0
  484. package/app/dist/assets/environment-workspace-display-CiBUVP2u.js.gz +0 -0
  485. package/app/dist/assets/event-code-block-Bpn_2p89.js.br +0 -0
  486. package/app/dist/assets/event-code-block-Bpn_2p89.js.gz +0 -0
  487. package/app/dist/assets/expandable-text-CoDH4ptt.js.br +0 -0
  488. package/app/dist/assets/expandable-text-CoDH4ptt.js.gz +0 -0
  489. package/app/dist/assets/file-path-link-DrvaADa1.js.br +0 -0
  490. package/app/dist/assets/file-path-link-DrvaADa1.js.gz +0 -0
  491. package/app/dist/assets/host-mutations-BdKF0vb_.js.br +0 -0
  492. package/app/dist/assets/host-mutations-BdKF0vb_.js.gz +0 -0
  493. package/app/dist/assets/icon-extended-Bmnh2NUd.js.br +0 -0
  494. package/app/dist/assets/icon-extended-Bmnh2NUd.js.gz +0 -0
  495. package/app/dist/assets/image-lightbox-D3Fevp17.js.br +0 -0
  496. package/app/dist/assets/image-lightbox-D3Fevp17.js.gz +0 -0
  497. package/app/dist/assets/index-Bfkd7WaZ.js.br +0 -0
  498. package/app/dist/assets/index-Bfkd7WaZ.js.gz +0 -0
  499. package/app/dist/assets/inline-rename-editor-BIpXK65F.js.br +0 -0
  500. package/app/dist/assets/inline-rename-editor-BIpXK65F.js.gz +0 -0
  501. package/app/dist/assets/launcherRow-CR-65XBF.js.br +0 -0
  502. package/app/dist/assets/launcherRow-CR-65XBF.js.gz +0 -0
  503. package/app/dist/assets/localhost-link-rewrite-description-CIPrZ4gX.js.br +0 -0
  504. package/app/dist/assets/localhost-link-rewrite-description-CIPrZ4gX.js.gz +0 -0
  505. package/app/dist/assets/machine-provider-queries-BjtsqCT7.js.br +0 -0
  506. package/app/dist/assets/machine-provider-queries-BjtsqCT7.js.gz +0 -0
  507. package/app/dist/assets/markdown-html-7vEPZaw6.js.br +0 -0
  508. package/app/dist/assets/markdown-html-7vEPZaw6.js.gz +0 -0
  509. package/app/dist/assets/markdown-local-file-link-sP8_W_A8.js.br +0 -0
  510. package/app/dist/assets/markdown-local-file-link-sP8_W_A8.js.gz +0 -0
  511. package/app/dist/assets/markdown-preview-DIfq3fId.js.br +0 -0
  512. package/app/dist/assets/markdown-preview-DIfq3fId.js.gz +0 -0
  513. package/app/dist/assets/markdown-prompt-mentions-BSTB-Vmw.js.br +0 -0
  514. package/app/dist/assets/markdown-prompt-mentions-BSTB-Vmw.js.gz +0 -0
  515. package/app/dist/assets/model-load-error-message-OglVlwTY.js.br +0 -0
  516. package/app/dist/assets/model-load-error-message-OglVlwTY.js.gz +0 -0
  517. package/app/dist/assets/onboarding-telemetry-BVjT5I18.js +0 -1
  518. package/app/dist/assets/open-in-editor-button-B8RkW-4j.js.br +0 -0
  519. package/app/dist/assets/open-in-editor-button-B8RkW-4j.js.gz +0 -0
  520. package/app/dist/assets/page-shell-Cqdn2HWD.js.br +0 -0
  521. package/app/dist/assets/page-shell-Cqdn2HWD.js.gz +0 -0
  522. package/app/dist/assets/pierre-worker-pool-CQnFjCvY.js.br +0 -0
  523. package/app/dist/assets/pierre-worker-pool-CQnFjCvY.js.gz +0 -0
  524. package/app/dist/assets/plugin-detail-navigation-DR_dbSv3.js.br +0 -0
  525. package/app/dist/assets/plugin-detail-navigation-DR_dbSv3.js.gz +0 -0
  526. package/app/dist/assets/plugin-frontend-VzstkBtF.js.br +0 -0
  527. package/app/dist/assets/plugin-frontend-VzstkBtF.js.gz +0 -0
  528. package/app/dist/assets/plugin-ui-mdaPclkM.js.br +0 -0
  529. package/app/dist/assets/plugin-ui-mdaPclkM.js.gz +0 -0
  530. package/app/dist/assets/queued-editor-typeahead-layout-CiIAEWsc.js.br +0 -0
  531. package/app/dist/assets/queued-editor-typeahead-layout-CiIAEWsc.js.gz +0 -0
  532. package/app/dist/assets/queued-messages-layout-DyuqzIxg.js.br +0 -0
  533. package/app/dist/assets/queued-messages-layout-DyuqzIxg.js.gz +0 -0
  534. package/app/dist/assets/resource-list-DKdrv-JU.js.br +0 -0
  535. package/app/dist/assets/resource-list-DKdrv-JU.js.gz +0 -0
  536. package/app/dist/assets/root-compose-create-preference-CtOkf4me.js +0 -1
  537. package/app/dist/assets/settings-nav-BLpuT_C0.js.br +0 -0
  538. package/app/dist/assets/settings-nav-BLpuT_C0.js.gz +0 -0
  539. package/app/dist/assets/settings-sections-BvsMU9Kk.js.br +0 -0
  540. package/app/dist/assets/settings-sections-BvsMU9Kk.js.gz +0 -0
  541. package/app/dist/assets/sidebarTouchSensor-G8ypC2Ro.js.br +0 -0
  542. package/app/dist/assets/sidebarTouchSensor-G8ypC2Ro.js.gz +0 -0
  543. package/app/dist/assets/switch-xFGnSGwy.js.br +0 -0
  544. package/app/dist/assets/switch-xFGnSGwy.js.gz +0 -0
  545. package/app/dist/assets/thread-event-parser-y3FxoN7v.js.br +0 -0
  546. package/app/dist/assets/thread-event-parser-y3FxoN7v.js.gz +0 -0
  547. package/app/dist/assets/thread-panel-queries-DWf3O5hk.js.br +0 -0
  548. package/app/dist/assets/thread-panel-queries-DWf3O5hk.js.gz +0 -0
  549. package/app/dist/assets/thread-runtime-mutations-UVG-YPVF.js.br +0 -0
  550. package/app/dist/assets/thread-runtime-mutations-UVG-YPVF.js.gz +0 -0
  551. package/app/dist/assets/thread-terminal-queries-DOflC4hl.js.br +0 -0
  552. package/app/dist/assets/thread-terminal-queries-DOflC4hl.js.gz +0 -0
  553. package/app/dist/assets/threadRecentItems-uVNwTDHY.js.br +0 -0
  554. package/app/dist/assets/threadRecentItems-uVNwTDHY.js.gz +0 -0
  555. package/app/dist/assets/threadWorkspaceOpenPath-C3NqD2MJ.js.br +0 -0
  556. package/app/dist/assets/threadWorkspaceOpenPath-C3NqD2MJ.js.gz +0 -0
  557. package/app/dist/assets/title-bar-scroll-fade-Bg1HUJXc.js.br +0 -0
  558. package/app/dist/assets/title-bar-scroll-fade-Bg1HUJXc.js.gz +0 -0
  559. package/app/dist/assets/use-hover-popover-Di5t21dF.js.br +0 -0
  560. package/app/dist/assets/use-hover-popover-Di5t21dF.js.gz +0 -0
  561. package/app/dist/assets/useElementWidth-ixw7193l.js.br +0 -0
  562. package/app/dist/assets/useElementWidth-ixw7193l.js.gz +0 -0
  563. package/app/dist/assets/useLocalOpenTargets-ZpAju0H3.js.br +0 -0
  564. package/app/dist/assets/useLocalOpenTargets-ZpAju0H3.js.gz +0 -0
  565. package/app/dist/assets/usePanelResizeSnap-fqnDdIZ4.js.br +0 -0
  566. package/app/dist/assets/usePanelResizeSnap-fqnDdIZ4.js.gz +0 -0
  567. package/app/dist/assets/usePanelTerminals-BNnuXkgJ.js.br +0 -0
  568. package/app/dist/assets/usePanelTerminals-BNnuXkgJ.js.gz +0 -0
  569. package/app/dist/assets/usePathSuggestions-B-mANSfN.js.br +0 -0
  570. package/app/dist/assets/usePathSuggestions-B-mANSfN.js.gz +0 -0
  571. package/app/dist/assets/useResolvedLiveFileTarget-HWH-tIU4.js.br +0 -0
  572. package/app/dist/assets/useResolvedLiveFileTarget-HWH-tIU4.js.gz +0 -0
  573. package/app/dist/assets/useThreadTerminalController-COG4IW7A.js.br +0 -0
  574. package/app/dist/assets/useThreadTerminalController-COG4IW7A.js.gz +0 -0
  575. package/app/dist/assets/workspace-change-summary-CQ20dHT9.js.br +0 -0
  576. package/app/dist/assets/workspace-change-summary-CQ20dHT9.js.gz +0 -0
  577. package/app/dist/assets/workspace-checkout-display-Bvm9hISZ.js +0 -32
  578. package/app/dist/assets/workspace-checkout-display-Bvm9hISZ.js.br +0 -0
  579. package/app/dist/assets/workspace-checkout-display-Bvm9hISZ.js.gz +0 -0
@@ -1,4 +1,4 @@
1
- import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Ar as t,Cr as n,Hr as r,Ir as i,Kr as a,Lr as o,Or as s,Qr as c,St as l,Vr as u,Zr as d,bt as f,ci as p,dr as m,mi as h,ni as g,ti as _,yr as v,zr as y}from"./boot-vendor-BBLG7GwQ.js";import{mt as b,tt as x}from"./environment-workspace-display-CiBUVP2u.js";import{$p as S,$u as C,Aa as w,Bo as T,Bu as E,Cd as D,Cf as O,Ch as k,Cp as A,Dr as j,Ea as M,Eh as N,Gi as P,Gu as F,Hi as I,Hu as L,Jh as R,Ji as z,Jp as B,Ju as ee,Kp as te,Ku as V,Lr as H,Ma as U,Na as W,Po as G,Pu as ne,Qi as K,Qm as q,Qp as re,Qt as J,Qu as ie,Rd as Y,Rr as ae,Sd as oe,Sf as se,Sh as ce,Ta as le,Tc as ue,Tf as de,Th as fe,Uu as pe,Vu as me,Wl as he,Wt as ge,Wu as _e,Xf as ve,Xh as ye,Xi as be,Xu as xe,Ym as Se,Yp as Ce,Yu as we,Zh as Te,Zp as Ee,Zt as De,Zu as Oe,_h as ke,_t as Ae,a as je,ad as Me,am as Ne,bd as Pe,bh as Fe,cd as Ie,ch as Le,dd as Re,dh as ze,do as Be,dp as Ve,ea as He,ed as Ue,ep as We,fd as Ge,fh as Ke,fo as qe,fp as Je,go as Ye,hh as Xe,ho as Ze,i as Qe,i_ as $e,ia as et,id as tt,im as nt,ip as rt,ka as it,ld as at,lh as ot,lt as st,md as ct,mo as lt,n as ut,nd as dt,nh as ft,nm as pt,o as mt,od as ht,oh as X,pd as gt,po as _t,qc as vt,qi as yt,qp as bt,qu as xt,r as St,rd as Ct,rm as wt,s as Tt,sd as Et,sh as Dt,td as Ot,ud as kt,uh as At,vd as jt,vh as Mt,vt as Nt,wf as Pt,xh as Ft,yd as It,yh as Lt,yn as Rt,zo as zt}from"./index-Bfkd7WaZ.js";import{i as Bt,r as Vt,t as Ht}from"./plugin-frontend-VzstkBtF.js";import{t as Ut}from"./plugin-settings-availability-DobA3OyF.js";import{t as Wt}from"./useScrollOverflowState-DyS0S3x1.js";import{A as Gt,D as Kt,E as qt,F as Jt,M as Yt,N as Xt,O as Zt,P as Qt,S as $t,T as en,V as tn,_ as nn,a as rn,b as an,c as on,d as sn,f as cn,g as ln,h as un,i as dn,j as fn,k as pn,l as mn,m as hn,n as gn,o as _n,p as vn,r as yn,s as bn,t as xn,u as Sn,v as Cn,w as wn,x as Tn,y as En}from"./resource-list-DKdrv-JU.js";import{n as Dn,t as On}from"./machine-server-access-HMhg_GpF.js";import{A as kn,C as An,D as jn,E as Mn,N as Nn,O as Pn,S as Fn,T as In,_ as Ln,a as Rn,b as zn,c as Bn,d as Vn,f as Hn,g as Un,h as Wn,i as Gn,j as Kn,k as qn,l as Jn,m as Yn,n as Xn,o as Zn,p as Qn,r as $n,s as er,t as tr,u as nr,v as rr,w as ir,x as ar,y as or}from"./plugin-ui-mdaPclkM.js";import{t as sr}from"./expandable-text-CoDH4ptt.js";import{t as cr}from"./switch-xFGnSGwy.js";import{t as lr}from"./useLocalOpenTargets-ZpAju0H3.js";import{t as ur}from"./SecondaryPanelLayout-Cbzw-eIz.js";import{t as dr}from"./machine-provider-queries-BjtsqCT7.js";import{t as fr}from"./lib-Cs9r5T_d.js";import{m as pr}from"./markdown-prompt-mentions-BSTB-Vmw.js";import{n as mr}from"./absolute-file-path-CVrJEmkI.js";import{r as hr}from"./thread-runtime-mutations-UVG-YPVF.js";import{t as gr}from"./FilePreview-D1vlO0xa.js";import{t as _r}from"./ThreadSecondaryPanel-D3Q2Ugws.js";import{n as vr}from"./markdown-file-image-routing-CG3cFYwB.js";import{n as yr}from"./update-state-DCxKj9tm.js";import{t as br}from"./textarea-CQaTsl45.js";import"./icon-extended-Bmnh2NUd.js";import{t as xr}from"./plugin-homepage-section-D0skkFU4.js";var Sr=`Create a new bb skill that `,Cr=`Create a new bb plugin that `,Z=e(h(),1),Q=e(g(),1),$=s(),wr=`h-7 w-full justify-between border-border/60 bg-card px-2 text-xs @min-[36rem]/settings:w-44`,Tr=`min-w-[var(--radix-dropdown-menu-trigger-width)]`,Er=`user`;function Dr(e){return e.publisherLabel===null?Er:`publisher:${e.publisherLabel}`}function Or(e){let t=new Set,n=!1;for(let r of e)r.publisherLabel===null?n=!0:t.add(r.publisherLabel);let r=[...t].sort((e,t)=>e.localeCompare(t)).map(e=>({id:`publisher:${e}`,label:e}));return n&&r.push({id:Er,label:`Direct install`}),r}function kr(){let e=(0,$.c)(17),[t,n]=r(),i;e[0]===t?i=e[1]:(i=t.get(`query`)??``,e[0]=t,e[1]=i);let a=i,o;e[2]===t?o=e[3]:(o=t.get(`sort`),e[2]=t,e[3]=o);let s=o,c=s===`name`||s===`recently-added`||s===`most-installed`?s:null,l;e[4]===t?l=e[5]:(l=t.get(`direction`),e[4]=t,e[5]=l);let u=l,d=u===`asc`||u===`desc`?u:c===`name`?`asc`:`desc`,f;e[6]===t?f=e[7]:(f=t.get(`shelf`)?.startsWith(`category:`)?[]:t.getAll(`category`),e[6]=t,e[7]=f);let p=f,m;e[8]===n?m=e[9]:(m=(e,t)=>{n(t=>{let n=new URLSearchParams(t);return e(n),n},{replace:t===void 0?!0:t})},e[8]=n,e[9]=m);let h=m,g;return e[10]!==h||e[11]!==a||e[12]!==c||e[13]!==t||e[14]!==p||e[15]!==d?(g={searchParams:t,query:a,requestedSort:c,sortDirection:d,selectedCategories:p,changeSearchParams:h},e[10]=h,e[11]=a,e[12]=c,e[13]=t,e[14]=p,e[15]=d,e[16]=g):g=e[16],g}var Ar=[{noun:`a kanban board`,title:`Kanban board`,hook:`Ship a board your agents move cards across while they work.`,capability:`navPanel`,icon:`Columns2`,accentToken:`--file-accent`,brief:`adds a kanban board panel where each card is a thread, and agents move cards between columns as work progresses`},{noun:`a live dashboard`,title:`Live dashboard`,hook:`Put the numbers your team actually checks on the bb homepage.`,capability:`homepageSection`,icon:`ChartColumn`,accentToken:`--success`,brief:`adds a homepage dashboard with deploy frequency, open PR count, and CI pass rate, refreshed on an interval`},{noun:`a chief of staff`,title:`Chief of staff`,hook:`Delegate your backlog and get briefed on only what needs you.`,capability:`navPanel + service + experimental_threadList`,icon:`UserRound`,accentToken:`--pr-merged`,brief:`adds a chief-of-staff panel that takes in my backlog, opens an agent thread for each item, keeps them moving by answering routine questions itself, and briefs me on progress and the few decisions only I can make`},{noun:`a video editor`,title:`Video editor`,hook:`Drop in raw clips and let agents assemble a polished first cut.`,capability:`fileOpener + navPanel + service`,icon:`Play`,accentToken:`--warning`,brief:`adds a video editor where I drop raw clips onto a timeline, agents assemble a first cut with trims, captions, and music, and I review the result and request changes in plain words`},{noun:`a prototyping lab`,title:`Prototyping lab`,hook:`Describe a product flow and compare working prototypes side by side.`,capability:`navPanel + experimental_threadList + service`,icon:`Beaker`,accentToken:`--attention`,brief:`adds a prototyping lab where I describe a product flow in plain words, agents build several working prototypes in parallel, and I compare them side by side before choosing one to refine`},{noun:`a support inbox`,title:`Support inbox`,hook:`Triage user reports into fixes without leaving bb.`,capability:`navPanel + service + messageAction`,icon:`Mail`,accentToken:`--destructive-text`,brief:`adds a support inbox that pulls in bug reports, clusters duplicates, drafts replies for my review, and opens a fix thread for each confirmed bug`}].map(e=>({...e,id:e.title.toLowerCase().replace(/[^a-z0-9]+/g,`-`)}));function jr({brief:e}){return`${Cr}${e}.`}var Mr=[{id:`panel`,label:`Panel`,icon:`PanelLeft`,brief:`adds a nav panel that lists my saved prompts and inserts one into the composer on click`},{id:`homepage-section`,label:`Homepage section`,icon:`SectionAdd`,brief:`adds a homepage section showing yesterday's merged PRs and my review queue`},{id:`file-opener`,label:`File opener`,icon:`FileText`,brief:`adds a file opener that renders CSV files as sortable, filterable tables`},{id:`cli-command`,label:`CLI command`,icon:`Terminal`,brief:`adds a bb CLI command that deploys the current branch to staging and reports status`},{id:`background-service`,label:`Background service`,icon:`Zap`,brief:`adds a background service that posts thread failures to a Slack webhook`},{id:`prompt-mentions`,label:`Prompt mentions`,icon:`MessageCirclePlus`,brief:`connects Linear issues to the prompt box as searchable @-mentions`}],Nr=`__bbBrowseComposerRequestNonce`;function Pr(){let e=globalThis,t=(e[Nr]??0)+1;return e[Nr]=t,t}var Fr={skill:{prefix:Sr,examples:[{label:`PR review`,icon:`GitPullRequest`,description:`reviews a GitHub PR, checks changed files, runs focused tests, and returns blocking findings first`},{label:`Release notes`,icon:`FileText`,description:`turns merged PRs into concise customer-facing release notes with links and risk notes`},{label:`Incident debug`,icon:`Bug`,description:`collects logs, recent deploys, and failing checks before proposing the smallest fix`}]},plugin:{prefix:Cr,examples:Ar.map(e=>({label:e.title,icon:e.icon,description:e.hook,prompt:jr(e)}))}};function Ir(e){let t=Fr[e];return{examples:t.examples.map(e=>({label:e.label,icon:e.icon,description:e.description,prompt:e.prompt??`${t.prefix}${e.description}.`}))}}function Lr(e){let t=(0,$.c)(12),{kind:n,label:r,menuActions:i,compactWhenNarrow:a,onCreate:o}=e,s;t[0]===n?s=t[1]:(s=Ir(n),t[0]=n,t[1]=s);let{examples:c}=s,l;t[2]!==c||t[3]!==n?(l=n===`plugin`?[{label:`Examples`,templates:c},{label:`Capabilities`,templates:Mr.map(Rr)}]:void 0,t[2]=c,t[3]=n,t[4]=l):l=t[4];let u=l,d;return t[5]!==a||t[6]!==c||t[7]!==r||t[8]!==i||t[9]!==o||t[10]!==u?(d=(0,Q.jsx)(en,{label:r,templates:c,templateGroups:u,menuActions:i,compactWhenNarrow:a,onCreate:o}),t[5]=a,t[6]=c,t[7]=r,t[8]=i,t[9]=o,t[10]=u,t[11]=d):d=t[11],d}function Rr(e){return{label:e.label,icon:e.icon,description:e.brief,prompt:jr(e)}}function zr(e){let t=(0,$.c)(5),{onCreate:n,onInstallFromSource:r}=e,i;t[0]===r?i=t[1]:(i=[{label:`Install from source`,icon:`Download`,onSelect:r}],t[0]=r,t[1]=i);let a;return t[2]!==n||t[3]!==i?(a=(0,Q.jsx)(Lr,{kind:`plugin`,compactWhenNarrow:!0,label:`New plugin`,menuActions:i,onCreate:n}),t[2]=n,t[3]=i,t[4]=a):a=t[4],a}function Br(e){if(e instanceof Error&&`status`in e&&typeof e.status==`number`){let t=`HTTP ${e.status}: `;return e.message.startsWith(t)?e.message.slice(t.length):e.message}return e instanceof Error?e.message:String(e)}function Vr(e,t){return e.startsWith(`builtin:`)?`Install this plugin, bundled with BB.`:e.startsWith(`npm:`)?`Install this ${t} plugin from its listed npm package.`:`Install this ${t} plugin from its listed source repository.`}function Hr(e){let t=(0,$.c)(11),{open:n,onOpenChange:r,onInstallStarted:i,initial:a}=e,o;t[0]!==a||t[1]!==i||t[2]!==r||t[3]!==n?(o=n?(0,Q.jsx)(qr,{initial:a??null,onOpenChange:r,onInstallStarted:i}):null,t[0]=a,t[1]=i,t[2]=r,t[3]=n,t[4]=o):o=t[4];let s;t[5]===o?s=t[6]:(s=(0,Q.jsx)(qe,{className:`sm:max-w-md`,children:o}),t[5]=o,t[6]=s);let c;return t[7]!==r||t[8]!==n||t[9]!==s?(c=(0,Q.jsx)(Be,{open:n,onOpenChange:r,children:s}),t[7]=r,t[8]=n,t[9]=s,t[10]=c):c=t[10],c}function Ur(e,t){if(e!==null)return{kind:`catalog`,entryId:e.entryId,marketplace:e.marketplace};let n=t.trim();return n.length===0?null:{kind:`direct`,source:n}}function Wr(e){return e.kind===`npm`?[{label:`npm package`,value:`${e.package}@${e.range??e.tag??`latest`}`},...e.registry===void 0?[]:[{label:`registry`,value:e.registry}]]:[{label:`repository`,value:e.url,href:e.url},...e.subdir===void 0?[]:[{label:`subdirectory`,value:e.subdir}],...e.ref===void 0?[]:[{label:`ref`,value:e.ref}],...e.range===void 0?[]:[{label:`semver range`,value:e.tagPrefix===void 0?e.range:`${e.range} (tags ${e.tagPrefix}vX.Y.Z)`}],...e.resolvedTag===void 0?[]:[{label:`resolves to tag`,value:e.resolvedTag}],...e.resolvedCommit===void 0?[]:[{label:`resolves to commit`,value:e.resolvedCommit}],...e.unresolvedReason===void 0?[]:[{label:`not resolved`,value:e.unresolvedReason}]]}function Gr(e){let t=(0,$.c)(26),{plan:n,pending:r,error:i,onRetry:a}=e;if(r){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(`p`,{className:`text-2xs text-subtle-foreground`,role:`status`,children:`Resolving the listed source…`}),t[0]=e):e=t[0],e}if(i!=null){let e=i instanceof Error&&`status`in i&&typeof i.status==`number`?i.status:null,n=e===null||e===408||e===429||e>=500,r=e===401||e===403?`Source access denied. Check repository permissions.`:e===404?`Source not found. Check the marketplace listing.`:n?`Source unavailable. Try again.`:`Invalid source. Check the marketplace listing.`,o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Q.jsx)(q,{name:`AlertTriangle`,className:`size-4 shrink-0 text-warning-text`,"aria-hidden":!0}),t[1]=o):o=t[1];let s;t[2]===r?s=t[3]:(s=(0,Q.jsx)(`p`,{className:`min-w-0 flex-1 text-xs leading-normal text-foreground`,children:r}),t[2]=r,t[3]=s);let c;t[4]!==a||t[5]!==n?(c=n?(0,Q.jsx)(ft,{type:`button`,variant:`outline`,size:`sm`,className:`h-7 shrink-0 px-2 text-xs`,onClick:a,children:`Retry`}):null,t[4]=a,t[5]=n,t[6]=c):c=t[6];let l;return t[7]!==s||t[8]!==c?(l=(0,Q.jsxs)(`div`,{className:`flex items-center gap-3 rounded-md border border-warning/20 bg-warning/5 p-3`,role:`alert`,children:[o,s,c]}),t[7]=s,t[8]=c,t[9]=l):l=t[9],l}if(n===void 0||n.kind!==`marketplace`||n.official)return null;let o;t[10]!==n.author.name||t[11]!==n.author.url?(o=n.author.url===null?null:(0,Q.jsx)(`a`,{href:n.author.url,target:`_blank`,rel:`noreferrer`,className:`underline underline-offset-2`,children:n.author.name}),t[10]=n.author.name,t[11]=n.author.url,t[12]=o):o=t[12];let s=o,c;t[13]===n.marketplaceDisplayName?c=t[14]:(c=(0,Q.jsxs)(`p`,{className:`text-2xs text-subtle-foreground`,children:[`Listed by`,` `,(0,Q.jsx)(`span`,{className:`text-foreground`,children:n.marketplaceDisplayName}),`, a third-party marketplace that BB does not review.`]}),t[13]=n.marketplaceDisplayName,t[14]=c);let l;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Q.jsx)(`dt`,{className:`w-28 shrink-0 text-2xs text-subtle-foreground`,children:`author`}),t[15]=l):l=t[15];let u=s??n.author.name,d;t[16]===u?d=t[17]:(d=(0,Q.jsxs)(`div`,{className:`flex gap-2`,children:[l,(0,Q.jsx)(`dd`,{className:`min-w-0 break-all font-mono text-2xs text-foreground`,children:u})]}),t[16]=u,t[17]=d);let f;t[18]===n.resolvedSource?f=t[19]:(f=Wr(n.resolvedSource).map(Kr),t[18]=n.resolvedSource,t[19]=f);let p;t[20]!==d||t[21]!==f?(p=(0,Q.jsxs)(`dl`,{className:`space-y-0.5`,children:[d,f]}),t[20]=d,t[21]=f,t[22]=p):p=t[22];let m;return t[23]!==c||t[24]!==p?(m=(0,Q.jsxs)(`div`,{className:`space-y-1.5 rounded-md border border-border bg-muted/30 px-3 py-2`,children:[c,p]}),t[23]=c,t[24]=p,t[25]=m):m=t[25],m}function Kr(e){return(0,Q.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Q.jsx)(`dt`,{className:`w-28 shrink-0 text-2xs text-subtle-foreground`,children:e.label}),(0,Q.jsx)(`dd`,{className:`min-w-0 break-all font-mono text-2xs text-foreground`,children:e.href===void 0?e.value:(0,Q.jsx)(`a`,{href:e.href,target:`_blank`,rel:`noreferrer`,className:`underline underline-offset-2 hover:text-foreground`,children:e.value})})]},e.label)}function qr(e){let t=(0,$.c)(64),{initial:n,onOpenChange:r,onInstallStarted:i}=e,o=_(),[s,c]=(0,Z.useState)(``),l;t[0]!==n||t[1]!==s?(l=Ur(n,s),t[0]=n,t[1]=s,t[2]=l):l=t[2];let u=l,d;t[3]===n?d=t[4]:(d=n!==null&&n.marketplace!==`bb-community`&&!n.source.startsWith(`builtin:`),t[3]=n,t[4]=d);let f=d,p;t[5]!==n||t[6]!==f?(p=f&&n!==null?{entryId:n.entryId,marketplace:n.marketplace}:null,t[5]=n,t[6]=f,t[7]=p):p=t[7];let m=It(p),h=m.data,g;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(g={showErrorToast:!1},t[8]=g):g=t[8];let v;t[9]!==h||t[10]!==f?(v=e=>e.kind===`catalog`?St(fetch,{entryId:e.entryId,marketplace:e.marketplace,...f&&h?.kind===`marketplace`?{confirmedSource:h.resolvedSource}:{}}):Qe(fetch,e.source),t[9]=h,t[10]=f,t[11]=v):v=t[11];let y;t[12]!==i||t[13]!==r||t[14]!==o?(y=e=>{Le({queryClient:o,job:e}),r(!1),i?.(e)},t[12]=i,t[13]=r,t[14]=o,t[15]=y):y=t[15];let b;t[16]!==v||t[17]!==y?(b={meta:g,mutationFn:v,onSuccess:y},t[16]=v,t[17]=y,t[18]=b):b=t[18];let x=a(b),S=n===null?`Add plugin`:`Install ${n.displayName}?`,C;t[19]===S?C=t[20]:(C=(0,Q.jsx)(Ye,{children:S}),t[19]=S,t[20]=C);let w;t[21]!==n||t[22]!==f?(w=n===null?`Install from npm, a Git repository, or a local path.`:f?`Install this plugin from the source its marketplace lists.`:Vr(n.source,n.publisherLabel),t[21]=n,t[22]=f,t[23]=w):w=t[23];let T;t[24]===w?T=t[25]:(T=(0,Q.jsx)(_t,{children:w}),t[24]=w,t[25]=T);let E;t[26]!==T||t[27]!==C?(E=(0,Q.jsxs)(Ze,{children:[C,T]}),t[26]=T,t[27]=C,t[28]=E):E=t[28];let D;t[29]!==n||t[30]!==s?(D=n===null?(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(yt,{value:s,autoFocus:!0,placeholder:`https://github.com/owner/bb-plugin-name`,"aria-label":`Plugin source`,className:`h-8 font-mono text-xs`,onChange:e=>c(e.target.value)}),(0,Q.jsx)(`p`,{className:`mt-1.5 text-2xs text-subtle-foreground`,children:`GitHub repository URL · npm:package[@version] · ./local/path`})]}):(0,Q.jsxs)(`div`,{className:`space-y-1.5 rounded-md border border-border bg-muted/30 px-3 py-2`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,Q.jsx)(tr,{entry:n,className:`size-6`}),(0,Q.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:n.displayName}),(0,Q.jsx)(`span`,{className:`ml-auto font-mono text-xs text-subtle-foreground`,children:n.entryId})]}),(0,Q.jsx)(`p`,{className:`overflow-x-auto whitespace-nowrap font-mono text-2xs text-subtle-foreground`,children:n.source})]}),t[29]=n,t[30]=s,t[31]=D):D=t[31];let O;t[32]!==h||t[33]!==m||t[34]!==f?(O=f?(0,Q.jsx)(Gr,{plan:h,pending:m.isPending,error:m.error,onRetry:()=>void m.refetch()}):null,t[32]=h,t[33]=m,t[34]=f,t[35]=O):O=t[35];let k;t[36]!==x.error||t[37]!==x.isError?(k=x.isError?(0,Q.jsx)(`p`,{role:`alert`,className:`max-h-40 overflow-y-auto whitespace-pre-wrap break-words text-xs text-warning-text`,children:Br(x.error)}):null,t[36]=x.error,t[37]=x.isError,t[38]=k):k=t[38];let A;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Q.jsx)(Gn,{}),t[39]=A):A=t[39];let j;t[40]!==D||t[41]!==O||t[42]!==k?(j=(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[D,O,k,A]}),t[40]=D,t[41]=O,t[42]=k,t[43]=j):j=t[43];let M;t[44]===r?M=t[45]:(M=(0,Q.jsx)(ft,{type:`button`,variant:`outline`,onClick:()=>r(!1),children:`Cancel`}),t[44]=r,t[45]=M);let N=u===null||x.isPending||f&&m.isPending||f&&h===void 0,P;t[46]!==x||t[47]!==u?(P=()=>{u!==null&&x.mutate(u)},t[46]=x,t[47]=u,t[48]=P):P=t[48];let F;t[49]===x.isPending?F=t[50]:(F=x.isPending?(0,Q.jsx)(q,{name:`Spinner`,className:`animate-spin`}):null,t[49]=x.isPending,t[50]=F);let I=`Install ${n?.displayName??`plugin`}`,L;t[51]!==x.isPending||t[52]!==N||t[53]!==P||t[54]!==F||t[55]!==I?(L=(0,Q.jsxs)(ft,{type:`button`,disabled:N,"aria-busy":x.isPending,onClick:P,children:[F,I]}),t[51]=x.isPending,t[52]=N,t[53]=P,t[54]=F,t[55]=I,t[56]=L):L=t[56];let R;t[57]!==M||t[58]!==L?(R=(0,Q.jsxs)(lt,{className:`gap-2`,children:[M,L]}),t[57]=M,t[58]=L,t[59]=R):R=t[59];let z;return t[60]!==E||t[61]!==j||t[62]!==R?(z=(0,Q.jsxs)(Q.Fragment,{children:[E,j,R]}),t[60]=E,t[61]=j,t[62]=R,t[63]=z):z=t[63],z}var Jr=`plugin-api-docs`,Yr=`/plugins/${Jr}/plugin-api`;function Xr(){let e=(0,$.c)(28),t=_(),n=y(),[r,i]=(0,Z.useState)(null),[o,s]=(0,Z.useState)(null),c=Tt(o),l,u;e[0]!==c||e[1]!==n?(l=()=>{c===null||ut(c)||(s(null),c.state===`succeeded`&&n(Yr))},u=[c,n],e[0]=c,e[1]=n,e[2]=l,e[3]=u):(l=e[2],u=e[3]),(0,Z.useEffect)(l,u);let d;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(d={showErrorToast:!1},e[4]=d):d=e[4];let f;e[5]===t?f=e[6]:(f={meta:d,mutationFn:async()=>{let e=(await t.fetchQuery({...Xe({enabled:!0}),staleTime:0})).find($r);if(e===void 0){let e=(await jt(fetch,Jr)).entries.find(Qr);if(e===void 0)throw Error(`Plugin Guide is unavailable in the catalog.`);return e}return e.enabled||(await Lt(fetch,Jr,!0),await Ke({queryClient:t})),null},onError:Zr},e[5]=t,e[6]=f);let p=a(f),m=p.isPending,h=p.isPending,g;e[7]!==n||e[8]!==p?(g=()=>p.mutate(void 0,{onSuccess:e=>{e===null?n(Yr):i(e)}}),e[7]=n,e[8]=p,e[9]=g):g=e[9];let v=p.isPending?`Spinner`:`Explore`,b=p.isPending&&`animate-spin`,x;e[10]===b?x=e[11]:(x=X(`size-4`,b),e[10]=b,e[11]=x);let S;e[12]!==v||e[13]!==x?(S=(0,Q.jsx)(q,{name:v,className:x,"aria-hidden":!0}),e[12]=v,e[13]=x,e[14]=S):S=e[14];let C;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Q.jsx)(`span`,{className:`underline underline-offset-4`,children:`Plugin Guide`}),e[15]=C):C=e[15];let w;e[16]!==p.isPending||e[17]!==S||e[18]!==g?(w=(0,Q.jsxs)(ft,{type:`button`,variant:`link`,size:`sm`,className:`shrink-0 gap-1.5 px-0 text-muted-foreground hover:text-foreground`,disabled:m,"aria-busy":h,onClick:g,children:[S,C]}),e[16]=p.isPending,e[17]=S,e[18]=g,e[19]=w):w=e[19];let T=r!==null,E,D;e[20]===Symbol.for(`react.memo_cache_sentinel`)?(E=e=>{e||i(null)},D=e=>s(e.id),e[20]=E,e[21]=D):(E=e[20],D=e[21]);let O;e[22]!==r||e[23]!==T?(O=(0,Q.jsx)(Hr,{open:T,initial:r,onOpenChange:E,onInstallStarted:D}),e[22]=r,e[23]=T,e[24]=O):O=e[24];let k;return e[25]!==w||e[26]!==O?(k=(0,Q.jsxs)(Q.Fragment,{children:[w,O]}),e[25]=w,e[26]=O,e[27]=k):k=e[27],k}function Zr(e){Se.error(`Could not open Plugin Guide`,{description:Br(e)})}function Qr(e){return e.pluginId===Jr&&e.source===`builtin:${Jr}`&&e.official}function $r(e){return e.id===Jr}function ei(e,t){return`color-mix(in oklab, var(${e}) ${t}%, var(--canvas))`}function ti(e,t){return`color-mix(in oklab, var(${e}) ${t}%, var(--ink))`}function ni(e){return`color-mix(in oklch, var(--ink) ${e}%, var(--canvas))`}function ri(e){let t=(0,$.c)(26),{icon:n,title:r,description:i,accentToken:a,tooltip:o,onClick:s}=e,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=X(`group flex cursor-pointer flex-col items-start gap-1.5 rounded-lg border border-border`,`bg-background p-3 text-left transition-colors duration-150 hover:duration-0`,`hover:bg-state-hover focus-visible:ring-1 focus-visible:ring-ring`,`focus-visible:outline-none`),t[0]=c):c=t[0];let l;t[1]===a?l=t[2]:(l=a===void 0?{background:ni(5),borderColor:ni(14),color:ni(55)}:{background:ei(a,14),borderColor:ei(a,40),color:ti(a,62)},t[1]=a,t[2]=l);let u;t[3]===n?u=t[4]:(u=(0,Q.jsx)(q,{name:n,className:`size-3.5`}),t[3]=n,t[4]=u);let d;t[5]!==l||t[6]!==u?(d=(0,Q.jsx)(`span`,{className:`flex size-6 shrink-0 items-center justify-center rounded-md border`,style:l,children:u}),t[5]=l,t[6]=u,t[7]=d):d=t[7];let f;t[8]===r?f=t[9]:(f=(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm font-medium text-foreground`,children:r}),t[8]=r,t[9]=f);let p;t[10]!==d||t[11]!==f?(p=(0,Q.jsxs)(`div`,{className:`flex w-full items-center gap-2`,children:[d,f]}),t[10]=d,t[11]=f,t[12]=p):p=t[12];let m;t[13]===i?m=t[14]:(m=(0,Q.jsx)(`span`,{className:`block min-h-[2lh] text-xs leading-snug text-subtle-foreground`,children:i}),t[13]=i,t[14]=m);let h;t[15]!==s||t[16]!==p||t[17]!==m?(h=(0,Q.jsxs)(`button`,{type:`button`,onClick:s,className:c,children:[p,m]}),t[15]=s,t[16]=p,t[17]=m,t[18]=h):h=t[18];let g=h;if(o===void 0)return g;let _;t[19]===g?_=t[20]:(_=(0,Q.jsx)(de,{asChild:!0,children:g}),t[19]=g,t[20]=_);let v;t[21]===o?v=t[22]:(v=(0,Q.jsx)(O,{side:`bottom`,className:`max-w-xs`,children:o}),t[21]=o,t[22]=v);let y;return t[23]!==v||t[24]!==_?(y=(0,Q.jsxs)(se,{children:[_,v]}),t[23]=v,t[24]=_,t[25]=y):y=t[25],y}function ii(e){let t=(0,$.c)(13),{onCreate:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Q.jsx)(`h3`,{className:`text-xs font-medium text-subtle-foreground`,children:`Start from an example`}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=Ar.map(e=>(0,Q.jsx)(ri,{icon:e.icon,title:e.title,description:e.hook,accentToken:e.accentToken,onClick:()=>n(jr(e))},e.id)),t[1]=n,t[2]=i);let a;t[3]===i?a=t[4]:(a=(0,Q.jsx)(`div`,{className:`mt-2 grid grid-cols-[repeat(auto-fill,minmax(min(100%,18rem),1fr))] gap-2`,children:i}),t[3]=i,t[4]=a);let o;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Q.jsx)(`h4`,{className:`mt-5 text-2xs font-medium text-subtle-foreground`,children:`Explore plugin capabilities`}),t[5]=o):o=t[5];let s;t[6]===n?s=t[7]:(s=Mr.map(e=>(0,Q.jsx)(ri,{icon:e.icon,title:e.label,description:e.brief,tooltip:jr(e),onClick:()=>n(jr(e))},e.id)),t[6]=n,t[7]=s);let c;t[8]===s?c=t[9]:(c=(0,Q.jsx)(`div`,{className:`mt-2 grid grid-cols-[repeat(auto-fill,minmax(min(100%,18rem),1fr))] gap-2`,children:s}),t[8]=s,t[9]=c);let l;return t[10]!==a||t[11]!==c?(l=(0,Q.jsx)(Pt,{delayDuration:250,children:(0,Q.jsxs)(`section`,{children:[r,a,o,c]})}),t[10]=a,t[11]=c,t[12]=l):l=t[12],l}var ai=`Discover plugins for bb. Install one, or describe your own and build it from a prompt.`,oi=`The plugins installed on this bb host. Turn one on or off, apply updates, or open it for settings and details.`;function si(e){let t=(0,$.c)(69),{archetypes:n,activeIndex:r,scenes:i,titlePrefix:a,badge:o,rail:s,reducedMotion:c,className:l}=e,u=n[r]??n[0];if(u===void 0)return null;let d=u.accentToken,f;t[0]===l?f=t[1]:(f=X(`relative flex flex-col overflow-hidden rounded-xl border shadow-lift`,l),t[0]=l,t[1]=f);let p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p={background:`var(--canvas)`,borderColor:ni(16)},t[2]=p):p=t[2];let m;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(m={borderColor:ni(10),background:ni(3)},t[3]=m):m=t[3];let h;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Q.jsx)(`div`,{className:`flex shrink-0 gap-1`,"aria-hidden":`true`,children:[`--destructive`,`--attention`,`--success`].map(li)}),t[4]=h):h=t[4];let g=!c&&`transition-colors duration-500`,_;t[5]===g?_=t[6]:(_=X(`mx-auto truncate text-2xs font-medium`,g),t[5]=g,t[6]=_);let v;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(v={color:ni(48)},t[7]=v):v=t[7];let y;t[8]!==u.title||t[9]!==_||t[10]!==a?(y=(0,Q.jsxs)(`span`,{className:_,style:v,children:[a,u.title]}),t[8]=u.title,t[9]=_,t[10]=a,t[11]=y):y=t[11];let b;t[12]===d?b=t[13]:(b=ei(d,14),t[12]=d,t[13]=b);let x;t[14]===d?x=t[15]:(x=ti(d,60),t[14]=d,t[15]=x);let S;t[16]!==x||t[17]!==b?(S={background:b,color:x},t[16]=x,t[17]=b,t[18]=S):S=t[18];let C;t[19]!==o||t[20]!==S?(C=(0,Q.jsx)(`span`,{className:`shrink-0 rounded-full px-1.5 py-0.5 text-2xs font-medium`,style:S,children:o}),t[19]=o,t[20]=S,t[21]=C):C=t[21];let w;t[22]!==C||t[23]!==h||t[24]!==y?(w=(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-b px-2.5 py-1.5`,style:m,children:[h,y,C]}),t[22]=C,t[23]=h,t[24]=y,t[25]=w):w=t[25];let T;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(T={borderColor:ni(10),background:ni(2)},t[26]=T):T=t[26];let E;t[27]===s?E=t[28]:(E=s.map(ci),t[27]=s,t[28]=E);let D;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,Q.jsx)(`span`,{className:`my-0.5 h-px w-4`,style:{background:ni(12)}}),t[29]=D):D=t[29];let O=!c&&`transition-all duration-500`,k;t[30]===O?k=t[31]:(k=X(`flex size-5 items-center justify-center rounded-md border`,O),t[30]=O,t[31]=k);let A;t[32]===d?A=t[33]:(A=ei(d,16),t[32]=d,t[33]=A);let j;t[34]===d?j=t[35]:(j=ei(d,42),t[34]=d,t[35]=j);let M;t[36]===d?M=t[37]:(M=ti(d,62),t[36]=d,t[37]=M);let N;t[38]!==A||t[39]!==j||t[40]!==M?(N={background:A,borderColor:j,color:M},t[38]=A,t[39]=j,t[40]=M,t[41]=N):N=t[41];let P;t[42]===u.icon?P=t[43]:(P=(0,Q.jsx)(q,{name:u.icon,className:`size-3`}),t[42]=u.icon,t[43]=P);let F;t[44]!==k||t[45]!==N||t[46]!==P?(F=(0,Q.jsx)(`span`,{className:k,style:N,children:P}),t[44]=k,t[45]=N,t[46]=P,t[47]=F):F=t[47];let I;t[48]!==E||t[49]!==F?(I=(0,Q.jsxs)(`div`,{className:`flex w-8 shrink-0 flex-col items-center gap-1.5 border-r py-2`,style:T,"aria-hidden":`true`,children:[E,D,F]}),t[48]=E,t[49]=F,t[50]=I):I=t[50];let L;if(t[51]!==r||t[52]!==n||t[53]!==c||t[54]!==i){let e;t[56]!==r||t[57]!==c||t[58]!==i?(e=(e,t)=>{let n=i[e.id];if(n===void 0)return null;let a=t===r;return(0,Q.jsx)(`div`,{"aria-hidden":!a,className:X(`absolute inset-0`,!c&&`transition-opacity duration-500 ease-out`,a?`opacity-100`:`pointer-events-none select-none opacity-0`),children:(0,Q.jsx)(n,{accentToken:e.accentToken})},e.id)},t[56]=r,t[57]=c,t[58]=i,t[59]=e):e=t[59],L=n.map(e),t[51]=r,t[52]=n,t[53]=c,t[54]=i,t[55]=L}else L=t[55];let R;t[60]===L?R=t[61]:(R=(0,Q.jsx)(`div`,{className:`relative min-w-0 flex-1`,children:L}),t[60]=L,t[61]=R);let z;t[62]!==I||t[63]!==R?(z=(0,Q.jsxs)(`div`,{className:`flex min-h-0 flex-1`,children:[I,R]}),t[62]=I,t[63]=R,t[64]=z):z=t[64];let B;return t[65]!==f||t[66]!==w||t[67]!==z?(B=(0,Q.jsxs)(`div`,{className:f,style:p,children:[w,z]}),t[65]=f,t[66]=w,t[67]=z,t[68]=B):B=t[68],B}function ci(e){return(0,Q.jsx)(`span`,{className:`flex size-5 items-center justify-center rounded-md`,style:{color:ni(30)},children:(0,Q.jsx)(q,{name:e,className:`size-3`})},e)}function li(e){return(0,Q.jsx)(`span`,{className:`size-2 rounded-full`,style:{background:ei(e,78)}},e)}var ui=5e3,di=[{top:`2%`,left:0},{top:`38%`,left:0},{top:`72%`,left:0},{top:`14%`,right:0},{top:`48%`,right:0},{top:`82%`,right:0}];function fi(e){let t=(0,$.c)(96),{archetypes:n,scenes:r,copy:i,composer:a,rail:o,initialIndex:s,autoplay:c,composerDisabled:l,openRequest:u,onComposingChange:d}=e,f=s===void 0?0:s,p=c===void 0?!0:c,m=l===void 0?!1:l,h=u===void 0?null:u,g=We(),_=y(),v=hr(),S;t[0]===a.draftKey?S=t[1]:(S=rt({kind:`plugin-new-thread`,key:a.draftKey}),t[0]=a.draftKey,t[1]=S);let C=S,[w,T]=(0,Z.useState)(f),[E,D]=(0,Z.useState)(!1),[O,k]=(0,Z.useState)(!1),[A,j]=(0,Z.useState)(null),[M,N]=(0,Z.useState)(0),P=(0,Z.useRef)(null),F=A!==null,I=n[w]??n[0],L=!p||g||E||F||O,R,z;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(R=()=>{if(typeof document>`u`)return;let e=()=>k(document.hidden);return e(),document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},z=[],t[2]=R,t[3]=z):(R=t[2],z=t[3]),(0,Z.useEffect)(R,z);let B;t[4]===C?B=t[5]:(B=()=>x(C.storageKey),t[4]=C,t[5]=B);let ee;t[6]!==C||t[7]!==B?(ee=b({...C,focus:B}),t[6]=C,t[7]=B,t[8]=ee):ee=t[8];let te=ee,V=(0,Z.useRef)(!1),H;t[9]!==te||t[10]!==d?(H=(e,t)=>{e!==null&&t?.replaceDraft===!0&&te.replace({text:e,mentions:[]});let n=e!==null;V.current!==n&&(V.current=n,d?.(n)),j(e),e!==null&&N(pi)},t[9]=te,t[10]=d,t[11]=H):H=t[11];let U=H,W=(0,Z.useRef)(null),G,ne;t[12]!==a.promptPrefix||t[13]!==m||t[14]!==h||t[15]!==U?(G=()=>{m||h===null||h.nonce===W.current||(W.current=h.nonce,U(h.close===!0?null:h.seed??a.promptPrefix,{replaceDraft:!h.close&&h.seed!==void 0}))},ne=[a.promptPrefix,m,h,U],t[12]=a.promptPrefix,t[13]=m,t[14]=h,t[15]=U,t[16]=G,t[17]=ne):(G=t[16],ne=t[17]),(0,Z.useEffect)(G,ne);let K;t[18]!==n.length||t[19]!==L?(K=()=>{if(L)return;let e=window.setTimeout(()=>{T(e=>(e+1)%n.length)},ui);return()=>window.clearTimeout(e)},t[18]=n.length,t[19]=L,t[20]=K):K=t[20];let re;t[21]!==w||t[22]!==n.length||t[23]!==L?(re=[w,n.length,L],t[21]=w,t[22]=n.length,t[23]=L,t[24]=re):re=t[24],(0,Z.useEffect)(K,re);let J;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(J=e=>{(P.current?.querySelectorAll(`[role='tab']`))?.[e]?.focus()},t[25]=J):J=t[25];let ie=J,Y;t[26]!==w||t[27]!==n.length?(Y=e=>{let t=n.length-1,r=null;e.key===`ArrowRight`?r=w===t?0:w+1:e.key===`ArrowLeft`?r=w===0?t:w-1:e.key===`Home`?r=0:e.key===`End`&&(r=t),r!==null&&(e.preventDefault(),T(r),ie(r))},t[26]=w,t[27]=n.length,t[28]=Y):Y=t[28];let ae=Y;if(I===void 0)return null;let oe=i.ariaLabel,se,ce,le,ue;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(se=()=>D(!0),ce=()=>D(!1),le=()=>D(!0),ue=e=>{e.currentTarget.contains(e.relatedTarget)||D(!1)},t[29]=se,t[30]=ce,t[31]=le,t[32]=ue):(se=t[29],ce=t[30],le=t[31],ue=t[32]);let de=i.headlineLead,fe=F?`composing`:I.id,pe=!g&&`animate-in fade-in slide-in-from-bottom-1 duration-500`,me;t[33]===pe?me=t[34]:(me=X(`inline-block`,pe),t[33]=pe,t[34]=me);let he;t[35]!==I||t[36]!==F?(he=F?`var(--foreground)`:ti(I.accentToken,72),t[35]=I,t[36]=F,t[37]=he):he=t[37];let ge;t[38]===he?ge=t[39]:(ge={color:he},t[38]=he,t[39]=ge);let _e=F?i.composingNoun:I.noun,ve;t[40]!==fe||t[41]!==me||t[42]!==ge||t[43]!==_e?(ve=(0,Q.jsx)(`span`,{className:me,style:ge,children:_e},fe),t[40]=fe,t[41]=me,t[42]=ge,t[43]=_e,t[44]=ve):ve=t[44];let ye;t[45]!==i.headlineLead||t[46]!==ve?(ye=(0,Q.jsxs)(`h2`,{className:`text-center text-2xl font-semibold tracking-tight text-foreground`,children:[de,` `,ve]}),t[45]=i.headlineLead,t[46]=ve,t[47]=ye):ye=t[47];let be;t[48]===i.description?be=t[49]:(be=(0,Q.jsx)(`p`,{className:`mt-1.5 max-w-prose text-center text-sm text-muted-foreground`,children:i.description}),t[48]=i.description,t[49]=be);let xe=!g&&`transition-[opacity,transform,filter] duration-300 ease-out`,Se=F?`pointer-events-none scale-[0.97] opacity-0 blur-[2px]`:`scale-100 opacity-100 blur-0`,Ce;t[50]!==xe||t[51]!==Se?(Ce=X(`relative [grid-area:1/1]`,xe,Se),t[50]=xe,t[51]=Se,t[52]=Ce):Ce=t[52];let we;if(t[53]!==w||t[54]!==n){let e;t[56]===w?e=t[57]:(e=(e,t)=>{let n=di[t];if(n===void 0)return null;let r=t===w;return(0,Q.jsxs)(`button`,{type:`button`,tabIndex:-1,"aria-hidden":`true`,onClick:()=>T(t),style:{...n,"--bb-hero-drift-duration":`${6+t*.7}s`,"--bb-hero-drift-delay":`${t*.45}s`,background:r?ei(e.accentToken,12):`var(--canvas)`,borderColor:r?ei(e.accentToken,40):ni(13),color:r?ti(e.accentToken,62):ni(46)},className:X(`bb-hero-chip absolute z-10 hidden max-w-[9rem] cursor-pointer items-center gap-1.5`,`rounded-lg border px-2 py-1.5 text-2xs font-medium shadow-sm @[50rem]:flex`,`transition-[opacity,transform,background-color,border-color] duration-500`,r?`opacity-100`:`opacity-70 hover:opacity-100`),children:[(0,Q.jsx)(q,{name:e.icon,className:`size-3 shrink-0`}),(0,Q.jsx)(`span`,{className:`truncate`,children:e.title})]},e.id)},t[56]=w,t[57]=e),we=n.map(e),t[53]=w,t[54]=n,t[55]=we}else we=t[55];let Te;t[58]!==w||t[59]!==n||t[60]!==i.frameBadge||t[61]!==i.frameTitlePrefix||t[62]!==o||t[63]!==g||t[64]!==r?(Te=(0,Q.jsx)(si,{archetypes:n,activeIndex:w,scenes:r,titlePrefix:i.frameTitlePrefix,badge:i.frameBadge,rail:o,reducedMotion:g,className:`mx-auto h-[13rem] w-full max-w-[38rem] @[50rem]:w-[66%]`}),t[58]=w,t[59]=n,t[60]=i.frameBadge,t[61]=i.frameTitlePrefix,t[62]=o,t[63]=g,t[64]=r,t[65]=Te):Te=t[65];let Ee;t[66]!==F||t[67]!==Ce||t[68]!==we||t[69]!==Te?(Ee=(0,Q.jsxs)(`div`,{className:Ce,"aria-hidden":F,children:[we,Te]}),t[66]=F,t[67]=Ce,t[68]=we,t[69]=Te,t[70]=Ee):Ee=t[70];let De;t[71]!==a.draftKey||t[72]!==a.placeholder||t[73]!==M||t[74]!==A||t[75]!==F||t[76]!==v||t[77]!==_||t[78]!==g?(De=F?(0,Q.jsx)(`div`,{className:X(`z-20 self-center [grid-area:1/1]`,!g&&`animate-in fade-in slide-in-from-bottom-2 duration-300`),children:(0,Q.jsx)(`div`,{className:`mx-auto w-full max-w-[44rem]`,children:(0,Q.jsx)(Bt,{initialPrompt:A??void 0,placeholder:a.placeholder,draftKey:a.draftKey,focusRequest:M,onSubmit:async e=>{let t=await v.mutateAsync({input:e.input,projectId:e.projectId,providerId:e.providerId,model:e.model,reasoningLevel:e.reasoningLevel,permissionMode:e.permissionMode,...e.serviceTier?{serviceTier:e.serviceTier}:{},executionInputSources:e.executionInputSources,environment:e.environment});_(Ne({projectId:t.projectId??e.projectId,threadId:t.id}))}},M)})}):null,t[71]=a.draftKey,t[72]=a.placeholder,t[73]=M,t[74]=A,t[75]=F,t[76]=v,t[77]=_,t[78]=g,t[79]=De):De=t[79];let Oe;t[80]!==Ee||t[81]!==De?(Oe=(0,Q.jsxs)(`div`,{className:`@container relative mt-5 grid w-full max-w-[58rem] grid-cols-1 grid-rows-1`,children:[Ee,De]}),t[80]=Ee,t[81]=De,t[82]=Oe):Oe=t[82];let ke;t[83]!==w||t[84]!==n||t[85]!==F||t[86]!==i.tablistLabel||t[87]!==ae||t[88]!==L?(ke=F?null:(0,Q.jsx)(`div`,{className:`mt-4 flex min-h-4 flex-col items-center gap-3`,children:(0,Q.jsx)(`div`,{ref:P,role:`tablist`,"aria-label":i.tablistLabel,className:`flex items-center gap-1.5`,onKeyDown:ae,children:n.map((e,t)=>{let n=t===w;return(0,Q.jsx)(`button`,{role:`tab`,type:`button`,"aria-selected":n,"aria-label":e.title,tabIndex:n?0:-1,onClick:()=>T(t),className:X(`group h-4 cursor-pointer rounded-full px-0 focus-visible:ring-1`,`focus-visible:ring-ring focus-visible:outline-none`),children:(0,Q.jsx)(`span`,{className:X(`block h-1 overflow-hidden rounded-full transition-all duration-300`,n?`w-10`:`w-4`),style:{background:n?ei(e.accentToken,22):ni(14)},children:n?(0,Q.jsx)(`span`,{"data-paused":L,className:`bb-hero-progress-fill block h-full w-full`,style:{"--bb-hero-slide-duration":`${ui}ms`,background:`var(${e.accentToken})`}},`${e.id}-${w}`):null})},e.id)})})}),t[83]=w,t[84]=n,t[85]=F,t[86]=i.tablistLabel,t[87]=ae,t[88]=L,t[89]=ke):ke=t[89];let Ae;return t[90]!==i.ariaLabel||t[91]!==ye||t[92]!==be||t[93]!==Oe||t[94]!==ke?(Ae=(0,Q.jsxs)(`section`,{"aria-roledescription":`carousel`,"aria-label":oe,className:`flex flex-col items-center pb-4`,onPointerEnter:se,onPointerLeave:ce,onFocusCapture:le,onBlurCapture:ue,children:[ye,be,Oe,ke]}),t[90]=i.ariaLabel,t[91]=ye,t[92]=be,t[93]=Oe,t[94]=ke,t[95]=Ae):Ae=t[95],Ae}function pi(e){return e+1}function mi(e){let t=(0,$.c)(10),{width:n,strength:r,className:i}=e,a=r===void 0?12:r,o;t[0]===i?o=t[1]:(o=X(`h-1.5 rounded-full`,i),t[0]=i,t[1]=o);let s;t[2]===a?s=t[3]:(s=ni(a),t[2]=a,t[3]=s);let c;t[4]!==s||t[5]!==n?(c={width:n,background:s},t[4]=s,t[5]=n,t[6]=c):c=t[6];let l;return t[7]!==o||t[8]!==c?(l=(0,Q.jsx)(`div`,{className:o,style:c}),t[7]=o,t[8]=c,t[9]=l):l=t[9],l}function hi(e){let t=(0,$.c)(9),{children:n,className:r,style:i}=e,a;t[0]===r?a=t[1]:(a=X(`rounded-md border p-1.5`,r),t[0]=r,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=ni(11),t[2]=o):o=t[2];let s;t[3]===i?s=t[4]:(s={background:`var(--canvas)`,borderColor:o,...i},t[3]=i,t[4]=s);let c;return t[5]!==n||t[6]!==a||t[7]!==s?(c=(0,Q.jsx)(`div`,{className:a,style:s,children:n}),t[5]=n,t[6]=a,t[7]=s,t[8]=c):c=t[8],c}function gi(e){let t=(0,$.c)(3),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={color:ni(52)},t[0]=r):r=t[0];let i;return t[1]===n?i=t[2]:(i=(0,Q.jsx)(`span`,{className:`text-2xs font-medium`,style:r,children:n}),t[1]=n,t[2]=i),i}function _i(e){let t=(0,$.c)(2),{accentToken:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Q.jsx)(`div`,{className:`grid h-full grid-cols-3 gap-1.5 p-2`,children:[{label:`Todo`,cards:3},{label:`In progress`,cards:2,active:!0},{label:`Review`,cards:2}].map(e=>(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Q.jsx)(gi,{children:e.label}),(0,Q.jsx)(`span`,{className:`text-2xs tabular-nums`,style:{color:ni(38)},children:e.cards})]}),Array.from({length:e.cards},(t,r)=>{let i=e.active===!0&&r===0;return(0,Q.jsxs)(hi,{className:`flex flex-col gap-1`,style:i?{background:ei(n,10),borderColor:ei(n,38)}:void 0,children:[(0,Q.jsx)(mi,{width:r%2==0?`82%`:`64%`,strength:16}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Q.jsx)(`div`,{className:`size-1.5 rounded-full`,style:{background:i?`var(${n})`:ni(18)}}),(0,Q.jsx)(mi,{width:`38%`,strength:9})]})]},r)})]},e.label))}),t[0]=n,t[1]=r),r}function vi(e){let t=(0,$.c)(10),{accentToken:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[42,61,38,78,55,88,70],t[0]=r):r=t[0];let i=r,a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=[{label:`Deploys`,value:`18`},{label:`Open PRs`,value:`7`},{label:`CI pass`,value:`96%`}],t[1]=a):a=t[1];let o=a,s;t[2]===n?s=t[3]:(s=(0,Q.jsx)(`div`,{className:`grid grid-cols-3 gap-1.5`,children:o.map((e,t)=>(0,Q.jsxs)(hi,{className:`flex flex-col gap-0.5`,style:t===2?{background:ei(n,10),borderColor:ei(n,38)}:void 0,children:[(0,Q.jsx)(gi,{children:e.label}),(0,Q.jsx)(`span`,{className:`text-xs font-semibold tabular-nums`,style:{color:t===2?ti(n,55):ni(72)},children:e.value})]},e.label))}),t[2]=n,t[3]=s);let c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Q.jsx)(gi,{children:`Throughput`}),t[4]=c):c=t[4];let l;t[5]===n?l=t[6]:(l=(0,Q.jsxs)(hi,{className:`flex min-h-0 flex-1 flex-col gap-1.5`,children:[c,(0,Q.jsx)(`div`,{className:`flex min-h-0 flex-1 items-end gap-1`,children:i.map((e,t)=>(0,Q.jsx)(`div`,{className:`flex-1 rounded-sm`,style:{height:`${e}%`,background:t===i.length-2?`var(${n})`:ei(n,26)}},t))})]}),t[5]=n,t[6]=l);let u;return t[7]!==s||t[8]!==l?(u=(0,Q.jsxs)(`div`,{className:`flex h-full flex-col gap-2 p-2`,children:[s,l]}),t[7]=s,t[8]=l,t[9]=u):u=t[9],u}function yi(e){let t=(0,$.c)(35),{accentToken:n}=e,r,i,a,o,s,c;if(t[0]!==n){let e=[{label:`Video`,height:`h-3.5`,clips:[{width:`24%`,active:!1},{width:`34%`,active:!0},{width:`18%`,active:!1}]},{label:`Audio`,height:`h-2`,clips:[{width:`42%`,active:!1},{width:`30%`,active:!1},{width:`16%`,active:!1}]},{label:`Captions`,height:`h-1.5`,clips:[{width:`16%`,active:!1},{width:`13%`,active:!1},{width:`19%`,active:!1},{width:`12%`,active:!1}]}];s=`flex h-full flex-col gap-1.5 p-2`;let l;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Q.jsx)(gi,{children:`Launch video`}),t[7]=l):l=t[7];let u=ei(n,16),d=ti(n,62);t[8]!==u||t[9]!==d?(c=(0,Q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[l,(0,Q.jsx)(`span`,{className:`ml-auto rounded-full px-1.5 py-0.5 font-mono text-2xs font-medium tabular-nums`,style:{background:u,color:d},children:`first cut · 00:42`})]}),t[8]=u,t[9]=d,t[10]=c):c=t[10],r=hi,i=`relative flex min-h-0 flex-1 flex-col justify-center gap-2`;let f=`var(${n})`;t[11]===f?a=t[12]:(a=(0,Q.jsx)(`div`,{className:`pointer-events-none absolute inset-y-1 left-[52%] w-px`,style:{background:f},"aria-hidden":!0}),t[11]=f,t[12]=a),o=e.map(e=>(0,Q.jsxs)(`div`,{className:`grid grid-cols-[3.25rem_minmax(0,1fr)] items-center gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`text-2xs font-medium`,style:{color:ni(46)},children:e.label}),(0,Q.jsx)(`div`,{className:`flex ${e.height} items-stretch gap-0.5`,children:e.clips.map((t,r)=>(0,Q.jsx)(`span`,{className:`rounded-sm`,style:{width:t.width,background:e.label===`Audio`?ei(`--success`,30):t.active?ei(n,36):ni(e.label===`Captions`?16:12)}},r))})]},e.label)),t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c}else r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6];let l;t[13]!==r||t[14]!==i||t[15]!==a||t[16]!==o?(l=(0,Q.jsxs)(r,{className:i,children:[a,o]}),t[13]=r,t[14]=i,t[15]=a,t[16]=o,t[17]=l):l=t[17];let u;t[18]===n?u=t[19]:(u=ei(n,40),t[18]=n,t[19]=u);let d;t[20]===u?d=t[21]:(d={borderColor:u},t[20]=u,t[21]=d);let f;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Q.jsx)(`span`,{className:`text-2xs`,style:{color:ni(46)},children:`captions and music added`}),t[22]=f):f=t[22];let p;t[23]===n?p=t[24]:(p=ti(n,62),t[23]=n,t[24]=p);let m;t[25]===p?m=t[26]:(m=(0,Q.jsx)(`span`,{className:`text-2xs font-medium`,style:{color:p},children:`→ rendering first cut`}),t[25]=p,t[26]=m);let h;t[27]!==m||t[28]!==d?(h=(0,Q.jsxs)(`div`,{className:`flex items-center gap-1.5 rounded-md border border-dashed px-1.5 py-1`,style:d,children:[f,m]}),t[27]=m,t[28]=d,t[29]=h):h=t[29];let g;return t[30]!==h||t[31]!==s||t[32]!==c||t[33]!==l?(g=(0,Q.jsxs)(`div`,{className:s,children:[c,l,h]}),t[30]=h,t[31]=s,t[32]=c,t[33]=l,t[34]=g):g=t[34],g}function bi(e){let t=(0,$.c)(6),{accentToken:n}=e,r;if(t[0]!==n){let e=[{worktree:`feat/billing`,agents:4,progress:72,blocked:!1},{worktree:`fix/auth`,agents:3,progress:45,blocked:!0},{worktree:`chore/deps`,agents:5,progress:88,blocked:!1}],i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(gi,{children:`Working for you`}),t[2]=i):i=t[2];let a=ei(n,14),o=ti(n,60),s;t[3]!==a||t[4]!==o?(s=(0,Q.jsxs)(`div`,{className:`flex items-center justify-between`,children:[i,(0,Q.jsx)(`span`,{className:`rounded-full px-1.5 py-0.5 text-2xs font-medium tabular-nums`,style:{background:a,color:o},children:`12 running`})]}),t[3]=a,t[4]=o,t[5]=s):s=t[5],r=(0,Q.jsxs)(`div`,{className:`flex h-full flex-col gap-1.5 p-2`,children:[s,e.map(e=>(0,Q.jsxs)(hi,{className:`flex flex-col gap-1`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Q.jsx)(`span`,{className:`font-mono text-2xs`,style:{color:ni(52)},children:e.worktree}),e.blocked?(0,Q.jsx)(`span`,{className:`ml-auto rounded-sm px-1 text-2xs font-medium`,style:{background:ei(`--warning`,18),color:ti(`--warning`,62)},children:`needs you`}):(0,Q.jsxs)(`span`,{className:`ml-auto text-2xs tabular-nums`,style:{color:ni(38)},children:[e.agents,` agents`]})]}),(0,Q.jsx)(`div`,{className:`flex items-center gap-0.5`,children:Array.from({length:e.agents},(t,r)=>(0,Q.jsx)(`div`,{className:`h-1.5 flex-1 overflow-hidden rounded-full`,style:{background:ni(8)},children:(0,Q.jsx)(`div`,{className:`h-full rounded-full`,style:{width:`${Math.max(18,(e.progress+r*9)%100)}%`,background:r===0?`var(${n})`:ei(n,34)}})},r))})]},e.worktree))]}),t[0]=n,t[1]=r}else r=t[1];return r}function xi(e){let t=(0,$.c)(27),{accentToken:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[{name:`Guided`,state:`ready`},{name:`One page`,state:`ready`},{name:`Express`,state:`building`}],t[0]=r):r=t[0];let i=r,a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Q.jsx)(gi,{children:`Checkout flow`}),t[1]=a):a=t[1];let o;t[2]===n?o=t[3]:(o=ei(n,14),t[2]=n,t[3]=o);let s;t[4]===n?s=t[5]:(s=ti(n,62),t[4]=n,t[5]=s);let c;t[6]!==o||t[7]!==s?(c=(0,Q.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[a,(0,Q.jsx)(`span`,{className:`ml-auto rounded-full px-1.5 py-0.5 text-2xs font-medium`,style:{background:o,color:s},children:`3 prototypes`})]}),t[6]=o,t[7]=s,t[8]=c):c=t[8];let l;t[9]===n?l=t[10]:(l=(0,Q.jsx)(`div`,{className:`grid min-h-0 flex-1 grid-cols-3 gap-1`,children:i.map((e,t)=>{let r=e.state===`ready`;return(0,Q.jsxs)(hi,{className:`flex min-h-0 flex-col gap-1 p-1.5`,style:r?{background:ei(n,10),borderColor:ei(n,38)}:void 0,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Q.jsx)(`span`,{className:`size-1.5 rounded-full`,style:{background:r?`var(${n})`:ni(24)}}),(0,Q.jsx)(`span`,{className:`text-2xs font-medium`,style:{color:r?ti(n,62):ni(48)},children:e.name})]}),(0,Q.jsx)(gi,{children:r?`ready`:`building`}),(0,Q.jsx)(mi,{width:t%2==0?`78%`:`62%`,strength:14}),(0,Q.jsx)(mi,{width:t%2==0?`58%`:`74%`,strength:10}),(0,Q.jsxs)(hi,{className:`mt-auto flex min-h-0 flex-1 flex-col gap-1 border-dashed p-1`,children:[(0,Q.jsx)(mi,{width:`72%`,strength:12}),(0,Q.jsx)(mi,{width:`48%`,strength:8})]}),(0,Q.jsx)(`div`,{className:`h-1 overflow-hidden rounded-full`,style:{background:ni(8)},children:(0,Q.jsx)(`div`,{className:`h-full rounded-full`,style:{width:r?`100%`:`58%`,background:r?`var(${n})`:ei(n,34)}})})]},e.name)})}),t[9]=n,t[10]=l);let u;t[11]===n?u=t[12]:(u=ei(n,40),t[11]=n,t[12]=u);let d;t[13]===u?d=t[14]:(d={borderColor:u},t[13]=u,t[14]=d);let f;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Q.jsx)(`span`,{className:`text-2xs`,style:{color:ni(46)},children:`2 prototypes ready`}),t[15]=f):f=t[15];let p;t[16]===n?p=t[17]:(p=ti(n,62),t[16]=n,t[17]=p);let m;t[18]===p?m=t[19]:(m=(0,Q.jsx)(`span`,{className:`text-2xs font-medium`,style:{color:p},children:`→ compare side by side`}),t[18]=p,t[19]=m);let h;t[20]!==m||t[21]!==d?(h=(0,Q.jsxs)(`div`,{className:`flex items-center gap-1.5 rounded-md border border-dashed px-1.5 py-1`,style:d,children:[f,m]}),t[20]=m,t[21]=d,t[22]=h):h=t[22];let g;return t[23]!==h||t[24]!==c||t[25]!==l?(g=(0,Q.jsxs)(`div`,{className:`flex h-full flex-col gap-1.5 p-2`,children:[c,l,h]}),t[23]=h,t[24]=c,t[25]=l,t[26]=g):g=t[26],g}function Si(e){let t=(0,$.c)(27),{accentToken:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[{width:`76%`,kind:`bug`,cluster:`×4`,active:!0},{width:`58%`,kind:`question`,cluster:null,active:!1},{width:`68%`,kind:`bug`,cluster:`×2`,active:!1}],t[0]=r):r=t[0];let i=r,a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Q.jsx)(gi,{children:`Inbox`}),t[1]=a):a=t[1];let o;t[2]===n?o=t[3]:(o=ei(n,14),t[2]=n,t[3]=o);let s;t[4]===n?s=t[5]:(s=ti(n,62),t[4]=n,t[5]=s);let c;t[6]!==o||t[7]!==s?(c=(0,Q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[a,(0,Q.jsx)(`span`,{className:`ml-auto rounded-full px-1.5 py-0.5 text-2xs font-medium tabular-nums`,style:{background:o,color:s},children:`9 open`})]}),t[6]=o,t[7]=s,t[8]=c):c=t[8];let l;t[9]===n?l=t[10]:(l=i.map((e,t)=>(0,Q.jsxs)(hi,{className:`flex items-center gap-1.5`,style:e.active?{background:ei(n,10),borderColor:ei(n,38)}:void 0,children:[(0,Q.jsx)(`span`,{className:`rounded-sm px-1 py-0.5 text-2xs font-medium`,style:e.kind===`bug`?{background:ei(n,18),color:ti(n,62)}:{background:ni(7),color:ni(48)},children:e.kind}),(0,Q.jsx)(mi,{width:e.width,strength:e.active?22:14}),e.cluster===null?null:(0,Q.jsx)(`span`,{className:`ml-auto shrink-0 text-2xs tabular-nums`,style:{color:ni(40)},children:e.cluster})]},t)),t[9]=n,t[10]=l);let u;t[11]===n?u=t[12]:(u=ei(n,40),t[11]=n,t[12]=u);let d;t[13]===u?d=t[14]:(d={borderColor:u},t[13]=u,t[14]=d);let f;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Q.jsx)(`span`,{className:`font-mono text-2xs`,style:{color:ni(46)},children:`reply drafted`}),t[15]=f):f=t[15];let p;t[16]===n?p=t[17]:(p=ti(n,62),t[16]=n,t[17]=p);let m;t[18]===p?m=t[19]:(m=(0,Q.jsx)(`span`,{className:`text-2xs font-medium`,style:{color:p},children:`→ fix thread opened`}),t[18]=p,t[19]=m);let h;t[20]!==m||t[21]!==d?(h=(0,Q.jsxs)(`div`,{className:`mt-auto flex items-center gap-1.5 rounded-md border border-dashed px-1.5 py-1`,style:d,children:[f,m]}),t[20]=m,t[21]=d,t[22]=h):h=t[22];let g;return t[23]!==h||t[24]!==c||t[25]!==l?(g=(0,Q.jsxs)(`div`,{className:`flex h-full flex-col gap-1.5 p-2`,children:[c,l,h]}),t[23]=h,t[24]=c,t[25]=l,t[26]=g):g=t[26],g}var Ci={"kanban-board":_i,"live-dashboard":vi,"chief-of-staff":bi,"video-editor":yi,"prototyping-lab":xi,"support-inbox":Si},wi=[`MessageSquare`,`Folder`,`ListTodo`],Ti={ariaLabel:`What you can build with bb plugins`,headlineLead:`Turn bb into`,composingNoun:`whatever you need`,description:ai,tablistLabel:`Plugin examples`,frameTitlePrefix:`bb — `,frameBadge:`Plugin`},Ei={promptPrefix:Cr,placeholder:`Describe the plugin you want to build…`,draftKey:`plugins-browse-hero`};function Di(e){let t=(0,$.c)(6),{initialIndex:n,autoplay:r,composerDisabled:i,openRequest:a,onComposingChange:o}=e,s=n===void 0?0:n,c=r===void 0?!0:r,l=i===void 0?!1:i,u=a===void 0?null:a,d;return t[0]!==c||t[1]!==l||t[2]!==s||t[3]!==o||t[4]!==u?(d=(0,Q.jsx)(fi,{archetypes:Ar,scenes:Ci,copy:Ti,composer:Ei,rail:wi,initialIndex:s,autoplay:c,composerDisabled:l,openRequest:u,onComposingChange:o}),t[0]=c,t[1]=l,t[2]=s,t[3]=o,t[4]=u,t[5]=d):d=t[5],d}function Oi(e,t){let n=(0,$.c)(16),r=_(),i=st(),o;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={showErrorToast:!1},n[0]=o):o=n[0];let s;n[1]!==e||n[2]!==i?(s=t=>i(e.id,t),n[1]=e,n[2]=i,n[3]=s):s=n[3];let c;n[4]===e?c=n[5]:(c=(t,n)=>{Se.error(`${n?`Enabling`:`Disabling`} ${e.id} failed`,{description:t instanceof Error?t.message:String(t)})},n[4]=e,n[5]=c);let l;n[6]!==t||n[7]!==r?(l=async()=>{await Ke({queryClient:r}),await t?.()},n[6]=t,n[7]=r,n[8]=l):l=n[8];let u;n[9]!==s||n[10]!==c||n[11]!==l?(u={meta:o,mutationFn:s,onError:c,onSettled:l},n[9]=s,n[10]=c,n[11]=l,n[12]=u):u=n[12];let d=a(u),f=d.isPending?d.variables:e.enabled,p;return n[13]!==f||n[14]!==d?(p={toggle:d,enabled:f},n[13]=f,n[14]=d,n[15]=p):p=n[15],p}var ki={queued:`Queued`,running:`Installing…`,cancelling:`Cancelling…`};function Ai(e){let t=(0,$.c)(26),{displayName:n,job:r,onCancel:i}=e,a=r.state===`cancelling`,o=a?`Cancelling the ${n} install`:r.state===`queued`?`Waiting for another install to finish. Click to cancel.`:`Installing ${n}. Click to cancel.`,s=a?`Cancelling ${n} install`:`Cancel installing ${n}`,c=a?`cursor-not-allowed hover:bg-transparent`:`hover:text-destructive-text`,l;t[0]===c?l=t[1]:(l=X(`group/install h-7 min-w-7 shrink-0 gap-1.5 px-2 text-xs font-normal text-subtle-foreground shadow-none`,c),t[0]=c,t[1]=l);let u;t[2]!==a||t[3]!==i?(u=()=>{a||i()},t[2]=a,t[3]=i,t[4]=u):u=t[4];let d=!a&&`group-hover/install:opacity-0 group-focus-visible/install:opacity-0`,f;t[5]===d?f=t[6]:(f=X(`col-start-1 row-start-1 size-3.5 animate-spin`,d),t[5]=d,t[6]=f);let p;t[7]===f?p=t[8]:(p=(0,Q.jsx)(q,{name:`Spinner`,className:f}),t[7]=f,t[8]=p);let m;t[9]===a?m=t[10]:(m=a?null:(0,Q.jsx)(q,{name:`X`,className:`col-start-1 row-start-1 size-3.5 opacity-0 group-hover/install:opacity-100 group-focus-visible/install:opacity-100`}),t[9]=a,t[10]=m);let h;t[11]!==p||t[12]!==m?(h=(0,Q.jsxs)(`span`,{className:`grid place-items-center`,"aria-hidden":!0,children:[p,m]}),t[11]=p,t[12]=m,t[13]=h):h=t[13];let g=ki[r.state],_;t[14]!==a||t[15]!==s||t[16]!==g||t[17]!==l||t[18]!==u||t[19]!==h?(_=(0,Q.jsx)(de,{asChild:!0,children:(0,Q.jsxs)(ft,{type:`button`,variant:`ghost`,size:`sm`,"aria-disabled":a,"aria-label":s,className:l,onClick:u,children:[h,g]})}),t[14]=a,t[15]=s,t[16]=g,t[17]=l,t[18]=u,t[19]=h,t[20]=_):_=t[20];let v;t[21]===o?v=t[22]:(v=(0,Q.jsx)(O,{children:o}),t[21]=o,t[22]=v);let y;return t[23]!==_||t[24]!==v?(y=(0,Q.jsx)(Pt,{delayDuration:250,children:(0,Q.jsxs)(se,{children:[_,v]})}),t[23]=_,t[24]=v,t[25]=y):y=t[25],y}function ji(e){let t=(0,$.c)(46),{displayName:n,installed:r,count:i}=e;if(!e.installed&&e.installJob!==null){let{installJob:r,onCancelInstall:i}=e,a;t[0]!==r.id||t[1]!==i?(a=()=>i(r.id),t[0]=r.id,t[1]=i,t[2]=a):a=t[2];let o;return t[3]!==n||t[4]!==r||t[5]!==a?(o=(0,Q.jsx)(Ai,{displayName:n,job:r,onCancel:a}),t[3]=n,t[4]=r,t[5]=a,t[6]=o):o=t[6],o}let a=r&&e.included,o=r?a||e.onUninstall===void 0:e.disabled,s=a?`Included with BB`:r?`Installed`:o?e.unavailableReason??`Unavailable for this version of BB.`:`Install ${n}`,c=r?`Check`:o?`AlertTriangle`:`Download`,l=r||e.subtle?`ghost`:`outline`,u=`${r?`${n} installed`:`Install ${n}`}${i===void 0?``:` — ${i.accessibleLabel}`}`,d=r||e.subtle?`font-normal text-subtle-foreground`:`border-border/80 bg-background text-foreground hover:bg-state-hover`,f=r&&!o&&`hover:text-destructive-text`,p=o&&`cursor-not-allowed hover:bg-transparent hover:text-subtle-foreground`,m=r&&`opacity-50 hover:opacity-100 focus-visible:opacity-100`,h;t[7]!==d||t[8]!==f||t[9]!==p||t[10]!==m?(h=X(`group/install h-7 min-w-7 shrink-0 gap-1.5 px-2 text-xs shadow-none`,d,f,p,m),t[7]=d,t[8]=f,t[9]=p,t[10]=m,t[11]=h):h=t[11];let g;t[12]!==o||t[13]!==e?(g=()=>{o||(e.installed?e.onUninstall?.():e.onInstall())},t[12]=o,t[13]=e,t[14]=g):g=t[14];let _=i?.tone===`builtin`&&`hidden`,v;t[15]===_?v=t[16]:(v=X(`grid place-items-center`,_),t[15]=_,t[16]=v);let y=!r&&o&&`text-warning-text`,b=r&&!o&&`group-hover/install:opacity-0 group-focus-visible/install:opacity-0`,x;t[17]!==y||t[18]!==b?(x=X(`col-start-1 row-start-1 size-3.5`,y,b),t[17]=y,t[18]=b,t[19]=x):x=t[19];let S;t[20]!==c||t[21]!==x?(S=(0,Q.jsx)(q,{name:c,className:x}),t[20]=c,t[21]=x,t[22]=S):S=t[22];let C;t[23]!==o||t[24]!==r?(C=r&&!o?(0,Q.jsx)(q,{name:`Trash2`,className:`col-start-1 row-start-1 size-3.5 opacity-0 group-hover/install:opacity-100 group-focus-visible/install:opacity-100`}):null,t[23]=o,t[24]=r,t[25]=C):C=t[25];let w;t[26]!==S||t[27]!==C||t[28]!==v?(w=(0,Q.jsxs)(`span`,{className:v,"aria-hidden":!0,children:[S,C]}),t[26]=S,t[27]=C,t[28]=v,t[29]=w):w=t[29];let T=e.showLabel?r?`Installed`:`Install`:null,E;t[30]===i?E=t[31]:(E=i===void 0?null:(0,Q.jsx)(`span`,{"aria-hidden":!0,className:X(`text-2xs`,i.tone===`new`&&`font-semibold`),style:i.tone===`new`?Zn:void 0,children:i.display}),t[30]=i,t[31]=E);let D;t[32]!==o||t[33]!==l||t[34]!==u||t[35]!==w||t[36]!==T||t[37]!==E||t[38]!==h||t[39]!==g?(D=(0,Q.jsx)(de,{asChild:!0,children:(0,Q.jsxs)(ft,{type:`button`,variant:l,size:`sm`,"aria-disabled":o,"aria-label":u,className:h,onClick:g,children:[w,T,E]})}),t[32]=o,t[33]=l,t[34]=u,t[35]=w,t[36]=T,t[37]=E,t[38]=h,t[39]=g,t[40]=D):D=t[40];let k;t[41]===s?k=t[42]:(k=(0,Q.jsx)(O,{children:s}),t[41]=s,t[42]=k);let A;return t[43]!==D||t[44]!==k?(A=(0,Q.jsx)(Pt,{delayDuration:250,children:(0,Q.jsxs)(se,{children:[D,k]})}),t[43]=D,t[44]=k,t[45]=A):A=t[45],A}function Mi(e){let t=(0,$.c)(20),{entries:n,resetKey:r,onInstall:i,onUninstall:a,onOpenPlugin:o}=e,s;t[0]===r?s=t[1]:(s={pageSize:12,resetKey:r},t[0]=r,t[1]=s);let c=Ge(n,s),l;if(t[2]!==c.items||t[3]!==i||t[4]!==o||t[5]!==a){let e;t[7]!==i||t[8]!==o||t[9]!==a?(e=e=>(0,Q.jsx)(Pi,{entry:e,onInstall:i,onUninstall:a,onOpenPlugin:o},`${e.marketplace}/${e.entryId}`),t[7]=i,t[8]=o,t[9]=a,t[10]=e):e=t[10],l=c.items.map(e),t[2]=c.items,t[3]=i,t[4]=o,t[5]=a,t[6]=l}else l=t[6];let u;t[11]===l?u=t[12]:(u=(0,Q.jsx)(An,{children:l}),t[11]=l,t[12]=u);let d;t[13]!==c.hasMore||t[14]!==c.items.length||t[15]!==c.loadMore?(d=(0,Q.jsx)(Re,{itemCount:c.items.length,hasMore:c.hasMore,onLoadMore:c.loadMore}),t[13]=c.hasMore,t[14]=c.items.length,t[15]=c.loadMore,t[16]=d):d=t[16];let f;return t[17]!==u||t[18]!==d?(f=(0,Q.jsxs)(Q.Fragment,{children:[u,d]}),t[17]=u,t[18]=d,t[19]=f):f=t[19],f}function Ni(e){let t=(0,$.c)(7),{plugin:n,displayName:r}=e,{toggle:i,enabled:a}=Oi(n),o;t[0]===i?o=t[1]:(o=e=>i.mutate(e),t[0]=i,t[1]=o);let s=`${a?`Disable`:`Enable`} ${r}`,c;return t[2]!==a||t[3]!==o||t[4]!==s||t[5]!==i.isPending?(c=(0,Q.jsx)(cr,{checked:a,disabled:i.isPending,onCheckedChange:o,"aria-label":s}),t[2]=a,t[3]=o,t[4]=s,t[5]=i.isPending,t[6]=c):c=t[6],c}function Pi(e){let t=(0,$.c)(28),{entry:n,onInstall:r,onUninstall:i,onOpenPlugin:a}=e,o;t[0]===n?o=t[1]:(o=Ln(n),t[0]=n,t[1]=o);let s=o,c;t[2]===n?c=t[3]:(c=F(n),t[2]=n,t[3]=c);let l=c,u=mt(n),{mutate:d}=je(),f=Ft({enabled:n.installed}).data?.plugins.find(e=>e.id===n.pluginId),p;t[4]===n?p=t[5]:(p=(0,Q.jsx)(Xn,{entry:n,compact:!0}),t[4]=n,t[5]=p);let m=n.description||void 0,h;t[6]===n?h=t[7]:(h=(0,Q.jsx)(zn,{entry:n}),t[6]=n,t[7]=h);let g;t[8]!==d||t[9]!==s||t[10]!==n||t[11]!==l||t[12]!==u||t[13]!==f||t[14]!==r||t[15]!==i?(g=n.installed?(0,Q.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(ji,{displayName:n.displayName,installed:!0,subtle:!0,included:n.source.startsWith(`builtin:`),count:s,onUninstall:i===void 0?void 0:()=>i(n)}),f===void 0?null:(0,Q.jsx)(Ni,{plugin:f,displayName:n.displayName})]}):(0,Q.jsx)(ji,{displayName:n.displayName,installed:!1,subtle:!0,disabled:l!==null,unavailableReason:l,count:s,onInstall:()=>r(n),installJob:u,onCancelInstall:d}),t[8]=d,t[9]=s,t[10]=n,t[11]=l,t[12]=u,t[13]=f,t[14]=r,t[15]=i,t[16]=g):g=t[16];let _=`Open ${n.displayName} details`,v;t[17]!==n||t[18]!==a?(v=e=>a(_e(n),e),t[17]=n,t[18]=a,t[19]=v):v=t[19];let y;return t[20]!==n.displayName||t[21]!==p||t[22]!==m||t[23]!==h||t[24]!==g||t[25]!==_||t[26]!==v?(y=(0,Q.jsx)(or,{leading:p,title:n.displayName,description:m,byline:h,footerAction:g,openLabel:_,onOpen:v}),t[20]=n.displayName,t[21]=p,t[22]=m,t[23]=h,t[24]=g,t[25]=_,t[26]=v,t[27]=y):y=t[27],y}var Fi=[`name`,`recently-added`,`most-installed`],Ii={name:`Name`,"recently-added":`Published`,"most-installed":`Installs`},Li={name:{asc:`SortingAZ02`,desc:`SortingZA01`},"recently-added":{asc:`ClockArrowUp`,desc:`ClockArrowDown`},"most-installed":{asc:`SortingOneNine`,desc:`SortingNineOne`}},Ri={name:{asc:`A–Z`,desc:`Z–A`},"recently-added":{asc:`Oldest first`,desc:`Newest first`},"most-installed":{asc:`Fewest first`,desc:`Most first`}};function zi(e,t=null,n=`asc`){return Fi.map(r=>{let i=r===t?n:r===`name`?`asc`:`desc`;return{id:r,label:Ii[r],leading:(0,Q.jsx)(q,{name:Li[r][i],className:`size-4`}),disabled:r===`most-installed`&&!e}})}function Bi(e){let t=(0,$.c)(72),{query:n,selectedCategories:r,categoryOptions:i,showCategoryFilter:a,sort:o,sortDirection:s,installsKnown:c,changeSearchParams:l,searchPlaceholder:u,action:d,sourceFilter:f}=e,p=a===void 0?!0:a,m=u===void 0?`Search plugins`:u,h=Gi(n,l),g;t[0]!==c||t[1]!==o||t[2]!==s?(g=zi(c,o,s),t[0]=c,t[1]=o,t[2]=s,t[3]=g):g=t[3];let _;t[4]!==l||t[5]!==o||t[6]!==s?(_=e=>l(t=>{e===o?t.set(`direction`,s===`asc`?`desc`:`asc`):(t.set(`sort`,e),t.set(`direction`,e===`name`?`asc`:`desc`))}),t[4]=l,t[5]=o,t[6]=s,t[7]=_):_=t[7];let v;t[8]===l?v=t[9]:(v=()=>l(Ui),t[8]=l,t[9]=v);let y;t[10]!==o||t[11]!==s||t[12]!==g||t[13]!==_||t[14]!==v?(y={value:o,direction:s,compact:!0,clearInFooter:!0,showHeading:!1,placeholderLabel:`Default`,options:g,onChange:_,onClear:v},t[10]=o,t[11]=s,t[12]=g,t[13]=_,t[14]=v,t[15]=y):y=t[15];let b=y,x;t[16]===l?x=t[17]:(x=e=>l(t=>{t.delete(`category`);for(let n of e)t.append(`category`,n)}),t[16]=l,t[17]=x);let S;t[18]!==i||t[19]!==r||t[20]!==x?(S={value:r,options:i,onChange:x},t[18]=i,t[19]=r,t[20]=x,t[21]=S):S=t[21];let C=S,w,T,E,D,O;t[22]!==i||t[23]!==C||t[24]!==r||t[25]!==p||t[26]!==o||t[27]!==s||t[28]!==f?(E=f?{...f,label:`Source`,icon:`Download`,compact:!0,clearInFooter:!0,showHeading:!1}:null,w=o===null?`ArrowUpDown`:Li[o][s],T=o===null?`Default`:`${Ii[o]} · ${Ri[o][s]}`,t[34]!==i||t[35]!==C||t[36]!==r||t[37]!==p?(O=p?[{id:`category`,label:`Category`,icon:`SlidersHorizontal`,active:r.length>0,summary:i.filter(e=>r.includes(e.id)).map(Hi).join(`, `)||`All`,content:(0,Q.jsx)($i,{...C})}]:[],t[34]=i,t[35]=C,t[36]=r,t[37]=p,t[38]=O):O=t[38],D=E?[{id:`source`,label:`Source`,icon:E.icon,active:E.selectedValues.length>0,summary:E.options.filter(e=>E.selectedValues.includes(e.id)).map(Vi).join(`, `)||`All`,content:(0,Q.jsx)(Zt,{...E})}]:[],t[22]=i,t[23]=C,t[24]=r,t[25]=p,t[26]=o,t[27]=s,t[28]=f,t[29]=w,t[30]=T,t[31]=E,t[32]=D,t[33]=O):(w=t[29],T=t[30],E=t[31],D=t[32],O=t[33]);let k=o!==null,A;t[39]===b?A=t[40]:(A=(0,Q.jsx)(Gt,{...b}),t[39]=b,t[40]=A);let j;t[41]!==w||t[42]!==T||t[43]!==k||t[44]!==A?(j={id:`sort`,label:`Sort`,icon:w,active:k,summary:T,content:A},t[41]=w,t[42]=T,t[43]=k,t[44]=A,t[45]=j):j=t[45];let M;t[46]!==D||t[47]!==j||t[48]!==O?(M=[...O,...D,j],t[46]=D,t[47]=j,t[48]=O,t[49]=M):M=t[49];let N=M,P;t[50]!==C||t[51]!==p?(P=p?(0,Q.jsx)(Zi,{...C}):null,t[50]=C,t[51]=p,t[52]=P):P=t[52];let F;t[53]===E?F=t[54]:(F=E?(0,Q.jsx)(Kt,{...E,showLabel:!0}):null,t[53]=E,t[54]=F);let I=`Sort: ${T}`,L;t[55]!==w||t[56]!==b||t[57]!==I?(L=(0,Q.jsx)(pn,{...b,showLabel:!0,triggerIcon:w,tooltip:I}),t[55]=w,t[56]=b,t[57]=I,t[58]=L):L=t[58];let R;t[59]!==P||t[60]!==F||t[61]!==L?(R=(0,Q.jsxs)(Q.Fragment,{children:[P,F,L]}),t[59]=P,t[60]=F,t[61]=L,t[62]=R):R=t[62];let z;t[63]===N?z=t[64]:(z=N.length>1?(0,Q.jsx)(Ki,{pages:N}):void 0,t[63]=N,t[64]=z);let B;return t[65]!==d||t[66]!==h.change||t[67]!==h.value||t[68]!==m||t[69]!==R||t[70]!==z?(B=(0,Q.jsx)(`div`,{className:`w-full`,children:(0,Q.jsx)(Yt,{compact:!0,expandSearchOnFocus:!0,action:d,searchValue:h.value,searchLabel:m,searchPlaceholder:`Search plugins...`,onSearchChange:h.change,controls:R,combinedControls:z})}),t[65]=d,t[66]=h.change,t[67]=h.value,t[68]=m,t[69]=R,t[70]=z,t[71]=B):B=t[71],B}function Vi(e){return e.label}function Hi(e){return e.label}function Ui(e){e.delete(`sort`),e.delete(`direction`)}var Wi=200;function Gi(e,t){let n=(0,$.c)(11),[r,i]=(0,Z.useState)(e),a;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=[],n[0]=a):a=n[0];let o;n[1]===e?o=n[2]:(o={query:e,pending:a},n[1]=e,n[2]=o);let[s,c]=(0,Z.useState)(o),l=(0,Z.useRef)(null);if(e!==s.query){let t=s.pending.indexOf(e);c({query:e,pending:s.pending.slice(t+1)}),t===-1&&i(e)}let u;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>{l.current!==null&&(window.clearTimeout(l.current),l.current=null)},n[3]=u):u=n[3];let d=u,f,p;n[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=()=>d,p=[],n[4]=f,n[5]=p):(f=n[4],p=n[5]),(0,Z.useEffect)(f,p);let m;if(n[6]!==t){let e=e=>{d(),c(t=>({...t,pending:[...t.pending,e]})),t(t=>{e===``?t.delete(`query`):t.set(`query`,e)})};m=t=>{if(i(t),d(),t===``){e(t);return}l.current=window.setTimeout(()=>e(t),Wi)},n[6]=t,n[7]=m}else m=n[7];let h=m,g;return n[8]!==h||n[9]!==r?(g={value:r,change:h},n[8]=h,n[9]=r,n[10]=g):g=n[10],g}function Ki(e){let t=(0,$.c)(30),{pages:n}=e,[r,i]=(0,Z.useState)(!1),[a,o]=(0,Z.useState)(null),s=(0,Z.useRef)(null),c=(0,Z.useRef)(null),l;if(t[0]!==a||t[1]!==n){let e;t[3]===a?e=t[4]:(e=e=>e.id===a,t[3]=a,t[4]=e),l=n.find(e),t[0]=a,t[1]=n,t[2]=l}else l=t[2];let u=l,d=n.filter(Ji).map(qi),f,p;t[5]!==r||t[6]!==a?(f=()=>{if(!r)return;let e=requestAnimationFrame(()=>{let e=s.current;a?e?.querySelector(`input, [role="menuitemradio"], [role="menuitemcheckbox"]`)?.focus():c.current&&e?.querySelector(`[data-control-page="${c.current}"]`)?.closest(`[role="menuitem"]`)?.focus()});return()=>cancelAnimationFrame(e)},p=[r,a],t[5]=r,t[6]=a,t[7]=f,t[8]=p):(f=t[7],p=t[8]),(0,Z.useEffect)(f,p);let m=z,h;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(h=e=>{i(e),e||(o(null),c.current=null)},t[9]=h):h=t[9];let g=et,_=wn,v=d.length?d.join(`; `):`Filter & sort`,y=d.length>0,b;t[10]!==_||t[11]!==r||t[12]!==v||t[13]!==y?(b=(0,Q.jsx)(_,{label:`Filter & sort`,tooltip:v,icon:`FilterHorizontal`,active:y,open:r}),t[10]=_,t[11]=r,t[12]=v,t[13]=y,t[14]=b):b=t[14];let x;t[15]!==g||t[16]!==b?(x=(0,Q.jsx)(g,{asChild:!0,children:b}),t[15]=g,t[16]=b,t[17]=x):x=t[17];let S=u?.label??`Filter & sort`,C;t[18]!==u||t[19]!==n?(C=u?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(K,{onSelect:e=>{e.preventDefault(),c.current=u.id,o(null)},children:[(0,Q.jsx)(q,{name:`ChevronLeft`,className:`size-4`}),`Filter & sort`]}),(0,Q.jsx)(He,{}),u.content]}):n.map(e=>(0,Q.jsxs)(K,{onSelect:t=>{t.preventDefault(),o(e.id)},children:[e.icon?(0,Q.jsx)(q,{name:e.icon,className:`size-4`}):null,(0,Q.jsx)(`span`,{"data-control-page":e.id,className:`shrink-0`,children:e.label}),(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-right text-2xs text-muted-foreground`,title:e.summary,children:e.summary}),(0,Q.jsx)(q,{name:`ChevronRight`,className:`size-4`})]},e.id)),t[18]=u,t[19]=n,t[20]=C):C=t[20];let w;t[21]!==S||t[22]!==C?(w=(0,Q.jsx)(be,{ref:s,align:`end`,mobileTitle:S,className:`w-72 md:p-0.5`,children:C}),t[21]=S,t[22]=C,t[23]=w):w=t[23];let T;return t[24]!==m||t[25]!==r||t[26]!==x||t[27]!==w||t[28]!==h?(T=(0,Q.jsxs)(m,{open:r,onOpenChange:h,children:[x,w]}),t[24]=m,t[25]=r,t[26]=x,t[27]=w,t[28]=h,t[29]=T):T=t[29],T}function qi(e){return`${e.label}: ${e.summary}`}function Ji(e){return e.active}var Yi=600;function Xi(e){let t=(0,$.c)(6),{enabled:n}=e,r=n?`enabled`:`disabled`,i=n?`border-foreground bg-foreground text-background`:`border-input bg-background text-transparent`,a;t[0]===i?a=t[1]:(a=X(`grid size-4 shrink-0 place-items-center rounded-sm border shadow-xs`,i),t[0]=i,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Q.jsx)(q,{name:`Check`,className:`size-3.5`}),t[2]=o):o=t[2];let s;return t[3]!==r||t[4]!==a?(s=(0,Q.jsx)(`span`,{"data-category-option-checkbox":!0,"data-state":r,className:a,"aria-hidden":!0,children:o}),t[3]=r,t[4]=a,t[5]=s):s=t[5],s}function Zi(e){let t=(0,$.c)(20),{options:n,value:r}=e,[i,a]=(0,Z.useState)(!1),o;if(t[0]!==n||t[1]!==r){let e;t[3]===n?e=t[4]:(e=e=>{let t=n.find(t=>t.id===e);return t===void 0?[]:[t]},t[3]=n,t[4]=e);let i=r.flatMap(e);o=i.length===0?`All categories`:i.map(Qi).join(`, `),t[0]=n,t[1]=r,t[2]=o}else o=t[2];let s=o,c=`Filter plugins by category: ${s}`,l=`Category: ${s}`,u=r.length>0,d;t[5]!==i||t[6]!==c||t[7]!==l||t[8]!==u||t[9]!==r.length?(d=(0,Q.jsx)(W,{asChild:!0,children:(0,Q.jsx)(wn,{label:c,text:`Category`,tooltip:l,icon:`SlidersHorizontal`,count:r.length,trailingIcon:`ChevronDown`,active:u,open:i})}),t[5]=i,t[6]=c,t[7]=l,t[8]=u,t[9]=r.length,t[10]=d):d=t[10];let f;t[11]!==i||t[12]!==e?(f=i?(0,Q.jsx)($i,{...e}):null,t[11]=i,t[12]=e,t[13]=f):f=t[13];let p;t[14]===f?p=t[15]:(p=(0,Q.jsx)(U,{align:`end`,mobileTitle:`Filter plugins by category`,className:`w-72 p-1.5 md:p-0.5`,children:f}),t[14]=f,t[15]=p);let m;return t[16]!==i||t[17]!==d||t[18]!==p?(m=(0,Q.jsxs)(w,{open:i,onOpenChange:a,children:[d,p]}),t[16]=i,t[17]=d,t[18]=p,t[19]=m):m=t[19],m}function Qi(e){return e.label}function $i(e){let t=(0,$.c)(43),{options:n,value:r,onChange:i}=e,[a,o]=(0,Z.useState)(!1),s;t[0]===r?s=t[1]:(s=new Set(r),t[0]=r,t[1]=s);let c=s,[l,u]=(0,Z.useState)(null),d=l!==null,f;t[2]===d?f=t[3]:(f={enabled:d,measureOverflow:!0},t[2]=d,t[3]=f);let{scrollRef:p,topSentinelRef:m,bottomSentinelRef:h,belowOverflow:g}=Wt(f),_;t[4]===p?_=t[5]:(_=e=>{p.current=e,u(e)},t[4]=p,t[5]=_);let v=_,y=(0,Z.useRef)(null),b,x;t[6]===p?(b=t[7],x=t[8]):(b=()=>{let e=requestAnimationFrame(()=>ta(p.current)[0]?.focus());return()=>cancelAnimationFrame(e)},x=[p],t[6]=p,t[7]=b,t[8]=x),(0,Z.useEffect)(b,x);let S,C;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>()=>{y.current!==null&&window.clearTimeout(y.current)},C=[],t[9]=S,t[10]=C):(S=t[9],C=t[10]),(0,Z.useEffect)(S,C);let w;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>{o(!0),y.current!==null&&window.clearTimeout(y.current),y.current=window.setTimeout(()=>{y.current=null,o(!1)},Yi)},t[11]=w):w=t[11];let T=w,E;t[12]===i?E=t[13]:(E=()=>{i([])},t[12]=i,t[13]=E);let D=E,O;t[14]!==i||t[15]!==r?(O=e=>{let t=new Set(r);t.has(e)?t.delete(e):t.add(e),i([...t])},t[14]=i,t[15]=r,t[16]=O):O=t[16];let k=O,A=a?`true`:void 0,j;t[17]===m?j=t[18]:(j=(0,Q.jsx)(`div`,{ref:m,"aria-hidden":!0,className:`h-px w-full`}),t[17]=m,t[18]=j);let M;t[19]!==l||t[20]!==n||t[21]!==c||t[22]!==k?(M=n.length===0?(0,Q.jsx)(`p`,{className:`px-2 py-6 text-center text-xs text-muted-foreground`,role:`status`,children:`No categories are available.`}):n.map(e=>(0,Q.jsxs)(`button`,{type:`button`,role:`option`,"aria-label":`${e.label}, ${e.count.toLocaleString()} ${e.count===1?`plugin`:`plugins`}`,"aria-selected":c.has(e.id),onClick:()=>k(e.id),className:`flex w-full items-center gap-2 rounded-sm px-1.5 py-1 text-left text-xs outline-none hover:bg-state-hover focus-visible:bg-state-hover focus-visible:text-foreground md:gap-1.5`,onKeyDown:e=>ea(e,l),children:[(0,Q.jsx)(`span`,{className:`flex w-8 shrink-0 justify-center`,children:(0,Q.jsx)(`span`,{"data-category-option-count":!0,className:`rounded-full bg-surface-recessed p-1.5 text-center text-2xs font-medium leading-none tabular-nums text-subtle-foreground`,children:e.count.toLocaleString()})}),(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-medium text-foreground`,children:e.label}),(0,Q.jsx)(Xi,{enabled:c.has(e.id)})]},e.id)),t[19]=l,t[20]=n,t[21]=c,t[22]=k,t[23]=M):M=t[23];let N;t[24]===h?N=t[25]:(N=(0,Q.jsx)(`div`,{ref:h,"aria-hidden":!0,className:`h-px w-full`}),t[24]=h,t[25]=N);let P;t[26]!==v||t[27]!==A||t[28]!==j||t[29]!==M||t[30]!==N?(P=(0,Q.jsxs)(`div`,{ref:v,"data-scrollbar-scrolling":A,role:`listbox`,"aria-label":`Plugin categories`,"aria-multiselectable":!0,className:`transient-scrollbar max-h-64 overflow-y-auto`,onScroll:T,children:[j,M,N]}),t[26]=v,t[27]=A,t[28]=j,t[29]=M,t[30]=N,t[31]=P):P=t[31];let F;t[32]===g?F=t[33]:(F=g?(0,Q.jsx)(`div`,{"aria-hidden":!0,"data-category-list-fade":`below`,className:`pointer-events-none absolute inset-x-0 bottom-0 z-10 h-8 bg-gradient-to-t from-popover/90 via-popover/60 to-transparent`}):null,t[32]=g,t[33]=F);let I;t[34]!==P||t[35]!==F?(I=(0,Q.jsxs)(`div`,{className:`relative isolate`,children:[P,F]}),t[34]=P,t[35]=F,t[36]=I):I=t[36];let L=r.length===0,R;t[37]!==D||t[38]!==L?(R=(0,Q.jsx)(`div`,{className:`mt-0.5 border-t border-border-seam pt-0.5`,children:(0,Q.jsx)(`button`,{type:`button`,disabled:L,onClick:D,className:`flex w-full items-center rounded-sm px-2 py-1 text-left text-xs text-muted-foreground outline-none hover:bg-state-hover hover:text-foreground focus-visible:bg-state-hover focus-visible:text-foreground disabled:pointer-events-none disabled:opacity-50`,children:`Clear filter`})}),t[37]=D,t[38]=L,t[39]=R):R=t[39];let z;return t[40]!==I||t[41]!==R?(z=(0,Q.jsxs)(Q.Fragment,{children:[I,R]}),t[40]=I,t[41]=R,t[42]=z):z=t[42],z}function ea(e,t){let n=ta(t),r=n.indexOf(e.currentTarget);if(r<0)return;let i=null;e.key===`ArrowDown`?i=Math.min(r+1,n.length-1):e.key===`ArrowUp`?i=Math.max(r-1,0):e.key===`Home`?i=0:e.key===`End`&&(i=n.length-1),i!==null&&(e.preventDefault(),e.stopPropagation(),n[i]?.focus())}function ta(e){return e===null?[]:[...e.querySelectorAll(`[role="option"]`)]}var na=6;function ra(e){let n=(0,$.c)(103),{onInstall:r,onUninstall:i,onOpenPlugin:a,onInstallFromSource:o}=e,s=ve(),{searchParams:c,query:l,requestedSort:u,sortDirection:d,selectedCategories:f,changeSearchParams:p}=kr(),m,h;n[0]===c?(m=n[1],h=n[2]):(m=c.get(`shelf`),h=m?.startsWith(`category:`)??!1,n[0]=c,n[1]=m,n[2]=h);let g=h,_;n[3]===c?_=n[4]:(_=c.get(`view`),n[3]=c,n[4]=_);let v=_===`create`,y;n[5]===v?y=n[6]:(y=()=>v?{nonce:Pr()}:null,n[5]=v,n[6]=y);let[b,x]=(0,Z.useState)(y),[S,C]=(0,Z.useState)(v),[w,T]=(0,Z.useState)(!1),D;n[7]===l?D=n[8]:(D=l.trim(),n[7]=l,n[8]=D);let O=D,k;n[9]===Symbol.for(`react.memo_cache_sentinel`)?(k={enabled:!0},n[9]=k):k=n[9];let A=Pe(O,k),j;n[10]===Symbol.for(`react.memo_cache_sentinel`)?(j={enabled:!0},n[10]=j):j=n[10];let M=Pe(``,j),N=m===null?A:M,P;n[11]===N.data?P=n[12]:(P=N.data??{entries:[],collections:[],categories:[]},n[11]=N.data,n[12]=P);let F=P,I;n[13]===F.entries?I=n[14]:(I=F.entries.filter(ca),n[13]=F.entries,n[14]=I);let R=I,z=R.length>0&&(N.isRefetchError||A.isRefetchError),B=(0,Z.useRef)(!1),ee,te;n[15]===z?(ee=n[16],te=n[17]):(te=()=>{z&&!B.current&&Se.warning(`Couldn’t refresh plugins.`),B.current=z},ee=[z],n[15]=z,n[16]=ee,n[17]=te),(0,Z.useEffect)(te,ee);let V;n[18]!==F.categories||n[19]!==F.collections||n[20]!==R||n[21]!==m?(V=m===null?void 0:E({entries:R,collections:F.collections,categories:F.categories}).find(e=>e.key===m),n[18]=F.categories,n[19]=F.collections,n[20]=R,n[21]=m,n[22]=V):V=n[22];let H=V,U;n[23]!==R||n[24]!==H?.entries||n[25]!==m?(U=m===null?R:H?.entries??[],n[23]=R,n[24]=H?.entries,n[25]=m,n[26]=U):U=n[26];let W=U,G;n[27]===W?G=n[28]:(G=W.some(sa),n[27]=W,n[28]=G);let ne=G,K=u===`most-installed`&&!ne?null:u,re;n[29]!==F.categories||n[30]!==f||n[31]!==W?(re=L(W,f,F.categories),n[29]=F.categories,n[30]=f,n[31]=W,n[32]=re):re=n[32];let J=re,Y;n[33]!==A.data?.entries||n[34]!==f||n[35]!==W||n[36]!==m||n[37]!==O?(Y=()=>{let e=new Set(f),t=m!==null&&O!==``?new Set(A.data?.entries.map(oa)):null;return W.filter(n=>(e.size===0||e.has(me(n)))&&(t===null||t.has(`${n.marketplace}/${n.entryId}`)))},n[33]=A.data?.entries,n[34]=f,n[35]=W,n[36]=m,n[37]=O,n[38]=Y):Y=n[38],A.data?.entries;let ae;n[39]===Y?ae=n[40]:(ae=Y(),n[39]=Y,n[40]=ae);let oe=ae,se=K===null&&m===null&&f.length===0,ce;n[41]!==M.data?.categories||n[42]!==M.data?.collections||n[43]!==M.data?.entries||n[44]!==se?(ce=se?E({entries:(M.data?.entries??[]).filter(aa),collections:M.data?.collections??[],categories:M.data?.categories??[]}):[],n[41]=M.data?.categories,n[42]=M.data?.collections,n[43]=M.data?.entries,n[44]=se,n[45]=ce):ce=n[45];let le=ce,ue;n[46]!==oe||n[47]!==K||n[48]!==d?(ue=K===null?oe:pe(oe,K,d),n[46]=oe,n[47]=K,n[48]=d,n[49]=ue):ue=n[49];let de=ue,fe;if(n[50]!==c){let e=new URLSearchParams(c);e.delete(`shelf`),fe=e.toString(),n[50]=c,n[51]=fe}else fe=n[51];let he=fe,ge;n[52]===Symbol.for(`react.memo_cache_sentinel`)?(ge=e=>x({nonce:Pr(),...e===void 0?{}:{seed:e}}),n[52]=ge):ge=n[52];let _e=ge,ye;n[53]!==p||n[54]!==v?(ye=e=>{e===void 0?v||p(ia,!1):_e(e)},n[53]=p,n[54]=v,n[55]=ye):ye=n[55];let be;n[56]!==o||n[57]!==ye?(be=(0,Q.jsx)(zr,{onCreate:ye,onInstallFromSource:o}),n[56]=o,n[57]=ye,n[58]=be):be=n[58];let xe=be;S!==v&&(C(v),x({nonce:Pr(),...v?{}:{close:!0}}));let we,Te;n[59]===b?(we=n[60],Te=n[61]):(we=()=>{b!==null&&document.getElementById(`plugins-browse-results`)?.scrollTo?.({top:0,behavior:window.matchMedia(`(prefers-reduced-motion: reduce)`).matches?`auto`:`smooth`})},Te=[b],n[59]=b,n[60]=we,n[61]=Te),(0,Z.useEffect)(we,Te);let Ee=m??`browse`,De;n[62]===Symbol.for(`react.memo_cache_sentinel`)?(De=X(`space-y-7 pb-8`,ie),n[62]=De):De=n[62];let Oe;n[63]!==he||n[64]!==w||n[65]!==xe||n[66]!==b||n[67]!==s||n[68]!==H||n[69]!==m?(Oe=m===null?(0,Q.jsxs)(Q.Fragment,{children:[s?(0,Q.jsx)(fn,{children:ai}):(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,Q.jsx)(Xr,{}),xe]}),(0,Q.jsx)(`div`,{className:X(!w&&s&&`hidden`),children:(0,Q.jsx)(Di,{openRequest:b,onComposingChange:T})})]}):(0,Q.jsxs)(`div`,{className:`w-full space-y-2`,children:[(0,Q.jsxs)(t,{to:{pathname:Ce(),search:he},className:`-ml-1 inline-flex items-center gap-1 rounded-sm px-1 text-xs text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:[(0,Q.jsx)(q,{name:`ChevronLeft`,className:`size-3`,"aria-hidden":!0}),`Browse plugins`]}),H===void 0?null:(0,Q.jsxs)(`h1`,{className:`flex flex-wrap items-center gap-2 text-xl font-semibold text-foreground`,children:[(0,Q.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-2`,children:[H.key.startsWith(`category:`)?(0,Q.jsx)(er,{categoryId:H.categoryId,className:`size-5`}):null,H.label]}),` `,(0,Q.jsxs)(`span`,{className:`rounded-md bg-muted px-2 py-1 text-2xs font-medium tabular-nums text-subtle-foreground`,children:[H.entries.length.toLocaleString(),` `,H.entries.length===1?`plugin`:`plugins`]})]})]}),n[63]=he,n[64]=w,n[65]=xe,n[66]=b,n[67]=s,n[68]=H,n[69]=m,n[70]=Oe):Oe=n[70];let ke;n[71]!==N||n[72]!==J||n[73]!==p||n[74]!==w||n[75]!==xe||n[76]!==R.length||n[77]!==oe||n[78]!==de||n[79]!==ne||n[80]!==g||n[81]!==s||n[82]!==r||n[83]!==a||n[84]!==i||n[85]!==l||n[86]!==c||n[87]!==A||n[88]!==f||n[89]!==H||n[90]!==m||n[91]!==le||n[92]!==se||n[93]!==K||n[94]!==d||n[95]!==O?(ke=w&&m===null?(0,Q.jsx)(ii,{onCreate:_e}):(0,Q.jsxs)(`section`,{className:`space-y-6 [--resource-source-shelf-header-inset:calc(var(--spacing)*3)] [--resource-source-shelf-inset:0px]`,children:[(0,Q.jsx)(Bi,{query:l,selectedCategories:f,categoryOptions:J,showCategoryFilter:!g,sort:K,sortDirection:d,installsKnown:ne,changeSearchParams:p,action:s&&m===null?xe:void 0}),N.isPending||m!==null&&O!==``&&A.isPending?(0,Q.jsx)(En,{state:`loading`,message:`Loading plugins`}):N.isError&&R.length===0?(0,Q.jsx)(En,{state:`error`,message:`The plugin catalog is not available.`,onRetry:()=>void N.refetch()}):m!==null&&H===void 0?(0,Q.jsx)(En,{state:`empty`,message:`Shelf not found.`}):R.length===0?(0,Q.jsx)(En,{state:`empty`,message:`No plugins match this search.`}):A.isError&&A.data===void 0?(0,Q.jsx)(En,{state:`error`,message:`The plugin search is not available.`,onRetry:()=>void A.refetch()}):oe.length===0?(0,Q.jsx)(En,{state:`empty`,message:`No plugins match these category filters.`}):se&&O===``?null:(0,Q.jsx)(Mi,{resetKey:c.toString(),entries:de,onInstall:r,onUninstall:i,onOpenPlugin:a}),le.length>0?(0,Q.jsx)(`div`,{className:`space-y-8`,"data-testid":`plugin-browse-shelves`,hidden:O!==``,children:le.map(e=>(0,Q.jsx)(la,{shelf:e,onInstall:r,onUninstall:i,onOpenPlugin:a},e.key))}):null]}),n[71]=N,n[72]=J,n[73]=p,n[74]=w,n[75]=xe,n[76]=R.length,n[77]=oe,n[78]=de,n[79]=ne,n[80]=g,n[81]=s,n[82]=r,n[83]=a,n[84]=i,n[85]=l,n[86]=c,n[87]=A,n[88]=f,n[89]=H,n[90]=m,n[91]=le,n[92]=se,n[93]=K,n[94]=d,n[95]=O,n[96]=ke):ke=n[96];let Ae;n[97]!==Oe||n[98]!==ke?(Ae=(0,Q.jsxs)(`div`,{className:De,children:[Oe,ke]}),n[97]=Oe,n[98]=ke,n[99]=Ae):Ae=n[99];let je;return n[100]!==Ee||n[101]!==Ae?(je=(0,Q.jsx)(dn,{scrollId:`plugins-browse-results`,contentClassName:`[&>div]:block!`,children:Ae},Ee),n[100]=Ee,n[101]=Ae,n[102]=je):je=n[102],je}function ia(e){return e.set(`view`,`create`)}function aa(e){return e.compatible}function oa(e){return`${e.marketplace}/${e.entryId}`}function sa(e){return e.installs!==null}function ca(e){return e.compatible}function la(e){let n=(0,$.c)(41),{shelf:i,onInstall:a,onUninstall:o,onOpenPlugin:s}=e,[c]=r(),l,u,d,f,p,m,h,g,_,v;if(n[0]!==a||n[1]!==s||n[2]!==o||n[3]!==c||n[4]!==i.categoryId||n[5]!==i.description||n[6]!==i.entries||n[7]!==i.key||n[8]!==i.label){let e=new URLSearchParams(c);e.set(`shelf`,i.key);let r=i.entries.slice(0,na);l=_n,m=i.label,h=i.description,g=!0,n[19]!==i.categoryId||n[20]!==i.key?(_=i.key===`collection:bb-official`?(0,Q.jsx)(`span`,{className:`size-4 shrink-0 bg-current text-foreground`,style:{mask:`url(${qn}) center / contain no-repeat`},"aria-hidden":!0}):i.key===`collection:new-and-notable`?(0,Q.jsx)(q,{name:`News01`,className:`size-4 text-foreground`,"aria-hidden":!0}):(0,Q.jsx)(er,{categoryId:i.categoryId,className:`size-4`}),n[19]=i.categoryId,n[20]=i.key,n[21]=_):_=n[21],v=i.entries.length>2?(0,Q.jsx)(rn,{asChild:!0,className:X(`underline underline-offset-4`,i.entries.length<=na&&`@min-[40rem]/resource-shelf:hidden`),children:(0,Q.jsx)(t,{to:{pathname:Ce(),search:e.toString()},"aria-label":`View all ${i.label}`,children:`View all`})}):void 0,p=!0,u=!0,d=`grid gap-2 @max-[40rem]/resource-shelf:[&>*:nth-child(n+3)]:hidden`;let y;n[22]!==a||n[23]!==s||n[24]!==o?(y=e=>(0,Q.jsx)(Pi,{entry:e,onInstall:a,onUninstall:o,onOpenPlugin:s},`${e.marketplace}/${e.entryId}`),n[22]=a,n[23]=s,n[24]=o,n[25]=y):y=n[25],f=r.map(y),n[0]=a,n[1]=s,n[2]=o,n[3]=c,n[4]=i.categoryId,n[5]=i.description,n[6]=i.entries,n[7]=i.key,n[8]=i.label,n[9]=l,n[10]=u,n[11]=d,n[12]=f,n[13]=p,n[14]=m,n[15]=h,n[16]=g,n[17]=_,n[18]=v}else l=n[9],u=n[10],d=n[11],f=n[12],p=n[13],m=n[14],h=n[15],g=n[16],_=n[17],v=n[18];let y;n[26]!==u||n[27]!==d||n[28]!==f?(y=(0,Q.jsx)(`div`,{"data-plugin-shelf-grid":u,className:d,children:f}),n[26]=u,n[27]=d,n[28]=f,n[29]=y):y=n[29];let b;n[30]!==y||n[31]!==p?(b=(0,Q.jsx)(`div`,{"data-plugin-shelf":p,children:y}),n[30]=y,n[31]=p,n[32]=b):b=n[32];let x;return n[33]!==l||n[34]!==b||n[35]!==m||n[36]!==h||n[37]!==g||n[38]!==_||n[39]!==v?(x=(0,Q.jsx)(l,{label:m,description:h,hideDescriptionWhenNarrow:g,leading:_,browseAction:v,children:b}),n[33]=l,n[34]=b,n[35]=m,n[36]=h,n[37]=g,n[38]=_,n[39]=v,n[40]=x):x=n[40],x}function ua(e){let t=(0,$.c)(7),{title:n,children:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(q,{name:`AlertTriangle`,className:`mt-0.5 size-4 shrink-0`,"aria-hidden":!0}),t[0]=i):i=t[0];let a;t[1]===n?a=t[2]:(a=(0,Q.jsxs)(`h2`,{className:`flex items-start gap-2 font-medium text-warning-text`,children:[i,n]}),t[1]=n,t[2]=a);let o;return t[3]!==r||t[4]!==a||t[5]!==n?(o=(0,Q.jsxs)(`section`,{"aria-label":n,className:`min-w-0 space-y-2 rounded-lg border border-warning-text/30 bg-warning-text/5 p-3 text-sm [overflow-wrap:anywhere]`,children:[a,r]}),t[3]=r,t[4]=a,t[5]=n,t[6]=o):o=t[6],o}var da={starting:{icon:`Clock`,label:`Starting`,tone:`muted`},running:null,error:{icon:`CircleX`,label:`Failed`,tone:`error`},incompatible:{icon:`AlertCircle`,label:`Incompatible`,tone:`error`},missing:{icon:`FileQuestion`,label:`Missing`,tone:`error`},disabled:null,"needs-configuration":{icon:`Settings`,label:`Needs configuration`,tone:`warning`},degraded:{icon:`AlertTriangle`,label:`Degraded`,tone:`warning`}};function fa(e){return/\bconfigured\b.*\b(directory|folder|path)\b/iu.test(e.statusDetail??``)}function pa(e){switch(e.status){case`error`:return fa(e)?`Check the path, then reload.`:e.source.startsWith(`path:`)?`Fix the plugin, then reload.`:`Try reloading it.`;case`incompatible`:return e.provenance===`builtin`?`Update bb.`:`Install a compatible version.`;case`missing`:return e.source.startsWith(`path:`)?`Restore the folder, then reload.`:e.provenance===`builtin`?`Update or reinstall bb.`:`Reinstall from its source.`;case`needs-configuration`:return e.hasSettings?``:`Then reload.`;case`degraded`:return`Wait, then reload.`;default:return``}}function ma(e){switch(e.status){case`starting`:return`The plugin is starting.`;case`error`:return fa(e)?`Configured folder unavailable.`:`The plugin couldn't start.`;case`incompatible`:return`This version is incompatible with bb.`;case`missing`:return`Plugin files are missing.`;case`needs-configuration`:{let t=e.statusDetail?.trim();return t&&t.length<=60?t:`Complete the required settings.`}case`degraded`:return`A service is still stopping.`;default:return``}}function ha(e){let t=da[e.status];return t===null?null:{...t,condition:ma(e),recovery:pa(e)}}function ga(e){let t=e.updateState;if(t.lastFailure!==null)return{kind:`status`,icon:`RotateCcw`,label:`Update failed`,tone:`error`,detail:t.lastFailure.detail.length>0?t.lastFailure.detail:`Update to ${t.lastFailure.version} failed and was rolled back.`};let n=ha(e);return n===null?t.outcome===`unavailable`?{kind:`status`,icon:`AlertTriangle`,label:`Needs attention`,tone:`warning`,detail:t.detail}:t.availableVersion===null?null:{kind:`update`,version:t.availableVersion}:{kind:`status`,icon:n.icon,label:n.label,tone:n.tone,detail:e.statusDetail}}function _a(e){let t=(0,$.c)(16),{plugins:n,onOpenPlugin:r}=e,i,a,o,s,c;if(t[0]!==r||t[1]!==n){c=Symbol.for(`react.early_return_sentinel`);bb0:{let e=J(n);if(e.length===0){c=null;break bb0}i=ua,s=e.length===1?`1 plugin isn’t running`:`${e.length} plugins aren’t running`,a=`space-y-2`;let l;t[7]===r?l=t[8]:(l=e=>{let t=ha(e);return(0,Q.jsxs)(`li`,{className:`flex items-center gap-3`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`p`,{className:`font-medium`,children:e.name??e.id}),(0,Q.jsx)(`p`,{className:`line-clamp-2 text-xs text-muted-foreground`,children:t?.condition})]}),(0,Q.jsx)(ft,{variant:`ghost`,size:`sm`,className:`shrink-0`,onClick:t=>r(e.id,t.currentTarget),"aria-label":`View details for ${e.name??e.id}`,children:`View details`})]},e.id)},t[7]=r,t[8]=l),o=e.map(l)}t[0]=r,t[1]=n,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c}else i=t[2],a=t[3],o=t[4],s=t[5],c=t[6];if(c!==Symbol.for(`react.early_return_sentinel`))return c;let l;t[9]!==a||t[10]!==o?(l=(0,Q.jsx)(`ul`,{className:a,children:o}),t[9]=a,t[10]=o,t[11]=l):l=t[11];let u;return t[12]!==i||t[13]!==s||t[14]!==l?(u=(0,Q.jsx)(i,{title:s,children:l}),t[12]=i,t[13]=s,t[14]=l,t[15]=u):u=t[15],u}function va(e){let t=(0,$.c)(6),{children:n,signal:r,onStatusClick:i}=e,a;t[0]!==i||t[1]!==r?(a=r?(0,Q.jsx)(`span`,{className:`absolute -bottom-1 -right-1`,children:(0,Q.jsx)(ba,{signal:r,statusPresentation:`badge`,onUpdateClick:ya,onStatusClick:i})}):null,t[0]=i,t[1]=r,t[2]=a):a=t[2];let o;return t[3]!==n||t[4]!==a?(o=(0,Q.jsxs)(`span`,{className:`relative flex size-6 items-center justify-center`,children:[n,a]}),t[3]=n,t[4]=a,t[5]=o):o=t[5],o}function ya(){}function ba(e){let t=(0,$.c)(27),{signal:n,onUpdateClick:r,onStatusClick:i,statusPresentation:a}=e,o=a===void 0?`standalone`:a;if(n.kind===`update`){let e=Wn(n.version)?n.version:null,i=e===null?`Update available`:`Update to ${e}`,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Q.jsx)(q,{name:yr,className:`size-4`,"aria-hidden":!0}),t[0]=a):a=t[0];let o;t[1]!==r||t[2]!==i?(o=(0,Q.jsx)(de,{asChild:!0,children:(0,Q.jsx)(ft,{type:`button`,variant:`ghost`,size:`icon`,className:`size-7 shrink-0 rounded-full`,style:Vn,"aria-label":i,onClick:r,children:a})}),t[1]=r,t[2]=i,t[3]=o):o=t[3];let s;t[4]===i?s=t[5]:(s=(0,Q.jsx)(O,{children:i}),t[4]=i,t[5]=s);let c;return t[6]!==o||t[7]!==s?(c=(0,Q.jsx)(Pt,{delayDuration:250,children:(0,Q.jsxs)(se,{children:[o,s]})}),t[6]=o,t[7]=s,t[8]=c):c=t[8],c}let s=n.detail===null?n.label:`${n.label}: ${n.detail}`,c=o===`badge`?`size-4 bg-card ring-2 ring-card hover:bg-card`:`size-7`,l=n.tone===`error`?`text-destructive hover:text-destructive`:n.tone===`warning`?`text-warning-text hover:text-warning-text`:`text-muted-foreground hover:text-muted-foreground`,u;t[9]!==c||t[10]!==l?(u=X(`shrink-0 rounded-full`,c,l),t[9]=c,t[10]=l,t[11]=u):u=t[11];let d;t[12]===i?d=t[13]:(d=e=>i(e.currentTarget),t[12]=i,t[13]=d);let f=o===`badge`?`size-3.5`:`size-4`,p;t[14]!==n.icon||t[15]!==f?(p=(0,Q.jsx)(q,{name:n.icon,className:f,"aria-hidden":!0}),t[14]=n.icon,t[15]=f,t[16]=p):p=t[16];let m;t[17]!==s||t[18]!==u||t[19]!==d||t[20]!==p?(m=(0,Q.jsx)(de,{asChild:!0,children:(0,Q.jsx)(ft,{type:`button`,variant:`ghost`,size:`icon`,className:u,"aria-label":s,onClick:d,children:p})}),t[17]=s,t[18]=u,t[19]=d,t[20]=p,t[21]=m):m=t[21];let h;t[22]===s?h=t[23]:(h=(0,Q.jsx)(O,{children:s}),t[22]=s,t[23]=h);let g;return t[24]!==m||t[25]!==h?(g=(0,Q.jsx)(Pt,{delayDuration:250,children:(0,Q.jsxs)(se,{children:[m,h]})}),t[24]=m,t[25]=h,t[26]=g):g=t[26],g}function xa(e){let t=(0,$.c)(10),{plugin:n,open:r,onOpenChange:i}=e,a;t[0]!==i||t[1]!==r||t[2]!==n?(a=r?(0,Q.jsx)(Sa,{plugin:n,onOpenChange:i}):null,t[0]=i,t[1]=r,t[2]=n,t[3]=a):a=t[3];let o;t[4]===a?o=t[5]:(o=(0,Q.jsx)(qe,{className:`sm:max-w-md`,children:a}),t[4]=a,t[5]=o);let s;return t[6]!==i||t[7]!==r||t[8]!==o?(s=(0,Q.jsx)(Be,{open:r,onOpenChange:i,children:o}),t[6]=i,t[7]=r,t[8]=o,t[9]=s):s=t[9],s}function Sa(e){let t=(0,$.c)(151),{plugin:n,onOpenChange:r}=e,i=_(),o=Je(),s=n.name??n.id,c=n.updateState,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l={showErrorToast:!1},t[0]=l):l=t[0];let u;t[1]===n.id?u=t[2]:(u=()=>k(n.id),t[1]=n.id,t[2]=u);let d;t[3]!==r||t[4]!==i?(d=e=>{At({queryClient:i,job:e}),r(!1)},t[3]=r,t[4]=i,t[5]=d):d=t[5];let f;t[6]!==o||t[7]!==n.id||t[8]!==n.name?(f=e=>{Se.error(`Plugin update failed`,{description:`${n.name??n.id} — ${Br(e)}`,action:o(n.id,`installed`)})},t[6]=o,t[7]=n.id,t[8]=n.name,t[9]=f):f=t[9];let p;t[10]!==u||t[11]!==d||t[12]!==f?(p={meta:l,mutationFn:u,onSuccess:d,onError:f},t[10]=u,t[11]=d,t[12]=f,t[13]=p):p=t[13];let m=a(p),h;t[14]===n.version?h=t[15]:(h=Hn(n.version),t[14]=n.version,t[15]=h);let g=`Currently ${h}`,v=c.lastFailure;if(v!==null){let e=c.availableVersion,i;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(Ye,{children:`Update failed`}),t[16]=i):i=t[16];let a;t[17]===v.at?a=t[18]:(a=v.at===null?`The update couldn’t be completed.`:`Failed on ${Qn(v.at)}.`,t[17]=v.at,t[18]=a);let o;t[19]===a?o=t[20]:(o=(0,Q.jsxs)(Ze,{children:[i,(0,Q.jsx)(_t,{children:a})]}),t[19]=a,t[20]=o);let s;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Q.jsx)(q,{name:`CircleX`,className:`mt-0.5 size-4 shrink-0 text-destructive`,"aria-hidden":!0}),t[21]=s):s=t[21];let l;t[22]===v.version?l=t[23]:(l=Hn(v.version),t[22]=v.version,t[23]=l);let u;t[24]===n.version?u=t[25]:(u=Hn(n.version),t[24]=n.version,t[25]=u);let d;t[26]!==l||t[27]!==u?(d=(0,Q.jsxs)(`div`,{className:`flex items-start gap-2 text-sm`,children:[s,(0,Q.jsxs)(`span`,{children:[`bb couldn’t activate `,l,`. It restored `,u,` and its data.`]})]}),t[26]=l,t[27]=u,t[28]=d):d=t[28];let f;t[29]===v.detail?f=t[30]:(f=v.detail.length>0?(0,Q.jsx)($n,{summary:`Technical details`,defaultExpanded:!0,children:(0,Q.jsx)(`p`,{className:`break-words font-mono text-foreground`,children:v.detail})},`failure-details`):null,t[29]=v.detail,t[30]=f);let p;t[31]===e?p=t[32]:(p=e===null?`The restored version can keep running. Try again when a compatible update becomes available.`:`A compatible update to ${Hn(e)} is still available. Retry when you’re ready.`,t[31]=e,t[32]=p);let h;t[33]===p?h=t[34]:(h=(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:p}),t[33]=p,t[34]=h);let g;t[35]!==d||t[36]!==f||t[37]!==h?(g=(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[d,f,h]}),t[35]=d,t[36]=f,t[37]=h,t[38]=g):g=t[38];let _;t[39]===r?_=t[40]:(_=(0,Q.jsx)(ft,{type:`button`,variant:`outline`,onClick:()=>r(!1),children:`Close`}),t[39]=r,t[40]=_);let y;t[41]!==e||t[42]!==m?(y=e===null?null:(0,Q.jsxs)(ft,{type:`button`,disabled:m.isPending,"aria-busy":m.isPending,"aria-label":`Retry update to ${e}`,onClick:()=>m.mutate(),children:[m.isPending?(0,Q.jsx)(q,{name:`Spinner`,className:`animate-spin`}):null,`Retry update`]}),t[41]=e,t[42]=m,t[43]=y):y=t[43];let b;t[44]!==_||t[45]!==y?(b=(0,Q.jsxs)(lt,{children:[_,y]}),t[44]=_,t[45]=y,t[46]=b):b=t[46];let x;return t[47]!==g||t[48]!==b||t[49]!==o?(x=(0,Q.jsxs)(Q.Fragment,{children:[o,g,b]}),t[47]=g,t[48]=b,t[49]=o,t[50]=x):x=t[50],x}if(c.availableVersion!==null){let e=c.availableVersion,i;t[51]===e?i=t[52]:(i=Hn(e),t[51]=e,t[52]=i);let a;t[53]!==s||t[54]!==i?(a=(0,Q.jsxs)(Ye,{children:[`Update `,s,` to `,i,`?`]}),t[53]=s,t[54]=i,t[55]=a):a=t[55];let o;t[56]===g?o=t[57]:(o=(0,Q.jsx)(_t,{children:g}),t[56]=g,t[57]=o);let l;t[58]!==a||t[59]!==o?(l=(0,Q.jsxs)(Ze,{children:[a,o]}),t[58]=a,t[59]=o,t[60]=l):l=t[60];let u;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,Q.jsx)(`span`,{className:`font-medium`,style:nr,children:`✓`}),(0,Q.jsx)(`span`,{children:`Compatible with your bb and plugin SDK`})]}),t[61]=u):u=t[61];let d;t[62]===n.sourceDisplay?d=t[63]:(d={key:`Source`,value:n.sourceDisplay},t[62]=n.sourceDisplay,t[63]=d);let f;t[64]===n.version?f=t[65]:(f={key:`Current`,value:n.version},t[64]=n.version,t[65]=f);let p;t[66]===e?p=t[67]:(p={key:`Candidate`,value:e},t[66]=e,t[67]=p);let h;t[68]!==d||t[69]!==f||t[70]!==p?(h=(0,Q.jsx)($n,{summary:`Details — source, versions`,children:(0,Q.jsx)(Rn,{entries:[d,f,p]})}),t[68]=d,t[69]=f,t[70]=p,t[71]=h):h=t[71];let _;t[72]===n.version?_=t[73]:(_=Hn(n.version),t[72]=n.version,t[73]=_);let v;t[74]===e?v=t[75]:(v=Hn(e),t[74]=e,t[75]=v);let y;t[76]!==_||t[77]!==v?(y=(0,Q.jsx)(Jn,{fromVersion:_,toVersion:v}),t[76]=_,t[77]=v,t[78]=y):y=t[78];let b;t[79]!==h||t[80]!==y?(b=(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[u,h,y]}),t[79]=h,t[80]=y,t[81]=b):b=t[81];let x;t[82]===r?x=t[83]:(x=()=>r(!1),t[82]=r,t[83]=x);let S;t[84]!==x||t[85]!==m.isPending?(S=(0,Q.jsx)(ft,{type:`button`,variant:`outline`,disabled:m.isPending,onClick:x,children:`Not now`}),t[84]=x,t[85]=m.isPending,t[86]=S):S=t[86];let C;t[87]===m?C=t[88]:(C=()=>m.mutate(),t[87]=m,t[88]=C);let w;t[89]===m.isPending?w=t[90]:(w=m.isPending?(0,Q.jsx)(q,{name:`Spinner`,className:`animate-spin`}):(0,Q.jsx)(q,{name:yr,"aria-hidden":!0}),t[89]=m.isPending,t[90]=w);let T;t[91]!==C||t[92]!==w||t[93]!==m.isPending?(T=(0,Q.jsxs)(ft,{type:`button`,disabled:m.isPending,"aria-busy":m.isPending,onClick:C,children:[w,`Update`]}),t[91]=C,t[92]=w,t[93]=m.isPending,t[94]=T):T=t[94];let E;t[95]!==S||t[96]!==T?(E=(0,Q.jsxs)(lt,{children:[S,T]}),t[95]=S,t[96]=T,t[97]=E):E=t[97];let D;return t[98]!==l||t[99]!==b||t[100]!==E?(D=(0,Q.jsxs)(Q.Fragment,{children:[l,b,E]}),t[98]=l,t[99]=b,t[100]=E,t[101]=D):D=t[101],D}if(c.blockedVersion!==null){let e=c.blockedVersion,i;t[102]===e?i=t[103]:(i=Hn(e),t[102]=e,t[103]=i);let a;t[104]!==s||t[105]!==i?(a=(0,Q.jsxs)(Ye,{children:[`Update `,s,` to `,i,`?`]}),t[104]=s,t[105]=i,t[106]=a):a=t[106];let o;t[107]===g?o=t[108]:(o=(0,Q.jsx)(_t,{children:g}),t[107]=g,t[108]=o);let l;t[109]!==a||t[110]!==o?(l=(0,Q.jsxs)(Ze,{children:[a,o]}),t[109]=a,t[110]=o,t[111]=l):l=t[111];let u;t[112]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Q.jsx)(q,{name:`AlertTriangle`,className:`size-4 shrink-0 text-warning`,"aria-hidden":!0}),t[112]=u):u=t[112];let d;t[113]===e?d=t[114]:(d=Hn(e),t[113]=e,t[114]=d);let f;t[115]===d?f=t[116]:(f=(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[u,(0,Q.jsxs)(`span`,{children:[d,` isn’t compatible with this bb`]})]}),t[115]=d,t[116]=f);let p;t[117]===c.blockedReasons?p=t[118]:(p=c.blockedReasons.length>0?(0,Q.jsx)(`ul`,{className:`space-y-1`,children:c.blockedReasons.map(Ca)}):null,t[117]=c.blockedReasons,t[118]=p);let m=`${n.version} — already installed`,h;t[119]===m?h=t[120]:(h=(0,Q.jsx)(Rn,{entries:[{key:`Newest compatible`,value:m}]}),t[119]=m,t[120]=h);let _;t[121]!==p||t[122]!==h?(_=(0,Q.jsx)($n,{summary:`Details`,defaultExpanded:!0,children:(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[p,h]})}),t[121]=p,t[122]=h,t[123]=_):_=t[123];let v;t[124]===n.version?v=t[125]:(v=(0,Q.jsxs)(`p`,{className:`text-xs text-subtle-foreground`,children:[`Keep using `,n.version,` and check again when a compatible plugin version is available.`]}),t[124]=n.version,t[125]=v);let y;t[126]!==f||t[127]!==_||t[128]!==v?(y=(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[f,_,v]}),t[126]=f,t[127]=_,t[128]=v,t[129]=y):y=t[129];let b;t[130]===r?b=t[131]:(b=(0,Q.jsx)(ft,{type:`button`,variant:`outline`,onClick:()=>r(!1),children:`Close`}),t[130]=r,t[131]=b);let x;t[132]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Q.jsxs)(ft,{type:`button`,disabled:!0,children:[(0,Q.jsx)(q,{name:yr,"aria-hidden":!0}),`Update`]}),t[132]=x):x=t[132];let S;t[133]===b?S=t[134]:(S=(0,Q.jsxs)(lt,{children:[b,x]}),t[133]=b,t[134]=S);let C;return t[135]!==l||t[136]!==y||t[137]!==S?(C=(0,Q.jsxs)(Q.Fragment,{children:[l,y,S]}),t[135]=l,t[136]=y,t[137]=S,t[138]=C):C=t[138],C}let y;t[139]===s?y=t[140]:(y=(0,Q.jsxs)(Ye,{children:[s,` is up to date`]}),t[139]=s,t[140]=y);let b;t[141]===g?b=t[142]:(b=(0,Q.jsx)(_t,{children:g}),t[141]=g,t[142]=b);let x;t[143]!==y||t[144]!==b?(x=(0,Q.jsxs)(Ze,{children:[y,b]}),t[143]=y,t[144]=b,t[145]=x):x=t[145];let S;t[146]===r?S=t[147]:(S=(0,Q.jsx)(lt,{children:(0,Q.jsx)(ft,{type:`button`,variant:`outline`,onClick:()=>r(!1),children:`Close`})}),t[146]=r,t[147]=S);let C;return t[148]!==S||t[149]!==x?(C=(0,Q.jsxs)(Q.Fragment,{children:[x,S]}),t[148]=S,t[149]=x,t[150]=C):C=t[150],C}function Ca(e){return(0,Q.jsx)(`li`,{className:`text-foreground`,children:e},e)}function wa(e){let t=(0,$.c)(19),{plugins:n,onOpenPlugin:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={enabled:!0},t[0]=i):i=t[0];let a=Pe(``,i),[o,s]=(0,Z.useState)(null),c;t[1]!==n||t[2]!==o?(c=o===null?null:n.find(e=>e.id===o)??null,t[1]=n,t[2]=o,t[3]=c):c=t[3];let l=c;if(n.length===0){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(P,{message:`No plugins installed. Browse the catalog, create a plugin, or run bb plugin install <source>.`}),t[4]=e):e=t[4],e}let u;if(t[5]!==a||t[6]!==r||t[7]!==n){let e;t[9]!==a||t[10]!==r?(e=e=>(0,Q.jsx)(Ta,{plugin:e,catalogEntry:V(e,a.data?.entries??[]),onUpdateClick:()=>s(e.id),onOpenPlugin:r},e.id),t[9]=a,t[10]=r,t[11]=e):e=t[11],u=n.map(e),t[5]=a,t[6]=r,t[7]=n,t[8]=u}else u=t[8];let d;t[12]===u?d=t[13]:(d=(0,Q.jsx)(An,{children:u}),t[12]=u,t[13]=d);let f;t[14]===l?f=t[15]:(f=l===null?null:(0,Q.jsx)(xa,{plugin:l,open:!0,onOpenChange:e=>{e||s(null)}}),t[14]=l,t[15]=f);let p;return t[16]!==d||t[17]!==f?(p=(0,Q.jsxs)(Q.Fragment,{children:[d,f]}),t[16]=d,t[17]=f,t[18]=p):p=t[18],p}function Ta(e){let t=(0,$.c)(60),{plugin:n,onUpdateClick:r,catalogEntry:i,onOpenPlugin:a}=e,{toggle:o,enabled:s}=Oi(n),c;t[0]===n.source?c=t[1]:(c=n.source.startsWith(`path:`),t[0]=n.source,t[1]=c);let l=c,u;t[2]===n?u=t[3]:(u=ga(n),t[2]=n,t[3]=u);let d=u,f=d?.kind===`status`?d:null,p=d?.kind===`update`?d:null,m;t[4]===n?m=t[5]:(m=ha(n),t[4]=n,t[5]=m);let h=m,g=s===!0,_;t[6]!==n.status||t[7]!==g?(_=De({enabled:g,status:n.status}),t[6]=n.status,t[7]=g,t[8]=_):_=t[8];let v=_,y=h?.tone===`error`?`text-destructive-text`:h?.tone===`warning`?`text-warning-text`:`text-muted-foreground`,b;t[9]!==a||t[10]!==n.id?(b=e=>a(n.id,e),t[9]=a,t[10]=n.id,t[11]=b):b=t[11];let x=b,S=`plugin-row-${n.id}`,C;t[12]===n?C=t[13]:(C=(0,Q.jsx)(Qt,{className:`size-6 rounded border border-border bg-muted/40 text-muted-foreground`,children:()=>(0,Q.jsx)(Bn,{plugin:n,className:`size-4`})}),t[12]=n,t[13]=C);let w;t[14]!==x||t[15]!==f||t[16]!==C?(w=(0,Q.jsx)(va,{signal:f,onStatusClick:x,children:C}),t[14]=x,t[15]=f,t[16]=C,t[17]=w):w=t[17];let T=n.name??n.id,E;t[18]!==i||t[19]!==l||t[20]!==n.provenance||t[21]!==n.publisherLabel?(E=l?`Local`:i===void 0?n.publisherLabel===null?null:(0,Q.jsx)(rr,{name:n.provenance===`builtin`?`BB Official`:n.publisherLabel,github:null,official:n.provenance===`builtin`,children:n.provenance===`builtin`?`BB Official`:n.publisherLabel}):(0,Q.jsx)(zn,{entry:i}),t[18]=i,t[19]=l,t[20]=n.provenance,t[21]=n.publisherLabel,t[22]=E):E=t[22];let D;t[23]!==n.description||t[24]!==n.id||t[25]!==n.statusDetail||t[26]!==h||t[27]!==y?(D=h===null?n.description:(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(`span`,{"data-testid":`plugin-runtime-status-${n.id}`,className:X(`font-medium`,y),children:h.label}),` · `,(0,Q.jsx)(`span`,{children:n.statusDetail??h.condition})]}),t[23]=n.description,t[24]=n.id,t[25]=n.statusDetail,t[26]=h,t[27]=y,t[28]=D):D=t[28];let O=`${n.name??n.id} plugin details`,k;t[29]!==r||t[30]!==x||t[31]!==n.id||t[32]!==p?(k=p===null?void 0:(0,Q.jsx)(`span`,{"data-testid":`plugin-update-signal-${n.id}`,children:(0,Q.jsx)(ba,{signal:p,onUpdateClick:r,onStatusClick:x})}),t[29]=r,t[30]=x,t[31]=n.id,t[32]=p,t[33]=k):k=t[33];let A;t[34]!==v||t[35]!==n.id||t[36]!==y?(A=v?(0,Q.jsx)(`span`,{"data-testid":`plugin-not-running-${n.id}`,className:X(`sr-only`,y),children:`not running`}):null,t[34]=v,t[35]=n.id,t[36]=y,t[37]=A):A=t[37];let j;t[38]===o?j=t[39]:(j=e=>o.mutate(e),t[38]=o,t[39]=j);let M=`${s?`Disable`:`Enable`} ${n.id}${v?` (${n.status}, not running)`:``}`,N;t[40]!==s||t[41]!==j||t[42]!==M||t[43]!==o.isPending?(N=(0,Q.jsx)(cr,{checked:s,disabled:o.isPending,onCheckedChange:j,"aria-label":M}),t[40]=s,t[41]=j,t[42]=M,t[43]=o.isPending,t[44]=N):N=t[44];let P;t[45]!==k||t[46]!==A||t[47]!==N?(P=(0,Q.jsxs)(`span`,{className:`flex items-center gap-2`,children:[k,A,N]}),t[45]=k,t[46]=A,t[47]=N,t[48]=P):P=t[48];let F;t[49]!==x||t[50]!==T||t[51]!==E||t[52]!==D||t[53]!==O||t[54]!==P||t[55]!==w?(F=(0,Q.jsx)(or,{leading:w,title:T,byline:E,description:D,openLabel:O,onOpen:x,footerAction:P}),t[49]=x,t[50]=T,t[51]=E,t[52]=D,t[53]=O,t[54]=P,t[55]=w,t[56]=F):F=t[56];let I;return t[57]!==F||t[58]!==S?(I=(0,Q.jsx)(`div`,{"data-testid":S,children:F}),t[57]=F,t[58]=S,t[59]=I):I=t[59],I}function Ea(e){let t=new Map;for(let n of e)n.author!==null&&t.set(n.author.name,(t.get(n.author.name)??0)+1);let n=null;for(let r of e){if(r.author===null)continue;let e=t.get(r.author.name)??0,i=n===null?0:t.get(n.name)??0;(n===null||e>i||e===i&&r.author.name.length>n.name.length)&&(n=r.author)}return n}function Da(e){let n=(0,$.c)(65),{authorKey:r,onInstall:i,onUninstall:a,onOpenPlugin:o}=e,{searchParams:s,query:c,requestedSort:l,sortDirection:u,selectedCategories:d,changeSearchParams:f}=kr(),p;n[0]===c?p=n[1]:(p=c.trim(),n[0]=c,n[1]=p);let m=p,h;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(h={enabled:!0},n[2]=h):h=n[2];let g=Pe(``,h),_=m!==``,v;n[3]===_?v=n[4]:(v={enabled:_},n[3]=_,n[4]=v);let y=Pe(m,v);g.data?.entries;let b;n[5]!==r||n[6]!==g.data?.entries?(b=ir((g.data?.entries??[]).filter(ja),r),n[5]=r,n[6]=g.data?.entries,n[7]=b):b=n[7];let x=b,S;n[8]===x?S=n[9]:(S=Ea(x),n[8]=x,n[9]=S);let C=S,w;n[10]===x?w=n[11]:(w=x.length>0&&x.every(Aa),n[10]=x,n[11]=w);let T=w,E=T?`BB Official`:C?.name,D;n[12]===x?D=n[13]:(D=x.some(ka),n[12]=x,n[13]=D);let O=D,k=l===`most-installed`&&!O?null:l,A;n[14]!==x||n[15]!==d?(A=L(x,d),n[14]=x,n[15]=d,n[16]=A):A=n[16];let j=A,M;n[17]!==r||n[18]!==g.data?.entries||n[19]!==y.data?.entries||n[20]!==d||n[21]!==k||n[22]!==u||n[23]!==m?(M=()=>{let e=new Set(d),t=ir((m===``?g.data?.entries??[]:y.data?.entries??[]).filter(Oa),r).filter(t=>e.size===0||e.has(me(t)));return k===null?t:pe(t,k,u)},n[17]=r,n[18]=g.data?.entries,n[19]=y.data?.entries,n[20]=d,n[21]=k,n[22]=u,n[23]=m,n[24]=M):M=n[24],g.data?.entries,y.data?.entries;let N;n[25]===M?N=n[26]:(N=M(),n[25]=M,n[26]=N);let P=N,F=m!==``&&y.isPending,I;if(n[27]!==s){let e=new URLSearchParams(s);e.delete(`author`),I=e.toString(),n[27]=s,n[28]=I}else I=n[28];let R=I,z;n[29]===Symbol.for(`react.memo_cache_sentinel`)?(z=X(`space-y-6 pb-8`,ie),n[29]=z):z=n[29];let B;n[30]===Symbol.for(`react.memo_cache_sentinel`)?(B=Ce(),n[30]=B):B=n[30];let ee=R===``?``:`?${R}`,te;n[31]===ee?te=n[32]:(te={pathname:B,search:ee},n[31]=ee,n[32]=te);let V;n[33]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,Q.jsx)(q,{name:`ChevronLeft`,className:`size-3`,"aria-hidden":!0}),n[33]=V):V=n[33];let H;n[34]===te?H=n[35]:(H=(0,Q.jsxs)(t,{to:te,className:`-ml-1 inline-flex items-center gap-1 rounded-sm px-1 text-xs text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:[V,`Browse plugins`]}),n[34]=te,n[35]=H);let U;n[36]!==C||n[37]!==E||n[38]!==x.length||n[39]!==T?(U=C===null?null:(0,Q.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Q.jsx)(jn,{name:E??C.name,official:T,github:In(C),size:`page`}),(0,Q.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,Q.jsxs)(`h1`,{className:`flex flex-wrap items-center gap-2 text-xl font-semibold text-foreground`,children:[(0,Q.jsx)(`span`,{children:E}),(0,Q.jsxs)(`span`,{className:`rounded-md bg-muted px-2 py-1 text-2xs font-medium tabular-nums text-subtle-foreground`,children:[x.length.toLocaleString(),` `,x.length===1?`plugin`:`plugins`]})]}),C.url===null?null:(0,Q.jsxs)(`a`,{href:C.url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 rounded-sm text-xs text-subtle-foreground underline underline-offset-2 hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:[C.url.startsWith(`https://github.com/`)?(0,Q.jsx)(q,{name:`GithubLogo`,className:`size-4.5 shrink-0 fill-current [&_*]:stroke-0`,"aria-hidden":!0}):null,Yn(C.url),(0,Q.jsx)(q,{name:`ExternalLink`,className:`size-3`,"aria-hidden":!0}),(0,Q.jsx)(`span`,{className:`sr-only`,children:`Opens in a new tab`})]})]})]}),n[36]=C,n[37]=E,n[38]=x.length,n[39]=T,n[40]=U):U=n[40];let W;n[41]!==H||n[42]!==U?(W=(0,Q.jsxs)(`div`,{className:`w-full space-y-2`,children:[H,U]}),n[41]=H,n[42]=U,n[43]=W):W=n[43];let G;n[44]!==C||n[45]!==g||n[46]!==j||n[47]!==f||n[48]!==x.length||n[49]!==O||n[50]!==i||n[51]!==o||n[52]!==a||n[53]!==c||n[54]!==s||n[55]!==F||n[56]!==y.isError||n[57]!==d||n[58]!==k||n[59]!==u||n[60]!==P?(G=g.isPending?(0,Q.jsx)(En,{state:`loading`,message:`Loading author`}):g.isError&&x.length===0?(0,Q.jsx)(En,{state:`error`,message:`The author catalog is not available.`,onRetry:()=>void g.refetch()}):C===null?(0,Q.jsx)(En,{state:`empty`,message:`Author not found.`}):(0,Q.jsxs)(`section`,{className:`space-y-6`,children:[(0,Q.jsx)(Bi,{query:c,selectedCategories:d,categoryOptions:j,sort:k,sortDirection:u,installsKnown:O,changeSearchParams:f}),g.isError||y.isError?(0,Q.jsx)(`p`,{className:`text-xs text-warning-text`,role:`status`,children:`The latest search failed. The page shows saved catalog results.`}):null,F?(0,Q.jsx)(En,{state:`loading`,message:`Loading plugins`}):P.length===0?(0,Q.jsx)(En,{state:`empty`,message:`No plugins match these filters.`}):(0,Q.jsx)(Mi,{resetKey:s.toString(),entries:P,onInstall:i,onUninstall:a,onOpenPlugin:o})]}),n[44]=C,n[45]=g,n[46]=j,n[47]=f,n[48]=x.length,n[49]=O,n[50]=i,n[51]=o,n[52]=a,n[53]=c,n[54]=s,n[55]=F,n[56]=y.isError,n[57]=d,n[58]=k,n[59]=u,n[60]=P,n[61]=G):G=n[61];let ne;return n[62]!==W||n[63]!==G?(ne=(0,Q.jsx)(dn,{scrollId:`plugin-author-results`,contentClassName:`[&>div]:block!`,children:(0,Q.jsxs)(`div`,{className:z,children:[W,G]})}),n[62]=W,n[63]=G,n[64]=ne):ne=n[64],ne}function Oa(e){return e.compatible}function ka(e){return e.installs!==null}function Aa(e){return e.marketplace===`bb-official`}function ja(e){return e.compatible}function Ma(e){return e.source.startsWith(`builtin:`)||e.source.startsWith(`path:`)?!1:e.provenance===`direct`||e.provenance===`catalog`}function Na(e){return Ma(e)&&e.updateState.availableVersion===null?e.updateState.blockedVersion:null}function Pa(e){let t=e.trim(),n=`${t.charAt(0).toUpperCase()}${t.slice(1)}`;return/[.!?]$/u.test(n)?n:`${n}.`}function Fa(e){let t=(0,$.c)(36),{plugin:n}=e,[r,i]=(0,Z.useState)(!1),o=_(),s=Je(),c=n.updateState.availableVersion,l=n.updateState.lastFailure,u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u={showErrorToast:!1},t[0]=u):u=t[0];let d;t[1]===n.id?d=t[2]:(d=()=>k(n.id),t[1]=n.id,t[2]=d);let f;t[3]===o?f=t[4]:(f=e=>{At({queryClient:o,job:e})},t[3]=o,t[4]=f);let p;t[5]!==s||t[6]!==n.id||t[7]!==n.name?(p=e=>{Se.error(`Plugin update failed`,{description:`${n.name??n.id} — ${Br(e)}`,action:s(n.id,`installed`)})},t[5]=s,t[6]=n.id,t[7]=n.name,t[8]=p):p=t[8];let m;t[9]!==d||t[10]!==f||t[11]!==p?(m={meta:u,mutationFn:d,onSuccess:f,onError:p},t[9]=d,t[10]=f,t[11]=p,t[12]=m):m=t[12];let h=a(m);if(!Ma(n)||c===null)return null;if(l!==null){let e=h.isPending,n=h.isPending,r;t[13]===c?r=t[14]:(r=Hn(c),t[13]=c,t[14]=r);let i=`Retry update to ${r}`,a;t[15]===h?a=t[16]:(a=()=>h.mutate(),t[15]=h,t[16]=a);let o;t[17]===h.isPending?o=t[18]:(o=h.isPending?(0,Q.jsx)(q,{name:`Spinner`,className:`size-3.5 animate-spin`,"aria-hidden":!0}):(0,Q.jsx)(q,{name:`RotateCcw`,className:`size-3.5`,"aria-hidden":!0}),t[17]=h.isPending,t[18]=o);let s;return t[19]!==h.isPending||t[20]!==a||t[21]!==o||t[22]!==i?(s=(0,Q.jsxs)(ft,{type:`button`,variant:`outline`,size:`sm`,className:`h-6 px-2 text-xs`,disabled:e,"aria-busy":n,"aria-label":i,onClick:a,children:[o,`Retry`]}),t[19]=h.isPending,t[20]=a,t[21]=o,t[22]=i,t[23]=s):s=t[23],s}let g;t[24]===c?g=t[25]:(g=Hn(c),t[24]=c,t[25]=g);let v=`Update ${n.name??n.id} to ${g}`,y,b;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(y=()=>i(!0),b=(0,Q.jsx)(q,{name:yr,className:`size-3.5`,"aria-hidden":!0}),t[26]=y,t[27]=b):(y=t[26],b=t[27]);let x;t[28]===v?x=t[29]:(x=(0,Q.jsxs)(ft,{type:`button`,variant:`outline`,size:`sm`,className:`h-6 px-2 text-xs`,"aria-label":v,onClick:y,children:[b,`Update`]}),t[28]=v,t[29]=x);let S;t[30]!==r||t[31]!==n?(S=(0,Q.jsx)(xa,{plugin:n,open:r,onOpenChange:i}),t[30]=r,t[31]=n,t[32]=S):S=t[32];let C;return t[33]!==x||t[34]!==S?(C=(0,Q.jsxs)(Q.Fragment,{children:[x,S]}),t[33]=x,t[34]=S,t[35]=C):C=t[35],C}function Ia(e){let t=(0,$.c)(48),{plugin:n}=e,r=n.updateState.lastFailure,i,a,o,s,c,l,u,d,f;if(t[0]!==r||t[1]!==n){f=Symbol.for(`react.early_return_sentinel`);bb0:{let e=Na(n);if(i=n.updateState.blockedReasons,!Ma(n)){f=null;break bb0}if(r!==null){let e;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(q,{name:`CircleX`,className:`mt-0.5 size-4 shrink-0 text-destructive`,"aria-hidden":!0}),t[11]=e):e=t[11];let i;t[12]===r.version?i=t[13]:(i=Hn(r.version),t[12]=r.version,t[13]=i);let a;t[14]===n.version?a=t[15]:(a=Hn(n.version),t[14]=n.version,t[15]=a);let o;t[16]!==i||t[17]!==a?(o=(0,Q.jsxs)(`div`,{role:`status`,"aria-label":`Update failed`,className:`flex min-w-0 items-start gap-2.5`,children:[e,(0,Q.jsxs)(`p`,{className:`min-w-0 text-xs leading-relaxed text-muted-foreground`,children:[`bb couldn’t activate `,i,`. It restored `,a,` and its data.`]})]}),t[16]=i,t[17]=a,t[18]=o):o=t[18],f=o;break bb0}if(n.updateState.outcome===`unavailable`&&n.updateState.detail!==null){let e;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(q,{name:`AlertTriangle`,className:`mt-0.5 size-4 shrink-0 text-warning`,"aria-hidden":!0}),t[19]=e):e=t[19];let r;t[20]===n.updateState.detail?r=t[21]:(r=(0,Q.jsxs)(`div`,{role:`status`,"aria-label":`Update needs attention`,className:`flex min-w-0 items-start gap-2.5`,children:[e,(0,Q.jsx)(`p`,{className:`min-w-0 text-xs leading-relaxed text-muted-foreground`,children:n.updateState.detail})]}),t[20]=n.updateState.detail,t[21]=r),f=r;break bb0}if(n.updateState.availableVersion!==null){let e;t[22]===n.updateState.availableVersion?e=t[23]:(e=Hn(n.updateState.availableVersion),t[22]=n.updateState.availableVersion,t[23]=e);let r;t[24]===e?r=t[25]:(r=(0,Q.jsx)(`span`,{className:`font-mono text-xs text-foreground`,children:e}),t[24]=e,t[25]=r);let i;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Available`}),t[26]=i):i=t[26];let a;t[27]===r?a=t[28]:(a=(0,Q.jsxs)(`div`,{role:`status`,className:`flex min-w-0 items-baseline gap-2`,children:[r,i]}),t[27]=r,t[28]=a),f=a;break bb0}if(e===null){f=null;break bb0}c=`status`,l=`Update blocked`,u=`flex min-w-0 items-start gap-2.5`,t[29]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Q.jsx)(q,{name:`AlertTriangle`,className:`mt-0.5 size-4 shrink-0 text-warning`,"aria-hidden":!0}),t[29]=d):d=t[29],s=`min-w-0`,a=`text-xs leading-relaxed text-muted-foreground`,o=i[0]===void 0?`${Hn(e)} isn’t compatible with this bb.`:Pa(i[0])}t[0]=r,t[1]=n,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=l,t[8]=u,t[9]=d,t[10]=f}else i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],d=t[9],f=t[10];if(f!==Symbol.for(`react.early_return_sentinel`))return f;let p;t[30]===n.version?p=t[31]:(p=Hn(n.version),t[30]=n.version,t[31]=p);let m;t[32]!==a||t[33]!==o||t[34]!==p?(m=(0,Q.jsxs)(`p`,{className:a,children:[o,` `,p,` remains installed. Keep using it and check again when a compatible plugin version is available.`]}),t[32]=a,t[33]=o,t[34]=p,t[35]=m):m=t[35];let h;t[36]===i?h=t[37]:(h=i.length>1?(0,Q.jsx)(`div`,{className:`mt-1.5`,children:(0,Q.jsx)($n,{summary:`Other requirements`,children:(0,Q.jsx)(`ul`,{className:`space-y-1 text-foreground`,children:i.slice(1).map(La)})})}):null,t[36]=i,t[37]=h);let g;t[38]!==m||t[39]!==h||t[40]!==s?(g=(0,Q.jsxs)(`div`,{className:s,children:[m,h]}),t[38]=m,t[39]=h,t[40]=s,t[41]=g):g=t[41];let _;return t[42]!==g||t[43]!==c||t[44]!==l||t[45]!==u||t[46]!==d?(_=(0,Q.jsxs)(`div`,{role:c,"aria-label":l,className:u,children:[d,g]}),t[42]=g,t[43]=c,t[44]=l,t[45]=u,t[46]=d,t[47]=_):_=t[47],_}function La(e){return(0,Q.jsx)(`li`,{children:Pa(e)},e)}function Ra(e){return Object.prototype.toString.call(e)===`[object Object]`}function za(e){return Ra(e)||Array.isArray(e)}function Ba(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}function Va(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||JSON.stringify(Object.keys(e.breakpoints||{}))!==JSON.stringify(Object.keys(t.breakpoints||{}))?!1:n.every(n=>{let r=e[n],i=t[n];return typeof r==`function`?`${r}`==`${i}`:!za(r)||!za(i)?r===i:Va(r,i)})}function Ha(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function Ua(e,t){if(e.length!==t.length)return!1;let n=Ha(e),r=Ha(t);return n.every((e,t)=>{let n=r[t];return Va(e,n)})}function Wa(e){return typeof e==`number`}function Ga(e){return typeof e==`string`}function Ka(e){return typeof e==`boolean`}function qa(e){return Object.prototype.toString.call(e)===`[object Object]`}function Ja(e){return Math.abs(e)}function Ya(e){return Math.sign(e)}function Xa(e,t){return Ja(e-t)}function Za(e,t){return e===0||t===0||Ja(e)<=Ja(t)?0:Ja(Xa(Ja(e),Ja(t))/e)}function Qa(e){return Math.round(e*100)/100}function $a(e){return io(e).map(Number)}function eo(e){return e[to(e)]}function to(e){return Math.max(0,e.length-1)}function no(e,t){return t===to(e)}function ro(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function io(e){return Object.keys(e)}function ao(e,t){return[e,t].reduce((e,t)=>(io(t).forEach(n=>{let r=e[n],i=t[n];e[n]=qa(r)&&qa(i)?ao(r,i):i}),e),{})}function oo(e,t){return t.MouseEvent!==void 0&&e instanceof t.MouseEvent}function so(e,t){let n={start:r,center:i,end:a};function r(){return 0}function i(e){return a(e)/2}function a(e){return t-e}function o(r,i){return Ga(e)?n[e](r):e(t,r,i)}return{measure:o}}function co(){let e=[];function t(t,n,i,a={passive:!0}){let o;if(`addEventListener`in t)t.addEventListener(n,i,a),o=()=>t.removeEventListener(n,i,a);else{let e=t;e.addListener(i),o=()=>e.removeListener(i)}return e.push(o),r}function n(){e=e.filter(e=>e())}let r={add:t,clear:n};return r}function lo(e,t,n,r){let i=co(),a=1e3/60,o=null,s=0,c=0;function l(){i.add(e,`visibilitychange`,()=>{e.hidden&&m()})}function u(){p(),i.clear()}function d(e){if(!c)return;o||(o=e,n(),n());let i=e-o;for(o=e,s+=i;s>=a;)n(),s-=a;r(s/a),c&&=t.requestAnimationFrame(d)}function f(){c||=t.requestAnimationFrame(d)}function p(){t.cancelAnimationFrame(c),o=null,s=0,c=0}function m(){o=null,s=0}return{init:l,destroy:u,start:f,stop:p,update:n,render:r}}function uo(e,t){let n=t===`rtl`,r=e===`y`,i=r?`y`:`x`,a=r?`x`:`y`,o=!r&&n?-1:1,s=u(),c=d();function l(e){let{height:t,width:n}=e;return r?t:n}function u(){return r?`top`:n?`right`:`left`}function d(){return r?`bottom`:n?`left`:`right`}function f(e){return e*o}return{scroll:i,cross:a,startEdge:s,endEdge:c,measureSize:l,direction:f}}function fo(e=0,t=0){let n=Ja(e-t);function r(t){return t<e}function i(e){return e>t}function a(e){return r(e)||i(e)}function o(n){return a(n)?r(n)?e:t:n}function s(e){return n?e-n*Math.ceil((e-t)/n):e}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function po(e,t,n){let{constrain:r}=fo(0,e),i=e+1,a=o(t);function o(e){return n?Ja((i+e)%i):r(e)}function s(){return a}function c(e){return a=o(e),d}function l(e){return u().set(s()+e)}function u(){return po(e,s(),n)}let d={get:s,set:c,add:l,clone:u};return d}function mo(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v){let{cross:y,direction:b}=e,x=[`INPUT`,`SELECT`,`TEXTAREA`],S={passive:!1},C=co(),w=co(),T=fo(50,225).constrain(p.measure(20)),E={mouse:300,touch:400},D={mouse:500,touch:600},O=m?43:25,k=!1,A=0,j=0,M=!1,N=!1,P=!1,F=!1;function I(e){if(!v)return;function n(t){(Ka(v)||v(e,t))&&te(t)}let r=t;C.add(r,`dragstart`,e=>e.preventDefault(),S).add(r,`touchmove`,()=>void 0,S).add(r,`touchend`,()=>void 0).add(r,`touchstart`,n).add(r,`mousedown`,n).add(r,`touchcancel`,H).add(r,`contextmenu`,H).add(r,`click`,U,!0)}function L(){C.clear(),w.clear()}function R(){let e=F?n:t;w.add(e,`touchmove`,V,S).add(e,`touchend`,H).add(e,`mousemove`,V,S).add(e,`mouseup`,H)}function z(e){let t=e.nodeName||``;return x.includes(t)}function B(){return(m?D:E)[F?`mouse`:`touch`]}function ee(e,t){let n=d.add(Ya(e)*-1),r=u.byDistance(e,!m).distance;return m||Ja(e)<T?r:g&&t?r*.5:u.byIndex(n.get(),0).distance}function te(e){let t=oo(e,r);F=t,P=m&&t&&!e.buttons&&k,k=Xa(i.get(),o.get())>=2,!(t&&e.button!==0)&&(z(e.target)||(M=!0,a.pointerDown(e),l.useFriction(0).useDuration(0),i.set(o),R(),A=a.readPoint(e),j=a.readPoint(e,y),f.emit(`pointerDown`)))}function V(e){if(!oo(e,r)&&e.touches.length>=2)return H(e);let t=a.readPoint(e),n=a.readPoint(e,y),o=Xa(t,A),c=Xa(n,j);if(!N&&!F&&(!e.cancelable||(N=o>c,!N)))return H(e);let u=a.pointerMove(e);o>h&&(P=!0),l.useFriction(.3).useDuration(.75),s.start(),i.add(b(u)),e.preventDefault()}function H(e){let t=u.byDistance(0,!1).index!==d.get(),n=a.pointerUp(e)*B(),r=ee(b(n),t),i=Za(n,r),o=O-10*i,s=_+i/50;N=!1,M=!1,w.clear(),l.useDuration(o).useFriction(s),c.distance(r,!m),F=!1,f.emit(`pointerUp`)}function U(e){P&&=(e.stopPropagation(),e.preventDefault(),!1)}function W(){return M}return{init:I,destroy:L,pointerDown:W}}function ho(e,t){let n,r;function i(e){return e.timeStamp}function a(n,r){let i=`client${(r||e.scroll)===`x`?`X`:`Y`}`;return(oo(n,t)?n:n.touches[0])[i]}function o(e){return n=e,r=e,a(e)}function s(e){let t=a(e)-a(r),o=i(e)-i(n)>170;return r=e,o&&(n=e),t}function c(e){if(!n||!r)return 0;let t=a(r)-a(n),o=i(e)-i(n),s=i(e)-i(r)>170,c=t/o;return o&&!s&&Ja(c)>.1?c:0}return{pointerDown:o,pointerMove:s,pointerUp:c,readPoint:a}}function go(){function e(e){let{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:i}=e;return{top:t,right:n+r,bottom:t+i,left:n,width:r,height:i}}return{measure:e}}function _o(e){function t(t){return t/100*e}return{measure:t}}function vo(e,t,n,r,i,a,o){let s=[e].concat(r),c,l,u=[],d=!1;function f(e){return i.measureSize(o.measure(e))}function p(i){if(!a)return;l=f(e),u=r.map(f);function o(n){for(let a of n){if(d)return;let n=a.target===e,o=r.indexOf(a.target),s=n?l:u[o];if(Ja(f(n?e:r[o])-s)>=.5){i.reInit(),t.emit(`resize`);break}}}c=new ResizeObserver(e=>{(Ka(a)||a(i,e))&&o(e)}),n.requestAnimationFrame(()=>{s.forEach(e=>c.observe(e))})}function m(){d=!0,c&&c.disconnect()}return{init:p,destroy:m}}function yo(e,t,n,r,i,a){let o=0,s=0,c=i,l=a,u=e.get(),d=0;function f(){let t=r.get()-e.get(),i=!c,a=0;return i?(o=0,n.set(r),e.set(r),a=t):(n.set(e),o+=t/c,o*=l,u+=o,e.add(o),a=u-d),s=Ya(a),d=u,x}function p(){return Ja(r.get()-t.get())<.001}function m(){return c}function h(){return s}function g(){return o}function _(){return y(i)}function v(){return b(a)}function y(e){return c=e,x}function b(e){return l=e,x}let x={direction:h,duration:m,velocity:g,seek:f,settled:p,useBaseFriction:v,useBaseDuration:_,useFriction:b,useDuration:y};return x}function bo(e,t,n,r,i){let a=i.measure(10),o=i.measure(50),s=fo(.1,.99),c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(i){if(!l())return;let c=Ja(e[e.reachedMin(t.get())?`min`:`max`]-t.get()),u=n.get()-t.get(),d=s.constrain(c/o);n.subtract(u*d),!i&&Ja(u)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function d(e){c=!e}return{shouldConstrain:l,constrain:u,toggleActive:d}}function xo(e,t,n,r,i){let a=fo(-t+e,0),o=d(),s=u(),c=f();function l(e,t){return Xa(e,t)<=1}function u(){let e=o[0],t=eo(o);return fo(o.lastIndexOf(e),o.indexOf(t)+1)}function d(){return n.map((e,t)=>{let{min:r,max:i}=a,o=a.constrain(e),s=!t,c=no(n,t);return s?i:c||l(r,o)?r:l(i,o)?i:o}).map(e=>parseFloat(e.toFixed(3)))}function f(){if(t<=e+i)return[a.max];if(r===`keepSnaps`)return o;let{min:n,max:c}=s;return o.slice(n,c)}return{snapsContained:c,scrollContainLimit:s}}function So(e,t,n){let r=t[0];return{limit:fo(n?r-e:eo(t),r)}}function Co(e,t,n,r){let i=.1,{reachedMin:a,reachedMax:o}=fo(t.min+i,t.max+i);function s(e){return e===1?o(n.get()):e===-1?a(n.get()):!1}function c(t){if(!s(t))return;let n=t*-1*e;r.forEach(e=>e.add(n))}return{loop:c}}function wo(e){let{max:t,length:n}=e;function r(e){let r=e-t;return n?r/-n:0}return{get:r}}function To(e,t,n,r,i){let{startEdge:a,endEdge:o}=e,{groupSlides:s}=i,c=d().map(t.measure),l=f(),u=p();function d(){return s(r).map(e=>eo(e)[o]-e[0][a]).map(Ja)}function f(){return r.map(e=>n[a]-e[a]).map(e=>-Ja(e))}function p(){return s(l).map(e=>e[0]).map((e,t)=>e+c[t])}return{snaps:l,snapsAligned:u}}function Eo(e,t,n,r,i,a){let{groupSlides:o}=i,{min:s,max:c}=r,l=u();function u(){let r=o(a),i=!e||t===`keepSnaps`;return n.length===1?[a]:i?r:r.slice(s,c).map((e,t,n)=>{let r=!t,i=no(n,t);return r?ro(eo(n[0])+1):i?ro(to(a)-eo(n)[0]+1,eo(n)[0]):e})}return{slideRegistry:l}}function Do(e,t,n,r,i){let{reachedAny:a,removeOffset:o,constrain:s}=r;function c(e){return e.concat().sort((e,t)=>Ja(e)-Ja(t))[0]}function l(n){let r=e?o(n):s(n),{index:i}=t.map((e,t)=>({diff:u(e-r,0),index:t})).sort((e,t)=>Ja(e.diff)-Ja(t.diff))[0];return{index:i,distance:r}}function u(t,r){let i=[t,t+n,t-n];if(!e)return t;if(!r)return c(i);let a=i.filter(e=>Ya(e)===r);return a.length?c(a):eo(i)-n}function d(e,n){return{index:e,distance:u(t[e]-i.get(),n)}}function f(n,r){let o=i.get()+n,{index:s,distance:c}=l(o),d=!e&&a(o);return!r||d?{index:s,distance:n}:{index:s,distance:n+u(t[s]-c,0)}}return{byDistance:f,byIndex:d,shortcut:u}}function Oo(e,t,n,r,i,a,o){function s(i){let s=i.distance,c=i.index!==t.get();a.add(s),s&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),c&&(n.set(t.get()),t.set(i.index),o.emit(`select`))}function c(e,t){s(i.byDistance(e,t))}function l(e,n){let r=t.clone().set(e);s(i.byIndex(r.get(),n))}return{distance:c,index:l}}function ko(e,t,n,r,i,a,o,s){let c={passive:!0,capture:!0},l=0;function u(u){if(!s)return;function f(t){if(new Date().getTime()-l>10)return;o.emit(`slideFocusStart`),e.scrollLeft=0;let a=n.findIndex(e=>e.includes(t));Wa(a)&&(i.useDuration(0),r.index(a,0),o.emit(`slideFocus`))}a.add(document,`keydown`,d,!1),t.forEach((e,t)=>{a.add(e,`focus`,e=>{(Ka(s)||s(u,e))&&f(t)},c)})}function d(e){e.code===`Tab`&&(l=new Date().getTime())}return{init:u}}function Ao(e){let t=e;function n(){return t}function r(e){t=o(e)}function i(e){t+=o(e)}function a(e){t-=o(e)}function o(e){return Wa(e)?e:e.get()}return{get:n,set:r,add:i,subtract:a}}function jo(e,t){let n=e.scroll===`x`?o:s,r=t.style,i=null,a=!1;function o(e){return`translate3d(${e}px,0px,0px)`}function s(e){return`translate3d(0px,${e}px,0px)`}function c(t){if(a)return;let o=Qa(e.direction(t));o!==i&&(r.transform=n(o),i=o)}function l(e){a=!e}function u(){a||(r.transform=``,t.getAttribute(`style`)||t.removeAttribute(`style`))}return{clear:u,to:c,toggleActive:l}}function Mo(e,t,n,r,i,a,o,s,c){let l=.5,u=$a(i),d=$a(i).reverse(),f=_().concat(v());function p(e,t){return e.reduce((e,t)=>e-i[t],t)}function m(e,t){return e.reduce((e,n)=>p(e,t)>0?e.concat([n]):e,[])}function h(e){return a.map((n,i)=>({start:n-r[i]+l+e,end:n+t-l+e}))}function g(t,r,i){let a=h(r);return t.map(t=>{let r=i?0:-n,o=i?n:0,l=i?`end`:`start`,u=a[t][l];return{index:t,loopPoint:u,slideLocation:Ao(-1),translate:jo(e,c[t]),target:()=>s.get()>u?r:o}})}function _(){let e=o[0];return g(m(d,e),n,!1)}function v(){return g(m(u,t-o[0]-1),-n,!0)}function y(){return f.every(({index:e})=>p(u.filter(t=>t!==e),t)<=.1)}function b(){f.forEach(e=>{let{target:t,translate:n,slideLocation:r}=e,i=t();i!==r.get()&&(n.to(i),r.set(i))})}function x(){f.forEach(e=>e.translate.clear())}return{canLoop:y,clear:x,loop:b,loopPoints:f}}function No(e,t,n){let r,i=!1;function a(a){if(!n)return;function o(e){for(let n of e)if(n.type===`childList`){a.reInit(),t.emit(`slidesChanged`);break}}r=new MutationObserver(e=>{i||(Ka(n)||n(a,e))&&o(e)}),r.observe(e,{childList:!0})}function o(){r&&r.disconnect(),i=!0}return{init:a,destroy:o}}function Po(e,t,n,r){let i={},a=null,o=null,s,c=!1;function l(){s=new IntersectionObserver(e=>{c||(e.forEach(e=>{let n=t.indexOf(e.target);i[n]=e}),a=null,o=null,n.emit(`slidesInView`))},{root:e.parentElement,threshold:r}),t.forEach(e=>s.observe(e))}function u(){s&&s.disconnect(),c=!0}function d(e){return io(i).reduce((t,n)=>{let r=parseInt(n),{isIntersecting:a}=i[r];return(e&&a||!e&&!a)&&t.push(r),t},[])}function f(e=!0){if(e&&a)return a;if(!e&&o)return o;let t=d(e);return e&&(a=t),e||(o=t),t}return{init:l,destroy:u,get:f}}function Fo(e,t,n,r,i,a){let{measureSize:o,startEdge:s,endEdge:c}=e,l=n[0]&&i,u=m(),d=h(),f=n.map(o),p=g();function m(){if(!l)return 0;let e=n[0];return Ja(t[s]-e[s])}function h(){if(!l)return 0;let e=a.getComputedStyle(eo(r));return parseFloat(e.getPropertyValue(`margin-${c}`))}function g(){return n.map((e,t,n)=>{let r=!t,i=no(n,t);return r?f[t]+u:i?f[t]+d:n[t+1][s]-e[s]}).map(Ja)}return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}function Io(e,t,n,r,i,a,o,s,c){let{startEdge:l,endEdge:u,direction:d}=e,f=Wa(n);function p(e,t){return $a(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}function m(e){return e.length?$a(e).reduce((n,f,p)=>{let m=eo(n)||0,h=m===0,g=f===to(e),_=i[l]-a[m][l],v=i[l]-a[f][u],y=!r&&h?d(o):0,b=Ja(v-(!r&&g?d(s):0)-(_+y));return p&&b>t+c&&n.push(f),g&&n.push(e.length),n},[]).map((t,n,r)=>{let i=Math.max(r[n-1]||0);return e.slice(i,t)}):[]}function h(e){return f?p(e,n):m(e)}return{groupSlides:h}}function Lo(e,t,n,r,i,a,o){let{align:s,axis:c,direction:l,startIndex:u,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:h,slidesToScroll:g,skipSnaps:_,containScroll:v,watchResize:y,watchSlides:b,watchDrag:x,watchFocus:S}=a,C=go(),w=C.measure(t),T=n.map(C.measure),E=uo(c,l),D=E.measureSize(w),O=_o(D),k=so(s,D),A=!d&&!!v,{slideSizes:j,slideSizesWithGaps:M,startGap:N,endGap:P}=Fo(E,w,T,n,d||!!v,i),F=Io(E,D,g,d,w,T,N,P,2),{snaps:I,snapsAligned:L}=To(E,k,w,T,F),R=-eo(I)+eo(M),{snapsContained:z,scrollContainLimit:B}=xo(D,R,L,v,2),ee=A?z:L,{limit:te}=So(R,ee,d),V=po(to(ee),u,d),H=V.clone(),U=$a(n),W=({dragHandler:e,scrollBody:t,scrollBounds:n,options:{loop:r}})=>{r||n.constrain(e.pointerDown()),t.seek()},G=({scrollBody:e,translate:t,location:n,offsetLocation:r,previousLocation:i,scrollLooper:a,slideLooper:o,dragHandler:s,animation:c,eventHandler:l,scrollBounds:u,options:{loop:d}},f)=>{let p=e.settled(),m=!u.shouldConstrain(),h=d?p:p&&m,g=h&&!s.pointerDown();g&&c.stop();let _=n.get()*f+i.get()*(1-f);r.set(_),d&&(a.loop(e.direction()),o.loop()),t.to(r.get()),g&&l.emit(`settle`),h||l.emit(`scroll`)},ne=lo(r,i,()=>W(pe),e=>G(pe,e)),K=.68,q=ee[V.get()],re=Ao(q),J=Ao(q),ie=Ao(q),Y=Ao(q),ae=yo(re,ie,J,Y,f,K),oe=Do(d,ee,R,te,Y),se=Oo(ne,V,H,ae,oe,Y,o),ce=wo(te),le=co(),ue=Po(t,n,o,h),{slideRegistry:de}=Eo(A,v,ee,B,F,U),fe=ko(e,n,de,se,ae,le,o,S),pe={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:w,slideRects:T,animation:ne,axis:E,dragHandler:mo(E,e,r,i,Y,ho(E,i),re,ne,se,ae,oe,V,o,O,p,m,_,K,x),eventStore:le,percentOfView:O,index:V,indexPrevious:H,limit:te,location:re,offsetLocation:ie,previousLocation:J,options:a,resizeHandler:vo(t,o,i,n,E,y,C),scrollBody:ae,scrollBounds:bo(te,ie,Y,ae,O),scrollLooper:Co(R,te,ie,[re,ie,J,Y]),scrollProgress:ce,scrollSnapList:ee.map(ce.get),scrollSnaps:ee,scrollTarget:oe,scrollTo:se,slideLooper:Mo(E,D,R,j,M,I,ee,ie,n),slideFocus:fe,slidesHandler:No(t,o,b),slidesInView:ue,slideIndexes:U,slideRegistry:de,slidesToScroll:F,target:Y,translate:jo(E,t)};return pe}function Ro(){let e={},t;function n(e){t=e}function r(t){return e[t]||[]}function i(e){return r(e).forEach(n=>n(t,e)),c}function a(t,n){return e[t]=r(t).concat([n]),c}function o(t,n){return e[t]=r(t).filter(e=>e!==n),c}function s(){e={}}let c={init:n,emit:i,off:o,on:a,clear:s};return c}var zo={align:`center`,axis:`x`,container:null,slides:null,containScroll:`trimSnaps`,direction:`ltr`,slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function Bo(e){function t(e,t){return ao(e,t||{})}function n(n){let r=n.breakpoints||{};return t(n,io(r).filter(t=>e.matchMedia(t).matches).map(e=>r[e]).reduce((e,n)=>t(e,n),{}))}function r(t){return t.map(e=>io(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function Vo(e){let t=[];function n(n,r){return t=r.filter(({options:t})=>e.optionsAtMedia(t).active!==!1),t.forEach(t=>t.init(n,e)),r.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})}function r(){t=t.filter(e=>e.destroy())}return{init:n,destroy:r}}function Ho(e,t,n){let r=e.ownerDocument,i=r.defaultView,a=Bo(i),o=Vo(a),s=co(),c=Ro(),{mergeOptions:l,optionsAtMedia:u,optionsMediaQueries:d}=a,{on:f,off:p,emit:m}=c,h=D,g=!1,_,v=l(zo,Ho.globalOptions),y=l(v),b=[],x,S,C;function w(){let{container:t,slides:n}=y;S=(Ga(t)?e.querySelector(t):t)||e.children[0];let r=Ga(n)?S.querySelectorAll(n):n;C=[].slice.call(r||S.children)}function T(t){let n=Lo(e,S,C,r,i,t,c);return t.loop&&!n.slideLooper.canLoop()?T(Object.assign({},t,{loop:!1})):n}function E(e,t){g||(v=l(v,e),y=u(v),b=t||b,w(),_=T(y),d([v,...b.map(({options:e})=>e)]).forEach(e=>s.add(e,`change`,D)),y.active&&(_.translate.to(_.location.get()),_.animation.init(),_.slidesInView.init(),_.slideFocus.init(W),_.eventHandler.init(W),_.resizeHandler.init(W),_.slidesHandler.init(W),_.options.loop&&_.slideLooper.loop(),S.offsetParent&&C.length&&_.dragHandler.init(W),x=o.init(W,b)))}function D(e,t){let n=L();O(),E(l({startIndex:n},e),t),c.emit(`reInit`)}function O(){_.dragHandler.destroy(),_.eventStore.clear(),_.translate.clear(),_.slideLooper.clear(),_.resizeHandler.destroy(),_.slidesHandler.destroy(),_.slidesInView.destroy(),_.animation.destroy(),o.destroy(),s.clear()}function k(){g||(g=!0,s.clear(),O(),c.emit(`destroy`),c.clear())}function A(e,t,n){!y.active||g||(_.scrollBody.useBaseFriction().useDuration(t===!0?0:y.duration),_.scrollTo.index(e,n||0))}function j(e){A(_.index.add(1).get(),e,-1)}function M(e){A(_.index.add(-1).get(),e,1)}function N(){return _.index.add(1).get()!==L()}function P(){return _.index.add(-1).get()!==L()}function F(){return _.scrollSnapList}function I(){return _.scrollProgress.get(_.offsetLocation.get())}function L(){return _.index.get()}function R(){return _.indexPrevious.get()}function z(){return _.slidesInView.get()}function B(){return _.slidesInView.get(!1)}function ee(){return x}function te(){return _}function V(){return e}function H(){return S}function U(){return C}let W={canScrollNext:N,canScrollPrev:P,containerNode:H,internalEngine:te,destroy:k,off:p,on:f,emit:m,plugins:ee,previousScrollSnap:R,reInit:h,rootNode:V,scrollNext:j,scrollPrev:M,scrollProgress:I,scrollSnapList:F,scrollTo:A,selectedScrollSnap:L,slideNodes:U,slidesInView:z,slidesNotInView:B};return E(t,n),setTimeout(()=>c.emit(`init`),0),W}Ho.globalOptions=void 0;function Uo(e={},t=[]){let n=(0,Z.useRef)(e),r=(0,Z.useRef)(t),[i,a]=(0,Z.useState)(),[o,s]=(0,Z.useState)(),c=(0,Z.useCallback)(()=>{i&&i.reInit(n.current,r.current)},[i]);return(0,Z.useEffect)(()=>{Va(n.current,e)||(n.current=e,c())},[e,c]),(0,Z.useEffect)(()=>{Ua(r.current,t)||(r.current=t,c())},[t,c]),(0,Z.useEffect)(()=>{if(Ba()&&o){Ho.globalOptions=Uo.globalOptions;let e=Ho(o,n.current,r.current);return a(e),()=>e.destroy()}else a(void 0)},[o,a]),[s,i]}Uo.globalOptions=void 0;var Wo=Z.createContext(null);function Go(){let e=Z.useContext(Wo);if(!e)throw Error(`useCarousel must be used within a <Carousel />`);return e}var Ko=Z.forwardRef((e,t)=>{let n=(0,$.c)(46),r,i,a,o,s,c,l;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6],l=n[7]):({orientation:l,opts:a,setApi:c,plugins:o,className:i,children:r,...s}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s,n[6]=c,n[7]=l);let u=l===void 0?`horizontal`:l,d=u===`horizontal`?`x`:`y`,f;n[8]!==a||n[9]!==d?(f={...a,axis:d},n[8]=a,n[9]=d,n[10]=f):f=n[10];let[p,m]=Uo(f,o),[h,g]=Z.useState(!1),[_,v]=Z.useState(!1),y;n[11]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>{e&&(g(e.canScrollPrev()),v(e.canScrollNext()))},n[11]=y):y=n[11];let b=y,x;n[12]===m?x=n[13]:(x=()=>{m?.scrollPrev()},n[12]=m,n[13]=x);let S=x,C;n[14]===m?C=n[15]:(C=()=>{m?.scrollNext()},n[14]=m,n[15]=C);let w=C,T;n[16]!==w||n[17]!==S?(T=e=>{e.key===`ArrowLeft`?(e.preventDefault(),S()):e.key===`ArrowRight`&&(e.preventDefault(),w())},n[16]=w,n[17]=S,n[18]=T):T=n[18];let E=T,D,O;n[19]!==m||n[20]!==c?(D=()=>{!m||!c||c(m)},O=[m,c],n[19]=m,n[20]=c,n[21]=D,n[22]=O):(D=n[21],O=n[22]),Z.useEffect(D,O);let k,A;n[23]===m?(k=n[24],A=n[25]):(k=()=>{if(m)return b(m),m.on(`reInit`,b),m.on(`select`,b),()=>{m?.off(`select`,b)}},A=[m,b],n[23]=m,n[24]=k,n[25]=A),Z.useEffect(k,A);let j=u||(a?.axis===`y`?`vertical`:`horizontal`),M;n[26]!==m||n[27]!==_||n[28]!==h||n[29]!==p||n[30]!==a||n[31]!==w||n[32]!==S||n[33]!==j?(M={carouselRef:p,api:m,opts:a,orientation:j,scrollPrev:S,scrollNext:w,canScrollPrev:h,canScrollNext:_},n[26]=m,n[27]=_,n[28]=h,n[29]=p,n[30]=a,n[31]=w,n[32]=S,n[33]=j,n[34]=M):M=n[34];let N;n[35]===i?N=n[36]:(N=X(`relative`,i),n[35]=i,n[36]=N);let P;n[37]!==r||n[38]!==E||n[39]!==s||n[40]!==t||n[41]!==N?(P=(0,Q.jsx)(`div`,{ref:t,onKeyDownCapture:E,className:N,role:`region`,"aria-roledescription":`carousel`,...s,children:r}),n[37]=r,n[38]=E,n[39]=s,n[40]=t,n[41]=N,n[42]=P):P=n[42];let F;return n[43]!==M||n[44]!==P?(F=(0,Q.jsx)(Wo.Provider,{value:M,children:P}),n[43]=M,n[44]=P,n[45]=F):F=n[45],F});Ko.displayName=`Carousel`;var qo=Z.forwardRef((e,t)=>{let n=(0,$.c)(13),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let{carouselRef:a,orientation:o}=Go(),s=o===`horizontal`?`-ml-4`:`-mt-4 flex-col`,c;n[3]!==r||n[4]!==s?(c=X(`flex`,s,r),n[3]=r,n[4]=s,n[5]=c):c=n[5];let l;n[6]!==i||n[7]!==t||n[8]!==c?(l=(0,Q.jsx)(`div`,{ref:t,className:c,...i}),n[6]=i,n[7]=t,n[8]=c,n[9]=l):l=n[9];let u;return n[10]!==a||n[11]!==l?(u=(0,Q.jsx)(`div`,{ref:a,className:`overflow-hidden`,children:l}),n[10]=a,n[11]=l,n[12]=u):u=n[12],u});qo.displayName=`CarouselContent`;var Jo=Z.forwardRef((e,t)=>{let n=(0,$.c)(10),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let{orientation:a}=Go(),o=a===`horizontal`?`pl-4`:`pt-4`,s;n[3]!==r||n[4]!==o?(s=X(`min-w-0 shrink-0 grow-0 basis-full`,o,r),n[3]=r,n[4]=o,n[5]=s):s=n[5];let c;return n[6]!==i||n[7]!==t||n[8]!==s?(c=(0,Q.jsx)(`div`,{ref:t,role:`group`,"aria-roledescription":`slide`,className:s,...i}),n[6]=i,n[7]=t,n[8]=s,n[9]=c):c=n[9],c});Jo.displayName=`CarouselItem`;var Yo=Z.forwardRef((e,t)=>{let n=(0,$.c)(18),r,i,a,o;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4]):({className:r,variant:a,size:o,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let s=a===void 0?`outline`:a,c=o===void 0?`icon`:o,{orientation:l,scrollPrev:u,canScrollPrev:d}=Go(),f=l===`horizontal`?`-left-12 top-1/2 -translate-y-1/2`:`-top-12 left-1/2 -translate-x-1/2 rotate-90`,p;n[5]!==r||n[6]!==f?(p=X(`absolute h-8 w-8 rounded-full`,f,r),n[5]=r,n[6]=f,n[7]=p):p=n[7];let m=!d,h,g;n[8]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Q.jsx)(q,{name:`ArrowLeft`,className:`h-4 w-4`}),g=(0,Q.jsx)(`span`,{className:`sr-only`,children:`Previous slide`}),n[8]=h,n[9]=g):(h=n[8],g=n[9]);let _;return n[10]!==i||n[11]!==t||n[12]!==u||n[13]!==c||n[14]!==p||n[15]!==m||n[16]!==s?(_=(0,Q.jsxs)(ft,{ref:t,variant:s,size:c,className:p,disabled:m,onClick:u,...i,children:[h,g]}),n[10]=i,n[11]=t,n[12]=u,n[13]=c,n[14]=p,n[15]=m,n[16]=s,n[17]=_):_=n[17],_});Yo.displayName=`CarouselPrevious`;var Xo=Z.forwardRef((e,t)=>{let n=(0,$.c)(18),r,i,a,o;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4]):({className:r,variant:a,size:o,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let s=a===void 0?`outline`:a,c=o===void 0?`icon`:o,{orientation:l,scrollNext:u,canScrollNext:d}=Go(),f=l===`horizontal`?`-right-12 top-1/2 -translate-y-1/2`:`-bottom-12 left-1/2 -translate-x-1/2 rotate-90`,p;n[5]!==r||n[6]!==f?(p=X(`absolute h-8 w-8 rounded-full`,f,r),n[5]=r,n[6]=f,n[7]=p):p=n[7];let m=!d,h,g;n[8]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Q.jsx)(q,{name:`ArrowRight`,className:`h-4 w-4`}),g=(0,Q.jsx)(`span`,{className:`sr-only`,children:`Next slide`}),n[8]=h,n[9]=g):(h=n[8],g=n[9]);let _;return n[10]!==i||n[11]!==t||n[12]!==u||n[13]!==c||n[14]!==p||n[15]!==m||n[16]!==s?(_=(0,Q.jsxs)(ft,{ref:t,variant:s,size:c,className:p,disabled:m,onClick:u,...i,children:[h,g]}),n[10]=i,n[11]=t,n[12]=u,n[13]=c,n[14]=p,n[15]=m,n[16]=s,n[17]=_):_=n[17],_});Xo.displayName=`CarouselNext`;var Zo=[`a`,`blockquote`,`br`,`code`,`del`,`em`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`hr`,`li`,`ol`,`p`,`pre`,`strong`,`ul`],Qo=[pr];function $o(e){try{return new URL(e).protocol===`https:`?e:null}catch{return null}}var es=e=>$o(e)??``;function ts(e){let t=(0,$.c)(7),{children:n,href:r}=e,i;t[0]===r?i=t[1]:(i=r===void 0?null:$o(r),t[0]=r,t[1]=i);let a=i;if(a===null){let e;return t[2]===n?e=t[3]:(e=(0,Q.jsx)(`span`,{children:n}),t[2]=n,t[3]=e),e}let o;return t[4]!==n||t[5]!==a?(o=(0,Q.jsx)(`a`,{href:a,target:`_blank`,rel:`noopener noreferrer`,className:`break-words [overflow-wrap:anywhere] underline underline-offset-2 hover:text-foreground`,children:n}),t[4]=n,t[5]=a,t[6]=o):o=t[6],o}function ns(e){let t=(0,$.c)(4),{children:n,minor:r}=e,i=r===void 0?!1:r,a=i?`h4`:`h3`,o=i?`mb-1 mt-4 text-xs font-medium text-foreground first:mt-0`:`mb-1 mt-6 text-sm font-medium text-foreground first:mt-0`,s;return t[0]!==a||t[1]!==n||t[2]!==o?(s=(0,Q.jsx)(a,{className:o,children:n}),t[0]=a,t[1]=n,t[2]=o,t[3]=s):s=t[3],s}var rs={a:ts,blockquote:({children:e})=>(0,Q.jsx)(`blockquote`,{className:`my-2 border-l-2 border-surface-selected-border pl-3`,children:e}),code:({children:e})=>(0,Q.jsx)(`code`,{className:`rounded-sm bg-surface-recessed px-1 font-mono text-xs text-foreground [box-decoration-break:clone]`,children:e}),h1:({children:e})=>(0,Q.jsx)(ns,{children:e}),h2:({children:e})=>(0,Q.jsx)(ns,{children:e}),h3:({children:e})=>(0,Q.jsx)(ns,{children:e}),h4:({children:e})=>(0,Q.jsx)(ns,{minor:!0,children:e}),h5:({children:e})=>(0,Q.jsx)(ns,{minor:!0,children:e}),h6:({children:e})=>(0,Q.jsx)(ns,{minor:!0,children:e}),hr:()=>(0,Q.jsx)(`hr`,{className:`my-4 border-t border-border`}),li:({children:e})=>(0,Q.jsx)(`li`,{className:`pl-0.5`,children:e}),ol:({children:e})=>(0,Q.jsx)(`ol`,{className:`mb-3 list-decimal space-y-1 pl-4 marker:text-subtle-foreground`,children:e}),p:({children:e})=>(0,Q.jsx)(`p`,{className:`mb-3 last:mb-0`,children:e}),pre:({children:e})=>(0,Q.jsx)(`pre`,{className:`my-2 overflow-x-auto rounded-md border border-border bg-surface-recessed p-3 font-mono text-xs text-foreground`,children:e}),ul:({children:e})=>(0,Q.jsx)(`ul`,{className:`mb-3 list-disc space-y-1 pl-4 marker:text-subtle-foreground`,children:e})};function is(e){let t=(0,$.c)(2),{markdown:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Q.jsx)(`div`,{"data-plugin-overview":``,className:`break-words text-sm leading-relaxed text-muted-foreground`,children:(0,Q.jsx)(fr,{allowedElements:Zo,unwrapDisallowed:!0,skipHtml:!0,remarkPlugins:Qo,components:rs,urlTransform:es,children:n})}),t[0]=n,t[1]=r),r}function as(e){let n=(0,$.c)(8),{entry:r}=e,i;n[0]===r?i=n[1]:(i=(0,Q.jsx)(`span`,{className:`min-w-0 truncate`,children:(0,Q.jsx)(Fn,{entry:r})}),n[0]=r,n[1]=i);let a;n[2]!==r.category||n[3]!==r.categoryId?(a=r.category===void 0||Un(r.categoryId)===void 0?null:(0,Q.jsxs)(`span`,{className:`flex min-w-0 shrink-[100] items-center gap-1`,children:[(0,Q.jsx)(er,{categoryId:r.categoryId,className:`size-3`}),(0,Q.jsx)(t,{to:{pathname:Ce(),search:new URLSearchParams({shelf:`category:${r.categoryId}`}).toString()},"aria-label":`Browse ${r.category} plugins`,className:`min-w-0 truncate rounded-sm underline decoration-border underline-offset-2 hover:text-foreground hover:decoration-current focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:r.category})]}),n[2]=r.category,n[3]=r.categoryId,n[4]=a):a=n[4];let o;return n[5]!==i||n[6]!==a?(o=(0,Q.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[i,a]}),n[5]=i,n[6]=a,n[7]=o):o=n[7],o}function os(e){let t=(0,$.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Q.jsx)(`dl`,{className:`grid grid-cols-2 gap-x-6 gap-y-4`,children:n}),t[0]=n,t[1]=r),r}function ss(e){let t=(0,$.c)(7),{label:n,children:r}=e,i;t[0]===n?i=t[1]:(i=(0,Q.jsx)(`dt`,{className:`text-2xs font-medium text-subtle-foreground`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=(0,Q.jsx)(`dd`,{className:`min-w-0 text-xs text-foreground`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,Q.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function cs(e){let t=(0,$.c)(8),{entry:n}=e,r;t[0]!==n.marketplace||t[1]!==n.marketplaceDisplayName?(r=n.marketplace===`bb-official`?null:(0,Q.jsx)(ss,{label:`Marketplace`,children:n.marketplaceDisplayName}),t[0]=n.marketplace,t[1]=n.marketplaceDisplayName,t[2]=r):r=t[2];let i;t[3]===n.publishedAt?i=t[4]:(i=n.publishedAt===void 0?null:(0,Q.jsx)(ss,{label:`Listed`,children:(0,Q.jsx)(`time`,{dateTime:n.publishedAt,children:new Date(n.publishedAt).toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`numeric`})})}),t[3]=n.publishedAt,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsxs)(Q.Fragment,{children:[r,i]}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ls(e){let t=(0,$.c)(12),{entry:n}=e;if(n.repositoryUrl===null)return null;let r=n.repositoryUrl,i;t[0]===n.repositoryUrl?i=t[1]:(i=n.repositoryUrl.startsWith(`https://github.com/`)?(0,Q.jsx)(q,{name:`GithubLogo`,className:`size-4.5 shrink-0 fill-current [&_*]:stroke-0`,"aria-hidden":!0}):null,t[0]=n.repositoryUrl,t[1]=i);let a;t[2]===n.repositoryUrl?a=t[3]:(a=Yn(n.repositoryUrl),t[2]=n.repositoryUrl,t[3]=a);let o;t[4]===a?o=t[5]:(o=(0,Q.jsx)(`span`,{className:`truncate`,children:a}),t[4]=a,t[5]=o);let s,c;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Q.jsx)(q,{name:`ExternalLink`,className:`size-3.5 shrink-0`,"aria-hidden":!0}),c=(0,Q.jsx)(`span`,{className:`sr-only`,children:`Opens in a new tab`}),t[6]=s,t[7]=c):(s=t[6],c=t[7]);let l;return t[8]!==n.repositoryUrl||t[9]!==i||t[10]!==o?(l=(0,Q.jsx)(mn,{label:`Source`,children:(0,Q.jsxs)(`a`,{href:r,target:`_blank`,rel:`noreferrer`,className:`inline-flex max-w-full items-center gap-1.5 rounded-sm text-sm text-muted-foreground underline underline-offset-2 hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:[i,o,s,c]})}),t[8]=n.repositoryUrl,t[9]=i,t[10]=o,t[11]=l):l=t[11],l}var us=420;function ds(e){let t=(0,$.c)(27),{entry:n}=e,[r,i]=(0,Z.useState)(),[a,o]=(0,Z.useState)(0),s,c;if(t[0]===r?(s=t[1],c=t[2]):(s=()=>{if(r===void 0)return;let e=()=>o(r.selectedScrollSnap());return e(),r.on(`select`,e),r.on(`reInit`,e),()=>{r.off(`select`,e),r.off(`reInit`,e)}},c=[r],t[0]=r,t[1]=s,t[2]=c),(0,Z.useEffect)(s,c),n.screenshots.length===0)return null;let l;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(l={align:`start`,containScroll:`trimSnaps`},t[3]=l):l=t[3];let u=`${n.displayName} screenshots`,d=n.screenshots.length>1&&`px-11`,f;t[4]===d?f=t[5]:(f=X(`w-full`,d),t[4]=d,t[5]=f);let p;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(p={minHeight:`${us}px`},t[6]=p):p=t[6];let m;if(t[7]!==n.displayName||t[8]!==n.screenshots){let e;t[10]===n.displayName?e=t[11]:(e=(e,t)=>(0,Q.jsx)(Jo,{className:`basis-auto pl-3`,children:(0,Q.jsx)(`img`,{src:e,alt:`${n.displayName} screenshot ${t+1}`,referrerPolicy:`no-referrer`,loading:`lazy`,className:`h-auto w-auto rounded-md border border-border object-contain`,style:{maxHeight:`${us}px`,maxWidth:`${us*2}px`}})},e),t[10]=n.displayName,t[11]=e),m=n.screenshots.map(e),t[7]=n.displayName,t[8]=n.screenshots,t[9]=m}else m=t[9];let h;t[12]===m?h=t[13]:(h=(0,Q.jsx)(qo,{className:`-ml-3 items-center`,style:p,children:m}),t[12]=m,t[13]=h);let g;t[14]===n.screenshots.length?g=t[15]:(g=n.screenshots.length>1?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Yo,{className:`left-0 size-8`}),(0,Q.jsx)(Xo,{className:`right-0 size-8`})]}):null,t[14]=n.screenshots.length,t[15]=g);let _;t[16]!==g||t[17]!==u||t[18]!==f||t[19]!==h?(_=(0,Q.jsxs)(Ko,{setApi:i,opts:l,"aria-label":u,className:f,children:[h,g]}),t[16]=g,t[17]=u,t[18]=f,t[19]=h,t[20]=_):_=t[20];let v;t[21]!==n.screenshots||t[22]!==a?(v=n.screenshots.length>1?(0,Q.jsx)(`div`,{className:`flex justify-center gap-1.5`,"aria-label":`Screenshot ${a+1} of ${n.screenshots.length}`,role:`status`,children:n.screenshots.map((e,t)=>(0,Q.jsx)(`span`,{"aria-hidden":!0,className:X(`h-1 rounded-full transition-[width,background-color]`,t===a?`w-4 bg-foreground/70`:`w-2 bg-border`)},e))}):null,t[21]=n.screenshots,t[22]=a,t[23]=v):v=t[23];let y;return t[24]!==_||t[25]!==v?(y=(0,Q.jsxs)(Q.Fragment,{children:[_,v]}),t[24]=_,t[25]=v,t[26]=y):y=t[26],y}function fs(e){let t=(0,$.c)(2),{description:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Q.jsx)(`p`,{className:`text-sm leading-relaxed text-foreground`,"data-plugin-summary":``,children:n}),t[0]=n,t[1]=r),r}function ps(e){let t=(0,$.c)(12),{entry:n}=e,r;t[0]===n?r=t[1]:(r=(0,Q.jsx)(ds,{entry:n}),t[0]=n,t[1]=r);let i;t[2]===n.description?i=t[3]:(i=(0,Q.jsx)(fs,{description:n.description}),t[2]=n.description,t[3]=i);let a;t[4]===n.overview?a=t[5]:(a=n.overview===void 0?null:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`hr`,{className:`border-t border-border`}),(0,Q.jsx)(`h2`,{className:`text-sm font-medium text-foreground`,children:`Overview`}),(0,Q.jsx)(is,{markdown:n.overview})]}),t[4]=n.overview,t[5]=a);let o;t[6]!==i||t[7]!==a?(o=(0,Q.jsxs)(`div`,{className:`max-w-prose space-y-4`,children:[i,a]}),t[6]=i,t[7]=a,t[8]=o):o=t[8];let s;return t[9]!==r||t[10]!==o?(s=(0,Q.jsxs)(`section`,{className:`space-y-6`,"data-resource-detail-section":`overview`,children:[r,o]}),t[9]=r,t[10]=o,t[11]=s):s=t[11],s}function ms(e){let t=(0,$.c)(8),{entry:n}=e,r,i,a;t[0]===n?(r=t[1],i=t[2],a=t[3]):(r=(0,Q.jsx)(ps,{entry:n}),i=(0,Q.jsx)(ls,{entry:n}),a=n.marketplace===`bb-official`&&n.publishedAt===void 0?null:(0,Q.jsx)(mn,{label:`Details`,children:(0,Q.jsx)(os,{children:(0,Q.jsx)(cs,{entry:n})})}),t[0]=n,t[1]=r,t[2]=i,t[3]=a);let o;return t[4]!==r||t[5]!==i||t[6]!==a?(o=(0,Q.jsxs)(Q.Fragment,{children:[r,i,a]}),t[4]=r,t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function hs(e){let t=(0,$.c)(14),{entry:n,catalogEntries:r,onOpenPlugin:i}=e,a;t[0]===n?a=t[1]:(a=Mn(n),t[0]=n,t[1]=a);let o=a,s;t[2]!==o||t[3]!==r||t[4]!==n.entryId||t[5]!==n.marketplace?(s=o===null?[]:ir(r,o).filter(e=>e.compatible&&(e.marketplace!==n.marketplace||e.entryId!==n.entryId)).sort(gs).slice(0,4),t[2]=o,t[3]=r,t[4]=n.entryId,t[5]=n.marketplace,t[6]=s):s=t[6];let c=s;if(c.length===0)return null;let l;if(t[7]!==c||t[8]!==i){let e;t[10]===i?e=t[11]:(e=e=>{let t=Kn(e.displayName);return(0,Q.jsx)(Tn,{leading:(0,Q.jsx)(Xn,{entry:e}),title:t.name,titleMeta:t.tag?(0,Q.jsx)(kn,{tag:t.tag}):void 0,description:e.description||void 0,trailingVisual:(0,Q.jsx)($t,{}),openLabel:`Open ${e.displayName} details`,onOpen:()=>i(_e(e))},`${e.marketplace}/${e.entryId}`)},t[10]=i,t[11]=e),l=c.map(e),t[7]=c,t[8]=i,t[9]=l}else l=t[9];let u;return t[12]===l?u=t[13]:(u=(0,Q.jsx)(mn,{label:`More from this author`,children:(0,Q.jsx)(Cn,{className:`py-0`,children:l})}),t[12]=l,t[13]=u),u}function gs(e,t){return e.displayName.localeCompare(t.displayName)||e.entryId.localeCompare(t.entryId)}var _s=[`browser`,`diagnostics`,`environment`,`file`,`guide`,`help`,`machine`,`marketplace`,`plugin`,`project`,`prompt-history`,`provider`,`server`,`settings`,`skill`,`status`,`terminal`,`theme`,`thread`,`updates`,`voice`];function vs(e,t){return _s.includes(t)?`bb plugin run ${e}`:`bb ${t}`}var ys={destructive:`text-destructive`,warning:`text-warning`,muted:`text-muted-foreground`};function bs(e){let t=(0,$.c)(26),{tone:n,icon:r,title:i,detail:a,action:o,separator:s,role:c}=e,l=(s===void 0?!0:s)&&`border-b`,u;t[0]===l?u=t[1]:(u=X(`@container border-t border-border bg-surface-recessed/55 not-first:border-t-0`,l),t[0]=l,t[1]=u);let d=ys[n],f;t[2]===d?f=t[3]:(f=X(`mt-px size-3.5 shrink-0`,d),t[2]=d,t[3]=f);let p;t[4]!==r||t[5]!==f?(p=(0,Q.jsx)(q,{name:r,className:f,"aria-hidden":!0}),t[4]=r,t[5]=f,t[6]=p):p=t[6];let m;t[7]===i?m=t[8]:(m=(0,Q.jsx)(`span`,{className:`font-medium text-foreground`,children:i}),t[7]=i,t[8]=m);let h;t[9]===a?h=t[10]:(h=a==null?null:(0,Q.jsxs)(Q.Fragment,{children:[`: `,a]}),t[9]=a,t[10]=h);let g;t[11]!==m||t[12]!==h?(g=(0,Q.jsxs)(`p`,{className:`min-w-0 flex-1 text-xs leading-snug text-muted-foreground`,children:[m,h]}),t[11]=m,t[12]=h,t[13]=g):g=t[13];let _;t[14]!==p||t[15]!==g?(_=(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-start gap-2`,children:[p,g]}),t[14]=p,t[15]=g,t[16]=_):_=t[16];let v;t[17]===o?v=t[18]:(v=o?(0,Q.jsx)(`span`,{className:`flex shrink-0 items-center ps-3 @md:ps-0`,children:o}):null,t[17]=o,t[18]=v);let y;t[19]!==_||t[20]!==v?(y=(0,Q.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-5xl flex-col gap-1 px-4 py-1.5 md:px-5 @md:flex-row @md:items-center @md:gap-2`,children:[_,v]}),t[19]=_,t[20]=v,t[21]=y):y=t[21];let b;return t[22]!==c||t[23]!==y||t[24]!==u?(b=(0,Q.jsx)(`div`,{role:c,className:u,children:y}),t[22]=c,t[23]=y,t[24]=u,t[25]=b):b=t[25],b}function xs(e){let t=(0,$.c)(4),{label:n,onClick:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(q,{name:`ChevronRight`,className:`size-3.5`,"aria-hidden":!0}),t[0]=i):i=t[0];let a;return t[1]!==n||t[2]!==r?(a=(0,Q.jsxs)(ft,{type:`button`,variant:`ghost`,size:`sm`,className:`h-7 gap-0.5 px-2.5 text-xs font-normal text-muted-foreground hover:text-foreground`,onClick:r,children:[n,i]}),t[1]=n,t[2]=r,t[3]=a):a=t[3],a}var Ss=`w-40 @min-[40rem]/plugin-detail:w-48`,Cs=`bg-surface-recessed/55`,ws=`grid grid-cols-1 @min-[28rem]/plugin-detail:grid-cols-[10rem_minmax(0,1fr)] @min-[40rem]/plugin-detail:grid-cols-[12rem_minmax(0,1fr)]`;function Ts(e){let t=(0,$.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Q.jsx)(`div`,{className:`@container/plugin-detail max-w-full overflow-hidden rounded-lg border border-border bg-card align-top`,children:(0,Q.jsx)(`table`,{className:`block w-full max-w-full border-collapse text-left`,children:(0,Q.jsx)(`tbody`,{className:`block divide-y divide-border`,children:n})})}),t[0]=n,t[1]=r),r}var Es=`py-1.5 align-top text-sm leading-snug`;function Ds(e){let t=(0,$.c)(13),{icon:n,label:r,className:i}=e,a;t[0]===i?a=t[1]:(a=X(`size-4`,i),t[0]=i,t[1]=a);let o;t[2]!==n||t[3]!==a?(o=(0,Q.jsx)(q,{name:n,className:a,"aria-hidden":!0}),t[2]=n,t[3]=a,t[4]=o):o=t[4];let s;t[5]!==r||t[6]!==o?(s=(0,Q.jsx)(de,{asChild:!0,children:(0,Q.jsx)(`span`,{role:`img`,"aria-label":r,tabIndex:0,className:`inline-flex size-4 shrink-0 items-center justify-center rounded-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:o})}),t[5]=r,t[6]=o,t[7]=s):s=t[7];let c;t[8]===r?c=t[9]:(c=(0,Q.jsx)(O,{children:r}),t[8]=r,t[9]=c);let l;return t[10]!==s||t[11]!==c?(l=(0,Q.jsx)(Pt,{delayDuration:200,children:(0,Q.jsxs)(se,{children:[s,c]})}),t[10]=s,t[11]=c,t[12]=l):l=t[12],l}function Os(e){let t=(0,$.c)(27),{glyph:n,name:r,nameClassName:i,mono:a,detail:o}=e,s=a===void 0?!1:a,c=o!=null&&o!==``,l=(0,Z.useId)(),[u,d]=(0,Z.useState)(!1),f=typeof o==`string`&&o.length>180,p=c?ws:`grid grid-cols-1`,m=c?`border-b border-border px-4 @min-[28rem]/plugin-detail:border-b-0 @min-[28rem]/plugin-detail:border-r @min-[28rem]/plugin-detail:pr-2`:`px-4`,h;t[0]===m?h=t[1]:(h=X(Es,Cs,`flex items-center text-left font-normal`,m),t[0]=m,t[1]=h);let g=c?void 0:2,_;t[2]===n?_=t[3]:(_=(0,Q.jsx)(`span`,{className:`flex shrink-0`,children:n}),t[2]=n,t[3]=_);let v=s&&`font-mono`,y;t[4]!==i||t[5]!==v?(y=X(`min-w-0 break-words text-foreground`,v,i),t[4]=i,t[5]=v,t[6]=y):y=t[6];let b;t[7]!==r||t[8]!==y?(b=(0,Q.jsx)(`span`,{className:y,children:r}),t[7]=r,t[8]=y,t[9]=b):b=t[9];let x;t[10]!==_||t[11]!==b?(x=(0,Q.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[_,b]}),t[10]=_,t[11]=b,t[12]=x):x=t[12];let S;t[13]!==x||t[14]!==h||t[15]!==g?(S=(0,Q.jsx)(`th`,{scope:`row`,className:h,colSpan:g,children:x}),t[13]=x,t[14]=h,t[15]=g,t[16]=S):S=t[16];let C;t[17]!==o||t[18]!==l||t[19]!==u||t[20]!==c||t[21]!==f?(C=c?(0,Q.jsxs)(`td`,{id:l,className:X(Es,`px-4 text-xs leading-normal text-muted-foreground @min-[28rem]/plugin-detail:pl-2`),children:[(0,Q.jsx)(`div`,{className:X(`space-y-2 break-words leading-relaxed`,f&&!u&&`line-clamp-3`),children:o}),f?(0,Q.jsx)(`button`,{type:`button`,"aria-expanded":u,"aria-controls":l,className:`mt-2 rounded-sm text-xs font-medium text-subtle-foreground underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,onClick:()=>d(ks),children:u?`Show less`:`Show full description`}):null]}):null,t[17]=o,t[18]=l,t[19]=u,t[20]=c,t[21]=f,t[22]=C):C=t[22];let w;return t[23]!==S||t[24]!==C||t[25]!==p?(w=(0,Q.jsxs)(`tr`,{className:p,children:[S,C]}),t[23]=S,t[24]=C,t[25]=p,t[26]=w):w=t[26],w}function ks(e){return!e}function As(e){return e===null?{name:`Clock`,className:`text-muted-foreground`,label:`Scheduled`}:e===`running`?{name:`Clock`,className:`animate-shine-icon text-muted-foreground`,label:`Running`}:e===`ok`?{name:`CircleCheck`,className:`text-success`,label:`Succeeded`}:e===`error`?{name:`CircleX`,className:`text-destructive`,label:`Failed`}:{name:`Clock`,className:`text-muted-foreground`,label:`Scheduled`}}function js(e){return e===`running`?{label:`Running`,labelClassName:`animate-shine`,tone:`success`}:e===`backoff`?{label:`Restarting`,labelClassName:`animate-shine`,tone:`muted`}:{label:`Stopped`,statusClassName:`opacity-50`,tone:`muted`}}function Ms(e){let t=(0,$.c)(6),{state:n}=e,r;t[0]===n?r=t[1]:(r=As(n),t[0]=n,t[1]=r);let i=r,a;return t[2]!==i.className||t[3]!==i.label||t[4]!==i.name?(a=(0,Q.jsx)(Ds,{icon:i.name,label:i.label,className:i.className}),t[2]=i.className,t[3]=i.label,t[4]=i.name,t[5]=a):a=t[5],a}function Ns(e,t,n,r,i){let a=n?.trim()||t;return{key:`${e}:${t}`,label:a,detail:a===t?r:(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-baseline gap-x-1.5 gap-y-0.5`,children:[(0,Q.jsx)(`span`,{children:r}),(0,Q.jsx)(`span`,{className:`break-all font-mono text-subtle-foreground`,children:t})]}),mono:a===t,destinationPath:i}}function Ps(e,t,n,r,i){return t.filter(t=>t.pluginId===e).map(e=>Ns(n,e.id,e.title,r,i?.(e)))}function Fs(e,t,n){let r=e.id,i=t.settingsSections.filter(e=>e.pluginId===r);return[...e.hasSettings||i.length>0?[Ns(`settings`,`settings`,`Settings`,`Opens this plugin's configuration.`,n??te({pluginId:r}))]:[],...Ps(r,t.navPanels,`nav`,`Adds a page to the app sidebar.`,e=>B({pluginId:r,path:e.path})),...Ps(r,t.homepageSections,`homepage`,`Adds content to the Home page.`,e=>`${S()}#${xr(r,e.id)}`),...Ps(r,t.appOverlays,`app-overlay`,`Renders app-wide floating interface content.`),...Ps(r,t.threadLists,`thread-list`,`Can replace the sidebar thread list; configured in Appearance.`,()=>pt(`appearance`)),...Ps(r,t.homes,`home`,`Can replace the home page; configured in Appearance.`,()=>pt(`appearance`)),...Ps(r,t.experimentalSidebarNavigations,`sidebar-navigation`,`Can draw the sidebar navigation; configured in Appearance.`,()=>pt(`appearance`)),...Ps(r,t.sourceCodeRenderers,`source-code-renderer`,`Replaces how source code is displayed everywhere in the app.`),...Ps(r,t.diffRenderers,`diff-renderer`,`Replaces how diffs are displayed everywhere in the app.`),...Ps(r,t.composers,`composer`,`Can replace the thread composer; configured in Appearance.`,()=>pt(`appearance`)),...Ps(r,t.threadPanelActions,`thread-panel`,`Adds an action that opens a panel beside a thread.`),...Ps(r,t.newThreadPanelActions,`new-thread-panel`,`Adds an action that opens a panel beside the New thread screen.`),...Ps(r,t.pendingInteractions,`input`,`Renders a custom interaction inside a thread.`),...t.sidebarFooterItems.filter(e=>e.pluginId===r).map(e=>Ns(`sidebar-footer`,e.id,e.label,e.kind===`action`?`Adds an action to the app sidebar footer.`:`Adds content revealed from the app sidebar footer.`)),...Ps(r,t.messageActions,`message-action`,`Adds an action to messages in threads.`),...Ps(r,t.threadHeaderActions,`thread-header`,`Adds an action to thread headers.`),...Ps(r,t.threadContextSegments,`thread-context`,`Adds context beside a thread's composer.`),...Ps(r,t.threadInfoRows,`thread-info-row`,`Adds a row to the thread Info tab.`),...Ps(r,t.threadInfoSections,`thread-info-section`,`Adds a section to the thread Info tab.`),...Ps(r,t.threadActions,`thread-action`,`Adds an action to thread menus.`),...Ps(r,t.browserToolbarActions,`browser-toolbar`,`Adds an action to Browser tab toolbars.`),...t.composerCustomizations.filter(e=>e.pluginId===r).flatMap(e=>[...(e.actions??[]).map(t=>Ns(`composer:${e.id}:action`,t.id,void 0,`Adds an action beside the thread composer.`)),...(e.experimental_popups??[]).map(t=>Ns(`composer:${e.id}:popup:${t.id}`,t.id,t.label,`Opens plugin content beside the composer, sharing the mention menu's placement.`)),...(e.banners??[]).map(t=>Ns(`composer:${e.id}:banner`,t.id,void 0,`Shows information above the thread composer.`)),...(e.plusMenu??[]).map(t=>Ns(`composer:${e.id}:plus-menu`,t.id,t.label,`Adds an item to the composer’s add menu.`)),...(e.richText?.effects??[]).map(t=>Ns(`composer:${e.id}:rich-text`,t.id,void 0,`Adds rich-text behavior while composing a message.`))]),...t.fileOpeners.filter(e=>e.pluginId===r).map(e=>({...Ns(`file`,e.id,e.title,`Opens supported files in a plugin-provided viewer.`,pt(`files`)),detail:(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-baseline gap-x-1.5 gap-y-0.5`,children:[(0,Q.jsx)(`span`,{children:`Opens these files in a plugin-provided viewer:`}),(0,Q.jsx)(`span`,{className:`font-mono`,children:e.extensions.map(e=>`.${e}`).join(`, `)})]})})),...t.messageDirectives.filter(e=>e.pluginId===r).map(e=>({key:`directive:${e.id}`,label:`::${e.id}`,detail:`Renders plugin-provided content inside thread messages.`,mono:!0})),...t.codeFenceRenderers.filter(e=>e.pluginId===r).map(e=>({key:`code-fence:${e.id}`,label:e.languages.map(e=>`\`\`\`${e}`).join(`, `),detail:`Renders these fenced code blocks inside assistant messages.`,mono:!0}))]}function Is(e){let t=(0,$.c)(12),{plugin:n,configurationPath:r}=e,i=A(),a=_(),o;if(t[0]!==r||t[1]!==n||t[2]!==a||t[3]!==i){let e=a.getQueryData(R($e)),s=Fs(n,i,r),c=t=>{let r=e?.skills.find(e=>e.pluginId===n.id?e.filePath.split(/[\\/]/u).at(-2)===t||e.name===t:!1);return r===void 0?`${nt()}?view=library`:wt({skillId:r.id})},l=e=>n.capabilities.filter(t=>t.kind===e).map(t=>({key:`${t.kind}:${t.id}`,label:t.label,detail:t.detail??void 0,mono:e===`skill`||e===`agent-tool`,destinationPath:e===`theme`?pt(`appearance`):e===`skill`?c(t.id):void 0}));o=[{icon:`AppWindow`,kind:`App surface`,items:s},{icon:`Terminal`,kind:`Command`,items:n.cliCommand?[{key:n.cliCommand.name,label:vs(n.id,n.cliCommand.name),detail:n.cliCommand.summary||void 0,mono:!0}]:[]},{icon:`Explore`,kind:`Skill`,items:l(`skill`)},{icon:`Toolbox`,kind:`Agent tool`,items:l(`agent-tool`)},{icon:`MessageCirclePlus`,kind:`Thread integration`,items:l(`thread-integration`)},{icon:`Palette`,kind:`Theme`,items:l(`theme`)}].flatMap(Rs),t[0]=r,t[1]=n,t[2]=a,t[3]=i,t[4]=o}else o=t[4];let s=o;if(!n.enabled||s.length===0)return null;let c=n.status===`running`||n.status===`degraded`||n.status===`needs-configuration`,l;t[5]===s?l=t[6]:(l=(0,Q.jsx)(Ts,{children:s.map(Ls)}),t[5]=s,t[6]=l);let u;t[7]===c?u=t[8]:(u=c?null:(0,Q.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`This plugin isn't running, so its commands, settings, agent tools, app surfaces, and thread integrations can't be listed.`}),t[7]=c,t[8]=u);let d;return t[9]!==l||t[10]!==u?(d=(0,Q.jsx)(sn,{label:`Capabilities`,children:(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[l,u]})}),t[9]=l,t[10]=u,t[11]=d):d=t[11],d}function Ls(e){return(0,Q.jsx)(Os,{glyph:(0,Q.jsx)(Ds,{icon:e.icon,label:e.kind,className:`text-muted-foreground`}),name:e.destinationPath===void 0?e.label:(0,Q.jsx)(t,{to:e.destinationPath,className:`rounded-sm text-xs underline decoration-border underline-offset-4 transition-colors hover:decoration-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:e.label}),nameClassName:`text-xs`,mono:e.mono,detail:e.detail},e.key)}function Rs(e){let{icon:t,kind:n,items:r}=e;return r.map(e=>({...e,icon:t,kind:n}))}function zs(e){let n=(0,$.c)(26),{plugin:r,runtimeStatus:i,configurationPath:a,onReload:o,reloadPending:s}=e,{settingsSections:c}=A(),l;n[0]!==r.hasSettings||n[1]!==r.id||n[2]!==c?(l=r.hasSettings||c.some(e=>e.pluginId===r.id),n[0]=r.hasSettings,n[1]=r.id,n[2]=c,n[3]=l):l=n[3];let u=l,d=r.status===`needs-configuration`&&u,f;n[4]!==r.hasSettings||n[5]!==r.source||n[6]!==r.status?(f=r.status===`error`||r.status===`degraded`||r.status===`missing`&&r.source.startsWith(`path:`)||r.status===`needs-configuration`&&!r.hasSettings,n[4]=r.hasSettings,n[5]=r.source,n[6]=r.status,n[7]=f):f=n[7];let p=f,m;n[8]!==i.condition||n[9]!==i.recovery?(m=[i.condition,i.recovery].filter(Vs).map(Bs),n[8]=i.condition,n[9]=i.recovery,n[10]=m):m=n[10];let h=m.join(` `),g=r.status===`starting`?`status`:`alert`,_=i.tone===`error`?`destructive`:i.tone,v=d?void 0:h,y=r.status!==`degraded`,b;n[11]!==d||n[12]!==p||n[13]!==a||n[14]!==o||n[15]!==r.id||n[16]!==s?(b=d||p?(0,Q.jsxs)(`span`,{className:`flex items-center gap-2`,children:[d?(0,Q.jsx)(ft,{asChild:!0,variant:`ghost`,size:`sm`,className:`h-7 gap-0.5 px-2.5 text-xs font-normal text-muted-foreground hover:text-foreground [&_[data-icon-root]]:size-3`,children:(0,Q.jsxs)(t,{to:a??te({pluginId:r.id}),children:[`Open settings`,(0,Q.jsx)(q,{name:`ChevronRight`,className:`size-3.5`,"aria-hidden":!0})]})}):null,p?(0,Q.jsx)(nn,{icon:`RotateCcw`,className:`[&_[data-icon-root]]:size-3.5`,label:s?`Reloading…`:`Reload`,loading:s,disabled:s,onClick:o}):null]}):void 0,n[11]=d,n[12]=p,n[13]=a,n[14]=o,n[15]=r.id,n[16]=s,n[17]=b):b=n[17];let x;return n[18]!==i.icon||n[19]!==i.label||n[20]!==g||n[21]!==_||n[22]!==v||n[23]!==y||n[24]!==b?(x=(0,Q.jsx)(bs,{role:g,tone:_,icon:i.icon,title:i.label,detail:v,separator:y,action:b}),n[18]=i.icon,n[19]=i.label,n[20]=g,n[21]=_,n[22]=v,n[23]=y,n[24]=b,n[25]=x):x=n[25],x}function Bs(e){let t=`${e.charAt(0).toUpperCase()}${e.slice(1)}`;return/[.!?]$/u.test(t)?t:`${t}.`}function Vs(e){return e!==null&&e.length>0}function Hs(e){let t=(0,$.c)(16),{plugin:n,runtimeStatus:r,configurationPath:i}=e,o=_(),s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s={showErrorToast:!1},t[0]=s):s=t[0];let c;t[1]===n.id?c=t[2]:(c=()=>ke(fetch,n.id),t[1]=n.id,t[2]=c);let l;t[3]===o?l=t[4]:(l=()=>Ke({queryClient:o}),t[3]=o,t[4]=l);let u;t[5]!==c||t[6]!==l?(u={meta:s,mutationFn:c,onSuccess:l,onError:Us},t[5]=c,t[6]=l,t[7]=u):u=t[7];let d=a(u);if(!(n.enabled&&r!==null)||r===null)return null;let f;t[8]===d?f=t[9]:(f=()=>d.mutate(),t[8]=d,t[9]=f);let p;return t[10]!==i||t[11]!==n||t[12]!==d.isPending||t[13]!==r||t[14]!==f?(p=(0,Q.jsx)(zs,{plugin:n,runtimeStatus:r,configurationPath:i,reloadPending:d.isPending,onReload:f}),t[10]=i,t[11]=n,t[12]=d.isPending,t[13]=r,t[14]=f,t[15]=p):p=t[15],p}function Us(e){Se.error(`Failed to reload plugin`,{description:e instanceof Error?e.message:String(e)})}function Ws(e){let t=(0,$.c)(7),{plugin:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Q.jsxs)(`colgroup`,{children:[(0,Q.jsx)(`col`,{className:Ss}),(0,Q.jsx)(`col`,{})]}),t[0]=r):r=t[0];let i;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(`th`,{scope:`col`,className:X(Cs,`px-4 py-2 font-medium`),children:`Status`}),t[1]=i):i=t[1];let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Q.jsx)(`thead`,{className:`text-xs text-muted-foreground`,children:(0,Q.jsxs)(`tr`,{className:`border-b border-border`,children:[i,(0,Q.jsx)(`th`,{scope:`col`,className:X(Cs,`border-l border-border px-4 py-2 font-medium`),children:`Service`})]})}),t[2]=a):a=t[2];let o;t[3]===n.services?o=t[4]:(o=n.services.map(Gs),t[3]=n.services,t[4]=o);let s;return t[5]===o?s=t[6]:(s=(0,Q.jsx)(`div`,{className:`@container/plugin-detail max-w-full overflow-hidden rounded-lg border border-border bg-card align-top`,children:(0,Q.jsxs)(`table`,{"aria-label":`Background services`,className:`w-full max-w-full table-fixed border-collapse text-left`,children:[r,a,(0,Q.jsx)(`tbody`,{className:`divide-y divide-border`,children:o})]})}),t[5]=o,t[6]=s),s}function Gs(e){let t=js(e.state);return(0,Q.jsxs)(`tr`,{children:[(0,Q.jsx)(`td`,{className:X(`px-4 py-1.5 align-middle text-left`,t.statusClassName),children:(0,Q.jsx)(Jt,{tone:t.tone,children:(0,Q.jsx)(`span`,{className:t.labelClassName,children:t.label})})}),(0,Q.jsx)(`th`,{scope:`row`,className:`break-words border-l border-border px-4 py-1.5 text-left text-sm font-normal leading-snug text-foreground`,children:e.name})]},e.name)}function Ks(e){let t=(0,$.c)(4),{plugin:n}=e,r;t[0]===n.schedules?r=t[1]:(r=n.schedules.map(qs),t[0]=n.schedules,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,Q.jsx)(Ts,{children:r}),t[2]=r,t[3]=i),i}function qs(e){return(0,Q.jsx)(Os,{glyph:(0,Q.jsx)(Ms,{state:e.lastStatus}),name:e.name,detail:e.lastError??`Next ${Qn(e.nextRunAt)}`},e.name)}function Js({marketplace:e,entryId:t}){return e!==`bb-community`||t===null?null:`https://getbb.app/marketplace/${encodeURIComponent(t)}`}function Ys(e){return e===null?[]:[{label:`Copy marketplace link`,icon:`Copy`,onSelect:()=>void le(e,{successMessage:`Marketplace link copied`,errorMessage:`Failed to copy marketplace link.`})}]}function Xs(e){return e.source.startsWith(`path:`)}function Zs(e){return Xs(e)?`Remove from bb`:`Uninstall`}function Qs(e){return Xs(e)?`Remove "${e.id}" from bb and delete its settings, secrets, and schedules? Its source files stay on disk. To move it to another directory, install the new path instead; that keeps its settings.`:`Uninstall "${e.id}" and delete its managed files, settings, secrets, and schedules?`}function $s(e){let t=(0,$.c)(29),{path:n,openDisabled:r,onOpen:i}=e,a;t[0]===n?a=t[1]:(a={text:n,errorMessage:`Failed to copy path.`},t[0]=n,t[1]=a);let{copied:o,copy:s}=M(a),c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Q.jsx)(q,{name:`Folder`,className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":!0}),t[2]=c):c=t[2];let l;t[3]===n?l=t[4]:(l=Dt(n),t[3]=n,t[4]=l);let u;t[5]===l?u=t[6]:(u=(0,Q.jsx)(de,{asChild:!0,children:(0,Q.jsx)(`span`,{tabIndex:0,className:`block truncate rounded-sm font-mono text-xs text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:l})}),t[5]=l,t[6]=u);let d;t[7]===n?d=t[8]:(d=(0,Q.jsx)(O,{className:`max-w-sm break-all`,children:n}),t[7]=n,t[8]=d);let f;t[9]!==u||t[10]!==d?(f=(0,Q.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,Q.jsx)(Pt,{delayDuration:250,children:(0,Q.jsxs)(se,{children:[u,d]})})}),t[9]=u,t[10]=d,t[11]=f):f=t[11];let p=r?`No editor configured`:void 0,m;t[12]!==i||t[13]!==r||t[14]!==p?(m=(0,Q.jsx)(nn,{label:`Open source`,icon:`ExternalLink`,disabled:r,disabledReason:p,onClick:i}),t[12]=i,t[13]=r,t[14]=p,t[15]=m):m=t[15];let h=`Copy plugin path: ${n}`,g=o?`Copied`:`Copy path`,_=o?`Check`:`Copy`,v;t[16]===s?v=t[17]:(v=()=>void s(),t[16]=s,t[17]=v);let y;t[18]!==g||t[19]!==_||t[20]!==v||t[21]!==h?(y=(0,Q.jsx)(nn,{label:h,tooltipLabel:g,icon:_,onClick:v}),t[18]=g,t[19]=_,t[20]=v,t[21]=h,t[22]=y):y=t[22];let b;t[23]!==y||t[24]!==m?(b=(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[m,y]}),t[23]=y,t[24]=m,t[25]=b):b=t[25];let x;return t[26]!==b||t[27]!==f?(x=(0,Q.jsx)(mn,{label:`Source`,children:(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[c,f,b]})}),t[26]=b,t[27]=f,t[28]=x):x=t[28],x}var ec={author:null,marketplace:`bb-official`,publisherLabel:`BB Official`};function tc(e){let t=(0,$.c)(47),{entry:n,onInstall:r,catalogEntries:i,onOpenPlugin:a}=e,o;t[0]===n?o=t[1]:(o=Ln(n),t[0]=n,t[1]=o);let s=o,c=s?.tone===`count`?s:void 0,l;t[2]===n?l=t[3]:(l=F(n),t[2]=n,t[3]=l);let u=l,d=mt(n),{mutate:f}=je(),p;t[4]===n?p=t[5]:(p=Ys(Js(n)),t[4]=n,t[5]=p);let m=p,h;t[6]===n.displayName?h=t[7]:(h=Kn(n.displayName),t[6]=n.displayName,t[7]=h);let g=h,_;t[8]===n?_=t[9]:(_=(0,Q.jsx)(Xn,{entry:n,compact:!0}),t[8]=n,t[9]=_);let v;t[10]===g.tag?v=t[11]:(v=g.tag?(0,Q.jsx)(kn,{tag:g.tag}):void 0,t[10]=g.tag,t[11]=v);let y,b;t[12]===n?(y=t[13],b=t[14]):(y=(0,Q.jsx)(ar,{entry:n}),b=(0,Q.jsx)(as,{entry:n}),t[12]=n,t[13]=y,t[14]=b);let x=u!==null,S;t[15]!==n||t[16]!==r?(S=()=>r(n),t[15]=n,t[16]=r,t[17]=S):S=t[17];let C;t[18]!==f||t[19]!==c||t[20]!==n.displayName||t[21]!==u||t[22]!==d||t[23]!==S||t[24]!==x?(C=(0,Q.jsx)(ji,{displayName:n.displayName,installed:!1,showLabel:!0,disabled:x,unavailableReason:u,count:c,onInstall:S,installJob:d,onCancelInstall:f}),t[18]=f,t[19]=c,t[20]=n.displayName,t[21]=u,t[22]=d,t[23]=S,t[24]=x,t[25]=C):C=t[25];let w;t[26]!==n.displayName||t[27]!==m?(w=m.length===0?void 0:(0,Q.jsx)(an,{label:`${n.displayName} actions`,items:m}),t[26]=n.displayName,t[27]=m,t[28]=w):w=t[28];let T;t[29]===n?T=t[30]:(T=(0,Q.jsx)(ms,{entry:n}),t[29]=n,t[30]=T);let E;t[31]!==i||t[32]!==n||t[33]!==a?(E=(0,Q.jsx)(hs,{entry:n,catalogEntries:i,onOpenPlugin:a}),t[31]=i,t[32]=n,t[33]=a,t[34]=E):E=t[34];let D;t[35]!==T||t[36]!==E?(D=(0,Q.jsxs)(ln,{children:[T,E]}),t[35]=T,t[36]=E,t[37]=D):D=t[37];let O;return t[38]!==g.name||t[39]!==C||t[40]!==w||t[41]!==D||t[42]!==_||t[43]!==v||t[44]!==y||t[45]!==b?(O=(0,Q.jsx)(cn,{maxWidthClassName:`max-w-5xl`,leading:_,leadingClassName:`size-6`,title:g.name,titleMeta:v,metadataLeading:y,metadata:b,actions:C,overflowMenu:w,children:D}),t[38]=g.name,t[39]=C,t[40]=w,t[41]=D,t[42]=_,t[43]=v,t[44]=y,t[45]=b,t[46]=O):O=t[46],O}function nc(e){let t=(0,$.c)(8),{entry:n,onOpenPlugin:r}=e;if(n.incompatibleReason!==null){let e;return t[0]===n.incompatibleReason?e=t[1]:(e=(0,Q.jsx)(bs,{tone:`warning`,icon:`AlertTriangle`,title:`Update bb to install this plugin`,detail:n.incompatibleReason}),t[0]=n.incompatibleReason,t[1]=e),e}if(n.conflictingInstallSource===null)return null;let i=`remove the installed “${n.pluginId}” to install this one.`,a;t[2]!==n.pluginId||t[3]!==r?(a=(0,Q.jsx)(xs,{label:`View installed plugin`,onClick:()=>r(n.pluginId)}),t[2]=n.pluginId,t[3]=r,t[4]=a):a=t[4];let o;return t[5]!==i||t[6]!==a?(o=(0,Q.jsx)(bs,{tone:`warning`,icon:`AlertTriangle`,title:`Another plugin uses this ID`,detail:i,action:a}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function rc(e,t){return e.enabled?ha(e)===null?ic(t)?{plugin:{...e,status:`error`,statusDetail:null}}:null:{plugin:e}:null}function ic(e){return e?.status===`failed`}function ac(e){let t=(0,$.c)(17),{plugin:n,configurationPath:r,catalogEntries:i,onOpenPlugin:a}=e,o=(0,Z.useSyncExternalStore)(Vt,Ht,Ht),s,c;if(t[0]!==i||t[1]!==r||t[2]!==o||t[3]!==n){let e=rc(n,o.get(n.id)),a;if(t[6]!==i||t[7]!==n.id){let e;t[9]===n.id?e=t[10]:(e=e=>e.pluginId===n.id&&e.conflictingInstallSource!==null,t[9]=n.id,t[10]=e),a=i.find(e),t[6]=i,t[7]=n.id,t[8]=a}else a=t[8];s=a,c=e===null?null:(0,Q.jsx)(Hs,{plugin:e.plugin,configurationPath:r,runtimeStatus:ha(e.plugin)}),t[0]=i,t[1]=r,t[2]=o,t[3]=n,t[4]=s,t[5]=c}else s=t[4],c=t[5];let l;t[11]!==a||t[12]!==s?(l=s===void 0?null:(0,Q.jsx)(bs,{tone:`muted`,icon:`Info`,title:`Also published in ${s.marketplaceDisplayName}`,action:(0,Q.jsx)(xs,{label:`View listing`,onClick:()=>a(_e(s))})}),t[11]=a,t[12]=s,t[13]=l):l=t[13];let u;return t[14]!==c||t[15]!==l?(u=(0,Q.jsxs)(Q.Fragment,{children:[c,l]}),t[14]=c,t[15]=l,t[16]=u):u=t[16],u}function oc(e){let t=(0,$.c)(133),{isLoading:n,plugin:r,pending:i,openSourceDisabled:a,onToggle:o,onEdit:s,onOpenSource:c,onDelete:l,catalogEntry:u,catalogEntries:d,onOpenPlugin:f,onConfigure:p,configurationPath:m}=e,h=y(),{settingsSections:g}=A(),_;t[0]===r?_=t[1]:(_=r!==null&&!r.source.startsWith(`builtin:`),t[0]=r,t[1]=_);let v;t[2]===_?v=t[3]:(v={enabled:_},t[2]=_,t[3]=v);let b=oe(r?.id??``,v),x;t[4]===r?x=t[5]:(x=r!==null&&Ma(r),t[4]=r,t[5]=x);let S;if(t[6]===x?S=t[7]:(S={enabled:x},t[6]=x,t[7]=S),D(r?.id??null,S),n){let e;return t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(En,{state:`loading`,message:`Loading plugins`,layout:`detail`,maxWidthClassName:`max-w-5xl`}),t[8]=e):e=t[8],e}if(r===null){let e;return t[9]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(En,{state:`empty`,message:`Plugin not found.`,layout:`detail`,maxWidthClassName:`max-w-5xl`}),t[9]=e):e=t[9],e}let C;t[10]===r?C=t[11]:(C=Ma(r),t[10]=r,t[11]=C);let w=C,T;t[12]===r?T=t[13]:(T=Xs(r),t[12]=r,t[13]=T);let E=T,O;t[14]===r.source?O=t[15]:(O=r.source.startsWith(`builtin:`),t[14]=r.source,t[15]=O);let k=O,j=b.data?.installedAt??null,M;t[16]!==j||t[17]!==b.isPending||t[18]!==k?(M=k?`Updates with bb`:j===null?b.isPending?`Loading…`:`Install date unavailable`:Qn(j),t[16]=j,t[17]=b.isPending,t[18]=k,t[19]=M):M=t[19];let N=M,P=w&&r.updateState.availableVersion!==null,F=w&&(r.updateState.availableVersion!==null||r.updateState.blockedVersion!==null||r.updateState.lastFailure!==null),I;t[20]!==r.hasSettings||t[21]!==r.id||t[22]!==g?(I=r.hasSettings||g.some(e=>e.pluginId===r.id),t[20]=r.hasSettings,t[21]=r.id,t[22]=g,t[23]=I):I=t[23];let L=I,R=r.name??r.id,z;t[24]===R?z=t[25]:(z=Kn(R),t[24]=R,t[25]=z);let B=z,ee;if(t[26]!==E||t[27]!==u||t[28]!==l||t[29]!==s||t[30]!==i||t[31]!==r){let e=Ys(Js(u??{marketplace:r.catalogMarketplaceName,entryId:r.catalogEntryId})),n;t[33]!==E||t[34]!==s||t[35]!==i||t[36]!==r?(n=E?[{label:`Edit`,icon:`Edit`,disabled:i,onSelect:()=>s(r)}]:[],t[33]=E,t[34]=s,t[35]=i,t[36]=r,t[37]=n):n=t[37];let a;t[38]===r?a=t[39]:(a=Zs(r),t[38]=r,t[39]=a);let o=i||r.provenance===`builtin`,c=r.provenance===`builtin`?`Included with BB; disable this plugin instead.`:void 0,d;t[40]!==l||t[41]!==r?(d=()=>l(r),t[40]=l,t[41]=r,t[42]=d):d=t[42];let f;t[43]!==a||t[44]!==o||t[45]!==c||t[46]!==d?(f={label:a,icon:`Trash2`,tone:`destructive`,disabled:o,disabledReason:c,onSelect:d},t[43]=a,t[44]=o,t[45]=c,t[46]=d,t[47]=f):f=t[47],ee=[...e,...n,f],t[26]=E,t[27]=u,t[28]=l,t[29]=s,t[30]=i,t[31]=r,t[32]=ee}else ee=t[32];let V=ee,H=u??(r.provenance===`builtin`||r.catalogMarketplaceName===`bb-official`?ec:void 0),U;t[48]===r?U=t[49]:(U=(0,Q.jsx)(Bn,{plugin:r,className:`size-4`}),t[48]=r,t[49]=U);let W;t[50]===B.tag?W=t[51]:(W=B.tag?(0,Q.jsx)(kn,{tag:B.tag}):void 0,t[50]=B.tag,t[51]=W);let G;t[52]===H?G=t[53]:(G=H===void 0?void 0:(0,Q.jsx)(ar,{entry:H}),t[52]=H,t[53]=G);let ne;t[54]===H?ne=t[55]:(ne=H===void 0?void 0:(0,Q.jsx)(as,{entry:H}),t[54]=H,t[55]=ne);let K;t[56]!==L||t[57]!==h||t[58]!==p||t[59]!==r.id||t[60]!==R?(K=L?(0,Q.jsx)(nn,{label:`${R} settings`,tooltipLabel:`Settings`,icon:`Settings`,onClick:()=>p?p():h(te({pluginId:r.id}))}):void 0,t[56]=L,t[57]=h,t[58]=p,t[59]=r.id,t[60]=R,t[61]=K):K=t[61];let q=`${r.enabled?`Disable`:`Enable`} ${R}`,re;t[62]!==o||t[63]!==r?(re=()=>o(r),t[62]=o,t[63]=r,t[64]=re):re=t[64];let J;t[65]!==i||t[66]!==r.enabled||t[67]!==q||t[68]!==re?(J=(0,Q.jsx)(cr,{checked:r.enabled,disabled:i,"aria-label":q,onCheckedChange:re}),t[65]=i,t[66]=r.enabled,t[67]=q,t[68]=re,t[69]=J):J=t[69];let ie=`${R} actions`,Y;t[70]!==V||t[71]!==ie?(Y=(0,Q.jsx)(an,{label:ie,items:V}),t[70]=V,t[71]=ie,t[72]=Y):Y=t[72];let ae;t[73]!==u||t[74]!==r.description?(ae=u===void 0?(0,Q.jsx)(`section`,{className:`max-w-prose`,"data-resource-detail-section":`overview`,children:(0,Q.jsx)(fs,{description:r.description??`This plugin does not describe itself.`})}):(0,Q.jsx)(ps,{entry:u}),t[73]=u,t[74]=r.description,t[75]=ae):ae=t[75];let se;t[76]!==E||t[77]!==u||t[78]!==c||t[79]!==a||t[80]!==i||t[81]!==r?(se=E?(0,Q.jsx)($s,{path:r.rootDir,openDisabled:i||a,onOpen:()=>c(r)}):u===void 0?null:(0,Q.jsx)(ls,{entry:u}),t[76]=E,t[77]=u,t[78]=c,t[79]=a,t[80]=i,t[81]=r,t[82]=se):se=t[82];let ce;t[83]!==P||t[84]!==r?(ce=P?(0,Q.jsx)(Fa,{plugin:r}):void 0,t[83]=P,t[84]=r,t[85]=ce):ce=t[85];let le;t[86]===u?le=t[87]:(le=u===void 0?null:(0,Q.jsx)(cs,{entry:u}),t[86]=u,t[87]=le);let ue=k?`Delivery`:`Installed`,de;t[88]!==N||t[89]!==ue?(de=(0,Q.jsx)(ss,{label:ue,children:N}),t[88]=N,t[89]=ue,t[90]=de):de=t[90];let fe;t[91]===r.version?fe=t[92]:(fe=(0,Q.jsx)(ss,{label:`Version`,children:(0,Q.jsx)(`span`,{className:`font-mono`,children:r.version})}),t[91]=r.version,t[92]=fe);let pe;t[93]!==le||t[94]!==de||t[95]!==fe?(pe=(0,Q.jsxs)(os,{children:[le,de,fe]}),t[93]=le,t[94]=de,t[95]=fe,t[96]=pe):pe=t[96];let me;t[97]!==F||t[98]!==r?(me=F?(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`p`,{className:`text-2xs font-medium text-subtle-foreground`,children:`Update`}),(0,Q.jsx)(Ia,{plugin:r})]}):null,t[97]=F,t[98]=r,t[99]=me):me=t[99];let he;t[100]!==ce||t[101]!==pe||t[102]!==me?(he=(0,Q.jsxs)(vn,{label:`Details`,actions:ce,children:[pe,me]}),t[100]=ce,t[101]=pe,t[102]=me,t[103]=he):he=t[103];let ge;t[104]!==m||t[105]!==r?(ge=(0,Q.jsx)(Is,{plugin:r,configurationPath:m}),t[104]=m,t[105]=r,t[106]=ge):ge=t[106];let _e;t[107]===r?_e=t[108]:(_e=r.services.length>0?(0,Q.jsx)(on,{label:`Background services`,children:(0,Q.jsx)(Ws,{plugin:r})}):null,t[107]=r,t[108]=_e);let ve;t[109]===r?ve=t[110]:(ve=r.schedules.length>0?(0,Q.jsx)(on,{label:`Scheduled jobs`,children:(0,Q.jsx)(Ks,{plugin:r})}):null,t[109]=r,t[110]=ve);let ye;t[111]!==d||t[112]!==u||t[113]!==f?(ye=u===void 0?null:(0,Q.jsx)(hs,{entry:u,catalogEntries:d,onOpenPlugin:f}),t[111]=d,t[112]=u,t[113]=f,t[114]=ye):ye=t[114];let be;t[115]!==ae||t[116]!==se||t[117]!==he||t[118]!==ge||t[119]!==_e||t[120]!==ve||t[121]!==ye?(be=(0,Q.jsxs)(ln,{children:[ae,se,he,ge,_e,ve,ye]}),t[115]=ae,t[116]=se,t[117]=he,t[118]=ge,t[119]=_e,t[120]=ve,t[121]=ye,t[122]=be):be=t[122];let xe;return t[123]!==B.name||t[124]!==U||t[125]!==W||t[126]!==G||t[127]!==ne||t[128]!==K||t[129]!==J||t[130]!==Y||t[131]!==be?(xe=(0,Q.jsx)(cn,{maxWidthClassName:`max-w-5xl`,leading:U,title:B.name,titleMeta:W,metadataLeading:G,metadata:ne,actions:K,lifecycleControl:J,overflowMenu:Y,children:be}),t[123]=B.name,t[124]=U,t[125]=W,t[126]=G,t[127]=ne,t[128]=K,t[129]=J,t[130]=Y,t[131]=be,t[132]=xe):xe=t[132],xe}function sc(){let e=(0,$.c)(14),t=_(),[n,r]=(0,Z.useState)(null),i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={showErrorToast:!1},e[0]=i):i=e[0];let o;e[1]===t?o=e[2]:(o={meta:i,mutationFn:lc,onSuccess:(e,n)=>(Ve.success(Xs(n)?`Plugin removed from bb`:`Plugin uninstalled`,n,`catalog`),r(null),ze({queryClient:t}),Ke({queryClient:t})),onError:cc},e[1]=t,e[2]=o);let s=a(o),c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=e=>{e.provenance!==`builtin`&&!e.source.startsWith(`builtin:`)&&r(e)},e[3]=c):c=e[3];let l;e[4]===s.isPending?l=e[5]:(l=()=>{s.isPending||r(null)},e[4]=s.isPending,e[5]=l);let u;e[6]!==s||e[7]!==n?(u=()=>{n!==null&&!s.isPending&&s.mutate(n)},e[6]=s,e[7]=n,e[8]=u):u=e[8];let d;return e[9]!==s.isPending||e[10]!==l||e[11]!==u||e[12]!==n?(d={target:n,pending:s.isPending,open:c,close:l,confirm:u},e[9]=s.isPending,e[10]=l,e[11]=u,e[12]=n,e[13]=d):d=e[13],d}function cc(e,t){Ve.error(Xs(t)?`Plugin removal failed`:`Plugin uninstall failed`,t,`installed`,Br(e))}function lc(e){if(e.provenance===`builtin`||e.source.startsWith(`builtin:`))throw Error(`Included plugins cannot be uninstalled.`);return Mt(fetch,e.id)}function uc(e){let t=(0,$.c)(11),{removal:n}=e,r=n.target!==null,i;t[0]===n?i=t[1]:(i=e=>{e||n.close()},t[0]=n,t[1]=i);let a;t[2]!==n.close||t[3]!==n.confirm||t[4]!==n.pending||t[5]!==n.target?(a=n.target===null?null:(0,Q.jsx)(ae,{title:Xs(n.target)?`Remove plugin from bb?`:`Uninstall plugin?`,description:Qs(n.target),confirmLabel:Zs(n.target),pending:n.pending,onConfirm:n.confirm,onCancel:n.close}),t[2]=n.close,t[3]=n.confirm,t[4]=n.pending,t[5]=n.target,t[6]=a):a=t[6];let o;return t[7]!==r||t[8]!==i||t[9]!==a?(o=(0,Q.jsx)(H,{open:r,onOpenChange:i,children:a}),t[7]=r,t[8]=i,t[9]=a,t[10]=o):o=t[10],o}function dc({onOpenPlugin:e,mode:t}={}){let n=y(),r=sc(),{searchParams:i,query:a,requestedSort:o,sortDirection:s,selectedCategories:c,changeSearchParams:l}=kr(),u=Ft({enabled:!0}),d=(0,Z.useMemo)(()=>u.data?.plugins??[],[u.data?.plugins]),f=t??(i.get(`view`)===`installed`?`installed`:`browse`);D(null,{enabled:f===`installed`});let p=i.get(`author`),m=Pe(``,{enabled:f===`installed`}),h=(0,Z.useMemo)(()=>d.map(e=>{let t=V(e,m.data?.entries??[]),n=e.source.startsWith(`path:`);return{plugin:e,entryId:e.id,displayName:e.name??e.id,categoryId:n?`local`:t?.categoryId??e.categoryId,category:n?`Local`:t?.category??e.category,publishedAt:t?.publishedAt,installs:t?.installs??null}}),[d,m.data?.entries]),g=(0,Z.useMemo)(()=>Or(d),[d]),_=i.getAll(`source`).filter(e=>g.some(t=>t.id===e)),v=(0,Z.useMemo)(()=>L(h,c),[h,c]),b=h.some(e=>e.installs!==null),x=o===`most-installed`&&!b?null:o,C=a.trim().toLowerCase(),w=[C,[..._].sort().join(`,`),x,s,[...c].sort().join(`,`)].join(`\0`),[T,E]=(0,Z.useState)({open:!1,initial:null}),O=(0,Z.useMemo)(()=>{let e=h.filter(e=>{if(_.length>0&&!_.includes(Dr(e.plugin))||c.length>0&&!c.includes(me(e)))return!1;if(C.length===0)return!0;let t=e.plugin;return[t.id,t.name??``,t.description??``,t.version,t.sourceDisplay].join(` `).toLowerCase().includes(C)});return x===null?e.map(e=>e.plugin).sort((e,t)=>{let n=Number(e.publisherLabel===null)-Number(t.publisherLabel===null);return n===0?(e.name??e.id).localeCompare(t.name??t.id)||e.id.localeCompare(t.id):n}):pe(e,x,s).map(e=>e.plugin)},[h,_,c,C,x,s]),k=Ge(O,{pageSize:12,resetKey:w}),A=e=>{n(S(),{state:{focusPrompt:!0,initialPrompt:e??`Create a new bb plugin that `,replaceInitialPrompt:e!==void 0}})},j=e=>{let t=d.find(t=>V(t,[e])!==void 0);t!==void 0&&r.open(t)},M=(0,Q.jsx)(zr,{onCreate:A,onInstallFromSource:()=>E({open:!0,initial:null})}),N=e??(e=>n(f===`installed`?bt({pluginId:e,view:`installed`}):xe(e,``))),P;return P=f===`browse`?p===null?(0,Q.jsx)(ra,{onInstall:e=>E({open:!0,initial:e}),onUninstall:j,onOpenPlugin:N,onInstallFromSource:()=>E({open:!0,initial:null})}):(0,Q.jsx)(Da,{authorKey:p,onInstall:e=>E({open:!0,initial:e}),onUninstall:j,onOpenPlugin:N}):(0,Q.jsx)(dn,{scrollId:`plugins-installed-results`,bandClassName:ie,toolbar:(0,Q.jsx)(Bi,{query:a,searchPlaceholder:`Search installed plugins`,selectedCategories:c,categoryOptions:v,sort:x,sortDirection:s,installsKnown:b,changeSearchParams:l,action:M,sourceFilter:{options:g,selectedValues:_,onChange:e=>l(t=>{t.delete(`source`);for(let n of e)t.append(`source`,n)})}}),children:(0,Q.jsxs)(`div`,{className:X(`space-y-3`,ie),children:[(0,Q.jsx)(_a,{plugins:d,onOpenPlugin:N}),u.isError?(0,Q.jsx)(En,{state:`error`,message:`Couldn't load plugins.`,onRetry:()=>void u.refetch()}):u.isFetching&&u.data===void 0?(0,Q.jsx)(En,{state:`loading`,message:`Loading plugins`}):d.length>0&&O.length===0?(0,Q.jsx)(En,{state:`empty`,message:C===``?`No plugins match these filters.`:c.length>0||_.length>0?`No plugins match "${a}" with these filters.`:`No plugins match "${a}"`}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(wa,{plugins:k.items,onOpenPlugin:N}),(0,Q.jsx)(Re,{itemCount:k.items.length,hasMore:k.hasMore,onLoadMore:k.loadMore})]})]})}),(0,Q.jsxs)(Q.Fragment,{children:[f===`browse`?(0,Q.jsx)(`div`,{className:`flex h-full min-h-0 flex-col`,children:P}):(0,Q.jsx)(yn,{id:`plugins-collection`,description:oi,bandClassName:ie,children:P}),(0,Q.jsx)(uc,{removal:r}),(0,Q.jsx)(Hr,{open:T.open,initial:T.initial,onOpenChange:e=>E(t=>({...t,open:e}))})]})}function fc(e){let t=(0,$.c)(4),{pluginId:n}=e,{providers:r}=dr(),i=G().data?.serverAccess;if(!(r??[]).some(e=>e.pluginId===n))return null;let a;t[0]===i?a=t[1]:(a=Dn(i),t[0]=i,t[1]=a);let o;return t[2]===a?o=t[3]:(o=(0,Q.jsx)(pc,{reason:a}),t[2]=a,t[3]=o),o}function pc(e){let n=(0,$.c)(8),{reason:r}=e;if(r===null)return null;let i;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(q,{name:`AlertTriangle`,className:`mt-0.5 size-3.5 shrink-0 text-warning-text`,"aria-hidden":!0}),n[0]=i):i=n[0];let a;n[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Q.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:On}),n[1]=a):a=n[1];let o;n[2]===r?o=n[3]:(o=(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-start gap-2`,children:[i,(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[a,(0,Q.jsx)(`p`,{className:`mt-0.5 text-xs leading-snug text-subtle-foreground`,children:r})]})]}),n[2]=r,n[3]=o);let s;n[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=pt(`machines`),n[4]=s):s=n[4];let c;n[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Q.jsx)(ft,{asChild:!0,size:`sm`,variant:`outline`,className:`w-full shrink-0 @md:w-auto`,children:(0,Q.jsxs)(t,{to:s,children:[`Set up machine access`,(0,Q.jsx)(q,{name:`ArrowRight`})]})}),n[5]=c):c=n[5];let l;return n[6]===o?l=n[7]:(l=(0,Q.jsx)(`div`,{className:`@container w-full`,children:(0,Q.jsxs)(`div`,{role:`alert`,className:`flex flex-col gap-2 rounded-lg border border-border bg-card px-4 py-3 @md:flex-row @md:items-center @md:gap-4`,children:[o,c]})}),n[6]=o,n[7]=l),l}var mc=6,hc=24,gc=Symbol(),_c=`max-h-96 min-h-32 w-full resize-y overflow-y-auto font-mono text-xs field-sizing-content`;function vc(e){let t=e.split(`
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Ar as t,Cr as n,Hr as r,Ir as i,Kr as a,Lr as o,Or as s,Qr as c,St as l,Vr as u,Zr as d,bt as f,ci as p,dr as m,mi as h,ni as g,ti as _,yr as v,zr as y}from"./boot-vendor-BBLG7GwQ.js";import{mt as b,tt as x}from"./environment-workspace-display-O1JRHfbV.js";import{$p as S,$u as C,Aa as w,Bo as T,Bu as E,Cd as D,Cf as O,Ch as k,Cp as A,Dr as j,Ea as M,Eh as N,Gi as P,Gu as F,Hi as I,Hu as L,Jh as R,Ji as z,Jp as B,Ju as ee,Kp as te,Ku as V,Lr as H,Ma as U,Na as W,Po as G,Pu as ne,Qi as K,Qm as q,Qp as re,Qt as J,Qu as ie,Rd as Y,Rr as ae,Sd as oe,Sf as se,Sh as ce,Ta as le,Tc as ue,Tf as de,Th as fe,Uu as pe,Vu as me,Wl as he,Wt as ge,Wu as _e,Xf as ve,Xh as ye,Xi as be,Xu as xe,Ym as Se,Yp as Ce,Yu as we,Zh as Te,Zp as Ee,Zt as De,Zu as Oe,_h as ke,_t as Ae,a as je,ad as Me,am as Ne,bd as Pe,bh as Fe,cd as Ie,ch as Le,dd as Re,dh as ze,do as Be,dp as Ve,ea as He,ed as Ue,ep as We,fd as Ge,fh as Ke,fo as qe,fp as Je,go as Ye,hh as Xe,ho as Ze,i as Qe,i_ as $e,ia as et,id as tt,im as nt,ip as rt,ka as it,ld as at,lh as ot,lt as st,md as ct,mo as lt,n as ut,nd as dt,nh as ft,nm as pt,o as mt,od as ht,oh as X,pd as gt,po as _t,qc as vt,qi as yt,qp as bt,qu as xt,r as St,rd as Ct,rm as wt,s as Tt,sd as Et,sh as Dt,td as Ot,ud as kt,uh as At,vd as jt,vh as Mt,vt as Nt,wf as Pt,xh as Ft,yd as It,yh as Lt,yn as Rt,zo as zt}from"./index-BBxUiLNy.js";import{i as Bt,r as Vt,t as Ht}from"./plugin-frontend-BdQdYbWd.js";import{t as Ut}from"./plugin-settings-availability-DobA3OyF.js";import{t as Wt}from"./useScrollOverflowState-DyS0S3x1.js";import{A as Gt,D as Kt,E as qt,F as Jt,M as Yt,N as Xt,O as Zt,P as Qt,S as $t,T as en,V as tn,_ as nn,a as rn,b as an,c as on,d as sn,f as cn,g as ln,h as un,i as dn,j as fn,k as pn,l as mn,m as hn,n as gn,o as _n,p as vn,r as yn,s as bn,t as xn,u as Sn,v as Cn,w as wn,x as Tn,y as En}from"./resource-list-B6MkAu8v.js";import{n as Dn,t as On}from"./machine-server-access-D3hixOIC.js";import{A as kn,C as An,D as jn,E as Mn,N as Nn,O as Pn,S as Fn,T as In,_ as Ln,a as Rn,b as zn,c as Bn,d as Vn,f as Hn,g as Un,h as Wn,i as Gn,j as Kn,k as qn,l as Jn,m as Yn,n as Xn,o as Zn,p as Qn,r as $n,s as er,t as tr,u as nr,v as rr,w as ir,x as ar,y as or}from"./plugin-ui-DyNDyPD9.js";import{t as sr}from"./expandable-text-herJC70e.js";import{t as cr}from"./switch-CzvlSesf.js";import{t as lr}from"./useLocalOpenTargets-yzd9-Ceh.js";import{t as ur}from"./SecondaryPanelLayout-fG8BuYv-.js";import{t as dr}from"./machine-provider-queries-CRlWTEz7.js";import{t as fr}from"./lib-Cs9r5T_d.js";import{m as pr}from"./markdown-prompt-mentions-B0JRhgrI.js";import{n as mr}from"./absolute-file-path-W_eh4kPq.js";import{r as hr}from"./thread-runtime-mutations-Cr1H7KSz.js";import{t as gr}from"./FilePreview-BxgJ2jjI.js";import{t as _r}from"./ThreadSecondaryPanel-4nIZy4h9.js";import{n as vr}from"./markdown-file-image-routing-DAIVjxLg.js";import{n as yr}from"./update-state-DCxKj9tm.js";import{t as br}from"./textarea-9yaIMD7J.js";import"./icon-extended-DDFkslJU.js";import{t as xr}from"./plugin-homepage-section-D0skkFU4.js";var Sr=`Create a new bb skill that `,Cr=`Create a new bb plugin that `,Z=e(h(),1),Q=e(g(),1),$=s(),wr=`h-7 w-full justify-between border-border/60 bg-card px-2 text-xs @min-[36rem]/settings:w-44`,Tr=`min-w-[var(--radix-dropdown-menu-trigger-width)]`,Er=`user`;function Dr(e){return e.publisherLabel===null?Er:`publisher:${e.publisherLabel}`}function Or(e){let t=new Set,n=!1;for(let r of e)r.publisherLabel===null?n=!0:t.add(r.publisherLabel);let r=[...t].sort((e,t)=>e.localeCompare(t)).map(e=>({id:`publisher:${e}`,label:e}));return n&&r.push({id:Er,label:`Direct install`}),r}function kr(){let e=(0,$.c)(17),[t,n]=r(),i;e[0]===t?i=e[1]:(i=t.get(`query`)??``,e[0]=t,e[1]=i);let a=i,o;e[2]===t?o=e[3]:(o=t.get(`sort`),e[2]=t,e[3]=o);let s=o,c=s===`name`||s===`recently-added`||s===`most-installed`?s:null,l;e[4]===t?l=e[5]:(l=t.get(`direction`),e[4]=t,e[5]=l);let u=l,d=u===`asc`||u===`desc`?u:c===`name`?`asc`:`desc`,f;e[6]===t?f=e[7]:(f=t.get(`shelf`)?.startsWith(`category:`)?[]:t.getAll(`category`),e[6]=t,e[7]=f);let p=f,m;e[8]===n?m=e[9]:(m=(e,t)=>{n(t=>{let n=new URLSearchParams(t);return e(n),n},{replace:t===void 0?!0:t})},e[8]=n,e[9]=m);let h=m,g;return e[10]!==h||e[11]!==a||e[12]!==c||e[13]!==t||e[14]!==p||e[15]!==d?(g={searchParams:t,query:a,requestedSort:c,sortDirection:d,selectedCategories:p,changeSearchParams:h},e[10]=h,e[11]=a,e[12]=c,e[13]=t,e[14]=p,e[15]=d,e[16]=g):g=e[16],g}var Ar=[{noun:`a kanban board`,title:`Kanban board`,hook:`Ship a board your agents move cards across while they work.`,capability:`navPanel`,icon:`Columns2`,accentToken:`--file-accent`,brief:`adds a kanban board panel where each card is a thread, and agents move cards between columns as work progresses`},{noun:`a live dashboard`,title:`Live dashboard`,hook:`Put the numbers your team actually checks on the bb homepage.`,capability:`homepageSection`,icon:`ChartColumn`,accentToken:`--success`,brief:`adds a homepage dashboard with deploy frequency, open PR count, and CI pass rate, refreshed on an interval`},{noun:`a chief of staff`,title:`Chief of staff`,hook:`Delegate your backlog and get briefed on only what needs you.`,capability:`navPanel + service + experimental_threadList`,icon:`UserRound`,accentToken:`--pr-merged`,brief:`adds a chief-of-staff panel that takes in my backlog, opens an agent thread for each item, keeps them moving by answering routine questions itself, and briefs me on progress and the few decisions only I can make`},{noun:`a video editor`,title:`Video editor`,hook:`Drop in raw clips and let agents assemble a polished first cut.`,capability:`fileOpener + navPanel + service`,icon:`Play`,accentToken:`--warning`,brief:`adds a video editor where I drop raw clips onto a timeline, agents assemble a first cut with trims, captions, and music, and I review the result and request changes in plain words`},{noun:`a prototyping lab`,title:`Prototyping lab`,hook:`Describe a product flow and compare working prototypes side by side.`,capability:`navPanel + experimental_threadList + service`,icon:`Beaker`,accentToken:`--attention`,brief:`adds a prototyping lab where I describe a product flow in plain words, agents build several working prototypes in parallel, and I compare them side by side before choosing one to refine`},{noun:`a support inbox`,title:`Support inbox`,hook:`Triage user reports into fixes without leaving bb.`,capability:`navPanel + service + messageAction`,icon:`Mail`,accentToken:`--destructive-text`,brief:`adds a support inbox that pulls in bug reports, clusters duplicates, drafts replies for my review, and opens a fix thread for each confirmed bug`}].map(e=>({...e,id:e.title.toLowerCase().replace(/[^a-z0-9]+/g,`-`)}));function jr({brief:e}){return`${Cr}${e}.`}var Mr=[{id:`panel`,label:`Panel`,icon:`PanelLeft`,brief:`adds a nav panel that lists my saved prompts and inserts one into the composer on click`},{id:`homepage-section`,label:`Homepage section`,icon:`SectionAdd`,brief:`adds a homepage section showing yesterday's merged PRs and my review queue`},{id:`file-opener`,label:`File opener`,icon:`FileText`,brief:`adds a file opener that renders CSV files as sortable, filterable tables`},{id:`cli-command`,label:`CLI command`,icon:`Terminal`,brief:`adds a bb CLI command that deploys the current branch to staging and reports status`},{id:`background-service`,label:`Background service`,icon:`Zap`,brief:`adds a background service that posts thread failures to a Slack webhook`},{id:`prompt-mentions`,label:`Prompt mentions`,icon:`MessageCirclePlus`,brief:`connects Linear issues to the prompt box as searchable @-mentions`}],Nr=`__bbBrowseComposerRequestNonce`;function Pr(){let e=globalThis,t=(e[Nr]??0)+1;return e[Nr]=t,t}var Fr={skill:{prefix:Sr,examples:[{label:`PR review`,icon:`GitPullRequest`,description:`reviews a GitHub PR, checks changed files, runs focused tests, and returns blocking findings first`},{label:`Release notes`,icon:`FileText`,description:`turns merged PRs into concise customer-facing release notes with links and risk notes`},{label:`Incident debug`,icon:`Bug`,description:`collects logs, recent deploys, and failing checks before proposing the smallest fix`}]},plugin:{prefix:Cr,examples:Ar.map(e=>({label:e.title,icon:e.icon,description:e.hook,prompt:jr(e)}))}};function Ir(e){let t=Fr[e];return{examples:t.examples.map(e=>({label:e.label,icon:e.icon,description:e.description,prompt:e.prompt??`${t.prefix}${e.description}.`}))}}function Lr(e){let t=(0,$.c)(12),{kind:n,label:r,menuActions:i,compactWhenNarrow:a,onCreate:o}=e,s;t[0]===n?s=t[1]:(s=Ir(n),t[0]=n,t[1]=s);let{examples:c}=s,l;t[2]!==c||t[3]!==n?(l=n===`plugin`?[{label:`Examples`,templates:c},{label:`Capabilities`,templates:Mr.map(Rr)}]:void 0,t[2]=c,t[3]=n,t[4]=l):l=t[4];let u=l,d;return t[5]!==a||t[6]!==c||t[7]!==r||t[8]!==i||t[9]!==o||t[10]!==u?(d=(0,Q.jsx)(en,{label:r,templates:c,templateGroups:u,menuActions:i,compactWhenNarrow:a,onCreate:o}),t[5]=a,t[6]=c,t[7]=r,t[8]=i,t[9]=o,t[10]=u,t[11]=d):d=t[11],d}function Rr(e){return{label:e.label,icon:e.icon,description:e.brief,prompt:jr(e)}}function zr(e){let t=(0,$.c)(5),{onCreate:n,onInstallFromSource:r}=e,i;t[0]===r?i=t[1]:(i=[{label:`Install from source`,icon:`Download`,onSelect:r}],t[0]=r,t[1]=i);let a;return t[2]!==n||t[3]!==i?(a=(0,Q.jsx)(Lr,{kind:`plugin`,compactWhenNarrow:!0,label:`New plugin`,menuActions:i,onCreate:n}),t[2]=n,t[3]=i,t[4]=a):a=t[4],a}function Br(e){if(e instanceof Error&&`status`in e&&typeof e.status==`number`){let t=`HTTP ${e.status}: `;return e.message.startsWith(t)?e.message.slice(t.length):e.message}return e instanceof Error?e.message:String(e)}function Vr(e,t){return e.startsWith(`builtin:`)?`Install this plugin, bundled with BB.`:e.startsWith(`npm:`)?`Install this ${t} plugin from its listed npm package.`:`Install this ${t} plugin from its listed source repository.`}function Hr(e){let t=(0,$.c)(11),{open:n,onOpenChange:r,onInstallStarted:i,initial:a}=e,o;t[0]!==a||t[1]!==i||t[2]!==r||t[3]!==n?(o=n?(0,Q.jsx)(qr,{initial:a??null,onOpenChange:r,onInstallStarted:i}):null,t[0]=a,t[1]=i,t[2]=r,t[3]=n,t[4]=o):o=t[4];let s;t[5]===o?s=t[6]:(s=(0,Q.jsx)(qe,{className:`sm:max-w-md`,children:o}),t[5]=o,t[6]=s);let c;return t[7]!==r||t[8]!==n||t[9]!==s?(c=(0,Q.jsx)(Be,{open:n,onOpenChange:r,children:s}),t[7]=r,t[8]=n,t[9]=s,t[10]=c):c=t[10],c}function Ur(e,t){if(e!==null)return{kind:`catalog`,entryId:e.entryId,marketplace:e.marketplace};let n=t.trim();return n.length===0?null:{kind:`direct`,source:n}}function Wr(e){return e.kind===`npm`?[{label:`npm package`,value:`${e.package}@${e.range??e.tag??`latest`}`},...e.registry===void 0?[]:[{label:`registry`,value:e.registry}]]:[{label:`repository`,value:e.url,href:e.url},...e.subdir===void 0?[]:[{label:`subdirectory`,value:e.subdir}],...e.ref===void 0?[]:[{label:`ref`,value:e.ref}],...e.range===void 0?[]:[{label:`semver range`,value:e.tagPrefix===void 0?e.range:`${e.range} (tags ${e.tagPrefix}vX.Y.Z)`}],...e.resolvedTag===void 0?[]:[{label:`resolves to tag`,value:e.resolvedTag}],...e.resolvedCommit===void 0?[]:[{label:`resolves to commit`,value:e.resolvedCommit}],...e.unresolvedReason===void 0?[]:[{label:`not resolved`,value:e.unresolvedReason}]]}function Gr(e){let t=(0,$.c)(26),{plan:n,pending:r,error:i,onRetry:a}=e;if(r){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(`p`,{className:`text-2xs text-subtle-foreground`,role:`status`,children:`Resolving the listed source…`}),t[0]=e):e=t[0],e}if(i!=null){let e=i instanceof Error&&`status`in i&&typeof i.status==`number`?i.status:null,n=e===null||e===408||e===429||e>=500,r=e===401||e===403?`Source access denied. Check repository permissions.`:e===404?`Source not found. Check the marketplace listing.`:n?`Source unavailable. Try again.`:`Invalid source. Check the marketplace listing.`,o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Q.jsx)(q,{name:`AlertTriangle`,className:`size-4 shrink-0 text-warning-text`,"aria-hidden":!0}),t[1]=o):o=t[1];let s;t[2]===r?s=t[3]:(s=(0,Q.jsx)(`p`,{className:`min-w-0 flex-1 text-xs leading-normal text-foreground`,children:r}),t[2]=r,t[3]=s);let c;t[4]!==a||t[5]!==n?(c=n?(0,Q.jsx)(ft,{type:`button`,variant:`outline`,size:`sm`,className:`h-7 shrink-0 px-2 text-xs`,onClick:a,children:`Retry`}):null,t[4]=a,t[5]=n,t[6]=c):c=t[6];let l;return t[7]!==s||t[8]!==c?(l=(0,Q.jsxs)(`div`,{className:`flex items-center gap-3 rounded-md border border-warning/20 bg-warning/5 p-3`,role:`alert`,children:[o,s,c]}),t[7]=s,t[8]=c,t[9]=l):l=t[9],l}if(n===void 0||n.kind!==`marketplace`||n.official)return null;let o;t[10]!==n.author.name||t[11]!==n.author.url?(o=n.author.url===null?null:(0,Q.jsx)(`a`,{href:n.author.url,target:`_blank`,rel:`noreferrer`,className:`underline underline-offset-2`,children:n.author.name}),t[10]=n.author.name,t[11]=n.author.url,t[12]=o):o=t[12];let s=o,c;t[13]===n.marketplaceDisplayName?c=t[14]:(c=(0,Q.jsxs)(`p`,{className:`text-2xs text-subtle-foreground`,children:[`Listed by`,` `,(0,Q.jsx)(`span`,{className:`text-foreground`,children:n.marketplaceDisplayName}),`, a third-party marketplace that BB does not review.`]}),t[13]=n.marketplaceDisplayName,t[14]=c);let l;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Q.jsx)(`dt`,{className:`w-28 shrink-0 text-2xs text-subtle-foreground`,children:`author`}),t[15]=l):l=t[15];let u=s??n.author.name,d;t[16]===u?d=t[17]:(d=(0,Q.jsxs)(`div`,{className:`flex gap-2`,children:[l,(0,Q.jsx)(`dd`,{className:`min-w-0 break-all font-mono text-2xs text-foreground`,children:u})]}),t[16]=u,t[17]=d);let f;t[18]===n.resolvedSource?f=t[19]:(f=Wr(n.resolvedSource).map(Kr),t[18]=n.resolvedSource,t[19]=f);let p;t[20]!==d||t[21]!==f?(p=(0,Q.jsxs)(`dl`,{className:`space-y-0.5`,children:[d,f]}),t[20]=d,t[21]=f,t[22]=p):p=t[22];let m;return t[23]!==c||t[24]!==p?(m=(0,Q.jsxs)(`div`,{className:`space-y-1.5 rounded-md border border-border bg-muted/30 px-3 py-2`,children:[c,p]}),t[23]=c,t[24]=p,t[25]=m):m=t[25],m}function Kr(e){return(0,Q.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Q.jsx)(`dt`,{className:`w-28 shrink-0 text-2xs text-subtle-foreground`,children:e.label}),(0,Q.jsx)(`dd`,{className:`min-w-0 break-all font-mono text-2xs text-foreground`,children:e.href===void 0?e.value:(0,Q.jsx)(`a`,{href:e.href,target:`_blank`,rel:`noreferrer`,className:`underline underline-offset-2 hover:text-foreground`,children:e.value})})]},e.label)}function qr(e){let t=(0,$.c)(64),{initial:n,onOpenChange:r,onInstallStarted:i}=e,o=_(),[s,c]=(0,Z.useState)(``),l;t[0]!==n||t[1]!==s?(l=Ur(n,s),t[0]=n,t[1]=s,t[2]=l):l=t[2];let u=l,d;t[3]===n?d=t[4]:(d=n!==null&&n.marketplace!==`bb-community`&&!n.source.startsWith(`builtin:`),t[3]=n,t[4]=d);let f=d,p;t[5]!==n||t[6]!==f?(p=f&&n!==null?{entryId:n.entryId,marketplace:n.marketplace}:null,t[5]=n,t[6]=f,t[7]=p):p=t[7];let m=It(p),h=m.data,g;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(g={showErrorToast:!1},t[8]=g):g=t[8];let v;t[9]!==h||t[10]!==f?(v=e=>e.kind===`catalog`?St(fetch,{entryId:e.entryId,marketplace:e.marketplace,...f&&h?.kind===`marketplace`?{confirmedSource:h.resolvedSource}:{}}):Qe(fetch,e.source),t[9]=h,t[10]=f,t[11]=v):v=t[11];let y;t[12]!==i||t[13]!==r||t[14]!==o?(y=e=>{Le({queryClient:o,job:e}),r(!1),i?.(e)},t[12]=i,t[13]=r,t[14]=o,t[15]=y):y=t[15];let b;t[16]!==v||t[17]!==y?(b={meta:g,mutationFn:v,onSuccess:y},t[16]=v,t[17]=y,t[18]=b):b=t[18];let x=a(b),S=n===null?`Add plugin`:`Install ${n.displayName}?`,C;t[19]===S?C=t[20]:(C=(0,Q.jsx)(Ye,{children:S}),t[19]=S,t[20]=C);let w;t[21]!==n||t[22]!==f?(w=n===null?`Install from npm, a Git repository, or a local path.`:f?`Install this plugin from the source its marketplace lists.`:Vr(n.source,n.publisherLabel),t[21]=n,t[22]=f,t[23]=w):w=t[23];let T;t[24]===w?T=t[25]:(T=(0,Q.jsx)(_t,{children:w}),t[24]=w,t[25]=T);let E;t[26]!==T||t[27]!==C?(E=(0,Q.jsxs)(Ze,{children:[C,T]}),t[26]=T,t[27]=C,t[28]=E):E=t[28];let D;t[29]!==n||t[30]!==s?(D=n===null?(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(yt,{value:s,autoFocus:!0,placeholder:`https://github.com/owner/bb-plugin-name`,"aria-label":`Plugin source`,className:`h-8 font-mono text-xs`,onChange:e=>c(e.target.value)}),(0,Q.jsx)(`p`,{className:`mt-1.5 text-2xs text-subtle-foreground`,children:`GitHub repository URL · npm:package[@version] · ./local/path`})]}):(0,Q.jsxs)(`div`,{className:`space-y-1.5 rounded-md border border-border bg-muted/30 px-3 py-2`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,Q.jsx)(tr,{entry:n,className:`size-6`}),(0,Q.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:n.displayName}),(0,Q.jsx)(`span`,{className:`ml-auto font-mono text-xs text-subtle-foreground`,children:n.entryId})]}),(0,Q.jsx)(`p`,{className:`overflow-x-auto whitespace-nowrap font-mono text-2xs text-subtle-foreground`,children:n.source})]}),t[29]=n,t[30]=s,t[31]=D):D=t[31];let O;t[32]!==h||t[33]!==m||t[34]!==f?(O=f?(0,Q.jsx)(Gr,{plan:h,pending:m.isPending,error:m.error,onRetry:()=>void m.refetch()}):null,t[32]=h,t[33]=m,t[34]=f,t[35]=O):O=t[35];let k;t[36]!==x.error||t[37]!==x.isError?(k=x.isError?(0,Q.jsx)(`p`,{role:`alert`,className:`max-h-40 overflow-y-auto whitespace-pre-wrap break-words text-xs text-warning-text`,children:Br(x.error)}):null,t[36]=x.error,t[37]=x.isError,t[38]=k):k=t[38];let A;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Q.jsx)(Gn,{}),t[39]=A):A=t[39];let j;t[40]!==D||t[41]!==O||t[42]!==k?(j=(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[D,O,k,A]}),t[40]=D,t[41]=O,t[42]=k,t[43]=j):j=t[43];let M;t[44]===r?M=t[45]:(M=(0,Q.jsx)(ft,{type:`button`,variant:`outline`,onClick:()=>r(!1),children:`Cancel`}),t[44]=r,t[45]=M);let N=u===null||x.isPending||f&&m.isPending||f&&h===void 0,P;t[46]!==x||t[47]!==u?(P=()=>{u!==null&&x.mutate(u)},t[46]=x,t[47]=u,t[48]=P):P=t[48];let F;t[49]===x.isPending?F=t[50]:(F=x.isPending?(0,Q.jsx)(q,{name:`Spinner`,className:`animate-spin`}):null,t[49]=x.isPending,t[50]=F);let I=`Install ${n?.displayName??`plugin`}`,L;t[51]!==x.isPending||t[52]!==N||t[53]!==P||t[54]!==F||t[55]!==I?(L=(0,Q.jsxs)(ft,{type:`button`,disabled:N,"aria-busy":x.isPending,onClick:P,children:[F,I]}),t[51]=x.isPending,t[52]=N,t[53]=P,t[54]=F,t[55]=I,t[56]=L):L=t[56];let R;t[57]!==M||t[58]!==L?(R=(0,Q.jsxs)(lt,{className:`gap-2`,children:[M,L]}),t[57]=M,t[58]=L,t[59]=R):R=t[59];let z;return t[60]!==E||t[61]!==j||t[62]!==R?(z=(0,Q.jsxs)(Q.Fragment,{children:[E,j,R]}),t[60]=E,t[61]=j,t[62]=R,t[63]=z):z=t[63],z}var Jr=`plugin-api-docs`,Yr=`/plugins/${Jr}/plugin-api`;function Xr(){let e=(0,$.c)(28),t=_(),n=y(),[r,i]=(0,Z.useState)(null),[o,s]=(0,Z.useState)(null),c=Tt(o),l,u;e[0]!==c||e[1]!==n?(l=()=>{c===null||ut(c)||(s(null),c.state===`succeeded`&&n(Yr))},u=[c,n],e[0]=c,e[1]=n,e[2]=l,e[3]=u):(l=e[2],u=e[3]),(0,Z.useEffect)(l,u);let d;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(d={showErrorToast:!1},e[4]=d):d=e[4];let f;e[5]===t?f=e[6]:(f={meta:d,mutationFn:async()=>{let e=(await t.fetchQuery({...Xe({enabled:!0}),staleTime:0})).find($r);if(e===void 0){let e=(await jt(fetch,Jr)).entries.find(Qr);if(e===void 0)throw Error(`Plugin Guide is unavailable in the catalog.`);return e}return e.enabled||(await Lt(fetch,Jr,!0),await Ke({queryClient:t})),null},onError:Zr},e[5]=t,e[6]=f);let p=a(f),m=p.isPending,h=p.isPending,g;e[7]!==n||e[8]!==p?(g=()=>p.mutate(void 0,{onSuccess:e=>{e===null?n(Yr):i(e)}}),e[7]=n,e[8]=p,e[9]=g):g=e[9];let v=p.isPending?`Spinner`:`Explore`,b=p.isPending&&`animate-spin`,x;e[10]===b?x=e[11]:(x=X(`size-4`,b),e[10]=b,e[11]=x);let S;e[12]!==v||e[13]!==x?(S=(0,Q.jsx)(q,{name:v,className:x,"aria-hidden":!0}),e[12]=v,e[13]=x,e[14]=S):S=e[14];let C;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Q.jsx)(`span`,{className:`underline underline-offset-4`,children:`Plugin Guide`}),e[15]=C):C=e[15];let w;e[16]!==p.isPending||e[17]!==S||e[18]!==g?(w=(0,Q.jsxs)(ft,{type:`button`,variant:`link`,size:`sm`,className:`shrink-0 gap-1.5 px-0 text-muted-foreground hover:text-foreground`,disabled:m,"aria-busy":h,onClick:g,children:[S,C]}),e[16]=p.isPending,e[17]=S,e[18]=g,e[19]=w):w=e[19];let T=r!==null,E,D;e[20]===Symbol.for(`react.memo_cache_sentinel`)?(E=e=>{e||i(null)},D=e=>s(e.id),e[20]=E,e[21]=D):(E=e[20],D=e[21]);let O;e[22]!==r||e[23]!==T?(O=(0,Q.jsx)(Hr,{open:T,initial:r,onOpenChange:E,onInstallStarted:D}),e[22]=r,e[23]=T,e[24]=O):O=e[24];let k;return e[25]!==w||e[26]!==O?(k=(0,Q.jsxs)(Q.Fragment,{children:[w,O]}),e[25]=w,e[26]=O,e[27]=k):k=e[27],k}function Zr(e){Se.error(`Could not open Plugin Guide`,{description:Br(e)})}function Qr(e){return e.pluginId===Jr&&e.source===`builtin:${Jr}`&&e.official}function $r(e){return e.id===Jr}function ei(e,t){return`color-mix(in oklab, var(${e}) ${t}%, var(--canvas))`}function ti(e,t){return`color-mix(in oklab, var(${e}) ${t}%, var(--ink))`}function ni(e){return`color-mix(in oklch, var(--ink) ${e}%, var(--canvas))`}function ri(e){let t=(0,$.c)(26),{icon:n,title:r,description:i,accentToken:a,tooltip:o,onClick:s}=e,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=X(`group flex cursor-pointer flex-col items-start gap-1.5 rounded-lg border border-border`,`bg-background p-3 text-left transition-colors duration-150 hover:duration-0`,`hover:bg-state-hover focus-visible:ring-1 focus-visible:ring-ring`,`focus-visible:outline-none`),t[0]=c):c=t[0];let l;t[1]===a?l=t[2]:(l=a===void 0?{background:ni(5),borderColor:ni(14),color:ni(55)}:{background:ei(a,14),borderColor:ei(a,40),color:ti(a,62)},t[1]=a,t[2]=l);let u;t[3]===n?u=t[4]:(u=(0,Q.jsx)(q,{name:n,className:`size-3.5`}),t[3]=n,t[4]=u);let d;t[5]!==l||t[6]!==u?(d=(0,Q.jsx)(`span`,{className:`flex size-6 shrink-0 items-center justify-center rounded-md border`,style:l,children:u}),t[5]=l,t[6]=u,t[7]=d):d=t[7];let f;t[8]===r?f=t[9]:(f=(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm font-medium text-foreground`,children:r}),t[8]=r,t[9]=f);let p;t[10]!==d||t[11]!==f?(p=(0,Q.jsxs)(`div`,{className:`flex w-full items-center gap-2`,children:[d,f]}),t[10]=d,t[11]=f,t[12]=p):p=t[12];let m;t[13]===i?m=t[14]:(m=(0,Q.jsx)(`span`,{className:`block min-h-[2lh] text-xs leading-snug text-subtle-foreground`,children:i}),t[13]=i,t[14]=m);let h;t[15]!==s||t[16]!==p||t[17]!==m?(h=(0,Q.jsxs)(`button`,{type:`button`,onClick:s,className:c,children:[p,m]}),t[15]=s,t[16]=p,t[17]=m,t[18]=h):h=t[18];let g=h;if(o===void 0)return g;let _;t[19]===g?_=t[20]:(_=(0,Q.jsx)(de,{asChild:!0,children:g}),t[19]=g,t[20]=_);let v;t[21]===o?v=t[22]:(v=(0,Q.jsx)(O,{side:`bottom`,className:`max-w-xs`,children:o}),t[21]=o,t[22]=v);let y;return t[23]!==v||t[24]!==_?(y=(0,Q.jsxs)(se,{children:[_,v]}),t[23]=v,t[24]=_,t[25]=y):y=t[25],y}function ii(e){let t=(0,$.c)(13),{onCreate:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Q.jsx)(`h3`,{className:`text-xs font-medium text-subtle-foreground`,children:`Start from an example`}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=Ar.map(e=>(0,Q.jsx)(ri,{icon:e.icon,title:e.title,description:e.hook,accentToken:e.accentToken,onClick:()=>n(jr(e))},e.id)),t[1]=n,t[2]=i);let a;t[3]===i?a=t[4]:(a=(0,Q.jsx)(`div`,{className:`mt-2 grid grid-cols-[repeat(auto-fill,minmax(min(100%,18rem),1fr))] gap-2`,children:i}),t[3]=i,t[4]=a);let o;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Q.jsx)(`h4`,{className:`mt-5 text-2xs font-medium text-subtle-foreground`,children:`Explore plugin capabilities`}),t[5]=o):o=t[5];let s;t[6]===n?s=t[7]:(s=Mr.map(e=>(0,Q.jsx)(ri,{icon:e.icon,title:e.label,description:e.brief,tooltip:jr(e),onClick:()=>n(jr(e))},e.id)),t[6]=n,t[7]=s);let c;t[8]===s?c=t[9]:(c=(0,Q.jsx)(`div`,{className:`mt-2 grid grid-cols-[repeat(auto-fill,minmax(min(100%,18rem),1fr))] gap-2`,children:s}),t[8]=s,t[9]=c);let l;return t[10]!==a||t[11]!==c?(l=(0,Q.jsx)(Pt,{delayDuration:250,children:(0,Q.jsxs)(`section`,{children:[r,a,o,c]})}),t[10]=a,t[11]=c,t[12]=l):l=t[12],l}var ai=`Discover plugins for bb. Install one, or describe your own and build it from a prompt.`,oi=`The plugins installed on this bb host. Turn one on or off, apply updates, or open it for settings and details.`;function si(e){let t=(0,$.c)(69),{archetypes:n,activeIndex:r,scenes:i,titlePrefix:a,badge:o,rail:s,reducedMotion:c,className:l}=e,u=n[r]??n[0];if(u===void 0)return null;let d=u.accentToken,f;t[0]===l?f=t[1]:(f=X(`relative flex flex-col overflow-hidden rounded-xl border shadow-lift`,l),t[0]=l,t[1]=f);let p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p={background:`var(--canvas)`,borderColor:ni(16)},t[2]=p):p=t[2];let m;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(m={borderColor:ni(10),background:ni(3)},t[3]=m):m=t[3];let h;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Q.jsx)(`div`,{className:`flex shrink-0 gap-1`,"aria-hidden":`true`,children:[`--destructive`,`--attention`,`--success`].map(li)}),t[4]=h):h=t[4];let g=!c&&`transition-colors duration-500`,_;t[5]===g?_=t[6]:(_=X(`mx-auto truncate text-2xs font-medium`,g),t[5]=g,t[6]=_);let v;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(v={color:ni(48)},t[7]=v):v=t[7];let y;t[8]!==u.title||t[9]!==_||t[10]!==a?(y=(0,Q.jsxs)(`span`,{className:_,style:v,children:[a,u.title]}),t[8]=u.title,t[9]=_,t[10]=a,t[11]=y):y=t[11];let b;t[12]===d?b=t[13]:(b=ei(d,14),t[12]=d,t[13]=b);let x;t[14]===d?x=t[15]:(x=ti(d,60),t[14]=d,t[15]=x);let S;t[16]!==x||t[17]!==b?(S={background:b,color:x},t[16]=x,t[17]=b,t[18]=S):S=t[18];let C;t[19]!==o||t[20]!==S?(C=(0,Q.jsx)(`span`,{className:`shrink-0 rounded-full px-1.5 py-0.5 text-2xs font-medium`,style:S,children:o}),t[19]=o,t[20]=S,t[21]=C):C=t[21];let w;t[22]!==C||t[23]!==h||t[24]!==y?(w=(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-b px-2.5 py-1.5`,style:m,children:[h,y,C]}),t[22]=C,t[23]=h,t[24]=y,t[25]=w):w=t[25];let T;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(T={borderColor:ni(10),background:ni(2)},t[26]=T):T=t[26];let E;t[27]===s?E=t[28]:(E=s.map(ci),t[27]=s,t[28]=E);let D;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,Q.jsx)(`span`,{className:`my-0.5 h-px w-4`,style:{background:ni(12)}}),t[29]=D):D=t[29];let O=!c&&`transition-all duration-500`,k;t[30]===O?k=t[31]:(k=X(`flex size-5 items-center justify-center rounded-md border`,O),t[30]=O,t[31]=k);let A;t[32]===d?A=t[33]:(A=ei(d,16),t[32]=d,t[33]=A);let j;t[34]===d?j=t[35]:(j=ei(d,42),t[34]=d,t[35]=j);let M;t[36]===d?M=t[37]:(M=ti(d,62),t[36]=d,t[37]=M);let N;t[38]!==A||t[39]!==j||t[40]!==M?(N={background:A,borderColor:j,color:M},t[38]=A,t[39]=j,t[40]=M,t[41]=N):N=t[41];let P;t[42]===u.icon?P=t[43]:(P=(0,Q.jsx)(q,{name:u.icon,className:`size-3`}),t[42]=u.icon,t[43]=P);let F;t[44]!==k||t[45]!==N||t[46]!==P?(F=(0,Q.jsx)(`span`,{className:k,style:N,children:P}),t[44]=k,t[45]=N,t[46]=P,t[47]=F):F=t[47];let I;t[48]!==E||t[49]!==F?(I=(0,Q.jsxs)(`div`,{className:`flex w-8 shrink-0 flex-col items-center gap-1.5 border-r py-2`,style:T,"aria-hidden":`true`,children:[E,D,F]}),t[48]=E,t[49]=F,t[50]=I):I=t[50];let L;if(t[51]!==r||t[52]!==n||t[53]!==c||t[54]!==i){let e;t[56]!==r||t[57]!==c||t[58]!==i?(e=(e,t)=>{let n=i[e.id];if(n===void 0)return null;let a=t===r;return(0,Q.jsx)(`div`,{"aria-hidden":!a,className:X(`absolute inset-0`,!c&&`transition-opacity duration-500 ease-out`,a?`opacity-100`:`pointer-events-none select-none opacity-0`),children:(0,Q.jsx)(n,{accentToken:e.accentToken})},e.id)},t[56]=r,t[57]=c,t[58]=i,t[59]=e):e=t[59],L=n.map(e),t[51]=r,t[52]=n,t[53]=c,t[54]=i,t[55]=L}else L=t[55];let R;t[60]===L?R=t[61]:(R=(0,Q.jsx)(`div`,{className:`relative min-w-0 flex-1`,children:L}),t[60]=L,t[61]=R);let z;t[62]!==I||t[63]!==R?(z=(0,Q.jsxs)(`div`,{className:`flex min-h-0 flex-1`,children:[I,R]}),t[62]=I,t[63]=R,t[64]=z):z=t[64];let B;return t[65]!==f||t[66]!==w||t[67]!==z?(B=(0,Q.jsxs)(`div`,{className:f,style:p,children:[w,z]}),t[65]=f,t[66]=w,t[67]=z,t[68]=B):B=t[68],B}function ci(e){return(0,Q.jsx)(`span`,{className:`flex size-5 items-center justify-center rounded-md`,style:{color:ni(30)},children:(0,Q.jsx)(q,{name:e,className:`size-3`})},e)}function li(e){return(0,Q.jsx)(`span`,{className:`size-2 rounded-full`,style:{background:ei(e,78)}},e)}var ui=5e3,di=[{top:`2%`,left:0},{top:`38%`,left:0},{top:`72%`,left:0},{top:`14%`,right:0},{top:`48%`,right:0},{top:`82%`,right:0}];function fi(e){let t=(0,$.c)(96),{archetypes:n,scenes:r,copy:i,composer:a,rail:o,initialIndex:s,autoplay:c,composerDisabled:l,openRequest:u,onComposingChange:d}=e,f=s===void 0?0:s,p=c===void 0?!0:c,m=l===void 0?!1:l,h=u===void 0?null:u,g=We(),_=y(),v=hr(),S;t[0]===a.draftKey?S=t[1]:(S=rt({kind:`plugin-new-thread`,key:a.draftKey}),t[0]=a.draftKey,t[1]=S);let C=S,[w,T]=(0,Z.useState)(f),[E,D]=(0,Z.useState)(!1),[O,k]=(0,Z.useState)(!1),[A,j]=(0,Z.useState)(null),[M,N]=(0,Z.useState)(0),P=(0,Z.useRef)(null),F=A!==null,I=n[w]??n[0],L=!p||g||E||F||O,R,z;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(R=()=>{if(typeof document>`u`)return;let e=()=>k(document.hidden);return e(),document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},z=[],t[2]=R,t[3]=z):(R=t[2],z=t[3]),(0,Z.useEffect)(R,z);let B;t[4]===C?B=t[5]:(B=()=>x(C.storageKey),t[4]=C,t[5]=B);let ee;t[6]!==C||t[7]!==B?(ee=b({...C,focus:B}),t[6]=C,t[7]=B,t[8]=ee):ee=t[8];let te=ee,V=(0,Z.useRef)(!1),H;t[9]!==te||t[10]!==d?(H=(e,t)=>{e!==null&&t?.replaceDraft===!0&&te.replace({text:e,mentions:[]});let n=e!==null;V.current!==n&&(V.current=n,d?.(n)),j(e),e!==null&&N(pi)},t[9]=te,t[10]=d,t[11]=H):H=t[11];let U=H,W=(0,Z.useRef)(null),G,ne;t[12]!==a.promptPrefix||t[13]!==m||t[14]!==h||t[15]!==U?(G=()=>{m||h===null||h.nonce===W.current||(W.current=h.nonce,U(h.close===!0?null:h.seed??a.promptPrefix,{replaceDraft:!h.close&&h.seed!==void 0}))},ne=[a.promptPrefix,m,h,U],t[12]=a.promptPrefix,t[13]=m,t[14]=h,t[15]=U,t[16]=G,t[17]=ne):(G=t[16],ne=t[17]),(0,Z.useEffect)(G,ne);let K;t[18]!==n.length||t[19]!==L?(K=()=>{if(L)return;let e=window.setTimeout(()=>{T(e=>(e+1)%n.length)},ui);return()=>window.clearTimeout(e)},t[18]=n.length,t[19]=L,t[20]=K):K=t[20];let re;t[21]!==w||t[22]!==n.length||t[23]!==L?(re=[w,n.length,L],t[21]=w,t[22]=n.length,t[23]=L,t[24]=re):re=t[24],(0,Z.useEffect)(K,re);let J;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(J=e=>{(P.current?.querySelectorAll(`[role='tab']`))?.[e]?.focus()},t[25]=J):J=t[25];let ie=J,Y;t[26]!==w||t[27]!==n.length?(Y=e=>{let t=n.length-1,r=null;e.key===`ArrowRight`?r=w===t?0:w+1:e.key===`ArrowLeft`?r=w===0?t:w-1:e.key===`Home`?r=0:e.key===`End`&&(r=t),r!==null&&(e.preventDefault(),T(r),ie(r))},t[26]=w,t[27]=n.length,t[28]=Y):Y=t[28];let ae=Y;if(I===void 0)return null;let oe=i.ariaLabel,se,ce,le,ue;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(se=()=>D(!0),ce=()=>D(!1),le=()=>D(!0),ue=e=>{e.currentTarget.contains(e.relatedTarget)||D(!1)},t[29]=se,t[30]=ce,t[31]=le,t[32]=ue):(se=t[29],ce=t[30],le=t[31],ue=t[32]);let de=i.headlineLead,fe=F?`composing`:I.id,pe=!g&&`animate-in fade-in slide-in-from-bottom-1 duration-500`,me;t[33]===pe?me=t[34]:(me=X(`inline-block`,pe),t[33]=pe,t[34]=me);let he;t[35]!==I||t[36]!==F?(he=F?`var(--foreground)`:ti(I.accentToken,72),t[35]=I,t[36]=F,t[37]=he):he=t[37];let ge;t[38]===he?ge=t[39]:(ge={color:he},t[38]=he,t[39]=ge);let _e=F?i.composingNoun:I.noun,ve;t[40]!==fe||t[41]!==me||t[42]!==ge||t[43]!==_e?(ve=(0,Q.jsx)(`span`,{className:me,style:ge,children:_e},fe),t[40]=fe,t[41]=me,t[42]=ge,t[43]=_e,t[44]=ve):ve=t[44];let ye;t[45]!==i.headlineLead||t[46]!==ve?(ye=(0,Q.jsxs)(`h2`,{className:`text-center text-2xl font-semibold tracking-tight text-foreground`,children:[de,` `,ve]}),t[45]=i.headlineLead,t[46]=ve,t[47]=ye):ye=t[47];let be;t[48]===i.description?be=t[49]:(be=(0,Q.jsx)(`p`,{className:`mt-1.5 max-w-prose text-center text-sm text-muted-foreground`,children:i.description}),t[48]=i.description,t[49]=be);let xe=!g&&`transition-[opacity,transform,filter] duration-300 ease-out`,Se=F?`pointer-events-none scale-[0.97] opacity-0 blur-[2px]`:`scale-100 opacity-100 blur-0`,Ce;t[50]!==xe||t[51]!==Se?(Ce=X(`relative [grid-area:1/1]`,xe,Se),t[50]=xe,t[51]=Se,t[52]=Ce):Ce=t[52];let we;if(t[53]!==w||t[54]!==n){let e;t[56]===w?e=t[57]:(e=(e,t)=>{let n=di[t];if(n===void 0)return null;let r=t===w;return(0,Q.jsxs)(`button`,{type:`button`,tabIndex:-1,"aria-hidden":`true`,onClick:()=>T(t),style:{...n,"--bb-hero-drift-duration":`${6+t*.7}s`,"--bb-hero-drift-delay":`${t*.45}s`,background:r?ei(e.accentToken,12):`var(--canvas)`,borderColor:r?ei(e.accentToken,40):ni(13),color:r?ti(e.accentToken,62):ni(46)},className:X(`bb-hero-chip absolute z-10 hidden max-w-[9rem] cursor-pointer items-center gap-1.5`,`rounded-lg border px-2 py-1.5 text-2xs font-medium shadow-sm @[50rem]:flex`,`transition-[opacity,transform,background-color,border-color] duration-500`,r?`opacity-100`:`opacity-70 hover:opacity-100`),children:[(0,Q.jsx)(q,{name:e.icon,className:`size-3 shrink-0`}),(0,Q.jsx)(`span`,{className:`truncate`,children:e.title})]},e.id)},t[56]=w,t[57]=e),we=n.map(e),t[53]=w,t[54]=n,t[55]=we}else we=t[55];let Te;t[58]!==w||t[59]!==n||t[60]!==i.frameBadge||t[61]!==i.frameTitlePrefix||t[62]!==o||t[63]!==g||t[64]!==r?(Te=(0,Q.jsx)(si,{archetypes:n,activeIndex:w,scenes:r,titlePrefix:i.frameTitlePrefix,badge:i.frameBadge,rail:o,reducedMotion:g,className:`mx-auto h-[13rem] w-full max-w-[38rem] @[50rem]:w-[66%]`}),t[58]=w,t[59]=n,t[60]=i.frameBadge,t[61]=i.frameTitlePrefix,t[62]=o,t[63]=g,t[64]=r,t[65]=Te):Te=t[65];let Ee;t[66]!==F||t[67]!==Ce||t[68]!==we||t[69]!==Te?(Ee=(0,Q.jsxs)(`div`,{className:Ce,"aria-hidden":F,children:[we,Te]}),t[66]=F,t[67]=Ce,t[68]=we,t[69]=Te,t[70]=Ee):Ee=t[70];let De;t[71]!==a.draftKey||t[72]!==a.placeholder||t[73]!==M||t[74]!==A||t[75]!==F||t[76]!==v||t[77]!==_||t[78]!==g?(De=F?(0,Q.jsx)(`div`,{className:X(`z-20 self-center [grid-area:1/1]`,!g&&`animate-in fade-in slide-in-from-bottom-2 duration-300`),children:(0,Q.jsx)(`div`,{className:`mx-auto w-full max-w-[44rem]`,children:(0,Q.jsx)(Bt,{initialPrompt:A??void 0,placeholder:a.placeholder,draftKey:a.draftKey,focusRequest:M,onSubmit:async e=>{let t=await v.mutateAsync({input:e.input,projectId:e.projectId,providerId:e.providerId,model:e.model,reasoningLevel:e.reasoningLevel,permissionMode:e.permissionMode,...e.serviceTier?{serviceTier:e.serviceTier}:{},executionInputSources:e.executionInputSources,environment:e.environment});_(Ne({projectId:t.projectId??e.projectId,threadId:t.id}))}},M)})}):null,t[71]=a.draftKey,t[72]=a.placeholder,t[73]=M,t[74]=A,t[75]=F,t[76]=v,t[77]=_,t[78]=g,t[79]=De):De=t[79];let Oe;t[80]!==Ee||t[81]!==De?(Oe=(0,Q.jsxs)(`div`,{className:`@container relative mt-5 grid w-full max-w-[58rem] grid-cols-1 grid-rows-1`,children:[Ee,De]}),t[80]=Ee,t[81]=De,t[82]=Oe):Oe=t[82];let ke;t[83]!==w||t[84]!==n||t[85]!==F||t[86]!==i.tablistLabel||t[87]!==ae||t[88]!==L?(ke=F?null:(0,Q.jsx)(`div`,{className:`mt-4 flex min-h-4 flex-col items-center gap-3`,children:(0,Q.jsx)(`div`,{ref:P,role:`tablist`,"aria-label":i.tablistLabel,className:`flex items-center gap-1.5`,onKeyDown:ae,children:n.map((e,t)=>{let n=t===w;return(0,Q.jsx)(`button`,{role:`tab`,type:`button`,"aria-selected":n,"aria-label":e.title,tabIndex:n?0:-1,onClick:()=>T(t),className:X(`group h-4 cursor-pointer rounded-full px-0 focus-visible:ring-1`,`focus-visible:ring-ring focus-visible:outline-none`),children:(0,Q.jsx)(`span`,{className:X(`block h-1 overflow-hidden rounded-full transition-all duration-300`,n?`w-10`:`w-4`),style:{background:n?ei(e.accentToken,22):ni(14)},children:n?(0,Q.jsx)(`span`,{"data-paused":L,className:`bb-hero-progress-fill block h-full w-full`,style:{"--bb-hero-slide-duration":`${ui}ms`,background:`var(${e.accentToken})`}},`${e.id}-${w}`):null})},e.id)})})}),t[83]=w,t[84]=n,t[85]=F,t[86]=i.tablistLabel,t[87]=ae,t[88]=L,t[89]=ke):ke=t[89];let Ae;return t[90]!==i.ariaLabel||t[91]!==ye||t[92]!==be||t[93]!==Oe||t[94]!==ke?(Ae=(0,Q.jsxs)(`section`,{"aria-roledescription":`carousel`,"aria-label":oe,className:`flex flex-col items-center pb-4`,onPointerEnter:se,onPointerLeave:ce,onFocusCapture:le,onBlurCapture:ue,children:[ye,be,Oe,ke]}),t[90]=i.ariaLabel,t[91]=ye,t[92]=be,t[93]=Oe,t[94]=ke,t[95]=Ae):Ae=t[95],Ae}function pi(e){return e+1}function mi(e){let t=(0,$.c)(10),{width:n,strength:r,className:i}=e,a=r===void 0?12:r,o;t[0]===i?o=t[1]:(o=X(`h-1.5 rounded-full`,i),t[0]=i,t[1]=o);let s;t[2]===a?s=t[3]:(s=ni(a),t[2]=a,t[3]=s);let c;t[4]!==s||t[5]!==n?(c={width:n,background:s},t[4]=s,t[5]=n,t[6]=c):c=t[6];let l;return t[7]!==o||t[8]!==c?(l=(0,Q.jsx)(`div`,{className:o,style:c}),t[7]=o,t[8]=c,t[9]=l):l=t[9],l}function hi(e){let t=(0,$.c)(9),{children:n,className:r,style:i}=e,a;t[0]===r?a=t[1]:(a=X(`rounded-md border p-1.5`,r),t[0]=r,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=ni(11),t[2]=o):o=t[2];let s;t[3]===i?s=t[4]:(s={background:`var(--canvas)`,borderColor:o,...i},t[3]=i,t[4]=s);let c;return t[5]!==n||t[6]!==a||t[7]!==s?(c=(0,Q.jsx)(`div`,{className:a,style:s,children:n}),t[5]=n,t[6]=a,t[7]=s,t[8]=c):c=t[8],c}function gi(e){let t=(0,$.c)(3),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={color:ni(52)},t[0]=r):r=t[0];let i;return t[1]===n?i=t[2]:(i=(0,Q.jsx)(`span`,{className:`text-2xs font-medium`,style:r,children:n}),t[1]=n,t[2]=i),i}function _i(e){let t=(0,$.c)(2),{accentToken:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Q.jsx)(`div`,{className:`grid h-full grid-cols-3 gap-1.5 p-2`,children:[{label:`Todo`,cards:3},{label:`In progress`,cards:2,active:!0},{label:`Review`,cards:2}].map(e=>(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Q.jsx)(gi,{children:e.label}),(0,Q.jsx)(`span`,{className:`text-2xs tabular-nums`,style:{color:ni(38)},children:e.cards})]}),Array.from({length:e.cards},(t,r)=>{let i=e.active===!0&&r===0;return(0,Q.jsxs)(hi,{className:`flex flex-col gap-1`,style:i?{background:ei(n,10),borderColor:ei(n,38)}:void 0,children:[(0,Q.jsx)(mi,{width:r%2==0?`82%`:`64%`,strength:16}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Q.jsx)(`div`,{className:`size-1.5 rounded-full`,style:{background:i?`var(${n})`:ni(18)}}),(0,Q.jsx)(mi,{width:`38%`,strength:9})]})]},r)})]},e.label))}),t[0]=n,t[1]=r),r}function vi(e){let t=(0,$.c)(10),{accentToken:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[42,61,38,78,55,88,70],t[0]=r):r=t[0];let i=r,a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=[{label:`Deploys`,value:`18`},{label:`Open PRs`,value:`7`},{label:`CI pass`,value:`96%`}],t[1]=a):a=t[1];let o=a,s;t[2]===n?s=t[3]:(s=(0,Q.jsx)(`div`,{className:`grid grid-cols-3 gap-1.5`,children:o.map((e,t)=>(0,Q.jsxs)(hi,{className:`flex flex-col gap-0.5`,style:t===2?{background:ei(n,10),borderColor:ei(n,38)}:void 0,children:[(0,Q.jsx)(gi,{children:e.label}),(0,Q.jsx)(`span`,{className:`text-xs font-semibold tabular-nums`,style:{color:t===2?ti(n,55):ni(72)},children:e.value})]},e.label))}),t[2]=n,t[3]=s);let c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Q.jsx)(gi,{children:`Throughput`}),t[4]=c):c=t[4];let l;t[5]===n?l=t[6]:(l=(0,Q.jsxs)(hi,{className:`flex min-h-0 flex-1 flex-col gap-1.5`,children:[c,(0,Q.jsx)(`div`,{className:`flex min-h-0 flex-1 items-end gap-1`,children:i.map((e,t)=>(0,Q.jsx)(`div`,{className:`flex-1 rounded-sm`,style:{height:`${e}%`,background:t===i.length-2?`var(${n})`:ei(n,26)}},t))})]}),t[5]=n,t[6]=l);let u;return t[7]!==s||t[8]!==l?(u=(0,Q.jsxs)(`div`,{className:`flex h-full flex-col gap-2 p-2`,children:[s,l]}),t[7]=s,t[8]=l,t[9]=u):u=t[9],u}function yi(e){let t=(0,$.c)(35),{accentToken:n}=e,r,i,a,o,s,c;if(t[0]!==n){let e=[{label:`Video`,height:`h-3.5`,clips:[{width:`24%`,active:!1},{width:`34%`,active:!0},{width:`18%`,active:!1}]},{label:`Audio`,height:`h-2`,clips:[{width:`42%`,active:!1},{width:`30%`,active:!1},{width:`16%`,active:!1}]},{label:`Captions`,height:`h-1.5`,clips:[{width:`16%`,active:!1},{width:`13%`,active:!1},{width:`19%`,active:!1},{width:`12%`,active:!1}]}];s=`flex h-full flex-col gap-1.5 p-2`;let l;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Q.jsx)(gi,{children:`Launch video`}),t[7]=l):l=t[7];let u=ei(n,16),d=ti(n,62);t[8]!==u||t[9]!==d?(c=(0,Q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[l,(0,Q.jsx)(`span`,{className:`ml-auto rounded-full px-1.5 py-0.5 font-mono text-2xs font-medium tabular-nums`,style:{background:u,color:d},children:`first cut · 00:42`})]}),t[8]=u,t[9]=d,t[10]=c):c=t[10],r=hi,i=`relative flex min-h-0 flex-1 flex-col justify-center gap-2`;let f=`var(${n})`;t[11]===f?a=t[12]:(a=(0,Q.jsx)(`div`,{className:`pointer-events-none absolute inset-y-1 left-[52%] w-px`,style:{background:f},"aria-hidden":!0}),t[11]=f,t[12]=a),o=e.map(e=>(0,Q.jsxs)(`div`,{className:`grid grid-cols-[3.25rem_minmax(0,1fr)] items-center gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`text-2xs font-medium`,style:{color:ni(46)},children:e.label}),(0,Q.jsx)(`div`,{className:`flex ${e.height} items-stretch gap-0.5`,children:e.clips.map((t,r)=>(0,Q.jsx)(`span`,{className:`rounded-sm`,style:{width:t.width,background:e.label===`Audio`?ei(`--success`,30):t.active?ei(n,36):ni(e.label===`Captions`?16:12)}},r))})]},e.label)),t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c}else r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6];let l;t[13]!==r||t[14]!==i||t[15]!==a||t[16]!==o?(l=(0,Q.jsxs)(r,{className:i,children:[a,o]}),t[13]=r,t[14]=i,t[15]=a,t[16]=o,t[17]=l):l=t[17];let u;t[18]===n?u=t[19]:(u=ei(n,40),t[18]=n,t[19]=u);let d;t[20]===u?d=t[21]:(d={borderColor:u},t[20]=u,t[21]=d);let f;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Q.jsx)(`span`,{className:`text-2xs`,style:{color:ni(46)},children:`captions and music added`}),t[22]=f):f=t[22];let p;t[23]===n?p=t[24]:(p=ti(n,62),t[23]=n,t[24]=p);let m;t[25]===p?m=t[26]:(m=(0,Q.jsx)(`span`,{className:`text-2xs font-medium`,style:{color:p},children:`→ rendering first cut`}),t[25]=p,t[26]=m);let h;t[27]!==m||t[28]!==d?(h=(0,Q.jsxs)(`div`,{className:`flex items-center gap-1.5 rounded-md border border-dashed px-1.5 py-1`,style:d,children:[f,m]}),t[27]=m,t[28]=d,t[29]=h):h=t[29];let g;return t[30]!==h||t[31]!==s||t[32]!==c||t[33]!==l?(g=(0,Q.jsxs)(`div`,{className:s,children:[c,l,h]}),t[30]=h,t[31]=s,t[32]=c,t[33]=l,t[34]=g):g=t[34],g}function bi(e){let t=(0,$.c)(6),{accentToken:n}=e,r;if(t[0]!==n){let e=[{worktree:`feat/billing`,agents:4,progress:72,blocked:!1},{worktree:`fix/auth`,agents:3,progress:45,blocked:!0},{worktree:`chore/deps`,agents:5,progress:88,blocked:!1}],i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(gi,{children:`Working for you`}),t[2]=i):i=t[2];let a=ei(n,14),o=ti(n,60),s;t[3]!==a||t[4]!==o?(s=(0,Q.jsxs)(`div`,{className:`flex items-center justify-between`,children:[i,(0,Q.jsx)(`span`,{className:`rounded-full px-1.5 py-0.5 text-2xs font-medium tabular-nums`,style:{background:a,color:o},children:`12 running`})]}),t[3]=a,t[4]=o,t[5]=s):s=t[5],r=(0,Q.jsxs)(`div`,{className:`flex h-full flex-col gap-1.5 p-2`,children:[s,e.map(e=>(0,Q.jsxs)(hi,{className:`flex flex-col gap-1`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Q.jsx)(`span`,{className:`font-mono text-2xs`,style:{color:ni(52)},children:e.worktree}),e.blocked?(0,Q.jsx)(`span`,{className:`ml-auto rounded-sm px-1 text-2xs font-medium`,style:{background:ei(`--warning`,18),color:ti(`--warning`,62)},children:`needs you`}):(0,Q.jsxs)(`span`,{className:`ml-auto text-2xs tabular-nums`,style:{color:ni(38)},children:[e.agents,` agents`]})]}),(0,Q.jsx)(`div`,{className:`flex items-center gap-0.5`,children:Array.from({length:e.agents},(t,r)=>(0,Q.jsx)(`div`,{className:`h-1.5 flex-1 overflow-hidden rounded-full`,style:{background:ni(8)},children:(0,Q.jsx)(`div`,{className:`h-full rounded-full`,style:{width:`${Math.max(18,(e.progress+r*9)%100)}%`,background:r===0?`var(${n})`:ei(n,34)}})},r))})]},e.worktree))]}),t[0]=n,t[1]=r}else r=t[1];return r}function xi(e){let t=(0,$.c)(27),{accentToken:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[{name:`Guided`,state:`ready`},{name:`One page`,state:`ready`},{name:`Express`,state:`building`}],t[0]=r):r=t[0];let i=r,a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Q.jsx)(gi,{children:`Checkout flow`}),t[1]=a):a=t[1];let o;t[2]===n?o=t[3]:(o=ei(n,14),t[2]=n,t[3]=o);let s;t[4]===n?s=t[5]:(s=ti(n,62),t[4]=n,t[5]=s);let c;t[6]!==o||t[7]!==s?(c=(0,Q.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[a,(0,Q.jsx)(`span`,{className:`ml-auto rounded-full px-1.5 py-0.5 text-2xs font-medium`,style:{background:o,color:s},children:`3 prototypes`})]}),t[6]=o,t[7]=s,t[8]=c):c=t[8];let l;t[9]===n?l=t[10]:(l=(0,Q.jsx)(`div`,{className:`grid min-h-0 flex-1 grid-cols-3 gap-1`,children:i.map((e,t)=>{let r=e.state===`ready`;return(0,Q.jsxs)(hi,{className:`flex min-h-0 flex-col gap-1 p-1.5`,style:r?{background:ei(n,10),borderColor:ei(n,38)}:void 0,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Q.jsx)(`span`,{className:`size-1.5 rounded-full`,style:{background:r?`var(${n})`:ni(24)}}),(0,Q.jsx)(`span`,{className:`text-2xs font-medium`,style:{color:r?ti(n,62):ni(48)},children:e.name})]}),(0,Q.jsx)(gi,{children:r?`ready`:`building`}),(0,Q.jsx)(mi,{width:t%2==0?`78%`:`62%`,strength:14}),(0,Q.jsx)(mi,{width:t%2==0?`58%`:`74%`,strength:10}),(0,Q.jsxs)(hi,{className:`mt-auto flex min-h-0 flex-1 flex-col gap-1 border-dashed p-1`,children:[(0,Q.jsx)(mi,{width:`72%`,strength:12}),(0,Q.jsx)(mi,{width:`48%`,strength:8})]}),(0,Q.jsx)(`div`,{className:`h-1 overflow-hidden rounded-full`,style:{background:ni(8)},children:(0,Q.jsx)(`div`,{className:`h-full rounded-full`,style:{width:r?`100%`:`58%`,background:r?`var(${n})`:ei(n,34)}})})]},e.name)})}),t[9]=n,t[10]=l);let u;t[11]===n?u=t[12]:(u=ei(n,40),t[11]=n,t[12]=u);let d;t[13]===u?d=t[14]:(d={borderColor:u},t[13]=u,t[14]=d);let f;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Q.jsx)(`span`,{className:`text-2xs`,style:{color:ni(46)},children:`2 prototypes ready`}),t[15]=f):f=t[15];let p;t[16]===n?p=t[17]:(p=ti(n,62),t[16]=n,t[17]=p);let m;t[18]===p?m=t[19]:(m=(0,Q.jsx)(`span`,{className:`text-2xs font-medium`,style:{color:p},children:`→ compare side by side`}),t[18]=p,t[19]=m);let h;t[20]!==m||t[21]!==d?(h=(0,Q.jsxs)(`div`,{className:`flex items-center gap-1.5 rounded-md border border-dashed px-1.5 py-1`,style:d,children:[f,m]}),t[20]=m,t[21]=d,t[22]=h):h=t[22];let g;return t[23]!==h||t[24]!==c||t[25]!==l?(g=(0,Q.jsxs)(`div`,{className:`flex h-full flex-col gap-1.5 p-2`,children:[c,l,h]}),t[23]=h,t[24]=c,t[25]=l,t[26]=g):g=t[26],g}function Si(e){let t=(0,$.c)(27),{accentToken:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[{width:`76%`,kind:`bug`,cluster:`×4`,active:!0},{width:`58%`,kind:`question`,cluster:null,active:!1},{width:`68%`,kind:`bug`,cluster:`×2`,active:!1}],t[0]=r):r=t[0];let i=r,a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Q.jsx)(gi,{children:`Inbox`}),t[1]=a):a=t[1];let o;t[2]===n?o=t[3]:(o=ei(n,14),t[2]=n,t[3]=o);let s;t[4]===n?s=t[5]:(s=ti(n,62),t[4]=n,t[5]=s);let c;t[6]!==o||t[7]!==s?(c=(0,Q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[a,(0,Q.jsx)(`span`,{className:`ml-auto rounded-full px-1.5 py-0.5 text-2xs font-medium tabular-nums`,style:{background:o,color:s},children:`9 open`})]}),t[6]=o,t[7]=s,t[8]=c):c=t[8];let l;t[9]===n?l=t[10]:(l=i.map((e,t)=>(0,Q.jsxs)(hi,{className:`flex items-center gap-1.5`,style:e.active?{background:ei(n,10),borderColor:ei(n,38)}:void 0,children:[(0,Q.jsx)(`span`,{className:`rounded-sm px-1 py-0.5 text-2xs font-medium`,style:e.kind===`bug`?{background:ei(n,18),color:ti(n,62)}:{background:ni(7),color:ni(48)},children:e.kind}),(0,Q.jsx)(mi,{width:e.width,strength:e.active?22:14}),e.cluster===null?null:(0,Q.jsx)(`span`,{className:`ml-auto shrink-0 text-2xs tabular-nums`,style:{color:ni(40)},children:e.cluster})]},t)),t[9]=n,t[10]=l);let u;t[11]===n?u=t[12]:(u=ei(n,40),t[11]=n,t[12]=u);let d;t[13]===u?d=t[14]:(d={borderColor:u},t[13]=u,t[14]=d);let f;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Q.jsx)(`span`,{className:`font-mono text-2xs`,style:{color:ni(46)},children:`reply drafted`}),t[15]=f):f=t[15];let p;t[16]===n?p=t[17]:(p=ti(n,62),t[16]=n,t[17]=p);let m;t[18]===p?m=t[19]:(m=(0,Q.jsx)(`span`,{className:`text-2xs font-medium`,style:{color:p},children:`→ fix thread opened`}),t[18]=p,t[19]=m);let h;t[20]!==m||t[21]!==d?(h=(0,Q.jsxs)(`div`,{className:`mt-auto flex items-center gap-1.5 rounded-md border border-dashed px-1.5 py-1`,style:d,children:[f,m]}),t[20]=m,t[21]=d,t[22]=h):h=t[22];let g;return t[23]!==h||t[24]!==c||t[25]!==l?(g=(0,Q.jsxs)(`div`,{className:`flex h-full flex-col gap-1.5 p-2`,children:[c,l,h]}),t[23]=h,t[24]=c,t[25]=l,t[26]=g):g=t[26],g}var Ci={"kanban-board":_i,"live-dashboard":vi,"chief-of-staff":bi,"video-editor":yi,"prototyping-lab":xi,"support-inbox":Si},wi=[`MessageSquare`,`Folder`,`ListTodo`],Ti={ariaLabel:`What you can build with bb plugins`,headlineLead:`Turn bb into`,composingNoun:`whatever you need`,description:ai,tablistLabel:`Plugin examples`,frameTitlePrefix:`bb — `,frameBadge:`Plugin`},Ei={promptPrefix:Cr,placeholder:`Describe the plugin you want to build…`,draftKey:`plugins-browse-hero`};function Di(e){let t=(0,$.c)(6),{initialIndex:n,autoplay:r,composerDisabled:i,openRequest:a,onComposingChange:o}=e,s=n===void 0?0:n,c=r===void 0?!0:r,l=i===void 0?!1:i,u=a===void 0?null:a,d;return t[0]!==c||t[1]!==l||t[2]!==s||t[3]!==o||t[4]!==u?(d=(0,Q.jsx)(fi,{archetypes:Ar,scenes:Ci,copy:Ti,composer:Ei,rail:wi,initialIndex:s,autoplay:c,composerDisabled:l,openRequest:u,onComposingChange:o}),t[0]=c,t[1]=l,t[2]=s,t[3]=o,t[4]=u,t[5]=d):d=t[5],d}function Oi(e,t){let n=(0,$.c)(16),r=_(),i=st(),o;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={showErrorToast:!1},n[0]=o):o=n[0];let s;n[1]!==e||n[2]!==i?(s=t=>i(e.id,t),n[1]=e,n[2]=i,n[3]=s):s=n[3];let c;n[4]===e?c=n[5]:(c=(t,n)=>{Se.error(`${n?`Enabling`:`Disabling`} ${e.id} failed`,{description:t instanceof Error?t.message:String(t)})},n[4]=e,n[5]=c);let l;n[6]!==t||n[7]!==r?(l=async()=>{await Ke({queryClient:r}),await t?.()},n[6]=t,n[7]=r,n[8]=l):l=n[8];let u;n[9]!==s||n[10]!==c||n[11]!==l?(u={meta:o,mutationFn:s,onError:c,onSettled:l},n[9]=s,n[10]=c,n[11]=l,n[12]=u):u=n[12];let d=a(u),f=d.isPending?d.variables:e.enabled,p;return n[13]!==f||n[14]!==d?(p={toggle:d,enabled:f},n[13]=f,n[14]=d,n[15]=p):p=n[15],p}var ki={queued:`Queued`,running:`Installing…`,cancelling:`Cancelling…`};function Ai(e){let t=(0,$.c)(26),{displayName:n,job:r,onCancel:i}=e,a=r.state===`cancelling`,o=a?`Cancelling the ${n} install`:r.state===`queued`?`Waiting for another install to finish. Click to cancel.`:`Installing ${n}. Click to cancel.`,s=a?`Cancelling ${n} install`:`Cancel installing ${n}`,c=a?`cursor-not-allowed hover:bg-transparent`:`hover:text-destructive-text`,l;t[0]===c?l=t[1]:(l=X(`group/install h-7 min-w-7 shrink-0 gap-1.5 px-2 text-xs font-normal text-subtle-foreground shadow-none`,c),t[0]=c,t[1]=l);let u;t[2]!==a||t[3]!==i?(u=()=>{a||i()},t[2]=a,t[3]=i,t[4]=u):u=t[4];let d=!a&&`group-hover/install:opacity-0 group-focus-visible/install:opacity-0`,f;t[5]===d?f=t[6]:(f=X(`col-start-1 row-start-1 size-3.5 animate-spin`,d),t[5]=d,t[6]=f);let p;t[7]===f?p=t[8]:(p=(0,Q.jsx)(q,{name:`Spinner`,className:f}),t[7]=f,t[8]=p);let m;t[9]===a?m=t[10]:(m=a?null:(0,Q.jsx)(q,{name:`X`,className:`col-start-1 row-start-1 size-3.5 opacity-0 group-hover/install:opacity-100 group-focus-visible/install:opacity-100`}),t[9]=a,t[10]=m);let h;t[11]!==p||t[12]!==m?(h=(0,Q.jsxs)(`span`,{className:`grid place-items-center`,"aria-hidden":!0,children:[p,m]}),t[11]=p,t[12]=m,t[13]=h):h=t[13];let g=ki[r.state],_;t[14]!==a||t[15]!==s||t[16]!==g||t[17]!==l||t[18]!==u||t[19]!==h?(_=(0,Q.jsx)(de,{asChild:!0,children:(0,Q.jsxs)(ft,{type:`button`,variant:`ghost`,size:`sm`,"aria-disabled":a,"aria-label":s,className:l,onClick:u,children:[h,g]})}),t[14]=a,t[15]=s,t[16]=g,t[17]=l,t[18]=u,t[19]=h,t[20]=_):_=t[20];let v;t[21]===o?v=t[22]:(v=(0,Q.jsx)(O,{children:o}),t[21]=o,t[22]=v);let y;return t[23]!==_||t[24]!==v?(y=(0,Q.jsx)(Pt,{delayDuration:250,children:(0,Q.jsxs)(se,{children:[_,v]})}),t[23]=_,t[24]=v,t[25]=y):y=t[25],y}function ji(e){let t=(0,$.c)(46),{displayName:n,installed:r,count:i}=e;if(!e.installed&&e.installJob!==null){let{installJob:r,onCancelInstall:i}=e,a;t[0]!==r.id||t[1]!==i?(a=()=>i(r.id),t[0]=r.id,t[1]=i,t[2]=a):a=t[2];let o;return t[3]!==n||t[4]!==r||t[5]!==a?(o=(0,Q.jsx)(Ai,{displayName:n,job:r,onCancel:a}),t[3]=n,t[4]=r,t[5]=a,t[6]=o):o=t[6],o}let a=r&&e.included,o=r?a||e.onUninstall===void 0:e.disabled,s=a?`Included with BB`:r?`Installed`:o?e.unavailableReason??`Unavailable for this version of BB.`:`Install ${n}`,c=r?`Check`:o?`AlertTriangle`:`Download`,l=r||e.subtle?`ghost`:`outline`,u=`${r?`${n} installed`:`Install ${n}`}${i===void 0?``:` — ${i.accessibleLabel}`}`,d=r||e.subtle?`font-normal text-subtle-foreground`:`border-border/80 bg-background text-foreground hover:bg-state-hover`,f=r&&!o&&`hover:text-destructive-text`,p=o&&`cursor-not-allowed hover:bg-transparent hover:text-subtle-foreground`,m=r&&`opacity-50 hover:opacity-100 focus-visible:opacity-100`,h;t[7]!==d||t[8]!==f||t[9]!==p||t[10]!==m?(h=X(`group/install h-7 min-w-7 shrink-0 gap-1.5 px-2 text-xs shadow-none`,d,f,p,m),t[7]=d,t[8]=f,t[9]=p,t[10]=m,t[11]=h):h=t[11];let g;t[12]!==o||t[13]!==e?(g=()=>{o||(e.installed?e.onUninstall?.():e.onInstall())},t[12]=o,t[13]=e,t[14]=g):g=t[14];let _=i?.tone===`builtin`&&`hidden`,v;t[15]===_?v=t[16]:(v=X(`grid place-items-center`,_),t[15]=_,t[16]=v);let y=!r&&o&&`text-warning-text`,b=r&&!o&&`group-hover/install:opacity-0 group-focus-visible/install:opacity-0`,x;t[17]!==y||t[18]!==b?(x=X(`col-start-1 row-start-1 size-3.5`,y,b),t[17]=y,t[18]=b,t[19]=x):x=t[19];let S;t[20]!==c||t[21]!==x?(S=(0,Q.jsx)(q,{name:c,className:x}),t[20]=c,t[21]=x,t[22]=S):S=t[22];let C;t[23]!==o||t[24]!==r?(C=r&&!o?(0,Q.jsx)(q,{name:`Trash2`,className:`col-start-1 row-start-1 size-3.5 opacity-0 group-hover/install:opacity-100 group-focus-visible/install:opacity-100`}):null,t[23]=o,t[24]=r,t[25]=C):C=t[25];let w;t[26]!==S||t[27]!==C||t[28]!==v?(w=(0,Q.jsxs)(`span`,{className:v,"aria-hidden":!0,children:[S,C]}),t[26]=S,t[27]=C,t[28]=v,t[29]=w):w=t[29];let T=e.showLabel?r?`Installed`:`Install`:null,E;t[30]===i?E=t[31]:(E=i===void 0?null:(0,Q.jsx)(`span`,{"aria-hidden":!0,className:X(`text-2xs`,i.tone===`new`&&`font-semibold`),style:i.tone===`new`?Zn:void 0,children:i.display}),t[30]=i,t[31]=E);let D;t[32]!==o||t[33]!==l||t[34]!==u||t[35]!==w||t[36]!==T||t[37]!==E||t[38]!==h||t[39]!==g?(D=(0,Q.jsx)(de,{asChild:!0,children:(0,Q.jsxs)(ft,{type:`button`,variant:l,size:`sm`,"aria-disabled":o,"aria-label":u,className:h,onClick:g,children:[w,T,E]})}),t[32]=o,t[33]=l,t[34]=u,t[35]=w,t[36]=T,t[37]=E,t[38]=h,t[39]=g,t[40]=D):D=t[40];let k;t[41]===s?k=t[42]:(k=(0,Q.jsx)(O,{children:s}),t[41]=s,t[42]=k);let A;return t[43]!==D||t[44]!==k?(A=(0,Q.jsx)(Pt,{delayDuration:250,children:(0,Q.jsxs)(se,{children:[D,k]})}),t[43]=D,t[44]=k,t[45]=A):A=t[45],A}function Mi(e){let t=(0,$.c)(20),{entries:n,resetKey:r,onInstall:i,onUninstall:a,onOpenPlugin:o}=e,s;t[0]===r?s=t[1]:(s={pageSize:12,resetKey:r},t[0]=r,t[1]=s);let c=Ge(n,s),l;if(t[2]!==c.items||t[3]!==i||t[4]!==o||t[5]!==a){let e;t[7]!==i||t[8]!==o||t[9]!==a?(e=e=>(0,Q.jsx)(Pi,{entry:e,onInstall:i,onUninstall:a,onOpenPlugin:o},`${e.marketplace}/${e.entryId}`),t[7]=i,t[8]=o,t[9]=a,t[10]=e):e=t[10],l=c.items.map(e),t[2]=c.items,t[3]=i,t[4]=o,t[5]=a,t[6]=l}else l=t[6];let u;t[11]===l?u=t[12]:(u=(0,Q.jsx)(An,{children:l}),t[11]=l,t[12]=u);let d;t[13]!==c.hasMore||t[14]!==c.items.length||t[15]!==c.loadMore?(d=(0,Q.jsx)(Re,{itemCount:c.items.length,hasMore:c.hasMore,onLoadMore:c.loadMore}),t[13]=c.hasMore,t[14]=c.items.length,t[15]=c.loadMore,t[16]=d):d=t[16];let f;return t[17]!==u||t[18]!==d?(f=(0,Q.jsxs)(Q.Fragment,{children:[u,d]}),t[17]=u,t[18]=d,t[19]=f):f=t[19],f}function Ni(e){let t=(0,$.c)(7),{plugin:n,displayName:r}=e,{toggle:i,enabled:a}=Oi(n),o;t[0]===i?o=t[1]:(o=e=>i.mutate(e),t[0]=i,t[1]=o);let s=`${a?`Disable`:`Enable`} ${r}`,c;return t[2]!==a||t[3]!==o||t[4]!==s||t[5]!==i.isPending?(c=(0,Q.jsx)(cr,{checked:a,disabled:i.isPending,onCheckedChange:o,"aria-label":s}),t[2]=a,t[3]=o,t[4]=s,t[5]=i.isPending,t[6]=c):c=t[6],c}function Pi(e){let t=(0,$.c)(28),{entry:n,onInstall:r,onUninstall:i,onOpenPlugin:a}=e,o;t[0]===n?o=t[1]:(o=Ln(n),t[0]=n,t[1]=o);let s=o,c;t[2]===n?c=t[3]:(c=F(n),t[2]=n,t[3]=c);let l=c,u=mt(n),{mutate:d}=je(),f=Ft({enabled:n.installed}).data?.plugins.find(e=>e.id===n.pluginId),p;t[4]===n?p=t[5]:(p=(0,Q.jsx)(Xn,{entry:n,compact:!0}),t[4]=n,t[5]=p);let m=n.description||void 0,h;t[6]===n?h=t[7]:(h=(0,Q.jsx)(zn,{entry:n}),t[6]=n,t[7]=h);let g;t[8]!==d||t[9]!==s||t[10]!==n||t[11]!==l||t[12]!==u||t[13]!==f||t[14]!==r||t[15]!==i?(g=n.installed?(0,Q.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(ji,{displayName:n.displayName,installed:!0,subtle:!0,included:n.source.startsWith(`builtin:`),count:s,onUninstall:i===void 0?void 0:()=>i(n)}),f===void 0?null:(0,Q.jsx)(Ni,{plugin:f,displayName:n.displayName})]}):(0,Q.jsx)(ji,{displayName:n.displayName,installed:!1,subtle:!0,disabled:l!==null,unavailableReason:l,count:s,onInstall:()=>r(n),installJob:u,onCancelInstall:d}),t[8]=d,t[9]=s,t[10]=n,t[11]=l,t[12]=u,t[13]=f,t[14]=r,t[15]=i,t[16]=g):g=t[16];let _=`Open ${n.displayName} details`,v;t[17]!==n||t[18]!==a?(v=e=>a(_e(n),e),t[17]=n,t[18]=a,t[19]=v):v=t[19];let y;return t[20]!==n.displayName||t[21]!==p||t[22]!==m||t[23]!==h||t[24]!==g||t[25]!==_||t[26]!==v?(y=(0,Q.jsx)(or,{leading:p,title:n.displayName,description:m,byline:h,footerAction:g,openLabel:_,onOpen:v}),t[20]=n.displayName,t[21]=p,t[22]=m,t[23]=h,t[24]=g,t[25]=_,t[26]=v,t[27]=y):y=t[27],y}var Fi=[`name`,`recently-added`,`most-installed`],Ii={name:`Name`,"recently-added":`Published`,"most-installed":`Installs`},Li={name:{asc:`SortingAZ02`,desc:`SortingZA01`},"recently-added":{asc:`ClockArrowUp`,desc:`ClockArrowDown`},"most-installed":{asc:`SortingOneNine`,desc:`SortingNineOne`}},Ri={name:{asc:`A–Z`,desc:`Z–A`},"recently-added":{asc:`Oldest first`,desc:`Newest first`},"most-installed":{asc:`Fewest first`,desc:`Most first`}};function zi(e,t=null,n=`asc`){return Fi.map(r=>{let i=r===t?n:r===`name`?`asc`:`desc`;return{id:r,label:Ii[r],leading:(0,Q.jsx)(q,{name:Li[r][i],className:`size-4`}),disabled:r===`most-installed`&&!e}})}function Bi(e){let t=(0,$.c)(72),{query:n,selectedCategories:r,categoryOptions:i,showCategoryFilter:a,sort:o,sortDirection:s,installsKnown:c,changeSearchParams:l,searchPlaceholder:u,action:d,sourceFilter:f}=e,p=a===void 0?!0:a,m=u===void 0?`Search plugins`:u,h=Gi(n,l),g;t[0]!==c||t[1]!==o||t[2]!==s?(g=zi(c,o,s),t[0]=c,t[1]=o,t[2]=s,t[3]=g):g=t[3];let _;t[4]!==l||t[5]!==o||t[6]!==s?(_=e=>l(t=>{e===o?t.set(`direction`,s===`asc`?`desc`:`asc`):(t.set(`sort`,e),t.set(`direction`,e===`name`?`asc`:`desc`))}),t[4]=l,t[5]=o,t[6]=s,t[7]=_):_=t[7];let v;t[8]===l?v=t[9]:(v=()=>l(Ui),t[8]=l,t[9]=v);let y;t[10]!==o||t[11]!==s||t[12]!==g||t[13]!==_||t[14]!==v?(y={value:o,direction:s,compact:!0,clearInFooter:!0,showHeading:!1,placeholderLabel:`Default`,options:g,onChange:_,onClear:v},t[10]=o,t[11]=s,t[12]=g,t[13]=_,t[14]=v,t[15]=y):y=t[15];let b=y,x;t[16]===l?x=t[17]:(x=e=>l(t=>{t.delete(`category`);for(let n of e)t.append(`category`,n)}),t[16]=l,t[17]=x);let S;t[18]!==i||t[19]!==r||t[20]!==x?(S={value:r,options:i,onChange:x},t[18]=i,t[19]=r,t[20]=x,t[21]=S):S=t[21];let C=S,w,T,E,D,O;t[22]!==i||t[23]!==C||t[24]!==r||t[25]!==p||t[26]!==o||t[27]!==s||t[28]!==f?(E=f?{...f,label:`Source`,icon:`Download`,compact:!0,clearInFooter:!0,showHeading:!1}:null,w=o===null?`ArrowUpDown`:Li[o][s],T=o===null?`Default`:`${Ii[o]} · ${Ri[o][s]}`,t[34]!==i||t[35]!==C||t[36]!==r||t[37]!==p?(O=p?[{id:`category`,label:`Category`,icon:`SlidersHorizontal`,active:r.length>0,summary:i.filter(e=>r.includes(e.id)).map(Hi).join(`, `)||`All`,content:(0,Q.jsx)($i,{...C})}]:[],t[34]=i,t[35]=C,t[36]=r,t[37]=p,t[38]=O):O=t[38],D=E?[{id:`source`,label:`Source`,icon:E.icon,active:E.selectedValues.length>0,summary:E.options.filter(e=>E.selectedValues.includes(e.id)).map(Vi).join(`, `)||`All`,content:(0,Q.jsx)(Zt,{...E})}]:[],t[22]=i,t[23]=C,t[24]=r,t[25]=p,t[26]=o,t[27]=s,t[28]=f,t[29]=w,t[30]=T,t[31]=E,t[32]=D,t[33]=O):(w=t[29],T=t[30],E=t[31],D=t[32],O=t[33]);let k=o!==null,A;t[39]===b?A=t[40]:(A=(0,Q.jsx)(Gt,{...b}),t[39]=b,t[40]=A);let j;t[41]!==w||t[42]!==T||t[43]!==k||t[44]!==A?(j={id:`sort`,label:`Sort`,icon:w,active:k,summary:T,content:A},t[41]=w,t[42]=T,t[43]=k,t[44]=A,t[45]=j):j=t[45];let M;t[46]!==D||t[47]!==j||t[48]!==O?(M=[...O,...D,j],t[46]=D,t[47]=j,t[48]=O,t[49]=M):M=t[49];let N=M,P;t[50]!==C||t[51]!==p?(P=p?(0,Q.jsx)(Zi,{...C}):null,t[50]=C,t[51]=p,t[52]=P):P=t[52];let F;t[53]===E?F=t[54]:(F=E?(0,Q.jsx)(Kt,{...E,showLabel:!0}):null,t[53]=E,t[54]=F);let I=`Sort: ${T}`,L;t[55]!==w||t[56]!==b||t[57]!==I?(L=(0,Q.jsx)(pn,{...b,showLabel:!0,triggerIcon:w,tooltip:I}),t[55]=w,t[56]=b,t[57]=I,t[58]=L):L=t[58];let R;t[59]!==P||t[60]!==F||t[61]!==L?(R=(0,Q.jsxs)(Q.Fragment,{children:[P,F,L]}),t[59]=P,t[60]=F,t[61]=L,t[62]=R):R=t[62];let z;t[63]===N?z=t[64]:(z=N.length>1?(0,Q.jsx)(Ki,{pages:N}):void 0,t[63]=N,t[64]=z);let B;return t[65]!==d||t[66]!==h.change||t[67]!==h.value||t[68]!==m||t[69]!==R||t[70]!==z?(B=(0,Q.jsx)(`div`,{className:`w-full`,children:(0,Q.jsx)(Yt,{compact:!0,expandSearchOnFocus:!0,action:d,searchValue:h.value,searchLabel:m,searchPlaceholder:`Search plugins...`,onSearchChange:h.change,controls:R,combinedControls:z})}),t[65]=d,t[66]=h.change,t[67]=h.value,t[68]=m,t[69]=R,t[70]=z,t[71]=B):B=t[71],B}function Vi(e){return e.label}function Hi(e){return e.label}function Ui(e){e.delete(`sort`),e.delete(`direction`)}var Wi=200;function Gi(e,t){let n=(0,$.c)(11),[r,i]=(0,Z.useState)(e),a;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=[],n[0]=a):a=n[0];let o;n[1]===e?o=n[2]:(o={query:e,pending:a},n[1]=e,n[2]=o);let[s,c]=(0,Z.useState)(o),l=(0,Z.useRef)(null);if(e!==s.query){let t=s.pending.indexOf(e);c({query:e,pending:s.pending.slice(t+1)}),t===-1&&i(e)}let u;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>{l.current!==null&&(window.clearTimeout(l.current),l.current=null)},n[3]=u):u=n[3];let d=u,f,p;n[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=()=>d,p=[],n[4]=f,n[5]=p):(f=n[4],p=n[5]),(0,Z.useEffect)(f,p);let m;if(n[6]!==t){let e=e=>{d(),c(t=>({...t,pending:[...t.pending,e]})),t(t=>{e===``?t.delete(`query`):t.set(`query`,e)})};m=t=>{if(i(t),d(),t===``){e(t);return}l.current=window.setTimeout(()=>e(t),Wi)},n[6]=t,n[7]=m}else m=n[7];let h=m,g;return n[8]!==h||n[9]!==r?(g={value:r,change:h},n[8]=h,n[9]=r,n[10]=g):g=n[10],g}function Ki(e){let t=(0,$.c)(30),{pages:n}=e,[r,i]=(0,Z.useState)(!1),[a,o]=(0,Z.useState)(null),s=(0,Z.useRef)(null),c=(0,Z.useRef)(null),l;if(t[0]!==a||t[1]!==n){let e;t[3]===a?e=t[4]:(e=e=>e.id===a,t[3]=a,t[4]=e),l=n.find(e),t[0]=a,t[1]=n,t[2]=l}else l=t[2];let u=l,d=n.filter(Ji).map(qi),f,p;t[5]!==r||t[6]!==a?(f=()=>{if(!r)return;let e=requestAnimationFrame(()=>{let e=s.current;a?e?.querySelector(`input, [role="menuitemradio"], [role="menuitemcheckbox"]`)?.focus():c.current&&e?.querySelector(`[data-control-page="${c.current}"]`)?.closest(`[role="menuitem"]`)?.focus()});return()=>cancelAnimationFrame(e)},p=[r,a],t[5]=r,t[6]=a,t[7]=f,t[8]=p):(f=t[7],p=t[8]),(0,Z.useEffect)(f,p);let m=z,h;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(h=e=>{i(e),e||(o(null),c.current=null)},t[9]=h):h=t[9];let g=et,_=wn,v=d.length?d.join(`; `):`Filter & sort`,y=d.length>0,b;t[10]!==_||t[11]!==r||t[12]!==v||t[13]!==y?(b=(0,Q.jsx)(_,{label:`Filter & sort`,tooltip:v,icon:`FilterHorizontal`,active:y,open:r}),t[10]=_,t[11]=r,t[12]=v,t[13]=y,t[14]=b):b=t[14];let x;t[15]!==g||t[16]!==b?(x=(0,Q.jsx)(g,{asChild:!0,children:b}),t[15]=g,t[16]=b,t[17]=x):x=t[17];let S=u?.label??`Filter & sort`,C;t[18]!==u||t[19]!==n?(C=u?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(K,{onSelect:e=>{e.preventDefault(),c.current=u.id,o(null)},children:[(0,Q.jsx)(q,{name:`ChevronLeft`,className:`size-4`}),`Filter & sort`]}),(0,Q.jsx)(He,{}),u.content]}):n.map(e=>(0,Q.jsxs)(K,{onSelect:t=>{t.preventDefault(),o(e.id)},children:[e.icon?(0,Q.jsx)(q,{name:e.icon,className:`size-4`}):null,(0,Q.jsx)(`span`,{"data-control-page":e.id,className:`shrink-0`,children:e.label}),(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-right text-2xs text-muted-foreground`,title:e.summary,children:e.summary}),(0,Q.jsx)(q,{name:`ChevronRight`,className:`size-4`})]},e.id)),t[18]=u,t[19]=n,t[20]=C):C=t[20];let w;t[21]!==S||t[22]!==C?(w=(0,Q.jsx)(be,{ref:s,align:`end`,mobileTitle:S,className:`w-72 md:p-0.5`,children:C}),t[21]=S,t[22]=C,t[23]=w):w=t[23];let T;return t[24]!==m||t[25]!==r||t[26]!==x||t[27]!==w||t[28]!==h?(T=(0,Q.jsxs)(m,{open:r,onOpenChange:h,children:[x,w]}),t[24]=m,t[25]=r,t[26]=x,t[27]=w,t[28]=h,t[29]=T):T=t[29],T}function qi(e){return`${e.label}: ${e.summary}`}function Ji(e){return e.active}var Yi=600;function Xi(e){let t=(0,$.c)(6),{enabled:n}=e,r=n?`enabled`:`disabled`,i=n?`border-foreground bg-foreground text-background`:`border-input bg-background text-transparent`,a;t[0]===i?a=t[1]:(a=X(`grid size-4 shrink-0 place-items-center rounded-sm border shadow-xs`,i),t[0]=i,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Q.jsx)(q,{name:`Check`,className:`size-3.5`}),t[2]=o):o=t[2];let s;return t[3]!==r||t[4]!==a?(s=(0,Q.jsx)(`span`,{"data-category-option-checkbox":!0,"data-state":r,className:a,"aria-hidden":!0,children:o}),t[3]=r,t[4]=a,t[5]=s):s=t[5],s}function Zi(e){let t=(0,$.c)(20),{options:n,value:r}=e,[i,a]=(0,Z.useState)(!1),o;if(t[0]!==n||t[1]!==r){let e;t[3]===n?e=t[4]:(e=e=>{let t=n.find(t=>t.id===e);return t===void 0?[]:[t]},t[3]=n,t[4]=e);let i=r.flatMap(e);o=i.length===0?`All categories`:i.map(Qi).join(`, `),t[0]=n,t[1]=r,t[2]=o}else o=t[2];let s=o,c=`Filter plugins by category: ${s}`,l=`Category: ${s}`,u=r.length>0,d;t[5]!==i||t[6]!==c||t[7]!==l||t[8]!==u||t[9]!==r.length?(d=(0,Q.jsx)(W,{asChild:!0,children:(0,Q.jsx)(wn,{label:c,text:`Category`,tooltip:l,icon:`SlidersHorizontal`,count:r.length,trailingIcon:`ChevronDown`,active:u,open:i})}),t[5]=i,t[6]=c,t[7]=l,t[8]=u,t[9]=r.length,t[10]=d):d=t[10];let f;t[11]!==i||t[12]!==e?(f=i?(0,Q.jsx)($i,{...e}):null,t[11]=i,t[12]=e,t[13]=f):f=t[13];let p;t[14]===f?p=t[15]:(p=(0,Q.jsx)(U,{align:`end`,mobileTitle:`Filter plugins by category`,className:`w-72 p-1.5 md:p-0.5`,children:f}),t[14]=f,t[15]=p);let m;return t[16]!==i||t[17]!==d||t[18]!==p?(m=(0,Q.jsxs)(w,{open:i,onOpenChange:a,children:[d,p]}),t[16]=i,t[17]=d,t[18]=p,t[19]=m):m=t[19],m}function Qi(e){return e.label}function $i(e){let t=(0,$.c)(43),{options:n,value:r,onChange:i}=e,[a,o]=(0,Z.useState)(!1),s;t[0]===r?s=t[1]:(s=new Set(r),t[0]=r,t[1]=s);let c=s,[l,u]=(0,Z.useState)(null),d=l!==null,f;t[2]===d?f=t[3]:(f={enabled:d,measureOverflow:!0},t[2]=d,t[3]=f);let{scrollRef:p,topSentinelRef:m,bottomSentinelRef:h,belowOverflow:g}=Wt(f),_;t[4]===p?_=t[5]:(_=e=>{p.current=e,u(e)},t[4]=p,t[5]=_);let v=_,y=(0,Z.useRef)(null),b,x;t[6]===p?(b=t[7],x=t[8]):(b=()=>{let e=requestAnimationFrame(()=>ta(p.current)[0]?.focus());return()=>cancelAnimationFrame(e)},x=[p],t[6]=p,t[7]=b,t[8]=x),(0,Z.useEffect)(b,x);let S,C;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>()=>{y.current!==null&&window.clearTimeout(y.current)},C=[],t[9]=S,t[10]=C):(S=t[9],C=t[10]),(0,Z.useEffect)(S,C);let w;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>{o(!0),y.current!==null&&window.clearTimeout(y.current),y.current=window.setTimeout(()=>{y.current=null,o(!1)},Yi)},t[11]=w):w=t[11];let T=w,E;t[12]===i?E=t[13]:(E=()=>{i([])},t[12]=i,t[13]=E);let D=E,O;t[14]!==i||t[15]!==r?(O=e=>{let t=new Set(r);t.has(e)?t.delete(e):t.add(e),i([...t])},t[14]=i,t[15]=r,t[16]=O):O=t[16];let k=O,A=a?`true`:void 0,j;t[17]===m?j=t[18]:(j=(0,Q.jsx)(`div`,{ref:m,"aria-hidden":!0,className:`h-px w-full`}),t[17]=m,t[18]=j);let M;t[19]!==l||t[20]!==n||t[21]!==c||t[22]!==k?(M=n.length===0?(0,Q.jsx)(`p`,{className:`px-2 py-6 text-center text-xs text-muted-foreground`,role:`status`,children:`No categories are available.`}):n.map(e=>(0,Q.jsxs)(`button`,{type:`button`,role:`option`,"aria-label":`${e.label}, ${e.count.toLocaleString()} ${e.count===1?`plugin`:`plugins`}`,"aria-selected":c.has(e.id),onClick:()=>k(e.id),className:`flex w-full items-center gap-2 rounded-sm px-1.5 py-1 text-left text-xs outline-none hover:bg-state-hover focus-visible:bg-state-hover focus-visible:text-foreground md:gap-1.5`,onKeyDown:e=>ea(e,l),children:[(0,Q.jsx)(`span`,{className:`flex w-8 shrink-0 justify-center`,children:(0,Q.jsx)(`span`,{"data-category-option-count":!0,className:`rounded-full bg-surface-recessed p-1.5 text-center text-2xs font-medium leading-none tabular-nums text-subtle-foreground`,children:e.count.toLocaleString()})}),(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-medium text-foreground`,children:e.label}),(0,Q.jsx)(Xi,{enabled:c.has(e.id)})]},e.id)),t[19]=l,t[20]=n,t[21]=c,t[22]=k,t[23]=M):M=t[23];let N;t[24]===h?N=t[25]:(N=(0,Q.jsx)(`div`,{ref:h,"aria-hidden":!0,className:`h-px w-full`}),t[24]=h,t[25]=N);let P;t[26]!==v||t[27]!==A||t[28]!==j||t[29]!==M||t[30]!==N?(P=(0,Q.jsxs)(`div`,{ref:v,"data-scrollbar-scrolling":A,role:`listbox`,"aria-label":`Plugin categories`,"aria-multiselectable":!0,className:`transient-scrollbar max-h-64 overflow-y-auto`,onScroll:T,children:[j,M,N]}),t[26]=v,t[27]=A,t[28]=j,t[29]=M,t[30]=N,t[31]=P):P=t[31];let F;t[32]===g?F=t[33]:(F=g?(0,Q.jsx)(`div`,{"aria-hidden":!0,"data-category-list-fade":`below`,className:`pointer-events-none absolute inset-x-0 bottom-0 z-10 h-8 bg-gradient-to-t from-popover/90 via-popover/60 to-transparent`}):null,t[32]=g,t[33]=F);let I;t[34]!==P||t[35]!==F?(I=(0,Q.jsxs)(`div`,{className:`relative isolate`,children:[P,F]}),t[34]=P,t[35]=F,t[36]=I):I=t[36];let L=r.length===0,R;t[37]!==D||t[38]!==L?(R=(0,Q.jsx)(`div`,{className:`mt-0.5 border-t border-border-seam pt-0.5`,children:(0,Q.jsx)(`button`,{type:`button`,disabled:L,onClick:D,className:`flex w-full items-center rounded-sm px-2 py-1 text-left text-xs text-muted-foreground outline-none hover:bg-state-hover hover:text-foreground focus-visible:bg-state-hover focus-visible:text-foreground disabled:pointer-events-none disabled:opacity-50`,children:`Clear filter`})}),t[37]=D,t[38]=L,t[39]=R):R=t[39];let z;return t[40]!==I||t[41]!==R?(z=(0,Q.jsxs)(Q.Fragment,{children:[I,R]}),t[40]=I,t[41]=R,t[42]=z):z=t[42],z}function ea(e,t){let n=ta(t),r=n.indexOf(e.currentTarget);if(r<0)return;let i=null;e.key===`ArrowDown`?i=Math.min(r+1,n.length-1):e.key===`ArrowUp`?i=Math.max(r-1,0):e.key===`Home`?i=0:e.key===`End`&&(i=n.length-1),i!==null&&(e.preventDefault(),e.stopPropagation(),n[i]?.focus())}function ta(e){return e===null?[]:[...e.querySelectorAll(`[role="option"]`)]}var na=6;function ra(e){let n=(0,$.c)(103),{onInstall:r,onUninstall:i,onOpenPlugin:a,onInstallFromSource:o}=e,s=ve(),{searchParams:c,query:l,requestedSort:u,sortDirection:d,selectedCategories:f,changeSearchParams:p}=kr(),m,h;n[0]===c?(m=n[1],h=n[2]):(m=c.get(`shelf`),h=m?.startsWith(`category:`)??!1,n[0]=c,n[1]=m,n[2]=h);let g=h,_;n[3]===c?_=n[4]:(_=c.get(`view`),n[3]=c,n[4]=_);let v=_===`create`,y;n[5]===v?y=n[6]:(y=()=>v?{nonce:Pr()}:null,n[5]=v,n[6]=y);let[b,x]=(0,Z.useState)(y),[S,C]=(0,Z.useState)(v),[w,T]=(0,Z.useState)(!1),D;n[7]===l?D=n[8]:(D=l.trim(),n[7]=l,n[8]=D);let O=D,k;n[9]===Symbol.for(`react.memo_cache_sentinel`)?(k={enabled:!0},n[9]=k):k=n[9];let A=Pe(O,k),j;n[10]===Symbol.for(`react.memo_cache_sentinel`)?(j={enabled:!0},n[10]=j):j=n[10];let M=Pe(``,j),N=m===null?A:M,P;n[11]===N.data?P=n[12]:(P=N.data??{entries:[],collections:[],categories:[]},n[11]=N.data,n[12]=P);let F=P,I;n[13]===F.entries?I=n[14]:(I=F.entries.filter(ca),n[13]=F.entries,n[14]=I);let R=I,z=R.length>0&&(N.isRefetchError||A.isRefetchError),B=(0,Z.useRef)(!1),ee,te;n[15]===z?(ee=n[16],te=n[17]):(te=()=>{z&&!B.current&&Se.warning(`Couldn’t refresh plugins.`),B.current=z},ee=[z],n[15]=z,n[16]=ee,n[17]=te),(0,Z.useEffect)(te,ee);let V;n[18]!==F.categories||n[19]!==F.collections||n[20]!==R||n[21]!==m?(V=m===null?void 0:E({entries:R,collections:F.collections,categories:F.categories}).find(e=>e.key===m),n[18]=F.categories,n[19]=F.collections,n[20]=R,n[21]=m,n[22]=V):V=n[22];let H=V,U;n[23]!==R||n[24]!==H?.entries||n[25]!==m?(U=m===null?R:H?.entries??[],n[23]=R,n[24]=H?.entries,n[25]=m,n[26]=U):U=n[26];let W=U,G;n[27]===W?G=n[28]:(G=W.some(sa),n[27]=W,n[28]=G);let ne=G,K=u===`most-installed`&&!ne?null:u,re;n[29]!==F.categories||n[30]!==f||n[31]!==W?(re=L(W,f,F.categories),n[29]=F.categories,n[30]=f,n[31]=W,n[32]=re):re=n[32];let J=re,Y;n[33]!==A.data?.entries||n[34]!==f||n[35]!==W||n[36]!==m||n[37]!==O?(Y=()=>{let e=new Set(f),t=m!==null&&O!==``?new Set(A.data?.entries.map(oa)):null;return W.filter(n=>(e.size===0||e.has(me(n)))&&(t===null||t.has(`${n.marketplace}/${n.entryId}`)))},n[33]=A.data?.entries,n[34]=f,n[35]=W,n[36]=m,n[37]=O,n[38]=Y):Y=n[38],A.data?.entries;let ae;n[39]===Y?ae=n[40]:(ae=Y(),n[39]=Y,n[40]=ae);let oe=ae,se=K===null&&m===null&&f.length===0,ce;n[41]!==M.data?.categories||n[42]!==M.data?.collections||n[43]!==M.data?.entries||n[44]!==se?(ce=se?E({entries:(M.data?.entries??[]).filter(aa),collections:M.data?.collections??[],categories:M.data?.categories??[]}):[],n[41]=M.data?.categories,n[42]=M.data?.collections,n[43]=M.data?.entries,n[44]=se,n[45]=ce):ce=n[45];let le=ce,ue;n[46]!==oe||n[47]!==K||n[48]!==d?(ue=K===null?oe:pe(oe,K,d),n[46]=oe,n[47]=K,n[48]=d,n[49]=ue):ue=n[49];let de=ue,fe;if(n[50]!==c){let e=new URLSearchParams(c);e.delete(`shelf`),fe=e.toString(),n[50]=c,n[51]=fe}else fe=n[51];let he=fe,ge;n[52]===Symbol.for(`react.memo_cache_sentinel`)?(ge=e=>x({nonce:Pr(),...e===void 0?{}:{seed:e}}),n[52]=ge):ge=n[52];let _e=ge,ye;n[53]!==p||n[54]!==v?(ye=e=>{e===void 0?v||p(ia,!1):_e(e)},n[53]=p,n[54]=v,n[55]=ye):ye=n[55];let be;n[56]!==o||n[57]!==ye?(be=(0,Q.jsx)(zr,{onCreate:ye,onInstallFromSource:o}),n[56]=o,n[57]=ye,n[58]=be):be=n[58];let xe=be;S!==v&&(C(v),x({nonce:Pr(),...v?{}:{close:!0}}));let we,Te;n[59]===b?(we=n[60],Te=n[61]):(we=()=>{b!==null&&document.getElementById(`plugins-browse-results`)?.scrollTo?.({top:0,behavior:window.matchMedia(`(prefers-reduced-motion: reduce)`).matches?`auto`:`smooth`})},Te=[b],n[59]=b,n[60]=we,n[61]=Te),(0,Z.useEffect)(we,Te);let Ee=m??`browse`,De;n[62]===Symbol.for(`react.memo_cache_sentinel`)?(De=X(`space-y-7 pb-8`,ie),n[62]=De):De=n[62];let Oe;n[63]!==he||n[64]!==w||n[65]!==xe||n[66]!==b||n[67]!==s||n[68]!==H||n[69]!==m?(Oe=m===null?(0,Q.jsxs)(Q.Fragment,{children:[s?(0,Q.jsx)(fn,{children:ai}):(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,Q.jsx)(Xr,{}),xe]}),(0,Q.jsx)(`div`,{className:X(!w&&s&&`hidden`),children:(0,Q.jsx)(Di,{openRequest:b,onComposingChange:T})})]}):(0,Q.jsxs)(`div`,{className:`w-full space-y-2`,children:[(0,Q.jsxs)(t,{to:{pathname:Ce(),search:he},className:`-ml-1 inline-flex items-center gap-1 rounded-sm px-1 text-xs text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:[(0,Q.jsx)(q,{name:`ChevronLeft`,className:`size-3`,"aria-hidden":!0}),`Browse plugins`]}),H===void 0?null:(0,Q.jsxs)(`h1`,{className:`flex flex-wrap items-center gap-2 text-xl font-semibold text-foreground`,children:[(0,Q.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-2`,children:[H.key.startsWith(`category:`)?(0,Q.jsx)(er,{categoryId:H.categoryId,className:`size-5`}):null,H.label]}),` `,(0,Q.jsxs)(`span`,{className:`rounded-md bg-muted px-2 py-1 text-2xs font-medium tabular-nums text-subtle-foreground`,children:[H.entries.length.toLocaleString(),` `,H.entries.length===1?`plugin`:`plugins`]})]})]}),n[63]=he,n[64]=w,n[65]=xe,n[66]=b,n[67]=s,n[68]=H,n[69]=m,n[70]=Oe):Oe=n[70];let ke;n[71]!==N||n[72]!==J||n[73]!==p||n[74]!==w||n[75]!==xe||n[76]!==R.length||n[77]!==oe||n[78]!==de||n[79]!==ne||n[80]!==g||n[81]!==s||n[82]!==r||n[83]!==a||n[84]!==i||n[85]!==l||n[86]!==c||n[87]!==A||n[88]!==f||n[89]!==H||n[90]!==m||n[91]!==le||n[92]!==se||n[93]!==K||n[94]!==d||n[95]!==O?(ke=w&&m===null?(0,Q.jsx)(ii,{onCreate:_e}):(0,Q.jsxs)(`section`,{className:`space-y-6 [--resource-source-shelf-header-inset:calc(var(--spacing)*3)] [--resource-source-shelf-inset:0px]`,children:[(0,Q.jsx)(Bi,{query:l,selectedCategories:f,categoryOptions:J,showCategoryFilter:!g,sort:K,sortDirection:d,installsKnown:ne,changeSearchParams:p,action:s&&m===null?xe:void 0}),N.isPending||m!==null&&O!==``&&A.isPending?(0,Q.jsx)(En,{state:`loading`,message:`Loading plugins`}):N.isError&&R.length===0?(0,Q.jsx)(En,{state:`error`,message:`The plugin catalog is not available.`,onRetry:()=>void N.refetch()}):m!==null&&H===void 0?(0,Q.jsx)(En,{state:`empty`,message:`Shelf not found.`}):R.length===0?(0,Q.jsx)(En,{state:`empty`,message:`No plugins match this search.`}):A.isError&&A.data===void 0?(0,Q.jsx)(En,{state:`error`,message:`The plugin search is not available.`,onRetry:()=>void A.refetch()}):oe.length===0?(0,Q.jsx)(En,{state:`empty`,message:`No plugins match these category filters.`}):se&&O===``?null:(0,Q.jsx)(Mi,{resetKey:c.toString(),entries:de,onInstall:r,onUninstall:i,onOpenPlugin:a}),le.length>0?(0,Q.jsx)(`div`,{className:`space-y-8`,"data-testid":`plugin-browse-shelves`,hidden:O!==``,children:le.map(e=>(0,Q.jsx)(la,{shelf:e,onInstall:r,onUninstall:i,onOpenPlugin:a},e.key))}):null]}),n[71]=N,n[72]=J,n[73]=p,n[74]=w,n[75]=xe,n[76]=R.length,n[77]=oe,n[78]=de,n[79]=ne,n[80]=g,n[81]=s,n[82]=r,n[83]=a,n[84]=i,n[85]=l,n[86]=c,n[87]=A,n[88]=f,n[89]=H,n[90]=m,n[91]=le,n[92]=se,n[93]=K,n[94]=d,n[95]=O,n[96]=ke):ke=n[96];let Ae;n[97]!==Oe||n[98]!==ke?(Ae=(0,Q.jsxs)(`div`,{className:De,children:[Oe,ke]}),n[97]=Oe,n[98]=ke,n[99]=Ae):Ae=n[99];let je;return n[100]!==Ee||n[101]!==Ae?(je=(0,Q.jsx)(dn,{scrollId:`plugins-browse-results`,contentClassName:`[&>div]:block!`,children:Ae},Ee),n[100]=Ee,n[101]=Ae,n[102]=je):je=n[102],je}function ia(e){return e.set(`view`,`create`)}function aa(e){return e.compatible}function oa(e){return`${e.marketplace}/${e.entryId}`}function sa(e){return e.installs!==null}function ca(e){return e.compatible}function la(e){let n=(0,$.c)(41),{shelf:i,onInstall:a,onUninstall:o,onOpenPlugin:s}=e,[c]=r(),l,u,d,f,p,m,h,g,_,v;if(n[0]!==a||n[1]!==s||n[2]!==o||n[3]!==c||n[4]!==i.categoryId||n[5]!==i.description||n[6]!==i.entries||n[7]!==i.key||n[8]!==i.label){let e=new URLSearchParams(c);e.set(`shelf`,i.key);let r=i.entries.slice(0,na);l=_n,m=i.label,h=i.description,g=!0,n[19]!==i.categoryId||n[20]!==i.key?(_=i.key===`collection:bb-official`?(0,Q.jsx)(`span`,{className:`size-4 shrink-0 bg-current text-foreground`,style:{mask:`url(${qn}) center / contain no-repeat`},"aria-hidden":!0}):i.key===`collection:new-and-notable`?(0,Q.jsx)(q,{name:`News01`,className:`size-4 text-foreground`,"aria-hidden":!0}):(0,Q.jsx)(er,{categoryId:i.categoryId,className:`size-4`}),n[19]=i.categoryId,n[20]=i.key,n[21]=_):_=n[21],v=i.entries.length>2?(0,Q.jsx)(rn,{asChild:!0,className:X(`underline underline-offset-4`,i.entries.length<=na&&`@min-[40rem]/resource-shelf:hidden`),children:(0,Q.jsx)(t,{to:{pathname:Ce(),search:e.toString()},"aria-label":`View all ${i.label}`,children:`View all`})}):void 0,p=!0,u=!0,d=`grid gap-2 @max-[40rem]/resource-shelf:[&>*:nth-child(n+3)]:hidden`;let y;n[22]!==a||n[23]!==s||n[24]!==o?(y=e=>(0,Q.jsx)(Pi,{entry:e,onInstall:a,onUninstall:o,onOpenPlugin:s},`${e.marketplace}/${e.entryId}`),n[22]=a,n[23]=s,n[24]=o,n[25]=y):y=n[25],f=r.map(y),n[0]=a,n[1]=s,n[2]=o,n[3]=c,n[4]=i.categoryId,n[5]=i.description,n[6]=i.entries,n[7]=i.key,n[8]=i.label,n[9]=l,n[10]=u,n[11]=d,n[12]=f,n[13]=p,n[14]=m,n[15]=h,n[16]=g,n[17]=_,n[18]=v}else l=n[9],u=n[10],d=n[11],f=n[12],p=n[13],m=n[14],h=n[15],g=n[16],_=n[17],v=n[18];let y;n[26]!==u||n[27]!==d||n[28]!==f?(y=(0,Q.jsx)(`div`,{"data-plugin-shelf-grid":u,className:d,children:f}),n[26]=u,n[27]=d,n[28]=f,n[29]=y):y=n[29];let b;n[30]!==y||n[31]!==p?(b=(0,Q.jsx)(`div`,{"data-plugin-shelf":p,children:y}),n[30]=y,n[31]=p,n[32]=b):b=n[32];let x;return n[33]!==l||n[34]!==b||n[35]!==m||n[36]!==h||n[37]!==g||n[38]!==_||n[39]!==v?(x=(0,Q.jsx)(l,{label:m,description:h,hideDescriptionWhenNarrow:g,leading:_,browseAction:v,children:b}),n[33]=l,n[34]=b,n[35]=m,n[36]=h,n[37]=g,n[38]=_,n[39]=v,n[40]=x):x=n[40],x}function ua(e){let t=(0,$.c)(7),{title:n,children:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(q,{name:`AlertTriangle`,className:`mt-0.5 size-4 shrink-0`,"aria-hidden":!0}),t[0]=i):i=t[0];let a;t[1]===n?a=t[2]:(a=(0,Q.jsxs)(`h2`,{className:`flex items-start gap-2 font-medium text-warning-text`,children:[i,n]}),t[1]=n,t[2]=a);let o;return t[3]!==r||t[4]!==a||t[5]!==n?(o=(0,Q.jsxs)(`section`,{"aria-label":n,className:`min-w-0 space-y-2 rounded-lg border border-warning-text/30 bg-warning-text/5 p-3 text-sm [overflow-wrap:anywhere]`,children:[a,r]}),t[3]=r,t[4]=a,t[5]=n,t[6]=o):o=t[6],o}var da={starting:{icon:`Clock`,label:`Starting`,tone:`muted`},running:null,error:{icon:`CircleX`,label:`Failed`,tone:`error`},incompatible:{icon:`AlertCircle`,label:`Incompatible`,tone:`error`},missing:{icon:`FileQuestion`,label:`Missing`,tone:`error`},disabled:null,"needs-configuration":{icon:`Settings`,label:`Needs configuration`,tone:`warning`},degraded:{icon:`AlertTriangle`,label:`Degraded`,tone:`warning`}};function fa(e){return/\bconfigured\b.*\b(directory|folder|path)\b/iu.test(e.statusDetail??``)}function pa(e){switch(e.status){case`error`:return fa(e)?`Check the path, then reload.`:e.source.startsWith(`path:`)?`Fix the plugin, then reload.`:`Try reloading it.`;case`incompatible`:return e.provenance===`builtin`?`Update bb.`:`Install a compatible version.`;case`missing`:return e.source.startsWith(`path:`)?`Restore the folder, then reload.`:e.provenance===`builtin`?`Update or reinstall bb.`:`Reinstall from its source.`;case`needs-configuration`:return e.hasSettings?``:`Then reload.`;case`degraded`:return`Wait, then reload.`;default:return``}}function ma(e){switch(e.status){case`starting`:return`The plugin is starting.`;case`error`:return fa(e)?`Configured folder unavailable.`:`The plugin couldn't start.`;case`incompatible`:return`This version is incompatible with bb.`;case`missing`:return`Plugin files are missing.`;case`needs-configuration`:{let t=e.statusDetail?.trim();return t&&t.length<=60?t:`Complete the required settings.`}case`degraded`:return`A service is still stopping.`;default:return``}}function ha(e){let t=da[e.status];return t===null?null:{...t,condition:ma(e),recovery:pa(e)}}function ga(e){let t=e.updateState;if(t.lastFailure!==null)return{kind:`status`,icon:`RotateCcw`,label:`Update failed`,tone:`error`,detail:t.lastFailure.detail.length>0?t.lastFailure.detail:`Update to ${t.lastFailure.version} failed and was rolled back.`};let n=ha(e);return n===null?t.outcome===`unavailable`?{kind:`status`,icon:`AlertTriangle`,label:`Needs attention`,tone:`warning`,detail:t.detail}:t.availableVersion===null?null:{kind:`update`,version:t.availableVersion}:{kind:`status`,icon:n.icon,label:n.label,tone:n.tone,detail:e.statusDetail}}function _a(e){let t=(0,$.c)(16),{plugins:n,onOpenPlugin:r}=e,i,a,o,s,c;if(t[0]!==r||t[1]!==n){c=Symbol.for(`react.early_return_sentinel`);bb0:{let e=J(n);if(e.length===0){c=null;break bb0}i=ua,s=e.length===1?`1 plugin isn’t running`:`${e.length} plugins aren’t running`,a=`space-y-2`;let l;t[7]===r?l=t[8]:(l=e=>{let t=ha(e);return(0,Q.jsxs)(`li`,{className:`flex items-center gap-3`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`p`,{className:`font-medium`,children:e.name??e.id}),(0,Q.jsx)(`p`,{className:`line-clamp-2 text-xs text-muted-foreground`,children:t?.condition})]}),(0,Q.jsx)(ft,{variant:`ghost`,size:`sm`,className:`shrink-0`,onClick:t=>r(e.id,t.currentTarget),"aria-label":`View details for ${e.name??e.id}`,children:`View details`})]},e.id)},t[7]=r,t[8]=l),o=e.map(l)}t[0]=r,t[1]=n,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c}else i=t[2],a=t[3],o=t[4],s=t[5],c=t[6];if(c!==Symbol.for(`react.early_return_sentinel`))return c;let l;t[9]!==a||t[10]!==o?(l=(0,Q.jsx)(`ul`,{className:a,children:o}),t[9]=a,t[10]=o,t[11]=l):l=t[11];let u;return t[12]!==i||t[13]!==s||t[14]!==l?(u=(0,Q.jsx)(i,{title:s,children:l}),t[12]=i,t[13]=s,t[14]=l,t[15]=u):u=t[15],u}function va(e){let t=(0,$.c)(6),{children:n,signal:r,onStatusClick:i}=e,a;t[0]!==i||t[1]!==r?(a=r?(0,Q.jsx)(`span`,{className:`absolute -bottom-1 -right-1`,children:(0,Q.jsx)(ba,{signal:r,statusPresentation:`badge`,onUpdateClick:ya,onStatusClick:i})}):null,t[0]=i,t[1]=r,t[2]=a):a=t[2];let o;return t[3]!==n||t[4]!==a?(o=(0,Q.jsxs)(`span`,{className:`relative flex size-6 items-center justify-center`,children:[n,a]}),t[3]=n,t[4]=a,t[5]=o):o=t[5],o}function ya(){}function ba(e){let t=(0,$.c)(27),{signal:n,onUpdateClick:r,onStatusClick:i,statusPresentation:a}=e,o=a===void 0?`standalone`:a;if(n.kind===`update`){let e=Wn(n.version)?n.version:null,i=e===null?`Update available`:`Update to ${e}`,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Q.jsx)(q,{name:yr,className:`size-4`,"aria-hidden":!0}),t[0]=a):a=t[0];let o;t[1]!==r||t[2]!==i?(o=(0,Q.jsx)(de,{asChild:!0,children:(0,Q.jsx)(ft,{type:`button`,variant:`ghost`,size:`icon`,className:`size-7 shrink-0 rounded-full`,style:Vn,"aria-label":i,onClick:r,children:a})}),t[1]=r,t[2]=i,t[3]=o):o=t[3];let s;t[4]===i?s=t[5]:(s=(0,Q.jsx)(O,{children:i}),t[4]=i,t[5]=s);let c;return t[6]!==o||t[7]!==s?(c=(0,Q.jsx)(Pt,{delayDuration:250,children:(0,Q.jsxs)(se,{children:[o,s]})}),t[6]=o,t[7]=s,t[8]=c):c=t[8],c}let s=n.detail===null?n.label:`${n.label}: ${n.detail}`,c=o===`badge`?`size-4 bg-card ring-2 ring-card hover:bg-card`:`size-7`,l=n.tone===`error`?`text-destructive hover:text-destructive`:n.tone===`warning`?`text-warning-text hover:text-warning-text`:`text-muted-foreground hover:text-muted-foreground`,u;t[9]!==c||t[10]!==l?(u=X(`shrink-0 rounded-full`,c,l),t[9]=c,t[10]=l,t[11]=u):u=t[11];let d;t[12]===i?d=t[13]:(d=e=>i(e.currentTarget),t[12]=i,t[13]=d);let f=o===`badge`?`size-3.5`:`size-4`,p;t[14]!==n.icon||t[15]!==f?(p=(0,Q.jsx)(q,{name:n.icon,className:f,"aria-hidden":!0}),t[14]=n.icon,t[15]=f,t[16]=p):p=t[16];let m;t[17]!==s||t[18]!==u||t[19]!==d||t[20]!==p?(m=(0,Q.jsx)(de,{asChild:!0,children:(0,Q.jsx)(ft,{type:`button`,variant:`ghost`,size:`icon`,className:u,"aria-label":s,onClick:d,children:p})}),t[17]=s,t[18]=u,t[19]=d,t[20]=p,t[21]=m):m=t[21];let h;t[22]===s?h=t[23]:(h=(0,Q.jsx)(O,{children:s}),t[22]=s,t[23]=h);let g;return t[24]!==m||t[25]!==h?(g=(0,Q.jsx)(Pt,{delayDuration:250,children:(0,Q.jsxs)(se,{children:[m,h]})}),t[24]=m,t[25]=h,t[26]=g):g=t[26],g}function xa(e){let t=(0,$.c)(10),{plugin:n,open:r,onOpenChange:i}=e,a;t[0]!==i||t[1]!==r||t[2]!==n?(a=r?(0,Q.jsx)(Sa,{plugin:n,onOpenChange:i}):null,t[0]=i,t[1]=r,t[2]=n,t[3]=a):a=t[3];let o;t[4]===a?o=t[5]:(o=(0,Q.jsx)(qe,{className:`sm:max-w-md`,children:a}),t[4]=a,t[5]=o);let s;return t[6]!==i||t[7]!==r||t[8]!==o?(s=(0,Q.jsx)(Be,{open:r,onOpenChange:i,children:o}),t[6]=i,t[7]=r,t[8]=o,t[9]=s):s=t[9],s}function Sa(e){let t=(0,$.c)(151),{plugin:n,onOpenChange:r}=e,i=_(),o=Je(),s=n.name??n.id,c=n.updateState,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l={showErrorToast:!1},t[0]=l):l=t[0];let u;t[1]===n.id?u=t[2]:(u=()=>k(n.id),t[1]=n.id,t[2]=u);let d;t[3]!==r||t[4]!==i?(d=e=>{At({queryClient:i,job:e}),r(!1)},t[3]=r,t[4]=i,t[5]=d):d=t[5];let f;t[6]!==o||t[7]!==n.id||t[8]!==n.name?(f=e=>{Se.error(`Plugin update failed`,{description:`${n.name??n.id} — ${Br(e)}`,action:o(n.id,`installed`)})},t[6]=o,t[7]=n.id,t[8]=n.name,t[9]=f):f=t[9];let p;t[10]!==u||t[11]!==d||t[12]!==f?(p={meta:l,mutationFn:u,onSuccess:d,onError:f},t[10]=u,t[11]=d,t[12]=f,t[13]=p):p=t[13];let m=a(p),h;t[14]===n.version?h=t[15]:(h=Hn(n.version),t[14]=n.version,t[15]=h);let g=`Currently ${h}`,v=c.lastFailure;if(v!==null){let e=c.availableVersion,i;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(Ye,{children:`Update failed`}),t[16]=i):i=t[16];let a;t[17]===v.at?a=t[18]:(a=v.at===null?`The update couldn’t be completed.`:`Failed on ${Qn(v.at)}.`,t[17]=v.at,t[18]=a);let o;t[19]===a?o=t[20]:(o=(0,Q.jsxs)(Ze,{children:[i,(0,Q.jsx)(_t,{children:a})]}),t[19]=a,t[20]=o);let s;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Q.jsx)(q,{name:`CircleX`,className:`mt-0.5 size-4 shrink-0 text-destructive`,"aria-hidden":!0}),t[21]=s):s=t[21];let l;t[22]===v.version?l=t[23]:(l=Hn(v.version),t[22]=v.version,t[23]=l);let u;t[24]===n.version?u=t[25]:(u=Hn(n.version),t[24]=n.version,t[25]=u);let d;t[26]!==l||t[27]!==u?(d=(0,Q.jsxs)(`div`,{className:`flex items-start gap-2 text-sm`,children:[s,(0,Q.jsxs)(`span`,{children:[`bb couldn’t activate `,l,`. It restored `,u,` and its data.`]})]}),t[26]=l,t[27]=u,t[28]=d):d=t[28];let f;t[29]===v.detail?f=t[30]:(f=v.detail.length>0?(0,Q.jsx)($n,{summary:`Technical details`,defaultExpanded:!0,children:(0,Q.jsx)(`p`,{className:`break-words font-mono text-foreground`,children:v.detail})},`failure-details`):null,t[29]=v.detail,t[30]=f);let p;t[31]===e?p=t[32]:(p=e===null?`The restored version can keep running. Try again when a compatible update becomes available.`:`A compatible update to ${Hn(e)} is still available. Retry when you’re ready.`,t[31]=e,t[32]=p);let h;t[33]===p?h=t[34]:(h=(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:p}),t[33]=p,t[34]=h);let g;t[35]!==d||t[36]!==f||t[37]!==h?(g=(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[d,f,h]}),t[35]=d,t[36]=f,t[37]=h,t[38]=g):g=t[38];let _;t[39]===r?_=t[40]:(_=(0,Q.jsx)(ft,{type:`button`,variant:`outline`,onClick:()=>r(!1),children:`Close`}),t[39]=r,t[40]=_);let y;t[41]!==e||t[42]!==m?(y=e===null?null:(0,Q.jsxs)(ft,{type:`button`,disabled:m.isPending,"aria-busy":m.isPending,"aria-label":`Retry update to ${e}`,onClick:()=>m.mutate(),children:[m.isPending?(0,Q.jsx)(q,{name:`Spinner`,className:`animate-spin`}):null,`Retry update`]}),t[41]=e,t[42]=m,t[43]=y):y=t[43];let b;t[44]!==_||t[45]!==y?(b=(0,Q.jsxs)(lt,{children:[_,y]}),t[44]=_,t[45]=y,t[46]=b):b=t[46];let x;return t[47]!==g||t[48]!==b||t[49]!==o?(x=(0,Q.jsxs)(Q.Fragment,{children:[o,g,b]}),t[47]=g,t[48]=b,t[49]=o,t[50]=x):x=t[50],x}if(c.availableVersion!==null){let e=c.availableVersion,i;t[51]===e?i=t[52]:(i=Hn(e),t[51]=e,t[52]=i);let a;t[53]!==s||t[54]!==i?(a=(0,Q.jsxs)(Ye,{children:[`Update `,s,` to `,i,`?`]}),t[53]=s,t[54]=i,t[55]=a):a=t[55];let o;t[56]===g?o=t[57]:(o=(0,Q.jsx)(_t,{children:g}),t[56]=g,t[57]=o);let l;t[58]!==a||t[59]!==o?(l=(0,Q.jsxs)(Ze,{children:[a,o]}),t[58]=a,t[59]=o,t[60]=l):l=t[60];let u;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,Q.jsx)(`span`,{className:`font-medium`,style:nr,children:`✓`}),(0,Q.jsx)(`span`,{children:`Compatible with your bb and plugin SDK`})]}),t[61]=u):u=t[61];let d;t[62]===n.sourceDisplay?d=t[63]:(d={key:`Source`,value:n.sourceDisplay},t[62]=n.sourceDisplay,t[63]=d);let f;t[64]===n.version?f=t[65]:(f={key:`Current`,value:n.version},t[64]=n.version,t[65]=f);let p;t[66]===e?p=t[67]:(p={key:`Candidate`,value:e},t[66]=e,t[67]=p);let h;t[68]!==d||t[69]!==f||t[70]!==p?(h=(0,Q.jsx)($n,{summary:`Details — source, versions`,children:(0,Q.jsx)(Rn,{entries:[d,f,p]})}),t[68]=d,t[69]=f,t[70]=p,t[71]=h):h=t[71];let _;t[72]===n.version?_=t[73]:(_=Hn(n.version),t[72]=n.version,t[73]=_);let v;t[74]===e?v=t[75]:(v=Hn(e),t[74]=e,t[75]=v);let y;t[76]!==_||t[77]!==v?(y=(0,Q.jsx)(Jn,{fromVersion:_,toVersion:v}),t[76]=_,t[77]=v,t[78]=y):y=t[78];let b;t[79]!==h||t[80]!==y?(b=(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[u,h,y]}),t[79]=h,t[80]=y,t[81]=b):b=t[81];let x;t[82]===r?x=t[83]:(x=()=>r(!1),t[82]=r,t[83]=x);let S;t[84]!==x||t[85]!==m.isPending?(S=(0,Q.jsx)(ft,{type:`button`,variant:`outline`,disabled:m.isPending,onClick:x,children:`Not now`}),t[84]=x,t[85]=m.isPending,t[86]=S):S=t[86];let C;t[87]===m?C=t[88]:(C=()=>m.mutate(),t[87]=m,t[88]=C);let w;t[89]===m.isPending?w=t[90]:(w=m.isPending?(0,Q.jsx)(q,{name:`Spinner`,className:`animate-spin`}):(0,Q.jsx)(q,{name:yr,"aria-hidden":!0}),t[89]=m.isPending,t[90]=w);let T;t[91]!==C||t[92]!==w||t[93]!==m.isPending?(T=(0,Q.jsxs)(ft,{type:`button`,disabled:m.isPending,"aria-busy":m.isPending,onClick:C,children:[w,`Update`]}),t[91]=C,t[92]=w,t[93]=m.isPending,t[94]=T):T=t[94];let E;t[95]!==S||t[96]!==T?(E=(0,Q.jsxs)(lt,{children:[S,T]}),t[95]=S,t[96]=T,t[97]=E):E=t[97];let D;return t[98]!==l||t[99]!==b||t[100]!==E?(D=(0,Q.jsxs)(Q.Fragment,{children:[l,b,E]}),t[98]=l,t[99]=b,t[100]=E,t[101]=D):D=t[101],D}if(c.blockedVersion!==null){let e=c.blockedVersion,i;t[102]===e?i=t[103]:(i=Hn(e),t[102]=e,t[103]=i);let a;t[104]!==s||t[105]!==i?(a=(0,Q.jsxs)(Ye,{children:[`Update `,s,` to `,i,`?`]}),t[104]=s,t[105]=i,t[106]=a):a=t[106];let o;t[107]===g?o=t[108]:(o=(0,Q.jsx)(_t,{children:g}),t[107]=g,t[108]=o);let l;t[109]!==a||t[110]!==o?(l=(0,Q.jsxs)(Ze,{children:[a,o]}),t[109]=a,t[110]=o,t[111]=l):l=t[111];let u;t[112]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Q.jsx)(q,{name:`AlertTriangle`,className:`size-4 shrink-0 text-warning`,"aria-hidden":!0}),t[112]=u):u=t[112];let d;t[113]===e?d=t[114]:(d=Hn(e),t[113]=e,t[114]=d);let f;t[115]===d?f=t[116]:(f=(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[u,(0,Q.jsxs)(`span`,{children:[d,` isn’t compatible with this bb`]})]}),t[115]=d,t[116]=f);let p;t[117]===c.blockedReasons?p=t[118]:(p=c.blockedReasons.length>0?(0,Q.jsx)(`ul`,{className:`space-y-1`,children:c.blockedReasons.map(Ca)}):null,t[117]=c.blockedReasons,t[118]=p);let m=`${n.version} — already installed`,h;t[119]===m?h=t[120]:(h=(0,Q.jsx)(Rn,{entries:[{key:`Newest compatible`,value:m}]}),t[119]=m,t[120]=h);let _;t[121]!==p||t[122]!==h?(_=(0,Q.jsx)($n,{summary:`Details`,defaultExpanded:!0,children:(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[p,h]})}),t[121]=p,t[122]=h,t[123]=_):_=t[123];let v;t[124]===n.version?v=t[125]:(v=(0,Q.jsxs)(`p`,{className:`text-xs text-subtle-foreground`,children:[`Keep using `,n.version,` and check again when a compatible plugin version is available.`]}),t[124]=n.version,t[125]=v);let y;t[126]!==f||t[127]!==_||t[128]!==v?(y=(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[f,_,v]}),t[126]=f,t[127]=_,t[128]=v,t[129]=y):y=t[129];let b;t[130]===r?b=t[131]:(b=(0,Q.jsx)(ft,{type:`button`,variant:`outline`,onClick:()=>r(!1),children:`Close`}),t[130]=r,t[131]=b);let x;t[132]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Q.jsxs)(ft,{type:`button`,disabled:!0,children:[(0,Q.jsx)(q,{name:yr,"aria-hidden":!0}),`Update`]}),t[132]=x):x=t[132];let S;t[133]===b?S=t[134]:(S=(0,Q.jsxs)(lt,{children:[b,x]}),t[133]=b,t[134]=S);let C;return t[135]!==l||t[136]!==y||t[137]!==S?(C=(0,Q.jsxs)(Q.Fragment,{children:[l,y,S]}),t[135]=l,t[136]=y,t[137]=S,t[138]=C):C=t[138],C}let y;t[139]===s?y=t[140]:(y=(0,Q.jsxs)(Ye,{children:[s,` is up to date`]}),t[139]=s,t[140]=y);let b;t[141]===g?b=t[142]:(b=(0,Q.jsx)(_t,{children:g}),t[141]=g,t[142]=b);let x;t[143]!==y||t[144]!==b?(x=(0,Q.jsxs)(Ze,{children:[y,b]}),t[143]=y,t[144]=b,t[145]=x):x=t[145];let S;t[146]===r?S=t[147]:(S=(0,Q.jsx)(lt,{children:(0,Q.jsx)(ft,{type:`button`,variant:`outline`,onClick:()=>r(!1),children:`Close`})}),t[146]=r,t[147]=S);let C;return t[148]!==S||t[149]!==x?(C=(0,Q.jsxs)(Q.Fragment,{children:[x,S]}),t[148]=S,t[149]=x,t[150]=C):C=t[150],C}function Ca(e){return(0,Q.jsx)(`li`,{className:`text-foreground`,children:e},e)}function wa(e){let t=(0,$.c)(19),{plugins:n,onOpenPlugin:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={enabled:!0},t[0]=i):i=t[0];let a=Pe(``,i),[o,s]=(0,Z.useState)(null),c;t[1]!==n||t[2]!==o?(c=o===null?null:n.find(e=>e.id===o)??null,t[1]=n,t[2]=o,t[3]=c):c=t[3];let l=c;if(n.length===0){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(P,{message:`No plugins installed. Browse the catalog, create a plugin, or run bb plugin install <source>.`}),t[4]=e):e=t[4],e}let u;if(t[5]!==a||t[6]!==r||t[7]!==n){let e;t[9]!==a||t[10]!==r?(e=e=>(0,Q.jsx)(Ta,{plugin:e,catalogEntry:V(e,a.data?.entries??[]),onUpdateClick:()=>s(e.id),onOpenPlugin:r},e.id),t[9]=a,t[10]=r,t[11]=e):e=t[11],u=n.map(e),t[5]=a,t[6]=r,t[7]=n,t[8]=u}else u=t[8];let d;t[12]===u?d=t[13]:(d=(0,Q.jsx)(An,{children:u}),t[12]=u,t[13]=d);let f;t[14]===l?f=t[15]:(f=l===null?null:(0,Q.jsx)(xa,{plugin:l,open:!0,onOpenChange:e=>{e||s(null)}}),t[14]=l,t[15]=f);let p;return t[16]!==d||t[17]!==f?(p=(0,Q.jsxs)(Q.Fragment,{children:[d,f]}),t[16]=d,t[17]=f,t[18]=p):p=t[18],p}function Ta(e){let t=(0,$.c)(60),{plugin:n,onUpdateClick:r,catalogEntry:i,onOpenPlugin:a}=e,{toggle:o,enabled:s}=Oi(n),c;t[0]===n.source?c=t[1]:(c=n.source.startsWith(`path:`),t[0]=n.source,t[1]=c);let l=c,u;t[2]===n?u=t[3]:(u=ga(n),t[2]=n,t[3]=u);let d=u,f=d?.kind===`status`?d:null,p=d?.kind===`update`?d:null,m;t[4]===n?m=t[5]:(m=ha(n),t[4]=n,t[5]=m);let h=m,g=s===!0,_;t[6]!==n.status||t[7]!==g?(_=De({enabled:g,status:n.status}),t[6]=n.status,t[7]=g,t[8]=_):_=t[8];let v=_,y=h?.tone===`error`?`text-destructive-text`:h?.tone===`warning`?`text-warning-text`:`text-muted-foreground`,b;t[9]!==a||t[10]!==n.id?(b=e=>a(n.id,e),t[9]=a,t[10]=n.id,t[11]=b):b=t[11];let x=b,S=`plugin-row-${n.id}`,C;t[12]===n?C=t[13]:(C=(0,Q.jsx)(Qt,{className:`size-6 rounded border border-border bg-muted/40 text-muted-foreground`,children:()=>(0,Q.jsx)(Bn,{plugin:n,className:`size-4`})}),t[12]=n,t[13]=C);let w;t[14]!==x||t[15]!==f||t[16]!==C?(w=(0,Q.jsx)(va,{signal:f,onStatusClick:x,children:C}),t[14]=x,t[15]=f,t[16]=C,t[17]=w):w=t[17];let T=n.name??n.id,E;t[18]!==i||t[19]!==l||t[20]!==n.provenance||t[21]!==n.publisherLabel?(E=l?`Local`:i===void 0?n.publisherLabel===null?null:(0,Q.jsx)(rr,{name:n.provenance===`builtin`?`BB Official`:n.publisherLabel,github:null,official:n.provenance===`builtin`,children:n.provenance===`builtin`?`BB Official`:n.publisherLabel}):(0,Q.jsx)(zn,{entry:i}),t[18]=i,t[19]=l,t[20]=n.provenance,t[21]=n.publisherLabel,t[22]=E):E=t[22];let D;t[23]!==n.description||t[24]!==n.id||t[25]!==n.statusDetail||t[26]!==h||t[27]!==y?(D=h===null?n.description:(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(`span`,{"data-testid":`plugin-runtime-status-${n.id}`,className:X(`font-medium`,y),children:h.label}),` · `,(0,Q.jsx)(`span`,{children:n.statusDetail??h.condition})]}),t[23]=n.description,t[24]=n.id,t[25]=n.statusDetail,t[26]=h,t[27]=y,t[28]=D):D=t[28];let O=`${n.name??n.id} plugin details`,k;t[29]!==r||t[30]!==x||t[31]!==n.id||t[32]!==p?(k=p===null?void 0:(0,Q.jsx)(`span`,{"data-testid":`plugin-update-signal-${n.id}`,children:(0,Q.jsx)(ba,{signal:p,onUpdateClick:r,onStatusClick:x})}),t[29]=r,t[30]=x,t[31]=n.id,t[32]=p,t[33]=k):k=t[33];let A;t[34]!==v||t[35]!==n.id||t[36]!==y?(A=v?(0,Q.jsx)(`span`,{"data-testid":`plugin-not-running-${n.id}`,className:X(`sr-only`,y),children:`not running`}):null,t[34]=v,t[35]=n.id,t[36]=y,t[37]=A):A=t[37];let j;t[38]===o?j=t[39]:(j=e=>o.mutate(e),t[38]=o,t[39]=j);let M=`${s?`Disable`:`Enable`} ${n.id}${v?` (${n.status}, not running)`:``}`,N;t[40]!==s||t[41]!==j||t[42]!==M||t[43]!==o.isPending?(N=(0,Q.jsx)(cr,{checked:s,disabled:o.isPending,onCheckedChange:j,"aria-label":M}),t[40]=s,t[41]=j,t[42]=M,t[43]=o.isPending,t[44]=N):N=t[44];let P;t[45]!==k||t[46]!==A||t[47]!==N?(P=(0,Q.jsxs)(`span`,{className:`flex items-center gap-2`,children:[k,A,N]}),t[45]=k,t[46]=A,t[47]=N,t[48]=P):P=t[48];let F;t[49]!==x||t[50]!==T||t[51]!==E||t[52]!==D||t[53]!==O||t[54]!==P||t[55]!==w?(F=(0,Q.jsx)(or,{leading:w,title:T,byline:E,description:D,openLabel:O,onOpen:x,footerAction:P}),t[49]=x,t[50]=T,t[51]=E,t[52]=D,t[53]=O,t[54]=P,t[55]=w,t[56]=F):F=t[56];let I;return t[57]!==F||t[58]!==S?(I=(0,Q.jsx)(`div`,{"data-testid":S,children:F}),t[57]=F,t[58]=S,t[59]=I):I=t[59],I}function Ea(e){let t=new Map;for(let n of e)n.author!==null&&t.set(n.author.name,(t.get(n.author.name)??0)+1);let n=null;for(let r of e){if(r.author===null)continue;let e=t.get(r.author.name)??0,i=n===null?0:t.get(n.name)??0;(n===null||e>i||e===i&&r.author.name.length>n.name.length)&&(n=r.author)}return n}function Da(e){let n=(0,$.c)(65),{authorKey:r,onInstall:i,onUninstall:a,onOpenPlugin:o}=e,{searchParams:s,query:c,requestedSort:l,sortDirection:u,selectedCategories:d,changeSearchParams:f}=kr(),p;n[0]===c?p=n[1]:(p=c.trim(),n[0]=c,n[1]=p);let m=p,h;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(h={enabled:!0},n[2]=h):h=n[2];let g=Pe(``,h),_=m!==``,v;n[3]===_?v=n[4]:(v={enabled:_},n[3]=_,n[4]=v);let y=Pe(m,v);g.data?.entries;let b;n[5]!==r||n[6]!==g.data?.entries?(b=ir((g.data?.entries??[]).filter(ja),r),n[5]=r,n[6]=g.data?.entries,n[7]=b):b=n[7];let x=b,S;n[8]===x?S=n[9]:(S=Ea(x),n[8]=x,n[9]=S);let C=S,w;n[10]===x?w=n[11]:(w=x.length>0&&x.every(Aa),n[10]=x,n[11]=w);let T=w,E=T?`BB Official`:C?.name,D;n[12]===x?D=n[13]:(D=x.some(ka),n[12]=x,n[13]=D);let O=D,k=l===`most-installed`&&!O?null:l,A;n[14]!==x||n[15]!==d?(A=L(x,d),n[14]=x,n[15]=d,n[16]=A):A=n[16];let j=A,M;n[17]!==r||n[18]!==g.data?.entries||n[19]!==y.data?.entries||n[20]!==d||n[21]!==k||n[22]!==u||n[23]!==m?(M=()=>{let e=new Set(d),t=ir((m===``?g.data?.entries??[]:y.data?.entries??[]).filter(Oa),r).filter(t=>e.size===0||e.has(me(t)));return k===null?t:pe(t,k,u)},n[17]=r,n[18]=g.data?.entries,n[19]=y.data?.entries,n[20]=d,n[21]=k,n[22]=u,n[23]=m,n[24]=M):M=n[24],g.data?.entries,y.data?.entries;let N;n[25]===M?N=n[26]:(N=M(),n[25]=M,n[26]=N);let P=N,F=m!==``&&y.isPending,I;if(n[27]!==s){let e=new URLSearchParams(s);e.delete(`author`),I=e.toString(),n[27]=s,n[28]=I}else I=n[28];let R=I,z;n[29]===Symbol.for(`react.memo_cache_sentinel`)?(z=X(`space-y-6 pb-8`,ie),n[29]=z):z=n[29];let B;n[30]===Symbol.for(`react.memo_cache_sentinel`)?(B=Ce(),n[30]=B):B=n[30];let ee=R===``?``:`?${R}`,te;n[31]===ee?te=n[32]:(te={pathname:B,search:ee},n[31]=ee,n[32]=te);let V;n[33]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,Q.jsx)(q,{name:`ChevronLeft`,className:`size-3`,"aria-hidden":!0}),n[33]=V):V=n[33];let H;n[34]===te?H=n[35]:(H=(0,Q.jsxs)(t,{to:te,className:`-ml-1 inline-flex items-center gap-1 rounded-sm px-1 text-xs text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:[V,`Browse plugins`]}),n[34]=te,n[35]=H);let U;n[36]!==C||n[37]!==E||n[38]!==x.length||n[39]!==T?(U=C===null?null:(0,Q.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Q.jsx)(jn,{name:E??C.name,official:T,github:In(C),size:`page`}),(0,Q.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,Q.jsxs)(`h1`,{className:`flex flex-wrap items-center gap-2 text-xl font-semibold text-foreground`,children:[(0,Q.jsx)(`span`,{children:E}),(0,Q.jsxs)(`span`,{className:`rounded-md bg-muted px-2 py-1 text-2xs font-medium tabular-nums text-subtle-foreground`,children:[x.length.toLocaleString(),` `,x.length===1?`plugin`:`plugins`]})]}),C.url===null?null:(0,Q.jsxs)(`a`,{href:C.url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 rounded-sm text-xs text-subtle-foreground underline underline-offset-2 hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:[C.url.startsWith(`https://github.com/`)?(0,Q.jsx)(q,{name:`GithubLogo`,className:`size-4.5 shrink-0 fill-current [&_*]:stroke-0`,"aria-hidden":!0}):null,Yn(C.url),(0,Q.jsx)(q,{name:`ExternalLink`,className:`size-3`,"aria-hidden":!0}),(0,Q.jsx)(`span`,{className:`sr-only`,children:`Opens in a new tab`})]})]})]}),n[36]=C,n[37]=E,n[38]=x.length,n[39]=T,n[40]=U):U=n[40];let W;n[41]!==H||n[42]!==U?(W=(0,Q.jsxs)(`div`,{className:`w-full space-y-2`,children:[H,U]}),n[41]=H,n[42]=U,n[43]=W):W=n[43];let G;n[44]!==C||n[45]!==g||n[46]!==j||n[47]!==f||n[48]!==x.length||n[49]!==O||n[50]!==i||n[51]!==o||n[52]!==a||n[53]!==c||n[54]!==s||n[55]!==F||n[56]!==y.isError||n[57]!==d||n[58]!==k||n[59]!==u||n[60]!==P?(G=g.isPending?(0,Q.jsx)(En,{state:`loading`,message:`Loading author`}):g.isError&&x.length===0?(0,Q.jsx)(En,{state:`error`,message:`The author catalog is not available.`,onRetry:()=>void g.refetch()}):C===null?(0,Q.jsx)(En,{state:`empty`,message:`Author not found.`}):(0,Q.jsxs)(`section`,{className:`space-y-6`,children:[(0,Q.jsx)(Bi,{query:c,selectedCategories:d,categoryOptions:j,sort:k,sortDirection:u,installsKnown:O,changeSearchParams:f}),g.isError||y.isError?(0,Q.jsx)(`p`,{className:`text-xs text-warning-text`,role:`status`,children:`The latest search failed. The page shows saved catalog results.`}):null,F?(0,Q.jsx)(En,{state:`loading`,message:`Loading plugins`}):P.length===0?(0,Q.jsx)(En,{state:`empty`,message:`No plugins match these filters.`}):(0,Q.jsx)(Mi,{resetKey:s.toString(),entries:P,onInstall:i,onUninstall:a,onOpenPlugin:o})]}),n[44]=C,n[45]=g,n[46]=j,n[47]=f,n[48]=x.length,n[49]=O,n[50]=i,n[51]=o,n[52]=a,n[53]=c,n[54]=s,n[55]=F,n[56]=y.isError,n[57]=d,n[58]=k,n[59]=u,n[60]=P,n[61]=G):G=n[61];let ne;return n[62]!==W||n[63]!==G?(ne=(0,Q.jsx)(dn,{scrollId:`plugin-author-results`,contentClassName:`[&>div]:block!`,children:(0,Q.jsxs)(`div`,{className:z,children:[W,G]})}),n[62]=W,n[63]=G,n[64]=ne):ne=n[64],ne}function Oa(e){return e.compatible}function ka(e){return e.installs!==null}function Aa(e){return e.marketplace===`bb-official`}function ja(e){return e.compatible}function Ma(e){return e.source.startsWith(`builtin:`)||e.source.startsWith(`path:`)?!1:e.provenance===`direct`||e.provenance===`catalog`}function Na(e){return Ma(e)&&e.updateState.availableVersion===null?e.updateState.blockedVersion:null}function Pa(e){let t=e.trim(),n=`${t.charAt(0).toUpperCase()}${t.slice(1)}`;return/[.!?]$/u.test(n)?n:`${n}.`}function Fa(e){let t=(0,$.c)(36),{plugin:n}=e,[r,i]=(0,Z.useState)(!1),o=_(),s=Je(),c=n.updateState.availableVersion,l=n.updateState.lastFailure,u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u={showErrorToast:!1},t[0]=u):u=t[0];let d;t[1]===n.id?d=t[2]:(d=()=>k(n.id),t[1]=n.id,t[2]=d);let f;t[3]===o?f=t[4]:(f=e=>{At({queryClient:o,job:e})},t[3]=o,t[4]=f);let p;t[5]!==s||t[6]!==n.id||t[7]!==n.name?(p=e=>{Se.error(`Plugin update failed`,{description:`${n.name??n.id} — ${Br(e)}`,action:s(n.id,`installed`)})},t[5]=s,t[6]=n.id,t[7]=n.name,t[8]=p):p=t[8];let m;t[9]!==d||t[10]!==f||t[11]!==p?(m={meta:u,mutationFn:d,onSuccess:f,onError:p},t[9]=d,t[10]=f,t[11]=p,t[12]=m):m=t[12];let h=a(m);if(!Ma(n)||c===null)return null;if(l!==null){let e=h.isPending,n=h.isPending,r;t[13]===c?r=t[14]:(r=Hn(c),t[13]=c,t[14]=r);let i=`Retry update to ${r}`,a;t[15]===h?a=t[16]:(a=()=>h.mutate(),t[15]=h,t[16]=a);let o;t[17]===h.isPending?o=t[18]:(o=h.isPending?(0,Q.jsx)(q,{name:`Spinner`,className:`size-3.5 animate-spin`,"aria-hidden":!0}):(0,Q.jsx)(q,{name:`RotateCcw`,className:`size-3.5`,"aria-hidden":!0}),t[17]=h.isPending,t[18]=o);let s;return t[19]!==h.isPending||t[20]!==a||t[21]!==o||t[22]!==i?(s=(0,Q.jsxs)(ft,{type:`button`,variant:`outline`,size:`sm`,className:`h-6 px-2 text-xs`,disabled:e,"aria-busy":n,"aria-label":i,onClick:a,children:[o,`Retry`]}),t[19]=h.isPending,t[20]=a,t[21]=o,t[22]=i,t[23]=s):s=t[23],s}let g;t[24]===c?g=t[25]:(g=Hn(c),t[24]=c,t[25]=g);let v=`Update ${n.name??n.id} to ${g}`,y,b;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(y=()=>i(!0),b=(0,Q.jsx)(q,{name:yr,className:`size-3.5`,"aria-hidden":!0}),t[26]=y,t[27]=b):(y=t[26],b=t[27]);let x;t[28]===v?x=t[29]:(x=(0,Q.jsxs)(ft,{type:`button`,variant:`outline`,size:`sm`,className:`h-6 px-2 text-xs`,"aria-label":v,onClick:y,children:[b,`Update`]}),t[28]=v,t[29]=x);let S;t[30]!==r||t[31]!==n?(S=(0,Q.jsx)(xa,{plugin:n,open:r,onOpenChange:i}),t[30]=r,t[31]=n,t[32]=S):S=t[32];let C;return t[33]!==x||t[34]!==S?(C=(0,Q.jsxs)(Q.Fragment,{children:[x,S]}),t[33]=x,t[34]=S,t[35]=C):C=t[35],C}function Ia(e){let t=(0,$.c)(48),{plugin:n}=e,r=n.updateState.lastFailure,i,a,o,s,c,l,u,d,f;if(t[0]!==r||t[1]!==n){f=Symbol.for(`react.early_return_sentinel`);bb0:{let e=Na(n);if(i=n.updateState.blockedReasons,!Ma(n)){f=null;break bb0}if(r!==null){let e;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(q,{name:`CircleX`,className:`mt-0.5 size-4 shrink-0 text-destructive`,"aria-hidden":!0}),t[11]=e):e=t[11];let i;t[12]===r.version?i=t[13]:(i=Hn(r.version),t[12]=r.version,t[13]=i);let a;t[14]===n.version?a=t[15]:(a=Hn(n.version),t[14]=n.version,t[15]=a);let o;t[16]!==i||t[17]!==a?(o=(0,Q.jsxs)(`div`,{role:`status`,"aria-label":`Update failed`,className:`flex min-w-0 items-start gap-2.5`,children:[e,(0,Q.jsxs)(`p`,{className:`min-w-0 text-xs leading-relaxed text-muted-foreground`,children:[`bb couldn’t activate `,i,`. It restored `,a,` and its data.`]})]}),t[16]=i,t[17]=a,t[18]=o):o=t[18],f=o;break bb0}if(n.updateState.outcome===`unavailable`&&n.updateState.detail!==null){let e;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(q,{name:`AlertTriangle`,className:`mt-0.5 size-4 shrink-0 text-warning`,"aria-hidden":!0}),t[19]=e):e=t[19];let r;t[20]===n.updateState.detail?r=t[21]:(r=(0,Q.jsxs)(`div`,{role:`status`,"aria-label":`Update needs attention`,className:`flex min-w-0 items-start gap-2.5`,children:[e,(0,Q.jsx)(`p`,{className:`min-w-0 text-xs leading-relaxed text-muted-foreground`,children:n.updateState.detail})]}),t[20]=n.updateState.detail,t[21]=r),f=r;break bb0}if(n.updateState.availableVersion!==null){let e;t[22]===n.updateState.availableVersion?e=t[23]:(e=Hn(n.updateState.availableVersion),t[22]=n.updateState.availableVersion,t[23]=e);let r;t[24]===e?r=t[25]:(r=(0,Q.jsx)(`span`,{className:`font-mono text-xs text-foreground`,children:e}),t[24]=e,t[25]=r);let i;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Available`}),t[26]=i):i=t[26];let a;t[27]===r?a=t[28]:(a=(0,Q.jsxs)(`div`,{role:`status`,className:`flex min-w-0 items-baseline gap-2`,children:[r,i]}),t[27]=r,t[28]=a),f=a;break bb0}if(e===null){f=null;break bb0}c=`status`,l=`Update blocked`,u=`flex min-w-0 items-start gap-2.5`,t[29]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Q.jsx)(q,{name:`AlertTriangle`,className:`mt-0.5 size-4 shrink-0 text-warning`,"aria-hidden":!0}),t[29]=d):d=t[29],s=`min-w-0`,a=`text-xs leading-relaxed text-muted-foreground`,o=i[0]===void 0?`${Hn(e)} isn’t compatible with this bb.`:Pa(i[0])}t[0]=r,t[1]=n,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=l,t[8]=u,t[9]=d,t[10]=f}else i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],d=t[9],f=t[10];if(f!==Symbol.for(`react.early_return_sentinel`))return f;let p;t[30]===n.version?p=t[31]:(p=Hn(n.version),t[30]=n.version,t[31]=p);let m;t[32]!==a||t[33]!==o||t[34]!==p?(m=(0,Q.jsxs)(`p`,{className:a,children:[o,` `,p,` remains installed. Keep using it and check again when a compatible plugin version is available.`]}),t[32]=a,t[33]=o,t[34]=p,t[35]=m):m=t[35];let h;t[36]===i?h=t[37]:(h=i.length>1?(0,Q.jsx)(`div`,{className:`mt-1.5`,children:(0,Q.jsx)($n,{summary:`Other requirements`,children:(0,Q.jsx)(`ul`,{className:`space-y-1 text-foreground`,children:i.slice(1).map(La)})})}):null,t[36]=i,t[37]=h);let g;t[38]!==m||t[39]!==h||t[40]!==s?(g=(0,Q.jsxs)(`div`,{className:s,children:[m,h]}),t[38]=m,t[39]=h,t[40]=s,t[41]=g):g=t[41];let _;return t[42]!==g||t[43]!==c||t[44]!==l||t[45]!==u||t[46]!==d?(_=(0,Q.jsxs)(`div`,{role:c,"aria-label":l,className:u,children:[d,g]}),t[42]=g,t[43]=c,t[44]=l,t[45]=u,t[46]=d,t[47]=_):_=t[47],_}function La(e){return(0,Q.jsx)(`li`,{children:Pa(e)},e)}function Ra(e){return Object.prototype.toString.call(e)===`[object Object]`}function za(e){return Ra(e)||Array.isArray(e)}function Ba(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}function Va(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||JSON.stringify(Object.keys(e.breakpoints||{}))!==JSON.stringify(Object.keys(t.breakpoints||{}))?!1:n.every(n=>{let r=e[n],i=t[n];return typeof r==`function`?`${r}`==`${i}`:!za(r)||!za(i)?r===i:Va(r,i)})}function Ha(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function Ua(e,t){if(e.length!==t.length)return!1;let n=Ha(e),r=Ha(t);return n.every((e,t)=>{let n=r[t];return Va(e,n)})}function Wa(e){return typeof e==`number`}function Ga(e){return typeof e==`string`}function Ka(e){return typeof e==`boolean`}function qa(e){return Object.prototype.toString.call(e)===`[object Object]`}function Ja(e){return Math.abs(e)}function Ya(e){return Math.sign(e)}function Xa(e,t){return Ja(e-t)}function Za(e,t){return e===0||t===0||Ja(e)<=Ja(t)?0:Ja(Xa(Ja(e),Ja(t))/e)}function Qa(e){return Math.round(e*100)/100}function $a(e){return io(e).map(Number)}function eo(e){return e[to(e)]}function to(e){return Math.max(0,e.length-1)}function no(e,t){return t===to(e)}function ro(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function io(e){return Object.keys(e)}function ao(e,t){return[e,t].reduce((e,t)=>(io(t).forEach(n=>{let r=e[n],i=t[n];e[n]=qa(r)&&qa(i)?ao(r,i):i}),e),{})}function oo(e,t){return t.MouseEvent!==void 0&&e instanceof t.MouseEvent}function so(e,t){let n={start:r,center:i,end:a};function r(){return 0}function i(e){return a(e)/2}function a(e){return t-e}function o(r,i){return Ga(e)?n[e](r):e(t,r,i)}return{measure:o}}function co(){let e=[];function t(t,n,i,a={passive:!0}){let o;if(`addEventListener`in t)t.addEventListener(n,i,a),o=()=>t.removeEventListener(n,i,a);else{let e=t;e.addListener(i),o=()=>e.removeListener(i)}return e.push(o),r}function n(){e=e.filter(e=>e())}let r={add:t,clear:n};return r}function lo(e,t,n,r){let i=co(),a=1e3/60,o=null,s=0,c=0;function l(){i.add(e,`visibilitychange`,()=>{e.hidden&&m()})}function u(){p(),i.clear()}function d(e){if(!c)return;o||(o=e,n(),n());let i=e-o;for(o=e,s+=i;s>=a;)n(),s-=a;r(s/a),c&&=t.requestAnimationFrame(d)}function f(){c||=t.requestAnimationFrame(d)}function p(){t.cancelAnimationFrame(c),o=null,s=0,c=0}function m(){o=null,s=0}return{init:l,destroy:u,start:f,stop:p,update:n,render:r}}function uo(e,t){let n=t===`rtl`,r=e===`y`,i=r?`y`:`x`,a=r?`x`:`y`,o=!r&&n?-1:1,s=u(),c=d();function l(e){let{height:t,width:n}=e;return r?t:n}function u(){return r?`top`:n?`right`:`left`}function d(){return r?`bottom`:n?`left`:`right`}function f(e){return e*o}return{scroll:i,cross:a,startEdge:s,endEdge:c,measureSize:l,direction:f}}function fo(e=0,t=0){let n=Ja(e-t);function r(t){return t<e}function i(e){return e>t}function a(e){return r(e)||i(e)}function o(n){return a(n)?r(n)?e:t:n}function s(e){return n?e-n*Math.ceil((e-t)/n):e}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function po(e,t,n){let{constrain:r}=fo(0,e),i=e+1,a=o(t);function o(e){return n?Ja((i+e)%i):r(e)}function s(){return a}function c(e){return a=o(e),d}function l(e){return u().set(s()+e)}function u(){return po(e,s(),n)}let d={get:s,set:c,add:l,clone:u};return d}function mo(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v){let{cross:y,direction:b}=e,x=[`INPUT`,`SELECT`,`TEXTAREA`],S={passive:!1},C=co(),w=co(),T=fo(50,225).constrain(p.measure(20)),E={mouse:300,touch:400},D={mouse:500,touch:600},O=m?43:25,k=!1,A=0,j=0,M=!1,N=!1,P=!1,F=!1;function I(e){if(!v)return;function n(t){(Ka(v)||v(e,t))&&te(t)}let r=t;C.add(r,`dragstart`,e=>e.preventDefault(),S).add(r,`touchmove`,()=>void 0,S).add(r,`touchend`,()=>void 0).add(r,`touchstart`,n).add(r,`mousedown`,n).add(r,`touchcancel`,H).add(r,`contextmenu`,H).add(r,`click`,U,!0)}function L(){C.clear(),w.clear()}function R(){let e=F?n:t;w.add(e,`touchmove`,V,S).add(e,`touchend`,H).add(e,`mousemove`,V,S).add(e,`mouseup`,H)}function z(e){let t=e.nodeName||``;return x.includes(t)}function B(){return(m?D:E)[F?`mouse`:`touch`]}function ee(e,t){let n=d.add(Ya(e)*-1),r=u.byDistance(e,!m).distance;return m||Ja(e)<T?r:g&&t?r*.5:u.byIndex(n.get(),0).distance}function te(e){let t=oo(e,r);F=t,P=m&&t&&!e.buttons&&k,k=Xa(i.get(),o.get())>=2,!(t&&e.button!==0)&&(z(e.target)||(M=!0,a.pointerDown(e),l.useFriction(0).useDuration(0),i.set(o),R(),A=a.readPoint(e),j=a.readPoint(e,y),f.emit(`pointerDown`)))}function V(e){if(!oo(e,r)&&e.touches.length>=2)return H(e);let t=a.readPoint(e),n=a.readPoint(e,y),o=Xa(t,A),c=Xa(n,j);if(!N&&!F&&(!e.cancelable||(N=o>c,!N)))return H(e);let u=a.pointerMove(e);o>h&&(P=!0),l.useFriction(.3).useDuration(.75),s.start(),i.add(b(u)),e.preventDefault()}function H(e){let t=u.byDistance(0,!1).index!==d.get(),n=a.pointerUp(e)*B(),r=ee(b(n),t),i=Za(n,r),o=O-10*i,s=_+i/50;N=!1,M=!1,w.clear(),l.useDuration(o).useFriction(s),c.distance(r,!m),F=!1,f.emit(`pointerUp`)}function U(e){P&&=(e.stopPropagation(),e.preventDefault(),!1)}function W(){return M}return{init:I,destroy:L,pointerDown:W}}function ho(e,t){let n,r;function i(e){return e.timeStamp}function a(n,r){let i=`client${(r||e.scroll)===`x`?`X`:`Y`}`;return(oo(n,t)?n:n.touches[0])[i]}function o(e){return n=e,r=e,a(e)}function s(e){let t=a(e)-a(r),o=i(e)-i(n)>170;return r=e,o&&(n=e),t}function c(e){if(!n||!r)return 0;let t=a(r)-a(n),o=i(e)-i(n),s=i(e)-i(r)>170,c=t/o;return o&&!s&&Ja(c)>.1?c:0}return{pointerDown:o,pointerMove:s,pointerUp:c,readPoint:a}}function go(){function e(e){let{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:i}=e;return{top:t,right:n+r,bottom:t+i,left:n,width:r,height:i}}return{measure:e}}function _o(e){function t(t){return t/100*e}return{measure:t}}function vo(e,t,n,r,i,a,o){let s=[e].concat(r),c,l,u=[],d=!1;function f(e){return i.measureSize(o.measure(e))}function p(i){if(!a)return;l=f(e),u=r.map(f);function o(n){for(let a of n){if(d)return;let n=a.target===e,o=r.indexOf(a.target),s=n?l:u[o];if(Ja(f(n?e:r[o])-s)>=.5){i.reInit(),t.emit(`resize`);break}}}c=new ResizeObserver(e=>{(Ka(a)||a(i,e))&&o(e)}),n.requestAnimationFrame(()=>{s.forEach(e=>c.observe(e))})}function m(){d=!0,c&&c.disconnect()}return{init:p,destroy:m}}function yo(e,t,n,r,i,a){let o=0,s=0,c=i,l=a,u=e.get(),d=0;function f(){let t=r.get()-e.get(),i=!c,a=0;return i?(o=0,n.set(r),e.set(r),a=t):(n.set(e),o+=t/c,o*=l,u+=o,e.add(o),a=u-d),s=Ya(a),d=u,x}function p(){return Ja(r.get()-t.get())<.001}function m(){return c}function h(){return s}function g(){return o}function _(){return y(i)}function v(){return b(a)}function y(e){return c=e,x}function b(e){return l=e,x}let x={direction:h,duration:m,velocity:g,seek:f,settled:p,useBaseFriction:v,useBaseDuration:_,useFriction:b,useDuration:y};return x}function bo(e,t,n,r,i){let a=i.measure(10),o=i.measure(50),s=fo(.1,.99),c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(i){if(!l())return;let c=Ja(e[e.reachedMin(t.get())?`min`:`max`]-t.get()),u=n.get()-t.get(),d=s.constrain(c/o);n.subtract(u*d),!i&&Ja(u)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function d(e){c=!e}return{shouldConstrain:l,constrain:u,toggleActive:d}}function xo(e,t,n,r,i){let a=fo(-t+e,0),o=d(),s=u(),c=f();function l(e,t){return Xa(e,t)<=1}function u(){let e=o[0],t=eo(o);return fo(o.lastIndexOf(e),o.indexOf(t)+1)}function d(){return n.map((e,t)=>{let{min:r,max:i}=a,o=a.constrain(e),s=!t,c=no(n,t);return s?i:c||l(r,o)?r:l(i,o)?i:o}).map(e=>parseFloat(e.toFixed(3)))}function f(){if(t<=e+i)return[a.max];if(r===`keepSnaps`)return o;let{min:n,max:c}=s;return o.slice(n,c)}return{snapsContained:c,scrollContainLimit:s}}function So(e,t,n){let r=t[0];return{limit:fo(n?r-e:eo(t),r)}}function Co(e,t,n,r){let i=.1,{reachedMin:a,reachedMax:o}=fo(t.min+i,t.max+i);function s(e){return e===1?o(n.get()):e===-1?a(n.get()):!1}function c(t){if(!s(t))return;let n=t*-1*e;r.forEach(e=>e.add(n))}return{loop:c}}function wo(e){let{max:t,length:n}=e;function r(e){let r=e-t;return n?r/-n:0}return{get:r}}function To(e,t,n,r,i){let{startEdge:a,endEdge:o}=e,{groupSlides:s}=i,c=d().map(t.measure),l=f(),u=p();function d(){return s(r).map(e=>eo(e)[o]-e[0][a]).map(Ja)}function f(){return r.map(e=>n[a]-e[a]).map(e=>-Ja(e))}function p(){return s(l).map(e=>e[0]).map((e,t)=>e+c[t])}return{snaps:l,snapsAligned:u}}function Eo(e,t,n,r,i,a){let{groupSlides:o}=i,{min:s,max:c}=r,l=u();function u(){let r=o(a),i=!e||t===`keepSnaps`;return n.length===1?[a]:i?r:r.slice(s,c).map((e,t,n)=>{let r=!t,i=no(n,t);return r?ro(eo(n[0])+1):i?ro(to(a)-eo(n)[0]+1,eo(n)[0]):e})}return{slideRegistry:l}}function Do(e,t,n,r,i){let{reachedAny:a,removeOffset:o,constrain:s}=r;function c(e){return e.concat().sort((e,t)=>Ja(e)-Ja(t))[0]}function l(n){let r=e?o(n):s(n),{index:i}=t.map((e,t)=>({diff:u(e-r,0),index:t})).sort((e,t)=>Ja(e.diff)-Ja(t.diff))[0];return{index:i,distance:r}}function u(t,r){let i=[t,t+n,t-n];if(!e)return t;if(!r)return c(i);let a=i.filter(e=>Ya(e)===r);return a.length?c(a):eo(i)-n}function d(e,n){return{index:e,distance:u(t[e]-i.get(),n)}}function f(n,r){let o=i.get()+n,{index:s,distance:c}=l(o),d=!e&&a(o);return!r||d?{index:s,distance:n}:{index:s,distance:n+u(t[s]-c,0)}}return{byDistance:f,byIndex:d,shortcut:u}}function Oo(e,t,n,r,i,a,o){function s(i){let s=i.distance,c=i.index!==t.get();a.add(s),s&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),c&&(n.set(t.get()),t.set(i.index),o.emit(`select`))}function c(e,t){s(i.byDistance(e,t))}function l(e,n){let r=t.clone().set(e);s(i.byIndex(r.get(),n))}return{distance:c,index:l}}function ko(e,t,n,r,i,a,o,s){let c={passive:!0,capture:!0},l=0;function u(u){if(!s)return;function f(t){if(new Date().getTime()-l>10)return;o.emit(`slideFocusStart`),e.scrollLeft=0;let a=n.findIndex(e=>e.includes(t));Wa(a)&&(i.useDuration(0),r.index(a,0),o.emit(`slideFocus`))}a.add(document,`keydown`,d,!1),t.forEach((e,t)=>{a.add(e,`focus`,e=>{(Ka(s)||s(u,e))&&f(t)},c)})}function d(e){e.code===`Tab`&&(l=new Date().getTime())}return{init:u}}function Ao(e){let t=e;function n(){return t}function r(e){t=o(e)}function i(e){t+=o(e)}function a(e){t-=o(e)}function o(e){return Wa(e)?e:e.get()}return{get:n,set:r,add:i,subtract:a}}function jo(e,t){let n=e.scroll===`x`?o:s,r=t.style,i=null,a=!1;function o(e){return`translate3d(${e}px,0px,0px)`}function s(e){return`translate3d(0px,${e}px,0px)`}function c(t){if(a)return;let o=Qa(e.direction(t));o!==i&&(r.transform=n(o),i=o)}function l(e){a=!e}function u(){a||(r.transform=``,t.getAttribute(`style`)||t.removeAttribute(`style`))}return{clear:u,to:c,toggleActive:l}}function Mo(e,t,n,r,i,a,o,s,c){let l=.5,u=$a(i),d=$a(i).reverse(),f=_().concat(v());function p(e,t){return e.reduce((e,t)=>e-i[t],t)}function m(e,t){return e.reduce((e,n)=>p(e,t)>0?e.concat([n]):e,[])}function h(e){return a.map((n,i)=>({start:n-r[i]+l+e,end:n+t-l+e}))}function g(t,r,i){let a=h(r);return t.map(t=>{let r=i?0:-n,o=i?n:0,l=i?`end`:`start`,u=a[t][l];return{index:t,loopPoint:u,slideLocation:Ao(-1),translate:jo(e,c[t]),target:()=>s.get()>u?r:o}})}function _(){let e=o[0];return g(m(d,e),n,!1)}function v(){return g(m(u,t-o[0]-1),-n,!0)}function y(){return f.every(({index:e})=>p(u.filter(t=>t!==e),t)<=.1)}function b(){f.forEach(e=>{let{target:t,translate:n,slideLocation:r}=e,i=t();i!==r.get()&&(n.to(i),r.set(i))})}function x(){f.forEach(e=>e.translate.clear())}return{canLoop:y,clear:x,loop:b,loopPoints:f}}function No(e,t,n){let r,i=!1;function a(a){if(!n)return;function o(e){for(let n of e)if(n.type===`childList`){a.reInit(),t.emit(`slidesChanged`);break}}r=new MutationObserver(e=>{i||(Ka(n)||n(a,e))&&o(e)}),r.observe(e,{childList:!0})}function o(){r&&r.disconnect(),i=!0}return{init:a,destroy:o}}function Po(e,t,n,r){let i={},a=null,o=null,s,c=!1;function l(){s=new IntersectionObserver(e=>{c||(e.forEach(e=>{let n=t.indexOf(e.target);i[n]=e}),a=null,o=null,n.emit(`slidesInView`))},{root:e.parentElement,threshold:r}),t.forEach(e=>s.observe(e))}function u(){s&&s.disconnect(),c=!0}function d(e){return io(i).reduce((t,n)=>{let r=parseInt(n),{isIntersecting:a}=i[r];return(e&&a||!e&&!a)&&t.push(r),t},[])}function f(e=!0){if(e&&a)return a;if(!e&&o)return o;let t=d(e);return e&&(a=t),e||(o=t),t}return{init:l,destroy:u,get:f}}function Fo(e,t,n,r,i,a){let{measureSize:o,startEdge:s,endEdge:c}=e,l=n[0]&&i,u=m(),d=h(),f=n.map(o),p=g();function m(){if(!l)return 0;let e=n[0];return Ja(t[s]-e[s])}function h(){if(!l)return 0;let e=a.getComputedStyle(eo(r));return parseFloat(e.getPropertyValue(`margin-${c}`))}function g(){return n.map((e,t,n)=>{let r=!t,i=no(n,t);return r?f[t]+u:i?f[t]+d:n[t+1][s]-e[s]}).map(Ja)}return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}function Io(e,t,n,r,i,a,o,s,c){let{startEdge:l,endEdge:u,direction:d}=e,f=Wa(n);function p(e,t){return $a(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}function m(e){return e.length?$a(e).reduce((n,f,p)=>{let m=eo(n)||0,h=m===0,g=f===to(e),_=i[l]-a[m][l],v=i[l]-a[f][u],y=!r&&h?d(o):0,b=Ja(v-(!r&&g?d(s):0)-(_+y));return p&&b>t+c&&n.push(f),g&&n.push(e.length),n},[]).map((t,n,r)=>{let i=Math.max(r[n-1]||0);return e.slice(i,t)}):[]}function h(e){return f?p(e,n):m(e)}return{groupSlides:h}}function Lo(e,t,n,r,i,a,o){let{align:s,axis:c,direction:l,startIndex:u,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:h,slidesToScroll:g,skipSnaps:_,containScroll:v,watchResize:y,watchSlides:b,watchDrag:x,watchFocus:S}=a,C=go(),w=C.measure(t),T=n.map(C.measure),E=uo(c,l),D=E.measureSize(w),O=_o(D),k=so(s,D),A=!d&&!!v,{slideSizes:j,slideSizesWithGaps:M,startGap:N,endGap:P}=Fo(E,w,T,n,d||!!v,i),F=Io(E,D,g,d,w,T,N,P,2),{snaps:I,snapsAligned:L}=To(E,k,w,T,F),R=-eo(I)+eo(M),{snapsContained:z,scrollContainLimit:B}=xo(D,R,L,v,2),ee=A?z:L,{limit:te}=So(R,ee,d),V=po(to(ee),u,d),H=V.clone(),U=$a(n),W=({dragHandler:e,scrollBody:t,scrollBounds:n,options:{loop:r}})=>{r||n.constrain(e.pointerDown()),t.seek()},G=({scrollBody:e,translate:t,location:n,offsetLocation:r,previousLocation:i,scrollLooper:a,slideLooper:o,dragHandler:s,animation:c,eventHandler:l,scrollBounds:u,options:{loop:d}},f)=>{let p=e.settled(),m=!u.shouldConstrain(),h=d?p:p&&m,g=h&&!s.pointerDown();g&&c.stop();let _=n.get()*f+i.get()*(1-f);r.set(_),d&&(a.loop(e.direction()),o.loop()),t.to(r.get()),g&&l.emit(`settle`),h||l.emit(`scroll`)},ne=lo(r,i,()=>W(pe),e=>G(pe,e)),K=.68,q=ee[V.get()],re=Ao(q),J=Ao(q),ie=Ao(q),Y=Ao(q),ae=yo(re,ie,J,Y,f,K),oe=Do(d,ee,R,te,Y),se=Oo(ne,V,H,ae,oe,Y,o),ce=wo(te),le=co(),ue=Po(t,n,o,h),{slideRegistry:de}=Eo(A,v,ee,B,F,U),fe=ko(e,n,de,se,ae,le,o,S),pe={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:w,slideRects:T,animation:ne,axis:E,dragHandler:mo(E,e,r,i,Y,ho(E,i),re,ne,se,ae,oe,V,o,O,p,m,_,K,x),eventStore:le,percentOfView:O,index:V,indexPrevious:H,limit:te,location:re,offsetLocation:ie,previousLocation:J,options:a,resizeHandler:vo(t,o,i,n,E,y,C),scrollBody:ae,scrollBounds:bo(te,ie,Y,ae,O),scrollLooper:Co(R,te,ie,[re,ie,J,Y]),scrollProgress:ce,scrollSnapList:ee.map(ce.get),scrollSnaps:ee,scrollTarget:oe,scrollTo:se,slideLooper:Mo(E,D,R,j,M,I,ee,ie,n),slideFocus:fe,slidesHandler:No(t,o,b),slidesInView:ue,slideIndexes:U,slideRegistry:de,slidesToScroll:F,target:Y,translate:jo(E,t)};return pe}function Ro(){let e={},t;function n(e){t=e}function r(t){return e[t]||[]}function i(e){return r(e).forEach(n=>n(t,e)),c}function a(t,n){return e[t]=r(t).concat([n]),c}function o(t,n){return e[t]=r(t).filter(e=>e!==n),c}function s(){e={}}let c={init:n,emit:i,off:o,on:a,clear:s};return c}var zo={align:`center`,axis:`x`,container:null,slides:null,containScroll:`trimSnaps`,direction:`ltr`,slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function Bo(e){function t(e,t){return ao(e,t||{})}function n(n){let r=n.breakpoints||{};return t(n,io(r).filter(t=>e.matchMedia(t).matches).map(e=>r[e]).reduce((e,n)=>t(e,n),{}))}function r(t){return t.map(e=>io(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function Vo(e){let t=[];function n(n,r){return t=r.filter(({options:t})=>e.optionsAtMedia(t).active!==!1),t.forEach(t=>t.init(n,e)),r.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})}function r(){t=t.filter(e=>e.destroy())}return{init:n,destroy:r}}function Ho(e,t,n){let r=e.ownerDocument,i=r.defaultView,a=Bo(i),o=Vo(a),s=co(),c=Ro(),{mergeOptions:l,optionsAtMedia:u,optionsMediaQueries:d}=a,{on:f,off:p,emit:m}=c,h=D,g=!1,_,v=l(zo,Ho.globalOptions),y=l(v),b=[],x,S,C;function w(){let{container:t,slides:n}=y;S=(Ga(t)?e.querySelector(t):t)||e.children[0];let r=Ga(n)?S.querySelectorAll(n):n;C=[].slice.call(r||S.children)}function T(t){let n=Lo(e,S,C,r,i,t,c);return t.loop&&!n.slideLooper.canLoop()?T(Object.assign({},t,{loop:!1})):n}function E(e,t){g||(v=l(v,e),y=u(v),b=t||b,w(),_=T(y),d([v,...b.map(({options:e})=>e)]).forEach(e=>s.add(e,`change`,D)),y.active&&(_.translate.to(_.location.get()),_.animation.init(),_.slidesInView.init(),_.slideFocus.init(W),_.eventHandler.init(W),_.resizeHandler.init(W),_.slidesHandler.init(W),_.options.loop&&_.slideLooper.loop(),S.offsetParent&&C.length&&_.dragHandler.init(W),x=o.init(W,b)))}function D(e,t){let n=L();O(),E(l({startIndex:n},e),t),c.emit(`reInit`)}function O(){_.dragHandler.destroy(),_.eventStore.clear(),_.translate.clear(),_.slideLooper.clear(),_.resizeHandler.destroy(),_.slidesHandler.destroy(),_.slidesInView.destroy(),_.animation.destroy(),o.destroy(),s.clear()}function k(){g||(g=!0,s.clear(),O(),c.emit(`destroy`),c.clear())}function A(e,t,n){!y.active||g||(_.scrollBody.useBaseFriction().useDuration(t===!0?0:y.duration),_.scrollTo.index(e,n||0))}function j(e){A(_.index.add(1).get(),e,-1)}function M(e){A(_.index.add(-1).get(),e,1)}function N(){return _.index.add(1).get()!==L()}function P(){return _.index.add(-1).get()!==L()}function F(){return _.scrollSnapList}function I(){return _.scrollProgress.get(_.offsetLocation.get())}function L(){return _.index.get()}function R(){return _.indexPrevious.get()}function z(){return _.slidesInView.get()}function B(){return _.slidesInView.get(!1)}function ee(){return x}function te(){return _}function V(){return e}function H(){return S}function U(){return C}let W={canScrollNext:N,canScrollPrev:P,containerNode:H,internalEngine:te,destroy:k,off:p,on:f,emit:m,plugins:ee,previousScrollSnap:R,reInit:h,rootNode:V,scrollNext:j,scrollPrev:M,scrollProgress:I,scrollSnapList:F,scrollTo:A,selectedScrollSnap:L,slideNodes:U,slidesInView:z,slidesNotInView:B};return E(t,n),setTimeout(()=>c.emit(`init`),0),W}Ho.globalOptions=void 0;function Uo(e={},t=[]){let n=(0,Z.useRef)(e),r=(0,Z.useRef)(t),[i,a]=(0,Z.useState)(),[o,s]=(0,Z.useState)(),c=(0,Z.useCallback)(()=>{i&&i.reInit(n.current,r.current)},[i]);return(0,Z.useEffect)(()=>{Va(n.current,e)||(n.current=e,c())},[e,c]),(0,Z.useEffect)(()=>{Ua(r.current,t)||(r.current=t,c())},[t,c]),(0,Z.useEffect)(()=>{if(Ba()&&o){Ho.globalOptions=Uo.globalOptions;let e=Ho(o,n.current,r.current);return a(e),()=>e.destroy()}else a(void 0)},[o,a]),[s,i]}Uo.globalOptions=void 0;var Wo=Z.createContext(null);function Go(){let e=Z.useContext(Wo);if(!e)throw Error(`useCarousel must be used within a <Carousel />`);return e}var Ko=Z.forwardRef((e,t)=>{let n=(0,$.c)(46),r,i,a,o,s,c,l;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6],l=n[7]):({orientation:l,opts:a,setApi:c,plugins:o,className:i,children:r,...s}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s,n[6]=c,n[7]=l);let u=l===void 0?`horizontal`:l,d=u===`horizontal`?`x`:`y`,f;n[8]!==a||n[9]!==d?(f={...a,axis:d},n[8]=a,n[9]=d,n[10]=f):f=n[10];let[p,m]=Uo(f,o),[h,g]=Z.useState(!1),[_,v]=Z.useState(!1),y;n[11]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>{e&&(g(e.canScrollPrev()),v(e.canScrollNext()))},n[11]=y):y=n[11];let b=y,x;n[12]===m?x=n[13]:(x=()=>{m?.scrollPrev()},n[12]=m,n[13]=x);let S=x,C;n[14]===m?C=n[15]:(C=()=>{m?.scrollNext()},n[14]=m,n[15]=C);let w=C,T;n[16]!==w||n[17]!==S?(T=e=>{e.key===`ArrowLeft`?(e.preventDefault(),S()):e.key===`ArrowRight`&&(e.preventDefault(),w())},n[16]=w,n[17]=S,n[18]=T):T=n[18];let E=T,D,O;n[19]!==m||n[20]!==c?(D=()=>{!m||!c||c(m)},O=[m,c],n[19]=m,n[20]=c,n[21]=D,n[22]=O):(D=n[21],O=n[22]),Z.useEffect(D,O);let k,A;n[23]===m?(k=n[24],A=n[25]):(k=()=>{if(m)return b(m),m.on(`reInit`,b),m.on(`select`,b),()=>{m?.off(`select`,b)}},A=[m,b],n[23]=m,n[24]=k,n[25]=A),Z.useEffect(k,A);let j=u||(a?.axis===`y`?`vertical`:`horizontal`),M;n[26]!==m||n[27]!==_||n[28]!==h||n[29]!==p||n[30]!==a||n[31]!==w||n[32]!==S||n[33]!==j?(M={carouselRef:p,api:m,opts:a,orientation:j,scrollPrev:S,scrollNext:w,canScrollPrev:h,canScrollNext:_},n[26]=m,n[27]=_,n[28]=h,n[29]=p,n[30]=a,n[31]=w,n[32]=S,n[33]=j,n[34]=M):M=n[34];let N;n[35]===i?N=n[36]:(N=X(`relative`,i),n[35]=i,n[36]=N);let P;n[37]!==r||n[38]!==E||n[39]!==s||n[40]!==t||n[41]!==N?(P=(0,Q.jsx)(`div`,{ref:t,onKeyDownCapture:E,className:N,role:`region`,"aria-roledescription":`carousel`,...s,children:r}),n[37]=r,n[38]=E,n[39]=s,n[40]=t,n[41]=N,n[42]=P):P=n[42];let F;return n[43]!==M||n[44]!==P?(F=(0,Q.jsx)(Wo.Provider,{value:M,children:P}),n[43]=M,n[44]=P,n[45]=F):F=n[45],F});Ko.displayName=`Carousel`;var qo=Z.forwardRef((e,t)=>{let n=(0,$.c)(13),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let{carouselRef:a,orientation:o}=Go(),s=o===`horizontal`?`-ml-4`:`-mt-4 flex-col`,c;n[3]!==r||n[4]!==s?(c=X(`flex`,s,r),n[3]=r,n[4]=s,n[5]=c):c=n[5];let l;n[6]!==i||n[7]!==t||n[8]!==c?(l=(0,Q.jsx)(`div`,{ref:t,className:c,...i}),n[6]=i,n[7]=t,n[8]=c,n[9]=l):l=n[9];let u;return n[10]!==a||n[11]!==l?(u=(0,Q.jsx)(`div`,{ref:a,className:`overflow-hidden`,children:l}),n[10]=a,n[11]=l,n[12]=u):u=n[12],u});qo.displayName=`CarouselContent`;var Jo=Z.forwardRef((e,t)=>{let n=(0,$.c)(10),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let{orientation:a}=Go(),o=a===`horizontal`?`pl-4`:`pt-4`,s;n[3]!==r||n[4]!==o?(s=X(`min-w-0 shrink-0 grow-0 basis-full`,o,r),n[3]=r,n[4]=o,n[5]=s):s=n[5];let c;return n[6]!==i||n[7]!==t||n[8]!==s?(c=(0,Q.jsx)(`div`,{ref:t,role:`group`,"aria-roledescription":`slide`,className:s,...i}),n[6]=i,n[7]=t,n[8]=s,n[9]=c):c=n[9],c});Jo.displayName=`CarouselItem`;var Yo=Z.forwardRef((e,t)=>{let n=(0,$.c)(18),r,i,a,o;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4]):({className:r,variant:a,size:o,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let s=a===void 0?`outline`:a,c=o===void 0?`icon`:o,{orientation:l,scrollPrev:u,canScrollPrev:d}=Go(),f=l===`horizontal`?`-left-12 top-1/2 -translate-y-1/2`:`-top-12 left-1/2 -translate-x-1/2 rotate-90`,p;n[5]!==r||n[6]!==f?(p=X(`absolute h-8 w-8 rounded-full`,f,r),n[5]=r,n[6]=f,n[7]=p):p=n[7];let m=!d,h,g;n[8]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Q.jsx)(q,{name:`ArrowLeft`,className:`h-4 w-4`}),g=(0,Q.jsx)(`span`,{className:`sr-only`,children:`Previous slide`}),n[8]=h,n[9]=g):(h=n[8],g=n[9]);let _;return n[10]!==i||n[11]!==t||n[12]!==u||n[13]!==c||n[14]!==p||n[15]!==m||n[16]!==s?(_=(0,Q.jsxs)(ft,{ref:t,variant:s,size:c,className:p,disabled:m,onClick:u,...i,children:[h,g]}),n[10]=i,n[11]=t,n[12]=u,n[13]=c,n[14]=p,n[15]=m,n[16]=s,n[17]=_):_=n[17],_});Yo.displayName=`CarouselPrevious`;var Xo=Z.forwardRef((e,t)=>{let n=(0,$.c)(18),r,i,a,o;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4]):({className:r,variant:a,size:o,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let s=a===void 0?`outline`:a,c=o===void 0?`icon`:o,{orientation:l,scrollNext:u,canScrollNext:d}=Go(),f=l===`horizontal`?`-right-12 top-1/2 -translate-y-1/2`:`-bottom-12 left-1/2 -translate-x-1/2 rotate-90`,p;n[5]!==r||n[6]!==f?(p=X(`absolute h-8 w-8 rounded-full`,f,r),n[5]=r,n[6]=f,n[7]=p):p=n[7];let m=!d,h,g;n[8]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Q.jsx)(q,{name:`ArrowRight`,className:`h-4 w-4`}),g=(0,Q.jsx)(`span`,{className:`sr-only`,children:`Next slide`}),n[8]=h,n[9]=g):(h=n[8],g=n[9]);let _;return n[10]!==i||n[11]!==t||n[12]!==u||n[13]!==c||n[14]!==p||n[15]!==m||n[16]!==s?(_=(0,Q.jsxs)(ft,{ref:t,variant:s,size:c,className:p,disabled:m,onClick:u,...i,children:[h,g]}),n[10]=i,n[11]=t,n[12]=u,n[13]=c,n[14]=p,n[15]=m,n[16]=s,n[17]=_):_=n[17],_});Xo.displayName=`CarouselNext`;var Zo=[`a`,`blockquote`,`br`,`code`,`del`,`em`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`hr`,`li`,`ol`,`p`,`pre`,`strong`,`ul`],Qo=[pr];function $o(e){try{return new URL(e).protocol===`https:`?e:null}catch{return null}}var es=e=>$o(e)??``;function ts(e){let t=(0,$.c)(7),{children:n,href:r}=e,i;t[0]===r?i=t[1]:(i=r===void 0?null:$o(r),t[0]=r,t[1]=i);let a=i;if(a===null){let e;return t[2]===n?e=t[3]:(e=(0,Q.jsx)(`span`,{children:n}),t[2]=n,t[3]=e),e}let o;return t[4]!==n||t[5]!==a?(o=(0,Q.jsx)(`a`,{href:a,target:`_blank`,rel:`noopener noreferrer`,className:`break-words [overflow-wrap:anywhere] underline underline-offset-2 hover:text-foreground`,children:n}),t[4]=n,t[5]=a,t[6]=o):o=t[6],o}function ns(e){let t=(0,$.c)(4),{children:n,minor:r}=e,i=r===void 0?!1:r,a=i?`h4`:`h3`,o=i?`mb-1 mt-4 text-xs font-medium text-foreground first:mt-0`:`mb-1 mt-6 text-sm font-medium text-foreground first:mt-0`,s;return t[0]!==a||t[1]!==n||t[2]!==o?(s=(0,Q.jsx)(a,{className:o,children:n}),t[0]=a,t[1]=n,t[2]=o,t[3]=s):s=t[3],s}var rs={a:ts,blockquote:({children:e})=>(0,Q.jsx)(`blockquote`,{className:`my-2 border-l-2 border-surface-selected-border pl-3`,children:e}),code:({children:e})=>(0,Q.jsx)(`code`,{className:`rounded-sm bg-surface-recessed px-1 font-mono text-xs text-foreground [box-decoration-break:clone]`,children:e}),h1:({children:e})=>(0,Q.jsx)(ns,{children:e}),h2:({children:e})=>(0,Q.jsx)(ns,{children:e}),h3:({children:e})=>(0,Q.jsx)(ns,{children:e}),h4:({children:e})=>(0,Q.jsx)(ns,{minor:!0,children:e}),h5:({children:e})=>(0,Q.jsx)(ns,{minor:!0,children:e}),h6:({children:e})=>(0,Q.jsx)(ns,{minor:!0,children:e}),hr:()=>(0,Q.jsx)(`hr`,{className:`my-4 border-t border-border`}),li:({children:e})=>(0,Q.jsx)(`li`,{className:`pl-0.5`,children:e}),ol:({children:e})=>(0,Q.jsx)(`ol`,{className:`mb-3 list-decimal space-y-1 pl-4 marker:text-subtle-foreground`,children:e}),p:({children:e})=>(0,Q.jsx)(`p`,{className:`mb-3 last:mb-0`,children:e}),pre:({children:e})=>(0,Q.jsx)(`pre`,{className:`my-2 overflow-x-auto rounded-md border border-border bg-surface-recessed p-3 font-mono text-xs text-foreground`,children:e}),ul:({children:e})=>(0,Q.jsx)(`ul`,{className:`mb-3 list-disc space-y-1 pl-4 marker:text-subtle-foreground`,children:e})};function is(e){let t=(0,$.c)(2),{markdown:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Q.jsx)(`div`,{"data-plugin-overview":``,className:`break-words text-sm leading-relaxed text-muted-foreground`,children:(0,Q.jsx)(fr,{allowedElements:Zo,unwrapDisallowed:!0,skipHtml:!0,remarkPlugins:Qo,components:rs,urlTransform:es,children:n})}),t[0]=n,t[1]=r),r}function as(e){let n=(0,$.c)(8),{entry:r}=e,i;n[0]===r?i=n[1]:(i=(0,Q.jsx)(`span`,{className:`min-w-0 truncate`,children:(0,Q.jsx)(Fn,{entry:r})}),n[0]=r,n[1]=i);let a;n[2]!==r.category||n[3]!==r.categoryId?(a=r.category===void 0||Un(r.categoryId)===void 0?null:(0,Q.jsxs)(`span`,{className:`flex min-w-0 shrink-[100] items-center gap-1`,children:[(0,Q.jsx)(er,{categoryId:r.categoryId,className:`size-3`}),(0,Q.jsx)(t,{to:{pathname:Ce(),search:new URLSearchParams({shelf:`category:${r.categoryId}`}).toString()},"aria-label":`Browse ${r.category} plugins`,className:`min-w-0 truncate rounded-sm underline decoration-border underline-offset-2 hover:text-foreground hover:decoration-current focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:r.category})]}),n[2]=r.category,n[3]=r.categoryId,n[4]=a):a=n[4];let o;return n[5]!==i||n[6]!==a?(o=(0,Q.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[i,a]}),n[5]=i,n[6]=a,n[7]=o):o=n[7],o}function os(e){let t=(0,$.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Q.jsx)(`dl`,{className:`grid grid-cols-2 gap-x-6 gap-y-4`,children:n}),t[0]=n,t[1]=r),r}function ss(e){let t=(0,$.c)(7),{label:n,children:r}=e,i;t[0]===n?i=t[1]:(i=(0,Q.jsx)(`dt`,{className:`text-2xs font-medium text-subtle-foreground`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=(0,Q.jsx)(`dd`,{className:`min-w-0 text-xs text-foreground`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,Q.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function cs(e){let t=(0,$.c)(8),{entry:n}=e,r;t[0]!==n.marketplace||t[1]!==n.marketplaceDisplayName?(r=n.marketplace===`bb-official`?null:(0,Q.jsx)(ss,{label:`Marketplace`,children:n.marketplaceDisplayName}),t[0]=n.marketplace,t[1]=n.marketplaceDisplayName,t[2]=r):r=t[2];let i;t[3]===n.publishedAt?i=t[4]:(i=n.publishedAt===void 0?null:(0,Q.jsx)(ss,{label:`Listed`,children:(0,Q.jsx)(`time`,{dateTime:n.publishedAt,children:new Date(n.publishedAt).toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`numeric`})})}),t[3]=n.publishedAt,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsxs)(Q.Fragment,{children:[r,i]}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ls(e){let t=(0,$.c)(12),{entry:n}=e;if(n.repositoryUrl===null)return null;let r=n.repositoryUrl,i;t[0]===n.repositoryUrl?i=t[1]:(i=n.repositoryUrl.startsWith(`https://github.com/`)?(0,Q.jsx)(q,{name:`GithubLogo`,className:`size-4.5 shrink-0 fill-current [&_*]:stroke-0`,"aria-hidden":!0}):null,t[0]=n.repositoryUrl,t[1]=i);let a;t[2]===n.repositoryUrl?a=t[3]:(a=Yn(n.repositoryUrl),t[2]=n.repositoryUrl,t[3]=a);let o;t[4]===a?o=t[5]:(o=(0,Q.jsx)(`span`,{className:`truncate`,children:a}),t[4]=a,t[5]=o);let s,c;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Q.jsx)(q,{name:`ExternalLink`,className:`size-3.5 shrink-0`,"aria-hidden":!0}),c=(0,Q.jsx)(`span`,{className:`sr-only`,children:`Opens in a new tab`}),t[6]=s,t[7]=c):(s=t[6],c=t[7]);let l;return t[8]!==n.repositoryUrl||t[9]!==i||t[10]!==o?(l=(0,Q.jsx)(mn,{label:`Source`,children:(0,Q.jsxs)(`a`,{href:r,target:`_blank`,rel:`noreferrer`,className:`inline-flex max-w-full items-center gap-1.5 rounded-sm text-sm text-muted-foreground underline underline-offset-2 hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:[i,o,s,c]})}),t[8]=n.repositoryUrl,t[9]=i,t[10]=o,t[11]=l):l=t[11],l}var us=420;function ds(e){let t=(0,$.c)(27),{entry:n}=e,[r,i]=(0,Z.useState)(),[a,o]=(0,Z.useState)(0),s,c;if(t[0]===r?(s=t[1],c=t[2]):(s=()=>{if(r===void 0)return;let e=()=>o(r.selectedScrollSnap());return e(),r.on(`select`,e),r.on(`reInit`,e),()=>{r.off(`select`,e),r.off(`reInit`,e)}},c=[r],t[0]=r,t[1]=s,t[2]=c),(0,Z.useEffect)(s,c),n.screenshots.length===0)return null;let l;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(l={align:`start`,containScroll:`trimSnaps`},t[3]=l):l=t[3];let u=`${n.displayName} screenshots`,d=n.screenshots.length>1&&`px-11`,f;t[4]===d?f=t[5]:(f=X(`w-full`,d),t[4]=d,t[5]=f);let p;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(p={minHeight:`${us}px`},t[6]=p):p=t[6];let m;if(t[7]!==n.displayName||t[8]!==n.screenshots){let e;t[10]===n.displayName?e=t[11]:(e=(e,t)=>(0,Q.jsx)(Jo,{className:`basis-auto pl-3`,children:(0,Q.jsx)(`img`,{src:e,alt:`${n.displayName} screenshot ${t+1}`,referrerPolicy:`no-referrer`,loading:`lazy`,className:`h-auto w-auto rounded-md border border-border object-contain`,style:{maxHeight:`${us}px`,maxWidth:`${us*2}px`}})},e),t[10]=n.displayName,t[11]=e),m=n.screenshots.map(e),t[7]=n.displayName,t[8]=n.screenshots,t[9]=m}else m=t[9];let h;t[12]===m?h=t[13]:(h=(0,Q.jsx)(qo,{className:`-ml-3 items-center`,style:p,children:m}),t[12]=m,t[13]=h);let g;t[14]===n.screenshots.length?g=t[15]:(g=n.screenshots.length>1?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Yo,{className:`left-0 size-8`}),(0,Q.jsx)(Xo,{className:`right-0 size-8`})]}):null,t[14]=n.screenshots.length,t[15]=g);let _;t[16]!==g||t[17]!==u||t[18]!==f||t[19]!==h?(_=(0,Q.jsxs)(Ko,{setApi:i,opts:l,"aria-label":u,className:f,children:[h,g]}),t[16]=g,t[17]=u,t[18]=f,t[19]=h,t[20]=_):_=t[20];let v;t[21]!==n.screenshots||t[22]!==a?(v=n.screenshots.length>1?(0,Q.jsx)(`div`,{className:`flex justify-center gap-1.5`,"aria-label":`Screenshot ${a+1} of ${n.screenshots.length}`,role:`status`,children:n.screenshots.map((e,t)=>(0,Q.jsx)(`span`,{"aria-hidden":!0,className:X(`h-1 rounded-full transition-[width,background-color]`,t===a?`w-4 bg-foreground/70`:`w-2 bg-border`)},e))}):null,t[21]=n.screenshots,t[22]=a,t[23]=v):v=t[23];let y;return t[24]!==_||t[25]!==v?(y=(0,Q.jsxs)(Q.Fragment,{children:[_,v]}),t[24]=_,t[25]=v,t[26]=y):y=t[26],y}function fs(e){let t=(0,$.c)(2),{description:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Q.jsx)(`p`,{className:`text-sm leading-relaxed text-foreground`,"data-plugin-summary":``,children:n}),t[0]=n,t[1]=r),r}function ps(e){let t=(0,$.c)(12),{entry:n}=e,r;t[0]===n?r=t[1]:(r=(0,Q.jsx)(ds,{entry:n}),t[0]=n,t[1]=r);let i;t[2]===n.description?i=t[3]:(i=(0,Q.jsx)(fs,{description:n.description}),t[2]=n.description,t[3]=i);let a;t[4]===n.overview?a=t[5]:(a=n.overview===void 0?null:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`hr`,{className:`border-t border-border`}),(0,Q.jsx)(`h2`,{className:`text-sm font-medium text-foreground`,children:`Overview`}),(0,Q.jsx)(is,{markdown:n.overview})]}),t[4]=n.overview,t[5]=a);let o;t[6]!==i||t[7]!==a?(o=(0,Q.jsxs)(`div`,{className:`max-w-prose space-y-4`,children:[i,a]}),t[6]=i,t[7]=a,t[8]=o):o=t[8];let s;return t[9]!==r||t[10]!==o?(s=(0,Q.jsxs)(`section`,{className:`space-y-6`,"data-resource-detail-section":`overview`,children:[r,o]}),t[9]=r,t[10]=o,t[11]=s):s=t[11],s}function ms(e){let t=(0,$.c)(8),{entry:n}=e,r,i,a;t[0]===n?(r=t[1],i=t[2],a=t[3]):(r=(0,Q.jsx)(ps,{entry:n}),i=(0,Q.jsx)(ls,{entry:n}),a=n.marketplace===`bb-official`&&n.publishedAt===void 0?null:(0,Q.jsx)(mn,{label:`Details`,children:(0,Q.jsx)(os,{children:(0,Q.jsx)(cs,{entry:n})})}),t[0]=n,t[1]=r,t[2]=i,t[3]=a);let o;return t[4]!==r||t[5]!==i||t[6]!==a?(o=(0,Q.jsxs)(Q.Fragment,{children:[r,i,a]}),t[4]=r,t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function hs(e){let t=(0,$.c)(14),{entry:n,catalogEntries:r,onOpenPlugin:i}=e,a;t[0]===n?a=t[1]:(a=Mn(n),t[0]=n,t[1]=a);let o=a,s;t[2]!==o||t[3]!==r||t[4]!==n.entryId||t[5]!==n.marketplace?(s=o===null?[]:ir(r,o).filter(e=>e.compatible&&(e.marketplace!==n.marketplace||e.entryId!==n.entryId)).sort(gs).slice(0,4),t[2]=o,t[3]=r,t[4]=n.entryId,t[5]=n.marketplace,t[6]=s):s=t[6];let c=s;if(c.length===0)return null;let l;if(t[7]!==c||t[8]!==i){let e;t[10]===i?e=t[11]:(e=e=>{let t=Kn(e.displayName);return(0,Q.jsx)(Tn,{leading:(0,Q.jsx)(Xn,{entry:e}),title:t.name,titleMeta:t.tag?(0,Q.jsx)(kn,{tag:t.tag}):void 0,description:e.description||void 0,trailingVisual:(0,Q.jsx)($t,{}),openLabel:`Open ${e.displayName} details`,onOpen:()=>i(_e(e))},`${e.marketplace}/${e.entryId}`)},t[10]=i,t[11]=e),l=c.map(e),t[7]=c,t[8]=i,t[9]=l}else l=t[9];let u;return t[12]===l?u=t[13]:(u=(0,Q.jsx)(mn,{label:`More from this author`,children:(0,Q.jsx)(Cn,{className:`py-0`,children:l})}),t[12]=l,t[13]=u),u}function gs(e,t){return e.displayName.localeCompare(t.displayName)||e.entryId.localeCompare(t.entryId)}var _s=[`browser`,`diagnostics`,`environment`,`file`,`guide`,`help`,`machine`,`marketplace`,`plugin`,`project`,`prompt-history`,`provider`,`server`,`settings`,`skill`,`status`,`terminal`,`theme`,`thread`,`updates`,`voice`];function vs(e,t){return _s.includes(t)?`bb plugin run ${e}`:`bb ${t}`}var ys={destructive:`text-destructive`,warning:`text-warning`,muted:`text-muted-foreground`};function bs(e){let t=(0,$.c)(26),{tone:n,icon:r,title:i,detail:a,action:o,separator:s,role:c}=e,l=(s===void 0?!0:s)&&`border-b`,u;t[0]===l?u=t[1]:(u=X(`@container border-t border-border bg-surface-recessed/55 not-first:border-t-0`,l),t[0]=l,t[1]=u);let d=ys[n],f;t[2]===d?f=t[3]:(f=X(`mt-px size-3.5 shrink-0`,d),t[2]=d,t[3]=f);let p;t[4]!==r||t[5]!==f?(p=(0,Q.jsx)(q,{name:r,className:f,"aria-hidden":!0}),t[4]=r,t[5]=f,t[6]=p):p=t[6];let m;t[7]===i?m=t[8]:(m=(0,Q.jsx)(`span`,{className:`font-medium text-foreground`,children:i}),t[7]=i,t[8]=m);let h;t[9]===a?h=t[10]:(h=a==null?null:(0,Q.jsxs)(Q.Fragment,{children:[`: `,a]}),t[9]=a,t[10]=h);let g;t[11]!==m||t[12]!==h?(g=(0,Q.jsxs)(`p`,{className:`min-w-0 flex-1 text-xs leading-snug text-muted-foreground`,children:[m,h]}),t[11]=m,t[12]=h,t[13]=g):g=t[13];let _;t[14]!==p||t[15]!==g?(_=(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-start gap-2`,children:[p,g]}),t[14]=p,t[15]=g,t[16]=_):_=t[16];let v;t[17]===o?v=t[18]:(v=o?(0,Q.jsx)(`span`,{className:`flex shrink-0 items-center ps-3 @md:ps-0`,children:o}):null,t[17]=o,t[18]=v);let y;t[19]!==_||t[20]!==v?(y=(0,Q.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-5xl flex-col gap-1 px-4 py-1.5 md:px-5 @md:flex-row @md:items-center @md:gap-2`,children:[_,v]}),t[19]=_,t[20]=v,t[21]=y):y=t[21];let b;return t[22]!==c||t[23]!==y||t[24]!==u?(b=(0,Q.jsx)(`div`,{role:c,className:u,children:y}),t[22]=c,t[23]=y,t[24]=u,t[25]=b):b=t[25],b}function xs(e){let t=(0,$.c)(4),{label:n,onClick:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(q,{name:`ChevronRight`,className:`size-3.5`,"aria-hidden":!0}),t[0]=i):i=t[0];let a;return t[1]!==n||t[2]!==r?(a=(0,Q.jsxs)(ft,{type:`button`,variant:`ghost`,size:`sm`,className:`h-7 gap-0.5 px-2.5 text-xs font-normal text-muted-foreground hover:text-foreground`,onClick:r,children:[n,i]}),t[1]=n,t[2]=r,t[3]=a):a=t[3],a}var Ss=`w-40 @min-[40rem]/plugin-detail:w-48`,Cs=`bg-surface-recessed/55`,ws=`grid grid-cols-1 @min-[28rem]/plugin-detail:grid-cols-[10rem_minmax(0,1fr)] @min-[40rem]/plugin-detail:grid-cols-[12rem_minmax(0,1fr)]`;function Ts(e){let t=(0,$.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Q.jsx)(`div`,{className:`@container/plugin-detail max-w-full overflow-hidden rounded-lg border border-border bg-card align-top`,children:(0,Q.jsx)(`table`,{className:`block w-full max-w-full border-collapse text-left`,children:(0,Q.jsx)(`tbody`,{className:`block divide-y divide-border`,children:n})})}),t[0]=n,t[1]=r),r}var Es=`py-1.5 align-top text-sm leading-snug`;function Ds(e){let t=(0,$.c)(13),{icon:n,label:r,className:i}=e,a;t[0]===i?a=t[1]:(a=X(`size-4`,i),t[0]=i,t[1]=a);let o;t[2]!==n||t[3]!==a?(o=(0,Q.jsx)(q,{name:n,className:a,"aria-hidden":!0}),t[2]=n,t[3]=a,t[4]=o):o=t[4];let s;t[5]!==r||t[6]!==o?(s=(0,Q.jsx)(de,{asChild:!0,children:(0,Q.jsx)(`span`,{role:`img`,"aria-label":r,tabIndex:0,className:`inline-flex size-4 shrink-0 items-center justify-center rounded-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:o})}),t[5]=r,t[6]=o,t[7]=s):s=t[7];let c;t[8]===r?c=t[9]:(c=(0,Q.jsx)(O,{children:r}),t[8]=r,t[9]=c);let l;return t[10]!==s||t[11]!==c?(l=(0,Q.jsx)(Pt,{delayDuration:200,children:(0,Q.jsxs)(se,{children:[s,c]})}),t[10]=s,t[11]=c,t[12]=l):l=t[12],l}function Os(e){let t=(0,$.c)(27),{glyph:n,name:r,nameClassName:i,mono:a,detail:o}=e,s=a===void 0?!1:a,c=o!=null&&o!==``,l=(0,Z.useId)(),[u,d]=(0,Z.useState)(!1),f=typeof o==`string`&&o.length>180,p=c?ws:`grid grid-cols-1`,m=c?`border-b border-border px-4 @min-[28rem]/plugin-detail:border-b-0 @min-[28rem]/plugin-detail:border-r @min-[28rem]/plugin-detail:pr-2`:`px-4`,h;t[0]===m?h=t[1]:(h=X(Es,Cs,`flex items-center text-left font-normal`,m),t[0]=m,t[1]=h);let g=c?void 0:2,_;t[2]===n?_=t[3]:(_=(0,Q.jsx)(`span`,{className:`flex shrink-0`,children:n}),t[2]=n,t[3]=_);let v=s&&`font-mono`,y;t[4]!==i||t[5]!==v?(y=X(`min-w-0 break-words text-foreground`,v,i),t[4]=i,t[5]=v,t[6]=y):y=t[6];let b;t[7]!==r||t[8]!==y?(b=(0,Q.jsx)(`span`,{className:y,children:r}),t[7]=r,t[8]=y,t[9]=b):b=t[9];let x;t[10]!==_||t[11]!==b?(x=(0,Q.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[_,b]}),t[10]=_,t[11]=b,t[12]=x):x=t[12];let S;t[13]!==x||t[14]!==h||t[15]!==g?(S=(0,Q.jsx)(`th`,{scope:`row`,className:h,colSpan:g,children:x}),t[13]=x,t[14]=h,t[15]=g,t[16]=S):S=t[16];let C;t[17]!==o||t[18]!==l||t[19]!==u||t[20]!==c||t[21]!==f?(C=c?(0,Q.jsxs)(`td`,{id:l,className:X(Es,`px-4 text-xs leading-normal text-muted-foreground @min-[28rem]/plugin-detail:pl-2`),children:[(0,Q.jsx)(`div`,{className:X(`space-y-2 break-words leading-relaxed`,f&&!u&&`line-clamp-3`),children:o}),f?(0,Q.jsx)(`button`,{type:`button`,"aria-expanded":u,"aria-controls":l,className:`mt-2 rounded-sm text-xs font-medium text-subtle-foreground underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,onClick:()=>d(ks),children:u?`Show less`:`Show full description`}):null]}):null,t[17]=o,t[18]=l,t[19]=u,t[20]=c,t[21]=f,t[22]=C):C=t[22];let w;return t[23]!==S||t[24]!==C||t[25]!==p?(w=(0,Q.jsxs)(`tr`,{className:p,children:[S,C]}),t[23]=S,t[24]=C,t[25]=p,t[26]=w):w=t[26],w}function ks(e){return!e}function As(e){return e===null?{name:`Clock`,className:`text-muted-foreground`,label:`Scheduled`}:e===`running`?{name:`Clock`,className:`animate-shine-icon text-muted-foreground`,label:`Running`}:e===`ok`?{name:`CircleCheck`,className:`text-success`,label:`Succeeded`}:e===`error`?{name:`CircleX`,className:`text-destructive`,label:`Failed`}:{name:`Clock`,className:`text-muted-foreground`,label:`Scheduled`}}function js(e){return e===`running`?{label:`Running`,labelClassName:`animate-shine`,tone:`success`}:e===`backoff`?{label:`Restarting`,labelClassName:`animate-shine`,tone:`muted`}:{label:`Stopped`,statusClassName:`opacity-50`,tone:`muted`}}function Ms(e){let t=(0,$.c)(6),{state:n}=e,r;t[0]===n?r=t[1]:(r=As(n),t[0]=n,t[1]=r);let i=r,a;return t[2]!==i.className||t[3]!==i.label||t[4]!==i.name?(a=(0,Q.jsx)(Ds,{icon:i.name,label:i.label,className:i.className}),t[2]=i.className,t[3]=i.label,t[4]=i.name,t[5]=a):a=t[5],a}function Ns(e,t,n,r,i){let a=n?.trim()||t;return{key:`${e}:${t}`,label:a,detail:a===t?r:(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-baseline gap-x-1.5 gap-y-0.5`,children:[(0,Q.jsx)(`span`,{children:r}),(0,Q.jsx)(`span`,{className:`break-all font-mono text-subtle-foreground`,children:t})]}),mono:a===t,destinationPath:i}}function Ps(e,t,n,r,i){return t.filter(t=>t.pluginId===e).map(e=>Ns(n,e.id,e.title,r,i?.(e)))}function Fs(e,t,n){let r=e.id,i=t.settingsSections.filter(e=>e.pluginId===r);return[...e.hasSettings||i.length>0?[Ns(`settings`,`settings`,`Settings`,`Opens this plugin's configuration.`,n??te({pluginId:r}))]:[],...Ps(r,t.navPanels,`nav`,`Adds a page to the app sidebar.`,e=>B({pluginId:r,path:e.path})),...Ps(r,t.homepageSections,`homepage`,`Adds content to the Home page.`,e=>`${S()}#${xr(r,e.id)}`),...Ps(r,t.appOverlays,`app-overlay`,`Renders app-wide floating interface content.`),...Ps(r,t.threadLists,`thread-list`,`Can replace the sidebar thread list; configured in Appearance.`,()=>pt(`appearance`)),...Ps(r,t.homes,`home`,`Can replace the home page; configured in Appearance.`,()=>pt(`appearance`)),...Ps(r,t.experimentalSidebarNavigations,`sidebar-navigation`,`Can draw the sidebar navigation; configured in Appearance.`,()=>pt(`appearance`)),...Ps(r,t.sourceCodeRenderers,`source-code-renderer`,`Replaces how source code is displayed everywhere in the app.`),...Ps(r,t.diffRenderers,`diff-renderer`,`Replaces how diffs are displayed everywhere in the app.`),...Ps(r,t.composers,`composer`,`Can replace the thread composer; configured in Appearance.`,()=>pt(`appearance`)),...Ps(r,t.threadPanelActions,`thread-panel`,`Adds an action that opens a panel beside a thread.`),...Ps(r,t.newThreadPanelActions,`new-thread-panel`,`Adds an action that opens a panel beside the New thread screen.`),...Ps(r,t.pendingInteractions,`input`,`Renders a custom interaction inside a thread.`),...t.sidebarFooterItems.filter(e=>e.pluginId===r).map(e=>Ns(`sidebar-footer`,e.id,e.label,e.kind===`action`?`Adds an action to the app sidebar footer.`:`Adds content revealed from the app sidebar footer.`)),...Ps(r,t.messageActions,`message-action`,`Adds an action to messages in threads.`),...Ps(r,t.threadHeaderActions,`thread-header`,`Adds an action to thread headers.`),...Ps(r,t.threadContextSegments,`thread-context`,`Adds context beside a thread's composer.`),...Ps(r,t.threadInfoRows,`thread-info-row`,`Adds a row to the thread Info tab.`),...Ps(r,t.threadInfoSections,`thread-info-section`,`Adds a section to the thread Info tab.`),...Ps(r,t.threadActions,`thread-action`,`Adds an action to thread menus.`),...Ps(r,t.browserToolbarActions,`browser-toolbar`,`Adds an action to Browser tab toolbars.`),...t.composerCustomizations.filter(e=>e.pluginId===r).flatMap(e=>[...(e.actions??[]).map(t=>Ns(`composer:${e.id}:action`,t.id,void 0,`Adds an action beside the thread composer.`)),...(e.experimental_popups??[]).map(t=>Ns(`composer:${e.id}:popup:${t.id}`,t.id,t.label,`Opens plugin content beside the composer, sharing the mention menu's placement.`)),...(e.banners??[]).map(t=>Ns(`composer:${e.id}:banner`,t.id,void 0,`Shows information above the thread composer.`)),...(e.plusMenu??[]).map(t=>Ns(`composer:${e.id}:plus-menu`,t.id,t.label,`Adds an item to the composer’s add menu.`)),...(e.richText?.effects??[]).map(t=>Ns(`composer:${e.id}:rich-text`,t.id,void 0,`Adds rich-text behavior while composing a message.`))]),...t.fileOpeners.filter(e=>e.pluginId===r).map(e=>({...Ns(`file`,e.id,e.title,`Opens supported files in a plugin-provided viewer.`,pt(`files`)),detail:(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-baseline gap-x-1.5 gap-y-0.5`,children:[(0,Q.jsx)(`span`,{children:`Opens these files in a plugin-provided viewer:`}),(0,Q.jsx)(`span`,{className:`font-mono`,children:e.extensions.map(e=>`.${e}`).join(`, `)})]})})),...t.messageDirectives.filter(e=>e.pluginId===r).map(e=>({key:`directive:${e.id}`,label:`::${e.id}`,detail:`Renders plugin-provided content inside thread messages.`,mono:!0})),...t.codeFenceRenderers.filter(e=>e.pluginId===r).map(e=>({key:`code-fence:${e.id}`,label:e.languages.map(e=>`\`\`\`${e}`).join(`, `),detail:`Renders these fenced code blocks inside assistant messages.`,mono:!0}))]}function Is(e){let t=(0,$.c)(12),{plugin:n,configurationPath:r}=e,i=A(),a=_(),o;if(t[0]!==r||t[1]!==n||t[2]!==a||t[3]!==i){let e=a.getQueryData(R($e)),s=Fs(n,i,r),c=t=>{let r=e?.skills.find(e=>e.pluginId===n.id?e.filePath.split(/[\\/]/u).at(-2)===t||e.name===t:!1);return r===void 0?`${nt()}?view=library`:wt({skillId:r.id})},l=e=>n.capabilities.filter(t=>t.kind===e).map(t=>({key:`${t.kind}:${t.id}`,label:t.label,detail:t.detail??void 0,mono:e===`skill`||e===`agent-tool`,destinationPath:e===`theme`?pt(`appearance`):e===`skill`?c(t.id):void 0}));o=[{icon:`AppWindow`,kind:`App surface`,items:s},{icon:`Terminal`,kind:`Command`,items:n.cliCommand?[{key:n.cliCommand.name,label:vs(n.id,n.cliCommand.name),detail:n.cliCommand.summary||void 0,mono:!0}]:[]},{icon:`Explore`,kind:`Skill`,items:l(`skill`)},{icon:`Toolbox`,kind:`Agent tool`,items:l(`agent-tool`)},{icon:`MessageCirclePlus`,kind:`Thread integration`,items:l(`thread-integration`)},{icon:`Palette`,kind:`Theme`,items:l(`theme`)}].flatMap(Rs),t[0]=r,t[1]=n,t[2]=a,t[3]=i,t[4]=o}else o=t[4];let s=o;if(!n.enabled||s.length===0)return null;let c=n.status===`running`||n.status===`degraded`||n.status===`needs-configuration`,l;t[5]===s?l=t[6]:(l=(0,Q.jsx)(Ts,{children:s.map(Ls)}),t[5]=s,t[6]=l);let u;t[7]===c?u=t[8]:(u=c?null:(0,Q.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`This plugin isn't running, so its commands, settings, agent tools, app surfaces, and thread integrations can't be listed.`}),t[7]=c,t[8]=u);let d;return t[9]!==l||t[10]!==u?(d=(0,Q.jsx)(sn,{label:`Capabilities`,children:(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[l,u]})}),t[9]=l,t[10]=u,t[11]=d):d=t[11],d}function Ls(e){return(0,Q.jsx)(Os,{glyph:(0,Q.jsx)(Ds,{icon:e.icon,label:e.kind,className:`text-muted-foreground`}),name:e.destinationPath===void 0?e.label:(0,Q.jsx)(t,{to:e.destinationPath,className:`rounded-sm text-xs underline decoration-border underline-offset-4 transition-colors hover:decoration-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:e.label}),nameClassName:`text-xs`,mono:e.mono,detail:e.detail},e.key)}function Rs(e){let{icon:t,kind:n,items:r}=e;return r.map(e=>({...e,icon:t,kind:n}))}function zs(e){let n=(0,$.c)(26),{plugin:r,runtimeStatus:i,configurationPath:a,onReload:o,reloadPending:s}=e,{settingsSections:c}=A(),l;n[0]!==r.hasSettings||n[1]!==r.id||n[2]!==c?(l=r.hasSettings||c.some(e=>e.pluginId===r.id),n[0]=r.hasSettings,n[1]=r.id,n[2]=c,n[3]=l):l=n[3];let u=l,d=r.status===`needs-configuration`&&u,f;n[4]!==r.hasSettings||n[5]!==r.source||n[6]!==r.status?(f=r.status===`error`||r.status===`degraded`||r.status===`missing`&&r.source.startsWith(`path:`)||r.status===`needs-configuration`&&!r.hasSettings,n[4]=r.hasSettings,n[5]=r.source,n[6]=r.status,n[7]=f):f=n[7];let p=f,m;n[8]!==i.condition||n[9]!==i.recovery?(m=[i.condition,i.recovery].filter(Vs).map(Bs),n[8]=i.condition,n[9]=i.recovery,n[10]=m):m=n[10];let h=m.join(` `),g=r.status===`starting`?`status`:`alert`,_=i.tone===`error`?`destructive`:i.tone,v=d?void 0:h,y=r.status!==`degraded`,b;n[11]!==d||n[12]!==p||n[13]!==a||n[14]!==o||n[15]!==r.id||n[16]!==s?(b=d||p?(0,Q.jsxs)(`span`,{className:`flex items-center gap-2`,children:[d?(0,Q.jsx)(ft,{asChild:!0,variant:`ghost`,size:`sm`,className:`h-7 gap-0.5 px-2.5 text-xs font-normal text-muted-foreground hover:text-foreground [&_[data-icon-root]]:size-3`,children:(0,Q.jsxs)(t,{to:a??te({pluginId:r.id}),children:[`Open settings`,(0,Q.jsx)(q,{name:`ChevronRight`,className:`size-3.5`,"aria-hidden":!0})]})}):null,p?(0,Q.jsx)(nn,{icon:`RotateCcw`,className:`[&_[data-icon-root]]:size-3.5`,label:s?`Reloading…`:`Reload`,loading:s,disabled:s,onClick:o}):null]}):void 0,n[11]=d,n[12]=p,n[13]=a,n[14]=o,n[15]=r.id,n[16]=s,n[17]=b):b=n[17];let x;return n[18]!==i.icon||n[19]!==i.label||n[20]!==g||n[21]!==_||n[22]!==v||n[23]!==y||n[24]!==b?(x=(0,Q.jsx)(bs,{role:g,tone:_,icon:i.icon,title:i.label,detail:v,separator:y,action:b}),n[18]=i.icon,n[19]=i.label,n[20]=g,n[21]=_,n[22]=v,n[23]=y,n[24]=b,n[25]=x):x=n[25],x}function Bs(e){let t=`${e.charAt(0).toUpperCase()}${e.slice(1)}`;return/[.!?]$/u.test(t)?t:`${t}.`}function Vs(e){return e!==null&&e.length>0}function Hs(e){let t=(0,$.c)(16),{plugin:n,runtimeStatus:r,configurationPath:i}=e,o=_(),s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s={showErrorToast:!1},t[0]=s):s=t[0];let c;t[1]===n.id?c=t[2]:(c=()=>ke(fetch,n.id),t[1]=n.id,t[2]=c);let l;t[3]===o?l=t[4]:(l=()=>Ke({queryClient:o}),t[3]=o,t[4]=l);let u;t[5]!==c||t[6]!==l?(u={meta:s,mutationFn:c,onSuccess:l,onError:Us},t[5]=c,t[6]=l,t[7]=u):u=t[7];let d=a(u);if(!(n.enabled&&r!==null)||r===null)return null;let f;t[8]===d?f=t[9]:(f=()=>d.mutate(),t[8]=d,t[9]=f);let p;return t[10]!==i||t[11]!==n||t[12]!==d.isPending||t[13]!==r||t[14]!==f?(p=(0,Q.jsx)(zs,{plugin:n,runtimeStatus:r,configurationPath:i,reloadPending:d.isPending,onReload:f}),t[10]=i,t[11]=n,t[12]=d.isPending,t[13]=r,t[14]=f,t[15]=p):p=t[15],p}function Us(e){Se.error(`Failed to reload plugin`,{description:e instanceof Error?e.message:String(e)})}function Ws(e){let t=(0,$.c)(7),{plugin:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Q.jsxs)(`colgroup`,{children:[(0,Q.jsx)(`col`,{className:Ss}),(0,Q.jsx)(`col`,{})]}),t[0]=r):r=t[0];let i;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(`th`,{scope:`col`,className:X(Cs,`px-4 py-2 font-medium`),children:`Status`}),t[1]=i):i=t[1];let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Q.jsx)(`thead`,{className:`text-xs text-muted-foreground`,children:(0,Q.jsxs)(`tr`,{className:`border-b border-border`,children:[i,(0,Q.jsx)(`th`,{scope:`col`,className:X(Cs,`border-l border-border px-4 py-2 font-medium`),children:`Service`})]})}),t[2]=a):a=t[2];let o;t[3]===n.services?o=t[4]:(o=n.services.map(Gs),t[3]=n.services,t[4]=o);let s;return t[5]===o?s=t[6]:(s=(0,Q.jsx)(`div`,{className:`@container/plugin-detail max-w-full overflow-hidden rounded-lg border border-border bg-card align-top`,children:(0,Q.jsxs)(`table`,{"aria-label":`Background services`,className:`w-full max-w-full table-fixed border-collapse text-left`,children:[r,a,(0,Q.jsx)(`tbody`,{className:`divide-y divide-border`,children:o})]})}),t[5]=o,t[6]=s),s}function Gs(e){let t=js(e.state);return(0,Q.jsxs)(`tr`,{children:[(0,Q.jsx)(`td`,{className:X(`px-4 py-1.5 align-middle text-left`,t.statusClassName),children:(0,Q.jsx)(Jt,{tone:t.tone,children:(0,Q.jsx)(`span`,{className:t.labelClassName,children:t.label})})}),(0,Q.jsx)(`th`,{scope:`row`,className:`break-words border-l border-border px-4 py-1.5 text-left text-sm font-normal leading-snug text-foreground`,children:e.name})]},e.name)}function Ks(e){let t=(0,$.c)(4),{plugin:n}=e,r;t[0]===n.schedules?r=t[1]:(r=n.schedules.map(qs),t[0]=n.schedules,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,Q.jsx)(Ts,{children:r}),t[2]=r,t[3]=i),i}function qs(e){return(0,Q.jsx)(Os,{glyph:(0,Q.jsx)(Ms,{state:e.lastStatus}),name:e.name,detail:e.lastError??`Next ${Qn(e.nextRunAt)}`},e.name)}function Js({marketplace:e,entryId:t}){return e!==`bb-community`||t===null?null:`https://getbb.app/marketplace/${encodeURIComponent(t)}`}function Ys(e){return e===null?[]:[{label:`Copy marketplace link`,icon:`Copy`,onSelect:()=>void le(e,{successMessage:`Marketplace link copied`,errorMessage:`Failed to copy marketplace link.`})}]}function Xs(e){return e.source.startsWith(`path:`)}function Zs(e){return Xs(e)?`Remove from bb`:`Uninstall`}function Qs(e){return Xs(e)?`Remove "${e.id}" from bb and delete its settings, secrets, and schedules? Its source files stay on disk. To move it to another directory, install the new path instead; that keeps its settings.`:`Uninstall "${e.id}" and delete its managed files, settings, secrets, and schedules?`}function $s(e){let t=(0,$.c)(29),{path:n,openDisabled:r,onOpen:i}=e,a;t[0]===n?a=t[1]:(a={text:n,errorMessage:`Failed to copy path.`},t[0]=n,t[1]=a);let{copied:o,copy:s}=M(a),c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Q.jsx)(q,{name:`Folder`,className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":!0}),t[2]=c):c=t[2];let l;t[3]===n?l=t[4]:(l=Dt(n),t[3]=n,t[4]=l);let u;t[5]===l?u=t[6]:(u=(0,Q.jsx)(de,{asChild:!0,children:(0,Q.jsx)(`span`,{tabIndex:0,className:`block truncate rounded-sm font-mono text-xs text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:l})}),t[5]=l,t[6]=u);let d;t[7]===n?d=t[8]:(d=(0,Q.jsx)(O,{className:`max-w-sm break-all`,children:n}),t[7]=n,t[8]=d);let f;t[9]!==u||t[10]!==d?(f=(0,Q.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,Q.jsx)(Pt,{delayDuration:250,children:(0,Q.jsxs)(se,{children:[u,d]})})}),t[9]=u,t[10]=d,t[11]=f):f=t[11];let p=r?`No editor configured`:void 0,m;t[12]!==i||t[13]!==r||t[14]!==p?(m=(0,Q.jsx)(nn,{label:`Open source`,icon:`ExternalLink`,disabled:r,disabledReason:p,onClick:i}),t[12]=i,t[13]=r,t[14]=p,t[15]=m):m=t[15];let h=`Copy plugin path: ${n}`,g=o?`Copied`:`Copy path`,_=o?`Check`:`Copy`,v;t[16]===s?v=t[17]:(v=()=>void s(),t[16]=s,t[17]=v);let y;t[18]!==g||t[19]!==_||t[20]!==v||t[21]!==h?(y=(0,Q.jsx)(nn,{label:h,tooltipLabel:g,icon:_,onClick:v}),t[18]=g,t[19]=_,t[20]=v,t[21]=h,t[22]=y):y=t[22];let b;t[23]!==y||t[24]!==m?(b=(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[m,y]}),t[23]=y,t[24]=m,t[25]=b):b=t[25];let x;return t[26]!==b||t[27]!==f?(x=(0,Q.jsx)(mn,{label:`Source`,children:(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[c,f,b]})}),t[26]=b,t[27]=f,t[28]=x):x=t[28],x}var ec={author:null,marketplace:`bb-official`,publisherLabel:`BB Official`};function tc(e){let t=(0,$.c)(47),{entry:n,onInstall:r,catalogEntries:i,onOpenPlugin:a}=e,o;t[0]===n?o=t[1]:(o=Ln(n),t[0]=n,t[1]=o);let s=o,c=s?.tone===`count`?s:void 0,l;t[2]===n?l=t[3]:(l=F(n),t[2]=n,t[3]=l);let u=l,d=mt(n),{mutate:f}=je(),p;t[4]===n?p=t[5]:(p=Ys(Js(n)),t[4]=n,t[5]=p);let m=p,h;t[6]===n.displayName?h=t[7]:(h=Kn(n.displayName),t[6]=n.displayName,t[7]=h);let g=h,_;t[8]===n?_=t[9]:(_=(0,Q.jsx)(Xn,{entry:n,compact:!0}),t[8]=n,t[9]=_);let v;t[10]===g.tag?v=t[11]:(v=g.tag?(0,Q.jsx)(kn,{tag:g.tag}):void 0,t[10]=g.tag,t[11]=v);let y,b;t[12]===n?(y=t[13],b=t[14]):(y=(0,Q.jsx)(ar,{entry:n}),b=(0,Q.jsx)(as,{entry:n}),t[12]=n,t[13]=y,t[14]=b);let x=u!==null,S;t[15]!==n||t[16]!==r?(S=()=>r(n),t[15]=n,t[16]=r,t[17]=S):S=t[17];let C;t[18]!==f||t[19]!==c||t[20]!==n.displayName||t[21]!==u||t[22]!==d||t[23]!==S||t[24]!==x?(C=(0,Q.jsx)(ji,{displayName:n.displayName,installed:!1,showLabel:!0,disabled:x,unavailableReason:u,count:c,onInstall:S,installJob:d,onCancelInstall:f}),t[18]=f,t[19]=c,t[20]=n.displayName,t[21]=u,t[22]=d,t[23]=S,t[24]=x,t[25]=C):C=t[25];let w;t[26]!==n.displayName||t[27]!==m?(w=m.length===0?void 0:(0,Q.jsx)(an,{label:`${n.displayName} actions`,items:m}),t[26]=n.displayName,t[27]=m,t[28]=w):w=t[28];let T;t[29]===n?T=t[30]:(T=(0,Q.jsx)(ms,{entry:n}),t[29]=n,t[30]=T);let E;t[31]!==i||t[32]!==n||t[33]!==a?(E=(0,Q.jsx)(hs,{entry:n,catalogEntries:i,onOpenPlugin:a}),t[31]=i,t[32]=n,t[33]=a,t[34]=E):E=t[34];let D;t[35]!==T||t[36]!==E?(D=(0,Q.jsxs)(ln,{children:[T,E]}),t[35]=T,t[36]=E,t[37]=D):D=t[37];let O;return t[38]!==g.name||t[39]!==C||t[40]!==w||t[41]!==D||t[42]!==_||t[43]!==v||t[44]!==y||t[45]!==b?(O=(0,Q.jsx)(cn,{maxWidthClassName:`max-w-5xl`,leading:_,leadingClassName:`size-6`,title:g.name,titleMeta:v,metadataLeading:y,metadata:b,actions:C,overflowMenu:w,children:D}),t[38]=g.name,t[39]=C,t[40]=w,t[41]=D,t[42]=_,t[43]=v,t[44]=y,t[45]=b,t[46]=O):O=t[46],O}function nc(e){let t=(0,$.c)(8),{entry:n,onOpenPlugin:r}=e;if(n.incompatibleReason!==null){let e;return t[0]===n.incompatibleReason?e=t[1]:(e=(0,Q.jsx)(bs,{tone:`warning`,icon:`AlertTriangle`,title:`Update bb to install this plugin`,detail:n.incompatibleReason}),t[0]=n.incompatibleReason,t[1]=e),e}if(n.conflictingInstallSource===null)return null;let i=`remove the installed “${n.pluginId}” to install this one.`,a;t[2]!==n.pluginId||t[3]!==r?(a=(0,Q.jsx)(xs,{label:`View installed plugin`,onClick:()=>r(n.pluginId)}),t[2]=n.pluginId,t[3]=r,t[4]=a):a=t[4];let o;return t[5]!==i||t[6]!==a?(o=(0,Q.jsx)(bs,{tone:`warning`,icon:`AlertTriangle`,title:`Another plugin uses this ID`,detail:i,action:a}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function rc(e,t){return e.enabled?ha(e)===null?ic(t)?{plugin:{...e,status:`error`,statusDetail:null}}:null:{plugin:e}:null}function ic(e){return e?.status===`failed`}function ac(e){let t=(0,$.c)(17),{plugin:n,configurationPath:r,catalogEntries:i,onOpenPlugin:a}=e,o=(0,Z.useSyncExternalStore)(Vt,Ht,Ht),s,c;if(t[0]!==i||t[1]!==r||t[2]!==o||t[3]!==n){let e=rc(n,o.get(n.id)),a;if(t[6]!==i||t[7]!==n.id){let e;t[9]===n.id?e=t[10]:(e=e=>e.pluginId===n.id&&e.conflictingInstallSource!==null,t[9]=n.id,t[10]=e),a=i.find(e),t[6]=i,t[7]=n.id,t[8]=a}else a=t[8];s=a,c=e===null?null:(0,Q.jsx)(Hs,{plugin:e.plugin,configurationPath:r,runtimeStatus:ha(e.plugin)}),t[0]=i,t[1]=r,t[2]=o,t[3]=n,t[4]=s,t[5]=c}else s=t[4],c=t[5];let l;t[11]!==a||t[12]!==s?(l=s===void 0?null:(0,Q.jsx)(bs,{tone:`muted`,icon:`Info`,title:`Also published in ${s.marketplaceDisplayName}`,action:(0,Q.jsx)(xs,{label:`View listing`,onClick:()=>a(_e(s))})}),t[11]=a,t[12]=s,t[13]=l):l=t[13];let u;return t[14]!==c||t[15]!==l?(u=(0,Q.jsxs)(Q.Fragment,{children:[c,l]}),t[14]=c,t[15]=l,t[16]=u):u=t[16],u}function oc(e){let t=(0,$.c)(133),{isLoading:n,plugin:r,pending:i,openSourceDisabled:a,onToggle:o,onEdit:s,onOpenSource:c,onDelete:l,catalogEntry:u,catalogEntries:d,onOpenPlugin:f,onConfigure:p,configurationPath:m}=e,h=y(),{settingsSections:g}=A(),_;t[0]===r?_=t[1]:(_=r!==null&&!r.source.startsWith(`builtin:`),t[0]=r,t[1]=_);let v;t[2]===_?v=t[3]:(v={enabled:_},t[2]=_,t[3]=v);let b=oe(r?.id??``,v),x;t[4]===r?x=t[5]:(x=r!==null&&Ma(r),t[4]=r,t[5]=x);let S;if(t[6]===x?S=t[7]:(S={enabled:x},t[6]=x,t[7]=S),D(r?.id??null,S),n){let e;return t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(En,{state:`loading`,message:`Loading plugins`,layout:`detail`,maxWidthClassName:`max-w-5xl`}),t[8]=e):e=t[8],e}if(r===null){let e;return t[9]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(En,{state:`empty`,message:`Plugin not found.`,layout:`detail`,maxWidthClassName:`max-w-5xl`}),t[9]=e):e=t[9],e}let C;t[10]===r?C=t[11]:(C=Ma(r),t[10]=r,t[11]=C);let w=C,T;t[12]===r?T=t[13]:(T=Xs(r),t[12]=r,t[13]=T);let E=T,O;t[14]===r.source?O=t[15]:(O=r.source.startsWith(`builtin:`),t[14]=r.source,t[15]=O);let k=O,j=b.data?.installedAt??null,M;t[16]!==j||t[17]!==b.isPending||t[18]!==k?(M=k?`Updates with bb`:j===null?b.isPending?`Loading…`:`Install date unavailable`:Qn(j),t[16]=j,t[17]=b.isPending,t[18]=k,t[19]=M):M=t[19];let N=M,P=w&&r.updateState.availableVersion!==null,F=w&&(r.updateState.availableVersion!==null||r.updateState.blockedVersion!==null||r.updateState.lastFailure!==null),I;t[20]!==r.hasSettings||t[21]!==r.id||t[22]!==g?(I=r.hasSettings||g.some(e=>e.pluginId===r.id),t[20]=r.hasSettings,t[21]=r.id,t[22]=g,t[23]=I):I=t[23];let L=I,R=r.name??r.id,z;t[24]===R?z=t[25]:(z=Kn(R),t[24]=R,t[25]=z);let B=z,ee;if(t[26]!==E||t[27]!==u||t[28]!==l||t[29]!==s||t[30]!==i||t[31]!==r){let e=Ys(Js(u??{marketplace:r.catalogMarketplaceName,entryId:r.catalogEntryId})),n;t[33]!==E||t[34]!==s||t[35]!==i||t[36]!==r?(n=E?[{label:`Edit`,icon:`Edit`,disabled:i,onSelect:()=>s(r)}]:[],t[33]=E,t[34]=s,t[35]=i,t[36]=r,t[37]=n):n=t[37];let a;t[38]===r?a=t[39]:(a=Zs(r),t[38]=r,t[39]=a);let o=i||r.provenance===`builtin`,c=r.provenance===`builtin`?`Included with BB; disable this plugin instead.`:void 0,d;t[40]!==l||t[41]!==r?(d=()=>l(r),t[40]=l,t[41]=r,t[42]=d):d=t[42];let f;t[43]!==a||t[44]!==o||t[45]!==c||t[46]!==d?(f={label:a,icon:`Trash2`,tone:`destructive`,disabled:o,disabledReason:c,onSelect:d},t[43]=a,t[44]=o,t[45]=c,t[46]=d,t[47]=f):f=t[47],ee=[...e,...n,f],t[26]=E,t[27]=u,t[28]=l,t[29]=s,t[30]=i,t[31]=r,t[32]=ee}else ee=t[32];let V=ee,H=u??(r.provenance===`builtin`||r.catalogMarketplaceName===`bb-official`?ec:void 0),U;t[48]===r?U=t[49]:(U=(0,Q.jsx)(Bn,{plugin:r,className:`size-4`}),t[48]=r,t[49]=U);let W;t[50]===B.tag?W=t[51]:(W=B.tag?(0,Q.jsx)(kn,{tag:B.tag}):void 0,t[50]=B.tag,t[51]=W);let G;t[52]===H?G=t[53]:(G=H===void 0?void 0:(0,Q.jsx)(ar,{entry:H}),t[52]=H,t[53]=G);let ne;t[54]===H?ne=t[55]:(ne=H===void 0?void 0:(0,Q.jsx)(as,{entry:H}),t[54]=H,t[55]=ne);let K;t[56]!==L||t[57]!==h||t[58]!==p||t[59]!==r.id||t[60]!==R?(K=L?(0,Q.jsx)(nn,{label:`${R} settings`,tooltipLabel:`Settings`,icon:`Settings`,onClick:()=>p?p():h(te({pluginId:r.id}))}):void 0,t[56]=L,t[57]=h,t[58]=p,t[59]=r.id,t[60]=R,t[61]=K):K=t[61];let q=`${r.enabled?`Disable`:`Enable`} ${R}`,re;t[62]!==o||t[63]!==r?(re=()=>o(r),t[62]=o,t[63]=r,t[64]=re):re=t[64];let J;t[65]!==i||t[66]!==r.enabled||t[67]!==q||t[68]!==re?(J=(0,Q.jsx)(cr,{checked:r.enabled,disabled:i,"aria-label":q,onCheckedChange:re}),t[65]=i,t[66]=r.enabled,t[67]=q,t[68]=re,t[69]=J):J=t[69];let ie=`${R} actions`,Y;t[70]!==V||t[71]!==ie?(Y=(0,Q.jsx)(an,{label:ie,items:V}),t[70]=V,t[71]=ie,t[72]=Y):Y=t[72];let ae;t[73]!==u||t[74]!==r.description?(ae=u===void 0?(0,Q.jsx)(`section`,{className:`max-w-prose`,"data-resource-detail-section":`overview`,children:(0,Q.jsx)(fs,{description:r.description??`This plugin does not describe itself.`})}):(0,Q.jsx)(ps,{entry:u}),t[73]=u,t[74]=r.description,t[75]=ae):ae=t[75];let se;t[76]!==E||t[77]!==u||t[78]!==c||t[79]!==a||t[80]!==i||t[81]!==r?(se=E?(0,Q.jsx)($s,{path:r.rootDir,openDisabled:i||a,onOpen:()=>c(r)}):u===void 0?null:(0,Q.jsx)(ls,{entry:u}),t[76]=E,t[77]=u,t[78]=c,t[79]=a,t[80]=i,t[81]=r,t[82]=se):se=t[82];let ce;t[83]!==P||t[84]!==r?(ce=P?(0,Q.jsx)(Fa,{plugin:r}):void 0,t[83]=P,t[84]=r,t[85]=ce):ce=t[85];let le;t[86]===u?le=t[87]:(le=u===void 0?null:(0,Q.jsx)(cs,{entry:u}),t[86]=u,t[87]=le);let ue=k?`Delivery`:`Installed`,de;t[88]!==N||t[89]!==ue?(de=(0,Q.jsx)(ss,{label:ue,children:N}),t[88]=N,t[89]=ue,t[90]=de):de=t[90];let fe;t[91]===r.version?fe=t[92]:(fe=(0,Q.jsx)(ss,{label:`Version`,children:(0,Q.jsx)(`span`,{className:`font-mono`,children:r.version})}),t[91]=r.version,t[92]=fe);let pe;t[93]!==le||t[94]!==de||t[95]!==fe?(pe=(0,Q.jsxs)(os,{children:[le,de,fe]}),t[93]=le,t[94]=de,t[95]=fe,t[96]=pe):pe=t[96];let me;t[97]!==F||t[98]!==r?(me=F?(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`p`,{className:`text-2xs font-medium text-subtle-foreground`,children:`Update`}),(0,Q.jsx)(Ia,{plugin:r})]}):null,t[97]=F,t[98]=r,t[99]=me):me=t[99];let he;t[100]!==ce||t[101]!==pe||t[102]!==me?(he=(0,Q.jsxs)(vn,{label:`Details`,actions:ce,children:[pe,me]}),t[100]=ce,t[101]=pe,t[102]=me,t[103]=he):he=t[103];let ge;t[104]!==m||t[105]!==r?(ge=(0,Q.jsx)(Is,{plugin:r,configurationPath:m}),t[104]=m,t[105]=r,t[106]=ge):ge=t[106];let _e;t[107]===r?_e=t[108]:(_e=r.services.length>0?(0,Q.jsx)(on,{label:`Background services`,children:(0,Q.jsx)(Ws,{plugin:r})}):null,t[107]=r,t[108]=_e);let ve;t[109]===r?ve=t[110]:(ve=r.schedules.length>0?(0,Q.jsx)(on,{label:`Scheduled jobs`,children:(0,Q.jsx)(Ks,{plugin:r})}):null,t[109]=r,t[110]=ve);let ye;t[111]!==d||t[112]!==u||t[113]!==f?(ye=u===void 0?null:(0,Q.jsx)(hs,{entry:u,catalogEntries:d,onOpenPlugin:f}),t[111]=d,t[112]=u,t[113]=f,t[114]=ye):ye=t[114];let be;t[115]!==ae||t[116]!==se||t[117]!==he||t[118]!==ge||t[119]!==_e||t[120]!==ve||t[121]!==ye?(be=(0,Q.jsxs)(ln,{children:[ae,se,he,ge,_e,ve,ye]}),t[115]=ae,t[116]=se,t[117]=he,t[118]=ge,t[119]=_e,t[120]=ve,t[121]=ye,t[122]=be):be=t[122];let xe;return t[123]!==B.name||t[124]!==U||t[125]!==W||t[126]!==G||t[127]!==ne||t[128]!==K||t[129]!==J||t[130]!==Y||t[131]!==be?(xe=(0,Q.jsx)(cn,{maxWidthClassName:`max-w-5xl`,leading:U,title:B.name,titleMeta:W,metadataLeading:G,metadata:ne,actions:K,lifecycleControl:J,overflowMenu:Y,children:be}),t[123]=B.name,t[124]=U,t[125]=W,t[126]=G,t[127]=ne,t[128]=K,t[129]=J,t[130]=Y,t[131]=be,t[132]=xe):xe=t[132],xe}function sc(){let e=(0,$.c)(14),t=_(),[n,r]=(0,Z.useState)(null),i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={showErrorToast:!1},e[0]=i):i=e[0];let o;e[1]===t?o=e[2]:(o={meta:i,mutationFn:lc,onSuccess:(e,n)=>(Ve.success(Xs(n)?`Plugin removed from bb`:`Plugin uninstalled`,n,`catalog`),r(null),ze({queryClient:t}),Ke({queryClient:t})),onError:cc},e[1]=t,e[2]=o);let s=a(o),c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=e=>{e.provenance!==`builtin`&&!e.source.startsWith(`builtin:`)&&r(e)},e[3]=c):c=e[3];let l;e[4]===s.isPending?l=e[5]:(l=()=>{s.isPending||r(null)},e[4]=s.isPending,e[5]=l);let u;e[6]!==s||e[7]!==n?(u=()=>{n!==null&&!s.isPending&&s.mutate(n)},e[6]=s,e[7]=n,e[8]=u):u=e[8];let d;return e[9]!==s.isPending||e[10]!==l||e[11]!==u||e[12]!==n?(d={target:n,pending:s.isPending,open:c,close:l,confirm:u},e[9]=s.isPending,e[10]=l,e[11]=u,e[12]=n,e[13]=d):d=e[13],d}function cc(e,t){Ve.error(Xs(t)?`Plugin removal failed`:`Plugin uninstall failed`,t,`installed`,Br(e))}function lc(e){if(e.provenance===`builtin`||e.source.startsWith(`builtin:`))throw Error(`Included plugins cannot be uninstalled.`);return Mt(fetch,e.id)}function uc(e){let t=(0,$.c)(11),{removal:n}=e,r=n.target!==null,i;t[0]===n?i=t[1]:(i=e=>{e||n.close()},t[0]=n,t[1]=i);let a;t[2]!==n.close||t[3]!==n.confirm||t[4]!==n.pending||t[5]!==n.target?(a=n.target===null?null:(0,Q.jsx)(ae,{title:Xs(n.target)?`Remove plugin from bb?`:`Uninstall plugin?`,description:Qs(n.target),confirmLabel:Zs(n.target),pending:n.pending,onConfirm:n.confirm,onCancel:n.close}),t[2]=n.close,t[3]=n.confirm,t[4]=n.pending,t[5]=n.target,t[6]=a):a=t[6];let o;return t[7]!==r||t[8]!==i||t[9]!==a?(o=(0,Q.jsx)(H,{open:r,onOpenChange:i,children:a}),t[7]=r,t[8]=i,t[9]=a,t[10]=o):o=t[10],o}function dc({onOpenPlugin:e,mode:t}={}){let n=y(),r=sc(),{searchParams:i,query:a,requestedSort:o,sortDirection:s,selectedCategories:c,changeSearchParams:l}=kr(),u=Ft({enabled:!0}),d=(0,Z.useMemo)(()=>u.data?.plugins??[],[u.data?.plugins]),f=t??(i.get(`view`)===`installed`?`installed`:`browse`);D(null,{enabled:f===`installed`});let p=i.get(`author`),m=Pe(``,{enabled:f===`installed`}),h=(0,Z.useMemo)(()=>d.map(e=>{let t=V(e,m.data?.entries??[]),n=e.source.startsWith(`path:`);return{plugin:e,entryId:e.id,displayName:e.name??e.id,categoryId:n?`local`:t?.categoryId??e.categoryId,category:n?`Local`:t?.category??e.category,publishedAt:t?.publishedAt,installs:t?.installs??null}}),[d,m.data?.entries]),g=(0,Z.useMemo)(()=>Or(d),[d]),_=i.getAll(`source`).filter(e=>g.some(t=>t.id===e)),v=(0,Z.useMemo)(()=>L(h,c),[h,c]),b=h.some(e=>e.installs!==null),x=o===`most-installed`&&!b?null:o,C=a.trim().toLowerCase(),w=[C,[..._].sort().join(`,`),x,s,[...c].sort().join(`,`)].join(`\0`),[T,E]=(0,Z.useState)({open:!1,initial:null}),O=(0,Z.useMemo)(()=>{let e=h.filter(e=>{if(_.length>0&&!_.includes(Dr(e.plugin))||c.length>0&&!c.includes(me(e)))return!1;if(C.length===0)return!0;let t=e.plugin;return[t.id,t.name??``,t.description??``,t.version,t.sourceDisplay].join(` `).toLowerCase().includes(C)});return x===null?e.map(e=>e.plugin).sort((e,t)=>{let n=Number(e.publisherLabel===null)-Number(t.publisherLabel===null);return n===0?(e.name??e.id).localeCompare(t.name??t.id)||e.id.localeCompare(t.id):n}):pe(e,x,s).map(e=>e.plugin)},[h,_,c,C,x,s]),k=Ge(O,{pageSize:12,resetKey:w}),A=e=>{n(S(),{state:{focusPrompt:!0,initialPrompt:e??`Create a new bb plugin that `,replaceInitialPrompt:e!==void 0}})},j=e=>{let t=d.find(t=>V(t,[e])!==void 0);t!==void 0&&r.open(t)},M=(0,Q.jsx)(zr,{onCreate:A,onInstallFromSource:()=>E({open:!0,initial:null})}),N=e??(e=>n(f===`installed`?bt({pluginId:e,view:`installed`}):xe(e,``))),P;return P=f===`browse`?p===null?(0,Q.jsx)(ra,{onInstall:e=>E({open:!0,initial:e}),onUninstall:j,onOpenPlugin:N,onInstallFromSource:()=>E({open:!0,initial:null})}):(0,Q.jsx)(Da,{authorKey:p,onInstall:e=>E({open:!0,initial:e}),onUninstall:j,onOpenPlugin:N}):(0,Q.jsx)(dn,{scrollId:`plugins-installed-results`,bandClassName:ie,toolbar:(0,Q.jsx)(Bi,{query:a,searchPlaceholder:`Search installed plugins`,selectedCategories:c,categoryOptions:v,sort:x,sortDirection:s,installsKnown:b,changeSearchParams:l,action:M,sourceFilter:{options:g,selectedValues:_,onChange:e=>l(t=>{t.delete(`source`);for(let n of e)t.append(`source`,n)})}}),children:(0,Q.jsxs)(`div`,{className:X(`space-y-3`,ie),children:[(0,Q.jsx)(_a,{plugins:d,onOpenPlugin:N}),u.isError?(0,Q.jsx)(En,{state:`error`,message:`Couldn't load plugins.`,onRetry:()=>void u.refetch()}):u.isFetching&&u.data===void 0?(0,Q.jsx)(En,{state:`loading`,message:`Loading plugins`}):d.length>0&&O.length===0?(0,Q.jsx)(En,{state:`empty`,message:C===``?`No plugins match these filters.`:c.length>0||_.length>0?`No plugins match "${a}" with these filters.`:`No plugins match "${a}"`}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(wa,{plugins:k.items,onOpenPlugin:N}),(0,Q.jsx)(Re,{itemCount:k.items.length,hasMore:k.hasMore,onLoadMore:k.loadMore})]})]})}),(0,Q.jsxs)(Q.Fragment,{children:[f===`browse`?(0,Q.jsx)(`div`,{className:`flex h-full min-h-0 flex-col`,children:P}):(0,Q.jsx)(yn,{id:`plugins-collection`,description:oi,bandClassName:ie,children:P}),(0,Q.jsx)(uc,{removal:r}),(0,Q.jsx)(Hr,{open:T.open,initial:T.initial,onOpenChange:e=>E(t=>({...t,open:e}))})]})}function fc(e){let t=(0,$.c)(4),{pluginId:n}=e,{providers:r}=dr(),i=G().data?.serverAccess;if(!(r??[]).some(e=>e.pluginId===n))return null;let a;t[0]===i?a=t[1]:(a=Dn(i),t[0]=i,t[1]=a);let o;return t[2]===a?o=t[3]:(o=(0,Q.jsx)(pc,{reason:a}),t[2]=a,t[3]=o),o}function pc(e){let n=(0,$.c)(8),{reason:r}=e;if(r===null)return null;let i;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(q,{name:`AlertTriangle`,className:`mt-0.5 size-3.5 shrink-0 text-warning-text`,"aria-hidden":!0}),n[0]=i):i=n[0];let a;n[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Q.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:On}),n[1]=a):a=n[1];let o;n[2]===r?o=n[3]:(o=(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-start gap-2`,children:[i,(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[a,(0,Q.jsx)(`p`,{className:`mt-0.5 text-xs leading-snug text-subtle-foreground`,children:r})]})]}),n[2]=r,n[3]=o);let s;n[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=pt(`machines`),n[4]=s):s=n[4];let c;n[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Q.jsx)(ft,{asChild:!0,size:`sm`,variant:`outline`,className:`w-full shrink-0 @md:w-auto`,children:(0,Q.jsxs)(t,{to:s,children:[`Set up machine access`,(0,Q.jsx)(q,{name:`ArrowRight`})]})}),n[5]=c):c=n[5];let l;return n[6]===o?l=n[7]:(l=(0,Q.jsx)(`div`,{className:`@container w-full`,children:(0,Q.jsxs)(`div`,{role:`alert`,className:`flex flex-col gap-2 rounded-lg border border-border bg-card px-4 py-3 @md:flex-row @md:items-center @md:gap-4`,children:[o,c]})}),n[6]=o,n[7]=l),l}var mc=6,hc=24,gc=Symbol(),_c=`max-h-96 min-h-32 w-full resize-y overflow-y-auto font-mono text-xs field-sizing-content`;function vc(e){let t=e.split(`
2
2
  `).length;return Math.min(hc,Math.max(mc,t+1))}function yc(e){return e.type===`string`&&e.experimental_multiline===!0&&e.secret!==!0}function bc(e){let t=(0,$.c)(18),{ariaDescribedBy:n,ariaInvalid:r,ariaLabel:i,onSelect:a,options:o,valueLabel:s}=e,c;t[0]===s?c=t[1]:(c=(0,Q.jsx)(`span`,{className:`min-w-0 truncate`,children:s}),t[0]=s,t[1]=c);let l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Q.jsx)(q,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`}),t[2]=l):l=t[2];let u;t[3]!==n||t[4]!==r||t[5]!==i||t[6]!==c?(u=(0,Q.jsx)(et,{asChild:!0,children:(0,Q.jsxs)(ft,{variant:`outline`,size:`sm`,className:wr,"aria-label":i,"aria-describedby":n,"aria-invalid":r,children:[c,l]})}),t[3]=n,t[4]=r,t[5]=i,t[6]=c,t[7]=u):u=t[7];let d;if(t[8]!==a||t[9]!==o){let e;t[11]===a?e=t[12]:(e=e=>(0,Q.jsx)(K,{onSelect:()=>a(e.value),children:e.label},e.value),t[11]=a,t[12]=e),d=o.map(e),t[8]=a,t[9]=o,t[10]=d}else d=t[10];let f;t[13]===d?f=t[14]:(f=(0,Q.jsx)(be,{align:`end`,className:Tr,children:d}),t[13]=d,t[14]=f);let p;return t[15]!==u||t[16]!==f?(p=(0,Q.jsxs)(z,{children:[u,f]}),t[15]=u,t[16]=f,t[17]=p):p=t[17],p}function xc(e){let t=(0,$.c)(61),{ariaDescribedBy:n,ariaInvalid:r,descriptor:i,draft:a,onBlur:o,onChange:s,storedValue:c}=e,l=i.type===`project`,u;t[0]===l?u=t[1]:(u={enabled:l},t[0]=l,t[1]=u);let d=ue(u);if(i.type===`boolean`){let e=typeof a==`boolean`?a:typeof c==`boolean`?c:!1,o;return t[2]!==n||t[3]!==r||t[4]!==e||t[5]!==i.label||t[6]!==s?(o=(0,Q.jsx)(cr,{checked:e,onCheckedChange:s,"aria-label":i.label,"aria-describedby":n,"aria-invalid":r}),t[2]=n,t[3]=r,t[4]=e,t[5]=i.label,t[6]=s,t[7]=o):o=t[7],o}if(i.type===`select`){let e=typeof a==`string`?a:typeof c==`string`?c:``,o=i.label,l=e.length>0?i.experimental_optionLabels?.[e]??e:`Select…`,u;if(t[8]!==i.experimental_optionLabels||t[9]!==i.options){let e;t[11]===i.experimental_optionLabels?e=t[12]:(e=e=>({label:i.experimental_optionLabels?.[e]??e,value:e}),t[11]=i.experimental_optionLabels,t[12]=e),u=i.options.map(e),t[8]=i.experimental_optionLabels,t[9]=i.options,t[10]=u}else u=t[10];let d;return t[13]!==n||t[14]!==r||t[15]!==i.label||t[16]!==s||t[17]!==l||t[18]!==u?(d=(0,Q.jsx)(bc,{ariaDescribedBy:n,ariaInvalid:r,ariaLabel:o,valueLabel:l,options:u,onSelect:s}),t[13]=n,t[14]=r,t[15]=i.label,t[16]=s,t[17]=l,t[18]=u,t[19]=d):d=t[19],d}if(i.type===`project`){let e=typeof a==`string`?a:typeof c==`string`?c:``,o=d.data,l;t[20]===o?l=t[21]:(l=o?[{label:o.personalProject.name,value:o.personalProject.id},...o.projects.map(Sc)]:[],t[20]=o,t[21]=l);let u=l,f=u.find(t=>t.value===e)?.label??(e.length>0?e:`Select a project…`),p;return t[22]!==n||t[23]!==r||t[24]!==i.label||t[25]!==s||t[26]!==u||t[27]!==f?(p=(0,Q.jsx)(bc,{ariaDescribedBy:n,ariaInvalid:r,ariaLabel:i.label,valueLabel:f,options:u,onSelect:s}),t[22]=n,t[23]=r,t[24]=i.label,t[25]=s,t[26]=u,t[27]=f,t[28]=p):p=t[28],p}if(i.type===`number`){let e=typeof a==`string`?a:typeof c==`number`?String(c):``,l;t[29]===s?l=t[30]:(l=e=>s(e.target.value),t[29]=s,t[30]=l);let u;return t[31]!==n||t[32]!==r||t[33]!==i.label||t[34]!==o||t[35]!==l||t[36]!==e?(u=(0,Q.jsx)(yt,{type:`number`,inputMode:`decimal`,step:`any`,value:e,"aria-label":i.label,"aria-describedby":n,"aria-invalid":r,onChange:l,onBlur:o,className:`h-7 w-full text-xs @min-[36rem]/settings:w-64`}),t[31]=n,t[32]=r,t[33]=i.label,t[34]=o,t[35]=l,t[36]=e,t[37]=u):u=t[37],u}let f=i.secret===!0,p=f&&typeof c==`object`&&!!c&&`set`in c&&c.set===!0,m=typeof a==`string`?a:!f&&typeof c==`string`?c:``;if(yc(i)){let e=i.label,a;t[38]===m?a=t[39]:(a=vc(m),t[38]=m,t[39]=a);let c;t[40]===s?c=t[41]:(c=e=>s(e.target.value),t[40]=s,t[41]=c);let l;return t[42]!==n||t[43]!==r||t[44]!==i.label||t[45]!==o||t[46]!==a||t[47]!==c||t[48]!==m?(l=(0,Q.jsx)(br,{value:m,"aria-label":e,"aria-describedby":n,"aria-invalid":r,rows:a,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,onChange:c,onBlur:o,className:_c}),t[42]=n,t[43]=r,t[44]=i.label,t[45]=o,t[46]=a,t[47]=c,t[48]=m,t[49]=l):l=t[49],l}let h=f?`password`:`text`,g=f?p?`[set]`:`[not set]`:void 0,_;t[50]===s?_=t[51]:(_=e=>s(e.target.value),t[50]=s,t[51]=_);let v;return t[52]!==n||t[53]!==r||t[54]!==i.label||t[55]!==o||t[56]!==h||t[57]!==g||t[58]!==_||t[59]!==m?(v=(0,Q.jsx)(yt,{type:h,value:m,"aria-label":i.label,"aria-describedby":n,"aria-invalid":r,placeholder:g,onChange:_,onBlur:o,className:`h-7 w-full text-xs @min-[36rem]/settings:w-64`}),t[52]=n,t[53]=r,t[54]=i.label,t[55]=o,t[56]=h,t[57]=g,t[58]=_,t[59]=m,t[60]=v):v=t[60],v}function Sc(e){return{label:e.name,value:e.id}}function Cc(e,t){return e.type===`boolean`?typeof t==`boolean`?t:!1:e.type===`number`?typeof t==`number`?String(t):``:e.type===`string`&&e.secret===!0?``:typeof t==`string`?t:``}function wc(e){let t=(0,$.c)(59),{descriptor:n,pluginId:r,settingKey:i,storedValue:o}=e,s=_(),c=(0,Z.useId)(),l;t[0]!==n||t[1]!==o?(l=Cc(n,o),t[0]=n,t[1]=o,t[2]=l):l=t[2];let u=l,d;t[3]===u?d=t[4]:(d={value:u,hasNewerDraft:!1},t[3]=u,t[4]=d);let[f,p]=(0,Z.useState)(d),m=f.value,h=`plugin-setting:${r}:${i}`,g;t[5]===h?g=t[6]:(g={id:h},t[5]=h,t[6]=g);let v;t[7]!==n.type||t[8]!==r||t[9]!==i?(v=e=>{if(e===gc)throw Error(`Enter a finite number`);let t=e;if(n.type===`number`){let n=typeof e==`string`?e.trim():``,r=Number(n);if(n.length>0&&!Number.isFinite(r))throw Error(`Enter a finite number`);t=n.length===0?null:r}return Fe(fetch,r,{[i]:t})},t[7]=n.type,t[8]=r,t[9]=i,t[10]=v):v=t[10];let y;t[11]!==r||t[12]!==s?(y=e=>{ot({queryClient:s,pluginId:r,view:e}),ge({queryClient:s})},t[11]=r,t[12]=s,t[13]=y):y=t[13];let b;t[14]!==g||t[15]!==v||t[16]!==y?(b={scope:g,mutationFn:v,onSuccess:y},t[14]=g,t[15]=v,t[16]=y,t[17]=b):b=t[17];let x=a(b),S,C;t[18]!==f.hasNewerDraft||t[19]!==u||t[20]!==x.isError||t[21]!==x.isPending?(S=()=>{!f.hasNewerDraft&&!x.isPending&&!x.isError&&p({value:u,hasNewerDraft:!1})},C=[f.hasNewerDraft,u,x.isError,x.isPending],t[18]=f.hasNewerDraft,t[19]=u,t[20]=x.isError,t[21]=x.isPending,t[22]=S,t[23]=C):(S=t[22],C=t[23]),(0,Z.useEffect)(S,C);let w;t[24]!==n.type||t[25]!==x?(w=function(e){p({value:e,hasNewerDraft:n.type===`string`||n.type===`number`}),x.isPending||x.reset(),n.type!==`string`&&n.type!==`number`&&x.mutate(e)},t[24]=n.type,t[25]=x,t[26]=w):w=t[26];let E=w,D;t[27]!==n.secret||t[28]!==n.type||t[29]!==m||t[30]!==u||t[31]!==x||t[32]!==o?(D=function(e){if(!(n.type!==`string`&&n.type!==`number`)){if(n.type===`number`&&e.currentTarget.validity.badInput){p({value:u,hasNewerDraft:!1}),x.mutate(gc);return}if(n.type===`number`){let e=typeof m==`string`?m.trim():``,t=Number(e);if(e.length===0&&o===void 0||e.length>0&&t===o&&!x.isPending){p({value:m,hasNewerDraft:!1});return}}if(m===o&&!x.isPending||n.type===`string`&&n.secret===!0&&m===``){p({value:m,hasNewerDraft:!1});return}p({value:m,hasNewerDraft:!1}),x.mutate(m)}},t[27]=n.secret,t[28]=n.type,t[29]=m,t[30]=u,t[31]=x,t[32]=o,t[33]=D):D=t[33];let O=D,k;t[34]!==x.error||t[35]!==x.isError?(k=x.isError?T({error:x.error,fallbackMessage:`Could not save this setting`}):null,t[34]=x.error,t[35]=x.isError,t[36]=k):k=t[36];let A=k,j=n.type===`string`&&n.secret===!0?`secret`:void 0,M=n.type===`boolean`?`trailing`:yc(n)?`below`:`inline`,N;t[37]===n.description?N=t[38]:(N=n.description===void 0?{}:{description:n.description},t[37]=n.description,t[38]=N);let P=A===null?void 0:c,F=A!==null,I;t[39]!==E||t[40]!==n||t[41]!==m||t[42]!==O||t[43]!==o||t[44]!==P||t[45]!==F?(I=(0,Q.jsx)(xc,{ariaDescribedBy:P,ariaInvalid:F,descriptor:n,storedValue:o,draft:m,onBlur:O,onChange:E}),t[39]=E,t[40]=n,t[41]=m,t[42]=O,t[43]=o,t[44]=P,t[45]=F,t[46]=I):I=t[46];let L;t[47]!==c||t[48]!==A?(L=A===null?null:(0,Q.jsx)(`p`,{id:c,className:`text-xs text-destructive`,role:`alert`,children:A}),t[47]=c,t[48]=A,t[49]=L):L=t[49];let R;t[50]!==I||t[51]!==L?(R=(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[I,L]}),t[50]=I,t[51]=L,t[52]=R):R=t[52];let z;return t[53]!==n.label||t[54]!==j||t[55]!==M||t[56]!==N||t[57]!==R?(z=(0,Q.jsx)(tn,{label:n.label,labelBadge:j,controlPlacement:M,...N,children:R}),t[53]=n.label,t[54]=j,t[55]=M,t[56]=N,t[57]=R,t[58]=z):z=t[58],z}function Tc(e){let t=(0,$.c)(7),{pluginId:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={enabled:!0},t[0]=r):r=t[0];let i=ce(n,r).data??null;if(i===null||Object.keys(i.schema).length===0)return null;let a;t[1]===i.schema?a=t[2]:(a=Object.entries(i.schema),t[1]=i.schema,t[2]=a);let o;return t[3]!==n||t[4]!==a||t[5]!==i.values?(o=(0,Q.jsx)(`div`,{className:`space-y-4`,children:a.map(e=>{let[t,r]=e;return(0,Q.jsx)(wc,{descriptor:r,pluginId:n,settingKey:t,storedValue:i.values[t]},t)})}),t[3]=n,t[4]=a,t[5]=i.values,t[6]=o):o=t[6],o}function Ec(){let e=(0,$.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Q.jsx)(`div`,{className:`flex h-5 items-center`,children:(0,Q.jsx)(Y,{className:`h-3.5 w-40 max-w-[60%]`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Q.jsxs)(`div`,{className:`min-w-0 space-y-2`,children:[t,(0,Q.jsx)(`div`,{className:`flex h-4 items-center`,children:(0,Q.jsx)(Y,{className:`h-3 w-72 max-w-full`})})]}),e[1]=n):n=e[1],n}function Dc(){let e=(0,$.c)(6),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Q.jsx)(`span`,{className:`sr-only`,children:`Loading plugin settings…`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Q.jsx)(Y,{className:`size-9 shrink-0`}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Q.jsx)(`div`,{className:`flex h-7 items-center`,children:(0,Q.jsx)(Y,{className:`h-4 w-44 max-w-full`})}),e[2]=r):r=e[2];let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsxs)(`header`,{className:`flex items-start justify-between gap-4`,children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[n,(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[r,(0,Q.jsx)(`div`,{className:`flex h-4 items-center`,children:(0,Q.jsx)(Y,{className:`h-3 w-80 max-w-full`})})]})]}),(0,Q.jsx)(Y,{className:`h-5 w-9 shrink-0 rounded-full`})]}),e[3]=i):i=e[3];let a;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Q.jsx)(Y,{className:`h-3.5 w-24`}),e[4]=a):a=e[4];let o;return e[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Q.jsxs)(`div`,{className:`mx-auto w-full max-w-5xl`,"data-testid":`plugin-settings-skeleton`,role:`status`,"aria-busy":`true`,children:[t,(0,Q.jsxs)(`div`,{"aria-hidden":!0,children:[i,(0,Q.jsx)(ln,{className:`mt-6`,children:(0,Q.jsx)(Sn,{label:a,children:(0,Q.jsx)(un,{surface:`recessed`,className:`px-3 py-3`,children:(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsx)(Ec,{}),(0,Q.jsx)(Ec,{})]})})})})]})]}),e[5]=o):o=e[5],o}function Oc(e){let t=(0,$.c)(10),{pluginId:n,onBackToDetails:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={enabled:!0},t[0]=i):i=t[0];let a=Ft(i),o;t[1]!==a.data?.plugins||t[2]!==n?(o=a.data?.plugins.find(e=>e.id===n)??null,t[1]=a.data?.plugins,t[2]=n,t[3]=o):o=t[3];let s=o;if(a.data===void 0&&!a.isError){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(Dc,{}),t[4]=e):e=t[4],e}if(a.data===void 0&&a.isError){let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,role:`status`,children:`Could not load plugin settings.`}),t[5]=e):e=t[5],e}if(s===null){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,role:`status`,children:`This plugin is not installed.`}),t[6]=e):e=t[6],e}let c;return t[7]!==r||t[8]!==s?(c=(0,Q.jsx)(Ac,{plugin:s,onBackToDetails:r},s.id),t[7]=r,t[8]=s,t[9]=c):c=t[9],c}function kc(e){let n=(0,$.c)(4),{pluginId:r,onBackToDetails:i}=e,a;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(q,{name:`ChevronLeft`,className:`size-3.5`,"aria-hidden":!0}),`Plugin details`]}),n[0]=a):a=n[0];let o=a,s;return n[1]!==i||n[2]!==r?(s=i?(0,Q.jsx)(ft,{variant:`ghost`,size:`sm`,className:`-ml-2 mb-3 h-7 gap-1 px-2 text-xs font-normal text-muted-foreground hover:text-foreground`,onClick:i,children:o}):(0,Q.jsx)(ft,{variant:`ghost`,size:`sm`,className:`-ml-2 mb-3 h-7 gap-1 px-2 text-xs font-normal text-muted-foreground hover:text-foreground`,asChild:!0,children:(0,Q.jsx)(t,{to:bt({pluginId:r,view:`installed`}),children:o})}),n[1]=i,n[2]=r,n[3]=s):s=n[3],s}function Ac(e){let t=(0,$.c)(47),{plugin:n,onBackToDetails:r}=e,i=_(),{settingsSections:a}=A(),o;t[0]===i?o=t[1]:(o=()=>ge({queryClient:i}),t[0]=i,t[1]=o);let{toggle:s,enabled:c}=Oi(n,o),l;t[2]!==n.hasSettings||t[3]!==n.id||t[4]!==a?(l=n.hasSettings||a.some(e=>e.pluginId===n.id),t[2]=n.hasSettings,t[3]=n.id,t[4]=a,t[5]=l):l=t[5];let u=l,d;t[6]!==r||t[7]!==n.id?(d=(0,Q.jsx)(kc,{pluginId:n.id,onBackToDetails:r}),t[6]=r,t[7]=n.id,t[8]=d):d=t[8];let f;t[9]!==n.icon||t[10]!==n.id?(f=(0,Q.jsx)(`div`,{className:`size-9 shrink-0`,children:(0,Q.jsx)(he,{pluginId:n.id,icon:n.icon,className:`size-full`})}),t[9]=n.icon,t[10]=n.id,t[11]=f):f=t[11];let p=n.name??n.id,m;t[12]===p?m=t[13]:(m=(0,Q.jsx)(`h1`,{className:`truncate text-lg font-semibold text-foreground`,children:p}),t[12]=p,t[13]=m);let h;t[14]===n.description?h=t[15]:(h=n.description?(0,Q.jsx)(sr,{className:`text-xs text-subtle-foreground`,children:n.description}):null,t[14]=n.description,t[15]=h);let g;t[16]!==m||t[17]!==h?(g=(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[m,h]}),t[16]=m,t[17]=h,t[18]=g):g=t[18];let v;t[19]!==f||t[20]!==g?(v=(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[f,g]}),t[19]=f,t[20]=g,t[21]=v):v=t[21];let y;t[22]===s?y=t[23]:(y=e=>s.mutate(e),t[22]=s,t[23]=y);let b=`${c?`Disable`:`Enable`} ${n.id}`,x;t[24]!==c||t[25]!==y||t[26]!==b||t[27]!==s.isPending?(x=(0,Q.jsx)(cr,{className:`mr-[13px] mt-1`,checked:c,disabled:s.isPending,onCheckedChange:y,"aria-label":b}),t[24]=c,t[25]=y,t[26]=b,t[27]=s.isPending,t[28]=x):x=t[28];let S;t[29]!==x||t[30]!==v?(S=(0,Q.jsxs)(`header`,{className:`flex items-start justify-between gap-4`,children:[v,x]}),t[29]=x,t[30]=v,t[31]=S):S=t[31];let C;t[32]!==c||t[33]!==n.enabled||t[34]!==n.id?(C=c&&n.enabled?(0,Q.jsx)(fc,{pluginId:n.id}):null,t[32]=c,t[33]=n.enabled,t[34]=n.id,t[35]=C):C=t[35];let w;t[36]!==c||t[37]!==u||t[38]!==n?(w=c&&n.enabled&&u?(0,Q.jsx)(Sn,{label:`Configuration`,children:(0,Q.jsx)(jc,{plugin:n})}):null,t[36]=c,t[37]=u,t[38]=n,t[39]=w):w=t[39];let T;t[40]!==C||t[41]!==w?(T=(0,Q.jsxs)(ln,{className:`mt-6`,children:[C,w]}),t[40]=C,t[41]=w,t[42]=T):T=t[42];let E;return t[43]!==S||t[44]!==T||t[45]!==d?(E=(0,Q.jsxs)(`div`,{className:`mx-auto w-full max-w-5xl`,children:[d,S,T]}),t[43]=S,t[44]=T,t[45]=d,t[46]=E):E=t[46],E}function jc(e){let t=(0,$.c)(15),{plugin:n}=e,{settingsSections:r}=A(),i=r.some(e=>e.pluginId===n.id),a;t[0]===n?a=t[1]:(a=Ut(n),t[0]=n,t[1]=a);let o=a;if(!n.hasSettings&&!i)return null;let s=`plugin-detail-${n.id}`,c;t[2]!==n.enabled||t[3]!==n.hasSettings||t[4]!==n.id||t[5]!==n.status||t[6]!==o?(c=n.hasSettings||!o?(0,Q.jsx)(un,{surface:`recessed`,className:`px-3 py-3`,children:o?(0,Q.jsx)(Tc,{pluginId:n.id},n.id):(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n.enabled?`Settings are unavailable while the plugin is ${n.status}.`:`Enable this plugin to edit its settings.`})}):null,t[2]=n.enabled,t[3]=n.hasSettings,t[4]=n.id,t[5]=n.status,t[6]=o,t[7]=c):c=t[7];let l;t[8]!==n.id||t[9]!==o?(l=o?(0,Q.jsx)(Nn,{pluginId:n.id}):null,t[8]=n.id,t[9]=o,t[10]=l):l=t[10];let u;return t[11]!==s||t[12]!==c||t[13]!==l?(u=(0,Q.jsxs)(`div`,{className:`space-y-6`,"data-testid":s,children:[c,l]}),t[11]=s,t[12]=c,t[13]=l,t[14]=u):u=t[14],u}var Mc=v({tabs:m(n().min(1)).max(100),activePluginId:n().nullable()}),Nc=f(`bb.plugins.workspace.tabs`,{tabs:[],activePluginId:null},ne({parse:(e,t)=>{if(e===null)return t;try{let n=Mc.safeParse(JSON.parse(e));if(!n.success)return t;let r=[...new Set(n.data.tabs)];return{tabs:r,activePluginId:r.includes(n.data.activePluginId??``)?n.data.activePluginId:null}}catch{return t}},serialize:JSON.stringify}),{getOnInit:!0});function Pc(e){return JSON.stringify(e)}function Fc({name:e,path:t}){return`Edit the bb plugin ${Pc(e)} at ${t}. I want to `}function Ic({id:e,name:t,path:n}){return`Edit the bb skill ${Pc(t)} (ID ${e}) at ${n}. Inspect it with bb skill show ${e} --json and pass that revision to bb skill update when saving. I want to `}function Lc(e){let t=(0,$.c)(13),{label:n,tooltip:r,accessibleLabel:i}=e,a=r===void 0?void 0:0,o;t[0]===n?o=t[1]:(o=(0,Q.jsx)(j,{variant:`outline`,size:`sm`,className:`rounded-md border-border/40 bg-surface-recessed/45 px-2 py-1 text-2xs font-medium leading-none text-subtle-foreground shadow-none`,children:n}),t[0]=n,t[1]=o);let s;t[2]!==i||t[3]!==a||t[4]!==o?(s=(0,Q.jsx)(`span`,{"aria-label":i,tabIndex:a,className:`inline-flex`,children:o}),t[2]=i,t[3]=a,t[4]=o,t[5]=s):s=t[5];let c=s;if(r===void 0)return c;let l;t[6]===c?l=t[7]:(l=(0,Q.jsx)(de,{asChild:!0,children:c}),t[6]=c,t[7]=l);let u;t[8]===r?u=t[9]:(u=(0,Q.jsx)(O,{children:r}),t[8]=r,t[9]=u);let d;return t[10]!==l||t[11]!==u?(d=(0,Q.jsx)(Pt,{delayDuration:250,children:(0,Q.jsxs)(se,{children:[l,u]})}),t[10]=l,t[11]=u,t[12]=d):d=t[12],d}function Rc(e){let t=(0,$.c)(15),{path:n,href:r}=e,i;t[0]===n?i=t[1]:(i={text:n,errorMessage:`Failed to copy path.`},t[0]=n,t[1]=i);let{copied:a,copy:o}=M(i),s;t[2]===n?s=t[3]:(s=Dt(n),t[2]=n,t[3]=s);let c=s,l;t[4]!==a||t[5]!==o||t[6]!==c||t[7]!==r||t[8]!==n?(l=(0,Q.jsx)(de,{asChild:!0,children:r?(0,Q.jsxs)(`a`,{href:r,target:`_blank`,rel:`noreferrer`,"aria-label":`Open ${n} in a new tab`,className:`group -ml-1.5 inline-flex max-w-full cursor-pointer items-center gap-1 rounded-md px-1.5 py-1 text-xs text-subtle-foreground transition-colors hover:bg-state-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:[(0,Q.jsx)(`span`,{className:`truncate font-mono`,children:c}),(0,Q.jsx)(q,{name:`ExternalLink`,className:`size-3 shrink-0`,"aria-hidden":!0})]}):(0,Q.jsxs)(`button`,{type:`button`,"aria-label":`Copy skill path: ${n}`,onClick:()=>void o(),className:`group -ml-1.5 inline-flex max-w-full cursor-pointer items-center gap-1 rounded-md px-1.5 py-1 text-xs text-subtle-foreground transition-colors hover:bg-state-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:[(0,Q.jsx)(`span`,{className:`truncate font-mono`,children:c}),(0,Q.jsx)(q,{name:a?`Check`:`Copy`,className:X(`size-3 shrink-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100`,it),"aria-hidden":!0})]})}),t[4]=a,t[5]=o,t[6]=c,t[7]=r,t[8]=n,t[9]=l):l=t[9];let u=r?`Open on skills.sh`:a?`Copied`:`Copy path`,d;t[10]===u?d=t[11]:(d=(0,Q.jsx)(O,{children:u}),t[10]=u,t[11]=d);let f;return t[12]!==l||t[13]!==d?(f=(0,Q.jsx)(Pt,{delayDuration:250,children:(0,Q.jsxs)(se,{children:[l,d]})}),t[12]=l,t[13]=d,t[14]=f):f=t[14],f}function zc(e){return e.replace(/[\\/]SKILL\.md$/i,``)}function Bc(e){let t=(0,$.c)(9),{files:n,selectedPath:r,onSelectFile:i}=e,a;if(t[0]!==n||t[1]!==i||t[2]!==r){let e;t[4]!==i||t[5]!==r?(e=e=>(0,Q.jsx)(`button`,{type:`button`,"aria-pressed":e===r,onClick:()=>i(e),className:`flex w-full min-w-0 items-center px-3 py-2 text-left font-mono text-xs text-muted-foreground hover:bg-state-hover hover:text-foreground aria-pressed:bg-surface-recessed/45 aria-pressed:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring`,children:(0,Q.jsx)(`span`,{className:`min-w-0 truncate`,children:Dt(e)})},e),t[4]=i,t[5]=r,t[6]=e):e=t[6],a=n.map(e),t[0]=n,t[1]=i,t[2]=r,t[3]=a}else a=t[3];let o;return t[7]===a?o=t[8]:(o=(0,Q.jsx)(hn,{className:`max-h-48 overflow-auto`,children:a}),t[7]=a,t[8]=o),o}var Vc=120;function Hc(e){let t=e.split(`
3
3
  `),n=[],r=[],i=!1;for(let e of t)r.push(e),/^\s*(```|~~~)/u.test(e)&&(i=!i),!i&&r.length>=Vc&&e.trim()===``&&(n.push(r.join(`
4
4
  `)),r=[]);return r.length>0&&n.push(r.join(`