@halcyonlabs/app 0.47.0-halcyon.604 → 0.47.0-halcyon.607

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 (782) hide show
  1. package/app/dist/assets/{AddMachineDialog-BHF-GkBG.js → AddMachineDialog-CG2ZZhp-.js} +1 -1
  2. package/app/dist/assets/AddMachineDialog-CG2ZZhp-.js.br +0 -0
  3. package/app/dist/assets/AddMachineDialog-CG2ZZhp-.js.gz +0 -0
  4. package/app/dist/assets/{AppCommandShortcutHint-7JPI7Au-.js → AppCommandShortcutHint-CCVkbqD1.js} +1 -1
  5. package/app/dist/assets/{AppFileExternalNavigationDispatcher-BNbJsP1g.js → AppFileExternalNavigationDispatcher-DETVZfBW.js} +1 -1
  6. package/app/dist/assets/AppFileExternalNavigationDispatcher-DETVZfBW.js.br +0 -0
  7. package/app/dist/assets/AppFileExternalNavigationDispatcher-DETVZfBW.js.gz +0 -0
  8. package/app/dist/assets/{AppToasterView-DP33gZcS.js → AppToasterView-BpJaGVQ1.js} +1 -1
  9. package/app/dist/assets/{BrowserTabDeck-BlOoU-vR.js → BrowserTabDeck-c6VRKA-g.js} +1 -1
  10. package/app/dist/assets/BrowserTabDeck-c6VRKA-g.js.br +0 -0
  11. package/app/dist/assets/BrowserTabDeck-c6VRKA-g.js.gz +0 -0
  12. package/app/dist/assets/{CommandPaletteBody-CBbTgLrW.js → CommandPaletteBody-BeiWvSTK.js} +1 -1
  13. package/app/dist/assets/CommandPaletteBody-BeiWvSTK.js.br +0 -0
  14. package/app/dist/assets/CommandPaletteBody-BeiWvSTK.js.gz +0 -0
  15. package/app/dist/assets/{DiffHost-DYBSO1_c.js → DiffHost-xesYsZUt.js} +1 -1
  16. package/app/dist/assets/DiffHost-xesYsZUt.js.br +0 -0
  17. package/app/dist/assets/DiffHost-xesYsZUt.js.gz +0 -0
  18. package/app/dist/assets/{ExperimentalFileLinkMenu-DO2lGQoK.js → ExperimentalFileLinkMenu-CDVoETHe.js} +1 -1
  19. package/app/dist/assets/ExperimentalFileLinkMenu-CDVoETHe.js.br +0 -0
  20. package/app/dist/assets/ExperimentalFileLinkMenu-CDVoETHe.js.gz +0 -0
  21. package/app/dist/assets/{FilePreview-ORcgsTax.js → FilePreview-CzacGZ35.js} +1 -1
  22. package/app/dist/assets/FilePreview-CzacGZ35.js.br +0 -0
  23. package/app/dist/assets/FilePreview-CzacGZ35.js.gz +0 -0
  24. package/app/dist/assets/{GitDiffCardHeader-i4vt7tT5.js → GitDiffCardHeader-CJtFaq1K.js} +1 -1
  25. package/app/dist/assets/GitDiffCardHeader-CJtFaq1K.js.br +0 -0
  26. package/app/dist/assets/GitDiffCardHeader-CJtFaq1K.js.gz +0 -0
  27. package/app/dist/assets/{InlineMessageEditorFrame-y089xCLP.js → InlineMessageEditorFrame-C0rqOlNn.js} +1 -1
  28. package/app/dist/assets/InlineMessageEditorFrame-C0rqOlNn.js.br +0 -0
  29. package/app/dist/assets/InlineMessageEditorFrame-C0rqOlNn.js.gz +0 -0
  30. package/app/dist/assets/{MachineLabel-D07WUIMh.js → MachineLabel-vUI5j8ve.js} +1 -1
  31. package/app/dist/assets/MachineLabel-vUI5j8ve.js.br +0 -0
  32. package/app/dist/assets/MachineLabel-vUI5j8ve.js.gz +0 -0
  33. package/app/dist/assets/{MachineRenameDialog-RyrwvNas.js → MachineRenameDialog-CrnZuppe.js} +1 -1
  34. package/app/dist/assets/MachineRenameDialog-CrnZuppe.js.br +0 -0
  35. package/app/dist/assets/MachineRenameDialog-CrnZuppe.js.gz +0 -0
  36. package/app/dist/assets/{MachineSettingsView-Bg6Op62W.js → MachineSettingsView-BR6qseai.js} +1 -1
  37. package/app/dist/assets/MachineSettingsView-BR6qseai.js.br +0 -0
  38. package/app/dist/assets/MachineSettingsView-BR6qseai.js.gz +0 -0
  39. package/app/dist/assets/{MicrophonePreferences-DwsTYfON.js → MicrophonePreferences-wMQ36e_Q.js} +1 -1
  40. package/app/dist/assets/MicrophonePreferences-wMQ36e_Q.js.br +0 -0
  41. package/app/dist/assets/MicrophonePreferences-wMQ36e_Q.js.gz +0 -0
  42. package/app/dist/assets/{ModelReasoningMenu-Dth3XXm8.js → ModelReasoningMenu-Do0jyo5Q.js} +1 -1
  43. package/app/dist/assets/ModelReasoningMenu-Do0jyo5Q.js.br +0 -0
  44. package/app/dist/assets/ModelReasoningMenu-Do0jyo5Q.js.gz +0 -0
  45. package/app/dist/assets/{MoonletDiff-Da65ABAI.js → MoonletDiff-CCvaiEEC.js} +1 -1
  46. package/app/dist/assets/MoonletDiff-CCvaiEEC.js.br +0 -0
  47. package/app/dist/assets/MoonletDiff-CCvaiEEC.js.gz +0 -0
  48. package/app/dist/assets/{MoonletDiffSplit-Phl7m23w.js → MoonletDiffSplit-3xEwFpfu.js} +2 -2
  49. package/app/dist/assets/MoonletDiffSplit-3xEwFpfu.js.br +0 -0
  50. package/app/dist/assets/MoonletDiffSplit-3xEwFpfu.js.gz +0 -0
  51. package/app/dist/assets/{MoonletSourceCode-C5aa88dK.js → MoonletSourceCode-BgaVW-e6.js} +1 -1
  52. package/app/dist/assets/MoonletSourceCode-BgaVW-e6.js.br +0 -0
  53. package/app/dist/assets/MoonletSourceCode-BgaVW-e6.js.gz +0 -0
  54. package/app/dist/assets/{NewTabPage-BKkv1maV.js → NewTabPage-BOqCqqLe.js} +1 -1
  55. package/app/dist/assets/NewTabPage-BOqCqqLe.js.br +0 -0
  56. package/app/dist/assets/NewTabPage-BOqCqqLe.js.gz +0 -0
  57. package/app/dist/assets/{NewThreadComposer-00DY4i8k.js → NewThreadComposer-DyB52pmS.js} +1 -1
  58. package/app/dist/assets/NewThreadComposer-DyB52pmS.js.br +0 -0
  59. package/app/dist/assets/NewThreadComposer-DyB52pmS.js.gz +0 -0
  60. package/app/dist/assets/{OnboardingFlow-GwpuTTqu.js → OnboardingFlow-DTPixZrb.js} +1 -1
  61. package/app/dist/assets/OnboardingFlow-DTPixZrb.js.br +0 -0
  62. package/app/dist/assets/OnboardingFlow-DTPixZrb.js.gz +0 -0
  63. package/app/dist/assets/{OptionPicker-Cy_W5NWS.js → OptionPicker-CxOGHDd8.js} +1 -1
  64. package/app/dist/assets/OptionPicker-CxOGHDd8.js.br +0 -0
  65. package/app/dist/assets/OptionPicker-CxOGHDd8.js.gz +0 -0
  66. package/app/dist/assets/{PaletteShell-CRwrb4lb.js → PaletteShell-BMkwhUdz.js} +1 -1
  67. package/app/dist/assets/PaletteShell-BMkwhUdz.js.br +0 -0
  68. package/app/dist/assets/PaletteShell-BMkwhUdz.js.gz +0 -0
  69. package/app/dist/assets/{PaneMaximizeButton-CMp4cCoZ.js → PaneMaximizeButton-DgXn2p5T.js} +1 -1
  70. package/app/dist/assets/PaneMaximizeButton-DgXn2p5T.js.br +0 -0
  71. package/app/dist/assets/PaneMaximizeButton-DgXn2p5T.js.gz +0 -0
  72. package/app/dist/assets/{PierreLineSelectionActions-BXbCJV8P.js → PierreLineSelectionActions-V_GPrVau.js} +1 -1
  73. package/app/dist/assets/PierreLineSelectionActions-V_GPrVau.js.br +0 -0
  74. package/app/dist/assets/PierreLineSelectionActions-V_GPrVau.js.gz +0 -0
  75. package/app/dist/assets/{PluginPanelRightPanelHost-CuKRaAaL.js → PluginPanelRightPanelHost-CRDSntoM.js} +1 -1
  76. package/app/dist/assets/PluginPanelRightPanelHost-CRDSntoM.js.br +0 -0
  77. package/app/dist/assets/PluginPanelRightPanelHost-CRDSntoM.js.gz +0 -0
  78. package/app/dist/assets/{PluginSettingsSections-DJo5h7Qh.js → PluginSettingsSections-ZnUNrvlJ.js} +1 -1
  79. package/app/dist/assets/PluginSettingsSections-ZnUNrvlJ.js.br +0 -0
  80. package/app/dist/assets/PluginSettingsSections-ZnUNrvlJ.js.gz +0 -0
  81. package/app/dist/assets/{PluginThreadChat-BV6OMCzu.js → PluginThreadChat-DtIyKaqq.js} +1 -1
  82. package/app/dist/assets/PluginThreadChat-DtIyKaqq.js.br +0 -0
  83. package/app/dist/assets/PluginThreadChat-DtIyKaqq.js.gz +0 -0
  84. package/app/dist/assets/{ProjectDetailSettingsView-DdF6YsSg.js → ProjectDetailSettingsView-B3apTKMj.js} +1 -1
  85. package/app/dist/assets/ProjectDetailSettingsView-B3apTKMj.js.br +0 -0
  86. package/app/dist/assets/ProjectDetailSettingsView-B3apTKMj.js.gz +0 -0
  87. package/app/dist/assets/{ProjectMachineSetupDialog-CtbI4XxM.js → ProjectMachineSetupDialog-C43S09Ex.js} +1 -1
  88. package/app/dist/assets/ProjectMachineSetupDialog-C43S09Ex.js.br +0 -0
  89. package/app/dist/assets/ProjectMachineSetupDialog-C43S09Ex.js.gz +0 -0
  90. package/app/dist/assets/{ProjectsSettingsSection-BT1kXbPn.js → ProjectsSettingsSection-CIshX8Xc.js} +1 -1
  91. package/app/dist/assets/ProjectsSettingsSection-CIshX8Xc.js.br +0 -0
  92. package/app/dist/assets/ProjectsSettingsSection-CIshX8Xc.js.gz +0 -0
  93. package/app/dist/assets/{QueuedMessagesList-D1aAchqp.js → QueuedMessagesList-Dh5dxmNK.js} +1 -1
  94. package/app/dist/assets/QueuedMessagesList-Dh5dxmNK.js.br +0 -0
  95. package/app/dist/assets/QueuedMessagesList-Dh5dxmNK.js.gz +0 -0
  96. package/app/dist/assets/{RemotePathBrowser-vPIL8lVm.js → RemotePathBrowser-1A5-qAxD.js} +1 -1
  97. package/app/dist/assets/RemotePathBrowser-1A5-qAxD.js.br +0 -0
  98. package/app/dist/assets/RemotePathBrowser-1A5-qAxD.js.gz +0 -0
  99. package/app/dist/assets/{RootComposeView-DV6JGFlA.js → RootComposeView-BIZpqYG3.js} +1 -1
  100. package/app/dist/assets/RootComposeView-BIZpqYG3.js.br +0 -0
  101. package/app/dist/assets/RootComposeView-BIZpqYG3.js.gz +0 -0
  102. package/app/dist/assets/{SecondaryPanelLayout-BpHDgFJ_.js → SecondaryPanelLayout-BIQDxJLi.js} +1 -1
  103. package/app/dist/assets/SecondaryPanelLayout-BIQDxJLi.js.br +0 -0
  104. package/app/dist/assets/SecondaryPanelLayout-BIQDxJLi.js.gz +0 -0
  105. package/app/dist/assets/{ServerMoveOverlayView-CGkGzv8t.js → ServerMoveOverlayView-BSJahQeB.js} +1 -1
  106. package/app/dist/assets/ServerMoveOverlayView-BSJahQeB.js.br +0 -0
  107. package/app/dist/assets/ServerMoveOverlayView-BSJahQeB.js.gz +0 -0
  108. package/app/dist/assets/{SettingsSidebar-1XC0Uxwo.js → SettingsSidebar-DY_kbv4v.js} +1 -1
  109. package/app/dist/assets/SettingsSidebar-DY_kbv4v.js.br +0 -0
  110. package/app/dist/assets/SettingsSidebar-DY_kbv4v.js.gz +0 -0
  111. package/app/dist/assets/SettingsView-CR1GzBCl.js +7 -0
  112. package/app/dist/assets/SettingsView-CR1GzBCl.js.br +0 -0
  113. package/app/dist/assets/SettingsView-CR1GzBCl.js.gz +0 -0
  114. package/app/dist/assets/{SidebarFooterCustomize-D7sLYPwD.js → SidebarFooterCustomize-pIj856Zr.js} +1 -1
  115. package/app/dist/assets/SidebarFooterCustomize-pIj856Zr.js.br +0 -0
  116. package/app/dist/assets/SidebarFooterCustomize-pIj856Zr.js.gz +0 -0
  117. package/app/dist/assets/{SidebarVisibilityCustomize-DpTzFoGl.js → SidebarVisibilityCustomize-CR7hQOIF.js} +1 -1
  118. package/app/dist/assets/SidebarVisibilityCustomize-CR7hQOIF.js.br +0 -0
  119. package/app/dist/assets/SidebarVisibilityCustomize-CR7hQOIF.js.gz +0 -0
  120. package/app/dist/assets/{SourceCodeHost-DVEXLJK1.js → SourceCodeHost-DkoXO-RM.js} +2 -2
  121. package/app/dist/assets/SourceCodeHost-DkoXO-RM.js.br +0 -0
  122. package/app/dist/assets/SourceCodeHost-DkoXO-RM.js.gz +0 -0
  123. package/app/dist/assets/{SplitWorkspaceRoute-BfxQQdOx.js → SplitWorkspaceRoute-DN3j-Nio.js} +2 -2
  124. package/app/dist/assets/SplitWorkspaceRoute-DN3j-Nio.js.br +0 -0
  125. package/app/dist/assets/SplitWorkspaceRoute-DN3j-Nio.js.gz +0 -0
  126. package/app/dist/assets/{TerminalOutputBlock-COQNamKR.js → TerminalOutputBlock-DKsNjK8s.js} +1 -1
  127. package/app/dist/assets/TerminalOutputBlock-DKsNjK8s.js.br +0 -0
  128. package/app/dist/assets/TerminalOutputBlock-DKsNjK8s.js.gz +0 -0
  129. package/app/dist/assets/{ThreadActionsMenu-064Gcy7T.js → ThreadActionsMenu-BulopjpY.js} +1 -1
  130. package/app/dist/assets/ThreadActionsMenu-BulopjpY.js.br +0 -0
  131. package/app/dist/assets/ThreadActionsMenu-BulopjpY.js.gz +0 -0
  132. package/app/dist/assets/{ThreadDetailView-CjoXzweq.js → ThreadDetailView-C6cu9JmT.js} +3 -3
  133. package/app/dist/assets/ThreadDetailView-C6cu9JmT.js.br +0 -0
  134. package/app/dist/assets/ThreadDetailView-C6cu9JmT.js.gz +0 -0
  135. package/app/dist/assets/{ThreadSearchPaletteMode-CwdePsHK.js → ThreadSearchPaletteMode-D0MKJ8PL.js} +1 -1
  136. package/app/dist/assets/ThreadSearchPaletteMode-D0MKJ8PL.js.br +0 -0
  137. package/app/dist/assets/ThreadSearchPaletteMode-D0MKJ8PL.js.gz +0 -0
  138. package/app/dist/assets/{ThreadSecondaryPanel-CtYtgTla.js → ThreadSecondaryPanel-CzjhigwP.js} +1 -1
  139. package/app/dist/assets/ThreadSecondaryPanel-CzjhigwP.js.br +0 -0
  140. package/app/dist/assets/ThreadSecondaryPanel-CzjhigwP.js.gz +0 -0
  141. package/app/dist/assets/{ThreadSecondaryPanelTabContent-BNQi8b2n.js → ThreadSecondaryPanelTabContent-BX5A98YK.js} +1 -1
  142. package/app/dist/assets/ThreadSecondaryPanelTabContent-BX5A98YK.js.br +0 -0
  143. package/app/dist/assets/ThreadSecondaryPanelTabContent-BX5A98YK.js.gz +0 -0
  144. package/app/dist/assets/{ThreadStatusGlyph-DxxHDn0P.js → ThreadStatusGlyph-BYavMHiP.js} +1 -1
  145. package/app/dist/assets/ThreadStatusGlyph-BYavMHiP.js.br +0 -0
  146. package/app/dist/assets/ThreadStatusGlyph-BYavMHiP.js.gz +0 -0
  147. package/app/dist/assets/{ThreadTerminalPanel-fb5Kk0KG.js → ThreadTerminalPanel-Cfe76daj.js} +1 -1
  148. package/app/dist/assets/ThreadTerminalPanel-Cfe76daj.js.br +0 -0
  149. package/app/dist/assets/ThreadTerminalPanel-Cfe76daj.js.gz +0 -0
  150. package/app/dist/assets/{ThreadTerminalView-BiGdt3Fd.js → ThreadTerminalView-CgMKh6rk.js} +1 -1
  151. package/app/dist/assets/ThreadTerminalView-CgMKh6rk.js.br +0 -0
  152. package/app/dist/assets/ThreadTerminalView-CgMKh6rk.js.gz +0 -0
  153. package/app/dist/assets/{ThreadTimelineNavigationContext-epkIpS1J.js → ThreadTimelineNavigationContext-2--wIUmU.js} +2 -2
  154. package/app/dist/assets/ThreadTimelineNavigationContext-2--wIUmU.js.br +0 -0
  155. package/app/dist/assets/ThreadTimelineNavigationContext-2--wIUmU.js.gz +0 -0
  156. package/app/dist/assets/{ThreadUnarchiveButton-CExEP4wZ.js → ThreadUnarchiveButton-CiDbuPzJ.js} +1 -1
  157. package/app/dist/assets/{TimelineDetailScroll-D8gge5Y9.js → TimelineDetailScroll-DnMC8nYC.js} +1 -1
  158. package/app/dist/assets/TimelineDetailScroll-DnMC8nYC.js.br +0 -0
  159. package/app/dist/assets/TimelineDetailScroll-DnMC8nYC.js.gz +0 -0
  160. package/app/dist/assets/{TimelineFileDiffBlock-BJt7kifl.js → TimelineFileDiffBlock-D8pKEcE0.js} +1 -1
  161. package/app/dist/assets/TimelineFileDiffBlock-D8pKEcE0.js.br +0 -0
  162. package/app/dist/assets/TimelineFileDiffBlock-D8pKEcE0.js.gz +0 -0
  163. package/app/dist/assets/{TimelineSelectionMenu-DrK39LAT.js → TimelineSelectionMenu-DDYrgVgK.js} +1 -1
  164. package/app/dist/assets/TimelineSelectionMenu-DDYrgVgK.js.br +0 -0
  165. package/app/dist/assets/TimelineSelectionMenu-DDYrgVgK.js.gz +0 -0
  166. package/app/dist/assets/{ToolsView-4tUvUv2U.js → ToolsView-CXmmNmMz.js} +1 -1
  167. package/app/dist/assets/ToolsView-CXmmNmMz.js.br +0 -0
  168. package/app/dist/assets/ToolsView-CXmmNmMz.js.gz +0 -0
  169. package/app/dist/assets/{ToolsViewSplits-BWOxgNc1.js → ToolsViewSplits-VIMb0WxO.js} +2 -2
  170. package/app/dist/assets/ToolsViewSplits-VIMb0WxO.js.br +0 -0
  171. package/app/dist/assets/ToolsViewSplits-VIMb0WxO.js.gz +0 -0
  172. package/app/dist/assets/{WaveformVisualizer-C1SzIkiu.js → WaveformVisualizer-CyOfIcDU.js} +1 -1
  173. package/app/dist/assets/WaveformVisualizer-CyOfIcDU.js.br +0 -0
  174. package/app/dist/assets/WaveformVisualizer-CyOfIcDU.js.gz +0 -0
  175. package/app/dist/assets/{absolute-file-path-CbI5cppS.js → absolute-file-path-BxWHDkiV.js} +1 -1
  176. package/app/dist/assets/{app-fixed-tab-navigation-Cv4Tj7xZ.js → app-fixed-tab-navigation-nG5duhr6.js} +1 -1
  177. package/app/dist/assets/app-fixed-tab-navigation-nG5duhr6.js.br +0 -0
  178. package/app/dist/assets/app-fixed-tab-navigation-nG5duhr6.js.gz +0 -0
  179. package/app/dist/assets/{audio-input-device-preference-D8tr0bqw.js → audio-input-device-preference-Civxk2e_.js} +1 -1
  180. package/app/dist/assets/audio-input-device-preference-Civxk2e_.js.br +0 -0
  181. package/app/dist/assets/audio-input-device-preference-Civxk2e_.js.gz +0 -0
  182. package/app/dist/assets/{bottom-anchored-scroll-body-VYrnz8Hl.js → bottom-anchored-scroll-body-izL_2xQo.js} +1 -1
  183. package/app/dist/assets/bottom-anchored-scroll-body-izL_2xQo.js.br +0 -0
  184. package/app/dist/assets/bottom-anchored-scroll-body-izL_2xQo.js.gz +0 -0
  185. package/app/dist/assets/{browser-url-jhAVtSw2.js → browser-url-DQsPFWqd.js} +1 -1
  186. package/app/dist/assets/browser-url-DQsPFWqd.js.br +0 -0
  187. package/app/dist/assets/browser-url-DQsPFWqd.js.gz +0 -0
  188. package/app/dist/assets/{checkbox-qaQbU8-H.js → checkbox-Dxs9oAMl.js} +1 -1
  189. package/app/dist/assets/checkbox-Dxs9oAMl.js.br +0 -0
  190. package/app/dist/assets/checkbox-Dxs9oAMl.js.gz +0 -0
  191. package/app/dist/assets/{code-loading-skeletons-pfQDO26Y.js → code-loading-skeletons-CkiXPS0M.js} +1 -1
  192. package/app/dist/assets/code-loading-skeletons-CkiXPS0M.js.br +0 -0
  193. package/app/dist/assets/code-loading-skeletons-CkiXPS0M.js.gz +0 -0
  194. package/app/dist/assets/{code-rendering-CuFk1qJ1.js → code-rendering-DjLdb6cB.js} +1 -1
  195. package/app/dist/assets/{code-theme-registration-wCS4GRn4.js → code-theme-registration-DWaGQiqG.js} +1 -1
  196. package/app/dist/assets/{detail-card-C3OH86kJ.js → detail-card-BFm1NEQz.js} +1 -1
  197. package/app/dist/assets/detail-card-BFm1NEQz.js.br +0 -0
  198. package/app/dist/assets/detail-card-BFm1NEQz.js.gz +0 -0
  199. package/app/dist/assets/{diff-stats-tally-DkIHmiEl.js → diff-stats-tally-DQHS3tHN.js} +1 -1
  200. package/app/dist/assets/diff-stats-tally-DQHS3tHN.js.br +0 -0
  201. package/app/dist/assets/diff-stats-tally-DQHS3tHN.js.gz +0 -0
  202. package/app/dist/assets/{dist-CWXlD45B.js → dist-DCULoGTS.js} +1 -1
  203. package/app/dist/assets/dist-DCULoGTS.js.br +0 -0
  204. package/app/dist/assets/dist-DCULoGTS.js.gz +0 -0
  205. package/app/dist/assets/{environment-mutations-BrA6u8Ev.js → environment-mutations-Zes88JN-.js} +1 -1
  206. package/app/dist/assets/environment-mutations-Zes88JN-.js.br +0 -0
  207. package/app/dist/assets/environment-mutations-Zes88JN-.js.gz +0 -0
  208. package/app/dist/assets/{environment-workspace-display-0oqBMXMB.js → environment-workspace-display-Blt7U9Mn.js} +3 -3
  209. package/app/dist/assets/environment-workspace-display-Blt7U9Mn.js.br +0 -0
  210. package/app/dist/assets/environment-workspace-display-Blt7U9Mn.js.gz +0 -0
  211. package/app/dist/assets/{event-code-block-BfPSBXNn.js → event-code-block-QXnzoFqm.js} +1 -1
  212. package/app/dist/assets/event-code-block-QXnzoFqm.js.br +0 -0
  213. package/app/dist/assets/event-code-block-QXnzoFqm.js.gz +0 -0
  214. package/app/dist/assets/{expandable-text-01SvfXRm.js → expandable-text-DkUA9RQT.js} +1 -1
  215. package/app/dist/assets/expandable-text-DkUA9RQT.js.br +0 -0
  216. package/app/dist/assets/expandable-text-DkUA9RQT.js.gz +0 -0
  217. package/app/dist/assets/{file-opener-preference-C5_P-Zfr.js → file-opener-preference-CXZHmESv.js} +1 -1
  218. package/app/dist/assets/{file-path-link-Ddg7Fzor.js → file-path-link-D7DFjBWZ.js} +1 -1
  219. package/app/dist/assets/file-path-link-D7DFjBWZ.js.br +0 -0
  220. package/app/dist/assets/file-path-link-D7DFjBWZ.js.gz +0 -0
  221. package/app/dist/assets/{host-mutations-CAtir6jv.js → host-mutations-Fl0RjER0.js} +1 -1
  222. package/app/dist/assets/host-mutations-Fl0RjER0.js.br +0 -0
  223. package/app/dist/assets/host-mutations-Fl0RjER0.js.gz +0 -0
  224. package/app/dist/assets/{icon-extended-D2fR2GTF.js → icon-extended-C0LTNXfN.js} +1 -1
  225. package/app/dist/assets/icon-extended-C0LTNXfN.js.br +0 -0
  226. package/app/dist/assets/icon-extended-C0LTNXfN.js.gz +0 -0
  227. package/app/dist/assets/{image-lightbox-Dhmri6WK.js → image-lightbox-DhNslR-8.js} +1 -1
  228. package/app/dist/assets/image-lightbox-DhNslR-8.js.br +0 -0
  229. package/app/dist/assets/image-lightbox-DhNslR-8.js.gz +0 -0
  230. package/app/dist/assets/index-C2K528W0.css +2 -0
  231. package/app/dist/assets/index-C2K528W0.css.br +0 -0
  232. package/app/dist/assets/index-C2K528W0.css.gz +0 -0
  233. package/app/dist/assets/{index-CfvM6UcU.js → index-DCps_qBD.js} +8 -8
  234. package/app/dist/assets/index-DCps_qBD.js.br +0 -0
  235. package/app/dist/assets/index-DCps_qBD.js.gz +0 -0
  236. package/app/dist/assets/{inline-rename-editor-Bg8SXoZ3.js → inline-rename-editor-nrH2d_Gy.js} +1 -1
  237. package/app/dist/assets/inline-rename-editor-nrH2d_Gy.js.br +0 -0
  238. package/app/dist/assets/inline-rename-editor-nrH2d_Gy.js.gz +0 -0
  239. package/app/dist/assets/{launcherRow-CqPaUYWn.js → launcherRow-CVYGyeOl.js} +1 -1
  240. package/app/dist/assets/launcherRow-CVYGyeOl.js.br +0 -0
  241. package/app/dist/assets/launcherRow-CVYGyeOl.js.gz +0 -0
  242. package/app/dist/assets/{localhost-link-rewrite-description-DP-bXSL8.js → localhost-link-rewrite-description-C0FphFZq.js} +1 -1
  243. package/app/dist/assets/localhost-link-rewrite-description-C0FphFZq.js.br +0 -0
  244. package/app/dist/assets/localhost-link-rewrite-description-C0FphFZq.js.gz +0 -0
  245. package/app/dist/assets/{machine-provider-queries-CoghZyj9.js → machine-provider-queries-BTz8Sz3J.js} +1 -1
  246. package/app/dist/assets/{machine-server-access-Drk0mdHH.js → machine-server-access-CGfd5e1r.js} +1 -1
  247. package/app/dist/assets/{markdown-file-image-routing-BJjI1Te3.js → markdown-file-image-routing-BhGjphhz.js} +1 -1
  248. package/app/dist/assets/{markdown-html-BU8qsXmq.js → markdown-html-CLi3FhDR.js} +1 -1
  249. package/app/dist/assets/markdown-html-CLi3FhDR.js.br +0 -0
  250. package/app/dist/assets/markdown-html-CLi3FhDR.js.gz +0 -0
  251. package/app/dist/assets/{markdown-local-file-link-D-MSnVWD.js → markdown-local-file-link-BROpdQPF.js} +1 -1
  252. package/app/dist/assets/markdown-local-file-link-BROpdQPF.js.br +0 -0
  253. package/app/dist/assets/markdown-local-file-link-BROpdQPF.js.gz +0 -0
  254. package/app/dist/assets/{markdown-preview-BLL1QuNp.js → markdown-preview-CGXXNhJo.js} +3 -3
  255. package/app/dist/assets/markdown-preview-CGXXNhJo.js.br +0 -0
  256. package/app/dist/assets/markdown-preview-CGXXNhJo.js.gz +0 -0
  257. package/app/dist/assets/{markdown-prompt-mentions-B5LVmCbO.js → markdown-prompt-mentions-CPWKCtMa.js} +1 -1
  258. package/app/dist/assets/markdown-prompt-mentions-CPWKCtMa.js.br +0 -0
  259. package/app/dist/assets/markdown-prompt-mentions-CPWKCtMa.js.gz +0 -0
  260. package/app/dist/assets/{model-load-error-message-Dmp1hUNg.js → model-load-error-message-CH_k4E7q.js} +1 -1
  261. package/app/dist/assets/model-load-error-message-CH_k4E7q.js.br +0 -0
  262. package/app/dist/assets/model-load-error-message-CH_k4E7q.js.gz +0 -0
  263. package/app/dist/assets/onboarding-telemetry-BXIyQ5F4.js +1 -0
  264. package/app/dist/assets/{open-in-editor-button-D0wnpT6x.js → open-in-editor-button-tA10Nkqn.js} +1 -1
  265. package/app/dist/assets/open-in-editor-button-tA10Nkqn.js.br +0 -0
  266. package/app/dist/assets/open-in-editor-button-tA10Nkqn.js.gz +0 -0
  267. package/app/dist/assets/{page-shell-CgSxnF9m.js → page-shell-CNCVT3Uj.js} +1 -1
  268. package/app/dist/assets/page-shell-CNCVT3Uj.js.br +0 -0
  269. package/app/dist/assets/page-shell-CNCVT3Uj.js.gz +0 -0
  270. package/app/dist/assets/{pierre-worker-pool-CHGWu76e.js → pierre-worker-pool-pXJFsMd7.js} +1 -1
  271. package/app/dist/assets/pierre-worker-pool-pXJFsMd7.js.br +0 -0
  272. package/app/dist/assets/pierre-worker-pool-pXJFsMd7.js.gz +0 -0
  273. package/app/dist/assets/{plugin-detail-navigation-DuR8_JCx.js → plugin-detail-navigation-SAqiVR3K.js} +1 -1
  274. package/app/dist/assets/plugin-detail-navigation-SAqiVR3K.js.br +0 -0
  275. package/app/dist/assets/plugin-detail-navigation-SAqiVR3K.js.gz +0 -0
  276. package/app/dist/assets/{plugin-frontend-D5ijLuKC.js → plugin-frontend-DoWZV45B.js} +3 -3
  277. package/app/dist/assets/plugin-frontend-DoWZV45B.js.br +0 -0
  278. package/app/dist/assets/plugin-frontend-DoWZV45B.js.gz +0 -0
  279. package/app/dist/assets/{plugin-ui-Dpa8hcuk.js → plugin-ui-Cu8MrXLJ.js} +1 -1
  280. package/app/dist/assets/plugin-ui-Cu8MrXLJ.js.br +0 -0
  281. package/app/dist/assets/plugin-ui-Cu8MrXLJ.js.gz +0 -0
  282. package/app/dist/assets/{project-default-execution-options-query-DfOIRKKL.js → project-default-execution-options-query-gaQEWNK0.js} +1 -1
  283. package/app/dist/assets/{queued-editor-typeahead-layout-Czaq8Cl9.js → queued-editor-typeahead-layout-DTUSPVuA.js} +1 -1
  284. package/app/dist/assets/queued-editor-typeahead-layout-DTUSPVuA.js.br +0 -0
  285. package/app/dist/assets/queued-editor-typeahead-layout-DTUSPVuA.js.gz +0 -0
  286. package/app/dist/assets/{queued-messages-layout-B5xwiued.js → queued-messages-layout-Bj1foecI.js} +1 -1
  287. package/app/dist/assets/queued-messages-layout-Bj1foecI.js.br +0 -0
  288. package/app/dist/assets/queued-messages-layout-Bj1foecI.js.gz +0 -0
  289. package/app/dist/assets/{resource-list-BKpxiO2e.js → resource-list-DLZLjUCf.js} +1 -1
  290. package/app/dist/assets/resource-list-DLZLjUCf.js.br +0 -0
  291. package/app/dist/assets/resource-list-DLZLjUCf.js.gz +0 -0
  292. package/app/dist/assets/root-compose-create-preference-Bv_dFEsH.js +1 -0
  293. package/app/dist/assets/{save-file-CNFl2iiR.js → save-file-B8sl9wgP.js} +1 -1
  294. package/app/dist/assets/{settings-nav-C9-jh_HN.js → settings-nav-D5tWYG52.js} +1 -1
  295. package/app/dist/assets/settings-nav-D5tWYG52.js.br +0 -0
  296. package/app/dist/assets/settings-nav-D5tWYG52.js.gz +0 -0
  297. package/app/dist/assets/{settings-sections-BMr_XU5l.js → settings-sections-Dfo35J2q.js} +1 -1
  298. package/app/dist/assets/settings-sections-Dfo35J2q.js.br +0 -0
  299. package/app/dist/assets/settings-sections-Dfo35J2q.js.gz +0 -0
  300. package/app/dist/assets/{shortcut-pill-_XSUZHxZ.js → shortcut-pill-BMlNncTw.js} +1 -1
  301. package/app/dist/assets/{sidebarTouchSensor-DG_A1RmT.js → sidebarTouchSensor-Da_E8eSx.js} +1 -1
  302. package/app/dist/assets/sidebarTouchSensor-Da_E8eSx.js.br +0 -0
  303. package/app/dist/assets/sidebarTouchSensor-Da_E8eSx.js.gz +0 -0
  304. package/app/dist/assets/{switch-BjJ8825r.js → switch-BRYzbFH-.js} +1 -1
  305. package/app/dist/assets/switch-BRYzbFH-.js.br +0 -0
  306. package/app/dist/assets/switch-BRYzbFH-.js.gz +0 -0
  307. package/app/dist/assets/{textarea-DY_k-BJR.js → textarea-DpRLVuDl.js} +1 -1
  308. package/app/dist/assets/{thread-event-parser-ma5CGP66.js → thread-event-parser-BrLyjs4v.js} +1 -1
  309. package/app/dist/assets/thread-event-parser-BrLyjs4v.js.br +0 -0
  310. package/app/dist/assets/thread-event-parser-BrLyjs4v.js.gz +0 -0
  311. package/app/dist/assets/{thread-panel-queries-BXeOzk_6.js → thread-panel-queries-s8vzntf7.js} +1 -1
  312. package/app/dist/assets/thread-panel-queries-s8vzntf7.js.br +0 -0
  313. package/app/dist/assets/thread-panel-queries-s8vzntf7.js.gz +0 -0
  314. package/app/dist/assets/{thread-runtime-mutations-DmKkyel0.js → thread-runtime-mutations-BOdkZ-H-.js} +1 -1
  315. package/app/dist/assets/thread-runtime-mutations-BOdkZ-H-.js.br +0 -0
  316. package/app/dist/assets/thread-runtime-mutations-BOdkZ-H-.js.gz +0 -0
  317. package/app/dist/assets/{thread-terminal-queries-AFVZ5K6p.js → thread-terminal-queries-Blou76c_.js} +1 -1
  318. package/app/dist/assets/thread-terminal-queries-Blou76c_.js.br +0 -0
  319. package/app/dist/assets/thread-terminal-queries-Blou76c_.js.gz +0 -0
  320. package/app/dist/assets/{threadRecentItems-DXsdcpBk.js → threadRecentItems-BiCe3SkL.js} +1 -1
  321. package/app/dist/assets/threadRecentItems-BiCe3SkL.js.br +0 -0
  322. package/app/dist/assets/threadRecentItems-BiCe3SkL.js.gz +0 -0
  323. package/app/dist/assets/{threadWorkspaceOpenPath-DwKd-s_5.js → threadWorkspaceOpenPath-C9eC_XGN.js} +1 -1
  324. package/app/dist/assets/threadWorkspaceOpenPath-C9eC_XGN.js.br +0 -0
  325. package/app/dist/assets/threadWorkspaceOpenPath-C9eC_XGN.js.gz +0 -0
  326. package/app/dist/assets/{title-bar-scroll-fade-Dw_BPLyx.js → title-bar-scroll-fade-OrK4M84v.js} +1 -1
  327. package/app/dist/assets/title-bar-scroll-fade-OrK4M84v.js.br +0 -0
  328. package/app/dist/assets/title-bar-scroll-fade-OrK4M84v.js.gz +0 -0
  329. package/app/dist/assets/{truncate-start-CGyRoGtG.js → truncate-start-Ck1IPV62.js} +1 -1
  330. package/app/dist/assets/{use-hover-popover-DzrAfLzd.js → use-hover-popover-uokpMJ80.js} +1 -1
  331. package/app/dist/assets/use-hover-popover-uokpMJ80.js.br +0 -0
  332. package/app/dist/assets/use-hover-popover-uokpMJ80.js.gz +0 -0
  333. package/app/dist/assets/{useElementWidth-Kv5FX-9C.js → useElementWidth-EbzKQ0bg.js} +1 -1
  334. package/app/dist/assets/useElementWidth-EbzKQ0bg.js.br +0 -0
  335. package/app/dist/assets/useElementWidth-EbzKQ0bg.js.gz +0 -0
  336. package/app/dist/assets/{useLocalOpenTargets-B7rqz64L.js → useLocalOpenTargets-CtvcdlZg.js} +1 -1
  337. package/app/dist/assets/useLocalOpenTargets-CtvcdlZg.js.br +0 -0
  338. package/app/dist/assets/useLocalOpenTargets-CtvcdlZg.js.gz +0 -0
  339. package/app/dist/assets/{usePanelResizeSnap-Dizp45Ab.js → usePanelResizeSnap-CuwA4rg3.js} +1 -1
  340. package/app/dist/assets/usePanelResizeSnap-CuwA4rg3.js.br +0 -0
  341. package/app/dist/assets/usePanelResizeSnap-CuwA4rg3.js.gz +0 -0
  342. package/app/dist/assets/{usePanelTerminals-ByzphxXd.js → usePanelTerminals-BZhTVWNX.js} +1 -1
  343. package/app/dist/assets/usePanelTerminals-BZhTVWNX.js.br +0 -0
  344. package/app/dist/assets/usePanelTerminals-BZhTVWNX.js.gz +0 -0
  345. package/app/dist/assets/{usePathSuggestions-Bd5UhdCh.js → usePathSuggestions-DZ1XPM_t.js} +1 -1
  346. package/app/dist/assets/usePathSuggestions-DZ1XPM_t.js.br +0 -0
  347. package/app/dist/assets/usePathSuggestions-DZ1XPM_t.js.gz +0 -0
  348. package/app/dist/assets/{useResolvedLiveFileTarget-x5Gd-Gzx.js → useResolvedLiveFileTarget-DlZUgf7A.js} +1 -1
  349. package/app/dist/assets/useResolvedLiveFileTarget-DlZUgf7A.js.br +0 -0
  350. package/app/dist/assets/useResolvedLiveFileTarget-DlZUgf7A.js.gz +0 -0
  351. package/app/dist/assets/{useThreadTerminalController-CUnfO0Da.js → useThreadTerminalController-D4Cr2aY0.js} +1 -1
  352. package/app/dist/assets/useThreadTerminalController-D4Cr2aY0.js.br +0 -0
  353. package/app/dist/assets/useThreadTerminalController-D4Cr2aY0.js.gz +0 -0
  354. package/app/dist/assets/{workspace-change-summary-CLNpSq_E.js → workspace-change-summary-C1EKX0Np.js} +1 -1
  355. package/app/dist/assets/workspace-change-summary-C1EKX0Np.js.br +0 -0
  356. package/app/dist/assets/workspace-change-summary-C1EKX0Np.js.gz +0 -0
  357. package/app/dist/assets/{workspace-checkout-display-Aad1Wxi4.js → workspace-checkout-display-DRAc3j4u.js} +4 -4
  358. package/app/dist/assets/workspace-checkout-display-DRAc3j4u.js.br +0 -0
  359. package/app/dist/assets/workspace-checkout-display-DRAc3j4u.js.gz +0 -0
  360. package/app/dist/index.html +17 -17
  361. package/app/dist/index.html.br +0 -0
  362. package/app/dist/index.html.gz +0 -0
  363. package/dist/bb-app.js +1 -1
  364. package/dist/index.d.ts +64 -64
  365. package/dist/index.js +39 -34
  366. package/host-daemon/dist/bb +2 -2
  367. package/host-daemon/dist/daemon-bundle.mjs +9 -9
  368. package/host-daemon/dist/moonlet +2 -2
  369. package/host-daemon/dist/moonlet-chunks/{browser-LWDG5PCA.js → browser-3YADF5CZ.js} +1 -1
  370. package/host-daemon/dist/moonlet-chunks/{chunk-4BNITW7L.js → chunk-CJVCV7LA.js} +1 -1
  371. package/host-daemon/dist/moonlet-chunks/{chunk-5AOUW4I4.js → chunk-DYWN65E6.js} +1 -1
  372. package/host-daemon/dist/moonlet-chunks/{chunk-GUMXNH56.js → chunk-GJNT53PW.js} +1 -1
  373. package/host-daemon/dist/moonlet-chunks/chunk-MNJOOMMT.js +2 -0
  374. package/host-daemon/dist/moonlet-chunks/{chunk-2QTAZF4P.js → chunk-OZFHGPH4.js} +2 -2
  375. package/host-daemon/dist/moonlet-chunks/{chunk-OW2VWWPF.js → chunk-UASCWFYV.js} +1 -1
  376. package/host-daemon/dist/moonlet-chunks/{chunk-3GDA5QRC.js → chunk-UBCGVKZ2.js} +1 -1
  377. package/host-daemon/dist/moonlet-chunks/{chunk-ZJ3M74CR.js → chunk-UZIJUXRX.js} +1 -1
  378. package/host-daemon/dist/moonlet-chunks/{chunk-I2TDLRZL.js → chunk-VRIDG567.js} +80 -80
  379. package/host-daemon/dist/moonlet-chunks/{chunk-LQ55GYT2.js → chunk-Z7UFAOBI.js} +1 -1
  380. package/host-daemon/dist/moonlet-chunks/{chunk-IRGDLZXQ.js → chunk-ZY4JRPPT.js} +1 -1
  381. package/host-daemon/dist/moonlet-chunks/{client-LVL2RUQ5.js → client-HJ57QVLD.js} +1 -1
  382. package/host-daemon/dist/moonlet-chunks/{commander-errors-RQKAT5HQ.js → commander-errors-VI7J6RNT.js} +1 -1
  383. package/host-daemon/dist/moonlet-chunks/{context-env-74PECPQU.js → context-env-C4YEBBVX.js} +1 -1
  384. package/host-daemon/dist/moonlet-chunks/{context-hints-GQMM7IUB.js → context-hints-FZ224BCX.js} +1 -1
  385. package/host-daemon/dist/moonlet-chunks/{diagnostics-GZNLDKFH.js → diagnostics-OU2KW3CN.js} +1 -1
  386. package/host-daemon/dist/moonlet-chunks/{environment-2OF5OYK6.js → environment-45XH2PJT.js} +1 -1
  387. package/host-daemon/dist/moonlet-chunks/{file-ICBUEP7H.js → file-OHC2H5AH.js} +1 -1
  388. package/host-daemon/dist/moonlet-chunks/{guide-I3LO3KWD.js → guide-T2HEZTCZ.js} +1 -1
  389. package/host-daemon/dist/moonlet-chunks/{machine-ZH4VN36Y.js → machine-7DB7FE7G.js} +1 -1
  390. package/host-daemon/dist/moonlet-chunks/{marketplace-72G2CIZT.js → marketplace-GSP2IPGS.js} +1 -1
  391. package/host-daemon/dist/moonlet-chunks/{permissions-ZKMW6XVA.js → permissions-SOZPETLR.js} +1 -1
  392. package/host-daemon/dist/moonlet-chunks/{plugin-J33MYYP6.js → plugin-672NQWPG.js} +26 -26
  393. package/host-daemon/dist/moonlet-chunks/{plugin-cli-proxy-KK4YO745.js → plugin-cli-proxy-YK6LMDCS.js} +1 -1
  394. package/host-daemon/dist/moonlet-chunks/{project-CAOBT6PT.js → project-KMNJH6RG.js} +1 -1
  395. package/host-daemon/dist/moonlet-chunks/{prompt-history-3CTG22DW.js → prompt-history-H3Y2IHDY.js} +1 -1
  396. package/host-daemon/dist/moonlet-chunks/{provider-T7SNTFH5.js → provider-EKKSYF2D.js} +1 -1
  397. package/host-daemon/dist/moonlet-chunks/{schedule-2G2I4DCW.js → schedule-KVSISSIR.js} +1 -1
  398. package/host-daemon/dist/moonlet-chunks/{server-R3LHIEJF.js → server-53I6IGAP.js} +2 -2
  399. package/host-daemon/dist/moonlet-chunks/{settings-WR7UCFPE.js → settings-MKGSGNIO.js} +1 -1
  400. package/host-daemon/dist/moonlet-chunks/{skill-GHMBJF4G.js → skill-DXINIPQ3.js} +1 -1
  401. package/host-daemon/dist/moonlet-chunks/{status-ES5SEMUE.js → status-BSMUYEAO.js} +1 -1
  402. package/host-daemon/dist/moonlet-chunks/{terminal-45KOGD2U.js → terminal-VKBGZFLN.js} +1 -1
  403. package/host-daemon/dist/moonlet-chunks/{theme-DEIR5VHK.js → theme-3YCCZBGC.js} +1 -1
  404. package/host-daemon/dist/moonlet-chunks/{thread-NNUIM6R7.js → thread-PFBPLD4F.js} +1 -1
  405. package/host-daemon/dist/moonlet-chunks/{updates-23J52P44.js → updates-OO7GE7UB.js} +1 -1
  406. package/host-daemon/dist/moonlet-chunks/{voice-CSQR656B.js → voice-ZJOSAJW7.js} +1 -1
  407. package/package.json +3 -3
  408. package/server/dist/builtin-plugins/account-pool/dist/app.js +9 -9
  409. package/server/dist/builtin-plugins/account-pool/skills/account-pool/SKILL.md +1 -1
  410. package/server/dist/builtin-plugins/agent-annotations/dist/app.js +2 -2
  411. package/server/dist/builtin-plugins/agent-board/dist/THIRD_PARTY_NOTICES.md +3 -3
  412. package/server/dist/builtin-plugins/agent-board/dist/app.js +6 -6
  413. package/server/dist/builtin-plugins/agent-board/dist/server.js +1 -1
  414. package/server/dist/builtin-plugins/ask-user-question/dist/app.js +6 -6
  415. package/server/dist/builtin-plugins/automations/dist/app.js +1 -1
  416. package/server/dist/builtin-plugins/automations/skills/automations/SKILL.md +1 -1
  417. package/server/dist/builtin-plugins/bb-account/dist/app.js +1 -1
  418. package/server/dist/builtin-plugins/bb-account/skills/bb-account/SKILL.md +1 -1
  419. package/server/dist/builtin-plugins/bb-ai/dist/server.js +2 -2
  420. package/server/dist/builtin-plugins/bb-ai/skills/bb-cloud-ai/SKILL.md +1 -1
  421. package/server/dist/builtin-plugins/bb-guide/dist/app.js +1 -1
  422. package/server/dist/builtin-plugins/bb-guide/dist/server.js +2 -2
  423. package/server/dist/builtin-plugins/bb-guide/package.json +2 -2
  424. package/server/dist/builtin-plugins/bb-guide/skills/bb-cli/SKILL.md +3 -3
  425. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/SKILL.md +4 -4
  426. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-cli-agents.md +6 -6
  427. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-events.md +2 -2
  428. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-foundation.md +1 -1
  429. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-sdk.md +1 -1
  430. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/distribution.md +2 -2
  431. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/frontend-components.md +4 -4
  432. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/frontend-core-slots.md +15 -15
  433. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/frontend-hooks-and-ui.md +9 -9
  434. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/providers.md +3 -3
  435. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/quickstart.md +10 -10
  436. package/server/dist/builtin-plugins/bb-guide/skills/skill-creator/SKILL.md +2 -2
  437. package/server/dist/builtin-plugins/bb-guide/skills/submit-a-plugin/SKILL.md +3 -3
  438. package/server/dist/builtin-plugins/bb-guide/skills/submit-a-plugin/references/marketplace-entry.md +8 -8
  439. package/server/dist/builtin-plugins/bb-guide/skills/submit-a-plugin/references/plugin-release.md +1 -1
  440. package/server/dist/builtin-plugins/browser-automation/dist/app.js +1 -1
  441. package/server/dist/builtin-plugins/browser-automation/dist/server.js +2 -2
  442. package/server/dist/builtin-plugins/browser-automation/skills/browser-automation/SKILL.md +3 -3
  443. package/server/dist/builtin-plugins/composer/dist/app.js +4 -4
  444. package/server/dist/builtin-plugins/concurrency-limit/dist/app.js +1 -1
  445. package/server/dist/builtin-plugins/concurrency-limit/skills/concurrency-limit/SKILL.md +1 -1
  446. package/server/dist/builtin-plugins/connect/dist/app.js +2 -2
  447. package/server/dist/builtin-plugins/connect/skills/share-server-links/SKILL.md +1 -1
  448. package/server/dist/builtin-plugins/connect-next/dist/app.js +2 -2
  449. package/server/dist/builtin-plugins/connect-next/dist/server.js +1 -1
  450. package/server/dist/builtin-plugins/connect-next/skills/connect-next/SKILL.md +1 -1
  451. package/server/dist/builtin-plugins/custom-instructions/dist/app.js +1 -1
  452. package/server/dist/builtin-plugins/docs/dist/app.js +3 -3
  453. package/server/dist/builtin-plugins/docs/skills/docs/SKILL.md +1 -1
  454. package/server/dist/builtin-plugins/drafts/dist/app.js +1 -1
  455. package/server/dist/builtin-plugins/environment-git-worktree/dist/app.js +1 -1
  456. package/server/dist/builtin-plugins/environment-modal-sandbox/dist/app.js +1 -1
  457. package/server/dist/builtin-plugins/environment-modal-sandbox/dist/server.js +1 -1
  458. package/server/dist/builtin-plugins/environment-modal-sandbox/skills/modal-sandboxes/SKILL.md +5 -5
  459. package/server/dist/builtin-plugins/environment-project-checkout/dist/app.js +1 -1
  460. package/server/dist/builtin-plugins/github/dist/app.js +2 -2
  461. package/server/dist/builtin-plugins/github/dist/server.js +7 -7
  462. package/server/dist/builtin-plugins/github/package.json +2 -2
  463. package/server/dist/builtin-plugins/github/skills/github-change/SKILL.md +2 -2
  464. package/server/dist/builtin-plugins/github/skills/github-change/references/merging.md +8 -8
  465. package/server/dist/builtin-plugins/github-pr-status/dist/app.js +6 -6
  466. package/server/dist/builtin-plugins/inline-vis/dist/app.js +2 -2
  467. package/server/dist/builtin-plugins/inline-vis/skills/inline-vis/SKILL.md +2 -2
  468. package/server/dist/builtin-plugins/keep-awake/dist/app.js +1 -1
  469. package/server/dist/builtin-plugins/keep-awake/dist/server.js +1 -1
  470. package/server/dist/builtin-plugins/library/dist/app.js +2 -2
  471. package/server/dist/builtin-plugins/mail/skills/mail/SKILL.md +1 -1
  472. package/server/dist/builtin-plugins/marketplace.json +10 -10
  473. package/server/dist/builtin-plugins/mcp/dist/server.js +8 -8
  474. package/server/dist/builtin-plugins/mcp/skills/mcp/SKILL.md +1 -1
  475. package/server/dist/builtin-plugins/memory/dist/app.js +1 -1
  476. package/server/dist/builtin-plugins/memory/dist/server.js +4 -4
  477. package/server/dist/builtin-plugins/memory/skills/memory/SKILL.md +5 -5
  478. package/server/dist/builtin-plugins/monaco-editor/dist/app.js +1 -1
  479. package/server/dist/builtin-plugins/navigation/dist/app.js +1 -1
  480. package/server/dist/builtin-plugins/notify-feed/dist/app.js +3 -3
  481. package/server/dist/builtin-plugins/notify-feed/dist/server.js +2 -2
  482. package/server/dist/builtin-plugins/orbit/dist/app.js +2 -2
  483. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/docs/handoff-to-new-conversation.md +1 -1
  484. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/fixed-runner/linux-x64/manifest.json +4 -4
  485. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/revision +1 -1
  486. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/source.json +1 -1
  487. package/server/dist/builtin-plugins/orbit/dist/assets/plugins/moonlet/back/CLAUDE.md +5 -5
  488. package/server/dist/builtin-plugins/orbit/dist/assets/plugins/moonlet/front/CLAUDE.md +15 -15
  489. package/server/dist/builtin-plugins/orbit/dist/host.js +49 -49
  490. package/server/dist/builtin-plugins/orbit/dist/host.meta.json +1 -1
  491. package/server/dist/builtin-plugins/orbit/dist/server.js +148 -148
  492. package/server/dist/builtin-plugins/pdf-preview/dist/app.js +1 -1
  493. package/server/dist/builtin-plugins/plugin-api-docs/dist/app.js +2 -2
  494. package/server/dist/builtin-plugins/plugin-api-tester/dist/app.js +1 -1
  495. package/server/dist/builtin-plugins/prompt-library/dist/app.js +2 -2
  496. package/server/dist/builtin-plugins/prompt-library/skills/prompt-library/SKILL.md +1 -1
  497. package/server/dist/builtin-plugins/provider-acp/dist/app.js +1 -1
  498. package/server/dist/builtin-plugins/provider-acp/dist/host.js +5 -5
  499. package/server/dist/builtin-plugins/provider-acp/dist/host.meta.json +1 -1
  500. package/server/dist/builtin-plugins/provider-acp/dist/server.js +97 -97
  501. package/server/dist/builtin-plugins/provider-acp/skills/acp-provider/SKILL.md +9 -9
  502. package/server/dist/builtin-plugins/provider-claude-code/dist/app.js +1 -1
  503. package/server/dist/builtin-plugins/provider-claude-code/dist/host.js +3 -3
  504. package/server/dist/builtin-plugins/provider-claude-code/dist/host.meta.json +1 -1
  505. package/server/dist/builtin-plugins/provider-claude-code/dist/server.js +1 -1
  506. package/server/dist/builtin-plugins/provider-codex/dist/app.js +2 -2
  507. package/server/dist/builtin-plugins/provider-codex/dist/host.js +45 -45
  508. package/server/dist/builtin-plugins/provider-codex/dist/host.meta.json +1 -1
  509. package/server/dist/builtin-plugins/provider-codex/dist/server.js +1 -1
  510. package/server/dist/builtin-plugins/provider-pi/dist/app.js +1 -1
  511. package/server/dist/builtin-plugins/provider-pi/skills/pi-provider/SKILL.md +1 -1
  512. package/server/dist/builtin-plugins/provider-retry/dist/app.js +1 -1
  513. package/server/dist/builtin-plugins/provider-retry/skills/provider-retry/SKILL.md +1 -1
  514. package/server/dist/builtin-plugins/provider-usage/dist/app.js +12 -12
  515. package/server/dist/builtin-plugins/push-notifications/dist/app.js +2 -2
  516. package/server/dist/builtin-plugins/push-notifications/skills/push-notifications/SKILL.md +1 -1
  517. package/server/dist/builtin-plugins/scheduled-send/dist/app.js +1 -1
  518. package/server/dist/builtin-plugins/secrets/dist/app.js +1 -1
  519. package/server/dist/builtin-plugins/side-chat/dist/app.js +1 -1
  520. package/server/dist/builtin-plugins/storage-retention/dist/app.js +1 -1
  521. package/server/dist/builtin-plugins/storage-retention/dist/server.js +2 -2
  522. package/server/dist/builtin-plugins/storage-retention/skills/storage-retention/SKILL.md +5 -5
  523. package/server/dist/builtin-plugins/tasks/dist/app.js +4 -4
  524. package/server/dist/builtin-plugins/tasks/skills/tasks/SKILL.md +1 -1
  525. package/server/dist/builtin-plugins/theme-preview/dist/app.js +2 -2
  526. package/server/dist/builtin-plugins/theme-preview/skills/bb-theme-authoring/SKILL.md +1 -1
  527. package/server/dist/builtin-plugins/thread-list/dist/app.js +2 -2
  528. package/server/dist/builtin-plugins/thread-list/dist/server.js +2 -2
  529. package/server/dist/builtin-plugins/workflows/dist/app.js +1 -1
  530. package/server/dist/builtin-plugins/workflows/dist/server.js +4 -4
  531. package/server/dist/builtin-plugins/workflows/skills/workflows/SKILL.md +4 -4
  532. package/server/dist/builtin-plugins/workflows/skills/workflows/references/authoring.md +7 -7
  533. package/server/dist/builtin-skills/bb-cli/SKILL.md +3 -3
  534. package/server/dist/builtin-skills/bb-plugin-authoring/SKILL.md +4 -4
  535. package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-cli-agents.md +6 -6
  536. package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-events.md +2 -2
  537. package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-foundation.md +1 -1
  538. package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-sdk.md +1 -1
  539. package/server/dist/builtin-skills/bb-plugin-authoring/references/distribution.md +2 -2
  540. package/server/dist/builtin-skills/bb-plugin-authoring/references/frontend-components.md +4 -4
  541. package/server/dist/builtin-skills/bb-plugin-authoring/references/frontend-core-slots.md +15 -15
  542. package/server/dist/builtin-skills/bb-plugin-authoring/references/frontend-hooks-and-ui.md +9 -9
  543. package/server/dist/builtin-skills/bb-plugin-authoring/references/providers.md +3 -3
  544. package/server/dist/builtin-skills/bb-plugin-authoring/references/quickstart.md +10 -10
  545. package/server/dist/builtin-skills/skill-creator/SKILL.md +2 -2
  546. package/server/dist/builtin-skills/submit-a-plugin/SKILL.md +3 -3
  547. package/server/dist/builtin-skills/submit-a-plugin/references/marketplace-entry.md +8 -8
  548. package/server/dist/builtin-skills/submit-a-plugin/references/plugin-release.md +1 -1
  549. package/server/dist/start-server.js +75 -70
  550. package/app/dist/assets/AddMachineDialog-BHF-GkBG.js.br +0 -0
  551. package/app/dist/assets/AddMachineDialog-BHF-GkBG.js.gz +0 -0
  552. package/app/dist/assets/AppFileExternalNavigationDispatcher-BNbJsP1g.js.br +0 -0
  553. package/app/dist/assets/AppFileExternalNavigationDispatcher-BNbJsP1g.js.gz +0 -0
  554. package/app/dist/assets/BrowserTabDeck-BlOoU-vR.js.br +0 -0
  555. package/app/dist/assets/BrowserTabDeck-BlOoU-vR.js.gz +0 -0
  556. package/app/dist/assets/CommandPaletteBody-CBbTgLrW.js.br +0 -0
  557. package/app/dist/assets/CommandPaletteBody-CBbTgLrW.js.gz +0 -0
  558. package/app/dist/assets/DiffHost-DYBSO1_c.js.br +0 -0
  559. package/app/dist/assets/DiffHost-DYBSO1_c.js.gz +0 -0
  560. package/app/dist/assets/ExperimentalFileLinkMenu-DO2lGQoK.js.br +0 -0
  561. package/app/dist/assets/ExperimentalFileLinkMenu-DO2lGQoK.js.gz +0 -0
  562. package/app/dist/assets/FilePreview-ORcgsTax.js.br +0 -0
  563. package/app/dist/assets/FilePreview-ORcgsTax.js.gz +0 -0
  564. package/app/dist/assets/GitDiffCardHeader-i4vt7tT5.js.br +0 -0
  565. package/app/dist/assets/GitDiffCardHeader-i4vt7tT5.js.gz +0 -0
  566. package/app/dist/assets/InlineMessageEditorFrame-y089xCLP.js.br +0 -0
  567. package/app/dist/assets/InlineMessageEditorFrame-y089xCLP.js.gz +0 -0
  568. package/app/dist/assets/MachineLabel-D07WUIMh.js.br +0 -0
  569. package/app/dist/assets/MachineLabel-D07WUIMh.js.gz +0 -0
  570. package/app/dist/assets/MachineRenameDialog-RyrwvNas.js.br +0 -0
  571. package/app/dist/assets/MachineRenameDialog-RyrwvNas.js.gz +0 -0
  572. package/app/dist/assets/MachineSettingsView-Bg6Op62W.js.br +0 -0
  573. package/app/dist/assets/MachineSettingsView-Bg6Op62W.js.gz +0 -0
  574. package/app/dist/assets/MicrophonePreferences-DwsTYfON.js.br +0 -0
  575. package/app/dist/assets/MicrophonePreferences-DwsTYfON.js.gz +0 -0
  576. package/app/dist/assets/ModelReasoningMenu-Dth3XXm8.js.br +0 -0
  577. package/app/dist/assets/ModelReasoningMenu-Dth3XXm8.js.gz +0 -0
  578. package/app/dist/assets/MoonletDiff-Da65ABAI.js.br +0 -0
  579. package/app/dist/assets/MoonletDiff-Da65ABAI.js.gz +0 -0
  580. package/app/dist/assets/MoonletDiffSplit-Phl7m23w.js.br +0 -0
  581. package/app/dist/assets/MoonletDiffSplit-Phl7m23w.js.gz +0 -0
  582. package/app/dist/assets/MoonletSourceCode-C5aa88dK.js.br +0 -0
  583. package/app/dist/assets/MoonletSourceCode-C5aa88dK.js.gz +0 -0
  584. package/app/dist/assets/NewTabPage-BKkv1maV.js.br +0 -0
  585. package/app/dist/assets/NewTabPage-BKkv1maV.js.gz +0 -0
  586. package/app/dist/assets/NewThreadComposer-00DY4i8k.js.br +0 -0
  587. package/app/dist/assets/NewThreadComposer-00DY4i8k.js.gz +0 -0
  588. package/app/dist/assets/OnboardingFlow-GwpuTTqu.js.br +0 -0
  589. package/app/dist/assets/OnboardingFlow-GwpuTTqu.js.gz +0 -0
  590. package/app/dist/assets/OptionPicker-Cy_W5NWS.js.br +0 -0
  591. package/app/dist/assets/OptionPicker-Cy_W5NWS.js.gz +0 -0
  592. package/app/dist/assets/PaletteShell-CRwrb4lb.js.br +0 -0
  593. package/app/dist/assets/PaletteShell-CRwrb4lb.js.gz +0 -0
  594. package/app/dist/assets/PaneMaximizeButton-CMp4cCoZ.js.br +0 -0
  595. package/app/dist/assets/PaneMaximizeButton-CMp4cCoZ.js.gz +0 -0
  596. package/app/dist/assets/PierreLineSelectionActions-BXbCJV8P.js.br +0 -0
  597. package/app/dist/assets/PierreLineSelectionActions-BXbCJV8P.js.gz +0 -0
  598. package/app/dist/assets/PluginPanelRightPanelHost-CuKRaAaL.js.br +0 -0
  599. package/app/dist/assets/PluginPanelRightPanelHost-CuKRaAaL.js.gz +0 -0
  600. package/app/dist/assets/PluginSettingsSections-DJo5h7Qh.js.br +0 -0
  601. package/app/dist/assets/PluginSettingsSections-DJo5h7Qh.js.gz +0 -0
  602. package/app/dist/assets/PluginThreadChat-BV6OMCzu.js.br +0 -0
  603. package/app/dist/assets/PluginThreadChat-BV6OMCzu.js.gz +0 -0
  604. package/app/dist/assets/ProjectDetailSettingsView-DdF6YsSg.js.br +0 -0
  605. package/app/dist/assets/ProjectDetailSettingsView-DdF6YsSg.js.gz +0 -0
  606. package/app/dist/assets/ProjectMachineSetupDialog-CtbI4XxM.js.br +0 -0
  607. package/app/dist/assets/ProjectMachineSetupDialog-CtbI4XxM.js.gz +0 -0
  608. package/app/dist/assets/ProjectsSettingsSection-BT1kXbPn.js.br +0 -0
  609. package/app/dist/assets/ProjectsSettingsSection-BT1kXbPn.js.gz +0 -0
  610. package/app/dist/assets/QueuedMessagesList-D1aAchqp.js.br +0 -0
  611. package/app/dist/assets/QueuedMessagesList-D1aAchqp.js.gz +0 -0
  612. package/app/dist/assets/RemotePathBrowser-vPIL8lVm.js.br +0 -0
  613. package/app/dist/assets/RemotePathBrowser-vPIL8lVm.js.gz +0 -0
  614. package/app/dist/assets/RootComposeView-DV6JGFlA.js.br +0 -0
  615. package/app/dist/assets/RootComposeView-DV6JGFlA.js.gz +0 -0
  616. package/app/dist/assets/SecondaryPanelLayout-BpHDgFJ_.js.br +0 -0
  617. package/app/dist/assets/SecondaryPanelLayout-BpHDgFJ_.js.gz +0 -0
  618. package/app/dist/assets/ServerMoveOverlayView-CGkGzv8t.js.br +0 -0
  619. package/app/dist/assets/ServerMoveOverlayView-CGkGzv8t.js.gz +0 -0
  620. package/app/dist/assets/SettingsSidebar-1XC0Uxwo.js.br +0 -0
  621. package/app/dist/assets/SettingsSidebar-1XC0Uxwo.js.gz +0 -0
  622. package/app/dist/assets/SettingsView-BUobmesT.js +0 -7
  623. package/app/dist/assets/SettingsView-BUobmesT.js.br +0 -0
  624. package/app/dist/assets/SettingsView-BUobmesT.js.gz +0 -0
  625. package/app/dist/assets/SidebarFooterCustomize-D7sLYPwD.js.br +0 -0
  626. package/app/dist/assets/SidebarFooterCustomize-D7sLYPwD.js.gz +0 -0
  627. package/app/dist/assets/SidebarVisibilityCustomize-DpTzFoGl.js.br +0 -0
  628. package/app/dist/assets/SidebarVisibilityCustomize-DpTzFoGl.js.gz +0 -0
  629. package/app/dist/assets/SourceCodeHost-DVEXLJK1.js.br +0 -0
  630. package/app/dist/assets/SourceCodeHost-DVEXLJK1.js.gz +0 -0
  631. package/app/dist/assets/SplitWorkspaceRoute-BfxQQdOx.js.br +0 -0
  632. package/app/dist/assets/SplitWorkspaceRoute-BfxQQdOx.js.gz +0 -0
  633. package/app/dist/assets/TerminalOutputBlock-COQNamKR.js.br +0 -0
  634. package/app/dist/assets/TerminalOutputBlock-COQNamKR.js.gz +0 -0
  635. package/app/dist/assets/ThreadActionsMenu-064Gcy7T.js.br +0 -0
  636. package/app/dist/assets/ThreadActionsMenu-064Gcy7T.js.gz +0 -0
  637. package/app/dist/assets/ThreadDetailView-CjoXzweq.js.br +0 -0
  638. package/app/dist/assets/ThreadDetailView-CjoXzweq.js.gz +0 -0
  639. package/app/dist/assets/ThreadSearchPaletteMode-CwdePsHK.js.br +0 -0
  640. package/app/dist/assets/ThreadSearchPaletteMode-CwdePsHK.js.gz +0 -0
  641. package/app/dist/assets/ThreadSecondaryPanel-CtYtgTla.js.br +0 -0
  642. package/app/dist/assets/ThreadSecondaryPanel-CtYtgTla.js.gz +0 -0
  643. package/app/dist/assets/ThreadSecondaryPanelTabContent-BNQi8b2n.js.br +0 -0
  644. package/app/dist/assets/ThreadSecondaryPanelTabContent-BNQi8b2n.js.gz +0 -0
  645. package/app/dist/assets/ThreadStatusGlyph-DxxHDn0P.js.br +0 -0
  646. package/app/dist/assets/ThreadStatusGlyph-DxxHDn0P.js.gz +0 -0
  647. package/app/dist/assets/ThreadTerminalPanel-fb5Kk0KG.js.br +0 -0
  648. package/app/dist/assets/ThreadTerminalPanel-fb5Kk0KG.js.gz +0 -0
  649. package/app/dist/assets/ThreadTerminalView-BiGdt3Fd.js.br +0 -0
  650. package/app/dist/assets/ThreadTerminalView-BiGdt3Fd.js.gz +0 -0
  651. package/app/dist/assets/ThreadTimelineNavigationContext-epkIpS1J.js.br +0 -0
  652. package/app/dist/assets/ThreadTimelineNavigationContext-epkIpS1J.js.gz +0 -0
  653. package/app/dist/assets/TimelineDetailScroll-D8gge5Y9.js.br +0 -0
  654. package/app/dist/assets/TimelineDetailScroll-D8gge5Y9.js.gz +0 -0
  655. package/app/dist/assets/TimelineFileDiffBlock-BJt7kifl.js.br +0 -0
  656. package/app/dist/assets/TimelineFileDiffBlock-BJt7kifl.js.gz +0 -0
  657. package/app/dist/assets/TimelineSelectionMenu-DrK39LAT.js.br +0 -0
  658. package/app/dist/assets/TimelineSelectionMenu-DrK39LAT.js.gz +0 -0
  659. package/app/dist/assets/ToolsView-4tUvUv2U.js.br +0 -0
  660. package/app/dist/assets/ToolsView-4tUvUv2U.js.gz +0 -0
  661. package/app/dist/assets/ToolsViewSplits-BWOxgNc1.js.br +0 -0
  662. package/app/dist/assets/ToolsViewSplits-BWOxgNc1.js.gz +0 -0
  663. package/app/dist/assets/WaveformVisualizer-C1SzIkiu.js.br +0 -0
  664. package/app/dist/assets/WaveformVisualizer-C1SzIkiu.js.gz +0 -0
  665. package/app/dist/assets/app-fixed-tab-navigation-Cv4Tj7xZ.js.br +0 -0
  666. package/app/dist/assets/app-fixed-tab-navigation-Cv4Tj7xZ.js.gz +0 -0
  667. package/app/dist/assets/audio-input-device-preference-D8tr0bqw.js.br +0 -0
  668. package/app/dist/assets/audio-input-device-preference-D8tr0bqw.js.gz +0 -0
  669. package/app/dist/assets/bottom-anchored-scroll-body-VYrnz8Hl.js.br +0 -0
  670. package/app/dist/assets/bottom-anchored-scroll-body-VYrnz8Hl.js.gz +0 -0
  671. package/app/dist/assets/browser-url-jhAVtSw2.js.br +0 -0
  672. package/app/dist/assets/browser-url-jhAVtSw2.js.gz +0 -0
  673. package/app/dist/assets/checkbox-qaQbU8-H.js.br +0 -0
  674. package/app/dist/assets/checkbox-qaQbU8-H.js.gz +0 -0
  675. package/app/dist/assets/code-loading-skeletons-pfQDO26Y.js.br +0 -0
  676. package/app/dist/assets/code-loading-skeletons-pfQDO26Y.js.gz +0 -0
  677. package/app/dist/assets/detail-card-C3OH86kJ.js.br +0 -0
  678. package/app/dist/assets/detail-card-C3OH86kJ.js.gz +0 -0
  679. package/app/dist/assets/diff-stats-tally-DkIHmiEl.js.br +0 -0
  680. package/app/dist/assets/diff-stats-tally-DkIHmiEl.js.gz +0 -0
  681. package/app/dist/assets/dist-CWXlD45B.js.br +0 -0
  682. package/app/dist/assets/dist-CWXlD45B.js.gz +0 -0
  683. package/app/dist/assets/environment-mutations-BrA6u8Ev.js.br +0 -0
  684. package/app/dist/assets/environment-mutations-BrA6u8Ev.js.gz +0 -0
  685. package/app/dist/assets/environment-workspace-display-0oqBMXMB.js.br +0 -0
  686. package/app/dist/assets/environment-workspace-display-0oqBMXMB.js.gz +0 -0
  687. package/app/dist/assets/event-code-block-BfPSBXNn.js.br +0 -0
  688. package/app/dist/assets/event-code-block-BfPSBXNn.js.gz +0 -0
  689. package/app/dist/assets/expandable-text-01SvfXRm.js.br +0 -0
  690. package/app/dist/assets/expandable-text-01SvfXRm.js.gz +0 -0
  691. package/app/dist/assets/file-path-link-Ddg7Fzor.js.br +0 -0
  692. package/app/dist/assets/file-path-link-Ddg7Fzor.js.gz +0 -0
  693. package/app/dist/assets/host-mutations-CAtir6jv.js.br +0 -0
  694. package/app/dist/assets/host-mutations-CAtir6jv.js.gz +0 -0
  695. package/app/dist/assets/icon-extended-D2fR2GTF.js.br +0 -0
  696. package/app/dist/assets/icon-extended-D2fR2GTF.js.gz +0 -0
  697. package/app/dist/assets/image-lightbox-Dhmri6WK.js.br +0 -0
  698. package/app/dist/assets/image-lightbox-Dhmri6WK.js.gz +0 -0
  699. package/app/dist/assets/index-5EQKiTkW.css +0 -2
  700. package/app/dist/assets/index-5EQKiTkW.css.br +0 -0
  701. package/app/dist/assets/index-5EQKiTkW.css.gz +0 -0
  702. package/app/dist/assets/index-CfvM6UcU.js.br +0 -0
  703. package/app/dist/assets/index-CfvM6UcU.js.gz +0 -0
  704. package/app/dist/assets/inline-rename-editor-Bg8SXoZ3.js.br +0 -0
  705. package/app/dist/assets/inline-rename-editor-Bg8SXoZ3.js.gz +0 -0
  706. package/app/dist/assets/launcherRow-CqPaUYWn.js.br +0 -0
  707. package/app/dist/assets/launcherRow-CqPaUYWn.js.gz +0 -0
  708. package/app/dist/assets/localhost-link-rewrite-description-DP-bXSL8.js.br +0 -0
  709. package/app/dist/assets/localhost-link-rewrite-description-DP-bXSL8.js.gz +0 -0
  710. package/app/dist/assets/markdown-html-BU8qsXmq.js.br +0 -0
  711. package/app/dist/assets/markdown-html-BU8qsXmq.js.gz +0 -0
  712. package/app/dist/assets/markdown-local-file-link-D-MSnVWD.js.br +0 -0
  713. package/app/dist/assets/markdown-local-file-link-D-MSnVWD.js.gz +0 -0
  714. package/app/dist/assets/markdown-preview-BLL1QuNp.js.br +0 -0
  715. package/app/dist/assets/markdown-preview-BLL1QuNp.js.gz +0 -0
  716. package/app/dist/assets/markdown-prompt-mentions-B5LVmCbO.js.br +0 -0
  717. package/app/dist/assets/markdown-prompt-mentions-B5LVmCbO.js.gz +0 -0
  718. package/app/dist/assets/model-load-error-message-Dmp1hUNg.js.br +0 -0
  719. package/app/dist/assets/model-load-error-message-Dmp1hUNg.js.gz +0 -0
  720. package/app/dist/assets/onboarding-telemetry-BSt5c7Sg.js +0 -1
  721. package/app/dist/assets/open-in-editor-button-D0wnpT6x.js.br +0 -0
  722. package/app/dist/assets/open-in-editor-button-D0wnpT6x.js.gz +0 -0
  723. package/app/dist/assets/page-shell-CgSxnF9m.js.br +0 -0
  724. package/app/dist/assets/page-shell-CgSxnF9m.js.gz +0 -0
  725. package/app/dist/assets/pierre-worker-pool-CHGWu76e.js.br +0 -0
  726. package/app/dist/assets/pierre-worker-pool-CHGWu76e.js.gz +0 -0
  727. package/app/dist/assets/plugin-detail-navigation-DuR8_JCx.js.br +0 -0
  728. package/app/dist/assets/plugin-detail-navigation-DuR8_JCx.js.gz +0 -0
  729. package/app/dist/assets/plugin-frontend-D5ijLuKC.js.br +0 -0
  730. package/app/dist/assets/plugin-frontend-D5ijLuKC.js.gz +0 -0
  731. package/app/dist/assets/plugin-ui-Dpa8hcuk.js.br +0 -0
  732. package/app/dist/assets/plugin-ui-Dpa8hcuk.js.gz +0 -0
  733. package/app/dist/assets/queued-editor-typeahead-layout-Czaq8Cl9.js.br +0 -0
  734. package/app/dist/assets/queued-editor-typeahead-layout-Czaq8Cl9.js.gz +0 -0
  735. package/app/dist/assets/queued-messages-layout-B5xwiued.js.br +0 -0
  736. package/app/dist/assets/queued-messages-layout-B5xwiued.js.gz +0 -0
  737. package/app/dist/assets/resource-list-BKpxiO2e.js.br +0 -0
  738. package/app/dist/assets/resource-list-BKpxiO2e.js.gz +0 -0
  739. package/app/dist/assets/root-compose-create-preference-BeAvwSHy.js +0 -1
  740. package/app/dist/assets/settings-nav-C9-jh_HN.js.br +0 -0
  741. package/app/dist/assets/settings-nav-C9-jh_HN.js.gz +0 -0
  742. package/app/dist/assets/settings-sections-BMr_XU5l.js.br +0 -0
  743. package/app/dist/assets/settings-sections-BMr_XU5l.js.gz +0 -0
  744. package/app/dist/assets/sidebarTouchSensor-DG_A1RmT.js.br +0 -0
  745. package/app/dist/assets/sidebarTouchSensor-DG_A1RmT.js.gz +0 -0
  746. package/app/dist/assets/switch-BjJ8825r.js.br +0 -0
  747. package/app/dist/assets/switch-BjJ8825r.js.gz +0 -0
  748. package/app/dist/assets/thread-event-parser-ma5CGP66.js.br +0 -0
  749. package/app/dist/assets/thread-event-parser-ma5CGP66.js.gz +0 -0
  750. package/app/dist/assets/thread-panel-queries-BXeOzk_6.js.br +0 -0
  751. package/app/dist/assets/thread-panel-queries-BXeOzk_6.js.gz +0 -0
  752. package/app/dist/assets/thread-runtime-mutations-DmKkyel0.js.br +0 -0
  753. package/app/dist/assets/thread-runtime-mutations-DmKkyel0.js.gz +0 -0
  754. package/app/dist/assets/thread-terminal-queries-AFVZ5K6p.js.br +0 -0
  755. package/app/dist/assets/thread-terminal-queries-AFVZ5K6p.js.gz +0 -0
  756. package/app/dist/assets/threadRecentItems-DXsdcpBk.js.br +0 -0
  757. package/app/dist/assets/threadRecentItems-DXsdcpBk.js.gz +0 -0
  758. package/app/dist/assets/threadWorkspaceOpenPath-DwKd-s_5.js.br +0 -0
  759. package/app/dist/assets/threadWorkspaceOpenPath-DwKd-s_5.js.gz +0 -0
  760. package/app/dist/assets/title-bar-scroll-fade-Dw_BPLyx.js.br +0 -0
  761. package/app/dist/assets/title-bar-scroll-fade-Dw_BPLyx.js.gz +0 -0
  762. package/app/dist/assets/use-hover-popover-DzrAfLzd.js.br +0 -0
  763. package/app/dist/assets/use-hover-popover-DzrAfLzd.js.gz +0 -0
  764. package/app/dist/assets/useElementWidth-Kv5FX-9C.js.br +0 -0
  765. package/app/dist/assets/useElementWidth-Kv5FX-9C.js.gz +0 -0
  766. package/app/dist/assets/useLocalOpenTargets-B7rqz64L.js.br +0 -0
  767. package/app/dist/assets/useLocalOpenTargets-B7rqz64L.js.gz +0 -0
  768. package/app/dist/assets/usePanelResizeSnap-Dizp45Ab.js.br +0 -0
  769. package/app/dist/assets/usePanelResizeSnap-Dizp45Ab.js.gz +0 -0
  770. package/app/dist/assets/usePanelTerminals-ByzphxXd.js.br +0 -0
  771. package/app/dist/assets/usePanelTerminals-ByzphxXd.js.gz +0 -0
  772. package/app/dist/assets/usePathSuggestions-Bd5UhdCh.js.br +0 -0
  773. package/app/dist/assets/usePathSuggestions-Bd5UhdCh.js.gz +0 -0
  774. package/app/dist/assets/useResolvedLiveFileTarget-x5Gd-Gzx.js.br +0 -0
  775. package/app/dist/assets/useResolvedLiveFileTarget-x5Gd-Gzx.js.gz +0 -0
  776. package/app/dist/assets/useThreadTerminalController-CUnfO0Da.js.br +0 -0
  777. package/app/dist/assets/useThreadTerminalController-CUnfO0Da.js.gz +0 -0
  778. package/app/dist/assets/workspace-change-summary-CLNpSq_E.js.br +0 -0
  779. package/app/dist/assets/workspace-change-summary-CLNpSq_E.js.gz +0 -0
  780. package/app/dist/assets/workspace-checkout-display-Aad1Wxi4.js.br +0 -0
  781. package/app/dist/assets/workspace-checkout-display-Aad1Wxi4.js.gz +0 -0
  782. package/host-daemon/dist/moonlet-chunks/chunk-4XWRV5U3.js +0 -2
@@ -1 +1 @@
1
- var er=Object.defineProperty;var tr=(e,t)=>{for(var o in t)er(e,o,{get:t[o],enumerable:!0})};var Dt=globalThis.__bbPluginRuntime;if(Dt==null||Dt.sonner==null)throw new Error('Cannot load "sonner": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Ue=Dt.sonner,yi="default"in Ue?Ue.default:Ue,{Toaster:Ci,toast:J,useSonner:wi}=Ue;var $={};tr($,{Activity:()=>or,Children:()=>Ee,Component:()=>rr,Fragment:()=>Ie,Profiler:()=>ar,PureComponent:()=>ir,StrictMode:()=>sr,Suspense:()=>lr,act:()=>cr,cache:()=>dr,cacheSignal:()=>ur,captureOwnerStack:()=>pr,cloneElement:()=>Ce,createContext:()=>q,createElement:()=>In,createRef:()=>mr,default:()=>nr,forwardRef:()=>N,isValidElement:()=>Te,lazy:()=>fr,memo:()=>hr,startTransition:()=>vr,unstable_useCacheRefresh:()=>gr,use:()=>br,useActionState:()=>xr,useCallback:()=>I,useContext:()=>Q,useDebugValue:()=>Rr,useDeferredValue:()=>yr,useEffect:()=>A,useEffectEvent:()=>Cr,useId:()=>ge,useImperativeHandle:()=>wr,useInsertionEffect:()=>Sr,useLayoutEffect:()=>ce,useMemo:()=>ee,useOptimistic:()=>Nr,useReducer:()=>Ge,useRef:()=>T,useState:()=>D,useSyncExternalStore:()=>It,useTransition:()=>Pr,version:()=>Er});var Mt=globalThis.__bbPluginRuntime;if(Mt==null||Mt.react==null)throw new Error('Cannot load "react": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var je=Mt.react,nr="default"in je?je.default:je,{Activity:or,Children:Ee,Component:rr,Fragment:Ie,Profiler:ar,PureComponent:ir,StrictMode:sr,Suspense:lr,act:cr,cache:dr,cacheSignal:ur,captureOwnerStack:pr,cloneElement:Ce,createContext:q,createElement:In,createRef:mr,forwardRef:N,isValidElement:Te,lazy:fr,memo:hr,startTransition:vr,unstable_useCacheRefresh:gr,use:br,useActionState:xr,useCallback:I,useContext:Q,useDebugValue:Rr,useDeferredValue:yr,useEffect:A,useEffectEvent:Cr,useId:ge,useImperativeHandle:wr,useInsertionEffect:Sr,useLayoutEffect:ce,useMemo:ee,useOptimistic:Nr,useReducer:Ge,useRef:T,useState:D,useSyncExternalStore:It,useTransition:Pr,version:Er}=je;var Ot=globalThis.__bbPluginRuntime;if(Ot==null||Ot.pluginSdkApp==null)throw new Error('Cannot load "@get-bb/plugin-sdk/app": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Ye=Ot.pluginSdkApp,Ni="default"in Ye?Ye.default:Ye,{Markdown:Pi,ThreadChat:Ei,ThreadTitle:Ti,UrlLink:ki,definePluginApp:On,experimental_BranchPicker:_i,experimental_ComposerRoot:Di,experimental_DetailRow:Mi,experimental_Diff:Ii,experimental_FailedVoiceRecordings:Oi,experimental_FileLink:Ai,experimental_Icon:Qe,experimental_ImageLightbox:Li,experimental_InfoList:Bi,experimental_InfoListRow:Hi,experimental_InfoSection:$i,experimental_NewThreadComposer:Fi,experimental_PermissionModePicker:zi,experimental_PluginIcon:Vi,experimental_PluginRpcCallError:Wi,experimental_PromptMentionIcon:Ki,experimental_ProviderIcon:Ui,experimental_ProviderModelPicker:ji,experimental_SettingsRow:Gi,experimental_SettingsSection:Yi,experimental_ShortcutHint:Qi,experimental_SidebarNavigationIcon:Xi,experimental_SourceCode:qi,experimental_THREAD_ACTION_GROUPS:Zi,experimental_THREAD_CONTEXT_SEGMENT_GROUPS:Ji,experimental_THREAD_INFO_ROW_GROUPS:es,experimental_THREAD_INFO_SECTION_GROUPS:ts,experimental_ThreadActionsContextMenu:ns,experimental_ThreadActionsMenu:os,experimental_ThreadStatusGlyph:rs,experimental_ThreadTitleText:as,experimental_VoiceInputButton:is,experimental_VoiceInputTextarea:ss,experimental_VoiceRecordingBar:ls,experimental_copyToClipboard:An,experimental_describePromptMention:cs,experimental_promptMentionClipboardAttributes:ds,experimental_readPromptMentionClipboard:us,experimental_saveFile:ps,experimental_useAppPanel:ms,experimental_useArchiveEnvironmentThreads:fs,experimental_useBranches:hs,experimental_useCheckoutState:vs,experimental_useCodeTheme:gs,experimental_useComposerCommandSearch:bs,experimental_useComposerContributions:xs,experimental_useComposerMentionSearch:Rs,experimental_useComposerRenderer:ys,experimental_useExperiment:Cs,experimental_useFixedTabTarget:ws,experimental_usePluginId:Ss,experimental_useProviders:Ns,experimental_useQuestionFormHost:Ps,experimental_useRpcKeyedQuery:Es,experimental_useRpcMutation:Ts,experimental_useRpcQuery:ks,experimental_useRpcRefresh:_s,experimental_useSidebar:Ds,experimental_useSidebarNavigation:Ms,experimental_useSidebarNavigationSplit:Is,experimental_useSidebarThreadActions:Os,experimental_useSidebarThreadSplit:As,experimental_useSidebarThreads:Ls,experimental_useThreadActionRegistrations:Bs,experimental_useThreadActions:Hs,experimental_useThreadTitleDisplayText:$s,internal_DO_NOT_USE_Outlet:Fs,internal_DO_NOT_USE_useOutletFilled:zs,useBbContext:Vs,useBbNavigate:Xe,useComposer:Ws,useComposerView:Ks,useComposers:Us,useEnvironmentProviders:js,useRealtime:At,useRealtimeConnectionState:Gs,useRpc:Lt,useSdk:Ln,useSettings:Ys,useSidebarSplitLayout:Qs,useSidebarThreadDraft:Xs,useSidebarThreadDraftIds:qs,useSidebarThreadRowStatus:Zs,useSidebarThreadRowStatuses:Js,useSidebarThreadShortcut:el,experimental_useSidebarThreadPullRequest:tl}=Ye;var Bt=globalThis.__bbPluginRuntime;if(Bt==null||Bt.jsxRuntime==null)throw new Error('Cannot load "react/jsx-runtime": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var qe=Bt.jsxRuntime,ol="default"in qe?qe.default:qe,{Fragment:re,jsx:n,jsxs:c}=qe;function Bn({className:e}){return c("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",className:e,"aria-hidden":"true",children:[n("ellipse",{cx:"11",cy:"5",rx:"8",ry:"3",stroke:"currentColor",strokeWidth:"1.5"}),n("path",{d:"M6 10.8418C6.60158 11.0226 7.27434 11.1716 8 11.2817",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5"}),n("path",{d:"M6 17.8418C6.60158 18.0226 7.27434 18.1716 8 18.2817",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5"}),n("path",{d:"M19.842 13L20.4127 15.3449L19.4647 14.7618C18.7894 14.2569 17.9501 13.9576 17.0404 13.9576C14.809 13.9576 13 15.7579 13 17.9788C13 20.1996 14.809 22 17.0404 22C18.9951 22 20.6256 20.6185 21 18.783",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),n("path",{d:"M19 5V10M3 5V19C3 20.6569 6.58172 22 11 22C11.0849 22 11.1694 21.9995 11.2537 21.9985",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),n("path",{d:"M3 12C3 13.616 6.40729 14.9336 10.6748 14.9976",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5"})]})}function Hn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Tr(...e){return t=>{let o=!1,r=e.map(i=>{let a=Hn(i,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let i=0;i<r.length;i++){let a=r[i];typeof a=="function"?a():Hn(e[i],null)}}}}function Oe(...e){return I(Tr(...e),e)}function Ht(e){let t=N((o,r)=>{let{children:i,...a}=o,s=null,l=!1,m=[];$n(i)&&typeof Ze=="function"&&(i=Ze(i._payload)),Ee.forEach(i,h=>{if(Ir(h)){l=!0;let v=h,b="child"in v.props?v.props.child:v.props.children;$n(b)&&typeof Ze=="function"&&(b=Ze(b._payload)),s=_r(v,b),m.push(s?.props?.children)}else m.push(h)}),s?s=Ce(s,void 0,m):!l&&Ee.count(i)===1&&Te(i)&&(s=i);let u=s?Mr(s):void 0,f=Oe(r,u);if(!s){if(i||i===0)throw new Error(l?Br(e):Lr(e));return i}let p=Dr(a,s.props??{});return s.type!==Ie&&(p.ref=r?f:u),Ce(s,p)});return t.displayName=`${e}.Slot`,t}var Je=Ht("Slot"),kr=Symbol.for("radix.slottable");var _r=(e,t)=>{if("child"in e.props){let o=e.props.child;return Te(o)?Ce(o,void 0,e.props.children(o.props.children)):null}return Te(t)?t:null};function Dr(e,t){let o={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?o[r]=(...l)=>{let m=a(...l);return i(...l),m}:i&&(o[r]=i):r==="style"?o[r]={...i,...a}:r==="className"&&(o[r]=[i,a].filter(Boolean).join(" "))}return{...e,...o}}function Mr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}function Ir(e){return Te(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===kr}var Or=Symbol.for("react.lazy");function $n(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Or&&"_payload"in e&&Ar(e._payload)}function Ar(e){return typeof e=="object"&&e!==null&&"then"in e}var Lr=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Br=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Ze=$[" use ".trim().toString()];var $t=globalThis.__bbPluginRuntime;if($t==null||$t.classVarianceAuthority==null)throw new Error('Cannot load "class-variance-authority": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var et=$t.classVarianceAuthority,dl="default"in et?et.default:et,{cva:Fn,cx:ul}=et;var Ft=globalThis.__bbPluginRuntime;if(Ft==null||Ft.clsx==null)throw new Error('Cannot load "clsx": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var tt=Ft.clsx,ml="default"in tt?tt.default:tt,{clsx:zn}=tt;var zt=globalThis.__bbPluginRuntime;if(zt==null||zt.tailwindMerge==null)throw new Error('Cannot load "tailwind-merge": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var nt=zt.tailwindMerge,hl="default"in nt?nt.default:nt,{createTailwindMerge:vl,extendTailwindMerge:gl,fromTheme:bl,getDefaultConfig:xl,mergeConfigs:Rl,twJoin:yl,twMerge:Vn,validators:Cl}=nt;function y(...e){return Vn(zn(e))}var be="transition-colors duration-150 hover:duration-0",Ae="transition-none";var Hr=Fn(`inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ${be} focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_[data-icon-root]]:pointer-events-none [&_[data-icon-root]]:size-4 [&_[data-icon-root]]:shrink-0`,{variants:{variant:{default:"bg-foreground text-background hover:bg-foreground/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-transparent hover:bg-state-hover hover:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-state-hover hover:text-foreground aria-pressed:bg-state-active aria-pressed:text-foreground aria-pressed:hover:bg-state-active data-[state=open]:bg-state-active data-[state=open]:text-foreground data-[state=open]:hover:bg-state-active",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),te=N(({className:e,variant:t,size:o,asChild:r=!1,...i},a)=>n(r?Je:"button",{className:y(Hr({variant:t,size:o,className:e})),ref:a,...i}));te.displayName="Button";function Wn(e,t=[]){let o=[];function r(a,s){let l=q(s);l.displayName=a+"Context";let m=o.length;o=[...o,s];let u=p=>{let{scope:h,children:v,...b}=p,S=h?.[e]?.[m]||l,_=ee(()=>b,Object.values(b));return n(S.Provider,{value:_,children:v})};u.displayName=a+"Provider";function f(p,h,v={}){let{optional:b=!1}=v,S=h?.[e]?.[m]||l,_=Q(S);if(_)return _;if(s!==void 0)return s;if(!b)throw new Error(`\`${p}\` must be used within \`${a}\``)}return[u,f]}let i=()=>{let a=o.map(s=>q(s));return function(l){let m=l?.[e]||a;return ee(()=>({[`__scope${e}`]:{...l,[e]:m}}),[l,m])}};return i.scopeName=e,[r,$r(i,...t)]}function $r(...e){let t=e[0];if(e.length===1)return t;let o=()=>{let r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){let s=r.reduce((l,{useScope:m,scopeName:u})=>{let p=m(a)[`__scope${u}`];return{...l,...p}},{});return ee(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return o.scopeName=t.scopeName,o}var Ll=!!(typeof window<"u"&&window.document&&window.document.createElement);function Vt(e,t,{checkForDefaultPrevented:o=!0}={}){return function(i){if(e?.(i),o===!1||!i||!i.defaultPrevented)return t?.(i)}}var we=globalThis?.document?ce:()=>{};var Fr=$[" useInsertionEffect ".trim().toString()]||we;function Kn({prop:e,defaultProp:t,onChange:o=()=>{},caller:r}){let[i,a,s]=zr({defaultProp:t,onChange:o}),l=e!==void 0,m=l?e:i;{let f=T(e!==void 0);A(()=>{let p=f.current;p!==l&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=l},[l,r])}let u=I(f=>{if(l){let p=Vr(f)?f(e):f;p!==e&&s.current?.(p)}else a(f)},[l,e,a,s]);return[m,u]}function zr({defaultProp:e,onChange:t}){let[o,r]=D(e),i=T(o),a=T(t);return Fr(()=>{a.current=t},[t]),A(()=>{i.current!==o&&(a.current?.(o),i.current=o)},[o,i]),[o,r,a]}function Vr(e){return typeof e=="function"}function Un(e){let t=T({value:e,previous:e});return ee(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function jn(e){let[t,o]=D(void 0);return we(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});let r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;let a=i[0],s,l;if("borderBoxSize"in a){let m=a.borderBoxSize,u=Array.isArray(m)?m[0]:m;s=u.inlineSize,l=u.blockSize}else s=e.offsetWidth,l=e.offsetHeight;o({width:s,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else o(void 0)},[e]),t}function Wr(e,t){return Ge((o,r)=>t[o][r]??o,e)}var Wt=e=>{let{present:t,children:o}=e,r=Kr(t),i=typeof o=="function"?o({present:r.isPresent}):Ee.only(o),a=Ur(r.ref,jr(i));return typeof o=="function"||r.isPresent?Ce(i,{ref:a}):null};Wt.displayName="Presence";function Kr(e){let[t,o]=D(),r=T(null),i=T(e),a=T("none"),s=T(void 0),l=e?"mounted":"unmounted",[m,u]=Wr(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return A(()=>{m==="mounted"?(a.current=s.current??Le(r.current),s.current=void 0):a.current="none"},[m]),we(()=>{let f=r.current,p=i.current;if(p!==e){let v=a.current,b=Le(f);e?(s.current=b,u("MOUNT")):b==="none"||f?.display==="none"?u("UNMOUNT"):u(p&&v!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),we(()=>{if(t){let f,p=t.ownerDocument.defaultView??window,h=b=>{let _=Le(r.current).includes(CSS.escape(b.animationName));if(b.target===t&&_&&(u("ANIMATION_END"),!i.current)){let P=t.style.animationFillMode;t.style.animationFillMode="forwards",f=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=P)})}},v=b=>{b.target===t&&(a.current=Le(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{p.clearTimeout(f),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:I(f=>{if(f){let p=getComputedStyle(f);r.current=p,s.current=Le(p)}else r.current=null;o(f)},[])}}function Gn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ur(...e){let t=T(e);return t.current=e,I(o=>{let r=t.current,i=!1,a=r.map(s=>{let l=Gn(s,o);return!i&&typeof l=="function"&&(i=!0),l});if(i)return()=>{for(let s=0;s<a.length;s++){let l=a[s];typeof l=="function"?l():Gn(r[s],null)}}},[])}function Le(e){return e?.animationName||"none"}function jr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var Kt=globalThis.__bbPluginRuntime;if(Kt==null||Kt.reactDom==null)throw new Error('Cannot load "react-dom": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var ot=Kt.reactDom,jl="default"in ot?ot.default:ot,{createPortal:Yn,flushSync:Gr,preconnect:Gl,prefetchDNS:Yl,preinit:Ql,preinitModule:Xl,preload:ql,preloadModule:Zl,requestFormReset:Jl,unstable_batchedUpdates:ec,useFormState:tc,useFormStatus:nc,version:oc}=ot;var Qr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],rt=Qr.reduce((e,t)=>{let o=Ht(`Primitive.${t}`),r=N((i,a)=>{let{asChild:s,...l}=i,m=s?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),n(m,{...l,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});var at="Checkbox",[Xr,vc]=Wn(at),[qr,Ut]=Xr(at);function Zr(e){let{__scopeCheckbox:t,checked:o,children:r,defaultChecked:i,disabled:a,form:s,name:l,onCheckedChange:m,required:u,value:f="on",internal_do_not_use_render:p}=e,[h,v]=Kn({prop:o,defaultProp:i??!1,onChange:m,caller:at}),[b,S]=D(null),[_,P]=D(null),E=T(!1),M=b?!!s||!!b.closest("form"):!0,j={checked:h,disabled:a,setChecked:v,control:b,setControl:S,name:l,form:s,value:f,hasConsumerStoppedPropagationRef:E,required:u,defaultChecked:xe(i)?!1:i,isFormControl:M,bubbleInput:_,setBubbleInput:P};return n(qr,{scope:t,...j,children:Jr(p)?p(j):r})}var Qn="CheckboxTrigger",Xn=N(({__scopeCheckbox:e,onKeyDown:t,onClick:o,...r},i)=>{let{control:a,value:s,disabled:l,checked:m,required:u,setControl:f,setChecked:p,hasConsumerStoppedPropagationRef:h,isFormControl:v,bubbleInput:b}=Ut(Qn,e),S=Oe(i,f),_=T(m);return A(()=>{let P=a?.form;if(P){let E=()=>p(_.current);return P.addEventListener("reset",E),()=>P.removeEventListener("reset",E)}},[a,p]),n(rt.button,{type:"button",role:"checkbox","aria-checked":xe(m)?"mixed":m,"aria-required":u,"data-state":eo(m),"data-disabled":l?"":void 0,disabled:l,value:s,...r,ref:S,onKeyDown:Vt(t,P=>{P.key==="Enter"&&P.preventDefault()}),onClick:Vt(o,P=>{p(E=>xe(E)?!0:!E),b&&v&&(h.current=P.isPropagationStopped(),h.current||P.stopPropagation())})})});Xn.displayName=Qn;var it=N((e,t)=>{let{__scopeCheckbox:o,name:r,checked:i,defaultChecked:a,required:s,disabled:l,value:m,onCheckedChange:u,form:f,...p}=e;return n(Zr,{__scopeCheckbox:o,checked:i,defaultChecked:a,disabled:l,required:s,onCheckedChange:u,name:r,form:f,value:m,internal_do_not_use_render:({isFormControl:h})=>c(re,{children:[n(Xn,{...p,ref:t,__scopeCheckbox:o}),h&&n(Jn,{__scopeCheckbox:o})]})})});it.displayName=at;var qn="CheckboxIndicator",jt=N((e,t)=>{let{__scopeCheckbox:o,forceMount:r,...i}=e,a=Ut(qn,o);return n(Wt,{present:r||xe(a.checked)||a.checked===!0,children:n(rt.span,{"data-state":eo(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});jt.displayName=qn;var Zn="CheckboxBubbleInput",Jn=N(({__scopeCheckbox:e,...t},o)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:s,required:l,disabled:m,name:u,value:f,form:p,bubbleInput:h,setBubbleInput:v}=Ut(Zn,e),b=Oe(o,v),S=Un(a),_=jn(r);A(()=>{let E=h;if(!E)return;let M=window.HTMLInputElement.prototype,z=Object.getOwnPropertyDescriptor(M,"checked").set,W=!i.current;if(S!==a&&z){let O=new Event("click",{bubbles:W});E.indeterminate=xe(a),z.call(E,xe(a)?!1:a),E.dispatchEvent(O)}},[h,S,a,i]);let P=T(xe(a)?!1:a);return n(rt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??P.current,required:l,disabled:m,name:u,value:f,form:p,...t,tabIndex:-1,ref:b,style:{...t.style,..._,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Jn.displayName=Zn;function Jr(e){return typeof e=="function"}function xe(e){return e==="indeterminate"}function eo(e){return xe(e)?"indeterminate":e?"checked":"unchecked"}var Gt=globalThis.__bbPluginRuntime;if(Gt==null||Gt.sharedUiIcon==null)throw new Error('Cannot load "@moonlet/shared-ui/icon": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var st=Gt.sharedUiIcon,gc="default"in st?st.default:st,{ICON_NAMES:bc,Icon:oe,isBuiltinIconName:xc,preloadExtendedIcons:Rc}=st;var lt=N(({className:e,...t},o)=>n(it,{ref:o,className:y(`peer size-4 shrink-0 rounded-sm border border-input shadow-xs ${be} focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-foreground data-[state=checked]:bg-foreground data-[state=checked]:text-background`,e),...t,children:n(jt,{className:y("flex items-center justify-center text-current"),children:n(oe,{name:"Check",className:"size-3.5"})})}));lt.displayName=it.displayName;var ta=200;function to({children:e}){let[t,o]=D(!1);return A(()=>{let r=window.setTimeout(()=>o(!0),ta);return()=>window.clearTimeout(r)},[]),t?e:null}var Yt=globalThis.__bbPluginRuntime;if(Yt==null||Yt.radixDropdownMenu==null)throw new Error('Cannot load "@radix-ui/react-dropdown-menu": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var ct=Yt.radixDropdownMenu,kc="default"in ct?ct.default:ct,{Arrow:_c,CheckboxItem:no,Content:oo,DropdownMenu:Dc,DropdownMenuArrow:Mc,DropdownMenuCheckboxItem:Ic,DropdownMenuContent:Oc,DropdownMenuGroup:Ac,DropdownMenuItem:Lc,DropdownMenuItemIndicator:Bc,DropdownMenuLabel:Hc,DropdownMenuPortal:$c,DropdownMenuRadioGroup:Fc,DropdownMenuRadioItem:zc,DropdownMenuSeparator:Vc,DropdownMenuSub:Wc,DropdownMenuSubContent:Kc,DropdownMenuSubTrigger:Uc,DropdownMenuTrigger:jc,Group:ro,Item:ao,ItemIndicator:Qt,Label:io,Portal:so,RadioGroup:na,RadioItem:Xt,Root:lo,Separator:co,Sub:oa,SubContent:qt,SubTrigger:Zt,Trigger:uo,createDropdownMenuScope:Gc}=ct;function ue(){let e="bb--storage-retention";return{"data-bb-portaled-overlay":"","data-bb-plugin-root":"",...e!==void 0?{"data-bb-plugin":e}:{}}}var Re="h-3.5 w-3.5 max-md:pointer-coarse:h-5 max-md:pointer-coarse:w-5",po="h-[28px] w-[28px] rounded-md p-0 max-md:pointer-coarse:h-[36px] max-md:pointer-coarse:w-[36px]",Qc=`${po} [&_[data-icon-root]]:size-[16px] max-md:pointer-coarse:[&_[data-icon-root]]:size-[20px]`,Xc=`${po} [&_[data-icon-root]]:size-[13px] max-md:pointer-coarse:[&_[data-icon-root]]:size-[16px]`;var aa="select-none",ia=new Set(["button","checkbox","file","hidden","image","radio","range","reset","submit"]),dt=e=>y(aa,e);function sa(e){return e instanceof HTMLTextAreaElement?!0:e instanceof HTMLInputElement?!e.disabled&&!e.readOnly&&!ia.has(e.type):e instanceof HTMLElement?e.isContentEditable||e.closest("[contenteditable='true']")!==null:!1}function Be(e){if(typeof document>"u")return;let t=document.activeElement;!t||!sa(t)||e!==null&&!e.contains(t)||t.blur()}function ke(){Be(null)}function mo(){Be(null)}function He(e){e.preventDefault()}var Jt="pointer";typeof document<"u"&&(document.addEventListener("keydown",()=>{Jt="keyboard"},{capture:!0}),document.addEventListener("pointerdown",()=>{Jt="pointer"},{capture:!0}));function _e(){return Jt==="keyboard"}var ut=new Map;function la(e){if(typeof window>"u"||!window.matchMedia)return null;let t=ut.get(e);if(t)return t;let o=window.matchMedia(e),r=new Set,i=()=>{for(let a of r)a()};return t={mql:o,subscribe(a){let s=r.size===0;return r.add(a),s&&o.addEventListener("change",i),()=>{r.delete(a),r.size===0&&(o.removeEventListener("change",i),ut.delete(e))}}},ut.set(e,t),t}function ca(e,t){return la(e)?.subscribe(t)??(()=>{})}function da(e){return typeof window>"u"||!window.matchMedia?!1:ut.get(e)?.mql.matches??window.matchMedia(e).matches}function pt(e){return It(t=>ca(e,t),()=>da(e),()=>!1)}var ua="(max-width: 767px)",pa=q(null);function fo(){let e=Q(pa),t=pt(ua);return e!==null?e:t}var ma="(pointer: coarse)";function ho(){return pt(ma)}var fa=120,ft={width:"auto",minWidth:"auto",maxWidth:"none"},en="--bb-drawer-keyboard-inset",ha=80;function mt(e){e!==null&&(e.style.height="",e.style.bottom="",e.style.removeProperty(en))}function va({layoutViewportHeight:e,visualViewportHeight:t,visualViewportOffsetTop:o}){let r=Math.round(e-(t+o));return r>=ha?r:0}function ga(e,t){A(()=>{let o=e.current,r=window.visualViewport;if(o===null||!t||!r)return;let i=null,a=()=>{if(i=null,r.scale!==1){mt(o);return}let l=va({layoutViewportHeight:o.ownerDocument.documentElement.clientHeight,visualViewportHeight:r.height,visualViewportOffsetTop:r.offsetTop});if(l===0){o.style.bottom="",o.style.removeProperty(en);return}o.style.bottom=`${l}px`,o.style.setProperty(en,`${l}px`)},s=()=>{i!==null&&window.cancelAnimationFrame(i),i=window.requestAnimationFrame(a)};return a(),r.addEventListener("resize",s),r.addEventListener("scroll",s),()=>{r.removeEventListener("resize",s),r.removeEventListener("scroll",s),i!==null&&window.cancelAnimationFrame(i),mt(o)}},[t,e])}function ba(){let e=fo()?"drawer":"floating",t=ho();return{presentation:e,supportsHover:e==="floating"&&!t}}function ht(e,t,o=!1){let{presentation:r}=ba(),i=r==="drawer",[a,s]=D(o),l=e!==void 0,m=l?e:a,u=I(f=>{m&&!f&&i&&mo(),l||s(f),t?.(f)},[i,l,t,m]);return ee(()=>({isCompactViewport:i,open:m,onOpenChange:u}),[i,m,u])}var nn=N(({asChild:e,open:t,onOpenChange:o,haspopup:r,onClick:i,children:a,className:s,...l},m)=>{let u=dt(s),f=h=>{i?.(h),h.defaultPrevented||(t||ke(),o(!t))},p={"aria-expanded":t,"aria-haspopup":r,"data-state":t?"open":"closed"};return e?n(Je,{ref:m,onClick:f,onMouseDown:He,className:u,...p,...l,children:a}):n("button",{ref:m,type:"button",onClick:f,onMouseDown:He,className:u,...p,...l,children:a})});nn.displayName="MobileTrigger";var xa=["side","sideOffset","align","alignOffset","collisionPadding","collisionBoundary","arrowPadding","sticky","hideWhenDetached","avoidCollisions","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside"],Ra=new Set(xa);function vt(e){let t={};for(let o of Object.keys(e))Ra.has(o)||(t[o]=e[o]);return t}function ya({open:e,enabled:t=!0}){let[o,r]=D(!1),i=I(()=>r(!0),[]);return A(()=>{if(!t||!e||o)return;let a=null,s=null;a=window.requestAnimationFrame(()=>{a=null,s=window.requestAnimationFrame(()=>{s=null,i()})});let l=window.setTimeout(i,fa);return()=>{a!==null&&window.cancelAnimationFrame(a),s!==null&&window.cancelAnimationFrame(s),window.clearTimeout(l)}},[t,o,e,i]),{isContentRealized:t&&o,realizeContent:i}}function gt({open:e,onOpenChange:t,onAfterCloseAutoFocus:o,closeOnBackdropClick:r=!0,srLabel:i,labelledBy:a,describedBy:s,contentClassName:l,onContentAnimationEnd:m,onEscapeKeyDown:u,onPointerDownOutside:f,onInteractOutside:p,children:h}){let{isContentRealized:v}=ya({open:e});return!e&&!v?null:n(Da,{open:e,onOpenChange:t,onAfterCloseAutoFocus:o,closeOnBackdropClick:r,srLabel:i,labelledBy:a,describedBy:s,contentClassName:l,onContentAnimationEnd:m,onEscapeKeyDown:u,onPointerDownOutside:f,onInteractOutside:p,children:v?h:n("div",{"aria-hidden":"true",className:"min-h-32","data-responsive-drawer-placeholder":""})})}var vo="cubic-bezier(0.32, 0.72, 0, 1)",Ca=.25,wa=450,Sa=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),tn=Symbol.for("bb.persistent-drawer-stack.v1");function Na(e){return typeof e=="object"&&e!==null&&"entries"in e&&Array.isArray(e.entries)&&"handleKeyDown"in e&&typeof e.handleKeyDown=="function"}function go(e){let t=Reflect.get(e,tn);return Na(t)?t:void 0}function Pa(e){return Array.from(e.querySelectorAll(Sa)).filter(t=>t.closest('[aria-hidden="true"], [inert]')===null)}function Ea(e,t){let o=e?.closest("[data-bb-portaled-overlay]");return o!=null&&o!==t}function Ta(e,t){let o=t.ownerDocument.activeElement;if(!t.contains(o)&&Ea(o,t))return;let r=Pa(t);if(e.preventDefault(),r.length===0){t.focus({preventScroll:!0});return}let i=r[0],a=r[r.length-1];if(e.shiftKey){if(!t.contains(o)||o===t||o===i){a?.focus({preventScroll:!0});return}let l=r.indexOf(o);r[Math.max(0,l-1)]?.focus({preventScroll:!0});return}if(!t.contains(o)||o===t||o===a){i?.focus({preventScroll:!0});return}let s=r.indexOf(o);r[Math.min(r.length-1,s+1)]?.focus({preventScroll:!0})}function ka(e,t){let o=go(e);if(o===void 0){let r=[],i=a=>{if(a.defaultPrevented)return;let s=r[r.length-1],l=s?.panel()??null;s===void 0||l===null||(a.key==="Escape"?(s.dismissOnEscape(a),a.preventDefault()):a.key==="Tab"&&Ta(a,l))};o={entries:r,handleKeyDown:i},Reflect.set(e,tn,o),e.addEventListener("keydown",i)}return o.entries.push(t),()=>{let r=go(e);if(r===void 0)return;let i=r.entries.indexOf(t);i>=0&&r.entries.splice(i,1),r.entries.length===0&&(e.removeEventListener("keydown",r.handleKeyDown),Reflect.deleteProperty(e,tn))}}function _a({onAfterCloseAutoFocus:e,onBeforeCloseAutoFocus:t,onEscapeKeyDown:o,open:r,panelRef:i,requestClose:a}){let s=T(null),l=T(o);ce(()=>{l.current=o},[o]),ce(()=>{if(!r)return;let u=i.current;if(u===null)return;let f=u.ownerDocument,p=f.activeElement;s.current=p instanceof HTMLElement&&p!==f.body?p:null;let h=ka(f,{panel:()=>i.current,dismissOnEscape:v=>{l.current?.(v),v.defaultPrevented||a()}});return u.focus({preventScroll:!0}),h},[r,i,a]);let m=T(r);ce(()=>{let u;if(m.current&&!r){t?.();let f=s.current;if(f?.isConnected&&f.closest('[aria-hidden="true"], [inert]')===null&&(f.focus({preventScroll:!0}),f.ownerDocument.activeElement!==f)){let p=f.ownerDocument.defaultView;if(p!==null){let h=p.requestAnimationFrame(()=>{f.isConnected&&f.closest('[aria-hidden="true"], [inert]')===null&&f.focus({preventScroll:!0}),e?.()});u=()=>p.cancelAnimationFrame(h)}}s.current=null,u===void 0&&e?.()}return m.current=r,u},[e,t,r])}function Da({open:e,onOpenChange:t,onAfterCloseAutoFocus:o,closeOnBackdropClick:r=!0,srLabel:i,labelledBy:a,describedBy:s,contentClassName:l,motionDurationMs:m=220,onContentAnimationEnd:u,onEscapeKeyDown:f,onPointerDownOutside:p,onInteractOutside:h,children:v}){let b=T(null),S=T(null),_=T(null),P=T(null),E=T(null),M=ge(),j=ue(),z=`transform ${m}ms ${vo}`,W=`opacity ${m}ms ${vo}`,O=T(t);ce(()=>{O.current=t},[t]);let me=I(()=>{Be(b.current),mt(b.current),O.current(!1)},[]),X=I(()=>{Be(b.current),mt(b.current)},[]);_a({onAfterCloseAutoFocus:o,onBeforeCloseAutoFocus:X,onEscapeKeyDown:f,open:e,panelRef:b,requestClose:me});let se=()=>{let w=_.current;if(_.current=null,!!r){if(w!==null){let V=new CustomEvent("dismissableLayer.pointerDownOutside",{cancelable:!0,detail:{originalEvent:w}});if(p?.(V),h?.(V),V.defaultPrevented)return}me()}};ga(b,e);let x=I(w=>{E.current!==w&&(E.current=w,u?.(w))},[u]);A(()=>{E.current=null;let w=window.setTimeout(()=>x(e),m+50);return()=>window.clearTimeout(w)},[m,e,x]);let R=I((w,V,L)=>{let K=b.current,de=S.current;K===null||de===null||(K.style.transition=L?z:"none",K.style.transform=`translate3d(0, ${w}px, 0)`,de.style.transition=L?W:"none",de.style.opacity=String(Math.max(0,Math.min(1,1-w/V))))},[W,z]),Y=I(w=>{if(!e||w.button!==0)return;w.currentTarget.setPointerCapture(w.pointerId);let V=Date.now(),L=Math.max(b.current?.clientHeight??0,1);P.current={pointerId:w.pointerId,startY:w.clientY,lastY:w.clientY,lastTimeMs:V,velocityY:0,height:L},R(0,L,!1),w.preventDefault()},[e,R]),g=I(w=>{let V=P.current;if(V===null||V.pointerId!==w.pointerId)return;let L=Date.now(),K=L-V.lastTimeMs;K>0&&(V.velocityY=(w.clientY-V.lastY)/K*1e3,V.lastY=w.clientY,V.lastTimeMs=L),R(Math.max(0,w.clientY-V.startY),V.height,!1),w.preventDefault()},[R]),Z=I((w,V)=>{let L=P.current;if(L===null||L.pointerId!==w.pointerId)return;P.current=null;let K=Math.max(0,w.clientY-L.startY);!V&&(K>=L.height*Ca||L.velocityY>=wa)?(R(L.height,L.height,!0),me()):R(0,L.height,!0),w.preventDefault()},[me,R]),ie=typeof document>"u"?null:document.body;return ie===null?null:Yn(c(re,{children:[n("div",{ref:S,...j,"aria-hidden":"true","data-persistent-drawer-backdrop":"","data-state":e?"open":"closed",className:"fixed inset-0 z-50 bg-black/40",style:{opacity:e?1:0,pointerEvents:e?"auto":"none",transition:W},onPointerDown:w=>{_.current=w.nativeEvent},onClick:se,onTouchMove:w=>w.preventDefault()}),c("div",{ref:b,...j,"aria-hidden":!e,"aria-labelledby":a??(i===void 0?void 0:M),"aria-describedby":s,"aria-modal":e||void 0,"data-bb-portaled-overlay":"","data-persistent-drawer-content":"","data-state":e?"open":"closed",inert:!e,role:"dialog",tabIndex:-1,className:y("fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[calc(92dvh-var(--bb-drawer-keyboard-inset,0px))] flex-col rounded-t-xl border bg-background pb-[var(--bb-safe-area-bottom,env(safe-area-inset-bottom))] outline-none",l),style:{transform:e?"translate3d(0, 0, 0)":"translate3d(0, 100%, 0)",transition:z,willChange:e?"transform":void 0},onTransitionEnd:w=>{w.currentTarget===w.target&&w.propertyName==="transform"&&x(e)},children:[n("div",{"data-persistent-drawer-handle":"",className:"mx-auto flex h-8 w-16 shrink-0 touch-none cursor-grab items-center justify-center active:cursor-grabbing",onPointerDown:Y,onPointerMove:g,onPointerUp:w=>Z(w,!1),onPointerCancel:w=>Z(w,!0),children:n("div",{className:"h-1 w-10 rounded-full bg-muted-foreground/20"})}),i===void 0?null:n("h2",{id:M,className:"sr-only",children:i}),v]})]}),ie)}function bo(e){return e.isConnected&&e.closest("[inert]")===null}function Ma(e,t){typeof e=="function"?e(t):e!==null&&(e.current=t)}function bt(e,t,o){let r=T(null),i=T(o);return ce(()=>{i.current=o},[o]),A(()=>{let a=r.current;if(!t||a===null)return;let s=!1,l=()=>{s||r.current!==null&&r.current!==a||(s=!0,i.current(!1))},m=bo(a),u=new MutationObserver(()=>{bo(a)?m=!0:m&&l()});if(u.observe(a.ownerDocument.documentElement,{attributes:!0,attributeFilter:["inert"],childList:!0,subtree:!0}),typeof IntersectionObserver!="function")return()=>u.disconnect();let f=!1,p=new IntersectionObserver(h=>{let v=h.at(-1);v!==void 0&&(v.isIntersecting?f=!0:f&&l())});return p.observe(a),()=>{u.disconnect(),p.disconnect()}},[t]),I(a=>{r.current=a,Ma(e,a)},[e])}var Ia=new Set(["ArrowDown","ArrowUp","Home","End","PageDown","PageUp"]),xt="data-[last-hovered]:bg-state-hover data-[last-hovered]:text-foreground",xo=Symbol.for("bb.menu-hover-context.v1");function Oa(e){return typeof e=="object"&&e!==null&&"Provider"in e&&"Consumer"in e}function Aa(){let e=Reflect.get(globalThis,xo);if(Oa(e))return e;let t=q({lastHoveredId:null,setLastHovered:()=>{},clearLastHovered:()=>{}});return Reflect.set(globalThis,xo,t),t}var Ro=Aa();function yo({children:e}){let[t,o]=D(null),r=ee(()=>({lastHoveredId:t,setLastHovered:o,clearLastHovered:()=>o(null)}),[t]);return n(Ro.Provider,{value:r,children:e})}function $e(e){let t=ge(),{lastHoveredId:o,setLastHovered:r,clearLastHovered:i}=Q(Ro),a=o===t,s=T(e);s.current=e;let l=I(u=>{s.current?.onPointerEnter?.(u),r(t)},[t,r]),m=I(u=>{s.current?.onKeyDown?.(u),Ia.has(u.key)&&i()},[i]);return{isLastHovered:a,hoverProps:{"data-last-hovered":a?"":void 0,onPointerEnter:l,onKeyDown:m}}}var La="focus:bg-state-hover focus:text-foreground data-[last-hovered]:bg-state-hover data-[last-hovered]:text-foreground",Ba="text-destructive focus:bg-destructive/15 focus:text-destructive data-[last-hovered]:bg-destructive/15",Ha="text-destructive focus:bg-destructive/15 focus:text-destructive active:bg-destructive/20 active:text-destructive",Co=Symbol.for("bb.responsive-menu-context.v1");function $a(e){return typeof e=="object"&&e!==null&&"Provider"in e&&"Consumer"in e}function Fa(){let e=Reflect.get(globalThis,Co);if($a(e))return e;let t=q({isCompactViewport:!1,open:!1,onOpenChange:()=>{}});return Reflect.set(globalThis,Co,t),t}var on=Fa();function ye(){return Q(on)}function wo({children:e,open:t,onOpenChange:o,defaultOpen:r,...i}){let a=ht(t,o,r);return a.isCompactViewport?n(on.Provider,{value:a,children:e}):n(lo,{open:a.open,onOpenChange:a.onOpenChange,...i,children:n(on.Provider,{value:a,children:e})})}var rn=N(({asChild:e,children:t,className:o,...r},i)=>{let{isCompactViewport:a,open:s,onOpenChange:l}=ye(),m=bt(i,s&&!a,l);return a?n(nn,{ref:i,asChild:e,open:s,onOpenChange:l,haspopup:"menu",className:o,...r,children:t}):n(uo,{ref:m,asChild:e,className:dt(o),onMouseDown:u=>{s||ke(),He(u)},...r,children:t})});rn.displayName="DropdownMenuTrigger";var an=N(({className:e,sideOffset:t=4,children:o,mobileTitle:r,onCloseAutoFocus:i,...a},s)=>{let{isCompactViewport:l,open:m,onOpenChange:u}=ye(),f=ue();if(l){let{style:p,...h}=vt(a);return n(gt,{open:m,onOpenChange:u,srLabel:r??"Menu",onEscapeKeyDown:a.onEscapeKeyDown,onPointerDownOutside:a.onPointerDownOutside,onInteractOutside:a.onInteractOutside,children:n("div",{ref:s,className:y("flex flex-col gap-0.5 overflow-y-auto p-2",e),...h,style:{...p,...ft},children:o})})}return n(so,{children:n(oo,{ref:s,...f,sideOffset:t,onCloseAutoFocus:p=>{let h=document.activeElement!==null&&document.activeElement!==document.body;(!_e()||h)&&p.preventDefault(),i?.(p)},className:y("z-50 min-w-28 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a,children:n(yo,{children:o})})})});an.displayName="DropdownMenuContent";function So(){return new Event("select",{cancelable:!0})}var Fe=N(({className:e,inset:t,variant:o="default",onSelect:r,disabled:i,role:a="menuitem","aria-checked":s,textValue:l,children:m,onPointerEnter:u,onKeyDown:f,onFocus:p,onBlur:h,onPointerMove:v,onPointerLeave:b,...S},_)=>{let{isCompactViewport:P,open:E,onOpenChange:M}=ye(),{hoverProps:j}=$e({onPointerEnter:u,onKeyDown:f}),z=W=>O=>{W?.(O),E||O.preventDefault()};return P?n("button",{ref:_,type:"button",role:a,disabled:i,"aria-disabled":i||void 0,"aria-checked":s,className:y("relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-[0.3125rem] max-md:pointer-coarse:py-2 text-left text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground active:bg-state-active active:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>[data-icon-root]]:size-4 [&>[data-icon-root]]:shrink-0",t&&"pl-8",o==="destructive"&&Ha,e),"data-disabled":i?"":void 0,onFocus:p,onBlur:h,onClick:()=>{if(i)return;let W=So();r?.(W),W.defaultPrevented||M(!1)},children:m}):n(ao,{ref:_,className:y("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-[0.3125rem] text-xs outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>[data-icon-root]]:size-4 [&>[data-icon-root]]:shrink-0",Ae,o==="destructive"?Ba:La,t&&"pl-8",e),disabled:i,role:a,"aria-checked":s,onSelect:r,textValue:l,onFocus:p,onBlur:h,onPointerMove:z(v),onPointerLeave:z(b),...S,...j,children:m})});Fe.displayName="DropdownMenuItem";var za=N(({className:e,children:t,checked:o,onSelect:r,onCheckedChange:i,disabled:a,textValue:s,onPointerEnter:l,onKeyDown:m,...u},f)=>{let{isCompactViewport:p,onOpenChange:h}=ye(),{hoverProps:v}=$e({onPointerEnter:l,onKeyDown:m});return p?c("button",{ref:f,type:"button",role:"menuitemcheckbox","aria-checked":o==="indeterminate"?"mixed":o===!0,disabled:a,"aria-disabled":a||void 0,className:y("relative flex w-full cursor-default select-none items-center rounded-sm py-[0.3125rem] max-md:pointer-coarse:py-2 pl-2 pr-8 text-left text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground active:bg-state-active active:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),"data-disabled":a?"":void 0,onClick:()=>{if(a)return;let b=So();r?.(b),i?.(o==="indeterminate"?!0:!o),b.defaultPrevented||h(!1)},children:[n("span",{className:y("absolute right-2 flex items-center justify-center",Re),children:(o===!0||o==="indeterminate")&&n(oe,{name:"Check",className:Re})}),t]}):c(no,{ref:f,className:y("relative flex cursor-default select-none items-center rounded-sm py-[0.3125rem] pl-2 pr-8 text-xs outline-none focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",Ae,xt,e),checked:o,onSelect:r,onCheckedChange:i,disabled:a,textValue:s,...u,...v,children:[n("span",{className:y("absolute right-2 flex items-center justify-center",Re),children:n(Qt,{children:n(oe,{name:"Check",className:Re})})}),t]})});za.displayName="DropdownMenuCheckboxItem";var Va=N(({className:e,children:t,onPointerEnter:o,onKeyDown:r,...i},a)=>{let{isCompactViewport:s}=ye(),{hoverProps:l}=$e({onPointerEnter:o,onKeyDown:r});return s?null:c(Xt,{ref:a,className:y("relative flex cursor-default select-none items-center rounded-sm py-[0.3125rem] pl-8 pr-2 text-xs outline-none focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",Ae,xt,e),...i,...l,children:[n("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n(Qt,{children:n(oe,{name:"Circle",className:"h-2 w-2 fill-current"})})}),t]})});Va.displayName=Xt.displayName;var Wa=N(({className:e,inset:t,children:o,...r},i)=>{let{isCompactViewport:a}=ye();return a?n("div",{ref:i,className:y("px-2 py-[0.3125rem] max-md:pointer-coarse:py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),children:o}):n(io,{ref:i,className:y("px-2 py-[0.3125rem] text-xs font-medium text-muted-foreground",t&&"pl-8",e),...r,children:o})});Wa.displayName="DropdownMenuLabel";var sn=N(({className:e,...t},o)=>{let{isCompactViewport:r}=ye();return r?n("hr",{ref:o,className:y("-mx-1 my-1 h-px border-0 bg-muted",e)}):n(co,{ref:o,className:y("-mx-1 my-1 h-px bg-muted",e),...t})});sn.displayName="DropdownMenuSeparator";var Ka=N(({children:e,...t},o)=>{let{isCompactViewport:r}=ye();return r?n("div",{ref:o,role:"group",...t,children:e}):n(ro,{ref:o,...t,children:e})});Ka.displayName="DropdownMenuGroup";var Ua=N(({className:e,inset:t,children:o,onPointerEnter:r,onKeyDown:i,...a},s)=>{let{hoverProps:l}=$e({onPointerEnter:r,onKeyDown:i});return c(Zt,{ref:s,className:y("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-[0.3125rem] text-xs outline-none focus:bg-state-hover focus:text-foreground data-[state=open]:bg-state-active data-[state=open]:text-foreground [&_[data-icon-root]]:pointer-events-none [&_[data-icon-root]]:size-4 [&_[data-icon-root]]:shrink-0",Ae,xt,t&&"pl-8",e),...a,...l,children:[o,n(oe,{name:"ChevronRight",className:"ml-auto"})]})});Ua.displayName=Zt.displayName;var ja=N(({className:e,...t},o)=>n(qt,{ref:o,...ue(),className:y("z-50 min-w-28 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));ja.displayName=qt.displayName;var Ga=({className:e,...t})=>n("span",{className:y("ml-auto text-xs tracking-widest opacity-60",e),...t});Ga.displayName="DropdownMenuShortcut";var ne=Qe;var ln=globalThis.__bbPluginRuntime;if(ln==null||ln.radixSelect==null)throw new Error('Cannot load "@radix-ui/react-select": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Rt=ln.radixSelect,Md="default"in Rt?Rt.default:Rt,{Arrow:Id,Content:cn,Group:dn,Icon:No,Item:un,ItemIndicator:Po,ItemText:Eo,Label:pn,Portal:To,Root:ko,ScrollDownButton:mn,ScrollUpButton:fn,Select:Od,SelectArrow:Ad,SelectContent:Ld,SelectGroup:Bd,SelectIcon:Hd,SelectItem:$d,SelectItemIndicator:Fd,SelectItemText:zd,SelectLabel:Vd,SelectPortal:Wd,SelectScrollDownButton:Kd,SelectScrollUpButton:Ud,SelectSeparator:jd,SelectTrigger:Gd,SelectValue:Yd,SelectViewport:Qd,Separator:hn,Trigger:vn,Value:_o,Viewport:Do,createSelectScope:Xd,unstable_BubbleInput:qd,unstable_Provider:Zd,unstable_SelectBubbleInput:Jd,unstable_SelectProvider:eu}=Rt;var Qa=new Set([" ","Enter","ArrowUp","ArrowDown"]),yt='[role="option"]:not([aria-disabled="true"])',Xa=1e3,Ct=q(null),Mo=q({isCompactViewport:!1,open:!1,onOpenChange:()=>{}}),Io=q(!1),Oo=q(void 0);function wt(){let e=Q(Ct);return Q(Io)?e:null}function qa(e){if(e===null)return"Options";let t=e.getAttribute("aria-label")?.trim();if(t)return t;let o=(e.getAttribute("aria-labelledby")??"").split(/\s+/).map(i=>e.ownerDocument.getElementById(i)?.textContent?.trim()).filter(Boolean).join(" ");return o||Array.from(e.labels??[]).map(i=>i.textContent?.trim()).filter(Boolean).join(" ")||"Options"}function gn({open:e,defaultOpen:t,onOpenChange:o,value:r,defaultValue:i,onValueChange:a,children:s,...l}){let m=ht(e,o,t),[u,f]=D(i??""),p=r!==void 0,h=p?r:u,v=I(z=>{p||f(z),a?.(z)},[p,a]),b=ge(),[S,_]=D(null),{isCompactViewport:P,open:E,onOpenChange:M}=m,j=ee(()=>P?{open:E,onOpenChange:M,openFromTrigger:z=>{ke(),z.focus({preventScroll:!0}),_(z),M(!0)},value:h,selectValue:z=>{z!==h&&v(z),M(!1)},listboxId:b,label:qa(S)}:null,[v,P,b,M,E,S,h]);return n(Ct.Provider,{value:j,children:n(Mo.Provider,{value:m,children:n(ko,{...l,value:h,onValueChange:v,open:!P&&E,onOpenChange:M,children:s})})})}var Za=N((e,t)=>{let o=wt(),r=ge();return o===null?n(dn,{ref:t,...e}):n(Oo.Provider,{value:r,children:n("div",{ref:t,role:"group","aria-labelledby":r,...e})})});Za.displayName=dn.displayName;var bn=_o,St=N(({className:e,children:t,onClick:o,onKeyDown:r,onPointerDown:i,...a},s)=>{let l=Q(Ct),m=Q(Mo),u=bt(s,m.open&&!m.isCompactViewport,m.onOpenChange),f=l===null?{onClick:o,onKeyDown:r,onPointerDown:i}:{"aria-expanded":l.open,"aria-controls":l.open?l.listboxId:void 0,"data-state":l.open?"open":"closed",onPointerDown:p=>{i?.(p),p.pointerType==="mouse"&&p.button===0&&p.preventDefault()},onClick:p=>{o?.(p),!p.defaultPrevented&&(p.preventDefault(),l.openFromTrigger(p.currentTarget))},onKeyDown:p=>{r?.(p),!(p.defaultPrevented||!Qa.has(p.key))&&(p.preventDefault(),l.openFromTrigger(p.currentTarget))}};return c(vn,{ref:u,className:y(`flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm ${be} placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1`,e),...a,...f,children:[t,n(No,{asChild:!0,children:n(oe,{name:"ChevronDown",className:"size-4 opacity-50"})})]})});St.displayName=vn.displayName;var Ao=N(({className:e,...t},o)=>n(fn,{ref:o,className:y("flex cursor-default items-center justify-center py-1",e),...t,children:n(oe,{name:"ChevronUp",className:"size-4"})}));Ao.displayName=fn.displayName;var Lo=N(({className:e,...t},o)=>n(mn,{ref:o,className:y("flex cursor-default items-center justify-center py-1",e),...t,children:n(oe,{name:"ChevronDown",className:"size-4"})}));Lo.displayName=mn.displayName;function Ja(e,t){let o=Array.from(e.querySelectorAll(yt)),r=o.findIndex(s=>s===e.ownerDocument.activeElement),i=o.length-1,a=t==="Home"?0:t==="End"?i:t==="ArrowDown"?Math.min(i,r+1):t==="ArrowUp"?Math.max(0,r-1):null;return a===null?!1:(o[a]?.focus(),!0)}function ei(e){return e.dataset.textValue??e.textContent?.trim()??""}function ti(e,t,o){let r=o.charAt(0),a=(Array.from(o).every(u=>u===r)?r:o).toLowerCase(),s=t===void 0?0:e.indexOf(t),l=[...e.slice(s),...e.slice(0,s)];return(a.length===1?l.filter(u=>u!==t):l).find(u=>ei(u).toLowerCase().startsWith(a))}var Bo=N(({compact:e,children:t,onKeyDown:o,onKeyDownCapture:r,...i},a)=>{let s=T(null),l=T({search:"",timeout:0}),m=I(u=>{s.current=u,typeof a=="function"?a(u):a!==null&&(a.current=u)},[a]);return A(()=>{let u=s.current;if(!e.open||u===null||!_e())return;(u.querySelector(`${yt}[aria-selected="true"]`)??u.querySelector(yt))?.focus()},[e.open]),A(()=>{let u=l.current;return()=>window.clearTimeout(u.timeout)},[]),n("div",{ref:m,role:"listbox",id:e.listboxId,"aria-label":e.label,...i,onKeyDownCapture:u=>{r?.(u);let f=l.current,p=u.ctrlKey||u.altKey||u.metaKey;if(u.defaultPrevented||p||u.key.length!==1||u.key===" "&&f.search==="")return;u.preventDefault(),f.search+=u.key,window.clearTimeout(f.timeout),f.timeout=window.setTimeout(()=>{f.search=""},Xa);let h=Array.from(u.currentTarget.querySelectorAll(yt)),v=u.currentTarget.ownerDocument.activeElement,b=h.find(S=>S===v);ti(h,b,f.search)?.focus()},onKeyDown:u=>{o?.(u),!u.defaultPrevented&&Ja(u.currentTarget,u.key)&&u.preventDefault()},children:n(Io.Provider,{value:!0,children:t})})});Bo.displayName="CompactSelectListbox";var Nt=N(({className:e,children:t,position:o="popper",...r},i)=>{let a=Q(Ct),s=ue(),l=n(To,{children:c(cn,{ref:a===null?i:void 0,...s,className:y("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:o,...r,children:[n(Ao,{}),n(Do,{className:y("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),n(Lo,{})]})});if(a===null)return l;let{style:m,...u}=vt(r);return c(re,{children:[l,n(gt,{open:a.open,onOpenChange:a.onOpenChange,srLabel:a.label,onEscapeKeyDown:r.onEscapeKeyDown,onPointerDownOutside:r.onPointerDownOutside,children:n(Bo,{ref:i,compact:a,className:y("overflow-y-auto px-2 pt-1 pb-3",e),...u,style:{...m,...ft},children:t})})]})});Nt.displayName=cn.displayName;var ni=N(({className:e,...t},o)=>{let r=wt(),i=Q(Oo),a=y("px-2 py-1.5 text-sm font-semibold",e);return r===null?n(pn,{ref:o,className:a,...t}):n("div",{ref:o,id:i,className:a,...t})});ni.displayName=pn.displayName;var pe=N(({className:e,children:t,value:o,disabled:r,textValue:i,onClick:a,onKeyDown:s,...l},m)=>{let u=wt();if(u===null)return c(un,{ref:m,value:o,disabled:r,textValue:i,onClick:a,onKeyDown:s,className:y("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...l,children:[n("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:n(Po,{children:n(oe,{name:"Check",className:"size-4"})})}),n(Eo,{children:t})]});let f=u.value===o,p=()=>{r||u.selectValue(o)};return c("div",{ref:m,role:"option","aria-selected":f,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,"data-state":f?"checked":"unchecked","data-text-value":i,tabIndex:r?void 0:0,className:y("relative flex w-full cursor-default select-none items-center rounded-sm py-2 pl-2 pr-8 text-sm outline-none transition-colors focus:bg-state-hover focus:text-foreground active:bg-state-active active:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...l,onClick:h=>{a?.(h),h.defaultPrevented||p()},onKeyDown:h=>{s?.(h),!(h.defaultPrevented||h.target!==h.currentTarget)&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),p())},children:[n("span",{className:y("absolute right-2 flex items-center justify-center",Re),children:f?n(oe,{name:"Check",className:Re}):null}),n("span",{children:t})]})});pe.displayName=un.displayName;var oi=N(({className:e,...t},o)=>{let r=y("-mx-1 my-1 h-px bg-border",e);return wt()===null?n(hn,{ref:o,className:r,...t}):n("div",{ref:o,"aria-hidden":!0,className:r,...t})});oi.displayName=hn.displayName;function ae({className:e,...t}){return n("div",{className:y("animate-pulse rounded-md bg-surface-selected",e),...t})}var Pt=N(({checked:e,className:t,disabled:o,size:r="sm",onCheckedChange:i,onClick:a,...s},l)=>n("button",{...s,ref:l,type:"button",role:"switch","aria-checked":e,disabled:o,"data-state":e?"checked":"unchecked",className:y(`peer inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent bg-input shadow-xs ${be} outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-foreground data-[state=unchecked]:border-input data-[state=unchecked]:bg-muted`,r==="default"&&"h-5 w-9",r==="sm"&&"h-4 w-7",t),onClick:m=>{a?.(m),m.defaultPrevented||i?.(!e)},children:n("span",{"aria-hidden":!0,"data-state":e?"checked":"unchecked",className:y("pointer-events-none block rounded-full bg-background ring-0 transition-transform data-[state=unchecked]:bg-foreground data-[state=unchecked]:translate-x-0",r==="default"&&"size-4 data-[state=checked]:translate-x-4",r==="sm"&&"size-3 data-[state=checked]:translate-x-3")})}));Pt.displayName="Switch";var xn=globalThis.__bbPluginRuntime;if(xn==null||xn.radixTooltip==null)throw new Error('Cannot load "@radix-ui/react-tooltip": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Et=xn.radixTooltip,bu="default"in Et?Et.default:Et,{Arrow:xu,Content:Rn,Portal:Ho,Provider:$o,Root:Fo,Tooltip:Ru,TooltipArrow:yu,TooltipContent:Cu,TooltipPortal:wu,TooltipProvider:Su,TooltipTrigger:Nu,Trigger:yn,createTooltipScope:Pu}=Et;var zo=$o,Vo=Fo,Cn=N(function({onFocus:t,...o},r){return n(yn,{ref:r,onFocus:i=>{t?.(i),!i.defaultPrevented&&!_e()&&i.preventDefault()},...o})});Cn.displayName=yn.displayName;var wn=N(function({avoidCollisions:t=!0,className:o,collisionPadding:r=8,sideOffset:i=4,...a},s){return n(Ho,{children:n(Rn,{ref:s,...ue(),avoidCollisions:t,collisionPadding:r,sideOffset:i,className:y("z-50 max-w-[min(20rem,var(--radix-tooltip-content-available-width))] overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground break-words animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o),...a})})});wn.displayName=Rn.displayName;var kt="storage",ai=[7,14,30,60,90,180,365],ii=[7,30,90,180,365];function k(e){if(e<1024)return`${e} B`;let t=Math.min(Math.floor(Math.log(e)/Math.log(1024)),4);return`${Number((e/1024**t).toFixed(1))} ${["B","KB","MB","GB","TB"][t]}`}function Ve(e){let t=Math.round((Date.now()-e)/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let o=Math.round(t/60);return o<24?`${o}h ago`:`${Math.round(o/24)}d ago`}function si(e){return e%365===0?e===365?"1 year":`${e/365} years`:e%7===0&&e<=28?e===7?"1 week":`${e/7} weeks`:e===1?"1 day":`${e} days`}function F(e,t,o=`${t}s`){return`${e.toLocaleString()} ${e===1?t:o}`}function ze(e){return e instanceof Error?e.message:String(e)}function Se(e,t,o){let r={development:["Deleting development data","Development data deleted","Couldn\u2019t delete development data"],orphans:["Deleting orphaned files","Orphaned files deleted","Couldn\u2019t delete orphaned files"],worktrees:["Retrying checkout cleanup","Checkout cleanup retried","Couldn\u2019t clean up checkouts"],externalWorktrees:["Removing worktrees created outside Moonlet","Worktrees removed","Couldn\u2019t remove worktrees"],largeFileCleanup:["Deleting large archived files","Large archived files deleted","Couldn\u2019t delete large archived files"],archivedFileCleanup:["Deleting archived thread files","Archived thread files deleted","Couldn\u2019t delete archived thread files"]},[i,a,s]=r[e];return{title:i,completed:a,failed:s,description:o,background:{hostId:t},id:`storage:${t??"all"}:${e==="largeFileCleanup"||e==="archivedFileCleanup"?e:"maintenance"}`}}function li(e){let t=Lt(),o=Ln(),[r,i]=D(null),[a,s]=D(null),l=T(0),m=T(0),u=I(h=>{l.current++,i(v=>v===null?null:{...v,state:h})},[]),f=I(async()=>{let h=l.current,v=++m.current;try{let[b,S,_,P]=await Promise.all([t.call("state",null),t.call("hosts",null),o.hosts.list({type:"persistent"}),o.system.config()]);if(v!==m.current)return;i(E=>({state:h===l.current||E===null?b:E.state,hosts:S.hosts,machines:Object.fromEntries(_.map(M=>[M.id,M])),primaryHostId:P.primaryHostId})),s(null)}catch(b){v===m.current&&s(ze(b))}},[t,o]),p=T(new Map);return A(()=>{for(let h of r?.hosts??[])for(let v of["largeFileCleanup","archivedFileCleanup","maintenance"]){let b=h[v],S=`${h.hostId}:${v}`,_=JSON.stringify(b),P=p.current.get(S);if(P!==void 0&&P!==_&&b.state!=="idle"){let E=r?.machines[h.hostId]?.name??h.hostId,M=Se("kind"in b?b.kind:v==="largeFileCleanup"?"largeFileCleanup":"archivedFileCleanup",h.hostId,E);b.state==="running"&&J.loading(M.title,{id:M.id,description:E}),b.state==="failed"&&J.error(M.failed,{id:M.id,description:`${E} \xB7 ${b.message}`}),b.state==="completed"&&J.success(M.completed,{id:M.id,description:`${E} \xB7 ${"message"in b?b.message:`${k(b.clearedBytes)} freed`}`})}p.current.set(S,_)}},[r]),A(()=>{f()},[f]),At("changed",f),At("policy-changed",async()=>{let h=l.current;try{let v=await t.call("state",null);h===l.current&&u(v)}catch(v){J.error("Couldn\u2019t refresh retention settings",{description:ze(v)})}}),A(()=>o.subscribe({event:"realtime:connection",callback:h=>{h.state==="connected"&&h.reconnected&&f()}}),[o,f]),n(ci,{hostId:e.subPath||null,data:r,loadError:a,refresh:f,updateState:u},e.subPath)}function ci({hostId:e,data:t,loadError:o,refresh:r,updateState:i}){let a=Lt(),s=Xe(),l=t?.state??null,m=t?.hosts??[],u=t?.machines??{},f=t?.primaryHostId??null,p=m.find(d=>d.hostId===e)??null,[h,v]=D(!1),b=T(!1),[S,_]=D(!1),P=S||m.some(d=>(e===null||d.hostId===e)&&(d.largeFileCleanup.state==="running"||d.archivedFileCleanup.state==="running"||d.maintenance.state==="running")),[E,M]=D({}),[j,z]=D(null),W=l?.policy??null,[O,me]=D(null);function X(d){me(d)}async function se(d,C={title:"Starting storage scan",completed:"Storage scan started",failed:"Couldn\u2019t start storage scan",description:e?u[e]?.name??e:"Online machines"},U){_(!0);let B=J.loading(C.title,{id:C.id,description:C.description});try{let H=await d();C.background?C.background.hostId===null&&J.info(C.title,{id:B,description:"Started on all online machines"}):J.success(C.completed,{id:B,description:U?.(H)||C.description}),r()}catch(H){J.error(C.failed,{id:B,description:`${C.description} \xB7 ${ze(H)}`})}finally{_(!1)}}async function x(d,C){if(l===null||b.current)return;let U=l,B={...l,policy:{...l.policy,[d]:C}};b.current=!0,v(!0),i(B);let H={archiveAfterDays:"Archive inactive threads",deleteAfterDays:"Delete archived threads",deleteStorageOnArchive:"Delete thread storage on archive",deleteDevDataOnCheckoutRemoval:"Delete development data when its checkout is removed"}[d];try{i(await a.call("configure",B.policy))}catch(G){i(U),J.error("Couldn\u2019t save setting",{description:`${H} \xB7 ${ze(G)}`})}finally{b.current=!1,v(!1)}}async function R(d,C,U){if(E[d]?.state==="running")return;M(H=>({...H,[d]:{state:"running"}}));let B=J.loading(C.title,{description:C.description});try{let H=await U();H===null?J.dismiss(B):J.success(C.completed,{id:B,description:H||C.description}),r()}catch(H){J.error(C.failed,{id:B,description:`${C.description} \xB7 ${ze(H)}`})}finally{M(H=>{let G={...H};return delete G[d],G})}}let Y=l!==null&&(l.policy.archiveAfterDays!==null||l.policy.deleteAfterDays!==null),g=p?.report,Z=g?.developerStorage?.entries.filter(d=>d.sourcePathState==="missing"&&!d.current)??[],ie=g?.externalWorktrees.reduce((d,C)=>d+C.sizeBytes,0)??0,w=Z.reduce((d,C)=>d+C.sizeBytes,0),V=e!==null&&j===e,L=p?.scan.state==="scanning",K=e?u[e]:void 0,de=K!==void 0&&K.status!=="connected",Qo=Object.values(E).some(d=>d.state==="running"),Pe=P||de||Qo,_t=P||de;function Xo(d,C,U){return{key:"dev-instances",feedback:Se("development",d,u[d]?.name??d),action:"Remove instances",title:`Remove ${F(C,"development instance")} (${k(U)})?`,detail:"Delete the databases, logs, and thread files of development instances whose source checkout no longer exists. Development servers still running from those checkouts are stopped first. This can\u2019t be undone.",run:async()=>(await a.call("startCleanup",{hostId:d,kind:"development"}),"Development storage cleanup started in the background.")}}function Tn(d,C){return{key:"large-files",feedback:Se("largeFileCleanup",d,d?u[d]?.name??d:"All online machines"),action:"Delete large files",title:`Delete ${C.fileCount.toLocaleString()} large ${C.fileCount===1?"file":"files"} (${k(C.bytes)})?`,detail:`Delete files of ${k(10485760)} or more from ${F(C.threadCount,"archived thread")}. Smaller files and conversation history will be kept. Pinned threads are skipped. This can\u2019t be undone.`,run:async()=>(await a.call("startClearLargeFiles",{hostId:d}),"Large-file cleanup started in the background.")}}let qo=m.filter(d=>u[d.hostId]?.status==="connected"&&d.scan.state!=="scanning"),fe=m.reduce((d,C)=>C.report&&u[C.hostId]?.status==="connected"?{threadCount:d.threadCount+C.report.archivedLargeFiles.threadCount,fileCount:d.fileCount+C.report.archivedLargeFiles.fileCount,bytes:d.bytes+C.report.archivedLargeFiles.bytes}:d,{threadCount:0,fileCount:0,bytes:0}),Ke=m.filter(d=>{let C=d.largeFileCleanup;return(e===null||d.hostId===e)&&C.state==="running"}),kn=Ke.some(d=>d.largeFileCleanup.state==="running"),_n=Ke.length>0&&n("div",{className:"space-y-2 border-t border-border pt-3",children:Ke.map(d=>d.largeFileCleanup.state!=="running"?null:c("p",{role:"status",className:"flex items-center gap-2 text-xs text-muted-foreground",children:[n(ne,{name:"Spinner",className:"size-3.5 shrink-0 animate-spin"}),e===null&&`${u[d.hostId]?.name??d.hostId}: `,"Deleting large files\u2026"]},d.hostId))}),Zo=fe.bytes>=1073741824||Ke.length>0?[{title:kn?"Deleting large files":fe.bytes>=1073741824?`Free up ${k(fe.bytes)} from archived threads`:"Large-file cleanup",description:kn||fe.bytes<1073741824?"Smaller files and conversation history are kept.":`${F(fe.fileCount,"file")} of ${k(10485760)} or more sit in the thread storage of ${F(fe.threadCount,"archived thread")}. Deleting them keeps smaller files like reports, and conversation history isn\u2019t affected.`,action:"Delete large files",cleanup:Tn(null,fe)}]:[],he=O&&c("div",{role:"region","aria-label":"Confirm cleanup",className:"flex flex-col gap-3 rounded-lg border border-destructive/30 bg-destructive/5 p-3",children:[c("div",{className:"flex flex-col gap-1",children:[n("p",{className:"text-sm font-medium",children:O.title}),n("p",{className:"text-xs leading-snug text-subtle-foreground/75",children:O.key==="archived-files"&&g?`Delete ${k(g.archivedFiles.bytes)} of stored files from ${F(g.archivedFiles.threadCount,"archived thread")} on this machine. Conversations and uploaded attachments are kept. Pinned and running threads are skipped. This can\u2019t be undone.`:O.detail})]}),c("div",{className:"flex flex-wrap justify-end gap-2",children:[n(te,{variant:"outline",size:"sm",disabled:P,onClick:()=>X(null),children:"Cancel"}),n(te,{variant:"destructive",size:"sm",disabled:P,onClick:()=>{se(async()=>{let d=await O.run();return X(null),d},O.feedback,d=>d)},children:P?"Removing\u2026":O.action})]})]}),Dn=L&&n("p",{role:"status",className:"text-xs leading-snug text-subtle-foreground/75",children:"Scanning in the background. Large directories may take a few minutes."}),Jo=c("aside",{"aria-label":"What is thread storage?",className:"flex items-start gap-3 rounded-lg border border-border bg-muted/40 px-4 py-3",children:[n(ne,{name:"Info",className:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),c("div",{className:"min-w-0 space-y-1",children:[n("h2",{className:"text-sm font-medium",children:"What is thread storage?"}),n("p",{className:"text-xs leading-snug text-subtle-foreground/75",children:"A place for your agent to keep things that don\u2019t belong in the repo, like plans, reports, and scratch files you don\u2019t want to commit. Clearing it removes those files for good. Your conversation history and uploaded attachments are kept separately."})]})]});return n("div",{className:"h-full w-full overflow-y-auto",children:c("div",{className:y("mx-auto w-full max-w-3xl px-4 pb-10 pt-4 md:px-5 md:pt-5",e?"space-y-6":"space-y-10"),children:[e&&l&&c("header",{className:"space-y-3",children:[c("button",{className:"inline-flex items-center gap-1.5 text-xs leading-snug text-subtle-foreground/75 hover:text-foreground",onClick:()=>s.toPluginPanel(kt),children:[n(ne,{name:"ArrowLeft",className:"size-4"}),"All machines"]}),c("div",{className:"flex flex-col items-start justify-between gap-4 sm:flex-row",children:[c("div",{className:"min-w-0 flex-1",children:[c("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[n("h1",{className:"min-w-0 break-words text-base font-semibold",children:K?.name??"Machine storage"}),c("div",{className:"flex shrink-0 items-center gap-1.5",children:[e===f&&n(We,{children:"server"}),K&&n(Go,{machine:K})]})]}),n("p",{className:"mt-0.5 text-xs leading-snug text-subtle-foreground/75",children:"Review stored files and free up space on this machine."})]}),c(te,{variant:"outline",size:"sm",className:"shrink-0",disabled:S||L||de||!p,onClick:()=>{se(()=>a.call("scanHost",{hostId:e}))},children:[n(ne,{name:"RotateCcw",className:L?"animate-spin":""}),L?"Scanning\u2026":g?"Rescan machine":"Scan machine"]})]})]}),o&&c("div",{role:"alert",className:"flex flex-wrap items-center justify-between gap-3 rounded-lg border border-destructive/30 bg-destructive/5 px-4 py-3 text-sm text-destructive",children:[n("p",{children:o}),o&&n(te,{variant:"outline",size:"sm",onClick:()=>{r()},children:"Try again"})]}),p?.maintenance.state==="running"&&n("p",{role:"status",className:"text-xs text-muted-foreground",children:p.maintenance.kind==="orphans"?"Removing orphaned storage\u2026":p.maintenance.kind==="development"?"Removing development instances\u2026":p.maintenance.kind==="externalWorktrees"?"Removing worktrees created outside Moonlet\u2026":"Retrying worktree cleanup\u2026"}),l?e?c("div",{className:"space-y-6",children:[Jo,de&&c("div",{role:"status",className:"flex items-start gap-2 rounded-lg border border-border bg-muted/40 px-3 py-2.5 text-xs leading-snug text-subtle-foreground",children:[n(ne,{name:"CloudOff",className:"mt-px size-3.5 shrink-0"}),n("p",{children:"This machine is offline. Scanning and cleanup are available once it reconnects."})]}),p?.scan.state==="failed"&&c("p",{role:"alert",className:"text-sm text-destructive",children:["Scan failed: ",p.scan.message]}),g?c(re,{children:[c("section",{className:"space-y-4 rounded-lg border border-border bg-card px-4 py-3.5","aria-label":"Storage breakdown",children:[c("div",{className:"flex items-baseline justify-between gap-3",children:[n("p",{className:"text-sm font-medium",children:g.developerStorage?"Total":"Thread storage"}),n("p",{className:"text-lg font-semibold tabular-nums",children:k(Yo(g).reduce((d,C)=>d+C.value,0))})]}),n(xi,{report:g}),c("div",{className:"space-y-1 border-t border-border pt-3 text-xs text-muted-foreground",children:[g.disk&&c("p",{className:"tabular-nums",children:["Disk space: ",k(g.disk.freeBytes)," free of"," ",k(g.disk.totalBytes)]}),c("p",{title:new Date(g.scannedAt).toLocaleString(),children:["Scanned ",Ve(g.scannedAt)]}),Dn]})]}),n(mi,{report:g}),c("section",{className:"space-y-3",children:[n(Me,{title:"Clean up"}),c("div",{className:"divide-y divide-border rounded-lg border border-border bg-card",children:[c(De,{title:"All files in archived threads",size:g.archivedFiles.bytes,description:`Clear stored files of any size from ${F(g.archivedFiles.threadCount,"archived thread")}. Pinned and running threads are skipped. Conversations and uploaded attachments are kept.`,action:"Clear archived files",disabled:Pe||g.archivedFiles.threadCount===0,onAction:()=>X({key:"archived-files",feedback:Se("archivedFileCleanup",g.hostId,K?.name??g.hostId),title:"Clear all archived thread files?",action:"Clear archived files",detail:`Delete ${k(g.archivedFiles.bytes)} of stored files from ${F(g.archivedFiles.threadCount,"archived thread")} on this machine. This includes small files. Conversations and uploaded attachments will be kept. Pinned and running threads are skipped. This can\u2019t be undone.`,run:async()=>(await a.call("startClearArchivedFiles",{hostId:g.hostId}),"Archived-file cleanup started in the background.")}),children:[O?.key==="archived-files"&&he,p?.archivedFileCleanup&&p.archivedFileCleanup.state==="running"&&c("p",{role:"status",className:"mt-3 text-xs text-muted-foreground",children:["Removing archived files in the background. Cleared"," ",k(p.archivedFileCleanup.clearedBytes)," ","from"," ",F(p.archivedFileCleanup.clearedThreads,"thread"),"."]})]}),c(De,{title:"Large files in archived threads",size:g.archivedLargeFiles.bytes,description:g.archivedLargeFiles.fileCount?`${F(g.archivedLargeFiles.fileCount,"file")} of ${k(10485760)} or more across ${F(g.archivedLargeFiles.threadCount,"archived thread")}. Smaller files and conversation history are kept.`:`No files of ${k(10485760)} or more in archived threads.`,action:"Delete large files",disabled:Pe||g.archivedLargeFiles.fileCount===0,onAction:()=>X(Tn(g.hostId,g.archivedLargeFiles)),children:[O?.key==="large-files"&&he,_n]}),n(De,{title:"Orphaned storage",size:g.orphanBytes,description:"Files left behind by deleted threads. Moonlet cleans these up automatically while idle.",action:"Remove orphans",disabled:Pe||g.orphanCount===0,onAction:()=>X({key:"orphans",feedback:Se("orphans",g.hostId,K?.name??g.hostId),action:"Remove orphans",title:`Remove ${k(g.orphanBytes)} of orphaned storage?`,detail:"Delete folders no longer attached to a thread. Existing threads and their files will be kept. This can\u2019t be undone.",run:async()=>(await a.call("startCleanup",{kind:"orphans",hostId:g.hostId}),"Orphan cleanup started in the background.")}),children:O?.key==="orphans"&&he}),n(De,{title:"Leftover worktrees",size:g.leftoverWorktreeBytes,description:"Checkouts Moonlet could not remove after their threads were archived. Moonlet retries automatically.",action:"Retry cleanup",disabled:Pe||g.leftoverWorktrees.length===0,onAction:()=>{se(async()=>{await a.call("startCleanup",{kind:"worktrees",hostId:e})},Se("worktrees",e,K?.name??e??"Machine"))},children:g.leftoverWorktrees.length>0&&c("details",{className:"text-xs text-muted-foreground",children:[c("summary",{className:"cursor-pointer",children:[F(g.leftoverWorktrees.length,"checkout")," ","awaiting removal"]}),n("div",{className:"mt-2 space-y-2",children:g.leftoverWorktrees.map(d=>c("div",{className:"space-y-1 border-l border-border pl-3",children:[n("p",{className:"break-all",children:d.path}),c("p",{className:"mt-1 text-muted-foreground",children:[k(d.sizeBytes),d.teardownMessage&&` \xB7 ${d.teardownMessage}`]})]},d.environmentId))})]})}),c(De,{title:"Worktrees created outside Moonlet",size:ie,description:"Git worktrees of your projects that Moonlet didn\u2019t create, such as ones agents added with git worktree add. Removing them keeps their branches. Bulk removal keeps worktrees with uncommitted changes, locked worktrees, and detached worktrees with commits on no branch; remove those one at a time.",action:"Remove worktrees",disabled:Pe||g.externalWorktrees.length===0,onAction:()=>X({key:"external-worktrees",feedback:Se("externalWorktrees",g.hostId,K?.name??g.hostId),action:"Remove worktrees",title:`Remove ${F(g.externalWorktrees.length,"worktree")} created outside Moonlet (${k(ie)})?`,detail:"Delete these checkouts, including ignored files such as dependencies, build output, and local env files. Branches and commits stay in the repository. Worktrees with uncommitted changes, locked worktrees, and detached worktrees with commits on no branch are kept; remove those one at a time. Make sure no agent is still working in them. This can\u2019t be undone.",run:async()=>(await a.call("startCleanup",{kind:"externalWorktrees",hostId:g.hostId}),"Worktree removal started in the background.")}),children:[O?.key==="external-worktrees"&&he,g.externalWorktrees.length>0&&n(vi,{worktrees:g.externalWorktrees,projectNames:new Map(g.projectWorktrees.map(d=>[d.projectId,d.projectName])),rowDisabled:_t,rowActions:E,confirmationKey:O?.key??null,confirmation:he,onRemove:(d,C)=>{let U={title:"Removing worktree",completed:"Worktree removed",failed:"Couldn\u2019t remove worktree",description:d.path},B=async H=>{let G=await a.call("removeExternalWorktrees",{hostId:g.hostId,paths:[d.path],force:H}),ve=G.failed[0];if(ve)throw new Error(ve.message);return G};R(`worktree:${d.path}`,U,async()=>{let H=await B(!1),G=H.skipped[0]?.reasons;if(G===void 0)return`${d.path} \xB7 ${k(H.removedBytes)} freed`;let ve=G.filter(le=>le==="locked"||le==="uncommittedChanges"||le==="unsavedCommits");if(ve.length!==G.length)throw new Error(Ko[G[0]]);return X({key:`external-worktree:${d.path}`,feedback:U,action:"Remove anyway",title:`Remove \u201C${C}\u201D anyway (${k(d.sizeBytes)})?`,detail:[...ve.map(le=>fi[le]),"The checkout is deleted, including ignored files. Its branch is kept. This can\u2019t be undone."].join(" "),run:async()=>{let le=await B(!0),Mn=le.skipped[0];if(Mn)throw new Error(Ko[Mn.reasons[0]]);return`${d.path} \xB7 ${k(le.removedBytes)} freed`}}),null})}})]}),g.developerStorage&&n(De,{title:"Development instances without a checkout",size:w,description:`${F(Z.length,"development instance")} in ~/.bb-dev whose source checkout no longer exists. Servers still running from them are stopped before removal.`,action:"Remove instances",disabled:Pe||Z.length===0,onAction:()=>X(Xo(g.hostId,Z.length,w)),children:O?.key==="dev-instances"&&he})]})]}),c("section",{className:"space-y-3",children:[n(Me,{title:"Threads using the most storage",description:"Clear files permanently removes a stopped thread\u2019s stored files, including small files. Conversation history is kept."}),c("div",{className:"divide-y divide-border rounded-lg border border-border bg-card",children:[g.largestThreads.length===0&&n("p",{className:"p-6 text-center text-xs leading-snug text-subtle-foreground/75",children:"No thread files found in the last scan."}),(V?g.largestThreads:g.largestThreads.slice(0,Ne)).map(d=>{let C=E[d.threadId];return c("div",{className:"flex items-start justify-between gap-3 px-4 py-2.5",children:[c("div",{className:"min-w-0 flex-1 space-y-1",children:[n(jo,{title:d.title,pills:[...d.hidden?["hidden"]:[],...d.pinned?["pinned"]:[],...d.running?["running"]:d.archivedAt!==null?["archived"]:[]],onOpen:()=>s.toThread(d.threadId)}),n(Pn,{action:C,runningLabel:"Clearing files\u2026"})]}),c("div",{className:"flex h-5 shrink-0 items-center gap-2",children:[n("span",{className:"text-xs tabular-nums text-muted-foreground",children:k(d.sizeBytes)}),n(Nn,{label:"Clear files",target:d.title,action:C,disabled:_t||d.running,onClick:()=>{R(d.threadId,{title:"Deleting thread files",completed:"Thread files deleted",failed:"Couldn\u2019t delete thread files",description:d.title},async()=>(await a.call("clearThread",{threadId:d.threadId}),d.title))}})]})]},d.threadId)}),g.largestThreads.length>Ne&&n("div",{className:"px-4 py-2.5",children:n(En,{expanded:V,total:g.largestThreads.length,onToggle:()=>z(V?null:e)})})]})]}),g.developerStorage&&n(bi,{storage:g.developerStorage,rowDisabled:_t,rowActions:E,confirmationKey:O?.key??null,confirmation:he,onRemoveSelected:d=>{let C=d.reduce((B,H)=>B+H.sizeBytes,0),U=d.filter(B=>B.running).length;X({key:"dev-selected",feedback:{title:"Deleting development data",completed:"Development data deleted",failed:"Couldn\u2019t delete development data",description:F(d.length,"development instance")},action:"Remove instances",title:`Remove ${F(d.length,"development instance")} (${k(C)})?`,detail:`Delete their databases, logs, and thread files. Source checkouts are kept.${U>0?` ${F(U,"dev server")} running at the last scan ${U===1?"is":"are"} stopped first.`:""} This can\u2019t be undone.`,run:async()=>{let B=0,H=0;for(let G=0;G<d.length;G+=500){let ve=await a.call("removeDevInstances",{hostId:g.hostId,names:d.slice(G,G+500).map(le=>le.name),stopRunning:!0});B+=ve.removedCount,H+=ve.removedBytes}if(B===0)throw new Error("No data was deleted. Rescan the machine to update its status.");return`${F(B,"instance")} removed \xB7 ${k(H)} freed`}})},onRemove:(d,C)=>{R(`dev:${d.name}`,{title:"Deleting development data",completed:"Development data deleted",failed:"Couldn\u2019t delete development data",description:`${g.developerStorage.path}/${d.name}`},async()=>{let U=await a.call("removeDevInstances",{hostId:g.hostId,names:[d.name],stopRunning:!1});if(U.running.length>0)X({key:`dev-instance:${d.name}`,feedback:{title:"Deleting development data",completed:"Development data deleted",failed:"Couldn\u2019t delete development data",description:`${g.developerStorage.path}/${d.name}`},action:"Stop and remove",title:`Stop and remove \u201C${C}\u201D (${k(d.sizeBytes)})?`,detail:"Its dev server is running. Moonlet will stop it, then delete its database, logs, and thread files. The source checkout is kept. This can\u2019t be undone.",run:async()=>{let B=await a.call("removeDevInstances",{hostId:g.hostId,names:[d.name],stopRunning:!0});if(B.removedCount===0)throw new Error("No data was deleted. Rescan the machine to update its status.");return`${g.developerStorage.path}/${d.name} \xB7 ${k(B.removedBytes)} freed`}});else{if(U.removedCount===0)throw new Error("No data was deleted. Rescan the machine to update its status.");return`${g.developerStorage.path}/${d.name} \xB7 ${k(U.removedBytes)} freed`}return null})}})]}):c("div",{className:"flex flex-col items-center gap-3 rounded-lg border border-dashed border-border px-6 py-12 text-center",children:[n(Qe,{name:"DatabaseRestore",className:"size-8 text-muted-foreground"}),n("h2",{className:"text-base font-medium",children:L?"Scanning this machine":"See what\u2019s taking up space"}),L?Dn:n("p",{className:"max-w-sm text-xs leading-snug text-subtle-foreground/75",children:"Scan this machine to measure thread files and find storage you can clean up. Nothing is removed during a scan."})]})]}):c(re,{children:[Zo.map(d=>c("div",{className:"space-y-3 rounded-lg border border-border bg-muted/40 px-4 py-3",children:[c("div",{className:"flex flex-col items-start gap-3 sm:flex-row sm:items-center",children:[n(ne,{name:"Clean",className:"hidden size-4 shrink-0 text-subtle-foreground sm:block"}),c("div",{className:"min-w-0 flex-1",children:[n("p",{className:"text-sm font-normal",children:d.title}),n("p",{className:"mt-0.5 text-xs leading-snug text-subtle-foreground/75",children:d.description})]}),n(te,{variant:"outline",size:"sm",className:"shrink-0",disabled:P||fe.fileCount===0,onClick:()=>X(d.cleanup),children:d.action})]}),O?.key===d.cleanup.key&&he,_n]},d.cleanup.key)),c("section",{className:"space-y-3",children:[n(Me,{title:"Machine storage",action:c(te,{variant:"outline",size:"sm",disabled:S||qo.length===0,onClick:()=>{se(()=>a.call("scanAll",null))},children:[n(ne,{name:"RotateCcw"}),"Scan all"]})}),c("div",{className:"divide-y divide-border overflow-hidden rounded-lg border border-border bg-card",children:[m.length===0&&c("div",{className:"space-y-2 p-6 text-center",children:[n("p",{className:"text-sm font-normal",children:"No machines connected yet"}),n("p",{className:"text-xs leading-snug text-subtle-foreground/75",children:"Add a persistent machine in Settings \u2192 Machines to inspect its storage."})]}),m.map(d=>n(pi,{host:d,machine:u[d.hostId],server:d.hostId===f,busy:S,onOpen:()=>s.toPluginPanel(kt,{subPath:d.hostId}),onScan:()=>{se(()=>a.call("scanHost",{hostId:d.hostId}),{title:"Starting storage scan",completed:"Storage scan started",failed:"Couldn\u2019t start storage scan",description:u[d.hostId]?.name??d.hostId})}},d.hostId))]})]}),c("section",{className:"space-y-3",children:[n(Me,{title:"Automatic retention",description:"Archive or delete inactive threads across all projects. Changes save automatically.",badge:Y?"Checks hourly":"Off"}),c("div",{role:"note",className:"flex items-start gap-2 rounded-lg border border-border bg-muted/40 px-3 py-2.5 text-xs leading-snug text-subtle-foreground",children:[n(ne,{name:"Pin",className:"mt-px size-3.5 shrink-0"}),c("p",{children:[n("span",{className:"text-foreground",children:"Pinned threads are never archived or deleted."})," ","Automation targets aren\u2019t protected on their own, so pin the ones you want to keep."]})]}),W&&c("div",{className:"divide-y divide-border rounded-lg border border-border bg-card",children:[n(Wo,{label:"Archive inactive threads",description:"After this long with no activity.",presets:ai,value:W.archiveAfterDays,disabled:h,onChange:d=>{x("archiveAfterDays",d)}}),n(Wo,{label:"Delete archived threads",description:"Permanently, after this long in the archive.",presets:ii,value:W.deleteAfterDays,disabled:h,onChange:d=>{x("deleteAfterDays",d)}}),c("label",{className:"flex items-center justify-between gap-4 px-4 py-3",children:[c("span",{children:[n("span",{className:"block text-sm font-medium",children:"Delete thread storage on archive"}),n("span",{className:"block text-xs text-muted-foreground",children:"Permanently remove files after archiving. Conversations and uploaded attachments are kept. Pinned threads are skipped."})]}),n(Pt,{"aria-label":"Delete thread storage on archive",checked:W.deleteStorageOnArchive,disabled:h,onCheckedChange:d=>{x("deleteStorageOnArchive",d)}})]}),c("label",{className:"flex items-center justify-between gap-4 px-4 py-3",children:[c("span",{children:[n("span",{className:"block text-sm font-medium",children:"Delete development data when its checkout is removed"}),n("span",{className:"block text-xs text-muted-foreground",children:"After scans, remove ~/.bb-dev folders with missing checkouts and stop their servers. Checks run hourly, including for existing development data."})]}),n(Pt,{"aria-label":"Delete development data when its checkout is removed",checked:W.deleteDevDataOnCheckoutRemoval,disabled:h,onCheckedChange:d=>{x("deleteDevDataOnCheckoutRemoval",d)}})]}),(l.lastRun||Y)&&n("div",{className:"px-4 py-2.5",children:n("p",{className:"text-xs text-muted-foreground",children:l.lastRun?`Last checked ${Ve(l.lastRun.ranAt)} \xB7 ${l.lastRun.archivedCount} archived \xB7 ${l.lastRun.deletedCount} deleted${l.lastRun.failedCount?` \xB7 ${l.lastRun.failedCount} failed`:""}`:"The first check runs within the hour."})})]})]})]}):!o&&n(to,{children:n(di,{detail:e!==null})})]})})}function di({detail:e}){let t=o=>n("div",{className:"divide-y divide-border rounded-lg border border-border bg-card",children:Array.from({length:o},(r,i)=>c("div",{className:"space-y-2 px-4 py-3.5",children:[n(ae,{className:"h-3.5 w-28"}),n(ae,{className:"h-3 w-56"})]},i))});return n("div",{role:"status","aria-label":"Loading storage",className:"space-y-10",children:e?c(re,{children:[c("div",{className:"space-y-3",children:[n(ae,{className:"h-3 w-24"}),n(ae,{className:"h-5 w-40"}),n(ae,{className:"h-3 w-72"})]}),c("div",{className:"space-y-4 rounded-lg border border-border bg-card px-4 py-3.5",children:[n(ae,{className:"h-6 w-24"}),n(ae,{className:"h-1.5 w-full"}),n("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-4",children:Array.from({length:4},(o,r)=>n(ae,{className:"h-8"},r))})]}),t(2)]}):c(re,{children:[c("div",{className:"space-y-3",children:[n(ae,{className:"h-4 w-32"}),t(3)]}),c("div",{className:"space-y-3",children:[n(ae,{className:"h-4 w-40"}),n(ae,{className:"h-12 w-full rounded-lg"}),t(2)]})]})})}function We({children:e,className:t}){return n("span",{className:y("shrink-0 rounded-sm border border-border bg-muted/40 px-1.5 py-0.5 text-2xs leading-none text-subtle-foreground",t),children:e})}function jo({title:e,pills:t,onOpen:o}){return c("button",{className:"group min-w-0 break-words text-left text-sm font-normal",title:e,onClick:o,children:[n("span",{className:"group-hover:underline",children:e}),t.map(r=>c(Ie,{children:[" ",n(We,{className:"inline-block whitespace-nowrap align-middle",children:r})]},r))]})}function Me({title:e,description:t,badge:o,action:r}){return c("div",{className:"flex items-end justify-between gap-4",children:[c("div",{className:"min-w-0",children:[c("div",{className:"flex min-w-0 items-center gap-2",children:[n("h2",{className:"text-sm font-semibold",children:e}),o&&n(We,{children:o})]}),t&&n("p",{className:"mt-0.5 text-xs leading-snug text-subtle-foreground/75",children:t})]}),r]})}function De({title:e,size:t,description:o,action:r,disabled:i,onAction:a,children:s}){return c("div",{className:"space-y-3 px-4 py-3.5",children:[c("div",{className:"flex flex-col items-start justify-between gap-3 sm:flex-row",children:[c("div",{className:"min-w-0 flex-1",children:[c("p",{className:"text-sm font-normal",children:[e,t>0&&" ",n(ui,{value:t})]}),n("p",{className:"mt-0.5 text-xs leading-snug text-subtle-foreground/75",children:o})]}),n(te,{variant:"outline",size:"sm",disabled:i,onClick:a,children:r})]}),s]})}function ui({value:e}){return e===0?null:n("span",{className:"inline-flex whitespace-nowrap rounded-md bg-muted/50 px-1.5 py-0.5 text-xs font-normal tabular-nums text-muted-foreground",children:k(e)})}function Go({machine:e}){let t=e.status==="connected";return c("span",{className:"inline-flex shrink-0 items-center gap-1.5 text-xs text-subtle-foreground/75",children:[n("span",{"aria-hidden":!0,className:y("size-1.5 shrink-0 rounded-full",t?"bg-success":"border border-muted-foreground")}),t?"Online":e.lastSeenAt?`Offline \xB7 last seen ${Ve(e.lastSeenAt)}`:"Offline"]})}function pi({host:e,machine:t,server:o,busy:r,onOpen:i,onScan:a}){let s=e.report,l=e.scan.state==="scanning",m=t?.name??e.hostId,u=l?"scanning\u2026":e.scan.state==="failed"?"scan failed":s?`scanned ${Ve(s.scannedAt)}`:"not scanned",f=s?[`${k(Uo(s))} in ${F(s.threadsWithStorageCount,"thread")}`,...s.developerStorage?[`${k(s.developerStorage.sizeBytes)} in ${F(s.developerStorage.entries.length,"dev instance")}`]:[],...s.disk?[`${k(s.disk.freeBytes)} free`]:[]]:[];return c("div",{className:"flex w-full cursor-pointer items-start gap-3 px-4 py-3 transition-colors hover:bg-muted/40",onClick:p=>{p.target instanceof Element&&p.target.closest("button")!==null||i()},children:[c("span",{className:"min-w-0 flex-1 space-y-1",children:[c("span",{className:"flex min-w-0 items-center gap-1.5",children:[n(ne,{name:"Laptop",className:"size-3.5 shrink-0 text-subtle-foreground"}),n("button",{className:"min-w-0 truncate rounded-sm text-left text-sm font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onClick:i,children:m}),o&&n(We,{children:"server"})]}),c("span",{className:"flex min-w-0 flex-wrap items-center gap-x-1.5 text-xs text-subtle-foreground/75",children:[t&&n(Go,{machine:t}),n("span",{"aria-hidden":!0,children:"\xB7"}),n("span",{children:u})]}),f.length>0&&n("span",{className:"block text-xs tabular-nums text-subtle-foreground/75",children:f.map((p,h)=>c("span",{children:[c("span",{className:"whitespace-nowrap",children:[p,h<f.length-1&&"\xA0\xB7"]}),h<f.length-1&&" "]},p))})]}),c("span",{className:"-my-1 flex shrink-0 items-center gap-1",children:[s&&n("span",{className:"mr-1 text-sm font-medium tabular-nums",children:k(Uo(s)+(s.developerStorage?.sizeBytes??0))}),n(te,{variant:"ghost",size:"icon",className:"size-7","aria-label":`${s?"Rescan":"Scan"} ${m}`,disabled:r||l||t?.status!=="connected",onClick:a,children:n(ne,{name:"RotateCcw",className:y("size-4",l&&"animate-spin")})}),n(ne,{name:"ChevronRight",className:"size-4 shrink-0 text-muted-foreground"})]})]})}function Wo({label:e,description:t,presets:o,value:r,disabled:i,onChange:a}){let s=r===null||o.includes(r)?o:[...o,r].sort((l,m)=>l-m);return c("div",{className:"flex flex-col items-start justify-between gap-2.5 px-4 py-3.5 sm:flex-row sm:items-center sm:gap-5",children:[c("div",{className:"min-w-0 flex-1",children:[n("p",{className:"text-sm font-normal",children:e}),n("p",{className:"mt-0.5 text-xs leading-snug text-subtle-foreground/75",children:t})]}),c(gn,{disabled:i,value:r===null?"never":String(r),onValueChange:l=>a(l==="never"?null:Number(l)),children:[n(St,{"aria-label":e,className:"h-8 w-40 shrink-0",children:n(bn,{})}),c(Nt,{align:"end",children:[n(pe,{value:"never",children:"Never"}),s.map(l=>c(pe,{value:String(l),children:["After ",si(l)]},l))]})]})]})}function mi({report:e}){return c("section",{className:"space-y-3",children:[n(Me,{title:"Worktrees by project",description:"Moonlet worktrees are the managed checkouts Moonlet tracks. Other worktrees were added to the same repositories outside Moonlet, for example by agents running git worktree add. Projects with a source here are included even when they have no worktrees. These counts are separate from thread files."}),n("div",{className:"overflow-x-auto rounded-lg border border-border bg-card px-4 py-2",children:e.projectWorktrees.length===0?n("p",{className:"py-3 text-xs text-muted-foreground",children:"No projects with sources or managed worktrees on this machine."}):c("table",{className:"w-full text-xs",children:[n("caption",{className:"sr-only",children:"Project worktree counts on this machine"}),n("thead",{children:c("tr",{className:"text-muted-foreground",children:[n("th",{scope:"col",className:"w-full py-2 text-left align-bottom font-normal",children:"Project"}),n("th",{scope:"col",className:"py-2 pl-3 text-right align-bottom font-normal sm:whitespace-nowrap sm:pl-6",children:"Moonlet worktrees"}),n("th",{scope:"col",className:"py-2 pl-3 text-right align-bottom font-normal sm:whitespace-nowrap sm:pl-6",children:"Other worktrees"}),n("th",{scope:"col",className:"py-2 pl-3 text-right align-bottom font-normal sm:whitespace-nowrap sm:pl-6",children:"Awaiting cleanup"})]})}),n("tbody",{className:"divide-y divide-border",children:e.projectWorktrees.map(t=>c("tr",{children:[n("th",{scope:"row",className:"py-3 text-left align-top font-normal break-words",children:t.projectName}),n("td",{className:"whitespace-nowrap py-3 pl-3 text-right align-top font-normal tabular-nums sm:pl-6",children:t.worktreeCount.toLocaleString()}),c("td",{className:"whitespace-nowrap py-3 pl-3 text-right align-top font-normal tabular-nums sm:pl-6",children:[t.externalCount.toLocaleString(),t.externalBytes>0&&n("span",{className:"block text-muted-foreground",children:k(t.externalBytes)})]}),n("td",{className:"whitespace-nowrap py-3 pl-3 text-right align-top tabular-nums text-muted-foreground sm:pl-6",children:t.cleanupPendingCount.toLocaleString()})]},t.projectId))})]})})]})}var Ko={notWorktree:"It is no longer a worktree of this repository",locked:"The worktree is locked",uncommittedChanges:"The worktree has uncommitted changes",unsavedCommits:"The worktree has commits that are not on any branch",inUseByBb:"A Moonlet environment now uses this worktree"},fi={locked:"It is locked, which usually means a tool or agent still relies on it.",uncommittedChanges:"Its uncommitted and untracked changes are deleted.",unsavedCommits:"Its commits that aren\u2019t on any branch or tag become unreachable, and git deletes them in a later cleanup."};function hi(e){return[...e.changedFileCount?[F(e.changedFileCount,"uncommitted change")]:[],...e.unsavedCommitCount?[`${F(e.unsavedCommitCount,"commit")} on no branch`]:[]]}function vi({worktrees:e,projectNames:t,rowDisabled:o,rowActions:r,confirmationKey:i,confirmation:a,onRemove:s}){let l=Xe(),[m,u]=D(new Set),f=new Map;for(let p of e)f.set(p.repositoryPath,[...f.get(p.repositoryPath)??[],p]);return c("details",{className:"text-xs text-muted-foreground",children:[c("summary",{className:"cursor-pointer",children:[F(e.length,"worktree")," found"]}),n("div",{className:"mt-3 space-y-4",children:[...f].map(([p,h])=>c("div",{className:"space-y-2",children:[c("h3",{className:"break-all",children:[n("span",{className:"font-medium text-foreground",children:t.get(h[0].projectId)??"Unknown project"})," ","\xB7 ",p," ",c("span",{className:"tabular-nums",children:["(",h.length,")"]})]}),(m.has(p)?h:h.slice(0,Ne)).map(v=>{let b=v.branch??v.path.split(/[\\/]/).filter(Boolean).at(-1)??v.path,S=v.threads[0],_=hi(v);return c("div",{className:"space-y-3 border-l border-border pl-3",children:[c("div",{className:"flex items-start justify-between gap-3",children:[c("div",{className:"min-w-0 flex-1 space-y-1",children:[c("p",{className:"truncate text-sm text-foreground",children:[b,v.locked&&c(re,{children:[" ",n(We,{className:"inline-block align-middle",children:"locked"})]})]}),n("p",{className:"break-all",children:v.path}),_.length>0&&n("p",{className:"text-foreground",children:_.join(" \xB7 ")}),(v.lastActivityAt!==null||S)&&c("p",{children:[v.lastActivityAt!==null&&`Last git activity ${Ve(v.lastActivityAt)}`,v.lastActivityAt!==null&&S&&" \xB7 ",S&&c("button",{className:"hover:text-foreground hover:underline",onClick:()=>l.toThread(S.threadId),children:[S.title,S.archived&&" (archived)"]})]}),n(Pn,{action:r[`worktree:${v.path}`],runningLabel:"Removing worktree\u2026"})]}),c("div",{className:"flex h-5 shrink-0 items-center gap-2",children:[n("span",{className:"tabular-nums",children:k(v.sizeBytes)}),n(Nn,{label:"Remove worktree",target:b,action:r[`worktree:${v.path}`],disabled:o,onClick:()=>s(v,b)})]})]}),i===`external-worktree:${v.path}`&&a]},v.path)}),h.length>Ne&&n(En,{expanded:m.has(p),total:h.length,onToggle:()=>u(v=>{let b=new Set(v);return b.delete(p)||b.add(p),b})})]},p))})]})}function Nn({label:e,target:t,action:o,disabled:r,onClick:i}){let a=o?.state==="running";return n(zo,{delayDuration:250,children:c(Vo,{children:[n(Cn,{asChild:!0,children:n(te,{variant:"ghost",size:"icon",className:"-my-1.5 size-7 text-muted-foreground hover:text-destructive","aria-label":`${e}: ${t}`,disabled:r||a,onClick:i,children:n(ne,{name:a?"Spinner":"Trash2",className:y("size-4",a&&"animate-spin")})})}),n(wn,{children:e})]})})}function Pn({action:e,runningLabel:t}){return e===void 0?null:n("p",{role:"status",className:"text-xs text-muted-foreground",children:t})}function gi(e){let t=e.sourcePath?.split(/[\\/]/).filter(Boolean);return t?.length?t.at(-1)==="bb"?t.at(-2)??"bb":t.at(-1):e.name.match(/thr_[a-zA-Z0-9]+(?:-\d+)?/)?.[0]??e.name.replace(/-[a-f0-9]{12}$/,"")}var Ne=5;function En({expanded:e,total:t,onToggle:o,className:r}){return n("button",{className:y("block rounded-sm text-left text-xs text-muted-foreground underline-offset-4 hover:text-foreground hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",r),"aria-expanded":e,onClick:o,children:e?"Show fewer":`Show ${(t-Ne).toLocaleString()} more`})}function bi({storage:e,rowDisabled:t,rowActions:o,confirmationKey:r,confirmation:i,onRemove:a,onRemoveSelected:s}){let l=Xe(),[m,u]=D(new Set),[f,p]=D("all"),[h,v]=D(null),b=e.entries.filter(x=>x.sourcePathState==="missing"),S=e.entries.filter(x=>x.sourcePath!==null&&x.threads.length===0),_=e.entries.filter(x=>x.sourcePath===null),P=e.entries.filter(x=>x.threads.length>0&&x.threads.every(R=>R.archived)),[E,M]=D(new Set),j=e.entries.filter(x=>E.has(x.name)),z=(x,R)=>M(Y=>{let g=new Set(Y);for(let Z of x)R&&!Z.current?g.add(Z.name):g.delete(Z.name);return g}),W=x=>x.filter(R=>!R.current),O=f==="missing"?b:f==="archived"?P:f==="unlinked"?S:f==="unresolved"?_:e.entries,me=[{title:"Linked threads",description:null,entries:O.filter(x=>x.threads.length>0)},{title:"Other instances",description:"No matching thread in this Moonlet instance",entries:O.filter(x=>x.sourcePath!==null&&x.threads.length===0)},{title:"Unidentified sources",description:"Source checkout could not be determined",entries:O.filter(x=>x.sourcePath===null)}],X=x=>u(R=>{let Y=new Set(R);return Y.delete(x)||Y.add(x),Y}),se=async(x,R)=>{await An({text:x})?v({text:`${R} copied`,failed:!1}):v({text:`Could not copy ${R.toLowerCase()}`,failed:!0})};return c("section",{className:"space-y-3",children:[n(Me,{title:"Moonlet development storage",description:"Databases, logs, and thread files from local development instances in ~/.bb-dev."}),c("div",{className:"space-y-3 rounded-lg border border-border bg-card px-4 py-3.5",children:[c("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[n("p",{className:"text-lg font-medium tabular-nums",children:k(e.sizeBytes)}),c(gn,{value:f,onValueChange:x=>{p(x),u(new Set),v(null)},children:[n(St,{"aria-label":"Filter development storage",className:"h-8 w-56",children:n(bn,{})}),c(Nt,{align:"end",children:[c(pe,{value:"all",children:["All entries (",e.entries.length,")"]}),c(pe,{value:"missing",children:["Missing checkouts (",b.length,")"]}),c(pe,{value:"archived",children:["Archived threads only (",P.length,")"]}),c(pe,{value:"unlinked",children:["Other instances (",S.length,")"]}),c(pe,{value:"unresolved",children:["Unidentified source (",_.length,")"]})]})]})]}),j.length>0&&c("div",{className:"space-y-3",children:[c("div",{role:"status",className:"flex flex-wrap items-center justify-between gap-3 rounded-md bg-muted/50 px-3 py-2",children:[c("p",{className:"text-xs tabular-nums",children:[F(j.length,"instance")," selected \xB7"," ",k(j.reduce((x,R)=>x+R.sizeBytes,0))]}),c("div",{className:"flex gap-2",children:[n(te,{variant:"ghost",size:"sm",onClick:()=>M(new Set),children:"Clear selection"}),n(te,{variant:"outline",size:"sm",disabled:t,onClick:()=>s(j),children:"Remove selected"})]})]}),r==="dev-selected"&&i]}),n("div",{className:"divide-y divide-border border-t border-border",children:me.filter(x=>x.entries.length>0).map(x=>c("div",{className:"py-3",children:[c("div",{className:"flex items-center gap-3",children:[n(lt,{"aria-label":`Select all ${x.title.toLowerCase()}`,checked:W(x.entries).length>0&&W(x.entries).every(R=>E.has(R.name))?!0:x.entries.some(R=>E.has(R.name))?"indeterminate":!1,onCheckedChange:R=>z(W(x.entries),R===!0),disabled:W(x.entries).length===0}),c("h3",{className:"text-xs font-medium text-muted-foreground",children:[x.title," ",c("span",{className:"font-normal tabular-nums text-muted-foreground",children:["(",x.entries.length.toLocaleString(),")"]}),x.description&&c("span",{className:"font-normal text-subtle-foreground/75",children:[" ","\xB7 ",x.description]})]})]}),n("div",{className:"mt-2 space-y-3",children:(m.has(x.title)?x.entries:x.entries.slice(0,Ne)).map(R=>{let Y=R.threads[0],g=Y?.title??gi(R),Z=o[`dev:${R.name}`];return c("div",{className:"space-y-3",children:[c("div",{className:"flex items-start justify-between gap-3",children:[n(lt,{className:"mt-0.5","aria-label":`Select ${g}`,disabled:R.current,checked:E.has(R.name),onCheckedChange:ie=>z([R],ie===!0)}),c("div",{className:"min-w-0 flex-1 space-y-1",children:[Y?n(jo,{title:Y.title,pills:Y.archived?["archived"]:[],onOpen:()=>l.toThread(Y.threadId)}):n("p",{className:"truncate text-sm",children:g}),R.threads.length>1&&c("p",{className:"text-xs text-muted-foreground",children:["Also linked to"," ",F(R.threads.length-1,"other thread")]}),R.sourcePathState==="missing"&&n("p",{className:"text-xs text-muted-foreground",children:"Checkout no longer exists"}),R.sourcePath!==null&&R.sourcePathState==="unknown"&&n("p",{className:"text-xs text-muted-foreground",children:"Could not check whether the checkout exists"}),R.current?n("p",{className:"text-xs text-muted-foreground",children:"Moonlet is running from this instance"}):R.running&&R.sourcePathState!=="missing"&&n("p",{className:"text-xs text-muted-foreground",children:"Dev server running at last scan"}),n(Pn,{action:Z,runningLabel:"Removing instance\u2026"})]}),c("div",{className:"flex h-5 shrink-0 items-center gap-2",children:[n("span",{className:"text-xs font-normal tabular-nums text-muted-foreground",children:k(R.sizeBytes)}),n(Nn,{label:"Remove instance",target:g,action:Z,disabled:t||R.current,onClick:()=>a(R,g)}),c(wo,{children:[n(rn,{asChild:!0,children:n(te,{variant:"ghost",size:"icon",className:"-my-1.5 size-7","aria-label":`Actions for ${g}`,children:n(ne,{name:"MoreHorizontal",className:"size-4"})})}),c(an,{align:"end",children:[R.threads.map(ie=>c(Fe,{onSelect:()=>l.toThread(ie.threadId),children:["Open thread",R.threads.length>1?`: ${ie.title}`:""]},ie.threadId)),R.threads.length>0&&n(sn,{}),R.sourcePath!==null&&n(Fe,{onSelect:()=>{se(R.sourcePath,"Source checkout path")},children:"Copy source checkout path"}),n(Fe,{onSelect:()=>{se(`${e.path}/${R.name}`,"Dev data path")},children:"Copy dev data path"})]})]})]})]}),r===`dev-instance:${R.name}`&&i]},R.name)})}),x.entries.length>Ne&&n(En,{className:"mt-3",expanded:m.has(x.title),total:x.entries.length,onToggle:()=>X(x.title)})]},x.title))}),O.length===0&&n("p",{className:"py-4 text-xs text-muted-foreground",children:"No entries in this category."}),h&&n("p",{role:h.failed?"alert":"status",className:y("text-xs",h.failed?"text-destructive":"text-muted-foreground"),children:h.text})]})]})}function Uo(e){return e.activeThreadBytes+e.archivedThreadBytes+e.orphanBytes}function Yo(e){let t=e.developerStorage?" threads":"";return[{label:`Active${t}`,value:e.activeThreadBytes,count:e.threadsWithStorageCount-e.archivedThreadCount},{label:`Archived${t}`,value:e.archivedThreadBytes,count:e.archivedThreadCount},...e.orphanBytes>0?[{label:"Orphaned",value:e.orphanBytes,count:e.orphanCount}]:[],...e.developerStorage?[{label:"Moonlet development",value:e.developerStorage.sizeBytes,count:e.developerStorage.entries.length}]:[]]}function xi({report:e}){return c("table",{className:"w-full text-xs",children:[n("caption",{className:"sr-only",children:"Storage by category"}),n("thead",{children:c("tr",{className:"text-muted-foreground",children:[n("th",{scope:"col",className:"pb-2 text-left font-normal",children:"Category"}),n("th",{scope:"col",className:"pb-2 pl-3 text-right font-normal",children:"Count"}),n("th",{scope:"col",className:"pb-2 pl-3 text-right font-normal",children:"Size"})]})}),n("tbody",{className:"divide-y divide-border",children:Yo(e).map(t=>c("tr",{children:[n("th",{scope:"row",className:"py-2 text-left font-normal",children:t.label}),n("td",{className:"py-2 pl-3 text-right tabular-nums text-muted-foreground",children:t.count.toLocaleString()}),n("td",{className:"whitespace-nowrap py-2 pl-3 text-right tabular-nums",children:k(t.value)})]},t.label))})]})}var Yu=On(e=>{e.experimental_icons.register({name:"DatabaseRestore",component:Bn}),e.slots.navPanel({id:kt,title:"Storage & retention",icon:"DatabaseRestore",path:kt,component:li})});export{Yu as default};
1
+ var er=Object.defineProperty;var tr=(e,t)=>{for(var o in t)er(e,o,{get:t[o],enumerable:!0})};var Dt=globalThis.__bbPluginRuntime;if(Dt==null||Dt.sonner==null)throw new Error('Cannot load "sonner": this bundle must be loaded by the Moonlet app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Ue=Dt.sonner,yi="default"in Ue?Ue.default:Ue,{Toaster:Ci,toast:J,useSonner:wi}=Ue;var $={};tr($,{Activity:()=>or,Children:()=>Ee,Component:()=>rr,Fragment:()=>Ie,Profiler:()=>ar,PureComponent:()=>ir,StrictMode:()=>sr,Suspense:()=>lr,act:()=>cr,cache:()=>dr,cacheSignal:()=>ur,captureOwnerStack:()=>pr,cloneElement:()=>Ce,createContext:()=>q,createElement:()=>In,createRef:()=>mr,default:()=>nr,forwardRef:()=>N,isValidElement:()=>Te,lazy:()=>fr,memo:()=>hr,startTransition:()=>vr,unstable_useCacheRefresh:()=>gr,use:()=>br,useActionState:()=>xr,useCallback:()=>I,useContext:()=>Q,useDebugValue:()=>Rr,useDeferredValue:()=>yr,useEffect:()=>A,useEffectEvent:()=>Cr,useId:()=>ge,useImperativeHandle:()=>wr,useInsertionEffect:()=>Sr,useLayoutEffect:()=>ce,useMemo:()=>ee,useOptimistic:()=>Nr,useReducer:()=>Ge,useRef:()=>T,useState:()=>D,useSyncExternalStore:()=>It,useTransition:()=>Pr,version:()=>Er});var Mt=globalThis.__bbPluginRuntime;if(Mt==null||Mt.react==null)throw new Error('Cannot load "react": this bundle must be loaded by the Moonlet app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var je=Mt.react,nr="default"in je?je.default:je,{Activity:or,Children:Ee,Component:rr,Fragment:Ie,Profiler:ar,PureComponent:ir,StrictMode:sr,Suspense:lr,act:cr,cache:dr,cacheSignal:ur,captureOwnerStack:pr,cloneElement:Ce,createContext:q,createElement:In,createRef:mr,forwardRef:N,isValidElement:Te,lazy:fr,memo:hr,startTransition:vr,unstable_useCacheRefresh:gr,use:br,useActionState:xr,useCallback:I,useContext:Q,useDebugValue:Rr,useDeferredValue:yr,useEffect:A,useEffectEvent:Cr,useId:ge,useImperativeHandle:wr,useInsertionEffect:Sr,useLayoutEffect:ce,useMemo:ee,useOptimistic:Nr,useReducer:Ge,useRef:T,useState:D,useSyncExternalStore:It,useTransition:Pr,version:Er}=je;var Ot=globalThis.__bbPluginRuntime;if(Ot==null||Ot.pluginSdkApp==null)throw new Error('Cannot load "@get-bb/plugin-sdk/app": this bundle must be loaded by the Moonlet app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Ye=Ot.pluginSdkApp,Ni="default"in Ye?Ye.default:Ye,{Markdown:Pi,ThreadChat:Ei,ThreadTitle:Ti,UrlLink:ki,definePluginApp:On,experimental_BranchPicker:_i,experimental_ComposerRoot:Di,experimental_DetailRow:Mi,experimental_Diff:Ii,experimental_FailedVoiceRecordings:Oi,experimental_FileLink:Ai,experimental_Icon:Qe,experimental_ImageLightbox:Li,experimental_InfoList:Hi,experimental_InfoListRow:Bi,experimental_InfoSection:$i,experimental_NewThreadComposer:Fi,experimental_PermissionModePicker:zi,experimental_PluginIcon:Vi,experimental_PluginRpcCallError:Wi,experimental_PromptMentionIcon:Ki,experimental_ProviderIcon:Ui,experimental_ProviderModelPicker:ji,experimental_SettingsRow:Gi,experimental_SettingsSection:Yi,experimental_ShortcutHint:Qi,experimental_SidebarNavigationIcon:Xi,experimental_SourceCode:qi,experimental_THREAD_ACTION_GROUPS:Zi,experimental_THREAD_CONTEXT_SEGMENT_GROUPS:Ji,experimental_THREAD_INFO_ROW_GROUPS:es,experimental_THREAD_INFO_SECTION_GROUPS:ts,experimental_ThreadActionsContextMenu:ns,experimental_ThreadActionsMenu:os,experimental_ThreadStatusGlyph:rs,experimental_ThreadTitleText:as,experimental_VoiceInputButton:is,experimental_VoiceInputTextarea:ss,experimental_VoiceRecordingBar:ls,experimental_copyToClipboard:An,experimental_describePromptMention:cs,experimental_promptMentionClipboardAttributes:ds,experimental_readPromptMentionClipboard:us,experimental_saveFile:ps,experimental_useAppPanel:ms,experimental_useArchiveEnvironmentThreads:fs,experimental_useBranches:hs,experimental_useCheckoutState:vs,experimental_useCodeTheme:gs,experimental_useComposerCommandSearch:bs,experimental_useComposerContributions:xs,experimental_useComposerMentionSearch:Rs,experimental_useComposerRenderer:ys,experimental_useExperiment:Cs,experimental_useFixedTabTarget:ws,experimental_usePluginId:Ss,experimental_useProviders:Ns,experimental_useQuestionFormHost:Ps,experimental_useRpcKeyedQuery:Es,experimental_useRpcMutation:Ts,experimental_useRpcQuery:ks,experimental_useRpcRefresh:_s,experimental_useSidebar:Ds,experimental_useSidebarNavigation:Ms,experimental_useSidebarNavigationSplit:Is,experimental_useSidebarThreadActions:Os,experimental_useSidebarThreadSplit:As,experimental_useSidebarThreads:Ls,experimental_useThreadActionRegistrations:Hs,experimental_useThreadActions:Bs,experimental_useThreadTitleDisplayText:$s,internal_DO_NOT_USE_Outlet:Fs,internal_DO_NOT_USE_useOutletFilled:zs,useBbContext:Vs,useBbNavigate:Xe,useComposer:Ws,useComposerView:Ks,useComposers:Us,useEnvironmentProviders:js,useRealtime:At,useRealtimeConnectionState:Gs,useRpc:Lt,useSdk:Ln,useSettings:Ys,useSidebarSplitLayout:Qs,useSidebarThreadDraft:Xs,useSidebarThreadDraftIds:qs,useSidebarThreadRowStatus:Zs,useSidebarThreadRowStatuses:Js,useSidebarThreadShortcut:el,experimental_useSidebarThreadPullRequest:tl}=Ye;var Ht=globalThis.__bbPluginRuntime;if(Ht==null||Ht.jsxRuntime==null)throw new Error('Cannot load "react/jsx-runtime": this bundle must be loaded by the Moonlet app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var qe=Ht.jsxRuntime,ol="default"in qe?qe.default:qe,{Fragment:re,jsx:n,jsxs:c}=qe;function Hn({className:e}){return c("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",className:e,"aria-hidden":"true",children:[n("ellipse",{cx:"11",cy:"5",rx:"8",ry:"3",stroke:"currentColor",strokeWidth:"1.5"}),n("path",{d:"M6 10.8418C6.60158 11.0226 7.27434 11.1716 8 11.2817",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5"}),n("path",{d:"M6 17.8418C6.60158 18.0226 7.27434 18.1716 8 18.2817",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5"}),n("path",{d:"M19.842 13L20.4127 15.3449L19.4647 14.7618C18.7894 14.2569 17.9501 13.9576 17.0404 13.9576C14.809 13.9576 13 15.7579 13 17.9788C13 20.1996 14.809 22 17.0404 22C18.9951 22 20.6256 20.6185 21 18.783",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),n("path",{d:"M19 5V10M3 5V19C3 20.6569 6.58172 22 11 22C11.0849 22 11.1694 21.9995 11.2537 21.9985",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),n("path",{d:"M3 12C3 13.616 6.40729 14.9336 10.6748 14.9976",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5"})]})}function Bn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Tr(...e){return t=>{let o=!1,r=e.map(i=>{let a=Bn(i,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let i=0;i<r.length;i++){let a=r[i];typeof a=="function"?a():Bn(e[i],null)}}}}function Oe(...e){return I(Tr(...e),e)}function Bt(e){let t=N((o,r)=>{let{children:i,...a}=o,s=null,l=!1,m=[];$n(i)&&typeof Ze=="function"&&(i=Ze(i._payload)),Ee.forEach(i,h=>{if(Ir(h)){l=!0;let v=h,b="child"in v.props?v.props.child:v.props.children;$n(b)&&typeof Ze=="function"&&(b=Ze(b._payload)),s=_r(v,b),m.push(s?.props?.children)}else m.push(h)}),s?s=Ce(s,void 0,m):!l&&Ee.count(i)===1&&Te(i)&&(s=i);let u=s?Mr(s):void 0,f=Oe(r,u);if(!s){if(i||i===0)throw new Error(l?Hr(e):Lr(e));return i}let p=Dr(a,s.props??{});return s.type!==Ie&&(p.ref=r?f:u),Ce(s,p)});return t.displayName=`${e}.Slot`,t}var Je=Bt("Slot"),kr=Symbol.for("radix.slottable");var _r=(e,t)=>{if("child"in e.props){let o=e.props.child;return Te(o)?Ce(o,void 0,e.props.children(o.props.children)):null}return Te(t)?t:null};function Dr(e,t){let o={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?o[r]=(...l)=>{let m=a(...l);return i(...l),m}:i&&(o[r]=i):r==="style"?o[r]={...i,...a}:r==="className"&&(o[r]=[i,a].filter(Boolean).join(" "))}return{...e,...o}}function Mr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}function Ir(e){return Te(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===kr}var Or=Symbol.for("react.lazy");function $n(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Or&&"_payload"in e&&Ar(e._payload)}function Ar(e){return typeof e=="object"&&e!==null&&"then"in e}var Lr=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Hr=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Ze=$[" use ".trim().toString()];var $t=globalThis.__bbPluginRuntime;if($t==null||$t.classVarianceAuthority==null)throw new Error('Cannot load "class-variance-authority": this bundle must be loaded by the Moonlet app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var et=$t.classVarianceAuthority,dl="default"in et?et.default:et,{cva:Fn,cx:ul}=et;var Ft=globalThis.__bbPluginRuntime;if(Ft==null||Ft.clsx==null)throw new Error('Cannot load "clsx": this bundle must be loaded by the Moonlet app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var tt=Ft.clsx,ml="default"in tt?tt.default:tt,{clsx:zn}=tt;var zt=globalThis.__bbPluginRuntime;if(zt==null||zt.tailwindMerge==null)throw new Error('Cannot load "tailwind-merge": this bundle must be loaded by the Moonlet app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var nt=zt.tailwindMerge,hl="default"in nt?nt.default:nt,{createTailwindMerge:vl,extendTailwindMerge:gl,fromTheme:bl,getDefaultConfig:xl,mergeConfigs:Rl,twJoin:yl,twMerge:Vn,validators:Cl}=nt;function y(...e){return Vn(zn(e))}var be="transition-colors duration-150 hover:duration-0",Ae="transition-none";var Br=Fn(`inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ${be} focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_[data-icon-root]]:pointer-events-none [&_[data-icon-root]]:size-4 [&_[data-icon-root]]:shrink-0`,{variants:{variant:{default:"bg-foreground text-background hover:bg-foreground/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-transparent hover:bg-state-hover hover:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-state-hover hover:text-foreground aria-pressed:bg-state-active aria-pressed:text-foreground aria-pressed:hover:bg-state-active data-[state=open]:bg-state-active data-[state=open]:text-foreground data-[state=open]:hover:bg-state-active",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),te=N(({className:e,variant:t,size:o,asChild:r=!1,...i},a)=>n(r?Je:"button",{className:y(Br({variant:t,size:o,className:e})),ref:a,...i}));te.displayName="Button";function Wn(e,t=[]){let o=[];function r(a,s){let l=q(s);l.displayName=a+"Context";let m=o.length;o=[...o,s];let u=p=>{let{scope:h,children:v,...b}=p,S=h?.[e]?.[m]||l,_=ee(()=>b,Object.values(b));return n(S.Provider,{value:_,children:v})};u.displayName=a+"Provider";function f(p,h,v={}){let{optional:b=!1}=v,S=h?.[e]?.[m]||l,_=Q(S);if(_)return _;if(s!==void 0)return s;if(!b)throw new Error(`\`${p}\` must be used within \`${a}\``)}return[u,f]}let i=()=>{let a=o.map(s=>q(s));return function(l){let m=l?.[e]||a;return ee(()=>({[`__scope${e}`]:{...l,[e]:m}}),[l,m])}};return i.scopeName=e,[r,$r(i,...t)]}function $r(...e){let t=e[0];if(e.length===1)return t;let o=()=>{let r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){let s=r.reduce((l,{useScope:m,scopeName:u})=>{let p=m(a)[`__scope${u}`];return{...l,...p}},{});return ee(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return o.scopeName=t.scopeName,o}var Ll=!!(typeof window<"u"&&window.document&&window.document.createElement);function Vt(e,t,{checkForDefaultPrevented:o=!0}={}){return function(i){if(e?.(i),o===!1||!i||!i.defaultPrevented)return t?.(i)}}var we=globalThis?.document?ce:()=>{};var Fr=$[" useInsertionEffect ".trim().toString()]||we;function Kn({prop:e,defaultProp:t,onChange:o=()=>{},caller:r}){let[i,a,s]=zr({defaultProp:t,onChange:o}),l=e!==void 0,m=l?e:i;{let f=T(e!==void 0);A(()=>{let p=f.current;p!==l&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=l},[l,r])}let u=I(f=>{if(l){let p=Vr(f)?f(e):f;p!==e&&s.current?.(p)}else a(f)},[l,e,a,s]);return[m,u]}function zr({defaultProp:e,onChange:t}){let[o,r]=D(e),i=T(o),a=T(t);return Fr(()=>{a.current=t},[t]),A(()=>{i.current!==o&&(a.current?.(o),i.current=o)},[o,i]),[o,r,a]}function Vr(e){return typeof e=="function"}function Un(e){let t=T({value:e,previous:e});return ee(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function jn(e){let[t,o]=D(void 0);return we(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});let r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;let a=i[0],s,l;if("borderBoxSize"in a){let m=a.borderBoxSize,u=Array.isArray(m)?m[0]:m;s=u.inlineSize,l=u.blockSize}else s=e.offsetWidth,l=e.offsetHeight;o({width:s,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else o(void 0)},[e]),t}function Wr(e,t){return Ge((o,r)=>t[o][r]??o,e)}var Wt=e=>{let{present:t,children:o}=e,r=Kr(t),i=typeof o=="function"?o({present:r.isPresent}):Ee.only(o),a=Ur(r.ref,jr(i));return typeof o=="function"||r.isPresent?Ce(i,{ref:a}):null};Wt.displayName="Presence";function Kr(e){let[t,o]=D(),r=T(null),i=T(e),a=T("none"),s=T(void 0),l=e?"mounted":"unmounted",[m,u]=Wr(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return A(()=>{m==="mounted"?(a.current=s.current??Le(r.current),s.current=void 0):a.current="none"},[m]),we(()=>{let f=r.current,p=i.current;if(p!==e){let v=a.current,b=Le(f);e?(s.current=b,u("MOUNT")):b==="none"||f?.display==="none"?u("UNMOUNT"):u(p&&v!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),we(()=>{if(t){let f,p=t.ownerDocument.defaultView??window,h=b=>{let _=Le(r.current).includes(CSS.escape(b.animationName));if(b.target===t&&_&&(u("ANIMATION_END"),!i.current)){let P=t.style.animationFillMode;t.style.animationFillMode="forwards",f=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=P)})}},v=b=>{b.target===t&&(a.current=Le(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{p.clearTimeout(f),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:I(f=>{if(f){let p=getComputedStyle(f);r.current=p,s.current=Le(p)}else r.current=null;o(f)},[])}}function Gn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ur(...e){let t=T(e);return t.current=e,I(o=>{let r=t.current,i=!1,a=r.map(s=>{let l=Gn(s,o);return!i&&typeof l=="function"&&(i=!0),l});if(i)return()=>{for(let s=0;s<a.length;s++){let l=a[s];typeof l=="function"?l():Gn(r[s],null)}}},[])}function Le(e){return e?.animationName||"none"}function jr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var Kt=globalThis.__bbPluginRuntime;if(Kt==null||Kt.reactDom==null)throw new Error('Cannot load "react-dom": this bundle must be loaded by the Moonlet app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var ot=Kt.reactDom,jl="default"in ot?ot.default:ot,{createPortal:Yn,flushSync:Gr,preconnect:Gl,prefetchDNS:Yl,preinit:Ql,preinitModule:Xl,preload:ql,preloadModule:Zl,requestFormReset:Jl,unstable_batchedUpdates:ec,useFormState:tc,useFormStatus:nc,version:oc}=ot;var Qr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],rt=Qr.reduce((e,t)=>{let o=Bt(`Primitive.${t}`),r=N((i,a)=>{let{asChild:s,...l}=i,m=s?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),n(m,{...l,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});var at="Checkbox",[Xr,vc]=Wn(at),[qr,Ut]=Xr(at);function Zr(e){let{__scopeCheckbox:t,checked:o,children:r,defaultChecked:i,disabled:a,form:s,name:l,onCheckedChange:m,required:u,value:f="on",internal_do_not_use_render:p}=e,[h,v]=Kn({prop:o,defaultProp:i??!1,onChange:m,caller:at}),[b,S]=D(null),[_,P]=D(null),E=T(!1),M=b?!!s||!!b.closest("form"):!0,j={checked:h,disabled:a,setChecked:v,control:b,setControl:S,name:l,form:s,value:f,hasConsumerStoppedPropagationRef:E,required:u,defaultChecked:xe(i)?!1:i,isFormControl:M,bubbleInput:_,setBubbleInput:P};return n(qr,{scope:t,...j,children:Jr(p)?p(j):r})}var Qn="CheckboxTrigger",Xn=N(({__scopeCheckbox:e,onKeyDown:t,onClick:o,...r},i)=>{let{control:a,value:s,disabled:l,checked:m,required:u,setControl:f,setChecked:p,hasConsumerStoppedPropagationRef:h,isFormControl:v,bubbleInput:b}=Ut(Qn,e),S=Oe(i,f),_=T(m);return A(()=>{let P=a?.form;if(P){let E=()=>p(_.current);return P.addEventListener("reset",E),()=>P.removeEventListener("reset",E)}},[a,p]),n(rt.button,{type:"button",role:"checkbox","aria-checked":xe(m)?"mixed":m,"aria-required":u,"data-state":eo(m),"data-disabled":l?"":void 0,disabled:l,value:s,...r,ref:S,onKeyDown:Vt(t,P=>{P.key==="Enter"&&P.preventDefault()}),onClick:Vt(o,P=>{p(E=>xe(E)?!0:!E),b&&v&&(h.current=P.isPropagationStopped(),h.current||P.stopPropagation())})})});Xn.displayName=Qn;var it=N((e,t)=>{let{__scopeCheckbox:o,name:r,checked:i,defaultChecked:a,required:s,disabled:l,value:m,onCheckedChange:u,form:f,...p}=e;return n(Zr,{__scopeCheckbox:o,checked:i,defaultChecked:a,disabled:l,required:s,onCheckedChange:u,name:r,form:f,value:m,internal_do_not_use_render:({isFormControl:h})=>c(re,{children:[n(Xn,{...p,ref:t,__scopeCheckbox:o}),h&&n(Jn,{__scopeCheckbox:o})]})})});it.displayName=at;var qn="CheckboxIndicator",jt=N((e,t)=>{let{__scopeCheckbox:o,forceMount:r,...i}=e,a=Ut(qn,o);return n(Wt,{present:r||xe(a.checked)||a.checked===!0,children:n(rt.span,{"data-state":eo(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});jt.displayName=qn;var Zn="CheckboxBubbleInput",Jn=N(({__scopeCheckbox:e,...t},o)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:s,required:l,disabled:m,name:u,value:f,form:p,bubbleInput:h,setBubbleInput:v}=Ut(Zn,e),b=Oe(o,v),S=Un(a),_=jn(r);A(()=>{let E=h;if(!E)return;let M=window.HTMLInputElement.prototype,z=Object.getOwnPropertyDescriptor(M,"checked").set,W=!i.current;if(S!==a&&z){let O=new Event("click",{bubbles:W});E.indeterminate=xe(a),z.call(E,xe(a)?!1:a),E.dispatchEvent(O)}},[h,S,a,i]);let P=T(xe(a)?!1:a);return n(rt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??P.current,required:l,disabled:m,name:u,value:f,form:p,...t,tabIndex:-1,ref:b,style:{...t.style,..._,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Jn.displayName=Zn;function Jr(e){return typeof e=="function"}function xe(e){return e==="indeterminate"}function eo(e){return xe(e)?"indeterminate":e?"checked":"unchecked"}var Gt=globalThis.__bbPluginRuntime;if(Gt==null||Gt.sharedUiIcon==null)throw new Error('Cannot load "@moonlet/shared-ui/icon": this bundle must be loaded by the Moonlet app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var st=Gt.sharedUiIcon,gc="default"in st?st.default:st,{ICON_NAMES:bc,Icon:oe,isBuiltinIconName:xc,preloadExtendedIcons:Rc}=st;var lt=N(({className:e,...t},o)=>n(it,{ref:o,className:y(`peer size-4 shrink-0 rounded-sm border border-input shadow-xs ${be} focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-foreground data-[state=checked]:bg-foreground data-[state=checked]:text-background`,e),...t,children:n(jt,{className:y("flex items-center justify-center text-current"),children:n(oe,{name:"Check",className:"size-3.5"})})}));lt.displayName=it.displayName;var ta=200;function to({children:e}){let[t,o]=D(!1);return A(()=>{let r=window.setTimeout(()=>o(!0),ta);return()=>window.clearTimeout(r)},[]),t?e:null}var Yt=globalThis.__bbPluginRuntime;if(Yt==null||Yt.radixDropdownMenu==null)throw new Error('Cannot load "@radix-ui/react-dropdown-menu": this bundle must be loaded by the Moonlet app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var ct=Yt.radixDropdownMenu,kc="default"in ct?ct.default:ct,{Arrow:_c,CheckboxItem:no,Content:oo,DropdownMenu:Dc,DropdownMenuArrow:Mc,DropdownMenuCheckboxItem:Ic,DropdownMenuContent:Oc,DropdownMenuGroup:Ac,DropdownMenuItem:Lc,DropdownMenuItemIndicator:Hc,DropdownMenuLabel:Bc,DropdownMenuPortal:$c,DropdownMenuRadioGroup:Fc,DropdownMenuRadioItem:zc,DropdownMenuSeparator:Vc,DropdownMenuSub:Wc,DropdownMenuSubContent:Kc,DropdownMenuSubTrigger:Uc,DropdownMenuTrigger:jc,Group:ro,Item:ao,ItemIndicator:Qt,Label:io,Portal:so,RadioGroup:na,RadioItem:Xt,Root:lo,Separator:co,Sub:oa,SubContent:qt,SubTrigger:Zt,Trigger:uo,createDropdownMenuScope:Gc}=ct;function ue(){let e="bb--storage-retention";return{"data-bb-portaled-overlay":"","data-bb-plugin-root":"",...e!==void 0?{"data-bb-plugin":e}:{}}}var Re="h-3.5 w-3.5 max-md:pointer-coarse:h-5 max-md:pointer-coarse:w-5",po="h-[28px] w-[28px] rounded-md p-0 max-md:pointer-coarse:h-[36px] max-md:pointer-coarse:w-[36px]",Qc=`${po} [&_[data-icon-root]]:size-[16px] max-md:pointer-coarse:[&_[data-icon-root]]:size-[20px]`,Xc=`${po} [&_[data-icon-root]]:size-[13px] max-md:pointer-coarse:[&_[data-icon-root]]:size-[16px]`;var aa="select-none",ia=new Set(["button","checkbox","file","hidden","image","radio","range","reset","submit"]),dt=e=>y(aa,e);function sa(e){return e instanceof HTMLTextAreaElement?!0:e instanceof HTMLInputElement?!e.disabled&&!e.readOnly&&!ia.has(e.type):e instanceof HTMLElement?e.isContentEditable||e.closest("[contenteditable='true']")!==null:!1}function He(e){if(typeof document>"u")return;let t=document.activeElement;!t||!sa(t)||e!==null&&!e.contains(t)||t.blur()}function ke(){He(null)}function mo(){He(null)}function Be(e){e.preventDefault()}var Jt="pointer";typeof document<"u"&&(document.addEventListener("keydown",()=>{Jt="keyboard"},{capture:!0}),document.addEventListener("pointerdown",()=>{Jt="pointer"},{capture:!0}));function _e(){return Jt==="keyboard"}var ut=new Map;function la(e){if(typeof window>"u"||!window.matchMedia)return null;let t=ut.get(e);if(t)return t;let o=window.matchMedia(e),r=new Set,i=()=>{for(let a of r)a()};return t={mql:o,subscribe(a){let s=r.size===0;return r.add(a),s&&o.addEventListener("change",i),()=>{r.delete(a),r.size===0&&(o.removeEventListener("change",i),ut.delete(e))}}},ut.set(e,t),t}function ca(e,t){return la(e)?.subscribe(t)??(()=>{})}function da(e){return typeof window>"u"||!window.matchMedia?!1:ut.get(e)?.mql.matches??window.matchMedia(e).matches}function pt(e){return It(t=>ca(e,t),()=>da(e),()=>!1)}var ua="(max-width: 767px)",pa=q(null);function fo(){let e=Q(pa),t=pt(ua);return e!==null?e:t}var ma="(pointer: coarse)";function ho(){return pt(ma)}var fa=120,ft={width:"auto",minWidth:"auto",maxWidth:"none"},en="--bb-drawer-keyboard-inset",ha=80;function mt(e){e!==null&&(e.style.height="",e.style.bottom="",e.style.removeProperty(en))}function va({layoutViewportHeight:e,visualViewportHeight:t,visualViewportOffsetTop:o}){let r=Math.round(e-(t+o));return r>=ha?r:0}function ga(e,t){A(()=>{let o=e.current,r=window.visualViewport;if(o===null||!t||!r)return;let i=null,a=()=>{if(i=null,r.scale!==1){mt(o);return}let l=va({layoutViewportHeight:o.ownerDocument.documentElement.clientHeight,visualViewportHeight:r.height,visualViewportOffsetTop:r.offsetTop});if(l===0){o.style.bottom="",o.style.removeProperty(en);return}o.style.bottom=`${l}px`,o.style.setProperty(en,`${l}px`)},s=()=>{i!==null&&window.cancelAnimationFrame(i),i=window.requestAnimationFrame(a)};return a(),r.addEventListener("resize",s),r.addEventListener("scroll",s),()=>{r.removeEventListener("resize",s),r.removeEventListener("scroll",s),i!==null&&window.cancelAnimationFrame(i),mt(o)}},[t,e])}function ba(){let e=fo()?"drawer":"floating",t=ho();return{presentation:e,supportsHover:e==="floating"&&!t}}function ht(e,t,o=!1){let{presentation:r}=ba(),i=r==="drawer",[a,s]=D(o),l=e!==void 0,m=l?e:a,u=I(f=>{m&&!f&&i&&mo(),l||s(f),t?.(f)},[i,l,t,m]);return ee(()=>({isCompactViewport:i,open:m,onOpenChange:u}),[i,m,u])}var nn=N(({asChild:e,open:t,onOpenChange:o,haspopup:r,onClick:i,children:a,className:s,...l},m)=>{let u=dt(s),f=h=>{i?.(h),h.defaultPrevented||(t||ke(),o(!t))},p={"aria-expanded":t,"aria-haspopup":r,"data-state":t?"open":"closed"};return e?n(Je,{ref:m,onClick:f,onMouseDown:Be,className:u,...p,...l,children:a}):n("button",{ref:m,type:"button",onClick:f,onMouseDown:Be,className:u,...p,...l,children:a})});nn.displayName="MobileTrigger";var xa=["side","sideOffset","align","alignOffset","collisionPadding","collisionBoundary","arrowPadding","sticky","hideWhenDetached","avoidCollisions","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside"],Ra=new Set(xa);function vt(e){let t={};for(let o of Object.keys(e))Ra.has(o)||(t[o]=e[o]);return t}function ya({open:e,enabled:t=!0}){let[o,r]=D(!1),i=I(()=>r(!0),[]);return A(()=>{if(!t||!e||o)return;let a=null,s=null;a=window.requestAnimationFrame(()=>{a=null,s=window.requestAnimationFrame(()=>{s=null,i()})});let l=window.setTimeout(i,fa);return()=>{a!==null&&window.cancelAnimationFrame(a),s!==null&&window.cancelAnimationFrame(s),window.clearTimeout(l)}},[t,o,e,i]),{isContentRealized:t&&o,realizeContent:i}}function gt({open:e,onOpenChange:t,onAfterCloseAutoFocus:o,closeOnBackdropClick:r=!0,srLabel:i,labelledBy:a,describedBy:s,contentClassName:l,onContentAnimationEnd:m,onEscapeKeyDown:u,onPointerDownOutside:f,onInteractOutside:p,children:h}){let{isContentRealized:v}=ya({open:e});return!e&&!v?null:n(Da,{open:e,onOpenChange:t,onAfterCloseAutoFocus:o,closeOnBackdropClick:r,srLabel:i,labelledBy:a,describedBy:s,contentClassName:l,onContentAnimationEnd:m,onEscapeKeyDown:u,onPointerDownOutside:f,onInteractOutside:p,children:v?h:n("div",{"aria-hidden":"true",className:"min-h-32","data-responsive-drawer-placeholder":""})})}var vo="cubic-bezier(0.32, 0.72, 0, 1)",Ca=.25,wa=450,Sa=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),tn=Symbol.for("bb.persistent-drawer-stack.v1");function Na(e){return typeof e=="object"&&e!==null&&"entries"in e&&Array.isArray(e.entries)&&"handleKeyDown"in e&&typeof e.handleKeyDown=="function"}function go(e){let t=Reflect.get(e,tn);return Na(t)?t:void 0}function Pa(e){return Array.from(e.querySelectorAll(Sa)).filter(t=>t.closest('[aria-hidden="true"], [inert]')===null)}function Ea(e,t){let o=e?.closest("[data-bb-portaled-overlay]");return o!=null&&o!==t}function Ta(e,t){let o=t.ownerDocument.activeElement;if(!t.contains(o)&&Ea(o,t))return;let r=Pa(t);if(e.preventDefault(),r.length===0){t.focus({preventScroll:!0});return}let i=r[0],a=r[r.length-1];if(e.shiftKey){if(!t.contains(o)||o===t||o===i){a?.focus({preventScroll:!0});return}let l=r.indexOf(o);r[Math.max(0,l-1)]?.focus({preventScroll:!0});return}if(!t.contains(o)||o===t||o===a){i?.focus({preventScroll:!0});return}let s=r.indexOf(o);r[Math.min(r.length-1,s+1)]?.focus({preventScroll:!0})}function ka(e,t){let o=go(e);if(o===void 0){let r=[],i=a=>{if(a.defaultPrevented)return;let s=r[r.length-1],l=s?.panel()??null;s===void 0||l===null||(a.key==="Escape"?(s.dismissOnEscape(a),a.preventDefault()):a.key==="Tab"&&Ta(a,l))};o={entries:r,handleKeyDown:i},Reflect.set(e,tn,o),e.addEventListener("keydown",i)}return o.entries.push(t),()=>{let r=go(e);if(r===void 0)return;let i=r.entries.indexOf(t);i>=0&&r.entries.splice(i,1),r.entries.length===0&&(e.removeEventListener("keydown",r.handleKeyDown),Reflect.deleteProperty(e,tn))}}function _a({onAfterCloseAutoFocus:e,onBeforeCloseAutoFocus:t,onEscapeKeyDown:o,open:r,panelRef:i,requestClose:a}){let s=T(null),l=T(o);ce(()=>{l.current=o},[o]),ce(()=>{if(!r)return;let u=i.current;if(u===null)return;let f=u.ownerDocument,p=f.activeElement;s.current=p instanceof HTMLElement&&p!==f.body?p:null;let h=ka(f,{panel:()=>i.current,dismissOnEscape:v=>{l.current?.(v),v.defaultPrevented||a()}});return u.focus({preventScroll:!0}),h},[r,i,a]);let m=T(r);ce(()=>{let u;if(m.current&&!r){t?.();let f=s.current;if(f?.isConnected&&f.closest('[aria-hidden="true"], [inert]')===null&&(f.focus({preventScroll:!0}),f.ownerDocument.activeElement!==f)){let p=f.ownerDocument.defaultView;if(p!==null){let h=p.requestAnimationFrame(()=>{f.isConnected&&f.closest('[aria-hidden="true"], [inert]')===null&&f.focus({preventScroll:!0}),e?.()});u=()=>p.cancelAnimationFrame(h)}}s.current=null,u===void 0&&e?.()}return m.current=r,u},[e,t,r])}function Da({open:e,onOpenChange:t,onAfterCloseAutoFocus:o,closeOnBackdropClick:r=!0,srLabel:i,labelledBy:a,describedBy:s,contentClassName:l,motionDurationMs:m=220,onContentAnimationEnd:u,onEscapeKeyDown:f,onPointerDownOutside:p,onInteractOutside:h,children:v}){let b=T(null),S=T(null),_=T(null),P=T(null),E=T(null),M=ge(),j=ue(),z=`transform ${m}ms ${vo}`,W=`opacity ${m}ms ${vo}`,O=T(t);ce(()=>{O.current=t},[t]);let me=I(()=>{He(b.current),mt(b.current),O.current(!1)},[]),X=I(()=>{He(b.current),mt(b.current)},[]);_a({onAfterCloseAutoFocus:o,onBeforeCloseAutoFocus:X,onEscapeKeyDown:f,open:e,panelRef:b,requestClose:me});let se=()=>{let w=_.current;if(_.current=null,!!r){if(w!==null){let V=new CustomEvent("dismissableLayer.pointerDownOutside",{cancelable:!0,detail:{originalEvent:w}});if(p?.(V),h?.(V),V.defaultPrevented)return}me()}};ga(b,e);let x=I(w=>{E.current!==w&&(E.current=w,u?.(w))},[u]);A(()=>{E.current=null;let w=window.setTimeout(()=>x(e),m+50);return()=>window.clearTimeout(w)},[m,e,x]);let R=I((w,V,L)=>{let K=b.current,de=S.current;K===null||de===null||(K.style.transition=L?z:"none",K.style.transform=`translate3d(0, ${w}px, 0)`,de.style.transition=L?W:"none",de.style.opacity=String(Math.max(0,Math.min(1,1-w/V))))},[W,z]),Y=I(w=>{if(!e||w.button!==0)return;w.currentTarget.setPointerCapture(w.pointerId);let V=Date.now(),L=Math.max(b.current?.clientHeight??0,1);P.current={pointerId:w.pointerId,startY:w.clientY,lastY:w.clientY,lastTimeMs:V,velocityY:0,height:L},R(0,L,!1),w.preventDefault()},[e,R]),g=I(w=>{let V=P.current;if(V===null||V.pointerId!==w.pointerId)return;let L=Date.now(),K=L-V.lastTimeMs;K>0&&(V.velocityY=(w.clientY-V.lastY)/K*1e3,V.lastY=w.clientY,V.lastTimeMs=L),R(Math.max(0,w.clientY-V.startY),V.height,!1),w.preventDefault()},[R]),Z=I((w,V)=>{let L=P.current;if(L===null||L.pointerId!==w.pointerId)return;P.current=null;let K=Math.max(0,w.clientY-L.startY);!V&&(K>=L.height*Ca||L.velocityY>=wa)?(R(L.height,L.height,!0),me()):R(0,L.height,!0),w.preventDefault()},[me,R]),ie=typeof document>"u"?null:document.body;return ie===null?null:Yn(c(re,{children:[n("div",{ref:S,...j,"aria-hidden":"true","data-persistent-drawer-backdrop":"","data-state":e?"open":"closed",className:"fixed inset-0 z-50 bg-black/40",style:{opacity:e?1:0,pointerEvents:e?"auto":"none",transition:W},onPointerDown:w=>{_.current=w.nativeEvent},onClick:se,onTouchMove:w=>w.preventDefault()}),c("div",{ref:b,...j,"aria-hidden":!e,"aria-labelledby":a??(i===void 0?void 0:M),"aria-describedby":s,"aria-modal":e||void 0,"data-bb-portaled-overlay":"","data-persistent-drawer-content":"","data-state":e?"open":"closed",inert:!e,role:"dialog",tabIndex:-1,className:y("fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[calc(92dvh-var(--bb-drawer-keyboard-inset,0px))] flex-col rounded-t-xl border bg-background pb-[var(--bb-safe-area-bottom,env(safe-area-inset-bottom))] outline-none",l),style:{transform:e?"translate3d(0, 0, 0)":"translate3d(0, 100%, 0)",transition:z,willChange:e?"transform":void 0},onTransitionEnd:w=>{w.currentTarget===w.target&&w.propertyName==="transform"&&x(e)},children:[n("div",{"data-persistent-drawer-handle":"",className:"mx-auto flex h-8 w-16 shrink-0 touch-none cursor-grab items-center justify-center active:cursor-grabbing",onPointerDown:Y,onPointerMove:g,onPointerUp:w=>Z(w,!1),onPointerCancel:w=>Z(w,!0),children:n("div",{className:"h-1 w-10 rounded-full bg-muted-foreground/20"})}),i===void 0?null:n("h2",{id:M,className:"sr-only",children:i}),v]})]}),ie)}function bo(e){return e.isConnected&&e.closest("[inert]")===null}function Ma(e,t){typeof e=="function"?e(t):e!==null&&(e.current=t)}function bt(e,t,o){let r=T(null),i=T(o);return ce(()=>{i.current=o},[o]),A(()=>{let a=r.current;if(!t||a===null)return;let s=!1,l=()=>{s||r.current!==null&&r.current!==a||(s=!0,i.current(!1))},m=bo(a),u=new MutationObserver(()=>{bo(a)?m=!0:m&&l()});if(u.observe(a.ownerDocument.documentElement,{attributes:!0,attributeFilter:["inert"],childList:!0,subtree:!0}),typeof IntersectionObserver!="function")return()=>u.disconnect();let f=!1,p=new IntersectionObserver(h=>{let v=h.at(-1);v!==void 0&&(v.isIntersecting?f=!0:f&&l())});return p.observe(a),()=>{u.disconnect(),p.disconnect()}},[t]),I(a=>{r.current=a,Ma(e,a)},[e])}var Ia=new Set(["ArrowDown","ArrowUp","Home","End","PageDown","PageUp"]),xt="data-[last-hovered]:bg-state-hover data-[last-hovered]:text-foreground",xo=Symbol.for("bb.menu-hover-context.v1");function Oa(e){return typeof e=="object"&&e!==null&&"Provider"in e&&"Consumer"in e}function Aa(){let e=Reflect.get(globalThis,xo);if(Oa(e))return e;let t=q({lastHoveredId:null,setLastHovered:()=>{},clearLastHovered:()=>{}});return Reflect.set(globalThis,xo,t),t}var Ro=Aa();function yo({children:e}){let[t,o]=D(null),r=ee(()=>({lastHoveredId:t,setLastHovered:o,clearLastHovered:()=>o(null)}),[t]);return n(Ro.Provider,{value:r,children:e})}function $e(e){let t=ge(),{lastHoveredId:o,setLastHovered:r,clearLastHovered:i}=Q(Ro),a=o===t,s=T(e);s.current=e;let l=I(u=>{s.current?.onPointerEnter?.(u),r(t)},[t,r]),m=I(u=>{s.current?.onKeyDown?.(u),Ia.has(u.key)&&i()},[i]);return{isLastHovered:a,hoverProps:{"data-last-hovered":a?"":void 0,onPointerEnter:l,onKeyDown:m}}}var La="focus:bg-state-hover focus:text-foreground data-[last-hovered]:bg-state-hover data-[last-hovered]:text-foreground",Ha="text-destructive focus:bg-destructive/15 focus:text-destructive data-[last-hovered]:bg-destructive/15",Ba="text-destructive focus:bg-destructive/15 focus:text-destructive active:bg-destructive/20 active:text-destructive",Co=Symbol.for("bb.responsive-menu-context.v1");function $a(e){return typeof e=="object"&&e!==null&&"Provider"in e&&"Consumer"in e}function Fa(){let e=Reflect.get(globalThis,Co);if($a(e))return e;let t=q({isCompactViewport:!1,open:!1,onOpenChange:()=>{}});return Reflect.set(globalThis,Co,t),t}var on=Fa();function ye(){return Q(on)}function wo({children:e,open:t,onOpenChange:o,defaultOpen:r,...i}){let a=ht(t,o,r);return a.isCompactViewport?n(on.Provider,{value:a,children:e}):n(lo,{open:a.open,onOpenChange:a.onOpenChange,...i,children:n(on.Provider,{value:a,children:e})})}var rn=N(({asChild:e,children:t,className:o,...r},i)=>{let{isCompactViewport:a,open:s,onOpenChange:l}=ye(),m=bt(i,s&&!a,l);return a?n(nn,{ref:i,asChild:e,open:s,onOpenChange:l,haspopup:"menu",className:o,...r,children:t}):n(uo,{ref:m,asChild:e,className:dt(o),onMouseDown:u=>{s||ke(),Be(u)},...r,children:t})});rn.displayName="DropdownMenuTrigger";var an=N(({className:e,sideOffset:t=4,children:o,mobileTitle:r,onCloseAutoFocus:i,...a},s)=>{let{isCompactViewport:l,open:m,onOpenChange:u}=ye(),f=ue();if(l){let{style:p,...h}=vt(a);return n(gt,{open:m,onOpenChange:u,srLabel:r??"Menu",onEscapeKeyDown:a.onEscapeKeyDown,onPointerDownOutside:a.onPointerDownOutside,onInteractOutside:a.onInteractOutside,children:n("div",{ref:s,className:y("flex flex-col gap-0.5 overflow-y-auto p-2",e),...h,style:{...p,...ft},children:o})})}return n(so,{children:n(oo,{ref:s,...f,sideOffset:t,onCloseAutoFocus:p=>{let h=document.activeElement!==null&&document.activeElement!==document.body;(!_e()||h)&&p.preventDefault(),i?.(p)},className:y("z-50 min-w-28 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a,children:n(yo,{children:o})})})});an.displayName="DropdownMenuContent";function So(){return new Event("select",{cancelable:!0})}var Fe=N(({className:e,inset:t,variant:o="default",onSelect:r,disabled:i,role:a="menuitem","aria-checked":s,textValue:l,children:m,onPointerEnter:u,onKeyDown:f,onFocus:p,onBlur:h,onPointerMove:v,onPointerLeave:b,...S},_)=>{let{isCompactViewport:P,open:E,onOpenChange:M}=ye(),{hoverProps:j}=$e({onPointerEnter:u,onKeyDown:f}),z=W=>O=>{W?.(O),E||O.preventDefault()};return P?n("button",{ref:_,type:"button",role:a,disabled:i,"aria-disabled":i||void 0,"aria-checked":s,className:y("relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-[0.3125rem] max-md:pointer-coarse:py-2 text-left text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground active:bg-state-active active:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>[data-icon-root]]:size-4 [&>[data-icon-root]]:shrink-0",t&&"pl-8",o==="destructive"&&Ba,e),"data-disabled":i?"":void 0,onFocus:p,onBlur:h,onClick:()=>{if(i)return;let W=So();r?.(W),W.defaultPrevented||M(!1)},children:m}):n(ao,{ref:_,className:y("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-[0.3125rem] text-xs outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>[data-icon-root]]:size-4 [&>[data-icon-root]]:shrink-0",Ae,o==="destructive"?Ha:La,t&&"pl-8",e),disabled:i,role:a,"aria-checked":s,onSelect:r,textValue:l,onFocus:p,onBlur:h,onPointerMove:z(v),onPointerLeave:z(b),...S,...j,children:m})});Fe.displayName="DropdownMenuItem";var za=N(({className:e,children:t,checked:o,onSelect:r,onCheckedChange:i,disabled:a,textValue:s,onPointerEnter:l,onKeyDown:m,...u},f)=>{let{isCompactViewport:p,onOpenChange:h}=ye(),{hoverProps:v}=$e({onPointerEnter:l,onKeyDown:m});return p?c("button",{ref:f,type:"button",role:"menuitemcheckbox","aria-checked":o==="indeterminate"?"mixed":o===!0,disabled:a,"aria-disabled":a||void 0,className:y("relative flex w-full cursor-default select-none items-center rounded-sm py-[0.3125rem] max-md:pointer-coarse:py-2 pl-2 pr-8 text-left text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground active:bg-state-active active:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),"data-disabled":a?"":void 0,onClick:()=>{if(a)return;let b=So();r?.(b),i?.(o==="indeterminate"?!0:!o),b.defaultPrevented||h(!1)},children:[n("span",{className:y("absolute right-2 flex items-center justify-center",Re),children:(o===!0||o==="indeterminate")&&n(oe,{name:"Check",className:Re})}),t]}):c(no,{ref:f,className:y("relative flex cursor-default select-none items-center rounded-sm py-[0.3125rem] pl-2 pr-8 text-xs outline-none focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",Ae,xt,e),checked:o,onSelect:r,onCheckedChange:i,disabled:a,textValue:s,...u,...v,children:[n("span",{className:y("absolute right-2 flex items-center justify-center",Re),children:n(Qt,{children:n(oe,{name:"Check",className:Re})})}),t]})});za.displayName="DropdownMenuCheckboxItem";var Va=N(({className:e,children:t,onPointerEnter:o,onKeyDown:r,...i},a)=>{let{isCompactViewport:s}=ye(),{hoverProps:l}=$e({onPointerEnter:o,onKeyDown:r});return s?null:c(Xt,{ref:a,className:y("relative flex cursor-default select-none items-center rounded-sm py-[0.3125rem] pl-8 pr-2 text-xs outline-none focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",Ae,xt,e),...i,...l,children:[n("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n(Qt,{children:n(oe,{name:"Circle",className:"h-2 w-2 fill-current"})})}),t]})});Va.displayName=Xt.displayName;var Wa=N(({className:e,inset:t,children:o,...r},i)=>{let{isCompactViewport:a}=ye();return a?n("div",{ref:i,className:y("px-2 py-[0.3125rem] max-md:pointer-coarse:py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),children:o}):n(io,{ref:i,className:y("px-2 py-[0.3125rem] text-xs font-medium text-muted-foreground",t&&"pl-8",e),...r,children:o})});Wa.displayName="DropdownMenuLabel";var sn=N(({className:e,...t},o)=>{let{isCompactViewport:r}=ye();return r?n("hr",{ref:o,className:y("-mx-1 my-1 h-px border-0 bg-muted",e)}):n(co,{ref:o,className:y("-mx-1 my-1 h-px bg-muted",e),...t})});sn.displayName="DropdownMenuSeparator";var Ka=N(({children:e,...t},o)=>{let{isCompactViewport:r}=ye();return r?n("div",{ref:o,role:"group",...t,children:e}):n(ro,{ref:o,...t,children:e})});Ka.displayName="DropdownMenuGroup";var Ua=N(({className:e,inset:t,children:o,onPointerEnter:r,onKeyDown:i,...a},s)=>{let{hoverProps:l}=$e({onPointerEnter:r,onKeyDown:i});return c(Zt,{ref:s,className:y("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-[0.3125rem] text-xs outline-none focus:bg-state-hover focus:text-foreground data-[state=open]:bg-state-active data-[state=open]:text-foreground [&_[data-icon-root]]:pointer-events-none [&_[data-icon-root]]:size-4 [&_[data-icon-root]]:shrink-0",Ae,xt,t&&"pl-8",e),...a,...l,children:[o,n(oe,{name:"ChevronRight",className:"ml-auto"})]})});Ua.displayName=Zt.displayName;var ja=N(({className:e,...t},o)=>n(qt,{ref:o,...ue(),className:y("z-50 min-w-28 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));ja.displayName=qt.displayName;var Ga=({className:e,...t})=>n("span",{className:y("ml-auto text-xs tracking-widest opacity-60",e),...t});Ga.displayName="DropdownMenuShortcut";var ne=Qe;var ln=globalThis.__bbPluginRuntime;if(ln==null||ln.radixSelect==null)throw new Error('Cannot load "@radix-ui/react-select": this bundle must be loaded by the Moonlet app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Rt=ln.radixSelect,Md="default"in Rt?Rt.default:Rt,{Arrow:Id,Content:cn,Group:dn,Icon:No,Item:un,ItemIndicator:Po,ItemText:Eo,Label:pn,Portal:To,Root:ko,ScrollDownButton:mn,ScrollUpButton:fn,Select:Od,SelectArrow:Ad,SelectContent:Ld,SelectGroup:Hd,SelectIcon:Bd,SelectItem:$d,SelectItemIndicator:Fd,SelectItemText:zd,SelectLabel:Vd,SelectPortal:Wd,SelectScrollDownButton:Kd,SelectScrollUpButton:Ud,SelectSeparator:jd,SelectTrigger:Gd,SelectValue:Yd,SelectViewport:Qd,Separator:hn,Trigger:vn,Value:_o,Viewport:Do,createSelectScope:Xd,unstable_BubbleInput:qd,unstable_Provider:Zd,unstable_SelectBubbleInput:Jd,unstable_SelectProvider:eu}=Rt;var Qa=new Set([" ","Enter","ArrowUp","ArrowDown"]),yt='[role="option"]:not([aria-disabled="true"])',Xa=1e3,Ct=q(null),Mo=q({isCompactViewport:!1,open:!1,onOpenChange:()=>{}}),Io=q(!1),Oo=q(void 0);function wt(){let e=Q(Ct);return Q(Io)?e:null}function qa(e){if(e===null)return"Options";let t=e.getAttribute("aria-label")?.trim();if(t)return t;let o=(e.getAttribute("aria-labelledby")??"").split(/\s+/).map(i=>e.ownerDocument.getElementById(i)?.textContent?.trim()).filter(Boolean).join(" ");return o||Array.from(e.labels??[]).map(i=>i.textContent?.trim()).filter(Boolean).join(" ")||"Options"}function gn({open:e,defaultOpen:t,onOpenChange:o,value:r,defaultValue:i,onValueChange:a,children:s,...l}){let m=ht(e,o,t),[u,f]=D(i??""),p=r!==void 0,h=p?r:u,v=I(z=>{p||f(z),a?.(z)},[p,a]),b=ge(),[S,_]=D(null),{isCompactViewport:P,open:E,onOpenChange:M}=m,j=ee(()=>P?{open:E,onOpenChange:M,openFromTrigger:z=>{ke(),z.focus({preventScroll:!0}),_(z),M(!0)},value:h,selectValue:z=>{z!==h&&v(z),M(!1)},listboxId:b,label:qa(S)}:null,[v,P,b,M,E,S,h]);return n(Ct.Provider,{value:j,children:n(Mo.Provider,{value:m,children:n(ko,{...l,value:h,onValueChange:v,open:!P&&E,onOpenChange:M,children:s})})})}var Za=N((e,t)=>{let o=wt(),r=ge();return o===null?n(dn,{ref:t,...e}):n(Oo.Provider,{value:r,children:n("div",{ref:t,role:"group","aria-labelledby":r,...e})})});Za.displayName=dn.displayName;var bn=_o,St=N(({className:e,children:t,onClick:o,onKeyDown:r,onPointerDown:i,...a},s)=>{let l=Q(Ct),m=Q(Mo),u=bt(s,m.open&&!m.isCompactViewport,m.onOpenChange),f=l===null?{onClick:o,onKeyDown:r,onPointerDown:i}:{"aria-expanded":l.open,"aria-controls":l.open?l.listboxId:void 0,"data-state":l.open?"open":"closed",onPointerDown:p=>{i?.(p),p.pointerType==="mouse"&&p.button===0&&p.preventDefault()},onClick:p=>{o?.(p),!p.defaultPrevented&&(p.preventDefault(),l.openFromTrigger(p.currentTarget))},onKeyDown:p=>{r?.(p),!(p.defaultPrevented||!Qa.has(p.key))&&(p.preventDefault(),l.openFromTrigger(p.currentTarget))}};return c(vn,{ref:u,className:y(`flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm ${be} placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1`,e),...a,...f,children:[t,n(No,{asChild:!0,children:n(oe,{name:"ChevronDown",className:"size-4 opacity-50"})})]})});St.displayName=vn.displayName;var Ao=N(({className:e,...t},o)=>n(fn,{ref:o,className:y("flex cursor-default items-center justify-center py-1",e),...t,children:n(oe,{name:"ChevronUp",className:"size-4"})}));Ao.displayName=fn.displayName;var Lo=N(({className:e,...t},o)=>n(mn,{ref:o,className:y("flex cursor-default items-center justify-center py-1",e),...t,children:n(oe,{name:"ChevronDown",className:"size-4"})}));Lo.displayName=mn.displayName;function Ja(e,t){let o=Array.from(e.querySelectorAll(yt)),r=o.findIndex(s=>s===e.ownerDocument.activeElement),i=o.length-1,a=t==="Home"?0:t==="End"?i:t==="ArrowDown"?Math.min(i,r+1):t==="ArrowUp"?Math.max(0,r-1):null;return a===null?!1:(o[a]?.focus(),!0)}function ei(e){return e.dataset.textValue??e.textContent?.trim()??""}function ti(e,t,o){let r=o.charAt(0),a=(Array.from(o).every(u=>u===r)?r:o).toLowerCase(),s=t===void 0?0:e.indexOf(t),l=[...e.slice(s),...e.slice(0,s)];return(a.length===1?l.filter(u=>u!==t):l).find(u=>ei(u).toLowerCase().startsWith(a))}var Ho=N(({compact:e,children:t,onKeyDown:o,onKeyDownCapture:r,...i},a)=>{let s=T(null),l=T({search:"",timeout:0}),m=I(u=>{s.current=u,typeof a=="function"?a(u):a!==null&&(a.current=u)},[a]);return A(()=>{let u=s.current;if(!e.open||u===null||!_e())return;(u.querySelector(`${yt}[aria-selected="true"]`)??u.querySelector(yt))?.focus()},[e.open]),A(()=>{let u=l.current;return()=>window.clearTimeout(u.timeout)},[]),n("div",{ref:m,role:"listbox",id:e.listboxId,"aria-label":e.label,...i,onKeyDownCapture:u=>{r?.(u);let f=l.current,p=u.ctrlKey||u.altKey||u.metaKey;if(u.defaultPrevented||p||u.key.length!==1||u.key===" "&&f.search==="")return;u.preventDefault(),f.search+=u.key,window.clearTimeout(f.timeout),f.timeout=window.setTimeout(()=>{f.search=""},Xa);let h=Array.from(u.currentTarget.querySelectorAll(yt)),v=u.currentTarget.ownerDocument.activeElement,b=h.find(S=>S===v);ti(h,b,f.search)?.focus()},onKeyDown:u=>{o?.(u),!u.defaultPrevented&&Ja(u.currentTarget,u.key)&&u.preventDefault()},children:n(Io.Provider,{value:!0,children:t})})});Ho.displayName="CompactSelectListbox";var Nt=N(({className:e,children:t,position:o="popper",...r},i)=>{let a=Q(Ct),s=ue(),l=n(To,{children:c(cn,{ref:a===null?i:void 0,...s,className:y("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:o,...r,children:[n(Ao,{}),n(Do,{className:y("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),n(Lo,{})]})});if(a===null)return l;let{style:m,...u}=vt(r);return c(re,{children:[l,n(gt,{open:a.open,onOpenChange:a.onOpenChange,srLabel:a.label,onEscapeKeyDown:r.onEscapeKeyDown,onPointerDownOutside:r.onPointerDownOutside,children:n(Ho,{ref:i,compact:a,className:y("overflow-y-auto px-2 pt-1 pb-3",e),...u,style:{...m,...ft},children:t})})]})});Nt.displayName=cn.displayName;var ni=N(({className:e,...t},o)=>{let r=wt(),i=Q(Oo),a=y("px-2 py-1.5 text-sm font-semibold",e);return r===null?n(pn,{ref:o,className:a,...t}):n("div",{ref:o,id:i,className:a,...t})});ni.displayName=pn.displayName;var pe=N(({className:e,children:t,value:o,disabled:r,textValue:i,onClick:a,onKeyDown:s,...l},m)=>{let u=wt();if(u===null)return c(un,{ref:m,value:o,disabled:r,textValue:i,onClick:a,onKeyDown:s,className:y("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...l,children:[n("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:n(Po,{children:n(oe,{name:"Check",className:"size-4"})})}),n(Eo,{children:t})]});let f=u.value===o,p=()=>{r||u.selectValue(o)};return c("div",{ref:m,role:"option","aria-selected":f,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,"data-state":f?"checked":"unchecked","data-text-value":i,tabIndex:r?void 0:0,className:y("relative flex w-full cursor-default select-none items-center rounded-sm py-2 pl-2 pr-8 text-sm outline-none transition-colors focus:bg-state-hover focus:text-foreground active:bg-state-active active:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...l,onClick:h=>{a?.(h),h.defaultPrevented||p()},onKeyDown:h=>{s?.(h),!(h.defaultPrevented||h.target!==h.currentTarget)&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),p())},children:[n("span",{className:y("absolute right-2 flex items-center justify-center",Re),children:f?n(oe,{name:"Check",className:Re}):null}),n("span",{children:t})]})});pe.displayName=un.displayName;var oi=N(({className:e,...t},o)=>{let r=y("-mx-1 my-1 h-px bg-border",e);return wt()===null?n(hn,{ref:o,className:r,...t}):n("div",{ref:o,"aria-hidden":!0,className:r,...t})});oi.displayName=hn.displayName;function ae({className:e,...t}){return n("div",{className:y("animate-pulse rounded-md bg-surface-selected",e),...t})}var Pt=N(({checked:e,className:t,disabled:o,size:r="sm",onCheckedChange:i,onClick:a,...s},l)=>n("button",{...s,ref:l,type:"button",role:"switch","aria-checked":e,disabled:o,"data-state":e?"checked":"unchecked",className:y(`peer inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent bg-input shadow-xs ${be} outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-foreground data-[state=unchecked]:border-input data-[state=unchecked]:bg-muted`,r==="default"&&"h-5 w-9",r==="sm"&&"h-4 w-7",t),onClick:m=>{a?.(m),m.defaultPrevented||i?.(!e)},children:n("span",{"aria-hidden":!0,"data-state":e?"checked":"unchecked",className:y("pointer-events-none block rounded-full bg-background ring-0 transition-transform data-[state=unchecked]:bg-foreground data-[state=unchecked]:translate-x-0",r==="default"&&"size-4 data-[state=checked]:translate-x-4",r==="sm"&&"size-3 data-[state=checked]:translate-x-3")})}));Pt.displayName="Switch";var xn=globalThis.__bbPluginRuntime;if(xn==null||xn.radixTooltip==null)throw new Error('Cannot load "@radix-ui/react-tooltip": this bundle must be loaded by the Moonlet app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Et=xn.radixTooltip,bu="default"in Et?Et.default:Et,{Arrow:xu,Content:Rn,Portal:Bo,Provider:$o,Root:Fo,Tooltip:Ru,TooltipArrow:yu,TooltipContent:Cu,TooltipPortal:wu,TooltipProvider:Su,TooltipTrigger:Nu,Trigger:yn,createTooltipScope:Pu}=Et;var zo=$o,Vo=Fo,Cn=N(function({onFocus:t,...o},r){return n(yn,{ref:r,onFocus:i=>{t?.(i),!i.defaultPrevented&&!_e()&&i.preventDefault()},...o})});Cn.displayName=yn.displayName;var wn=N(function({avoidCollisions:t=!0,className:o,collisionPadding:r=8,sideOffset:i=4,...a},s){return n(Bo,{children:n(Rn,{ref:s,...ue(),avoidCollisions:t,collisionPadding:r,sideOffset:i,className:y("z-50 max-w-[min(20rem,var(--radix-tooltip-content-available-width))] overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground break-words animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o),...a})})});wn.displayName=Rn.displayName;var kt="storage",ai=[7,14,30,60,90,180,365],ii=[7,30,90,180,365];function k(e){if(e<1024)return`${e} B`;let t=Math.min(Math.floor(Math.log(e)/Math.log(1024)),4);return`${Number((e/1024**t).toFixed(1))} ${["B","KB","MB","GB","TB"][t]}`}function Ve(e){let t=Math.round((Date.now()-e)/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let o=Math.round(t/60);return o<24?`${o}h ago`:`${Math.round(o/24)}d ago`}function si(e){return e%365===0?e===365?"1 year":`${e/365} years`:e%7===0&&e<=28?e===7?"1 week":`${e/7} weeks`:e===1?"1 day":`${e} days`}function F(e,t,o=`${t}s`){return`${e.toLocaleString()} ${e===1?t:o}`}function ze(e){return e instanceof Error?e.message:String(e)}function Se(e,t,o){let r={development:["Deleting development data","Development data deleted","Couldn\u2019t delete development data"],orphans:["Deleting orphaned files","Orphaned files deleted","Couldn\u2019t delete orphaned files"],worktrees:["Retrying checkout cleanup","Checkout cleanup retried","Couldn\u2019t clean up checkouts"],externalWorktrees:["Removing worktrees created outside Moonlet","Worktrees removed","Couldn\u2019t remove worktrees"],largeFileCleanup:["Deleting large archived files","Large archived files deleted","Couldn\u2019t delete large archived files"],archivedFileCleanup:["Deleting archived thread files","Archived thread files deleted","Couldn\u2019t delete archived thread files"]},[i,a,s]=r[e];return{title:i,completed:a,failed:s,description:o,background:{hostId:t},id:`storage:${t??"all"}:${e==="largeFileCleanup"||e==="archivedFileCleanup"?e:"maintenance"}`}}function li(e){let t=Lt(),o=Ln(),[r,i]=D(null),[a,s]=D(null),l=T(0),m=T(0),u=I(h=>{l.current++,i(v=>v===null?null:{...v,state:h})},[]),f=I(async()=>{let h=l.current,v=++m.current;try{let[b,S,_,P]=await Promise.all([t.call("state",null),t.call("hosts",null),o.hosts.list({type:"persistent"}),o.system.config()]);if(v!==m.current)return;i(E=>({state:h===l.current||E===null?b:E.state,hosts:S.hosts,machines:Object.fromEntries(_.map(M=>[M.id,M])),primaryHostId:P.primaryHostId})),s(null)}catch(b){v===m.current&&s(ze(b))}},[t,o]),p=T(new Map);return A(()=>{for(let h of r?.hosts??[])for(let v of["largeFileCleanup","archivedFileCleanup","maintenance"]){let b=h[v],S=`${h.hostId}:${v}`,_=JSON.stringify(b),P=p.current.get(S);if(P!==void 0&&P!==_&&b.state!=="idle"){let E=r?.machines[h.hostId]?.name??h.hostId,M=Se("kind"in b?b.kind:v==="largeFileCleanup"?"largeFileCleanup":"archivedFileCleanup",h.hostId,E);b.state==="running"&&J.loading(M.title,{id:M.id,description:E}),b.state==="failed"&&J.error(M.failed,{id:M.id,description:`${E} \xB7 ${b.message}`}),b.state==="completed"&&J.success(M.completed,{id:M.id,description:`${E} \xB7 ${"message"in b?b.message:`${k(b.clearedBytes)} freed`}`})}p.current.set(S,_)}},[r]),A(()=>{f()},[f]),At("changed",f),At("policy-changed",async()=>{let h=l.current;try{let v=await t.call("state",null);h===l.current&&u(v)}catch(v){J.error("Couldn\u2019t refresh retention settings",{description:ze(v)})}}),A(()=>o.subscribe({event:"realtime:connection",callback:h=>{h.state==="connected"&&h.reconnected&&f()}}),[o,f]),n(ci,{hostId:e.subPath||null,data:r,loadError:a,refresh:f,updateState:u},e.subPath)}function ci({hostId:e,data:t,loadError:o,refresh:r,updateState:i}){let a=Lt(),s=Xe(),l=t?.state??null,m=t?.hosts??[],u=t?.machines??{},f=t?.primaryHostId??null,p=m.find(d=>d.hostId===e)??null,[h,v]=D(!1),b=T(!1),[S,_]=D(!1),P=S||m.some(d=>(e===null||d.hostId===e)&&(d.largeFileCleanup.state==="running"||d.archivedFileCleanup.state==="running"||d.maintenance.state==="running")),[E,M]=D({}),[j,z]=D(null),W=l?.policy??null,[O,me]=D(null);function X(d){me(d)}async function se(d,C={title:"Starting storage scan",completed:"Storage scan started",failed:"Couldn\u2019t start storage scan",description:e?u[e]?.name??e:"Online machines"},U){_(!0);let H=J.loading(C.title,{id:C.id,description:C.description});try{let B=await d();C.background?C.background.hostId===null&&J.info(C.title,{id:H,description:"Started on all online machines"}):J.success(C.completed,{id:H,description:U?.(B)||C.description}),r()}catch(B){J.error(C.failed,{id:H,description:`${C.description} \xB7 ${ze(B)}`})}finally{_(!1)}}async function x(d,C){if(l===null||b.current)return;let U=l,H={...l,policy:{...l.policy,[d]:C}};b.current=!0,v(!0),i(H);let B={archiveAfterDays:"Archive inactive threads",deleteAfterDays:"Delete archived threads",deleteStorageOnArchive:"Delete thread storage on archive",deleteDevDataOnCheckoutRemoval:"Delete development data when its checkout is removed"}[d];try{i(await a.call("configure",H.policy))}catch(G){i(U),J.error("Couldn\u2019t save setting",{description:`${B} \xB7 ${ze(G)}`})}finally{b.current=!1,v(!1)}}async function R(d,C,U){if(E[d]?.state==="running")return;M(B=>({...B,[d]:{state:"running"}}));let H=J.loading(C.title,{description:C.description});try{let B=await U();B===null?J.dismiss(H):J.success(C.completed,{id:H,description:B||C.description}),r()}catch(B){J.error(C.failed,{id:H,description:`${C.description} \xB7 ${ze(B)}`})}finally{M(B=>{let G={...B};return delete G[d],G})}}let Y=l!==null&&(l.policy.archiveAfterDays!==null||l.policy.deleteAfterDays!==null),g=p?.report,Z=g?.developerStorage?.entries.filter(d=>d.sourcePathState==="missing"&&!d.current)??[],ie=g?.externalWorktrees.reduce((d,C)=>d+C.sizeBytes,0)??0,w=Z.reduce((d,C)=>d+C.sizeBytes,0),V=e!==null&&j===e,L=p?.scan.state==="scanning",K=e?u[e]:void 0,de=K!==void 0&&K.status!=="connected",Qo=Object.values(E).some(d=>d.state==="running"),Pe=P||de||Qo,_t=P||de;function Xo(d,C,U){return{key:"dev-instances",feedback:Se("development",d,u[d]?.name??d),action:"Remove instances",title:`Remove ${F(C,"development instance")} (${k(U)})?`,detail:"Delete the databases, logs, and thread files of development instances whose source checkout no longer exists. Development servers still running from those checkouts are stopped first. This can\u2019t be undone.",run:async()=>(await a.call("startCleanup",{hostId:d,kind:"development"}),"Development storage cleanup started in the background.")}}function Tn(d,C){return{key:"large-files",feedback:Se("largeFileCleanup",d,d?u[d]?.name??d:"All online machines"),action:"Delete large files",title:`Delete ${C.fileCount.toLocaleString()} large ${C.fileCount===1?"file":"files"} (${k(C.bytes)})?`,detail:`Delete files of ${k(10485760)} or more from ${F(C.threadCount,"archived thread")}. Smaller files and conversation history will be kept. Pinned threads are skipped. This can\u2019t be undone.`,run:async()=>(await a.call("startClearLargeFiles",{hostId:d}),"Large-file cleanup started in the background.")}}let qo=m.filter(d=>u[d.hostId]?.status==="connected"&&d.scan.state!=="scanning"),fe=m.reduce((d,C)=>C.report&&u[C.hostId]?.status==="connected"?{threadCount:d.threadCount+C.report.archivedLargeFiles.threadCount,fileCount:d.fileCount+C.report.archivedLargeFiles.fileCount,bytes:d.bytes+C.report.archivedLargeFiles.bytes}:d,{threadCount:0,fileCount:0,bytes:0}),Ke=m.filter(d=>{let C=d.largeFileCleanup;return(e===null||d.hostId===e)&&C.state==="running"}),kn=Ke.some(d=>d.largeFileCleanup.state==="running"),_n=Ke.length>0&&n("div",{className:"space-y-2 border-t border-border pt-3",children:Ke.map(d=>d.largeFileCleanup.state!=="running"?null:c("p",{role:"status",className:"flex items-center gap-2 text-xs text-muted-foreground",children:[n(ne,{name:"Spinner",className:"size-3.5 shrink-0 animate-spin"}),e===null&&`${u[d.hostId]?.name??d.hostId}: `,"Deleting large files\u2026"]},d.hostId))}),Zo=fe.bytes>=1073741824||Ke.length>0?[{title:kn?"Deleting large files":fe.bytes>=1073741824?`Free up ${k(fe.bytes)} from archived threads`:"Large-file cleanup",description:kn||fe.bytes<1073741824?"Smaller files and conversation history are kept.":`${F(fe.fileCount,"file")} of ${k(10485760)} or more sit in the thread storage of ${F(fe.threadCount,"archived thread")}. Deleting them keeps smaller files like reports, and conversation history isn\u2019t affected.`,action:"Delete large files",cleanup:Tn(null,fe)}]:[],he=O&&c("div",{role:"region","aria-label":"Confirm cleanup",className:"flex flex-col gap-3 rounded-lg border border-destructive/30 bg-destructive/5 p-3",children:[c("div",{className:"flex flex-col gap-1",children:[n("p",{className:"text-sm font-medium",children:O.title}),n("p",{className:"text-xs leading-snug text-subtle-foreground/75",children:O.key==="archived-files"&&g?`Delete ${k(g.archivedFiles.bytes)} of stored files from ${F(g.archivedFiles.threadCount,"archived thread")} on this machine. Conversations and uploaded attachments are kept. Pinned and running threads are skipped. This can\u2019t be undone.`:O.detail})]}),c("div",{className:"flex flex-wrap justify-end gap-2",children:[n(te,{variant:"outline",size:"sm",disabled:P,onClick:()=>X(null),children:"Cancel"}),n(te,{variant:"destructive",size:"sm",disabled:P,onClick:()=>{se(async()=>{let d=await O.run();return X(null),d},O.feedback,d=>d)},children:P?"Removing\u2026":O.action})]})]}),Dn=L&&n("p",{role:"status",className:"text-xs leading-snug text-subtle-foreground/75",children:"Scanning in the background. Large directories may take a few minutes."}),Jo=c("aside",{"aria-label":"What is thread storage?",className:"flex items-start gap-3 rounded-lg border border-border bg-muted/40 px-4 py-3",children:[n(ne,{name:"Info",className:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),c("div",{className:"min-w-0 space-y-1",children:[n("h2",{className:"text-sm font-medium",children:"What is thread storage?"}),n("p",{className:"text-xs leading-snug text-subtle-foreground/75",children:"A place for your agent to keep things that don\u2019t belong in the repo, like plans, reports, and scratch files you don\u2019t want to commit. Clearing it removes those files for good. Your conversation history and uploaded attachments are kept separately."})]})]});return n("div",{className:"h-full w-full overflow-y-auto",children:c("div",{className:y("mx-auto w-full max-w-3xl px-4 pb-10 pt-4 md:px-5 md:pt-5",e?"space-y-6":"space-y-10"),children:[e&&l&&c("header",{className:"space-y-3",children:[c("button",{className:"inline-flex items-center gap-1.5 text-xs leading-snug text-subtle-foreground/75 hover:text-foreground",onClick:()=>s.toPluginPanel(kt),children:[n(ne,{name:"ArrowLeft",className:"size-4"}),"All machines"]}),c("div",{className:"flex flex-col items-start justify-between gap-4 sm:flex-row",children:[c("div",{className:"min-w-0 flex-1",children:[c("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[n("h1",{className:"min-w-0 break-words text-base font-semibold",children:K?.name??"Machine storage"}),c("div",{className:"flex shrink-0 items-center gap-1.5",children:[e===f&&n(We,{children:"server"}),K&&n(Go,{machine:K})]})]}),n("p",{className:"mt-0.5 text-xs leading-snug text-subtle-foreground/75",children:"Review stored files and free up space on this machine."})]}),c(te,{variant:"outline",size:"sm",className:"shrink-0",disabled:S||L||de||!p,onClick:()=>{se(()=>a.call("scanHost",{hostId:e}))},children:[n(ne,{name:"RotateCcw",className:L?"animate-spin":""}),L?"Scanning\u2026":g?"Rescan machine":"Scan machine"]})]})]}),o&&c("div",{role:"alert",className:"flex flex-wrap items-center justify-between gap-3 rounded-lg border border-destructive/30 bg-destructive/5 px-4 py-3 text-sm text-destructive",children:[n("p",{children:o}),o&&n(te,{variant:"outline",size:"sm",onClick:()=>{r()},children:"Try again"})]}),p?.maintenance.state==="running"&&n("p",{role:"status",className:"text-xs text-muted-foreground",children:p.maintenance.kind==="orphans"?"Removing orphaned storage\u2026":p.maintenance.kind==="development"?"Removing development instances\u2026":p.maintenance.kind==="externalWorktrees"?"Removing worktrees created outside Moonlet\u2026":"Retrying worktree cleanup\u2026"}),l?e?c("div",{className:"space-y-6",children:[Jo,de&&c("div",{role:"status",className:"flex items-start gap-2 rounded-lg border border-border bg-muted/40 px-3 py-2.5 text-xs leading-snug text-subtle-foreground",children:[n(ne,{name:"CloudOff",className:"mt-px size-3.5 shrink-0"}),n("p",{children:"This machine is offline. Scanning and cleanup are available once it reconnects."})]}),p?.scan.state==="failed"&&c("p",{role:"alert",className:"text-sm text-destructive",children:["Scan failed: ",p.scan.message]}),g?c(re,{children:[c("section",{className:"space-y-4 rounded-lg border border-border bg-card px-4 py-3.5","aria-label":"Storage breakdown",children:[c("div",{className:"flex items-baseline justify-between gap-3",children:[n("p",{className:"text-sm font-medium",children:g.developerStorage?"Total":"Thread storage"}),n("p",{className:"text-lg font-semibold tabular-nums",children:k(Yo(g).reduce((d,C)=>d+C.value,0))})]}),n(xi,{report:g}),c("div",{className:"space-y-1 border-t border-border pt-3 text-xs text-muted-foreground",children:[g.disk&&c("p",{className:"tabular-nums",children:["Disk space: ",k(g.disk.freeBytes)," free of"," ",k(g.disk.totalBytes)]}),c("p",{title:new Date(g.scannedAt).toLocaleString(),children:["Scanned ",Ve(g.scannedAt)]}),Dn]})]}),n(mi,{report:g}),c("section",{className:"space-y-3",children:[n(Me,{title:"Clean up"}),c("div",{className:"divide-y divide-border rounded-lg border border-border bg-card",children:[c(De,{title:"All files in archived threads",size:g.archivedFiles.bytes,description:`Clear stored files of any size from ${F(g.archivedFiles.threadCount,"archived thread")}. Pinned and running threads are skipped. Conversations and uploaded attachments are kept.`,action:"Clear archived files",disabled:Pe||g.archivedFiles.threadCount===0,onAction:()=>X({key:"archived-files",feedback:Se("archivedFileCleanup",g.hostId,K?.name??g.hostId),title:"Clear all archived thread files?",action:"Clear archived files",detail:`Delete ${k(g.archivedFiles.bytes)} of stored files from ${F(g.archivedFiles.threadCount,"archived thread")} on this machine. This includes small files. Conversations and uploaded attachments will be kept. Pinned and running threads are skipped. This can\u2019t be undone.`,run:async()=>(await a.call("startClearArchivedFiles",{hostId:g.hostId}),"Archived-file cleanup started in the background.")}),children:[O?.key==="archived-files"&&he,p?.archivedFileCleanup&&p.archivedFileCleanup.state==="running"&&c("p",{role:"status",className:"mt-3 text-xs text-muted-foreground",children:["Removing archived files in the background. Cleared"," ",k(p.archivedFileCleanup.clearedBytes)," ","from"," ",F(p.archivedFileCleanup.clearedThreads,"thread"),"."]})]}),c(De,{title:"Large files in archived threads",size:g.archivedLargeFiles.bytes,description:g.archivedLargeFiles.fileCount?`${F(g.archivedLargeFiles.fileCount,"file")} of ${k(10485760)} or more across ${F(g.archivedLargeFiles.threadCount,"archived thread")}. Smaller files and conversation history are kept.`:`No files of ${k(10485760)} or more in archived threads.`,action:"Delete large files",disabled:Pe||g.archivedLargeFiles.fileCount===0,onAction:()=>X(Tn(g.hostId,g.archivedLargeFiles)),children:[O?.key==="large-files"&&he,_n]}),n(De,{title:"Orphaned storage",size:g.orphanBytes,description:"Files left behind by deleted threads. Moonlet cleans these up automatically while idle.",action:"Remove orphans",disabled:Pe||g.orphanCount===0,onAction:()=>X({key:"orphans",feedback:Se("orphans",g.hostId,K?.name??g.hostId),action:"Remove orphans",title:`Remove ${k(g.orphanBytes)} of orphaned storage?`,detail:"Delete folders no longer attached to a thread. Existing threads and their files will be kept. This can\u2019t be undone.",run:async()=>(await a.call("startCleanup",{kind:"orphans",hostId:g.hostId}),"Orphan cleanup started in the background.")}),children:O?.key==="orphans"&&he}),n(De,{title:"Leftover worktrees",size:g.leftoverWorktreeBytes,description:"Checkouts Moonlet could not remove after their threads were archived. Moonlet retries automatically.",action:"Retry cleanup",disabled:Pe||g.leftoverWorktrees.length===0,onAction:()=>{se(async()=>{await a.call("startCleanup",{kind:"worktrees",hostId:e})},Se("worktrees",e,K?.name??e??"Machine"))},children:g.leftoverWorktrees.length>0&&c("details",{className:"text-xs text-muted-foreground",children:[c("summary",{className:"cursor-pointer",children:[F(g.leftoverWorktrees.length,"checkout")," ","awaiting removal"]}),n("div",{className:"mt-2 space-y-2",children:g.leftoverWorktrees.map(d=>c("div",{className:"space-y-1 border-l border-border pl-3",children:[n("p",{className:"break-all",children:d.path}),c("p",{className:"mt-1 text-muted-foreground",children:[k(d.sizeBytes),d.teardownMessage&&` \xB7 ${d.teardownMessage}`]})]},d.environmentId))})]})}),c(De,{title:"Worktrees created outside Moonlet",size:ie,description:"Git worktrees of your projects that Moonlet didn\u2019t create, such as ones agents added with git worktree add. Removing them keeps their branches. Bulk removal keeps worktrees with uncommitted changes, locked worktrees, and detached worktrees with commits on no branch; remove those one at a time.",action:"Remove worktrees",disabled:Pe||g.externalWorktrees.length===0,onAction:()=>X({key:"external-worktrees",feedback:Se("externalWorktrees",g.hostId,K?.name??g.hostId),action:"Remove worktrees",title:`Remove ${F(g.externalWorktrees.length,"worktree")} created outside Moonlet (${k(ie)})?`,detail:"Delete these checkouts, including ignored files such as dependencies, build output, and local env files. Branches and commits stay in the repository. Worktrees with uncommitted changes, locked worktrees, and detached worktrees with commits on no branch are kept; remove those one at a time. Make sure no agent is still working in them. This can\u2019t be undone.",run:async()=>(await a.call("startCleanup",{kind:"externalWorktrees",hostId:g.hostId}),"Worktree removal started in the background.")}),children:[O?.key==="external-worktrees"&&he,g.externalWorktrees.length>0&&n(vi,{worktrees:g.externalWorktrees,projectNames:new Map(g.projectWorktrees.map(d=>[d.projectId,d.projectName])),rowDisabled:_t,rowActions:E,confirmationKey:O?.key??null,confirmation:he,onRemove:(d,C)=>{let U={title:"Removing worktree",completed:"Worktree removed",failed:"Couldn\u2019t remove worktree",description:d.path},H=async B=>{let G=await a.call("removeExternalWorktrees",{hostId:g.hostId,paths:[d.path],force:B}),ve=G.failed[0];if(ve)throw new Error(ve.message);return G};R(`worktree:${d.path}`,U,async()=>{let B=await H(!1),G=B.skipped[0]?.reasons;if(G===void 0)return`${d.path} \xB7 ${k(B.removedBytes)} freed`;let ve=G.filter(le=>le==="locked"||le==="uncommittedChanges"||le==="unsavedCommits");if(ve.length!==G.length)throw new Error(Ko[G[0]]);return X({key:`external-worktree:${d.path}`,feedback:U,action:"Remove anyway",title:`Remove \u201C${C}\u201D anyway (${k(d.sizeBytes)})?`,detail:[...ve.map(le=>fi[le]),"The checkout is deleted, including ignored files. Its branch is kept. This can\u2019t be undone."].join(" "),run:async()=>{let le=await H(!0),Mn=le.skipped[0];if(Mn)throw new Error(Ko[Mn.reasons[0]]);return`${d.path} \xB7 ${k(le.removedBytes)} freed`}}),null})}})]}),g.developerStorage&&n(De,{title:"Development instances without a checkout",size:w,description:`${F(Z.length,"development instance")} in ~/.bb-dev whose source checkout no longer exists. Servers still running from them are stopped before removal.`,action:"Remove instances",disabled:Pe||Z.length===0,onAction:()=>X(Xo(g.hostId,Z.length,w)),children:O?.key==="dev-instances"&&he})]})]}),c("section",{className:"space-y-3",children:[n(Me,{title:"Threads using the most storage",description:"Clear files permanently removes a stopped thread\u2019s stored files, including small files. Conversation history is kept."}),c("div",{className:"divide-y divide-border rounded-lg border border-border bg-card",children:[g.largestThreads.length===0&&n("p",{className:"p-6 text-center text-xs leading-snug text-subtle-foreground/75",children:"No thread files found in the last scan."}),(V?g.largestThreads:g.largestThreads.slice(0,Ne)).map(d=>{let C=E[d.threadId];return c("div",{className:"flex items-start justify-between gap-3 px-4 py-2.5",children:[c("div",{className:"min-w-0 flex-1 space-y-1",children:[n(jo,{title:d.title,pills:[...d.hidden?["hidden"]:[],...d.pinned?["pinned"]:[],...d.running?["running"]:d.archivedAt!==null?["archived"]:[]],onOpen:()=>s.toThread(d.threadId)}),n(Pn,{action:C,runningLabel:"Clearing files\u2026"})]}),c("div",{className:"flex h-5 shrink-0 items-center gap-2",children:[n("span",{className:"text-xs tabular-nums text-muted-foreground",children:k(d.sizeBytes)}),n(Nn,{label:"Clear files",target:d.title,action:C,disabled:_t||d.running,onClick:()=>{R(d.threadId,{title:"Deleting thread files",completed:"Thread files deleted",failed:"Couldn\u2019t delete thread files",description:d.title},async()=>(await a.call("clearThread",{threadId:d.threadId}),d.title))}})]})]},d.threadId)}),g.largestThreads.length>Ne&&n("div",{className:"px-4 py-2.5",children:n(En,{expanded:V,total:g.largestThreads.length,onToggle:()=>z(V?null:e)})})]})]}),g.developerStorage&&n(bi,{storage:g.developerStorage,rowDisabled:_t,rowActions:E,confirmationKey:O?.key??null,confirmation:he,onRemoveSelected:d=>{let C=d.reduce((H,B)=>H+B.sizeBytes,0),U=d.filter(H=>H.running).length;X({key:"dev-selected",feedback:{title:"Deleting development data",completed:"Development data deleted",failed:"Couldn\u2019t delete development data",description:F(d.length,"development instance")},action:"Remove instances",title:`Remove ${F(d.length,"development instance")} (${k(C)})?`,detail:`Delete their databases, logs, and thread files. Source checkouts are kept.${U>0?` ${F(U,"dev server")} running at the last scan ${U===1?"is":"are"} stopped first.`:""} This can\u2019t be undone.`,run:async()=>{let H=0,B=0;for(let G=0;G<d.length;G+=500){let ve=await a.call("removeDevInstances",{hostId:g.hostId,names:d.slice(G,G+500).map(le=>le.name),stopRunning:!0});H+=ve.removedCount,B+=ve.removedBytes}if(H===0)throw new Error("No data was deleted. Rescan the machine to update its status.");return`${F(H,"instance")} removed \xB7 ${k(B)} freed`}})},onRemove:(d,C)=>{R(`dev:${d.name}`,{title:"Deleting development data",completed:"Development data deleted",failed:"Couldn\u2019t delete development data",description:`${g.developerStorage.path}/${d.name}`},async()=>{let U=await a.call("removeDevInstances",{hostId:g.hostId,names:[d.name],stopRunning:!1});if(U.running.length>0)X({key:`dev-instance:${d.name}`,feedback:{title:"Deleting development data",completed:"Development data deleted",failed:"Couldn\u2019t delete development data",description:`${g.developerStorage.path}/${d.name}`},action:"Stop and remove",title:`Stop and remove \u201C${C}\u201D (${k(d.sizeBytes)})?`,detail:"Its dev server is running. Moonlet will stop it, then delete its database, logs, and thread files. The source checkout is kept. This can\u2019t be undone.",run:async()=>{let H=await a.call("removeDevInstances",{hostId:g.hostId,names:[d.name],stopRunning:!0});if(H.removedCount===0)throw new Error("No data was deleted. Rescan the machine to update its status.");return`${g.developerStorage.path}/${d.name} \xB7 ${k(H.removedBytes)} freed`}});else{if(U.removedCount===0)throw new Error("No data was deleted. Rescan the machine to update its status.");return`${g.developerStorage.path}/${d.name} \xB7 ${k(U.removedBytes)} freed`}return null})}})]}):c("div",{className:"flex flex-col items-center gap-3 rounded-lg border border-dashed border-border px-6 py-12 text-center",children:[n(Qe,{name:"DatabaseRestore",className:"size-8 text-muted-foreground"}),n("h2",{className:"text-base font-medium",children:L?"Scanning this machine":"See what\u2019s taking up space"}),L?Dn:n("p",{className:"max-w-sm text-xs leading-snug text-subtle-foreground/75",children:"Scan this machine to measure thread files and find storage you can clean up. Nothing is removed during a scan."})]})]}):c(re,{children:[Zo.map(d=>c("div",{className:"space-y-3 rounded-lg border border-border bg-muted/40 px-4 py-3",children:[c("div",{className:"flex flex-col items-start gap-3 sm:flex-row sm:items-center",children:[n(ne,{name:"Clean",className:"hidden size-4 shrink-0 text-subtle-foreground sm:block"}),c("div",{className:"min-w-0 flex-1",children:[n("p",{className:"text-sm font-normal",children:d.title}),n("p",{className:"mt-0.5 text-xs leading-snug text-subtle-foreground/75",children:d.description})]}),n(te,{variant:"outline",size:"sm",className:"shrink-0",disabled:P||fe.fileCount===0,onClick:()=>X(d.cleanup),children:d.action})]}),O?.key===d.cleanup.key&&he,_n]},d.cleanup.key)),c("section",{className:"space-y-3",children:[n(Me,{title:"Machine storage",action:c(te,{variant:"outline",size:"sm",disabled:S||qo.length===0,onClick:()=>{se(()=>a.call("scanAll",null))},children:[n(ne,{name:"RotateCcw"}),"Scan all"]})}),c("div",{className:"divide-y divide-border overflow-hidden rounded-lg border border-border bg-card",children:[m.length===0&&c("div",{className:"space-y-2 p-6 text-center",children:[n("p",{className:"text-sm font-normal",children:"No machines connected yet"}),n("p",{className:"text-xs leading-snug text-subtle-foreground/75",children:"Add a persistent machine in Settings \u2192 Machines to inspect its storage."})]}),m.map(d=>n(pi,{host:d,machine:u[d.hostId],server:d.hostId===f,busy:S,onOpen:()=>s.toPluginPanel(kt,{subPath:d.hostId}),onScan:()=>{se(()=>a.call("scanHost",{hostId:d.hostId}),{title:"Starting storage scan",completed:"Storage scan started",failed:"Couldn\u2019t start storage scan",description:u[d.hostId]?.name??d.hostId})}},d.hostId))]})]}),c("section",{className:"space-y-3",children:[n(Me,{title:"Automatic retention",description:"Archive or delete inactive threads across all projects. Changes save automatically.",badge:Y?"Checks hourly":"Off"}),c("div",{role:"note",className:"flex items-start gap-2 rounded-lg border border-border bg-muted/40 px-3 py-2.5 text-xs leading-snug text-subtle-foreground",children:[n(ne,{name:"Pin",className:"mt-px size-3.5 shrink-0"}),c("p",{children:[n("span",{className:"text-foreground",children:"Pinned threads are never archived or deleted."})," ","Automation targets aren\u2019t protected on their own, so pin the ones you want to keep."]})]}),W&&c("div",{className:"divide-y divide-border rounded-lg border border-border bg-card",children:[n(Wo,{label:"Archive inactive threads",description:"After this long with no activity.",presets:ai,value:W.archiveAfterDays,disabled:h,onChange:d=>{x("archiveAfterDays",d)}}),n(Wo,{label:"Delete archived threads",description:"Permanently, after this long in the archive.",presets:ii,value:W.deleteAfterDays,disabled:h,onChange:d=>{x("deleteAfterDays",d)}}),c("label",{className:"flex items-center justify-between gap-4 px-4 py-3",children:[c("span",{children:[n("span",{className:"block text-sm font-medium",children:"Delete thread storage on archive"}),n("span",{className:"block text-xs text-muted-foreground",children:"Permanently remove files after archiving. Conversations and uploaded attachments are kept. Pinned threads are skipped."})]}),n(Pt,{"aria-label":"Delete thread storage on archive",checked:W.deleteStorageOnArchive,disabled:h,onCheckedChange:d=>{x("deleteStorageOnArchive",d)}})]}),c("label",{className:"flex items-center justify-between gap-4 px-4 py-3",children:[c("span",{children:[n("span",{className:"block text-sm font-medium",children:"Delete development data when its checkout is removed"}),n("span",{className:"block text-xs text-muted-foreground",children:"After scans, remove ~/.bb-dev folders with missing checkouts and stop their servers. Checks run hourly, including for existing development data."})]}),n(Pt,{"aria-label":"Delete development data when its checkout is removed",checked:W.deleteDevDataOnCheckoutRemoval,disabled:h,onCheckedChange:d=>{x("deleteDevDataOnCheckoutRemoval",d)}})]}),(l.lastRun||Y)&&n("div",{className:"px-4 py-2.5",children:n("p",{className:"text-xs text-muted-foreground",children:l.lastRun?`Last checked ${Ve(l.lastRun.ranAt)} \xB7 ${l.lastRun.archivedCount} archived \xB7 ${l.lastRun.deletedCount} deleted${l.lastRun.failedCount?` \xB7 ${l.lastRun.failedCount} failed`:""}`:"The first check runs within the hour."})})]})]})]}):!o&&n(to,{children:n(di,{detail:e!==null})})]})})}function di({detail:e}){let t=o=>n("div",{className:"divide-y divide-border rounded-lg border border-border bg-card",children:Array.from({length:o},(r,i)=>c("div",{className:"space-y-2 px-4 py-3.5",children:[n(ae,{className:"h-3.5 w-28"}),n(ae,{className:"h-3 w-56"})]},i))});return n("div",{role:"status","aria-label":"Loading storage",className:"space-y-10",children:e?c(re,{children:[c("div",{className:"space-y-3",children:[n(ae,{className:"h-3 w-24"}),n(ae,{className:"h-5 w-40"}),n(ae,{className:"h-3 w-72"})]}),c("div",{className:"space-y-4 rounded-lg border border-border bg-card px-4 py-3.5",children:[n(ae,{className:"h-6 w-24"}),n(ae,{className:"h-1.5 w-full"}),n("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-4",children:Array.from({length:4},(o,r)=>n(ae,{className:"h-8"},r))})]}),t(2)]}):c(re,{children:[c("div",{className:"space-y-3",children:[n(ae,{className:"h-4 w-32"}),t(3)]}),c("div",{className:"space-y-3",children:[n(ae,{className:"h-4 w-40"}),n(ae,{className:"h-12 w-full rounded-lg"}),t(2)]})]})})}function We({children:e,className:t}){return n("span",{className:y("shrink-0 rounded-sm border border-border bg-muted/40 px-1.5 py-0.5 text-2xs leading-none text-subtle-foreground",t),children:e})}function jo({title:e,pills:t,onOpen:o}){return c("button",{className:"group min-w-0 break-words text-left text-sm font-normal",title:e,onClick:o,children:[n("span",{className:"group-hover:underline",children:e}),t.map(r=>c(Ie,{children:[" ",n(We,{className:"inline-block whitespace-nowrap align-middle",children:r})]},r))]})}function Me({title:e,description:t,badge:o,action:r}){return c("div",{className:"flex items-end justify-between gap-4",children:[c("div",{className:"min-w-0",children:[c("div",{className:"flex min-w-0 items-center gap-2",children:[n("h2",{className:"text-sm font-semibold",children:e}),o&&n(We,{children:o})]}),t&&n("p",{className:"mt-0.5 text-xs leading-snug text-subtle-foreground/75",children:t})]}),r]})}function De({title:e,size:t,description:o,action:r,disabled:i,onAction:a,children:s}){return c("div",{className:"space-y-3 px-4 py-3.5",children:[c("div",{className:"flex flex-col items-start justify-between gap-3 sm:flex-row",children:[c("div",{className:"min-w-0 flex-1",children:[c("p",{className:"text-sm font-normal",children:[e,t>0&&" ",n(ui,{value:t})]}),n("p",{className:"mt-0.5 text-xs leading-snug text-subtle-foreground/75",children:o})]}),n(te,{variant:"outline",size:"sm",disabled:i,onClick:a,children:r})]}),s]})}function ui({value:e}){return e===0?null:n("span",{className:"inline-flex whitespace-nowrap rounded-md bg-muted/50 px-1.5 py-0.5 text-xs font-normal tabular-nums text-muted-foreground",children:k(e)})}function Go({machine:e}){let t=e.status==="connected";return c("span",{className:"inline-flex shrink-0 items-center gap-1.5 text-xs text-subtle-foreground/75",children:[n("span",{"aria-hidden":!0,className:y("size-1.5 shrink-0 rounded-full",t?"bg-success":"border border-muted-foreground")}),t?"Online":e.lastSeenAt?`Offline \xB7 last seen ${Ve(e.lastSeenAt)}`:"Offline"]})}function pi({host:e,machine:t,server:o,busy:r,onOpen:i,onScan:a}){let s=e.report,l=e.scan.state==="scanning",m=t?.name??e.hostId,u=l?"scanning\u2026":e.scan.state==="failed"?"scan failed":s?`scanned ${Ve(s.scannedAt)}`:"not scanned",f=s?[`${k(Uo(s))} in ${F(s.threadsWithStorageCount,"thread")}`,...s.developerStorage?[`${k(s.developerStorage.sizeBytes)} in ${F(s.developerStorage.entries.length,"dev instance")}`]:[],...s.disk?[`${k(s.disk.freeBytes)} free`]:[]]:[];return c("div",{className:"flex w-full cursor-pointer items-start gap-3 px-4 py-3 transition-colors hover:bg-muted/40",onClick:p=>{p.target instanceof Element&&p.target.closest("button")!==null||i()},children:[c("span",{className:"min-w-0 flex-1 space-y-1",children:[c("span",{className:"flex min-w-0 items-center gap-1.5",children:[n(ne,{name:"Laptop",className:"size-3.5 shrink-0 text-subtle-foreground"}),n("button",{className:"min-w-0 truncate rounded-sm text-left text-sm font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onClick:i,children:m}),o&&n(We,{children:"server"})]}),c("span",{className:"flex min-w-0 flex-wrap items-center gap-x-1.5 text-xs text-subtle-foreground/75",children:[t&&n(Go,{machine:t}),n("span",{"aria-hidden":!0,children:"\xB7"}),n("span",{children:u})]}),f.length>0&&n("span",{className:"block text-xs tabular-nums text-subtle-foreground/75",children:f.map((p,h)=>c("span",{children:[c("span",{className:"whitespace-nowrap",children:[p,h<f.length-1&&"\xA0\xB7"]}),h<f.length-1&&" "]},p))})]}),c("span",{className:"-my-1 flex shrink-0 items-center gap-1",children:[s&&n("span",{className:"mr-1 text-sm font-medium tabular-nums",children:k(Uo(s)+(s.developerStorage?.sizeBytes??0))}),n(te,{variant:"ghost",size:"icon",className:"size-7","aria-label":`${s?"Rescan":"Scan"} ${m}`,disabled:r||l||t?.status!=="connected",onClick:a,children:n(ne,{name:"RotateCcw",className:y("size-4",l&&"animate-spin")})}),n(ne,{name:"ChevronRight",className:"size-4 shrink-0 text-muted-foreground"})]})]})}function Wo({label:e,description:t,presets:o,value:r,disabled:i,onChange:a}){let s=r===null||o.includes(r)?o:[...o,r].sort((l,m)=>l-m);return c("div",{className:"flex flex-col items-start justify-between gap-2.5 px-4 py-3.5 sm:flex-row sm:items-center sm:gap-5",children:[c("div",{className:"min-w-0 flex-1",children:[n("p",{className:"text-sm font-normal",children:e}),n("p",{className:"mt-0.5 text-xs leading-snug text-subtle-foreground/75",children:t})]}),c(gn,{disabled:i,value:r===null?"never":String(r),onValueChange:l=>a(l==="never"?null:Number(l)),children:[n(St,{"aria-label":e,className:"h-8 w-40 shrink-0",children:n(bn,{})}),c(Nt,{align:"end",children:[n(pe,{value:"never",children:"Never"}),s.map(l=>c(pe,{value:String(l),children:["After ",si(l)]},l))]})]})]})}function mi({report:e}){return c("section",{className:"space-y-3",children:[n(Me,{title:"Worktrees by project",description:"Moonlet worktrees are the managed checkouts Moonlet tracks. Other worktrees were added to the same repositories outside Moonlet, for example by agents running git worktree add. Projects with a source here are included even when they have no worktrees. These counts are separate from thread files."}),n("div",{className:"overflow-x-auto rounded-lg border border-border bg-card px-4 py-2",children:e.projectWorktrees.length===0?n("p",{className:"py-3 text-xs text-muted-foreground",children:"No projects with sources or managed worktrees on this machine."}):c("table",{className:"w-full text-xs",children:[n("caption",{className:"sr-only",children:"Project worktree counts on this machine"}),n("thead",{children:c("tr",{className:"text-muted-foreground",children:[n("th",{scope:"col",className:"w-full py-2 text-left align-bottom font-normal",children:"Project"}),n("th",{scope:"col",className:"py-2 pl-3 text-right align-bottom font-normal sm:whitespace-nowrap sm:pl-6",children:"Moonlet worktrees"}),n("th",{scope:"col",className:"py-2 pl-3 text-right align-bottom font-normal sm:whitespace-nowrap sm:pl-6",children:"Other worktrees"}),n("th",{scope:"col",className:"py-2 pl-3 text-right align-bottom font-normal sm:whitespace-nowrap sm:pl-6",children:"Awaiting cleanup"})]})}),n("tbody",{className:"divide-y divide-border",children:e.projectWorktrees.map(t=>c("tr",{children:[n("th",{scope:"row",className:"py-3 text-left align-top font-normal break-words",children:t.projectName}),n("td",{className:"whitespace-nowrap py-3 pl-3 text-right align-top font-normal tabular-nums sm:pl-6",children:t.worktreeCount.toLocaleString()}),c("td",{className:"whitespace-nowrap py-3 pl-3 text-right align-top font-normal tabular-nums sm:pl-6",children:[t.externalCount.toLocaleString(),t.externalBytes>0&&n("span",{className:"block text-muted-foreground",children:k(t.externalBytes)})]}),n("td",{className:"whitespace-nowrap py-3 pl-3 text-right align-top tabular-nums text-muted-foreground sm:pl-6",children:t.cleanupPendingCount.toLocaleString()})]},t.projectId))})]})})]})}var Ko={notWorktree:"It is no longer a worktree of this repository",locked:"The worktree is locked",uncommittedChanges:"The worktree has uncommitted changes",unsavedCommits:"The worktree has commits that are not on any branch",inUseByBb:"A Moonlet environment now uses this worktree"},fi={locked:"It is locked, which usually means a tool or agent still relies on it.",uncommittedChanges:"Its uncommitted and untracked changes are deleted.",unsavedCommits:"Its commits that aren\u2019t on any branch or tag become unreachable, and git deletes them in a later cleanup."};function hi(e){return[...e.changedFileCount?[F(e.changedFileCount,"uncommitted change")]:[],...e.unsavedCommitCount?[`${F(e.unsavedCommitCount,"commit")} on no branch`]:[]]}function vi({worktrees:e,projectNames:t,rowDisabled:o,rowActions:r,confirmationKey:i,confirmation:a,onRemove:s}){let l=Xe(),[m,u]=D(new Set),f=new Map;for(let p of e)f.set(p.repositoryPath,[...f.get(p.repositoryPath)??[],p]);return c("details",{className:"text-xs text-muted-foreground",children:[c("summary",{className:"cursor-pointer",children:[F(e.length,"worktree")," found"]}),n("div",{className:"mt-3 space-y-4",children:[...f].map(([p,h])=>c("div",{className:"space-y-2",children:[c("h3",{className:"break-all",children:[n("span",{className:"font-medium text-foreground",children:t.get(h[0].projectId)??"Unknown project"})," ","\xB7 ",p," ",c("span",{className:"tabular-nums",children:["(",h.length,")"]})]}),(m.has(p)?h:h.slice(0,Ne)).map(v=>{let b=v.branch??v.path.split(/[\\/]/).filter(Boolean).at(-1)??v.path,S=v.threads[0],_=hi(v);return c("div",{className:"space-y-3 border-l border-border pl-3",children:[c("div",{className:"flex items-start justify-between gap-3",children:[c("div",{className:"min-w-0 flex-1 space-y-1",children:[c("p",{className:"truncate text-sm text-foreground",children:[b,v.locked&&c(re,{children:[" ",n(We,{className:"inline-block align-middle",children:"locked"})]})]}),n("p",{className:"break-all",children:v.path}),_.length>0&&n("p",{className:"text-foreground",children:_.join(" \xB7 ")}),(v.lastActivityAt!==null||S)&&c("p",{children:[v.lastActivityAt!==null&&`Last git activity ${Ve(v.lastActivityAt)}`,v.lastActivityAt!==null&&S&&" \xB7 ",S&&c("button",{className:"hover:text-foreground hover:underline",onClick:()=>l.toThread(S.threadId),children:[S.title,S.archived&&" (archived)"]})]}),n(Pn,{action:r[`worktree:${v.path}`],runningLabel:"Removing worktree\u2026"})]}),c("div",{className:"flex h-5 shrink-0 items-center gap-2",children:[n("span",{className:"tabular-nums",children:k(v.sizeBytes)}),n(Nn,{label:"Remove worktree",target:b,action:r[`worktree:${v.path}`],disabled:o,onClick:()=>s(v,b)})]})]}),i===`external-worktree:${v.path}`&&a]},v.path)}),h.length>Ne&&n(En,{expanded:m.has(p),total:h.length,onToggle:()=>u(v=>{let b=new Set(v);return b.delete(p)||b.add(p),b})})]},p))})]})}function Nn({label:e,target:t,action:o,disabled:r,onClick:i}){let a=o?.state==="running";return n(zo,{delayDuration:250,children:c(Vo,{children:[n(Cn,{asChild:!0,children:n(te,{variant:"ghost",size:"icon",className:"-my-1.5 size-7 text-muted-foreground hover:text-destructive","aria-label":`${e}: ${t}`,disabled:r||a,onClick:i,children:n(ne,{name:a?"Spinner":"Trash2",className:y("size-4",a&&"animate-spin")})})}),n(wn,{children:e})]})})}function Pn({action:e,runningLabel:t}){return e===void 0?null:n("p",{role:"status",className:"text-xs text-muted-foreground",children:t})}function gi(e){let t=e.sourcePath?.split(/[\\/]/).filter(Boolean);return t?.length?t.at(-1)==="bb"?t.at(-2)??"bb":t.at(-1):e.name.match(/thr_[a-zA-Z0-9]+(?:-\d+)?/)?.[0]??e.name.replace(/-[a-f0-9]{12}$/,"")}var Ne=5;function En({expanded:e,total:t,onToggle:o,className:r}){return n("button",{className:y("block rounded-sm text-left text-xs text-muted-foreground underline-offset-4 hover:text-foreground hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",r),"aria-expanded":e,onClick:o,children:e?"Show fewer":`Show ${(t-Ne).toLocaleString()} more`})}function bi({storage:e,rowDisabled:t,rowActions:o,confirmationKey:r,confirmation:i,onRemove:a,onRemoveSelected:s}){let l=Xe(),[m,u]=D(new Set),[f,p]=D("all"),[h,v]=D(null),b=e.entries.filter(x=>x.sourcePathState==="missing"),S=e.entries.filter(x=>x.sourcePath!==null&&x.threads.length===0),_=e.entries.filter(x=>x.sourcePath===null),P=e.entries.filter(x=>x.threads.length>0&&x.threads.every(R=>R.archived)),[E,M]=D(new Set),j=e.entries.filter(x=>E.has(x.name)),z=(x,R)=>M(Y=>{let g=new Set(Y);for(let Z of x)R&&!Z.current?g.add(Z.name):g.delete(Z.name);return g}),W=x=>x.filter(R=>!R.current),O=f==="missing"?b:f==="archived"?P:f==="unlinked"?S:f==="unresolved"?_:e.entries,me=[{title:"Linked threads",description:null,entries:O.filter(x=>x.threads.length>0)},{title:"Other instances",description:"No matching thread in this Moonlet instance",entries:O.filter(x=>x.sourcePath!==null&&x.threads.length===0)},{title:"Unidentified sources",description:"Source checkout could not be determined",entries:O.filter(x=>x.sourcePath===null)}],X=x=>u(R=>{let Y=new Set(R);return Y.delete(x)||Y.add(x),Y}),se=async(x,R)=>{await An({text:x})?v({text:`${R} copied`,failed:!1}):v({text:`Could not copy ${R.toLowerCase()}`,failed:!0})};return c("section",{className:"space-y-3",children:[n(Me,{title:"Moonlet development storage",description:"Databases, logs, and thread files from local development instances in ~/.bb-dev."}),c("div",{className:"space-y-3 rounded-lg border border-border bg-card px-4 py-3.5",children:[c("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[n("p",{className:"text-lg font-medium tabular-nums",children:k(e.sizeBytes)}),c(gn,{value:f,onValueChange:x=>{p(x),u(new Set),v(null)},children:[n(St,{"aria-label":"Filter development storage",className:"h-8 w-56",children:n(bn,{})}),c(Nt,{align:"end",children:[c(pe,{value:"all",children:["All entries (",e.entries.length,")"]}),c(pe,{value:"missing",children:["Missing checkouts (",b.length,")"]}),c(pe,{value:"archived",children:["Archived threads only (",P.length,")"]}),c(pe,{value:"unlinked",children:["Other instances (",S.length,")"]}),c(pe,{value:"unresolved",children:["Unidentified source (",_.length,")"]})]})]})]}),j.length>0&&c("div",{className:"space-y-3",children:[c("div",{role:"status",className:"flex flex-wrap items-center justify-between gap-3 rounded-md bg-muted/50 px-3 py-2",children:[c("p",{className:"text-xs tabular-nums",children:[F(j.length,"instance")," selected \xB7"," ",k(j.reduce((x,R)=>x+R.sizeBytes,0))]}),c("div",{className:"flex gap-2",children:[n(te,{variant:"ghost",size:"sm",onClick:()=>M(new Set),children:"Clear selection"}),n(te,{variant:"outline",size:"sm",disabled:t,onClick:()=>s(j),children:"Remove selected"})]})]}),r==="dev-selected"&&i]}),n("div",{className:"divide-y divide-border border-t border-border",children:me.filter(x=>x.entries.length>0).map(x=>c("div",{className:"py-3",children:[c("div",{className:"flex items-center gap-3",children:[n(lt,{"aria-label":`Select all ${x.title.toLowerCase()}`,checked:W(x.entries).length>0&&W(x.entries).every(R=>E.has(R.name))?!0:x.entries.some(R=>E.has(R.name))?"indeterminate":!1,onCheckedChange:R=>z(W(x.entries),R===!0),disabled:W(x.entries).length===0}),c("h3",{className:"text-xs font-medium text-muted-foreground",children:[x.title," ",c("span",{className:"font-normal tabular-nums text-muted-foreground",children:["(",x.entries.length.toLocaleString(),")"]}),x.description&&c("span",{className:"font-normal text-subtle-foreground/75",children:[" ","\xB7 ",x.description]})]})]}),n("div",{className:"mt-2 space-y-3",children:(m.has(x.title)?x.entries:x.entries.slice(0,Ne)).map(R=>{let Y=R.threads[0],g=Y?.title??gi(R),Z=o[`dev:${R.name}`];return c("div",{className:"space-y-3",children:[c("div",{className:"flex items-start justify-between gap-3",children:[n(lt,{className:"mt-0.5","aria-label":`Select ${g}`,disabled:R.current,checked:E.has(R.name),onCheckedChange:ie=>z([R],ie===!0)}),c("div",{className:"min-w-0 flex-1 space-y-1",children:[Y?n(jo,{title:Y.title,pills:Y.archived?["archived"]:[],onOpen:()=>l.toThread(Y.threadId)}):n("p",{className:"truncate text-sm",children:g}),R.threads.length>1&&c("p",{className:"text-xs text-muted-foreground",children:["Also linked to"," ",F(R.threads.length-1,"other thread")]}),R.sourcePathState==="missing"&&n("p",{className:"text-xs text-muted-foreground",children:"Checkout no longer exists"}),R.sourcePath!==null&&R.sourcePathState==="unknown"&&n("p",{className:"text-xs text-muted-foreground",children:"Could not check whether the checkout exists"}),R.current?n("p",{className:"text-xs text-muted-foreground",children:"Moonlet is running from this instance"}):R.running&&R.sourcePathState!=="missing"&&n("p",{className:"text-xs text-muted-foreground",children:"Dev server running at last scan"}),n(Pn,{action:Z,runningLabel:"Removing instance\u2026"})]}),c("div",{className:"flex h-5 shrink-0 items-center gap-2",children:[n("span",{className:"text-xs font-normal tabular-nums text-muted-foreground",children:k(R.sizeBytes)}),n(Nn,{label:"Remove instance",target:g,action:Z,disabled:t||R.current,onClick:()=>a(R,g)}),c(wo,{children:[n(rn,{asChild:!0,children:n(te,{variant:"ghost",size:"icon",className:"-my-1.5 size-7","aria-label":`Actions for ${g}`,children:n(ne,{name:"MoreHorizontal",className:"size-4"})})}),c(an,{align:"end",children:[R.threads.map(ie=>c(Fe,{onSelect:()=>l.toThread(ie.threadId),children:["Open thread",R.threads.length>1?`: ${ie.title}`:""]},ie.threadId)),R.threads.length>0&&n(sn,{}),R.sourcePath!==null&&n(Fe,{onSelect:()=>{se(R.sourcePath,"Source checkout path")},children:"Copy source checkout path"}),n(Fe,{onSelect:()=>{se(`${e.path}/${R.name}`,"Dev data path")},children:"Copy dev data path"})]})]})]})]}),r===`dev-instance:${R.name}`&&i]},R.name)})}),x.entries.length>Ne&&n(En,{className:"mt-3",expanded:m.has(x.title),total:x.entries.length,onToggle:()=>X(x.title)})]},x.title))}),O.length===0&&n("p",{className:"py-4 text-xs text-muted-foreground",children:"No entries in this category."}),h&&n("p",{role:h.failed?"alert":"status",className:y("text-xs",h.failed?"text-destructive":"text-muted-foreground"),children:h.text})]})]})}function Uo(e){return e.activeThreadBytes+e.archivedThreadBytes+e.orphanBytes}function Yo(e){let t=e.developerStorage?" threads":"";return[{label:`Active${t}`,value:e.activeThreadBytes,count:e.threadsWithStorageCount-e.archivedThreadCount},{label:`Archived${t}`,value:e.archivedThreadBytes,count:e.archivedThreadCount},...e.orphanBytes>0?[{label:"Orphaned",value:e.orphanBytes,count:e.orphanCount}]:[],...e.developerStorage?[{label:"Moonlet development",value:e.developerStorage.sizeBytes,count:e.developerStorage.entries.length}]:[]]}function xi({report:e}){return c("table",{className:"w-full text-xs",children:[n("caption",{className:"sr-only",children:"Storage by category"}),n("thead",{children:c("tr",{className:"text-muted-foreground",children:[n("th",{scope:"col",className:"pb-2 text-left font-normal",children:"Category"}),n("th",{scope:"col",className:"pb-2 pl-3 text-right font-normal",children:"Count"}),n("th",{scope:"col",className:"pb-2 pl-3 text-right font-normal",children:"Size"})]})}),n("tbody",{className:"divide-y divide-border",children:Yo(e).map(t=>c("tr",{children:[n("th",{scope:"row",className:"py-2 text-left font-normal",children:t.label}),n("td",{className:"py-2 pl-3 text-right tabular-nums text-muted-foreground",children:t.count.toLocaleString()}),n("td",{className:"whitespace-nowrap py-2 pl-3 text-right tabular-nums",children:k(t.value)})]},t.label))})]})}var Yu=On(e=>{e.experimental_icons.register({name:"DatabaseRestore",component:Hn}),e.slots.navPanel({id:kt,title:"Storage & retention",icon:"DatabaseRestore",path:kt,component:li})});export{Yu as default};